From 9464c7cf61b9433057924c36e6e02f303a00e768 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Sun, 7 Jan 2007 20:35:10 +0000 Subject: [PATCH] Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many problems with the 2.6.18-based FC5 kernels --- .gitignore | 8 - CREDITS | 27 +- Documentation/ABI/README | 77 - Documentation/ABI/obsolete/devfs | 13 - Documentation/ABI/stable/syscalls | 10 - Documentation/ABI/stable/sysfs-module | 30 - Documentation/ABI/testing/sysfs-class | 16 - Documentation/ABI/testing/sysfs-devices | 25 - Documentation/Changes | 15 +- Documentation/CodingStyle | 100 +- Documentation/DMA-mapping.txt | 8 +- Documentation/DocBook/Makefile | 3 +- Documentation/DocBook/genericirq.tmpl | 474 - Documentation/DocBook/kernel-api.tmpl | 65 +- Documentation/DocBook/kernel-locking.tmpl | 2 +- Documentation/DocBook/libata.tmpl | 104 +- Documentation/DocBook/mtdnand.tmpl | 17 +- Documentation/DocBook/videobook.tmpl | 2 +- Documentation/IPMI.txt | 4 +- Documentation/IRQ.txt | 22 - Documentation/RCU/checklist.txt | 44 +- Documentation/RCU/torture.txt | 34 +- Documentation/RCU/whatisRCU.txt | 18 +- Documentation/README.DAC960 | 6 +- Documentation/SubmitChecklist | 63 - Documentation/SubmittingPatches | 12 +- Documentation/accounting/delay-accounting.txt | 112 - Documentation/accounting/getdelays.c | 396 - Documentation/accounting/taskstats.txt | 181 - Documentation/arm/IXP4xx | 2 +- .../arm/Samsung-S3C24XX/Overview.txt | 35 +- Documentation/arm/Samsung-S3C24XX/S3C2412.txt | 120 - Documentation/arm/Samsung-S3C24XX/S3C2413.txt | 21 - .../arm/Sharp-LH/ADC-LH7-Touchscreen | 61 - Documentation/arm/Sharp-LH/LCDPanels | 59 - Documentation/atomic_ops.txt | 28 +- Documentation/cciss.txt | 1 - Documentation/connector/ucon.c | 206 - Documentation/console/console.txt | 144 - Documentation/cpu-freq/user-guide.txt | 5 +- Documentation/cpu-hotplug.txt | 12 +- Documentation/cpusets.txt | 6 - Documentation/devices.txt | 148 +- Documentation/digiepca.txt | 2 +- Documentation/dontdiff | 1 - Documentation/driver-model/overview.txt | 2 +- Documentation/drivers/edac/edac.txt | 152 +- Documentation/fb/fbcon.txt | 180 +- Documentation/fb/imacfb.txt | 31 - Documentation/feature-removal-schedule.txt | 172 +- Documentation/filesystems/00-INDEX | 4 +- Documentation/filesystems/Locking | 9 +- .../filesystems/automount-support.txt | 2 +- .../filesystems/caching/backend-api.txt | 357 - .../filesystems/caching/cachefiles.txt | 281 - Documentation/filesystems/caching/fscache.txt | 151 - .../filesystems/caching/netfs-api.txt | 752 - .../filesystems/configfs/configfs_example.c | 19 +- Documentation/filesystems/devfs/ChangeLog | 1977 ++ Documentation/filesystems/devfs/README | 1959 ++ Documentation/filesystems/devfs/ToDo | 40 + Documentation/filesystems/devfs/boot-options | 65 + Documentation/filesystems/ext3.txt | 8 - Documentation/filesystems/fuse.txt | 118 +- Documentation/filesystems/inotify.txt | 130 +- Documentation/filesystems/porting | 7 +- .../filesystems/ramfs-rootfs-initramfs.txt | 146 +- Documentation/filesystems/relay.txt | 479 - Documentation/filesystems/relayfs.txt | 442 + Documentation/filesystems/vfs.txt | 6 +- Documentation/hwmon/abituguru | 87 - Documentation/hwmon/abituguru-datasheet | 312 - Documentation/hwmon/lm70 | 31 - Documentation/hwmon/lm83 | 17 +- Documentation/hwmon/smsc47m192 | 102 - Documentation/hwmon/sysfs-interface | 274 +- Documentation/hwmon/userspace-tools | 17 +- Documentation/hwmon/w83791d | 113 - Documentation/i2c/busses/i2c-i801 | 3 +- Documentation/i2c/busses/i2c-nforce2 | 2 - Documentation/i2c/busses/i2c-ocores | 51 - Documentation/i2c/busses/i2c-piix4 | 40 +- Documentation/i2c/busses/i2c-sis96x | 4 +- Documentation/i2c/busses/scx200_acb | 19 +- Documentation/i386/boot.txt | 1 - Documentation/i386/zero-page.txt | 4 - Documentation/ia64/aliasing.txt | 208 - Documentation/infiniband/ipoib.txt | 14 +- Documentation/initrd.txt | 40 +- Documentation/input/joystick.txt | 1 + Documentation/ioctl-number.txt | 3 +- Documentation/irqflags-tracing.txt | 57 - Documentation/isdn/README.gigaset | 7 +- Documentation/kbuild/makefiles.txt | 22 - Documentation/kdump/gdbmacros.txt | 2 +- Documentation/kdump/kdump.txt | 420 +- Documentation/kernel-parameters.txt | 65 +- Documentation/keys-request-key.txt | 54 +- Documentation/keys.txt | 89 +- Documentation/kobject.txt | 2 +- Documentation/lockdep-design.txt | 197 - Documentation/md.txt | 67 - Documentation/memory-barriers.txt | 41 +- Documentation/mips/time.README | 10 +- Documentation/networking/README.ipw2200 | 10 +- Documentation/networking/bonding.txt | 323 +- Documentation/networking/ip-sysctl.txt | 25 +- Documentation/networking/ipvs-sysctl.txt | 143 - Documentation/networking/pktgen.txt | 2 +- Documentation/networking/tuntap.txt | 11 +- Documentation/nfsroot.txt | 275 +- Documentation/pci.txt | 18 +- Documentation/pcmcia/crc32hash.c | 32 - Documentation/pcmcia/devicetable.txt | 36 +- Documentation/pi-futex.txt | 121 - Documentation/power/devices.txt | 90 + Documentation/power/swsusp.txt | 84 +- Documentation/power/video.txt | 4 - Documentation/powerpc/booting-without-of.txt | 20 +- Documentation/ramdisk.txt | 12 +- Documentation/robust-futexes.txt | 2 +- Documentation/rt-mutex-design.txt | 781 - Documentation/rt-mutex.txt | 79 - Documentation/rtc.txt | 7 +- Documentation/scsi/00-INDEX | 2 + Documentation/scsi/ChangeLog.megaraid | 123 - Documentation/scsi/ChangeLog.megaraid_sas | 29 - Documentation/scsi/aacraid.txt | 8 +- Documentation/scsi/cpqfc.txt | 272 + Documentation/scsi/hptiop.txt | 92 - Documentation/scsi/ppa.txt | 2 + Documentation/scsi/tmscsim.txt | 2 +- .../sound/alsa/ALSA-Configuration.txt | 123 +- .../alsa/DocBook/writing-an-alsa-driver.tmpl | 62 +- Documentation/sparc/sbus_drivers.txt | 95 +- Documentation/sparse.txt | 36 +- Documentation/sysctl/fs.txt | 20 - Documentation/sysctl/kernel.txt | 25 +- Documentation/sysctl/vm.txt | 53 +- Documentation/sysrq.txt | 5 +- Documentation/tty.txt | 7 + Documentation/usb/proc_usb_info.txt | 2 +- Documentation/usb/usb-help.txt | 3 +- Documentation/usb/usb-serial.txt | 4 +- Documentation/usb/usbmon.txt | 32 +- Documentation/video4linux/CARDLIST.bttv | 4 +- Documentation/video4linux/CARDLIST.cx88 | 10 +- Documentation/video4linux/CARDLIST.saa7134 | 1 - Documentation/video4linux/CARDLIST.tuner | 3 +- Documentation/video4linux/CQcam.txt | 203 +- Documentation/video4linux/README.pvrusb2 | 212 - Documentation/video4linux/Zoran | 23 - Documentation/video4linux/bttv/CONTRIBUTORS | 8 +- .../video4linux/cx2341x/fw-calling.txt | 69 - .../video4linux/cx2341x/fw-decoder-api.txt | 319 - Documentation/video4linux/cx2341x/fw-dma.txt | 94 - .../video4linux/cx2341x/fw-encoder-api.txt | 694 - .../video4linux/cx2341x/fw-memory.txt | 141 - .../video4linux/cx2341x/fw-osd-api.txt | 342 - .../video4linux/cx2341x/fw-upload.txt | 49 - .../cx88/hauppauge-wintv-cx88-ir.txt | 54 - Documentation/video4linux/et61x251.txt | 52 +- Documentation/video4linux/ibmcam.txt | 168 +- Documentation/video4linux/ov511.txt | 32 +- Documentation/video4linux/sn9c102.txt | 78 +- Documentation/video4linux/v4lgrab.c | 192 - Documentation/video4linux/w9968cf.txt | 162 +- Documentation/video4linux/zc0301.txt | 80 +- Documentation/vm/page_migration | 114 +- Documentation/w1/masters/ds2490 | 18 - Documentation/w1/w1.generic | 18 +- Documentation/w1/w1.netlink | 98 - Documentation/watchdog/pcwd-watchdog.txt | 75 +- Documentation/watchdog/src/watchdog-simple.c | 15 - Documentation/watchdog/src/watchdog-test.c | 68 - Documentation/watchdog/watchdog-api.txt | 56 +- Documentation/watchdog/watchdog.txt | 23 +- Documentation/x86_64/boot-options.txt | 28 - MAINTAINERS | 218 +- Makefile | 303 +- arch/alpha/Kconfig | 2 +- arch/alpha/boot/bootp.c | 2 +- arch/alpha/boot/bootpz.c | 2 +- arch/alpha/boot/main.c | 2 +- arch/alpha/kernel/alpha_ksyms.c | 14 +- arch/alpha/kernel/console.c | 1 + arch/alpha/kernel/entry.S | 1 + arch/alpha/kernel/err_ev7.c | 8 +- arch/alpha/kernel/gct.c | 1 + arch/alpha/kernel/head.S | 1 + arch/alpha/kernel/irq.c | 13 +- arch/alpha/kernel/irq_alpha.c | 5 +- arch/alpha/kernel/irq_i8259.c | 3 +- arch/alpha/kernel/irq_pyxis.c | 2 +- arch/alpha/kernel/irq_srm.c | 2 +- arch/alpha/kernel/machvec_impl.h | 1 + arch/alpha/kernel/osf_sys.c | 10 +- arch/alpha/kernel/pci.c | 5 +- arch/alpha/kernel/process.c | 4 +- arch/alpha/kernel/proto.h | 1 + arch/alpha/kernel/setup.c | 55 +- arch/alpha/kernel/signal.c | 2 +- arch/alpha/kernel/smc37c93x.c | 1 + arch/alpha/kernel/srm_env.c | 1 + arch/alpha/kernel/srmcons.c | 1 + arch/alpha/kernel/sys_alcor.c | 3 +- arch/alpha/kernel/sys_cabriolet.c | 3 +- arch/alpha/kernel/sys_dp264.c | 3 +- arch/alpha/kernel/sys_eb64p.c | 3 +- arch/alpha/kernel/sys_eiger.c | 2 +- arch/alpha/kernel/sys_jensen.c | 12 +- arch/alpha/kernel/sys_marvel.c | 6 +- arch/alpha/kernel/sys_mikasa.c | 3 +- arch/alpha/kernel/sys_noritake.c | 3 +- arch/alpha/kernel/sys_rawhide.c | 2 +- arch/alpha/kernel/sys_ruffian.c | 8 +- arch/alpha/kernel/sys_rx164.c | 2 +- arch/alpha/kernel/sys_sable.c | 3 +- arch/alpha/kernel/sys_sio.c | 3 +- arch/alpha/kernel/sys_takara.c | 2 +- arch/alpha/kernel/sys_titan.c | 17 +- arch/alpha/kernel/sys_wildfire.c | 6 +- arch/alpha/kernel/systbls.S | 1 + arch/alpha/kernel/time.c | 3 +- arch/alpha/kernel/traps.c | 1 + arch/alpha/kernel/vmlinux.lds.S | 1 + arch/alpha/lib/callback_srm.S | 1 + arch/alpha/lib/udelay.c | 1 + arch/alpha/mm/extable.c | 1 + arch/alpha/mm/fault.c | 1 + arch/alpha/mm/init.c | 1 + arch/alpha/mm/numa.c | 1 + arch/alpha/oprofile/common.c | 2 +- arch/arm/Kconfig | 132 +- arch/arm/Makefile | 9 +- arch/arm/boot/compressed/head-at91rm9200.S | 18 - arch/arm/boot/compressed/head-clps7500.S | 1 + arch/arm/boot/compressed/head-l7200.S | 1 + arch/arm/boot/compressed/head-sa1100.S | 1 + arch/arm/boot/compressed/head-sharpsl.S | 1 + arch/arm/boot/compressed/head-xscale.S | 1 + arch/arm/boot/compressed/head.S | 12 +- arch/arm/boot/compressed/ll_char_wr.S | 6 +- arch/arm/common/Makefile | 1 - arch/arm/common/dmabounce.c | 71 +- arch/arm/common/gic.c | 21 +- arch/arm/common/locomo.c | 64 +- arch/arm/common/rtctime.c | 1 - arch/arm/common/sa1111.c | 19 +- arch/arm/common/sharpsl_pm.c | 30 +- arch/arm/common/time-acorn.c | 3 +- arch/arm/common/uengine.c | 59 +- arch/arm/common/via82c505.c | 1 + arch/arm/common/vic.c | 3 +- arch/arm/configs/at91rm9200dk_defconfig | 1 - arch/arm/configs/at91rm9200ek_defconfig | 1 - arch/arm/configs/ateb9200_defconfig | 1313 - arch/arm/configs/carmeva_defconfig | 724 - arch/arm/configs/csb337_defconfig | 38 +- arch/arm/configs/csb637_defconfig | 1 - arch/arm/configs/ep93xx_defconfig | 75 +- arch/arm/configs/ixp2000_defconfig | 55 +- arch/arm/configs/ixp23xx_defconfig | 59 +- arch/arm/configs/kafa_defconfig | 885 - arch/arm/configs/kb9202_defconfig | 781 - arch/arm/configs/lpd270_defconfig | 981 - arch/arm/configs/lpd7a400_defconfig | 135 +- arch/arm/configs/lpd7a404_defconfig | 430 +- arch/arm/configs/netx_defconfig | 926 - arch/arm/configs/omap_h2_1610_defconfig | 129 +- arch/arm/configs/onearm_defconfig | 1076 - arch/arm/configs/pnx4008_defconfig | 1665 - arch/arm/configs/s3c2410_defconfig | 118 +- arch/arm/configs/trizeps4_defconfig | 1579 - arch/arm/kernel/Makefile | 8 +- arch/arm/kernel/apm.c | 1 + arch/arm/kernel/armksyms.c | 13 +- arch/arm/kernel/asm-offsets.c | 6 +- arch/arm/kernel/bios32.c | 19 +- arch/arm/kernel/calls.S | 13 - arch/arm/kernel/compat.c | 1 + arch/arm/kernel/crunch-bits.S | 305 - arch/arm/kernel/crunch.c | 82 - arch/arm/kernel/debug.S | 1 + arch/arm/kernel/ecard.c | 10 +- arch/arm/kernel/entry-armv.S | 56 +- arch/arm/kernel/entry-common.S | 5 +- arch/arm/kernel/entry-header.S | 1 + arch/arm/kernel/fiq.c | 1 - arch/arm/kernel/head-nommu.S | 3 +- arch/arm/kernel/head.S | 18 +- arch/arm/kernel/irq.c | 959 +- arch/arm/kernel/isa.c | 63 +- arch/arm/kernel/iwmmxt-notifier.c | 63 - arch/arm/kernel/iwmmxt.S | 27 +- arch/arm/kernel/module.c | 1 + arch/arm/kernel/process.c | 90 +- arch/arm/kernel/ptrace.c | 37 +- arch/arm/kernel/setup.c | 51 +- arch/arm/kernel/signal.c | 266 +- arch/arm/kernel/smp.c | 1 + arch/arm/kernel/time.c | 25 +- arch/arm/kernel/traps.c | 6 +- arch/arm/kernel/vmlinux.lds.S | 9 +- arch/arm/lib/Makefile | 13 +- arch/arm/lib/backtrace.S | 14 +- arch/arm/lib/bitops.h | 1 + arch/arm/lib/clear_user.S | 8 +- arch/arm/lib/copy_from_user.S | 4 +- arch/arm/lib/copy_page.S | 2 +- arch/arm/lib/copy_to_user.S | 4 +- arch/arm/lib/csumipv6.S | 2 +- arch/arm/lib/delay.S | 18 +- arch/arm/lib/ecard.S | 4 +- arch/arm/lib/findbit.S | 10 +- arch/arm/lib/io-readsb.S | 6 +- arch/arm/lib/io-readsw-armv3.S | 6 +- arch/arm/lib/io-writesb.S | 6 +- arch/arm/lib/io-writesw-armv3.S | 6 +- arch/arm/lib/memchr.S | 2 +- arch/arm/lib/memset.S | 4 +- arch/arm/lib/memzero.S | 4 +- arch/arm/lib/strchr.S | 2 +- arch/arm/lib/strncpy_from_user.S | 7 +- arch/arm/lib/strnlen_user.S | 9 +- arch/arm/lib/strrchr.S | 2 +- arch/arm/lib/uaccess.S | 16 +- arch/arm/lib/ucmpdi2.S | 1 + arch/arm/mach-aaec2000/core.c | 3 +- arch/arm/mach-at91rm9200/Kconfig | 88 +- arch/arm/mach-at91rm9200/Makefile | 31 +- arch/arm/mach-at91rm9200/board-1arm.c | 108 - arch/arm/mach-at91rm9200/board-carmeva.c | 130 - arch/arm/mach-at91rm9200/board-csb337.c | 46 +- arch/arm/mach-at91rm9200/board-csb637.c | 33 +- arch/arm/mach-at91rm9200/board-dk.c | 60 +- arch/arm/mach-at91rm9200/board-eb9200.c | 129 - arch/arm/mach-at91rm9200/board-ek.c | 50 +- arch/arm/mach-at91rm9200/board-kafa.c | 115 - arch/arm/mach-at91rm9200/board-kb9202.c | 124 - arch/arm/mach-at91rm9200/clock.c | 126 +- .../{at91rm9200.c => common.c} | 63 +- arch/arm/mach-at91rm9200/devices.c | 407 +- arch/arm/mach-at91rm9200/generic.h | 15 +- arch/arm/mach-at91rm9200/gpio.c | 103 +- arch/arm/mach-at91rm9200/irq.c | 110 +- arch/arm/mach-at91rm9200/leds.c | 1 + arch/arm/mach-at91rm9200/pm.c | 225 - .../{at91rm9200_time.c => time.c} | 62 +- arch/arm/mach-clps711x/fortunet.c | 1 + arch/arm/mach-clps711x/p720t.c | 1 + arch/arm/mach-clps711x/time.c | 3 +- arch/arm/mach-clps7500/core.c | 3 +- arch/arm/mach-ebsa110/core.c | 2 +- arch/arm/mach-ep93xx/Kconfig | 23 - arch/arm/mach-ep93xx/Makefile | 5 +- arch/arm/mach-ep93xx/clock.c | 156 - arch/arm/mach-ep93xx/core.c | 36 +- arch/arm/mach-ep93xx/edb9302.c | 61 - arch/arm/mach-ep93xx/edb9315.c | 61 - arch/arm/mach-ep93xx/edb9315a.c | 61 - arch/arm/mach-ep93xx/gesbc9312.c | 25 +- arch/arm/mach-ep93xx/ts72xx.c | 24 +- arch/arm/mach-footbridge/cats-hw.c | 2 +- arch/arm/mach-footbridge/common.c | 1 + arch/arm/mach-footbridge/dc21285-timer.c | 3 +- arch/arm/mach-footbridge/dc21285.c | 11 +- arch/arm/mach-footbridge/dma.c | 1 + arch/arm/mach-footbridge/ebsa285-leds.c | 1 + arch/arm/mach-footbridge/isa-irq.c | 19 +- arch/arm/mach-footbridge/isa-timer.c | 3 +- arch/arm/mach-footbridge/netwinder-hw.c | 1 + arch/arm/mach-footbridge/netwinder-leds.c | 1 + arch/arm/mach-h720x/cpu-h7201.c | 2 +- arch/arm/mach-h720x/cpu-h7202.c | 2 +- arch/arm/mach-h720x/h7201-eval.c | 1 + arch/arm/mach-h720x/h7202-eval.c | 1 + arch/arm/mach-imx/dma.c | 65 +- arch/arm/mach-imx/irq.c | 6 +- arch/arm/mach-imx/time.c | 4 +- arch/arm/mach-integrator/core.c | 3 +- arch/arm/mach-integrator/integrator_ap.c | 3 +- arch/arm/mach-integrator/integrator_cp.c | 9 +- arch/arm/mach-integrator/pci_v3.c | 3 +- arch/arm/mach-integrator/time.c | 2 +- arch/arm/mach-iop3xx/Kconfig | 15 +- arch/arm/mach-iop3xx/common.c | 1 + arch/arm/mach-iop3xx/iop321-irq.c | 3 +- arch/arm/mach-iop3xx/iop321-setup.c | 1 + arch/arm/mach-iop3xx/iop321-time.c | 2 +- arch/arm/mach-iop3xx/iop331-irq.c | 6 +- arch/arm/mach-iop3xx/iop331-setup.c | 1 + arch/arm/mach-iop3xx/iop331-time.c | 2 +- arch/arm/mach-ixp2000/core.c | 10 +- arch/arm/mach-ixp2000/enp2611.c | 1 + arch/arm/mach-ixp2000/ixdp2400.c | 1 + arch/arm/mach-ixp2000/ixdp2800.c | 1 + arch/arm/mach-ixp2000/ixdp2x00.c | 3 +- arch/arm/mach-ixp2000/ixdp2x01.c | 3 +- arch/arm/mach-ixp23xx/core.c | 10 +- arch/arm/mach-ixp23xx/espresso.c | 23 +- arch/arm/mach-ixp23xx/ixdp2351.c | 33 +- arch/arm/mach-ixp23xx/pci.c | 1 + arch/arm/mach-ixp23xx/roadrunner.c | 23 +- arch/arm/mach-ixp4xx/Kconfig | 3 + arch/arm/mach-ixp4xx/Makefile | 24 +- arch/arm/mach-ixp4xx/common-pci.c | 2 + arch/arm/mach-ixp4xx/common.c | 5 +- arch/arm/mach-ixp4xx/coyote-pci.c | 1 - arch/arm/mach-ixp4xx/gtwx5715-setup.c | 7 +- arch/arm/mach-ixp4xx/ixdp425-pci.c | 2 +- arch/arm/mach-ixp4xx/ixdpg425-pci.c | 2 +- arch/arm/mach-ixp4xx/nas100d-pci.c | 2 +- arch/arm/mach-ixp4xx/nas100d-power.c | 7 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 41 +- arch/arm/mach-ixp4xx/nslu2-pci.c | 2 +- arch/arm/mach-ixp4xx/nslu2-power.c | 8 +- arch/arm/mach-ixp4xx/nslu2-setup.c | 48 +- arch/arm/mach-l7200/core.c | 1 - arch/arm/mach-lh7a40x/Kconfig | 5 - arch/arm/mach-lh7a40x/Makefile | 19 +- arch/arm/mach-lh7a40x/arch-kev7a400.c | 3 +- arch/arm/mach-lh7a40x/arch-lpd7a40x.c | 204 +- arch/arm/mach-lh7a40x/clcd.c | 241 - arch/arm/mach-lh7a40x/clocks.c | 198 - arch/arm/mach-lh7a40x/common.h | 1 - arch/arm/mach-lh7a40x/irq-kev7a400.c | 3 +- arch/arm/mach-lh7a40x/irq-lh7a400.c | 6 +- arch/arm/mach-lh7a40x/irq-lh7a404.c | 29 +- arch/arm/mach-lh7a40x/irq-lpd7a40x.c | 3 +- arch/arm/mach-lh7a40x/lcd-panel.h | 346 - arch/arm/mach-lh7a40x/ssp-cpld.c | 343 - arch/arm/mach-lh7a40x/time.c | 8 +- arch/arm/mach-netx/Kconfig | 24 - arch/arm/mach-netx/Makefile | 15 - arch/arm/mach-netx/Makefile.boot | 2 - arch/arm/mach-netx/fb.c | 114 - arch/arm/mach-netx/fb.h | 24 - arch/arm/mach-netx/generic.c | 193 - arch/arm/mach-netx/generic.h | 24 - arch/arm/mach-netx/nxdb500.c | 210 - arch/arm/mach-netx/nxdkn.c | 103 - arch/arm/mach-netx/nxeb500hmi.c | 187 - arch/arm/mach-netx/pfifo.c | 68 - arch/arm/mach-netx/time.c | 88 - arch/arm/mach-netx/xc.c | 255 - arch/arm/mach-omap1/Kconfig | 7 - arch/arm/mach-omap1/Makefile | 1 - arch/arm/mach-omap1/board-ams-delta.c | 18 - arch/arm/mach-omap1/board-fsample.c | 319 - arch/arm/mach-omap1/board-h3.c | 1 + arch/arm/mach-omap1/board-innovator.c | 75 - arch/arm/mach-omap1/board-osk.c | 151 +- arch/arm/mach-omap1/clock.c | 18 +- arch/arm/mach-omap1/devices.c | 1 + arch/arm/mach-omap1/fpga.c | 9 +- arch/arm/mach-omap1/id.c | 1 + arch/arm/mach-omap1/io.c | 1 + arch/arm/mach-omap1/irq.c | 4 +- arch/arm/mach-omap1/leds-h2p2-debug.c | 1 + arch/arm/mach-omap1/leds-innovator.c | 1 + arch/arm/mach-omap1/leds-osk.c | 1 + arch/arm/mach-omap1/mux.c | 1 + arch/arm/mach-omap1/pm.c | 9 +- arch/arm/mach-omap1/serial.c | 4 +- arch/arm/mach-omap1/sleep.S | 1 + arch/arm/mach-omap1/time.c | 7 +- arch/arm/mach-omap2/Kconfig | 1 - arch/arm/mach-omap2/Makefile | 5 +- arch/arm/mach-omap2/board-apollon.c | 6 +- arch/arm/mach-omap2/clock.c | 38 +- arch/arm/mach-omap2/clock.h | 2 +- arch/arm/mach-omap2/devices.c | 47 +- arch/arm/mach-omap2/gpmc.c | 209 - arch/arm/mach-omap2/id.c | 1 + arch/arm/mach-omap2/io.c | 3 +- arch/arm/mach-omap2/irq.c | 4 +- arch/arm/mach-omap2/memory.c | 1 + arch/arm/mach-omap2/mux.c | 39 +- arch/arm/mach-omap2/pm-domain.c | 299 - arch/arm/mach-omap2/pm.c | 271 +- arch/arm/mach-omap2/prcm.c | 1 + arch/arm/mach-omap2/sleep.S | 1 + arch/arm/mach-omap2/sram-fn.S | 1 + arch/arm/mach-omap2/timer-gp.c | 86 +- arch/arm/mach-pnx4008/Makefile | 12 - arch/arm/mach-pnx4008/Makefile.boot | 4 - arch/arm/mach-pnx4008/clock.c | 983 - arch/arm/mach-pnx4008/clock.h | 43 - arch/arm/mach-pnx4008/core.c | 205 - arch/arm/mach-pnx4008/dma.c | 1108 - arch/arm/mach-pnx4008/gpio.c | 329 - arch/arm/mach-pnx4008/irq.c | 119 - arch/arm/mach-pnx4008/pm.c | 184 - arch/arm/mach-pnx4008/serial.c | 69 - arch/arm/mach-pnx4008/sleep.S | 195 - arch/arm/mach-pnx4008/time.c | 138 - arch/arm/mach-pxa/Kconfig | 20 - arch/arm/mach-pxa/Makefile | 4 +- arch/arm/mach-pxa/corgi.c | 27 +- arch/arm/mach-pxa/corgi_pm.c | 23 +- arch/arm/mach-pxa/corgi_ssp.c | 62 +- arch/arm/mach-pxa/idp.c | 1 - arch/arm/mach-pxa/irq.c | 16 +- arch/arm/mach-pxa/leds-idp.c | 1 + arch/arm/mach-pxa/leds-lubbock.c | 1 + arch/arm/mach-pxa/leds-mainstone.c | 1 + arch/arm/mach-pxa/leds-trizeps4.c | 133 - arch/arm/mach-pxa/leds.c | 2 - arch/arm/mach-pxa/leds.h | 1 - arch/arm/mach-pxa/lpd270.c | 129 +- arch/arm/mach-pxa/lubbock.c | 89 +- arch/arm/mach-pxa/mainstone.c | 5 +- arch/arm/mach-pxa/pm.c | 1 + arch/arm/mach-pxa/poodle.c | 110 +- arch/arm/mach-pxa/pxa25x.c | 1 + arch/arm/mach-pxa/pxa27x.c | 1 + arch/arm/mach-pxa/sharpsl_pm.c | 17 +- arch/arm/mach-pxa/sleep.S | 3 +- arch/arm/mach-pxa/spitz.c | 27 +- arch/arm/mach-pxa/spitz_pm.c | 15 - arch/arm/mach-pxa/ssp.c | 35 +- arch/arm/mach-pxa/standby.S | 1 + arch/arm/mach-pxa/time.c | 3 +- arch/arm/mach-pxa/tosa.c | 28 +- arch/arm/mach-pxa/trizeps4.c | 473 - arch/arm/mach-realview/core.c | 3 +- arch/arm/mach-realview/realview_eb.c | 1 + arch/arm/mach-rpc/dma.c | 2 +- arch/arm/mach-s3c2410/Kconfig | 62 - arch/arm/mach-s3c2410/Makefile | 43 +- arch/arm/mach-s3c2410/bast-irq.c | 6 +- arch/arm/mach-s3c2410/clock.c | 249 +- arch/arm/mach-s3c2410/clock.h | 13 +- arch/arm/mach-s3c2410/common-smdk.c | 65 - arch/arm/mach-s3c2410/cpu.c | 114 +- arch/arm/mach-s3c2410/cpu.h | 19 +- arch/arm/mach-s3c2410/devs.c | 90 +- arch/arm/mach-s3c2410/devs.h | 9 +- arch/arm/mach-s3c2410/dma.c | 246 +- arch/arm/mach-s3c2410/irq.c | 61 +- arch/arm/mach-s3c2410/irq.h | 10 - arch/arm/mach-s3c2410/mach-anubis.c | 101 +- arch/arm/mach-s3c2410/mach-bast.c | 27 +- arch/arm/mach-s3c2410/mach-h1940.c | 19 +- arch/arm/mach-s3c2410/mach-nexcoder.c | 2 +- arch/arm/mach-s3c2410/mach-osiris.c | 25 +- arch/arm/mach-s3c2410/mach-otom.c | 2 +- arch/arm/mach-s3c2410/mach-rx3715.c | 9 + arch/arm/mach-s3c2410/mach-smdk2410.c | 6 +- arch/arm/mach-s3c2410/mach-smdk2413.c | 139 - arch/arm/mach-s3c2410/mach-smdk2440.c | 2 +- arch/arm/mach-s3c2410/mach-vr1000.c | 21 +- arch/arm/mach-s3c2410/pm-simtec.c | 3 +- arch/arm/mach-s3c2410/pm.c | 5 +- arch/arm/mach-s3c2410/s3c2400-gpio.c | 5 +- arch/arm/mach-s3c2410/s3c2410-clock.c | 271 - arch/arm/mach-s3c2410/s3c2410-gpio.c | 13 +- arch/arm/mach-s3c2410/s3c2410.c | 108 +- arch/arm/mach-s3c2410/s3c2410.h | 10 +- arch/arm/mach-s3c2410/s3c2412-clock.c | 711 - arch/arm/mach-s3c2410/s3c2412-irq.c | 130 - arch/arm/mach-s3c2410/s3c2412.c | 224 - arch/arm/mach-s3c2410/s3c2412.h | 29 - arch/arm/mach-s3c2410/s3c2440-clock.c | 4 +- arch/arm/mach-s3c2410/s3c2440-irq.c | 80 +- arch/arm/mach-s3c2410/s3c2440.c | 234 +- arch/arm/mach-s3c2410/s3c2442-clock.c | 171 - arch/arm/mach-s3c2410/s3c2442.c | 52 - arch/arm/mach-s3c2410/s3c2442.h | 17 - arch/arm/mach-s3c2410/s3c244x-irq.c | 142 - arch/arm/mach-s3c2410/s3c244x.c | 185 - arch/arm/mach-s3c2410/s3c244x.h | 25 - arch/arm/mach-s3c2410/sleep.S | 5 +- arch/arm/mach-s3c2410/time.c | 4 +- arch/arm/mach-s3c2410/usb-simtec.c | 4 +- arch/arm/mach-sa1100/assabet.c | 1 + arch/arm/mach-sa1100/cerf.c | 2 +- arch/arm/mach-sa1100/collie.c | 5 +- arch/arm/mach-sa1100/collie_pm.c | 73 +- arch/arm/mach-sa1100/cpu-sa1110.c | 131 +- arch/arm/mach-sa1100/dma.c | 2 +- arch/arm/mach-sa1100/generic.c | 1 + arch/arm/mach-sa1100/h3600.c | 5 +- arch/arm/mach-sa1100/irq.c | 12 +- arch/arm/mach-sa1100/leds-assabet.c | 1 + arch/arm/mach-sa1100/leds-badge4.c | 1 + arch/arm/mach-sa1100/leds-cerf.c | 1 + arch/arm/mach-sa1100/leds-hackkit.c | 1 + arch/arm/mach-sa1100/leds-lart.c | 1 + arch/arm/mach-sa1100/leds-simpad.c | 1 + arch/arm/mach-sa1100/pleb.c | 1 - arch/arm/mach-sa1100/shannon.c | 1 + arch/arm/mach-sa1100/simpad.c | 1 + arch/arm/mach-sa1100/sleep.S | 2 +- arch/arm/mach-sa1100/ssp.c | 46 +- arch/arm/mach-sa1100/time.c | 3 +- arch/arm/mach-shark/core.c | 3 +- arch/arm/mach-shark/dma.c | 1 + arch/arm/mach-shark/irq.c | 3 +- arch/arm/mach-shark/leds.c | 1 + arch/arm/mach-versatile/core.c | 19 +- arch/arm/mach-versatile/pci.c | 1 + arch/arm/mach-versatile/versatile_ab.c | 1 + arch/arm/mach-versatile/versatile_pb.c | 1 + arch/arm/mm/Kconfig | 90 +- arch/arm/mm/Makefile | 10 +- arch/arm/mm/alignment.c | 1 + arch/arm/mm/cache-v4wb.S | 1 + arch/arm/mm/copypage-v3.S | 2 +- arch/arm/mm/fault.c | 1 + arch/arm/mm/flush.c | 26 - arch/arm/mm/init.c | 3 + arch/arm/mm/iomap.c | 55 - arch/arm/mm/ioremap.c | 269 +- arch/arm/mm/mm-armv.c | 40 +- arch/arm/mm/mmap.c | 1 + arch/arm/mm/nommu.c | 39 - arch/arm/mm/proc-arm1020.S | 31 +- arch/arm/mm/proc-arm1020e.S | 51 +- arch/arm/mm/proc-arm1022.S | 51 +- arch/arm/mm/proc-arm1026.S | 51 +- arch/arm/mm/proc-arm6_7.S | 31 - arch/arm/mm/proc-arm720.S | 37 +- arch/arm/mm/proc-arm920.S | 43 +- arch/arm/mm/proc-arm922.S | 43 +- arch/arm/mm/proc-arm925.S | 51 +- arch/arm/mm/proc-arm926.S | 48 +- arch/arm/mm/proc-macros.S | 10 - arch/arm/mm/proc-sa110.S | 32 +- arch/arm/mm/proc-sa1100.S | 34 +- arch/arm/mm/proc-syms.c | 8 - arch/arm/mm/proc-v6.S | 58 +- arch/arm/mm/proc-xsc3.S | 28 +- arch/arm/mm/proc-xscale.S | 93 +- arch/arm/nwfpe/entry26.S | 2 +- arch/arm/nwfpe/fpa11.c | 1 + arch/arm/nwfpe/fpa11.h | 1 + arch/arm/nwfpe/fpa11_cpdo.c | 1 + arch/arm/nwfpe/fpa11_cpdt.c | 1 + arch/arm/nwfpe/fpa11_cprt.c | 1 + arch/arm/nwfpe/fpmodule.c | 26 +- arch/arm/nwfpe/fpopcode.c | 1 + arch/arm/nwfpe/fpopcode.h | 1 + arch/arm/nwfpe/softfloat.h | 3 +- arch/arm/oprofile/op_model_xscale.c | 2 +- arch/arm/plat-omap/Kconfig | 2 +- arch/arm/plat-omap/clock.c | 5 +- arch/arm/plat-omap/common.c | 1 + arch/arm/plat-omap/cpu-omap.c | 18 +- arch/arm/plat-omap/devices.c | 11 +- arch/arm/plat-omap/dma.c | 88 +- arch/arm/plat-omap/dmtimer.c | 428 +- arch/arm/plat-omap/fb.c | 1 + arch/arm/plat-omap/gpio.c | 115 +- arch/arm/plat-omap/mux.c | 1 + arch/arm/plat-omap/ocpi.c | 1 + arch/arm/plat-omap/pm.c | 2 +- arch/arm/plat-omap/sram-fn.S | 1 + arch/arm/plat-omap/sram.c | 10 +- arch/arm/plat-omap/timer32k.c | 128 +- arch/arm/plat-omap/usb.c | 1 + arch/arm/tools/mach-types | 71 +- arch/arm/vfp/Makefile | 5 +- arch/arm/vfp/vfp.h | 18 +- arch/arm/vfp/vfpdouble.c | 50 +- arch/arm/vfp/vfphw.S | 12 +- arch/arm/vfp/vfpmodule.c | 76 +- arch/arm/vfp/vfpsingle.c | 55 +- arch/arm26/Kconfig | 6 +- arch/arm26/boot/compressed/head.S | 1 + arch/arm26/kernel/armksyms.c | 1 + arch/arm26/kernel/asm-offsets.c | 1 + arch/arm26/kernel/compat.c | 1 + arch/arm26/kernel/ecard.c | 1 + arch/arm26/kernel/fiq.c | 1 + arch/arm26/kernel/head.S | 1 + arch/arm26/kernel/irq.c | 17 +- arch/arm26/kernel/process.c | 1 + arch/arm26/kernel/ptrace.c | 1 + arch/arm26/kernel/semaphore.c | 1 + arch/arm26/kernel/setup.c | 3 +- arch/arm26/kernel/signal.c | 1 + arch/arm26/kernel/time.c | 3 +- arch/arm26/kernel/traps.c | 1 + arch/arm26/kernel/vmlinux.lds.S | 1 + arch/arm26/lib/backtrace.S | 1 + arch/arm26/lib/csumpartialcopyuser.S | 1 + arch/arm26/lib/ecard.S | 1 + arch/arm26/lib/io-acorn.S | 1 + arch/arm26/lib/kbd.c | 1 + arch/arm26/lib/lib1funcs.S | 1 + arch/arm26/machine/dma.c | 1 + arch/arm26/machine/irq.c | 1 + arch/arm26/mm/extable.c | 1 + arch/arm26/mm/fault.c | 1 + arch/arm26/mm/init.c | 1 + arch/arm26/nwfpe/fpmodule.c | 1 + arch/arm26/nwfpe/fpmodule.h | 1 + arch/cris/Kconfig | 4 - arch/cris/arch-v10/boot/compressed/head.S | 1 + arch/cris/arch-v10/boot/compressed/misc.c | 1 + arch/cris/arch-v10/boot/rescue/head.S | 1 + arch/cris/arch-v10/boot/rescue/kimagerescue.S | 1 + arch/cris/arch-v10/drivers/axisflashmap.c | 1 + arch/cris/arch-v10/drivers/ds1302.c | 1 + arch/cris/arch-v10/drivers/eeprom.c | 5 +- arch/cris/arch-v10/drivers/gpio.c | 7 +- arch/cris/arch-v10/drivers/i2c.c | 1 + arch/cris/arch-v10/drivers/pcf8563.c | 1 + arch/cris/arch-v10/kernel/crisksyms.c | 1 + arch/cris/arch-v10/kernel/debugport.c | 3 +- arch/cris/arch-v10/kernel/entry.S | 1 + arch/cris/arch-v10/kernel/fasttimer.c | 1 + arch/cris/arch-v10/kernel/head.S | 1 + arch/cris/arch-v10/kernel/irq.c | 3 +- arch/cris/arch-v10/kernel/process.c | 1 + arch/cris/arch-v10/kernel/setup.c | 1 + arch/cris/arch-v10/kernel/time.c | 7 +- arch/cris/arch-v10/kernel/traps.c | 1 + arch/cris/arch-v10/lib/dram_init.S | 1 + arch/cris/arch-v10/mm/init.c | 1 + arch/cris/arch-v10/vmlinux.lds.S | 1 + arch/cris/arch-v32/boot/compressed/head.S | 1 + arch/cris/arch-v32/boot/compressed/misc.c | 1 + arch/cris/arch-v32/boot/rescue/head.S | 1 + arch/cris/arch-v32/drivers/axisflashmap.c | 1 + arch/cris/arch-v32/drivers/cryptocop.c | 2 +- arch/cris/arch-v32/drivers/gpio.c | 7 +- arch/cris/arch-v32/drivers/i2c.c | 1 + arch/cris/arch-v32/drivers/pcf8563.c | 3 + arch/cris/arch-v32/drivers/pci/bios.c | 6 +- arch/cris/arch-v32/drivers/sync_serial.c | 13 +- arch/cris/arch-v32/kernel/arbiter.c | 11 +- arch/cris/arch-v32/kernel/crisksyms.c | 1 + arch/cris/arch-v32/kernel/debugport.c | 3 +- arch/cris/arch-v32/kernel/dma.c | 4 +- arch/cris/arch-v32/kernel/entry.S | 1 + arch/cris/arch-v32/kernel/fasttimer.c | 3 +- arch/cris/arch-v32/kernel/head.S | 1 + arch/cris/arch-v32/kernel/io.c | 1 + arch/cris/arch-v32/kernel/irq.c | 5 +- arch/cris/arch-v32/kernel/kgdb_asm.S | 1 + arch/cris/arch-v32/kernel/process.c | 1 + arch/cris/arch-v32/kernel/setup.c | 1 + arch/cris/arch-v32/kernel/smp.c | 2 +- arch/cris/arch-v32/kernel/time.c | 13 +- arch/cris/arch-v32/kernel/traps.c | 1 + arch/cris/arch-v32/lib/dram_init.S | 1 + arch/cris/arch-v32/lib/hw_settings.S | 1 + arch/cris/arch-v32/lib/nand_init.S | 1 + arch/cris/arch-v32/mm/init.c | 2 + arch/cris/arch-v32/vmlinux.lds.S | 1 + arch/cris/kernel/crisksyms.c | 1 + arch/cris/kernel/irq.c | 5 +- arch/cris/kernel/setup.c | 3 +- arch/frv/Kconfig | 4 - arch/frv/kernel/asm-offsets.c | 116 +- arch/frv/kernel/break.S | 35 +- arch/frv/kernel/cmode.S | 1 + arch/frv/kernel/debug-stub.c | 13 +- arch/frv/kernel/entry-table.S | 1 + arch/frv/kernel/entry.S | 4 +- arch/frv/kernel/frv_ksyms.c | 19 + arch/frv/kernel/gdb-stub.c | 159 +- arch/frv/kernel/head-mmu-fr451.S | 1 + arch/frv/kernel/head-uc-fr401.S | 1 + arch/frv/kernel/head-uc-fr451.S | 1 + arch/frv/kernel/head-uc-fr555.S | 1 + arch/frv/kernel/head.S | 2 +- arch/frv/kernel/irq-mb93091.c | 1 + arch/frv/kernel/irq-mb93093.c | 1 + arch/frv/kernel/irq-mb93493.c | 1 + arch/frv/kernel/irq-routing.c | 12 +- arch/frv/kernel/irq.c | 19 +- arch/frv/kernel/local.h | 3 - arch/frv/kernel/pm-mb93093.c | 1 + arch/frv/kernel/pm.c | 46 +- arch/frv/kernel/process.c | 18 +- arch/frv/kernel/ptrace.c | 1 + arch/frv/kernel/semaphore.c | 1 + arch/frv/kernel/setup.c | 5 +- arch/frv/kernel/signal.c | 22 +- arch/frv/kernel/sleep.S | 1 + arch/frv/kernel/switch_to.S | 4 +- arch/frv/kernel/sys_frv.c | 2 +- arch/frv/kernel/sysctl.c | 5 +- arch/frv/kernel/time.c | 84 +- arch/frv/kernel/traps.c | 26 +- arch/frv/kernel/uaccess.c | 6 +- arch/frv/mb93090-mb00/pci-frv.c | 4 +- arch/frv/mb93090-mb00/pci-irq.c | 11 +- arch/frv/mb93090-mb00/pci-vdk.c | 12 +- arch/frv/mm/dma-alloc.c | 1 + arch/frv/mm/extable.c | 1 + arch/frv/mm/init.c | 1 + arch/frv/mm/kmap.c | 7 +- arch/frv/mm/mmu-context.c | 1 + arch/frv/mm/tlb-flush.S | 1 + arch/frv/mm/tlb-miss.S | 1 + arch/frv/mm/unaligned.c | 1 + arch/h8300/kernel/gpio.c | 1 + arch/h8300/kernel/h8300_ksyms.c | 1 + arch/h8300/kernel/ints.c | 4 +- arch/h8300/kernel/process.c | 1 + arch/h8300/kernel/ptrace.c | 1 + arch/h8300/kernel/semaphore.c | 1 + arch/h8300/kernel/setup.c | 1 + arch/h8300/kernel/signal.c | 2 +- arch/h8300/kernel/syscalls.S | 1 + arch/h8300/kernel/time.c | 1 + arch/h8300/kernel/vmlinux.lds.S | 1 + arch/h8300/lib/romfs.S | 1 + arch/h8300/mm/init.c | 1 + arch/h8300/mm/kmap.c | 1 + arch/h8300/mm/memory.c | 1 + .../platform/h8300h/aki3068net/crt0_ram.S | 1 + arch/h8300/platform/h8300h/aki3068net/timer.c | 1 + arch/h8300/platform/h8300h/entry.S | 1 + arch/h8300/platform/h8300h/generic/crt0_ram.S | 1 + arch/h8300/platform/h8300h/generic/crt0_rom.S | 1 + arch/h8300/platform/h8300h/generic/timer.c | 1 + arch/h8300/platform/h8300h/h8max/crt0_ram.S | 1 + arch/h8300/platform/h8300h/h8max/timer.c | 1 + arch/h8300/platform/h8300h/ints_h8300h.c | 1 + arch/h8300/platform/h8s/edosk2674/crt0_ram.S | 1 + arch/h8300/platform/h8s/edosk2674/crt0_rom.S | 1 + arch/h8300/platform/h8s/edosk2674/timer.c | 1 + arch/h8300/platform/h8s/entry.S | 1 + arch/h8300/platform/h8s/generic/crt0_ram.S | 1 + arch/h8300/platform/h8s/generic/crt0_rom.S | 1 + arch/h8300/platform/h8s/generic/timer.c | 1 + arch/h8300/platform/h8s/ints.c | 4 +- arch/h8300/platform/h8s/ints_h8s.c | 1 + arch/i386/Kconfig | 87 +- arch/i386/Kconfig.cpu | 7 +- arch/i386/Kconfig.debug | 13 +- arch/i386/boot/Makefile | 9 +- arch/i386/boot/compressed/misc.c | 32 +- arch/i386/boot/setup.S | 3 +- arch/i386/boot/video.S | 31 +- arch/i386/crypto/aes-i586-asm.S | 29 +- arch/i386/crypto/aes.c | 20 +- arch/i386/defconfig | 2 +- arch/i386/kernel/Makefile | 12 +- arch/i386/kernel/acpi/boot.c | 13 +- arch/i386/kernel/acpi/processor.c | 2 +- arch/i386/kernel/acpi/sleep.c | 19 +- arch/i386/kernel/acpi/wakeup.S | 16 +- arch/i386/kernel/alternative.c | 142 +- arch/i386/kernel/apic.c | 21 +- arch/i386/kernel/apm.c | 71 +- arch/i386/kernel/asm-offsets.c | 4 - arch/i386/kernel/bootflag.c | 1 + arch/i386/kernel/cpu/amd.c | 22 +- arch/i386/kernel/cpu/common.c | 27 +- arch/i386/kernel/cpu/cpufreq/Kconfig | 3 +- arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 316 +- .../i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | 11 +- arch/i386/kernel/cpu/cpufreq/longhaul.c | 241 +- arch/i386/kernel/cpu/cpufreq/longrun.c | 1 + arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | 1 + arch/i386/kernel/cpu/cpufreq/powernow-k7.c | 9 +- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 348 +- arch/i386/kernel/cpu/cpufreq/powernow-k8.h | 44 +- .../kernel/cpu/cpufreq/speedstep-centrino.c | 281 +- arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | 3 + arch/i386/kernel/cpu/cyrix.c | 11 +- arch/i386/kernel/cpu/intel.c | 7 +- arch/i386/kernel/cpu/intel_cacheinfo.c | 127 +- arch/i386/kernel/cpu/mcheck/k7.c | 1 + arch/i386/kernel/cpu/mcheck/mce.c | 1 + arch/i386/kernel/cpu/mcheck/mce.h | 2 +- arch/i386/kernel/cpu/mcheck/non-fatal.c | 1 + arch/i386/kernel/cpu/mcheck/p4.c | 1 + arch/i386/kernel/cpu/proc.c | 10 +- arch/i386/kernel/cpuid.c | 9 +- arch/i386/kernel/crash.c | 14 +- arch/i386/kernel/doublefault.c | 3 +- arch/i386/kernel/efi.c | 7 +- arch/i386/kernel/efi_stub.S | 1 + arch/i386/kernel/entry.S | 343 +- arch/i386/kernel/head.S | 15 +- arch/i386/kernel/hpet.c | 67 - arch/i386/kernel/i386_ksyms.c | 1 + arch/i386/kernel/i387.c | 3 +- arch/i386/kernel/i8253.c | 118 - arch/i386/kernel/i8259.c | 13 +- arch/i386/kernel/io_apic.c | 102 +- arch/i386/kernel/ioport.c | 1 - arch/i386/kernel/irq-xen.c | 35 +- arch/i386/kernel/irq.c | 34 +- arch/i386/kernel/kprobes.c | 99 +- arch/i386/kernel/machine_kexec.c | 17 +- arch/i386/kernel/mca.c | 1 + arch/i386/kernel/microcode.c | 83 +- arch/i386/kernel/module.c | 4 + arch/i386/kernel/mpparse.c | 1 + arch/i386/kernel/msr.c | 12 +- arch/i386/kernel/nmi.c | 76 +- arch/i386/kernel/numaq.c | 11 +- arch/i386/kernel/process.c | 74 +- arch/i386/kernel/ptrace.c | 5 +- arch/i386/kernel/quirks.c | 1 + arch/i386/kernel/reboot.c | 1 + arch/i386/kernel/scx200.c | 67 +- arch/i386/kernel/semaphore.c | 1 + arch/i386/kernel/setup.c | 30 +- arch/i386/kernel/signal.c | 4 +- arch/i386/kernel/smp.c | 12 +- arch/i386/kernel/smpboot.c | 119 +- arch/i386/kernel/srat.c | 20 +- arch/i386/kernel/syscall_table.S | 1 - arch/i386/kernel/sysenter.c | 183 +- arch/i386/kernel/time.c | 165 +- arch/i386/kernel/time_hpet.c | 1 + arch/i386/kernel/timers/Makefile | 9 + arch/i386/kernel/timers/common.c | 172 + arch/i386/kernel/timers/timer.c | 75 + arch/i386/kernel/timers/timer_cyclone.c | 259 + arch/i386/kernel/timers/timer_hpet.c | 217 + arch/i386/kernel/timers/timer_none.c | 39 + arch/i386/kernel/timers/timer_pit.c | 177 + arch/i386/kernel/timers/timer_pm.c | 342 + arch/i386/kernel/timers/timer_tsc.c | 617 + arch/i386/kernel/topology.c | 28 +- arch/i386/kernel/traps.c | 275 +- arch/i386/kernel/tsc.c | 480 - arch/i386/kernel/vm86.c | 1 + arch/i386/kernel/vmlinux.lds.S | 28 +- arch/i386/kernel/vsyscall-sysenter.S | 6 +- arch/i386/kernel/vsyscall.lds.S | 5 +- arch/i386/lib/checksum.S | 1 + arch/i386/lib/delay.c | 67 +- arch/i386/lib/memcpy.c | 1 + arch/i386/lib/mmx.c | 1 + arch/i386/lib/usercopy.c | 259 +- arch/i386/mach-default/setup.c | 46 +- arch/i386/mach-generic/bigsmp.c | 1 + arch/i386/mach-generic/default.c | 1 + arch/i386/mach-generic/es7000.c | 1 + arch/i386/mach-generic/probe.c | 1 + arch/i386/mach-generic/summit.c | 1 + arch/i386/mach-visws/mpparse.c | 1 + arch/i386/mach-visws/setup.c | 47 +- arch/i386/mach-visws/traps.c | 1 + arch/i386/mach-visws/visws_apic.c | 13 +- arch/i386/mach-voyager/setup.c | 82 +- arch/i386/mach-voyager/voyager_basic.c | 1 + arch/i386/mach-voyager/voyager_cat.c | 1 + arch/i386/mach-voyager/voyager_smp.c | 11 +- arch/i386/mach-voyager/voyager_thread.c | 2 + arch/i386/mach-xen/irqflags.c | 99 - arch/i386/mm/boot_ioremap.c | 8 +- arch/i386/mm/discontig.c | 3 +- arch/i386/mm/extable.c | 1 + arch/i386/mm/fault.c | 61 +- arch/i386/mm/hugetlbpage.c | 1 + arch/i386/mm/init.c | 18 +- arch/i386/mm/pageattr.c | 21 +- arch/i386/mm/pgtable.c | 27 +- arch/i386/oprofile/nmi_int.c | 11 +- arch/i386/oprofile/op_model_athlon.c | 1 - arch/i386/oprofile/op_model_p4.c | 1 - arch/i386/oprofile/op_model_ppro.c | 1 - arch/i386/pci/common.c | 5 +- arch/i386/pci/i386.c | 17 +- arch/i386/pci/init.c | 9 +- arch/i386/pci/irq.c | 18 +- arch/i386/pci/mmconfig.c | 2 +- arch/i386/pci/pcbios.c | 6 +- arch/i386/pci/pci.h | 3 +- arch/i386/pci/visws.c | 1 + arch/i386/power/cpu.c | 3 +- arch/ia64/Kconfig | 85 +- arch/ia64/Makefile | 18 +- arch/ia64/configs/sn2_defconfig | 2 +- arch/ia64/configs/tiger_defconfig | 2 +- arch/ia64/defconfig | 2 +- arch/ia64/dig/setup.c | 20 +- arch/ia64/hp/common/sba_iommu.c | 5 +- arch/ia64/hp/sim/Makefile | 2 - arch/ia64/hp/sim/boot/bootloader.c | 1 + arch/ia64/hp/sim/boot/fw-emu.c | 1 + arch/ia64/hp/sim/hpsim_console.c | 1 + arch/ia64/hp/sim/hpsim_irq.c | 6 +- arch/ia64/hp/sim/hpsim_setup.c | 1 + arch/ia64/hp/sim/simeth.c | 1 + arch/ia64/hp/sim/simscsi.c | 5 +- arch/ia64/hp/sim/simserial.c | 3 +- arch/ia64/ia32/Makefile | 1 - arch/ia64/ia32/audit.c | 37 - arch/ia64/ia32/binfmt_elf32.c | 1 + arch/ia64/ia32/ia32priv.h | 1 + arch/ia64/ia32/sys_ia32.c | 24 +- arch/ia64/kernel/Makefile | 4 +- arch/ia64/kernel/acpi-ext.c | 3 +- arch/ia64/kernel/acpi.c | 56 +- arch/ia64/kernel/asm-offsets.c | 42 +- arch/ia64/kernel/audit.c | 64 - arch/ia64/kernel/cpufreq/acpi-cpufreq.c | 1 + arch/ia64/kernel/efi.c | 165 +- arch/ia64/kernel/efi_stub.S | 2 +- arch/ia64/kernel/entry.S | 39 +- arch/ia64/kernel/entry.h | 2 +- arch/ia64/kernel/gate.S | 114 +- arch/ia64/kernel/gate.lds.S | 24 +- arch/ia64/kernel/head.S | 14 +- arch/ia64/kernel/ia64_ksyms.c | 4 +- arch/ia64/kernel/iosapic.c | 90 +- arch/ia64/kernel/irq.c | 24 +- arch/ia64/kernel/irq_ia64.c | 285 +- arch/ia64/kernel/irq_lsapic.c | 10 +- arch/ia64/kernel/ivt.S | 1 + arch/ia64/kernel/kprobes.c | 10 +- arch/ia64/kernel/machvec.c | 1 + arch/ia64/kernel/mca.c | 25 +- arch/ia64/kernel/mca_asm.S | 29 +- arch/ia64/kernel/mca_drv.c | 1 + arch/ia64/kernel/mca_drv_asm.S | 1 + arch/ia64/kernel/minstate.h | 1 + arch/ia64/kernel/module.c | 1 + arch/ia64/kernel/numa.c | 35 +- arch/ia64/kernel/pal.S | 23 +- arch/ia64/kernel/palinfo.c | 46 +- arch/ia64/kernel/patch.c | 71 - arch/ia64/kernel/perfmon.c | 22 +- arch/ia64/kernel/perfmon_default_smpl.c | 1 + arch/ia64/kernel/process.c | 5 +- arch/ia64/kernel/ptrace.c | 2 + arch/ia64/kernel/sal.c | 7 +- arch/ia64/kernel/salinfo.c | 6 +- arch/ia64/kernel/setup.c | 129 +- arch/ia64/kernel/signal.c | 1 + arch/ia64/kernel/smpboot.c | 11 +- arch/ia64/kernel/sys_ia64.c | 3 +- arch/ia64/kernel/time.c | 3 +- arch/ia64/kernel/topology.c | 45 +- arch/ia64/kernel/traps.c | 6 +- arch/ia64/kernel/uncached.c | 256 +- arch/ia64/kernel/vmlinux.lds.S | 1 + arch/ia64/lib/Makefile | 2 +- arch/ia64/lib/clear_page.S | 1 + arch/ia64/lib/io.c | 1 + arch/ia64/lib/memcpy_mck.S | 1 + arch/ia64/mm/contig.c | 17 +- arch/ia64/mm/discontig.c | 135 +- arch/ia64/mm/extable.c | 1 + arch/ia64/mm/fault.c | 36 +- arch/ia64/mm/hugetlbpage.c | 1 + arch/ia64/mm/init.c | 61 +- arch/ia64/mm/ioremap.c | 30 +- arch/ia64/mm/numa.c | 1 + arch/ia64/mm/tlb.c | 1 + arch/ia64/oprofile/perfmon.c | 1 + arch/ia64/pci/pci.c | 25 +- arch/ia64/sn/kernel/bte.c | 10 +- arch/ia64/sn/kernel/huberror.c | 4 +- arch/ia64/sn/kernel/io_init.c | 9 +- arch/ia64/sn/kernel/irq.c | 148 +- arch/ia64/sn/kernel/setup.c | 21 +- arch/ia64/sn/kernel/sn2/cache.c | 15 +- arch/ia64/sn/kernel/sn2/prominfo_proc.c | 1 + arch/ia64/sn/kernel/sn2/sn_hwperf.c | 50 +- arch/ia64/sn/kernel/sn2/sn_proc_fs.c | 1 + arch/ia64/sn/kernel/xpc_channel.c | 2 +- arch/ia64/sn/kernel/xpc_main.c | 2 +- arch/ia64/sn/kernel/xpnet.c | 1 + arch/ia64/sn/pci/pci_dma.c | 10 +- arch/ia64/sn/pci/pcibr/pcibr_dma.c | 62 +- arch/ia64/sn/pci/pcibr/pcibr_provider.c | 2 +- arch/ia64/sn/pci/tioca_provider.c | 12 +- arch/ia64/sn/pci/tioce_provider.c | 77 +- arch/ia64/xen/Makefile | 8 - arch/ia64/xen/drivers/README | 2 - arch/ia64/xen/hypercall.S | 413 - arch/ia64/xen/hypervisor.c | 833 - arch/ia64/xen/util.c | 115 - arch/ia64/xen/xenentry.S | 867 - arch/ia64/xen/xenhpski.c | 19 - arch/ia64/xen/xenivt.S | 2169 -- arch/ia64/xen/xenminstate.h | 368 - arch/ia64/xen/xenpal.S | 76 - arch/ia64/xen/xensetup.S | 54 - arch/m32r/boot/compressed/head.S | 1 + arch/m32r/boot/compressed/m32r_sio.c | 1 + arch/m32r/boot/compressed/misc.c | 1 + arch/m32r/boot/compressed/vmlinux.lds.S | 1 + arch/m32r/boot/setup.S | 1 + arch/m32r/kernel/align.c | 1 + arch/m32r/kernel/entry.S | 66 +- arch/m32r/kernel/head.S | 1 + arch/m32r/kernel/io_m32104ut.c | 1 + arch/m32r/kernel/io_m32700ut.c | 1 + arch/m32r/kernel/io_mappi.c | 1 + arch/m32r/kernel/io_mappi2.c | 1 + arch/m32r/kernel/io_mappi3.c | 1 + arch/m32r/kernel/io_oaks32r.c | 1 + arch/m32r/kernel/io_opsput.c | 1 + arch/m32r/kernel/io_usrv.c | 1 + arch/m32r/kernel/irq.c | 2 +- arch/m32r/kernel/m32r_ksyms.c | 1 + arch/m32r/kernel/module.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/ptrace.c | 1 + arch/m32r/kernel/semaphore.c | 1 + arch/m32r/kernel/setup.c | 5 +- arch/m32r/kernel/setup_m32104ut.c | 9 +- arch/m32r/kernel/setup_m32700ut.c | 29 +- arch/m32r/kernel/setup_mappi.c | 17 +- arch/m32r/kernel/setup_mappi2.c | 21 +- arch/m32r/kernel/setup_mappi3.c | 21 +- arch/m32r/kernel/setup_oaks32r.c | 13 +- arch/m32r/kernel/setup_opsput.c | 29 +- arch/m32r/kernel/setup_usrv.c | 19 +- arch/m32r/kernel/signal.c | 1 + arch/m32r/kernel/smpboot.c | 1 + arch/m32r/kernel/sys_m32r.c | 1 + arch/m32r/kernel/time.c | 3 +- arch/m32r/kernel/traps.c | 1 + arch/m32r/kernel/vmlinux.lds.S | 1 + arch/m32r/lib/ashxdi3.S | 1 + arch/m32r/lib/checksum.S | 1 + arch/m32r/lib/delay.c | 1 + arch/m32r/lib/memcpy.S | 1 + arch/m32r/lib/memset.S | 1 + arch/m32r/lib/strlen.S | 1 + arch/m32r/lib/usercopy.c | 1 + arch/m32r/mm/cache.c | 1 + arch/m32r/mm/discontig.c | 1 + arch/m32r/mm/fault-nommu.c | 1 + arch/m32r/mm/fault.c | 3 +- arch/m32r/mm/mmu.S | 1 + arch/m68k/amiga/amiga_ksyms.c | 3 + arch/m68k/amiga/amiints.c | 386 +- arch/m68k/amiga/amisound.c | 1 + arch/m68k/amiga/chipram.c | 1 + arch/m68k/amiga/cia.c | 156 +- arch/m68k/amiga/config.c | 16 + arch/m68k/apollo/Makefile | 2 +- arch/m68k/apollo/config.c | 25 +- arch/m68k/apollo/dn_ints.c | 137 +- arch/m68k/atari/ataints.c | 278 +- arch/m68k/atari/config.c | 12 + arch/m68k/atari/debug.c | 1 + arch/m68k/atari/hades-pci.c | 1 + arch/m68k/atari/stram.c | 1 + arch/m68k/bvme6000/Makefile | 2 +- arch/m68k/bvme6000/bvmeints.c | 160 + arch/m68k/bvme6000/config.c | 21 +- arch/m68k/hp300/Makefile | 2 +- arch/m68k/hp300/config.c | 12 +- arch/m68k/hp300/ints.c | 175 + arch/m68k/hp300/ints.h | 9 + arch/m68k/hp300/time.c | 3 +- arch/m68k/kernel/Makefile | 4 +- arch/m68k/kernel/bios32.c | 1 + arch/m68k/kernel/dma.c | 129 - arch/m68k/kernel/entry.S | 105 +- arch/m68k/kernel/head.S | 1 + arch/m68k/kernel/ints.c | 383 +- arch/m68k/kernel/m68k_ksyms.c | 3 + arch/m68k/kernel/process.c | 1 + arch/m68k/kernel/ptrace.c | 1 + arch/m68k/kernel/semaphore.c | 1 + arch/m68k/kernel/setup.c | 4 + arch/m68k/kernel/signal.c | 2 +- arch/m68k/kernel/time.c | 1 + arch/m68k/kernel/traps.c | 189 +- arch/m68k/kernel/vmlinux.lds.S | 1 + arch/m68k/lib/Makefile | 4 +- arch/m68k/lib/uaccess.c | 222 - arch/m68k/mac/baboon.c | 2 +- arch/m68k/mac/config.c | 34 + arch/m68k/mac/debug.c | 1 + arch/m68k/mac/iop.c | 3 +- arch/m68k/mac/macints.c | 504 +- arch/m68k/mac/misc.c | 1 + arch/m68k/mac/oss.c | 14 +- arch/m68k/mac/psc.c | 10 +- arch/m68k/mac/via.c | 33 +- arch/m68k/math-emu/fp_entry.S | 1 + arch/m68k/math-emu/fp_util.S | 1 + arch/m68k/mm/init.c | 1 + arch/m68k/mm/kmap.c | 7 +- arch/m68k/mm/memory.c | 7 +- arch/m68k/mm/motorola.c | 13 +- arch/m68k/mm/sun3mmu.c | 5 +- arch/m68k/mvme147/147ints.c | 145 + arch/m68k/mvme147/Makefile | 2 +- arch/m68k/mvme147/config.c | 22 +- arch/m68k/mvme16x/16xints.c | 149 + arch/m68k/mvme16x/Makefile | 2 +- arch/m68k/mvme16x/config.c | 23 +- arch/m68k/q40/config.c | 14 + arch/m68k/q40/q40ints.c | 481 +- arch/m68k/sun3/config.c | 9 + arch/m68k/sun3/prom/init.c | 1 + arch/m68k/sun3/prom/printf.c | 1 + arch/m68k/sun3/sun3dvma.c | 7 +- arch/m68k/sun3/sun3ints.c | 209 +- arch/m68k/sun3x/config.c | 8 + arch/m68knommu/Kconfig | 297 +- arch/m68knommu/Makefile | 24 +- arch/m68knommu/defconfig | 207 +- arch/m68knommu/kernel/comempci.c | 4 +- arch/m68knommu/kernel/entry.S | 1 + arch/m68knommu/kernel/m68k_ksyms.c | 1 + arch/m68knommu/kernel/process.c | 1 + arch/m68knommu/kernel/ptrace.c | 1 + arch/m68knommu/kernel/semaphore.c | 1 + arch/m68knommu/kernel/setup.c | 69 +- arch/m68knommu/kernel/signal.c | 6 +- arch/m68knommu/kernel/syscalltable.S | 1 + arch/m68knommu/kernel/time.c | 1 + arch/m68knommu/kernel/traps.c | 5 +- arch/m68knommu/kernel/vmlinux.lds.S | 225 +- arch/m68knommu/lib/semaphore.S | 1 + arch/m68knommu/mm/init.c | 7 +- arch/m68knommu/mm/kmap.c | 1 + arch/m68knommu/mm/memory.c | 1 + arch/m68knommu/platform/5206/config.c | 1 + arch/m68knommu/platform/5206e/config.c | 1 + arch/m68knommu/platform/520x/config.c | 1 + arch/m68knommu/platform/523x/config.c | 1 + arch/m68knommu/platform/5249/config.c | 1 + arch/m68knommu/platform/5272/config.c | 1 + arch/m68knommu/platform/527x/config.c | 1 + arch/m68knommu/platform/528x/config.c | 1 + arch/m68knommu/platform/5307/Makefile | 1 - arch/m68knommu/platform/5307/config.c | 1 + arch/m68knommu/platform/5307/entry.S | 47 +- arch/m68knommu/platform/5307/head.S | 83 +- arch/m68knommu/platform/5307/ints.c | 1 + arch/m68knommu/platform/5307/pit.c | 40 +- arch/m68knommu/platform/5307/timers.c | 54 +- arch/m68knommu/platform/5307/vectors.c | 1 + arch/m68knommu/platform/532x/Makefile | 20 - arch/m68knommu/platform/532x/config.c | 485 - arch/m68knommu/platform/5407/config.c | 1 + arch/m68knommu/platform/68328/Makefile | 1 - arch/m68knommu/platform/68328/config.c | 1 + arch/m68knommu/platform/68328/entry.S | 1 + arch/m68knommu/platform/68328/head-de2.S | 1 + arch/m68knommu/platform/68328/head-pilot.S | 4 +- arch/m68knommu/platform/68328/head-ram.S | 7 +- arch/m68knommu/platform/68328/head-rom.S | 19 +- arch/m68knommu/platform/68328/ints.c | 20 +- arch/m68knommu/platform/68328/romvec.S | 35 - arch/m68knommu/platform/68328/timers.c | 1 + arch/m68knommu/platform/68360/config.c | 15 +- arch/m68knommu/platform/68360/entry.S | 1 + arch/m68knommu/platform/68360/head-ram.S | 20 +- arch/m68knommu/platform/68360/head-rom.S | 18 +- arch/m68knommu/platform/68360/ints.c | 2 +- arch/m68knommu/platform/68EZ328/config.c | 15 +- arch/m68knommu/platform/68VZ328/config.c | 15 +- arch/mips/Kconfig | 351 +- arch/mips/Kconfig.debug | 4 - arch/mips/Makefile | 44 +- arch/mips/arc/identify.c | 1 + arch/mips/au1000/common/au1xxx_irqmap.c | 5 +- arch/mips/au1000/common/dbdma.c | 9 +- arch/mips/au1000/common/dbg_io.c | 1 + arch/mips/au1000/common/dma.c | 1 + arch/mips/au1000/common/gpio.c | 1 + arch/mips/au1000/common/irq.c | 45 +- arch/mips/au1000/common/pci.c | 17 +- arch/mips/au1000/common/platform.c | 1 + arch/mips/au1000/common/power.c | 23 +- arch/mips/au1000/common/prom.c | 26 +- arch/mips/au1000/common/reset.c | 1 + arch/mips/au1000/common/setup.c | 9 +- arch/mips/au1000/common/time.c | 10 +- arch/mips/au1000/common/usbdev.c | 8 +- arch/mips/au1000/csb250/Makefile | 8 + arch/mips/au1000/csb250/board_setup.c | 239 + arch/mips/au1000/csb250/init.c | 94 + arch/mips/au1000/csb250/irqmap.c | 60 + arch/mips/au1000/db1x00/board_setup.c | 1 + arch/mips/au1000/db1x00/init.c | 1 + arch/mips/au1000/db1x00/irqmap.c | 5 +- arch/mips/au1000/db1x00/mirage_ts.c | 1 + arch/mips/au1000/hydrogen3/Makefile | 9 + arch/mips/au1000/hydrogen3/board_setup.c | 70 + arch/mips/au1000/hydrogen3/init.c | 76 + arch/mips/au1000/hydrogen3/irqmap.c | 56 + arch/mips/au1000/mtx-1/board_setup.c | 1 + arch/mips/au1000/mtx-1/irqmap.c | 4 +- arch/mips/au1000/pb1000/board_setup.c | 1 + arch/mips/au1000/pb1000/irqmap.c | 4 +- arch/mips/au1000/pb1100/board_setup.c | 1 + arch/mips/au1000/pb1100/irqmap.c | 4 +- arch/mips/au1000/pb1200/board_setup.c | 1 + arch/mips/au1000/pb1200/irqmap.c | 9 +- arch/mips/au1000/pb1500/board_setup.c | 1 + arch/mips/au1000/pb1500/irqmap.c | 4 +- arch/mips/au1000/pb1550/irqmap.c | 4 +- arch/mips/au1000/xxs1500/board_setup.c | 1 + arch/mips/au1000/xxs1500/irqmap.c | 4 +- arch/mips/basler/excite/Makefile | 9 - arch/mips/basler/excite/excite_dbg_io.c | 121 - arch/mips/basler/excite/excite_device.c | 403 - arch/mips/basler/excite/excite_flashtest.c | 294 - arch/mips/basler/excite/excite_fpga.h | 80 - arch/mips/basler/excite/excite_iodev.c | 182 - arch/mips/basler/excite/excite_iodev.h | 10 - arch/mips/basler/excite/excite_irq.c | 129 - arch/mips/basler/excite/excite_procfs.c | 80 - arch/mips/basler/excite/excite_prom.c | 147 - arch/mips/basler/excite/excite_setup.c | 305 - arch/mips/cobalt/console.c | 6 +- arch/mips/cobalt/setup.c | 48 +- arch/mips/configs/atlas_defconfig | 79 +- arch/mips/configs/bigsur_defconfig | 66 +- arch/mips/configs/capcella_defconfig | 60 +- arch/mips/configs/cobalt_defconfig | 57 +- arch/mips/configs/db1000_defconfig | 61 +- arch/mips/configs/db1100_defconfig | 63 +- arch/mips/configs/db1200_defconfig | 62 +- arch/mips/configs/db1500_defconfig | 77 +- arch/mips/configs/db1550_defconfig | 62 +- .../{wrppmc_defconfig => ddb5476_defconfig} | 361 +- arch/mips/configs/ddb5477_defconfig | 57 +- arch/mips/configs/decstation_defconfig | 68 +- arch/mips/configs/e55_defconfig | 50 +- arch/mips/configs/emma2rh_defconfig | 1241 - arch/mips/configs/ev64120_defconfig | 56 +- arch/mips/configs/ev96100_defconfig | 55 +- arch/mips/configs/excite_defconfig | 1245 - arch/mips/configs/ip22_defconfig | 68 +- arch/mips/configs/ip27_defconfig | 72 +- arch/mips/configs/ip32_defconfig | 58 +- arch/mips/configs/it8172_defconfig | 56 +- arch/mips/configs/ivr_defconfig | 56 +- arch/mips/configs/jaguar-atx_defconfig | 59 +- arch/mips/configs/jmr3927_defconfig | 59 +- arch/mips/configs/lasat200_defconfig | 57 +- arch/mips/configs/malta_defconfig | 75 +- arch/mips/configs/mipssim_defconfig | 62 +- arch/mips/configs/mpc30x_defconfig | 59 +- arch/mips/configs/ocelot_3_defconfig | 66 +- arch/mips/configs/ocelot_c_defconfig | 57 +- arch/mips/configs/ocelot_defconfig | 56 +- arch/mips/configs/ocelot_g_defconfig | 57 +- arch/mips/configs/pb1100_defconfig | 59 +- arch/mips/configs/pb1500_defconfig | 61 +- arch/mips/configs/pb1550_defconfig | 61 +- arch/mips/configs/pnx8550-jbs_defconfig | 360 +- arch/mips/configs/pnx8550-v2pci_defconfig | 412 +- arch/mips/configs/qemu_defconfig | 55 +- arch/mips/configs/rbhma4500_defconfig | 75 +- arch/mips/configs/rm200_defconfig | 85 +- arch/mips/configs/sb1250-swarm_defconfig | 58 +- arch/mips/configs/sead_defconfig | 49 +- arch/mips/configs/tb0226_defconfig | 66 +- arch/mips/configs/tb0229_defconfig | 66 +- arch/mips/configs/tb0287_defconfig | 66 +- arch/mips/configs/workpad_defconfig | 55 +- arch/mips/configs/yosemite_defconfig | 65 +- arch/mips/ddb5xxx/common/prom.c | 11 +- arch/mips/ddb5xxx/ddb5074/Makefile | 8 + arch/mips/ddb5xxx/ddb5074/irq.c | 169 + arch/mips/ddb5xxx/ddb5074/nile4_pic.c | 286 + arch/mips/ddb5xxx/ddb5074/setup.c | 234 + arch/mips/ddb5xxx/ddb5476/Makefile | 9 + arch/mips/ddb5xxx/ddb5476/dbg_io.c | 136 + arch/mips/ddb5xxx/ddb5476/irq.c | 165 + arch/mips/ddb5xxx/ddb5476/nile4_pic.c | 190 + arch/mips/ddb5xxx/ddb5476/setup.c | 296 + arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c | 109 + arch/mips/ddb5xxx/ddb5477/irq.c | 2 + arch/mips/ddb5xxx/ddb5477/irq_5477.c | 4 +- arch/mips/ddb5xxx/ddb5477/setup.c | 9 +- arch/mips/dec/int-handler.S | 1 + arch/mips/dec/ioasic-irq.c | 8 +- arch/mips/dec/kn02-irq.c | 4 +- arch/mips/dec/prom/init.c | 1 + arch/mips/dec/prom/memory.c | 1 + arch/mips/dec/setup.c | 8 +- arch/mips/dec/time.c | 4 +- arch/mips/defconfig | 68 +- arch/mips/emma2rh/common/Makefile | 13 - arch/mips/emma2rh/common/irq.c | 107 - arch/mips/emma2rh/common/irq_emma2rh.c | 134 - arch/mips/emma2rh/common/prom.c | 76 - arch/mips/emma2rh/markeins/Makefile | 13 - arch/mips/emma2rh/markeins/irq.c | 133 - arch/mips/emma2rh/markeins/irq_markeins.c | 197 - arch/mips/emma2rh/markeins/led.c | 60 - arch/mips/emma2rh/markeins/platform.c | 169 - arch/mips/emma2rh/markeins/setup.c | 180 - arch/mips/galileo-boards/ev96100/setup.c | 3 +- arch/mips/galileo-boards/ev96100/time.c | 1 + arch/mips/gt64120/common/Makefile | 1 + arch/mips/gt64120/common/pci.c | 147 + arch/mips/gt64120/common/time.c | 3 +- arch/mips/gt64120/ev64120/irq.c | 4 +- arch/mips/gt64120/ev64120/setup.c | 2 +- arch/mips/gt64120/momenco_ocelot/dbg_io.c | 1 + arch/mips/gt64120/momenco_ocelot/setup.c | 6 +- arch/mips/gt64120/wrppmc/Makefile | 14 - arch/mips/gt64120/wrppmc/irq.c | 69 - arch/mips/gt64120/wrppmc/pci.c | 53 - arch/mips/gt64120/wrppmc/reset.c | 50 - arch/mips/gt64120/wrppmc/setup.c | 170 - arch/mips/gt64120/wrppmc/time.c | 52 - arch/mips/ite-boards/generic/dbg_io.c | 1 + arch/mips/ite-boards/generic/irq.c | 8 +- arch/mips/ite-boards/generic/it8172_cir.c | 1 + arch/mips/ite-boards/generic/it8172_setup.c | 82 +- arch/mips/ite-boards/generic/pmon_prom.c | 1 + arch/mips/ite-boards/generic/time.c | 3 +- arch/mips/jazz/irq.c | 4 +- arch/mips/jazz/setup.c | 6 +- arch/mips/jmr3927/rbhma3100/init.c | 1 + arch/mips/jmr3927/rbhma3100/irq.c | 5 +- arch/mips/jmr3927/rbhma3100/setup.c | 67 +- arch/mips/kernel/Makefile | 2 - arch/mips/kernel/apm.c | 604 - arch/mips/kernel/asm-offsets.c | 67 +- arch/mips/kernel/branch.c | 2 +- arch/mips/kernel/cpu-bugs64.c | 1 + arch/mips/kernel/cpu-probe.c | 9 +- arch/mips/kernel/entry.S | 24 +- arch/mips/kernel/gdb-low.S | 7 +- arch/mips/kernel/gdb-stub.c | 1 + arch/mips/kernel/genex.S | 11 +- arch/mips/kernel/head.S | 6 +- arch/mips/kernel/i8259.c | 10 +- arch/mips/kernel/irixelf.c | 2 + arch/mips/kernel/irixsig.c | 5 +- arch/mips/kernel/irq-msc01.c | 8 +- arch/mips/kernel/irq-mv6434x.c | 4 +- arch/mips/kernel/irq-rm7000.c | 4 +- arch/mips/kernel/irq-rm9000.c | 8 +- arch/mips/kernel/irq.c | 5 +- arch/mips/kernel/irq_cpu.c | 8 +- arch/mips/kernel/linux32.c | 3 +- arch/mips/kernel/mips-mt.c | 8 +- arch/mips/kernel/mips_ksyms.c | 1 + arch/mips/kernel/proc.c | 1 + arch/mips/kernel/process.c | 1 + arch/mips/kernel/ptrace.c | 32 +- arch/mips/kernel/ptrace32.c | 16 +- arch/mips/kernel/r2300_switch.S | 1 + arch/mips/kernel/r4k_fpu.S | 1 + arch/mips/kernel/r4k_switch.S | 20 +- arch/mips/kernel/rtlx.c | 2 +- arch/mips/kernel/scall32-o32.S | 21 +- arch/mips/kernel/scall64-64.S | 6 +- arch/mips/kernel/scall64-n32.S | 6 +- arch/mips/kernel/scall64-o32.S | 6 +- arch/mips/kernel/setup.c | 62 +- arch/mips/kernel/signal-common.h | 1 + arch/mips/kernel/signal.c | 1 + arch/mips/kernel/smp-mt.c | 4 +- arch/mips/kernel/smp.c | 37 +- arch/mips/kernel/smtc-asm.S | 11 +- arch/mips/kernel/smtc.c | 66 +- arch/mips/kernel/syscall.c | 9 +- arch/mips/kernel/sysirix.c | 24 +- arch/mips/kernel/time.c | 8 +- arch/mips/kernel/traps.c | 49 +- arch/mips/kernel/unaligned.c | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/mips/kernel/vpe.c | 1 + arch/mips/lasat/interrupt.c | 4 +- arch/mips/lasat/lasat_board.c | 1 + arch/mips/lasat/reset.c | 1 + arch/mips/lasat/setup.c | 11 +- arch/mips/lasat/sysctl.c | 1 + arch/mips/lib-32/dump_tlb.c | 1 + arch/mips/lib-64/dump_tlb.c | 1 + arch/mips/lib/Makefile | 3 - arch/mips/lib/ashldi3.c | 29 - arch/mips/lib/ashrdi3.c | 31 - arch/mips/lib/libgcc.h | 26 - arch/mips/lib/lshrdi3.c | 29 - arch/mips/lib/memcpy.S | 1 + arch/mips/math-emu/cp1emu.c | 15 +- arch/mips/math-emu/ieee754.h | 2 +- arch/mips/math-emu/kernel_linkage.c | 25 +- arch/mips/mips-boards/atlas/atlas_int.c | 4 +- arch/mips/mips-boards/atlas/atlas_setup.c | 5 +- arch/mips/mips-boards/generic/init.c | 1 + arch/mips/mips-boards/generic/memory.c | 44 +- arch/mips/mips-boards/generic/printf.c | 1 + arch/mips/mips-boards/generic/reset.c | 1 + arch/mips/mips-boards/generic/time.c | 9 +- arch/mips/mips-boards/malta/malta_setup.c | 17 +- arch/mips/mips-boards/malta/malta_smp.c | 19 + arch/mips/mips-boards/sead/sead_setup.c | 5 +- arch/mips/mips-boards/sim/Makefile | 3 +- arch/mips/mips-boards/sim/sim_IRQ.c | 148 + arch/mips/mips-boards/sim/sim_irq.S | 101 + arch/mips/mips-boards/sim/sim_setup.c | 5 +- arch/mips/mips-boards/sim/sim_smp.c | 22 + arch/mips/mips-boards/sim/sim_time.c | 5 +- arch/mips/mm/Makefile | 1 - arch/mips/mm/c-r4k.c | 121 +- arch/mips/mm/c-sb1.c | 1 + arch/mips/mm/cache.c | 1 + arch/mips/mm/cerr-sb1.c | 1 + arch/mips/mm/dma-coherent.c | 1 + arch/mips/mm/dma-noncoherent.c | 1 + arch/mips/mm/highmem.c | 1 + arch/mips/mm/init.c | 66 +- arch/mips/mm/pg-sb1.c | 1 + arch/mips/mm/pgtable-32.c | 1 + arch/mips/mm/pgtable.c | 3 +- arch/mips/mm/sc-mips.c | 112 - arch/mips/mm/tlb-r4k.c | 2 + arch/mips/mm/tlb-r8k.c | 1 + arch/mips/mm/tlbex.c | 160 +- arch/mips/momentum/jaguar_atx/dbg_io.c | 1 + arch/mips/momentum/jaguar_atx/irq.c | 2 +- arch/mips/momentum/jaguar_atx/prom.c | 1 + arch/mips/momentum/jaguar_atx/reset.c | 1 + arch/mips/momentum/jaguar_atx/setup.c | 10 +- arch/mips/momentum/ocelot_3/irq.c | 2 +- arch/mips/momentum/ocelot_3/prom.c | 1 + arch/mips/momentum/ocelot_3/setup.c | 5 +- arch/mips/momentum/ocelot_c/cpci-irq.c | 4 +- arch/mips/momentum/ocelot_c/dbg_io.c | 1 + arch/mips/momentum/ocelot_c/irq.c | 4 +- arch/mips/momentum/ocelot_c/ocelot_c_fpga.h | 1 + arch/mips/momentum/ocelot_c/prom.c | 1 + arch/mips/momentum/ocelot_c/reset.c | 1 + arch/mips/momentum/ocelot_c/setup.c | 10 +- arch/mips/momentum/ocelot_c/uart-irq.c | 6 +- arch/mips/momentum/ocelot_g/dbg_io.c | 1 + arch/mips/momentum/ocelot_g/gt-irq.c | 7 +- arch/mips/momentum/ocelot_g/prom.c | 1 + arch/mips/momentum/ocelot_g/setup.c | 7 +- arch/mips/oprofile/common.c | 2 +- arch/mips/oprofile/op_model_mipsxx.c | 150 +- arch/mips/pci/Makefile | 7 +- arch/mips/pci/fixup-atlas.c | 1 + arch/mips/pci/fixup-ddb5074.c | 21 + arch/mips/pci/fixup-emma2rh.c | 101 - arch/mips/pci/fixup-excite.c | 36 - arch/mips/pci/fixup-mpc30x.c | 1 + arch/mips/pci/fixup-vr4133.c | 1 + arch/mips/pci/fixup-wrppmc.c | 37 - arch/mips/pci/ops-au1000.c | 1 + arch/mips/pci/ops-bridge.c | 306 - arch/mips/pci/ops-ddb5074.c | 271 + arch/mips/pci/ops-ddb5476.c | 286 + arch/mips/pci/ops-emma2rh.c | 185 - arch/mips/pci/ops-it8172.c | 34 +- arch/mips/pci/ops-sni.c | 12 +- arch/mips/pci/ops-titan.c | 25 +- arch/mips/pci/ops-tx4927.c | 8 +- arch/mips/pci/ops-tx4938.c | 8 +- arch/mips/pci/pci-bcm1480.c | 1 + arch/mips/pci/pci-bcm1480ht.c | 1 + arch/mips/pci/pci-ddb5074.c | 79 + arch/mips/pci/pci-ddb5476.c | 93 + arch/mips/pci/pci-ddb5477.c | 32 +- arch/mips/pci/pci-emma2rh.c | 89 - arch/mips/pci/pci-excite.c | 149 - arch/mips/pci/pci-ip27.c | 295 +- arch/mips/pci/pci-ip32.c | 1 + arch/mips/pci/pci-jmr3927.c | 16 +- arch/mips/pci/pci-ocelot.c | 8 +- arch/mips/pci/pci-sb1250.c | 1 + arch/mips/pci/pci-yosemite.c | 10 +- arch/mips/pci/pci.c | 10 +- arch/mips/philips/pnx8550/common/int.c | 17 +- arch/mips/philips/pnx8550/common/pci.c | 16 +- arch/mips/philips/pnx8550/common/setup.c | 33 +- arch/mips/philips/pnx8550/common/time.c | 11 +- arch/mips/pmc-sierra/yosemite/ht.c | 5 +- arch/mips/pmc-sierra/yosemite/irq.c | 1 + arch/mips/pmc-sierra/yosemite/prom.c | 1 + arch/mips/pmc-sierra/yosemite/setup.c | 5 +- arch/mips/qemu/Makefile | 2 +- arch/mips/qemu/q-reset.c | 33 - arch/mips/qemu/q-setup.c | 8 +- arch/mips/sgi-ip22/ip22-eisa.c | 9 +- arch/mips/sgi-ip22/ip22-int.c | 23 +- arch/mips/sgi-ip22/ip22-reset.c | 2 +- arch/mips/sgi-ip22/ip22-setup.c | 3 +- arch/mips/sgi-ip22/ip22-time.c | 10 +- arch/mips/sgi-ip27/Kconfig | 41 +- arch/mips/sgi-ip27/Makefile | 11 +- arch/mips/sgi-ip27/ip27-console.c | 40 +- arch/mips/sgi-ip27/ip27-init.c | 5 +- arch/mips/sgi-ip27/ip27-irq.c | 11 +- arch/mips/sgi-ip27/ip27-klnuma.c | 1 + arch/mips/sgi-ip27/ip27-memory.c | 1 + arch/mips/sgi-ip27/ip27-reset.c | 1 + arch/mips/sgi-ip27/ip27-timer.c | 72 +- arch/mips/sgi-ip32/ip32-irq.c | 18 +- arch/mips/sgi-ip32/ip32-reset.c | 12 +- arch/mips/sgi-ip32/ip32-setup.c | 7 +- arch/mips/sibyte/Kconfig | 3 - arch/mips/sibyte/bcm1480/irq.c | 20 +- arch/mips/sibyte/bcm1480/setup.c | 1 + arch/mips/sibyte/bcm1480/time.c | 18 +- arch/mips/sibyte/cfe/console.c | 1 + arch/mips/sibyte/cfe/setup.c | 1 + arch/mips/sibyte/sb1250/bus_watcher.c | 1 + arch/mips/sibyte/sb1250/irq.c | 29 +- arch/mips/sibyte/sb1250/prom.c | 1 + arch/mips/sibyte/sb1250/setup.c | 1 + arch/mips/sibyte/sb1250/time.c | 1 + arch/mips/sibyte/swarm/setup.c | 10 +- arch/mips/sni/Makefile | 1 - arch/mips/sni/irq.c | 4 +- arch/mips/sni/setup.c | 141 +- arch/mips/sni/sniprom.c | 158 - arch/mips/tx4927/common/tx4927_irq.c | 9 +- arch/mips/tx4927/common/tx4927_setup.c | 7 +- .../toshiba_rbtx4927/toshiba_rbtx4927_irq.c | 21 +- .../toshiba_rbtx4927/toshiba_rbtx4927_setup.c | 1 + arch/mips/tx4938/common/irq.c | 8 +- arch/mips/tx4938/common/setup.c | 7 +- arch/mips/tx4938/toshiba_rbtx4938/irq.c | 4 +- arch/mips/tx4938/toshiba_rbtx4938/prom.c | 1 + arch/mips/tx4938/toshiba_rbtx4938/setup.c | 6 +- .../mips/tx4938/toshiba_rbtx4938/spi_eeprom.c | 1 + arch/mips/vr41xx/Kconfig | 13 + arch/mips/vr41xx/casio-e55/setup.c | 15 +- arch/mips/vr41xx/common/Makefile | 3 +- arch/mips/vr41xx/common/icu.c | 49 +- arch/mips/vr41xx/common/init.c | 6 +- arch/mips/vr41xx/common/irq.c | 8 +- arch/mips/vr41xx/common/vrc4173.c | 581 + arch/mips/vr41xx/ibm-workpad/setup.c | 15 +- arch/mips/vr41xx/nec-cmbvr4133/init.c | 1 + arch/mips/vr41xx/nec-cmbvr4133/irq.c | 4 +- arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c | 1 + arch/mips/vr41xx/nec-cmbvr4133/setup.c | 1 + arch/parisc/Kconfig | 4 - arch/parisc/hpux/fs.c | 6 +- arch/parisc/hpux/sys_hpux.c | 10 +- arch/parisc/kernel/cache.c | 28 +- arch/parisc/kernel/entry.S | 7 +- arch/parisc/kernel/firmware.c | 46 +- arch/parisc/kernel/head.S | 2 + arch/parisc/kernel/irq.c | 34 +- arch/parisc/kernel/module.c | 63 +- arch/parisc/kernel/pacache.S | 1 + arch/parisc/kernel/parisc_ksyms.c | 1 + arch/parisc/kernel/pci.c | 3 +- arch/parisc/kernel/pdc_chassis.c | 109 +- arch/parisc/kernel/pdc_cons.c | 3 +- arch/parisc/kernel/perf_asm.S | 1 + arch/parisc/kernel/processor.c | 1 + arch/parisc/kernel/ptrace.c | 8 +- arch/parisc/kernel/real2.S | 10 + arch/parisc/kernel/setup.c | 6 +- arch/parisc/kernel/signal.c | 22 +- arch/parisc/kernel/smp.c | 1 + arch/parisc/kernel/sys_parisc32.c | 20 +- arch/parisc/kernel/syscall.S | 15 +- arch/parisc/kernel/time.c | 19 +- arch/parisc/kernel/topology.c | 3 +- arch/parisc/kernel/traps.c | 85 +- arch/parisc/kernel/unaligned.c | 19 +- arch/parisc/kernel/unwind.c | 1 + arch/parisc/kernel/vmlinux.lds.S | 2 +- arch/parisc/lib/bitops.c | 1 + arch/parisc/lib/fixup.S | 1 + arch/parisc/lib/memcpy.c | 1 + arch/parisc/mm/init.c | 5 +- arch/powerpc/Kconfig | 110 +- arch/powerpc/Kconfig.debug | 22 +- arch/powerpc/Makefile | 1 + arch/powerpc/boot/Makefile | 4 +- arch/powerpc/boot/dts/mpc7448hpc2.dts | 190 - arch/powerpc/boot/dts/mpc8349emds.dts | 328 - arch/powerpc/boot/dts/mpc8540ads.dts | 257 - arch/powerpc/boot/dts/mpc8541cds.dts | 244 - arch/powerpc/boot/dts/mpc8548cds.dts | 287 - arch/powerpc/boot/dts/mpc8555cds.dts | 244 - arch/powerpc/boot/dts/mpc8641_hpcn.dts | 339 - arch/powerpc/boot/main.c | 27 - arch/powerpc/boot/prom.h | 7 - arch/powerpc/configs/cell_defconfig | 89 +- arch/powerpc/configs/chrp32_defconfig | 1397 - arch/powerpc/configs/g5_defconfig | 125 +- arch/powerpc/configs/iseries_defconfig | 79 +- arch/powerpc/configs/maple_defconfig | 129 +- arch/powerpc/configs/mpc7448_hpc2_defconfig | 963 - arch/powerpc/configs/mpc834x_itx_defconfig | 1344 - ...4x_mds_defconfig => mpc834x_sys_defconfig} | 104 +- arch/powerpc/configs/mpc8540_ads_defconfig | 84 +- arch/powerpc/configs/mpc85xx_cds_defconfig | 895 - arch/powerpc/configs/mpc8641_hpcn_defconfig | 963 - arch/powerpc/configs/pmac32_defconfig | 316 +- arch/powerpc/configs/ppc64_defconfig | 198 +- arch/powerpc/configs/pseries_defconfig | 136 +- arch/powerpc/kernel/Makefile | 9 +- arch/powerpc/kernel/align.c | 189 +- arch/powerpc/kernel/asm-offsets.c | 6 +- arch/powerpc/kernel/audit.c | 66 - arch/powerpc/kernel/binfmt_elf32.c | 1 + arch/powerpc/kernel/btext.c | 21 +- arch/powerpc/kernel/compat_audit.c | 38 - arch/powerpc/kernel/cpu_setup_6xx.S | 3 +- arch/powerpc/kernel/cpu_setup_power4.S | 32 +- arch/powerpc/kernel/cputable.c | 126 +- arch/powerpc/kernel/crash.c | 164 +- arch/powerpc/kernel/crash_dump.c | 11 +- arch/powerpc/kernel/entry_32.S | 1 + arch/powerpc/kernel/entry_64.S | 3 +- arch/powerpc/kernel/firmware.c | 1 + arch/powerpc/kernel/fpu.S | 12 +- arch/powerpc/kernel/head_32.S | 15 +- arch/powerpc/kernel/head_44x.S | 1 + arch/powerpc/kernel/head_4xx.S | 1 + arch/powerpc/kernel/head_64.S | 127 +- arch/powerpc/kernel/head_8xx.S | 1 + arch/powerpc/kernel/head_fsl_booke.S | 1 + arch/powerpc/kernel/ibmebus.c | 9 +- arch/powerpc/kernel/idle.c | 1 + arch/powerpc/kernel/idle_6xx.S | 1 + arch/powerpc/kernel/idle_power4.S | 1 + arch/powerpc/kernel/iomap.c | 2 + arch/powerpc/kernel/iommu.c | 54 +- arch/powerpc/kernel/irq.c | 745 +- arch/powerpc/kernel/kprobes.c | 3 +- arch/powerpc/kernel/l2cr_6xx.S | 1 + arch/powerpc/kernel/legacy_serial.c | 86 +- arch/powerpc/kernel/lparcfg.c | 152 +- arch/powerpc/kernel/machine_kexec.c | 56 - arch/powerpc/kernel/machine_kexec_32.c | 4 +- arch/powerpc/kernel/machine_kexec_64.c | 48 +- arch/powerpc/kernel/misc.S | 204 - arch/powerpc/kernel/misc_32.S | 159 +- arch/powerpc/kernel/misc_64.S | 241 +- arch/powerpc/kernel/nvram_64.c | 2 +- arch/powerpc/kernel/of_device.c | 1 + arch/powerpc/kernel/paca.c | 2 + arch/powerpc/kernel/pci_32.c | 117 +- arch/powerpc/kernel/pci_64.c | 130 +- arch/powerpc/kernel/pci_direct_iommu.c | 18 +- arch/powerpc/kernel/pci_dn.c | 6 - arch/powerpc/kernel/pci_iommu.c | 41 +- arch/powerpc/kernel/perfmon_fsl_booke.c | 1 + arch/powerpc/kernel/pmc.c | 1 + arch/powerpc/kernel/ppc_ksyms.c | 13 +- arch/powerpc/kernel/proc_ppc64.c | 5 +- arch/powerpc/kernel/process.c | 56 +- arch/powerpc/kernel/prom.c | 641 +- arch/powerpc/kernel/prom_init.c | 189 +- arch/powerpc/kernel/prom_parse.c | 474 +- arch/powerpc/kernel/ptrace-common.h | 1 + arch/powerpc/kernel/ptrace.c | 3 + arch/powerpc/kernel/ptrace32.c | 1 + arch/powerpc/kernel/rtas-rtc.c | 30 +- arch/powerpc/kernel/rtas.c | 244 +- arch/powerpc/kernel/rtas_flash.c | 25 +- arch/powerpc/kernel/rtas_pci.c | 21 +- arch/powerpc/kernel/setup-common.c | 23 +- arch/powerpc/kernel/setup.h | 3 - arch/powerpc/kernel/setup_32.c | 23 +- arch/powerpc/kernel/setup_64.c | 69 +- arch/powerpc/kernel/signal_32.c | 24 +- arch/powerpc/kernel/signal_64.c | 17 +- arch/powerpc/kernel/smp-tbsync.c | 6 +- arch/powerpc/kernel/smp.c | 27 +- arch/powerpc/kernel/swsusp_32.S | 1 + arch/powerpc/kernel/sys_ppc32.c | 16 +- arch/powerpc/kernel/sysfs.c | 32 +- arch/powerpc/kernel/systbl.S | 312 +- arch/powerpc/kernel/tau_6xx.c | 1 + arch/powerpc/kernel/time.c | 118 +- arch/powerpc/kernel/traps.c | 93 +- arch/powerpc/kernel/udbg.c | 15 +- arch/powerpc/kernel/udbg_16550.c | 7 +- arch/powerpc/kernel/vdso.c | 58 +- arch/powerpc/kernel/vdso32/Makefile | 3 +- arch/powerpc/kernel/vdso32/cacheflush.S | 1 + arch/powerpc/kernel/vdso32/datapage.S | 1 + arch/powerpc/kernel/vdso32/gettimeofday.S | 1 + arch/powerpc/kernel/vdso32/sigtramp.S | 1 + arch/powerpc/kernel/vdso32/vdso32.lds.S | 1 - arch/powerpc/kernel/vdso64/Makefile | 3 +- arch/powerpc/kernel/vdso64/cacheflush.S | 1 + arch/powerpc/kernel/vdso64/datapage.S | 1 + arch/powerpc/kernel/vdso64/gettimeofday.S | 1 + arch/powerpc/kernel/vdso64/sigtramp.S | 1 + arch/powerpc/kernel/vdso64/vdso64.lds.S | 1 - arch/powerpc/kernel/vector.S | 5 +- arch/powerpc/kernel/vio.c | 334 +- arch/powerpc/kernel/vmlinux.lds.S | 6 +- arch/powerpc/lib/Makefile | 5 +- arch/powerpc/lib/bitops.c | 150 + arch/powerpc/lib/copy_32.S | 1 + arch/powerpc/lib/locks.c | 1 + arch/powerpc/lib/memcpy_64.S | 11 +- arch/powerpc/lib/sstep.c | 1 + arch/powerpc/lib/string.S | 1 + arch/powerpc/math-emu/math.c | 1 + arch/powerpc/mm/44x_mmu.c | 5 +- arch/powerpc/mm/4xx_mmu.c | 1 + arch/powerpc/mm/fault.c | 37 +- arch/powerpc/mm/fsl_booke_mmu.c | 1 + arch/powerpc/mm/hash_low_32.S | 35 + arch/powerpc/mm/hash_low_64.S | 32 +- arch/powerpc/mm/hash_native_64.c | 5 +- arch/powerpc/mm/hash_utils_64.c | 191 +- arch/powerpc/mm/hugetlbpage.c | 2 +- arch/powerpc/mm/init_32.c | 1 + arch/powerpc/mm/init_64.c | 4 +- arch/powerpc/mm/lmb.c | 45 +- arch/powerpc/mm/mem.c | 18 +- arch/powerpc/mm/mmu_context_32.c | 3 +- arch/powerpc/mm/mmu_context_64.c | 6 +- arch/powerpc/mm/numa.c | 19 +- arch/powerpc/mm/pgtable_32.c | 1 + arch/powerpc/mm/pgtable_64.c | 1 + arch/powerpc/mm/ppc_mmu_32.c | 17 +- arch/powerpc/mm/slb.c | 33 +- arch/powerpc/mm/slb_low.S | 18 +- arch/powerpc/mm/stab.c | 5 + arch/powerpc/mm/tlb_32.c | 7 +- arch/powerpc/mm/tlb_64.c | 6 +- arch/powerpc/oprofile/Kconfig | 1 + arch/powerpc/oprofile/Makefile | 4 - arch/powerpc/oprofile/common.c | 8 +- arch/powerpc/oprofile/op_model_power4.c | 37 +- arch/powerpc/platforms/83xx/Kconfig | 11 +- arch/powerpc/platforms/83xx/Makefile | 1 - arch/powerpc/platforms/83xx/misc.c | 1 + arch/powerpc/platforms/83xx/mpc834x_itx.c | 124 - arch/powerpc/platforms/83xx/mpc834x_itx.h | 23 - arch/powerpc/platforms/83xx/mpc834x_sys.c | 57 +- arch/powerpc/platforms/83xx/mpc83xx.h | 1 - arch/powerpc/platforms/83xx/pci.c | 15 +- arch/powerpc/platforms/85xx/Kconfig | 8 +- arch/powerpc/platforms/85xx/Makefile | 1 - arch/powerpc/platforms/85xx/mpc8540_ads.h | 1 + arch/powerpc/platforms/85xx/mpc85xx_ads.c | 163 +- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 324 - arch/powerpc/platforms/85xx/mpc85xx_cds.h | 43 - arch/powerpc/platforms/85xx/pci.c | 6 +- arch/powerpc/platforms/86xx/Kconfig | 32 - arch/powerpc/platforms/86xx/Makefile | 7 - arch/powerpc/platforms/86xx/mpc8641_hpcn.h | 21 - arch/powerpc/platforms/86xx/mpc86xx.h | 30 - arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 471 - arch/powerpc/platforms/86xx/mpc86xx_pcie.c | 173 - arch/powerpc/platforms/86xx/mpc86xx_smp.c | 115 - arch/powerpc/platforms/86xx/pci.c | 205 - arch/powerpc/platforms/Makefile | 2 - arch/powerpc/platforms/cell/Kconfig | 11 +- arch/powerpc/platforms/cell/Makefile | 23 +- arch/powerpc/platforms/cell/cbe_regs.c | 126 - arch/powerpc/platforms/cell/cbe_regs.h | 129 - arch/powerpc/platforms/cell/interrupt.c | 444 +- arch/powerpc/platforms/cell/interrupt.h | 19 +- arch/powerpc/platforms/cell/iommu.c | 18 +- arch/powerpc/platforms/cell/pervasive.c | 105 +- arch/powerpc/platforms/cell/pervasive.h | 37 +- arch/powerpc/platforms/cell/ras.c | 111 - arch/powerpc/platforms/cell/ras.h | 9 - arch/powerpc/platforms/cell/setup.c | 53 +- arch/powerpc/platforms/cell/smp.c | 1 + arch/powerpc/platforms/cell/spider-pic.c | 400 +- arch/powerpc/platforms/cell/spu_base.c | 304 +- arch/powerpc/platforms/cell/spu_callbacks.c | 314 +- arch/powerpc/platforms/cell/spu_priv1.c | 133 + arch/powerpc/platforms/cell/spu_priv1_mmio.c | 159 - arch/powerpc/platforms/cell/spufs/Makefile | 14 +- .../platforms/cell/spufs/backing_ops.c | 1 + arch/powerpc/platforms/cell/spufs/context.c | 12 +- arch/powerpc/platforms/cell/spufs/file.c | 79 +- arch/powerpc/platforms/cell/spufs/hw_ops.c | 2 +- arch/powerpc/platforms/cell/spufs/inode.c | 39 +- arch/powerpc/platforms/cell/spufs/sched.c | 4 +- .../cell/spufs/spu_restore_dump.h_shipped | 1122 +- .../cell/spufs/spu_save_dump.h_shipped | 922 +- arch/powerpc/platforms/cell/spufs/switch.c | 59 +- arch/powerpc/platforms/chrp/pci.c | 16 +- arch/powerpc/platforms/chrp/setup.c | 114 +- arch/powerpc/platforms/chrp/smp.c | 2 + arch/powerpc/platforms/embedded6xx/Kconfig | 16 - arch/powerpc/platforms/embedded6xx/Makefile | 4 - .../platforms/embedded6xx/mpc7448_hpc2.c | 309 - .../platforms/embedded6xx/mpc7448_hpc2.h | 26 - arch/powerpc/platforms/iseries/Makefile | 6 +- arch/powerpc/platforms/iseries/call_pci.h | 19 - arch/powerpc/platforms/iseries/dt.c | 617 - arch/powerpc/platforms/iseries/htab.c | 4 +- arch/powerpc/platforms/iseries/iommu.c | 46 +- .../powerpc/platforms}/iseries/iommu.h | 6 +- arch/powerpc/platforms/iseries/irq.c | 117 +- arch/powerpc/platforms/iseries/irq.h | 4 +- arch/powerpc/platforms/iseries/lpardata.c | 1 + arch/powerpc/platforms/iseries/lpevents.c | 55 +- arch/powerpc/platforms/iseries/mf.c | 9 +- arch/powerpc/platforms/iseries/pci.c | 347 +- arch/powerpc/platforms/iseries/proc.c | 1 + arch/powerpc/platforms/iseries/setup.c | 297 +- arch/powerpc/platforms/iseries/setup.h | 2 - arch/powerpc/platforms/iseries/smp.c | 1 + arch/powerpc/platforms/iseries/vio.c | 131 + arch/powerpc/platforms/maple/pci.c | 25 +- arch/powerpc/platforms/maple/setup.c | 113 +- arch/powerpc/platforms/maple/time.c | 1 + arch/powerpc/platforms/powermac/backlight.c | 336 +- arch/powerpc/platforms/powermac/bootx_init.c | 76 +- arch/powerpc/platforms/powermac/cache.S | 1 + arch/powerpc/platforms/powermac/cpufreq_32.c | 7 +- arch/powerpc/platforms/powermac/cpufreq_64.c | 81 +- arch/powerpc/platforms/powermac/feature.c | 3 +- arch/powerpc/platforms/powermac/low_i2c.c | 10 +- arch/powerpc/platforms/powermac/nvram.c | 10 +- arch/powerpc/platforms/powermac/pci.c | 83 +- arch/powerpc/platforms/powermac/pfunc_base.c | 16 +- arch/powerpc/platforms/powermac/pfunc_core.c | 17 +- arch/powerpc/platforms/powermac/pic.c | 427 +- arch/powerpc/platforms/powermac/pmac.h | 2 - arch/powerpc/platforms/powermac/setup.c | 15 +- arch/powerpc/platforms/powermac/sleep.S | 1 + arch/powerpc/platforms/powermac/smp.c | 3 +- arch/powerpc/platforms/powermac/time.c | 1 + arch/powerpc/platforms/powermac/udbg_adb.c | 1 + arch/powerpc/platforms/powermac/udbg_scc.c | 1 + arch/powerpc/platforms/pseries/Makefile | 5 +- arch/powerpc/platforms/pseries/eeh_cache.c | 4 +- arch/powerpc/platforms/pseries/eeh_driver.c | 57 +- arch/powerpc/platforms/pseries/eeh_event.c | 52 +- arch/powerpc/platforms/pseries/iommu.c | 216 +- arch/powerpc/platforms/pseries/lpar.c | 5 +- arch/powerpc/platforms/pseries/ras.c | 81 +- arch/powerpc/platforms/pseries/rtasd.c | 6 +- arch/powerpc/platforms/pseries/scanlog.c | 6 +- arch/powerpc/platforms/pseries/setup.c | 269 +- arch/powerpc/platforms/pseries/smp.c | 33 +- arch/powerpc/platforms/pseries/vio.c | 274 + arch/powerpc/platforms/pseries/xics.c | 730 +- arch/powerpc/platforms/pseries/xics.h | 17 +- arch/powerpc/sysdev/Makefile | 13 +- arch/powerpc/sysdev/dart.h | 6 +- arch/powerpc/sysdev/dart_iommu.c | 57 +- arch/powerpc/sysdev/fsl_soc.c | 109 +- arch/powerpc/sysdev/i8259.c | 163 +- arch/powerpc/sysdev/ipic.c | 303 +- arch/powerpc/sysdev/ipic.h | 23 +- arch/powerpc/sysdev/mmio_nvram.c | 2 +- arch/powerpc/sysdev/mpic.c | 768 +- arch/powerpc/sysdev/todc.c | 392 - arch/powerpc/sysdev/tsi108_dev.c | 146 - arch/powerpc/sysdev/tsi108_pci.c | 415 - arch/powerpc/xmon/xmon.c | 4 + arch/ppc/4xx_io/serial_sicc.c | 3 +- arch/ppc/8260_io/fcc_enet.c | 3 +- arch/ppc/8xx_io/commproc.c | 2 +- arch/ppc/8xx_io/cs4218.h | 1 + arch/ppc/8xx_io/cs4218_tdm.c | 1 + arch/ppc/8xx_io/enet.c | 1 + arch/ppc/8xx_io/fec.c | 1 + arch/ppc/8xx_io/micropatch.c | 1 + arch/ppc/Kconfig | 8 +- arch/ppc/amiga/amiints.c | 1 + arch/ppc/amiga/config.c | 1 + arch/ppc/amiga/time.c | 1 + arch/ppc/boot/common/crt0.S | 1 + arch/ppc/boot/common/misc-common.c | 1 + arch/ppc/boot/common/ns16550.c | 1 + arch/ppc/boot/lib/Makefile | 2 +- arch/ppc/boot/simple/embed_config.c | 1 + arch/ppc/boot/simple/head.S | 1 + arch/ppc/boot/simple/m8xx_tty.c | 1 + arch/ppc/boot/simple/misc-chestnut.c | 1 + arch/ppc/boot/simple/misc-embedded.c | 1 + arch/ppc/boot/simple/misc-ev64260.c | 1 + arch/ppc/boot/simple/misc-ev64360.c | 1 + arch/ppc/boot/simple/misc-katana.c | 1 + arch/ppc/boot/simple/misc-mv64x60.c | 1 + arch/ppc/boot/simple/misc-prep.c | 1 + arch/ppc/boot/simple/misc-spruce.c | 1 + arch/ppc/boot/simple/misc.c | 1 + arch/ppc/boot/simple/mpc52xx_tty.c | 1 + arch/ppc/boot/simple/mv64x60_tty.c | 1 + arch/ppc/boot/simple/openbios.c | 1 + arch/ppc/boot/simple/pibs.c | 1 + arch/ppc/boot/simple/relocate.S | 1 + arch/ppc/configs/prep_defconfig | 585 +- arch/ppc/kernel/asm-offsets.c | 1 + arch/ppc/kernel/cpu_setup_power4.S | 1 + arch/ppc/kernel/dma-mapping.c | 1 + arch/ppc/kernel/entry.S | 1 + arch/ppc/kernel/head.S | 1 + arch/ppc/kernel/head_44x.S | 1 + arch/ppc/kernel/head_4xx.S | 1 + arch/ppc/kernel/head_8xx.S | 1 + arch/ppc/kernel/head_fsl_booke.S | 1 + arch/ppc/kernel/machine_kexec.c | 4 +- arch/ppc/kernel/misc.S | 1 + arch/ppc/kernel/pci.c | 54 +- arch/ppc/kernel/ppc-stub.c | 1 + arch/ppc/kernel/ppc_htab.c | 1 + arch/ppc/kernel/ppc_ksyms.c | 5 +- arch/ppc/kernel/setup.c | 5 +- arch/ppc/kernel/smp-tbsync.c | 8 +- arch/ppc/kernel/smp.c | 1 + arch/ppc/kernel/time.c | 1 + arch/ppc/kernel/traps.c | 19 +- arch/ppc/kernel/vmlinux.lds.S | 1 - arch/ppc/lib/locks.c | 1 + arch/ppc/lib/string.S | 1 + arch/ppc/mm/44x_mmu.c | 1 + arch/ppc/mm/4xx_mmu.c | 1 + arch/ppc/mm/fault.c | 1 + arch/ppc/mm/fsl_booke_mmu.c | 1 + arch/ppc/mm/hashtable.S | 1 + arch/ppc/mm/init.c | 3 +- arch/ppc/mm/mem_pieces.c | 1 + arch/ppc/mm/mmu_context.c | 3 +- arch/ppc/mm/pgtable.c | 1 + arch/ppc/mm/ppc_mmu.c | 1 + arch/ppc/mm/tlb.c | 7 +- arch/ppc/platforms/4xx/Kconfig | 2 +- arch/ppc/platforms/4xx/bamboo.c | 1 + arch/ppc/platforms/4xx/bamboo.h | 1 + arch/ppc/platforms/4xx/bubinga.c | 1 + arch/ppc/platforms/4xx/bubinga.h | 1 + arch/ppc/platforms/4xx/cpci405.c | 140 +- arch/ppc/platforms/4xx/cpci405.h | 31 +- arch/ppc/platforms/4xx/ebony.c | 1 + arch/ppc/platforms/4xx/ebony.h | 1 + arch/ppc/platforms/4xx/ep405.c | 1 + arch/ppc/platforms/4xx/ibm405ep.c | 1 + arch/ppc/platforms/4xx/ibm405ep.h | 1 + arch/ppc/platforms/4xx/ibm405gp.c | 1 + arch/ppc/platforms/4xx/ibm405gp.h | 1 + arch/ppc/platforms/4xx/ibm405gpr.c | 1 + arch/ppc/platforms/4xx/ibm405gpr.h | 1 + arch/ppc/platforms/4xx/ibm440ep.h | 1 + arch/ppc/platforms/4xx/ibm440gp.h | 1 + arch/ppc/platforms/4xx/ibm440gx.h | 1 + arch/ppc/platforms/4xx/ibm440sp.h | 1 + arch/ppc/platforms/4xx/ibmnp405h.c | 1 + arch/ppc/platforms/4xx/ibmnp405h.h | 1 + arch/ppc/platforms/4xx/ibmstb4.h | 1 + arch/ppc/platforms/4xx/ibmstbx25.h | 1 + arch/ppc/platforms/4xx/luan.c | 1 + arch/ppc/platforms/4xx/luan.h | 1 + arch/ppc/platforms/4xx/ocotea.c | 1 + arch/ppc/platforms/4xx/ocotea.h | 1 + arch/ppc/platforms/4xx/ppc440spe.h | 1 + arch/ppc/platforms/4xx/redwood5.c | 1 + arch/ppc/platforms/4xx/redwood6.c | 1 + arch/ppc/platforms/4xx/sycamore.c | 1 + arch/ppc/platforms/4xx/sycamore.h | 1 + arch/ppc/platforms/4xx/walnut.c | 1 + arch/ppc/platforms/4xx/walnut.h | 1 + arch/ppc/platforms/4xx/xilinx_ml300.c | 1 + arch/ppc/platforms/4xx/xilinx_ml403.c | 1 + .../platforms/4xx/xparameters/xparameters.h | 1 + arch/ppc/platforms/4xx/yucca.c | 1 + arch/ppc/platforms/4xx/yucca.h | 1 + arch/ppc/platforms/83xx/mpc834x_sys.c | 1 + arch/ppc/platforms/83xx/mpc834x_sys.h | 1 + arch/ppc/platforms/85xx/mpc8540_ads.c | 1 + arch/ppc/platforms/85xx/mpc8540_ads.h | 1 + arch/ppc/platforms/85xx/mpc8555_cds.h | 1 + arch/ppc/platforms/85xx/mpc8560_ads.c | 92 +- arch/ppc/platforms/85xx/mpc8560_ads.h | 1 + arch/ppc/platforms/85xx/mpc85xx_ads_common.c | 1 + arch/ppc/platforms/85xx/mpc85xx_ads_common.h | 20 +- arch/ppc/platforms/85xx/mpc85xx_cds_common.c | 12 +- arch/ppc/platforms/85xx/mpc85xx_cds_common.h | 1 + arch/ppc/platforms/85xx/sbc8560.c | 1 + arch/ppc/platforms/85xx/sbc8560.h | 1 + arch/ppc/platforms/85xx/sbc85xx.c | 1 + arch/ppc/platforms/85xx/sbc85xx.h | 1 + arch/ppc/platforms/85xx/stx_gp3.c | 3 +- arch/ppc/platforms/85xx/stx_gp3.h | 1 + arch/ppc/platforms/85xx/tqm85xx.c | 3 +- arch/ppc/platforms/85xx/tqm85xx.h | 1 + arch/ppc/platforms/apus_pci.c | 1 + arch/ppc/platforms/apus_setup.c | 5 +- arch/ppc/platforms/ccm.h | 1 + arch/ppc/platforms/chestnut.c | 1 + arch/ppc/platforms/cpci690.c | 1 + arch/ppc/platforms/ev64260.c | 1 + arch/ppc/platforms/ev64360.c | 1 + arch/ppc/platforms/fads.h | 1 + arch/ppc/platforms/gemini_prom.S | 1 + arch/ppc/platforms/gemini_serial.h | 1 + arch/ppc/platforms/gemini_setup.c | 1 + arch/ppc/platforms/hdpu.c | 5 +- arch/ppc/platforms/hermes.h | 1 + arch/ppc/platforms/ip860.h | 1 + arch/ppc/platforms/ivms8.h | 1 + arch/ppc/platforms/katana.c | 1 + arch/ppc/platforms/lantec.h | 1 + arch/ppc/platforms/lite5200.c | 1 + arch/ppc/platforms/lopec.c | 1 + arch/ppc/platforms/lwmon.h | 1 + arch/ppc/platforms/mpc8272ads_setup.c | 154 +- arch/ppc/platforms/mpc866ads_setup.c | 193 +- arch/ppc/platforms/mpc885ads.h | 1 + arch/ppc/platforms/mpc885ads_setup.c | 176 +- arch/ppc/platforms/mvme5100.c | 1 + arch/ppc/platforms/pal4_setup.c | 1 + arch/ppc/platforms/pcu_e.h | 1 + arch/ppc/platforms/powerpmc250.c | 1 + arch/ppc/platforms/pplus.c | 1 + arch/ppc/platforms/pq2ads.h | 1 + arch/ppc/platforms/pq2ads_pd.h | 82 + arch/ppc/platforms/prep_pci.c | 1 + arch/ppc/platforms/prep_setup.c | 3 +- arch/ppc/platforms/prpmc750.c | 1 + arch/ppc/platforms/prpmc800.c | 1 + arch/ppc/platforms/radstone_ppc7d.c | 3 +- arch/ppc/platforms/rpxclassic.h | 1 + arch/ppc/platforms/rpxlite.h | 1 + arch/ppc/platforms/sandpoint.c | 1 + arch/ppc/platforms/sbc82xx.c | 5 +- arch/ppc/platforms/spruce.c | 1 + arch/ppc/platforms/tqm8260.h | 1 + arch/ppc/platforms/tqm8xx.h | 1 + arch/ppc/syslib/Makefile | 4 +- arch/ppc/syslib/btext.c | 3 +- arch/ppc/syslib/cpc700_pic.c | 4 +- arch/ppc/syslib/cpm2_pic.c | 2 +- arch/ppc/syslib/gen550_dbg.c | 1 + arch/ppc/syslib/gen550_kgdb.c | 1 + arch/ppc/syslib/gt64260_pic.c | 8 +- arch/ppc/syslib/i8259.c | 212 - arch/ppc/syslib/ibm440gp_common.c | 1 + arch/ppc/syslib/ibm440gp_common.h | 1 + arch/ppc/syslib/ibm440gx_common.c | 3 +- arch/ppc/syslib/ibm440gx_common.h | 1 + arch/ppc/syslib/ibm440sp_common.c | 1 + arch/ppc/syslib/ibm44x_common.c | 1 + arch/ppc/syslib/ipic.c | 646 - arch/ppc/syslib/ipic.h | 47 - arch/ppc/syslib/m8260_pci_erratum9.c | 1 + arch/ppc/syslib/m8260_setup.c | 1 + arch/ppc/syslib/m82xx_pci.c | 4 +- arch/ppc/syslib/m8xx_setup.c | 5 +- arch/ppc/syslib/mpc52xx_pci.c | 1 + arch/ppc/syslib/mpc52xx_pic.c | 4 +- arch/ppc/syslib/mpc52xx_setup.c | 1 + arch/ppc/syslib/mpc83xx_devices.c | 6 +- arch/ppc/syslib/mpc85xx_devices.c | 89 +- arch/ppc/syslib/mpc8xx_devices.c | 8 - arch/ppc/syslib/mpc8xx_sys.c | 6 +- arch/ppc/syslib/mv64360_pic.c | 10 +- arch/ppc/syslib/mv64x60_dbg.c | 1 + arch/ppc/syslib/ocp.c | 1 + arch/ppc/syslib/open_pic.c | 24 +- arch/ppc/syslib/open_pic2.c | 3 +- arch/ppc/syslib/ppc403_pic.c | 2 +- arch/ppc/syslib/ppc440spe_pcie.c | 1 + arch/ppc/syslib/ppc4xx_dma.c | 1 + arch/ppc/syslib/ppc4xx_pic.c | 3 +- arch/ppc/syslib/ppc4xx_setup.c | 1 + arch/ppc/syslib/ppc4xx_sgdma.c | 1 + arch/ppc/syslib/ppc83xx_setup.c | 1 + arch/ppc/syslib/ppc83xx_setup.h | 1 + arch/ppc/syslib/ppc85xx_common.c | 1 + arch/ppc/syslib/ppc85xx_common.h | 1 + arch/ppc/syslib/ppc85xx_rio.c | 1 + arch/ppc/syslib/ppc85xx_rio.h | 1 + arch/ppc/syslib/ppc85xx_setup.c | 1 + arch/ppc/syslib/ppc85xx_setup.h | 1 + arch/ppc/syslib/ppc8xx_pic.c | 1 + arch/ppc/syslib/ppc8xx_pic.h | 1 + arch/ppc/syslib/pq2_devices.c | 5 - arch/ppc/syslib/pq2_sys.c | 3 +- arch/ppc/syslib/qspan_pci.c | 1 + arch/ppc/syslib/xilinx_pic.c | 2 +- arch/ppc/xmon/privinst.h | 1 + arch/ppc/xmon/start.c | 1 + arch/ppc/xmon/xmon.c | 1 + arch/s390/Kconfig | 29 +- arch/s390/Kconfig.debug | 4 - arch/s390/Makefile | 7 +- arch/s390/appldata/appldata.h | 24 +- arch/s390/appldata/appldata_base.c | 50 +- arch/s390/appldata/appldata_mem.c | 29 +- arch/s390/appldata/appldata_net_sum.c | 6 +- arch/s390/appldata/appldata_os.c | 99 +- arch/s390/crypto/aes_s390.c | 14 +- arch/s390/crypto/des_s390.c | 42 +- arch/s390/crypto/sha1_s390.c | 34 +- arch/s390/crypto/sha256_s390.c | 14 +- arch/s390/defconfig | 44 +- arch/s390/hypfs/Makefile | 7 - arch/s390/hypfs/hypfs.h | 30 - arch/s390/hypfs/hypfs_diag.c | 696 - arch/s390/hypfs/hypfs_diag.h | 16 - arch/s390/hypfs/inode.c | 490 - arch/s390/kernel/Makefile | 7 +- arch/s390/kernel/asm-offsets.c | 1 + arch/s390/kernel/audit.c | 66 - arch/s390/kernel/binfmt_elf32.c | 6 + arch/s390/kernel/compat_audit.c | 38 - arch/s390/kernel/compat_linux.c | 25 +- arch/s390/kernel/compat_linux.h | 1 + arch/s390/kernel/compat_signal.c | 1 + arch/s390/kernel/debug.c | 3 +- arch/s390/kernel/entry.S | 119 +- arch/s390/kernel/entry64.S | 103 +- arch/s390/kernel/head.S | 23 +- arch/s390/kernel/head31.S | 77 +- arch/s390/kernel/head64.S | 79 +- arch/s390/kernel/irq.c | 8 + arch/s390/kernel/machine_kexec.c | 5 +- arch/s390/kernel/module.c | 2 +- arch/s390/kernel/process.c | 4 +- arch/s390/kernel/profile.c | 2 +- arch/s390/kernel/s390_ext.c | 2 +- arch/s390/kernel/s390_ksyms.c | 3 + arch/s390/kernel/setup.c | 117 +- arch/s390/kernel/signal.c | 1 + arch/s390/kernel/smp.c | 2 +- arch/s390/kernel/stacktrace.c | 89 - arch/s390/kernel/time.c | 3 +- arch/s390/kernel/traps.c | 27 +- arch/s390/kernel/vmlinux.lds.S | 1 + arch/s390/kernel/vtime.c | 3 +- arch/s390/lib/Makefile | 1 - arch/s390/lib/delay.c | 1 + arch/s390/lib/div64.c | 151 - arch/s390/lib/string.c | 4 +- arch/s390/lib/uaccess.S | 45 +- arch/s390/lib/uaccess64.S | 47 +- arch/s390/math-emu/math.c | 1 + arch/s390/mm/cmm.c | 3 +- arch/s390/mm/fault.c | 3 +- arch/s390/mm/init.c | 42 +- arch/sh/Kconfig | 4 +- arch/sh/Makefile | 4 +- arch/sh/boards/adx/irq_maskreg.c | 3 +- arch/sh/boards/bigsur/io.c | 1 + arch/sh/boards/bigsur/irq.c | 5 +- arch/sh/boards/bigsur/led.c | 1 + arch/sh/boards/bigsur/setup.c | 1 + arch/sh/boards/cat68701/setup.c | 1 + arch/sh/boards/cqreek/irq.c | 4 +- arch/sh/boards/cqreek/setup.c | 1 + arch/sh/boards/dreamcast/setup.c | 2 +- arch/sh/boards/ec3104/setup.c | 2 +- arch/sh/boards/harp/irq.c | 3 +- arch/sh/boards/harp/led.c | 1 + arch/sh/boards/harp/setup.c | 1 + arch/sh/boards/hp6xx/setup.c | 1 + arch/sh/boards/mpc1211/led.c | 1 + arch/sh/boards/mpc1211/pci.c | 5 +- arch/sh/boards/mpc1211/setup.c | 3 +- arch/sh/boards/overdrive/fpga.c | 1 + arch/sh/boards/overdrive/galileo.c | 3 +- arch/sh/boards/overdrive/io.c | 1 + arch/sh/boards/overdrive/irq.c | 3 +- arch/sh/boards/overdrive/led.c | 1 + arch/sh/boards/overdrive/setup.c | 1 + arch/sh/boards/renesas/edosk7705/setup.c | 1 + arch/sh/boards/renesas/hs7751rvoip/io.c | 1 + arch/sh/boards/renesas/hs7751rvoip/irq.c | 3 +- arch/sh/boards/renesas/hs7751rvoip/led.c | 1 + arch/sh/boards/renesas/hs7751rvoip/mach.c | 1 + arch/sh/boards/renesas/hs7751rvoip/pci.c | 1 + arch/sh/boards/renesas/hs7751rvoip/setup.c | 1 + arch/sh/boards/renesas/rts7751r2d/irq.c | 3 +- arch/sh/boards/renesas/rts7751r2d/led.c | 1 + arch/sh/boards/renesas/rts7751r2d/mach.c | 1 + arch/sh/boards/renesas/systemh/irq.c | 3 +- arch/sh/boards/se/7300/io.c | 1 + arch/sh/boards/se/7300/irq.c | 1 + arch/sh/boards/se/7300/led.c | 1 + arch/sh/boards/se/7300/setup.c | 1 + arch/sh/boards/se/73180/io.c | 1 + arch/sh/boards/se/73180/irq.c | 3 +- arch/sh/boards/se/73180/led.c | 1 + arch/sh/boards/se/73180/setup.c | 1 + arch/sh/boards/se/770x/irq.c | 1 + arch/sh/boards/se/770x/led.c | 1 + arch/sh/boards/se/770x/mach.c | 1 + arch/sh/boards/se/770x/setup.c | 1 + arch/sh/boards/se/7751/irq.c | 1 + arch/sh/boards/se/7751/led.c | 1 + arch/sh/boards/se/7751/mach.c | 1 + arch/sh/boards/se/7751/pci.c | 1 + arch/sh/boards/se/7751/setup.c | 1 + arch/sh/boards/sh03/led.c | 1 + arch/sh/boards/sh03/setup.c | 1 + arch/sh/boards/sh2000/setup.c | 1 + arch/sh/boards/snapgear/setup.c | 3 +- arch/sh/boards/superh/microdev/io.c | 1 + arch/sh/boards/superh/microdev/irq.c | 3 +- arch/sh/boards/superh/microdev/led.c | 1 + arch/sh/boards/superh/microdev/setup.c | 1 + arch/sh/boards/unknown/setup.c | 1 + arch/sh/boot/compressed/head.S | 1 + arch/sh/boot/compressed/misc.c | 1 + arch/sh/cchips/hd6446x/hd64461/io.c | 1 + arch/sh/cchips/hd6446x/hd64461/setup.c | 5 +- arch/sh/cchips/hd6446x/hd64465/gpio.c | 2 +- arch/sh/cchips/hd6446x/hd64465/io.c | 1 + arch/sh/cchips/hd6446x/hd64465/setup.c | 5 +- arch/sh/cchips/voyagergx/irq.c | 5 +- arch/sh/drivers/dma/dma-g2.c | 2 +- arch/sh/drivers/dma/dma-pvr2.c | 2 +- arch/sh/drivers/dma/dma-sh.c | 5 +- arch/sh/drivers/pci/dma-dreamcast.c | 1 + arch/sh/drivers/pci/fixups-dreamcast.c | 1 + arch/sh/drivers/pci/ops-bigsur.c | 1 + arch/sh/drivers/pci/ops-dreamcast.c | 1 + arch/sh/drivers/pci/ops-rts7751r2d.c | 1 + arch/sh/drivers/pci/ops-sh03.c | 1 + arch/sh/drivers/pci/ops-snapgear.c | 1 + arch/sh/drivers/pci/pci-sh7751.c | 1 + arch/sh/drivers/pci/pci-st40.c | 3 +- arch/sh/drivers/pci/pci.c | 6 +- arch/sh/kernel/cf-enabler.c | 1 + arch/sh/kernel/cpu/irq/imask.c | 2 +- arch/sh/kernel/cpu/irq/intc2.c | 2 +- arch/sh/kernel/cpu/irq/ipr.c | 3 +- arch/sh/kernel/cpu/irq/pint.c | 3 +- arch/sh/kernel/cpu/sh3/ex.S | 1 + arch/sh/kernel/cpu/sh4/ex.S | 1 + arch/sh/kernel/cpu/sh4/sq.c | 12 +- arch/sh/kernel/entry.S | 1 + arch/sh/kernel/irq.c | 2 +- arch/sh/kernel/machine_kexec.c | 4 +- arch/sh/kernel/process.c | 1 - arch/sh/kernel/ptrace.c | 1 + arch/sh/kernel/relocate_kernel.S | 1 + arch/sh/kernel/setup.c | 4 +- arch/sh/kernel/sh_ksyms.c | 1 + arch/sh/kernel/smp.c | 1 + arch/sh/kernel/time.c | 1 + arch/sh/kernel/timers/timer-tmu.c | 2 +- arch/sh/kernel/traps.c | 1 + arch/sh/kernel/vmlinux.lds.S | 1 + arch/sh/lib/memcpy-sh4.S | 1 + arch/sh/mm/cache-sh4.c | 1 + arch/sh/mm/clear_page.S | 1 + arch/sh/mm/extable.c | 1 + arch/sh/mm/hugetlbpage.c | 1 + arch/sh/mm/init.c | 1 + arch/sh/mm/pg-sh4.c | 1 + arch/sh/oprofile/op_model_sh7750.c | 2 +- arch/sh64/Makefile | 1 + arch/sh64/boot/compressed/misc.c | 1 + arch/sh64/boot/compressed/vmlinux.lds.S | 1 + arch/sh64/kernel/alphanum.c | 1 + arch/sh64/kernel/dma.c | 4 +- arch/sh64/kernel/entry.S | 1 + arch/sh64/kernel/head.S | 1 + arch/sh64/kernel/irq.c | 3 +- arch/sh64/kernel/irq_intc.c | 5 +- arch/sh64/kernel/led.c | 1 + arch/sh64/kernel/pci_sh5.c | 5 +- arch/sh64/kernel/pcibios.c | 4 +- arch/sh64/kernel/process.c | 4 +- arch/sh64/kernel/ptrace.c | 1 + arch/sh64/kernel/setup.c | 5 +- arch/sh64/kernel/sh_ksyms.c | 3 +- arch/sh64/kernel/signal.c | 2 +- arch/sh64/kernel/time.c | 5 +- arch/sh64/kernel/vmlinux.lds.S | 1 + arch/sh64/lib/c-checksum.c | 1 + arch/sh64/lib/dbg.c | 1 + arch/sh64/lib/io.c | 1 + arch/sh64/lib/iomap.c | 1 + arch/sh64/lib/memcpy.c | 1 + arch/sh64/lib/udelay.c | 1 + arch/sh64/mach-cayman/iomap.c | 1 + arch/sh64/mach-cayman/irq.c | 7 +- arch/sh64/mach-cayman/setup.c | 7 +- arch/sh64/mach-harp/setup.c | 1 + arch/sh64/mach-romram/setup.c | 1 + arch/sh64/mach-sim/setup.c | 1 + arch/sh64/mm/cache.c | 1 + arch/sh64/mm/extable.c | 1 + arch/sh64/mm/hugetlbpage.c | 1 + arch/sh64/mm/ioremap.c | 4 +- arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/asm-offsets.c | 1 + arch/sparc/kernel/auxio.c | 1 + arch/sparc/kernel/cpu.c | 1 + arch/sparc/kernel/devices.c | 26 +- arch/sparc/kernel/ebus.c | 186 +- arch/sparc/kernel/entry.S | 4 +- arch/sparc/kernel/head.S | 1 + arch/sparc/kernel/idprom.c | 1 + arch/sparc/kernel/ioport.c | 157 +- arch/sparc/kernel/irq.c | 17 +- arch/sparc/kernel/of_device.c | 823 - arch/sparc/kernel/pcic.c | 16 +- arch/sparc/kernel/process.c | 1 + arch/sparc/kernel/prom.c | 577 - arch/sparc/kernel/setup.c | 39 +- arch/sparc/kernel/signal.c | 1 + arch/sparc/kernel/smp.c | 133 +- arch/sparc/kernel/sparc_ksyms.c | 3 + arch/sparc/kernel/sun4c_irq.c | 6 +- arch/sparc/kernel/sun4d_irq.c | 25 +- arch/sparc/kernel/sun4d_smp.c | 105 +- arch/sparc/kernel/sun4m_irq.c | 11 +- arch/sparc/kernel/sun4m_smp.c | 11 +- arch/sparc/kernel/sys_solaris.c | 1 + arch/sparc/kernel/sys_sparc.c | 22 +- arch/sparc/kernel/sys_sunos.c | 18 +- arch/sparc/kernel/systbls.S | 1 + arch/sparc/kernel/tick14.c | 2 +- arch/sparc/kernel/time.c | 178 +- arch/sparc/kernel/traps.c | 1 + arch/sparc/lib/Makefile | 2 - arch/sparc/lib/atomic.S | 1 + arch/sparc/lib/bitops.S | 1 + arch/sparc/lib/iomap.c | 48 - arch/sparc/lib/rwsem.S | 1 + arch/sparc/mm/btfixup.c | 1 + arch/sparc/mm/extable.c | 1 + arch/sparc/mm/hypersparc.S | 1 + arch/sparc/mm/init.c | 3 +- arch/sparc/mm/io-unit.c | 2 +- arch/sparc/mm/iommu.c | 1 + arch/sparc/mm/srmmu.c | 1 + arch/sparc/mm/sun4c.c | 1 + arch/sparc/mm/swift.S | 1 + arch/sparc/mm/tsunami.S | 1 + arch/sparc/mm/viking.S | 1 + arch/sparc/prom/init.c | 1 + arch/sparc/prom/memory.c | 1 + arch/sparc/prom/misc.c | 1 + arch/sparc/prom/tree.c | 18 + arch/sparc64/Kconfig | 10 +- arch/sparc64/defconfig | 72 +- arch/sparc64/kernel/Makefile | 5 +- arch/sparc64/kernel/audit.c | 66 - arch/sparc64/kernel/auxio.c | 97 +- arch/sparc64/kernel/binfmt_elf32.c | 1 + arch/sparc64/kernel/central.c | 131 +- arch/sparc64/kernel/chmc.c | 69 +- arch/sparc64/kernel/compat_audit.c | 37 - arch/sparc64/kernel/cpu.c | 1 + arch/sparc64/kernel/devices.c | 251 +- arch/sparc64/kernel/ebus.c | 276 +- arch/sparc64/kernel/entry.S | 17 +- arch/sparc64/kernel/etrap.S | 1 + arch/sparc64/kernel/head.S | 14 +- arch/sparc64/kernel/irq.c | 1087 +- arch/sparc64/kernel/isa.c | 230 +- arch/sparc64/kernel/kprobes.c | 1 + arch/sparc64/kernel/ktlb.S | 1 + arch/sparc64/kernel/of_device.c | 1032 - arch/sparc64/kernel/pci.c | 96 +- arch/sparc64/kernel/pci_common.c | 429 +- arch/sparc64/kernel/pci_impl.h | 3 +- arch/sparc64/kernel/pci_iommu.c | 2 +- arch/sparc64/kernel/pci_psycho.c | 354 +- arch/sparc64/kernel/pci_sabre.c | 447 +- arch/sparc64/kernel/pci_schizo.c | 586 +- arch/sparc64/kernel/pci_sun4v.c | 200 +- arch/sparc64/kernel/power.c | 99 +- arch/sparc64/kernel/process.c | 2 + arch/sparc64/kernel/prom.c | 1577 - arch/sparc64/kernel/rtrap.S | 1 + arch/sparc64/kernel/sbus.c | 122 +- arch/sparc64/kernel/setup.c | 9 +- arch/sparc64/kernel/signal.c | 1 + arch/sparc64/kernel/smp.c | 41 +- arch/sparc64/kernel/sparc64_ksyms.c | 19 +- arch/sparc64/kernel/starfire.c | 4 +- arch/sparc64/kernel/sun4v_ivec.S | 15 +- arch/sparc64/kernel/sys32.S | 1 + arch/sparc64/kernel/sys_sparc.c | 23 +- arch/sparc64/kernel/sys_sparc32.c | 6 +- arch/sparc64/kernel/sys_sunos32.c | 14 +- arch/sparc64/kernel/systbls.S | 1 + arch/sparc64/kernel/time.c | 330 +- arch/sparc64/kernel/traps.c | 23 +- arch/sparc64/kernel/tsb.S | 1 + arch/sparc64/kernel/ttable.S | 11 +- arch/sparc64/kernel/unaligned.c | 11 - arch/sparc64/lib/atomic.S | 1 + arch/sparc64/lib/bitops.S | 1 + arch/sparc64/lib/mcount.S | 1 + arch/sparc64/mm/fault.c | 39 +- arch/sparc64/mm/hugetlbpage.c | 1 + arch/sparc64/mm/init.c | 60 +- arch/sparc64/mm/ultra.S | 1 + arch/sparc64/prom/misc.c | 1 + arch/sparc64/prom/tree.c | 85 + arch/sparc64/solaris/fs.c | 11 +- arch/sparc64/solaris/misc.c | 38 +- arch/sparc64/solaris/socksys.c | 4 + arch/um/Kconfig | 5 - arch/um/Kconfig.debug | 10 + arch/um/Makefile-x86_64 | 10 +- arch/um/defconfig | 1 + arch/um/drivers/harddog_kern.c | 1 + arch/um/drivers/hostaudio_kern.c | 1 + arch/um/drivers/line.c | 8 +- arch/um/drivers/mconsole_kern.c | 5 +- arch/um/drivers/mconsole_user.c | 7 +- arch/um/drivers/net_kern.c | 3 +- arch/um/drivers/net_user.c | 80 +- arch/um/drivers/port_kern.c | 4 +- arch/um/drivers/slip_kern.c | 1 + arch/um/drivers/ssl.c | 2 + arch/um/drivers/stderr_console.c | 22 +- arch/um/drivers/stdio_console.c | 2 + arch/um/drivers/tty.c | 31 +- arch/um/drivers/ubd_kern.c | 24 +- arch/um/drivers/xterm_kern.c | 2 +- arch/um/include/common-offsets.h | 1 - arch/um/include/irq_user.h | 9 +- arch/um/include/kern_util.h | 3 + arch/um/include/line.h | 1 + arch/um/include/longjmp.h | 4 +- arch/um/include/mconsole_kern.h | 1 + arch/um/include/mode_kern.h | 2 + arch/um/include/os.h | 74 +- arch/um/include/skas/mmu-skas.h | 1 + arch/um/include/skas/mode_kern_skas.h | 3 +- arch/um/include/sysdep-i386/kernel-offsets.h | 1 - arch/um/include/sysdep-ppc/ptrace.h | 1 + .../um/include/sysdep-x86_64/kernel-offsets.h | 2 +- arch/um/include/sysdep-x86_64/syscalls.h | 2 + arch/um/include/tt/mode_kern_tt.h | 3 +- arch/um/include/um_uaccess.h | 1 + arch/um/kernel/Makefile | 10 +- arch/um/kernel/dyn.lds.S | 1 - arch/um/kernel/{exec.c => exec_kern.c} | 13 +- arch/um/kernel/init_task.c | 1 + arch/um/kernel/irq.c | 71 +- arch/um/kernel/ksyms.c | 7 + arch/um/kernel/mem.c | 11 + arch/um/kernel/physmem.c | 4 +- arch/um/kernel/process_kern.c | 1 + arch/um/kernel/{sigio.c => sigio_kern.c} | 16 +- arch/um/kernel/{signal.c => signal_kern.c} | 11 +- arch/um/kernel/skas/mem.c | 25 +- arch/um/kernel/skas/mmu.c | 3 +- arch/um/kernel/skas/process_kern.c | 2 +- arch/um/kernel/skas/syscall.c | 7 + arch/um/kernel/skas/tlb.c | 1 + arch/um/kernel/skas/uaccess.c | 15 +- arch/um/kernel/smp.c | 1 + arch/um/kernel/syscall.c | 179 +- arch/um/kernel/syscall_kern.c | 170 + arch/um/kernel/sysrq.c | 1 + arch/um/kernel/time.c | 256 +- arch/um/kernel/time_kern.c | 222 + arch/um/kernel/{trap.c => trap_kern.c} | 19 +- arch/um/kernel/tt/exec_kern.c | 2 +- arch/um/kernel/tt/gdb_kern.c | 1 + arch/um/kernel/tt/mem.c | 22 +- arch/um/kernel/tt/process_kern.c | 4 +- arch/um/kernel/tt/syscall_kern.c | 12 +- arch/um/kernel/tt/tracer.c | 22 +- arch/um/kernel/um_arch.c | 12 +- arch/um/kernel/uml.lds.S | 13 +- arch/um/kernel/vmlinux.lds.S | 1 + arch/um/os-Linux/file.c | 143 +- arch/um/os-Linux/irq.c | 16 +- arch/um/os-Linux/mem.c | 21 +- arch/um/os-Linux/process.c | 31 +- arch/um/os-Linux/sigio.c | 33 +- arch/um/os-Linux/signal.c | 23 + arch/um/os-Linux/skas/process.c | 18 +- arch/um/os-Linux/sys-i386/tls.c | 6 +- arch/um/os-Linux/time.c | 23 +- arch/um/os-Linux/tls.c | 9 +- arch/um/os-Linux/uaccess.c | 3 +- arch/um/os-Linux/umid.c | 97 +- arch/um/scripts/Makefile.rules | 4 +- arch/um/sys-i386/checksum.S | 1 + arch/um/sys-i386/ldt.c | 1 + arch/um/sys-i386/ptrace.c | 1 + arch/um/sys-i386/sys_call_table.S | 2 + arch/um/sys-i386/sysrq.c | 1 + arch/um/sys-i386/tls.c | 1 + arch/um/sys-ppc/misc.S | 7 +- arch/um/sys-x86_64/stub_segv.c | 1 + arch/um/sys-x86_64/syscall_table.c | 7 + arch/v850/kernel/anna.c | 1 + arch/v850/kernel/as85ep1.c | 1 + arch/v850/kernel/fpga85e2c.c | 1 + arch/v850/kernel/gbus_int.c | 2 +- arch/v850/kernel/irq.c | 6 +- arch/v850/kernel/ma.c | 1 + arch/v850/kernel/me2.c | 1 + arch/v850/kernel/process.c | 1 + arch/v850/kernel/rte_cb.c | 1 + arch/v850/kernel/rte_cb_leds.c | 1 + arch/v850/kernel/rte_ma1_cb.c | 1 + arch/v850/kernel/rte_mb_a_pci.c | 3 +- arch/v850/kernel/rte_me2_cb.c | 3 +- arch/v850/kernel/rte_nb85e_cb.c | 1 + arch/v850/kernel/setup.c | 6 +- arch/v850/kernel/signal.c | 2 +- arch/v850/kernel/sim.c | 1 + arch/v850/kernel/sim85e2.c | 1 + arch/v850/kernel/syscalls.c | 1 + arch/v850/kernel/teg.c | 1 + arch/v850/kernel/time.c | 3 +- arch/v850/kernel/v850_ksyms.c | 17 + arch/v850/kernel/vmlinux.lds.S | 1 + arch/x86_64/Kconfig | 72 +- arch/x86_64/Kconfig.debug | 22 +- arch/x86_64/Makefile | 4 +- arch/x86_64/boot/Makefile | 9 +- arch/x86_64/boot/compressed/misc.c | 46 +- arch/x86_64/boot/setup.S | 3 +- arch/x86_64/boot/tools/build.c | 6 +- arch/x86_64/boot/video.S | 21 +- arch/x86_64/crypto/aes-x86_64-asm.S | 22 +- arch/x86_64/crypto/aes.c | 20 +- arch/x86_64/defconfig | 254 +- arch/x86_64/ia32/Makefile | 4 - arch/x86_64/ia32/audit.c | 37 - arch/x86_64/ia32/fpu32.c | 1 + arch/x86_64/ia32/ia32_binfmt.c | 60 +- arch/x86_64/ia32/ia32_signal.c | 28 +- arch/x86_64/ia32/ia32entry.S | 37 +- arch/x86_64/ia32/ptrace32.c | 50 +- arch/x86_64/ia32/sys_ia32.c | 24 +- arch/x86_64/ia32/vsyscall.lds | 1 - arch/x86_64/kernel/Makefile | 10 +- arch/x86_64/kernel/acpi/Makefile | 1 - arch/x86_64/kernel/acpi/processor.c | 72 + arch/x86_64/kernel/acpi/sleep.c | 8 +- arch/x86_64/kernel/aperture.c | 27 +- arch/x86_64/kernel/apic.c | 35 +- arch/x86_64/kernel/asm-offsets.c | 3 - arch/x86_64/kernel/audit.c | 64 - arch/x86_64/kernel/crash.c | 6 +- arch/x86_64/kernel/e820.c | 58 +- arch/x86_64/kernel/early_printk.c | 2 +- arch/x86_64/kernel/entry.S | 328 +- arch/x86_64/kernel/functionlist | 1 + arch/x86_64/kernel/genapic.c | 1 + arch/x86_64/kernel/genapic_cluster.c | 1 + arch/x86_64/kernel/genapic_flat.c | 31 +- arch/x86_64/kernel/head.S | 1 - arch/x86_64/kernel/head64.c | 7 +- arch/x86_64/kernel/i387.c | 3 +- arch/x86_64/kernel/i8259.c | 23 +- arch/x86_64/kernel/init_task.c | 5 - arch/x86_64/kernel/io_apic.c | 65 +- arch/x86_64/kernel/irq-xen.c | 47 +- arch/x86_64/kernel/irq.c | 48 +- arch/x86_64/kernel/irqflags-xen.c | 100 - arch/x86_64/kernel/k8.c | 118 - arch/x86_64/kernel/kprobes.c | 1 + arch/x86_64/kernel/machine_kexec.c | 17 +- arch/x86_64/kernel/mce.c | 10 +- arch/x86_64/kernel/mce_amd.c | 511 +- arch/x86_64/kernel/module.c | 38 +- arch/x86_64/kernel/mpparse.c | 1 + arch/x86_64/kernel/nmi.c | 94 +- arch/x86_64/kernel/pci-calgary.c | 1039 - arch/x86_64/kernel/pci-dma.c | 55 +- arch/x86_64/kernel/pci-gart.c | 156 +- arch/x86_64/kernel/pci-nommu.c | 11 +- arch/x86_64/kernel/pci-swiotlb.c | 5 +- arch/x86_64/kernel/pmtimer.c | 4 +- arch/x86_64/kernel/process.c | 25 +- arch/x86_64/kernel/reboot.c | 1 - arch/x86_64/kernel/setup.c | 196 +- arch/x86_64/kernel/setup64.c | 7 +- arch/x86_64/kernel/signal.c | 85 +- arch/x86_64/kernel/smp.c | 14 +- arch/x86_64/kernel/smpboot.c | 39 +- arch/x86_64/kernel/stacktrace.c | 55 - arch/x86_64/kernel/suspend.c | 1 + arch/x86_64/kernel/syscall.c | 1 + arch/x86_64/kernel/tce.c | 201 - arch/x86_64/kernel/time.c | 105 +- arch/x86_64/kernel/traps.c | 276 +- arch/x86_64/kernel/vmlinux.lds.S | 61 +- arch/x86_64/kernel/vsyscall.c | 4 +- arch/x86_64/kernel/x8664_ksyms-xen.c | 155 + arch/x86_64/kernel/x8664_ksyms.c | 115 +- arch/x86_64/lib/Makefile | 2 +- arch/x86_64/lib/clear_page.S | 47 +- arch/x86_64/lib/copy_page.S | 52 +- arch/x86_64/lib/copy_user.S | 39 +- arch/x86_64/lib/csum-copy.S | 26 +- arch/x86_64/lib/csum-partial.c | 1 - arch/x86_64/lib/csum-wrappers.c | 1 - arch/x86_64/lib/delay.c | 6 +- arch/x86_64/lib/getuser.S | 32 +- arch/x86_64/lib/iomap_copy.S | 10 +- arch/x86_64/lib/memcpy.S | 68 +- arch/x86_64/lib/memmove.c | 4 +- arch/x86_64/lib/memset.S | 78 +- arch/x86_64/lib/putuser.S | 32 +- arch/x86_64/lib/rwlock.S | 38 - arch/x86_64/lib/thunk.S | 36 +- arch/x86_64/lib/usercopy.c | 13 +- arch/x86_64/mm/extable.c | 1 + arch/x86_64/mm/fault.c | 51 +- arch/x86_64/mm/init.c | 129 +- arch/x86_64/mm/ioremap.c | 5 - arch/x86_64/mm/pageattr.c | 1 + arch/x86_64/mm/srat.c | 33 +- arch/x86_64/pci/mmconfig.c | 4 +- arch/xen/kernel/vmlinux.lds.S | 275 + arch/xtensa/Kconfig | 4 + arch/xtensa/Makefile | 2 +- arch/xtensa/boot/boot-elf/bootstrap.S | 1 + arch/xtensa/boot/lib/Makefile | 2 +- arch/xtensa/kernel/coprocessor.S | 1 + arch/xtensa/kernel/entry.S | 2 +- arch/xtensa/kernel/head.S | 1 + arch/xtensa/kernel/irq.c | 4 +- arch/xtensa/kernel/pci.c | 19 +- arch/xtensa/kernel/platform.c | 1 + arch/xtensa/kernel/process.c | 1 + arch/xtensa/kernel/ptrace.c | 3 +- arch/xtensa/kernel/setup.c | 3 +- arch/xtensa/kernel/signal.c | 12 +- arch/xtensa/kernel/syscalls.c | 1 + arch/xtensa/kernel/time.c | 5 +- arch/xtensa/kernel/traps.c | 8 +- arch/xtensa/kernel/vmlinux.lds.S | 1 + arch/xtensa/kernel/xtensa_ksyms.c | 1 + arch/xtensa/mm/init.c | 1 + arch/xtensa/platform-iss/console.c | 1 + arch/xtensa/platform-iss/network.c | 1 + arch/xtensa/platform-iss/setup.c | 1 + block/Kconfig.iosched | 2 +- block/as-iosched.c | 70 +- block/blktrace.c | 8 +- block/cfq-iosched.c | 215 +- block/deadline-iosched.c | 54 +- block/elevator.c | 8 +- block/genhd.c | 8 +- block/ll_rw_blk.c | 60 +- block/scsi_ioctl.c | 5 +- ...p.config => kernel-2.6.17-i586-smp.config} | 592 +- ...-i586.config => kernel-2.6.17-i586.config} | 468 +- ...config => kernel-2.6.17-i686-kdump.config} | 306 +- configs/kernel-2.6.17-i686-planetlab.config | 1618 + .../kernel-2.6.17-i686-smp-planetlab.config | 1628 + ...p.config => kernel-2.6.17-i686-smp.config} | 320 +- .../kernel-2.6.17-i686-uml-planetlab.config | 785 + ...n.config => kernel-2.6.17-i686-xen.config} | 335 +- ....config => kernel-2.6.17-i686-xen0.config} | 335 +- ... kernel-2.6.17-i686-xenU-planetlab.config} | 343 +- ....config => kernel-2.6.17-i686-xenU.config} | 180 +- ...-i686.config => kernel-2.6.17-i686.config} | 316 +- ...-ia64.config => kernel-2.6.17-ia64.config} | 273 +- ...mp.config => kernel-2.6.17-ppc-smp.config} | 306 +- ...18-ppc.config => kernel-2.6.17-ppc.config} | 306 +- ...pc64.config => kernel-2.6.17-ppc64.config} | 311 +- ...nfig => kernel-2.6.17-ppc64iseries.config} | 268 +- ...-s390.config => kernel-2.6.17-s390.config} | 117 +- ...390x.config => kernel-2.6.17-s390x.config} | 117 +- ...config => kernel-2.6.17-x86_64-smp.config} | 333 +- ...ump.config => kernel-2.6.17-x86_64.config} | 343 +- configs/kernel-2.6.18-ia64-xen.config | 2883 -- configs/kernel-2.6.18-ppc64-kdump.config | 3039 -- configs/kernel-2.6.18-x86_64-xen.config | 3144 -- configs/kernel-2.6.18-x86_64-xen0.config | 3144 -- crypto/Kconfig | 2 +- crypto/aes.c | 14 +- crypto/anubis.c | 13 +- crypto/api.c | 23 +- crypto/arc4.c | 9 +- crypto/blowfish.c | 19 +- crypto/cast5.c | 14 +- crypto/cast6.c | 15 +- crypto/cipher.c | 14 +- crypto/compress.c | 15 +- crypto/crc32c.c | 19 +- crypto/crypto_null.c | 17 +- crypto/deflate.c | 23 +- crypto/des.c | 27 +- crypto/digest.c | 53 +- crypto/khazad.c | 21 +- crypto/md4.c | 12 +- crypto/md5.c | 12 +- crypto/michael_mic.c | 20 +- crypto/serpent.c | 27 +- crypto/sha1.c | 18 +- crypto/sha256.c | 19 +- crypto/sha512.c | 29 +- crypto/tcrypt.c | 179 +- crypto/tcrypt.h | 36 - crypto/tea.c | 55 +- crypto/tgr192.c | 33 +- crypto/twofish.c | 14 +- crypto/wp512.c | 24 +- drivers/Kconfig | 2 - drivers/Makefile | 2 - drivers/acorn/block/Kconfig | 2 +- drivers/acorn/block/mfmhd.c | 3 +- drivers/acpi/Kconfig | 26 +- drivers/acpi/Makefile | 3 - drivers/acpi/ac.c | 97 +- drivers/acpi/acpi_memhotplug.c | 280 +- drivers/acpi/asus_acpi.c | 367 +- drivers/acpi/battery.c | 171 +- drivers/acpi/bus.c | 153 +- drivers/acpi/button.c | 86 +- drivers/acpi/cm_sbs.c | 113 - drivers/acpi/container.c | 38 +- drivers/acpi/debug.c | 19 +- drivers/acpi/dispatcher/dsfield.c | 13 +- drivers/acpi/dispatcher/dsinit.c | 46 +- drivers/acpi/dispatcher/dsmethod.c | 507 +- drivers/acpi/dispatcher/dsmthdat.c | 43 +- drivers/acpi/dispatcher/dsobject.c | 25 +- drivers/acpi/dispatcher/dsopcode.c | 63 +- drivers/acpi/dispatcher/dsutils.c | 25 +- drivers/acpi/dispatcher/dswexec.c | 34 +- drivers/acpi/dispatcher/dswload.c | 114 +- drivers/acpi/dispatcher/dswscope.c | 10 +- drivers/acpi/dispatcher/dswstate.c | 72 +- drivers/acpi/dock.c | 739 - drivers/acpi/ec.c | 228 +- drivers/acpi/event.c | 21 +- drivers/acpi/events/evevent.c | 10 +- drivers/acpi/events/evgpe.c | 81 +- drivers/acpi/events/evgpeblk.c | 96 +- drivers/acpi/events/evmisc.c | 41 +- drivers/acpi/events/evregion.c | 159 +- drivers/acpi/events/evrgnini.c | 48 +- drivers/acpi/events/evsci.c | 8 +- drivers/acpi/events/evxface.c | 88 +- drivers/acpi/events/evxfevnt.c | 67 +- drivers/acpi/events/evxfregn.c | 28 +- drivers/acpi/executer/exconfig.c | 63 +- drivers/acpi/executer/exconvrt.c | 15 +- drivers/acpi/executer/excreate.c | 52 +- drivers/acpi/executer/exdump.c | 44 +- drivers/acpi/executer/exfield.c | 18 +- drivers/acpi/executer/exfldio.c | 128 +- drivers/acpi/executer/exmisc.c | 25 +- drivers/acpi/executer/exmutex.c | 29 +- drivers/acpi/executer/exnames.c | 28 +- drivers/acpi/executer/exoparg1.c | 101 +- drivers/acpi/executer/exoparg2.c | 89 +- drivers/acpi/executer/exoparg3.c | 17 +- drivers/acpi/executer/exoparg6.c | 3 +- drivers/acpi/executer/exprep.c | 45 +- drivers/acpi/executer/exregion.c | 40 +- drivers/acpi/executer/exresnte.c | 17 +- drivers/acpi/executer/exresolv.c | 77 +- drivers/acpi/executer/exresop.c | 12 +- drivers/acpi/executer/exstore.c | 15 +- drivers/acpi/executer/exstoren.c | 7 +- drivers/acpi/executer/exstorob.c | 17 +- drivers/acpi/executer/exsystem.c | 96 +- drivers/acpi/executer/exutils.c | 17 +- drivers/acpi/fan.c | 103 +- drivers/acpi/glue.c | 8 +- drivers/acpi/hardware/hwacpi.c | 6 +- drivers/acpi/hardware/hwgpe.c | 8 +- drivers/acpi/hardware/hwregs.c | 223 +- drivers/acpi/hardware/hwsleep.c | 31 +- drivers/acpi/hardware/hwtimer.c | 20 +- drivers/acpi/hotkey.c | 415 +- drivers/acpi/i2c_ec.c | 406 - drivers/acpi/i2c_ec.h | 23 - drivers/acpi/ibm_acpi.c | 70 - drivers/acpi/motherboard.c | 66 +- drivers/acpi/namespace/nsaccess.c | 73 +- drivers/acpi/namespace/nsalloc.c | 131 +- drivers/acpi/namespace/nsdump.c | 15 +- drivers/acpi/namespace/nsdumpdv.c | 6 +- drivers/acpi/namespace/nseval.c | 484 +- drivers/acpi/namespace/nsinit.c | 298 +- drivers/acpi/namespace/nsload.c | 27 +- drivers/acpi/namespace/nsnames.c | 14 +- drivers/acpi/namespace/nsobject.c | 15 +- drivers/acpi/namespace/nsparse.c | 6 +- drivers/acpi/namespace/nssearch.c | 148 +- drivers/acpi/namespace/nsutils.c | 104 +- drivers/acpi/namespace/nswalk.c | 6 +- drivers/acpi/namespace/nsxfeval.c | 200 +- drivers/acpi/namespace/nsxfname.c | 22 +- drivers/acpi/namespace/nsxfobj.c | 11 +- drivers/acpi/numa.c | 62 +- drivers/acpi/osl.c | 200 +- drivers/acpi/parser/psargs.c | 25 +- drivers/acpi/parser/psloop.c | 25 +- drivers/acpi/parser/psopcode.c | 6 +- drivers/acpi/parser/psparse.c | 53 +- drivers/acpi/parser/psscope.c | 17 +- drivers/acpi/parser/pstree.c | 8 +- drivers/acpi/parser/psutils.c | 11 +- drivers/acpi/parser/pswalk.c | 5 +- drivers/acpi/parser/psxface.c | 46 +- drivers/acpi/pci_bind.c | 87 +- drivers/acpi/pci_irq.c | 92 +- drivers/acpi/pci_link.c | 239 +- drivers/acpi/pci_root.c | 59 +- drivers/acpi/power.c | 165 +- drivers/acpi/processor_core.c | 169 +- drivers/acpi/processor_idle.c | 162 +- drivers/acpi/processor_perflib.c | 375 +- drivers/acpi/processor_thermal.c | 48 +- drivers/acpi/processor_throttling.c | 45 +- drivers/acpi/resources/rscalc.c | 108 +- drivers/acpi/resources/rscreate.c | 33 +- drivers/acpi/resources/rsdump.c | 42 +- drivers/acpi/resources/rsinfo.c | 1 - drivers/acpi/resources/rslist.c | 102 +- drivers/acpi/resources/rsmisc.c | 12 +- drivers/acpi/resources/rsutils.c | 155 +- drivers/acpi/resources/rsxface.c | 395 +- drivers/acpi/sbs.c | 1769 - drivers/acpi/scan.c | 299 +- drivers/acpi/sleep/main.c | 8 - drivers/acpi/sleep/proc.c | 6 +- drivers/acpi/sleep/wakeup.c | 3 + drivers/acpi/system.c | 37 +- drivers/acpi/tables.c | 5 +- drivers/acpi/tables/tbconvrt.c | 46 +- drivers/acpi/tables/tbget.c | 77 +- drivers/acpi/tables/tbgetall.c | 11 +- drivers/acpi/tables/tbinstal.c | 69 +- drivers/acpi/tables/tbrsdt.c | 73 +- drivers/acpi/tables/tbutils.c | 149 +- drivers/acpi/tables/tbxface.c | 74 +- drivers/acpi/tables/tbxfroot.c | 82 +- drivers/acpi/thermal.c | 317 +- drivers/acpi/utilities/utalloc.c | 636 +- drivers/acpi/utilities/utcache.c | 20 +- drivers/acpi/utilities/utcopy.c | 41 +- drivers/acpi/utilities/utdebug.c | 69 +- drivers/acpi/utilities/utdelete.c | 111 +- drivers/acpi/utilities/uteval.c | 141 +- drivers/acpi/utilities/utglobal.c | 63 +- drivers/acpi/utilities/utinit.c | 26 +- drivers/acpi/utilities/utmath.c | 8 +- drivers/acpi/utilities/utmisc.c | 315 +- drivers/acpi/utilities/utmutex.c | 81 +- drivers/acpi/utilities/utobject.c | 23 +- drivers/acpi/utilities/utresrc.c | 256 +- drivers/acpi/utilities/utstate.c | 43 +- drivers/acpi/utilities/utxface.c | 44 +- drivers/acpi/utils.c | 116 +- drivers/acpi/video.c | 365 +- drivers/amba/bus.c | 5 +- drivers/atm/Kconfig | 2 +- drivers/atm/adummy.c | 1 + drivers/atm/ambassador.c | 8 +- drivers/atm/ambassador.h | 1 + drivers/atm/eni.c | 3 +- drivers/atm/firestream.c | 12 +- drivers/atm/fore200e.c | 7 +- drivers/atm/fore200e.h | 1 + drivers/atm/he.c | 16 +- drivers/atm/horizon.c | 2 +- drivers/atm/horizon.h | 1 + drivers/atm/idt77105.c | 2 +- drivers/atm/idt77105.h | 2 +- drivers/atm/idt77252.c | 6 +- drivers/atm/iphase.c | 6 +- drivers/atm/iphase.h | 1 + drivers/atm/lanai.c | 2 +- drivers/atm/nicstar.c | 3 +- drivers/atm/suni.c | 2 +- drivers/atm/zatm.c | 3 +- drivers/atm/zatm.h | 1 + drivers/base/Kconfig | 6 +- drivers/base/Makefile | 2 - drivers/base/attribute_container.c | 8 + drivers/base/base.h | 9 - drivers/base/bus.c | 34 +- drivers/base/class.c | 113 +- drivers/base/core.c | 201 +- drivers/base/cpu.c | 28 +- drivers/base/dmapool.c | 3 +- drivers/base/driver.c | 1 + drivers/base/firmware_class.c | 22 +- drivers/base/hypervisor.c | 19 - drivers/base/init.c | 1 - drivers/base/isa.c | 180 - drivers/base/memory.c | 4 +- drivers/base/node.c | 124 +- drivers/base/platform.c | 35 +- drivers/base/power/Makefile | 4 - drivers/base/power/main.c | 1 + drivers/base/power/resume.c | 10 +- drivers/base/power/shutdown.c | 1 + drivers/base/power/suspend.c | 30 +- drivers/base/power/trace.c | 228 - drivers/base/sys.c | 52 +- drivers/base/topology.c | 6 +- drivers/block/DAC960.c | 20 +- drivers/block/Kconfig | 11 - drivers/block/acsi.c | 6 +- drivers/block/acsi_slm.c | 10 + drivers/block/amiflop.c | 1 - drivers/block/aoe/aoechr.c | 2 +- drivers/block/cciss.c | 3251 +- drivers/block/cciss.h | 2 + drivers/block/cciss_scsi.c | 8 +- drivers/block/cpqarray.c | 31 +- drivers/block/floppy.c | 109 +- drivers/block/loop.c | 20 +- drivers/block/mambo_bd.c | 6 + drivers/block/nbd.c | 60 +- drivers/block/paride/paride.c | 1 + drivers/block/paride/pd.c | 2 +- drivers/block/paride/pf.c | 2 +- drivers/block/paride/pg.c | 18 +- drivers/block/paride/pt.c | 21 + drivers/block/pktcdvd.c | 10 +- drivers/block/ps2esdi.c | 6 +- drivers/block/rd.c | 10 +- drivers/block/swim3.c | 235 +- drivers/block/sx8.c | 12 +- drivers/block/ub.c | 84 +- drivers/block/umem.c | 4 +- drivers/block/viodasd.c | 5 +- drivers/block/vroot.c | 48 +- drivers/block/xd.c | 1 + drivers/block/z2ram.c | 1 + drivers/bluetooth/bcm203x.c | 2 +- drivers/bluetooth/bfusb.c | 1 + drivers/bluetooth/bluecard_cs.c | 2 +- drivers/bluetooth/bpa10x.c | 1 + drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btuart_cs.c | 2 +- drivers/bluetooth/dtl1_cs.c | 5 +- drivers/bluetooth/hci_bcsp.c | 1 + drivers/bluetooth/hci_h4.c | 1 + drivers/bluetooth/hci_ldisc.c | 5 +- drivers/bluetooth/hci_usb.c | 100 +- drivers/bluetooth/hci_usb.h | 1 - drivers/bluetooth/hci_vhci.c | 2 + drivers/cdrom/aztcd.c | 1 + drivers/cdrom/cdrom.c | 1 + drivers/cdrom/cdu31a.c | 3 +- drivers/cdrom/cm206.c | 10 +- drivers/cdrom/gscd.c | 3 +- drivers/cdrom/mcdx.c | 5 +- drivers/cdrom/optcd.c | 1 + drivers/cdrom/sbpcd.c | 7 + drivers/cdrom/sjcd.c | 1 + drivers/cdrom/sonycd535.c | 3 +- drivers/cdrom/viocd.c | 5 +- drivers/char/Kconfig | 57 +- drivers/char/Makefile | 4 +- drivers/char/agp/Kconfig | 8 +- drivers/char/agp/agp.h | 2 +- drivers/char/agp/alpha-agp.c | 15 +- drivers/char/agp/amd-k7-agp.c | 2 +- drivers/char/agp/amd64-agp.c | 84 +- drivers/char/agp/ati-agp.c | 35 +- drivers/char/agp/backend.c | 2 +- drivers/char/agp/efficeon-agp.c | 18 +- drivers/char/agp/frontend.c | 29 +- drivers/char/agp/generic.c | 46 +- drivers/char/agp/hp-agp.c | 2 +- drivers/char/agp/intel-agp.c | 177 +- drivers/char/agp/nvidia-agp.c | 27 - drivers/char/agp/sgi-agp.c | 5 +- drivers/char/agp/uninorth-agp.c | 4 +- drivers/char/agp/via-agp.c | 4 +- drivers/char/amiserial.c | 3 +- drivers/char/applicom.c | 55 +- drivers/char/consolemap.c | 1 + drivers/char/crash.c | 1 + drivers/char/cs5535_gpio.c | 2 +- drivers/char/cyclades.c | 17 +- drivers/char/decserial.c | 1 + drivers/char/drm/drm.h | 1 + drivers/char/drm/drmP.h | 1 + drivers/char/drm/drm_irq.c | 2 +- drivers/char/drm/drm_memory.c | 1 + drivers/char/drm/drm_memory.h | 1 + drivers/char/drm/drm_memory_debug.h | 3 +- drivers/char/drm/drm_scatter.c | 1 + drivers/char/drm/drm_sysfs.c | 1 + drivers/char/drm/ffb_drv.c | 1 + drivers/char/drm/i810_drv.c | 1 + drivers/char/drm/i830_drv.c | 1 + drivers/char/drm/i915_dma.c | 4 +- drivers/char/drm/i915_drm.h | 13 - drivers/char/drm/i915_drv.h | 6 +- drivers/char/drm/i915_irq.c | 69 +- drivers/char/drm/mga_drv.c | 1 + drivers/char/drm/r128_drv.c | 1 + drivers/char/drm/radeon_cp.c | 6 +- drivers/char/drm/radeon_drm.h | 7 +- drivers/char/drm/radeon_drv.c | 1 + drivers/char/drm/radeon_drv.h | 10 +- drivers/char/drm/radeon_state.c | 48 +- drivers/char/drm/savage_drv.c | 1 + drivers/char/drm/sis_drv.c | 1 + drivers/char/drm/tdfx_drv.c | 1 + drivers/char/drm/via_dmablit.c | 2 +- drivers/char/drm/via_drv.c | 1 + drivers/char/ds1286.c | 2 +- drivers/char/ds1302.c | 3 +- drivers/char/ds1620.c | 3 +- drivers/char/dsp56k.c | 12 +- drivers/char/dtlk.c | 7 +- drivers/char/ec3104_keyb.c | 1 + drivers/char/efirtc.c | 2 +- drivers/char/epca.c | 4 +- drivers/char/esp.c | 7 +- drivers/char/ftape/lowlevel/fdc-io.c | 3 +- drivers/char/ftape/lowlevel/ftape-calibr.c | 1 + drivers/char/ftape/lowlevel/ftape-ctl.c | 1 + drivers/char/ftape/lowlevel/ftape-init.c | 1 + drivers/char/ftape/lowlevel/ftape-proc.c | 1 + drivers/char/ftape/lowlevel/ftape-setup.c | 1 + drivers/char/ftape/lowlevel/ftape-tracing.h | 1 + drivers/char/ftape/lowlevel/ftape_syms.c | 1 + drivers/char/ftape/zftape/zftape-ctl.c | 1 + drivers/char/ftape/zftape/zftape-ctl.h | 1 + drivers/char/ftape/zftape/zftape-init.c | 28 +- drivers/char/ftape/zftape/zftape-rw.c | 1 + drivers/char/ftape/zftape/zftape-rw.h | 1 + drivers/char/genrtc.c | 3 +- drivers/char/hangcheck-timer.c | 4 +- drivers/char/hpet.c | 10 +- drivers/char/hvc_console.c | 9 +- drivers/char/hvc_rtas.c | 37 +- drivers/char/hvcs.c | 14 +- drivers/char/hvsi.c | 20 +- drivers/char/hw_random.c | 698 + drivers/char/hw_random/Kconfig | 90 - drivers/char/hw_random/Makefile | 11 - drivers/char/hw_random/amd-rng.c | 152 - drivers/char/hw_random/core.c | 354 - drivers/char/hw_random/geode-rng.c | 132 - drivers/char/hw_random/intel-rng.c | 357 - drivers/char/hw_random/ixp4xx-rng.c | 72 - drivers/char/hw_random/omap-rng.c | 205 - drivers/char/hw_random/via-rng.c | 183 - drivers/char/i8k.c | 2 +- drivers/char/ip2/i2ellis.h | 1 + drivers/char/ip2/ip2main.c | 52 +- drivers/char/ip27-rtc.c | 2 +- drivers/char/ipmi/ipmi_devintf.c | 11 +- drivers/char/ipmi/ipmi_msghandler.c | 25 +- drivers/char/ipmi/ipmi_poweroff.c | 1 + drivers/char/ipmi/ipmi_si_intf.c | 85 +- drivers/char/ipmi/ipmi_watchdog.c | 46 +- drivers/char/isicom.c | 16 +- drivers/char/istallion.c | 1854 +- drivers/char/ite_gpio.c | 4 +- drivers/char/keyboard.c | 167 +- drivers/char/lcd.c | 3 +- drivers/char/lp.c | 10 +- drivers/char/mbcs.c | 7 +- drivers/char/mem.c | 29 +- drivers/char/misc.c | 20 +- drivers/char/mmtimer.c | 7 +- drivers/char/moxa.c | 12 +- drivers/char/mwave/3780i.c | 1 + drivers/char/mwave/mwavedd.c | 2 +- drivers/char/mxser.c | 840 +- drivers/char/n_hdlc.c | 1 + drivers/char/n_r3964.c | 3 +- drivers/char/n_tty.c | 6 +- drivers/char/nsc_gpio.c | 139 - drivers/char/nvram.c | 3 +- drivers/char/nwbutton.c | 5 +- drivers/char/nwflash.c | 2 +- drivers/char/pc8736x_gpio.c | 357 - drivers/char/pcmcia/cm4000_cs.c | 9 +- drivers/char/pcmcia/cm4040_cs.c | 2 +- drivers/char/pcmcia/synclink_cs.c | 73 +- drivers/char/ppdev.c | 17 +- drivers/char/pty.c | 11 +- drivers/char/qtronix.c | 3 +- drivers/char/random.c | 7 +- drivers/char/raw.c | 21 +- drivers/char/rio/daemon.h | 12 +- drivers/char/rio/func.h | 25 +- drivers/char/rio/host.h | 16 +- drivers/char/rio/port.h | 16 +- drivers/char/rio/rio.h | 4 +- drivers/char/rio/rio_linux.c | 36 +- drivers/char/rio/rio_linux.h | 21 +- drivers/char/rio/rioboot.c | 54 +- drivers/char/rio/riocmd.c | 36 +- drivers/char/rio/rioctrl.c | 182 +- drivers/char/rio/rioinit.c | 29 +- drivers/char/rio/riointr.c | 44 +- drivers/char/rio/rioparam.c | 28 +- drivers/char/rio/rioroute.c | 22 +- drivers/char/rio/riotable.c | 24 +- drivers/char/rio/riotty.c | 2 +- drivers/char/rio/unixrup.h | 2 +- drivers/char/riscom8.c | 3 +- drivers/char/rocket.c | 67 +- drivers/char/rtc.c | 71 +- drivers/char/s3c2410-rtc.c | 4 +- drivers/char/scx200_gpio.c | 158 +- drivers/char/selection.c | 2 +- drivers/char/serial167.c | 2 + drivers/char/snsc.c | 11 +- drivers/char/snsc_event.c | 17 +- drivers/char/sonypi.c | 15 +- drivers/char/specialix.c | 17 +- drivers/char/stallion.c | 232 +- drivers/char/sx.c | 10 +- drivers/char/synclink.c | 17 +- drivers/char/synclink_gt.c | 150 +- drivers/char/synclinkmp.c | 21 +- drivers/char/sysrq.c | 17 +- drivers/char/tb0219.c | 2 +- drivers/char/tipar.c | 20 +- drivers/char/tlclk.c | 7 +- drivers/char/toshiba.c | 2 +- drivers/char/tpm/tpm.c | 1 - drivers/char/tpm/tpm_atmel.c | 2 +- drivers/char/tpm/tpm_infineon.c | 2 +- drivers/char/tpm/tpm_nsc.c | 2 +- drivers/char/tpm/tpm_tis.c | 82 +- drivers/char/tty_io.c | 1104 +- drivers/char/tty_ioctl.c | 88 +- drivers/char/vc_screen.c | 14 +- drivers/char/viocons.c | 2 + drivers/char/viotape.c | 15 +- drivers/char/vme_scc.c | 50 +- drivers/char/vr41xx_giu.c | 7 +- drivers/char/vt.c | 596 +- drivers/char/vt_ioctl.c | 20 +- drivers/char/watchdog/Kconfig | 8 +- drivers/char/watchdog/acquirewdt.c | 2 +- drivers/char/watchdog/advantechwdt.c | 2 +- drivers/char/watchdog/alim1535_wdt.c | 2 +- drivers/char/watchdog/alim7101_wdt.c | 2 +- drivers/char/watchdog/at91_wdt.c | 85 +- drivers/char/watchdog/booke_wdt.c | 3 +- drivers/char/watchdog/cpu5wdt.c | 2 +- drivers/char/watchdog/ep93xx_wdt.c | 2 +- drivers/char/watchdog/eurotechwdt.c | 5 +- drivers/char/watchdog/i6300esb.c | 2 +- drivers/char/watchdog/i8xx_tco.c | 30 +- drivers/char/watchdog/ib700wdt.c | 3 +- drivers/char/watchdog/ibmasr.c | 3 +- drivers/char/watchdog/indydog.c | 3 +- drivers/char/watchdog/ixp2000_wdt.c | 3 +- drivers/char/watchdog/ixp4xx_wdt.c | 3 +- drivers/char/watchdog/machzwd.c | 6 +- drivers/char/watchdog/mixcomwd.c | 3 +- drivers/char/watchdog/mpc83xx_wdt.c | 3 +- drivers/char/watchdog/mpc8xx_wdt.c | 3 +- drivers/char/watchdog/mpcore_wdt.c | 5 +- drivers/char/watchdog/mv64x60_wdt.c | 3 +- drivers/char/watchdog/pcwd.c | 5 +- drivers/char/watchdog/pcwd_pci.c | 35 +- drivers/char/watchdog/pcwd_usb.c | 28 +- drivers/char/watchdog/s3c2410_wdt.c | 3 +- drivers/char/watchdog/sa1100_wdt.c | 3 +- drivers/char/watchdog/sbc60xxwdt.c | 2 +- drivers/char/watchdog/sbc8360.c | 7 +- drivers/char/watchdog/sbc_epx_c3.c | 3 +- drivers/char/watchdog/sc1200wdt.c | 12 +- drivers/char/watchdog/sc520_wdt.c | 2 +- drivers/char/watchdog/scx200_wdt.c | 3 +- drivers/char/watchdog/shwdt.c | 3 +- drivers/char/watchdog/softdog.c | 3 +- drivers/char/watchdog/w83627hf_wdt.c | 2 +- drivers/char/watchdog/w83877f_wdt.c | 2 +- drivers/char/watchdog/w83977f_wdt.c | 3 +- drivers/char/watchdog/wafer5823wdt.c | 2 +- drivers/char/watchdog/wd501p.h | 1 + drivers/char/watchdog/wdrtas.c | 5 +- drivers/char/watchdog/wdt.c | 7 +- drivers/char/watchdog/wdt285.c | 2 +- drivers/char/watchdog/wdt977.c | 3 +- drivers/char/watchdog/wdt_pci.c | 7 +- drivers/clocksource/Makefile | 3 - drivers/clocksource/acpi_pm.c | 177 - drivers/clocksource/cyclone.c | 119 - drivers/clocksource/scx200_hrt.c | 101 - drivers/connector/cn_proc.c | 21 +- drivers/connector/cn_queue.c | 2 +- drivers/connector/connector.c | 21 +- drivers/cpufreq/cpufreq.c | 136 +- drivers/cpufreq/cpufreq_conservative.c | 11 - drivers/cpufreq/cpufreq_ondemand.c | 275 +- drivers/cpufreq/cpufreq_stats.c | 13 +- drivers/cpufreq/cpufreq_userspace.c | 4 +- drivers/cpufreq/freq_table.c | 16 +- drivers/crypto/padlock-aes.c | 44 +- drivers/dma/Kconfig | 34 - drivers/dma/Makefile | 3 - drivers/dma/dmaengine.c | 412 - drivers/dma/ioatdma.c | 841 - drivers/dma/ioatdma.h | 125 - drivers/dma/ioatdma_hw.h | 52 - drivers/dma/ioatdma_io.h | 118 - drivers/dma/ioatdma_registers.h | 126 - drivers/dma/iovlock.c | 301 - drivers/edac/Kconfig | 7 - drivers/edac/Makefile | 1 - drivers/edac/amd76x_edac.c | 99 +- drivers/edac/e752x_edac.c | 346 +- drivers/edac/e7xxx_edac.c | 177 +- drivers/edac/edac_mc.c | 1133 +- drivers/edac/edac_mc.h | 25 +- drivers/edac/i82860_edac.c | 133 +- drivers/edac/i82875p_edac.c | 221 +- drivers/edac/k8_edac.c | 1881 - drivers/edac/r82600_edac.c | 144 +- drivers/eisa/virtual_root.c | 1 + drivers/fc4/fc.c | 4 +- drivers/fc4/fc_syms.c | 1 + drivers/fc4/soc.c | 4 +- drivers/fc4/socal.c | 4 +- drivers/firmware/Kconfig | 3 +- drivers/firmware/dell_rbu.c | 1 + drivers/firmware/dmi_scan.c | 13 +- drivers/firmware/efivars.c | 1 + drivers/firmware/pcdp.c | 1 + drivers/hwmon/Kconfig | 65 +- drivers/hwmon/Makefile | 4 - drivers/hwmon/abituguru.c | 1455 - drivers/hwmon/asb100.c | 2 +- drivers/hwmon/f71805f.c | 15 +- drivers/hwmon/hdaps.c | 8 +- drivers/hwmon/hwmon-vid.c | 45 +- drivers/hwmon/lm70.c | 165 - drivers/hwmon/lm78.c | 2 +- drivers/hwmon/lm80.c | 2 +- drivers/hwmon/lm83.c | 50 +- drivers/hwmon/lm87.c | 2 +- drivers/hwmon/sis5595.c | 2 +- drivers/hwmon/smsc47m1.c | 2 +- drivers/hwmon/smsc47m192.c | 648 - drivers/hwmon/w83627ehf.c | 170 +- drivers/hwmon/w83627hf.c | 2 +- drivers/hwmon/w83781d.c | 2 +- drivers/hwmon/w83791d.c | 1254 - drivers/hwmon/w83792d.c | 89 +- drivers/i2c/algos/i2c-algo-bit.c | 4 +- drivers/i2c/algos/i2c-algo-ite.c | 4 +- drivers/i2c/algos/i2c-algo-pca.c | 6 +- drivers/i2c/algos/i2c-algo-pcf.c | 8 +- drivers/i2c/algos/i2c-algo-sibyte.c | 4 +- drivers/i2c/busses/Kconfig | 26 +- drivers/i2c/busses/Makefile | 1 - drivers/i2c/busses/i2c-i801.c | 158 +- drivers/i2c/busses/i2c-ibm_iic.c | 1 + drivers/i2c/busses/i2c-iop3xx.c | 18 +- drivers/i2c/busses/i2c-iop3xx.h | 2 +- drivers/i2c/busses/i2c-mpc.c | 3 +- drivers/i2c/busses/i2c-nforce2.c | 38 +- drivers/i2c/busses/i2c-ocores.c | 340 - drivers/i2c/busses/i2c-piix4.c | 33 +- drivers/i2c/busses/i2c-powermac.c | 5 +- drivers/i2c/busses/i2c-pxa.c | 2 +- drivers/i2c/busses/i2c-s3c2410.c | 3 +- drivers/i2c/busses/scx200_acb.c | 209 +- drivers/i2c/busses/scx200_i2c.c | 1 + drivers/i2c/chips/Kconfig | 8 - drivers/i2c/chips/isp1301_omap.c | 5 +- drivers/i2c/chips/m41t00.c | 346 +- drivers/i2c/chips/pca9539.c | 12 +- drivers/i2c/chips/tps65010.c | 19 +- drivers/i2c/i2c-core.c | 4 +- drivers/i2c/i2c-dev.c | 5 +- drivers/ide/Kconfig | 8 +- drivers/ide/arm/icside.c | 1 + drivers/ide/cris/ide-cris.c | 1 + drivers/ide/h8300/ide-h8300.c | 1 + drivers/ide/ide-cd.c | 131 +- drivers/ide/ide-disk.c | 7 +- drivers/ide/ide-dma.c | 9 +- drivers/ide/ide-floppy.c | 18 +- drivers/ide/ide-io.c | 161 +- drivers/ide/ide-iops.c | 19 +- drivers/ide/ide-lib.c | 8 +- drivers/ide/ide-probe.c | 29 +- drivers/ide/ide-proc.c | 3 +- drivers/ide/ide-tape.c | 64 +- drivers/ide/ide-taskfile.c | 6 +- drivers/ide/ide-timing.h | 8 +- drivers/ide/ide.c | 24 +- drivers/ide/legacy/ali14xx.c | 1 + drivers/ide/legacy/dtc2278.c | 1 + drivers/ide/legacy/gayle.c | 1 + drivers/ide/legacy/hd.c | 4 +- drivers/ide/legacy/ht6560b.c | 1 + drivers/ide/legacy/macide.c | 1 + drivers/ide/legacy/q40ide.c | 1 - drivers/ide/legacy/qd65xx.c | 1 + drivers/ide/legacy/umc8672.c | 1 + drivers/ide/pci/aec62xx.c | 8 +- drivers/ide/pci/alim15x3.c | 3 +- drivers/ide/pci/amd74xx.c | 11 +- drivers/ide/pci/atiixp.c | 1 + drivers/ide/pci/cmd640.c | 1 + drivers/ide/pci/cmd64x.c | 16 + drivers/ide/pci/cs5520.c | 1 + drivers/ide/pci/cs5530.c | 1 + drivers/ide/pci/cs5535.c | 1 + drivers/ide/pci/cy82c693.c | 1 + drivers/ide/pci/generic.c | 51 +- drivers/ide/pci/hpt34x.c | 3 +- drivers/ide/pci/hpt366.c | 1 + drivers/ide/pci/it8172.c | 1 + drivers/ide/pci/it821x.c | 14 +- drivers/ide/pci/ns87415.c | 1 + drivers/ide/pci/pdc202xx_new.c | 7 +- drivers/ide/pci/pdc202xx_old.c | 160 +- drivers/ide/pci/piix.c | 16 +- drivers/ide/pci/rz1000.c | 1 + drivers/ide/pci/sc1200.c | 5 +- drivers/ide/pci/serverworks.c | 44 +- drivers/ide/pci/sgiioc4.c | 66 +- drivers/ide/pci/siimage.c | 57 +- drivers/ide/pci/sis5513.c | 3 +- drivers/ide/pci/sl82c105.c | 5 +- drivers/ide/pci/slc90e66.c | 12 +- drivers/ide/pci/triflex.c | 1 + drivers/ide/pci/trm290.c | 4 +- drivers/ide/pci/via82cxxx.c | 1 + drivers/ide/ppc/mpc8xx.c | 1 + drivers/ide/ppc/pmac.c | 128 +- drivers/ide/setup-pci.c | 6 + drivers/ieee1394/Kconfig | 13 +- drivers/ieee1394/config_roms.c | 1 + drivers/ieee1394/csr1212.c | 2 +- drivers/ieee1394/csr1212.h | 1 - drivers/ieee1394/dma.c | 18 +- drivers/ieee1394/dv1394.c | 1 + drivers/ieee1394/eth1394.c | 54 +- drivers/ieee1394/eth1394.h | 2 + drivers/ieee1394/highlevel.c | 446 +- drivers/ieee1394/hosts.c | 20 +- drivers/ieee1394/hosts.h | 17 +- drivers/ieee1394/ieee1394_core.c | 63 +- drivers/ieee1394/ieee1394_core.h | 2 +- drivers/ieee1394/ieee1394_transactions.c | 10 +- drivers/ieee1394/nodemgr.c | 76 +- drivers/ieee1394/ohci1394.c | 81 +- drivers/ieee1394/ohci1394.h | 10 - drivers/ieee1394/oui2c.sh | 1 + drivers/ieee1394/pcilynx.c | 7 +- drivers/ieee1394/pcilynx.h | 1 + drivers/ieee1394/raw1394.c | 57 +- drivers/ieee1394/sbp2.c | 86 +- drivers/ieee1394/sbp2.h | 23 +- drivers/ieee1394/video1394.c | 17 +- drivers/infiniband/Kconfig | 7 - drivers/infiniband/Makefile | 1 - drivers/infiniband/core/Makefile | 11 +- drivers/infiniband/core/addr.c | 365 - drivers/infiniband/core/cache.c | 33 +- drivers/infiniband/core/cm.c | 145 +- drivers/infiniband/core/cma.c | 1929 - drivers/infiniband/core/fmr_pool.c | 38 +- drivers/infiniband/core/mad.c | 128 +- drivers/infiniband/core/mad_priv.h | 2 + drivers/infiniband/core/mad_rmpp.c | 3 +- drivers/infiniband/core/sa_query.c | 44 +- drivers/infiniband/core/ucm.c | 183 +- drivers/infiniband/core/user_mad.c | 87 +- drivers/infiniband/core/uverbs.h | 6 +- drivers/infiniband/core/uverbs_cmd.c | 983 +- drivers/infiniband/core/uverbs_main.c | 56 +- drivers/infiniband/core/uverbs_marshall.c | 138 - drivers/infiniband/core/verbs.c | 44 +- drivers/infiniband/hw/ipath/Kconfig | 8 +- drivers/infiniband/hw/ipath/Makefile | 2 +- drivers/infiniband/hw/ipath/ipath_common.h | 158 +- drivers/infiniband/hw/ipath/ipath_cq.c | 16 - drivers/infiniband/hw/ipath/ipath_debug.h | 1 - drivers/infiniband/hw/ipath/ipath_diag.c | 98 +- drivers/infiniband/hw/ipath/ipath_driver.c | 454 +- drivers/infiniband/hw/ipath/ipath_eeprom.c | 28 +- drivers/infiniband/hw/ipath/ipath_file_ops.c | 400 +- drivers/infiniband/hw/ipath/ipath_fs.c | 28 +- drivers/infiniband/hw/ipath/ipath_ht400.c | 2 +- drivers/infiniband/hw/ipath/ipath_init_chip.c | 68 +- drivers/infiniband/hw/ipath/ipath_intr.c | 256 +- drivers/infiniband/hw/ipath/ipath_kernel.h | 66 +- drivers/infiniband/hw/ipath/ipath_keys.c | 66 +- drivers/infiniband/hw/ipath/ipath_layer.c | 62 +- drivers/infiniband/hw/ipath/ipath_layer.h | 11 +- drivers/infiniband/hw/ipath/ipath_mad.c | 169 +- drivers/infiniband/hw/ipath/ipath_mr.c | 6 - drivers/infiniband/hw/ipath/ipath_pe800.c | 5 +- drivers/infiniband/hw/ipath/ipath_qp.c | 108 +- drivers/infiniband/hw/ipath/ipath_rc.c | 899 +- drivers/infiniband/hw/ipath/ipath_registers.h | 1 - drivers/infiniband/hw/ipath/ipath_ruc.c | 283 +- drivers/infiniband/hw/ipath/ipath_srq.c | 48 +- drivers/infiniband/hw/ipath/ipath_stats.c | 2 +- drivers/infiniband/hw/ipath/ipath_sysfs.c | 115 +- drivers/infiniband/hw/ipath/ipath_uc.c | 165 +- drivers/infiniband/hw/ipath/ipath_ud.c | 41 +- .../infiniband/hw/ipath/ipath_user_pages.c | 12 +- drivers/infiniband/hw/ipath/ipath_verbs.c | 188 +- drivers/infiniband/hw/ipath/ipath_verbs.h | 82 +- .../infiniband/hw/ipath/ipath_verbs_mcast.c | 39 +- drivers/infiniband/hw/ipath/ipath_wc_x86_64.c | 1 - drivers/infiniband/hw/ipath/ips_common.h | 263 + drivers/infiniband/hw/ipath/verbs_debug.h | 1 - drivers/infiniband/hw/mthca/mthca_allocator.c | 30 +- drivers/infiniband/hw/mthca/mthca_av.c | 5 +- drivers/infiniband/hw/mthca/mthca_cmd.c | 28 +- drivers/infiniband/hw/mthca/mthca_cq.c | 19 +- drivers/infiniband/hw/mthca/mthca_eq.c | 6 +- drivers/infiniband/hw/mthca/mthca_mad.c | 14 +- drivers/infiniband/hw/mthca/mthca_main.c | 12 +- drivers/infiniband/hw/mthca/mthca_provider.c | 44 +- drivers/infiniband/hw/mthca/mthca_provider.h | 7 +- drivers/infiniband/hw/mthca/mthca_qp.c | 127 +- drivers/infiniband/hw/mthca/mthca_reset.c | 1 + drivers/infiniband/hw/mthca/mthca_srq.c | 16 +- drivers/infiniband/ulp/ipoib/Kconfig | 3 +- drivers/infiniband/ulp/ipoib/ipoib.h | 36 +- drivers/infiniband/ulp/ipoib/ipoib_fs.c | 4 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 31 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 51 +- .../infiniband/ulp/ipoib/ipoib_multicast.c | 26 +- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 +- drivers/infiniband/ulp/iser/Kconfig | 11 - drivers/infiniband/ulp/iser/Makefile | 4 - drivers/infiniband/ulp/iser/iscsi_iser.c | 667 - drivers/infiniband/ulp/iser/iscsi_iser.h | 354 - drivers/infiniband/ulp/iser/iser_initiator.c | 738 - drivers/infiniband/ulp/iser/iser_memory.c | 401 - drivers/infiniband/ulp/iser/iser_verbs.c | 827 - drivers/infiniband/ulp/srp/ib_srp.c | 512 +- drivers/infiniband/ulp/srp/ib_srp.h | 33 +- drivers/input/Kconfig | 2 +- drivers/input/evdev.c | 20 +- drivers/input/gameport/emu10k1-gp.c | 1 + drivers/input/gameport/fm801-gp.c | 4 +- drivers/input/gameport/gameport.c | 66 +- drivers/input/gameport/ns558.c | 1 + drivers/input/input.c | 139 +- drivers/input/joydev.c | 69 +- drivers/input/joystick/a3d.c | 2 +- drivers/input/joystick/analog.c | 24 +- drivers/input/joystick/cobra.c | 3 +- drivers/input/joystick/db9.c | 5 +- drivers/input/joystick/gamecon.c | 3 +- drivers/input/joystick/gf2k.c | 2 +- drivers/input/joystick/grip.c | 3 +- drivers/input/joystick/guillemot.c | 2 +- drivers/input/joystick/iforce/iforce-ff.c | 8 +- drivers/input/joystick/iforce/iforce-main.c | 25 +- drivers/input/joystick/iforce/iforce.h | 1 + drivers/input/joystick/interact.c | 2 +- drivers/input/joystick/magellan.c | 2 +- drivers/input/joystick/sidewinder.c | 15 +- drivers/input/joystick/spaceball.c | 4 +- drivers/input/joystick/spaceorb.c | 2 +- drivers/input/joystick/stinger.c | 2 +- drivers/input/joystick/twidjoy.c | 2 +- drivers/input/joystick/warrior.c | 2 +- drivers/input/keyboard/amikbd.c | 34 +- drivers/input/keyboard/atkbd.c | 330 +- drivers/input/keyboard/corgikbd.c | 2 +- drivers/input/keyboard/hilkbd.c | 1 + drivers/input/keyboard/lkkbd.c | 9 +- drivers/input/keyboard/locomokbd.c | 1 + drivers/input/keyboard/newtonkbd.c | 2 +- drivers/input/keyboard/spitzkbd.c | 12 +- drivers/input/keyboard/sunkbd.c | 2 +- drivers/input/keyboard/xtkbd.c | 2 +- drivers/input/misc/Kconfig | 2 +- drivers/input/misc/ixp4xx-beeper.c | 2 +- drivers/input/misc/sparcspkr.c | 219 +- drivers/input/misc/wistron_btns.c | 23 +- drivers/input/mouse/alps.c | 2 +- drivers/input/mouse/inport.c | 1 + drivers/input/mouse/logips2pp.c | 3 +- drivers/input/mouse/psmouse-base.c | 40 +- drivers/input/mouse/rpcmouse.c | 2 +- drivers/input/mouse/sermouse.c | 3 +- drivers/input/mouse/trackpoint.c | 52 +- drivers/input/mouse/vsxxxaa.c | 23 +- drivers/input/mousedev.c | 43 +- drivers/input/power.c | 1 + drivers/input/serio/ct82c710.c | 7 +- drivers/input/serio/gscps2.c | 3 +- drivers/input/serio/i8042-sparcio.h | 109 +- drivers/input/serio/i8042.c | 5 +- drivers/input/serio/i8042.h | 1 + drivers/input/serio/libps2.c | 9 - drivers/input/serio/pcips2.c | 2 +- drivers/input/serio/serio.c | 74 +- drivers/input/serio/serio_raw.c | 1 + drivers/input/touchscreen/ads7846.c | 3 +- drivers/input/touchscreen/corgi_ts.c | 4 +- drivers/input/touchscreen/gunze.c | 2 +- drivers/input/touchscreen/h3600_ts_input.c | 8 +- drivers/input/touchscreen/hp680_ts_input.c | 2 +- drivers/input/touchscreen/mtouch.c | 2 +- drivers/input/tsdev.c | 23 +- drivers/isdn/capi/capi.c | 60 +- drivers/isdn/capi/capidrv.c | 3 +- drivers/isdn/capi/capifs.c | 8 +- drivers/isdn/capi/capiutil.c | 1 + drivers/isdn/divert/divert_procfs.c | 1 + drivers/isdn/divert/isdn_divert.c | 2 +- drivers/isdn/gigaset/bas-gigaset.c | 302 +- drivers/isdn/gigaset/common.c | 19 +- drivers/isdn/gigaset/ev-layer.c | 13 +- drivers/isdn/gigaset/gigaset.h | 5 +- drivers/isdn/gigaset/interface.c | 16 +- drivers/isdn/gigaset/proc.c | 21 +- drivers/isdn/gigaset/usb-gigaset.c | 4 +- drivers/isdn/hardware/avm/b1dma.c | 1 + drivers/isdn/hardware/avm/b1pci.c | 5 +- drivers/isdn/hardware/avm/b1pcmcia.c | 2 +- drivers/isdn/hardware/avm/c4.c | 3 +- drivers/isdn/hardware/avm/t1pci.c | 3 +- drivers/isdn/hardware/eicon/capimain.c | 1 + drivers/isdn/hardware/eicon/diva_didd.c | 1 + drivers/isdn/hardware/eicon/divamnt.c | 4 + drivers/isdn/hardware/eicon/divasi.c | 4 + drivers/isdn/hardware/eicon/divasmain.c | 6 +- drivers/isdn/hardware/eicon/divasproc.c | 1 + drivers/isdn/hardware/eicon/divasync.h | 1 + drivers/isdn/hardware/eicon/platform.h | 1 + drivers/isdn/hisax/asuscom.c | 6 +- drivers/isdn/hisax/avm_a1.c | 2 +- drivers/isdn/hisax/avm_a1p.c | 2 +- drivers/isdn/hisax/avm_pci.c | 11 +- drivers/isdn/hisax/bkm_a4t.c | 7 +- drivers/isdn/hisax/bkm_a8.c | 19 +- drivers/isdn/hisax/config.c | 9 +- drivers/isdn/hisax/diva.c | 17 +- drivers/isdn/hisax/elsa.c | 23 +- drivers/isdn/hisax/elsa_ser.c | 1 + drivers/isdn/hisax/enternow_pci.c | 7 +- drivers/isdn/hisax/gazel.c | 11 +- drivers/isdn/hisax/hfc4s8s_l1.c | 5 +- drivers/isdn/hisax/hfc_2bds0.c | 4 +- drivers/isdn/hisax/hfc_2bs0.c | 4 +- drivers/isdn/hisax/hfc_pci.c | 11 +- drivers/isdn/hisax/hfc_usb.c | 1 + drivers/isdn/hisax/hfcscard.c | 6 +- drivers/isdn/hisax/hisax.h | 1 + drivers/isdn/hisax/hisax_debug.h | 1 + drivers/isdn/hisax/hisax_fcpcipnp.c | 4 +- drivers/isdn/hisax/icc.c | 8 +- drivers/isdn/hisax/icc.h | 2 +- drivers/isdn/hisax/ipacx.c | 19 +- drivers/isdn/hisax/isdnl3.c | 1 + drivers/isdn/hisax/isurf.c | 4 +- drivers/isdn/hisax/ix1_micro.c | 6 +- drivers/isdn/hisax/jade.c | 6 +- drivers/isdn/hisax/l3dss1.c | 1 + drivers/isdn/hisax/mic.c | 2 +- drivers/isdn/hisax/netjet.c | 2 +- drivers/isdn/hisax/niccy.c | 7 +- drivers/isdn/hisax/nj_s.c | 7 +- drivers/isdn/hisax/nj_u.c | 7 +- drivers/isdn/hisax/q931.c | 4 +- drivers/isdn/hisax/s0box.c | 2 +- drivers/isdn/hisax/saphir.c | 2 +- drivers/isdn/hisax/sedlbauer.c | 5 +- drivers/isdn/hisax/sedlbauer_cs.c | 2 +- drivers/isdn/hisax/sportster.c | 4 +- drivers/isdn/hisax/st5481.h | 1 + drivers/isdn/hisax/st5481_init.c | 1 + drivers/isdn/hisax/teleint.c | 2 +- drivers/isdn/hisax/teles0.c | 2 +- drivers/isdn/hisax/teles3.c | 1 - drivers/isdn/hisax/telespci.c | 12 +- drivers/isdn/hisax/w6692.c | 13 +- drivers/isdn/hysdn/boardergo.c | 3 +- drivers/isdn/hysdn/hysdn_defs.h | 1 + drivers/isdn/hysdn/hysdn_init.c | 1 + drivers/isdn/hysdn/hysdn_sched.c | 1 + drivers/isdn/i4l/isdn_common.c | 50 +- drivers/isdn/i4l/isdn_net.c | 1 + drivers/isdn/i4l/isdn_ppp.c | 3 +- drivers/isdn/i4l/isdn_tty.c | 6 +- drivers/isdn/i4l/isdn_tty.h | 1 + drivers/isdn/i4l/isdn_x25iface.c | 4 +- drivers/isdn/icn/icn.c | 3 +- drivers/isdn/isdnloop/isdnloop.c | 4 +- drivers/isdn/pcbit/drv.c | 16 +- drivers/isdn/sc/init.c | 2 +- drivers/isdn/sc/ioctl.c | 1 - drivers/leds/Kconfig | 22 - drivers/leds/Makefile | 3 - drivers/leds/led-class.c | 1 + drivers/leds/led-core.c | 2 +- drivers/leds/led-triggers.c | 3 +- drivers/leds/leds-ams-delta.c | 161 - drivers/leds/leds-corgi.c | 1 + drivers/leds/leds-ixp4xx-gpio.c | 1 + drivers/leds/leds-locomo.c | 3 +- drivers/leds/leds-net48xx.c | 116 - drivers/leds/leds-s3c24xx.c | 1 + drivers/leds/leds-spitz.c | 1 + drivers/leds/leds-tosa.c | 1 + drivers/leds/ledtrig-heartbeat.c | 118 - drivers/leds/ledtrig-timer.c | 1 + drivers/macintosh/Kconfig | 46 +- drivers/macintosh/Makefile | 4 +- drivers/macintosh/adb.c | 4 + drivers/macintosh/adbhid.c | 41 +- drivers/macintosh/apm_emu.c | 1 + drivers/macintosh/mac_hid.c | 1 + drivers/macintosh/macio-adb.c | 19 +- drivers/macintosh/macio_asic.c | 157 +- drivers/macintosh/macio_sysfs.c | 1 + drivers/macintosh/mediabay.c | 1 + drivers/macintosh/smu.c | 64 +- drivers/macintosh/therm_adt746x.c | 1 + drivers/macintosh/therm_pm72.c | 219 +- drivers/macintosh/therm_pm72.h | 35 +- drivers/macintosh/therm_windtunnel.c | 1 + drivers/macintosh/via-cuda.c | 25 +- drivers/macintosh/via-pmu-backlight.c | 187 - drivers/macintosh/via-pmu-event.c | 80 - drivers/macintosh/via-pmu-event.h | 8 - drivers/macintosh/via-pmu-led.c | 144 - drivers/macintosh/via-pmu.c | 211 +- drivers/macintosh/windfarm_cpufreq_clamp.c | 1 + drivers/macintosh/windfarm_smu_controls.c | 2 +- drivers/macintosh/windfarm_smu_sensors.c | 2 +- drivers/md/Kconfig | 46 +- drivers/md/Makefile | 5 +- drivers/md/bitmap.c | 484 +- drivers/md/dm-crypt.c | 62 +- drivers/md/dm-emc.c | 40 +- drivers/md/dm-exception-store.c | 2 - drivers/md/dm-ioctl.c | 105 +- drivers/md/dm-linear.c | 8 +- drivers/md/dm-log.c | 304 +- drivers/md/dm-log.h | 41 +- drivers/md/dm-mpath.c | 43 +- drivers/md/dm-raid1.c | 772 +- drivers/md/dm-round-robin.c | 6 +- drivers/md/dm-snap.c | 12 +- drivers/md/dm-stripe.c | 25 +- drivers/md/dm-table.c | 57 +- drivers/md/dm-target.c | 2 - drivers/md/dm-zero.c | 8 +- drivers/md/dm.c | 89 +- drivers/md/dm.h | 81 +- drivers/md/kcopyd.c | 5 +- drivers/md/linear.c | 80 +- drivers/md/md.c | 750 +- drivers/md/multipath.c | 2 +- drivers/md/raid1.c | 104 +- drivers/md/raid10.c | 81 +- drivers/md/raid5.c | 1484 +- drivers/md/raid6algos.c | 7 +- drivers/md/raid6main.c | 2427 ++ drivers/media/Kconfig | 7 +- drivers/media/common/Makefile | 2 +- drivers/media/common/ir-functions.c | 1 + drivers/media/common/ir-keymaps.c | 82 +- drivers/media/common/saa7146_core.c | 2 +- drivers/media/common/saa7146_fops.c | 4 - drivers/media/common/saa7146_hlp.c | 3 +- drivers/media/common/saa7146_video.c | 4 - drivers/media/common/saa7146_vv_ksyms.c | 12 + drivers/media/dvb/b2c2/Kconfig | 1 - drivers/media/dvb/b2c2/flexcop-common.h | 1 + drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 122 +- drivers/media/dvb/b2c2/flexcop-pci.c | 21 +- drivers/media/dvb/b2c2/flexcop-usb.c | 10 +- drivers/media/dvb/b2c2/flexcop.c | 12 +- drivers/media/dvb/bt8xx/Kconfig | 1 - drivers/media/dvb/bt8xx/bt878.c | 13 +- drivers/media/dvb/bt8xx/dst.c | 658 +- drivers/media/dvb/bt8xx/dst_ca.c | 116 +- drivers/media/dvb/bt8xx/dst_common.h | 33 +- drivers/media/dvb/bt8xx/dvb-bt8xx.c | 110 +- drivers/media/dvb/bt8xx/dvb-bt8xx.h | 1 - drivers/media/dvb/cinergyT2/Kconfig | 2 +- drivers/media/dvb/cinergyT2/cinergyT2.c | 9 +- drivers/media/dvb/dvb-core/Makefile | 6 +- drivers/media/dvb/dvb-core/dmxdev.c | 3 + drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 25 +- drivers/media/dvb/dvb-core/dvb_demux.c | 4 +- drivers/media/dvb/dvb-core/dvb_frontend.c | 179 +- drivers/media/dvb/dvb-core/dvb_frontend.h | 45 +- drivers/media/dvb/dvb-core/dvb_math.c | 145 - drivers/media/dvb/dvb-core/dvb_math.h | 58 - drivers/media/dvb/dvb-core/dvb_net.c | 230 +- drivers/media/dvb/dvb-core/dvbdev.c | 18 +- drivers/media/dvb/dvb-core/dvbdev.h | 5 +- drivers/media/dvb/dvb-usb/Kconfig | 11 - drivers/media/dvb/dvb-usb/Makefile | 3 - drivers/media/dvb/dvb-usb/cxusb.c | 48 +- drivers/media/dvb/dvb-usb/dibusb-common.c | 9 +- drivers/media/dvb/dvb-usb/dibusb-mb.c | 7 +- drivers/media/dvb/dvb-usb/digitv.c | 15 +- drivers/media/dvb/dvb-usb/dtt200u-fe.c | 8 +- drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 17 +- drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | 24 +- drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 4 +- drivers/media/dvb/dvb-usb/dvb-usb.h | 7 +- drivers/media/dvb/dvb-usb/gp8psk-fe.c | 272 - drivers/media/dvb/dvb-usb/gp8psk.c | 256 - drivers/media/dvb/dvb-usb/gp8psk.h | 79 - drivers/media/dvb/dvb-usb/umt-010.c | 2 +- drivers/media/dvb/dvb-usb/vp702x-fe.c | 7 +- drivers/media/dvb/dvb-usb/vp7045-fe.c | 9 +- drivers/media/dvb/frontends/Kconfig | 74 +- drivers/media/dvb/frontends/Makefile | 4 +- drivers/media/dvb/frontends/bcm3510.c | 4 +- drivers/media/dvb/frontends/bsbe1.h | 6 +- drivers/media/dvb/frontends/bsru6.h | 6 +- drivers/media/dvb/frontends/cx22700.c | 32 +- drivers/media/dvb/frontends/cx22700.h | 4 + drivers/media/dvb/frontends/cx22702.c | 29 +- drivers/media/dvb/frontends/cx22702.h | 7 + drivers/media/dvb/frontends/cx24110.c | 26 +- drivers/media/dvb/frontends/cx24110.h | 5 + drivers/media/dvb/frontends/cx24123.c | 199 +- drivers/media/dvb/frontends/cx24123.h | 13 + drivers/media/dvb/frontends/dib3000-common.h | 2 + drivers/media/dvb/frontends/dib3000.h | 4 + drivers/media/dvb/frontends/dib3000mb.c | 12 +- drivers/media/dvb/frontends/dib3000mc.c | 15 +- drivers/media/dvb/frontends/dvb-pll.c | 198 +- drivers/media/dvb/frontends/dvb-pll.h | 18 +- drivers/media/dvb/frontends/dvb_dummy_fe.c | 21 +- drivers/media/dvb/frontends/isl6421.c | 149 - drivers/media/dvb/frontends/isl6421.h | 46 - drivers/media/dvb/frontends/l64781.c | 11 +- drivers/media/dvb/frontends/l64781.h | 4 + drivers/media/dvb/frontends/lg_h06xf.h | 64 - drivers/media/dvb/frontends/lgdt330x.c | 27 +- drivers/media/dvb/frontends/lgdt330x.h | 1 + drivers/media/dvb/frontends/lnbp21.c | 145 - drivers/media/dvb/frontends/lnbp21.h | 102 +- drivers/media/dvb/frontends/mt312.c | 46 +- drivers/media/dvb/frontends/mt312.h | 4 + drivers/media/dvb/frontends/mt352.c | 23 +- drivers/media/dvb/frontends/mt352.h | 6 + drivers/media/dvb/frontends/nxt200x.c | 24 +- drivers/media/dvb/frontends/nxt200x.h | 4 + drivers/media/dvb/frontends/nxt6000.c | 29 +- drivers/media/dvb/frontends/nxt6000.h | 4 + drivers/media/dvb/frontends/or51132.c | 157 +- drivers/media/dvb/frontends/or51132.h | 2 + drivers/media/dvb/frontends/or51211.c | 6 +- drivers/media/dvb/frontends/s5h1420.c | 43 +- drivers/media/dvb/frontends/s5h1420.h | 4 + drivers/media/dvb/frontends/sp8870.c | 33 +- drivers/media/dvb/frontends/sp8870.h | 4 + drivers/media/dvb/frontends/sp887x.c | 40 +- drivers/media/dvb/frontends/sp887x.h | 6 + drivers/media/dvb/frontends/stv0297.c | 73 +- drivers/media/dvb/frontends/stv0297.h | 6 +- drivers/media/dvb/frontends/stv0299.c | 41 +- drivers/media/dvb/frontends/stv0299.h | 5 + drivers/media/dvb/frontends/tda10021.c | 40 +- drivers/media/dvb/frontends/tda10021.h | 6 +- drivers/media/dvb/frontends/tda1004x.c | 55 +- drivers/media/dvb/frontends/tda1004x.h | 5 + drivers/media/dvb/frontends/tda8083.c | 12 +- drivers/media/dvb/frontends/tda8083.h | 4 + drivers/media/dvb/frontends/ves1820.c | 20 +- drivers/media/dvb/frontends/ves1820.h | 4 + drivers/media/dvb/frontends/ves1x93.c | 29 +- drivers/media/dvb/frontends/ves1x93.h | 4 + drivers/media/dvb/frontends/zl10353.c | 30 +- drivers/media/dvb/frontends/zl10353.h | 6 +- drivers/media/dvb/pluto2/Kconfig | 1 - drivers/media/dvb/pluto2/pluto2.c | 17 +- drivers/media/dvb/ttpci/Kconfig | 8 - drivers/media/dvb/ttpci/Makefile | 6 +- drivers/media/dvb/ttpci/av7110.c | 150 +- drivers/media/dvb/ttpci/av7110.h | 4 + drivers/media/dvb/ttpci/av7110_av.c | 25 +- drivers/media/dvb/ttpci/av7110_v4l.c | 62 +- drivers/media/dvb/ttpci/budget-av.c | 277 +- drivers/media/dvb/ttpci/budget-ci.c | 63 +- drivers/media/dvb/ttpci/budget-core.c | 61 +- drivers/media/dvb/ttpci/budget-patch.c | 47 +- drivers/media/dvb/ttpci/budget.c | 70 +- drivers/media/dvb/ttpci/budget.h | 7 +- drivers/media/dvb/ttusb-budget/Kconfig | 5 +- .../media/dvb/ttusb-budget/dvb-ttusb-budget.c | 277 +- drivers/media/dvb/ttusb-dec/ttusb_dec.c | 6 +- drivers/media/dvb/ttusb-dec/ttusbdecfe.c | 8 +- drivers/media/radio/Kconfig | 14 +- drivers/media/radio/Makefile | 3 - drivers/media/radio/miropcm20-radio.c | 17 +- drivers/media/radio/miropcm20-rds-core.c | 34 +- drivers/media/radio/miropcm20-rds.c | 3 +- drivers/media/radio/radio-aimslab.c | 51 +- drivers/media/radio/radio-aztech.c | 45 +- drivers/media/radio/radio-cadet.c | 317 +- drivers/media/radio/radio-gemtek-pci.c | 48 +- drivers/media/radio/radio-gemtek.c | 33 +- drivers/media/radio/radio-maestro.c | 10 +- drivers/media/radio/radio-maxiradio.c | 81 +- drivers/media/radio/radio-rtrack2.c | 35 +- drivers/media/radio/radio-sf16fmi.c | 41 +- drivers/media/radio/radio-sf16fmr2.c | 5 +- drivers/media/radio/radio-terratec.c | 63 +- drivers/media/radio/radio-trust.c | 27 +- drivers/media/radio/radio-typhoon.c | 5 +- drivers/media/radio/radio-zoltrix.c | 31 +- drivers/media/video/Kconfig | 107 +- drivers/media/video/Makefile | 10 +- drivers/media/video/arv.c | 5 +- drivers/media/video/bt866.c | 377 - drivers/media/video/bt8xx/Kconfig | 2 +- drivers/media/video/bt8xx/bttv-cards.c | 18 +- drivers/media/video/bt8xx/bttv-driver.c | 27 +- drivers/media/video/bt8xx/bttv-gpio.c | 14 + drivers/media/video/bt8xx/bttv-input.c | 3 +- drivers/media/video/bt8xx/bttv-vbi.c | 15 +- drivers/media/video/bt8xx/bttv.h | 1 + drivers/media/video/bt8xx/bttvp.h | 4 +- drivers/media/video/bw-qcam.c | 3 +- drivers/media/video/c-qcam.c | 1 - drivers/media/video/compat_ioctl32.c | 55 +- drivers/media/video/cpia.c | 23 +- drivers/media/video/cpia.h | 3 +- drivers/media/video/cpia2/Kconfig | 2 +- drivers/media/video/cpia2/cpia2.h | 1 - drivers/media/video/cpia2/cpia2_v4l.c | 7 +- drivers/media/video/cpia_pp.c | 9 +- drivers/media/video/cpia_usb.c | 6 + drivers/media/video/cx2341x.c | 932 - drivers/media/video/cx25840/cx25840-audio.c | 54 +- drivers/media/video/cx25840/cx25840-core.c | 310 +- drivers/media/video/cx25840/cx25840-core.h | 8 +- drivers/media/video/cx25840/cx25840-vbi.c | 177 +- drivers/media/video/cx88/Kconfig | 17 +- drivers/media/video/cx88/Makefile | 5 +- drivers/media/video/cx88/cx88-alsa.c | 15 +- drivers/media/video/cx88/cx88-blackbird.c | 949 +- drivers/media/video/cx88/cx88-cards.c | 174 +- drivers/media/video/cx88/cx88-core.c | 14 +- drivers/media/video/cx88/cx88-dvb.c | 280 +- drivers/media/video/cx88/cx88-i2c.c | 9 +- drivers/media/video/cx88/cx88-input.c | 34 +- drivers/media/video/cx88/cx88-mpeg.c | 56 +- drivers/media/video/cx88/cx88-tvaudio.c | 17 +- drivers/media/video/cx88/cx88-vbi.c | 4 +- drivers/media/video/cx88/cx88-video.c | 78 +- drivers/media/video/cx88/cx88.h | 35 +- drivers/media/{radio => video}/dsbr100.c | 1 - drivers/media/video/em28xx/em28xx-cards.c | 64 +- drivers/media/video/em28xx/em28xx-core.c | 12 +- drivers/media/video/em28xx/em28xx-i2c.c | 31 +- drivers/media/video/em28xx/em28xx-input.c | 8 +- drivers/media/video/em28xx/em28xx-video.c | 24 +- drivers/media/video/em28xx/em28xx.h | 8 +- drivers/media/video/et61x251/et61x251_core.c | 3 + drivers/media/video/ir-kbd-i2c.c | 60 +- drivers/media/video/ks0127.c | 846 - drivers/media/video/ks0127.h | 53 - drivers/media/video/meye.c | 8 +- drivers/media/video/meye.h | 1 + drivers/media/video/msp3400-driver.c | 124 +- drivers/media/video/msp3400-driver.h | 5 +- drivers/media/video/msp3400-kthreads.c | 47 +- drivers/media/video/ov511.c | 5 +- drivers/media/video/ov511.h | 1 - drivers/media/video/planb.c | 1 - drivers/media/video/pms.c | 3 +- drivers/media/video/pvrusb2/Kconfig | 57 - drivers/media/video/pvrusb2/Makefile | 18 - drivers/media/video/pvrusb2/pvrusb2-audio.c | 204 - drivers/media/video/pvrusb2/pvrusb2-audio.h | 40 - drivers/media/video/pvrusb2/pvrusb2-context.c | 230 - drivers/media/video/pvrusb2/pvrusb2-context.h | 92 - drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 602 - drivers/media/video/pvrusb2/pvrusb2-ctrl.h | 123 - .../media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | 279 - .../media/video/pvrusb2/pvrusb2-cx2584x-v4l.h | 53 - drivers/media/video/pvrusb2/pvrusb2-debug.h | 67 - .../media/video/pvrusb2/pvrusb2-debugifc.c | 478 - .../media/video/pvrusb2/pvrusb2-debugifc.h | 53 - drivers/media/video/pvrusb2/pvrusb2-eeprom.c | 164 - drivers/media/video/pvrusb2/pvrusb2-eeprom.h | 40 - drivers/media/video/pvrusb2/pvrusb2-encoder.c | 418 - drivers/media/video/pvrusb2/pvrusb2-encoder.h | 42 - .../video/pvrusb2/pvrusb2-hdw-internal.h | 368 - drivers/media/video/pvrusb2/pvrusb2-hdw.c | 3128 -- drivers/media/video/pvrusb2/pvrusb2-hdw.h | 303 - .../video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 109 - .../video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c | 232 - .../video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h | 47 - .../media/video/pvrusb2/pvrusb2-i2c-core.c | 941 - .../media/video/pvrusb2/pvrusb2-i2c-core.h | 93 - drivers/media/video/pvrusb2/pvrusb2-io.c | 667 - drivers/media/video/pvrusb2/pvrusb2-io.h | 91 - drivers/media/video/pvrusb2/pvrusb2-ioread.c | 510 - drivers/media/video/pvrusb2/pvrusb2-ioread.h | 49 - drivers/media/video/pvrusb2/pvrusb2-main.c | 171 - drivers/media/video/pvrusb2/pvrusb2-std.c | 408 - drivers/media/video/pvrusb2/pvrusb2-std.h | 60 - drivers/media/video/pvrusb2/pvrusb2-sysfs.c | 925 - drivers/media/video/pvrusb2/pvrusb2-sysfs.h | 47 - drivers/media/video/pvrusb2/pvrusb2-tuner.c | 122 - drivers/media/video/pvrusb2/pvrusb2-tuner.h | 38 - drivers/media/video/pvrusb2/pvrusb2-util.h | 63 - drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 1087 - drivers/media/video/pvrusb2/pvrusb2-v4l2.h | 40 - .../media/video/pvrusb2/pvrusb2-video-v4l.c | 253 - .../media/video/pvrusb2/pvrusb2-video-v4l.h | 52 - drivers/media/video/pvrusb2/pvrusb2-wm8775.c | 170 - drivers/media/video/pvrusb2/pvrusb2-wm8775.h | 53 - drivers/media/video/pvrusb2/pvrusb2.h | 43 - drivers/media/video/pwc/Kconfig | 13 +- drivers/media/video/pwc/Makefile | 11 +- drivers/media/video/pwc/pwc-ctrl.c | 699 +- drivers/media/video/pwc/pwc-dec1.c | 50 - drivers/media/video/pwc/pwc-dec1.h | 43 - drivers/media/video/pwc/pwc-dec23.c | 941 - drivers/media/video/pwc/pwc-dec23.h | 67 - drivers/media/video/pwc/pwc-if.c | 1340 +- drivers/media/video/pwc/pwc-kiara.c | 575 +- drivers/media/video/pwc/pwc-kiara.h | 8 +- drivers/media/video/pwc/pwc-misc.c | 67 +- drivers/media/video/pwc/pwc-timon.c | 1132 +- drivers/media/video/pwc/pwc-timon.h | 8 +- drivers/media/video/pwc/pwc-uncompress.c | 154 +- drivers/media/video/pwc/pwc-uncompress.h | 5 +- drivers/media/video/pwc/pwc-v4l.c | 1202 - drivers/media/video/pwc/pwc.h | 175 +- drivers/media/video/saa5246a.c | 1 - drivers/media/video/saa5249.c | 1 - drivers/media/video/saa7110.c | 1 - drivers/media/video/saa7115.c | 137 +- drivers/media/video/saa7127.c | 2 +- drivers/media/video/saa7134/Kconfig | 1 - drivers/media/video/saa7134/saa6752hs.c | 315 +- drivers/media/video/saa7134/saa7134-alsa.c | 14 +- drivers/media/video/saa7134/saa7134-cards.c | 58 +- drivers/media/video/saa7134/saa7134-core.c | 29 +- drivers/media/video/saa7134/saa7134-dvb.c | 259 +- drivers/media/video/saa7134/saa7134-empress.c | 24 +- drivers/media/video/saa7134/saa7134-input.c | 13 +- drivers/media/video/saa7134/saa7134-oss.c | 12 +- drivers/media/video/saa7134/saa7134-video.c | 6 +- drivers/media/video/saa7134/saa7134.h | 7 +- drivers/media/video/se401.c | 1 + drivers/media/video/se401.h | 1 - drivers/media/video/sn9c102/sn9c102_core.c | 3 + drivers/media/video/stradis.c | 7 +- drivers/media/video/stv680.c | 2 +- drivers/media/video/tda9875.c | 3 +- drivers/media/video/tda9887.c | 488 +- drivers/media/video/tea5767.c | 2 +- drivers/media/video/tlv320aic23b.c | 217 - drivers/media/video/tuner-3036.c | 1 - drivers/media/video/tuner-core.c | 67 +- drivers/media/video/tuner-simple.c | 97 +- drivers/media/video/tuner-types.c | 108 +- drivers/media/video/tvaudio.c | 1 + drivers/media/video/tveeprom.c | 20 +- drivers/media/video/tvmixer.c | 8 + drivers/media/video/tvp5150.c | 45 +- drivers/media/video/usbvideo/Kconfig | 18 +- drivers/media/video/usbvideo/Makefile | 1 - drivers/media/video/usbvideo/konicawc.c | 3 +- .../media/video/usbvideo/quickcam_messenger.c | 1120 - .../media/video/usbvideo/quickcam_messenger.h | 126 - drivers/media/video/usbvideo/usbvideo.h | 2 +- drivers/media/video/v4l1-compat.c | 6 +- drivers/media/video/v4l2-common.c | 572 +- drivers/media/video/video-buf-dvb.c | 5 +- drivers/media/video/videocodec.c | 1 + drivers/media/video/videocodec.h | 16 +- drivers/media/video/videodev.c | 1307 +- drivers/media/video/vino.c | 2 +- drivers/media/video/vivi.c | 664 +- drivers/media/video/vpx3220.c | 1 - drivers/media/video/w9966.c | 1 - drivers/media/video/w9968cf.h | 1 + drivers/media/video/zc0301/Kconfig | 6 +- drivers/media/video/zc0301/Makefile | 2 +- drivers/media/video/zc0301/zc0301_core.c | 22 +- drivers/media/video/zc0301/zc0301_pas202bcb.c | 4 +- drivers/media/video/zc0301/zc0301_pb0330.c | 187 - drivers/media/video/zc0301/zc0301_sensor.h | 26 +- drivers/media/video/zoran.h | 10 +- drivers/media/video/zoran_card.c | 91 +- drivers/media/video/zoran_device.c | 3 +- drivers/media/video/zoran_driver.c | 50 +- drivers/media/video/zoran_procfs.c | 2 +- drivers/media/video/zr36120.c | 2 +- drivers/media/video/zr36120_mem.c | 1 + drivers/message/fusion/Kconfig | 2 + drivers/message/fusion/Makefile | 6 +- drivers/message/fusion/lsi/fc_log.h | 89 + drivers/message/fusion/lsi/mpi.h | 5 +- drivers/message/fusion/lsi/mpi_cnfg.h | 158 +- drivers/message/fusion/lsi/mpi_history.txt | 76 +- drivers/message/fusion/lsi/mpi_init.h | 4 +- drivers/message/fusion/lsi/mpi_ioc.h | 154 +- drivers/message/fusion/lsi/mpi_log_sas.h | 82 +- drivers/message/fusion/lsi/mpi_sas.h | 13 +- drivers/message/fusion/lsi/mpi_targ.h | 5 +- drivers/message/fusion/mptbase.c | 396 +- drivers/message/fusion/mptbase.h | 36 +- drivers/message/fusion/mptctl.c | 4 +- drivers/message/fusion/mptctl.h | 5 + drivers/message/fusion/mptfc.c | 502 +- drivers/message/fusion/mptsas.c | 1048 +- drivers/message/fusion/mptscsih.c | 141 +- drivers/message/fusion/mptspi.c | 14 +- drivers/message/i2o/core.h | 3 - drivers/message/i2o/debug.c | 1 + drivers/message/i2o/i2o_block.c | 1 + drivers/message/i2o/i2o_config.c | 4 +- drivers/message/i2o/i2o_scsi.c | 4 +- drivers/message/i2o/iop.c | 15 +- drivers/message/i2o/pci.c | 2 +- drivers/mfd/ucb1x00-core.c | 9 +- drivers/mfd/ucb1x00-ts.c | 1 + drivers/mfd/ucb1x00.h | 1 - drivers/misc/ibmasm/ibmasm.h | 1 + drivers/misc/ibmasm/ibmasmfs.c | 24 +- drivers/misc/ibmasm/module.c | 4 +- drivers/mmc/at91_mci.c | 144 +- drivers/mmc/au1xmmc.c | 3 +- drivers/mmc/imxmmc.c | 72 +- drivers/mmc/mmc.c | 58 +- drivers/mmc/mmc_block.c | 64 +- drivers/mmc/mmc_queue.c | 3 +- drivers/mmc/mmci.c | 9 +- drivers/mmc/omap.c | 52 +- drivers/mmc/pxamci.c | 1 + drivers/mmc/sdhci.c | 604 +- drivers/mmc/sdhci.h | 34 +- drivers/mmc/wbsd.c | 12 +- drivers/mtd/Kconfig | 8 +- drivers/mtd/chips/Kconfig | 1 + drivers/mtd/chips/Makefile | 7 + drivers/mtd/chips/amd_flash.c | 8 +- drivers/mtd/chips/cfi_cmdset_0001.c | 474 +- drivers/mtd/chips/cfi_cmdset_0002.c | 134 +- drivers/mtd/chips/cfi_cmdset_0020.c | 22 +- drivers/mtd/chips/cfi_probe.c | 9 +- drivers/mtd/chips/chipreg.c | 1 + drivers/mtd/chips/gen_probe.c | 45 +- drivers/mtd/chips/jedec.c | 1 - drivers/mtd/chips/jedec_probe.c | 15 +- drivers/mtd/chips/map_absent.c | 3 +- drivers/mtd/chips/map_ram.c | 3 +- drivers/mtd/chips/map_rom.c | 5 +- drivers/mtd/chips/sharp.c | 1 - drivers/mtd/devices/Kconfig | 6 +- drivers/mtd/devices/Makefile | 7 + drivers/mtd/devices/block2mtd.c | 120 +- drivers/mtd/devices/doc2000.c | 308 +- drivers/mtd/devices/doc2001.c | 239 +- drivers/mtd/devices/doc2001plus.c | 224 +- drivers/mtd/devices/docprobe.c | 27 +- drivers/mtd/devices/lart.c | 1 - drivers/mtd/devices/m25p80.c | 13 +- drivers/mtd/devices/ms02-nv.c | 3 +- drivers/mtd/devices/mtd_dataflash.c | 2 +- drivers/mtd/devices/mtdram.c | 2 +- drivers/mtd/devices/phram.c | 17 +- drivers/mtd/devices/pmc551.c | 16 +- drivers/mtd/devices/slram.c | 4 +- drivers/mtd/inftlcore.c | 193 +- drivers/mtd/inftlmount.c | 60 +- drivers/mtd/maps/Kconfig | 25 +- drivers/mtd/maps/alchemy-flash.c | 1 + drivers/mtd/maps/amd76xrom.c | 6 +- drivers/mtd/maps/ceiva.c | 1 + drivers/mtd/maps/cfi_flagadm.c | 4 +- drivers/mtd/maps/cstm_mips_ixx.c | 1 + drivers/mtd/maps/dbox2-flash.c | 3 +- drivers/mtd/maps/dc21285.c | 1 + drivers/mtd/maps/dilnetpc.c | 1 + drivers/mtd/maps/dmv182.c | 1 + drivers/mtd/maps/ebony.c | 1 + drivers/mtd/maps/edb7312.c | 1 + drivers/mtd/maps/h720x-flash.c | 1 + drivers/mtd/maps/ichxrom.c | 6 +- drivers/mtd/maps/impa7.c | 1 + drivers/mtd/maps/integrator-flash.c | 1 + drivers/mtd/maps/ipaq-flash.c | 1 + drivers/mtd/maps/ixp2000.c | 2 + drivers/mtd/maps/l440gx.c | 1 + drivers/mtd/maps/lasat.c | 1 + drivers/mtd/maps/mpc1211.c | 1 + drivers/mtd/maps/mtx-1_flash.c | 3 +- drivers/mtd/maps/nettel.c | 4 +- drivers/mtd/maps/ocotea.c | 1 + drivers/mtd/maps/omap-toto-flash.c | 1 + drivers/mtd/maps/pcmciamtd.c | 1 - drivers/mtd/maps/physmap.c | 256 +- drivers/mtd/maps/redwood.c | 1 + drivers/mtd/maps/sa1100-flash.c | 1 + drivers/mtd/maps/sbc8240.c | 1 + drivers/mtd/maps/sc520cdp.c | 1 + drivers/mtd/maps/scb2_flash.c | 1 + drivers/mtd/maps/scx200_docflash.c | 6 +- drivers/mtd/maps/solutionengine.c | 1 + drivers/mtd/maps/sun_uflash.c | 198 +- drivers/mtd/maps/tqm834x.c | 1 + drivers/mtd/maps/tqm8xxl.c | 1 + drivers/mtd/maps/ts5500_flash.c | 1 + drivers/mtd/maps/uclinux.c | 1 + drivers/mtd/maps/walnut.c | 1 + drivers/mtd/maps/wr_sbc82xx_flash.c | 1 + drivers/mtd/mtdblock.c | 17 +- drivers/mtd/mtdblock_ro.c | 4 +- drivers/mtd/mtdchar.c | 339 +- drivers/mtd/mtdconcat.c | 335 +- drivers/mtd/mtdcore.c | 34 +- drivers/mtd/mtdpart.c | 172 +- drivers/mtd/nand/Kconfig | 59 +- drivers/mtd/nand/Makefile | 4 - drivers/mtd/nand/ams-delta.c | 239 - drivers/mtd/nand/au1550nd.c | 321 +- drivers/mtd/nand/autcpu12.c | 125 +- drivers/mtd/nand/cs553x_nand.c | 353 - drivers/mtd/nand/diskonchip.c | 530 +- drivers/mtd/nand/edb7312.c | 97 +- drivers/mtd/nand/h1910.c | 98 +- drivers/mtd/nand/nand_base.c | 3281 +- drivers/mtd/nand/nand_bbt.c | 502 +- drivers/mtd/nand/nand_ecc.c | 226 +- drivers/mtd/nand/nand_ids.c | 177 +- drivers/mtd/nand/nandsim.c | 96 +- drivers/mtd/nand/ndfc.c | 311 - drivers/mtd/nand/ppchameleonevb.c | 256 +- drivers/mtd/nand/rtc_from4.c | 351 +- drivers/mtd/nand/s3c2410.c | 378 +- drivers/mtd/nand/sharpsl.c | 154 +- drivers/mtd/nand/spia.c | 101 +- drivers/mtd/nand/toto.c | 121 +- drivers/mtd/nand/ts7250.c | 206 - drivers/mtd/nftlcore.c | 222 +- drivers/mtd/nftlmount.c | 91 +- drivers/mtd/onenand/Kconfig | 14 - drivers/mtd/onenand/onenand_base.c | 718 +- drivers/mtd/onenand/onenand_bbt.c | 9 +- drivers/mtd/redboot.c | 18 +- drivers/mtd/rfd_ftl.c | 48 +- drivers/net/3c501.c | 7 +- drivers/net/3c503.c | 2 +- drivers/net/3c505.c | 2 +- drivers/net/3c507.c | 2 +- drivers/net/3c509.c | 1 + drivers/net/3c515.c | 6 +- drivers/net/3c523.c | 4 +- drivers/net/3c527.c | 7 +- drivers/net/3c59x.c | 265 +- drivers/net/8139cp.c | 232 +- drivers/net/8139too.c | 62 +- drivers/net/82596.c | 13 +- drivers/net/8390.c | 14 +- drivers/net/8390.h | 1 + drivers/net/Kconfig | 129 +- drivers/net/Makefile | 7 +- drivers/net/Space.c | 1 + drivers/net/a2065.c | 6 +- drivers/net/ac3200.c | 3 +- drivers/net/acenic.c | 9 +- drivers/net/acenic.h | 1 + drivers/net/acenic_firmware.h | 1 + drivers/net/amd8111e.c | 3 +- drivers/net/apne.c | 2 +- drivers/net/appletalk/Kconfig | 2 +- drivers/net/appletalk/cops.c | 3 +- drivers/net/appletalk/cops_ffdrv.h | 1 + drivers/net/appletalk/cops_ltdrv.h | 1 + drivers/net/appletalk/ipddp.c | 1 + drivers/net/arcnet/arcnet.c | 1 + drivers/net/arcnet/com20020-pci.c | 2 +- drivers/net/ariadne.c | 5 +- drivers/net/arm/at91_ether.c | 157 +- drivers/net/arm/at91_ether.h | 1 - drivers/net/arm/ether1.c | 3 +- drivers/net/arm/ether3.c | 3 +- drivers/net/at1700.c | 3 +- drivers/net/atarilance.c | 3 +- drivers/net/au1000_eth.c | 1803 +- drivers/net/au1000_eth.h | 134 +- drivers/net/b44.c | 308 +- drivers/net/b44.h | 7 - drivers/net/bcm5700/.cvsignore | 3 + drivers/net/bcm5700/5701rls.c | 46 + drivers/net/bcm5700/5701rls.h | 198 + drivers/net/bcm5700/DISTRIB.TXT | 166 + drivers/net/bcm5700/LICENSE | 290 + drivers/net/bcm5700/Makefile | 33 + drivers/net/bcm5700/README.TXT | 566 + drivers/net/bcm5700/RELEASE.TXT | 3726 ++ drivers/net/bcm5700/autoneg.c | 438 + drivers/net/bcm5700/autoneg.h | 418 + drivers/net/bcm5700/b57diag.c | 774 + drivers/net/bcm5700/b57proc.c | 482 + drivers/net/bcm5700/b57um.c | 5714 +++ drivers/net/bcm5700/bcm5700.4 | 535 + drivers/net/bcm5700/bits.h | 61 + drivers/net/bcm5700/fw_lso05.h | 289 + drivers/net/bcm5700/fw_stkoffld.h | 519 + drivers/net/bcm5700/lm.h | 469 + drivers/net/bcm5700/mm.h | 611 + drivers/net/bcm5700/nicext.h | 259 + drivers/net/bcm5700/queue.h | 347 + drivers/net/bcm5700/tcp_seg.c | 106 + drivers/net/bcm5700/tigon3.c | 9892 ++++++ drivers/net/bcm5700/tigon3.h | 3849 ++ drivers/net/bmac.c | 1 + drivers/net/bnx2.c | 296 +- drivers/net/bnx2.h | 28 +- drivers/net/bnx2_fw.h | 5256 ++- drivers/net/bonding/bond_main.c | 8 +- drivers/net/bonding/bond_sysfs.c | 1 + drivers/net/cassini.c | 40 +- drivers/net/chelsio/common.h | 1 + drivers/net/chelsio/cxgb2.c | 3 +- drivers/net/chelsio/sge.c | 1 + drivers/net/cris/eth_v10.c | 3 +- drivers/net/cs89x0.c | 4 +- drivers/net/cs89x0.h | 1 + drivers/net/declance.c | 11 +- drivers/net/defxx.c | 2 +- drivers/net/depca.c | 8 +- drivers/net/dgrs.c | 2 +- drivers/net/dl2k.c | 47 +- drivers/net/dl2k.h | 12 +- drivers/net/dm9000.c | 54 +- drivers/net/dummy.c | 2 +- drivers/net/e100.c | 88 +- drivers/net/e1000/Makefile | 3 +- drivers/net/e1000/e1000.h | 20 +- drivers/net/e1000/e1000_ethtool.c | 188 +- drivers/net/e1000/e1000_hw.c | 1929 +- drivers/net/e1000/e1000_hw.h | 392 +- drivers/net/e1000/e1000_main.c | 827 +- drivers/net/e1000/e1000_osdep.h | 16 +- drivers/net/e1000/e1000_param.c | 202 +- drivers/net/e2100.c | 4 +- drivers/net/eepro.c | 8 +- drivers/net/eepro100.c | 14 +- drivers/net/eexpress.c | 6 +- drivers/net/epic100.c | 165 +- drivers/net/es3210.c | 3 +- drivers/net/eth16i.c | 5 +- drivers/net/fealnx.c | 48 +- drivers/net/fec.c | 311 +- drivers/net/fec.h | 2 +- drivers/net/fec_8xx/fec_8xx-netta.c | 1 + drivers/net/fec_8xx/fec_main.c | 1 + drivers/net/fec_8xx/fec_mii.c | 1 + drivers/net/forcedeth.c | 1996 +- drivers/net/fs_enet/Makefile | 6 +- drivers/net/fs_enet/fec.h | 42 - drivers/net/fs_enet/fs_enet-main.c | 210 +- drivers/net/fs_enet/fs_enet-mii.c | 507 + drivers/net/fs_enet/fs_enet.h | 40 +- drivers/net/fs_enet/mac-fcc.c | 33 +- drivers/net/fs_enet/mac-fec.c | 143 +- drivers/net/fs_enet/mac-scc.c | 5 +- drivers/net/fs_enet/mii-bitbang.c | 449 +- drivers/net/fs_enet/mii-fec.c | 243 - drivers/net/fs_enet/mii-fixed.c | 92 + drivers/net/gianfar.c | 1 + drivers/net/gianfar.h | 1 + drivers/net/gianfar_ethtool.c | 1 + drivers/net/gianfar_mii.c | 1 + drivers/net/gianfar_sysfs.c | 1 + drivers/net/gt96100eth.c | 5 +- drivers/net/gt96100eth.h | 3 + drivers/net/hamachi.c | 18 +- drivers/net/hamradio/6pack.c | 1 + drivers/net/hamradio/baycom_ser_fdx.c | 2 +- drivers/net/hamradio/baycom_ser_hdx.c | 2 +- drivers/net/hamradio/bpqether.c | 8 +- drivers/net/hamradio/dmascc.c | 2 +- drivers/net/hamradio/mkiss.c | 1 + drivers/net/hamradio/scc.c | 3 +- drivers/net/hamradio/yam.c | 3 +- drivers/net/hp-plus.c | 2 +- drivers/net/hp.c | 4 +- drivers/net/hp100.c | 10 +- drivers/net/hydra.c | 2 +- drivers/net/ibm_emac/ibm_emac.h | 1 + drivers/net/ibm_emac/ibm_emac_core.c | 1 + drivers/net/ibm_emac/ibm_emac_core.h | 1 + drivers/net/ibm_emac/ibm_emac_debug.c | 1 + drivers/net/ibm_emac/ibm_emac_debug.h | 1 + drivers/net/ibm_emac/ibm_emac_mal.c | 1 + drivers/net/ibm_emac/ibm_emac_mal.h | 1 + drivers/net/ibm_emac/ibm_emac_phy.c | 1 + drivers/net/ibm_emac/ibm_emac_rgmii.c | 1 + drivers/net/ibm_emac/ibm_emac_rgmii.h | 1 + drivers/net/ibm_emac/ibm_emac_tah.c | 1 + drivers/net/ibm_emac/ibm_emac_tah.h | 1 + drivers/net/ibm_emac/ibm_emac_zmii.c | 1 + drivers/net/ibm_emac/ibm_emac_zmii.h | 1 + drivers/net/ibmlana.c | 22 +- drivers/net/ibmlana.h | 6 +- drivers/net/ibmveth.c | 294 +- drivers/net/ibmveth.h | 11 +- drivers/net/ifb.c | 2 +- drivers/net/ioc3-eth.c | 5 +- drivers/net/irda/Kconfig | 17 +- drivers/net/irda/Makefile | 1 - drivers/net/irda/ali-ircc.c | 109 +- drivers/net/irda/au1k_ir.c | 1 + drivers/net/irda/donauboe.c | 4 +- drivers/net/irda/irda-usb.c | 327 +- drivers/net/irda/irda-usb.h | 10 +- drivers/net/irda/irport.c | 2 +- drivers/net/irda/mcs7780.c | 1008 - drivers/net/irda/mcs7780.h | 167 - drivers/net/irda/nsc-ircc.c | 8 +- drivers/net/irda/pxaficp_ir.c | 1 + drivers/net/irda/sa1100_ir.c | 1 + drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/irda/stir4200.c | 38 +- drivers/net/irda/vlsi_ir.c | 3 +- drivers/net/irda/vlsi_ir.h | 2 +- drivers/net/irda/w83977af_ir.c | 1 + drivers/net/iseries_veth.c | 28 +- drivers/net/ixgb/Makefile | 2 +- drivers/net/ixgb/ixgb.h | 13 +- drivers/net/ixgb/ixgb_ee.c | 2 +- drivers/net/ixgb/ixgb_ee.h | 2 +- drivers/net/ixgb/ixgb_ethtool.c | 57 +- drivers/net/ixgb/ixgb_hw.c | 2 +- drivers/net/ixgb/ixgb_hw.h | 3 +- drivers/net/ixgb/ixgb_ids.h | 6 +- drivers/net/ixgb/ixgb_main.c | 310 +- drivers/net/ixgb/ixgb_osdep.h | 2 +- drivers/net/ixgb/ixgb_param.c | 26 +- drivers/net/ixp2000/caleb.c | 1 + drivers/net/ixp2000/enp2611.c | 1 + drivers/net/ixp2000/ixp2400-msf.c | 1 + drivers/net/ixp2000/ixpdev.c | 3 +- drivers/net/ixp2000/pm3386.c | 1 + drivers/net/jazzsonic.c | 2 +- drivers/net/lance.c | 5 +- drivers/net/lasi_82596.c | 3 +- drivers/net/lne390.c | 2 +- drivers/net/lp486e.c | 11 +- drivers/net/mace.c | 5 +- drivers/net/mambonet.c | 1 + drivers/net/mipsnet.c | 2 +- drivers/net/mv643xx_eth.c | 4 +- drivers/net/mv643xx_eth.h | 2 +- drivers/net/myri10ge/Makefile | 5 - drivers/net/myri10ge/myri10ge.c | 2866 -- drivers/net/myri10ge/myri10ge_mcp.h | 205 - .../net/myri10ge/myri10ge_mcp_gen_header.h | 58 - drivers/net/myri_sbus.c | 119 +- drivers/net/myri_sbus.h | 1 + drivers/net/natsemi.c | 220 +- drivers/net/ne.c | 2 +- drivers/net/ne2.c | 2 +- drivers/net/ne2k-pci.c | 11 +- drivers/net/netx-eth.c | 515 - drivers/net/ni5010.c | 52 +- drivers/net/ni52.c | 2 +- drivers/net/ni65.c | 2 +- drivers/net/ns83820.c | 44 +- drivers/net/pci-skeleton.c | 22 +- drivers/net/pcmcia/axnet_cs.c | 2 +- drivers/net/pcmcia/com20020_cs.c | 5 +- drivers/net/pcmcia/fmvj18x_cs.c | 3 +- drivers/net/pcmcia/pcnet_cs.c | 44 +- drivers/net/pcmcia/smc91c92_cs.c | 2 +- drivers/net/pcmcia/xirc2ps_cs.c | 23 +- drivers/net/pcnet32.c | 553 +- drivers/net/phy/Kconfig | 28 - drivers/net/phy/Makefile | 3 - drivers/net/phy/cicada.c | 43 +- drivers/net/phy/davicom.c | 1 + drivers/net/phy/fixed.c | 357 - drivers/net/phy/lxt.c | 9 +- drivers/net/phy/marvell.c | 1 + drivers/net/phy/mdio_bus.c | 2 +- drivers/net/phy/phy.c | 11 +- drivers/net/phy/phy_device.c | 52 +- drivers/net/phy/qsemi.c | 1 + drivers/net/phy/smsc.c | 100 - drivers/net/phy/vitesse.c | 111 - drivers/net/ppp_generic.c | 45 +- drivers/net/ppp_mppe.c | 1 + drivers/net/r8169.c | 46 +- drivers/net/rrunner.c | 3 +- drivers/net/rrunner.h | 1 + drivers/net/s2io-regs.h | 32 +- drivers/net/s2io.c | 2060 +- drivers/net/s2io.h | 72 +- drivers/net/sb1250-mac.c | 3 +- drivers/net/seeq8005.c | 5 +- drivers/net/shaper.c | 1 + drivers/net/sis190.c | 5 +- drivers/net/sis900.c | 28 +- drivers/net/sis900.h | 10 +- drivers/net/sk98lin/h/xmac_ii.h | 2 +- drivers/net/sk98lin/skge.c | 10 +- drivers/net/sk98lin/skvpd.c | 2 +- drivers/net/sk_mca.c | 2 +- drivers/net/skfp/h/sba.h | 2 +- drivers/net/skfp/skfddi.c | 2 +- drivers/net/skge.c | 249 +- drivers/net/skge.h | 10 +- drivers/net/sky2.c | 233 +- drivers/net/sky2.h | 19 +- drivers/net/slhc.c | 1 + drivers/net/slip.c | 1 + drivers/net/slip.h | 1 + drivers/net/smc-ultra.c | 3 +- drivers/net/smc-ultra32.c | 4 +- drivers/net/smc911x.c | 2306 -- drivers/net/smc911x.h | 835 - drivers/net/smc9194.c | 10 +- drivers/net/smc91x.c | 9 +- drivers/net/smc91x.h | 103 +- drivers/net/sonic.c | 3 +- drivers/net/sonic.h | 1 + drivers/net/spider_net.c | 587 +- drivers/net/spider_net.h | 76 +- drivers/net/spider_net_ethtool.c | 13 - drivers/net/starfire.c | 129 +- drivers/net/stnic.c | 1 + drivers/net/sun3lance.c | 4 +- drivers/net/sunbmac.c | 129 +- drivers/net/sunbmac.h | 1 + drivers/net/sundance.c | 112 +- drivers/net/sungem.c | 21 +- drivers/net/sungem_phy.c | 7 +- drivers/net/sunhme.c | 433 +- drivers/net/sunhme.h | 2 + drivers/net/sunlance.c | 173 +- drivers/net/sunqe.c | 468 +- drivers/net/tc35815.c | 2 +- drivers/net/tg3.c | 398 +- drivers/net/tg3.h | 27 +- drivers/net/tlan.c | 2 +- drivers/net/tokenring/3c359.c | 3 +- drivers/net/tokenring/abyss.c | 2 +- drivers/net/tokenring/ibmtr.c | 4 +- drivers/net/tokenring/lanstreamer.c | 3 +- drivers/net/tokenring/madgemc.c | 2 +- drivers/net/tokenring/olympic.c | 7 +- drivers/net/tokenring/smctr.c | 10 +- drivers/net/tokenring/smctr_firmware.h | 1 + drivers/net/tokenring/tmspci.c | 2 +- drivers/net/tulip/de2104x.c | 70 +- drivers/net/tulip/de4x5.c | 721 +- drivers/net/tulip/de4x5.h | 14 +- drivers/net/tulip/dmfe.c | 4 +- drivers/net/tulip/eeprom.c | 8 +- drivers/net/tulip/interrupt.c | 127 +- drivers/net/tulip/media.c | 2 +- drivers/net/tulip/tulip.h | 3 +- drivers/net/tulip/tulip_core.c | 37 +- drivers/net/tulip/uli526x.c | 82 +- drivers/net/tulip/winbond-840.c | 77 +- drivers/net/tulip/xircom_cb.c | 213 +- drivers/net/tulip/xircom_tulip_cb.c | 30 +- drivers/net/tun.c | 5 +- drivers/net/typhoon.c | 7 +- drivers/net/ucc_geth.c | 4278 --- drivers/net/ucc_geth.h | 1339 - drivers/net/ucc_geth_phy.c | 801 - drivers/net/ucc_geth_phy.h | 217 - drivers/net/via-rhine.c | 218 +- drivers/net/via-velocity.c | 123 +- drivers/net/via-velocity.h | 6 +- drivers/net/wan/Kconfig | 12 + drivers/net/wan/Makefile | 1 + drivers/net/wan/c101.c | 41 +- drivers/net/wan/cosa.c | 15 +- drivers/net/wan/cycx_main.c | 1 + drivers/net/wan/dlci.c | 1 + drivers/net/wan/dscc4.c | 14 +- drivers/net/wan/farsync.c | 2 +- drivers/net/wan/hd6457x.c | 26 +- drivers/net/wan/hdlc_cisco.c | 14 +- drivers/net/wan/hdlc_fr.c | 14 +- drivers/net/wan/hdlc_generic.c | 90 +- drivers/net/wan/hdlc_ppp.c | 1 - drivers/net/wan/hdlc_raw.c | 1 - drivers/net/wan/hdlc_raw_eth.c | 1 - drivers/net/wan/hdlc_x25.c | 1 - drivers/net/wan/hostess_sv11.c | 2 +- drivers/net/wan/lmc/lmc_main.c | 2 +- drivers/net/wan/lmc/lmc_media.c | 1 + drivers/net/wan/n2.c | 10 +- drivers/net/wan/pc300.h | 1 - drivers/net/wan/pc300_drv.c | 6 +- drivers/net/wan/pci200syn.c | 30 +- drivers/net/wan/sbni.c | 3 +- drivers/net/wan/sdla.c | 5 +- drivers/net/wan/sealevel.c | 2 +- drivers/net/wan/syncppp.c | 1 + drivers/net/wan/wanxl.c | 19 +- drivers/net/wd.c | 4 +- drivers/net/wireless/Kconfig | 58 +- drivers/net/wireless/Makefile | 3 - drivers/net/wireless/airo.c | 274 +- drivers/net/wireless/airo_cs.c | 1 + drivers/net/wireless/airport.c | 1 + drivers/net/wireless/arlan-main.c | 1 + drivers/net/wireless/arlan-proc.c | 1 + drivers/net/wireless/arlan.h | 1 + drivers/net/wireless/atmel.c | 3 +- drivers/net/wireless/atmel_cs.c | 1 + drivers/net/wireless/atmel_pci.c | 1 + drivers/net/wireless/bcm43xx/Kconfig | 1 - drivers/net/wireless/bcm43xx/bcm43xx.h | 186 +- .../net/wireless/bcm43xx/bcm43xx_debugfs.c | 93 +- .../net/wireless/bcm43xx/bcm43xx_debugfs.h | 1 - drivers/net/wireless/bcm43xx/bcm43xx_dma.c | 583 +- drivers/net/wireless/bcm43xx/bcm43xx_dma.h | 296 +- .../net/wireless/bcm43xx/bcm43xx_ethtool.c | 2 +- drivers/net/wireless/bcm43xx/bcm43xx_leds.c | 10 +- drivers/net/wireless/bcm43xx/bcm43xx_main.c | 1126 +- drivers/net/wireless/bcm43xx/bcm43xx_main.h | 30 +- drivers/net/wireless/bcm43xx/bcm43xx_phy.c | 57 +- drivers/net/wireless/bcm43xx/bcm43xx_pio.c | 44 +- drivers/net/wireless/bcm43xx/bcm43xx_pio.h | 13 - drivers/net/wireless/bcm43xx/bcm43xx_radio.c | 7 +- drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c | 60 +- drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 140 +- drivers/net/wireless/bcm43xx/bcm43xx_xmit.c | 5 +- drivers/net/wireless/hermes.c | 67 +- drivers/net/wireless/hermes.h | 43 +- drivers/net/wireless/hostap/hostap_80211_tx.c | 1 + drivers/net/wireless/hostap/hostap_ap.c | 11 + drivers/net/wireless/hostap/hostap_cs.c | 9 +- drivers/net/wireless/hostap/hostap_hw.c | 14 +- drivers/net/wireless/hostap/hostap_main.c | 3 + drivers/net/wireless/hostap/hostap_pci.c | 3 +- drivers/net/wireless/hostap/hostap_plx.c | 5 +- drivers/net/wireless/ipw2100.c | 7 +- drivers/net/wireless/ipw2200.c | 914 +- drivers/net/wireless/ipw2200.h | 85 +- drivers/net/wireless/netwave_cs.c | 1 + drivers/net/wireless/orinoco.c | 256 +- drivers/net/wireless/orinoco.h | 19 +- drivers/net/wireless/orinoco_cs.c | 43 +- drivers/net/wireless/orinoco_nortel.c | 174 +- drivers/net/wireless/orinoco_pci.c | 213 +- drivers/net/wireless/orinoco_pci.h | 104 - drivers/net/wireless/orinoco_plx.c | 226 +- drivers/net/wireless/orinoco_tmd.c | 102 +- drivers/net/wireless/prism54/islpci_hotplug.c | 2 +- drivers/net/wireless/prism54/islpci_mgt.c | 1 + drivers/net/wireless/prism54/prismcompat.h | 1 + drivers/net/wireless/ray_cs.c | 4 +- drivers/net/wireless/spectrum_cs.c | 119 +- drivers/net/wireless/strip.c | 7 +- drivers/net/wireless/wavelan.c | 18 +- drivers/net/wireless/wavelan_cs.c | 7 +- drivers/net/wireless/wavelan_cs.p.h | 1 + drivers/net/wireless/wl3501_cs.c | 1 + drivers/net/wireless/zd1211rw/Kconfig | 19 - drivers/net/wireless/zd1211rw/Makefile | 11 - drivers/net/wireless/zd1211rw/zd_chip.c | 1646 - drivers/net/wireless/zd1211rw/zd_chip.h | 827 - drivers/net/wireless/zd1211rw/zd_def.h | 48 - drivers/net/wireless/zd1211rw/zd_ieee80211.c | 191 - drivers/net/wireless/zd1211rw/zd_ieee80211.h | 85 - drivers/net/wireless/zd1211rw/zd_mac.c | 1084 - drivers/net/wireless/zd1211rw/zd_mac.h | 193 - drivers/net/wireless/zd1211rw/zd_netdev.c | 267 - drivers/net/wireless/zd1211rw/zd_netdev.h | 45 - drivers/net/wireless/zd1211rw/zd_rf.c | 151 - drivers/net/wireless/zd1211rw/zd_rf.h | 82 - drivers/net/wireless/zd1211rw/zd_rf_al2230.c | 308 - drivers/net/wireless/zd1211rw/zd_rf_rf2959.c | 279 - drivers/net/wireless/zd1211rw/zd_types.h | 71 - drivers/net/wireless/zd1211rw/zd_usb.c | 1309 - drivers/net/wireless/zd1211rw/zd_usb.h | 240 - drivers/net/wireless/zd1211rw/zd_util.c | 82 - drivers/net/yellowfin.c | 73 +- drivers/net/znet.c | 4 +- drivers/net/zorro8390.c | 2 +- drivers/nubus/nubus.c | 1 + drivers/nubus/nubus_syms.c | 1 + drivers/oprofile/buffer_sync.c | 8 +- drivers/oprofile/event_buffer.c | 12 +- drivers/oprofile/event_buffer.h | 4 +- drivers/oprofile/oprof.c | 36 +- drivers/oprofile/oprof.h | 4 +- drivers/oprofile/oprofile_files.c | 4 +- drivers/oprofile/oprofilefs.c | 17 +- drivers/parisc/Kconfig | 33 +- drivers/parisc/ccio-dma.c | 1 + drivers/parisc/dino.c | 5 +- drivers/parisc/eisa.c | 4 +- drivers/parisc/gsc.c | 9 +- drivers/parisc/iosapic.c | 2 +- drivers/parisc/led.c | 12 +- drivers/parisc/pdc_stable.c | 223 +- drivers/parisc/power.c | 1 + drivers/parisc/sba_iommu.c | 18 +- drivers/parisc/superio.c | 4 +- drivers/parport/Kconfig | 17 +- drivers/parport/Makefile | 3 +- drivers/parport/daisy.c | 2 +- drivers/parport/ieee1284.c | 1 + drivers/parport/ieee1284_ops.c | 1 + drivers/parport/parport_arc.c | 139 + drivers/parport/parport_ax88796.c | 443 - drivers/parport/parport_gsc.c | 2 +- drivers/parport/parport_gsc.h | 2 +- drivers/parport/parport_mfc3.c | 2 +- drivers/parport/parport_pc.c | 3 +- drivers/parport/parport_sunbpp.c | 136 +- drivers/parport/procfs.c | 3 +- drivers/parport/share.c | 3 +- drivers/pci/Makefile | 6 +- drivers/pci/bus.c | 31 +- drivers/pci/hotplug/Kconfig | 12 +- drivers/pci/hotplug/Makefile | 3 +- drivers/pci/hotplug/acpi_pcihp.c | 257 +- drivers/pci/hotplug/acpiphp.h | 41 +- drivers/pci/hotplug/acpiphp_core.c | 22 +- drivers/pci/hotplug/acpiphp_dock.c | 438 + drivers/pci/hotplug/acpiphp_glue.c | 367 +- drivers/pci/hotplug/cpci_hotplug_core.c | 3 +- drivers/pci/hotplug/cpci_hotplug_pci.c | 55 +- drivers/pci/hotplug/cpcihp_generic.c | 1 + drivers/pci/hotplug/cpcihp_zt5550.c | 15 +- drivers/pci/hotplug/cpqphp_core.c | 13 +- drivers/pci/hotplug/cpqphp_ctrl.c | 1 + drivers/pci/hotplug/cpqphp_nvram.c | 1 + drivers/pci/hotplug/cpqphp_pci.c | 1 + drivers/pci/hotplug/cpqphp_sysfs.c | 3 +- drivers/pci/hotplug/fakephp.c | 1 + drivers/pci/hotplug/ibmphp_core.c | 12 +- drivers/pci/hotplug/pci_hotplug.h | 50 +- drivers/pci/hotplug/pci_hotplug_core.c | 1 + drivers/pci/hotplug/pciehp.h | 7 +- drivers/pci/hotplug/pciehp_core.c | 14 - drivers/pci/hotplug/pciehp_hpc.c | 43 +- drivers/pci/hotplug/pciehp_pci.c | 152 +- drivers/pci/hotplug/pcihp_skeleton.c | 1 + drivers/pci/hotplug/rpaphp_core.c | 1 + drivers/pci/hotplug/sgi_hotplug.c | 46 +- drivers/pci/hotplug/shpchp.h | 8 +- drivers/pci/hotplug/shpchp_core.c | 8 + drivers/pci/hotplug/shpchp_ctrl.c | 32 +- drivers/pci/hotplug/shpchp_hpc.c | 863 +- drivers/pci/hotplug/shpchp_pci.c | 31 +- drivers/pci/hotplug/shpchp_sysfs.c | 18 +- drivers/pci/msi-altix.c | 210 - drivers/pci/msi-apic.c | 101 - drivers/pci/msi.c | 296 +- drivers/pci/msi.h | 133 +- drivers/pci/pci-acpi.c | 16 +- drivers/pci/pci-driver.c | 3 +- drivers/pci/pci-sysfs.c | 53 +- drivers/pci/pci.c | 38 +- drivers/pci/pci.h | 18 +- drivers/pci/pcie/portdrv_pci.c | 38 +- drivers/pci/probe.c | 46 +- drivers/pci/proc.c | 20 +- drivers/pci/quirks.c | 194 +- drivers/pci/remove.c | 12 +- drivers/pci/rom.c | 11 +- drivers/pci/search.c | 80 +- drivers/pci/setup-bus.c | 11 +- drivers/pci/setup-res.c | 74 +- drivers/pcmcia/Kconfig | 2 +- drivers/pcmcia/at91_cf.c | 79 +- drivers/pcmcia/au1000_db1x00.c | 3 +- drivers/pcmcia/au1000_generic.c | 1 + drivers/pcmcia/au1000_generic.h | 1 + drivers/pcmcia/au1000_pb1x00.c | 1 + drivers/pcmcia/cs.c | 29 +- drivers/pcmcia/ds.c | 5 - drivers/pcmcia/hd64465_ss.c | 8 +- drivers/pcmcia/i82092.c | 2 +- drivers/pcmcia/i82365.c | 11 +- drivers/pcmcia/m32r_cfc.c | 1 + drivers/pcmcia/m32r_pcc.c | 1 + drivers/pcmcia/m8xx_pcmcia.c | 4 +- drivers/pcmcia/omap_cf.c | 2 +- drivers/pcmcia/pcmcia_ioctl.c | 16 +- drivers/pcmcia/pcmcia_resource.c | 42 +- drivers/pcmcia/pd6729.c | 5 +- drivers/pcmcia/pxa2xx_base.c | 1 + drivers/pcmcia/rsrc_nonstatic.c | 26 +- drivers/pcmcia/sa1100_badge4.c | 4 +- drivers/pcmcia/sa1100_generic.c | 1 + drivers/pcmcia/sa1111_generic.c | 1 + drivers/pcmcia/sa11xx_base.c | 1 + drivers/pcmcia/soc_common.c | 5 +- drivers/pcmcia/tcic.c | 5 +- drivers/pcmcia/ti113x.h | 1 - drivers/pcmcia/vrc4171_card.c | 2 +- drivers/pcmcia/vrc4173_cardu.c | 2 +- drivers/pcmcia/yenta_socket.c | 87 +- drivers/pnp/card.c | 49 +- drivers/pnp/driver.c | 1 + drivers/pnp/interface.c | 20 +- drivers/pnp/isapnp/compat.c | 1 + drivers/pnp/isapnp/core.c | 5 +- drivers/pnp/isapnp/proc.c | 1 + drivers/pnp/manager.c | 16 +- drivers/pnp/pnpacpi/core.c | 1 + drivers/pnp/pnpacpi/rsparser.c | 218 +- drivers/pnp/pnpbios/core.c | 2 +- drivers/pnp/pnpbios/rsparser.c | 1 + drivers/pnp/quirks.c | 1 + drivers/pnp/resource.c | 11 +- drivers/pnp/support.c | 1 + drivers/rapidio/rio-access.c | 4 +- drivers/rapidio/rio-scan.c | 1 + drivers/rapidio/rio-sysfs.c | 1 + drivers/rapidio/rio.c | 1 + drivers/rtc/Kconfig | 129 +- drivers/rtc/Makefile | 11 - drivers/rtc/class.c | 3 - drivers/rtc/interface.c | 22 +- drivers/rtc/rtc-at91.c | 407 - drivers/rtc/rtc-dev.c | 131 +- drivers/rtc/rtc-ds1307.c | 388 - drivers/rtc/rtc-ds1553.c | 414 - drivers/rtc/rtc-ds1742.c | 259 - drivers/rtc/rtc-isl1208.c | 591 - drivers/rtc/rtc-lib.c | 19 - drivers/rtc/rtc-max6902.c | 285 - drivers/rtc/rtc-pcf8563.c | 4 +- drivers/rtc/rtc-pcf8583.c | 394 - drivers/rtc/rtc-pl031.c | 233 - drivers/rtc/rtc-rs5c348.c | 246 - drivers/rtc/rtc-s3c.c | 621 - drivers/rtc/rtc-sa1100.c | 12 +- drivers/rtc/rtc-v3020.c | 264 - drivers/rtc/rtc-vr41xx.c | 16 +- drivers/s390/block/dasd.c | 302 +- drivers/s390/block/dasd_3370_erp.c | 27 +- drivers/s390/block/dasd_3990_erp.c | 189 +- drivers/s390/block/dasd_9336_erp.c | 27 +- drivers/s390/block/dasd_9343_erp.c | 2 +- drivers/s390/block/dasd_devmap.c | 115 +- drivers/s390/block/dasd_diag.c | 7 +- drivers/s390/block/dasd_diag.h | 2 +- drivers/s390/block/dasd_eckd.c | 366 +- drivers/s390/block/dasd_eckd.h | 24 +- drivers/s390/block/dasd_eer.c | 6 +- drivers/s390/block/dasd_erp.c | 9 +- drivers/s390/block/dasd_fba.c | 54 +- drivers/s390/block/dasd_fba.h | 2 +- drivers/s390/block/dasd_genhd.c | 17 +- drivers/s390/block/dasd_int.h | 40 +- drivers/s390/block/dasd_ioctl.c | 15 +- drivers/s390/block/dasd_proc.c | 1 + drivers/s390/block/xpram.c | 105 +- drivers/s390/char/con3215.c | 3 +- drivers/s390/char/con3270.c | 1 + drivers/s390/char/ctrlchar.c | 3 +- drivers/s390/char/defkeymap.c | 6 +- drivers/s390/char/fs3270.c | 25 +- drivers/s390/char/keyboard.c | 7 +- drivers/s390/char/monreader.c | 1 + drivers/s390/char/raw3270.c | 154 +- drivers/s390/char/raw3270.h | 2 +- drivers/s390/char/sclp.c | 10 +- drivers/s390/char/sclp_con.c | 1 + drivers/s390/char/sclp_cpi.c | 1 + drivers/s390/char/sclp_quiesce.c | 4 +- drivers/s390/char/sclp_rw.c | 1 + drivers/s390/char/sclp_tty.c | 1 + drivers/s390/char/sclp_vt220.c | 1 + drivers/s390/char/tape.h | 1 + drivers/s390/char/tape_34xx.c | 7 +- drivers/s390/char/tape_3590.c | 1 + drivers/s390/char/tape_block.c | 1 + drivers/s390/char/tape_char.c | 1 + drivers/s390/char/tape_class.c | 10 +- drivers/s390/char/tape_core.c | 19 +- drivers/s390/char/tape_proc.c | 1 + drivers/s390/char/tape_std.c | 1 + drivers/s390/char/tty3270.c | 29 +- drivers/s390/char/vmlogrdr.c | 6 +- drivers/s390/char/vmwatchdog.c | 2 +- drivers/s390/cio/blacklist.c | 36 +- drivers/s390/cio/ccwgroup.c | 43 +- drivers/s390/cio/chsc.c | 51 +- drivers/s390/cio/cio.c | 7 +- drivers/s390/cio/cio.h | 3 +- drivers/s390/cio/cmf.c | 628 +- drivers/s390/cio/css.c | 99 +- drivers/s390/cio/css.h | 4 +- drivers/s390/cio/device.c | 38 +- drivers/s390/cio/device.h | 10 - drivers/s390/cio/device_fsm.c | 130 +- drivers/s390/cio/device_id.c | 1 + drivers/s390/cio/device_ops.c | 14 +- drivers/s390/cio/device_pgid.c | 150 +- drivers/s390/cio/device_status.c | 8 +- drivers/s390/cio/qdio.c | 3 +- drivers/s390/crypto/z90crypt.h | 185 +- drivers/s390/crypto/z90main.c | 1 + drivers/s390/net/Kconfig | 9 + drivers/s390/net/Makefile | 2 +- drivers/s390/net/claw.c | 2 +- drivers/s390/net/ctcmain.c | 69 +- drivers/s390/net/ctcmain.h | 12 +- drivers/s390/net/ctctty.c | 1259 + drivers/s390/net/ctctty.h | 35 + drivers/s390/net/fsm.c | 1 + drivers/s390/net/iucv.c | 7 +- drivers/s390/net/lcs.c | 20 +- drivers/s390/net/netiucv.c | 82 +- drivers/s390/net/qeth.h | 73 +- drivers/s390/net/qeth_eddp.c | 6 +- drivers/s390/net/qeth_main.c | 553 +- drivers/s390/net/qeth_proc.c | 23 +- drivers/s390/net/qeth_sys.c | 68 +- drivers/s390/net/qeth_tso.h | 2 +- drivers/s390/net/smsgiucv.c | 14 +- drivers/s390/s390mach.c | 19 +- drivers/s390/scsi/zfcp_aux.c | 211 +- drivers/s390/scsi/zfcp_ccw.c | 19 +- drivers/s390/scsi/zfcp_dbf.c | 10 +- drivers/s390/scsi/zfcp_def.h | 81 +- drivers/s390/scsi/zfcp_erp.c | 509 +- drivers/s390/scsi/zfcp_ext.h | 28 +- drivers/s390/scsi/zfcp_fsf.c | 266 +- drivers/s390/scsi/zfcp_fsf.h | 38 +- drivers/s390/scsi/zfcp_qdio.c | 97 +- drivers/s390/scsi/zfcp_scsi.c | 191 +- drivers/s390/scsi/zfcp_sysfs_adapter.c | 14 +- drivers/s390/scsi/zfcp_sysfs_driver.c | 14 +- drivers/s390/scsi/zfcp_sysfs_port.c | 15 +- drivers/s390/scsi/zfcp_sysfs_unit.c | 15 +- drivers/s390/sysinfo.c | 1 + drivers/sbus/char/aurora.c | 12 +- drivers/sbus/char/bbc_envctrl.c | 4 +- drivers/sbus/char/bbc_i2c.c | 6 +- drivers/sbus/char/bpp.c | 9 + drivers/sbus/char/cpwatchdog.c | 8 +- drivers/sbus/char/display7seg.c | 2 +- drivers/sbus/char/envctrl.c | 72 +- drivers/sbus/char/flash.c | 18 +- drivers/sbus/char/openprom.c | 601 +- drivers/sbus/char/riowatchdog.c | 4 +- drivers/sbus/char/uctrl.c | 2 +- drivers/sbus/char/vfc.h | 2 + drivers/sbus/char/vfc_dev.c | 9 +- drivers/sbus/dvma.c | 1 + drivers/sbus/sbus.c | 583 +- drivers/scsi/3w-9xxx.c | 4 +- drivers/scsi/3w-xxxx.c | 10 +- drivers/scsi/53c700.c | 116 +- drivers/scsi/53c700.h | 42 +- drivers/scsi/53c7xx.c | 31 +- drivers/scsi/BusLogic.c | 3 +- drivers/scsi/BusLogic.h | 1 + drivers/scsi/FlashPoint.c | 1 + drivers/scsi/Kconfig | 22 +- drivers/scsi/Makefile | 6 +- drivers/scsi/NCR5380.c | 6 +- drivers/scsi/NCR53C9x.c | 19 +- drivers/scsi/NCR53C9x.h | 1 + drivers/scsi/NCR53c406a.c | 8 +- drivers/scsi/NCR_D700.c | 16 +- drivers/scsi/NCR_Q720.c | 2 +- drivers/scsi/a100u2w.c | 2 +- drivers/scsi/a2091.c | 2 +- drivers/scsi/a3000.c | 2 +- drivers/scsi/aacraid/aachba.c | 49 +- drivers/scsi/aacraid/aacraid.h | 10 +- drivers/scsi/aacraid/commctrl.c | 2 +- drivers/scsi/aacraid/comminit.c | 24 +- drivers/scsi/aacraid/commsup.c | 12 +- drivers/scsi/aacraid/dpcsup.c | 6 +- drivers/scsi/aacraid/linit.c | 18 +- drivers/scsi/aacraid/rkt.c | 6 +- drivers/scsi/aacraid/rx.c | 6 +- drivers/scsi/aacraid/sa.c | 10 +- drivers/scsi/advansys.c | 35 +- drivers/scsi/aha152x.c | 47 +- drivers/scsi/aha1542.c | 32 +- drivers/scsi/aha1740.c | 2 +- drivers/scsi/ahci.c | 1447 +- drivers/scsi/aic7xxx/aic7770.c | 2 +- drivers/scsi/aic7xxx/aic7770_osm.c | 2 +- drivers/scsi/aic7xxx/aic79xx.h | 3 +- drivers/scsi/aic7xxx/aic79xx_core.c | 40 +- drivers/scsi/aic7xxx/aic79xx_osm.c | 107 +- drivers/scsi/aic7xxx/aic79xx_osm.h | 13 +- drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 2 +- drivers/scsi/aic7xxx/aic79xx_pci.c | 2 +- drivers/scsi/aic7xxx/aic79xx_proc.c | 23 +- drivers/scsi/aic7xxx/aic7xxx.h | 3 +- drivers/scsi/aic7xxx/aic7xxx_core.c | 12 +- drivers/scsi/aic7xxx/aic7xxx_osm.c | 45 +- drivers/scsi/aic7xxx/aic7xxx_osm.h | 1 + drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_pci.c | 83 +- drivers/scsi/aic7xxx/aic7xxx_proc.c | 4 +- drivers/scsi/aic7xxx/aicasm/Makefile | 2 - drivers/scsi/aic7xxx_old.c | 8 +- drivers/scsi/aic7xxx_old/aic7xxx_proc.c | 1 + drivers/scsi/amiga7xx.c | 1 + drivers/scsi/arm/Kconfig | 3 - drivers/scsi/arm/acornscsi.c | 3 +- drivers/scsi/arm/cumana_1.c | 2 +- drivers/scsi/arm/cumana_2.c | 2 +- drivers/scsi/arm/fas216.c | 2 +- drivers/scsi/arm/powertec.c | 2 +- drivers/scsi/arm/queue.c | 6 +- drivers/scsi/arm/scsi.h | 2 +- drivers/scsi/ata_piix.c | 340 +- drivers/scsi/atari_NCR5380.c | 3 +- drivers/scsi/atari_scsi.c | 1 + drivers/scsi/atp870u.c | 167 +- drivers/scsi/blz1230.c | 2 +- drivers/scsi/blz2060.c | 2 +- drivers/scsi/ch.c | 1 + drivers/scsi/constants.c | 172 +- drivers/scsi/cyberstorm.c | 2 +- drivers/scsi/cyberstormII.c | 2 +- drivers/scsi/dc395x.c | 280 +- drivers/scsi/dec_esp.c | 10 +- drivers/scsi/dmx3191d.c | 2 +- drivers/scsi/dpt/dpti_i2o.h | 1 + drivers/scsi/dpt_i2o.c | 3 +- drivers/scsi/dtc.c | 20 +- drivers/scsi/eata.c | 3 +- drivers/scsi/eata_pio.c | 5 +- drivers/scsi/esp.c | 339 +- drivers/scsi/esp.h | 4 + drivers/scsi/fastlane.c | 2 +- drivers/scsi/fcal.c | 1 + drivers/scsi/fd_mcs.c | 4 +- drivers/scsi/fdomain.c | 13 +- drivers/scsi/g_NCR5380.c | 22 +- drivers/scsi/g_NCR5380.h | 1 + drivers/scsi/gdth.c | 523 +- drivers/scsi/gdth.h | 8 +- drivers/scsi/gdth_kcompat.h | 14 +- drivers/scsi/gdth_proc.c | 245 +- drivers/scsi/gdth_proc.h | 16 +- drivers/scsi/gvp11.c | 2 +- drivers/scsi/hptiop.c | 942 - drivers/scsi/hptiop.h | 465 - drivers/scsi/ibmmca.c | 34 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 67 +- drivers/scsi/ibmvscsi/iseries_vscsi.c | 2 +- drivers/scsi/ibmvscsi/rpa_vscsi.c | 6 +- drivers/scsi/ide-scsi.c | 9 +- drivers/scsi/imm.c | 12 +- drivers/scsi/imm.h | 3 +- drivers/scsi/in2000.c | 6 +- drivers/scsi/initio.c | 6 +- drivers/scsi/initio.h | 13 +- drivers/scsi/ipr.c | 4 +- drivers/scsi/ips.c | 41 +- drivers/scsi/iscsi_tcp.c | 3313 +- drivers/scsi/iscsi_tcp.h | 192 +- drivers/scsi/jazz_esp.c | 4 +- drivers/scsi/lasi700.c | 2 +- drivers/scsi/libata-bmdma.c | 163 +- drivers/scsi/libata-core.c | 3307 +- drivers/scsi/libata-eh.c | 2245 -- drivers/scsi/libata-scsi.c | 888 +- drivers/scsi/libata.h | 33 +- drivers/scsi/libiscsi.c | 1905 - drivers/scsi/lpfc/lpfc.h | 10 +- drivers/scsi/lpfc/lpfc_attr.c | 190 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 - drivers/scsi/lpfc/lpfc_ct.c | 13 +- drivers/scsi/lpfc/lpfc_els.c | 92 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 19 +- drivers/scsi/lpfc/lpfc_init.c | 79 +- drivers/scsi/lpfc/lpfc_mbox.c | 16 - drivers/scsi/lpfc/lpfc_mem.c | 5 - drivers/scsi/lpfc/lpfc_nportdisc.c | 35 +- drivers/scsi/lpfc/lpfc_scsi.c | 105 +- drivers/scsi/lpfc/lpfc_sli.c | 112 +- drivers/scsi/lpfc/lpfc_sli.h | 22 +- drivers/scsi/lpfc/lpfc_version.h | 2 +- drivers/scsi/mac53c94.c | 2 +- drivers/scsi/mac_esp.c | 7 +- drivers/scsi/mac_scsi.c | 7 +- drivers/scsi/megaraid.c | 8 +- drivers/scsi/megaraid/mega_common.h | 6 - drivers/scsi/megaraid/megaraid_ioctl.h | 4 - drivers/scsi/megaraid/megaraid_mbox.c | 46 +- drivers/scsi/megaraid/megaraid_mbox.h | 4 +- drivers/scsi/megaraid/megaraid_mm.c | 2 +- drivers/scsi/megaraid/megaraid_mm.h | 4 +- drivers/scsi/megaraid/megaraid_sas.c | 60 +- drivers/scsi/megaraid/megaraid_sas.h | 24 +- drivers/scsi/mesh.c | 3 +- drivers/scsi/ncr53c8xx.c | 9 +- drivers/scsi/ncr53c8xx.h | 2 + drivers/scsi/nsp32.c | 14 +- drivers/scsi/oktagon_esp.c | 3 +- drivers/scsi/oktagon_io.S | 1 + drivers/scsi/osst.c | 6 +- drivers/scsi/osst.h | 1 + drivers/scsi/pas16.c | 10 +- drivers/scsi/pcmcia/nsp_cs.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 2 +- drivers/scsi/pdc_adma.c | 17 +- drivers/scsi/pluto.c | 6 +- drivers/scsi/ppa.c | 3 + drivers/scsi/ppa.h | 3 +- drivers/scsi/qla1280.c | 42 +- drivers/scsi/qla2xxx/Kconfig | 45 + drivers/scsi/qla2xxx/Makefile | 17 +- drivers/scsi/qla2xxx/ql2100.c | 91 + drivers/scsi/qla2xxx/ql2100_fw.c | 11253 +++--- drivers/scsi/qla2xxx/ql2200.c | 91 + drivers/scsi/qla2xxx/ql2200_fw.c | 12385 +++---- drivers/scsi/qla2xxx/ql2300.c | 114 + drivers/scsi/qla2xxx/ql2300_fw.c | 18015 ++++------ drivers/scsi/qla2xxx/ql2322.c | 119 + drivers/scsi/qla2xxx/ql2322_fw.c | 19460 +++++------ drivers/scsi/qla2xxx/ql2400.c | 138 + drivers/scsi/qla2xxx/ql2400_fw.c | 29035 +++++++--------- drivers/scsi/qla2xxx/qla_attr.c | 126 +- drivers/scsi/qla2xxx/qla_dbg.c | 973 +- drivers/scsi/qla2xxx/qla_dbg.h | 151 +- drivers/scsi/qla2xxx/qla_def.h | 210 +- drivers/scsi/qla2xxx/qla_devtbl.h | 17 +- drivers/scsi/qla2xxx/qla_fw.h | 7 +- drivers/scsi/qla2xxx/qla_gbl.h | 41 +- drivers/scsi/qla2xxx/qla_init.c | 376 +- drivers/scsi/qla2xxx/qla_iocb.c | 6 +- drivers/scsi/qla2xxx/qla_isr.c | 110 +- drivers/scsi/qla2xxx/qla_mbx.c | 280 +- drivers/scsi/qla2xxx/qla_os.c | 312 +- drivers/scsi/qla2xxx/qla_rscn.c | 1426 + drivers/scsi/qla2xxx/qla_settings.h | 1 + drivers/scsi/qla2xxx/qla_sup.c | 93 +- drivers/scsi/qla2xxx/qla_version.h | 4 +- drivers/scsi/qlogicpti.c | 376 +- drivers/scsi/raid_class.c | 4 +- drivers/scsi/sata_mv.c | 75 +- drivers/scsi/sata_nv.c | 536 +- drivers/scsi/sata_promise.c | 88 +- drivers/scsi/sata_qstor.c | 17 +- drivers/scsi/sata_sil.c | 349 +- drivers/scsi/sata_sil24.c | 755 +- drivers/scsi/sata_sis.c | 14 +- drivers/scsi/sata_svw.c | 19 +- drivers/scsi/sata_sx4.c | 23 +- drivers/scsi/sata_uli.c | 15 +- drivers/scsi/sata_via.c | 142 +- drivers/scsi/sata_vsc.c | 42 +- drivers/scsi/scsi.c | 186 +- drivers/scsi/scsi.h | 3 + drivers/scsi/scsi_debug.c | 1296 +- drivers/scsi/scsi_devinfo.c | 4 +- drivers/scsi/scsi_error.c | 281 +- drivers/scsi/scsi_ioctl.c | 2 +- drivers/scsi/scsi_lib.c | 353 +- drivers/scsi/scsi_logging.h | 9 +- drivers/scsi/scsi_priv.h | 14 +- drivers/scsi/scsi_proc.c | 9 +- drivers/scsi/scsi_sas_internal.h | 10 +- drivers/scsi/scsi_scan.c | 70 +- drivers/scsi/scsi_sysfs.c | 9 +- drivers/scsi/scsi_transport_api.h | 6 - drivers/scsi/scsi_transport_fc.c | 48 +- drivers/scsi/scsi_transport_iscsi.c | 1052 +- drivers/scsi/scsi_transport_sas.c | 449 +- drivers/scsi/scsi_transport_spi.c | 14 +- drivers/scsi/scsi_typedefs.h | 1 + drivers/scsi/scsicam.c | 3 +- drivers/scsi/sd.c | 175 +- drivers/scsi/seagate.c | 8 +- drivers/scsi/sg.c | 25 +- drivers/scsi/sim710.c | 3 +- drivers/scsi/sr.c | 9 +- drivers/scsi/sr_vendor.c | 1 + drivers/scsi/st.c | 14 +- drivers/scsi/st.h | 1 + drivers/scsi/sun3_NCR5380.c | 3 +- drivers/scsi/sun3x_esp.c | 12 +- drivers/scsi/sym53c8xx_2/sym53c8xx.h | 1 + drivers/scsi/sym53c8xx_2/sym_glue.c | 16 +- drivers/scsi/sym53c8xx_2/sym_glue.h | 1 + drivers/scsi/sym53c8xx_2/sym_hipd.c | 3 +- drivers/scsi/t128.c | 12 +- drivers/scsi/tmscsim.c | 3 +- drivers/scsi/tmscsim.h | 1 + drivers/scsi/u14-34f.c | 3 +- drivers/scsi/wd33c93.c | 9 +- drivers/scsi/wd33c93.h | 1 + drivers/scsi/wd7000.c | 16 +- drivers/scsi/zalon.c | 2 +- drivers/serial/21285.c | 2 + drivers/serial/68328serial.c | 103 +- drivers/serial/68328serial.h | 1 + drivers/serial/68360serial.c | 1 + drivers/serial/8250.c | 18 +- drivers/serial/8250.h | 1 + drivers/serial/8250_mca.c | 1 + drivers/serial/8250_pci.c | 55 +- drivers/serial/8250_pnp.c | 6 +- drivers/serial/Kconfig | 46 +- drivers/serial/Makefile | 1 - drivers/serial/amba-pl010.c | 3 +- drivers/serial/amba-pl011.c | 1 + drivers/serial/at91_serial.c | 468 +- drivers/serial/clps711x.c | 1 + drivers/serial/cpm_uart/cpm_uart.h | 1 + drivers/serial/cpm_uart/cpm_uart_core.c | 1 + drivers/serial/cpm_uart/cpm_uart_cpm1.c | 1 + drivers/serial/cpm_uart/cpm_uart_cpm2.c | 1 + drivers/serial/crisv10.c | 31 +- drivers/serial/crisv10.h | 1 + drivers/serial/dz.c | 9 +- drivers/serial/icom.c | 3 +- drivers/serial/imx.c | 4 +- drivers/serial/ioc4_serial.c | 11 +- drivers/serial/ip22zilog.c | 5 +- drivers/serial/jsm/jsm_driver.c | 2 +- drivers/serial/jsm/jsm_tty.c | 7 + drivers/serial/m32r_sio.c | 4 +- drivers/serial/m32r_sio.h | 1 + drivers/serial/m32r_sio_reg.h | 1 + drivers/serial/mcfserial.c | 31 +- drivers/serial/mcfserial.h | 1 + drivers/serial/mpc52xx_uart.c | 7 +- drivers/serial/mpsc.c | 5 +- drivers/serial/mux.c | 1 + drivers/serial/netx-serial.c | 747 - drivers/serial/pmac_zilog.c | 10 +- drivers/serial/pxa.c | 5 +- drivers/serial/s3c2410.c | 148 +- drivers/serial/sa1100.c | 2 + drivers/serial/serial_core.c | 36 +- drivers/serial/serial_cs.c | 13 +- drivers/serial/serial_lh7a40x.c | 14 +- drivers/serial/serial_txx9.c | 6 +- drivers/serial/sh-sci.c | 12 +- drivers/serial/sh-sci.h | 1 + drivers/serial/sn_console.c | 3 +- drivers/serial/suncore.c | 1 + drivers/serial/sunhv.c | 166 +- drivers/serial/sunsab.c | 311 +- drivers/serial/sunsu.c | 525 +- drivers/serial/sunzilog.c | 837 +- drivers/serial/v850e_uart.c | 5 +- drivers/serial/vr41xx_siu.c | 3 +- drivers/sn/ioc3.c | 9 +- drivers/sn/ioc4.c | 66 +- drivers/spi/spi.c | 3 +- drivers/spi/spi_bitbang.c | 1 + drivers/spi/spi_butterfly.c | 1 + drivers/spi/spi_s3c24xx.c | 1 + drivers/spi/spi_s3c24xx_gpio.c | 1 + drivers/tc/lk201.c | 1 + drivers/tc/zs.c | 6 +- drivers/telephony/ixj.c | 2 +- drivers/telephony/phonedev.c | 4 + drivers/usb/Kconfig | 3 +- drivers/usb/Makefile | 2 - drivers/usb/atm/usbatm.c | 2 +- drivers/usb/atm/xusbatm.c | 1 + drivers/usb/class/cdc-acm.c | 134 +- drivers/usb/class/cdc-acm.h | 16 +- drivers/usb/class/usblp.c | 1 - drivers/usb/core/Kconfig | 3 + drivers/usb/core/Makefile | 3 +- drivers/usb/core/buffer.c | 1 + drivers/usb/core/config.c | 1 + drivers/usb/core/devio.c | 44 +- drivers/usb/core/driver.c | 1 + drivers/usb/core/endpoint.c | 275 - drivers/usb/core/file.c | 71 +- drivers/usb/core/hcd-pci.c | 3 +- drivers/usb/core/hcd.c | 13 +- drivers/usb/core/hub.c | 164 +- drivers/usb/core/inode.c | 24 +- drivers/usb/core/message.c | 183 +- drivers/usb/core/notify.c | 4 +- drivers/usb/core/sysfs.c | 202 +- drivers/usb/core/urb.c | 1 + drivers/usb/core/usb.c | 4 +- drivers/usb/core/usb.h | 5 - drivers/usb/gadget/Kconfig | 2 +- drivers/usb/gadget/at91_udc.c | 177 +- drivers/usb/gadget/at91_udc.h | 1 - drivers/usb/gadget/dummy_hcd.c | 7 +- drivers/usb/gadget/epautoconf.c | 16 +- drivers/usb/gadget/ether.c | 148 +- drivers/usb/gadget/file_storage.c | 5 +- drivers/usb/gadget/goku_udc.c | 14 +- drivers/usb/gadget/inode.c | 77 +- drivers/usb/gadget/lh7a40x_udc.c | 4 +- drivers/usb/gadget/lh7a40x_udc.h | 1 + drivers/usb/gadget/net2280.c | 34 +- drivers/usb/gadget/omap_udc.c | 11 +- drivers/usb/gadget/pxa2xx_udc.c | 18 +- drivers/usb/gadget/rndis.c | 392 +- drivers/usb/gadget/rndis.h | 28 +- drivers/usb/gadget/serial.c | 111 +- drivers/usb/gadget/zero.c | 3 +- drivers/usb/host/Kconfig | 23 +- drivers/usb/host/ehci-au1xxx.c | 44 +- drivers/usb/host/ehci-fsl.c | 39 +- drivers/usb/host/ehci-hcd.c | 60 +- drivers/usb/host/ehci-pci.c | 59 +- drivers/usb/host/ehci-sched.c | 216 +- drivers/usb/host/hc_crisv10.c | 4 +- drivers/usb/host/isp116x-hcd.c | 8 +- drivers/usb/host/ohci-at91.c | 90 +- drivers/usb/host/ohci-au1xxx.c | 8 +- drivers/usb/host/ohci-ep93xx.c | 225 - drivers/usb/host/ohci-hcd.c | 9 +- drivers/usb/host/ohci-hub.c | 4 +- drivers/usb/host/ohci-lh7a404.c | 2 +- drivers/usb/host/ohci-omap.c | 4 +- drivers/usb/host/ohci-ppc-soc.c | 2 +- drivers/usb/host/ohci-pxa27x.c | 2 +- drivers/usb/host/ohci-s3c2410.c | 2 +- drivers/usb/host/ohci-sa1111.c | 2 +- drivers/usb/host/pci-quirks.c | 9 +- drivers/usb/host/sl811-hcd.c | 15 +- drivers/usb/host/sl811_cs.c | 2 +- drivers/usb/host/uhci-debug.c | 48 +- drivers/usb/host/uhci-hcd.c | 140 +- drivers/usb/host/uhci-hcd.h | 81 +- drivers/usb/host/uhci-hub.c | 5 +- drivers/usb/host/uhci-q.c | 949 +- drivers/usb/image/microtek.c | 10 +- drivers/usb/input/acecad.c | 4 +- drivers/usb/input/aiptek.c | 4 +- drivers/usb/input/appletouch.c | 120 +- drivers/usb/input/ati_remote.c | 179 +- drivers/usb/input/ati_remote2.c | 2 +- drivers/usb/input/fixp-arith.h | 15 +- drivers/usb/input/hid-core.c | 238 +- drivers/usb/input/hid-debug.h | 2 +- drivers/usb/input/hid-input.c | 56 +- drivers/usb/input/hid.h | 12 +- drivers/usb/input/hiddev.c | 73 +- drivers/usb/input/itmtouch.c | 5 +- drivers/usb/input/kbtab.c | 5 +- drivers/usb/input/keyspan_remote.c | 5 +- drivers/usb/input/mtouchusb.c | 5 +- drivers/usb/input/pid.c | 1 + drivers/usb/input/powermate.c | 4 +- drivers/usb/input/touchkitusb.c | 5 +- drivers/usb/input/usbkbd.c | 4 +- drivers/usb/input/usbmouse.c | 4 +- drivers/usb/input/usbtouchscreen.c | 7 +- drivers/usb/input/wacom.c | 5 +- drivers/usb/input/xpad.c | 5 +- drivers/usb/input/yealink.c | 17 +- drivers/usb/misc/Kconfig | 23 - drivers/usb/misc/Makefile | 2 - drivers/usb/misc/appledisplay.c | 382 - drivers/usb/misc/cypress_cy7c63.c | 284 - drivers/usb/misc/cytherm.c | 1 + drivers/usb/misc/idmouse.c | 1 + drivers/usb/misc/ldusb.c | 1 + drivers/usb/misc/legousbtower.c | 1 + drivers/usb/misc/phidgetkit.c | 304 +- drivers/usb/misc/phidgetservo.c | 1 + drivers/usb/misc/sisusbvga/sisusb.c | 130 +- drivers/usb/misc/sisusbvga/sisusb.h | 6 +- drivers/usb/misc/sisusbvga/sisusb_con.c | 152 +- drivers/usb/misc/sisusbvga/sisusb_init.c | 5 +- drivers/usb/misc/sisusbvga/sisusb_init.h | 20 +- drivers/usb/misc/sisusbvga/sisusb_struct.h | 2 +- drivers/usb/misc/usblcd.c | 6 +- drivers/usb/misc/usbled.c | 1 + drivers/usb/misc/usbtest.c | 44 +- drivers/usb/mon/mon_dma.c | 5 +- drivers/usb/mon/mon_main.c | 23 +- drivers/usb/mon/mon_stat.c | 6 +- drivers/usb/mon/mon_text.c | 47 +- drivers/usb/mon/usb_mon.h | 2 - drivers/usb/net/Kconfig | 17 + drivers/usb/net/Makefile | 1 + drivers/usb/net/asix.c | 1008 +- drivers/usb/net/cdc_ether.c | 15 +- drivers/usb/net/cdc_subset.c | 1 + drivers/usb/net/gl620a.c | 1 + drivers/usb/net/net1080.c | 1 + drivers/usb/net/pegasus.c | 29 +- drivers/usb/net/pegasus.h | 3 - drivers/usb/net/plusb.c | 1 + drivers/usb/net/rndis_host.c | 3 +- drivers/usb/net/rtl8150.c | 88 +- drivers/usb/net/usbnet.c | 13 +- drivers/usb/net/usbnet.h | 1 - drivers/usb/net/zaurus.c | 20 +- drivers/{net/wireless => usb/net}/zd1201.c | 69 +- drivers/{net/wireless => usb/net}/zd1201.h | 0 drivers/usb/serial/Kconfig | 41 +- drivers/usb/serial/Makefile | 2 +- drivers/usb/serial/airprime.c | 4 +- drivers/usb/serial/anydata.c | 123 + drivers/usb/serial/ark3116.c | 2 +- drivers/usb/serial/belkin_sa.c | 3 +- drivers/usb/serial/bus.c | 3 +- drivers/usb/serial/console.c | 60 +- drivers/usb/serial/cp2101.c | 4 +- drivers/usb/serial/cyberjack.c | 11 +- drivers/usb/serial/cypress_m8.c | 5 +- drivers/usb/serial/digi_acceleport.c | 3 +- drivers/usb/serial/empeg.c | 5 +- drivers/usb/serial/ezusb.c | 3 +- drivers/usb/serial/ftdi_sio.c | 40 +- drivers/usb/serial/ftdi_sio.h | 36 - drivers/usb/serial/funsoft.c | 2 +- drivers/usb/serial/garmin_gps.c | 6 +- drivers/usb/serial/generic.c | 14 +- drivers/usb/serial/hp4x.c | 3 +- drivers/usb/serial/io_edgeport.c | 51 +- drivers/usb/serial/io_ti.c | 3 +- drivers/usb/serial/ipaq.c | 31 +- drivers/usb/serial/ipw.c | 12 +- drivers/usb/serial/ir-usb.c | 14 +- drivers/usb/serial/keyspan.c | 5 +- drivers/usb/serial/keyspan_pda.c | 10 +- drivers/usb/serial/kl5kusb105.c | 6 +- drivers/usb/serial/kobil_sct.c | 3 +- drivers/usb/serial/mct_u232.c | 3 +- drivers/usb/serial/navman.c | 2 +- drivers/usb/serial/omninet.c | 11 +- drivers/usb/serial/option.c | 136 +- drivers/usb/serial/pl2303.c | 11 +- drivers/usb/serial/pl2303.h | 11 +- drivers/usb/serial/safe_serial.c | 9 +- drivers/usb/serial/sierra.c | 75 - drivers/usb/serial/ti_usb_3410_5052.c | 3 +- drivers/usb/serial/usb-serial.c | 87 +- .../usb/serial/usb-serial.h | 12 +- drivers/usb/serial/visor.c | 42 +- drivers/usb/serial/whiteheat.c | 26 +- drivers/usb/storage/debug.h | 1 + drivers/usb/storage/dpcm.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/initializers.h | 1 + drivers/usb/storage/libusual.c | 63 +- drivers/usb/storage/onetouch.c | 4 +- drivers/usb/storage/scsiglue.c | 16 +- drivers/usb/storage/shuttle_usbat.c | 105 +- drivers/usb/storage/shuttle_usbat.h | 4 +- drivers/usb/storage/transport.c | 89 +- drivers/usb/storage/unusual_devs.h | 157 +- drivers/usb/storage/usb.c | 76 +- drivers/usb/storage/usb.h | 8 +- drivers/usb/usb-skeleton.c | 1 + drivers/video/68328fb.c | 1 + drivers/video/Kconfig | 205 +- drivers/video/Makefile | 13 +- drivers/video/S3triofb.c | 2 + drivers/video/acornfb.c | 1 + drivers/video/amifb.c | 2 + drivers/video/arcfb.c | 3 +- drivers/video/asiliantfb.c | 2 + drivers/video/atafb.c | 1 + drivers/video/aty/Makefile | 1 - drivers/video/aty/aty128fb.c | 377 +- drivers/video/aty/atyfb.h | 2 +- drivers/video/aty/atyfb_base.c | 241 +- drivers/video/aty/mach64_accel.c | 10 + drivers/video/aty/mach64_cursor.c | 33 +- drivers/video/aty/radeon_backlight.c | 247 - drivers/video/aty/radeon_base.c | 165 +- drivers/video/aty/radeon_i2c.c | 1 + drivers/video/aty/radeon_pm.c | 167 +- drivers/video/aty/radeon_pm_whitelist.h | 78 + drivers/video/aty/radeonfb.h | 18 +- drivers/video/au1100fb.c | 63 +- drivers/video/au1200fb.c | 2 +- drivers/video/backlight/Kconfig | 8 - drivers/video/backlight/Makefile | 2 +- drivers/video/backlight/hp680_bl.c | 2 +- drivers/video/backlight/locomolcd.c | 124 +- drivers/video/bw2.c | 213 +- drivers/video/cfbcopyarea.c | 1 + drivers/video/cfbfillrect.c | 1 + drivers/video/cfbimgblt.c | 2 +- drivers/video/cg14.c | 326 +- drivers/video/cg3.c | 217 +- drivers/video/cg6.c | 337 +- drivers/video/chipsfb.c | 31 +- drivers/video/cirrusfb.c | 4 + drivers/video/console/bitblit.c | 1 + drivers/video/console/dummycon.c | 3 +- drivers/video/console/fbcon.c | 366 +- drivers/video/console/fbcon.h | 4 +- drivers/video/console/fbcon_ccw.c | 1 + drivers/video/console/fbcon_cw.c | 1 + drivers/video/console/fbcon_rotate.c | 1 + drivers/video/console/fbcon_ud.c | 1 + drivers/video/console/font_acorn_8x8.c | 1 + drivers/video/console/fonts.c | 1 + drivers/video/console/mdacon.c | 9 +- drivers/video/console/newport_con.c | 39 +- drivers/video/console/promcon.c | 6 +- drivers/video/console/softcursor.c | 31 +- drivers/video/console/sticon.c | 3 +- drivers/video/console/sticore.c | 1 + drivers/video/console/tileblit.c | 1 + drivers/video/console/vgacon.c | 62 +- drivers/video/controlfb.c | 2 + drivers/video/cyber2000fb.c | 2 + drivers/video/cyber2000fb.h | 1 + drivers/video/cyberfb.c | 1 + drivers/video/cyblafb.c | 1 + drivers/video/dnfb.c | 1 + drivers/video/epson1355fb.c | 30 +- drivers/video/fb_notify.c | 46 - drivers/video/fbcmap.c | 1 + drivers/video/fbcvt.c | 1 + drivers/video/fbmem.c | 119 +- drivers/video/fbmon.c | 34 +- drivers/video/fbsysfs.c | 152 +- drivers/video/ffb.c | 466 +- drivers/video/g364fb.c | 1 + drivers/video/gbefb.c | 1 + drivers/video/geode/gx1fb_core.c | 4 + drivers/video/geode/gxfb_core.c | 4 + drivers/video/hgafb.c | 1 + drivers/video/hitfb.c | 2 + drivers/video/hpfb.c | 1 + drivers/video/i810/i810-i2c.c | 1 + drivers/video/i810/i810_main.c | 5 + drivers/video/igafb.c | 4 + drivers/video/imacfb.c | 380 - drivers/video/imsttfb.c | 2 + drivers/video/imxfb.c | 1 + drivers/video/intelfb/intelfb.h | 18 +- drivers/video/intelfb/intelfbdrv.c | 106 +- drivers/video/intelfb/intelfbhw.c | 520 +- drivers/video/intelfb/intelfbhw.h | 25 +- drivers/video/kyro/fbdev.c | 2 + drivers/video/leo.c | 294 +- drivers/video/logo/logo.c | 1 + drivers/video/macfb.c | 1 + drivers/video/macmodes.c | 7 +- drivers/video/macmodes.h | 7 +- drivers/video/matrox/g450_pll.c | 8 - drivers/video/matrox/matroxfb_DAC1064.c | 1 + drivers/video/matrox/matroxfb_DAC1064.h | 1 + drivers/video/matrox/matroxfb_Ti3026.c | 1 + drivers/video/matrox/matroxfb_Ti3026.h | 1 + drivers/video/matrox/matroxfb_base.c | 55 +- drivers/video/matrox/matroxfb_base.h | 2 + drivers/video/matrox/matroxfb_misc.c | 1 + drivers/video/maxinefb.c | 1 + drivers/video/mbx/Makefile | 4 - drivers/video/mbx/mbxdebugfs.c | 188 - drivers/video/mbx/mbxfb.c | 683 - drivers/video/mbx/reg_bits.h | 418 - drivers/video/mbx/regs.h | 195 - drivers/video/modedb.c | 12 +- drivers/video/neofb.c | 34 +- drivers/video/nvidia/Makefile | 3 +- drivers/video/nvidia/nv_backlight.c | 203 - drivers/video/nvidia/nv_hw.c | 22 +- drivers/video/nvidia/nv_i2c.c | 1 + drivers/video/nvidia/nv_of.c | 1 + drivers/video/nvidia/nv_proto.h | 12 - drivers/video/nvidia/nv_setup.c | 18 +- drivers/video/nvidia/nv_type.h | 1 - drivers/video/nvidia/nvidia.c | 489 +- drivers/video/offb.c | 434 +- drivers/video/p9100.c | 251 +- drivers/video/platinumfb.c | 2 + drivers/video/pm2fb.c | 2 + drivers/video/pm3fb.c | 2 + drivers/video/pmag-aa-fb.c | 1 + drivers/video/pnx4008/Makefile | 7 - drivers/video/pnx4008/dum.h | 211 - drivers/video/pnx4008/fbcommon.h | 43 - drivers/video/pnx4008/pnxrgbfb.c | 213 - drivers/video/pnx4008/sdum.c | 872 - drivers/video/pnx4008/sdum.h | 139 - drivers/video/pvr2fb.c | 2 + drivers/video/pxafb.c | 3 +- drivers/video/q40fb.c | 1 + drivers/video/retz3fb.c | 1 + drivers/video/riva/fbdev.c | 253 +- drivers/video/riva/rivafb-i2c.c | 1 + drivers/video/riva/rivafb.h | 1 + drivers/video/s1d13xxxfb.c | 1 + drivers/video/s3c2410fb.c | 20 +- drivers/video/sa1100fb.c | 3 +- drivers/video/savage/savagefb-i2c.c | 1 + drivers/video/savage/savagefb.h | 45 +- drivers/video/savage/savagefb_driver.c | 1477 +- drivers/video/sgivwfb.c | 7 +- drivers/video/sis/init.h | 1 + drivers/video/sis/init301.c | 4 +- drivers/video/sis/init301.h | 1 + drivers/video/sis/initextlfb.c | 1 + drivers/video/sis/osdef.h | 1 + drivers/video/sis/sis.h | 1 + drivers/video/sis/sis_accel.c | 1 + drivers/video/sis/sis_main.c | 9 +- drivers/video/skeletonfb.c | 6 + drivers/video/sstfb.c | 1 + drivers/video/stifb.c | 1 + drivers/video/sun3fb.c | 2 + drivers/video/tcx.c | 224 +- drivers/video/tdfxfb.c | 2 + drivers/video/tgafb.c | 2 + drivers/video/tridentfb.c | 7 +- drivers/video/tx3912fb.c | 1 + drivers/video/valkyriefb.c | 2 + drivers/video/vesafb.c | 61 +- drivers/video/vfb.c | 30 +- drivers/video/vga16fb.c | 44 +- drivers/video/vgastate.c | 1 + drivers/video/virgefb.c | 1 + drivers/w1/Kconfig | 15 +- drivers/w1/Makefile | 4 + drivers/w1/masters/Kconfig | 27 +- drivers/w1/masters/Makefile | 7 +- drivers/w1/masters/ds2482.c | 26 +- drivers/w1/masters/ds_w1_bridge.c | 174 + drivers/w1/masters/{ds2490.c => dscore.c} | 434 +- drivers/w1/masters/dscore.h | 166 + drivers/w1/slaves/Kconfig | 2 +- drivers/w1/slaves/w1_ds2433.c | 21 +- drivers/w1/slaves/w1_smem.c | 1 + drivers/w1/slaves/w1_therm.c | 13 +- drivers/w1/w1.c | 265 +- drivers/w1/w1.h | 41 +- drivers/w1/w1_family.c | 18 +- drivers/w1/w1_family.h | 3 +- drivers/w1/w1_int.c | 16 +- drivers/w1/w1_io.c | 31 +- .../zd1211rw/zd_util.h => w1/w1_io.h} | 30 +- drivers/w1/w1_netlink.c | 219 +- drivers/w1/w1_netlink.h | 35 +- drivers/xen/Makefile | 2 - drivers/xen/balloon/balloon.c | 144 +- drivers/xen/blkback/blkback.c | 63 +- drivers/xen/blkback/common.h | 9 +- drivers/xen/blkfront/blkfront.c | 13 +- drivers/xen/blkfront/block.h | 2 + drivers/xen/blkfront/vbd.c | 2 +- drivers/xen/blktap/Makefile | 5 +- drivers/xen/blktap/{blktapmain.c => blktap.c} | 379 +- drivers/xen/console/console.c | 115 +- drivers/xen/evtchn/evtchn.c | 4 +- drivers/xen/netback/common.h | 13 +- drivers/xen/netback/interface.c | 53 +- drivers/xen/netback/netback.c | 473 +- drivers/xen/netfront/netfront.c | 699 +- drivers/xen/privcmd/privcmd.c | 194 +- drivers/xen/xenfb/Makefile | 1 - drivers/xen/xenfb/xenfb.c | 571 - drivers/xen/xenkbd/Makefile | 1 - drivers/xen/xenkbd/xenkbd.c | 178 - drivers/zorro/names.c | 1 + fs/9p/conv.c | 7 +- fs/9p/error.c | 1 + fs/9p/fcall.c | 1 + fs/9p/fcprint.c | 1 + fs/9p/fid.c | 1 + fs/9p/mux.c | 5 +- fs/9p/trans_fd.c | 1 + fs/9p/v9fs.c | 1 + fs/9p/v9fs_vfs.h | 2 +- fs/9p/vfs_addr.c | 3 +- fs/9p/vfs_file.c | 1 + fs/9p/vfs_inode.c | 24 +- fs/9p/vfs_super.c | 29 +- fs/Kconfig | 299 +- fs/Makefile | 4 +- fs/adfs/dir.c | 1 + fs/adfs/inode.c | 3 +- fs/adfs/super.c | 17 +- fs/affs/affs.h | 6 +- fs/affs/file.c | 4 +- fs/affs/super.c | 24 +- fs/affs/symlink.c | 2 +- fs/afs/cache.h | 27 + fs/afs/cell.c | 112 +- fs/afs/cell.h | 16 +- fs/afs/cmservice.c | 2 +- fs/afs/dir.c | 23 +- fs/afs/file.c | 248 +- fs/afs/fsclient.c | 4 +- fs/afs/inode.c | 46 +- fs/afs/internal.h | 27 +- fs/afs/kafsasyncd.c | 9 +- fs/afs/main.c | 24 +- fs/afs/mntpt.c | 25 +- fs/afs/proc.c | 1 - fs/afs/server.c | 9 +- fs/afs/super.c | 26 +- fs/afs/super.h | 2 - fs/afs/vlocation.c | 185 +- fs/afs/vnode.c | 251 +- fs/afs/vnode.h | 10 +- fs/afs/volume.c | 78 +- fs/afs/volume.h | 28 +- fs/aio.c | 6 +- fs/autofs/init.c | 6 +- fs/autofs/inode.c | 3 +- fs/autofs/symlink.c | 2 +- fs/autofs4/autofs_i.h | 3 +- fs/autofs4/expire.c | 3 +- fs/autofs4/init.c | 8 +- fs/autofs4/inode.c | 23 +- fs/autofs4/root.c | 38 +- fs/autofs4/waitq.c | 1 + fs/befs/linuxvfs.c | 53 +- fs/bfs/bfs.h | 2 +- fs/bfs/dir.c | 2 +- fs/bfs/file.c | 2 +- fs/bfs/inode.c | 10 +- fs/binfmt_elf.c | 371 +- fs/binfmt_elf_fdpic.c | 1000 +- fs/binfmt_flat.c | 3 +- fs/binfmt_misc.c | 19 +- fs/binfmt_som.c | 2 + fs/block_dev.c | 52 +- fs/buffer.c | 40 +- fs/cachefiles/Makefile | 18 - fs/cachefiles/cf-bind.c | 279 - fs/cachefiles/cf-interface.c | 1299 - fs/cachefiles/cf-key.c | 157 - fs/cachefiles/cf-main.c | 129 - fs/cachefiles/cf-namei.c | 825 - fs/cachefiles/cf-proc.c | 498 - fs/cachefiles/cf-sysctl.c | 69 - fs/cachefiles/cf-xattr.c | 295 - fs/cachefiles/internal.h | 308 - fs/char_dev.c | 24 +- fs/cifs/CHANGES | 31 +- fs/cifs/Makefile | 2 +- fs/cifs/README | 41 +- fs/cifs/asn1.c | 11 +- fs/cifs/cifs_debug.c | 134 +- fs/cifs/cifs_debug.h | 4 - fs/cifs/cifs_unicode.c | 1 - fs/cifs/cifsencrypt.c | 141 +- fs/cifs/cifsfs.c | 32 +- fs/cifs/cifsfs.h | 7 +- fs/cifs/cifsglob.h | 87 +- fs/cifs/cifspdu.h | 98 +- fs/cifs/cifsproto.h | 18 +- fs/cifs/cifssmb.c | 313 +- fs/cifs/connect.c | 530 +- fs/cifs/dir.c | 19 +- fs/cifs/fcntl.c | 4 +- fs/cifs/file.c | 180 +- fs/cifs/inode.c | 57 +- fs/cifs/link.c | 7 +- fs/cifs/misc.c | 10 +- fs/cifs/netmisc.c | 5 +- fs/cifs/ntlmssp.c | 143 + fs/cifs/readdir.c | 203 +- fs/cifs/sess.c | 538 - fs/cifs/smbencrypt.c | 1 - fs/cifs/smberr.h | 1 - fs/cifs/transport.c | 621 +- fs/cifs/xattr.c | 6 +- fs/coda/coda_linux.c | 2 + fs/coda/file.c | 6 +- fs/coda/inode.c | 12 +- fs/coda/psdev.c | 25 +- fs/coda/symlink.c | 2 +- fs/coda/sysctl.c | 1 + fs/coda/upcall.c | 6 +- fs/compat.c | 44 +- fs/compat_ioctl.c | 36 +- fs/configfs/dir.c | 12 +- fs/configfs/inode.c | 3 +- fs/configfs/mount.c | 8 +- fs/configfs/symlink.c | 2 +- fs/cramfs/inode.c | 22 +- fs/dcache.c | 417 +- fs/dcookies.c | 1 + fs/debugfs/file.c | 5 +- fs/debugfs/inode.c | 16 +- fs/devfs/Makefile | 8 + fs/devfs/base.c | 2836 ++ fs/devfs/util.c | 97 + fs/devpts/inode.c | 12 +- fs/direct-io.c | 24 +- fs/dquot.c | 21 +- fs/efs/inode.c | 2 +- fs/efs/super.c | 12 +- fs/efs/symlink.c | 5 +- fs/eventpoll.c | 45 +- fs/exec.c | 166 +- fs/exportfs/expfs.c | 2 +- fs/ext2/Makefile | 2 +- fs/ext2/balloc.c | 26 +- fs/ext2/bitmap.c | 32 + fs/ext2/dir.c | 12 +- fs/ext2/ext2.h | 6 +- fs/ext2/fsync.c | 2 +- fs/ext2/ialloc.c | 4 + fs/ext2/inode.c | 9 +- fs/ext2/super.c | 50 +- fs/ext2/xattr.h | 1 + fs/ext3/acl.h | 3 + fs/ext3/balloc.c | 263 +- fs/ext3/dir.c | 5 +- fs/ext3/ialloc.c | 15 +- fs/ext3/inode.c | 91 +- fs/ext3/ioctl.c | 2 +- fs/ext3/namei.c | 17 +- fs/ext3/resize.c | 99 +- fs/ext3/super.c | 262 +- fs/ext3/xattr.c | 29 +- fs/ext3/xattr.h | 1 + fs/fat/dir.c | 2 +- fs/fat/inode.c | 13 +- fs/fat/misc.c | 1 + fs/fcntl.c | 2 - fs/file.c | 10 +- fs/file_table.c | 6 +- fs/freevxfs/vxfs.h | 6 +- fs/freevxfs/vxfs_fshead.c | 12 +- fs/freevxfs/vxfs_immed.c | 2 +- fs/freevxfs/vxfs_inode.c | 11 +- fs/freevxfs/vxfs_lookup.c | 2 - fs/freevxfs/vxfs_subr.c | 7 +- fs/freevxfs/vxfs_super.c | 20 +- fs/fs-writeback.c | 10 +- fs/fscache/Makefile | 11 - fs/fscache/cookie.c | 1045 - fs/fscache/fscache-int.h | 93 - fs/fscache/fsdef.c | 110 - fs/fscache/main.c | 105 - fs/fscache/page.c | 537 - fs/fuse/Makefile | 2 +- fs/fuse/control.c | 218 - fs/fuse/dev.c | 418 +- fs/fuse/dir.c | 185 +- fs/fuse/file.c | 232 +- fs/fuse/fuse_i.h | 137 +- fs/fuse/inode.c | 202 +- fs/hfs/bnode.c | 2 +- fs/hfs/btree.c | 2 +- fs/hfs/hfs_fs.h | 4 +- fs/hfs/inode.c | 6 +- fs/hfs/super.c | 13 +- fs/hfsplus/bitmap.c | 15 +- fs/hfsplus/bnode.c | 2 +- fs/hfsplus/btree.c | 2 +- fs/hfsplus/hfsplus_fs.h | 4 +- fs/hfsplus/inode.c | 6 +- fs/hfsplus/super.c | 13 +- fs/hostfs/hostfs_kern.c | 19 +- fs/hpfs/file.c | 2 +- fs/hpfs/hpfs_fn.h | 4 +- fs/hpfs/inode.c | 1 + fs/hpfs/namei.c | 2 +- fs/hpfs/super.c | 10 +- fs/hppfs/hppfs_kern.c | 11 +- fs/hugetlbfs/inode.c | 40 +- fs/inode.c | 18 +- fs/inotify.c | 991 +- fs/inotify_user.c | 719 - fs/ioctl.c | 1 + fs/ioprio.c | 67 +- fs/isofs/compress.c | 3 +- fs/isofs/dir.c | 1 + fs/isofs/inode.c | 19 +- fs/isofs/isofs.h | 2 +- fs/isofs/namei.c | 1 + fs/isofs/rock.c | 2 +- fs/isofs/zisofs.h | 2 +- fs/jbd/checkpoint.c | 419 +- fs/jbd/commit.c | 209 +- fs/jbd/journal.c | 95 +- fs/jbd/recovery.c | 1 - fs/jbd/transaction.c | 35 +- fs/jffs/inode-v23.c | 51 +- fs/jffs/intrep.c | 16 +- fs/jffs/jffs_fm.h | 1 + fs/jffs2/Makefile | 3 - fs/jffs2/README.Locking | 21 - fs/jffs2/acl.c | 485 - fs/jffs2/acl.h | 45 - fs/jffs2/build.c | 2 - fs/jffs2/compr.c | 2 +- fs/jffs2/compr.h | 4 +- fs/jffs2/compr_zlib.c | 1 + fs/jffs2/debug.c | 14 +- fs/jffs2/debug.h | 7 +- fs/jffs2/dir.c | 121 +- fs/jffs2/erase.c | 88 +- fs/jffs2/file.c | 37 +- fs/jffs2/fs.c | 70 +- fs/jffs2/gc.c | 131 +- fs/jffs2/histo.h | 3 + fs/jffs2/malloc.c | 129 +- fs/jffs2/nodelist.c | 192 +- fs/jffs2/nodelist.h | 194 +- fs/jffs2/nodemgmt.c | 210 +- fs/jffs2/os-linux.h | 27 +- fs/jffs2/readinode.c | 139 +- fs/jffs2/scan.c | 453 +- fs/jffs2/security.c | 82 - fs/jffs2/summary.c | 480 +- fs/jffs2/summary.h | 64 +- fs/jffs2/super.c | 70 +- fs/jffs2/symlink.c | 7 +- fs/jffs2/wbuf.c | 971 +- fs/jffs2/write.c | 147 +- fs/jffs2/xattr.c | 1324 - fs/jffs2/xattr.h | 129 - fs/jffs2/xattr_trusted.c | 52 - fs/jffs2/xattr_user.c | 52 - fs/jfs/inode.c | 18 +- fs/jfs/jfs_extent.c | 10 +- fs/jfs/jfs_imap.c | 5 +- fs/jfs/jfs_inode.c | 1 + fs/jfs/jfs_inode.h | 3 +- fs/jfs/jfs_metapage.c | 9 +- fs/jfs/jfs_metapage.h | 2 +- fs/jfs/jfs_txnmgr.c | 4 +- fs/jfs/namei.c | 33 +- fs/jfs/super.c | 130 +- fs/libfs.c | 34 +- fs/lockd/clntlock.c | 39 +- fs/lockd/clntproc.c | 41 +- fs/lockd/host.c | 9 +- fs/lockd/svc.c | 1 + fs/lockd/svclock.c | 13 +- fs/lockd/svcproc.c | 1 + fs/lockd/svcsubs.c | 16 +- fs/lockd/xdr.c | 1 + fs/locks.c | 154 +- fs/minix/bitmap.c | 2 +- fs/minix/dir.c | 3 +- fs/minix/inode.c | 36 +- fs/mpage.c | 22 +- fs/msdos/namei.c | 9 +- fs/namei.c | 107 +- fs/namespace.c | 144 +- fs/ncpfs/dir.c | 1 + fs/ncpfs/inode.c | 15 +- fs/ncpfs/ioctl.c | 1 + fs/ncpfs/mmap.c | 2 +- fs/ncpfs/ncplib_kernel.c | 1 + fs/ncpfs/ncplib_kernel.h | 1 + fs/ncpfs/ncpsign_kernel.c | 1 + fs/ncpfs/sock.c | 1 + fs/ncpfs/symlink.c | 3 +- fs/nfs/Makefile | 9 +- fs/nfs/callback.c | 34 +- fs/nfs/callback.h | 7 +- fs/nfs/callback_proc.c | 14 +- fs/nfs/callback_xdr.c | 3 +- fs/nfs/client.c | 1436 - fs/nfs/delegation.c | 36 +- fs/nfs/delegation.h | 10 +- fs/nfs/dir.c | 53 +- fs/nfs/direct.c | 444 +- fs/nfs/file.c | 78 +- fs/nfs/fscache.c | 345 - fs/nfs/fscache.h | 466 - fs/nfs/getroot.c | 310 - fs/nfs/idmap.c | 44 +- fs/nfs/inode.c | 1359 +- fs/nfs/internal.h | 248 - fs/nfs/mount_clnt.c | 1 - fs/nfs/namespace.c | 243 - fs/nfs/nfs2xdr.c | 6 +- fs/nfs/nfs3acl.c | 11 +- fs/nfs/nfs3proc.c | 15 +- fs/nfs/nfs3xdr.c | 6 +- fs/nfs/nfs4_fs.h | 82 +- fs/nfs/nfs4namespace.c | 259 - fs/nfs/nfs4proc.c | 387 +- fs/nfs/nfs4renewd.c | 20 +- fs/nfs/nfs4state.c | 175 +- fs/nfs/nfs4xdr.c | 281 +- fs/nfs/nfsroot.c | 1 + fs/nfs/pagelist.c | 54 +- fs/nfs/proc.c | 11 +- fs/nfs/read.c | 188 +- fs/nfs/super.c | 1068 - fs/nfs/symlink.c | 13 +- fs/nfs/sysctl.c | 54 +- fs/nfs/write.c | 117 +- fs/nfsctl.c | 1 + fs/nfsd/export.c | 2 +- fs/nfsd/nfs4callback.c | 1 + fs/nfsd/nfs4idmap.c | 1 + fs/nfsd/nfs4proc.c | 8 - fs/nfsd/nfs4recover.c | 2 +- fs/nfsd/nfs4state.c | 37 +- fs/nfsd/nfs4xdr.c | 2 +- fs/nfsd/nfscache.c | 3 +- fs/nfsd/nfsctl.c | 7 +- fs/nfsd/nfsfh.c | 27 +- fs/nfsd/nfsproc.c | 2 +- fs/nfsd/nfssvc.c | 1 + fs/nfsd/stats.c | 10 - fs/nfsd/vfs.c | 25 +- fs/nls/nls_base.c | 1 + fs/ntfs/aops.c | 4 +- fs/ntfs/aops.h | 3 +- fs/ntfs/attrib.c | 6 +- fs/ntfs/file.c | 29 +- fs/ntfs/inode.c | 37 +- fs/ntfs/mft.c | 5 + fs/ntfs/ntfs.h | 4 +- fs/ntfs/super.c | 45 +- fs/ntfs/sysctl.h | 1 + fs/ocfs2/aops.c | 11 +- fs/ocfs2/cluster/heartbeat.c | 22 +- fs/ocfs2/cluster/masklog.h | 22 +- fs/ocfs2/cluster/ocfs2_heartbeat.h | 1 - fs/ocfs2/cluster/tcp.c | 16 +- fs/ocfs2/dir.c | 6 +- fs/ocfs2/dlm/dlmast.c | 15 +- fs/ocfs2/dlm/dlmcommon.h | 65 +- fs/ocfs2/dlm/dlmconvert.c | 33 +- fs/ocfs2/dlm/dlmdebug.c | 6 +- fs/ocfs2/dlm/dlmdebug.h | 30 + fs/ocfs2/dlm/dlmdomain.c | 112 +- fs/ocfs2/dlm/dlmfs.c | 14 +- fs/ocfs2/dlm/dlmlock.c | 73 +- fs/ocfs2/dlm/dlmmaster.c | 449 +- fs/ocfs2/dlm/dlmrecovery.c | 601 +- fs/ocfs2/dlm/dlmthread.c | 74 +- fs/ocfs2/dlm/dlmunlock.c | 56 +- fs/ocfs2/dlm/userdlm.c | 2 +- fs/ocfs2/dlmglue.c | 7 +- fs/ocfs2/extent_map.c | 29 +- fs/ocfs2/inode.c | 4 + fs/ocfs2/inode.h | 2 +- fs/ocfs2/journal.c | 10 +- fs/ocfs2/localalloc.c | 8 - fs/ocfs2/mmap.c | 4 +- fs/ocfs2/ocfs2.h | 6 +- fs/ocfs2/slot_map.c | 2 +- fs/ocfs2/suballoc.c | 261 +- fs/ocfs2/suballoc.h | 2 - fs/ocfs2/super.c | 79 +- fs/ocfs2/symlink.c | 5 +- fs/ocfs2/vote.c | 8 +- fs/open.c | 35 +- fs/openpromfs/inode.c | 1160 +- fs/partitions/Kconfig | 2 +- fs/partitions/Makefile | 1 + fs/partitions/acorn.c | 1 + fs/partitions/check.c | 45 +- fs/partitions/devfs.c | 130 + fs/partitions/devfs.h | 10 + fs/partitions/efi.c | 1 + fs/partitions/efi.h | 1 + fs/partitions/ibm.c | 1 + fs/partitions/mac.c | 1 + fs/partitions/msdos.c | 1 + fs/partitions/sun.c | 2 +- fs/pipe.c | 10 +- fs/pnode.c | 9 +- fs/proc/array.c | 13 +- fs/proc/base.c | 1178 +- fs/proc/inode.c | 13 +- fs/proc/internal.h | 26 +- fs/proc/kcore.c | 5 +- fs/proc/proc_misc.c | 26 +- fs/proc/root.c | 7 +- fs/proc/task_mmu.c | 157 +- fs/proc/task_nommu.c | 23 +- fs/proc/vmcore.c | 1 + fs/qnx4/bitmap.c | 1 + fs/qnx4/dir.c | 1 + fs/qnx4/fsync.c | 1 + fs/qnx4/inode.c | 17 +- fs/qnx4/namei.c | 1 + fs/qnx4/truncate.c | 1 + fs/ramfs/file-mmu.c | 2 +- fs/ramfs/file-nommu.c | 6 +- fs/ramfs/inode.c | 14 +- fs/ramfs/internal.h | 2 +- fs/read_write.c | 2 +- fs/readdir.c | 18 +- fs/reiserfs/bitmap.c | 1 + fs/reiserfs/dir.c | 1 + fs/reiserfs/do_balan.c | 1 + fs/reiserfs/file.c | 16 +- fs/reiserfs/fix_node.c | 1 + fs/reiserfs/ibalance.c | 1 + fs/reiserfs/inode.c | 48 +- fs/reiserfs/ioctl.c | 2 +- fs/reiserfs/journal.c | 7 +- fs/reiserfs/lbalance.c | 1 + fs/reiserfs/namei.c | 1 + fs/reiserfs/objectid.c | 1 + fs/reiserfs/prints.c | 1 + fs/reiserfs/procfs.c | 26 +- fs/reiserfs/stree.c | 1 + fs/reiserfs/super.c | 49 +- fs/reiserfs/tail_conversion.c | 1 + fs/reiserfs/xattr.c | 11 +- fs/romfs/inode.c | 13 +- fs/select.c | 94 +- fs/smbfs/file.c | 2 +- fs/smbfs/inode.c | 15 +- fs/smbfs/proc.c | 5 +- fs/smbfs/proto.h | 4 +- fs/smbfs/request.c | 6 +- fs/smbfs/smbiod.c | 30 +- fs/splice.c | 97 +- fs/squashfs/Makefile | 4 +- fs/squashfs/inode.c | 2514 +- fs/squashfs/squashfs.h | 86 - fs/squashfs/squashfs2_0.c | 758 - fs/stat.c | 10 +- fs/super.c | 153 +- fs/sync.c | 2 +- fs/sysfs/dir.c | 10 +- fs/sysfs/file.c | 5 + fs/sysfs/inode.c | 15 +- fs/sysfs/mount.c | 6 +- fs/sysv/dir.c | 3 +- fs/sysv/ialloc.c | 2 +- fs/sysv/inode.c | 5 +- fs/sysv/itree.c | 2 +- fs/sysv/super.c | 13 +- fs/sysv/sysv.h | 2 +- fs/udf/file.c | 2 +- fs/udf/ialloc.c | 12 +- fs/udf/inode.c | 4 +- fs/udf/super.c | 20 +- fs/udf/symlink.c | 2 +- fs/udf/udfdecl.h | 7 +- fs/ufs/balloc.c | 406 +- fs/ufs/cylinder.c | 49 +- fs/ufs/dir.c | 1000 +- fs/ufs/file.c | 25 +- fs/ufs/ialloc.c | 64 +- fs/ufs/inode.c | 399 +- fs/ufs/namei.c | 87 +- fs/ufs/super.c | 439 +- fs/ufs/truncate.c | 221 +- fs/ufs/util.c | 103 +- fs/ufs/util.h | 115 +- fs/vfat/namei.c | 9 +- fs/xattr.c | 4 +- fs/xfs/Kconfig | 27 +- fs/xfs/Makefile-linux-2.6 | 4 +- fs/xfs/linux-2.6/kmem.h | 38 +- fs/xfs/linux-2.6/mrlock.h | 4 +- fs/xfs/linux-2.6/sema.h | 19 +- fs/xfs/linux-2.6/xfs_aops.c | 85 +- fs/xfs/linux-2.6/xfs_aops.h | 10 +- fs/xfs/linux-2.6/xfs_buf.c | 2 +- fs/xfs/linux-2.6/xfs_buf.h | 5 +- fs/xfs/linux-2.6/xfs_export.c | 13 +- fs/xfs/linux-2.6/xfs_file.c | 171 +- fs/xfs/linux-2.6/xfs_fs_subr.c | 59 +- fs/xfs/linux-2.6/xfs_globals.c | 1 - fs/xfs/linux-2.6/xfs_ioctl.c | 65 +- fs/xfs/linux-2.6/xfs_ioctl32.c | 5 +- fs/xfs/linux-2.6/xfs_iops.c | 162 +- fs/xfs/linux-2.6/xfs_linux.h | 35 +- fs/xfs/linux-2.6/xfs_lrw.c | 150 +- fs/xfs/linux-2.6/xfs_lrw.h | 6 +- fs/xfs/linux-2.6/xfs_stats.c | 4 +- fs/xfs/linux-2.6/xfs_super.c | 208 +- fs/xfs/linux-2.6/xfs_super.h | 2 +- fs/xfs/linux-2.6/xfs_sysctl.c | 7 +- fs/xfs/linux-2.6/xfs_sysctl.h | 2 - fs/xfs/linux-2.6/xfs_vfs.c | 41 +- fs/xfs/linux-2.6/xfs_vfs.h | 167 +- fs/xfs/linux-2.6/xfs_vnode.c | 53 +- fs/xfs/linux-2.6/xfs_vnode.h | 376 +- fs/xfs/quota/xfs_dquot.c | 8 +- fs/xfs/quota/xfs_dquot.h | 4 +- fs/xfs/quota/xfs_dquot_item.c | 6 +- fs/xfs/quota/xfs_qm.c | 8 +- fs/xfs/quota/xfs_qm_bhv.c | 88 +- fs/xfs/quota/xfs_qm_stats.c | 2 + fs/xfs/quota/xfs_qm_syscalls.c | 6 +- fs/xfs/quota/xfs_trans_dquot.c | 2 + fs/xfs/support/debug.c | 4 +- fs/xfs/support/debug.h | 3 + fs/xfs/xfs_acl.c | 71 +- fs/xfs/xfs_acl.h | 16 +- fs/xfs/xfs_alloc.c | 120 +- fs/xfs/xfs_alloc.h | 22 - fs/xfs/xfs_alloc_btree.c | 2 + fs/xfs/xfs_attr.c | 66 +- fs/xfs/xfs_attr.h | 14 +- fs/xfs/xfs_attr_leaf.c | 4 +- fs/xfs/xfs_behavior.h | 3 + fs/xfs/xfs_bmap.c | 388 +- fs/xfs/xfs_bmap.h | 22 +- fs/xfs/xfs_bmap_btree.c | 12 +- fs/xfs/xfs_btree.c | 2 + fs/xfs/xfs_buf_item.c | 9 +- fs/xfs/xfs_cap.h | 10 +- fs/xfs/xfs_da_btree.c | 194 +- fs/xfs/xfs_da_btree.h | 4 + fs/xfs/xfs_dfrag.c | 84 +- fs/xfs/xfs_dfrag.h | 3 - fs/xfs/xfs_dinode.h | 10 +- fs/xfs/xfs_dir.c | 1217 + fs/xfs/xfs_dir.h | 142 + fs/xfs/xfs_dir2.c | 396 +- fs/xfs/xfs_dir2.h | 32 +- fs/xfs/xfs_dir2_block.c | 31 +- fs/xfs/xfs_dir2_data.c | 5 +- fs/xfs/xfs_dir2_data.h | 8 +- fs/xfs/xfs_dir2_leaf.c | 14 +- fs/xfs/xfs_dir2_node.c | 14 +- fs/xfs/xfs_dir2_sf.c | 13 +- fs/xfs/xfs_dir2_trace.c | 2 + fs/xfs/xfs_dir_leaf.c | 2213 ++ fs/xfs/xfs_dir_leaf.h | 231 + fs/xfs/xfs_dir_sf.h | 155 + fs/xfs/xfs_dmapi.h | 2 +- fs/xfs/xfs_dmops.c | 1 + fs/xfs/xfs_error.c | 2 + fs/xfs/xfs_extfree_item.c | 57 +- fs/xfs/xfs_extfree_item.h | 53 +- fs/xfs/xfs_fs.h | 7 +- fs/xfs/xfs_fsops.c | 36 +- fs/xfs/xfs_ialloc.c | 5 +- fs/xfs/xfs_ialloc_btree.c | 2 + fs/xfs/xfs_iget.c | 24 +- fs/xfs/xfs_inode.c | 111 +- fs/xfs/xfs_inode.h | 7 +- fs/xfs/xfs_inode_item.c | 57 +- fs/xfs/xfs_inode_item.h | 61 +- fs/xfs/xfs_iocore.c | 7 +- fs/xfs/xfs_iomap.c | 26 +- fs/xfs/xfs_itable.c | 20 +- fs/xfs/xfs_itable.h | 1 + fs/xfs/xfs_log.c | 37 +- fs/xfs/xfs_log_recover.c | 115 +- fs/xfs/xfs_mount.c | 67 +- fs/xfs/xfs_mount.h | 70 +- fs/xfs/xfs_qmops.c | 1 + fs/xfs/xfs_quota.h | 2 +- fs/xfs/xfs_rename.c | 68 +- fs/xfs/xfs_rtalloc.c | 18 +- fs/xfs/xfs_rw.c | 124 +- fs/xfs/xfs_rw.h | 10 +- fs/xfs/xfs_trans.c | 48 +- fs/xfs/xfs_trans.h | 11 +- fs/xfs/xfs_trans_ail.c | 6 +- fs/xfs/xfs_trans_buf.c | 12 +- fs/xfs/xfs_trans_extfree.c | 1 + fs/xfs/xfs_trans_inode.c | 2 + fs/xfs/xfs_trans_item.c | 2 +- fs/xfs/xfs_trans_space.h | 11 +- fs/xfs/xfs_utils.c | 13 +- fs/xfs/xfs_utils.h | 7 +- fs/xfs/xfs_vfsops.c | 127 +- fs/xfs/xfs_vnodeops.c | 306 +- include/Kbuild | 9 - include/acpi/acconfig.h | 18 +- include/acpi/acdisasm.h | 173 +- include/acpi/acdispat.h | 8 +- include/acpi/acevents.h | 4 +- include/acpi/acexcep.h | 6 +- include/acpi/acglobal.h | 47 +- include/acpi/acinterp.h | 15 +- include/acpi/aclocal.h | 294 +- include/acpi/acmacros.h | 89 +- include/acpi/acnamesp.h | 28 +- include/acpi/acobject.h | 192 +- include/acpi/acopcode.h | 2 +- include/acpi/acoutput.h | 10 +- include/acpi/acparser.h | 4 +- include/acpi/acpi_bus.h | 12 +- include/acpi/acpi_drivers.h | 17 - include/acpi/acpi_numa.h | 23 - include/acpi/acpiosxf.h | 77 +- include/acpi/acpixf.h | 4 +- include/acpi/acresrc.h | 28 +- include/acpi/acstruct.h | 121 +- include/acpi/actables.h | 6 +- include/acpi/actbl.h | 400 +- include/acpi/actbl1.h | 639 +- include/acpi/actbl2.h | 230 +- include/acpi/actypes.h | 119 +- include/acpi/acutils.h | 95 +- include/acpi/amlcode.h | 6 +- include/acpi/amlresrc.h | 85 +- include/acpi/pdc_intel.h | 5 - include/acpi/platform/acenv.h | 47 +- include/acpi/platform/aclinux.h | 49 +- include/acpi/processor.h | 29 +- include/asm-alpha/Kbuild | 11 - include/asm-alpha/barrier.h | 3 + include/asm-alpha/bitops.h | 1 + include/asm-alpha/cache.h | 1 + include/asm-alpha/cacheflush.h | 1 + include/asm-alpha/compiler.h | 3 - include/asm-alpha/core_cia.h | 1 + include/asm-alpha/core_t2.h | 3 +- include/asm-alpha/dma-mapping.h | 1 + include/asm-alpha/dma.h | 1 + include/asm-alpha/floppy.h | 6 +- include/asm-alpha/hardirq.h | 1 + include/asm-alpha/hw_irq.h | 3 + include/asm-alpha/ide.h | 1 + include/asm-alpha/io.h | 1 + include/asm-alpha/irq.h | 5 + include/asm-alpha/kmap_types.h | 1 + include/asm-alpha/machvec.h | 1 + include/asm-alpha/mmu_context.h | 1 + include/asm-alpha/mmzone.h | 1 + include/asm-alpha/page.h | 8 +- include/asm-alpha/param.h | 1 + include/asm-alpha/pgalloc.h | 1 + include/asm-alpha/pgtable.h | 1 + include/asm-alpha/rwsem.h | 14 +- include/asm-alpha/serial.h | 1 + include/asm-alpha/signal.h | 2 + include/asm-alpha/smp.h | 1 + include/asm-alpha/socket.h | 1 - include/asm-alpha/spinlock.h | 1 + include/asm-alpha/system.h | 1 + include/asm-alpha/tlbflush.h | 1 + include/asm-alpha/unistd.h | 7 +- include/asm-alpha/vga.h | 2 +- include/asm-arm/Kbuild | 1 - include/asm-arm/apm.h | 1 + include/asm-arm/arch-aaec2000/io.h | 1 + include/asm-arm/arch-aaec2000/memory.h | 1 + .../asm-arm/arch-at91rm9200/at91rm9200_spi.h | 81 - .../asm-arm/arch-at91rm9200/at91rm9200_ssc.h | 96 - .../asm-arm/arch-at91rm9200/at91rm9200_sys.h | 11 +- .../asm-arm/arch-at91rm9200/at91rm9200_tc.h | 146 - .../asm-arm/arch-at91rm9200/at91rm9200_udp.h | 77 - include/asm-arm/arch-at91rm9200/board.h | 32 +- include/asm-arm/arch-at91rm9200/gpio.h | 5 - include/asm-arm/arch-at91rm9200/hardware.h | 9 +- include/asm-arm/arch-at91rm9200/io.h | 1 + include/asm-arm/arch-at91rm9200/irqs.h | 10 + include/asm-arm/arch-at91rm9200/memory.h | 4 +- include/asm-arm/arch-at91rm9200/pio.h | 115 + include/asm-arm/arch-at91rm9200/system.h | 10 +- include/asm-arm/arch-at91rm9200/timex.h | 2 +- include/asm-arm/arch-at91rm9200/uncompress.h | 2 +- include/asm-arm/arch-at91rm9200/vmalloc.h | 2 +- include/asm-arm/arch-cl7500/acornfb.h | 1 + include/asm-arm/arch-clps711x/hardware.h | 1 + include/asm-arm/arch-clps711x/io.h | 1 + include/asm-arm/arch-clps711x/memory.h | 1 + include/asm-arm/arch-clps711x/uncompress.h | 1 + include/asm-arm/arch-ebsa285/hardware.h | 1 + include/asm-arm/arch-ebsa285/io.h | 8 + include/asm-arm/arch-ebsa285/memory.h | 1 + include/asm-arm/arch-ebsa285/vmalloc.h | 1 + include/asm-arm/arch-ep93xx/ep93xx-regs.h | 2 - include/asm-arm/arch-ep93xx/platform.h | 1 - include/asm-arm/arch-h720x/memory.h | 2 + include/asm-arm/arch-imx/imx-dma.h | 8 +- include/asm-arm/arch-imx/memory.h | 6 +- include/asm-arm/arch-integrator/io.h | 1 + include/asm-arm/arch-integrator/smp.h | 1 + include/asm-arm/arch-iop3xx/io.h | 1 + include/asm-arm/arch-iop3xx/iop331-irqs.h | 4 + include/asm-arm/arch-iop3xx/memory.h | 1 + include/asm-arm/arch-iop3xx/timex.h | 1 + include/asm-arm/arch-iop3xx/uncompress.h | 1 + include/asm-arm/arch-ixp23xx/entry-macro.S | 2 +- include/asm-arm/arch-ixp23xx/ixp23xx.h | 16 +- include/asm-arm/arch-ixp23xx/platform.h | 25 - include/asm-arm/arch-ixp23xx/uncompress.h | 2 +- include/asm-arm/arch-ixp4xx/dma.h | 1 + include/asm-arm/arch-ixp4xx/io.h | 2 +- include/asm-arm/arch-l7200/io.h | 1 + include/asm-arm/arch-lh7a40x/clocks.h | 18 - include/asm-arm/arch-lh7a40x/constants.h | 9 +- include/asm-arm/arch-lh7a40x/dma.h | 79 +- include/asm-arm/arch-lh7a40x/entry-macro.S | 70 +- include/asm-arm/arch-lh7a40x/hardware.h | 4 - include/asm-arm/arch-lh7a40x/io.h | 1 + include/asm-arm/arch-lh7a40x/irqs.h | 8 +- include/asm-arm/arch-lh7a40x/registers.h | 65 +- include/asm-arm/arch-lh7a40x/ssp.h | 71 - include/asm-arm/arch-lh7a40x/uncompress.h | 2 +- include/asm-arm/arch-netx/debug-macro.S | 38 - include/asm-arm/arch-netx/dma.h | 21 - include/asm-arm/arch-netx/entry-macro.S | 35 - include/asm-arm/arch-netx/eth.h | 27 - include/asm-arm/arch-netx/hardware.h | 39 - include/asm-arm/arch-netx/io.h | 28 - include/asm-arm/arch-netx/irqs.h | 70 - include/asm-arm/arch-netx/memory.h | 36 - include/asm-arm/arch-netx/netx-regs.h | 410 - include/asm-arm/arch-netx/param.h | 18 - include/asm-arm/arch-netx/pfifo.h | 54 - include/asm-arm/arch-netx/system.h | 38 - include/asm-arm/arch-netx/timex.h | 20 - include/asm-arm/arch-netx/uncompress.h | 76 - include/asm-arm/arch-netx/vmalloc.h | 19 - include/asm-arm/arch-netx/xc.h | 42 - include/asm-arm/arch-omap/board-fsample.h | 51 - include/asm-arm/arch-omap/board.h | 8 +- include/asm-arm/arch-omap/clock.h | 2 + include/asm-arm/arch-omap/dma.h | 15 +- include/asm-arm/arch-omap/dmtimer.h | 80 +- include/asm-arm/arch-omap/gpmc.h | 91 - include/asm-arm/arch-omap/hardware.h | 5 +- include/asm-arm/arch-omap/io.h | 1 + include/asm-arm/arch-omap/irqs.h | 14 - include/asm-arm/arch-omap/mux.h | 26 - include/asm-arm/arch-omap/pm.h | 33 - include/asm-arm/arch-omap/system.h | 1 + include/asm-arm/arch-omap/uncompress.h | 1 + include/asm-arm/arch-pnx4008/clock.h | 61 - include/asm-arm/arch-pnx4008/debug-macro.S | 23 - include/asm-arm/arch-pnx4008/dma.h | 162 - include/asm-arm/arch-pnx4008/entry-macro.S | 121 - include/asm-arm/arch-pnx4008/gpio.h | 241 - include/asm-arm/arch-pnx4008/hardware.h | 32 - include/asm-arm/arch-pnx4008/io.h | 21 - include/asm-arm/arch-pnx4008/irq.h | 42 - include/asm-arm/arch-pnx4008/irqs.h | 215 - include/asm-arm/arch-pnx4008/memory.h | 24 - include/asm-arm/arch-pnx4008/param.h | 21 - include/asm-arm/arch-pnx4008/platform.h | 69 - include/asm-arm/arch-pnx4008/pm.h | 33 - include/asm-arm/arch-pnx4008/system.h | 38 - include/asm-arm/arch-pnx4008/timex.h | 73 - include/asm-arm/arch-pnx4008/uncompress.h | 46 - include/asm-arm/arch-pnx4008/vmalloc.h | 20 - include/asm-arm/arch-pxa/idp.h | 1 + include/asm-arm/arch-pxa/io.h | 1 + include/asm-arm/arch-pxa/irqs.h | 1 + include/asm-arm/arch-pxa/poodle.h | 4 - include/asm-arm/arch-pxa/pxa-regs.h | 21 +- include/asm-arm/arch-pxa/ssp.h | 4 +- include/asm-arm/arch-pxa/system.h | 1 - include/asm-arm/arch-pxa/timex.h | 1 + include/asm-arm/arch-pxa/trizeps4.h | 106 - include/asm-arm/arch-realview/io.h | 1 + include/asm-arm/arch-realview/smp.h | 1 + include/asm-arm/arch-s3c2410/anubis-cpld.h | 3 + include/asm-arm/arch-s3c2410/anubis-irq.h | 4 +- include/asm-arm/arch-s3c2410/anubis-map.h | 2 + include/asm-arm/arch-s3c2410/audio.h | 4 + include/asm-arm/arch-s3c2410/bast-cpld.h | 5 + include/asm-arm/arch-s3c2410/bast-irq.h | 6 +- include/asm-arm/arch-s3c2410/bast-map.h | 4 + include/asm-arm/arch-s3c2410/bast-pmu.h | 3 + include/asm-arm/arch-s3c2410/debug-macro.S | 13 +- include/asm-arm/arch-s3c2410/dma.h | 152 +- include/asm-arm/arch-s3c2410/entry-macro.S | 30 +- include/asm-arm/arch-s3c2410/fb.h | 7 + include/asm-arm/arch-s3c2410/hardware.h | 10 + include/asm-arm/arch-s3c2410/idle.h | 4 + include/asm-arm/arch-s3c2410/iic.h | 4 + include/asm-arm/arch-s3c2410/io.h | 8 +- include/asm-arm/arch-s3c2410/irqs.h | 9 +- include/asm-arm/arch-s3c2410/map.h | 34 +- include/asm-arm/arch-s3c2410/memory.h | 14 +- include/asm-arm/arch-s3c2410/nand.h | 3 + include/asm-arm/arch-s3c2410/osiris-map.h | 2 + include/asm-arm/arch-s3c2410/regs-adc.h | 3 + include/asm-arm/arch-s3c2410/regs-clock.h | 83 +- include/asm-arm/arch-s3c2410/regs-dsc.h | 15 +- include/asm-arm/arch-s3c2410/regs-gpio.h | 83 +- include/asm-arm/arch-s3c2410/regs-gpioj.h | 9 +- include/asm-arm/arch-s3c2410/regs-iic.h | 4 + include/asm-arm/arch-s3c2410/regs-iis.h | 12 +- include/asm-arm/arch-s3c2410/regs-irq.h | 15 +- include/asm-arm/arch-s3c2410/regs-lcd.h | 8 + include/asm-arm/arch-s3c2410/regs-mem.h | 6 + include/asm-arm/arch-s3c2410/regs-nand.h | 52 +- include/asm-arm/arch-s3c2410/regs-power.h | 34 - include/asm-arm/arch-s3c2410/regs-rtc.h | 7 +- include/asm-arm/arch-s3c2410/regs-sdi.h | 5 + include/asm-arm/arch-s3c2410/regs-serial.h | 20 +- include/asm-arm/arch-s3c2410/regs-spi.h | 8 +- include/asm-arm/arch-s3c2410/regs-timer.h | 7 + include/asm-arm/arch-s3c2410/regs-udc.h | 8 +- include/asm-arm/arch-s3c2410/regs-watchdog.h | 7 +- include/asm-arm/arch-s3c2410/system.h | 9 +- include/asm-arm/arch-s3c2410/timex.h | 6 + include/asm-arm/arch-s3c2410/uncompress.h | 15 +- include/asm-arm/arch-s3c2410/usb-control.h | 5 + include/asm-arm/arch-s3c2410/vmalloc.h | 6 +- include/asm-arm/arch-s3c2410/vr1000-cpld.h | 4 + include/asm-arm/arch-s3c2410/vr1000-irq.h | 6 +- include/asm-arm/arch-s3c2410/vr1000-map.h | 6 + include/asm-arm/arch-sa1100/assabet.h | 1 + include/asm-arm/arch-sa1100/cerf.h | 1 + include/asm-arm/arch-sa1100/collie.h | 1 + include/asm-arm/arch-sa1100/dma.h | 1 + include/asm-arm/arch-sa1100/hardware.h | 1 + include/asm-arm/arch-sa1100/ide.h | 1 + include/asm-arm/arch-sa1100/io.h | 1 + include/asm-arm/arch-sa1100/irqs.h | 1 + include/asm-arm/arch-sa1100/memory.h | 1 + include/asm-arm/arch-sa1100/system.h | 1 + include/asm-arm/arch-versatile/io.h | 1 + include/asm-arm/arch-versatile/platform.h | 2 - include/asm-arm/arch-versatile/system.h | 16 +- include/asm-arm/assembler.h | 36 + include/asm-arm/atomic.h | 1 + include/asm-arm/bug.h | 2 + include/asm-arm/bugs.h | 4 - include/asm-arm/byteorder.h | 10 +- include/asm-arm/cacheflush.h | 19 +- include/asm-arm/cpu.h | 1 + include/asm-arm/dma-mapping.h | 1 + include/asm-arm/dma.h | 1 + include/asm-arm/domain.h | 7 - include/asm-arm/dyntick.h | 6 - include/asm-arm/elf.h | 17 +- include/asm-arm/floppy.h | 2 +- include/asm-arm/fpstate.h | 9 +- include/asm-arm/glue.h | 1 + include/asm-arm/hardirq.h | 1 + include/asm-arm/hardware/dec21285.h | 1 + include/asm-arm/hardware/iomd.h | 1 + include/asm-arm/hardware/locomo.h | 5 - include/asm-arm/hardware/sharpsl_pm.h | 11 - include/asm-arm/hardware/ssp.h | 4 +- include/asm-arm/hw_irq.h | 20 - include/asm-arm/io.h | 7 - include/asm-arm/irq.h | 26 +- include/asm-arm/leds.h | 1 + include/asm-arm/mach/irq.h | 135 +- include/asm-arm/mach/map.h | 9 +- include/asm-arm/mach/pci.h | 2 +- .../{serial_at91.h => serial_at91rm9200.h} | 9 +- include/asm-arm/mach/serial_sa1100.h | 1 + include/asm-arm/mach/time.h | 2 - include/asm-arm/memory.h | 81 +- include/asm-arm/mmu.h | 17 - include/asm-arm/mmu_context.h | 14 +- include/asm-arm/page-nommu.h | 51 - include/asm-arm/page.h | 17 +- include/asm-arm/pci.h | 1 + include/asm-arm/pgalloc.h | 8 +- include/asm-arm/pgtable-hwdef.h | 1 - include/asm-arm/pgtable-nommu.h | 122 - include/asm-arm/pgtable.h | 10 +- include/asm-arm/proc-fns.h | 5 +- include/asm-arm/procinfo.h | 4 +- include/asm-arm/ptrace.h | 6 +- include/asm-arm/signal.h | 6 + include/asm-arm/smp.h | 1 + include/asm-arm/socket.h | 1 - include/asm-arm/spinlock.h | 16 +- include/asm-arm/system.h | 5 +- include/asm-arm/thread_info.h | 9 +- include/asm-arm/thread_notify.h | 48 - include/asm-arm/tlbflush.h | 1 + include/asm-arm/uaccess.h | 184 +- include/asm-arm/ucontext.h | 93 +- include/asm-arm/unistd.h | 23 +- include/asm-arm/vga.h | 2 +- include/asm-arm26/atomic.h | 1 + include/asm-arm26/bug.h | 1 + include/asm-arm26/dma.h | 1 + include/asm-arm26/floppy.h | 2 +- include/asm-arm26/hardirq.h | 1 + include/asm-arm26/hardware.h | 1 + include/asm-arm26/io.h | 1 + include/asm-arm26/irq.h | 4 + include/asm-arm26/leds.h | 1 + include/asm-arm26/mach-types.h | 1 + include/asm-arm26/page.h | 1 + include/asm-arm26/pgtable.h | 1 + include/asm-arm26/serial.h | 1 + include/asm-arm26/signal.h | 2 + include/asm-arm26/smp.h | 1 + include/asm-arm26/socket.h | 1 - include/asm-arm26/sysirq.h | 1 + include/asm-arm26/system.h | 2 + include/asm-arm26/unistd.h | 10 +- include/asm-cris/Kbuild | 5 - include/asm-cris/arch-v10/Kbuild | 2 - include/asm-cris/arch-v10/io.h | 1 + include/asm-cris/arch-v10/irq.h | 2 +- include/asm-cris/arch-v10/page.h | 1 + include/asm-cris/arch-v10/system.h | 1 + include/asm-cris/arch-v32/Kbuild | 2 - include/asm-cris/arch-v32/arbiter.h | 4 +- include/asm-cris/arch-v32/io.h | 1 + include/asm-cris/arch-v32/irq.h | 3 +- include/asm-cris/arch-v32/page.h | 1 + include/asm-cris/arch-v32/processor.h | 1 + include/asm-cris/arch-v32/system.h | 1 + include/asm-cris/byteorder.h | 3 +- include/asm-cris/elf.h | 8 +- include/asm-cris/eshlibld.h | 1 + include/asm-cris/etraxgpio.h | 1 + include/asm-cris/fasttimer.h | 1 + include/asm-cris/hw_irq.h | 2 + include/asm-cris/irq.h | 5 + include/asm-cris/page.h | 11 +- include/asm-cris/pci.h | 1 + include/asm-cris/pgtable.h | 1 + include/asm-cris/posix_types.h | 9 +- include/asm-cris/processor.h | 1 + include/asm-cris/rtc.h | 1 + include/asm-cris/signal.h | 2 + include/asm-cris/socket.h | 1 - include/asm-cris/system.h | 1 + include/asm-cris/tlbflush.h | 1 + include/asm-cris/unistd.h | 13 +- include/asm-frv/Kbuild | 1 - include/asm-frv/atomic.h | 5 +- include/asm-frv/bitops.h | 1 + include/asm-frv/bug.h | 1 + include/asm-frv/cache.h | 1 + include/asm-frv/checksum.h | 2 +- include/asm-frv/dma.h | 1 + include/asm-frv/elf.h | 7 +- include/asm-frv/fpu.h | 1 + include/asm-frv/gdb-stub.h | 22 - include/asm-frv/hardirq.h | 1 + include/asm-frv/highmem.h | 3 +- include/asm-frv/ide.h | 1 + include/asm-frv/io.h | 41 +- include/asm-frv/irq-routing.h | 2 +- include/asm-frv/irq.h | 1 + include/asm-frv/mb-regs.h | 27 +- include/asm-frv/mmu_context.h | 1 + include/asm-frv/page.h | 1 + include/asm-frv/pci.h | 1 + include/asm-frv/pgalloc.h | 1 + include/asm-frv/pgtable.h | 1 + include/asm-frv/processor.h | 4 +- include/asm-frv/ptrace.h | 12 +- include/asm-frv/registers.h | 97 +- include/asm-frv/segment.h | 1 + include/asm-frv/serial.h | 1 + include/asm-frv/signal.h | 8 +- include/asm-frv/smp.h | 1 + include/asm-frv/socket.h | 1 - include/asm-frv/system.h | 2 + include/asm-frv/thread_info.h | 24 +- include/asm-frv/tlbflush.h | 1 + include/asm-frv/types.h | 1 + include/asm-frv/uaccess.h | 64 +- include/asm-frv/unaligned.h | 1 + include/asm-frv/unistd.h | 26 +- include/asm-frv/virtconvert.h | 1 + include/asm-generic/Kbuild | 12 - include/asm-generic/Kbuild.asm | 34 - include/asm-generic/audit_change_attr.h | 22 - include/asm-generic/audit_dir_write.h | 18 - include/asm-generic/audit_read.h | 8 - include/asm-generic/audit_write.h | 11 - include/asm-generic/bug.h | 35 +- include/asm-generic/cputime.h | 2 - include/asm-generic/dma-mapping.h | 1 + include/asm-generic/fcntl.h | 1 + include/asm-generic/local.h | 1 + include/asm-generic/memory_model.h | 27 +- include/asm-generic/mman.h | 6 + include/asm-generic/mutex-null.h | 15 +- include/asm-generic/percpu.h | 4 - include/asm-generic/rtc.h | 7 +- include/asm-generic/sections.h | 1 - include/asm-generic/signal.h | 7 - include/asm-generic/tlb.h | 2 + include/asm-generic/vmlinux.lds.h | 31 - include/asm-h8300/Kbuild | 1 - include/asm-h8300/bitops.h | 1 + include/asm-h8300/dma.h | 1 + include/asm-h8300/elf.h | 1 + include/asm-h8300/hardirq.h | 1 + include/asm-h8300/io.h | 1 + include/asm-h8300/irq.h | 4 + include/asm-h8300/keyboard.h | 1 + include/asm-h8300/mmu_context.h | 1 + include/asm-h8300/page.h | 11 +- include/asm-h8300/page_offset.h | 1 + include/asm-h8300/param.h | 1 + include/asm-h8300/pgtable.h | 1 + include/asm-h8300/processor.h | 4 +- include/asm-h8300/semaphore-helper.h | 1 + include/asm-h8300/shm.h | 1 + include/asm-h8300/signal.h | 2 + include/asm-h8300/socket.h | 1 - include/asm-h8300/system.h | 2 + include/asm-h8300/unaligned.h | 1 + include/asm-h8300/unistd.h | 7 +- include/asm-h8300/virtconvert.h | 1 + include/asm-i386/Kbuild | 10 - include/asm-i386/alternative.h | 30 +- include/asm-i386/apic.h | 15 + include/asm-i386/apicdef.h | 1 + include/asm-i386/atomic.h | 31 +- include/asm-i386/bitops.h | 1 + include/asm-i386/bug.h | 1 + include/asm-i386/bugs.h | 1 + include/asm-i386/byteorder.h | 1 + include/asm-i386/cache.h | 1 + include/asm-i386/cpu.h | 2 + include/asm-i386/cpufeature.h | 13 - include/asm-i386/delay.h | 2 - include/asm-i386/dma.h | 1 + include/asm-i386/dwarf2.h | 54 - include/asm-i386/elf.h | 79 +- include/asm-i386/fixmap.h | 16 +- include/asm-i386/floppy.h | 7 +- include/asm-i386/futex.h | 10 +- include/asm-i386/hardirq.h | 1 + include/asm-i386/highmem.h | 1 + include/asm-i386/hpet.h | 1 + include/asm-i386/hw_irq.h | 13 +- include/asm-i386/ide.h | 1 + include/asm-i386/intel_arch_perfmon.h | 19 - include/asm-i386/io.h | 1 + include/asm-i386/io_apic.h | 1 + include/asm-i386/irq.h | 1 + include/asm-i386/irqflags.h | 127 - include/asm-i386/k8.h | 1 - include/asm-i386/kdebug.h | 2 - include/asm-i386/kmap_types.h | 1 + include/asm-i386/kprobes.h | 2 - include/asm-i386/local.h | 40 +- include/asm-i386/mach-default/mach_ipi.h | 7 +- include/asm-i386/mach-default/mach_mpspec.h | 4 - include/asm-i386/mach-default/mach_timer.h | 4 +- .../asm-i386/mach-default/setup_arch_post.h | 40 + .../{setup_arch.h => setup_arch_pre.h} | 0 include/asm-i386/mach-summit/mach_apic.h | 1 + include/asm-i386/mach-summit/mach_mpparse.h | 3 - include/asm-i386/mach-visws/setup_arch_post.h | 49 + .../{setup_arch.h => setup_arch_pre.h} | 3 - .../asm-i386/mach-voyager/setup_arch_post.h | 73 + .../{setup_arch.h => setup_arch_pre.h} | 2 +- include/asm-i386/mach-xen/asm/irqflags.h | 80 - include/asm-i386/mach-xen/asm/maddr.h | 160 - include/asm-i386/mach-xen/asm/stacktrace.h | 18 - include/asm-i386/mach-xen/asm/timer.h | 70 - include/asm-i386/mach-xen/setup_arch_post.h | 101 + .../{setup_arch.h => setup_arch_pre.h} | 2 +- include/asm-i386/mce.h | 5 - include/asm-i386/mmu.h | 1 + include/asm-i386/mmu_context.h | 1 + include/asm-i386/mmzone.h | 2 +- include/asm-i386/msi.h | 10 +- include/asm-i386/mtrr.h | 5 +- include/asm-i386/nmi.h | 28 +- include/asm-i386/node.h | 29 + include/asm-i386/page.h | 12 +- include/asm-i386/param.h | 1 + include/asm-i386/pci.h | 1 + include/asm-i386/pgalloc.h | 1 + include/asm-i386/pgtable.h | 1 + include/asm-i386/posix_types.h | 4 +- include/asm-i386/processor.h | 26 +- include/asm-i386/rwlock.h | 54 +- include/asm-i386/rwsem.h | 77 +- include/asm-i386/semaphore.h | 8 +- include/asm-i386/serial.h | 1 + include/asm-i386/setup.h | 17 - include/asm-i386/signal.h | 6 +- include/asm-i386/smp.h | 1 + include/asm-i386/socket.h | 1 - include/asm-i386/spinlock.h | 42 +- include/asm-i386/stacktrace.h | 1 - include/asm-i386/string.h | 1 + include/asm-i386/system.h | 54 +- include/asm-i386/thread_info.h | 25 +- include/asm-i386/timer.h | 57 + include/asm-i386/timex.h | 35 +- include/asm-i386/tlbflush.h | 1 + include/asm-i386/topology.h | 11 +- include/asm-i386/tsc.h | 48 - include/asm-i386/types.h | 1 + include/asm-i386/uaccess.h | 70 +- include/asm-i386/unistd.h | 10 +- include/asm-i386/unwind.h | 102 - include/asm-i386/vga.h | 2 +- include/asm-ia64/Kbuild | 17 - include/asm-ia64/agp.h | 31 - include/asm-ia64/asmmacro.h | 1 + include/asm-ia64/cache.h | 1 + include/asm-ia64/delay.h | 1 + include/asm-ia64/dma-mapping.h | 99 +- include/asm-ia64/dma.h | 1 + include/asm-ia64/elf.h | 1 + include/asm-ia64/fixmap.h | 2 - include/asm-ia64/gcc_intrin.h | 60 +- include/asm-ia64/hardirq.h | 1 + include/asm-ia64/hw_irq.h | 28 +- include/asm-ia64/hypercall.h | 423 - include/asm-ia64/hypervisor.h | 218 - include/asm-ia64/ia32.h | 1 + include/asm-ia64/ide.h | 1 + include/asm-ia64/intel_intrin.h | 68 +- include/asm-ia64/intrinsics.h | 1 + include/asm-ia64/io.h | 37 +- include/asm-ia64/iosapic.h | 2 - include/asm-ia64/irq.h | 32 +- include/asm-ia64/kdebug.h | 2 - include/asm-ia64/kmap_types.h | 1 + include/asm-ia64/kprobes.h | 2 - include/asm-ia64/machvec.h | 8 +- include/asm-ia64/machvec_dig.h | 15 - include/asm-ia64/machvec_sn2.h | 7 - include/asm-ia64/maddr.h | 92 - include/asm-ia64/mca.h | 9 +- include/asm-ia64/meminit.h | 13 +- include/asm-ia64/mman.h | 16 +- include/asm-ia64/msi.h | 12 - include/asm-ia64/nodedata.h | 13 +- include/asm-ia64/numa.h | 7 +- include/asm-ia64/page.h | 56 +- include/asm-ia64/pal.h | 8 +- include/asm-ia64/param.h | 1 + include/asm-ia64/percpu.h | 4 +- include/asm-ia64/pgalloc.h | 5 +- include/asm-ia64/pgtable.h | 23 +- include/asm-ia64/privop.h | 59 - include/asm-ia64/processor.h | 2 +- include/asm-ia64/ptrace.h | 11 +- include/asm-ia64/rwsem.h | 18 +- include/asm-ia64/signal.h | 4 + include/asm-ia64/smp.h | 1 + include/asm-ia64/sn/intr.h | 8 - include/asm-ia64/sn/pcibr_provider.h | 5 +- include/asm-ia64/sn/pcibus_provider_defs.h | 17 +- include/asm-ia64/sn/simulator.h | 1 + include/asm-ia64/sn/sn_cpuid.h | 1 + include/asm-ia64/sn/sn_sal.h | 19 +- include/asm-ia64/sn/tioca_provider.h | 2 +- include/asm-ia64/sn/tiocp.h | 3 +- include/asm-ia64/sn/xpc.h | 5 +- include/asm-ia64/socket.h | 1 - include/asm-ia64/string.h | 1 + include/asm-ia64/synch_bitops.h | 61 - include/asm-ia64/system.h | 10 +- include/asm-ia64/thread_info.h | 7 +- include/asm-ia64/tlb.h | 1 + include/asm-ia64/tlbflush.h | 1 + include/asm-ia64/topology.h | 1 - include/asm-ia64/unistd.h | 6 +- include/asm-ia64/ustack.h | 7 +- include/asm-ia64/vga.h | 2 +- include/asm-ia64/xen/privop.h | 304 - include/asm-m32r/Kbuild | 1 - include/asm-m32r/assembler.h | 1 + include/asm-m32r/atomic.h | 1 + include/asm-m32r/bitops.h | 1 + include/asm-m32r/cacheflush.h | 1 + include/asm-m32r/hardirq.h | 1 + include/asm-m32r/hw_irq.h | 5 + include/asm-m32r/ide.h | 1 + include/asm-m32r/irq.h | 1 + include/asm-m32r/kmap_types.h | 1 + include/asm-m32r/m32104ut/m32104ut_pld.h | 1 + include/asm-m32r/m32700ut/m32700ut_lan.h | 1 + include/asm-m32r/m32700ut/m32700ut_lcd.h | 1 + include/asm-m32r/m32700ut/m32700ut_pld.h | 1 + include/asm-m32r/m32r.h | 1 + include/asm-m32r/mmu.h | 1 + include/asm-m32r/mmu_context.h | 2 + include/asm-m32r/opsput/opsput_lan.h | 1 + include/asm-m32r/opsput/opsput_lcd.h | 1 + include/asm-m32r/opsput/opsput_pld.h | 1 + include/asm-m32r/page.h | 4 +- include/asm-m32r/pgalloc.h | 1 + include/asm-m32r/pgtable-2level.h | 1 + include/asm-m32r/pgtable.h | 1 + include/asm-m32r/processor.h | 1 + include/asm-m32r/ptrace.h | 33 +- include/asm-m32r/rtc.h | 1 + include/asm-m32r/semaphore.h | 1 + include/asm-m32r/serial.h | 1 + include/asm-m32r/sigcontext.h | 14 +- include/asm-m32r/signal.h | 3 + include/asm-m32r/smp.h | 1 + include/asm-m32r/socket.h | 1 - include/asm-m32r/spinlock.h | 1 + include/asm-m32r/system.h | 6 +- include/asm-m32r/timex.h | 1 + include/asm-m32r/tlbflush.h | 1 + include/asm-m32r/uaccess.h | 1 + include/asm-m32r/unistd.h | 9 +- include/asm-m32r/user.h | 1 + include/asm-m32r/vga.h | 2 +- include/asm-m68k/Kbuild | 1 - include/asm-m68k/amigaints.h | 96 +- include/asm-m68k/apollohw.h | 4 - include/asm-m68k/atari_stdma.h | 2 +- include/asm-m68k/atariints.h | 11 + include/asm-m68k/atomic.h | 1 + include/asm-m68k/bug.h | 1 + include/asm-m68k/bvme6000hw.h | 30 +- include/asm-m68k/cacheflush.h | 40 +- include/asm-m68k/dma-mapping.h | 91 +- include/asm-m68k/dma.h | 1 + include/asm-m68k/dvma.h | 1 + include/asm-m68k/elf.h | 1 + include/asm-m68k/entry.h | 1 + include/asm-m68k/floppy.h | 4 +- include/asm-m68k/fpu.h | 1 + include/asm-m68k/hardirq.h | 1 + include/asm-m68k/ide.h | 1 + include/asm-m68k/io.h | 1 + include/asm-m68k/irq.h | 113 +- include/asm-m68k/mac_oss.h | 10 +- include/asm-m68k/machdep.h | 6 + include/asm-m68k/macintosh.h | 10 + include/asm-m68k/macints.h | 14 + include/asm-m68k/mc146818rtc.h | 1 + include/asm-m68k/mmu_context.h | 1 + include/asm-m68k/motorola_pgtable.h | 1 + include/asm-m68k/mvme147hw.h | 44 +- include/asm-m68k/mvme16xhw.h | 40 +- include/asm-m68k/openprom.h | 1 + include/asm-m68k/oplib.h | 5 + include/asm-m68k/page.h | 9 +- include/asm-m68k/page_offset.h | 1 + include/asm-m68k/pgalloc.h | 1 + include/asm-m68k/pgtable.h | 1 + include/asm-m68k/processor.h | 9 +- include/asm-m68k/scatterlist.h | 9 +- include/asm-m68k/semaphore-helper.h | 1 + include/asm-m68k/serial.h | 1 + include/asm-m68k/setup.h | 1 + include/asm-m68k/shm.h | 1 + include/asm-m68k/signal.h | 21 +- include/asm-m68k/socket.h | 1 - include/asm-m68k/sun3ints.h | 22 +- include/asm-m68k/sun3xflop.h | 3 +- include/asm-m68k/system.h | 2 + include/asm-m68k/tlbflush.h | 1 + include/asm-m68k/traps.h | 7 - include/asm-m68k/uaccess.h | 1100 +- include/asm-m68k/unistd.h | 46 +- include/asm-m68k/virtconvert.h | 1 + include/asm-m68knommu/Kbuild | 1 - include/asm-m68knommu/bitops.h | 1 + include/asm-m68knommu/bootstd.h | 12 +- include/asm-m68knommu/cacheflush.h | 13 +- include/asm-m68knommu/coldfire.h | 77 +- include/asm-m68knommu/commproc.h | 1 + include/asm-m68knommu/dma-mapping.h | 1 + include/asm-m68knommu/dma.h | 1 + include/asm-m68knommu/elf.h | 1 + include/asm-m68knommu/elia.h | 1 + include/asm-m68knommu/entry.h | 1 + include/asm-m68knommu/fpu.h | 1 + include/asm-m68knommu/hardirq.h | 1 + include/asm-m68knommu/io.h | 1 + include/asm-m68knommu/irq.h | 11 +- include/asm-m68knommu/m5206sim.h | 1 + include/asm-m68knommu/m520xsim.h | 1 + include/asm-m68knommu/m523xsim.h | 1 + include/asm-m68knommu/m5249sim.h | 2 +- include/asm-m68knommu/m5272sim.h | 1 + include/asm-m68knommu/m527xsim.h | 1 + include/asm-m68knommu/m528xsim.h | 1 + include/asm-m68knommu/m532xsim.h | 2238 -- include/asm-m68knommu/mcfcache.h | 16 +- include/asm-m68knommu/mcfdma.h | 1 + include/asm-m68knommu/mcfmbus.h | 1 + include/asm-m68knommu/mcfne.h | 1 + include/asm-m68knommu/mcfpci.h | 1 + include/asm-m68knommu/mcfpit.h | 9 +- include/asm-m68knommu/mcfsim.h | 4 +- include/asm-m68knommu/mcfsmc.h | 1 + include/asm-m68knommu/mcftimer.h | 31 +- include/asm-m68knommu/mcfuart.h | 5 +- include/asm-m68knommu/mcfwdebug.h | 1 + include/asm-m68knommu/mmu_context.h | 1 + include/asm-m68knommu/nettel.h | 1 + include/asm-m68knommu/page.h | 8 +- include/asm-m68knommu/page_offset.h | 44 +- include/asm-m68knommu/param.h | 1 + include/asm-m68knommu/pgtable.h | 1 + include/asm-m68knommu/processor.h | 32 +- include/asm-m68knommu/ptrace.h | 4 +- include/asm-m68knommu/semaphore-helper.h | 1 + include/asm-m68knommu/signal.h | 2 + include/asm-m68knommu/system.h | 2 + include/asm-m68knommu/uaccess.h | 12 +- include/asm-m68knommu/unaligned.h | 1 + include/asm-m68knommu/unistd.h | 7 +- include/asm-mips/Kbuild | 1 - include/asm-mips/a.out.h | 1 + include/asm-mips/addrspace.h | 36 + include/asm-mips/apm.h | 64 - include/asm-mips/arc/types.h | 1 + include/asm-mips/asm.h | 1 + include/asm-mips/asmmacro-32.h | 4 +- include/asm-mips/asmmacro-64.h | 19 +- include/asm-mips/asmmacro.h | 5 +- include/asm-mips/atomic.h | 3 +- include/asm-mips/bcache.h | 1 + include/asm-mips/bitops.h | 3 +- include/asm-mips/bootinfo.h | 13 - include/asm-mips/bug.h | 1 + include/asm-mips/bugs.h | 1 + include/asm-mips/byteorder.h | 1 + include/asm-mips/cache.h | 1 + include/asm-mips/checksum.h | 1 + include/asm-mips/compat.h | 3 + include/asm-mips/cpu-features.h | 31 +- include/asm-mips/cpu-info.h | 1 + include/asm-mips/cpu.h | 2 +- include/asm-mips/ddb5074.h | 11 + include/asm-mips/ddb5xxx/ddb5074.h | 38 + include/asm-mips/ddb5xxx/ddb5476.h | 157 + include/asm-mips/ddb5xxx/ddb5477.h | 1 + include/asm-mips/ddb5xxx/ddb5xxx.h | 12 +- include/asm-mips/debug.h | 1 + include/asm-mips/dec/prom.h | 1 + include/asm-mips/delay.h | 1 + include/asm-mips/dma.h | 1 + include/asm-mips/elf.h | 1 + include/asm-mips/emma2rh/emma2rh.h | 330 - include/asm-mips/emma2rh/markeins.h | 76 - include/asm-mips/fcntl.h | 1 + include/asm-mips/fixmap.h | 5 +- include/asm-mips/fpu.h | 4 +- include/asm-mips/fpu_emulator.h | 4 +- include/asm-mips/futex.h | 33 +- include/asm-mips/hazards.h | 5 +- include/asm-mips/highmem.h | 1 + include/asm-mips/hw_irq.h | 8 +- include/asm-mips/inst.h | 2 +- include/asm-mips/{irqflags.h => interrupt.h} | 71 +- include/asm-mips/io.h | 1 + include/asm-mips/ip32/machine.h | 1 + include/asm-mips/irq.h | 6 +- include/asm-mips/isadep.h | 1 + include/asm-mips/jmr3927/irq.h | 1 + include/asm-mips/kmap_types.h | 1 + include/asm-mips/local.h | 1 + include/asm-mips/mach-au1x00/au1000.h | 1 + include/asm-mips/mach-au1x00/au1xxx.h | 1 + include/asm-mips/mach-au1x00/au1xxx_dbdma.h | 1 + include/asm-mips/mach-au1x00/au1xxx_ide.h | 1 + include/asm-mips/mach-au1x00/au1xxx_psc.h | 12 +- include/asm-mips/mach-au1x00/ioremap.h | 1 + .../mach-cobalt/cpu-feature-overrides.h | 3 +- include/asm-mips/mach-db1x00/db1x00.h | 13 +- include/asm-mips/mach-ddb5074/mc146818rtc.h | 31 + include/asm-mips/mach-dec/mc146818rtc.h | 2 - include/asm-mips/mach-dec/param.h | 18 + .../mach-excite/cpu-feature-overrides.h | 40 - include/asm-mips/mach-excite/excite.h | 154 - .../asm-mips/mach-excite/excite_nandflash.h | 7 - include/asm-mips/mach-excite/rm9k_eth.h | 23 - include/asm-mips/mach-excite/rm9k_wdt.h | 12 - include/asm-mips/mach-excite/rm9k_xicap.h | 16 - include/asm-mips/mach-generic/floppy.h | 2 +- include/asm-mips/mach-generic/ide.h | 1 + include/asm-mips/mach-generic/kmalloc.h | 1 + include/asm-mips/mach-generic/param.h | 13 + include/asm-mips/mach-generic/spaces.h | 1 + .../mach-ip22/cpu-feature-overrides.h | 2 +- include/asm-mips/mach-ip22/spaces.h | 1 + .../mach-ip27/cpu-feature-overrides.h | 5 +- .../mach-ip32/cpu-feature-overrides.h | 3 +- include/asm-mips/mach-ip32/kmalloc.h | 1 + .../asm-mips/mach-ja/cpu-feature-overrides.h | 2 +- include/asm-mips/mach-jazz/floppy.h | 2 +- include/asm-mips/mach-jazz/param.h | 16 + .../mach-mips/cpu-feature-overrides.h | 9 +- include/asm-mips/mach-mips/irq.h | 7 + .../{mach-emma2rh/irq.h => mach-mips/param.h} | 8 +- .../mach-ocelot3/cpu-feature-overrides.h | 2 +- include/asm-mips/mach-pb1x00/pb1550.h | 1 + include/asm-mips/mach-qemu/param.h | 13 + .../mach-rm200/cpu-feature-overrides.h | 4 +- .../mach-sibyte/cpu-feature-overrides.h | 2 +- .../asm-mips/mach-sim/cpu-feature-overrides.h | 9 +- include/asm-mips/mach-wrppmc/mach-gt64120.h | 84 - .../mach-yosemite/cpu-feature-overrides.h | 2 +- include/asm-mips/mips-boards/generic.h | 1 + include/asm-mips/mipsregs.h | 12 +- include/asm-mips/mmu_context.h | 1 + include/asm-mips/mmzone.h | 13 + include/asm-mips/module.h | 1 + include/asm-mips/msgbuf.h | 1 + include/asm-mips/paccess.h | 1 + include/asm-mips/page.h | 30 +- include/asm-mips/param.h | 2 +- include/asm-mips/pci.h | 1 + include/asm-mips/pci/bridge.h | 3 - include/asm-mips/pgalloc.h | 1 + include/asm-mips/pgtable-32.h | 1 + include/asm-mips/pgtable-64.h | 1 + include/asm-mips/pgtable-bits.h | 1 + include/asm-mips/pgtable.h | 3 + include/asm-mips/prefetch.h | 1 + include/asm-mips/processor.h | 17 +- include/asm-mips/ptrace.h | 1 + include/asm-mips/qemu.h | 6 - include/asm-mips/reg.h | 1 + include/asm-mips/resource.h | 1 + include/asm-mips/rm9k-ocd.h | 56 - include/asm-mips/serial.h | 1 + include/asm-mips/sgiarcs.h | 1 + include/asm-mips/sibyte/board.h | 1 + include/asm-mips/sibyte/carmel.h | 1 + include/asm-mips/sibyte/sentosa.h | 1 + include/asm-mips/sibyte/swarm.h | 1 + include/asm-mips/siginfo.h | 1 + include/asm-mips/signal.h | 12 + include/asm-mips/sim.h | 1 + include/asm-mips/smp.h | 1 + include/asm-mips/sn/addrs.h | 28 + include/asm-mips/sn/agent.h | 1 + include/asm-mips/sn/arch.h | 1 + include/asm-mips/sn/io.h | 1 + include/asm-mips/sn/ioc3.h | 2 - include/asm-mips/sn/klconfig.h | 100 +- include/asm-mips/sn/kldir.h | 35 +- include/asm-mips/sn/launch.h | 1 + include/asm-mips/sn/mapped_kernel.h | 1 + include/asm-mips/sn/sn0/addrs.h | 88 +- include/asm-mips/sn/sn0/arch.h | 18 +- include/asm-mips/sn/sn0/hub.h | 4 + include/asm-mips/sn/sn0/hubio.h | 16 + include/asm-mips/sn/sn0/hubmd.h | 3 +- include/asm-mips/sn/sn0/hubpi.h | 18 + include/asm-mips/sn/sn0/ip27.h | 9 +- include/asm-mips/sn/{fru.h => sn0/sn0_fru.h} | 8 +- include/asm-mips/sni.h | 7 +- include/asm-mips/socket.h | 1 - include/asm-mips/stackframe.h | 17 +- include/asm-mips/string.h | 1 + include/asm-mips/system.h | 6 +- include/asm-mips/thread_info.h | 1 + include/asm-mips/time.h | 4 +- include/asm-mips/tlbflush.h | 1 + include/asm-mips/tx4927/toshiba_rbtx4927.h | 1 + include/asm-mips/types.h | 1 + include/asm-mips/uaccess.h | 1 + include/asm-mips/unistd.h | 28 +- include/asm-mips/vga.h | 2 +- include/asm-mips/vr41xx/capcella.h | 2 +- include/asm-mips/vr41xx/cmbvr4133.h | 6 +- include/asm-mips/vr41xx/e55.h | 43 + include/asm-mips/vr41xx/irq.h | 101 - include/asm-mips/vr41xx/mpc30x.h | 2 +- include/asm-mips/vr41xx/tb0219.h | 2 +- include/asm-mips/vr41xx/tb0226.h | 2 +- include/asm-mips/vr41xx/tb0287.h | 2 +- include/asm-mips/vr41xx/vr41xx.h | 53 + include/asm-mips/vr41xx/vrc4173.h | 222 + include/asm-mips/vr41xx/workpad.h | 43 + include/asm-mips/war.h | 6 +- include/asm-mips/wbflush.h | 1 + include/asm-parisc/Kbuild | 1 - include/asm-parisc/assembly.h | 2 - include/asm-parisc/atomic.h | 1 + include/asm-parisc/cache.h | 1 + include/asm-parisc/cacheflush.h | 1 + include/asm-parisc/compat.h | 11 - include/asm-parisc/dma-mapping.h | 1 + include/asm-parisc/dma.h | 1 + include/asm-parisc/floppy.h | 8 +- include/asm-parisc/hw_irq.h | 9 + include/asm-parisc/io.h | 1 + include/asm-parisc/irq.h | 6 + include/asm-parisc/kmap_types.h | 1 + include/asm-parisc/mmzone.h | 5 + include/asm-parisc/page.h | 21 +- include/asm-parisc/param.h | 1 + include/asm-parisc/pci.h | 1 + include/asm-parisc/pdc.h | 22 +- include/asm-parisc/pgtable.h | 9 +- include/asm-parisc/processor.h | 15 +- include/asm-parisc/psw.h | 1 + include/asm-parisc/signal.h | 2 + include/asm-parisc/smp.h | 1 + include/asm-parisc/socket.h | 1 - include/asm-parisc/system.h | 29 +- include/asm-parisc/tlbflush.h | 1 + include/asm-parisc/uaccess.h | 9 +- include/asm-parisc/unistd.h | 9 +- include/asm-powerpc/Kbuild | 41 - include/asm-powerpc/abs_addr.h | 1 + include/asm-powerpc/atomic.h | 32 +- include/asm-powerpc/backlight.h | 40 +- include/asm-powerpc/bitops.h | 22 +- include/asm-powerpc/cache.h | 1 + include/asm-powerpc/cputable.h | 130 +- include/asm-powerpc/cputime.h | 18 - include/asm-powerpc/delay.h | 13 - include/asm-powerpc/dma-mapping.h | 1 + include/asm-powerpc/dma.h | 1 + include/asm-powerpc/eeh.h | 19 +- include/asm-powerpc/eeh_event.h | 10 +- include/asm-powerpc/elf.h | 11 +- include/asm-powerpc/floppy.h | 4 +- include/asm-powerpc/futex.h | 28 +- include/asm-powerpc/hvcall.h | 10 - include/asm-powerpc/hw_irq.h | 19 +- include/asm-powerpc/i8259.h | 8 +- include/asm-powerpc/ide.h | 1 + include/asm-powerpc/immap_86xx.h | 199 - include/asm-powerpc/io.h | 56 +- include/asm-powerpc/iommu.h | 7 +- include/asm-powerpc/ipic.h | 12 +- include/asm-powerpc/irq.h | 437 +- include/asm-powerpc/irqflags.h | 31 - include/asm-powerpc/iseries/iseries_io.h | 1 + include/asm-powerpc/iseries/it_lp_queue.h | 40 +- include/asm-powerpc/kdebug.h | 2 - include/asm-powerpc/kdump.h | 33 +- include/asm-powerpc/kexec.h | 28 +- include/asm-powerpc/kprobes.h | 3 - include/asm-powerpc/machdep.h | 10 +- include/asm-powerpc/mmu.h | 17 +- include/asm-powerpc/mmu_context.h | 19 +- include/asm-powerpc/mmzone.h | 1 + include/asm-powerpc/mpc86xx.h | 39 - include/asm-powerpc/mpic.h | 198 +- include/asm-powerpc/of_device.h | 2 +- include/asm-powerpc/paca.h | 6 +- include/asm-powerpc/page.h | 12 +- include/asm-powerpc/pci-bridge.h | 13 +- include/asm-powerpc/pci.h | 2 +- include/asm-powerpc/percpu.h | 3 - include/asm-powerpc/pgalloc.h | 2 +- include/asm-powerpc/pgtable-4k.h | 2 - include/asm-powerpc/pgtable-64k.h | 2 - include/asm-powerpc/pgtable.h | 11 +- include/asm-powerpc/pmac_pfunc.h | 2 +- include/asm-powerpc/ppc_asm.h | 1 + include/asm-powerpc/processor.h | 16 +- include/asm-powerpc/prom.h | 110 +- include/asm-powerpc/ptrace.h | 4 + include/asm-powerpc/reg.h | 69 +- include/asm-powerpc/rtas.h | 13 +- include/asm-powerpc/rwsem.h | 18 +- include/asm-powerpc/signal.h | 2 + include/asm-powerpc/smp.h | 1 + include/asm-powerpc/smu.h | 1 + include/asm-powerpc/socket.h | 1 - include/asm-powerpc/spinlock.h | 17 - include/asm-powerpc/spu.h | 31 +- include/asm-powerpc/spu_csa.h | 13 +- include/asm-powerpc/spu_priv1.h | 182 - include/asm-powerpc/systbl.h | 306 - include/asm-powerpc/system.h | 26 +- include/asm-powerpc/tce.h | 35 +- include/asm-powerpc/thread_info.h | 1 + include/asm-powerpc/time.h | 11 +- include/asm-powerpc/timex.h | 1 + include/asm-powerpc/tlb.h | 1 + include/asm-powerpc/tlbflush.h | 1 + include/asm-powerpc/todc.h | 487 - include/asm-powerpc/topology.h | 15 +- include/asm-powerpc/tsi108.h | 111 - include/asm-powerpc/tsi108_irq.h | 124 - include/asm-powerpc/types.h | 1 + include/asm-powerpc/udbg.h | 6 +- include/asm-powerpc/unistd.h | 8 +- include/asm-powerpc/vga.h | 5 +- include/asm-powerpc/vio.h | 17 +- include/asm-ppc/amigahw.h | 1 + include/asm-ppc/bootinfo.h | 1 + include/asm-ppc/commproc.h | 1 + include/asm-ppc/cpm2.h | 95 - include/asm-ppc/floppy.h | 8 +- include/asm-ppc/ibm403.h | 1 + include/asm-ppc/ibm44x.h | 1 + include/asm-ppc/ibm4xx.h | 1 + include/asm-ppc/io.h | 21 +- include/asm-ppc/machdep.h | 1 + include/asm-ppc/mmu.h | 24 +- include/asm-ppc/mmu_context.h | 28 +- include/asm-ppc/mpc8260.h | 2 +- include/asm-ppc/mpc83xx.h | 1 + include/asm-ppc/mpc85xx.h | 4 +- include/asm-ppc/mpc8xx.h | 2 +- include/asm-ppc/mv64x60.h | 1 + include/asm-ppc/ocp.h | 2 + include/asm-ppc/open_pic.h | 1 + include/asm-ppc/page.h | 4 +- include/asm-ppc/pc_serial.h | 1 + include/asm-ppc/pci.h | 2 +- include/asm-ppc/pgalloc.h | 1 + include/asm-ppc/pgtable.h | 3 +- include/asm-ppc/ppc4xx_dma.h | 1 + include/asm-ppc/ppc4xx_pic.h | 1 + include/asm-ppc/serial.h | 1 + include/asm-ppc/smp.h | 1 + include/asm-ppc/system.h | 1 + include/asm-ppc/time.h | 1 + include/asm-s390/Kbuild | 11 - include/asm-s390/bitops.h | 43 +- include/asm-s390/bug.h | 11 +- include/asm-s390/ccwdev.h | 2 +- include/asm-s390/cio.h | 4 - include/asm-s390/cmb.h | 4 + include/asm-s390/dasd.h | 8 +- include/asm-s390/debug.h | 3 +- include/asm-s390/div64.h | 48 + include/asm-s390/elf.h | 28 +- include/asm-s390/hardirq.h | 1 + include/asm-s390/idals.h | 1 + include/asm-s390/io.h | 5 - include/asm-s390/irq.h | 4 + include/asm-s390/irqflags.h | 56 - include/asm-s390/local.h | 1 + include/asm-s390/lowcore.h | 1 + include/asm-s390/page.h | 8 +- include/asm-s390/percpu.h | 3 - include/asm-s390/pgalloc.h | 3 +- include/asm-s390/pgtable.h | 7 + include/asm-s390/posix_types.h | 44 +- include/asm-s390/processor.h | 16 +- include/asm-s390/ptrace.h | 6 +- include/asm-s390/rwsem.h | 31 +- include/asm-s390/semaphore.h | 3 +- include/asm-s390/setup.h | 3 +- include/asm-s390/sfp-machine.h | 1 + include/asm-s390/signal.h | 2 + include/asm-s390/smp.h | 1 + include/asm-s390/socket.h | 1 - include/asm-s390/system.h | 43 +- include/asm-s390/thread_info.h | 1 - include/asm-s390/timex.h | 4 +- include/asm-s390/tlbflush.h | 1 + include/asm-s390/types.h | 1 + include/asm-s390/unistd.h | 10 +- include/asm-s390/vtoc.h | 38 +- include/asm-s390/z90crypt.h | 212 - include/asm-sh/Kbuild | 1 - include/asm-sh/bug.h | 1 + include/asm-sh/checksum.h | 1 + include/asm-sh/dma-mapping.h | 1 + include/asm-sh/dma.h | 1 + include/asm-sh/fixmap.h | 1 + include/asm-sh/floppy.h | 8 +- include/asm-sh/hardirq.h | 1 + include/asm-sh/hd64461/hd64461.h | 1 + include/asm-sh/hd64465/hd64465.h | 1 + include/asm-sh/hw_irq.h | 5 + include/asm-sh/ide.h | 1 + include/asm-sh/io.h | 1 + include/asm-sh/irq.h | 1 + include/asm-sh/keyboard.h | 1 + include/asm-sh/kmap_types.h | 1 + include/asm-sh/machvec.h | 1 + include/asm-sh/machvec_init.h | 1 + include/asm-sh/mpc1211/dma.h | 1 + include/asm-sh/mpc1211/keyboard.h | 2 +- include/asm-sh/overdrive/overdrive.h | 1 + include/asm-sh/page.h | 10 +- include/asm-sh/pgtable.h | 1 + include/asm-sh/processor.h | 3 +- include/asm-sh/ptrace.h | 2 + include/asm-sh/rwsem.h | 18 +- include/asm-sh/serial.h | 1 + include/asm-sh/signal.h | 2 + include/asm-sh/smp.h | 1 + include/asm-sh/socket.h | 1 - include/asm-sh/system.h | 4 +- include/asm-sh/types.h | 1 + include/asm-sh/unistd.h | 7 +- include/asm-sh/watchdog.h | 1 + include/asm-sh64/Kbuild | 1 - include/asm-sh64/bug.h | 17 +- include/asm-sh64/byteorder.h | 4 +- include/asm-sh64/dma-mapping.h | 17 +- include/asm-sh64/hardirq.h | 1 + include/asm-sh64/hw_irq.h | 1 + include/asm-sh64/ide.h | 1 + include/asm-sh64/io.h | 7 - include/asm-sh64/irq.h | 1 + include/asm-sh64/keyboard.h | 2 +- include/asm-sh64/mmu_context.h | 1 + include/asm-sh64/page.h | 8 +- include/asm-sh64/param.h | 1 + include/asm-sh64/pgtable.h | 1 + include/asm-sh64/processor.h | 3 +- include/asm-sh64/ptrace.h | 2 +- include/asm-sh64/shmparam.h | 16 +- include/asm-sh64/signal.h | 3 + include/asm-sh64/system.h | 4 +- include/asm-sh64/uaccess.h | 19 +- include/asm-sh64/unistd.h | 7 +- include/asm-sh64/user.h | 1 + include/asm-sparc/Kbuild | 15 - include/asm-sparc/asmmacro.h | 1 + include/asm-sparc/atomic.h | 1 + include/asm-sparc/bugs.h | 1 + include/asm-sparc/cacheflush.h | 1 + include/asm-sparc/delay.h | 1 + include/asm-sparc/dma-mapping.h | 1 + include/asm-sparc/dma.h | 1 + include/asm-sparc/ebus.h | 17 +- include/asm-sparc/elf.h | 1 + include/asm-sparc/fixmap.h | 1 + include/asm-sparc/floppy.h | 3 +- include/asm-sparc/hardirq.h | 1 + include/asm-sparc/ide.h | 1 + include/asm-sparc/io.h | 16 - include/asm-sparc/irq.h | 7 + include/asm-sparc/mman.h | 14 +- include/asm-sparc/mostek.h | 1 + include/asm-sparc/of_device.h | 79 - include/asm-sparc/oplib.h | 5 + include/asm-sparc/page.h | 11 +- include/asm-sparc/pbm.h | 3 +- include/asm-sparc/pgalloc.h | 1 + include/asm-sparc/pgtable.h | 1 + include/asm-sparc/prom.h | 104 - include/asm-sparc/sbus.h | 28 +- include/asm-sparc/sfp-machine.h | 1 + include/asm-sparc/signal.h | 5 +- include/asm-sparc/smp.h | 9 +- include/asm-sparc/socket.h | 1 - include/asm-sparc/spinlock.h | 3 - include/asm-sparc/system.h | 3 + include/asm-sparc/timer.h | 1 + include/asm-sparc/tlbflush.h | 1 + include/asm-sparc/unistd.h | 6 +- include/asm-sparc/vac-ops.h | 1 + include/asm-sparc/winmacro.h | 1 + include/asm-sparc64/Kbuild | 26 - include/asm-sparc64/atomic.h | 1 + include/asm-sparc64/bitops.h | 1 + include/asm-sparc64/bugs.h | 1 + include/asm-sparc64/cacheflush.h | 1 + include/asm-sparc64/cpudata.h | 19 +- include/asm-sparc64/delay.h | 1 + include/asm-sparc64/dma-mapping.h | 58 +- include/asm-sparc64/dma.h | 1 + include/asm-sparc64/ebus.h | 20 +- include/asm-sparc64/fhc.h | 7 +- include/asm-sparc64/floppy.h | 80 +- include/asm-sparc64/futex.h | 18 +- include/asm-sparc64/hardirq.h | 2 - include/asm-sparc64/hw_irq.h | 2 +- include/asm-sparc64/ide.h | 1 + include/asm-sparc64/irq.h | 97 +- include/asm-sparc64/isa.h | 21 +- include/asm-sparc64/kdebug.h | 2 - include/asm-sparc64/kprobes.h | 3 +- include/asm-sparc64/mc146818rtc.h | 1 + include/asm-sparc64/mman.h | 14 +- include/asm-sparc64/mmu.h | 1 + include/asm-sparc64/of_device.h | 80 - include/asm-sparc64/openprom.h | 2 +- include/asm-sparc64/oplib.h | 11 +- include/asm-sparc64/page.h | 10 +- include/asm-sparc64/param.h | 1 + include/asm-sparc64/parport.h | 25 +- include/asm-sparc64/pbm.h | 20 +- include/asm-sparc64/percpu.h | 3 - include/asm-sparc64/pgalloc.h | 1 + include/asm-sparc64/pgtable.h | 7 +- include/asm-sparc64/pil.h | 7 +- include/asm-sparc64/processor.h | 1 + include/asm-sparc64/prom.h | 112 - include/asm-sparc64/sbus.h | 30 +- include/asm-sparc64/shmparam.h | 2 - include/asm-sparc64/siginfo.h | 1 + include/asm-sparc64/signal.h | 4 + include/asm-sparc64/smp.h | 1 + include/asm-sparc64/socket.h | 1 - include/asm-sparc64/spinlock.h | 1 + include/asm-sparc64/starfire.h | 2 +- include/asm-sparc64/system.h | 3 + include/asm-sparc64/timer.h | 1 + include/asm-sparc64/tlb.h | 1 + include/asm-sparc64/tlbflush.h | 1 + include/asm-sparc64/topology.h | 3 - include/asm-sparc64/ttable.h | 1 + include/asm-sparc64/unistd.h | 6 +- include/asm-sparc64/vdev.h | 16 + include/asm-sparc64/vga.h | 2 +- include/asm-um/a.out.h | 1 + include/asm-um/cache.h | 1 + include/asm-um/elf-ppc.h | 1 + include/asm-um/fixmap.h | 1 + include/asm-um/hardirq.h | 1 + include/asm-um/hw_irq.h | 3 + include/asm-um/io.h | 5 - include/asm-um/kmap_types.h | 20 +- include/asm-um/linkage.h | 1 + include/asm-um/mmu_context.h | 1 + include/asm-um/page.h | 1 + include/asm-um/pgalloc.h | 1 + include/asm-um/processor-generic.h | 1 + include/asm-um/ptrace-generic.h | 1 + include/asm-um/smp.h | 1 + include/asm-um/thread_info.h | 1 + include/asm-v850/Kbuild | 1 - include/asm-v850/atomic.h | 1 + include/asm-v850/bitops.h | 1 + include/asm-v850/dma-mapping.h | 1 + include/asm-v850/hardirq.h | 1 + include/asm-v850/hw_irq.h | 4 + include/asm-v850/irq.h | 2 + include/asm-v850/machdep.h | 1 + include/asm-v850/page.h | 9 +- include/asm-v850/param.h | 4 +- include/asm-v850/pgtable.h | 1 + include/asm-v850/processor.h | 4 +- include/asm-v850/serial.h | 1 + include/asm-v850/signal.h | 2 + include/asm-v850/socket.h | 1 - include/asm-v850/system.h | 1 + include/asm-v850/unistd.h | 12 +- include/asm-v850/v850e_uart.h | 1 + include/asm-x86_64/Kbuild | 21 - include/asm-x86_64/acpi.h | 2 - include/asm-x86_64/alternative-asm.i | 12 - include/asm-x86_64/alternative.h | 136 - include/asm-x86_64/apic.h | 27 +- include/asm-x86_64/apicdef.h | 2 + include/asm-x86_64/atomic.h | 43 +- include/asm-x86_64/bitops.h | 8 +- include/asm-x86_64/bugs.h | 1 + include/asm-x86_64/cache.h | 1 + include/asm-x86_64/calgary.h | 62 - include/asm-x86_64/calling.h | 1 + include/asm-x86_64/cpufeature.h | 3 - include/asm-x86_64/dma-mapping.h | 18 +- include/asm-x86_64/dma.h | 3 +- include/asm-x86_64/dwarf2.h | 1 + include/asm-x86_64/e820.h | 1 - include/asm-x86_64/elf.h | 20 +- include/asm-x86_64/fixmap.h | 1 + include/asm-x86_64/floppy.h | 8 +- include/asm-x86_64/gart-mapping.h | 16 + include/asm-x86_64/hardirq.h | 1 + include/asm-x86_64/hpet.h | 2 +- include/asm-x86_64/hw_irq.h | 12 + include/asm-x86_64/ia32.h | 1 + include/asm-x86_64/ia32_unistd.h | 308 +- include/asm-x86_64/intel_arch_perfmon.h | 19 - include/asm-x86_64/io.h | 1 + include/asm-x86_64/io_apic.h | 1 + include/asm-x86_64/irqflags.h | 141 - include/asm-x86_64/k8.h | 14 - include/asm-x86_64/kdebug.h | 4 +- include/asm-x86_64/kprobes.h | 2 - include/asm-x86_64/local.h | 26 +- include/asm-x86_64/mach-xen/asm/irqflags.h | 65 - include/asm-x86_64/mach-xen/asm/maddr.h | 139 - include/asm-x86_64/mach-xen/asm/stacktrace.h | 18 - include/asm-x86_64/mce.h | 13 +- include/asm-x86_64/mmu_context.h | 1 + include/asm-x86_64/mmzone.h | 2 + include/asm-x86_64/msi.h | 10 +- include/asm-x86_64/mtrr.h | 9 +- include/asm-x86_64/mutex.h | 4 +- include/asm-x86_64/nmi.h | 30 +- include/asm-x86_64/numa.h | 1 + include/asm-x86_64/page.h | 9 +- include/asm-x86_64/param.h | 1 + include/asm-x86_64/pci.h | 5 +- include/asm-x86_64/percpu.h | 4 - include/asm-x86_64/pgtable.h | 6 + include/asm-x86_64/processor.h | 12 +- include/asm-x86_64/proto.h | 15 +- include/asm-x86_64/rwlock.h | 70 +- include/asm-x86_64/semaphore.h | 8 +- include/asm-x86_64/serial.h | 1 + include/asm-x86_64/signal.h | 8 +- include/asm-x86_64/smp.h | 3 + include/asm-x86_64/socket.h | 1 - include/asm-x86_64/spinlock.h | 25 +- include/asm-x86_64/stacktrace.h | 18 - include/asm-x86_64/string.h | 3 +- include/asm-x86_64/swiotlb.h | 3 +- include/asm-x86_64/system.h | 126 +- include/asm-x86_64/tce.h | 49 - include/asm-x86_64/thread_info.h | 21 +- include/asm-x86_64/tlbflush.h | 1 + include/asm-x86_64/topology.h | 11 +- include/asm-x86_64/uaccess.h | 1 + include/asm-x86_64/unistd.h | 27 +- include/asm-x86_64/unwind.h | 107 - include/asm-x86_64/vga.h | 2 +- include/asm-x86_64/vsyscall.h | 3 +- include/asm-xtensa/Kbuild | 1 - include/asm-xtensa/atomic.h | 1 + include/asm-xtensa/checksum.h | 4 +- include/asm-xtensa/delay.h | 1 + include/asm-xtensa/dma.h | 1 + include/asm-xtensa/hardirq.h | 1 + include/asm-xtensa/hw_irq.h | 4 + include/asm-xtensa/ide.h | 1 + include/asm-xtensa/io.h | 1 + include/asm-xtensa/irq.h | 1 + include/asm-xtensa/mmu_context.h | 1 + include/asm-xtensa/page.h | 1 + include/asm-xtensa/pgalloc.h | 1 + include/asm-xtensa/platform.h | 1 + include/asm-xtensa/processor.h | 3 +- include/asm-xtensa/rwsem.h | 25 +- include/asm-xtensa/signal.h | 15 + include/asm-xtensa/socket.h | 1 - include/asm-xtensa/system.h | 2 + include/asm-xtensa/uaccess.h | 34 + include/asm-xtensa/unistd.h | 21 +- include/asm-xtensa/vga.h | 2 +- include/keys/user-type.h | 1 - include/linux/Kbuild | 343 - include/linux/ac97_codec.h | 2 +- include/linux/acct.h | 11 +- include/linux/acpi.h | 16 +- include/linux/affs_hardblocks.h | 72 +- include/linux/agpgart.h | 3 +- include/linux/amba/clcd.h | 1 + include/linux/ata.h | 37 - include/linux/atmdev.h | 5 +- include/linux/audit.h | 166 +- include/linux/bio.h | 2 +- include/linux/bitmap.h | 5 - include/linux/blkdev.h | 22 +- include/linux/blkpg.h | 1 - include/linux/blktrace_api.h | 12 +- include/linux/blockgroup_lock.h | 1 + include/linux/bootmem.h | 4 +- include/linux/buffer_head.h | 2 +- include/linux/byteorder/Kbuild | 7 - include/linux/cache.h | 1 + include/linux/clocksource.h | 185 - include/linux/cn_proc.h | 24 +- include/linux/coda.h | 1 + include/linux/coda_linux.h | 6 +- include/linux/coda_psdev.h | 2 +- include/linux/compat.h | 3 +- include/linux/compat_ioctl.h | 11 +- include/linux/compiler.h | 19 +- include/linux/completion.h | 15 - include/linux/config.h | 1 - include/linux/connector.h | 5 +- include/linux/console.h | 9 +- include/linux/console_struct.h | 1 - include/linux/cpu.h | 30 +- include/linux/cpufreq.h | 10 +- include/linux/cpumask.h | 4 +- include/linux/cramfs_fs.h | 34 +- include/linux/crypto.h | 35 +- include/linux/cyclomx.h | 1 + include/linux/dcache.h | 15 +- include/linux/dcookies.h | 1 + include/linux/debug_locks.h | 71 - include/linux/delay.h | 16 +- include/linux/delayacct.h | 121 - include/linux/devfs_fs.h | 41 + include/linux/devfs_fs_kernel.h | 58 + include/linux/device-mapper.h | 111 +- include/linux/device.h | 26 +- include/linux/divert.h | 20 +- include/linux/dm-ioctl.h | 6 +- include/linux/dmaengine.h | 366 - include/linux/dmi.h | 1 + include/linux/dnotify.h | 1 + include/linux/dqblk_xfs.h | 4 +- include/linux/dvb/Kbuild | 9 - include/linux/dvb/dmx.h | 26 + include/linux/efi.h | 1 - include/linux/efs_fs.h | 2 +- include/linux/elf-em.h | 49 - include/linux/elf.h | 59 +- include/linux/elfcore.h | 10 - include/linux/elfnote.h | 90 - include/linux/err.h | 4 +- include/linux/errqueue.h | 1 + include/linux/etherdevice.h | 5 +- include/linux/ethtool.h | 169 +- include/linux/eventpoll.h | 2 +- include/linux/ext2_fs.h | 2 +- include/linux/ext3_fs.h | 41 +- include/linux/ext3_fs_i.h | 16 +- include/linux/fb.h | 48 +- include/linux/fcntl.h | 1 - include/linux/fs.h | 96 +- include/linux/fs_enet_pd.h | 50 +- include/linux/fscache-cache.h | 243 - include/linux/fscache.h | 495 - include/linux/fsnotify.h | 36 +- include/linux/ftape.h | 1 + include/linux/fuse.h | 36 +- include/linux/futex.h | 15 +- include/linux/gameport.h | 6 - include/linux/genalloc.h | 35 +- include/linux/generic_serial.h | 6 +- include/linux/genhd.h | 14 +- include/linux/gfp.h | 1 + include/linux/hardirq.h | 28 +- include/linux/hdlc.h | 4 +- include/linux/hdlc/Kbuild | 1 - include/linux/highmem.h | 1 + include/linux/highuid.h | 1 + include/linux/hrtimer.h | 7 +- include/linux/hugetlb.h | 8 +- include/linux/hw_random.h | 50 - include/linux/i2c-algo-ite.h | 7 +- include/linux/i2c-id.h | 4 - include/linux/i2c-ocores.h | 19 - include/linux/i2c.h | 15 +- include/linux/i2o-dev.h | 167 +- include/linux/ide.h | 9 +- include/linux/idr.h | 2 +- include/linux/if_fddi.h | 2 - include/linux/if_frad.h | 1 + include/linux/if_tr.h | 1 + include/linux/if_vlan.h | 10 +- include/linux/igmp.h | 2 +- include/linux/init.h | 1 + include/linux/init_task.h | 17 +- include/linux/inotify.h | 109 +- include/linux/input.h | 35 +- include/linux/interrupt.h | 150 +- include/linux/io.h | 1 - include/linux/ioc4.h | 5 - include/linux/ioport.h | 33 +- include/linux/ioprio.h | 23 +- include/linux/ipmi.h | 6 +- include/linux/ipv6.h | 1 + include/linux/irq.h | 383 +- include/linux/irq_cpustat.h | 1 + include/linux/irqflags.h | 96 - include/linux/irqreturn.h | 25 - include/linux/isa.h | 28 - include/linux/isapnp.h | 1 + include/linux/isdn.h | 1 + include/linux/isdn/Kbuild | 1 - include/linux/isdn/tpam.h | 56 + include/linux/isdn_ppp.h | 1 + include/linux/isdnif.h | 1 + include/linux/jbd.h | 11 +- include/linux/jffs2.h | 57 +- {fs/jffs2 => include/linux}/jffs2_fs_i.h | 5 - {fs/jffs2 => include/linux}/jffs2_fs_sb.h | 16 +- include/linux/jiffies.h | 4 +- include/linux/joystick.h | 22 +- include/linux/kallsyms.h | 24 +- include/linux/kbd_kern.h | 4 +- include/linux/kernel.h | 16 +- include/linux/kernel_stat.h | 1 + include/linux/kexec.h | 1 - include/linux/key.h | 40 +- include/linux/kmod.h | 1 + include/linux/kobject.h | 2 - include/linux/kprobes.h | 1 + include/linux/kthread.h | 66 +- include/linux/ktime.h | 15 +- include/linux/libata.h | 526 +- include/linux/license.h | 14 - include/linux/linkage.h | 1 + include/linux/list.h | 214 +- include/linux/lockd/lockd.h | 6 +- include/linux/lockd/nlm.h | 1 + include/linux/lockdep.h | 357 - include/linux/m41t00.h | 50 - include/linux/mc146818rtc.h | 7 - include/linux/memory_hotplug.h | 73 +- include/linux/mempolicy.h | 1 + include/linux/migrate.h | 32 +- include/linux/mii.h | 30 +- include/linux/miscdevice.h | 1 + include/linux/mm.h | 64 +- include/linux/mman.h | 12 +- include/linux/mmc/host.h | 2 +- include/linux/mmc/mmc.h | 2 - include/linux/mmzone.h | 73 +- include/linux/module.h | 51 +- include/linux/mount.h | 13 - include/linux/msg.h | 2 +- include/linux/mtd/bbm.h | 35 +- include/linux/mtd/cfi.h | 14 +- include/linux/mtd/inftl.h | 2 +- include/linux/mtd/map.h | 1 + include/linux/mtd/mtd.h | 98 +- include/linux/mtd/nand.h | 363 +- include/linux/mtd/ndfc.h | 67 - include/linux/mtd/nftl.h | 2 +- include/linux/mtd/onenand.h | 86 +- include/linux/mtd/onenand_regs.h | 8 - include/linux/mtd/partitions.h | 2 +- include/linux/mtd/physmap.h | 29 +- include/linux/mtd/xip.h | 1 + include/linux/mutex-debug.h | 18 +- include/linux/mutex.h | 37 +- include/linux/nbd.h | 12 +- include/linux/ncp_fs.h | 5 +- include/linux/net.h | 6 +- include/linux/netdevice.h | 47 +- include/linux/netfilter.h | 1 + include/linux/netfilter/Kbuild | 38 - include/linux/netfilter/nf_conntrack_common.h | 4 - include/linux/netfilter/nfnetlink_conntrack.h | 4 +- include/linux/netfilter/xt_CONNSECMARK.h | 13 - include/linux/netfilter/xt_SECMARK.h | 26 - include/linux/netfilter/xt_conntrack.h | 2 +- include/linux/netfilter/xt_quota.h | 16 - include/linux/netfilter/xt_statistic.h | 32 - include/linux/netfilter_arp.h | 1 + include/linux/netfilter_arp/Kbuild | 3 - include/linux/netfilter_bridge.h | 8 +- include/linux/netfilter_bridge/Kbuild | 17 - include/linux/netfilter_ipv4.h | 3 +- include/linux/netfilter_ipv4/Kbuild | 63 - include/linux/netfilter_ipv4/ip_conntrack.h | 8 +- .../linux/netfilter_ipv4/ip_conntrack_h323.h | 7 - .../ip_conntrack_helper_h323_types.h | 3 +- .../linux/netfilter_ipv4/ip_conntrack_sip.h | 44 - include/linux/netfilter_ipv4/listhelp.h | 1 + include/linux/netfilter_ipv6/Kbuild | 21 - include/linux/netlink.h | 2 +- include/linux/netpoll.h | 1 - include/linux/nfs.h | 8 +- include/linux/nfs4.h | 13 +- include/linux/nfs4_mount.h | 1 - include/linux/nfs_fs.h | 105 +- include/linux/nfs_fs_sb.h | 95 +- include/linux/nfs_idmap.h | 14 +- include/linux/nfs_mount.h | 1 - include/linux/nfs_page.h | 5 +- include/linux/nfs_xdr.h | 75 +- include/linux/nfsd/Kbuild | 7 - include/linux/nfsd/nfsd.h | 1 + include/linux/nfsd/nfsfh.h | 22 +- include/linux/nfsd/stats.h | 6 - include/linux/nfsd/syscall.h | 1 + include/linux/node.h | 25 - include/linux/notifier.h | 2 +- include/linux/nsc_gpio.h | 40 - include/linux/numa.h | 1 + include/linux/page-flags.h | 168 +- include/linux/pagemap.h | 69 +- include/linux/parport.h | 6 +- include/linux/pci.h | 25 +- include/linux/pci_ids.h | 56 +- include/linux/pci_regs.h | 17 - include/linux/percpu_counter.h | 39 +- include/linux/pfn.h | 4 - include/linux/phy.h | 1 - include/linux/pid.h | 3 +- include/linux/plist.h | 248 - include/linux/pm.h | 1 + include/linux/pm_legacy.h | 8 + include/linux/pmu.h | 4 +- include/linux/pnp.h | 7 +- include/linux/poison.h | 63 - include/linux/ppp_defs.h | 14 +- include/linux/prctl.h | 7 - include/linux/preempt.h | 1 + include/linux/proc_fs.h | 17 +- include/linux/profile.h | 1 + include/linux/ptrace.h | 5 +- include/linux/quota.h | 4 +- include/linux/quotaops.h | 1 + include/linux/radix-tree.h | 5 +- include/linux/raid/Kbuild | 2 - include/linux/raid/bitmap.h | 11 +- include/linux/raid/linear.h | 2 - include/linux/raid/md.h | 4 + include/linux/raid/md_k.h | 13 +- include/linux/raid/md_p.h | 5 +- include/linux/raid/raid10.h | 7 +- include/linux/raid/raid5.h | 1 - include/linux/ramfs.h | 4 +- include/linux/rbtree.h | 30 +- include/linux/rcupdate.h | 28 +- include/linux/reboot.h | 4 +- include/linux/reiserfs_fs.h | 2 +- include/linux/reiserfs_xattr.h | 3 +- include/linux/relay.h | 1 + include/linux/resource.h | 4 - include/linux/resume-trace.h | 30 - include/linux/rio.h | 1 + include/linux/rio_drv.h | 1 + include/linux/rmap.h | 12 +- include/linux/root_dev.h | 2 - include/linux/rtc-v3020.h | 35 - include/linux/rtc.h | 16 +- include/linux/rtmutex.h | 107 - include/linux/rtnetlink.h | 1 + include/linux/rwsem-spinlock.h | 27 +- include/linux/rwsem.h | 97 +- include/linux/scc.h | 1 + include/linux/sched.h | 319 +- include/linux/scx200.h | 9 +- include/linux/scx200_gpio.h | 21 +- include/linux/seccomp.h | 1 + include/linux/security.h | 189 +- include/linux/selinux.h | 32 - include/linux/sem.h | 2 +- include/linux/seqlock.h | 13 +- include/linux/serialP.h | 1 + include/linux/serial_core.h | 14 +- include/linux/serio.h | 1 - include/linux/signal.h | 30 +- include/linux/skbuff.h | 86 +- include/linux/slab.h | 51 +- include/linux/smb.h | 1 + include/linux/smb_fs.h | 4 +- include/linux/smp.h | 3 +- include/linux/smp_lock.h | 1 + include/linux/socket.h | 2 + include/linux/spi/spi.h | 6 +- include/linux/spinlock.h | 64 +- include/linux/spinlock_api_smp.h | 2 - include/linux/spinlock_api_up.h | 1 - include/linux/spinlock_types.h | 47 +- include/linux/spinlock_types_up.h | 9 +- include/linux/spinlock_up.h | 1 + include/linux/squashfs_fs.h | 801 +- include/linux/squashfs_fs_i.h | 16 +- include/linux/squashfs_fs_sb.h | 45 +- include/linux/stacktrace.h | 21 - include/linux/stat.h | 2 +- include/linux/stddef.h | 2 - include/linux/stop_machine.h | 1 + include/linux/string.h | 1 - include/linux/sunrpc/Kbuild | 1 - include/linux/sunrpc/auth.h | 1 + include/linux/sunrpc/debug.h | 24 +- include/linux/sunrpc/gss_api.h | 2 +- include/linux/sunrpc/rpc_pipe_fs.h | 4 +- include/linux/sunrpc/stats.h | 1 + include/linux/sunrpc/svc.h | 4 +- include/linux/sunrpc/xdr.h | 1 - include/linux/sunrpc/xprt.h | 4 +- include/linux/suspend.h | 9 + include/linux/swap.h | 113 +- include/linux/swapops.h | 53 - include/linux/synclink.h | 5 +- include/linux/syscalls.h | 15 +- include/linux/sysctl.h | 16 +- include/linux/sysdev.h | 18 +- include/linux/sysrq.h | 1 + include/linux/taskstats.h | 137 - include/linux/taskstats_kern.h | 89 - include/linux/tc_act/Kbuild | 4 - include/linux/tc_ematch/Kbuild | 4 - include/linux/tcp.h | 9 +- include/linux/threads.h | 1 + include/linux/time.h | 40 +- include/linux/timer.h | 1 + include/linux/timex.h | 6 +- include/linux/topology.h | 3 +- include/linux/tty.h | 63 +- include/linux/tty_driver.h | 14 +- include/linux/tty_flip.h | 2 +- include/linux/types.h | 8 +- include/linux/uaccess.h | 22 - include/linux/udp.h | 3 +- include/linux/ufs_fs.h | 109 +- include/linux/ufs_fs_i.h | 1 - include/linux/unistd.h | 2 - include/linux/unwind.h | 125 - include/linux/usb.h | 18 +- include/linux/{usb/cdc.h => usb_cdc.h} | 0 include/linux/usb_ch9.h | 7 - include/linux/usb_gadget.h | 4 +- include/linux/{usb/input.h => usb_input.h} | 0 .../linux/{usb/isp116x.h => usb_isp116x.h} | 0 include/linux/{usb/sl811.h => usb_sl811.h} | 8 +- include/linux/usb_usual.h | 5 +- include/linux/usbdevice_fs.h | 2 - include/linux/vermagic.h | 2 +- include/linux/videodev.h | 55 +- include/linux/videodev2.h | 400 +- include/linux/vmalloc.h | 9 - include/linux/vmstat.h | 219 - include/linux/vs_base.h | 14 +- include/linux/vs_context.h | 46 - include/linux/vs_cvirt.h | 49 - include/linux/vs_dlimit.h | 4 +- include/linux/vs_network.h | 5 - include/linux/vs_socket.h | 22 +- include/linux/vserver/cacct.h | 15 - include/linux/vserver/context.h | 7 +- include/linux/vserver/cvirt_def.h | 6 +- include/linux/vserver/dlimit_cmd.h | 1 + include/linux/vserver/inode_cmd.h | 20 + include/linux/vserver/network.h | 2 - include/linux/vserver/xid.h | 2 + include/linux/vt.h | 11 - include/linux/vt_buffer.h | 1 + include/linux/vt_kern.h | 5 +- include/linux/wait.h | 11 +- include/linux/wanrouter.h | 4 +- include/linux/watchdog.h | 10 +- include/linux/workqueue.h | 2 - include/linux/writeback.h | 6 +- include/linux/xenfb.h | 108 - include/linux/xenkbd.h | 92 - include/linux/xfrm.h | 4 - include/linux/zconf.h | 12 - include/linux/zlib.h | 209 +- include/linux/zorro.h | 42 + include/linux/zutil.h | 12 + include/media/cx2341x.h | 195 - include/media/ir-common.h | 5 +- include/media/ir-kbd-i2c.h | 3 +- include/media/ovcamchip.h | 1 - include/media/pwc-ioctl.h | 325 - include/media/saa7115.h | 11 +- include/media/saa7146_vv.h | 2 +- include/media/tuner-types.h | 55 - include/media/tuner.h | 13 +- include/media/tvp5150.h | 34 - include/media/v4l2-common.h | 32 - include/media/v4l2-dev.h | 378 - include/media/video-buf-dvb.h | 3 +- include/media/video-buf.h | 1 - include/mtd/Kbuild | 6 - include/mtd/mtd-abi.h | 95 +- include/mtd/mtd-user.h | 1 - include/net/addrconf.h | 1 + include/net/af_unix.h | 8 +- include/net/ax25.h | 25 +- include/net/bluetooth/bluetooth.h | 2 +- include/net/bluetooth/hci.h | 73 +- include/net/bluetooth/hci_core.h | 59 +- include/net/compat.h | 1 + include/net/dst.h | 1 + include/net/genetlink.h | 20 - include/net/icmp.h | 1 + include/net/ieee80211.h | 14 +- include/net/ieee80211softmac.h | 41 +- include/net/ieee80211softmac_wx.h | 5 - include/net/inet6_hashtables.h | 1 + include/net/inet_hashtables.h | 1 + include/net/inet_sock.h | 1 + include/net/inet_timewait_sock.h | 1 + include/net/ip.h | 2 + include/net/ip6_route.h | 14 +- include/net/ip_fib.h | 1 + include/net/ip_mp_alg.h | 1 + include/net/ip_vs.h | 1 + include/net/ipv6.h | 4 +- include/net/irda/irda.h | 1 + include/net/irda/irda_device.h | 3 +- include/net/irda/irlap.h | 1 + include/net/irda/irlmp.h | 1 + include/net/irda/irlmp_frame.h | 1 + include/net/irda/qos.h | 1 + include/net/llc_if.h | 17 +- include/net/ndisc.h | 1 + include/net/netdma.h | 43 - include/net/netevent.h | 33 - include/net/netfilter/nf_conntrack.h | 6 +- include/net/netfilter/nf_conntrack_compat.h | 26 - include/net/pkt_act.h | 1 + include/net/pkt_sched.h | 4 +- include/net/protocol.h | 8 +- include/net/raw.h | 3 +- include/net/red.h | 3 +- include/net/route.h | 1 + include/net/sch_generic.h | 1 + include/net/scm.h | 38 - include/net/sctp/sctp.h | 1 + include/net/sctp/structs.h | 11 +- include/net/sctp/user.h | 9 - include/net/sock.h | 81 +- include/net/tcp.h | 23 +- include/net/tcp_ecn.h | 4 +- include/net/tipc/tipc_bearer.h | 12 +- include/net/tux.h | 1 + include/net/xfrm.h | 26 +- include/pcmcia/ss.h | 1 + include/rdma/Kbuild | 1 - include/rdma/ib_addr.h | 116 - include/rdma/ib_cache.h | 13 - include/rdma/ib_cm.h | 26 +- include/rdma/ib_fmr_pool.h | 2 +- include/rdma/ib_mad.h | 7 - include/rdma/ib_marshall.h | 50 - include/rdma/ib_sa.h | 7 - include/rdma/ib_smi.h | 36 - include/rdma/ib_user_cm.h | 86 +- include/rdma/ib_user_sa.h | 60 - include/rdma/ib_user_verbs.h | 80 +- include/rdma/ib_verbs.h | 22 +- include/rdma/rdma_cm.h | 256 - include/rdma/rdma_cm_ib.h | 47 - include/scsi/Kbuild | 4 - include/scsi/iscsi_if.h | 151 +- include/scsi/iscsi_proto.h | 2 + include/scsi/libiscsi.h | 310 - include/scsi/scsi_cmnd.h | 22 +- include/scsi/scsi_dbg.h | 2 + include/scsi/scsi_devinfo.h | 1 - include/scsi/scsi_eh.h | 3 + include/scsi/scsi_host.h | 7 +- include/scsi/scsi_request.h | 54 + include/scsi/scsi_transport_fc.h | 1 + include/scsi/scsi_transport_iscsi.h | 123 +- include/scsi/scsi_transport_sas.h | 42 +- include/scsi/scsi_transport_spi.h | 1 + include/scsi/sg_request.h | 26 + include/scsi/srp.h | 5 - include/sound/Kbuild | 10 - include/sound/ac97_codec.h | 2 - include/sound/ak4xxx-adda.h | 35 +- include/sound/asequencer.h | 4 - include/sound/asound.h | 2 +- include/sound/core.h | 5 +- include/sound/cs46xx.h | 1 - include/sound/driver.h | 1 + include/sound/emu10k1.h | 2 - include/sound/hdsp.h | 12 +- include/sound/info.h | 11 +- include/sound/initval.h | 2 +- include/sound/mpu401.h | 14 +- include/sound/pcm.h | 19 +- include/sound/pcm_params.h | 125 +- include/sound/rawmidi.h | 3 - include/sound/tea575x-tuner.h | 3 +- include/sound/version.h | 4 +- include/video/Kbuild | 1 - include/video/edid.h | 1 + include/video/mbxfb.h | 28 - include/video/vga.h | 1 + include/xen/hvm.h | 24 - include/xen/interface/arch-ia64.h | 448 - include/xen/interface/domctl.h | 392 - include/xen/interface/elfnote.h | 133 - include/xen/interface/hvm/e820.h | 32 - include/xen/interface/platform.h | 125 - include/xen/interface/sched_ctl.h | 69 + include/xen/interface/sysctl.h | 151 - init/Kconfig | 110 +- init/Makefile | 1 + init/do_mounts.c | 12 +- init/do_mounts.h | 17 +- init/do_mounts_devfs.c | 137 + init/do_mounts_initrd.c | 6 +- init/do_mounts_md.c | 7 +- init/do_mounts_rd.c | 4 +- init/initramfs.c | 39 +- init/main.c | 60 +- init/version.c | 1 - ipc/compat.c | 1 + ipc/mqueue.c | 33 +- ipc/msg.c | 397 +- ipc/sem.c | 9 +- ipc/shm.c | 6 +- ipc/util.c | 1 + kernel/Makefile | 16 +- kernel/acct.c | 130 +- kernel/audit.c | 219 +- kernel/audit.h | 63 +- kernel/auditfilter.c | 1159 +- kernel/auditsc.c | 903 +- kernel/capability.c | 9 +- kernel/compat.c | 30 +- kernel/configs.c | 1 + kernel/cpu.c | 219 +- kernel/cpuset.c | 106 +- kernel/delayacct.c | 162 - kernel/exec_domain.c | 1 + kernel/exit.c | 106 +- kernel/fork.c | 106 +- kernel/futex.c | 1097 +- kernel/futex_compat.c | 49 +- kernel/hrtimer.c | 31 +- kernel/intermodule.c | 184 + kernel/irq/Makefile | 2 +- kernel/irq/autoprobe.c | 56 +- kernel/irq/chip.c | 537 - kernel/irq/handle.c | 166 +- kernel/irq/internals.h | 46 - kernel/irq/manage.c | 220 +- kernel/irq/migration.c | 22 +- kernel/irq/proc.c | 33 +- kernel/irq/resend.c | 77 - kernel/irq/spurious.c | 52 +- kernel/kallsyms.c | 4 +- kernel/kexec.c | 12 +- kernel/kmod.c | 8 +- kernel/kprobes.c | 59 +- kernel/ksysfs.c | 20 +- kernel/kthread.c | 63 +- kernel/lockdep.c | 2727 -- kernel/lockdep_internals.h | 78 - kernel/lockdep_proc.c | 345 - kernel/module-verify-sig.c | 1 + kernel/module-verify.c | 1 + kernel/module.c | 172 +- kernel/mutex-debug.c | 404 +- kernel/mutex-debug.h | 111 +- kernel/mutex.c | 95 +- kernel/mutex.h | 25 +- kernel/panic.c | 4 +- kernel/params.c | 1 + kernel/pid.c | 20 +- kernel/posix-cpu-timers.c | 28 +- kernel/posix-timers.c | 20 +- kernel/power/Kconfig | 36 +- kernel/power/Makefile | 2 + kernel/power/console.c | 32 +- kernel/power/disk.c | 9 +- kernel/power/main.c | 18 +- kernel/power/pm.c | 37 + kernel/power/power.h | 63 +- kernel/power/process.c | 26 +- kernel/power/smp.c | 62 + kernel/power/snapshot.c | 271 +- kernel/power/swap.c | 284 +- kernel/power/swsusp.c | 20 +- kernel/power/user.c | 14 +- kernel/printk.c | 106 +- kernel/profile.c | 3 +- kernel/ptrace.c | 31 +- kernel/rcupdate.c | 37 +- kernel/rcutorture.c | 201 +- kernel/relay.c | 2 +- kernel/resource.c | 96 +- kernel/rtmutex-debug.c | 241 - kernel/rtmutex-debug.h | 33 - kernel/rtmutex-tester.c | 440 - kernel/rtmutex.c | 991 - kernel/rtmutex.h | 26 - kernel/rtmutex_common.h | 123 - kernel/rwsem.c | 147 - kernel/sched.c | 2026 +- kernel/signal.c | 82 +- kernel/softirq.c | 169 +- kernel/softlockup.c | 8 +- kernel/spinlock.c | 80 +- kernel/stacktrace.c | 24 - kernel/sys.c | 87 +- kernel/sys_ni.c | 2 - kernel/sysctl.c | 99 +- kernel/taskstats.c | 567 - kernel/time.c | 4 - kernel/time/Makefile | 1 - kernel/time/clocksource.c | 349 - kernel/time/jiffies.c | 73 - kernel/timer.c | 492 +- kernel/unwind.c | 920 - kernel/user.c | 4 +- kernel/vserver/Kconfig | 18 +- kernel/vserver/context.c | 47 +- kernel/vserver/cvirt_init.h | 3 + kernel/vserver/history.c | 1 - kernel/vserver/legacy.c | 4 +- kernel/vserver/legacynet.c | 1 - kernel/vserver/limit.c | 71 +- kernel/vserver/limit_init.h | 3 + kernel/vserver/network.c | 43 +- kernel/vserver/proc.c | 2 - kernel/vserver/sched.c | 1 + kernel/vserver/sched_init.h | 5 +- kernel/vserver/switch.c | 4 +- kernel/wait.c | 35 +- kernel/workqueue.c | 186 +- lib/Kconfig | 11 - lib/Kconfig.debug | 180 +- lib/Makefile | 7 +- lib/audit.c | 55 - lib/bitmap.c | 31 +- lib/bust_spinlocks.c | 1 + lib/crc-ccitt.c | 6 +- lib/crc16.c | 10 +- lib/crc32.c | 54 +- lib/debug_locks.c | 45 - lib/extable.c | 1 + lib/genalloc.c | 263 +- lib/idr.c | 16 +- lib/iomap_copy.c | 28 - lib/kernel_lock.c | 11 +- lib/kobject.c | 6 +- lib/libcrc32c.c | 2 +- lib/list_debug.c | 77 - lib/locking-selftest-hardirq.h | 9 - lib/locking-selftest-mutex.h | 11 - lib/locking-selftest-rlock-hardirq.h | 2 - lib/locking-selftest-rlock-softirq.h | 2 - lib/locking-selftest-rlock.h | 14 - lib/locking-selftest-rsem.h | 14 - lib/locking-selftest-softirq.h | 9 - lib/locking-selftest-spin-hardirq.h | 2 - lib/locking-selftest-spin-softirq.h | 2 - lib/locking-selftest-spin.h | 11 - lib/locking-selftest-wlock-hardirq.h | 2 - lib/locking-selftest-wlock-softirq.h | 2 - lib/locking-selftest-wlock.h | 14 - lib/locking-selftest-wsem.h | 14 - lib/locking-selftest.c | 1216 - lib/percpu_counter.c | 46 - lib/plist.c | 118 - lib/radix-tree.c | 197 +- lib/rbtree.c | 189 +- lib/reed_solomon/reed_solomon.c | 11 +- lib/rwsem-spinlock.c | 66 +- lib/rwsem.c | 51 +- lib/semaphore-sleepers.c | 1 + lib/spinlock_debug.c | 118 +- lib/string.c | 30 - lib/textsearch.c | 1 + lib/ts_bm.c | 1 + lib/ts_fsm.c | 1 + lib/ts_kmp.c | 1 + lib/vsprintf.c | 88 +- lib/zlib_deflate/deflate.c | 25 +- lib/zlib_deflate/deflate_syms.c | 3 +- lib/zlib_inflate/Makefile | 4 +- lib/zlib_inflate/infblock.c | 365 + lib/zlib_inflate/infblock.h | 48 + lib/zlib_inflate/infcodes.c | 202 + lib/zlib_inflate/infcodes.h | 33 + lib/zlib_inflate/inffast.c | 462 +- lib/zlib_inflate/inffast.h | 12 +- lib/zlib_inflate/inffixed.h | 94 - lib/zlib_inflate/inflate.c | 1089 +- lib/zlib_inflate/inflate.h | 107 - lib/zlib_inflate/inflate_syms.c | 3 +- lib/zlib_inflate/inflate_sync.c | 152 + lib/zlib_inflate/inftrees.c | 677 +- lib/zlib_inflate/inftrees.h | 99 +- lib/zlib_inflate/infutil.c | 88 + lib/zlib_inflate/infutil.h | 176 +- mm/Kconfig | 10 +- mm/Makefile | 2 +- mm/bootmem.c | 4 +- mm/fadvise.c | 15 +- mm/filemap.c | 341 +- mm/filemap.h | 33 +- mm/filemap_xip.c | 4 +- mm/fremap.c | 15 +- mm/highmem.c | 6 +- mm/hugetlb.c | 282 +- mm/memory.c | 185 +- mm/memory_hotplug.c | 186 +- mm/mempolicy.c | 65 +- mm/mempool.c | 9 +- mm/migrate.c | 1083 +- mm/mmap.c | 27 +- mm/mmzone.c | 7 +- mm/mprotect.c | 70 +- mm/mremap.c | 2 +- mm/msync.c | 199 +- mm/nommu.c | 4 +- mm/oom_kill.c | 148 +- mm/page-writeback.c | 125 +- mm/page_alloc.c | 720 +- mm/page_io.c | 31 +- mm/pdflush.c | 3 +- mm/readahead.c | 45 +- mm/rmap.c | 200 +- mm/shmem.c | 35 +- mm/slab.c | 504 +- mm/slob.c | 1 + mm/sparse.c | 25 +- mm/swap.c | 69 +- mm/swap_state.c | 8 +- mm/swapfile.c | 44 +- mm/tiny-shmem.c | 4 + mm/truncate.c | 67 +- mm/vmalloc.c | 131 +- mm/vmscan.c | 487 +- mm/vmstat.c | 701 - net/802/fc.c | 1 + net/802/fddi.c | 1 + net/802/sysctl_net_802.c | 1 + net/802/tr.c | 1 + net/8021q/vlan.c | 16 +- net/8021q/vlanproc.c | 1 + net/Kconfig | 24 +- net/appletalk/aarp.c | 1 + net/appletalk/atalk_proc.c | 1 + net/appletalk/ddp.c | 7 +- net/appletalk/sysctl_net_atalk.c | 1 + net/atm/Makefile | 2 +- net/atm/atm_sysfs.c | 175 - net/atm/br2684.c | 4 +- net/atm/clip.c | 26 +- net/atm/common.c | 8 +- net/atm/common.h | 2 - net/atm/ioctl.c | 1 + net/atm/ipcommon.c | 17 +- net/atm/lec.c | 4 +- net/atm/lec.h | 1 + net/atm/mpc.c | 20 +- net/atm/mpoa_caches.c | 12 +- net/atm/mpoa_proc.c | 1 + net/atm/pppoatm.c | 4 +- net/atm/proc.c | 3 +- net/atm/pvc.c | 1 + net/atm/resources.c | 26 +- net/atm/resources.h | 3 +- net/ax25/af_ax25.c | 18 +- net/ax25/ax25_dev.c | 5 +- net/ax25/ax25_ds_subr.c | 8 +- net/ax25/ax25_ds_timer.c | 4 +- net/ax25/ax25_iface.c | 19 +- net/ax25/ax25_in.c | 2 +- net/ax25/ax25_ip.c | 24 +- net/ax25/ax25_out.c | 1 + net/ax25/ax25_route.c | 49 +- net/ax25/ax25_timer.c | 1 + net/ax25/sysctl_net_ax25.c | 5 +- net/bluetooth/af_bluetooth.c | 21 +- net/bluetooth/bnep/core.c | 1 + net/bluetooth/bnep/netdev.c | 1 + net/bluetooth/bnep/sock.c | 1 + net/bluetooth/cmtp/capi.c | 44 +- net/bluetooth/cmtp/core.c | 4 +- net/bluetooth/cmtp/sock.c | 1 + net/bluetooth/hci_conn.c | 101 +- net/bluetooth/hci_core.c | 46 +- net/bluetooth/hci_event.c | 207 +- net/bluetooth/hci_sock.c | 12 +- net/bluetooth/hci_sysfs.c | 212 +- net/bluetooth/hidp/Kconfig | 3 +- net/bluetooth/hidp/core.c | 4 +- net/bluetooth/hidp/sock.c | 1 + net/bluetooth/l2cap.c | 376 +- net/bluetooth/lib.c | 1 + net/bluetooth/rfcomm/core.c | 56 +- net/bluetooth/rfcomm/sock.c | 5 +- net/bluetooth/rfcomm/tty.c | 18 +- net/bluetooth/sco.c | 17 +- net/bridge/Makefile | 2 +- net/bridge/br.c | 29 +- net/bridge/br_forward.c | 16 +- net/bridge/br_if.c | 7 +- net/bridge/br_ioctl.c | 16 +- net/bridge/br_netfilter.c | 24 +- net/bridge/br_netlink.c | 200 - net/bridge/br_notify.c | 2 - net/bridge/br_private.h | 12 +- net/bridge/br_stp_bpdu.c | 2 +- net/bridge/br_stp_if.c | 4 - net/bridge/netfilter/ebt_ulog.c | 4 + net/bridge/netfilter/ebtables.c | 54 +- net/core/Makefile | 3 +- net/core/dev.c | 198 +- net/core/dev_mcast.c | 1 + net/core/ethtool.c | 2 +- net/core/link_watch.c | 6 +- net/core/neighbour.c | 18 +- net/core/net-sysfs.c | 1 + net/core/netevent.c | 69 - net/core/netpoll.c | 52 +- net/core/pktgen.c | 4 +- net/core/rtnetlink.c | 3 +- net/core/skbuff.c | 103 +- net/core/sock.c | 118 +- net/core/stream.c | 16 +- net/core/sysctl_net_core.c | 1 + net/core/user_dma.c | 132 - net/core/utils.c | 7 +- net/core/wireless.c | 25 +- net/dccp/Kconfig | 2 +- net/dccp/ackvec.h | 1 + net/dccp/ccids/ccid2.c | 1 + net/dccp/ccids/ccid3.c | 154 +- net/dccp/ccids/ccid3.h | 10 +- net/dccp/ccids/lib/loss_interval.c | 37 +- net/dccp/ccids/lib/loss_interval.h | 10 +- net/dccp/ccids/lib/packet_history.c | 169 +- net/dccp/ccids/lib/packet_history.h | 18 +- net/dccp/ccids/lib/tfrc.h | 2 +- net/dccp/ccids/lib/tfrc_equation.c | 3 +- net/dccp/dccp.h | 11 +- net/dccp/diag.c | 1 + net/dccp/feat.c | 1 + net/dccp/feat.h | 2 - net/dccp/input.c | 1 + net/dccp/ipv4.c | 4 +- net/dccp/ipv6.c | 11 +- net/dccp/ipv6.h | 1 + net/dccp/minisocks.c | 1 + net/dccp/options.c | 5 +- net/dccp/output.c | 1 + net/dccp/proto.c | 9 +- net/dccp/sysctl.c | 1 + net/dccp/timer.c | 1 + net/decnet/af_decnet.c | 5 +- net/decnet/dn_dev.c | 10 +- net/decnet/dn_fib.c | 4 +- net/decnet/dn_neigh.c | 4 +- net/decnet/dn_nsp_in.c | 1 + net/decnet/dn_route.c | 10 +- net/decnet/dn_rules.c | 4 +- net/decnet/dn_table.c | 12 +- net/decnet/netfilter/dn_rtmsg.c | 2 +- net/decnet/sysctl_net_decnet.c | 1 + net/econet/af_econet.c | 4 +- net/ethernet/eth.c | 1 + net/ieee80211/ieee80211_crypt.c | 3 +- net/ieee80211/ieee80211_crypt_ccmp.c | 4 +- net/ieee80211/ieee80211_crypt_tkip.c | 12 +- net/ieee80211/ieee80211_crypt_wep.c | 4 +- net/ieee80211/ieee80211_geo.c | 1 + net/ieee80211/ieee80211_module.c | 1 + net/ieee80211/ieee80211_rx.c | 19 +- net/ieee80211/ieee80211_tx.c | 96 +- net/ieee80211/ieee80211_wx.c | 51 +- net/ieee80211/softmac/Kconfig | 1 - .../softmac/ieee80211softmac_assoc.c | 125 +- net/ieee80211/softmac/ieee80211softmac_auth.c | 45 +- .../softmac/ieee80211softmac_event.c | 30 +- net/ieee80211/softmac/ieee80211softmac_io.c | 175 +- .../softmac/ieee80211softmac_module.c | 117 +- net/ieee80211/softmac/ieee80211softmac_priv.h | 5 - net/ieee80211/softmac/ieee80211softmac_scan.c | 2 + net/ieee80211/softmac/ieee80211softmac_wx.c | 74 +- net/ipv4/Kconfig | 40 - net/ipv4/Makefile | 5 - net/ipv4/af_inet.c | 15 +- net/ipv4/ah4.c | 20 +- net/ipv4/arp.c | 4 +- net/ipv4/datagram.c | 1 + net/ipv4/devinet.c | 7 +- net/ipv4/esp4.c | 23 +- net/ipv4/fib_frontend.c | 2 +- net/ipv4/fib_hash.c | 7 +- net/ipv4/fib_rules.c | 4 +- net/ipv4/fib_semantics.c | 16 +- net/ipv4/fib_trie.c | 11 +- net/ipv4/icmp.c | 6 +- net/ipv4/igmp.c | 53 +- net/ipv4/inet_connection_sock.c | 1 + net/ipv4/inet_diag.c | 4 +- net/ipv4/inet_hashtables.c | 1 + net/ipv4/inet_timewait_sock.c | 1 + net/ipv4/inetpeer.c | 2 +- net/ipv4/ip_forward.c | 1 + net/ipv4/ip_fragment.c | 1 + net/ipv4/ip_gre.c | 2 + net/ipv4/ip_input.c | 4 +- net/ipv4/ip_options.c | 1 + net/ipv4/ip_output.c | 14 +- net/ipv4/ip_sockglue.c | 10 +- net/ipv4/ipcomp.c | 30 +- net/ipv4/ipconfig.c | 1 + net/ipv4/ipip.c | 2 + net/ipv4/ipmr.c | 22 +- net/ipv4/ipvs/ip_vs_core.c | 10 - net/ipv4/ipvs/ip_vs_ctl.c | 10 +- net/ipv4/ipvs/ip_vs_est.c | 4 +- net/ipv4/ipvs/ip_vs_ftp.c | 27 +- net/ipv4/ipvs/ip_vs_sync.c | 2 +- net/ipv4/multipath_drr.c | 1 + net/ipv4/multipath_random.c | 1 + net/ipv4/multipath_rr.c | 1 + net/ipv4/multipath_wrandom.c | 1 + net/ipv4/netfilter.c | 9 +- net/ipv4/netfilter/Kconfig | 42 +- net/ipv4/netfilter/Makefile | 2 - net/ipv4/netfilter/arp_tables.c | 70 +- net/ipv4/netfilter/ip_conntrack_amanda.c | 143 +- net/ipv4/netfilter/ip_conntrack_core.c | 10 +- net/ipv4/netfilter/ip_conntrack_ftp.c | 78 +- net/ipv4/netfilter/ip_conntrack_helper_h323.c | 116 +- .../ip_conntrack_helper_h323_types.c | 6 +- net/ipv4/netfilter/ip_conntrack_helper_pptp.c | 1 + net/ipv4/netfilter/ip_conntrack_irc.c | 1 + net/ipv4/netfilter/ip_conntrack_netlink.c | 84 +- net/ipv4/netfilter/ip_conntrack_proto_gre.c | 7 +- net/ipv4/netfilter/ip_conntrack_proto_icmp.c | 2 +- net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 3 +- net/ipv4/netfilter/ip_conntrack_proto_udp.c | 2 +- net/ipv4/netfilter/ip_conntrack_sip.c | 470 - net/ipv4/netfilter/ip_conntrack_standalone.c | 19 +- net/ipv4/netfilter/ip_nat_helper.c | 1 + net/ipv4/netfilter/ip_nat_helper_h323.c | 77 - net/ipv4/netfilter/ip_nat_helper_pptp.c | 1 + net/ipv4/netfilter/ip_nat_proto_gre.c | 1 + net/ipv4/netfilter/ip_nat_proto_udp.c | 3 +- net/ipv4/netfilter/ip_nat_sip.c | 249 - net/ipv4/netfilter/ip_nat_snmp_basic.c | 7 +- net/ipv4/netfilter/ip_nat_standalone.c | 15 +- net/ipv4/netfilter/ip_queue.c | 14 +- net/ipv4/netfilter/ip_tables.c | 147 +- net/ipv4/netfilter/ipt_CLUSTERIP.c | 24 +- net/ipv4/netfilter/ipt_MASQUERADE.c | 1 + net/ipv4/netfilter/ipt_NETMAP.c | 1 + net/ipv4/netfilter/ipt_REJECT.c | 2 +- net/ipv4/netfilter/ipt_ULOG.c | 6 + net/ipv4/netfilter/ipt_hashlimit.c | 87 +- net/ipv4/netfilter/ipt_recent.c | 1276 +- net/ipv4/netfilter/iptable_mangle.c | 4 +- .../netfilter/nf_conntrack_l3proto_ipv4.c | 3 +- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 2 +- net/ipv4/protocol.c | 1 + net/ipv4/raw.c | 6 +- net/ipv4/route.c | 39 +- net/ipv4/sysctl_net_ipv4.c | 27 +- net/ipv4/tcp.c | 143 +- net/ipv4/tcp_bic.c | 8 + net/ipv4/tcp_cong.c | 9 +- net/ipv4/tcp_cubic.c | 13 +- net/ipv4/tcp_diag.c | 6 +- net/ipv4/tcp_highspeed.c | 38 +- net/ipv4/tcp_htcp.c | 10 + net/ipv4/tcp_hybla.c | 1 + net/ipv4/tcp_input.c | 124 +- net/ipv4/tcp_ipv4.c | 33 +- net/ipv4/tcp_lp.c | 344 - net/ipv4/tcp_minisocks.c | 9 +- net/ipv4/tcp_output.c | 29 +- net/ipv4/tcp_probe.c | 182 - net/ipv4/tcp_scalable.c | 1 + net/ipv4/tcp_vegas.c | 1 + net/ipv4/tcp_veno.c | 230 - net/ipv4/tcp_westwood.c | 81 +- net/ipv4/udp.c | 23 +- net/ipv4/xfrm4_input.c | 28 +- net/ipv4/xfrm4_mode_transport.c | 83 - net/ipv4/xfrm4_mode_tunnel.c | 124 - net/ipv4/xfrm4_output.c | 61 +- net/ipv4/xfrm4_policy.c | 9 +- net/ipv4/xfrm4_state.c | 1 + net/ipv6/Kconfig | 20 - net/ipv6/Makefile | 2 - net/ipv6/addrconf.c | 204 +- net/ipv6/af_inet6.c | 5 +- net/ipv6/ah6.c | 11 +- net/ipv6/anycast.c | 1 + net/ipv6/datagram.c | 2 +- net/ipv6/esp6.c | 21 +- net/ipv6/exthdrs.c | 4 +- net/ipv6/icmp.c | 17 +- net/ipv6/inet6_connection_sock.c | 5 +- net/ipv6/inet6_hashtables.c | 1 + net/ipv6/ip6_fib.c | 1 + net/ipv6/ip6_flowlabel.c | 3 +- net/ipv6/ip6_input.c | 9 +- net/ipv6/ip6_output.c | 137 +- net/ipv6/ip6_tunnel.c | 4 +- net/ipv6/ipcomp6.c | 31 +- net/ipv6/ipv6_sockglue.c | 112 +- net/ipv6/ipv6_syms.c | 1 + net/ipv6/mcast.c | 11 +- net/ipv6/ndisc.c | 1 + net/ipv6/netfilter/ip6_queue.c | 2 +- net/ipv6/netfilter/ip6_tables.c | 94 +- net/ipv6/netfilter/ip6t_REJECT.c | 1 + .../netfilter/nf_conntrack_l3proto_ipv6.c | 3 +- .../netfilter/nf_conntrack_proto_icmpv6.c | 2 +- net/ipv6/netfilter/nf_conntrack_reasm.c | 11 +- net/ipv6/proc.c | 1 + net/ipv6/raw.c | 3 +- net/ipv6/reassembly.c | 1 + net/ipv6/route.c | 14 +- net/ipv6/sit.c | 2 + net/ipv6/sysctl_net_ipv6.c | 1 + net/ipv6/tcp_ipv6.c | 50 +- net/ipv6/udp.c | 10 +- net/ipv6/xfrm6_input.c | 29 +- net/ipv6/xfrm6_mode_transport.c | 88 - net/ipv6/xfrm6_mode_tunnel.c | 121 - net/ipv6/xfrm6_output.c | 65 +- net/ipv6/xfrm6_policy.c | 7 + net/ipv6/xfrm6_state.c | 1 + net/ipv6/xfrm6_tunnel.c | 141 +- net/ipx/af_ipx.c | 12 +- net/ipx/ipx_proc.c | 1 + net/ipx/ipx_route.c | 3 +- net/ipx/sysctl_net_ipx.c | 1 + net/irda/af_irda.c | 3 +- net/irda/ircomm/ircomm_core.c | 5 +- net/irda/ircomm/ircomm_lmp.c | 4 +- net/irda/ircomm/ircomm_param.c | 2 +- net/irda/ircomm/ircomm_tty.c | 10 +- net/irda/irda_device.c | 5 +- net/irda/iriap.c | 10 +- net/irda/iriap_event.c | 2 +- net/irda/irias_object.c | 24 +- net/irda/irlan/irlan_client.c | 3 +- net/irda/irlan/irlan_common.c | 17 +- net/irda/irlan/irlan_eth.c | 1 + net/irda/irlan/irlan_provider.c | 2 +- net/irda/irlap.c | 9 +- net/irda/irlap_event.c | 1 + net/irda/irlap_frame.c | 19 +- net/irda/irlmp.c | 18 +- net/irda/irlmp_event.c | 1 + net/irda/irlmp_frame.c | 1 + net/irda/irmod.c | 1 + net/irda/irnet/irnet.h | 2 + net/irda/irnet/irnet_ppp.c | 3 +- net/irda/irsysctl.c | 1 + net/irda/irttp.c | 25 +- net/irda/qos.c | 1 + net/irda/timer.c | 1 + net/key/af_key.c | 18 +- net/lapb/lapb_iface.c | 16 +- net/llc/af_llc.c | 27 +- net/llc/llc_core.c | 3 +- net/llc/llc_if.c | 3 + net/llc/llc_input.c | 10 +- net/llc/llc_proc.c | 1 + net/llc/llc_sap.c | 66 +- net/llc/llc_station.c | 1 + net/llc/sysctl_net_llc.c | 1 + net/netfilter/Kconfig | 59 +- net/netfilter/Makefile | 4 - net/netfilter/core.c | 1 + net/netfilter/nf_conntrack_core.c | 10 +- net/netfilter/nf_conntrack_ftp.c | 78 +- net/netfilter/nf_conntrack_l3proto_generic.c | 1 + net/netfilter/nf_conntrack_netlink.c | 85 +- net/netfilter/nf_conntrack_proto_sctp.c | 2 - net/netfilter/nf_conntrack_proto_tcp.c | 6 +- net/netfilter/nf_conntrack_proto_udp.c | 3 +- net/netfilter/nf_conntrack_standalone.c | 17 +- net/netfilter/nf_internals.h | 1 + net/netfilter/nf_log.c | 1 + net/netfilter/nf_queue.c | 10 +- net/netfilter/nf_sockopt.c | 1 + net/netfilter/nfnetlink.c | 3 +- net/netfilter/nfnetlink_log.c | 3 + net/netfilter/nfnetlink_queue.c | 12 +- net/netfilter/x_tables.c | 1 + net/netfilter/xt_CONNSECMARK.c | 155 - net/netfilter/xt_SECMARK.c | 158 - net/netfilter/xt_connmark.c | 2 +- net/netfilter/xt_dccp.c | 3 +- net/netfilter/xt_mark.c | 2 +- net/netfilter/xt_multiport.c | 7 +- net/netfilter/xt_physdev.c | 16 - net/netfilter/xt_pkttype.c | 12 +- net/netfilter/xt_policy.c | 1 + net/netfilter/xt_quota.c | 98 - net/netfilter/xt_sctp.c | 6 +- net/netfilter/xt_statistic.c | 112 - net/netfilter/xt_string.c | 9 +- net/netfilter/xt_tcpudp.c | 2 +- net/netlink/af_netlink.c | 36 +- net/netlink/attr.c | 1 + net/netlink/genetlink.c | 3 +- net/netrom/af_netrom.c | 30 +- net/netrom/nr_dev.c | 1 + net/netrom/nr_route.c | 12 +- net/netrom/nr_timer.c | 2 +- net/packet/af_packet.c | 5 +- net/rose/af_rose.c | 20 +- net/rose/rose_dev.c | 6 +- net/rxrpc/call.c | 3 +- net/rxrpc/connection.c | 9 +- net/rxrpc/krxsecd.c | 3 +- net/rxrpc/peer.c | 3 +- net/rxrpc/rxrpc_syms.c | 1 + net/rxrpc/sysctl.c | 1 + net/rxrpc/transport.c | 6 +- net/sched/Kconfig | 8 +- net/sched/act_api.c | 14 +- net/sched/act_gact.c | 5 +- net/sched/act_ipt.c | 1 + net/sched/act_mirred.c | 1 + net/sched/act_pedit.c | 4 +- net/sched/act_police.c | 33 +- net/sched/act_simple.c | 1 + net/sched/cls_api.c | 5 +- net/sched/cls_basic.c | 9 +- net/sched/cls_fw.c | 7 +- net/sched/cls_route.c | 10 +- net/sched/cls_rsvp.h | 10 +- net/sched/cls_tcindex.c | 13 +- net/sched/cls_u32.c | 18 +- net/sched/em_cmp.c | 1 + net/sched/em_meta.c | 4 +- net/sched/em_nbyte.c | 1 + net/sched/em_text.c | 1 + net/sched/em_u32.c | 1 + net/sched/ematch.c | 4 +- net/sched/estimator.c | 3 +- net/sched/sch_api.c | 19 +- net/sched/sch_atm.c | 1 + net/sched/sch_blackhole.c | 1 + net/sched/sch_cbq.c | 4 +- net/sched/sch_dsmark.c | 1 + net/sched/sch_fifo.c | 1 + net/sched/sch_generic.c | 72 +- net/sched/sch_gred.c | 4 +- net/sched/sch_hfsc.c | 4 +- net/sched/sch_htb.c | 8 +- net/sched/sch_ingress.c | 1 + net/sched/sch_netem.c | 5 +- net/sched/sch_prio.c | 1 + net/sched/sch_red.c | 1 + net/sched/sch_sfq.c | 1 + net/sched/sch_tbf.c | 1 + net/sctp/associola.c | 27 +- net/sctp/bind_addr.c | 8 +- net/sctp/endpointola.c | 11 +- net/sctp/input.c | 6 +- net/sctp/ipv6.c | 3 +- net/sctp/output.c | 48 +- net/sctp/outqueue.c | 9 +- net/sctp/protocol.c | 7 +- net/sctp/sm_make_chunk.c | 18 +- net/sctp/sm_sideeffect.c | 12 +- net/sctp/sm_statefuns.c | 8 +- net/sctp/socket.c | 75 +- net/sctp/transport.c | 9 +- net/socket.c | 19 +- net/sunrpc/auth_gss/auth_gss.c | 12 +- net/sunrpc/auth_gss/gss_krb5_mech.c | 5 +- net/sunrpc/auth_gss/gss_krb5_seal.c | 2 +- net/sunrpc/auth_gss/gss_mech_switch.c | 9 +- net/sunrpc/auth_gss/gss_spkm3_mech.c | 5 +- net/sunrpc/auth_gss/gss_spkm3_token.c | 3 +- net/sunrpc/auth_gss/svcauth_gss.c | 271 +- net/sunrpc/auth_null.c | 2 - net/sunrpc/auth_unix.c | 1 - net/sunrpc/clnt.c | 85 +- net/sunrpc/pmap_clnt.c | 1 + net/sunrpc/rpc_pipe.c | 81 +- net/sunrpc/stats.c | 7 +- net/sunrpc/sunrpc_syms.c | 1 + net/sunrpc/svc.c | 9 +- net/sunrpc/svcsock.c | 38 +- net/sunrpc/sysctl.c | 1 + net/sunrpc/xdr.c | 31 +- net/sunrpc/xprt.c | 28 +- net/sunrpc/xprtsock.c | 79 +- net/sysctl_net.c | 1 + net/tipc/bcast.c | 83 +- net/tipc/bcast.h | 2 +- net/tipc/bearer.c | 78 +- net/tipc/cluster.c | 28 +- net/tipc/config.c | 87 +- net/tipc/core.c | 10 +- net/tipc/core.h | 26 +- net/tipc/dbg.c | 2 +- net/tipc/discover.c | 15 +- net/tipc/eth_media.c | 29 +- net/tipc/handler.c | 2 +- net/tipc/link.c | 233 +- net/tipc/name_distr.c | 30 +- net/tipc/name_table.c | 223 +- net/tipc/net.c | 7 +- net/tipc/node.c | 104 +- net/tipc/node.h | 2 - net/tipc/node_subscr.c | 15 +- net/tipc/port.c | 50 +- net/tipc/ref.c | 37 +- net/tipc/socket.c | 100 +- net/tipc/subscr.c | 23 +- net/tipc/user_reg.c | 5 +- net/tipc/zone.c | 20 +- net/tipc/zone.h | 4 +- net/tux/cachemiss.c | 2 +- net/tux/directory.c | 2 +- net/tux/input.c | 6 +- net/tux/logger.c | 8 +- net/tux/main.c | 6 +- net/tux/mod.c | 2 +- net/tux/output.c | 2 +- net/tux/proc.c | 10 +- net/tux/proto_ftp.c | 22 +- net/tux/proto_http.c | 20 +- net/unix/af_unix.c | 36 +- net/wanrouter/af_wanpipe.c | 10 +- net/wanrouter/wanmain.c | 10 +- net/wanrouter/wanproc.c | 1 + net/x25/af_x25.c | 1 + net/x25/x25_dev.c | 1 + net/x25/x25_proc.c | 1 + net/x25/x25_route.c | 1 + net/xfrm/xfrm_algo.c | 1 + net/xfrm/xfrm_policy.c | 172 +- net/xfrm/xfrm_state.c | 20 +- net/xfrm/xfrm_user.c | 21 +- scripts/Kbuild.include | 14 +- scripts/Makefile.build | 16 +- scripts/Makefile.headersinst | 160 - scripts/Makefile.host | 16 +- scripts/Makefile.lib | 6 +- scripts/Makefile.modinst | 2 +- scripts/Makefile.modpost | 6 +- scripts/basic/Makefile | 6 +- scripts/basic/split-include.c | 226 + scripts/bloat-o-meter | 3 +- scripts/checkstack.pl | 14 +- scripts/checkversion.pl | 7 +- scripts/export_report.pl | 169 - scripts/genksyms/genksyms.c | 77 +- scripts/genksyms/genksyms.h | 1 - scripts/genksyms/lex.c_shipped | 2 +- scripts/genksyms/lex.l | 2 +- scripts/hdrcheck.sh | 8 - scripts/kconfig/conf.c | 23 +- scripts/kconfig/confdata.c | 493 +- scripts/kconfig/expr.c | 53 +- scripts/kconfig/expr.h | 20 +- scripts/kconfig/gconf.c | 12 +- scripts/kconfig/lex.zconf.c_shipped | 91 +- scripts/kconfig/lkc.h | 10 +- scripts/kconfig/lkc_proto.h | 5 +- scripts/kconfig/lxdialog/checklist.c | 7 +- scripts/kconfig/menu.c | 34 +- scripts/kconfig/qconf.cc | 1048 +- scripts/kconfig/qconf.h | 158 +- scripts/kconfig/symbol.c | 50 +- scripts/kconfig/util.c | 4 +- scripts/kconfig/zconf.gperf | 3 - scripts/kconfig/zconf.hash.c_shipped | 181 +- scripts/kconfig/zconf.tab.c_shipped | 930 +- scripts/kconfig/zconf.y | 33 +- scripts/kernel-2.6-planetlab.spec | 10 +- scripts/kernel-doc | 33 +- scripts/mod/file2alias.c | 64 +- scripts/mod/mk_elfconfig.c | 6 +- scripts/mod/modpost.c | 219 +- scripts/mod/modpost.h | 6 - scripts/package/mkspec | 5 - scripts/rt-tester/check-all.sh | 22 - scripts/rt-tester/rt-tester.py | 222 - scripts/rt-tester/t2-l1-2rt-sameprio.tst | 99 - scripts/rt-tester/t2-l1-pi.tst | 82 - scripts/rt-tester/t2-l1-signal.tst | 77 - scripts/rt-tester/t2-l2-2rt-deadlock.tst | 89 - scripts/rt-tester/t3-l1-pi-1rt.tst | 92 - scripts/rt-tester/t3-l1-pi-2rt.tst | 93 - scripts/rt-tester/t3-l1-pi-3rt.tst | 92 - scripts/rt-tester/t3-l1-pi-signal.tst | 98 - scripts/rt-tester/t3-l1-pi-steal.tst | 96 - scripts/rt-tester/t3-l2-pi.tst | 92 - scripts/rt-tester/t4-l2-pi-deboost.tst | 123 - .../t5-l4-pi-boost-deboost-setsched.tst | 183 - scripts/rt-tester/t5-l4-pi-boost-deboost.tst | 143 - scripts/setlocalversion | 4 +- security/Kconfig | 20 +- security/capability.c | 1 + security/commoncap.c | 5 +- security/dummy.c | 60 +- security/inode.c | 20 +- security/keys/internal.h | 4 +- security/keys/key.c | 71 +- security/keys/keyctl.c | 63 +- security/keys/keyring.c | 28 +- security/keys/proc.c | 7 - security/keys/process_keys.c | 69 +- security/keys/request_key.c | 64 +- security/keys/request_key_auth.c | 49 +- security/keys/user_defined.c | 25 +- security/root_plug.c | 1 + security/seclvl.c | 3 +- security/security.c | 1 + security/selinux/Kconfig | 62 - security/selinux/exports.c | 22 - security/selinux/hooks.c | 613 +- security/selinux/include/av_inherit.h | 1 - security/selinux/include/av_perm_to_string.h | 12 - security/selinux/include/av_permissions.h | 36 - security/selinux/include/class_to_string.h | 3 - security/selinux/include/flask.h | 3 - security/selinux/include/objsec.h | 10 +- security/selinux/include/security.h | 7 +- security/selinux/include/xfrm.h | 4 +- security/selinux/nlmsgtab.c | 3 + security/selinux/selinuxfs.c | 75 +- security/selinux/ss/mls.c | 21 +- security/selinux/ss/policydb.c | 31 +- security/selinux/ss/policydb.h | 7 +- security/selinux/ss/services.c | 52 +- security/selinux/xfrm.c | 52 +- sound/Kconfig | 2 - sound/Makefile | 1 - sound/aoa/Kconfig | 18 - sound/aoa/Makefile | 4 - sound/aoa/aoa-gpio.h | 81 - sound/aoa/aoa.h | 131 - sound/aoa/codecs/Kconfig | 32 - sound/aoa/codecs/Makefile | 3 - sound/aoa/codecs/snd-aoa-codec-onyx.c | 1113 - sound/aoa/codecs/snd-aoa-codec-onyx.h | 76 - .../aoa/codecs/snd-aoa-codec-tas-basstreble.h | 134 - .../aoa/codecs/snd-aoa-codec-tas-gain-table.h | 209 - sound/aoa/codecs/snd-aoa-codec-tas.c | 935 - sound/aoa/codecs/snd-aoa-codec-tas.h | 55 - sound/aoa/codecs/snd-aoa-codec-toonie.c | 150 - sound/aoa/core/Makefile | 5 - sound/aoa/core/snd-aoa-alsa.c | 98 - sound/aoa/core/snd-aoa-alsa.h | 16 - sound/aoa/core/snd-aoa-core.c | 162 - sound/aoa/core/snd-aoa-gpio-feature.c | 412 - sound/aoa/core/snd-aoa-gpio-pmf.c | 254 - sound/aoa/fabrics/Kconfig | 12 - sound/aoa/fabrics/Makefile | 1 - sound/aoa/fabrics/snd-aoa-fabric-layout.c | 1129 - sound/aoa/soundbus/Kconfig | 15 - sound/aoa/soundbus/Makefile | 3 - sound/aoa/soundbus/core.c | 250 - sound/aoa/soundbus/i2sbus/Makefile | 2 - sound/aoa/soundbus/i2sbus/i2sbus-control.c | 193 - sound/aoa/soundbus/i2sbus/i2sbus-core.c | 455 - sound/aoa/soundbus/i2sbus/i2sbus-interface.h | 187 - sound/aoa/soundbus/i2sbus/i2sbus-pcm.c | 1021 - sound/aoa/soundbus/i2sbus/i2sbus.h | 120 - sound/aoa/soundbus/soundbus.h | 202 - sound/aoa/soundbus/sysfs.c | 42 - sound/arm/aaci.c | 7 +- sound/arm/sa11xx-uda1341.c | 17 +- sound/core/Kconfig | 4 +- sound/core/control.c | 32 - sound/core/device.c | 6 - sound/core/hwdep.c | 4 +- sound/core/info.c | 182 +- sound/core/info_oss.c | 3 +- sound/core/init.c | 78 +- sound/core/isadma.c | 6 - sound/core/memalloc.c | 1 + sound/core/memory.c | 6 +- sound/core/misc.c | 6 - sound/core/oss/mixer_oss.c | 5 +- sound/core/oss/pcm_oss.c | 543 +- sound/core/pcm.c | 90 +- sound/core/pcm_compat.c | 4 +- sound/core/pcm_lib.c | 725 +- sound/core/pcm_memory.c | 14 +- sound/core/pcm_misc.c | 24 - sound/core/pcm_native.c | 113 +- sound/core/rawmidi.c | 3 +- sound/core/rtctimer.c | 17 +- sound/core/seq/oss/seq_oss.c | 1 + sound/core/seq/seq.c | 22 + sound/core/seq/seq_clientmgr.c | 12 - sound/core/seq/seq_device.c | 12 +- sound/core/seq/seq_dummy.c | 6 +- sound/core/seq/seq_info.c | 11 +- sound/core/seq/seq_lock.c | 2 - sound/core/seq/seq_memory.c | 3 - sound/core/seq/seq_memory.h | 2 +- sound/core/seq/seq_midi.c | 11 +- sound/core/seq/seq_ports.c | 9 +- sound/core/seq/seq_virmidi.c | 4 +- sound/core/sgbuf.c | 10 +- sound/core/sound.c | 136 +- sound/core/sound_oss.c | 9 +- sound/core/timer.c | 6 +- sound/drivers/dummy.c | 4 - sound/drivers/mpu401/mpu401.c | 11 +- sound/drivers/mpu401/mpu401_uart.c | 186 +- sound/drivers/mtpav.c | 16 +- sound/drivers/opl3/opl3_lib.c | 19 +- sound/drivers/opl3/opl3_oss.c | 3 +- sound/drivers/opl3/opl3_seq.c | 4 +- sound/drivers/opl3/opl3_synth.c | 4 - sound/drivers/opl4/opl4_lib.c | 12 +- sound/drivers/opl4/opl4_seq.c | 4 +- sound/drivers/serial-u16550.c | 6 +- sound/drivers/virmidi.c | 4 - sound/drivers/vx/vx_core.c | 32 +- sound/drivers/vx/vx_hwdep.c | 3 - sound/drivers/vx/vx_pcm.c | 7 +- sound/i2c/cs8427.c | 116 +- sound/i2c/i2c.c | 17 +- sound/i2c/l3/uda1341.c | 4 +- sound/i2c/other/ak4xxx-adda.c | 284 +- sound/isa/ad1816a/ad1816a.c | 2 +- sound/isa/ad1816a/ad1816a_lib.c | 2 +- sound/isa/ad1848/ad1848_lib.c | 2 +- sound/isa/als100.c | 2 +- sound/isa/azt2320.c | 2 +- sound/isa/cs423x/cs4231.c | 2 +- sound/isa/cs423x/cs4231_lib.c | 2 +- sound/isa/cs423x/cs4236.c | 2 +- sound/isa/dt019x.c | 2 +- sound/isa/es1688/es1688.c | 2 +- sound/isa/es1688/es1688_lib.c | 2 +- sound/isa/es18xx.c | 5 +- sound/isa/gus/gus_irq.c | 2 +- sound/isa/gus/gus_main.c | 2 +- sound/isa/gus/gus_mem.c | 6 +- sound/isa/gus/gus_synth.c | 4 +- sound/isa/gus/gusextreme.c | 4 +- sound/isa/gus/gusmax.c | 2 +- sound/isa/gus/interwave.c | 14 +- sound/isa/opl3sa2.c | 14 +- sound/isa/opti9xx/miro.c | 4 +- sound/isa/opti9xx/opti92x-ad1848.c | 4 +- sound/isa/sb/emu8000.c | 22 +- sound/isa/sb/emu8000_patch.c | 2 +- sound/isa/sb/sb16.c | 5 +- sound/isa/sb/sb16_csp.c | 2 +- sound/isa/sb/sb8_midi.c | 20 +- sound/isa/sb/sb_common.c | 2 +- sound/isa/sgalaxy.c | 2 +- sound/isa/sscape.c | 5 +- sound/isa/wavefront/wavefront.c | 6 +- sound/isa/wavefront/wavefront_fx.c | 36 +- sound/isa/wavefront/wavefront_midi.c | 2 +- sound/isa/wavefront/wavefront_synth.c | 14 +- sound/mips/au1x00.c | 4 +- sound/oss/Kconfig | 60 +- sound/oss/ad1816.c | 1 + sound/oss/ad1848.c | 1 + sound/oss/ad1889.c | 3 +- sound/oss/aedsp16.c | 1 + sound/oss/ali5455.c | 2 +- sound/oss/au1000.c | 4 +- sound/oss/au1550_ac97.c | 11 +- sound/oss/btaudio.c | 2 +- sound/oss/cmpci.c | 2 +- sound/oss/cs4232.c | 3 +- sound/oss/cs4281/cs4281m.c | 2 +- sound/oss/cs46xx.c | 1274 +- sound/oss/dmabuf.c | 6 +- sound/oss/dmasound/dmasound.h | 1 + sound/oss/dmasound/dmasound_awacs.c | 17 +- sound/oss/dmasound/dmasound_paula.c | 1 + sound/oss/emu10k1/main.c | 2 +- sound/oss/emu10k1/midi.c | 2 +- sound/oss/es1370.c | 2 +- sound/oss/es1371.c | 2 +- sound/oss/esssolo1.c | 2 +- sound/oss/forte.c | 7 +- sound/oss/hal2.c | 2 +- sound/oss/i810_audio.c | 2 +- sound/oss/ite8172.c | 2 +- sound/oss/kahlua.c | 1 + sound/oss/maestro.c | 2 +- sound/oss/maestro3.c | 2 +- sound/oss/msnd.c | 2 +- sound/oss/msnd_classic.h | 1 + sound/oss/msnd_pinnacle.c | 1 + sound/oss/msnd_pinnacle.h | 1 + sound/oss/nec_vrc5477.c | 2 +- sound/oss/nm256_audio.c | 2 +- sound/oss/opl3sa2.c | 1 + sound/oss/pas2_card.c | 1 + sound/oss/pss.c | 1 + sound/oss/rme96xx.c | 2 +- sound/oss/sb_card.c | 1 + sound/oss/sb_common.c | 3 +- sound/oss/sb_ess.c | 28 +- sound/oss/sh_dac_audio.c | 3 +- sound/oss/sonicvibes.c | 2 +- sound/oss/sound_config.h | 1 + sound/oss/soundcard.c | 17 +- sound/oss/trident.c | 3 +- sound/oss/via82cxxx_audio.c | 12 +- sound/oss/vidc.c | 1 + sound/oss/waveartist.c | 1 + sound/oss/wavfront.c | 2 +- sound/oss/wf_midi.c | 2 +- sound/oss/ymfpci.c | 2 +- sound/pci/Kconfig | 224 +- sound/pci/Makefile | 1 - sound/pci/ac97/ac97_codec.c | 99 +- sound/pci/ac97/ac97_patch.c | 21 +- sound/pci/ac97/ac97_pcm.c | 10 - sound/pci/ac97/ac97_proc.c | 5 +- sound/pci/ac97/ak4531_codec.c | 2 +- sound/pci/ad1889.c | 12 +- sound/pci/ali5451/ali5451.c | 8 +- sound/pci/als300.c | 4 +- sound/pci/als4000.c | 6 +- sound/pci/atiixp.c | 6 +- sound/pci/atiixp_modem.c | 6 +- sound/pci/au88x0/au8810.c | 2 +- sound/pci/au88x0/au8820.c | 2 +- sound/pci/au88x0/au8830.c | 2 +- sound/pci/au88x0/au88x0.c | 15 +- sound/pci/au88x0/au88x0.h | 3 +- sound/pci/au88x0/au88x0_a3d.c | 29 +- sound/pci/au88x0/au88x0_core.c | 4 +- sound/pci/au88x0/au88x0_mpu401.c | 9 +- sound/pci/au88x0/au88x0_xtalk.c | 29 +- sound/pci/azt3328.c | 238 +- sound/pci/azt3328.h | 36 +- sound/pci/bt87x.c | 17 +- sound/pci/ca0106/ca0106.h | 4 +- sound/pci/ca0106/ca0106_main.c | 61 +- sound/pci/ca0106/ca0106_mixer.c | 181 +- sound/pci/ca0106/ca0106_proc.c | 17 +- sound/pci/cmipci.c | 14 +- sound/pci/cs4281.c | 20 +- sound/pci/cs46xx/cs46xx.c | 6 +- sound/pci/cs46xx/cs46xx_lib.c | 14 +- sound/pci/cs46xx/dsp_spos.c | 7 + sound/pci/cs46xx/dsp_spos_scb_lib.c | 6 +- sound/pci/cs5535audio/Makefile | 4 - sound/pci/cs5535audio/cs5535audio.c | 45 +- sound/pci/cs5535audio/cs5535audio.h | 8 - sound/pci/cs5535audio/cs5535audio_pcm.c | 26 +- sound/pci/cs5535audio/cs5535audio_pm.c | 123 - sound/pci/echoaudio/Makefile | 30 - sound/pci/echoaudio/darla20.c | 99 - sound/pci/echoaudio/darla20_dsp.c | 125 - sound/pci/echoaudio/darla24.c | 106 - sound/pci/echoaudio/darla24_dsp.c | 156 - sound/pci/echoaudio/echo3g.c | 118 - sound/pci/echoaudio/echo3g_dsp.c | 131 - sound/pci/echoaudio/echoaudio.c | 2196 -- sound/pci/echoaudio/echoaudio.h | 590 - sound/pci/echoaudio/echoaudio_3g.c | 431 - sound/pci/echoaudio/echoaudio_dsp.c | 1125 - sound/pci/echoaudio/echoaudio_dsp.h | 694 - sound/pci/echoaudio/echoaudio_gml.c | 198 - sound/pci/echoaudio/gina20.c | 103 - sound/pci/echoaudio/gina20_dsp.c | 215 - sound/pci/echoaudio/gina24.c | 123 - sound/pci/echoaudio/gina24_dsp.c | 346 - sound/pci/echoaudio/indigo.c | 104 - sound/pci/echoaudio/indigo_dsp.c | 170 - sound/pci/echoaudio/indigodj.c | 104 - sound/pci/echoaudio/indigodj_dsp.c | 170 - sound/pci/echoaudio/indigoio.c | 105 - sound/pci/echoaudio/indigoio_dsp.c | 141 - sound/pci/echoaudio/layla20.c | 112 - sound/pci/echoaudio/layla20_dsp.c | 290 - sound/pci/echoaudio/layla24.c | 121 - sound/pci/echoaudio/layla24_dsp.c | 394 - sound/pci/echoaudio/mia.c | 117 - sound/pci/echoaudio/mia_dsp.c | 229 - sound/pci/echoaudio/midi.c | 327 - sound/pci/echoaudio/mona.c | 129 - sound/pci/echoaudio/mona_dsp.c | 428 - sound/pci/emu10k1/emu10k1.c | 10 +- sound/pci/emu10k1/emu10k1_main.c | 96 +- sound/pci/emu10k1/emu10k1x.c | 42 +- sound/pci/emu10k1/emumixer.c | 54 +- sound/pci/emu10k1/emumpu401.c | 35 +- sound/pci/emu10k1/emuproc.c | 27 +- sound/pci/emu10k1/io.c | 4 - sound/pci/emu10k1/irq.c | 6 +- sound/pci/emu10k1/memory.c | 8 - sound/pci/emu10k1/p17v.h | 111 - sound/pci/emu10k1/tina2.h | 8 +- sound/pci/emu10k1/voice.c | 4 - sound/pci/ens1370.c | 6 +- sound/pci/es1938.c | 9 +- sound/pci/es1968.c | 9 +- sound/pci/fm801.c | 9 +- sound/pci/hda/Makefile | 2 +- sound/pci/hda/hda_codec.c | 45 +- sound/pci/hda/hda_intel.c | 20 +- sound/pci/hda/hda_patch.h | 3 - sound/pci/hda/hda_proc.c | 6 +- sound/pci/hda/patch_analog.c | 63 +- sound/pci/hda/patch_atihdmi.c | 165 - sound/pci/hda/patch_realtek.c | 1338 +- sound/pci/hda/patch_sigmatel.c | 183 +- sound/pci/ice1712/aureon.c | 28 +- sound/pci/ice1712/aureon.h | 1 - sound/pci/ice1712/ews.c | 3 - sound/pci/ice1712/ice1712.c | 47 +- sound/pci/ice1712/ice1712.h | 5 - sound/pci/ice1712/ice1724.c | 9 +- sound/pci/ice1712/pontis.c | 8 +- sound/pci/ice1712/revo.c | 23 +- sound/pci/intel8x0.c | 22 +- sound/pci/intel8x0m.c | 8 +- sound/pci/korg1212/korg1212.c | 6 +- sound/pci/maestro3.c | 15 +- sound/pci/mixart/mixart.c | 5 +- sound/pci/nm256/nm256.c | 4 +- sound/pci/pcxhr/pcxhr.c | 8 +- sound/pci/riptide/riptide.c | 10 +- sound/pci/rme32.c | 16 +- sound/pci/rme96.c | 48 +- sound/pci/rme9652/hdsp.c | 8 +- sound/pci/rme9652/hdspm.c | 4 +- sound/pci/rme9652/rme9652.c | 8 +- sound/pci/sonicvibes.c | 16 +- sound/pci/trident/trident.c | 5 +- sound/pci/trident/trident_main.c | 24 +- sound/pci/trident/trident_memory.c | 3 - sound/pci/trident/trident_synth.c | 4 +- sound/pci/via82xx.c | 16 +- sound/pci/via82xx_modem.c | 6 +- sound/pci/vx222/vx222.c | 4 +- sound/pci/ymfpci/ymfpci.c | 5 +- sound/pci/ymfpci/ymfpci_main.c | 4 +- sound/pcmcia/pdaudiocf/pdaudiocf.c | 4 +- sound/pcmcia/pdaudiocf/pdaudiocf_core.c | 2 +- sound/pcmcia/vx/vxp_ops.c | 2 +- sound/pcmcia/vx/vxpocket.c | 2 +- sound/ppc/Makefile | 2 +- sound/ppc/awacs.c | 3 +- sound/ppc/daca.c | 3 +- sound/ppc/keywest.c | 6 +- sound/ppc/pmac.c | 91 +- sound/ppc/pmac.h | 3 +- sound/ppc/powermac.c | 14 +- sound/ppc/toonie.c | 378 + sound/ppc/tumbler.c | 11 +- sound/sound_core.c | 7 + sound/sparc/amd7930.c | 146 +- sound/sparc/cs4231.c | 31 +- sound/sparc/dbri.c | 16 +- sound/synth/emux/emux.c | 12 +- sound/synth/emux/emux_proc.c | 1 + sound/synth/emux/emux_seq.c | 3 +- sound/synth/emux/emux_synth.c | 5 - sound/synth/emux/soundfont.c | 6 +- sound/usb/usbaudio.c | 53 +- sound/usb/usbaudio.h | 7 + sound/usb/usbmidi.c | 202 +- sound/usb/usbmixer.c | 70 +- sound/usb/usx2y/usbusx2yaudio.c | 18 +- sound/usb/usx2y/usx2yhwdeppcm.c | 17 +- usr/Makefile | 3 - 9299 files changed, 253763 insertions(+), 478968 deletions(-) delete mode 100644 Documentation/ABI/README delete mode 100644 Documentation/ABI/obsolete/devfs delete mode 100644 Documentation/ABI/stable/syscalls delete mode 100644 Documentation/ABI/stable/sysfs-module delete mode 100644 Documentation/ABI/testing/sysfs-class delete mode 100644 Documentation/ABI/testing/sysfs-devices delete mode 100644 Documentation/DocBook/genericirq.tmpl delete mode 100644 Documentation/IRQ.txt delete mode 100644 Documentation/SubmitChecklist delete mode 100644 Documentation/accounting/delay-accounting.txt delete mode 100644 Documentation/accounting/getdelays.c delete mode 100644 Documentation/accounting/taskstats.txt delete mode 100644 Documentation/arm/Samsung-S3C24XX/S3C2412.txt delete mode 100644 Documentation/arm/Samsung-S3C24XX/S3C2413.txt delete mode 100644 Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen delete mode 100644 Documentation/arm/Sharp-LH/LCDPanels delete mode 100644 Documentation/connector/ucon.c delete mode 100644 Documentation/console/console.txt delete mode 100644 Documentation/fb/imacfb.txt delete mode 100644 Documentation/filesystems/caching/backend-api.txt delete mode 100644 Documentation/filesystems/caching/cachefiles.txt delete mode 100644 Documentation/filesystems/caching/fscache.txt delete mode 100644 Documentation/filesystems/caching/netfs-api.txt create mode 100644 Documentation/filesystems/devfs/ChangeLog create mode 100644 Documentation/filesystems/devfs/README create mode 100644 Documentation/filesystems/devfs/ToDo create mode 100644 Documentation/filesystems/devfs/boot-options delete mode 100644 Documentation/filesystems/relay.txt create mode 100644 Documentation/filesystems/relayfs.txt delete mode 100644 Documentation/hwmon/abituguru delete mode 100644 Documentation/hwmon/abituguru-datasheet delete mode 100644 Documentation/hwmon/lm70 delete mode 100644 Documentation/hwmon/smsc47m192 delete mode 100644 Documentation/hwmon/w83791d delete mode 100644 Documentation/i2c/busses/i2c-ocores delete mode 100644 Documentation/ia64/aliasing.txt delete mode 100644 Documentation/irqflags-tracing.txt delete mode 100644 Documentation/lockdep-design.txt delete mode 100644 Documentation/networking/ipvs-sysctl.txt delete mode 100644 Documentation/pcmcia/crc32hash.c delete mode 100644 Documentation/pi-futex.txt delete mode 100644 Documentation/rt-mutex-design.txt delete mode 100644 Documentation/rt-mutex.txt create mode 100644 Documentation/scsi/cpqfc.txt delete mode 100644 Documentation/scsi/hptiop.txt delete mode 100644 Documentation/video4linux/README.pvrusb2 delete mode 100644 Documentation/video4linux/cx2341x/fw-calling.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-decoder-api.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-dma.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-encoder-api.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-memory.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-osd-api.txt delete mode 100644 Documentation/video4linux/cx2341x/fw-upload.txt delete mode 100644 Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt delete mode 100644 Documentation/video4linux/v4lgrab.c delete mode 100644 Documentation/w1/masters/ds2490 delete mode 100644 Documentation/w1/w1.netlink delete mode 100644 Documentation/watchdog/src/watchdog-simple.c delete mode 100644 Documentation/watchdog/src/watchdog-test.c delete mode 100644 arch/arm/configs/ateb9200_defconfig delete mode 100644 arch/arm/configs/carmeva_defconfig delete mode 100644 arch/arm/configs/kafa_defconfig delete mode 100644 arch/arm/configs/kb9202_defconfig delete mode 100644 arch/arm/configs/lpd270_defconfig delete mode 100644 arch/arm/configs/netx_defconfig delete mode 100644 arch/arm/configs/onearm_defconfig delete mode 100644 arch/arm/configs/pnx4008_defconfig delete mode 100644 arch/arm/configs/trizeps4_defconfig delete mode 100644 arch/arm/kernel/crunch-bits.S delete mode 100644 arch/arm/kernel/crunch.c delete mode 100644 arch/arm/kernel/iwmmxt-notifier.c delete mode 100644 arch/arm/mach-at91rm9200/board-1arm.c delete mode 100644 arch/arm/mach-at91rm9200/board-carmeva.c delete mode 100644 arch/arm/mach-at91rm9200/board-eb9200.c delete mode 100644 arch/arm/mach-at91rm9200/board-kafa.c delete mode 100644 arch/arm/mach-at91rm9200/board-kb9202.c rename arch/arm/mach-at91rm9200/{at91rm9200.c => common.c} (59%) delete mode 100644 arch/arm/mach-at91rm9200/pm.c rename arch/arm/mach-at91rm9200/{at91rm9200_time.c => time.c} (79%) delete mode 100644 arch/arm/mach-ep93xx/clock.c delete mode 100644 arch/arm/mach-ep93xx/edb9302.c delete mode 100644 arch/arm/mach-ep93xx/edb9315.c delete mode 100644 arch/arm/mach-ep93xx/edb9315a.c delete mode 100644 arch/arm/mach-lh7a40x/clcd.c delete mode 100644 arch/arm/mach-lh7a40x/clocks.c delete mode 100644 arch/arm/mach-lh7a40x/lcd-panel.h delete mode 100644 arch/arm/mach-lh7a40x/ssp-cpld.c delete mode 100644 arch/arm/mach-netx/Kconfig delete mode 100644 arch/arm/mach-netx/Makefile delete mode 100644 arch/arm/mach-netx/Makefile.boot delete mode 100644 arch/arm/mach-netx/fb.c delete mode 100644 arch/arm/mach-netx/fb.h delete mode 100644 arch/arm/mach-netx/generic.c delete mode 100644 arch/arm/mach-netx/generic.h delete mode 100644 arch/arm/mach-netx/nxdb500.c delete mode 100644 arch/arm/mach-netx/nxdkn.c delete mode 100644 arch/arm/mach-netx/nxeb500hmi.c delete mode 100644 arch/arm/mach-netx/pfifo.c delete mode 100644 arch/arm/mach-netx/time.c delete mode 100644 arch/arm/mach-netx/xc.c delete mode 100644 arch/arm/mach-omap1/board-fsample.c delete mode 100644 arch/arm/mach-omap2/gpmc.c delete mode 100644 arch/arm/mach-omap2/pm-domain.c delete mode 100644 arch/arm/mach-pnx4008/Makefile delete mode 100644 arch/arm/mach-pnx4008/Makefile.boot delete mode 100644 arch/arm/mach-pnx4008/clock.c delete mode 100644 arch/arm/mach-pnx4008/clock.h delete mode 100644 arch/arm/mach-pnx4008/core.c delete mode 100644 arch/arm/mach-pnx4008/dma.c delete mode 100644 arch/arm/mach-pnx4008/gpio.c delete mode 100644 arch/arm/mach-pnx4008/irq.c delete mode 100644 arch/arm/mach-pnx4008/pm.c delete mode 100644 arch/arm/mach-pnx4008/serial.c delete mode 100644 arch/arm/mach-pnx4008/sleep.S delete mode 100644 arch/arm/mach-pnx4008/time.c delete mode 100644 arch/arm/mach-pxa/leds-trizeps4.c delete mode 100644 arch/arm/mach-pxa/trizeps4.c delete mode 100644 arch/arm/mach-s3c2410/mach-smdk2413.c delete mode 100644 arch/arm/mach-s3c2410/s3c2410-clock.c delete mode 100644 arch/arm/mach-s3c2410/s3c2412-clock.c delete mode 100644 arch/arm/mach-s3c2410/s3c2412-irq.c delete mode 100644 arch/arm/mach-s3c2410/s3c2412.c delete mode 100644 arch/arm/mach-s3c2410/s3c2412.h delete mode 100644 arch/arm/mach-s3c2410/s3c2442-clock.c delete mode 100644 arch/arm/mach-s3c2410/s3c2442.c delete mode 100644 arch/arm/mach-s3c2410/s3c2442.h delete mode 100644 arch/arm/mach-s3c2410/s3c244x-irq.c delete mode 100644 arch/arm/mach-s3c2410/s3c244x.c delete mode 100644 arch/arm/mach-s3c2410/s3c244x.h delete mode 100644 arch/arm/mm/iomap.c delete mode 100644 arch/arm/mm/nommu.c delete mode 100644 arch/i386/kernel/hpet.c delete mode 100644 arch/i386/kernel/i8253.c create mode 100644 arch/i386/kernel/timers/Makefile create mode 100644 arch/i386/kernel/timers/common.c create mode 100644 arch/i386/kernel/timers/timer.c create mode 100644 arch/i386/kernel/timers/timer_cyclone.c create mode 100644 arch/i386/kernel/timers/timer_hpet.c create mode 100644 arch/i386/kernel/timers/timer_none.c create mode 100644 arch/i386/kernel/timers/timer_pit.c create mode 100644 arch/i386/kernel/timers/timer_pm.c create mode 100644 arch/i386/kernel/timers/timer_tsc.c delete mode 100644 arch/i386/kernel/tsc.c delete mode 100644 arch/i386/mach-xen/irqflags.c delete mode 100644 arch/ia64/ia32/audit.c delete mode 100644 arch/ia64/kernel/audit.c delete mode 100644 arch/ia64/xen/Makefile delete mode 100644 arch/ia64/xen/drivers/README delete mode 100644 arch/ia64/xen/hypercall.S delete mode 100644 arch/ia64/xen/hypervisor.c delete mode 100644 arch/ia64/xen/util.c delete mode 100644 arch/ia64/xen/xenentry.S delete mode 100644 arch/ia64/xen/xenhpski.c delete mode 100644 arch/ia64/xen/xenivt.S delete mode 100644 arch/ia64/xen/xenminstate.h delete mode 100644 arch/ia64/xen/xenpal.S delete mode 100644 arch/ia64/xen/xensetup.S create mode 100644 arch/m68k/bvme6000/bvmeints.c create mode 100644 arch/m68k/hp300/ints.c create mode 100644 arch/m68k/hp300/ints.h delete mode 100644 arch/m68k/kernel/dma.c delete mode 100644 arch/m68k/lib/uaccess.c create mode 100644 arch/m68k/mvme147/147ints.c create mode 100644 arch/m68k/mvme16x/16xints.c delete mode 100644 arch/m68knommu/platform/532x/Makefile delete mode 100644 arch/m68knommu/platform/532x/config.c delete mode 100644 arch/m68knommu/platform/68328/romvec.S create mode 100644 arch/mips/au1000/csb250/Makefile create mode 100644 arch/mips/au1000/csb250/board_setup.c create mode 100644 arch/mips/au1000/csb250/init.c create mode 100644 arch/mips/au1000/csb250/irqmap.c create mode 100644 arch/mips/au1000/hydrogen3/Makefile create mode 100644 arch/mips/au1000/hydrogen3/board_setup.c create mode 100644 arch/mips/au1000/hydrogen3/init.c create mode 100644 arch/mips/au1000/hydrogen3/irqmap.c delete mode 100644 arch/mips/basler/excite/Makefile delete mode 100644 arch/mips/basler/excite/excite_dbg_io.c delete mode 100644 arch/mips/basler/excite/excite_device.c delete mode 100644 arch/mips/basler/excite/excite_flashtest.c delete mode 100644 arch/mips/basler/excite/excite_fpga.h delete mode 100644 arch/mips/basler/excite/excite_iodev.c delete mode 100644 arch/mips/basler/excite/excite_iodev.h delete mode 100644 arch/mips/basler/excite/excite_irq.c delete mode 100644 arch/mips/basler/excite/excite_procfs.c delete mode 100644 arch/mips/basler/excite/excite_prom.c delete mode 100644 arch/mips/basler/excite/excite_setup.c rename arch/mips/configs/{wrppmc_defconfig => ddb5476_defconfig} (70%) delete mode 100644 arch/mips/configs/emma2rh_defconfig delete mode 100644 arch/mips/configs/excite_defconfig create mode 100644 arch/mips/ddb5xxx/ddb5074/Makefile create mode 100644 arch/mips/ddb5xxx/ddb5074/irq.c create mode 100644 arch/mips/ddb5xxx/ddb5074/nile4_pic.c create mode 100644 arch/mips/ddb5xxx/ddb5074/setup.c create mode 100644 arch/mips/ddb5xxx/ddb5476/Makefile create mode 100644 arch/mips/ddb5xxx/ddb5476/dbg_io.c create mode 100644 arch/mips/ddb5xxx/ddb5476/irq.c create mode 100644 arch/mips/ddb5xxx/ddb5476/nile4_pic.c create mode 100644 arch/mips/ddb5xxx/ddb5476/setup.c create mode 100644 arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c delete mode 100644 arch/mips/emma2rh/common/Makefile delete mode 100644 arch/mips/emma2rh/common/irq.c delete mode 100644 arch/mips/emma2rh/common/irq_emma2rh.c delete mode 100644 arch/mips/emma2rh/common/prom.c delete mode 100644 arch/mips/emma2rh/markeins/Makefile delete mode 100644 arch/mips/emma2rh/markeins/irq.c delete mode 100644 arch/mips/emma2rh/markeins/irq_markeins.c delete mode 100644 arch/mips/emma2rh/markeins/led.c delete mode 100644 arch/mips/emma2rh/markeins/platform.c delete mode 100644 arch/mips/emma2rh/markeins/setup.c create mode 100644 arch/mips/gt64120/common/pci.c delete mode 100644 arch/mips/gt64120/wrppmc/Makefile delete mode 100644 arch/mips/gt64120/wrppmc/irq.c delete mode 100644 arch/mips/gt64120/wrppmc/pci.c delete mode 100644 arch/mips/gt64120/wrppmc/reset.c delete mode 100644 arch/mips/gt64120/wrppmc/setup.c delete mode 100644 arch/mips/gt64120/wrppmc/time.c delete mode 100644 arch/mips/kernel/apm.c delete mode 100644 arch/mips/lib/ashldi3.c delete mode 100644 arch/mips/lib/ashrdi3.c delete mode 100644 arch/mips/lib/libgcc.h delete mode 100644 arch/mips/lib/lshrdi3.c create mode 100644 arch/mips/mips-boards/sim/sim_IRQ.c create mode 100644 arch/mips/mips-boards/sim/sim_irq.S delete mode 100644 arch/mips/mm/sc-mips.c create mode 100644 arch/mips/pci/fixup-ddb5074.c delete mode 100644 arch/mips/pci/fixup-emma2rh.c delete mode 100644 arch/mips/pci/fixup-excite.c delete mode 100644 arch/mips/pci/fixup-wrppmc.c delete mode 100644 arch/mips/pci/ops-bridge.c create mode 100644 arch/mips/pci/ops-ddb5074.c create mode 100644 arch/mips/pci/ops-ddb5476.c delete mode 100644 arch/mips/pci/ops-emma2rh.c create mode 100644 arch/mips/pci/pci-ddb5074.c create mode 100644 arch/mips/pci/pci-ddb5476.c delete mode 100644 arch/mips/pci/pci-emma2rh.c delete mode 100644 arch/mips/pci/pci-excite.c delete mode 100644 arch/mips/qemu/q-reset.c delete mode 100644 arch/mips/sni/sniprom.c create mode 100644 arch/mips/vr41xx/common/vrc4173.c delete mode 100644 arch/powerpc/boot/dts/mpc7448hpc2.dts delete mode 100644 arch/powerpc/boot/dts/mpc8349emds.dts delete mode 100644 arch/powerpc/boot/dts/mpc8540ads.dts delete mode 100644 arch/powerpc/boot/dts/mpc8541cds.dts delete mode 100644 arch/powerpc/boot/dts/mpc8548cds.dts delete mode 100644 arch/powerpc/boot/dts/mpc8555cds.dts delete mode 100644 arch/powerpc/boot/dts/mpc8641_hpcn.dts delete mode 100644 arch/powerpc/configs/chrp32_defconfig delete mode 100644 arch/powerpc/configs/mpc7448_hpc2_defconfig delete mode 100644 arch/powerpc/configs/mpc834x_itx_defconfig rename arch/powerpc/configs/{mpc834x_mds_defconfig => mpc834x_sys_defconfig} (90%) delete mode 100644 arch/powerpc/configs/mpc85xx_cds_defconfig delete mode 100644 arch/powerpc/configs/mpc8641_hpcn_defconfig delete mode 100644 arch/powerpc/kernel/audit.c delete mode 100644 arch/powerpc/kernel/compat_audit.c delete mode 100644 arch/powerpc/kernel/misc.S create mode 100644 arch/powerpc/lib/bitops.c delete mode 100644 arch/powerpc/platforms/83xx/mpc834x_itx.c delete mode 100644 arch/powerpc/platforms/83xx/mpc834x_itx.h delete mode 100644 arch/powerpc/platforms/85xx/mpc85xx_cds.c delete mode 100644 arch/powerpc/platforms/85xx/mpc85xx_cds.h delete mode 100644 arch/powerpc/platforms/86xx/Kconfig delete mode 100644 arch/powerpc/platforms/86xx/Makefile delete mode 100644 arch/powerpc/platforms/86xx/mpc8641_hpcn.h delete mode 100644 arch/powerpc/platforms/86xx/mpc86xx.h delete mode 100644 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c delete mode 100644 arch/powerpc/platforms/86xx/mpc86xx_pcie.c delete mode 100644 arch/powerpc/platforms/86xx/mpc86xx_smp.c delete mode 100644 arch/powerpc/platforms/86xx/pci.c delete mode 100644 arch/powerpc/platforms/cell/cbe_regs.c delete mode 100644 arch/powerpc/platforms/cell/cbe_regs.h delete mode 100644 arch/powerpc/platforms/cell/ras.c delete mode 100644 arch/powerpc/platforms/cell/ras.h create mode 100644 arch/powerpc/platforms/cell/spu_priv1.c delete mode 100644 arch/powerpc/platforms/cell/spu_priv1_mmio.c delete mode 100644 arch/powerpc/platforms/embedded6xx/Makefile delete mode 100644 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c delete mode 100644 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h delete mode 100644 arch/powerpc/platforms/iseries/dt.c rename {include/asm-powerpc => arch/powerpc/platforms}/iseries/iommu.h (90%) create mode 100644 arch/powerpc/platforms/iseries/vio.c create mode 100644 arch/powerpc/platforms/pseries/vio.c delete mode 100644 arch/powerpc/sysdev/todc.c delete mode 100644 arch/powerpc/sysdev/tsi108_dev.c delete mode 100644 arch/powerpc/sysdev/tsi108_pci.c delete mode 100644 arch/ppc/syslib/i8259.c delete mode 100644 arch/ppc/syslib/ipic.c delete mode 100644 arch/ppc/syslib/ipic.h delete mode 100644 arch/s390/hypfs/Makefile delete mode 100644 arch/s390/hypfs/hypfs.h delete mode 100644 arch/s390/hypfs/hypfs_diag.c delete mode 100644 arch/s390/hypfs/hypfs_diag.h delete mode 100644 arch/s390/hypfs/inode.c delete mode 100644 arch/s390/kernel/audit.c delete mode 100644 arch/s390/kernel/compat_audit.c delete mode 100644 arch/s390/kernel/stacktrace.c delete mode 100644 arch/s390/lib/div64.c delete mode 100644 arch/sparc/kernel/of_device.c delete mode 100644 arch/sparc/kernel/prom.c delete mode 100644 arch/sparc/lib/iomap.c delete mode 100644 arch/sparc64/kernel/audit.c delete mode 100644 arch/sparc64/kernel/compat_audit.c delete mode 100644 arch/sparc64/kernel/of_device.c delete mode 100644 arch/sparc64/kernel/prom.c rename arch/um/kernel/{exec.c => exec_kern.c} (87%) rename arch/um/kernel/{sigio.c => sigio_kern.c} (68%) rename arch/um/kernel/{signal.c => signal_kern.c} (96%) create mode 100644 arch/um/kernel/syscall_kern.c create mode 100644 arch/um/kernel/time_kern.c rename arch/um/kernel/{trap.c => trap_kern.c} (94%) delete mode 100644 arch/x86_64/ia32/audit.c create mode 100644 arch/x86_64/kernel/acpi/processor.c delete mode 100644 arch/x86_64/kernel/audit.c delete mode 100644 arch/x86_64/kernel/irqflags-xen.c delete mode 100644 arch/x86_64/kernel/k8.c delete mode 100644 arch/x86_64/kernel/pci-calgary.c delete mode 100644 arch/x86_64/kernel/stacktrace.c delete mode 100644 arch/x86_64/kernel/tce.c create mode 100644 arch/x86_64/kernel/x8664_ksyms-xen.c delete mode 100644 arch/x86_64/lib/rwlock.S create mode 100644 arch/xen/kernel/vmlinux.lds.S rename configs/{kernel-2.6.18-i586-smp.config => kernel-2.6.17-i586-smp.config} (82%) rename configs/{kernel-2.6.18-i586.config => kernel-2.6.17-i586.config} (86%) rename configs/{kernel-2.6.18-i686-kdump.config => kernel-2.6.17-i686-kdump.config} (92%) create mode 100644 configs/kernel-2.6.17-i686-planetlab.config create mode 100644 configs/kernel-2.6.17-i686-smp-planetlab.config rename configs/{kernel-2.6.18-i686-smp.config => kernel-2.6.17-i686-smp.config} (91%) create mode 100644 configs/kernel-2.6.17-i686-uml-planetlab.config rename configs/{kernel-2.6.18-i686-xen.config => kernel-2.6.17-i686-xen.config} (90%) rename configs/{kernel-2.6.18-i686-xen0.config => kernel-2.6.17-i686-xen0.config} (90%) rename configs/{kernel-2.6.18-x86_64-xenU.config => kernel-2.6.17-i686-xenU-planetlab.config} (87%) rename configs/{kernel-2.6.18-i686-xenU.config => kernel-2.6.17-i686-xenU.config} (89%) rename configs/{kernel-2.6.18-i686.config => kernel-2.6.17-i686.config} (91%) rename configs/{kernel-2.6.18-ia64.config => kernel-2.6.17-ia64.config} (91%) rename configs/{kernel-2.6.18-ppc-smp.config => kernel-2.6.17-ppc-smp.config} (91%) rename configs/{kernel-2.6.18-ppc.config => kernel-2.6.17-ppc.config} (91%) rename configs/{kernel-2.6.18-ppc64.config => kernel-2.6.17-ppc64.config} (90%) rename configs/{kernel-2.6.18-ppc64iseries.config => kernel-2.6.17-ppc64iseries.config} (82%) rename configs/{kernel-2.6.18-s390.config => kernel-2.6.17-s390.config} (89%) rename configs/{kernel-2.6.18-s390x.config => kernel-2.6.17-s390x.config} (89%) rename configs/{kernel-2.6.18-x86_64.config => kernel-2.6.17-x86_64-smp.config} (90%) rename configs/{kernel-2.6.18-x86_64-kdump.config => kernel-2.6.17-x86_64.config} (90%) delete mode 100644 configs/kernel-2.6.18-ia64-xen.config delete mode 100644 configs/kernel-2.6.18-ppc64-kdump.config delete mode 100644 configs/kernel-2.6.18-x86_64-xen.config delete mode 100644 configs/kernel-2.6.18-x86_64-xen0.config delete mode 100644 drivers/acpi/cm_sbs.c delete mode 100644 drivers/acpi/dock.c delete mode 100644 drivers/acpi/i2c_ec.c delete mode 100644 drivers/acpi/i2c_ec.h delete mode 100644 drivers/acpi/sbs.c delete mode 100644 drivers/base/hypervisor.c delete mode 100644 drivers/base/isa.c delete mode 100644 drivers/base/power/trace.c create mode 100644 drivers/char/hw_random.c delete mode 100644 drivers/char/hw_random/Kconfig delete mode 100644 drivers/char/hw_random/Makefile delete mode 100644 drivers/char/hw_random/amd-rng.c delete mode 100644 drivers/char/hw_random/core.c delete mode 100644 drivers/char/hw_random/geode-rng.c delete mode 100644 drivers/char/hw_random/intel-rng.c delete mode 100644 drivers/char/hw_random/ixp4xx-rng.c delete mode 100644 drivers/char/hw_random/omap-rng.c delete mode 100644 drivers/char/hw_random/via-rng.c delete mode 100644 drivers/char/nsc_gpio.c delete mode 100644 drivers/char/pc8736x_gpio.c delete mode 100644 drivers/clocksource/Makefile delete mode 100644 drivers/clocksource/acpi_pm.c delete mode 100644 drivers/clocksource/cyclone.c delete mode 100644 drivers/clocksource/scx200_hrt.c delete mode 100644 drivers/dma/Kconfig delete mode 100644 drivers/dma/Makefile delete mode 100644 drivers/dma/dmaengine.c delete mode 100644 drivers/dma/ioatdma.c delete mode 100644 drivers/dma/ioatdma.h delete mode 100644 drivers/dma/ioatdma_hw.h delete mode 100644 drivers/dma/ioatdma_io.h delete mode 100644 drivers/dma/ioatdma_registers.h delete mode 100644 drivers/dma/iovlock.c delete mode 100644 drivers/edac/k8_edac.c delete mode 100644 drivers/hwmon/abituguru.c delete mode 100644 drivers/hwmon/lm70.c delete mode 100644 drivers/hwmon/smsc47m192.c delete mode 100644 drivers/hwmon/w83791d.c delete mode 100644 drivers/i2c/busses/i2c-ocores.c delete mode 100644 drivers/infiniband/core/addr.c delete mode 100644 drivers/infiniband/core/cma.c delete mode 100644 drivers/infiniband/core/uverbs_marshall.c create mode 100644 drivers/infiniband/hw/ipath/ips_common.h delete mode 100644 drivers/infiniband/ulp/iser/Kconfig delete mode 100644 drivers/infiniband/ulp/iser/Makefile delete mode 100644 drivers/infiniband/ulp/iser/iscsi_iser.c delete mode 100644 drivers/infiniband/ulp/iser/iscsi_iser.h delete mode 100644 drivers/infiniband/ulp/iser/iser_initiator.c delete mode 100644 drivers/infiniband/ulp/iser/iser_memory.c delete mode 100644 drivers/infiniband/ulp/iser/iser_verbs.c delete mode 100644 drivers/leds/leds-ams-delta.c delete mode 100644 drivers/leds/leds-net48xx.c delete mode 100644 drivers/leds/ledtrig-heartbeat.c delete mode 100644 drivers/macintosh/via-pmu-backlight.c delete mode 100644 drivers/macintosh/via-pmu-event.c delete mode 100644 drivers/macintosh/via-pmu-event.h delete mode 100644 drivers/macintosh/via-pmu-led.c create mode 100644 drivers/md/raid6main.c create mode 100644 drivers/media/common/saa7146_vv_ksyms.c delete mode 100644 drivers/media/dvb/dvb-core/dvb_math.c delete mode 100644 drivers/media/dvb/dvb-core/dvb_math.h delete mode 100644 drivers/media/dvb/dvb-usb/gp8psk-fe.c delete mode 100644 drivers/media/dvb/dvb-usb/gp8psk.c delete mode 100644 drivers/media/dvb/dvb-usb/gp8psk.h delete mode 100644 drivers/media/dvb/frontends/isl6421.c delete mode 100644 drivers/media/dvb/frontends/isl6421.h delete mode 100644 drivers/media/dvb/frontends/lg_h06xf.h delete mode 100644 drivers/media/dvb/frontends/lnbp21.c delete mode 100644 drivers/media/video/bt866.c delete mode 100644 drivers/media/video/cx2341x.c rename drivers/media/{radio => video}/dsbr100.c (99%) delete mode 100644 drivers/media/video/ks0127.c delete mode 100644 drivers/media/video/ks0127.h delete mode 100644 drivers/media/video/pvrusb2/Kconfig delete mode 100644 drivers/media/video/pvrusb2/Makefile delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-audio.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-audio.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-context.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-context.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ctrl.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ctrl.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debug.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debugifc.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-debugifc.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-eeprom.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-eeprom.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-encoder.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-encoder.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-hdw.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-core.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-i2c-core.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-io.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-io.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ioread.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-ioread.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-main.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-std.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-std.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-sysfs.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-sysfs.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-tuner.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-tuner.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-util.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-v4l2.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-v4l2.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-video-v4l.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-video-v4l.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-wm8775.c delete mode 100644 drivers/media/video/pvrusb2/pvrusb2-wm8775.h delete mode 100644 drivers/media/video/pvrusb2/pvrusb2.h delete mode 100644 drivers/media/video/pwc/pwc-dec1.c delete mode 100644 drivers/media/video/pwc/pwc-dec1.h delete mode 100644 drivers/media/video/pwc/pwc-dec23.c delete mode 100644 drivers/media/video/pwc/pwc-dec23.h delete mode 100644 drivers/media/video/pwc/pwc-v4l.c delete mode 100644 drivers/media/video/tlv320aic23b.c delete mode 100644 drivers/media/video/usbvideo/quickcam_messenger.c delete mode 100644 drivers/media/video/usbvideo/quickcam_messenger.h delete mode 100644 drivers/media/video/zc0301/zc0301_pb0330.c create mode 100644 drivers/message/fusion/lsi/fc_log.h delete mode 100644 drivers/mtd/nand/ams-delta.c delete mode 100644 drivers/mtd/nand/cs553x_nand.c delete mode 100644 drivers/mtd/nand/ndfc.c delete mode 100644 drivers/mtd/nand/ts7250.c create mode 100644 drivers/net/bcm5700/.cvsignore create mode 100644 drivers/net/bcm5700/5701rls.c create mode 100644 drivers/net/bcm5700/5701rls.h create mode 100755 drivers/net/bcm5700/DISTRIB.TXT create mode 100755 drivers/net/bcm5700/LICENSE create mode 100755 drivers/net/bcm5700/Makefile create mode 100644 drivers/net/bcm5700/README.TXT create mode 100755 drivers/net/bcm5700/RELEASE.TXT create mode 100644 drivers/net/bcm5700/autoneg.c create mode 100644 drivers/net/bcm5700/autoneg.h create mode 100644 drivers/net/bcm5700/b57diag.c create mode 100644 drivers/net/bcm5700/b57proc.c create mode 100644 drivers/net/bcm5700/b57um.c create mode 100644 drivers/net/bcm5700/bcm5700.4 create mode 100644 drivers/net/bcm5700/bits.h create mode 100644 drivers/net/bcm5700/fw_lso05.h create mode 100644 drivers/net/bcm5700/fw_stkoffld.h create mode 100644 drivers/net/bcm5700/lm.h create mode 100644 drivers/net/bcm5700/mm.h create mode 100644 drivers/net/bcm5700/nicext.h create mode 100644 drivers/net/bcm5700/queue.h create mode 100644 drivers/net/bcm5700/tcp_seg.c create mode 100644 drivers/net/bcm5700/tigon3.c create mode 100644 drivers/net/bcm5700/tigon3.h delete mode 100644 drivers/net/fs_enet/fec.h create mode 100644 drivers/net/fs_enet/fs_enet-mii.c delete mode 100644 drivers/net/fs_enet/mii-fec.c create mode 100644 drivers/net/fs_enet/mii-fixed.c delete mode 100644 drivers/net/irda/mcs7780.c delete mode 100644 drivers/net/irda/mcs7780.h delete mode 100644 drivers/net/myri10ge/Makefile delete mode 100644 drivers/net/myri10ge/myri10ge.c delete mode 100644 drivers/net/myri10ge/myri10ge_mcp.h delete mode 100644 drivers/net/myri10ge/myri10ge_mcp_gen_header.h delete mode 100644 drivers/net/netx-eth.c delete mode 100644 drivers/net/phy/fixed.c delete mode 100644 drivers/net/phy/smsc.c delete mode 100644 drivers/net/phy/vitesse.c delete mode 100644 drivers/net/smc911x.c delete mode 100644 drivers/net/smc911x.h delete mode 100644 drivers/net/ucc_geth.c delete mode 100644 drivers/net/ucc_geth.h delete mode 100644 drivers/net/ucc_geth_phy.c delete mode 100644 drivers/net/ucc_geth_phy.h delete mode 100644 drivers/net/wireless/orinoco_pci.h delete mode 100644 drivers/net/wireless/zd1211rw/Kconfig delete mode 100644 drivers/net/wireless/zd1211rw/Makefile delete mode 100644 drivers/net/wireless/zd1211rw/zd_chip.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_chip.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_def.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_ieee80211.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_ieee80211.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_mac.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_mac.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_netdev.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_netdev.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_rf.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_rf.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_rf_al2230.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_rf_rf2959.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_types.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_usb.c delete mode 100644 drivers/net/wireless/zd1211rw/zd_usb.h delete mode 100644 drivers/net/wireless/zd1211rw/zd_util.c create mode 100644 drivers/parport/parport_arc.c delete mode 100644 drivers/parport/parport_ax88796.c create mode 100644 drivers/pci/hotplug/acpiphp_dock.c delete mode 100644 drivers/pci/msi-altix.c delete mode 100644 drivers/pci/msi-apic.c delete mode 100644 drivers/rtc/rtc-at91.c delete mode 100644 drivers/rtc/rtc-ds1307.c delete mode 100644 drivers/rtc/rtc-ds1553.c delete mode 100644 drivers/rtc/rtc-ds1742.c delete mode 100644 drivers/rtc/rtc-isl1208.c delete mode 100644 drivers/rtc/rtc-max6902.c delete mode 100644 drivers/rtc/rtc-pcf8583.c delete mode 100644 drivers/rtc/rtc-pl031.c delete mode 100644 drivers/rtc/rtc-rs5c348.c delete mode 100644 drivers/rtc/rtc-s3c.c delete mode 100644 drivers/rtc/rtc-v3020.c create mode 100644 drivers/s390/net/ctctty.c create mode 100644 drivers/s390/net/ctctty.h delete mode 100644 drivers/scsi/hptiop.c delete mode 100644 drivers/scsi/hptiop.h delete mode 100644 drivers/scsi/libata-eh.c delete mode 100644 drivers/scsi/libiscsi.c create mode 100644 drivers/scsi/qla2xxx/ql2100.c create mode 100644 drivers/scsi/qla2xxx/ql2200.c create mode 100644 drivers/scsi/qla2xxx/ql2300.c create mode 100644 drivers/scsi/qla2xxx/ql2322.c create mode 100644 drivers/scsi/qla2xxx/ql2400.c create mode 100644 drivers/scsi/qla2xxx/qla_rscn.c delete mode 100644 drivers/scsi/scsi_transport_api.h delete mode 100644 drivers/serial/netx-serial.c delete mode 100644 drivers/usb/core/endpoint.c delete mode 100644 drivers/usb/host/ohci-ep93xx.c delete mode 100644 drivers/usb/misc/appledisplay.c delete mode 100644 drivers/usb/misc/cypress_cy7c63.c rename drivers/{net/wireless => usb/net}/zd1201.c (97%) rename drivers/{net/wireless => usb/net}/zd1201.h (100%) create mode 100644 drivers/usb/serial/anydata.c delete mode 100644 drivers/usb/serial/sierra.c rename include/linux/usb/serial.h => drivers/usb/serial/usb-serial.h (97%) delete mode 100644 drivers/video/aty/radeon_backlight.c create mode 100644 drivers/video/aty/radeon_pm_whitelist.h delete mode 100644 drivers/video/fb_notify.c delete mode 100644 drivers/video/imacfb.c delete mode 100644 drivers/video/mbx/Makefile delete mode 100644 drivers/video/mbx/mbxdebugfs.c delete mode 100644 drivers/video/mbx/mbxfb.c delete mode 100644 drivers/video/mbx/reg_bits.h delete mode 100644 drivers/video/mbx/regs.h delete mode 100644 drivers/video/nvidia/nv_backlight.c delete mode 100644 drivers/video/pnx4008/Makefile delete mode 100644 drivers/video/pnx4008/dum.h delete mode 100644 drivers/video/pnx4008/fbcommon.h delete mode 100644 drivers/video/pnx4008/pnxrgbfb.c delete mode 100644 drivers/video/pnx4008/sdum.c delete mode 100644 drivers/video/pnx4008/sdum.h create mode 100644 drivers/w1/masters/ds_w1_bridge.c rename drivers/w1/masters/{ds2490.c => dscore.c} (67%) create mode 100644 drivers/w1/masters/dscore.h rename drivers/{net/wireless/zd1211rw/zd_util.h => w1/w1_io.h} (52%) rename drivers/xen/blktap/{blktapmain.c => blktap.c} (84%) delete mode 100644 drivers/xen/xenfb/Makefile delete mode 100644 drivers/xen/xenfb/xenfb.c delete mode 100644 drivers/xen/xenkbd/Makefile delete mode 100644 drivers/xen/xenkbd/xenkbd.c create mode 100644 fs/afs/cache.h delete mode 100644 fs/cachefiles/Makefile delete mode 100644 fs/cachefiles/cf-bind.c delete mode 100644 fs/cachefiles/cf-interface.c delete mode 100644 fs/cachefiles/cf-key.c delete mode 100644 fs/cachefiles/cf-main.c delete mode 100644 fs/cachefiles/cf-namei.c delete mode 100644 fs/cachefiles/cf-proc.c delete mode 100644 fs/cachefiles/cf-sysctl.c delete mode 100644 fs/cachefiles/cf-xattr.c delete mode 100644 fs/cachefiles/internal.h create mode 100644 fs/cifs/ntlmssp.c delete mode 100644 fs/cifs/sess.c create mode 100644 fs/devfs/Makefile create mode 100644 fs/devfs/base.c create mode 100644 fs/devfs/util.c create mode 100644 fs/ext2/bitmap.c delete mode 100644 fs/fscache/Makefile delete mode 100644 fs/fscache/cookie.c delete mode 100644 fs/fscache/fscache-int.h delete mode 100644 fs/fscache/fsdef.c delete mode 100644 fs/fscache/main.c delete mode 100644 fs/fscache/page.c delete mode 100644 fs/fuse/control.c delete mode 100644 fs/inotify_user.c delete mode 100644 fs/jffs2/acl.c delete mode 100644 fs/jffs2/acl.h create mode 100644 fs/jffs2/histo.h delete mode 100644 fs/jffs2/security.c delete mode 100644 fs/jffs2/xattr.c delete mode 100644 fs/jffs2/xattr.h delete mode 100644 fs/jffs2/xattr_trusted.c delete mode 100644 fs/jffs2/xattr_user.c delete mode 100644 fs/nfs/client.c delete mode 100644 fs/nfs/fscache.c delete mode 100644 fs/nfs/fscache.h delete mode 100644 fs/nfs/getroot.c delete mode 100644 fs/nfs/internal.h delete mode 100644 fs/nfs/namespace.c delete mode 100644 fs/nfs/nfs4namespace.c delete mode 100644 fs/nfs/super.c create mode 100644 fs/ocfs2/dlm/dlmdebug.h create mode 100644 fs/partitions/devfs.c create mode 100644 fs/partitions/devfs.h delete mode 100644 fs/squashfs/squashfs.h delete mode 100644 fs/squashfs/squashfs2_0.c create mode 100644 fs/xfs/xfs_dir.c create mode 100644 fs/xfs/xfs_dir.h create mode 100644 fs/xfs/xfs_dir_leaf.c create mode 100644 fs/xfs/xfs_dir_leaf.h create mode 100644 fs/xfs/xfs_dir_sf.h delete mode 100644 include/Kbuild delete mode 100644 include/acpi/acpi_numa.h delete mode 100644 include/asm-alpha/Kbuild delete mode 100644 include/asm-arm/Kbuild delete mode 100644 include/asm-arm/arch-at91rm9200/at91rm9200_spi.h delete mode 100644 include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h delete mode 100644 include/asm-arm/arch-at91rm9200/at91rm9200_tc.h delete mode 100644 include/asm-arm/arch-at91rm9200/at91rm9200_udp.h create mode 100644 include/asm-arm/arch-at91rm9200/pio.h delete mode 100644 include/asm-arm/arch-lh7a40x/clocks.h delete mode 100644 include/asm-arm/arch-lh7a40x/ssp.h delete mode 100644 include/asm-arm/arch-netx/debug-macro.S delete mode 100644 include/asm-arm/arch-netx/dma.h delete mode 100644 include/asm-arm/arch-netx/entry-macro.S delete mode 100644 include/asm-arm/arch-netx/eth.h delete mode 100644 include/asm-arm/arch-netx/hardware.h delete mode 100644 include/asm-arm/arch-netx/io.h delete mode 100644 include/asm-arm/arch-netx/irqs.h delete mode 100644 include/asm-arm/arch-netx/memory.h delete mode 100644 include/asm-arm/arch-netx/netx-regs.h delete mode 100644 include/asm-arm/arch-netx/param.h delete mode 100644 include/asm-arm/arch-netx/pfifo.h delete mode 100644 include/asm-arm/arch-netx/system.h delete mode 100644 include/asm-arm/arch-netx/timex.h delete mode 100644 include/asm-arm/arch-netx/uncompress.h delete mode 100644 include/asm-arm/arch-netx/vmalloc.h delete mode 100644 include/asm-arm/arch-netx/xc.h delete mode 100644 include/asm-arm/arch-omap/board-fsample.h delete mode 100644 include/asm-arm/arch-omap/gpmc.h delete mode 100644 include/asm-arm/arch-pnx4008/clock.h delete mode 100644 include/asm-arm/arch-pnx4008/debug-macro.S delete mode 100644 include/asm-arm/arch-pnx4008/dma.h delete mode 100644 include/asm-arm/arch-pnx4008/entry-macro.S delete mode 100644 include/asm-arm/arch-pnx4008/gpio.h delete mode 100644 include/asm-arm/arch-pnx4008/hardware.h delete mode 100644 include/asm-arm/arch-pnx4008/io.h delete mode 100644 include/asm-arm/arch-pnx4008/irq.h delete mode 100644 include/asm-arm/arch-pnx4008/irqs.h delete mode 100644 include/asm-arm/arch-pnx4008/memory.h delete mode 100644 include/asm-arm/arch-pnx4008/param.h delete mode 100644 include/asm-arm/arch-pnx4008/platform.h delete mode 100644 include/asm-arm/arch-pnx4008/pm.h delete mode 100644 include/asm-arm/arch-pnx4008/system.h delete mode 100644 include/asm-arm/arch-pnx4008/timex.h delete mode 100644 include/asm-arm/arch-pnx4008/uncompress.h delete mode 100644 include/asm-arm/arch-pnx4008/vmalloc.h delete mode 100644 include/asm-arm/arch-pxa/trizeps4.h delete mode 100644 include/asm-arm/arch-s3c2410/regs-power.h delete mode 100644 include/asm-arm/dyntick.h delete mode 100644 include/asm-arm/hw_irq.h rename include/asm-arm/mach/{serial_at91.h => serial_at91rm9200.h} (71%) delete mode 100644 include/asm-arm/page-nommu.h delete mode 100644 include/asm-arm/pgtable-nommu.h delete mode 100644 include/asm-arm/thread_notify.h delete mode 100644 include/asm-cris/Kbuild delete mode 100644 include/asm-cris/arch-v10/Kbuild delete mode 100644 include/asm-cris/arch-v32/Kbuild delete mode 100644 include/asm-frv/Kbuild delete mode 100644 include/asm-generic/Kbuild delete mode 100644 include/asm-generic/Kbuild.asm delete mode 100644 include/asm-generic/audit_change_attr.h delete mode 100644 include/asm-generic/audit_dir_write.h delete mode 100644 include/asm-generic/audit_read.h delete mode 100644 include/asm-generic/audit_write.h delete mode 100644 include/asm-h8300/Kbuild delete mode 100644 include/asm-i386/Kbuild delete mode 100644 include/asm-i386/dwarf2.h delete mode 100644 include/asm-i386/intel_arch_perfmon.h delete mode 100644 include/asm-i386/irqflags.h delete mode 100644 include/asm-i386/k8.h create mode 100644 include/asm-i386/mach-default/setup_arch_post.h rename include/asm-i386/mach-default/{setup_arch.h => setup_arch_pre.h} (100%) create mode 100644 include/asm-i386/mach-visws/setup_arch_post.h rename include/asm-i386/mach-visws/{setup_arch.h => setup_arch_pre.h} (54%) create mode 100644 include/asm-i386/mach-voyager/setup_arch_post.h rename include/asm-i386/mach-voyager/{setup_arch.h => setup_arch_pre.h} (97%) delete mode 100644 include/asm-i386/mach-xen/asm/irqflags.h delete mode 100644 include/asm-i386/mach-xen/asm/maddr.h delete mode 100644 include/asm-i386/mach-xen/asm/stacktrace.h delete mode 100644 include/asm-i386/mach-xen/asm/timer.h create mode 100644 include/asm-i386/mach-xen/setup_arch_post.h rename include/asm-i386/mach-xen/{setup_arch.h => setup_arch_pre.h} (64%) delete mode 100644 include/asm-i386/mce.h create mode 100644 include/asm-i386/node.h delete mode 100644 include/asm-i386/stacktrace.h delete mode 100644 include/asm-i386/tsc.h delete mode 100644 include/asm-i386/unwind.h delete mode 100644 include/asm-ia64/Kbuild delete mode 100644 include/asm-ia64/fixmap.h delete mode 100644 include/asm-ia64/hypercall.h delete mode 100644 include/asm-ia64/hypervisor.h delete mode 100644 include/asm-ia64/maddr.h delete mode 100644 include/asm-ia64/privop.h delete mode 100644 include/asm-ia64/synch_bitops.h delete mode 100644 include/asm-ia64/xen/privop.h delete mode 100644 include/asm-m32r/Kbuild delete mode 100644 include/asm-m68k/Kbuild delete mode 100644 include/asm-m68knommu/Kbuild delete mode 100644 include/asm-m68knommu/m532xsim.h delete mode 100644 include/asm-mips/Kbuild delete mode 100644 include/asm-mips/apm.h create mode 100644 include/asm-mips/ddb5074.h create mode 100644 include/asm-mips/ddb5xxx/ddb5074.h create mode 100644 include/asm-mips/ddb5xxx/ddb5476.h delete mode 100644 include/asm-mips/emma2rh/emma2rh.h delete mode 100644 include/asm-mips/emma2rh/markeins.h rename include/asm-mips/{irqflags.h => interrupt.h} (80%) create mode 100644 include/asm-mips/mach-ddb5074/mc146818rtc.h create mode 100644 include/asm-mips/mach-dec/param.h delete mode 100644 include/asm-mips/mach-excite/cpu-feature-overrides.h delete mode 100644 include/asm-mips/mach-excite/excite.h delete mode 100644 include/asm-mips/mach-excite/excite_nandflash.h delete mode 100644 include/asm-mips/mach-excite/rm9k_eth.h delete mode 100644 include/asm-mips/mach-excite/rm9k_wdt.h delete mode 100644 include/asm-mips/mach-excite/rm9k_xicap.h create mode 100644 include/asm-mips/mach-generic/param.h create mode 100644 include/asm-mips/mach-jazz/param.h rename include/asm-mips/{mach-emma2rh/irq.h => mach-mips/param.h} (58%) create mode 100644 include/asm-mips/mach-qemu/param.h delete mode 100644 include/asm-mips/mach-wrppmc/mach-gt64120.h delete mode 100644 include/asm-mips/rm9k-ocd.h rename include/asm-mips/sn/{fru.h => sn0/sn0_fru.h} (90%) create mode 100644 include/asm-mips/vr41xx/e55.h delete mode 100644 include/asm-mips/vr41xx/irq.h create mode 100644 include/asm-mips/vr41xx/vrc4173.h create mode 100644 include/asm-mips/vr41xx/workpad.h delete mode 100644 include/asm-parisc/Kbuild delete mode 100644 include/asm-powerpc/Kbuild delete mode 100644 include/asm-powerpc/immap_86xx.h delete mode 100644 include/asm-powerpc/irqflags.h delete mode 100644 include/asm-powerpc/mpc86xx.h delete mode 100644 include/asm-powerpc/spu_priv1.h delete mode 100644 include/asm-powerpc/systbl.h delete mode 100644 include/asm-powerpc/todc.h delete mode 100644 include/asm-powerpc/tsi108.h delete mode 100644 include/asm-powerpc/tsi108_irq.h delete mode 100644 include/asm-s390/Kbuild delete mode 100644 include/asm-s390/irqflags.h delete mode 100644 include/asm-s390/z90crypt.h delete mode 100644 include/asm-sh/Kbuild delete mode 100644 include/asm-sh64/Kbuild delete mode 100644 include/asm-sparc/Kbuild delete mode 100644 include/asm-sparc/of_device.h delete mode 100644 include/asm-sparc/prom.h delete mode 100644 include/asm-sparc64/Kbuild delete mode 100644 include/asm-sparc64/of_device.h delete mode 100644 include/asm-sparc64/prom.h create mode 100644 include/asm-sparc64/vdev.h delete mode 100644 include/asm-v850/Kbuild delete mode 100644 include/asm-x86_64/Kbuild delete mode 100644 include/asm-x86_64/alternative-asm.i delete mode 100644 include/asm-x86_64/alternative.h delete mode 100644 include/asm-x86_64/calgary.h create mode 100644 include/asm-x86_64/gart-mapping.h delete mode 100644 include/asm-x86_64/intel_arch_perfmon.h delete mode 100644 include/asm-x86_64/irqflags.h delete mode 100644 include/asm-x86_64/k8.h delete mode 100644 include/asm-x86_64/mach-xen/asm/irqflags.h delete mode 100644 include/asm-x86_64/mach-xen/asm/maddr.h delete mode 100644 include/asm-x86_64/mach-xen/asm/stacktrace.h delete mode 100644 include/asm-x86_64/stacktrace.h delete mode 100644 include/asm-x86_64/tce.h delete mode 100644 include/asm-x86_64/unwind.h delete mode 100644 include/asm-xtensa/Kbuild delete mode 100644 include/linux/Kbuild delete mode 100644 include/linux/byteorder/Kbuild delete mode 100644 include/linux/clocksource.h delete mode 100644 include/linux/debug_locks.h delete mode 100644 include/linux/delayacct.h create mode 100644 include/linux/devfs_fs.h create mode 100644 include/linux/devfs_fs_kernel.h delete mode 100644 include/linux/dmaengine.h delete mode 100644 include/linux/dvb/Kbuild delete mode 100644 include/linux/elf-em.h delete mode 100644 include/linux/elfnote.h delete mode 100644 include/linux/fscache-cache.h delete mode 100644 include/linux/fscache.h delete mode 100644 include/linux/hdlc/Kbuild delete mode 100644 include/linux/hw_random.h delete mode 100644 include/linux/i2c-ocores.h delete mode 100644 include/linux/irqflags.h delete mode 100644 include/linux/irqreturn.h delete mode 100644 include/linux/isa.h delete mode 100644 include/linux/isdn/Kbuild create mode 100644 include/linux/isdn/tpam.h rename {fs/jffs2 => include/linux}/jffs2_fs_i.h (91%) rename {fs/jffs2 => include/linux}/jffs2_fs_sb.h (90%) delete mode 100644 include/linux/license.h delete mode 100644 include/linux/lockdep.h delete mode 100644 include/linux/m41t00.h delete mode 100644 include/linux/mtd/ndfc.h delete mode 100644 include/linux/netfilter/Kbuild delete mode 100644 include/linux/netfilter/xt_CONNSECMARK.h delete mode 100644 include/linux/netfilter/xt_SECMARK.h delete mode 100644 include/linux/netfilter/xt_quota.h delete mode 100644 include/linux/netfilter/xt_statistic.h delete mode 100644 include/linux/netfilter_arp/Kbuild delete mode 100644 include/linux/netfilter_bridge/Kbuild delete mode 100644 include/linux/netfilter_ipv4/Kbuild delete mode 100644 include/linux/netfilter_ipv4/ip_conntrack_sip.h delete mode 100644 include/linux/netfilter_ipv6/Kbuild delete mode 100644 include/linux/nfsd/Kbuild delete mode 100644 include/linux/nsc_gpio.h delete mode 100644 include/linux/plist.h delete mode 100644 include/linux/poison.h delete mode 100644 include/linux/raid/Kbuild delete mode 100644 include/linux/resume-trace.h delete mode 100644 include/linux/rtc-v3020.h delete mode 100644 include/linux/rtmutex.h delete mode 100644 include/linux/stacktrace.h delete mode 100644 include/linux/sunrpc/Kbuild delete mode 100644 include/linux/taskstats.h delete mode 100644 include/linux/taskstats_kern.h delete mode 100644 include/linux/tc_act/Kbuild delete mode 100644 include/linux/tc_ematch/Kbuild delete mode 100644 include/linux/uaccess.h delete mode 100644 include/linux/unwind.h rename include/linux/{usb/cdc.h => usb_cdc.h} (100%) rename include/linux/{usb/input.h => usb_input.h} (100%) rename include/linux/{usb/isp116x.h => usb_isp116x.h} (100%) rename include/linux/{usb/sl811.h => usb_sl811.h} (71%) delete mode 100644 include/linux/vmstat.h delete mode 100644 include/linux/vserver/cacct.h delete mode 100644 include/linux/xenfb.h delete mode 100644 include/linux/xenkbd.h delete mode 100644 include/media/cx2341x.h delete mode 100644 include/media/pwc-ioctl.h delete mode 100644 include/media/tvp5150.h delete mode 100644 include/media/v4l2-dev.h delete mode 100644 include/mtd/Kbuild delete mode 100644 include/net/netdma.h delete mode 100644 include/net/netevent.h delete mode 100644 include/rdma/Kbuild delete mode 100644 include/rdma/ib_addr.h delete mode 100644 include/rdma/ib_marshall.h delete mode 100644 include/rdma/ib_user_sa.h delete mode 100644 include/rdma/rdma_cm.h delete mode 100644 include/rdma/rdma_cm_ib.h delete mode 100644 include/scsi/Kbuild delete mode 100644 include/scsi/libiscsi.h create mode 100644 include/scsi/scsi_request.h create mode 100644 include/scsi/sg_request.h delete mode 100644 include/sound/Kbuild delete mode 100644 include/video/Kbuild delete mode 100644 include/video/mbxfb.h delete mode 100644 include/xen/hvm.h delete mode 100644 include/xen/interface/arch-ia64.h delete mode 100644 include/xen/interface/domctl.h delete mode 100644 include/xen/interface/elfnote.h delete mode 100644 include/xen/interface/hvm/e820.h delete mode 100644 include/xen/interface/platform.h create mode 100644 include/xen/interface/sched_ctl.h delete mode 100644 include/xen/interface/sysctl.h create mode 100644 init/do_mounts_devfs.c delete mode 100644 kernel/delayacct.c create mode 100644 kernel/intermodule.c delete mode 100644 kernel/irq/chip.c delete mode 100644 kernel/irq/resend.c delete mode 100644 kernel/lockdep.c delete mode 100644 kernel/lockdep_internals.h delete mode 100644 kernel/lockdep_proc.c create mode 100644 kernel/power/smp.c delete mode 100644 kernel/rtmutex-debug.c delete mode 100644 kernel/rtmutex-debug.h delete mode 100644 kernel/rtmutex-tester.c delete mode 100644 kernel/rtmutex.c delete mode 100644 kernel/rtmutex.h delete mode 100644 kernel/rtmutex_common.h delete mode 100644 kernel/rwsem.c delete mode 100644 kernel/stacktrace.c delete mode 100644 kernel/taskstats.c delete mode 100644 kernel/time/Makefile delete mode 100644 kernel/time/clocksource.c delete mode 100644 kernel/time/jiffies.c delete mode 100644 kernel/unwind.c delete mode 100644 lib/audit.c delete mode 100644 lib/debug_locks.c delete mode 100644 lib/list_debug.c delete mode 100644 lib/locking-selftest-hardirq.h delete mode 100644 lib/locking-selftest-mutex.h delete mode 100644 lib/locking-selftest-rlock-hardirq.h delete mode 100644 lib/locking-selftest-rlock-softirq.h delete mode 100644 lib/locking-selftest-rlock.h delete mode 100644 lib/locking-selftest-rsem.h delete mode 100644 lib/locking-selftest-softirq.h delete mode 100644 lib/locking-selftest-spin-hardirq.h delete mode 100644 lib/locking-selftest-spin-softirq.h delete mode 100644 lib/locking-selftest-spin.h delete mode 100644 lib/locking-selftest-wlock-hardirq.h delete mode 100644 lib/locking-selftest-wlock-softirq.h delete mode 100644 lib/locking-selftest-wlock.h delete mode 100644 lib/locking-selftest-wsem.h delete mode 100644 lib/locking-selftest.c delete mode 100644 lib/percpu_counter.c delete mode 100644 lib/plist.c create mode 100644 lib/zlib_inflate/infblock.c create mode 100644 lib/zlib_inflate/infblock.h create mode 100644 lib/zlib_inflate/infcodes.c create mode 100644 lib/zlib_inflate/infcodes.h delete mode 100644 lib/zlib_inflate/inffixed.h delete mode 100644 lib/zlib_inflate/inflate.h create mode 100644 lib/zlib_inflate/inflate_sync.c create mode 100644 lib/zlib_inflate/infutil.c delete mode 100644 mm/vmstat.c delete mode 100644 net/atm/atm_sysfs.c delete mode 100644 net/bridge/br_netlink.c delete mode 100644 net/core/netevent.c delete mode 100644 net/core/user_dma.c delete mode 100644 net/ipv4/netfilter/ip_conntrack_sip.c delete mode 100644 net/ipv4/netfilter/ip_nat_sip.c delete mode 100644 net/ipv4/tcp_lp.c delete mode 100644 net/ipv4/tcp_probe.c delete mode 100644 net/ipv4/tcp_veno.c delete mode 100644 net/ipv4/xfrm4_mode_transport.c delete mode 100644 net/ipv4/xfrm4_mode_tunnel.c delete mode 100644 net/ipv6/xfrm6_mode_transport.c delete mode 100644 net/ipv6/xfrm6_mode_tunnel.c delete mode 100644 net/netfilter/xt_CONNSECMARK.c delete mode 100644 net/netfilter/xt_SECMARK.c delete mode 100644 net/netfilter/xt_quota.c delete mode 100644 net/netfilter/xt_statistic.c delete mode 100644 scripts/Makefile.headersinst create mode 100644 scripts/basic/split-include.c delete mode 100644 scripts/export_report.pl delete mode 100755 scripts/hdrcheck.sh delete mode 100644 scripts/rt-tester/check-all.sh delete mode 100644 scripts/rt-tester/rt-tester.py delete mode 100644 scripts/rt-tester/t2-l1-2rt-sameprio.tst delete mode 100644 scripts/rt-tester/t2-l1-pi.tst delete mode 100644 scripts/rt-tester/t2-l1-signal.tst delete mode 100644 scripts/rt-tester/t2-l2-2rt-deadlock.tst delete mode 100644 scripts/rt-tester/t3-l1-pi-1rt.tst delete mode 100644 scripts/rt-tester/t3-l1-pi-2rt.tst delete mode 100644 scripts/rt-tester/t3-l1-pi-3rt.tst delete mode 100644 scripts/rt-tester/t3-l1-pi-signal.tst delete mode 100644 scripts/rt-tester/t3-l1-pi-steal.tst delete mode 100644 scripts/rt-tester/t3-l2-pi.tst delete mode 100644 scripts/rt-tester/t4-l2-pi-deboost.tst delete mode 100644 scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst delete mode 100644 scripts/rt-tester/t5-l4-pi-boost-deboost.tst delete mode 100644 sound/aoa/Kconfig delete mode 100644 sound/aoa/Makefile delete mode 100644 sound/aoa/aoa-gpio.h delete mode 100644 sound/aoa/aoa.h delete mode 100644 sound/aoa/codecs/Kconfig delete mode 100644 sound/aoa/codecs/Makefile delete mode 100644 sound/aoa/codecs/snd-aoa-codec-onyx.c delete mode 100644 sound/aoa/codecs/snd-aoa-codec-onyx.h delete mode 100644 sound/aoa/codecs/snd-aoa-codec-tas-basstreble.h delete mode 100644 sound/aoa/codecs/snd-aoa-codec-tas-gain-table.h delete mode 100644 sound/aoa/codecs/snd-aoa-codec-tas.c delete mode 100644 sound/aoa/codecs/snd-aoa-codec-tas.h delete mode 100644 sound/aoa/codecs/snd-aoa-codec-toonie.c delete mode 100644 sound/aoa/core/Makefile delete mode 100644 sound/aoa/core/snd-aoa-alsa.c delete mode 100644 sound/aoa/core/snd-aoa-alsa.h delete mode 100644 sound/aoa/core/snd-aoa-core.c delete mode 100644 sound/aoa/core/snd-aoa-gpio-feature.c delete mode 100644 sound/aoa/core/snd-aoa-gpio-pmf.c delete mode 100644 sound/aoa/fabrics/Kconfig delete mode 100644 sound/aoa/fabrics/Makefile delete mode 100644 sound/aoa/fabrics/snd-aoa-fabric-layout.c delete mode 100644 sound/aoa/soundbus/Kconfig delete mode 100644 sound/aoa/soundbus/Makefile delete mode 100644 sound/aoa/soundbus/core.c delete mode 100644 sound/aoa/soundbus/i2sbus/Makefile delete mode 100644 sound/aoa/soundbus/i2sbus/i2sbus-control.c delete mode 100644 sound/aoa/soundbus/i2sbus/i2sbus-core.c delete mode 100644 sound/aoa/soundbus/i2sbus/i2sbus-interface.h delete mode 100644 sound/aoa/soundbus/i2sbus/i2sbus-pcm.c delete mode 100644 sound/aoa/soundbus/i2sbus/i2sbus.h delete mode 100644 sound/aoa/soundbus/soundbus.h delete mode 100644 sound/aoa/soundbus/sysfs.c delete mode 100644 sound/pci/cs5535audio/cs5535audio_pm.c delete mode 100644 sound/pci/echoaudio/Makefile delete mode 100644 sound/pci/echoaudio/darla20.c delete mode 100644 sound/pci/echoaudio/darla20_dsp.c delete mode 100644 sound/pci/echoaudio/darla24.c delete mode 100644 sound/pci/echoaudio/darla24_dsp.c delete mode 100644 sound/pci/echoaudio/echo3g.c delete mode 100644 sound/pci/echoaudio/echo3g_dsp.c delete mode 100644 sound/pci/echoaudio/echoaudio.c delete mode 100644 sound/pci/echoaudio/echoaudio.h delete mode 100644 sound/pci/echoaudio/echoaudio_3g.c delete mode 100644 sound/pci/echoaudio/echoaudio_dsp.c delete mode 100644 sound/pci/echoaudio/echoaudio_dsp.h delete mode 100644 sound/pci/echoaudio/echoaudio_gml.c delete mode 100644 sound/pci/echoaudio/gina20.c delete mode 100644 sound/pci/echoaudio/gina20_dsp.c delete mode 100644 sound/pci/echoaudio/gina24.c delete mode 100644 sound/pci/echoaudio/gina24_dsp.c delete mode 100644 sound/pci/echoaudio/indigo.c delete mode 100644 sound/pci/echoaudio/indigo_dsp.c delete mode 100644 sound/pci/echoaudio/indigodj.c delete mode 100644 sound/pci/echoaudio/indigodj_dsp.c delete mode 100644 sound/pci/echoaudio/indigoio.c delete mode 100644 sound/pci/echoaudio/indigoio_dsp.c delete mode 100644 sound/pci/echoaudio/layla20.c delete mode 100644 sound/pci/echoaudio/layla20_dsp.c delete mode 100644 sound/pci/echoaudio/layla24.c delete mode 100644 sound/pci/echoaudio/layla24_dsp.c delete mode 100644 sound/pci/echoaudio/mia.c delete mode 100644 sound/pci/echoaudio/mia_dsp.c delete mode 100644 sound/pci/echoaudio/midi.c delete mode 100644 sound/pci/echoaudio/mona.c delete mode 100644 sound/pci/echoaudio/mona_dsp.c delete mode 100644 sound/pci/emu10k1/p17v.h delete mode 100644 sound/pci/hda/patch_atihdmi.c create mode 100644 sound/ppc/toonie.c diff --git a/.gitignore b/.gitignore index e1d5c17c1..27fd37621 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,6 @@ *.ko *.so *.mod.c -*.i -*.lst -*.symtypes # # Top-level generic files @@ -33,11 +30,6 @@ include/config include/linux/autoconf.h include/linux/compile.h include/linux/version.h -include/linux/utsrelease.h # stgit generated dirs patches-* - -# quilt's files -patches -series diff --git a/CREDITS b/CREDITS index 0fe904ebb..9bf714a1c 100644 --- a/CREDITS +++ b/CREDITS @@ -24,11 +24,6 @@ S: C. Negri 6, bl. D3 S: Iasi 6600 S: Romania -N: Mark Adler -E: madler@alumni.caltech.edu -W: http://alumnus.caltech.edu/~madler/ -D: zlib decompression - N: Monalisa Agrawal E: magrawal@nortelnetworks.com D: Basic Interphase 5575 driver with UBR and ABR support. @@ -528,11 +523,11 @@ S: Oxford S: United Kingdom N: Luiz Fernando N. Capitulino -E: lcapitulino@mandriva.com.br -E: lcapitulino@gmail.com -W: http://www.cpu.eti.br -D: misc kernel hacking -S: Mandriva +E: lcapitulino@terra.com.br +E: lcapitulino@prefeitura.sp.gov.br +W: http://www.telecentros.sp.gov.br +D: Little fixes and a lot of janitorial work +S: E-GOV Telecentros SP S: Brazil N: Remy Card @@ -1578,8 +1573,12 @@ S: 160 00 Praha 6 S: Czech Republic N: Niels Kristian Bech Jensen -E: nkbj1970@hotmail.com +E: nkbj@image.dk +W: http://www.image.dk/~nkbj D: Miscellaneous kernel updates and fixes. +S: Dr. Holsts Vej 34, lejl. 164 +S: DK-8230 Åbyhøj +S: Denmark N: Michael K. Johnson E: johnsonm@redhat.com @@ -2209,7 +2208,7 @@ S: (address available on request) S: USA N: Ian McDonald -E: ian.mcdonald@jandi.co.nz +E: iam4@cs.waikato.ac.nz E: imcdnzl@gmail.com W: http://wand.net.nz/~iam4 W: http://imcdnzl.blogspot.com @@ -3401,10 +3400,10 @@ S: Czech Republic N: Thibaut Varene E: T-Bone@parisc-linux.org -W: http://www.parisc-linux.org/~varenet/ +W: http://www.parisc-linux.org/ P: 1024D/B7D2F063 E67C 0D43 A75E 12A5 BB1C FA2F 1E32 C3DA B7D2 F063 D: PA-RISC port minion, PDC and GSCPS2 drivers, debuglocks and other bits -D: Some ARM at91rm9200 bits, S1D13XXX FB driver, random patches here and there +D: Some bits in an ARM port, S1D13XXX FB driver, random patches here and there D: AD1889 sound driver S: Paris, France diff --git a/Documentation/ABI/README b/Documentation/ABI/README deleted file mode 100644 index 9feaf16f1..000000000 --- a/Documentation/ABI/README +++ /dev/null @@ -1,77 +0,0 @@ -This directory attempts to document the ABI between the Linux kernel and -userspace, and the relative stability of these interfaces. Due to the -everchanging nature of Linux, and the differing maturity levels, these -interfaces should be used by userspace programs in different ways. - -We have four different levels of ABI stability, as shown by the four -different subdirectories in this location. Interfaces may change levels -of stability according to the rules described below. - -The different levels of stability are: - - stable/ - This directory documents the interfaces that the developer has - defined to be stable. Userspace programs are free to use these - interfaces with no restrictions, and backward compatibility for - them will be guaranteed for at least 2 years. Most interfaces - (like syscalls) are expected to never change and always be - available. - - testing/ - This directory documents interfaces that are felt to be stable, - as the main development of this interface has been completed. - The interface can be changed to add new features, but the - current interface will not break by doing this, unless grave - errors or security problems are found in them. Userspace - programs can start to rely on these interfaces, but they must be - aware of changes that can occur before these interfaces move to - be marked stable. Programs that use these interfaces are - strongly encouraged to add their name to the description of - these interfaces, so that the kernel developers can easily - notify them if any changes occur (see the description of the - layout of the files below for details on how to do this.) - - obsolete/ - This directory documents interfaces that are still remaining in - the kernel, but are marked to be removed at some later point in - time. The description of the interface will document the reason - why it is obsolete and when it can be expected to be removed. - The file Documentation/feature-removal-schedule.txt may describe - some of these interfaces, giving a schedule for when they will - be removed. - - removed/ - This directory contains a list of the old interfaces that have - been removed from the kernel. - -Every file in these directories will contain the following information: - -What: Short description of the interface -Date: Date created -KernelVersion: Kernel version this feature first showed up in. -Contact: Primary contact for this interface (may be a mailing list) -Description: Long description of the interface and how to use it. -Users: All users of this interface who wish to be notified when - it changes. This is very important for interfaces in - the "testing" stage, so that kernel developers can work - with userspace developers to ensure that things do not - break in ways that are unacceptable. It is also - important to get feedback for these interfaces to make - sure they are working in a proper way and do not need to - be changed further. - - -How things move between levels: - -Interfaces in stable may move to obsolete, as long as the proper -notification is given. - -Interfaces may be removed from obsolete and the kernel as long as the -documented amount of time has gone by. - -Interfaces in the testing state can move to the stable state when the -developers feel they are finished. They cannot be removed from the -kernel tree without going through the obsolete state first. - -It's up to the developer to place their interfaces in the category they -wish for it to start out in. diff --git a/Documentation/ABI/obsolete/devfs b/Documentation/ABI/obsolete/devfs deleted file mode 100644 index b8b87399b..000000000 --- a/Documentation/ABI/obsolete/devfs +++ /dev/null @@ -1,13 +0,0 @@ -What: devfs -Date: July 2005 -Contact: Greg Kroah-Hartman -Description: - devfs has been unmaintained for a number of years, has unfixable - races, contains a naming policy within the kernel that is - against the LSB, and can be replaced by using udev. - The files fs/devfs/*, include/linux/devfs_fs*.h will be removed, - along with the the assorted devfs function calls throughout the - kernel tree. - -Users: - diff --git a/Documentation/ABI/stable/syscalls b/Documentation/ABI/stable/syscalls deleted file mode 100644 index c3ae3e7d6..000000000 --- a/Documentation/ABI/stable/syscalls +++ /dev/null @@ -1,10 +0,0 @@ -What: The kernel syscall interface -Description: - This interface matches much of the POSIX interface and is based - on it and other Unix based interfaces. It will only be added to - over time, and not have things removed from it. - - Note that this interface is different for every architecture - that Linux supports. Please see the architecture-specific - documentation for details on the syscall numbers that are to be - mapped to each syscall. diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module deleted file mode 100644 index 75be43118..000000000 --- a/Documentation/ABI/stable/sysfs-module +++ /dev/null @@ -1,30 +0,0 @@ -What: /sys/module -Description: - The /sys/module tree consists of the following structure: - - /sys/module/MODULENAME - The name of the module that is in the kernel. This - module name will show up either if the module is built - directly into the kernel, or if it is loaded as a - dyanmic module. - - /sys/module/MODULENAME/parameters - This directory contains individual files that are each - individual parameters of the module that are able to be - changed at runtime. See the individual module - documentation as to the contents of these parameters and - what they accomplish. - - Note: The individual parameter names and values are not - considered stable, only the fact that they will be - placed in this location within sysfs. See the - individual driver documentation for details as to the - stability of the different parameters. - - /sys/module/MODULENAME/refcnt - If the module is able to be unloaded from the kernel, this file - will contain the current reference count of the module. - - Note: If the module is built into the kernel, or if the - CONFIG_MODULE_UNLOAD kernel configuration value is not enabled, - this file will not be present. diff --git a/Documentation/ABI/testing/sysfs-class b/Documentation/ABI/testing/sysfs-class deleted file mode 100644 index 4b0cb891e..000000000 --- a/Documentation/ABI/testing/sysfs-class +++ /dev/null @@ -1,16 +0,0 @@ -What: /sys/class/ -Date: Febuary 2006 -Contact: Greg Kroah-Hartman -Description: - The /sys/class directory will consist of a group of - subdirectories describing individual classes of devices - in the kernel. The individual directories will consist - of either subdirectories, or symlinks to other - directories. - - All programs that use this directory tree must be able - to handle both subdirectories or symlinks in order to - work properly. - -Users: - udev diff --git a/Documentation/ABI/testing/sysfs-devices b/Documentation/ABI/testing/sysfs-devices deleted file mode 100644 index 6a25671ee..000000000 --- a/Documentation/ABI/testing/sysfs-devices +++ /dev/null @@ -1,25 +0,0 @@ -What: /sys/devices -Date: February 2006 -Contact: Greg Kroah-Hartman -Description: - The /sys/devices tree contains a snapshot of the - internal state of the kernel device tree. Devices will - be added and removed dynamically as the machine runs, - and between different kernel versions, the layout of the - devices within this tree will change. - - Please do not rely on the format of this tree because of - this. If a program wishes to find different things in - the tree, please use the /sys/class structure and rely - on the symlinks there to point to the proper location - within the /sys/devices tree of the individual devices. - Or rely on the uevent messages to notify programs of - devices being added and removed from this tree to find - the location of those devices. - - Note that sometimes not all devices along the directory - chain will have emitted uevent messages, so userspace - programs must be able to handle such occurrences. - -Users: - udev diff --git a/Documentation/Changes b/Documentation/Changes index 488272074..b02f476c2 100644 --- a/Documentation/Changes +++ b/Documentation/Changes @@ -181,8 +181,8 @@ Intel IA32 microcode -------------------- A driver has been added to allow updating of Intel IA32 microcode, -accessible as a normal (misc) character device. If you are not using -udev you may need to: +accessible as both a devfs regular file and as a normal (misc) +character device. If you are not using devfs you may need to: mkdir /dev/cpu mknod /dev/cpu/microcode c 10 184 @@ -201,9 +201,7 @@ with programs using shared memory. udev ---- udev is a userspace application for populating /dev dynamically with -only entries for devices actually present. udev replaces the basic -functionality of devfs, while allowing persistant device naming for -devices. +only entries for devices actually present. udev replaces devfs. FUSE ---- @@ -233,13 +231,18 @@ The PPP driver has been restructured to support multilink and to enable it to operate over diverse media layers. If you use PPP, upgrade pppd to at least 2.4.0. -If you are not using udev, you must have the device file /dev/ppp +If you are not using devfs, you must have the device file /dev/ppp which can be made by: mknod /dev/ppp c 108 0 as root. +If you use devfsd and build ppp support as modules, you will need +the following in your /etc/devfsd.conf file: + +LOOKUP PPP MODLOAD + Isdn4k-utils ------------ diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 6d2412ec9..ce5d2c038 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -155,83 +155,7 @@ problem, which is called the function-growth-hormone-imbalance syndrome. See next chapter. - Chapter 5: Typedefs - -Please don't use things like "vps_t". - -It's a _mistake_ to use typedef for structures and pointers. When you see a - - vps_t a; - -in the source, what does it mean? - -In contrast, if it says - - struct virtual_container *a; - -you can actually tell what "a" is. - -Lots of people think that typedefs "help readability". Not so. They are -useful only for: - - (a) totally opaque objects (where the typedef is actively used to _hide_ - what the object is). - - Example: "pte_t" etc. opaque objects that you can only access using - the proper accessor functions. - - NOTE! Opaqueness and "accessor functions" are not good in themselves. - The reason we have them for things like pte_t etc. is that there - really is absolutely _zero_ portably accessible information there. - - (b) Clear integer types, where the abstraction _helps_ avoid confusion - whether it is "int" or "long". - - u8/u16/u32 are perfectly fine typedefs, although they fit into - category (d) better than here. - - NOTE! Again - there needs to be a _reason_ for this. If something is - "unsigned long", then there's no reason to do - - typedef unsigned long myflags_t; - - but if there is a clear reason for why it under certain circumstances - might be an "unsigned int" and under other configurations might be - "unsigned long", then by all means go ahead and use a typedef. - - (c) when you use sparse to literally create a _new_ type for - type-checking. - - (d) New types which are identical to standard C99 types, in certain - exceptional circumstances. - - Although it would only take a short amount of time for the eyes and - brain to become accustomed to the standard types like 'uint32_t', - some people object to their use anyway. - - Therefore, the Linux-specific 'u8/u16/u32/u64' types and their - signed equivalents which are identical to standard types are - permitted -- although they are not mandatory in new code of your - own. - - When editing existing code which already uses one or the other set - of types, you should conform to the existing choices in that code. - - (e) Types safe for use in userspace. - - In certain structures which are visible to userspace, we cannot - require C99 types and cannot use the 'u32' form above. Thus, we - use __u32 and similar types in all structures which are shared - with userspace. - -Maybe there are other cases too, but the rule should basically be to NEVER -EVER use a typedef unless you can clearly match one of those rules. - -In general, a pointer, or a struct that has elements that can reasonably -be directly accessed should _never_ be a typedef. - - - Chapter 6: Functions + Chapter 5: Functions Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, @@ -259,7 +183,7 @@ and it gets confused. You know you're brilliant, but maybe you'd like to understand what you did 2 weeks from now. - Chapter 7: Centralized exiting of functions + Chapter 6: Centralized exiting of functions Albeit deprecated by some people, the equivalent of the goto statement is used frequently by compilers in form of the unconditional jump instruction. @@ -296,7 +220,7 @@ out: return result; } - Chapter 8: Commenting + Chapter 7: Commenting Comments are good, but there is also a danger of over-commenting. NEVER try to explain HOW your code works in a comment: it's much better to @@ -316,7 +240,7 @@ When commenting the kernel API functions, please use the kerneldoc format. See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc for details. - Chapter 9: You've made a mess of it + Chapter 8: You've made a mess of it That's OK, we all do. You've probably been told by your long-time Unix user helper that "GNU emacs" automatically formats the C sources for @@ -364,7 +288,7 @@ re-formatting you may want to take a look at the man page. But remember: "indent" is not a fix for bad programming. - Chapter 10: Configuration-files + Chapter 9: Configuration-files For configuration options (arch/xxx/Kconfig, and all the Kconfig files), somewhat different indentation is used. @@ -389,7 +313,7 @@ support for file-systems, for instance) should be denoted (DANGEROUS), other experimental options should be denoted (EXPERIMENTAL). - Chapter 11: Data structures + Chapter 10: Data structures Data structures that have visibility outside the single-threaded environment they are created and destroyed in should always have @@ -420,7 +344,7 @@ Remember: if another thread can find your data structure, and you don't have a reference count on it, you almost certainly have a bug. - Chapter 12: Macros, Enums and RTL + Chapter 11: Macros, Enums and RTL Names of macros defining constants and labels in enums are capitalized. @@ -475,7 +399,7 @@ The cpp manual deals with macros exhaustively. The gcc internals manual also covers RTL which is used frequently with assembly language in the kernel. - Chapter 13: Printing kernel messages + Chapter 12: Printing kernel messages Kernel developers like to be seen as literate. Do mind the spelling of kernel messages to make a good impression. Do not use crippled @@ -486,7 +410,7 @@ Kernel messages do not have to be terminated with a period. Printing numbers in parentheses (%d) adds no value and should be avoided. - Chapter 14: Allocating memory + Chapter 13: Allocating memory The kernel provides the following general purpose memory allocators: kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API @@ -505,7 +429,7 @@ from void pointer to any other pointer type is guaranteed by the C programming language. - Chapter 15: The inline disease + Chapter 14: The inline disease There appears to be a common misperception that gcc has a magic "make me faster" speedup option called "inline". While the use of inlines can be @@ -533,7 +457,7 @@ something it would have done anyway. - Appendix I: References + Chapter 15: References The C Programming Language, Second Edition by Brian W. Kernighan and Dennis M. Ritchie. @@ -557,4 +481,4 @@ Kernel CodingStyle, by greg@kroah.com at OLS 2002: http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ -- -Last updated on 30 April 2006. +Last updated on 30 December 2005 by a community effort on LKML. diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index 63392c913..7c7176990 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt @@ -698,12 +698,12 @@ these interfaces. Remember that, as defined, consistent mappings are always going to be SAC addressable. The first thing your driver needs to do is query the PCI platform -layer if it is capable of handling your devices DAC addressing -capabilities: +layer with your devices DAC addressing capabilities: - int pci_dac_dma_supported(struct pci_dev *hwdev, u64 mask); + int pci_dac_set_dma_mask(struct pci_dev *pdev, u64 mask); -You may not use the following interfaces if this routine fails. +This routine behaves identically to pci_set_dma_mask. You may not +use the following interfaces if this routine fails. Next, DMA addresses using this API are kept track of using the dma64_addr_t type. It is guaranteed to be big enough to hold any diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 66e1cf733..5a2882d27 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -10,8 +10,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ procfs-guide.xml writing_usb_driver.xml \ kernel-api.xml journal-api.xml lsm.xml usb.xml \ - gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ - genericirq.xml + gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml ### # The build process is as follows (targets): diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl deleted file mode 100644 index 0f4a4b632..000000000 --- a/Documentation/DocBook/genericirq.tmpl +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - Linux generic IRQ handling - - - - Thomas - Gleixner - -
- tglx@linutronix.de -
-
-
- - Ingo - Molnar - -
- mingo@elte.hu -
-
-
-
- - - 2005-2006 - Thomas Gleixner - - - 2005-2006 - Ingo Molnar - - - - - This documentation is free software; you can redistribute - it and/or modify it under the terms of the GNU General Public - License version 2 as published by the Free Software Foundation. - - - - This 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 - - - - For more details see the file COPYING in the source - distribution of Linux. - - -
- - - - - Introduction - - The generic interrupt handling layer is designed to provide a - complete abstraction of interrupt handling for device drivers. - It is able to handle all the different types of interrupt controller - hardware. Device drivers use generic API functions to request, enable, - disable and free interrupts. The drivers do not have to know anything - about interrupt hardware details, so they can be used on different - platforms without code changes. - - - This documentation is provided to developers who want to implement - an interrupt subsystem based for their architecture, with the help - of the generic IRQ handling layer. - - - - - Rationale - - The original implementation of interrupt handling in Linux is using - the __do_IRQ() super-handler, which is able to deal with every - type of interrupt logic. - - - Originally, Russell King identified different types of handlers to - build a quite universal set for the ARM interrupt handler - implementation in Linux 2.5/2.6. He distinguished between: - - Level type - Edge type - Simple type - - In the SMP world of the __do_IRQ() super-handler another type - was identified: - - Per CPU type - - - - This split implementation of highlevel IRQ handlers allows us to - optimize the flow of the interrupt handling for each specific - interrupt type. This reduces complexity in that particular codepath - and allows the optimized handling of a given type. - - - The original general IRQ implementation used hw_interrupt_type - structures and their ->ack(), ->end() [etc.] callbacks to - differentiate the flow control in the super-handler. This leads to - a mix of flow logic and lowlevel hardware logic, and it also leads - to unnecessary code duplication: for example in i386, there is a - ioapic_level_irq and a ioapic_edge_irq irq-type which share many - of the lowlevel details but have different flow handling. - - - A more natural abstraction is the clean separation of the - 'irq flow' and the 'chip details'. - - - Analysing a couple of architecture's IRQ subsystem implementations - reveals that most of them can use a generic set of 'irq flow' - methods and only need to add the chip level specific code. - The separation is also valuable for (sub)architectures - which need specific quirks in the irq flow itself but not in the - chip-details - and thus provides a more transparent IRQ subsystem - design. - - - Each interrupt descriptor is assigned its own highlevel flow - handler, which is normally one of the generic - implementations. (This highlevel flow handler implementation also - makes it simple to provide demultiplexing handlers which can be - found in embedded platforms on various architectures.) - - - The separation makes the generic interrupt handling layer more - flexible and extensible. For example, an (sub)architecture can - use a generic irq-flow implementation for 'level type' interrupts - and add a (sub)architecture specific 'edge type' implementation. - - - To make the transition to the new model easier and prevent the - breakage of existing implementations, the __do_IRQ() super-handler - is still available. This leads to a kind of duality for the time - being. Over time the new model should be used in more and more - architectures, as it enables smaller and cleaner IRQ subsystems. - - - - Known Bugs And Assumptions - - None (knock on wood). - - - - - Abstraction layers - - There are three main levels of abstraction in the interrupt code: - - Highlevel driver API - Highlevel IRQ flow handlers - Chiplevel hardware encapsulation - - - - Interrupt control flow - - Each interrupt is described by an interrupt descriptor structure - irq_desc. The interrupt is referenced by an 'unsigned int' numeric - value which selects the corresponding interrupt decription structure - in the descriptor structures array. - The descriptor structure contains status information and pointers - to the interrupt flow method and the interrupt chip structure - which are assigned to this interrupt. - - - Whenever an interrupt triggers, the lowlevel arch code calls into - the generic interrupt code by calling desc->handle_irq(). - This highlevel IRQ handling function only uses desc->chip primitives - referenced by the assigned chip descriptor structure. - - - - Highlevel Driver API - - The highlevel Driver API consists of following functions: - - request_irq() - free_irq() - disable_irq() - enable_irq() - disable_irq_nosync() (SMP only) - synchronize_irq() (SMP only) - set_irq_type() - set_irq_wake() - set_irq_data() - set_irq_chip() - set_irq_chip_data() - - See the autogenerated function documentation for details. - - - - Highlevel IRQ flow handlers - - The generic layer provides a set of pre-defined irq-flow methods: - - handle_level_irq - handle_edge_irq - handle_simple_irq - handle_percpu_irq - - The interrupt flow handlers (either predefined or architecture - specific) are assigned to specific interrupts by the architecture - either during bootup or during device initialization. - - - Default flow implementations - - Helper functions - - The helper functions call the chip primitives and - are used by the default flow implementations. - The following helper functions are implemented (simplified excerpt): - -default_enable(irq) -{ - desc->chip->unmask(irq); -} - -default_disable(irq) -{ - if (!delay_disable(irq)) - desc->chip->mask(irq); -} - -default_ack(irq) -{ - chip->ack(irq); -} - -default_mask_ack(irq) -{ - if (chip->mask_ack) { - chip->mask_ack(irq); - } else { - chip->mask(irq); - chip->ack(irq); - } -} - -noop(irq) -{ -} - - - - - - - Default flow handler implementations - - Default Level IRQ flow handler - - handle_level_irq provides a generic implementation - for level-triggered interrupts. - - - The following control flow is implemented (simplified excerpt): - -desc->chip->start(); -handle_IRQ_event(desc->action); -desc->chip->end(); - - - - - Default Edge IRQ flow handler - - handle_edge_irq provides a generic implementation - for edge-triggered interrupts. - - - The following control flow is implemented (simplified excerpt): - -if (desc->status & running) { - desc->chip->hold(); - desc->status |= pending | masked; - return; -} -desc->chip->start(); -desc->status |= running; -do { - if (desc->status & masked) - desc->chip->enable(); - desc-status &= ~pending; - handle_IRQ_event(desc->action); -} while (status & pending); -desc-status &= ~running; -desc->chip->end(); - - - - - Default simple IRQ flow handler - - handle_simple_irq provides a generic implementation - for simple interrupts. - - - Note: The simple flow handler does not call any - handler/chip primitives. - - - The following control flow is implemented (simplified excerpt): - -handle_IRQ_event(desc->action); - - - - - Default per CPU flow handler - - handle_percpu_irq provides a generic implementation - for per CPU interrupts. - - - Per CPU interrupts are only available on SMP and - the handler provides a simplified version without - locking. - - - The following control flow is implemented (simplified excerpt): - -desc->chip->start(); -handle_IRQ_event(desc->action); -desc->chip->end(); - - - - - - Quirks and optimizations - - The generic functions are intended for 'clean' architectures and chips, - which have no platform-specific IRQ handling quirks. If an architecture - needs to implement quirks on the 'flow' level then it can do so by - overriding the highlevel irq-flow handler. - - - - Delayed interrupt disable - - This per interrupt selectable feature, which was introduced by Russell - King in the ARM interrupt implementation, does not mask an interrupt - at the hardware level when disable_irq() is called. The interrupt is - kept enabled and is masked in the flow handler when an interrupt event - happens. This prevents losing edge interrupts on hardware which does - not store an edge interrupt event while the interrupt is disabled at - the hardware level. When an interrupt arrives while the IRQ_DISABLED - flag is set, then the interrupt is masked at the hardware level and - the IRQ_PENDING bit is set. When the interrupt is re-enabled by - enable_irq() the pending bit is checked and if it is set, the - interrupt is resent either via hardware or by a software resend - mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when - you want to use the delayed interrupt disable feature and your - hardware is not capable of retriggering an interrupt.) - The delayed interrupt disable can be runtime enabled, per interrupt, - by setting the IRQ_DELAYED_DISABLE flag in the irq_desc status field. - - - - - Chiplevel hardware encapsulation - - The chip level hardware descriptor structure irq_chip - contains all the direct chip relevant functions, which - can be utilized by the irq flow implementations. - - ack() - mask_ack() - Optional, recommended for performance - mask() - unmask() - retrigger() - Optional - set_type() - Optional - set_wake() - Optional - - These primitives are strictly intended to mean what they say: ack means - ACK, masking means masking of an IRQ line, etc. It is up to the flow - handler(s) to use these basic units of lowlevel functionality. - - - - - - __do_IRQ entry point - - The original implementation __do_IRQ() is an alternative entry - point for all types of interrupts. - - - This handler turned out to be not suitable for all - interrupt hardware and was therefore reimplemented with split - functionality for egde/level/simple/percpu interrupts. This is not - only a functional optimization. It also shortens code paths for - interrupts. - - - To make use of the split implementation, replace the call to - __do_IRQ by a call to desc->chip->handle_irq() and associate - the appropriate handler function to desc->chip->handle_irq(). - In most cases the generic handler implementations should - be sufficient. - - - - - Locking on SMP - - The locking of chip registers is up to the architecture that - defines the chip primitives. There is a chip->lock field that can be used - for serialization, but the generic layer does not touch it. The per-irq - structure is protected via desc->lock, by the generic layer. - - - - Structures - - This chapter contains the autogenerated documentation of the structures which are - used in the generic IRQ layer. - -!Iinclude/linux/irq.h - - - - Public Functions Provided - - This chapter contains the autogenerated documentation of the kernel API functions - which are exported. - -!Ekernel/irq/manage.c -!Ekernel/irq/chip.c - - - - Internal Functions Provided - - This chapter contains the autogenerated documentation of the internal functions. - -!Ikernel/irq/handle.c -!Ikernel/irq/chip.c - - - - Credits - - The following people have contributed to this document: - - Thomas Gleixnertglx@linutronix.de - Ingo Molnarmingo@elte.hu - - - -
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index f8fe882e3..ca02e04a9 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -58,15 +58,10 @@ !Iinclude/linux/ktime.h !Iinclude/linux/hrtimer.h !Ekernel/hrtimer.c - - Workqueues and Kevents -!Ekernel/workqueue.c Internal Functions !Ikernel/exit.c !Ikernel/signal.c -!Iinclude/linux/kthread.h -!Ekernel/kthread.c Kernel objects manipulation @@ -119,33 +114,9 @@ X!Ilib/string.c - - Basic Kernel Library Functions - - - The Linux kernel provides more basic utility functions. - - - Bitmap Operations -!Elib/bitmap.c -!Ilib/bitmap.c - - - Command-line Parsing -!Elib/cmdline.c - - - CRC Functions -!Elib/crc16.c -!Elib/crc32.c -!Elib/crc-ccitt.c - - - Memory Management in Linux The Slab Cache -!Iinclude/linux/slab.h !Emm/slab.c User Space Memory Access @@ -303,19 +274,20 @@ X!Ekernel/module.c Resources Management -!Ikernel/resource.c +!Ekernel/resource.c MTRR Handling !Earch/i386/kernel/cpu/mtrr/main.c - PCI Support Library !Edrivers/pci/pci.c !Edrivers/pci/pci-driver.c !Edrivers/pci/remove.c !Edrivers/pci/pci-acpi.c -!Edrivers/pci/search.c + !Edrivers/pci/msi.c !Edrivers/pci/bus.c error_handler() is a driver's hook into probe, hotplug, and recovery -and other exceptional conditions. The primary responsibility of an -implementation is to call ata_do_eh() or ata_bmdma_drive_eh() with a set -of EH hooks as arguments: - - - -'prereset' hook (may be NULL) is called during an EH reset, before any other actions -are taken. - - - -'postreset' hook (may be NULL) is called after the EH reset is performed. Based on -existing conditions, severity of the problem, and hardware capabilities, - - - -Either 'softreset' (may be NULL) or 'hardreset' (may be NULL) will be -called to perform the low-level EH reset. - - - -void (*post_internal_cmd) (struct ata_queued_cmd *qc); -Perform any hardware-specific actions necessary to finish processing -after executing a probe-time or EH-time command via ata_exec_internal(). +This is a high level error handling function, called from the +error handling thread, when a command times out. Most newer +hardware will implement its own error handling code here. IDE BMDMA +drivers may use the helper function ata_eng_timeout(). diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index a8c8cce50..6e463d0db 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl @@ -109,7 +109,7 @@ for most of the implementations. These functions can be replaced by the board driver if neccecary. Those functions are called via pointers in the NAND chip description structure. The board driver can set the functions which - should be replaced by board dependent functions before calling nand_scan(). + should be replaced by board dependend functions before calling nand_scan(). If the function pointer is NULL on entry to nand_scan() then the pointer is set to the default function which is suitable for the detected chip type. @@ -133,7 +133,7 @@ [REPLACEABLE] Replaceable members hold hardware related functions which can be provided by the board driver. The board driver can set the functions which - should be replaced by board dependent functions before calling nand_scan(). + should be replaced by board dependend functions before calling nand_scan(). If the function pointer is NULL on entry to nand_scan() then the pointer is set to the default function which is suitable for the detected chip type. @@ -156,8 +156,9 @@ Basic board driver For most boards it will be sufficient to provide just the - basic functions and fill out some really board dependent + basic functions and fill out some really board dependend members in the nand chip description structure. + See drivers/mtd/nand/skeleton for reference. Basic defines @@ -188,9 +189,9 @@ static unsigned long baseaddr; Partition defines - If you want to divide your device into partitions, then - enable the configuration switch CONFIG_MTD_PARTITIONS and define - a partitioning scheme suitable to your board. + If you want to divide your device into parititions, then + enable the configuration switch CONFIG_MTD_PARITIONS and define + a paritioning scheme suitable to your board. #define NUM_PARTITIONS 2 @@ -1294,9 +1295,7 @@ in this page !Idrivers/mtd/nand/nand_base.c !Idrivers/mtd/nand/nand_bbt.c - +!Idrivers/mtd/nand/nand_ecc.c diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl index b629da339..fdff984a5 100644 --- a/Documentation/DocBook/videobook.tmpl +++ b/Documentation/DocBook/videobook.tmpl @@ -976,7 +976,7 @@ static int camera_close(struct video_device *dev) Interrupt Handling Our example handler is for an ISA bus device. If it was PCI you would be - able to share the interrupt and would have set IRQF_SHARED to indicate a + able to share the interrupt and would have set SA_SHIRQ to indicate a shared IRQ. We pass the device pointer as the interrupt routine argument. We don't need to since we only support one card but doing this will make it easier to upgrade the driver for multiple devices in the future. diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index 0256805b5..bf1cf98d2 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt @@ -10,7 +10,7 @@ standard for controlling intelligent devices that monitor a system. It provides for dynamic discovery of sensors in the system and the ability to monitor the sensors and be informed when the sensor's values change or go outside certain boundaries. It also has a -standardized database for field-replaceable units (FRUs) and a watchdog +standardized database for field-replacable units (FRUs) and a watchdog timer. To use this, you need an interface to an IPMI controller in your @@ -64,7 +64,7 @@ situation, you need to read the section below named 'The SI Driver' or IPMI defines a standard watchdog timer. You can enable this with the 'IPMI Watchdog Timer' config option. If you compile the driver into the kernel, then via a kernel command-line option you can have the -watchdog timer start as soon as it initializes. It also have a lot +watchdog timer start as soon as it intitializes. It also have a lot of other options, see the 'Watchdog' section below for more details. Note that you can also have the watchdog continue to run if it is closed (by default it is disabled on close). Go into the 'Watchdog diff --git a/Documentation/IRQ.txt b/Documentation/IRQ.txt deleted file mode 100644 index 1011e7175..000000000 --- a/Documentation/IRQ.txt +++ /dev/null @@ -1,22 +0,0 @@ -What is an IRQ? - -An IRQ is an interrupt request from a device. -Currently they can come in over a pin, or over a packet. -Several devices may be connected to the same pin thus -sharing an IRQ. - -An IRQ number is a kernel identifier used to talk about a hardware -interrupt source. Typically this is an index into the global irq_desc -array, but except for what linux/interrupt.h implements the details -are architecture specific. - -An IRQ number is an enumeration of the possible interrupt sources on a -machine. Typically what is enumerated is the number of input pins on -all of the interrupt controller in the system. In the case of ISA -what is enumerated are the 16 input pins on the two i8259 interrupt -controllers. - -Architectures can assign additional meaning to the IRQ numbers, and -are encouraged to in the case where there is any manual configuration -of the hardware involved. The ISA IRQs are a classic example of -assigning this kind of additional meaning. diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 1d50cf0c9..49e27cc19 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt @@ -144,47 +144,9 @@ over a rather long period of time, but improvements are always welcome! whether the increased speed is worth it. 8. Although synchronize_rcu() is a bit slower than is call_rcu(), - it usually results in simpler code. So, unless update - performance is critically important or the updaters cannot block, - synchronize_rcu() should be used in preference to call_rcu(). - - An especially important property of the synchronize_rcu() - primitive is that it automatically self-limits: if grace periods - are delayed for whatever reason, then the synchronize_rcu() - primitive will correspondingly delay updates. In contrast, - code using call_rcu() should explicitly limit update rate in - cases where grace periods are delayed, as failing to do so can - result in excessive realtime latencies or even OOM conditions. - - Ways of gaining this self-limiting property when using call_rcu() - include: - - a. Keeping a count of the number of data-structure elements - used by the RCU-protected data structure, including those - waiting for a grace period to elapse. Enforce a limit - on this number, stalling updates as needed to allow - previously deferred frees to complete. - - Alternatively, limit only the number awaiting deferred - free rather than the total number of elements. - - b. Limiting update rate. For example, if updates occur only - once per hour, then no explicit rate limiting is required, - unless your system is already badly broken. The dcache - subsystem takes this approach -- updates are guarded - by a global lock, limiting their rate. - - c. Trusted update -- if updates can only be done manually by - superuser or some other trusted user, then it might not - be necessary to automatically limit them. The theory - here is that superuser already has lots of ways to crash - the machine. - - d. Use call_rcu_bh() rather than call_rcu(), in order to take - advantage of call_rcu_bh()'s faster grace periods. - - e. Periodically invoke synchronize_rcu(), permitting a limited - number of updates per grace period. + it usually results in simpler code. So, unless update performance + is important or the updaters cannot block, synchronize_rcu() + should be used in preference to call_rcu(). 9. All RCU list-traversal primitives, which include list_for_each_rcu(), list_for_each_entry_rcu(), diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt index a49485916..e4c38152f 100644 --- a/Documentation/RCU/torture.txt +++ b/Documentation/RCU/torture.txt @@ -7,7 +7,7 @@ The CONFIG_RCU_TORTURE_TEST config option is available for all RCU implementations. It creates an rcutorture kernel module that can be loaded to run a torture test. The test periodically outputs status messages via printk(), which can be examined via the dmesg -command (perhaps grepping for "torture"). The test is started +command (perhaps grepping for "rcutorture"). The test is started when the module is loaded, and stops when the module is unloaded. However, actually setting this config option to "y" results in the system @@ -35,19 +35,6 @@ stat_interval The number of seconds between output of torture be printed -only- when the module is unloaded, and this is the default. -shuffle_interval - The number of seconds to keep the test threads affinitied - to a particular subset of the CPUs. Used in conjunction - with test_no_idle_hz. - -test_no_idle_hz Whether or not to test the ability of RCU to operate in - a kernel that disables the scheduling-clock interrupt to - idle CPUs. Boolean parameter, "1" to test, "0" otherwise. - -torture_type The type of RCU to test: "rcu" for the rcu_read_lock() - API, "rcu_bh" for the rcu_read_lock_bh() API, and "srcu" - for the "srcu_read_lock()" API. - verbose Enable debug printk()s. Default is disabled. @@ -55,14 +42,14 @@ OUTPUT The statistics output is as follows: - rcu-torture: --- Start of test: nreaders=16 stat_interval=0 verbose=0 - rcu-torture: rtc: 0000000000000000 ver: 1916 tfle: 0 rta: 1916 rtaf: 0 rtf: 1915 - rcu-torture: Reader Pipe: 1466408 9747 0 0 0 0 0 0 0 0 0 - rcu-torture: Reader Batch: 1464477 11678 0 0 0 0 0 0 0 0 - rcu-torture: Free-Block Circulation: 1915 1915 1915 1915 1915 1915 1915 1915 1915 1915 0 - rcu-torture: --- End of test + rcutorture: --- Start of test: nreaders=16 stat_interval=0 verbose=0 + rcutorture: rtc: 0000000000000000 ver: 1916 tfle: 0 rta: 1916 rtaf: 0 rtf: 1915 + rcutorture: Reader Pipe: 1466408 9747 0 0 0 0 0 0 0 0 0 + rcutorture: Reader Batch: 1464477 11678 0 0 0 0 0 0 0 0 + rcutorture: Free-Block Circulation: 1915 1915 1915 1915 1915 1915 1915 1915 1915 1915 0 + rcutorture: --- End of test -The command "dmesg | grep torture:" will extract this information on +The command "dmesg | grep rcutorture:" will extract this information on most systems. On more esoteric configurations, it may be necessary to use other commands to access the output of the printk()s used by the RCU torture test. The printk()s use KERN_ALERT, so they should @@ -128,9 +115,8 @@ The following script may be used to torture RCU: modprobe rcutorture sleep 100 rmmod rcutorture - dmesg | grep torture: + dmesg | grep rcutorture: The output can be manually inspected for the error flag of "!!!". One could of course create a more elaborate script that automatically -checked for such errors. The "rmmod" command forces a "SUCCESS" or -"FAILURE" indication to be printk()ed. +checked for such errors. diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 318df4425..07cb93b82 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt @@ -184,17 +184,7 @@ synchronize_rcu() blocking, it registers a function and argument which are invoked after all ongoing RCU read-side critical sections have completed. This callback variant is particularly useful in situations where - it is illegal to block or where update-side performance is - critically important. - - However, the call_rcu() API should not be used lightly, as use - of the synchronize_rcu() API generally results in simpler code. - In addition, the synchronize_rcu() API has the nice property - of automatically limiting update rate should grace periods - be delayed. This property results in system resilience in face - of denial-of-service attacks. Code using call_rcu() should limit - update rate in order to gain this same sort of resilience. See - checklist.txt for some approaches to limiting the update rate. + it is illegal to block. rcu_assign_pointer() @@ -687,9 +677,8 @@ diff shows how closely related RCU and reader-writer locking can be. + spin_lock(&listmutex); list_for_each_entry(p, head, lp) { if (p->key == key) { - - list_del(&p->list); + list_del(&p->list); - write_unlock(&listmutex); - + list_del_rcu(&p->list); + spin_unlock(&listmutex); + synchronize_rcu(); kfree(p); @@ -737,7 +726,7 @@ Or, for those who prefer a side-by-side listing: 5 write_lock(&listmutex); 5 spin_lock(&listmutex); 6 list_for_each_entry(p, head, lp) { 6 list_for_each_entry(p, head, lp) { 7 if (p->key == key) { 7 if (p->key == key) { - 8 list_del(&p->list); 8 list_del_rcu(&p->list); + 8 list_del(&p->list); 8 list_del(&p->list); 9 write_unlock(&listmutex); 9 spin_unlock(&listmutex); 10 synchronize_rcu(); 10 kfree(p); 11 kfree(p); @@ -801,6 +790,7 @@ RCU pointer update: RCU grace period: + synchronize_kernel (deprecated) synchronize_net synchronize_sched synchronize_rcu diff --git a/Documentation/README.DAC960 b/Documentation/README.DAC960 index 0e8f618ab..98ea617a0 100644 --- a/Documentation/README.DAC960 +++ b/Documentation/README.DAC960 @@ -78,9 +78,9 @@ also known as "System Drives", and Drive Groups are also called "Packs". Both terms are in use in the Mylex documentation; I have chosen to standardize on the more generic "Logical Drive" and "Drive Group". -DAC960 RAID disk devices are named in the style of the obsolete Device File -System (DEVFS). The device corresponding to Logical Drive D on Controller C -is referred to as /dev/rd/cCdD, and the partitions are called /dev/rd/cCdDp1 +DAC960 RAID disk devices are named in the style of the Device File System +(DEVFS). The device corresponding to Logical Drive D on Controller C is +referred to as /dev/rd/cCdD, and the partitions are called /dev/rd/cCdDp1 through /dev/rd/cCdDp7. For example, partition 3 of Logical Drive 5 on Controller 2 is referred to as /dev/rd/c2d5p3. Note that unlike with SCSI disks the device names will not change in the event of a disk drive failure. diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist deleted file mode 100644 index a10bfb6ec..000000000 --- a/Documentation/SubmitChecklist +++ /dev/null @@ -1,63 +0,0 @@ -Linux Kernel patch sumbittal checklist -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here are some basic things that developers should do if they want to see their -kernel patch submissions accepted more quickly. - -These are all above and beyond the documentation that is provided in -Documentation/SubmittingPatches and elsewhere regarding submitting Linux -kernel patches. - - - -1: Builds cleanly with applicable or modified CONFIG options =y, =m, and - =n. No gcc warnings/errors, no linker warnings/errors. - -2: Passes allnoconfig, allmodconfig - -3: Builds on multiple CPU architectures by using local cross-compile tools - or something like PLM at OSDL. - -4: ppc64 is a good architecture for cross-compilation checking because it - tends to use `unsigned long' for 64-bit quantities. - -5: Matches kernel coding style(!) - -6: Any new or modified CONFIG options don't muck up the config menu. - -7: All new Kconfig options have help text. - -8: Has been carefully reviewed with respect to relevant Kconfig - combinations. This is very hard to get right with testing -- brainpower - pays off here. - -9: Check cleanly with sparse. - -10: Use 'make checkstack' and 'make namespacecheck' and fix any problems - that they find. Note: checkstack does not point out problems explicitly, - but any one function that uses more than 512 bytes on the stack is a - candidate for change. - -11: Include kernel-doc to document global kernel APIs. (Not required for - static functions, but OK there also.) Use 'make htmldocs' or 'make - mandocs' to check the kernel-doc and fix any issues. - -12: Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, - CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, - CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously - enabled. - -13: Has been build- and runtime tested with and without CONFIG_SMP and - CONFIG_PREEMPT. - -14: If the patch affects IO/Disk, etc: has been tested with and without - CONFIG_LBD. - -15: All codepaths have been exercised with all lockdep features enabled. - -16: All new /proc entries are documented under Documentation/ - -17: All new kernel boot parameters are documented in - Documentation/kernel-parameters.txt. - -18: All new module parameters are documented with MODULE_PARM_DESC() diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index d42ab4c9e..c2c85bcb3 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -10,9 +10,7 @@ kernel, the process can sometimes be daunting if you're not familiar with "the system." This text is a collection of suggestions which can greatly increase the chances of your change being accepted. -Read Documentation/SubmitChecklist for a list of items to check -before submitting code. If you are submitting a driver, also read -Documentation/SubmittingDrivers. +If you are submitting a driver, also read Documentation/SubmittingDrivers. @@ -76,6 +74,9 @@ There are a number of scripts which can aid in this: Quilt: http://savannah.nongnu.org/projects/quilt +Randy Dunlap's patch scripts: +http://www.xenotime.net/linux/scripts/patching-scripts-002.tar.gz + Andrew Morton's patch scripts: http://www.zip.com.au/~akpm/linux/patches/ Instead of these scripts, quilt is the recommended patch management @@ -308,8 +309,6 @@ then you just add a line saying Signed-off-by: Random J Developer -using your real name (sorry, no pseudonyms or anonymous contributions.) - Some people also put extra tags at the end. They'll just be ignored for now, but you can do this to mark internal company procedures or just point out some special detail about the sign-off. @@ -485,7 +484,7 @@ Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer". -NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people! +NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!. Kernel Documentation/CodingStyle @@ -494,3 +493,4 @@ Kernel Documentation/CodingStyle Linus Torvald's mail on the canonical patch format: -- +Last updated on 17 Nov 2005. diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.txt deleted file mode 100644 index 1443cd71d..000000000 --- a/Documentation/accounting/delay-accounting.txt +++ /dev/null @@ -1,112 +0,0 @@ -Delay accounting ----------------- - -Tasks encounter delays in execution when they wait -for some kernel resource to become available e.g. a -runnable task may wait for a free CPU to run on. - -The per-task delay accounting functionality measures -the delays experienced by a task while - -a) waiting for a CPU (while being runnable) -b) completion of synchronous block I/O initiated by the task -c) swapping in pages - -and makes these statistics available to userspace through -the taskstats interface. - -Such delays provide feedback for setting a task's cpu priority, -io priority and rss limit values appropriately. Long delays for -important tasks could be a trigger for raising its corresponding priority. - -The functionality, through its use of the taskstats interface, also provides -delay statistics aggregated for all tasks (or threads) belonging to a -thread group (corresponding to a traditional Unix process). This is a commonly -needed aggregation that is more efficiently done by the kernel. - -Userspace utilities, particularly resource management applications, can also -aggregate delay statistics into arbitrary groups. To enable this, delay -statistics of a task are available both during its lifetime as well as on its -exit, ensuring continuous and complete monitoring can be done. - - -Interface ---------- - -Delay accounting uses the taskstats interface which is described -in detail in a separate document in this directory. Taskstats returns a -generic data structure to userspace corresponding to per-pid and per-tgid -statistics. The delay accounting functionality populates specific fields of -this structure. See - include/linux/taskstats.h -for a description of the fields pertaining to delay accounting. -It will generally be in the form of counters returning the cumulative -delay seen for cpu, sync block I/O, swapin etc. - -Taking the difference of two successive readings of a given -counter (say cpu_delay_total) for a task will give the delay -experienced by the task waiting for the corresponding resource -in that interval. - -When a task exits, records containing the per-task statistics -are sent to userspace without requiring a command. If it is the last exiting -task of a thread group, the per-tgid statistics are also sent. More details -are given in the taskstats interface description. - -The getdelays.c userspace utility in this directory allows simple commands to -be run and the corresponding delay statistics to be displayed. It also serves -as an example of using the taskstats interface. - -Usage ------ - -Compile the kernel with - CONFIG_TASK_DELAY_ACCT=y - CONFIG_TASKSTATS=y - -Delay accounting is enabled by default at boot up. -To disable, add - nodelayacct -to the kernel boot options. The rest of the instructions -below assume this has not been done. - -After the system has booted up, use a utility -similar to getdelays.c to access the delays -seen by a given task or a task group (tgid). -The utility also allows a given command to be -executed and the corresponding delays to be -seen. - -General format of the getdelays command - -getdelays [-t tgid] [-p pid] [-c cmd...] - - -Get delays, since system boot, for pid 10 -# ./getdelays -p 10 -(output similar to next case) - -Get sum of delays, since system boot, for all pids with tgid 5 -# ./getdelays -t 5 - - -CPU count real total virtual total delay total - 7876 92005750 100000000 24001500 -IO count delay total - 0 0 -MEM count delay total - 0 0 - -Get delays seen in executing a given simple command -# ./getdelays -c ls / - -bin data1 data3 data5 dev home media opt root srv sys usr -boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var - - -CPU count real total virtual total delay total - 6 4000250 4000000 0 -IO count delay total - 0 0 -MEM count delay total - 0 0 diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c deleted file mode 100644 index 795ca3911..000000000 --- a/Documentation/accounting/getdelays.c +++ /dev/null @@ -1,396 +0,0 @@ -/* getdelays.c - * - * Utility to get per-pid and per-tgid delay accounting statistics - * Also illustrates usage of the taskstats interface - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2005 - * Copyright (C) Balbir Singh, IBM Corp. 2006 - * Copyright (c) Jay Lan, SGI. 2006 - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* - * Generic macros for dealing with netlink sockets. Might be duplicated - * elsewhere. It is recommended that commercial grade applications use - * libnl or libnetlink and use the interfaces provided by the library - */ -#define GENLMSG_DATA(glh) ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN)) -#define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN) -#define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN)) -#define NLA_PAYLOAD(len) (len - NLA_HDRLEN) - -#define err(code, fmt, arg...) do { printf(fmt, ##arg); exit(code); } while (0) -int done = 0; -int rcvbufsz=0; - - char name[100]; -int dbg=0, print_delays=0; -__u64 stime, utime; -#define PRINTF(fmt, arg...) { \ - if (dbg) { \ - printf(fmt, ##arg); \ - } \ - } - -/* Maximum size of response requested or message sent */ -#define MAX_MSG_SIZE 256 -/* Maximum number of cpus expected to be specified in a cpumask */ -#define MAX_CPUS 32 -/* Maximum length of pathname to log file */ -#define MAX_FILENAME 256 - -struct msgtemplate { - struct nlmsghdr n; - struct genlmsghdr g; - char buf[MAX_MSG_SIZE]; -}; - -char cpumask[100+6*MAX_CPUS]; - -/* - * Create a raw netlink socket and bind - */ -static int create_nl_socket(int protocol) -{ - int fd; - struct sockaddr_nl local; - - fd = socket(AF_NETLINK, SOCK_RAW, protocol); - if (fd < 0) - return -1; - - if (rcvbufsz) - if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, - &rcvbufsz, sizeof(rcvbufsz)) < 0) { - printf("Unable to set socket rcv buf size to %d\n", - rcvbufsz); - return -1; - } - - memset(&local, 0, sizeof(local)); - local.nl_family = AF_NETLINK; - - if (bind(fd, (struct sockaddr *) &local, sizeof(local)) < 0) - goto error; - - return fd; -error: - close(fd); - return -1; -} - - -int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, - __u8 genl_cmd, __u16 nla_type, - void *nla_data, int nla_len) -{ - struct nlattr *na; - struct sockaddr_nl nladdr; - int r, buflen; - char *buf; - - struct msgtemplate msg; - - msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); - msg.n.nlmsg_type = nlmsg_type; - msg.n.nlmsg_flags = NLM_F_REQUEST; - msg.n.nlmsg_seq = 0; - msg.n.nlmsg_pid = nlmsg_pid; - msg.g.cmd = genl_cmd; - msg.g.version = 0x1; - na = (struct nlattr *) GENLMSG_DATA(&msg); - na->nla_type = nla_type; - na->nla_len = nla_len + 1 + NLA_HDRLEN; - memcpy(NLA_DATA(na), nla_data, nla_len); - msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); - - buf = (char *) &msg; - buflen = msg.n.nlmsg_len ; - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr, - sizeof(nladdr))) < buflen) { - if (r > 0) { - buf += r; - buflen -= r; - } else if (errno != EAGAIN) - return -1; - } - return 0; -} - - -/* - * Probe the controller in genetlink to find the family id - * for the TASKSTATS family - */ -int get_family_id(int sd) -{ - struct { - struct nlmsghdr n; - struct genlmsghdr g; - char buf[256]; - } ans; - - int id, rc; - struct nlattr *na; - int rep_len; - - strcpy(name, TASKSTATS_GENL_NAME); - rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY, - CTRL_ATTR_FAMILY_NAME, (void *)name, - strlen(TASKSTATS_GENL_NAME)+1); - - rep_len = recv(sd, &ans, sizeof(ans), 0); - if (ans.n.nlmsg_type == NLMSG_ERROR || - (rep_len < 0) || !NLMSG_OK((&ans.n), rep_len)) - return 0; - - na = (struct nlattr *) GENLMSG_DATA(&ans); - na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); - if (na->nla_type == CTRL_ATTR_FAMILY_ID) { - id = *(__u16 *) NLA_DATA(na); - } - return id; -} - -void print_delayacct(struct taskstats *t) -{ - printf("\n\nCPU %15s%15s%15s%15s\n" - " %15llu%15llu%15llu%15llu\n" - "IO %15s%15s\n" - " %15llu%15llu\n" - "MEM %15s%15s\n" - " %15llu%15llu\n\n", - "count", "real total", "virtual total", "delay total", - t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, - t->cpu_delay_total, - "count", "delay total", - t->blkio_count, t->blkio_delay_total, - "count", "delay total", t->swapin_count, t->swapin_delay_total); -} - -int main(int argc, char *argv[]) -{ - int c, rc, rep_len, aggr_len, len2, cmd_type; - __u16 id; - __u32 mypid; - - struct nlattr *na; - int nl_sd = -1; - int len = 0; - pid_t tid = 0; - pid_t rtid = 0; - - int fd = 0; - int count = 0; - int write_file = 0; - int maskset = 0; - char logfile[128]; - int loop = 0; - - struct msgtemplate msg; - - while (1) { - c = getopt(argc, argv, "dw:r:m:t:p:v:l"); - if (c < 0) - break; - - switch (c) { - case 'd': - printf("print delayacct stats ON\n"); - print_delays = 1; - break; - case 'w': - strncpy(logfile, optarg, MAX_FILENAME); - printf("write to file %s\n", logfile); - write_file = 1; - break; - case 'r': - rcvbufsz = atoi(optarg); - printf("receive buf size %d\n", rcvbufsz); - if (rcvbufsz < 0) - err(1, "Invalid rcv buf size\n"); - break; - case 'm': - strncpy(cpumask, optarg, sizeof(cpumask)); - maskset = 1; - printf("cpumask %s maskset %d\n", cpumask, maskset); - break; - case 't': - tid = atoi(optarg); - if (!tid) - err(1, "Invalid tgid\n"); - cmd_type = TASKSTATS_CMD_ATTR_TGID; - print_delays = 1; - break; - case 'p': - tid = atoi(optarg); - if (!tid) - err(1, "Invalid pid\n"); - cmd_type = TASKSTATS_CMD_ATTR_PID; - print_delays = 1; - break; - case 'v': - printf("debug on\n"); - dbg = 1; - break; - case 'l': - printf("listen forever\n"); - loop = 1; - break; - default: - printf("Unknown option %d\n", c); - exit(-1); - } - } - - if (write_file) { - fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - if (fd == -1) { - perror("Cannot open output file\n"); - exit(1); - } - } - - if ((nl_sd = create_nl_socket(NETLINK_GENERIC)) < 0) - err(1, "error creating Netlink socket\n"); - - - mypid = getpid(); - id = get_family_id(nl_sd); - if (!id) { - printf("Error getting family id, errno %d", errno); - goto err; - } - PRINTF("family id %d\n", id); - - if (maskset) { - rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); - PRINTF("Sent register cpumask, retval %d\n", rc); - if (rc < 0) { - printf("error sending register cpumask\n"); - goto err; - } - } - - if (tid) { - rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, - cmd_type, &tid, sizeof(__u32)); - PRINTF("Sent pid/tgid, retval %d\n", rc); - if (rc < 0) { - printf("error sending tid/tgid cmd\n"); - goto done; - } - } - - do { - int i; - - rep_len = recv(nl_sd, &msg, sizeof(msg), 0); - PRINTF("received %d bytes\n", rep_len); - - if (rep_len < 0) { - printf("nonfatal reply error: errno %d\n", errno); - continue; - } - if (msg.n.nlmsg_type == NLMSG_ERROR || - !NLMSG_OK((&msg.n), rep_len)) { - printf("fatal reply error, errno %d\n", errno); - goto done; - } - - PRINTF("nlmsghdr size=%d, nlmsg_len=%d, rep_len=%d\n", - sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); - - - rep_len = GENLMSG_PAYLOAD(&msg.n); - - na = (struct nlattr *) GENLMSG_DATA(&msg); - len = 0; - i = 0; - while (len < rep_len) { - len += NLA_ALIGN(na->nla_len); - switch (na->nla_type) { - case TASKSTATS_TYPE_AGGR_TGID: - /* Fall through */ - case TASKSTATS_TYPE_AGGR_PID: - aggr_len = NLA_PAYLOAD(na->nla_len); - len2 = 0; - /* For nested attributes, na follows */ - na = (struct nlattr *) NLA_DATA(na); - done = 0; - while (len2 < aggr_len) { - switch (na->nla_type) { - case TASKSTATS_TYPE_PID: - rtid = *(int *) NLA_DATA(na); - if (print_delays) - printf("PID\t%d\n", rtid); - break; - case TASKSTATS_TYPE_TGID: - rtid = *(int *) NLA_DATA(na); - if (print_delays) - printf("TGID\t%d\n", rtid); - break; - case TASKSTATS_TYPE_STATS: - count++; - if (print_delays) - print_delayacct((struct taskstats *) NLA_DATA(na)); - if (fd) { - if (write(fd, NLA_DATA(na), na->nla_len) < 0) { - err(1,"write error\n"); - } - } - if (!loop) - goto done; - break; - default: - printf("Unknown nested nla_type %d\n", na->nla_type); - break; - } - len2 += NLA_ALIGN(na->nla_len); - na = (struct nlattr *) ((char *) na + len2); - } - break; - - default: - printf("Unknown nla_type %d\n", na->nla_type); - break; - } - na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); - } - } while (loop); -done: - if (maskset) { - rc = send_cmd(nl_sd, id, mypid, TASKSTATS_CMD_GET, - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, - &cpumask, sizeof(cpumask)); - printf("Sent deregister mask, retval %d\n", rc); - if (rc < 0) - err(rc, "error sending deregister cpumask\n"); - } -err: - close(nl_sd); - if (fd) - close(fd); - return 0; -} diff --git a/Documentation/accounting/taskstats.txt b/Documentation/accounting/taskstats.txt deleted file mode 100644 index 92ebf29e9..000000000 --- a/Documentation/accounting/taskstats.txt +++ /dev/null @@ -1,181 +0,0 @@ -Per-task statistics interface ------------------------------ - - -Taskstats is a netlink-based interface for sending per-task and -per-process statistics from the kernel to userspace. - -Taskstats was designed for the following benefits: - -- efficiently provide statistics during lifetime of a task and on its exit -- unified interface for multiple accounting subsystems -- extensibility for use by future accounting patches - -Terminology ------------ - -"pid", "tid" and "task" are used interchangeably and refer to the standard -Linux task defined by struct task_struct. per-pid stats are the same as -per-task stats. - -"tgid", "process" and "thread group" are used interchangeably and refer to the -tasks that share an mm_struct i.e. the traditional Unix process. Despite the -use of tgid, there is no special treatment for the task that is thread group -leader - a process is deemed alive as long as it has any task belonging to it. - -Usage ------ - -To get statistics during a task's lifetime, userspace opens a unicast netlink -socket (NETLINK_GENERIC family) and sends commands specifying a pid or a tgid. -The response contains statistics for a task (if pid is specified) or the sum of -statistics for all tasks of the process (if tgid is specified). - -To obtain statistics for tasks which are exiting, the userspace listener -sends a register command and specifies a cpumask. Whenever a task exits on -one of the cpus in the cpumask, its per-pid statistics are sent to the -registered listener. Using cpumasks allows the data received by one listener -to be limited and assists in flow control over the netlink interface and is -explained in more detail below. - -If the exiting task is the last thread exiting its thread group, -an additional record containing the per-tgid stats is also sent to userspace. -The latter contains the sum of per-pid stats for all threads in the thread -group, both past and present. - -getdelays.c is a simple utility demonstrating usage of the taskstats interface -for reporting delay accounting statistics. Users can register cpumasks, -send commands and process responses, listen for per-tid/tgid exit data, -write the data received to a file and do basic flow control by increasing -receive buffer sizes. - -Interface ---------- - -The user-kernel interface is encapsulated in include/linux/taskstats.h - -To avoid this documentation becoming obsolete as the interface evolves, only -an outline of the current version is given. taskstats.h always overrides the -description here. - -struct taskstats is the common accounting structure for both per-pid and -per-tgid data. It is versioned and can be extended by each accounting subsystem -that is added to the kernel. The fields and their semantics are defined in the -taskstats.h file. - -The data exchanged between user and kernel space is a netlink message belonging -to the NETLINK_GENERIC family and using the netlink attributes interface. -The messages are in the format - - +----------+- - -+-------------+-------------------+ - | nlmsghdr | Pad | genlmsghdr | taskstats payload | - +----------+- - -+-------------+-------------------+ - - -The taskstats payload is one of the following three kinds: - -1. Commands: Sent from user to kernel. Commands to get data on -a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID, -containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes -the task/process for which userspace wants statistics. - -Commands to register/deregister interest in exit data from a set of cpus -consist of one attribute, of type -TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the -attribute payload. The cpumask is specified as an ascii string of -comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8 -the cpumask would be "1-3,5,7-8". If userspace forgets to deregister interest -in cpus before closing the listening socket, the kernel cleans up its interest -set over time. However, for the sake of efficiency, an explicit deregistration -is advisable. - -2. Response for a command: sent from the kernel in response to a userspace -command. The payload is a series of three attributes of type: - -a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates -a pid/tgid will be followed by some stats. - -b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats -is being returned. - -c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The -same structure is used for both per-pid and per-tgid stats. - -3. New message sent by kernel whenever a task exits. The payload consists of a - series of attributes of the following type: - -a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats -b) TASKSTATS_TYPE_PID: contains exiting task's pid -c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats -d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be tgid+stats -e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs -f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's process - - -per-tgid stats --------------- - -Taskstats provides per-process stats, in addition to per-task stats, since -resource management is often done at a process granularity and aggregating task -stats in userspace alone is inefficient and potentially inaccurate (due to lack -of atomicity). - -However, maintaining per-process, in addition to per-task stats, within the -kernel has space and time overheads. To address this, the taskstats code -accumalates each exiting task's statistics into a process-wide data structure. -When the last task of a process exits, the process level data accumalated also -gets sent to userspace (along with the per-task data). - -When a user queries to get per-tgid data, the sum of all other live threads in -the group is added up and added to the accumalated total for previously exited -threads of the same thread group. - -Extending taskstats -------------------- - -There are two ways to extend the taskstats interface to export more -per-task/process stats as patches to collect them get added to the kernel -in future: - -1. Adding more fields to the end of the existing struct taskstats. Backward - compatibility is ensured by the version number within the - structure. Userspace will use only the fields of the struct that correspond - to the version its using. - -2. Defining separate statistic structs and using the netlink attributes - interface to return them. Since userspace processes each netlink attribute - independently, it can always ignore attributes whose type it does not - understand (because it is using an older version of the interface). - - -Choosing between 1. and 2. is a matter of trading off flexibility and -overhead. If only a few fields need to be added, then 1. is the preferable -path since the kernel and userspace don't need to incur the overhead of -processing new netlink attributes. But if the new fields expand the existing -struct too much, requiring disparate userspace accounting utilities to -unnecessarily receive large structures whose fields are of no interest, then -extending the attributes structure would be worthwhile. - -Flow control for taskstats --------------------------- - -When the rate of task exits becomes large, a listener may not be able to keep -up with the kernel's rate of sending per-tid/tgid exit data leading to data -loss. This possibility gets compounded when the taskstats structure gets -extended and the number of cpus grows large. - -To avoid losing statistics, userspace should do one or more of the following: - -- increase the receive buffer sizes for the netlink sockets opened by -listeners to receive exit data. - -- create more listeners and reduce the number of cpus being listened to by -each listener. In the extreme case, there could be one listener for each cpu. -Users may also consider setting the cpu affinity of the listener to the subset -of cpus to which it listens, especially if they are listening to just one cpu. - -Despite these measures, if the userspace receives ENOBUFS error messages -indicated overflow of receive buffers, it should take measures to handle the -loss of data. - ----- diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx index 43edb4ecf..d4c6d3aa0 100644 --- a/Documentation/arm/IXP4xx +++ b/Documentation/arm/IXP4xx @@ -85,7 +85,7 @@ IXP4xx provides two methods of accessing PCI memory space: 2) If > 64MB of memory space is required, the IXP4xx can be configured to use indirect registers to access PCI This allows for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. - The disadvantage of this is that every PCI access requires + The disadvantadge of this is that every PCI access requires three local register accesses plus a spinlock, but in some cases the performance hit is acceptable. In addition, you cannot mmap() PCI devices in this case due to the indirect nature diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt index 3e46d2a31..8c6ee6841 100644 --- a/Documentation/arm/Samsung-S3C24XX/Overview.txt +++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt @@ -7,13 +7,11 @@ Introduction ------------ The Samsung S3C24XX range of ARM9 System-on-Chip CPUs are supported - by the 's3c2410' architecture of ARM Linux. Currently the S3C2410, - S3C2440 and S3C2442 devices are supported. + by the 's3c2410' architecture of ARM Linux. Currently the S3C2410 and + the S3C2440 are supported CPUs. Support for the S3C2400 series is in progress. - Support for the S3C2412 and S3C2413 CPUs is being merged. - Configuration ------------- @@ -45,18 +43,9 @@ Machines Samsung's own development board, geared for PDA work. - Samsung/Aiji SMDK2412 - - The S3C2412 version of the SMDK2440. - - Samsung/Aiji SMDK2413 - - The S3C2412 version of the SMDK2440. - Samsung/Meritech SMDK2440 - The S3C2440 compatible version of the SMDK2440, which has the - option of an S3C2440 or S3C2442 CPU module. + The S3C2440 compatible version of the SMDK2440 Thorcom VR1000 @@ -222,6 +211,24 @@ Port Contributors Lucas Correia Villa Real (S3C2400 port) +Document Changes +---------------- + + 05 Sep 2004 - BJD - Added Document Changes section + 05 Sep 2004 - BJD - Added Klaus Fetscher to list of contributors + 25 Oct 2004 - BJD - Added Dimitry Andric to list of contributors + 25 Oct 2004 - BJD - Updated the MTD from the 2.6.9 merge + 21 Jan 2005 - BJD - Added rx3715, added Shannon to contributors + 10 Feb 2005 - BJD - Added Guillaume Gourat to contributors + 02 Mar 2005 - BJD - Added SMDK2440 to list of machines + 06 Mar 2005 - BJD - Added Christer Weinigel + 08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction + 08 Mar 2005 - BJD - Added section on adding machines + 09 Sep 2005 - BJD - Added section on platform data + 11 Feb 2006 - BJD - Added I2C, RTC and Watchdog sections + 11 Feb 2006 - BJD - Added Osiris machine, and S3C2400 information + + Document Author --------------- diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt b/Documentation/arm/Samsung-S3C24XX/S3C2412.txt deleted file mode 100644 index cb82a7fc7..000000000 --- a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt +++ /dev/null @@ -1,120 +0,0 @@ - S3C2412 ARM Linux Overview - ========================== - -Introduction ------------- - - The S3C2412 is part of the S3C24XX range of ARM9 System-on-Chip CPUs - from Samsung. This part has an ARM926-EJS core, capable of running up - to 266MHz (see data-sheet for more information) - - -Clock ------ - - The core clock code provides a set of clocks to the drivers, and allows - for source selection and a number of other features. - - -Power ------ - - No support for suspend/resume to RAM in the current system. - - -DMA ---- - - No current support for DMA. - - -GPIO ----- - - There is support for setting the GPIO to input/output/special function - and reading or writing to them. - - -UART ----- - - The UART hardware is similar to the S3C2440, and is supported by the - s3c2410 driver in the drivers/serial directory. - - -NAND ----- - - The NAND hardware is similar to the S3C2440, and is supported by the - s3c2410 driver in the drivers/mtd/nand directory. - - -USB Host --------- - - The USB hardware is similar to the S3C2410, with extended clock source - control. The OHCI portion is supported by the ohci-s3c2410 driver, and - the clock control selection is supported by the core clock code. - - -USB Device ----------- - - No current support in the kernel - - -IRQs ----- - - All the standard, and external interrupt sources are supported. The - extra sub-sources are not yet supported. - - -RTC ---- - - The RTC hardware is similar to the S3C2410, and is supported by the - s3c2410-rtc driver. - - -Watchdog --------- - - The watchdog harware is the same as the S3C2410, and is supported by - the s3c2410_wdt driver. - - -MMC/SD/SDIO ------------ - - No current support for the MMC/SD/SDIO block. - -IIC ---- - - The IIC hardware is the same as the S3C2410, and is supported by the - i2c-s3c24xx driver. - - -IIS ---- - - No current support for the IIS interface. - - -SPI ---- - - No current support for the SPI interfaces. - - -ATA ---- - - No current support for the on-board ATA block. - - -Document Author ---------------- - -Ben Dooks, (c) 2006 Simtec Electronics diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt b/Documentation/arm/Samsung-S3C24XX/S3C2413.txt deleted file mode 100644 index ab2a88858..000000000 --- a/Documentation/arm/Samsung-S3C24XX/S3C2413.txt +++ /dev/null @@ -1,21 +0,0 @@ - S3C2413 ARM Linux Overview - ========================== - -Introduction ------------- - - The S3C2413 is an extended version of the S3C2412, with an camera - interface and mobile DDR memory support. See the S3C2412 support - documentation for more information. - - -Camera Interface ---------------- - - This block is currently not supported. - - -Document Author ---------------- - -Ben Dooks, (c) 2006 Simtec Electronics diff --git a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen b/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen deleted file mode 100644 index 1e6a23fdf..000000000 --- a/Documentation/arm/Sharp-LH/ADC-LH7-Touchscreen +++ /dev/null @@ -1,61 +0,0 @@ -README on the ADC/Touchscreen Controller -======================================== - -The LH79524 and LH7A404 include a built-in Analog to Digital -controller (ADC) that is used to process input from a touchscreen. -The driver only implements a four-wire touch panel protocol. - -The touchscreen driver is maintenance free except for the pen-down or -touch threshold. Some resistive displays and board combinations may -require tuning of this threshold. The driver exposes some of it's -internal state in the sys filesystem. If the kernel is configured -with it, CONFIG_SYSFS, and sysfs is mounted at /sys, there will be a -directory - - /sys/devices/platform/adc-lh7.0 - -containing these files. - - -r--r--r-- 1 root root 4096 Jan 1 00:00 samples - -rw-r--r-- 1 root root 4096 Jan 1 00:00 threshold - -r--r--r-- 1 root root 4096 Jan 1 00:00 threshold_range - -The threshold is the current touch threshold. It defaults to 750 on -most targets. - - # cat threshold - 750 - -The threshold_range contains the range of valid values for the -threshold. Values outside of this range will be silently ignored. - - # cat threshold_range - 0 1023 - -To change the threshold, write a value to the threshold file. - - # echo 500 > threshold - # cat threshold - 500 - -The samples file contains the most recently sampled values from the -ADC. There are 12. Below are typical of the last sampled values when -the pen has been released. The first two and last two samples are for -detecting whether or not the pen is down. The third through sixth are -X coordinate samples. The seventh through tenth are Y coordinate -samples. - - # cat samples - 1023 1023 0 0 0 0 530 529 530 529 1023 1023 - -To determine a reasonable threshold, press on the touch panel with an -appropriate stylus and read the values from samples. - - # cat samples - 1023 676 92 103 101 102 855 919 922 922 1023 679 - -The first and eleventh samples are discarded. Thus, the important -values are the second and twelfth which are used to determine if the -pen is down. When both are below the threshold, the driver registers -that the pen is down. When either is above the threshold, it -registers then pen is up. diff --git a/Documentation/arm/Sharp-LH/LCDPanels b/Documentation/arm/Sharp-LH/LCDPanels deleted file mode 100644 index fb1b21c2f..000000000 --- a/Documentation/arm/Sharp-LH/LCDPanels +++ /dev/null @@ -1,59 +0,0 @@ -README on the LCD Panels -======================== - -Configuration options for several LCD panels, available from Logic PD, -are included in the kernel source. This README will help you -understand the configuration data and give you some guidance for -adding support for other panels if you wish. - - -lcd-panels.h ------------- - -There is no way, at present, to detect which panel is attached to the -system at runtime. Thus the kernel configuration is static. The file -arch/arm/mach-ld7a40x/lcd-panels.h (or similar) defines all of the -panel specific parameters. - -It should be possible for this data to be shared among several device -families. The current layout may be insufficiently general, but it is -amenable to improvement. - - -PIXEL_CLOCK ------------ - -The panel data sheets will give a range of acceptable pixel clocks. -The fundamental LCDCLK input frequency is divided down by a PCD -constant in field '.tim2'. It may happen that it is impossible to set -the pixel clock within this range. A clock which is too slow will -tend to flicker. For the highest quality image, set the clock as high -as possible. - - -MARGINS -------- - -These values may be difficult to glean from the panel data sheet. In -the case of the Sharp panels, the upper margin is explicitly called -out as a specific number of lines from the top of the frame. The -other values may not matter as much as the panels tend to -automatically center the image. - - -Sync Sense ----------- - -The sense of the hsync and vsync pulses may be called out in the data -sheet. On one panel, the sense of these pulses determine the height -of the visible region on the panel. Most of the Sharp panels use -negative sense sync pulses set by the TIM2_IHS and TIM2_IVS bits in -'.tim2'. - - -Pel Layout ----------- - -The Sharp color TFT panels are all configured for 16 bit direct color -modes. The amba-lcd driver sets the pel mode to 565 for 5 bits of -each red and blue and 6 bits of green. diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 2a63d5662..23a1c2402 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt @@ -157,13 +157,13 @@ For example, smp_mb__before_atomic_dec() can be used like so: smp_mb__before_atomic_dec(); atomic_dec(&obj->ref_count); -It makes sure that all memory operations preceding the atomic_dec() +It makes sure that all memory operations preceeding the atomic_dec() call are strongly ordered with respect to the atomic counter -operation. In the above example, it guarantees that the assignment of +operation. In the above example, it guarentees that the assignment of "1" to obj->dead will be globally visible to other cpus before the atomic counter decrement. -Without the explicit smp_mb__before_atomic_dec() call, the +Without the explicitl smp_mb__before_atomic_dec() call, the implementation could legally allow the atomic counter update visible to other cpus before the "obj->dead = 1;" assignment. @@ -173,11 +173,11 @@ ordering with respect to memory operations after an atomic_dec() call (smp_mb__{before,after}_atomic_inc()). A missing memory barrier in the cases where they are required by the -atomic_t implementation above can have disastrous results. Here is -an example, which follows a pattern occurring frequently in the Linux +atomic_t implementation above can have disasterous results. Here is +an example, which follows a pattern occuring frequently in the Linux kernel. It is the use of atomic counters to implement reference counting, and it works such that once the counter falls to zero it can -be guaranteed that no other entity can be accessing the object: +be guarenteed that no other entity can be accessing the object: static void obj_list_add(struct obj *obj) { @@ -291,9 +291,9 @@ to the size of an "unsigned long" C data type, and are least of that size. The endianness of the bits within each "unsigned long" are the native endianness of the cpu. - void set_bit(unsigned long nr, volatile unsigned long *addr); - void clear_bit(unsigned long nr, volatile unsigned long *addr); - void change_bit(unsigned long nr, volatile unsigned long *addr); + void set_bit(unsigned long nr, volatils unsigned long *addr); + void clear_bit(unsigned long nr, volatils unsigned long *addr); + void change_bit(unsigned long nr, volatils unsigned long *addr); These routines set, clear, and change, respectively, the bit number indicated by "nr" on the bit mask pointed to by "ADDR". @@ -301,9 +301,9 @@ indicated by "nr" on the bit mask pointed to by "ADDR". They must execute atomically, yet there are no implicit memory barrier semantics required of these interfaces. - int test_and_set_bit(unsigned long nr, volatile unsigned long *addr); - int test_and_clear_bit(unsigned long nr, volatile unsigned long *addr); - int test_and_change_bit(unsigned long nr, volatile unsigned long *addr); + int test_and_set_bit(unsigned long nr, volatils unsigned long *addr); + int test_and_clear_bit(unsigned long nr, volatils unsigned long *addr); + int test_and_change_bit(unsigned long nr, volatils unsigned long *addr); Like the above, except that these routines return a boolean which indicates whether the changed bit was set _BEFORE_ the atomic bit @@ -335,7 +335,7 @@ subsequent memory operation is made visible. For example: /* ... */; obj->killed = 1; -The implementation of test_and_set_bit() must guarantee that +The implementation of test_and_set_bit() must guarentee that "obj->dead = 1;" is visible to cpus before the atomic memory operation done by test_and_set_bit() becomes visible. Likewise, the atomic memory operation done by test_and_set_bit() must become visible before @@ -474,7 +474,7 @@ Now, as far as memory barriers go, as long as spin_lock() strictly orders all subsequent memory operations (including the cas()) with respect to itself, things will be fine. -Said another way, _atomic_dec_and_lock() must guarantee that +Said another way, _atomic_dec_and_lock() must guarentee that a counter dropping to zero is never made visible before the spinlock being acquired. diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt index 9c629ffa0..15378422f 100644 --- a/Documentation/cciss.txt +++ b/Documentation/cciss.txt @@ -20,7 +20,6 @@ This driver is known to work with the following cards: * SA P400i * SA E200 * SA E200i - * SA E500 If nodes are not already created in the /dev/cciss directory, run as root: diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c deleted file mode 100644 index d738cde2a..000000000 --- a/Documentation/connector/ucon.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * ucon.c - * - * Copyright (c) 2004+ Evgeniy Polyakov - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#define DEBUG -#define NETLINK_CONNECTOR 11 - -#ifdef DEBUG -#define ulog(f, a...) fprintf(stdout, f, ##a) -#else -#define ulog(f, a...) do {} while (0) -#endif - -static int need_exit; -static __u32 seq; - -static int netlink_send(int s, struct cn_msg *msg) -{ - struct nlmsghdr *nlh; - unsigned int size; - int err; - char buf[128]; - struct cn_msg *m; - - size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len); - - nlh = (struct nlmsghdr *)buf; - nlh->nlmsg_seq = seq++; - nlh->nlmsg_pid = getpid(); - nlh->nlmsg_type = NLMSG_DONE; - nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); - nlh->nlmsg_flags = 0; - - m = NLMSG_DATA(nlh); -#if 0 - ulog("%s: [%08x.%08x] len=%u, seq=%u, ack=%u.\n", - __func__, msg->id.idx, msg->id.val, msg->len, msg->seq, msg->ack); -#endif - memcpy(m, msg, sizeof(*m) + msg->len); - - err = send(s, nlh, size, 0); - if (err == -1) - ulog("Failed to send: %s [%d].\n", - strerror(errno), errno); - - return err; -} - -int main(int argc, char *argv[]) -{ - int s; - char buf[1024]; - int len; - struct nlmsghdr *reply; - struct sockaddr_nl l_local; - struct cn_msg *data; - FILE *out; - time_t tm; - struct pollfd pfd; - - if (argc < 2) - out = stdout; - else { - out = fopen(argv[1], "a+"); - if (!out) { - ulog("Unable to open %s for writing: %s\n", - argv[1], strerror(errno)); - out = stdout; - } - } - - memset(buf, 0, sizeof(buf)); - - s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); - if (s == -1) { - perror("socket"); - return -1; - } - - l_local.nl_family = AF_NETLINK; - l_local.nl_groups = 0x123; /* bitmask of requested groups */ - l_local.nl_pid = 0; - - if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { - perror("bind"); - close(s); - return -1; - } - -#if 0 - { - int on = 0x57; /* Additional group number */ - setsockopt(s, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &on, sizeof(on)); - } -#endif - if (0) { - int i, j; - - memset(buf, 0, sizeof(buf)); - - data = (struct cn_msg *)buf; - - data->id.idx = 0x123; - data->id.val = 0x456; - data->seq = seq++; - data->ack = 0; - data->len = 0; - - for (j=0; j<10; ++j) { - for (i=0; i<1000; ++i) { - len = netlink_send(s, data); - } - - ulog("%d messages have been sent to %08x.%08x.\n", i, data->id.idx, data->id.val); - } - - return 0; - } - - - pfd.fd = s; - - while (!need_exit) { - pfd.events = POLLIN; - pfd.revents = 0; - switch (poll(&pfd, 1, -1)) { - case 0: - need_exit = 1; - break; - case -1: - if (errno != EINTR) { - need_exit = 1; - break; - } - continue; - } - if (need_exit) - break; - - memset(buf, 0, sizeof(buf)); - len = recv(s, buf, sizeof(buf), 0); - if (len == -1) { - perror("recv buf"); - close(s); - return -1; - } - reply = (struct nlmsghdr *)buf; - - switch (reply->nlmsg_type) { - case NLMSG_ERROR: - fprintf(out, "Error message received.\n"); - fflush(out); - break; - case NLMSG_DONE: - data = (struct cn_msg *)NLMSG_DATA(reply); - - time(&tm); - fprintf(out, "%.24s : [%x.%x] [%08u.%08u].\n", - ctime(&tm), data->id.idx, data->id.val, data->seq, data->ack); - fflush(out); - break; - default: - break; - } - } - - close(s); - return 0; -} diff --git a/Documentation/console/console.txt b/Documentation/console/console.txt deleted file mode 100644 index d3e174473..000000000 --- a/Documentation/console/console.txt +++ /dev/null @@ -1,144 +0,0 @@ -Console Drivers -=============== - -The linux kernel has 2 general types of console drivers. The first type is -assigned by the kernel to all the virtual consoles during the boot process. -This type will be called 'system driver', and only one system driver is allowed -to exist. The system driver is persistent and it can never be unloaded, though -it may become inactive. - -The second type has to be explicitly loaded and unloaded. This will be called -'modular driver' by this document. Multiple modular drivers can coexist at -any time with each driver sharing the console with other drivers including -the system driver. However, modular drivers cannot take over the console -that is currently occupied by another modular driver. (Exception: Drivers that -call take_over_console() will succeed in the takeover regardless of the type -of driver occupying the consoles.) They can only take over the console that is -occupied by the system driver. In the same token, if the modular driver is -released by the console, the system driver will take over. - -Modular drivers, from the programmer's point of view, has to call: - - take_over_console() - load and bind driver to console layer - give_up_console() - unbind and unload driver - -In newer kernels, the following are also available: - - register_con_driver() - unregister_con_driver() - -If sysfs is enabled, the contents of /sys/class/vtconsole can be -examined. This shows the console backends currently registered by the -system which are named vtcon where is an integer fro 0 to 15. Thus: - - ls /sys/class/vtconsole - . .. vtcon0 vtcon1 - -Each directory in /sys/class/vtconsole has 3 files: - - ls /sys/class/vtconsole/vtcon0 - . .. bind name uevent - -What do these files signify? - - 1. bind - this is a read/write file. It shows the status of the driver if - read, or acts to bind or unbind the driver to the virtual consoles - when written to. The possible values are: - - 0 - means the driver is not bound and if echo'ed, commands the driver - to unbind - - 1 - means the driver is bound and if echo'ed, commands the driver to - bind - - 2. name - read-only file. Shows the name of the driver in this format: - - cat /sys/class/vtconsole/vtcon0/name - (S) VGA+ - - '(S)' stands for a (S)ystem driver, ie, it cannot be directly - commanded to bind or unbind - - 'VGA+' is the name of the driver - - cat /sys/class/vtconsole/vtcon1/name - (M) frame buffer device - - In this case, '(M)' stands for a (M)odular driver, one that can be - directly commanded to bind or unbind. - - 3. uevent - ignore this file - -When unbinding, the modular driver is detached first, and then the system -driver takes over the consoles vacated by the driver. Binding, on the other -hand, will bind the driver to the consoles that are currently occupied by a -system driver. - -NOTE1: Binding and binding must be selected in Kconfig. It's under: - -Device Drivers -> Character devices -> Support for binding and unbinding -console drivers - -NOTE2: If any of the virtual consoles are in KD_GRAPHICS mode, then binding or -unbinding will not succeed. An example of an application that sets the console -to KD_GRAPHICS is X. - -How useful is this feature? This is very useful for console driver -developers. By unbinding the driver from the console layer, one can unload the -driver, make changes, recompile, reload and rebind the driver without any need -for rebooting the kernel. For regular users who may want to switch from -framebuffer console to VGA console and vice versa, this feature also makes -this possible. (NOTE NOTE NOTE: Please read fbcon.txt under Documentation/fb -for more details). - -Notes for developers: -===================== - -take_over_console() is now broken up into: - - register_con_driver() - bind_con_driver() - private function - -give_up_console() is a wrapper to unregister_con_driver(), and a driver must -be fully unbound for this call to succeed. con_is_bound() will check if the -driver is bound or not. - -Guidelines for console driver writers: -===================================== - -In order for binding to and unbinding from the console to properly work, -console drivers must follow these guidelines: - -1. All drivers, except system drivers, must call either register_con_driver() - or take_over_console(). register_con_driver() will just add the driver to - the console's internal list. It won't take over the - console. take_over_console(), as it name implies, will also take over (or - bind to) the console. - -2. All resources allocated during con->con_init() must be released in - con->con_deinit(). - -3. All resources allocated in con->con_startup() must be released when the - driver, which was previously bound, becomes unbound. The console layer - does not have a complementary call to con->con_startup() so it's up to the - driver to check when it's legal to release these resources. Calling - con_is_bound() in con->con_deinit() will help. If the call returned - false(), then it's safe to release the resources. This balance has to be - ensured because con->con_startup() can be called again when a request to - rebind the driver to the console arrives. - -4. Upon exit of the driver, ensure that the driver is totally unbound. If the - condition is satisfied, then the driver must call unregister_con_driver() - or give_up_console(). - -5. unregister_con_driver() can also be called on conditions which make it - impossible for the driver to service console requests. This can happen - with the framebuffer console that suddenly lost all of its drivers. - -The current crop of console drivers should still work correctly, but binding -and unbinding them may cause problems. With minimal fixes, these drivers can -be made to work correctly. - -========================== -Antonino Daplas - diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt index 555c8cf36..7fedc00c3 100644 --- a/Documentation/cpu-freq/user-guide.txt +++ b/Documentation/cpu-freq/user-guide.txt @@ -153,13 +153,10 @@ scaling_governor, and by "echoing" the name of another that some governors won't load - they only work on some specific architectures or processors. -scaling_min_freq and +scaling_min_freq and scaling_max_freq show the current "policy limits" (in kHz). By echoing new values into these files, you can change these limits. - NOTE: when setting a policy you need to - first set scaling_max_freq, then - scaling_min_freq. If you have selected the "userspace" governor which allows you to diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index bc107cb15..1bcf69996 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt @@ -251,24 +251,16 @@ A: This is what you would need in your kernel code to receive notifications. return NOTIFY_OK; } - static struct notifier_block __cpuinitdata foobar_cpu_notifer = + static struct notifier_block foobar_cpu_notifer = { .notifier_call = foobar_cpu_callback, }; -You need to call register_cpu_notifier() from your init function. -Init functions could be of two types: -1. early init (init function called when only the boot processor is online). -2. late init (init function called _after_ all the CPUs are online). -For the first case, you should add the following to your init function +In your init function, register_cpu_notifier(&foobar_cpu_notifier); -For the second case, you should add the following to your init function - - register_hotcpu_notifier(&foobar_cpu_notifier); - You can fail PREPARE notifiers if something doesn't work to prepare resources. This will stop the activity and send a following CANCELED event back. diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 76b44290c..159e2a0c3 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt @@ -217,12 +217,6 @@ exclusive cpuset. Also, the use of a Linux virtual file system (vfs) to represent the cpuset hierarchy provides for a familiar permission and name space for cpusets, with a minimum of additional kernel code. -The cpus file in the root (top_cpuset) cpuset is read-only. -It automatically tracks the value of cpu_online_map, using a CPU -hotplug notifier. If and when memory nodes can be hotplugged, -we expect to make the mems file in the root cpuset read-only -as well, and have it track the value of node_online_map. - 1.4 What are exclusive cpusets ? -------------------------------- diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 66c725f53..b369a8c46 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -3,7 +3,7 @@ Maintained by Torben Mathiasen - Last revised: 15 May 2006 + Last revised: 25 January 2005 This list is the Linux Device List, the official registry of allocated device numbers and /dev directory nodes for the Linux operating @@ -94,6 +94,7 @@ Your cooperation is appreciated. 9 = /dev/urandom Faster, less secure random number gen. 10 = /dev/aio Asyncronous I/O notification interface 11 = /dev/kmsg Writes to this come out as printk's + 12 = /dev/oldmem Access to crash dump from kexec kernel 1 block RAM disk 0 = /dev/ram0 First RAM disk 1 = /dev/ram1 Second RAM disk @@ -261,13 +262,13 @@ Your cooperation is appreciated. NOTE: These devices permit both read and write access. 7 block Loopback devices - 0 = /dev/loop0 First loop device - 1 = /dev/loop1 Second loop device + 0 = /dev/loop0 First loopback device + 1 = /dev/loop1 Second loopback device ... - The loop devices are used to mount filesystems not + The loopback devices are used to mount filesystems not associated with block devices. The binding to the - loop devices is handled by mount(8) or losetup(8). + loopback devices is handled by mount(8) or losetup(8). 8 block SCSI disk devices (0-15) 0 = /dev/sda First SCSI disk whole disk @@ -942,7 +943,7 @@ Your cooperation is appreciated. 240 = /dev/ftlp FTL on 16th Memory Technology Device Partitions are handled in the same way as for IDE - disks (see major number 3) except that the partition + disks (see major number 3) expect that the partition limit is 15 rather than 63 per disk (same as SCSI.) 45 char isdn4linux ISDN BRI driver @@ -1167,7 +1168,7 @@ Your cooperation is appreciated. The filename of the encrypted container and the passwords are sent via ioctls (using the sdmount tool) to the master node which then activates them via one of the - /dev/scramdisk/x nodes for loop mounting (all handled + /dev/scramdisk/x nodes for loopback mounting (all handled through the sdmount tool). Requested by: andy@scramdisklinux.org @@ -2537,38 +2538,24 @@ Your cooperation is appreciated. 0 = /dev/usb/lp0 First USB printer ... 15 = /dev/usb/lp15 16th USB printer + 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 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) - 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 - 132 = /dev/usb/idmouse ID Mouse (fingerprint scanner) device - 133 = /dev/usb/sisusbvga1 First SiSUSB VGA device - ... - 140 = /dev/usb/sisusbvga8 Eigth SISUSB VGA 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 180 block USB block devices - 0 = /dev/uba First USB block device - 8 = /dev/ubb Second USB block device - 16 = /dev/ubc Third USB block device - ... + 0 = /dev/uba First USB block device + 8 = /dev/ubb Second USB block device + 16 = /dev/ubc Thrid USB block device + ... 181 char Conrad Electronic parallel port radio clocks 0 = /dev/pcfclock0 First Conrad radio clock @@ -2723,17 +2710,6 @@ Your cooperation is appreciated. 1 = /dev/cpu/1/msr MSRs on CPU 1 ... -202 block Xen Virtual Block Device - 0 = /dev/xvda First Xen VBD whole disk - 16 = /dev/xvdb Second Xen VBD whole disk - 32 = /dev/xvdc Third Xen VBD whole disk - ... - 240 = /dev/xvdp Sixteenth Xen VBD whole disk - - Partitions are handled in the same way as for IDE - disks (see major number 3) except that the limit on - partitions is 15. - 203 char CPU CPUID information 0 = /dev/cpu/0/cpuid CPUID on CPU 0 1 = /dev/cpu/1/cpuid CPUID on CPU 1 @@ -2771,27 +2747,11 @@ Your cooperation is appreciated. 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 ... 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 - 50 = /dev/ttyIOC0 Altix serial card - ... - 81 = /dev/ttyIOC31 Altix serial card - 82 = /dev/ttyVR0 NEC VR4100 series SIU - 83 = /dev/ttyVR1 NEC VR4100 series DSIU - 84 = /dev/ttyIOC84 Altix ioc4 serial card - ... - 115 = /dev/ttyIOC115 Altix ioc4 serial card - 116 = /dev/ttySIOC0 Altix ioc3 serial card - ... - 147 = /dev/ttySIOC31 Altix ioc3 serial card - 148 = /dev/ttyPSC0 PPC PSC - port 0 - ... - 153 = /dev/ttyPSC5 PPC PSC - port 5 - 154 = /dev/ttyAT0 ATMEL serial port 0 - ... - 169 = /dev/ttyAT15 ATMEL serial port 15 - 170 = /dev/ttyNX0 Hilscher netX serial port 0 + 50 = /dev/ttyIOC40 Altix serial card ... - 185 = /dev/ttyNX15 Hilscher netX serial port 15 - 186 = /dev/ttyJ0 JTAG1 DCC protocol based serial port emulation + 81 = /dev/ttyIOC431 Altix serial card + 82 = /dev/ttyVR0 NEC VR4100 series SIU + 83 = /dev/ttyVR1 NEC VR4100 series DSIU 205 char Low-density serial ports (alternate device) 0 = /dev/culu0 Callout device for ttyLU0 @@ -2826,8 +2786,8 @@ Your cooperation is appreciated. 50 = /dev/cuioc40 Callout device for ttyIOC40 ... 81 = /dev/cuioc431 Callout device for ttyIOC431 - 82 = /dev/cuvr0 Callout device for ttyVR0 - 83 = /dev/cuvr1 Callout device for ttyVR1 + 82 = /dev/cuvr0 Callout device for ttyVR0 + 83 = /dev/cuvr1 Callout device for ttyVR1 206 char OnStream SC-x0 tape devices @@ -2937,6 +2897,7 @@ Your cooperation is appreciated. ... 196 = /dev/dvb/adapter3/video0 first video decoder of fourth card + 216 char Bluetooth RFCOMM TTY devices 0 = /dev/rfcomm0 First Bluetooth RFCOMM TTY device 1 = /dev/rfcomm1 Second Bluetooth RFCOMM TTY device @@ -3041,43 +3002,12 @@ Your cooperation is appreciated. ioctl()'s can be used to rewind the tape regardless of the device used to access it. -231 char InfiniBand +231 char InfiniBand MAD 0 = /dev/infiniband/umad0 1 = /dev/infiniband/umad1 - ... - 63 = /dev/infiniband/umad63 63rd InfiniBandMad device - 64 = /dev/infiniband/issm0 First InfiniBand IsSM device - 65 = /dev/infiniband/issm1 Second InfiniBand IsSM device - ... - 127 = /dev/infiniband/issm63 63rd InfiniBand IsSM device - 128 = /dev/infiniband/uverbs0 First InfiniBand verbs device - 129 = /dev/infiniband/uverbs1 Second InfiniBand verbs device - ... - 159 = /dev/infiniband/uverbs31 31st InfiniBand verbs device - -232 char Biometric Devices - 0 = /dev/biometric/sensor0/fingerprint first fingerprint sensor on first device - 1 = /dev/biometric/sensor0/iris first iris sensor on first device - 2 = /dev/biometric/sensor0/retina first retina sensor on first device - 3 = /dev/biometric/sensor0/voiceprint first voiceprint sensor on first device - 4 = /dev/biometric/sensor0/facial first facial sensor on first device - 5 = /dev/biometric/sensor0/hand first hand sensor on first device - ... - 10 = /dev/biometric/sensor1/fingerprint first fingerprint sensor on second device - ... - 20 = /dev/biometric/sensor2/fingerprint first fingerprint sensor on third device - ... - -233 char PathScale InfiniPath interconnect - 0 = /dev/ipath Primary device for programs (any unit) - 1 = /dev/ipath0 Access specifically to unit 0 - 2 = /dev/ipath1 Access specifically to unit 1 - ... - 4 = /dev/ipath3 Access specifically to unit 3 - 129 = /dev/ipath_sma Device used by Subnet Management Agent - 130 = /dev/ipath_diag Device used by diagnostics programs + ... -234-239 UNASSIGNED +232-239 UNASSIGNED 240-254 char LOCAL/EXPERIMENTAL USE 240-254 block LOCAL/EXPERIMENTAL USE @@ -3091,28 +3021,6 @@ Your cooperation is appreciated. This major is reserved to assist the expansion to a larger number space. No device nodes with this major should ever be created on the filesystem. - (This is probaly not true anymore, but I'll leave it - for now /Torben) - ----LARGE MAJORS!!!!!--- - -256 char Equinox SST multi-port serial boards - 0 = /dev/ttyEQ0 First serial port on first Equinox SST board - 127 = /dev/ttyEQ127 Last serial port on first Equinox SST board - 128 = /dev/ttyEQ128 First serial port on second Equinox SST board - ... - 1027 = /dev/ttyEQ1027 Last serial port on eighth Equinox SST board - -256 block Resident Flash Disk Flash Translation Layer - 0 = /dev/rfda First RFD FTL layer - 16 = /dev/rfdb Second RFD FTL layer - ... - 240 = /dev/rfdp 16th RFD FTL layer - -257 char Phoenix Technologies Cryptographic Services Driver - 0 = /dev/ptlsec Crypto Services Driver - - **** ADDITIONAL /dev DIRECTORY ENTRIES diff --git a/Documentation/digiepca.txt b/Documentation/digiepca.txt index f2560e22f..88820fe38 100644 --- a/Documentation/digiepca.txt +++ b/Documentation/digiepca.txt @@ -2,7 +2,7 @@ NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at http://www.digi.com for PCI cards. They no longer maintain this driver, and have no 2.6 driver for ISA cards. -This driver requires a number of user-space tools. They can be acquired from +This driver requires a number of user-space tools. They can be aquired from http://www.digi.com, but only works with 2.4 kernels. diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 63c2d0c55..24adfe9af 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff @@ -135,7 +135,6 @@ tags times.h* tkparse trix_boot.h -utsrelease.h* version.h* vmlinux vmlinux-* diff --git a/Documentation/driver-model/overview.txt b/Documentation/driver-model/overview.txt index 2050c9ffc..ac4a7a737 100644 --- a/Documentation/driver-model/overview.txt +++ b/Documentation/driver-model/overview.txt @@ -18,7 +18,7 @@ Traditional driver models implemented some sort of tree-like structure (sometimes just a list) for the devices they control. There wasn't any uniformity across the different bus types. -The current driver model provides a common, uniform data model for describing +The current driver model provides a comon, uniform data model for describing a bus and the devices that can appear under the bus. The unified bus model includes a set of common attributes which all busses carry, and a set of common callbacks, such as device discovery during bus probing, bus diff --git a/Documentation/drivers/edac/edac.txt b/Documentation/drivers/edac/edac.txt index 7b3d969d2..70d96a62e 100644 --- a/Documentation/drivers/edac/edac.txt +++ b/Documentation/drivers/edac/edac.txt @@ -35,14 +35,15 @@ the vendor should tie the parity status bits to 0 if they do not intend to generate parity. Some vendors do not do this, and thus the parity bit can "float" giving false positives. -[There are patches in the kernel queue which will allow for storage of -quirks of PCI devices reporting false parity positives. The 2.6.18 -kernel should have those patches included. When that becomes available, -then EDAC will be patched to utilize that information to "skip" such -devices.] +The PCI Parity EDAC device has the ability to "skip" known flaky +cards during the parity scan. These are set by the parity "blacklist" +interface in the sysfs for PCI Parity. (See the PCI section in the sysfs +section below.) There is also a parity "whitelist" which is used as +an explicit list of devices to scan, while the blacklist is a list +of devices to skip. -EDAC will have future error detectors that will be integrated with -EDAC or added to it, in the following list: +EDAC will have future error detectors that will be added or integrated +into EDAC in the following list: MCE Machine Check Exception MCA Machine Check Architecture @@ -92,24 +93,22 @@ EDAC lives in the /sys/devices/system/edac directory. Within this directory there currently reside 2 'edac' components: mc memory controller(s) system - pci PCI control and status system + pci PCI status system ============================================================================ Memory Controller (mc) Model First a background on the memory controller's model abstracted in EDAC. -Each 'mc' device controls a set of DIMM memory modules. These modules are +Each mc device controls a set of DIMM memory modules. These modules are laid out in a Chip-Select Row (csrowX) and Channel table (chX). There can -be multiple csrows and multiple channels. +be multiple csrows and two channels. Memory controllers allow for several csrows, with 8 csrows being a typical value. Yet, the actual number of csrows depends on the electrical "loading" of a given motherboard, memory controller and DIMM characteristics. Dual channels allows for 128 bit data transfers to the CPU from memory. -Some newer chipsets allow for more than 2 channels, like Fully Buffered DIMMs -(FB-DIMMs). The following example will assume 2 channels: Channel 0 Channel 1 @@ -235,15 +234,23 @@ Polling period control file: The time period, in milliseconds, for polling for error information. Too small a value wastes resources. Too large a value might delay necessary handling of errors and might loose valuable information for - locating the error. 1000 milliseconds (once each second) is the current - default. Systems which require all the bandwidth they can get, may - increase this. + locating the error. 1000 milliseconds (once each second) is about + right for most uses. LOAD TIME: module/kernel parameter: poll_msec=[0|1] RUN TIME: echo "1000" >/sys/devices/system/edac/mc/poll_msec +Module Version read-only attribute file: + + 'mc_version' + + The EDAC CORE module's version and compile date are shown here to + indicate what EDAC is running. + + + ============================================================================ 'mcX' DIRECTORIES @@ -277,6 +284,35 @@ Seconds since last counter reset control file: +DIMM capability attribute file: + + 'edac_capability' + + The EDAC (Error Detection and Correction) capabilities/modes of + the memory controller hardware. + + +DIMM Current Capability attribute file: + + 'edac_current_capability' + + The EDAC capabilities available with the hardware + configuration. This may not be the same as "EDAC capability" + if the correct memory is not used. If a memory controller is + capable of EDAC, but DIMMs without check bits are in use, then + Parity, SECDED, S4ECD4ED capabilities will not be available + even though the memory controller might be capable of those + modes with the proper memory loaded. + + +Memory Type supported on this controller attribute file: + + 'supported_mem_type' + + This attribute file displays the memory type, usually + buffered and unbuffered DIMMs. + + Memory Controller name attribute file: 'mc_name' @@ -285,6 +321,16 @@ Memory Controller name attribute file: that is being utilized. +Memory Controller Module name attribute file: + + 'module_name' + + This attribute file displays the memory controller module name, + version and date built. The name of the memory controller + hardware - some drivers work with multiple controllers and + this field shows which hardware is present. + + Total memory managed by this memory controller attribute file: 'size_mb' @@ -386,9 +432,6 @@ Memory Type attribute file: This attribute file will display what type of memory is currently on this csrow. Normally, either buffered or unbuffered memory. - Examples: - Registered-DDR - Unbuffered-DDR EDAC Mode of operation attribute file: @@ -403,13 +446,8 @@ Device type attribute file: 'dev_type' - This attribute file will display what type of DRAM device is - being utilized on this DIMM. - Examples: - x1 - x2 - x4 - x8 + This attribute file will display what type of DIMM device is + being utilized. Example: x4 Channel 0 CE Count attribute file: @@ -484,10 +522,10 @@ SYSTEM LOGGING If logging for UEs and CEs are enabled then system logs will have error notices indicating errors that have been detected: -EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, +MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, channel 1 "DIMM_B1": amd76x_edac -EDAC MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0, +MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0, channel 1 "DIMM_B1": amd76x_edac @@ -572,4 +610,64 @@ Parity Count: +PCI Device Whitelist: + + 'pci_parity_whitelist' + + This control file allows for an explicit list of PCI devices to be + scanned for parity errors. Only devices found on this list will + be examined. The list is a line of hexadecimal VENDOR and DEVICE + ID tuples: + + 1022:7450,1434:16a6 + + One or more can be inserted, separated by a comma. + + To write the above list doing the following as one command line: + + echo "1022:7450,1434:16a6" + > /sys/devices/system/edac/pci/pci_parity_whitelist + + + + To display what the whitelist is, simply 'cat' the same file. + + +PCI Device Blacklist: + + 'pci_parity_blacklist' + + This control file allows for a list of PCI devices to be + skipped for scanning. + The list is a line of hexadecimal VENDOR and DEVICE ID tuples: + + 1022:7450,1434:16a6 + + One or more can be inserted, separated by a comma. + + To write the above list doing the following as one command line: + + echo "1022:7450,1434:16a6" + > /sys/devices/system/edac/pci/pci_parity_blacklist + + + To display what the whitelist currently contains, + simply 'cat' the same file. + ======================================================================= + +PCI Vendor and Devices IDs can be obtained with the lspci command. Using +the -n option lspci will display the vendor and device IDs. The system +administrator will have to determine which devices should be scanned or +skipped. + + + +The two lists (white and black) are prioritized. blacklist is the lower +priority and will NOT be utilized when a whitelist has been set. +Turn OFF a whitelist by an empty echo command: + + echo > /sys/devices/system/edac/pci/pci_parity_whitelist + +and any previous blacklist will be utilized. + diff --git a/Documentation/fb/fbcon.txt b/Documentation/fb/fbcon.txt index f373df12e..08dce0f63 100644 --- a/Documentation/fb/fbcon.txt +++ b/Documentation/fb/fbcon.txt @@ -135,10 +135,10 @@ C. Boot options The angle can be changed anytime afterwards by 'echoing' the same numbers to any one of the 2 attributes found in - /sys/class/graphics/fbcon + /sys/class/graphics/fb{x} - rotate - rotate the display of the active console - rotate_all - rotate the display of all consoles + con_rotate - rotate the display of the active console + con_rotate_all - rotate the display of all consoles Console rotation will only become available if Console Rotation Support is compiled in your kernel. @@ -148,177 +148,5 @@ C. Boot options Actually, the underlying fb driver is totally ignorant of console rotation. -C. Attaching, Detaching and Unloading - -Before going on on how to attach, detach and unload the framebuffer console, an -illustration of the dependencies may help. - -The console layer, as with most subsystems, needs a driver that interfaces with -the hardware. Thus, in a VGA console: - -console ---> VGA driver ---> hardware. - -Assuming the VGA driver can be unloaded, one must first unbind the VGA driver -from the console layer before unloading the driver. The VGA driver cannot be -unloaded if it is still bound to the console layer. (See -Documentation/console/console.txt for more information). - -This is more complicated in the case of the the framebuffer console (fbcon), -because fbcon is an intermediate layer between the console and the drivers: - -console ---> fbcon ---> fbdev drivers ---> hardware - -The fbdev drivers cannot be unloaded if it's bound to fbcon, and fbcon cannot -be unloaded if it's bound to the console layer. - -So to unload the fbdev drivers, one must first unbind fbcon from the console, -then unbind the fbdev drivers from fbcon. Fortunately, unbinding fbcon from -the console layer will automatically unbind framebuffer drivers from -fbcon. Thus, there is no need to explicitly unbind the fbdev drivers from -fbcon. - -So, how do we unbind fbcon from the console? Part of the answer is in -Documentation/console/console.txt. To summarize: - -Echo a value to the bind file that represents the framebuffer console -driver. So assuming vtcon1 represents fbcon, then: - -echo 1 > sys/class/vtconsole/vtcon1/bind - attach framebuffer console to - console layer -echo 0 > sys/class/vtconsole/vtcon1/bind - detach framebuffer console from - console layer - -If fbcon is detached from the console layer, your boot console driver (which is -usually VGA text mode) will take over. A few drivers (rivafb and i810fb) will -restore VGA text mode for you. With the rest, before detaching fbcon, you -must take a few additional steps to make sure that your VGA text mode is -restored properly. The following is one of the several methods that you can do: - -1. Download or install vbetool. This utility is included with most - distributions nowadays, and is usually part of the suspend/resume tool. - -2. In your kernel configuration, ensure that CONFIG_FRAMEBUFFER_CONSOLE is set - to 'y' or 'm'. Enable one or more of your favorite framebuffer drivers. - -3. Boot into text mode and as root run: - - vbetool vbestate save > - - The above command saves the register contents of your graphics - hardware to . You need to do this step only once as - the state file can be reused. - -4. If fbcon is compiled as a module, load fbcon by doing: - - modprobe fbcon - -5. Now to detach fbcon: - - vbetool vbestate restore < && \ - echo 0 > /sys/class/vtconsole/vtcon1/bind - -6. That's it, you're back to VGA mode. And if you compiled fbcon as a module, - you can unload it by 'rmmod fbcon' - -7. To reattach fbcon: - - echo 1 > /sys/class/vtconsole/vtcon1/bind - -8. Once fbcon is unbound, all drivers registered to the system will also -become unbound. This means that fbcon and individual framebuffer drivers -can be unloaded or reloaded at will. Reloading the drivers or fbcon will -automatically bind the console, fbcon and the drivers together. Unloading -all the drivers without unloading fbcon will make it impossible for the -console to bind fbcon. - -Notes for vesafb users: -======================= - -Unfortunately, if your bootline includes a vga=xxx parameter that sets the -hardware in graphics mode, such as when loading vesafb, vgacon will not load. -Instead, vgacon will replace the default boot console with dummycon, and you -won't get any display after detaching fbcon. Your machine is still alive, so -you can reattach vesafb. However, to reattach vesafb, you need to do one of -the following: - -Variation 1: - - a. Before detaching fbcon, do - - vbetool vbemode save > # do once for each vesafb mode, - # the file can be reused - - b. Detach fbcon as in step 5. - - c. Attach fbcon - - vbetool vbestate restore < && \ - echo 1 > /sys/class/vtconsole/vtcon1/bind - -Variation 2: - - a. Before detaching fbcon, do: - echo > /sys/class/tty/console/bind - - - vbetool vbemode get - - b. Take note of the mode number - - b. Detach fbcon as in step 5. - - c. Attach fbcon: - - vbetool vbemode set && \ - echo 1 > /sys/class/vtconsole/vtcon1/bind - -Samples: -======== - -Here are 2 sample bash scripts that you can use to bind or unbind the -framebuffer console driver if you are in an X86 box: - ---------------------------------------------------------------------------- -#!/bin/bash -# Unbind fbcon - -# Change this to where your actual vgastate file is located -# Or Use VGASTATE=$1 to indicate the state file at runtime -VGASTATE=/tmp/vgastate - -# path to vbetool -VBETOOL=/usr/local/bin - - -for (( i = 0; i < 16; i++)) -do - if test -x /sys/class/vtconsole/vtcon$i; then - if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` \ - = 1 ]; then - if test -x $VBETOOL/vbetool; then - echo Unbinding vtcon$i - $VBETOOL/vbetool vbestate restore < $VGASTATE - echo 0 > /sys/class/vtconsole/vtcon$i/bind - fi - fi - fi -done - ---------------------------------------------------------------------------- -#!/bin/bash -# Bind fbcon - -for (( i = 0; i < 16; i++)) -do - if test -x /sys/class/vtconsole/vtcon$i; then - if [ `cat /sys/class/vtconsole/vtcon$i/name | grep -c "frame buffer"` \ - = 1 ]; then - echo Unbinding vtcon$i - echo 1 > /sys/class/vtconsole/vtcon$i/bind - fi - fi -done ---------------------------------------------------------------------------- - --- +--- Antonino Daplas diff --git a/Documentation/fb/imacfb.txt b/Documentation/fb/imacfb.txt deleted file mode 100644 index 759028545..000000000 --- a/Documentation/fb/imacfb.txt +++ /dev/null @@ -1,31 +0,0 @@ - -What is imacfb? -=============== - -This is a generic EFI platform driver for Intel based Apple computers. -Imacfb is only for EFI booted Intel Macs. - -Supported Hardware -================== - -iMac 17"/20" -Macbook -Macbook Pro 15"/17" -MacMini - -How to use it? -============== - -Imacfb does not have any kind of autodetection of your machine. -You have to add the fillowing kernel parameters in your elilo.conf: - Macbook : - video=imacfb:macbook - MacMini : - video=imacfb:mini - Macbook Pro 15", iMac 17" : - video=imacfb:i17 - Macbook Pro 17", iMac 20" : - video=imacfb:i20 - --- -Edgar Hucek diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 552507fe9..43ab11996 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -6,6 +6,17 @@ be removed from this file. --------------------------- +What: devfs +When: July 2005 +Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs + function calls throughout the kernel tree +Why: It has been unmaintained for a number of years, has unfixable + races, contains a naming policy within the kernel that is + against the LSB, and can be replaced by using udev. +Who: Greg Kroah-Hartman + +--------------------------- + What: RAW driver (CONFIG_RAW_DRIVER) When: December 2005 Why: declared obsolete since kernel 2.6.3 @@ -22,12 +33,27 @@ Who: Adrian Bunk --------------------------- +What: RCU API moves to EXPORT_SYMBOL_GPL +When: April 2006 +Files: include/linux/rcupdate.h, kernel/rcupdate.c +Why: Outside of Linux, the only implementations of anything even + vaguely resembling RCU that I am aware of are in DYNIX/ptx, + VM/XA, Tornado, and K42. I do not expect anyone to port binary + drivers or kernel modules from any of these, since the first two + are owned by IBM and the last two are open-source research OSes. + So these will move to GPL after a grace period to allow + people, who might be using implementations that I am not aware + of, to adjust to this upcoming change. +Who: Paul E. McKenney + +--------------------------- + What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN -When: November 2006 +When: November 2005 Why: Deprecated in favour of the new ioctl-based rawiso interface, which is more efficient. You should really be using libraw1394 for raw1394 access anyway. -Who: Jody McIntyre +Who: Jody McIntyre --------------------------- @@ -55,6 +81,14 @@ Who: Mauro Carvalho Chehab --------------------------- +What: remove EXPORT_SYMBOL(insert_resource) +When: April 2006 +Files: kernel/resource.c +Why: No modular usage in the kernel. +Who: Adrian Bunk + +--------------------------- + What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) When: November 2005 Files: drivers/pcmcia/: pcmcia_ioctl.c @@ -113,6 +147,16 @@ Who: NeilBrown --------------------------- +What: au1x00_uart driver +When: January 2006 +Why: The 8250 serial driver now has the ability to deal with the differences + between the standard 8250 family of UARTs and their slightly strange + brother on Alchemy SOCs. The loss of features is not considered an + issue. +Who: Ralf Baechle + +--------------------------- + What: eepro100 network driver When: January 2007 Why: replaced by the e100 driver @@ -120,13 +164,6 @@ Who: Adrian Bunk --------------------------- -What: drivers depending on OSS_OBSOLETE_DRIVER -When: options in 2.6.20, code in 2.6.22 -Why: OSS drivers with ALSA replacements -Who: Adrian Bunk - ---------------------------- - What: pci_module_init(driver) When: January 2007 Why: Is replaced by pci_register_driver(pci_driver). @@ -155,13 +192,14 @@ Who: Jean Delvare --------------------------- -What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports - (temporary transition config option provided until then) - The transition config option will also be removed at the same time. -When: before 2.6.19 -Why: Unused symbols are both increasing the size of the kernel binary - and are often a sign of "wrong API" -Who: Arjan van de Ven +What: remove EXPORT_SYMBOL(tasklist_lock) +When: August 2006 +Files: kernel/fork.c +Why: tasklist_lock protects the kernel internal task list. Modules have + no business looking at it, and all instances in drivers have been due + to use of too-lowlevel APIs. Having this symbol exported prevents + moving to more scalable locking schemes for the task list. +Who: Christoph Hellwig --------------------------- @@ -174,6 +212,15 @@ Who: Greg Kroah-Hartman --------------------------- +What: Support for NEC DDB5074 and DDB5476 evaluation boards. +When: June 2006 +Why: Board specific code doesn't build anymore since ~2.6.0 and no + users have complained indicating there is no more need for these + boards. This should really be considered a last call. +Who: Ralf Baechle + +--------------------------- + What: USB driver API moves to EXPORT_SYMBOL_GPL When: Febuary 2008 Files: include/linux/usb.h, drivers/usb/core/driver.c @@ -201,96 +248,3 @@ Why: The interface no longer has any callers left in the kernel. It Who: Nick Piggin --------------------------- - -What: Support for the MIPS EV96100 evaluation board -When: September 2006 -Why: Does no longer build since at least November 15, 2003, apparently - no userbase left. -Who: Ralf Baechle - ---------------------------- - -What: Support for the Momentum / PMC-Sierra Jaguar ATX evaluation board -When: September 2006 -Why: Does no longer build since quite some time, and was never popular, - due to the platform being replaced by successor models. Apparently - no user base left. It also is one of the last users of - WANT_PAGE_VIRTUAL. -Who: Ralf Baechle - ---------------------------- - -What: Support for the Momentum Ocelot, Ocelot 3, Ocelot C and Ocelot G -When: September 2006 -Why: Some do no longer build and apparently there is no user base left - for these platforms. -Who: Ralf Baechle - ---------------------------- - -What: Support for MIPS Technologies' Altas and SEAD evaluation board -When: September 2006 -Why: Some do no longer build and apparently there is no user base left - for these platforms. Hardware out of production since several years. -Who: Ralf Baechle - ---------------------------- - -What: Support for the IT8172-based platforms, ITE 8172G and Globespan IVR -When: September 2006 -Why: Code does no longer build since at least 2.6.0, apparently there is - no user base left for these platforms. Hardware out of production - since several years and hardly a trace of the manufacturer left on - the net. -Who: Ralf Baechle - ---------------------------- - -What: Interrupt only SA_* flags -When: Januar 2007 -Why: The interrupt related SA_* flags are replaced by IRQF_* to move them - out of the signal namespace. - -Who: Thomas Gleixner - ---------------------------- - -What: i2c-ite and i2c-algo-ite drivers -When: September 2006 -Why: These drivers never compiled since they were added to the kernel - tree 5 years ago. This feature removal can be reevaluated if - someone shows interest in the drivers, fixes them and takes over - maintenance. - http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448 -Who: Jean Delvare - ---------------------------- - -What: Bridge netfilter deferred IPv4/IPv6 output hook calling -When: January 2007 -Why: The deferred output hooks are a layering violation causing unusual - and broken behaviour on bridge devices. Examples of things they - break include QoS classifation using the MARK or CLASSIFY targets, - the IPsec policy match and connection tracking with VLANs on a - bridge. Their only use is to enable bridge output port filtering - within iptables with the physdev match, which can also be done by - combining iptables and ebtables using netfilter marks. Until it - will get removed the hook deferral is disabled by default and is - only enabled when needed. - -Who: Patrick McHardy - ---------------------------- - -What: frame diverter -When: November 2006 -Why: The frame diverter is included in most distribution kernels, but is - broken. It does not correctly handle many things: - - IPV6 - - non-linear skb's - - network device RCU on removal - - input frames not correctly checked for protocol errors - It also adds allocation overhead even if not enabled. - It is not clear if anyone is still using it. -Who: Stephen Hemminger - diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 16dec61d7..66fdc0744 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX @@ -62,8 +62,8 @@ ramfs-rootfs-initramfs.txt - info on the 'in memory' filesystems ramfs, rootfs and initramfs. reiser4.txt - info on the Reiser4 filesystem based on dancing tree algorithms. -relay.txt - - info on relay, for efficient streaming from kernel to user space. +relayfs.txt + - info on relayfs, for efficient streaming from kernel to user space. romfs.txt - description of the ROMFS filesystem. smbfs.txt diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 247d7f619..1045da582 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking @@ -99,7 +99,7 @@ prototypes: int (*sync_fs)(struct super_block *sb, int wait); void (*write_super_lockfs) (struct super_block *); void (*unlockfs) (struct super_block *); - int (*statfs) (struct dentry *, struct kstatfs *); + int (*statfs) (struct super_block *, struct kstatfs *); int (*remount_fs) (struct super_block *, int *, char *); void (*clear_inode) (struct inode *); void (*umount_begin) (struct super_block *); @@ -142,16 +142,15 @@ see also dquot_operations section. --------------------------- file_system_type --------------------------- prototypes: - int (*get_sb) (struct file_system_type *, int, - const char *, void *, struct vfsmount *); + struct super_block *(*get_sb) (struct file_system_type *, int, + const char *, void *); void (*kill_sb) (struct super_block *); locking rules: may block BKL get_sb yes yes kill_sb yes yes -->get_sb() returns error or 0 with locked superblock attached to the vfsmount -(exclusive on ->s_umount). +->get_sb() returns error or a locked superblock (exclusive on ->s_umount). ->kill_sb() takes a write-locked superblock, does all shutdown work on it, unlocks and drops the reference. diff --git a/Documentation/filesystems/automount-support.txt b/Documentation/filesystems/automount-support.txt index 7cac200e2..58c65a171 100644 --- a/Documentation/filesystems/automount-support.txt +++ b/Documentation/filesystems/automount-support.txt @@ -19,7 +19,7 @@ following procedure: (2) Have the follow_link() op do the following steps: - (a) Call vfs_kern_mount() to call the appropriate filesystem to set up a + (a) Call do_kern_mount() to call the appropriate filesystem to set up a superblock and gain a vfsmount structure representing it. (b) Copy the nameidata provided as an argument and substitute the dentry diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt deleted file mode 100644 index 1dd601b50..000000000 --- a/Documentation/filesystems/caching/backend-api.txt +++ /dev/null @@ -1,357 +0,0 @@ - ========================== - FS-CACHE CACHE BACKEND API - ========================== - -The FS-Cache system provides an API by which actual caches can be supplied to -FS-Cache for it to then serve out to network filesystems and other interested -parties. - -This API is declared in . - - -==================================== -INITIALISING AND REGISTERING A CACHE -==================================== - -To start off, a cache definition must be initialised and registered for each -cache the backend wants to make available. For instance, CacheFS does this in -the fill_super() operation on mounting. - -The cache definition (struct fscache_cache) should be initialised by calling: - - void fscache_init_cache(struct fscache_cache *cache, - struct fscache_cache_ops *ops, - const char *idfmt, - ...) - -Where: - - (*) "cache" is a pointer to the cache definition; - - (*) "ops" is a pointer to the table of operations that the backend supports on - this cache; - - (*) and a format and printf-style arguments for constructing a label for the - cache. - - -The cache should then be registered with FS-Cache by passing a pointer to the -previously initialised cache definition to: - - int fscache_add_cache(struct fscache_cache *cache, - struct fscache_object *fsdef, - const char *tagname); - -Two extra arguments should also be supplied: - - (*) "fsdef" which should point to the object representation for the FS-Cache - master index in this cache. Netfs primary index entries will be created - here. - - (*) "tagname" which, if given, should be a text string naming this cache. If - this is NULL, the identifier will be used instead. For CacheFS, the - identifier is set to name the underlying block device and the tag can be - supplied by mount. - -This function may return -ENOMEM if it ran out of memory or -EEXIST if the tag -is already in use. 0 will be returned on success. - - -===================== -UNREGISTERING A CACHE -===================== - -A cache can be withdrawn from the system by calling this function with a -pointer to the cache definition: - - void fscache_withdraw_cache(struct fscache_cache *cache) - -In CacheFS's case, this is called by put_super(). - - -================== -FS-CACHE UTILITIES -================== - -FS-Cache provides some utilities that a cache backend may make use of: - - (*) Find the parent of an object: - - struct fscache_object * - fscache_find_parent_object(struct fscache_object *object) - - This allows a backend to find the logical parent of an index or data file - in the cache hierarchy. - - (*) Note occurrence of an I/O error in a cache: - - void fscache_io_error(struct fscache_cache *cache) - - This tells FS-Cache that an I/O error occurred in the cache. After this - has been called, only resource dissociation operations (object and page - release) will be passed from the netfs to the cache backend for the - specified cache. - - This does not actually withdraw the cache. That must be done separately. - - (*) Get an extra reference to a read or write context: - - void *fscache_get_context(struct fscache_cookie *cookie, void *context) - - and release a reference: - - void *fscache_put_context(struct fscache_cookie *cookie, void *context) - - These should be used to maintain the presence of the read or write context - passed to the cache read/write functions. This context must then be - passed to the I/O completion function. - - -======================== -RELEVANT DATA STRUCTURES -======================== - - (*) Index/Data file FS-Cache representation cookie: - - struct fscache_cookie { - struct fscache_object_def *def; - struct fscache_netfs *netfs; - void *netfs_data; - ... - }; - - The fields that might be of use to the backend describe the object - definition, the netfs definition and the netfs's data for this cookie. - The object definition contain functions supplied by the netfs for loading - and matching index entries; these are required to provide some of the - cache operations. - - (*) In-cache object representation: - - struct fscache_object { - struct fscache_cache *cache; - struct fscache_cookie *cookie; - unsigned long flags; - #define FSCACHE_OBJECT_RECYCLING 1 - ... - }; - - Structures of this type should be allocated by the cache backend and - passed to FS-Cache when requested by the appropriate cache operation. In - the case of CacheFS, they're embedded in CacheFS's internal object - structures. - - Each object contains a pointer to the cookie that represents the object it - is backing. It also contains a flag that indicates whether the object is - being retired when put_object() is called. This should be initialised by - calling fscache_object_init(object). - - -================ -CACHE OPERATIONS -================ - -The cache backend provides FS-Cache with a table of operations that can be -performed on the denizens of the cache. These are held in a structure of type: - - struct fscache_cache_ops - - (*) Name of cache provider [mandatory]: - - const char *name - - This isn't strictly an operation, but should be pointed at a string naming - the backend. - - (*) Object lookup [mandatory]: - - struct fscache_object *(*lookup_object)(struct fscache_cache *cache, - struct fscache_object *parent, - struct fscache_cookie *cookie) - - This method is used to look up an object in the specified cache, given a - pointer to the parent object and the cookie to which the object will be - attached. This should instantiate that object in the cache if it can, or - return -ENOBUFS or -ENOMEM if it can't. - - (*) Increment object refcount [mandatory]: - - struct fscache_object *(*grab_object)(struct fscache_object *object) - - This method is called to increment the reference count on an object. It - may fail (for instance if the cache is being withdrawn) by returning NULL. - It should return the object pointer if successful. - - (*) Lock/Unlock object [mandatory]: - - void (*lock_object)(struct fscache_object *object) - void (*unlock_object)(struct fscache_object *object) - - These methods are used to exclusively lock an object. It must be possible - to schedule with the lock held, so a spinlock isn't sufficient. - - (*) Pin/Unpin object [optional]: - - int (*pin_object)(struct fscache_object *object) - void (*unpin_object)(struct fscache_object *object) - - These methods are used to pin an object into the cache. Once pinned an - object cannot be reclaimed to make space. Return -ENOSPC if there's not - enough space in the cache to permit this. - - (*) Update object [mandatory]: - - int (*update_object)(struct fscache_object *object) - - This is called to update the index entry for the specified object. The - new information should be in object->cookie->netfs_data. This can be - obtained by calling object->cookie->def->get_aux()/get_attr(). - - (*) Release object reference [mandatory]: - - void (*put_object)(struct fscache_object *object) - - This method is used to discard a reference to an object. The object may - be destroyed when all the references held by FS-Cache are released. - - (*) Synchronise a cache [mandatory]: - - void (*sync)(struct fscache_cache *cache) - - This is called to ask the backend to synchronise a cache with its backing - device. - - (*) Dissociate a cache [mandatory]: - - void (*dissociate_pages)(struct fscache_cache *cache) - - This is called to ask a cache to perform any page dissociations as part of - cache withdrawal. - - (*) Set the data size on a cache file [mandatory]: - - int (*set_i_size)(struct fscache_object *object, loff_t i_size); - - This is called to indicate to the cache the maximum size a file may reach. - The cache may use this to reserve space on the cache. It may also return - -ENOBUFS to indicate that insufficient space is available to expand the - metadata used to track the data. It should return 0 if successful or - -ENOMEM or -EIO on error. - - (*) Reserve cache space for an object's data [optional]: - - int (*reserve_space)(struct fscache_object *object, loff_t size); - - This is called to request that cache space be reserved to hold the data - for an object and the metadata used to track it. Zero size should be - taken as request to cancel a reservation. - - This should return 0 if successful, -ENOSPC if there isn't enough space - available, or -ENOMEM or -EIO on other errors. - - The reservation may exceed the size of the object, thus permitting future - expansion. If the amount of space consumed by an object would exceed the - reservation, it's permitted to refuse requests to allocate pages, but not - required. An object may be pruned down to its reservation size if larger - than that already. - - (*) Request page be read from cache [mandatory]: - - int (*read_or_alloc_page)(struct fscache_object *object, - struct page *page, - fscache_rw_complete_t end_io_func, - void *end_io_data, - gfp_t gfp) - - This is called to attempt to read a netfs page from the cache, or to - reserve a backing block if not. FS-Cache will have done as much checking - as it can before calling, but most of the work belongs to the backend. - - If there's no page in the cache, then -ENODATA should be returned if the - backend managed to reserve a backing block; -ENOBUFS, -ENOMEM or -EIO if - it didn't. - - If there is a page in the cache, then a read operation should be queued - and 0 returned. When the read finishes, end_io_func() should be called - with the following arguments: - - (*end_io_func)(object->cookie->netfs_data, - page, - end_io_data, - error); - - The mark_pages_cached() cookie operation should be called for the page if - any cache metadata is retained. This will indicate to the netfs that the - page needs explicit uncaching. This operation takes a pagevec, thus - allowing several pages to be marked at once. - - (*) Request pages be read from cache [mandatory]: - - int (*read_or_alloc_pages)(struct fscache_object *object, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages, - fscache_rw_complete_t end_io_func, - void *end_io_data, - gfp_t gfp) - - This is like the previous operation, except it will be handed a list of - pages instead of one page. Any pages on which a read operation is started - must be added to the page cache for the specified mapping and also to the - LRU. Such pages must also be removed from the pages list and nr_pages - decremented per page. - - If there was an error such as -ENOMEM, then that should be returned; else - if one or more pages couldn't be read or allocated, then -ENOBUFS should - be returned; else if one or more pages couldn't be read, then -ENODATA - should be returned. If all the pages are dispatched then 0 should be - returned. - - (*) Request page be allocated in the cache [mandatory]: - - int (*allocate_page)(struct fscache_object *object, - struct page *page, - gfp_t gfp) - - This is like read_or_alloc_page(), except that it shouldn't read from the - cache, even if there's data there that could be retrieved. It should, - however, set up any internal metadata required such that write_page() can - write to the cache. - - If there's no backing block available, then -ENOBUFS should be returned - (or -ENOMEM or -EIO if there were other problems). If a block is - successfully allocated, then the netfs page should be marked and 0 - returned. - - (*) Request page be written to cache [mandatory]: - - int (*write_page)(struct fscache_object *object, - struct page *page, - fscache_rw_complete_t end_io_func, - void *end_io_data, - gfp_t gfp) - - This is called to write from a page on which there was a previously - successful read_or_alloc_page() call. FS-Cache filters out pages that - don't have mappings. - - If there's no backing block available, then -ENOBUFS should be returned - (or -ENOMEM or -EIO if there were other problems). - - If the write operation could be queued, then 0 should be returned. When - the write completes, end_io_func() should be called with the following - arguments: - - (*end_io_func)(object->cookie->netfs_data, - page, - end_io_data, - error); - - (*) Discard retained per-page metadata [mandatory]: - - void (*uncache_pages)(struct fscache_object *object, - struct pagevec *pagevec) - - This is called when one or more netfs pages are being evicted from the - pagecache. The cache backend should tear down any internal representation - or tracking it maintains. diff --git a/Documentation/filesystems/caching/cachefiles.txt b/Documentation/filesystems/caching/cachefiles.txt deleted file mode 100644 index 37b6385e0..000000000 --- a/Documentation/filesystems/caching/cachefiles.txt +++ /dev/null @@ -1,281 +0,0 @@ - =============================================== - CacheFiles: CACHE ON ALREADY MOUNTED FILESYSTEM - =============================================== - -Contents: - - (*) Overview. - - (*) Requirements. - - (*) Configuration. - - (*) Starting the cache. - - (*) Things to avoid. - - -======== -OVERVIEW -======== - -CacheFiles is a caching backend that's meant to use as a cache a directory on -an already mounted filesystem of a local type (such as Ext3). - -CacheFiles uses a userspace daemon to do some of the cache management - such as -reaping stale nodes and culling. This is called cachefilesd and lives in -/sbin. - -The filesystem and data integrity of the cache are only as good as those of the -filesystem providing the backing services. Note that CacheFiles does not -attempt to journal anything since the journalling interfaces of the various -filesystems are very specific in nature. - -CacheFiles creates a proc-file - "/proc/fs/cachefiles" - that is used for -communication with the daemon. Only one thing may have this open at once, and -whilst it is open, a cache is at least partially in existence. The daemon -opens this and sends commands down it to control the cache. - -CacheFiles is currently limited to a single cache. - -CacheFiles attempts to maintain at least a certain percentage of free space on -the filesystem, shrinking the cache by culling the objects it contains to make -space if necessary - see the "Cache Culling" section. This means it can be -placed on the same medium as a live set of data, and will expand to make use of -spare space and automatically contract when the set of data requires more -space. - - -============ -REQUIREMENTS -============ - -The use of CacheFiles and its daemon requires the following features to be -available in the system and in the cache filesystem: - - - dnotify. - - - extended attributes (xattrs). - - - openat() and friends. - - - bmap() support on files in the filesystem (FIBMAP ioctl). - - - The use of bmap() to detect a partial page at the end of the file. - -It is strongly recommended that the "dir_index" option is enabled on Ext3 -filesystems being used as a cache. - - -============= -CONFIGURATION -============= - -The cache is configured by a script in /etc/cachefilesd.conf. These commands -set up cache ready for use. The following script commands are available: - - (*) brun % - (*) bcull % - (*) bstop % - - Configure the culling limits. Optional. See the section on culling - The defaults are 7%, 5% and 1% respectively. - - (*) dir - - Specify the directory containing the root of the cache. Mandatory. - - (*) tag - - Specify a tag to FS-Cache to use in distinguishing multiple caches. - Optional. The default is "CacheFiles". - - (*) debug - - Specify a numeric bitmask to control debugging in the kernel module. - Optional. The default is zero (all off). The following values can be - OR'd into the mask to collect various information: - - 1 Turn on trace of function entry (_enter() macros) - 2 Turn on trace of function exit (_leave() macros) - 4 Turn on trace of internal debug points (_debug()) - - This mask can also be set through /proc/sys/fs/cachefiles/debug. - - -================== -STARTING THE CACHE -================== - -The cache is started by running the daemon. The daemon opens the cache proc -file, configures the cache and tells it to begin caching. At that point the -cache binds to fscache and the cache becomes live. - -The daemon is run as follows: - - /sbin/cachefilesd [-d]* [-s] [-n] [-f ] - -The flags are: - - (*) -d - - Increase the debugging level. This can be specified multiple times and - is cumulative with itself. - - (*) -s - - Send messages to stderr instead of syslog. - - (*) -n - - Don't daemonise and go into background. - - (*) -f - - Use an alternative configuration file rather than the default one. - - -=============== -THINGS TO AVOID -=============== - -Do not mount other things within the cache as this will cause problems. The -kernel module contains its own very cut-down path walking facility that ignores -mountpoints, but the daemon can't avoid them. - -Do not create, rename or unlink files and directories in the cache whilst the -cache is active, as this may cause the state to become uncertain. - -Renaming files in the cache might make objects appear to be other objects (the -filename is part of the lookup key). - -Do not change or remove the extended attributes attached to cache files by the -cache as this will cause the cache state management to get confused. - -Do not create files or directories in the cache, lest the cache get confused or -serve incorrect data. - -Do not chmod files in the cache. The module creates things with minimal -permissions to prevent random users being able to access them directly. - - -============= -CACHE CULLING -============= - -The cache may need culling occasionally to make space. This involves -discarding objects from the cache that have been used less recently than -anything else. Culling is based on the access time of data objects. Empty -directories are culled if not in use. - -Cache culling is done on the basis of the percentage of blocks available in the -underlying filesystem. There are three "limits": - - (*) brun - - If the amount of available space in the cache rises above this limit, then - culling is turned off. - - (*) bcull - - If the amount of available space in the cache falls below this limit, then - culling is started. - - (*) bstop - - If the amount of available space in the cache falls below this limit, then - no further allocation of disk space is permitted until culling has raised - the amount above this limit again. - -These must be configured thusly: - - 0 <= bstop < bcull < brun < 100 - -Note that these are percentages of available space, and do _not_ appear as 100 -minus the percentage displayed by the "df" program. - -The userspace daemon scans the cache to build up a table of cullable objects. -These are then culled in least recently used order. A new scan of the cache is -started as soon as space is made in the table. Objects will be skipped if -their atimes have changed or if the kernel module says it is still using them. - - -=============== -CACHE STRUCTURE -=============== - -The CacheFiles module will create two directories in the directory it was -given: - - (*) cache/ - - (*) graveyard/ - -The active cache objects all reside in the first directory. The CacheFiles -kernel module moves any retired or culled objects that it can't simply unlink -to the graveyard from which the daemon will actually delete them. - -The daemon uses dnotify to monitor the graveyard directory, and will delete -anything that appears therein. - - -The module represents index objects as directories with the filename "I..." or -"J...". Note that the "cache/" directory is itself a special index. - -Data objects are represented as files if they have no children, or directories -if they do. Their filenames all begin "D..." or "E...". If represented as a -directory, data objects will have a file in the directory called "data" that -actually holds the data. - -Special objects are similar to data objects, except their filenames begin -"S..." or "T...". - - -If an object has children, then it will be represented as a directory. -Immediately in the representative directory are a collection of directories -named for hash values of the child object keys with an '@' prepended. Into -this directory, if possible, will be placed the representations of the child -objects: - - INDEX INDEX INDEX DATA FILES - ========= ========== ================================= ================ - cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400 - cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...DB1ry - cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...N22ry - cache/@4a/I03nfs/@30/Ji000000000000000--fHg8hi8400/@75/Es0g000w...FP1ry - - -If the key is so long that it exceeds NAME_MAX with the decorations added on to -it, then it will be cut into pieces, the first few of which will be used to -make a nest of directories, and the last one of which will be the objects -inside the last directory. The names of the intermediate directories will have -'+' prepended: - - J1223/@23/+xy...z/+kl...m/Epqr - - -Note that keys are raw data, and not only may they exceed NAME_MAX in size, -they may also contain things like '/' and NUL characters, and so they may not -be suitable for turning directly into a filename. - -To handle this, CacheFiles will use a suitably printable filename directly and -"base-64" encode ones that aren't directly suitable. The two versions of -object filenames indicate the encoding: - - OBJECT TYPE PRINTABLE ENCODED - =============== =============== =============== - Index "I..." "J..." - Data "D..." "E..." - Special "S..." "T..." - -Intermediate directories are always "@" or "+" as appropriate. - - -Each object in the cache has an extended attribute label that holds the object -type ID (required to distinguish special objects) and the auxiliary data from -the netfs. The latter is used to detect stale objects in the cache and update -or retire them. - - -Note that CacheFiles will erase from the cache any file it doesn't recognise or -any file of an incorrect type (such as a FIFO file or a device file). diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt deleted file mode 100644 index 82c31682e..000000000 --- a/Documentation/filesystems/caching/fscache.txt +++ /dev/null @@ -1,151 +0,0 @@ - ========================== - General Filesystem Caching - ========================== - -======== -OVERVIEW -======== - -This facility is a general purpose cache for network filesystems, though it -could be used for caching other things such as ISO9660 filesystems too. - -FS-Cache mediates between cache backends (such as CacheFS) and network -filesystems: - - +---------+ - | | +--------------+ - | NFS |--+ | | - | | | +-->| CacheFS | - +---------+ | +----------+ | | /dev/hda5 | - | | | | +--------------+ - +---------+ +-->| | | - | | | |--+ - | AFS |----->| FS-Cache | - | | | |--+ - +---------+ +-->| | | - | | | | +--------------+ - +---------+ | +----------+ | | | - | | | +-->| CacheFiles | - | ISOFS |--+ | /var/cache | - | | +--------------+ - +---------+ - - -FS-Cache does not follow the idea of completely loading every netfs file -opened in its entirety into a cache before permitting it to be accessed and -then serving the pages out of that cache rather than the netfs inode because: - - (1) It must be practical to operate without a cache. - - (2) The size of any accessible file must not be limited to the size of the - cache. - - (3) The combined size of all opened files (this includes mapped libraries) - must not be limited to the size of the cache. - - (4) The user should not be forced to download an entire file just to do a - one-off access of a small portion of it (such as might be done with the - "file" program). - -It instead serves the cache out in PAGE_SIZE chunks as and when requested by -the netfs('s) using it. - - -FS-Cache provides the following facilities: - - (1) More than one cache can be used at once. Caches can be selected - explicitly by use of tags. - - (2) Caches can be added / removed at any time. - - (3) The netfs is provided with an interface that allows either party to - withdraw caching facilities from a file (required for (2)). - - (4) The interface to the netfs returns as few errors as possible, preferring - rather to let the netfs remain oblivious. - - (5) Cookies are used to represent indices, files and other objects to the - netfs. The simplest cookie is just a NULL pointer - indicating nothing - cached there. - - (6) The netfs is allowed to propose - dynamically - any index hierarchy it - desires, though it must be aware that the index search function is - recursive, stack space is limited, and indices can only be children of - indices. - - (7) Data I/O is done direct to and from the netfs's pages. The netfs - indicates that page A is at index B of the data-file represented by cookie - C, and that it should be read or written. The cache backend may or may - not start I/O on that page, but if it does, a netfs callback will be - invoked to indicate completion. The I/O may be either synchronous or - asynchronous. - - (8) Cookies can be "retired" upon release. At this point FS-Cache will mark - them as obsolete and the index hierarchy rooted at that point will get - recycled. - - (9) The netfs provides a "match" function for index searches. In addition to - saying whether a match was made or not, this can also specify that an - entry should be updated or deleted. - - -FS-Cache maintains a virtual indexing tree in which all indices, files, objects -and pages are kept. Bits of this tree may actually reside in one or more -caches. - - FSDEF - | - +------------------------------------+ - | | - NFS AFS - | | - +--------------------------+ +-----------+ - | | | | - homedir mirror afs.org redhat.com - | | | - +------------+ +---------------+ +----------+ - | | | | | | - 00001 00002 00007 00125 vol00001 vol00002 - | | | | | - +---+---+ +-----+ +---+ +------+------+ +-----+----+ - | | | | | | | | | | | | | -PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak - | | - PG0 +-------+ - | | - 00001 00003 - | - +---+---+ - | | | - PG0 PG1 PG2 - -In the example above, you can see two netfs's being backed: NFS and AFS. These -have different index hierarchies: - - (*) The NFS primary index contains per-server indices. Each server index is - indexed by NFS file handles to get data file objects. Each data file - objects can have an array of pages, but may also have further child - objects, such as extended attributes and directory entries. Extended - attribute objects themselves have page-array contents. - - (*) The AFS primary index contains per-cell indices. Each cell index contains - per-logical-volume indices. Each of volume index contains up to three - indices for the read-write, read-only and backup mirrors of those volumes. - Each of these contains vnode data file objects, each of which contains an - array of pages. - -The very top index is the FS-Cache master index in which individual netfs's -have entries. - -Any index object may reside in more than one cache, provided it only has index -children. Any index with non-index object children will be assumed to only -reside in one cache. - - -The netfs API to FS-Cache can be found in: - - Documentation/filesystems/caching/netfs-api.txt - -The cache backend API to FS-Cache can be found in: - - Documentation/filesystems/caching/backend-api.txt diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt deleted file mode 100644 index a1a182beb..000000000 --- a/Documentation/filesystems/caching/netfs-api.txt +++ /dev/null @@ -1,752 +0,0 @@ - =============================== - FS-CACHE NETWORK FILESYSTEM API - =============================== - -There's an API by which a network filesystem can make use of the FS-Cache -facilities. This is based around a number of principles: - - (1) Caches can store a number of different object types. There are two main - object types: indices and files. The first is a special type used by - FS-Cache to make finding objects faster and to make retiring of groups of - objects easier. - - (2) Every index, file or other object is represented by a cookie. This cookie - may or may not have anything associated with it, but the netfs doesn't - need to care. - - (3) Barring the top-level index (one entry per cached netfs), the index - hierarchy for each netfs is structured according the whim of the netfs. - -This API is declared in . - -This document contains the following sections: - - (1) Network filesystem definition - (2) Index definition - (3) Object definition - (4) Network filesystem (un)registration - (5) Cache tag lookup - (6) Index registration - (7) Data file registration - (8) Miscellaneous object registration - (9) Setting the data file size - (10) Page alloc/read/write - (11) Page uncaching - (12) Index and data file update - (13) Miscellaneous cookie operations - (14) Cookie unregistration - (15) Index and data file invalidation - - -============================= -NETWORK FILESYSTEM DEFINITION -============================= - -FS-Cache needs a description of the network filesystem. This is specified -using a record of the following structure: - - struct fscache_netfs { - uint32_t version; - const char *name; - struct fscache_netfs_operations *ops; - struct fscache_cookie *primary_index; - ... - }; - -This first three fields should be filled in before registration, and the fourth -will be filled in by the registration function; any other fields should just be -ignored and are for internal use only. - -The fields are: - - (1) The name of the netfs (used as the key in the toplevel index). - - (2) The version of the netfs (if the name matches but the version doesn't, the - entire in-cache hierarchy for this netfs will be scrapped and begun - afresh). - - (3) The operations table is defined as follows: - - struct fscache_netfs_operations { - }; - - Currently there aren't any functions here. - - (4) The cookie representing the primary index will be allocated according to - another parameter passed into the registration function. - -For example, kAFS (linux/fs/afs/) uses the following definitions to describe -itself: - - static struct fscache_netfs_operations afs_cache_ops = { - }; - - struct fscache_netfs afs_cache_netfs = { - .version = 0, - .name = "afs", - .ops = &afs_cache_ops, - }; - - -================ -INDEX DEFINITION -================ - -Indices are used for two purposes: - - (1) To aid the finding of a file based on a series of keys (such as AFS's - "cell", "volume ID", "vnode ID"). - - (2) To make it easier to discard a subset of all the files cached based around - a particular key - for instance to mirror the removal of an AFS volume. - -However, since it's unlikely that any two netfs's are going to want to define -their index hierarchies in quite the same way, FS-Cache tries to impose as few -restraints as possible on how an index is structured and where it is placed in -the tree. The netfs can even mix indices and data files at the same level, but -it's not recommended. - -Each index entry consists of a key of indeterminate length plus some auxilliary -data, also of indeterminate length. - -There are some limits on indices: - - (1) Any index containing non-index objects should be restricted to a single - cache. Any such objects created within an index will be created in the - first cache only. The cache in which an index is created can be - controlled by cache tags (see below). - - (2) The entry data must be atomically journallable, so it is limited to about - 400 bytes at present. At least 400 bytes will be available. - - (3) The depth of the index tree should be judged with care as the search - function is recursive. Too many layers will run the kernel out of stack. - - -================= -OBJECT DEFINITION -================= - -To define an object, a structure of the following type should be filled out: - - struct fscache_object_def - { - uint8_t name[16]; - uint8_t type; - - struct fscache_cache_tag *(*select_cache)( - const void *parent_netfs_data, - const void *cookie_netfs_data); - - uint16_t (*get_key)(const void *cookie_netfs_data, - void *buffer, - uint16_t bufmax); - - void (*get_attr)(const void *cookie_netfs_data, - uint64_t *size); - - uint16_t (*get_aux)(const void *cookie_netfs_data, - void *buffer, - uint16_t bufmax); - - fscache_checkaux_t (*check_aux)(void *cookie_netfs_data, - const void *data, - uint16_t datalen); - - void (*get_context)(void *cookie_netfs_data, void *context); - - void (*put_context)(void *cookie_netfs_data, void *context); - - void (*mark_pages_cached)(void *cookie_netfs_data, - struct address_space *mapping, - struct pagevec *cached_pvec); - - void (*now_uncached)(void *cookie_netfs_data); - }; - -This has the following fields: - - (1) The type of the object [mandatory]. - - This is one of the following values: - - (*) FSCACHE_COOKIE_TYPE_INDEX - - This defines an index, which is a special FS-Cache type. - - (*) FSCACHE_COOKIE_TYPE_DATAFILE - - This defines an ordinary data file. - - (*) Any other value between 2 and 255 - - This defines an extraordinary object such as an XATTR. - - (2) The name of the object type (NUL terminated unless all 16 chars are used) - [optional]. - - (3) A function to select the cache in which to store an index [optional]. - - This function is invoked when an index needs to be instantiated in a cache - during the instantiation of a non-index object. Only the immediate index - parent for the non-index object will be queried. Any indices above that - in the hierarchy may be stored in multiple caches. This function does not - need to be supplied for any non-index object or any index that will only - have index children. - - If this function is not supplied or if it returns NULL then the first - cache in the parent's list will be chosed, or failing that, the first - cache in the master list. - - (4) A function to retrieve an object's key from the netfs [mandatory]. - - This function will be called with the netfs data that was passed to the - cookie acquisition function and the maximum length of key data that it may - provide. It should write the required key data into the given buffer and - return the quantity it wrote. - - (5) A function to retrieve attribute data from the netfs [optional]. - - This function will be called with the netfs data that was passed to the - cookie acquisition function. It should return the size of the file if - this is a data file. The size may be used to govern how much cache must - be reserved for this file in the cache. - - If the function is absent, a file size of 0 is assumed. - - (6) A function to retrieve auxilliary data from the netfs [optional]. - - This function will be called with the netfs data that was passed to the - cookie acquisition function and the maximum length of auxilliary data that - it may provide. It should write the auxilliary data into the given buffer - and return the quantity it wrote. - - If this function is absent, the auxilliary data length will be set to 0. - - The length of the auxilliary data buffer may be dependent on the key - length. A netfs mustn't rely on being able to provide more than 400 bytes - for both. - - (7) A function to check the auxilliary data [optional]. - - This function will be called to check that a match found in the cache for - this object is valid. For instance with AFS it could check the auxilliary - data against the data version number returned by the server to determine - whether the index entry in a cache is still valid. - - If this function is absent, it will be assumed that matching objects in a - cache are always valid. - - If present, the function should return one of the following values: - - (*) FSCACHE_CHECKAUX_OKAY - the entry is okay as is - (*) FSCACHE_CHECKAUX_NEEDS_UPDATE - the entry requires update - (*) FSCACHE_CHECKAUX_OBSOLETE - the entry should be deleted - - This function can also be used to extract data from the auxilliary data in - the cache and copy it into the netfs's structures. - - (8) A pair of functions to manage contexts for the completion callback - [optional]. - - The cache read/write functions are passed a context which is then passed - to the I/O completion callback function. To ensure this context remains - valid until after the I/O completion is called, two functions may be - provided: one to get an extra reference on the context, and one to drop a - reference to it. - - If the context is not used or is a type of object that won't go out of - scope, then these functions are not required. These functions are not - required for indices as indices may not contain data. These functions may - be called in interrupt context and so may not sleep. - - (9) A function to mark a page as retaining cache metadata [mandatory]. - - This is called by the cache to indicate that it is retaining in-memory - information for this page and that the netfs should uncache the page when - it has finished. This does not indicate whether there's data on the disk - or not. Note that several pages at once may be presented for marking. - - kAFS and NFS use the PG_private bit on the page structure for this, but - that may not be appropriate in all cases. - - This function is not required for indices as they're not permitted data. - -(10) A function to unmark all the pages retaining cache metadata [mandatory]. - - This is called by FS-Cache to indicate that a backing store is being - unbound from a cookie and that all the marks on the pages should be - cleared to prevent confusion. Note that the cache will have torn down all - its tracking information so that the pages don't need to be explicitly - uncached. - - This function is not required for indices as they're not permitted data. - - -=================================== -NETWORK FILESYSTEM (UN)REGISTRATION -=================================== - -The first step is to declare the network filesystem to the cache. This also -involves specifying the layout of the primary index (for AFS, this would be the -"cell" level). - -The registration function is: - - int fscache_register_netfs(struct fscache_netfs *netfs); - -It just takes a pointer to the netfs definition. It returns 0 or an error as -appropriate. - -For kAFS, registration is done as follows: - - ret = fscache_register_netfs(&afs_cache_netfs); - -The last step is, of course, unregistration: - - void fscache_unregister_netfs(struct fscache_netfs *netfs); - - -================ -CACHE TAG LOOKUP -================ - -FS-Cache permits the use of more than one cache. To permit particular index -subtrees to be bound to particular caches, the second step is to look up cache -representation tags. This step is optional; it can be left entirely up to -FS-Cache as to which cache should be used. The problem with doing that is that -FS-Cache will always pick the first cache that was registered. - -To get the representation for a named tag: - - struct fscache_cache_tag *fscache_lookup_cache_tag(const char *name); - -This takes a text string as the name and returns a representation of a tag. It -will never return an error. It may return a dummy tag, however, if it runs out -of memory; this will inhibit caching with this tag. - -Any representation so obtained must be released by passing it to this function: - - void fscache_release_cache_tag(struct fscache_cache_tag *tag); - -The tag will be retrieved by FS-Cache when it calls the object definition -operation select_cache(). - - -================== -INDEX REGISTRATION -================== - -The third step is to inform FS-Cache about part of an index hierarchy that can -be used to locate files. This is done by requesting a cookie for each index in -the path to the file: - - struct fscache_cookie * - fscache_acquire_cookie(struct fscache_cookie *parent, - struct fscache_object_def *def, - void *netfs_data); - -This function creates an index entry in the index represented by parent, -filling in the index entry by calling the operations pointed to by def. - -Note that this function never returns an error - all errors are handled -internally. It may also return NULL to indicate no cookie. It is quite -acceptable to pass this token back to this function as the parent to another -acquisition (or even to the relinquish cookie, read page and write page -functions - see below). - -Note also that no indices are actually created in a cache until a non-index -object needs to be created somewhere down the hierarchy. Furthermore, an index -may be created in several different caches independently at different times. -This is all handled transparently, and the netfs doesn't see any of it. - -For example, with AFS, a cell would be added to the primary index. This index -entry would have a dependent inode containing a volume location index for the -volume mappings within this cell: - - cell->cache = - fscache_acquire_cookie(afs_cache_netfs.primary_index, - &afs_cell_cache_index_def, - cell); - -Then when a volume location was accessed, it would be entered into the cell's -index and an inode would be allocated that acts as a volume type and hash chain -combination: - - vlocation->cache = - fscache_acquire_cookie(cell->cache, - &afs_vlocation_cache_index_def, - vlocation); - -And then a particular flavour of volume (R/O for example) could be added to -that index, creating another index for vnodes (AFS inode equivalents): - - volume->cache = - fscache_acquire_cookie(vlocation->cache, - &afs_volume_cache_index_def, - volume); - - -====================== -DATA FILE REGISTRATION -====================== - -The fourth step is to request a data file be created in the cache. This is -identical to index cookie acquisition. The only difference is that the type in -the object definition should be something other than index type. - - vnode->cache = - fscache_acquire_cookie(volume->cache, - &afs_vnode_cache_object_def, - vnode); - - -================================= -MISCELLANEOUS OBJECT REGISTRATION -================================= - -An optional step is to request an object of miscellaneous type be created in -the cache. This is almost identical to index cookie acquisition. The only -difference is that the type in the object definition should be something other -than index type. Whilst the parent object could be an index, it's more likely -it would be some other type of object such as a data file. - - xattr->cache = - fscache_acquire_cookie(vnode->cache, - &afs_xattr_cache_object_def, - xattr); - -Miscellaneous objects might be used to store extended attributes or directory -entries for example. - - -========================== -SETTING THE DATA FILE SIZE -========================== - -The fifth step is to set the size of the file. This doesn't automatically -reserve any space in the cache, but permits the cache to adjust its metadata -for data tracking appropriately: - - int fscache_set_i_size(struct fscache_cookie *cookie, loff_t i_size); - -The cache will return -ENOBUFS if there is no backing cache or if there is no -space to allocate any extra metadata required in the cache. - -Note that attempts to read or write data pages in the cache over this size may -be rebuffed with -ENOBUFS. - - -===================== -PAGE READ/ALLOC/WRITE -===================== - -And the sixth step is to store and retrieve pages in the cache. There are -three functions that are used to do this. - -Note: - - (1) A page should not be re-read or re-allocated without uncaching it first. - - (2) A read or allocated page must be uncached when the netfs page is released - from the pagecache. - - (3) A page should only be written to the cache if previous read or allocated. - -This permits the cache to maintain its page tracking in proper order. - - -PAGE READ ---------- - -Firstly, the netfs should ask FS-Cache to examine the caches and read the -contents cached for a particular page of a particular file if present, or else -allocate space to store the contents if not: - - typedef - void (*fscache_rw_complete_t)(struct page *page, - void *context, - int error); - - int fscache_read_or_alloc_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *end_io_data, - gfp_t gfp); - -The cookie argument must specify a cookie for an object that isn't an index, -the page specified will have the data loaded into it (and is also used to -specify the page number), and the gfp argument is used to control how any -memory allocations made are satisfied. - -If the cookie indicates the inode is not cached: - - (1) The function will return -ENOBUFS. - -Else if there's a copy of the page resident in the cache: - - (1) The mark_pages_cached() cookie operation will be called on that page. - - (2) The function will submit a request to read the data from the cache's - backing device directly into the page specified. - - (3) The function will return 0. - - (4) When the read is complete, end_io_func() will be invoked with: - - (*) The netfs data supplied when the cookie was created. - - (*) The page descriptor. - - (*) The context argument passed to the above function. This will be - maintained with the get_context/put_context functions mentioned above. - - (*) An argument that's 0 on success or negative for an error code. - - If an error occurs, it should be assumed that the page contains no usable - data. - - end_io_func() will be called in process context if the read is results in - an error, but it might be called in interrupt context if the read is - successful. - -Otherwise, if there's not a copy available in cache, but the cache may be able -to store the page: - - (1) The mark_pages_cached() cookie operation will be called on that page. - - (2) A block may be reserved in the cache and attached to the object at the - appropriate place. - - (3) The function will return -ENODATA. - -This function may also return -ENOMEM or -EINTR, in which case it won't have -read any data from the cache. - - -PAGE ALLOCATE -------------- - -Alternatively, if there's not expected to be any data in the cache for a page -because the file has been extended, a block can simply be allocated instead: - - int fscache_alloc_page(struct fscache_cookie *cookie, - struct page *page, - gfp_t gfp); - -This is similar to the fscache_read_or_alloc_page() function, except that it -never reads from the cache. It will return 0 if a block has been allocated, -rather than -ENODATA as the other would. One or the other must be performed -before writing to the cache. - -The mark_pages_cached() cookie operation will be called on the page if -successful. - - -PAGE WRITE ----------- - -Secondly, if the netfs changes the contents of the page (either due to an -initial download or if a user performs a write), then the page should be -written back to the cache: - - int fscache_write_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); - -The cookie argument must specify a data file cookie, the page specified should -contain the data to be written (and is also used to specify the page number), -and the gfp argument is used to control how any memory allocations made are -satisfied. - -The page must have first been read or allocated successfully and must not have -been uncached before writing is performed. - -If the cookie indicates the inode is not cached then: - - (1) The function will return -ENOBUFS. - -Else if space can be allocated in the cache to hold this page: - - (1) The function will submit a request to write the data to cache's backing - device directly from the page specified. - - (2) The function will return 0. - - (3) When the write is complete the end_io_func() will be invoked with: - - (*) The netfs data supplied when the cookie was created. - - (*) The page descriptor. - - (*) The context argument passed to the function. This will be maintained - with the get_context/put_context functions mentioned above. - - (*) An argument that's 0 on success or negative for an error. - - If an error occurs, it can be assumed that the page has not been written - to the cache, and that either there's a block containing the old data or - no block at all in the cache. - - end_io_func() might be called in interrupt context. - -Else if there's no space available in the cache, -ENOBUFS will be returned. - - -MULTIPLE PAGE READ ------------------- - -A facility is provided to read several pages at once, as requested by the -readpages() address space operation: - - int fscache_read_or_alloc_pages(struct fscache_cookie *cookie, - struct address_space *mapping, - struct list_head *pages, - int *nr_pages, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); - -This works in a similar way to fscache_read_or_alloc_page(), except: - - (1) Any page it can retrieve data for is removed from pages and nr_pages and - dispatched for reading to the disk. Reads of adjacent pages on disk may - be merged for greater efficiency. - - (2) The mark_pages_cached() cookie operation will be called on several pages - at once if they're being read or allocated. - - (3) If there was an general error, then that error will be returned. - - Else if some pages couldn't be allocated or read, then -ENOBUFS will be - returned. - - Else if some pages couldn't be read but were allocated, then -ENODATA will - be returned. - - Otherwise, if all pages had reads dispatched, then 0 will be returned, the - list will be empty and *nr_pages will be 0. - - (4) end_io_func will be called once for each page being read as the reads - complete. It will be called in process context if error != 0, but it may - be called in interrupt context if there is no error. - -Note that a return of -ENODATA, -ENOBUFS or any other error does not preclude -some of the pages being read and some being allocated. Those pages will have -been marked appropriately and will need uncaching. - - -============== -PAGE UNCACHING -============== - -To uncache a page, this function should be called: - - void fscache_uncache_page(struct fscache_cookie *cookie, - struct page *page); - -This function permits the cache to release any in-memory representation it -might be holding for this netfs page. This function must be called once for -each page on which the read or write page functions above have been called to -make sure the cache's in-memory tracking information gets torn down. - -Note that pages can't be explicitly deleted from the a data file. The whole -data file must be retired (see the relinquish cookie function below). - -Furthermore, note that this does not cancel the asynchronous read or write -operation started by the read/alloc and write functions. - -There is another unbinding operation similar to the above that takes a set of -pages to unbind in one go: - - void fscache_uncache_pagevec(struct fscache_cookie *cookie, - struct pagevec *pagevec); - - -========================== -INDEX AND DATA FILE UPDATE -========================== - -To request an update of the index data for an index or other object, the -following function should be called: - - void fscache_update_cookie(struct fscache_cookie *cookie); - -This function will refer back to the netfs_data pointer stored in the cookie by -the acquisition function to obtain the data to write into each revised index -entry. The update method in the parent index definition will be called to -transfer the data. - -Note that partial updates may happen automatically at other times, such as when -data blocks are added to a data file object. - - -=============================== -MISCELLANEOUS COOKIE OPERATIONS -=============================== - -There are a number of operations that can be used to control cookies: - - (*) Cookie pinning: - - int fscache_pin_cookie(struct fscache_cookie *cookie); - void fscache_unpin_cookie(struct fscache_cookie *cookie); - - These operations permit data cookies to be pinned into the cache and to - have the pinning removed. They are not permitted on index cookies. - - The pinning function will return 0 if successful, -ENOBUFS in the cookie - isn't backed by a cache, -EOPNOTSUPP if the cache doesn't support pinning, - -ENOSPC if there isn't enough space to honour the operation, -ENOMEM or - -EIO if there's any other problem. - - (*) Data space reservation: - - int fscache_reserve_space(struct fscache_cookie *cookie, loff_t size); - - This permits a netfs to request cache space be reserved to store up to the - given amount of a file. It is permitted to ask for more than the current - size of the file to allow for future file expansion. - - If size is given as zero then the reservation will be cancelled. - - The function will return 0 if successful, -ENOBUFS in the cookie isn't - backed by a cache, -EOPNOTSUPP if the cache doesn't support reservations, - -ENOSPC if there isn't enough space to honour the operation, -ENOMEM or - -EIO if there's any other problem. - - Note that this doesn't pin an object in a cache; it can still be culled to - make space if it's not in use. - - -===================== -COOKIE UNREGISTRATION -===================== - -To get rid of a cookie, this function should be called. - - void fscache_relinquish_cookie(struct fscache_cookie *cookie, - int retire); - -If retire is non-zero, then the object will be marked for recycling, and all -copies of it will be removed from all active caches in which it is present. -Not only that but all child objects will also be retired. - -If retire is zero, then the object may be available again when next the -acquisition function is called. Retirement here will overrule the pinning on a -cookie. - -One very important note - relinquish must NOT be called for a cookie unless all -the cookies for "child" indices, objects and pages have been relinquished -first. - - -================================ -INDEX AND DATA FILE INVALIDATION -================================ - -There is no direct way to invalidate an index subtree or a data file. To do -this, the caller should relinquish and retire the cookie they have, and then -acquire a new one. diff --git a/Documentation/filesystems/configfs/configfs_example.c b/Documentation/filesystems/configfs/configfs_example.c index 2d6a14a46..3d4713a6c 100644 --- a/Documentation/filesystems/configfs/configfs_example.c +++ b/Documentation/filesystems/configfs/configfs_example.c @@ -264,15 +264,6 @@ static struct config_item_type simple_child_type = { }; -struct simple_children { - struct config_group group; -}; - -static inline struct simple_children *to_simple_children(struct config_item *item) -{ - return item ? container_of(to_config_group(item), struct simple_children, group) : NULL; -} - static struct config_item *simple_children_make_item(struct config_group *group, const char *name) { struct simple_child *simple_child; @@ -313,13 +304,7 @@ static ssize_t simple_children_attr_show(struct config_item *item, "items have only one attribute that is readable and writeable.\n"); } -static void simple_children_release(struct config_item *item) -{ - kfree(to_simple_children(item)); -} - static struct configfs_item_operations simple_children_item_ops = { - .release = simple_children_release, .show_attribute = simple_children_attr_show, }; @@ -360,6 +345,10 @@ static struct configfs_subsystem simple_children_subsys = { * children of its own. */ +struct simple_children { + struct config_group group; +}; + static struct config_group *group_children_make_group(struct config_group *group, const char *name) { struct simple_children *simple_children; diff --git a/Documentation/filesystems/devfs/ChangeLog b/Documentation/filesystems/devfs/ChangeLog new file mode 100644 index 000000000..e5aba5246 --- /dev/null +++ b/Documentation/filesystems/devfs/ChangeLog @@ -0,0 +1,1977 @@ +/* -*- auto-fill -*- */ +=============================================================================== +Changes for patch v1 + +- creation of devfs + +- modified miscellaneous character devices to support devfs +=============================================================================== +Changes for patch v2 + +- bug fix with manual inode creation +=============================================================================== +Changes for patch v3 + +- bugfixes + +- documentation improvements + +- created a couple of scripts (one to save&restore a devfs and the + other to set up compatibility symlinks) + +- devfs support for SCSI discs. New name format is: sd_hHcCiIlL +=============================================================================== +Changes for patch v4 + +- bugfix for the directory reading code + +- bugfix for compilation with kerneld + +- devfs support for generic hard discs + +- rationalisation of the various watchdog drivers +=============================================================================== +Changes for patch v5 + +- support for mounting directly from entries in the devfs (it doesn't + need to be mounted to do this), including the root filesystem. + Mounting of swap partitions also works. Hence, now if you set + CONFIG_DEVFS_ONLY to 'Y' then you won't be able to access your discs + via ordinary device nodes. Naturally, the default is 'N' so that you + can still use your old device nodes. If you want to mount from devfs + entries, make sure you use: append = "root=/dev/sd_..." in your + lilo.conf. It seems LILO looks for the device number (major&minor) + and writes that into the kernel image :-( + +- support for character memory devices (/dev/null, /dev/zero, /dev/full + and so on). Thanks to C. Scott Ananian +=============================================================================== +Changes for patch v6 + +- support for subdirectories + +- support for symbolic links (created by devfs_mk_symlink(), no + support yet for creation via symlink(2)) + +- SCSI disc naming now cast in stone, with the format: + /dev/sd/c0b1t2u3 controller=0, bus=1, ID=2, LUN=3, whole disc + /dev/sd/c0b1t2u3p4 controller=0, bus=1, ID=2, LUN=3, 4th partition + +- loop devices now appear in devfs + +- tty devices, console, serial ports, etc. now appear in devfs + Thanks to C. Scott Ananian + +- bugs with mounting devfs-only devices now fixed +=============================================================================== +Changes for patch v7 + +- SCSI CD-ROMS, tapes and generic devices now appear in devfs +=============================================================================== +Changes for patch v8 + +- bugfix with no-rewind SCSI tapes + +- RAMDISCs now appear in devfs + +- better cleaning up of devfs entries created by various modules + +- interface change to +=============================================================================== +Changes for patch v9 + +- the v8 patch was corrupted somehow, which would affect the patch for + linux/fs/filesystems.c + I've also fixed the v8 patch file on the WWW + +- MetaDevices (/dev/md*) should now appear in devfs +=============================================================================== +Changes for patch v10 + +- bugfix in meta device support for devfs + +- created this ChangeLog file + +- added devfs support to the floppy driver + +- added support for creating sockets in a devfs +=============================================================================== +Changes for patch v11 + +- added DEVFS_FL_HIDE_UNREG flag + +- incorporated better patch for ttyname() in libc 5.4.43 from H.J. Lu. + +- interface change to + +- support for creating symlinks with symlink(2) + +- parallel port printer (/dev/lp*) now appears in devfs +=============================================================================== +Changes for patch v12 + +- added inode check to function + +- improved devfs support when mounting from devfs + +- added call to <> operation when removing swap areas on + devfs devices + +- increased NR_SUPER to 128 to support large numbers of devfs mounts + (for chroot(2) gaols) + +- fixed bug in SCSI disc support: was generating incorrect minors if + SCSI ID's did not start at 0 and increase by 1 + +- support symlink traversal when mounting root +=============================================================================== +Changes for patch v13 + +- added devfs support to soundcard driver + Thanks to Eric Dumas and + C. Scott Ananian + +- added devfs support to the joystick driver + +- loop driver now has it's own subdirectory "/dev/loop/" + +- created and functions + +- fix problem with SCSI disc compatibility names (sd{a,b,c,d,e,f}) + which assumes ID's start at 0 and increase by 1. Also only create + devfs entries for SCSI disc partitions which actually exist + Show new names in partition check + Thanks to Jakub Jelinek +=============================================================================== +Changes for patch v14 + +- bug fix in floppy driver: would not compile without + CONFIG_DEVFS_FS='Y' + Thanks to Jurgen Botz + +- bug fix in loop driver + Thanks to C. Scott Ananian + +- do not create devfs entries for printers not configured + Thanks to C. Scott Ananian + +- do not create devfs entries for serial ports not present + Thanks to C. Scott Ananian + +- ensure is exported from tty_io.c + Thanks to C. Scott Ananian + +- allow unregistering of devfs symlink entries + +- fixed bug in SCSI disc naming introduced in last patch version +=============================================================================== +Changes for patch v15 + +- ported to kernel 2.1.81 +=============================================================================== +Changes for patch v16 + +- created function + +- moved DEVFS_SUPER_MAGIC into header file + +- added DEVFS_FL_HIDE flag + +- created + +- created + +- fixed bugs in searching by major&minor + +- changed interface to , and + + +- fixed inode times when symlink created with symlink(2) + +- change tty driver to do auto-creation of devfs entries + Thanks to C. Scott Ananian + +- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to + devfs + +- updated libc 5.4.43 patch for ttyname() +=============================================================================== +Changes for patch v17 + +- added CONFIG_DEVFS_TTY_COMPAT + Thanks to C. Scott Ananian + +- bugfix in devfs support for drivers/char/lp.c + Thanks to C. Scott Ananian + +- clean up serial driver so that PCMCIA devices unregister correctly + Thanks to C. Scott Ananian + +- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to + devfs [was missing in patch v16] + +- updated libc 5.4.43 patch for ttyname() [was missing in patch v16] + +- all SCSI devices now registered in /dev/sg + +- support removal of devfs entries via unlink(2) +=============================================================================== +Changes for patch v18 + +- added floppy/?u720 floppy entry + +- fixed kerneld support for entries in devfs subdirectories + +- incorporated latest patch for ttyname() in libc 5.4.43 from H.J. Lu. +=============================================================================== +Changes for patch v19 + +- bug fix when looking up unregistered entries: kerneld was not called + +- fixes for kernel 2.1.86 (now requires 2.1.86) +=============================================================================== +Changes for patch v20 + +- only create available floppy entries + Thanks to Andrzej Krzysztofowicz + +- new IDE naming scheme following SCSI format (i.e. /dev/id/c0b0t0u0p1 + instead of /dev/hda1) + Thanks to Andrzej Krzysztofowicz + +- new XT disc naming scheme following SCSI format (i.e. /dev/xd/c0t0p1 + instead of /dev/xda1) + Thanks to Andrzej Krzysztofowicz + +- new non-standard CD-ROM names (i.e. /dev/sbp/c#t#) + Thanks to Andrzej Krzysztofowicz + +- allow symlink traversal when mounting the root filesystem + +- Create entries for MD devices at MD init + Thanks to Christophe Leroy +=============================================================================== +Changes for patch v21 + +- ported to kernel 2.1.91 +=============================================================================== +Changes for patch v22 + +- SCSI host number patch ("scsihosts=" kernel option) + Thanks to Andrzej Krzysztofowicz +=============================================================================== +Changes for patch v23 + +- Fixed persistence bug with device numbers for manually created + device files + +- Fixed problem with recreating symlinks with different content + +- Added CONFIG_DEVFS_MOUNT (mount devfs on /dev at boot time) +=============================================================================== +Changes for patch v24 + +- Switched from CONFIG_KERNELD to CONFIG_KMOD: module autoloading + should now work again + +- Hide entries which are manually unlinked + +- Always invalidate devfs dentry cache when registering entries + +- Support removal of devfs directories via rmdir(2) + +- Ensure directories created by are visible + +- Default no access for "other" for floppy device +=============================================================================== +Changes for patch v25 + +- Updates to CREDITS file and minor IDE numbering change + Thanks to Andrzej Krzysztofowicz + +- Invalidate devfs dentry cache when making directories + +- Invalidate devfs dentry cache when removing entries + +- More informative message if root FS mount fails when devfs + configured + +- Fixed persistence bug with fifos +=============================================================================== +Changes for patch v26 + +- ported to kernel 2.1.97 + +- Changed serial directory from "/dev/serial" to "/dev/tts" and + "/dev/consoles" to "/dev/vc" to be more friendly to new procps +=============================================================================== +Changes for patch v27 + +- Added support for IDE4 and IDE5 + Thanks to Andrzej Krzysztofowicz + +- Documented "scsihosts=" boot parameter + +- Print process command when debugging kerneld/kmod + +- Added debugging for register/unregister/change operations + +- Added "devfs=" boot options + +- Hide unregistered entries by default +=============================================================================== +Changes for patch v28 + +- No longer lock/unlock superblock in (cope with + recent VFS interface change) + +- Do not automatically change ownership/protection of /dev/tty + +- Drop negative dentries when they are released + +- Manage dcache more efficiently +=============================================================================== +Changes for patch v29 + +- Added DEVFS_FL_AUTO_DEVNUM flag +=============================================================================== +Changes for patch v30 + +- No longer set unnecessary methods + +- Ported to kernel 2.1.99-pre3 +=============================================================================== +Changes for patch v31 + +- Added PID display to debugging message + +- Added "diread" and "diwrite" options + +- Ported to kernel 2.1.102 + +- Fixed persistence problem with permissions +=============================================================================== +Changes for patch v32 + +- Fixed devfs support in drivers/block/md.c +=============================================================================== +Changes for patch v33 + +- Support legacy device nodes + +- Fixed bug where recreated inodes were hidden + +- New IDE naming scheme: everything is under /dev/ide +=============================================================================== +Changes for patch v34 + +- Improved debugging in + +- Prevent duplicate calls to in SCSI layer + +- No longer free old dentries in + +- Free all dentries for a given entry when deleting inodes +=============================================================================== +Changes for patch v35 + +- Ported to kernel 2.1.105 (sound driver changes) +=============================================================================== +Changes for patch v36 + +- Fixed sound driver port +=============================================================================== +Changes for patch v37 + +- Minor documentation tweaks +=============================================================================== +Changes for patch v38 + +- More documentation tweaks + +- Fix for sound driver port + +- Removed ttyname-patch (grab libc 5.4.44 instead) + +- Ported to kernel 2.1.107-pre2 (loop driver fix) +=============================================================================== +Changes for patch v39 + +- Ported to kernel 2.1.107 (hd.c hunk broke due to spelling "fixes"). Sigh + +- Removed many #ifdef's, replaced with trickery in include/devfs_fs.h +=============================================================================== +Changes for patch v40 + +- Fix for sound driver port + +- Limit auto-device numbering to majors 128 to 239 +=============================================================================== +Changes for patch v41 + +- Fixed inode times persistence problem +=============================================================================== +Changes for patch v42 + +- Ported to kernel 2.1.108 (drivers/scsi/hosts.c hunk broke) +=============================================================================== +Changes for patch v43 + +- Fixed spelling in debug + +- Fixed bug in parsing "dilookup" + +- More #ifdef's removed + +- Supported Sparc keyboard (/dev/kbd) + +- Supported DSP56001 digital signal processor (/dev/dsp56k) + +- Supported Apple Desktop Bus (/dev/adb) + +- Supported Coda network file system (/dev/cfs*) +=============================================================================== +Changes for patch v44 + +- Fixed devfs inode leak when manually recreating inodes + +- Fixed permission persistence problem when recreating inodes +=============================================================================== +Changes for patch v45 + +- Ported to kernel 2.1.110 +=============================================================================== +Changes for patch v46 + +- Ported to kernel 2.1.112-pre1 + +- Removed harmless "unused variable" compiler warning + +- Fixed modes for manually recreated device nodes +=============================================================================== +Changes for patch v47 + +- Added NULL devfs inode warning in + +- Force all inode nlink values to 1 +=============================================================================== +Changes for patch v48 + +- Added "dimknod" option + +- Set inode nlink to 0 when freeing dentries + +- Added support for virtual console capture devices (/dev/vcs*) + Thanks to Dennis Hou + +- Fixed modes for manually recreated symlinks +=============================================================================== +Changes for patch v49 + +- Ported to kernel 2.1.113 +=============================================================================== +Changes for patch v50 + +- Fixed bugs in recreated directories and symlinks +=============================================================================== +Changes for patch v51 + +- Improved robustness of rc.devfs script + Thanks to Roderich Schupp + +- Fixed bugs in recreated device nodes + +- Fixed bug in currently unused + +- Defined new type + +- Improved debugging when getting entries + +- Fixed bug where directories could be emptied + +- Ported to kernel 2.1.115 +=============================================================================== +Changes for patch v52 + +- Replaced dummy .epoch inode with .devfsd character device + +- Modified rc.devfs to take account of above change + +- Removed spurious driver warning messages when CONFIG_DEVFS_FS=n + +- Implemented devfsd protocol revision 0 +=============================================================================== +Changes for patch v53 + +- Ported to kernel 2.1.116 (kmod change broke hunk) + +- Updated Documentation/Configure.help + +- Test and tty pattern patch for rc.devfs script + Thanks to Roderich Schupp + +- Added soothing message to warning in +=============================================================================== +Changes for patch v54 + +- Ported to kernel 2.1.117 + +- Fixed default permissions in sound driver + +- Added support for frame buffer devices (/dev/fb*) +=============================================================================== +Changes for patch v55 + +- Ported to kernel 2.1.119 + +- Use GCC extensions for structure initialisations + +- Implemented async open notification + +- Incremented devfsd protocol revision to 1 +=============================================================================== +Changes for patch v56 + +- Ported to kernel 2.1.120-pre3 + +- Moved async open notification to end of +=============================================================================== +Changes for patch v57 + +- Ported to kernel 2.1.121 + +- Prepended "/dev/" to module load request + +- Renamed to + +- Created sample modules.conf file +=============================================================================== +Changes for patch v58 + +- Fixed typo "AYSNC" -> "ASYNC" +=============================================================================== +Changes for patch v59 + +- Added open flag for files +=============================================================================== +Changes for patch v60 + +- Ported to kernel 2.1.123-pre2 +=============================================================================== +Changes for patch v61 + +- Set i_blocks=0 and i_blksize=1024 in +=============================================================================== +Changes for patch v62 + +- Ported to kernel 2.1.123 +=============================================================================== +Changes for patch v63 + +- Ported to kernel 2.1.124-pre2 +=============================================================================== +Changes for patch v64 + +- Fixed Unix98 pty support + +- Increased buffer size in to avoid crash and + burn +=============================================================================== +Changes for patch v65 + +- More Unix98 pty support fixes + +- Added test for empty <> in + +- Renamed to and published + +- Created /dev/root symlink + Thanks to Roderich Schupp + with further modifications by me +=============================================================================== +Changes for patch v66 + +- Yet more Unix98 pty support fixes (now tested) + +- Created + +- Support media change checks when CONFIG_DEVFS_ONLY=y + +- Abolished Unix98-style PTY names for old PTY devices +=============================================================================== +Changes for patch v67 + +- Added inline declaration for dummy + +- Removed spurious "unable to register... in devfs" messages when + CONFIG_DEVFS_FS=n + +- Fixed misc. devices when CONFIG_DEVFS_FS=n + +- Limit auto-device numbering to majors 144 to 239 +=============================================================================== +Changes for patch v68 + +- Hide unopened virtual consoles from directory listings + +- Added support for video capture devices + +- Ported to kernel 2.1.125 +=============================================================================== +Changes for patch v69 + +- Fix for CONFIG_VT=n +=============================================================================== +Changes for patch v70 + +- Added support for non-OSS/Free sound cards +=============================================================================== +Changes for patch v71 + +- Ported to kernel 2.1.126-pre2 +=============================================================================== +Changes for patch v72 + +- #ifdef's for CONFIG_DEVFS_DISABLE_OLD_NAMES removed +=============================================================================== +Changes for patch v73 + +- CONFIG_DEVFS_DISABLE_OLD_NAMES replaced with "nocompat" boot option + +- CONFIG_DEVFS_BOOT_OPTIONS removed: boot options always available +=============================================================================== +Changes for patch v74 + +- Removed CONFIG_DEVFS_MOUNT and "mount" boot option and replaced with + "nomount" boot option + +- Documentation updates + +- Updated sample modules.conf +=============================================================================== +Changes for patch v75 + +- Updated sample modules.conf + +- Remount devfs after initrd finishes + +- Ported to kernel 2.1.127 + +- Added support for ISDN + Thanks to Christophe Leroy +=============================================================================== +Changes for patch v76 + +- Updated an email address in ChangeLog + +- CONFIG_DEVFS_ONLY replaced with "only" boot option +=============================================================================== +Changes for patch v77 + +- Added DEVFS_FL_REMOVABLE flag + +- Check for disc change when listing directories with removable media + devices + +- Use DEVFS_FL_REMOVABLE in sd.c + +- Ported to kernel 2.1.128 +=============================================================================== +Changes for patch v78 + +- Only call on first call to + +- Ported to kernel 2.1.129-pre5 + +- ISDN support improvements + Thanks to Christophe Leroy +=============================================================================== +Changes for patch v79 + +- Ported to kernel 2.1.130 + +- Renamed miscdevice "apm" to "apm_bios" to be consistent with + devices.txt +=============================================================================== +Changes for patch v80 + +- Ported to kernel 2.1.131 + +- Updated for VFS change in 2.1.131 +=============================================================================== +Changes for patch v81 + +- Fixed permissions on /dev/ptmx +=============================================================================== +Changes for patch v82 + +- Ported to kernel 2.1.132-pre4 + +- Changed initial permissions on /dev/pts/* + +- Created + +- Added "symlinks" boot option + +- Changed devfs_register_blkdev() back to register_blkdev() for IDE + +- Check for partitions on removable media in +=============================================================================== +Changes for patch v83 + +- Fixed support for ramdisc when using string-based root FS name + +- Ported to kernel 2.2.0-pre1 +=============================================================================== +Changes for patch v84 + +- Ported to kernel 2.2.0-pre7 +=============================================================================== +Changes for patch v85 + +- Compile fixes for driver/sound/sound_common.c (non-module) and + drivers/isdn/isdn_common.c + Thanks to Christophe Leroy + +- Added support for registering regular files + +- Created + +- Added /dev/cpu/mtrr as an alternative interface to /proc/mtrr + +- Update devfs inodes from entries if not changed through FS +=============================================================================== +Changes for patch v86 + +- Ported to kernel 2.2.0-pre9 +=============================================================================== +Changes for patch v87 + +- Fixed bug when mounting non-devfs devices in a devfs +=============================================================================== +Changes for patch v88 + +- Fixed to only initialise temporary inodes + +- Trap for NULL fops in + +- Return -ENODEV in for non-driver inodes + +- Fixed bug when unswapping non-devfs devices in a devfs +=============================================================================== +Changes for patch v89 + +- Switched to C data types in include/linux/devfs_fs.h + +- Switched from PATH_MAX to DEVFS_PATHLEN + +- Updated Documentation/filesystems/devfs/modules.conf to take account + of reverse scanning (!) by modprobe + +- Ported to kernel 2.2.0 +=============================================================================== +Changes for patch v90 + +- CONFIG_DEVFS_DISABLE_OLD_TTY_NAMES replaced with "nottycompat" boot + option + +- CONFIG_DEVFS_TTY_COMPAT removed: existing "symlinks" boot option now + controls this. This means you must have libc 5.4.44 or later, or a + recent version of libc 6 if you use the "symlinks" option +=============================================================================== +Changes for patch v91 + +- Switch from to in + drivers/char/vc_screen.c to fix problems with Midnight Commander +=============================================================================== +Changes for patch v92 + +- Ported to kernel 2.2.2-pre5 +=============================================================================== +Changes for patch v93 + +- Modified in drivers/scsi/sd.c to cope with devices that + don't exist (which happens with new RAID autostart code printk()s) +=============================================================================== +Changes for patch v94 + +- Fixed bug in joystick driver: only first joystick was registered +=============================================================================== +Changes for patch v95 + +- Fixed another bug in joystick driver + +- Fixed to not overrun event buffer +=============================================================================== +Changes for patch v96 + +- Ported to kernel 2.2.5-2 + +- Created + +- Fixed bugs: compatibility entries were not unregistered for: + loop driver + floppy driver + RAMDISC driver + IDE tape driver + SCSI CD-ROM driver + SCSI HDD driver +=============================================================================== +Changes for patch v97 + +- Fixed bugs: compatibility entries were not unregistered for: + ALSA sound driver + partitions in generic disc driver + +- Don't return unregistred entries in + +- Panic in if entry unregistered + +- Don't panic in for duplicates +=============================================================================== +Changes for patch v98 + +- Don't unregister already unregistered entries in + +- Register entry in + +- Unregister entry in + +- Changed to in drivers/char/tty_io.c + +- Ported to kernel 2.2.7 +=============================================================================== +Changes for patch v99 + +- Ported to kernel 2.2.8 + +- Fixed bug in drivers/scsi/sd.c when >16 SCSI discs + +- Disable warning messages when unable to read partition table for + removable media +=============================================================================== +Changes for patch v100 + +- Ported to kernel 2.3.1-pre5 + +- Added "oops-on-panic" boot option + +- Improved debugging in and + +- Register entry in + +- Unregister entry in + +- Register entry in + +- Unregister entry in + +- Added support for ALSA drivers +=============================================================================== +Changes for patch v101 + +- Ported to kernel 2.3.2 +=============================================================================== +Changes for patch v102 + +- Update serial driver to register PCMCIA entries + Thanks to Roch-Alexandre Nomine-Beguin + +- Updated an email address in ChangeLog + +- Hide virtual console capture entries from directory listings when + corresponding console device is not open +=============================================================================== +Changes for patch v103 + +- Ported to kernel 2.3.3 +=============================================================================== +Changes for patch v104 + +- Added documentation for some functions + +- Added "doc" target to fs/devfs/Makefile + +- Added "v4l" directory for video4linux devices + +- Replaced call to in with call to + + +- Moved registration for sr and sg drivers from detect() to attach() + methods + +- Register entries in and unregister in + +- Work around IDE driver treating CD-ROM as gendisk + +- Use instead of in rc.devfs + +- Updated ToDo list + +- Removed "oops-on-panic" boot option: now always Oops +=============================================================================== +Changes for patch v105 + +- Unregister SCSI host from in + Thanks to Zoltán Böszörményi + +- Don't save /dev/log in rc.devfs + +- Ported to kernel 2.3.4-pre1 +=============================================================================== +Changes for patch v106 + +- Fixed silly typo in drivers/scsi/st.c + +- Improved debugging in +=============================================================================== +Changes for patch v107 + +- Added "diunlink" and "nokmod" boot options + +- Removed superfluous warning message in +=============================================================================== +Changes for patch v108 + +- Remove entries when unloading sound module +=============================================================================== +Changes for patch v109 + +- Ported to kernel 2.3.6-pre2 +=============================================================================== +Changes for patch v110 + +- Took account of change to +=============================================================================== +Changes for patch v111 + +- Created separate event queue for each mounted devfs + +- Removed + +- Created new ioctl()s for devfsd + +- Incremented devfsd protocol revision to 3 + +- Fixed bug when re-creating directories: contents were lost + +- Block access to inodes until devfsd updates permissions +=============================================================================== +Changes for patch v112 + +- Modified patch so it applies against 2.3.5 and 2.3.6 + +- Updated an email address in ChangeLog + +- Do not automatically change ownership/protection of /dev/tty + +- Updated sample modules.conf + +- Switched to sending process uid/gid to devfsd + +- Renamed to + +- Added DEVFSD_NOTIFY_LOOKUP event + +- Added DEVFSD_NOTIFY_CHANGE event + +- Added DEVFSD_NOTIFY_CREATE event + +- Incremented devfsd protocol revision to 4 + +- Moved kernel-specific stuff to include/linux/devfs_fs_kernel.h +=============================================================================== +Changes for patch v113 + +- Ported to kernel 2.3.9 + +- Restricted permissions on some block devices +=============================================================================== +Changes for patch v114 + +- Added support for /dev/netlink + Thanks to Dennis Hou + +- Return EISDIR rather than EINVAL for read(2) on directories + +- Ported to kernel 2.3.10 +=============================================================================== +Changes for patch v115 + +- Added support for all remaining character devices + Thanks to Dennis Hou + +- Cleaned up netlink support +=============================================================================== +Changes for patch v116 + +- Added support for /dev/parport%d + Thanks to Tim Waugh + +- Fixed parallel port ATAPI tape driver + +- Fixed Atari SLM laser printer driver +=============================================================================== +Changes for patch v117 + +- Added support for COSA card + Thanks to Dennis Hou + +- Fixed drivers/char/ppdev.c: missing #include + +- Fixed drivers/char/ftape/zftape/zftape-init.c + Thanks to Vladimir Popov +=============================================================================== +Changes for patch v118 + +- Ported to kernel 2.3.15-pre3 + +- Fixed bug in loop driver + +- Unregister /dev/lp%d entries in drivers/char/lp.c + Thanks to Maciej W. Rozycki +=============================================================================== +Changes for patch v119 + +- Ported to kernel 2.3.16 +=============================================================================== +Changes for patch v120 + +- Fixed bug in drivers/scsi/scsi.c + +- Added /dev/ppp + Thanks to Dennis Hou + +- Ported to kernel 2.3.17 +=============================================================================== +Changes for patch v121 + +- Fixed bug in drivers/block/loop.c + +- Ported to kernel 2.3.18 +=============================================================================== +Changes for patch v122 + +- Ported to kernel 2.3.19 +=============================================================================== +Changes for patch v123 + +- Ported to kernel 2.3.20 +=============================================================================== +Changes for patch v124 + +- Ported to kernel 2.3.21 +=============================================================================== +Changes for patch v125 + +- Created , , + and + Added <> parameter to , , + and + Work sponsored by SGI + +- Fixed apparent bug in COSA driver + +- Re-instated "scsihosts=" boot option +=============================================================================== +Changes for patch v126 + +- Always create /dev/pts if CONFIG_UNIX98_PTYS=y + +- Fixed call to in drivers/block/ide-disk.c + Thanks to Dennis Hou + +- Allow multiple unregistrations + +- Created /dev/scsi hierarchy + Work sponsored by SGI +=============================================================================== +Changes for patch v127 + +Work sponsored by SGI + +- No longer disable devpts if devfs enabled (caveat emptor) + +- Added flags array to struct gendisk and removed code from + drivers/scsi/sd.c + +- Created /dev/discs hierarchy +=============================================================================== +Changes for patch v128 + +Work sponsored by SGI + +- Created /dev/cdroms hierarchy +=============================================================================== +Changes for patch v129 + +Work sponsored by SGI + +- Removed compatibility entries for sound devices + +- Removed compatibility entries for printer devices + +- Removed compatibility entries for video4linux devices + +- Removed compatibility entries for parallel port devices + +- Removed compatibility entries for frame buffer devices +=============================================================================== +Changes for patch v130 + +Work sponsored by SGI + +- Added major and minor number to devfsd protocol + +- Incremented devfsd protocol revision to 5 + +- Removed compatibility entries for SoundBlaster CD-ROMs + +- Removed compatibility entries for netlink devices + +- Removed compatibility entries for SCSI generic devices + +- Removed compatibility entries for SCSI tape devices +=============================================================================== +Changes for patch v131 + +Work sponsored by SGI + +- Support info pointer for all devfs entry types + +- Added <> parameter to and + +- Removed /dev/st hierarchy + +- Removed /dev/sg hierarchy + +- Removed compatibility entries for loop devices + +- Removed compatibility entries for IDE tape devices + +- Removed compatibility entries for SCSI CD-ROMs + +- Removed /dev/sr hierarchy +=============================================================================== +Changes for patch v132 + +Work sponsored by SGI + +- Removed compatibility entries for floppy devices + +- Removed compatibility entries for RAMDISCs + +- Removed compatibility entries for meta-devices + +- Removed compatibility entries for SCSI discs + +- Created + +- Removed /dev/sd hierarchy + +- Support "../" when searching devfs namespace + +- Created /dev/ide/host* hierarchy + +- Supported IDE hard discs in /dev/ide/host* hierarchy + +- Removed compatibility entries for IDE discs + +- Removed /dev/ide/hd hierarchy + +- Supported IDE CD-ROMs in /dev/ide/host* hierarchy + +- Removed compatibility entries for IDE CD-ROMs + +- Removed /dev/ide/cd hierarchy +=============================================================================== +Changes for patch v133 + +Work sponsored by SGI + +- Created + +- Fixed bug in fs/partitions/check.c when rescanning +=============================================================================== +Changes for patch v134 + +Work sponsored by SGI + +- Removed /dev/sd, /dev/sr, /dev/st and /dev/sg directories + +- Removed /dev/ide/hd directory + +- Exported + +- Created and /dev/tapes hierarchy + +- Removed /dev/ide/mt hierarchy + +- Removed /dev/ide/fd hierarchy + +- Ported to kernel 2.3.25 +=============================================================================== +Changes for patch v135 + +Work sponsored by SGI + +- Removed compatibility entries for virtual console capture devices + +- Removed unused + +- Removed compatibility entries for serial devices + +- Removed compatibility entries for console devices + +- Do not hide entries from devfsd or children + +- Removed DEVFS_FL_TTY_COMPAT flag + +- Removed "nottycompat" boot option + +- Removed +=============================================================================== +Changes for patch v136 + +Work sponsored by SGI + +- Moved BSD pty devices to /dev/pty + +- Added DEVFS_FL_WAIT flag +=============================================================================== +Changes for patch v137 + +Work sponsored by SGI + +- Really fixed bug in fs/partitions/check.c when rescanning + +- Support new "disc" naming scheme in + +- Allow NULL fops in + +- Removed redundant name functions in SCSI disc and IDE drivers +=============================================================================== +Changes for patch v138 + +Work sponsored by SGI + +- Fixed old bugs in drivers/block/paride/pt.c, drivers/char/tpqic02.c, + drivers/net/wan/cosa.c and drivers/scsi/scsi.c + Thanks to Sergey Kubushin + +- Fall back to major table if NULL fops given to +=============================================================================== +Changes for patch v139 + +Work sponsored by SGI + +- Corrected and moved and declarations + from arch/alpha/kernel/osf_sys.c to include/linux/fs.h + +- Removed name function from struct gendisk + +- Updated devfs FAQ +=============================================================================== +Changes for patch v140 + +Work sponsored by SGI + +- Ported to kernel 2.3.27 +=============================================================================== +Changes for patch v141 + +Work sponsored by SGI + +- Bug fix in arch/m68k/atari/joystick.c + +- Moved ISDN and capi devices to /dev/isdn +=============================================================================== +Changes for patch v142 + +Work sponsored by SGI + +- Bug fix in drivers/block/ide-probe.c (patch confusion) +=============================================================================== +Changes for patch v143 + +Work sponsored by SGI + +- Bug fix in drivers/block/blkpg.c:partition_name() +=============================================================================== +Changes for patch v144 + +Work sponsored by SGI + +- Ported to kernel 2.3.29 + +- Removed calls to from cdu31a, cm206, mcd and mcdx + CD-ROM drivers: generic driver handles this now + +- Moved joystick devices to /dev/joysticks +=============================================================================== +Changes for patch v145 + +Work sponsored by SGI + +- Ported to kernel 2.3.30-pre3 + +- Register whole-disc entry even for invalid partition tables + +- Fixed bug in mounting root FS when initrd enabled + +- Fixed device entry leak with IDE CD-ROMs + +- Fixed compile problem with drivers/isdn/isdn_common.c + +- Moved COSA devices to /dev/cosa + +- Support fifos when unregistering + +- Created and used in many drivers + +- Moved Coda devices to /dev/coda + +- Moved parallel port IDE tapes to /dev/pt + +- Moved parallel port IDE generic devices to /dev/pg +=============================================================================== +Changes for patch v146 + +Work sponsored by SGI + +- Removed obsolete DEVFS_FL_COMPAT and DEVFS_FL_TOLERANT flags + +- Fixed compile problem with fs/coda/psdev.c + +- Reinstate change to in + drivers/block/ide-probe.c now that fs/isofs/inode.c is fixed + +- Switched to in drivers/block/floppy.c, + drivers/scsi/sr.c and drivers/block/md.c + +- Moved DAC960 devices to /dev/dac960 +=============================================================================== +Changes for patch v147 + +Work sponsored by SGI + +- Ported to kernel 2.3.32-pre4 +=============================================================================== +Changes for patch v148 + +Work sponsored by SGI + +- Removed kmod support: use devfsd instead + +- Moved miscellaneous character devices to /dev/misc +=============================================================================== +Changes for patch v149 + +Work sponsored by SGI + +- Ensure include/linux/joystick.h is OK for user-space + +- Improved debugging in + +- Ensure dentries created by devfsd will be cleaned up +=============================================================================== +Changes for patch v150 + +Work sponsored by SGI + +- Ported to kernel 2.3.34 +=============================================================================== +Changes for patch v151 + +Work sponsored by SGI + +- Ported to kernel 2.3.35-pre1 + +- Created +=============================================================================== +Changes for patch v152 + +Work sponsored by SGI + +- Updated sample modules.conf + +- Ported to kernel 2.3.36-pre1 +=============================================================================== +Changes for patch v153 + +Work sponsored by SGI + +- Ported to kernel 2.3.42 + +- Removed +=============================================================================== +Changes for patch v154 + +Work sponsored by SGI + +- Took account of device number changes for /dev/fb* +=============================================================================== +Changes for patch v155 + +Work sponsored by SGI + +- Ported to kernel 2.3.43-pre8 + +- Moved /dev/tty0 to /dev/vc/0 + +- Moved sequence number formatting from <_tty_make_name> to drivers +=============================================================================== +Changes for patch v156 + +Work sponsored by SGI + +- Fixed breakage in drivers/scsi/sd.c due to recent SCSI changes +=============================================================================== +Changes for patch v157 + +Work sponsored by SGI + +- Ported to kernel 2.3.45 +=============================================================================== +Changes for patch v158 + +Work sponsored by SGI + +- Ported to kernel 2.3.46-pre2 +=============================================================================== +Changes for patch v159 + +Work sponsored by SGI + +- Fixed drivers/block/md.c + Thanks to Mike Galbraith + +- Documentation fixes + +- Moved device registration from to + Thanks to Tim Waugh +=============================================================================== +Changes for patch v160 + +Work sponsored by SGI + +- Fixed drivers/char/joystick/joystick.c + Thanks to Vojtech Pavlik + +- Documentation updates + +- Fixed arch/i386/kernel/mtrr.c if procfs and devfs not enabled + +- Fixed drivers/char/stallion.c +=============================================================================== +Changes for patch v161 + +Work sponsored by SGI + +- Remove /dev/ide when ide-mod is unloaded + +- Fixed bug in drivers/block/ide-probe.c when secondary but no primary + +- Added DEVFS_FL_NO_PERSISTENCE flag + +- Used new DEVFS_FL_NO_PERSISTENCE flag for Unix98 pty slaves + +- Removed unnecessary call to in + + +- Only set auto-ownership for /dev/pty/s* +=============================================================================== +Changes for patch v162 + +Work sponsored by SGI + +- Set inode->i_size to correct size for symlinks + Thanks to Jeremy Fitzhardinge + +- Only give lookup() method to directories to comply with new VFS + assumptions + +- Remove unnecessary tests in symlink methods + +- Don't kill existing block ops in + +- Restore auto-ownership for /dev/pty/m* +=============================================================================== +Changes for patch v163 + +Work sponsored by SGI + +- Don't create missing directories in + +- Removed Documentation/filesystems/devfs/mk-devlinks + +- Updated Documentation/filesystems/devfs/README +=============================================================================== +Changes for patch v164 + +Work sponsored by SGI + +- Fixed CONFIG_DEVFS breakage in drivers/char/serial.c introduced in + linux-2.3.99-pre6-7 +=============================================================================== +Changes for patch v165 + +Work sponsored by SGI + +- Ported to kernel 2.3.99-pre6 +=============================================================================== +Changes for patch v166 + +Work sponsored by SGI + +- Added CONFIG_DEVFS_MOUNT +=============================================================================== +Changes for patch v167 + +Work sponsored by SGI + +- Updated Documentation/filesystems/devfs/README + +- Updated sample modules.conf +=============================================================================== +Changes for patch v168 + +Work sponsored by SGI + +- Disabled multi-mount capability (use VFS bindings instead) + +- Updated README from master HTML file +=============================================================================== +Changes for patch v169 + +Work sponsored by SGI + +- Removed multi-mount code + +- Removed compatibility macros: VFS has changed too much +=============================================================================== +Changes for patch v170 + +Work sponsored by SGI + +- Updated README from master HTML file + +- Merged devfs inode into devfs entry +=============================================================================== +Changes for patch v171 + +Work sponsored by SGI + +- Updated sample modules.conf + +- Removed dead code in which used to call + + +- Ported to kernel 2.4.0-test2-pre3 +=============================================================================== +Changes for patch v172 + +Work sponsored by SGI + +- Changed interface to + +- Changed interface to +=============================================================================== +Changes for patch v173 + +Work sponsored by SGI + +- Simplified interface to + +- Simplified interface to + +- Simplified interface to +=============================================================================== +Changes for patch v174 + +Work sponsored by SGI + +- Updated README from master HTML file +=============================================================================== +Changes for patch v175 + +Work sponsored by SGI + +- DocBook update for fs/devfs/base.c + Thanks to Tim Waugh + +- Removed stale fs/tunnel.c (was never used or completed) +=============================================================================== +Changes for patch v176 + +Work sponsored by SGI + +- Updated ToDo list + +- Removed sample modules.conf: now distributed with devfsd + +- Updated README from master HTML file + +- Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174) +=============================================================================== +Changes for patch v177 + +- Updated README from master HTML file + +- Documentation cleanups + +- Ensure terminates string for root entry + Thanks to Tim Jansen + +- Exported to modules + +- Make send events to devfsd + +- Cleaned up option processing in + +- Fixed bugs in handling symlinks: could leak or cause Oops + +- Cleaned up directory handling by separating fops + Thanks to Alexander Viro +=============================================================================== +Changes for patch v178 + +- Fixed handling of inverted options in +=============================================================================== +Changes for patch v179 + +- Adjusted to account for fix +=============================================================================== +Changes for patch v180 + +- Fixed !CONFIG_DEVFS_FS stub declaration of +=============================================================================== +Changes for patch v181 + +- Answered question posed by Al Viro and removed his comments from + +- Moved setting of registered flag after other fields are changed + +- Fixed race between and + +- Global VFS changes added bogus BKL to devfsd_close(): removed + +- Widened locking in and + +- Replaced stack usage with kmalloc + +- Simplified locking in and fixed memory leak +=============================================================================== +Changes for patch v182 + +- Created and + +- Removed broken devnum allocation and use + +- Fixed old devnum leak by calling new + +- Created + +- Fixed number leak for /dev/cdroms/cdrom%d + +- Fixed number leak for /dev/discs/disc%d +=============================================================================== +Changes for patch v183 + +- Fixed bug in which could hang boot process +=============================================================================== +Changes for patch v184 + +- Documentation typo fix for fs/devfs/util.c + +- Fixed drivers/char/stallion.c for devfs + +- Added DEVFSD_NOTIFY_DELETE event + +- Updated README from master HTML file + +- Removed #include from fs/devfs/base.c +=============================================================================== +Changes for patch v185 + +- Made and in fs/devfs/util.c + private + +- Fixed inode table races by removing it and using inode->u.generic_ip + instead + +- Moved into + +- Moved into +=============================================================================== +Changes for patch v186 + +- Fixed race in for uni-processor + +- Updated README from master HTML file +=============================================================================== +Changes for patch v187 + +- Fixed drivers/char/stallion.c for devfs + +- Fixed drivers/char/rocket.c for devfs + +- Fixed bug in : limited to 128 numbers +=============================================================================== +Changes for patch v188 + +- Updated major masks in fs/devfs/util.c up to Linus' "no new majors" + proclamation. Block: were 126 now 122 free, char: were 26 now 19 free + +- Updated README from master HTML file + +- Removed remnant of multi-mount support in + +- Removed unused DEVFS_FL_SHOW_UNREG flag +=============================================================================== +Changes for patch v189 + +- Removed nlink field from struct devfs_inode + +- Removed auto-ownership for /dev/pty/* (BSD ptys) and used + DEVFS_FL_CURRENT_OWNER|DEVFS_FL_NO_PERSISTENCE for /dev/pty/s* (just + like Unix98 pty slaves) and made /dev/pty/m* rw-rw-rw- access +=============================================================================== +Changes for patch v190 + +- Updated README from master HTML file + +- Replaced BKL with global rwsem to protect symlink data (quick and + dirty hack) +=============================================================================== +Changes for patch v191 + +- Replaced global rwsem for symlink with per-link refcount +=============================================================================== +Changes for patch v192 + +- Removed unnecessary #ifdef CONFIG_DEVFS_FS from arch/i386/kernel/mtrr.c + +- Ported to kernel 2.4.10-pre11 + +- Set inode->i_mapping->a_ops for block nodes in +=============================================================================== +Changes for patch v193 + +- Went back to global rwsem for symlinks (refcount scheme no good) +=============================================================================== +Changes for patch v194 + +- Fixed overrun in by removing function (not needed) + +- Updated README from master HTML file +=============================================================================== +Changes for patch v195 + +- Fixed buffer underrun in + +- Moved down_read() from to +=============================================================================== +Changes for patch v196 + +- Fixed race in when setting event mask + Thanks to Kari Hurtta + +- Avoid deadlock in by using temporary buffer +=============================================================================== +Changes for patch v197 + +- First release of new locking code for devfs core (v1.0) + +- Fixed bug in drivers/cdrom/cdrom.c +=============================================================================== +Changes for patch v198 + +- Discard temporary buffer, now use "%s" for dentry names + +- Don't generate path in : use fake entry instead + +- Use "existing" directory in <_devfs_make_parent_for_leaf> + +- Use slab cache rather than fixed buffer for devfsd events +=============================================================================== +Changes for patch v199 + +- Removed obsolete usage of DEVFS_FL_NO_PERSISTENCE + +- Send DEVFSD_NOTIFY_REGISTERED events in + +- Fixed locking bug in due to typo + +- Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from devfsd + or children +=============================================================================== +Changes for patch v200 + +- Ported to kernel 2.5.1-pre2 +=============================================================================== +Changes for patch v201 + +- Fixed bug in : was dereferencing freed pointer +=============================================================================== +Changes for patch v202 + +- Fixed bug in : was dereferencing freed pointer + +- Added process group check for devfsd privileges +=============================================================================== +Changes for patch v203 + +- Use SLAB_ATOMIC in from +=============================================================================== +Changes for patch v204 + +- Removed long obsolete rc.devfs + +- Return old entry in for 2.4.x kernels + +- Updated README from master HTML file + +- Increment refcount on module in + +- Created and exported + +- Increment refcount on module in + +- Created and used where needed to fix races + +- Added clarifying comments in response to preliminary EMC code review + +- Added poisoning to + +- Improved debugging messages + +- Fixed unregister bugs in drivers/md/lvm-fs.c +=============================================================================== +Changes for patch v205 + +- Corrected (made useful) debugging message in + +- Moved in to + +- Fixed drivers/md/lvm-fs.c to create "lvm" entry + +- Added magic number to guard against scribbling drivers + +- Only return old entry in if a directory + +- Defined macros for error and debug messages + +- Updated README from master HTML file +=============================================================================== +Changes for patch v206 + +- Added support for multiple Compaq cpqarray controllers + +- Fixed (rare, old) race in +=============================================================================== +Changes for patch v207 + +- Fixed deadlock bug in + +- Tag VFS deletable in if handle ignored + +- Updated README from master HTML file +=============================================================================== +Changes for patch v208 + +- Added KERN_* to remaining messages + +- Cleaned up declaration of + +- Updated README from master HTML file +=============================================================================== +Changes for patch v209 + +- Updated README from master HTML file + +- Removed silently introduced calls to lock_kernel() and + unlock_kernel() due to recent VFS locking changes. BKL isn't + required in devfs + +- Changed to allow later additions if not yet empty + +- Added calls to in drivers/block/blkpc.c + and + +- Fixed bug in : was clearing beyond + bitfield + +- Fixed bitfield data type for + +- Made major bitfield type and initialiser 64 bit safe +=============================================================================== +Changes for patch v210 + +- Updated fs/devfs/util.c to fix shift warning on 64 bit machines + Thanks to Anton Blanchard + +- Updated README from master HTML file +=============================================================================== +Changes for patch v211 + +- Do not put miscellaneous character devices in /dev/misc if they + specify their own directory (i.e. contain a '/' character) + +- Copied macro for error messages from fs/devfs/base.c to + fs/devfs/util.c and made use of this macro + +- Removed 2.4.x compatibility code from fs/devfs/base.c +=============================================================================== +Changes for patch v212 + +- Added BKL to because drivers still need it +=============================================================================== +Changes for patch v213 + +- Protected and + from changing directory contents +=============================================================================== +Changes for patch v214 + +- Switched to ISO C structure field initialisers + +- Switch to set_current_state() and move before add_wait_queue() + +- Updated README from master HTML file + +- Fixed devfs entry leak in when *readdir fails +=============================================================================== +Changes for patch v215 + +- Created + +- Switched many functions from to + + +- Switched many functions from to +=============================================================================== +Changes for patch v216 + +- Switched arch/ia64/sn/io/hcl.c from to + + +- Removed deprecated +=============================================================================== +Changes for patch v217 + +- Exported and to modules + +- Updated README from master HTML file + +- Fixed module unload race in +=============================================================================== +Changes for patch v218 + +- Removed DEVFS_FL_AUTO_OWNER flag + +- Switched lingering structure field initialiser to ISO C + +- Added locking when setting/clearing flags + +- Documentation fix in fs/devfs/util.c diff --git a/Documentation/filesystems/devfs/README b/Documentation/filesystems/devfs/README new file mode 100644 index 000000000..aabfba24b --- /dev/null +++ b/Documentation/filesystems/devfs/README @@ -0,0 +1,1959 @@ +Devfs (Device File System) FAQ + + +Linux Devfs (Device File System) FAQ +Richard Gooch +20-AUG-2002 + + +Document languages: + + + + + + + +----------------------------------------------------------------------------- + +NOTE: the master copy of this document is available online at: + +http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html +and looks much better than the text version distributed with the +kernel sources. A mirror site is available at: + +http://www.ras.ucalgary.ca/~rgooch/linux/docs/devfs.html + +There is also an optional daemon that may be used with devfs. You can +find out more about it at: + +http://www.atnf.csiro.au/~rgooch/linux/ + +A mailing list is available which you may subscribe to. Send +email +to majordomo@oss.sgi.com with the following line in the +body of the message: +subscribe devfs +To unsubscribe, send the message body: +unsubscribe devfs +instead. The list is archived at + +http://oss.sgi.com/projects/devfs/archive/. + +----------------------------------------------------------------------------- + +Contents + + +What is it? + +Why do it? + +Who else does it? + +How it works + +Operational issues (essential reading) + +Instructions for the impatient +Permissions persistence across reboots +Dealing with drivers without devfs support +All the way with Devfs +Other Issues +Kernel Naming Scheme +Devfsd Naming Scheme +Old Compatibility Names +SCSI Host Probing Issues + + + +Device drivers currently ported + +Allocation of Device Numbers + +Questions and Answers + +Making things work +Alternatives to devfs +What I don't like about devfs +How to report bugs +Strange kernel messages +Compilation problems with devfsd + + +Other resources + +Translations of this document + + +----------------------------------------------------------------------------- + + +What is it? + +Devfs is an alternative to "real" character and block special devices +on your root filesystem. Kernel device drivers can register devices by +name rather than major and minor numbers. These devices will appear in +devfs automatically, with whatever default ownership and +protection the driver specified. A daemon (devfsd) can be used to +override these defaults. Devfs has been in the kernel since 2.3.46. + +NOTE that devfs is entirely optional. If you prefer the old +disc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (the +default). In this case, nothing will change. ALSO NOTE that if you do +enable devfs, the defaults are such that full compatibility is +maintained with the old devices names. + +There are two aspects to devfs: one is the underlying device +namespace, which is a namespace just like any mounted filesystem. The +other aspect is the filesystem code which provides a view of the +device namespace. The reason I make a distinction is because devfs +can be mounted many times, with each mount showing the same device +namespace. Changes made are global to all mounted devfs filesystems. +Also, because the devfs namespace exists without any devfs mounts, you +can easily mount the root filesystem by referring to an entry in the +devfs namespace. + + +The cost of devfs is a small increase in kernel code size and memory +usage. About 7 pages of code (some of that in __init sections) and 72 +bytes for each entry in the namespace. A modest system has only a +couple of hundred device entries, so this costs a few more +pages. Compare this with the suggestion to put /dev on a ramdisc. + +On a typical machine, the cost is under 0.2 percent. On a modest +system with 64 MBytes of RAM, the cost is under 0.1 percent. The +accusations of "bloatware" levelled at devfs are not justified. + +----------------------------------------------------------------------------- + + +Why do it? + +There are several problems that devfs addresses. Some of these +problems are more serious than others (depending on your point of +view), and some can be solved without devfs. However, the totality of +these problems really calls out for devfs. + +The choice is a patchwork of inefficient user space solutions, which +are complex and likely to be fragile, or to use a simple and efficient +devfs which is robust. + +There have been many counter-proposals to devfs, all seeking to +provide some of the benefits without actually implementing devfs. So +far there has been an absence of code and no proposed alternative has +been able to provide all the features that devfs does. Further, +alternative proposals require far more complexity in user-space (and +still deliver less functionality than devfs). Some people have the +mantra of reducing "kernel bloat", but don't consider the effects on +user-space. + +A good solution limits the total complexity of kernel-space and +user-space. + + +Major&minor allocation + +The existing scheme requires the allocation of major and minor device +numbers for each and every device. This means that a central +co-ordinating authority is required to issue these device numbers +(unless you're developing a "private" device driver), in order to +preserve uniqueness. Devfs shifts the burden to a namespace. This may +not seem like a huge benefit, but actually it is. Since driver authors +will naturally choose a device name which reflects the functionality +of the device, there is far less potential for namespace conflict. +Solving this requires a kernel change. + +/dev management + +Because you currently access devices through device nodes, these must +be created by the system administrator. For standard devices you can +usually find a MAKEDEV programme which creates all these (hundreds!) +of nodes. This means that changes in the kernel must be reflected by +changes in the MAKEDEV programme, or else the system administrator +creates device nodes by hand. + +The basic problem is that there are two separate databases of +major and minor numbers. One is in the kernel and one is in /dev (or +in a MAKEDEV programme, if you want to look at it that way). This is +duplication of information, which is not good practice. +Solving this requires a kernel change. + +/dev growth + +A typical /dev has over 1200 nodes! Most of these devices simply don't +exist because the hardware is not available. A huge /dev increases the +time to access devices (I'm just referring to the dentry lookup times +and the time taken to read inodes off disc: the next subsection shows +some more horrors). + +An example of how big /dev can grow is if we consider SCSI devices: + +host 6 bits (say up to 64 hosts on a really big machine) +channel 4 bits (say up to 16 SCSI buses per host) +id 4 bits +lun 3 bits +partition 6 bits +TOTAL 23 bits + + +This requires 8 Mega (1024*1024) inodes if we want to store all +possible device nodes. Even if we scrap everything but id,partition +and assume a single host adapter with a single SCSI bus and only one +logical unit per SCSI target (id), that's still 10 bits or 1024 +inodes. Each VFS inode takes around 256 bytes (kernel 2.1.78), so +that's 256 kBytes of inode storage on disc (assuming real inodes take +a similar amount of space as VFS inodes). This is actually not so bad, +because disc is cheap these days. Embedded systems would care about +256 kBytes of /dev inodes, but you could argue that embedded systems +would have hand-tuned /dev directories. I've had to do just that on my +embedded systems, but I would rather just leave it to devfs. + +Another issue is the time taken to lookup an inode when first +referenced. Not only does this take time in scanning through a list in +memory, but also the seek times to read the inodes off disc. +This could be solved in user-space using a clever programme which +scanned the kernel logs and deleted /dev entries which are not +available and created them when they were available. This programme +would need to be run every time a new module was loaded, which would +slow things down a lot. + +There is an existing programme called scsidev which will automatically +create device nodes for SCSI devices. It can do this by scanning files +in /proc/scsi. Unfortunately, to extend this idea to other device +nodes would require significant modifications to existing drivers (so +they too would provide information in /proc). This is a non-trivial +change (I should know: devfs has had to do something similar). Once +you go to this much effort, you may as well use devfs itself (which +also provides this information). Furthermore, such a system would +likely be implemented in an ad-hoc fashion, as different drivers will +provide their information in different ways. + +Devfs is much cleaner, because it (naturally) has a uniform mechanism +to provide this information: the device nodes themselves! + + +Node to driver file_operations translation + +There is an important difference between the way disc-based character +and block nodes and devfs entries make the connection between an entry +in /dev and the actual device driver. + +With the current 8 bit major and minor numbers the connection between +disc-based c&b nodes and per-major drivers is done through a +fixed-length table of 128 entries. The various filesystem types set +the inode operations for c&b nodes to {chr,blk}dev_inode_operations, +so when a device is opened a few quick levels of indirection bring us +to the driver file_operations. + +For miscellaneous character devices a second step is required: there +is a scan for the driver entry with the same minor number as the file +that was opened, and the appropriate minor open method is called. This +scanning is done *every time* you open a device node. Potentially, you +may be searching through dozens of misc. entries before you find your +open method. While not an enormous performance overhead, this does +seem pointless. + +Linux *must* move beyond the 8 bit major and minor barrier, +somehow. If we simply increase each to 16 bits, then the indexing +scheme used for major driver lookup becomes untenable, because the +major tables (one each for character and block devices) would need to +be 64 k entries long (512 kBytes on x86, 1 MByte for 64 bit +systems). So we would have to use a scheme like that used for +miscellaneous character devices, which means the search time goes up +linearly with the average number of major device drivers on your +system. Not all "devices" are hardware, some are higher-level drivers +like KGI, so you can get more "devices" without adding hardware +You can improve this by creating an ordered (balanced:-) +binary tree, in which case your search time becomes log(N). +Alternatively, you can use hashing to speed up the search. +But why do that search at all if you don't have to? Once again, it +seems pointless. + +Note that devfs doesn't use the major&minor system. For devfs +entries, the connection is done when you lookup the /dev entry. When +devfs_register() is called, an internal table is appended which has +the entry name and the file_operations. If the dentry cache doesn't +have the /dev entry already, this internal table is scanned to get the +file_operations, and an inode is created. If the dentry cache already +has the entry, there is *no lookup time* (other than the dentry scan +itself, but we can't avoid that anyway, and besides Linux dentries +cream other OS's which don't have them:-). Furthermore, the number of +node entries in a devfs is only the number of available device +entries, not the number of *conceivable* entries. Even if you remove +unnecessary entries in a disc-based /dev, the number of conceivable +entries remains the same: you just limit yourself in order to save +space. + +Devfs provides a fast connection between a VFS node and the device +driver, in a scalable way. + +/dev as a system administration tool + +Right now /dev contains a list of conceivable devices, most of which I +don't have. Devfs only shows those devices available on my +system. This means that listing /dev is a handy way of checking what +devices are available. + +Major&minor size + +Existing major and minor numbers are limited to 8 bits each. This is +now a limiting factor for some drivers, particularly the SCSI disc +driver, which consumes a single major number. Only 16 discs are +supported, and each disc may have only 15 partitions. Maybe this isn't +a problem for you, but some of us are building huge Linux systems with +disc arrays. With devfs an arbitrary pointer can be associated with +each device entry, which can be used to give an effective 32 bit +device identifier (i.e. that's like having a 32 bit minor +number). Since this is private to the kernel, there are no C library +compatibility issues which you would have with increasing major and +minor number sizes. See the section on "Allocation of Device Numbers" +for details on maintaining compatibility with userspace. + +Solving this requires a kernel change. + +Since writing this, the kernel has been modified so that the SCSI disc +driver has more major numbers allocated to it and now supports up to +128 discs. Since these major numbers are non-contiguous (a result of +unplanned expansion), the implementation is a little more cumbersome +than originally. + +Just like the changes to IPv4 to fix impending limitations in the +address space, people find ways around the limitations. In the long +run, however, solutions like IPv6 or devfs can't be put off forever. + +Read-only root filesystem + +Having your device nodes on the root filesystem means that you can't +operate properly with a read-only root filesystem. This is because you +want to change ownerships and protections of tty devices. Existing +practice prevents you using a CD-ROM as your root filesystem for a +*real* system. Sure, you can boot off a CD-ROM, but you can't change +tty ownerships, so it's only good for installing. + +Also, you can't use a shared NFS root filesystem for a cluster of +discless Linux machines (having tty ownerships changed on a common +/dev is not good). Nor can you embed your root filesystem in a +ROM-FS. + +You can get around this by creating a RAMDISC at boot time, making +an ext2 filesystem in it, mounting it somewhere and copying the +contents of /dev into it, then unmounting it and mounting it over +/dev. + +A devfs is a cleaner way of solving this. + +Non-Unix root filesystem + +Non-Unix filesystems (such as NTFS) can't be used for a root +filesystem because they variously don't support character and block +special files or symbolic links. You can't have a separate disc-based +or RAMDISC-based filesystem mounted on /dev because you need device +nodes before you can mount these. Devfs can be mounted without any +device nodes. Devlinks won't work because symlinks aren't supported. +An alternative solution is to use initrd to mount a RAMDISC initial +root filesystem (which is populated with a minimal set of device +nodes), and then construct a new /dev in another RAMDISC, and finally +switch to your non-Unix root filesystem. This requires clever boot +scripts and a fragile and conceptually complex boot procedure. + +Devfs solves this in a robust and conceptually simple way. + +PTY security + +Current pseudo-tty (pty) devices are owned by root and read-writable +by everyone. The user of a pty-pair cannot change +ownership/protections without being suid-root. + +This could be solved with a secure user-space daemon which runs as +root and does the actual creation of pty-pairs. Such a daemon would +require modification to *every* programme that wants to use this new +mechanism. It also slows down creation of pty-pairs. + +An alternative is to create a new open_pty() syscall which does much +the same thing as the user-space daemon. Once again, this requires +modifications to pty-handling programmes. + +The devfs solution allows a device driver to "tag" certain device +files so that when an unopened device is opened, the ownerships are +changed to the current euid and egid of the opening process, and the +protections are changed to the default registered by the driver. When +the device is closed ownership is set back to root and protections are +set back to read-write for everybody. No programme need be changed. +The devpts filesystem provides this auto-ownership feature for Unix98 +ptys. It doesn't support old-style pty devices, nor does it have all +the other features of devfs. + +Intelligent device management + +Devfs implements a simple yet powerful protocol for communication with +a device management daemon (devfsd) which runs in user space. It is +possible to send a message (either synchronously or asynchronously) to +devfsd on any event, such as registration/unregistration of device +entries, opening and closing devices, looking up inodes, scanning +directories and more. This has many possibilities. Some of these are +already implemented. See: + + +http://www.atnf.csiro.au/~rgooch/linux/ + +Device entry registration events can be used by devfsd to change +permissions of newly-created device nodes. This is one mechanism to +control device permissions. + +Device entry registration/unregistration events can be used to run +programmes or scripts. This can be used to provide automatic mounting +of filesystems when a new block device media is inserted into the +drive. + +Asynchronous device open and close events can be used to implement +clever permissions management. For example, the default permissions on +/dev/dsp do not allow everybody to read from the device. This is +sensible, as you don't want some remote user recording what you say at +your console. However, the console user is also prevented from +recording. This behaviour is not desirable. With asynchronous device +open and close events, you can have devfsd run a programme or script +when console devices are opened to change the ownerships for *other* +device nodes (such as /dev/dsp). On closure, you can run a different +script to restore permissions. An advantage of this scheme over +modifying the C library tty handling is that this works even if your +programme crashes (how many times have you seen the utmp database with +lingering entries for non-existent logins?). + +Synchronous device open events can be used to perform intelligent +device access protections. Before the device driver open() method is +called, the daemon must first validate the open attempt, by running an +external programme or script. This is far more flexible than access +control lists, as access can be determined on the basis of other +system conditions instead of just the UID and GID. + +Inode lookup events can be used to authenticate module autoload +requests. Instead of using kmod directly, the event is sent to +devfsd which can implement an arbitrary authentication before loading +the module itself. + +Inode lookup events can also be used to construct arbitrary +namespaces, without having to resort to populating devfs with symlinks +to devices that don't exist. + +Speculative Device Scanning + +Consider an application (like cdparanoia) that wants to find all +CD-ROM devices on the system (SCSI, IDE and other types), whether or +not their respective modules are loaded. The application must +speculatively open certain device nodes (such as /dev/sr0 for the SCSI +CD-ROMs) in order to make sure the module is loaded. This requires +that all Linux distributions follow the standard device naming scheme +(last time I looked RedHat did things differently). Devfs solves the +naming problem. + +The same application also wants to see which devices are actually +available on the system. With the existing system it needs to read the +/dev directory and speculatively open each /dev/sr* device to +determine if the device exists or not. With a large /dev this is an +inefficient operation, especially if there are many /dev/sr* nodes. A +solution like scsidev could reduce the number of /dev/sr* entries (but +of course that also requires all that inefficient directory scanning). + +With devfs, the application can open the /dev/sr directory +(which triggers the module autoloading if required), and proceed to +read /dev/sr. Since only the available devices will have +entries, there are no inefficencies in directory scanning or device +openings. + +----------------------------------------------------------------------------- + +Who else does it? + +FreeBSD has a devfs implementation. Solaris and AIX each have a +pseudo-devfs (something akin to scsidev but for all devices, with some +unspecified kernel support). BeOS, Plan9 and QNX also have it. SGI's +IRIX 6.4 and above also have a device filesystem. + +While we shouldn't just automatically do something because others do +it, we should not ignore the work of others either. FreeBSD has a lot +of competent people working on it, so their opinion should not be +blithely ignored. + +----------------------------------------------------------------------------- + + +How it works + +Registering device entries + +For every entry (device node) in a devfs-based /dev a driver must call +devfs_register(). This adds the name of the device entry, the +file_operations structure pointer and a few other things to an +internal table. Device entries may be added and removed at any +time. When a device entry is registered, it automagically appears in +any mounted devfs'. + +Inode lookup + +When a lookup operation on an entry is performed and if there is no +driver information for that entry devfs will attempt to call +devfsd. If still no driver information can be found then a negative +dentry is yielded and the next stage operation will be called by the +VFS (such as create() or mknod() inode methods). If driver information +can be found, an inode is created (if one does not exist already) and +all is well. + +Manually creating device nodes + +The mknod() method allows you to create an ordinary named pipe in the +devfs, or you can create a character or block special inode if one +does not already exist. You may wish to create a character or block +special inode so that you can set permissions and ownership. Later, if +a device driver registers an entry with the same name, the +permissions, ownership and times are retained. This is how you can set +the protections on a device even before the driver is loaded. Once you +create an inode it appears in the directory listing. + +Unregistering device entries + +A device driver calls devfs_unregister() to unregister an entry. + +Chroot() gaols + +2.2.x kernels + +The semantics of inode creation are different when devfs is mounted +with the "explicit" option. Now, when a device entry is registered, it +will not appear until you use mknod() to create the device. It doesn't +matter if you mknod() before or after the device is registered with +devfs_register(). The purpose of this behaviour is to support +chroot(2) gaols, where you want to mount a minimal devfs inside the +gaol. Only the devices you specifically want to be available (through +your mknod() setup) will be accessible. + +2.4.x kernels + +As of kernel 2.3.99, the VFS has had the ability to rebind parts of +the global filesystem namespace into another part of the namespace. +This now works even at the leaf-node level, which means that +individual files and device nodes may be bound into other parts of the +namespace. This is like making links, but better, because it works +across filesystems (unlike hard links) and works through chroot() +gaols (unlike symbolic links). + +Because of these improvements to the VFS, the multi-mount capability +in devfs is no longer needed. The administrator may create a minimal +device tree inside a chroot(2) gaol by using VFS bindings. As this +provides most of the features of the devfs multi-mount capability, I +removed the multi-mount support code (after issuing an RFC). This +yielded code size reductions and simplifications. + +If you want to construct a minimal chroot() gaol, the following +command should suffice: + +mount --bind /dev/null /gaol/dev/null + + +Repeat for other device nodes you want to expose. Simple! + +----------------------------------------------------------------------------- + + +Operational issues + + +Instructions for the impatient + +Nobody likes reading documentation. People just want to get in there +and play. So this section tells you quickly the steps you need to take +to run with devfs mounted over /dev. Skip these steps and you will end +up with a nearly unbootable system. Subsequent sections describe the +issues in more detail, and discuss non-essential configuration +options. + +Devfsd +OK, if you're reading this, I assume you want to play with +devfs. First you should ensure that /usr/src/linux contains a +recent kernel source tree. Then you need to compile devfsd, the device +management daemon, available at + +http://www.atnf.csiro.au/~rgooch/linux/. +Because the kernel has a naming scheme +which is quite different from the old naming scheme, you need to +install devfsd so that software and configuration files that use the +old naming scheme will not break. + +Compile and install devfsd. You will be provided with a default +configuration file /etc/devfsd.conf which will provide +compatibility symlinks for the old naming scheme. Don't change this +config file unless you know what you're doing. Even if you think you +do know what you're doing, don't change it until you've followed all +the steps below and booted a devfs-enabled system and verified that it +works. + +Now edit your main system boot script so that devfsd is started at the +very beginning (before any filesystem +checks). /etc/rc.d/rc.sysinit is often the main boot script +on systems with SysV-style boot scripts. On systems with BSD-style +boot scripts it is often /etc/rc. Also check +/sbin/rc. + +NOTE that the line you put into the boot +script should be exactly: + +/sbin/devfsd /dev + +DO NOT use some special daemon-launching +programme, otherwise the boot script may not wait for devfsd to finish +initialising. + +System Libraries +There may still be some problems because of broken software making +assumptions about device names. In particular, some software does not +handle devices which are symbolic links. If you are running a libc 5 +based system, install libc 5.4.44 (if you have libc 5.4.46, go back to +libc 5.4.44, which is actually correct). If you are running a glibc +based system, make sure you have glibc 2.1.3 or later. + +/etc/securetty +PAM (Pluggable Authentication Modules) is supposed to be a flexible +mechanism for providing better user authentication and access to +services. Unfortunately, it's also fragile, complex and undocumented +(check out RedHat 6.1, and probably other distributions as well). PAM +has problems with symbolic links. Append the following lines to your +/etc/securetty file: + +vc/1 +vc/2 +vc/3 +vc/4 +vc/5 +vc/6 +vc/7 +vc/8 + +This will not weaken security. If you have a version of util-linux +earlier than 2.10.h, please upgrade to 2.10.h or later. If you +absolutely cannot upgrade, then also append the following lines to +your /etc/securetty file: + +1 +2 +3 +4 +5 +6 +7 +8 + +This may potentially weaken security by allowing root logins over the +network (a password is still required, though). However, since there +are problems with dealing with symlinks, I'm suspicious of the level +of security offered in any case. + +XFree86 +While not essential, it's probably a good idea to upgrade to XFree86 +4.0, as patches went in to make it more devfs-friendly. If you don't, +you'll probably need to apply the following patch to +/etc/security/console.perms so that ordinary users can run +startx. Note that not all distributions have this file (e.g. Debian), +so if it's not present, don't worry about it. + +--- /etc/security/console.perms.orig Sat Apr 17 16:26:47 1999 ++++ /etc/security/console.perms Fri Feb 25 23:53:55 2000 +@@ -14,7 +14,7 @@ + # man 5 console.perms + + # file classes -- these are regular expressions +-=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] ++=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] + + # device classes -- these are shell-style globs + =/dev/fd[0-1]* + +If the patch does not apply, then change the line: + +=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] + +with: + +=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] + + +Disable devpts +I've had a report of devpts mounted on /dev/pts not working +correctly. Since devfs will also manage /dev/pts, there is no +need to mount devpts as well. You should either edit your +/etc/fstab so devpts is not mounted, or disable devpts from +your kernel configuration. + +Unsupported drivers +Not all drivers have devfs support. If you depend on one of these +drivers, you will need to create a script or tarfile that you can use +at boot time to create device nodes as appropriate. There is a +section which describes this. Another +section lists the drivers which have +devfs support. + +/dev/mouse + +Many disributions configure /dev/mouse to be the mouse device +for XFree86 and GPM. I actually think this is a bad idea, because it +adds another level of indirection. When looking at a config file, if +you see /dev/mouse you're left wondering which mouse +is being referred to. Hence I recommend putting the actual mouse +device (for example /dev/psaux) into your +/etc/X11/XF86Config file (and similarly for the GPM +configuration file). + +Alternatively, use the same technique used for unsupported drivers +described above. + +The Kernel +Finally, you need to make sure devfs is compiled into your kernel. Set +CONFIG_EXPERIMENTAL=y, CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y by +using favourite configuration tool (i.e. make config or +make xconfig) and then make clean and then recompile your kernel and +modules. At boot, devfs will be mounted onto /dev. + +If you encounter problems booting (for example if you forgot a +configuration step), you can pass devfs=nomount at the kernel +boot command line. This will prevent the kernel from mounting devfs at +boot time onto /dev. + +In general, a kernel built with CONFIG_DEVFS_FS=y but without mounting +devfs onto /dev is completely safe, and requires no +configuration changes. One exception to take note of is when +LABEL= directives are used in /etc/fstab. In this +case you will be unable to boot properly. This is because the +mount(8) programme uses /proc/partitions as part of +the volume label search process, and the device names it finds are not +available, because setting CONFIG_DEVFS_FS=y changes the names in +/proc/partitions, irrespective of whether devfs is mounted. + +Now you've finished all the steps required. You're now ready to boot +your shiny new kernel. Enjoy. + +Changing the configuration + +OK, you've now booted a devfs-enabled system, and everything works. +Now you may feel like changing the configuration (common targets are +/etc/fstab and /etc/devfsd.conf). Since you have a +system that works, if you make any changes and it doesn't work, you +now know that you only have to restore your configuration files to the +default and it will work again. + + +Permissions persistence across reboots + +If you don't use mknod(2) to create a device file, nor use chmod(2) or +chown(2) to change the ownerships/permissions, the inode ctime will +remain at 0 (the epoch, 12 am, 1-JAN-1970, GMT). Anything with a ctime +later than this has had it's ownership/permissions changed. Hence, a +simple script or programme may be used to tar up all changed inodes, +prior to shutdown. Although effective, many consider this approach a +kludge. + +A much better approach is to use devfsd to save and restore +permissions. It may be configured to record changes in permissions and +will save them in a database (in fact a directory tree), and restore +these upon boot. This is an efficient method and results in immediate +saving of current permissions (unlike the tar approach, which saves +permissions at some unspecified future time). + +The default configuration file supplied with devfsd has config entries +which you may uncomment to enable persistence management. + +If you decide to use the tar approach anyway, be aware that tar will +first unlink(2) an inode before creating a new device node. The +unlink(2) has the effect of breaking the connection between a devfs +entry and the device driver. If you use the "devfs=only" boot option, +you lose access to the device driver, requiring you to reload the +module. I consider this a bug in tar (there is no real need to +unlink(2) the inode first). + +Alternatively, you can use devfsd to provide more sophisticated +management of device permissions. You can use devfsd to store +permissions for whole groups of devices with a single configuration +entry, rather than the conventional single entry per device entry. + +Permissions database stored in mounted-over /dev + +If you wish to save and restore your device permissions into the +disc-based /dev while still mounting devfs onto /dev +you may do so. This requires a 2.4.x kernel (in fact, 2.3.99 or +later), which has the VFS binding facility. You need to do the +following to set this up: + + + +make sure the kernel does not mount devfs at boot time + + +make sure you have a correct /dev/console entry in your +root file-system (where your disc-based /dev lives) + +create the /dev-state directory + + +add the following lines near the very beginning of your boot +scripts: + +mount --bind /dev /dev-state +mount -t devfs none /dev +devfsd /dev + + + + +add the following lines to your /etc/devfsd.conf file: + +REGISTER ^pt[sy] IGNORE +CREATE ^pt[sy] IGNORE +CHANGE ^pt[sy] IGNORE +DELETE ^pt[sy] IGNORE +REGISTER .* COPY /dev-state/$devname $devpath +CREATE .* COPY $devpath /dev-state/$devname +CHANGE .* COPY $devpath /dev-state/$devname +DELETE .* CFUNCTION GLOBAL unlink /dev-state/$devname +RESTORE /dev-state + +Note that the sample devfsd.conf file contains these lines, +as well as other sample configurations you may find useful. See the +devfsd distribution + + +reboot. + + + + +Permissions database stored in normal directory + +If you are using an older kernel which doesn't support VFS binding, +then you won't be able to have the permissions database in a +mounted-over /dev. However, you can still use a regular +directory to store the database. The sample /etc/devfsd.conf +file above may still be used. You will need to create the +/dev-state directory prior to installing devfsd. If you have +old permissions in /dev, then just copy (or move) the device +nodes over to the new directory. + +Which method is better? + +The best method is to have the permissions database stored in the +mounted-over /dev. This is because you will not need to copy +device nodes over to /dev-state, and because it allows you to +switch between devfs and non-devfs kernels, without requiring you to +copy permissions between /dev-state (for devfs) and +/dev (for non-devfs). + + +Dealing with drivers without devfs support + +Currently, not all device drivers in the kernel have been modified to +use devfs. Device drivers which do not yet have devfs support will not +automagically appear in devfs. The simplest way to create device nodes +for these drivers is to unpack a tarfile containing the required +device nodes. You can do this in your boot scripts. All your drivers +will now work as before. + +Hopefully for most people devfs will have enough support so that they +can mount devfs directly over /dev without losing most functionality +(i.e. losing access to various devices). As of 22-JAN-1998 (devfs +patch version 10) I am now running this way. All the devices I have +are available in devfs, so I don't lose anything. + +WARNING: if your configuration requires the old-style device names +(i.e. /dev/hda1 or /dev/sda1), you must install devfsd and configure +it to maintain compatibility entries. It is almost certain that you +will require this. Note that the kernel creates a compatibility entry +for the root device, so you don't need initrd. + +Note that you no longer need to mount devpts if you use Unix98 PTYs, +as devfs can manage /dev/pts itself. This saves you some RAM, as you +don't need to compile and install devpts. Note that some versions of +glibc have a bug with Unix98 pty handling on devfs systems. Contact +the glibc maintainers for a fix. Glibc 2.1.3 has the fix. + +Note also that apart from editing /etc/fstab, other things will need +to be changed if you *don't* install devfsd. Some software (like the X +server) hard-wire device names in their source. It really is much +easier to install devfsd so that compatibility entries are created. +You can then slowly migrate your system to using the new device names +(for example, by starting with /etc/fstab), and then limiting the +compatibility entries that devfsd creates. + +IF YOU CONFIGURE TO MOUNT DEVFS AT BOOT, MAKE SURE YOU INSTALL DEVFSD +BEFORE YOU BOOT A DEVFS-ENABLED KERNEL! + +Now that devfs has gone into the 2.3.46 kernel, I'm getting a lot of +reports back. Many of these are because people are trying to run +without devfsd, and hence some things break. Please just run devfsd if +things break. I want to concentrate on real bugs rather than +misconfiguration problems at the moment. If people are willing to fix +bugs/false assumptions in other code (i.e. glibc, X server) and submit +that to the respective maintainers, that would be great. + + +All the way with Devfs + +The devfs kernel patch creates a rationalised device tree. As stated +above, if you want to keep using the old /dev naming scheme, +you just need to configure devfsd appopriately (see the man +page). People who prefer the old names can ignore this section. For +those of us who like the rationalised names and an uncluttered +/dev, read on. + +If you don't run devfsd, or don't enable compatibility entry +management, then you will have to configure your system to use the new +names. For example, you will then need to edit your +/etc/fstab to use the new disc naming scheme. If you want to +be able to boot non-devfs kernels, you will need compatibility +symlinks in the underlying disc-based /dev pointing back to +the old-style names for when you boot a kernel without devfs. + +You can selectively decide which devices you want compatibility +entries for. For example, you may only want compatibility entries for +BSD pseudo-terminal devices (otherwise you'll have to patch you C +library or use Unix98 ptys instead). It's just a matter of putting in +the correct regular expression into /dev/devfsd.conf. + +There are other choices of naming schemes that you may prefer. For +example, I don't use the kernel-supplied +names, because they are too verbose. A common misconception is +that the kernel-supplied names are meant to be used directly in +configuration files. This is not the case. They are designed to +reflect the layout of the devices attached and to provide easy +classification. + +If you like the kernel-supplied names, that's fine. If you don't then +you should be using devfsd to construct a namespace more to your +liking. Devfsd has built-in code to construct a +namespace that is both logical and easy to +manage. In essence, it creates a convenient abbreviation of the +kernel-supplied namespace. + +You are of course free to build your own namespace. Devfsd has all the +infrastructure required to make this easy for you. All you need do is +write a script. You can even write some C code and devfsd can load the +shared object as a callable extension. + + +Other Issues + +The init programme +Another thing to take note of is whether your init programme +creates a Unix socket /dev/telinit. Some versions of init +create /dev/telinit so that the telinit programme can +communicate with the init process. If you have such a system you need +to make sure that devfs is mounted over /dev *before* init +starts. In other words, you can't leave the mounting of devfs to +/etc/rc, since this is executed after init. Other +versions of init require a named pipe /dev/initctl +which must exist *before* init starts. Once again, you need to +mount devfs and then create the named pipe *before* init +starts. + +The default behaviour now is not to mount devfs onto /dev at +boot time for 2.3.x and later kernels. You can correct this with the +"devfs=mount" boot option. This solves any problems with init, +and also prevents the dreaded: + +Cannot open initial console + +message. For 2.2.x kernels where you need to apply the devfs patch, +the default is to mount. + +If you have automatic mounting of devfs onto /dev then you +may need to create /dev/initctl in your boot scripts. The +following lines should suffice: + +mknod /dev/initctl p +kill -SIGUSR1 1 # tell init that /dev/initctl now exists + +Alternatively, if you don't want the kernel to mount devfs onto +/dev then you could use the following procedure is a +guideline for how to get around /dev/initctl problems: + +# cd /sbin +# mv init init.real +# cat > init +#! /bin/sh +mount -n -t devfs none /dev +mknod /dev/initctl p +exec /sbin/init.real $* +[control-D] +# chmod a+x init + +Note that newer versions of init create /dev/initctl +automatically, so you don't have to worry about this. + +Module autoloading +You will need to configure devfsd to enable module +autoloading. The following lines should be placed in your +/etc/devfsd.conf file: + +LOOKUP .* MODLOAD + + +As of devfsd-v1.3.10, a generic /etc/modules.devfs +configuration file is installed, which is used by the MODLOAD +action. This should be sufficient for most configurations. If you +require further configuration, edit your /etc/modules.conf +file. The way module autoloading work with devfs is: + + +a process attempts to lookup a device node (e.g. /dev/fred) + + +if that device node does not exist, the full pathname is passed to +devfsd as a string + + +devfsd will pass the string to the modprobe programme (provided the +configuration line shown above is present), and specifies that +/etc/modules.devfs is the configuration file + + +/etc/modules.devfs includes /etc/modules.conf to +access local configurations + +modprobe will search it's configuration files, looking for an alias +that translates the pathname into a module name + + +the translated pathname is then used to load the module. + + +If you wanted a lookup of /dev/fred to load the +mymod module, you would require the following configuration +line in /etc/modules.conf: + +alias /dev/fred mymod + +The /etc/modules.devfs configuration file provides many such +aliases for standard device names. If you look closely at this file, +you will note that some modules require multiple alias configuration +lines. This is required to support module autoloading for old and new +device names. + +Mounting root off a devfs device +If you wish to mount root off a devfs device when you pass the +"devfs=only" boot option, then you need to pass in the +"root=" option to the kernel when booting. If you use +LILO, then you must have this in lilo.conf: + +append = "root=" + +Surprised? Yep, so was I. It turns out if you have (as most people +do): + +root = + + +then LILO will determine the device number of and will +write that device number into a special place in the kernel image +before starting the kernel, and the kernel will use that device number +to mount the root filesystem. So, using the "append" variety ensures +that LILO passes the root filesystem device as a string, which devfs +can then use. + +Note that this isn't an issue if you don't pass "devfs=only". + +TTY issues +The ttyname(3) function in some versions of the C library makes +false assumptions about device entries which are symbolic links. The +tty(1) programme is one that depends on this function. I've +written a patch to libc 5.4.43 which fixes this. This has been +included in libc 5.4.44 and a similar fix is in glibc 2.1.3. + + +Kernel Naming Scheme + +The kernel provides a default naming scheme. This scheme is designed +to make it easy to search for specific devices or device types, and to +view the available devices. Some device types (such as hard discs), +have a directory of entries, making it easy to see what devices of +that class are available. Often, the entries are symbolic links into a +directory tree that reflects the topology of available devices. The +topological tree is useful for finding how your devices are arranged. + +Below is a list of the naming schemes for the most common drivers. A +list of reserved device names is +available for reference. Please send email to +rgooch@atnf.csiro.au to obtain an allocation. Please be +patient (the maintainer is busy). An alternative name may be allocated +instead of the requested name, at the discretion of the maintainer. + +Disc Devices + +All discs, whether SCSI, IDE or whatever, are placed under the +/dev/discs hierarchy: + + /dev/discs/disc0 first disc + /dev/discs/disc1 second disc + + +Each of these entries is a symbolic link to the directory for that +device. The device directory contains: + + disc for the whole disc + part* for individual partitions + + +CD-ROM Devices + +All CD-ROMs, whether SCSI, IDE or whatever, are placed under the +/dev/cdroms hierarchy: + + /dev/cdroms/cdrom0 first CD-ROM + /dev/cdroms/cdrom1 second CD-ROM + + +Each of these entries is a symbolic link to the real device entry for +that device. + +Tape Devices + +All tapes, whether SCSI, IDE or whatever, are placed under the +/dev/tapes hierarchy: + + /dev/tapes/tape0 first tape + /dev/tapes/tape1 second tape + + +Each of these entries is a symbolic link to the directory for that +device. The device directory contains: + + mt for mode 0 + mtl for mode 1 + mtm for mode 2 + mta for mode 3 + mtn for mode 0, no rewind + mtln for mode 1, no rewind + mtmn for mode 2, no rewind + mtan for mode 3, no rewind + + +SCSI Devices + +To uniquely identify any SCSI device requires the following +information: + + controller (host adapter) + bus (SCSI channel) + target (SCSI ID) + unit (Logical Unit Number) + + +All SCSI devices are placed under /dev/scsi (assuming devfs +is mounted on /dev). Hence, a SCSI device with the following +parameters: c=1,b=2,t=3,u=4 would appear as: + + /dev/scsi/host1/bus2/target3/lun4 device directory + + +Inside this directory, a number of device entries may be created, +depending on which SCSI device-type drivers were installed. + +See the section on the disc naming scheme to see what entries the SCSI +disc driver creates. + +See the section on the tape naming scheme to see what entries the SCSI +tape driver creates. + +The SCSI CD-ROM driver creates: + + cd + + +The SCSI generic driver creates: + + generic + + +IDE Devices + +To uniquely identify any IDE device requires the following +information: + + controller + bus (aka. primary/secondary) + target (aka. master/slave) + unit + + +All IDE devices are placed under /dev/ide, and uses a similar +naming scheme to the SCSI subsystem. + +XT Hard Discs + +All XT discs are placed under /dev/xd. The first XT disc has +the directory /dev/xd/disc0. + +TTY devices + +The tty devices now appear as: + + New name Old-name Device Type + -------- -------- ----------- + /dev/tts/{0,1,...} /dev/ttyS{0,1,...} Serial ports + /dev/cua/{0,1,...} /dev/cua{0,1,...} Call out devices + /dev/vc/0 /dev/tty Current virtual console + /dev/vc/{1,2,...} /dev/tty{1...63} Virtual consoles + /dev/vcc/{0,1,...} /dev/vcs{1...63} Virtual consoles + /dev/pty/m{0,1,...} /dev/ptyp?? PTY masters + /dev/pty/s{0,1,...} /dev/ttyp?? PTY slaves + + +RAMDISCS + +The RAMDISCS are placed in their own directory, and are named thus: + + /dev/rd/{0,1,2,...} + + +Meta Devices + +The meta devices are placed in their own directory, and are named +thus: + + /dev/md/{0,1,2,...} + + +Floppy discs + +Floppy discs are placed in the /dev/floppy directory. + +Loop devices + +Loop devices are placed in the /dev/loop directory. + +Sound devices + +Sound devices are placed in the /dev/sound directory +(audio, sequencer, ...). + + +Devfsd Naming Scheme + +Devfsd provides a naming scheme which is a convenient abbreviation of +the kernel-supplied namespace. In some +cases, the kernel-supplied naming scheme is quite convenient, so +devfsd does not provide another naming scheme. The convenience names +that devfsd creates are in fact the same names as the original devfs +kernel patch created (before Linus mandated the Big Name +Change). These are referred to as "new compatibility entries". + +In order to configure devfsd to create these convenience names, the +following lines should be placed in your /etc/devfsd.conf: + +REGISTER .* MKNEWCOMPAT +UNREGISTER .* RMNEWCOMPAT + +This will cause devfsd to create (and destroy) symbolic links which +point to the kernel-supplied names. + +SCSI Hard Discs + +All SCSI discs are placed under /dev/sd (assuming devfs is +mounted on /dev). Hence, a SCSI disc with the following +parameters: c=1,b=2,t=3,u=4 would appear as: + + /dev/sd/c1b2t3u4 for the whole disc + /dev/sd/c1b2t3u4p5 for the 5th partition + /dev/sd/c1b2t3u4p5s6 for the 6th slice in the 5th partition + + +SCSI Tapes + +All SCSI tapes are placed under /dev/st. A similar naming +scheme is used as for SCSI discs. A SCSI tape with the +parameters:c=1,b=2,t=3,u=4 would appear as: + + /dev/st/c1b2t3u4m0 for mode 0 + /dev/st/c1b2t3u4m1 for mode 1 + /dev/st/c1b2t3u4m2 for mode 2 + /dev/st/c1b2t3u4m3 for mode 3 + /dev/st/c1b2t3u4m0n for mode 0, no rewind + /dev/st/c1b2t3u4m1n for mode 1, no rewind + /dev/st/c1b2t3u4m2n for mode 2, no rewind + /dev/st/c1b2t3u4m3n for mode 3, no rewind + + +SCSI CD-ROMs + +All SCSI CD-ROMs are placed under /dev/sr. A similar naming +scheme is used as for SCSI discs. A SCSI CD-ROM with the +parameters:c=1,b=2,t=3,u=4 would appear as: + + /dev/sr/c1b2t3u4 + + +SCSI Generic Devices + +The generic (aka. raw) interface for all SCSI devices are placed under +/dev/sg. A similar naming scheme is used as for SCSI discs. A +SCSI generic device with the parameters:c=1,b=2,t=3,u=4 would appear +as: + + /dev/sg/c1b2t3u4 + + +IDE Hard Discs + +All IDE discs are placed under /dev/ide/hd, using a similar +convention to SCSI discs. The following mappings exist between the new +and the old names: + + /dev/hda /dev/ide/hd/c0b0t0u0 + /dev/hdb /dev/ide/hd/c0b0t1u0 + /dev/hdc /dev/ide/hd/c0b1t0u0 + /dev/hdd /dev/ide/hd/c0b1t1u0 + + +IDE Tapes + +A similar naming scheme is used as for IDE discs. The entries will +appear in the /dev/ide/mt directory. + +IDE CD-ROM + +A similar naming scheme is used as for IDE discs. The entries will +appear in the /dev/ide/cd directory. + +IDE Floppies + +A similar naming scheme is used as for IDE discs. The entries will +appear in the /dev/ide/fd directory. + +XT Hard Discs + +All XT discs are placed under /dev/xd. The first XT disc +would appear as /dev/xd/c0t0. + + +Old Compatibility Names + +The old compatibility names are the legacy device names, such as +/dev/hda, /dev/sda, /dev/rtc and so on. +Devfsd can be configured to create compatibility symlinks so that you +may continue to use the old names in your configuration files and so +that old applications will continue to function correctly. + +In order to configure devfsd to create these legacy names, the +following lines should be placed in your /etc/devfsd.conf: + +REGISTER .* MKOLDCOMPAT +UNREGISTER .* RMOLDCOMPAT + +This will cause devfsd to create (and destroy) symbolic links which +point to the kernel-supplied names. + + +----------------------------------------------------------------------------- + + +Device drivers currently ported + +- All miscellaneous character devices support devfs (this is done + transparently through misc_register()) + +- SCSI discs and generic hard discs + +- Character memory devices (null, zero, full and so on) + Thanks to C. Scott Ananian + +- Loop devices (/dev/loop?) + +- TTY devices (console, serial ports, terminals and pseudo-terminals) + Thanks to C. Scott Ananian + +- SCSI tapes (/dev/scsi and /dev/tapes) + +- SCSI CD-ROMs (/dev/scsi and /dev/cdroms) + +- SCSI generic devices (/dev/scsi) + +- RAMDISCS (/dev/ram?) + +- Meta Devices (/dev/md*) + +- Floppy discs (/dev/floppy) + +- Parallel port printers (/dev/printers) + +- Sound devices (/dev/sound) + Thanks to Eric Dumas and + C. Scott Ananian + +- Joysticks (/dev/joysticks) + +- Sparc keyboard (/dev/kbd) + +- DSP56001 digital signal processor (/dev/dsp56k) + +- Apple Desktop Bus (/dev/adb) + +- Coda network file system (/dev/cfs*) + +- Virtual console capture devices (/dev/vcc) + Thanks to Dennis Hou + +- Frame buffer devices (/dev/fb) + +- Video capture devices (/dev/v4l) + + +----------------------------------------------------------------------------- + + +Allocation of Device Numbers + +Devfs allows you to write a driver which doesn't need to allocate a +device number (major&minor numbers) for the internal operation of the +kernel. However, there are a number of userspace programmes that use +the device number as a unique handle for a device. An example is the +find programme, which uses device numbers to determine whether +an inode is on a different filesystem than another inode. The device +number used is the one for the block device which a filesystem is +using. To preserve compatibility with userspace programmes, block +devices using devfs need to have unique device numbers allocated to +them. Furthermore, POSIX specifies device numbers, so some kind of +device number needs to be presented to userspace. + +The simplest option (especially when porting drivers to devfs) is to +keep using the old major and minor numbers. Devfs will take whatever +values are given for major&minor and pass them onto userspace. + +This device number is a 16 bit number, so this leaves plenty of space +for large numbers of discs and partitions. This scheme can also be +used for character devices, in particular the tty devices, which are +currently limited to 256 pseudo-ttys (this limits the total number of +simultaneous xterms and remote logins). Note that the device number +is limited to the range 36864-61439 (majors 144-239), in order to +avoid any possible conflicts with existing official allocations. + +Please note that using dynamically allocated block device numbers may +break the NFS daemons (both user and kernel mode), which expect dev_t +for a given device to be constant over the lifetime of remote mounts. + +A final note on this scheme: since it doesn't increase the size of +device numbers, there are no compatibility issues with userspace. + +----------------------------------------------------------------------------- + + +Questions and Answers + + +Making things work +Alternatives to devfs +What I don't like about devfs +How to report bugs +Strange kernel messages +Compilation problems with devfsd + + + +Making things work + +Here are some common questions and answers. + + + +Devfsd doesn't start + +Make sure you have compiled and installed devfsd +Make sure devfsd is being started from your boot +scripts +Make sure you have configured your kernel to enable devfs (see +below) +Make sure devfs is mounted (see below) + + +Devfsd is not managing all my permissions + +Make sure you are capturing the appropriate events. For example, +device entries created by the kernel generate REGISTER events, +but those created by devfsd generate CREATE events. + + +Devfsd is not capturing all REGISTER events + +See the previous entry: you may need to capture CREATE events. + + +X will not start + +Make sure you followed the steps +outlined above. + + +Why don't my network devices appear in devfs? + +This is not a bug. Network devices have their own, completely separate +namespace. They are accessed via socket(2) and +setsockopt(2) calls, and thus require no device nodes. I have +raised the possibilty of moving network devices into the device +namespace, but have had no response. + + +How can I test if I have devfs compiled into my kernel? + +All filesystems built-in or currently loaded are listed in +/proc/filesystems. If you see a devfs entry, then +you know that devfs was compiled into your kernel. If you have +correctly configured and rebuilt your kernel, then devfs will be +built-in. If you think you've configured it in, but +/proc/filesystems doesn't show it, you've made a mistake. +Common mistakes include: + +Using a 2.2.x kernel without applying the devfs patch (if you +don't know how to patch your kernel, use 2.4.x instead, don't bother +asking me how to patch) +Forgetting to set CONFIG_EXPERIMENTAL=y +Forgetting to set CONFIG_DEVFS_FS=y +Forgetting to set CONFIG_DEVFS_MOUNT=y (if you want devfs +to be automatically mounted at boot) +Editing your .config manually, instead of using make +config or make xconfig +Forgetting to run make dep; make clean after changing the +configuration and before compiling +Forgetting to compile your kernel and modules +Forgetting to install your kernel +Forgetting to install your modules + +Please check twice that you've done all these steps before sending in +a bug report. + + + +How can I test if devfs is mounted on /dev? + +The device filesystem will always create an entry called +".devfsd", which is used to communicate with the daemon. Even +if the daemon is not running, this entry will exist. Testing for the +existence of this entry is the approved method of determining if devfs +is mounted or not. Note that the type of entry (i.e. regular file, +character device, named pipe, etc.) may change without notice. Only +the existence of the entry should be relied upon. + + +When I start devfsd, I see the error: +Error opening file: ".devfsd" No such file or directory? + +This means that devfs is not mounted. Make sure you have devfs mounted. + + +How do I mount devfs? + +First make sure you have devfs compiled into your kernel (see +above). Then you will either need to: + +set CONFIG_DEVFS_MOUNT=y in your kernel config +pass devfs=mount to your boot loader +mount devfs manually in your boot scripts with: +mount -t none devfs /dev + + + +Mount by volume LABEL= where a is the interrupt number and b is a field that represents an encoding of the sense and level @@ -1216,7 +1216,7 @@ platforms are moved over to use the flattened-device-tree model. model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; - mac-address = [ 00 E0 0C 00 73 00 ]; + address = [ 00 E0 0C 00 73 00 ]; interrupts = ; interrupt-parent = <40000>; phy-handle = <2452000> @@ -1436,9 +1436,9 @@ platforms are moved over to use the flattened-device-tree model. interrupts = <1d 3>; interrupt-parent = <40000>; num-channels = <4>; - channel-fifo-len = <18>; + channel-fifo-len = <24>; exec-units-mask = <000000fe>; - descriptor-types-mask = <012b0ebf>; + descriptor-types-mask = <073f1127>; }; @@ -1498,7 +1498,7 @@ not necessary as they are usually the same as the root node. model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; - mac-address = [ 00 E0 0C 00 73 00 ]; + address = [ 00 E0 0C 00 73 00 ]; interrupts = ; interrupt-parent = <40000>; phy-handle = <2452000>; @@ -1511,7 +1511,7 @@ not necessary as they are usually the same as the root node. model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; - mac-address = [ 00 E0 0C 00 73 01 ]; + address = [ 00 E0 0C 00 73 01 ]; interrupts = <13 3 14 3 18 3>; interrupt-parent = <40000>; phy-handle = <2452001>; @@ -1524,7 +1524,7 @@ not necessary as they are usually the same as the root node. model = "FEC"; compatible = "gianfar"; reg = <26000 1000>; - mac-address = [ 00 E0 0C 00 73 02 ]; + address = [ 00 E0 0C 00 73 02 ]; interrupts = <19 3>; interrupt-parent = <40000>; phy-handle = <2452002>; diff --git a/Documentation/ramdisk.txt b/Documentation/ramdisk.txt index 52f75b7d5..7c25584e0 100644 --- a/Documentation/ramdisk.txt +++ b/Documentation/ramdisk.txt @@ -6,7 +6,7 @@ Contents: 1) Overview 2) Kernel Command Line Parameters 3) Using "rdev -r" - 4) An Example of Creating a Compressed RAM Disk + 4) An Example of Creating a Compressed RAM Disk 1) Overview @@ -34,7 +34,7 @@ make it clearer. The original "ramdisk=" has been kept around for compatibility reasons, but it may be removed in the future. The new RAM disk also has the ability to load compressed RAM disk images, -allowing one to squeeze more programs onto an average installation or +allowing one to squeeze more programs onto an average installation or rescue floppy disk. @@ -51,7 +51,7 @@ default is 4096 (4 MB) (8192 (8 MB) on S390). =================== This parameter tells the RAM disk driver how many bytes to use per block. The -default is 1024 (BLOCK_SIZE). +default is 512. 3) Using "rdev -r" @@ -70,7 +70,7 @@ These numbers are no magical secrets, as seen below: ./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 ./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 -Consider a typical two floppy disk setup, where you will have the +Consider a typical two floppy disk setup, where you will have the kernel on disk one, and have already put a RAM disk image onto disk #2. Hence you want to set bits 0 to 13 as 0, meaning that your RAM disk @@ -97,12 +97,12 @@ Since the default start = 0 and the default prompt = 1, you could use: append = "load_ramdisk=1" -4) An Example of Creating a Compressed RAM Disk +4) An Example of Creating a Compressed RAM Disk ---------------------------------------------- To create a RAM disk image, you will need a spare block device to construct it on. This can be the RAM disk device itself, or an -unused disk partition (such as an unmounted swap partition). For this +unused disk partition (such as an unmounted swap partition). For this example, we will use the RAM disk device, "/dev/ram0". Note: This technique should not be done on a machine with less than 8 MB diff --git a/Documentation/robust-futexes.txt b/Documentation/robust-futexes.txt index 76e8064b8..df82d7524 100644 --- a/Documentation/robust-futexes.txt +++ b/Documentation/robust-futexes.txt @@ -95,7 +95,7 @@ comparison. If the thread has registered a list, then normally the list is empty. If the thread/process crashed or terminated in some incorrect way then the list might be non-empty: in this case the kernel carefully walks the list [not trusting it], and marks all locks that are owned by -this thread with the FUTEX_OWNER_DIED bit, and wakes up one waiter (if +this thread with the FUTEX_OWNER_DEAD bit, and wakes up one waiter (if any). The list is guaranteed to be private and per-thread at do_exit() time, diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt deleted file mode 100644 index c472ffacc..000000000 --- a/Documentation/rt-mutex-design.txt +++ /dev/null @@ -1,781 +0,0 @@ -# -# Copyright (c) 2006 Steven Rostedt -# Licensed under the GNU Free Documentation License, Version 1.2 -# - -RT-mutex implementation design ------------------------------- - -This document tries to describe the design of the rtmutex.c implementation. -It doesn't describe the reasons why rtmutex.c exists. For that please see -Documentation/rt-mutex.txt. Although this document does explain problems -that happen without this code, but that is in the concept to understand -what the code actually is doing. - -The goal of this document is to help others understand the priority -inheritance (PI) algorithm that is used, as well as reasons for the -decisions that were made to implement PI in the manner that was done. - - -Unbounded Priority Inversion ----------------------------- - -Priority inversion is when a lower priority process executes while a higher -priority process wants to run. This happens for several reasons, and -most of the time it can't be helped. Anytime a high priority process wants -to use a resource that a lower priority process has (a mutex for example), -the high priority process must wait until the lower priority process is done -with the resource. This is a priority inversion. What we want to prevent -is something called unbounded priority inversion. That is when the high -priority process is prevented from running by a lower priority process for -an undetermined amount of time. - -The classic example of unbounded priority inversion is were you have three -processes, let's call them processes A, B, and C, where A is the highest -priority process, C is the lowest, and B is in between. A tries to grab a lock -that C owns and must wait and lets C run to release the lock. But in the -meantime, B executes, and since B is of a higher priority than C, it preempts C, -but by doing so, it is in fact preempting A which is a higher priority process. -Now there's no way of knowing how long A will be sleeping waiting for C -to release the lock, because for all we know, B is a CPU hog and will -never give C a chance to release the lock. This is called unbounded priority -inversion. - -Here's a little ASCII art to show the problem. - - grab lock L1 (owned by C) - | -A ---+ - C preempted by B - | -C +----+ - -B +--------> - B now keeps A from running. - - -Priority Inheritance (PI) -------------------------- - -There are several ways to solve this issue, but other ways are out of scope -for this document. Here we only discuss PI. - -PI is where a process inherits the priority of another process if the other -process blocks on a lock owned by the current process. To make this easier -to understand, let's use the previous example, with processes A, B, and C again. - -This time, when A blocks on the lock owned by C, C would inherit the priority -of A. So now if B becomes runnable, it would not preempt C, since C now has -the high priority of A. As soon as C releases the lock, it loses its -inherited priority, and A then can continue with the resource that C had. - -Terminology ------------ - -Here I explain some terminology that is used in this document to help describe -the design that is used to implement PI. - -PI chain - The PI chain is an ordered series of locks and processes that cause - processes to inherit priorities from a previous process that is - blocked on one of its locks. This is described in more detail - later in this document. - -mutex - In this document, to differentiate from locks that implement - PI and spin locks that are used in the PI code, from now on - the PI locks will be called a mutex. - -lock - In this document from now on, I will use the term lock when - referring to spin locks that are used to protect parts of the PI - algorithm. These locks disable preemption for UP (when - CONFIG_PREEMPT is enabled) and on SMP prevents multiple CPUs from - entering critical sections simultaneously. - -spin lock - Same as lock above. - -waiter - A waiter is a struct that is stored on the stack of a blocked - process. Since the scope of the waiter is within the code for - a process being blocked on the mutex, it is fine to allocate - the waiter on the process's stack (local variable). This - structure holds a pointer to the task, as well as the mutex that - the task is blocked on. It also has the plist node structures to - place the task in the waiter_list of a mutex as well as the - pi_list of a mutex owner task (described below). - - waiter is sometimes used in reference to the task that is waiting - on a mutex. This is the same as waiter->task. - -waiters - A list of processes that are blocked on a mutex. - -top waiter - The highest priority process waiting on a specific mutex. - -top pi waiter - The highest priority process waiting on one of the mutexes - that a specific process owns. - -Note: task and process are used interchangeably in this document, mostly to - differentiate between two processes that are being described together. - - -PI chain --------- - -The PI chain is a list of processes and mutexes that may cause priority -inheritance to take place. Multiple chains may converge, but a chain -would never diverge, since a process can't be blocked on more than one -mutex at a time. - -Example: - - Process: A, B, C, D, E - Mutexes: L1, L2, L3, L4 - - A owns: L1 - B blocked on L1 - B owns L2 - C blocked on L2 - C owns L3 - D blocked on L3 - D owns L4 - E blocked on L4 - -The chain would be: - - E->L4->D->L3->C->L2->B->L1->A - -To show where two chains merge, we could add another process F and -another mutex L5 where B owns L5 and F is blocked on mutex L5. - -The chain for F would be: - - F->L5->B->L1->A - -Since a process may own more than one mutex, but never be blocked on more than -one, the chains merge. - -Here we show both chains: - - E->L4->D->L3->C->L2-+ - | - +->B->L1->A - | - F->L5-+ - -For PI to work, the processes at the right end of these chains (or we may -also call it the Top of the chain) must be equal to or higher in priority -than the processes to the left or below in the chain. - -Also since a mutex may have more than one process blocked on it, we can -have multiple chains merge at mutexes. If we add another process G that is -blocked on mutex L2: - - G->L2->B->L1->A - -And once again, to show how this can grow I will show the merging chains -again. - - E->L4->D->L3->C-+ - +->L2-+ - | | - G-+ +->B->L1->A - | - F->L5-+ - - -Plist ------ - -Before I go further and talk about how the PI chain is stored through lists -on both mutexes and processes, I'll explain the plist. This is similar to -the struct list_head functionality that is already in the kernel. -The implementation of plist is out of scope for this document, but it is -very important to understand what it does. - -There are a few differences between plist and list, the most important one -being that plist is a priority sorted linked list. This means that the -priorities of the plist are sorted, such that it takes O(1) to retrieve the -highest priority item in the list. Obviously this is useful to store processes -based on their priorities. - -Another difference, which is important for implementation, is that, unlike -list, the head of the list is a different element than the nodes of a list. -So the head of the list is declared as struct plist_head and nodes that will -be added to the list are declared as struct plist_node. - - -Mutex Waiter List ------------------ - -Every mutex keeps track of all the waiters that are blocked on itself. The mutex -has a plist to store these waiters by priority. This list is protected by -a spin lock that is located in the struct of the mutex. This lock is called -wait_lock. Since the modification of the waiter list is never done in -interrupt context, the wait_lock can be taken without disabling interrupts. - - -Task PI List ------------- - -To keep track of the PI chains, each process has its own PI list. This is -a list of all top waiters of the mutexes that are owned by the process. -Note that this list only holds the top waiters and not all waiters that are -blocked on mutexes owned by the process. - -The top of the task's PI list is always the highest priority task that -is waiting on a mutex that is owned by the task. So if the task has -inherited a priority, it will always be the priority of the task that is -at the top of this list. - -This list is stored in the task structure of a process as a plist called -pi_list. This list is protected by a spin lock also in the task structure, -called pi_lock. This lock may also be taken in interrupt context, so when -locking the pi_lock, interrupts must be disabled. - - -Depth of the PI Chain ---------------------- - -The maximum depth of the PI chain is not dynamic, and could actually be -defined. But is very complex to figure it out, since it depends on all -the nesting of mutexes. Let's look at the example where we have 3 mutexes, -L1, L2, and L3, and four separate functions func1, func2, func3 and func4. -The following shows a locking order of L1->L2->L3, but may not actually -be directly nested that way. - -void func1(void) -{ - mutex_lock(L1); - - /* do anything */ - - mutex_unlock(L1); -} - -void func2(void) -{ - mutex_lock(L1); - mutex_lock(L2); - - /* do something */ - - mutex_unlock(L2); - mutex_unlock(L1); -} - -void func3(void) -{ - mutex_lock(L2); - mutex_lock(L3); - - /* do something else */ - - mutex_unlock(L3); - mutex_unlock(L2); -} - -void func4(void) -{ - mutex_lock(L3); - - /* do something again */ - - mutex_unlock(L3); -} - -Now we add 4 processes that run each of these functions separately. -Processes A, B, C, and D which run functions func1, func2, func3 and func4 -respectively, and such that D runs first and A last. With D being preempted -in func4 in the "do something again" area, we have a locking that follows: - -D owns L3 - C blocked on L3 - C owns L2 - B blocked on L2 - B owns L1 - A blocked on L1 - -And thus we have the chain A->L1->B->L2->C->L3->D. - -This gives us a PI depth of 4 (four processes), but looking at any of the -functions individually, it seems as though they only have at most a locking -depth of two. So, although the locking depth is defined at compile time, -it still is very difficult to find the possibilities of that depth. - -Now since mutexes can be defined by user-land applications, we don't want a DOS -type of application that nests large amounts of mutexes to create a large -PI chain, and have the code holding spin locks while looking at a large -amount of data. So to prevent this, the implementation not only implements -a maximum lock depth, but also only holds at most two different locks at a -time, as it walks the PI chain. More about this below. - - -Mutex owner and flags ---------------------- - -The mutex structure contains a pointer to the owner of the mutex. If the -mutex is not owned, this owner is set to NULL. Since all architectures -have the task structure on at least a four byte alignment (and if this is -not true, the rtmutex.c code will be broken!), this allows for the two -least significant bits to be used as flags. This part is also described -in Documentation/rt-mutex.txt, but will also be briefly described here. - -Bit 0 is used as the "Pending Owner" flag. This is described later. -Bit 1 is used as the "Has Waiters" flags. This is also described later - in more detail, but is set whenever there are waiters on a mutex. - - -cmpxchg Tricks --------------- - -Some architectures implement an atomic cmpxchg (Compare and Exchange). This -is used (when applicable) to keep the fast path of grabbing and releasing -mutexes short. - -cmpxchg is basically the following function performed atomically: - -unsigned long _cmpxchg(unsigned long *A, unsigned long *B, unsigned long *C) -{ - unsigned long T = *A; - if (*A == *B) { - *A = *C; - } - return T; -} -#define cmpxchg(a,b,c) _cmpxchg(&a,&b,&c) - -This is really nice to have, since it allows you to only update a variable -if the variable is what you expect it to be. You know if it succeeded if -the return value (the old value of A) is equal to B. - -The macro rt_mutex_cmpxchg is used to try to lock and unlock mutexes. If -the architecture does not support CMPXCHG, then this macro is simply set -to fail every time. But if CMPXCHG is supported, then this will -help out extremely to keep the fast path short. - -The use of rt_mutex_cmpxchg with the flags in the owner field help optimize -the system for architectures that support it. This will also be explained -later in this document. - - -Priority adjustments --------------------- - -The implementation of the PI code in rtmutex.c has several places that a -process must adjust its priority. With the help of the pi_list of a -process this is rather easy to know what needs to be adjusted. - -The functions implementing the task adjustments are rt_mutex_adjust_prio, -__rt_mutex_adjust_prio (same as the former, but expects the task pi_lock -to already be taken), rt_mutex_get_prio, and rt_mutex_setprio. - -rt_mutex_getprio and rt_mutex_setprio are only used in __rt_mutex_adjust_prio. - -rt_mutex_getprio returns the priority that the task should have. Either the -task's own normal priority, or if a process of a higher priority is waiting on -a mutex owned by the task, then that higher priority should be returned. -Since the pi_list of a task holds an order by priority list of all the top -waiters of all the mutexes that the task owns, rt_mutex_getprio simply needs -to compare the top pi waiter to its own normal priority, and return the higher -priority back. - -(Note: if looking at the code, you will notice that the lower number of - prio is returned. This is because the prio field in the task structure - is an inverse order of the actual priority. So a "prio" of 5 is - of higher priority than a "prio" of 10.) - -__rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the -result does not equal the task's current priority, then rt_mutex_setprio -is called to adjust the priority of the task to the new priority. -Note that rt_mutex_setprio is defined in kernel/sched.c to implement the -actual change in priority. - -It is interesting to note that __rt_mutex_adjust_prio can either increase -or decrease the priority of the task. In the case that a higher priority -process has just blocked on a mutex owned by the task, __rt_mutex_adjust_prio -would increase/boost the task's priority. But if a higher priority task -were for some reason to leave the mutex (timeout or signal), this same function -would decrease/unboost the priority of the task. That is because the pi_list -always contains the highest priority task that is waiting on a mutex owned -by the task, so we only need to compare the priority of that top pi waiter -to the normal priority of the given task. - - -High level overview of the PI chain walk ----------------------------------------- - -The PI chain walk is implemented by the function rt_mutex_adjust_prio_chain. - -The implementation has gone through several iterations, and has ended up -with what we believe is the best. It walks the PI chain by only grabbing -at most two locks at a time, and is very efficient. - -The rt_mutex_adjust_prio_chain can be used either to boost or lower process -priorities. - -rt_mutex_adjust_prio_chain is called with a task to be checked for PI -(de)boosting (the owner of a mutex that a process is blocking on), a flag to -check for deadlocking, the mutex that the task owns, and a pointer to a waiter -that is the process's waiter struct that is blocked on the mutex (although this -parameter may be NULL for deboosting). - -For this explanation, I will not mention deadlock detection. This explanation -will try to stay at a high level. - -When this function is called, there are no locks held. That also means -that the state of the owner and lock can change when entered into this function. - -Before this function is called, the task has already had rt_mutex_adjust_prio -performed on it. This means that the task is set to the priority that it -should be at, but the plist nodes of the task's waiter have not been updated -with the new priorities, and that this task may not be in the proper locations -in the pi_lists and wait_lists that the task is blocked on. This function -solves all that. - -A loop is entered, where task is the owner to be checked for PI changes that -was passed by parameter (for the first iteration). The pi_lock of this task is -taken to prevent any more changes to the pi_list of the task. This also -prevents new tasks from completing the blocking on a mutex that is owned by this -task. - -If the task is not blocked on a mutex then the loop is exited. We are at -the top of the PI chain. - -A check is now done to see if the original waiter (the process that is blocked -on the current mutex) is the top pi waiter of the task. That is, is this -waiter on the top of the task's pi_list. If it is not, it either means that -there is another process higher in priority that is blocked on one of the -mutexes that the task owns, or that the waiter has just woken up via a signal -or timeout and has left the PI chain. In either case, the loop is exited, since -we don't need to do any more changes to the priority of the current task, or any -task that owns a mutex that this current task is waiting on. A priority chain -walk is only needed when a new top pi waiter is made to a task. - -The next check sees if the task's waiter plist node has the priority equal to -the priority the task is set at. If they are equal, then we are done with -the loop. Remember that the function started with the priority of the -task adjusted, but the plist nodes that hold the task in other processes -pi_lists have not been adjusted. - -Next, we look at the mutex that the task is blocked on. The mutex's wait_lock -is taken. This is done by a spin_trylock, because the locking order of the -pi_lock and wait_lock goes in the opposite direction. If we fail to grab the -lock, the pi_lock is released, and we restart the loop. - -Now that we have both the pi_lock of the task as well as the wait_lock of -the mutex the task is blocked on, we update the task's waiter's plist node -that is located on the mutex's wait_list. - -Now we release the pi_lock of the task. - -Next the owner of the mutex has its pi_lock taken, so we can update the -task's entry in the owner's pi_list. If the task is the highest priority -process on the mutex's wait_list, then we remove the previous top waiter -from the owner's pi_list, and replace it with the task. - -Note: It is possible that the task was the current top waiter on the mutex, - in which case the task is not yet on the pi_list of the waiter. This - is OK, since plist_del does nothing if the plist node is not on any - list. - -If the task was not the top waiter of the mutex, but it was before we -did the priority updates, that means we are deboosting/lowering the -task. In this case, the task is removed from the pi_list of the owner, -and the new top waiter is added. - -Lastly, we unlock both the pi_lock of the task, as well as the mutex's -wait_lock, and continue the loop again. On the next iteration of the -loop, the previous owner of the mutex will be the task that will be -processed. - -Note: One might think that the owner of this mutex might have changed - since we just grab the mutex's wait_lock. And one could be right. - The important thing to remember is that the owner could not have - become the task that is being processed in the PI chain, since - we have taken that task's pi_lock at the beginning of the loop. - So as long as there is an owner of this mutex that is not the same - process as the tasked being worked on, we are OK. - - Looking closely at the code, one might be confused. The check for the - end of the PI chain is when the task isn't blocked on anything or the - task's waiter structure "task" element is NULL. This check is - protected only by the task's pi_lock. But the code to unlock the mutex - sets the task's waiter structure "task" element to NULL with only - the protection of the mutex's wait_lock, which was not taken yet. - Isn't this a race condition if the task becomes the new owner? - - The answer is No! The trick is the spin_trylock of the mutex's - wait_lock. If we fail that lock, we release the pi_lock of the - task and continue the loop, doing the end of PI chain check again. - - In the code to release the lock, the wait_lock of the mutex is held - the entire time, and it is not let go when we grab the pi_lock of the - new owner of the mutex. So if the switch of a new owner were to happen - after the check for end of the PI chain and the grabbing of the - wait_lock, the unlocking code would spin on the new owner's pi_lock - but never give up the wait_lock. So the PI chain loop is guaranteed to - fail the spin_trylock on the wait_lock, release the pi_lock, and - try again. - - If you don't quite understand the above, that's OK. You don't have to, - unless you really want to make a proof out of it ;) - - -Pending Owners and Lock stealing --------------------------------- - -One of the flags in the owner field of the mutex structure is "Pending Owner". -What this means is that an owner was chosen by the process releasing the -mutex, but that owner has yet to wake up and actually take the mutex. - -Why is this important? Why can't we just give the mutex to another process -and be done with it? - -The PI code is to help with real-time processes, and to let the highest -priority process run as long as possible with little latencies and delays. -If a high priority process owns a mutex that a lower priority process is -blocked on, when the mutex is released it would be given to the lower priority -process. What if the higher priority process wants to take that mutex again. -The high priority process would fail to take that mutex that it just gave up -and it would need to boost the lower priority process to run with full -latency of that critical section (since the low priority process just entered -it). - -There's no reason a high priority process that gives up a mutex should be -penalized if it tries to take that mutex again. If the new owner of the -mutex has not woken up yet, there's no reason that the higher priority process -could not take that mutex away. - -To solve this, we introduced Pending Ownership and Lock Stealing. When a -new process is given a mutex that it was blocked on, it is only given -pending ownership. This means that it's the new owner, unless a higher -priority process comes in and tries to grab that mutex. If a higher priority -process does come along and wants that mutex, we let the higher priority -process "steal" the mutex from the pending owner (only if it is still pending) -and continue with the mutex. - - -Taking of a mutex (The walk through) ------------------------------------- - -OK, now let's take a look at the detailed walk through of what happens when -taking a mutex. - -The first thing that is tried is the fast taking of the mutex. This is -done when we have CMPXCHG enabled (otherwise the fast taking automatically -fails). Only when the owner field of the mutex is NULL can the lock be -taken with the CMPXCHG and nothing else needs to be done. - -If there is contention on the lock, whether it is owned or pending owner -we go about the slow path (rt_mutex_slowlock). - -The slow path function is where the task's waiter structure is created on -the stack. This is because the waiter structure is only needed for the -scope of this function. The waiter structure holds the nodes to store -the task on the wait_list of the mutex, and if need be, the pi_list of -the owner. - -The wait_lock of the mutex is taken since the slow path of unlocking the -mutex also takes this lock. - -We then call try_to_take_rt_mutex. This is where the architecture that -does not implement CMPXCHG would always grab the lock (if there's no -contention). - -try_to_take_rt_mutex is used every time the task tries to grab a mutex in the -slow path. The first thing that is done here is an atomic setting of -the "Has Waiters" flag of the mutex's owner field. Yes, this could really -be false, because if the the mutex has no owner, there are no waiters and -the current task also won't have any waiters. But we don't have the lock -yet, so we assume we are going to be a waiter. The reason for this is to -play nice for those architectures that do have CMPXCHG. By setting this flag -now, the owner of the mutex can't release the mutex without going into the -slow unlock path, and it would then need to grab the wait_lock, which this -code currently holds. So setting the "Has Waiters" flag forces the owner -to synchronize with this code. - -Now that we know that we can't have any races with the owner releasing the -mutex, we check to see if we can take the ownership. This is done if the -mutex doesn't have a owner, or if we can steal the mutex from a pending -owner. Let's look at the situations we have here. - - 1) Has owner that is pending - ---------------------------- - - The mutex has a owner, but it hasn't woken up and the mutex flag - "Pending Owner" is set. The first check is to see if the owner isn't the - current task. This is because this function is also used for the pending - owner to grab the mutex. When a pending owner wakes up, it checks to see - if it can take the mutex, and this is done if the owner is already set to - itself. If so, we succeed and leave the function, clearing the "Pending - Owner" bit. - - If the pending owner is not current, we check to see if the current priority is - higher than the pending owner. If not, we fail the function and return. - - There's also something special about a pending owner. That is a pending owner - is never blocked on a mutex. So there is no PI chain to worry about. It also - means that if the mutex doesn't have any waiters, there's no accounting needed - to update the pending owner's pi_list, since we only worry about processes - blocked on the current mutex. - - If there are waiters on this mutex, and we just stole the ownership, we need - to take the top waiter, remove it from the pi_list of the pending owner, and - add it to the current pi_list. Note that at this moment, the pending owner - is no longer on the list of waiters. This is fine, since the pending owner - would add itself back when it realizes that it had the ownership stolen - from itself. When the pending owner tries to grab the mutex, it will fail - in try_to_take_rt_mutex if the owner field points to another process. - - 2) No owner - ----------- - - If there is no owner (or we successfully stole the lock), we set the owner - of the mutex to current, and set the flag of "Has Waiters" if the current - mutex actually has waiters, or we clear the flag if it doesn't. See, it was - OK that we set that flag early, since now it is cleared. - - 3) Failed to grab ownership - --------------------------- - - The most interesting case is when we fail to take ownership. This means that - there exists an owner, or there's a pending owner with equal or higher - priority than the current task. - -We'll continue on the failed case. - -If the mutex has a timeout, we set up a timer to go off to break us out -of this mutex if we failed to get it after a specified amount of time. - -Now we enter a loop that will continue to try to take ownership of the mutex, or -fail from a timeout or signal. - -Once again we try to take the mutex. This will usually fail the first time -in the loop, since it had just failed to get the mutex. But the second time -in the loop, this would likely succeed, since the task would likely be -the pending owner. - -If the mutex is TASK_INTERRUPTIBLE a check for signals and timeout is done -here. - -The waiter structure has a "task" field that points to the task that is blocked -on the mutex. This field can be NULL the first time it goes through the loop -or if the task is a pending owner and had it's mutex stolen. If the "task" -field is NULL then we need to set up the accounting for it. - -Task blocks on mutex --------------------- - -The accounting of a mutex and process is done with the waiter structure of -the process. The "task" field is set to the process, and the "lock" field -to the mutex. The plist nodes are initialized to the processes current -priority. - -Since the wait_lock was taken at the entry of the slow lock, we can safely -add the waiter to the wait_list. If the current process is the highest -priority process currently waiting on this mutex, then we remove the -previous top waiter process (if it exists) from the pi_list of the owner, -and add the current process to that list. Since the pi_list of the owner -has changed, we call rt_mutex_adjust_prio on the owner to see if the owner -should adjust its priority accordingly. - -If the owner is also blocked on a lock, and had its pi_list changed -(or deadlock checking is on), we unlock the wait_lock of the mutex and go ahead -and run rt_mutex_adjust_prio_chain on the owner, as described earlier. - -Now all locks are released, and if the current process is still blocked on a -mutex (waiter "task" field is not NULL), then we go to sleep (call schedule). - -Waking up in the loop ---------------------- - -The schedule can then wake up for a few reasons. - 1) we were given pending ownership of the mutex. - 2) we received a signal and was TASK_INTERRUPTIBLE - 3) we had a timeout and was TASK_INTERRUPTIBLE - -In any of these cases, we continue the loop and once again try to grab the -ownership of the mutex. If we succeed, we exit the loop, otherwise we continue -and on signal and timeout, will exit the loop, or if we had the mutex stolen -we just simply add ourselves back on the lists and go back to sleep. - -Note: For various reasons, because of timeout and signals, the steal mutex - algorithm needs to be careful. This is because the current process is - still on the wait_list. And because of dynamic changing of priorities, - especially on SCHED_OTHER tasks, the current process can be the - highest priority task on the wait_list. - -Failed to get mutex on Timeout or Signal ----------------------------------------- - -If a timeout or signal occurred, the waiter's "task" field would not be -NULL and the task needs to be taken off the wait_list of the mutex and perhaps -pi_list of the owner. If this process was a high priority process, then -the rt_mutex_adjust_prio_chain needs to be executed again on the owner, -but this time it will be lowering the priorities. - - -Unlocking the Mutex -------------------- - -The unlocking of a mutex also has a fast path for those architectures with -CMPXCHG. Since the taking of a mutex on contention always sets the -"Has Waiters" flag of the mutex's owner, we use this to know if we need to -take the slow path when unlocking the mutex. If the mutex doesn't have any -waiters, the owner field of the mutex would equal the current process and -the mutex can be unlocked by just replacing the owner field with NULL. - -If the owner field has the "Has Waiters" bit set (or CMPXCHG is not available), -the slow unlock path is taken. - -The first thing done in the slow unlock path is to take the wait_lock of the -mutex. This synchronizes the locking and unlocking of the mutex. - -A check is made to see if the mutex has waiters or not. On architectures that -do not have CMPXCHG, this is the location that the owner of the mutex will -determine if a waiter needs to be awoken or not. On architectures that -do have CMPXCHG, that check is done in the fast path, but it is still needed -in the slow path too. If a waiter of a mutex woke up because of a signal -or timeout between the time the owner failed the fast path CMPXCHG check and -the grabbing of the wait_lock, the mutex may not have any waiters, thus the -owner still needs to make this check. If there are no waiters than the mutex -owner field is set to NULL, the wait_lock is released and nothing more is -needed. - -If there are waiters, then we need to wake one up and give that waiter -pending ownership. - -On the wake up code, the pi_lock of the current owner is taken. The top -waiter of the lock is found and removed from the wait_list of the mutex -as well as the pi_list of the current owner. The task field of the new -pending owner's waiter structure is set to NULL, and the owner field of the -mutex is set to the new owner with the "Pending Owner" bit set, as well -as the "Has Waiters" bit if there still are other processes blocked on the -mutex. - -The pi_lock of the previous owner is released, and the new pending owner's -pi_lock is taken. Remember that this is the trick to prevent the race -condition in rt_mutex_adjust_prio_chain from adding itself as a waiter -on the mutex. - -We now clear the "pi_blocked_on" field of the new pending owner, and if -the mutex still has waiters pending, we add the new top waiter to the pi_list -of the pending owner. - -Finally we unlock the pi_lock of the pending owner and wake it up. - - -Contact -------- - -For updates on this document, please email Steven Rostedt - - -Credits -------- - -Author: Steven Rostedt - -Reviewers: Ingo Molnar, Thomas Gleixner, Thomas Duetsch, and Randy Dunlap - -Updates -------- - -This document was originally written for 2.6.17-rc3-mm1 diff --git a/Documentation/rt-mutex.txt b/Documentation/rt-mutex.txt deleted file mode 100644 index 243393d88..000000000 --- a/Documentation/rt-mutex.txt +++ /dev/null @@ -1,79 +0,0 @@ -RT-mutex subsystem with PI support ----------------------------------- - -RT-mutexes with priority inheritance are used to support PI-futexes, -which enable pthread_mutex_t priority inheritance attributes -(PTHREAD_PRIO_INHERIT). [See Documentation/pi-futex.txt for more details -about PI-futexes.] - -This technology was developed in the -rt tree and streamlined for -pthread_mutex support. - -Basic principles: ------------------ - -RT-mutexes extend the semantics of simple mutexes by the priority -inheritance protocol. - -A low priority owner of a rt-mutex inherits the priority of a higher -priority waiter until the rt-mutex is released. If the temporarily -boosted owner blocks on a rt-mutex itself it propagates the priority -boosting to the owner of the other rt_mutex it gets blocked on. The -priority boosting is immediately removed once the rt_mutex has been -unlocked. - -This approach allows us to shorten the block of high-prio tasks on -mutexes which protect shared resources. Priority inheritance is not a -magic bullet for poorly designed applications, but it allows -well-designed applications to use userspace locks in critical parts of -an high priority thread, without losing determinism. - -The enqueueing of the waiters into the rtmutex waiter list is done in -priority order. For same priorities FIFO order is chosen. For each -rtmutex, only the top priority waiter is enqueued into the owner's -priority waiters list. This list too queues in priority order. Whenever -the top priority waiter of a task changes (for example it timed out or -got a signal), the priority of the owner task is readjusted. [The -priority enqueueing is handled by "plists", see include/linux/plist.h -for more details.] - -RT-mutexes are optimized for fastpath operations and have no internal -locking overhead when locking an uncontended mutex or unlocking a mutex -without waiters. The optimized fastpath operations require cmpxchg -support. [If that is not available then the rt-mutex internal spinlock -is used] - -The state of the rt-mutex is tracked via the owner field of the rt-mutex -structure: - -rt_mutex->owner holds the task_struct pointer of the owner. Bit 0 and 1 -are used to keep track of the "owner is pending" and "rtmutex has -waiters" state. - - owner bit1 bit0 - NULL 0 0 mutex is free (fast acquire possible) - NULL 0 1 invalid state - NULL 1 0 Transitional state* - NULL 1 1 invalid state - taskpointer 0 0 mutex is held (fast release possible) - taskpointer 0 1 task is pending owner - taskpointer 1 0 mutex is held and has waiters - taskpointer 1 1 task is pending owner and mutex has waiters - -Pending-ownership handling is a performance optimization: -pending-ownership is assigned to the first (highest priority) waiter of -the mutex, when the mutex is released. The thread is woken up and once -it starts executing it can acquire the mutex. Until the mutex is taken -by it (bit 0 is cleared) a competing higher priority thread can "steal" -the mutex which puts the woken up thread back on the waiters list. - -The pending-ownership optimization is especially important for the -uninterrupted workflow of high-prio tasks which repeatedly -takes/releases locks that have lower-prio waiters. Without this -optimization the higher-prio thread would ping-pong to the lower-prio -task [because at unlock time we always assign a new owner]. - -(*) The "mutex has waiters" bit gets set to take the lock. If the lock -doesn't already have an owner, this bit is quickly cleared if there are -no waiters. So this is a transitional state to synchronize with looking -at the owner field of the mutex and the mutex owner releasing the lock. diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 2a58f9857..95d17b3e2 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt @@ -44,10 +44,8 @@ normal timer interrupt, which is 100Hz. Programming and/or enabling interrupt frequencies greater than 64Hz is only allowed by root. This is perhaps a bit conservative, but we don't want an evil user generating lots of IRQs on a slow 386sx-16, where it might have -a negative impact on performance. This 64Hz limit can be changed by writing -a different value to /proc/sys/dev/rtc/max-user-freq. Note that the -interrupt handler is only a few lines of code to minimize any possibility -of this effect. +a negative impact on performance. Note that the interrupt handler is only +a few lines of code to minimize any possibility of this effect. Also, if the kernel time is synchronized with an external source, the kernel will write the time back to the CMOS clock every 11 minutes. In @@ -83,7 +81,6 @@ that will be using this driver. */ #include -#include #include #include #include diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX index 12354830c..e7da8c3a2 100644 --- a/Documentation/scsi/00-INDEX +++ b/Documentation/scsi/00-INDEX @@ -30,6 +30,8 @@ aic7xxx.txt - info on driver for Adaptec controllers aic7xxx_old.txt - info on driver for Adaptec controllers, old generation +cpqfc.txt + - info on driver for Compaq Tachyon TS adapters dpti.txt - info on driver for DPT SmartRAID and Adaptec I2O RAID based adapters dtc3x80.txt diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid index a056bbe67..c173806c9 100644 --- a/Documentation/scsi/ChangeLog.megaraid +++ b/Documentation/scsi/ChangeLog.megaraid @@ -1,126 +1,3 @@ -Release Date : Fri May 19 09:31:45 EST 2006 - Seokmann Ju -Current Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module) -Older Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) - -1. Fixed a bug in megaraid_init_mbox(). - Customer reported "garbage in file on x86_64 platform". - Root Cause: the driver registered controllers as 64-bit DMA capable - for those which are not support it. - Fix: Made change in the function inserting identification machanism - identifying 64-bit DMA capable controllers. - - > -----Original Message----- - > From: Vasily Averin [mailto:vvs@sw.ru] - > Sent: Thursday, May 04, 2006 2:49 PM - > To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul; - > Ju, Seokmann; Bagalkote, Sreenivas; - > James.Bottomley@SteelEye.com; devel@openvz.org - > Subject: megaraid_mbox: garbage in file - > - > Hello all, - > - > I've investigated customers claim on the unstable work of - > their node and found a - > strange effect: reading from some files leads to the - > "attempt to access beyond end of device" messages. - > - > I've checked filesystem, memory on the node, motherboard BIOS - > version, but it - > does not help and issue still has been reproduced by simple - > file reading. - > - > Reproducer is simple: - > - > echo 0xffffffff >/proc/sys/dev/scsi/logging_level ; - > cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt ; - > echo 0 >/proc/sys/dev/scsi/logging - > - > It leads to the following messages in dmesg - > - > sd_init_command: disk=sda, block=871769260, count=26 - > sda : block=871769260 - > sda : reading 26/26 512 byte blocks. - > scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420) - > sd 0:1:0:0: send 0xf79ed980 sd 0:1:0:0: - > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 - > buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40, - > queuecommand 0xc0344010 - > leaving scsi_dispatch_cmnd() - > scsi_delete_timer: scmd: f79ed980, rtn: 1 - > sd 0:1:0:0: done 0xf79ed980 SUCCESS 0 sd 0:1:0:0: - > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 - > scsi host busy 1 failed 0 - > sd 0:1:0:0: Notifying upper driver of completion (result 0) - > sd_rw_intr: sda: res=0x0 - > 26 sectors total, 13312 bytes done. - > use_sg is 4 - > attempt to access beyond end of device - > sda6: rw=0, want=1044134458, limit=951401367 - > Buffer I/O error on device sda6, logical block 522067228 - > attempt to access beyond end of device - -2. When INQUIRY with EVPD bit set issued to the MegaRAID controller, - system memory gets corrupted. - Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set - incorrectly. - Fix: MegaRAID F/W has fixed the problem and being process of release, - soon. Meanwhile, driver will filter out the request. - -3. One of member in the data structure of the driver leads unaligne - issue on 64-bit platform. - Customer reporeted "kernel unaligned access addrss" issue when - application communicates with MegaRAID HBA driver. - Root Cause: in uioc_t structure, one of member had misaligned and it - led system to display the error message. - Fix: A patch submitted to community from following folk. - - > -----Original Message----- - > From: linux-scsi-owner@vger.kernel.org - > [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sakurai Hiroomi - > Sent: Wednesday, July 12, 2006 4:20 AM - > To: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org - > Subject: Re: Help: strange messages from kernel on IA64 platform - > - > Hi, - > - > I saw same message. - > - > When GAM(Global Array Manager) is started, The following - > message output. - > kernel: kernel unaligned access to 0xe0000001fe1080d4, - > ip=0xa000000200053371 - > - > The uioc structure used by ioctl is defined by packed, - > the allignment of each member are disturbed. - > In a 64 bit structure, the allignment of member doesn't fit 64 bit - > boundary. this causes this messages. - > In a 32 bit structure, we don't see the message because the allinment - > of member fit 32 bit boundary even if packed is specified. - > - > patch - > I Add 32 bit dummy member to fit 64 bit boundary. I tested. - > We confirmed this patch fix the problem by IA64 server. - > - > ************************************************************** - > **************** - > --- linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h.orig - > 2006-04-03 17:13:03.000000000 +0900 - > +++ linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h - > 2006-04-03 17:14:09.000000000 +0900 - > @@ -132,6 +132,10 @@ - > /* Driver Data: */ - > void __user * user_data; - > uint32_t user_data_len; - > + - > + /* 64bit alignment */ - > + uint32_t pad_0xBC; - > + - > mraid_passthru_t __user *user_pthru; - > - > mraid_passthru_t *pthru32; - > ************************************************************** - > **************** - Release Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju Current Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) Older Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index d9e5960da..2dafa63bd 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas @@ -1,32 +1,3 @@ - -1 Release Date : Sun May 14 22:49:52 PDT 2006 - Sumant Patro -2 Current Version : 00.00.03.01 -3 Older Version : 00.00.02.04 - -i. Added support for ZCR controller. - - New device id 0x413 added. - -ii. Bug fix : Disable controller interrupt before firing INIT cmd to FW. - - Interrupt is enabled after required initialization is over. - This is done to ensure that driver is ready to handle interrupts when - it is generated by the controller. - - -Sumant Patro - -1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro -2 Current Version : 00.00.02.04 -3 Older Version : 00.00.02.04 - -i. Remove superflous instance_lock - - gets rid of the otherwise superflous instance_lock and avoids an unsave - unsynchronized access in the error handler. - - - Christoph Hellwig - - 1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro 2 Current Version : 00.00.02.04 3 Older Version : 00.00.02.04 diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt index be5567085..820fd0793 100644 --- a/Documentation/scsi/aacraid.txt +++ b/Documentation/scsi/aacraid.txt @@ -24,10 +24,10 @@ Supported Cards/Chipsets 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) - 9005:0285:103c:3227 Adaptec 2610SA (Bearcat HP release) + 9005:0285:103c:3227 Adaptec 2610SA (Bearcat) 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) 9005:0285:9005:0294 Adaptec Prowler - 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) + 9005:0286:9005:029d Adaptec 2420SA (Intruder) 9005:0286:9005:029c Adaptec 2620SA (Intruder) 9005:0286:9005:029b Adaptec 2820SA (Intruder) 9005:0286:9005:02a7 Adaptec 2830SA (Skyray) @@ -38,7 +38,7 @@ Supported Cards/Chipsets 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark) 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) - 9005:0286:9005:02a2 Adaptec 3800SAS (Hurricane44) + 9005:0286:9005:02a2 Adaptec 4810SAS (Hurricane) 1011:0046:9005:0364 Adaptec 5400S (Mustang) 1011:0046:9005:0365 Adaptec 5400S (Mustang) 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) @@ -72,7 +72,7 @@ Supported Cards/Chipsets 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X) 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E) - 9005:0286:9005:02a3 ICP ICP5445AU (Hurricane44) + 9005:0286:9005:02a3 ICP ICP5085AU (Hurricane) 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) 9005:0286:9005:02a9 ICP ICP5087AU (Skyray) 9005:0286:9005:02aa ICP ICP5047AU (Skyray) diff --git a/Documentation/scsi/cpqfc.txt b/Documentation/scsi/cpqfc.txt new file mode 100644 index 000000000..dd33e61c0 --- /dev/null +++ b/Documentation/scsi/cpqfc.txt @@ -0,0 +1,272 @@ +Notes for CPQFCTS driver for Compaq Tachyon TS +Fibre Channel Host Bus Adapter, PCI 64-bit, 66MHz +for Linux (RH 6.1, 6.2 kernel 2.2.12-32, 2.2.14-5) +SMP tested +Tested in single and dual HBA configuration, 32 and 64bit busses, +33 and 66MHz. Only supports FC-AL. +SEST size 512 Exchanges (simultaneous I/Os) limited by module kmalloc() + max of 128k bytes contiguous. + +Ver 2.5.4 Oct 03, 2002 + * fixed memcpy of sense buffer in ioctl to copy the smaller defined size +Ver 2.5.3 Aug 01, 2002 + * fix the passthru ioctl to handle the Scsi_Cmnd->request being a pointer +Ver 2.5.1 Jul 30, 2002 + * fix ioctl to pay attention to the specified LUN. +Ver 2.5.0 Nov 29, 2001 + * eliminated io_request_lock. This change makes the driver specific + to the 2.5.x kernels. + * silenced excessively noisy printks. + +Ver 2.1.2 July 23, 2002 + * initialize DumCmnd->lun in cpqfcTS_ioctl (used in fcFindLoggedInPorts as LUN index) + +Ver 2.1.1 Oct 18, 2001 + * reinitialize Cmnd->SCp.sent_command (used to identify commands as + passthrus) on calling scsi_done, since the scsi mid layer does not + use (or reinitialize) this field to prevent subsequent comands from + having it set incorrectly. + +Ver 2.1.0 Aug 27, 2001 + * Revise driver to use new kernel 2.4.x PCI DMA API, instead of + virt_to_bus(). (enables driver to work w/ ia64 systems with >2Gb RAM.) + Rework main scatter-gather code to handle cases where SG element + lengths are larger than 0x7FFFF bytes and use as many scatter + gather pages as necessary. (Steve Cameron) + * Makefile changes to bring cpqfc into line w/ rest of SCSI drivers + (thanks to Keith Owens) + +Ver 2.0.5 Aug 06, 2001 + * Reject non-existent luns in the driver rather than letting the + hardware do it. (some HW behaves differently than others in this area.) + * Changed Makefile to rely on "make dep" instead of explicit dependencies + * ifdef'ed out fibre channel analyzer triggering debug code + * fixed a jiffies wrapping issue + +Ver 2.0.4 Aug 01, 2001 + * Incorporated fix for target device reset from Steeleye + * Fixed passthrough ioctl so it doesn't hang. + * Fixed hang in launch_FCworker_thread() that occurred on some machines. + * Avoid problem when number of volumes in a single cabinet > 8 + +Ver 2.0.2 July 23, 2001 + Changed the semiphore changes so the driver would compile in 2.4.7. + This version is for 2.4.7 and beyond. + +Ver 2.0.1 May 7, 2001 + Merged version 1.3.6 fixes into version 2.0.0. + +Ver 2.0.0 May 7, 2001 + Fixed problem so spinlock is being initialized to UNLOCKED. + Fixed updated driver so it compiles in the 2.4 tree. + + Ver 1.3.6 Feb 27, 2001 + Added Target_Device_Reset function for SCSI error handling + Fixed problem with not reseting addressing mode after implicit logout + + +Ver 1.3.4 Sep 7, 2000 + Added Modinfo information + Fixed problem with statically linking the driver + +Ver 1.3.3, Aug 23, 2000 + Fixed device/function number in ioctl + +Ver 1.3.2, July 27, 2000 + Add include for Alpha compile on 2.2.14 kernel (cpq*i2c.c) + Change logic for different FCP-RSP sense_buffer location for HSG80 target + And search for Agilent Tachyon XL2 HBAs (not finished! - in test) + +Tested with +(storage): + Compaq RA-4x000, RAID firmware ver 2.40 - 2.54 + Seagate FC drives model ST39102FC, rev 0006 + Hitachi DK31CJ-72FC rev J8A8 + IBM DDYF-T18350R rev F60K + Compaq FC-SCSI bridge w/ DLT 35/70 Gb DLT (tape) +(servers): + Compaq PL-1850R + Compaq PL-6500 Xeon (400MHz) + Compaq PL-8500 (500MHz, 66MHz, 64bit PCI) + Compaq Alpha DS20 (RH 6.1) +(hubs): + Vixel Rapport 1000 (7-port "dumb") + Gadzoox Gibralter (12-port "dumb") + Gadzoox Capellix 2000, 3000 +(switches): + Brocade 2010, 2400, 2800, rev 2.0.3a (& later) + Gadzoox 3210 (Fabric blade beta) + Vixel 7100 (Fabric beta firmare - known hot plug issues) +using "qa_test" (esp. io_test script) suite modified from Unix tests. + +Installation: +make menuconfig + (select SCSI low-level, Compaq FC HBA) +make modules +make modules_install + +e.g. insmod -f cpqfc + +Due to Fabric/switch delays, driver requires 4 seconds +to initialize. If adapters are found, there will be a entries at +/proc/scsi/cpqfcTS/* + +sample contents of startup messages + +************************* + scsi_register allocating 3596 bytes for CPQFCHBA + ioremap'd Membase: c887e600 + HBA Tachyon RevId 1.2 +Allocating 119808 for 576 Exchanges @ c0dc0000 +Allocating 112904 for LinkQ @ c0c20000 (576 elements) +Allocating 110600 for TachSEST for 512 Exchanges + cpqfcTS: writing IMQ BASE 7C0000h PI 7C4000h + cpqfcTS: SEST c0e40000(virt): Wrote base E40000h @ c887e740 +cpqfcTS: New FC port 0000E8h WWN: 500507650642499D SCSI Chan/Trgt 0/0 +cpqfcTS: New FC port 0000EFh WWN: 50000E100000D5A6 SCSI Chan/Trgt 0/1 +cpqfcTS: New FC port 0000E4h WWN: 21000020370097BB SCSI Chan/Trgt 0/2 +cpqfcTS: New FC port 0000E2h WWN: 2100002037009946 SCSI Chan/Trgt 0/3 +cpqfcTS: New FC port 0000E1h WWN: 21000020370098FE SCSI Chan/Trgt 0/4 +cpqfcTS: New FC port 0000E0h WWN: 21000020370097B2 SCSI Chan/Trgt 0/5 +cpqfcTS: New FC port 0000DCh WWN: 2100002037006CC1 SCSI Chan/Trgt 0/6 +cpqfcTS: New FC port 0000DAh WWN: 21000020370059F6 SCSI Chan/Trgt 0/7 +cpqfcTS: New FC port 00000Fh WWN: 500805F1FADB0E20 SCSI Chan/Trgt 0/8 +cpqfcTS: New FC port 000008h WWN: 500805F1FADB0EBA SCSI Chan/Trgt 0/9 +cpqfcTS: New FC port 000004h WWN: 500805F1FADB1EB9 SCSI Chan/Trgt 0/10 +cpqfcTS: New FC port 000002h WWN: 500805F1FADB1ADE SCSI Chan/Trgt 0/11 +cpqfcTS: New FC port 000001h WWN: 500805F1FADBA2CA SCSI Chan/Trgt 0/12 +scsi4 : Compaq FibreChannel HBA Tachyon TS HPFC-5166A/1.2: WWN 500508B200193F50 + on PCI bus 0 device 0xa0fc irq 5 IObaseL 0x3400, MEMBASE 0xc6ef8600 +PCI bus width 32 bits, bus speed 33 MHz +FCP-SCSI Driver v1.3.0 +GBIC detected: Short-wave. LPSM 0h Monitor +scsi : 5 hosts. + Vendor: IBM Model: DDYF-T18350R Rev: F60K + Type: Direct-Access ANSI SCSI revision: 03 +Detected scsi disk sdb at scsi4, channel 0, id 0, lun 0 + Vendor: HITACHI Model: DK31CJ-72FC Rev: J8A8 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdc at scsi4, channel 0, id 1, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdd at scsi4, channel 0, id 2, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sde at scsi4, channel 0, id 3, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdf at scsi4, channel 0, id 4, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdg at scsi4, channel 0, id 5, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdh at scsi4, channel 0, id 6, lun 0 + Vendor: SEAGATE Model: ST39102FC Rev: 0006 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdi at scsi4, channel 0, id 7, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdj at scsi4, channel 0, id 8, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdk at scsi4, channel 0, id 8, lun 1 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdl at scsi4, channel 0, id 9, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdm at scsi4, channel 0, id 9, lun 1 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdn at scsi4, channel 0, id 10, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdo at scsi4, channel 0, id 11, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdp at scsi4, channel 0, id 11, lun 1 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdq at scsi4, channel 0, id 12, lun 0 + Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 + Type: Direct-Access ANSI SCSI revision: 02 +Detected scsi disk sdr at scsi4, channel 0, id 12, lun 1 +resize_dma_pool: unknown device type 12 +resize_dma_pool: unknown device type 12 +SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB] + sdb: sdb1 +SCSI device sdc: hdwr sector= 512 bytes. Sectors= 144410880 [70513 MB] [70.5 GB] + sdc: sdc1 +SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sdd: sdd1 +SCSI device sde: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sde: sde1 +SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sdf: sdf1 +SCSI device sdg: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sdg: sdg1 +SCSI device sdh: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sdh: sdh1 +SCSI device sdi: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] + sdi: sdi1 +SCSI device sdj: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB] + sdj: sdj1 +SCSI device sdk: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB] + sdk: sdk1 +SCSI device sdl: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] + sdl: sdl1 +SCSI device sdm: hdwr sector= 512 bytes. Sectors= 8380320 [4091 MB] [4.1 GB] + sdm: sdm1 +SCSI device sdn: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] + sdn: sdn1 +SCSI device sdo: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] + sdo: sdo1 +SCSI device sdp: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] + sdp: sdp1 +SCSI device sdq: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB] + sdq: sdq1 +SCSI device sdr: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB] + sdr: sdr1 + +************************* + +If a GBIC of type Short-wave, Long-wave, or Copper is detected, it will +print out; otherwise, "none" is displayed. If the cabling is correct +and a loop circuit is completed, you should see "Monitor"; otherwise, +"LoopFail" (on open circuit) or some LPSM number/state with bit 3 set. + + +ERRATA: +1. Normally, Linux Scsi queries FC devices with INQUIRY strings. All LUNs +found according to INQUIRY should get READ commands at sector 0 to find +partition table, etc. Older kernels only query the first 4 devices. Some +Linux kernels only look for one LUN per target (i.e. FC device). + +2. Physically removing a device, or a malfunctioning system which hides a +device, leads to a 30-second timeout and subsequent _abort call. +In some process contexts, this will hang the kernel (crashing the system). +Single bit errors in frames and virtually all hot plugging events are +gracefully handled with internal driver timer and Abort processing. + +3. Some SCSI drives with error conditions will not handle the 7 second timeout +in this software driver, leading to infinite retries on timed out SCSI commands. +The 7 secs balances the need to quickly recover from lost frames (esp. on sequence +initiatives) and time needed by older/slower/error-state drives in responding. +This can be easily changed in "Exchanges[].timeOut". + +4. Due to the nature of FC soft addressing, there is no assurance that the +same LUNs (drives) will have the same path (e.g. /dev/sdb1) from one boot to +next. Dynamic soft address changes (i.e. 24-bit FC port_id) are +supported during run time (e.g. due to hot plug event) by the use of WWN to +SCSI Nexus (channel/target/LUN) mapping. + +5. Compaq RA4x00 firmware version 2.54 and later supports SSP (Selective +Storage Presentation), which maps LUNs to a WWN. If RA4x00 firmware prior +2.54 (e.g. older controller) is used, or the FC HBA is replaced (another WWN +is used), logical volumes on the RA4x00 will no longer be visible. + + +Send questions/comments to: +Amy Vanzant-Hodge (fibrechannel@compaq.com) + diff --git a/Documentation/scsi/hptiop.txt b/Documentation/scsi/hptiop.txt deleted file mode 100644 index d28a31247..000000000 --- a/Documentation/scsi/hptiop.txt +++ /dev/null @@ -1,92 +0,0 @@ -HIGHPOINT ROCKETRAID 3xxx RAID DRIVER (hptiop) - -Controller Register Map -------------------------- - -The controller IOP is accessed via PCI BAR0. - - BAR0 offset Register - 0x10 Inbound Message Register 0 - 0x14 Inbound Message Register 1 - 0x18 Outbound Message Register 0 - 0x1C Outbound Message Register 1 - 0x20 Inbound Doorbell Register - 0x24 Inbound Interrupt Status Register - 0x28 Inbound Interrupt Mask Register - 0x30 Outbound Interrupt Status Register - 0x34 Outbound Interrupt Mask Register - 0x40 Inbound Queue Port - 0x44 Outbound Queue Port - - -I/O Request Workflow ----------------------- - -All queued requests are handled via inbound/outbound queue port. -A request packet can be allocated in either IOP or host memory. - -To send a request to the controller: - - - Get a free request packet by reading the inbound queue port or - allocate a free request in host DMA coherent memory. - - The value returned from the inbound queue port is an offset - relative to the IOP BAR0. - - Requests allocated in host memory must be aligned on 32-bytes boundary. - - - Fill the packet. - - - Post the packet to IOP by writing it to inbound queue. For requests - allocated in IOP memory, write the offset to inbound queue port. For - requests allocated in host memory, write (0x80000000|(bus_addr>>5)) - to the inbound queue port. - - - The IOP process the request. When the request is completed, it - will be put into outbound queue. An outbound interrupt will be - generated. - - For requests allocated in IOP memory, the request offset is posted to - outbound queue. - - For requests allocated in host memory, (0x80000000|(bus_addr>>5)) - is posted to the outbound queue. If IOP_REQUEST_FLAG_OUTPUT_CONTEXT - flag is set in the request, the low 32-bit context value will be - posted instead. - - - The host read the outbound queue and complete the request. - - For requests allocated in IOP memory, the host driver free the request - by writing it to the outbound queue. - -Non-queued requests (reset/flush etc) can be sent via inbound message -register 0. An outbound message with the same value indicates the completion -of an inbound message. - - -User-level Interface ---------------------- - -The driver exposes following sysfs attributes: - - NAME R/W Description - driver-version R driver version string - firmware-version R firmware version string - -The driver registers char device "hptiop" to communicate with HighPoint RAID -management software. Its ioctl routine acts as a general binary interface -between the IOP firmware and HighPoint RAID management software. New management -functions can be implemented in application/firmware without modification -in driver code. - - ------------------------------------------------------------------------------ -Copyright (C) 2006 HighPoint Technologies, Inc. All Rights Reserved. - - This file is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - linux@highpoint-tech.com - http://www.highpoint-tech.com diff --git a/Documentation/scsi/ppa.txt b/Documentation/scsi/ppa.txt index 5d9223bc1..0dac88d86 100644 --- a/Documentation/scsi/ppa.txt +++ b/Documentation/scsi/ppa.txt @@ -12,3 +12,5 @@ http://www.torque.net/parport/ Email list for Linux Parport linux-parport@torque.net +Email for problems with ZIP or ZIP Plus drivers +campbell@torque.net diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt index df7a02bfb..e165229ad 100644 --- a/Documentation/scsi/tmscsim.txt +++ b/Documentation/scsi/tmscsim.txt @@ -109,7 +109,7 @@ than the 33.33 MHz being in the PCI spec. If you want to share the IRQ with another device and the driver refuses to do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to -IRQF_SHARED | IRQF_DISABLED. +SA_SHIRQ | SA_INTERRUPT. 3.Features diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index f61af23dd..0ee2c7dfc 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt @@ -366,9 +366,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for C-Media CMI8338 and 8738 PCI sound cards. - mpu_port - 0x300,0x310,0x320,0x330 = legacy port, - 1 = integrated PCI port, - 0 = disable (default) + mpu_port - 0x300,0x310,0x320,0x330, 0 = disable (default) fm_port - 0x388 (default), 0 = disable (default) soft_ac3 - Software-conversion of raw SPDIF packets (model 033 only) (default = 1) @@ -470,23 +468,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for multifunction CS5535 companion PCI device - The power-management is supported. - - Module snd-darla20 - ------------------ - - Module for Echoaudio Darla20 - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - - Module snd-darla24 - ------------------ - - Module for Echoaudio Darla24 - This module supports multiple cards. - The driver requires the firmware loader support on kernel. Module snd-dt019x ----------------- @@ -515,14 +497,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. The power-management is supported. - Module snd-echo3g - ----------------- - - Module for Echoaudio 3G cards (Gina3G/Layla3G) - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-emu10k1 ------------------ @@ -681,22 +655,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. The power-management is supported. - Module snd-gina20 - ----------------- - - Module for Echoaudio Gina20 - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - - Module snd-gina24 - ----------------- - - Module for Echoaudio Gina24 - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-gusclassic --------------------- @@ -749,10 +707,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module snd-hda-intel -------------------- - Module for Intel HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8), - ATI SB450, SB600, RS600, - VIA VT8251/VT8237A, - SIS966, ULI M5461 + Module for Intel HD Audio (ICH6, ICH6M, ICH7), ATI SB450, + VIA VT8251/VT8237A model - force the model name position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) @@ -800,18 +756,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. basic fixed pin assignment w/o SPDIF auto auto-config reading BIOS (default) - ALC882/885 + ALC882/883/885 3stack-dig 3-jack with SPDIF I/O 6stck-dig 6-jack digital with SPDIF I/O auto auto-config reading BIOS (default) - ALC883/888 - 3stack-dig 3-jack with SPDIF I/O - 6stack-dig 6-jack digital with SPDIF I/O - 6stack-dig-demo 6-stack digital for Intel demo board - auto auto-config reading BIOS (default) - - ALC861/660 + ALC861 3stack 3-jack 3stack-dig 3-jack with SPDIF I/O 6stack-dig 6-jack with SPDIF I/O @@ -828,7 +778,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. AD1981 basic 3-jack (default) hp HP nx6320 - thinkpad Lenovo Thinkpad T60/X60/Z60 AD1986A 6stack 6-jack, separate surrounds (default) @@ -983,30 +932,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. driver isn't configured properly or you want to try another type for testing. - Module snd-indigo - ----------------- - - Module for Echoaudio Indigo - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - - Module snd-indigodj - ------------------- - - Module for Echoaudio Indigo DJ - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - - Module snd-indigoio - ------------------- - - Module for Echoaudio Indigo IO - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-intel8x0 ------------------- @@ -1106,22 +1031,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. This module supports multiple cards. - Module snd-layla20 - ------------------ - - Module for Echoaudio Layla20 - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - - Module snd-layla24 - ------------------ - - Module for Echoaudio Layla24 - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-maestro3 ------------------- @@ -1142,14 +1051,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. The power-management is supported. - Module snd-mia - --------------- - - Module for Echoaudio Mia - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-miro --------------- @@ -1182,14 +1083,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. When no hotplug fw loader is available, you need to load the firmware via mixartloader utility in alsa-tools package. - Module snd-mona - --------------- - - Module for Echoaudio Mona - - This module supports multiple cards. - The driver requires the firmware loader support on kernel. - Module snd-mpu401 ----------------- @@ -1740,7 +1633,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. About capture IBL, see the description of snd-vx222 module. - Note: snd-vxp440 driver is merged to snd-vxpocket driver since + Note: the driver is build only when CONFIG_ISA is set. + + Note2: snd-vxp440 driver is merged to snd-vxpocket driver since ALSA 1.0.10. The power-management is supported. @@ -1767,6 +1662,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. Module for Sound Core PDAudioCF sound card. + Note: the driver is build only when CONFIG_ISA is set. + The power-management is supported. diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index b8dc51ca7..1faf76383 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl @@ -1149,7 +1149,7 @@ } chip->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_mychip_interrupt, - IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { + SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { printk(KERN_ERR "cannot grab irq %d\n", pci->irq); snd_mychip_free(chip); return -EBUSY; @@ -1172,7 +1172,7 @@ } /* PCI IDs */ - static struct pci_device_id snd_mychip_ids[] = { + static struct pci_device_id snd_mychip_ids[] __devinitdata = { { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, .... @@ -1323,7 +1323,7 @@ irq, snd_mychip_interrupt, - IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { + SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { printk(KERN_ERR "cannot grab irq %d\n", pci->irq); snd_mychip_free(chip); return -EBUSY; @@ -1342,7 +1342,7 @@ On the PCI bus, the interrupts can be shared. Thus, - IRQF_SHARED is given as the interrupt flag of + SA_SHIRQ is given as the interrupt flag of request_irq(). @@ -1565,7 +1565,7 @@ - If you acquire a spinlock in the interrupt handler, and the + If you aquire a spinlock in the interrupt handler, and the lock is used in other pcm callbacks, too, then you have to release the lock before calling snd_pcm_period_elapsed(), because @@ -4215,7 +4215,7 @@ struct _snd_pcm_runtime { @@ -4242,36 +4242,15 @@ struct _snd_pcm_runtime { - The 5th argument is bitflags for additional information. When the i/o port address above is a part of the PCI i/o region, the MPU401 i/o port might have been already allocated - (reserved) by the driver itself. In such a case, pass a bit flag - MPU401_INFO_INTEGRATED, + (reserved) by the driver itself. In such a case, pass non-zero + to the 5th argument + (integrated). Otherwise, pass 0 to it, and the mpu401-uart layer will allocate the i/o ports by itself. - - When the controller supports only the input or output MIDI stream, - pass MPU401_INFO_INPUT or - MPU401_INFO_OUTPUT bitflag, respectively. - Then the rawmidi instance is created as a single stream. - - - - MPU401_INFO_MMIO bitflag is used to change - the access method to MMIO (via readb and writeb) instead of - iob and outb. In this case, you have to pass the iomapped address - to snd_mpu401_uart_new(). - - - - When MPU401_INFO_TX_IRQ is set, the output - stream isn't checked in the default interrupt handler. The driver - needs to call snd_mpu401_uart_interrupt_tx() - by itself to start processing the output stream in irq handler. - - Usually, the port address corresponds to the command port and port + 1 corresponds to the data port. If not, you may change @@ -5354,7 +5333,7 @@ struct _snd_pcm_runtime { @@ -5415,12 +5394,29 @@ struct _snd_pcm_runtime { c.text.write_size = 256; entry->c.text.write = my_proc_write; ]]> + + The buffer size for read is set to 1024 implicitly by + snd_info_set_text_ops(). It should suffice + in most cases (the size will be aligned to + PAGE_SIZE anyway), but if you need to handle + very large text files, you can set it explicitly, too. + + + +c.text.read_size = 65536; +]]> + + + + For the write callback, you can use snd_info_get_line() to get a text line, and @@ -5566,7 +5562,7 @@ struct _snd_pcm_runtime { power status. Call snd_pcm_suspend_all() to suspend the running PCM streams. If AC97 codecs are used, call - snd_ac97_suspend() for each codec. + snd_ac97_resume() for each codec. Save the register values if necessary. Stop the hardware if necessary. Disable the PCI device by calling diff --git a/Documentation/sparc/sbus_drivers.txt b/Documentation/sparc/sbus_drivers.txt index 4b9351624..876195dc2 100644 --- a/Documentation/sparc/sbus_drivers.txt +++ b/Documentation/sparc/sbus_drivers.txt @@ -25,84 +25,42 @@ the bits necessary to run your device. The most commonly used members of this structure, and their typical usage, will be detailed below. - Here is a piece of skeleton code for perofming a device -probe in an SBUS driverunder Linux: + Here is how probing is performed by an SBUS driver +under Linux: - static int __devinit mydevice_probe_one(struct sbus_dev *sdev) + static void init_one_mydevice(struct sbus_dev *sdev) { - struct mysdevice *mp = kzalloc(sizeof(*mp), GFP_KERNEL); - - if (!mp) - return -ENODEV; - - ... - dev_set_drvdata(&sdev->ofdev.dev, mp); - return 0; ... } - static int __devinit mydevice_probe(struct of_device *dev, - const struct of_device_id *match) + static int mydevice_match(struct sbus_dev *sdev) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - - return mydevice_probe_one(sdev); + if (some_criteria(sdev)) + return 1; + return 0; } - static int __devexit mydevice_remove(struct of_device *dev) + static void mydevice_probe(void) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - struct mydevice *mp = dev_get_drvdata(&dev->dev); - - return mydevice_remove_one(sdev, mp); - } - - static struct of_device_id mydevice_match[] = { - { - .name = "mydevice", - }, - {}, - }; - - MODULE_DEVICE_TABLE(of, mydevice_match); - - static struct of_platform_driver mydevice_driver = { - .name = "mydevice", - .match_table = mydevice_match, - .probe = mydevice_probe, - .remove = __devexit_p(mydevice_remove), - }; - - static int __init mydevice_init(void) - { - return of_register_driver(&mydevice_driver, &sbus_bus_type); - } + struct sbus_bus *sbus; + struct sbus_dev *sdev; - static void __exit mydevice_exit(void) - { - of_unregister_driver(&mydevice_driver); + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if (mydevice_match(sdev)) + init_one_mydevice(sdev); + } + } } - module_init(mydevice_init); - module_exit(mydevice_exit); - - The mydevice_match table is a series of entries which -describes what SBUS devices your driver is meant for. In the -simplest case you specify a string for the 'name' field. Every -SBUS device with a 'name' property matching your string will -be passed one-by-one to your .probe method. - - You should store away your device private state structure -pointer in the drvdata area so that you can retrieve it later on -in your .remove method. + All this does is walk through all SBUS devices in the +system, checks each to see if it is of the type which +your driver is written for, and if so it calls the init +routine to attach the device and prepare to drive it. - Any memory allocated, registers mapped, IRQs registered, -etc. must be undone by your .remove method so that all resources -of your device are relased by the time it returns. - - You should _NOT_ use the for_each_sbus(), for_each_sbusdev(), -and for_all_sbusdev() interfaces. They are deprecated, will be -removed, and no new driver should reference them ever. + "init_one_mydevice" might do things like allocate software +state structures, map in I/O registers, place the hardware +into an initialized state, etc. Mapping and Accessing I/O Registers @@ -305,3 +263,10 @@ discussed above and plus it handles both PCI and SBUS boards. Lance driver abuses consistent mappings for data transfer. It is a nifty trick which we do not particularly recommend... Just check it out and know that it's legal. + + Bad examples, do NOT use + + drivers/video/cgsix.c + This one uses result of sbus_ioremap as if it is an address. +This does NOT work on sparc64 and therefore is broken. We will +convert it at a later date. diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 5a311c38d..3f1c5464b 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt @@ -1,6 +1,5 @@ Copyright 2004 Linus Torvalds Copyright 2004 Pavel Machek -Copyright 2006 Bob Copeland Using sparse for typechecking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -42,8 +41,15 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian vs cpu-endian vs whatever), and there the constant "0" really _is_ special. -Getting sparse -~~~~~~~~~~~~~~ +Use + + make C=[12] CF=-Wbitwise + +or you don't get any checking at all. + + +Where to get sparse +~~~~~~~~~~~~~~~~~~~ With git, you can just get it from @@ -51,7 +57,7 @@ With git, you can just get it from and DaveJ has tar-balls at - http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ + http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ Once you have it, just do @@ -59,20 +65,8 @@ Once you have it, just do make make install -as a regular user, and it will install sparse in your ~/bin directory. - -Using sparse -~~~~~~~~~~~~ - -Do a kernel make with "make C=1" to run sparse on all the C files that get -recompiled, or use "make C=2" to run sparse on the files whether they need to -be recompiled or not. The latter is a fast way to check the whole tree if you -have already built it. - -The optional make variable CF can be used to pass arguments to sparse. The -build system passes -Wbitwise to sparse automatically. To perform endianness -checks, you may define __CHECK_ENDIAN__: - - make C=2 CF="-D__CHECK_ENDIAN__" - -These checks are disabled by default as they generate a host of warnings. +as your regular user, and it will install sparse in your ~/bin directory. +After that, doing a kernel make with "make C=1" will run sparse on all the +C files that get recompiled, or with "make C=2" will run sparse on the +files whether they need to be recompiled or not (ie the latter is fast way +to check the whole tree if you have already built it). diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt index 5c3a51905..0b62c6214 100644 --- a/Documentation/sysctl/fs.txt +++ b/Documentation/sysctl/fs.txt @@ -25,7 +25,6 @@ Currently, these files are in /proc/sys/fs: - inode-state - overflowuid - overflowgid -- suid_dumpable - super-max - super-nr @@ -132,25 +131,6 @@ The default is 65534. ============================================================== -suid_dumpable: - -This value can be used to query and set the core dump mode for setuid -or otherwise protected/tainted binaries. The modes are - -0 - (default) - traditional behaviour. Any process which has changed - privilege levels or is execute only will not be dumped -1 - (debug) - all processes dump core when possible. The core dump is - owned by the current user and no security is applied. This is - intended for system debugging situations only. Ptrace is unchecked. -2 - (suidsafe) - any binary which normally would not be dumped is dumped - readable by root only. This allows the end user to remove - such a dump but not access it directly. For security reasons - core dumps in this mode will not overwrite one another or - other files. This mode is appropriate when adminstrators are - attempting to debug problems in a normal environment. - -============================================================== - super-max & super-nr: These numbers control the maximum number of superblocks, and diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 89bf8c20a..b0c7ab93d 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -50,6 +50,7 @@ show up in /proc/sys/kernel: - shmmax [ sysv ipc ] - shmmni - stop-a [ SPARC only ] +- suid_dumpable - sysrq ==> Documentation/sysrq.txt - tainted - threads-max @@ -210,8 +211,9 @@ Controls the kernel's behaviour when an oops or BUG is encountered. 0: try to continue operation -1: panic immediatly. If the `panic' sysctl is also non-zero then the - machine will be rebooted. +1: delay a few seconds (to give klogd time to record the oops output) and + then panic. If the `panic' sysctl is also non-zero then the machine will + be rebooted. ============================================================== @@ -309,6 +311,25 @@ kernel. This value defaults to SHMMAX. ============================================================== +suid_dumpable: + +This value can be used to query and set the core dump mode for setuid +or otherwise protected/tainted binaries. The modes are + +0 - (default) - traditional behaviour. Any process which has changed + privilege levels or is execute only will not be dumped +1 - (debug) - all processes dump core when possible. The core dump is + owned by the current user and no security is applied. This is + intended for system debugging situations only. Ptrace is unchecked. +2 - (suidsafe) - any binary which normally would not be dumped is dumped + readable by root only. This allows the end user to remove + such a dump but not access it directly. For security reasons + core dumps in this mode will not overwrite one another or + other files. This mode is appropriate when adminstrators are + attempting to debug problems in a normal environment. + +============================================================== + tainted: Non-zero if the kernel has been tainted. Numeric values, which diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 20d0d797f..a46c10fcd 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt @@ -28,9 +28,7 @@ Currently, these files are in /proc/sys/vm: - block_dump - drop-caches - zone_reclaim_mode -- min_unmapped_ratio -- min_slab_ratio -- panic_on_oom +- zone_reclaim_interval ============================================================== @@ -139,6 +137,7 @@ This is value ORed together of 1 = Zone reclaim on 2 = Zone reclaim writes dirty pages out 4 = Zone reclaim swaps pages +8 = Also do a global slab reclaim pass zone_reclaim_mode is set during bootup to 1 if it is determined that pages from remote zones will cause a measurable performance reduction. The @@ -162,46 +161,20 @@ Allowing regular swap effectively restricts allocations to the local node unless explicitly overridden by memory policies or cpuset configurations. -============================================================= +It may be advisable to allow slab reclaim if the system makes heavy +use of files and builds up large slab caches. However, the slab +shrink operation is global, may take a long time and free slabs +in all nodes of the system. -min_unmapped_ratio: +================================================================ -This is available only on NUMA kernels. +zone_reclaim_interval: -A percentage of the total pages in each zone. Zone reclaim will only -occur if more than this percentage of pages are file backed and unmapped. -This is to insure that a minimal amount of local pages is still available for -file I/O even if the node is overallocated. +The time allowed for off node allocations after zone reclaim +has failed to reclaim enough pages to allow a local allocation. -The default is 1 percent. +Time is set in seconds and set by default to 30 seconds. -============================================================= - -min_slab_ratio: - -This is available only on NUMA kernels. - -A percentage of the total pages in each zone. On Zone reclaim -(fallback from the local zone occurs) slabs will be reclaimed if more -than this percentage of pages in a zone are reclaimable slab pages. -This insures that the slab growth stays under control even in NUMA -systems that rarely perform global reclaim. - -The default is 5 percent. - -Note that slab reclaim is triggered in a per zone / node fashion. -The process of reclaiming slab memory is currently not node specific -and may not be fast. - -============================================================= - -panic_on_oom - -This enables or disables panic on out-of-memory feature. If this is set to 1, -the kernel panics when out-of-memory happens. If this is set to 0, the kernel -will kill some rogue process, called oom_killer. Usually, oom_killer can kill -rogue processes and system will survive. If you want to panic the system -rather than killing rogue processes, set this to 1. - -The default value is 0. +Reduce the interval if undesired off node allocations occur. However, too +frequent scans will have a negative impact onoff node allocation performance. diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index e0188a23f..ad0bedf67 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt @@ -115,9 +115,8 @@ trojan program is running at console and which could grab your password when you would try to login. It will kill all programs on given console and thus letting you make sure that the login prompt you see is actually the one from init, not some trojan program. -IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT -IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT -IMPORTANT: such. :IMPORTANT +IMPORTANT:In its true form it is not a true SAK like the one in :IMPORTANT +IMPORTANT:c2 compliant systems, and it should be mistook as such. :IMPORTANT It seems other find it useful as (System Attention Key) which is useful when you want to exit a program that will not let you switch consoles. (For example, X or a svgalib program.) diff --git a/Documentation/tty.txt b/Documentation/tty.txt index dab566047..8ff7bc2a0 100644 --- a/Documentation/tty.txt +++ b/Documentation/tty.txt @@ -80,6 +80,13 @@ receive_buf() - Hand buffers of bytes from the driver to the ldisc for processing. Semantics currently rather mysterious 8( +receive_room() - Can be called by the driver layer at any time when + the ldisc is opened. The ldisc must be able to + handle the reported amount of data at that instant. + Synchronization between active receive_buf and + receive_room calls is down to the driver not the + ldisc. Must not sleep. + write_wakeup() - May be called at any point between open and close. The TTY_DO_WRITE_WAKEUP flag indicates if a call is needed but always races versus calls. Thus the diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt index 22c533126..f86550fe3 100644 --- a/Documentation/usb/proc_usb_info.txt +++ b/Documentation/usb/proc_usb_info.txt @@ -59,7 +59,7 @@ bind to an interface (or perhaps several) using an ioctl call. You would issue more ioctls to the device to communicate to it using control, bulk, or other kinds of USB transfers. The IOCTLs are listed in the file, and at this writing the -source code (linux/drivers/usb/core/devio.c) is the primary reference +source code (linux/drivers/usb/devio.c) is the primary reference for how to access devices through those files. Note that since by default these BBB/DDD files are writable only by diff --git a/Documentation/usb/usb-help.txt b/Documentation/usb/usb-help.txt index a74085938..b7c324973 100644 --- a/Documentation/usb/usb-help.txt +++ b/Documentation/usb/usb-help.txt @@ -5,7 +5,8 @@ For USB help other than the readme files that are located in Documentation/usb/*, see the following: Linux-USB project: http://www.linux-usb.org - mirrors at http://usb.in.tum.de/linux-usb/ + mirrors at http://www.suse.cz/development/linux-usb/ + and http://usb.in.tum.de/linux-usb/ and http://it.linux-usb.org Linux USB Guide: http://linux-usb.sourceforge.net Linux-USB device overview (working devices and drivers): diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 02b0f7beb..f001cd93b 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt @@ -399,10 +399,10 @@ REINER SCT cyberJack pinpad/e-com USB chipcard reader Prolific PL2303 Driver - This driver supports any device that has the PL2303 chip from Prolific + This driver support any device that has the PL2303 chip from Prolific in it. This includes a number of single port USB to serial converters and USB GPS devices. Devices from Aten (the UC-232) and - IO-Data work with this driver, as does the DCU-11 mobile-phone cable. + IO-Data work with this driver. For any questions or problems with this driver, please contact Greg Kroah-Hartman at greg@kroah.com diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt index e65ec828d..63cb7edd1 100644 --- a/Documentation/usb/usbmon.txt +++ b/Documentation/usb/usbmon.txt @@ -29,13 +29,14 @@ if usbmon is built into the kernel. # mount -t debugfs none_debugs /sys/kernel/debug # modprobe usbmon -# Verify that bus sockets are present. -# ls /sys/kernel/debug/usbmon +[root@lembas zaitcev]# ls /sys/kernel/debug/usbmon 1s 1t 2s 2t 3s 3t 4s 4t -# +[root@lembas zaitcev]# + +# ls /sys/kernel 2. Find which bus connects to the desired device @@ -75,7 +76,7 @@ that the file size is not excessive for your favourite editor. * Raw text data format -The '1t' type data consists of a stream of events, such as URB submission, +The '0t' type data consists of a stream of events, such as URB submission, URB callback, submission error. Every event is a text line, which consists of whitespace separated words. The number of position of words may depend on the event type, but there is a set of words, common for all types. @@ -96,25 +97,20 @@ Here is the list of words, from left to right: Zi Zo Isochronous input and output Ii Io Interrupt input and output Bi Bo Bulk input and output - Device address and Endpoint number are 3-digit and 2-digit (respectively) - decimal numbers, with leading zeroes. -- URB Status. In most cases, this field contains a number, sometimes negative, - which represents a "status" field of the URB. This field makes no sense for - submissions, but is present anyway to help scripts with parsing. When an - error occurs, the field contains the error code. In case of a submission of - a Control packet, this field contains a Setup Tag instead of an error code. - It is easy to tell whether the Setup Tag is present because it is never a - number. Thus if scripts find a number in this field, they proceed to read - Data Length. If they find something else, like a letter, they read the setup - packet before reading the Data Length. + Device address and Endpoint number are decimal numbers with leading zeroes + or 3 and 2 positions, correspondingly. +- URB Status. This field makes no sense for submissions, but is present + to help scripts with parsing. In error case, it contains the error code. + In case of a setup packet, it contains a Setup Tag. If scripts read a number + in this field, they proceed to read Data Length. Otherwise, they read + the setup packet before reading the Data Length. - Setup packet, if present, consists of 5 words: one of each for bmRequestType, bRequest, wValue, wIndex, wLength, as specified by the USB Specification 2.0. These words are safe to decode if Setup Tag was 's'. Otherwise, the setup packet was present, but not captured, and the fields contain filler. -- Data Length. For submissions, this is the requested length. For callbacks, - this is the actual length. +- Data Length. This is the actual length in the URB. - Data tag. The usbmon may not always capture data, even if length is nonzero. - The data words are present only if this tag is '='. + Only if tag is '=', the data words are present. - Data words follow, in big endian hexadecimal format. Notice that they are not machine words, but really just a byte stream split into words to make it easier to read. Thus, the last word may contain from one to four bytes. diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index 4efa46458..b72706c58 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv @@ -87,7 +87,7 @@ 86 -> Osprey 101/151 w/ svid 87 -> Osprey 200/201/250/251 88 -> Osprey 200/250 [0070:ff01] - 89 -> Osprey 210/220/230 + 89 -> Osprey 210/220 90 -> Osprey 500 [0070:ff02] 91 -> Osprey 540 [0070:ff04] 92 -> Osprey 2000 [0070:ff03] @@ -111,7 +111,7 @@ 110 -> IVC-100 [ff00:a132] 111 -> IVC-120G [ff00:a182,ff01:a182,ff02:a182,ff03:a182,ff04:a182,ff05:a182,ff06:a182,ff07:a182,ff08:a182,ff09:a182,ff0a:a182,ff0b:a182,ff0c:a182,ff0d:a182,ff0e:a182,ff0f:a182] 112 -> pcHDTV HD-2000 TV [7063:2000] -113 -> Twinhan DST + clones [11bd:0026,1822:0001,270f:fc00,1822:0026] +113 -> Twinhan DST + clones [11bd:0026,1822:0001,270f:fc00] 114 -> Winfast VC100 [107d:6607] 115 -> Teppro TEV-560/InterVision IV-560 116 -> SIMUS GVC1100 [aa6a:82b2] diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 00d9a1f2a..3b39a91b2 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 @@ -15,7 +15,7 @@ 14 -> KWorld/VStream XPert DVB-T [17de:08a6] 15 -> DViCO FusionHDTV DVB-T1 [18ac:db00] 16 -> KWorld LTV883RF - 17 -> DViCO FusionHDTV 3 Gold-Q [18ac:d810,18ac:d800] + 17 -> DViCO FusionHDTV 3 Gold-Q [18ac:d810] 18 -> Hauppauge Nova-T DVB-T [0070:9002,0070:9001] 19 -> Conexant DVB-T reference design [14f1:0187] 20 -> Provideo PV259 [1540:2580] @@ -40,14 +40,8 @@ 39 -> KWorld DVB-S 100 [17de:08b2] 40 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid [0070:9400,0070:9402] 41 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile) [0070:9800,0070:9802] - 42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025,1822:0019] + 42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025] 43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1] 44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50,18ac:db54] 45 -> KWorld HardwareMpegTV XPert [17de:0840] 46 -> DViCO FusionHDTV DVB-T Hybrid [18ac:db40,18ac:db44] - 47 -> pcHDTV HD5500 HDTV [7063:5500] - 48 -> Kworld MCE 200 Deluxe [17de:0841] - 49 -> PixelView PlayTV P7000 [1554:4813] - 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] - 51 -> WinFast DTV2000 H [107d:665e] - 52 -> Geniatech DVB-S [14f1:0084] diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 9068b669f..bca509032 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 @@ -93,4 +93,3 @@ 92 -> AVerMedia A169 B1 [1461:6360] 93 -> Medion 7134 Bridge #2 [16be:0005] 94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502] - 95 -> LifeView FlyVIDEO3000 (NTSC) [5169:0138] diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner index 44134f04b..1bcdac67d 100644 --- a/Documentation/video4linux/CARDLIST.tuner +++ b/Documentation/video4linux/CARDLIST.tuner @@ -62,7 +62,7 @@ tuner=60 - Thomson DTT 761X (ATSC/NTSC) tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF tuner=62 - Philips TEA5767HN FM Radio tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner -tuner=64 - LG TDVS-H06xF +tuner=64 - LG TDVS-H062F/TUA6034 tuner=65 - Ymec TVF66T5-B/DFF tuner=66 - LG TALN series tuner=67 - Philips TD1316 Hybrid Tuner @@ -71,4 +71,3 @@ tuner=69 - Tena TNF 5335 and similar models tuner=70 - Samsung TCPN 2121P30A tuner=71 - Xceive xc3028 tuner=72 - Thomson FE6600 -tuner=73 - Samsung TCPG 6121P30A diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt index ade8651e2..464e4cec9 100644 --- a/Documentation/video4linux/CQcam.txt +++ b/Documentation/video4linux/CQcam.txt @@ -185,10 +185,207 @@ this work is documented at the video4linux2 site listed below. 9.0 --- A sample program using v4lgrabber, -v4lgrab is a simple image grabber that will copy a frame from the +This program is a simple image grabber that will copy a frame from the first video device, /dev/video0 to standard output in portable pixmap -format (.ppm) To produce .jpg output, you can use it like this: -'v4lgrab | convert - c-qcam.jpg' +format (.ppm) Using this like: 'v4lgrab | convert - c-qcam.jpg' +produced this picture of me at + http://mug.sys.virginia.edu/~drf5n/extras/c-qcam.jpg + +-------------------- 8< ---------------- 8< ----------------------------- + +/* Simple Video4Linux image grabber. */ +/* + * Video4Linux Driver Test/Example Framegrabbing Program + * + * Compile with: + * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab + * Use as: + * v4lgrab >image.ppm + * + * Copyright (C) 1998-05-03, Phil Blundell + * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c + * with minor modifications (Dave Forrest, drf5n@virginia.edu). + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define FILE "/dev/video0" + +/* Stole this from tvset.c */ + +#define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ +{ \ + switch (format) \ + { \ + case VIDEO_PALETTE_GREY: \ + switch (depth) \ + { \ + case 4: \ + case 6: \ + case 8: \ + (r) = (g) = (b) = (*buf++ << 8);\ + break; \ + \ + case 16: \ + (r) = (g) = (b) = \ + *((unsigned short *) buf); \ + buf += 2; \ + break; \ + } \ + break; \ + \ + \ + case VIDEO_PALETTE_RGB565: \ + { \ + unsigned short tmp = *(unsigned short *)buf; \ + (r) = tmp&0xF800; \ + (g) = (tmp<<5)&0xFC00; \ + (b) = (tmp<<11)&0xF800; \ + buf += 2; \ + } \ + break; \ + \ + case VIDEO_PALETTE_RGB555: \ + (r) = (buf[0]&0xF8)<<8; \ + (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ + (b) = ((buf[1] << 2 ) & 0xF8)<<8; \ + buf += 2; \ + break; \ + \ + case VIDEO_PALETTE_RGB24: \ + (r) = buf[0] << 8; (g) = buf[1] << 8; \ + (b) = buf[2] << 8; \ + buf += 3; \ + break; \ + \ + default: \ + fprintf(stderr, \ + "Format %d not yet supported\n", \ + format); \ + } \ +} + +int get_brightness_adj(unsigned char *image, long size, int *brightness) { + long i, tot = 0; + for (i=0;i= 126 && (tot/(size*3)) <= 130); +} + +int main(int argc, char ** argv) +{ + int fd = open(FILE, O_RDONLY), f; + struct video_capability cap; + struct video_window win; + struct video_picture vpic; + + unsigned char *buffer, *src; + int bpp = 24, r, g, b; + unsigned int i, src_depth; + + if (fd < 0) { + perror(FILE); + exit(1); + } + + if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { + perror("VIDIOGCAP"); + fprintf(stderr, "(" FILE " not a video4linux device?)\n"); + close(fd); + exit(1); + } + + if (ioctl(fd, VIDIOCGWIN, &win) < 0) { + perror("VIDIOCGWIN"); + close(fd); + exit(1); + } + + if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) { + perror("VIDIOCGPICT"); + close(fd); + exit(1); + } + + if (cap.type & VID_TYPE_MONOCHROME) { + vpic.depth=8; + vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */ + if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { + vpic.depth=6; + if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { + vpic.depth=4; + if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { + fprintf(stderr, "Unable to find a supported capture format.\n"); + close(fd); + exit(1); + } + } + } + } else { + vpic.depth=24; + vpic.palette=VIDEO_PALETTE_RGB24; + + if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { + vpic.palette=VIDEO_PALETTE_RGB565; + vpic.depth=16; + + if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { + vpic.palette=VIDEO_PALETTE_RGB555; + vpic.depth=15; + + if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { + fprintf(stderr, "Unable to find a supported capture format.\n"); + return -1; + } + } + } + } + + buffer = malloc(win.width * win.height * bpp); + if (!buffer) { + fprintf(stderr, "Out of memory.\n"); + exit(1); + } + + do { + int newbright; + read(fd, buffer, win.width * win.height * bpp); + f = get_brightness_adj(buffer, win.width * win.height, &newbright); + if (f) { + vpic.brightness += (newbright << 8); + if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { + perror("VIDIOSPICT"); + break; + } + } + } while (f); + + fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height); + + src = buffer; + + for (i = 0; i < win.width * win.height; i++) { + READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b); + fputc(r>>8, stdout); + fputc(g>>8, stdout); + fputc(b>>8, stdout); + } + + close(fd); + return 0; +} +-------------------- 8< ---------------- 8< ----------------------------- 10.0 --- Other Information diff --git a/Documentation/video4linux/README.pvrusb2 b/Documentation/video4linux/README.pvrusb2 deleted file mode 100644 index c73a32c34..000000000 --- a/Documentation/video4linux/README.pvrusb2 +++ /dev/null @@ -1,212 +0,0 @@ - -$Id$ -Mike Isely - - pvrusb2 driver - -Background: - - This driver is intended for the "Hauppauge WinTV PVR USB 2.0", which - is a USB 2.0 hosted TV Tuner. This driver is a work in progress. - Its history started with the reverse-engineering effort by Björn - Danielsson whose web page can be found here: - - http://pvrusb2.dax.nu/ - - From there Aurelien Alleaume began an effort to - create a video4linux compatible driver. I began with Aurelien's - last known snapshot and evolved the driver to the state it is in - here. - - More information on this driver can be found at: - - http://www.isely.net/pvrusb2.html - - - This driver has a strong separation of layers. They are very - roughly: - - 1a. Low level wire-protocol implementation with the device. - - 1b. I2C adaptor implementation and corresponding I2C client drivers - implemented elsewhere in V4L. - - 1c. High level hardware driver implementation which coordinates all - activities that ensure correct operation of the device. - - 2. A "context" layer which manages instancing of driver, setup, - tear-down, arbitration, and interaction with high level - interfaces appropriately as devices are hotplugged in the - system. - - 3. High level interfaces which glue the driver to various published - Linux APIs (V4L, sysfs, maybe DVB in the future). - - The most important shearing layer is between the top 2 layers. A - lot of work went into the driver to ensure that any kind of - conceivable API can be laid on top of the core driver. (Yes, the - driver internally leverages V4L to do its work but that really has - nothing to do with the API published by the driver to the outside - world.) The architecture allows for different APIs to - simultaneously access the driver. I have a strong sense of fairness - about APIs and also feel that it is a good design principle to keep - implementation and interface isolated from each other. Thus while - right now the V4L high level interface is the most complete, the - sysfs high level interface will work equally well for similar - functions, and there's no reason I see right now why it shouldn't be - possible to produce a DVB high level interface that can sit right - alongside V4L. - - NOTE: Complete documentation on the pvrusb2 driver is contained in - the html files within the doc directory; these are exactly the same - as what is on the web site at the time. Browse those files - (especially the FAQ) before asking questions. - - -Building - - To build these modules essentially amounts to just running "Make", - but you need the kernel source tree nearby and you will likely also - want to set a few controlling environment variables first in order - to link things up with that source tree. Please see the Makefile - here for comments that explain how to do that. - - -Source file list / functional overview: - - (Note: The term "module" used below generally refers to loosely - defined functional units within the pvrusb2 driver and bears no - relation to the Linux kernel's concept of a loadable module.) - - pvrusb2-audio.[ch] - This is glue logic that resides between this - driver and the msp3400.ko I2C client driver (which is found - elsewhere in V4L). - - pvrusb2-context.[ch] - This module implements the context for an - instance of the driver. Everything else eventually ties back to - or is otherwise instanced within the data structures implemented - here. Hotplugging is ultimately coordinated here. All high level - interfaces tie into the driver through this module. This module - helps arbitrate each interface's access to the actual driver core, - and is designed to allow concurrent access through multiple - instances of multiple interfaces (thus you can for example change - the tuner's frequency through sysfs while simultaneously streaming - video through V4L out to an instance of mplayer). - - pvrusb2-debug.h - This header defines a printk() wrapper and a mask - of debugging bit definitions for the various kinds of debug - messages that can be enabled within the driver. - - pvrusb2-debugifc.[ch] - This module implements a crude command line - oriented debug interface into the driver. Aside from being part - of the process for implementing manual firmware extraction (see - the pvrusb2 web site mentioned earlier), probably I'm the only one - who has ever used this. It is mainly a debugging aid. - - pvrusb2-eeprom.[ch] - This is glue logic that resides between this - driver the tveeprom.ko module, which is itself implemented - elsewhere in V4L. - - pvrusb2-encoder.[ch] - This module implements all protocol needed to - interact with the Conexant mpeg2 encoder chip within the pvrusb2 - device. It is a crude echo of corresponding logic in ivtv, - however the design goals (strict isolation) and physical layer - (proxy through USB instead of PCI) are enough different that this - implementation had to be completely different. - - pvrusb2-hdw-internal.h - This header defines the core data structure - in the driver used to track ALL internal state related to control - of the hardware. Nobody outside of the core hardware-handling - modules should have any business using this header. All external - access to the driver should be through one of the high level - interfaces (e.g. V4L, sysfs, etc), and in fact even those high - level interfaces are restricted to the API defined in - pvrusb2-hdw.h and NOT this header. - - pvrusb2-hdw.h - This header defines the full internal API for - controlling the hardware. High level interfaces (e.g. V4L, sysfs) - will work through here. - - pvrusb2-hdw.c - This module implements all the various bits of logic - that handle overall control of a specific pvrusb2 device. - (Policy, instantiation, and arbitration of pvrusb2 devices fall - within the jurisdiction of pvrusb-context not here). - - pvrusb2-i2c-chips-*.c - These modules implement the glue logic to - tie together and configure various I2C modules as they attach to - the I2C bus. There are two versions of this file. The "v4l2" - version is intended to be used in-tree alongside V4L, where we - implement just the logic that makes sense for a pure V4L - environment. The "all" version is intended for use outside of - V4L, where we might encounter other possibly "challenging" modules - from ivtv or older kernel snapshots (or even the support modules - in the standalone snapshot). - - pvrusb2-i2c-cmd-v4l1.[ch] - This module implements generic V4L1 - compatible commands to the I2C modules. It is here where state - changes inside the pvrusb2 driver are translated into V4L1 - commands that are in turn send to the various I2C modules. - - pvrusb2-i2c-cmd-v4l2.[ch] - This module implements generic V4L2 - compatible commands to the I2C modules. It is here where state - changes inside the pvrusb2 driver are translated into V4L2 - commands that are in turn send to the various I2C modules. - - pvrusb2-i2c-core.[ch] - This module provides an implementation of a - kernel-friendly I2C adaptor driver, through which other external - I2C client drivers (e.g. msp3400, tuner, lirc) may connect and - operate corresponding chips within the the pvrusb2 device. It is - through here that other V4L modules can reach into this driver to - operate specific pieces (and those modules are in turn driven by - glue logic which is coordinated by pvrusb2-hdw, doled out by - pvrusb2-context, and then ultimately made available to users - through one of the high level interfaces). - - pvrusb2-io.[ch] - This module implements a very low level ring of - transfer buffers, required in order to stream data from the - device. This module is *very* low level. It only operates the - buffers and makes no attempt to define any policy or mechanism for - how such buffers might be used. - - pvrusb2-ioread.[ch] - This module layers on top of pvrusb2-io.[ch] - to provide a streaming API usable by a read() system call style of - I/O. Right now this is the only layer on top of pvrusb2-io.[ch], - however the underlying architecture here was intended to allow for - other styles of I/O to be implemented with additonal modules, like - mmap()'ed buffers or something even more exotic. - - pvrusb2-main.c - This is the top level of the driver. Module level - and USB core entry points are here. This is our "main". - - pvrusb2-sysfs.[ch] - This is the high level interface which ties the - pvrusb2 driver into sysfs. Through this interface you can do - everything with the driver except actually stream data. - - pvrusb2-tuner.[ch] - This is glue logic that resides between this - driver and the tuner.ko I2C client driver (which is found - elsewhere in V4L). - - pvrusb2-util.h - This header defines some common macros used - throughout the driver. These macros are not really specific to - the driver, but they had to go somewhere. - - pvrusb2-v4l2.[ch] - This is the high level interface which ties the - pvrusb2 driver into video4linux. It is through here that V4L - applications can open and operate the driver in the usual V4L - ways. Note that **ALL** V4L functionality is published only - through here and nowhere else. - - pvrusb2-video-*.[ch] - This is glue logic that resides between this - driver and the saa711x.ko I2C client driver (which is found - elsewhere in V4L). Note that saa711x.ko used to be known as - saa7115.ko in ivtv. There are two versions of this; one is - selected depending on the particular saa711[5x].ko that is found. - - pvrusb2.h - This header contains compile time tunable parameters - (and at the moment the driver has very little that needs to be - tuned). - - - -Mike Isely - isely@pobox.com - diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 040a2c841..be9f21b84 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran @@ -33,21 +33,6 @@ Inputs/outputs: Composite and S-video Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps) Card number: 7 -AverMedia 6 Eyes AVS6EYES: -* Zoran zr36067 PCI controller -* Zoran zr36060 MJPEG codec -* Samsung ks0127 TV decoder -* Conexant bt866 TV encoder -Drivers to use: videodev, i2c-core, i2c-algo-bit, - videocodec, ks0127, bt866, zr36060, zr36067 -Inputs/outputs: Six physical inputs. 1-6 are composite, - 1-2, 3-4, 5-6 doubles as S-video, - 1-3 triples as component. - One composite output. -Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps) -Card number: 8 -Not autodetected, card=8 is necessary. - Linux Media Labs LML33: * Zoran zr36067 PCI controller * Zoran zr36060 MJPEG codec @@ -207,10 +192,6 @@ Micronas vpx3220a TV decoder was introduced in 1996, is used in the DC30 and DC30+ and can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC 44, PAL 60, SECAM,NTSC Comb -Samsung ks0127 TV decoder -is used in the AVS6EYES card and -can handle: NTSC-M/N/44, PAL-M/N/B/G/H/I/D/K/L and SECAM - =========================== 1.2 What the TV encoder can do an what not @@ -240,10 +221,6 @@ ITT mse3000 TV encoder was introduced in 1991, is used in the DC10 old can generate: PAL , NTSC , SECAM -Conexant bt866 TV encoder -is used in AVS6EYES, and -can generate: NTSC/PAL, PAL­M, PAL­N - The adv717x, should be able to produce PAL N. But you find nothing PAL N specific in the registers. Seem that you have to reuse a other standard to generate PAL N, maybe it would work if you use the PAL M settings. diff --git a/Documentation/video4linux/bttv/CONTRIBUTORS b/Documentation/video4linux/bttv/CONTRIBUTORS index 8aad6dd93..aef49db88 100644 --- a/Documentation/video4linux/bttv/CONTRIBUTORS +++ b/Documentation/video4linux/bttv/CONTRIBUTORS @@ -1,4 +1,4 @@ -Contributors to bttv: +Contributors to bttv: Michael Chu AverMedia fix and more flexible card recognition @@ -8,8 +8,8 @@ Alan Cox Chris Kleitsch Hardware I2C - -Gerd Knorr + +Gerd Knorr Radio card (ITT sound processor) bigfoot @@ -18,7 +18,7 @@ Ragnar Hojland Espinosa + many more (please mail me if you are missing in this list and would - like to be mentioned) + like to be mentioned) diff --git a/Documentation/video4linux/cx2341x/fw-calling.txt b/Documentation/video4linux/cx2341x/fw-calling.txt deleted file mode 100644 index 8d21181de..000000000 --- a/Documentation/video4linux/cx2341x/fw-calling.txt +++ /dev/null @@ -1,69 +0,0 @@ -This page describes how to make calls to the firmware api. - -How to call -=========== - -The preferred calling convention is known as the firmware mailbox. The -mailboxes are basically a fixed length array that serves as the call-stack. - -Firmware mailboxes can be located by searching the encoder and decoder memory -for a 16 byte signature. That signature will be located on a 256-byte boundary. - -Signature: -0x78, 0x56, 0x34, 0x12, 0x12, 0x78, 0x56, 0x34, -0x34, 0x12, 0x78, 0x56, 0x56, 0x34, 0x12, 0x78 - -The firmware implements 20 mailboxes of 20 32-bit words. The first 10 are -reserved for API calls. The second 10 are used by the firmware for event -notification. - - Index Name - ----- ---- - 0 Flags - 1 Command - 2 Return value - 3 Timeout - 4-19 Parameter/Result - - -The flags are defined in the following table. The direction is from the -perspective of the firmware. - - Bit Direction Purpose - --- --------- ------- - 2 O Firmware has processed the command. - 1 I Driver has finished setting the parameters. - 0 I Driver is using this mailbox. - - -The command is a 32-bit enumerator. The API specifics may be found in the -fw-*-api.txt documents. - -The return value is a 32-bit enumerator. Only two values are currently defined: -0=success and -1=command undefined. - -There are 16 parameters/results 32-bit fields. The driver populates these fields -with values for all the parameters required by the call. The driver overwrites -these fields with result values returned by the call. The API specifics may be -found in the fw-*-api.txt documents. - -The timeout value protects the card from a hung driver thread. If the driver -doesn't handle the completed call within the timeout specified, the firmware -will reset that mailbox. - -To make an API call, the driver iterates over each mailbox looking for the -first one available (bit 0 has been cleared). The driver sets that bit, fills -in the command enumerator, the timeout value and any required parameters. The -driver then sets the parameter ready bit (bit 1). The firmware scans the -mailboxes for pending commands, processes them, sets the result code, populates -the result value array with that call's return values and sets the call -complete bit (bit 2). Once bit 2 is set, the driver should retrieve the results -and clear all the flags. If the driver does not perform this task within the -time set in the timeout register, the firmware will reset that mailbox. - -Event notifications are sent from the firmware to the host. The host tells the -firmware which events it is interested in via an API call. That call tells the -firmware which notification mailbox to use. The firmware signals the host via -an interrupt. Only the 16 Results fields are used, the Flags, Command, Return -value and Timeout words are not used. - diff --git a/Documentation/video4linux/cx2341x/fw-decoder-api.txt b/Documentation/video4linux/cx2341x/fw-decoder-api.txt deleted file mode 100644 index 9df4fb3ea..000000000 --- a/Documentation/video4linux/cx2341x/fw-decoder-api.txt +++ /dev/null @@ -1,319 +0,0 @@ -Decoder firmware API description -================================ - -Note: this API is part of the decoder firmware, so it's cx23415 only. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_PING_FW -Enum 0/0x00 -Description - This API call does nothing. It may be used to check if the firmware - is responding. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_START_PLAYBACK -Enum 1/0x01 -Description - Begin or resume playback. -Param[0] - 0 based frame number in GOP to begin playback from. -Param[1] - Specifies the number of muted audio frames to play before normal - audio resumes. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_STOP_PLAYBACK -Enum 2/0x02 -Description - Ends playback and clears all decoder buffers. If PTS is not zero, - playback stops at specified PTS. -Param[0] - Display 0=last frame, 1=black -Param[1] - PTS low -Param[2] - PTS high - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_PLAYBACK_SPEED -Enum 3/0x03 -Description - Playback stream at speed other than normal. There are two modes of - operation: - Smooth: host transfers entire stream and firmware drops unused - frames. - Coarse: host drops frames based on indexing as required to achieve - desired speed. -Param[0] - Bitmap: - 0:7 0 normal - 1 fast only "1.5 times" - n nX fast, 1/nX slow - 30 Framedrop: - '0' during 1.5 times play, every other B frame is dropped - '1' during 1.5 times play, stream is unchanged (bitrate - must not exceed 8mbps) - 31 Speed: - '0' slow - '1' fast -Param[1] - Direction: 0=forward, 1=reverse -Param[2] - Picture mask: - 1=I frames - 3=I, P frames - 7=I, P, B frames -Param[3] - B frames per GOP (for reverse play only) -Param[4] - Mute audio: 0=disable, 1=enable -Param[5] - Display 0=frame, 1=field -Param[6] - Specifies the number of muted audio frames to play before normal audio - resumes. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_STEP_VIDEO -Enum 5/0x05 -Description - Each call to this API steps the playback to the next unit defined below - in the current playback direction. -Param[0] - 0=frame, 1=top field, 2=bottom field - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_DMA_BLOCK_SIZE -Enum 8/0x08 -Description - Set DMA transfer block size. Counterpart to API 0xC9 -Param[0] - DMA transfer block size in bytes. A different size may be specified - when issuing the DMA transfer command. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_GET_XFER_INFO -Enum 9/0x09 -Description - This API call may be used to detect an end of stream condtion. -Result[0] - Stream type -Result[1] - Address offset -Result[2] - Maximum bytes to transfer -Result[3] - Buffer fullness - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_GET_DMA_STATUS -Enum 10/0x0A -Description - Status of the last DMA transfer -Result[0] - Bit 1 set means transfer complete - Bit 2 set means DMA error - Bit 3 set means linked list error -Result[1] - DMA type: 0=MPEG, 1=OSD, 2=YUV - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SCHED_DMA_FROM_HOST -Enum 11/0x0B -Description - Setup DMA from host operation. Counterpart to API 0xCC -Param[0] - Memory address of link list -Param[1] - Total # of bytes to transfer -Param[2] - DMA type (0=MPEG, 1=OSD, 2=YUV) - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_PAUSE_PLAYBACK -Enum 13/0x0D -Description - Freeze playback immediately. In this mode, when internal buffers are - full, no more data will be accepted and data request IRQs will be - masked. -Param[0] - Display: 0=last frame, 1=black - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_HALT_FW -Enum 14/0x0E -Description - The firmware is halted and no further API calls are serviced until - the firmware is uploaded again. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_STANDARD -Enum 16/0x10 -Description - Selects display standard -Param[0] - 0=NTSC, 1=PAL - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_GET_VERSION -Enum 17/0x11 -Description - Returns decoder firmware version information -Result[0] - Version bitmask: - Bits 0:15 build - Bits 16:23 minor - Bits 24:31 major - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_STREAM_INPUT -Enum 20/0x14 -Description - Select decoder stream input port -Param[0] - 0=memory (default), 1=streaming - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_GET_TIMING_INFO -Enum 21/0x15 -Description - Returns timing information from start of playback -Result[0] - Frame count by decode order -Result[1] - Video PTS bits 0:31 by display order -Result[2] - Video PTS bit 32 by display order -Result[3] - SCR bits 0:31 by display order -Result[4] - SCR bit 32 by display order - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_AUDIO_MODE -Enum 22/0x16 -Description - Select audio mode -Param[0] - Dual mono mode action -Param[1] - Stereo mode action: - 0=Stereo, 1=Left, 2=Right, 3=Mono, 4=Swap, -1=Unchanged - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_EVENT_NOTIFICATION -Enum 23/0x17 -Description - Setup firmware to notify the host about a particular event. - Counterpart to API 0xD5 -Param[0] - Event: 0=Audio mode change between stereo and dual channel -Param[1] - Notification 0=disabled, 1=enabled -Param[2] - Interrupt bit -Param[3] - Mailbox slot, -1 if no mailbox required. - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_DISPLAY_BUFFERS -Enum 24/0x18 -Description - Number of display buffers. To decode all frames in reverse playback you - must use nine buffers. -Param[0] - 0=six buffers, 1=nine buffers - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_EXTRACT_VBI -Enum 25/0x19 -Description - Extracts VBI data -Param[0] - 0=extract from extension & user data, 1=extract from private packets -Result[0] - VBI table location -Result[1] - VBI table size - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_DECODER_SOURCE -Enum 26/0x1A -Description - Selects decoder source. Ensure that the parameters passed to this - API match the encoder settings. -Param[0] - Mode: 0=MPEG from host, 1=YUV from encoder, 2=YUV from host -Param[1] - YUV picture width -Param[2] - YUV picture height -Param[3] - Bitmap: see Param[0] of API 0xBD - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_AUDIO_OUTPUT -Enum 27/0x1B -Description - Select audio output format -Param[0] - Bitmask: - 0:1 Data size: - '00' 16 bit - '01' 20 bit - '10' 24 bit - 2:7 Unused - 8:9 Mode: - '00' 2 channels - '01' 4 channels - '10' 6 channels - '11' 6 channels with one line data mode - (for left justified MSB first mode, 20 bit only) - 10:11 Unused - 12:13 Channel format: - '00' right justified MSB first mode - '01' left justified MSB first mode - '10' I2S mode - 14:15 Unused - 16:21 Right justify bit count - 22:31 Unused - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_AV_DELAY -Enum 28/0x1C -Description - Set audio/video delay in 90Khz ticks -Param[0] - 0=A/V in sync, negative=audio lags, positive=video lags - -------------------------------------------------------------------------------- - -Name CX2341X_DEC_SET_PREBUFFERING -Enum 30/0x1E -Description - Decoder prebuffering, when enabled up to 128KB are buffered for - streams <8mpbs or 640KB for streams >8mbps -Param[0] - 0=off, 1=on diff --git a/Documentation/video4linux/cx2341x/fw-dma.txt b/Documentation/video4linux/cx2341x/fw-dma.txt deleted file mode 100644 index 8123e262d..000000000 --- a/Documentation/video4linux/cx2341x/fw-dma.txt +++ /dev/null @@ -1,94 +0,0 @@ -This page describes the structures and procedures used by the cx2341x DMA -engine. - -Introduction -============ - -The cx2341x PCI interface is busmaster capable. This means it has a DMA -engine to efficiently transfer large volumes of data between the card and main -memory without requiring help from a CPU. Like most hardware, it must operate -on contiguous physical memory. This is difficult to come by in large quantities -on virtual memory machines. - -Therefore, it also supports a technique called "scatter-gather". The card can -transfer multiple buffers in one operation. Instead of allocating one large -contiguous buffer, the driver can allocate several smaller buffers. - -In practice, I've seen the average transfer to be roughly 80K, but transfers -above 128K were not uncommon, particularly at startup. The 128K figure is -important, because that is the largest block that the kernel can normally -allocate. Even still, 128K blocks are hard to come by, so the driver writer is -urged to choose a smaller block size and learn the scatter-gather technique. - -Mailbox #10 is reserved for DMA transfer information. - -Flow -==== - -This section describes, in general, the order of events when handling DMA -transfers. Detailed information follows this section. - -- The card raises the Encoder interrupt. -- The driver reads the transfer type, offset and size from Mailbox #10. -- The driver constructs the scatter-gather array from enough free dma buffers - to cover the size. -- The driver schedules the DMA transfer via the ScheduleDMAtoHost API call. -- The card raises the DMA Complete interrupt. -- The driver checks the DMA status register for any errors. -- The driver post-processes the newly transferred buffers. - -NOTE! It is possible that the Encoder and DMA Complete interrupts get raised -simultaneously. (End of the last, start of the next, etc.) - -Mailbox #10 -=========== - -The Flags, Command, Return Value and Timeout fields are ignored. - -Name: Mailbox #10 -Results[0]: Type: 0: MPEG. -Results[1]: Offset: The position relative to the card's memory space. -Results[2]: Size: The exact number of bytes to transfer. - -My speculation is that since the StartCapture API has a capture type of "RAW" -available, that the type field will have other values that correspond to YUV -and PCM data. - -Scatter-Gather Array -==================== - -The scatter-gather array is a contiguously allocated block of memory that -tells the card the source and destination of each data-block to transfer. -Card "addresses" are derived from the offset supplied by Mailbox #10. Host -addresses are the physical memory location of the target DMA buffer. - -Each S-G array element is a struct of three 32-bit words. The first word is -the source address, the second is the destination address. Both take up the -entire 32 bits. The lowest 16 bits of the third word is the transfer byte -count. The high-bit of the third word is the "last" flag. The last-flag tells -the card to raise the DMA_DONE interrupt. From hard personal experience, if -you forget to set this bit, the card will still "work" but the stream will -most likely get corrupted. - -The transfer count must be a multiple of 256. Therefore, the driver will need -to track how much data in the target buffer is valid and deal with it -accordingly. - -Array Element: - -- 32-bit Source Address -- 32-bit Destination Address -- 16-bit reserved (high bit is the last flag) -- 16-bit byte count - -DMA Transfer Status -=================== - -Register 0x0004 holds the DMA Transfer Status: - -Bit -4 Scatter-Gather array error -3 DMA write error -2 DMA read error -1 write completed -0 read completed diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt deleted file mode 100644 index 001c68644..000000000 --- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt +++ /dev/null @@ -1,694 +0,0 @@ -Encoder firmware API description -================================ - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_PING_FW -Enum 128/0x80 -Description - Does nothing. Can be used to check if the firmware is responding. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_START_CAPTURE -Enum 129/0x81 -Description - Commences the capture of video, audio and/or VBI data. All encoding - parameters must be initialized prior to this API call. Captures frames - continuously or until a predefined number of frames have been captured. -Param[0] - Capture stream type: - 0=MPEG - 1=Raw - 2=Raw passthrough - 3=VBI - -Param[1] - Bitmask: - Bit 0 when set, captures YUV - Bit 1 when set, captures PCM audio - Bit 2 when set, captures VBI (same as param[0]=3) - Bit 3 when set, the capture destination is the decoder - (same as param[0]=2) - Bit 4 when set, the capture destination is the host - Note: this parameter is only meaningful for RAW capture type. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_STOP_CAPTURE -Enum 130/0x82 -Description - Ends a capture in progress -Param[0] - 0=stop at end of GOP (generates IRQ) - 1=stop immediate (no IRQ) -Param[1] - Stream type to stop, see param[0] of API 0x81 -Param[2] - Subtype, see param[1] of API 0x81 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_AUDIO_ID -Enum 137/0x89 -Description - Assigns the transport stream ID of the encoded audio stream -Param[0] - Audio Stream ID - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_VIDEO_ID -Enum 139/0x8B -Description - Set video transport stream ID -Param[0] - Video stream ID - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_PCR_ID -Enum 141/0x8D -Description - Assigns the transport stream ID for PCR packets -Param[0] - PCR Stream ID - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_FRAME_RATE -Enum 143/0x8F -Description - Set video frames per second. Change occurs at start of new GOP. -Param[0] - 0=30fps - 1=25fps - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_FRAME_SIZE -Enum 145/0x91 -Description - Select video stream encoding resolution. -Param[0] - Height in lines. Default 480 -Param[1] - Width in pixels. Default 720 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_BIT_RATE -Enum 149/0x95 -Description - Assign average video stream bitrate. Note on the last three params: - Param[3] and [4] seem to be always 0, param [5] doesn't seem to be used. -Param[0] - 0=variable bitrate, 1=constant bitrate -Param[1] - bitrate in bits per second -Param[2] - peak bitrate in bits per second, divided by 400 -Param[3] - Mux bitrate in bits per second, divided by 400. May be 0 (default). -Param[4] - Rate Control VBR Padding -Param[5] - VBV Buffer used by encoder - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_GOP_PROPERTIES -Enum 151/0x97 -Description - Setup the GOP structure -Param[0] - GOP size (maximum is 34) -Param[1] - Number of B frames between the I and P frame, plus 1. - For example: IBBPBBPBBPBB --> GOP size: 12, number of B frames: 2+1 = 3 - Note that GOP size must be a multiple of (B-frames + 1). - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_ASPECT_RATIO -Enum 153/0x99 -Description - Sets the encoding aspect ratio. Changes in the aspect ratio take effect - at the start of the next GOP. -Param[0] - '0000' forbidden - '0001' 1:1 square - '0010' 4:3 - '0011' 16:9 - '0100' 2.21:1 - '0101' reserved - .... - '1111' reserved - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_DNR_FILTER_MODE -Enum 155/0x9B -Description - Assign Dynamic Noise Reduction operating mode -Param[0] - Bit0: Spatial filter, set=auto, clear=manual - Bit1: Temporal filter, set=auto, clear=manual -Param[1] - Median filter: - 0=Disabled - 1=Horizontal - 2=Vertical - 3=Horiz/Vert - 4=Diagonal - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_DNR_FILTER_PROPS -Enum 157/0x9D -Description - These Dynamic Noise Reduction filter values are only meaningful when - the respective filter is set to "manual" (See API 0x9B) -Param[0] - Spatial filter: default 0, range 0:15 -Param[1] - Temporal filter: default 0, range 0:31 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_CORING_LEVELS -Enum 159/0x9F -Description - Assign Dynamic Noise Reduction median filter properties. -Param[0] - Threshold above which the luminance median filter is enabled. - Default: 0, range 0:255 -Param[1] - Threshold below which the luminance median filter is enabled. - Default: 255, range 0:255 -Param[2] - Threshold above which the chrominance median filter is enabled. - Default: 0, range 0:255 -Param[3] - Threshold below which the chrominance median filter is enabled. - Default: 255, range 0:255 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_SPATIAL_FILTER_TYPE -Enum 161/0xA1 -Description - Assign spatial prefilter parameters -Param[0] - Luminance filter - 0=Off - 1=1D Horizontal - 2=1D Vertical - 3=2D H/V Separable (default) - 4=2D Symmetric non-separable -Param[1] - Chrominance filter - 0=Off - 1=1D Horizontal (default) - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_3_2_PULLDOWN -Enum 177/0xB1 -Description - 3:2 pulldown properties -Param[0] - 0=enabled - 1=disabled - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_VBI_LINE -Enum 183/0xB7 -Description - Selects VBI line number. -Param[0] - Bits 0:4 line number - Bit 31 0=top_field, 1=bottom_field - Bits 0:31 all set specifies "all lines" -Param[1] - VBI line information features: 0=disabled, 1=enabled -Param[2] - Slicing: 0=None, 1=Closed Caption - Almost certainly not implemented. Set to 0. -Param[3] - Luminance samples in this line. - Almost certainly not implemented. Set to 0. -Param[4] - Chrominance samples in this line - Almost certainly not implemented. Set to 0. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_STREAM_TYPE -Enum 185/0xB9 -Description - Assign stream type - Note: Transport stream is not working in recent firmwares. - And in older firmwares the timestamps in the TS seem to be - unreliable. -Param[0] - 0=Program stream - 1=Transport stream - 2=MPEG1 stream - 3=PES A/V stream - 5=PES Video stream - 7=PES Audio stream - 10=DVD stream - 11=VCD stream - 12=SVCD stream - 13=DVD_S1 stream - 14=DVD_S2 stream - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_OUTPUT_PORT -Enum 187/0xBB -Description - Assign stream output port. Normally 0 when the data is copied through - the PCI bus (DMA), and 1 when the data is streamed to another chip - (pvrusb and cx88-blackbird). -Param[0] - 0=Memory (default) - 1=Streaming - 2=Serial -Param[1] - Unknown, but leaving this to 0 seems to work best. Indications are that - this might have to do with USB support, although passing anything but 0 - onl breaks things. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_AUDIO_PROPERTIES -Enum 189/0xBD -Description - Set audio stream properties, may be called while encoding is in progress. - Note: all bitfields are consistent with ISO11172 documentation except - bits 2:3 which ISO docs define as: - '11' Layer I - '10' Layer II - '01' Layer III - '00' Undefined - This discrepancy may indicate a possible error in the documentation. - Testing indicated that only Layer II is actually working, and that - the minimum bitrate should be 192 kbps. -Param[0] - Bitmask: - 0:1 '00' 44.1Khz - '01' 48Khz - '10' 32Khz - '11' reserved - - 2:3 '01'=Layer I - '10'=Layer II - - 4:7 Bitrate: - Index | Layer I | Layer II - ------+-------------+------------ - '0000' | free format | free format - '0001' | 32 kbit/s | 32 kbit/s - '0010' | 64 kbit/s | 48 kbit/s - '0011' | 96 kbit/s | 56 kbit/s - '0100' | 128 kbit/s | 64 kbit/s - '0101' | 160 kbit/s | 80 kbit/s - '0110' | 192 kbit/s | 96 kbit/s - '0111' | 224 kbit/s | 112 kbit/s - '1000' | 256 kbit/s | 128 kbit/s - '1001' | 288 kbit/s | 160 kbit/s - '1010' | 320 kbit/s | 192 kbit/s - '1011' | 352 kbit/s | 224 kbit/s - '1100' | 384 kbit/s | 256 kbit/s - '1101' | 416 kbit/s | 320 kbit/s - '1110' | 448 kbit/s | 384 kbit/s - Note: For Layer II, not all combinations of total bitrate - and mode are allowed. See ISO11172-3 3-Annex B, Table 3-B.2 - - 8:9 '00'=Stereo - '01'=JointStereo - '10'=Dual - '11'=Mono - Note: testing seems to indicate that Mono and possibly - JointStereo are not working (default to stereo). - Dual does work, though. - - 10:11 Mode Extension used in joint_stereo mode. - In Layer I and II they indicate which subbands are in - intensity_stereo. All other subbands are coded in stereo. - '00' subbands 4-31 in intensity_stereo, bound==4 - '01' subbands 8-31 in intensity_stereo, bound==8 - '10' subbands 12-31 in intensity_stereo, bound==12 - '11' subbands 16-31 in intensity_stereo, bound==16 - - 12:13 Emphasis: - '00' None - '01' 50/15uS - '10' reserved - '11' CCITT J.17 - - 14 CRC: - '0' off - '1' on - - 15 Copyright: - '0' off - '1' on - - 16 Generation: - '0' copy - '1' original - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_HALT_FW -Enum 195/0xC3 -Description - The firmware is halted and no further API calls are serviced until the - firmware is uploaded again. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_GET_VERSION -Enum 196/0xC4 -Description - Returns the version of the encoder firmware. -Result[0] - Version bitmask: - Bits 0:15 build - Bits 16:23 minor - Bits 24:31 major - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_GOP_CLOSURE -Enum 197/0xC5 -Description - Assigns the GOP open/close property. -Param[0] - 0=Open - 1=Closed - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_GET_SEQ_END -Enum 198/0xC6 -Description - Obtains the sequence end code of the encoder's buffer. When a capture - is started a number of interrupts are still generated, the last of - which will have Result[0] set to 1 and Result[1] will contain the size - of the buffer. -Result[0] - State of the transfer (1 if last buffer) -Result[1] - If Result[0] is 1, this contains the size of the last buffer, undefined - otherwise. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_PGM_INDEX_INFO -Enum 199/0xC7 -Description - Sets the Program Index Information. -Param[0] - Picture Mask: - 0=No index capture - 1=I frames - 3=I,P frames - 7=I,P,B frames -Param[1] - Elements requested (up to 400) -Result[0] - Offset in SDF memory of the table. -Result[1] - Number of allocated elements up to a maximum of Param[1] - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_VBI_CONFIG -Enum 200/0xC8 -Description - Configure VBI settings -Param[0] - Bitmap: - 0 Mode '0' Sliced, '1' Raw - 1:3 Insertion: - '000' insert in extension & user data - '001' insert in private packets - '010' separate stream and user data - '111' separate stream and private data - 8:15 Stream ID (normally 0xBD) -Param[1] - Frames per interrupt (max 8). Only valid in raw mode. -Param[2] - Total raw VBI frames. Only valid in raw mode. -Param[3] - Start codes -Param[4] - Stop codes -Param[5] - Lines per frame -Param[6] - Byte per line -Result[0] - Observed frames per interrupt in raw mode only. Rage 1 to Param[1] -Result[1] - Observed number of frames in raw mode. Range 1 to Param[2] -Result[2] - Memory offset to start or raw VBI data - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_DMA_BLOCK_SIZE -Enum 201/0xC9 -Description - Set DMA transfer block size -Param[0] - DMA transfer block size in bytes or frames. When unit is bytes, - supported block sizes are 2^7, 2^8 and 2^9 bytes. -Param[1] - Unit: 0=bytes, 1=frames - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_GET_PREV_DMA_INFO_MB_10 -Enum 202/0xCA -Description - Returns information on the previous DMA transfer in conjunction with - bit 27 of the interrupt mask. Uses mailbox 10. -Result[0] - Type of stream -Result[1] - Address Offset -Result[2] - Maximum size of transfer - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_GET_PREV_DMA_INFO_MB_9 -Enum 203/0xCB -Description - Returns information on the previous DMA transfer in conjunction with - bit 27 of the interrupt mask. Uses mailbox 9. -Result[0] - Status bits: - Bit 0 set indicates transfer complete - Bit 2 set indicates transfer error - Bit 4 set indicates linked list error -Result[1] - DMA type -Result[2] - Presentation Time Stamp bits 0..31 -Result[3] - Presentation Time Stamp bit 32 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SCHED_DMA_TO_HOST -Enum 204/0xCC -Description - Setup DMA to host operation -Param[0] - Memory address of link list -Param[1] - Length of link list (wtf: what units ???) -Param[2] - DMA type (0=MPEG) - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_INITIALIZE_INPUT -Enum 205/0xCD -Description - Initializes the video input - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_FRAME_DROP_RATE -Enum 208/0xD0 -Description - For each frame captured, skip specified number of frames. -Param[0] - Number of frames to skip - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_PAUSE_ENCODER -Enum 210/0xD2 -Description - During a pause condition, all frames are dropped instead of being encoded. -Param[0] - 0=Pause encoding - 1=Continue encoding - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_REFRESH_INPUT -Enum 211/0xD3 -Description - Refreshes the video input - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_COPYRIGHT -Enum 212/0xD4 -Description - Sets stream copyright property -Param[0] - 0=Stream is not copyrighted - 1=Stream is copyrighted - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_EVENT_NOTIFICATION -Enum 213/0xD5 -Description - Setup firmware to notify the host about a particular event. Host must - unmask the interrupt bit. -Param[0] - Event (0=refresh encoder input) -Param[1] - Notification 0=disabled 1=enabled -Param[2] - Interrupt bit -Param[3] - Mailbox slot, -1 if no mailbox required. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_NUM_VSYNC_LINES -Enum 214/0xD6 -Description - Depending on the analog video decoder used, this assigns the number - of lines for field 1 and 2. -Param[0] - Field 1 number of lines: - 0x00EF for SAA7114 - 0x00F0 for SAA7115 - 0x0105 for Micronas -Param[1] - Field 2 number of lines: - 0x00EF for SAA7114 - 0x00F0 for SAA7115 - 0x0106 for Micronas - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_SET_PLACEHOLDER -Enum 215/0xD7 -Description - Provides a mechanism of inserting custom user data in the MPEG stream. -Param[0] - 0=extension & user data - 1=private packet with stream ID 0xBD -Param[1] - Rate at which to insert data, in units of frames (for private packet) - or GOPs (for ext. & user data) -Param[2] - Number of data DWORDs (below) to insert -Param[3] - Custom data 0 -Param[4] - Custom data 1 -Param[5] - Custom data 2 -Param[6] - Custom data 3 -Param[7] - Custom data 4 -Param[8] - Custom data 5 -Param[9] - Custom data 6 -Param[10] - Custom data 7 -Param[11] - Custom data 8 - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_MUTE_VIDEO -Enum 217/0xD9 -Description - Video muting -Param[0] - Bit usage: - 0 '0'=video not muted - '1'=video muted, creates frames with the YUV color defined below - 1:7 Unused - 8:15 V chrominance information - 16:23 U chrominance information - 24:31 Y luminance information - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_MUTE_AUDIO -Enum 218/0xDA -Description - Audio muting -Param[0] - 0=audio not muted - 1=audio muted (produces silent mpeg audio stream) - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_UNKNOWN -Enum 219/0xDB -Description - Unknown API, it's used by Hauppauge though. -Param[0] - 0 This is the value Hauppauge uses, Unknown what it means. - -------------------------------------------------------------------------------- - -Name CX2341X_ENC_MISC -Enum 220/0xDC -Description - Miscellaneous actions. Not known for 100% what it does. It's really a - sort of ioctl call. The first parameter is a command number, the second - the value. -Param[0] - Command number: - 1=set initial SCR value when starting encoding. - 2=set quality mode (apparently some test setting). - 3=setup advanced VIM protection handling (supposedly only for the cx23416 - for raw YUV). - Actually it looks like this should be 0 for saa7114/5 based card and 1 - for cx25840 based cards. - 4=generate artificial PTS timestamps - 5=USB flush mode - 6=something to do with the quantization matrix - 7=set navigation pack insertion for DVD - 8=enable scene change detection (seems to be a failure) - 9=set history parameters of the video input module - 10=set input field order of VIM - 11=set quantization matrix - 12=reset audio interface - 13=set audio volume delay - 14=set audio delay - -Param[1] - Command value. diff --git a/Documentation/video4linux/cx2341x/fw-memory.txt b/Documentation/video4linux/cx2341x/fw-memory.txt deleted file mode 100644 index ef0aad3f8..000000000 --- a/Documentation/video4linux/cx2341x/fw-memory.txt +++ /dev/null @@ -1,141 +0,0 @@ -This document describes the cx2341x memory map and documents some of the register -space. - -Warning! This information was figured out from searching through the memory and -registers, this information may not be correct and is certainly not complete, and -was not derived from anything more than searching through the memory space with -commands like: - - ivtvctl -O min=0x02000000,max=0x020000ff - -So take this as is, I'm always searching for more stuff, it's a large -register space :-). - -Memory Map -========== - -The cx2341x exposes its entire 64M memory space to the PCI host via the PCI BAR0 -(Base Address Register 0). The addresses here are offsets relative to the -address held in BAR0. - -0x00000000-0x00ffffff Encoder memory space -0x00000000-0x0003ffff Encode.rom - ???-??? MPEG buffer(s) - ???-??? Raw video capture buffer(s) - ???-??? Raw audio capture buffer(s) - ???-??? Display buffers (6 or 9) - -0x01000000-0x01ffffff Decoder memory space -0x01000000-0x0103ffff Decode.rom - ???-??? MPEG buffers(s) -0x0114b000-0x0115afff Audio.rom (deprecated?) - -0x02000000-0x0200ffff Register Space - -Registers -========= - -The registers occupy the 64k space starting at the 0x02000000 offset from BAR0. -All of these registers are 32 bits wide. - -DMA Registers 0x000-0xff: - - 0x00 - Control: - 0=reset/cancel, 1=read, 2=write, 4=stop - 0x04 - DMA status: - 1=read busy, 2=write busy, 4=read error, 8=write error, 16=link list error - 0x08 - pci DMA pointer for read link list - 0x0c - pci DMA pointer for write link list - 0x10 - read/write DMA enable: - 1=read enable, 2=write enable - 0x14 - always 0xffffffff, if set any lower instability occurs, 0x00 crashes - 0x18 - ?? - 0x1c - always 0x20 or 32, smaller values slow down DMA transactions - 0x20 - always value of 0x780a010a - 0x24-0x3c - usually just random values??? - 0x40 - Interrupt status - 0x44 - Write a bit here and shows up in Interrupt status 0x40 - 0x48 - Interrupt Mask - 0x4C - always value of 0xfffdffff, - if changed to 0xffffffff DMA write interrupts break. - 0x50 - always 0xffffffff - 0x54 - always 0xffffffff (0x4c, 0x50, 0x54 seem like interrupt masks, are - 3 processors on chip, Java ones, VPU, SPU, APU, maybe these are the - interrupt masks???). - 0x60-0x7C - random values - 0x80 - first write linked list reg, for Encoder Memory addr - 0x84 - first write linked list reg, for pci memory addr - 0x88 - first write linked list reg, for length of buffer in memory addr - (|0x80000000 or this for last link) - 0x8c-0xcc - rest of write linked list reg, 8 sets of 3 total, DMA goes here - from linked list addr in reg 0x0c, firmware must push through or - something. - 0xe0 - first (and only) read linked list reg, for pci memory addr - 0xe4 - first (and only) read linked list reg, for Decoder memory addr - 0xe8 - first (and only) read linked list reg, for length of buffer - 0xec-0xff - Nothing seems to be in these registers, 0xec-f4 are 0x00000000. - -Memory locations for Encoder Buffers 0x700-0x7ff: - -These registers show offsets of memory locations pertaining to each -buffer area used for encoding, have to shift them by <<1 first. - -0x07F8: Encoder SDRAM refresh -0x07FC: Encoder SDRAM pre-charge - -Memory locations for Decoder Buffers 0x800-0x8ff: - -These registers show offsets of memory locations pertaining to each -buffer area used for decoding, have to shift them by <<1 first. - -0x08F8: Decoder SDRAM refresh -0x08FC: Decoder SDRAM pre-charge - -Other memory locations: - -0x2800: Video Display Module control -0x2D00: AO (audio output?) control -0x2D24: Bytes Flushed -0x7000: LSB I2C write clock bit (inverted) -0x7004: LSB I2C write data bit (inverted) -0x7008: LSB I2C read clock bit -0x700c: LSB I2C read data bit -0x9008: GPIO get input state -0x900c: GPIO set output state -0x9020: GPIO direction (Bit7 (GPIO 0..7) - 0:input, 1:output) -0x9050: SPU control -0x9054: Reset HW blocks -0x9058: VPU control -0xA018: Bit6: interrupt pending? -0xA064: APU command - - -Interrupt Status Register -========================= - -The definition of the bits in the interrupt status register 0x0040, and the -interrupt mask 0x0048. If a bit is cleared in the mask, then we want our ISR to -execute. - -Bit -31 Encoder Start Capture -30 Encoder EOS -29 Encoder VBI capture -28 Encoder Video Input Module reset event -27 Encoder DMA complete -26 -25 Decoder copy protect detection event -24 Decoder audio mode change detection event -23 -22 Decoder data request -21 Decoder I-Frame? done -20 Decoder DMA complete -19 Decoder VBI re-insertion -18 Decoder DMA err (linked-list bad) - -Missing -Encoder API call completed -Decoder API call completed -Encoder API post(?) -Decoder API post(?) -Decoder VTRACE event diff --git a/Documentation/video4linux/cx2341x/fw-osd-api.txt b/Documentation/video4linux/cx2341x/fw-osd-api.txt deleted file mode 100644 index da98ae30a..000000000 --- a/Documentation/video4linux/cx2341x/fw-osd-api.txt +++ /dev/null @@ -1,342 +0,0 @@ -OSD firmware API description -============================ - -Note: this API is part of the decoder firmware, so it's cx23415 only. - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_FRAMEBUFFER -Enum 65/0x41 -Description - Return base and length of contiguous OSD memory. -Result[0] - OSD base address -Result[1] - OSD length - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_PIXEL_FORMAT -Enum 66/0x42 -Description - Query OSD format -Result[0] - 0=8bit index, 4=AlphaRGB 8:8:8:8 - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_PIXEL_FORMAT -Enum 67/0x43 -Description - Assign pixel format -Param[0] - 0=8bit index, 4=AlphaRGB 8:8:8:8 - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_STATE -Enum 68/0x44 -Description - Query OSD state -Result[0] - Bit 0 0=off, 1=on - Bits 1:2 alpha control - Bits 3:5 pixel format - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_STATE -Enum 69/0x45 -Description - OSD switch -Param[0] - 0=off, 1=on - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_OSD_COORDS -Enum 70/0x46 -Description - Retrieve coordinates of OSD area blended with video -Result[0] - OSD buffer address -Result[1] - Stride in pixels -Result[2] - Lines in OSD buffer -Result[3] - Horizontal offset in buffer -Result[4] - Vertical offset in buffer - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_OSD_COORDS -Enum 71/0x47 -Description - Assign the coordinates of the OSD area to blend with video -Param[0] - buffer address -Param[1] - buffer stride in pixels -Param[2] - lines in buffer -Param[3] - horizontal offset -Param[4] - vertical offset - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_SCREEN_COORDS -Enum 72/0x48 -Description - Retrieve OSD screen area coordinates -Result[0] - top left horizontal offset -Result[1] - top left vertical offset -Result[2] - bottom right hotizontal offset -Result[3] - bottom right vertical offset - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_SCREEN_COORDS -Enum 73/0x49 -Description - Assign the coordinates of the screen area to blend with video -Param[0] - top left horizontal offset -Param[1] - top left vertical offset -Param[2] - bottom left horizontal offset -Param[3] - bottom left vertical offset - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_GLOBAL_ALPHA -Enum 74/0x4A -Description - Retrieve OSD global alpha -Result[0] - global alpha: 0=off, 1=on -Result[1] - bits 0:7 global alpha - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_GLOBAL_ALPHA -Enum 75/0x4B -Description - Update global alpha -Param[0] - global alpha: 0=off, 1=on -Param[1] - global alpha (8 bits) -Param[2] - local alpha: 0=on, 1=off - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_BLEND_COORDS -Enum 78/0x4C -Description - Move start of blending area within display buffer -Param[0] - horizontal offset in buffer -Param[1] - vertical offset in buffer - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_FLICKER_STATE -Enum 79/0x4F -Description - Retrieve flicker reduction module state -Result[0] - flicker state: 0=off, 1=on - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_FLICKER_STATE -Enum 80/0x50 -Description - Set flicker reduction module state -Param[0] - State: 0=off, 1=on - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_BLT_COPY -Enum 82/0x52 -Description - BLT copy -Param[0] -'0000' zero -'0001' ~destination AND ~source -'0010' ~destination AND source -'0011' ~destination -'0100' destination AND ~source -'0101' ~source -'0110' destination XOR source -'0111' ~destination OR ~source -'1000' ~destination AND ~source -'1001' destination XNOR source -'1010' source -'1011' ~destination OR source -'1100' destination -'1101' destination OR ~source -'1110' destination OR source -'1111' one - -Param[1] - Resulting alpha blending - '01' source_alpha - '10' destination_alpha - '11' source_alpha*destination_alpha+1 - (zero if both source and destination alpha are zero) -Param[2] - '00' output_pixel = source_pixel - - '01' if source_alpha=0: - output_pixel = destination_pixel - if 256 > source_alpha > 1: - output_pixel = ((source_alpha + 1)*source_pixel + - (255 - source_alpha)*destination_pixel)/256 - - '10' if destination_alpha=0: - output_pixel = source_pixel - if 255 > destination_alpha > 0: - output_pixel = ((255 - destination_alpha)*source_pixel + - (destination_alpha + 1)*destination_pixel)/256 - - '11' if source_alpha=0: - source_temp = 0 - if source_alpha=255: - source_temp = source_pixel*256 - if 255 > source_alpha > 0: - source_temp = source_pixel*(source_alpha + 1) - if destination_alpha=0: - destination_temp = 0 - if destination_alpha=255: - destination_temp = destination_pixel*256 - if 255 > destination_alpha > 0: - destination_temp = destination_pixel*(destination_alpha + 1) - output_pixel = (source_temp + destination_temp)/256 -Param[3] - width -Param[4] - height -Param[5] - destination pixel mask -Param[6] - destination rectangle start address -Param[7] - destination stride in dwords -Param[8] - source stride in dwords -Param[9] - source rectangle start address - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_BLT_FILL -Enum 83/0x53 -Description - BLT fill color -Param[0] - Same as Param[0] on API 0x52 -Param[1] - Same as Param[1] on API 0x52 -Param[2] - Same as Param[2] on API 0x52 -Param[3] - width -Param[4] - height -Param[5] - destination pixel mask -Param[6] - destination rectangle start address -Param[7] - destination stride in dwords -Param[8] - color fill value - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_BLT_TEXT -Enum 84/0x54 -Description - BLT for 8 bit alpha text source -Param[0] - Same as Param[0] on API 0x52 -Param[1] - Same as Param[1] on API 0x52 -Param[2] - Same as Param[2] on API 0x52 -Param[3] - width -Param[4] - height -Param[5] - destination pixel mask -Param[6] - destination rectangle start address -Param[7] - destination stride in dwords -Param[8] - source stride in dwords -Param[9] - source rectangle start address -Param[10] - color fill value - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_FRAMEBUFFER_WINDOW -Enum 86/0x56 -Description - Positions the main output window on the screen. The coordinates must be - such that the entire window fits on the screen. -Param[0] - window width -Param[1] - window height -Param[2] - top left window corner horizontal offset -Param[3] - top left window corner vertical offset - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_CHROMA_KEY -Enum 96/0x60 -Description - Chroma key switch and color -Param[0] - state: 0=off, 1=on -Param[1] - color - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_GET_ALPHA_CONTENT_INDEX -Enum 97/0x61 -Description - Retrieve alpha content index -Result[0] - alpha content index, Range 0:15 - -------------------------------------------------------------------------------- - -Name CX2341X_OSD_SET_ALPHA_CONTENT_INDEX -Enum 98/0x62 -Description - Assign alpha content index -Param[0] - alpha content index, range 0:15 diff --git a/Documentation/video4linux/cx2341x/fw-upload.txt b/Documentation/video4linux/cx2341x/fw-upload.txt deleted file mode 100644 index 60c502ce3..000000000 --- a/Documentation/video4linux/cx2341x/fw-upload.txt +++ /dev/null @@ -1,49 +0,0 @@ -This document describes how to upload the cx2341x firmware to the card. - -How to find -=========== - -See the web pages of the various projects that uses this chip for information -on how to obtain the firmware. - -The firmware stored in a Windows driver can be detected as follows: - -- Each firmware image is 256k bytes. -- The 1st 32-bit word of the Encoder image is 0x0000da7 -- The 1st 32-bit word of the Decoder image is 0x00003a7 -- The 2nd 32-bit word of both images is 0xaa55bb66 - -How to load -=========== - -- Issue the FWapi command to stop the encoder if it is running. Wait for the - command to complete. -- Issue the FWapi command to stop the decoder if it is running. Wait for the - command to complete. -- Issue the I2C command to the digitizer to stop emitting VSYNC events. -- Issue the FWapi command to halt the encoder's firmware. -- Sleep for 10ms. -- Issue the FWapi command to halt the decoder's firmware. -- Sleep for 10ms. -- Write 0x00000000 to register 0x2800 to stop the Video Display Module. -- Write 0x00000005 to register 0x2D00 to stop the AO (audio output?). -- Write 0x00000000 to register 0xA064 to ping? the APU. -- Write 0xFFFFFFFE to register 0x9058 to stop the VPU. -- Write 0xFFFFFFFF to register 0x9054 to reset the HW blocks. -- Write 0x00000001 to register 0x9050 to stop the SPU. -- Sleep for 10ms. -- Write 0x0000001A to register 0x07FC to init the Encoder SDRAM's pre-charge. -- Write 0x80000640 to register 0x07F8 to init the Encoder SDRAM's refresh to 1us. -- Write 0x0000001A to register 0x08FC to init the Decoder SDRAM's pre-charge. -- Write 0x80000640 to register 0x08F8 to init the Decoder SDRAM's refresh to 1us. -- Sleep for 512ms. (600ms is recommended) -- Transfer the encoder's firmware image to offset 0 in Encoder memory space. -- Transfer the decoder's firmware image to offset 0 in Decoder memory space. -- Use a read-modify-write operation to Clear bit 0 of register 0x9050 to - re-enable the SPU. -- Sleep for 1 second. -- Use a read-modify-write operation to Clear bits 3 and 0 of register 0x9058 - to re-enable the VPU. -- Sleep for 1 second. -- Issue status API commands to both firmware images to verify. - diff --git a/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt b/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt deleted file mode 100644 index 93fec32a1..000000000 --- a/Documentation/video4linux/cx88/hauppauge-wintv-cx88-ir.txt +++ /dev/null @@ -1,54 +0,0 @@ -The controls for the mux are GPIO [0,1] for source, and GPIO 2 for muting. - -GPIO0 GPIO1 - 0 0 TV Audio - 1 0 FM radio - 0 1 Line-In - 1 1 Mono tuner bypass or CD passthru (tuner specific) - -GPIO 16(i believe) is tied to the IR port (if present). - ------------------------------------------------------------------------------------- - ->From the data sheet: - Register 24'h20004 PCI Interrupt Status - bit [18] IR_SMP_INT Set when 32 input samples have been collected over - gpio[16] pin into GP_SAMPLE register. - -What's missing from the data sheet: - -Setup 4KHz sampling rate (roughly 2x oversampled; good enough for our RC5 -compat remote) -set register 0x35C050 to 0xa80a80 - -enable sampling -set register 0x35C054 to 0x5 - -Of course, enable the IRQ bit 18 in the interrupt mask register .(and -provide for a handler) - -GP_SAMPLE register is at 0x35C058 - -Bits are then right shifted into the GP_SAMPLE register at the specified -rate; you get an interrupt when a full DWORD is recieved. -You need to recover the actual RC5 bits out of the (oversampled) IR sensor -bits. (Hint: look for the 0/1and 1/0 crossings of the RC5 bi-phase data) An -actual raw RC5 code will span 2-3 DWORDS, depending on the actual alignment. - -I'm pretty sure when no IR signal is present the receiver is always in a -marking state(1); but stray light, etc can cause intermittent noise values -as well. Remember, this is a free running sample of the IR receiver state -over time, so don't assume any sample starts at any particular place. - -http://www.atmel.com/dyn/resources/prod_documents/doc2817.pdf -This data sheet (google search) seems to have a lovely description of the -RC5 basics - -http://users.pandora.be/nenya/electronics/rc5/ and more data - -http://www.ee.washington.edu/circuit_archive/text/ir_decode.txt -and even a reference to how to decode a bi-phase data stream. - -http://www.xs4all.nl/~sbp/knowledge/ir/rc5.htm -still more info - diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt index cd584f20a..29340282a 100644 --- a/Documentation/video4linux/et61x251.txt +++ b/Documentation/video4linux/et61x251.txt @@ -1,9 +1,9 @@ - ET61X[12]51 PC Camera Controllers - Driver for Linux - ================================= + ET61X[12]51 PC Camera Controllers + Driver for Linux + ================================= - - Documentation - + - Documentation - Index @@ -156,46 +156,46 @@ Name: video_nr Type: short array (min = 0, max = 64) Syntax: <-1|n[,...]> Description: Specify V4L2 minor mode number: - -1 = use next available - n = use minor number n - You can specify up to 64 cameras this way. - For example: - video_nr=-1,2,-1 would assign minor number 2 to the second - registered camera and use auto for the first one and for every - other camera. + -1 = use next available + n = use minor number n + You can specify up to 64 cameras this way. + For example: + video_nr=-1,2,-1 would assign minor number 2 to the second + registered camera and use auto for the first one and for every + other camera. Default: -1 ------------------------------------------------------------------------------- Name: force_munmap Type: bool array (min = 0, max = 64) Syntax: <0|1[,...]> Description: Force the application to unmap previously mapped buffer memory - before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not - all the applications support this feature. This parameter is - specific for each detected camera. - 0 = do not force memory unmapping - 1 = force memory unmapping (save memory) + before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not + all the applications support this feature. This parameter is + specific for each detected camera. + 0 = do not force memory unmapping + 1 = force memory unmapping (save memory) Default: 0 ------------------------------------------------------------------------------- Name: frame_timeout Type: uint array (min = 0, max = 64) Syntax: Description: Timeout for a video frame in seconds. This parameter is - specific for each detected camera. This parameter can be - changed at runtime thanks to the /sys filesystem interface. + specific for each detected camera. This parameter can be + changed at runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- Name: debug Type: ushort Syntax: Description: Debugging information level, from 0 to 3: - 0 = none (use carefully) - 1 = critical errors - 2 = significant informations - 3 = more verbose messages - Level 3 is useful for testing only, when only one device - is used at the same time. It also shows some more informations - about the hardware being detected. This module parameter can be - changed at runtime thanks to the /sys filesystem interface. + 0 = none (use carefully) + 1 = critical errors + 2 = significant informations + 3 = more verbose messages + Level 3 is useful for testing only, when only one device + is used at the same time. It also shows some more informations + about the hardware being detected. This module parameter can be + changed at runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- diff --git a/Documentation/video4linux/ibmcam.txt b/Documentation/video4linux/ibmcam.txt index 397a94eb7..4a40a2e99 100644 --- a/Documentation/video4linux/ibmcam.txt +++ b/Documentation/video4linux/ibmcam.txt @@ -21,7 +21,7 @@ Internal interface: Video For Linux (V4L) Supported controls: - by V4L: Contrast, Brightness, Color, Hue - by driver options: frame rate, lighting conditions, video format, - default picture settings, sharpness. + default picture settings, sharpness. SUPPORTED CAMERAS: @@ -191,66 +191,66 @@ init_model2_sat Integer 0..255 [0x34] init_model2_sat=65 init_model2_yb Integer 0..255 [0xa0] init_model2_yb=200 debug You don't need this option unless you are a developer. - If you are a developer then you will see in the code - what values do what. 0=off. + If you are a developer then you will see in the code + what values do what. 0=off. flags This is a bit mask, and you can combine any number of - bits to produce what you want. Usually you don't want - any of extra features this option provides: - - FLAGS_RETRY_VIDIOCSYNC 1 This bit allows to retry failed - VIDIOCSYNC ioctls without failing. - Will work with xawtv, will not - with xrealproducer. Default is - not set. - FLAGS_MONOCHROME 2 Activates monochrome (b/w) mode. - FLAGS_DISPLAY_HINTS 4 Shows colored pixels which have - magic meaning to developers. - FLAGS_OVERLAY_STATS 8 Shows tiny numbers on screen, - useful only for debugging. - FLAGS_FORCE_TESTPATTERN 16 Shows blue screen with numbers. - FLAGS_SEPARATE_FRAMES 32 Shows each frame separately, as - it was received from the camera. - Default (not set) is to mix the - preceding frame in to compensate - for occasional loss of Isoc data - on high frame rates. - FLAGS_CLEAN_FRAMES 64 Forces "cleanup" of each frame - prior to use; relevant only if - FLAGS_SEPARATE_FRAMES is set. - Default is not to clean frames, - this is a little faster but may - produce flicker if frame rate is - too high and Isoc data gets lost. - FLAGS_NO_DECODING 128 This flag turns the video stream - decoder off, and dumps the raw - Isoc data from the camera into - the reading process. Useful to - developers, but not to users. + bits to produce what you want. Usually you don't want + any of extra features this option provides: + + FLAGS_RETRY_VIDIOCSYNC 1 This bit allows to retry failed + VIDIOCSYNC ioctls without failing. + Will work with xawtv, will not + with xrealproducer. Default is + not set. + FLAGS_MONOCHROME 2 Activates monochrome (b/w) mode. + FLAGS_DISPLAY_HINTS 4 Shows colored pixels which have + magic meaning to developers. + FLAGS_OVERLAY_STATS 8 Shows tiny numbers on screen, + useful only for debugging. + FLAGS_FORCE_TESTPATTERN 16 Shows blue screen with numbers. + FLAGS_SEPARATE_FRAMES 32 Shows each frame separately, as + it was received from the camera. + Default (not set) is to mix the + preceding frame in to compensate + for occasional loss of Isoc data + on high frame rates. + FLAGS_CLEAN_FRAMES 64 Forces "cleanup" of each frame + prior to use; relevant only if + FLAGS_SEPARATE_FRAMES is set. + Default is not to clean frames, + this is a little faster but may + produce flicker if frame rate is + too high and Isoc data gets lost. + FLAGS_NO_DECODING 128 This flag turns the video stream + decoder off, and dumps the raw + Isoc data from the camera into + the reading process. Useful to + developers, but not to users. framerate This setting controls frame rate of the camera. This is - an approximate setting (in terms of "worst" ... "best") - because camera changes frame rate depending on amount - of light available. Setting 0 is slowest, 6 is fastest. - Beware - fast settings are very demanding and may not - work well with all video sizes. Be conservative. + an approximate setting (in terms of "worst" ... "best") + because camera changes frame rate depending on amount + of light available. Setting 0 is slowest, 6 is fastest. + Beware - fast settings are very demanding and may not + work well with all video sizes. Be conservative. hue_correction This highly optional setting allows to adjust the - hue of the image in a way slightly different from - what usual "hue" control does. Both controls affect - YUV colorspace: regular "hue" control adjusts only - U component, and this "hue_correction" option similarly - adjusts only V component. However usually it is enough - to tweak only U or V to compensate for colored light or - color temperature; this option simply allows more - complicated correction when and if it is necessary. + hue of the image in a way slightly different from + what usual "hue" control does. Both controls affect + YUV colorspace: regular "hue" control adjusts only + U component, and this "hue_correction" option similarly + adjusts only V component. However usually it is enough + to tweak only U or V to compensate for colored light or + color temperature; this option simply allows more + complicated correction when and if it is necessary. init_brightness These settings specify _initial_ values which will be init_contrast used to set up the camera. If your V4L application has init_color its own controls to adjust the picture then these init_hue controls will be used too. These options allow you to - preconfigure the camera when it gets connected, before - any V4L application connects to it. Good for webcams. + preconfigure the camera when it gets connected, before + any V4L application connects to it. Good for webcams. init_model2_rg These initial settings alter color balance of the init_model2_rg2 camera on hardware level. All four settings may be used @@ -258,47 +258,47 @@ init_model2_sat to tune the camera to specific lighting conditions. These init_model2_yb settings only apply to Model 2 cameras. lighting This option selects one of three hardware-defined - photosensitivity settings of the camera. 0=bright light, - 1=Medium (default), 2=Low light. This setting affects - frame rate: the dimmer the lighting the lower the frame - rate (because longer exposition time is needed). The - Model 2 cameras allow values more than 2 for this option, - thus enabling extremely high sensitivity at cost of frame - rate, color saturation and imaging sensor noise. + photosensitivity settings of the camera. 0=bright light, + 1=Medium (default), 2=Low light. This setting affects + frame rate: the dimmer the lighting the lower the frame + rate (because longer exposition time is needed). The + Model 2 cameras allow values more than 2 for this option, + thus enabling extremely high sensitivity at cost of frame + rate, color saturation and imaging sensor noise. sharpness This option controls smoothing (noise reduction) - made by camera. Setting 0 is most smooth, setting 6 - is most sharp. Be aware that CMOS sensor used in the - camera is pretty noisy, so if you choose 6 you will - be greeted with "snowy" image. Default is 4. Model 2 - cameras do not support this feature. + made by camera. Setting 0 is most smooth, setting 6 + is most sharp. Be aware that CMOS sensor used in the + camera is pretty noisy, so if you choose 6 you will + be greeted with "snowy" image. Default is 4. Model 2 + cameras do not support this feature. size This setting chooses one of several image sizes that are - supported by this driver. Cameras may support more, but - it's difficult to reverse-engineer all formats. - Following video sizes are supported: - - size=0 128x96 (Model 1 only) - size=1 160x120 - size=2 176x144 - size=3 320x240 (Model 2 only) - size=4 352x240 (Model 2 only) - size=5 352x288 - size=6 640x480 (Model 3 only) - - The 352x288 is the native size of the Model 1 sensor - array, so it's the best resolution the camera can - yield. The best resolution of Model 2 is 176x144, and - larger images are produced by stretching the bitmap. - Model 3 has sensor with 640x480 grid, and it works too, - but the frame rate will be exceptionally low (1-2 FPS); - it may be still OK for some applications, like security. - Choose the image size you need. The smaller image can - support faster frame rate. Default is 352x288. + supported by this driver. Cameras may support more, but + it's difficult to reverse-engineer all formats. + Following video sizes are supported: + + size=0 128x96 (Model 1 only) + size=1 160x120 + size=2 176x144 + size=3 320x240 (Model 2 only) + size=4 352x240 (Model 2 only) + size=5 352x288 + size=6 640x480 (Model 3 only) + + The 352x288 is the native size of the Model 1 sensor + array, so it's the best resolution the camera can + yield. The best resolution of Model 2 is 176x144, and + larger images are produced by stretching the bitmap. + Model 3 has sensor with 640x480 grid, and it works too, + but the frame rate will be exceptionally low (1-2 FPS); + it may be still OK for some applications, like security. + Choose the image size you need. The smaller image can + support faster frame rate. Default is 352x288. For more information and the Troubleshooting FAQ visit this URL: - http://www.linux-usb.org/ibmcam/ + http://www.linux-usb.org/ibmcam/ WHAT NEEDS TO BE DONE: diff --git a/Documentation/video4linux/ov511.txt b/Documentation/video4linux/ov511.txt index 79af610d4..142741e3c 100644 --- a/Documentation/video4linux/ov511.txt +++ b/Documentation/video4linux/ov511.txt @@ -81,7 +81,7 @@ MODULE PARAMETERS: TYPE: integer (Boolean) DEFAULT: 1 DESC: Brightness is normally under automatic control and can't be set - manually by the video app. Set to 0 for manual control. + manually by the video app. Set to 0 for manual control. NAME: autogain TYPE: integer (Boolean) @@ -97,13 +97,13 @@ MODULE PARAMETERS: TYPE: integer (0-6) DEFAULT: 3 DESC: Sets the threshold for printing debug messages. The higher the value, - the more is printed. The levels are cumulative, and are as follows: - 0=no debug messages - 1=init/detection/unload and other significant messages - 2=some warning messages - 3=config/control function calls - 4=most function calls and data parsing messages - 5=highly repetitive mesgs + the more is printed. The levels are cumulative, and are as follows: + 0=no debug messages + 1=init/detection/unload and other significant messages + 2=some warning messages + 3=config/control function calls + 4=most function calls and data parsing messages + 5=highly repetitive mesgs NAME: snapshot TYPE: integer (Boolean) @@ -116,24 +116,24 @@ MODULE PARAMETERS: TYPE: integer (1-4 for OV511, 1-31 for OV511+) DEFAULT: 1 DESC: Number of cameras allowed to stream simultaneously on a single bus. - Values higher than 1 reduce the data rate of each camera, allowing two - or more to be used at once. If you have a complicated setup involving - both OV511 and OV511+ cameras, trial-and-error may be necessary for - finding the optimum setting. + Values higher than 1 reduce the data rate of each camera, allowing two + or more to be used at once. If you have a complicated setup involving + both OV511 and OV511+ cameras, trial-and-error may be necessary for + finding the optimum setting. NAME: compress TYPE: integer (Boolean) DEFAULT: 0 DESC: Set this to 1 to turn on the camera's compression engine. This can - potentially increase the frame rate at the expense of quality, if you - have a fast CPU. You must load the proper compression module for your - camera before starting your application (ov511_decomp or ov518_decomp). + potentially increase the frame rate at the expense of quality, if you + have a fast CPU. You must load the proper compression module for your + camera before starting your application (ov511_decomp or ov518_decomp). NAME: testpat TYPE: integer (Boolean) DEFAULT: 0 DESC: This configures the camera's sensor to transmit a colored test-pattern - instead of an image. This does not work correctly yet. + instead of an image. This does not work correctly yet. NAME: dumppix TYPE: integer (0-2) diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt index 1d20895b4..142920bc0 100644 --- a/Documentation/video4linux/sn9c102.txt +++ b/Documentation/video4linux/sn9c102.txt @@ -1,9 +1,9 @@ - SN9C10x PC Camera Controllers - Driver for Linux - ============================= + SN9C10x PC Camera Controllers + Driver for Linux + ============================= - - Documentation - + - Documentation - Index @@ -176,46 +176,46 @@ Name: video_nr Type: short array (min = 0, max = 64) Syntax: <-1|n[,...]> Description: Specify V4L2 minor mode number: - -1 = use next available - n = use minor number n - You can specify up to 64 cameras this way. - For example: - video_nr=-1,2,-1 would assign minor number 2 to the second - recognized camera and use auto for the first one and for every - other camera. + -1 = use next available + n = use minor number n + You can specify up to 64 cameras this way. + For example: + video_nr=-1,2,-1 would assign minor number 2 to the second + recognized camera and use auto for the first one and for every + other camera. Default: -1 ------------------------------------------------------------------------------- Name: force_munmap Type: bool array (min = 0, max = 64) Syntax: <0|1[,...]> Description: Force the application to unmap previously mapped buffer memory - before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not - all the applications support this feature. This parameter is - specific for each detected camera. - 0 = do not force memory unmapping - 1 = force memory unmapping (save memory) + before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not + all the applications support this feature. This parameter is + specific for each detected camera. + 0 = do not force memory unmapping + 1 = force memory unmapping (save memory) Default: 0 ------------------------------------------------------------------------------- Name: frame_timeout Type: uint array (min = 0, max = 64) Syntax: Description: Timeout for a video frame in seconds. This parameter is - specific for each detected camera. This parameter can be - changed at runtime thanks to the /sys filesystem interface. + specific for each detected camera. This parameter can be + changed at runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- Name: debug Type: ushort Syntax: Description: Debugging information level, from 0 to 3: - 0 = none (use carefully) - 1 = critical errors - 2 = significant informations - 3 = more verbose messages - Level 3 is useful for testing only, when only one device - is used. It also shows some more informations about the - hardware being detected. This parameter can be changed at - runtime thanks to the /sys filesystem interface. + 0 = none (use carefully) + 1 = critical errors + 2 = significant informations + 3 = more verbose messages + Level 3 is useful for testing only, when only one device + is used. It also shows some more informations about the + hardware being detected. This parameter can be changed at + runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- @@ -280,24 +280,24 @@ Byte # Value Description 0x04 0xC4 Frame synchronisation pattern. 0x05 0x96 Frame synchronisation pattern. 0x06 0xXX Unknown meaning. The exact value depends on the chip; - possible values are 0x00, 0x01 and 0x20. + possible values are 0x00, 0x01 and 0x20. 0x07 0xXX Variable value, whose bits are ff00uzzc, where ff is a - frame counter, u is unknown, zz is a size indicator - (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for - "compression enabled" (1 = yes, 0 = no). + frame counter, u is unknown, zz is a size indicator + (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for + "compression enabled" (1 = yes, 0 = no). 0x08 0xXX Brightness sum inside Auto-Exposure area (low-byte). 0x09 0xXX Brightness sum inside Auto-Exposure area (high-byte). - For a pure white image, this number will be equal to 500 - times the area of the specified AE area. For images - that are not pure white, the value scales down according - to relative whiteness. + For a pure white image, this number will be equal to 500 + times the area of the specified AE area. For images + that are not pure white, the value scales down according + to relative whiteness. 0x0A 0xXX Brightness sum outside Auto-Exposure area (low-byte). 0x0B 0xXX Brightness sum outside Auto-Exposure area (high-byte). - For a pure white image, this number will be equal to 125 - times the area outside of the specified AE area. For - images that are not pure white, the value scales down - according to relative whiteness. - according to relative whiteness. + For a pure white image, this number will be equal to 125 + times the area outside of the specified AE area. For + images that are not pure white, the value scales down + according to relative whiteness. + according to relative whiteness. The following bytes are used by the SN9C103 bridge only: diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c deleted file mode 100644 index 079b62848..000000000 --- a/Documentation/video4linux/v4lgrab.c +++ /dev/null @@ -1,192 +0,0 @@ -/* Simple Video4Linux image grabber. */ -/* - * Video4Linux Driver Test/Example Framegrabbing Program - * - * Compile with: - * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab - * Use as: - * v4lgrab >image.ppm - * - * Copyright (C) 1998-05-03, Phil Blundell - * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c - * with minor modifications (Dave Forrest, drf5n@virginia.edu). - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define FILE "/dev/video0" - -/* Stole this from tvset.c */ - -#define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ -{ \ - switch (format) \ - { \ - case VIDEO_PALETTE_GREY: \ - switch (depth) \ - { \ - case 4: \ - case 6: \ - case 8: \ - (r) = (g) = (b) = (*buf++ << 8);\ - break; \ - \ - case 16: \ - (r) = (g) = (b) = \ - *((unsigned short *) buf); \ - buf += 2; \ - break; \ - } \ - break; \ - \ - \ - case VIDEO_PALETTE_RGB565: \ - { \ - unsigned short tmp = *(unsigned short *)buf; \ - (r) = tmp&0xF800; \ - (g) = (tmp<<5)&0xFC00; \ - (b) = (tmp<<11)&0xF800; \ - buf += 2; \ - } \ - break; \ - \ - case VIDEO_PALETTE_RGB555: \ - (r) = (buf[0]&0xF8)<<8; \ - (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ - (b) = ((buf[1] << 2 ) & 0xF8)<<8; \ - buf += 2; \ - break; \ - \ - case VIDEO_PALETTE_RGB24: \ - (r) = buf[0] << 8; (g) = buf[1] << 8; \ - (b) = buf[2] << 8; \ - buf += 3; \ - break; \ - \ - default: \ - fprintf(stderr, \ - "Format %d not yet supported\n", \ - format); \ - } \ -} - -int get_brightness_adj(unsigned char *image, long size, int *brightness) { - long i, tot = 0; - for (i=0;i= 126 && (tot/(size*3)) <= 130); -} - -int main(int argc, char ** argv) -{ - int fd = open(FILE, O_RDONLY), f; - struct video_capability cap; - struct video_window win; - struct video_picture vpic; - - unsigned char *buffer, *src; - int bpp = 24, r, g, b; - unsigned int i, src_depth; - - if (fd < 0) { - perror(FILE); - exit(1); - } - - if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { - perror("VIDIOGCAP"); - fprintf(stderr, "(" FILE " not a video4linux device?)\n"); - close(fd); - exit(1); - } - - if (ioctl(fd, VIDIOCGWIN, &win) < 0) { - perror("VIDIOCGWIN"); - close(fd); - exit(1); - } - - if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) { - perror("VIDIOCGPICT"); - close(fd); - exit(1); - } - - if (cap.type & VID_TYPE_MONOCHROME) { - vpic.depth=8; - vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */ - if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { - vpic.depth=6; - if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { - vpic.depth=4; - if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { - fprintf(stderr, "Unable to find a supported capture format.\n"); - close(fd); - exit(1); - } - } - } - } else { - vpic.depth=24; - vpic.palette=VIDEO_PALETTE_RGB24; - - if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { - vpic.palette=VIDEO_PALETTE_RGB565; - vpic.depth=16; - - if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { - vpic.palette=VIDEO_PALETTE_RGB555; - vpic.depth=15; - - if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { - fprintf(stderr, "Unable to find a supported capture format.\n"); - return -1; - } - } - } - } - - buffer = malloc(win.width * win.height * bpp); - if (!buffer) { - fprintf(stderr, "Out of memory.\n"); - exit(1); - } - - do { - int newbright; - read(fd, buffer, win.width * win.height * bpp); - f = get_brightness_adj(buffer, win.width * win.height, &newbright); - if (f) { - vpic.brightness += (newbright << 8); - if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { - perror("VIDIOSPICT"); - break; - } - } - } while (f); - - fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height); - - src = buffer; - - for (i = 0; i < win.width * win.height; i++) { - READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b); - fputc(r>>8, stdout); - fputc(g>>8, stdout); - fputc(b>>8, stdout); - } - - close(fd); - return 0; -} diff --git a/Documentation/video4linux/w9968cf.txt b/Documentation/video4linux/w9968cf.txt index 0d53ce774..3b704f2aa 100644 --- a/Documentation/video4linux/w9968cf.txt +++ b/Documentation/video4linux/w9968cf.txt @@ -1,9 +1,9 @@ - W996[87]CF JPEG USB Dual Mode Camera Chip - Driver for Linux 2.6 (basic version) - ========================================= + W996[87]CF JPEG USB Dual Mode Camera Chip + Driver for Linux 2.6 (basic version) + ========================================= - - Documentation - + - Documentation - Index @@ -188,57 +188,57 @@ Name: ovmod_load Type: bool Syntax: <0|1> Description: Automatic 'ovcamchip' module loading: 0 disabled, 1 enabled. - If enabled, 'insmod' searches for the required 'ovcamchip' - module in the system, according to its configuration, and - loads that module automatically. This action is performed as - once soon as the 'w9968cf' module is loaded into memory. + If enabled, 'insmod' searches for the required 'ovcamchip' + module in the system, according to its configuration, and + loads that module automatically. This action is performed as + once soon as the 'w9968cf' module is loaded into memory. Default: 1 Note: The kernel must be compiled with the CONFIG_KMOD option - enabled for the 'ovcamchip' module to be loaded and for - this parameter to be present. + enabled for the 'ovcamchip' module to be loaded and for + this parameter to be present. ------------------------------------------------------------------------------- Name: simcams Type: int Syntax: Description: Number of cameras allowed to stream simultaneously. - n may vary from 0 to 32. + n may vary from 0 to 32. Default: 32 ------------------------------------------------------------------------------- Name: video_nr Type: int array (min = 0, max = 32) Syntax: <-1|n[,...]> Description: Specify V4L minor mode number. - -1 = use next available - n = use minor number n - You can specify up to 32 cameras this way. - For example: - video_nr=-1,2,-1 would assign minor number 2 to the second - recognized camera and use auto for the first one and for every - other camera. + -1 = use next available + n = use minor number n + You can specify up to 32 cameras this way. + For example: + video_nr=-1,2,-1 would assign minor number 2 to the second + recognized camera and use auto for the first one and for every + other camera. Default: -1 ------------------------------------------------------------------------------- Name: packet_size Type: int array (min = 0, max = 32) Syntax: Description: Specify the maximum data payload size in bytes for alternate - settings, for each device. n is scaled between 63 and 1023. + settings, for each device. n is scaled between 63 and 1023. Default: 1023 ------------------------------------------------------------------------------- Name: max_buffers Type: int array (min = 0, max = 32) Syntax: Description: For advanced users. - Specify the maximum number of video frame buffers to allocate - for each device, from 2 to 32. + Specify the maximum number of video frame buffers to allocate + for each device, from 2 to 32. Default: 2 ------------------------------------------------------------------------------- Name: double_buffer Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Hardware double buffering: 0 disabled, 1 enabled. - It should be enabled if you want smooth video output: if you - obtain out of sync. video, disable it, or try to - decrease the 'clockdiv' module parameter value. + It should be enabled if you want smooth video output: if you + obtain out of sync. video, disable it, or try to + decrease the 'clockdiv' module parameter value. Default: 1 for every device. ------------------------------------------------------------------------------- Name: clamping @@ -251,9 +251,9 @@ Name: filter_type Type: int array (min = 0, max = 32) Syntax: <0|1|2[,...]> Description: Video filter type. - 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter. - The filter is used to reduce noise and aliasing artifacts - produced by the CCD or CMOS image sensor. + 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter. + The filter is used to reduce noise and aliasing artifacts + produced by the CCD or CMOS image sensor. Default: 0 for every device. ------------------------------------------------------------------------------- Name: largeview @@ -266,9 +266,9 @@ Name: upscaling Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Software scaling (for non-compressed video only): - 0 disabled, 1 enabled. - Disable it if you have a slow CPU or you don't have enough - memory. + 0 disabled, 1 enabled. + Disable it if you have a slow CPU or you don't have enough + memory. Default: 0 for every device. Note: If 'w9968cf-vpp' is not present, this parameter is set to 0. ------------------------------------------------------------------------------- @@ -276,36 +276,36 @@ Name: decompression Type: int array (min = 0, max = 32) Syntax: <0|1|2[,...]> Description: Software video decompression: - 0 = disables decompression - (doesn't allow formats needing decompression). - 1 = forces decompression - (allows formats needing decompression only). - 2 = allows any permitted formats. - Formats supporting (de)compressed video are YUV422P and - YUV420P/YUV420 in any resolutions where width and height are - multiples of 16. + 0 = disables decompression + (doesn't allow formats needing decompression). + 1 = forces decompression + (allows formats needing decompression only). + 2 = allows any permitted formats. + Formats supporting (de)compressed video are YUV422P and + YUV420P/YUV420 in any resolutions where width and height are + multiples of 16. Default: 2 for every device. Note: If 'w9968cf-vpp' is not present, forcing decompression is not - allowed; in this case this parameter is set to 2. + allowed; in this case this parameter is set to 2. ------------------------------------------------------------------------------- Name: force_palette Type: int array (min = 0, max = 32) Syntax: <0|9|10|13|15|8|7|1|6|3|4|5[,...]> Description: Force picture palette. - In order: - 0 = Off - allows any of the following formats: - 9 = UYVY 16 bpp - Original video, compression disabled - 10 = YUV420 12 bpp - Original video, compression enabled - 13 = YUV422P 16 bpp - Original video, compression enabled - 15 = YUV420P 12 bpp - Original video, compression enabled - 8 = YUVY 16 bpp - Software conversion from UYVY - 7 = YUV422 16 bpp - Software conversion from UYVY - 1 = GREY 8 bpp - Software conversion from UYVY - 6 = RGB555 16 bpp - Software conversion from UYVY - 3 = RGB565 16 bpp - Software conversion from UYVY - 4 = RGB24 24 bpp - Software conversion from UYVY - 5 = RGB32 32 bpp - Software conversion from UYVY - When not 0, this parameter will override 'decompression'. + In order: + 0 = Off - allows any of the following formats: + 9 = UYVY 16 bpp - Original video, compression disabled + 10 = YUV420 12 bpp - Original video, compression enabled + 13 = YUV422P 16 bpp - Original video, compression enabled + 15 = YUV420P 12 bpp - Original video, compression enabled + 8 = YUVY 16 bpp - Software conversion from UYVY + 7 = YUV422 16 bpp - Software conversion from UYVY + 1 = GREY 8 bpp - Software conversion from UYVY + 6 = RGB555 16 bpp - Software conversion from UYVY + 3 = RGB565 16 bpp - Software conversion from UYVY + 4 = RGB24 24 bpp - Software conversion from UYVY + 5 = RGB32 32 bpp - Software conversion from UYVY + When not 0, this parameter will override 'decompression'. Default: 0 for every device. Initial palette is 9 (UYVY). Note: If 'w9968cf-vpp' is not present, this parameter is set to 9. ------------------------------------------------------------------------------- @@ -313,77 +313,77 @@ Name: force_rgb Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Read RGB video data instead of BGR: - 1 = use RGB component ordering. - 0 = use BGR component ordering. - This parameter has effect when using RGBX palettes only. + 1 = use RGB component ordering. + 0 = use BGR component ordering. + This parameter has effect when using RGBX palettes only. Default: 0 for every device. ------------------------------------------------------------------------------- Name: autobright Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Image sensor automatically changes brightness: - 0 = no, 1 = yes + 0 = no, 1 = yes Default: 0 for every device. ------------------------------------------------------------------------------- Name: autoexp Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Image sensor automatically changes exposure: - 0 = no, 1 = yes + 0 = no, 1 = yes Default: 1 for every device. ------------------------------------------------------------------------------- Name: lightfreq Type: int array (min = 0, max = 32) Syntax: <50|60[,...]> Description: Light frequency in Hz: - 50 for European and Asian lighting, 60 for American lighting. + 50 for European and Asian lighting, 60 for American lighting. Default: 50 for every device. ------------------------------------------------------------------------------- Name: bandingfilter Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Banding filter to reduce effects of fluorescent - lighting: - 0 disabled, 1 enabled. - This filter tries to reduce the pattern of horizontal - light/dark bands caused by some (usually fluorescent) lighting. + lighting: + 0 disabled, 1 enabled. + This filter tries to reduce the pattern of horizontal + light/dark bands caused by some (usually fluorescent) lighting. Default: 0 for every device. ------------------------------------------------------------------------------- Name: clockdiv Type: int array (min = 0, max = 32) Syntax: <-1|n[,...]> Description: Force pixel clock divisor to a specific value (for experts): - n may vary from 0 to 127. - -1 for automatic value. - See also the 'double_buffer' module parameter. + n may vary from 0 to 127. + -1 for automatic value. + See also the 'double_buffer' module parameter. Default: -1 for every device. ------------------------------------------------------------------------------- Name: backlight Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Objects are lit from behind: - 0 = no, 1 = yes + 0 = no, 1 = yes Default: 0 for every device. ------------------------------------------------------------------------------- Name: mirror Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: Reverse image horizontally: - 0 = no, 1 = yes + 0 = no, 1 = yes Default: 0 for every device. ------------------------------------------------------------------------------- Name: monochrome Type: bool array (min = 0, max = 32) Syntax: <0|1[,...]> Description: The image sensor is monochrome: - 0 = no, 1 = yes + 0 = no, 1 = yes Default: 0 for every device. ------------------------------------------------------------------------------- Name: brightness Type: long array (min = 0, max = 32) Syntax: Description: Set picture brightness (0-65535). - This parameter has no effect if 'autobright' is enabled. + This parameter has no effect if 'autobright' is enabled. Default: 31000 for every device. ------------------------------------------------------------------------------- Name: hue @@ -414,23 +414,23 @@ Name: debug Type: int Syntax: Description: Debugging information level, from 0 to 6: - 0 = none (use carefully) - 1 = critical errors - 2 = significant informations - 3 = configuration or general messages - 4 = warnings - 5 = called functions - 6 = function internals - Level 5 and 6 are useful for testing only, when only one - device is used. + 0 = none (use carefully) + 1 = critical errors + 2 = significant informations + 3 = configuration or general messages + 4 = warnings + 5 = called functions + 6 = function internals + Level 5 and 6 are useful for testing only, when only one + device is used. Default: 2 ------------------------------------------------------------------------------- Name: specific_debug Type: bool Syntax: <0|1> Description: Enable or disable specific debugging messages: - 0 = print messages concerning every level <= 'debug' level. - 1 = print messages concerning the level indicated by 'debug'. + 0 = print messages concerning every level <= 'debug' level. + 1 = print messages concerning the level indicated by 'debug'. Default: 0 ------------------------------------------------------------------------------- diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt index f406f5e80..f55262c67 100644 --- a/Documentation/video4linux/zc0301.txt +++ b/Documentation/video4linux/zc0301.txt @@ -1,9 +1,9 @@ - ZC0301 and ZC0301P Image Processor and Control Chip - Driver for Linux - =================================================== + ZC0301 Image Processor and Control Chip + Driver for Linux + ======================================= - - Documentation - + - Documentation - Index @@ -51,13 +51,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 4. Overview and features ======================== -This driver supports the video interface of the devices mounting the ZC0301 or -ZC0301P Image Processors and Control Chips. +This driver supports the video interface of the devices mounting the ZC0301 +Image Processor and Control Chip. The driver relies on the Video4Linux2 and USB core modules. It has been designed to run properly on SMP systems as well. -The latest version of the ZC0301[P] driver can be found at the following URL: +The latest version of the ZC0301 driver can be found at the following URL: http://www.linux-projects.org/ Some of the features of the driver are: @@ -117,7 +117,7 @@ supported by the USB Audio driver thanks to the ALSA API: And finally: - # V4L USB devices + # USB Multimedia devices # CONFIG_USB_ZC0301=m @@ -146,46 +146,46 @@ Name: video_nr Type: short array (min = 0, max = 64) Syntax: <-1|n[,...]> Description: Specify V4L2 minor mode number: - -1 = use next available - n = use minor number n - You can specify up to 64 cameras this way. - For example: - video_nr=-1,2,-1 would assign minor number 2 to the second - registered camera and use auto for the first one and for every - other camera. + -1 = use next available + n = use minor number n + You can specify up to 64 cameras this way. + For example: + video_nr=-1,2,-1 would assign minor number 2 to the second + registered camera and use auto for the first one and for every + other camera. Default: -1 ------------------------------------------------------------------------------- Name: force_munmap Type: bool array (min = 0, max = 64) Syntax: <0|1[,...]> Description: Force the application to unmap previously mapped buffer memory - before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not - all the applications support this feature. This parameter is - specific for each detected camera. - 0 = do not force memory unmapping - 1 = force memory unmapping (save memory) + before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not + all the applications support this feature. This parameter is + specific for each detected camera. + 0 = do not force memory unmapping + 1 = force memory unmapping (save memory) Default: 0 ------------------------------------------------------------------------------- Name: frame_timeout Type: uint array (min = 0, max = 64) Syntax: Description: Timeout for a video frame in seconds. This parameter is - specific for each detected camera. This parameter can be - changed at runtime thanks to the /sys filesystem interface. + specific for each detected camera. This parameter can be + changed at runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- Name: debug Type: ushort Syntax: Description: Debugging information level, from 0 to 3: - 0 = none (use carefully) - 1 = critical errors - 2 = significant informations - 3 = more verbose messages - Level 3 is useful for testing only, when only one device - is used at the same time. It also shows some more informations - about the hardware being detected. This module parameter can be - changed at runtime thanks to the /sys filesystem interface. + 0 = none (use carefully) + 1 = critical errors + 2 = significant informations + 3 = more verbose messages + Level 3 is useful for testing only, when only one device + is used at the same time. It also shows some more informations + about the hardware being detected. This module parameter can be + changed at runtime thanks to the /sys filesystem interface. Default: 2 ------------------------------------------------------------------------------- @@ -204,25 +204,11 @@ Vendor ID Product ID 0x041e 0x4017 0x041e 0x401c 0x041e 0x401e -0x041e 0x401f -0x041e 0x4022 0x041e 0x4034 0x041e 0x4035 -0x041e 0x4036 -0x041e 0x403a -0x0458 0x7007 -0x0458 0x700C -0x0458 0x700f -0x046d 0x08ae -0x055f 0xd003 -0x055f 0xd004 0x046d 0x08ae 0x0ac8 0x0301 -0x0ac8 0x301b -0x0ac8 0x303b -0x10fd 0x0128 0x10fd 0x8050 -0x10fd 0x804e The list above does not imply that all those devices work with this driver: up until now only the ones that mount the following image sensors are supported; @@ -231,7 +217,6 @@ kernel messages will always tell you whether this is the case: Model Manufacturer ----- ------------ PAS202BCB PixArt Imaging, Inc. -PB-0330 Photobit Corporation 9. Notes for V4L2 application developers @@ -265,6 +250,5 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4'. been taken from the documentation of the ZC030x Video4Linux1 driver written by Andrew Birkett ; - The initialization values of the ZC0301 controller connected to the PAS202BCB - and PB-0330 image sensors have been taken from the SPCA5XX driver maintained - by Michel Xhaard ; -- Stanislav Lechev donated one camera. + image sensor have been taken from the SPCA5XX driver maintained by + Michel Xhaard . diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration index 99f89aa10..0dd4ef30c 100644 --- a/Documentation/vm/page_migration +++ b/Documentation/vm/page_migration @@ -26,13 +26,8 @@ a process are located. See also the numa_maps manpage in the numactl package. Manual migration is useful if for example the scheduler has relocated a process to a processor on a distant node. A batch scheduler or an administrator may detect the situation and move the pages of the process -nearer to the new processor. The kernel itself does only provide -manual page migration support. Automatic page migration may be implemented -through user space processes that move pages. A special function call -"move_pages" allows the moving of individual pages within a process. -A NUMA profiler may f.e. obtain a log showing frequent off node -accesses and may use the result to move pages to more advantageous -locations. +nearer to the new processor. At some point in the future we may have +some mechanism in the scheduler that will automatically move the pages. Larger installations usually partition the system using cpusets into sections of nodes. Paul Jackson has equipped cpusets with the ability to @@ -67,14 +62,22 @@ A. In kernel use of migrate_pages() It also prevents the swapper or other scans to encounter the page. -2. We need to have a function of type new_page_t that can be - passed to migrate_pages(). This function should figure out - how to allocate the correct new page given the old page. +2. Generate a list of newly allocates page. These pages will contain the + contents of the pages from the first list after page migration is + complete. 3. The migrate_pages() function is called which attempts - to do the migration. It will call the function to allocate - the new page for each page that is considered for - moving. + to do the migration. It returns the moved pages in the + list specified as the third parameter and the failed + migrations in the fourth parameter. The first parameter + will contain the pages that could still be retried. + +4. The leftover pages of various types are returned + to the LRU using putback_to_lru_pages() or otherwise + disposed of. The pages will still have the refcount as + increased by isolate_lru_pages() if putback_to_lru_pages() is not + used! The kernel may want to handle the various cases of failures in + different ways. B. How migrate_pages() works ---------------------------- @@ -90,58 +93,83 @@ Steps: 2. Insure that writeback is complete. -3. Prep the new page that we want to move to. It is locked +3. Make sure that the page has assigned swap cache entry if + it is an anonyous page. The swap cache reference is necessary + to preserve the information contain in the page table maps while + page migration occurs. + +4. Prep the new page that we want to move to. It is locked and set to not being uptodate so that all accesses to the new page immediately lock while the move is in progress. -4. The new page is prepped with some settings from the old page so that - accesses to the new page will discover a page with the correct settings. - -5. All the page table references to the page are converted - to migration entries or dropped (nonlinear vmas). - This decrease the mapcount of a page. If the resulting - mapcount is not zero then we do not migrate the page. - All user space processes that attempt to access the page - will now wait on the page lock. +5. All the page table references to the page are either dropped (file + backed pages) or converted to swap references (anonymous pages). + This should decrease the reference count. 6. The radix tree lock is taken. This will cause all processes trying - to access the page via the mapping to block on the radix tree spinlock. + to reestablish a pte to block on the radix tree spinlock. 7. The refcount of the page is examined and we back out if references remain otherwise we know that we are the only one referencing this page. 8. The radix tree is checked and if it does not contain the pointer to this - page then we back out because someone else modified the radix tree. + page then we back out because someone else modified the mapping first. + +9. The mapping is checked. If the mapping is gone then a truncate action may + be in progress and we back out. + +10. The new page is prepped with some settings from the old page so that + accesses to the new page will be discovered to have the correct settings. -9. The radix tree is changed to point to the new page. +11. The radix tree is changed to point to the new page. -10. The reference count of the old page is dropped because the radix tree - reference is gone. A reference to the new page is established because - the new page is referenced to by the radix tree. +12. The reference count of the old page is dropped because the radix tree + reference is gone. -11. The radix tree lock is dropped. With that lookups in the mapping - become possible again. Processes will move from spinning on the tree_lock - to sleeping on the locked new page. +13. The radix tree lock is dropped. With that lookups become possible again + and other processes will move from spinning on the tree lock to sleeping on + the locked new page. -12. The page contents are copied to the new page. +14. The page contents are copied to the new page. -13. The remaining page flags are copied to the new page. +15. The remaining page flags are copied to the new page. -14. The old page flags are cleared to indicate that the page does - not provide any information anymore. +16. The old page flags are cleared to indicate that the page does + not use any information anymore. -15. Queued up writeback on the new page is triggered. +17. Queued up writeback on the new page is triggered. -16. If migration entries were page then replace them with real ptes. Doing - so will enable access for user space processes not already waiting for - the page lock. +18. If swap pte's were generated for the page then replace them with real + ptes. This will reenable access for processes not blocked by the page lock. 19. The page locks are dropped from the old and new page. - Processes waiting on the page lock will redo their page faults - and will reach the new page. + Processes waiting on the page lock can continue. 20. The new page is moved to the LRU and can be scanned by the swapper etc again. -Christoph Lameter, May 8, 2006. +TODO list +--------- + +- Page migration requires the use of swap handles to preserve the + information of the anonymous page table entries. This means that swap + space is reserved but never used. The maximum number of swap handles used + is determined by CHUNK_SIZE (see mm/mempolicy.c) per ongoing migration. + Reservation of pages could be avoided by having a special type of swap + handle that does not require swap space and that would only track the page + references. Something like that was proposed by Marcelo Tosatti in the + past (search for migration cache on lkml or linux-mm@kvack.org). + +- Page migration unmaps ptes for file backed pages and requires page + faults to reestablish these ptes. This could be optimized by somehow + recording the references before migration and then reestablish them later. + However, there are several locking challenges that have to be overcome + before this is possible. + +- Page migration generates read ptes for anonymous pages. Dirty page + faults are required to make the pages writable again. It may be possible + to generate a pte marked dirty if it is known that the page is dirty and + that this process has the only reference to that page. + +Christoph Lameter, March 8, 2006. diff --git a/Documentation/w1/masters/ds2490 b/Documentation/w1/masters/ds2490 deleted file mode 100644 index 44a4918bd..000000000 --- a/Documentation/w1/masters/ds2490 +++ /dev/null @@ -1,18 +0,0 @@ -Kernel driver ds2490 -==================== - -Supported chips: - * Maxim DS2490 based - -Author: Evgeniy Polyakov - - -Description ------------ - -The Maixm/Dallas Semiconductor DS2490 is a chip -which allows to build USB <-> W1 bridges. - -DS9490(R) is a USB <-> W1 bus master device -which has 0x81 family ID integrated chip and DS2490 -low-level operational chip. diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic index 4c6509dd4..f937fbe1c 100644 --- a/Documentation/w1/w1.generic +++ b/Documentation/w1/w1.generic @@ -27,19 +27,8 @@ When a w1 master driver registers with the w1 subsystem, the following occurs: When a device is found on the bus, w1 core checks if driver for it's family is loaded. If so, the family driver is attached to the slave. -If there is no driver for the family, default one is assigned, which allows to perform -almost any kind of operations. Each logical operation is a transaction -in nature, which can contain several (two or one) low-level operations. -Let's see how one can read EEPROM context: -1. one must write control buffer, i.e. buffer containing command byte -and two byte address. At this step bus is reset and appropriate device -is selected using either W1_SKIP_ROM or W1_MATCH_ROM command. -Then provided control buffer is being written to the wire. -2. reading. This will issue reading eeprom response. - -It is possible that between 1. and 2. w1 master thread will reset bus for searching -and slave device will be even removed, but in this case 0xff will -be read, since no device was selected. +If there is no driver for the family, a simple sysfs entry is created +for the slave device. W1 device families @@ -100,5 +89,4 @@ driver - (standard) symlink to the w1 driver name - the device name, usually the same as the directory name w1_slave - (optional) a binary file whose meaning depends on the family driver -rw - (optional) created for slave devices which do not have - appropriate family driver. Allows to read/write binary data. + diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink deleted file mode 100644 index 3640c7c87..000000000 --- a/Documentation/w1/w1.netlink +++ /dev/null @@ -1,98 +0,0 @@ -Userspace communication protocol over connector [1]. - - -Message types. -============= - -There are three types of messages between w1 core and userspace: -1. Events. They are generated each time new master or slave device found - either due to automatic or requested search. -2. Userspace commands. Includes read/write and search/alarm search comamnds. -3. Replies to userspace commands. - - -Protocol. -======== - -[struct cn_msg] - connector header. It's length field is equal to size of the attached data. -[struct w1_netlink_msg] - w1 netlink header. - __u8 type - message type. - W1_SLAVE_ADD/W1_SLAVE_REMOVE - slave add/remove events. - W1_MASTER_ADD/W1_MASTER_REMOVE - master add/remove events. - W1_MASTER_CMD - userspace command for bus master device (search/alarm search). - W1_SLAVE_CMD - userspace command for slave device (read/write/ search/alarm search - for bus master device where given slave device found). - __u8 res - reserved - __u16 len - size of attached to this header data. - union { - __u8 id; - slave unique device id - struct w1_mst { - __u32 id; - master's id. - __u32 res; - reserved - } mst; - } id; - -[strucrt w1_netlink_cmd] - command for gived master or slave device. - __u8 cmd - command opcode. - W1_CMD_READ - read command. - W1_CMD_WRITE - write command. - W1_CMD_SEARCH - search command. - W1_CMD_ALARM_SEARCH - alarm search command. - __u8 res - reserved - __u16 len - length of data for this command. - For read command data must be allocated like for write command. - __u8 data[0] - data for this command. - - -Each connector message can include one or more w1_netlink_msg with zero of more attached w1_netlink_cmd messages. - -For event messages there are no w1_netlink_cmd embedded structures, only connector header -and w1_netlink_msg strucutre with "len" field being zero and filled type (one of event types) -and id - either 8 bytes of slave unique id in host order, or master's id, which is assigned -to bus master device when it is added to w1 core. - -Currently replies to userspace commands are only generated for read command request. -One reply is generated exactly for one w1_netlink_cmd read request. -Replies are not combined when sent - i.e. typical reply messages looks like the following: -[cn_msg][w1_netlink_msg][w1_netlink_cmd] -cn_msg.len = sizeof(struct w1_netlink_msg) + sizeof(struct w1_netlink_cmd) + cmd->len; -w1_netlink_msg.len = sizeof(struct w1_netlink_cmd) + cmd->len; -w1_netlink_cmd.len = cmd->len; - - -Operation steps in w1 core when new command is received. -======================================================= - -When new message (w1_netlink_msg) is received w1 core detects if it is master of slave request, -according to w1_netlink_msg.type field. -Then master or slave device is searched for. -When found, master device (requested or those one on where slave device is found) is locked. -If slave command is requested, then reset/select procedure is started to select given device. - -Then all requested in w1_netlink_msg operations are performed one by one. -If command requires reply (like read command) it is sent on command completion. - -When all commands (w1_netlink_cmd) are processed muster device is unlocked -and next w1_netlink_msg header processing started. - - -Connector [1] specific documentation. -==================================== - -Each connector message includes two u32 fields as "address". -w1 uses CN_W1_IDX and CN_W1_VAL defined in include/linux/connector.h header. -Each message also includes sequence and acknowledge numbers. -Sequence number for event messages is appropriate bus master sequence number increased with -each event message sent "through" this master. -Sequence number for userspace requests is set by userspace application. -Sequence number for reply is the same as was in request, and -acknowledge number is set to seq+1. - - -Additional documantion, source code examples. -============================================ - -1. Documentation/connector -2. http://tservice.net.ru/~s0mbre/archive/w1 -This archive includes userspace application w1d.c which -uses read/write/search commands for all master/slave devices found on the bus. diff --git a/Documentation/watchdog/pcwd-watchdog.txt b/Documentation/watchdog/pcwd-watchdog.txt index d9ee6336c..12187a33e 100644 --- a/Documentation/watchdog/pcwd-watchdog.txt +++ b/Documentation/watchdog/pcwd-watchdog.txt @@ -22,9 +22,78 @@ to run the program with an "&" to run it in the background!) If you want to write a program to be compatible with the PC Watchdog - driver, simply use of modify the watchdog test program: - Documentation/watchdog/src/watchdog-test.c - + driver, simply do the following: + +-- Snippet of code -- +/* + * Watchdog Driver Test Program + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +int fd; + +/* + * This function simply sends an IOCTL to the driver, which in turn ticks + * the PC Watchdog card to reset its internal timer so it doesn't trigger + * a computer reset. + */ +void keep_alive(void) +{ + int dummy; + + ioctl(fd, WDIOC_KEEPALIVE, &dummy); +} + +/* + * The main program. Run the program with "-d" to disable the card, + * or "-e" to enable the card. + */ +int main(int argc, char *argv[]) +{ + fd = open("/dev/watchdog", O_WRONLY); + + if (fd == -1) { + fprintf(stderr, "Watchdog device not enabled.\n"); + fflush(stderr); + exit(-1); + } + + if (argc > 1) { + if (!strncasecmp(argv[1], "-d", 2)) { + ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); + fprintf(stderr, "Watchdog card disabled.\n"); + fflush(stderr); + exit(0); + } else if (!strncasecmp(argv[1], "-e", 2)) { + ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); + fprintf(stderr, "Watchdog card enabled.\n"); + fflush(stderr); + exit(0); + } else { + fprintf(stderr, "-d to disable, -e to enable.\n"); + fprintf(stderr, "run by itself to tick the card.\n"); + fflush(stderr); + exit(0); + } + } else { + fprintf(stderr, "Watchdog Ticking Away!\n"); + fflush(stderr); + } + + while(1) { + keep_alive(); + sleep(1); + } +} +-- End snippet -- Other IOCTL functions include: diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c deleted file mode 100644 index 85cf17c48..000000000 --- a/Documentation/watchdog/src/watchdog-simple.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -int main(int argc, const char *argv[]) { - int fd = open("/dev/watchdog", O_WRONLY); - if (fd == -1) { - perror("watchdog"); - exit(1); - } - while (1) { - write(fd, "\0", 1); - fsync(fd); - sleep(10); - } -} diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c deleted file mode 100644 index 65f6c19cb..000000000 --- a/Documentation/watchdog/src/watchdog-test.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Watchdog Driver Test Program - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -int fd; - -/* - * This function simply sends an IOCTL to the driver, which in turn ticks - * the PC Watchdog card to reset its internal timer so it doesn't trigger - * a computer reset. - */ -void keep_alive(void) -{ - int dummy; - - ioctl(fd, WDIOC_KEEPALIVE, &dummy); -} - -/* - * The main program. Run the program with "-d" to disable the card, - * or "-e" to enable the card. - */ -int main(int argc, char *argv[]) -{ - fd = open("/dev/watchdog", O_WRONLY); - - if (fd == -1) { - fprintf(stderr, "Watchdog device not enabled.\n"); - fflush(stderr); - exit(-1); - } - - if (argc > 1) { - if (!strncasecmp(argv[1], "-d", 2)) { - ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); - fprintf(stderr, "Watchdog card disabled.\n"); - fflush(stderr); - exit(0); - } else if (!strncasecmp(argv[1], "-e", 2)) { - ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); - fprintf(stderr, "Watchdog card enabled.\n"); - fflush(stderr); - exit(0); - } else { - fprintf(stderr, "-d to disable, -e to enable.\n"); - fprintf(stderr, "run by itself to tick the card.\n"); - fflush(stderr); - exit(0); - } - } else { - fprintf(stderr, "Watchdog Ticking Away!\n"); - fflush(stderr); - } - - while(1) { - keep_alive(); - sleep(1); - } -} diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index 958ff3d48..21ed51173 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt @@ -34,7 +34,22 @@ activates as soon as /dev/watchdog is opened and will reboot unless the watchdog is pinged within a certain time, this time is called the timeout or margin. The simplest way to ping the watchdog is to write some data to the device. So a very simple watchdog daemon would look -like this source file: see Documentation/watchdog/src/watchdog-simple.c +like this: + +#include +#include + +int main(int argc, const char *argv[]) { + int fd=open("/dev/watchdog",O_WRONLY); + if (fd==-1) { + perror("watchdog"); + exit(1); + } + while(1) { + write(fd, "\0", 1); + sleep(10); + } +} A more advanced driver could for example check that a HTTP server is still responding before doing the write call to ping the watchdog. @@ -95,40 +110,7 @@ current timeout using the GETTIMEOUT ioctl. ioctl(fd, WDIOC_GETTIMEOUT, &timeout); printf("The timeout was is %d seconds\n", timeout); -Pretimeouts: - -Some watchdog timers can be set to have a trigger go off before the -actual time they will reset the system. This can be done with an NMI, -interrupt, or other mechanism. This allows Linux to record useful -information (like panic information and kernel coredumps) before it -resets. - - pretimeout = 10; - ioctl(fd, WDIOC_SETPRETIMEOUT, &pretimeout); - -Note that the pretimeout is the number of seconds before the time -when the timeout will go off. It is not the number of seconds until -the pretimeout. So, for instance, if you set the timeout to 60 seconds -and the pretimeout to 10 seconds, the pretimout will go of in 50 -seconds. Setting a pretimeout to zero disables it. - -There is also a get function for getting the pretimeout: - - ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout); - printf("The pretimeout was is %d seconds\n", timeout); - -Not all watchdog drivers will support a pretimeout. - -Get the number of seconds before reboot: - -Some watchdog drivers have the ability to report the remaining time -before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl -that returns the number of seconds before reboot. - - ioctl(fd, WDIOC_GETTIMELEFT, &timeleft); - printf("The timeout was is %d seconds\n", timeleft); - -Environmental monitoring: +Envinronmental monitoring: All watchdog drivers are required return more information about the system, some do temperature, fan and power level monitoring, some can tell you @@ -187,10 +169,6 @@ The watchdog saw a keepalive ping since it was last queried. WDIOF_SETTIMEOUT Can set/get the timeout -The watchdog can do pretimeouts. - - WDIOF_PRETIMEOUT Pretimeout (in seconds), get/set - For those drivers that return any bits set in the option field, the GETSTATUS and GETBOOTSTATUS ioctls can be used to ask for the current diff --git a/Documentation/watchdog/watchdog.txt b/Documentation/watchdog/watchdog.txt index 4b1ff69cc..dffda29c8 100644 --- a/Documentation/watchdog/watchdog.txt +++ b/Documentation/watchdog/watchdog.txt @@ -65,7 +65,28 @@ The external event interfaces on the WDT boards are not currently supported. Minor numbers are however allocated for it. -Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c +Example Watchdog Driver +----------------------- + +#include +#include +#include + +int main(int argc, const char *argv[]) +{ + int fd=open("/dev/watchdog",O_WRONLY); + if(fd==-1) + { + perror("watchdog"); + exit(1); + } + while(1) + { + write(fd,"\0",1); + fsync(fd); + sleep(10); + } +} Contact Information diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 6da24e7a5..f2cd6ef53 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt @@ -205,27 +205,6 @@ IOMMU pages Prereserve that many 128K pages for the software IO bounce buffering. force Force all IO through the software TLB. - calgary=[64k,128k,256k,512k,1M,2M,4M,8M] - calgary=[translate_empty_slots] - calgary=[disable=] - - 64k,...,8M - Set the size of each PCI slot's translation table - when using the Calgary IOMMU. This is the size of the translation - table itself in main memory. The smallest table, 64k, covers an IO - space of 32MB; the largest, 8MB table, can cover an IO space of - 4GB. Normally the kernel will make the right choice by itself. - - translate_empty_slots - Enable translation even on slots that have - no devices attached to them, in case a device will be hotplugged - in the future. - - disable= - Disable translation on a given PHB. For - example, the built-in graphics adapter resides on the first bridge - (PCI bus number 0); if translation (isolation) is enabled on this - bridge, X servers that access the hardware directly from user - space might stop working. Use this option if you have devices that - are accessed from userspace directly on some PCI host bridge. - Debugging oops=panic Always panic on oopses. Default is to just kill the process, @@ -238,13 +217,6 @@ Debugging pagefaulttrace Dump all page faults. Only useful for extreme debugging and will create a lot of output. - call_trace=[old|both|newfallback|new] - old: use old inexact backtracer - new: use new exact dwarf2 unwinder - both: print entries from both - newfallback: use new unwinder but fall back to old if it gets - stuck (default) - Misc noreplacement Don't replace instructions with more appropriate ones diff --git a/MAINTAINERS b/MAINTAINERS index c5e32622c..6a1bb87d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -181,12 +181,6 @@ M: bcrl@kvack.org L: linux-aio@kvack.org S: Supported -ABIT UGURU HARDWARE MONITOR DRIVER -P: Hans de Goede -M: j.w.r.degoede@hhs.nl -L: lm-sensors@lm-sensors.org -S: Maintained - ACENIC DRIVER P: Jes Sorensen M: jes@trained-monkey.org @@ -214,12 +208,6 @@ W: http://acpi.sourceforge.net/ T: git kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git S: Maintained -ACPI PCI HOTPLUG DRIVER -P: Kristen Carlson Accardi -M: kristen.c.accardi@intel.com -L: pcihpd-discuss@lists.sourceforge.net -S: Maintained - AD1816 SOUND DRIVER P: Thorsten Knabe M: Thorsten Knabe @@ -280,7 +268,7 @@ S: Maintained ALI1563 I2C DRIVER P: Rudolf Marek M: r.marek@sh.cvut.cz -L: i2c@lm-sensors.org +L: lm-sensors@lm-sensors.org S: Maintained ALPHA PORT @@ -298,13 +286,6 @@ L: info-linux@geode.amd.com W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html S: Supported -AOA (Apple Onboard Audio) ALSA DRIVER -P: Johannes Berg -M: johannes@sipsolutions.net -L: linuxppc-dev@ozlabs.org -L: alsa-devel@alsa-project.org -S: Maintained - APM DRIVER P: Stephen Rothwell M: sfr@canb.auug.org.au @@ -416,7 +397,7 @@ S: Supported ATM P: Chas Williams M: chas@cmf.nrl.navy.mil -L: linux-atm-general@lists.sourceforge.net (subscribers-only) +L: linux-atm-general@lists.sourceforge.net W: http://linux-atm.sourceforge.net S: Maintained @@ -587,12 +568,6 @@ L: linuxppc-dev@ozlabs.org W: http://www.penguinppc.org/ppc64/ S: Supported -BROADCOM B44 10/100 ETHERNET DRIVER -P: Gary Zambrano -M: zambrano@broadcom.com -L: netdev@vger.kernel.org -S: Supported - BROADCOM BNX2 GIGABIT ETHERNET DRIVER P: Michael Chan M: mchan@broadcom.com @@ -614,15 +589,6 @@ W: http://linuxtv.org T: git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git S: Maintained -CALGARY x86-64 IOMMU -P: Muli Ben-Yehuda -M: muli@il.ibm.com -P: Jon D. Mason -M: jdmason@us.ibm.com -L: linux-kernel@vger.kernel.org -L: discuss@x86-64.org -S: Maintained - COMMON INTERNET FILE SYSTEM (CIFS) P: Steve French M: sfrench@samba.org @@ -784,7 +750,6 @@ M: aliakc@web.de P: Jamie Lenehan M: lenehan@twibble.org W: http://twibble.org/dist/dc395x/ -L: dc395x@twibble.org L: http://lists.twibble.org/mailman/listinfo/dc395x/ S: Maintained @@ -884,17 +849,9 @@ S: Maintained DOCBOOK FOR DOCUMENTATION P: Martin Waitz M: tali@admingilde.org -P: Randy Dunlap -M: rdunlap@xenotime.net T: git http://tali.admingilde.org/git/linux-docbook.git S: Maintained -DOCKING STATION DRIVER -P: Kristen Carlson Accardi -M: kristen.c.accardi@intel.com -L: linux-acpi@vger.kernel.org -S: Maintained - DOUBLETALK DRIVER P: James R. Van Zandt M: jrv@vanzandt.mv.com @@ -956,27 +913,23 @@ S: Maintained EDAC-CORE P: Doug Thompson -M: norsk5@xmission.com -L: bluesmoke-devel@lists.sourceforge.net -W: bluesmoke.sourceforge.net -S: Supported - -EDAC-K8 -P: Doug Thompson -M: norsk5@xmission.com +M: norsk5@xmission.com, dthompson@linuxnetworx.com +P: Dave Peterson +M: dsp@llnl.gov, dave_peterson@pobox.com L: bluesmoke-devel@lists.sourceforge.net W: bluesmoke.sourceforge.net +S: Maintained EDAC-E752X -P: Mark Gross -M: mark.gross@intel.com +P: Dave Peterson +M: dsp@llnl.gov, dave_peterson@pobox.com L: bluesmoke-devel@lists.sourceforge.net W: bluesmoke.sourceforge.net S: Maintained EDAC-E7XXX -P: Doug Thompson -M: norsk5@xmission.com +P: Dave Peterson +M: dsp@llnl.gov, dave_peterson@pobox.com L: bluesmoke-devel@lists.sourceforge.net W: bluesmoke.sourceforge.net S: Maintained @@ -993,10 +946,6 @@ P: Andrey V. Savochkin M: saw@saw.sw.com.sg S: Maintained -EFS FILESYSTEM -W: http://aeschi.ch.eu.org/efs/ -S: Orphan - EMU10K1 SOUND DRIVER P: James Courtier-Dutton M: James@superbug.demon.co.uk @@ -1157,11 +1106,6 @@ L: lm-sensors@lm-sensors.org W: http://www.lm-sensors.nu/ S: Maintained -HARDWARE RANDOM NUMBER GENERATOR CORE -P: Michael Buesch -M: mb@bu3sch.de -S: Maintained - HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER P: Robert Love M: rlove@rlove.org @@ -1203,12 +1147,6 @@ L: linux-hams@vger.kernel.org W: http://www.nt.tuwien.ac.at/~kkudielk/Linux/ S: Maintained -HIGHPOINT ROCKETRAID 3xxx RAID DRIVER -P: HighPoint Linux Team -M: linux@highpoint-tech.com -W: http://www.highpoint-tech.com -S: Supported - HIPPI P: Jes Sorensen M: jes@trained-monkey.org @@ -1279,7 +1217,7 @@ S: Maintained I2C SUBSYSTEM P: Jean Delvare M: khali@linux-fr.org -L: i2c@lm-sensors.org +L: lm-sensors@lm-sensors.org W: http://www.lm-sensors.nu/ T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ S: Maintained @@ -1440,8 +1378,7 @@ S: Supported INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS P: Dmitry Torokhov -M: dmitry.torokhov@gmail.com -M: dtor@mail.ru +M: dtor_core@ameritech.net L: linux-input@atrey.karlin.mff.cuni.cz L: linux-joystick@atrey.karlin.mff.cuni.cz T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git @@ -1481,11 +1418,6 @@ P: Tigran Aivazian M: tigran@veritas.com S: Maintained -INTEL IXP4XX RANDOM NUMBER GENERATOR SUPPORT -P: Deepak Saxena -M: dsaxena@plexity.net -S: Maintained - INTEL PRO/100 ETHERNET SUPPORT P: John Ronciak M: john.ronciak@intel.com @@ -1493,8 +1425,6 @@ P: Jesse Brandeburg M: jesse.brandeburg@intel.com P: Jeff Kirsher M: jeffrey.t.kirsher@intel.com -P: Auke Kok -M: auke-jan.h.kok@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported @@ -1507,8 +1437,6 @@ P: Jesse Brandeburg M: jesse.brandeburg@intel.com P: Jeff Kirsher M: jeffrey.t.kirsher@intel.com -P: Auke Kok -M: auke-jan.h.kok@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported @@ -1521,8 +1449,6 @@ P: John Ronciak M: john.ronciak@intel.com P: Jesse Brandeburg M: jesse.brandeburg@intel.com -P: Auke Kok -M: auke-jan.h.kok@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported @@ -1531,7 +1457,6 @@ P: Yi Zhu M: yi.zhu@intel.com P: James Ketrenos M: jketreno@linux.intel.com -L: ipw2100-devel@lists.sourceforge.net L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel W: http://ipw2100.sourceforge.net S: Supported @@ -1541,7 +1466,6 @@ P: Yi Zhu M: yi.zhu@intel.com P: James Ketrenos M: jketreno@linux.intel.com -L: ipw2100-devel@lists.sourceforge.net L: http://lists.sourceforge.net/mailman/listinfo/ipw2100-devel W: http://ipw2200.sourceforge.net S: Supported @@ -1627,7 +1551,7 @@ W: http://jfs.sourceforge.net/ T: git kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git S: Supported -JOURNALLING LAYER FOR BLOCK DEVICES (JBD) +JOURNALLING LAYER FOR BLOCK DEVICS (JBD) P: Stephen Tweedie, Andrew Morton M: sct@redhat.com, akpm@osdl.org L: ext2-devel@lists.sourceforge.net @@ -1671,8 +1595,9 @@ S: Maintained KERNEL JANITORS P: Several -L: kernel-janitors@lists.osdl.org +L: kernel-janitors@osdl.org W: http://www.kerneljanitors.org/ +W: http://sf.net/projects/kernel-janitor/ S: Maintained KERNEL NFSD @@ -1704,8 +1629,10 @@ L: linux-kernel@vger.kernel.org S: Maintained LAPB module +P: Henner Eisen +M: eis@baty.hanse.de L: linux-x25@vger.kernel.org -S: Orphan +S: Maintained LASI 53c700 driver for PARISC P: James E.J. Bottomley @@ -1910,18 +1837,12 @@ S: linux-scsi@vger.kernel.org W: http://megaraid.lsilogic.com S: Maintained -MEMORY MANAGEMENT -L: linux-mm@kvack.org -L: linux-kernel@vger.kernel.org -W: http://www.linux-mm.org -S: Maintained - -MEMORY TECHNOLOGY DEVICES (MTD) +MEMORY TECHNOLOGY DEVICES P: David Woodhouse M: dwmw2@infradead.org W: http://www.linux-mtd.infradead.org/ L: linux-mtd@lists.infradead.org -T: git git://git.infradead.org/mtd-2.6.git +T: git kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6.git S: Maintained MICROTEK X6 SCANNER @@ -1968,7 +1889,7 @@ L: linux-kernel@vger.kernel.org W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html S: Maintained -MULTIMEDIA CARD (MMC) SUBSYSTEM +MULTIMEDIA CARD SUBSYSTEM P: Russell King M: rmk+mmc@arm.linux.org.uk S: Maintained @@ -2083,10 +2004,9 @@ L: linux-kernel@vger.kernel.org S: Maintained NI5010 NETWORK DRIVER -P: Jan-Pascal van Best -M: janpascal@vanbest.org -P: Andreas Mohr -M: andi@lisas.de +P: Jan-Pascal van Best and Andreas Mohr +M: Jan-Pascal van Best +M: Andreas Mohr <100.30936@germany.net> L: netdev@vger.kernel.org S: Maintained @@ -2125,12 +2045,6 @@ M: adaplas@pol.net L: linux-fbdev-devel@lists.sourceforge.net S: Maintained -OPENCORES I2C BUS DRIVER -P: Peter Korsgaard -M: jacmet@sunsite.dk -L: i2c@lm-sensors.org -S: Maintained - ORACLE CLUSTER FILESYSTEM 2 (OCFS2) P: Mark Fasheh M: mark.fasheh@oracle.com @@ -2261,7 +2175,6 @@ S: Maintained PCMCIA SUBSYSTEM P: Linux PCMCIA Team -L: linux-pcmcia@lists.infradead.org L: http://lists.infradead.org/mailman/listinfo/linux-pcmcia T: git kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git S: Maintained @@ -2272,12 +2185,6 @@ M: tsbogend@alpha.franken.de L: netdev@vger.kernel.org S: Maintained -PER-TASK DELAY ACCOUNTING -P: Shailabh Nagar -M: nagar@watson.ibm.com -L: linux-kernel@vger.kernel.org -S: Maintained - PERSONALITY HANDLING P: Christoph Hellwig M: hch@infradead.org @@ -2352,14 +2259,6 @@ M: promise@pnd-pc.demon.co.uk W: http://www.pnd-pc.demon.co.uk/promise/ S: Maintained -PVRUSB2 VIDEO4LINUX DRIVER -P: Mike Isely -M: isely@pobox.com -L: pvrusb2@isely.net -L: video4linux-list@redhat.com -W: http://www.isely.net/pvrusb2/ -S: Maintained - PXA2xx SUPPORT P: Nicolas Pitre M: nico@cam.org @@ -2617,6 +2516,19 @@ M: thomas@winischhofer.net W: http://www.winischhofer.at/linuxsisusbvga.shtml S: Maintained +SMSC47M1 HARDWARE MONITOR DRIVER +P: Jean Delvare +M: khali@linux-fr.org +L: lm-sensors@lm-sensors.org +S: Odd Fixes + +SMB FILESYSTEM +P: Urban Widmark +M: urban@teststation.com +W: http://samba.org/ +L: samba@samba.org +S: Maintained + SMC91x ETHERNET DRIVER P: Nicolas Pitre M: nico@cam.org @@ -2668,14 +2580,6 @@ M: chrisw@sous-sol.org L: stable@kernel.org S: Maintained -STABLE BRANCH: -P: Greg Kroah-Hartman -M: greg@kroah.com -P: Chris Wright -M: chrisw@sous-sol.org -L: stable@kernel.org -S: Maintained - TPM DEVICE DRIVER P: Kylene Hall M: kjhall@us.ibm.com @@ -2733,11 +2637,6 @@ M: shemminger@osdl.org L: netdev@vger.kernel.org S: Maintained -SOEKRIS NET48XX LED SUPPORT -P: Chris Boot -M: bootc@bootc.net -S: Maintained - SPARC (sparc32): P: William L. Irwin M: wli@holomorphy.com @@ -2810,31 +2709,6 @@ P: Christoph Hellwig M: hch@infradead.org S: Maintained -TC CLASSIFIER -P: Jamal Hadi Salim -M: hadi@cyberus.ca -L: netdev@vger.kernel.org -S: Maintained - -TCP LOW PRIORITY MODULE -P: Wong Hoi Sing, Edison -M: hswong3i@gmail.com -P: Hung Hing Lun, Mike -M: hlhung3i@gmail.com -W: http://tcp-lp-mod.sourceforge.net/ -S: Maintained - -TI OMAP RANDOM NUMBER GENERATOR SUPPORT -P: Deepak Saxena -M: dsaxena@plexity.net -S: Maintained - -TASKSTATS STATISTICS INTERFACE -P: Shailabh Nagar -M: nagar@watson.ibm.com -L: linux-kernel@vger.kernel.org -S: Maintained - TI PARALLEL LINK CABLE DRIVER P: Romain Lievin M: roms@lpg.ticalc.org @@ -3210,7 +3084,7 @@ S: Maintained VIAPRO SMBUS DRIVER P: Jean Delvare M: khali@linux-fr.org -L: i2c@lm-sensors.org +L: lm-sensors@lm-sensors.org S: Maintained UCLINUX (AND M68KNOMMU) @@ -3258,11 +3132,6 @@ S: Maintained W1 DALLAS'S 1-WIRE BUS P: Evgeniy Polyakov M: johnpol@2ka.mipt.ru -S: Maintained - -W83791D HARDWARE MONITORING DRIVER -P: Charles Spirakis -M: bezaur@gmail.com L: lm-sensors@lm-sensors.org S: Maintained @@ -3273,6 +3142,12 @@ L: wbsd-devel@list.drzeus.cx W: http://projects.drzeus.cx/wbsd S: Maintained +W83L785TS HARDWARE MONITOR DRIVER +P: Jean Delvare +M: khali@linux-fr.org +L: lm-sensors@lm-sensors.org +S: Odd Fixes + WATCHDOG DEVICE DRIVERS P: Wim Van Sebroeck M: wim@iguana.be @@ -3310,11 +3185,10 @@ S: Maintained XFS FILESYSTEM P: Silicon Graphics Inc -P: Tim Shimmin, David Chatterton M: xfs-masters@oss.sgi.com -L: xfs@oss.sgi.com +M: nathans@sgi.com +L: linux-xfs@oss.sgi.com W: http://oss.sgi.com/projects/xfs -T: git git://oss.sgi.com:8090/xfs/xfs-2.6 S: Supported X86 3-LEVEL PAGING (PAE) SUPPORT diff --git a/Makefile b/Makefile index b2e0c3cdd..34e319446 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 18 -EXTRAVERSION = -1.2260_FC5.0 -NAME=Avast! A bilge rat! +SUBLEVEL = 17 +EXTRAVERSION = -1.2187_FC5.0smp +NAME=Crazed Snow-Weasel # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -41,9 +41,8 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif -# Call checker as part of compilation of C files -# Use 'make C=1' to enable checking (sparse, by default) -# Override with 'make C=1 CHECK=checker_executable CHECKFLAGS=....' +# Call sparse as part of compilation of C files +# Use 'make C=1' to enable sparse checking ifdef C ifeq ("$(origin C)", "command line") @@ -72,7 +71,7 @@ endif # In both cases the working directory must be the root of the kernel src. # 1) O= # Use "make O=dir/to/store/output/files/" -# +# # 2) Set KBUILD_OUTPUT # Set the environment variable KBUILD_OUTPUT to point to the directory # where the output files shall be placed. @@ -179,20 +178,18 @@ CROSS_COMPILE ?= # Architecture as present in compile.h UTS_MACHINE := $(ARCH) -KCONFIG_CONFIG ?= .config - # SHELL used by kbuild CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) -HOSTCC = gcc -HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -HOSTCXXFLAGS = -O2 +HOSTCC = gcc +HOSTCXX = g++ +HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer +HOSTCXXFLAGS = -O2 -# Decide whether to build built-in, modular, or both. -# Normally, just do built-in. +# Decide whether to build built-in, modular, or both. +# Normally, just do built-in. KBUILD_MODULES := KBUILD_BUILTIN := 1 @@ -200,7 +197,7 @@ KBUILD_BUILTIN := 1 # If we have only "make modules", don't compile built-in objects. # When we're building modules with modversions, we need to consider # the built-in objects during the descend as well, in order to -# make sure the checksums are up to date before we record them. +# make sure the checksums are uptodate before we record them. ifeq ($(MAKECMDGOALS),modules) KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) @@ -233,7 +230,7 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD # # If $(quiet) is empty, the whole command will be printed. # If it is set to "quiet_", only the short version will be printed. -# If it is set to "silent_", nothing will be printed at all, since +# If it is set to "silent_", nothing wil be printed at all, since # the variable $(silent_cmd_cc_o_c) doesn't exist. # # A simple variant is to prefix commands with $(Q) - that's useful @@ -268,6 +265,11 @@ MAKEFLAGS += --include-dir=$(srctree) # We need some generic definitions include $(srctree)/scripts/Kbuild.include +# For maximum performance (+ possibly random breakage, uncomment +# the following) + +#MAKEFLAGS += -rR + # Make variables (CC, etc...) AS = $(CROSS_COMPILE)as @@ -303,21 +305,21 @@ LINUXINCLUDE := -Iinclude \ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) -CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -AFLAGS := -D__ASSEMBLY__ +CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration +AFLAGS := -D__ASSEMBLY__ -# Read KERNELRELEASE from include/config/kernel.release (if it exists) -KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) +# Read KERNELRELEASE from .kernelrelease (if it exists) +KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null) KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION -export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC -export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE -export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS +export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \ + ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ + CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ + HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS -export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE +export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE # When compiling out-of-tree modules, put MODVERDIR in the module @@ -355,14 +357,12 @@ endif # catch them early, and hand them over to scripts/kconfig/Makefile # It is allowed to specify more targets when calling make, including # mixing *config targets and build targets. -# For example 'make oldconfig all'. +# For example 'make oldconfig all'. # Detect when mixed targets is specified, and make a second invocation # of make so .config is not included in this case either (for *config). no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% \ - include/linux/version.h headers_% \ - kernelrelease kernelversion + cscope TAGS tags help %docs check% config-targets := 0 mixed-targets := 0 @@ -404,8 +404,9 @@ include $(srctree)/arch/$(ARCH)/Makefile export KBUILD_DEFCONFIG config %config: scripts_basic outputmakefile FORCE - $(Q)mkdir -p include/linux include/config + $(Q)mkdir -p include/linux $(Q)$(MAKE) $(build)=scripts/kconfig $@ + $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease else # =========================================================================== @@ -415,11 +416,13 @@ else ifeq ($(KBUILD_EXTMOD),) # Additional helpers built in scripts/ # Carefully list dependencies so we do not try to build scripts twice -# in parallel +# in parrallel PHONY += scripts -scripts: scripts_basic include/config/auto.conf +scripts: scripts_basic include/config/MARKER $(Q)$(MAKE) $(build)=$(@) +scripts_basic: include/linux/autoconf.h + # Objects we will link into vmlinux / subdirs we need to visit init-y := init/ drivers-y := drivers/ sound/ @@ -429,48 +432,35 @@ core-y := usr/ endif # KBUILD_EXTMOD ifeq ($(dot-config),1) -# Read in config --include include/config/auto.conf +# In this section, we need .config -ifeq ($(KBUILD_EXTMOD),) # Read in dependencies to all Kconfig* files, make sure to run # oldconfig if changes are detected. --include include/config/auto.conf.cmd +-include .kconfig.d + +include .config +# If .config needs to be updated, it will be done via the dependency +# that autoconf has on .config. # To avoid any implicit rule to kick in, define an empty command -$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; +.config .kconfig.d: ; -# If .config is newer than include/config/auto.conf, someone tinkered +# If .config is newer than include/linux/autoconf.h, someone tinkered # with it and forgot to run make oldconfig. -# if auto.conf.cmd is missing then we are probably in a cleaned tree so +# If kconfig.d is missing then we are probarly in a cleaned tree so # we execute the config step to be sure to catch updated Kconfig files -include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd +include/linux/autoconf.h: .kconfig.d .config + $(Q)mkdir -p include/linux $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig -else -# external modules needs include/linux/autoconf.h and include/config/auto.conf -# but do not care if they are up-to-date. Use auto.conf to trigger the test -PHONY += include/config/auto.conf - -include/config/auto.conf: - $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \ - echo; \ - echo " ERROR: Kernel configuration is invalid."; \ - echo " include/linux/autoconf.h or $@ are missing."; \ - echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ - echo; \ - /bin/false) - -endif # KBUILD_EXTMOD - else # Dummy target needed, because used as prerequisite -include/config/auto.conf: ; -endif # $(dot-config) +include/linux/autoconf.h: ; +endif # The all: target is the default when no target is given on the # command line. # This allow a user to issue only 'make' to build a kernel including modules -# Defaults vmlinux but it is usually overridden in the arch makefile +# Defaults vmlinux but it is usually overriden in the arch makefile all: vmlinux ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE @@ -479,8 +469,6 @@ else CFLAGS += -O2 endif -include $(srctree)/arch/$(ARCH)/Makefile - ifdef CONFIG_FRAME_POINTER CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) else @@ -495,8 +483,7 @@ ifdef CONFIG_DEBUG_INFO CFLAGS += -g endif -# Force gcc to behave correct even for buggy distributions -CFLAGS += $(call cc-option, -fno-stack-protector) +include $(srctree)/arch/$(ARCH)/Makefile # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) @@ -505,11 +492,11 @@ CHECKFLAGS += $(NOSTDINC_FLAGS) # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) -# disable pointer signed / unsigned warnings in gcc 4.0 +# disable pointer signedness warnings in gcc 4.0 CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Default kernel image to build when no specific target is given. -# KBUILD_IMAGE may be overruled on the command line or +# KBUILD_IMAGE may be overruled on the commandline or # set in the environment # Also any assignments in arch/$(ARCH)/Makefile take precedence over # this default value @@ -523,29 +510,12 @@ export INSTALL_PATH ?= /boot # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory # relocations required by build roots. This is not defined in the -# makefile but the argument can be passed to make if needed. +# makefile but the arguement can be passed to make if needed. # MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) export MODLIB -# -# INSTALL_MOD_STRIP, if defined, will cause modules to be -# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then -# the default option --strip-debug will be used. Otherwise, -# INSTALL_MOD_STRIP will used as the options to the strip command. - -ifdef INSTALL_MOD_STRIP -ifeq ($(INSTALL_MOD_STRIP),1) -mod_strip_cmd = $(STRIP) --strip-debug -else -mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP) -endif # INSTALL_MOD_STRIP=1 -else -mod_strip_cmd = true -endif # INSTALL_MOD_STRIP -export mod_strip_cmd - ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ @@ -569,7 +539,7 @@ libs-y := $(libs-y1) $(libs-y2) # Build vmlinux # --------------------------------------------------------------------------- -# vmlinux is built from the objects selected by $(vmlinux-init) and +# vmlinux is build from the objects selected by $(vmlinux-init) and # $(vmlinux-main). Most are built-in.o files from top-level directories # in the kernel tree, others are specified in arch/$(ARCH)Makefile. # Ordering when linking is important, and $(vmlinux-init) must be first. @@ -620,7 +590,7 @@ quiet_cmd_vmlinux_version = GEN .version $(MAKE) $(build)=init # Generate System.map -quiet_cmd_sysmap = SYSMAP +quiet_cmd_sysmap = SYSMAP cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap # Link of vmlinux @@ -749,7 +719,7 @@ $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ # Build the kernel release string -# The KERNELRELEASE is stored in a file named include/config/kernel.release +# The KERNELRELEASE is stored in a file named .kernelrelease # to be used when executing for example make install or make modules_install # # Take the contents of any files called localversion* and the config @@ -767,10 +737,10 @@ _localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f))) localver = $(subst $(space),, \ $(shell cat /dev/null $(_localver)) \ $(patsubst "%",%,$(CONFIG_LOCALVERSION))) - + # If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called # and if the SCM is know a tag from the SCM is appended. -# The appended tag is determined by the SCM used. +# The appended tag is determinded by the SCM used. # # Currently, only git is supported. # Other SCMs can edit scripts/setlocalversion and add the appropriate @@ -783,9 +753,9 @@ endif localver-full = $(localver)$(localver-auto) -# Store (new) KERNELRELASE string in include/config/kernel.release +# Store (new) KERNELRELASE string in .kernelrelease kernelrelease = $(KERNELVERSION)$(localver-full) -include/config/kernel.release: include/config/auto.conf FORCE +.kernelrelease: FORCE $(Q)rm -f $@ $(Q)echo $(kernelrelease) > $@ @@ -806,10 +776,10 @@ PHONY += prepare-all # and if so do: # 1) Check that make has not been executed in the kernel src $(srctree) # 2) Create the include2 directory, used for the second asm symlink -prepare3: include/config/kernel.release +prepare3: .kernelrelease ifneq ($(KBUILD_SRC),) @echo ' Using $(srctree) as source for kernel' - $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ + $(Q)if [ -f $(srctree)/.config ]; then \ echo " $(srctree) is not clean, please run 'make mrproper'";\ echo " in the '$(srctree)' directory.";\ /bin/false; \ @@ -821,8 +791,8 @@ endif # prepare2 creates a makefile if using a separate output directory prepare2: prepare3 outputmakefile -prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ - include/asm include/config/auto.conf +prepare1: prepare2 include/linux/version.h include/asm \ + include/config/MARKER ifneq ($(KBUILD_MODULES),) $(Q)mkdir -p $(MODVERDIR) $(Q)rm -f $(MODVERDIR)/* @@ -836,20 +806,27 @@ prepare0: archprepare FORCE # All the preparing.. prepare prepare-all: prepare0 -# Leave this as default for preprocessing vmlinux.lds.S, which is now -# done in arch/$(ARCH)/kernel/Makefile +# Leave this as default for preprocessing vmlinux.lds.S, which is now +# done in arch/$(ARCH)/kernel/Makefile export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) -# FIXME: The asm symlink changes when $(ARCH) changes. That's -# hard to detect, but I suppose "make mrproper" is a good idea -# before switching between archs anyway. +# FIXME: The asm symlink changes when $(ARCH) changes. That's +# hard to detect, but I suppose "make mrproper" is a good idea +# before switching between archs anyway. include/asm: @echo ' SYMLINK $@ -> include/asm-$(ARCH)' $(Q)if [ ! -d include ]; then mkdir -p include; fi; @ln -fsn asm-$(ARCH) $@ +# Split autoconf.h into include/linux/config/* + +include/config/MARKER: scripts/basic/split-include include/linux/autoconf.h + @echo ' SPLIT include/linux/autoconf.h -> include/config/*' + @scripts/basic/split-include include/linux/autoconf.h include/config + @touch $@ + # Generate some files # --------------------------------------------------------------------------- @@ -857,56 +834,33 @@ include/asm: # needs to be updated, so this check is forced on all builds uts_len := 64 -define filechk_utsrelease.h - if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \ - echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ - exit 1; \ - fi; \ - (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";) -endef define filechk_version.h - (echo \#define LINUX_VERSION_CODE $(shell \ - expr $(VERSION) \* 65536 + $(PATCHLEVEL) \* 256 + $(SUBLEVEL)); \ - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) + if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \ + echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ + exit 1; \ + fi; \ + (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ + echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \ + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \ + ) endef -include/linux/version.h: $(srctree)/Makefile FORCE +include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE $(call filechk,version.h) -include/linux/utsrelease.h: include/config/kernel.release FORCE - $(call filechk,utsrelease.h) - # --------------------------------------------------------------------------- PHONY += depend dep depend dep: @echo '*** Warning: make $@ is unnecessary now.' -# --------------------------------------------------------------------------- -# Kernel headers -INSTALL_HDR_PATH=$(objtree)/usr -export INSTALL_HDR_PATH - -PHONY += headers_install -headers_install: include/linux/version.h - @if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \ - echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \ - exit 1 ; fi - $(Q)unifdef -Ux /dev/null - $(Q)rm -rf $(INSTALL_HDR_PATH)/include - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include - -PHONY += headers_check -headers_check: headers_install - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1 - # --------------------------------------------------------------------------- # Modules ifdef CONFIG_MODULES -# By default, build modules as well +# By default, build modules as well all: modules @@ -985,11 +939,10 @@ CLEAN_FILES += vmlinux System.map \ .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map # Directories & files removed with 'make mrproper' -MRPROPER_DIRS += include/config include2 usr/include +MRPROPER_DIRS += include/config include2 MRPROPER_FILES += .config .config.old include/asm .version .old_version \ - include/linux/autoconf.h include/linux/version.h \ - include/linux/utsrelease.h \ - Module.symvers tags TAGS cscope* + include/linux/autoconf.h include/linux/version.h \ + .kernelrelease Module.symvers tags TAGS cscope* # clean - Delete most, but leave enough to build external modules # @@ -1005,9 +958,8 @@ clean: archclean $(clean-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ - -o -name '*.symtypes' \) \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f # mrproper - Delete all generated files, including .config @@ -1030,9 +982,9 @@ PHONY += distclean distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -size 0 \ + -o -name '.*.rej' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f @@ -1042,9 +994,9 @@ distclean: mrproper # rpm target kept for backward compatibility package-dir := $(srctree)/scripts/package -%pkg: include/config/kernel.release FORCE +%pkg: FORCE $(Q)$(MAKE) $(build)=$(package-dir) $@ -rpm: include/config/kernel.release FORCE +rpm: FORCE $(Q)$(MAKE) $(build)=$(package-dir) $@ @@ -1075,17 +1027,10 @@ help: @echo ' cscope - Generate cscope index' @echo ' kernelrelease - Output the release version string' @echo ' kernelversion - Output the version stored in Makefile' - @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ - echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ - fi - @echo ' (default: $(INSTALL_HDR_PATH))' @echo '' @echo 'Static analysers' @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' - @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ - echo ' headers_check - Sanity check on exported headers'; \ - fi @echo '' @echo 'Kernel packaging:' @$(MAKE) $(build)=$(package-dir) help @@ -1104,8 +1049,8 @@ help: @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir [targets] Locate all output files in "dir", including .config' - @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' - @echo ' make C=2 [targets] Force check of all c source with $$CHECK' + @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)' + @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)' @echo '' @echo 'Execute "make" or "make all" to build all targets marked with [*] ' @echo 'For further info see the ./README file' @@ -1132,7 +1077,7 @@ else # KBUILD_EXTMOD # make M=dir modules Make all modules in specified dir # make M=dir Same as 'make M=dir modules' # make M=dir modules_install -# Install the modules built in the module directory +# Install the modules build in the module directory # Assumes install directory is already created # We are always building modules @@ -1191,7 +1136,7 @@ clean: rm-dirs := $(MODVERDIR) clean: $(clean-dirs) $(call cmd,rmdirs) @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f @@ -1230,41 +1175,31 @@ else ALLINCLUDE_ARCHS := $(ARCH) endif else -#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behavour. +#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping existing behaviour. ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS) endif ALLSOURCE_ARCHS := $(ARCH) -define find-sources - ( find $(__srctree) $(RCS_FIND_IGNORE) \ +define all-sources + ( find $(__srctree) $(RCS_FIND_IGNORE) \ \( -name include -o -name arch \) -prune -o \ - -name $1 -print; \ + -name '*.[chS]' -print; \ for ARCH in $(ALLSOURCE_ARCHS) ; do \ find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \ - -name $1 -print; \ + -name '*.[chS]' -print; \ done ; \ find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ - -name $1 -print; \ + -name '*.[chS]' -print; \ find $(__srctree)include $(RCS_FIND_IGNORE) \ \( -name config -o -name 'asm-*' \) -prune \ - -o -name $1 -print; \ + -o -name '*.[chS]' -print; \ for ARCH in $(ALLINCLUDE_ARCHS) ; do \ find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \ - -name $1 -print; \ + -name '*.[chS]' -print; \ done ; \ find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ - -name $1 -print ) -endef - -define all-sources - $(call find-sources,'*.[chS]') -endef -define all-kconfigs - $(call find-sources,'Kconfig*') -endef -define all-defconfigs - $(call find-sources,'defconfig') + -name '*.[chS]' -print ) endef quiet_cmd_cscope-file = FILELST cscope.files @@ -1284,13 +1219,7 @@ define cmd_TAGS echo "-I __initdata,__exitdata,__acquires,__releases \ -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ --extra=+f --c-kinds=+px"`; \ - $(all-sources) | xargs etags $$ETAGSF -a; \ - if test "x$$ETAGSF" = x; then \ - $(all-kconfigs) | xargs etags -a \ - --regex='/^config[ \t]+\([a-zA-Z0-9_]+\)/\1/'; \ - $(all-defconfigs) | xargs etags -a \ - --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ - fi + $(all-sources) | xargs etags $$ETAGSF -a endef TAGS: FORCE @@ -1330,14 +1259,14 @@ namespacecheck: endif #ifeq ($(config-targets),1) endif #ifeq ($(mixed-targets),1) -PHONY += checkstack kernelrelease kernelversion +PHONY += checkstack checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ $(PERL) $(src)/scripts/checkstack.pl $(ARCH) kernelrelease: - $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ - $(error kernelrelease not valid - run 'make prepare' to update it)) + $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \ + $(error kernelrelease not valid - run 'make *config' to update it)) kernelversion: @echo $(KERNELVERSION) @@ -1372,8 +1301,6 @@ endif $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) %.o: %.S prepare scripts FORCE $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) -%.symtypes: %.c prepare scripts FORCE - $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) # Modules / %/: prepare scripts FORCE @@ -1396,7 +1323,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ $(NOSTDINC_FLAGS) $(CPPFLAGS) \ - $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) + $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) quiet_cmd_as_o_S = AS $@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 60fdd21c3..875006799 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -381,7 +381,7 @@ config ALPHA_EV56 config ALPHA_EV56 prompt "EV56 CPU (speed >= 333MHz)?" - depends on ALPHA_NORITAKE || ALPHA_PRIMO + depends on ALPHA_NORITAKE && ALPHA_PRIMO config ALPHA_EV56 prompt "EV56 CPU (speed >= 400MHz)?" diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c index 3af21c789..ec53c28e3 100644 --- a/arch/alpha/boot/bootp.c +++ b/arch/alpha/boot/bootp.c @@ -9,7 +9,7 @@ */ #include #include -#include +#include #include #include diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c index 4307bde80..a6657f2cf 100644 --- a/arch/alpha/boot/bootpz.c +++ b/arch/alpha/boot/bootpz.c @@ -11,7 +11,7 @@ */ #include #include -#include +#include #include #include diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c index 90ed55b66..78c9b0b6e 100644 --- a/arch/alpha/boot/main.c +++ b/arch/alpha/boot/main.c @@ -7,7 +7,7 @@ */ #include #include -#include +#include #include #include diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index f042cc42b..2b245ad73 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c @@ -5,6 +5,7 @@ * modules. */ +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -53,6 +53,10 @@ extern void __divqu (void); extern void __remqu (void); EXPORT_SYMBOL(alpha_mv); +EXPORT_SYMBOL(enable_irq); +EXPORT_SYMBOL(disable_irq); +EXPORT_SYMBOL(disable_irq_nosync); +EXPORT_SYMBOL(probe_irq_mask); EXPORT_SYMBOL(screen_info); EXPORT_SYMBOL(perf_irq); EXPORT_SYMBOL(callback_getenv); @@ -64,13 +68,19 @@ EXPORT_SYMBOL(alpha_using_srm); /* platform dependent support */ EXPORT_SYMBOL(strcat); +EXPORT_SYMBOL(strcmp); EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strlen); +EXPORT_SYMBOL(strncmp); EXPORT_SYMBOL(strncpy); +EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strncat); +EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strchr); EXPORT_SYMBOL(strrchr); +EXPORT_SYMBOL(memcmp); EXPORT_SYMBOL(memmove); +EXPORT_SYMBOL(memscan); EXPORT_SYMBOL(__memcpy); EXPORT_SYMBOL(__memset); EXPORT_SYMBOL(__memsetw); @@ -112,9 +122,11 @@ EXPORT_SYMBOL(alpha_write_fp_reg_s); /* In-kernel system calls. */ EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(sys_open); EXPORT_SYMBOL(sys_dup); EXPORT_SYMBOL(sys_exit); EXPORT_SYMBOL(sys_write); +EXPORT_SYMBOL(sys_read); EXPORT_SYMBOL(sys_lseek); EXPORT_SYMBOL(execve); EXPORT_SYMBOL(sys_setsid); diff --git a/arch/alpha/kernel/console.c b/arch/alpha/kernel/console.c index f313b3493..cb3e739fb 100644 --- a/arch/alpha/kernel/console.c +++ b/arch/alpha/kernel/console.c @@ -5,6 +5,7 @@ * non-0 I/O hose */ +#include #include #include #include diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 428333baf..780cb9368 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -4,6 +4,7 @@ * Kernel entry-points. */ +#include #include #include #include diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c index fed6b3d1b..bf52ba691 100644 --- a/arch/alpha/kernel/err_ev7.c +++ b/arch/alpha/kernel/err_ev7.c @@ -274,14 +274,16 @@ ev7_process_pal_subpacket(struct el_subpacket *header) struct el_subpacket_handler ev7_pal_subpacket_handler = SUBPACKET_HANDLER_INIT(EL_CLASS__PAL, ev7_process_pal_subpacket); -void +void ev7_register_error_handlers(void) { int i; - for (i = 0; i < ARRAY_SIZE(el_ev7_pal_annotations); i++) + for(i = 0; + i #include #include #include diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S index 1e2a62a1f..0905721fc 100644 --- a/arch/alpha/kernel/head.S +++ b/arch/alpha/kernel/head.S @@ -7,6 +7,7 @@ * the kernel global pointer and jump to the kernel entry-point. */ +#include #include #include diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 729c475d2..da677f829 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -10,6 +10,7 @@ * should be easier. */ +#include #include #include #include @@ -48,15 +49,15 @@ select_smp_affinity(unsigned int irq) static int last_cpu; int cpu = last_cpu + 1; - if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) + if (!irq_desc[irq].handler->set_affinity || irq_user_affinity[irq]) return 1; while (!cpu_possible(cpu)) cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); last_cpu = cpu; - irq_desc[irq].affinity = cpumask_of_cpu(cpu); - irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); + irq_affinity[irq] = cpumask_of_cpu(cpu); + irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu)); return 0; } #endif /* CONFIG_SMP */ @@ -92,14 +93,14 @@ show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]); #endif - seq_printf(p, " %14s", irq_desc[irq].chip->typename); + seq_printf(p, " %14s", irq_desc[irq].handler->typename); seq_printf(p, " %c%s", - (action->flags & IRQF_DISABLED)?'+':' ', + (action->flags & SA_INTERRUPT)?'+':' ', action->name); for (action=action->next; action; action = action->next) { seq_printf(p, ", %c%s", - (action->flags & IRQF_DISABLED)?'+':' ', + (action->flags & SA_INTERRUPT)?'+':' ', action->name); } diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index ddf5cf8dc..9d34ce26e 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c @@ -2,6 +2,7 @@ * Alpha specific irq code. */ +#include #include #include #include @@ -214,7 +215,7 @@ static unsigned int rtc_startup(unsigned int irq) { return 0; } struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "timer", }; @@ -232,7 +233,7 @@ void __init init_rtc_irq(void) { irq_desc[RTC_IRQ].status = IRQ_DISABLED; - irq_desc[RTC_IRQ].chip = &rtc_irq_type; + irq_desc[RTC_IRQ].handler = &rtc_irq_type; setup_irq(RTC_IRQ, &timer_irqaction); } diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index ebbadbc0c..b188683b8 100644 --- a/arch/alpha/kernel/irq_i8259.c +++ b/arch/alpha/kernel/irq_i8259.c @@ -7,6 +7,7 @@ * Started hacking from linux-2.3.30pre6/arch/i386/kernel/i8259.c. */ +#include #include #include #include @@ -108,7 +109,7 @@ init_i8259a_irqs(void) for (i = 0; i < 16; i++) { irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].chip = &i8259a_irq_type; + irq_desc[i].handler = &i8259a_irq_type; } setup_irq(2, &cascade); diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c index 3b581415b..146a20b9e 100644 --- a/arch/alpha/kernel/irq_pyxis.c +++ b/arch/alpha/kernel/irq_pyxis.c @@ -120,7 +120,7 @@ init_pyxis_irqs(unsigned long ignore_mask) if ((ignore_mask >> i) & 1) continue; irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &pyxis_irq_type; + irq_desc[i].handler = &pyxis_irq_type; } setup_irq(16+7, &isa_cascade_irqaction); diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c index 8e4d121f8..0a87e4669 100644 --- a/arch/alpha/kernel/irq_srm.c +++ b/arch/alpha/kernel/irq_srm.c @@ -67,7 +67,7 @@ init_srm_irqs(long max, unsigned long ignore_mask) if (i < 64 && ((ignore_mask >> i) & 1)) continue; irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &srm_irq_type; + irq_desc[i].handler = &srm_irq_type; } } diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h index 08b8302e6..11f996f24 100644 --- a/arch/alpha/kernel/machvec_impl.h +++ b/arch/alpha/kernel/machvec_impl.h @@ -6,6 +6,7 @@ * This file has goodies to help simplify instantiation of machine vectors. */ +#include #include /* Whee. These systems don't have an HAE: diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 67cd383a1..a693bd29d 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -117,21 +117,17 @@ osf_filldir(void *__buf, const char *name, int namlen, loff_t offset, struct osf_dirent __user *dirent; struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf; unsigned int reclen = ROUND_UP(NAME_OFFSET + namlen + 1); - unsigned int d_ino; buf->error = -EINVAL; /* only used if we fail */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; if (buf->basep) { if (put_user(offset, buf->basep)) return -EFAULT; buf->basep = NULL; } dirent = buf->dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(namlen, &dirent->d_namlen); put_user(reclen, &dirent->d_reclen); if (copy_to_user(dirent->d_name, name, namlen) || @@ -249,7 +245,7 @@ do_osf_statfs(struct dentry * dentry, struct osf_statfs __user *buffer, unsigned long bufsiz) { struct kstatfs linux_stat; - int error = vfs_statfs(dentry, &linux_stat); + int error = vfs_statfs(dentry->d_inode->i_sb, &linux_stat); if (!error) error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz); return error; @@ -626,7 +622,7 @@ osf_sysinfo(int command, char __user *buf, long count) printk("sysinfo(%d)", command); goto out; } - + down_read(&uts_sem); switch (offset) { diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index ffb7d5423..2a8b364c8 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -12,6 +12,7 @@ * Nov 2000, Ivan Kokshaysky * PCI-PCI bridges cleanup */ +#include #include #include #include @@ -123,12 +124,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_final); void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { struct pci_dev *dev = data; struct pci_controller *hose = dev->sysdata; unsigned long alignto; - resource_size_t start = res->start; + unsigned long start = res->start; if (res->flags & IORESOURCE_IO) { /* Make sure we start at our min on all hoses */ diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index b3a8a2980..c760a831f 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -8,6 +8,7 @@ * This file handles the architecture-dependent parts of process handling. */ +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -475,7 +475,7 @@ out: */ unsigned long -thread_saved_pc(struct task_struct *t) +thread_saved_pc(task_t *t) { unsigned long base = (unsigned long)task_stack_page(t); unsigned long fp, sp = task_thread_info(t)->pcb.ksp; diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index 2a6e3da81..e1560fb15 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h @@ -1,3 +1,4 @@ +#include #include diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index a94e6d93e..558b83368 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c @@ -19,8 +19,9 @@ #include #include #include -#include +#include #include +#include /* CONFIG_ALPHA_LCA etc */ #include #include #include @@ -113,6 +114,8 @@ struct alpha_machine_vector alpha_mv; int alpha_using_srm; #endif +#define N(a) (sizeof(a)/sizeof(a[0])) + static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, unsigned long); static struct alpha_machine_vector *get_sysvec_byname(const char *); @@ -237,7 +240,7 @@ reserve_std_resources(void) standard_io_resources[0].start = RTC_PORT(0); standard_io_resources[0].end = RTC_PORT(0) + 0x10; - for (i = 0; i < ARRAY_SIZE(standard_io_resources); ++i) + for (i = 0; i < N(standard_io_resources); ++i) request_resource(io, standard_io_resources+i); } @@ -478,7 +481,7 @@ register_cpus(void) struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); if (!p) return -ENOMEM; - register_cpu(p, i); + register_cpu(p, i, NULL); } return 0; } @@ -915,13 +918,13 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) /* Search the system tables first... */ vec = NULL; - if (type < ARRAY_SIZE(systype_vecs)) { + if (type < N(systype_vecs)) { vec = systype_vecs[type]; } else if ((type > ST_API_BIAS) && - (type - ST_API_BIAS) < ARRAY_SIZE(api_vecs)) { + (type - ST_API_BIAS) < N(api_vecs)) { vec = api_vecs[type - ST_API_BIAS]; } else if ((type > ST_UNOFFICIAL_BIAS) && - (type - ST_UNOFFICIAL_BIAS) < ARRAY_SIZE(unofficial_vecs)) { + (type - ST_UNOFFICIAL_BIAS) < N(unofficial_vecs)) { vec = unofficial_vecs[type - ST_UNOFFICIAL_BIAS]; } @@ -935,11 +938,11 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) switch (type) { case ST_DEC_ALCOR: - if (member < ARRAY_SIZE(alcor_indices)) + if (member < N(alcor_indices)) vec = alcor_vecs[alcor_indices[member]]; break; case ST_DEC_EB164: - if (member < ARRAY_SIZE(eb164_indices)) + if (member < N(eb164_indices)) vec = eb164_vecs[eb164_indices[member]]; /* PC164 may show as EB164 variation with EV56 CPU, but, since no true EB164 had anything but EV5... */ @@ -947,24 +950,24 @@ get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) vec = &pc164_mv; break; case ST_DEC_EB64P: - if (member < ARRAY_SIZE(eb64p_indices)) + if (member < N(eb64p_indices)) vec = eb64p_vecs[eb64p_indices[member]]; break; case ST_DEC_EB66: - if (member < ARRAY_SIZE(eb66_indices)) + if (member < N(eb66_indices)) vec = eb66_vecs[eb66_indices[member]]; break; case ST_DEC_MARVEL: - if (member < ARRAY_SIZE(marvel_indices)) + if (member < N(marvel_indices)) vec = marvel_vecs[marvel_indices[member]]; break; case ST_DEC_TITAN: vec = titan_vecs[0]; /* default */ - if (member < ARRAY_SIZE(titan_indices)) + if (member < N(titan_indices)) vec = titan_vecs[titan_indices[member]]; break; case ST_DEC_TSUNAMI: - if (member < ARRAY_SIZE(tsunami_indices)) + if (member < N(tsunami_indices)) vec = tsunami_vecs[tsunami_indices[member]]; break; case ST_DEC_1000: @@ -1036,7 +1039,7 @@ get_sysvec_byname(const char *name) size_t i; - for (i = 0; i < ARRAY_SIZE(all_vecs); ++i) { + for (i = 0; i < N(all_vecs); ++i) { struct alpha_machine_vector *mv = all_vecs[i]; if (strcasecmp(mv->vector_name, name) == 0) return mv; @@ -1052,13 +1055,13 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu, /* If not in the tables, make it UNKNOWN, else set type name to family */ - if (type < ARRAY_SIZE(systype_names)) { + if (type < N(systype_names)) { *type_name = systype_names[type]; } else if ((type > ST_API_BIAS) && - (type - ST_API_BIAS) < ARRAY_SIZE(api_names)) { + (type - ST_API_BIAS) < N(api_names)) { *type_name = api_names[type - ST_API_BIAS]; } else if ((type > ST_UNOFFICIAL_BIAS) && - (type - ST_UNOFFICIAL_BIAS) < ARRAY_SIZE(unofficial_names)) { + (type - ST_UNOFFICIAL_BIAS) < N(unofficial_names)) { *type_name = unofficial_names[type - ST_UNOFFICIAL_BIAS]; } else { *type_name = sys_unknown; @@ -1080,7 +1083,7 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu, default: /* default to variation "0" for now */ break; case ST_DEC_EB164: - if (member < ARRAY_SIZE(eb164_indices)) + if (member < N(eb164_indices)) *variation_name = eb164_names[eb164_indices[member]]; /* PC164 may show as EB164 variation, but with EV56 CPU, so, since no true EB164 had anything but EV5... */ @@ -1088,32 +1091,32 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu, *variation_name = eb164_names[1]; /* make it PC164 */ break; case ST_DEC_ALCOR: - if (member < ARRAY_SIZE(alcor_indices)) + if (member < N(alcor_indices)) *variation_name = alcor_names[alcor_indices[member]]; break; case ST_DEC_EB64P: - if (member < ARRAY_SIZE(eb64p_indices)) + if (member < N(eb64p_indices)) *variation_name = eb64p_names[eb64p_indices[member]]; break; case ST_DEC_EB66: - if (member < ARRAY_SIZE(eb66_indices)) + if (member < N(eb66_indices)) *variation_name = eb66_names[eb66_indices[member]]; break; case ST_DEC_MARVEL: - if (member < ARRAY_SIZE(marvel_indices)) + if (member < N(marvel_indices)) *variation_name = marvel_names[marvel_indices[member]]; break; case ST_DEC_RAWHIDE: - if (member < ARRAY_SIZE(rawhide_indices)) + if (member < N(rawhide_indices)) *variation_name = rawhide_names[rawhide_indices[member]]; break; case ST_DEC_TITAN: *variation_name = titan_names[0]; /* default */ - if (member < ARRAY_SIZE(titan_indices)) + if (member < N(titan_indices)) *variation_name = titan_names[titan_indices[member]]; break; case ST_DEC_TSUNAMI: - if (member < ARRAY_SIZE(tsunami_indices)) + if (member < N(tsunami_indices)) *variation_name = tsunami_names[tsunami_indices[member]]; break; } @@ -1208,7 +1211,7 @@ show_cpuinfo(struct seq_file *f, void *slot) cpu_index = (unsigned) (cpu->type - 1); cpu_name = "Unknown"; - if (cpu_index < ARRAY_SIZE(cpu_names)) + if (cpu_index < N(cpu_names)) cpu_name = cpu_names[cpu_index]; get_sysnames(hwrpb->sys_type, hwrpb->sys_variation, diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 741da0945..2e45e8604 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -375,7 +375,7 @@ give_sigsegv: static inline void __user * get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) { - if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) + if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) sp = current->sas_ss_sp + current->sas_ss_size; return (void __user *)((sp - frame_size) & -32ul); diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c index 2636cc028..421e51ea6 100644 --- a/arch/alpha/kernel/smc37c93x.c +++ b/arch/alpha/kernel/smc37c93x.c @@ -2,6 +2,7 @@ * SMC 37C93X initialization code */ +#include #include #include diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c index 990ac6102..5c98fc83e 100644 --- a/arch/alpha/kernel/srm_env.c +++ b/arch/alpha/kernel/srm_env.c @@ -57,6 +57,7 @@ */ #include +#include #include #include #include diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 9d7dff27f..3b30d4f1f 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -5,6 +5,7 @@ * (TTY driver and console driver) */ +#include #include #include #include diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index d6926b7b1..d7f0e97fe 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c @@ -8,6 +8,7 @@ * Code supporting the ALCOR and XLT (XL-300/366/433). */ +#include #include #include #include @@ -143,7 +144,7 @@ alcor_init_irq(void) if (i >= 16+20 && i <= 16+30) continue; irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &alcor_irq_type; + irq_desc[i].handler = &alcor_irq_type; } i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c index 25a215067..8e3374d34 100644 --- a/arch/alpha/kernel/sys_cabriolet.c +++ b/arch/alpha/kernel/sys_cabriolet.c @@ -9,6 +9,7 @@ * PC164 and LX164. */ +#include #include #include #include @@ -123,7 +124,7 @@ common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r)) for (i = 16; i < 35; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &cabriolet_irq_type; + irq_desc[i].handler = &cabriolet_irq_type; } } diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index dd6103b86..d5da6b1b2 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c @@ -12,6 +12,7 @@ * Code supporting the DP264 (EV6+TSUNAMI). */ +#include #include #include #include @@ -299,7 +300,7 @@ init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax) long i; for (i = imin; i <= imax; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = ops; + irq_desc[i].handler = ops; } } diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c index ed108b66e..61a79c354 100644 --- a/arch/alpha/kernel/sys_eb64p.c +++ b/arch/alpha/kernel/sys_eb64p.c @@ -8,6 +8,7 @@ * Code supporting the EB64+ and EB66. */ +#include #include #include #include @@ -136,7 +137,7 @@ eb64p_init_irq(void) for (i = 16; i < 32; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &eb64p_irq_type; + irq_desc[i].handler = &eb64p_irq_type; } common_init_isa_dma(); diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c index 64a785baf..bd6e5f0e4 100644 --- a/arch/alpha/kernel/sys_eiger.c +++ b/arch/alpha/kernel/sys_eiger.c @@ -154,7 +154,7 @@ eiger_init_irq(void) for (i = 16; i < 128; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &eiger_irq_type; + irq_desc[i].handler = &eiger_irq_type; } } diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index 4ac2b328b..fcabb7c96 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c @@ -74,7 +74,7 @@ jensen_local_startup(unsigned int irq) * the IPL from being dropped during handler processing. */ if (irq_desc[irq].action) - irq_desc[irq].action->flags |= IRQF_DISABLED; + irq_desc[irq].action->flags |= SA_INTERRUPT; return 0; } @@ -206,11 +206,11 @@ jensen_init_irq(void) { init_i8259a_irqs(); - irq_desc[1].chip = &jensen_local_irq_type; - irq_desc[4].chip = &jensen_local_irq_type; - irq_desc[3].chip = &jensen_local_irq_type; - irq_desc[7].chip = &jensen_local_irq_type; - irq_desc[9].chip = &jensen_local_irq_type; + irq_desc[1].handler = &jensen_local_irq_type; + irq_desc[4].handler = &jensen_local_irq_type; + irq_desc[3].handler = &jensen_local_irq_type; + irq_desc[7].handler = &jensen_local_irq_type; + irq_desc[9].handler = &jensen_local_irq_type; common_init_isa_dma(); } diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 36d215954..e32fee505 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c @@ -303,7 +303,7 @@ init_io7_irqs(struct io7 *io7, /* Set up the lsi irqs. */ for (i = 0; i < 128; ++i) { irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[base + i].chip = lsi_ops; + irq_desc[base + i].handler = lsi_ops; } /* Disable the implemented irqs in hardware. */ @@ -317,7 +317,7 @@ init_io7_irqs(struct io7 *io7, /* Set up the msi irqs. */ for (i = 128; i < (128 + 512); ++i) { irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[base + i].chip = msi_ops; + irq_desc[base + i].handler = msi_ops; } for (i = 0; i < 16; ++i) @@ -335,7 +335,7 @@ marvel_init_irq(void) /* Reserve the legacy irqs. */ for (i = 0; i < 16; ++i) { irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].chip = &marvel_legacy_irq_type; + irq_desc[i].handler = &marvel_legacy_irq_type; } /* Init the io7 irqs. */ diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c index cc4c58111..d78a0daa6 100644 --- a/arch/alpha/kernel/sys_mikasa.c +++ b/arch/alpha/kernel/sys_mikasa.c @@ -8,6 +8,7 @@ * Code supporting the MIKASA (AlphaServer 1000). */ +#include #include #include #include @@ -116,7 +117,7 @@ mikasa_init_irq(void) for (i = 16; i < 32; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &mikasa_irq_type; + irq_desc[i].handler = &mikasa_irq_type; } init_i8259a_irqs(); diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c index 2d3cff7e8..65061f5d7 100644 --- a/arch/alpha/kernel/sys_noritake.c +++ b/arch/alpha/kernel/sys_noritake.c @@ -9,6 +9,7 @@ * CORELLE (AlphaServer 800), and ALCOR Primo (AlphaStation 600A). */ +#include #include #include #include @@ -138,7 +139,7 @@ noritake_init_irq(void) for (i = 16; i < 48; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &noritake_irq_type; + irq_desc[i].handler = &noritake_irq_type; } init_i8259a_irqs(); diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index 949607e3d..05888a02a 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c @@ -180,7 +180,7 @@ rawhide_init_irq(void) for (i = 16; i < 128; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &rawhide_irq_type; + irq_desc[i].handler = &rawhide_irq_type; } init_i8259a_irqs(); diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c index 5b99cf3cd..78c30decf 100644 --- a/arch/alpha/kernel/sys_ruffian.c +++ b/arch/alpha/kernel/sys_ruffian.c @@ -182,16 +182,16 @@ static unsigned long __init ruffian_get_bank_size(unsigned long offset) { unsigned long bank_addr, bank, ret = 0; - + /* Valid offsets are: 0x800, 0x840 and 0x880 since Ruffian only uses three banks. */ bank_addr = (unsigned long)PYXIS_MCR + offset; bank = *(vulp)bank_addr; - + /* Check BANK_ENABLE */ if (bank & 0x01) { static unsigned long size[] __initdata = { - 0x40000000UL, /* 0x00, 1G */ + 0x40000000UL, /* 0x00, 1G */ 0x20000000UL, /* 0x02, 512M */ 0x10000000UL, /* 0x04, 256M */ 0x08000000UL, /* 0x06, 128M */ @@ -203,7 +203,7 @@ ruffian_get_bank_size(unsigned long offset) }; bank = (bank & 0x1e) >> 1; - if (bank < ARRAY_SIZE(size)) + if (bank < sizeof(size)/sizeof(*size)) ret = size[bank]; } diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c index 6ae506052..584042430 100644 --- a/arch/alpha/kernel/sys_rx164.c +++ b/arch/alpha/kernel/sys_rx164.c @@ -117,7 +117,7 @@ rx164_init_irq(void) rx164_update_irq_hw(0); for (i = 16; i < 40; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &rx164_irq_type; + irq_desc[i].handler = &rx164_irq_type; } init_i8259a_irqs(); diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c index a7a14647b..a7ff84474 100644 --- a/arch/alpha/kernel/sys_sable.c +++ b/arch/alpha/kernel/sys_sable.c @@ -8,6 +8,7 @@ * Code supporting the Sable, Sable-Gamma, and Lynx systems. */ +#include #include #include #include @@ -536,7 +537,7 @@ sable_lynx_init_irq(int nr_irqs) for (i = 0; i < nr_irqs; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &sable_lynx_irq_type; + irq_desc[i].handler = &sable_lynx_irq_type; } common_init_isa_dma(); diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index a654014d2..131a2d9f7 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c @@ -10,13 +10,14 @@ * Kenetics's Platform 2000, Avanti (AlphaStation), XL, and AlphaBook1. */ +#include #include #include #include #include #include #include -#include +#include #include #include diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c index 2c75cd1fd..7955bdfc2 100644 --- a/arch/alpha/kernel/sys_takara.c +++ b/arch/alpha/kernel/sys_takara.c @@ -154,7 +154,7 @@ takara_init_irq(void) for (i = 16; i < 128; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = &takara_irq_type; + irq_desc[i].handler = &takara_irq_type; } common_init_isa_dma(); diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 302aab38d..2551fb49a 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c @@ -12,6 +12,7 @@ * Granite */ +#include #include #include #include @@ -188,7 +189,7 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax) long i; for (i = imin; i <= imax; ++i) { irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i].chip = ops; + irq_desc[i].handler = ops; } } @@ -279,15 +280,15 @@ titan_late_init(void) * all reported to the kernel as machine checks, so the handler * is a nop so it can be called to count the individual events. */ - request_irq(63+16, titan_intr_nop, IRQF_DISABLED, + request_irq(63+16, titan_intr_nop, SA_INTERRUPT, "CChip Error", NULL); - request_irq(62+16, titan_intr_nop, IRQF_DISABLED, + request_irq(62+16, titan_intr_nop, SA_INTERRUPT, "PChip 0 H_Error", NULL); - request_irq(61+16, titan_intr_nop, IRQF_DISABLED, + request_irq(61+16, titan_intr_nop, SA_INTERRUPT, "PChip 1 H_Error", NULL); - request_irq(60+16, titan_intr_nop, IRQF_DISABLED, + request_irq(60+16, titan_intr_nop, SA_INTERRUPT, "PChip 0 C_Error", NULL); - request_irq(59+16, titan_intr_nop, IRQF_DISABLED, + request_irq(59+16, titan_intr_nop, SA_INTERRUPT, "PChip 1 C_Error", NULL); /* @@ -348,9 +349,9 @@ privateer_init_pci(void) * Hook a couple of extra err interrupts that the * common titan code won't. */ - request_irq(53+16, titan_intr_nop, IRQF_DISABLED, + request_irq(53+16, titan_intr_nop, SA_INTERRUPT, "NMI", NULL); - request_irq(50+16, titan_intr_nop, IRQF_DISABLED, + request_irq(50+16, titan_intr_nop, SA_INTERRUPT, "Temperature Warning", NULL); /* diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index 22c5798fe..1553f4702 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c @@ -199,14 +199,14 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) if (i == 2) continue; irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i+irq_bias].chip = &wildfire_irq_type; + irq_desc[i+irq_bias].handler = &wildfire_irq_type; } irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[36+irq_bias].chip = &wildfire_irq_type; + irq_desc[36+irq_bias].handler = &wildfire_irq_type; for (i = 40; i < 64; ++i) { irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; - irq_desc[i+irq_bias].chip = &wildfire_irq_type; + irq_desc[i+irq_bias].handler = &wildfire_irq_type; } setup_irq(32+irq_bias, &isa_enable); diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index fa818f41f..1c8da544d 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S @@ -4,6 +4,7 @@ * The system call table. */ +#include /* CONFIG_OSF4_COMPAT */ #include .data diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index b191cc759..385974981 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c @@ -27,6 +27,7 @@ * 2003-06-03 R. Scott Bailey * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM */ +#include #include #include #include @@ -233,7 +234,7 @@ validate_cc_value(unsigned long cc) index = cpu->type & 0xffffffff; /* If index out of bounds, no way to validate. */ - if (index >= ARRAY_SIZE(cpu_hz)) + if (index >= sizeof(cpu_hz)/sizeof(cpu_hz[0])) return cc; /* If index contains no data, no way to validate. */ diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index d6e665d56..f9d12319e 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c @@ -8,6 +8,7 @@ * This file initializes the trap entry points */ +#include #include #include #include diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index 71470e9d9..0922e0785 100644 --- a/arch/alpha/kernel/vmlinux.lds.S +++ b/arch/alpha/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #include OUTPUT_FORMAT("elf64-alpha") diff --git a/arch/alpha/lib/callback_srm.S b/arch/alpha/lib/callback_srm.S index 8804bec2c..0528acd0d 100644 --- a/arch/alpha/lib/callback_srm.S +++ b/arch/alpha/lib/callback_srm.S @@ -2,6 +2,7 @@ * arch/alpha/lib/callback_srm.S */ +#include #include .text diff --git a/arch/alpha/lib/udelay.c b/arch/alpha/lib/udelay.c index 69d52aa37..1c879bbce 100644 --- a/arch/alpha/lib/udelay.c +++ b/arch/alpha/lib/udelay.c @@ -4,6 +4,7 @@ * Delay routines, using a pre-computed "loops_per_jiffy" value. */ +#include #include #include /* for udelay's use of smp_processor_id */ #include diff --git a/arch/alpha/mm/extable.c b/arch/alpha/mm/extable.c index dc7aeda15..c3849baeb 100644 --- a/arch/alpha/mm/extable.c +++ b/arch/alpha/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/alpha/mm/extable.c */ +#include #include #include diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index 622dabd84..64ace5a9c 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -4,6 +4,7 @@ * Copyright (C) 1995 Linus Torvalds */ +#include #include #include #include diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index f45b42f69..d513caec5 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -6,6 +6,7 @@ /* 2.3.x zone allocator, 1999 Andrea Arcangeli */ +#include #include #include #include diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c index b826f58c6..bf6b65c81 100644 --- a/arch/alpha/mm/numa.c +++ b/arch/alpha/mm/numa.c @@ -6,6 +6,7 @@ * Copyright (C) 2001 Andrea Arcangeli SuSE */ +#include #include #include #include diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c index 9fc0eeb4f..ba788cfdc 100644 --- a/arch/alpha/oprofile/common.c +++ b/arch/alpha/oprofile/common.c @@ -112,7 +112,7 @@ op_axp_create_files(struct super_block * sb, struct dentry * root) for (i = 0; i < model->num_counters; ++i) { struct dentry *dir; - char buf[4]; + char buf[3]; snprintf(buf, sizeof buf, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1ab0864f0..4c43ee0d9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -47,18 +47,6 @@ config MCA (and especially the web page given there) before attempting to build an MCA bus kernel. -config GENERIC_HARDIRQS - bool - default y - -config HARDIRQS_SW_RESEND - bool - default y - -config GENERIC_IRQ_PROBE - bool - default y - config RWSEM_GENERIC_SPINLOCK bool default y @@ -105,49 +93,15 @@ choice prompt "ARM system type" default ARCH_VERSATILE -config ARCH_AAEC2000 - bool "Agilent AAEC-2000 based" - select ARM_AMBA - help - This enables support for systems based on the Agilent AAEC-2000 - -config ARCH_INTEGRATOR - bool "ARM Ltd. Integrator family" - select ARM_AMBA - select ICST525 - help - Support for ARM's Integrator platform. - -config ARCH_REALVIEW - bool "ARM Ltd. RealView family" - select ARM_AMBA - select ICST307 - help - This enables support for ARM Ltd RealView boards. - -config ARCH_VERSATILE - bool "ARM Ltd. Versatile family" - select ARM_AMBA - select ARM_VIC - select ICST307 - help - This enables support for ARM Ltd Versatile board. - -config ARCH_AT91 - bool "Atmel AT91" - help - This enables support for systems based on the Atmel AT91RM9200 - and AT91SAM9xxx processors. - config ARCH_CLPS7500 - bool "Cirrus CL-PS7500FE" + bool "Cirrus-CL-PS7500FE" select TIMER_ACORN select ISA help Support for the Cirrus Logic PS7500FE system-on-a-chip. config ARCH_CLPS711X - bool "Cirrus Logic CLPS711x/EP721x-based" + bool "CLPS711x/EP721x-based" help Support for Cirrus Logic 711x/721x based boards. @@ -181,46 +135,32 @@ config ARCH_FOOTBRIDGE Support for systems based on the DC21285 companion chip ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. -config ARCH_NETX - bool "Hilscher NetX based" - select ARM_VIC - help - This enables support for systems based on the Hilscher NetX Soc - -config ARCH_H720X - bool "Hynix HMS720x-based" - select ISA_DMA_API - help - This enables support for systems based on the Hynix HMS720x - -config ARCH_IMX - bool "IMX" +config ARCH_INTEGRATOR + bool "Integrator" + select ARM_AMBA + select ICST525 help - Support for Motorola's i.MX family of processors (MX1, MXL). + Support for ARM's Integrator platform. config ARCH_IOP3XX bool "IOP3xx-based" - depends on MMU select PCI help Support for Intel's IOP3XX (XScale) family of processors. config ARCH_IXP4XX bool "IXP4xx-based" - depends on MMU help Support for Intel's IXP4XX (XScale) family of processors. config ARCH_IXP2000 bool "IXP2400/2800-based" - depends on MMU select PCI help Support for Intel's IXP2400/2800 (XScale) family of processors. config ARCH_IXP23XX bool "IXP23XX-based" - depends on MMU select PCI help Support for Intel's IXP23xx (XScale) family of processors. @@ -238,14 +178,8 @@ config ARCH_L7200 If you have any questions or comments about the Linux kernel port to this board, send e-mail to . -config ARCH_PNX4008 - bool "Philips Nexperia PNX4008 Mobile" - help - This enables support for Philips PNX4008 mobile platform. - config ARCH_PXA bool "PXA2xx-based" - depends on MMU select ARCH_MTD_XIP help Support for Intel's PXA2XX processor line. @@ -270,7 +204,7 @@ config ARCH_SA1100 Support for StrongARM 11x0 based boards. config ARCH_S3C2410 - bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442" + bool "Samsung S3C2410" help Samsung S3C2410X CPU based systems, such as the Simtec Electronics BAST (), the IPAQ 1940 or @@ -298,6 +232,44 @@ config ARCH_OMAP help Support for TI's OMAP platform (OMAP1 and OMAP2). +config ARCH_VERSATILE + bool "Versatile" + select ARM_AMBA + select ARM_VIC + select ICST307 + help + This enables support for ARM Ltd Versatile board. + +config ARCH_REALVIEW + bool "RealView" + select ARM_AMBA + select ICST307 + help + This enables support for ARM Ltd RealView boards. + +config ARCH_IMX + bool "IMX" + help + Support for Motorola's i.MX family of processors (MX1, MXL). + +config ARCH_H720X + bool "Hynix-HMS720x-based" + select ISA_DMA_API + help + This enables support for systems based on the Hynix HMS720x + +config ARCH_AAEC2000 + bool "Agilent AAEC-2000 based" + select ARM_AMBA + help + This enables support for systems based on the Agilent AAEC-2000 + +config ARCH_AT91RM9200 + bool "AT91RM9200" + help + Say Y here if you intend to run this kernel on an Atmel + AT91RM9200-based board. + endchoice source "arch/arm/mach-clps711x/Kconfig" @@ -342,8 +314,6 @@ source "arch/arm/mach-realview/Kconfig" source "arch/arm/mach-at91rm9200/Kconfig" -source "arch/arm/mach-netx/Kconfig" - # Definitions to make life easier config ARCH_ACORN bool @@ -356,10 +326,6 @@ config XSCALE_PMU depends on CPU_XSCALE && !XSCALE_PMU_TIMER default y -if !MMU -source "arch/arm/Kconfig-nommu" -endif - endmenu source "arch/arm/common/Kconfig" @@ -393,7 +359,7 @@ config ISA_DMA_API bool config PCI - bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX + bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB help Find out whether you have a PCI motherboard. PCI is the name of a bus system, i.e. the way the CPU talks to the other stuff inside @@ -559,7 +525,7 @@ config LEDS ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ - ARCH_AT91RM9200 || MACH_TRIZEPS4 + ARCH_AT91RM9200 help If you say Y here, the LEDs on your machine will be used to provide useful information about your current system status. @@ -690,7 +656,7 @@ config XIP_PHYS_ADDR endmenu -if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP) +if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1) menu "CPU Frequency scaling" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 92873cdee..6f8e84c1c 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -47,8 +47,7 @@ comma = , # testing for a specific architecture or later rather impossible. arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6) arch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k) -arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t) -arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t +arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4) arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 @@ -115,10 +114,8 @@ endif machine-$(CONFIG_ARCH_H720X) := h720x machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 machine-$(CONFIG_ARCH_REALVIEW) := realview - machine-$(CONFIG_ARCH_AT91) := at91rm9200 + machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 machine-$(CONFIG_ARCH_EP93XX) := ep93xx - machine-$(CONFIG_ARCH_PNX4008) := pnx4008 - machine-$(CONFIG_ARCH_NETX) := netx ifeq ($(CONFIG_ARCH_EBSA110),y) # This is what happens if you forget the IOCS16 line. @@ -178,7 +175,7 @@ boot := arch/arm/boot # them changed. We use .arch to indicate when they were updated # last, otherwise make uses the target directory mtime. -include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/auto.conf +include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/MARKER @echo ' SYMLINK include/asm-arm/arch -> include/asm-arm/$(INCDIR)' ifneq ($(KBUILD_SRC),) $(Q)mkdir -p include/asm-arm diff --git a/arch/arm/boot/compressed/head-at91rm9200.S b/arch/arm/boot/compressed/head-at91rm9200.S index d68b9acd8..2119ea62b 100644 --- a/arch/arm/boot/compressed/head-at91rm9200.S +++ b/arch/arm/boot/compressed/head-at91rm9200.S @@ -49,24 +49,6 @@ cmp r7, r3 beq 99f - @ Embest ATEB9200 : 923 - mov r3, #(MACH_TYPE_ATEB9200 & 0xff) - orr r3, r3, #(MACH_TYPE_ATEB9200 & 0xff00) - cmp r7, r3 - beq 99f - - @ Sperry-Sun KAFA : 662 - mov r3, #(MACH_TYPE_KAFA & 0xff) - orr r3, r3, #(MACH_TYPE_KAFA & 0xff00) - cmp r7, r3 - beq 99f - - @ Ajeco 1ARM : 1075 - mov r3, #(MACH_TYPE_ONEARM & 0xff) - orr r3, r3, #(MACH_TYPE_ONEARM & 0xff00) - cmp r7, r3 - beq 99f - @ Unknown board, use the AT91RM9200DK board @ mov r7, #MACH_TYPE_AT91RM9200 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff) diff --git a/arch/arm/boot/compressed/head-clps7500.S b/arch/arm/boot/compressed/head-clps7500.S index 941c5f5cb..4a8a689d1 100644 --- a/arch/arm/boot/compressed/head-clps7500.S +++ b/arch/arm/boot/compressed/head-clps7500.S @@ -4,6 +4,7 @@ * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd */ +#include /* There are three different ways the kernel can be booted on a 7500 system: from Angel (loaded in RAM), from diff --git a/arch/arm/boot/compressed/head-l7200.S b/arch/arm/boot/compressed/head-l7200.S index d0e3b2085..b08bd23f8 100644 --- a/arch/arm/boot/compressed/head-l7200.S +++ b/arch/arm/boot/compressed/head-l7200.S @@ -7,6 +7,7 @@ * is merged with head.S by the linker. */ +#include #include #ifndef CONFIG_ARCH_L7200 diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S index 4c8c0e460..5aefffd46 100644 --- a/arch/arm/boot/compressed/head-sa1100.S +++ b/arch/arm/boot/compressed/head-sa1100.S @@ -7,6 +7,7 @@ * */ +#include #include #include diff --git a/arch/arm/boot/compressed/head-sharpsl.S b/arch/arm/boot/compressed/head-sharpsl.S index eb0084ea1..59ad69640 100644 --- a/arch/arm/boot/compressed/head-sharpsl.S +++ b/arch/arm/boot/compressed/head-sharpsl.S @@ -12,6 +12,7 @@ * */ +#include #include #include diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index 73c5d9e02..d3fe25339 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S @@ -5,6 +5,7 @@ * */ +#include #include #include diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 14a9ff9c6..b56f5e691 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -8,6 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include /* @@ -447,11 +448,8 @@ __common_mmu_cache_on: mov r1, #-1 mcr p15, 0, r3, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c3, c0, 0 @ load domain access control - b 1f - .align 5 @ cache line aligned -1: mcr p15, 0, r0, c1, c0, 0 @ load control register - mrc p15, 0, r0, c1, c0, 0 @ and read it back to - sub pc, lr, r0, lsr #32 @ properly flush pipeline + mcr p15, 0, r0, c1, c0, 0 @ load control register + mov pc, lr /* * All code following this line is relocatable. It is relocated by @@ -607,8 +605,8 @@ proc_types: b __armv4_mmu_cache_off b __armv4_mmu_cache_flush - .word 0x0007b000 @ ARMv6 - .word 0x0007f000 + .word 0x00070000 @ ARMv6 + .word 0x000f0000 b __armv4_mmu_cache_on b __armv4_mmu_cache_off b __armv6_mmu_cache_flush diff --git a/arch/arm/boot/compressed/ll_char_wr.S b/arch/arm/boot/compressed/ll_char_wr.S index 8517c8606..d7bbd9da2 100644 --- a/arch/arm/boot/compressed/ll_char_wr.S +++ b/arch/arm/boot/compressed/ll_char_wr.S @@ -77,7 +77,7 @@ Lrow4bpplp: subne r1, r1, #1 ldrneb r7, [r6, r1] bne Lrow4bpplp - ldmfd sp!, {r4 - r7, pc} + LOADREGS(fd, sp!, {r4 - r7, pc}) @ @ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc) @@ -105,7 +105,7 @@ Lrow8bpplp: subne r1, r1, #1 ldrneb r7, [r6, r1] bne Lrow8bpplp - ldmfd sp!, {r4 - r7, pc} + LOADREGS(fd, sp!, {r4 - r7, pc}) @ @ Smashable regs: {r0 - r3}, [r4], {r5, r6}, [r7], (r8 - fp), [ip], (sp), [lr], (pc) @@ -127,7 +127,7 @@ Lrow1bpp: strb r7, [r0], r5 mov r7, r7, lsr #8 strb r7, [r0], r5 - ldmfd sp!, {r4 - r7, pc} + LOADREGS(fd, sp!, {r4 - r7, pc}) .bss ENTRY(con_charconvtable) diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index e1289a256..847e3e635 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile @@ -16,4 +16,3 @@ obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o obj-$(CONFIG_SHARP_SCOOP) += scoop.o obj-$(CONFIG_ARCH_IXP2000) += uengine.o -obj-$(CONFIG_ARCH_IXP23XX) += uengine.o diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 028bdc922..7971d0dc6 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -77,8 +77,6 @@ struct dmabounce_device_info { #endif struct dmabounce_pool small; struct dmabounce_pool large; - - rwlock_t lock; }; static LIST_HEAD(dmabounce_devs); @@ -118,7 +116,6 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, struct safe_buffer *buf; struct dmabounce_pool *pool; struct device *dev = device_info->dev; - unsigned long flags; dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", __func__, ptr, size, dir); @@ -166,12 +163,8 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, print_alloc_stats(device_info); #endif - write_lock_irqsave(&device_info->lock, flags); - list_add(&buf->node, &device_info->safe_buffers); - write_unlock_irqrestore(&device_info->lock, flags); - return buf; } @@ -179,34 +172,22 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, static inline struct safe_buffer * find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) { - struct safe_buffer *b, *rb = NULL; - unsigned long flags; - - read_lock_irqsave(&device_info->lock, flags); + struct safe_buffer *b; list_for_each_entry(b, &device_info->safe_buffers, node) - if (b->safe_dma_addr == safe_dma_addr) { - rb = b; - break; - } + if (b->safe_dma_addr == safe_dma_addr) + return b; - read_unlock_irqrestore(&device_info->lock, flags); - return rb; + return NULL; } static inline void free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *buf) { - unsigned long flags; - dev_dbg(device_info->dev, "%s(buf=%p)\n", __func__, buf); - write_lock_irqsave(&device_info->lock, flags); - list_del(&buf->node); - write_unlock_irqrestore(&device_info->lock, flags); - if (buf->pool) dma_pool_free(buf->pool->pool, buf->safe, buf->safe_dma_addr); else @@ -415,6 +396,7 @@ dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, enum dma_data_direction dir) { + unsigned long flags; dma_addr_t dma_addr; dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", @@ -422,8 +404,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size, BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + dma_addr = map_single(dev, ptr, size, dir); + local_irq_restore(flags); + return dma_addr; } @@ -438,18 +424,25 @@ void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) { + unsigned long flags; + dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", __func__, (void *) dma_addr, size, dir); BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + unmap_single(dev, dma_addr, size, dir); + + local_irq_restore(flags); } int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) { + unsigned long flags; int i; dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n", @@ -457,6 +450,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + for (i = 0; i < nents; i++, sg++) { struct page *page = sg->page; unsigned int offset = sg->offset; @@ -467,6 +462,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, map_single(dev, ptr, length, dir); } + local_irq_restore(flags); + return nents; } @@ -474,6 +471,7 @@ void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) { + unsigned long flags; int i; dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n", @@ -481,38 +479,55 @@ dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + for (i = 0; i < nents; i++, sg++) { dma_addr_t dma_addr = sg->dma_address; unsigned int length = sg->length; unmap_single(dev, dma_addr, length, dir); } + + local_irq_restore(flags); } void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) { + unsigned long flags; + dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", __func__, (void *) dma_addr, size, dir); + local_irq_save(flags); + sync_single(dev, dma_addr, size, dir); + + local_irq_restore(flags); } void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) { + unsigned long flags; + dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", __func__, (void *) dma_addr, size, dir); + local_irq_save(flags); + sync_single(dev, dma_addr, size, dir); + + local_irq_restore(flags); } void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) { + unsigned long flags; int i; dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n", @@ -520,18 +535,23 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + for (i = 0; i < nents; i++, sg++) { dma_addr_t dma_addr = sg->dma_address; unsigned int length = sg->length; sync_single(dev, dma_addr, length, dir); } + + local_irq_restore(flags); } void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir) { + unsigned long flags; int i; dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n", @@ -539,12 +559,16 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, BUG_ON(dir == DMA_NONE); + local_irq_save(flags); + for (i = 0; i < nents; i++, sg++) { dma_addr_t dma_addr = sg->dma_address; unsigned int length = sg->length; sync_single(dev, dma_addr, length, dir); } + + local_irq_restore(flags); } static int @@ -598,7 +622,6 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, device_info->dev = dev; INIT_LIST_HEAD(&device_info->safe_buffers); - rwlock_init(&device_info->lock); #ifdef STATS device_info->total_allocs = 0; diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index f3e020f22..c02dc8116 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -33,7 +33,6 @@ static void __iomem *gic_dist_base; static void __iomem *gic_cpu_base; -static DEFINE_SPINLOCK(irq_controller_lock); /* * Routines to acknowledge, disable and enable interrupts @@ -53,55 +52,41 @@ static DEFINE_SPINLOCK(irq_controller_lock); static void gic_ack_irq(unsigned int irq) { u32 mask = 1 << (irq % 32); - - spin_lock(&irq_controller_lock); writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); writel(irq, gic_cpu_base + GIC_CPU_EOI); - spin_unlock(&irq_controller_lock); } static void gic_mask_irq(unsigned int irq) { u32 mask = 1 << (irq % 32); - - spin_lock(&irq_controller_lock); writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); - spin_unlock(&irq_controller_lock); } static void gic_unmask_irq(unsigned int irq) { u32 mask = 1 << (irq % 32); - - spin_lock(&irq_controller_lock); writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4); - spin_unlock(&irq_controller_lock); } #ifdef CONFIG_SMP -static void gic_set_cpu(unsigned int irq, cpumask_t mask_val) +static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu) { void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3); unsigned int shift = (irq % 4) * 8; - unsigned int cpu = first_cpu(mask_val); u32 val; - spin_lock(&irq_controller_lock); - irq_desc[irq].cpu = cpu; val = readl(reg) & ~(0xff << shift); val |= 1 << (cpu + shift); writel(val, reg); - spin_unlock(&irq_controller_lock); } #endif -static struct irq_chip gic_chip = { - .name = "GIC", +static struct irqchip gic_chip = { .ack = gic_ack_irq, .mask = gic_mask_irq, .unmask = gic_unmask_irq, #ifdef CONFIG_SMP - .set_affinity = gic_set_cpu, + .set_cpu = gic_set_cpu, #endif }; diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 4e0dcaef6..a7dc13706 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -15,6 +15,7 @@ * Based on sa1111.c */ +#include #include #include #include @@ -204,8 +205,7 @@ static void locomo_unmask_irq(unsigned int irq) locomo_writel(r, mapbase + LOCOMO_ICR); } -static struct irq_chip locomo_chip = { - .name = "LOCOMO", +static struct irqchip locomo_chip = { .ack = locomo_ack_irq, .mask = locomo_mask_irq, .unmask = locomo_unmask_irq, @@ -250,8 +250,7 @@ static void locomo_key_unmask_irq(unsigned int irq) locomo_writel(r, mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); } -static struct irq_chip locomo_key_chip = { - .name = "LOCOMO-key", +static struct irqchip locomo_key_chip = { .ack = locomo_key_ack_irq, .mask = locomo_key_mask_irq, .unmask = locomo_key_unmask_irq, @@ -314,8 +313,7 @@ static void locomo_gpio_unmask_irq(unsigned int irq) locomo_writel(r, mapbase + LOCOMO_GIE); } -static struct irq_chip locomo_gpio_chip = { - .name = "LOCOMO-gpio", +static struct irqchip locomo_gpio_chip = { .ack = locomo_gpio_ack_irq, .mask = locomo_gpio_mask_irq, .unmask = locomo_gpio_unmask_irq, @@ -360,8 +358,7 @@ static void locomo_lt_unmask_irq(unsigned int irq) locomo_writel(r, mapbase + LOCOMO_LTINT); } -static struct irq_chip locomo_lt_chip = { - .name = "LOCOMO-lt", +static struct irqchip locomo_lt_chip = { .ack = locomo_lt_ack_irq, .mask = locomo_lt_mask_irq, .unmask = locomo_lt_unmask_irq, @@ -422,8 +419,7 @@ static void locomo_spi_unmask_irq(unsigned int irq) locomo_writel(r, mapbase + LOCOMO_SPIIE); } -static struct irq_chip locomo_spi_chip = { - .name = "LOCOMO-spi", +static struct irqchip locomo_spi_chip = { .ack = locomo_spi_ack_irq, .mask = locomo_spi_mask_irq, .unmask = locomo_spi_unmask_irq, @@ -511,7 +507,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) goto out; } - strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id)); + strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id)); /* * If the parent device has a DMA mask associated with it, * propagate it down to the children. @@ -633,6 +629,21 @@ static int locomo_resume(struct platform_device *dev) #endif +#define LCM_ALC_EN 0x8000 + +void frontlight_set(struct locomo *lchip, int duty, int vr, int bpwf) +{ + unsigned long flags; + + spin_lock_irqsave(&lchip->lock, flags); + locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + udelay(100); + locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); + locomo_writel(bpwf | LCM_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); + spin_unlock_irqrestore(&lchip->lock, flags); +} + + /** * locomo_probe - probe for a single LoCoMo chip. * @phys_addr: physical address of device. @@ -687,10 +698,14 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) , lchip->base + LOCOMO_GPD); locomo_writel(0, lchip->base + LOCOMO_GIE); - /* Frontlight */ + /* FrontLight */ locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); locomo_writel(0, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); + /* Same constants can be used for collie and poodle + (depending on CONFIG options in original sharp code)? */ + frontlight_set(lchip, 163, 0, 148); + /* Longtime timer */ locomo_writel(0, lchip->base + LOCOMO_LTINT); /* SPI */ @@ -734,6 +749,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) for (i = 0; i < ARRAY_SIZE(locomo_devices); i++) locomo_init_one_child(lchip, &locomo_devices[i]); + return 0; out: @@ -1046,30 +1062,6 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int spin_unlock_irqrestore(&lchip->lock, flags); } -/* - * Frontlight control - */ - -static struct locomo *locomo_chip_driver(struct locomo_dev *ldev); - -void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) -{ - unsigned long flags; - struct locomo *lchip = locomo_chip_driver(dev); - - if (vr) - locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 1); - else - locomo_gpio_write(dev, LOCOMO_GPIO_FL_VR, 0); - - spin_lock_irqsave(&lchip->lock, flags); - locomo_writel(bpwf, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); - udelay(100); - locomo_writel(duty, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALD); - locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); - spin_unlock_irqrestore(&lchip->lock, flags); -} - /* * LoCoMo "Register Access Bus." * diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c index 4e5445cfb..35c9a64ac 100644 --- a/arch/arm/common/rtctime.c +++ b/arch/arm/common/rtctime.c @@ -68,7 +68,6 @@ void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc rtc_time_to_tm(next_time, next); } } -EXPORT_SYMBOL(rtc_next_alarm_time); static inline int rtc_arm_read_time(struct rtc_ops *ops, struct rtc_time *tm) { diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 29818bd32..3f68db84e 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -14,6 +14,7 @@ * All initialization functions provided here are intended to be called * from machine specific code with proper arguments when required. */ +#include #include #include #include @@ -150,7 +151,7 @@ static void sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) { unsigned int stat0, stat1, i; - void __iomem *base = get_irq_data(irq); + void __iomem *base = desc->data; stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); @@ -168,11 +169,11 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1) if (stat0 & 1) - handle_edge_irq(i, irq_desc + i, regs); + do_edge_IRQ(i, irq_desc + i, regs); for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1) if (stat1 & 1) - handle_edge_irq(i, irq_desc + i, regs); + do_edge_IRQ(i, irq_desc + i, regs); /* For level-based interrupts */ desc->chip->unmask(irq); @@ -272,8 +273,7 @@ static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) return 0; } -static struct irq_chip sa1111_low_chip = { - .name = "SA1111-l", +static struct irqchip sa1111_low_chip = { .ack = sa1111_ack_irq, .mask = sa1111_mask_lowirq, .unmask = sa1111_unmask_lowirq, @@ -369,8 +369,7 @@ static int sa1111_wake_highirq(unsigned int irq, unsigned int on) return 0; } -static struct irq_chip sa1111_high_chip = { - .name = "SA1111-h", +static struct irqchip sa1111_high_chip = { .ack = sa1111_ack_irq, .mask = sa1111_mask_highirq, .unmask = sa1111_unmask_highirq, @@ -618,7 +617,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) { struct sa1111 *sachip; unsigned long id; - unsigned int has_devs; + unsigned int has_devs, val; int i, ret = -ENODEV; sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL); @@ -669,9 +668,6 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) sa1111_wake(sachip); #ifdef CONFIG_ARCH_SA1100 - { - unsigned int val; - /* * The SDRAM configuration of the SA1110 and the SA1111 must * match. This is very important to ensure that SA1111 accesses @@ -695,7 +691,6 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) * Enable the SA1110 memory bus request and grant signals. */ sa1110_mb_enable(); - } #endif /* diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 59b5ddec4..3cd8c9ee4 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -49,6 +49,13 @@ #define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */ #define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */ +#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ +#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */ +#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */ +#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */ +#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */ +#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */ + /* * Prototypes */ @@ -75,13 +82,12 @@ DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger); static int get_percentage(int voltage) { int i = sharpsl_pm.machinfo->bat_levels - 1; - int bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_status() : 0; struct battery_thresh *thresh; if (sharpsl_pm.charge_mode == CHRG_ON) - thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_acin; + thresh=sharpsl_pm.machinfo->bat_levels_acin; else - thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noac; + thresh=sharpsl_pm.machinfo->bat_levels_noac; while (i > 0 && (voltage > thresh[i].voltage)) i--; @@ -125,7 +131,7 @@ static void sharpsl_battery_thread(void *private_) sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_ONLINE : APM_AC_OFFLINE); /* Corgi cannot confirm when battery fully charged so periodically kick! */ - if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON) + if (machine_is_corgi() && (sharpsl_pm.charge_mode == CHRG_ON) && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL)) schedule_work(&toggle_charger); @@ -160,11 +166,11 @@ static void sharpsl_battery_thread(void *private_) && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) || (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) { if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) { - sharpsl_pm.machinfo->backlight_limit(1); + corgibl_limit_intensity(1); sharpsl_pm.flags |= SHARPSL_BL_LIMIT; } } else if (sharpsl_pm.flags & SHARPSL_BL_LIMIT) { - sharpsl_pm.machinfo->backlight_limit(0); + corgibl_limit_intensity(0); sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT; } @@ -412,10 +418,8 @@ static int sharpsl_check_battery_temp(void) val = get_select_val(buff); dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val); - if (val > sharpsl_pm.machinfo->charge_on_temp) { - printk(KERN_WARNING "Not charging: temperature out of limits.\n"); + if (val > SHARPSL_CHARGE_ON_TEMP) return -1; - } return 0; } @@ -446,7 +450,7 @@ static int sharpsl_check_battery_voltage(void) val = get_select_val(buff); dev_dbg(sharpsl_pm.dev, "Battery Voltage: %d\n", val); - if (val < sharpsl_pm.machinfo->charge_on_volt) + if (val < SHARPSL_CHARGE_ON_VOLT) return -1; return 0; @@ -464,7 +468,7 @@ static int sharpsl_ac_check(void) temp = get_select_val(buff); dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n",temp); - if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low)) { + if ((temp > SHARPSL_CHARGE_ON_ACIN_HIGH) || (temp < SHARPSL_CHARGE_ON_ACIN_LOW)) { dev_err(sharpsl_pm.dev, "Error: AC check failed.\n"); return -1; } @@ -623,8 +627,8 @@ static int sharpsl_fatal_check(void) temp = get_select_val(buff); dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %d\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); - if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) || - (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt))) + if ((acin && (temp < SHARPSL_FATAL_ACIN_VOLT)) || + (!acin && (temp < SHARPSL_FATAL_NOACIN_VOLT))) return -1; return 0; } diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c index 3f60dd9ac..486add853 100644 --- a/arch/arm/common/time-acorn.c +++ b/arch/arm/common/time-acorn.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -77,7 +76,7 @@ ioc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction ioc_timer_irq = { .name = "timer", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .handler = ioc_timer_interrupt }; diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c index 95c8508c2..a1310b710 100644 --- a/arch/arm/common/uengine.c +++ b/arch/arm/common/uengine.c @@ -11,32 +11,17 @@ * License, or (at your option) any later version. */ +#include #include #include #include #include #include #include -#include +#include #include #include -#if defined(CONFIG_ARCH_IXP2000) -#define IXP_UENGINE_CSR_VIRT_BASE IXP2000_UENGINE_CSR_VIRT_BASE -#define IXP_PRODUCT_ID IXP2000_PRODUCT_ID -#define IXP_MISC_CONTROL IXP2000_MISC_CONTROL -#define IXP_RESET1 IXP2000_RESET1 -#else -#if defined(CONFIG_ARCH_IXP23XX) -#define IXP_UENGINE_CSR_VIRT_BASE IXP23XX_UENGINE_CSR_VIRT_BASE -#define IXP_PRODUCT_ID IXP23XX_PRODUCT_ID -#define IXP_MISC_CONTROL IXP23XX_MISC_CONTROL -#define IXP_RESET1 IXP23XX_RESET1 -#else -#error unknown platform -#endif -#endif - #define USTORE_ADDRESS 0x000 #define USTORE_DATA_LOWER 0x004 #define USTORE_DATA_UPPER 0x008 @@ -58,7 +43,7 @@ u32 ixp2000_uengine_mask; static void *ixp2000_uengine_csr_area(int uengine) { - return ((void *)IXP_UENGINE_CSR_VIRT_BASE) + (uengine << 10); + return ((void *)IXP2000_UENGINE_CSR_VIRT_BASE) + (uengine << 10); } /* @@ -106,13 +91,8 @@ EXPORT_SYMBOL(ixp2000_uengine_csr_write); void ixp2000_uengine_reset(u32 uengine_mask) { - u32 value; - - value = ixp2000_reg_read(IXP_RESET1) & ~ixp2000_uengine_mask; - - uengine_mask &= ixp2000_uengine_mask; - ixp2000_reg_wrb(IXP_RESET1, value | uengine_mask); - ixp2000_reg_wrb(IXP_RESET1, value); + ixp2000_reg_wrb(IXP2000_RESET1, uengine_mask & ixp2000_uengine_mask); + ixp2000_reg_wrb(IXP2000_RESET1, 0); } EXPORT_SYMBOL(ixp2000_uengine_reset); @@ -255,12 +235,11 @@ static int check_ixp_type(struct ixp2000_uengine_code *c) u32 product_id; u32 rev; - product_id = ixp2000_reg_read(IXP_PRODUCT_ID); + product_id = ixp2000_reg_read(IXP2000_PRODUCT_ID); if (((product_id >> 16) & 0x1f) != 0) return 0; switch ((product_id >> 8) & 0xff) { -#ifdef CONFIG_ARCH_IXP2000 case 0: /* IXP2800 */ if (!(c->cpu_model_bitmask & 4)) return 0; @@ -275,14 +254,6 @@ static int check_ixp_type(struct ixp2000_uengine_code *c) if (!(c->cpu_model_bitmask & 2)) return 0; break; -#endif - -#ifdef CONFIG_ARCH_IXP23XX - case 4: /* IXP23xx */ - if (!(c->cpu_model_bitmask & 0x3f0)) - return 0; - break; -#endif default: return 0; @@ -461,8 +432,7 @@ static int __init ixp2000_uengine_init(void) /* * Determine number of microengines present. */ - switch ((ixp2000_reg_read(IXP_PRODUCT_ID) >> 8) & 0x1fff) { -#ifdef CONFIG_ARCH_IXP2000 + switch ((ixp2000_reg_read(IXP2000_PRODUCT_ID) >> 8) & 0x1fff) { case 0: /* IXP2800 */ case 1: /* IXP2850 */ ixp2000_uengine_mask = 0x00ff00ff; @@ -471,17 +441,10 @@ static int __init ixp2000_uengine_init(void) case 2: /* IXP2400 */ ixp2000_uengine_mask = 0x000f000f; break; -#endif - -#ifdef CONFIG_ARCH_IXP23XX - case 4: /* IXP23xx */ - ixp2000_uengine_mask = (*IXP23XX_EXP_CFG_FUSE >> 8) & 0xf; - break; -#endif default: printk(KERN_INFO "Detected unknown IXP2000 model (%.8x)\n", - (unsigned int)ixp2000_reg_read(IXP_PRODUCT_ID)); + (unsigned int)ixp2000_reg_read(IXP2000_PRODUCT_ID)); ixp2000_uengine_mask = 0x00000000; break; } @@ -494,15 +457,15 @@ static int __init ixp2000_uengine_init(void) /* * Synchronise timestamp counters across all microengines. */ - value = ixp2000_reg_read(IXP_MISC_CONTROL); - ixp2000_reg_wrb(IXP_MISC_CONTROL, value & ~0x80); + value = ixp2000_reg_read(IXP2000_MISC_CONTROL); + ixp2000_reg_wrb(IXP2000_MISC_CONTROL, value & ~0x80); for (uengine = 0; uengine < 32; uengine++) { if (ixp2000_uengine_mask & (1 << uengine)) { ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0); ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0); } } - ixp2000_reg_wrb(IXP_MISC_CONTROL, value | 0x80); + ixp2000_reg_wrb(IXP2000_MISC_CONTROL, value | 0x80); return 0; } diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c index ba2e62986..ef716a5b0 100644 --- a/arch/arm/common/via82c505.c +++ b/arch/arm/common/via82c505.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 43d278134..a19bc4a61 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c @@ -39,8 +39,7 @@ static void vic_unmask_irq(unsigned int irq) writel(1 << irq, base + VIC_INT_ENABLE); } -static struct irq_chip vic_chip = { - .name = "VIC", +static struct irqchip vic_chip = { .ack = vic_mask_irq, .mask = vic_mask_irq, .unmask = vic_unmask_irq, diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig index 4f3d8d377..9e1c1cceb 100644 --- a/arch/arm/configs/at91rm9200dk_defconfig +++ b/arch/arm/configs/at91rm9200dk_defconfig @@ -103,7 +103,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set # CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91RM9200=y # diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index 08b5dc388..6e0805a97 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig @@ -103,7 +103,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set # CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91RM9200=y # diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig deleted file mode 100644 index bee7813d0..000000000 --- a/arch/arm/configs/ateb9200_defconfig +++ /dev/null @@ -1,1313 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-rc3 -# Sun May 7 16:53:18 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y - -# -# AT91RM9200 Implementations -# - -# -# AT91RM9200 Board Type -# -# CONFIG_ARCH_AT91RM9200DK is not set -# CONFIG_MACH_AT91RM9200EK is not set -# CONFIG_MACH_CSB337 is not set -# CONFIG_MACH_CSB637 is not set -# CONFIG_MACH_CARMEVA is not set -# CONFIG_MACH_KB9200 is not set -CONFIG_MACH_ATEB9200=y -# CONFIG_MACH_KAFA is not set - -# -# AT91 Feature Selections -# -# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y - -# -# PC-card bridges -# -CONFIG_AT91_CF=m - -# -# Kernel Features -# -CONFIG_PREEMPT=y -CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -CONFIG_LLC=m -# 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 - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -# CONFIG_IEEE80211_SOFTMAC is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -# CONFIG_MTD_BLOCK is not set -CONFIG_MTD_BLOCK_RO=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_AT91_DATAFLASH=y -# CONFIG_MTD_AT91_DATAFLASH_CARD is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -CONFIG_DAVICOM_PHY=y -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -# CONFIG_NET_WIRELESS_RTNETLINK is not set - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -# CONFIG_PCMCIA_WAVELAN is not set -# CONFIG_PCMCIA_NETWAVE is not set - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -# CONFIG_AIRO_CS is not set -# CONFIG_PCMCIA_WL3501 is not set -# CONFIG_HOSTAP is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN 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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL is not set -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_CARDMAN_4000 is not set -# CONFIG_CARDMAN_4040 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_AT91_SPI=y -CONFIG_AT91_SPIDEV=y - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -CONFIG_I2C_AT91=m -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -# CONFIG_SND is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -CONFIG_USB_USBNET=y -CONFIG_USB_NET_AX8817X=y -CONFIG_USB_NET_CDCETHER=y -CONFIG_USB_NET_GL620A=y -CONFIG_USB_NET_NET1080=y -CONFIG_USB_NET_PLUSB=y -CONFIG_USB_NET_RNDIS_HOST=y -CONFIG_USB_NET_CDC_SUBSET=y -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=y -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ANYDATA is not set -# CONFIG_USB_SERIAL_BELKIN is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -CONFIG_USB_SERIAL_CP2101=m -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set -# CONFIG_USB_SERIAL_VISOR is not set -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set -# CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OPTION is not set -# CONFIG_USB_SERIAL_OMNINET is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=m -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -CONFIG_USB_GADGET_AT91=y -CONFIG_USB_AT91=m -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=m -CONFIG_USB_ETH_RNDIS=y -CONFIG_USB_GADGETFS=m -CONFIG_USB_FILE_STORAGE=m -# CONFIG_USB_FILE_STORAGE_TEST is not set -CONFIG_USB_G_SERIAL=m - -# -# MMC/SD Card support -# -CONFIG_MMC=m -CONFIG_MMC_DEBUG=y -CONFIG_MMC_BLOCK=m -CONFIG_MMC_AT91RM9200=m - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_AT91=y -# CONFIG_RTC_DRV_TEST is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=m -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -CONFIG_NTFS_RW=y - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -CONFIG_CRAMFS=y -# 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=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -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=m -# 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_ASCII=m -# 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=m -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_FS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -# CONFIG_DEBUG_USER is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig deleted file mode 100644 index 8a075c8ec..000000000 --- a/arch/arm/configs/carmeva_defconfig +++ /dev/null @@ -1,724 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc4 -# Tue Jun 14 12:05:24 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_IOMAP=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_SWAP=y -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_SYSCTL is not set -# CONFIG_AUDIT is not set -# CONFIG_HOTPLUG is not set -CONFIG_KOBJECT_UEVENT=y -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y - -# -# AT91RM9200 Implementations -# -# CONFIG_ARCH_AT91RM9200DK is not set -# CONFIG_MACH_AT91RM9200EK is not set -# CONFIG_MACH_CSB337 is not set -# CONFIG_MACH_CSB637 is not set -CONFIG_MACH_CARMEVA=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set - -# -# Bus support -# -CONFIG_ISA_DMA_API=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_SMP is not set -# CONFIG_PREEMPT is not set -# CONFIG_DISCONTIGMEM is not set -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -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 -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set - -# -# 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_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_AT91_DATAFLASH=y -# CONFIG_MTD_AT91_DATAFLASH_CARD is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_PACKET is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_IP_TCPDIAG=y -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -CONFIG_ARM_AT91_ETHER_RMII=y -# CONFIG_SMC91X is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=m -CONFIG_SERIO_SERPORT=m -# CONFIG_SERIO_LIBPS2 is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=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 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# 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_AT91_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -CONFIG_AT91_SPI=y -CONFIG_AT91_SPIDEV=y - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -CONFIG_MMC_DEBUG=y -CONFIG_MMC_BLOCK=m -CONFIG_MMC_AT91RM9200=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -# CONFIG_EXT2_FS_POSIX_ACL is not set -# CONFIG_EXT2_FS_SECURITY is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -# CONFIG_TMPFS is not set -# 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_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS_FS=y -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_NAND=y -# CONFIG_JFFS2_FS_NOR_ECC is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE 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 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=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_FRAME_POINTER=y -# CONFIG_DEBUG_USER is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig index cf3fa5cb2..94bd9932a 100644 --- a/arch/arm/configs/csb337_defconfig +++ b/arch/arm/configs/csb337_defconfig @@ -103,7 +103,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set # CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91RM9200=y # @@ -621,8 +620,9 @@ CONFIG_AT91_WATCHDOG=y # USB-based Watchdog Cards # # CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set +CONFIG_RTC=y +# CONFIG_AT91_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -955,41 +955,9 @@ CONFIG_USB_AT91=y CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set CONFIG_MMC_BLOCK=y +# CONFIG_MMC_WBSD is not set CONFIG_MMC_AT91RM9200=y -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc1" - -# -# RTC interfaces -# -# CONFIG_RTC_INTF_SYSFS is not set -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -CONFIG_RTC_DRV_DS1307=y -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_AT91=y -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_V3020 is not set - # # File systems # diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig index 640d70c1f..1519124c5 100644 --- a/arch/arm/configs/csb637_defconfig +++ b/arch/arm/configs/csb637_defconfig @@ -103,7 +103,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set # CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91RM9200=y # diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig index 2948b4589..b69e88bbc 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig @@ -1,18 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1-git9 -# Sat Jul 15 15:08:10 2006 +# Linux kernel version: 2.6.17-rc2 +# Wed Apr 19 21:21:01 2006 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -30,7 +26,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y @@ -48,15 +43,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -89,26 +83,18 @@ CONFIG_DEFAULT_IOSCHED="deadline" # # System Type # -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set CONFIG_ARCH_EP93XX=y # CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set @@ -116,18 +102,20 @@ CONFIG_ARCH_EP93XX=y # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_AT91RM9200 is not set # # Cirrus EP93xx Implementation Options # -CONFIG_CRUNCH=y # # EP93xx Platforms # -CONFIG_MACH_EDB9302=y -CONFIG_MACH_EDB9315=y -CONFIG_MACH_EDB9315A=y CONFIG_MACH_GESBC9312=y CONFIG_MACH_TS72XX=y @@ -178,7 +166,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set CONFIG_ALIGNMENT_TRAP=y # @@ -246,8 +233,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -255,7 +240,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -310,7 +294,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -403,8 +386,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1 # CONFIG_MTD_NAND=y CONFIG_MTD_NAND_VERIFY_WRITE=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND_TS7250=y CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_NANDSIM is not set @@ -601,7 +582,6 @@ CONFIG_EP93XX_WATCHDOG=y # USB-based Watchdog Cards # # CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -633,7 +613,6 @@ CONFIG_I2C_ALGOBIT=y # # I2C Hardware Bus support # -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_STUB is not set # CONFIG_I2C_PCA_ISA is not set @@ -662,13 +641,13 @@ CONFIG_I2C_DEBUG_CHIP=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -696,10 +675,8 @@ CONFIG_HWMON=y # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -727,7 +704,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -738,7 +714,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -750,7 +725,7 @@ CONFIG_VIDEO_V4L2=y # USB support # CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_OHCI is not set # CONFIG_USB_ARCH_HAS_EHCI is not set CONFIG_USB=y CONFIG_USB_DEBUG=y @@ -767,9 +742,6 @@ CONFIG_USB_DYNAMIC_MINORS=y # USB Host Controller Drivers # # CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_SL811_HCD is not set # @@ -834,7 +806,6 @@ CONFIG_USB_SERIAL_CONSOLE=y # CONFIG_USB_SERIAL_GENERIC is not set # CONFIG_USB_SERIAL_AIRPRIME is not set # CONFIG_USB_SERIAL_ANYDATA is not set -# CONFIG_USB_SERIAL_ARK3116 is not set # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -859,11 +830,9 @@ CONFIG_USB_SERIAL_CONSOLE=y CONFIG_USB_SERIAL_PL2303=y # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set # CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OPTION is not set # CONFIG_USB_SERIAL_OMNINET is not set # @@ -876,12 +845,10 @@ CONFIG_USB_SERIAL_PL2303=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -913,25 +880,17 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # # CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set # CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_RS5C372 is not set CONFIG_RTC_DRV_M48T86=y CONFIG_RTC_DRV_EP93XX=y -# CONFIG_RTC_DRV_PL031 is not set # CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_V3020 is not set # # File systems @@ -951,7 +910,6 @@ CONFIG_JBD=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -999,7 +957,6 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -1109,20 +1066,15 @@ CONFIG_NLS_ISO8859_1=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set CONFIG_DEBUG_SLAB=y # CONFIG_DEBUG_SLAB_LEAK is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +CONFIG_DEBUG_SPINLOCK=y # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set @@ -1162,4 +1114,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/arm/configs/ixp2000_defconfig b/arch/arm/configs/ixp2000_defconfig index 27b3e31a8..e6f3e4873 100644 --- a/arch/arm/configs/ixp2000_defconfig +++ b/arch/arm/configs/ixp2000_defconfig @@ -1,18 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Sun Jul 9 15:28:50 2006 +# Linux kernel version: 2.6.17-rc2 +# Wed Apr 19 21:12:49 2006 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -47,15 +43,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -88,26 +83,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # System Type # -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set CONFIG_ARCH_IXP2000=y # CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set @@ -115,6 +102,12 @@ CONFIG_ARCH_IXP2000=y # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_AT91RM9200 is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -178,7 +171,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set CONFIG_ALIGNMENT_TRAP=y # @@ -226,8 +218,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -246,8 +236,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -255,7 +243,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -310,7 +297,6 @@ CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -539,7 +525,6 @@ CONFIG_ENP2611_MSF_NET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -557,6 +542,7 @@ CONFIG_ENP2611_MSF_NET=y CONFIG_WAN=y # CONFIG_DSCC4 is not set # CONFIG_LANMEDIA is not set +# CONFIG_SYNCLINK_SYNCPPP is not set CONFIG_HDLC=y CONFIG_HDLC_RAW=y # CONFIG_HDLC_RAW_ETH is not set @@ -668,7 +654,6 @@ CONFIG_IXP2000_WATCHDOG=y # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -712,7 +697,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_IXP2000=y # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -749,13 +733,13 @@ CONFIG_SENSORS_EEPROM=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -784,12 +768,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -817,7 +799,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -827,7 +808,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -886,7 +866,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -931,7 +910,6 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -961,7 +939,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1003,19 +980,14 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set @@ -1055,4 +1027,3 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/arm/configs/ixp23xx_defconfig b/arch/arm/configs/ixp23xx_defconfig index 7b1899708..9ce898a6c 100644 --- a/arch/arm/configs/ixp23xx_defconfig +++ b/arch/arm/configs/ixp23xx_defconfig @@ -1,18 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Sun Jul 9 14:13:35 2006 +# Linux kernel version: 2.6.17-rc2 +# Wed Apr 19 21:13:50 2006 # CONFIG_ARM=y CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -47,15 +43,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -88,26 +83,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # System Type # -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set CONFIG_ARCH_IXP23XX=y # CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set @@ -115,6 +102,12 @@ CONFIG_ARCH_IXP23XX=y # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_AT91RM9200 is not set CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y # @@ -172,7 +165,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_ALIGNMENT_TRAP=y # @@ -220,8 +212,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -240,8 +230,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -249,7 +237,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -304,7 +291,6 @@ CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -534,7 +520,6 @@ CONFIG_BLK_DEV_SD=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -656,7 +641,6 @@ CONFIG_E1000_NAPI=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -674,6 +658,7 @@ CONFIG_E1000_NAPI=y CONFIG_WAN=y # CONFIG_DSCC4 is not set # CONFIG_LANMEDIA is not set +# CONFIG_SYNCLINK_SYNCPPP is not set CONFIG_HDLC=y CONFIG_HDLC_RAW=y # CONFIG_HDLC_RAW_ETH is not set @@ -790,7 +775,6 @@ CONFIG_WATCHDOG=y # USB-based Watchdog Cards # # CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -833,7 +817,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -870,13 +853,13 @@ CONFIG_SENSORS_EEPROM=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -905,12 +888,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -938,7 +919,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -949,7 +929,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -980,7 +959,6 @@ CONFIG_USB=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1072,12 +1050,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set @@ -1124,7 +1100,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1171,7 +1146,6 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -1201,7 +1175,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1282,19 +1255,14 @@ CONFIG_NLS_CODEPAGE_437=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set @@ -1334,4 +1302,3 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig deleted file mode 100644 index 1db633e2c..000000000 --- a/arch/arm/configs/kafa_defconfig +++ /dev/null @@ -1,885 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-rc3 -# Sun May 7 16:54:53 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y - -# -# AT91RM9200 Implementations -# - -# -# AT91RM9200 Board Type -# -# CONFIG_ARCH_AT91RM9200DK is not set -# CONFIG_MACH_AT91RM9200EK is not set -# CONFIG_MACH_CSB337 is not set -# CONFIG_MACH_CSB637 is not set -# CONFIG_MACH_CARMEVA is not set -# CONFIG_MACH_KB9200 is not set -# CONFIG_MACH_ATEB9200 is not set -CONFIG_MACH_KAFA=y - -# -# AT91 Feature Selections -# -# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_LEDS=y -# CONFIG_LEDS_TIMER is not set -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20800000,10M root=/dev/ram0 rw" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=y -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -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_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -# CONFIG_MTD_BLOCK is not set -CONFIG_MTD_BLOCK_RO=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_AT91_DATAFLASH=y -# CONFIG_MTD_AT91_DATAFLASH_CARD is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -CONFIG_DAVICOM_PHY=y -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=32 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_AT91_WATCHDOG=y -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set -CONFIG_AT91_SPI=y -CONFIG_AT91_SPIDEV=y - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -CONFIG_I2C_AT91=y -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -# CONFIG_RTC_HCTOSYS is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_AT91=y -# CONFIG_RTC_DRV_TEST is not set - -# -# File systems -# -# CONFIG_EXT2_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_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -CONFIG_CRAMFS=y -# 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=m -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_FS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -# CONFIG_DEBUG_USER is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig deleted file mode 100644 index 45396e087..000000000 --- a/arch/arm/configs/kb9202_defconfig +++ /dev/null @@ -1,781 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.13-rc2 -# Sun Aug 14 19:26:59 2005 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_UID16=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_CALIBRATE_DELAY=y - -# -# Code maturity level options -# -# CONFIG_EXPERIMENTAL is not set -CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_SWAP is not set -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_HOTPLUG=y -# CONFIG_KOBJECT_UEVENT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_SHMEM=y -CONFIG_CC_ALIGN_FUNCTIONS=0 -CONFIG_CC_ALIGN_LABELS=0 -CONFIG_CC_ALIGN_LOOPS=0 -CONFIG_CC_ALIGN_JUMPS=0 -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_OBSOLETE_MODPARM=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y - -# -# AT91RM9200 Implementations -# -# CONFIG_ARCH_AT91RM9200DK is not set -# CONFIG_MACH_AT91RM9200EK is not set -# CONFIG_MACH_CSB337 is not set -# CONFIG_MACH_CSB637 is not set -# CONFIG_MACH_CARMEVA is not set -CONFIG_MACH_KB9200=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set - -# -# Bus support -# -CONFIG_ISA_DMA_API=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_NO_IDLE_HZ is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_LEDS is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x10000000 -CONFIG_ZBOOT_ROM_BSS=0x20040000 -CONFIG_ZBOOT_ROM=y -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933" - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=y -CONFIG_BINFMT_MISC=y -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -CONFIG_DEBUG_DRIVER=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -CONFIG_BLK_DEV_NBD=y -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CDROM_PKTCDVD is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_ATA_OVER_ETH 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 is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# 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_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_IP_TCPDIAG is not set -# CONFIG_IP_TCPDIAG_IPV6 is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set -# CONFIG_NET_CLS_ROUTE is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# 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_AT91_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_AT91_SPI is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_BLUETOOTH_TTY is not set -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -CONFIG_USB_STORAGE_DEBUG=y -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set -# CONFIG_USB_EGALAX is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MICROTEK is not set - -# -# USB Multimedia devices -# -# CONFIG_USB_DABUSB is not set - -# -# Video4Linux support is needed for USB Multimedia device support -# - -# -# USB Network Adapters -# -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_MON is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -# CONFIG_EXT2_FS_POSIX_ACL is not set -# CONFIG_EXT2_FS_SECURITY is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set - -# -# XFS support -# -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS 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_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_DEVPTS_FS_XATTR=y -# CONFIG_DEVPTS_FS_SECURITY is not set -CONFIG_TMPFS=y -# CONFIG_TMPFS_XATTR is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_HFSPLUS_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_V3_ACL is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=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 - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -# 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_ASCII=y -# 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_PRINTK_TIME is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_MAGIC_SYSRQ is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -CONFIG_FRAME_POINTER=y -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set diff --git a/arch/arm/configs/lpd270_defconfig b/arch/arm/configs/lpd270_defconfig deleted file mode 100644 index 4b29e0996..000000000 --- a/arch/arm/configs/lpd270_defconfig +++ /dev/null @@ -1,981 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Sun Jul 9 14:15:23 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODULE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set -CONFIG_ARCH_PXA=y -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -CONFIG_MACH_LOGICPD_PXA270=y -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -# CONFIG_MACH_TRIZEPS4 is not set -CONFIG_PXA27x=y -CONFIG_IWMMXT=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200 mem=64M" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -# CONFIG_PACKET is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -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_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -# CONFIG_MTD_CFI_I1 is not set -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_SHARP_SL is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH 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_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE 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 - -# -# IDE chipset support/bugfixes -# -# CONFIG_IDE_GENERIC is not set -# CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_SMC91X=y -# CONFIG_DM9000 is not set -# CONFIG_SMC911X is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN 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 Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -# CONFIG_FB_PXA_PARAMETERS is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# 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_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_AC97_CODEC=y -CONFIG_SND_AC97_BUS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# -CONFIG_SND_PXA2XX_PCM=y -CONFIG_SND_PXA2XX_AC97=y - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -# CONFIG_EXT3_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -CONFIG_MSDOS_FS=y -# CONFIG_VFAT_FS is not set -CONFIG_FAT_DEFAULT_CODEPAGE=437 -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -# CONFIG_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN 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 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=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 -# 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_ASCII is not set -CONFIG_NLS_ISO8859_1=y -# 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 -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/arm/configs/lpd7a400_defconfig b/arch/arm/configs/lpd7a400_defconfig index bf9cf9c6d..67eaa26c2 100644 --- a/arch/arm/configs/lpd7a400_defconfig +++ b/arch/arm/configs/lpd7a400_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.12 -# Thu Nov 3 14:15:32 2005 +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:06:33 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -17,7 +17,6 @@ CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup @@ -37,8 +36,6 @@ CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_PRINTK=y -CONFIG_BUG=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y # CONFIG_EPOLL is not set @@ -74,7 +71,6 @@ CONFIG_BASE_SMALL=0 # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7952X is not set CONFIG_ARCH_LH7A40X=y # CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_VERSATILE is not set @@ -88,7 +84,6 @@ CONFIG_ARCH_LH7A40X=y CONFIG_MACH_LPD7A400=y # CONFIG_MACH_LPD7A404 is not set CONFIG_ARCH_LH7A400=y -CONFIG_LPD7A40X_CPLD_SSP=y # CONFIG_LH7A40X_CONTIGMEM is not set # CONFIG_LH7A40X_ONE_BANK_PER_NODE is not set @@ -115,8 +110,6 @@ CONFIG_ARM_THUMB=y # # Bus support # -CONFIG_ARM_AMBA=y -CONFIG_ISA_DMA_API=y # # PCCARD (PCMCIA/CardBus) support @@ -126,7 +119,6 @@ CONFIG_ISA_DMA_API=y # # Kernel Features # -# CONFIG_SMP is not set CONFIG_PREEMPT=y CONFIG_DISCONTIGMEM=y CONFIG_ALIGNMENT_TRAP=y @@ -183,7 +175,7 @@ CONFIG_MTD=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -225,10 +217,7 @@ CONFIG_MTD_CFI_UTIL=y # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x00000000 -CONFIG_MTD_PHYSMAP_LEN=0x04000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=4 +# CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set # CONFIG_MTD_EDB7312 is not set @@ -265,6 +254,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4 # # Block devices # +# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set @@ -298,15 +288,13 @@ CONFIG_BLK_DEV_IDEDISK=y # CONFIG_BLK_DEV_IDECD is not set # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -CONFIG_IDE_POLL=y # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -CONFIG_IDE_ARM=y +# CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set # CONFIG_BLK_DEV_HD is not set @@ -314,37 +302,7 @@ CONFIG_IDE_ARM=y # # SCSI device support # -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -# CONFIG_BLK_DEV_SD is not set -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI is not set # # Multi-device support (RAID and LVM) @@ -373,6 +331,7 @@ CONFIG_NET=y # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -479,10 +438,13 @@ 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 +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # @@ -491,13 +453,7 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_ADS7843_LH7=y -CONFIG_HAS_TOUCHSCREEN_ADS7843_LH7=y +# CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # @@ -505,6 +461,7 @@ CONFIG_HAS_TOUCHSCREEN_ADS7843_LH7=y # # CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # # Character devices @@ -522,8 +479,6 @@ CONFIG_HW_CONSOLE=y # # Non-8250 serial port support # -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_LH7A40X=y @@ -555,6 +510,7 @@ CONFIG_RTC=y # # TPM devices # +# CONFIG_TCG_TPM is not set # # I2C support @@ -578,73 +534,18 @@ CONFIG_RTC=y # # Graphics support # -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_SOFT_CURSOR=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -CONFIG_FB_ARMCLCD=y -CONFIG_FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT=y -# CONFIG_FB_ARMCLCD_SHARP_LQ057Q3DC02 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ64D343 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ10D368 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ121S1DG41 is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound # -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_RTCTIMER is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set -CONFIG_SND_AC97_CODEC=y - -# -# ALSA ARM devices -# -CONFIG_SND_LH7A40X_AC97=y - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set # # USB support diff --git a/arch/arm/configs/lpd7a404_defconfig b/arch/arm/configs/lpd7a404_defconfig index 3a57be32e..208d591eb 100644 --- a/arch/arm/configs/lpd7a404_defconfig +++ b/arch/arm/configs/lpd7a404_defconfig @@ -1,81 +1,58 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.16 -# Thu Mar 23 17:50:31 2006 +# Linux kernel version: 2.6.12-rc1-bk2 +# Mon Mar 28 00:14:08 2005 # CONFIG_ARM=y CONFIG_MMU=y +CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y # CONFIG_SWAP is not set CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y # CONFIG_IKCONFIG_PROC is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set -# CONFIG_HOTPLUG is not set -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y # CONFIG_EPOLL is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SHMEM=y CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 -CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support # # CONFIG_MODULES is not set -# -# Block layer -# - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - # # System Type # @@ -94,15 +71,11 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_ARCH_SA1100 is not set # CONFIG_ARCH_S3C2410 is not set # CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7952X is not set CONFIG_ARCH_LH7A40X=y # CONFIG_ARCH_OMAP is not set # CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set # CONFIG_ARCH_IMX is not set # CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set # # LH7A40X Implementations @@ -137,7 +110,6 @@ CONFIG_ARM_THUMB=y # # Bus support # -CONFIG_ARM_AMBA=y # # PCCARD (PCMCIA/CardBus) support @@ -148,18 +120,7 @@ CONFIG_ARM_AMBA=y # Kernel Features # CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -# CONFIG_AEABI is not set -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -CONFIG_DISCONTIGMEM_MANUAL=y -# CONFIG_SPARSEMEM_MANUAL is not set CONFIG_DISCONTIGMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_NEED_MULTIPLE_NODES=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_ALIGNMENT_TRAP=y # @@ -193,84 +154,6 @@ CONFIG_BINFMT_ELF=y # Power management options # # CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -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_FIB_HASH=y -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_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set # # Device Drivers @@ -284,11 +167,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - # # Memory Technology Devices (MTD) # @@ -297,7 +175,7 @@ CONFIG_MTD=y # CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_AFS_PARTS is not set # @@ -308,7 +186,6 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set # # RAM/ROM/Flash chip drivers @@ -334,18 +211,15 @@ CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x00000000 -CONFIG_MTD_PHYSMAP_LEN=0x04000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=4 +# CONFIG_MTD_PHYSMAP is not set # CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_PLATRAM is not set +# CONFIG_MTD_EDB7312 is not set # # Self-contained MTD device drivers @@ -368,11 +242,6 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4 # # CONFIG_MTD_NAND is not set -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - # # Parallel port support # @@ -385,6 +254,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4 # # Block devices # +# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set @@ -392,7 +262,16 @@ CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_INITRAMFS_SOURCE="" # CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y # CONFIG_ATA_OVER_ETH is not set # @@ -412,13 +291,12 @@ CONFIG_BLK_DEV_IDEDISK=y # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -CONFIG_IDE_POLL=y # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -CONFIG_IDE_ARM=y +# CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set # CONFIG_BLK_DEV_HD is not set @@ -426,7 +304,6 @@ CONFIG_IDE_ARM=y # # SCSI device support # -# CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y # CONFIG_SCSI_PROC_FS is not set @@ -438,7 +315,6 @@ CONFIG_SCSI=y # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set # CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs @@ -453,12 +329,10 @@ CONFIG_SCSI=y # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set # # SCSI low-level drivers # -# CONFIG_ISCSI_TCP is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_DEBUG is not set @@ -470,7 +344,6 @@ CONFIG_SCSI=y # # Fusion MPT device support # -# CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support @@ -481,26 +354,82 @@ CONFIG_SCSI=y # # -# Network device support +# Networking support # +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST 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_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set +# CONFIG_IPV6 is not set +# CONFIG_NETFILTER is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# -# PHY device support -# -# CONFIG_PHYLIB is not set - # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_SMC91X=y -# CONFIG_DM9000 is not set # # Ethernet (1000 Mbit) @@ -527,8 +456,6 @@ CONFIG_SMC91X=y # CONFIG_SLIP is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set # # ISDN subsystem @@ -543,13 +470,10 @@ CONFIG_INPUT=y # # Userland interfaces # -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # @@ -558,13 +482,7 @@ CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_TOUCHSCREEN_ADC_LH7=y -CONFIG_HAS_TOUCHSCREEN_ADC_LH7=y +# CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # @@ -572,6 +490,7 @@ CONFIG_HAS_TOUCHSCREEN_ADC_LH7=y # # CONFIG_SERIO is not set # CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y # # Character devices @@ -589,8 +508,6 @@ CONFIG_HW_CONSOLE=y # # Non-8250 serial port support # -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_LH7A40X=y @@ -616,46 +533,23 @@ CONFIG_RTC=y # # Ftape, the floppy tape device driver # +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # # TPM devices # # CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set # # I2C support # # CONFIG_I2C is not set -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - # # Misc devices # -# -# Multimedia Capabilities Port drivers -# - # # Multimedia devices # @@ -669,83 +563,18 @@ CONFIG_HWMON=y # # Graphics support # -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -CONFIG_FB_ARMCLCD=y -CONFIG_FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT=y -# CONFIG_FB_ARMCLCD_SHARP_LQ057Q3DC02 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ64D343 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ10D368 is not set -# CONFIG_FB_ARMCLCD_SHARP_LQ121S1DG41 is not set -# CONFIG_FB_ARMCLCD_AUO_A070VW01_WIDE is not set -# CONFIG_FB_ARMCLCD_HITACHI is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set - -# -# Logo configuration -# -# CONFIG_LOGO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound # -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -# CONFIG_SND_RTCTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_AC97_CODEC=y -CONFIG_SND_AC97_BUS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# -# CONFIG_SND_ARMAACI is not set -CONFIG_SND_LH7A40X_AC97=y - -# -# USB devices -# -# CONFIG_SND_USB_AUDIO is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set +# CONFIG_SOUND is not set # # USB support @@ -766,7 +595,6 @@ CONFIG_USB_DEVICEFS=y # # USB Host Controller Drivers # -# CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y @@ -775,19 +603,16 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # # USB Device Class drivers # -# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set +# CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set # -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information # CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_DEBUG=y +# CONFIG_USB_STORAGE_RW_DETECT is not set CONFIG_USB_STORAGE_DATAFAB=y # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set @@ -796,32 +621,22 @@ CONFIG_USB_STORAGE_DATAFAB=y # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_LIBUSUAL is not set # # USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set # CONFIG_HID_FF is not set # CONFIG_USB_HIDDEV is not set # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set # CONFIG_USB_MTOUCH is not set -# CONFIG_USB_ITMTOUCH is not set # CONFIG_USB_EGALAX is not set -# CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set # # USB Imaging devices @@ -871,33 +686,16 @@ CONFIG_USB_MON=y # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set # -# USB DSL modem support +# USB ATM/DSL drivers # # # USB Gadget Support # -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -CONFIG_USB_GADGET_LH7=y -CONFIG_USB_LH7=y -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -CONFIG_USB_ZERO=y -# CONFIG_USB_ETH is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_GADGET is not set # # MMC/SD Card support @@ -909,7 +707,6 @@ CONFIG_USB_ZERO=y # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set @@ -919,17 +716,17 @@ CONFIG_JBD=y CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -952,11 +749,12 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_PROC_FS=y CONFIG_SYSFS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y +# CONFIG_TMPFS_XATTR is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_RELAYFS_FS is not set -# CONFIG_CONFIGFS_FS is not set # # Miscellaneous filesystems @@ -971,8 +769,8 @@ CONFIG_RAMFS=y # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_NAND is not set +# CONFIG_JFFS2_FS_NOR_ECC is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -989,14 +787,12 @@ CONFIG_CRAMFS=y # CONFIG_NFS_FS=y CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set @@ -1005,7 +801,6 @@ CONFIG_SUNRPC=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set # # Partition Types @@ -1025,7 +820,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # @@ -1081,24 +875,19 @@ CONFIG_NLS_DEFAULT="iso8859-1" # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_LOG_BUF_SHIFT=14 # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set CONFIG_DEBUG_PREEMPT=y -CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set CONFIG_FRAME_POINTER=y -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set CONFIG_DEBUG_USER=y # CONFIG_DEBUG_WAITQ is not set CONFIG_DEBUG_ERRORS=y @@ -1123,7 +912,6 @@ CONFIG_DEBUG_ERRORS=y # Library routines # # CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig deleted file mode 100644 index 61115a773..000000000 --- a/arch/arm/configs/netx_defconfig +++ /dev/null @@ -1,926 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-rc6 -# Tue Jun 6 15:26:53 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set -CONFIG_ARCH_NETX=y - -# -# NetX Implementations -# -CONFIG_MACH_NXDKN=y -CONFIG_MACH_NXDB500=y -CONFIG_MACH_NXEB500HMI=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM926T=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5TJ=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set -CONFIG_ARM_VIC=y - -# -# Bus support -# -CONFIG_ARM_AMBA=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttySMX0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -# CONFIG_FPE_NWFPE is not set -# CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET_XFRM_TUNNEL=y -CONFIG_INET_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -# CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NETFILTER_XTABLES is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -CONFIG_IP_NF_QUEUE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -CONFIG_MTD_RAM=y -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -CONFIG_MTD_PLATRAM=y - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_SMC91X is not set -CONFIG_NET_NETX=y -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_AMBAKMI is not set -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_AMBA_PL010 is not set -# CONFIG_SERIAL_AMBA_PL011 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_NETX=y -CONFIG_SERIAL_NETX_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -CONFIG_NVRAM=m -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_FIRMWARE_EDID=y -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -CONFIG_FB_ARMCLCD=y -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# 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_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m - -# -# RTC drivers -# -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_NETX=m -# CONFIG_RTC_DRV_TEST is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -# CONFIG_EXT3_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN 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_V3_ACL is not set -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_LL is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig index 05adb0b34..ee3ecbd90 100644 --- a/arch/arm/configs/omap_h2_1610_defconfig +++ b/arch/arm/configs/omap_h2_1610_defconfig @@ -1,20 +1,19 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Thu Jun 29 15:25:18 2006 +# Linux kernel version: 2.6.14 +# Wed Nov 9 18:53:40 2005 # CONFIG_ARM=y CONFIG_MMU=y +CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 @@ -30,26 +29,26 @@ CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +CONFIG_KOBJECT_UEVENT=y # CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SHMEM=y -CONFIG_SLAB=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set # # Loadable module support @@ -57,6 +56,7 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -64,7 +64,6 @@ CONFIG_MODULE_UNLOAD=y # # Block layer # -# CONFIG_BLK_DEV_IO_TRACE is not set # # IO Schedulers @@ -82,26 +81,16 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # System Type # -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91RM9200 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set @@ -109,6 +98,11 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set CONFIG_ARCH_OMAP=y +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set # # TI OMAP Implementations @@ -147,7 +141,6 @@ CONFIG_ARCH_OMAP16XX=y CONFIG_MACH_OMAP_H2=y # CONFIG_MACH_OMAP_H3 is not set # CONFIG_MACH_OMAP_OSK is not set -# CONFIG_MACH_NOKIA770 is not set # CONFIG_MACH_OMAP_GENERIC is not set # @@ -184,6 +177,7 @@ CONFIG_ARM_THUMB=y # # Bus support # +CONFIG_ISA_DMA_API=y # # PCCARD (PCMCIA/CardBus) support @@ -195,8 +189,6 @@ CONFIG_ARM_THUMB=y # CONFIG_PREEMPT=y CONFIG_NO_IDLE_HZ=y -CONFIG_HZ=128 -# CONFIG_AEABI is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -257,8 +249,6 @@ CONFIG_BINFMT_AOUT=y # Power management options # CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set # CONFIG_APM is not set # @@ -269,12 +259,9 @@ CONFIG_NET=y # # Networking options # -# CONFIG_NETDEBUG is not set CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -291,18 +278,12 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -314,11 +295,6 @@ CONFIG_TCP_CONG_BIC=y # SCTP Configuration (EXPERIMENTAL) # # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -336,6 +312,7 @@ CONFIG_TCP_CONG_BIC=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -356,12 +333,6 @@ CONFIG_TCP_CONG_BIC=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set # # Memory Technology Devices (MTD) @@ -555,7 +526,6 @@ CONFIG_SERIO_SERPORT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -564,7 +534,6 @@ CONFIG_HW_CONSOLE=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -590,8 +559,8 @@ CONFIG_WATCHDOG_NOWAYOUT=y # Watchdog Device Drivers # # CONFIG_SOFT_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set +# CONFIG_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -603,7 +572,6 @@ CONFIG_WATCHDOG_NOWAYOUT=y # # TPM devices # -# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -611,23 +579,11 @@ CONFIG_WATCHDOG_NOWAYOUT=y # # CONFIG_I2C is not set -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set # CONFIG_HWMON_DEBUG_CHIP is not set # @@ -635,23 +591,13 @@ CONFIG_HWMON=y # # -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers +# Multimedia Capabilities Port drivers # # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -661,13 +607,11 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y CONFIG_FB=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_S1D13XXX is not set @@ -691,6 +635,7 @@ CONFIG_FONT_8x16=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set # CONFIG_FONT_10x18 is not set +# CONFIG_FONT_RL is not set # # Logo configuration @@ -715,15 +660,16 @@ CONFIG_SOUND=y # Open Sound System # CONFIG_SOUND_PRIME=y +# CONFIG_OBSOLETE_OSS_DRIVER is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_OSS is not set # # USB support # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set # CONFIG_USB is not set # @@ -734,18 +680,23 @@ CONFIG_USB_ARCH_HAS_OHCI=y # USB Gadget Support # # CONFIG_USB_GADGET is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set # # MMC/SD Card support # # CONFIG_MMC is not set -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set - # # File systems # @@ -753,15 +704,14 @@ CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP 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_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -791,7 +741,7 @@ CONFIG_SYSFS=y # CONFIG_TMPFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set +# CONFIG_RELAYFS_FS is not set # # Miscellaneous filesystems @@ -893,13 +843,10 @@ CONFIG_NLS_DEFAULT="iso8859-1" # Kernel hacking # # CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_FS is not set CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set # CONFIG_DEBUG_USER is not set # diff --git a/arch/arm/configs/onearm_defconfig b/arch/arm/configs/onearm_defconfig deleted file mode 100644 index 6a93e3aae..000000000 --- a/arch/arm/configs/onearm_defconfig +++ /dev/null @@ -1,1076 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Sun Jul 9 14:16:20 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -CONFIG_ARCH_AT91=y -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set - -# -# Atmel AT91 System-on-Chip -# - -# -# Atmel AT91 Processors -# -CONFIG_ARCH_AT91RM9200=y -# CONFIG_ARCH_AT91SAM9260 is not set -# CONFIG_ARCH_AT91SAM9261 is not set - -# -# AT91RM9200 Board Type -# -CONFIG_MACH_ONEARM=y -# CONFIG_ARCH_AT91RM9200DK is not set -# CONFIG_MACH_AT91RM9200EK is not set -# CONFIG_MACH_CSB337 is not set -# CONFIG_MACH_CSB637 is not set -# CONFIG_MACH_CARMEVA is not set -# CONFIG_MACH_ATEB9200 is not set -# CONFIG_MACH_KB9200 is not set -# CONFIG_MACH_KAFA is not set - -# -# AT91 Feature Selections -# -CONFIG_AT91_PROGRAMMABLE_CLOCKS=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y - -# -# PC-card bridges -# -CONFIG_AT91_CF=y - -# -# Kernel Features -# -# CONFIG_PREEMPT is not set -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -# CONFIG_LEDS_CPU is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set -# CONFIG_ARTHUR is not set - -# -# Power management options -# -# CONFIG_PM is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -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_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x0 -CONFIG_MTD_PHYSMAP_LEN=0x0 -CONFIG_MTD_PHYSMAP_BANKWIDTH=0 -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -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 is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_AT91=y -CONFIG_SERIAL_AT91_CONSOLE=y -# CONFIG_SERIAL_AT91_TTYAT is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_AT91_WATCHDOG=y - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_CARDMAN_4000 is not set -# CONFIG_CARDMAN_4040 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -CONFIG_USB_DEBUG=y - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -# CONFIG_USB_STORAGE is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -CONFIG_USB_GADGET_AT91=y -CONFIG_USB_AT91=y -# CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -# CONFIG_USB_ZERO is not set -# CONFIG_USB_ETH is not set -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_AT91RM9200=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -# CONFIG_EXT3_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -CONFIG_CRAMFS=y -# 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_V3_ACL=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_USER=y -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_ERRORS is not set -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_ICEDCC is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_PLIST=y diff --git a/arch/arm/configs/pnx4008_defconfig b/arch/arm/configs/pnx4008_defconfig deleted file mode 100644 index a4989f44b..000000000 --- a/arch/arm/configs/pnx4008_defconfig +++ /dev/null @@ -1,1665 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Mon Sep 11 13:59:24 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -CONFIG_ARCH_PNX4008=y -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM926T=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5TJ=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="mem=64M console=ttyS0,115200" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_APM is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NETFILTER_XTABLES is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set -CONFIG_IP_NF_QUEUE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m - -# -# DECnet: Netfilter Configuration -# -CONFIG_DECNET_NF_GRABULATOR=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -# CONFIG_BRIDGE_EBT_ULOG is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -CONFIG_ATM=y -CONFIG_ATM_CLIP=y -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -# CONFIG_DECNET_ROUTER is not set -CONFIG_LLC=m -CONFIG_LLC2=m -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -CONFIG_X25=m -CONFIG_LAPB=m -# CONFIG_NET_DIVERT is not set -CONFIG_ECONET=m -CONFIG_ECONET_AUNUDP=y -CONFIG_ECONET_NATIVE=y -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -# CONFIG_NET_CLS_BASIC is not set -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -# CONFIG_IEEE80211_CRYPT_WEP is not set -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -# CONFIG_IEEE80211_SOFTMAC is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -CONFIG_MTD_SLRAM=m -CONFIG_MTD_PHRAM=m -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -CONFIG_MTD_DOC2000=m -CONFIG_MTD_DOC2001=m -CONFIG_MTD_DOC2001PLUS=m -CONFIG_MTD_DOCPROBE=m -CONFIG_MTD_DOCECC=m -# CONFIG_MTD_DOCPROBE_ADVANCED is not set -CONFIG_MTD_DOCPROBE_ADDRESS=0 - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND_DISKONCHIP is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_NBD=y -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -CONFIG_SCSI_SATA=m -CONFIG_SCSI_DEBUG=m - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -# CONFIG_NET_WIRELESS_RTNETLINK is not set - -# -# Obsolete Wireless cards support (pre-802.11) -# -CONFIG_STRIP=m -# CONFIG_USB_ZD1201 is not set -# CONFIG_HOSTAP is not set - -# -# Wan interfaces -# -CONFIG_WAN=y -CONFIG_HDLC=m -CONFIG_HDLC_RAW=y -CONFIG_HDLC_RAW_ETH=y -CONFIG_HDLC_CISCO=y -CONFIG_HDLC_FR=y -CONFIG_HDLC_PPP=y -CONFIG_HDLC_X25=y -CONFIG_DLCI=m -CONFIG_DLCI_COUNT=24 -CONFIG_DLCI_MAX=8 -CONFIG_WAN_ROUTER_DRIVERS=y -CONFIG_LAPBETHER=m -CONFIG_X25_ASY=m - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -CONFIG_SLIP_MODE_SLIP6=y -CONFIG_SHAPER=m -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_TSDEV=m -CONFIG_INPUT_TSDEV_SCREEN_X=240 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=m - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=m -CONFIG_KEYBOARD_LKKBD=m -CONFIG_KEYBOARD_XTKBD=m -CONFIG_KEYBOARD_NEWTON=m -CONFIG_INPUT_MOUSE=y -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -# CONFIG_JOYSTICK_TWIDJOY is not set -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -CONFIG_TOUCHSCREEN_GUNZE=m -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=m -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# 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_RUNTIME_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_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -# CONFIG_SENSORS_PCA9539 is not set -CONFIG_SENSORS_PCF8591=m -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported USB Adapters -# -# CONFIG_DVB_USB is not set -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -# CONFIG_DVB_B2C2_FLEXCOP is not set - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -# CONFIG_DVB_CX24123 is not set -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -# CONFIG_DVB_S5H1420 is not set - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -# CONFIG_DVB_ZL10353 is not set -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -# CONFIG_DVB_NXT200X is not set -# CONFIG_DVB_OR51211 is not set -# CONFIG_DVB_OR51132 is not set -# CONFIG_DVB_BCM3510 is not set -# CONFIG_DVB_LGDT330X is not set - -# -# Miscellaneous devices -# -CONFIG_DVB_LNBP21=m -# CONFIG_DVB_ISL6421 is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -# CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -CONFIG_SND_SERIAL_U16550=m -CONFIG_SND_MPU401=m - -# -# ALSA ARM devices -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# Open Sound System -# -CONFIG_SOUND_PRIME=m -# CONFIG_OSS_OBSOLETE_DRIVER is not set -# CONFIG_SOUND_MSNDCLAS is not set -# CONFIG_SOUND_MSNDPIN is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_BANDWIDTH=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_SL811_HCD=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -CONFIG_USB_HIDDEV=y - -# -# USB HID Boot Protocol drivers -# -CONFIG_USB_KBD=m -CONFIG_USB_MOUSE=m -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -# CONFIG_USB_ACECAD is not set -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -# CONFIG_USB_NET_GL620A is not set -CONFIG_USB_NET_NET1080=m -# CONFIG_USB_NET_PLUSB is not set -# CONFIG_USB_NET_RNDIS_HOST is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -# CONFIG_USB_SERIAL_CP2101 is not set -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -# CONFIG_USB_SERIAL_GARMIN is not set -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_HP4X is not set -CONFIG_USB_SERIAL_SAFE=m -# CONFIG_USB_SERIAL_SAFE_PADDED is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -# CONFIG_USB_SERIAL_TI is not set -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -# CONFIG_USB_SERIAL_OPTION is not set -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_CXACRU is not set -# CONFIG_USB_UEAGLEATM is not set -# CONFIG_USB_XUSBATM is not set - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=m -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_USB_DUMMY_HCD=m -CONFIG_USB_GADGET_DUALSPEED=y -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_RNDIS=y -CONFIG_USB_GADGETFS=m -CONFIG_USB_FILE_STORAGE=m -# CONFIG_USB_FILE_STORAGE_TEST is not set -CONFIG_USB_G_SERIAL=m - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -CONFIG_JFS_STATISTICS=y -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -CONFIG_XFS_RT=y -# CONFIG_OCFS2_FS is not set -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -CONFIG_QFMT_V1=m -CONFIG_QFMT_V2=m -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -CONFIG_ADFS_FS=m -# CONFIG_ADFS_FS_RW is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_JFFS_FS=m -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=y -CONFIG_VXFS_FS=m -CONFIG_HPFS_FS=m -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -CONFIG_RPCSEC_GSS_SPKM3=m -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -# CONFIG_NCPFS_SMALLDOS is not set -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -CONFIG_AFS_FS=m -CONFIG_RXRPC=m -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -CONFIG_ACORN_PARTITION=y -# CONFIG_ACORN_PARTITION_CUMANA is not set -# CONFIG_ACORN_PARTITION_EESOX is not set -CONFIG_ACORN_PARTITION_ICS=y -# CONFIG_ACORN_PARTITION_ADFS is not set -# CONFIG_ACORN_PARTITION_POWERTEC is not set -CONFIG_ACORN_PARTITION_RISCIX=y -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -CONFIG_ATARI_PARTITION=y -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -CONFIG_LDM_PARTITION=y -# CONFIG_LDM_DEBUG is not set -CONFIG_SGI_PARTITION=y -CONFIG_ULTRIX_PARTITION=y -CONFIG_SUN_PARTITION=y -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="cp437" -CONFIG_NLS_CODEPAGE_437=m -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_WAITQ is not set -# CONFIG_DEBUG_ERRORS is not set -# CONFIG_DEBUG_LL is not set - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -# CONFIG_SECURITY_NETWORK is not set -CONFIG_SECURITY_CAPABILITIES=m -CONFIG_SECURITY_ROOTPLUG=m -CONFIG_SECURITY_SECLVL=m - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_TEST=m - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig index f20814e6f..3cec29d56 100644 --- a/arch/arm/configs/s3c2410_defconfig +++ b/arch/arm/configs/s3c2410_defconfig @@ -1,14 +1,12 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.17-git9 -# Sun Jun 25 23:56:32 2006 +# Linux kernel version: 2.6.16 +# Mon Mar 20 20:36:02 2006 # CONFIG_ARM=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_VECTORS_BASE=0xffff0000 # # Code maturity level options @@ -29,7 +27,6 @@ CONFIG_SYSVIPC=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -45,16 +42,22 @@ CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support # CONFIG_MODULES=y # CONFIG_MODULE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y @@ -62,7 +65,6 @@ CONFIG_KMOD=y # # Block layer # -# CONFIG_BLK_DEV_IO_TRACE is not set # # IO Schedulers @@ -80,26 +82,17 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # System Type # -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91RM9200 is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_INTEGRATOR is not set # CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set @@ -107,6 +100,12 @@ CONFIG_ARCH_S3C2410=y # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_AT91RM9200 is not set # # S3C24XX Implementations @@ -117,22 +116,14 @@ CONFIG_ARCH_BAST=y CONFIG_BAST_PC104_IRQ=y CONFIG_ARCH_H1940=y CONFIG_MACH_N30=y -CONFIG_MACH_SMDK=y CONFIG_ARCH_SMDK2410=y CONFIG_ARCH_S3C2440=y -CONFIG_SMDK2440_CPU2440=y -CONFIG_SMDK2440_CPU2442=y -CONFIG_MACH_SMDK2413=y CONFIG_MACH_VR1000=y CONFIG_MACH_RX3715=y CONFIG_MACH_OTOM=y CONFIG_MACH_NEXCODER_2440=y -CONFIG_S3C2410_CLOCK=y CONFIG_CPU_S3C2410=y -CONFIG_CPU_S3C2412=y -CONFIG_CPU_S3C244X=y CONFIG_CPU_S3C2440=y -CONFIG_CPU_S3C2442=y # # S3C2410 Boot @@ -155,11 +146,8 @@ CONFIG_S3C2410_LOWLEVEL_UART_PORT=0 # CONFIG_CPU_32=y CONFIG_CPU_ARM920T=y -CONFIG_CPU_ARM926T=y CONFIG_CPU_32v4=y -CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_ABRT_EV5TJ=y CONFIG_CPU_CACHE_V4WT=y CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_COPY_V4WB=y @@ -172,7 +160,6 @@ CONFIG_CPU_TLB_V4WBI=y # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_DCACHE_DISABLE is not set # CONFIG_CPU_DCACHE_WRITETHROUGH is not set -# CONFIG_CPU_CACHE_ROUND_ROBIN is not set # # Bus support @@ -220,7 +207,6 @@ CONFIG_CMDLINE="root=/dev/hda1 ro init=/bin/bash console=ttySAC0" CONFIG_FPE_NWFPE=y # CONFIG_FPE_NWFPE_XP is not set # CONFIG_FPE_FASTFPE is not set -# CONFIG_VFP is not set # # Userspace binary formats @@ -249,8 +235,6 @@ CONFIG_NET=y # CONFIG_NETDEBUG is not set # CONFIG_PACKET is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -267,18 +251,12 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -333,7 +311,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -383,6 +360,7 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_AMDSTD_RETRY=0 # CONFIG_MTD_CFI_STAA is not set CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set @@ -407,6 +385,7 @@ CONFIG_MTD_BAST_MAXSIZE=4 # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -421,12 +400,10 @@ CONFIG_MTD_BAST_MAXSIZE=4 # CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND_IDS=y CONFIG_MTD_NAND_S3C2410=y # CONFIG_MTD_NAND_S3C2410_DEBUG is not set # CONFIG_MTD_NAND_S3C2410_HWECC is not set -# CONFIG_MTD_NAND_S3C2410_CLKSTOP is not set # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_NANDSIM is not set @@ -440,8 +417,8 @@ CONFIG_MTD_NAND_S3C2410=y # CONFIG_PARPORT=y # CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_ARC is not set # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -717,6 +694,7 @@ CONFIG_S3C2410_WATCHDOG=y # # CONFIG_USBPCWATCHDOG is not set # CONFIG_NVRAM is not set +# CONFIG_RTC is not set CONFIG_S3C2410_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -750,7 +728,6 @@ CONFIG_I2C_ALGOBIT=m # # CONFIG_I2C_ELEKTOR is not set CONFIG_I2C_ISA=m -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set CONFIG_I2C_S3C2410=y @@ -766,7 +743,9 @@ CONFIG_SENSORS_EEPROM=m # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -781,13 +760,13 @@ CONFIG_SENSORS_EEPROM=m # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y CONFIG_HWMON_VID=m -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -815,10 +794,8 @@ CONFIG_SENSORS_LM85=m # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -830,29 +807,18 @@ CONFIG_SENSORS_LM85=m # # -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers +# Multimedia Capabilities Port drivers # # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support @@ -862,8 +828,6 @@ CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -CONFIG_FB_FIRMWARE_EDID=y -# CONFIG_FB_BACKLIGHT is not set CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_S1D13XXX is not set @@ -899,7 +863,6 @@ CONFIG_FONT_8x16=y # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -952,7 +915,9 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -965,6 +930,15 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # # CONFIG_USB_MDC800 is not set +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + # # USB Network Adapters # @@ -995,12 +969,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1012,18 +984,23 @@ CONFIG_USB_MON=y # USB Gadget Support # # CONFIG_USB_GADGET is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set # # MMC/SD Card support # # CONFIG_MMC is not set -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set - # # File systems # @@ -1045,7 +1022,6 @@ CONFIG_FS_MBCACHE=y # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1076,6 +1052,7 @@ CONFIG_SYSFS=y # CONFIG_TMPFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1216,7 +1193,6 @@ CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_VM is not set CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_DEBUG_USER=y diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig deleted file mode 100644 index a6698dc4f..000000000 --- a/arch/arm/configs/trizeps4_defconfig +++ /dev/null @@ -1,1579 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Sat Jun 24 22:45:14 2006 -# -CONFIG_ARM=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_MTD_XIP=y -CONFIG_VECTORS_BASE=0xffff0000 - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_SYSCTL=y -CONFIG_AUDIT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# System Type -# -# CONFIG_ARCH_CLPS7500 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_CO285 is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP3XX is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_L7200 is not set -CONFIG_ARCH_PXA=y -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_IMX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_AT91RM9200 is not set - -# -# Intel PXA2xx Implementations -# -# CONFIG_ARCH_LUBBOCK is not set -# CONFIG_MACH_LOGICPD_PXA270 is not set -# CONFIG_MACH_MAINSTONE is not set -# CONFIG_ARCH_PXA_IDP is not set -# CONFIG_PXA_SHARPSL is not set -CONFIG_MACH_TRIZEPS4=y -CONFIG_MACH_TRIZEPS4_CONXS=y -# CONFIG_MACH_TRIZEPS4_ANY is not set -CONFIG_PXA27x=y - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_XSCALE=y -CONFIG_CPU_32v5=y -CONFIG_CPU_ABRT_EV5T=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_TLB_V4WBI=y - -# -# Processor Features -# -CONFIG_ARM_THUMB=y -CONFIG_XSCALE_PMU=y - -# -# Bus support -# - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y - -# -# PC-card bridges -# -CONFIG_PCMCIA_PXA2XX=m - -# -# Kernel Features -# -CONFIG_PREEMPT=y -# CONFIG_NO_IDLE_HZ is not set -CONFIG_HZ=100 -# CONFIG_AEABI is not set -# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_LEDS=y -CONFIG_LEDS_TIMER=y -CONFIG_LEDS_CPU=y -CONFIG_ALIGNMENT_TRAP=y - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200n8" -# CONFIG_XIP_KERNEL is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# -CONFIG_FPE_NWFPE=y -CONFIG_FPE_NWFPE_XP=y -# CONFIG_FPE_FASTFPE is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -CONFIG_BINFMT_MISC=m -# CONFIG_ARTHUR is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -CONFIG_APM=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=y -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NETFILTER_XTABLES is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -CONFIG_IP_NF_QUEUE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -CONFIG_VLAN_8021Q=m -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -# CONFIG_DONGLE is not set - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -# CONFIG_USB_IRDA is not set -# CONFIG_SIGMATEL_FIR is not set -# CONFIG_PXA_FICP is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -# CONFIG_BT_HCIUSB is not set -# CONFIG_BT_HCIUART is not set -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIDTL1 is not set -# CONFIG_BT_HCIBT3C is not set -# CONFIG_BT_HCIBLUECARD is not set -# CONFIG_BT_HCIBTUART is not set -# CONFIG_BT_HCIVHCI is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y -CONFIG_MTD_REDBOOT_PARTS_READONLY=y -# CONFIG_MTD_CMDLINE_PARTS is not set -# CONFIG_MTD_AFS_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -CONFIG_NFTL=y -CONFIG_NFTL_RW=y -CONFIG_INFTL=y -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -# CONFIG_MTD_CFI_NOSWAP is not set -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -CONFIG_MTD_CFI_LE_BYTE_SWAP=y -CONFIG_MTD_CFI_GEOMETRY=y -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_OTP is not set -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set -# CONFIG_MTD_XIP is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x0 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_TRIZEPS4 is not set -# CONFIG_MTD_ARM_INTEGRATOR is not set -# CONFIG_MTD_IMPA7 is not set -# CONFIG_MTD_SHARP_SL is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -CONFIG_MTD_DOC2001PLUS=y -CONFIG_MTD_DOCPROBE=y -CONFIG_MTD_DOCECC=y -# CONFIG_MTD_DOCPROBE_ADVANCED is not set -CONFIG_MTD_DOCPROBE_ADDRESS=0 - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_H1900 is not set -CONFIG_MTD_NAND_IDS=y -CONFIG_MTD_NAND_DISKONCHIP=y -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -# CONFIG_MTD_NAND_SHARPSL is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=y -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=4 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH 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_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_IDE_PXA_CF=y -CONFIG_IDE_ARM=y -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# - -# -# I2O device support -# - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -CONFIG_DAVICOM_PHY=y -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_SMC91X is not set -CONFIG_DM9000=y - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# - -# -# Token Ring devices -# - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -# CONFIG_NET_WIRELESS_RTNETLINK is not set - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -# CONFIG_PCMCIA_WAVELAN is not set -# CONFIG_PCMCIA_NETWAVE is not set - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_HERMES=m -# CONFIG_ATMEL is not set - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -# CONFIG_PCMCIA_SPECTRUM is not set -CONFIG_AIRO_CS=m -# CONFIG_PCMCIA_WL3501 is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN 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=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_TSDEV=y -CONFIG_INPUT_TSDEV_SCREEN_X=640 -CONFIG_INPUT_TSDEV_SCREEN_Y=480 -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD is not set -# CONFIG_KEYBOARD_XTKBD is not set -# CONFIG_KEYBOARD_NEWTON is not set -CONFIG_INPUT_MOUSE=y -# CONFIG_MOUSE_PS2 is not set -CONFIG_MOUSE_SERIAL=y -# CONFIG_MOUSE_VSXXXAA is not set -# CONFIG_INPUT_JOYSTICK is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_TOUCHSCREEN_ADS7846 is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_PXA=y -CONFIG_SERIAL_PXA_CONSOLE=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_SA1100_WATCHDOG=y - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_NVRAM is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set - -# -# Ftape, the floppy tape device driver -# - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_CARDMAN_4000 is not set -# CONFIG_CARDMAN_4040 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -CONFIG_I2C_PXA=y -CONFIG_I2C_PXA_SLAVE=y -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -CONFIG_SENSORS_EEPROM=m -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -# CONFIG_SPI_BITBANG is not set -CONFIG_SPI_PXA2XX=m - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia Capabilities Port drivers -# -CONFIG_UCB1400=y -CONFIG_UCB1400_TS=y - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_IDE_DISK=y - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -CONFIG_FB_FIRMWARE_EDID=y -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_PXA=y -# CONFIG_FB_PXA_PARAMETERS is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 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 -# CONFIG_FONT_10x18 is not set - -# -# Logo configuration -# -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=y - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -# CONFIG_SND_SEQ_DUMMY is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_SEQUENCER_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -CONFIG_SND_VERBOSE_PRINTK=y -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_AC97_CODEC=y -CONFIG_SND_AC97_BUS=y -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# -CONFIG_SND_PXA2XX_PCM=y -CONFIG_SND_PXA2XX_AC97=y - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -CONFIG_USB_TOUCHSCREEN=m -# CONFIG_USB_TOUCHSCREEN_EGALAX is not set -# CONFIG_USB_TOUCHSCREEN_PANJIT is not set -# CONFIG_USB_TOUCHSCREEN_3M is not set -# CONFIG_USB_TOUCHSCREEN_ITM is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -# CONFIG_USB_GADGET_NET2280 is not set -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -CONFIG_USB_GADGET_DUMMY_HCD=y -CONFIG_USB_DUMMY_HCD=y -CONFIG_USB_GADGET_DUALSPEED=y -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=m -CONFIG_USB_ETH_RNDIS=y -CONFIG_USB_GADGETFS=m -CONFIG_USB_FILE_STORAGE=m -# CONFIG_USB_FILE_STORAGE_TEST is not set -CONFIG_USB_G_SERIAL=m - -# -# MMC/SD Card support -# -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=y -CONFIG_MMC_PXA=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -CONFIG_RTC_DRV_SA1100=y -# CONFIG_RTC_DRV_TEST is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=y -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS_FS=y -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS_PROC_FS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE 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_V3_ACL=y -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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=y -# CONFIG_LDM_DEBUG is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-15" -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 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_ASCII=y -CONFIG_NLS_ISO8859_1=m -# 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=m -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_FS is not set -CONFIG_FRAME_POINTER=y -# CONFIG_UNWIND_INFO is not set -CONFIG_DEBUG_USER=y - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -# CONFIG_SECURITY_NETWORK is not set -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -# CONFIG_CRYPTO_HMAC is not set -# CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -CONFIG_CRC32=y -CONFIG_LIBCRC32C=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_REED_SOLOMON=y -CONFIG_REED_SOLOMON_DEC16=y diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 1320a0efc..a601b8b55 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -13,18 +13,16 @@ obj-y := compat.o entry-armv.o entry-common.o irq.o \ obj-$(CONFIG_APM) += apm.o obj-$(CONFIG_ISA_DMA_API) += dma.o obj-$(CONFIG_ARCH_ACORN) += ecard.o +obj-$(CONFIG_FOOTBRIDGE) += isa.o obj-$(CONFIG_FIQ) += fiq.o obj-$(CONFIG_MODULES) += armksyms.o module.o obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o -obj-$(CONFIG_PCI) += bios32.o isa.o +obj-$(CONFIG_PCI) += bios32.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o -obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o -AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 - -obj-$(CONFIG_IWMMXT) += iwmmxt.o iwmmxt-notifier.o +obj-$(CONFIG_IWMMXT) += iwmmxt.o AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt ifneq ($(CONFIG_ARCH_EBSA110),y) diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 33c55689f..2bed290fe 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -10,6 +10,7 @@ * [This document is available from Microsoft at: * http://www.microsoft.com/hwdev/busbios/amp_12.htm] */ +#include #include #include #include diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index da69e6605..c49b5d4d7 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c @@ -109,13 +109,11 @@ EXPORT_SYMBOL(memchr); EXPORT_SYMBOL(__memzero); /* user mem (segment) */ -EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(__strncpy_from_user); - -#ifdef CONFIG_MMU -EXPORT_SYMBOL(__copy_from_user); -EXPORT_SYMBOL(__copy_to_user); -EXPORT_SYMBOL(__clear_user); +EXPORT_SYMBOL(__arch_copy_from_user); +EXPORT_SYMBOL(__arch_copy_to_user); +EXPORT_SYMBOL(__arch_clear_user); +EXPORT_SYMBOL(__arch_strnlen_user); +EXPORT_SYMBOL(__arch_strncpy_from_user); EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); @@ -125,7 +123,6 @@ EXPORT_SYMBOL(__put_user_1); EXPORT_SYMBOL(__put_user_2); EXPORT_SYMBOL(__put_user_4); EXPORT_SYMBOL(__put_user_8); -#endif /* crypto hash */ EXPORT_SYMBOL(sha_transform); diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index cc2d58d02..396efba9b 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c @@ -59,9 +59,6 @@ int main(void) DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); #ifdef CONFIG_IWMMXT DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); -#endif -#ifdef CONFIG_CRUNCH - DEFINE(TI_CRUNCH_STATE, offsetof(struct thread_info, crunchstate)); #endif BLANK(); DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); @@ -105,7 +102,6 @@ int main(void) BLANK(); DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list)); DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); - DEFINE(PROCINFO_MM_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mm_mmu_flags)); - DEFINE(PROCINFO_IO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_io_mmu_flags)); + DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags)); return 0; } diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 240c448ec..de606dfa8 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -5,6 +5,7 @@ * * Bits taken from various places. */ +#include #include #include #include @@ -303,7 +304,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev) static void __devinit pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev) { - resource_size_t offset; + unsigned long offset; int i; for (i = 0; i < PCI_NUM_RESOURCES; i++) { @@ -370,6 +371,17 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) features &= ~(PCI_COMMAND_SERR | PCI_COMMAND_PARITY); switch (dev->class >> 8) { +#if defined(CONFIG_ISA) || defined(CONFIG_EISA) + case PCI_CLASS_BRIDGE_ISA: + case PCI_CLASS_BRIDGE_EISA: + /* + * If this device is an ISA bridge, set isa_bridge + * to point at this device. We will then go looking + * for things like keyboard, etc. + */ + isa_bridge = dev; + break; +#endif case PCI_CLASS_BRIDGE_PCI: pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &status); status |= PCI_BRIDGE_CTL_PARITY|PCI_BRIDGE_CTL_MASTER_ABORT; @@ -622,9 +634,9 @@ char * __init pcibios_setup(char *str) * which might be mirrored at 0x0100-0x03ff.. */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { - resource_size_t start = res->start; + unsigned long start = res->start; if (res->flags & IORESOURCE_IO && start & 0x300) start = (start + 0x3ff) & ~0x3ff; @@ -690,6 +702,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, /* * Mark this as IO */ + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); if (remap_pfn_range(vma, vma->vm_start, phys, diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index fa5c40c31..83c02a708 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -331,19 +331,6 @@ CALL(sys_mbind) /* 320 */ CALL(sys_get_mempolicy) CALL(sys_set_mempolicy) - CALL(sys_openat) - CALL(sys_mkdirat) - CALL(sys_mknodat) -/* 325 */ CALL(sys_fchownat) - CALL(sys_futimesat) - CALL(sys_fstatat64) - CALL(sys_unlinkat) - CALL(sys_renameat) -/* 330 */ CALL(sys_linkat) - CALL(sys_symlinkat) - CALL(sys_readlinkat) - CALL(sys_fchmodat) - CALL(sys_faccessat) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c index 0a1385442..60cfa7f32 100644 --- a/arch/arm/kernel/compat.c +++ b/arch/arm/kernel/compat.c @@ -15,6 +15,7 @@ * the kernel for 5 years from now (2001). This will allow boot loaders * to convert to the new struct tag way. */ +#include #include #include #include diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/kernel/crunch-bits.S deleted file mode 100644 index a26886758..000000000 --- a/arch/arm/kernel/crunch-bits.S +++ /dev/null @@ -1,305 +0,0 @@ -/* - * arch/arm/kernel/crunch-bits.S - * Cirrus MaverickCrunch context switching and handling - * - * Copyright (C) 2006 Lennert Buytenhek - * - * Shamelessly stolen from the iWMMXt code by Nicolas Pitre, which is - * Copyright (c) 2003-2004, MontaVista 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 -#include -#include -#include -#include - -/* - * We can't use hex constants here due to a bug in gas. - */ -#define CRUNCH_MVDX0 0 -#define CRUNCH_MVDX1 8 -#define CRUNCH_MVDX2 16 -#define CRUNCH_MVDX3 24 -#define CRUNCH_MVDX4 32 -#define CRUNCH_MVDX5 40 -#define CRUNCH_MVDX6 48 -#define CRUNCH_MVDX7 56 -#define CRUNCH_MVDX8 64 -#define CRUNCH_MVDX9 72 -#define CRUNCH_MVDX10 80 -#define CRUNCH_MVDX11 88 -#define CRUNCH_MVDX12 96 -#define CRUNCH_MVDX13 104 -#define CRUNCH_MVDX14 112 -#define CRUNCH_MVDX15 120 -#define CRUNCH_MVAX0L 128 -#define CRUNCH_MVAX0M 132 -#define CRUNCH_MVAX0H 136 -#define CRUNCH_MVAX1L 140 -#define CRUNCH_MVAX1M 144 -#define CRUNCH_MVAX1H 148 -#define CRUNCH_MVAX2L 152 -#define CRUNCH_MVAX2M 156 -#define CRUNCH_MVAX2H 160 -#define CRUNCH_MVAX3L 164 -#define CRUNCH_MVAX3M 168 -#define CRUNCH_MVAX3H 172 -#define CRUNCH_DSPSC 176 - -#define CRUNCH_SIZE 184 - - .text - -/* - * Lazy switching of crunch coprocessor context - * - * r10 = struct thread_info pointer - * r9 = ret_from_exception - * lr = undefined instr exit - * - * called from prefetch exception handler with interrupts disabled - */ -ENTRY(crunch_task_enable) - ldr r8, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr - - ldr r1, [r8, #0x80] - tst r1, #0x00800000 @ access to crunch enabled? - movne pc, lr @ if so no business here - mov r3, #0xaa @ unlock syscon swlock - str r3, [r8, #0xc0] - orr r1, r1, #0x00800000 @ enable access to crunch - str r1, [r8, #0x80] - - ldr r3, =crunch_owner - add r0, r10, #TI_CRUNCH_STATE @ get task crunch save area - ldr r2, [sp, #60] @ current task pc value - ldr r1, [r3] @ get current crunch owner - str r0, [r3] @ this task now owns crunch - sub r2, r2, #4 @ adjust pc back - str r2, [sp, #60] - - ldr r2, [r8, #0x80] - mov r2, r2 @ flush out enable (@@@) - - teq r1, #0 @ test for last ownership - mov lr, r9 @ normal exit from exception - beq crunch_load @ no owner, skip save - -crunch_save: - cfstr64 mvdx0, [r1, #CRUNCH_MVDX0] @ save 64b registers - cfstr64 mvdx1, [r1, #CRUNCH_MVDX1] - cfstr64 mvdx2, [r1, #CRUNCH_MVDX2] - cfstr64 mvdx3, [r1, #CRUNCH_MVDX3] - cfstr64 mvdx4, [r1, #CRUNCH_MVDX4] - cfstr64 mvdx5, [r1, #CRUNCH_MVDX5] - cfstr64 mvdx6, [r1, #CRUNCH_MVDX6] - cfstr64 mvdx7, [r1, #CRUNCH_MVDX7] - cfstr64 mvdx8, [r1, #CRUNCH_MVDX8] - cfstr64 mvdx9, [r1, #CRUNCH_MVDX9] - cfstr64 mvdx10, [r1, #CRUNCH_MVDX10] - cfstr64 mvdx11, [r1, #CRUNCH_MVDX11] - cfstr64 mvdx12, [r1, #CRUNCH_MVDX12] - cfstr64 mvdx13, [r1, #CRUNCH_MVDX13] - cfstr64 mvdx14, [r1, #CRUNCH_MVDX14] - cfstr64 mvdx15, [r1, #CRUNCH_MVDX15] - -#ifdef __ARMEB__ -#error fix me for ARMEB -#endif - - cfmv32al mvfx0, mvax0 @ save 72b accumulators - cfstr32 mvfx0, [r1, #CRUNCH_MVAX0L] - cfmv32am mvfx0, mvax0 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX0M] - cfmv32ah mvfx0, mvax0 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX0H] - cfmv32al mvfx0, mvax1 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX1L] - cfmv32am mvfx0, mvax1 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX1M] - cfmv32ah mvfx0, mvax1 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX1H] - cfmv32al mvfx0, mvax2 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX2L] - cfmv32am mvfx0, mvax2 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX2M] - cfmv32ah mvfx0, mvax2 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX2H] - cfmv32al mvfx0, mvax3 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX3L] - cfmv32am mvfx0, mvax3 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX3M] - cfmv32ah mvfx0, mvax3 - cfstr32 mvfx0, [r1, #CRUNCH_MVAX3H] - - cfmv32sc mvdx0, dspsc @ save status word - cfstr64 mvdx0, [r1, #CRUNCH_DSPSC] - - teq r0, #0 @ anything to load? - cfldr64eq mvdx0, [r1, #CRUNCH_MVDX0] @ mvdx0 was clobbered - moveq pc, lr - -crunch_load: - cfldr64 mvdx0, [r0, #CRUNCH_DSPSC] @ load status word - cfmvsc32 dspsc, mvdx0 - - cfldr32 mvfx0, [r0, #CRUNCH_MVAX0L] @ load 72b accumulators - cfmval32 mvax0, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX0M] - cfmvam32 mvax0, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX0H] - cfmvah32 mvax0, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX1L] - cfmval32 mvax1, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX1M] - cfmvam32 mvax1, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX1H] - cfmvah32 mvax1, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX2L] - cfmval32 mvax2, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX2M] - cfmvam32 mvax2, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX2H] - cfmvah32 mvax2, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX3L] - cfmval32 mvax3, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX3M] - cfmvam32 mvax3, mvfx0 - cfldr32 mvfx0, [r0, #CRUNCH_MVAX3H] - cfmvah32 mvax3, mvfx0 - - cfldr64 mvdx0, [r0, #CRUNCH_MVDX0] @ load 64b registers - cfldr64 mvdx1, [r0, #CRUNCH_MVDX1] - cfldr64 mvdx2, [r0, #CRUNCH_MVDX2] - cfldr64 mvdx3, [r0, #CRUNCH_MVDX3] - cfldr64 mvdx4, [r0, #CRUNCH_MVDX4] - cfldr64 mvdx5, [r0, #CRUNCH_MVDX5] - cfldr64 mvdx6, [r0, #CRUNCH_MVDX6] - cfldr64 mvdx7, [r0, #CRUNCH_MVDX7] - cfldr64 mvdx8, [r0, #CRUNCH_MVDX8] - cfldr64 mvdx9, [r0, #CRUNCH_MVDX9] - cfldr64 mvdx10, [r0, #CRUNCH_MVDX10] - cfldr64 mvdx11, [r0, #CRUNCH_MVDX11] - cfldr64 mvdx12, [r0, #CRUNCH_MVDX12] - cfldr64 mvdx13, [r0, #CRUNCH_MVDX13] - cfldr64 mvdx14, [r0, #CRUNCH_MVDX14] - cfldr64 mvdx15, [r0, #CRUNCH_MVDX15] - - mov pc, lr - -/* - * Back up crunch regs to save area and disable access to them - * (mainly for gdb or sleep mode usage) - * - * r0 = struct thread_info pointer of target task or NULL for any - */ -ENTRY(crunch_task_disable) - stmfd sp!, {r4, r5, lr} - - mrs ip, cpsr - orr r2, ip, #PSR_I_BIT @ disable interrupts - msr cpsr_c, r2 - - ldr r4, =(EP93XX_APB_VIRT_BASE + 0x00130000) @ syscon addr - - ldr r3, =crunch_owner - add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area - ldr r1, [r3] @ get current crunch owner - teq r1, #0 @ any current owner? - beq 1f @ no: quit - teq r0, #0 @ any owner? - teqne r1, r2 @ or specified one? - bne 1f @ no: quit - - ldr r5, [r4, #0x80] @ enable access to crunch - mov r2, #0xaa - str r2, [r4, #0xc0] - orr r5, r5, #0x00800000 - str r5, [r4, #0x80] - - mov r0, #0 @ nothing to load - str r0, [r3] @ no more current owner - ldr r2, [r4, #0x80] @ flush out enable (@@@) - mov r2, r2 - bl crunch_save - - mov r2, #0xaa @ disable access to crunch - str r2, [r4, #0xc0] - bic r5, r5, #0x00800000 - str r5, [r4, #0x80] - ldr r5, [r4, #0x80] @ flush out enable (@@@) - mov r5, r5 - -1: msr cpsr_c, ip @ restore interrupt mode - ldmfd sp!, {r4, r5, pc} - -/* - * Copy crunch state to given memory address - * - * r0 = struct thread_info pointer of target task - * r1 = memory address where to store crunch state - * - * this is called mainly in the creation of signal stack frames - */ -ENTRY(crunch_task_copy) - mrs ip, cpsr - orr r2, ip, #PSR_I_BIT @ disable interrupts - msr cpsr_c, r2 - - ldr r3, =crunch_owner - add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area - ldr r3, [r3] @ get current crunch owner - teq r2, r3 @ does this task own it... - beq 1f - - @ current crunch values are in the task save area - msr cpsr_c, ip @ restore interrupt mode - mov r0, r1 - mov r1, r2 - mov r2, #CRUNCH_SIZE - b memcpy - -1: @ this task owns crunch regs -- grab a copy from there - mov r0, #0 @ nothing to load - mov r3, lr @ preserve return address - bl crunch_save - msr cpsr_c, ip @ restore interrupt mode - mov pc, r3 - -/* - * Restore crunch state from given memory address - * - * r0 = struct thread_info pointer of target task - * r1 = memory address where to get crunch state from - * - * this is used to restore crunch state when unwinding a signal stack frame - */ -ENTRY(crunch_task_restore) - mrs ip, cpsr - orr r2, ip, #PSR_I_BIT @ disable interrupts - msr cpsr_c, r2 - - ldr r3, =crunch_owner - add r2, r0, #TI_CRUNCH_STATE @ get task crunch save area - ldr r3, [r3] @ get current crunch owner - teq r2, r3 @ does this task own it... - beq 1f - - @ this task doesn't own crunch regs -- use its save area - msr cpsr_c, ip @ restore interrupt mode - mov r0, r2 - mov r2, #CRUNCH_SIZE - b memcpy - -1: @ this task owns crunch regs -- load them directly - mov r0, r1 - mov r1, #0 @ nothing to save - mov r3, lr @ preserve return address - bl crunch_load - msr cpsr_c, ip @ restore interrupt mode - mov pc, r3 diff --git a/arch/arm/kernel/crunch.c b/arch/arm/kernel/crunch.c deleted file mode 100644 index cec837832..000000000 --- a/arch/arm/kernel/crunch.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * arch/arm/kernel/crunch.c - * Cirrus MaverickCrunch context switching and handling - * - * Copyright (C) 2006 Lennert Buytenhek - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct crunch_state *crunch_owner; - -void crunch_task_release(struct thread_info *thread) -{ - local_irq_disable(); - if (crunch_owner == &thread->crunchstate) - crunch_owner = NULL; - local_irq_enable(); -} - -static int crunch_enabled(u32 devcfg) -{ - return !!(devcfg & EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE); -} - -static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t) -{ - struct thread_info *thread = (struct thread_info *)t; - struct crunch_state *crunch_state; - u32 devcfg; - - crunch_state = &thread->crunchstate; - - switch (cmd) { - case THREAD_NOTIFY_FLUSH: - memset(crunch_state, 0, sizeof(*crunch_state)); - - /* - * FALLTHROUGH: Ensure we don't try to overwrite our newly - * initialised state information on the first fault. - */ - - case THREAD_NOTIFY_RELEASE: - crunch_task_release(thread); - break; - - case THREAD_NOTIFY_SWITCH: - devcfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); - if (crunch_enabled(devcfg) || crunch_owner == crunch_state) { - devcfg ^= EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE; - __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); - __raw_writel(devcfg, EP93XX_SYSCON_DEVICE_CONFIG); - } - break; - } - - return NOTIFY_DONE; -} - -static struct notifier_block crunch_notifier_block = { - .notifier_call = crunch_do, -}; - -static int __init crunch_init(void) -{ - thread_register_notifier(&crunch_notifier_block); - - return 0; -} - -late_initcall(crunch_init); diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index a5747e58a..da280bae3 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -9,6 +9,7 @@ * * 32-bit debugging code */ +#include #include .text diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 3e14b1348..00aa225e8 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c @@ -27,6 +27,7 @@ */ #define ECARD_C +#include #include #include #include @@ -295,7 +296,7 @@ ecard_task(void * unused) */ static void ecard_call(struct ecard_request *req) { - DECLARE_COMPLETION_ONSTACK(completion); + DECLARE_COMPLETION(completion); req->complete = &completion; @@ -470,8 +471,7 @@ static void ecard_irq_mask(unsigned int irqnr) } } -static struct irq_chip ecard_chip = { - .name = "ECARD", +static struct irqchip ecard_chip = { .ack = ecard_irq_mask, .mask = ecard_irq_mask, .unmask = ecard_irq_unmask, @@ -620,7 +620,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg ecard_t *ec = slot_to_ecard(slot); if (ec->claimed) { - struct irq_desc *d = irq_desc + ec->irq; + struct irqdesc *d = irqdesc + ec->irq; /* * this ugly code is so that we can operate a * prioritorising system: @@ -884,7 +884,7 @@ static ssize_t ecard_show_resources(struct device *dev, struct device_attribute int i; for (i = 0; i < ECARD_NUM_RESOURCES; i++) - str += sprintf(str, "%08x %08x %08lx\n", + str += sprintf(str, "%08lx %08lx %08lx\n", ec->resource[i].start, ec->resource[i].end, ec->resource[i].flags); diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index de4e33137..ab8e600c1 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -14,12 +14,12 @@ * Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction that causes * it to save wrong values... Be aware! */ +#include #include #include #include #include -#include #include "entry-header.S" @@ -491,15 +491,9 @@ call_fpe: b do_fpe @ CP#1 (FPE) b do_fpe @ CP#2 (FPE) mov pc, lr @ CP#3 -#ifdef CONFIG_CRUNCH - b crunch_task_enable @ CP#4 (MaverickCrunch) - b crunch_task_enable @ CP#5 (MaverickCrunch) - b crunch_task_enable @ CP#6 (MaverickCrunch) -#else mov pc, lr @ CP#4 mov pc, lr @ CP#5 mov pc, lr @ CP#6 -#endif mov pc, lr @ CP#7 mov pc, lr @ CP#8 mov pc, lr @ CP#9 @@ -566,8 +560,10 @@ ENTRY(__switch_to) add ip, r1, #TI_CPU_SAVE ldr r3, [r2, #TI_TP_VALUE] stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack -#ifdef CONFIG_MMU - ldr r6, [r2, #TI_CPU_DOMAIN] +#ifndef CONFIG_MMU + add r2, r2, #TI_CPU_DOMAIN +#else + ldr r6, [r2, #TI_CPU_DOMAIN]! #endif #if __LINUX_ARM_ARCH__ >= 6 #ifdef CONFIG_CPU_32v6K @@ -589,18 +585,21 @@ ENTRY(__switch_to) #ifdef CONFIG_MMU mcr p15, 0, r6, c3, c0, 0 @ Set domain register #endif -#if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT) - add r4, r2, #TI_CPU_DOMAIN + 40 @ cpu_context_save->extra +#ifdef CONFIG_VFP + @ Always disable VFP so we can lazily save/restore the old + @ state. This occurs in the context of the previous thread. + VFPFMRX r4, FPEXC + bic r4, r4, #FPEXC_ENABLE + VFPFMXR FPEXC, r4 +#endif +#if defined(CONFIG_IWMMXT) + bl iwmmxt_task_switch +#elif defined(CONFIG_CPU_XSCALE) + add r4, r2, #40 @ cpu_context_save->extra ldmib r4, {r4, r5} mar acc0, r4, r5 #endif - mov r5, r0 - add r4, r2, #TI_CPU_SAVE - ldr r0, =thread_notify_head - mov r1, #THREAD_NOTIFY_SWITCH - bl atomic_notifier_call_chain - mov r0, r5 - ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously + ldmib r2, {r4 - sl, fp, sp, pc} @ Load all regs saved previously __INIT @@ -634,14 +633,6 @@ ENTRY(__switch_to) * purpose. */ - .macro usr_ret, reg -#ifdef CONFIG_ARM_THUMB - bx \reg -#else - mov pc, \reg -#endif - .endm - .align 5 .globl __kuser_helper_start __kuser_helper_start: @@ -683,7 +674,7 @@ __kuser_memory_barrier: @ 0xffff0fa0 #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP) mcr p15, 0, r0, c7, c10, 5 @ dmb #endif - usr_ret lr + mov pc, lr .align 5 @@ -786,7 +777,7 @@ __kuser_cmpxchg: @ 0xffff0fc0 mov r0, #-1 adds r0, r0, #0 #endif - usr_ret lr + mov pc, lr #else @@ -800,7 +791,7 @@ __kuser_cmpxchg: @ 0xffff0fc0 #ifdef CONFIG_SMP mcr p15, 0, r0, c7, c10, 5 @ dmb #endif - usr_ret lr + mov pc, lr #endif @@ -842,11 +833,16 @@ __kuser_cmpxchg: @ 0xffff0fc0 __kuser_get_tls: @ 0xffff0fe0 #if !defined(CONFIG_HAS_TLS_REG) && !defined(CONFIG_TLS_REG_EMUL) + ldr r0, [pc, #(16 - 8)] @ TLS stored at 0xffff0ff0 + mov pc, lr + #else + mrc p15, 0, r0, c13, c0, 3 @ read TLS register + mov pc, lr + #endif - usr_ret lr .rep 5 .word 0 @ pad up to __kuser_helper_version diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 6f5e7c50d..dbcb11a31 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include @@ -270,7 +271,7 @@ ENTRY(sys_call_table) @ r8 = syscall table .type sys_syscall, #function sys_syscall: - bic scno, r0, #__NR_OABI_SYSCALL_BASE + eor scno, r0, #__NR_OABI_SYSCALL_BASE cmp scno, #__NR_syscall - __NR_SYSCALL_BASE cmpne scno, #NR_syscalls @ check range stmloia sp, {r5, r6} @ shuffle args @@ -339,7 +340,7 @@ sys_mmap2: streq r5, [sp, #4] beq do_mmap2 mov r0, #-EINVAL - mov pc, lr + RETINSTR(mov,pc, lr) #else str r5, [sp, #4] b do_mmap2 diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index 87ab4e157..f1c2fd5b6 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index e8e90346f..1ec3f7faa 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index ac9eb3d30..adf62e5ea 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -12,6 +12,7 @@ * for 32-bit CPUs which has a process ID register(CP15). * */ +#include #include #include @@ -38,7 +39,7 @@ __INIT .type stext, %function ENTRY(stext) - msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode + msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode @ and irqs disabled mrc p15, 0, r9, c0, c0 @ get processor id bl __lookup_processor_type @ r5=procinfo r9=cpuid diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 5365d4e59..04f7344e3 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -11,6 +11,7 @@ * * Kernel startup code for all 32-bit CPUs */ +#include #include #include @@ -70,7 +71,7 @@ __INIT .type stext, %function ENTRY(stext) - msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode + msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode @ and irqs disabled mrc p15, 0, r9, c0, c0 @ get processor id bl __lookup_processor_type @ r5=procinfo r9=cpuid @@ -103,7 +104,7 @@ ENTRY(secondary_startup) * the processor type - there is no need to check the machine type * as it has already been validated by the primary processor. */ - msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC mrc p15, 0, r9, c0, c0 @ get processor id bl __lookup_processor_type movs r10, r5 @ invalid processor? @@ -114,18 +115,18 @@ ENTRY(secondary_startup) * Use the page tables supplied from __cpu_up. */ adr r4, __secondary_data - ldmia r4, {r5, r7, r13} @ address to jump to after + ldmia r4, {r5, r6, r13} @ address to jump to after sub r4, r4, r5 @ mmu has been enabled - ldr r4, [r7, r4] @ get secondary_data.pgdir + ldr r4, [r6, r4] @ get secondary_data.pgdir adr lr, __enable_mmu @ return address - add pc, r10, #PROCINFO_INITFUNC @ initialise processor + add pc, r10, #12 @ initialise processor @ (return control reg) /* * r6 = &secondary_data */ ENTRY(__secondary_switched) - ldr sp, [r7, #4] @ get secondary_data.stack + ldr sp, [r6, #4] @ get secondary_data.stack mov fp, #0 b secondary_start_kernel @@ -220,7 +221,7 @@ __create_page_tables: teq r0, r6 bne 1b - ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags + ldr r7, [r10, #PROCINFO_MMUFLAGS] @ mmuflags /* * Create identity mapping for first MB of kernel to @@ -271,7 +272,8 @@ __create_page_tables: #endif #ifdef CONFIG_DEBUG_LL - ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags + bic r7, r7, #0x0c @ turn off cacheable + @ and bufferable bits /* * Map in IO space for serial debugging. * This allows debug messages to be output diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 2e1bf830f..2d5896b36 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -21,12 +21,12 @@ * IRQ's are in fact implemented a bit like signal handlers for the kernel. * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include #include #include -#include #include #include #include @@ -38,9 +38,28 @@ #include #include +#include #include +#include #include +/* + * Maximum IRQ count. Currently, this is arbitary. However, it should + * not be set too low to prevent false triggering. Conversely, if it + * is set too high, then you could miss a stuck IRQ. + * + * Maybe we ought to set a timer and re-enable the IRQ at a later time? + */ +#define MAX_IRQ_CNT 100000 + +static int noirqdebug; +static volatile unsigned long irq_err_count; +static DEFINE_SPINLOCK(irq_controller_lock); +static LIST_HEAD(irq_pending); + +struct irqdesc irq_desc[NR_IRQS]; +void (*init_arch_irq)(void) __initdata = NULL; + /* * No architecture-specific irq_finish function defined in arm/arch/irqs.h. */ @@ -48,8 +67,163 @@ #define irq_finish(irq) do { } while (0) #endif -void (*init_arch_irq)(void) __initdata = NULL; -unsigned long irq_err_count; +/* + * Dummy mask/unmask handler + */ +void dummy_mask_unmask_irq(unsigned int irq) +{ +} + +irqreturn_t no_action(int irq, void *dev_id, struct pt_regs *regs) +{ + return IRQ_NONE; +} + +void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + irq_err_count += 1; + printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq); +} + +static struct irqchip bad_chip = { + .ack = dummy_mask_unmask_irq, + .mask = dummy_mask_unmask_irq, + .unmask = dummy_mask_unmask_irq, +}; + +static struct irqdesc bad_irq_desc = { + .chip = &bad_chip, + .handle = do_bad_IRQ, + .pend = LIST_HEAD_INIT(bad_irq_desc.pend), + .disable_depth = 1, +}; + +#ifdef CONFIG_SMP +void synchronize_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + + while (desc->running) + barrier(); +} +EXPORT_SYMBOL(synchronize_irq); + +#define smp_set_running(desc) do { desc->running = 1; } while (0) +#define smp_clear_running(desc) do { desc->running = 0; } while (0) +#else +#define smp_set_running(desc) do { } while (0) +#define smp_clear_running(desc) do { } while (0) +#endif + +/** + * disable_irq_nosync - disable an irq without waiting + * @irq: Interrupt to disable + * + * Disable the selected interrupt line. Enables and disables + * are nested. We do this lazily. + * + * This function may be called from IRQ context. + */ +void disable_irq_nosync(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&irq_controller_lock, flags); + desc->disable_depth++; + list_del_init(&desc->pend); + spin_unlock_irqrestore(&irq_controller_lock, flags); +} +EXPORT_SYMBOL(disable_irq_nosync); + +/** + * disable_irq - disable an irq and wait for completion + * @irq: Interrupt to disable + * + * Disable the selected interrupt line. Enables and disables + * are nested. This functions waits for any pending IRQ + * handlers for this interrupt to complete before returning. + * If you use this function while holding a resource the IRQ + * handler may need you will deadlock. + * + * This function may be called - with care - from IRQ context. + */ +void disable_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + + disable_irq_nosync(irq); + if (desc->action) + synchronize_irq(irq); +} +EXPORT_SYMBOL(disable_irq); + +/** + * enable_irq - enable interrupt handling on an irq + * @irq: Interrupt to enable + * + * Re-enables the processing of interrupts on this IRQ line. + * Note that this may call the interrupt handler, so you may + * get unexpected results if you hold IRQs disabled. + * + * This function may be called from IRQ context. + */ +void enable_irq(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&irq_controller_lock, flags); + if (unlikely(!desc->disable_depth)) { + printk("enable_irq(%u) unbalanced from %p\n", irq, + __builtin_return_address(0)); + } else if (!--desc->disable_depth) { + desc->probing = 0; + desc->chip->unmask(irq); + + /* + * If the interrupt is waiting to be processed, + * try to re-run it. We can't directly run it + * from here since the caller might be in an + * interrupt-protected region. + */ + if (desc->pending && list_empty(&desc->pend)) { + desc->pending = 0; + if (!desc->chip->retrigger || + desc->chip->retrigger(irq)) + list_add(&desc->pend, &irq_pending); + } + } + spin_unlock_irqrestore(&irq_controller_lock, flags); +} +EXPORT_SYMBOL(enable_irq); + +/* + * Enable wake on selected irq + */ +void enable_irq_wake(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&irq_controller_lock, flags); + if (desc->chip->set_wake) + desc->chip->set_wake(irq, 1); + spin_unlock_irqrestore(&irq_controller_lock, flags); +} +EXPORT_SYMBOL(enable_irq_wake); + +void disable_irq_wake(unsigned int irq) +{ + struct irqdesc *desc = irq_desc + irq; + unsigned long flags; + + spin_lock_irqsave(&irq_controller_lock, flags); + if (desc->chip->set_wake) + desc->chip->set_wake(irq, 0); + spin_unlock_irqrestore(&irq_controller_lock, flags); +} +EXPORT_SYMBOL(disable_irq_wake); int show_interrupts(struct seq_file *p, void *v) { @@ -69,22 +243,21 @@ int show_interrupts(struct seq_file *p, void *v) } if (i < NR_IRQS) { - spin_lock_irqsave(&irq_desc[i].lock, flags); - action = irq_desc[i].action; + spin_lock_irqsave(&irq_controller_lock, flags); + action = irq_desc[i].action; if (!action) goto unlock; seq_printf(p, "%3d: ", i); for_each_present_cpu(cpu) seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]); - seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-"); seq_printf(p, " %s", action->name); for (action = action->next; action; action = action->next) seq_printf(p, ", %s", action->name); seq_putc(p, '\n'); unlock: - spin_unlock_irqrestore(&irq_desc[i].lock, flags); + spin_unlock_irqrestore(&irq_controller_lock, flags); } else if (i == NR_IRQS) { #ifdef CONFIG_ARCH_ACORN show_fiq_list(p, v); @@ -98,11 +271,267 @@ unlock: return 0; } -/* Handle bad interrupts */ -static struct irq_desc bad_irq_desc = { - .handle_irq = handle_bad_irq, - .lock = SPIN_LOCK_UNLOCKED -}; +/* + * IRQ lock detection. + * + * Hopefully, this should get us out of a few locked situations. + * However, it may take a while for this to happen, since we need + * a large number if IRQs to appear in the same jiffie with the + * same instruction pointer (or within 2 instructions). + */ +static int check_irq_lock(struct irqdesc *desc, int irq, struct pt_regs *regs) +{ + unsigned long instr_ptr = instruction_pointer(regs); + + if (desc->lck_jif == jiffies && + desc->lck_pc >= instr_ptr && desc->lck_pc < instr_ptr + 8) { + desc->lck_cnt += 1; + + if (desc->lck_cnt > MAX_IRQ_CNT) { + printk(KERN_ERR "IRQ LOCK: IRQ%d is locking the system, disabled\n", irq); + return 1; + } + } else { + desc->lck_cnt = 0; + desc->lck_pc = instruction_pointer(regs); + desc->lck_jif = jiffies; + } + return 0; +} + +static void +report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int ret) +{ + static int count = 100; + struct irqaction *action; + + if (noirqdebug) + return; + + if (ret != IRQ_HANDLED && ret != IRQ_NONE) { + if (!count) + return; + count--; + printk("irq%u: bogus retval mask %x\n", irq, ret); + } else { + desc->irqs_unhandled++; + if (desc->irqs_unhandled <= 99900) + return; + desc->irqs_unhandled = 0; + printk("irq%u: nobody cared\n", irq); + } + show_regs(regs); + dump_stack(); + printk(KERN_ERR "handlers:"); + action = desc->action; + do { + printk("\n" KERN_ERR "[<%p>]", action->handler); + print_symbol(" (%s)", (unsigned long)action->handler); + action = action->next; + } while (action); + printk("\n"); +} + +static int +__do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) +{ + unsigned int status; + int ret, retval = 0; + + spin_unlock(&irq_controller_lock); + +#ifdef CONFIG_NO_IDLE_HZ + if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) { + write_seqlock(&xtime_lock); + if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) + system_timer->dyn_tick->handler(irq, 0, regs); + write_sequnlock(&xtime_lock); + } +#endif + + if (!(action->flags & SA_INTERRUPT)) + local_irq_enable(); + + status = 0; + do { + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; + retval |= ret; + action = action->next; + } while (action); + + if (status & SA_SAMPLE_RANDOM) + add_interrupt_randomness(irq); + + spin_lock_irq(&irq_controller_lock); + + return retval; +} + +/* + * This is for software-decoded IRQs. The caller is expected to + * handle the ack, clear, mask and unmask issues. + */ +void +do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + struct irqaction *action; + const unsigned int cpu = smp_processor_id(); + + desc->triggered = 1; + + kstat_cpu(cpu).irqs[irq]++; + + smp_set_running(desc); + + action = desc->action; + if (action) { + int ret = __do_irq(irq, action, regs); + if (ret != IRQ_HANDLED) + report_bad_irq(irq, regs, desc, ret); + } + + smp_clear_running(desc); +} + +/* + * Most edge-triggered IRQ implementations seem to take a broken + * approach to this. Hence the complexity. + */ +void +do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + const unsigned int cpu = smp_processor_id(); + + desc->triggered = 1; + + /* + * If we're currently running this IRQ, or its disabled, + * we shouldn't process the IRQ. Instead, turn on the + * hardware masks. + */ + if (unlikely(desc->running || desc->disable_depth)) + goto running; + + /* + * Acknowledge and clear the IRQ, but don't mask it. + */ + desc->chip->ack(irq); + + /* + * Mark the IRQ currently in progress. + */ + desc->running = 1; + + kstat_cpu(cpu).irqs[irq]++; + + do { + struct irqaction *action; + + action = desc->action; + if (!action) + break; + + if (desc->pending && !desc->disable_depth) { + desc->pending = 0; + desc->chip->unmask(irq); + } + + __do_irq(irq, action, regs); + } while (desc->pending && !desc->disable_depth); + + desc->running = 0; + + /* + * If we were disabled or freed, shut down the handler. + */ + if (likely(desc->action && !check_irq_lock(desc, irq, regs))) + return; + + running: + /* + * We got another IRQ while this one was masked or + * currently running. Delay it. + */ + desc->pending = 1; + desc->chip->mask(irq); + desc->chip->ack(irq); +} + +/* + * Level-based IRQ handler. Nice and simple. + */ +void +do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + struct irqaction *action; + const unsigned int cpu = smp_processor_id(); + + desc->triggered = 1; + + /* + * Acknowledge, clear _AND_ disable the interrupt. + */ + desc->chip->ack(irq); + + if (likely(!desc->disable_depth)) { + kstat_cpu(cpu).irqs[irq]++; + + smp_set_running(desc); + + /* + * Return with this interrupt masked if no action + */ + action = desc->action; + if (action) { + int ret = __do_irq(irq, desc->action, regs); + + if (ret != IRQ_HANDLED) + report_bad_irq(irq, regs, desc, ret); + + if (likely(!desc->disable_depth && + !check_irq_lock(desc, irq, regs))) + desc->chip->unmask(irq); + } + + smp_clear_running(desc); + } +} + +static void do_pending_irqs(struct pt_regs *regs) +{ + struct list_head head, *l, *n; + + do { + struct irqdesc *desc; + + /* + * First, take the pending interrupts off the list. + * The act of calling the handlers may add some IRQs + * back onto the list. + */ + head = irq_pending; + INIT_LIST_HEAD(&irq_pending); + head.next->prev = &head; + head.prev->next = &head; + + /* + * Now run each entry. We must delete it from our + * list before calling the handler. + */ + list_for_each_safe(l, n, &head) { + desc = list_entry(l, struct irqdesc, pend); + list_del_init(&desc->pend); + desc_handle_irq(desc - irq_desc, desc, regs); + } + + /* + * The list must be empty. + */ + BUG_ON(!list_empty(&head)); + } while (!list_empty(&irq_pending)); +} /* * do_IRQ handles all hardware IRQ's. Decoded IRQs should not @@ -121,15 +550,96 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) desc = &bad_irq_desc; irq_enter(); - + spin_lock(&irq_controller_lock); desc_handle_irq(irq, desc, regs); - /* AT91 specific workaround */ + /* + * Now re-run any pending interrupts. + */ + if (!list_empty(&irq_pending)) + do_pending_irqs(regs); + irq_finish(irq); + spin_unlock(&irq_controller_lock); irq_exit(); } +void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained) +{ + struct irqdesc *desc; + unsigned long flags; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to install handler for IRQ%d\n", irq); + return; + } + + if (handle == NULL) + handle = do_bad_IRQ; + + desc = irq_desc + irq; + + if (is_chained && desc->chip == &bad_chip) + printk(KERN_WARNING "Trying to install chained handler for IRQ%d\n", irq); + + spin_lock_irqsave(&irq_controller_lock, flags); + if (handle == do_bad_IRQ) { + desc->chip->mask(irq); + desc->chip->ack(irq); + desc->disable_depth = 1; + } + desc->handle = handle; + if (handle != do_bad_IRQ && is_chained) { + desc->valid = 0; + desc->probe_ok = 0; + desc->disable_depth = 0; + desc->chip->unmask(irq); + } + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +void set_irq_chip(unsigned int irq, struct irqchip *chip) +{ + struct irqdesc *desc; + unsigned long flags; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq); + return; + } + + if (chip == NULL) + chip = &bad_chip; + + desc = irq_desc + irq; + spin_lock_irqsave(&irq_controller_lock, flags); + desc->chip = chip; + spin_unlock_irqrestore(&irq_controller_lock, flags); +} + +int set_irq_type(unsigned int irq, unsigned int type) +{ + struct irqdesc *desc; + unsigned long flags; + int ret = -ENXIO; + + if (irq >= NR_IRQS) { + printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); + return -ENODEV; + } + + desc = irq_desc + irq; + if (desc->chip->set_type) { + spin_lock_irqsave(&irq_controller_lock, flags); + ret = desc->chip->set_type(irq, type); + spin_unlock_irqrestore(&irq_controller_lock, flags); + } + + return ret; +} +EXPORT_SYMBOL(set_irq_type); + void set_irq_flags(unsigned int irq, unsigned int iflags) { struct irqdesc *desc; @@ -141,43 +651,422 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) } desc = irq_desc + irq; - spin_lock_irqsave(&desc->lock, flags); - desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; - if (iflags & IRQF_VALID) - desc->status &= ~IRQ_NOREQUEST; - if (iflags & IRQF_PROBE) - desc->status &= ~IRQ_NOPROBE; - if (!(iflags & IRQF_NOAUTOEN)) - desc->status &= ~IRQ_NOAUTOEN; - spin_unlock_irqrestore(&desc->lock, flags); + spin_lock_irqsave(&irq_controller_lock, flags); + desc->valid = (iflags & IRQF_VALID) != 0; + desc->probe_ok = (iflags & IRQF_PROBE) != 0; + desc->noautoenable = (iflags & IRQF_NOAUTOEN) != 0; + spin_unlock_irqrestore(&irq_controller_lock, flags); } -void __init init_IRQ(void) +int setup_irq(unsigned int irq, struct irqaction *new) +{ + int shared = 0; + struct irqaction *old, **p; + unsigned long flags; + struct irqdesc *desc; + + /* + * Some drivers like serial.c use request_irq() heavily, + * so we have to be careful not to interfere with a + * running system. + */ + if (new->flags & SA_SAMPLE_RANDOM) { + /* + * This function might sleep, we want to call it first, + * outside of the atomic block. + * Yes, this might clear the entropy pool if the wrong + * driver is attempted to be loaded, without actually + * installing a new handler, but is this really a problem, + * only the sysadmin is able to do this. + */ + rand_initialize_irq(irq); + } + + /* + * The following block of code has to be executed atomically + */ + desc = irq_desc + irq; + spin_lock_irqsave(&irq_controller_lock, flags); + p = &desc->action; + if ((old = *p) != NULL) { + /* + * Can't share interrupts unless both agree to and are + * the same type. + */ + if (!(old->flags & new->flags & SA_SHIRQ) || + (~old->flags & new->flags) & SA_TRIGGER_MASK) { + spin_unlock_irqrestore(&irq_controller_lock, flags); + return -EBUSY; + } + + /* add new interrupt at end of irq queue */ + do { + p = &old->next; + old = *p; + } while (old); + shared = 1; + } + + *p = new; + + if (!shared) { + desc->probing = 0; + desc->running = 0; + desc->pending = 0; + desc->disable_depth = 1; + + if (new->flags & SA_TRIGGER_MASK && + desc->chip->set_type) { + unsigned int type = new->flags & SA_TRIGGER_MASK; + desc->chip->set_type(irq, type); + } + + if (!desc->noautoenable) { + desc->disable_depth = 0; + desc->chip->unmask(irq); + } + } + + spin_unlock_irqrestore(&irq_controller_lock, flags); + return 0; +} + +/** + * request_irq - allocate an interrupt line + * @irq: Interrupt line to allocate + * @handler: Function to be called when the IRQ occurs + * @irqflags: Interrupt type flags + * @devname: An ascii name for the claiming device + * @dev_id: A cookie passed back to the handler function + * + * This call allocates interrupt resources and enables the + * interrupt line and IRQ handling. From the point this + * call is made your handler function may be invoked. Since + * your handler function must clear any interrupt the board + * raises, you must take care both to initialise your hardware + * and to set up the interrupt handler in the right order. + * + * Dev_id must be globally unique. Normally the address of the + * device data structure is used as the cookie. Since the handler + * receives this value it makes sense to use it. + * + * If your interrupt is shared you must pass a non NULL dev_id + * as this is required when freeing the interrupt. + * + * Flags: + * + * SA_SHIRQ Interrupt is shared + * + * SA_INTERRUPT Disable local interrupts while processing + * + * SA_SAMPLE_RANDOM The interrupt can be used for entropy + * + */ +int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long irq_flags, const char * devname, void *dev_id) +{ + unsigned long retval; + struct irqaction *action; + + if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || + (irq_flags & SA_SHIRQ && !dev_id)) + return -EINVAL; + + action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); + if (!action) + return -ENOMEM; + + action->handler = handler; + action->flags = irq_flags; + cpus_clear(action->mask); + action->name = devname; + action->next = NULL; + action->dev_id = dev_id; + + retval = setup_irq(irq, action); + + if (retval) + kfree(action); + return retval; +} + +EXPORT_SYMBOL(request_irq); + +/** + * free_irq - free an interrupt + * @irq: Interrupt line to free + * @dev_id: Device identity to free + * + * Remove an interrupt handler. The handler is removed and if the + * interrupt line is no longer in use by any driver it is disabled. + * On a shared IRQ the caller must ensure the interrupt is disabled + * on the card it drives before calling this function. + * + * This function must not be called from interrupt context. + */ +void free_irq(unsigned int irq, void *dev_id) +{ + struct irqaction * action, **p; + unsigned long flags; + + if (irq >= NR_IRQS || !irq_desc[irq].valid) { + printk(KERN_ERR "Trying to free IRQ%d\n",irq); + dump_stack(); + return; + } + + spin_lock_irqsave(&irq_controller_lock, flags); + for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) { + if (action->dev_id != dev_id) + continue; + + /* Found it - now free it */ + *p = action->next; + break; + } + spin_unlock_irqrestore(&irq_controller_lock, flags); + + if (!action) { + printk(KERN_ERR "Trying to free free IRQ%d\n",irq); + dump_stack(); + } else { + synchronize_irq(irq); + kfree(action); + } +} + +EXPORT_SYMBOL(free_irq); + +static DECLARE_MUTEX(probe_sem); + +/* Start the interrupt probing. Unlike other architectures, + * we don't return a mask of interrupts from probe_irq_on, + * but return the number of interrupts enabled for the probe. + * The interrupts which have been enabled for probing is + * instead recorded in the irq_desc structure. + */ +unsigned long probe_irq_on(void) { + unsigned int i, irqs = 0; + unsigned long delay; + + down(&probe_sem); + + /* + * first snaffle up any unassigned but + * probe-able interrupts + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (!irq_desc[i].probe_ok || irq_desc[i].action) + continue; + + irq_desc[i].probing = 1; + irq_desc[i].triggered = 0; + if (irq_desc[i].chip->set_type) + irq_desc[i].chip->set_type(i, IRQT_PROBE); + irq_desc[i].chip->unmask(i); + irqs += 1; + } + spin_unlock_irq(&irq_controller_lock); + + /* + * wait for spurious interrupts to mask themselves out again + */ + for (delay = jiffies + HZ/10; time_before(jiffies, delay); ) + /* min 100ms delay */; + + /* + * now filter out any obviously spurious interrupts + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (irq_desc[i].probing && irq_desc[i].triggered) { + irq_desc[i].probing = 0; + irqs -= 1; + } + } + spin_unlock_irq(&irq_controller_lock); + + return irqs; +} + +EXPORT_SYMBOL(probe_irq_on); + +unsigned int probe_irq_mask(unsigned long irqs) +{ + unsigned int mask = 0, i; + + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < 16 && i < NR_IRQS; i++) + if (irq_desc[i].probing && irq_desc[i].triggered) + mask |= 1 << i; + spin_unlock_irq(&irq_controller_lock); + + up(&probe_sem); + + return mask; +} +EXPORT_SYMBOL(probe_irq_mask); + +/* + * Possible return values: + * >= 0 - interrupt number + * -1 - no interrupt/many interrupts + */ +int probe_irq_off(unsigned long irqs) +{ + unsigned int i; + int irq_found = NO_IRQ; + + /* + * look at the interrupts, and find exactly one + * that we were probing has been triggered + */ + spin_lock_irq(&irq_controller_lock); + for (i = 0; i < NR_IRQS; i++) { + if (irq_desc[i].probing && + irq_desc[i].triggered) { + if (irq_found != NO_IRQ) { + irq_found = NO_IRQ; + goto out; + } + irq_found = i; + } + } + + if (irq_found == -1) + irq_found = NO_IRQ; +out: + spin_unlock_irq(&irq_controller_lock); + + up(&probe_sem); + + return irq_found; +} + +EXPORT_SYMBOL(probe_irq_off); + +#ifdef CONFIG_SMP +static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu) +{ + pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu); + + spin_lock_irq(&irq_controller_lock); + desc->cpu = cpu; + desc->chip->set_cpu(desc, irq, cpu); + spin_unlock_irq(&irq_controller_lock); +} + +#ifdef CONFIG_PROC_FS +static int +irq_affinity_read_proc(char *page, char **start, off_t off, int count, + int *eof, void *data) +{ + struct irqdesc *desc = irq_desc + ((int)data); + int len = cpumask_scnprintf(page, count, desc->affinity); + + if (count - len < 2) + return -EINVAL; + page[len++] = '\n'; + page[len] = '\0'; + + return len; +} + +static int +irq_affinity_write_proc(struct file *file, const char __user *buffer, + unsigned long count, void *data) +{ + unsigned int irq = (unsigned int)data; + struct irqdesc *desc = irq_desc + irq; + cpumask_t affinity, tmp; + int ret = -EIO; + + if (!desc->chip->set_cpu) + goto out; + + ret = cpumask_parse(buffer, count, affinity); + if (ret) + goto out; + + cpus_and(tmp, affinity, cpu_online_map); + if (cpus_empty(tmp)) { + ret = -EINVAL; + goto out; + } + + desc->affinity = affinity; + route_irq(desc, irq, first_cpu(tmp)); + ret = count; + + out: + return ret; +} +#endif +#endif + +void __init init_irq_proc(void) +{ +#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS) + struct proc_dir_entry *dir; int irq; - for (irq = 0; irq < NR_IRQS; irq++) - irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE | - IRQ_NOPROBE; + dir = proc_mkdir("irq", NULL); + if (!dir) + return; + + for (irq = 0; irq < NR_IRQS; irq++) { + struct proc_dir_entry *entry; + struct irqdesc *desc; + char name[16]; + + desc = irq_desc + irq; + memset(name, 0, sizeof(name)); + snprintf(name, sizeof(name) - 1, "%u", irq); + + desc->procdir = proc_mkdir(name, dir); + if (!desc->procdir) + continue; + + entry = create_proc_entry("smp_affinity", 0600, desc->procdir); + if (entry) { + entry->nlink = 1; + entry->data = (void *)irq; + entry->read_proc = irq_affinity_read_proc; + entry->write_proc = irq_affinity_write_proc; + } + } +#endif +} + +void __init init_IRQ(void) +{ + struct irqdesc *desc; + int irq; #ifdef CONFIG_SMP bad_irq_desc.affinity = CPU_MASK_ALL; bad_irq_desc.cpu = smp_processor_id(); #endif + + for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) { + *desc = bad_irq_desc; + INIT_LIST_HEAD(&desc->pend); + } + init_arch_irq(); } -#ifdef CONFIG_HOTPLUG_CPU - -static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu) +static int __init noirqdebug_setup(char *str) { - pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu); - - spin_lock_irq(&desc->lock); - desc->chip->set_affinity(irq, cpumask_of_cpu(cpu)); - spin_unlock_irq(&desc->lock); + noirqdebug = 1; + return 1; } +__setup("noirqdebug", noirqdebug_setup); + +#ifdef CONFIG_HOTPLUG_CPU /* * The CPU has been marked offline. Migrate IRQs off this CPU. If * the affinity settings do not allow other CPUs, force them onto any diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c index 54bbd9fe2..685c3e591 100644 --- a/arch/arm/kernel/isa.c +++ b/arch/arm/kernel/isa.c @@ -3,14 +3,21 @@ * * Copyright (C) 1999 Phil Blundell * + * ISA shared memory and I/O port support + */ + +/* * 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. - * - * ISA shared memory and I/O port support, and is required to support - * iopl, inb, outb and friends in userspace via glibc emulation. */ + +/* + * Nothing about this is actually ARM specific. One day we could move + * it into kernel/resource.c or some place like that. + */ + #include #include #include @@ -20,49 +27,21 @@ static unsigned int isa_membase, isa_portbase, isa_portshift; static ctl_table ctl_isa_vars[4] = { - { - .ctl_name = BUS_ISA_MEM_BASE, - .procname = "membase", - .data = &isa_membase, - .maxlen = sizeof(isa_membase), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, { - .ctl_name = BUS_ISA_PORT_BASE, - .procname = "portbase", - .data = &isa_portbase, - .maxlen = sizeof(isa_portbase), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, { - .ctl_name = BUS_ISA_PORT_SHIFT, - .procname = "portshift", - .data = &isa_portshift, - .maxlen = sizeof(isa_portshift), - .mode = 0444, - .proc_handler = &proc_dointvec, - }, {0} + {BUS_ISA_MEM_BASE, "membase", &isa_membase, + sizeof(isa_membase), 0444, NULL, &proc_dointvec}, + {BUS_ISA_PORT_BASE, "portbase", &isa_portbase, + sizeof(isa_portbase), 0444, NULL, &proc_dointvec}, + {BUS_ISA_PORT_SHIFT, "portshift", &isa_portshift, + sizeof(isa_portshift), 0444, NULL, &proc_dointvec}, + {0} }; static struct ctl_table_header *isa_sysctl_header; -static ctl_table ctl_isa[2] = { - { - .ctl_name = CTL_BUS_ISA, - .procname = "isa", - .mode = 0555, - .child = ctl_isa_vars, - }, {0} -}; - -static ctl_table ctl_bus[2] = { - { - .ctl_name = CTL_BUS, - .procname = "bus", - .mode = 0555, - .child = ctl_isa, - }, {0} -}; +static ctl_table ctl_isa[2] = {{CTL_BUS_ISA, "isa", NULL, 0, 0555, ctl_isa_vars}, + {0}}; +static ctl_table ctl_bus[2] = {{CTL_BUS, "bus", NULL, 0, 0555, ctl_isa}, + {0}}; void __init register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift) diff --git a/arch/arm/kernel/iwmmxt-notifier.c b/arch/arm/kernel/iwmmxt-notifier.c deleted file mode 100644 index 0d1a1db40..000000000 --- a/arch/arm/kernel/iwmmxt-notifier.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * linux/arch/arm/kernel/iwmmxt-notifier.c - * - * XScale iWMMXt (Concan) context switching and handling - * - * Initial code: - * Copyright (c) 2003, Intel Corporation - * - * Full lazy switching support, optimizations and more, by Nicolas Pitre - * Copyright (c) 2003-2004, MontaVista 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 -#include -#include -#include -#include -#include -#include -#include - -static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t) -{ - struct thread_info *thread = t; - - switch (cmd) { - case THREAD_NOTIFY_FLUSH: - /* - * flush_thread() zeroes thread->fpstate, so no need - * to do anything here. - * - * FALLTHROUGH: Ensure we don't try to overwrite our newly - * initialised state information on the first fault. - */ - - case THREAD_NOTIFY_RELEASE: - iwmmxt_task_release(thread); - break; - - case THREAD_NOTIFY_SWITCH: - iwmmxt_task_switch(thread); - break; - } - - return NOTIFY_DONE; -} - -static struct notifier_block iwmmxt_notifier_block = { - .notifier_call = iwmmxt_do, -}; - -static int __init iwmmxt_init(void) -{ - thread_register_notifier(&iwmmxt_notifier_block); - - return 0; -} - -late_initcall(iwmmxt_init); diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index b63b528f2..24c7b0477 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S @@ -271,27 +271,30 @@ ENTRY(iwmmxt_task_restore) /* * Concan handling on task switch * - * r0 = next thread_info pointer + * r0 = previous task_struct pointer (must be preserved) + * r1 = previous thread_info pointer + * r2 = next thread_info.cpu_domain pointer (must be preserved) * - * Called only from the iwmmxt notifier with task preemption disabled. + * Called only from __switch_to with task preemption disabled. + * No need to care about preserving r4 and above. */ ENTRY(iwmmxt_task_switch) - mrc p15, 0, r1, c15, c1, 0 - tst r1, #0x3 @ CP0 and CP1 accessible? + mrc p15, 0, r4, c15, c1, 0 + tst r4, #0x3 @ CP0 and CP1 accessible? bne 1f @ yes: block them for next task - ldr r2, =concan_owner - add r3, r0, #TI_IWMMXT_STATE @ get next task Concan save area - ldr r2, [r2] @ get current Concan owner - teq r2, r3 @ next task owns it? + ldr r5, =concan_owner + add r6, r2, #(TI_IWMMXT_STATE - TI_CPU_DOMAIN) @ get next task Concan save area + ldr r5, [r5] @ get current Concan owner + teq r5, r6 @ next task owns it? movne pc, lr @ no: leave Concan disabled -1: eor r1, r1, #3 @ flip Concan access - mcr p15, 0, r1, c15, c1, 0 +1: eor r4, r4, #3 @ flip Concan access + mcr p15, 0, r4, c15, c1, 0 - mrc p15, 0, r1, c2, c0, 0 - sub pc, lr, r1, lsr #32 @ cpwait and return + mrc p15, 0, r4, c2, c0, 0 + sub pc, lr, r4, lsr #32 @ cpwait and return /* * Remove Concan ownership of given task diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 298363d97..055bf5d28 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -9,6 +9,7 @@ * * Module allocation method suggested by Andi Kleen. */ +#include #include #include #include diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 3079535af..7df6e1aaa 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -27,12 +28,10 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -72,36 +71,8 @@ static int __init hlt_setup(char *__unused) __setup("nohlt", nohlt_setup); __setup("hlt", hlt_setup); -void arm_machine_restart(char mode) -{ - /* - * Clean and disable cache, and turn off interrupts - */ - cpu_proc_fin(); - - /* - * Tell the mm system that we are going to reboot - - * we may need it to insert some 1:1 mappings so that - * soft boot works. - */ - setup_mm_for_reboot(mode); - - /* - * Now call the architecture specific reboot code. - */ - arch_reset(mode); - - /* - * Whoops - the architecture was unable to reboot. - * Tell the user! - */ - mdelay(1000); - printk("Reboot failed -- System halted\n"); - while (1); -} - /* - * Function pointers to optional machine specific functions + * The following aren't currently used. */ void (*pm_idle)(void); EXPORT_SYMBOL(pm_idle); @@ -109,10 +80,6 @@ EXPORT_SYMBOL(pm_idle); void (*pm_power_off)(void); EXPORT_SYMBOL(pm_power_off); -void (*arm_pm_restart)(char str) = arm_machine_restart; -EXPORT_SYMBOL_GPL(arm_pm_restart); - - /* * This is our default idle handler. We need to disable * interrupts here to ensure we don't miss a wakeup call. @@ -184,9 +151,33 @@ void machine_power_off(void) pm_power_off(); } + void machine_restart(char * __unused) { - arm_pm_restart(reboot_mode); + /* + * Clean and disable cache, and turn off interrupts + */ + cpu_proc_fin(); + + /* + * Tell the mm system that we are going to reboot - + * we may need it to insert some 1:1 mappings so that + * soft boot works. + */ + setup_mm_for_reboot(reboot_mode); + + /* + * Now call the architecture specific reboot code. + */ + arch_reset(reboot_mode); + + /* + * Whoops - the architecture was unable to reboot. + * Tell the user! + */ + mdelay(1000); + printk("Reboot failed -- System halted\n"); + while (1); } void __show_regs(struct pt_regs *regs) @@ -338,9 +329,13 @@ void exit_thread(void) { } -ATOMIC_NOTIFIER_HEAD(thread_notify_head); +static void default_fp_init(union fp_state *fp) +{ + memset(fp, 0, sizeof(union fp_state)); +} -EXPORT_SYMBOL_GPL(thread_notify_head); +void (*fp_init)(union fp_state *) = default_fp_init; +EXPORT_SYMBOL(fp_init); void flush_thread(void) { @@ -349,16 +344,23 @@ void flush_thread(void) memset(thread->used_cp, 0, sizeof(thread->used_cp)); memset(&tsk->thread.debug, 0, sizeof(struct debug_info)); - memset(&thread->fpstate, 0, sizeof(union fp_state)); - - thread_notify(THREAD_NOTIFY_FLUSH, thread); +#if defined(CONFIG_IWMMXT) + iwmmxt_task_release(thread); +#endif + fp_init(&thread->fpstate); +#if defined(CONFIG_VFP) + vfp_flush_thread(&thread->vfpstate); +#endif } void release_thread(struct task_struct *dead_task) { - struct thread_info *thread = task_thread_info(dead_task); - - thread_notify(THREAD_NOTIFY_RELEASE, thread); +#if defined(CONFIG_VFP) + vfp_release_thread(&task_thread_info(dead_task)->vfpstate); +#endif +#if defined(CONFIG_IWMMXT) + iwmmxt_task_release(task_thread_info(dead_task)); +#endif } asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 9254ba2f4..a1d1b2906 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -633,32 +634,6 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) #endif -#ifdef CONFIG_CRUNCH -/* - * Get the child Crunch state. - */ -static int ptrace_getcrunchregs(struct task_struct *tsk, void __user *ufp) -{ - struct thread_info *thread = task_thread_info(tsk); - - crunch_task_disable(thread); /* force it to ram */ - return copy_to_user(ufp, &thread->crunchstate, CRUNCH_SIZE) - ? -EFAULT : 0; -} - -/* - * Set the child Crunch state. - */ -static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp) -{ - struct thread_info *thread = task_thread_info(tsk); - - crunch_task_release(thread); /* force a reload */ - return copy_from_user(&thread->crunchstate, ufp, CRUNCH_SIZE) - ? -EFAULT : 0; -} -#endif - long arch_ptrace(struct task_struct *child, long request, long addr, long data) { unsigned long tmp; @@ -790,16 +765,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) child->ptrace_message = data; break; -#ifdef CONFIG_CRUNCH - case PTRACE_GETCRUNCHREGS: - ret = ptrace_getcrunchregs(child, (void __user *)data); - break; - - case PTRACE_SETCRUNCHREGS: - ret = ptrace_setcrunchregs(child, (void __user *)data); - break; -#endif - default: ret = ptrace_request(child, request, addr, data); break; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 0a722e77c..9fc9af88c 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -17,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -118,24 +119,9 @@ DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data); * Standard memory resources */ static struct resource mem_res[] = { - { - .name = "Video RAM", - .start = 0, - .end = 0, - .flags = IORESOURCE_MEM - }, - { - .name = "Kernel text", - .start = 0, - .end = 0, - .flags = IORESOURCE_MEM - }, - { - .name = "Kernel data", - .start = 0, - .end = 0, - .flags = IORESOURCE_MEM - } + { "Video RAM", 0, 0, IORESOURCE_MEM }, + { "Kernel text", 0, 0, IORESOURCE_MEM }, + { "Kernel data", 0, 0, IORESOURCE_MEM } }; #define video_ram mem_res[0] @@ -143,24 +129,9 @@ static struct resource mem_res[] = { #define kernel_data mem_res[2] static struct resource io_res[] = { - { - .name = "reserved", - .start = 0x3bc, - .end = 0x3be, - .flags = IORESOURCE_IO | IORESOURCE_BUSY - }, - { - .name = "reserved", - .start = 0x378, - .end = 0x37f, - .flags = IORESOURCE_IO | IORESOURCE_BUSY - }, - { - .name = "reserved", - .start = 0x278, - .end = 0x27f, - .flags = IORESOURCE_IO | IORESOURCE_BUSY - } + { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY }, + { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY }, + { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY } }; #define lp0 io_res[0] @@ -344,9 +315,9 @@ static void __init setup_processor(void) cpu_cache = *list->cache; #endif - printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", + printk("CPU: %s [%08x] revision %d (ARMv%s)\n", cpu_name, processor_id, (int)processor_id & 15, - proc_arch[cpu_architecture()], cr_alignment); + proc_arch[cpu_architecture()]); sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); @@ -837,7 +808,7 @@ static int __init topology_init(void) int cpu; for_each_possible_cpu(cpu) - register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu); + register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu, NULL); return 0; } diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 48cf7fffd..a0cd0a90a 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -131,38 +132,18 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, return ret; } -#ifdef CONFIG_CRUNCH -static int preserve_crunch_context(struct crunch_sigframe *frame) -{ - char kbuf[sizeof(*frame) + 8]; - struct crunch_sigframe *kframe; - - /* the crunch context must be 64 bit aligned */ - kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7); - kframe->magic = CRUNCH_MAGIC; - kframe->size = CRUNCH_STORAGE_SIZE; - crunch_task_copy(current_thread_info(), &kframe->storage); - return __copy_to_user(frame, kframe, sizeof(*frame)); -} - -static int restore_crunch_context(struct crunch_sigframe *frame) -{ - char kbuf[sizeof(*frame) + 8]; - struct crunch_sigframe *kframe; +#ifdef CONFIG_IWMMXT - /* the crunch context must be 64 bit aligned */ - kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7); - if (__copy_from_user(kframe, frame, sizeof(*frame))) - return -1; - if (kframe->magic != CRUNCH_MAGIC || - kframe->size != CRUNCH_STORAGE_SIZE) - return -1; - crunch_task_restore(current_thread_info(), &kframe->storage); - return 0; -} -#endif +/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ +#define IWMMXT_STORAGE_SIZE (0x98 + 8) +#define IWMMXT_MAGIC0 0x12ef842a +#define IWMMXT_MAGIC1 0x1c07ca71 -#ifdef CONFIG_IWMMXT +struct iwmmxt_sigframe { + unsigned long magic0; + unsigned long magic1; + unsigned long storage[0x98/4]; +}; static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame) { @@ -171,8 +152,8 @@ static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame) /* the iWMMXt context must be 64 bit aligned */ kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7); - kframe->magic = IWMMXT_MAGIC; - kframe->size = IWMMXT_STORAGE_SIZE; + kframe->magic0 = IWMMXT_MAGIC0; + kframe->magic1 = IWMMXT_MAGIC1; iwmmxt_task_copy(current_thread_info(), &kframe->storage); return __copy_to_user(frame, kframe, sizeof(*frame)); } @@ -186,8 +167,8 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7); if (__copy_from_user(kframe, frame, sizeof(*frame))) return -1; - if (kframe->magic != IWMMXT_MAGIC || - kframe->size != IWMMXT_STORAGE_SIZE) + if (kframe->magic0 != IWMMXT_MAGIC0 || + kframe->magic1 != IWMMXT_MAGIC1) return -1; iwmmxt_task_restore(current_thread_info(), &kframe->storage); return 0; @@ -195,66 +176,71 @@ static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) #endif +/* + * Auxiliary signal frame. This saves stuff like FP state. + * The layout of this structure is not part of the user ABI. + */ +struct aux_sigframe { +#ifdef CONFIG_IWMMXT + struct iwmmxt_sigframe iwmmxt; +#endif +#ifdef CONFIG_VFP + union vfp_state vfp; +#endif +}; + /* * Do a signal return; undo the signal stack. These are aligned to 64-bit. */ struct sigframe { - struct ucontext uc; + struct sigcontext sc; + unsigned long extramask[_NSIG_WORDS-1]; unsigned long retcode[2]; + struct aux_sigframe aux __attribute__((aligned(8))); }; struct rt_sigframe { + struct siginfo __user *pinfo; + void __user *puc; struct siginfo info; - struct sigframe sig; + struct ucontext uc; + unsigned long retcode[2]; + struct aux_sigframe aux __attribute__((aligned(8))); }; -static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) +static int +restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, + struct aux_sigframe __user *aux) { - struct aux_sigframe __user *aux; - sigset_t set; - int err; - - err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); - if (err == 0) { - sigdelsetmask(&set, ~_BLOCKABLE); - spin_lock_irq(¤t->sighand->siglock); - current->blocked = set; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); - } + int err = 0; - __get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err); - __get_user_error(regs->ARM_r1, &sf->uc.uc_mcontext.arm_r1, err); - __get_user_error(regs->ARM_r2, &sf->uc.uc_mcontext.arm_r2, err); - __get_user_error(regs->ARM_r3, &sf->uc.uc_mcontext.arm_r3, err); - __get_user_error(regs->ARM_r4, &sf->uc.uc_mcontext.arm_r4, err); - __get_user_error(regs->ARM_r5, &sf->uc.uc_mcontext.arm_r5, err); - __get_user_error(regs->ARM_r6, &sf->uc.uc_mcontext.arm_r6, err); - __get_user_error(regs->ARM_r7, &sf->uc.uc_mcontext.arm_r7, err); - __get_user_error(regs->ARM_r8, &sf->uc.uc_mcontext.arm_r8, err); - __get_user_error(regs->ARM_r9, &sf->uc.uc_mcontext.arm_r9, err); - __get_user_error(regs->ARM_r10, &sf->uc.uc_mcontext.arm_r10, err); - __get_user_error(regs->ARM_fp, &sf->uc.uc_mcontext.arm_fp, err); - __get_user_error(regs->ARM_ip, &sf->uc.uc_mcontext.arm_ip, err); - __get_user_error(regs->ARM_sp, &sf->uc.uc_mcontext.arm_sp, err); - __get_user_error(regs->ARM_lr, &sf->uc.uc_mcontext.arm_lr, err); - __get_user_error(regs->ARM_pc, &sf->uc.uc_mcontext.arm_pc, err); - __get_user_error(regs->ARM_cpsr, &sf->uc.uc_mcontext.arm_cpsr, err); + __get_user_error(regs->ARM_r0, &sc->arm_r0, err); + __get_user_error(regs->ARM_r1, &sc->arm_r1, err); + __get_user_error(regs->ARM_r2, &sc->arm_r2, err); + __get_user_error(regs->ARM_r3, &sc->arm_r3, err); + __get_user_error(regs->ARM_r4, &sc->arm_r4, err); + __get_user_error(regs->ARM_r5, &sc->arm_r5, err); + __get_user_error(regs->ARM_r6, &sc->arm_r6, err); + __get_user_error(regs->ARM_r7, &sc->arm_r7, err); + __get_user_error(regs->ARM_r8, &sc->arm_r8, err); + __get_user_error(regs->ARM_r9, &sc->arm_r9, err); + __get_user_error(regs->ARM_r10, &sc->arm_r10, err); + __get_user_error(regs->ARM_fp, &sc->arm_fp, err); + __get_user_error(regs->ARM_ip, &sc->arm_ip, err); + __get_user_error(regs->ARM_sp, &sc->arm_sp, err); + __get_user_error(regs->ARM_lr, &sc->arm_lr, err); + __get_user_error(regs->ARM_pc, &sc->arm_pc, err); + __get_user_error(regs->ARM_cpsr, &sc->arm_cpsr, err); err |= !valid_user_regs(regs); - aux = (struct aux_sigframe __user *) sf->uc.uc_regspace; -#ifdef CONFIG_CRUNCH - if (err == 0) - err |= restore_crunch_context(&aux->crunch); -#endif #ifdef CONFIG_IWMMXT if (err == 0 && test_thread_flag(TIF_USING_IWMMXT)) err |= restore_iwmmxt_context(&aux->iwmmxt); #endif #ifdef CONFIG_VFP // if (err == 0) -// err |= vfp_restore_state(&sf->aux.vfp); +// err |= vfp_restore_state(&aux->vfp); #endif return err; @@ -263,6 +249,7 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) asmlinkage int sys_sigreturn(struct pt_regs *regs) { struct sigframe __user *frame; + sigset_t set; /* Always make any pending restarted system calls return -EINTR */ current_thread_info()->restart_block.fn = do_no_restart_syscall; @@ -279,8 +266,19 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) if (!access_ok(VERIFY_READ, frame, sizeof (*frame))) goto badframe; + if (__get_user(set.sig[0], &frame->sc.oldmask) + || (_NSIG_WORDS > 1 + && __copy_from_user(&set.sig[1], &frame->extramask, + sizeof(frame->extramask)))) + goto badframe; - if (restore_sigframe(regs, frame)) + sigdelsetmask(&set, ~_BLOCKABLE); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); + + if (restore_sigcontext(regs, &frame->sc, &frame->aux)) goto badframe; /* Send SIGTRAP if we're single-stepping */ @@ -299,6 +297,7 @@ badframe: asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) { struct rt_sigframe __user *frame; + sigset_t set; /* Always make any pending restarted system calls return -EINTR */ current_thread_info()->restart_block.fn = do_no_restart_syscall; @@ -315,11 +314,19 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) if (!access_ok(VERIFY_READ, frame, sizeof (*frame))) goto badframe; + if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) + goto badframe; + + sigdelsetmask(&set, ~_BLOCKABLE); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); - if (restore_sigframe(regs, &frame->sig)) + if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &frame->aux)) goto badframe; - if (do_sigaltstack(&frame->sig.uc.uc_stack, NULL, regs->ARM_sp) == -EFAULT) + if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->ARM_sp) == -EFAULT) goto badframe; /* Send SIGTRAP if we're single-stepping */ @@ -336,50 +343,42 @@ badframe: } static int -setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set) +setup_sigcontext(struct sigcontext __user *sc, struct aux_sigframe __user *aux, + struct pt_regs *regs, unsigned long mask) { - struct aux_sigframe __user *aux; int err = 0; - __put_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err); - __put_user_error(regs->ARM_r1, &sf->uc.uc_mcontext.arm_r1, err); - __put_user_error(regs->ARM_r2, &sf->uc.uc_mcontext.arm_r2, err); - __put_user_error(regs->ARM_r3, &sf->uc.uc_mcontext.arm_r3, err); - __put_user_error(regs->ARM_r4, &sf->uc.uc_mcontext.arm_r4, err); - __put_user_error(regs->ARM_r5, &sf->uc.uc_mcontext.arm_r5, err); - __put_user_error(regs->ARM_r6, &sf->uc.uc_mcontext.arm_r6, err); - __put_user_error(regs->ARM_r7, &sf->uc.uc_mcontext.arm_r7, err); - __put_user_error(regs->ARM_r8, &sf->uc.uc_mcontext.arm_r8, err); - __put_user_error(regs->ARM_r9, &sf->uc.uc_mcontext.arm_r9, err); - __put_user_error(regs->ARM_r10, &sf->uc.uc_mcontext.arm_r10, err); - __put_user_error(regs->ARM_fp, &sf->uc.uc_mcontext.arm_fp, err); - __put_user_error(regs->ARM_ip, &sf->uc.uc_mcontext.arm_ip, err); - __put_user_error(regs->ARM_sp, &sf->uc.uc_mcontext.arm_sp, err); - __put_user_error(regs->ARM_lr, &sf->uc.uc_mcontext.arm_lr, err); - __put_user_error(regs->ARM_pc, &sf->uc.uc_mcontext.arm_pc, err); - __put_user_error(regs->ARM_cpsr, &sf->uc.uc_mcontext.arm_cpsr, err); - - __put_user_error(current->thread.trap_no, &sf->uc.uc_mcontext.trap_no, err); - __put_user_error(current->thread.error_code, &sf->uc.uc_mcontext.error_code, err); - __put_user_error(current->thread.address, &sf->uc.uc_mcontext.fault_address, err); - __put_user_error(set->sig[0], &sf->uc.uc_mcontext.oldmask, err); - - err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set)); - - aux = (struct aux_sigframe __user *) sf->uc.uc_regspace; -#ifdef CONFIG_CRUNCH - if (err == 0) - err |= preserve_crunch_context(&aux->crunch); -#endif + __put_user_error(regs->ARM_r0, &sc->arm_r0, err); + __put_user_error(regs->ARM_r1, &sc->arm_r1, err); + __put_user_error(regs->ARM_r2, &sc->arm_r2, err); + __put_user_error(regs->ARM_r3, &sc->arm_r3, err); + __put_user_error(regs->ARM_r4, &sc->arm_r4, err); + __put_user_error(regs->ARM_r5, &sc->arm_r5, err); + __put_user_error(regs->ARM_r6, &sc->arm_r6, err); + __put_user_error(regs->ARM_r7, &sc->arm_r7, err); + __put_user_error(regs->ARM_r8, &sc->arm_r8, err); + __put_user_error(regs->ARM_r9, &sc->arm_r9, err); + __put_user_error(regs->ARM_r10, &sc->arm_r10, err); + __put_user_error(regs->ARM_fp, &sc->arm_fp, err); + __put_user_error(regs->ARM_ip, &sc->arm_ip, err); + __put_user_error(regs->ARM_sp, &sc->arm_sp, err); + __put_user_error(regs->ARM_lr, &sc->arm_lr, err); + __put_user_error(regs->ARM_pc, &sc->arm_pc, err); + __put_user_error(regs->ARM_cpsr, &sc->arm_cpsr, err); + + __put_user_error(current->thread.trap_no, &sc->trap_no, err); + __put_user_error(current->thread.error_code, &sc->error_code, err); + __put_user_error(current->thread.address, &sc->fault_address, err); + __put_user_error(mask, &sc->oldmask, err); + #ifdef CONFIG_IWMMXT if (err == 0 && test_thread_flag(TIF_USING_IWMMXT)) err |= preserve_iwmmxt_context(&aux->iwmmxt); #endif #ifdef CONFIG_VFP // if (err == 0) -// err |= vfp_save_state(&sf->aux.vfp); +// err |= vfp_save_state(&aux->vfp); #endif - __put_user_error(0, &aux->end_magic, err); return err; } @@ -488,12 +487,13 @@ setup_frame(int usig, struct k_sigaction *ka, sigset_t *set, struct pt_regs *reg if (!frame) return 1; - /* - * Set uc.uc_flags to a value which sc.trap_no would never have. - */ - __put_user_error(0x5ac3c35a, &frame->uc.uc_flags, err); + err |= setup_sigcontext(&frame->sc, &frame->aux, regs, set->sig[0]); + + if (_NSIG_WORDS > 1) { + err |= __copy_to_user(frame->extramask, &set->sig[1], + sizeof(frame->extramask)); + } - err |= setup_sigframe(frame, regs, set); if (err == 0) err = setup_return(regs, ka, frame->retcode, frame, usig); @@ -511,20 +511,25 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, if (!frame) return 1; + __put_user_error(&frame->info, &frame->pinfo, err); + __put_user_error(&frame->uc, &frame->puc, err); err |= copy_siginfo_to_user(&frame->info, info); - __put_user_error(0, &frame->sig.uc.uc_flags, err); - __put_user_error(NULL, &frame->sig.uc.uc_link, err); + __put_user_error(0, &frame->uc.uc_flags, err); + __put_user_error(NULL, &frame->uc.uc_link, err); memset(&stack, 0, sizeof(stack)); stack.ss_sp = (void __user *)current->sas_ss_sp; stack.ss_flags = sas_ss_flags(regs->ARM_sp); stack.ss_size = current->sas_ss_size; - err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack)); + err |= __copy_to_user(&frame->uc.uc_stack, &stack, sizeof(stack)); + + err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->aux, + regs, set->sig[0]); + err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); - err |= setup_sigframe(&frame->sig, regs, set); if (err == 0) - err = setup_return(regs, ka, frame->sig.retcode, frame, usig); + err = setup_return(regs, ka, frame->retcode, frame, usig); if (err == 0) { /* @@ -533,7 +538,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, * -- Peter Maydell 2000-12-06 */ regs->ARM_r1 = (unsigned long)&frame->info; - regs->ARM_r2 = (unsigned long)&frame->sig.uc; + regs->ARM_r2 = (unsigned long)&frame->uc; } return err; @@ -660,33 +665,17 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) if (syscall) { if (regs->ARM_r0 == -ERESTART_RESTARTBLOCK) { if (thumb_mode(regs)) { - regs->ARM_r7 = __NR_restart_syscall - __NR_SYSCALL_BASE; + regs->ARM_r7 = __NR_restart_syscall; regs->ARM_pc -= 2; } else { -#if defined(CONFIG_AEABI) && !defined(CONFIG_OABI_COMPAT) - regs->ARM_r7 = __NR_restart_syscall; - regs->ARM_pc -= 4; -#else u32 __user *usp; - u32 swival = __NR_restart_syscall; regs->ARM_sp -= 12; usp = (u32 __user *)regs->ARM_sp; - /* - * Either we supports OABI only, or we have - * EABI with the OABI compat layer enabled. - * In the later case we don't know if user - * space is EABI or not, and if not we must - * not clobber r7. Always using the OABI - * syscall solves that issue and works for - * all those cases. - */ - swival = swival - __NR_SYSCALL_BASE + __NR_OABI_SYSCALL_BASE; - put_user(regs->ARM_pc, &usp[0]); /* swi __NR_restart_syscall */ - put_user(0xef000000 | swival, &usp[1]); + put_user(0xef000000 | __NR_restart_syscall, &usp[1]); /* ldr pc, [sp], #12 */ put_user(0xe49df00c, &usp[2]); @@ -694,7 +683,6 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) (unsigned long)(usp + 3)); regs->ARM_pc = regs->ARM_sp + 4; -#endif } } if (regs->ARM_r0 == -ERESTARTNOHAND || diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 68e9634d2..1370d726d 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 09a67d771..d6bd435a6 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -16,6 +16,7 @@ * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include @@ -378,7 +379,7 @@ static int timer_dyn_tick_enable(void) int ret = -ENODEV; if (dyn_tick) { - spin_lock_irqsave(&dyn_tick->lock, flags); + write_seqlock_irqsave(&xtime_lock, flags); ret = 0; if (!(dyn_tick->state & DYN_TICK_ENABLED)) { ret = dyn_tick->enable(); @@ -386,7 +387,7 @@ static int timer_dyn_tick_enable(void) if (ret == 0) dyn_tick->state |= DYN_TICK_ENABLED; } - spin_unlock_irqrestore(&dyn_tick->lock, flags); + write_sequnlock_irqrestore(&xtime_lock, flags); } return ret; @@ -399,7 +400,7 @@ static int timer_dyn_tick_disable(void) int ret = -ENODEV; if (dyn_tick) { - spin_lock_irqsave(&dyn_tick->lock, flags); + write_seqlock_irqsave(&xtime_lock, flags); ret = 0; if (dyn_tick->state & DYN_TICK_ENABLED) { ret = dyn_tick->disable(); @@ -407,7 +408,7 @@ static int timer_dyn_tick_disable(void) if (ret == 0) dyn_tick->state &= ~DYN_TICK_ENABLED; } - spin_unlock_irqrestore(&dyn_tick->lock, flags); + write_sequnlock_irqrestore(&xtime_lock, flags); } return ret; @@ -421,20 +422,15 @@ static int timer_dyn_tick_disable(void) void timer_dyn_reprogram(void) { struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; - unsigned long next, seq, flags; + unsigned long next, seq; - if (!dyn_tick) - return; - - spin_lock_irqsave(&dyn_tick->lock, flags); - if (dyn_tick->state & DYN_TICK_ENABLED) { + if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) { next = next_timer_interrupt(); do { seq = read_seqbegin(&xtime_lock); - dyn_tick->reprogram(next - jiffies); + dyn_tick->reprogram(next_timer_interrupt() - jiffies); } while (read_seqretry(&xtime_lock, seq)); } - spin_unlock_irqrestore(&dyn_tick->lock, flags); } static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf) @@ -503,10 +499,5 @@ void __init time_init(void) if (system_timer->offset == NULL) system_timer->offset = dummy_gettimeoffset; system_timer->init(); - -#ifdef CONFIG_NO_IDLE_HZ - if (system_timer->dyn_tick) - system_timer->dyn_tick->lock = SPIN_LOCK_UNLOCKED; -#endif } diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index aeeed806f..35230a060 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -12,6 +12,7 @@ * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably * kill the offending process. */ +#include #include #include #include @@ -232,8 +233,11 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) bust_spinlocks(0); spin_unlock_irq(&die_lock); - if (panic_on_oops) + if (panic_on_oops) { + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); panic("Fatal exception"); + } do_exit(SIGSEGV); } diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 3ca574ee2..2b254e885 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -4,6 +4,7 @@ */ #include +#include #include #include @@ -79,10 +80,6 @@ SECTIONS *(.exit.text) *(.exit.data) *(.exitcall.exit) -#ifndef CONFIG_MMU - *(.fixup) - *(__ex_table) -#endif } .text : { /* Real text segment */ @@ -90,9 +87,7 @@ SECTIONS *(.text) SCHED_TEXT LOCK_TEXT -#ifdef CONFIG_MMU *(.fixup) -#endif *(.gnu.warning) *(.rodata) *(.rodata.*) @@ -147,9 +142,7 @@ SECTIONS */ . = ALIGN(32); __start___ex_table = .; -#ifdef CONFIG_MMU *(__ex_table) -#endif __stop___ex_table = .; /* diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 30351cd45..7b726b627 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -6,31 +6,28 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ csumpartialcopy.o csumpartialcopyuser.o clearbit.o \ - delay.o findbit.o memchr.o memcpy.o \ + copy_page.o delay.o findbit.o memchr.o memcpy.o \ memmove.o memset.o memzero.o setbit.o \ strncpy_from_user.o strnlen_user.o \ strchr.o strrchr.o \ testchangebit.o testclearbit.o testsetbit.o \ + getuser.o putuser.o clear_user.o \ ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ ucmpdi2.o lib1funcs.o div64.o sha1.o \ io-readsb.o io-writesb.o io-readsl.o io-writesl.o -mmu-y := clear_user.o copy_page.o getuser.o putuser.o - # the code in uaccess.S is not preemption safe and # probably faster on ARMv3 only ifeq ($(CONFIG_PREEMPT),y) - mmu-y += copy_from_user.o copy_to_user.o + lib-y += copy_from_user.o copy_to_user.o else ifneq ($(CONFIG_CPU_32v3),y) - mmu-y += copy_from_user.o copy_to_user.o + lib-y += copy_from_user.o copy_to_user.o else - mmu-y += uaccess.o + lib-y += uaccess.o endif endif -lib-$(CONFIG_MMU) += $(mmu-y) - ifeq ($(CONFIG_CPU_32v3),y) lib-y += io-readsw-armv3.o io-writesw-armv3.o else diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S index 74230083c..16153c86c 100644 --- a/arch/arm/lib/backtrace.S +++ b/arch/arm/lib/backtrace.S @@ -10,6 +10,7 @@ * 27/03/03 Ian Molton Clean up CONFIG_CPU * */ +#include #include #include .text @@ -40,7 +41,7 @@ ENTRY(c_backtrace) movne r0, #0 movs frame, r0 1: moveq r0, #-2 - ldmeqfd sp!, {r4 - r8, pc} + LOADREGS(eqfd, sp!, {r4 - r8, pc}) 2: stmfd sp!, {pc} @ calculate offset of PC in STMIA instruction ldr r0, [sp], #4 @@ -84,7 +85,7 @@ ENTRY(c_backtrace) * A zero next framepointer means we're done. */ teq next, #0 - ldmeqfd sp!, {r4 - r8, pc} + LOADREGS(eqfd, sp!, {r4 - r8, pc}) /* * The next framepointer must be above the @@ -96,13 +97,16 @@ ENTRY(c_backtrace) b 1007f /* - * Fixup for LDMDB. Note that this must not be in the fixup section. + * Fixup for LDMDB */ + .section .fixup,"ax" + .align 0 1007: ldr r0, =.Lbad mov r1, frame bl printk - ldmfd sp!, {r4 - r8, pc} + LOADREGS(fd, sp!, {r4 - r8, pc}) .ltorg + .previous .section __ex_table,"a" .align 3 @@ -141,7 +145,7 @@ ENTRY(c_backtrace) adrne r0, .Lcr blne printk mov r0, stack - ldmfd sp!, {instr, reg, stack, r7, r8, pc} + LOADREGS(fd, sp!, {instr, reg, stack, r7, r8, pc}) .Lfp: .asciz " r%d = %08X%c" .Lcr: .asciz "\n" diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index 542251021..b8c14e936 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h @@ -1,3 +1,4 @@ +#include #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_32v6K) .macro bitop, instr diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S index ecb28dcda..7ff9f831b 100644 --- a/arch/arm/lib/clear_user.S +++ b/arch/arm/lib/clear_user.S @@ -12,13 +12,13 @@ .text -/* Prototype: int __clear_user(void *addr, size_t sz) +/* Prototype: int __arch_clear_user(void *addr, size_t sz) * Purpose : clear some user memory * Params : addr - user memory address to clear * : sz - number of bytes to clear * Returns : number of bytes NOT cleared */ -ENTRY(__clear_user) +ENTRY(__arch_clear_user) stmfd sp!, {r1, lr} mov r2, #0 cmp r1, #4 @@ -43,10 +43,10 @@ USER( strnebt r2, [r0], #1) tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 USER( strnebt r2, [r0], #1) mov r0, #0 - ldmfd sp!, {r1, pc} + LOADREGS(fd,sp!, {r1, pc}) .section .fixup,"ax" .align 0 -9001: ldmfd sp!, {r0, pc} +9001: LOADREGS(fd,sp!, {r0, pc}) .previous diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S index 6b7363ce7..7497393a0 100644 --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -16,7 +16,7 @@ /* * Prototype: * - * size_t __copy_from_user(void *to, const void *from, size_t n) + * size_t __arch_copy_from_user(void *to, const void *from, size_t n) * * Purpose: * @@ -83,7 +83,7 @@ .text -ENTRY(__copy_from_user) +ENTRY(__arch_copy_from_user) #include "copy_template.S" diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S index 666c99cc0..681179684 100644 --- a/arch/arm/lib/copy_page.S +++ b/arch/arm/lib/copy_page.S @@ -43,4 +43,4 @@ ENTRY(copy_page) bgt 1b @ 1 PLD( ldmeqia r1!, {r3, r4, ip, lr} ) PLD( beq 2b ) - ldmfd sp!, {r4, pc} @ 3 + LOADREGS(fd, sp!, {r4, pc}) @ 3 diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S index 5224d9468..4a6d8ea14 100644 --- a/arch/arm/lib/copy_to_user.S +++ b/arch/arm/lib/copy_to_user.S @@ -16,7 +16,7 @@ /* * Prototype: * - * size_t __copy_to_user(void *to, const void *from, size_t n) + * size_t __arch_copy_to_user(void *to, const void *from, size_t n) * * Purpose: * @@ -86,7 +86,7 @@ .text -ENTRY(__copy_to_user) +ENTRY(__arch_copy_to_user) #include "copy_template.S" diff --git a/arch/arm/lib/csumipv6.S b/arch/arm/lib/csumipv6.S index 9621469be..7065a20ee 100644 --- a/arch/arm/lib/csumipv6.S +++ b/arch/arm/lib/csumipv6.S @@ -28,5 +28,5 @@ ENTRY(__csum_ipv6_magic) adcs r0, r0, r3 adcs r0, r0, r2 adcs r0, r0, #0 - ldmfd sp!, {pc} + LOADREGS(fd, sp!, {pc}) diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S index 930a70259..9183b06c0 100644 --- a/arch/arm/lib/delay.S +++ b/arch/arm/lib/delay.S @@ -31,7 +31,7 @@ ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 mov r2, r2, lsr #10 @ max = 0x00007fff mul r0, r2, r0 @ max = 2^32-1 movs r0, r0, lsr #6 - moveq pc, lr + RETINSTR(moveq,pc,lr) /* * loops = r0 * HZ * loops_per_jiffy / 1000000 @@ -43,20 +43,20 @@ ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 ENTRY(__delay) subs r0, r0, #1 #if 0 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 - movls pc, lr + RETINSTR(movls,pc,lr) subs r0, r0, #1 #endif bhi __delay - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/ecard.S b/arch/arm/lib/ecard.S index c55aaa2a2..fb7b602a6 100644 --- a/arch/arm/lib/ecard.S +++ b/arch/arm/lib/ecard.S @@ -29,7 +29,7 @@ ENTRY(ecard_loader_read) CPSR2SPSR(r0) mov lr, pc mov pc, r2 - ldmfd sp!, {r4 - r12, pc} + LOADREGS(fd, sp!, {r4 - r12, pc}) @ Purpose: call an expansion card loader to reset the card @ Proto : void read_loader(int card_base, char *loader); @@ -41,5 +41,5 @@ ENTRY(ecard_loader_reset) CPSR2SPSR(r0) mov lr, pc add pc, r1, #8 - ldmfd sp!, {r4 - r12, pc} + LOADREGS(fd, sp!, {r4 - r12, pc}) diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S index a5ca0248a..6f8e27a58 100644 --- a/arch/arm/lib/findbit.S +++ b/arch/arm/lib/findbit.S @@ -32,7 +32,7 @@ ENTRY(_find_first_zero_bit_le) 2: cmp r2, r1 @ any more? blo 1b 3: mov r0, r1 @ no free bits - mov pc, lr + RETINSTR(mov,pc,lr) /* * Purpose : Find next 'zero' bit @@ -66,7 +66,7 @@ ENTRY(_find_first_bit_le) 2: cmp r2, r1 @ any more? blo 1b 3: mov r0, r1 @ no free bits - mov pc, lr + RETINSTR(mov,pc,lr) /* * Purpose : Find next 'one' bit @@ -98,7 +98,7 @@ ENTRY(_find_first_zero_bit_be) 2: cmp r2, r1 @ any more? blo 1b 3: mov r0, r1 @ no free bits - mov pc, lr + RETINSTR(mov,pc,lr) ENTRY(_find_next_zero_bit_be) teq r1, #0 @@ -126,7 +126,7 @@ ENTRY(_find_first_bit_be) 2: cmp r2, r1 @ any more? blo 1b 3: mov r0, r1 @ no free bits - mov pc, lr + RETINSTR(mov,pc,lr) ENTRY(_find_next_bit_be) teq r1, #0 @@ -164,5 +164,5 @@ ENTRY(_find_next_bit_be) addeq r2, r2, #1 mov r0, r2 #endif - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/io-readsb.S b/arch/arm/lib/io-readsb.S index fb966ad02..d3d8de71a 100644 --- a/arch/arm/lib/io-readsb.S +++ b/arch/arm/lib/io-readsb.S @@ -72,7 +72,7 @@ ENTRY(__raw_readsb) bpl .Linsb_16_lp tst r2, #15 - ldmeqfd sp!, {r4 - r6, pc} + LOADREGS(eqfd, sp!, {r4 - r6, pc}) .Linsb_no_16: tst r2, #8 beq .Linsb_no_8 @@ -109,7 +109,7 @@ ENTRY(__raw_readsb) str r3, [r1], #4 .Linsb_no_4: ands r2, r2, #3 - ldmeqfd sp!, {r4 - r6, pc} + LOADREGS(eqfd, sp!, {r4 - r6, pc}) cmp r2, #2 ldrb r3, [r0] @@ -119,4 +119,4 @@ ENTRY(__raw_readsb) ldrgtb r3, [r0] strgtb r3, [r1] - ldmfd sp!, {r4 - r6, pc} + LOADREGS(fd, sp!, {r4 - r6, pc}) diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S index 4ef904185..146d47c15 100644 --- a/arch/arm/lib/io-readsw-armv3.S +++ b/arch/arm/lib/io-readsw-armv3.S @@ -28,7 +28,7 @@ strb r3, [r1], #1 subs r2, r2, #1 - moveq pc, lr + RETINSTR(moveq, pc, lr) ENTRY(__raw_readsw) teq r2, #0 @ do we have to check for the zero len? @@ -69,7 +69,7 @@ ENTRY(__raw_readsw) bpl .Linsw_8_lp tst r2, #7 - ldmeqfd sp!, {r4, r5, r6, pc} + LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) .Lno_insw_8: tst r2, #4 beq .Lno_insw_4 @@ -102,6 +102,6 @@ ENTRY(__raw_readsw) movne r3, r3, lsr #8 strneb r3, [r1] - ldmfd sp!, {r4, r5, r6, pc} + LOADREGS(fd, sp!, {r4, r5, r6, pc}) diff --git a/arch/arm/lib/io-writesb.S b/arch/arm/lib/io-writesb.S index 7eba2b6cc..08209fc64 100644 --- a/arch/arm/lib/io-writesb.S +++ b/arch/arm/lib/io-writesb.S @@ -64,7 +64,7 @@ ENTRY(__raw_writesb) bpl .Loutsb_16_lp tst r2, #15 - ldmeqfd sp!, {r4, r5, pc} + LOADREGS(eqfd, sp!, {r4, r5, pc}) .Loutsb_no_16: tst r2, #8 beq .Loutsb_no_8 @@ -80,7 +80,7 @@ ENTRY(__raw_writesb) outword r3 .Loutsb_no_4: ands r2, r2, #3 - ldmeqfd sp!, {r4, r5, pc} + LOADREGS(eqfd, sp!, {r4, r5, pc}) cmp r2, #2 ldrb r3, [r1], #1 @@ -90,4 +90,4 @@ ENTRY(__raw_writesb) ldrgtb r3, [r1] strgtb r3, [r0] - ldmfd sp!, {r4, r5, pc} + LOADREGS(fd, sp!, {r4, r5, pc}) diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S index 1607a29f4..52d62b481 100644 --- a/arch/arm/lib/io-writesw-armv3.S +++ b/arch/arm/lib/io-writesw-armv3.S @@ -29,7 +29,7 @@ orr r3, r3, r3, lsl #16 str r3, [r0] subs r2, r2, #1 - moveq pc, lr + RETINSTR(moveq, pc, lr) ENTRY(__raw_writesw) teq r2, #0 @ do we have to check for the zero len? @@ -80,7 +80,7 @@ ENTRY(__raw_writesw) bpl .Loutsw_8_lp tst r2, #7 - ldmeqfd sp!, {r4, r5, r6, pc} + LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) .Lno_outsw_8: tst r2, #4 beq .Lno_outsw_4 @@ -124,4 +124,4 @@ ENTRY(__raw_writesw) orrne ip, ip, ip, lsr #16 strne ip, [r0] - ldmfd sp!, {r4, r5, r6, pc} + LOADREGS(fd, sp!, {r4, r5, r6, pc}) diff --git a/arch/arm/lib/memchr.S b/arch/arm/lib/memchr.S index e7ab1ea8e..ac34fe55d 100644 --- a/arch/arm/lib/memchr.S +++ b/arch/arm/lib/memchr.S @@ -22,4 +22,4 @@ ENTRY(memchr) bne 1b sub r0, r0, #1 2: movne r0, #0 - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 95b110b07..a1795f599 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S @@ -53,7 +53,7 @@ ENTRY(memset) stmgeia r0!, {r1, r3, ip, lr} stmgeia r0!, {r1, r3, ip, lr} bgt 2b - ldmeqfd sp!, {pc} @ Now <64 bytes to go. + LOADREGS(eqfd, sp!, {pc}) @ Now <64 bytes to go. /* * No need to correct the count; we're only testing bits from now on */ @@ -77,4 +77,4 @@ ENTRY(memset) strneb r1, [r0], #1 tst r2, #1 strneb r1, [r0], #1 - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/memzero.S b/arch/arm/lib/memzero.S index abf2508e8..51ccc6016 100644 --- a/arch/arm/lib/memzero.S +++ b/arch/arm/lib/memzero.S @@ -53,7 +53,7 @@ ENTRY(__memzero) stmgeia r0!, {r2, r3, ip, lr} @ 4 stmgeia r0!, {r2, r3, ip, lr} @ 4 bgt 3b @ 1 - ldmeqfd sp!, {pc} @ 1/2 quick exit + LOADREGS(eqfd, sp!, {pc}) @ 1/2 quick exit /* * No need to correct the count; we're only testing bits from now on */ @@ -77,4 +77,4 @@ ENTRY(__memzero) strneb r2, [r0], #1 @ 1 tst r1, #1 @ 1 a byte left over strneb r2, [r0], #1 @ 1 - mov pc, lr @ 1 + RETINSTR(mov,pc,lr) @ 1 diff --git a/arch/arm/lib/strchr.S b/arch/arm/lib/strchr.S index 9f18d6fde..5b9b49373 100644 --- a/arch/arm/lib/strchr.S +++ b/arch/arm/lib/strchr.S @@ -23,4 +23,4 @@ ENTRY(strchr) teq r2, r1 movne r0, #0 subeq r0, r0, #1 - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/strncpy_from_user.S b/arch/arm/lib/strncpy_from_user.S index 36e3741a3..629cc8775 100644 --- a/arch/arm/lib/strncpy_from_user.S +++ b/arch/arm/lib/strncpy_from_user.S @@ -20,7 +20,8 @@ * returns the number of characters copied (strlen of copied string), * -EFAULT on exception, or "len" if we fill the whole buffer */ -ENTRY(__strncpy_from_user) +ENTRY(__arch_strncpy_from_user) + save_lr mov ip, r1 1: subs r2, r2, #1 USER( ldrplbt r3, [r1], #1) @@ -30,13 +31,13 @@ USER( ldrplbt r3, [r1], #1) bne 1b sub r1, r1, #1 @ take NUL character out of count 2: sub r0, r1, ip - mov pc, lr + restore_pc .section .fixup,"ax" .align 0 9001: mov r3, #0 strb r3, [r0, #0] @ null terminate mov r0, #-EFAULT - mov pc, lr + restore_pc .previous diff --git a/arch/arm/lib/strnlen_user.S b/arch/arm/lib/strnlen_user.S index 18d8fa4f9..67bcd8268 100644 --- a/arch/arm/lib/strnlen_user.S +++ b/arch/arm/lib/strnlen_user.S @@ -14,13 +14,14 @@ .text .align 5 -/* Prototype: unsigned long __strnlen_user(const char *str, long n) +/* Prototype: unsigned long __arch_strnlen_user(const char *str, long n) * Purpose : get length of a string in user memory * Params : str - address of string in user memory * Returns : length of string *including terminator* * or zero on exception, or n + 1 if too long */ -ENTRY(__strnlen_user) +ENTRY(__arch_strnlen_user) + save_lr mov r2, r0 1: USER( ldrbt r3, [r0], #1) @@ -30,10 +31,10 @@ USER( ldrbt r3, [r0], #1) bne 1b add r0, r0, #1 2: sub r0, r0, r2 - mov pc, lr + restore_pc .section .fixup,"ax" .align 0 9001: mov r0, #0 - mov pc, lr + restore_pc .previous diff --git a/arch/arm/lib/strrchr.S b/arch/arm/lib/strrchr.S index 538df220a..fa923f026 100644 --- a/arch/arm/lib/strrchr.S +++ b/arch/arm/lib/strrchr.S @@ -22,4 +22,4 @@ ENTRY(strrchr) teq r2, #0 bne 1b mov r0, r3 - mov pc, lr + RETINSTR(mov,pc,lr) diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S index b48bd6d5f..0cc450f86 100644 --- a/arch/arm/lib/uaccess.S +++ b/arch/arm/lib/uaccess.S @@ -19,7 +19,7 @@ #define PAGE_SHIFT 12 -/* Prototype: int __copy_to_user(void *to, const char *from, size_t n) +/* Prototype: int __arch_copy_to_user(void *to, const char *from, size_t n) * Purpose : copy a block to user memory from kernel memory * Params : to - user memory * : from - kernel memory @@ -39,7 +39,7 @@ USER( strgtbt r3, [r0], #1) @ May fault sub r2, r2, ip b .Lc2u_dest_aligned -ENTRY(__copy_to_user) +ENTRY(__arch_copy_to_user) stmfd sp!, {r2, r4 - r7, lr} cmp r2, #4 blt .Lc2u_not_enough @@ -105,7 +105,7 @@ USER( strgtbt r3, [r0], #1) @ May fault movs ip, r2 bne .Lc2u_nowords .Lc2u_finished: mov r0, #0 - ldmfd sp!, {r2, r4 - r7, pc} + LOADREGS(fd,sp!,{r2, r4 - r7, pc}) .Lc2u_src_not_aligned: bic r1, r1, #3 @@ -280,10 +280,10 @@ USER( strgtbt r3, [r0], #1) @ May fault .section .fixup,"ax" .align 0 -9001: ldmfd sp!, {r0, r4 - r7, pc} +9001: LOADREGS(fd,sp!, {r0, r4 - r7, pc}) .previous -/* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); +/* Prototype: unsigned long __arch_copy_from_user(void *to,const void *from,unsigned long n); * Purpose : copy a block from user memory to kernel memory * Params : to - kernel memory * : from - user memory @@ -302,7 +302,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault sub r2, r2, ip b .Lcfu_dest_aligned -ENTRY(__copy_from_user) +ENTRY(__arch_copy_from_user) stmfd sp!, {r0, r2, r4 - r7, lr} cmp r2, #4 blt .Lcfu_not_enough @@ -369,7 +369,7 @@ USER( ldrgtbt r3, [r1], #1) @ May fault bne .Lcfu_nowords .Lcfu_finished: mov r0, #0 add sp, sp, #8 - ldmfd sp!, {r4 - r7, pc} + LOADREGS(fd,sp!,{r4 - r7, pc}) .Lcfu_src_not_aligned: bic r1, r1, #3 @@ -556,6 +556,6 @@ USER( ldrgtbt r3, [r1], #1) @ May fault movne r1, r4 blne __memzero mov r0, r4 - ldmfd sp!, {r4 - r7, pc} + LOADREGS(fd,sp!, {r4 - r7, pc}) .previous diff --git a/arch/arm/lib/ucmpdi2.S b/arch/arm/lib/ucmpdi2.S index f76de07ac..d847a6283 100644 --- a/arch/arm/lib/ucmpdi2.S +++ b/arch/arm/lib/ucmpdi2.S @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #ifdef __ARMEB__ diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index baa997c85..65be5efd6 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -142,7 +143,7 @@ aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction aaec2000_timer_irq = { .name = "AAEC-2000 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = aaec2000_timer_interrupt, }; diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig index 2f85e8693..4b7218fc3 100644 --- a/arch/arm/mach-at91rm9200/Kconfig +++ b/arch/arm/mach-at91rm9200/Kconfig @@ -1,109 +1,47 @@ -if ARCH_AT91 - -menu "Atmel AT91 System-on-Chip" - -comment "Atmel AT91 Processors" - -config ARCH_AT91RM9200 - bool "AT91RM9200" - -config ARCH_AT91SAM9260 - bool "AT91SAM9260" - -config ARCH_AT91SAM9261 - bool "AT91SAM9261" - -# ---------------------------------------------------------- - if ARCH_AT91RM9200 -comment "AT91RM9200 Board Type" +menu "AT91RM9200 Implementations" -config MACH_ONEARM - bool "Ajeco 1ARM Single Board Computer" - depends on ARCH_AT91RM9200 - help - Select this if you are using Ajeco's 1ARM Single Board Computer. - +comment "AT91RM9200 Board Type" config ARCH_AT91RM9200DK bool "Atmel AT91RM9200-DK Development board" depends on ARCH_AT91RM9200 help - Select this if you are using Atmel's AT91RM9200-DK Development board. - (Discontinued) - + Select this if you are using Atmel's AT91RM9200-DK Development board config MACH_AT91RM9200EK bool "Atmel AT91RM9200-EK Evaluation Kit" depends on ARCH_AT91RM9200 help - Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit. - + Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit config MACH_CSB337 - bool "Cogent CSB337" + bool "Cogent CSB337 board" depends on ARCH_AT91RM9200 help - Select this if you are using Cogent's CSB337 board. - + Select this if you are using Cogent's CSB337 board config MACH_CSB637 - bool "Cogent CSB637" + bool "Cogent CSB637 board" depends on ARCH_AT91RM9200 help - Select this if you are using Cogent's CSB637 board. - + Select this if you are using Cogent's CSB637 board config MACH_CARMEVA - bool "Conitec ARM&EVA" + bool "Conitec's ARM&EVA" depends on ARCH_AT91RM9200 help - Select this if you are using Conitec's AT91RM9200-MCU-Module. - - -config MACH_ATEB9200 - bool "Embest ATEB9200" - depends on ARCH_AT91RM9200 - help - Select this if you are using Embest's ATEB9200 board. - + Select this if you are using Conitec's AT91RM9200-MCU-Module config MACH_KB9200 - bool "KwikByte KB920x" + bool "KwikByte's KB920x" depends on ARCH_AT91RM9200 help - Select this if you are using KwikByte's KB920x board. - - -config MACH_KAFA - bool "Sperry-Sun KAFA board" - depends on ARCH_AT91RM9200 - help - Select this if you are using Sperry-Sun's KAFA board. - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9260 - -comment "AT91SAM9260 Board Type" - -endif - -# ---------------------------------------------------------- - -if ARCH_AT91SAM9261 - -comment "AT91SAM9261 Board Type" - -endif - + Select this if you are using KwikByte's KB920x board -# ---------------------------------------------------------- -comment "AT91 Feature Selections" +comment "AT91RM9200 Feature Selections" config AT91_PROGRAMMABLE_CLOCKS bool "Programmable Clocks" diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile index c174805c2..ef88c4128 100644 --- a/arch/arm/mach-at91rm9200/Makefile +++ b/arch/arm/mach-at91rm9200/Makefile @@ -2,46 +2,27 @@ # Makefile for the linux kernel. # -obj-y := clock.o irq.o gpio.o devices.o +obj-y := clock.o irq.o time.o gpio.o common.o devices.o obj-m := obj-n := obj- := -obj-$(CONFIG_PM) += pm.o - -# CPU-specific support -obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o -obj-$(CONFIG_ARCH_AT91SAM9260) += -obj-$(CONFIG_ARCH_AT91SAM9261) += - -# AT91RM9200 Board-specific support -obj-$(CONFIG_MACH_ONEARM) += board-1arm.o +# Board-specific support obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o obj-$(CONFIG_MACH_CSB337) += board-csb337.o obj-$(CONFIG_MACH_CSB637) += board-csb637.o -obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o -obj-$(CONFIG_MACH_KB9200) += board-kb9202.o -obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o -obj-$(CONFIG_MACH_KAFA) += board-kafa.o - -# AT91SAM9260 board-specific support - -# AT91SAM9261 board-specific support +#obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o +#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o # LEDs support led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o led-$(CONFIG_MACH_AT91RM9200EK) += leds.o led-$(CONFIG_MACH_CSB337) += leds.o led-$(CONFIG_MACH_CSB637) += leds.o -led-$(CONFIG_MACH_KB9200) += leds.o -led-$(CONFIG_MACH_KAFA) += leds.o +#led-$(CONFIG_MACH_KB9200) += leds.o +#led-$(CONFIG_MACH_KAFA) += leds.o obj-$(CONFIG_LEDS) += $(led-y) # VGA support #obj-$(CONFIG_FB_S1D13XXX) += ics1523.o - - -ifeq ($(CONFIG_PM_DEBUG),y) -CFLAGS_pm.o += -DDEBUG -endif diff --git a/arch/arm/mach-at91rm9200/board-1arm.c b/arch/arm/mach-at91rm9200/board-1arm.c deleted file mode 100644 index 051a295e8..000000000 --- a/arch/arm/mach-at91rm9200/board-1arm.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * linux/arch/arm/mach-at91rm9200/board-1arm.c - * - * Copyright (C) 2005 SAN People - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" - -static void __init onearm_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} - -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata onearm_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 3, - .tty_map = { 4, 0, 1, -1, -1 }, /* ttyS0, ..., ttyS4 */ -}; - -static void __init onearm_map_io(void) -{ - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); - - /* Setup the serial ports and console */ - at91_init_serial(&onearm_uart_config); -} - -static struct at91_eth_data __initdata onearm_eth_data = { - .phy_irq_pin = AT91_PIN_PC4, - .is_rmii = 1, -}; - -static struct at91_usbh_data __initdata onearm_usbh_data = { - .ports = 1, -}; - -static struct at91_udc_data __initdata onearm_udc_data = { - .vbus_pin = AT91_PIN_PC2, - .pullup_pin = AT91_PIN_PC3, -}; - -static void __init onearm_board_init(void) -{ - /* Serial */ - at91_add_device_serial(); - /* Ethernet */ - at91_add_device_eth(&onearm_eth_data); - /* USB Host */ - at91_add_device_usbh(&onearm_usbh_data); - /* USB Device */ - at91_add_device_udc(&onearm_udc_data); -} - -MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") - /* Maintainer: Lennert Buytenhek */ - .phys_io = AT91_BASE_SYS, - .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, - .boot_params = AT91_SDRAM_BASE + 0x100, - .timer = &at91rm9200_timer, - .map_io = onearm_map_io, - .init_irq = onearm_init_irq, - .init_machine = onearm_board_init, -MACHINE_END diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91rm9200/board-carmeva.c deleted file mode 100644 index 1efcd04fd..000000000 --- a/arch/arm/mach-at91rm9200/board-carmeva.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - * linux/arch/arm/mach-at91rm9200/board-carmeva.c - * - * Copyright (c) 2005 Peer Georgi - * Conitec Datasystems - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" - -static void __init carmeva_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} - -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata carmeva_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; - -static void __init carmeva_map_io(void) -{ - at91rm9200_map_io(); - - /* Initialize clocks: 20.000 MHz crystal */ - at91_clock_init(20000000); - - /* Setup the serial ports and console */ - at91_init_serial(&carmeva_uart_config); -} - -static struct at91_eth_data __initdata carmeva_eth_data = { - .phy_irq_pin = AT91_PIN_PC4, - .is_rmii = 1, -}; - -static struct at91_usbh_data __initdata carmeva_usbh_data = { - .ports = 2, -}; - -static struct at91_udc_data __initdata carmeva_udc_data = { - .vbus_pin = AT91_PIN_PD12, - .pullup_pin = AT91_PIN_PD9, -}; - -/* FIXME: user dependend */ -// static struct at91_cf_data __initdata carmeva_cf_data = { -// .det_pin = AT91_PIN_PB0, -// .rst_pin = AT91_PIN_PC5, - // .irq_pin = ... not connected - // .vcc_pin = ... always powered -// }; - -static struct at91_mmc_data __initdata carmeva_mmc_data = { - .is_b = 0, - .wire4 = 1, -}; - -static void __init carmeva_board_init(void) -{ - /* Serial */ - at91_add_device_serial(); - /* Ethernet */ - at91_add_device_eth(&carmeva_eth_data); - /* USB Host */ - at91_add_device_usbh(&carmeva_usbh_data); - /* USB Device */ - at91_add_device_udc(&carmeva_udc_data); - /* I2C */ - at91_add_device_i2c(); - /* Compact Flash */ -// at91_add_device_cf(&carmeva_cf_data); - /* SPI */ -// at91_add_device_spi(NULL, 0); - /* MMC */ - at91_add_device_mmc(&carmeva_mmc_data); -} - -MACHINE_START(CARMEVA, "Carmeva") - /* Maintainer: Conitec Datasystems */ - .phys_io = AT91_BASE_SYS, - .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, - .boot_params = AT91_SDRAM_BASE + 0x100, - .timer = &at91rm9200_timer, - .map_io = carmeva_map_io, - .init_irq = carmeva_init_irq, - .init_machine = carmeva_board_init, -MACHINE_END diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c index 794d3fbb4..f45104cee 100644 --- a/arch/arm/mach-at91rm9200/board-csb337.c +++ b/arch/arm/mach-at91rm9200/board-csb337.c @@ -18,12 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include #include #include -#include #include #include @@ -34,9 +34,9 @@ #include #include -#include +#include +#include #include -#include #include "generic.h" @@ -54,24 +54,32 @@ static void __init csb337_init_irq(void) * 0 .. 3 = USART0 .. USART3 * 4 = DBGU */ -static struct at91_uart_config __initdata csb337_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; +#define CSB337_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ +#define CSB337_SERIAL_CONSOLE 0 /* ttyS0 */ static void __init csb337_map_io(void) { + int serial[AT91_NR_UART] = CSB337_UART_MAP; + int i; + at91rm9200_map_io(); /* Initialize clocks: 3.6864 MHz crystal */ at91_clock_init(3686400); /* Setup the LEDs */ - at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); - - /* Setup the serial ports and console */ - at91_init_serial(&csb337_uart_config); + at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); + +#ifdef CONFIG_SERIAL_AT91 + at91_console_port = CSB337_SERIAL_CONSOLE; + memcpy(at91_serial_map, serial, sizeof(serial)); + + /* Register UARTs */ + for (i = 0; i < AT91_NR_UART; i++) { + if (serial[i] >= 0) + at91_register_uart(i, serial[i]); + } +#endif } static struct at91_eth_data __initdata csb337_eth_data = { @@ -110,31 +118,17 @@ static struct at91_mmc_data __initdata csb337_mmc_data = { .wp_pin = AT91_PIN_PD6, }; -static struct spi_board_info csb337_spi_devices[] = { - { /* CAN controller */ - .modalias = "sak82c900", - .chip_select = 0, - .max_speed_hz = 6 * 1000 * 1000, - }, -}; - static void __init csb337_board_init(void) { - /* Serial */ - at91_add_device_serial(); /* Ethernet */ at91_add_device_eth(&csb337_eth_data); /* USB Host */ at91_add_device_usbh(&csb337_usbh_data); /* USB Device */ at91_add_device_udc(&csb337_udc_data); - /* I2C */ - at91_add_device_i2c(); /* Compact Flash */ at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ at91_add_device_cf(&csb337_cf_data); - /* SPI */ - at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices)); /* MMC */ at91_add_device_mmc(&csb337_mmc_data); } diff --git a/arch/arm/mach-at91rm9200/board-csb637.c b/arch/arm/mach-at91rm9200/board-csb637.c index c8b6f3342..f2c2d6e79 100644 --- a/arch/arm/mach-at91rm9200/board-csb637.c +++ b/arch/arm/mach-at91rm9200/board-csb637.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -33,9 +34,9 @@ #include #include -#include +#include +#include #include -#include #include "generic.h" @@ -53,14 +54,14 @@ static void __init csb637_init_irq(void) * 0 .. 3 = USART0 .. USART3 * 4 = DBGU */ -static struct at91_uart_config __initdata csb637_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; +#define CSB637_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ +#define CSB637_SERIAL_CONSOLE 0 /* ttyS0 */ static void __init csb637_map_io(void) { + int serial[AT91_NR_UART] = CSB637_UART_MAP; + int i; + at91rm9200_map_io(); /* Initialize clocks: 3.6864 MHz crystal */ @@ -69,8 +70,16 @@ static void __init csb637_map_io(void) /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); - /* Setup the serial ports and console */ - at91_init_serial(&csb637_uart_config); +#ifdef CONFIG_SERIAL_AT91 + at91_console_port = CSB637_SERIAL_CONSOLE; + memcpy(at91_serial_map, serial, sizeof(serial)); + + /* Register UARTs */ + for (i = 0; i < AT91_NR_UART; i++) { + if (serial[i] >= 0) + at91_register_uart(i, serial[i]); + } +#endif } static struct at91_eth_data __initdata csb637_eth_data = { @@ -89,18 +98,12 @@ static struct at91_udc_data __initdata csb637_udc_data = { static void __init csb637_board_init(void) { - /* Serial */ - at91_add_device_serial(); /* Ethernet */ at91_add_device_eth(&csb637_eth_data); /* USB Host */ at91_add_device_usbh(&csb637_usbh_data); /* USB Device */ at91_add_device_udc(&csb637_udc_data); - /* I2C */ - at91_add_device_i2c(); - /* SPI */ - at91_add_device_spi(NULL, 0); } MACHINE_START(CSB637, "Cogent CSB637") diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c index 65873037e..2d7200ed6 100644 --- a/arch/arm/mach-at91rm9200/board-dk.c +++ b/arch/arm/mach-at91rm9200/board-dk.c @@ -21,12 +21,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include #include #include -#include #include #include @@ -37,9 +37,9 @@ #include #include -#include +#include +#include #include -#include #include "generic.h" @@ -57,14 +57,14 @@ static void __init dk_init_irq(void) * 0 .. 3 = USART0 .. USART3 * 4 = DBGU */ -static struct at91_uart_config __initdata dk_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; +#define DK_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ +#define DK_SERIAL_CONSOLE 0 /* ttyS0 */ static void __init dk_map_io(void) { + int serial[AT91_NR_UART] = DK_UART_MAP; + int i; + at91rm9200_map_io(); /* Initialize clocks: 18.432 MHz crystal */ @@ -73,8 +73,16 @@ static void __init dk_map_io(void) /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); - /* Setup the serial ports and console */ - at91_init_serial(&dk_uart_config); +#ifdef CONFIG_SERIAL_AT91 + at91_console_port = DK_SERIAL_CONSOLE; + memcpy(at91_serial_map, serial, sizeof(serial)); + + /* Register UARTs */ + for (i = 0; i < AT91_NR_UART; i++) { + if (at91_serial_map[i] >= 0) + at91_register_uart(i, at91_serial_map[i]); + } +#endif } static struct at91_eth_data __initdata dk_eth_data = { @@ -103,48 +111,16 @@ static struct at91_mmc_data __initdata dk_mmc_data = { .wire4 = 1, }; -static struct spi_board_info dk_spi_devices[] = { - { /* DataFlash chip */ - .modalias = "mtd_dataflash", - .chip_select = 0, - .max_speed_hz = 15 * 1000 * 1000, - }, - { /* UR6HCPS2-SP40 PS2-to-SPI adapter */ - .modalias = "ur6hcps2", - .chip_select = 1, - .max_speed_hz = 250 * 1000, - }, - { /* TLV1504 ADC, 4 channels, 10 bits; one is a temp sensor */ - .modalias = "tlv1504", - .chip_select = 2, - .max_speed_hz = 20 * 1000 * 1000, - }, -#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD - { /* DataFlash card */ - .modalias = "mtd_dataflash", - .chip_select = 3, - .max_speed_hz = 15 * 1000 * 1000, - } -#endif -}; - static void __init dk_board_init(void) { - /* Serial */ - at91_add_device_serial(); /* Ethernet */ at91_add_device_eth(&dk_eth_data); /* USB Host */ at91_add_device_usbh(&dk_usbh_data); /* USB Device */ at91_add_device_udc(&dk_udc_data); - at91_set_multi_drive(dk_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */ /* Compact Flash */ at91_add_device_cf(&dk_cf_data); - /* I2C */ - at91_add_device_i2c(); - /* SPI */ - at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices)); #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD /* DataFlash card */ at91_set_gpio_output(AT91_PIN_PB7, 0); diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91rm9200/board-eb9200.c deleted file mode 100644 index 4531f34c6..000000000 --- a/arch/arm/mach-at91rm9200/board-eb9200.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * linux/arch/arm/mach-at91rm9200/board-eb9200.c - * - * Copyright (C) 2005 SAN People, adapted for ATEB9200 from Embest - * by Andrew Patrikalakis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" - -static void __init eb9200_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(BGA_GPIO_BANKS); -} - -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata eb9200_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; - -static void __init eb9200_map_io(void) -{ - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); - - /* Setup the serial ports and console */ - at91_init_serial(&eb9200_uart_config); -} - -static struct at91_eth_data __initdata eb9200_eth_data = { - .phy_irq_pin = AT91_PIN_PC4, - .is_rmii = 1, -}; - -static struct at91_usbh_data __initdata eb9200_usbh_data = { - .ports = 2, -}; - -static struct at91_udc_data __initdata eb9200_udc_data = { - .vbus_pin = AT91_PIN_PD4, - .pullup_pin = AT91_PIN_PD5, -}; - -static struct at91_cf_data __initdata eb9200_cf_data = { - .det_pin = AT91_PIN_PB0, - .rst_pin = AT91_PIN_PC5, - // .irq_pin = ... not connected - // .vcc_pin = ... always powered -}; - -static struct at91_mmc_data __initdata eb9200_mmc_data = { - .is_b = 0, - .wire4 = 1, -}; - -static void __init eb9200_board_init(void) -{ - /* Serial */ - at91_add_device_serial(); - /* Ethernet */ - at91_add_device_eth(&eb9200_eth_data); - /* USB Host */ - at91_add_device_usbh(&eb9200_usbh_data); - /* USB Device */ - at91_add_device_udc(&eb9200_udc_data); - /* I2C */ - at91_add_device_i2c(); - /* Compact Flash */ - at91_add_device_cf(&eb9200_cf_data); - /* SPI */ - at91_add_device_spi(NULL, 0); - /* MMC */ - /* only supports 1 or 4 bit interface, not wired through to SPI */ - at91_add_device_mmc(&eb9200_mmc_data); -} - -MACHINE_START(ATEB9200, "Embest ATEB9200") - .phys_io = AT91_BASE_SYS, - .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, - .boot_params = AT91_SDRAM_BASE + 0x100, - .timer = &at91rm9200_timer, - .map_io = eb9200_map_io, - .init_irq = eb9200_init_irq, - .init_machine = eb9200_board_init, -MACHINE_END diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91rm9200/board-ek.c index 868192351..80d90f513 100644 --- a/arch/arm/mach-at91rm9200/board-ek.c +++ b/arch/arm/mach-at91rm9200/board-ek.c @@ -21,12 +21,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include #include #include -#include #include #include @@ -37,9 +37,9 @@ #include #include -#include +#include +#include #include -#include #include "generic.h" @@ -57,14 +57,14 @@ static void __init ek_init_irq(void) * 0 .. 3 = USART0 .. USART3 * 4 = DBGU */ -static struct at91_uart_config __initdata ek_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; +#define EK_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ +#define EK_SERIAL_CONSOLE 0 /* ttyS0 */ static void __init ek_map_io(void) { + int serial[AT91_NR_UART] = EK_UART_MAP; + int i; + at91rm9200_map_io(); /* Initialize clocks: 18.432 MHz crystal */ @@ -73,8 +73,16 @@ static void __init ek_map_io(void) /* Setup the LEDs */ at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); - /* Setup the serial ports and console */ - at91_init_serial(&ek_uart_config); +#ifdef CONFIG_SERIAL_AT91 + at91_console_port = EK_SERIAL_CONSOLE; + memcpy(at91_serial_map, serial, sizeof(serial)); + + /* Register UARTs */ + for (i = 0; i < AT91_NR_UART; i++) { + if (serial[i] >= 0) + at91_register_uart(i, serial[i]); + } +#endif } static struct at91_eth_data __initdata ek_eth_data = { @@ -98,36 +106,14 @@ static struct at91_mmc_data __initdata ek_mmc_data = { .wp_pin = AT91_PIN_PA17, }; -static struct spi_board_info ek_spi_devices[] = { - { /* DataFlash chip */ - .modalias = "mtd_dataflash", - .chip_select = 0, - .max_speed_hz = 15 * 1000 * 1000, - }, -#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD - { /* DataFlash card */ - .modalias = "mtd_dataflash", - .chip_select = 3, - .max_speed_hz = 15 * 1000 * 1000, - }, -#endif -}; - static void __init ek_board_init(void) { - /* Serial */ - at91_add_device_serial(); /* Ethernet */ at91_add_device_eth(&ek_eth_data); /* USB Host */ at91_add_device_usbh(&ek_usbh_data); /* USB Device */ at91_add_device_udc(&ek_udc_data); - at91_set_multi_drive(ek_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */ - /* I2C */ - at91_add_device_i2c(); - /* SPI */ - at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD /* DataFlash card */ at91_set_gpio_output(AT91_PIN_PB22, 0); diff --git a/arch/arm/mach-at91rm9200/board-kafa.c b/arch/arm/mach-at91rm9200/board-kafa.c deleted file mode 100644 index 354b91c6b..000000000 --- a/arch/arm/mach-at91rm9200/board-kafa.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * linux/arch/arm/mach-at91rm9200/board-kafa.c - * - * Copyright (C) 2006 Sperry-Sun - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" - -static void __init kafa_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} - -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata kafa_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; - -static void __init kafa_map_io(void) -{ - at91rm9200_map_io(); - - /* Initialize clocks: 18.432 MHz crystal */ - at91_clock_init(18432000); - - /* Set up the LEDs */ - at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); - - /* Setup the serial ports and console */ - at91_init_serial(&kafa_uart_config); -} - -static struct at91_eth_data __initdata kafa_eth_data = { - .phy_irq_pin = AT91_PIN_PC4, - .is_rmii = 0, -}; - -static struct at91_usbh_data __initdata kafa_usbh_data = { - .ports = 1, -}; - -static struct at91_udc_data __initdata kafa_udc_data = { - .vbus_pin = AT91_PIN_PB6, - .pullup_pin = AT91_PIN_PB7, -}; - -static void __init kafa_board_init(void) -{ - /* Serial */ - at91_add_device_serial(); - /* Ethernet */ - at91_add_device_eth(&kafa_eth_data); - /* USB Host */ - at91_add_device_usbh(&kafa_usbh_data); - /* USB Device */ - at91_add_device_udc(&kafa_udc_data); - /* I2C */ - at91_add_device_i2c(); - /* SPI */ - at91_add_device_spi(NULL, 0); -} - -MACHINE_START(KAFA, "Sperry-Sun KAFA") - /* Maintainer: Sergei Sharonov */ - .phys_io = AT91_BASE_SYS, - .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, - .boot_params = AT91_SDRAM_BASE + 0x100, - .timer = &at91rm9200_timer, - .map_io = kafa_map_io, - .init_irq = kafa_init_irq, - .init_machine = kafa_board_init, -MACHINE_END diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c deleted file mode 100644 index 1827db4c5..000000000 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * linux/arch/arm/mach-at91rm9200/board-kb9202.c - * - * Copyright (c) 2005 kb_admin - * KwikByte, 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 - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" - -static void __init kb9202_init_irq(void) -{ - /* Initialize AIC controller */ - at91rm9200_init_irq(NULL); - - /* Set up the GPIO interrupts */ - at91_gpio_irq_setup(PQFP_GPIO_BANKS); -} - -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata kb9202_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 3, - .tty_map = { 4, 0, 1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; - -static void __init kb9202_map_io(void) -{ - at91rm9200_map_io(); - - /* Initialize clocks: 10 MHz crystal */ - at91_clock_init(10000000); - - /* Set up the LEDs */ - at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); - - /* Setup the serial ports and console */ - at91_init_serial(&kb9202_uart_config); -} - -static struct at91_eth_data __initdata kb9202_eth_data = { - .phy_irq_pin = AT91_PIN_PB29, - .is_rmii = 0, -}; - -static struct at91_usbh_data __initdata kb9202_usbh_data = { - .ports = 1, -}; - -static struct at91_udc_data __initdata kb9202_udc_data = { - .vbus_pin = AT91_PIN_PB24, - .pullup_pin = AT91_PIN_PB22, -}; - -static struct at91_mmc_data __initdata kb9202_mmc_data = { - .det_pin = AT91_PIN_PB2, - .is_b = 0, - .wire4 = 1, -}; - -static void __init kb9202_board_init(void) -{ - /* Serial */ - at91_add_device_serial(); - /* Ethernet */ - at91_add_device_eth(&kb9202_eth_data); - /* USB Host */ - at91_add_device_usbh(&kb9202_usbh_data); - /* USB Device */ - at91_add_device_udc(&kb9202_udc_data); - /* MMC */ - at91_add_device_mmc(&kb9202_mmc_data); - /* I2C */ - at91_add_device_i2c(); - /* SPI */ - at91_add_device_spi(NULL, 0); -} - -MACHINE_START(KB9200, "KB920x") - /* Maintainer: KwikByte, Inc. */ - .phys_io = AT91_BASE_SYS, - .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, - .boot_params = AT91_SDRAM_BASE + 0x100, - .timer = &at91rm9200_timer, - .map_io = kb9202_map_io, - .init_irq = kb9202_init_irq, - .init_machine = kb9202_board_init, -MACHINE_END diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c index edc2cc837..8b95467c6 100644 --- a/arch/arm/mach-at91rm9200/clock.c +++ b/arch/arm/mach-at91rm9200/clock.c @@ -27,10 +27,12 @@ #include #include -#include +#include +#include /* for master clock global */ #include "generic.h" +#undef DEBUG /* * There's a lot more which can be done with clocks, including cpufreq @@ -39,9 +41,7 @@ */ struct clk { - const char *name; /* unique clock name */ - const char *function; /* function of the clock */ - struct device *dev; /* device associated with function */ + const char *name; unsigned long rate_hz; struct clk *parent; u32 pmc_mask; @@ -71,14 +71,15 @@ static struct clk clk32k = { }; static struct clk main_clk = { .name = "main", - .pmc_mask = AT91_PMC_MOSCS, /* in PMC_SR */ + .pmc_mask = 1 << 0, /* in PMC_SR */ + .users = 1, .id = 1, .primary = 1, }; static struct clk plla = { .name = "plla", .parent = &main_clk, - .pmc_mask = AT91_PMC_LOCKA, /* in PMC_SR */ + .pmc_mask = 1 << 1, /* in PMC_SR */ .id = 2, .primary = 1, .pll = 1, @@ -104,7 +105,7 @@ static void pllb_mode(struct clk *clk, int is_on) static struct clk pllb = { .name = "pllb", .parent = &main_clk, - .pmc_mask = AT91_PMC_LOCKB, /* in PMC_SR */ + .pmc_mask = 1 << 2, /* in PMC_SR */ .mode = pllb_mode, .id = 3, .primary = 1, @@ -176,7 +177,8 @@ static struct clk pck3 = { */ static struct clk mck = { .name = "mck", - .pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */ + .pmc_mask = 1 << 3, /* in PMC_SR */ + .users = 1, /* (must be) always on */ }; static void pmc_periph_mode(struct clk *clk, int is_on) @@ -247,30 +249,6 @@ static struct clk spi_clk = { .pmc_mask = 1 << AT91_ID_SPI, .mode = pmc_periph_mode, }; -static struct clk pioA_clk = { - .name = "pioA_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOA, - .mode = pmc_periph_mode, -}; -static struct clk pioB_clk = { - .name = "pioB_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOB, - .mode = pmc_periph_mode, -}; -static struct clk pioC_clk = { - .name = "pioC_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOC, - .mode = pmc_periph_mode, -}; -static struct clk pioD_clk = { - .name = "pioD_clk", - .parent = &mck, - .pmc_mask = 1 << AT91_ID_PIOD, - .mode = pmc_periph_mode, -}; static struct clk *const clock_list[] = { /* four primary clocks -- MUST BE FIRST! */ @@ -301,46 +279,21 @@ static struct clk *const clock_list[] = { &udc_clk, &twi_clk, &spi_clk, - &pioA_clk, - &pioB_clk, - &pioC_clk, - &pioD_clk, // ssc0..ssc2 // tc0..tc5 - // irq0..irq6 &ohci_clk, ðer_clk, }; -/* - * Associate a particular clock with a function (eg, "uart") and device. - * The drivers can then request the same 'function' with several different - * devices and not care about which clock name to use. - */ -void __init at91_clock_associate(const char *id, struct device *dev, const char *func) -{ - struct clk *clk = clk_get(NULL, id); - - if (!dev || !clk || !IS_ERR(clk_get(dev, func))) - return; - - clk->function = func; - clk->dev = dev; -} - /* clocks are all static for now; no refcounting necessary */ struct clk *clk_get(struct device *dev, const char *id) { int i; for (i = 0; i < ARRAY_SIZE(clock_list); i++) { - struct clk *clk = clock_list[i]; - - if (strcmp(id, clk->name) == 0) - return clk; - if (clk->function && (dev == clk->dev) && strcmp(id, clk->function) == 0) - return clk; + if (strcmp(id, clock_list[i]->name) == 0) + return clock_list[i]; } return ERR_PTR(-ENOENT); @@ -640,30 +593,6 @@ fail: return 0; } - -/* - * Several unused clocks may be active. Turn them off. - */ -static void at91_periphclk_reset(void) -{ - unsigned long reg; - int i; - - reg = at91_sys_read(AT91_PMC_PCSR); - - for (i = 0; i < ARRAY_SIZE(clock_list); i++) { - struct clk *clk = clock_list[i]; - - if (clk->mode != pmc_periph_mode) - continue; - - if (clk->users > 0) - reg &= ~clk->pmc_mask; - } - - at91_sys_write(AT91_PMC_PCDR, reg); -} - int __init at91_clock_init(unsigned long main_clock) { unsigned tmp, freq, mckr; @@ -697,6 +626,7 @@ int __init at91_clock_init(unsigned long main_clock) */ at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); + at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP)); at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP); at91_sys_write(AT91_CKGR_PLLBR, 0); at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); @@ -710,18 +640,19 @@ int __init at91_clock_init(unsigned long main_clock) */ mckr = at91_sys_read(AT91_PMC_MCKR); mck.parent = clock_list[mckr & AT91_PMC_CSS]; + mck.parent->users++; freq = mck.parent->rate_hz; freq /= (1 << ((mckr >> 2) & 3)); /* prescale */ mck.rate_hz = freq / (1 + ((mckr >> 8) & 3)); /* mdiv */ - /* MCK and CPU clock are "always on" */ - clk_enable(&mck); - printk("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n", freq / 1000000, (unsigned) mck.rate_hz / 1000000, (unsigned) main_clock / 1000000, ((unsigned) main_clock % 1000000) / 1000); + /* FIXME get rid of master_clock global */ + at91_master_clock = mck.rate_hz; + #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS /* establish PCK0..PCK3 parentage */ for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) { @@ -732,28 +663,19 @@ int __init at91_clock_init(unsigned long main_clock) continue; pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); - parent = clock_list[pckr & AT91_PMC_CSS]; + parent = clock_list[pckr & 3]; clk->parent = parent; clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3)); - - if (clk->users == 0) { - /* not being used, so switch it off */ - at91_sys_write(AT91_PMC_SCDR, clk->pmc_mask); - } } #else - /* disable all programmable clocks */ + /* disable unused clocks */ at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3); -#endif - - /* enable the PIO clocks */ - clk_enable(&pioA_clk); - clk_enable(&pioB_clk); - clk_enable(&pioC_clk); - clk_enable(&pioD_clk); +#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */ - /* disable all other unused peripheral clocks */ - at91_periphclk_reset(); + /* FIXME several unused clocks may still be active... provide + * a CONFIG option to turn off all unused clocks at some point + * before driver init starts. + */ return 0; } diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/common.c similarity index 59% rename from arch/arm/mach-at91rm9200/at91rm9200.c rename to arch/arm/mach-at91rm9200/common.c index 0985b1c42..3848fd2d5 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/common.c @@ -1,5 +1,5 @@ /* - * arch/arm/mach-at91rm9200/at91rm9200.c + * arch/arm/mach-at91rm9200/common.c * * Copyright (C) 2005 SAN People * @@ -10,13 +10,13 @@ * */ +#include #include #include #include -#include -#include "generic.h" +#include static struct map_desc at91rm9200_io_desc[] __initdata = { { @@ -94,11 +94,6 @@ static struct map_desc at91rm9200_io_desc[] __initdata = { .pfn = __phys_to_pfn(AT91_BASE_TCB0), .length = SZ_16K, .type = MT_DEVICE, - }, { - .virtual = AT91_SRAM_VIRT_BASE, - .pfn = __phys_to_pfn(AT91_SRAM_BASE), - .length = AT91_SRAM_SIZE, - .type = MT_DEVICE, }, }; @@ -107,48 +102,14 @@ void __init at91rm9200_map_io(void) iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); } -/* - * The default interrupt priority levels (0 = lowest, 7 = highest). - */ -static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { - 7, /* Advanced Interrupt Controller (FIQ) */ - 7, /* System Peripherals */ - 0, /* Parallel IO Controller A */ - 0, /* Parallel IO Controller B */ - 0, /* Parallel IO Controller C */ - 0, /* Parallel IO Controller D */ - 6, /* USART 0 */ - 6, /* USART 1 */ - 6, /* USART 2 */ - 6, /* USART 3 */ - 0, /* Multimedia Card Interface */ - 4, /* USB Device Port */ - 0, /* Two-Wire Interface */ - 6, /* Serial Peripheral Interface */ - 5, /* Serial Synchronous Controller 0 */ - 5, /* Serial Synchronous Controller 1 */ - 5, /* Serial Synchronous Controller 2 */ - 0, /* Timer Counter 0 */ - 0, /* Timer Counter 1 */ - 0, /* Timer Counter 2 */ - 0, /* Timer Counter 3 */ - 0, /* Timer Counter 4 */ - 0, /* Timer Counter 5 */ - 3, /* USB Host port */ - 3, /* Ethernet MAC */ - 0, /* Advanced Interrupt Controller (IRQ0) */ - 0, /* Advanced Interrupt Controller (IRQ1) */ - 0, /* Advanced Interrupt Controller (IRQ2) */ - 0, /* Advanced Interrupt Controller (IRQ3) */ - 0, /* Advanced Interrupt Controller (IRQ4) */ - 0, /* Advanced Interrupt Controller (IRQ5) */ - 0 /* Advanced Interrupt Controller (IRQ6) */ -}; -void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) -{ - if (!priority) - priority = at91rm9200_default_irq_priority; +unsigned long at91_master_clock; - at91_aic_init(priority); -} +EXPORT_SYMBOL(at91_master_clock); + + +int at91_serial_map[AT91_NR_UART]; +int at91_console_port; + +EXPORT_SYMBOL(at91_serial_map); +EXPORT_SYMBOL(at91_console_port); diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 4352acb88..bfe47bd6e 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c @@ -13,17 +13,12 @@ #include #include +#include #include -#include #include -#include +#include -#include "generic.h" - -#define SZ_512 0x00000200 -#define SZ_256 0x00000100 -#define SZ_16 0x00000010 /* -------------------------------------------------------------------- * USB Host @@ -33,7 +28,7 @@ static u64 ohci_dmamask = 0xffffffffUL; static struct at91_usbh_data usbh_data; -static struct resource at91_usbh_resources[] = { +static struct resource at91_usbh_resource[] = { [0] = { .start = AT91_UHP_BASE, .end = AT91_UHP_BASE + SZ_1M - 1, @@ -47,15 +42,15 @@ static struct resource at91_usbh_resources[] = { }; static struct platform_device at91rm9200_usbh_device = { - .name = "at91_ohci", + .name = "at91rm9200-ohci", .id = -1, .dev = { .dma_mask = &ohci_dmamask, .coherent_dma_mask = 0xffffffff, .platform_data = &usbh_data, }, - .resource = at91_usbh_resources, - .num_resources = ARRAY_SIZE(at91_usbh_resources), + .resource = at91_usbh_resource, + .num_resources = ARRAY_SIZE(at91_usbh_resource), }; void __init at91_add_device_usbh(struct at91_usbh_data *data) @@ -79,16 +74,11 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} static struct at91_udc_data udc_data; static struct resource at91_udc_resources[] = { - [0] = { + { .start = AT91_BASE_UDP, .end = AT91_BASE_UDP + SZ_16K - 1, .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_UDP, - .end = AT91_ID_UDP, - .flags = IORESOURCE_IRQ, - }, + } }; static struct platform_device at91rm9200_udc_device = { @@ -110,8 +100,10 @@ void __init at91_add_device_udc(struct at91_udc_data *data) at91_set_gpio_input(data->vbus_pin, 0); at91_set_deglitch(data->vbus_pin, 1); } - if (data->pullup_pin) + if (data->pullup_pin) { at91_set_gpio_output(data->pullup_pin, 0); + at91_set_multi_drive(data->pullup_pin, 1); + } udc_data = *data; platform_device_register(&at91rm9200_udc_device); @@ -205,7 +197,7 @@ static struct at91_cf_data cf_data; static struct resource at91_cf_resources[] = { [0] = { .start = AT91_CF_BASE, - /* ties up CS4, CS5 and CS6 */ + /* ties up CS4, CS5, and CS6 */ .end = AT91_CF_BASE + (0x30000000 - 1), .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, }, @@ -239,12 +231,6 @@ void __init at91_add_device_cf(struct at91_cf_data *data) at91_set_gpio_output(data->vcc_pin, 0); at91_set_gpio_output(data->rst_pin, 0); - /* force poweron defaults for these pins ... */ - at91_set_A_periph(AT91_PIN_PC9, 0); /* A25/CFRNW */ - at91_set_A_periph(AT91_PIN_PC10, 0); /* NCS4/CFCS */ - at91_set_A_periph(AT91_PIN_PC11, 0); /* NCS5/CFCE1 */ - at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ - cf_data = *data; platform_device_register(&at91rm9200_cf_device); } @@ -333,7 +319,6 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data) void __init at91_add_device_mmc(struct at91_mmc_data *data) {} #endif - /* -------------------------------------------------------------------- * NAND / SmartMedia * -------------------------------------------------------------------- */ @@ -414,111 +399,23 @@ void __init at91_add_device_i2c(void) {} #endif -/* -------------------------------------------------------------------- - * SPI - * -------------------------------------------------------------------- */ - -#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE) -static u64 spi_dmamask = 0xffffffffUL; - -static struct resource at91_spi_resources[] = { - [0] = { - .start = AT91_BASE_SPI, - .end = AT91_BASE_SPI + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_SPI, - .end = AT91_ID_SPI, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device at91rm9200_spi_device = { - .name = "at91_spi", - .id = 0, - .dev = { - .dma_mask = &spi_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .resource = at91_spi_resources, - .num_resources = ARRAY_SIZE(at91_spi_resources), -}; - -static const unsigned at91_spi_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; - -void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) -{ - int i; - unsigned long cs_pin; - - at91_set_A_periph(AT91_PIN_PA0, 0); /* MISO */ - at91_set_A_periph(AT91_PIN_PA1, 0); /* MOSI */ - at91_set_A_periph(AT91_PIN_PA2, 0); /* SPCK */ - - /* Enable SPI chip-selects */ - for (i = 0; i < nr_devices; i++) { - if (devices[i].controller_data) - cs_pin = (unsigned long) devices[i].controller_data; - else - cs_pin = at91_spi_standard_cs[devices[i].chip_select]; - -#ifdef CONFIG_SPI_AT91_MANUAL_CS - at91_set_gpio_output(cs_pin, 1); -#else - at91_set_A_periph(cs_pin, 0); -#endif - - /* pass chip-select pin to driver */ - devices[i].controller_data = (void *) cs_pin; - } - - spi_register_board_info(devices, nr_devices); - at91_clock_associate("spi0_clk", &at91rm9200_spi_device.dev, "spi"); - platform_device_register(&at91rm9200_spi_device); -} -#else -void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} -#endif - - /* -------------------------------------------------------------------- * RTC * -------------------------------------------------------------------- */ -#if defined(CONFIG_RTC_DRV_AT91) || defined(CONFIG_RTC_DRV_AT91_MODULE) +#if defined(CONFIG_AT91_RTC) || defined(CONFIG_AT91_RTC_MODULE) static struct platform_device at91rm9200_rtc_device = { .name = "at91_rtc", .id = -1, .num_resources = 0, }; -static void __init at91_add_device_rtc(void) +void __init at91_add_device_rtc(void) { platform_device_register(&at91rm9200_rtc_device); } #else -static void __init at91_add_device_rtc(void) {} -#endif - - -/* -------------------------------------------------------------------- - * Watchdog - * -------------------------------------------------------------------- */ - -#if defined(CONFIG_AT91_WATCHDOG) || defined(CONFIG_AT91_WATCHDOG_MODULE) -static struct platform_device at91rm9200_wdt_device = { - .name = "at91_wdt", - .id = -1, - .num_resources = 0, -}; - -static void __init at91_add_device_watchdog(void) -{ - platform_device_register(&at91rm9200_wdt_device); -} -#else -static void __init at91_add_device_watchdog(void) {} +void __init at91_add_device_rtc(void) {} #endif @@ -532,281 +429,13 @@ u8 at91_leds_timer; void __init at91_init_leds(u8 cpu_led, u8 timer_led) { - at91_leds_cpu = cpu_led; - at91_leds_timer = timer_led; -} -#else -void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} -#endif - - -/* -------------------------------------------------------------------- - * UART - * -------------------------------------------------------------------- */ - -#if defined(CONFIG_SERIAL_AT91) -static struct resource dbgu_resources[] = { - [0] = { - .start = AT91_VA_BASE_SYS + AT91_DBGU, - .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_SYS, - .end = AT91_ID_SYS, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct at91_uart_data dbgu_data = { - .use_dma_tx = 0, - .use_dma_rx = 0, /* DBGU not capable of receive DMA */ -}; - -static struct platform_device at91rm9200_dbgu_device = { - .name = "at91_usart", - .id = 0, - .dev = { - .platform_data = &dbgu_data, - .coherent_dma_mask = 0xffffffff, - }, - .resource = dbgu_resources, - .num_resources = ARRAY_SIZE(dbgu_resources), -}; - -static inline void configure_dbgu_pins(void) -{ - at91_set_A_periph(AT91_PIN_PA30, 0); /* DRXD */ - at91_set_A_periph(AT91_PIN_PA31, 1); /* DTXD */ -} - -static struct resource uart0_resources[] = { - [0] = { - .start = AT91_BASE_US0, - .end = AT91_BASE_US0 + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_US0, - .end = AT91_ID_US0, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct at91_uart_data uart0_data = { - .use_dma_tx = 1, - .use_dma_rx = 1, -}; - -static struct platform_device at91rm9200_uart0_device = { - .name = "at91_usart", - .id = 1, - .dev = { - .platform_data = &uart0_data, - .coherent_dma_mask = 0xffffffff, - }, - .resource = uart0_resources, - .num_resources = ARRAY_SIZE(uart0_resources), -}; - -static inline void configure_usart0_pins(void) -{ - at91_set_A_periph(AT91_PIN_PA17, 1); /* TXD0 */ - at91_set_A_periph(AT91_PIN_PA18, 0); /* RXD0 */ - at91_set_A_periph(AT91_PIN_PA20, 0); /* CTS0 */ - - /* - * AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21. - * We need to drive the pin manually. Default is off (RTS is active low). - */ - at91_set_gpio_output(AT91_PIN_PA21, 1); + at91_leds_cpu = cpu_led; + at91_leds_timer = timer_led; } -static struct resource uart1_resources[] = { - [0] = { - .start = AT91_BASE_US1, - .end = AT91_BASE_US1 + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_US1, - .end = AT91_ID_US1, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct at91_uart_data uart1_data = { - .use_dma_tx = 1, - .use_dma_rx = 1, -}; - -static struct platform_device at91rm9200_uart1_device = { - .name = "at91_usart", - .id = 2, - .dev = { - .platform_data = &uart1_data, - .coherent_dma_mask = 0xffffffff, - }, - .resource = uart1_resources, - .num_resources = ARRAY_SIZE(uart1_resources), -}; - -static inline void configure_usart1_pins(void) -{ - at91_set_A_periph(AT91_PIN_PB18, 0); /* RI1 */ - at91_set_A_periph(AT91_PIN_PB19, 0); /* DTR1 */ - at91_set_A_periph(AT91_PIN_PB20, 1); /* TXD1 */ - at91_set_A_periph(AT91_PIN_PB21, 0); /* RXD1 */ - at91_set_A_periph(AT91_PIN_PB23, 0); /* DCD1 */ - at91_set_A_periph(AT91_PIN_PB24, 0); /* CTS1 */ - at91_set_A_periph(AT91_PIN_PB25, 0); /* DSR1 */ - at91_set_A_periph(AT91_PIN_PB26, 0); /* RTS1 */ -} - -static struct resource uart2_resources[] = { - [0] = { - .start = AT91_BASE_US2, - .end = AT91_BASE_US2 + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_US2, - .end = AT91_ID_US2, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct at91_uart_data uart2_data = { - .use_dma_tx = 1, - .use_dma_rx = 1, -}; - -static struct platform_device at91rm9200_uart2_device = { - .name = "at91_usart", - .id = 3, - .dev = { - .platform_data = &uart2_data, - .coherent_dma_mask = 0xffffffff, - }, - .resource = uart2_resources, - .num_resources = ARRAY_SIZE(uart2_resources), -}; - -static inline void configure_usart2_pins(void) -{ - at91_set_A_periph(AT91_PIN_PA22, 0); /* RXD2 */ - at91_set_A_periph(AT91_PIN_PA23, 1); /* TXD2 */ -} - -static struct resource uart3_resources[] = { - [0] = { - .start = AT91_BASE_US3, - .end = AT91_BASE_US3 + SZ_16K - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = AT91_ID_US3, - .end = AT91_ID_US3, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct at91_uart_data uart3_data = { - .use_dma_tx = 1, - .use_dma_rx = 1, -}; - -static struct platform_device at91rm9200_uart3_device = { - .name = "at91_usart", - .id = 4, - .dev = { - .platform_data = &uart3_data, - .coherent_dma_mask = 0xffffffff, - }, - .resource = uart3_resources, - .num_resources = ARRAY_SIZE(uart3_resources), -}; - -static inline void configure_usart3_pins(void) -{ - at91_set_B_periph(AT91_PIN_PA5, 1); /* TXD3 */ - at91_set_B_periph(AT91_PIN_PA6, 0); /* RXD3 */ -} - -struct platform_device *at91_uarts[AT91_NR_UART]; /* the UARTs to use */ -struct platform_device *at91_default_console_device; /* the serial console device */ - -void __init at91_init_serial(struct at91_uart_config *config) -{ - int i; - - /* Fill in list of supported UARTs */ - for (i = 0; i < config->nr_tty; i++) { - switch (config->tty_map[i]) { - case 0: - configure_usart0_pins(); - at91_uarts[i] = &at91rm9200_uart0_device; - at91_clock_associate("usart0_clk", &at91rm9200_uart0_device.dev, "usart"); - break; - case 1: - configure_usart1_pins(); - at91_uarts[i] = &at91rm9200_uart1_device; - at91_clock_associate("usart1_clk", &at91rm9200_uart1_device.dev, "usart"); - break; - case 2: - configure_usart2_pins(); - at91_uarts[i] = &at91rm9200_uart2_device; - at91_clock_associate("usart2_clk", &at91rm9200_uart2_device.dev, "usart"); - break; - case 3: - configure_usart3_pins(); - at91_uarts[i] = &at91rm9200_uart3_device; - at91_clock_associate("usart3_clk", &at91rm9200_uart3_device.dev, "usart"); - break; - case 4: - configure_dbgu_pins(); - at91_uarts[i] = &at91rm9200_dbgu_device; - at91_clock_associate("mck", &at91rm9200_dbgu_device.dev, "usart"); - break; - default: - continue; - } - at91_uarts[i]->id = i; /* update ID number to mapped ID */ - } - - /* Set serial console device */ - if (config->console_tty < AT91_NR_UART) - at91_default_console_device = at91_uarts[config->console_tty]; - if (!at91_default_console_device) - printk(KERN_INFO "AT91: No default serial console defined.\n"); -} - -void __init at91_add_device_serial(void) -{ - int i; - - for (i = 0; i < AT91_NR_UART; i++) { - if (at91_uarts[i]) - platform_device_register(at91_uarts[i]); - } -} #else -void __init at91_init_serial(struct at91_uart_config *config) {} -void __init at91_add_device_serial(void) {} +void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} #endif /* -------------------------------------------------------------------- */ - -/* - * These devices are always present and don't need any board-specific - * setup. - */ -static int __init at91_add_standard_devices(void) -{ - at91_add_device_rtc(); - at91_add_device_watchdog(); - return 0; -} - -arch_initcall(at91_add_standard_devices); diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h index 7979d8ab7..9bd541eba 100644 --- a/arch/arm/mach-at91rm9200/generic.h +++ b/arch/arm/mach-at91rm9200/generic.h @@ -8,24 +8,11 @@ * published by the Free Software Foundation. */ - /* Interrupts */ -extern void __init at91rm9200_init_irq(unsigned int priority[]); -extern void __init at91_aic_init(unsigned int priority[]); -extern void __init at91_gpio_irq_setup(unsigned banks); +void at91_gpio_irq_setup(unsigned banks); - /* Timer */ struct sys_timer; extern struct sys_timer at91rm9200_timer; - /* Memory Map */ extern void __init at91rm9200_map_io(void); - /* Clocks */ extern int __init at91_clock_init(unsigned long main_clock); -struct device; -extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); - - /* Power Management */ -extern void at91_irq_suspend(void); -extern void at91_irq_resume(void); - diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index cec199fd6..5ab46274e 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c @@ -10,14 +10,13 @@ */ #include -#include -#include #include #include #include #include -#include +#include +#include #include static const u32 pio_controller_offset[4] = { @@ -214,84 +213,6 @@ EXPORT_SYMBOL(at91_get_gpio_value); /*--------------------------------------------------------------------------*/ -#ifdef CONFIG_PM - -static u32 wakeups[BGA_GPIO_BANKS]; -static u32 backups[BGA_GPIO_BANKS]; - -static int gpio_irq_set_wake(unsigned pin, unsigned state) -{ - unsigned mask = pin_to_mask(pin); - - pin -= PIN_BASE; - pin /= 32; - - if (unlikely(pin >= BGA_GPIO_BANKS)) - return -EINVAL; - - if (state) - wakeups[pin] |= mask; - else - wakeups[pin] &= ~mask; - - return 0; -} - -void at91_gpio_suspend(void) -{ - int i; - - for (i = 0; i < BGA_GPIO_BANKS; i++) { - u32 pio = pio_controller_offset[i]; - - /* - * Note: drivers should have disabled GPIO interrupts that - * aren't supposed to be wakeup sources. - * But that is not much good on ARM..... disable_irq() does - * not update the hardware immediately, so the hardware mask - * (IMR) has the wrong value (not current, too much is - * permitted). - * - * Our workaround is to disable all non-wakeup IRQs ... - * which is exactly what correct drivers asked for in the - * first place! - */ - backups[i] = at91_sys_read(pio + PIO_IMR); - at91_sys_write(pio_controller_offset[i] + PIO_IDR, backups[i]); - at91_sys_write(pio_controller_offset[i] + PIO_IER, wakeups[i]); - - if (!wakeups[i]) { - disable_irq_wake(AT91_ID_PIOA + i); - at91_sys_write(AT91_PMC_PCDR, 1 << (AT91_ID_PIOA + i)); - } else { - enable_irq_wake(AT91_ID_PIOA + i); -#ifdef CONFIG_PM_DEBUG - printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", "ABCD"[i], wakeups[i]); -#endif - } - } -} - -void at91_gpio_resume(void) -{ - int i; - - for (i = 0; i < BGA_GPIO_BANKS; i++) { - at91_sys_write(pio_controller_offset[i] + PIO_IDR, wakeups[i]); - at91_sys_write(pio_controller_offset[i] + PIO_IER, backups[i]); - } - - at91_sys_write(AT91_PMC_PCER, - (1 << AT91_ID_PIOA) - | (1 << AT91_ID_PIOB) - | (1 << AT91_ID_PIOC) - | (1 << AT91_ID_PIOD)); -} - -#else -#define gpio_irq_set_wake NULL -#endif - /* Several AIC controller irqs are dispatched through this GPIO handler. * To use any AT91_PIN_* as an externally triggered IRQ, first call @@ -327,12 +248,10 @@ static int gpio_irq_type(unsigned pin, unsigned type) return (type == IRQT_BOTHEDGE) ? 0 : -EINVAL; } -static struct irq_chip gpio_irqchip = { - .name = "GPIO", +static struct irqchip gpio_irqchip = { .mask = gpio_irq_mask, .unmask = gpio_irq_unmask, .set_type = gpio_irq_type, - .set_wake = gpio_irq_set_wake, }; static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs) @@ -342,22 +261,21 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs void __iomem *pio; u32 isr; - pio = get_irq_chip_data(irq); + pio = desc->base; /* temporarily mask (level sensitive) parent IRQ */ desc->chip->ack(irq); for (;;) { - /* reading ISR acks the pending (edge triggered) GPIO interrupt */ isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR); if (!isr) break; - pin = (unsigned) get_irq_data(irq); + pin = (unsigned) desc->data; gpio = &irq_desc[pin]; while (isr) { if (isr & 1) { - if (unlikely(gpio->depth)) { + if (unlikely(gpio->disable_depth)) { /* * The core ARM interrupt handler lazily disables IRQs so * another IRQ must be generated before it actually gets @@ -366,7 +284,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs gpio_irq_mask(pin); } else - desc_handle_irq(pin, gpio, regs); + gpio->handle(pin, gpio, regs); } pin++; gpio++; @@ -397,16 +315,15 @@ void __init at91_gpio_irq_setup(unsigned banks) set_irq_chipdata(id, controller); for (i = 0; i < 32; i++, pin++) { - /* - * Can use the "simple" and not "edge" handler since it's - * shorter, and the AIC handles interupts sanely. - */ set_irq_chip(pin, &gpio_irqchip); set_irq_handler(pin, do_simple_IRQ); set_irq_flags(pin, IRQF_VALID); } set_irq_chained_handler(id, gpio_irq_handler); + + /* enable the PIO peripheral clock */ + at91_sys_write(AT91_PMC_PCER, 1 << id); } pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks); } diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c index c3a5e777f..cb62bc83a 100644 --- a/arch/arm/mach-at91rm9200/irq.c +++ b/arch/arm/mach-at91rm9200/irq.c @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -36,23 +37,65 @@ #include "generic.h" +/* + * The default interrupt priority levels (0 = lowest, 7 = highest). + */ +static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { + 7, /* Advanced Interrupt Controller */ + 7, /* System Peripheral */ + 0, /* Parallel IO Controller A */ + 0, /* Parallel IO Controller B */ + 0, /* Parallel IO Controller C */ + 0, /* Parallel IO Controller D */ + 6, /* USART 0 */ + 6, /* USART 1 */ + 6, /* USART 2 */ + 6, /* USART 3 */ + 0, /* Multimedia Card Interface */ + 4, /* USB Device Port */ + 0, /* Two-Wire Interface */ + 6, /* Serial Peripheral Interface */ + 5, /* Serial Synchronous Controller */ + 5, /* Serial Synchronous Controller */ + 5, /* Serial Synchronous Controller */ + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ + 0, /* Timer Counter 3 */ + 0, /* Timer Counter 4 */ + 0, /* Timer Counter 5 */ + 3, /* USB Host port */ + 3, /* Ethernet MAC */ + 0, /* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ + 0, /* Advanced Interrupt Controller */ + 0 /* Advanced Interrupt Controller */ +}; -static void at91_aic_mask_irq(unsigned int irq) + +static void at91rm9200_mask_irq(unsigned int irq) { /* Disable interrupt on AIC */ at91_sys_write(AT91_AIC_IDCR, 1 << irq); } -static void at91_aic_unmask_irq(unsigned int irq) +static void at91rm9200_unmask_irq(unsigned int irq) { /* Enable interrupt on AIC */ at91_sys_write(AT91_AIC_IECR, 1 << irq); } -static int at91_aic_set_type(unsigned irq, unsigned type) +static int at91rm9200_irq_type(unsigned irq, unsigned type) { unsigned int smr, srctype; + /* change triggering only for FIQ and external IRQ0..IRQ6 */ + if ((irq < AT91_ID_IRQ0) && (irq != AT91_ID_FIQ)) + return -EINVAL; + switch (type) { case IRQT_HIGH: srctype = AT91_AIC_SRCTYPE_HIGH; @@ -61,13 +104,9 @@ static int at91_aic_set_type(unsigned irq, unsigned type) srctype = AT91_AIC_SRCTYPE_RISING; break; case IRQT_LOW: - if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */ - return -EINVAL; srctype = AT91_AIC_SRCTYPE_LOW; break; case IRQT_FALLING: - if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */ - return -EINVAL; srctype = AT91_AIC_SRCTYPE_FALLING; break; default: @@ -79,57 +118,24 @@ static int at91_aic_set_type(unsigned irq, unsigned type) return 0; } -#ifdef CONFIG_PM - -static u32 wakeups; -static u32 backups; - -static int at91_aic_set_wake(unsigned irq, unsigned value) -{ - if (unlikely(irq >= 32)) - return -EINVAL; - - if (value) - wakeups |= (1 << irq); - else - wakeups &= ~(1 << irq); - - return 0; -} - -void at91_irq_suspend(void) -{ - backups = at91_sys_read(AT91_AIC_IMR); - at91_sys_write(AT91_AIC_IDCR, backups); - at91_sys_write(AT91_AIC_IECR, wakeups); -} - -void at91_irq_resume(void) -{ - at91_sys_write(AT91_AIC_IDCR, wakeups); - at91_sys_write(AT91_AIC_IECR, backups); -} - -#else -#define at91_aic_set_wake NULL -#endif - -static struct irq_chip at91_aic_chip = { - .name = "AIC", - .ack = at91_aic_mask_irq, - .mask = at91_aic_mask_irq, - .unmask = at91_aic_unmask_irq, - .set_type = at91_aic_set_type, - .set_wake = at91_aic_set_wake, +static struct irqchip at91rm9200_irq_chip = { + .ack = at91rm9200_mask_irq, + .mask = at91rm9200_mask_irq, + .unmask = at91rm9200_unmask_irq, + .set_type = at91rm9200_irq_type, }; /* * Initialize the AIC interrupt controller. */ -void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS]) +void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) { unsigned int i; + /* No priority list specified for this board -> use defaults */ + if (priority == NULL) + priority = at91rm9200_default_irq_priority; + /* * The IVR is used by macro get_irqnr_and_base to read and verify. * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred. @@ -137,10 +143,10 @@ void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS]) for (i = 0; i < NR_AIC_IRQS; i++) { /* Put irq number in Source Vector Register: */ at91_sys_write(AT91_AIC_SVR(i), i); - /* Active Low interrupt, with the specified priority */ + /* Store the Source Mode Register as defined in table above */ at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); - set_irq_chip(i, &at91_aic_chip); + set_irq_chip(i, &at91rm9200_irq_chip); set_irq_handler(i, do_level_IRQ); set_irq_flags(i, IRQF_VALID | IRQF_PROBE); diff --git a/arch/arm/mach-at91rm9200/leds.c b/arch/arm/mach-at91rm9200/leds.c index 1a3337304..28150e890 100644 --- a/arch/arm/mach-at91rm9200/leds.c +++ b/arch/arm/mach-at91rm9200/leds.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-at91rm9200/pm.c b/arch/arm/mach-at91rm9200/pm.c deleted file mode 100644 index 47e5480fe..000000000 --- a/arch/arm/mach-at91rm9200/pm.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * arch/arm/mach-at91rm9200/pm.c - * AT91 Power Management - * - * Copyright (C) 2005 David Brownell - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "generic.h" - - -static int at91_pm_valid_state(suspend_state_t state) -{ - switch (state) { - case PM_SUSPEND_ON: - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - return 1; - - default: - return 0; - } -} - - -static suspend_state_t target_state; - -/* - * Called after processes are frozen, but before we shutdown devices. - */ -static int at91_pm_prepare(suspend_state_t state) -{ - target_state = state; - return 0; -} - -/* - * Verify that all the clocks are correct before entering - * slow-clock mode. - */ -static int at91_pm_verify_clocks(void) -{ - unsigned long scsr; - int i; - - scsr = at91_sys_read(AT91_PMC_SCSR); - - /* USB must not be using PLLB */ - if ((scsr & (AT91_PMC_UHP | AT91_PMC_UDP)) != 0) { - pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n"); - return 0; - } - -#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS - /* PCK0..PCK3 must be disabled, or configured to use clk32k */ - for (i = 0; i < 4; i++) { - u32 css; - - if ((scsr & (AT91_PMC_PCK0 << i)) == 0) - continue; - - css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS; - if (css != AT91_PMC_CSS_SLOW) { - pr_debug("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css); - return 0; - } - } -#endif - - return 1; -} - -/* - * Call this from platform driver suspend() to see how deeply to suspend. - * For example, some controllers (like OHCI) need one of the PLL clocks - * in order to act as a wakeup source, and those are not available when - * going into slow clock mode. - * - * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have - * the very same problem (but not using at91 main_clk), and it'd be better - * to add one generic API rather than lots of platform-specific ones. - */ -int at91_suspend_entering_slow_clock(void) -{ - return (target_state == PM_SUSPEND_MEM); -} -EXPORT_SYMBOL(at91_suspend_entering_slow_clock); - - -static void (*slow_clock)(void); - - - -static int at91_pm_enter(suspend_state_t state) -{ - at91_gpio_suspend(); - at91_irq_suspend(); - - pr_debug("AT91: PM - wake mask %08x, pm state %d\n", - /* remember all the always-wake irqs */ - (at91_sys_read(AT91_PMC_PCSR) - | (1 << AT91_ID_FIQ) - | (1 << AT91_ID_SYS) - | (1 << AT91_ID_IRQ0) - | (1 << AT91_ID_IRQ1) - | (1 << AT91_ID_IRQ2) - | (1 << AT91_ID_IRQ3) - | (1 << AT91_ID_IRQ4) - | (1 << AT91_ID_IRQ5) - | (1 << AT91_ID_IRQ6)) - & at91_sys_read(AT91_AIC_IMR), - state); - - switch (state) { - /* - * Suspend-to-RAM is like STANDBY plus slow clock mode, so - * drivers must suspend more deeply: only the master clock - * controller may be using the main oscillator. - */ - case PM_SUSPEND_MEM: - /* - * Ensure that clocks are in a valid state. - */ - if (!at91_pm_verify_clocks()) - goto error; - - /* - * Enter slow clock mode by switching over to clk32k and - * turning off the main oscillator; reverse on wakeup. - */ - if (slow_clock) { - slow_clock(); - break; - } else { - /* DEVELOPMENT ONLY */ - pr_info("AT91: PM - no slow clock mode yet ...\n"); - /* FALLTHROUGH leaving master clock alone */ - } - - /* - * STANDBY mode has *all* drivers suspended; ignores irqs not - * marked as 'wakeup' event sources; and reduces DRAM power. - * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and - * nothing fancy done with main or cpu clocks. - */ - case PM_SUSPEND_STANDBY: - /* - * NOTE: the Wait-for-Interrupt instruction needs to be - * in icache so the SDRAM stays in self-refresh mode until - * the wakeup IRQ occurs. - */ - asm("b 1f; .align 5; 1:"); - asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */ - at91_sys_write(AT91_SDRAMC_SRR, 1); /* self-refresh mode */ - /* fall though to next state */ - - case PM_SUSPEND_ON: - asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */ - break; - - default: - pr_debug("AT91: PM - bogus suspend state %d\n", state); - goto error; - } - - pr_debug("AT91: PM - wakeup %08x\n", - at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR)); - -error: - target_state = PM_SUSPEND_ON; - at91_irq_resume(); - at91_gpio_resume(); - return 0; -} - - -static struct pm_ops at91_pm_ops ={ - .pm_disk_mode = 0, - .valid = at91_pm_valid_state, - .prepare = at91_pm_prepare, - .enter = at91_pm_enter, -}; - -static int __init at91_pm_init(void) -{ - printk("AT91: Power Management\n"); - -#ifdef CONFIG_AT91_PM_SLOW_CLOCK - /* REVISIT allocations of SRAM should be dynamically managed. - * FIQ handlers and other components will want SRAM/TCM too... - */ - slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K)); - memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz); -#endif - - /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */ - at91_sys_write(AT91_SDRAMC_LPR, 0); - - pm_set_ops(&at91_pm_ops); - - return 0; -} -arch_initcall(at91_pm_init); diff --git a/arch/arm/mach-at91rm9200/at91rm9200_time.c b/arch/arm/mach-at91rm9200/time.c similarity index 79% rename from arch/arm/mach-at91rm9200/at91rm9200_time.c rename to arch/arm/mach-at91rm9200/time.c index a92a8622c..7ffcf443b 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200_time.c +++ b/arch/arm/mach-at91rm9200/time.c @@ -1,5 +1,5 @@ /* - * linux/arch/arm/mach-at91rm9200/at91rm9200_time.c + * linux/arch/arm/mach-at91rm9200/time.c * * Copyright (C) 2003 SAN People * Copyright (C) 2003 ATMEL @@ -19,19 +19,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include -#include #include #include #include #include #include +#include #include -static unsigned long last_crtr; - /* * The ST_CRTR is updated asynchronously to the master clock. It is therefore * necessary to read it twice (with the same value) to ensure accuracy. @@ -57,7 +56,7 @@ static unsigned long at91rm9200_gettimeoffset(void) { unsigned long elapsed; - elapsed = (read_CRTR() - last_crtr) & AT91_ST_ALMV; + elapsed = (read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV; return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH; } @@ -67,12 +66,15 @@ static unsigned long at91rm9200_gettimeoffset(void) */ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { + unsigned long rtar; + if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ write_seqlock(&xtime_lock); - while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) { + while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH) { timer_tick(regs); - last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV; + rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV; + at91_sys_write(AT91_ST_RTAR, rtar); } write_sequnlock(&xtime_lock); @@ -85,24 +87,10 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r static struct irqaction at91rm9200_timer_irq = { .name = "at91_tick", - .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER, + .flags = SA_SHIRQ | SA_INTERRUPT, .handler = at91rm9200_timer_interrupt }; -void at91rm9200_timer_reset(void) -{ - last_crtr = 0; - - /* Real time counter incremented every 30.51758 microseconds */ - at91_sys_write(AT91_ST_RTMR, 1); - - /* Set Period Interval timer */ - at91_sys_write(AT91_ST_PIMR, LATCH); - - /* Enable Period Interval Timer interrupt */ - at91_sys_write(AT91_ST_IER, AT91_ST_PITS); -} - /* * Set up timer interrupt. */ @@ -112,30 +100,28 @@ void __init at91rm9200_timer_init(void) at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS); (void) at91_sys_read(AT91_ST_SR); /* Clear any pending interrupts */ - /* Make IRQs happen for the system timer */ + /* + * Make IRQs happen for the system timer. + */ setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq); + /* Set initial alarm to 0 */ + at91_sys_write(AT91_ST_RTAR, 0); + + /* Real time counter incremented every 30.51758 microseconds */ + at91_sys_write(AT91_ST_RTMR, 1); + + /* Set Period Interval timer */ + at91_sys_write(AT91_ST_PIMR, LATCH); + /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */ tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE; - /* Initialize and enable the timer interrupt */ - at91rm9200_timer_reset(); -} - -#ifdef CONFIG_PM -static void at91rm9200_timer_suspend(void) -{ - /* disable Period Interval Timer interrupt */ - at91_sys_write(AT91_ST_IDR, AT91_ST_PITS); + /* Enable Period Interval Timer interrupt */ + at91_sys_write(AT91_ST_IER, AT91_ST_PITS); } -#else -#define at91rm9200_timer_suspend NULL -#endif struct sys_timer at91rm9200_timer = { .init = at91rm9200_timer_init, .offset = at91rm9200_gettimeoffset, - .suspend = at91rm9200_timer_suspend, - .resume = at91rm9200_timer_reset, }; - diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c index 3792ab4f0..ff26a85aa 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/fortunet.c @@ -19,6 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index c8ecd2480..9ba45f4d5 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c index a071eac4a..1a23f0dcd 100644 --- a/arch/arm/mach-clps711x/time.c +++ b/arch/arm/mach-clps711x/time.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -58,7 +57,7 @@ p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction clps711x_timer_irq = { .name = "CLPS711x Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = p720t_timer_interrupt, }; diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index 92eaebdd5..5b12cab0e 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -316,7 +315,7 @@ clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction clps7500_timer_irq = { .name = "CLPS7500 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = clps7500_timer_interrupt, }; diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 70dd12ef3..6d620d826 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c @@ -199,7 +199,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction ebsa110_timer_irq = { .name = "EBSA110 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = ebsa110_timer_interrupt, }; diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index f1b740083..cec5a21ca 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig @@ -2,31 +2,8 @@ if ARCH_EP93XX menu "Cirrus EP93xx Implementation Options" -config CRUNCH - bool "Support for MaverickCrunch" - help - Enable kernel support for MaverickCrunch. - comment "EP93xx Platforms" -config MACH_EDB9302 - bool "Support Cirrus Logic EDB9302" - help - Say 'Y' here if you want your kernel to support the Cirrus - Logic EDB9302 Evaluation Board. - -config MACH_EDB9315 - bool "Support Cirrus Logic EDB9315" - help - Say 'Y' here if you want your kernel to support the Cirrus - Logic EDB9315 Evaluation Board. - -config MACH_EDB9315A - bool "Support Cirrus Logic EDB9315A" - help - Say 'Y' here if you want your kernel to support the Cirrus - Logic EDB9315A Evaluation Board. - config MACH_GESBC9312 bool "Support Glomation GESBC-9312-sx" help diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 1f5a6b048..5393af989 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile @@ -1,13 +1,10 @@ # # Makefile for the linux kernel. # -obj-y := core.o clock.o +obj-y := core.o obj-m := obj-n := obj- := -obj-$(CONFIG_MACH_EDB9302) += edb9302.o -obj-$(CONFIG_MACH_EDB9315) += edb9315.o -obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o obj-$(CONFIG_MACH_TS72XX) += ts72xx.o diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c deleted file mode 100644 index 08ad782c1..000000000 --- a/arch/arm/mach-ep93xx/clock.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - * arch/arm/mach-ep93xx/clock.c - * Clock control for Cirrus EP93xx chips. - * - * Copyright (C) 2006 Lennert Buytenhek - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include - -struct clk { - char *name; - unsigned long rate; - int users; - u32 enable_reg; - u32 enable_mask; -}; - -static struct clk clk_pll1 = { - .name = "pll1", -}; -static struct clk clk_f = { - .name = "fclk", -}; -static struct clk clk_h = { - .name = "hclk", -}; -static struct clk clk_p = { - .name = "pclk", -}; -static struct clk clk_pll2 = { - .name = "pll2", -}; -static struct clk clk_usb_host = { - .name = "usb_host", - .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, - .enable_mask = EP93XX_SYSCON_CLOCK_USH_EN, -}; - - -static struct clk *clocks[] = { - &clk_pll1, - &clk_f, - &clk_h, - &clk_p, - &clk_pll2, - &clk_usb_host, -}; - -struct clk *clk_get(struct device *dev, const char *id) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(clocks); i++) { - if (!strcmp(clocks[i]->name, id)) - return clocks[i]; - } - - return ERR_PTR(-ENOENT); -} - -int clk_enable(struct clk *clk) -{ - if (!clk->users++ && clk->enable_reg) { - u32 value; - - value = __raw_readl(clk->enable_reg); - __raw_writel(value | clk->enable_mask, clk->enable_reg); - } - - return 0; -} - -void clk_disable(struct clk *clk) -{ - if (!--clk->users && clk->enable_reg) { - u32 value; - - value = __raw_readl(clk->enable_reg); - __raw_writel(value & ~clk->enable_mask, clk->enable_reg); - } -} - -unsigned long clk_get_rate(struct clk *clk) -{ - return clk->rate; -} - -void clk_put(struct clk *clk) -{ -} - - - -static char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 }; -static char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 }; -static char pclk_divisors[] = { 1, 2, 4, 8 }; - -/* - * PLL rate = 14.7456 MHz * (X1FBD + 1) * (X2FBD + 1) / (X2IPD + 1) / 2^PS - */ -static unsigned long calc_pll_rate(u32 config_word) -{ - unsigned long long rate; - int i; - - rate = 14745600; - rate *= ((config_word >> 11) & 0x1f) + 1; /* X1FBD */ - rate *= ((config_word >> 5) & 0x3f) + 1; /* X2FBD */ - do_div(rate, (config_word & 0x1f) + 1); /* X2IPD */ - for (i = 0; i < ((config_word >> 16) & 3); i++) /* PS */ - rate >>= 1; - - return (unsigned long)rate; -} - -void ep93xx_clock_init(void) -{ - u32 value; - - value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); - if (!(value & 0x00800000)) { /* PLL1 bypassed? */ - clk_pll1.rate = 14745600; - } else { - clk_pll1.rate = calc_pll_rate(value); - } - clk_f.rate = clk_pll1.rate / fclk_divisors[(value >> 25) & 0x7]; - clk_h.rate = clk_pll1.rate / hclk_divisors[(value >> 20) & 0x7]; - clk_p.rate = clk_h.rate / pclk_divisors[(value >> 18) & 0x3]; - - value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2); - if (!(value & 0x00080000)) { /* PLL2 bypassed? */ - clk_pll2.rate = 14745600; - } else if (value & 0x00040000) { /* PLL2 enabled? */ - clk_pll2.rate = calc_pll_rate(value); - } else { - clk_pll2.rate = 0; - } - clk_usb_host.rate = clk_pll2.rate / (((value >> 28) & 0xf) + 1); - - printk(KERN_INFO "ep93xx: PLL1 running at %ld MHz, PLL2 at %ld MHz\n", - clk_pll1.rate / 1000000, clk_pll2.rate / 1000000); - printk(KERN_INFO "ep93xx: FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", - clk_f.rate / 1000000, clk_h.rate / 1000000, - clk_p.rate / 1000000); -} diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index a87a784b9..dcd417625 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -13,6 +13,7 @@ * your option) any later version. */ +#include #include #include #include @@ -102,8 +103,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) write_seqlock(&xtime_lock); __raw_writel(1, EP93XX_TIMER1_CLEAR); - while ((signed long) - (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) + while (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time >= TIMER4_TICKS_PER_JIFFY) { last_jiffy_time += TIMER4_TICKS_PER_JIFFY; timer_tick(regs); @@ -116,7 +116,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction ep93xx_timer_irq = { .name = "ep93xx timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = ep93xx_timer_interrupt, }; @@ -124,7 +124,7 @@ static void __init ep93xx_timer_init(void) { /* Enable periodic HZ timer. */ __raw_writel(0x48, EP93XX_TIMER1_CONTROL); - __raw_writel((508469 / HZ) - 1, EP93XX_TIMER1_LOAD); + __raw_writel((508000 / HZ) - 1, EP93XX_TIMER1_LOAD); __raw_writel(0xc8, EP93XX_TIMER1_CONTROL); /* Enable lost jiffy timer. */ @@ -432,37 +432,10 @@ static struct platform_device ep93xx_rtc_device = { }; -static struct resource ep93xx_ohci_resources[] = { - [0] = { - .start = EP93XX_USB_PHYS_BASE, - .end = EP93XX_USB_PHYS_BASE + 0x0fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_EP93XX_USB, - .end = IRQ_EP93XX_USB, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device ep93xx_ohci_device = { - .name = "ep93xx-ohci", - .id = -1, - .dev = { - .dma_mask = (void *)0xffffffff, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(ep93xx_ohci_resources), - .resource = ep93xx_ohci_resources, -}; - - void __init ep93xx_init_devices(void) { unsigned int v; - ep93xx_clock_init(); - /* * Disallow access to MaverickCrunch initially. */ @@ -476,5 +449,4 @@ void __init ep93xx_init_devices(void) amba_device_register(&uart3_device, &iomem_resource); platform_device_register(&ep93xx_rtc_device); - platform_device_register(&ep93xx_ohci_device); } diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c deleted file mode 100644 index 0315615b7..000000000 --- a/arch/arm/mach-ep93xx/edb9302.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * arch/arm/mach-ep93xx/edb9302.c - * Cirrus Logic EDB9302 support. - * - * Copyright (C) 2006 George Kashperko - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static struct physmap_flash_data edb9302_flash_data = { - .width = 2, -}; - -static struct resource edb9302_flash_resource = { - .start = 0x60000000, - .end = 0x60ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device edb9302_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &edb9302_flash_data, - }, - .num_resources = 1, - .resource = &edb9302_flash_resource, -}; - -static void __init edb9302_init_machine(void) -{ - ep93xx_init_devices(); - platform_device_register(&edb9302_flash); -} - -MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") - /* Maintainer: George Kashperko */ - .phys_io = EP93XX_APB_PHYS_BASE, - .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, - .boot_params = 0x00000100, - .map_io = ep93xx_map_io, - .init_irq = ep93xx_init_irq, - .timer = &ep93xx_timer, - .init_machine = edb9302_init_machine, -MACHINE_END diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c deleted file mode 100644 index 249ca9e57..000000000 --- a/arch/arm/mach-ep93xx/edb9315.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * arch/arm/mach-ep93xx/edb9315.c - * Cirrus Logic EDB9315 support. - * - * Copyright (C) 2006 Lennert Buytenhek - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static struct physmap_flash_data edb9315_flash_data = { - .width = 4, -}; - -static struct resource edb9315_flash_resource = { - .start = 0x60000000, - .end = 0x61ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device edb9315_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &edb9315_flash_data, - }, - .num_resources = 1, - .resource = &edb9315_flash_resource, -}; - -static void __init edb9315_init_machine(void) -{ - ep93xx_init_devices(); - platform_device_register(&edb9315_flash); -} - -MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") - /* Maintainer: Lennert Buytenhek */ - .phys_io = EP93XX_APB_PHYS_BASE, - .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, - .boot_params = 0x00000100, - .map_io = ep93xx_map_io, - .init_irq = ep93xx_init_irq, - .timer = &ep93xx_timer, - .init_machine = edb9315_init_machine, -MACHINE_END diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c deleted file mode 100644 index e03407e72..000000000 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * arch/arm/mach-ep93xx/edb9315a.c - * Cirrus Logic EDB9315A support. - * - * Copyright (C) 2006 Lennert Buytenhek - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static struct physmap_flash_data edb9315a_flash_data = { - .width = 2, -}; - -static struct resource edb9315a_flash_resource = { - .start = 0x60000000, - .end = 0x60ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device edb9315a_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &edb9315a_flash_data, - }, - .num_resources = 1, - .resource = &edb9315a_flash_resource, -}; - -static void __init edb9315a_init_machine(void) -{ - ep93xx_init_devices(); - platform_device_register(&edb9315a_flash); -} - -MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") - /* Maintainer: Lennert Buytenhek */ - .phys_io = EP93XX_APB_PHYS_BASE, - .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, - .boot_params = 0xc0000100, - .map_io = ep93xx_map_io, - .init_irq = ep93xx_init_irq, - .timer = &ep93xx_timer, - .init_machine = edb9315a_init_machine, -MACHINE_END diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index e760fd4f3..d18fcb1a2 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c @@ -10,43 +10,22 @@ * your option) any later version. */ +#include #include #include #include #include #include -#include #include -#include #include #include #include #include -static struct physmap_flash_data gesbc9312_flash_data = { - .width = 4, -}; - -static struct resource gesbc9312_flash_resource = { - .start = 0x60000000, - .end = 0x607fffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device gesbc9312_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &gesbc9312_flash_data, - }, - .num_resources = 1, - .resource = &gesbc9312_flash_resource, -}; - static void __init gesbc9312_init_machine(void) { ep93xx_init_devices(); - platform_device_register(&gesbc9312_flash); + physmap_configure(0x60000000, 0x00800000, 4, NULL); } MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index df315f2e9..e24566b88 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -10,12 +10,12 @@ * your option) any later version. */ +#include #include #include #include #include #include -#include #include #include #include @@ -111,26 +111,6 @@ static void __init ts72xx_map_io(void) } } -static struct physmap_flash_data ts72xx_flash_data = { - .width = 1, -}; - -static struct resource ts72xx_flash_resource = { - .start = TS72XX_NOR_PHYS_BASE, - .end = TS72XX_NOR_PHYS_BASE + 0x00ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device ts72xx_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &ts72xx_flash_data, - }, - .num_resources = 1, - .resource = &ts72xx_flash_resource, -}; - static unsigned char ts72xx_rtc_readbyte(unsigned long addr) { __raw_writeb(addr, TS72XX_RTC_INDEX_VIRT_BASE); @@ -161,7 +141,7 @@ static void __init ts72xx_init_machine(void) { ep93xx_init_devices(); if (board_is_ts7200()) - platform_device_register(&ts72xx_flash); + physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL); platform_device_register(&ts72xx_rtc_device); } diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index ef6ccc899..5b64d5c5b 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index af900f475..bbe6e4a0b 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 2af610811..14a62d600 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c @@ -6,7 +6,6 @@ */ #include #include -#include #include @@ -44,7 +43,7 @@ timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction footbridge_timer_irq = { .name = "Timer1 timer tick", .handler = timer1_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; /* diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 823e25d45..5dace2597 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c @@ -35,6 +35,7 @@ extern int setup_arm_irq(int, struct irqaction *); extern void pcibios_report_status(u_int status_mask, int warn); +extern void register_isa_ports(unsigned int, unsigned int, unsigned int); static unsigned long dc21285_base_address(struct pci_bus *bus, unsigned int devfn) @@ -331,15 +332,15 @@ void __init dc21285_preinit(void) /* * We don't care if these fail. */ - request_irq(IRQ_PCI_SERR, dc21285_serr_irq, IRQF_DISABLED, + request_irq(IRQ_PCI_SERR, dc21285_serr_irq, SA_INTERRUPT, "PCI system error", &serr_timer); - request_irq(IRQ_PCI_PERR, dc21285_parity_irq, IRQF_DISABLED, + request_irq(IRQ_PCI_PERR, dc21285_parity_irq, SA_INTERRUPT, "PCI parity error", &perr_timer); - request_irq(IRQ_PCI_ABORT, dc21285_abort_irq, IRQF_DISABLED, + request_irq(IRQ_PCI_ABORT, dc21285_abort_irq, SA_INTERRUPT, "PCI abort", NULL); - request_irq(IRQ_DISCARD_TIMER, dc21285_discard_irq, IRQF_DISABLED, + request_irq(IRQ_DISCARD_TIMER, dc21285_discard_irq, SA_INTERRUPT, "Discard timer", NULL); - request_irq(IRQ_PCI_DPERR, dc21285_dparity_irq, IRQF_DISABLED, + request_irq(IRQ_PCI_DPERR, dc21285_dparity_irq, SA_INTERRUPT, "PCI data parity", NULL); if (cfn_mode) { diff --git a/arch/arm/mach-footbridge/dma.c b/arch/arm/mach-footbridge/dma.c index 1f9b09b8e..7a54578b5 100644 --- a/arch/arm/mach-footbridge/dma.c +++ b/arch/arm/mach-footbridge/dma.c @@ -10,6 +10,7 @@ * 17-Mar-1999 RMK Allow any EBSA285-like architecture to have * ISA DMA controllers. */ +#include #include #include diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c index a64e22226..2c7c36304 100644 --- a/arch/arm/mach-footbridge/ebsa285-leds.c +++ b/arch/arm/mach-footbridge/ebsa285-leds.c @@ -16,6 +16,7 @@ * Changelog: * 02-05-1999 RMK Various cleanups */ +#include #include #include #include diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index 87448c2d6..e1c43b331 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c @@ -98,22 +98,9 @@ isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) desc_handle_irq(isa_irq, desc, regs); } -static struct irqaction irq_cascade = { - .handler = no_action, - .name = "cascade", -}; - -static struct resource pic1_resource = { - .name = "pic1", - .start = 0x20, - .end = 0x3f, -}; - -static struct resource pic2_resource = { - .name = "pic2", - .start = 0xa0, - .end = 0xbf, -}; +static struct irqaction irq_cascade = { .handler = no_action, .name = "cascade", }; +static struct resource pic1_resource = { "pic1", 0x20, 0x3f }; +static struct resource pic2_resource = { "pic2", 0xa0, 0xbf }; void __init isa_init_irq(unsigned int host_irq) { diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c index c4810a40c..c1d74f7ab 100644 --- a/arch/arm/mach-footbridge/isa-timer.c +++ b/arch/arm/mach-footbridge/isa-timer.c @@ -6,7 +6,6 @@ */ #include #include -#include #include #include @@ -73,7 +72,7 @@ isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction isa_timer_irq = { .name = "ISA timer tick", .handler = isa_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; static void __init isa_timer_init(void) diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index a1f381c64..229bf0585 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c @@ -5,6 +5,7 @@ * * Copyright (C) 1998, 1999 Russell King, Phil Blundell */ +#include #include #include #include diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c index 8e9cac5a2..7451fc07b 100644 --- a/arch/arm/mach-footbridge/netwinder-leds.c +++ b/arch/arm/mach-footbridge/netwinder-leds.c @@ -16,6 +16,7 @@ * Changelog: * 02-05-1999 RMK Various cleanups */ +#include #include #include #include diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c index a9a8255a3..af9e4a5d5 100644 --- a/arch/arm/mach-h720x/cpu-h7201.c +++ b/arch/arm/mach-h720x/cpu-h7201.c @@ -41,7 +41,7 @@ h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction h7201_timer_irq = { .name = "h7201 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = h7201_timer_interrupt, }; diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index da678d163..a4a7c0125 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c @@ -171,7 +171,7 @@ static struct irqchip h7202_timerx_chip = { static struct irqaction h7202_timer_irq = { .name = "h7202 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = h7202_timer_interrupt, }; diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c index 407cd4c0a..193f968ed 100644 --- a/arch/arm/mach-h720x/h7201-eval.c +++ b/arch/arm/mach-h720x/h7201-eval.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c index bf2acdce6..362668969 100644 --- a/arch/arm/mach-h720x/h7202-eval.c +++ b/arch/arm/mach-h720x/h7202-eval.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c index 36578871e..4ca51dcf1 100644 --- a/arch/arm/mach-imx/dma.c +++ b/arch/arm/mach-imx/dma.c @@ -15,9 +15,6 @@ * Changed to support scatter gather DMA * by taking Russell's code from RiscPC * - * 2006-05-31 Pavel Pisa - * Corrected error handling code. - * */ #undef DEBUG @@ -280,7 +277,7 @@ imx_dma_setup_sg(imx_dmach_t dma_ch, int imx_dma_setup_handlers(imx_dmach_t dma_ch, void (*irq_handler) (int, void *, struct pt_regs *), - void (*err_handler) (int, void *, struct pt_regs *, int), + void (*err_handler) (int, void *, struct pt_regs *), void *data) { struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; @@ -466,53 +463,43 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) int i, disr = DISR; struct imx_dma_channel *channel; unsigned int err_mask = DBTOSR | DRTOSR | DSESR | DBOSR; - int errcode; - DISR = disr & err_mask; + DISR = disr; for (i = 0; i < IMX_DMA_CHANNELS; i++) { - if(!(err_mask & (1 << i))) - continue; channel = &imx_dma_channels[i]; - errcode = 0; + + if ((err_mask & 1 << i) && channel->name + && channel->err_handler) { + channel->err_handler(i, channel->data, regs); + continue; + } + + imx_dma_channels[i].sg = NULL; if (DBTOSR & (1 << i)) { - DBTOSR = (1 << i); - errcode |= IMX_DMA_ERR_BURST; + printk(KERN_WARNING + "Burst timeout on channel %d (%s)\n", + i, channel->name); + DBTOSR |= (1 << i); } if (DRTOSR & (1 << i)) { - DRTOSR = (1 << i); - errcode |= IMX_DMA_ERR_REQUEST; + printk(KERN_WARNING + "Request timeout on channel %d (%s)\n", + i, channel->name); + DRTOSR |= (1 << i); } if (DSESR & (1 << i)) { - DSESR = (1 << i); - errcode |= IMX_DMA_ERR_TRANSFER; + printk(KERN_WARNING + "Transfer timeout on channel %d (%s)\n", + i, channel->name); + DSESR |= (1 << i); } if (DBOSR & (1 << i)) { - DBOSR = (1 << i); - errcode |= IMX_DMA_ERR_BUFFER; + printk(KERN_WARNING + "Buffer overflow timeout on channel %d (%s)\n", + i, channel->name); + DBOSR |= (1 << i); } - - /* - * The cleaning of @sg field would be questionable - * there, because its value can help to compute - * remaining/transfered bytes count in the handler - */ - /*imx_dma_channels[i].sg = NULL;*/ - - if (channel->name && channel->err_handler) { - channel->err_handler(i, channel->data, regs, errcode); - continue; - } - - imx_dma_channels[i].sg = NULL; - - printk(KERN_WARNING - "DMA timeout on channel %d (%s) -%s%s%s%s\n", - i, channel->name, - errcode&IMX_DMA_ERR_BURST? " burst":"", - errcode&IMX_DMA_ERR_REQUEST? " request":"", - errcode&IMX_DMA_ERR_TRANSFER? " transfer":"", - errcode&IMX_DMA_ERR_BUFFER? " buffer":""); } return IRQ_HANDLED; } diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c index 2688bd82c..a5de5f1da 100644 --- a/arch/arm/mach-imx/irq.c +++ b/arch/arm/mach-imx/irq.c @@ -204,15 +204,13 @@ imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc, imx_gpio_handler(mask, irq, desc, regs); } -static struct irq_chip imx_internal_chip = { - .name = "MPU", +static struct irqchip imx_internal_chip = { .ack = imx_mask_irq, .mask = imx_mask_irq, .unmask = imx_unmask_irq, }; -static struct irq_chip imx_gpio_chip = { - .name = "GPIO", +static struct irqchip imx_gpio_chip = { .ack = imx_gpio_ack_irq, .mask = imx_gpio_mask_irq, .unmask = imx_gpio_unmask_irq, diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 6ed7523c6..ea805bfa5 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -8,11 +8,11 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include #include -#include #include #include @@ -72,7 +72,7 @@ imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction imx_timer_irq = { .name = "i.MX Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = imx_timer_interrupt, }; diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 42021fdfa..576a5e979 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -282,7 +281,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction integrator_timer_irq = { .name = "Integrator Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = integrator_timer_interrupt, }; diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 191c57a3b..6d65c96eb 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -161,8 +161,7 @@ static void sc_unmask_irq(unsigned int irq) writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); } -static struct irq_chip sc_chip = { - .name = "SC", +static struct irqchip sc_chip = { .ack = sc_mask_irq, .mask = sc_mask_irq, .unmask = sc_unmask_irq, diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 678b6ba2b..9f55f5ae1 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -156,8 +156,7 @@ static void cic_unmask_irq(unsigned int irq) cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_SET); } -static struct irq_chip cic_chip = { - .name = "CIC", +static struct irqchip cic_chip = { .ack = cic_mask_irq, .mask = cic_mask_irq, .unmask = cic_unmask_irq, @@ -175,8 +174,7 @@ static void pic_unmask_irq(unsigned int irq) pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_SET); } -static struct irq_chip pic_chip = { - .name = "PIC", +static struct irqchip pic_chip = { .ack = pic_mask_irq, .mask = pic_mask_irq, .unmask = pic_unmask_irq, @@ -194,8 +192,7 @@ static void sic_unmask_irq(unsigned int irq) sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_SET); } -static struct irq_chip sic_chip = { - .name = "SIC", +static struct irqchip sic_chip = { .ack = sic_mask_irq, .mask = sic_mask_irq, .unmask = sic_unmask_irq, diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 4418f6d75..229a63a52 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -20,6 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -600,6 +601,4 @@ void __init pci_v3_postinit(void) printk(KERN_ERR "PCI: unable to grab local bus timeout " "interrupt: %d\n", ret); #endif - - register_isa_ports(PHYS_PCI_MEM_BASE, PHYS_PCI_IO_BASE, 0); } diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c index ee49cf790..bc07f52a6 100644 --- a/arch/arm/mach-integrator/time.c +++ b/arch/arm/mach-integrator/time.c @@ -125,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id) xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); - ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED, + ret = request_irq(dev->irq[0], arm_rtc_interrupt, SA_INTERRUPT, "rtc-pl030", dev); if (ret) goto map_out; diff --git a/arch/arm/mach-iop3xx/Kconfig b/arch/arm/mach-iop3xx/Kconfig index 4422f2388..2bfe8c729 100644 --- a/arch/arm/mach-iop3xx/Kconfig +++ b/arch/arm/mach-iop3xx/Kconfig @@ -30,15 +30,12 @@ config MACH_IQ80332 select ARCH_IOP331 help Say Y here if you want to run your kernel on the Intel IQ80332 - evaluation kit for the IOP332 chipset. + evaluation kit for the IOP332 chipset config ARCH_EP80219 - bool "Enable support for EP80219" - select ARCH_IOP321 - select ARCH_IQ31244 - help - Say Y here if you want to run your kernel on the Intel EP80219 - evaluation kit for the Intel 80219 chipset (a IOP321 variant). + bool "Enable support for EP80219" + select ARCH_IOP321 + select ARCH_IQ31244 # Which IOP variant are we running? config ARCH_IOP321 @@ -59,8 +56,8 @@ config IOP331_STEPD bool "Chip stepping D of the IOP80331 processor or IOP80333" depends on (ARCH_IOP331) help - Say Y here if you have StepD of the IOP80331 or IOP8033 - based platforms. + Say Y here if you have StepD of the IOP80331 or IOP8033 + based platforms. endmenu endif diff --git a/arch/arm/mach-iop3xx/common.c b/arch/arm/mach-iop3xx/common.c index d7f50e57e..fdeeef489 100644 --- a/arch/arm/mach-iop3xx/common.c +++ b/arch/arm/mach-iop3xx/common.c @@ -12,6 +12,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include diff --git a/arch/arm/mach-iop3xx/iop321-irq.c b/arch/arm/mach-iop3xx/iop321-irq.c index 88ac33347..d42aae6ae 100644 --- a/arch/arm/mach-iop3xx/iop321-irq.c +++ b/arch/arm/mach-iop3xx/iop321-irq.c @@ -52,8 +52,7 @@ iop321_irq_unmask (unsigned int irq) intctl_write(iop321_mask); } -struct irq_chip ext_chip = { - .name = "IOP", +struct irqchip ext_chip = { .ack = iop321_irq_mask, .mask = iop321_irq_mask, .unmask = iop321_irq_unmask, diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c index b6d096903..0ebbcb20c 100644 --- a/arch/arm/mach-iop3xx/iop321-setup.c +++ b/arch/arm/mach-iop3xx/iop321-setup.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c index 04b1a6f7e..d67ac0e5d 100644 --- a/arch/arm/mach-iop3xx/iop321-time.c +++ b/arch/arm/mach-iop3xx/iop321-time.c @@ -85,7 +85,7 @@ iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction iop321_timer_irq = { .name = "IOP321 Timer Tick", .handler = iop321_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; static void __init iop321_timer_init(void) diff --git a/arch/arm/mach-iop3xx/iop331-irq.c b/arch/arm/mach-iop3xx/iop331-irq.c index cab11722c..f4d432173 100644 --- a/arch/arm/mach-iop3xx/iop331-irq.c +++ b/arch/arm/mach-iop3xx/iop331-irq.c @@ -77,15 +77,13 @@ iop331_irq_unmask2(unsigned int irq) intctl_write1(iop331_mask1); } -struct irq_chip iop331_irqchip1 = { - .name = "IOP-1", +struct irqchip iop331_irqchip1 = { .ack = iop331_irq_mask1, .mask = iop331_irq_mask1, .unmask = iop331_irq_unmask1, }; -struct irq_chip iop331_irqchip2 = { - .name = "IOP-2", +struct irqchip iop331_irqchip2 = { .ack = iop331_irq_mask2, .mask = iop331_irq_mask2, .unmask = iop331_irq_unmask2, diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c index 3cc98d892..7b7b6eea3 100644 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ b/arch/arm/mach-iop3xx/iop331-setup.c @@ -11,6 +11,7 @@ */ #include #include +#include #include #include #include diff --git a/arch/arm/mach-iop3xx/iop331-time.c b/arch/arm/mach-iop3xx/iop331-time.c index 0c09e74c5..3c1f0ebbd 100644 --- a/arch/arm/mach-iop3xx/iop331-time.c +++ b/arch/arm/mach-iop3xx/iop331-time.c @@ -82,7 +82,7 @@ iop331_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction iop331_timer_irq = { .name = "IOP331 Timer Tick", .handler = iop331_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; static void __init iop331_timer_init(void) diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 7f91f689a..6e8d504ac 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -14,12 +14,12 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include #include #include -#include #include #include #include @@ -211,8 +211,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* clear timer 1 */ ixp2000_reg_wrb(IXP2000_T1_CLR, 1); - while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) - >= ticks_per_jiffy) { + while ((next_jiffy_time - *missing_jiffy_timer_csr) > ticks_per_jiffy) { timer_tick(regs); next_jiffy_time -= ticks_per_jiffy; } @@ -224,7 +223,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction ixp2000_timer_irq = { .name = "IXP2000 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = ixp2000_timer_interrupt, }; @@ -302,7 +301,6 @@ void gpio_line_config(int line, int direction) } local_irq_restore(flags); } -EXPORT_SYMBOL(gpio_line_config); /************************************************************************* @@ -409,7 +407,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, str for(i = 31; i >= 0; i--) { if(status & (1 << i)) { desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i; - desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs); + desc->handle(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs); } } } diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index ac29298c5..52fac89e9 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c @@ -18,6 +18,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index a6f148018..091012712 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c @@ -14,6 +14,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index 91d36d91d..076e3f8ac 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c @@ -14,6 +14,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 40eef8b36..d628da56b 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c @@ -14,6 +14,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -167,7 +168,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long } /* Hook into PCI interrupt */ - set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler); + set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x00_irq_handler); } /************************************************************************* diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 7f42366f6..66915282a 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c @@ -15,6 +15,7 @@ * option) any later version. */ +#include #include #include #include @@ -127,7 +128,7 @@ void __init ixdp2x01_init_irq(void) } /* Hook into PCI interrupts */ - set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler); + set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x01_irq_handler); } diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index 566a07821..affd1d5d7 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c @@ -14,6 +14,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -271,7 +272,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs * } int_desc = irq_desc + irqno; - desc_handle_irq(irqno, int_desc, regs); + int_desc->handle(irqno, int_desc, regs); desc->chip->unmask(irq); } @@ -333,7 +334,7 @@ void __init ixp23xx_init_irq(void) /************************************************************************* * Timer-tick functions for IXP23xx *************************************************************************/ -#define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC) +#define CLOCK_TICKS_PER_USEC CLOCK_TICK_RATE / (USEC_PER_SEC) static unsigned long next_jiffy_time; @@ -352,7 +353,7 @@ ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { /* Clear Pending Interrupt by writing '1' to it */ *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; - while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { + while ((*IXP23XX_TIMER_CONT - next_jiffy_time) > LATCH) { timer_tick(regs); next_jiffy_time += LATCH; } @@ -363,7 +364,7 @@ ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction ixp23xx_timer_irq = { .name = "IXP23xx Timer Tick", .handler = ixp23xx_timer_interrupt, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; void __init ixp23xx_init_timer(void) @@ -438,6 +439,5 @@ static struct platform_device *ixp23xx_devices[] __initdata = { void __init ixp23xx_sys_init(void) { - *IXP23XX_EXP_UNIT_FUSE |= 0xf; platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices)); } diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c index 7a85ced56..bf688c128 100644 --- a/arch/arm/mach-ixp23xx/espresso.c +++ b/arch/arm/mach-ixp23xx/espresso.c @@ -10,6 +10,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -52,29 +53,9 @@ static int __init espresso_pci_init(void) }; subsys_initcall(espresso_pci_init); -static struct physmap_flash_data espresso_flash_data = { - .width = 2, -}; - -static struct resource espresso_flash_resource = { - .start = 0x90000000, - .end = 0x91ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device espresso_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &espresso_flash_data, - }, - .num_resources = 1, - .resource = &espresso_flash_resource, -}; - static void __init espresso_init(void) { - platform_device_register(&espresso_flash); + physmap_configure(0x90000000, 0x02000000, 2, NULL); /* * Mark flash as writeable. diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 37a32e6bc..00146c35d 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c @@ -14,12 +14,12 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include #include #include -#include #include #include #include @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -74,7 +75,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct int cpld_irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + cpld_desc->handle(cpld_irq, cpld_desc, regs); } } @@ -111,7 +112,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct int cpld_irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); cpld_desc = irq_desc + cpld_irq; - desc_handle_irq(cpld_irq, cpld_desc, regs); + cpld_desc->handle(cpld_irq, cpld_desc, regs); } } @@ -158,8 +159,8 @@ void ixdp2351_init_irq(void) } } - set_irq_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler); - set_irq_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler); + set_irq_chained_handler(IRQ_IXP23XX_INTA, &ixdp2351_inta_handler); + set_irq_chained_handler(IRQ_IXP23XX_INTB, &ixdp2351_intb_handler); } /* @@ -297,29 +298,9 @@ static void __init ixdp2351_map_io(void) iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc)); } -static struct physmap_flash_data ixdp2351_flash_data = { - .width = 1, -}; - -static struct resource ixdp2351_flash_resource = { - .start = 0x90000000, - .end = 0x93ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device ixdp2351_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &ixdp2351_flash_data, - }, - .num_resources = 1, - .resource = &ixdp2351_flash_resource, -}; - static void __init ixdp2351_init(void) { - platform_device_register(&ixdp2351_flash); + physmap_configure(0x90000000, 0x04000000, 1, NULL); /* * Mark flash as writeable diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index 3b34fa35e..ac72f94c5 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c @@ -16,6 +16,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index d06e21b70..43c14e740 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c @@ -14,6 +14,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -136,29 +137,9 @@ static int __init roadrunner_pci_init(void) subsys_initcall(roadrunner_pci_init); -static struct physmap_flash_data roadrunner_flash_data = { - .width = 2, -}; - -static struct resource roadrunner_flash_resource = { - .start = 0x90000000, - .end = 0x93ffffff, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device roadrunner_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &roadrunner_flash_data, - }, - .num_resources = 1, - .resource = &roadrunner_flash_resource, -}; - static void __init roadrunner_init(void) { - platform_device_register(&roadrunner_flash); + physmap_configure(0x90000000, 0x04000000, 2, NULL); /* * Mark flash as writeable diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index 57f23b465..3b23f43cb 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig @@ -35,6 +35,7 @@ config ARCH_ADI_COYOTE config ARCH_IXDP425 bool "IXDP425" + select PCI help Say 'Y' here if you want your kernel to support Intel's IXDP425 Development Platform (Also known as Richfield). @@ -42,6 +43,7 @@ config ARCH_IXDP425 config MACH_IXDPG425 bool "IXDPG425" + select PCI help Say 'Y' here if you want your kernel to support Intel's IXDPG425 Development Platform (Also known as Montajade). @@ -49,6 +51,7 @@ config MACH_IXDPG425 config MACH_IXDP465 bool "IXDP465" + select PCI help Say 'Y' here if you want your kernel to support Intel's IXDP465 Development Platform (Also known as BMP). diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile index 640315d8b..5a4aaa0e0 100644 --- a/arch/arm/mach-ixp4xx/Makefile +++ b/arch/arm/mach-ixp4xx/Makefile @@ -2,23 +2,13 @@ # Makefile for the linux kernel. # -obj-pci-y := -obj-pci-n := - -obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o -obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o -obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o -obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o -obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o -obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o - obj-y += common.o -obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o -obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o -obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o -obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o -obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o -obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o +obj-$(CONFIG_PCI) += common-pci.o +obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o ixdp425-setup.o +obj-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o coyote-setup.o +obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o coyote-setup.o +obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o +obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o +obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o -obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 9562177b5..2d40fe114 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c @@ -532,6 +532,8 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) return -EIO; } +EXPORT_SYMBOL(pci_set_dma_mask); +EXPORT_SYMBOL(pci_set_consistent_dma_mask); EXPORT_SYMBOL(ixp4xx_pci_read); EXPORT_SYMBOL(ixp4xx_pci_write); diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 7c25dbd5a..00b761ff0 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -13,6 +13,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -275,7 +276,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs /* * Catch up with the real idea of time */ - while ((signed long)(*IXP4XX_OSTS - last_jiffy_time) >= LATCH) { + while ((*IXP4XX_OSTS - last_jiffy_time) > LATCH) { timer_tick(regs); last_jiffy_time += LATCH; } @@ -287,7 +288,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs static struct irqaction ixp4xx_timer_irq = { .name = "IXP4xx Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = ixp4xx_timer_interrupt, }; diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 2cebb2878..e6b7fcd92 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c index 30f1300e0..654e2eed8 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -107,9 +107,9 @@ static struct flash_platform_data gtwx5715_flash_data = { .width = 2, }; -static struct resource gtwx5715_flash_resource = { +static struct gtw5715_flash_resource = { .flags = IORESOURCE_MEM, -}; +} static struct platform_device gtwx5715_flash = { .name = "IXP4XX-Flash", @@ -130,6 +130,9 @@ static void __init gtwx5715_init(void) { ixp4xx_sys_init(); + if (!flash_resource) + printk(KERN_ERR "Could not allocate flash resource\n"); + gtwx5715_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); gtwx5715_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_8M - 1; diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index d5156c043..da415d5d7 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c @@ -15,9 +15,9 @@ */ #include +#include #include #include -#include #include #include diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index ed5270800..526fb6175 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c @@ -16,10 +16,10 @@ #include #include #include -#include #include #include +#include #include diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index b8ebaf4a9..26b7c001f 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c @@ -15,9 +15,9 @@ * */ +#include #include #include -#include #include #include diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c index 81ffcae1f..99d333d7e 100644 --- a/arch/arm/mach-ixp4xx/nas100d-power.c +++ b/arch/arm/mach-ixp4xx/nas100d-power.c @@ -17,13 +17,14 @@ * */ -#include -#include #include #include +#include #include +extern void ctrl_alt_del(void); + static irqreturn_t nas100d_reset_handler(int irq, void *dev_id, struct pt_regs *regs) { /* Signal init to do the ctrlaltdel action, this will bypass init if @@ -42,7 +43,7 @@ static int __init nas100d_power_init(void) set_irq_type(NAS100D_RB_IRQ, IRQT_LOW); if (request_irq(NAS100D_RB_IRQ, &nas100d_reset_handler, - IRQF_DISABLED, "NAS100D reset button", NULL) < 0) { + SA_INTERRUPT, "NAS100D reset button", NULL) < 0) { printk(KERN_DEBUG "Reset Button IRQ %d not available\n", NAS100D_RB_IRQ); diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 9a31444d9..a3b4c6ac5 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -38,36 +37,6 @@ static struct platform_device nas100d_flash = { .resource = &nas100d_flash_resource, }; -#ifdef CONFIG_LEDS_IXP4XX -static struct resource nas100d_led_resources[] = { - { - .name = "wlan", /* green led */ - .start = 0, - .end = 0, - .flags = IXP4XX_GPIO_LOW, - }, - { - .name = "ready", /* blue power led (off is flashing!) */ - .start = 15, - .end = 15, - .flags = IXP4XX_GPIO_LOW, - }, - { - .name = "disk", /* yellow led */ - .start = 3, - .end = 3, - .flags = IXP4XX_GPIO_LOW, - }, -}; - -static struct platform_device nas100d_leds = { - .name = "IXP4XX-GPIO-LED", - .id = -1, - .num_resources = ARRAY_SIZE(nas100d_led_resources), - .resource = nas100d_led_resources, -}; -#endif - static struct ixp4xx_i2c_pins nas100d_i2c_gpio_pins = { .sda_pin = NAS100D_SDA_PIN, .scl_pin = NAS100D_SCL_PIN, @@ -126,9 +95,7 @@ static struct platform_device nas100d_uart = { static struct platform_device *nas100d_devices[] __initdata = { &nas100d_i2c_controller, &nas100d_flash, -#ifdef CONFIG_LEDS_IXP4XX - &nas100d_leds, -#endif + &nas100d_uart, }; static void nas100d_power_off(void) @@ -155,12 +122,6 @@ static void __init nas100d_init(void) pm_power_off = nas100d_power_off; - /* This is only useful on a modified machine, but it is valuable - * to have it first in order to see debug messages, and so that - * it does *not* get removed if platform_add_devices fails! - */ - (void)platform_device_register(&nas100d_uart); - platform_add_devices(nas100d_devices, ARRAY_SIZE(nas100d_devices)); } diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 04661fef9..ece860444 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c @@ -15,9 +15,9 @@ * */ +#include #include #include -#include #include #include diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index a29b3b2b6..d80c362bc 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c @@ -19,12 +19,12 @@ #include #include -#include #include -#include #include +extern void ctrl_alt_del(void); + static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs) { /* Signal init to do the ctrlaltdel action, this will bypass init if @@ -55,7 +55,7 @@ static int __init nslu2_power_init(void) set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH); if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler, - IRQF_DISABLED, "NSLU2 reset button", NULL) < 0) { + SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) { printk(KERN_DEBUG "Reset Button IRQ %d not available\n", NSLU2_RB_IRQ); @@ -64,7 +64,7 @@ static int __init nslu2_power_init(void) } if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler, - IRQF_DISABLED, "NSLU2 power button", NULL) < 0) { + SA_INTERRUPT, "NSLU2 power button", NULL) < 0) { printk(KERN_DEBUG "Power Button IRQ %d not available\n", NSLU2_PB_IRQ); diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 749a33749..55411f21d 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c @@ -7,7 +7,6 @@ * Copyright (C) 2003-2004 MontaVista Software, Inc. * * Author: Mark Rakes - * Author: Rod Whitby * Maintainers: http://www.nslu2-linux.org/ * * Fixed missing init_time in MACHINE_START kas11 10/22/04 @@ -17,7 +16,6 @@ #include #include #include -#include #include #include @@ -45,42 +43,6 @@ static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = { .scl_pin = NSLU2_SCL_PIN, }; -#ifdef CONFIG_LEDS_IXP4XX -static struct resource nslu2_led_resources[] = { - { - .name = "ready", /* green led */ - .start = NSLU2_LED_GRN, - .end = NSLU2_LED_GRN, - .flags = IXP4XX_GPIO_HIGH, - }, - { - .name = "status", /* red led */ - .start = NSLU2_LED_RED, - .end = NSLU2_LED_RED, - .flags = IXP4XX_GPIO_HIGH, - }, - { - .name = "disk-1", - .start = NSLU2_LED_DISK1, - .end = NSLU2_LED_DISK1, - .flags = IXP4XX_GPIO_LOW, - }, - { - .name = "disk-2", - .start = NSLU2_LED_DISK2, - .end = NSLU2_LED_DISK2, - .flags = IXP4XX_GPIO_LOW, - }, -}; - -static struct platform_device nslu2_leds = { - .name = "IXP4XX-GPIO-LED", - .id = -1, - .num_resources = ARRAY_SIZE(nslu2_led_resources), - .resource = nslu2_led_resources, -}; -#endif - static struct platform_device nslu2_i2c_controller = { .name = "IXP4XX-I2C", .id = 0, @@ -140,10 +102,8 @@ static struct platform_device nslu2_uart = { static struct platform_device *nslu2_devices[] __initdata = { &nslu2_i2c_controller, &nslu2_flash, + &nslu2_uart, &nslu2_beeper, -#ifdef CONFIG_LEDS_IXP4XX - &nslu2_leds, -#endif }; static void nslu2_power_off(void) @@ -167,12 +127,6 @@ static void __init nslu2_init(void) pm_power_off = nslu2_power_off; - /* This is only useful on a modified machine, but it is valuable - * to have it first in order to see debug messages, and so that - * it does *not* get removed if platform_add_devices fails! - */ - (void)platform_device_register(&nslu2_uart); - platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); } diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c index b7af5640e..ac626436e 100644 --- a/arch/arm/mach-l7200/core.c +++ b/arch/arm/mach-l7200/core.c @@ -7,7 +7,6 @@ */ #include #include -#include #include #include diff --git a/arch/arm/mach-lh7a40x/Kconfig b/arch/arm/mach-lh7a40x/Kconfig index 558a34f53..8a17867a6 100644 --- a/arch/arm/mach-lh7a40x/Kconfig +++ b/arch/arm/mach-lh7a40x/Kconfig @@ -14,7 +14,6 @@ config MACH_LPD7A400 bool "LPD7A400 Card Engine" select ARCH_LH7A400 # select IDE_POLL - select HAS_TOUCHSCREEN_ADS7843_LH7 help Say Y here if you are using Logic Product Development's LPD7A400 CardEngine. For the time being, the LPD7A400 and @@ -24,7 +23,6 @@ config MACH_LPD7A404 bool "LPD7A404 Card Engine" select ARCH_LH7A404 # select IDE_POLL - select HAS_TOUCHSCREEN_ADC_LH7 help Say Y here if you are using Logic Product Development's LPD7A404 CardEngine. For the time being, the LPD7A400 and @@ -36,9 +34,6 @@ config ARCH_LH7A400 config ARCH_LH7A404 bool -config LPD7A40X_CPLD_SSP - bool - config LH7A40X_CONTIGMEM bool "Disable NUMA Support" depends on ARCH_LH7A40X diff --git a/arch/arm/mach-lh7a40x/Makefile b/arch/arm/mach-lh7a40x/Makefile index 94b8615fb..e90512dbc 100644 --- a/arch/arm/mach-lh7a40x/Makefile +++ b/arch/arm/mach-lh7a40x/Makefile @@ -4,14 +4,11 @@ # Object file lists. -obj-y := time.o clocks.o -obj-m := -obj-n := -obj- := - -obj-$(CONFIG_MACH_KEV7A400) += arch-kev7a400.o irq-lh7a400.o -obj-$(CONFIG_MACH_LPD7A400) += arch-lpd7a40x.o irq-lh7a400.o -obj-$(CONFIG_MACH_LPD7A404) += arch-lpd7a40x.o irq-lh7a404.o -obj-$(CONFIG_LPD7A40X_CPLD_SSP) += ssp-cpld.o -obj-$(CONFIG_FB_ARMCLCD) += clcd.o - +obj-y := time.o +obj-$(CONFIG_MACH_KEV7A400) += arch-kev7a400.o irq-lh7a400.o +obj-$(CONFIG_MACH_LPD7A400) += arch-lpd7a40x.o irq-lh7a400.o +obj-$(CONFIG_MACH_LPD7A404) += arch-lpd7a40x.o irq-lh7a404.o + +obj-m := +obj-n := +obj- := diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c index 4f2ab4880..2cccc27c6 100644 --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c @@ -63,8 +63,7 @@ static void kev7a400_unmask_cpld_irq (u32 irq) CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; } -static struct irq_chip kev7a400_cpld_chip = { - .name = "CPLD", +static struct irqchip kev7a400_cpld_chip = { .ack = kev7a400_ack_cpld_irq, .mask = kev7a400_mask_cpld_irq, .unmask = kev7a400_unmask_cpld_irq, diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index a6910114b..12e23277c 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -24,28 +23,6 @@ #include "common.h" -#define CPLD_INT_NETHERNET (1<<0) -#define CPLD_INTMASK_ETHERNET (1<<2) -#if defined (CONFIG_MACH_LPD7A400) -# define CPLD_INT_NTOUCH (1<<1) -# define CPLD_INTMASK_TOUCH (1<<3) -# define CPLD_INT_PEN (1<<4) -# define CPLD_INTMASK_PEN (1<<4) -# define CPLD_INT_PIRQ (1<<4) -#endif -#define CPLD_INTMASK_CPLD (1<<7) -#define CPLD_INT_CPLD (1<<6) - -#define CPLD_CONTROL_SWINT (1<<7) /* Disable all CPLD IRQs */ -#define CPLD_CONTROL_OCMSK (1<<6) /* Mask USB1 connect IRQ */ -#define CPLD_CONTROL_PDRV (1<<5) /* PCC_nDRV high */ -#define CPLD_CONTROL_USB1C (1<<4) /* USB1 connect IRQ active */ -#define CPLD_CONTROL_USB1P (1<<3) /* USB1 power disable */ -#define CPLD_CONTROL_AWKP (1<<2) /* Auto-wakeup disabled */ -#define CPLD_CONTROL_LCD_ENABLE (1<<1) /* LCD Vee enable */ -#define CPLD_CONTROL_WRLAN_NENABLE (1<<0) /* SMC91x power disable */ - - static struct resource smc91x_resources[] = { [0] = { .start = CPLD00_PHYS, @@ -71,12 +48,12 @@ static struct platform_device smc91x_device = { static struct resource lh7a40x_usbclient_resources[] = { [0] = { .start = USB_PHYS, - .end = (USB_PHYS + PAGE_SIZE), + .end = (USB_PHYS + 0xFF), .flags = IORESOURCE_MEM, }, [1] = { - .start = IRQ_USB, - .end = IRQ_USB, + .start = IRQ_USBINTR, + .end = IRQ_USBINTR, .flags = IORESOURCE_IRQ, }, }; @@ -84,8 +61,7 @@ static struct resource lh7a40x_usbclient_resources[] = { static u64 lh7a40x_usbclient_dma_mask = 0xffffffffUL; static struct platform_device lh7a40x_usbclient_device = { -// .name = "lh7a40x_udc", - .name = "lh7-udc", + .name = "lh7a40x_udc", .id = 0, .dev = { .dma_mask = &lh7a40x_usbclient_dma_mask, @@ -125,7 +101,7 @@ static struct platform_device lh7a404_usbhost_device = { #endif -static struct platform_device* lpd7a40x_devs[] __initdata = { +static struct platform_device *lpd7a40x_devs[] __initdata = { &smc91x_device, &lh7a40x_usbclient_device, #if defined (CONFIG_ARCH_LH7A404) @@ -137,52 +113,29 @@ extern void lpd7a400_map_io (void); static void __init lpd7a40x_init (void) { -#if defined (CONFIG_MACH_LPD7A400) - CPLD_CONTROL |= 0 - | CPLD_CONTROL_SWINT /* Disable software interrupt */ - | CPLD_CONTROL_OCMSK; /* Mask USB1 connection IRQ */ + CPLD_CONTROL |= (1<<6); /* Mask USB1 connection IRQ */ CPLD_CONTROL &= ~(0 - | CPLD_CONTROL_LCD_ENABLE /* Disable LCD */ - | CPLD_CONTROL_WRLAN_NENABLE /* Enable SMC91x */ + | (1<<1) /* Disable LCD */ + | (1<<0) /* Enable WLAN */ ); -#endif - -#if defined (CONFIG_MACH_LPD7A404) - CPLD_CONTROL &= ~(0 - | CPLD_CONTROL_WRLAN_NENABLE /* Enable SMC91x */ - ); -#endif platform_add_devices (lpd7a40x_devs, ARRAY_SIZE (lpd7a40x_devs)); -#if defined (CONFIG_FB_ARMCLCD) - lh7a40x_clcd_init (); -#endif } static void lh7a40x_ack_cpld_irq (u32 irq) { - /* CPLD doesn't have ack capability, but some devices may */ - -#if defined (CPLD_INTMASK_TOUCH) - /* The touch control *must* mask the the interrupt because the - * interrupt bit is read by the driver to determine if the pen - * is still down. */ - if (irq == IRQ_TOUCH) - CPLD_INTERRUPTS |= CPLD_INTMASK_TOUCH; -#endif + /* CPLD doesn't have ack capability */ } static void lh7a40x_mask_cpld_irq (u32 irq) { switch (irq) { case IRQ_LPD7A40X_ETH_INT: - CPLD_INTERRUPTS |= CPLD_INTMASK_ETHERNET; + CPLD_INTERRUPTS = CPLD_INTERRUPTS | 0x4; break; -#if defined (IRQ_TOUCH) - case IRQ_TOUCH: - CPLD_INTERRUPTS |= CPLD_INTMASK_TOUCH; + case IRQ_LPD7A400_TS: + CPLD_INTERRUPTS = CPLD_INTERRUPTS | 0x8; break; -#endif } } @@ -190,18 +143,15 @@ static void lh7a40x_unmask_cpld_irq (u32 irq) { switch (irq) { case IRQ_LPD7A40X_ETH_INT: - CPLD_INTERRUPTS &= ~CPLD_INTMASK_ETHERNET; + CPLD_INTERRUPTS = CPLD_INTERRUPTS & ~ 0x4; break; -#if defined (IRQ_TOUCH) - case IRQ_TOUCH: - CPLD_INTERRUPTS &= ~CPLD_INTMASK_TOUCH; + case IRQ_LPD7A400_TS: + CPLD_INTERRUPTS = CPLD_INTERRUPTS & ~ 0x8; break; -#endif } } -static struct irq_chip lpd7a40x_cpld_chip = { - .name = "CPLD", +static struct irqchip lpd7a40x_cpld_chip = { .ack = lh7a40x_ack_cpld_irq, .mask = lh7a40x_mask_cpld_irq, .unmask = lh7a40x_unmask_cpld_irq, @@ -214,13 +164,11 @@ static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, desc->chip->ack (irq); - if ((mask & (1<<0)) == 0) /* WLAN */ + if ((mask & 0x1) == 0) /* WLAN */ IRQ_DISPATCH (IRQ_LPD7A40X_ETH_INT); -#if defined (IRQ_TOUCH) - if ((mask & (1<<1)) == 0) /* Touch */ - IRQ_DISPATCH (IRQ_TOUCH); -#endif + if ((mask & 0x2) == 0) /* Touch */ + IRQ_DISPATCH (IRQ_LPD7A400_TS); desc->chip->unmask (irq); /* Level-triggered need this */ } @@ -256,21 +204,9 @@ void __init lh7a40x_init_board_irq (void) /* Then, configure CPLD interrupt */ - /* Disable all CPLD interrupts */ -#if defined (CONFIG_MACH_LPD7A400) - CPLD_INTERRUPTS = CPLD_INTMASK_TOUCH | CPLD_INTMASK_PEN - | CPLD_INTMASK_ETHERNET; - /* *** FIXME: don't know why we need 7 and 4. 7 is way wrong - and 4 is uncefined. */ - // (1<<7)|(1<<4)|(1<<3)|(1<<2); -#endif -#if defined (CONFIG_MACH_LPD7A404) - CPLD_INTERRUPTS = CPLD_INTMASK_ETHERNET; - /* *** FIXME: don't know why we need 6 and 5, neither is defined. */ - // (1<<6)|(1<<5)|(1<<3); -#endif + CPLD_INTERRUPTS = 0x9c; /* Disable all CPLD interrupts */ GPIO_PFDD &= ~(1 << pinCPLD); /* Make input */ - GPIO_INTTYPE1 &= ~(1 << pinCPLD); /* Level triggered */ + GPIO_INTTYPE1 |= (1 << pinCPLD); /* Edge triggered */ GPIO_INTTYPE2 &= ~(1 << pinCPLD); /* Active low */ barrier (); GPIO_GPIOFINTEN |= (1 << pinCPLD); /* Enable */ @@ -280,7 +216,7 @@ void __init lh7a40x_init_board_irq (void) for (irq = IRQ_BOARD_START; irq < IRQ_BOARD_START + NR_IRQ_BOARD; ++irq) { set_irq_chip (irq, &lpd7a40x_cpld_chip); - set_irq_handler (irq, do_level_IRQ); + set_irq_handler (irq, do_edge_IRQ); set_irq_flags (irq, IRQF_VALID); } @@ -290,109 +226,91 @@ void __init lh7a40x_init_board_irq (void) lpd7a40x_cpld_handler); } -static struct map_desc lpd7a40x_io_desc[] __initdata = { +static struct map_desc lpd7a400_io_desc[] __initdata = { { - .virtual = IO_VIRT, + .virtual = IO_VIRT, .pfn = __phys_to_pfn(IO_PHYS), - .length = IO_SIZE, + .length = IO_SIZE, .type = MT_DEVICE - }, - { /* Mapping added to work around chip select problems */ + }, { /* Mapping added to work around chip select problems */ .virtual = IOBARRIER_VIRT, .pfn = __phys_to_pfn(IOBARRIER_PHYS), .length = IOBARRIER_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CF_VIRT, .pfn = __phys_to_pfn(CF_PHYS), - .length = CF_SIZE, + .length = CF_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD02_VIRT, .pfn = __phys_to_pfn(CPLD02_PHYS), - .length = CPLD02_SIZE, + .length = CPLD02_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD06_VIRT, .pfn = __phys_to_pfn(CPLD06_PHYS), - .length = CPLD06_SIZE, - .type = MT_DEVICE - }, - { - .virtual = CPLD08_VIRT, - .pfn = __phys_to_pfn(CPLD08_PHYS), - .length = CPLD08_SIZE, + .length = CPLD06_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD08_VIRT, .pfn = __phys_to_pfn(CPLD08_PHYS), - .length = CPLD08_SIZE, + .length = CPLD08_SIZE, .type = MT_DEVICE - }, - { - .virtual = CPLD0A_VIRT, - .pfn = __phys_to_pfn(CPLD0A_PHYS), - .length = CPLD0A_SIZE, - .type = MT_DEVICE - }, - { + }, { .virtual = CPLD0C_VIRT, .pfn = __phys_to_pfn(CPLD0C_PHYS), - .length = CPLD0C_SIZE, + .length = CPLD0C_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD0E_VIRT, .pfn = __phys_to_pfn(CPLD0E_PHYS), - .length = CPLD0E_SIZE, + .length = CPLD0E_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD10_VIRT, .pfn = __phys_to_pfn(CPLD10_PHYS), - .length = CPLD10_SIZE, + .length = CPLD10_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD12_VIRT, .pfn = __phys_to_pfn(CPLD12_PHYS), - .length = CPLD12_SIZE, + .length = CPLD12_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD14_VIRT, .pfn = __phys_to_pfn(CPLD14_PHYS), - .length = CPLD14_SIZE, + .length = CPLD14_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD16_VIRT, .pfn = __phys_to_pfn(CPLD16_PHYS), - .length = CPLD16_SIZE, + .length = CPLD16_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD18_VIRT, .pfn = __phys_to_pfn(CPLD18_PHYS), - .length = CPLD18_SIZE, + .length = CPLD18_SIZE, .type = MT_DEVICE - }, - { + }, { .virtual = CPLD1A_VIRT, .pfn = __phys_to_pfn(CPLD1A_PHYS), - .length = CPLD1A_SIZE, + .length = CPLD1A_SIZE, .type = MT_DEVICE }, + /* This mapping is redundant since the smc driver performs another. */ +/* { CPLD00_VIRT, CPLD00_PHYS, CPLD00_SIZE, MT_DEVICE }, */ }; void __init -lpd7a40x_map_io(void) +lpd7a400_map_io(void) { - iotable_init (lpd7a40x_io_desc, ARRAY_SIZE (lpd7a40x_io_desc)); + iotable_init (lpd7a400_io_desc, ARRAY_SIZE (lpd7a400_io_desc)); + + /* Fixup (improve) Static Memory Controller settings */ + SMC_BCR0 = 0x200039af; /* Boot Flash */ + SMC_BCR6 = 0x1000fbe0; /* CPLD */ + SMC_BCR7 = 0x1000b2c2; /* Compact Flash */ } #ifdef CONFIG_MACH_LPD7A400 @@ -402,7 +320,7 @@ MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10") .phys_io = 0x80000000, .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, .boot_params = 0xc0000100, - .map_io = lpd7a40x_map_io, + .map_io = lpd7a400_map_io, .init_irq = lh7a400_init_irq, .timer = &lh7a40x_timer, .init_machine = lpd7a40x_init, @@ -417,7 +335,7 @@ MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10") .phys_io = 0x80000000, .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, .boot_params = 0xc0000100, - .map_io = lpd7a40x_map_io, + .map_io = lpd7a400_map_io, .init_irq = lh7a404_init_irq, .timer = &lh7a40x_timer, .init_machine = lpd7a40x_init, diff --git a/arch/arm/mach-lh7a40x/clcd.c b/arch/arm/mach-lh7a40x/clcd.c deleted file mode 100644 index 1992db4c2..000000000 --- a/arch/arm/mach-lh7a40x/clcd.c +++ /dev/null @@ -1,241 +0,0 @@ -/* - * arch/arm/mach-lh7a40x/clcd.c - * - * Copyright (C) 2004 Marc Singer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include -#include - -//#include -//#include -//#include - -//#include -#include -#include - -#include -#include -#include -#include - -#define HRTFTC_HRSETUP __REG(HRTFTC_PHYS + 0x00) -#define HRTFTC_HRCON __REG(HRTFTC_PHYS + 0x04) -#define HRTFTC_HRTIMING1 __REG(HRTFTC_PHYS + 0x08) -#define HRTFTC_HRTIMING2 __REG(HRTFTC_PHYS + 0x0c) - -#define ALI_SETUP __REG(ALI_PHYS + 0x00) -#define ALI_CONTROL __REG(ALI_PHYS + 0x04) -#define ALI_TIMING1 __REG(ALI_PHYS + 0x08) -#define ALI_TIMING2 __REG(ALI_PHYS + 0x0c) - -#include "lcd-panel.h" - -static void lh7a40x_clcd_disable (struct clcd_fb *fb) -{ -#if defined (CONFIG_MACH_LPD7A400) - CPLD_CONTROL &= ~(1<<1); /* Disable LCD Vee */ -#endif - -#if defined (CONFIG_MACH_LPD7A404) - GPIO_PCD &= ~(1<<3); /* Disable LCD Vee */ -#endif - -#if defined (CONFIG_ARCH_LH7A400) - HRTFTC_HRSETUP &= ~(1<<13); /* Disable HRTFT controller */ -#endif - -#if defined (CONFIG_ARCH_LH7A404) - ALI_SETUP &= ~(1<<13); /* Disable ALI */ -#endif -} - -static void lh7a40x_clcd_enable (struct clcd_fb *fb) -{ - struct clcd_panel_extra* extra - = (struct clcd_panel_extra*) fb->board_data; - -#if defined (CONFIG_MACH_LPD7A400) - CPLD_CONTROL |= (1<<1); /* Enable LCD Vee */ -#endif - -#if defined (CONFIG_MACH_LPD7A404) - GPIO_PCDD &= ~(1<<3); /* Enable LCD Vee */ - GPIO_PCD |= (1<<3); -#endif - -#if defined (CONFIG_ARCH_LH7A400) - - if (extra) { - HRTFTC_HRSETUP - = (1 << 13) - | ((fb->fb.var.xres - 1) << 4) - | 0xc - | (extra->hrmode ? 1 : 0); - HRTFTC_HRCON - = ((extra->clsen ? 1 : 0) << 1) - | ((extra->spsen ? 1 : 0) << 0); - HRTFTC_HRTIMING1 - = (extra->pcdel << 8) - | (extra->revdel << 4) - | (extra->lpdel << 0); - HRTFTC_HRTIMING2 - = (extra->spldel << 9) - | (extra->pc2del << 0); - } - else - HRTFTC_HRSETUP - = (1 << 13) - | 0xc; -#endif - -#if defined (CONFIG_ARCH_LH7A404) - - if (extra) { - ALI_SETUP - = (1 << 13) - | ((fb->fb.var.xres - 1) << 4) - | 0xc - | (extra->hrmode ? 1 : 0); - ALI_CONTROL - = ((extra->clsen ? 1 : 0) << 1) - | ((extra->spsen ? 1 : 0) << 0); - ALI_TIMING1 - = (extra->pcdel << 8) - | (extra->revdel << 4) - | (extra->lpdel << 0); - ALI_TIMING2 - = (extra->spldel << 9) - | (extra->pc2del << 0); - } - else - ALI_SETUP - = (1 << 13) - | 0xc; -#endif - -} - -#define FRAMESIZE(s) (((s) + PAGE_SIZE - 1)&PAGE_MASK) - -static int lh7a40x_clcd_setup (struct clcd_fb *fb) -{ - dma_addr_t dma; - u32 len = FRAMESIZE (lcd_panel.mode.xres*lcd_panel.mode.yres - *(lcd_panel.bpp/8)); - - fb->panel = &lcd_panel; - - /* Enforce the sync polarity defaults */ - if (!(fb->panel->tim2 & TIM2_IHS)) - fb->fb.var.sync |= FB_SYNC_HOR_HIGH_ACT; - if (!(fb->panel->tim2 & TIM2_IVS)) - fb->fb.var.sync |= FB_SYNC_VERT_HIGH_ACT; - -#if defined (HAS_LCD_PANEL_EXTRA) - fb->board_data = &lcd_panel_extra; -#endif - - fb->fb.screen_base - = dma_alloc_writecombine (&fb->dev->dev, len, - &dma, GFP_KERNEL); - printk ("CLCD: LCD setup fb virt 0x%p phys 0x%p l %x io 0x%p \n", - fb->fb.screen_base, (void*) dma, len, - (void*) io_p2v (CLCDC_PHYS)); - printk ("CLCD: pixclock %d\n", lcd_panel.mode.pixclock); - - if (!fb->fb.screen_base) { - printk(KERN_ERR "CLCD: unable to map framebuffer\n"); - return -ENOMEM; - } - -#if defined (USE_RGB555) - fb->fb.var.green.length = 5; /* Panel uses RGB 5:5:5 */ -#endif - - fb->fb.fix.smem_start = dma; - fb->fb.fix.smem_len = len; - - /* Drive PE4 high to prevent CPLD crash */ - GPIO_PEDD |= (1<<4); - GPIO_PED |= (1<<4); - - GPIO_PINMUX |= (1<<1) | (1<<0); /* LCDVD[15:4] */ - -// fb->fb.fbops->fb_check_var (&fb->fb.var, &fb->fb); -// fb->fb.fbops->fb_set_par (&fb->fb); - - return 0; -} - -static int lh7a40x_clcd_mmap (struct clcd_fb *fb, struct vm_area_struct *vma) -{ - return dma_mmap_writecombine(&fb->dev->dev, vma, - fb->fb.screen_base, - fb->fb.fix.smem_start, - fb->fb.fix.smem_len); -} - -static void lh7a40x_clcd_remove (struct clcd_fb *fb) -{ - dma_free_writecombine (&fb->dev->dev, fb->fb.fix.smem_len, - fb->fb.screen_base, fb->fb.fix.smem_start); -} - -static struct clcd_board clcd_platform_data = { - .name = "lh7a40x FB", - .check = clcdfb_check, - .decode = clcdfb_decode, - .enable = lh7a40x_clcd_enable, - .setup = lh7a40x_clcd_setup, - .mmap = lh7a40x_clcd_mmap, - .remove = lh7a40x_clcd_remove, - .disable = lh7a40x_clcd_disable, -}; - -#define IRQ_CLCDC (IRQ_LCDINTR) - -#define AMBA_DEVICE(name,busid,base,plat,pid) \ -static struct amba_device name##_device = { \ - .dev = { \ - .coherent_dma_mask = ~0, \ - .bus_id = busid, \ - .platform_data = plat, \ - }, \ - .res = { \ - .start = base##_PHYS, \ - .end = (base##_PHYS) + (4*1024) - 1, \ - .flags = IORESOURCE_MEM, \ - }, \ - .dma_mask = ~0, \ - .irq = { IRQ_##base, }, \ - /* .dma = base##_DMA,*/ \ - .periphid = pid, \ -} - -AMBA_DEVICE(clcd, "cldc-lh7a40x", CLCDC, &clcd_platform_data, 0x41110); - -static struct amba_device *amba_devs[] __initdata = { - &clcd_device, -}; - -void __init lh7a40x_clcd_init (void) -{ - int i; - int result; - printk ("CLCD: registering amba devices\n"); - for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { - struct amba_device *d = amba_devs[i]; - result = amba_device_register(d, &iomem_resource); - printk (" %d -> %d\n", i ,result); - } -} diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c deleted file mode 100644 index 7530a95c1..000000000 --- a/arch/arm/mach-lh7a40x/clocks.c +++ /dev/null @@ -1,198 +0,0 @@ -/* arch/arm/mach-lh7a40x/clocks.c - * - * Copyright (C) 2004 Marc Singer - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include - -struct module; -struct icst525_params; - -struct clk { - struct list_head node; - unsigned long rate; - struct module *owner; - const char *name; -// void *data; -// const struct icst525_params *params; -// void (*setvco)(struct clk *, struct icst525_vco vco); -}; - -int clk_register(struct clk *clk); -void clk_unregister(struct clk *clk); - -/* ----- */ - -#define MAINDIV1(c) (((c) >> 7) & 0x0f) -#define MAINDIV2(c) (((c) >> 11) & 0x1f) -#define PS(c) (((c) >> 18) & 0x03) -#define PREDIV(c) (((c) >> 2) & 0x1f) -#define HCLKDIV(c) (((c) >> 0) & 0x02) -#define PCLKDIV(c) (((c) >> 16) & 0x03) - -unsigned int cpufreq_get (unsigned int cpu) /* in kHz */ -{ - return fclkfreq_get ()/1000; -} -EXPORT_SYMBOL(cpufreq_get); - -unsigned int fclkfreq_get (void) -{ - unsigned int clkset = CSC_CLKSET; - unsigned int gclk - = XTAL_IN - / (1 << PS(clkset)) - * (MAINDIV1(clkset) + 2) - / (PREDIV(clkset) + 2) - * (MAINDIV2(clkset) + 2) - ; - return gclk; -} - -unsigned int hclkfreq_get (void) -{ - unsigned int clkset = CSC_CLKSET; - unsigned int hclk = fclkfreq_get () / (HCLKDIV(clkset) + 1); - - return hclk; -} - -unsigned int pclkfreq_get (void) -{ - unsigned int clkset = CSC_CLKSET; - int pclkdiv = PCLKDIV(clkset); - unsigned int pclk; - if (pclkdiv == 0x3) - pclkdiv = 0x2; - pclk = hclkfreq_get () / (1 << pclkdiv); - - return pclk; -} - -/* ----- */ - -static LIST_HEAD(clocks); -static DECLARE_MUTEX(clocks_sem); - -struct clk *clk_get (struct device *dev, const char *id) -{ - struct clk *p; - struct clk *clk = ERR_PTR(-ENOENT); - - down (&clocks_sem); - list_for_each_entry (p, &clocks, node) { - if (strcmp (id, p->name) == 0 - && try_module_get(p->owner)) { - clk = p; - break; - } - } - up (&clocks_sem); - - return clk; -} -EXPORT_SYMBOL(clk_get); - -void clk_put (struct clk *clk) -{ - module_put(clk->owner); -} -EXPORT_SYMBOL(clk_put); - -int clk_enable (struct clk *clk) -{ - return 0; -} -EXPORT_SYMBOL(clk_enable); - -void clk_disable (struct clk *clk) -{ -} -EXPORT_SYMBOL(clk_disable); - -int clk_use (struct clk *clk) -{ - return 0; -} -EXPORT_SYMBOL(clk_use); - -void clk_unuse (struct clk *clk) -{ -} -EXPORT_SYMBOL(clk_unuse); - -unsigned long clk_get_rate (struct clk *clk) -{ - return clk->rate; -} -EXPORT_SYMBOL(clk_get_rate); - -long clk_round_rate (struct clk *clk, unsigned long rate) -{ - return rate; -} -EXPORT_SYMBOL(clk_round_rate); - -int clk_set_rate (struct clk *clk, unsigned long rate) -{ - int ret = -EIO; - return ret; -} -EXPORT_SYMBOL(clk_set_rate); - -#if 0 -/* - * These are fixed clocks. - */ -static struct clk kmi_clk = { - .name = "KMIREFCLK", - .rate = 24000000, -}; - -static struct clk uart_clk = { - .name = "UARTCLK", - .rate = 24000000, -}; - -static struct clk mmci_clk = { - .name = "MCLK", - .rate = 33000000, -}; -#endif - -static struct clk clcd_clk = { - .name = "CLCDCLK", - .rate = 0, -}; - -int clk_register (struct clk *clk) -{ - down (&clocks_sem); - list_add (&clk->node, &clocks); - up (&clocks_sem); - return 0; -} -EXPORT_SYMBOL(clk_register); - -void clk_unregister (struct clk *clk) -{ - down (&clocks_sem); - list_del (&clk->node); - up (&clocks_sem); -} -EXPORT_SYMBOL(clk_unregister); - -static int __init clk_init (void) -{ - clk_register(&clcd_clk); - return 0; -} -arch_initcall(clk_init); diff --git a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h index 18e8bb4eb..ea8de7e3a 100644 --- a/arch/arm/mach-lh7a40x/common.h +++ b/arch/arm/mach-lh7a40x/common.h @@ -12,7 +12,6 @@ extern struct sys_timer lh7a40x_timer; extern void lh7a400_init_irq (void); extern void lh7a404_init_irq (void); -extern void lh7a40x_clcd_init (void); extern void lh7a40x_init_board_irq (void); #define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs) diff --git a/arch/arm/mach-lh7a40x/irq-kev7a400.c b/arch/arm/mach-lh7a40x/irq-kev7a400.c index f9b3fe917..8535764d8 100644 --- a/arch/arm/mach-lh7a40x/irq-kev7a400.c +++ b/arch/arm/mach-lh7a40x/irq-kev7a400.c @@ -43,8 +43,7 @@ lh7a400_unmask_cpld_irq (u32 irq) } static struct -irq_chip lh7a400_cpld_chip = { - .name = "CPLD", +irqchip lh7a400_cpld_chip = { .ack = lh7a400_ack_cpld_irq, .mask = lh7a400_mask_cpld_irq, .unmask = lh7a400_unmask_cpld_irq, diff --git a/arch/arm/mach-lh7a40x/irq-lh7a400.c b/arch/arm/mach-lh7a40x/irq-lh7a400.c index 091b2dc58..f9fdefef6 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a400.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a400.c @@ -38,15 +38,13 @@ static void lh7a400_ack_gpio_irq (u32 irq) INTC_INTENC = (1 << irq); } -static struct irq_chip lh7a400_internal_chip = { - .name = "MPU", +static struct irqchip lh7a400_internal_chip = { .ack = lh7a400_mask_irq, /* Level triggering -> mask is ack */ .mask = lh7a400_mask_irq, .unmask = lh7a400_unmask_irq, }; -static struct irq_chip lh7a400_gpio_chip = { - .name = "GPIO", +static struct irqchip lh7a400_gpio_chip = { .ack = lh7a400_ack_gpio_irq, .mask = lh7a400_mask_irq, .unmask = lh7a400_unmask_irq, diff --git a/arch/arm/mach-lh7a40x/irq-lh7a404.c b/arch/arm/mach-lh7a40x/irq-lh7a404.c index 7059b9837..e902e3d87 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a404.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a404.c @@ -28,17 +28,13 @@ static unsigned char irq_pri_vic1[] = { #if defined (USE_PRIORITIES) - IRQ_GPIO3INTR, /* CPLD */ - IRQ_DMAM2P4, IRQ_DMAM2P5, /* AC97 */ +IRQ_GPIO3INTR, #endif }; static unsigned char irq_pri_vic2[] = { #if defined (USE_PRIORITIES) - IRQ_T3UI, /* Timer */ - IRQ_GPIO7INTR, /* CPLD */ + IRQ_T3UI, IRQ_GPIO7INTR, IRQ_UART1INTR, IRQ_UART2INTR, IRQ_UART3INTR, - IRQ_LCDINTR, /* LCD */ - IRQ_TSCINTR, /* ADC/Touchscreen */ #endif }; @@ -76,29 +72,25 @@ static void lh7a404_vic2_ack_gpio_irq (u32 irq) VIC2_INTENCLR = (1 << irq); } -static struct irq_chip lh7a404_vic1_chip = { - .name = "VIC1", +static struct irqchip lh7a404_vic1_chip = { .ack = lh7a404_vic1_mask_irq, /* Because level-triggered */ .mask = lh7a404_vic1_mask_irq, .unmask = lh7a404_vic1_unmask_irq, }; -static struct irq_chip lh7a404_vic2_chip = { - .name = "VIC2", +static struct irqchip lh7a404_vic2_chip = { .ack = lh7a404_vic2_mask_irq, /* Because level-triggered */ .mask = lh7a404_vic2_mask_irq, .unmask = lh7a404_vic2_unmask_irq, }; -static struct irq_chip lh7a404_gpio_vic1_chip = { - .name = "GPIO-VIC1", +static struct irqchip lh7a404_gpio_vic1_chip = { .ack = lh7a404_vic1_ack_gpio_irq, .mask = lh7a404_vic1_mask_irq, .unmask = lh7a404_vic1_unmask_irq, }; -static struct irq_chip lh7a404_gpio_vic2_chip = { - .name = "GPIO-VIC2", +static struct irqchip lh7a404_gpio_vic2_chip = { .ack = lh7a404_vic2_ack_gpio_irq, .mask = lh7a404_vic2_mask_irq, .unmask = lh7a404_vic2_unmask_irq, @@ -106,19 +98,10 @@ static struct irq_chip lh7a404_gpio_vic2_chip = { /* IRQ initialization */ -#if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) -extern void* branch_irq_lh7a400; -#endif - void __init lh7a404_init_irq (void) { int irq; -#if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) -#define NOP 0xe1a00000 /* mov r0, r0 */ - branch_irq_lh7a400 = NOP; -#endif - VIC1_INTENCLR = 0xffffffff; VIC2_INTENCLR = 0xffffffff; VIC1_INTSEL = 0; /* All IRQs */ diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c index d6055dde6..dcb4e17b9 100644 --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c @@ -50,8 +50,7 @@ static void lh7a40x_unmask_cpld_irq (u32 irq) } } -static struct irq_chip lh7a40x_cpld_chip = { - .name = "CPLD", +static struct irqchip lh7a40x_cpld_chip = { .ack = lh7a40x_ack_cpld_irq, .mask = lh7a40x_mask_cpld_irq, .unmask = lh7a40x_unmask_cpld_irq, diff --git a/arch/arm/mach-lh7a40x/lcd-panel.h b/arch/arm/mach-lh7a40x/lcd-panel.h deleted file mode 100644 index 4fb2efc49..000000000 --- a/arch/arm/mach-lh7a40x/lcd-panel.h +++ /dev/null @@ -1,346 +0,0 @@ -/* lcd-panel.h - $Id$ - - written by Marc Singer - 18 Jul 2005 - - Copyright (C) 2005 Marc Singer - - ----------- - DESCRIPTION - ----------- - - Only one panel may be defined at a time. - - The pixel clock is calculated to be no greater than the target. - - Each timing value is accompanied by a specification comment. - - UNITS/MIN/TYP/MAX - - Most of the units will be in clocks. - - USE_RGB555 - - Define this macro to configure the AMBA LCD controller to use an - RGB555 encoding for the pels instead of the normal RGB565. - - LPD9520, LPD79524, LPD7A400, LPD7A404-10, LPD7A404-11 - - These boards are best approximated by 555 for all panels. Some - can use an extra low-order bit of blue in bit 16 of the color - value, but we don't have a way to communicate this non-linear - mapping to the kernel. - -*/ - -#if !defined (__LCD_PANEL_H__) -# define __LCD_PANEL_H__ - -#if defined (MACH_LPD79520)\ - || defined (MACH_LPD79524)\ - || defined (MACH_LPD7A400)\ - || defined (MACH_LPD7A404) -# define USE_RGB555 -#endif - -struct clcd_panel_extra { - unsigned int hrmode; - unsigned int clsen; - unsigned int spsen; - unsigned int pcdel; - unsigned int revdel; - unsigned int lpdel; - unsigned int spldel; - unsigned int pc2del; -}; - -#define NS_TO_CLOCK(ns,c) ((((ns)*((c)/1000) + (1000000 - 1))/1000000)) -#define CLOCK_TO_DIV(e,c) (((c) + (e) - 1)/(e)) - -#if defined CONFIG_FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT - - /* Logic Product Development LCD 3.5" QVGA HRTFT -10 */ - /* Sharp PN LQ035Q7DB02 w/HRTFT controller chip */ - -#define PIX_CLOCK_TARGET (6800000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "3.5in QVGA (LQ035Q7DB02)", - .xres = 240, - .yres = 320, - .pixclock = PIX_CLOCK, - .left_margin = 16, - .right_margin = 21, - .upper_margin = 8, // line/8/8/8 - .lower_margin = 5, - .hsync_len = 61, - .vsync_len = NS_TO_CLOCK (60, PIX_CLOCK), - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IPC | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#define HAS_LCD_PANEL_EXTRA - -static struct clcd_panel_extra lcd_panel_extra = { - .hrmode = 1, - .clsen = 1, - .spsen = 1, - .pcdel = 8, - .revdel = 7, - .lpdel = 13, - .spldel = 77, - .pc2del = 208, -}; - -#endif - -#if defined CONFIG_FB_ARMCLCD_SHARP_LQ057Q3DC02 - - /* Logic Product Development LCD 5.7" QVGA -10 */ - /* Sharp PN LQ057Q3DC02 */ - /* QVGA mode, V/Q=LOW */ - -/* From Sharp on 2006.1.3. I believe some of the values are incorrect - * based on the datasheet. - - Timing0 TIMING1 TIMING2 CONTROL - 0x140A0C4C 0x080504EF 0x013F380D 0x00000829 - HBP= 20 VBP= 8 BCD= 0 - HFP= 10 VFP= 5 CPL=319 - HSW= 12 VSW= 1 IOE= 0 - PPL= 19 LPP=239 IPC= 1 - IHS= 1 - IVS= 1 - ACB= 0 - CSEL= 0 - PCD= 13 - - */ - -/* The full horozontal cycle (Th) is clock/360/400/450. */ -/* The full vertical cycle (Tv) is line/251/262/280. */ - -#define PIX_CLOCK_TARGET (6300000) /* -/6.3/7 MHz */ -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "5.7in QVGA (LQ057Q3DC02)", - .xres = 320, - .yres = 240, - .pixclock = PIX_CLOCK, - .left_margin = 11, - .right_margin = 400-11-320-2, - .upper_margin = 7, // line/7/7/7 - .lower_margin = 262-7-240-2, - .hsync_len = 2, // clk/2/96/200 - .vsync_len = 2, // line/2/-/34 - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - -#if defined CONFIG_FB_ARMCLCD_SHARP_LQ64D343 - - /* Logic Product Development LCD 6.4" VGA -10 */ - /* Sharp PN LQ64D343 */ - -/* The full horozontal cycle (Th) is clock/750/800/900. */ -/* The full vertical cycle (Tv) is line/515/525/560. */ - -#define PIX_CLOCK_TARGET (28330000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "6.4in QVGA (LQ64D343)", - .xres = 640, - .yres = 480, - .pixclock = PIX_CLOCK, - .left_margin = 32, - .right_margin = 800-32-640-96, - .upper_margin = 32, // line/34/34/34 - .lower_margin = 540-32-480-2, - .hsync_len = 96, // clk/2/96/200 - .vsync_len = 2, // line/2/-/34 - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - -#if defined CONFIG_FB_ARMCLCD_SHARP_LQ10D368 - - /* Logic Product Development LCD 10.4" VGA -10 */ - /* Sharp PN LQ10D368 */ - -#define PIX_CLOCK_TARGET (28330000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "10.4in VGA (LQ10D368)", - .xres = 640, - .yres = 480, - .pixclock = PIX_CLOCK, - .left_margin = 21, - .right_margin = 15, - .upper_margin = 34, - .lower_margin = 5, - .hsync_len = 96, - .vsync_len = 16, - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - -#if defined CONFIG_FB_ARMCLCD_SHARP_LQ121S1DG41 - - /* Logic Product Development LCD 12.1" SVGA -10 */ - /* Sharp PN LQ121S1DG41, was LQ121S1DG31 */ - -/* Note that with a 99993900 Hz HCLK, it is not possible to hit the - * target clock frequency range of 35MHz to 42MHz. */ - -/* If the target pixel clock is substantially lower than the panel - * spec, this is done to prevent the LCD display from glitching when - * the CPU is under load. A pixel clock higher than 25MHz - * (empirically determined) will compete with the CPU for bus cycles - * for the Ethernet chip. However, even a pixel clock of 10MHz - * competes with Compact Flash interface during some operations - * (fdisk, e2fsck). And, at that speed the display may have a visible - * flicker. */ - -/* The full horozontal cycle (Th) is clock/832/1056/1395. */ - -#define PIX_CLOCK_TARGET (20000000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "12.1in SVGA (LQ121S1DG41)", - .xres = 800, - .yres = 600, - .pixclock = PIX_CLOCK, - .left_margin = 89, // ns/5/-/(1/PIX_CLOCK)-10 - .right_margin = 1056-800-89-128, - .upper_margin = 23, // line/23/23/23 - .lower_margin = 44, - .hsync_len = 128, // clk/2/128/200 - .vsync_len = 4, // line/2/4/6 - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - -#if defined CONFIG_FB_ARMCLCD_HITACHI - - /* Hitachi*/ - /* Submitted by Michele Da Rold */ - -#define PIX_CLOCK_TARGET (49000000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "Hitachi 800x480", - .xres = 800, - .yres = 480, - .pixclock = PIX_CLOCK, - .left_margin = 88, - .right_margin = 40, - .upper_margin = 32, - .lower_margin = 11, - .hsync_len = 128, - .vsync_len = 2, - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IPC | TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - - -#if defined CONFIG_FB_ARMCLCD_AUO_A070VW01_WIDE - - /* AU Optotronics A070VW01 7.0 Wide Screen color Display*/ - /* Submitted by Michele Da Rold */ - -#define PIX_CLOCK_TARGET (10000000) -#define PIX_CLOCK_DIVIDER CLOCK_TO_DIV (PIX_CLOCK_TARGET, HCLK) -#define PIX_CLOCK (HCLK/PIX_CLOCK_DIVIDER) - -static struct clcd_panel lcd_panel = { - .mode = { - .name = "7.0in Wide (A070VW01)", - .xres = 480, - .yres = 234, - .pixclock = PIX_CLOCK, - .left_margin = 30, - .right_margin = 25, - .upper_margin = 14, - .lower_margin = 12, - .hsync_len = 100, - .vsync_len = 1, - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = TIM2_IPC | TIM2_IHS | TIM2_IVS - | (PIX_CLOCK_DIVIDER - 2), - .cntl = CNTL_LCDTFT | CNTL_WATERMARK, - .bpp = 16, -}; - -#endif - -#undef NS_TO_CLOCK -#undef CLOCK_TO_DIV - -#endif /* __LCD_PANEL_H__ */ diff --git a/arch/arm/mach-lh7a40x/ssp-cpld.c b/arch/arm/mach-lh7a40x/ssp-cpld.c deleted file mode 100644 index a10830186..000000000 --- a/arch/arm/mach-lh7a40x/ssp-cpld.c +++ /dev/null @@ -1,343 +0,0 @@ -/* arch/arm/mach-lh7a40x/ssp-cpld.c - * - * Copyright (C) 2004,2005 Marc Singer - * - * 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. - * - * SSP/SPI driver for the CardEngine CPLD. - * - */ - -/* NOTES - ----- - - o *** This driver is cribbed from the 7952x implementation. - Some comments may not apply. - - o This driver contains sufficient logic to control either the - serial EEPROMs or the audio codec. It is included in the kernel - to support the codec. The EEPROMs are really the responsibility - of the boot loader and should probably be left alone. - - o The code must be augmented to cope with multiple, simultaneous - clients. - o The audio codec writes to the codec chip whenever playback - starts. - o The touchscreen driver writes to the ads chip every time it - samples. - o The audio codec must write 16 bits, but the touch chip writes - are 8 bits long. - o We need to be able to keep these configurations separate while - simultaneously active. - - */ - -#include -#include -//#include -#include -#include -//#include -#include -#include -#include - -#include -#include -#include - -#include - -//#define TALK - -#if defined (TALK) -#define PRINTK(f...) printk (f) -#else -#define PRINTK(f...) do {} while (0) -#endif - -#if defined (CONFIG_ARCH_LH7A400) -# define CPLD_SPID __REGP16(CPLD06_VIRT) /* SPI data */ -# define CPLD_SPIC __REGP16(CPLD08_VIRT) /* SPI control */ -# define CPLD_SPIC_CS_CODEC (1<<0) -# define CPLD_SPIC_CS_TOUCH (1<<1) -# define CPLD_SPIC_WRITE (0<<2) -# define CPLD_SPIC_READ (1<<2) -# define CPLD_SPIC_DONE (1<<3) /* r/o */ -# define CPLD_SPIC_LOAD (1<<4) -# define CPLD_SPIC_START (1<<4) -# define CPLD_SPIC_LOADED (1<<5) /* r/o */ -#endif - -#define CPLD_SPI __REGP16(CPLD0A_VIRT) /* SPI operation */ -#define CPLD_SPI_CS_EEPROM (1<<3) -#define CPLD_SPI_SCLK (1<<2) -#define CPLD_SPI_TX_SHIFT (1) -#define CPLD_SPI_TX (1< %2d", v & 0x1ff, (v >> 9) & 0x7f); -#endif - PRINTK ("\n"); - - if (ssp_configuration.device == DEVICE_CODEC) - select = CPLD_SPIC_CS_CODEC; - if (ssp_configuration.device == DEVICE_TOUCH) - select = CPLD_SPIC_CS_TOUCH; - if (cwrite) { - for (cwrite = (cwrite + 7)/8; cwrite-- > 0; ) { - CPLD_SPID = (v >> (8*cwrite)) & 0xff; - CPLD_SPIC = select | CPLD_SPIC_LOAD; - while (!(CPLD_SPIC & CPLD_SPIC_LOADED)) - ; - CPLD_SPIC = select; - while (!(CPLD_SPIC & CPLD_SPIC_DONE)) - ; - } - v = 0; - } - if (cread) { - mdelay (2); /* *** FIXME: required by ads7843? */ - v = 0; - for (cread = (cread + 7)/8; cread-- > 0;) { - CPLD_SPID = 0; - CPLD_SPIC = select | CPLD_SPIC_READ - | CPLD_SPIC_START; - while (!(CPLD_SPIC & CPLD_SPIC_LOADED)) - ; - CPLD_SPIC = select | CPLD_SPIC_READ; - while (!(CPLD_SPIC & CPLD_SPIC_DONE)) - ; - v = (v << 8) | CPLD_SPID; - } - } - return v; - } -#endif - - PRINTK ("spi(%d) 0x%04x -> 0x%x\r\n", ssp_configuration.device, - v & 0x1ff, (v >> 9) & 0x7f); - - enable_cs (); - - v <<= CPLD_SPI_TX_SHIFT; /* Correction for position of SPI_TX bit */ - while (cwrite--) { - CPLD_SPI - = (CPLD_SPI & ~CPLD_SPI_TX) - | ((v >> cwrite) & CPLD_SPI_TX); - udelay (T_DIS); - pulse_clock (); - } - - if (cread < 0) { - int delay = 10; - disable_cs (); - udelay (1); - enable_cs (); - - l = -1; - do { - if (CPLD_SPI & CPLD_SPI_RX) { - l = 0; - break; - } - } while (udelay (1), --delay); - } - else - /* We pulse the clock before the data to skip the leading zero. */ - while (cread-- > 0) { - pulse_clock (); - l = (l<<1) - | (((CPLD_SPI & CPLD_SPI_RX) - >> CPLD_SPI_RX_SHIFT) & 0x1); - } - - disable_cs (); - return l; -} - -static int ssp_init (void) -{ - spin_lock_init (&ssp_lock); - memset (&ssp_configuration, 0, sizeof (ssp_configuration)); - return 0; -} - - -/* ssp_chip_select - - drops the chip select line for the CPLD shift-register controlled - devices. It doesn't enable chip - -*/ - -static void ssp_chip_select (int enable) -{ -#if defined (CONFIG_MACH_LPD7A400) - int select; - - if (ssp_configuration.device == DEVICE_CODEC) - select = CPLD_SPIC_CS_CODEC; - else if (ssp_configuration.device == DEVICE_TOUCH) - select = CPLD_SPIC_CS_TOUCH; - else - return; - - if (enable) - CPLD_SPIC = select; - else - CPLD_SPIC = 0; -#endif -} - -static void ssp_acquire (void) -{ - spin_lock (&ssp_lock); -} - -static void ssp_release (void) -{ - ssp_chip_select (0); /* just in case */ - spin_unlock (&ssp_lock); -} - -static int ssp_configure (int device, int mode, int speed, - int frame_size_write, int frame_size_read) -{ - ssp_configuration.device = device; - ssp_configuration.mode = mode; - ssp_configuration.speed = speed; - ssp_configuration.frame_size_write = frame_size_write; - ssp_configuration.frame_size_read = frame_size_read; - - return 0; -} - -static int ssp_read (void) -{ - return execute_spi_command (0, 0, ssp_configuration.frame_size_read); -} - -static int ssp_write (u16 data) -{ - execute_spi_command (data, ssp_configuration.frame_size_write, 0); - return 0; -} - -static int ssp_write_read (u16 data) -{ - return execute_spi_command (data, ssp_configuration.frame_size_write, - ssp_configuration.frame_size_read); -} - -struct ssp_driver lh7a40x_cpld_ssp_driver = { - .init = ssp_init, - .acquire = ssp_acquire, - .release = ssp_release, - .configure = ssp_configure, - .chip_select = ssp_chip_select, - .read = ssp_read, - .write = ssp_write, - .write_read = ssp_write_read, -}; - - -MODULE_AUTHOR("Marc Singer"); -MODULE_DESCRIPTION("LPD7A40X CPLD SPI driver"); -MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c index ad5652e01..be377e331 100644 --- a/arch/arm/mach-lh7a40x/time.c +++ b/arch/arm/mach-lh7a40x/time.c @@ -1,4 +1,4 @@ -/* +/* * arch/arm/mach-lh7a40x/time.c * * Copyright (C) 2004 Logic Product Development @@ -8,10 +8,10 @@ * version 2 as published by the Free Software Foundation. * */ +#include #include #include #include -#include #include #include @@ -53,11 +53,11 @@ lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction lh7a40x_timer_irq = { .name = "LHA740x Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = lh7a40x_timer_interrupt, }; -static void __init lh7a40x_timer_init (void) +static void __init lh7a40x_timer_init(void) { /* Stop/disable all timers */ TIMER_CONTROL1 = 0; diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig deleted file mode 100644 index 3d90ef19b..000000000 --- a/arch/arm/mach-netx/Kconfig +++ /dev/null @@ -1,24 +0,0 @@ -menu "NetX Implementations" - depends on ARCH_NETX - -config MACH_NXDKN - bool "Enable Hilscher nxdkn Eval Board support" - depends on ARCH_NETX - help - Board support for the Hilscher NetX Eval Board - -config MACH_NXDB500 - bool "Enable Hilscher nxdb500 Eval Board support" - depends on ARCH_NETX - select ARM_AMBA - help - Board support for the Hilscher nxdb500 Eval Board - -config MACH_NXEB500HMI - bool "Enable Hilscher nxeb500hmi Eval Board support" - depends on ARCH_NETX - select ARM_AMBA - help - Board support for the Hilscher nxeb500hmi Eval Board - -endmenu diff --git a/arch/arm/mach-netx/Makefile b/arch/arm/mach-netx/Makefile deleted file mode 100644 index 18785ff37..000000000 --- a/arch/arm/mach-netx/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# -# Makefile for the linux kernel. -# -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). - -# Object file lists. - -obj-y += time.o generic.o pfifo.o xc.o - -# Specific board support -obj-$(CONFIG_MACH_NXDKN) += nxdkn.o -obj-$(CONFIG_MACH_NXDB500) += nxdb500.o fb.o -obj-$(CONFIG_MACH_NXEB500HMI) += nxeb500hmi.o fb.o diff --git a/arch/arm/mach-netx/Makefile.boot b/arch/arm/mach-netx/Makefile.boot deleted file mode 100644 index b81cf6aff..000000000 --- a/arch/arm/mach-netx/Makefile.boot +++ /dev/null @@ -1,2 +0,0 @@ - zreladdr-y := 0x80008000 - diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c deleted file mode 100644 index ef0ab6115..000000000 --- a/arch/arm/mach-netx/fb.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * arch/arm/mach-netx/fb.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include -#include - -struct clk {}; - -static struct clk fb_clk; - -static struct clcd_panel *netx_panel; - -void netx_clcd_enable(struct clcd_fb *fb) -{ -} - -int netx_clcd_setup(struct clcd_fb *fb) -{ - dma_addr_t dma; - - fb->panel = netx_panel; - - fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, 1024*1024, - &dma, GFP_KERNEL); - if (!fb->fb.screen_base) { - printk(KERN_ERR "CLCD: unable to map framebuffer\n"); - return -ENOMEM; - } - - fb->fb.fix.smem_start = dma; - fb->fb.fix.smem_len = 1024*1024; - - return 0; -} - -int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) -{ - return dma_mmap_writecombine(&fb->dev->dev, vma, - fb->fb.screen_base, - fb->fb.fix.smem_start, - fb->fb.fix.smem_len); -} - -void netx_clcd_remove(struct clcd_fb *fb) -{ - dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, - fb->fb.screen_base, fb->fb.fix.smem_start); -} - -void clk_disable(struct clk *clk) -{ -} - -int clk_set_rate(struct clk *clk, unsigned long rate) -{ - return 0; -} - -int clk_enable(struct clk *clk) -{ - return 0; -} - -struct clk *clk_get(struct device *dev, const char *id) -{ - return &fb_clk; -} - -void clk_put(struct clk *clk) -{ -} - -static struct amba_device fb_device = { - .dev = { - .bus_id = "fb", - .coherent_dma_mask = ~0, - }, - .res = { - .start = 0x00104000, - .end = 0x00104fff, - .flags = IORESOURCE_MEM, - }, - .irq = { NETX_IRQ_LCD, NO_IRQ }, - .periphid = 0x10112400, -}; - -int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) -{ - netx_panel = panel; - fb_device.dev.platform_data = board; - return amba_device_register(&fb_device, &iomem_resource); -} diff --git a/arch/arm/mach-netx/fb.h b/arch/arm/mach-netx/fb.h deleted file mode 100644 index 4919cf33a..000000000 --- a/arch/arm/mach-netx/fb.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * arch/arm/mach-netx/fb.h - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -void netx_clcd_enable(struct clcd_fb *fb); -int netx_clcd_setup(struct clcd_fb *fb); -int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma); -void netx_clcd_remove(struct clcd_fb *fb); -int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel); diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c deleted file mode 100644 index af0b13534..000000000 --- a/arch/arm/mach-netx/generic.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * arch/arm/mach-netx/generic.c - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static struct map_desc netx_io_desc[] __initdata = { - { - .virtual = NETX_IO_VIRT, - .pfn = __phys_to_pfn(NETX_IO_PHYS), - .length = NETX_IO_SIZE, - .type = MT_DEVICE - } -}; - -void __init netx_map_io(void) -{ - iotable_init(netx_io_desc, ARRAY_SIZE(netx_io_desc)); -} - -static struct resource netx_rtc_resources[] = { - [0] = { - .start = 0x00101200, - .end = 0x00101220, - .flags = IORESOURCE_MEM, - }, -}; - -static struct platform_device netx_rtc_device = { - .name = "netx-rtc", - .id = 0, - .num_resources = ARRAY_SIZE(netx_rtc_resources), - .resource = netx_rtc_resources, -}; - -static struct platform_device *devices[] __initdata = { - &netx_rtc_device, -}; - -#if 0 -#define DEBUG_IRQ(fmt...) printk(fmt) -#else -#define DEBUG_IRQ(fmt...) while (0) {} -#endif - -static void -netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc, - struct pt_regs *regs) -{ - unsigned int irq = NETX_IRQ_HIF_CHAINED(0); - unsigned int stat; - - stat = ((readl(NETX_DPMAS_INT_EN) & - readl(NETX_DPMAS_INT_STAT)) >> 24) & 0x1f; - - desc = irq_desc + NETX_IRQ_HIF_CHAINED(0); - - while (stat) { - if (stat & 1) { - DEBUG_IRQ("handling irq %d\n", irq); - desc_handle_irq(irq, desc, regs); - } - irq++; - desc++; - stat >>= 1; - } -} - -static int -netx_hif_irq_type(unsigned int _irq, unsigned int type) -{ - unsigned int val, irq; - - val = readl(NETX_DPMAS_IF_CONF1); - - irq = _irq - NETX_IRQ_HIF_CHAINED(0); - - if (type & __IRQT_RISEDGE) { - DEBUG_IRQ("rising edges\n"); - val |= (1 << 26) << irq; - } - if (type & __IRQT_FALEDGE) { - DEBUG_IRQ("falling edges\n"); - val &= ~((1 << 26) << irq); - } - if (type & __IRQT_LOWLVL) { - DEBUG_IRQ("low level\n"); - val &= ~((1 << 26) << irq); - } - if (type & __IRQT_HIGHLVL) { - DEBUG_IRQ("high level\n"); - val |= (1 << 26) << irq; - } - - writel(val, NETX_DPMAS_IF_CONF1); - - return 0; -} - -static void -netx_hif_ack_irq(unsigned int _irq) -{ - unsigned int val, irq; - - irq = _irq - NETX_IRQ_HIF_CHAINED(0); - writel((1 << 24) << irq, NETX_DPMAS_INT_STAT); - - val = readl(NETX_DPMAS_INT_EN); - val &= ~((1 << 24) << irq); - writel(val, NETX_DPMAS_INT_EN); - - DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); -} - -static void -netx_hif_mask_irq(unsigned int _irq) -{ - unsigned int val, irq; - - irq = _irq - NETX_IRQ_HIF_CHAINED(0); - val = readl(NETX_DPMAS_INT_EN); - val &= ~((1 << 24) << irq); - writel(val, NETX_DPMAS_INT_EN); - DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); -} - -static void -netx_hif_unmask_irq(unsigned int _irq) -{ - unsigned int val, irq; - - irq = _irq - NETX_IRQ_HIF_CHAINED(0); - val = readl(NETX_DPMAS_INT_EN); - val |= (1 << 24) << irq; - writel(val, NETX_DPMAS_INT_EN); - DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); -} - -static struct irqchip netx_hif_chip = { - .ack = netx_hif_ack_irq, - .mask = netx_hif_mask_irq, - .unmask = netx_hif_unmask_irq, - .set_type = netx_hif_irq_type, -}; - -void __init netx_init_irq(void) -{ - int irq; - - vic_init(__io(io_p2v(NETX_PA_VIC)), 0, ~0); - - for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) { - set_irq_chip(irq, &netx_hif_chip); - set_irq_handler(irq, do_level_IRQ); - set_irq_flags(irq, IRQF_VALID); - } - - writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN); - set_irq_chained_handler(NETX_IRQ_HIF, netx_hif_demux_handler); -} - -static int __init netx_init(void) -{ - return platform_add_devices(devices, ARRAY_SIZE(devices)); -} - -subsys_initcall(netx_init); - diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h deleted file mode 100644 index ede2d3534..000000000 --- a/arch/arm/mach-netx/generic.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * arch/arm/mach-netx/generic.h - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -extern void __init netx_map_io(void); -extern void __init netx_init_irq(void); - -struct sys_timer; -extern struct sys_timer netx_timer; diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c deleted file mode 100644 index e4a133d62..000000000 --- a/arch/arm/mach-netx/nxdb500.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * arch/arm/mach-netx/nxdb500.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "generic.h" -#include "fb.h" - -static struct clcd_panel qvga = { - .mode = { - .name = "QVGA", - .refresh = 60, - .xres = 240, - .yres = 320, - .pixclock = 187617, - .left_margin = 6, - .right_margin = 26, - .upper_margin = 0, - .lower_margin = 6, - .hsync_len = 6, - .vsync_len = 1, - .sync = 0, - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = 16, - .cntl = CNTL_LCDTFT | CNTL_BGR, - .bpp = 16, - .grayscale = 0, -}; - -static inline int nxdb500_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) -{ - var->green.length = 5; - var->green.msb_right = 0; - - return clcdfb_check(fb, var); -} - -static int nxdb500_clcd_setup(struct clcd_fb *fb) -{ - unsigned int val; - - fb->fb.var.green.length = 5; - fb->fb.var.green.msb_right = 0; - - /* enable asic control */ - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(3, NETX_SYSTEM_IOC_CR); - - val = readl(NETX_PIO_OUTPIO); - writel(val | 1, NETX_PIO_OUTPIO); - - val = readl(NETX_PIO_OEPIO); - writel(val | 1, NETX_PIO_OEPIO); - return netx_clcd_setup(fb); -} - -static struct clcd_board clcd_data = { - .name = "netX", - .check = nxdb500_check, - .decode = clcdfb_decode, - .enable = netx_clcd_enable, - .setup = nxdb500_clcd_setup, - .mmap = netx_clcd_mmap, - .remove = netx_clcd_remove, -}; - -static struct netxeth_platform_data eth0_platform_data = { - .xcno = 0, -}; - -static struct platform_device netx_eth0_device = { - .name = "netx-eth", - .id = 0, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð0_platform_data, - } -}; - -static struct netxeth_platform_data eth1_platform_data = { - .xcno = 1, -}; - -static struct platform_device netx_eth1_device = { - .name = "netx-eth", - .id = 1, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð1_platform_data, - } -}; - -static struct resource netx_uart0_resources[] = { - [0] = { - .start = 0x00100A00, - .end = 0x00100A3F, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = (NETX_IRQ_UART0), - .end = (NETX_IRQ_UART0), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device netx_uart0_device = { - .name = "netx-uart", - .id = 0, - .num_resources = ARRAY_SIZE(netx_uart0_resources), - .resource = netx_uart0_resources, -}; - -static struct resource netx_uart1_resources[] = { - [0] = { - .start = 0x00100A40, - .end = 0x00100A7F, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = (NETX_IRQ_UART1), - .end = (NETX_IRQ_UART1), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device netx_uart1_device = { - .name = "netx-uart", - .id = 1, - .num_resources = ARRAY_SIZE(netx_uart1_resources), - .resource = netx_uart1_resources, -}; - -static struct resource netx_uart2_resources[] = { - [0] = { - .start = 0x00100A80, - .end = 0x00100ABF, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = (NETX_IRQ_UART2), - .end = (NETX_IRQ_UART2), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device netx_uart2_device = { - .name = "netx-uart", - .id = 2, - .num_resources = ARRAY_SIZE(netx_uart2_resources), - .resource = netx_uart2_resources, -}; - -static struct platform_device *devices[] __initdata = { - &netx_eth0_device, - &netx_eth1_device, - &netx_uart0_device, - &netx_uart1_device, - &netx_uart2_device, -}; - -static void __init nxdb500_init(void) -{ - netx_fb_init(&clcd_data, &qvga); - platform_add_devices(devices, ARRAY_SIZE(devices)); -} - -MACHINE_START(NXDB500, "Hilscher nxdb500") - .phys_io = 0x00100000, - .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, - .boot_params = 0x80000100, - .map_io = netx_map_io, - .init_irq = netx_init_irq, - .timer = &netx_timer, - .init_machine = nxdb500_init, -MACHINE_END diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c deleted file mode 100644 index 7e26c42d1..000000000 --- a/arch/arm/mach-netx/nxdkn.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * arch/arm/mach-netx/nxdkn.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "generic.h" - -static struct netxeth_platform_data eth0_platform_data = { - .xcno = 0, -}; - -static struct platform_device nxdkn_eth0_device = { - .name = "netx-eth", - .id = 0, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð0_platform_data, - } -}; - -static struct netxeth_platform_data eth1_platform_data = { - .xcno = 1, -}; - -static struct platform_device nxdkn_eth1_device = { - .name = "netx-eth", - .id = 1, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð1_platform_data, - } -}; - -static struct resource netx_uart0_resources[] = { - [0] = { - .start = 0x00100A00, - .end = 0x00100A3F, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = (NETX_IRQ_UART0), - .end = (NETX_IRQ_UART0), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device netx_uart0_device = { - .name = "netx-uart", - .id = 0, - .num_resources = ARRAY_SIZE(netx_uart0_resources), - .resource = netx_uart0_resources, -}; - -static struct platform_device *devices[] __initdata = { - &nxdkn_eth0_device, - &nxdkn_eth1_device, - &netx_uart0_device, -}; - -static void __init nxdkn_init(void) -{ - platform_add_devices(devices, ARRAY_SIZE(devices)); -} - -MACHINE_START(NXDKN, "Hilscher nxdkn") - .phys_io = 0x00100000, - .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, - .boot_params = 0x80000100, - .map_io = netx_map_io, - .init_irq = netx_init_irq, - .timer = &netx_timer, - .init_machine = nxdkn_init, -MACHINE_END diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c deleted file mode 100644 index 53e10a984..000000000 --- a/arch/arm/mach-netx/nxeb500hmi.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * arch/arm/mach-netx/nxeb500hmi.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "generic.h" -#include "fb.h" - -static struct clcd_panel qvga = { - .mode = { - .name = "QVGA", - .refresh = 60, - .xres = 240, - .yres = 320, - .pixclock = 187617, - .left_margin = 6, - .right_margin = 26, - .upper_margin = 0, - .lower_margin = 6, - .hsync_len = 6, - .vsync_len = 1, - .sync = 0, - .vmode = FB_VMODE_NONINTERLACED, - }, - .width = -1, - .height = -1, - .tim2 = 16, - .cntl = CNTL_LCDTFT | CNTL_BGR, - .bpp = 16, - .grayscale = 0, -}; - -static inline int nxeb500hmi_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) -{ - var->green.length = 5; - var->green.msb_right = 0; - - return clcdfb_check(fb, var); -} - -static int nxeb500hmi_clcd_setup(struct clcd_fb *fb) -{ - unsigned int val; - - fb->fb.var.green.length = 5; - fb->fb.var.green.msb_right = 0; - - /* enable asic control */ - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(3, NETX_SYSTEM_IOC_CR); - - /* GPIO 14 is used for display enable on newer boards */ - writel(9, NETX_GPIO_CFG(14)); - - val = readl(NETX_PIO_OUTPIO); - writel(val | 1, NETX_PIO_OUTPIO); - - val = readl(NETX_PIO_OEPIO); - writel(val | 1, NETX_PIO_OEPIO); - return netx_clcd_setup(fb); -} - -static struct clcd_board clcd_data = { - .name = "netX", - .check = nxeb500hmi_check, - .decode = clcdfb_decode, - .enable = netx_clcd_enable, - .setup = nxeb500hmi_clcd_setup, - .mmap = netx_clcd_mmap, - .remove = netx_clcd_remove, -}; - -static struct netxeth_platform_data eth0_platform_data = { - .xcno = 0, -}; - -static struct platform_device netx_eth0_device = { - .name = "netx-eth", - .id = 0, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð0_platform_data, - } -}; - -static struct netxeth_platform_data eth1_platform_data = { - .xcno = 1, -}; - -static struct platform_device netx_eth1_device = { - .name = "netx-eth", - .id = 1, - .num_resources = 0, - .resource = NULL, - .dev = { - .platform_data = ð1_platform_data, - } -}; - -static struct resource netx_cf_resources[] = { - [0] = { - .start = 0x20000000, - .end = 0x25ffffff, - .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, - }, -}; - -static struct platform_device netx_cf_device = { - .name = "netx-cf", - .id = 0, - .resource = netx_cf_resources, - .num_resources = ARRAY_SIZE(netx_cf_resources), -}; - -static struct resource netx_uart0_resources[] = { - [0] = { - .start = 0x00100A00, - .end = 0x00100A3F, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = (NETX_IRQ_UART0), - .end = (NETX_IRQ_UART0), - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device netx_uart0_device = { - .name = "netx-uart", - .id = 0, - .num_resources = ARRAY_SIZE(netx_uart0_resources), - .resource = netx_uart0_resources, -}; - -static struct platform_device *devices[] __initdata = { - &netx_eth0_device, - &netx_eth1_device, - &netx_cf_device, - &netx_uart0_device, -}; - -static void __init nxeb500hmi_init(void) -{ - netx_fb_init(&clcd_data, &qvga); - platform_add_devices(devices, ARRAY_SIZE(devices)); -} - -MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi") - .phys_io = 0x00100000, - .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, - .boot_params = 0x80000100, - .map_io = netx_map_io, - .init_irq = netx_init_irq, - .timer = &netx_timer, - .init_machine = nxeb500hmi_init, -MACHINE_END diff --git a/arch/arm/mach-netx/pfifo.c b/arch/arm/mach-netx/pfifo.c deleted file mode 100644 index 44dea61a9..000000000 --- a/arch/arm/mach-netx/pfifo.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * arch/arm/mach-netx/pfifo.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include - -#include -#include -#include -#include - -static DEFINE_MUTEX(pfifo_lock); - -static unsigned int pfifo_used = 0; - -int pfifo_request(unsigned int pfifo_mask) -{ - int err = 0; - unsigned int val; - - mutex_lock(&pfifo_lock); - - if (pfifo_mask & pfifo_used) { - err = -EBUSY; - goto out; - } - - pfifo_used |= pfifo_mask; - - val = readl(NETX_PFIFO_RESET); - writel(val | pfifo_mask, NETX_PFIFO_RESET); - writel(val, NETX_PFIFO_RESET); - -out: - mutex_unlock(&pfifo_lock); - return err; -} - -void pfifo_free(unsigned int pfifo_mask) -{ - mutex_lock(&pfifo_lock); - pfifo_used &= ~pfifo_mask; - mutex_unlock(&pfifo_lock); -} - -EXPORT_SYMBOL(pfifo_push); -EXPORT_SYMBOL(pfifo_pop); -EXPORT_SYMBOL(pfifo_fill_level); -EXPORT_SYMBOL(pfifo_empty); -EXPORT_SYMBOL(pfifo_request); -EXPORT_SYMBOL(pfifo_free); diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c deleted file mode 100644 index 6d72c81b7..000000000 --- a/arch/arm/mach-netx/time.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * arch/arm/mach-netx/time.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include -#include -#include -#include - -/* - * Returns number of us since last clock interrupt. Note that interrupts - * will have been disabled by do_gettimeoffset() - */ -static unsigned long netx_gettimeoffset(void) -{ - return readl(NETX_GPIO_COUNTER_CURRENT(0)) / 100; -} - -/* - * IRQ handler for the timer - */ -static irqreturn_t -netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - write_seqlock(&xtime_lock); - - timer_tick(regs); - write_sequnlock(&xtime_lock); - - /* acknowledge interrupt */ - writel(COUNTER_BIT(0), NETX_GPIO_IRQ); - - return IRQ_HANDLED; -} - - -static struct irqaction netx_timer_irq = { - .name = "NetX Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = netx_timer_interrupt, -}; - -/* - * Set up timer interrupt - */ -static void __init netx_timer_init(void) -{ - /* disable timer initially */ - writel(0, NETX_GPIO_COUNTER_CTRL(0)); - - /* Reset the timer value to zero */ - writel(0, NETX_GPIO_COUNTER_CURRENT(0)); - - writel(LATCH, NETX_GPIO_COUNTER_MAX(0)); - - /* acknowledge interrupt */ - writel(COUNTER_BIT(0), NETX_GPIO_IRQ); - - /* Enable the interrupt in the specific timer register and start timer */ - writel(COUNTER_BIT(0), NETX_GPIO_IRQ_ENABLE); - writel(NETX_GPIO_COUNTER_CTRL_IRQ_EN | NETX_GPIO_COUNTER_CTRL_RUN, - NETX_GPIO_COUNTER_CTRL(0)); - - setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); -} - -struct sys_timer netx_timer = { - .init = netx_timer_init, - .offset = netx_gettimeoffset, -}; diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c deleted file mode 100644 index 172a058dd..000000000 --- a/arch/arm/mach-netx/xc.c +++ /dev/null @@ -1,255 +0,0 @@ -/* - * arch/arm/mach-netx/xc.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include - -static DEFINE_MUTEX(xc_lock); - -static int xc_in_use = 0; - -struct fw_desc { - unsigned int ofs; - unsigned int size; - unsigned int patch_ofs; - unsigned int patch_entries; -}; - -struct fw_header { - unsigned int magic; - unsigned int type; - unsigned int version; - unsigned int reserved[5]; - struct fw_desc fw_desc[3]; -} __attribute__ ((packed)); - -int xc_stop(struct xc *x) -{ - writel(RPU_HOLD_PC, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS); - writel(TPU_HOLD_PC, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS); - writel(XPU_HOLD_PC, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS); - return 0; -} - -int xc_start(struct xc *x) -{ - writel(0, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS); - writel(0, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS); - writel(0, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS); - return 0; -} - -int xc_running(struct xc *x) -{ - return (readl(x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS) & RPU_HOLD_PC) - || (readl(x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS) & TPU_HOLD_PC) - || (readl(x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS) & XPU_HOLD_PC) ? - 0 : 1; -} - -int xc_reset(struct xc *x) -{ - writel(0, x->xpec_base + NETX_XPEC_PC_OFS); - return 0; -} - -static int xc_check_ptr(struct xc *x, unsigned long adr, unsigned int size) -{ - if (adr >= NETX_PA_XMAC(x->no) && - adr + size < NETX_PA_XMAC(x->no) + XMAC_MEM_SIZE) - return 0; - - if (adr >= NETX_PA_XPEC(x->no) && - adr + size < NETX_PA_XPEC(x->no) + XPEC_MEM_SIZE) - return 0; - - dev_err(x->dev, "Illegal pointer in firmware found. aborting\n"); - - return -1; -} - -static int xc_patch(struct xc *x, void *patch, int count) -{ - unsigned int val, adr; - unsigned int *data = patch; - - int i; - for (i = 0; i < count; i++) { - adr = *data++; - val = *data++; - if (xc_check_ptr(x, adr, 4) < 0) - return -EINVAL; - - writel(val, (void __iomem *)io_p2v(adr)); - } - return 0; -} - -int xc_request_firmware(struct xc *x) -{ - int ret; - char name[16]; - const struct firmware *fw; - struct fw_header *head; - unsigned int size; - int i; - void *src; - unsigned long dst; - - sprintf(name, "xc%d.bin", x->no); - - ret = request_firmware(&fw, name, x->dev); - - if (ret < 0) { - dev_err(x->dev, "request_firmware failed\n"); - return ret; - } - - head = (struct fw_header *)fw->data; - if (head->magic != 0x4e657458) { - if (head->magic == 0x5874654e) { - dev_err(x->dev, - "firmware magic is 'XteN'. Endianess problems?\n"); - ret = -ENODEV; - goto exit_release_firmware; - } - dev_err(x->dev, "unrecognized firmware magic 0x%08x\n", - head->magic); - ret = -ENODEV; - goto exit_release_firmware; - } - - x->type = head->type; - x->version = head->version; - - ret = -EINVAL; - - for (i = 0; i < 3; i++) { - src = fw->data + head->fw_desc[i].ofs; - dst = *(unsigned int *)src; - src += sizeof (unsigned int); - size = head->fw_desc[i].size - sizeof (unsigned int); - - if (xc_check_ptr(x, dst, size)) - goto exit_release_firmware; - - memcpy((void *)io_p2v(dst), src, size); - - src = fw->data + head->fw_desc[i].patch_ofs; - size = head->fw_desc[i].patch_entries; - ret = xc_patch(x, src, size); - if (ret < 0) - goto exit_release_firmware; - } - - ret = 0; - - exit_release_firmware: - release_firmware(fw); - - return ret; -} - -struct xc *request_xc(int xcno, struct device *dev) -{ - struct xc *x = NULL; - - mutex_lock(&xc_lock); - - if (xcno > 3) - goto exit; - if (xc_in_use & (1 << xcno)) - goto exit; - - x = kmalloc(sizeof (struct xc), GFP_KERNEL); - if (!x) - goto exit; - - if (!request_mem_region - (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, dev->kobj.name)) - goto exit_free; - - if (!request_mem_region - (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, dev->kobj.name)) - goto exit_release_1; - - if (!request_mem_region - (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, dev->kobj.name)) - goto exit_release_2; - - x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno)); - x->xmac_base = (void * __iomem)io_p2v(NETX_PA_XMAC(xcno)); - x->sram_base = ioremap(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); - if (!x->sram_base) - goto exit_release_3; - - x->irq = NETX_IRQ_XPEC(xcno); - - x->no = xcno; - x->dev = dev; - - xc_in_use |= (1 << xcno); - - goto exit; - - exit_release_3: - release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); - exit_release_2: - release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); - exit_release_1: - release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); - exit_free: - kfree(x); - x = NULL; - exit: - mutex_unlock(&xc_lock); - return x; -} - -void free_xc(struct xc *x) -{ - int xcno = x->no; - - mutex_lock(&xc_lock); - - iounmap(x->sram_base); - release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); - release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); - release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); - xc_in_use &= ~(1 << x->no); - kfree(x); - - mutex_unlock(&xc_lock); -} - -EXPORT_SYMBOL(free_xc); -EXPORT_SYMBOL(request_xc); -EXPORT_SYMBOL(xc_request_firmware); -EXPORT_SYMBOL(xc_reset); -EXPORT_SYMBOL(xc_running); -EXPORT_SYMBOL(xc_start); -EXPORT_SYMBOL(xc_stop); diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index d135568dc..f8d716ccc 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -62,13 +62,6 @@ config MACH_OMAP_PERSEUS2 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such a board. -config MACH_OMAP_FSAMPLE - bool "TI F-Sample" - depends on ARCH_OMAP1 && ARCH_OMAP730 - help - Support for TI OMAP 850 F-Sample board. Say Y here if you have such - a board. - config MACH_VOICEBLUE bool "Voiceblue" depends on ARCH_OMAP1 && ARCH_OMAP15XX diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 7165f74f7..9ea719550 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile @@ -17,7 +17,6 @@ obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o -obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 8437d065a..6178f046f 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -80,24 +80,8 @@ static struct omap_uart_config ams_delta_uart_config __initdata = { .enabled_uarts = 1, }; -static struct omap_usb_config ams_delta_usb_config __initdata = { - .register_host = 1, - .hmc_mode = 16, - .pins[0] = 2, -}; - static struct omap_board_config_kernel ams_delta_config[] = { { OMAP_TAG_UART, &ams_delta_uart_config }, - { OMAP_TAG_USB, &ams_delta_usb_config }, -}; - -static struct platform_device ams_delta_led_device = { - .name = "ams-delta-led", - .id = -1 -}; - -static struct platform_device *ams_delta_devices[] __initdata = { - &ams_delta_led_device, }; static void __init ams_delta_init(void) @@ -110,8 +94,6 @@ static void __init ams_delta_init(void) /* Clear latch2 (NAND, LCD, modem enable) */ ams_delta_latch2_write(~0, 0); - - platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices)); } static void __init ams_delta_map_io(void) diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c deleted file mode 100644 index c753a3c5a..000000000 --- a/arch/arm/mach-omap1/board-fsample.c +++ /dev/null @@ -1,319 +0,0 @@ -/* - * linux/arch/arm/mach-omap1/board-fsample.c - * - * Modified from board-perseus2.c - * - * Original OMAP730 support by Jean Pihet - * Updated for 2.6 by Kevin Hilman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static int fsample_keymap[] = { - KEY(0,0,KEY_UP), - KEY(0,1,KEY_RIGHT), - KEY(0,2,KEY_LEFT), - KEY(0,3,KEY_DOWN), - KEY(0,4,KEY_CENTER), - KEY(0,5,KEY_0_5), - KEY(1,0,KEY_SOFT2), - KEY(1,1,KEY_SEND), - KEY(1,2,KEY_END), - KEY(1,3,KEY_VOLUMEDOWN), - KEY(1,4,KEY_VOLUMEUP), - KEY(1,5,KEY_RECORD), - KEY(2,0,KEY_SOFT1), - KEY(2,1,KEY_3), - KEY(2,2,KEY_6), - KEY(2,3,KEY_9), - KEY(2,4,KEY_SHARP), - KEY(2,5,KEY_2_5), - KEY(3,0,KEY_BACK), - KEY(3,1,KEY_2), - KEY(3,2,KEY_5), - KEY(3,3,KEY_8), - KEY(3,4,KEY_0), - KEY(3,5,KEY_HEADSETHOOK), - KEY(4,0,KEY_HOME), - KEY(4,1,KEY_1), - KEY(4,2,KEY_4), - KEY(4,3,KEY_7), - KEY(4,4,KEY_STAR), - KEY(4,5,KEY_POWER), - 0 -}; - -static struct resource smc91x_resources[] = { - [0] = { - .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ - .end = H2P2_DBG_FPGA_ETHR_START + 0xf, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = INT_730_MPU_EXT_NIRQ, - .end = 0, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct mtd_partition nor_partitions[] = { - /* bootloader (U-Boot, etc) in first sector */ - { - .name = "bootloader", - .offset = 0, - .size = SZ_128K, - .mask_flags = MTD_WRITEABLE, /* force read-only */ - }, - /* bootloader params in the next sector */ - { - .name = "params", - .offset = MTDPART_OFS_APPEND, - .size = SZ_128K, - .mask_flags = 0, - }, - /* kernel */ - { - .name = "kernel", - .offset = MTDPART_OFS_APPEND, - .size = SZ_2M, - .mask_flags = 0 - }, - /* rest of flash is a file system */ - { - .name = "rootfs", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - .mask_flags = 0 - }, -}; - -static struct flash_platform_data nor_data = { - .map_name = "cfi_probe", - .width = 2, - .parts = nor_partitions, - .nr_parts = ARRAY_SIZE(nor_partitions), -}; - -static struct resource nor_resource = { - .start = OMAP_CS0_PHYS, - .end = OMAP_CS0_PHYS + SZ_32M - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device nor_device = { - .name = "omapflash", - .id = 0, - .dev = { - .platform_data = &nor_data, - }, - .num_resources = 1, - .resource = &nor_resource, -}; - -static struct nand_platform_data nand_data = { - .options = NAND_SAMSUNG_LP_OPTIONS, -}; - -static struct resource nand_resource = { - .start = OMAP_CS3_PHYS, - .end = OMAP_CS3_PHYS + SZ_4K - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device nand_device = { - .name = "omapnand", - .id = 0, - .dev = { - .platform_data = &nand_data, - }, - .num_resources = 1, - .resource = &nand_resource, -}; - -static struct platform_device smc91x_device = { - .name = "smc91x", - .id = 0, - .num_resources = ARRAY_SIZE(smc91x_resources), - .resource = smc91x_resources, -}; - -static struct resource kp_resources[] = { - [0] = { - .start = INT_730_MPUIO_KEYPAD, - .end = INT_730_MPUIO_KEYPAD, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct omap_kp_platform_data kp_data = { - .rows = 8, - .cols = 8, - .keymap = fsample_keymap, -}; - -static struct platform_device kp_device = { - .name = "omap-keypad", - .id = -1, - .dev = { - .platform_data = &kp_data, - }, - .num_resources = ARRAY_SIZE(kp_resources), - .resource = kp_resources, -}; - -static struct platform_device lcd_device = { - .name = "lcd_p2", - .id = -1, -}; - -static struct platform_device *devices[] __initdata = { - &nor_device, - &nand_device, - &smc91x_device, - &kp_device, - &lcd_device, -}; - -#define P2_NAND_RB_GPIO_PIN 62 - -static int nand_dev_ready(struct nand_platform_data *data) -{ - return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); -} - -static struct omap_uart_config fsample_uart_config __initdata = { - .enabled_uarts = ((1 << 0) | (1 << 1)), -}; - -static struct omap_lcd_config fsample_lcd_config __initdata = { - .ctrl_name = "internal", -}; - -static struct omap_board_config_kernel fsample_config[] = { - { OMAP_TAG_UART, &fsample_uart_config }, - { OMAP_TAG_LCD, &fsample_lcd_config }, -}; - -static void __init omap_fsample_init(void) -{ - if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) - nand_data.dev_ready = nand_dev_ready; - - omap_cfg_reg(L3_1610_FLASH_CS2B_OE); - omap_cfg_reg(M8_1610_FLASH_CS2B_WE); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - - omap_board_config = fsample_config; - omap_board_config_size = ARRAY_SIZE(fsample_config); - omap_serial_init(); -} - -static void __init fsample_init_smc91x(void) -{ - fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); - mdelay(50); - fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1, - H2P2_DBG_FPGA_LAN_RESET); - mdelay(50); -} - -void omap_fsample_init_irq(void) -{ - omap1_init_common_hw(); - omap_init_irq(); - omap_gpio_init(); - fsample_init_smc91x(); -} - -/* Only FPGA needs to be mapped here. All others are done with ioremap */ -static struct map_desc omap_fsample_io_desc[] __initdata = { - { - .virtual = H2P2_DBG_FPGA_BASE, - .pfn = __phys_to_pfn(H2P2_DBG_FPGA_START), - .length = H2P2_DBG_FPGA_SIZE, - .type = MT_DEVICE - }, - { - .virtual = FSAMPLE_CPLD_BASE, - .pfn = __phys_to_pfn(FSAMPLE_CPLD_START), - .length = FSAMPLE_CPLD_SIZE, - .type = MT_DEVICE - } -}; - -static void __init omap_fsample_map_io(void) -{ - omap1_map_common_io(); - iotable_init(omap_fsample_io_desc, - ARRAY_SIZE(omap_fsample_io_desc)); - - /* Early, board-dependent init */ - - /* - * Hold GSM Reset until needed - */ - omap_writew(omap_readw(OMAP730_DSP_M_CTL) & ~1, OMAP730_DSP_M_CTL); - - /* - * UARTs -> done automagically by 8250 driver - */ - - /* - * CSx timings, GPIO Mux ... setup - */ - - /* Flash: CS0 timings setup */ - omap_writel(0x0000fff3, OMAP730_FLASH_CFG_0); - omap_writel(0x00000088, OMAP730_FLASH_ACFG_0); - - /* - * Ethernet support through the debug board - * CS1 timings setup - */ - omap_writel(0x0000fff3, OMAP730_FLASH_CFG_1); - omap_writel(0x00000000, OMAP730_FLASH_ACFG_1); - - /* - * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, - * It is used as the Ethernet controller interrupt - */ - omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9); -} - -MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") -/* Maintainer: Brian Swetland */ - .phys_io = 0xfff00000, - .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, - .boot_params = 0x10000100, - .map_io = omap_fsample_map_io, - .init_irq = omap_fsample_init_irq, - .init_machine = omap_fsample_init, - .timer = &omap_timer, -MACHINE_END diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 7b206116c..4b8d0ec73 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -14,6 +14,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 4cbc62db5..e90c137a4 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -37,8 +37,6 @@ #include #include #include -#include -#include static int innovator_keymap[] = { KEY(0, 0, KEY_F1), @@ -114,42 +112,6 @@ static struct platform_device innovator_flash_device = { .resource = &innovator_flash_resource, }; -#define DEFAULT_BITPERSAMPLE 16 - -static struct omap_mcbsp_reg_cfg mcbsp_regs = { - .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), - .spcr1 = RINTM(3) | RRST, - .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) | - RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0), - .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16), - .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | - XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG, - .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16), - .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1), - .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1), - /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */ - .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ -}; - -static struct omap_alsa_codec_config alsa_config = { - .name = "OMAP Innovator AIC23", - .mcbsp_regs_alsa = &mcbsp_regs, - .codec_configure_dev = NULL, // aic23_configure, - .codec_set_samplerate = NULL, // aic23_set_samplerate, - .codec_clock_setup = NULL, // aic23_clock_setup, - .codec_clock_on = NULL, // aic23_clock_on, - .codec_clock_off = NULL, // aic23_clock_off, - .get_default_samplerate = NULL, // aic23_get_default_samplerate, -}; - -static struct platform_device innovator_mcbsp1_device = { - .name = "omap_alsa_mcbsp", - .id = 1, - .dev = { - .platform_data = &alsa_config, - }, -}; - static struct resource innovator_kp_resources[] = { [0] = { .start = INT_KEYBOARD, @@ -177,10 +139,6 @@ static struct platform_device innovator_kp_device = { #ifdef CONFIG_ARCH_OMAP15XX -#include -#include - - /* Only FPGA needs to be mapped here. All others are done with ioremap */ static struct map_desc innovator1510_io_desc[] __initdata = { { @@ -216,44 +174,13 @@ static struct platform_device innovator1510_lcd_device = { .id = -1, }; -static struct platform_device innovator1510_spi_device = { - .name = "spi_inn1510", - .id = -1, -}; - static struct platform_device *innovator1510_devices[] __initdata = { &innovator_flash_device, &innovator1510_smc91x_device, - &innovator_mcbsp1_device, &innovator_kp_device, &innovator1510_lcd_device, - &innovator1510_spi_device, }; -static int innovator_get_pendown_state(void) -{ - return !(fpga_read(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5)); -} - -static const struct ads7846_platform_data innovator1510_ts_info = { - .model = 7846, - .vref_delay_usecs = 100, /* internal, no capacitor */ - .x_plate_ohms = 419, - .y_plate_ohms = 486, - .get_pendown_state = innovator_get_pendown_state, -}; - -static struct spi_board_info __initdata innovator1510_boardinfo[] = { { - /* FPGA (bus "10") CS0 has an ads7846e */ - .modalias = "ads7846", - .platform_data = &innovator1510_ts_info, - .irq = OMAP1510_INT_FPGA_TS, - .max_speed_hz = 120000 /* max sample rate at 3V */ - * 26 /* command + data + overhead */, - .bus_num = 10, - .chip_select = 0, -} }; - #endif /* CONFIG_ARCH_OMAP15XX */ #ifdef CONFIG_ARCH_OMAP16XX @@ -384,8 +311,6 @@ static void __init innovator_init(void) #ifdef CONFIG_ARCH_OMAP15XX if (cpu_is_omap1510()) { platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); - spi_register_board_info(innovator1510_boardinfo, - ARRAY_SIZE(innovator1510_boardinfo)); } #endif #ifdef CONFIG_ARCH_OMAP16XX diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index b742261c9..1160093e8 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -29,10 +29,11 @@ #include #include #include -#include +#include #include #include +#include #include #include @@ -44,10 +45,25 @@ #include #include #include +#include #include #include #include +static int osk_keymap[] = { + KEY(0, 0, KEY_F1), + KEY(0, 3, KEY_UP), + KEY(1, 1, KEY_LEFTCTRL), + KEY(1, 2, KEY_LEFT), + KEY(2, 0, KEY_SPACE), + KEY(2, 1, KEY_ESC), + KEY(2, 2, KEY_DOWN), + KEY(3, 2, KEY_ENTER), + KEY(3, 3, KEY_RIGHT), + 0 +}; + + static struct mtd_partition osk_partitions[] = { /* bootloader (U-Boot, etc) in first sector */ { @@ -165,17 +181,48 @@ static struct omap_alsa_codec_config alsa_config = { static struct platform_device osk5912_mcbsp1_device = { .name = "omap_alsa_mcbsp", - .id = 1, + .id = 1, .dev = { .platform_data = &alsa_config, }, }; +static struct resource osk5912_kp_resources[] = { + [0] = { + .start = INT_KEYBOARD, + .end = INT_KEYBOARD, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct omap_kp_platform_data osk_kp_data = { + .rows = 8, + .cols = 8, + .keymap = osk_keymap, +}; + +static struct platform_device osk5912_kp_device = { + .name = "omap-keypad", + .id = -1, + .dev = { + .platform_data = &osk_kp_data, + }, + .num_resources = ARRAY_SIZE(osk5912_kp_resources), + .resource = osk5912_kp_resources, +}; + +static struct platform_device osk5912_lcd_device = { + .name = "lcd_osk", + .id = -1, +}; + static struct platform_device *osk5912_devices[] __initdata = { &osk5912_flash_device, &osk5912_smc91x_device, &osk5912_cf_device, &osk5912_mcbsp1_device, + &osk5912_kp_device, + &osk5912_lcd_device, }; static void __init osk_init_smc91x(void) @@ -229,100 +276,18 @@ static struct omap_uart_config osk_uart_config __initdata = { .enabled_uarts = (1 << 0), }; -#ifdef CONFIG_OMAP_OSK_MISTRAL static struct omap_lcd_config osk_lcd_config __initdata = { .ctrl_name = "internal", }; -#endif static struct omap_board_config_kernel osk_config[] = { { OMAP_TAG_USB, &osk_usb_config }, { OMAP_TAG_UART, &osk_uart_config }, -#ifdef CONFIG_OMAP_OSK_MISTRAL { OMAP_TAG_LCD, &osk_lcd_config }, -#endif }; #ifdef CONFIG_OMAP_OSK_MISTRAL -#include -#include -#include - -#include - -static const int osk_keymap[] = { - /* KEY(col, row, code) */ - KEY(0, 0, KEY_F1), /* SW4 */ - KEY(0, 3, KEY_UP), /* (sw2/up) */ - KEY(1, 1, KEY_LEFTCTRL), /* SW5 */ - KEY(1, 2, KEY_LEFT), /* (sw2/left) */ - KEY(2, 0, KEY_SPACE), /* SW3 */ - KEY(2, 1, KEY_ESC), /* SW6 */ - KEY(2, 2, KEY_DOWN), /* (sw2/down) */ - KEY(3, 2, KEY_ENTER), /* (sw2/select) */ - KEY(3, 3, KEY_RIGHT), /* (sw2/right) */ - 0 -}; - -static struct omap_kp_platform_data osk_kp_data = { - .rows = 8, - .cols = 8, - .keymap = (int *) osk_keymap, -}; - -static struct resource osk5912_kp_resources[] = { - [0] = { - .start = INT_KEYBOARD, - .end = INT_KEYBOARD, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device osk5912_kp_device = { - .name = "omap-keypad", - .id = -1, - .dev = { - .platform_data = &osk_kp_data, - }, - .num_resources = ARRAY_SIZE(osk5912_kp_resources), - .resource = osk5912_kp_resources, -}; - -static struct platform_device osk5912_lcd_device = { - .name = "lcd_osk", - .id = -1, -}; - -static struct platform_device *mistral_devices[] __initdata = { - &osk5912_kp_device, - &osk5912_lcd_device, -}; - -static int mistral_get_pendown_state(void) -{ - return !omap_get_gpio_datain(4); -} - -static const struct ads7846_platform_data mistral_ts_info = { - .model = 7846, - .vref_delay_usecs = 100, /* internal, no capacitor */ - .x_plate_ohms = 419, - .y_plate_ohms = 486, - .get_pendown_state = mistral_get_pendown_state, -}; - -static struct spi_board_info __initdata mistral_boardinfo[] = { { - /* MicroWire (bus 2) CS0 has an ads7846e */ - .modalias = "ads7846", - .platform_data = &mistral_ts_info, - .irq = OMAP_GPIO_IRQ(4), - .max_speed_hz = 120000 /* max sample rate at 3V */ - * 26 /* command + data + overhead */, - .bus_num = 2, - .chip_select = 0, -} }; - #ifdef CONFIG_PM static irqreturn_t osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) @@ -333,18 +298,14 @@ osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) static void __init osk_mistral_init(void) { - /* NOTE: we could actually tell if there's a Mistral board + /* FIXME here's where to feed in framebuffer, touchpad, and + * keyboard setup ... not in the drivers for those devices! + * + * NOTE: we could actually tell if there's a Mistral board * attached, e.g. by trying to read something from the ads7846. - * But this arch_init() code is too early for that, since we - * can't talk to the ads or even the i2c eeprom. + * But this is too early for that... */ - // omap_cfg_reg(P19_1610_GPIO6); // BUSY - omap_cfg_reg(P20_1610_GPIO4); // PENIRQ - set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING); - spi_register_board_info(mistral_boardinfo, - ARRAY_SIZE(mistral_boardinfo)); - /* the sideways button (SW1) is for use as a "wakeup" button */ omap_cfg_reg(N15_1610_MPUIO2); if (omap_request_gpio(OMAP_MPUIO(2)) == 0) { @@ -357,7 +318,7 @@ static void __init osk_mistral_init(void) */ ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), &osk_mistral_wake_interrupt, - IRQF_SHARED, "mistral_wakeup", + SA_SHIRQ, "mistral_wakeup", &osk_mistral_wake_interrupt); if (ret != 0) { omap_free_gpio(OMAP_MPUIO(2)); @@ -368,8 +329,6 @@ static void __init osk_mistral_init(void) #endif } else printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); - - platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); } #else static void __init osk_mistral_init(void) { } diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index f1958e882..619db1814 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -1,4 +1,3 @@ -//kernel/linux-omap-fsample/arch/arm/mach-omap1/clock.c#2 - edit change 3808 (text) /* * linux/arch/arm/mach-omap1/clock.c * @@ -21,7 +20,6 @@ #include -#include #include #include #include @@ -272,12 +270,8 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate) /* * In most cases we should not need to reprogram DPLL. * Reprogramming the DPLL is tricky, it must be done from SRAM. - * (on 730, bit 13 must always be 1) */ - if (cpu_is_omap730()) - omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000); - else - omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); + omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); ck_dpll1.rate = ptr->pll_rate; propagate_rate(&ck_dpll1); @@ -754,7 +748,7 @@ int __init omap1_clk_init(void) printk(KERN_ERR "System frequencies not set. Check your config.\n"); /* Guess sane values (60MHz) */ omap_writew(0x2290, DPLL_CTL); - omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL); + omap_writew(0x1005, ARM_CKCTL); ck_dpll1.rate = 60000000; propagate_rate(&ck_dpll1); } @@ -767,17 +761,13 @@ int __init omap1_clk_init(void) ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); -#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE) +#ifdef CONFIG_MACH_OMAP_PERSEUS2 /* Select slicer output as OMAP input clock */ omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); #endif /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ - /* (on 730, bit 13 must not be cleared) */ - if (cpu_is_omap730()) - omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL); - else - omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); + omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); /* Put DSP/MPUI into reset until needed */ omap_writew(0, ARM_RSTCT1); diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index a611c3b63..847329caf 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index efe9bfc6e..aca2a1208 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c @@ -16,6 +16,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -106,16 +107,14 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc, } } -static struct irq_chip omap_fpga_irq_ack = { - .name = "FPGA-ack", +static struct irqchip omap_fpga_irq_ack = { .ack = fpga_mask_ack_irq, .mask = fpga_mask_irq, .unmask = fpga_unmask_irq, }; -static struct irq_chip omap_fpga_irq = { - .name = "FPGA", +static struct irqchip omap_fpga_irq = { .ack = fpga_ack_irq, .mask = fpga_mask_irq, .unmask = fpga_unmask_irq, @@ -135,7 +134,7 @@ static struct irq_chip omap_fpga_irq = { * mask_ack routine for all of the FPGA interrupts has been changed from * fpga_mask_ack_irq() to fpga_ack_irq() so that the specific FPGA interrupt * being serviced is left unmasked. We can do this because the FPGA cascade - * interrupt is installed with the IRQF_DISABLED flag, which leaves all + * interrupt is installed with the SA_INTERRUPT flag, which leaves all * interrupts masked at the CPU while an FPGA interrupt handler executes. * * Limited testing indicates that this workaround appears to be effective diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index da13c3e82..5c637c048 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index fab8b0b27..be3a2a4ee 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 3ea140bb9..a0431c00f 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c @@ -36,6 +36,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -168,8 +169,7 @@ static struct omap_irq_bank omap1610_irq_banks[] = { }; #endif -static struct irq_chip omap_irq_chip = { - .name = "MPU", +static struct irqchip omap_irq_chip = { .ack = omap_mask_ack_irq, .mask = omap_mask_irq, .unmask = omap_unmask_irq, diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index 8976fbb21..650650815 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c @@ -9,6 +9,7 @@ * The "surfer" expansion board and H2 sample board also have two-color * green+red LEDs (in parallel), used here for timer and idle indicators. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c index a0cd001ac..c8ffd1ddc 100644 --- a/arch/arm/mach-omap1/leds-innovator.c +++ b/arch/arm/mach-omap1/leds-innovator.c @@ -1,6 +1,7 @@ /* * linux/arch/arm/mach-omap1/leds-innovator.c */ +#include #include #include diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c index 3b29e59b0..2c8bda847 100644 --- a/arch/arm/mach-omap1/leds-osk.c +++ b/arch/arm/mach-omap1/leds-osk.c @@ -3,6 +3,7 @@ * * LED driver for OSK, and optionally Mistral QVGA, boards */ +#include #include #include diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index fa74ef7af..10fe0b3ef 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c @@ -22,6 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index cd76185ba..ddf6b07dc 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -1,4 +1,3 @@ -//kernel/linux-omap-fsample/arch/arm/mach-omap1/pm.c#3 - integrate change 4545 (text) /* * linux/arch/arm/mach-omap1/pm.c * @@ -51,7 +50,6 @@ #include #include -#include #include #include #include @@ -328,9 +326,8 @@ void omap_pm_suspend(void) /* stop DSP */ omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); - /* shut down dsp_ck */ - if (!cpu_is_omap730()) - omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); + /* shut down dsp_ck */ + omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); /* temporarily enabling api_ck to access DSP registers */ omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2); @@ -690,7 +687,7 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void * dev, static struct irqaction omap_wakeup_irq = { .name = "peripheral wakeup", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .handler = omap_wakeup_interrupt }; diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 976edfb88..9b4cd698b 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -8,10 +8,10 @@ * published by the Free Software Foundation. */ +#include #include #include #include -#include #include #include #include @@ -253,7 +253,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) } omap_set_gpio_direction(gpio_nr, 1); ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt, - IRQF_TRIGGER_RISING, "serial wakeup", NULL); + SA_TRIGGER_RISING, "serial wakeup", NULL); if (ret) { omap_free_gpio(gpio_nr); printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S index abef33d10..e58295e2d 100644 --- a/arch/arm/mach-omap1/sleep.S +++ b/arch/arm/mach-omap1/sleep.S @@ -32,6 +32,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 4d91b9f51..a85fe6066 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -33,6 +33,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -93,7 +94,7 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc) * will break. On P2, the timer count rate is 6.5 MHz after programming PTV * with 0. This divides the 13MHz input by 2, and is undocumented. */ -#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE) +#ifdef CONFIG_MACH_OMAP_PERSEUS2 /* REVISIT: This ifdef construct should be replaced by a query to clock * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz. */ @@ -177,7 +178,7 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id, static struct irqaction omap_mpu_timer_irq = { .name = "mpu timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = omap_mpu_timer_interrupt, }; @@ -191,7 +192,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id, static struct irqaction omap_mpu_timer1_irq = { .name = "mpu timer1 overflow", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .handler = omap_mpu_timer1_interrupt, }; diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index aab97ccf1..537dd2e6d 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -8,7 +8,6 @@ config ARCH_OMAP24XX config ARCH_OMAP2420 bool "OMAP2420 support" depends on ARCH_OMAP24XX - select OMAP_DM_TIMER comment "OMAP Board Type" depends on ARCH_OMAP2 diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 266d88e77..111eaa642 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -3,13 +3,12 @@ # # Common support -obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o \ - serial.o gpmc.o +obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o serial.o obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o # Power Management -obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o +obj-$(CONFIG_PM) += pm.o sleep.o # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 7993b7bae..6c6ba172c 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -234,17 +234,17 @@ static void __init apollon_sw_init(void) set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQT_RISING); if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, - IRQF_SHARED, "enter sw", + SA_SHIRQ, "enter sw", &apollon_sw_interrupt)) return; set_irq_type(OMAP_GPIO_IRQ(SW_UP_GPIO17), IRQT_RISING); if (request_irq(OMAP_GPIO_IRQ(SW_UP_GPIO17), &apollon_sw_interrupt, - IRQF_SHARED, "up sw", + SA_SHIRQ, "up sw", &apollon_sw_interrupt)) return; set_irq_type(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), IRQT_RISING); if (request_irq(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), &apollon_sw_interrupt, - IRQF_SHARED, "down sw", + SA_SHIRQ, "down sw", &apollon_sw_interrupt)) return; } diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index d1b648a4e..72eb4bf57 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -15,6 +15,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -659,35 +660,26 @@ static int omap2_clk_set_rate(struct clk *clk, unsigned long rate) /* Isolate control register */ div_sel = (SRC_RATE_SEL_MASK & clk->flags); - div_off = clk->rate_offset; + div_off = clk->src_offset; validrate = omap2_clksel_round_rate(clk, rate, &new_div); - if (validrate != rate) + if(validrate != rate) return(ret); field_val = omap2_get_clksel(&div_sel, &field_mask, clk); if (div_sel == 0) return ret; - if (clk->flags & CM_SYSCLKOUT_SEL1) { - switch (new_div) { - case 16: - field_val = 4; - break; - case 8: - field_val = 3; - break; - case 4: - field_val = 2; - break; - case 2: - field_val = 1; - break; - case 1: - field_val = 0; - break; + if(clk->flags & CM_SYSCLKOUT_SEL1){ + switch(new_div){ + case 16: field_val = 4; break; + case 8: field_val = 3; break; + case 4: field_val = 2; break; + case 2: field_val = 1; break; + case 1: field_val = 0; break; } - } else + } + else field_val = new_div; reg = (void __iomem *)div_sel; @@ -752,7 +744,7 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset, val = 0x2; break; case CM_WKUP_SEL1: - src_reg_addr = (u32)&CM_CLKSEL_WKUP; + src_reg_addr = (u32)&CM_CLKSEL2_CORE; mask = 0x3; if (src_clk == &func_32k_ck) val = 0x0; @@ -792,9 +784,9 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset, val = 0; if (src_clk == &sys_ck) val = 1; - if (src_clk == &func_96m_ck) - val = 2; if (src_clk == &func_54m_ck) + val = 2; + if (src_clk == &func_96m_ck) val = 3; break; } diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 2781dfbc5..6c78d471f 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -1062,7 +1062,7 @@ static struct clk gpt2_ick = { .parent = &l4_ck, .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */ - .enable_bit = 4, + .enable_bit = 0, .recalc = &omap2_followparent_recalc, }; diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index aa4322451..fb7f91da1 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -104,51 +105,6 @@ static inline void omap_init_sti(void) static inline void omap_init_sti(void) {} #endif -#if defined(CONFIG_SPI_OMAP24XX) - -#include - -#define OMAP2_MCSPI1_BASE 0x48098000 -#define OMAP2_MCSPI2_BASE 0x4809a000 - -/* FIXME: use resources instead */ - -static struct omap2_mcspi_platform_config omap2_mcspi1_config = { - .base = io_p2v(OMAP2_MCSPI1_BASE), - .num_cs = 4, -}; - -struct platform_device omap2_mcspi1 = { - .name = "omap2_mcspi", - .id = 1, - .dev = { - .platform_data = &omap2_mcspi1_config, - }, -}; - -static struct omap2_mcspi_platform_config omap2_mcspi2_config = { - .base = io_p2v(OMAP2_MCSPI2_BASE), - .num_cs = 2, -}; - -struct platform_device omap2_mcspi2 = { - .name = "omap2_mcspi", - .id = 2, - .dev = { - .platform_data = &omap2_mcspi2_config, - }, -}; - -static void omap_init_mcspi(void) -{ - platform_device_register(&omap2_mcspi1); - platform_device_register(&omap2_mcspi2); -} - -#else -static inline void omap_init_mcspi(void) {} -#endif - /*-------------------------------------------------------------------------*/ static int __init omap2_init_devices(void) @@ -157,7 +113,6 @@ static int __init omap2_init_devices(void) * in alphabetical order so they're easier to sort through. */ omap_init_i2c(); - omap_init_mcspi(); omap_init_sti(); return 0; diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c deleted file mode 100644 index c7a48f921..000000000 --- a/arch/arm/mach-omap2/gpmc.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * GPMC support functions - * - * Copyright (C) 2005-2006 Nokia Corporation - * - * Author: Juha Yrjola - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include -#include -#include -#include - -#include -#include - -#undef DEBUG - -#define GPMC_BASE 0x6800a000 -#define GPMC_REVISION 0x00 -#define GPMC_SYSCONFIG 0x10 -#define GPMC_SYSSTATUS 0x14 -#define GPMC_IRQSTATUS 0x18 -#define GPMC_IRQENABLE 0x1c -#define GPMC_TIMEOUT_CONTROL 0x40 -#define GPMC_ERR_ADDRESS 0x44 -#define GPMC_ERR_TYPE 0x48 -#define GPMC_CONFIG 0x50 -#define GPMC_STATUS 0x54 -#define GPMC_PREFETCH_CONFIG1 0x1e0 -#define GPMC_PREFETCH_CONFIG2 0x1e4 -#define GPMC_PREFETCH_CONTROL 0x1e8 -#define GPMC_PREFETCH_STATUS 0x1f0 -#define GPMC_ECC_CONFIG 0x1f4 -#define GPMC_ECC_CONTROL 0x1f8 -#define GPMC_ECC_SIZE_CONFIG 0x1fc - -#define GPMC_CS0 0x60 -#define GPMC_CS_SIZE 0x30 - -static void __iomem *gpmc_base = - (void __iomem *) IO_ADDRESS(GPMC_BASE); -static void __iomem *gpmc_cs_base = - (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0; - -static struct clk *gpmc_l3_clk; - -static void gpmc_write_reg(int idx, u32 val) -{ - __raw_writel(val, gpmc_base + idx); -} - -static u32 gpmc_read_reg(int idx) -{ - return __raw_readl(gpmc_base + idx); -} - -void gpmc_cs_write_reg(int cs, int idx, u32 val) -{ - void __iomem *reg_addr; - - reg_addr = gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx; - __raw_writel(val, reg_addr); -} - -u32 gpmc_cs_read_reg(int cs, int idx) -{ - return __raw_readl(gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx); -} - -/* TODO: Add support for gpmc_fck to clock framework and use it */ -static unsigned long gpmc_get_fclk_period(void) -{ - /* In picoseconds */ - return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000); -} - -unsigned int gpmc_ns_to_ticks(unsigned int time_ns) -{ - unsigned long tick_ps; - - /* Calculate in picosecs to yield more exact results */ - tick_ps = gpmc_get_fclk_period(); - - return (time_ns * 1000 + tick_ps - 1) / tick_ps; -} - -#ifdef DEBUG -static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, - int time, const char *name) -#else -static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, - int time) -#endif -{ - u32 l; - int ticks, mask, nr_bits; - - if (time == 0) - ticks = 0; - else - ticks = gpmc_ns_to_ticks(time); - nr_bits = end_bit - st_bit + 1; - if (ticks >= 1 << nr_bits) - return -1; - - mask = (1 << nr_bits) - 1; - l = gpmc_cs_read_reg(cs, reg); -#ifdef DEBUG - printk(KERN_INFO "GPMC CS%d: %-10s: %d ticks, %3lu ns (was %i ticks)\n", - cs, name, ticks, gpmc_get_fclk_period() * ticks / 1000, - (l >> st_bit) & mask); -#endif - l &= ~(mask << st_bit); - l |= ticks << st_bit; - gpmc_cs_write_reg(cs, reg, l); - - return 0; -} - -#ifdef DEBUG -#define GPMC_SET_ONE(reg, st, end, field) \ - if (set_gpmc_timing_reg(cs, (reg), (st), (end), \ - t->field, #field) < 0) \ - return -1 -#else -#define GPMC_SET_ONE(reg, st, end, field) \ - if (set_gpmc_timing_reg(cs, (reg), (st), (end), t->field) < 0) \ - return -1 -#endif - -int gpmc_cs_calc_divider(int cs, unsigned int sync_clk) -{ - int div; - u32 l; - - l = sync_clk * 1000 + (gpmc_get_fclk_period() - 1); - div = l / gpmc_get_fclk_period(); - if (div > 4) - return -1; - if (div < 0) - div = 1; - - return div; -} - -int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) -{ - int div; - u32 l; - - div = gpmc_cs_calc_divider(cs, t->sync_clk); - if (div < 0) - return -1; - - GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on); - GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off); - GPMC_SET_ONE(GPMC_CS_CONFIG2, 16, 20, cs_wr_off); - - GPMC_SET_ONE(GPMC_CS_CONFIG3, 0, 3, adv_on); - GPMC_SET_ONE(GPMC_CS_CONFIG3, 8, 12, adv_rd_off); - GPMC_SET_ONE(GPMC_CS_CONFIG3, 16, 20, adv_wr_off); - - GPMC_SET_ONE(GPMC_CS_CONFIG4, 0, 3, oe_on); - GPMC_SET_ONE(GPMC_CS_CONFIG4, 8, 12, oe_off); - GPMC_SET_ONE(GPMC_CS_CONFIG4, 16, 19, we_on); - GPMC_SET_ONE(GPMC_CS_CONFIG4, 24, 28, we_off); - - GPMC_SET_ONE(GPMC_CS_CONFIG5, 0, 4, rd_cycle); - GPMC_SET_ONE(GPMC_CS_CONFIG5, 8, 12, wr_cycle); - GPMC_SET_ONE(GPMC_CS_CONFIG5, 16, 20, access); - - GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); - -#ifdef DEBUG - printk(KERN_INFO "GPMC CS%d CLK period is %lu (div %d)\n", - cs, gpmc_get_fclk_period(), div); -#endif - - l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); - l &= ~0x03; - l |= (div - 1); - - return 0; -} - -unsigned long gpmc_cs_get_base_addr(int cs) -{ - return (gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7) & 0x1f) << 24; -} - -void __init gpmc_init(void) -{ - u32 l; - - gpmc_l3_clk = clk_get(NULL, "core_l3_ck"); - BUG_ON(IS_ERR(gpmc_l3_clk)); - - l = gpmc_read_reg(GPMC_REVISION); - printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); - /* Set smart idle mode and automatic L3 clock gating */ - l = gpmc_read_reg(GPMC_SYSCONFIG); - l &= 0x03 << 3; - l |= (0x02 << 3) | (1 << 0); - gpmc_write_reg(GPMC_SYSCONFIG, l); -} diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 871ace4fc..76187300f 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index a0728c33e..7d5711611 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -26,7 +27,6 @@ extern void omap_sram_init(void); extern int omap2_clk_init(void); extern void omap2_check_revision(void); -extern void gpmc_init(void); /* * The machine specific code may provide the extra mapping besides the @@ -67,5 +67,4 @@ void __init omap2_init_common_hw(void) { omap2_mux_init(); omap2_clk_init(); - gpmc_init(); } diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index dfc3b35cc..d7baff675 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include @@ -94,8 +95,7 @@ static void omap_mask_ack_irq(unsigned int irq) omap_ack_irq(irq); } -static struct irq_chip omap_irq_chip = { - .name = "INTC", +static struct irqchip omap_irq_chip = { .ack = omap_mask_ack_irq, .mask = omap_mask_irq, .unmask = omap_unmask_irq, diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c index 85cbc2a2e..1d925d69f 100644 --- a/arch/arm/mach-omap2/memory.c +++ b/arch/arm/mach-omap2/memory.c @@ -14,6 +14,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 60ef084fa..1197dc38c 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -22,6 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include #include #include #include @@ -52,12 +53,6 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1) /* 24xx clocks */ MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) -/* 24xx GPMC wait pin monitoring */ -MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1) -MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1) -MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1) -MUX_CFG_24XX("P1_GPMC_WAIT3", 0x09d, 0, 1, 1, 1) - /* 24xx McBSP */ MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1) MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1) @@ -65,38 +60,18 @@ MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1) MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1) /* 24xx GPIO */ -MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) +MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) -MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) -MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) -MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) +MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) +MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) +MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1) -MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) +MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) -MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) +MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) -/* 242x DBG GPIO */ -MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1) -MUX_CFG_24XX("W2_242X_GPIO50", 0xd4, 3, 0, 0, 1) -MUX_CFG_24XX("U4_242X_GPIO51", 0xd5, 3, 0, 0, 1) -MUX_CFG_24XX("V3_242X_GPIO52", 0xd6, 3, 0, 0, 1) -MUX_CFG_24XX("V2_242X_GPIO53", 0xd7, 3, 0, 0, 1) -MUX_CFG_24XX("V6_242X_GPIO53", 0xcf, 3, 0, 0, 1) -MUX_CFG_24XX("T4_242X_GPIO54", 0xd8, 3, 0, 0, 1) -MUX_CFG_24XX("Y4_242X_GPIO54", 0xd0, 3, 0, 0, 1) -MUX_CFG_24XX("T3_242X_GPIO55", 0xd9, 3, 0, 0, 1) -MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1) - -/* 24xx external DMA requests */ -MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1) -MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1) -MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1) -MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1) -MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1) -MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1) - /* TSC IRQ */ MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1) diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c deleted file mode 100644 index 2494091a0..000000000 --- a/arch/arm/mach-omap2/pm-domain.c +++ /dev/null @@ -1,299 +0,0 @@ -/* - * linux/arch/arm/mach-omap2/pm-domain.c - * - * Power domain functions for OMAP2 - * - * Copyright (C) 2006 Nokia Corporation - * Tony Lindgren - * - * Some code based on earlier OMAP2 sample PM code - * Copyright (C) 2005 Texas Instruments, Inc. - * Richard Woodruff - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include - -#include - -#include "prcm-regs.h" - -/* Power domain offsets */ -#define PM_MPU_OFFSET 0x100 -#define PM_CORE_OFFSET 0x200 -#define PM_GFX_OFFSET 0x300 -#define PM_WKUP_OFFSET 0x400 /* Autoidle only */ -#define PM_PLL_OFFSET 0x500 /* Autoidle only */ -#define PM_DSP_OFFSET 0x800 -#define PM_MDM_OFFSET 0xc00 - -/* Power domain wake-up dependency control register */ -#define PM_WKDEP_OFFSET 0xc8 -#define EN_MDM (1 << 5) -#define EN_WKUP (1 << 4) -#define EN_GFX (1 << 3) -#define EN_DSP (1 << 2) -#define EN_MPU (1 << 1) -#define EN_CORE (1 << 0) - -/* Core power domain state transition control register */ -#define PM_PWSTCTRL_OFFSET 0xe0 -#define FORCESTATE (1 << 18) /* Only for DSP & GFX */ -#define MEM4RETSTATE (1 << 6) -#define MEM3RETSTATE (1 << 5) -#define MEM2RETSTATE (1 << 4) -#define MEM1RETSTATE (1 << 3) -#define LOGICRETSTATE (1 << 2) /* Logic is retained */ -#define POWERSTATE_OFF 0x3 -#define POWERSTATE_RETENTION 0x1 -#define POWERSTATE_ON 0x0 - -/* Power domain state register */ -#define PM_PWSTST_OFFSET 0xe4 - -/* Hardware supervised state transition control register */ -#define CM_CLKSTCTRL_OFFSET 0x48 -#define AUTOSTAT_MPU (1 << 0) /* MPU */ -#define AUTOSTAT_DSS (1 << 2) /* Core */ -#define AUTOSTAT_L4 (1 << 1) /* Core */ -#define AUTOSTAT_L3 (1 << 0) /* Core */ -#define AUTOSTAT_GFX (1 << 0) /* GFX */ -#define AUTOSTAT_IVA (1 << 8) /* 2420 IVA in DSP domain */ -#define AUTOSTAT_DSP (1 << 0) /* DSP */ -#define AUTOSTAT_MDM (1 << 0) /* MDM */ - -/* Automatic control of interface clock idling */ -#define CM_AUTOIDLE1_OFFSET 0x30 -#define CM_AUTOIDLE2_OFFSET 0x34 /* Core only */ -#define CM_AUTOIDLE3_OFFSET 0x38 /* Core only */ -#define CM_AUTOIDLE4_OFFSET 0x3c /* Core only */ -#define AUTO_54M(x) (((x) & 0x3) << 6) -#define AUTO_96M(x) (((x) & 0x3) << 2) -#define AUTO_DPLL(x) (((x) & 0x3) << 0) -#define AUTO_STOPPED 0x3 -#define AUTO_BYPASS_FAST 0x2 /* DPLL only */ -#define AUTO_BYPASS_LOW_POWER 0x1 /* DPLL only */ -#define AUTO_DISABLED 0x0 - -/* Voltage control PRCM_VOLTCTRL bits */ -#define AUTO_EXTVOLT (1 << 15) -#define FORCE_EXTVOLT (1 << 14) -#define SETOFF_LEVEL(x) (((x) & 0x3) << 12) -#define MEMRETCTRL (1 << 8) -#define SETRET_LEVEL(x) (((x) & 0x3) << 6) -#define VOLT_LEVEL(x) (((x) & 0x3) << 0) - -#define OMAP24XX_PRCM_VBASE IO_ADDRESS(OMAP24XX_PRCM_BASE) -#define prcm_readl(r) __raw_readl(OMAP24XX_PRCM_VBASE + (r)) -#define prcm_writel(v, r) __raw_writel((v), OMAP24XX_PRCM_VBASE + (r)) - -static u32 pmdomain_get_wakeup_dependencies(int domain_offset) -{ - return prcm_readl(domain_offset + PM_WKDEP_OFFSET); -} - -static void pmdomain_set_wakeup_dependencies(u32 state, int domain_offset) -{ - prcm_writel(state, domain_offset + PM_WKDEP_OFFSET); -} - -static u32 pmdomain_get_powerstate(int domain_offset) -{ - return prcm_readl(domain_offset + PM_PWSTCTRL_OFFSET); -} - -static void pmdomain_set_powerstate(u32 state, int domain_offset) -{ - prcm_writel(state, domain_offset + PM_PWSTCTRL_OFFSET); -} - -static u32 pmdomain_get_clock_autocontrol(int domain_offset) -{ - return prcm_readl(domain_offset + CM_CLKSTCTRL_OFFSET); -} - -static void pmdomain_set_clock_autocontrol(u32 state, int domain_offset) -{ - prcm_writel(state, domain_offset + CM_CLKSTCTRL_OFFSET); -} - -static u32 pmdomain_get_clock_autoidle1(int domain_offset) -{ - return prcm_readl(domain_offset + CM_AUTOIDLE1_OFFSET); -} - -/* Core domain only */ -static u32 pmdomain_get_clock_autoidle2(int domain_offset) -{ - return prcm_readl(domain_offset + CM_AUTOIDLE2_OFFSET); -} - -/* Core domain only */ -static u32 pmdomain_get_clock_autoidle3(int domain_offset) -{ - return prcm_readl(domain_offset + CM_AUTOIDLE3_OFFSET); -} - -/* Core domain only */ -static u32 pmdomain_get_clock_autoidle4(int domain_offset) -{ - return prcm_readl(domain_offset + CM_AUTOIDLE4_OFFSET); -} - -static void pmdomain_set_clock_autoidle1(u32 state, int domain_offset) -{ - prcm_writel(state, CM_AUTOIDLE1_OFFSET + domain_offset); -} - -/* Core domain only */ -static void pmdomain_set_clock_autoidle2(u32 state, int domain_offset) -{ - prcm_writel(state, CM_AUTOIDLE2_OFFSET + domain_offset); -} - -/* Core domain only */ -static void pmdomain_set_clock_autoidle3(u32 state, int domain_offset) -{ - prcm_writel(state, CM_AUTOIDLE3_OFFSET + domain_offset); -} - -/* Core domain only */ -static void pmdomain_set_clock_autoidle4(u32 state, int domain_offset) -{ - prcm_writel(state, CM_AUTOIDLE4_OFFSET + domain_offset); -} - -/* - * Configures power management domains to idle clocks automatically. - */ -void pmdomain_set_autoidle(void) -{ - u32 val; - - /* Set PLL auto stop for 54M, 96M & DPLL */ - pmdomain_set_clock_autoidle1(AUTO_54M(AUTO_STOPPED) | - AUTO_96M(AUTO_STOPPED) | - AUTO_DPLL(AUTO_STOPPED), PM_PLL_OFFSET); - - /* External clock input control - * REVISIT: Should this be in clock framework? - */ - PRCM_CLKSRC_CTRL |= (0x3 << 3); - - /* Configure number of 32KHz clock cycles for sys_clk */ - PRCM_CLKSSETUP = 0x00ff; - - /* Configure automatic voltage transition */ - PRCM_VOLTSETUP = 0; - val = PRCM_VOLTCTRL; - val &= ~(SETOFF_LEVEL(0x3) | VOLT_LEVEL(0x3)); - val |= SETOFF_LEVEL(1) | VOLT_LEVEL(1) | AUTO_EXTVOLT; - PRCM_VOLTCTRL = val; - - /* Disable emulation tools functional clock */ - PRCM_CLKEMUL_CTRL = 0x0; - - /* Set core memory retention state */ - val = pmdomain_get_powerstate(PM_CORE_OFFSET); - if (cpu_is_omap2420()) { - val &= ~(0x7 << 3); - val |= (MEM3RETSTATE | MEM2RETSTATE | MEM1RETSTATE); - } else { - val &= ~(0xf << 3); - val |= (MEM4RETSTATE | MEM3RETSTATE | MEM2RETSTATE | - MEM1RETSTATE); - } - pmdomain_set_powerstate(val, PM_CORE_OFFSET); - - /* OCP interface smart idle. REVISIT: Enable autoidle bit0 ? */ - val = SMS_SYSCONFIG; - val &= ~(0x3 << 3); - val |= (0x2 << 3) | (1 << 0); - SMS_SYSCONFIG |= val; - - val = SDRC_SYSCONFIG; - val &= ~(0x3 << 3); - val |= (0x2 << 3); - SDRC_SYSCONFIG = val; - - /* Configure L3 interface for smart idle. - * REVISIT: Enable autoidle bit0 ? - */ - val = GPMC_SYSCONFIG; - val &= ~(0x3 << 3); - val |= (0x2 << 3) | (1 << 0); - GPMC_SYSCONFIG = val; - - pmdomain_set_powerstate(LOGICRETSTATE | POWERSTATE_RETENTION, - PM_MPU_OFFSET); - pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_CORE_OFFSET); - if (!cpu_is_omap2420()) - pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_MDM_OFFSET); - - /* Assume suspend function has saved the state for DSP and GFX */ - pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_DSP_OFFSET); - pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_GFX_OFFSET); - -#if 0 - /* REVISIT: Internal USB needs special handling */ - force_standby_usb(); - if (cpu_is_omap2430()) - force_hsmmc(); - sdram_self_refresh_on_idle_req(1); -#endif - - /* Enable clock auto control for all domains. - * Note that CORE domain includes also DSS, L4 & L3. - */ - pmdomain_set_clock_autocontrol(AUTOSTAT_MPU, PM_MPU_OFFSET); - pmdomain_set_clock_autocontrol(AUTOSTAT_GFX, PM_GFX_OFFSET); - pmdomain_set_clock_autocontrol(AUTOSTAT_DSS | AUTOSTAT_L4 | AUTOSTAT_L3, - PM_CORE_OFFSET); - if (cpu_is_omap2420()) - pmdomain_set_clock_autocontrol(AUTOSTAT_IVA | AUTOSTAT_DSP, - PM_DSP_OFFSET); - else { - pmdomain_set_clock_autocontrol(AUTOSTAT_DSP, PM_DSP_OFFSET); - pmdomain_set_clock_autocontrol(AUTOSTAT_MDM, PM_MDM_OFFSET); - } - - /* Enable clock autoidle for all domains */ - pmdomain_set_clock_autoidle1(0x2, PM_DSP_OFFSET); - if (cpu_is_omap2420()) { - pmdomain_set_clock_autoidle1(0xfffffff9, PM_CORE_OFFSET); - pmdomain_set_clock_autoidle2(0x7, PM_CORE_OFFSET); - pmdomain_set_clock_autoidle1(0x3f, PM_WKUP_OFFSET); - } else { - pmdomain_set_clock_autoidle1(0xeafffff1, PM_CORE_OFFSET); - pmdomain_set_clock_autoidle2(0xfff, PM_CORE_OFFSET); - pmdomain_set_clock_autoidle1(0x7f, PM_WKUP_OFFSET); - pmdomain_set_clock_autoidle1(0x3, PM_MDM_OFFSET); - } - pmdomain_set_clock_autoidle3(0x7, PM_CORE_OFFSET); - pmdomain_set_clock_autoidle4(0x1f, PM_CORE_OFFSET); -} - -/* - * Initializes power domains by removing wake-up dependencies and powering - * down DSP and GFX. Gets called from PM init. Note that DSP and IVA code - * must re-enable DSP and GFX when used. - */ -void __init pmdomain_init(void) -{ - /* Remove all domain wakeup dependencies */ - pmdomain_set_wakeup_dependencies(EN_WKUP | EN_CORE, PM_MPU_OFFSET); - pmdomain_set_wakeup_dependencies(0, PM_DSP_OFFSET); - pmdomain_set_wakeup_dependencies(0, PM_GFX_OFFSET); - pmdomain_set_wakeup_dependencies(EN_WKUP | EN_MPU, PM_CORE_OFFSET); - if (cpu_is_omap2430()) - pmdomain_set_wakeup_dependencies(0, PM_MDM_OFFSET); - - /* Power down DSP and GFX */ - pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_DSP_OFFSET); - pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_GFX_OFFSET); -} diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index d7eee99b7..562168fa2 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -37,18 +36,11 @@ #include #include -#include "prcm-regs.h" - static struct clk *vclk; static void (*omap2_sram_idle)(void); static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev); static void (*saved_idle)(void); -extern void __init pmdomain_init(void); -extern void pmdomain_set_autoidle(void); - -static unsigned int omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_SIZE]; - void omap2_pm_idle(void) { local_irq_disable(); @@ -95,272 +87,23 @@ static int omap2_pm_prepare(suspend_state_t state) return error; } -#define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ - OMAP_IRQ_BIT(INT_24XX_GPIO_BANK2) | \ - OMAP_IRQ_BIT(INT_24XX_GPIO_BANK3)) - -#define INT1_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK4)) - -#define INT2_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_UART1_IRQ) | \ - OMAP_IRQ_BIT(INT_24XX_UART2_IRQ) | \ - OMAP_IRQ_BIT(INT_24XX_UART3_IRQ)) - -#define preg(reg) printk("%s\t(0x%p):\t0x%08x\n", #reg, ®, reg); - -static void omap2_pm_debug(char * desc) -{ - printk("%s:\n", desc); - - preg(CM_CLKSTCTRL_MPU); - preg(CM_CLKSTCTRL_CORE); - preg(CM_CLKSTCTRL_GFX); - preg(CM_CLKSTCTRL_DSP); - preg(CM_CLKSTCTRL_MDM); - - preg(PM_PWSTCTRL_MPU); - preg(PM_PWSTCTRL_CORE); - preg(PM_PWSTCTRL_GFX); - preg(PM_PWSTCTRL_DSP); - preg(PM_PWSTCTRL_MDM); - - preg(PM_PWSTST_MPU); - preg(PM_PWSTST_CORE); - preg(PM_PWSTST_GFX); - preg(PM_PWSTST_DSP); - preg(PM_PWSTST_MDM); - - preg(CM_AUTOIDLE1_CORE); - preg(CM_AUTOIDLE2_CORE); - preg(CM_AUTOIDLE3_CORE); - preg(CM_AUTOIDLE4_CORE); - preg(CM_AUTOIDLE_WKUP); - preg(CM_AUTOIDLE_PLL); - preg(CM_AUTOIDLE_DSP); - preg(CM_AUTOIDLE_MDM); - - preg(CM_ICLKEN1_CORE); - preg(CM_ICLKEN2_CORE); - preg(CM_ICLKEN3_CORE); - preg(CM_ICLKEN4_CORE); - preg(CM_ICLKEN_GFX); - preg(CM_ICLKEN_WKUP); - preg(CM_ICLKEN_DSP); - preg(CM_ICLKEN_MDM); - - preg(CM_IDLEST1_CORE); - preg(CM_IDLEST2_CORE); - preg(CM_IDLEST3_CORE); - preg(CM_IDLEST4_CORE); - preg(CM_IDLEST_GFX); - preg(CM_IDLEST_WKUP); - preg(CM_IDLEST_CKGEN); - preg(CM_IDLEST_DSP); - preg(CM_IDLEST_MDM); - - preg(RM_RSTST_MPU); - preg(RM_RSTST_GFX); - preg(RM_RSTST_WKUP); - preg(RM_RSTST_DSP); - preg(RM_RSTST_MDM); - - preg(PM_WKDEP_MPU); - preg(PM_WKDEP_CORE); - preg(PM_WKDEP_GFX); - preg(PM_WKDEP_DSP); - preg(PM_WKDEP_MDM); - - preg(CM_FCLKEN_WKUP); - preg(CM_ICLKEN_WKUP); - preg(CM_IDLEST_WKUP); - preg(CM_AUTOIDLE_WKUP); - preg(CM_CLKSEL_WKUP); - - preg(PM_WKEN_WKUP); - preg(PM_WKST_WKUP); -} - -static inline void omap2_pm_save_registers(void) -{ - /* Save interrupt registers */ - OMAP24XX_SAVE(INTC_MIR0); - OMAP24XX_SAVE(INTC_MIR1); - OMAP24XX_SAVE(INTC_MIR2); - - /* Save power control registers */ - OMAP24XX_SAVE(CM_CLKSTCTRL_MPU); - OMAP24XX_SAVE(CM_CLKSTCTRL_CORE); - OMAP24XX_SAVE(CM_CLKSTCTRL_GFX); - OMAP24XX_SAVE(CM_CLKSTCTRL_DSP); - OMAP24XX_SAVE(CM_CLKSTCTRL_MDM); - - /* Save power state registers */ - OMAP24XX_SAVE(PM_PWSTCTRL_MPU); - OMAP24XX_SAVE(PM_PWSTCTRL_CORE); - OMAP24XX_SAVE(PM_PWSTCTRL_GFX); - OMAP24XX_SAVE(PM_PWSTCTRL_DSP); - OMAP24XX_SAVE(PM_PWSTCTRL_MDM); - - /* Save autoidle registers */ - OMAP24XX_SAVE(CM_AUTOIDLE1_CORE); - OMAP24XX_SAVE(CM_AUTOIDLE2_CORE); - OMAP24XX_SAVE(CM_AUTOIDLE3_CORE); - OMAP24XX_SAVE(CM_AUTOIDLE4_CORE); - OMAP24XX_SAVE(CM_AUTOIDLE_WKUP); - OMAP24XX_SAVE(CM_AUTOIDLE_PLL); - OMAP24XX_SAVE(CM_AUTOIDLE_DSP); - OMAP24XX_SAVE(CM_AUTOIDLE_MDM); - - /* Save idle state registers */ - OMAP24XX_SAVE(CM_IDLEST1_CORE); - OMAP24XX_SAVE(CM_IDLEST2_CORE); - OMAP24XX_SAVE(CM_IDLEST3_CORE); - OMAP24XX_SAVE(CM_IDLEST4_CORE); - OMAP24XX_SAVE(CM_IDLEST_GFX); - OMAP24XX_SAVE(CM_IDLEST_WKUP); - OMAP24XX_SAVE(CM_IDLEST_CKGEN); - OMAP24XX_SAVE(CM_IDLEST_DSP); - OMAP24XX_SAVE(CM_IDLEST_MDM); - - /* Save clock registers */ - OMAP24XX_SAVE(CM_FCLKEN1_CORE); - OMAP24XX_SAVE(CM_FCLKEN2_CORE); - OMAP24XX_SAVE(CM_ICLKEN1_CORE); - OMAP24XX_SAVE(CM_ICLKEN2_CORE); - OMAP24XX_SAVE(CM_ICLKEN3_CORE); - OMAP24XX_SAVE(CM_ICLKEN4_CORE); -} - -static inline void omap2_pm_restore_registers(void) -{ - /* Restore clock state registers */ - OMAP24XX_RESTORE(CM_CLKSTCTRL_MPU); - OMAP24XX_RESTORE(CM_CLKSTCTRL_CORE); - OMAP24XX_RESTORE(CM_CLKSTCTRL_GFX); - OMAP24XX_RESTORE(CM_CLKSTCTRL_DSP); - OMAP24XX_RESTORE(CM_CLKSTCTRL_MDM); - - /* Restore power state registers */ - OMAP24XX_RESTORE(PM_PWSTCTRL_MPU); - OMAP24XX_RESTORE(PM_PWSTCTRL_CORE); - OMAP24XX_RESTORE(PM_PWSTCTRL_GFX); - OMAP24XX_RESTORE(PM_PWSTCTRL_DSP); - OMAP24XX_RESTORE(PM_PWSTCTRL_MDM); - - /* Restore idle state registers */ - OMAP24XX_RESTORE(CM_IDLEST1_CORE); - OMAP24XX_RESTORE(CM_IDLEST2_CORE); - OMAP24XX_RESTORE(CM_IDLEST3_CORE); - OMAP24XX_RESTORE(CM_IDLEST4_CORE); - OMAP24XX_RESTORE(CM_IDLEST_GFX); - OMAP24XX_RESTORE(CM_IDLEST_WKUP); - OMAP24XX_RESTORE(CM_IDLEST_CKGEN); - OMAP24XX_RESTORE(CM_IDLEST_DSP); - OMAP24XX_RESTORE(CM_IDLEST_MDM); - - /* Restore autoidle registers */ - OMAP24XX_RESTORE(CM_AUTOIDLE1_CORE); - OMAP24XX_RESTORE(CM_AUTOIDLE2_CORE); - OMAP24XX_RESTORE(CM_AUTOIDLE3_CORE); - OMAP24XX_RESTORE(CM_AUTOIDLE4_CORE); - OMAP24XX_RESTORE(CM_AUTOIDLE_WKUP); - OMAP24XX_RESTORE(CM_AUTOIDLE_PLL); - OMAP24XX_RESTORE(CM_AUTOIDLE_DSP); - OMAP24XX_RESTORE(CM_AUTOIDLE_MDM); - - /* Restore clock registers */ - OMAP24XX_RESTORE(CM_FCLKEN1_CORE); - OMAP24XX_RESTORE(CM_FCLKEN2_CORE); - OMAP24XX_RESTORE(CM_ICLKEN1_CORE); - OMAP24XX_RESTORE(CM_ICLKEN2_CORE); - OMAP24XX_RESTORE(CM_ICLKEN3_CORE); - OMAP24XX_RESTORE(CM_ICLKEN4_CORE); - - /* REVISIT: Clear interrupts here */ - - /* Restore interrupt registers */ - OMAP24XX_RESTORE(INTC_MIR0); - OMAP24XX_RESTORE(INTC_MIR1); - OMAP24XX_RESTORE(INTC_MIR2); -} - -static int omap2_pm_suspend(void) -{ - int processor_type = 0; - - /* REVISIT: 0x21 or 0x26? */ - if (cpu_is_omap2420()) - processor_type = 0x21; - - if (!processor_type) - return -ENOTSUPP; - - local_irq_disable(); - local_fiq_disable(); - - omap2_pm_save_registers(); - - /* Disable interrupts except for the wake events */ - INTC_MIR_SET0 = 0xffffffff & ~INT0_WAKE_MASK; - INTC_MIR_SET1 = 0xffffffff & ~INT1_WAKE_MASK; - INTC_MIR_SET2 = 0xffffffff & ~INT2_WAKE_MASK; - - pmdomain_set_autoidle(); - - /* Clear old wake-up events */ - PM_WKST1_CORE = 0; - PM_WKST2_CORE = 0; - PM_WKST_WKUP = 0; - - /* Enable wake-up events */ - PM_WKEN1_CORE = (1 << 22) | (1 << 21); /* UART1 & 2 */ - PM_WKEN2_CORE = (1 << 2); /* UART3 */ - PM_WKEN_WKUP = (1 << 2) | (1 << 0); /* GPIO & GPT1 */ - - /* Disable clocks except for CM_ICLKEN2_CORE. It gets disabled - * in the SRAM suspend code */ - CM_FCLKEN1_CORE = 0; - CM_FCLKEN2_CORE = 0; - CM_ICLKEN1_CORE = 0; - CM_ICLKEN3_CORE = 0; - CM_ICLKEN4_CORE = 0; - - omap2_pm_debug("Status before suspend"); - - /* Must wait for serial buffers to clear */ - mdelay(200); - - /* Jump to SRAM suspend code - * REVISIT: When is this SDRC_DLLB_CTRL? - */ - omap2_sram_suspend(SDRC_DLLA_CTRL, processor_type); - - /* Back from sleep */ - omap2_pm_restore_registers(); - - local_fiq_enable(); - local_irq_enable(); - - return 0; -} - static int omap2_pm_enter(suspend_state_t state) { - int ret = 0; - switch (state) { case PM_SUSPEND_STANDBY: case PM_SUSPEND_MEM: - ret = omap2_pm_suspend(); + /* FIXME: Add suspend */ break; + case PM_SUSPEND_DISK: - ret = -ENOTSUPP; - break; + return -ENOTSUPP; + default: - ret = -EINVAL; + return -EINVAL; } - return ret; + return 0; } static int omap2_pm_finish(suspend_state_t state) @@ -400,8 +143,6 @@ int __init omap2_pm_init(void) pm_set_ops(&omap_pm_ops); pm_idle = omap2_pm_idle; - pmdomain_init(); - return 0; } diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index c2bf57ef6..8893479dc 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -13,6 +13,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/sleep.S b/arch/arm/mach-omap2/sleep.S index 16247d557..00299cbeb 100644 --- a/arch/arm/mach-omap2/sleep.S +++ b/arch/arm/mach-omap2/sleep.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/sram-fn.S b/arch/arm/mach-omap2/sram-fn.S index a5ef7f611..d261e4ff4 100644 --- a/arch/arm/mach-omap2/sram-fn.S +++ b/arch/arm/mach-omap2/sram-fn.S @@ -22,6 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index fe5fd6d42..1d2f5ac2f 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -6,7 +6,6 @@ * Copyright (C) 2005 Nokia Corporation * Author: Paul Mundt * Juha Yrjölä - * OMAP Dual-mode timer framework support by Timo Teras * * Some parts based off of TI's 24xx code: * @@ -23,18 +22,54 @@ #include #include #include -#include #include -#include +#include +#include -static struct omap_dm_timer *gptimer; +#define OMAP2_GP_TIMER1_BASE 0x48028000 +#define OMAP2_GP_TIMER2_BASE 0x4802a000 +#define OMAP2_GP_TIMER3_BASE 0x48078000 +#define OMAP2_GP_TIMER4_BASE 0x4807a000 -static inline void omap2_gp_timer_start(unsigned long load_val) +#define GP_TIMER_TIDR 0x00 +#define GP_TIMER_TISR 0x18 +#define GP_TIMER_TIER 0x1c +#define GP_TIMER_TCLR 0x24 +#define GP_TIMER_TCRR 0x28 +#define GP_TIMER_TLDR 0x2c +#define GP_TIMER_TSICR 0x40 + +#define OS_TIMER_NR 1 /* GP timer 2 */ + +static unsigned long timer_base[] = { + IO_ADDRESS(OMAP2_GP_TIMER1_BASE), + IO_ADDRESS(OMAP2_GP_TIMER2_BASE), + IO_ADDRESS(OMAP2_GP_TIMER3_BASE), + IO_ADDRESS(OMAP2_GP_TIMER4_BASE), +}; + +static inline unsigned int timer_read_reg(int nr, unsigned int reg) +{ + return __raw_readl(timer_base[nr] + reg); +} + +static inline void timer_write_reg(int nr, unsigned int reg, unsigned int val) +{ + __raw_writel(val, timer_base[nr] + reg); +} + +/* Note that we always enable the clock prescale divider bit */ +static inline void omap2_gp_timer_start(int nr, unsigned long load_val) { - omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val); - omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); - omap_dm_timer_start(gptimer); + unsigned int tmp; + + tmp = 0xffffffff - load_val; + + timer_write_reg(nr, GP_TIMER_TLDR, tmp); + timer_write_reg(nr, GP_TIMER_TCRR, tmp); + timer_write_reg(nr, GP_TIMER_TIER, 1 << 1); + timer_write_reg(nr, GP_TIMER_TCLR, (1 << 5) | (1 << 1) | 1); } static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, @@ -42,7 +77,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, { write_seqlock(&xtime_lock); - omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); + timer_write_reg(OS_TIMER_NR, GP_TIMER_TISR, 1 << 1); timer_tick(regs); write_sequnlock(&xtime_lock); @@ -52,26 +87,41 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, static struct irqaction omap2_gp_timer_irq = { .name = "gp timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT, .handler = omap2_gp_timer_interrupt, }; static void __init omap2_gp_timer_init(void) { - u32 tick_period; + struct clk * sys_ck; + u32 tick_period = 120000; + u32 l; - omap_dm_timer_init(); - gptimer = omap_dm_timer_request_specific(1); - BUG_ON(gptimer == NULL); + /* Reset clock and prescale value */ + timer_write_reg(OS_TIMER_NR, GP_TIMER_TCLR, 0); - omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK); - tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100; + sys_ck = clk_get(NULL, "sys_ck"); + if (IS_ERR(sys_ck)) + printk(KERN_ERR "Could not get sys_ck\n"); + else { + clk_enable(sys_ck); + tick_period = clk_get_rate(sys_ck) / 100; + clk_put(sys_ck); + } + + tick_period /= 2; /* Minimum prescale divider is 2 */ tick_period -= 1; - setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq); - omap2_gp_timer_start(tick_period); + l = timer_read_reg(OS_TIMER_NR, GP_TIMER_TIDR); + printk(KERN_INFO "OMAP2 GP timer (HW version %d.%d)\n", + (l >> 4) & 0x0f, l & 0x0f); + + setup_irq(38, &omap2_gp_timer_irq); + + omap2_gp_timer_start(OS_TIMER_NR, tick_period); } struct sys_timer omap_timer = { .init = omap2_gp_timer_init, }; + diff --git a/arch/arm/mach-pnx4008/Makefile b/arch/arm/mach-pnx4008/Makefile deleted file mode 100644 index b457ca0a4..000000000 --- a/arch/arm/mach-pnx4008/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# -# Makefile for the linux kernel. -# - -obj-y := core.o irq.o time.o clock.o gpio.o serial.o dma.o -obj-m := -obj-n := -obj- := - -# Power Management -obj-$(CONFIG_PM) += pm.o sleep.o - diff --git a/arch/arm/mach-pnx4008/Makefile.boot b/arch/arm/mach-pnx4008/Makefile.boot deleted file mode 100644 index 44c7117e2..000000000 --- a/arch/arm/mach-pnx4008/Makefile.boot +++ /dev/null @@ -1,4 +0,0 @@ - zreladdr-y := 0x80008000 -params_phys-y := 0x80000100 -initrd_phys-y := 0x80800000 - diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c deleted file mode 100644 index f582ed2ec..000000000 --- a/arch/arm/mach-pnx4008/clock.c +++ /dev/null @@ -1,983 +0,0 @@ -/* - * arch/arm/mach-pnx4008/clock.c - * - * Clock control driver for PNX4008 - * - * Authors: Vitaly Wool, Dmitry Chigirev - * Generic clock management functions are partially based on: - * linux/arch/arm/mach-omap/clock.c - * - * 2005-2006 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include "clock.h" - -/*forward declaration*/ -static struct clk per_ck; -static struct clk hclk_ck; -static struct clk ck_1MHz; -static struct clk ck_13MHz; -static struct clk ck_pll1; -static int local_set_rate(struct clk *clk, u32 rate); - -static inline void clock_lock(void) -{ - local_irq_disable(); -} - -static inline void clock_unlock(void) -{ - local_irq_enable(); -} - -static void propagate_rate(struct clk *clk) -{ - struct clk *tmp_clk; - - tmp_clk = clk; - while (tmp_clk->propagate_next) { - tmp_clk = tmp_clk->propagate_next; - local_set_rate(tmp_clk, tmp_clk->user_rate); - } -} - -static inline void clk_reg_disable(struct clk *clk) -{ - if (clk->enable_reg) - __raw_writel(__raw_readl(clk->enable_reg) & - ~(1 << clk->enable_shift), clk->enable_reg); -} - -static inline void clk_reg_enable(struct clk *clk) -{ - if (clk->enable_reg) - __raw_writel(__raw_readl(clk->enable_reg) | - (1 << clk->enable_shift), clk->enable_reg); -} - -static inline void clk_reg_disable1(struct clk *clk) -{ - if (clk->enable_reg1) - __raw_writel(__raw_readl(clk->enable_reg1) & - ~(1 << clk->enable_shift1), clk->enable_reg1); -} - -static inline void clk_reg_enable1(struct clk *clk) -{ - if (clk->enable_reg1) - __raw_writel(__raw_readl(clk->enable_reg1) | - (1 << clk->enable_shift1), clk->enable_reg1); -} - -static int clk_wait_for_pll_lock(struct clk *clk) -{ - int i; - i = 0; - while (i++ < 0xFFF && !(__raw_readl(clk->scale_reg) & 1)) ; /*wait for PLL to lock */ - - if (!(__raw_readl(clk->scale_reg) & 1)) { - printk(KERN_ERR - "%s ERROR: failed to lock, scale reg data: %x\n", - clk->name, __raw_readl(clk->scale_reg)); - return -1; - } - return 0; -} - -static int switch_to_dirty_13mhz(struct clk *clk) -{ - int i; - int ret; - u32 tmp_reg; - - ret = 0; - - if (!clk->rate) - clk_reg_enable1(clk); - - tmp_reg = __raw_readl(clk->parent_switch_reg); - /*if 13Mhz clock selected, select 13'MHz (dirty) source from OSC */ - if (!(tmp_reg & 1)) { - tmp_reg |= (1 << 1); /* Trigger switch to 13'MHz (dirty) clock */ - __raw_writel(tmp_reg, clk->parent_switch_reg); - i = 0; - while (i++ < 0xFFF && !(__raw_readl(clk->parent_switch_reg) & 1)) ; /*wait for 13'MHz selection status */ - - if (!(__raw_readl(clk->parent_switch_reg) & 1)) { - printk(KERN_ERR - "%s ERROR: failed to select 13'MHz, parent sw reg data: %x\n", - clk->name, __raw_readl(clk->parent_switch_reg)); - ret = -1; - } - } - - if (!clk->rate) - clk_reg_disable1(clk); - - return ret; -} - -static int switch_to_clean_13mhz(struct clk *clk) -{ - int i; - int ret; - u32 tmp_reg; - - ret = 0; - - if (!clk->rate) - clk_reg_enable1(clk); - - tmp_reg = __raw_readl(clk->parent_switch_reg); - /*if 13'Mhz clock selected, select 13MHz (clean) source from OSC */ - if (tmp_reg & 1) { - tmp_reg &= ~(1 << 1); /* Trigger switch to 13MHz (clean) clock */ - __raw_writel(tmp_reg, clk->parent_switch_reg); - i = 0; - while (i++ < 0xFFF && (__raw_readl(clk->parent_switch_reg) & 1)) ; /*wait for 13MHz selection status */ - - if (__raw_readl(clk->parent_switch_reg) & 1) { - printk(KERN_ERR - "%s ERROR: failed to select 13MHz, parent sw reg data: %x\n", - clk->name, __raw_readl(clk->parent_switch_reg)); - ret = -1; - } - } - - if (!clk->rate) - clk_reg_disable1(clk); - - return ret; -} - -static int set_13MHz_parent(struct clk *clk, struct clk *parent) -{ - int ret = -EINVAL; - - if (parent == &ck_13MHz) - ret = switch_to_clean_13mhz(clk); - else if (parent == &ck_pll1) - ret = switch_to_dirty_13mhz(clk); - - return ret; -} - -#define PLL160_MIN_FCCO 156000 -#define PLL160_MAX_FCCO 320000 - -/* - * Calculate pll160 settings. - * Possible input: up to 320MHz with step of clk->parent->rate. - * In PNX4008 parent rate for pll160s may be either 1 or 13MHz. - * Ignored paths: "feedback" (bit 13 set), "div-by-N". - * Setting ARM PLL4 rate to 0 will put CPU into direct run mode. - * Setting PLL5 and PLL3 rate to 0 will disable USB and DSP clock input. - * Please refer to PNX4008 IC manual for details. - */ - -static int pll160_set_rate(struct clk *clk, u32 rate) -{ - u32 tmp_reg, tmp_m, tmp_2p, i; - u32 parent_rate; - int ret = -EINVAL; - - parent_rate = clk->parent->rate; - - if (!parent_rate) - goto out; - - /* set direct run for ARM or disable output for others */ - clk_reg_disable(clk); - - /* disable source input as well (ignored for ARM) */ - clk_reg_disable1(clk); - - tmp_reg = __raw_readl(clk->scale_reg); - tmp_reg &= ~0x1ffff; /*clear all settings, power down */ - __raw_writel(tmp_reg, clk->scale_reg); - - rate -= rate % parent_rate; /*round down the input */ - - if (rate > PLL160_MAX_FCCO) - rate = PLL160_MAX_FCCO; - - if (!rate) { - clk->rate = 0; - ret = 0; - goto out; - } - - clk_reg_enable1(clk); - tmp_reg = __raw_readl(clk->scale_reg); - - if (rate == parent_rate) { - /*enter direct bypass mode */ - tmp_reg |= ((1 << 14) | (1 << 15)); - __raw_writel(tmp_reg, clk->scale_reg); - clk->rate = parent_rate; - clk_reg_enable(clk); - ret = 0; - goto out; - } - - i = 0; - for (tmp_2p = 1; tmp_2p < 16; tmp_2p <<= 1) { - if (rate * tmp_2p >= PLL160_MIN_FCCO) - break; - i++; - } - - if (tmp_2p > 1) - tmp_reg |= ((i - 1) << 11); - else - tmp_reg |= (1 << 14); /*direct mode, no divide */ - - tmp_m = rate * tmp_2p; - tmp_m /= parent_rate; - - tmp_reg |= (tmp_m - 1) << 1; /*calculate M */ - tmp_reg |= (1 << 16); /*power up PLL */ - __raw_writel(tmp_reg, clk->scale_reg); - - if (clk_wait_for_pll_lock(clk) < 0) { - clk_reg_disable(clk); - clk_reg_disable1(clk); - - tmp_reg = __raw_readl(clk->scale_reg); - tmp_reg &= ~0x1ffff; /*clear all settings, power down */ - __raw_writel(tmp_reg, clk->scale_reg); - clk->rate = 0; - ret = -EFAULT; - goto out; - } - - clk->rate = (tmp_m * parent_rate) / tmp_2p; - - if (clk->flags & RATE_PROPAGATES) - propagate_rate(clk); - - clk_reg_enable(clk); - ret = 0; - -out: - return ret; -} - -/*configure PER_CLK*/ -static int per_clk_set_rate(struct clk *clk, u32 rate) -{ - u32 tmp; - - tmp = __raw_readl(clk->scale_reg); - tmp &= ~(0x1f << 2); - tmp |= ((clk->parent->rate / clk->rate) - 1) << 2; - __raw_writel(tmp, clk->scale_reg); - clk->rate = rate; - return 0; -} - -/*configure HCLK*/ -static int hclk_set_rate(struct clk *clk, u32 rate) -{ - u32 tmp; - tmp = __raw_readl(clk->scale_reg); - tmp = tmp & ~0x3; - switch (rate) { - case 1: - break; - case 2: - tmp |= 1; - break; - case 4: - tmp |= 2; - break; - } - - __raw_writel(tmp, clk->scale_reg); - clk->rate = rate; - return 0; -} - -static u32 hclk_round_rate(struct clk *clk, u32 rate) -{ - switch (rate) { - case 1: - case 4: - return rate; - } - return 2; -} - -static u32 per_clk_round_rate(struct clk *clk, u32 rate) -{ - return CLK_RATE_13MHZ; -} - -static int on_off_set_rate(struct clk *clk, u32 rate) -{ - if (rate) { - clk_reg_enable(clk); - clk->rate = 1; - } else { - clk_reg_disable(clk); - clk->rate = 0; - } - return 0; -} - -static int on_off_inv_set_rate(struct clk *clk, u32 rate) -{ - if (rate) { - clk_reg_disable(clk); /*enable bit is inverted */ - clk->rate = 1; - } else { - clk_reg_enable(clk); - clk->rate = 0; - } - return 0; -} - -static u32 on_off_round_rate(struct clk *clk, u32 rate) -{ - return (rate ? 1 : 0); -} - -static u32 pll4_round_rate(struct clk *clk, u32 rate) -{ - if (rate > CLK_RATE_208MHZ) - rate = CLK_RATE_208MHZ; - if (rate == CLK_RATE_208MHZ && hclk_ck.user_rate == 1) - rate = CLK_RATE_208MHZ - CLK_RATE_13MHZ; - return (rate - (rate % (hclk_ck.user_rate * CLK_RATE_13MHZ))); -} - -static u32 pll3_round_rate(struct clk *clk, u32 rate) -{ - if (rate > CLK_RATE_208MHZ) - rate = CLK_RATE_208MHZ; - return (rate - rate % CLK_RATE_13MHZ); -} - -static u32 pll5_round_rate(struct clk *clk, u32 rate) -{ - return (rate ? CLK_RATE_48MHZ : 0); -} - -static u32 ck_13MHz_round_rate(struct clk *clk, u32 rate) -{ - return (rate ? CLK_RATE_13MHZ : 0); -} - -static int ck_13MHz_set_rate(struct clk *clk, u32 rate) -{ - if (rate) { - clk_reg_disable(clk); /*enable bit is inverted */ - udelay(500); - clk->rate = CLK_RATE_13MHZ; - ck_1MHz.rate = CLK_RATE_1MHZ; - } else { - clk_reg_enable(clk); - clk->rate = 0; - ck_1MHz.rate = 0; - } - return 0; -} - -static int pll1_set_rate(struct clk *clk, u32 rate) -{ -#if 0 /* doesn't work on some boards, probably a HW BUG */ - if (rate) { - clk_reg_disable(clk); /*enable bit is inverted */ - if (!clk_wait_for_pll_lock(clk)) { - clk->rate = CLK_RATE_13MHZ; - } else { - clk_reg_enable(clk); - clk->rate = 0; - } - - } else { - clk_reg_enable(clk); - clk->rate = 0; - } -#endif - return 0; -} - -/* Clock sources */ - -static struct clk osc_13MHz = { - .name = "osc_13MHz", - .flags = FIXED_RATE, - .rate = CLK_RATE_13MHZ, -}; - -static struct clk ck_13MHz = { - .name = "ck_13MHz", - .parent = &osc_13MHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &ck_13MHz_round_rate, - .set_rate = &ck_13MHz_set_rate, - .enable_reg = OSC13CTRL_REG, - .enable_shift = 0, - .rate = CLK_RATE_13MHZ, -}; - -static struct clk osc_32KHz = { - .name = "osc_32KHz", - .flags = FIXED_RATE, - .rate = CLK_RATE_32KHZ, -}; - -/*attached to PLL5*/ -static struct clk ck_1MHz = { - .name = "ck_1MHz", - .flags = FIXED_RATE | PARENT_SET_RATE, - .parent = &ck_13MHz, -}; - -/* PLL1 (397) - provides 13' MHz clock */ -static struct clk ck_pll1 = { - .name = "ck_pll1", - .parent = &osc_32KHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &ck_13MHz_round_rate, - .set_rate = &pll1_set_rate, - .enable_reg = PLLCTRL_REG, - .enable_shift = 1, - .scale_reg = PLLCTRL_REG, - .rate = CLK_RATE_13MHZ, -}; - -/* CPU/Bus PLL */ -static struct clk ck_pll4 = { - .name = "ck_pll4", - .parent = &ck_pll1, - .flags = RATE_PROPAGATES | NEEDS_INITIALIZATION, - .propagate_next = &per_ck, - .round_rate = &pll4_round_rate, - .set_rate = &pll160_set_rate, - .rate = CLK_RATE_208MHZ, - .scale_reg = HCLKPLLCTRL_REG, - .enable_reg = PWRCTRL_REG, - .enable_shift = 2, - .parent_switch_reg = SYSCLKCTRL_REG, - .set_parent = &set_13MHz_parent, -}; - -/* USB PLL */ -static struct clk ck_pll5 = { - .name = "ck_pll5", - .parent = &ck_1MHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &pll5_round_rate, - .set_rate = &pll160_set_rate, - .scale_reg = USBCTRL_REG, - .enable_reg = USBCTRL_REG, - .enable_shift = 18, - .enable_reg1 = USBCTRL_REG, - .enable_shift1 = 17, -}; - -/* XPERTTeak DSP PLL */ -static struct clk ck_pll3 = { - .name = "ck_pll3", - .parent = &ck_pll1, - .flags = NEEDS_INITIALIZATION, - .round_rate = &pll3_round_rate, - .set_rate = &pll160_set_rate, - .scale_reg = DSPPLLCTRL_REG, - .enable_reg = DSPCLKCTRL_REG, - .enable_shift = 3, - .enable_reg1 = DSPCLKCTRL_REG, - .enable_shift1 = 2, - .parent_switch_reg = DSPCLKCTRL_REG, - .set_parent = &set_13MHz_parent, -}; - -static struct clk hclk_ck = { - .name = "hclk_ck", - .parent = &ck_pll4, - .flags = PARENT_SET_RATE, - .set_rate = &hclk_set_rate, - .round_rate = &hclk_round_rate, - .scale_reg = HCLKDIVCTRL_REG, - .rate = 2, - .user_rate = 2, -}; - -static struct clk per_ck = { - .name = "per_ck", - .parent = &ck_pll4, - .flags = FIXED_RATE, - .propagate_next = &hclk_ck, - .set_rate = &per_clk_set_rate, - .round_rate = &per_clk_round_rate, - .scale_reg = HCLKDIVCTRL_REG, - .rate = CLK_RATE_13MHZ, - .user_rate = CLK_RATE_13MHZ, -}; - -static struct clk m2hclk_ck = { - .name = "m2hclk_ck", - .parent = &hclk_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_inv_set_rate, - .rate = 1, - .enable_shift = 6, - .enable_reg = PWRCTRL_REG, -}; - -static struct clk vfp9_ck = { - .name = "vfp9_ck", - .parent = &ck_pll4, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .rate = 1, - .enable_shift = 4, - .enable_reg = VFP9CLKCTRL_REG, -}; - -static struct clk keyscan_ck = { - .name = "keyscan_ck", - .parent = &osc_32KHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = KEYCLKCTRL_REG, -}; - -static struct clk touch_ck = { - .name = "touch_ck", - .parent = &osc_32KHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = TSCLKCTRL_REG, -}; - -static struct clk pwm1_ck = { - .name = "pwm1_ck", - .parent = &osc_32KHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = PWMCLKCTRL_REG, -}; - -static struct clk pwm2_ck = { - .name = "pwm2_ck", - .parent = &osc_32KHz, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 2, - .enable_reg = PWMCLKCTRL_REG, -}; - -static struct clk jpeg_ck = { - .name = "jpeg_ck", - .parent = &hclk_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = JPEGCLKCTRL_REG, -}; - -static struct clk ms_ck = { - .name = "ms_ck", - .parent = &ck_pll4, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 5, - .enable_reg = MSCTRL_REG, -}; - -static struct clk dum_ck = { - .name = "dum_ck", - .parent = &hclk_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = DUMCLKCTRL_REG, -}; - -static struct clk flash_ck = { - .name = "flash_ck", - .parent = &hclk_ck, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 1, /* Only MLC clock supported */ - .enable_reg = FLASHCLKCTRL_REG, -}; - -static struct clk i2c0_ck = { - .name = "i2c0_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = I2CCLKCTRL_REG, -}; - -static struct clk i2c1_ck = { - .name = "i2c1_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 1, - .enable_reg = I2CCLKCTRL_REG, -}; - -static struct clk i2c2_ck = { - .name = "i2c2_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 2, - .enable_reg = USB_OTG_CLKCTRL_REG, -}; - -static struct clk spi0_ck = { - .name = "spi0_ck", - .parent = &hclk_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = SPICTRL_REG, -}; - -static struct clk spi1_ck = { - .name = "spi1_ck", - .parent = &hclk_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 4, - .enable_reg = SPICTRL_REG, -}; - -static struct clk dma_ck = { - .name = "dma_ck", - .parent = &hclk_ck, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 0, - .enable_reg = DMACLKCTRL_REG, -}; - -static struct clk uart3_ck = { - .name = "uart3_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .rate = 1, - .enable_shift = 0, - .enable_reg = UARTCLKCTRL_REG, -}; - -static struct clk uart4_ck = { - .name = "uart4_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 1, - .enable_reg = UARTCLKCTRL_REG, -}; - -static struct clk uart5_ck = { - .name = "uart5_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .rate = 1, - .enable_shift = 2, - .enable_reg = UARTCLKCTRL_REG, -}; - -static struct clk uart6_ck = { - .name = "uart6_ck", - .parent = &per_ck, - .flags = NEEDS_INITIALIZATION, - .round_rate = &on_off_round_rate, - .set_rate = &on_off_set_rate, - .enable_shift = 3, - .enable_reg = UARTCLKCTRL_REG, -}; - -/* These clocks are visible outside this module - * and can be initialized - */ -static struct clk *onchip_clks[] = { - &ck_13MHz, - &ck_pll1, - &ck_pll4, - &ck_pll5, - &ck_pll3, - &vfp9_ck, - &m2hclk_ck, - &hclk_ck, - &dma_ck, - &flash_ck, - &dum_ck, - &keyscan_ck, - &pwm1_ck, - &pwm2_ck, - &jpeg_ck, - &ms_ck, - &touch_ck, - &i2c0_ck, - &i2c1_ck, - &i2c2_ck, - &spi0_ck, - &spi1_ck, - &uart3_ck, - &uart4_ck, - &uart5_ck, - &uart6_ck, -}; - -static int local_clk_enable(struct clk *clk) -{ - int ret = 0; - - if (!(clk->flags & FIXED_RATE) && !clk->rate && clk->set_rate - && clk->user_rate) - ret = clk->set_rate(clk, clk->user_rate); - return ret; -} - -static void local_clk_disable(struct clk *clk) -{ - if (!(clk->flags & FIXED_RATE) && clk->rate && clk->set_rate) - clk->set_rate(clk, 0); -} - -static void local_clk_unuse(struct clk *clk) -{ - if (clk->usecount > 0 && !(--clk->usecount)) { - local_clk_disable(clk); - if (clk->parent) - local_clk_unuse(clk->parent); - } -} - -static int local_clk_use(struct clk *clk) -{ - int ret = 0; - if (clk->usecount++ == 0) { - if (clk->parent) - ret = local_clk_use(clk->parent); - - if (ret != 0) { - clk->usecount--; - goto out; - } - - ret = local_clk_enable(clk); - - if (ret != 0 && clk->parent) { - local_clk_unuse(clk->parent); - clk->usecount--; - } - } -out: - return ret; -} - -static int local_set_rate(struct clk *clk, u32 rate) -{ - int ret = -EINVAL; - if (clk->set_rate) { - - if (clk->user_rate == clk->rate && clk->parent->rate) { - /* if clock enabled or rate not set */ - clk->user_rate = clk->round_rate(clk, rate); - ret = clk->set_rate(clk, clk->user_rate); - } else - clk->user_rate = clk->round_rate(clk, rate); - ret = 0; - } - return ret; -} - -int clk_set_rate(struct clk *clk, unsigned long rate) -{ - int ret = -EINVAL; - - if (clk->flags & FIXED_RATE) - goto out; - - clock_lock(); - if ((clk->flags & PARENT_SET_RATE) && clk->parent) { - - clk->user_rate = clk->round_rate(clk, rate); - /* parent clock needs to be refreshed - for the setting to take effect */ - } else { - ret = local_set_rate(clk, rate); - } - ret = 0; - clock_unlock(); - -out: - return ret; -} - -EXPORT_SYMBOL(clk_set_rate); - -struct clk *clk_get(struct device *dev, const char *id) -{ - struct clk *clk = ERR_PTR(-ENOENT); - struct clk **clkp; - - clock_lock(); - for (clkp = onchip_clks; clkp < onchip_clks + ARRAY_SIZE(onchip_clks); - clkp++) { - if (strcmp(id, (*clkp)->name) == 0 - && try_module_get((*clkp)->owner)) { - clk = (*clkp); - break; - } - } - clock_unlock(); - - return clk; -} -EXPORT_SYMBOL(clk_get); - -void clk_put(struct clk *clk) -{ - clock_lock(); - if (clk && !IS_ERR(clk)) - module_put(clk->owner); - clock_unlock(); -} -EXPORT_SYMBOL(clk_put); - -unsigned long clk_get_rate(struct clk *clk) -{ - unsigned long ret; - clock_lock(); - ret = clk->rate; - clock_unlock(); - return ret; -} -EXPORT_SYMBOL(clk_get_rate); - -int clk_enable(struct clk *clk) -{ - int ret = 0; - - clock_lock(); - ret = local_clk_use(clk); - clock_unlock(); - return ret; -} - -EXPORT_SYMBOL(clk_enable); - -void clk_disable(struct clk *clk) -{ - clock_lock(); - local_clk_unuse(clk); - clock_unlock(); -} - -EXPORT_SYMBOL(clk_disable); - -long clk_round_rate(struct clk *clk, unsigned long rate) -{ - long ret; - clock_lock(); - if (clk->round_rate) - ret = clk->round_rate(clk, rate); - else - ret = clk->rate; - clock_unlock(); - return ret; -} - -EXPORT_SYMBOL(clk_round_rate); - -int clk_set_parent(struct clk *clk, struct clk *parent) -{ - int ret = -ENODEV; - if (!clk->set_parent) - goto out; - - clock_lock(); - ret = clk->set_parent(clk, parent); - if (!ret) - clk->parent = parent; - clock_unlock(); - -out: - return ret; -} - -EXPORT_SYMBOL(clk_set_parent); - -static int __init clk_init(void) -{ - struct clk **clkp; - - /* Disable autoclocking, as it doesn't seem to work */ - __raw_writel(0xff, AUTOCLK_CTRL); - - for (clkp = onchip_clks; clkp < onchip_clks + ARRAY_SIZE(onchip_clks); - clkp++) { - if (((*clkp)->flags & NEEDS_INITIALIZATION) - && ((*clkp)->set_rate)) { - (*clkp)->user_rate = (*clkp)->rate; - local_set_rate((*clkp), (*clkp)->user_rate); - if ((*clkp)->set_parent) - (*clkp)->set_parent((*clkp), (*clkp)->parent); - } - pr_debug("%s: clock %s, rate %ld\n", - __FUNCTION__, (*clkp)->name, (*clkp)->rate); - } - - local_clk_use(&ck_pll4); - - /* if ck_13MHz is not used, disable it. */ - if (ck_13MHz.usecount == 0) - local_clk_disable(&ck_13MHz); - - /* Disable autoclocking */ - __raw_writeb(0xff, AUTOCLK_CTRL); - - return 0; -} - -arch_initcall(clk_init); diff --git a/arch/arm/mach-pnx4008/clock.h b/arch/arm/mach-pnx4008/clock.h deleted file mode 100644 index cd58f372c..000000000 --- a/arch/arm/mach-pnx4008/clock.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * arch/arm/mach-pnx4008/clock.h - * - * Clock control driver for PNX4008 - internal header file - * - * Author: Vitaly Wool - * - * 2006 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#ifndef __ARCH_ARM_PNX4008_CLOCK_H__ -#define __ARCH_ARM_PNX4008_CLOCK_H__ - -struct clk { - struct list_head node; - struct module *owner; - const char *name; - struct clk *parent; - struct clk *propagate_next; - u32 rate; - u32 user_rate; - s8 usecount; - u32 flags; - u32 scale_reg; - u8 enable_shift; - u32 enable_reg; - u8 enable_shift1; - u32 enable_reg1; - u32 parent_switch_reg; - u32(*round_rate) (struct clk *, u32); - int (*set_rate) (struct clk *, u32); - int (*set_parent) (struct clk * clk, struct clk * parent); -}; - -/* Flags */ -#define RATE_PROPAGATES (1<<0) -#define NEEDS_INITIALIZATION (1<<1) -#define PARENT_SET_RATE (1<<2) -#define FIXED_RATE (1<<3) - -#endif diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c deleted file mode 100644 index 3d73c1e93..000000000 --- a/arch/arm/mach-pnx4008/core.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * arch/arm/mach-pnx4008/core.c - * - * PNX4008 core startup code - * - * Authors: Vitaly Wool, Dmitry Chigirev, - * Grigory Tolstolytkin, Dmitry Pervushin - * - * Based on reference code received from Philips: - * Copyright (C) 2003 Philips Semiconductors - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -struct resource spipnx_0_resources[] = { - { - .start = PNX4008_SPI1_BASE, - .end = PNX4008_SPI1_BASE + SZ_4K, - .flags = IORESOURCE_MEM, - }, { - .start = PER_SPI1_REC_XMIT, - .flags = IORESOURCE_DMA, - }, { - .start = SPI1_INT, - .flags = IORESOURCE_IRQ, - }, { - .flags = 0, - }, -}; - -struct resource spipnx_1_resources[] = { - { - .start = PNX4008_SPI2_BASE, - .end = PNX4008_SPI2_BASE + SZ_4K, - .flags = IORESOURCE_MEM, - }, { - .start = PER_SPI2_REC_XMIT, - .flags = IORESOURCE_DMA, - }, { - .start = SPI2_INT, - .flags = IORESOURCE_IRQ, - }, { - .flags = 0, - } -}; - -static struct spi_board_info spi_board_info[] __initdata = { - { - .modalias = "m25p80", - .max_speed_hz = 1000000, - .bus_num = 1, - .chip_select = 0, - }, -}; - -static struct platform_device spipnx_1 = { - .name = "spipnx", - .id = 1, - .num_resources = ARRAY_SIZE(spipnx_0_resources), - .resource = spipnx_0_resources, - .dev = { - .coherent_dma_mask = 0xFFFFFFFF, - }, -}; - -static struct platform_device spipnx_2 = { - .name = "spipnx", - .id = 2, - .num_resources = ARRAY_SIZE(spipnx_1_resources), - .resource = spipnx_1_resources, - .dev = { - .coherent_dma_mask = 0xFFFFFFFF, - }, -}; - -static struct plat_serial8250_port platform_serial_ports[] = { - { - .membase = (void *)__iomem(IO_ADDRESS(PNX4008_UART5_BASE)), - .mapbase = (unsigned long)PNX4008_UART5_BASE, - .irq = IIR5_INT, - .uartclk = PNX4008_UART_CLK, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_BUGGY_UART | UPF_SKIP_TEST, - }, - { - .membase = (void *)__iomem(IO_ADDRESS(PNX4008_UART3_BASE)), - .mapbase = (unsigned long)PNX4008_UART3_BASE, - .irq = IIR3_INT, - .uartclk = PNX4008_UART_CLK, - .regshift = 2, - .iotype = UPIO_MEM, - .flags = UPF_BOOT_AUTOCONF | UPF_BUGGY_UART | UPF_SKIP_TEST, - }, - {} -}; - -static struct platform_device serial_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = &platform_serial_ports, - }, -}; - -static struct platform_device *devices[] __initdata = { - &spipnx_1, - &spipnx_2, - &serial_device, -}; - - -extern void pnx4008_uart_init(void); - -static void __init pnx4008_init(void) -{ - /*disable all START interrupt sources, - and clear all START interrupt flags */ - __raw_writel(0, START_INT_ER_REG(SE_PIN_BASE_INT)); - __raw_writel(0, START_INT_ER_REG(SE_INT_BASE_INT)); - __raw_writel(0xffffffff, START_INT_RSR_REG(SE_PIN_BASE_INT)); - __raw_writel(0xffffffff, START_INT_RSR_REG(SE_INT_BASE_INT)); - - platform_add_devices(devices, ARRAY_SIZE(devices)); - spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); - /* Switch on the UART clocks */ - pnx4008_uart_init(); -} - -static struct map_desc pnx4008_io_desc[] __initdata = { - { - .virtual = IO_ADDRESS(PNX4008_IRAM_BASE), - .pfn = __phys_to_pfn(PNX4008_IRAM_BASE), - .length = SZ_64K, - .type = MT_DEVICE, - }, { - .virtual = IO_ADDRESS(PNX4008_NDF_FLASH_BASE), - .pfn = __phys_to_pfn(PNX4008_NDF_FLASH_BASE), - .length = SZ_1M - SZ_128K, - .type = MT_DEVICE, - }, { - .virtual = IO_ADDRESS(PNX4008_JPEG_CONFIG_BASE), - .pfn = __phys_to_pfn(PNX4008_JPEG_CONFIG_BASE), - .length = SZ_128K * 3, - .type = MT_DEVICE, - }, { - .virtual = IO_ADDRESS(PNX4008_DMA_CONFIG_BASE), - .pfn = __phys_to_pfn(PNX4008_DMA_CONFIG_BASE), - .length = SZ_1M, - .type = MT_DEVICE, - }, { - .virtual = IO_ADDRESS(PNX4008_AHB2FAB_BASE), - .pfn = __phys_to_pfn(PNX4008_AHB2FAB_BASE), - .length = SZ_1M, - .type = MT_DEVICE, - }, -}; - -void __init pnx4008_map_io(void) -{ - iotable_init(pnx4008_io_desc, ARRAY_SIZE(pnx4008_io_desc)); -} - -extern struct sys_timer pnx4008_timer; - -MACHINE_START(PNX4008, "Philips PNX4008") - /* Maintainer: MontaVista Software Inc. */ - .phys_io = 0x40090000, - .io_pg_offst = (0xf4090000 >> 18) & 0xfffc, - .boot_params = 0x80000100, - .map_io = pnx4008_map_io, - .init_irq = pnx4008_init_irq, - .init_machine = pnx4008_init, - .timer = &pnx4008_timer, -MACHINE_END diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c deleted file mode 100644 index ec01574f8..000000000 --- a/arch/arm/mach-pnx4008/dma.c +++ /dev/null @@ -1,1108 +0,0 @@ -/* - * linux/arch/arm/mach-pnx4008/dma.c - * - * PNX4008 DMA registration and IRQ dispatching - * - * Author: Vitaly Wool - * Copyright: MontaVista Software Inc. (c) 2005 - * - * Based on the code from Nicolas Pitre - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -static struct dma_channel { - char *name; - void (*irq_handler) (int, int, void *, struct pt_regs *); - void *data; - struct pnx4008_dma_ll *ll; - u32 ll_dma; - void *target_addr; - int target_id; -} dma_channels[MAX_DMA_CHANNELS]; - -static struct ll_pool { - void *vaddr; - void *cur; - dma_addr_t dma_addr; - int count; -} ll_pool; - -static spinlock_t ll_lock = SPIN_LOCK_UNLOCKED; - -struct pnx4008_dma_ll *pnx4008_alloc_ll_entry(dma_addr_t * ll_dma) -{ - struct pnx4008_dma_ll *ll = NULL; - unsigned long flags; - - spin_lock_irqsave(&ll_lock, flags); - if (ll_pool.count > 4) { /* can give one more */ - ll = *(struct pnx4008_dma_ll **) ll_pool.cur; - *ll_dma = ll_pool.dma_addr + ((void *)ll - ll_pool.vaddr); - *(void **)ll_pool.cur = **(void ***)ll_pool.cur; - memset(ll, 0, sizeof(*ll)); - ll_pool.count--; - } - spin_unlock_irqrestore(&ll_lock, flags); - - return ll; -} - -EXPORT_SYMBOL_GPL(pnx4008_alloc_ll_entry); - -void pnx4008_free_ll_entry(struct pnx4008_dma_ll * ll, dma_addr_t ll_dma) -{ - unsigned long flags; - - if (ll) { - if ((unsigned long)((long)ll - (long)ll_pool.vaddr) > 0x4000) { - printk(KERN_ERR "Trying to free entry not allocated by DMA\n"); - BUG(); - } - - if (ll->flags & DMA_BUFFER_ALLOCATED) - ll->free(ll->alloc_data); - - spin_lock_irqsave(&ll_lock, flags); - *(long *)ll = *(long *)ll_pool.cur; - *(long *)ll_pool.cur = (long)ll; - ll_pool.count++; - spin_unlock_irqrestore(&ll_lock, flags); - } -} - -EXPORT_SYMBOL_GPL(pnx4008_free_ll_entry); - -void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll * ll) -{ - struct pnx4008_dma_ll *ptr; - u32 dma; - - while (ll) { - dma = ll->next_dma; - ptr = ll->next; - pnx4008_free_ll_entry(ll, ll_dma); - - ll_dma = dma; - ll = ptr; - } -} - -EXPORT_SYMBOL_GPL(pnx4008_free_ll); - -static int dma_channels_requested = 0; - -static inline void dma_increment_usage(void) -{ - if (!dma_channels_requested++) { - struct clk *clk = clk_get(0, "dma_ck"); - if (!IS_ERR(clk)) { - clk_set_rate(clk, 1); - clk_put(clk); - } - pnx4008_config_dma(-1, -1, 1); - } -} -static inline void dma_decrement_usage(void) -{ - if (!--dma_channels_requested) { - struct clk *clk = clk_get(0, "dma_ck"); - if (!IS_ERR(clk)) { - clk_set_rate(clk, 0); - clk_put(clk); - } - pnx4008_config_dma(-1, -1, 0); - - } -} - -static spinlock_t dma_lock = SPIN_LOCK_UNLOCKED; - -static inline void pnx4008_dma_lock(void) -{ - spin_lock_irq(&dma_lock); -} - -static inline void pnx4008_dma_unlock(void) -{ - spin_unlock_irq(&dma_lock); -} - -#define VALID_CHANNEL(c) (((c) >= 0) && ((c) < MAX_DMA_CHANNELS)) - -int pnx4008_request_channel(char *name, int ch, - void (*irq_handler) (int, int, void *, - struct pt_regs *), void *data) -{ - int i, found = 0; - - /* basic sanity checks */ - if (!name || (ch != -1 && !VALID_CHANNEL(ch))) - return -EINVAL; - - pnx4008_dma_lock(); - - /* try grabbing a DMA channel with the requested priority */ - for (i = MAX_DMA_CHANNELS - 1; i >= 0; i--) { - if (!dma_channels[i].name && (ch == -1 || ch == i)) { - found = 1; - break; - } - } - - if (found) { - dma_increment_usage(); - dma_channels[i].name = name; - dma_channels[i].irq_handler = irq_handler; - dma_channels[i].data = data; - dma_channels[i].ll = NULL; - dma_channels[i].ll_dma = 0; - } else { - printk(KERN_WARNING "No more available DMA channels for %s\n", - name); - i = -ENODEV; - } - - pnx4008_dma_unlock(); - return i; -} - -EXPORT_SYMBOL_GPL(pnx4008_request_channel); - -void pnx4008_free_channel(int ch) -{ - if (!dma_channels[ch].name) { - printk(KERN_CRIT - "%s: trying to free channel %d which is already freed\n", - __FUNCTION__, ch); - return; - } - - pnx4008_dma_lock(); - pnx4008_free_ll(dma_channels[ch].ll_dma, dma_channels[ch].ll); - dma_channels[ch].ll = NULL; - dma_decrement_usage(); - - dma_channels[ch].name = NULL; - pnx4008_dma_unlock(); -} - -EXPORT_SYMBOL_GPL(pnx4008_free_channel); - -int pnx4008_config_dma(int ahb_m1_be, int ahb_m2_be, int enable) -{ - unsigned long dma_cfg = __raw_readl(DMAC_CONFIG); - - switch (ahb_m1_be) { - case 0: - dma_cfg &= ~(1 << 1); - break; - case 1: - dma_cfg |= (1 << 1); - break; - default: - break; - } - - switch (ahb_m2_be) { - case 0: - dma_cfg &= ~(1 << 2); - break; - case 1: - dma_cfg |= (1 << 2); - break; - default: - break; - } - - switch (enable) { - case 0: - dma_cfg &= ~(1 << 0); - break; - case 1: - dma_cfg |= (1 << 0); - break; - default: - break; - } - - pnx4008_dma_lock(); - __raw_writel(dma_cfg, DMAC_CONFIG); - pnx4008_dma_unlock(); - - return 0; -} - -EXPORT_SYMBOL_GPL(pnx4008_config_dma); - -int pnx4008_dma_pack_control(const struct pnx4008_dma_ch_ctrl * ch_ctrl, - unsigned long *ctrl) -{ - int i = 0, dbsize, sbsize, err = 0; - - if (!ctrl || !ch_ctrl) { - err = -EINVAL; - goto out; - } - - *ctrl = 0; - - switch (ch_ctrl->tc_mask) { - case 0: - break; - case 1: - *ctrl |= (1 << 31); - break; - - default: - err = -EINVAL; - goto out; - } - - switch (ch_ctrl->cacheable) { - case 0: - break; - case 1: - *ctrl |= (1 << 30); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->bufferable) { - case 0: - break; - case 1: - *ctrl |= (1 << 29); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->priv_mode) { - case 0: - break; - case 1: - *ctrl |= (1 << 28); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->di) { - case 0: - break; - case 1: - *ctrl |= (1 << 27); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->si) { - case 0: - break; - case 1: - *ctrl |= (1 << 26); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->dest_ahb1) { - case 0: - break; - case 1: - *ctrl |= (1 << 25); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->src_ahb1) { - case 0: - break; - case 1: - *ctrl |= (1 << 24); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->dwidth) { - case WIDTH_BYTE: - *ctrl &= ~(7 << 21); - break; - case WIDTH_HWORD: - *ctrl &= ~(7 << 21); - *ctrl |= (1 << 21); - break; - case WIDTH_WORD: - *ctrl &= ~(7 << 21); - *ctrl |= (2 << 21); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_ctrl->swidth) { - case WIDTH_BYTE: - *ctrl &= ~(7 << 18); - break; - case WIDTH_HWORD: - *ctrl &= ~(7 << 18); - *ctrl |= (1 << 18); - break; - case WIDTH_WORD: - *ctrl &= ~(7 << 18); - *ctrl |= (2 << 18); - break; - - default: - err = -EINVAL; - goto out; - } - dbsize = ch_ctrl->dbsize; - while (!(dbsize & 1)) { - i++; - dbsize >>= 1; - } - if (ch_ctrl->dbsize != 1 || i > 8 || i == 1) { - err = -EINVAL; - goto out; - } else if (i > 1) - i--; - *ctrl &= ~(7 << 15); - *ctrl |= (i << 15); - - sbsize = ch_ctrl->sbsize; - while (!(sbsize & 1)) { - i++; - sbsize >>= 1; - } - if (ch_ctrl->sbsize != 1 || i > 8 || i == 1) { - err = -EINVAL; - goto out; - } else if (i > 1) - i--; - *ctrl &= ~(7 << 12); - *ctrl |= (i << 12); - - if (ch_ctrl->tr_size > 0x7ff) { - err = -E2BIG; - goto out; - } - *ctrl &= ~0x7ff; - *ctrl |= ch_ctrl->tr_size & 0x7ff; - -out: - return err; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_pack_control); - -int pnx4008_dma_parse_control(unsigned long ctrl, - struct pnx4008_dma_ch_ctrl * ch_ctrl) -{ - int err = 0; - - if (!ch_ctrl) { - err = -EINVAL; - goto out; - } - - ch_ctrl->tr_size = ctrl & 0x7ff; - ctrl >>= 12; - - ch_ctrl->sbsize = 1 << (ctrl & 7); - if (ch_ctrl->sbsize > 1) - ch_ctrl->sbsize <<= 1; - ctrl >>= 3; - - ch_ctrl->dbsize = 1 << (ctrl & 7); - if (ch_ctrl->dbsize > 1) - ch_ctrl->dbsize <<= 1; - ctrl >>= 3; - - switch (ctrl & 7) { - case 0: - ch_ctrl->swidth = WIDTH_BYTE; - break; - case 1: - ch_ctrl->swidth = WIDTH_HWORD; - break; - case 2: - ch_ctrl->swidth = WIDTH_WORD; - break; - default: - err = -EINVAL; - goto out; - } - ctrl >>= 3; - - switch (ctrl & 7) { - case 0: - ch_ctrl->dwidth = WIDTH_BYTE; - break; - case 1: - ch_ctrl->dwidth = WIDTH_HWORD; - break; - case 2: - ch_ctrl->dwidth = WIDTH_WORD; - break; - default: - err = -EINVAL; - goto out; - } - ctrl >>= 3; - - ch_ctrl->src_ahb1 = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->dest_ahb1 = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->si = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->di = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->priv_mode = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->bufferable = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->cacheable = ctrl & 1; - ctrl >>= 1; - - ch_ctrl->tc_mask = ctrl & 1; - -out: - return err; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_parse_control); - -int pnx4008_dma_pack_config(const struct pnx4008_dma_ch_config * ch_cfg, - unsigned long *cfg) -{ - int err = 0; - - if (!cfg || !ch_cfg) { - err = -EINVAL; - goto out; - } - - *cfg = 0; - - switch (ch_cfg->halt) { - case 0: - break; - case 1: - *cfg |= (1 << 18); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_cfg->active) { - case 0: - break; - case 1: - *cfg |= (1 << 17); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_cfg->lock) { - case 0: - break; - case 1: - *cfg |= (1 << 16); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_cfg->itc) { - case 0: - break; - case 1: - *cfg |= (1 << 15); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_cfg->ie) { - case 0: - break; - case 1: - *cfg |= (1 << 14); - break; - - default: - err = -EINVAL; - goto out; - } - switch (ch_cfg->flow_cntrl) { - case FC_MEM2MEM_DMA: - *cfg &= ~(7 << 11); - break; - case FC_MEM2PER_DMA: - *cfg &= ~(7 << 11); - *cfg |= (1 << 11); - break; - case FC_PER2MEM_DMA: - *cfg &= ~(7 << 11); - *cfg |= (2 << 11); - break; - case FC_PER2PER_DMA: - *cfg &= ~(7 << 11); - *cfg |= (3 << 11); - break; - case FC_PER2PER_DPER: - *cfg &= ~(7 << 11); - *cfg |= (4 << 11); - break; - case FC_MEM2PER_PER: - *cfg &= ~(7 << 11); - *cfg |= (5 << 11); - break; - case FC_PER2MEM_PER: - *cfg &= ~(7 << 11); - *cfg |= (6 << 11); - break; - case FC_PER2PER_SPER: - *cfg |= (7 << 11); - break; - - default: - err = -EINVAL; - goto out; - } - *cfg &= ~(0x1f << 6); - *cfg |= ((ch_cfg->dest_per & 0x1f) << 6); - - *cfg &= ~(0x1f << 1); - *cfg |= ((ch_cfg->src_per & 0x1f) << 1); - -out: - return err; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_pack_config); - -int pnx4008_dma_parse_config(unsigned long cfg, - struct pnx4008_dma_ch_config * ch_cfg) -{ - int err = 0; - - if (!ch_cfg) { - err = -EINVAL; - goto out; - } - - cfg >>= 1; - - ch_cfg->src_per = cfg & 0x1f; - cfg >>= 5; - - ch_cfg->dest_per = cfg & 0x1f; - cfg >>= 5; - - switch (cfg & 7) { - case 0: - ch_cfg->flow_cntrl = FC_MEM2MEM_DMA; - break; - case 1: - ch_cfg->flow_cntrl = FC_MEM2PER_DMA; - break; - case 2: - ch_cfg->flow_cntrl = FC_PER2MEM_DMA; - break; - case 3: - ch_cfg->flow_cntrl = FC_PER2PER_DMA; - break; - case 4: - ch_cfg->flow_cntrl = FC_PER2PER_DPER; - break; - case 5: - ch_cfg->flow_cntrl = FC_MEM2PER_PER; - break; - case 6: - ch_cfg->flow_cntrl = FC_PER2MEM_PER; - break; - case 7: - ch_cfg->flow_cntrl = FC_PER2PER_SPER; - } - cfg >>= 3; - - ch_cfg->ie = cfg & 1; - cfg >>= 1; - - ch_cfg->itc = cfg & 1; - cfg >>= 1; - - ch_cfg->lock = cfg & 1; - cfg >>= 1; - - ch_cfg->active = cfg & 1; - cfg >>= 1; - - ch_cfg->halt = cfg & 1; - -out: - return err; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_parse_config); - -void pnx4008_dma_split_head_entry(struct pnx4008_dma_config * config, - struct pnx4008_dma_ch_ctrl * ctrl) -{ - int new_len = ctrl->tr_size, num_entries = 0; - int old_len = new_len; - int src_width, dest_width, count = 1; - - switch (ctrl->swidth) { - case WIDTH_BYTE: - src_width = 1; - break; - case WIDTH_HWORD: - src_width = 2; - break; - case WIDTH_WORD: - src_width = 4; - break; - default: - return; - } - - switch (ctrl->dwidth) { - case WIDTH_BYTE: - dest_width = 1; - break; - case WIDTH_HWORD: - dest_width = 2; - break; - case WIDTH_WORD: - dest_width = 4; - break; - default: - return; - } - - while (new_len > 0x7FF) { - num_entries++; - new_len = (ctrl->tr_size + num_entries) / (num_entries + 1); - } - if (num_entries != 0) { - struct pnx4008_dma_ll *ll = NULL; - config->ch_ctrl &= ~0x7ff; - config->ch_ctrl |= new_len; - if (!config->is_ll) { - config->is_ll = 1; - while (num_entries) { - if (!ll) { - config->ll = - pnx4008_alloc_ll_entry(&config-> - ll_dma); - ll = config->ll; - } else { - ll->next = - pnx4008_alloc_ll_entry(&ll-> - next_dma); - ll = ll->next; - } - - if (ctrl->si) - ll->src_addr = - config->src_addr + - src_width * new_len * count; - else - ll->src_addr = config->src_addr; - if (ctrl->di) - ll->dest_addr = - config->dest_addr + - dest_width * new_len * count; - else - ll->dest_addr = config->dest_addr; - ll->ch_ctrl = config->ch_ctrl & 0x7fffffff; - ll->next_dma = 0; - ll->next = NULL; - num_entries--; - count++; - } - } else { - struct pnx4008_dma_ll *ll_old = config->ll; - unsigned long ll_dma_old = config->ll_dma; - while (num_entries) { - if (!ll) { - config->ll = - pnx4008_alloc_ll_entry(&config-> - ll_dma); - ll = config->ll; - } else { - ll->next = - pnx4008_alloc_ll_entry(&ll-> - next_dma); - ll = ll->next; - } - - if (ctrl->si) - ll->src_addr = - config->src_addr + - src_width * new_len * count; - else - ll->src_addr = config->src_addr; - if (ctrl->di) - ll->dest_addr = - config->dest_addr + - dest_width * new_len * count; - else - ll->dest_addr = config->dest_addr; - ll->ch_ctrl = config->ch_ctrl & 0x7fffffff; - ll->next_dma = 0; - ll->next = NULL; - num_entries--; - count++; - } - ll->next_dma = ll_dma_old; - ll->next = ll_old; - } - /* adjust last length/tc */ - ll->ch_ctrl = config->ch_ctrl & (~0x7ff); - ll->ch_ctrl |= old_len - new_len * (count - 1); - config->ch_ctrl &= 0x7fffffff; - } -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_split_head_entry); - -void pnx4008_dma_split_ll_entry(struct pnx4008_dma_ll * cur_ll, - struct pnx4008_dma_ch_ctrl * ctrl) -{ - int new_len = ctrl->tr_size, num_entries = 0; - int old_len = new_len; - int src_width, dest_width, count = 1; - - switch (ctrl->swidth) { - case WIDTH_BYTE: - src_width = 1; - break; - case WIDTH_HWORD: - src_width = 2; - break; - case WIDTH_WORD: - src_width = 4; - break; - default: - return; - } - - switch (ctrl->dwidth) { - case WIDTH_BYTE: - dest_width = 1; - break; - case WIDTH_HWORD: - dest_width = 2; - break; - case WIDTH_WORD: - dest_width = 4; - break; - default: - return; - } - - while (new_len > 0x7FF) { - num_entries++; - new_len = (ctrl->tr_size + num_entries) / (num_entries + 1); - } - if (num_entries != 0) { - struct pnx4008_dma_ll *ll = NULL; - cur_ll->ch_ctrl &= ~0x7ff; - cur_ll->ch_ctrl |= new_len; - if (!cur_ll->next) { - while (num_entries) { - if (!ll) { - cur_ll->next = - pnx4008_alloc_ll_entry(&cur_ll-> - next_dma); - ll = cur_ll->next; - } else { - ll->next = - pnx4008_alloc_ll_entry(&ll-> - next_dma); - ll = ll->next; - } - - if (ctrl->si) - ll->src_addr = - cur_ll->src_addr + - src_width * new_len * count; - else - ll->src_addr = cur_ll->src_addr; - if (ctrl->di) - ll->dest_addr = - cur_ll->dest_addr + - dest_width * new_len * count; - else - ll->dest_addr = cur_ll->dest_addr; - ll->ch_ctrl = cur_ll->ch_ctrl & 0x7fffffff; - ll->next_dma = 0; - ll->next = NULL; - num_entries--; - count++; - } - } else { - struct pnx4008_dma_ll *ll_old = cur_ll->next; - unsigned long ll_dma_old = cur_ll->next_dma; - while (num_entries) { - if (!ll) { - cur_ll->next = - pnx4008_alloc_ll_entry(&cur_ll-> - next_dma); - ll = cur_ll->next; - } else { - ll->next = - pnx4008_alloc_ll_entry(&ll-> - next_dma); - ll = ll->next; - } - - if (ctrl->si) - ll->src_addr = - cur_ll->src_addr + - src_width * new_len * count; - else - ll->src_addr = cur_ll->src_addr; - if (ctrl->di) - ll->dest_addr = - cur_ll->dest_addr + - dest_width * new_len * count; - else - ll->dest_addr = cur_ll->dest_addr; - ll->ch_ctrl = cur_ll->ch_ctrl & 0x7fffffff; - ll->next_dma = 0; - ll->next = NULL; - num_entries--; - count++; - } - - ll->next_dma = ll_dma_old; - ll->next = ll_old; - } - /* adjust last length/tc */ - ll->ch_ctrl = cur_ll->ch_ctrl & (~0x7ff); - ll->ch_ctrl |= old_len - new_len * (count - 1); - cur_ll->ch_ctrl &= 0x7fffffff; - } -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_split_ll_entry); - -int pnx4008_config_channel(int ch, struct pnx4008_dma_config * config) -{ - if (!VALID_CHANNEL(ch) || !dma_channels[ch].name) - return -EINVAL; - - pnx4008_dma_lock(); - __raw_writel(config->src_addr, DMAC_Cx_SRC_ADDR(ch)); - __raw_writel(config->dest_addr, DMAC_Cx_DEST_ADDR(ch)); - - if (config->is_ll) - __raw_writel(config->ll_dma, DMAC_Cx_LLI(ch)); - else - __raw_writel(0, DMAC_Cx_LLI(ch)); - - __raw_writel(config->ch_ctrl, DMAC_Cx_CONTROL(ch)); - __raw_writel(config->ch_cfg, DMAC_Cx_CONFIG(ch)); - pnx4008_dma_unlock(); - - return 0; - -} - -EXPORT_SYMBOL_GPL(pnx4008_config_channel); - -int pnx4008_channel_get_config(int ch, struct pnx4008_dma_config * config) -{ - if (!VALID_CHANNEL(ch) || !dma_channels[ch].name || !config) - return -EINVAL; - - pnx4008_dma_lock(); - config->ch_cfg = __raw_readl(DMAC_Cx_CONFIG(ch)); - config->ch_ctrl = __raw_readl(DMAC_Cx_CONTROL(ch)); - - config->ll_dma = __raw_readl(DMAC_Cx_LLI(ch)); - config->is_ll = config->ll_dma ? 1 : 0; - - config->src_addr = __raw_readl(DMAC_Cx_SRC_ADDR(ch)); - config->dest_addr = __raw_readl(DMAC_Cx_DEST_ADDR(ch)); - pnx4008_dma_unlock(); - - return 0; -} - -EXPORT_SYMBOL_GPL(pnx4008_channel_get_config); - -int pnx4008_dma_ch_enable(int ch) -{ - unsigned long ch_cfg; - - if (!VALID_CHANNEL(ch) || !dma_channels[ch].name) - return -EINVAL; - - pnx4008_dma_lock(); - ch_cfg = __raw_readl(DMAC_Cx_CONFIG(ch)); - ch_cfg |= 1; - __raw_writel(ch_cfg, DMAC_Cx_CONFIG(ch)); - pnx4008_dma_unlock(); - - return 0; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_ch_enable); - -int pnx4008_dma_ch_disable(int ch) -{ - unsigned long ch_cfg; - - if (!VALID_CHANNEL(ch) || !dma_channels[ch].name) - return -EINVAL; - - pnx4008_dma_lock(); - ch_cfg = __raw_readl(DMAC_Cx_CONFIG(ch)); - ch_cfg &= ~1; - __raw_writel(ch_cfg, DMAC_Cx_CONFIG(ch)); - pnx4008_dma_unlock(); - - return 0; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_ch_disable); - -int pnx4008_dma_ch_enabled(int ch) -{ - unsigned long ch_cfg; - - if (!VALID_CHANNEL(ch) || !dma_channels[ch].name) - return -EINVAL; - - pnx4008_dma_lock(); - ch_cfg = __raw_readl(DMAC_Cx_CONFIG(ch)); - pnx4008_dma_unlock(); - - return ch_cfg & 1; -} - -EXPORT_SYMBOL_GPL(pnx4008_dma_ch_enabled); - -static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) -{ - int i; - unsigned long dint = __raw_readl(DMAC_INT_STAT); - unsigned long tcint = __raw_readl(DMAC_INT_TC_STAT); - unsigned long eint = __raw_readl(DMAC_INT_ERR_STAT); - unsigned long i_bit; - - for (i = MAX_DMA_CHANNELS - 1; i >= 0; i--) { - i_bit = 1 << i; - if (dint & i_bit) { - struct dma_channel *channel = &dma_channels[i]; - - if (channel->name && channel->irq_handler) { - int cause = 0; - - if (eint & i_bit) - cause |= DMA_ERR_INT; - if (tcint & i_bit) - cause |= DMA_TC_INT; - channel->irq_handler(i, cause, channel->data, - regs); - } else { - /* - * IRQ for an unregistered DMA channel - */ - printk(KERN_WARNING - "spurious IRQ for DMA channel %d\n", i); - } - if (tcint & i_bit) - __raw_writel(i_bit, DMAC_INT_TC_CLEAR); - if (eint & i_bit) - __raw_writel(i_bit, DMAC_INT_ERR_CLEAR); - } - } - return IRQ_HANDLED; -} - -static int __init pnx4008_dma_init(void) -{ - int ret, i; - - ret = request_irq(DMA_INT, dma_irq_handler, 0, "DMA", NULL); - if (ret) { - printk(KERN_CRIT "Wow! Can't register IRQ for DMA\n"); - goto out; - } - - ll_pool.count = 0x4000 / sizeof(struct pnx4008_dma_ll); - ll_pool.cur = ll_pool.vaddr = - dma_alloc_coherent(NULL, ll_pool.count * sizeof(struct pnx4008_dma_ll), - &ll_pool.dma_addr, GFP_KERNEL); - - if (!ll_pool.vaddr) { - ret = -ENOMEM; - free_irq(DMA_INT, NULL); - goto out; - } - - for (i = 0; i < ll_pool.count - 1; i++) { - void **addr = ll_pool.vaddr + i * sizeof(struct pnx4008_dma_ll); - *addr = (void *)addr + sizeof(struct pnx4008_dma_ll); - } - *(long *)(ll_pool.vaddr + - (ll_pool.count - 1) * sizeof(struct pnx4008_dma_ll)) = - (long)ll_pool.vaddr; - - __raw_writel(1, DMAC_CONFIG); - -out: - return ret; -} -arch_initcall(pnx4008_dma_init); diff --git a/arch/arm/mach-pnx4008/gpio.c b/arch/arm/mach-pnx4008/gpio.c deleted file mode 100644 index 1ab84ced7..000000000 --- a/arch/arm/mach-pnx4008/gpio.c +++ /dev/null @@ -1,329 +0,0 @@ -/* - * arch/arm/mach-pnx4008/gpio.c - * - * PNX4008 GPIO driver - * - * Author: Dmitry Chigirev - * - * Based on reference code by Iwo Mergler and Z.Tabaaloute from Philips: - * Copyright (c) 2005 Koninklijke Philips Electronics N.V. - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include - -/* register definitions */ -#define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE) - -#define PIO_INP_STATE (0x00U) -#define PIO_OUTP_SET (0x04U) -#define PIO_OUTP_CLR (0x08U) -#define PIO_OUTP_STATE (0x0CU) -#define PIO_DRV_SET (0x10U) -#define PIO_DRV_CLR (0x14U) -#define PIO_DRV_STATE (0x18U) -#define PIO_SDINP_STATE (0x1CU) -#define PIO_SDOUTP_SET (0x20U) -#define PIO_SDOUTP_CLR (0x24U) -#define PIO_MUX_SET (0x28U) -#define PIO_MUX_CLR (0x2CU) -#define PIO_MUX_STATE (0x30U) - -static inline void gpio_lock(void) -{ - local_irq_disable(); -} - -static inline void gpio_unlock(void) -{ - local_irq_enable(); -} - -/* Inline functions */ -static inline int gpio_read_bit(u32 reg, int gpio) -{ - u32 bit, val; - int ret = -EFAULT; - - if (gpio < 0) - goto out; - - bit = GPIO_BIT(gpio); - if (bit) { - val = __raw_readl(PIO_VA_BASE + reg); - ret = (val & bit) ? 1 : 0; - } -out: - return ret; -} - -static inline int gpio_set_bit(u32 reg, int gpio) -{ - u32 bit, val; - int ret = -EFAULT; - - if (gpio < 0) - goto out; - - bit = GPIO_BIT(gpio); - if (bit) { - val = __raw_readl(PIO_VA_BASE + reg); - val |= bit; - __raw_writel(val, PIO_VA_BASE + reg); - ret = 0; - } -out: - return ret; -} - -/* Very simple access control, bitmap for allocated/free */ -static unsigned long access_map[4]; -#define INP_INDEX 0 -#define OUTP_INDEX 1 -#define GPIO_INDEX 2 -#define MUX_INDEX 3 - -/*GPIO to Input Mapping */ -static short gpio_to_inp_map[32] = { - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 24, -1 -}; - -/*GPIO to Mux Mapping */ -static short gpio_to_mux_map[32] = { - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 0, 1, 4, 5, -1 -}; - -/*Output to Mux Mapping */ -static short outp_to_mux_map[32] = { - -1, -1, -1, 6, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 2, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1 -}; - -int pnx4008_gpio_register_pin(unsigned short pin) -{ - unsigned long bit = GPIO_BIT(pin); - int ret = -EBUSY; /* Already in use */ - - gpio_lock(); - - if (GPIO_ISBID(pin)) { - if (access_map[GPIO_INDEX] & bit) - goto out; - access_map[GPIO_INDEX] |= bit; - - } else if (GPIO_ISRAM(pin)) { - if (access_map[GPIO_INDEX] & bit) - goto out; - access_map[GPIO_INDEX] |= bit; - - } else if (GPIO_ISMUX(pin)) { - if (access_map[MUX_INDEX] & bit) - goto out; - access_map[MUX_INDEX] |= bit; - - } else if (GPIO_ISOUT(pin)) { - if (access_map[OUTP_INDEX] & bit) - goto out; - access_map[OUTP_INDEX] |= bit; - - } else if (GPIO_ISIN(pin)) { - if (access_map[INP_INDEX] & bit) - goto out; - access_map[INP_INDEX] |= bit; - } else - goto out; - ret = 0; - -out: - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_register_pin); - -int pnx4008_gpio_unregister_pin(unsigned short pin) -{ - unsigned long bit = GPIO_BIT(pin); - int ret = -EFAULT; /* Not registered */ - - gpio_lock(); - - if (GPIO_ISBID(pin)) { - if (~access_map[GPIO_INDEX] & bit) - goto out; - access_map[GPIO_INDEX] &= ~bit; - } else if (GPIO_ISRAM(pin)) { - if (~access_map[GPIO_INDEX] & bit) - goto out; - access_map[GPIO_INDEX] &= ~bit; - } else if (GPIO_ISMUX(pin)) { - if (~access_map[MUX_INDEX] & bit) - goto out; - access_map[MUX_INDEX] &= ~bit; - } else if (GPIO_ISOUT(pin)) { - if (~access_map[OUTP_INDEX] & bit) - goto out; - access_map[OUTP_INDEX] &= ~bit; - } else if (GPIO_ISIN(pin)) { - if (~access_map[INP_INDEX] & bit) - goto out; - access_map[INP_INDEX] &= ~bit; - } else - goto out; - ret = 0; - -out: - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_unregister_pin); - -unsigned long pnx4008_gpio_read_pin(unsigned short pin) -{ - unsigned long ret = -EFAULT; - int gpio = GPIO_BIT_MASK(pin); - gpio_lock(); - if (GPIO_ISOUT(pin)) { - ret = gpio_read_bit(PIO_OUTP_STATE, gpio); - } else if (GPIO_ISRAM(pin)) { - if (gpio_read_bit(PIO_DRV_STATE, gpio) == 0) { - ret = gpio_read_bit(PIO_SDINP_STATE, gpio); - } - } else if (GPIO_ISBID(pin)) { - ret = gpio_read_bit(PIO_DRV_STATE, gpio); - if (ret > 0) - ret = gpio_read_bit(PIO_OUTP_STATE, gpio); - else if (ret == 0) - ret = - gpio_read_bit(PIO_INP_STATE, gpio_to_inp_map[gpio]); - } else if (GPIO_ISIN(pin)) { - ret = gpio_read_bit(PIO_INP_STATE, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_read_pin); - -/* Write Value to output */ -int pnx4008_gpio_write_pin(unsigned short pin, int output) -{ - int gpio = GPIO_BIT_MASK(pin); - int ret = -EFAULT; - - gpio_lock(); - if (GPIO_ISOUT(pin)) { - printk( "writing '%x' to '%x'\n", - gpio, output ? PIO_OUTP_SET : PIO_OUTP_CLR ); - ret = gpio_set_bit(output ? PIO_OUTP_SET : PIO_OUTP_CLR, gpio); - } else if (GPIO_ISRAM(pin)) { - if (gpio_read_bit(PIO_DRV_STATE, gpio) > 0) - ret = gpio_set_bit(output ? PIO_SDOUTP_SET : - PIO_SDOUTP_CLR, gpio); - } else if (GPIO_ISBID(pin)) { - if (gpio_read_bit(PIO_DRV_STATE, gpio) > 0) - ret = gpio_set_bit(output ? PIO_OUTP_SET : - PIO_OUTP_CLR, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_write_pin); - -/* Value = 1 : Set GPIO pin as output */ -/* Value = 0 : Set GPIO pin as input */ -int pnx4008_gpio_set_pin_direction(unsigned short pin, int output) -{ - int gpio = GPIO_BIT_MASK(pin); - int ret = -EFAULT; - - gpio_lock(); - if (GPIO_ISBID(pin) || GPIO_ISRAM(pin)) { - ret = gpio_set_bit(output ? PIO_DRV_SET : PIO_DRV_CLR, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_set_pin_direction); - -/* Read GPIO pin direction: 0= pin used as input, 1= pin used as output*/ -int pnx4008_gpio_read_pin_direction(unsigned short pin) -{ - int gpio = GPIO_BIT_MASK(pin); - int ret = -EFAULT; - - gpio_lock(); - if (GPIO_ISBID(pin) || GPIO_ISRAM(pin)) { - ret = gpio_read_bit(PIO_DRV_STATE, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_read_pin_direction); - -/* Value = 1 : Set pin to muxed function */ -/* Value = 0 : Set pin as GPIO */ -int pnx4008_gpio_set_pin_mux(unsigned short pin, int output) -{ - int gpio = GPIO_BIT_MASK(pin); - int ret = -EFAULT; - - gpio_lock(); - if (GPIO_ISBID(pin)) { - ret = - gpio_set_bit(output ? PIO_MUX_SET : PIO_MUX_CLR, - gpio_to_mux_map[gpio]); - } else if (GPIO_ISOUT(pin)) { - ret = - gpio_set_bit(output ? PIO_MUX_SET : PIO_MUX_CLR, - outp_to_mux_map[gpio]); - } else if (GPIO_ISMUX(pin)) { - ret = gpio_set_bit(output ? PIO_MUX_SET : PIO_MUX_CLR, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_set_pin_mux); - -/* Read pin mux function: 0= pin used as GPIO, 1= pin used for muxed function*/ -int pnx4008_gpio_read_pin_mux(unsigned short pin) -{ - int gpio = GPIO_BIT_MASK(pin); - int ret = -EFAULT; - - gpio_lock(); - if (GPIO_ISBID(pin)) { - ret = gpio_read_bit(PIO_MUX_STATE, gpio_to_mux_map[gpio]); - } else if (GPIO_ISOUT(pin)) { - ret = gpio_read_bit(PIO_MUX_STATE, outp_to_mux_map[gpio]); - } else if (GPIO_ISMUX(pin)) { - ret = gpio_read_bit(PIO_MUX_STATE, gpio); - } - gpio_unlock(); - return ret; -} - -EXPORT_SYMBOL(pnx4008_gpio_read_pin_mux); diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c deleted file mode 100644 index 3a4bcf3d9..000000000 --- a/arch/arm/mach-pnx4008/irq.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * arch/arm/mach-pnx4008/irq.c - * - * PNX4008 IRQ controller driver - * - * Author: Dmitry Chigirev - * - * Based on reference code received from Philips: - * Copyright (C) 2003 Philips Semiconductors - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static u8 pnx4008_irq_type[NR_IRQS] = PNX4008_IRQ_TYPES; - -static void pnx4008_mask_irq(unsigned int irq) -{ - __raw_writel(__raw_readl(INTC_ER(irq)) & ~INTC_BIT(irq), INTC_ER(irq)); /* mask interrupt */ -} - -static void pnx4008_unmask_irq(unsigned int irq) -{ - __raw_writel(__raw_readl(INTC_ER(irq)) | INTC_BIT(irq), INTC_ER(irq)); /* unmask interrupt */ -} - -static void pnx4008_mask_ack_irq(unsigned int irq) -{ - __raw_writel(__raw_readl(INTC_ER(irq)) & ~INTC_BIT(irq), INTC_ER(irq)); /* mask interrupt */ - __raw_writel(INTC_BIT(irq), INTC_SR(irq)); /* clear interrupt status */ -} - -static int pnx4008_set_irq_type(unsigned int irq, unsigned int type) -{ - switch (type) { - case IRQT_RISING: - __raw_writel(__raw_readl(INTC_ATR(irq)) | INTC_BIT(irq), INTC_ATR(irq)); /*edge sensitive */ - __raw_writel(__raw_readl(INTC_APR(irq)) | INTC_BIT(irq), INTC_APR(irq)); /*rising edge */ - set_irq_handler(irq, do_edge_IRQ); - break; - case IRQT_FALLING: - __raw_writel(__raw_readl(INTC_ATR(irq)) | INTC_BIT(irq), INTC_ATR(irq)); /*edge sensitive */ - __raw_writel(__raw_readl(INTC_APR(irq)) & ~INTC_BIT(irq), INTC_APR(irq)); /*falling edge */ - set_irq_handler(irq, do_edge_IRQ); - break; - case IRQT_LOW: - __raw_writel(__raw_readl(INTC_ATR(irq)) & ~INTC_BIT(irq), INTC_ATR(irq)); /*level sensitive */ - __raw_writel(__raw_readl(INTC_APR(irq)) & ~INTC_BIT(irq), INTC_APR(irq)); /*low level */ - set_irq_handler(irq, do_level_IRQ); - break; - case IRQT_HIGH: - __raw_writel(__raw_readl(INTC_ATR(irq)) & ~INTC_BIT(irq), INTC_ATR(irq)); /*level sensitive */ - __raw_writel(__raw_readl(INTC_APR(irq)) | INTC_BIT(irq), INTC_APR(irq)); /* high level */ - set_irq_handler(irq, do_level_IRQ); - break; - - /* IRQT_BOTHEDGE is not supported */ - default: - printk(KERN_ERR "PNX4008 IRQ: Unsupported irq type %d\n", type); - return -1; - } - return 0; -} - -static struct irqchip pnx4008_irq_chip = { - .ack = pnx4008_mask_ack_irq, - .mask = pnx4008_mask_irq, - .unmask = pnx4008_unmask_irq, - .set_type = pnx4008_set_irq_type, -}; - -void __init pnx4008_init_irq(void) -{ - unsigned int i; - - /* configure IRQ's */ - for (i = 0; i < NR_IRQS; i++) { - set_irq_flags(i, IRQF_VALID); - set_irq_chip(i, &pnx4008_irq_chip); - pnx4008_set_irq_type(i, pnx4008_irq_type[i]); - } - - /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */ - pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]); - pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]); - pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]); - pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]); - - /* mask all others */ - __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | - (1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N), - INTC_ER(MAIN_BASE_INT)); - __raw_writel(0, INTC_ER(SIC1_BASE_INT)); - __raw_writel(0, INTC_ER(SIC2_BASE_INT)); -} - diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c deleted file mode 100644 index 3649cd3df..000000000 --- a/arch/arm/mach-pnx4008/pm.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * arch/arm/mach-pnx4008/pm.c - * - * Power Management driver for PNX4008 - * - * Authors: Vitaly Wool, Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define SRAM_VA IO_ADDRESS(PNX4008_IRAM_BASE) - -static void *saved_sram; - -static struct clk *pll4_clk; - -static inline void pnx4008_standby(void) -{ - void (*pnx4008_cpu_standby_ptr) (void); - - local_irq_disable(); - local_fiq_disable(); - - clk_disable(pll4_clk); - - /*saving portion of SRAM to be used by suspend function. */ - memcpy(saved_sram, (void *)SRAM_VA, pnx4008_cpu_standby_sz); - - /*make sure SRAM copy gets physically written into SDRAM. - SDRAM will be placed into self-refresh during power down */ - flush_cache_all(); - - /*copy suspend function into SRAM */ - memcpy((void *)SRAM_VA, pnx4008_cpu_standby, pnx4008_cpu_standby_sz); - - /*do suspend */ - pnx4008_cpu_standby_ptr = (void *)SRAM_VA; - pnx4008_cpu_standby_ptr(); - - /*restoring portion of SRAM that was used by suspend function */ - memcpy((void *)SRAM_VA, saved_sram, pnx4008_cpu_standby_sz); - - clk_enable(pll4_clk); - - local_fiq_enable(); - local_irq_enable(); -} - -static inline void pnx4008_suspend(void) -{ - void (*pnx4008_cpu_suspend_ptr) (void); - - local_irq_disable(); - local_fiq_disable(); - - clk_disable(pll4_clk); - - __raw_writel(0xffffffff, START_INT_RSR_REG(SE_PIN_BASE_INT)); - __raw_writel(0xffffffff, START_INT_RSR_REG(SE_INT_BASE_INT)); - - /*saving portion of SRAM to be used by suspend function. */ - memcpy(saved_sram, (void *)SRAM_VA, pnx4008_cpu_suspend_sz); - - /*make sure SRAM copy gets physically written into SDRAM. - SDRAM will be placed into self-refresh during power down */ - flush_cache_all(); - - /*copy suspend function into SRAM */ - memcpy((void *)SRAM_VA, pnx4008_cpu_suspend, pnx4008_cpu_suspend_sz); - - /*do suspend */ - pnx4008_cpu_suspend_ptr = (void *)SRAM_VA; - pnx4008_cpu_suspend_ptr(); - - /*restoring portion of SRAM that was used by suspend function */ - memcpy((void *)SRAM_VA, saved_sram, pnx4008_cpu_suspend_sz); - - clk_enable(pll4_clk); - - local_fiq_enable(); - local_irq_enable(); -} - -static int pnx4008_pm_enter(suspend_state_t state) -{ - switch (state) { - case PM_SUSPEND_STANDBY: - pnx4008_standby(); - break; - case PM_SUSPEND_MEM: - pnx4008_suspend(); - break; - case PM_SUSPEND_DISK: - return -ENOTSUPP; - default: - return -EINVAL; - } - return 0; -} - -/* - * Called after processes are frozen, but before we shut down devices. - */ -static int pnx4008_pm_prepare(suspend_state_t state) -{ - switch (state) { - case PM_SUSPEND_STANDBY: - case PM_SUSPEND_MEM: - break; - - case PM_SUSPEND_DISK: - return -ENOTSUPP; - break; - - default: - return -EINVAL; - break; - } - return 0; -} - -/* - * Called after devices are re-setup, but before processes are thawed. - */ -static int pnx4008_pm_finish(suspend_state_t state) -{ - return 0; -} - -/* - * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. - */ -static struct pm_ops pnx4008_pm_ops = { - .prepare = pnx4008_pm_prepare, - .enter = pnx4008_pm_enter, - .finish = pnx4008_pm_finish, -}; - -static int __init pnx4008_pm_init(void) -{ - u32 sram_size_to_allocate; - - pll4_clk = clk_get(0, "ck_pll4"); - if (IS_ERR(pll4_clk)) { - printk(KERN_ERR - "PM Suspend cannot acquire ARM(PLL4) clock control\n"); - return PTR_ERR(pll4_clk); - } - - if (pnx4008_cpu_standby_sz > pnx4008_cpu_suspend_sz) - sram_size_to_allocate = pnx4008_cpu_standby_sz; - else - sram_size_to_allocate = pnx4008_cpu_suspend_sz; - - saved_sram = kmalloc(sram_size_to_allocate, GFP_ATOMIC); - if (!saved_sram) { - printk(KERN_ERR - "PM Suspend: cannot allocate memory to save portion of SRAM\n"); - clk_put(pll4_clk); - return -ENOMEM; - } - - pm_set_ops(&pnx4008_pm_ops); - return 0; -} - -late_initcall(pnx4008_pm_init); diff --git a/arch/arm/mach-pnx4008/serial.c b/arch/arm/mach-pnx4008/serial.c deleted file mode 100644 index 95a1b3f96..000000000 --- a/arch/arm/mach-pnx4008/serial.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * linux/arch/arm/mach-pnx4008/serial.c - * - * PNX4008 UART initialization - * - * Copyright: MontaVista Software Inc. (c) 2005 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include - -#define UART_3 0 -#define UART_4 1 -#define UART_5 2 -#define UART_6 3 -#define UART_UNKNOWN (-1) - -#define UART3_BASE_VA IO_ADDRESS(PNX4008_UART3_BASE) -#define UART4_BASE_VA IO_ADDRESS(PNX4008_UART4_BASE) -#define UART5_BASE_VA IO_ADDRESS(PNX4008_UART5_BASE) -#define UART6_BASE_VA IO_ADDRESS(PNX4008_UART6_BASE) - -#define UART_FCR_OFFSET 8 -#define UART_FIFO_SIZE 64 - -void pnx4008_uart_init(void) -{ - u32 tmp; - int i = UART_FIFO_SIZE; - - __raw_writel(0xC1, UART5_BASE_VA + UART_FCR_OFFSET); - __raw_writel(0xC1, UART3_BASE_VA + UART_FCR_OFFSET); - - /* Send a NULL to fix the UART HW bug */ - __raw_writel(0x00, UART5_BASE_VA); - __raw_writel(0x00, UART3_BASE_VA); - - while (i--) { - tmp = __raw_readl(UART5_BASE_VA); - tmp = __raw_readl(UART3_BASE_VA); - } - __raw_writel(0, UART5_BASE_VA + UART_FCR_OFFSET); - __raw_writel(0, UART3_BASE_VA + UART_FCR_OFFSET); - - /* setup wakeup interrupt */ - start_int_set_rising_edge(SE_U3_RX_INT); - start_int_ack(SE_U3_RX_INT); - start_int_umask(SE_U3_RX_INT); - - start_int_set_rising_edge(SE_U5_RX_INT); - start_int_ack(SE_U5_RX_INT); - start_int_umask(SE_U5_RX_INT); -} - diff --git a/arch/arm/mach-pnx4008/sleep.S b/arch/arm/mach-pnx4008/sleep.S deleted file mode 100644 index fea1e17a3..000000000 --- a/arch/arm/mach-pnx4008/sleep.S +++ /dev/null @@ -1,195 +0,0 @@ -/* - * linux/arch/arm/mach-pnx4008/sleep.S - * - * PNX4008 support for STOP mode and SDRAM self-refresh - * - * Authors: Dmitry Chigirev, Vitaly Wool - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include - -#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE) -#define PWR_CTRL_REG_OFFS 0x44 - -#define SDRAM_CFG_VA_BASE IO_ADDRESS(PNX4008_SDRAM_CFG_BASE) -#define MPMC_STATUS_REG_OFFS 0x4 - - .text - -ENTRY(pnx4008_cpu_suspend) - @this function should be entered in Direct run mode. - - @ save registers on stack - stmfd sp!, {r0 - r6, lr} - - @ setup Power Manager base address in r4 - @ and put it's value in r5 - mov r4, #(PWRMAN_VA_BASE & 0xff000000) - orr r4, r4, #(PWRMAN_VA_BASE & 0x00ff0000) - orr r4, r4, #(PWRMAN_VA_BASE & 0x0000ff00) - orr r4, r4, #(PWRMAN_VA_BASE & 0x000000ff) - ldr r5, [r4, #PWR_CTRL_REG_OFFS] - - @ setup SDRAM controller base address in r2 - @ and put it's value in r3 - mov r2, #(SDRAM_CFG_VA_BASE & 0xff000000) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x00ff0000) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x0000ff00) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x000000ff) - ldr r3, [r2, #MPMC_STATUS_REG_OFFS] @extra read - HW bug workaround - - @ clear SDRAM self-refresh bit latch - and r5, r5, #(~(1 << 8)) - @ clear SDRAM self-refresh bit - and r5, r5, #(~(1 << 9)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ do save current bit settings in r1 - mov r1, r5 - - @ set SDRAM self-refresh bit - orr r5, r5, #(1 << 9) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ set SDRAM self-refresh bit latch - orr r5, r5, #(1 << 8) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ clear SDRAM self-refresh bit latch - and r5, r5, #(~(1 << 8)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ clear SDRAM self-refresh bit - and r5, r5, #(~(1 << 9)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ wait for SDRAM to get into self-refresh mode -2: ldr r3, [r2, #MPMC_STATUS_REG_OFFS] - tst r3, #(1 << 2) - beq 2b - - @ to prepare SDRAM to get out of self-refresh mode after wakeup - orr r5, r5, #(1 << 7) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ do enter stop mode - orr r5, r5, #(1 << 0) - str r5, [r4, #PWR_CTRL_REG_OFFS] - nop - nop - nop - nop - nop - nop - nop - nop - nop - - @ sleeping now... - - @ coming out of STOP mode into Direct Run mode - @ clear STOP mode and SDRAM self-refresh bits - str r1, [r4, #PWR_CTRL_REG_OFFS] - - @ wait for SDRAM to get out self-refresh mode -3: ldr r3, [r2, #MPMC_STATUS_REG_OFFS] - tst r3, #5 - bne 3b - - @ restore regs and return - ldmfd sp!, {r0 - r6, pc} - -ENTRY(pnx4008_cpu_suspend_sz) - .word . - pnx4008_cpu_suspend - -ENTRY(pnx4008_cpu_standby) - @ save registers on stack - stmfd sp!, {r0 - r6, lr} - - @ setup Power Manager base address in r4 - @ and put it's value in r5 - mov r4, #(PWRMAN_VA_BASE & 0xff000000) - orr r4, r4, #(PWRMAN_VA_BASE & 0x00ff0000) - orr r4, r4, #(PWRMAN_VA_BASE & 0x0000ff00) - orr r4, r4, #(PWRMAN_VA_BASE & 0x000000ff) - ldr r5, [r4, #PWR_CTRL_REG_OFFS] - - @ setup SDRAM controller base address in r2 - @ and put it's value in r3 - mov r2, #(SDRAM_CFG_VA_BASE & 0xff000000) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x00ff0000) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x0000ff00) - orr r2, r2, #(SDRAM_CFG_VA_BASE & 0x000000ff) - ldr r3, [r2, #MPMC_STATUS_REG_OFFS] @extra read - HW bug workaround - - @ clear SDRAM self-refresh bit latch - and r5, r5, #(~(1 << 8)) - @ clear SDRAM self-refresh bit - and r5, r5, #(~(1 << 9)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ do save current bit settings in r1 - mov r1, r5 - - @ set SDRAM self-refresh bit - orr r5, r5, #(1 << 9) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ set SDRAM self-refresh bit latch - orr r5, r5, #(1 << 8) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ clear SDRAM self-refresh bit latch - and r5, r5, #(~(1 << 8)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ clear SDRAM self-refresh bit - and r5, r5, #(~(1 << 9)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ wait for SDRAM to get into self-refresh mode -2: ldr r3, [r2, #MPMC_STATUS_REG_OFFS] - tst r3, #(1 << 2) - beq 2b - - @ set 'get out of self-refresh mode after wakeup' bit - orr r5, r5, #(1 << 7) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - mcr p15, 0, r0, c7, c0, 4 @ kinda sleeping now... - - @ set SDRAM self-refresh bit latch - orr r5, r5, #(1 << 8) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ clear SDRAM self-refresh bit latch - and r5, r5, #(~(1 << 8)) - str r5, [r4, #PWR_CTRL_REG_OFFS] - - @ wait for SDRAM to get out self-refresh mode -3: ldr r3, [r2, #MPMC_STATUS_REG_OFFS] - tst r3, #5 - bne 3b - - @ restore regs and return - ldmfd sp!, {r0 - r6, pc} - -ENTRY(pnx4008_cpu_standby_sz) - .word . - pnx4008_cpu_standby - -ENTRY(pnx4008_cache_clean_invalidate) - stmfd sp!, {r0 - r6, lr} -#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH - mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache -#else -1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate - bne 1b -#endif - ldmfd sp!, {r0 - r6, pc} diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c deleted file mode 100644 index b986065cd..000000000 --- a/arch/arm/mach-pnx4008/time.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * arch/arm/mach-pnx4008/time.c - * - * PNX4008 Timers - * - * Authors: Vitaly Wool, Dmitry Chigirev, Grigory Tolstolytkin - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/*! Note: all timers are UPCOUNTING */ - -/*! - * Returns number of us since last clock interrupt. Note that interrupts - * will have been disabled by do_gettimeoffset() - */ -static unsigned long pnx4008_gettimeoffset(void) -{ - u32 ticks_to_match = - __raw_readl(HSTIM_MATCH0) - __raw_readl(HSTIM_COUNTER); - u32 elapsed = LATCH - ticks_to_match; - return (elapsed * (tick_nsec / 1000)) / LATCH; -} - -/*! - * IRQ handler for the timer - */ -static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id, - struct pt_regs *regs) -{ - if (__raw_readl(HSTIM_INT) & MATCH0_INT) { - - write_seqlock(&xtime_lock); - - do { - timer_tick(regs); - - /* - * this algorithm takes care of possible delay - * for this interrupt handling longer than a normal - * timer period - */ - __raw_writel(__raw_readl(HSTIM_MATCH0) + LATCH, - HSTIM_MATCH0); - __raw_writel(MATCH0_INT, HSTIM_INT); /* clear interrupt */ - - /* - * The goal is to keep incrementing HSTIM_MATCH0 - * register until HSTIM_MATCH0 indicates time after - * what HSTIM_COUNTER indicates. - */ - } while ((signed) - (__raw_readl(HSTIM_MATCH0) - - __raw_readl(HSTIM_COUNTER)) < 0); - - write_sequnlock(&xtime_lock); - } - - return IRQ_HANDLED; -} - -static struct irqaction pnx4008_timer_irq = { - .name = "PNX4008 Tick Timer", - .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = pnx4008_timer_interrupt -}; - -/*! - * Set up timer and timer interrupt. - */ -static __init void pnx4008_setup_timer(void) -{ - __raw_writel(RESET_COUNT, MSTIM_CTRL); - while (__raw_readl(MSTIM_COUNTER)) ; /* wait for reset to complete. 100% guarantee event */ - __raw_writel(0, MSTIM_CTRL); /* stop the timer */ - __raw_writel(0, MSTIM_MCTRL); - - __raw_writel(RESET_COUNT, HSTIM_CTRL); - while (__raw_readl(HSTIM_COUNTER)) ; /* wait for reset to complete. 100% guarantee event */ - __raw_writel(0, HSTIM_CTRL); - __raw_writel(0, HSTIM_MCTRL); - __raw_writel(0, HSTIM_CCR); - __raw_writel(12, HSTIM_PMATCH); /* scale down to 1 MHZ */ - __raw_writel(LATCH, HSTIM_MATCH0); - __raw_writel(MR0_INT, HSTIM_MCTRL); - - setup_irq(HSTIMER_INT, &pnx4008_timer_irq); - - __raw_writel(COUNT_ENAB | DEBUG_EN, HSTIM_CTRL); /*start timer, stop when JTAG active */ -} - -/* Timer Clock Control in PM register */ -#define TIMCLK_CTRL_REG IO_ADDRESS((PNX4008_PWRMAN_BASE + 0xBC)) -#define WATCHDOG_CLK_EN 1 -#define TIMER_CLK_EN 2 /* HS and MS timers? */ - -static u32 timclk_ctrl_reg_save; - -void pnx4008_timer_suspend(void) -{ - timclk_ctrl_reg_save = __raw_readl(TIMCLK_CTRL_REG); - __raw_writel(0, TIMCLK_CTRL_REG); /* disable timers */ -} - -void pnx4008_timer_resume(void) -{ - __raw_writel(timclk_ctrl_reg_save, TIMCLK_CTRL_REG); /* enable timers */ -} - -struct sys_timer pnx4008_timer = { - .init = pnx4008_setup_timer, - .offset = pnx4008_gettimeoffset, - .suspend = pnx4008_timer_suspend, - .resume = pnx4008_timer_resume, -}; - diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 03d07cae2..0104fd142 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -35,10 +35,6 @@ config PXA_SHARPSL SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) handheld computer. -config MACH_TRIZEPS4 - bool "Keith und Koep Trizeps4 DIMM-Module" - select PXA27x - endchoice if PXA_SHARPSL @@ -59,28 +55,12 @@ endchoice endif -if MACH_TRIZEPS4 - -choice - prompt "Select base board for Trizeps 4 module" - -config MACH_TRIZEPS4_CONXS - bool "ConXS Eval Board" - -config MACH_TRIZEPS4_ANY - bool "another Board" - -endchoice - -endif - endmenu config MACH_POODLE bool "Enable Sharp SL-5600 (Poodle) Support" depends PXA_SHARPSL_25x select SHARP_LOCOMO - select PXA_SSP config MACH_CORGI bool "Enable Sharp SL-C700 (Corgi) Support" diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 9093eb1c9..4e8a983e2 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -12,11 +12,10 @@ obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o obj-$(CONFIG_ARCH_PXA_IDP) += idp.o -obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o -obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o +obj-$(CONFIG_MACH_POODLE) += poodle.o obj-$(CONFIG_MACH_TOSA) += tosa.o # Support for blinky lights @@ -24,7 +23,6 @@ led-y := leds.o led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o -led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o obj-$(CONFIG_LEDS) += $(led-y) diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index cce265769..d6d726036 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include @@ -225,7 +223,7 @@ static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(in corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250); err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "MMC card detect", data); if (err) { printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); @@ -312,31 +310,8 @@ static struct platform_device *devices[] __initdata = { &corgiled_device, }; -static void corgi_poweroff(void) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - - if (!machine_is_corgi()) - /* Green LED off tells the bootloader to halt */ - reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); - arm_machine_restart('h'); -} - -static void corgi_restart(char mode) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - - if (!machine_is_corgi()) - /* Green LED on tells the bootloader to reboot */ - set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN); - arm_machine_restart('h'); -} - static void __init corgi_init(void) { - pm_power_off = corgi_poweroff; - arm_pm_restart = corgi_restart; - /* setup sleep mode values */ PWER = 0x00000002; PFER = 0x00000000; diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index 4c3de4008..7a1ab73e9 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c @@ -27,13 +27,6 @@ #include #include "sharpsl.h" -#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ -#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */ -#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */ -#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */ -#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */ -#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */ - static void corgi_charger_init(void) { pxa_gpio_mode(CORGI_GPIO_ADC_TEMP_ON | GPIO_OUT); @@ -202,16 +195,9 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = { .read_devdata = corgipm_read_devdata, .charger_wakeup = corgi_charger_wakeup, .should_wakeup = corgi_should_wakeup, - .backlight_limit = corgibl_limit_intensity, - .charge_on_volt = SHARPSL_CHARGE_ON_VOLT, - .charge_on_temp = SHARPSL_CHARGE_ON_TEMP, - .charge_acin_high = SHARPSL_CHARGE_ON_ACIN_HIGH, - .charge_acin_low = SHARPSL_CHARGE_ON_ACIN_LOW, - .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT, - .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, - .bat_levels = 40, - .bat_levels_noac = spitz_battery_levels_noac, - .bat_levels_acin = spitz_battery_levels_acin, + .bat_levels = 40, + .bat_levels_noac = spitz_battery_levels_noac, + .bat_levels_acin = spitz_battery_levels_acin, .status_high_acin = 188, .status_low_acin = 178, .status_high_noac = 185, @@ -228,9 +214,6 @@ static int __devinit corgipm_init(void) if (!corgipm_device) return -ENOMEM; - if (!machine_is_corgi()) - corgi_pm_machinfo.batfull_irq = 1; - corgipm_device->dev.platform_data = &corgi_pm_machinfo; ret = platform_device_add(corgipm_device); diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index ff6b4ee03..8a25a1c80 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c @@ -47,18 +47,15 @@ static struct corgissp_machinfo *ssp_machinfo; */ unsigned long corgi_ssp_ads7846_putget(ulong data) { - unsigned long flag; - u32 ret = 0; + unsigned long ret,flag; spin_lock_irqsave(&corgi_ssp_lock, flag); - if (ssp_machinfo->cs_ads7846 >= 0) - GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); + GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); ssp_write_word(&corgi_ssp_dev,data); - ssp_read_word(&corgi_ssp_dev, &ret); + ret = ssp_read_word(&corgi_ssp_dev); - if (ssp_machinfo->cs_ads7846 >= 0) - GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); + GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); spin_unlock_irqrestore(&corgi_ssp_lock, flag); return ret; @@ -71,14 +68,12 @@ unsigned long corgi_ssp_ads7846_putget(ulong data) void corgi_ssp_ads7846_lock(void) { spin_lock(&corgi_ssp_lock); - if (ssp_machinfo->cs_ads7846 >= 0) - GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); + GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); } void corgi_ssp_ads7846_unlock(void) { - if (ssp_machinfo->cs_ads7846 >= 0) - GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); + GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); spin_unlock(&corgi_ssp_lock); } @@ -89,9 +84,7 @@ void corgi_ssp_ads7846_put(ulong data) unsigned long corgi_ssp_ads7846_get(void) { - u32 ret = 0; - ssp_read_word(&corgi_ssp_dev, &ret); - return ret; + return ssp_read_word(&corgi_ssp_dev); } EXPORT_SYMBOL(corgi_ssp_ads7846_putget); @@ -107,7 +100,6 @@ EXPORT_SYMBOL(corgi_ssp_ads7846_get); unsigned long corgi_ssp_dac_put(ulong data) { unsigned long flag, sscr1 = SSCR1_SPH; - u32 tmp; spin_lock_irqsave(&corgi_ssp_lock, flag); @@ -118,13 +110,11 @@ unsigned long corgi_ssp_dac_put(ulong data) ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), sscr1, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_lcdcon)); ssp_enable(&corgi_ssp_dev); - if (ssp_machinfo->cs_lcdcon >= 0) - GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); + GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); ssp_write_word(&corgi_ssp_dev,data); /* Read null data back from device to prevent SSP overflow */ - ssp_read_word(&corgi_ssp_dev, &tmp); - if (ssp_machinfo->cs_lcdcon >= 0) - GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); + ssp_read_word(&corgi_ssp_dev); + GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); ssp_disable(&corgi_ssp_dev); ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846)); @@ -154,11 +144,10 @@ EXPORT_SYMBOL(corgi_ssp_blduty_set); int corgi_ssp_max1111_get(ulong data) { unsigned long flag; - long voltage = 0, voltage1 = 0, voltage2 = 0; + int voltage,voltage1,voltage2; spin_lock_irqsave(&corgi_ssp_lock, flag); - if (ssp_machinfo->cs_max1111 >= 0) - GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); + GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); ssp_disable(&corgi_ssp_dev); ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_max1111)); ssp_enable(&corgi_ssp_dev); @@ -167,21 +156,20 @@ int corgi_ssp_max1111_get(ulong data) /* TB1/RB1 */ ssp_write_word(&corgi_ssp_dev,data); - ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1); /* null read */ + ssp_read_word(&corgi_ssp_dev); /* null read */ /* TB12/RB2 */ ssp_write_word(&corgi_ssp_dev,0); - ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1); + voltage1=ssp_read_word(&corgi_ssp_dev); /* TB13/RB3*/ ssp_write_word(&corgi_ssp_dev,0); - ssp_read_word(&corgi_ssp_dev, (u32*)&voltage2); + voltage2=ssp_read_word(&corgi_ssp_dev); ssp_disable(&corgi_ssp_dev); ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846)); ssp_enable(&corgi_ssp_dev); - if (ssp_machinfo->cs_max1111 >= 0) - GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); + GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); spin_unlock_irqrestore(&corgi_ssp_lock, flag); if (voltage1 & 0xc0 || voltage2 & 0x3f) @@ -208,12 +196,9 @@ static int __init corgi_ssp_probe(struct platform_device *dev) int ret; /* Chip Select - Disable All */ - if (ssp_machinfo->cs_lcdcon >= 0) - pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH); - if (ssp_machinfo->cs_max1111 >= 0) - pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH); - if (ssp_machinfo->cs_ads7846 >= 0) - pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH); + pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH); + pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH); + pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH); ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0); @@ -244,12 +229,9 @@ static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state) static int corgi_ssp_resume(struct platform_device *dev) { - if (ssp_machinfo->cs_lcdcon >= 0) - GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ - if (ssp_machinfo->cs_max1111 >= 0) - GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ - if (ssp_machinfo->cs_ads7846 >= 0) - GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/ + GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ + GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ + GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/ ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state); ssp_enable(&corgi_ssp_dev); diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 6914d22bc..347b9dea2 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 12141e2a5..539b59600 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -39,8 +39,7 @@ static void pxa_unmask_low_irq(unsigned int irq) ICMR |= (1 << (irq + PXA_IRQ_SKIP)); } -static struct irq_chip pxa_internal_chip_low = { - .name = "SC", +static struct irqchip pxa_internal_chip_low = { .ack = pxa_mask_low_irq, .mask = pxa_mask_low_irq, .unmask = pxa_unmask_low_irq, @@ -62,8 +61,7 @@ static void pxa_unmask_high_irq(unsigned int irq) ICMR2 |= (1 << (irq - 32 + PXA_IRQ_SKIP)); } -static struct irq_chip pxa_internal_chip_high = { - .name = "SC-hi", +static struct irqchip pxa_internal_chip_high = { .ack = pxa_mask_high_irq, .mask = pxa_mask_high_irq, .unmask = pxa_unmask_high_irq, @@ -90,8 +88,8 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) if (type == IRQT_PROBE) { /* Don't mess with enabled GPIOs using preconfigured edges or - GPIOs set to alternate function or to output during probe */ - if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx] | GPDR(gpio)) & + GPIOs set to alternate function during probe */ + if ((GPIO_IRQ_rising_edge[idx] | GPIO_IRQ_falling_edge[idx]) & GPIO_bit(gpio)) return 0; if (GAFR(gpio) & (0x3 << (((gpio) & 0xf)*2))) @@ -131,8 +129,7 @@ static void pxa_ack_low_gpio(unsigned int irq) GEDR0 = (1 << (irq - IRQ_GPIO0)); } -static struct irq_chip pxa_low_gpio_chip = { - .name = "GPIO-l", +static struct irqchip pxa_low_gpio_chip = { .ack = pxa_ack_low_gpio, .mask = pxa_mask_low_irq, .unmask = pxa_unmask_low_irq, @@ -240,8 +237,7 @@ static void pxa_unmask_muxed_gpio(unsigned int irq) GFER(gpio) = GPIO_IRQ_falling_edge[idx] & GPIO_IRQ_mask[idx]; } -static struct irq_chip pxa_muxed_gpio_chip = { - .name = "GPIO", +static struct irqchip pxa_muxed_gpio_chip = { .ack = pxa_ack_muxed_gpio, .mask = pxa_mask_muxed_gpio, .unmask = pxa_unmask_muxed_gpio, diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c index 38aa92705..5eba6ea0b 100644 --- a/arch/arm/mach-pxa/leds-idp.c +++ b/arch/arm/mach-pxa/leds-idp.c @@ -12,6 +12,7 @@ */ +#include #include #include diff --git a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c index afbc6698e..05cf56059 100644 --- a/arch/arm/mach-pxa/leds-lubbock.c +++ b/arch/arm/mach-pxa/leds-lubbock.c @@ -11,6 +11,7 @@ * namespace collision. Mostly adapted the Mainstone version. */ +#include #include #include diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c index 065293eb0..c06d3d7a8 100644 --- a/arch/arm/mach-pxa/leds-mainstone.c +++ b/arch/arm/mach-pxa/leds-mainstone.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c deleted file mode 100644 index 2271d20ff..000000000 --- a/arch/arm/mach-pxa/leds-trizeps4.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * linux/arch/arm/mach-pxa/leds-trizeps4.c - * - * Author: Jürgen Schindele - * Created: 20 02, 2006 - * Copyright: Jürgen Schindele - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include - -#include -#include -#include -#include - -#include -#include - -#include "leds.h" - -#define LED_STATE_ENABLED 1 -#define LED_STATE_CLAIMED 2 - -#define SYS_BUSY 0x01 -#define HEARTBEAT 0x02 -#define BLINK 0x04 - -static unsigned int led_state; -static unsigned int hw_led_state; - -void trizeps4_leds_event(led_event_t evt) -{ - unsigned long flags; - - local_irq_save(flags); - - switch (evt) { - case led_start: - hw_led_state = 0; - pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ - pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ - led_state = LED_STATE_ENABLED; - break; - - case led_stop: - led_state &= ~LED_STATE_ENABLED; - break; - - case led_claim: - led_state |= LED_STATE_CLAIMED; - hw_led_state = 0; - break; - - case led_release: - led_state &= ~LED_STATE_CLAIMED; - hw_led_state = 0; - break; - -#ifdef CONFIG_LEDS_TIMER - case led_timer: - hw_led_state ^= HEARTBEAT; - break; -#endif - -#ifdef CONFIG_LEDS_CPU - case led_idle_start: - hw_led_state &= ~SYS_BUSY; - break; - - case led_idle_end: - hw_led_state |= SYS_BUSY; - break; -#endif - - case led_halted: - break; - - case led_green_on: - hw_led_state |= BLINK; - break; - - case led_green_off: - hw_led_state &= ~BLINK; - break; - - case led_amber_on: - break; - - case led_amber_off: - break; - - case led_red_on: - break; - - case led_red_off: - break; - - default: - break; - } - - if (led_state & LED_STATE_ENABLED) { - switch (hw_led_state) { - case 0: - GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); - GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); - break; - case 1: - GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); - GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); - break; - case 2: - GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); - GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); - break; - case 3: - GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); - GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); - break; - } - } - else { - /* turn all off */ - GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); - GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); - } - - local_irq_restore(flags); -} diff --git a/arch/arm/mach-pxa/leds.c b/arch/arm/mach-pxa/leds.c index e13eb841e..bbe4d5f6a 100644 --- a/arch/arm/mach-pxa/leds.c +++ b/arch/arm/mach-pxa/leds.c @@ -24,8 +24,6 @@ pxa_leds_init(void) leds_event = mainstone_leds_event; if (machine_is_pxa_idp()) leds_event = idp_leds_event; - if (machine_is_trizeps4()) - leds_event = trizeps4_leds_event; leds_event(led_start); return 0; diff --git a/arch/arm/mach-pxa/leds.h b/arch/arm/mach-pxa/leds.h index 4f829b8c3..d98f6e93c 100644 --- a/arch/arm/mach-pxa/leds.h +++ b/arch/arm/mach-pxa/leds.h @@ -10,4 +10,3 @@ extern void idp_leds_event(led_event_t evt); extern void lubbock_leds_event(led_event_t evt); extern void mainstone_leds_event(led_event_t evt); -extern void trizeps4_leds_event(led_event_t evt); diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 12479ae26..ec0f43a10 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c @@ -68,8 +68,7 @@ static void lpd270_unmask_irq(unsigned int irq) __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); } -static struct irq_chip lpd270_irq_chip = { - .name = "CPLD", +static struct irqchip lpd270_irq_chip = { .ack = lpd270_mask_irq, .mask = lpd270_mask_irq, .unmask = lpd270_unmask_irq, @@ -249,137 +248,58 @@ static void lpd270_backlight_power(int on) /* 5.7" TFT QVGA (LoLo display number 1) */ static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { - .pixclock = 150000, - .xres = 320, - .yres = 240, + .pixclock = 100000, + .xres = 240, + .yres = 320, .bpp = 16, - .hsync_len = 0x14, - .left_margin = 0x28, - .right_margin = 0x0a, - .vsync_len = 0x02, + .hsync_len = 64, + .left_margin = 0x27, + .right_margin = 0x09, + .vsync_len = 0x04, .upper_margin = 0x08, .lower_margin = 0x14, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .sync = 0, .lccr0 = 0x07800080, - .lccr3 = 0x00400000, - .pxafb_backlight_power = lpd270_backlight_power, -}; - -/* 12.1" TFT SVGA (LoLo display number 2) */ -static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = { - .pixclock = 50000, - .xres = 800, - .yres = 600, - .bpp = 16, - .hsync_len = 0x05, - .left_margin = 0x52, - .right_margin = 0x05, - .vsync_len = 0x04, - .upper_margin = 0x14, - .lower_margin = 0x0a, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, - .lccr0 = 0x07800080, - .lccr3 = 0x00400000, - .pxafb_backlight_power = lpd270_backlight_power, -}; - -/* 3.6" TFT QVGA (LoLo display number 3) */ -static struct pxafb_mach_info sharp_lq036q1da01 __initdata = { - .pixclock = 150000, - .xres = 320, - .yres = 240, - .bpp = 16, - .hsync_len = 0x0e, - .left_margin = 0x04, - .right_margin = 0x0a, - .vsync_len = 0x03, - .upper_margin = 0x03, - .lower_margin = 0x03, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, - .lccr0 = 0x07800080, - .lccr3 = 0x00400000, + .lccr3 = 0x04400007, .pxafb_backlight_power = lpd270_backlight_power, }; /* 6.4" TFT VGA (LoLo display number 5) */ static struct pxafb_mach_info sharp_lq64d343 __initdata = { - .pixclock = 25000, + .pixclock = 20000, .xres = 640, .yres = 480, .bpp = 16, - .hsync_len = 0x31, + .hsync_len = 49, .left_margin = 0x89, .right_margin = 0x19, - .vsync_len = 0x12, + .vsync_len = 18, .upper_margin = 0x22, - .lower_margin = 0x00, + .lower_margin = 0, .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, .lccr0 = 0x07800080, - .lccr3 = 0x00400000, - .pxafb_backlight_power = lpd270_backlight_power, -}; - -/* 10.4" TFT VGA (LoLo display number 7) */ -static struct pxafb_mach_info sharp_lq10d368 __initdata = { - .pixclock = 25000, - .xres = 640, - .yres = 480, - .bpp = 16, - .hsync_len = 0x31, - .left_margin = 0x89, - .right_margin = 0x19, - .vsync_len = 0x12, - .upper_margin = 0x22, - .lower_margin = 0x00, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, - .lccr0 = 0x07800080, - .lccr3 = 0x00400000, + .lccr3 = 0x04400001, .pxafb_backlight_power = lpd270_backlight_power, }; /* 3.5" TFT QVGA (LoLo display number 8) */ static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { - .pixclock = 150000, + .pixclock = 100000, .xres = 240, .yres = 320, .bpp = 16, - .hsync_len = 0x0e, - .left_margin = 0x0a, - .right_margin = 0x0a, - .vsync_len = 0x03, + .hsync_len = 0x34, + .left_margin = 0x09, + .right_margin = 0x09, + .vsync_len = 0x08, .upper_margin = 0x05, .lower_margin = 0x14, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, + .sync = 0, .lccr0 = 0x07800080, - .lccr3 = 0x00400000, + .lccr3 = 0x04400007, .pxafb_backlight_power = lpd270_backlight_power, }; -static struct pxafb_mach_info *lpd270_lcd_to_use; - -static int __init lpd270_set_lcd(char *str) -{ - if (!strnicmp(str, "lq057q3dc02", 11)) { - lpd270_lcd_to_use = &sharp_lq057q3dc02; - } else if (!strnicmp(str, "lq121s1dg31", 11)) { - lpd270_lcd_to_use = &sharp_lq121s1dg31; - } else if (!strnicmp(str, "lq036q1da01", 11)) { - lpd270_lcd_to_use = &sharp_lq036q1da01; - } else if (!strnicmp(str, "lq64d343", 8)) { - lpd270_lcd_to_use = &sharp_lq64d343; - } else if (!strnicmp(str, "lq10d368", 8)) { - lpd270_lcd_to_use = &sharp_lq10d368; - } else if (!strnicmp(str, "lq035q7db02-20", 14)) { - lpd270_lcd_to_use = &sharp_lq035q7db02_20; - } else { - printk(KERN_INFO "lpd270: unknown lcd panel [%s]\n", str); - } - - return 1; -} - -__setup("lcd=", lpd270_set_lcd); - static struct platform_device *platform_devices[] __initdata = { &smc91x_device, &lpd270_audio_device, @@ -425,8 +345,9 @@ static void __init lpd270_init(void) platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); - if (lpd270_lcd_to_use != NULL) - set_pxa_fb_info(lpd270_lcd_to_use); + // set_pxa_fb_info(&sharp_lq057q3dc02); + set_pxa_fb_info(&sharp_lq64d343); + // set_pxa_fb_info(&sharp_lq035q7db02_20); pxa_set_ohci_info(&lpd270_ohci_platform_data); } diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 83ff5cee6..3e26d7ce5 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -22,10 +22,6 @@ #include #include -#include -#include -#include - #include #include #include @@ -78,8 +74,7 @@ static void lubbock_unmask_irq(unsigned int irq) LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq)); } -static struct irq_chip lubbock_irq_chip = { - .name = "FPGA", +static struct irqchip lubbock_irq_chip = { .ack = lubbock_mask_irq, .mask = lubbock_mask_irq, .unmask = lubbock_unmask_irq, @@ -201,78 +196,6 @@ static struct resource smc91x_resources[] = { }, }; -/* ADS7846 is connected through SSP ... and if your board has J5 populated, - * you can select it to replace the ucb1400 by switching the touchscreen cable - * (to J5) and poking board registers (as done below). Else it's only useful - * for the temperature sensors. - */ -static struct resource pxa_ssp_resources[] = { - [0] = { - .start = __PREG(SSCR0_P(1)), - .end = __PREG(SSCR0_P(1)) + 0x14, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_SSP, - .end = IRQ_SSP, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct pxa2xx_spi_master pxa_ssp_master_info = { - .ssp_type = PXA25x_SSP, - .clock_enable = CKEN3_SSP, - .num_chipselect = 0, -}; - -static struct platform_device pxa_ssp = { - .name = "pxa2xx-spi", - .id = 1, - .resource = pxa_ssp_resources, - .num_resources = ARRAY_SIZE(pxa_ssp_resources), - .dev = { - .platform_data = &pxa_ssp_master_info, - }, -}; - -static int lubbock_ads7846_pendown_state(void) -{ - /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */ - return 0; -} - -static struct ads7846_platform_data ads_info = { - .model = 7846, - .vref_delay_usecs = 100, /* internal, no cap */ - .get_pendown_state = lubbock_ads7846_pendown_state, - // .x_plate_ohms = 500, /* GUESS! */ - // .y_plate_ohms = 500, /* GUESS! */ -}; - -static void ads7846_cs(u32 command) -{ - static const unsigned TS_nCS = 1 << 11; - lubbock_set_misc_wr(TS_nCS, (command == PXA2XX_CS_ASSERT) ? 0 : TS_nCS); -} - -static struct pxa2xx_spi_chip ads_hw = { - .tx_threshold = 1, - .rx_threshold = 2, - .cs_control = ads7846_cs, -}; - -static struct spi_board_info spi_board_info[] __initdata = { { - .modalias = "ads7846", - .platform_data = &ads_info, - .controller_data = &ads_hw, - .irq = LUBBOCK_BB_IRQ, - .max_speed_hz = 120000 /* max sample rate at 3V */ - * 26 /* command + data + overhead */, - .bus_num = 1, - .chip_select = 0, -}, -}; - static struct platform_device smc91x_device = { .name = "smc91x", .id = -1, @@ -349,7 +272,6 @@ static struct platform_device *devices[] __initdata = { &smc91x_device, &lubbock_flash_device[0], &lubbock_flash_device[1], - &pxa_ssp, }; static struct pxafb_mach_info sharp_lm8v31 __initdata = { @@ -420,7 +342,7 @@ static int lubbock_mci_init(struct device *dev, init_timer(&mmc_timer); mmc_timer.data = (unsigned long) data; return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int, - IRQF_SAMPLE_RANDOM, "lubbock-sd-detect", data); + SA_SAMPLE_RANDOM, "lubbock-sd-detect", data); } static int lubbock_mci_get_ro(struct device *dev) @@ -478,8 +400,6 @@ static void __init lubbock_init(void) lubbock_flash_data[flashboot^1].name = "application-flash"; lubbock_flash_data[flashboot].name = "boot-rom"; (void) platform_add_devices(devices, ARRAY_SIZE(devices)); - - spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); } static struct map_desc lubbock_io_desc[] __initdata = { @@ -496,11 +416,6 @@ static void __init lubbock_map_io(void) pxa_map_io(); iotable_init(lubbock_io_desc, ARRAY_SIZE(lubbock_io_desc)); - /* SSP data pins */ - pxa_gpio_mode(GPIO23_SCLK_MD); - pxa_gpio_mode(GPIO25_STXD_MD); - pxa_gpio_mode(GPIO26_SRXD_MD); - /* This enables the BTUART */ pxa_gpio_mode(GPIO42_BTRXD_MD); pxa_gpio_mode(GPIO43_BTTXD_MD); diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index a7e9b96f2..b307f1195 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c @@ -64,8 +64,7 @@ static void mainstone_unmask_irq(unsigned int irq) MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq)); } -static struct irq_chip mainstone_irq_chip = { - .name = "FPGA", +static struct irqchip mainstone_irq_chip = { .ack = mainstone_mask_irq, .mask = mainstone_mask_irq, .unmask = mainstone_unmask_irq, @@ -332,7 +331,7 @@ static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_in */ MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; - err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED, + err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, SA_INTERRUPT, "MMC card detect", data); if (err) { printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 2112c414f..852ea72d8 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -10,6 +10,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License. */ +#include #include #include #include diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 6dbff6d94..a042473de 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -18,14 +18,11 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include @@ -37,15 +34,12 @@ #include #include #include -#include -#include #include #include #include #include "generic.h" -#include "sharpsl.h" static struct resource poodle_scoop_resources[] = { [0] = { @@ -123,71 +117,13 @@ static struct resource locomo_resources[] = { }, }; -struct platform_device poodle_locomo_device = { +static struct platform_device locomo_device = { .name = "locomo", .id = 0, .num_resources = ARRAY_SIZE(locomo_resources), .resource = locomo_resources, }; -EXPORT_SYMBOL(poodle_locomo_device); - -/* - * Poodle SSP Device - */ - -struct platform_device poodle_ssp_device = { - .name = "corgi-ssp", - .id = -1, -}; - -struct corgissp_machinfo poodle_ssp_machinfo = { - .port = 1, - .cs_lcdcon = -1, - .cs_ads7846 = -1, - .cs_max1111 = -1, - .clk_lcdcon = 2, - .clk_ads7846 = 36, - .clk_max1111 = 2, -}; - - -/* - * Poodle Touch Screen Device - */ -static struct resource poodlets_resources[] = { - [0] = { - .start = POODLE_IRQ_GPIO_TP_INT, - .end = POODLE_IRQ_GPIO_TP_INT, - .flags = IORESOURCE_IRQ, - }, -}; - -static unsigned long poodle_get_hsync_len(void) -{ - return 0; -} - -static void poodle_null_hsync(void) -{ -} - -static struct corgits_machinfo poodle_ts_machinfo = { - .get_hsync_len = poodle_get_hsync_len, - .put_hsync = poodle_null_hsync, - .wait_hsync = poodle_null_hsync, -}; - -static struct platform_device poodle_ts_device = { - .name = "corgi-ts", - .dev = { - .platform_data = &poodle_ts_machinfo, - }, - .id = -1, - .num_resources = ARRAY_SIZE(poodlets_resources), - .resource = poodlets_resources, -}; - /* * MMC/SD Device @@ -205,14 +141,12 @@ static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)( pxa_gpio_mode(GPIO6_MMCCLK_MD); pxa_gpio_mode(GPIO8_MMCCS0_MD); pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN); - pxa_gpio_mode(POODLE_GPIO_nSD_WP | GPIO_IN); pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT); - pxa_gpio_mode(POODLE_GPIO_SD_PWR1 | GPIO_OUT); poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "MMC card detect", data); if (err) { printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); @@ -226,22 +160,12 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd) { struct pxamci_platform_data* p_d = dev->platform_data; - if (( 1 << vdd) & p_d->ocr_mask) { - GPSR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR); - mdelay(2); - GPSR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1); - } else { - GPCR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1); - GPCR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR); - } -} - -static int poodle_mci_get_ro(struct device *dev) -{ - return GPLR(POODLE_GPIO_nSD_WP) & GPIO_bit(POODLE_GPIO_nSD_WP); + if (( 1 << vdd) & p_d->ocr_mask) + GPSR1 = GPIO_bit(POODLE_GPIO_SD_PWR); + else + GPCR1 = GPIO_bit(POODLE_GPIO_SD_PWR); } - static void poodle_mci_exit(struct device *dev, void *data) { free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data); @@ -250,7 +174,6 @@ static void poodle_mci_exit(struct device *dev, void *data) static struct pxamci_platform_data poodle_mci_platform_data = { .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, .init = poodle_mci_init, - .get_ro = poodle_mci_get_ro, .setpower = poodle_mci_setpower, .exit = poodle_mci_exit, }; @@ -320,31 +243,14 @@ static struct pxafb_mach_info poodle_fb_info __initdata = { }; static struct platform_device *devices[] __initdata = { - &poodle_locomo_device, + &locomo_device, &poodle_scoop_device, - &poodle_ssp_device, - &poodle_ts_device, }; -static void poodle_poweroff(void) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - arm_machine_restart('h'); -} - -static void poodle_restart(char mode) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - arm_machine_restart('h'); -} - static void __init poodle_init(void) { int ret = 0; - pm_power_off = poodle_poweroff; - arm_pm_restart = poodle_restart; - /* setup sleep mode values */ PWER = 0x00000002; PFER = 0x00000000; @@ -382,7 +288,6 @@ static void __init poodle_init(void) GPSR1 = 0x00000000; GPSR2 = 0x00000000; - set_pxa_fb_parent(&poodle_locomo_device.dev); set_pxa_fb_info(&poodle_fb_info); pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); @@ -396,7 +301,6 @@ static void __init poodle_init(void) if (ret) { printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); } - corgi_ssp_set_machinfo(&poodle_ssp_machinfo); } static void __init fixup_poodle(struct machine_desc *desc, diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index c1f21739b..573a5758e 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -16,6 +16,7 @@ * initialization stuff for PXA machines which can be overridden later if * need be. */ +#include #include #include #include diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 74eeada1e..3baa70819 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -11,6 +11,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index db6e8f56a..6d402b262 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -18,11 +18,11 @@ #include #include #include -#include #include #include #include +#include #include #include #include @@ -128,9 +128,6 @@ struct battery_thresh spitz_battery_levels_noac[] = { */ int sharpsl_pm_pxa_read_max1111(int channel) { - if (machine_is_tosa()) // Ugly, better move this function into another module - return 0; - return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); } @@ -142,27 +139,27 @@ void sharpsl_pm_pxa_init(void) pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN); /* Register interrupt handlers */ - if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, IRQF_DISABLED, "AC Input Detect", sharpsl_ac_isr)) { + if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, SA_INTERRUPT, "AC Input Detect", sharpsl_ac_isr)) { dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin)); } else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin),IRQT_BOTHEDGE); - if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, IRQF_DISABLED, "Battery Cover", sharpsl_fatal_isr)) { + if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, SA_INTERRUPT, "Battery Cover", sharpsl_fatal_isr)) { dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock)); } else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock),IRQT_FALLING); if (sharpsl_pm.machinfo->gpio_fatal) { - if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, IRQF_DISABLED, "Fatal Battery", sharpsl_fatal_isr)) { + if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, SA_INTERRUPT, "Fatal Battery", sharpsl_fatal_isr)) { dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal)); } else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING); } - if (sharpsl_pm.machinfo->batfull_irq) + if (!machine_is_corgi()) { /* Register interrupt handler. */ - if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED, "CO", sharpsl_chrg_full_isr)) { + if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) { dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull)); } else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull),IRQT_RISING); @@ -177,6 +174,6 @@ void sharpsl_pm_pxa_remove(void) if (sharpsl_pm.machinfo->gpio_fatal) free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); - if (sharpsl_pm.machinfo->batfull_irq) + if (!machine_is_corgi()) free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); } diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index 15874b360..c9862688f 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S @@ -11,6 +11,7 @@ * modify it under the terms of the GNU General Public License. */ +#include #include #include #include @@ -188,7 +189,7 @@ ENTRY(pxa_cpu_suspend) .data .align 5 ENTRY(pxa_cpu_resume) - mov r0, #PSR_I_BIT | PSR_F_BIT | SVC_MODE @ set SVC, irqs off + mov r0, #PSR_I_BIT | PSR_F_BIT | MODE_SVC @ set SVC, irqs off msr cpsr_c, r0 ldr r0, sleep_save_sp @ stack phys addr diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 1c32a9310..44bcb8097 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include @@ -308,7 +306,7 @@ static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(in spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250); err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "MMC card detect", data); if (err) { printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); @@ -434,31 +432,8 @@ static struct platform_device *devices[] __initdata = { &spitzled_device, }; -static void spitz_poweroff(void) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - - pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); - GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET); - - mdelay(1000); - arm_machine_restart('h'); -} - -static void spitz_restart(char mode) -{ - /* Bootloader magic for a reboot */ - if((MSC0 & 0xffff0000) == 0x7ff00000) - MSC0 = (MSC0 & 0xffff) | 0x7ee00000; - - spitz_poweroff(); -} - static void __init common_init(void) { - pm_power_off = spitz_poweroff; - arm_pm_restart = spitz_restart; - PMCR = 0x00; /* setup sleep mode values */ diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 40be83307..5e5bdc898 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c @@ -27,13 +27,6 @@ #include #include "sharpsl.h" -#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ -#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */ -#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */ -#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */ -#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */ -#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */ - static int spitz_last_ac_status; static void spitz_charger_init(void) @@ -197,7 +190,6 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = { .gpio_batlock = SPITZ_GPIO_BAT_COVER, .gpio_acin = SPITZ_GPIO_AC_IN, .gpio_batfull = SPITZ_GPIO_CHRG_FULL, - .batfull_irq = 1, .gpio_fatal = SPITZ_GPIO_FATAL_BAT, .discharge = spitz_discharge, .discharge1 = spitz_discharge1, @@ -208,13 +200,6 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = { .read_devdata = spitzpm_read_devdata, .charger_wakeup = spitz_charger_wakeup, .should_wakeup = spitz_should_wakeup, - .backlight_limit = corgibl_limit_intensity, - .charge_on_volt = SHARPSL_CHARGE_ON_VOLT, - .charge_on_temp = SHARPSL_CHARGE_ON_TEMP, - .charge_acin_high = SHARPSL_CHARGE_ON_ACIN_HIGH, - .charge_acin_low = SHARPSL_CHARGE_ON_ACIN_LOW, - .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT, - .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, .bat_levels = 40, .bat_levels_noac = spitz_battery_levels_noac, .bat_levels_acin = spitz_battery_levels_acin, diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 1fddfeaa6..93096befd 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c @@ -40,8 +40,6 @@ #define PXA_SSP_PORTS 3 -#define TIMEOUT 100000 - struct ssp_info_ { int irq; u32 clock; @@ -94,18 +92,13 @@ static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) * The caller is expected to perform the necessary locking. * * Returns: - * %-ETIMEDOUT timeout occurred + * %-ETIMEDOUT timeout occurred (for future) * 0 success */ int ssp_write_word(struct ssp_dev *dev, u32 data) { - int timeout = TIMEOUT; - - while (!(SSSR_P(dev->port) & SSSR_TNF)) { - if (!--timeout) - return -ETIMEDOUT; + while (!(SSSR_P(dev->port) & SSSR_TNF)) cpu_relax(); - } SSDR_P(dev->port) = data; @@ -124,21 +117,15 @@ int ssp_write_word(struct ssp_dev *dev, u32 data) * The caller is expected to perform the necessary locking. * * Returns: - * %-ETIMEDOUT timeout occurred + * %-ETIMEDOUT timeout occurred (for future) * 32-bit data success */ -int ssp_read_word(struct ssp_dev *dev, u32 *data) +int ssp_read_word(struct ssp_dev *dev) { - int timeout = TIMEOUT; - - while (!(SSSR_P(dev->port) & SSSR_RNE)) { - if (!--timeout) - return -ETIMEDOUT; + while (!(SSSR_P(dev->port) & SSSR_RNE)) cpu_relax(); - } - *data = SSDR_P(dev->port); - return 0; + return SSDR_P(dev->port); } /** @@ -149,21 +136,13 @@ int ssp_read_word(struct ssp_dev *dev, u32 *data) * * The caller is expected to perform the necessary locking. */ -int ssp_flush(struct ssp_dev *dev) +void ssp_flush(struct ssp_dev *dev) { - int timeout = TIMEOUT * 2; - do { while (SSSR_P(dev->port) & SSSR_RNE) { - if (!--timeout) - return -ETIMEDOUT; (void) SSDR_P(dev->port); } - if (!--timeout) - return -ETIMEDOUT; } while (SSSR_P(dev->port) & SSSR_BSY); - - return 0; } /** diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S index d774430d0..6f6dbbd08 100644 --- a/arch/arm/mach-pxa/standby.S +++ b/arch/arm/mach-pxa/standby.S @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 5dbd191c5..b9b205734 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -117,7 +118,7 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction pxa_timer_irq = { .name = "PXA Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = pxa_timer_interrupt, }; diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 249353616..76c0e7f0a 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -19,15 +19,12 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -185,7 +182,7 @@ static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); - err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, IRQF_DISABLED, + err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, SA_INTERRUPT, "MMC/SD card detect", data); if (err) { printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); @@ -269,31 +266,8 @@ static struct platform_device *devices[] __initdata = { &tosaled_device, }; -static void tosa_poweroff(void) -{ - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; - - pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT); - GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET); - - mdelay(1000); - arm_machine_restart('h'); -} - -static void tosa_restart(char mode) -{ - /* Bootloader magic for a reboot */ - if((MSC0 & 0xffff0000) == 0x7ff00000) - MSC0 = (MSC0 & 0xffff) | 0x7ee00000; - - tosa_poweroff(); -} - static void __init tosa_init(void) { - pm_power_off = tosa_poweroff; - arm_pm_restart = tosa_restart; - pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c deleted file mode 100644 index 7c3007df1..000000000 --- a/arch/arm/mach-pxa/trizeps4.c +++ /dev/null @@ -1,473 +0,0 @@ -/* - * linux/arch/arm/mach-pxa/trizeps4.c - * - * Support for the Keith und Koep Trizeps4 Module Platform. - * - * Author: Jürgen Schindele - * Created: 20 02, 2006 - * Copyright: Jürgen Schindele - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "generic.h" - -/******************************************************************************************** - * ONBOARD FLASH - ********************************************************************************************/ -static struct mtd_partition trizeps4_partitions[] = { - { - .name = "Bootloader", - .size = 0x00040000, - .offset = 0, - .mask_flags = MTD_WRITEABLE /* force read-only */ - },{ - .name = "Kernel", - .size = 0x00400000, - .offset = 0x00040000 - },{ - .name = "Filesystem", - .size = MTDPART_SIZ_FULL, - .offset = 0x00440000 - } -}; - -static struct flash_platform_data trizeps4_flash_data[] = { - { - .map_name = "cfi_probe", - .parts = trizeps4_partitions, - .nr_parts = ARRAY_SIZE(trizeps4_partitions) - } -}; - -static struct resource flash_resource = { - .start = PXA_CS0_PHYS, - .end = PXA_CS0_PHYS + SZ_64M - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device flash_device = { - .name = "pxa2xx-flash", - .id = 0, - .dev = { - .platform_data = &trizeps4_flash_data, - }, - .resource = &flash_resource, - .num_resources = 1, -}; - -/******************************************************************************************** - * DAVICOM DM9000 Ethernet - ********************************************************************************************/ -static struct resource dm9000_resources[] = { - [0] = { - .start = TRIZEPS4_ETH_PHYS+0x300, - .end = TRIZEPS4_ETH_PHYS+0x400-1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = TRIZEPS4_ETH_PHYS+0x8300, - .end = TRIZEPS4_ETH_PHYS+0x8400-1, - .flags = IORESOURCE_MEM, - }, - [2] = { - .start = TRIZEPS4_ETH_IRQ, - .end = TRIZEPS4_ETH_IRQ, - .flags = (IORESOURCE_IRQ | IRQT_RISING), - }, -}; - -static struct platform_device dm9000_device = { - .name = "dm9000", - .id = -1, - .num_resources = ARRAY_SIZE(dm9000_resources), - .resource = dm9000_resources, -}; - -/******************************************************************************************** - * PXA270 serial ports - ********************************************************************************************/ -static struct plat_serial8250_port tri_serial_ports[] = { -#ifdef CONFIG_SERIAL_PXA - /* this uses the own PXA driver */ - { - 0, - }, -#else - /* this uses the generic 8520 driver */ - [0] = { - .membase = (void *)&FFUART, - .irq = IRQ_FFUART, - .flags = UPF_BOOT_AUTOCONF, - .iotype = UPIO_MEM32, - .regshift = 2, - .uartclk = (921600*16), - }, - [1] = { - .membase = (void *)&BTUART, - .irq = IRQ_BTUART, - .flags = UPF_BOOT_AUTOCONF, - .iotype = UPIO_MEM32, - .regshift = 2, - .uartclk = (921600*16), - }, - { - 0, - }, -#endif -}; - -static struct platform_device uart_devices = { - .name = "serial8250", - .id = 0, - .dev = { - .platform_data = tri_serial_ports, - }, - .num_resources = 0, - .resource = NULL, -}; - -/******************************************************************************************** - * PXA270 ac97 sound codec - ********************************************************************************************/ -static struct platform_device ac97_audio_device = { - .name = "pxa2xx-ac97", - .id = -1, -}; - -static struct platform_device * trizeps4_devices[] __initdata = { - &flash_device, - &uart_devices, - &dm9000_device, - &ac97_audio_device, -}; - -#ifdef CONFIG_MACH_TRIZEPS4_CONXS -static short trizeps_conxs_bcr; - -/* PCCARD power switching supports only 3,3V */ -void board_pcmcia_power(int power) -{ - if (power) { - /* switch power on, put in reset and enable buffers */ - trizeps_conxs_bcr |= power; - trizeps_conxs_bcr |= ConXS_BCR_CF_RESET; - trizeps_conxs_bcr &= ~(ConXS_BCR_CF_BUF_EN); - ConXS_BCR = trizeps_conxs_bcr; - /* wait a little */ - udelay(2000); - /* take reset away */ - trizeps_conxs_bcr &= ~(ConXS_BCR_CF_RESET); - ConXS_BCR = trizeps_conxs_bcr; - udelay(2000); - } else { - /* put in reset */ - trizeps_conxs_bcr |= ConXS_BCR_CF_RESET; - ConXS_BCR = trizeps_conxs_bcr; - udelay(1000); - /* switch power off */ - trizeps_conxs_bcr &= ~(0xf); - ConXS_BCR = trizeps_conxs_bcr; - - } - pr_debug("%s: o%s 0x%x\n", __FUNCTION__, power ? "n": "ff", trizeps_conxs_bcr); -} - -/* backlight power switching for LCD panel */ -static void board_backlight_power(int on) -{ - if (on) { - trizeps_conxs_bcr |= ConXS_BCR_L_DISP; - } else { - trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP; - } - pr_debug("%s: o%s 0x%x\n", __FUNCTION__, on ? "n" : "ff", trizeps_conxs_bcr); - ConXS_BCR = trizeps_conxs_bcr; -} - -/* Powersupply for MMC/SD cardslot */ -static void board_mci_power(struct device *dev, unsigned int vdd) -{ - struct pxamci_platform_data* p_d = dev->platform_data; - - if (( 1 << vdd) & p_d->ocr_mask) { - pr_debug("%s: on\n", __FUNCTION__); - /* FIXME fill in values here */ - } else { - pr_debug("%s: off\n", __FUNCTION__); - /* FIXME fill in values here */ - } -} - -static short trizeps_conxs_ircr; - -/* Switch modes and Power for IRDA receiver */ -static void board_irda_mode(struct device *dev, int mode) -{ - unsigned long flags; - - local_irq_save(flags); - if (mode & IR_SIRMODE) { - /* Slow mode */ - trizeps_conxs_ircr &= ~ConXS_IRCR_MODE; - } else if (mode & IR_FIRMODE) { - /* Fast mode */ - trizeps_conxs_ircr |= ConXS_IRCR_MODE; - } - if (mode & IR_OFF) { - trizeps_conxs_ircr |= ConXS_IRCR_SD; - } else { - trizeps_conxs_ircr &= ~ConXS_IRCR_SD; - } - /* FIXME write values to register */ - local_irq_restore(flags); -} - -#else -/* for other baseboards define dummies */ -void board_pcmcia_power(int power) {;} -#define board_backlight_power NULL -#define board_mci_power NULL -#define board_irda_mode NULL - -#endif /* CONFIG_MACH_TRIZEPS4_CONXS */ -EXPORT_SYMBOL(board_pcmcia_power); - -static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *, struct pt_regs *), void *data) -{ - int err; - /* setup GPIO for PXA27x MMC controller */ - pxa_gpio_mode(GPIO32_MMCCLK_MD); - pxa_gpio_mode(GPIO112_MMCCMD_MD); - pxa_gpio_mode(GPIO92_MMCDAT0_MD); - pxa_gpio_mode(GPIO109_MMCDAT1_MD); - pxa_gpio_mode(GPIO110_MMCDAT2_MD); - pxa_gpio_mode(GPIO111_MMCDAT3_MD); - - pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN); - - err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int, - IRQF_DISABLED | IRQF_TRIGGER_RISING, - "MMC card detect", data); - if (err) { - printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); - return -1; - } - return 0; -} - -static void trizeps4_mci_exit(struct device *dev, void *data) -{ - free_irq(TRIZEPS4_MMC_IRQ, data); -} - -static struct pxamci_platform_data trizeps4_mci_platform_data = { - .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, - .init = trizeps4_mci_init, - .exit = trizeps4_mci_exit, - .setpower = board_mci_power, -}; - -static struct pxaficp_platform_data trizeps4_ficp_platform_data = { - .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, - .transceiver_mode = board_irda_mode, -}; - -static int trizeps4_ohci_init(struct device *dev) -{ - /* setup Port1 GPIO pin. */ - pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */ - pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */ - - /* Set the Power Control Polarity Low and Power Sense - Polarity Low to active low. */ - UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) & - ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); - - return 0; -} - -static void trizeps4_ohci_exit(struct device *dev) -{ - ; -} - -static struct pxaohci_platform_data trizeps4_ohci_platform_data = { - .port_mode = PMM_PERPORT_MODE, - .init = trizeps4_ohci_init, - .exit = trizeps4_ohci_exit, -}; - -static struct map_desc trizeps4_io_desc[] __initdata = { - { /* ConXS CFSR */ - .virtual = TRIZEPS4_CFSR_VIRT, - .pfn = __phys_to_pfn(TRIZEPS4_CFSR_PHYS), - .length = 0x00001000, - .type = MT_DEVICE - }, - { /* ConXS BCR */ - .virtual = TRIZEPS4_BOCR_VIRT, - .pfn = __phys_to_pfn(TRIZEPS4_BOCR_PHYS), - .length = 0x00001000, - .type = MT_DEVICE - }, - { /* ConXS IRCR */ - .virtual = TRIZEPS4_IRCR_VIRT, - .pfn = __phys_to_pfn(TRIZEPS4_IRCR_PHYS), - .length = 0x00001000, - .type = MT_DEVICE - }, - { /* ConXS DCR */ - .virtual = TRIZEPS4_DICR_VIRT, - .pfn = __phys_to_pfn(TRIZEPS4_DICR_PHYS), - .length = 0x00001000, - .type = MT_DEVICE - }, - { /* ConXS UPSR */ - .virtual = TRIZEPS4_UPSR_VIRT, - .pfn = __phys_to_pfn(TRIZEPS4_UPSR_PHYS), - .length = 0x00001000, - .type = MT_DEVICE - } -}; - -static struct pxafb_mach_info sharp_lcd __initdata = { - .pixclock = 78000, - .xres = 640, - .yres = 480, - .bpp = 8, - .hsync_len = 4, - .left_margin = 4, - .right_margin = 4, - .vsync_len = 2, - .upper_margin = 0, - .lower_margin = 0, - .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, - .cmap_greyscale = 0, - .cmap_inverse = 0, - .cmap_static = 0, - .lccr0 = LCCR0_Color | LCCR0_Pas | LCCR0_Dual, - .lccr3 = 0x0340ff02, - .pxafb_backlight_power = board_backlight_power, -}; - -static void __init trizeps4_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) -{ -} - -static void __init trizeps4_init(void) -{ - platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices)); - - set_pxa_fb_info(&sharp_lcd); - - pxa_set_mci_info(&trizeps4_mci_platform_data); - pxa_set_ficp_info(&trizeps4_ficp_platform_data); - pxa_set_ohci_info(&trizeps4_ohci_platform_data); -} - -static void __init trizeps4_map_io(void) -{ - pxa_map_io(); - iotable_init(trizeps4_io_desc, ARRAY_SIZE(trizeps4_io_desc)); - - /* for DiskOnChip */ - pxa_gpio_mode(GPIO15_nCS_1_MD); - - /* for off-module PIC on ConXS board */ - pxa_gpio_mode(GPIO_PIC | GPIO_IN); - - /* UCB1400 irq */ - pxa_gpio_mode(GPIO_UCB1400 | GPIO_IN); - - /* for DM9000 LAN */ - pxa_gpio_mode(GPIO78_nCS_2_MD); - pxa_gpio_mode(GPIO_DM9000 | GPIO_IN); - - /* for PCMCIA device */ - pxa_gpio_mode(GPIO_PCD | GPIO_IN); - pxa_gpio_mode(GPIO_PRDY | GPIO_IN); - - /* for I2C adapter */ - pxa_gpio_mode(GPIO117_I2CSCL_MD); - pxa_gpio_mode(GPIO118_I2CSDA_MD); - - /* MMC_DET s.o. */ - pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN); - - /* whats that for ??? */ - pxa_gpio_mode(GPIO79_nCS_3_MD); - - pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ - pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ - -#ifdef CONFIG_MACH_TRIZEPS4_CONXS -#ifdef CONFIG_IDE_PXA_CF - /* if boot direct from compact flash dont disable power */ - trizeps_conxs_bcr = 0x0009; -#else - /* this is the reset value */ - trizeps_conxs_bcr = 0x00A0; -#endif - ConXS_BCR = trizeps_conxs_bcr; -#endif - - PWER = 0x00000002; - PFER = 0x00000000; - PRER = 0x00000002; - PGSR0 = 0x0158C000; - PGSR1 = 0x00FF0080; - PGSR2 = 0x0001C004; - /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ - PCFR |= PCFR_OPDE; -} - -MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module") - /* MAINTAINER("Jürgen Schindele") */ - .phys_io = 0x40000000, - .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, - .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, - .fixup = trizeps4_fixup, - .init_machine = trizeps4_init, - .map_io = trizeps4_map_io, - .init_irq = pxa_init_irq, - .timer = &pxa_timer, -MACHINE_END - diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index da0286973..d13270c5d 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -18,6 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -536,7 +537,7 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_reg static struct irqaction realview_timer_irq = { .name = "RealView Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = realview_timer_interrupt, }; diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 84a959530..693fb1e39 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index ac511d41d..bd86ffba8 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c @@ -128,7 +128,7 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs) static int iomd_request_dma(dmach_t channel, dma_t *dma) { return request_irq(dma->dma_irq, iomd_dma_handle, - IRQF_DISABLED, dma->device_id, dma); + SA_INTERRUPT, dma->device_id, dma); } static void iomd_free_dma(dmach_t channel, dma_t *dma) diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index bbd138be6..970f98dad 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig @@ -70,32 +70,6 @@ config ARCH_S3C2440 help Say Y here if you are using the SMDK2440. -config SMDK2440_CPU2440 - bool "SMDK2440 with S3C2440 CPU module" - depends on ARCH_S3C2440 - default y if ARCH_S3C2440 - select CPU_S3C2440 - -config SMDK2440_CPU2442 - bool "SMDM2440 with S3C2442 CPU module" - depends on ARCH_S3C2440 - select CPU_S3C2442 - -config MACH_S3C2413 - bool - help - Internal node for S3C2413 verison of SMDK2413, so that - machine_is_s3c2413() will work when MACH_SMDK2413 is - selected - -config MACH_SMDK2413 - bool "SMDK2413" - select CPU_S3C2412 - select MACH_S3C2413 - select MACH_SMDK - help - Say Y here if you are using an SMDK2413 - config MACH_VR1000 bool "Thorcom VR1000" select CPU_S3C2410 @@ -128,55 +102,19 @@ config MACH_NEXCODER_2440 endmenu -config S3C2410_CLOCK - bool - help - Clock code for the S3C2410, and similar processors - config CPU_S3C2410 bool depends on ARCH_S3C2410 - select S3C2410_CLOCK help Support for S3C2410 and S3C2410A family from the S3C24XX line of Samsung Mobile CPUs. -# internal node to signify if we are only dealing with an S3C2412 - -config CPU_S3C2412_ONLY - bool - depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ - !CPU_S3C2440 && !CPU_S3C2442 && CPU_S3C2412 - default y if CPU_S3C2412 - -config CPU_S3C2412 - bool - depends on ARCH_S3C2410 - help - Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line - -config CPU_S3C244X - bool - depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) - help - Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems. - config CPU_S3C2440 bool depends on ARCH_S3C2410 - select S3C2410_CLOCK - select CPU_S3C244X help Support for S3C2440 Samsung Mobile CPU based systems. -config CPU_S3C2442 - bool - depends on ARCH_S3C2420 - select S3C2410_CLOCK - select CPU_S3C244X - help - Support for S3C2442 Samsung Mobile CPU based systems. - comment "S3C2410 Boot" config S3C2410_BOOT_WATCHDOG diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 0eadec916..3e5712db6 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile @@ -10,48 +10,26 @@ obj-m := obj-n := obj- := -# DMA -obj-$(CONFIG_S3C2410_DMA) += dma.o - # S3C2400 support files -obj-$(CONFIG_CPU_S3C2400) += s3c2400-gpio.o +obj-$(CONFIG_CPU_S3C2400) += s3c2400-gpio.o # S3C2410 support files -obj-$(CONFIG_CPU_S3C2410) += s3c2410.o -obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o +obj-$(CONFIG_CPU_S3C2410) += s3c2410.o +obj-$(CONFIG_CPU_S3C2410) += s3c2410-gpio.o +obj-$(CONFIG_S3C2410_DMA) += dma.o # Power Management support -obj-$(CONFIG_PM) += pm.o sleep.o -obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o - -# S3C2412 support -obj-$(CONFIG_CPU_S3C2412) += s3c2412.o -obj-$(CONFIG_CPU_S3C2412) += s3c2412-irq.o -obj-$(CONFIG_CPU_S3C2412) += s3c2412-clock.o - -# -# S3C244X support - -obj-$(CONFIG_CPU_S3C244X) += s3c244x.o -obj-$(CONFIG_CPU_S3C244X) += s3c244x-irq.o - -# Clock control - -obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o +obj-$(CONFIG_PM) += pm.o sleep.o +obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o # S3C2440 support -obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o -obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o -obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o -obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o - -# S3C2442 support - -obj-$(CONFIG_CPU_S3C2442) += s3c2442.o -obj-$(CONFIG_CPU_S3C2442) += s3c2442-clock.o +obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o +obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o +obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o +obj-$(CONFIG_CPU_S3C2440) += s3c2410-gpio.o # bast extras @@ -65,7 +43,6 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o obj-$(CONFIG_ARCH_H1940) += mach-h1940.o obj-$(CONFIG_MACH_N30) += mach-n30.o obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o -obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o obj-$(CONFIG_MACH_RX3715) += mach-rx3715.o diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index def4441d2..fbbeb0553 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c @@ -136,8 +136,8 @@ bast_irq_pc104_demux(unsigned int irq, for (i = 0; stat != 0; i++, stat >>= 1) { if (stat & 1) { irqno = bast_pc104_irqs[i]; - desc = irq_desc + irqno; - desc_handle_irq(irqno, desc, regs); + + desc_handle_irq(irqno, irq_desc + irqno, regs); } } } @@ -156,7 +156,7 @@ static __init int bast_irq_init(void) set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux); - /* register our IRQs */ + /* reigster our IRQs */ for (i = 0; i < 4; i++) { unsigned int irqno = bast_pc104_irqs[i]; diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index e13fb6778..6de713ad3 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c @@ -3,7 +3,7 @@ * Copyright (c) 2004-2005 Simtec Electronics * Ben Dooks * - * S3C24XX Core clock control support + * S3C2410 Clock control support * * Based on, and code from linux/arch/arm/mach-versatile/clock.c ** @@ -56,6 +56,25 @@ static LIST_HEAD(clocks); DEFINE_MUTEX(clocks_mutex); +/* old functions */ + +void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable) +{ + unsigned long clkcon; + + clkcon = __raw_readl(S3C2410_CLKCON); + + if (enable) + clkcon |= clocks; + else + clkcon &= ~clocks; + + /* ensure none of the special function bits set */ + clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER); + + __raw_writel(clkcon, S3C2410_CLKCON); +} + /* enable and disable calls for use with the clk struct */ static int clk_null_enable(struct clk *clk, int enable) @@ -63,6 +82,12 @@ static int clk_null_enable(struct clk *clk, int enable) return 0; } +int s3c24xx_clkcon_enable(struct clk *clk, int enable) +{ + s3c24xx_clk_enable(clk->ctrlbit, enable); + return 0; +} + /* Clock API calls */ struct clk *clk_get(struct device *dev, const char *id) @@ -148,11 +173,8 @@ unsigned long clk_get_rate(struct clk *clk) if (clk->rate != 0) return clk->rate; - if (clk->get_rate != NULL) - return (clk->get_rate)(clk); - - if (clk->parent != NULL) - return clk_get_rate(clk->parent); + while (clk->parent != NULL && clk->rate == 0) + clk = clk->parent; return clk->rate; } @@ -211,9 +233,31 @@ EXPORT_SYMBOL(clk_set_rate); EXPORT_SYMBOL(clk_get_parent); EXPORT_SYMBOL(clk_set_parent); +/* base clock enable */ + +static int s3c24xx_upll_enable(struct clk *clk, int enable) +{ + unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); + unsigned long orig = clkslow; + + if (enable) + clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF; + else + clkslow |= S3C2410_CLKSLOW_UCLK_OFF; + + __raw_writel(clkslow, S3C2410_CLKSLOW); + + /* if we started the UPLL, then allow to settle */ + + if (enable && (orig & S3C2410_CLKSLOW_UCLK_OFF)) + udelay(200); + + return 0; +} + /* base clocks */ -struct clk clk_xtal = { +static struct clk clk_xtal = { .name = "xtal", .id = -1, .rate = 0, @@ -221,27 +265,23 @@ struct clk clk_xtal = { .ctrlbit = 0, }; -struct clk clk_mpll = { - .name = "mpll", - .id = -1, -}; - -struct clk clk_upll = { +static struct clk clk_upll = { .name = "upll", .id = -1, .parent = NULL, + .enable = s3c24xx_upll_enable, .ctrlbit = 0, }; -struct clk clk_f = { +static struct clk clk_f = { .name = "fclk", .id = -1, .rate = 0, - .parent = &clk_mpll, + .parent = NULL, .ctrlbit = 0, }; -struct clk clk_h = { +static struct clk clk_h = { .name = "hclk", .id = -1, .rate = 0, @@ -249,7 +289,7 @@ struct clk clk_h = { .ctrlbit = 0, }; -struct clk clk_p = { +static struct clk clk_p = { .name = "pclk", .id = -1, .rate = 0, @@ -268,14 +308,14 @@ struct clk clk_usb_bus = { static int s3c24xx_dclk_enable(struct clk *clk, int enable) { - unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON); + unsigned long dclkcon = __raw_readl(S3C2410_DCLKCON); if (enable) dclkcon |= clk->ctrlbit; else dclkcon &= ~clk->ctrlbit; - __raw_writel(dclkcon, S3C24XX_DCLKCON); + __raw_writel(dclkcon, S3C2410_DCLKCON); return 0; } @@ -294,7 +334,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) clk->parent = parent; - dclkcon = __raw_readl(S3C24XX_DCLKCON); + dclkcon = __raw_readl(S3C2410_DCLKCON); if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { if (uclk) @@ -308,7 +348,7 @@ static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; } - __raw_writel(dclkcon, S3C24XX_DCLKCON); + __raw_writel(dclkcon, S3C2410_DCLKCON); return 0; } @@ -386,6 +426,108 @@ struct clk s3c24xx_uclk = { .id = -1, }; + +/* standard clock definitions */ + +static struct clk init_clocks[] = { + { + .name = "nand", + .id = -1, + .parent = &clk_h, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_NAND, + }, { + .name = "lcd", + .id = -1, + .parent = &clk_h, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_LCDC, + }, { + .name = "usb-host", + .id = -1, + .parent = &clk_h, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_USBH, + }, { + .name = "usb-device", + .id = -1, + .parent = &clk_h, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_USBD, + }, { + .name = "timers", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_PWMT, + }, { + .name = "sdi", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_SDI, + }, { + .name = "uart", + .id = 0, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_UART0, + }, { + .name = "uart", + .id = 1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_UART1, + }, { + .name = "uart", + .id = 2, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_UART2, + }, { + .name = "gpio", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_GPIO, + }, { + .name = "rtc", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_RTC, + }, { + .name = "adc", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_ADC, + }, { + .name = "i2c", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_IIC, + }, { + .name = "iis", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_IIS, + }, { + .name = "spi", + .id = -1, + .parent = &clk_p, + .enable = s3c24xx_clkcon_enable, + .ctrlbit = S3C2410_CLKCON_SPI, + }, { + .name = "watchdog", + .id = -1, + .parent = &clk_p, + .ctrlbit = 0, + } +}; + /* initialise the clock system */ int s3c24xx_register_clock(struct clk *clk) @@ -395,6 +537,14 @@ int s3c24xx_register_clock(struct clk *clk) if (clk->enable == NULL) clk->enable = clk_null_enable; + /* if this is a standard clock, set the usage state */ + + if (clk->ctrlbit && clk->enable == s3c24xx_clkcon_enable) { + unsigned long clkcon = __raw_readl(S3C2410_CLKCON); + + clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0; + } + /* add to the list of available clocks */ mutex_lock(&clocks_mutex); @@ -411,18 +561,44 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, unsigned long hclk, unsigned long pclk) { - printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); + unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); + unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); + struct clk *clkp = init_clocks; + int ptr; + int ret; + + printk(KERN_INFO "S3C2410 Clocks, (c) 2004 Simtec Electronics\n"); /* initialise the main system clocks */ clk_xtal.rate = xtal; - clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); + clk_upll.rate = s3c2410_get_pll(upllcon, xtal); - clk_mpll.rate = fclk; clk_h.rate = hclk; clk_p.rate = pclk; clk_f.rate = fclk; + /* We must be careful disabling the clocks we are not intending to + * be using at boot time, as subsytems such as the LCD which do + * their own DMA requests to the bus can cause the system to lockup + * if they where in the middle of requesting bus access. + * + * Disabling the LCD clock if the LCD is active is very dangerous, + * and therefore the bootloader should be careful to not enable + * the LCD clock if it is not needed. + */ + + mutex_lock(&clocks_mutex); + + s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0); + s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0); + s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0); + s3c24xx_clk_enable(S3C2410_CLKCON_ADC, 0); + s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0); + s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0); + + mutex_unlock(&clocks_mutex); + /* assume uart clocks are correctly setup */ /* register our clocks */ @@ -430,9 +606,6 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, if (s3c24xx_register_clock(&clk_xtal) < 0) printk(KERN_ERR "failed to register master xtal\n"); - if (s3c24xx_register_clock(&clk_mpll) < 0) - printk(KERN_ERR "failed to register mpll clock\n"); - if (s3c24xx_register_clock(&clk_upll) < 0) printk(KERN_ERR "failed to register upll clock\n"); @@ -445,5 +618,27 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, if (s3c24xx_register_clock(&clk_p) < 0) printk(KERN_ERR "failed to register cpu pclk\n"); + + if (s3c24xx_register_clock(&clk_usb_bus) < 0) + printk(KERN_ERR "failed to register usb bus clock\n"); + + /* register clocks from clock array */ + + for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { + ret = s3c24xx_register_clock(clkp); + if (ret < 0) { + printk(KERN_ERR "Failed to register clock %s (%d)\n", + clkp->name, ret); + } + } + + /* show the clock-slow value */ + + printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n", + print_mhz(xtal / ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))), + (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast", + (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", + (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); + return 0; } diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h index 7f0ea03e1..01bb458bf 100644 --- a/arch/arm/mach-s3c2410/clock.h +++ b/arch/arm/mach-s3c2410/clock.h @@ -22,7 +22,6 @@ struct clk { int (*enable)(struct clk *, int enable); int (*set_rate)(struct clk *c, unsigned long rate); - unsigned long (*get_rate)(struct clk *c); unsigned long (*round_rate)(struct clk *c, unsigned long rate); int (*set_parent)(struct clk *c, struct clk *parent); }; @@ -37,15 +36,6 @@ extern struct clk s3c24xx_uclk; extern struct clk clk_usb_bus; -/* core clock support */ - -extern struct clk clk_f; -extern struct clk clk_h; -extern struct clk clk_p; -extern struct clk clk_mpll; -extern struct clk clk_upll; -extern struct clk clk_xtal; - /* exports for arch/arm/mach-s3c2410 * * Please DO NOT use these outside of arch/arm/mach-s3c2410 @@ -53,8 +43,7 @@ extern struct clk clk_xtal; extern struct mutex clocks_mutex; -extern int s3c2410_clkcon_enable(struct clk *clk, int enable); - +extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); extern int s3c24xx_register_clock(struct clk *clk); extern int s3c24xx_setup_clocks(unsigned long xtal, diff --git a/arch/arm/mach-s3c2410/common-smdk.c b/arch/arm/mach-s3c2410/common-smdk.c index a40eaa656..c940890f6 100644 --- a/arch/arm/mach-s3c2410/common-smdk.c +++ b/arch/arm/mach-s3c2410/common-smdk.c @@ -34,7 +34,6 @@ #include #include -#include #include @@ -42,66 +41,6 @@ #include "devs.h" #include "pm.h" -/* LED devices */ - -static struct s3c24xx_led_platdata smdk_pdata_led4 = { - .gpio = S3C2410_GPF4, - .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, - .name = "led4", - .def_trigger = "timer", -}; - -static struct s3c24xx_led_platdata smdk_pdata_led5 = { - .gpio = S3C2410_GPF5, - .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, - .name = "led5", - .def_trigger = "nand-disk", -}; - -static struct s3c24xx_led_platdata smdk_pdata_led6 = { - .gpio = S3C2410_GPF6, - .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, - .name = "led6", -}; - -static struct s3c24xx_led_platdata smdk_pdata_led7 = { - .gpio = S3C2410_GPF7, - .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, - .name = "led7", -}; - -static struct platform_device smdk_led4 = { - .name = "s3c24xx_led", - .id = 0, - .dev = { - .platform_data = &smdk_pdata_led4, - }, -}; - -static struct platform_device smdk_led5 = { - .name = "s3c24xx_led", - .id = 1, - .dev = { - .platform_data = &smdk_pdata_led5, - }, -}; - -static struct platform_device smdk_led6 = { - .name = "s3c24xx_led", - .id = 2, - .dev = { - .platform_data = &smdk_pdata_led6, - }, -}; - -static struct platform_device smdk_led7 = { - .name = "s3c24xx_led", - .id = 3, - .dev = { - .platform_data = &smdk_pdata_led7, - }, -}; - /* NAND parititon from 2.4.18-swl5 */ static struct mtd_partition smdk_default_nand_part[] = { @@ -172,10 +111,6 @@ static struct s3c2410_platform_nand smdk_nand_info = { static struct platform_device __initdata *smdk_devs[] = { &s3c_device_nand, - &smdk_led4, - &smdk_led5, - &smdk_led6, - &smdk_led7, }; void __init smdk_machine_init(void) diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c index 1c3c6adae..70c34fcf7 100644 --- a/arch/arm/mach-s3c2410/cpu.c +++ b/arch/arm/mach-s3c2410/cpu.c @@ -37,17 +37,12 @@ #include #include -#include #include "cpu.h" -#include "devs.h" #include "clock.h" #include "s3c2400.h" #include "s3c2410.h" -#include "s3c2412.h" -#include "s3c244x.h" #include "s3c2440.h" -#include "s3c2442.h" struct cpu_table { unsigned long idcode; @@ -63,9 +58,7 @@ struct cpu_table { static const char name_s3c2400[] = "S3C2400"; static const char name_s3c2410[] = "S3C2410"; -static const char name_s3c2412[] = "S3C2412"; static const char name_s3c2440[] = "S3C2440"; -static const char name_s3c2442[] = "S3C2442"; static const char name_s3c2410a[] = "S3C2410A"; static const char name_s3c2440a[] = "S3C2440A"; @@ -91,39 +84,21 @@ static struct cpu_table cpu_ids[] __initdata = { { .idcode = 0x32440000, .idmask = 0xffffffff, - .map_io = s3c244x_map_io, - .init_clocks = s3c244x_init_clocks, - .init_uarts = s3c244x_init_uarts, + .map_io = s3c2440_map_io, + .init_clocks = s3c2440_init_clocks, + .init_uarts = s3c2440_init_uarts, .init = s3c2440_init, .name = name_s3c2440 }, { .idcode = 0x32440001, .idmask = 0xffffffff, - .map_io = s3c244x_map_io, - .init_clocks = s3c244x_init_clocks, - .init_uarts = s3c244x_init_uarts, + .map_io = s3c2440_map_io, + .init_clocks = s3c2440_init_clocks, + .init_uarts = s3c2440_init_uarts, .init = s3c2440_init, .name = name_s3c2440a }, - { - .idcode = 0x32440aaa, - .idmask = 0xffffffff, - .map_io = s3c244x_map_io, - .init_clocks = s3c244x_init_clocks, - .init_uarts = s3c244x_init_uarts, - .init = s3c2442_init, - .name = name_s3c2442 - }, - { - .idcode = 0x32412001, - .idmask = 0xffffffff, - .map_io = s3c2412_map_io, - .init_clocks = s3c2412_init_clocks, - .init_uarts = s3c2412_init_uarts, - .init = s3c2412_init, - .name = name_s3c2412, - }, { .idcode = 0x0, /* S3C2400 doesn't have an idcode */ .idmask = 0xffffffff, @@ -182,24 +157,6 @@ void s3c24xx_set_board(struct s3c24xx_board *b) static struct cpu_table *cpu; -static unsigned long s3c24xx_read_idcode_v5(void) -{ -#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) - return __raw_readl(S3C2412_GSTATUS1); -#else - return 1UL; /* don't look like an 2400 */ -#endif -} - -static unsigned long s3c24xx_read_idcode_v4(void) -{ -#ifndef CONFIG_CPU_S3C2400 - return __raw_readl(S3C2410_GSTATUS1); -#else - return 0UL; -#endif -} - void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) { unsigned long idcode = 0x0; @@ -207,11 +164,9 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) /* initialise the io descriptors we need for initialisation */ iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); - if (cpu_architecture() >= CPU_ARCH_ARMv5) { - idcode = s3c24xx_read_idcode_v5(); - } else { - idcode = s3c24xx_read_idcode_v4(); - } +#ifndef CONFIG_CPU_S3C2400 + idcode = __raw_readl(S3C2410_GSTATUS1); +#endif cpu = s3c_lookup_cpu(idcode); @@ -220,13 +175,13 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) panic("Unknown S3C24XX CPU"); } - printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode); - if (cpu->map_io == NULL || cpu->init == NULL) { printk(KERN_ERR "CPU %s support not enabled\n", cpu->name); panic("Unsupported S3C24XX CPU"); } + printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode); + (cpu->map_io)(mach_desc, size); } @@ -253,49 +208,6 @@ void __init s3c24xx_init_clocks(int xtal) (cpu->init_clocks)(xtal); } -/* uart management */ - -static int nr_uarts __initdata = 0; - -static struct s3c2410_uartcfg uart_cfgs[3]; - -/* s3c24xx_init_uartdevs - * - * copy the specified platform data and configuration into our central - * set of devices, before the data is thrown away after the init process. - * - * This also fills in the array passed to the serial driver for the - * early initialisation of the console. -*/ - -void __init s3c24xx_init_uartdevs(char *name, - struct s3c24xx_uart_resources *res, - struct s3c2410_uartcfg *cfg, int no) -{ - struct platform_device *platdev; - struct s3c2410_uartcfg *cfgptr = uart_cfgs; - struct s3c24xx_uart_resources *resp; - int uart; - - memcpy(cfgptr, cfg, sizeof(struct s3c2410_uartcfg) * no); - - for (uart = 0; uart < no; uart++, cfg++, cfgptr++) { - platdev = s3c24xx_uart_src[cfgptr->hwport]; - - resp = res + cfgptr->hwport; - - s3c24xx_uart_devs[uart] = platdev; - - platdev->name = name; - platdev->resource = resp->resources; - platdev->num_resources = resp->nr_resources; - - platdev->dev.platform_data = cfgptr; - } - - nr_uarts = no; -} - void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) { if (cpu == NULL) @@ -320,10 +232,6 @@ static int __init s3c_arch_init(void) if (ret != 0) return ret; - ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); - if (ret != 0) - return ret; - if (board != NULL) { struct platform_device **ptr = board->devices; int i; diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index be42e4032..fc1067783 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h @@ -8,6 +8,16 @@ * 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. + * + * Modifications: + * 24-Aug-2004 BJD Start of generic S3C24XX support + * 18-Oct-2004 BJD Moved board struct into this file + * 04-Jan-2005 BJD New uart initialisation + * 10-Jan-2005 BJD Moved generic init here, specific to cpu headers + * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call + * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT + * 14-Mar-2005 BJD Updated for __iomem + * 15-Jan-2006 LCVR Updated S3C2410_PA_##x to new S3C24XX_PA_##x macro */ /* todo - fix when rmk changes iodescs to use `void __iomem *` */ @@ -21,8 +31,6 @@ #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000) /* forward declaration */ -struct s3c24xx_uart_resources; -struct platform_device; struct s3c2410_uartcfg; struct map_desc; @@ -36,10 +44,6 @@ extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c24xx_init_clocks(int xtal); -extern void s3c24xx_init_uartdevs(char *name, - struct s3c24xx_uart_resources *res, - struct s3c2410_uartcfg *cfg, int no); - /* the board structure is used at first initialsation time * to get info such as the devices to register for this * board. This is done because platfrom_add_devices() cannot @@ -63,7 +67,4 @@ extern struct sys_timer s3c24xx_timer; /* system device classes */ -extern struct sysdev_class s3c2410_sysclass; -extern struct sysdev_class s3c2412_sysclass; extern struct sysdev_class s3c2440_sysclass; -extern struct sysdev_class s3c2442_sysclass; diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index cae35ff76..ca09ba516 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c @@ -1,14 +1,22 @@ /* linux/arch/arm/mach-s3c2410/devs.c * * Copyright (c) 2004 Simtec Electronics - * Ben Dooks + * Ben Dooks * - * Base S3C24XX platform device definitions + * Base S3C2410 platform device definitions * * 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. * + * Modifications: + * 15-Jan-2006 LCVR Using S3C24XX_PA_##x macro for common S3C24XX devices + * 10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} + * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv + * 29-Aug-2004 BJD Added timers 0 through 3 + * 29-Aug-2004 BJD Changed index of devices we only have one of to -1 + * 21-Aug-2004 BJD Added IRQ_TICK to RTC resources + * 18-Aug-2004 BJD Created initial version */ #include @@ -30,86 +38,10 @@ #include #include "devs.h" -#include "cpu.h" /* Serial port registrations */ -static struct resource s3c2410_uart0_resource[] = { - [0] = { - .start = S3C2410_PA_UART0, - .end = S3C2410_PA_UART0 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX0, - .end = IRQ_S3CUART_ERR0, - .flags = IORESOURCE_IRQ, - } -}; - -static struct resource s3c2410_uart1_resource[] = { - [0] = { - .start = S3C2410_PA_UART1, - .end = S3C2410_PA_UART1 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX1, - .end = IRQ_S3CUART_ERR1, - .flags = IORESOURCE_IRQ, - } -}; - -static struct resource s3c2410_uart2_resource[] = { - [0] = { - .start = S3C2410_PA_UART2, - .end = S3C2410_PA_UART2 + 0x3fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_S3CUART_RX2, - .end = IRQ_S3CUART_ERR2, - .flags = IORESOURCE_IRQ, - } -}; - -struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { - [0] = { - .resources = s3c2410_uart0_resource, - .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource), - }, - [1] = { - .resources = s3c2410_uart1_resource, - .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource), - }, - [2] = { - .resources = s3c2410_uart2_resource, - .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), - }, -}; - -/* yart devices */ - -static struct platform_device s3c24xx_uart_device0 = { - .id = 0, -}; - -static struct platform_device s3c24xx_uart_device1 = { - .id = 1, -}; - -static struct platform_device s3c24xx_uart_device2 = { - .id = 2, -}; - -struct platform_device *s3c24xx_uart_src[3] = { - &s3c24xx_uart_device0, - &s3c24xx_uart_device1, - &s3c24xx_uart_device2, -}; - -struct platform_device *s3c24xx_uart_devs[3] = { -}; +struct platform_device *s3c24xx_uart_devs[3]; /* USB Host Controller */ diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h index 726e2eaf8..52c4bab5c 100644 --- a/arch/arm/mach-s3c2410/devs.h +++ b/arch/arm/mach-s3c2410/devs.h @@ -14,17 +14,10 @@ * 27-Aug-2004 BJD Added timers 0 through 3 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv */ +#include #include -struct s3c24xx_uart_resources { - struct resource *resources; - unsigned long nr_resources; -}; - -extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; - extern struct platform_device *s3c24xx_uart_devs[]; -extern struct platform_device *s3c24xx_uart_src[]; extern struct platform_device s3c_device_usb; extern struct platform_device s3c_device_lcd; diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index cc92a7b2d..4dbd8e758 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c @@ -31,6 +31,7 @@ * possible DMA function */ +#include #ifdef CONFIG_S3C2410_DMA_DEBUG #define DEBUG @@ -60,7 +61,7 @@ static void __iomem *dma_base; static kmem_cache_t *dma_kmem; /* dma channel state information */ -struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; +s3c2410_dma_chan_t s3c2410_chans[S3C2410_DMA_CHANNELS]; /* debugging functions */ @@ -74,7 +75,7 @@ struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; #define dma_wrreg(chan, reg, val) writel((val), (chan)->regs + (reg)) #else static inline void -dma_wrreg(struct s3c2410_dma_chan *chan, int reg, unsigned long val) +dma_wrreg(s3c2410_dma_chan_t *chan, int reg, unsigned long val) { pr_debug("writing %08x to register %08x\n",(unsigned int)val,reg); writel(val, dma_regaddr(chan, reg)); @@ -102,7 +103,7 @@ struct s3c2410_dma_regstate { */ static void -dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs) +dmadbg_capture(s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs) { regs->dcsrc = dma_rdreg(chan, S3C2410_DMA_DCSRC); regs->disrc = dma_rdreg(chan, S3C2410_DMA_DISRC); @@ -112,7 +113,7 @@ dmadbg_capture(struct s3c2410_dma_chan *chan, struct s3c2410_dma_regstate *regs) } static void -dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan, +dmadbg_showregs(const char *fname, int line, s3c2410_dma_chan_t *chan, struct s3c2410_dma_regstate *regs) { printk(KERN_DEBUG "dma%d: %s:%d: DCSRC=%08lx, DISRC=%08lx, DSTAT=%08lx DMT=%02lx, DCON=%08lx\n", @@ -122,7 +123,7 @@ dmadbg_dumpregs(const char *fname, int line, struct s3c2410_dma_chan *chan, } static void -dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan) +dmadbg_showchan(const char *fname, int line, s3c2410_dma_chan_t *chan) { struct s3c2410_dma_regstate state; @@ -132,16 +133,7 @@ dmadbg_showchan(const char *fname, int line, struct s3c2410_dma_chan *chan) chan->number, fname, line, chan->load_state, chan->curr, chan->next, chan->end); - dmadbg_dumpregs(fname, line, chan, &state); -} - -static void -dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan) -{ - struct s3c2410_dma_regstate state; - - dmadbg_capture(chan, &state); - dmadbg_dumpregs(fname, line, chan, &state); + dmadbg_showregs(fname, line, chan, &state); } #define dbg_showregs(chan) dmadbg_showregs(__FUNCTION__, __LINE__, (chan)) @@ -164,7 +156,7 @@ dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan) */ static void -s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val) +s3c2410_dma_stats_timeout(s3c2410_dma_stats_t *stats, int val) { if (stats == NULL) return; @@ -183,7 +175,7 @@ s3c2410_dma_stats_timeout(struct s3c2410_dma_stats *stats, int val) */ static int -s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line) +s3c2410_dma_waitforload(s3c2410_dma_chan_t *chan, int line) { int timeout = chan->load_timeout; int took; @@ -230,8 +222,8 @@ s3c2410_dma_waitforload(struct s3c2410_dma_chan *chan, int line) */ static inline int -s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan, - struct s3c2410_dma_buf *buf) +s3c2410_dma_loadbuffer(s3c2410_dma_chan_t *chan, + s3c2410_dma_buf_t *buf) { unsigned long reload; @@ -262,14 +254,10 @@ s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan, buf->next); reload = (buf->next == NULL) ? S3C2410_DCON_NORELOAD : 0; } else { - //pr_debug("load_state is %d => autoreload\n", chan->load_state); + pr_debug("load_state is %d => autoreload\n", chan->load_state); reload = S3C2410_DCON_AUTORELOAD; } - if ((buf->data & 0xf0000000) != 0x30000000) { - dmawarn("dmaload: buffer is %p\n", (void *)buf->data); - } - writel(buf->data, chan->addr_reg); dma_wrreg(chan, S3C2410_DMA_DCON, @@ -304,7 +292,7 @@ s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan, */ static void -s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op) +s3c2410_dma_call_op(s3c2410_dma_chan_t *chan, s3c2410_chan_op_t op) { if (chan->op_fn != NULL) { (chan->op_fn)(chan, op); @@ -318,8 +306,8 @@ s3c2410_dma_call_op(struct s3c2410_dma_chan *chan, enum s3c2410_chan_op op) */ static inline void -s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf, - enum s3c2410_dma_buffresult result) +s3c2410_dma_buffdone(s3c2410_dma_chan_t *chan, s3c2410_dma_buf_t *buf, + s3c2410_dma_buffresult_t result) { pr_debug("callback_fn=%p, buf=%p, id=%p, size=%d, result=%d\n", chan->callback_fn, buf, buf->id, buf->size, result); @@ -334,7 +322,7 @@ s3c2410_dma_buffdone(struct s3c2410_dma_chan *chan, struct s3c2410_dma_buf *buf, * start a dma channel going */ -static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) +static int s3c2410_dma_start(s3c2410_dma_chan_t *chan) { unsigned long tmp; unsigned long flags; @@ -383,7 +371,7 @@ static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) tmp |= S3C2410_DMASKTRIG_ON; dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp); - pr_debug("dma%d: %08lx to DMASKTRIG\n", chan->number, tmp); + pr_debug("wrote %08lx to DMASKTRIG\n", tmp); #if 0 /* the dma buffer loads should take care of clearing the AUTO @@ -397,30 +385,7 @@ static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) dbg_showchan(chan); - /* if we've only loaded one buffer onto the channel, then chec - * to see if we have another, and if so, try and load it so when - * the first buffer is finished, the new one will be loaded onto - * the channel */ - - if (chan->next != NULL) { - if (chan->load_state == S3C2410_DMALOAD_1LOADED) { - - if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { - pr_debug("%s: buff not yet loaded, no more todo\n", - __FUNCTION__); - } else { - chan->load_state = S3C2410_DMALOAD_1RUNNING; - s3c2410_dma_loadbuffer(chan, chan->next); - } - - } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) { - s3c2410_dma_loadbuffer(chan, chan->next); - } - } - - local_irq_restore(flags); - return 0; } @@ -430,7 +395,7 @@ static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) */ static int -s3c2410_dma_canload(struct s3c2410_dma_chan *chan) +s3c2410_dma_canload(s3c2410_dma_chan_t *chan) { if (chan->load_state == S3C2410_DMALOAD_NONE || chan->load_state == S3C2410_DMALOAD_1RUNNING) @@ -460,8 +425,8 @@ s3c2410_dma_canload(struct s3c2410_dma_chan *chan) int s3c2410_dma_enqueue(unsigned int channel, void *id, dma_addr_t data, int size) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; - struct s3c2410_dma_buf *buf; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; + s3c2410_dma_buf_t *buf; unsigned long flags; check_channel(channel); @@ -472,11 +437,12 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); if (buf == NULL) { pr_debug("%s: out of memory (%ld alloc)\n", - __FUNCTION__, (long)sizeof(*buf)); + __FUNCTION__, sizeof(*buf)); return -ENOMEM; } - //pr_debug("%s: new buffer %p\n", __FUNCTION__, buf); + pr_debug("%s: new buffer %p\n", __FUNCTION__, buf); + //dbg_showchan(chan); buf->next = NULL; @@ -540,7 +506,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, EXPORT_SYMBOL(s3c2410_dma_enqueue); static inline void -s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf) +s3c2410_dma_freebuf(s3c2410_dma_buf_t *buf) { int magicok = (buf->magic == BUF_MAGIC); @@ -560,7 +526,7 @@ s3c2410_dma_freebuf(struct s3c2410_dma_buf *buf) */ static inline void -s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) +s3c2410_dma_lastxfer(s3c2410_dma_chan_t *chan) { pr_debug("dma%d: s3c2410_dma_lastxfer: load_state %d\n", chan->number, chan->load_state); @@ -572,20 +538,14 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) case S3C2410_DMALOAD_1LOADED: if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { /* flag error? */ - printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", - chan->number, __FUNCTION__); + printk(KERN_ERR "dma%d: timeout waiting for load\n", + chan->number); return; } break; - case S3C2410_DMALOAD_1LOADED_1RUNNING: - /* I belive in this case we do not have anything to do - * until the next buffer comes along, and we turn off the - * reload */ - return; - default: - pr_debug("dma%d: lastxfer: unhandled load_state %d with no next\n", + pr_debug("dma%d: lastxfer: unhandled load_state %d with no next", chan->number, chan->load_state); return; @@ -601,8 +561,8 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) static irqreturn_t s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) { - struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw; - struct s3c2410_dma_buf *buf; + s3c2410_dma_chan_t *chan = (s3c2410_dma_chan_t *)devpw; + s3c2410_dma_buf_t *buf; buf = chan->curr; @@ -670,14 +630,7 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) } else { } - /* only reload if the channel is still running... our buffer done - * routine may have altered the state by requesting the dma channel - * to stop or shutdown... */ - - /* todo: check that when the channel is shut-down from inside this - * function, we cope with unsetting reload, etc */ - - if (chan->next != NULL && chan->state != S3C2410_DMA_IDLE) { + if (chan->next != NULL) { unsigned long flags; switch (chan->load_state) { @@ -692,8 +645,8 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) case S3C2410_DMALOAD_1LOADED: if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { /* flag error? */ - printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", - chan->number, __FUNCTION__); + printk(KERN_ERR "dma%d: timeout waiting for load\n", + chan->number); return IRQ_HANDLED; } @@ -726,15 +679,17 @@ s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) return IRQ_HANDLED; } + + /* s3c2410_request_dma * * get control of an dma channel */ -int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client, +int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client, void *dev) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; unsigned long flags; int err; @@ -764,17 +719,11 @@ int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client, pr_debug("dma%d: %s : requesting irq %d\n", channel, __FUNCTION__, chan->irq); - chan->irq_claimed = 1; - local_irq_restore(flags); - - err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED, + err = request_irq(chan->irq, s3c2410_dma_irq, SA_INTERRUPT, client->name, (void *)chan); - local_irq_save(flags); - if (err) { chan->in_use = 0; - chan->irq_claimed = 0; local_irq_restore(flags); printk(KERN_ERR "%s: cannot get IRQ %d for DMA %d\n", @@ -782,6 +731,7 @@ int s3c2410_dma_request(unsigned int channel, struct s3c2410_dma_client *client, return err; } + chan->irq_claimed = 1; chan->irq_enabled = 1; } @@ -807,9 +757,9 @@ EXPORT_SYMBOL(s3c2410_dma_request); * allowed to go through. */ -int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) +int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; unsigned long flags; check_channel(channel); @@ -846,7 +796,7 @@ int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) EXPORT_SYMBOL(s3c2410_dma_free); -static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) +static int s3c2410_dma_dostop(s3c2410_dma_chan_t *chan) { unsigned long tmp; unsigned long flags; @@ -861,7 +811,6 @@ static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG); tmp |= S3C2410_DMASKTRIG_STOP; - //tmp &= ~S3C2410_DMASKTRIG_ON; dma_wrreg(chan, S3C2410_DMA_DMASKTRIG, tmp); #if 0 @@ -871,7 +820,6 @@ static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) dma_wrreg(chan, S3C2410_DMA_DCON, tmp); #endif - /* should stop do this, or should we wait for flush? */ chan->state = S3C2410_DMA_IDLE; chan->load_state = S3C2410_DMALOAD_NONE; @@ -880,35 +828,17 @@ static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) return 0; } -void s3c2410_dma_waitforstop(struct s3c2410_dma_chan *chan) -{ - unsigned long tmp; - unsigned int timeout = 0x10000; - - while (timeout-- > 0) { - tmp = dma_rdreg(chan, S3C2410_DMA_DMASKTRIG); - - if (!(tmp & S3C2410_DMASKTRIG_ON)) - return; - } - - pr_debug("dma%d: failed to stop?\n", chan->number); -} - - /* s3c2410_dma_flush * * stop the channel, and remove all current and pending transfers */ -static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan) +static int s3c2410_dma_flush(s3c2410_dma_chan_t *chan) { - struct s3c2410_dma_buf *buf, *next; + s3c2410_dma_buf_t *buf, *next; unsigned long flags; - pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number); - - dbg_showchan(chan); + pr_debug("%s:\n", __FUNCTION__); local_irq_save(flags); @@ -935,69 +865,16 @@ static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan) } } - dbg_showregs(chan); - - s3c2410_dma_waitforstop(chan); - -#if 0 - /* should also clear interrupts, according to WinCE BSP */ - { - unsigned long tmp; - - tmp = dma_rdreg(chan, S3C2410_DMA_DCON); - tmp |= S3C2410_DCON_NORELOAD; - dma_wrreg(chan, S3C2410_DMA_DCON, tmp); - } -#endif - - dbg_showregs(chan); - local_irq_restore(flags); return 0; } -int -s3c2410_dma_started(struct s3c2410_dma_chan *chan) -{ - unsigned long flags; - - local_irq_save(flags); - - dbg_showchan(chan); - - /* if we've only loaded one buffer onto the channel, then chec - * to see if we have another, and if so, try and load it so when - * the first buffer is finished, the new one will be loaded onto - * the channel */ - - if (chan->next != NULL) { - if (chan->load_state == S3C2410_DMALOAD_1LOADED) { - - if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { - pr_debug("%s: buff not yet loaded, no more todo\n", - __FUNCTION__); - } else { - chan->load_state = S3C2410_DMALOAD_1RUNNING; - s3c2410_dma_loadbuffer(chan, chan->next); - } - - } else if (chan->load_state == S3C2410_DMALOAD_1RUNNING) { - s3c2410_dma_loadbuffer(chan, chan->next); - } - } - - - local_irq_restore(flags); - - return 0; - -} int -s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op) +s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1009,15 +886,14 @@ s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op) return s3c2410_dma_dostop(chan); case S3C2410_DMAOP_PAUSE: + return -ENOENT; + case S3C2410_DMAOP_RESUME: return -ENOENT; case S3C2410_DMAOP_FLUSH: return s3c2410_dma_flush(chan); - case S3C2410_DMAOP_STARTED: - return s3c2410_dma_started(chan); - case S3C2410_DMAOP_TIMEOUT: return 0; @@ -1046,7 +922,7 @@ int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", __FUNCTION__, channel, xferunit, dcon); @@ -1086,7 +962,7 @@ EXPORT_SYMBOL(s3c2410_dma_config); int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1106,7 +982,7 @@ EXPORT_SYMBOL(s3c2410_dma_setflags); int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1121,7 +997,7 @@ EXPORT_SYMBOL(s3c2410_dma_set_opfn); int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1149,11 +1025,11 @@ EXPORT_SYMBOL(s3c2410_dma_set_buffdone_fn); */ int s3c2410_dma_devconfig(int channel, - enum s3c2410_dmasrc source, + s3c2410_dmasrc_t source, int hwcfg, unsigned long devaddr) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1200,7 +1076,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig); int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) { - struct s3c2410_dma_chan *chan = &s3c2410_chans[channel]; + s3c2410_dma_chan_t *chan = &s3c2410_chans[channel]; check_channel(channel); @@ -1222,7 +1098,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition); static int s3c2410_dma_suspend(struct sys_device *dev, pm_message_t state) { - struct s3c2410_dma_chan *cp = container_of(dev, struct s3c2410_dma_chan, dev); + s3c2410_dma_chan_t *cp = container_of(dev, s3c2410_dma_chan_t, dev); printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); @@ -1262,7 +1138,7 @@ static struct sysdev_class dma_sysclass = { static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) { - memset(p, 0, sizeof(struct s3c2410_dma_buf)); + memset(p, 0, sizeof(s3c2410_dma_buf_t)); } @@ -1270,7 +1146,7 @@ static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f) static int __init s3c2410_init_dma(void) { - struct s3c2410_dma_chan *cp; + s3c2410_dma_chan_t *cp; int channel; int ret; @@ -1288,7 +1164,7 @@ static int __init s3c2410_init_dma(void) goto err; } - dma_kmem = kmem_cache_create("dma_desc", sizeof(struct s3c2410_dma_buf), 0, + dma_kmem = kmem_cache_create("dma_desc", sizeof(s3c2410_dma_buf_t), 0, SLAB_HWCACHE_ALIGN, s3c2410_dma_cache_ctor, NULL); @@ -1301,7 +1177,7 @@ static int __init s3c2410_init_dma(void) for (channel = 0; channel < S3C2410_DMA_CHANNELS; channel++) { cp = &s3c2410_chans[channel]; - memset(cp, 0, sizeof(struct s3c2410_dma_chan)); + memset(cp, 0, sizeof(s3c2410_dma_chan_t)); /* dma channel irqs are in order.. */ cp->number = channel; diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index cd6139b35..66d8c068e 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c @@ -86,7 +86,7 @@ unsigned long s3c_irqwake_intmask = 0xffffffffL; unsigned long s3c_irqwake_eintallow = 0x0000fff0L; unsigned long s3c_irqwake_eintmask = 0xffffffffL; -int +static int s3c_irq_wake(unsigned int irqno, unsigned int state) { unsigned long irqbit = 1 << (irqno - IRQ_EINT0); @@ -191,9 +191,13 @@ static struct irqchip s3c_irq_chip = { .ack = s3c_irq_ack, .mask = s3c_irq_mask, .unmask = s3c_irq_unmask, - .set_wake = s3c_irq_wake + .set_wake = s3c_irq_wake }; +/* S3C2410_EINTMASK + * S3C2410_EINTPEND + */ + static void s3c_irqext_mask(unsigned int irqno) { @@ -201,9 +205,9 @@ s3c_irqext_mask(unsigned int irqno) irqno -= EXTINT_OFF; - mask = __raw_readl(S3C24XX_EINTMASK); + mask = __raw_readl(S3C2410_EINTMASK); mask |= ( 1UL << irqno); - __raw_writel(mask, S3C24XX_EINTMASK); + __raw_writel(mask, S3C2410_EINTMASK); if (irqno <= (IRQ_EINT7 - EXTINT_OFF)) { /* check to see if all need masking */ @@ -228,11 +232,11 @@ s3c_irqext_ack(unsigned int irqno) bit = 1UL << (irqno - EXTINT_OFF); - mask = __raw_readl(S3C24XX_EINTMASK); + mask = __raw_readl(S3C2410_EINTMASK); - __raw_writel(bit, S3C24XX_EINTPEND); + __raw_writel(bit, S3C2410_EINTPEND); - req = __raw_readl(S3C24XX_EINTPEND); + req = __raw_readl(S3C2410_EINTPEND); req &= ~mask; /* not sure if we should be acking the parent irq... */ @@ -253,14 +257,14 @@ s3c_irqext_unmask(unsigned int irqno) irqno -= EXTINT_OFF; - mask = __raw_readl(S3C24XX_EINTMASK); + mask = __raw_readl(S3C2410_EINTMASK); mask &= ~( 1UL << irqno); - __raw_writel(mask, S3C24XX_EINTMASK); + __raw_writel(mask, S3C2410_EINTMASK); s3c_irq_unmask((irqno <= (IRQ_EINT7 - EXTINT_OFF)) ? IRQ_EINT4t7 : IRQ_EINT8t23); } -int +static int s3c_irqext_type(unsigned int irq, unsigned int type) { void __iomem *extint_reg; @@ -271,28 +275,28 @@ s3c_irqext_type(unsigned int irq, unsigned int type) if ((irq >= IRQ_EINT0) && (irq <= IRQ_EINT3)) { gpcon_reg = S3C2410_GPFCON; - extint_reg = S3C24XX_EXTINT0; + extint_reg = S3C2410_EXTINT0; gpcon_offset = (irq - IRQ_EINT0) * 2; extint_offset = (irq - IRQ_EINT0) * 4; } else if ((irq >= IRQ_EINT4) && (irq <= IRQ_EINT7)) { gpcon_reg = S3C2410_GPFCON; - extint_reg = S3C24XX_EXTINT0; + extint_reg = S3C2410_EXTINT0; gpcon_offset = (irq - (EXTINT_OFF)) * 2; extint_offset = (irq - (EXTINT_OFF)) * 4; } else if ((irq >= IRQ_EINT8) && (irq <= IRQ_EINT15)) { gpcon_reg = S3C2410_GPGCON; - extint_reg = S3C24XX_EXTINT1; + extint_reg = S3C2410_EXTINT1; gpcon_offset = (irq - IRQ_EINT8) * 2; extint_offset = (irq - IRQ_EINT8) * 4; } else if ((irq >= IRQ_EINT16) && (irq <= IRQ_EINT23)) { gpcon_reg = S3C2410_GPGCON; - extint_reg = S3C24XX_EXTINT2; + extint_reg = S3C2410_EXTINT2; gpcon_offset = (irq - IRQ_EINT8) * 2; extint_offset = (irq - IRQ_EINT16) * 4; } else @@ -568,23 +572,6 @@ s3c_irq_demux_uart2(unsigned int irq, s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs); } -static void -s3c_irq_demux_extint(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) -{ - unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); - unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); - - eintpnd &= ~eintmsk; - - if (eintpnd) { - irq = fls(eintpnd); - irq += (IRQ_EINT4 - (4 + 1)); - - desc_handle_irq(irq, irq_desc + irq, regs); - } -} /* s3c24xx_init_irq * @@ -604,12 +591,12 @@ void __init s3c24xx_init_irq(void) last = 0; for (i = 0; i < 4; i++) { - pend = __raw_readl(S3C24XX_EINTPEND); + pend = __raw_readl(S3C2410_EINTPEND); if (pend == 0 || pend == last) break; - __raw_writel(pend, S3C24XX_EINTPEND); + __raw_writel(pend, S3C2410_EINTPEND); printk("irq: clearing pending ext status %08x\n", (int)pend); last = pend; } @@ -643,14 +630,12 @@ void __init s3c24xx_init_irq(void) irqdbf("s3c2410_init_irq: registering s3c2410 interrupt handlers\n"); - for (irqno = IRQ_EINT4t7; irqno <= IRQ_ADCPARENT; irqno++) { + for (irqno = IRQ_BATT_FLT; irqno <= IRQ_ADCPARENT; irqno++) { /* set all the s3c2410 internal irqs */ switch (irqno) { /* deal with the special IRQs (cascaded) */ - case IRQ_EINT4t7: - case IRQ_EINT8t23: case IRQ_UART0: case IRQ_UART1: case IRQ_UART2: @@ -674,14 +659,12 @@ void __init s3c24xx_init_irq(void) /* setup the cascade irq handlers */ - set_irq_chained_handler(IRQ_EINT4t7, s3c_irq_demux_extint); - set_irq_chained_handler(IRQ_EINT8t23, s3c_irq_demux_extint); - set_irq_chained_handler(IRQ_UART0, s3c_irq_demux_uart0); set_irq_chained_handler(IRQ_UART1, s3c_irq_demux_uart1); set_irq_chained_handler(IRQ_UART2, s3c_irq_demux_uart2); set_irq_chained_handler(IRQ_ADCPARENT, s3c_irq_demux_adc); + /* external interrupts */ for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h index 842a9f42c..4abf0ca14 100644 --- a/arch/arm/mach-s3c2410/irq.h +++ b/arch/arm/mach-s3c2410/irq.h @@ -97,13 +97,3 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) __raw_writel(parentmask, S3C2410_INTPND); } } - -/* exported for use in arch/arm/mach-s3c2410 */ - -#ifdef CONFIG_PM -extern int s3c_irq_wake(unsigned int irqno, unsigned int state); -#else -#define s3c_irq_wake NULL -#endif - -extern int s3c_irqext_type(unsigned int irq, unsigned int type); diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c index 60641d452..cc97fbf66 100644 --- a/arch/arm/mach-s3c2410/mach-anubis.c +++ b/arch/arm/mach-s3c2410/mach-anubis.c @@ -60,12 +60,11 @@ static struct map_desc anubis_iodesc[] __initdata = { .virtual = (u32)S3C24XX_VA_ISA_BYTE, .pfn = __phys_to_pfn(0x0), .length = SZ_4M, - .type = MT_DEVICE, + .type = MT_DEVICE }, { .virtual = (u32)S3C24XX_VA_ISA_WORD, .pfn = __phys_to_pfn(0x0), - .length = SZ_4M, - .type = MT_DEVICE, + .length = SZ_4M, MT_DEVICE }, /* we could possibly compress the next set down into a set of smaller tables @@ -79,12 +78,36 @@ static struct map_desc anubis_iodesc[] __initdata = { .virtual = (u32)ANUBIS_VA_CTRL1, .pfn = __phys_to_pfn(ANUBIS_PA_CTRL1), .length = SZ_4K, - .type = MT_DEVICE, + .type = MT_DEVICE }, { .virtual = (u32)ANUBIS_VA_CTRL2, .pfn = __phys_to_pfn(ANUBIS_PA_CTRL2), .length = SZ_4K, - .type = MT_DEVICE, + .type =MT_DEVICE + }, + + /* IDE drives */ + + { + .virtual = (u32)ANUBIS_IDEPRI, + .pfn = __phys_to_pfn(S3C2410_CS3), + .length = SZ_1M, + .type = MT_DEVICE + }, { + .virtual = (u32)ANUBIS_IDEPRIAUX, + .pfn = __phys_to_pfn(S3C2410_CS3+(1<<26)), + .length = SZ_1M, + .type = MT_DEVICE + }, { + .virtual = (u32)ANUBIS_IDESEC, + .pfn = __phys_to_pfn(S3C2410_CS4), + .length = SZ_1M, + .type = MT_DEVICE + }, { + .virtual = (u32)ANUBIS_IDESECAUX, + .pfn = __phys_to_pfn(S3C2410_CS4+(1<<26)), + .length = SZ_1M, + .type = MT_DEVICE }, }; @@ -103,12 +126,12 @@ static struct s3c24xx_uart_clksrc anubis_serial_clocks[] = { .name = "pclk", .divisor = 1, .min_baud = 0, - .max_baud = 0, + .max_baud = 0. } }; -static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg anubis_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, @@ -116,7 +139,7 @@ static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { .ulcon = ULCON, .ufcon = UFCON, .clocks = anubis_serial_clocks, - .clocks_size = ARRAY_SIZE(anubis_serial_clocks), + .clocks_size = ARRAY_SIZE(anubis_serial_clocks) }, [1] = { .hwport = 2, @@ -125,7 +148,7 @@ static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { .ulcon = ULCON, .ufcon = UFCON, .clocks = anubis_serial_clocks, - .clocks_size = ARRAY_SIZE(anubis_serial_clocks), + .clocks_size = ARRAY_SIZE(anubis_serial_clocks) }, }; @@ -139,7 +162,7 @@ static struct mtd_partition anubis_default_nand_part[] = { [0] = { .name = "Boot Agent", .size = SZ_16K, - .offset = 0, + .offset = 0 }, [1] = { .name = "/boot", @@ -171,21 +194,21 @@ static struct s3c2410_nand_set anubis_nand_sets[] = { .nr_chips = 1, .nr_map = external_map, .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), - .partitions = anubis_default_nand_part, + .partitions = anubis_default_nand_part }, [0] = { .name = "chip0", .nr_chips = 1, .nr_map = chip0_map, .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), - .partitions = anubis_default_nand_part, + .partitions = anubis_default_nand_part }, [2] = { .name = "chip1", .nr_chips = 1, .nr_map = chip1_map, .nr_partitions = ARRAY_SIZE(anubis_default_nand_part), - .partitions = anubis_default_nand_part, + .partitions = anubis_default_nand_part }, }; @@ -216,54 +239,6 @@ static struct s3c2410_platform_nand anubis_nand_info = { .select_chip = anubis_nand_select, }; -/* IDE channels */ - -static struct resource anubis_ide0_resource[] = { - { - .start = S3C2410_CS3, - .end = S3C2410_CS3 + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = S3C2410_CS3 + (1<<26), - .end = S3C2410_CS3 + (1<<26) + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = IRQ_IDE0, - .end = IRQ_IDE0, - .flags = IORESOURCE_IRQ, - }, -}; - -static struct platform_device anubis_device_ide0 = { - .name = "simtec-ide", - .id = 0, - .num_resources = ARRAY_SIZE(anubis_ide0_resource), - .resource = anubis_ide0_resource, -}; - -static struct resource anubis_ide1_resource[] = { - { - .start = S3C2410_CS4, - .end = S3C2410_CS4 + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = S3C2410_CS4 + (1<<26), - .end = S3C2410_CS4 + (1<<26) + (8*32) - 1, - .flags = IORESOURCE_MEM, - }, { - .start = IRQ_IDE0, - .end = IRQ_IDE0, - .flags = IORESOURCE_IRQ, - }, -}; - - -static struct platform_device anubis_device_ide1 = { - .name = "simtec-ide", - .id = 1, - .num_resources = ARRAY_SIZE(anubis_ide1_resource), - .resource = anubis_ide1_resource, -}; /* Standard Anubis devices */ @@ -274,8 +249,6 @@ static struct platform_device *anubis_devices[] __initdata = { &s3c_device_i2c, &s3c_device_rtc, &s3c_device_nand, - &anubis_device_ide0, - &anubis_device_ide1, }; static struct clk *anubis_clocks[] = { @@ -290,7 +263,7 @@ static struct s3c24xx_board anubis_board __initdata = { .devices = anubis_devices, .devices_count = ARRAY_SIZE(anubis_devices), .clocks = anubis_clocks, - .clocks_count = ARRAY_SIZE(anubis_clocks), + .clocks_count = ARRAY_SIZE(anubis_clocks) }; static void __init anubis_map_io(void) diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 2968fb235..995bb8add 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -8,6 +8,31 @@ * 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. + * + * Modifications: + * 14-Sep-2004 BJD USB power control + * 20-Aug-2004 BJD Added s3c2410_board struct + * 18-Aug-2004 BJD Added platform devices from default set + * 16-May-2003 BJD Created initial version + * 16-Aug-2003 BJD Fixed header files and copyright, added URL + * 05-Sep-2003 BJD Moved to v2.6 kernel + * 06-Jan-2003 BJD Updates for + * 18-Jan-2003 BJD Added serial port configuration + * 05-Oct-2004 BJD Power management code + * 04-Nov-2004 BJD Updated serial port clocks + * 04-Jan-2005 BJD New uart init call + * 10-Jan-2005 BJD Removed include of s3c2410.h + * 14-Jan-2005 BJD Add support for muitlple NAND devices + * 03-Mar-2005 BJD Ensured that bast-cpld.h is included + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 14-Mar-2005 BJD Updated for __iomem changes + * 22-Jun-2005 BJD Added DM9000 platform information + * 28-Jun-2005 BJD Moved pm functionality out to common code + * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s + * 25-Jul-2005 BJD Removed ASIX static mappings + * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus + * 20-Sep-2005 BJD Added static to non-exported items + * 26-Oct-2005 BJD Added FB platform data */ #include @@ -183,7 +208,7 @@ static struct s3c24xx_uart_clksrc bast_serial_clocks[] = { }; -static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg bast_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 8c895c077..646a3a5d3 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -9,6 +9,23 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * + * Modifications: + * 16-May-2003 BJD Created initial version + * 16-Aug-2003 BJD Fixed header files and copyright, added URL + * 05-Sep-2003 BJD Moved to v2.6 kernel + * 06-Jan-2003 BJD Updates for + * 18-Jan-2003 BJD Added serial port configuration + * 17-Feb-2003 BJD Copied to mach-ipaq.c + * 21-Aug-2004 BJD Added struct s3c2410_board + * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_ + * 18-Oct-2004 BJD Updated new board structure name + * 04-Nov-2004 BJD Change for new serial clock + * 04-Jan-2005 BJD Updated uart init call + * 10-Jan-2005 BJD Removed include of s3c2410.h + * 14-Jan-2005 BJD Added clock init + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 20-Sep-2005 BJD Added static to non-exported items + * 26-Oct-2005 BJD Changed name of fb init call */ #include @@ -55,7 +72,7 @@ static struct map_desc h1940_iodesc[] __initdata = { #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE -static struct s3c2410_uartcfg h1940_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg h1940_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c index 065a1d4e8..07d09509a 100644 --- a/arch/arm/mach-s3c2410/mach-nexcoder.c +++ b/arch/arm/mach-s3c2410/mach-nexcoder.c @@ -51,7 +51,7 @@ static struct map_desc nexcoder_iodesc[] __initdata = { #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE -static struct s3c2410_uartcfg nexcoder_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg nexcoder_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2410/mach-osiris.c index e193ba69e..ae0787557 100644 --- a/arch/arm/mach-s3c2410/mach-osiris.c +++ b/arch/arm/mach-s3c2410/mach-osiris.c @@ -67,12 +67,12 @@ static struct map_desc osiris_iodesc[] __initdata = { .virtual = (u32)OSIRIS_VA_CTRL1, .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), .length = SZ_16K, - .type = MT_DEVICE, + .type = MT_DEVICE }, { .virtual = (u32)OSIRIS_VA_CTRL2, .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), .length = SZ_16K, - .type = MT_DEVICE, + .type = MT_DEVICE }, }; @@ -91,11 +91,12 @@ static struct s3c24xx_uart_clksrc osiris_serial_clocks[] = { .name = "pclk", .divisor = 1, .min_baud = 0, - .max_baud = 0, + .max_baud = 0. } }; -static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { + +static struct s3c2410_uartcfg osiris_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, @@ -103,16 +104,16 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { .ulcon = ULCON, .ufcon = UFCON, .clocks = osiris_serial_clocks, - .clocks_size = ARRAY_SIZE(osiris_serial_clocks), + .clocks_size = ARRAY_SIZE(osiris_serial_clocks) }, [1] = { - .hwport = 1, + .hwport = 2, .flags = 0, .ucon = UCON, .ulcon = ULCON, .ufcon = UFCON, .clocks = osiris_serial_clocks, - .clocks_size = ARRAY_SIZE(osiris_serial_clocks), + .clocks_size = ARRAY_SIZE(osiris_serial_clocks) }, }; @@ -126,7 +127,7 @@ static struct mtd_partition osiris_default_nand_part[] = { [0] = { .name = "Boot Agent", .size = SZ_16K, - .offset = 0, + .offset = 0 }, [1] = { .name = "/boot", @@ -158,21 +159,21 @@ static struct s3c2410_nand_set osiris_nand_sets[] = { .nr_chips = 1, .nr_map = external_map, .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), - .partitions = osiris_default_nand_part, + .partitions = osiris_default_nand_part }, [0] = { .name = "chip0", .nr_chips = 1, .nr_map = chip0_map, .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), - .partitions = osiris_default_nand_part, + .partitions = osiris_default_nand_part }, [2] = { .name = "chip1", .nr_chips = 1, .nr_map = chip1_map, .nr_partitions = ARRAY_SIZE(osiris_default_nand_part), - .partitions = osiris_default_nand_part, + .partitions = osiris_default_nand_part }, }; @@ -245,7 +246,7 @@ static struct s3c24xx_board osiris_board __initdata = { .devices = osiris_devices, .devices_count = ARRAY_SIZE(osiris_devices), .clocks = osiris_clocks, - .clocks_count = ARRAY_SIZE(osiris_clocks), + .clocks_count = ARRAY_SIZE(osiris_clocks) }; static void __init osiris_map_io(void) diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c index c71673fd9..b39daedf9 100644 --- a/arch/arm/mach-s3c2410/mach-otom.c +++ b/arch/arm/mach-s3c2410/mach-otom.c @@ -45,7 +45,7 @@ static struct map_desc otom11_iodesc[] __initdata = { #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE -static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg otom11_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index 23d7c0520..306afc1d7 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c @@ -9,6 +9,15 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * + * Modifications: + * 16-Sep-2004 BJD Copied from mach-h1940.c + * 25-Oct-2004 BJD Updates for 2.6.10-rc1 + * 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h + * 14-Jan-2005 BJD Added new clock init + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 14-Mar-2005 BJD Fixed __iomem warnings + * 20-Sep-2005 BJD Added static to non-exported items + * 31-Oct-2005 BJD Added LCD setup for framebuffer */ #include diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index b3b0171d5..2db932d72 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c @@ -27,6 +27,10 @@ * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by * Ben Dooks * + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 20-Sep-2005 BJD Added static to non-exported items + * 01-Apr-2006 BJD Moved init code to common smdk + * ***********************************************************************/ #include @@ -61,7 +65,7 @@ static struct map_desc smdk2410_iodesc[] __initdata = { #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE -static struct s3c2410_uartcfg smdk2410_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg smdk2410_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-smdk2413.c b/arch/arm/mach-s3c2410/mach-smdk2413.c deleted file mode 100644 index 3a4ca7f6f..000000000 --- a/arch/arm/mach-s3c2410/mach-smdk2413.c +++ /dev/null @@ -1,139 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/mach-smdk2413.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * Thanks to Dimity Andric (TomTom) and Steven Ryu (Samsung) for the - * loans of SMDK2413 to work with. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -//#include -#include -#include -#include - -#include -#include - -#include "s3c2410.h" -#include "s3c2412.h" -#include "clock.h" -#include "devs.h" -#include "cpu.h" - -#include "common-smdk.h" - -static struct map_desc smdk2413_iodesc[] __initdata = { -}; - -static struct s3c2410_uartcfg smdk2413_uartcfgs[] __initdata = { - [0] = { - .hwport = 0, - .flags = 0, - .ucon = 0x3c5, - .ulcon = 0x03, - .ufcon = 0x51, - }, - [1] = { - .hwport = 1, - .flags = 0, - .ucon = 0x3c5, - .ulcon = 0x03, - .ufcon = 0x51, - }, - /* IR port */ - [2] = { - .hwport = 2, - .flags = 0, - .ucon = 0x3c5, - .ulcon = 0x43, - .ufcon = 0x51, - } -}; - -static struct platform_device *smdk2413_devices[] __initdata = { - &s3c_device_usb, - //&s3c_device_lcd, - &s3c_device_wdt, - &s3c_device_i2c, - &s3c_device_iis, -}; - -static struct s3c24xx_board smdk2413_board __initdata = { - .devices = smdk2413_devices, - .devices_count = ARRAY_SIZE(smdk2413_devices) -}; - -static void __init smdk2413_fixup(struct machine_desc *desc, - struct tag *tags, char **cmdline, - struct meminfo *mi) -{ - if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { - mi->nr_banks=1; - mi->bank[0].start = 0x30000000; - mi->bank[0].size = SZ_64M; - mi->bank[0].node = 0; - } -} - -static void __init smdk2413_map_io(void) -{ - s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); - s3c24xx_init_clocks(12000000); - s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); - s3c24xx_set_board(&smdk2413_board); -} - -static void __init smdk2413_machine_init(void) -{ - smdk_machine_init(); -} - -MACHINE_START(S3C2413, "S3C2413") - /* Maintainer: Ben Dooks */ - .phys_io = S3C2410_PA_UART, - .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, - .boot_params = S3C2410_SDRAM_PA + 0x100, - - .fixup = smdk2413_fixup, - .init_irq = s3c24xx_init_irq, - .map_io = smdk2413_map_io, - .init_machine = smdk2413_machine_init, - .timer = &s3c24xx_timer, -MACHINE_END - -MACHINE_START(SMDK2413, "SMDK2413") - /* Maintainer: Ben Dooks */ - .phys_io = S3C2410_PA_UART, - .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, - .boot_params = S3C2410_SDRAM_PA + 0x100, - - .fixup = smdk2413_fixup, - .init_irq = s3c24xx_init_irq, - .map_io = smdk2413_map_io, - .init_machine = smdk2413_machine_init, - .timer = &s3c24xx_timer, -MACHINE_END diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c index d661c6b7f..5fffd1d51 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2440.c +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c @@ -86,7 +86,7 @@ static struct map_desc smdk2440_iodesc[] __initdata = { #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE -static struct s3c2410_uartcfg smdk2440_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg smdk2440_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index a0d7692cd..785fc9cdc 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c @@ -10,6 +10,25 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * + * Modifications: + * 14-Sep-2004 BJD USB Power control + * 04-Sep-2004 BJD Added new uart init, and io init + * 21-Aug-2004 BJD Added struct s3c2410_board + * 06-Aug-2004 BJD Fixed call to time initialisation + * 05-Apr-2004 BJD Copied to make mach-vr1000.c + * 18-Oct-2004 BJD Updated board struct + * 04-Nov-2004 BJD Clock and serial configuration update + * + * 04-Jan-2005 BJD Updated uart init call + * 10-Jan-2005 BJD Removed include of s3c2410.h + * 14-Jan-2005 BJD Added clock init + * 15-Jan-2005 BJD Add serial port device definition + * 20-Jan-2005 BJD Use UPF_IOREMAP for ports + * 10-Feb-2005 BJD Added power-off capability + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 14-Mar-2006 BJD void __iomem fixes + * 22-Jun-2006 BJD Added DM9000 platform information + * 20-Sep-2005 BJD Added static to non-exported items */ #include @@ -147,7 +166,7 @@ static struct s3c24xx_uart_clksrc vr1000_serial_clocks[] = { } }; -static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { +static struct s3c2410_uartcfg vr1000_uartcfgs[] = { [0] = { .hwport = 0, .flags = 0, diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c index 7b244566a..4c7ccef6c 100644 --- a/arch/arm/mach-s3c2410/pm-simtec.c +++ b/arch/arm/mach-s3c2410/pm-simtec.c @@ -48,8 +48,7 @@ static __init int pm_simtec_init(void) /* check which machine we are running on */ - if (!machine_is_bast() && !machine_is_vr1000() && - !machine_is_anubis() && !machine_is_osiris()) + if (!machine_is_bast() && !machine_is_vr1000() && !machine_is_anubis()) return 0; printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n"); diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index a589fe76d..fe57d966a 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c @@ -29,6 +29,7 @@ * 10-Mar-2005 LCVR Changed S3C2410_VA_UART to S3C24XX_VA_UART */ +#include #include #include #include @@ -57,11 +58,7 @@ unsigned long s3c_pm_flags; /* cache functions from arch/arm/mm/proc-arm920.S */ -#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH extern void arm920_flush_kern_cache_all(void); -#else -static void arm920_flush_kern_cache_all(void) { } -#endif #define PFX "s3c24xx-pm: " diff --git a/arch/arm/mach-s3c2410/s3c2400-gpio.c b/arch/arm/mach-s3c2410/s3c2400-gpio.c index f2a78175a..5127f39fa 100644 --- a/arch/arm/mach-s3c2410/s3c2400-gpio.c +++ b/arch/arm/mach-s3c2410/s3c2400-gpio.c @@ -17,7 +17,10 @@ * 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 -*/ + * + * Changelog + * 15-Jan-2006 LCVR Splitted from gpio.c, adding support for the S3C2400 + */ #include #include diff --git a/arch/arm/mach-s3c2410/s3c2410-clock.c b/arch/arm/mach-s3c2410/s3c2410-clock.c deleted file mode 100644 index 997186633..000000000 --- a/arch/arm/mach-s3c2410/s3c2410-clock.c +++ /dev/null @@ -1,271 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/clock.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * S3C2410,S3C2440,S3C2442 Clock control support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "clock.h" -#include "cpu.h" - -int s3c2410_clkcon_enable(struct clk *clk, int enable) -{ - unsigned int clocks = clk->ctrlbit; - unsigned long clkcon; - - clkcon = __raw_readl(S3C2410_CLKCON); - - if (enable) - clkcon |= clocks; - else - clkcon &= ~clocks; - - /* ensure none of the special function bits set */ - clkcon &= ~(S3C2410_CLKCON_IDLE|S3C2410_CLKCON_POWER); - - __raw_writel(clkcon, S3C2410_CLKCON); - - return 0; -} - -static int s3c2410_upll_enable(struct clk *clk, int enable) -{ - unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); - unsigned long orig = clkslow; - - if (enable) - clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF; - else - clkslow |= S3C2410_CLKSLOW_UCLK_OFF; - - __raw_writel(clkslow, S3C2410_CLKSLOW); - - /* if we started the UPLL, then allow to settle */ - - if (enable && (orig & S3C2410_CLKSLOW_UCLK_OFF)) - udelay(200); - - return 0; -} - -/* standard clock definitions */ - -static struct clk init_clocks_disable[] = { - { - .name = "nand", - .id = -1, - .parent = &clk_h, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_NAND, - }, { - .name = "sdi", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_SDI, - }, { - .name = "adc", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_ADC, - }, { - .name = "i2c", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_IIC, - }, { - .name = "iis", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_IIS, - }, { - .name = "spi", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_SPI, - } -}; - -static struct clk init_clocks[] = { - { - .name = "lcd", - .id = -1, - .parent = &clk_h, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_LCDC, - }, { - .name = "gpio", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_GPIO, - }, { - .name = "usb-host", - .id = -1, - .parent = &clk_h, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_USBH, - }, { - .name = "usb-device", - .id = -1, - .parent = &clk_h, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_USBD, - }, { - .name = "timers", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_PWMT, - }, { - .name = "uart", - .id = 0, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_UART0, - }, { - .name = "uart", - .id = 1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_UART1, - }, { - .name = "uart", - .id = 2, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_UART2, - }, { - .name = "rtc", - .id = -1, - .parent = &clk_p, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2410_CLKCON_RTC, - }, { - .name = "watchdog", - .id = -1, - .parent = &clk_p, - .ctrlbit = 0, - }, { - .name = "usb-bus-host", - .id = -1, - .parent = &clk_usb_bus, - }, { - .name = "usb-bus-gadget", - .id = -1, - .parent = &clk_usb_bus, - }, -}; - -/* s3c2410_baseclk_add() - * - * Add all the clocks used by the s3c2410 or compatible CPUs - * such as the S3C2440 and S3C2442. - * - * We cannot use a system device as we are needed before any - * of the init-calls that initialise the devices are actually - * done. -*/ - -int __init s3c2410_baseclk_add(void) -{ - unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); - unsigned long clkcon = __raw_readl(S3C2410_CLKCON); - struct clk *clkp; - struct clk *xtal; - int ret; - int ptr; - - clk_upll.enable = s3c2410_upll_enable; - - if (s3c24xx_register_clock(&clk_usb_bus) < 0) - printk(KERN_ERR "failed to register usb bus clock\n"); - - /* register clocks from clock array */ - - clkp = init_clocks; - for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { - /* ensure that we note the clock state */ - - clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0; - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - } - - /* We must be careful disabling the clocks we are not intending to - * be using at boot time, as subsytems such as the LCD which do - * their own DMA requests to the bus can cause the system to lockup - * if they where in the middle of requesting bus access. - * - * Disabling the LCD clock if the LCD is active is very dangerous, - * and therefore the bootloader should be careful to not enable - * the LCD clock if it is not needed. - */ - - /* install (and disable) the clocks we do not need immediately */ - - clkp = init_clocks_disable; - for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - - s3c2410_clkcon_enable(clkp, 0); - } - - /* show the clock-slow value */ - - xtal = clk_get(NULL, "xtal"); - - printk("CLOCK: Slow mode (%ld.%ld MHz), %s, MPLL %s, UPLL %s\n", - print_mhz(clk_get_rate(xtal) / - ( 2 * S3C2410_CLKSLOW_GET_SLOWVAL(clkslow))), - (clkslow & S3C2410_CLKSLOW_SLOW) ? "slow" : "fast", - (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", - (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); - - return 0; -} diff --git a/arch/arm/mach-s3c2410/s3c2410-gpio.c b/arch/arm/mach-s3c2410/s3c2410-gpio.c index 471a71490..d5e1caea1 100644 --- a/arch/arm/mach-s3c2410/s3c2410-gpio.c +++ b/arch/arm/mach-s3c2410/s3c2410-gpio.c @@ -18,6 +18,9 @@ * 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 + * + * Changelog + * 15-Jan-2006 LCVR Splitted from gpio.c */ #include @@ -35,7 +38,7 @@ int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, unsigned int config) { - void __iomem *reg = S3C24XX_EINFLT0; + void __iomem *reg = S3C2410_EINFLT0; unsigned long flags; unsigned long val; @@ -44,7 +47,7 @@ int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, config &= 0xff; - pin -= S3C2410_GPG8; + pin -= S3C2410_GPG8_EINT16; reg += pin & ~3; local_irq_save(flags); @@ -58,10 +61,10 @@ int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, /* update filter enable */ - val = __raw_readl(S3C24XX_EXTINT2); + val = __raw_readl(S3C2410_EXTINT2); val &= ~(1 << ((pin * 4) + 3)); val |= on << ((pin * 4) + 3); - __raw_writel(val, S3C24XX_EXTINT2); + __raw_writel(val, S3C2410_EXTINT2); local_irq_restore(flags); @@ -72,7 +75,7 @@ EXPORT_SYMBOL(s3c2410_gpio_irqfilter); int s3c2410_gpio_getirq(unsigned int pin) { - if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15) + if (pin < S3C2410_GPF0 || pin > S3C2410_GPG15_EINT23) return -1; /* not valid interrupts */ if (pin < S3C2410_GPG0 && pin > S3C2410_GPF7) diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index a110cff9c..0a2013a76 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -43,7 +42,6 @@ #include "s3c2410.h" #include "cpu.h" -#include "devs.h" #include "clock.h" /* Initial IO mappings */ @@ -57,13 +55,93 @@ static struct map_desc s3c2410_iodesc[] __initdata = { IODESC_ENT(WATCHDOG), }; +static struct resource s3c_uart0_resource[] = { + [0] = { + .start = S3C2410_PA_UART0, + .end = S3C2410_PA_UART0 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX0, + .end = IRQ_S3CUART_ERR0, + .flags = IORESOURCE_IRQ, + } + +}; + +static struct resource s3c_uart1_resource[] = { + [0] = { + .start = S3C2410_PA_UART1, + .end = S3C2410_PA_UART1 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX1, + .end = IRQ_S3CUART_ERR1, + .flags = IORESOURCE_IRQ, + } +}; + +static struct resource s3c_uart2_resource[] = { + [0] = { + .start = S3C2410_PA_UART2, + .end = S3C2410_PA_UART2 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX2, + .end = IRQ_S3CUART_ERR2, + .flags = IORESOURCE_IRQ, + } +}; + /* our uart devices */ +static struct platform_device s3c_uart0 = { + .name = "s3c2410-uart", + .id = 0, + .num_resources = ARRAY_SIZE(s3c_uart0_resource), + .resource = s3c_uart0_resource, +}; + + +static struct platform_device s3c_uart1 = { + .name = "s3c2410-uart", + .id = 1, + .num_resources = ARRAY_SIZE(s3c_uart1_resource), + .resource = s3c_uart1_resource, +}; + +static struct platform_device s3c_uart2 = { + .name = "s3c2410-uart", + .id = 2, + .num_resources = ARRAY_SIZE(s3c_uart2_resource), + .resource = s3c_uart2_resource, +}; + +static struct platform_device *uart_devices[] __initdata = { + &s3c_uart0, + &s3c_uart1, + &s3c_uart2 +}; + +static int s3c2410_uart_count = 0; + /* uart registration process */ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no) { - s3c24xx_init_uartdevs("s3c2410-uart", s3c2410_uart_resources, cfg, no); + struct platform_device *platdev; + int uart; + + for (uart = 0; uart < no; uart++, cfg++) { + platdev = uart_devices[cfg->hwport]; + + s3c24xx_uart_devs[uart] = platdev; + platdev->dev.platform_data = cfg; + } + + s3c2410_uart_count = uart; } /* s3c2410_map_io @@ -109,33 +187,11 @@ void __init s3c2410_init_clocks(int xtal) */ s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); - s3c2410_baseclk_add(); } -struct sysdev_class s3c2410_sysclass = { - set_kset_name("s3c2410-core"), -}; - -static struct sys_device s3c2410_sysdev = { - .cls = &s3c2410_sysclass, -}; - -/* need to register class before we actually register the device, and - * we also need to ensure that it has been initialised before any of the - * drivers even try to use it (even if not on an s3c2440 based system) - * as a driver which may support both 2410 and 2440 may try and use it. -*/ - -static int __init s3c2410_core_init(void) -{ - return sysdev_class_register(&s3c2410_sysclass); -} - -core_initcall(s3c2410_core_init); - int __init s3c2410_init(void) { printk("S3C2410: Initialising architecture\n"); - return sysdev_register(&s3c2410_sysdev); + return platform_add_devices(s3c24xx_uart_devs, s3c2410_uart_count); } diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h index fbed084f2..4d5312a48 100644 --- a/arch/arm/mach-s3c2410/s3c2410.h +++ b/arch/arm/mach-s3c2410/s3c2410.h @@ -9,6 +9,14 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * + * Modifications: + * 18-Aug-2004 BJD Created initial version + * 20-Aug-2004 BJD Added s3c2410_board struct + * 04-Sep-2004 BJD Added s3c2410_init_uarts() call + * 17-Oct-2004 BJD Moved board out to cpu + * 04-Jan-2005 BJD Changed uart init + * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here + * 14-Jan-2005 BJD Added s3c2410_init_clocks call */ #ifdef CONFIG_CPU_S3C2410 @@ -21,8 +29,6 @@ extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c2410_init_clocks(int xtal); -extern int s3c2410_baseclk_add(void); - #else #define s3c2410_init_clocks NULL #define s3c2410_init_uarts NULL diff --git a/arch/arm/mach-s3c2410/s3c2412-clock.c b/arch/arm/mach-s3c2410/s3c2412-clock.c deleted file mode 100644 index c95ed3e18..000000000 --- a/arch/arm/mach-s3c2410/s3c2412-clock.c +++ /dev/null @@ -1,711 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c2412-clock.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * S3C2412,S3C2413 Clock control support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "clock.h" -#include "cpu.h" - -/* We currently have to assume that the system is running - * from the XTPll input, and that all ***REFCLKs are being - * fed from it, as we cannot read the state of OM[4] from - * software. - * - * It would be possible for each board initialisation to - * set the correct muxing at initialisation -*/ - -int s3c2412_clkcon_enable(struct clk *clk, int enable) -{ - unsigned int clocks = clk->ctrlbit; - unsigned long clkcon; - - clkcon = __raw_readl(S3C2410_CLKCON); - - if (enable) - clkcon |= clocks; - else - clkcon &= ~clocks; - - __raw_writel(clkcon, S3C2410_CLKCON); - - return 0; -} - -static int s3c2412_upll_enable(struct clk *clk, int enable) -{ - unsigned long upllcon = __raw_readl(S3C2410_UPLLCON); - unsigned long orig = upllcon; - - if (!enable) - upllcon |= S3C2412_PLLCON_OFF; - else - upllcon &= ~S3C2412_PLLCON_OFF; - - __raw_writel(upllcon, S3C2410_UPLLCON); - - /* allow ~150uS for the PLL to settle and lock */ - - if (enable && (orig & S3C2412_PLLCON_OFF)) - udelay(150); - - return 0; -} - -/* clock selections */ - -/* CPU EXTCLK input */ -static struct clk clk_ext = { - .name = "extclk", - .id = -1, -}; - -static struct clk clk_erefclk = { - .name = "erefclk", - .id = -1, -}; - -static struct clk clk_urefclk = { - .name = "urefclk", - .id = -1, -}; - -static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_urefclk) - clksrc &= ~S3C2412_CLKSRC_USYSCLK_UPLL; - else if (parent == &clk_upll) - clksrc |= S3C2412_CLKSRC_USYSCLK_UPLL; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} - -static struct clk clk_usysclk = { - .name = "usysclk", - .id = -1, - .parent = &clk_xtal, - .set_parent = s3c2412_setparent_usysclk, -}; - -static struct clk clk_mrefclk = { - .name = "mrefclk", - .parent = &clk_xtal, - .id = -1, -}; - -static struct clk clk_mdivclk = { - .name = "mdivclk", - .parent = &clk_xtal, - .id = -1, -}; - -static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_usysclk) - clksrc &= ~S3C2412_CLKSRC_USBCLK_HCLK; - else if (parent == &clk_h) - clksrc |= S3C2412_CLKSRC_USBCLK_HCLK; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} - -static unsigned long s3c2412_roundrate_usbsrc(struct clk *clk, - unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - int div; - - if (rate > parent_rate) - return parent_rate; - - div = parent_rate / rate; - if (div > 2) - div = 2; - - return parent_rate / div; -} - -static unsigned long s3c2412_getrate_usbsrc(struct clk *clk) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long div = __raw_readl(S3C2410_CLKDIVN); - - return parent_rate / ((div & S3C2412_CLKDIVN_USB48DIV) ? 2 : 1); -} - -static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN); - - rate = s3c2412_roundrate_usbsrc(clk, rate); - - if ((parent_rate / rate) == 2) - clkdivn |= S3C2412_CLKDIVN_USB48DIV; - else - clkdivn &= ~S3C2412_CLKDIVN_USB48DIV; - - __raw_writel(clkdivn, S3C2410_CLKDIVN); - return 0; -} - -static struct clk clk_usbsrc = { - .name = "usbsrc", - .id = -1, - .get_rate = s3c2412_getrate_usbsrc, - .set_rate = s3c2412_setrate_usbsrc, - .round_rate = s3c2412_roundrate_usbsrc, - .set_parent = s3c2412_setparent_usbsrc, -}; - -static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_mdivclk) - clksrc &= ~S3C2412_CLKSRC_MSYSCLK_MPLL; - else if (parent == &clk_upll) - clksrc |= S3C2412_CLKSRC_MSYSCLK_MPLL; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} - -static struct clk clk_msysclk = { - .name = "msysclk", - .id = -1, - .set_parent = s3c2412_setparent_msysclk, -}; - -/* these next clocks have an divider immediately after them, - * so we can register them with their divider and leave out the - * intermediate clock stage -*/ -static unsigned long s3c2412_roundrate_clksrc(struct clk *clk, - unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - int div; - - if (rate > parent_rate) - return parent_rate; - - /* note, we remove the +/- 1 calculations as they cancel out */ - - div = (rate / parent_rate); - - if (div < 1) - div = 1; - else if (div > 16) - div = 16; - - return parent_rate / div; -} - -static int s3c2412_setparent_uart(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_erefclk) - clksrc &= ~S3C2412_CLKSRC_UARTCLK_MPLL; - else if (parent == &clk_mpll) - clksrc |= S3C2412_CLKSRC_UARTCLK_MPLL; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} - -static unsigned long s3c2412_getrate_uart(struct clk *clk) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long div = __raw_readl(S3C2410_CLKDIVN); - - div &= S3C2412_CLKDIVN_UARTDIV_MASK; - div >>= S3C2412_CLKDIVN_UARTDIV_SHIFT; - - return parent_rate / (div + 1); -} - -static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN); - - rate = s3c2412_roundrate_clksrc(clk, rate); - - clkdivn &= ~S3C2412_CLKDIVN_UARTDIV_MASK; - clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_UARTDIV_SHIFT; - - __raw_writel(clkdivn, S3C2410_CLKDIVN); - return 0; -} - -static struct clk clk_uart = { - .name = "uartclk", - .id = -1, - .get_rate = s3c2412_getrate_uart, - .set_rate = s3c2412_setrate_uart, - .set_parent = s3c2412_setparent_uart, - .round_rate = s3c2412_roundrate_clksrc, -}; - -static int s3c2412_setparent_i2s(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_erefclk) - clksrc &= ~S3C2412_CLKSRC_I2SCLK_MPLL; - else if (parent == &clk_mpll) - clksrc |= S3C2412_CLKSRC_I2SCLK_MPLL; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} - -static unsigned long s3c2412_getrate_i2s(struct clk *clk) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long div = __raw_readl(S3C2410_CLKDIVN); - - div &= S3C2412_CLKDIVN_I2SDIV_MASK; - div >>= S3C2412_CLKDIVN_I2SDIV_SHIFT; - - return parent_rate / (div + 1); -} - -static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN); - - rate = s3c2412_roundrate_clksrc(clk, rate); - - clkdivn &= ~S3C2412_CLKDIVN_I2SDIV_MASK; - clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_I2SDIV_SHIFT; - - __raw_writel(clkdivn, S3C2410_CLKDIVN); - return 0; -} - -static struct clk clk_i2s = { - .name = "i2sclk", - .id = -1, - .get_rate = s3c2412_getrate_i2s, - .set_rate = s3c2412_setrate_i2s, - .set_parent = s3c2412_setparent_i2s, - .round_rate = s3c2412_roundrate_clksrc, -}; - -static int s3c2412_setparent_cam(struct clk *clk, struct clk *parent) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - - if (parent == &clk_usysclk) - clksrc &= ~S3C2412_CLKSRC_CAMCLK_HCLK; - else if (parent == &clk_h) - clksrc |= S3C2412_CLKSRC_CAMCLK_HCLK; - else - return -EINVAL; - - clk->parent = parent; - - __raw_writel(clksrc, S3C2412_CLKSRC); - return 0; -} -static unsigned long s3c2412_getrate_cam(struct clk *clk) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long div = __raw_readl(S3C2410_CLKDIVN); - - div &= S3C2412_CLKDIVN_CAMDIV_MASK; - div >>= S3C2412_CLKDIVN_CAMDIV_SHIFT; - - return parent_rate / (div + 1); -} - -static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long clkdivn = __raw_readl(S3C2410_CLKDIVN); - - rate = s3c2412_roundrate_clksrc(clk, rate); - - clkdivn &= ~S3C2412_CLKDIVN_CAMDIV_MASK; - clkdivn |= ((parent_rate / rate) - 1) << S3C2412_CLKDIVN_CAMDIV_SHIFT; - - __raw_writel(clkdivn, S3C2410_CLKDIVN); - return 0; -} - -static struct clk clk_cam = { - .name = "camif-upll", /* same as 2440 name */ - .id = -1, - .get_rate = s3c2412_getrate_cam, - .set_rate = s3c2412_setrate_cam, - .set_parent = s3c2412_setparent_cam, - .round_rate = s3c2412_roundrate_clksrc, -}; - -/* standard clock definitions */ - -static struct clk init_clocks_disable[] = { - { - .name = "nand", - .id = -1, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_NAND, - }, { - .name = "sdi", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_SDI, - }, { - .name = "adc", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_ADC, - }, { - .name = "i2c", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_IIC, - }, { - .name = "iis", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_IIS, - }, { - .name = "spi", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_SPI, - } -}; - -static struct clk init_clocks[] = { - { - .name = "dma", - .id = 0, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_DMA0, - }, { - .name = "dma", - .id = 1, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_DMA1, - }, { - .name = "dma", - .id = 2, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_DMA2, - }, { - .name = "dma", - .id = 3, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_DMA3, - }, { - .name = "lcd", - .id = -1, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_LCDC, - }, { - .name = "gpio", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_GPIO, - }, { - .name = "usb-host", - .id = -1, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_USBH, - }, { - .name = "usb-device", - .id = -1, - .parent = &clk_h, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_USBD, - }, { - .name = "timers", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_PWMT, - }, { - .name = "uart", - .id = 0, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_UART0, - }, { - .name = "uart", - .id = 1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_UART1, - }, { - .name = "uart", - .id = 2, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_UART2, - }, { - .name = "rtc", - .id = -1, - .parent = &clk_p, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_RTC, - }, { - .name = "watchdog", - .id = -1, - .parent = &clk_p, - .ctrlbit = 0, - }, { - .name = "usb-bus-gadget", - .id = -1, - .parent = &clk_usb_bus, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_USB_DEV48, - }, { - .name = "usb-bus-host", - .id = -1, - .parent = &clk_usb_bus, - .enable = s3c2412_clkcon_enable, - .ctrlbit = S3C2412_CLKCON_USB_HOST48, - } -}; - -/* clocks to add where we need to check their parentage */ - -struct clk_init { - struct clk *clk; - unsigned int bit; - struct clk *src_0; - struct clk *src_1; -}; - -struct clk_init clks_src[] __initdata = { - { - .clk = &clk_usysclk, - .bit = S3C2412_CLKSRC_USBCLK_HCLK, - .src_0 = &clk_urefclk, - .src_1 = &clk_upll, - }, { - .clk = &clk_i2s, - .bit = S3C2412_CLKSRC_I2SCLK_MPLL, - .src_0 = &clk_erefclk, - .src_1 = &clk_mpll, - }, { - .clk = &clk_cam, - .bit = S3C2412_CLKSRC_CAMCLK_HCLK, - .src_0 = &clk_usysclk, - .src_1 = &clk_h, - }, { - .clk = &clk_msysclk, - .bit = S3C2412_CLKSRC_MSYSCLK_MPLL, - .src_0 = &clk_mdivclk, - .src_1 = &clk_mpll, - }, { - .clk = &clk_uart, - .bit = S3C2412_CLKSRC_UARTCLK_MPLL, - .src_0 = &clk_erefclk, - .src_1 = &clk_mpll, - }, { - .clk = &clk_usbsrc, - .bit = S3C2412_CLKSRC_USBCLK_HCLK, - .src_0 = &clk_usysclk, - .src_1 = &clk_h, - }, -}; - -/* s3c2412_clk_initparents - * - * Initialise the parents for the clocks that we get at start-time -*/ - -static void __init s3c2412_clk_initparents(void) -{ - unsigned long clksrc = __raw_readl(S3C2412_CLKSRC); - struct clk_init *cip = clks_src; - struct clk *src; - int ptr; - int ret; - - for (ptr = 0; ptr < ARRAY_SIZE(clks_src); ptr++, cip++) { - ret = s3c24xx_register_clock(cip->clk); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - cip->clk->name, ret); - } - - src = (clksrc & cip->bit) ? cip->src_1 : cip->src_0; - - printk(KERN_INFO "%s: parent %s\n", cip->clk->name, src->name); - clk_set_parent(cip->clk, src); - } -} - -/* clocks to add straight away */ - -struct clk *clks[] __initdata = { - &clk_ext, - &clk_usb_bus, - &clk_erefclk, - &clk_urefclk, - &clk_mrefclk, -}; - -int __init s3c2412_baseclk_add(void) -{ - unsigned long clkcon = __raw_readl(S3C2410_CLKCON); - struct clk *clkp; - int ret; - int ptr; - - clk_upll.enable = s3c2412_upll_enable; - clk_usb_bus.parent = &clk_usbsrc; - clk_usb_bus.rate = 0x0; - - s3c2412_clk_initparents(); - - for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) { - clkp = clks[ptr]; - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - } - - /* ensure usb bus clock is within correct rate of 48MHz */ - - if (clk_get_rate(&clk_usb_bus) != (48 * 1000 * 1000)) { - printk(KERN_INFO "Warning: USB bus clock not at 48MHz\n"); - - /* for the moment, let's use the UPLL, and see if we can - * get 48MHz */ - - clk_set_parent(&clk_usysclk, &clk_upll); - clk_set_parent(&clk_usbsrc, &clk_usysclk); - clk_set_rate(&clk_usbsrc, 48*1000*1000); - } - - printk("S3C2412: upll %s, %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n", - (__raw_readl(S3C2410_UPLLCON) & S3C2412_PLLCON_OFF) ? "off":"on", - print_mhz(clk_get_rate(&clk_upll)), - print_mhz(clk_get_rate(&clk_usb_bus))); - - /* register clocks from clock array */ - - clkp = init_clocks; - for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { - /* ensure that we note the clock state */ - - clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0; - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - } - - /* We must be careful disabling the clocks we are not intending to - * be using at boot time, as subsytems such as the LCD which do - * their own DMA requests to the bus can cause the system to lockup - * if they where in the middle of requesting bus access. - * - * Disabling the LCD clock if the LCD is active is very dangerous, - * and therefore the bootloader should be careful to not enable - * the LCD clock if it is not needed. - */ - - /* install (and disable) the clocks we do not need immediately */ - - clkp = init_clocks_disable; - for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - - s3c2412_clkcon_enable(clkp, 0); - } - - return 0; -} diff --git a/arch/arm/mach-s3c2410/s3c2412-irq.c b/arch/arm/mach-s3c2410/s3c2412-irq.c deleted file mode 100644 index c80ec93df..000000000 --- a/arch/arm/mach-s3c2410/s3c2412-irq.c +++ /dev/null @@ -1,130 +0,0 @@ -/* linux/arch/arm/mach-s3c2412/s3c2412-irq.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include "cpu.h" -#include "irq.h" - -/* the s3c2412 changes the behaviour of IRQ_EINT0 through IRQ_EINT3 by - * having them turn up in both the INT* and the EINT* registers. Whilst - * both show the status, they both now need to be acked when the IRQs - * go off. -*/ - -static void -s3c2412_irq_mask(unsigned int irqno) -{ - unsigned long bitval = 1UL << (irqno - IRQ_EINT0); - unsigned long mask; - - mask = __raw_readl(S3C2410_INTMSK); - __raw_writel(mask | bitval, S3C2410_INTMSK); - - mask = __raw_readl(S3C2412_EINTMASK); - __raw_writel(mask | bitval, S3C2412_EINTMASK); -} - -static inline void -s3c2412_irq_ack(unsigned int irqno) -{ - unsigned long bitval = 1UL << (irqno - IRQ_EINT0); - - __raw_writel(bitval, S3C2412_EINTPEND); - __raw_writel(bitval, S3C2410_SRCPND); - __raw_writel(bitval, S3C2410_INTPND); -} - -static inline void -s3c2412_irq_maskack(unsigned int irqno) -{ - unsigned long bitval = 1UL << (irqno - IRQ_EINT0); - unsigned long mask; - - mask = __raw_readl(S3C2410_INTMSK); - __raw_writel(mask|bitval, S3C2410_INTMSK); - - mask = __raw_readl(S3C2412_EINTMASK); - __raw_writel(mask | bitval, S3C2412_EINTMASK); - - __raw_writel(bitval, S3C2412_EINTPEND); - __raw_writel(bitval, S3C2410_SRCPND); - __raw_writel(bitval, S3C2410_INTPND); -} - -static void -s3c2412_irq_unmask(unsigned int irqno) -{ - unsigned long bitval = 1UL << (irqno - IRQ_EINT0); - unsigned long mask; - - mask = __raw_readl(S3C2412_EINTMASK); - __raw_writel(mask & ~bitval, S3C2412_EINTMASK); - - mask = __raw_readl(S3C2410_INTMSK); - __raw_writel(mask & ~bitval, S3C2410_INTMSK); -} - -static struct irqchip s3c2412_irq_eint0t4 = { - .ack = s3c2412_irq_ack, - .mask = s3c2412_irq_mask, - .unmask = s3c2412_irq_unmask, - .set_wake = s3c_irq_wake, - .set_type = s3c_irqext_type, -}; - -static int s3c2412_irq_add(struct sys_device *sysdev) -{ - unsigned int irqno; - - for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) { - set_irq_chip(irqno, &s3c2412_irq_eint0t4); - set_irq_handler(irqno, do_edge_IRQ); - set_irq_flags(irqno, IRQF_VALID); - } - - return 0; -} - -static struct sysdev_driver s3c2412_irq_driver = { - .add = s3c2412_irq_add, -}; - -static int s3c2412_irq_init(void) -{ - return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver); -} - -arch_initcall(s3c2412_irq_init); diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c deleted file mode 100644 index 2d163f760..000000000 --- a/arch/arm/mach-s3c2410/s3c2412.c +++ /dev/null @@ -1,224 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c2412.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * http://armlinux.simtec.co.uk/. - * - * 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. - * - * Modifications: - * 16-May-2003 BJD Created initial version - * 16-Aug-2003 BJD Fixed header files and copyright, added URL - * 05-Sep-2003 BJD Moved to kernel v2.6 - * 18-Jan-2004 BJD Added serial port configuration - * 21-Aug-2004 BJD Added new struct s3c2410_board handler - * 28-Sep-2004 BJD Updates for new serial port bits - * 04-Nov-2004 BJD Updated UART configuration process - * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate - * 13-Aug-2005 DA Removed UART from initial I/O mappings -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include "s3c2412.h" -#include "cpu.h" -#include "devs.h" -#include "clock.h" -#include "pm.h" - -#ifndef CONFIG_CPU_S3C2412_ONLY -void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; -#endif - -/* Initial IO mappings */ - -static struct map_desc s3c2412_iodesc[] __initdata = { - IODESC_ENT(CLKPWR), - IODESC_ENT(LCD), - IODESC_ENT(TIMER), - IODESC_ENT(ADC), - IODESC_ENT(WATCHDOG), -}; - -/* uart registration process */ - -void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no) -{ - s3c24xx_init_uartdevs("s3c2412-uart", s3c2410_uart_resources, cfg, no); - - /* rename devices that are s3c2412/s3c2413 specific */ - s3c_device_sdi.name = "s3c2412-sdi"; - s3c_device_nand.name = "s3c2412-nand"; -} - -/* s3c2412_idle - * - * use the standard idle call by ensuring the idle mode - * in power config, then issuing the idle co-processor - * instruction -*/ - -static void s3c2412_idle(void) -{ - unsigned long tmp; - - /* ensure our idle mode is to go to idle */ - - tmp = __raw_readl(S3C2412_PWRCFG); - tmp &= ~S3C2412_PWRCFG_STANDBYWFI_MASK; - tmp |= S3C2412_PWRCFG_STANDBYWFI_IDLE; - __raw_writel(tmp, S3C2412_PWRCFG); - - cpu_do_idle(); -} - -/* s3c2412_map_io - * - * register the standard cpu IO areas, and any passed in from the - * machine specific initialisation. -*/ - -void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) -{ - /* move base of IO */ - - s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; - - /* set our idle function */ - - s3c24xx_idle = s3c2412_idle; - - /* register our io-tables */ - - iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); - iotable_init(mach_desc, mach_size); -} - -void __init s3c2412_init_clocks(int xtal) -{ - unsigned long tmp; - unsigned long fclk; - unsigned long hclk; - unsigned long pclk; - - /* now we've got our machine bits initialised, work out what - * clocks we've got */ - - fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2); - - tmp = __raw_readl(S3C2410_CLKDIVN); - - /* work out clock scalings */ - - hclk = fclk / ((tmp & S3C2412_CLKDIVN_HDIVN_MASK) + 1); - hclk /= ((tmp & S3C2421_CLKDIVN_ARMDIVN) ? 2 : 1); - pclk = hclk / ((tmp & S3C2412_CLKDIVN_PDIVN) ? 2 : 1); - - /* print brieft summary of clocks, etc */ - - printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); - - /* initialise the clocks here, to allow other things like the - * console to use them - */ - - s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); - s3c2412_baseclk_add(); -} - -/* need to register class before we actually register the device, and - * we also need to ensure that it has been initialised before any of the - * drivers even try to use it (even if not on an s3c2412 based system) - * as a driver which may support both 2410 and 2440 may try and use it. -*/ - -#ifdef CONFIG_PM -static struct sleep_save s3c2412_sleep[] = { - SAVE_ITEM(S3C2412_DSC0), - SAVE_ITEM(S3C2412_DSC1), - SAVE_ITEM(S3C2413_GPJDAT), - SAVE_ITEM(S3C2413_GPJCON), - SAVE_ITEM(S3C2413_GPJUP), - - /* save the sleep configuration anyway, just in case these - * get damaged during wakeup */ - - SAVE_ITEM(S3C2412_GPBSLPCON), - SAVE_ITEM(S3C2412_GPCSLPCON), - SAVE_ITEM(S3C2412_GPDSLPCON), - SAVE_ITEM(S3C2412_GPESLPCON), - SAVE_ITEM(S3C2412_GPFSLPCON), - SAVE_ITEM(S3C2412_GPGSLPCON), - SAVE_ITEM(S3C2412_GPHSLPCON), - SAVE_ITEM(S3C2413_GPJSLPCON), -}; - -static int s3c2412_suspend(struct sys_device *dev, pm_message_t state) -{ - s3c2410_pm_do_save(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); - return 0; -} - -static int s3c2412_resume(struct sys_device *dev) -{ - s3c2410_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep)); - return 0; -} - -#else -#define s3c2412_suspend NULL -#define s3c2412_resume NULL -#endif - -struct sysdev_class s3c2412_sysclass = { - set_kset_name("s3c2412-core"), - .suspend = s3c2412_suspend, - .resume = s3c2412_resume -}; - -static int __init s3c2412_core_init(void) -{ - return sysdev_class_register(&s3c2412_sysclass); -} - -core_initcall(s3c2412_core_init); - -static struct sys_device s3c2412_sysdev = { - .cls = &s3c2412_sysclass, -}; - -int __init s3c2412_init(void) -{ - printk("S3C2412: Initialising architecture\n"); - - return sysdev_register(&s3c2412_sysdev); -} diff --git a/arch/arm/mach-s3c2410/s3c2412.h b/arch/arm/mach-s3c2410/s3c2412.h deleted file mode 100644 index c6e56032a..000000000 --- a/arch/arm/mach-s3c2410/s3c2412.h +++ /dev/null @@ -1,29 +0,0 @@ -/* arch/arm/mach-s3c2410/s3c2412.h - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * Header file for s3c2412 cpu support - * - * 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. -*/ - -#ifdef CONFIG_CPU_S3C2412 - -extern int s3c2412_init(void); - -extern void s3c2412_map_io(struct map_desc *mach_desc, int size); - -extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c2412_init_clocks(int xtal); - -extern int s3c2412_baseclk_add(void); -#else -#define s3c2412_init_clocks NULL -#define s3c2412_init_uarts NULL -#define s3c2412_map_io NULL -#define s3c2412_init NULL -#endif diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c index 15796864d..d7a30ed6c 100644 --- a/arch/arm/mach-s3c2410/s3c2440-clock.c +++ b/arch/arm/mach-s3c2410/s3c2440-clock.c @@ -91,7 +91,7 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate) static struct clk s3c2440_clk_cam = { .name = "camif", .id = -1, - .enable = s3c2410_clkcon_enable, + .enable = s3c24xx_clkcon_enable, .ctrlbit = S3C2440_CLKCON_CAMERA, }; @@ -105,7 +105,7 @@ static struct clk s3c2440_clk_cam_upll = { static struct clk s3c2440_clk_ac97 = { .name = "ac97", .id = -1, - .enable = s3c2410_clkcon_enable, + .enable = s3c24xx_clkcon_enable, .ctrlbit = S3C2440_CLKCON_CAMERA, }; diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index 1667ba1fa..278d0044c 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c @@ -17,6 +17,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * Changelog: + * 25-Jul-2005 BJD Split from irq.c + * */ #include @@ -97,12 +100,73 @@ static struct irqchip s3c_irq_wdtac97 = { .ack = s3c_irq_wdtac97_ack, }; +/* camera irq */ + +static void s3c_irq_demux_cam(unsigned int irq, + struct irqdesc *desc, + struct pt_regs *regs) +{ + unsigned int subsrc, submsk; + struct irqdesc *mydesc; + + /* read the current pending interrupts, and the mask + * for what it is available */ + + subsrc = __raw_readl(S3C2410_SUBSRCPND); + submsk = __raw_readl(S3C2410_INTSUBMSK); + + subsrc &= ~submsk; + subsrc >>= 11; + subsrc &= 3; + + if (subsrc != 0) { + if (subsrc & 1) { + mydesc = irq_desc + IRQ_S3C2440_CAM_C; + desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); + } + if (subsrc & 2) { + mydesc = irq_desc + IRQ_S3C2440_CAM_P; + desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); + } + } +} + +#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) + +static void +s3c_irq_cam_mask(unsigned int irqno) +{ + s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); +} + +static void +s3c_irq_cam_unmask(unsigned int irqno) +{ + s3c_irqsub_unmask(irqno, INTMSK_CAM); +} + +static void +s3c_irq_cam_ack(unsigned int irqno) +{ + s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); +} + +static struct irqchip s3c_irq_cam = { + .mask = s3c_irq_cam_mask, + .unmask = s3c_irq_cam_unmask, + .ack = s3c_irq_cam_ack, +}; + static int s3c2440_irq_add(struct sys_device *sysdev) { unsigned int irqno; printk("S3C2440: IRQ Support\n"); + set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip); + set_irq_handler(IRQ_NFCON, do_level_IRQ); + set_irq_flags(IRQ_NFCON, IRQF_VALID); + /* add new chained handler for wdt, ac7 */ set_irq_chip(IRQ_WDT, &s3c_irq_level_chip); @@ -115,6 +179,18 @@ static int s3c2440_irq_add(struct sys_device *sysdev) set_irq_flags(irqno, IRQF_VALID); } + /* add chained handler for camera */ + + set_irq_chip(IRQ_CAM, &s3c_irq_level_chip); + set_irq_handler(IRQ_CAM, do_level_IRQ); + set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam); + + for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { + set_irq_chip(irqno, &s3c_irq_cam); + set_irq_handler(irqno, do_level_IRQ); + set_irq_flags(irqno, IRQF_VALID); + } + return 0; } @@ -122,10 +198,10 @@ static struct sysdev_driver s3c2440_irq_driver = { .add = s3c2440_irq_add, }; -static int s3c2440_irq_init(void) +static int s3c24xx_irq_driver(void) { return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); } -arch_initcall(s3c2440_irq_init); +arch_initcall(s3c24xx_irq_driver); diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c index 0ab50f44f..b7fe6d945 100644 --- a/arch/arm/mach-s3c2410/s3c2440.c +++ b/arch/arm/mach-s3c2410/s3c2440.c @@ -1,6 +1,6 @@ /* linux/arch/arm/mach-s3c2410/s3c2440.c * - * Copyright (c) 2004-2006 Simtec Electronics + * Copyright (c) 2004-2005 Simtec Electronics * Ben Dooks * * Samsung S3C2440 Mobile CPU support @@ -8,6 +8,16 @@ * 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. + * + * Modifications: + * 24-Aug-2004 BJD Start of s3c2440 support + * 12-Oct-2004 BJD Moved clock info out to clock.c + * 01-Nov-2004 BJD Fixed clock build code + * 09-Nov-2004 BJD Added sysdev for power management + * 04-Nov-2004 BJD New serial registration + * 15-Nov-2004 BJD Rename the i2c device for the s3c2440 + * 14-Jan-2005 BJD Moved clock init code into seperate function + * 14-Jan-2005 BJD Removed un-used clock bits */ #include @@ -40,20 +50,234 @@ #include "cpu.h" #include "pm.h" + +static struct map_desc s3c2440_iodesc[] __initdata = { + IODESC_ENT(USBHOST), + IODESC_ENT(CLKPWR), + IODESC_ENT(LCD), + IODESC_ENT(TIMER), + IODESC_ENT(ADC), + IODESC_ENT(WATCHDOG), +}; + +static struct resource s3c_uart0_resource[] = { + [0] = { + .start = S3C2410_PA_UART0, + .end = S3C2410_PA_UART0 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX0, + .end = IRQ_S3CUART_ERR0, + .flags = IORESOURCE_IRQ, + } + +}; + +static struct resource s3c_uart1_resource[] = { + [0] = { + .start = S3C2410_PA_UART1, + .end = S3C2410_PA_UART1 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX1, + .end = IRQ_S3CUART_ERR1, + .flags = IORESOURCE_IRQ, + } +}; + +static struct resource s3c_uart2_resource[] = { + [0] = { + .start = S3C2410_PA_UART2, + .end = S3C2410_PA_UART2 + 0x3fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_S3CUART_RX2, + .end = IRQ_S3CUART_ERR2, + .flags = IORESOURCE_IRQ, + } +}; + +/* our uart devices */ + +static struct platform_device s3c_uart0 = { + .name = "s3c2440-uart", + .id = 0, + .num_resources = ARRAY_SIZE(s3c_uart0_resource), + .resource = s3c_uart0_resource, +}; + +static struct platform_device s3c_uart1 = { + .name = "s3c2440-uart", + .id = 1, + .num_resources = ARRAY_SIZE(s3c_uart1_resource), + .resource = s3c_uart1_resource, +}; + +static struct platform_device s3c_uart2 = { + .name = "s3c2440-uart", + .id = 2, + .num_resources = ARRAY_SIZE(s3c_uart2_resource), + .resource = s3c_uart2_resource, +}; + +static struct platform_device *uart_devices[] __initdata = { + &s3c_uart0, + &s3c_uart1, + &s3c_uart2 +}; + +/* uart initialisation */ + +static int __initdata s3c2440_uart_count; + +void __init s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no) +{ + struct platform_device *platdev; + int uart; + + for (uart = 0; uart < no; uart++, cfg++) { + platdev = uart_devices[cfg->hwport]; + + s3c24xx_uart_devs[uart] = platdev; + platdev->dev.platform_data = cfg; + } + + s3c2440_uart_count = uart; +} + + +#ifdef CONFIG_PM + +static struct sleep_save s3c2440_sleep[] = { + SAVE_ITEM(S3C2440_DSC0), + SAVE_ITEM(S3C2440_DSC1), + SAVE_ITEM(S3C2440_GPJDAT), + SAVE_ITEM(S3C2440_GPJCON), + SAVE_ITEM(S3C2440_GPJUP) +}; + +static int s3c2440_suspend(struct sys_device *dev, pm_message_t state) +{ + s3c2410_pm_do_save(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep)); + return 0; +} + +static int s3c2440_resume(struct sys_device *dev) +{ + s3c2410_pm_do_restore(s3c2440_sleep, ARRAY_SIZE(s3c2440_sleep)); + return 0; +} + +#else +#define s3c2440_suspend NULL +#define s3c2440_resume NULL +#endif + +struct sysdev_class s3c2440_sysclass = { + set_kset_name("s3c2440-core"), + .suspend = s3c2440_suspend, + .resume = s3c2440_resume +}; + static struct sys_device s3c2440_sysdev = { .cls = &s3c2440_sysclass, }; -int __init s3c2440_init(void) +void __init s3c2440_map_io(struct map_desc *mach_desc, int size) { - printk("S3C2440: Initialising architecture\n"); + /* register our io-tables */ + + iotable_init(s3c2440_iodesc, ARRAY_SIZE(s3c2440_iodesc)); + iotable_init(mach_desc, size); + + /* rename any peripherals used differing from the s3c2410 */ + + s3c_device_i2c.name = "s3c2440-i2c"; + s3c_device_nand.name = "s3c2440-nand"; /* change irq for watchdog */ s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; s3c_device_wdt.resource[1].end = IRQ_S3C2440_WDT; +} + +void __init s3c2440_init_clocks(int xtal) +{ + unsigned long clkdiv; + unsigned long camdiv; + unsigned long hclk, fclk, pclk; + int hdiv = 1; + + /* now we've got our machine bits initialised, work out what + * clocks we've got */ + + fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; + + clkdiv = __raw_readl(S3C2410_CLKDIVN); + camdiv = __raw_readl(S3C2440_CAMDIVN); + + /* work out clock scalings */ + + switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK) { + case S3C2440_CLKDIVN_HDIVN_1: + hdiv = 1; + break; + + case S3C2440_CLKDIVN_HDIVN_2: + hdiv = 2; + break; + + case S3C2440_CLKDIVN_HDIVN_4_8: + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; + break; + + case S3C2440_CLKDIVN_HDIVN_3_6: + hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; + break; + } + + hclk = fclk / hdiv; + pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); + + /* print brief summary of clocks, etc */ + + printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", + print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); + + /* initialise the clocks here, to allow other things like the + * console to use them, and to add new ones after the initialisation + */ + + s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); +} + +/* need to register class before we actually register the device, and + * we also need to ensure that it has been initialised before any of the + * drivers even try to use it (even if not on an s3c2440 based system) + * as a driver which may support both 2410 and 2440 may try and use it. +*/ + +static int __init s3c2440_core_init(void) +{ + return sysdev_class_register(&s3c2440_sysclass); +} + +core_initcall(s3c2440_core_init); + +int __init s3c2440_init(void) +{ + int ret; + + printk("S3C2440: Initialising architecture\n"); - /* register our system device for everything else */ + ret = sysdev_register(&s3c2440_sysdev); + if (ret != 0) + printk(KERN_ERR "failed to register sysdev for s3c2440\n"); + else + ret = platform_add_devices(s3c24xx_uart_devs, s3c2440_uart_count); - return sysdev_register(&s3c2440_sysdev); + return ret; } diff --git a/arch/arm/mach-s3c2410/s3c2442-clock.c b/arch/arm/mach-s3c2410/s3c2442-clock.c deleted file mode 100644 index d9f54b5ca..000000000 --- a/arch/arm/mach-s3c2410/s3c2442-clock.c +++ /dev/null @@ -1,171 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c2442-clock.c - * - * Copyright (c) 2004-2005 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * S3C2442 Clock support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "clock.h" -#include "cpu.h" - -/* S3C2442 extended clock support */ - -static unsigned long s3c2442_camif_upll_round(struct clk *clk, - unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - int div; - - if (rate > parent_rate) - return parent_rate; - - div = parent_rate / rate; - - if (div == 3) - return parent_rate / 3; - - /* note, we remove the +/- 1 calculations for the divisor */ - - div /= 2; - - if (div < 1) - div = 1; - else if (div > 16) - div = 16; - - return parent_rate / (div * 2); -} - -static int s3c2442_camif_upll_setrate(struct clk *clk, unsigned long rate) -{ - unsigned long parent_rate = clk_get_rate(clk->parent); - unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); - - rate = s3c2442_camif_upll_round(clk, rate); - - camdivn &= ~S3C2442_CAMDIVN_CAMCLK_DIV3; - - if (rate == parent_rate) { - camdivn &= ~S3C2440_CAMDIVN_CAMCLK_SEL; - } else if ((parent_rate / rate) == 3) { - camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL; - camdivn |= S3C2442_CAMDIVN_CAMCLK_DIV3; - } else { - camdivn &= ~S3C2440_CAMDIVN_CAMCLK_MASK; - camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL; - camdivn |= (((parent_rate / rate) / 2) - 1); - } - - __raw_writel(camdivn, S3C2440_CAMDIVN); - - return 0; -} - -/* Extra S3C2442 clocks */ - -static struct clk s3c2442_clk_cam = { - .name = "camif", - .id = -1, - .enable = s3c2410_clkcon_enable, - .ctrlbit = S3C2440_CLKCON_CAMERA, -}; - -static struct clk s3c2442_clk_cam_upll = { - .name = "camif-upll", - .id = -1, - .set_rate = s3c2442_camif_upll_setrate, - .round_rate = s3c2442_camif_upll_round, -}; - -static int s3c2442_clk_add(struct sys_device *sysdev) -{ - unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); - unsigned long clkdivn; - struct clk *clk_h; - struct clk *clk_p; - struct clk *clk_upll; - - printk("S3C2442: Clock Support, DVS %s\n", - (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); - - clk_p = clk_get(NULL, "pclk"); - clk_h = clk_get(NULL, "hclk"); - clk_upll = clk_get(NULL, "upll"); - - if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) { - printk(KERN_ERR "S3C2442: Failed to get parent clocks\n"); - return -EINVAL; - } - - /* check rate of UPLL, and if it is near 96MHz, then change - * to using half the UPLL rate for the system */ - - if (clk_get_rate(clk_upll) > (94 * MHZ)) { - clk_usb_bus.rate = clk_get_rate(clk_upll) / 2; - - mutex_lock(&clocks_mutex); - - clkdivn = __raw_readl(S3C2410_CLKDIVN); - clkdivn |= S3C2440_CLKDIVN_UCLK; - __raw_writel(clkdivn, S3C2410_CLKDIVN); - - mutex_unlock(&clocks_mutex); - } - - s3c2442_clk_cam.parent = clk_h; - s3c2442_clk_cam_upll.parent = clk_upll; - - s3c24xx_register_clock(&s3c2442_clk_cam); - s3c24xx_register_clock(&s3c2442_clk_cam_upll); - - clk_disable(&s3c2442_clk_cam); - - return 0; -} - -static struct sysdev_driver s3c2442_clk_driver = { - .add = s3c2442_clk_add, -}; - -static __init int s3c2442_clk_init(void) -{ - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver); -} - -arch_initcall(s3c2442_clk_init); diff --git a/arch/arm/mach-s3c2410/s3c2442.c b/arch/arm/mach-s3c2410/s3c2442.c deleted file mode 100644 index debae2430..000000000 --- a/arch/arm/mach-s3c2410/s3c2442.c +++ /dev/null @@ -1,52 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c2440.c - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * Samsung S3C2442 Mobile CPU support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "s3c2442.h" -#include "clock.h" -#include "devs.h" -#include "cpu.h" -#include "pm.h" - -static struct sys_device s3c2442_sysdev = { - .cls = &s3c2442_sysclass, -}; - -int __init s3c2442_init(void) -{ - printk("S3C2442: Initialising architecture\n"); - - return sysdev_register(&s3c2442_sysdev); -} diff --git a/arch/arm/mach-s3c2410/s3c2442.h b/arch/arm/mach-s3c2410/s3c2442.h deleted file mode 100644 index 0ae37d248..000000000 --- a/arch/arm/mach-s3c2410/s3c2442.h +++ /dev/null @@ -1,17 +0,0 @@ -/* arch/arm/mach-s3c2410/s3c2442.h - * - * Copyright (c) 2006 Simtec Electronics - * Ben Dooks - * - * Header file for s3c2442 cpu support - * - * 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. -*/ - -#ifdef CONFIG_CPU_S3C2442 -extern int s3c2442_init(void); -#else -#define s3c2442_init NULL -#endif diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c deleted file mode 100644 index 44c5affa9..000000000 --- a/arch/arm/mach-s3c2410/s3c244x-irq.c +++ /dev/null @@ -1,142 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c2440-irq.c - * - * Copyright (c) 2003,2004 Simtec Electronics - * Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include "cpu.h" -#include "pm.h" -#include "irq.h" - -/* camera irq */ - -static void s3c_irq_demux_cam(unsigned int irq, - struct irqdesc *desc, - struct pt_regs *regs) -{ - unsigned int subsrc, submsk; - struct irqdesc *mydesc; - - /* read the current pending interrupts, and the mask - * for what it is available */ - - subsrc = __raw_readl(S3C2410_SUBSRCPND); - submsk = __raw_readl(S3C2410_INTSUBMSK); - - subsrc &= ~submsk; - subsrc >>= 11; - subsrc &= 3; - - if (subsrc != 0) { - if (subsrc & 1) { - mydesc = irq_desc + IRQ_S3C2440_CAM_C; - desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); - } - if (subsrc & 2) { - mydesc = irq_desc + IRQ_S3C2440_CAM_P; - desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); - } - } -} - -#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) - -static void -s3c_irq_cam_mask(unsigned int irqno) -{ - s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); -} - -static void -s3c_irq_cam_unmask(unsigned int irqno) -{ - s3c_irqsub_unmask(irqno, INTMSK_CAM); -} - -static void -s3c_irq_cam_ack(unsigned int irqno) -{ - s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); -} - -static struct irqchip s3c_irq_cam = { - .mask = s3c_irq_cam_mask, - .unmask = s3c_irq_cam_unmask, - .ack = s3c_irq_cam_ack, -}; - -static int s3c244x_irq_add(struct sys_device *sysdev) -{ - unsigned int irqno; - - set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip); - set_irq_handler(IRQ_NFCON, do_level_IRQ); - set_irq_flags(IRQ_NFCON, IRQF_VALID); - - /* add chained handler for camera */ - - set_irq_chip(IRQ_CAM, &s3c_irq_level_chip); - set_irq_handler(IRQ_CAM, do_level_IRQ); - set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam); - - for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) { - set_irq_chip(irqno, &s3c_irq_cam); - set_irq_handler(irqno, do_level_IRQ); - set_irq_flags(irqno, IRQF_VALID); - } - - return 0; -} - -static struct sysdev_driver s3c2440_irq_driver = { - .add = s3c244x_irq_add, -}; - -static int s3c2440_irq_init(void) -{ - return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver); -} - -arch_initcall(s3c2440_irq_init); - -static struct sysdev_driver s3c2442_irq_driver = { - .add = s3c244x_irq_add, -}; - -static int s3c2442_irq_init(void) -{ - return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver); -} - -arch_initcall(s3c2442_irq_init); diff --git a/arch/arm/mach-s3c2410/s3c244x.c b/arch/arm/mach-s3c2410/s3c244x.c deleted file mode 100644 index 9a2258270..000000000 --- a/arch/arm/mach-s3c2410/s3c244x.c +++ /dev/null @@ -1,185 +0,0 @@ -/* linux/arch/arm/mach-s3c2410/s3c244x.c - * - * Copyright (c) 2004-2006 Simtec Electronics - * Ben Dooks - * - * Samsung S3C2440 and S3C2442 Mobile CPU support - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "s3c2410.h" -#include "s3c2440.h" -#include "s3c244x.h" -#include "clock.h" -#include "devs.h" -#include "cpu.h" -#include "pm.h" - -static struct map_desc s3c244x_iodesc[] __initdata = { - IODESC_ENT(CLKPWR), - IODESC_ENT(TIMER), - IODESC_ENT(WATCHDOG), - IODESC_ENT(LCD), - IODESC_ENT(ADC), - IODESC_ENT(USBHOST), -}; - -/* uart initialisation */ - -void __init s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no) -{ - s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no); -} - -void __init s3c244x_map_io(struct map_desc *mach_desc, int size) -{ - /* register our io-tables */ - - iotable_init(s3c244x_iodesc, ARRAY_SIZE(s3c244x_iodesc)); - iotable_init(mach_desc, size); - - /* rename any peripherals used differing from the s3c2410 */ - - s3c_device_i2c.name = "s3c2440-i2c"; - s3c_device_nand.name = "s3c2440-nand"; - s3c_device_usbgadget.name = "s3c2440-usbgadget"; -} - -void __init s3c244x_init_clocks(int xtal) -{ - unsigned long clkdiv; - unsigned long camdiv; - unsigned long hclk, fclk, pclk; - int hdiv = 1; - - /* now we've got our machine bits initialised, work out what - * clocks we've got */ - - fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; - - clkdiv = __raw_readl(S3C2410_CLKDIVN); - camdiv = __raw_readl(S3C2440_CAMDIVN); - - /* work out clock scalings */ - - switch (clkdiv & S3C2440_CLKDIVN_HDIVN_MASK) { - case S3C2440_CLKDIVN_HDIVN_1: - hdiv = 1; - break; - - case S3C2440_CLKDIVN_HDIVN_2: - hdiv = 2; - break; - - case S3C2440_CLKDIVN_HDIVN_4_8: - hdiv = (camdiv & S3C2440_CAMDIVN_HCLK4_HALF) ? 8 : 4; - break; - - case S3C2440_CLKDIVN_HDIVN_3_6: - hdiv = (camdiv & S3C2440_CAMDIVN_HCLK3_HALF) ? 6 : 3; - break; - } - - hclk = fclk / hdiv; - pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); - - /* print brief summary of clocks, etc */ - - printk("S3C244X: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", - print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); - - /* initialise the clocks here, to allow other things like the - * console to use them, and to add new ones after the initialisation - */ - - s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); - s3c2410_baseclk_add(); -} - -#ifdef CONFIG_PM - -static struct sleep_save s3c244x_sleep[] = { - SAVE_ITEM(S3C2440_DSC0), - SAVE_ITEM(S3C2440_DSC1), - SAVE_ITEM(S3C2440_GPJDAT), - SAVE_ITEM(S3C2440_GPJCON), - SAVE_ITEM(S3C2440_GPJUP) -}; - -static int s3c244x_suspend(struct sys_device *dev, pm_message_t state) -{ - s3c2410_pm_do_save(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep)); - return 0; -} - -static int s3c244x_resume(struct sys_device *dev) -{ - s3c2410_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep)); - return 0; -} - -#else -#define s3c244x_suspend NULL -#define s3c244x_resume NULL -#endif - -/* Since the S3C2442 and S3C2440 share items, put both sysclasses here */ - -struct sysdev_class s3c2440_sysclass = { - set_kset_name("s3c2440-core"), - .suspend = s3c244x_suspend, - .resume = s3c244x_resume -}; - -struct sysdev_class s3c2442_sysclass = { - set_kset_name("s3c2442-core"), - .suspend = s3c244x_suspend, - .resume = s3c244x_resume -}; - -/* need to register class before we actually register the device, and - * we also need to ensure that it has been initialised before any of the - * drivers even try to use it (even if not on an s3c2440 based system) - * as a driver which may support both 2410 and 2440 may try and use it. -*/ - -static int __init s3c2440_core_init(void) -{ - return sysdev_class_register(&s3c2440_sysclass); -} - -core_initcall(s3c2440_core_init); - -static int __init s3c2442_core_init(void) -{ - return sysdev_class_register(&s3c2442_sysclass); -} - -core_initcall(s3c2442_core_init); diff --git a/arch/arm/mach-s3c2410/s3c244x.h b/arch/arm/mach-s3c2410/s3c244x.h deleted file mode 100644 index 3e7f5f751..000000000 --- a/arch/arm/mach-s3c2410/s3c244x.h +++ /dev/null @@ -1,25 +0,0 @@ -/* arch/arm/mach-s3c2410/s3c2440.h - * - * Copyright (c) 2004-2005 Simtec Electronics - * Ben Dooks - * - * Header file for S3C2440 and S3C2442 cpu support - * - * 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. -*/ - -#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) - -extern void s3c244x_map_io(struct map_desc *mach_desc, int size); - -extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); - -extern void s3c244x_init_clocks(int xtal); - -#else -#define s3c244x_init_clocks NULL -#define s3c244x_init_uarts NULL -#define s3c244x_map_io NULL -#endif diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S index a7561a79f..73de2eaca 100644 --- a/arch/arm/mach-s3c2410/sleep.S +++ b/arch/arm/mach-s3c2410/sleep.S @@ -24,6 +24,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -65,9 +66,7 @@ ENTRY(s3c2410_cpu_suspend) @@ flush the caches to ensure everything is back out to @@ SDRAM before the core powers down -#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH bl arm920_flush_kern_cache_all -#endif @@ prepare cpu to sleep @@ -127,7 +126,7 @@ s3c2410_sleep_save_phys: */ ENTRY(s3c2410_cpu_resume) - mov r0, #PSR_I_BIT | PSR_F_BIT | SVC_MODE + mov r0, #PSR_I_BIT | PSR_F_BIT | MODE_SVC msr cpsr_c, r0 @@ load UART to allow us to print the two characters for diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index 00d1cfca9..9d7b799ea 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c @@ -18,11 +18,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include #include -#include #include #include @@ -138,7 +138,7 @@ s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction s3c2410_timer_irq = { .name = "S3C2410 Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = s3c2410_timer_interrupt, }; diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c index 6b22d8f0a..495f8c6ff 100644 --- a/arch/arm/mach-s3c2410/usb-simtec.c +++ b/arch/arm/mach-s3c2410/usb-simtec.c @@ -85,8 +85,8 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on) if (on) { ret = request_irq(IRQ_USBOC, usb_simtec_ocirq, - IRQF_DISABLED | IRQF_TRIGGER_RISING | - IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | + SA_TRIGGER_FALLING, "USB Over-current", info); if (ret != 0) { printk(KERN_ERR "failed to request usb oc irq\n"); diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index be06d668a..c58f12ba7 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index 31afe50d7..8269a9ef9 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c @@ -10,11 +10,11 @@ * Jan-2004 : Removed io map for flash [FB] */ +#include #include #include #include #include -#include #include #include diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index a0dfa390e..676b5c5b7 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c @@ -17,6 +17,7 @@ * 04-16-2001 Lineo Japan,Inc. ... */ +#include #include #include #include @@ -83,8 +84,8 @@ static struct scoop_pcmcia_config collie_pcmcia_config = { static struct mcp_plat_data collie_mcp_data = { - .mccr0 = MCCR0_ADM | MCCR0_ExtClk, - .sclk_rate = 9216000, + .mccr0 = MCCR0_ADM, + .sclk_rate = 11981000, }; #ifdef CONFIG_SHARP_LOCOMO diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c index 1e25b1d19..696d7d29c 100644 --- a/arch/arm/mach-sa1100/collie_pm.c +++ b/arch/arm/mach-sa1100/collie_pm.c @@ -9,9 +9,6 @@ * Li-ion batteries are angry beasts, and they like to explode. This driver is not finished, * and sometimes charges them when it should not. If it makes angry lithium to come your way... * ...well, you have been warned. - * - * Actually, this should be quite safe, it seems sharp leaves charger enabled by default, - * and my collie did not explode (yet). */ #include @@ -43,16 +40,17 @@ static void collie_charger_init(void) { int err; - if (sharpsl_param.adadj != -1) + if (sharpsl_param.adadj != -1) { ad_revise = sharpsl_param.adadj; + } /* Register interrupt handler. */ - if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, IRQF_DISABLED, + if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, SA_INTERRUPT, "ACIN", sharpsl_ac_isr))) { printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN); return; } - if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, IRQF_DISABLED, + if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr))) { free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr); printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO); @@ -74,17 +72,27 @@ static void collie_measure_temp(int on) static void collie_charge(int on) { - extern struct platform_device colliescoop_device; + if (on) { + printk("Should start charger\n"); + } else { + printk("Should stop charger\n"); + } +#ifdef I_AM_SURE - /* Zaurus seems to contain LTC1731; it should know when to + /* Zaurus seems to contain LTC1731 ; it should know when to * stop charging itself, so setting charge on should be * relatively harmless (as long as it is not done too often). */ +#define CF_BUF_CTRL_BASE 0xF0800000 +#define SCOOP_REG(adr) (*(volatile unsigned short*)(CF_BUF_CTRL_BASE+(adr))) +#define SCOOP_REG_GPWR SCOOP_REG(SCOOP_GPWR) + if (on) { set_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); } else { reset_scoop_gpio(&colliescoop_device.dev, COLLIE_SCP_CHARGE_ON); } +#endif } static void collie_discharge(int on) @@ -119,6 +127,7 @@ int collie_read_backup_battery(void) ucb1x00_adc_enable(ucb); + /* Gives 75..130 */ ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_BBAT_ON, 0); voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); @@ -137,8 +146,9 @@ int collie_read_main_battery(void) ucb1x00_adc_enable(ucb); ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_BBAT_ON); ucb1x00_io_write(ucb, COLLIE_TC35143_GPIO_MBAT_ON, 0); - - mdelay(1); + /* gives values 160..255 with battery removed... and + 145..255 with battery inserted. (on AC), goes as low as + 80 on DC. */ voltage = ucb1x00_adc_read(ucb, UCB_ADC_INP_AD1, UCB_SYNC); ucb1x00_io_write(ucb, 0, COLLIE_TC35143_GPIO_MBAT_ON); @@ -182,7 +192,7 @@ static unsigned long read_devdata(int which) case SHARPSL_BATT_TEMP: return collie_read_temp(); case SHARPSL_ACIN_VOLT: - return 500; + return 0x1; case SHARPSL_STATUS_ACIN: { int ret = GPLR & COLLIE_GPIO_AC_IN; printk("AC status = %d\n", ret); @@ -198,33 +208,10 @@ static unsigned long read_devdata(int which) } } -struct battery_thresh collie_battery_levels_acin[] = { - { 420, 100}, - { 417, 95}, - { 415, 90}, - { 413, 80}, - { 411, 75}, - { 408, 70}, - { 406, 60}, - { 403, 50}, - { 398, 40}, - { 391, 25}, - { 10, 5}, - { 0, 0}, -}; - struct battery_thresh collie_battery_levels[] = { - { 394, 100}, - { 390, 95}, - { 380, 90}, - { 370, 80}, - { 368, 75}, /* From sharp code: battery high with frontlight */ - { 366, 70}, /* 60..90 -- fake values invented by me for testing */ - { 364, 60}, - { 362, 50}, - { 360, 40}, - { 358, 25}, /* From sharp code: battery low with frontlight */ - { 356, 5}, /* From sharp code: battery verylow with frontlight */ + { 368, 100}, + { 358, 25}, + { 356, 5}, { 0, 0}, }; @@ -239,21 +226,13 @@ struct sharpsl_charger_machinfo collie_pm_machinfo = { .postsuspend = collie_postsuspend, .charger_wakeup = collie_charger_wakeup, .should_wakeup = collie_should_wakeup, - .bat_levels = 12, + .bat_levels = 3, .bat_levels_noac = collie_battery_levels, - .bat_levels_acin = collie_battery_levels_acin, + .bat_levels_acin = collie_battery_levels, .status_high_acin = 368, .status_low_acin = 358, .status_high_noac = 368, .status_low_noac = 358, - .charge_on_volt = 350, /* spitz uses 2.90V, but lets play it safe. */ - .charge_on_temp = 550, - .charge_acin_high = 550, /* collie does not seem to have sensor for this, anyway */ - .charge_acin_low = 450, /* ignored, too */ - .fatal_acin_volt = 356, - .fatal_noacin_volt = 356, - - .batfull_irq = 1, /* We do not want periodical charge restarts */ }; static int __init collie_pm_ucb_add(struct ucb1x00_dev *pdev) diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 639597729..04c94ab6c 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c @@ -15,10 +15,7 @@ * SDRAM reads (rev A0, B0, B1) * * We ignore rev. A0 and B0 devices; I don't think they're worth supporting. - * - * The SDRAM type can be passed on the command line as cpu_sa1110.sdram=type */ -#include #include #include #include @@ -38,7 +35,6 @@ static struct cpufreq_driver sa1110_driver; struct sdram_params { - const char name[16]; u_char rows; /* bits */ u_char cas_latency; /* cycles */ u_char tck; /* clock cycle time (ns) */ @@ -54,53 +50,54 @@ struct sdram_info { u_int mdcas[3]; }; -static struct sdram_params sdram_tbl[] __initdata = { - { /* Toshiba TC59SM716 CL2 */ - .name = "TC59SM716-CL2", - .rows = 12, - .tck = 10, - .trcd = 20, - .trp = 20, - .twr = 10, - .refresh = 64000, - .cas_latency = 2, - }, { /* Toshiba TC59SM716 CL3 */ - .name = "TC59SM716-CL3", - .rows = 12, - .tck = 8, - .trcd = 20, - .trp = 20, - .twr = 8, - .refresh = 64000, - .cas_latency = 3, - }, { /* Samsung K4S641632D TC75 */ - .name = "K4S641632D", - .rows = 14, - .tck = 9, - .trcd = 27, - .trp = 20, - .twr = 9, - .refresh = 64000, - .cas_latency = 3, - }, { /* Samsung KM416S4030CT */ - .name = "KM416S4030CT", - .rows = 13, - .tck = 8, - .trcd = 24, /* 3 CLKs */ - .trp = 24, /* 3 CLKs */ - .twr = 16, /* Trdl: 2 CLKs */ - .refresh = 64000, - .cas_latency = 3, - }, { /* Winbond W982516AH75L CL3 */ - .name = "W982516AH75L", - .rows = 16, - .tck = 8, - .trcd = 20, - .trp = 20, - .twr = 8, - .refresh = 64000, - .cas_latency = 3, - }, +static struct sdram_params tc59sm716_cl2_params __initdata = { + .rows = 12, + .tck = 10, + .trcd = 20, + .trp = 20, + .twr = 10, + .refresh = 64000, + .cas_latency = 2, +}; + +static struct sdram_params tc59sm716_cl3_params __initdata = { + .rows = 12, + .tck = 8, + .trcd = 20, + .trp = 20, + .twr = 8, + .refresh = 64000, + .cas_latency = 3, +}; + +static struct sdram_params samsung_k4s641632d_tc75 __initdata = { + .rows = 14, + .tck = 9, + .trcd = 27, + .trp = 20, + .twr = 9, + .refresh = 64000, + .cas_latency = 3, +}; + +static struct sdram_params samsung_km416s4030ct __initdata = { + .rows = 13, + .tck = 8, + .trcd = 24, /* 3 CLKs */ + .trp = 24, /* 3 CLKs */ + .twr = 16, /* Trdl: 2 CLKs */ + .refresh = 64000, + .cas_latency = 3, +}; + +static struct sdram_params wbond_w982516ah75l_cl3_params __initdata = { + .rows = 16, + .tck = 8, + .trcd = 20, + .trp = 20, + .twr = 8, + .refresh = 64000, + .cas_latency = 3, }; static struct sdram_params sdram_params; @@ -339,36 +336,19 @@ static struct cpufreq_driver sa1110_driver = { .name = "sa1110", }; -static struct sdram_params *sa1110_find_sdram(const char *name) -{ - struct sdram_params *sdram; - - for (sdram = sdram_tbl; sdram < sdram_tbl + ARRAY_SIZE(sdram_tbl); sdram++) - if (strcmp(name, sdram->name) == 0) - return sdram; - - return NULL; -} - -static char sdram_name[16]; - static int __init sa1110_clk_init(void) { - struct sdram_params *sdram; - const char *name = sdram_name; + struct sdram_params *sdram = NULL; - if (!name[0]) { - if (machine_is_assabet()) - name = "TC59SM716-CL3"; + if (machine_is_assabet()) + sdram = &tc59sm716_cl3_params; - if (machine_is_pt_system3()) - name = "K4S641632D"; + if (machine_is_pt_system3()) + sdram = &samsung_k4s641632d_tc75; - if (machine_is_h3100()) - name = "KM416S4030CT"; - } + if (machine_is_h3100()) + sdram = &samsung_km416s4030ct; - sdram = sa1110_find_sdram(name); if (sdram) { printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d" " twr: %d refresh: %d cas_latency: %d\n", @@ -383,5 +363,4 @@ static int __init sa1110_clk_init(void) return 0; } -module_param_string(sdram, sdram_name, sizeof(sdram_name), 0); arch_initcall(sa1110_clk_init); diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c index 3c6441d4b..be0e4427b 100644 --- a/arch/arm/mach-sa1100/dma.c +++ b/arch/arm/mach-sa1100/dma.c @@ -124,7 +124,7 @@ int sa1100_request_dma (dma_device_t device, const char *device_id, i = dma - dma_chan; regs = (dma_regs_t *)&DDAR(i); - err = request_irq(IRQ_DMA0 + i, dma_irq_handler, IRQF_DISABLED, + err = request_irq(IRQ_DMA0 + i, dma_irq_handler, SA_INTERRUPT, device_id, regs); if (err) { printk(KERN_ERR diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 4575f316e..9ea71551f 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 7364478ce..b04d92271 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c @@ -19,6 +19,7 @@ * and abstracted EGPIO interface. * */ +#include #include #include #include @@ -740,7 +741,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_re static struct irqaction h3800_irq = { .name = "h3800_asic", .handler = h3800_IRQ_demux, - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, }; u32 kpio_int_shadow = 0; @@ -835,7 +836,7 @@ static void __init h3800_init_irq(void) } #endif set_irq_type(IRQ_GPIO_H3800_ASIC, IRQT_RISING); - set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, h3800_IRQ_demux); + set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, &h3800_IRQ_demux); } diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index b55b90a2e..b3a560241 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c @@ -11,13 +11,12 @@ */ #include #include -#include -#include #include #include #include #include +#include #include #include "generic.h" @@ -95,8 +94,7 @@ static int sa1100_low_gpio_wake(unsigned int irq, unsigned int on) return 0; } -static struct irq_chip sa1100_low_gpio_chip = { - .name = "GPIO-l", +static struct irqchip sa1100_low_gpio_chip = { .ack = sa1100_low_gpio_ack, .mask = sa1100_low_gpio_mask, .unmask = sa1100_low_gpio_unmask, @@ -179,8 +177,7 @@ static int sa1100_high_gpio_wake(unsigned int irq, unsigned int on) return 0; } -static struct irq_chip sa1100_high_gpio_chip = { - .name = "GPIO-h", +static struct irqchip sa1100_high_gpio_chip = { .ack = sa1100_high_gpio_ack, .mask = sa1100_high_gpio_mask, .unmask = sa1100_high_gpio_unmask, @@ -217,8 +214,7 @@ static int sa1100_set_wake(unsigned int irq, unsigned int on) return -EINVAL; } -static struct irq_chip sa1100_normal_chip = { - .name = "SC", +static struct irqchip sa1100_normal_chip = { .ack = sa1100_mask_irq, .mask = sa1100_mask_irq, .unmask = sa1100_unmask_irq, diff --git a/arch/arm/mach-sa1100/leds-assabet.c b/arch/arm/mach-sa1100/leds-assabet.c index ee9788989..e9aa9dff2 100644 --- a/arch/arm/mach-sa1100/leds-assabet.c +++ b/arch/arm/mach-sa1100/leds-assabet.c @@ -9,6 +9,7 @@ * - Green - toggles state every 50 timer interrupts * - Red - on if system is not idle */ +#include #include #include diff --git a/arch/arm/mach-sa1100/leds-badge4.c b/arch/arm/mach-sa1100/leds-badge4.c index 280929be9..0a8f87bb6 100644 --- a/arch/arm/mach-sa1100/leds-badge4.c +++ b/arch/arm/mach-sa1100/leds-badge4.c @@ -10,6 +10,7 @@ * */ +#include #include #include diff --git a/arch/arm/mach-sa1100/leds-cerf.c b/arch/arm/mach-sa1100/leds-cerf.c index f38eeddbe..f6635a2d0 100644 --- a/arch/arm/mach-sa1100/leds-cerf.c +++ b/arch/arm/mach-sa1100/leds-cerf.c @@ -3,6 +3,7 @@ * * Author: ??? */ +#include #include #include diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c index 7e91cc90b..2e5fa14aa 100644 --- a/arch/arm/mach-sa1100/leds-hackkit.c +++ b/arch/arm/mach-sa1100/leds-hackkit.c @@ -9,6 +9,7 @@ * The HackKit has two leds (GPIO 22/23). The red led (gpio 22) is used * as cpu led, the green one is used as timer led. */ +#include #include #include diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c index 2d27d76cf..187501490 100644 --- a/arch/arm/mach-sa1100/leds-lart.c +++ b/arch/arm/mach-sa1100/leds-lart.c @@ -9,6 +9,7 @@ * time, but in that case the timer events will still dictate the * pace of the LED. */ +#include #include #include diff --git a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c index def090a87..6a27a2d32 100644 --- a/arch/arm/mach-sa1100/leds-simpad.c +++ b/arch/arm/mach-sa1100/leds-simpad.c @@ -3,6 +3,7 @@ * * Author: Juergen Messerer */ +#include #include #include diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index c7bf7e003..0709ebab5 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c @@ -7,7 +7,6 @@ #include #include #include -#include #include diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index 8acab7b1e..5aafe0b56 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c @@ -2,6 +2,7 @@ * linux/arch/arm/mach-sa1100/shannon.c */ +#include #include #include #include diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index a9ae1b581..d2c23b2c3 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c @@ -2,6 +2,7 @@ * linux/arch/arm/mach-sa1100/simpad.c */ +#include #include #include #include diff --git a/arch/arm/mach-sa1100/sleep.S b/arch/arm/mach-sa1100/sleep.S index 5a84062f9..2fa1e289d 100644 --- a/arch/arm/mach-sa1100/sleep.S +++ b/arch/arm/mach-sa1100/sleep.S @@ -177,7 +177,7 @@ sa1110_sdram_controller_fix: .data .align 5 ENTRY(sa1100_cpu_resume) - mov r0, #PSR_F_BIT | PSR_I_BIT | SVC_MODE + mov r0, #PSR_F_BIT | PSR_I_BIT | MODE_SVC msr cpsr_c, r0 @ set SVC, irqs off ldr r0, sleep_save_sp @ stack phys addr diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c index 5eba5fbbb..1604dadf2 100644 --- a/arch/arm/mach-sa1100/ssp.c +++ b/arch/arm/mach-sa1100/ssp.c @@ -23,8 +23,6 @@ #include #include -#define TIMEOUT 100000 - static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) { unsigned int status = Ser4SSSR; @@ -49,27 +47,18 @@ static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) * The caller is expected to perform the necessary locking. * * Returns: - * %-ETIMEDOUT timeout occurred + * %-ETIMEDOUT timeout occurred (for future) * 0 success */ int ssp_write_word(u16 data) { - int timeout = TIMEOUT; - - while (!(Ser4SSSR & SSSR_TNF)) { - if (!--timeout) - return -ETIMEDOUT; + while (!(Ser4SSSR & SSSR_TNF)) cpu_relax(); - } Ser4SSDR = data; - timeout = TIMEOUT; - while (!(Ser4SSSR & SSSR_BSY)) { - if (!--timeout) - return -ETIMEDOUT; + while (!(Ser4SSSR & SSSR_BSY)) cpu_relax(); - } return 0; } @@ -86,22 +75,15 @@ int ssp_write_word(u16 data) * The caller is expected to perform the necessary locking. * * Returns: - * %-ETIMEDOUT timeout occurred + * %-ETIMEDOUT timeout occurred (for future) * 16-bit data success */ -int ssp_read_word(u16 *data) +int ssp_read_word(void) { - int timeout = TIMEOUT; - - while (!(Ser4SSSR & SSSR_RNE)) { - if (!--timeout) - return -ETIMEDOUT; + while (!(Ser4SSSR & SSSR_RNE)) cpu_relax(); - } - - *data = (u16)Ser4SSDR; - return 0; + return Ser4SSDR; } /** @@ -111,26 +93,14 @@ int ssp_read_word(u16 *data) * is empty. * * The caller is expected to perform the necessary locking. - * - * Returns: - * %-ETIMEDOUT timeout occurred - * 0 success */ -int ssp_flush(void) +void ssp_flush(void) { - int timeout = TIMEOUT * 2; - do { while (Ser4SSSR & SSSR_RNE) { - if (!--timeout) - return -ETIMEDOUT; (void) Ser4SSDR; } - if (!--timeout) - return -ETIMEDOUT; } while (Ser4SSSR & SSSR_BSY); - - return 0; } /** diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 49ae716e1..e4b435e63 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -111,7 +110,7 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction sa1100_timer_irq = { .name = "SA11xx Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = sa1100_timer_interrupt, }; diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index 1095df34f..877600e21 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include @@ -90,7 +89,7 @@ shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction shark_timer_irq = { .name = "Shark Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = shark_timer_interrupt, }; diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c index 6774b8d5d..835989a02 100644 --- a/arch/arm/mach-shark/dma.c +++ b/arch/arm/mach-shark/dma.c @@ -8,6 +8,7 @@ * Copyright (C) 1998 Phil Blundell */ +#include #include #include diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c index b22705229..6cb67bd3d 100644 --- a/arch/arm/mach-shark/irq.c +++ b/arch/arm/mach-shark/irq.c @@ -69,8 +69,7 @@ static irqreturn_t bogus_int(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction cascade; -static struct irq_chip fb_chip = { - .name = "XT-PIC", +static struct irqchip fb_chip = { .ack = shark_ack_8259A_irq, .mask = shark_disable_8259A_irq, .unmask = shark_enable_8259A_irq, diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c index 7cd86d357..7bdeb70a0 100644 --- a/arch/arm/mach-shark/leds.c +++ b/arch/arm/mach-shark/leds.c @@ -15,6 +15,7 @@ * * Changelog: */ +#include #include #include #include diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index f2bbef07b..cebd48a3d 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -18,6 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include @@ -69,8 +69,7 @@ static void sic_unmask_irq(unsigned int irq) writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_SET); } -static struct irq_chip sic_chip = { - .name = "SIC", +static struct irqchip sic_chip = { .ack = sic_mask_irq, .mask = sic_mask_irq, .unmask = sic_unmask_irq, @@ -285,7 +284,7 @@ static struct flash_platform_data versatile_flash_data = { static struct resource versatile_flash_resource = { .start = VERSATILE_FLASH_BASE, - .end = VERSATILE_FLASH_BASE + VERSATILE_FLASH_SIZE - 1, + .end = VERSATILE_FLASH_BASE + VERSATILE_FLASH_SIZE, .flags = IORESOURCE_MEM, }; @@ -354,7 +353,11 @@ static const struct icst307_params versatile_oscvco_params = { static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) { void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; - void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; +#if defined(CONFIG_ARCH_VERSATILE_PB) + void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC4_OFFSET; +#elif defined(CONFIG_MACH_VERSATILE_AB) + void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC1_OFFSET; +#endif u32 val; val = readl(sys_osc) & ~0x7ffff; @@ -527,7 +530,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb) /* * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off */ - if (machine_is_versatile_ab() && fb->panel == &sanyo_2_5_in) { + if (fb->panel == &sanyo_2_5_in) { void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL); unsigned long ctrl; @@ -576,7 +579,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb) /* * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on */ - if (machine_is_versatile_ab() && fb->panel == &sanyo_2_5_in) { + if (fb->panel == &sanyo_2_5_in) { void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL); unsigned long ctrl; @@ -867,7 +870,7 @@ static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_re static struct irqaction versatile_timer_irq = { .name = "Versatile Timer Tick", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = versatile_timer_interrupt, }; diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 41b370090..722fbabc9 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c @@ -14,6 +14,7 @@ * 14/04/2005 Initial version, colin.king@philips.com * */ +#include #include #include #include diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index b257ef78e..1eb596782 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 503725b16..f17ab4fb5 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index b4f220dd5..c55b739e1 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -15,8 +15,8 @@ config CPU_ARM610 select CPU_32v3 select CPU_CACHE_V3 select CPU_CACHE_VIVT - select CPU_COPY_V3 if MMU - select CPU_TLB_V3 if MMU + select CPU_COPY_V3 + select CPU_TLB_V3 help The ARM610 is the successor to the ARM3 processor and was produced by VLSI Technology Inc. @@ -31,8 +31,8 @@ config CPU_ARM710 select CPU_32v3 select CPU_CACHE_V3 select CPU_CACHE_VIVT - select CPU_COPY_V3 if MMU - select CPU_TLB_V3 if MMU + select CPU_COPY_V3 + select CPU_TLB_V3 help A 32-bit RISC microprocessor based on the ARM7 processor core designed by Advanced RISC Machines Ltd. The ARM710 is the @@ -46,12 +46,12 @@ config CPU_ARM710 config CPU_ARM720T bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X - select CPU_32v4T + select CPU_32v4 select CPU_ABRT_LV4T select CPU_CACHE_V4 select CPU_CACHE_VIVT - select CPU_COPY_V4WT if MMU - select CPU_TLB_V4WT if MMU + select CPU_COPY_V4WT + select CPU_TLB_V4WT help A 32-bit RISC processor with 8kByte Cache, Write Buffer and MMU built around an ARM7TDMI core. @@ -61,15 +61,15 @@ config CPU_ARM720T # ARM920T config CPU_ARM920T - bool "Support ARM920T processor" - depends on ARCH_EP93XX || ARCH_INTEGRATOR || CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 - default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200 - select CPU_32v4T + bool "Support ARM920T processor" if !ARCH_S3C2410 + depends on ARCH_EP93XX || ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 + default y if ARCH_S3C2410 || ARCH_AT91RM9200 + select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI help The ARM920T is licensed to be produced by numerous vendors, and is used in the Maverick EP9312 and the Samsung S3C2410. @@ -85,12 +85,12 @@ config CPU_ARM922T bool "Support ARM922T processor" if ARCH_INTEGRATOR depends on ARCH_LH7A40X || ARCH_INTEGRATOR default y if ARCH_LH7A40X - select CPU_32v4T + select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI help The ARM922T is a version of the ARM920T, but with smaller instruction and data caches. It is used in Altera's @@ -104,12 +104,12 @@ config CPU_ARM925T bool "Support ARM925T processor" if ARCH_OMAP1 depends on ARCH_OMAP15XX default y if ARCH_OMAP15XX - select CPU_32v4T + select CPU_32v4 select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI help The ARM925T is a mix between the ARM920T and ARM926T, but with different instruction and data caches. It is used in TI's OMAP @@ -121,13 +121,13 @@ config CPU_ARM925T # ARM926T config CPU_ARM926T bool "Support ARM926T processor" - depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 - default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 + depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB + default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX select CPU_32v5 select CPU_ABRT_EV5TJ select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI help This is a variant of the ARM920. It has slightly different instruction sequences for cache and TLB operations. Curiously, @@ -144,8 +144,8 @@ config CPU_ARM1020 select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI help The ARM1020 is the 32K cached version of the ARM10 processor, with an addition of a floating-point unit. @@ -161,8 +161,8 @@ config CPU_ARM1020E select CPU_ABRT_EV4T select CPU_CACHE_V4WT select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WBI depends on n # ARM1022E @@ -172,8 +172,8 @@ config CPU_ARM1022 select CPU_32v5 select CPU_ABRT_EV4T select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU # can probably do better - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB # can probably do better + select CPU_TLB_V4WBI help The ARM1022E is an implementation of the ARMv5TE architecture based upon the ARM10 integer core with a 16KiB L1 Harvard cache, @@ -189,8 +189,8 @@ config CPU_ARM1026 select CPU_32v5 select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU # can probably do better - select CPU_TLB_V4WBI if MMU + select CPU_COPY_V4WB # can probably do better + select CPU_TLB_V4WBI help The ARM1026EJ-S is an implementation of the ARMv5TEJ architecture based upon the ARM10 integer core. @@ -207,8 +207,8 @@ config CPU_SA110 select CPU_ABRT_EV4 select CPU_CACHE_V4WB select CPU_CACHE_VIVT - select CPU_COPY_V4WB if MMU - select CPU_TLB_V4WB if MMU + select CPU_COPY_V4WB + select CPU_TLB_V4WB help The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and is available at five speeds ranging from 100 MHz to 233 MHz. @@ -227,7 +227,7 @@ config CPU_SA1100 select CPU_ABRT_EV4 select CPU_CACHE_V4WB select CPU_CACHE_VIVT - select CPU_TLB_V4WB if MMU + select CPU_TLB_V4WB # XScale config CPU_XSCALE @@ -237,7 +237,7 @@ config CPU_XSCALE select CPU_32v5 select CPU_ABRT_EV5T select CPU_CACHE_VIVT - select CPU_TLB_V4WBI if MMU + select CPU_TLB_V4WBI # XScale Core Version 3 config CPU_XSC3 @@ -247,7 +247,7 @@ config CPU_XSC3 select CPU_32v5 select CPU_ABRT_EV5T select CPU_CACHE_VIVT - select CPU_TLB_V4WBI if MMU + select CPU_TLB_V4WBI select IO_36 # ARMv6 @@ -258,8 +258,8 @@ config CPU_V6 select CPU_ABRT_EV6 select CPU_CACHE_V6 select CPU_CACHE_VIPT - select CPU_COPY_V6 if MMU - select CPU_TLB_V6 if MMU + select CPU_COPY_V6 + select CPU_TLB_V6 # ARMv6k config CPU_32v6K @@ -277,22 +277,17 @@ config CPU_32v6K # This defines the compiler instruction set which depends on the machine type. config CPU_32v3 bool - select TLS_REG_EMUL if SMP || !MMU + select TLS_REG_EMUL if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP config CPU_32v4 bool - select TLS_REG_EMUL if SMP || !MMU - select NEEDS_SYSCALL_FOR_CMPXCHG if SMP - -config CPU_32v4T - bool - select TLS_REG_EMUL if SMP || !MMU + select TLS_REG_EMUL if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP config CPU_32v5 bool - select TLS_REG_EMUL if SMP || !MMU + select TLS_REG_EMUL if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP config CPU_32v6 @@ -339,7 +334,6 @@ config CPU_CACHE_VIVT config CPU_CACHE_VIPT bool -if MMU # The copy-page model config CPU_COPY_V3 bool @@ -378,8 +372,6 @@ config CPU_TLB_V4WBI config CPU_TLB_V6 bool -endif - # # CPU supports 36-bit I/O # diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 21a277022..07a538505 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile @@ -2,16 +2,10 @@ # Makefile for the linux arm-specific parts of the memory manager. # -obj-y := consistent.o extable.o fault.o init.o \ - iomap.o - -obj-$(CONFIG_MMU) += fault-armv.o flush.o ioremap.o mmap.o \ +obj-y := consistent.o extable.o fault-armv.o \ + fault.o flush.o init.o ioremap.o mmap.o \ mm-armv.o -ifneq ($(CONFIG_MMU),y) -obj-y += nommu.o -endif - obj-$(CONFIG_MODULES) += proc-syms.o obj-$(CONFIG_ALIGNMENT_TRAP) += alignment.o diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index e0d21bbbe..705c98921 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -11,6 +11,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 2ebc1b3bf..54e3c5bb5 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mm/copypage-v3.S b/arch/arm/mm/copypage-v3.S index 2ee394b11..3c58ebbf0 100644 --- a/arch/arm/mm/copypage-v3.S +++ b/arch/arm/mm/copypage-v3.S @@ -35,7 +35,7 @@ ENTRY(v3_copy_user_page) stmia r0!, {r3, r4, ip, lr} @ 4 ldmneia r1!, {r3, r4, ip, lr} @ 4 bne 1b @ 1 - ldmfd sp!, {r4, pc} @ 3 + LOADREGS(fd, sp!, {r4, pc}) @ 3 .align 5 /* diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index c5e0622c7..4a884baf3 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -8,6 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index d438ce41c..b103e5680 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -87,32 +87,6 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig if (cache_is_vipt_aliasing()) flush_pfn_alias(pfn, user_addr); } - -void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, - unsigned long uaddr, void *kaddr, - unsigned long len, int write) -{ - if (cache_is_vivt()) { - if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { - unsigned long addr = (unsigned long)kaddr; - __cpuc_coherent_kern_range(addr, addr + len); - } - return; - } - - if (cache_is_vipt_aliasing()) { - flush_pfn_alias(page_to_pfn(page), uaddr); - return; - } - - /* VIPT non-aliasing cache */ - if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask) && - vma->vm_flags | VM_EXEC) { - unsigned long addr = (unsigned long)kaddr; - /* only flushing the kernel mapping on non-aliasing VIPT */ - __cpuc_coherent_kern_range(addr, addr + len); - } -} #else #define flush_pfn_alias(pfn,vaddr) do { } while (0) #endif diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index fe3f7f625..9ea1f87a7 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -25,6 +26,8 @@ #include #include +#define TABLE_SIZE (2 * PTRS_PER_PTE * sizeof(pte_t)) + DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c deleted file mode 100644 index 62066f302..000000000 --- a/arch/arm/mm/iomap.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * linux/arch/arm/mm/iomap.c - * - * Map IO port and PCI memory spaces so that {read,write}[bwl] can - * be used to access this memory. - */ -#include -#include -#include - -#include - -#ifdef __io -void __iomem *ioport_map(unsigned long port, unsigned int nr) -{ - return __io(port); -} -EXPORT_SYMBOL(ioport_map); - -void ioport_unmap(void __iomem *addr) -{ -} -EXPORT_SYMBOL(ioport_unmap); -#endif - -#ifdef CONFIG_PCI -void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) -{ - unsigned long start = pci_resource_start(dev, bar); - unsigned long len = pci_resource_len(dev, bar); - unsigned long flags = pci_resource_flags(dev, bar); - - if (!len || !start) - return NULL; - if (maxlen && len > maxlen) - len = maxlen; - if (flags & IORESOURCE_IO) - return ioport_map(start, len); - if (flags & IORESOURCE_MEM) { - if (flags & IORESOURCE_CACHEABLE) - return ioremap(start, len); - return ioremap_nocache(start, len); - } - return NULL; -} -EXPORT_SYMBOL(pci_iomap); - -void pci_iounmap(struct pci_dev *dev, void __iomem *addr) -{ - if ((unsigned long)addr >= VMALLOC_START && - (unsigned long)addr < VMALLOC_END) - iounmap(addr); -} -EXPORT_SYMBOL(pci_iounmap); -#endif diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 88a999df0..c1f7180c7 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -27,16 +27,7 @@ #include #include -#include -#include #include -#include - -/* - * Used by ioremap() and iounmap() code to mark (super)section-mapped - * I/O regions in vm_struct->flags field. - */ -#define VM_ARM_SECTION_MAPPING 0x80000000 static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, @@ -122,168 +113,10 @@ remap_area_pages(unsigned long start, unsigned long pfn, dir++; } while (address && (address < end)); + flush_cache_vmap(start, end); return err; } - -void __check_kvm_seq(struct mm_struct *mm) -{ - unsigned int seq; - - do { - seq = init_mm.context.kvm_seq; - memcpy(pgd_offset(mm, VMALLOC_START), - pgd_offset_k(VMALLOC_START), - sizeof(pgd_t) * (pgd_index(VMALLOC_END) - - pgd_index(VMALLOC_START))); - mm->context.kvm_seq = seq; - } while (seq != init_mm.context.kvm_seq); -} - -#ifndef CONFIG_SMP -/* - * Section support is unsafe on SMP - If you iounmap and ioremap a region, - * the other CPUs will not see this change until their next context switch. - * Meanwhile, (eg) if an interrupt comes in on one of those other CPUs - * which requires the new ioremap'd region to be referenced, the CPU will - * reference the _old_ region. - * - * Note that get_vm_area() allocates a guard 4K page, so we need to mask - * the size back to 1MB aligned or we will overflow in the loop below. - */ -static void unmap_area_sections(unsigned long virt, unsigned long size) -{ - unsigned long addr = virt, end = virt + (size & ~SZ_1M); - pgd_t *pgd; - - flush_cache_vunmap(addr, end); - pgd = pgd_offset_k(addr); - do { - pmd_t pmd, *pmdp = pmd_offset(pgd, addr); - - pmd = *pmdp; - if (!pmd_none(pmd)) { - /* - * Clear the PMD from the page table, and - * increment the kvm sequence so others - * notice this change. - * - * Note: this is still racy on SMP machines. - */ - pmd_clear(pmdp); - init_mm.context.kvm_seq++; - - /* - * Free the page table, if there was one. - */ - if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE) - pte_free_kernel(pmd_page_kernel(pmd)); - } - - addr += PGDIR_SIZE; - pgd++; - } while (addr < end); - - /* - * Ensure that the active_mm is up to date - we want to - * catch any use-after-iounmap cases. - */ - if (current->active_mm->context.kvm_seq != init_mm.context.kvm_seq) - __check_kvm_seq(current->active_mm); - - flush_tlb_kernel_range(virt, end); -} - -static int -remap_area_sections(unsigned long virt, unsigned long pfn, - unsigned long size, unsigned long flags) -{ - unsigned long prot, addr = virt, end = virt + size; - pgd_t *pgd; - - /* - * Remove and free any PTE-based mapping, and - * sync the current kernel mapping. - */ - unmap_area_sections(virt, size); - - prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO) | - (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)); - - /* - * ARMv6 and above need XN set to prevent speculative prefetches - * hitting IO. - */ - if (cpu_architecture() >= CPU_ARCH_ARMv6) - prot |= PMD_SECT_XN; - - pgd = pgd_offset_k(addr); - do { - pmd_t *pmd = pmd_offset(pgd, addr); - - pmd[0] = __pmd(__pfn_to_phys(pfn) | prot); - pfn += SZ_1M >> PAGE_SHIFT; - pmd[1] = __pmd(__pfn_to_phys(pfn) | prot); - pfn += SZ_1M >> PAGE_SHIFT; - flush_pmd_entry(pmd); - - addr += PGDIR_SIZE; - pgd++; - } while (addr < end); - - return 0; -} - -static int -remap_area_supersections(unsigned long virt, unsigned long pfn, - unsigned long size, unsigned long flags) -{ - unsigned long prot, addr = virt, end = virt + size; - pgd_t *pgd; - - /* - * Remove and free any PTE-based mapping, and - * sync the current kernel mapping. - */ - unmap_area_sections(virt, size); - - prot = PMD_TYPE_SECT | PMD_SECT_SUPER | PMD_SECT_AP_WRITE | - PMD_DOMAIN(DOMAIN_IO) | - (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)); - - /* - * ARMv6 and above need XN set to prevent speculative prefetches - * hitting IO. - */ - if (cpu_architecture() >= CPU_ARCH_ARMv6) - prot |= PMD_SECT_XN; - - pgd = pgd_offset_k(virt); - do { - unsigned long super_pmd_val, i; - - super_pmd_val = __pfn_to_phys(pfn) | prot; - super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; - - for (i = 0; i < 8; i++) { - pmd_t *pmd = pmd_offset(pgd, addr); - - pmd[0] = __pmd(super_pmd_val); - pmd[1] = __pmd(super_pmd_val); - flush_pmd_entry(pmd); - - addr += PGDIR_SIZE; - pgd++; - } - - pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; - } while (addr < end); - - return 0; -} -#endif - - /* * Remap an arbitrary physical address space into the kernel virtual * address space. Needed when the kernel wants to access high addresses @@ -300,41 +133,18 @@ void __iomem * __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, unsigned long flags) { - int err; unsigned long addr; struct vm_struct * area; - /* - * High mappings must be supersection aligned - */ - if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) - return NULL; - area = get_vm_area(size, VM_IOREMAP); if (!area) return NULL; addr = (unsigned long)area->addr; - -#ifndef CONFIG_SMP - if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || - cpu_is_xsc3()) && - !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { - area->flags |= VM_ARM_SECTION_MAPPING; - err = remap_area_supersections(addr, pfn, size, flags); - } else if (!((__pfn_to_phys(pfn) | size | addr) & ~PMD_MASK)) { - area->flags |= VM_ARM_SECTION_MAPPING; - err = remap_area_sections(addr, pfn, size, flags); - } else -#endif - err = remap_area_pages(addr, pfn, size, flags); - - if (err) { + if (remap_area_pages(addr, pfn, size, flags)) { vunmap((void *)addr); return NULL; } - - flush_cache_vmap(addr, addr + size); - return (void __iomem *) (offset + addr); + return (void __iomem *) (offset + (char *)addr); } EXPORT_SYMBOL(__ioremap_pfn); @@ -363,38 +173,53 @@ EXPORT_SYMBOL(__ioremap); void __iounmap(void __iomem *addr) { -#ifndef CONFIG_SMP - struct vm_struct **p, *tmp; + vunmap((void *)(PAGE_MASK & (unsigned long)addr)); +} +EXPORT_SYMBOL(__iounmap); + +#ifdef __io +void __iomem *ioport_map(unsigned long port, unsigned int nr) +{ + return __io(port); +} +EXPORT_SYMBOL(ioport_map); + +void ioport_unmap(void __iomem *addr) +{ +} +EXPORT_SYMBOL(ioport_unmap); #endif - unsigned int section_mapping = 0; - addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr); +#ifdef CONFIG_PCI +#include +#include -#ifndef CONFIG_SMP - /* - * If this is a section based mapping we need to handle it - * specially as the VM subysystem does not know how to handle - * such a beast. We need the lock here b/c we need to clear - * all the mappings before the area can be reclaimed - * by someone else. - */ - write_lock(&vmlist_lock); - for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { - if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { - if (tmp->flags & VM_ARM_SECTION_MAPPING) { - *p = tmp->next; - unmap_area_sections((unsigned long)tmp->addr, - tmp->size); - kfree(tmp); - section_mapping = 1; - } - break; - } +void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) +{ + unsigned long start = pci_resource_start(dev, bar); + unsigned long len = pci_resource_len(dev, bar); + unsigned long flags = pci_resource_flags(dev, bar); + + if (!len || !start) + return NULL; + if (maxlen && len > maxlen) + len = maxlen; + if (flags & IORESOURCE_IO) + return ioport_map(start, len); + if (flags & IORESOURCE_MEM) { + if (flags & IORESOURCE_CACHEABLE) + return ioremap(start, len); + return ioremap_nocache(start, len); } - write_unlock(&vmlist_lock); -#endif + return NULL; +} +EXPORT_SYMBOL(pci_iomap); - if (!section_mapping) - vunmap(addr); +void pci_iounmap(struct pci_dev *dev, void __iomem *addr) +{ + if ((unsigned long)addr >= VMALLOC_START && + (unsigned long)addr < VMALLOC_END) + iounmap(addr); } -EXPORT_SYMBOL(__iounmap); +EXPORT_SYMBOL(pci_iounmap); +#endif diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 38769f586..95273de4f 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -9,6 +9,7 @@ * * Page table sludge for ARM v3 and v4 processor architectures. */ +#include #include #include #include @@ -226,7 +227,7 @@ void free_pgd_slow(pgd_t *pgd) pte = pmd_page(*pmd); pmd_clear(pmd); - dec_zone_page_state(virt_to_page((unsigned long *)pgd), NR_PAGETABLE); + dec_page_state(nr_page_table_pages); pte_lock_deinit(pte); pte_free(pte); pmd_free(pmd); @@ -302,16 +303,16 @@ static struct mem_types mem_types[] __initdata = { .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE, .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | + .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | PMD_SECT_AP_WRITE, .domain = DOMAIN_IO, }, [MT_CACHECLEAN] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4, + .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, }, [MT_MINICLEAN] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE, + .prot_sect = PMD_TYPE_SECT | PMD_SECT_MINICACHE, .domain = DOMAIN_KERNEL, }, [MT_LOW_VECTORS] = { @@ -327,25 +328,25 @@ static struct mem_types mem_types[] __initdata = { .domain = DOMAIN_USER, }, [MT_MEMORY] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE, + .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, .domain = DOMAIN_KERNEL, }, [MT_ROM] = { - .prot_sect = PMD_TYPE_SECT | PMD_BIT4, + .prot_sect = PMD_TYPE_SECT, .domain = DOMAIN_KERNEL, }, [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE, .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | + .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | PMD_SECT_TEX(1), .domain = DOMAIN_IO, }, [MT_NONSHARED_DEVICE] = { .prot_l1 = PMD_TYPE_TABLE, - .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_NONSHARED_DEV | + .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV | PMD_SECT_AP_WRITE, .domain = DOMAIN_IO, } @@ -375,21 +376,14 @@ void __init build_mem_type_table(void) ecc_mask = 0; } - /* - * Xscale must not have PMD bit 4 set for section mappings. - */ - if (cpu_is_xscale()) - for (i = 0; i < ARRAY_SIZE(mem_types); i++) - mem_types[i].prot_sect &= ~PMD_BIT4; - - /* - * ARMv5 and lower, excluding Xscale, bit 4 must be set for - * page tables. - */ - if (cpu_arch < CPU_ARCH_ARMv6 && !cpu_is_xscale()) - for (i = 0; i < ARRAY_SIZE(mem_types); i++) + if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { + for (i = 0; i < ARRAY_SIZE(mem_types); i++) { if (mem_types[i].prot_l1) mem_types[i].prot_l1 |= PMD_BIT4; + if (mem_types[i].prot_sect) + mem_types[i].prot_sect |= PMD_BIT4; + } + } cp = &cache_policies[cachepolicy]; kern_pgprot = user_pgprot = cp->pte; @@ -413,8 +407,8 @@ void __init build_mem_type_table(void) * bit 4 becomes XN which we must clear for the * kernel memory mapping. */ - mem_types[MT_MEMORY].prot_sect &= ~PMD_SECT_XN; - mem_types[MT_ROM].prot_sect &= ~PMD_SECT_XN; + mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4; + mem_types[MT_ROM].prot_sect &= ~PMD_BIT4; /* * Mark cache clean areas and XIP ROM read only diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 29e54807c..3de7f84b5 100644 --- a/arch/arm/mm/mmap.c +++ b/arch/arm/mm/mmap.c @@ -1,6 +1,7 @@ /* * linux/arch/arm/mm/mmap.c */ +#include #include #include #include diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c deleted file mode 100644 index 1464ed817..000000000 --- a/arch/arm/mm/nommu.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * linux/arch/arm/mm/nommu.c - * - * ARM uCLinux supporting functions. - */ -#include -#include -#include - -#include -#include -#include - -void flush_dcache_page(struct page *page) -{ - __cpuc_flush_dcache_page(page_address(page)); -} -EXPORT_SYMBOL(flush_dcache_page); - -void __iomem *__ioremap_pfn(unsigned long pfn, unsigned long offset, - size_t size, unsigned long flags) -{ - if (pfn >= (0x100000000ULL >> PAGE_SHIFT)) - return NULL; - return (void __iomem *) (offset + (pfn << PAGE_SHIFT)); -} -EXPORT_SYMBOL(__ioremap_pfn); - -void __iomem *__ioremap(unsigned long phys_addr, size_t size, - unsigned long flags) -{ - return (void __iomem *)phys_addr; -} -EXPORT_SYMBOL(__ioremap); - -void __iounmap(void __iomem *addr) -{ -} -EXPORT_SYMBOL(__iounmap); diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 1d8316f3c..959588884 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S @@ -3,7 +3,6 @@ * * Copyright (C) 2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -26,6 +25,7 @@ * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt */ #include +#include #include #include #include @@ -34,8 +34,6 @@ #include #include -#include "proc-macros.S" - /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger @@ -103,9 +101,7 @@ ENTRY(cpu_arm1020_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -363,7 +359,6 @@ ENTRY(cpu_arm1020_dcache_clean_area) */ .align 5 ENTRY(cpu_arm1020_switch_mm) -#ifdef CONFIG_MMU #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r3, c7, c10, 4 mov r1, #0xF @ 16 segments @@ -388,7 +383,6 @@ ENTRY(cpu_arm1020_switch_mm) mcr p15, 0, r1, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs -#endif /* CONFIG_MMU */ mov pc, lr /* @@ -398,7 +392,6 @@ ENTRY(cpu_arm1020_switch_mm) */ .align 5 ENTRY(cpu_arm1020_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -428,7 +421,6 @@ ENTRY(cpu_arm1020_set_pte) mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -438,15 +430,12 @@ __arm1020_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - - adr r5, arm1020_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm1020_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm1020_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .R.. .... .... .... #endif @@ -458,9 +447,12 @@ __arm1020_setup: * .RVI ZFRS BLDP WCAM * .011 1001 ..11 0101 */ - .type arm1020_crval, #object -arm1020_crval: - crval clear=0x0000593f, mmuset=0x00003935, ucset=0x00001930 + .type arm1020_cr1_clear, #object + .type arm1020_cr1_set, #object +arm1020_cr1_clear: + .word 0x593f +arm1020_cr1_set: + .word 0x3935 __INITDATA @@ -523,9 +515,6 @@ cpu_arm1020_name: __arm1020_proc_info: .long 0x4104a200 @ ARM 1020T (Architecture v5T) .long 0xff0ffff0 - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 89b1d6d3d..be6d081ff 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S @@ -3,7 +3,6 @@ * * Copyright (C) 2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -26,6 +25,7 @@ * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt */ #include +#include #include #include #include @@ -34,8 +34,6 @@ #include #include -#include "proc-macros.S" - /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger @@ -103,9 +101,7 @@ ENTRY(cpu_arm1020e_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -348,7 +344,6 @@ ENTRY(cpu_arm1020e_dcache_clean_area) */ .align 5 ENTRY(cpu_arm1020e_switch_mm) -#ifdef CONFIG_MMU #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r3, c7, c10, 4 mov r1, #0xF @ 16 segments @@ -372,7 +367,6 @@ ENTRY(cpu_arm1020e_switch_mm) mcr p15, 0, r1, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -382,7 +376,6 @@ ENTRY(cpu_arm1020e_switch_mm) */ .align 5 ENTRY(cpu_arm1020e_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -410,7 +403,6 @@ ENTRY(cpu_arm1020e_set_pte) #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -420,14 +412,12 @@ __arm1020e_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - adr r5, arm1020e_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm1020e_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm1020e_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .R.. .... .... .... #endif @@ -439,9 +429,12 @@ __arm1020e_setup: * .RVI ZFRS BLDP WCAM * .011 1001 ..11 0101 */ - .type arm1020e_crval, #object -arm1020e_crval: - crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 + .type arm1020e_cr1_clear, #object + .type arm1020e_cr1_set, #object +arm1020e_cr1_clear: + .word 0x5f3f +arm1020e_cr1_set: + .word 0x3935 __INITDATA @@ -475,7 +468,25 @@ cpu_elf_name: .type cpu_arm1020e_name, #object cpu_arm1020e_name: - .asciz "ARM1020E" + .ascii "ARM1020E" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#endif +#ifndef CONFIG_CPU_BPREDICT_DISABLE + .ascii "B" +#endif +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + .ascii "RR" +#endif + .ascii "\0" .size cpu_arm1020e_name, . - cpu_arm1020e_name .align @@ -486,10 +497,6 @@ cpu_arm1020e_name: __arm1020e_proc_info: .long 0x4105a200 @ ARM 1020TE (Architecture v5TE) .long 0xff0ffff0 - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index a089528e6..f778545d5 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S @@ -3,7 +3,6 @@ * * Copyright (C) 2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -15,6 +14,7 @@ * functions on the ARM1022E. */ #include +#include #include #include #include @@ -23,8 +23,6 @@ #include #include -#include "proc-macros.S" - /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger @@ -92,9 +90,7 @@ ENTRY(cpu_arm1022_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -337,7 +333,6 @@ ENTRY(cpu_arm1022_dcache_clean_area) */ .align 5 ENTRY(cpu_arm1022_switch_mm) -#ifdef CONFIG_MMU #ifndef CONFIG_CPU_DCACHE_DISABLE mov r1, #(CACHE_DSEGMENTS - 1) << 5 @ 16 segments 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries @@ -354,7 +349,6 @@ ENTRY(cpu_arm1022_switch_mm) mcr p15, 0, r1, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -364,7 +358,6 @@ ENTRY(cpu_arm1022_switch_mm) */ .align 5 ENTRY(cpu_arm1022_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -392,7 +385,6 @@ ENTRY(cpu_arm1022_set_pte) #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -402,14 +394,12 @@ __arm1022_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - adr r5, arm1022_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm1022_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm1022_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .R.............. #endif @@ -422,9 +412,12 @@ __arm1022_setup: * .011 1001 ..11 0101 * */ - .type arm1022_crval, #object -arm1022_crval: - crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 + .type arm1022_cr1_clear, #object + .type arm1022_cr1_set, #object +arm1022_cr1_clear: + .word 0x7f3f +arm1022_cr1_set: + .word 0x3935 __INITDATA @@ -458,7 +451,25 @@ cpu_elf_name: .type cpu_arm1022_name, #object cpu_arm1022_name: - .asciz "ARM1022" + .ascii "arm1022" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#endif +#ifndef CONFIG_CPU_BPREDICT_DISABLE + .ascii "B" +#endif +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + .ascii "RR" +#endif + .ascii "\0" .size cpu_arm1022_name, . - cpu_arm1022_name .align @@ -469,10 +480,6 @@ cpu_arm1022_name: __arm1022_proc_info: .long 0x4105a220 @ ARM 1022E (v5TE) .long 0xff0ffff0 - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index d6d84d92c..148c111fd 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S @@ -3,7 +3,6 @@ * * Copyright (C) 2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -15,6 +14,7 @@ * functions on the ARM1026EJ-S. */ #include +#include #include #include #include @@ -23,8 +23,6 @@ #include #include -#include "proc-macros.S" - /* * This is the maximum size of an area which will be invalidated * using the single invalidate entry instructions. Anything larger @@ -92,9 +90,7 @@ ENTRY(cpu_arm1026_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -331,7 +327,6 @@ ENTRY(cpu_arm1026_dcache_clean_area) */ .align 5 ENTRY(cpu_arm1026_switch_mm) -#ifdef CONFIG_MMU mov r1, #0 #ifndef CONFIG_CPU_DCACHE_DISABLE 1: mrc p15, 0, r15, c7, c14, 3 @ test, clean, invalidate @@ -343,7 +338,6 @@ ENTRY(cpu_arm1026_switch_mm) mcr p15, 0, r1, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -353,7 +347,6 @@ ENTRY(cpu_arm1026_switch_mm) */ .align 5 ENTRY(cpu_arm1026_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -381,7 +374,6 @@ ENTRY(cpu_arm1026_set_pte) #ifndef CONFIG_CPU_DCACHE_DISABLE mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif -#endif /* CONFIG_MMU */ mov pc, lr @@ -392,19 +384,17 @@ __arm1026_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 mcr p15, 0, r4, c2, c0 @ load page table pointer -#endif #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mov r0, #4 @ explicitly disable writeback mcr p15, 7, r0, c15, c0, 0 #endif - adr r5, arm1026_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm1026_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm1026_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .R.. .... .... .... #endif @@ -417,9 +407,12 @@ __arm1026_setup: * .011 1001 ..11 0101 * */ - .type arm1026_crval, #object -arm1026_crval: - crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001934 + .type arm1026_cr1_clear, #object + .type arm1026_cr1_set, #object +arm1026_cr1_clear: + .word 0x7f3f +arm1026_cr1_set: + .word 0x3935 __INITDATA @@ -454,7 +447,25 @@ cpu_elf_name: .type cpu_arm1026_name, #object cpu_arm1026_name: - .asciz "ARM1026EJ-S" + .ascii "ARM1026EJ-S" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#endif +#ifndef CONFIG_CPU_BPREDICT_DISABLE + .ascii "B" +#endif +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + .ascii "RR" +#endif + .ascii "\0" .size cpu_arm1026_name, . - cpu_arm1026_name .align @@ -465,10 +476,6 @@ cpu_arm1026_name: __arm1026_proc_info: .long 0x4106a260 @ ARM 1026EJ-S (v5TEJ) .long 0xff0ffff0 - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 0432e4806..540359b47 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S @@ -2,7 +2,6 @@ * linux/arch/arm/mm/proc-arm6,7.S * * Copyright (C) 1997-2000 Russell King - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -200,12 +199,10 @@ ENTRY(cpu_arm7_do_idle) */ ENTRY(cpu_arm6_switch_mm) ENTRY(cpu_arm7_switch_mm) -#ifdef CONFIG_MMU mov r1, #0 mcr p15, 0, r1, c7, c0, 0 @ flush cache mcr p15, 0, r0, c2, c0, 0 @ update page table ptr mcr p15, 0, r1, c5, c0, 0 @ flush TLBs -#endif mov pc, lr /* @@ -217,7 +214,6 @@ ENTRY(cpu_arm7_switch_mm) .align 5 ENTRY(cpu_arm6_set_pte) ENTRY(cpu_arm7_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -236,7 +232,6 @@ ENTRY(cpu_arm7_set_pte) movne r2, #0 str r2, [r0] @ hardware version -#endif /* CONFIG_MMU */ mov pc, lr /* @@ -248,9 +243,7 @@ ENTRY(cpu_arm6_reset) ENTRY(cpu_arm7_reset) mov r1, #0 mcr p15, 0, r1, c7, c0, 0 @ flush cache -#ifdef CONFIG_MMU mcr p15, 0, r1, c5, c0, 0 @ flush TLB -#endif mov r1, #0x30 mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc mov pc, r0 @@ -260,27 +253,19 @@ ENTRY(cpu_arm7_reset) .type __arm6_setup, #function __arm6_setup: mov r0, #0 mcr p15, 0, r0, c7, c0 @ flush caches on v3 -#ifdef CONFIG_MMU mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 mov r0, #0x3d @ . ..RS BLDP WCAM orr r0, r0, #0x100 @ . ..01 0011 1101 -#else - mov r0, #0x3c @ . ..RS BLDP WCA. -#endif mov pc, lr .size __arm6_setup, . - __arm6_setup .type __arm7_setup, #function __arm7_setup: mov r0, #0 mcr p15, 0, r0, c7, c0 @ flush caches on v3 -#ifdef CONFIG_MMU mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 mcr p15, 0, r0, c3, c0 @ load domain access register mov r0, #0x7d @ . ..RS BLDP WCAM orr r0, r0, #0x100 @ . ..01 0111 1101 -#else - mov r0, #0x7c @ . ..RS BLDP WCA. -#endif mov pc, lr .size __arm7_setup, . - __arm7_setup @@ -355,10 +340,6 @@ __arm6_proc_info: .long 0x41560600 .long 0xfffffff0 .long 0x00000c1e - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm6_setup .long cpu_arch_name .long cpu_elf_name @@ -375,10 +356,6 @@ __arm610_proc_info: .long 0x41560610 .long 0xfffffff0 .long 0x00000c1e - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm6_setup .long cpu_arch_name .long cpu_elf_name @@ -395,10 +372,6 @@ __arm7_proc_info: .long 0x41007000 .long 0xffffff00 .long 0x00000c1e - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm7_setup .long cpu_arch_name .long cpu_elf_name @@ -420,10 +393,6 @@ __arm710_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm7_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index c2f0705bf..26f00ee2a 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S @@ -4,7 +4,6 @@ * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) * Rob Scott (rscott@mtrob.fdns.net) * Copyright (C) 2000 ARM Limited, Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2004. * * 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 @@ -30,7 +29,6 @@ * out of 'proc-arm6,7.S' per RMK discussion * 07-25-2000 SJH Added idle function. * 08-25-2000 DBS Updated for integration of ARM Ltd version. - * 04-20-2004 HSC modified for non-paged memory management mode. */ #include #include @@ -41,8 +39,6 @@ #include #include -#include "proc-macros.S" - /* * Function: arm720_proc_init (void) * : arm720_proc_fin (void) @@ -79,12 +75,10 @@ ENTRY(cpu_arm720_do_idle) * the new. */ ENTRY(cpu_arm720_switch_mm) -#ifdef CONFIG_MMU mov r1, #0 mcr p15, 0, r1, c7, c7, 0 @ invalidate cache mcr p15, 0, r0, c2, c0, 0 @ update page table ptr mcr p15, 0, r1, c8, c7, 0 @ flush TLB (v4) -#endif mov pc, lr /* @@ -95,7 +89,6 @@ ENTRY(cpu_arm720_switch_mm) */ .align 5 ENTRY(cpu_arm720_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -114,7 +107,6 @@ ENTRY(cpu_arm720_set_pte) movne r2, #0 str r2, [r0] @ hardware version -#endif mov pc, lr /* @@ -125,9 +117,7 @@ ENTRY(cpu_arm720_set_pte) ENTRY(cpu_arm720_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate cache -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ flush TLB (v4) -#endif mrc p15, 0, ip, c1, c0, 0 @ get ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x2100 @ ..v....s........ @@ -140,9 +130,7 @@ ENTRY(cpu_arm720_reset) __arm710_setup: mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ invalidate caches -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) -#endif mrc p15, 0, r0, c1, c0 @ get control register ldr r5, arm710_cr1_clear bic r0, r0, r5 @@ -168,14 +156,12 @@ arm710_cr1_set: __arm720_setup: mov r0, #0 mcr p15, 0, r0, c7, c7, 0 @ invalidate caches -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) -#endif - adr r5, arm720_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register + ldr r5, arm720_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm720_cr1_set + orr r0, r0, r5 mov pc, lr @ __ret (head.S) .size __arm720_setup, . - __arm720_setup @@ -185,9 +171,12 @@ __arm720_setup: * ..1. 1001 ..11 1101 * */ - .type arm720_crval, #object -arm720_crval: - crval clear=0x00002f3f, mmuset=0x0000213d, ucset=0x00000130 + .type arm720_cr1_clear, #object + .type arm720_cr1_set, #object +arm720_cr1_clear: + .word 0x2f3f +arm720_cr1_set: + .word 0x213d __INITDATA @@ -245,10 +234,6 @@ __arm710_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm710_setup @ cpu_flush .long cpu_arch_name @ arch_name .long cpu_elf_name @ elf_name @@ -270,10 +255,6 @@ __arm720_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm720_setup @ cpu_flush .long cpu_arch_name @ arch_name .long cpu_elf_name @ elf_name diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 4adb46b3a..a17f79e01 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S @@ -3,7 +3,6 @@ * * Copyright (C) 1999,2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -26,6 +25,7 @@ * CONFIG_CPU_ARM920_CPU_IDLE -> nohlt */ #include +#include #include #include #include @@ -97,9 +97,7 @@ ENTRY(cpu_arm920_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -319,7 +317,6 @@ ENTRY(cpu_arm920_dcache_clean_area) */ .align 5 ENTRY(cpu_arm920_switch_mm) -#ifdef CONFIG_MMU mov ip, #0 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache @@ -340,7 +337,6 @@ ENTRY(cpu_arm920_switch_mm) mcr p15, 0, ip, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -350,7 +346,6 @@ ENTRY(cpu_arm920_switch_mm) */ .align 5 ENTRY(cpu_arm920_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -377,7 +372,6 @@ ENTRY(cpu_arm920_set_pte) mov r0, r0 mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -387,14 +381,12 @@ __arm920_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - adr r5, arm920_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm920_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm920_cr1_set + orr r0, r0, r5 mov pc, lr .size __arm920_setup, . - __arm920_setup @@ -404,9 +396,12 @@ __arm920_setup: * ..11 0001 ..11 0101 * */ - .type arm920_crval, #object -arm920_crval: - crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 + .type arm920_cr1_clear, #object + .type arm920_cr1_set, #object +arm920_cr1_clear: + .word 0x3f3f +arm920_cr1_set: + .word 0x3135 __INITDATA @@ -440,7 +435,19 @@ cpu_elf_name: .type cpu_arm920_name, #object cpu_arm920_name: - .asciz "ARM920T" + .ascii "ARM920T" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#endif + .ascii "\0" .size cpu_arm920_name, . - cpu_arm920_name .align @@ -457,10 +464,6 @@ __arm920_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm920_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 571f082f0..bbde4a024 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S @@ -4,7 +4,6 @@ * Copyright (C) 1999,2000 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. * Copyright (C) 2001 Altera Corporation - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -27,6 +26,7 @@ * CONFIG_CPU_ARM922_CPU_IDLE -> nohlt */ #include +#include #include #include #include @@ -99,9 +99,7 @@ ENTRY(cpu_arm922_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -323,7 +321,6 @@ ENTRY(cpu_arm922_dcache_clean_area) */ .align 5 ENTRY(cpu_arm922_switch_mm) -#ifdef CONFIG_MMU mov ip, #0 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache @@ -344,7 +341,6 @@ ENTRY(cpu_arm922_switch_mm) mcr p15, 0, ip, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -354,7 +350,6 @@ ENTRY(cpu_arm922_switch_mm) */ .align 5 ENTRY(cpu_arm922_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -381,7 +376,6 @@ ENTRY(cpu_arm922_set_pte) mov r0, r0 mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -391,14 +385,12 @@ __arm922_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - adr r5, arm922_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm922_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm922_cr1_set + orr r0, r0, r5 mov pc, lr .size __arm922_setup, . - __arm922_setup @@ -408,9 +400,12 @@ __arm922_setup: * ..11 0001 ..11 0101 * */ - .type arm922_crval, #object -arm922_crval: - crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 + .type arm922_cr1_clear, #object + .type arm922_cr1_set, #object +arm922_cr1_clear: + .word 0x3f3f +arm922_cr1_set: + .word 0x3135 __INITDATA @@ -444,7 +439,19 @@ cpu_elf_name: .type cpu_arm922_name, #object cpu_arm922_name: - .asciz "ARM922T" + .ascii "ARM922T" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#endif + .ascii "\0" .size cpu_arm922_name, . - cpu_arm922_name .align @@ -461,10 +468,6 @@ __arm922_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm922_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 8d9a9f93b..224ce226a 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S @@ -9,8 +9,6 @@ * Update for Linux-2.6 and cache flush improvements * Copyright (C) 2004 Nokia Corporation by Tony Lindgren * - * hacked for non-paged-MM by Hyok S. Choi, 2004. - * * 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 @@ -50,6 +48,7 @@ */ #include +#include #include #include #include @@ -123,9 +122,7 @@ ENTRY(cpu_arm925_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -372,7 +369,6 @@ ENTRY(cpu_arm925_dcache_clean_area) */ .align 5 ENTRY(cpu_arm925_switch_mm) -#ifdef CONFIG_MMU mov ip, #0 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache @@ -387,7 +383,6 @@ ENTRY(cpu_arm925_switch_mm) mcr p15, 0, ip, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -397,7 +392,6 @@ ENTRY(cpu_arm925_switch_mm) */ .align 5 ENTRY(cpu_arm925_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -426,7 +420,6 @@ ENTRY(cpu_arm925_set_pte) mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif /* CONFIG_MMU */ mov pc, lr __INIT @@ -445,20 +438,18 @@ __arm925_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mov r0, #4 @ disable write-back on caches explicitly mcr p15, 7, r0, c15, c0, 0 #endif - adr r5, arm925_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm925_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm925_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .1.. .... .... .... #endif @@ -471,9 +462,12 @@ __arm925_setup: * .011 0001 ..11 1101 * */ - .type arm925_crval, #object -arm925_crval: - crval clear=0x00007f3f, mmuset=0x0000313d, ucset=0x00001130 + .type arm925_cr1_clear, #object + .type arm925_cr1_set, #object +arm925_cr1_clear: + .word 0x7f3f +arm925_cr1_set: + .word 0x313d __INITDATA @@ -507,7 +501,22 @@ cpu_elf_name: .type cpu_arm925_name, #object cpu_arm925_name: - .asciz "ARM925T" + .ascii "ARM925T" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + .ascii "RR" +#endif +#endif + .ascii "\0" .size cpu_arm925_name, . - cpu_arm925_name .align @@ -518,10 +527,6 @@ cpu_arm925_name: __arm925_proc_info: .long 0x54029250 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ @@ -541,10 +546,6 @@ __arm925_proc_info: __arm915_proc_info: .long 0x54029150 .long 0xfffffff0 - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ .long PMD_TYPE_SECT | \ PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 44a7a652d..4e2a087cf 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S @@ -3,7 +3,6 @@ * * Copyright (C) 1999-2001 ARM Limited * Copyright (C) 2000 Deep Blue Solutions Ltd. - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * 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 @@ -26,6 +25,7 @@ * CONFIG_CPU_ARM926_CPU_IDLE -> nohlt */ #include +#include #include #include #include @@ -85,9 +85,7 @@ ENTRY(cpu_arm926_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -331,7 +329,6 @@ ENTRY(cpu_arm926_dcache_clean_area) */ .align 5 ENTRY(cpu_arm926_switch_mm) -#ifdef CONFIG_MMU mov ip, #0 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH mcr p15, 0, ip, c7, c6, 0 @ invalidate D cache @@ -344,7 +341,6 @@ ENTRY(cpu_arm926_switch_mm) mcr p15, 0, ip, c7, c10, 4 @ drain WB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mov pc, lr /* @@ -354,7 +350,6 @@ ENTRY(cpu_arm926_switch_mm) */ .align 5 ENTRY(cpu_arm926_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -383,7 +378,6 @@ ENTRY(cpu_arm926_set_pte) mcr p15, 0, r0, c7, c10, 1 @ clean D entry #endif mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif mov pc, lr __INIT @@ -393,9 +387,7 @@ __arm926_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH @@ -403,11 +395,11 @@ __arm926_setup: mcr p15, 7, r0, c15, c0, 0 #endif - adr r5, arm926_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, arm926_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, arm926_cr1_set + orr r0, r0, r5 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN orr r0, r0, #0x4000 @ .1.. .... .... .... #endif @@ -420,9 +412,12 @@ __arm926_setup: * .011 0001 ..11 0101 * */ - .type arm926_crval, #object -arm926_crval: - crval clear=0x00007f3f, mmuset=0x00003135, ucset=0x00001134 + .type arm926_cr1_clear, #object + .type arm926_cr1_set, #object +arm926_cr1_clear: + .word 0x7f3f +arm926_cr1_set: + .word 0x3135 __INITDATA @@ -456,7 +451,22 @@ cpu_elf_name: .type cpu_arm926_name, #object cpu_arm926_name: - .asciz "ARM926EJ-S" + .ascii "ARM926EJ-S" +#ifndef CONFIG_CPU_ICACHE_DISABLE + .ascii "i" +#endif +#ifndef CONFIG_CPU_DCACHE_DISABLE + .ascii "d" +#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH + .ascii "(wt)" +#else + .ascii "(wb)" +#endif +#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN + .ascii "RR" +#endif +#endif + .ascii "\0" .size cpu_arm926_name, . - cpu_arm926_name .align @@ -473,14 +483,10 @@ __arm926_proc_info: PMD_BIT4 | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_BIT4 | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __arm926_setup .long cpu_arch_name .long cpu_elf_name - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA + .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA .long cpu_arm926_name .long arm926_processor_functions .long v4wbi_tlb_fns diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 9e2c89eb2..7cfc2604a 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -49,13 +49,3 @@ .macro asid, rd, rn and \rd, \rn, #255 .endm - - .macro crval, clear, mmuset, ucset -#ifdef CONFIG_MMU - .word \clear - .word \mmuset -#else - .word \clear - .word \ucset -#endif - .endm diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index c878064e9..a2dd5ae10 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S @@ -2,7 +2,6 @@ * linux/arch/arm/mm/proc-sa110.S * * Copyright (C) 1997-2002 Russell King - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -23,8 +22,6 @@ #include #include -#include "proc-macros.S" - /* * the cache line size of the I and D cache */ @@ -70,9 +67,7 @@ ENTRY(cpu_sa110_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -135,15 +130,11 @@ ENTRY(cpu_sa110_dcache_clean_area) */ .align 5 ENTRY(cpu_sa110_switch_mm) -#ifdef CONFIG_MMU str lr, [sp, #-4]! bl v4wb_flush_kern_cache_all @ clears IP mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs ldr pc, [sp], #4 -#else - mov pc, lr -#endif /* * cpu_sa110_set_pte(ptep, pte) @@ -152,7 +143,6 @@ ENTRY(cpu_sa110_switch_mm) */ .align 5 ENTRY(cpu_sa110_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -174,7 +164,6 @@ ENTRY(cpu_sa110_set_pte) mov r0, r0 mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif mov pc, lr __INIT @@ -184,15 +173,12 @@ __sa110_setup: mov r10, #0 mcr p15, 0, r10, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r10, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4 -#endif - - adr r5, sa110_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, sa110_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, sa110_cr1_set + orr r0, r0, r5 mov pc, lr .size __sa110_setup, . - __sa110_setup @@ -202,9 +188,12 @@ __sa110_setup: * ..01 0001 ..11 1101 * */ - .type sa110_crval, #object -sa110_crval: - crval clear=0x00003f3f, mmuset=0x0000113d, ucset=0x00001130 + .type sa110_cr1_clear, #object + .type sa110_cr1_set, #object +sa110_cr1_clear: + .word 0x3f3f +sa110_cr1_set: + .word 0x113d __INITDATA @@ -255,9 +244,6 @@ __sa110_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __sa110_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index b23b66a61..777ad99c1 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S @@ -2,7 +2,6 @@ * linux/arch/arm/mm/proc-sa1100.S * * Copyright (C) 1997-2002 Russell King - * hacked for non-paged-MM by Hyok S. Choi, 2003. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -27,8 +26,6 @@ #include #include -#include "proc-macros.S" - /* * the cache line size of the I and D cache */ @@ -80,9 +77,7 @@ ENTRY(cpu_sa1100_reset) mov ip, #0 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches mcr p15, 0, ip, c7, c10, 4 @ drain WB -#ifdef CONFIG_MMU mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs -#endif mrc p15, 0, ip, c1, c0, 0 @ ctrl register bic ip, ip, #0x000f @ ............wcam bic ip, ip, #0x1100 @ ...i...s........ @@ -147,16 +142,12 @@ ENTRY(cpu_sa1100_dcache_clean_area) */ .align 5 ENTRY(cpu_sa1100_switch_mm) -#ifdef CONFIG_MMU str lr, [sp, #-4]! bl v4wb_flush_kern_cache_all @ clears IP mcr p15, 0, ip, c9, c0, 0 @ invalidate RB mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs ldr pc, [sp], #4 -#else - mov pc, lr -#endif /* * cpu_sa1100_set_pte(ptep, pte) @@ -165,7 +156,6 @@ ENTRY(cpu_sa1100_switch_mm) */ .align 5 ENTRY(cpu_sa1100_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version eor r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY @@ -187,7 +177,6 @@ ENTRY(cpu_sa1100_set_pte) mov r0, r0 mcr p15, 0, r0, c7, c10, 1 @ clean D entry mcr p15, 0, r0, c7, c10, 4 @ drain WB -#endif mov pc, lr __INIT @@ -197,14 +186,12 @@ __sa1100_setup: mov r0, #0 mcr p15, 0, r0, c7, c7 @ invalidate I,D caches on v4 mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 -#endif - adr r5, sa1100_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0 @ get control register v4 + ldr r5, sa1100_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, sa1100_cr1_set + orr r0, r0, r5 mov pc, lr .size __sa1100_setup, . - __sa1100_setup @@ -214,9 +201,12 @@ __sa1100_setup: * ..11 0001 ..11 1101 * */ - .type sa1100_crval, #object -sa1100_crval: - crval clear=0x00003f3f, mmuset=0x0000313d, ucset=0x00001130 + .type sa1100_cr1_clear, #object + .type sa1100_cr1_set, #object +sa1100_cr1_clear: + .word 0x3f3f +sa1100_cr1_set: + .word 0x313d __INITDATA @@ -275,9 +265,6 @@ __sa1100_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __sa1100_setup .long cpu_arch_name .long cpu_elf_name @@ -298,9 +285,6 @@ __sa1110_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __sa1100_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c index ab143557e..6c5f0fe57 100644 --- a/arch/arm/mm/proc-syms.c +++ b/arch/arm/mm/proc-syms.c @@ -13,7 +13,6 @@ #include #include #include -#include #ifndef MULTI_CPU EXPORT_SYMBOL(cpu_dcache_clean_area); @@ -31,13 +30,6 @@ EXPORT_SYMBOL(__cpuc_coherent_kern_range); EXPORT_SYMBOL(cpu_cache); #endif -#ifndef MULTI_USER -EXPORT_SYMBOL(__cpu_clear_user_page); -EXPORT_SYMBOL(__cpu_copy_user_page); -#else -EXPORT_SYMBOL(cpu_user); -#endif - /* * No module should need to touch the TLB (and currently * no modules do. We export this for "loadkernel" support diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 6f72549f8..ee6f15298 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -2,7 +2,6 @@ * linux/arch/arm/mm/proc-v6.S * * Copyright (C) 2001 Deep Blue Solutions Ltd. - * Modified by Catalin Marinas for noMMU support * * 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 @@ -30,6 +29,38 @@ #define TTB_RGN_WT (2 << 3) #define TTB_RGN_WB (3 << 3) + .macro cpsie, flags + .ifc \flags, f + .long 0xf1080040 + .exitm + .endif + .ifc \flags, i + .long 0xf1080080 + .exitm + .endif + .ifc \flags, if + .long 0xf10800c0 + .exitm + .endif + .err + .endm + + .macro cpsid, flags + .ifc \flags, f + .long 0xf10c0040 + .exitm + .endif + .ifc \flags, i + .long 0xf10c0080 + .exitm + .endif + .ifc \flags, if + .long 0xf10c00c0 + .exitm + .endif + .err + .endm + ENTRY(cpu_v6_proc_init) mov pc, lr @@ -89,7 +120,6 @@ ENTRY(cpu_v6_dcache_clean_area) * - we are not using split page tables */ ENTRY(cpu_v6_switch_mm) -#ifdef CONFIG_MMU mov r2, #0 ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id #ifdef CONFIG_SMP @@ -99,7 +129,6 @@ ENTRY(cpu_v6_switch_mm) mcr p15, 0, r2, c7, c10, 4 @ drain write buffer mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 mcr p15, 0, r1, c13, c0, 1 @ set context ID -#endif mov pc, lr /* @@ -122,7 +151,6 @@ ENTRY(cpu_v6_switch_mm) * 1111 0 1 1 r/w r/w */ ENTRY(cpu_v6_set_pte) -#ifdef CONFIG_MMU str r1, [r0], #-2048 @ linux version bic r2, r1, #0x000003f0 @@ -149,7 +177,6 @@ ENTRY(cpu_v6_set_pte) str r2, [r0] mcr p15, 0, r0, c7, c10, 1 @ flush_pte -#endif mov pc, lr @@ -199,24 +226,22 @@ __v6_setup: mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache mcr p15, 0, r0, c7, c10, 4 @ drain write buffer -#ifdef CONFIG_MMU mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs mcr p15, 0, r0, c2, c0, 2 @ TTB control register #ifdef CONFIG_SMP orr r4, r4, #TTB_RGN_WBWA|TTB_S @ mark PTWs shared, outer cacheable #endif mcr p15, 0, r4, c2, c0, 1 @ load TTB1 -#endif /* CONFIG_MMU */ #ifdef CONFIG_VFP mrc p15, 0, r0, c1, c0, 2 orr r0, r0, #(0xf << 20) mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP #endif - adr r5, v6_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0, 0 @ read control register + ldr r5, v6_cr1_clear @ get mask for bits to clear bic r0, r0, r5 @ clear bits them - orr r0, r0, r6 @ set them + ldr r5, v6_cr1_set @ get mask for bits to set + orr r0, r0, r5 @ set them mov pc, lr @ return to head.S:__ret /* @@ -225,9 +250,12 @@ __v6_setup: * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced * 0 110 0011 1.00 .111 1101 < we want */ - .type v6_crval, #object -v6_crval: - crval clear=0x01e0fb7f, mmuset=0x00c0387d, ucset=0x00c0187c + .type v6_cr1_clear, #object + .type v6_cr1_set, #object +v6_cr1_clear: + .word 0x01e0fb7f +v6_cr1_set: + .word 0x00c0387d .type v6_processor_functions, #object ENTRY(v6_processor_functions) @@ -266,10 +294,6 @@ __v6_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_XN | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __v6_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 4ace2d809..8d32e21fe 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S @@ -426,26 +426,23 @@ __xsc3_setup: orr r0, r0, #(1 << 10) @ enable L2 for LLR cache #endif mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg - - adr r5, xsc3_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0, 0 @ get control register - bic r0, r0, r5 @ .... .... .... ..A. - orr r0, r0, r6 @ .... .... .... .C.M + bic r0, r0, #0x0002 @ .... .... .... ..A. + orr r0, r0, #0x0005 @ .... .... .... .C.M #if BTB_ENABLE - orr r0, r0, #0x00000800 @ ..VI Z..S .... .... + bic r0, r0, #0x0200 @ .... ..R. .... .... + orr r0, r0, #0x3900 @ ..VI Z..S .... .... +#else + bic r0, r0, #0x0a00 @ .... Z.R. .... .... + orr r0, r0, #0x3100 @ ..VI ...S .... .... #endif #if L2_CACHE_ENABLE - orr r0, r0, #0x04000000 @ L2 enable + orr r0, r0, #0x4000000 @ L2 enable #endif mov pc, lr .size __xsc3_setup, . - __xsc3_setup - .type xsc3_crval, #object -xsc3_crval: - crval clear=0x04003b02, mmuset=0x00003105, ucset=0x00001100 - __INITDATA /* @@ -490,14 +487,7 @@ cpu_xsc3_name: __xsc3_proc_info: .long 0x69056000 .long 0xffffe000 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xsc3_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 3ca0c92e9..29bcc4dd6 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -138,23 +138,17 @@ ENTRY(cpu_xscale_proc_fin) * to what would be the reset vector. * * loc: location to jump to for soft reset - * - * Beware PXA270 erratum E7. */ .align 5 ENTRY(cpu_xscale_reset) mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE msr cpsr_c, r1 @ reset CPSR - mcr p15, 0, r1, c10, c4, 1 @ unlock I-TLB - mcr p15, 0, r1, c8, c5, 0 @ invalidate I-TLB mrc p15, 0, r1, c1, c0, 0 @ ctrl register bic r1, r1, #0x0086 @ ........B....CA. bic r1, r1, #0x3900 @ ..VIZ..S........ - sub pc, pc, #4 @ flush pipeline - @ *** cache line aligned *** mcr p15, 0, r1, c1, c0, 0 @ ctrl register - bic r1, r1, #0x0001 @ ...............M mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB + bic r1, r1, #0x0001 @ ...............M mcr p15, 0, r1, c1, c0, 0 @ ctrl register @ CAUTION: MMU turned off from this point. We count on the pipeline @ already containing those two last instructions to survive. @@ -481,12 +475,11 @@ __xscale_setup: orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde orr r0, r0, #1 << 13 @ Its undefined whether this mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes - - adr r5, xscale_crval - ldmia r5, {r5, r6} mrc p15, 0, r0, c1, c0, 0 @ get control register + ldr r5, xscale_cr1_clear bic r0, r0, r5 - orr r0, r0, r6 + ldr r5, xscale_cr1_set + orr r0, r0, r5 mov pc, lr .size __xscale_setup, . - __xscale_setup @@ -496,9 +489,12 @@ __xscale_setup: * ..11 1.01 .... .101 * */ - .type xscale_crval, #object -xscale_crval: - crval clear=0x00003b07, mmuset=0x00003905, ucset=0x00001900 + .type xscale_cr1_clear, #object + .type xscale_cr1_set, #object +xscale_cr1_clear: + .word 0x3b07 +xscale_cr1_set: + .word 0x3905 __INITDATA @@ -536,11 +532,6 @@ cpu_80200_name: .asciz "XScale-80200" .size cpu_80200_name, . - cpu_80200_name - .type cpu_80219_name, #object -cpu_80219_name: - .asciz "XScale-80219" - .size cpu_80219_name, . - cpu_80219_name - .type cpu_8032x_name, #object cpu_8032x_name: .asciz "XScale-IOP8032x Family" @@ -604,9 +595,6 @@ __80200_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -618,41 +606,15 @@ __80200_proc_info: .long xscale_cache_fns .size __80200_proc_info, . - __80200_proc_info - .type __80219_proc_info,#object -__80219_proc_info: - .long 0x69052e20 - .long 0xffffffe0 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ - b __xscale_setup - .long cpu_arch_name - .long cpu_elf_name - .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP - .long cpu_80219_name - .long xscale_processor_functions - .long v4wbi_tlb_fns - .long xscale_mc_user_fns - .long xscale_cache_fns - .size __80219_proc_info, . - __80219_proc_info - .type __8032x_proc_info,#object __8032x_proc_info: .long 0x69052420 - .long 0xfffff7e0 + .long 0xfffff5e0 @ mask should accomodate IOP80219 also .long PMD_TYPE_SECT | \ PMD_SECT_BUFFERABLE | \ PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -673,9 +635,6 @@ __8033x_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -696,9 +655,6 @@ __pxa250_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -719,9 +675,6 @@ __pxa210_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -742,9 +695,6 @@ __ixp2400_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -765,9 +715,6 @@ __ixp2800_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -788,9 +735,6 @@ __ixp42x_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -806,14 +750,7 @@ __ixp42x_proc_info: __ixp46x_proc_info: .long 0x69054200 .long 0xffffff00 - .long PMD_TYPE_SECT | \ - PMD_SECT_BUFFERABLE | \ - PMD_SECT_CACHEABLE | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ + .long 0x00000c0e b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -834,9 +771,6 @@ __pxa255_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name @@ -857,9 +791,6 @@ __pxa270_proc_info: PMD_SECT_CACHEABLE | \ PMD_SECT_AP_WRITE | \ PMD_SECT_AP_READ - .long PMD_TYPE_SECT | \ - PMD_SECT_AP_WRITE | \ - PMD_SECT_AP_READ b __xscale_setup .long cpu_arch_name .long cpu_elf_name diff --git a/arch/arm/nwfpe/entry26.S b/arch/arm/nwfpe/entry26.S index 3e6fb5d21..51940a96d 100644 --- a/arch/arm/nwfpe/entry26.S +++ b/arch/arm/nwfpe/entry26.S @@ -26,7 +26,7 @@ It is called from the kernel with code similar to this: mov fp, #0 - teqp pc, #PSR_I_BIT | SVC_MODE + teqp pc, #PSR_I_BIT | MODE_SVC ldr r4, .LC2 ldr pc, [r4] @ Call FP module USR entry point diff --git a/arch/arm/nwfpe/fpa11.c b/arch/arm/nwfpe/fpa11.c index cc60acde8..7b3d74d73 100644 --- a/arch/arm/nwfpe/fpa11.c +++ b/arch/arm/nwfpe/fpa11.c @@ -26,6 +26,7 @@ #include "fpmodule.h" #include "fpmodule.inl" +#include #include #include #include diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h index 4a4d02c09..28cd79a45 100644 --- a/arch/arm/nwfpe/fpa11.h +++ b/arch/arm/nwfpe/fpa11.h @@ -31,6 +31,7 @@ */ #define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1) +#include #include /* includes */ diff --git a/arch/arm/nwfpe/fpa11_cpdo.c b/arch/arm/nwfpe/fpa11_cpdo.c index 2cebb1529..4a31dfd94 100644 --- a/arch/arm/nwfpe/fpa11_cpdo.c +++ b/arch/arm/nwfpe/fpa11_cpdo.c @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "fpa11.h" #include "fpopcode.h" diff --git a/arch/arm/nwfpe/fpa11_cpdt.c b/arch/arm/nwfpe/fpa11_cpdt.c index 79f8e67cc..32859fa8d 100644 --- a/arch/arm/nwfpe/fpa11_cpdt.c +++ b/arch/arm/nwfpe/fpa11_cpdt.c @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "fpa11.h" #include "softfloat.h" #include "fpopcode.h" diff --git a/arch/arm/nwfpe/fpa11_cprt.c b/arch/arm/nwfpe/fpa11_cprt.c index 9843dc533..7c6702365 100644 --- a/arch/arm/nwfpe/fpa11_cprt.c +++ b/arch/arm/nwfpe/fpa11_cprt.c @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "fpa11.h" #include "fpopcode.h" #include "fpa11.inl" diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c index 4c0ab50f3..2dfe1ac42 100644 --- a/arch/arm/nwfpe/fpmodule.c +++ b/arch/arm/nwfpe/fpmodule.c @@ -24,6 +24,7 @@ #include "fpa11.h" #include +#include /* XXX */ #include @@ -32,8 +33,7 @@ #include #include #include - -#include +/* XXX */ #include "softfloat.h" #include "fpopcode.h" @@ -56,28 +56,16 @@ void fp_send_sig(unsigned long sig, struct task_struct *p, int priv); extern char fpe_type[]; #endif -static int nwfpe_notify(struct notifier_block *self, unsigned long cmd, void *v) -{ - struct thread_info *thread = v; - - if (cmd == THREAD_NOTIFY_FLUSH) - nwfpe_init_fpa(&thread->fpstate); - - return NOTIFY_DONE; -} - -static struct notifier_block nwfpe_notifier_block = { - .notifier_call = nwfpe_notify, -}; - /* kernel function prototypes required */ void fp_setup(void); /* external declarations for saved kernel symbols */ extern void (*kern_fp_enter)(void); +extern void (*fp_init)(union fp_state *); /* Original value of fp_enter from kernel before patched by fpe_init. */ static void (*orig_fp_enter)(void); +static void (*orig_fp_init)(union fp_state *); /* forward declarations */ extern void nwfpe_enter(void); @@ -100,20 +88,20 @@ static int __init fpe_init(void) printk(KERN_WARNING "NetWinder Floating Point Emulator V0.97 (" NWFPE_BITS " precision)\n"); - thread_register_notifier(&nwfpe_notifier_block); - /* Save pointer to the old FP handler and then patch ourselves in */ orig_fp_enter = kern_fp_enter; + orig_fp_init = fp_init; kern_fp_enter = nwfpe_enter; + fp_init = nwfpe_init_fpa; return 0; } static void __exit fpe_exit(void) { - thread_unregister_notifier(&nwfpe_notifier_block); /* Restore the values we saved earlier. */ kern_fp_enter = orig_fp_enter; + fp_init = orig_fp_init; } /* diff --git a/arch/arm/nwfpe/fpopcode.c b/arch/arm/nwfpe/fpopcode.c index 922b81107..67ff2ab08 100644 --- a/arch/arm/nwfpe/fpopcode.c +++ b/arch/arm/nwfpe/fpopcode.c @@ -19,6 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "fpa11.h" #include "softfloat.h" #include "fpopcode.h" diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index ec78e3517..6528e081c 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h @@ -23,6 +23,7 @@ #ifndef __FPOPCODE_H__ #define __FPOPCODE_H__ +#include /* ARM Floating Point Instruction Classes diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h index 0a3067452..978c69967 100644 --- a/arch/arm/nwfpe/softfloat.h +++ b/arch/arm/nwfpe/softfloat.h @@ -32,6 +32,7 @@ this code that are retained. #ifndef __SOFTFLOAT_H__ #define __SOFTFLOAT_H__ +#include /* ------------------------------------------------------------------------------- @@ -61,7 +62,7 @@ typedef struct { u16 __padding; #endif u64 low; -} __attribute__ ((packed,aligned(4))) floatx80; +} floatx80; /* ------------------------------------------------------------------------------- diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c index 34fdc7337..e0f0b320d 100644 --- a/arch/arm/oprofile/op_model_xscale.c +++ b/arch/arm/oprofile/op_model_xscale.c @@ -384,7 +384,7 @@ static int xscale_pmu_start(void) int ret; u32 pmnc = read_pmnc(); - ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt, IRQF_DISABLED, + ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt, SA_INTERRUPT, "XScale PMU", (void *)results); if (ret < 0) { diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index ec752e16d..ec49495e6 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -91,7 +91,7 @@ config OMAP_32K_TIMER_HZ config OMAP_DM_TIMER bool "Use dual-mode timer" - depends on ARCH_OMAP16XX || ARCH_OMAP24XX + depends on ARCH_OMAP16XX help Select this option if you want to use OMAP Dual-Mode timers. diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 7f45c7c3e..32ec04c58 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include @@ -27,9 +28,9 @@ #include -static LIST_HEAD(clocks); +LIST_HEAD(clocks); static DEFINE_MUTEX(clocks_mutex); -static DEFINE_SPINLOCK(clockfw_lock); +DEFINE_SPINLOCK(clockfw_lock); static struct clk_functions *arch_clock; diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 57b7b9367..adffc5a85 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index a0c71dca2..98edc9fdd 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c @@ -25,14 +25,6 @@ #include #include -#define VERY_HI_RATE 900000000 - -#ifdef CONFIG_ARCH_OMAP1 -#define MPU_CLK "mpu" -#else -#define MPU_CLK "virt_prcm_set" -#endif - /* TODO: Add support for SDRAM timing changes */ int omap_verify_speed(struct cpufreq_policy *policy) @@ -44,7 +36,7 @@ int omap_verify_speed(struct cpufreq_policy *policy) cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); - mpu_clk = clk_get(NULL, MPU_CLK); + mpu_clk = clk_get(NULL, "mpu"); if (IS_ERR(mpu_clk)) return PTR_ERR(mpu_clk); policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; @@ -64,7 +56,7 @@ unsigned int omap_getspeed(unsigned int cpu) if (cpu) return 0; - mpu_clk = clk_get(NULL, MPU_CLK); + mpu_clk = clk_get(NULL, "mpu"); if (IS_ERR(mpu_clk)) return 0; rate = clk_get_rate(mpu_clk) / 1000; @@ -81,7 +73,7 @@ static int omap_target(struct cpufreq_policy *policy, struct cpufreq_freqs freqs; int ret = 0; - mpu_clk = clk_get(NULL, MPU_CLK); + mpu_clk = clk_get(NULL, "mpu"); if (IS_ERR(mpu_clk)) return PTR_ERR(mpu_clk); @@ -101,7 +93,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) { struct clk * mpu_clk; - mpu_clk = clk_get(NULL, MPU_CLK); + mpu_clk = clk_get(NULL, "mpu"); if (IS_ERR(mpu_clk)) return PTR_ERR(mpu_clk); @@ -110,7 +102,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) policy->cur = policy->min = policy->max = omap_getspeed(0); policy->governor = CPUFREQ_DEFAULT_GOVERNOR; policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; - policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; + policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000; policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; clk_put(mpu_clk); diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 1812f237d..5d5d6eb22 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -104,7 +105,7 @@ static void omap_init_kp(void) omap_cfg_reg(E20_1610_KBR3); omap_cfg_reg(E19_1610_KBR4); omap_cfg_reg(N19_1610_KBR5); - } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { + } else if (machine_is_omap_perseus2()) { omap_cfg_reg(E2_730_KBR0); omap_cfg_reg(J7_730_KBR1); omap_cfg_reg(E1_730_KBR2); @@ -161,8 +162,8 @@ static u64 mmc1_dmamask = 0xffffffff; static struct resource mmc1_resources[] = { { - .start = OMAP_MMC1_BASE, - .end = OMAP_MMC1_BASE + 0x7f, + .start = IO_ADDRESS(OMAP_MMC1_BASE), + .end = IO_ADDRESS(OMAP_MMC1_BASE) + 0x7f, .flags = IORESOURCE_MEM, }, { @@ -190,8 +191,8 @@ static u64 mmc2_dmamask = 0xffffffff; static struct resource mmc2_resources[] = { { - .start = OMAP_MMC2_BASE, - .end = OMAP_MMC2_BASE + 0x7f, + .start = IO_ADDRESS(OMAP_MMC2_BASE), + .end = IO_ADDRESS(OMAP_MMC2_BASE) + 0x7f, .flags = IORESOURCE_MEM, }, { diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 9eddc9507..5dac42303 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -24,9 +24,9 @@ #include #include #include -#include #include +#include #include #include #include @@ -43,7 +43,6 @@ #define OMAP_DMA_ACTIVE 0x01 #define OMAP_DMA_CCR_EN (1 << 7) -#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) @@ -167,24 +166,18 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, if (cpu_is_omap24xx() && dma_trigger) { u32 val = OMAP_DMA_CCR_REG(lch); - val &= ~(3 << 19); if (dma_trigger > 63) val |= 1 << 20; if (dma_trigger > 31) val |= 1 << 19; - val &= ~(0x1f); val |= (dma_trigger & 0x1f); if (sync_mode & OMAP_DMA_SYNC_FRAME) val |= 1 << 5; - else - val &= ~(1 << 5); if (sync_mode & OMAP_DMA_SYNC_BLOCK) val |= 1 << 18; - else - val &= ~(1 << 18); if (src_or_dst_synch) val |= 1 << 24; /* source synch */ @@ -293,39 +286,22 @@ void omap_set_dma_src_data_pack(int lch, int enable) void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) { - unsigned int burst = 0; OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 7); switch (burst_mode) { case OMAP_DMA_DATA_BURST_DIS: break; case OMAP_DMA_DATA_BURST_4: - if (cpu_is_omap24xx()) - burst = 0x1; - else - burst = 0x2; + OMAP_DMA_CSDP_REG(lch) |= (0x02 << 7); break; case OMAP_DMA_DATA_BURST_8: - if (cpu_is_omap24xx()) { - burst = 0x2; - break; - } - /* not supported by current hardware on OMAP1 + /* not supported by current hardware * w |= (0x03 << 7); * fall through */ - case OMAP_DMA_DATA_BURST_16: - if (cpu_is_omap24xx()) { - burst = 0x3; - break; - } - /* OMAP1 don't support burst 16 - * fall through - */ default: BUG(); } - OMAP_DMA_CSDP_REG(lch) |= (burst << 7); } /* Note that dest_port is only for OMAP1 */ @@ -372,49 +348,30 @@ void omap_set_dma_dest_data_pack(int lch, int enable) void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) { - unsigned int burst = 0; OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 14); switch (burst_mode) { case OMAP_DMA_DATA_BURST_DIS: break; case OMAP_DMA_DATA_BURST_4: - if (cpu_is_omap24xx()) - burst = 0x1; - else - burst = 0x2; + OMAP_DMA_CSDP_REG(lch) |= (0x02 << 14); break; case OMAP_DMA_DATA_BURST_8: - if (cpu_is_omap24xx()) - burst = 0x2; - else - burst = 0x3; + OMAP_DMA_CSDP_REG(lch) |= (0x03 << 14); break; - case OMAP_DMA_DATA_BURST_16: - if (cpu_is_omap24xx()) { - burst = 0x3; - break; - } - /* OMAP1 don't support burst 16 - * fall through - */ default: printk(KERN_ERR "Invalid DMA burst mode\n"); BUG(); return; } - OMAP_DMA_CSDP_REG(lch) |= (burst << 14); } static inline void omap_enable_channel_irq(int lch) { u32 status; - /* Clear CSR */ - if (cpu_class_is_omap1()) - status = OMAP_DMA_CSR_REG(lch); - else if (cpu_is_omap24xx()) - OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK; + /* Read CSR to make sure it's cleared. */ + status = OMAP_DMA_CSR_REG(lch); /* Enable some nice interrupts. */ OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; @@ -513,13 +470,11 @@ int omap_request_dma(int dev_id, const char *dev_name, chan->dev_name = dev_name; chan->callback = callback; chan->data = data; - chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; + chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | + OMAP_DMA_BLOCK_IRQ; - if (cpu_class_is_omap1()) - chan->enabled_irqs |= OMAP1_DMA_TOUT_IRQ; - else if (cpu_is_omap24xx()) - chan->enabled_irqs |= OMAP2_DMA_MISALIGNED_ERR_IRQ | - OMAP2_DMA_TRANS_ERR_IRQ; + if (cpu_is_omap24xx()) + chan->enabled_irqs |= OMAP2_DMA_TRANS_ERR_IRQ; if (cpu_is_omap16xx()) { /* If the sync device is set, configure it dynamically. */ @@ -539,7 +494,7 @@ int omap_request_dma(int dev_id, const char *dev_name, omap_enable_channel_irq(free_ch); /* Clear the CSR register and IRQ status register */ - OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK; + OMAP_DMA_CSR_REG(free_ch) = 0x0; omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0); } @@ -579,7 +534,7 @@ void omap_free_dma(int lch) omap_writel(val, OMAP_DMA4_IRQENABLE_L0); /* Clear the CSR register and IRQ status register */ - OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK; + OMAP_DMA_CSR_REG(lch) = 0x0; val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); val |= 1 << lch; @@ -843,7 +798,7 @@ static int omap1_dma_handle_ch(int ch) "%d (CSR %04x)\n", ch, csr); return 0; } - if (unlikely(csr & OMAP1_DMA_TOUT_IRQ)) + if (unlikely(csr & OMAP_DMA_TOUT_IRQ)) printk(KERN_WARNING "DMA timeout with device %d\n", dma_chan[ch].dev_id); if (unlikely(csr & OMAP_DMA_DROP_IRQ)) @@ -891,21 +846,20 @@ static int omap2_dma_handle_ch(int ch) return 0; if (unlikely(dma_chan[ch].dev_id == -1)) return 0; + /* REVISIT: According to 24xx TRM, there's no TOUT_IE */ + if (unlikely(status & OMAP_DMA_TOUT_IRQ)) + printk(KERN_INFO "DMA timeout with device %d\n", + dma_chan[ch].dev_id); if (unlikely(status & OMAP_DMA_DROP_IRQ)) printk(KERN_INFO "DMA synchronization event drop occurred with device " "%d\n", dma_chan[ch].dev_id); + if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) printk(KERN_INFO "DMA transaction error with device %d\n", dma_chan[ch].dev_id); - if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ)) - printk(KERN_INFO "DMA secure error with device %d\n", - dma_chan[ch].dev_id); - if (unlikely(status & OMAP2_DMA_MISALIGNED_ERR_IRQ)) - printk(KERN_INFO "DMA misaligned error with device %d\n", - dma_chan[ch].dev_id); - OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK; + OMAP_DMA_CSR_REG(ch) = 0x20; val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); /* ch in this function is from 0-31 while in register it is 1-32 */ @@ -939,7 +893,7 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id, static struct irqaction omap24xx_dma_irq = { .name = "DMA", .handler = omap2_dma_irq_handler, - .flags = IRQF_DISABLED + .flags = SA_INTERRUPT }; #else diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 50524436d..eba3cb52a 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -4,8 +4,7 @@ * OMAP Dual-Mode Timers * * Copyright (C) 2005 Nokia Corporation - * OMAP2 support by Juha Yrjola - * API improvements and OMAP2 clock framework support by Timo Teras + * Author: Lauri Leukkunen * * 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 @@ -27,17 +26,15 @@ */ #include -#include -#include -#include -#include -#include #include #include #include #include +#include +#include + +#define OMAP_TIMER_COUNT 8 -/* register offsets */ #define OMAP_TIMER_ID_REG 0x00 #define OMAP_TIMER_OCP_CFG_REG 0x10 #define OMAP_TIMER_SYS_STAT_REG 0x14 @@ -53,196 +50,52 @@ #define OMAP_TIMER_CAPTURE_REG 0x3c #define OMAP_TIMER_IF_CTRL_REG 0x40 -/* timer control reg bits */ -#define OMAP_TIMER_CTRL_GPOCFG (1 << 14) -#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) -#define OMAP_TIMER_CTRL_PT (1 << 12) -#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) -#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) -#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) -#define OMAP_TIMER_CTRL_SCPWM (1 << 7) -#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ -#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ -#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ -#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ -#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ - -struct omap_dm_timer { - unsigned long phys_base; - int irq; -#ifdef CONFIG_ARCH_OMAP2 - struct clk *iclk, *fclk; -#endif - void __iomem *io_base; - unsigned reserved:1; -}; -#ifdef CONFIG_ARCH_OMAP1 +static struct dmtimer_info_struct { + struct list_head unused_timers; + struct list_head reserved_timers; +} dm_timer_info; static struct omap_dm_timer dm_timers[] = { - { .phys_base = 0xfffb1400, .irq = INT_1610_GPTIMER1 }, - { .phys_base = 0xfffb1c00, .irq = INT_1610_GPTIMER2 }, - { .phys_base = 0xfffb2400, .irq = INT_1610_GPTIMER3 }, - { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 }, - { .phys_base = 0xfffb3400, .irq = INT_1610_GPTIMER5 }, - { .phys_base = 0xfffb3c00, .irq = INT_1610_GPTIMER6 }, - { .phys_base = 0xfffb4400, .irq = INT_1610_GPTIMER7 }, - { .phys_base = 0xfffb4c00, .irq = INT_1610_GPTIMER8 }, + { .base=0xfffb1400, .irq=INT_1610_GPTIMER1 }, + { .base=0xfffb1c00, .irq=INT_1610_GPTIMER2 }, + { .base=0xfffb2400, .irq=INT_1610_GPTIMER3 }, + { .base=0xfffb2c00, .irq=INT_1610_GPTIMER4 }, + { .base=0xfffb3400, .irq=INT_1610_GPTIMER5 }, + { .base=0xfffb3c00, .irq=INT_1610_GPTIMER6 }, + { .base=0xfffb4400, .irq=INT_1610_GPTIMER7 }, + { .base=0xfffb4c00, .irq=INT_1610_GPTIMER8 }, + { .base=0x0 }, }; -#elif defined(CONFIG_ARCH_OMAP2) - -static struct omap_dm_timer dm_timers[] = { - { .phys_base = 0x48028000, .irq = INT_24XX_GPTIMER1 }, - { .phys_base = 0x4802a000, .irq = INT_24XX_GPTIMER2 }, - { .phys_base = 0x48078000, .irq = INT_24XX_GPTIMER3 }, - { .phys_base = 0x4807a000, .irq = INT_24XX_GPTIMER4 }, - { .phys_base = 0x4807c000, .irq = INT_24XX_GPTIMER5 }, - { .phys_base = 0x4807e000, .irq = INT_24XX_GPTIMER6 }, - { .phys_base = 0x48080000, .irq = INT_24XX_GPTIMER7 }, - { .phys_base = 0x48082000, .irq = INT_24XX_GPTIMER8 }, - { .phys_base = 0x48084000, .irq = INT_24XX_GPTIMER9 }, - { .phys_base = 0x48086000, .irq = INT_24XX_GPTIMER10 }, - { .phys_base = 0x48088000, .irq = INT_24XX_GPTIMER11 }, - { .phys_base = 0x4808a000, .irq = INT_24XX_GPTIMER12 }, -}; - -static const char *dm_source_names[] = { - "sys_ck", - "func_32k_ck", - "alt_ck" -}; -static struct clk *dm_source_clocks[3]; - -#else - -#error OMAP architecture not supported! - -#endif - -static const int dm_timer_count = ARRAY_SIZE(dm_timers); static spinlock_t dm_timer_lock; -static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg) -{ - return readl(timer->io_base + reg); -} -static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value) +inline void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value) { - writel(value, timer->io_base + reg); + omap_writel(value, timer->base + reg); while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG)) ; } -static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) +u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg) { - int c; - - c = 0; - while (!(omap_dm_timer_read_reg(timer, OMAP_TIMER_SYS_STAT_REG) & 1)) { - c++; - if (c > 100000) { - printk(KERN_ERR "Timer failed to reset\n"); - return; - } - } -} - -static void omap_dm_timer_reset(struct omap_dm_timer *timer) -{ - u32 l; - - if (timer != &dm_timers[0]) { - omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); - omap_dm_timer_wait_for_reset(timer); - } - omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_SYS_CLK); - - /* Set to smart-idle mode */ - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG); - l |= 0x02 << 3; - omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l); -} - -static void omap_dm_timer_prepare(struct omap_dm_timer *timer) -{ -#ifdef CONFIG_ARCH_OMAP2 - clk_enable(timer->iclk); - clk_enable(timer->fclk); -#endif - omap_dm_timer_reset(timer); -} - -struct omap_dm_timer *omap_dm_timer_request(void) -{ - struct omap_dm_timer *timer = NULL; - unsigned long flags; - int i; - - spin_lock_irqsave(&dm_timer_lock, flags); - for (i = 0; i < dm_timer_count; i++) { - if (dm_timers[i].reserved) - continue; - - timer = &dm_timers[i]; - timer->reserved = 1; - break; - } - spin_unlock_irqrestore(&dm_timer_lock, flags); - - if (timer != NULL) - omap_dm_timer_prepare(timer); - - return timer; + return omap_readl(timer->base + reg); } -struct omap_dm_timer *omap_dm_timer_request_specific(int id) +int omap_dm_timers_active(void) { struct omap_dm_timer *timer; - unsigned long flags; - - spin_lock_irqsave(&dm_timer_lock, flags); - if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) { - spin_unlock_irqrestore(&dm_timer_lock, flags); - printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n", - __FILE__, __LINE__, __FUNCTION__, id); - dump_stack(); - return NULL; - } - - timer = &dm_timers[id-1]; - timer->reserved = 1; - spin_unlock_irqrestore(&dm_timer_lock, flags); - - omap_dm_timer_prepare(timer); - return timer; -} - -void omap_dm_timer_free(struct omap_dm_timer *timer) -{ - omap_dm_timer_reset(timer); -#ifdef CONFIG_ARCH_OMAP2 - clk_disable(timer->iclk); - clk_disable(timer->fclk); -#endif - WARN_ON(!timer->reserved); - timer->reserved = 0; -} + for (timer = &dm_timers[0]; timer->base; ++timer) + if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & + OMAP_TIMER_CTRL_ST) + return 1; -int omap_dm_timer_get_irq(struct omap_dm_timer *timer) -{ - return timer->irq; + return 0; } -#if defined(CONFIG_ARCH_OMAP1) - -struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) -{ - BUG(); -} /** * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR @@ -250,229 +103,184 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) */ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) { - int i; + int n; /* If ARMXOR cannot be idled this function call is unnecessary */ if (!(inputmask & (1 << 1))) return inputmask; /* If any active timer is using ARMXOR return modified mask */ - for (i = 0; i < dm_timer_count; i++) { - u32 l; - - l = omap_dm_timer_read_reg(&dm_timers[i], OMAP_TIMER_CTRL_REG); - if (l & OMAP_TIMER_CTRL_ST) { - if (((omap_readl(MOD_CONF_CTRL_1) >> (i * 2)) & 0x03) == 0) + for (n = 0; dm_timers[n].base; ++n) + if (omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG)& + OMAP_TIMER_CTRL_ST) { + if (((omap_readl(MOD_CONF_CTRL_1)>>(n*2)) & 0x03) == 0) inputmask &= ~(1 << 1); else inputmask &= ~(1 << 2); } - } return inputmask; } -#elif defined(CONFIG_ARCH_OMAP2) -struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) +void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) { - return timer->fclk; -} + int n = (timer - dm_timers) << 1; + u32 l; -__u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) -{ - BUG(); + l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); + l |= source << n; + omap_writel(l, MOD_CONF_CTRL_1); } -#endif -void omap_dm_timer_trigger(struct omap_dm_timer *timer) +static void omap_dm_timer_reset(struct omap_dm_timer *timer) { - omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); + /* Reset and set posted mode */ + omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); + omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, 0x02); + + omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_ARMXOR); } -void omap_dm_timer_start(struct omap_dm_timer *timer) -{ - u32 l; - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - if (!(l & OMAP_TIMER_CTRL_ST)) { - l |= OMAP_TIMER_CTRL_ST; - omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); - } -} -void omap_dm_timer_stop(struct omap_dm_timer *timer) +struct omap_dm_timer * omap_dm_timer_request(void) { - u32 l; + struct omap_dm_timer *timer = NULL; + unsigned long flags; - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - if (l & OMAP_TIMER_CTRL_ST) { - l &= ~0x1; - omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); + spin_lock_irqsave(&dm_timer_lock, flags); + if (!list_empty(&dm_timer_info.unused_timers)) { + timer = (struct omap_dm_timer *) + dm_timer_info.unused_timers.next; + list_move_tail((struct list_head *)timer, + &dm_timer_info.reserved_timers); } + spin_unlock_irqrestore(&dm_timer_lock, flags); + + return timer; } -#ifdef CONFIG_ARCH_OMAP1 -void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) +void omap_dm_timer_free(struct omap_dm_timer *timer) { - int n = (timer - dm_timers) << 1; - u32 l; + unsigned long flags; - l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); - l |= source << n; - omap_writel(l, MOD_CONF_CTRL_1); -} + omap_dm_timer_reset(timer); -#else + spin_lock_irqsave(&dm_timer_lock, flags); + list_move_tail((struct list_head *)timer, &dm_timer_info.unused_timers); + spin_unlock_irqrestore(&dm_timer_lock, flags); +} -void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) +void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, + unsigned int value) { - if (source < 0 || source >= 3) - return; - - clk_disable(timer->fclk); - clk_set_parent(timer->fclk, dm_source_clocks[source]); - clk_enable(timer->fclk); + omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); +} - /* When the functional clock disappears, too quick writes seem to - * cause an abort. */ - __delay(15000); +unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) +{ + return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); } -#endif +void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) +{ + omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); +} -void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, - unsigned int load) +void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer) { u32 l; - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - if (autoreload) - l |= OMAP_TIMER_CTRL_AR; - else - l &= ~OMAP_TIMER_CTRL_AR; + l |= OMAP_TIMER_CTRL_AR; omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); - omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); - omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); } -void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, - unsigned int match) +void omap_dm_timer_trigger(struct omap_dm_timer *timer) +{ + omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 1); +} + +void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value) { u32 l; l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - if (enable) - l |= OMAP_TIMER_CTRL_CE; - else - l &= ~OMAP_TIMER_CTRL_CE; + l |= value & 0x3; omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); - omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); } - -void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, - int toggle, int trigger) +void omap_dm_timer_start(struct omap_dm_timer *timer) { u32 l; l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - l &= ~(OMAP_TIMER_CTRL_GPOCFG | OMAP_TIMER_CTRL_SCPWM | - OMAP_TIMER_CTRL_PT | (0x03 << 10)); - if (def_on) - l |= OMAP_TIMER_CTRL_SCPWM; - if (toggle) - l |= OMAP_TIMER_CTRL_PT; - l |= trigger << 10; + l |= OMAP_TIMER_CTRL_ST; omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); } -void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler) +void omap_dm_timer_stop(struct omap_dm_timer *timer) { u32 l; l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); - l &= ~(OMAP_TIMER_CTRL_PRE | (0x07 << 2)); - if (prescaler >= 0x00 && prescaler <= 0x07) { - l |= OMAP_TIMER_CTRL_PRE; - l |= prescaler << 2; - } + l &= ~0x1; omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); } -void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, - unsigned int value) -{ - omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); -} - -unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) +unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) { - return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); + return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); } -void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) +void omap_dm_timer_reset_counter(struct omap_dm_timer *timer) { - omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); + omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, 0); } -unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) +void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load) { - return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); + omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); } -void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value) +void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match) { - return omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); + omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); } -int omap_dm_timers_active(void) +void omap_dm_timer_enable_compare(struct omap_dm_timer *timer) { - int i; - - for (i = 0; i < dm_timer_count; i++) { - struct omap_dm_timer *timer; + u32 l; - timer = &dm_timers[i]; - if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & - OMAP_TIMER_CTRL_ST) - return 1; - } - return 0; + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); + l |= OMAP_TIMER_CTRL_CE; + omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); } -int omap_dm_timer_init(void) + +static inline void __dm_timer_init(void) { struct omap_dm_timer *timer; - int i; - - if (!(cpu_is_omap16xx() || cpu_is_omap24xx())) - return -ENODEV; spin_lock_init(&dm_timer_lock); -#ifdef CONFIG_ARCH_OMAP2 - for (i = 0; i < ARRAY_SIZE(dm_source_names); i++) { - dm_source_clocks[i] = clk_get(NULL, dm_source_names[i]); - BUG_ON(dm_source_clocks[i] == NULL); - } -#endif - - for (i = 0; i < dm_timer_count; i++) { -#ifdef CONFIG_ARCH_OMAP2 - char clk_name[16]; -#endif - - timer = &dm_timers[i]; - timer->io_base = (void __iomem *) io_p2v(timer->phys_base); -#ifdef CONFIG_ARCH_OMAP2 - sprintf(clk_name, "gpt%d_ick", i + 1); - timer->iclk = clk_get(NULL, clk_name); - sprintf(clk_name, "gpt%d_fck", i + 1); - timer->fclk = clk_get(NULL, clk_name); -#endif + INIT_LIST_HEAD(&dm_timer_info.unused_timers); + INIT_LIST_HEAD(&dm_timer_info.reserved_timers); + + timer = &dm_timers[0]; + while (timer->base) { + list_add_tail((struct list_head *)timer, &dm_timer_info.unused_timers); + omap_dm_timer_reset(timer); + timer++; } +} +static int __init omap_dm_timer_init(void) +{ + if (cpu_is_omap16xx()) + __dm_timer_init(); return 0; } + +arch_initcall(omap_dm_timer_init); diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 56acb8720..305e9b990 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index cd7f973fb..d3c8ea7ee 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -536,49 +537,6 @@ static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); } -static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank) -{ - void __iomem *reg = bank->base; - int inv = 0; - u32 l; - u32 mask; - - switch (bank->method) { - case METHOD_MPUIO: - reg += OMAP_MPUIO_GPIO_MASKIT; - mask = 0xffff; - inv = 1; - break; - case METHOD_GPIO_1510: - reg += OMAP1510_GPIO_INT_MASK; - mask = 0xffff; - inv = 1; - break; - case METHOD_GPIO_1610: - reg += OMAP1610_GPIO_IRQENABLE1; - mask = 0xffff; - break; - case METHOD_GPIO_730: - reg += OMAP730_GPIO_INT_MASK; - mask = 0xffffffff; - inv = 1; - break; - case METHOD_GPIO_24XX: - reg += OMAP24XX_GPIO_IRQENABLE1; - mask = 0xffffffff; - break; - default: - BUG(); - return 0; - } - - l = __raw_readl(reg); - if (inv) - l = ~l; - l &= mask; - return l; -} - static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) { void __iomem *reg = bank->base; @@ -778,12 +736,10 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, u32 isr; unsigned int gpio_irq; struct gpio_bank *bank; - u32 retrigger = 0; - int unmasked = 0; desc->chip->ack(irq); - bank = get_irq_data(irq); + bank = (struct gpio_bank *) desc->data; if (bank->method == METHOD_MPUIO) isr_reg = bank->base + OMAP_MPUIO_GPIO_INT; #ifdef CONFIG_ARCH_OMAP15XX @@ -804,22 +760,18 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, #endif while(1) { u32 isr_saved, level_mask = 0; - u32 enabled; - enabled = _get_gpio_irqbank_mask(bank); - isr_saved = isr = __raw_readl(isr_reg) & enabled; + isr_saved = isr = __raw_readl(isr_reg); if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO)) isr &= 0x0000ffff; - if (cpu_is_omap24xx()) { + if (cpu_is_omap24xx()) level_mask = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT0) | __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT1); - level_mask &= enabled; - } /* clear edge sensitive interrupts before handler(s) are called so that we don't miss any interrupt occurred while @@ -830,55 +782,19 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, /* if there is only edge sensitive GPIO pin interrupts configured, we could unmask GPIO bank interrupt immediately */ - if (!level_mask && !unmasked) { - unmasked = 1; + if (!level_mask) desc->chip->unmask(irq); - } - isr |= retrigger; - retrigger = 0; if (!isr) break; gpio_irq = bank->virtual_irq_start; for (; isr != 0; isr >>= 1, gpio_irq++) { struct irqdesc *d; - int irq_mask; if (!(isr & 1)) continue; d = irq_desc + gpio_irq; - /* Don't run the handler if it's already running - * or was disabled lazely. - */ - if (unlikely((d->depth || - (d->status & IRQ_INPROGRESS)))) { - irq_mask = 1 << - (gpio_irq - bank->virtual_irq_start); - /* The unmasking will be done by - * enable_irq in case it is disabled or - * after returning from the handler if - * it's already running. - */ - _enable_gpio_irqbank(bank, irq_mask, 0); - if (!d->depth) { - /* Level triggered interrupts - * won't ever be reentered - */ - BUG_ON(level_mask & irq_mask); - d->status |= IRQ_PENDING; - } - continue; - } - desc_handle_irq(gpio_irq, d, regs); - - if (unlikely((d->status & IRQ_PENDING) && !d->depth)) { - irq_mask = 1 << - (gpio_irq - bank->virtual_irq_start); - d->status &= ~IRQ_PENDING; - _enable_gpio_irqbank(bank, irq_mask, 1); - retrigger |= irq_mask; - } } if (cpu_is_omap24xx()) { @@ -888,14 +804,13 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, _enable_gpio_irqbank(bank, isr_saved & level_mask, 1); } + /* if bank has any level sensitive GPIO pin interrupt + configured, we must unmask the bank interrupt only after + handler(s) are executed in order to avoid spurious bank + interrupt */ + if (level_mask) + desc->chip->unmask(irq); } - /* if bank has any level sensitive GPIO pin interrupt - configured, we must unmask the bank interrupt only after - handler(s) are executed in order to avoid spurious bank - interrupt */ - if (!unmasked) - desc->chip->unmask(irq); - } static void gpio_ack_irq(unsigned int irq) @@ -944,8 +859,7 @@ static void mpuio_unmask_irq(unsigned int irq) _set_gpio_irqenable(bank, gpio, 1); } -static struct irq_chip gpio_irq_chip = { - .name = "GPIO", +static struct irqchip gpio_irq_chip = { .ack = gpio_ack_irq, .mask = gpio_mask_irq, .unmask = gpio_unmask_irq, @@ -953,11 +867,10 @@ static struct irq_chip gpio_irq_chip = { .set_wake = gpio_wake_enable, }; -static struct irq_chip mpuio_irq_chip = { - .name = "MPUIO", +static struct irqchip mpuio_irq_chip = { .ack = mpuio_ack_irq, .mask = mpuio_mask_irq, - .unmask = mpuio_unmask_irq + .unmask = mpuio_unmask_irq }; static int initialized; diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c index 042105ac3..8c1c016aa 100644 --- a/arch/arm/plat-omap/mux.c +++ b/arch/arm/plat-omap/mux.c @@ -22,6 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include #include #include #include diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c index b5d307026..37792d437 100644 --- a/arch/arm/plat-omap/ocpi.c +++ b/arch/arm/plat-omap/ocpi.c @@ -23,6 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/arm/plat-omap/pm.c b/arch/arm/plat-omap/pm.c index 04b410272..1a24e2c10 100644 --- a/arch/arm/plat-omap/pm.c +++ b/arch/arm/plat-omap/pm.c @@ -580,7 +580,7 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void * dev, static struct irqaction omap_wakeup_irq = { .name = "peripheral wakeup", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .handler = omap_wakeup_interrupt }; diff --git a/arch/arm/plat-omap/sram-fn.S b/arch/arm/plat-omap/sram-fn.S index 85cffe2c6..66414cc8e 100644 --- a/arch/arm/plat-omap/sram-fn.S +++ b/arch/arm/plat-omap/sram-fn.S @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index e75718301..b7bf09b1b 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -157,12 +158,14 @@ static struct map_desc omap_sram_io_desc[] __initdata = { { /* .length gets filled in at runtime */ .virtual = OMAP1_SRAM_VA, .pfn = __phys_to_pfn(OMAP1_SRAM_PA), - .type = MT_MEMORY + .type = MT_DEVICE } }; /* - * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. + * In order to use last 2kB of SRAM on 1611b, we must round the size + * up to multiple of PAGE_SIZE. We cannot use ioremap for SRAM, as + * clock init needs SRAM early. */ void __init omap_map_sram(void) { @@ -182,7 +185,8 @@ void __init omap_map_sram(void) omap_sram_io_desc[0].pfn = __phys_to_pfn(base); } - omap_sram_io_desc[0].length = 1024 * 1024; /* Use section desc */ + omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE; + omap_sram_io_desc[0].length *= PAGE_SIZE; iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index 281ecc7fc..b2a943bf1 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c @@ -7,7 +7,6 @@ * Partial timer rewrite and additional dynamic tick timer support by * Tony Lindgen and * Tuukka Tikkanen - * OMAP Dual-mode timer framework support by Timo Teras * * MPU timer code based on the older MPU timer code for OMAP * Copyright (C) 2000 RidgeRun, Inc. @@ -34,6 +33,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -50,7 +50,6 @@ #include #include #include -#include struct sys_timer omap_timer; @@ -80,6 +79,18 @@ struct sys_timer omap_timer; #define OMAP1_32K_TIMER_TVR 0x00 #define OMAP1_32K_TIMER_TCR 0x04 +/* 24xx specific defines */ +#define OMAP2_GP_TIMER_BASE 0x48028000 +#define CM_CLKSEL_WKUP 0x48008440 +#define GP_TIMER_TIDR 0x00 +#define GP_TIMER_TISR 0x18 +#define GP_TIMER_TIER 0x1c +#define GP_TIMER_TCLR 0x24 +#define GP_TIMER_TCRR 0x28 +#define GP_TIMER_TLDR 0x2c +#define GP_TIMER_TTGR 0x30 +#define GP_TIMER_TSICR 0x40 + #define OMAP_32K_TICKS_PER_HZ (32768 / HZ) /* @@ -91,62 +102,54 @@ struct sys_timer omap_timer; #define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ (((nr_jiffies) * (clock_rate)) / HZ) -#if defined(CONFIG_ARCH_OMAP1) - static inline void omap_32k_timer_write(int val, int reg) { - omap_writew(val, OMAP1_32K_TIMER_BASE + reg); + if (cpu_class_is_omap1()) + omap_writew(val, OMAP1_32K_TIMER_BASE + reg); + + if (cpu_is_omap24xx()) + omap_writel(val, OMAP2_GP_TIMER_BASE + reg); } static inline unsigned long omap_32k_timer_read(int reg) { - return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff; -} + if (cpu_class_is_omap1()) + return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff; -static inline void omap_32k_timer_start(unsigned long load_val) -{ - omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); - omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); + if (cpu_is_omap24xx()) + return omap_readl(OMAP2_GP_TIMER_BASE + reg); } -static inline void omap_32k_timer_stop(void) +/* + * The 32KHz synchronized timer is an additional timer on 16xx. + * It is always running. + */ +static inline unsigned long omap_32k_sync_timer_read(void) { - omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR); + return omap_readl(TIMER_32K_SYNCHRONIZED); } -#define omap_32k_timer_ack_irq() - -#elif defined(CONFIG_ARCH_OMAP2) - -static struct omap_dm_timer *gptimer; - static inline void omap_32k_timer_start(unsigned long load_val) { - omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val); - omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); - omap_dm_timer_start(gptimer); -} + if (cpu_class_is_omap1()) { + omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); + omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); + } -static inline void omap_32k_timer_stop(void) -{ - omap_dm_timer_stop(gptimer); + if (cpu_is_omap24xx()) { + omap_32k_timer_write(0xffffffff - load_val, GP_TIMER_TCRR); + omap_32k_timer_write((1 << 1), GP_TIMER_TIER); + omap_32k_timer_write((1 << 1) | 1, GP_TIMER_TCLR); + } } -static inline void omap_32k_timer_ack_irq(void) +static inline void omap_32k_timer_stop(void) { - u32 status = omap_dm_timer_read_status(gptimer); - omap_dm_timer_write_status(gptimer, status); -} - -#endif + if (cpu_class_is_omap1()) + omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR); -/* - * The 32KHz synchronized timer is an additional timer on 16xx. - * It is always running. - */ -static inline unsigned long omap_32k_sync_timer_read(void) -{ - return omap_readl(TIMER_32K_SYNCHRONIZED); + if (cpu_is_omap24xx()) + omap_32k_timer_write(0x0, GP_TIMER_TCLR); } /* @@ -200,11 +203,14 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, write_seqlock_irqsave(&xtime_lock, flags); - omap_32k_timer_ack_irq(); + if (cpu_is_omap24xx()) { + u32 status = omap_32k_timer_read(GP_TIMER_TISR); + omap_32k_timer_write(status, GP_TIMER_TISR); + } + now = omap_32k_sync_timer_read(); - while ((signed long)(now - omap_32k_last_tick) - >= OMAP_32K_TICKS_PER_HZ) { + while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) { omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; timer_tick(regs); } @@ -258,10 +264,13 @@ static struct dyn_tick_timer omap_dyn_tick_timer = { static struct irqaction omap_32k_timer_irq = { .name = "32KHz timer", - .flags = IRQF_DISABLED | IRQF_TIMER, + .flags = SA_INTERRUPT | SA_TIMER, .handler = omap_32k_timer_interrupt, }; +static struct clk * gpt1_ick; +static struct clk * gpt1_fck; + static __init void omap_init_32k_timer(void) { #ifdef CONFIG_NO_IDLE_HZ @@ -270,22 +279,32 @@ static __init void omap_init_32k_timer(void) if (cpu_class_is_omap1()) setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); + if (cpu_is_omap24xx()) + setup_irq(37, &omap_32k_timer_irq); omap_timer.offset = omap_32k_timer_gettimeoffset; omap_32k_last_tick = omap_32k_sync_timer_read(); -#ifdef CONFIG_ARCH_OMAP2 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ if (cpu_is_omap24xx()) { - gptimer = omap_dm_timer_request_specific(1); - BUG_ON(gptimer == NULL); - - omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ); - setup_irq(omap_dm_timer_get_irq(gptimer), &omap_32k_timer_irq); - omap_dm_timer_set_int_enable(gptimer, - OMAP_TIMER_INT_CAPTURE | OMAP_TIMER_INT_OVERFLOW | - OMAP_TIMER_INT_MATCH); + omap_32k_timer_write(0, GP_TIMER_TCLR); + omap_writel(0, CM_CLKSEL_WKUP); /* 32KHz clock source */ + + gpt1_ick = clk_get(NULL, "gpt1_ick"); + if (IS_ERR(gpt1_ick)) + printk(KERN_ERR "Could not get gpt1_ick\n"); + else + clk_enable(gpt1_ick); + + gpt1_fck = clk_get(NULL, "gpt1_fck"); + if (IS_ERR(gpt1_fck)) + printk(KERN_ERR "Could not get gpt1_fck\n"); + else + clk_enable(gpt1_fck); + + mdelay(100); /* Wait for clocks to stabilize */ + + omap_32k_timer_write(0x7, GP_TIMER_TISR); } -#endif omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); } @@ -297,9 +316,6 @@ static __init void omap_init_32k_timer(void) */ static void __init omap_timer_init(void) { -#ifdef CONFIG_OMAP_DM_TIMER - omap_dm_timer_init(); -#endif omap_init_32k_timer(); } diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index 9b815327b..00afc7a8c 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c @@ -20,6 +20,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index e1372a253..6d7de9c04 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -12,7 +12,7 @@ # # http://www.arm.linux.org.uk/developer/machines/?action=new # -# Last update: Mon Jun 26 22:26:08 2006 +# Last update: Mon May 8 20:11:05 2006 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -566,8 +566,8 @@ switchgrass MACH_SWITCHGRASS SWITCHGRASS 549 ens_cmu MACH_ENS_CMU ENS_CMU 550 mm6_sdb MACH_MM6_SDB MM6_SDB 551 saturn MACH_SATURN SATURN 552 -i30030evb MACH_I30030EVB I30030EVB 553 -mxc27530evb MACH_MXC27530EVB MXC27530EVB 554 +i30030evb MACH_ARGONPLUSEVB ARGONPLUSEVB 553 +mxc27530evb MACH_SCMA11EVB SCMA11EVB 554 smdk2800 MACH_SMDK2800 SMDK2800 555 mtwilson MACH_MTWILSON MTWILSON 556 ziti MACH_ZITI ZITI 557 @@ -647,7 +647,7 @@ sendt MACH_SENDT SENDT 630 mx2jazz MACH_MX2JAZZ MX2JAZZ 631 multiio MACH_MULTIIO MULTIIO 632 hrdisplay MACH_HRDISPLAY HRDISPLAY 633 -mxc27530ads MACH_MXC27530ADS MXC27530ADS 634 +mxc27530ads MACH_SCMA11BB SCMA11BB 634 trizeps3 MACH_TRIZEPS3 TRIZEPS3 635 zefeerdza MACH_ZEFEERDZA ZEFEERDZA 636 zefeerdzb MACH_ZEFEERDZB ZEFEERDZB 637 @@ -721,7 +721,7 @@ gp32 MACH_GP32 GP32 706 gem MACH_GEM GEM 707 i858 MACH_I858 I858 708 hx2750 MACH_HX2750 HX2750 709 -mxc91131evb MACH_MXC91131EVB MXC91131EVB 710 +mxc91131evb MACH_ZEUSEVB ZEUSEVB 710 p700 MACH_P700 P700 711 cpe MACH_CPE CPE 712 spitz MACH_SPITZ SPITZ 713 @@ -802,7 +802,7 @@ cpuat91 MACH_CPUAT91 CPUAT91 787 rea9200 MACH_REA9200 REA9200 788 acts_pune_sa1110 MACH_ACTS_PUNE_SA1110 ACTS_PUNE_SA1110 789 ixp425 MACH_IXP425 IXP425 790 -i30030ads MACH_I30030ADS I30030ADS 791 +i30030ads MACH_ARGONPLUSODYSSEY ARGONPLUSODYSSEY 791 perch MACH_PERCH PERCH 792 eis05r1 MACH_EIS05R1 EIS05R1 793 pepperpad MACH_PEPPERPAD PEPPERPAD 794 @@ -930,7 +930,7 @@ netclient MACH_NETCLIENT NETCLIENT 916 xscale_palmtt5 MACH_XSCALE_PALMTT5 XSCALE_PALMTT5 917 xscale_palmtc MACH_OMAP_PALMTC OMAP_PALMTC 918 omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 -mxc30030evb MACH_MXC30030EVB MXC30030EVB 920 +mxc30030evb MACH_ARGONLVEVB ARGONLVEVB 920 rea_2d MACH_REA_2D REA_2D 921 eti3e524 MACH_TI3E524 TI3E524 922 ateb9200 MACH_ATEB9200 ATEB9200 923 @@ -986,7 +986,7 @@ redfox MACH_REDFOX REDFOX 972 mysh_ep9315_1 MACH_MYSH_EP9315_1 MYSH_EP9315_1 973 tpf106 MACH_TPF106 TPF106 974 at91rm9200kg MACH_AT91RM9200KG AT91RM9200KG 975 -rcmt2 MACH_SLEDB SLEDB 976 +racemt2 MACH_SLEDB SLEDB 976 ontrack MACH_ONTRACK ONTRACK 977 pm1200 MACH_PM1200 PM1200 978 ess24562 MACH_ESS24XXX ESS24XXX 979 @@ -1022,7 +1022,7 @@ smdk2440 MACH_SMDK2440 SMDK2440 1008 smdk2412 MACH_SMDK2412 SMDK2412 1009 webbox MACH_WEBBOX WEBBOX 1010 cwwndp MACH_CWWNDP CWWNDP 1011 -i839 MACH_DRAGON DRAGON 1012 +dragon MACH_DRAGON DRAGON 1012 opendo_cpu_board MACH_OPENDO_CPU_BOARD OPENDO_CPU_BOARD 1013 ccm2200 MACH_CCM2200 CCM2200 1014 etwarm MACH_ETWARM ETWARM 1015 @@ -1040,56 +1040,3 @@ edg79524 MACH_EDG79524 EDG79524 1026 ai2410 MACH_AI2410 AI2410 1027 ixp465 MACH_IXP465 IXP465 1028 balloon3 MACH_BALLOON3 BALLOON3 1029 -heins MACH_HEINS HEINS 1030 -mpluseva MACH_MPLUSEVA MPLUSEVA 1031 -rt042 MACH_RT042 RT042 1032 -cwiem MACH_CWIEM CWIEM 1033 -cm_x270 MACH_CM_X270 CM_X270 1034 -cm_x255 MACH_CM_X255 CM_X255 1035 -esh_at91 MACH_ESH_AT91 ESH_AT91 1036 -sandgate3 MACH_SANDGATE3 SANDGATE3 1037 -primo MACH_PRIMO PRIMO 1038 -gemstone MACH_GEMSTONE GEMSTONE 1039 -pronghorn_metro MACH_PRONGHORNMETRO PRONGHORNMETRO 1040 -sidewinder MACH_SIDEWINDER SIDEWINDER 1041 -picomod1 MACH_PICOMOD1 PICOMOD1 1042 -sg590 MACH_SG590 SG590 1043 -akai9307 MACH_AKAI9307 AKAI9307 1044 -fontaine MACH_FONTAINE FONTAINE 1045 -wombat MACH_WOMBAT WOMBAT 1046 -acq300 MACH_ACQ300 ACQ300 1047 -mod_270 MACH_MOD_270 MOD_270 1048 -vmc_vc0820 MACH_VC0820 VC0820 1049 -ani_aim MACH_ANI_AIM ANI_AIM 1050 -jellyfish MACH_JELLYFISH JELLYFISH 1051 -amanita MACH_AMANITA AMANITA 1052 -vlink MACH_VLINK VLINK 1053 -dexflex MACH_DEXFLEX DEXFLEX 1054 -eigen_ttq MACH_EIGEN_TTQ EIGEN_TTQ 1055 -arcom_titan MACH_ARCOM_TITAN ARCOM_TITAN 1056 -tabla MACH_TABLA TABLA 1057 -mdirac3 MACH_MDIRAC3 MDIRAC3 1058 -mrhfbp2 MACH_MRHFBP2 MRHFBP2 1059 -at91rm9200rb MACH_AT91RM9200RB AT91RM9200RB 1060 -ani_apm MACH_ANI_APM ANI_APM 1061 -ella1 MACH_ELLA1 ELLA1 1062 -inhand_pxa27x MACH_INHAND_PXA27X INHAND_PXA27X 1063 -inhand_pxa25x MACH_INHAND_PXA25X INHAND_PXA25X 1064 -empos_xm MACH_EMPOS_XM EMPOS_XM 1065 -empos MACH_EMPOS EMPOS 1066 -empos_tiny MACH_EMPOS_TINY EMPOS_TINY 1067 -empos_sm MACH_EMPOS_SM EMPOS_SM 1068 -egret MACH_EGRET EGRET 1069 -ostrich MACH_OSTRICH OSTRICH 1070 -n50 MACH_N50 N50 1071 -ecbat91 MACH_ECBAT91 ECBAT91 1072 -stareast MACH_STAREAST STAREAST 1073 -dspg_dw MACH_DSPG_DW DSPG_DW 1074 -onearm MACH_ONEARM ONEARM 1075 -mrg110_6 MACH_MRG110_6 MRG110_6 1076 -wrt300nv2 MACH_WRT300NV2 WRT300NV2 1077 -xm_bulverde MACH_XM_BULVERDE XM_BULVERDE 1078 -msm6100 MACH_MSM6100 MSM6100 1079 -eti_b1 MACH_ETI_B1 ETI_B1 1080 -za9l_series MACH_ZILOG_ZA9L ZILOG_ZA9L 1081 -bit2440 MACH_BIT2440 BIT2440 1082 diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile index 7e136e779..afabac31d 100644 --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile @@ -7,9 +7,6 @@ # EXTRA_CFLAGS := -DDEBUG # EXTRA_AFLAGS := -DDEBUG -AFLAGS :=$(AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp) -LDFLAGS +=--no-warn-mismatch - obj-y += vfp.o -vfp-$(CONFIG_VFP) += vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o +vfp-$(CONFIG_VFP) += entry.o vfpmodule.o vfphw.o vfpsingle.o vfpdouble.o diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 96fdf30f6..4b9795098 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h @@ -156,7 +156,7 @@ struct vfp_single { }; extern s32 vfp_get_float(unsigned int reg); -extern void vfp_put_float(s32 val, unsigned int reg); +extern void vfp_put_float(unsigned int reg, s32 val); /* * VFP_SINGLE_MANTISSA_BITS - number of bits in the mantissa @@ -267,7 +267,7 @@ struct vfp_double { */ #define VFP_REG_ZERO 16 extern u64 vfp_get_double(unsigned int reg); -extern void vfp_put_double(u64 val, unsigned int reg); +extern void vfp_put_double(unsigned int reg, u64 val); #define VFP_DOUBLE_MANTISSA_BITS (52) #define VFP_DOUBLE_EXPONENT_BITS (11) @@ -341,17 +341,15 @@ static inline int vfp_double_type(struct vfp_double *s) u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char *func); +/* + * System registers + */ +extern u32 vfp_get_sys(unsigned int reg); +extern void vfp_put_sys(unsigned int reg, u32 val); + u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); /* * A special flag to tell the normalisation code not to normalise. */ #define VFP_NAN_FLAG 0x100 - -/* - * A bit pattern used to indicate the initial (unset) value of the - * exception mask, in case nothing handles an instruction. This - * doesn't include the NAN flag, which get masked out before - * we check for an error. - */ -#define VFP_EXCEPTION_ERROR ((u32)-1 & ~VFP_NAN_FLAG) diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index add48e36c..009038c81 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c @@ -195,7 +195,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce s64 d = vfp_double_pack(vd); pr_debug("VFP: %s: d(d%d)=%016llx exceptions=%08x\n", func, dd, d, exceptions); - vfp_put_double(d, dd); + vfp_put_double(dd, d); } return exceptions; } @@ -250,19 +250,19 @@ vfp_propagate_nan(struct vfp_double *vdd, struct vfp_double *vdn, */ static u32 vfp_double_fabs(int dd, int unused, int dm, u32 fpscr) { - vfp_put_double(vfp_double_packed_abs(vfp_get_double(dm)), dd); + vfp_put_double(dd, vfp_double_packed_abs(vfp_get_double(dm))); return 0; } static u32 vfp_double_fcpy(int dd, int unused, int dm, u32 fpscr) { - vfp_put_double(vfp_get_double(dm), dd); + vfp_put_double(dd, vfp_get_double(dm)); return 0; } static u32 vfp_double_fneg(int dd, int unused, int dm, u32 fpscr) { - vfp_put_double(vfp_double_packed_negate(vfp_get_double(dm)), dd); + vfp_put_double(dd, vfp_double_packed_negate(vfp_get_double(dm))); return 0; } @@ -287,7 +287,7 @@ static u32 vfp_double_fsqrt(int dd, int unused, int dm, u32 fpscr) vdp = &vfp_double_default_qnan; ret = FPSCR_IOC; } - vfp_put_double(vfp_double_pack(vdp), dd); + vfp_put_double(dd, vfp_double_pack(vdp)); return ret; } @@ -465,7 +465,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr) */ if (tm & (VFP_INFINITY|VFP_NAN)) { vsd.exponent = 255; - if (tm == VFP_QNAN) + if (tm & VFP_NAN) vsd.significand |= VFP_SINGLE_SIGNIFICAND_QNAN; goto pack_nan; } else if (tm & VFP_ZERO) @@ -476,7 +476,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr) return vfp_single_normaliseround(sd, &vsd, fpscr, exceptions, "fcvts"); pack_nan: - vfp_put_float(vfp_single_pack(&vsd), sd); + vfp_put_float(sd, vfp_single_pack(&vsd)); return exceptions; } @@ -573,7 +573,7 @@ static u32 vfp_double_ftoui(int sd, int unused, int dm, u32 fpscr) pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); - vfp_put_float(d, sd); + vfp_put_float(sd, d); return exceptions; } @@ -648,7 +648,7 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr) pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); - vfp_put_float((s32)d, sd); + vfp_put_float(sd, (s32)d); return exceptions; } @@ -1084,7 +1084,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr) vdn_nan: exceptions = vfp_propagate_nan(&vdd, &vdn, &vdm, fpscr); pack: - vfp_put_double(vfp_double_pack(&vdd), dd); + vfp_put_double(dd, vfp_double_pack(&vdd)); return exceptions; vdm_nan: @@ -1104,7 +1104,7 @@ static u32 vfp_double_fdiv(int dd, int dn, int dm, u32 fpscr) goto pack; invalid: - vfp_put_double(vfp_double_pack(&vfp_double_default_qnan), dd); + vfp_put_double(dd, vfp_double_pack(&vfp_double_default_qnan)); return FPSCR_IOC; } @@ -1127,7 +1127,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) { u32 op = inst & FOP_MASK; u32 exceptions = 0; - unsigned int dest; + unsigned int dd = vfp_get_dd(inst); unsigned int dn = vfp_get_dn(inst); unsigned int dm = vfp_get_dm(inst); unsigned int vecitr, veclen, vecstride; @@ -1136,21 +1136,11 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) veclen = fpscr & FPSCR_LENGTH_MASK; vecstride = (1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK)) * 2; - /* - * fcvtds takes an sN register number as destination, not dN. - * It also always operates on scalars. - */ - if ((inst & FEXT_MASK) == FEXT_FCVT) { - veclen = 0; - dest = vfp_get_sd(inst); - } else - dest = vfp_get_dd(inst); - /* * If destination bank is zero, vector length is always '1'. * ARM DDI0100F C5.1.3, C5.3.2. */ - if (FREG_BANK(dest) == 0) + if (FREG_BANK(dd) == 0) veclen = 0; pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, @@ -1163,20 +1153,16 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) for (vecitr = 0; vecitr <= veclen; vecitr += 1 << FPSCR_LENGTH_BIT) { u32 except; - if (op == FOP_EXT && (inst & FEXT_MASK) == FEXT_FCVT) - pr_debug("VFP: itr%d (s%u) = op[%u] (d%u)\n", - vecitr >> FPSCR_LENGTH_BIT, - dest, dn, dm); - else if (op == FOP_EXT) + if (op == FOP_EXT) pr_debug("VFP: itr%d (d%u) = op[%u] (d%u)\n", vecitr >> FPSCR_LENGTH_BIT, - dest, dn, dm); + dd, dn, dm); else pr_debug("VFP: itr%d (d%u) = (d%u) op[%u] (d%u)\n", vecitr >> FPSCR_LENGTH_BIT, - dest, dn, FOP_TO_IDX(op), dm); + dd, dn, FOP_TO_IDX(op), dm); - except = fop(dest, dn, dm, fpscr); + except = fop(dd, dn, dm, fpscr); pr_debug("VFP: itr%d: exceptions=%08x\n", vecitr >> FPSCR_LENGTH_BIT, except); @@ -1194,7 +1180,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) * we encounter an exception. We continue. */ - dest = FREG_BANK(dest) + ((FREG_IDX(dest) + vecstride) & 6); + dd = FREG_BANK(dd) + ((FREG_IDX(dd) + vecstride) & 6); dn = FREG_BANK(dn) + ((FREG_IDX(dn) + vecstride) & 6); if (FREG_BANK(dm) != 0) dm = FREG_BANK(dm) + ((FREG_IDX(dm) + vecstride) & 6); diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index e51e6679c..a3f65b47a 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -178,12 +178,12 @@ vfp_get_float: .globl vfp_put_float vfp_put_float: - add pc, pc, r1, lsl #3 + add pc, pc, r0, lsl #3 mov r0, r0 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 - mcr p10, 0, r0, c\dr, c0, 0 @ fmsr r0, s0 + mcr p10, 0, r1, c\dr, c0, 0 @ fmsr r0, s0 mov pc, lr - mcr p10, 0, r0, c\dr, c0, 4 @ fmsr r0, s1 + mcr p10, 0, r1, c\dr, c0, 4 @ fmsr r0, s1 mov pc, lr .endr @@ -192,7 +192,7 @@ vfp_get_double: add pc, pc, r0, lsl #3 mov r0, r0 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 - fmrrd r0, r1, d\dr + mrrc p11, 1, r0, r1, c\dr @ fmrrd r0, r1, d\dr mov pc, lr .endr @@ -203,9 +203,9 @@ vfp_get_double: .globl vfp_put_double vfp_put_double: - add pc, pc, r2, lsl #3 + add pc, pc, r0, lsl #3 mov r0, r0 .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 - fmdrr d\dr, r0, r1 + mcrr p11, 1, r1, r2, c\dr @ fmdrr r1, r2, d\dr mov pc, lr .endr diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 4178f6cc3..03486be04 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -9,13 +9,12 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include #include #include - -#include #include #include "vfpinstr.h" @@ -37,54 +36,37 @@ union vfp_state *last_VFP_context; */ unsigned int VFP_arch; -static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) +/* + * Per-thread VFP initialisation. + */ +void vfp_flush_thread(union vfp_state *vfp) { - struct thread_info *thread = v; - union vfp_state *vfp = &thread->vfpstate; - - switch (cmd) { - case THREAD_NOTIFY_FLUSH: - /* - * Per-thread VFP initialisation. - */ - memset(vfp, 0, sizeof(union vfp_state)); - - vfp->hard.fpexc = FPEXC_ENABLE; - vfp->hard.fpscr = FPSCR_ROUND_NEAREST; + memset(vfp, 0, sizeof(union vfp_state)); - /* - * Disable VFP to ensure we initialise it first. - */ - fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); + vfp->hard.fpexc = FPEXC_ENABLE; + vfp->hard.fpscr = FPSCR_ROUND_NEAREST; - /* - * FALLTHROUGH: Ensure we don't try to overwrite our newly - * initialised state information on the first fault. - */ - - case THREAD_NOTIFY_RELEASE: - /* - * Per-thread VFP cleanup. - */ - if (last_VFP_context == vfp) - last_VFP_context = NULL; - break; - - case THREAD_NOTIFY_SWITCH: - /* - * Always disable VFP so we can lazily save/restore the - * old state. - */ - fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); - break; - } + /* + * Disable VFP to ensure we initialise it first. + */ + fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); - return NOTIFY_DONE; + /* + * Ensure we don't try to overwrite our newly initialised + * state information on the first fault. + */ + if (last_VFP_context == vfp) + last_VFP_context = NULL; } -static struct notifier_block vfp_notifier_block = { - .notifier_call = vfp_notifier, -}; +/* + * Per-thread VFP cleanup. + */ +void vfp_release_thread(union vfp_state *vfp) +{ + if (last_VFP_context == vfp) + last_VFP_context = NULL; +} /* * Raise a SIGFPE for the current process. @@ -131,7 +113,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ pr_debug("VFP: raising exceptions %08x\n", exceptions); - if (exceptions == VFP_EXCEPTION_ERROR) { + if (exceptions == (u32)-1) { vfp_panic("unhandled bounce"); vfp_raise_sigfpe(0, regs); return; @@ -170,7 +152,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ */ static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs) { - u32 exceptions = VFP_EXCEPTION_ERROR; + u32 exceptions = (u32)-1; pr_debug("VFP: emulate: INST=0x%08x SCR=0x%08x\n", inst, fpscr); @@ -299,8 +281,6 @@ static int __init vfp_init(void) (vfpsid & FPSID_VARIANT_MASK) >> FPSID_VARIANT_BIT, (vfpsid & FPSID_REV_MASK) >> FPSID_REV_BIT); vfp_vector = vfp_support_entry; - - thread_register_notifier(&vfp_notifier_block); } return 0; } diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index 8f6c179ca..dae2c2f46 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c @@ -200,7 +200,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce s32 d = vfp_single_pack(vs); pr_debug("VFP: %s: d(s%d)=%08x exceptions=%08x\n", func, sd, d, exceptions); - vfp_put_float(d, sd); + vfp_put_float(sd, d); } return exceptions; @@ -257,19 +257,19 @@ vfp_propagate_nan(struct vfp_single *vsd, struct vfp_single *vsn, */ static u32 vfp_single_fabs(int sd, int unused, s32 m, u32 fpscr) { - vfp_put_float(vfp_single_packed_abs(m), sd); + vfp_put_float(sd, vfp_single_packed_abs(m)); return 0; } static u32 vfp_single_fcpy(int sd, int unused, s32 m, u32 fpscr) { - vfp_put_float(m, sd); + vfp_put_float(sd, m); return 0; } static u32 vfp_single_fneg(int sd, int unused, s32 m, u32 fpscr) { - vfp_put_float(vfp_single_packed_negate(m), sd); + vfp_put_float(sd, vfp_single_packed_negate(m)); return 0; } @@ -333,7 +333,7 @@ static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr) vsp = &vfp_single_default_qnan; ret = FPSCR_IOC; } - vfp_put_float(vfp_single_pack(vsp), sd); + vfp_put_float(sd, vfp_single_pack(vsp)); return ret; } @@ -506,7 +506,7 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr) */ if (tm & (VFP_INFINITY|VFP_NAN)) { vdd.exponent = 2047; - if (tm == VFP_QNAN) + if (tm & VFP_NAN) vdd.significand |= VFP_DOUBLE_SIGNIFICAND_QNAN; goto pack_nan; } else if (tm & VFP_ZERO) @@ -514,10 +514,14 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr) else vdd.exponent = vsm.exponent + (1023 - 127); + /* + * Technically, if bit 0 of dd is set, this is an invalid + * instruction. However, we ignore this for efficiency. + */ return vfp_double_normaliseround(dd, &vdd, fpscr, exceptions, "fcvtd"); pack_nan: - vfp_put_double(vfp_double_pack(&vdd), dd); + vfp_put_double(dd, vfp_double_pack(&vdd)); return exceptions; } @@ -613,7 +617,7 @@ static u32 vfp_single_ftoui(int sd, int unused, s32 m, u32 fpscr) pr_debug("VFP: ftoui: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); - vfp_put_float(d, sd); + vfp_put_float(sd, d); return exceptions; } @@ -692,7 +696,7 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr) pr_debug("VFP: ftosi: d(s%d)=%08x exceptions=%08x\n", sd, d, exceptions); - vfp_put_float((s32)d, sd); + vfp_put_float(sd, (s32)d); return exceptions; } @@ -1127,7 +1131,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) vsn_nan: exceptions = vfp_propagate_nan(&vsd, &vsn, &vsm, fpscr); pack: - vfp_put_float(vfp_single_pack(&vsd), sd); + vfp_put_float(sd, vfp_single_pack(&vsd)); return exceptions; vsm_nan: @@ -1147,7 +1151,7 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr) goto pack; invalid: - vfp_put_float(vfp_single_pack(&vfp_single_default_qnan), sd); + vfp_put_float(sd, vfp_single_pack(&vfp_single_default_qnan)); return FPSCR_IOC; } @@ -1170,7 +1174,7 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) { u32 op = inst & FOP_MASK; u32 exceptions = 0; - unsigned int dest; + unsigned int sd = vfp_get_sd(inst); unsigned int sn = vfp_get_sn(inst); unsigned int sm = vfp_get_sm(inst); unsigned int vecitr, veclen, vecstride; @@ -1179,23 +1183,11 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) veclen = fpscr & FPSCR_LENGTH_MASK; vecstride = 1 + ((fpscr & FPSCR_STRIDE_MASK) == FPSCR_STRIDE_MASK); - /* - * fcvtsd takes a dN register number as destination, not sN. - * Technically, if bit 0 of dd is set, this is an invalid - * instruction. However, we ignore this for efficiency. - * It also only operates on scalars. - */ - if ((inst & FEXT_MASK) == FEXT_FCVT) { - veclen = 0; - dest = vfp_get_dd(inst); - } else - dest = vfp_get_sd(inst); - /* * If destination bank is zero, vector length is always '1'. * ARM DDI0100F C5.1.3, C5.3.2. */ - if (FREG_BANK(dest) == 0) + if (FREG_BANK(sd) == 0) veclen = 0; pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, @@ -1209,18 +1201,15 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) s32 m = vfp_get_float(sm); u32 except; - if (op == FOP_EXT && (inst & FEXT_MASK) == FEXT_FCVT) - pr_debug("VFP: itr%d (d%u) = op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, sm, m); - else if (op == FOP_EXT) + if (op == FOP_EXT) pr_debug("VFP: itr%d (s%u) = op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, sm, m); + vecitr >> FPSCR_LENGTH_BIT, sd, sn, sm, m); else pr_debug("VFP: itr%d (s%u) = (s%u) op[%u] (s%u=%08x)\n", - vecitr >> FPSCR_LENGTH_BIT, dest, sn, + vecitr >> FPSCR_LENGTH_BIT, sd, sn, FOP_TO_IDX(op), sm, m); - except = fop(dest, sn, m, fpscr); + except = fop(sd, sn, m, fpscr); pr_debug("VFP: itr%d: exceptions=%08x\n", vecitr >> FPSCR_LENGTH_BIT, except); @@ -1238,7 +1227,7 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) * we encounter an exception. We continue. */ - dest = FREG_BANK(dest) + ((FREG_IDX(dest) + vecstride) & 7); + sd = FREG_BANK(sd) + ((FREG_IDX(sd) + vecstride) & 7); sn = FREG_BANK(sn) + ((FREG_IDX(sn) + vecstride) & 7); if (FREG_BANK(sm) != 0) sm = FREG_BANK(sm) + ((FREG_IDX(sm) + vecstride) & 7); diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig index 0a4e2ac0d..14523899a 100644 --- a/arch/arm26/Kconfig +++ b/arch/arm26/Kconfig @@ -79,7 +79,7 @@ config ARCH_A5K bool "A5000" select ARCH_MAY_HAVE_PC_FDC help - Say Y here to support the Acorn A5000. + Say Y here to to support the Acorn A5000. Linux can support the internal IDE disk and CD-ROM interface, serial and parallel port, @@ -129,7 +129,7 @@ config ZBOOT_ROM_BSS config XIP_KERNEL bool "Execute In Place (XIP) kernel image" help - Select this option to create a kernel that can be programmed into + Select this option to create a kernel that can be programed into the OS ROMs. comment "At least one math emulation must be selected" @@ -140,7 +140,7 @@ config FPE_NWFPE Say Y to include the NWFPE floating point emulator in the kernel. This is necessary to run most binaries. Linux does not currently support floating point hardware so you need to say Y here even if - your machine has an FPA or floating point co-processor module. + your machine has an FPA or floating point co-processor podule. It is also possible to say M to build the emulator as a module (nwfpe) or indeed to leave it out altogether. However, unless you diff --git a/arch/arm26/boot/compressed/head.S b/arch/arm26/boot/compressed/head.S index 2a2cda36d..0307804a6 100644 --- a/arch/arm26/boot/compressed/head.S +++ b/arch/arm26/boot/compressed/head.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include /* diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c index 07907b6ec..9d66c27f2 100644 --- a/arch/arm26/kernel/armksyms.c +++ b/arch/arm26/kernel/armksyms.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include diff --git a/arch/arm26/kernel/asm-offsets.c b/arch/arm26/kernel/asm-offsets.c index 76d9d7d48..ac682d5fd 100644 --- a/arch/arm26/kernel/asm-offsets.c +++ b/arch/arm26/kernel/asm-offsets.c @@ -12,6 +12,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/arch/arm26/kernel/compat.c b/arch/arm26/kernel/compat.c index 21e966ff0..db0310db8 100644 --- a/arch/arm26/kernel/compat.c +++ b/arch/arm26/kernel/compat.c @@ -16,6 +16,7 @@ * the kernel for 5 years from now (2001). This will allow boot loaders * to convert to the new struct tag way. */ +#include #include #include #include diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c index 047d0a408..f2278aada 100644 --- a/arch/arm26/kernel/ecard.c +++ b/arch/arm26/kernel/ecard.c @@ -24,6 +24,7 @@ */ #define ECARD_C +#include #include #include #include diff --git a/arch/arm26/kernel/fiq.c b/arch/arm26/kernel/fiq.c index c4776c96b..a24272b61 100644 --- a/arch/arm26/kernel/fiq.c +++ b/arch/arm26/kernel/fiq.c @@ -36,6 +36,7 @@ * - enables FIQ. * 6. Goto 3 */ +#include #include #include #include diff --git a/arch/arm26/kernel/head.S b/arch/arm26/kernel/head.S index 93575e0e5..8bfc62539 100644 --- a/arch/arm26/kernel/head.S +++ b/arch/arm26/kernel/head.S @@ -10,6 +10,7 @@ * * 26-bit kernel startup code */ +#include #include #include diff --git a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c index d87d68b77..0934e6fba 100644 --- a/arch/arm26/kernel/irq.c +++ b/arch/arm26/kernel/irq.c @@ -18,6 +18,7 @@ * IRQ's are in fact implemented a bit like signal handlers for the kernel. * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include @@ -190,7 +191,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) int ret; spin_unlock(&irq_controller_lock); - if (!(action->flags & IRQF_DISABLED)) + if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); status = 0; @@ -201,7 +202,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) action = action->next; } while (action); - if (status & IRQF_SAMPLE_RANDOM) + if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); spin_lock_irq(&irq_controller_lock); @@ -451,7 +452,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) * so we have to be careful not to interfere with a * running system. */ - if (new->flags & IRQF_SAMPLE_RANDOM) { + if (new->flags & SA_SAMPLE_RANDOM) { /* * This function might sleep, we want to call it first, * outside of the atomic block. @@ -471,7 +472,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) p = &desc->action; if ((old = *p) != NULL) { /* Can't share interrupts unless both agree to */ - if (!(old->flags & new->flags & IRQF_SHARED)) { + if (!(old->flags & new->flags & SA_SHIRQ)) { spin_unlock_irqrestore(&irq_controller_lock, flags); return -EBUSY; } @@ -526,11 +527,11 @@ int setup_irq(unsigned int irq, struct irqaction *new) * * Flags: * - * IRQF_SHARED Interrupt is shared + * SA_SHIRQ Interrupt is shared * - * IRQF_DISABLED Disable local interrupts while processing + * SA_INTERRUPT Disable local interrupts while processing * - * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy + * SA_SAMPLE_RANDOM The interrupt can be used for entropy * */ @@ -542,7 +543,7 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_ struct irqaction *action; if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || - (irq_flags & IRQF_SHARED && !dev_id)) + (irq_flags & SA_SHIRQ && !dev_id)) return -EINVAL; action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c index dcd81e62f..386305659 100644 --- a/arch/arm26/kernel/process.c +++ b/arch/arm26/kernel/process.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c index 9343889b2..282e24d79 100644 --- a/arch/arm26/kernel/ptrace.c +++ b/arch/arm26/kernel/ptrace.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm26/kernel/semaphore.c b/arch/arm26/kernel/semaphore.c index 5447a06db..3023a5343 100644 --- a/arch/arm26/kernel/semaphore.c +++ b/arch/arm26/kernel/semaphore.c @@ -13,6 +13,7 @@ * published by the Free Software Foundation. */ #include +#include #include #include #include diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c index e7eb070f7..4eb329e38 100644 --- a/arch/arm26/kernel/setup.c +++ b/arch/arm26/kernel/setup.c @@ -8,6 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -17,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm26/kernel/signal.c b/arch/arm26/kernel/signal.c index 6a8ef8da6..2a48c1210 100644 --- a/arch/arm26/kernel/signal.c +++ b/arch/arm26/kernel/signal.c @@ -10,6 +10,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index db63d75d0..335525339 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c @@ -18,6 +18,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include @@ -205,7 +206,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction timer_irq = { .name = "timer", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .handler = timer_interrupt, }; diff --git a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c index 7a297db05..4eea07403 100644 --- a/arch/arm26/kernel/traps.c +++ b/arch/arm26/kernel/traps.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include diff --git a/arch/arm26/kernel/vmlinux.lds.S b/arch/arm26/kernel/vmlinux.lds.S index 1fa39f02e..811a69048 100644 --- a/arch/arm26/kernel/vmlinux.lds.S +++ b/arch/arm26/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_XIP_KERNEL diff --git a/arch/arm26/lib/backtrace.S b/arch/arm26/lib/backtrace.S index e27feb1e8..d793fe433 100644 --- a/arch/arm26/lib/backtrace.S +++ b/arch/arm26/lib/backtrace.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include .text diff --git a/arch/arm26/lib/csumpartialcopyuser.S b/arch/arm26/lib/csumpartialcopyuser.S index a98eea743..261dd154c 100644 --- a/arch/arm26/lib/csumpartialcopyuser.S +++ b/arch/arm26/lib/csumpartialcopyuser.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm26/lib/ecard.S b/arch/arm26/lib/ecard.S index 658bc4529..b4633150f 100644 --- a/arch/arm26/lib/ecard.S +++ b/arch/arm26/lib/ecard.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include /* for CONFIG_CPU_nn */ #include #include #include diff --git a/arch/arm26/lib/io-acorn.S b/arch/arm26/lib/io-acorn.S index 5f62ade5b..f6c3e30b1 100644 --- a/arch/arm26/lib/io-acorn.S +++ b/arch/arm26/lib/io-acorn.S @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include /* for CONFIG_CPU_nn */ #include #include #include diff --git a/arch/arm26/lib/kbd.c b/arch/arm26/lib/kbd.c index cb56e943e..22d2c93aa 100644 --- a/arch/arm26/lib/kbd.c +++ b/arch/arm26/lib/kbd.c @@ -1,3 +1,4 @@ +#include #include //#include #include diff --git a/arch/arm26/lib/lib1funcs.S b/arch/arm26/lib/lib1funcs.S index 0e29970b0..b8f9518db 100644 --- a/arch/arm26/lib/lib1funcs.S +++ b/arch/arm26/lib/lib1funcs.S @@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #define RET movs #define RETc(x) mov##x##s diff --git a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c index 4402a5a1b..cbc7c61d5 100644 --- a/arch/arm26/machine/dma.c +++ b/arch/arm26/machine/dma.c @@ -10,6 +10,7 @@ * * DMA functions specific to Archimedes and A5000 architecture */ +#include #include #include diff --git a/arch/arm26/machine/irq.c b/arch/arm26/machine/irq.c index a60d543ed..4361863f7 100644 --- a/arch/arm26/machine/irq.c +++ b/arch/arm26/machine/irq.c @@ -16,6 +16,7 @@ * 08-09-2002 IM Brought up to date for 2.5 * 01-06-2003 JMA Removed arc_fiq_chip */ +#include #include #include diff --git a/arch/arm26/mm/extable.c b/arch/arm26/mm/extable.c index 38e1958d9..2d9f5b5a7 100644 --- a/arch/arm26/mm/extable.c +++ b/arch/arm26/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/arm26/mm/extable.c */ +#include #include #include diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c index 761938b56..bd6f2db60 100644 --- a/arch/arm26/mm/fault.c +++ b/arch/arm26/mm/fault.c @@ -8,6 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c index 562fac12e..7da8a5205 100644 --- a/arch/arm26/mm/init.c +++ b/arch/arm26/mm/init.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/arm26/nwfpe/fpmodule.c b/arch/arm26/nwfpe/fpmodule.c index a8fad92eb..5258c6096 100644 --- a/arch/arm26/nwfpe/fpmodule.c +++ b/arch/arm26/nwfpe/fpmodule.c @@ -25,6 +25,7 @@ #include #include +#include /* XXX */ #include diff --git a/arch/arm26/nwfpe/fpmodule.h b/arch/arm26/nwfpe/fpmodule.h index f971ddd60..ef71aab46 100644 --- a/arch/arm26/nwfpe/fpmodule.h +++ b/arch/arm26/nwfpe/fpmodule.h @@ -22,6 +22,7 @@ #ifndef __FPMODULE_H__ #define __FPMODULE_H__ +#include #define REG_ORIG_R0 16 #define REG_CPSR 15 diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 62348e80b..147014630 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -28,10 +28,6 @@ config GENERIC_CALIBRATE_DELAY bool default y -config IRQ_PER_CPU - bool - default y - config CRIS bool default y diff --git a/arch/cris/arch-v10/boot/compressed/head.S b/arch/cris/arch-v10/boot/compressed/head.S index 610bdb237..e73f44c99 100644 --- a/arch/cris/arch-v10/boot/compressed/head.S +++ b/arch/cris/arch-v10/boot/compressed/head.S @@ -8,6 +8,7 @@ * */ +#include #define ASSEMBLER_MACROS_ONLY #include diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c index ffb8d21b2..1b5e83f1f 100644 --- a/arch/cris/arch-v10/boot/compressed/misc.c +++ b/arch/cris/arch-v10/boot/compressed/misc.c @@ -20,6 +20,7 @@ #define KERNEL_LOAD_ADR 0x40004000 +#include #include #include diff --git a/arch/cris/arch-v10/boot/rescue/head.S b/arch/cris/arch-v10/boot/rescue/head.S index f223cc0c0..addb2194d 100644 --- a/arch/cris/arch-v10/boot/rescue/head.S +++ b/arch/cris/arch-v10/boot/rescue/head.S @@ -63,6 +63,7 @@ * Copyright (C) 1999, 2000, 2001, 2002, 2003 Axis Communications AB */ +#include #define ASSEMBLER_MACROS_ONLY #include diff --git a/arch/cris/arch-v10/boot/rescue/kimagerescue.S b/arch/cris/arch-v10/boot/rescue/kimagerescue.S index cbccd6316..264bf7afc 100644 --- a/arch/cris/arch-v10/boot/rescue/kimagerescue.S +++ b/arch/cris/arch-v10/boot/rescue/kimagerescue.S @@ -6,6 +6,7 @@ * 4004000 and after a timeout jump to it. */ +#include #define ASSEMBLER_MACROS_ONLY #include diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index 4fa81abab..56b038c8d 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c @@ -138,6 +138,7 @@ #include #include #include +#include #include #include diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c index 3cf4f23de..b100f2649 100644 --- a/arch/cris/arch-v10/drivers/ds1302.c +++ b/arch/cris/arch-v10/drivers/ds1302.c @@ -139,6 +139,7 @@ *! *!***************************************************************************/ +#include #include #include diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c index 6e1f191a7..512f16dec 100644 --- a/arch/cris/arch-v10/drivers/eeprom.c +++ b/arch/cris/arch-v10/drivers/eeprom.c @@ -93,6 +93,7 @@ *! (c) 1999 Axis Communications AB, Lund, Sweden *!*****************************************************************************/ +#include #include #include #include @@ -450,9 +451,9 @@ int __init eeprom_init(void) static int eeprom_open(struct inode * inode, struct file * file) { - if(iminor(inode) != EEPROM_MINOR_NR) + if(MINOR(inode->i_rdev) != EEPROM_MINOR_NR) return -ENXIO; - if(imajor(inode) != EEPROM_MAJOR_NR) + if(MAJOR(inode->i_rdev) != EEPROM_MAJOR_NR) return -ENXIO; if( eeprom.size > 0 ) diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index fcba6632e..09963fe29 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c @@ -135,6 +135,7 @@ * */ +#include #include #include @@ -435,7 +436,7 @@ static int gpio_open(struct inode *inode, struct file *filp) { struct gpio_private *priv; - int p = iminor(inode); + int p = MINOR(inode->i_rdev); if (p > GPIO_MINOR_LAST) return -EINVAL; @@ -937,11 +938,11 @@ gpio_init(void) * in some tests. */ if (request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt, - IRQF_SHARED | IRQF_DISABLED,"gpio poll", NULL)) { + SA_SHIRQ | SA_INTERRUPT,"gpio poll", NULL)) { printk(KERN_CRIT "err: timer0 irq for gpio\n"); } if (request_irq(PA_IRQ_NBR, gpio_pa_interrupt, - IRQF_SHARED | IRQF_DISABLED,"gpio PA", NULL)) { + SA_SHIRQ | SA_INTERRUPT,"gpio PA", NULL)) { printk(KERN_CRIT "err: PA irq for gpio\n"); } diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c index 6114596c3..b38267d60 100644 --- a/arch/cris/arch-v10/drivers/i2c.c +++ b/arch/cris/arch-v10/drivers/i2c.c @@ -96,6 +96,7 @@ #include #include #include +#include #include diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 8c830eefc..af517c210 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c @@ -18,6 +18,7 @@ * $Id: pcf8563.c,v 1.11 2005/03/07 13:13:07 starvik Exp $ */ +#include #include #include #include diff --git a/arch/cris/arch-v10/kernel/crisksyms.c b/arch/cris/arch-v10/kernel/crisksyms.c index e6b801355..b332bf9b3 100644 --- a/arch/cris/arch-v10/kernel/crisksyms.c +++ b/arch/cris/arch-v10/kernel/crisksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c index 2b536ca6f..f3a85b77c 100644 --- a/arch/cris/arch-v10/kernel/debugport.c +++ b/arch/cris/arch-v10/kernel/debugport.c @@ -103,6 +103,7 @@ * */ +#include #include #include #include @@ -540,7 +541,7 @@ init_dummy_console(void) dummy_driver.init_termios = tty_std_termios; dummy_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ - dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; dummy_driver.open = dummy_open; dummy_driver.close = dummy_close; diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index ae45d4522..c808005e8 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S @@ -263,6 +263,7 @@ * */ +#include #include #include #include diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 8cbdf594b..cac05a5e5 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c @@ -111,6 +111,7 @@ #include #include +#include #include #include diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S index d946d8b8d..f00c145b4 100644 --- a/arch/cris/arch-v10/kernel/head.S +++ b/arch/cris/arch-v10/kernel/head.S @@ -183,6 +183,7 @@ * */ +#include #define ASSEMBLER_MACROS_ONLY /* The IO_* macros use the ## token concatenation operator, so -traditional must not be used when assembling this file. */ diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index 96094cbf1..4b368a122 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c @@ -15,6 +15,7 @@ #include #include #include +#include #define mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr)); #define unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr)); @@ -171,7 +172,7 @@ init_IRQ(void) /* Initialize IRQ handler descriptiors. */ for(i = 2; i < NR_IRQS; i++) { - irq_desc[i].chip = &crisv10_irq_type; + irq_desc[i].handler = &crisv10_irq_type; set_int_vector(i, interrupt[i]); } diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index b6831ceb6..0a675ce9e 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c @@ -11,6 +11,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include diff --git a/arch/cris/arch-v10/kernel/setup.c b/arch/cris/arch-v10/kernel/setup.c index 682ef955a..b668d7fb6 100644 --- a/arch/cris/arch-v10/kernel/setup.c +++ b/arch/cris/arch-v10/kernel/setup.c @@ -10,6 +10,7 @@ * This file handles the architecture-dependent parts of initialization */ +#include #include #include #include diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 9c22b76e1..dc3dfe9b4 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -251,11 +252,11 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -/* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain - * it needs to be IRQF_DISABLED to make the jiffies update work properly +/* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain + * it needs to be SA_INTERRUPT to make the jiffies update work properly */ -static struct irqaction irq2 = { timer_interrupt, IRQF_SHARED | IRQF_DISABLED, +static struct irqaction irq2 = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; void __init diff --git a/arch/cris/arch-v10/kernel/traps.c b/arch/cris/arch-v10/kernel/traps.c index 4becc1bcc..34a27ea20 100644 --- a/arch/cris/arch-v10/kernel/traps.c +++ b/arch/cris/arch-v10/kernel/traps.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/arch/cris/arch-v10/lib/dram_init.S b/arch/cris/arch-v10/lib/dram_init.S index 9cf83932c..2ef4ad570 100644 --- a/arch/cris/arch-v10/lib/dram_init.S +++ b/arch/cris/arch-v10/lib/dram_init.S @@ -70,6 +70,7 @@ * uses this code. */ +#include ;; WARNING! The registers r8 and r9 are used as parameters carrying ;; information from the decompressor (if the kernel was compressed). diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c index e0fcd1a9b..ff3481e76 100644 --- a/arch/cris/arch-v10/mm/init.c +++ b/arch/cris/arch-v10/mm/init.c @@ -2,6 +2,7 @@ * linux/arch/cris/arch-v10/mm/init.c * */ +#include #include #include #include diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S index 689729a7e..71ba736be 100644 --- a/arch/cris/arch-v10/vmlinux.lds.S +++ b/arch/cris/arch-v10/vmlinux.lds.S @@ -8,6 +8,7 @@ * the kernel has booted. */ +#include #include jiffies = jiffies_64; diff --git a/arch/cris/arch-v32/boot/compressed/head.S b/arch/cris/arch-v32/boot/compressed/head.S index 34cea10a8..0c55b83b8 100644 --- a/arch/cris/arch-v32/boot/compressed/head.S +++ b/arch/cris/arch-v32/boot/compressed/head.S @@ -5,6 +5,7 @@ * Copyright (C) 1999 - 2003, Axis Communications AB */ +#include #define ASSEMBLER_MACROS_ONLY #include #include diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 119026971..54644238e 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c @@ -20,6 +20,7 @@ #define KERNEL_LOAD_ADR 0x40004000 +#include #include #include diff --git a/arch/cris/arch-v32/boot/rescue/head.S b/arch/cris/arch-v32/boot/rescue/head.S index 8cdb4011b..61ede5f30 100644 --- a/arch/cris/arch-v32/boot/rescue/head.S +++ b/arch/cris/arch-v32/boot/rescue/head.S @@ -4,6 +4,7 @@ * RedBoot based RFL instead. Nothing to see here, move along. */ +#include #include #include diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 41952320e..b679f983b 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index ba096ebb0..c59ee28a3 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -2302,7 +2302,7 @@ static int cryptocop_job_setup(struct cryptocop_prio_job **pj, struct cryptocop_ static int cryptocop_open(struct inode *inode, struct file *filp) { - int p = iminor(inode); + int p = MINOR(inode->i_rdev); if (p != CRYPTOCOP_MINOR) return -EINVAL; diff --git a/arch/cris/arch-v32/drivers/gpio.c b/arch/cris/arch-v32/drivers/gpio.c index c3f876b4d..a551237dc 100644 --- a/arch/cris/arch-v32/drivers/gpio.c +++ b/arch/cris/arch-v32/drivers/gpio.c @@ -62,6 +62,7 @@ * */ +#include #include #include @@ -418,7 +419,7 @@ static int gpio_open(struct inode *inode, struct file *filp) { struct gpio_private *priv; - int p = iminor(inode); + int p = MINOR(inode->i_rdev); if (p > GPIO_MINOR_LAST) return -EINVAL; @@ -744,11 +745,11 @@ gpio_init(void) * in some tests. */ if (request_irq(TIMER_INTR_VECT, gpio_poll_timer_interrupt, - IRQF_SHARED | IRQF_DISABLED,"gpio poll", &alarmlist)) { + SA_SHIRQ | SA_INTERRUPT,"gpio poll", &alarmlist)) { printk("err: timer0 irq for gpio\n"); } if (request_irq(GEN_IO_INTR_VECT, gpio_pa_interrupt, - IRQF_SHARED | IRQF_DISABLED,"gpio PA", &alarmlist)) { + SA_SHIRQ | SA_INTERRUPT,"gpio PA", &alarmlist)) { printk("err: PA irq for gpio\n"); } /* enable the gio and timer irq in global config */ diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c index 95f00188c..440c20a94 100644 --- a/arch/cris/arch-v32/drivers/i2c.c +++ b/arch/cris/arch-v32/drivers/i2c.c @@ -33,6 +33,7 @@ #include #include #include +#include #include diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index 2fc7d75a3..d788bda35 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -324,12 +325,14 @@ pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned int pcf8563_open(struct inode *inode, struct file *filp) { + MOD_INC_USE_COUNT; return 0; } int pcf8563_release(struct inode *inode, struct file *filp) { + MOD_DEC_USE_COUNT; return 0; } diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index a2b9c60c2..24bc14988 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c @@ -27,6 +27,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, /* Leave vm_pgoff as-is, the PCI space address is the physical * address on this platform. */ + vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO); + prot = pgprot_val(vma->vm_page_prot); vma->vm_page_prot = __pgprot(prot); @@ -43,10 +45,10 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index e067806b2..c85a6df85 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -340,7 +341,7 @@ static inline int sync_data_avail_to_end(struct sync_port *port) static int sync_serial_open(struct inode *inode, struct file *file) { - int dev = iminor(inode); + int dev = MINOR(inode->i_rdev); sync_port* port; reg_dma_rw_cfg cfg = {.en = regk_dma_yes}; reg_dma_rw_intr_mask intr_mask = {.data = regk_dma_yes}; @@ -486,7 +487,7 @@ static int sync_serial_open(struct inode *inode, struct file *file) static int sync_serial_release(struct inode *inode, struct file *file) { - int dev = iminor(inode); + int dev = MINOR(inode->i_rdev); sync_port* port; if (dev < 0 || dev >= NUMBER_OF_PORTS || !ports[dev].enabled) @@ -504,7 +505,7 @@ static int sync_serial_release(struct inode *inode, struct file *file) static unsigned int sync_serial_poll(struct file *file, poll_table *wait) { - int dev = iminor(file->f_dentry->d_inode); + int dev = MINOR(file->f_dentry->d_inode->i_rdev); unsigned int mask = 0; sync_port* port; DEBUGPOLL( static unsigned int prev_mask = 0; ); @@ -531,7 +532,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { int return_val = 0; - int dev = iminor(file->f_dentry->d_inode); + int dev = MINOR(file->f_dentry->d_inode->i_rdev); sync_port* port; reg_sser_rw_tr_cfg tr_cfg; reg_sser_rw_rec_cfg rec_cfg; @@ -789,7 +790,7 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file, static ssize_t sync_serial_write(struct file * file, const char * buf, size_t count, loff_t *ppos) { - int dev = iminor(file->f_dentry->d_inode); + int dev = MINOR(file->f_dentry->d_inode->i_rdev); DECLARE_WAITQUEUE(wait, current); sync_port *port; unsigned long c, c1; @@ -919,7 +920,7 @@ static ssize_t sync_serial_write(struct file * file, const char * buf, static ssize_t sync_serial_read(struct file * file, char * buf, size_t count, loff_t *ppos) { - int dev = iminor(file->f_dentry->d_inode); + int dev = MINOR(file->f_dentry->d_inode->i_rdev); int avail; sync_port *port; unsigned char* start; diff --git a/arch/cris/arch-v32/kernel/arbiter.c b/arch/cris/arch-v32/kernel/arbiter.c index 420a5312e..3870d2fd5 100644 --- a/arch/cris/arch-v32/kernel/arbiter.c +++ b/arch/cris/arch-v32/kernel/arbiter.c @@ -1,14 +1,15 @@ /* - * Memory arbiter functions. Allocates bandwidth through the + * Memory arbiter functions. Allocates bandwith through the * arbiter and sets up arbiter breakpoints. * * The algorithm first assigns slots to the clients that has specified - * bandwidth (e.g. ethernet) and then the remaining slots are divided + * bandwith (e.g. ethernet) and then the remaining slots are divided * on all the active clients. * * Copyright (c) 2004, 2005 Axis Communications AB. */ +#include #include #include #include @@ -119,7 +120,7 @@ static void crisv32_arbiter_init(void) crisv32_arbiter_config(EXT_REGION); crisv32_arbiter_config(INT_REGION); - if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, IRQF_DISABLED, + if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, SA_INTERRUPT, "arbiter", NULL)) printk(KERN_ERR "Couldn't allocate arbiter IRQ\n"); @@ -132,8 +133,8 @@ static void crisv32_arbiter_init(void) -int crisv32_arbiter_allocate_bandwidth(int client, int region, - unsigned long bandwidth) +int crisv32_arbiter_allocate_bandwith(int client, int region, + unsigned long bandwidth) { int i; int total_assigned = 0; diff --git a/arch/cris/arch-v32/kernel/crisksyms.c b/arch/cris/arch-v32/kernel/crisksyms.c index e513da711..2c3bb9a0a 100644 --- a/arch/cris/arch-v32/kernel/crisksyms.c +++ b/arch/cris/arch-v32/kernel/crisksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/cris/arch-v32/kernel/debugport.c b/arch/cris/arch-v32/kernel/debugport.c index d1272ad92..ffc1ebf2d 100644 --- a/arch/cris/arch-v32/kernel/debugport.c +++ b/arch/cris/arch-v32/kernel/debugport.c @@ -2,6 +2,7 @@ * Copyright (C) 2003, Axis Communications AB. */ +#include #include #include #include @@ -352,7 +353,7 @@ init_dummy_console(void) dummy_driver.init_termios = tty_std_termios; dummy_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ - dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; dummy_driver.open = dummy_open; dummy_driver.close = dummy_close; diff --git a/arch/cris/arch-v32/kernel/dma.c b/arch/cris/arch-v32/kernel/dma.c index 570e19128..b92e85799 100644 --- a/arch/cris/arch-v32/kernel/dma.c +++ b/arch/cris/arch-v32/kernel/dma.c @@ -25,8 +25,8 @@ int crisv32_request_dma(unsigned int dmanr, const char * device_id, reg_config_rw_clk_ctrl clk_ctrl; reg_strmux_rw_cfg strmux_cfg; - if (crisv32_arbiter_allocate_bandwidth(dmanr, - options & DMA_INT_MEM ? INT_REGION : EXT_REGION, + if (crisv32_arbiter_allocate_bandwith(dmanr, + options & DMA_INT_MEM ? INT_REGION : EXT_REGION, bandwidth)) return -ENOMEM; diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index f9d27807b..3bd8503fe 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S @@ -17,6 +17,7 @@ * */ +#include #include #include #include diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index 5daeb6f7f..ea2b4a97c 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c @@ -120,6 +120,7 @@ #include #include +#include #include #include @@ -981,7 +982,7 @@ void fast_timer_init(void) proc_register_dynamic(&proc_root, &fasttimer_proc_entry); #endif #endif /* PROC_FS */ - if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, IRQF_DISABLED, + if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, SA_INTERRUPT, "fast timer int", NULL)) { printk("err: timer1 irq\n"); diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S index 20bd80a84..3cfe57dc3 100644 --- a/arch/cris/arch-v32/kernel/head.S +++ b/arch/cris/arch-v32/kernel/head.S @@ -4,6 +4,7 @@ * Copyright (C) 2003, Axis Communications AB */ +#include #define ASSEMBLER_MACROS_ONLY diff --git a/arch/cris/arch-v32/kernel/io.c b/arch/cris/arch-v32/kernel/io.c index dfbfcb8d2..6bc9f263c 100644 --- a/arch/cris/arch-v32/kernel/io.c +++ b/arch/cris/arch-v32/kernel/io.c @@ -4,6 +4,7 @@ * Copyright (c) 2004 Axis Communications AB. */ +#include #include #include #include diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index cc361bf57..c78cc2685 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -268,7 +269,7 @@ void crisv32_do_IRQ(int irq, int block, struct pt_regs* regs) { /* Interrupts that may not be moved to another CPU and - * are IRQF_DISABLED may skip blocking. This is currently + * are SA_INTERRUPT may skip blocking. This is currently * only valid for the timer IRQ and the IPI and is used * for the timer interrupt to avoid watchdog starvation. */ @@ -368,7 +369,7 @@ init_IRQ(void) /* Point all IRQ's to bad handlers. */ for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { - irq_desc[j].chip = &crisv32_irq_type; + irq_desc[j].handler = &crisv32_irq_type; set_exception_vector(i, interrupt[j]); } diff --git a/arch/cris/arch-v32/kernel/kgdb_asm.S b/arch/cris/arch-v32/kernel/kgdb_asm.S index 3e7fa9ef8..b350dd279 100644 --- a/arch/cris/arch-v32/kernel/kgdb_asm.S +++ b/arch/cris/arch-v32/kernel/kgdb_asm.S @@ -5,6 +5,7 @@ * port exceptions for kernel debugging purposes. */ +#include #include ;; Exported functions. diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 6326351af..843513102 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c @@ -8,6 +8,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include diff --git a/arch/cris/arch-v32/kernel/setup.c b/arch/cris/arch-v32/kernel/setup.c index 4662f363d..b17a39a2e 100644 --- a/arch/cris/arch-v32/kernel/setup.c +++ b/arch/cris/arch-v32/kernel/setup.c @@ -4,6 +4,7 @@ * Copyright (C) 2003, Axis Communications AB. */ +#include #include #include #include diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 464ecaec3..da40d19a1 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c @@ -62,7 +62,7 @@ static unsigned long irq_regs[NR_CPUS] = static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int send_ipi(int vector, int wait, cpumask_t cpu_mask); -static struct irqaction irq_ipi = { crisv32_ipi_interrupt, IRQF_DISABLED, +static struct irqaction irq_ipi = { crisv32_ipi_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "ipi", NULL, NULL}; extern void cris_mmu_init(void); diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index 50f3f9329..d48e397f5 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -241,16 +242,12 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -/* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain - * it needs to be IRQF_DISABLED to make the jiffies update work properly +/* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain + * it needs to be SA_INTERRUPT to make the jiffies update work properly */ -static struct irqaction irq_timer = { - .mask = timer_interrupt, - .flags = IRQF_SHARED | IRQF_DISABLED, - .mask = CPU_MASK_NONE, - .name = "timer" -}; +static struct irqaction irq_timer = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, + CPU_MASK_NONE, "timer", NULL, NULL}; void __init cris_timer_init(void) diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index 2462b1ef1..6e3787045 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c @@ -2,6 +2,7 @@ * Copyright (C) 2003, Axis Communications AB. */ +#include #include #include diff --git a/arch/cris/arch-v32/lib/dram_init.S b/arch/cris/arch-v32/lib/dram_init.S index 158b3dbb4..47b6cf5f4 100644 --- a/arch/cris/arch-v32/lib/dram_init.S +++ b/arch/cris/arch-v32/lib/dram_init.S @@ -16,6 +16,7 @@ * uses this code. */ +#include #include #include diff --git a/arch/cris/arch-v32/lib/hw_settings.S b/arch/cris/arch-v32/lib/hw_settings.S index fff944351..5182e8c2c 100644 --- a/arch/cris/arch-v32/lib/hw_settings.S +++ b/arch/cris/arch-v32/lib/hw_settings.S @@ -10,6 +10,7 @@ * Authors: Mikael Starvik (starvik@axis.com) */ +#include #include #include #include diff --git a/arch/cris/arch-v32/lib/nand_init.S b/arch/cris/arch-v32/lib/nand_init.S index e019816fa..aba5c751c 100644 --- a/arch/cris/arch-v32/lib/nand_init.S +++ b/arch/cris/arch-v32/lib/nand_init.S @@ -27,6 +27,7 @@ #include #include #include +#include ;; There are 8-bit NAND flashes and 16-bit NAND flashes. ;; We need to treat them slightly different. diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c index a84ba7ff2..f2fba27d8 100644 --- a/arch/cris/arch-v32/mm/init.c +++ b/arch/cris/arch-v32/mm/init.c @@ -6,10 +6,12 @@ * Authors: Bjorn Wesen * Tobias Anderberg , CRISv32 port. */ +#include #include #include #include #include +#include #include #include #include diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S index 472d4b3c4..adb94605d 100644 --- a/arch/cris/arch-v32/vmlinux.lds.S +++ b/arch/cris/arch-v32/vmlinux.lds.S @@ -8,6 +8,7 @@ * the kernel has booted. */ +#include #include jiffies = jiffies_64; diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c index 1f20c16ac..d57859053 100644 --- a/arch/cris/kernel/crisksyms.c +++ b/arch/cris/kernel/crisksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 903ea62c6..b504def3e 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c @@ -19,6 +19,7 @@ * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include @@ -68,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -85,7 +86,7 @@ skip: /* called by the assembler IRQ entry functions defined in irq.h * to dispatch the interrupts to registred handlers * interrupts are disabled upon entry - depending on if the - * interrupt was registred with IRQF_DISABLED or not, interrupts + * interrupt was registred with SA_INTERRUPT or not, interrupts * are re-enabled or not. */ diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c index 7af3d5d43..619a6eefd 100644 --- a/arch/cris/kernel/setup.c +++ b/arch/cris/kernel/setup.c @@ -10,12 +10,13 @@ * This file handles the architecture-dependent parts of initialization */ +#include #include #include #include #include #include -#include +#include #include #include diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index a601a17cf..95a3892b8 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig @@ -29,10 +29,6 @@ config GENERIC_HARDIRQS bool default n -config GENERIC_TIME - bool - default y - config TIME_LOW_RES bool default y diff --git a/arch/frv/kernel/asm-offsets.c b/arch/frv/kernel/asm-offsets.c index fbb19fc1a..9e263112a 100644 --- a/arch/frv/kernel/asm-offsets.c +++ b/arch/frv/kernel/asm-offsets.c @@ -1,115 +1 @@ -/* - * Generate definitions needed by assembly language modules. - * This code generates raw asm output which is post-processed - * to extract and format the required data. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define DEFINE(sym, val) \ - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) - -#define DEF_PTREG(sym, reg) \ - asm volatile("\n->" #sym " %0 offsetof(struct pt_regs, " #reg ")" \ - : : "i" (offsetof(struct pt_regs, reg))) - -#define DEF_IREG(sym, reg) \ - asm volatile("\n->" #sym " %0 offsetof(struct user_context, " #reg ")" \ - : : "i" (offsetof(struct user_context, reg))) - -#define DEF_FREG(sym, reg) \ - asm volatile("\n->" #sym " %0 offsetof(struct user_context, " #reg ")" \ - : : "i" (offsetof(struct user_context, reg))) - -#define DEF_0REG(sym, reg) \ - asm volatile("\n->" #sym " %0 offsetof(struct frv_frame0, " #reg ")" \ - : : "i" (offsetof(struct frv_frame0, reg))) - -#define BLANK() asm volatile("\n->" : : ) - -#define OFFSET(sym, str, mem) \ - DEFINE(sym, offsetof(struct str, mem)); - -void foo(void) -{ - /* offsets into the thread_info structure */ - OFFSET(TI_TASK, thread_info, task); - OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain); - OFFSET(TI_FLAGS, thread_info, flags); - OFFSET(TI_STATUS, thread_info, status); - OFFSET(TI_CPU, thread_info, cpu); - OFFSET(TI_PREEMPT_COUNT, thread_info, preempt_count); - OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit); - OFFSET(TI_RESTART_BLOCK, thread_info, restart_block); - BLANK(); - - /* offsets into register file storage */ - DEF_PTREG(REG_PSR, psr); - DEF_PTREG(REG_ISR, isr); - DEF_PTREG(REG_CCR, ccr); - DEF_PTREG(REG_CCCR, cccr); - DEF_PTREG(REG_LR, lr); - DEF_PTREG(REG_LCR, lcr); - DEF_PTREG(REG_PC, pc); - DEF_PTREG(REG__STATUS, __status); - DEF_PTREG(REG_SYSCALLNO, syscallno); - DEF_PTREG(REG_ORIG_GR8, orig_gr8); - DEF_PTREG(REG_GNER0, gner0); - DEF_PTREG(REG_GNER1, gner1); - DEF_PTREG(REG_IACC0, iacc0); - DEF_PTREG(REG_TBR, tbr); - DEF_PTREG(REG_GR0, tbr); - DEFINE(REG__END, sizeof(struct pt_regs)); - BLANK(); - - DEF_0REG(REG_DCR, debug.dcr); - DEF_0REG(REG_IBAR0, debug.ibar[0]); - DEF_0REG(REG_DBAR0, debug.dbar[0]); - DEF_0REG(REG_DBDR00, debug.dbdr[0][0]); - DEF_0REG(REG_DBMR00, debug.dbmr[0][0]); - BLANK(); - - DEF_IREG(__INT_GR0, i.gr[0]); - DEF_FREG(__USER_FPMEDIA, f); - DEF_FREG(__FPMEDIA_FR0, f.fr[0]); - DEF_FREG(__FPMEDIA_FNER0, f.fner[0]); - DEF_FREG(__FPMEDIA_MSR0, f.msr[0]); - DEF_FREG(__FPMEDIA_ACC0, f.acc[0]); - DEF_FREG(__FPMEDIA_ACCG0, f.accg[0]); - DEF_FREG(__FPMEDIA_FSR0, f.fsr[0]); - BLANK(); - - DEFINE(NR_PT_REGS, sizeof(struct pt_regs) / 4); - DEFINE(NR_USER_INT_REGS, sizeof(struct user_int_regs) / 4); - DEFINE(NR_USER_FPMEDIA_REGS, sizeof(struct user_fpmedia_regs) / 4); - DEFINE(NR_USER_CONTEXT, sizeof(struct user_context) / 4); - DEFINE(FRV_FRAME0_SIZE, sizeof(struct frv_frame0)); - BLANK(); - - /* offsets into thread_struct */ - OFFSET(__THREAD_FRAME, thread_struct, frame); - OFFSET(__THREAD_CURR, thread_struct, curr); - OFFSET(__THREAD_SP, thread_struct, sp); - OFFSET(__THREAD_FP, thread_struct, fp); - OFFSET(__THREAD_LR, thread_struct, lr); - OFFSET(__THREAD_PC, thread_struct, pc); - OFFSET(__THREAD_GR16, thread_struct, gr[0]); - OFFSET(__THREAD_SCHED_LR, thread_struct, sched_lr); - OFFSET(__THREAD_FRAME0, thread_struct, frame0); - OFFSET(__THREAD_USER, thread_struct, user); - BLANK(); - - /* offsets into frv_debug_status */ - OFFSET(DEBUG_BPSR, frv_debug_status, bpsr); - OFFSET(DEBUG_DCR, frv_debug_status, dcr); - OFFSET(DEBUG_BRR, frv_debug_status, brr); - OFFSET(DEBUG_NMAR, frv_debug_status, nmar); - BLANK(); -} +/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */ diff --git a/arch/frv/kernel/break.S b/arch/frv/kernel/break.S index dac4a5f68..687c48d62 100644 --- a/arch/frv/kernel/break.S +++ b/arch/frv/kernel/break.S @@ -9,11 +9,12 @@ * 2 of the License, or (at your option) any later version. */ +#include +#include #include #include #include #include -#include #include #include @@ -23,11 +24,13 @@ # .section .bss.stack .globl __break_user_context - .balign THREAD_SIZE + .balign 8192 __break_stack: - .space THREAD_SIZE - FRV_FRAME0_SIZE -__break_frame_0: - .space FRV_FRAME0_SIZE + .space (8192 - (USER_CONTEXT_SIZE + REG__DEBUG_XTRA)) & ~7 +__break_stack_tos: + .space REG__DEBUG_XTRA +__break_user_context: + .space USER_CONTEXT_SIZE # # miscellaneous variables @@ -72,8 +75,8 @@ __entry_break: #endif LEDS 0x1001,gr31 - sethi.p %hi(__break_frame_0),gr31 - setlo %lo(__break_frame_0),gr31 + sethi.p %hi(__break_user_context),gr31 + setlo %lo(__break_user_context),gr31 stdi gr2,@(gr31,#REG_GR(2)) movsg ccr,gr3 @@ -583,8 +586,8 @@ __break_continue: # set up the kernel stack pointer sti sp,@(gr31,#REG_SP) - sethi.p %hi(__break_frame_0),sp - setlo %lo(__break_frame_0),sp + sethi.p %hi(__break_stack_tos),sp + setlo %lo(__break_stack_tos),sp # finish building the exception frame stdi gr4 ,@(gr31,#REG_GR(4)) @@ -649,12 +652,9 @@ __break_continue: movsg nmar,gr5 movsg dcr,gr6 - sethi.p %hi(__debug_status),gr7 - setlo %lo(__debug_status),gr7 - - stdi gr4 ,@(gr7,#DEBUG_BRR) - sti gr19,@(gr7,#DEBUG_BPSR) - sti.p gr6 ,@(gr7,#DEBUG_DCR) + stdi gr4 ,@(gr31,#REG_BRR) + sti gr19,@(gr31,#REG_BPSR) + sti.p gr6 ,@(gr31,#REG_DCR) # trap exceptions during break handling and disable h/w breakpoints/watchpoints sethi %hi(DCR_EBE),gr5 @@ -699,10 +699,7 @@ __break_continue: lddi @(gr31,#REG_PSR) ,gr22 ldi @(gr31,#REG_PC) ,gr21 ldi @(gr31,#REG_TBR) ,gr20 - - sethi.p %hi(__debug_status),gr6 - setlo %lo(__debug_status),gr6 - ldi.p @(gr6,#DEBUG_DCR) ,gr6 + ldi.p @(gr31,#REG_DCR) ,gr6 andi gr22,#PSR_S,gr19 /* rebuild BPSR */ andi.p gr22,#PSR_ET,gr5 diff --git a/arch/frv/kernel/cmode.S b/arch/frv/kernel/cmode.S index 81ba28ad2..6591e6a37 100644 --- a/arch/frv/kernel/cmode.S +++ b/arch/frv/kernel/cmode.S @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/frv/kernel/debug-stub.c b/arch/frv/kernel/debug-stub.c index 2f6c60c92..4761cc4b4 100644 --- a/arch/frv/kernel/debug-stub.c +++ b/arch/frv/kernel/debug-stub.c @@ -39,10 +39,11 @@ do { \ gdbstub_do_rx(); \ } while(!FLOWCTL_QUERY(LINE)) -struct frv_debug_status __debug_status; - static void __init debug_stub_init(void); +extern asmlinkage void __break_hijack_kernel_event(void); +extern asmlinkage void __break_hijack_kernel_event_breaks_here(void); + /*****************************************************************************/ /* * debug mode handler stub @@ -66,7 +67,7 @@ asmlinkage void debug_stub(void) __set_HSR(0, hsr0 & ~HSR0_ETMD); /* disable single stepping */ - __debug_status.dcr &= ~DCR_SE; + __debug_regs->dcr &= ~DCR_SE; /* kernel mode can propose an exception be handled in debug mode by jumping to a special * location */ @@ -75,8 +76,8 @@ asmlinkage void debug_stub(void) * the top kernel context */ *__debug_frame = *__frame; __frame = __debug_frame->next_frame; - __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12; - __debug_status.brr |= BRR_EB; + __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; + __debug_regs->brr |= BRR_EB; } if (__debug_frame->pc == (unsigned long) __debug_bug_trap + 4) { @@ -123,7 +124,7 @@ static void __init debug_stub_init(void) __debug_frame->pc = (unsigned long) start_kernel; /* enable the debug events we want to trap */ - __debug_status.dcr = DCR_EBE; + __debug_regs->dcr = DCR_EBE; #ifdef CONFIG_GDBSTUB gdbstub_init(); diff --git a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S index d3b9253d8..81568acea 100644 --- a/arch/frv/kernel/entry-table.S +++ b/arch/frv/kernel/entry-table.S @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 940ac306e..a9b59527a 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S @@ -27,6 +27,8 @@ * */ +#include +#include #include #include #include @@ -1472,7 +1474,7 @@ sys_call_table: .long sys_mknodat .long sys_fchownat .long sys_futimesat - .long sys_fstatat64 /* 300 */ + .long sys_newfstatat /* 300 */ .long sys_unlinkat .long sys_renameat .long sys_linkat diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c index f772704b3..0f273a7ac 100644 --- a/arch/frv/kernel/frv_ksyms.c +++ b/arch/frv/kernel/frv_ksyms.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -25,6 +26,16 @@ extern long __memset_user(void *dst, const void *src, size_t count); EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(iounmap); +EXPORT_SYMBOL(strnlen); +EXPORT_SYMBOL(strrchr); +EXPORT_SYMBOL(strstr); +EXPORT_SYMBOL(strchr); +EXPORT_SYMBOL(strcat); +EXPORT_SYMBOL(strlen); +EXPORT_SYMBOL(strcmp); +EXPORT_SYMBOL(strncmp); +EXPORT_SYMBOL(strncpy); + EXPORT_SYMBOL(ip_fast_csum); #if 0 @@ -33,6 +44,8 @@ EXPORT_SYMBOL(local_bh_count); #endif EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(enable_irq); +EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(__res_bus_clock_speed_HZ); EXPORT_SYMBOL(__page_offset); EXPORT_SYMBOL(__memcpy_user); @@ -49,12 +62,18 @@ EXPORT_SYMBOL(memory_end); EXPORT_SYMBOL(__debug_bug_trap); +/* Networking helper routines. */ +EXPORT_SYMBOL(csum_partial_copy); + /* The following are special because they're not called explicitly (the C compiler generates them). Fortunately, their interface isn't gonna change any time soon now, so it's OK to leave it out of version control. */ EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memcmp); +EXPORT_SYMBOL(memscan); +EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(__outsl_ns); EXPORT_SYMBOL(__insl_ns); diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index 9550f37fb..508601fad 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c @@ -124,7 +124,6 @@ #include #include -#include #include #include #include @@ -137,6 +136,7 @@ extern void debug_to_serial(const char *p, int n); extern void gdbstub_console_write(struct console *co, const char *p, unsigned n); extern volatile uint32_t __break_error_detect[3]; /* ESFR1, ESR15, EAR15 */ +extern struct user_context __break_user_context; struct __debug_amr { unsigned long L, P; @@ -926,7 +926,6 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & DCR_IBE0)) { //gdbstub_printk("set h/w break 0: %08lx\n", addr); __debug_regs->dcr |= DCR_IBE0; - __debug_regs->ibar[0] = addr; asm volatile("movgs %0,ibar0" : : "r"(addr)); return 0; } @@ -934,7 +933,6 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & DCR_IBE1)) { //gdbstub_printk("set h/w break 1: %08lx\n", addr); __debug_regs->dcr |= DCR_IBE1; - __debug_regs->ibar[1] = addr; asm volatile("movgs %0,ibar1" : : "r"(addr)); return 0; } @@ -942,7 +940,6 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & DCR_IBE2)) { //gdbstub_printk("set h/w break 2: %08lx\n", addr); __debug_regs->dcr |= DCR_IBE2; - __debug_regs->ibar[2] = addr; asm volatile("movgs %0,ibar2" : : "r"(addr)); return 0; } @@ -950,7 +947,6 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & DCR_IBE3)) { //gdbstub_printk("set h/w break 3: %08lx\n", addr); __debug_regs->dcr |= DCR_IBE3; - __debug_regs->ibar[3] = addr; asm volatile("movgs %0,ibar3" : : "r"(addr)); return 0; } @@ -975,14 +971,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & (DCR_DRBE0|DCR_DWBE0))) { //gdbstub_printk("set h/w watchpoint 0 type %ld: %08lx\n", type, addr); tmp = type==2 ? DCR_DWBE0 : type==3 ? DCR_DRBE0 : DCR_DRBE0|DCR_DWBE0; - __debug_regs->dcr |= tmp; - __debug_regs->dbar[0] = addr; - __debug_regs->dbmr[0][0] = dbmr.mask0; - __debug_regs->dbmr[0][1] = dbmr.mask1; - __debug_regs->dbdr[0][0] = 0; - __debug_regs->dbdr[0][1] = 0; - asm volatile(" movgs %0,dbar0 \n" " movgs %1,dbmr00 \n" " movgs %2,dbmr01 \n" @@ -995,14 +984,7 @@ static int gdbstub_set_breakpoint(unsigned long type, unsigned long addr, unsign if (!(__debug_regs->dcr & (DCR_DRBE1|DCR_DWBE1))) { //gdbstub_printk("set h/w watchpoint 1 type %ld: %08lx\n", type, addr); tmp = type==2 ? DCR_DWBE1 : type==3 ? DCR_DRBE1 : DCR_DRBE1|DCR_DWBE1; - __debug_regs->dcr |= tmp; - __debug_regs->dbar[1] = addr; - __debug_regs->dbmr[1][0] = dbmr.mask0; - __debug_regs->dbmr[1][1] = dbmr.mask1; - __debug_regs->dbdr[1][0] = 0; - __debug_regs->dbdr[1][1] = 0; - asm volatile(" movgs %0,dbar1 \n" " movgs %1,dbmr10 \n" " movgs %2,dbmr11 \n" @@ -1065,7 +1047,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo if (__debug_regs->dcr & DCR_IBE0 && __get_ibar(0) == addr) { //gdbstub_printk("clear h/w break 0: %08lx\n", addr); __debug_regs->dcr &= ~DCR_IBE0; - __debug_regs->ibar[0] = 0; asm volatile("movgs gr0,ibar0"); return 0; } @@ -1073,7 +1054,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo if (__debug_regs->dcr & DCR_IBE1 && __get_ibar(1) == addr) { //gdbstub_printk("clear h/w break 1: %08lx\n", addr); __debug_regs->dcr &= ~DCR_IBE1; - __debug_regs->ibar[1] = 0; asm volatile("movgs gr0,ibar1"); return 0; } @@ -1081,7 +1061,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo if (__debug_regs->dcr & DCR_IBE2 && __get_ibar(2) == addr) { //gdbstub_printk("clear h/w break 2: %08lx\n", addr); __debug_regs->dcr &= ~DCR_IBE2; - __debug_regs->ibar[2] = 0; asm volatile("movgs gr0,ibar2"); return 0; } @@ -1089,7 +1068,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo if (__debug_regs->dcr & DCR_IBE3 && __get_ibar(3) == addr) { //gdbstub_printk("clear h/w break 3: %08lx\n", addr); __debug_regs->dcr &= ~DCR_IBE3; - __debug_regs->ibar[3] = 0; asm volatile("movgs gr0,ibar3"); return 0; } @@ -1126,12 +1104,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo //gdbstub_printk("clear h/w watchpoint 0 type %ld: %08lx\n", type, addr); __debug_regs->dcr &= ~(DCR_DRBE0|DCR_DWBE0); - __debug_regs->dbar[0] = 0; - __debug_regs->dbmr[0][0] = 0; - __debug_regs->dbmr[0][1] = 0; - __debug_regs->dbdr[0][0] = 0; - __debug_regs->dbdr[0][1] = 0; - asm volatile(" movgs gr0,dbar0 \n" " movgs gr0,dbmr00 \n" " movgs gr0,dbmr01 \n" @@ -1151,12 +1123,6 @@ int gdbstub_clear_breakpoint(unsigned long type, unsigned long addr, unsigned lo //gdbstub_printk("clear h/w watchpoint 1 type %ld: %08lx\n", type, addr); __debug_regs->dcr &= ~(DCR_DRBE1|DCR_DWBE1); - __debug_regs->dbar[1] = 0; - __debug_regs->dbmr[1][0] = 0; - __debug_regs->dbmr[1][1] = 0; - __debug_regs->dbdr[1][0] = 0; - __debug_regs->dbdr[1][1] = 0; - asm volatile(" movgs gr0,dbar1 \n" " movgs gr0,dbmr10 \n" " movgs gr0,dbmr11 \n" @@ -1197,7 +1163,7 @@ static void gdbstub_check_breakpoint(void) */ static void __attribute__((unused)) gdbstub_show_regs(void) { - unsigned long *reg; + uint32_t *reg; int loop; gdbstub_printk("\n"); @@ -1206,11 +1172,11 @@ static void __attribute__((unused)) gdbstub_show_regs(void) __debug_frame, __debug_frame->psr & PSR_S ? "kernel" : "user"); - reg = (unsigned long *) __debug_frame; - for (loop = 0; loop < NR_PT_REGS; loop++) { - printk("%s %08lx", regnames[loop + 0], reg[loop + 0]); + reg = (uint32_t *) __debug_frame; + for (loop = 0; loop < REG__END; loop++) { + printk("%s %08x", regnames[loop + 0], reg[loop + 0]); - if (loop == NR_PT_REGS - 1 || loop % 5 == 4) + if (loop == REG__END - 1 || loop % 5 == 4) printk("\n"); else printk(" | "); @@ -1225,8 +1191,13 @@ static void __attribute__((unused)) gdbstub_show_regs(void) */ static void __attribute__((unused)) gdbstub_dump_debugregs(void) { - gdbstub_printk("DCR %08lx ", __debug_status.dcr); - gdbstub_printk("BRR %08lx\n", __debug_status.brr); + unsigned long x; + + x = __debug_regs->dcr; + gdbstub_printk("DCR %08lx ", x); + + x = __debug_regs->brr; + gdbstub_printk("BRR %08lx\n", x); gdbstub_printk("IBAR0 %08lx ", __get_ibar(0)); gdbstub_printk("IBAR1 %08lx ", __get_ibar(1)); @@ -1389,7 +1360,7 @@ void gdbstub(int sigval) #endif } - save_user_regs(&__debug_frame0->uc); + save_user_regs(&__break_user_context); #if 0 gdbstub_printk("--> gdbstub() %08x %p %08x %08x\n", @@ -1418,8 +1389,8 @@ void gdbstub(int sigval) __debug_frame->psr &= ~PSR_S; if (__debug_frame->psr & PSR_PS) __debug_frame->psr |= PSR_S; - __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12; - __debug_status.brr |= BRR_EB; + __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; + __debug_regs->brr |= BRR_EB; sigval = SIGINT; } @@ -1433,15 +1404,15 @@ void gdbstub(int sigval) __debug_frame->psr &= ~PSR_S; if (__debug_frame->psr & PSR_PS) __debug_frame->psr |= PSR_S; - __debug_status.brr = (__debug_frame->tbr & TBR_TT) << 12; - __debug_status.brr |= BRR_EB; + __debug_regs->brr = (__debug_frame->tbr & TBR_TT) << 12; + __debug_regs->brr |= BRR_EB; sigval = SIGXCPU; } LEDS(0x5002); /* after a BREAK insn, the PC lands on the far side of it */ - if (__debug_status.brr & BRR_SB) + if (__debug_regs->brr & BRR_SB) gdbstub_check_breakpoint(); LEDS(0x5003); @@ -1460,7 +1431,7 @@ void gdbstub(int sigval) } if (!sigval) - sigval = gdbstub_compute_signal(__debug_status.brr); + sigval = gdbstub_compute_signal(__debug_regs->brr); LEDS(0x5004); @@ -1470,7 +1441,7 @@ void gdbstub(int sigval) if (sigval != SIGINT && sigval != SIGTRAP && sigval != SIGILL) { static const char title[] = "Break "; static const char crlf[] = "\r\n"; - unsigned long brr = __debug_status.brr; + unsigned long brr = __debug_regs->brr; char hx; ptr = output_buffer; @@ -1594,24 +1565,28 @@ void gdbstub(int sigval) ptr = mem2hex(&zero, ptr, 4, 0); for (loop = 1; loop <= 27; loop++) - ptr = mem2hex(&__debug_user_context->i.gr[loop], ptr, 4, 0); + ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop), + ptr, 4, 0); temp = (unsigned long) __frame; ptr = mem2hex(&temp, ptr, 4, 0); - ptr = mem2hex(&__debug_user_context->i.gr[29], ptr, 4, 0); - ptr = mem2hex(&__debug_user_context->i.gr[30], ptr, 4, 0); + ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(29), ptr, 4, 0); + ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(30), ptr, 4, 0); #ifdef CONFIG_MMU - ptr = mem2hex(&__debug_user_context->i.gr[31], ptr, 4, 0); + ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(31), ptr, 4, 0); #else temp = (unsigned long) __debug_frame; ptr = mem2hex(&temp, ptr, 4, 0); #endif for (loop = 32; loop <= 63; loop++) - ptr = mem2hex(&__debug_user_context->i.gr[loop], ptr, 4, 0); + ptr = mem2hex((unsigned long *)__debug_frame + REG_GR(loop), + ptr, 4, 0); /* deal with FR0-FR63 */ for (loop = 0; loop <= 63; loop++) - ptr = mem2hex(&__debug_user_context->f.fr[loop], ptr, 4, 0); + ptr = mem2hex((unsigned long *)&__break_user_context + + __FPMEDIA_FR(loop), + ptr, 4, 0); /* deal with special registers */ ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0); @@ -1622,7 +1597,7 @@ void gdbstub(int sigval) ptr = mem2hex(&zero, ptr, 4, 0); ptr = mem2hex(&zero, ptr, 4, 0); ptr = mem2hex(&__debug_frame->tbr, ptr, 4, 0); - ptr = mem2hex(&__debug_status.brr , ptr, 4, 0); + ptr = mem2hex(&__debug_regs->brr , ptr, 4, 0); asm volatile("movsg dbar0,%0" : "=r"(dbar)); ptr = mem2hex(&dbar, ptr, 4, 0); @@ -1647,21 +1622,21 @@ void gdbstub(int sigval) ptr = mem2hex(&__debug_frame->iacc0, ptr, 8, 0); - ptr = mem2hex(&__debug_user_context->f.fsr[0], ptr, 4, 0); + ptr = mem2hex(&__break_user_context.f.fsr[0], ptr, 4, 0); for (loop = 0; loop <= 7; loop++) - ptr = mem2hex(&__debug_user_context->f.acc[loop], ptr, 4, 0); + ptr = mem2hex(&__break_user_context.f.acc[loop], ptr, 4, 0); - ptr = mem2hex(&__debug_user_context->f.accg, ptr, 8, 0); + ptr = mem2hex(&__break_user_context.f.accg, ptr, 8, 0); for (loop = 0; loop <= 1; loop++) - ptr = mem2hex(&__debug_user_context->f.msr[loop], ptr, 4, 0); + ptr = mem2hex(&__break_user_context.f.msr[loop], ptr, 4, 0); ptr = mem2hex(&__debug_frame->gner0, ptr, 4, 0); ptr = mem2hex(&__debug_frame->gner1, ptr, 4, 0); - ptr = mem2hex(&__debug_user_context->f.fner[0], ptr, 4, 0); - ptr = mem2hex(&__debug_user_context->f.fner[1], ptr, 4, 0); + ptr = mem2hex(&__break_user_context.f.fner[0], ptr, 4, 0); + ptr = mem2hex(&__break_user_context.f.fner[1], ptr, 4, 0); break; @@ -1673,7 +1648,8 @@ void gdbstub(int sigval) ptr = hex2mem(ptr, &temp, 4); for (loop = 1; loop <= 27; loop++) - ptr = hex2mem(ptr, &__debug_user_context->i.gr[loop], 4); + ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop), + 4); ptr = hex2mem(ptr, &temp, 4); __frame = (struct pt_regs *) temp; @@ -1686,11 +1662,14 @@ void gdbstub(int sigval) #endif for (loop = 32; loop <= 63; loop++) - ptr = hex2mem(ptr, &__debug_user_context->i.gr[loop], 4); + ptr = hex2mem(ptr, (unsigned long *)__debug_frame + REG_GR(loop), + 4); /* deal with FR0-FR63 */ for (loop = 0; loop <= 63; loop++) - ptr = mem2hex(&__debug_user_context->f.fr[loop], ptr, 4, 0); + ptr = mem2hex((unsigned long *)&__break_user_context + + __FPMEDIA_FR(loop), + ptr, 4, 0); /* deal with special registers */ ptr = hex2mem(ptr, &__debug_frame->pc, 4); @@ -1715,21 +1694,21 @@ void gdbstub(int sigval) ptr = hex2mem(ptr, &__debug_frame->iacc0, 8); - ptr = hex2mem(ptr, &__debug_user_context->f.fsr[0], 4); + ptr = hex2mem(ptr, &__break_user_context.f.fsr[0], 4); for (loop = 0; loop <= 7; loop++) - ptr = hex2mem(ptr, &__debug_user_context->f.acc[loop], 4); + ptr = hex2mem(ptr, &__break_user_context.f.acc[loop], 4); - ptr = hex2mem(ptr, &__debug_user_context->f.accg, 8); + ptr = hex2mem(ptr, &__break_user_context.f.accg, 8); for (loop = 0; loop <= 1; loop++) - ptr = hex2mem(ptr, &__debug_user_context->f.msr[loop], 4); + ptr = hex2mem(ptr, &__break_user_context.f.msr[loop], 4); ptr = hex2mem(ptr, &__debug_frame->gner0, 4); ptr = hex2mem(ptr, &__debug_frame->gner1, 4); - ptr = hex2mem(ptr, &__debug_user_context->f.fner[0], 4); - ptr = hex2mem(ptr, &__debug_user_context->f.fner[1], 4); + ptr = hex2mem(ptr, &__break_user_context.f.fner[0], 4); + ptr = hex2mem(ptr, &__break_user_context.f.fner[1], 4); gdbstub_strcpy(output_buffer,"OK"); break; @@ -1790,52 +1769,52 @@ void gdbstub(int sigval) case GDB_REG_GR(0): break; case GDB_REG_GR(1) ... GDB_REG_GR(63): - __debug_user_context->i.gr[addr - GDB_REG_GR(0)] = temp; + __break_user_context.i.gr[addr - GDB_REG_GR(0)] = temp; break; case GDB_REG_FR(0) ... GDB_REG_FR(63): - __debug_user_context->f.fr[addr - GDB_REG_FR(0)] = temp; + __break_user_context.f.fr[addr - GDB_REG_FR(0)] = temp; break; case GDB_REG_PC: - __debug_user_context->i.pc = temp; + __break_user_context.i.pc = temp; break; case GDB_REG_PSR: - __debug_user_context->i.psr = temp; + __break_user_context.i.psr = temp; break; case GDB_REG_CCR: - __debug_user_context->i.ccr = temp; + __break_user_context.i.ccr = temp; break; case GDB_REG_CCCR: - __debug_user_context->i.cccr = temp; + __break_user_context.i.cccr = temp; break; case GDB_REG_BRR: - __debug_status.brr = temp; + __debug_regs->brr = temp; break; case GDB_REG_LR: - __debug_user_context->i.lr = temp; + __break_user_context.i.lr = temp; break; case GDB_REG_LCR: - __debug_user_context->i.lcr = temp; + __break_user_context.i.lcr = temp; break; case GDB_REG_FSR0: - __debug_user_context->f.fsr[0] = temp; + __break_user_context.f.fsr[0] = temp; break; case GDB_REG_ACC(0) ... GDB_REG_ACC(7): - __debug_user_context->f.acc[addr - GDB_REG_ACC(0)] = temp; + __break_user_context.f.acc[addr - GDB_REG_ACC(0)] = temp; break; case GDB_REG_ACCG(0): - *(uint32_t *) &__debug_user_context->f.accg[0] = temp; + *(uint32_t *) &__break_user_context.f.accg[0] = temp; break; case GDB_REG_ACCG(4): - *(uint32_t *) &__debug_user_context->f.accg[4] = temp; + *(uint32_t *) &__break_user_context.f.accg[4] = temp; break; case GDB_REG_MSR(0) ... GDB_REG_MSR(1): - __debug_user_context->f.msr[addr - GDB_REG_MSR(0)] = temp; + __break_user_context.f.msr[addr - GDB_REG_MSR(0)] = temp; break; case GDB_REG_GNER(0) ... GDB_REG_GNER(1): - __debug_user_context->i.gner[addr - GDB_REG_GNER(0)] = temp; + __break_user_context.i.gner[addr - GDB_REG_GNER(0)] = temp; break; case GDB_REG_FNER(0) ... GDB_REG_FNER(1): - __debug_user_context->f.fner[addr - GDB_REG_FNER(0)] = temp; + __break_user_context.f.fner[addr - GDB_REG_FNER(0)] = temp; break; default: temp2 = 0; @@ -1871,7 +1850,6 @@ void gdbstub(int sigval) /* step to next instruction */ case 's': __debug_regs->dcr |= DCR_SE; - __debug_status.dcr |= DCR_SE; goto done; /* set baud rate (bBB) */ @@ -1956,7 +1934,7 @@ void gdbstub(int sigval) } done: - restore_user_regs(&__debug_frame0->uc); + restore_user_regs(&__break_user_context); //gdbstub_dump_debugregs(); //gdbstub_printk("<-- gdbstub() %08x\n", __debug_frame->pc); @@ -1988,6 +1966,7 @@ void __init gdbstub_init(void) #endif gdbstub_printk("%s", gdbstub_banner); + gdbstub_printk("DCR: %x\n", __debug_regs->dcr); gdbstub_io_init(); diff --git a/arch/frv/kernel/head-mmu-fr451.S b/arch/frv/kernel/head-mmu-fr451.S index c8f210d84..a143c2f66 100644 --- a/arch/frv/kernel/head-mmu-fr451.S +++ b/arch/frv/kernel/head-mmu-fr451.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/head-uc-fr401.S b/arch/frv/kernel/head-uc-fr401.S index ee282be20..4ccf8414a 100644 --- a/arch/frv/kernel/head-uc-fr401.S +++ b/arch/frv/kernel/head-uc-fr401.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/head-uc-fr451.S b/arch/frv/kernel/head-uc-fr451.S index b10d9c829..31cb54a6f 100644 --- a/arch/frv/kernel/head-uc-fr451.S +++ b/arch/frv/kernel/head-uc-fr451.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/head-uc-fr555.S b/arch/frv/kernel/head-uc-fr555.S index 39937c19b..d088db269 100644 --- a/arch/frv/kernel/head-uc-fr555.S +++ b/arch/frv/kernel/head-uc-fr555.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/head.S b/arch/frv/kernel/head.S index fecf751c5..29a526548 100644 --- a/arch/frv/kernel/head.S +++ b/arch/frv/kernel/head.S @@ -9,9 +9,9 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include -#include #include #include #include diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c index 1381abcd5..9778e0ff7 100644 --- a/arch/frv/kernel/irq-mb93091.c +++ b/arch/frv/kernel/irq-mb93091.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c index 48b2a6420..21ca2b298 100644 --- a/arch/frv/kernel/irq-mb93093.c +++ b/arch/frv/kernel/irq-mb93093.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c index 988d03564..c003ae5e2 100644 --- a/arch/frv/kernel/irq-mb93493.c +++ b/arch/frv/kernel/irq-mb93493.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/irq-routing.c b/arch/frv/kernel/irq-routing.c index 53886adf4..d4776d1f4 100644 --- a/arch/frv/kernel/irq-routing.c +++ b/arch/frv/kernel/irq-routing.c @@ -81,7 +81,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask) if (action) { int status = 0; -// if (!(action->flags & IRQF_DISABLED)) +// if (!(action->flags & SA_INTERRUPT)) // local_irq_enable(); do { @@ -90,7 +90,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask) action = action->next; } while (action); - if (status & IRQF_SAMPLE_RANDOM) + if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); local_irq_disable(); } @@ -112,7 +112,7 @@ struct irq_source frv_cpuuart[2] = { #define __CPUUART(X, A) \ [X] = { \ .muxname = "uart", \ - .muxdata = (volatile void __iomem *)(unsigned long)A,\ + .muxdata = (volatile void __iomem *) A, \ .irqmask = 1 << IRQ_CPU_UART##X, \ .doirq = frv_cpuuart_doirq, \ } @@ -136,7 +136,7 @@ struct irq_source frv_cpudma[8] = { #define __CPUDMA(X, A) \ [X] = { \ .muxname = "dma", \ - .muxdata = (volatile void __iomem *)(unsigned long)A,\ + .muxdata = (volatile void __iomem *) A, \ .irqmask = 1 << IRQ_CPU_DMA##X, \ .doirq = frv_cpudma_doirq, \ } @@ -164,7 +164,7 @@ struct irq_source frv_cputimer[3] = { #define __CPUTIMER(X) \ [X] = { \ .muxname = "timer", \ - .muxdata = NULL, \ + .muxdata = 0, \ .irqmask = 1 << IRQ_CPU_TIMER##X, \ .doirq = frv_cputimer_doirq, \ } @@ -187,7 +187,7 @@ struct irq_source frv_cpuexternal[8] = { #define __CPUEXTERNAL(X) \ [X] = { \ .muxname = "ext", \ - .muxdata = NULL, \ + .muxdata = 0, \ .irqmask = 1 << IRQ_CPU_EXTERNAL##X, \ .doirq = frv_cpuexternal_doirq, \ } diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 08967010b..11fa326a8 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c @@ -16,6 +16,7 @@ * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include @@ -341,11 +342,11 @@ asmlinkage void do_NMI(void) * * Flags: * - * IRQF_SHARED Interrupt is shared + * SA_SHIRQ Interrupt is shared * - * IRQF_DISABLED Disable local interrupts while processing + * SA_INTERRUPT Disable local interrupts while processing * - * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy + * SA_SAMPLE_RANDOM The interrupt can be used for entropy * */ @@ -365,7 +366,7 @@ int request_irq(unsigned int irq, * to figure out which interrupt is which (messes up the * interrupt freeing logic etc). */ - if (irqflags & IRQF_SHARED) { + if (irqflags & SA_SHIRQ) { if (!dev_id) printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]); @@ -576,7 +577,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) * so we have to be careful not to interfere with a * running system. */ - if (new->flags & IRQF_SAMPLE_RANDOM) { + if (new->flags & SA_SAMPLE_RANDOM) { /* * This function might sleep, we want to call it first, * outside of the atomic block. @@ -592,7 +593,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) spin_lock_irqsave(&level->lock, flags); /* can't share interrupts unless all parties agree to */ - if (level->usage != 0 && !(level->flags & new->flags & IRQF_SHARED)) { + if (level->usage != 0 && !(level->flags & new->flags & SA_SHIRQ)) { spin_unlock_irqrestore(&level->lock,flags); return -EBUSY; } @@ -624,7 +625,7 @@ static struct proc_dir_entry * irq_dir [NR_IRQS]; #define HEX_DIGITS 8 -static unsigned int parse_hex_value (const char __user *buffer, +static unsigned int parse_hex_value (const char *buffer, unsigned long count, unsigned long *ret) { unsigned char hexnum [HEX_DIGITS]; @@ -671,7 +672,7 @@ static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, return sprintf (page, "%08lx\n", *mask); } -static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, +static int prof_cpu_mask_write_proc (struct file *file, const char *buffer, unsigned long count, void *data) { unsigned long *mask = (unsigned long *) data, full_count = count, err; @@ -710,7 +711,7 @@ void init_irq_proc (void) int i; /* create /proc/irq */ - root_irq_dir = proc_mkdir("irq", NULL); + root_irq_dir = proc_mkdir("irq", 0); /* create /proc/irq/prof_cpu_mask */ entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); diff --git a/arch/frv/kernel/local.h b/arch/frv/kernel/local.h index 76606d13b..e9471761d 100644 --- a/arch/frv/kernel/local.h +++ b/arch/frv/kernel/local.h @@ -51,9 +51,6 @@ extern void (*__power_switch_wake_cleanup)(void); /* time.c */ extern void time_divisor_init(void); -/* cmode.S */ -extern asmlinkage void frv_change_cmode(int); - #endif /* __ASSEMBLY__ */ #endif /* _FRV_LOCAL_H */ diff --git a/arch/frv/kernel/pm-mb93093.c b/arch/frv/kernel/pm-mb93093.c index eaa7b582e..34d01d7dc 100644 --- a/arch/frv/kernel/pm-mb93093.c +++ b/arch/frv/kernel/pm-mb93093.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index c1d9fc8f1..f0b8fff3e 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -26,6 +27,11 @@ #include "local.h" +void (*pm_power_off)(void); +EXPORT_SYMBOL(pm_power_off); + +extern void frv_change_cmode(int); + /* * Debug macros */ @@ -131,7 +137,7 @@ unsigned long sleep_phys_sp(void *sp) #define CTL_PM_P0 4 #define CTL_PM_CM 5 -static int user_atoi(char __user *ubuf, size_t len) +static int user_atoi(char *ubuf, size_t len) { char buf[16]; unsigned long ret; @@ -153,7 +159,7 @@ static int user_atoi(char __user *ubuf, size_t len) * Send us to sleep. */ static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *fpos) + void *buffer, size_t *lenp, loff_t *fpos) { int retval, mode; @@ -209,7 +215,7 @@ static int try_set_cmode(int new_cmode) static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *fpos) + void *buffer, size_t *lenp, loff_t *fpos) { int new_cmode; @@ -221,9 +227,9 @@ static int cmode_procctl(ctl_table *ctl, int write, struct file *filp, return try_set_cmode(new_cmode)?:*lenp; } -static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen, void **context) +static int cmode_sysctl(ctl_table *table, int *name, int nlen, + void *oldval, size_t *oldlenp, + void *newval, size_t newlen, void **context) { if (oldval && oldlenp) { size_t oldlen; @@ -234,7 +240,7 @@ static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, if (oldlen != sizeof(int)) return -EINVAL; - if (put_user(clock_cmode_current, (unsigned __user *)oldval) || + if (put_user(clock_cmode_current, (unsigned int *)oldval) || put_user(sizeof(int), oldlenp)) return -EFAULT; } @@ -244,7 +250,7 @@ static int cmode_sysctl(ctl_table *table, int __user *name, int nlen, if (newlen != sizeof(int)) return -EINVAL; - if (get_user(new_cmode, (int __user *)newval)) + if (get_user(new_cmode, (int *)newval)) return -EFAULT; return try_set_cmode(new_cmode)?:1; @@ -312,7 +318,7 @@ static int try_set_cm(int new_cm) } static int p0_procctl(ctl_table *ctl, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *fpos) + void *buffer, size_t *lenp, loff_t *fpos) { int new_p0; @@ -324,9 +330,9 @@ static int p0_procctl(ctl_table *ctl, int write, struct file *filp, return try_set_p0(new_p0)?:*lenp; } -static int p0_sysctl(ctl_table *table, int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen, void **context) +static int p0_sysctl(ctl_table *table, int *name, int nlen, + void *oldval, size_t *oldlenp, + void *newval, size_t newlen, void **context) { if (oldval && oldlenp) { size_t oldlen; @@ -337,7 +343,7 @@ static int p0_sysctl(ctl_table *table, int __user *name, int nlen, if (oldlen != sizeof(int)) return -EINVAL; - if (put_user(clock_p0_current, (unsigned __user *)oldval) || + if (put_user(clock_p0_current, (unsigned int *)oldval) || put_user(sizeof(int), oldlenp)) return -EFAULT; } @@ -347,7 +353,7 @@ static int p0_sysctl(ctl_table *table, int __user *name, int nlen, if (newlen != sizeof(int)) return -EINVAL; - if (get_user(new_p0, (int __user *)newval)) + if (get_user(new_p0, (int *)newval)) return -EFAULT; return try_set_p0(new_p0)?:1; @@ -356,7 +362,7 @@ static int p0_sysctl(ctl_table *table, int __user *name, int nlen, } static int cm_procctl(ctl_table *ctl, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *fpos) + void *buffer, size_t *lenp, loff_t *fpos) { int new_cm; @@ -368,9 +374,9 @@ static int cm_procctl(ctl_table *ctl, int write, struct file *filp, return try_set_cm(new_cm)?:*lenp; } -static int cm_sysctl(ctl_table *table, int __user *name, int nlen, - void __user *oldval, size_t __user *oldlenp, - void __user *newval, size_t newlen, void **context) +static int cm_sysctl(ctl_table *table, int *name, int nlen, + void *oldval, size_t *oldlenp, + void *newval, size_t newlen, void **context) { if (oldval && oldlenp) { size_t oldlen; @@ -381,7 +387,7 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, if (oldlen != sizeof(int)) return -EINVAL; - if (put_user(clock_cm_current, (unsigned __user *)oldval) || + if (put_user(clock_cm_current, (unsigned int *)oldval) || put_user(sizeof(int), oldlenp)) return -EFAULT; } @@ -391,7 +397,7 @@ static int cm_sysctl(ctl_table *table, int __user *name, int nlen, if (newlen != sizeof(int)) return -EINVAL; - if (get_user(new_cm, (int __user *)newval)) + if (get_user(new_cm, (int *)newval)) return -EFAULT; return try_set_cm(new_cm)?:1; diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 515a5cea5..0fff8a61e 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. */ -#include +#include #include #include #include @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -40,9 +39,6 @@ asmlinkage void ret_from_fork(void); #include -void (*pm_power_off)(void); -EXPORT_SYMBOL(pm_power_off); - struct task_struct *alloc_task_struct(void) { struct task_struct *p = kmalloc(THREAD_SIZE, GFP_KERNEL); @@ -208,7 +204,7 @@ int copy_thread(int nr, unsigned long clone_flags, regs0 = __kernel_frame0_ptr; childregs0 = (struct pt_regs *) - (task_stack_page(p) + THREAD_SIZE - FRV_FRAME0_SIZE); + (task_stack_page(p) + THREAD_SIZE - USER_CONTEXT_SIZE); childregs = childregs0; /* set up the userspace frame (the only place that the USP is stored) */ @@ -250,7 +246,7 @@ int copy_thread(int nr, unsigned long clone_flags, /* * sys_execve() executes a new program. */ -asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) +asmlinkage int sys_execve(char *name, char **argv, char **envp) { int error; char * filename; @@ -372,11 +368,3 @@ int elf_check_arch(const struct elf32_hdr *hdr) return 1; } - -int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs) -{ - memcpy(fpregs, - ¤t->thread.user->f, - sizeof(current->thread.user->f)); - return 1; -} diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index fcff819b4..f953484e7 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c index f278cdf3a..7971d680a 100644 --- a/arch/frv/kernel/semaphore.c +++ b/arch/frv/kernel/semaphore.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index af08ccd4e..5908deae9 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c @@ -10,7 +10,8 @@ * 2 of the License, or (at your option) any later version. */ -#include +#include +#include #include #include #include @@ -813,7 +814,7 @@ void __init setup_arch(char **cmdline_p) * - by now the stack is part of the init task */ printk("Memory %08lx-%08lx\n", memory_start, memory_end); - BUG_ON(memory_start == memory_end); + if (memory_start == memory_end) BUG(); init_mm.start_code = (unsigned long) &_stext; init_mm.end_code = (unsigned long) &_etext; diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index b8a5882b8..679c1d5cc 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c @@ -98,7 +98,7 @@ int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) struct sigframe { - __sigrestore_t pretcode; + void (*pretcode)(void); int sig; struct sigcontext sc; unsigned long extramask[_NSIG_WORDS-1]; @@ -107,10 +107,10 @@ struct sigframe struct rt_sigframe { - __sigrestore_t pretcode; + void (*pretcode)(void); int sig; - struct siginfo __user *pinfo; - void __user *puc; + struct siginfo *pinfo; + void *puc; struct siginfo info; struct ucontext uc; uint32_t retcode[2]; @@ -233,7 +233,7 @@ static inline void __user *get_sigframe(struct k_sigaction *ka, /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (! sas_ss_flags(sp)) + if (! on_sig_stack(sp)) sp = current->sas_ss_sp + current->sas_ss_size; } @@ -284,7 +284,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set) * setlos #__NR_sigreturn,gr7 * tira gr0,0 */ - if (__put_user((__sigrestore_t)frame->retcode, &frame->pretcode) || + if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) || __put_user(0x8efc0000|__NR_sigreturn, &frame->retcode[0]) || __put_user(0xc0700000, &frame->retcode[1])) goto give_sigsegv; @@ -300,7 +300,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, sigset_t *set) if (get_personality & FDPIC_FUNCPTRS) { struct fdpic_func_descriptor __user *funcptr = - (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; + (struct fdpic_func_descriptor *) ka->sa.sa_handler; __get_user(__frame->pc, &funcptr->text); __get_user(__frame->gr15, &funcptr->GOT); } else { @@ -359,8 +359,8 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* Create the ucontext. */ if (__put_user(0, &frame->uc.uc_flags) || - __put_user(NULL, &frame->uc.uc_link) || - __put_user((void __user *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) || + __put_user(0, &frame->uc.uc_link) || + __put_user((void*)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) || __put_user(sas_ss_flags(__frame->sp), &frame->uc.uc_stack.ss_flags) || __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size)) goto give_sigsegv; @@ -382,7 +382,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, * setlos #__NR_sigreturn,gr7 * tira gr0,0 */ - if (__put_user((__sigrestore_t)frame->retcode, &frame->pretcode) || + if (__put_user((void (*)(void))frame->retcode, &frame->pretcode) || __put_user(0x8efc0000|__NR_rt_sigreturn, &frame->retcode[0]) || __put_user(0xc0700000, &frame->retcode[1])) goto give_sigsegv; @@ -398,7 +398,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, __frame->gr9 = (unsigned long) &frame->info; if (get_personality & FDPIC_FUNCPTRS) { - struct fdpic_func_descriptor __user *funcptr = + struct fdpic_func_descriptor *funcptr = (struct fdpic_func_descriptor __user *) ka->sa.sa_handler; __get_user(__frame->pc, &funcptr->text); __get_user(__frame->gr15, &funcptr->GOT); diff --git a/arch/frv/kernel/sleep.S b/arch/frv/kernel/sleep.S index c9b2d51ab..e6079b8ca 100644 --- a/arch/frv/kernel/sleep.S +++ b/arch/frv/kernel/sleep.S @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/arch/frv/kernel/switch_to.S b/arch/frv/kernel/switch_to.S index b5275fa9c..1703dc201 100644 --- a/arch/frv/kernel/switch_to.S +++ b/arch/frv/kernel/switch_to.S @@ -11,7 +11,7 @@ # 2 of the License, or (at your option) any later version. # ############################################################################### - +#include #include #include #include @@ -31,7 +31,7 @@ # address of frame 0 (userspace) on current kernel stack .globl __kernel_frame0_ptr __kernel_frame0_ptr: - .long init_thread_union + THREAD_SIZE - FRV_FRAME0_SIZE + .long init_thread_union + THREAD_SIZE - USER_CONTEXT_SIZE # address of current task .globl __kernel_current_task diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c index c4d4348c9..931aa6d89 100644 --- a/arch/frv/kernel/sys_frv.c +++ b/arch/frv/kernel/sys_frv.c @@ -32,7 +32,7 @@ * sys_pipe() is the normal C calling standard for creating * a pipe. It's not the way unix traditionally does this, though. */ -asmlinkage long sys_pipe(unsigned long __user * fildes) +asmlinkage long sys_pipe(unsigned long * fildes) { int fd[2]; int error; diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index ce676803e..408b0f382 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -48,7 +49,7 @@ static void frv_change_dcache_mode(unsigned long newmode) * handle requests to dynamically switch the write caching mode delivered by /proc */ static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) + void *buffer, size_t *lenp, loff_t *ppos) { unsigned long hsr0; char buff[8]; @@ -122,7 +123,7 @@ static int procctl_frv_cachemode(ctl_table *table, int write, struct file *filp, */ #ifdef CONFIG_MMU static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp, - void __user *buffer, size_t *lenp, loff_t *ppos) + void *buffer, size_t *lenp, loff_t *ppos) { pid_t pid; char buff[16], *p; diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 35eaf5e26..24cf85f89 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include /* CONFIG_HEARTBEAT */ #include #include #include @@ -31,6 +32,8 @@ #define TICK_SIZE (tick_nsec / 1000) +extern unsigned long wall_jiffies; + unsigned long __nongprelbss __clkin_clock_speed_HZ; unsigned long __nongprelbss __ext_bus_clock_speed_HZ; unsigned long __nongprelbss __res_bus_clock_speed_HZ; @@ -44,7 +47,7 @@ unsigned long __delay_loops_MHz; static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs); static struct irqaction timer_irq = { - timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL + timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL }; static inline int set_rtc_mmss(unsigned long nowtime) @@ -141,6 +144,85 @@ void time_init(void) time_divisor_init(); } +/* + * This version of gettimeofday has near microsecond resolution. + */ +void do_gettimeofday(struct timeval *tv) +{ + unsigned long seq; + unsigned long usec, sec; + unsigned long max_ntp_tick; + + do { + unsigned long lost; + + seq = read_seqbegin(&xtime_lock); + + usec = 0; + lost = jiffies - wall_jiffies; + + /* + * 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.. + */ + 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 * (USEC_PER_SEC / HZ); + + sec = xtime.tv_sec; + usec += (xtime.tv_nsec / 1000); + } while (read_seqretry(&xtime_lock, seq)); + + while (usec >= 1000000) { + usec -= 1000000; + sec++; + } + + tv->tv_sec = sec; + tv->tv_usec = usec; +} + +EXPORT_SYMBOL(do_gettimeofday); + +int do_settimeofday(struct timespec *tv) +{ + time_t wtm_sec, sec = tv->tv_sec; + long wtm_nsec, nsec = tv->tv_nsec; + + if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) + return -EINVAL; + + write_seqlock_irq(&xtime_lock); + /* + * This is revolting. We need to set "xtime" correctly. However, the + * value in this location is the value at the most recent update of + * wall time. Discover what correction gettimeofday() would have + * made, and then undo it! + */ + nsec -= 0 * NSEC_PER_USEC; + nsec -= (jiffies - wall_jiffies) * TICK_NSEC; + + wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); + wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); + + set_normalized_timespec(&xtime, sec, nsec); + set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); + + ntp_clear(); + write_sequnlock_irq(&xtime_lock); + clock_was_set(); + return 0; +} + +EXPORT_SYMBOL(do_settimeofday); + /* * Scheduler clock - returns current time in nanosec units. */ diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c index 2e6098c85..9eb84b2e6 100644 --- a/arch/frv/kernel/traps.c +++ b/arch/frv/kernel/traps.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -20,7 +21,6 @@ #include #include -#include #include #include #include @@ -280,20 +280,20 @@ static const char *regnames[] = { void show_regs(struct pt_regs *regs) { - unsigned long *reg; + uint32_t *reg; int loop; printk("\n"); - printk("Frame: @%08lx [%s]\n", - (unsigned long) regs, + printk("Frame: @%08x [%s]\n", + (uint32_t) regs, regs->psr & PSR_S ? "kernel" : "user"); - reg = (unsigned long *) regs; - for (loop = 0; loop < NR_PT_REGS; loop++) { - printk("%s %08lx", regnames[loop + 0], reg[loop + 0]); + reg = (uint32_t *) regs; + for (loop = 0; loop < REG__END; loop++) { + printk("%s %08x", regnames[loop + 0], reg[loop + 0]); - if (loop == NR_PT_REGS - 1 || loop % 5 == 4) + if (loop == REG__END - 1 || loop % 5 == 4) printk("\n"); else printk(" | "); @@ -329,7 +329,7 @@ void die_if_kernel(const char *str, ...) */ static void show_backtrace_regs(struct pt_regs *frame) { - unsigned long *reg; + uint32_t *reg; int loop; /* print the registers for this frame */ @@ -337,11 +337,11 @@ static void show_backtrace_regs(struct pt_regs *frame) frame->psr & PSR_S ? "Kernel Mode" : "User Mode", frame); - reg = (unsigned long *) frame; - for (loop = 0; loop < NR_PT_REGS; loop++) { - printk("%s %08lx", regnames[loop + 0], reg[loop + 0]); + reg = (uint32_t *) frame; + for (loop = 0; loop < REG__END; loop++) { + printk("%s %08x", regnames[loop + 0], reg[loop + 0]); - if (loop == NR_PT_REGS - 1 || loop % 5 == 4) + if (loop == REG__END - 1 || loop % 5 == 4) printk("\n"); else printk(" | "); diff --git a/arch/frv/kernel/uaccess.c b/arch/frv/kernel/uaccess.c index 9fb771a20..9b751c0f0 100644 --- a/arch/frv/kernel/uaccess.c +++ b/arch/frv/kernel/uaccess.c @@ -17,7 +17,7 @@ /* * copy a null terminated string from userspace */ -long strncpy_from_user(char *dst, const char __user *src, long count) +long strncpy_from_user(char *dst, const char *src, long count) { unsigned long max; char *p, ch; @@ -70,9 +70,9 @@ EXPORT_SYMBOL(strncpy_from_user); * * Return 0 on exception, a value greater than N if too long */ -long strnlen_user(const char __user *src, long count) +long strnlen_user(const char *src, long count) { - const char __user *p; + const char *p; long err = 0; char ch; diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c index 4f165c93b..0a26bf6f1 100644 --- a/arch/frv/mb93090-mb00/pci-frv.c +++ b/arch/frv/mb93090-mb00/pci-frv.c @@ -64,10 +64,10 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root, */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c index 2278c80bd..c4a1144c9 100644 --- a/arch/frv/mb93090-mb00/pci-irq.c +++ b/arch/frv/mb93090-mb00/pci-irq.c @@ -5,6 +5,7 @@ * derived from: arch/i386/kernel/pci-irq.c: (c) 1999--2000 Martin Mares */ +#include #include #include #include @@ -31,11 +32,11 @@ */ static const uint8_t __initdata pci_bus0_irq_routing[32][4] = { - [0 ] = { IRQ_FPGA_MB86943_PCI_INTA }, - [16] = { IRQ_FPGA_RTL8029_INTA }, - [17] = { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB }, - [18] = { IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA }, - [19] = { IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD }, + [0 ] { IRQ_FPGA_MB86943_PCI_INTA }, + [16] { IRQ_FPGA_RTL8029_INTA }, + [17] { IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB }, + [18] { IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD, IRQ_FPGA_PCI_INTA }, + [19] { IRQ_FPGA_PCI_INTA, IRQ_FPGA_PCI_INTB, IRQ_FPGA_PCI_INTC, IRQ_FPGA_PCI_INTD }, }; void __init pcibios_irq_init(void) diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index f7279d789..c8817f7b8 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -406,9 +407,7 @@ int __init pcibios_init(void) ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff; ioport_resource.end += ioport_resource.start; - printk("PCI IO window: %08llx-%08llx\n", - (unsigned long long) ioport_resource.start, - (unsigned long long) ioport_resource.end); + printk("PCI IO window: %08lx-%08lx\n", ioport_resource.start, ioport_resource.end); iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00; @@ -418,11 +417,8 @@ int __init pcibios_init(void) iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff; iomem_resource.end += iomem_resource.start; - printk("PCI MEM window: %08llx-%08llx\n", - (unsigned long long) iomem_resource.start, - (unsigned long long) iomem_resource.end); - printk("PCI DMA memory: %08lx-%08lx\n", - dma_coherent_mem_start, dma_coherent_mem_end); + printk("PCI MEM window: %08lx-%08lx\n", iomem_resource.start, iomem_resource.end); + printk("PCI DMA memory: %08lx-%08lx\n", dma_coherent_mem_start, dma_coherent_mem_end); if (!pci_probe) return -ENXIO; diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c index dc6522c46..636b2f8b5 100644 --- a/arch/frv/mm/dma-alloc.c +++ b/arch/frv/mm/dma-alloc.c @@ -21,6 +21,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c index 6aea124f5..caacf030a 100644 --- a/arch/frv/mm/extable.c +++ b/arch/frv/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/frv/mm/extable.c */ +#include #include #include #include diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index b5b4286f9..8899aa1a4 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c @@ -16,6 +16,7 @@ * - Copyright (C) 1995 Hamish Macdonald */ +#include #include #include #include diff --git a/arch/frv/mm/kmap.c b/arch/frv/mm/kmap.c index fb78be38e..c54f18e65 100644 --- a/arch/frv/mm/kmap.c +++ b/arch/frv/mm/kmap.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -30,15 +31,15 @@ * Map some physical address range into the kernel address space. */ -void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag) +void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag) { - return (void __iomem *)physaddr; + return (void *)physaddr; } /* * Unmap a ioremap()ed region again */ -void iounmap(void volatile __iomem *addr) +void iounmap(void *addr) { } diff --git a/arch/frv/mm/mmu-context.c b/arch/frv/mm/mmu-context.c index 1530a4111..27c54a1e0 100644 --- a/arch/frv/mm/mmu-context.c +++ b/arch/frv/mm/mmu-context.c @@ -11,6 +11,7 @@ #include #include +#include #include #define NR_CXN 4096 diff --git a/arch/frv/mm/tlb-flush.S b/arch/frv/mm/tlb-flush.S index 79b3c7091..6f43c74c5 100644 --- a/arch/frv/mm/tlb-flush.S +++ b/arch/frv/mm/tlb-flush.S @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/frv/mm/tlb-miss.S b/arch/frv/mm/tlb-miss.S index 04da67468..8729f7d7c 100644 --- a/arch/frv/mm/tlb-miss.S +++ b/arch/frv/mm/tlb-miss.S @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/frv/mm/unaligned.c b/arch/frv/mm/unaligned.c index 8f0375fc1..09b361443 100644 --- a/arch/frv/mm/unaligned.c +++ b/arch/frv/mm/unaligned.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/h8300/kernel/gpio.c b/arch/h8300/kernel/gpio.c index 6a25dd553..d195568ca 100644 --- a/arch/h8300/kernel/gpio.c +++ b/arch/h8300/kernel/gpio.c @@ -9,6 +9,7 @@ * Internal I/O Port Management */ +#include #include #include #include diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c index 9b4be053d..f8d6dee84 100644 --- a/arch/h8300/kernel/h8300_ksyms.c +++ b/arch/h8300/kernel/h8300_ksyms.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c index 1488b6ace..edb3c4170 100644 --- a/arch/h8300/kernel/ints.c +++ b/arch/h8300/kernel/ints.c @@ -158,7 +158,7 @@ int request_irq(unsigned int irq, irq_handle->devname = devname; irq_list[irq] = irq_handle; - if (irq_handle->flags & IRQF_SAMPLE_RANDOM) + if (irq_handle->flags & SA_SAMPLE_RANDOM) rand_initialize_irq(irq); enable_irq(irq); @@ -222,7 +222,7 @@ asmlinkage void process_int(int irq, struct pt_regs *fp) if (irq_list[irq]) { irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp); irq_list[irq]->count++; - if (irq_list[irq]->flags & IRQF_SAMPLE_RANDOM) + if (irq_list[irq]->flags & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); } } else { diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index e061b63a0..16ccddc69 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c @@ -22,6 +22,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index f6031373d..0ff6f79b0 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/arch/h8300/kernel/semaphore.c b/arch/h8300/kernel/semaphore.c index d12cbbfe6..1ebb79baa 100644 --- a/arch/h8300/kernel/semaphore.c +++ b/arch/h8300/kernel/semaphore.c @@ -3,6 +3,7 @@ * specific changes in */ +#include #include #include #include diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c index 1077b71d5..f469d9160 100644 --- a/arch/h8300/kernel/setup.c +++ b/arch/h8300/kernel/setup.c @@ -16,6 +16,7 @@ * This file handles the architecture-dependent parts of system setup */ +#include #include #include #include diff --git a/arch/h8300/kernel/signal.c b/arch/h8300/kernel/signal.c index 7787f70a0..f13d5e82d 100644 --- a/arch/h8300/kernel/signal.c +++ b/arch/h8300/kernel/signal.c @@ -307,7 +307,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (!sas_ss_flags(usp)) + if (!on_sig_stack(usp)) usp = current->sas_ss_sp + current->sas_ss_size; } return (void *)((usp - frame_size) & -8UL); diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S index dab98fd99..79b3bda5c 100644 --- a/arch/h8300/kernel/syscalls.S +++ b/arch/h8300/kernel/syscalls.S @@ -1,4 +1,5 @@ /* Systemcall Entry Table */ +#include #include #include #include diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 91f47658c..688a51006 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c @@ -16,6 +16,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include /* CONFIG_HEARTBEAT */ #include #include #include diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S index 6406c388f..17fa11da1 100644 --- a/arch/h8300/kernel/vmlinux.lds.S +++ b/arch/h8300/kernel/vmlinux.lds.S @@ -1,5 +1,6 @@ #define VMLINUX_SYMBOL(_sym_) _##_sym_ #include +#include /* target memory map */ #ifdef CONFIG_H8300H_GENERIC diff --git a/arch/h8300/lib/romfs.S b/arch/h8300/lib/romfs.S index 68910d8e1..b72f93a47 100644 --- a/arch/h8300/lib/romfs.S +++ b/arch/h8300/lib/romfs.S @@ -1,6 +1,7 @@ /* romfs move to __ebss */ #include +#include #if defined(__H8300H__) .h8300h diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index d3d40bdc2..09efc4b1f 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c @@ -16,6 +16,7 @@ * DEC/2000 -- linux 2.4 support */ +#include #include #include #include diff --git a/arch/h8300/mm/kmap.c b/arch/h8300/mm/kmap.c index 26ab17286..4101ab54f 100644 --- a/arch/h8300/mm/kmap.c +++ b/arch/h8300/mm/kmap.c @@ -8,6 +8,7 @@ * Copyright (C) 2000-2002 David McCullough */ +#include #include #include #include diff --git a/arch/h8300/mm/memory.c b/arch/h8300/mm/memory.c index ccd6ade81..81eace93f 100644 --- a/arch/h8300/mm/memory.c +++ b/arch/h8300/mm/memory.c @@ -17,6 +17,7 @@ * Copyright (C) 1995 Hamish Macdonald */ +#include #include #include #include diff --git a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S b/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S index ecaeb31ae..31c3703d8 100644 --- a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S +++ b/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #if !defined(CONFIG_BLKDEV_RESERVE) diff --git a/arch/h8300/platform/h8300h/aki3068net/timer.c b/arch/h8300/platform/h8300h/aki3068net/timer.c index 27cd85d56..086efb1fd 100644 --- a/arch/h8300/platform/h8300h/aki3068net/timer.c +++ b/arch/h8300/platform/h8300h/aki3068net/timer.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/h8300/platform/h8300h/entry.S b/arch/h8300/platform/h8300h/entry.S index d2dea2432..2052dbb94 100644 --- a/arch/h8300/platform/h8300h/entry.S +++ b/arch/h8300/platform/h8300h/entry.S @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/arch/h8300/platform/h8300h/generic/crt0_ram.S b/arch/h8300/platform/h8300h/generic/crt0_ram.S index 80d0e16a4..b735042a7 100644 --- a/arch/h8300/platform/h8300h/generic/crt0_ram.S +++ b/arch/h8300/platform/h8300h/generic/crt0_ram.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #if !defined(CONFIG_BLKDEV_RESERVE) diff --git a/arch/h8300/platform/h8300h/generic/crt0_rom.S b/arch/h8300/platform/h8300h/generic/crt0_rom.S index 120add7ca..2e32d8179 100644 --- a/arch/h8300/platform/h8300h/generic/crt0_rom.S +++ b/arch/h8300/platform/h8300h/generic/crt0_rom.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include .global SYMBOL_NAME(_start) diff --git a/arch/h8300/platform/h8300h/generic/timer.c b/arch/h8300/platform/h8300h/generic/timer.c index 6f5cefe0c..6590f89e5 100644 --- a/arch/h8300/platform/h8300h/generic/timer.c +++ b/arch/h8300/platform/h8300h/generic/timer.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/h8300/platform/h8300h/h8max/crt0_ram.S b/arch/h8300/platform/h8300h/h8max/crt0_ram.S index efcbefb91..a5c5a9156 100644 --- a/arch/h8300/platform/h8300h/h8max/crt0_ram.S +++ b/arch/h8300/platform/h8300h/h8max/crt0_ram.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #if !defined(CONFIG_BLKDEV_RESERVE) diff --git a/arch/h8300/platform/h8300h/h8max/timer.c b/arch/h8300/platform/h8300h/h8max/timer.c index 85a574afe..9ac9fa669 100644 --- a/arch/h8300/platform/h8300h/h8max/timer.c +++ b/arch/h8300/platform/h8300h/h8max/timer.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/h8300/platform/h8300h/ints_h8300h.c b/arch/h8300/platform/h8300h/ints_h8300h.c index f1777119b..86a155479 100644 --- a/arch/h8300/platform/h8300h/ints_h8300h.c +++ b/arch/h8300/platform/h8300h/ints_h8300h.c @@ -6,6 +6,7 @@ * */ +#include #include #include diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S b/arch/h8300/platform/h8s/edosk2674/crt0_ram.S index d12b0debe..8105dc17d 100644 --- a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S +++ b/arch/h8300/platform/h8s/edosk2674/crt0_ram.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #include diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S index c03d23c6f..65748bf18 100644 --- a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S +++ b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #include diff --git a/arch/h8300/platform/h8s/edosk2674/timer.c b/arch/h8300/platform/h8s/edosk2674/timer.c index bfb142448..9441a4f16 100644 --- a/arch/h8300/platform/h8s/edosk2674/timer.c +++ b/arch/h8300/platform/h8s/edosk2674/timer.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/h8300/platform/h8s/entry.S b/arch/h8300/platform/h8s/entry.S index aeb2e9faa..a7a53c84c 100644 --- a/arch/h8300/platform/h8s/entry.S +++ b/arch/h8300/platform/h8s/entry.S @@ -15,6 +15,7 @@ */ #include +#include #include #include #include diff --git a/arch/h8300/platform/h8s/generic/crt0_ram.S b/arch/h8300/platform/h8s/generic/crt0_ram.S index b04541069..86f450178 100644 --- a/arch/h8300/platform/h8s/generic/crt0_ram.S +++ b/arch/h8300/platform/h8s/generic/crt0_ram.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #include diff --git a/arch/h8300/platform/h8s/generic/crt0_rom.S b/arch/h8300/platform/h8s/generic/crt0_rom.S index 95b6f2898..e18e41202 100644 --- a/arch/h8300/platform/h8s/generic/crt0_rom.S +++ b/arch/h8300/platform/h8s/generic/crt0_rom.S @@ -10,6 +10,7 @@ #define ASSEMBLY +#include #include #include diff --git a/arch/h8300/platform/h8s/generic/timer.c b/arch/h8300/platform/h8s/generic/timer.c index c2211c6e7..633cd8e1c 100644 --- a/arch/h8300/platform/h8s/generic/timer.c +++ b/arch/h8300/platform/h8s/generic/timer.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c index 270440de4..f6ed663bd 100644 --- a/arch/h8300/platform/h8s/ints.c +++ b/arch/h8300/platform/h8s/ints.c @@ -192,7 +192,7 @@ int request_irq(unsigned int irq, irq_handle->dev_id = dev_id; irq_handle->devname = devname; irq_list[irq] = irq_handle; - if (irq_handle->flags & IRQF_SAMPLE_RANDOM) + if (irq_handle->flags & SA_SAMPLE_RANDOM) rand_initialize_irq(irq); /* enable interrupt */ @@ -270,7 +270,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp) if (irq_list[vec]) { irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp); irq_list[vec]->count++; - if (irq_list[vec]->flags & IRQF_SAMPLE_RANDOM) + if (irq_list[vec]->flags & SA_SAMPLE_RANDOM) add_interrupt_randomness(vec); } } else { diff --git a/arch/h8300/platform/h8s/ints_h8s.c b/arch/h8300/platform/h8s/ints_h8s.c index 93395d2a8..8268dfd12 100644 --- a/arch/h8300/platform/h8s/ints_h8s.c +++ b/arch/h8300/platform/h8s/ints_h8s.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 9c714ef0b..d75fa4047 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -14,19 +14,6 @@ config X86_32 486, 586, Pentiums, and various instruction-set-compatible chips by AMD, Cyrix, and others. -config GENERIC_TIME - bool - depends on !X86_XEN - default y - -config LOCKDEP_SUPPORT - bool - default y - -config STACKTRACE_SUPPORT - bool - default y - config SEMAPHORE_SLEEPERS bool default y @@ -152,7 +139,6 @@ config X86_SUMMIT In particular, it is needed for the x440. If you don't have one of these computers, you should say N here. - If you want to build a NUMA kernel, you must select ACPI. config X86_BIGSMP bool "Support for other sub-arch SMP systems with more than 8 CPUs" @@ -180,7 +166,6 @@ config X86_GENERICARCH help This option compiles in the Summit, bigsmp, ES7000, default subarchitectures. It is intended for a generic binary kernel. - If you want a NUMA kernel, select ACPI. We need SRAT for NUMA. config X86_ES7000 bool "Support for Unisys ES7000 IA32 series" @@ -196,13 +181,7 @@ endchoice config ACPI_SRAT bool default y - depends on ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH) - select ACPI_NUMA - -config HAVE_ARCH_PARSE_SRAT - bool - default y - depends on ACPI_SRAT + depends on NUMA && (X86_SUMMIT || X86_GENERICARCH) config X86_SUMMIT_NUMA bool @@ -254,7 +233,8 @@ config NR_CPUS config SCHED_SMT bool "SMT (Hyperthreading) scheduler support" - depends on X86_HT + depends on SMP && !X86_XEN + default off help SMT scheduler support improves the CPU scheduler's decision making when dealing with Intel Pentium 4 chips with HyperThreading at a @@ -263,7 +243,7 @@ config SCHED_SMT config SCHED_MC bool "Multi-core scheduler support" - depends on X86_HT + depends on SMP && !X86_XEN default y help Multi-core scheduler support improves the CPU scheduler's decision @@ -312,6 +292,11 @@ config X86_VISWS_APIC depends on X86_VISWS default y +config X86_TSC + bool + depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ && !X86_XEN + default y + config X86_MCE bool "Machine Check Exception" depends on !(X86_VOYAGER || X86_XEN) @@ -349,15 +334,6 @@ config X86_MCE_P4THERMAL Enabling this feature will cause a message to be printed when the P4 enters thermal throttling. -config VM86 - default y - bool "Enable VM86 support" if EMBEDDED - help - This option is required by programs like DOSEMU to run 16-bit legacy - code on X86 processors. It also may be needed by software like - XFree86 to initialize some video cards via BIOS. Disabling this - option saves about 6k. - config TOSHIBA tristate "Toshiba Laptop support" ---help--- @@ -556,12 +532,11 @@ config X86_PAE bool depends on HIGHMEM64G default y - select RESOURCES_64BIT # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support" - depends on SMP && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI) + depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)) default n if X86_PC default y if (X86_NUMAQ || X86_SUMMIT) @@ -694,7 +669,7 @@ config MTRR See for more information. config EFI - bool "Boot from EFI support" + bool "Boot from EFI support (EXPERIMENTAL)" depends on ACPI && !X86_XEN default n ---help--- @@ -765,10 +740,10 @@ config KEXEC help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is independent of the system firmware. And like a reboot + but it is indepedent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. - The name comes from the similarity to the exec system call. + The name comes from the similiarity to the exec system call. It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not @@ -811,18 +786,6 @@ config HOTPLUG_CPU enable suspend on SMP systems. CPUs can be controlled through /sys/devices/system/cpu. -config COMPAT_VDSO - bool "Compat VDSO support" - default y - depends on !X86_XEN - help - Map the VDSO to the predictable old-style address too. - ---help--- - Say N here if you are running a sufficiently recent glibc - version (2.3.3 or later), to remove the high-mapped - VDSO mapping and to exclusively use the randomized VDSO. - - If unsure, say Y. endmenu @@ -1127,27 +1090,13 @@ config SCx200 tristate "NatSemi SCx200 support" depends on !X86_VOYAGER help - This provides basic support for National Semiconductor's - (now AMD's) Geode processors. The driver probes for the - PCI-IDs of several on-chip devices, so its a good dependency - for other scx200_* drivers. + This provides basic support for the National Semiconductor SCx200 + processor. Right now this is just a driver for the GPIO pins. - If compiled as a module, the driver is named scx200. - -config SCx200HR_TIMER - tristate "NatSemi SCx200 27MHz High-Resolution Timer Support" - depends on SCx200 && GENERIC_TIME - default y - help - This driver provides a clocksource built upon the on-chip - 27MHz high-resolution timer. Its also a workaround for - NSC Geode SC-1100's buggy TSC, which loses time when the - processor goes idle (as is done by the scheduler). The - other workaround is idle=poll boot option. + If you don't know what to do here, say N. -config K8_NB - def_bool y - depends on AGP_AMD64 + This support is also available as a module. If compiled as a + module, it will be called scx200. source "drivers/pcmcia/Kconfig" diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index d82cdccf7..f90d8d0df 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu @@ -7,7 +7,6 @@ choice config M386 bool "386" - depends on !UML ---help--- This is the processor type of your CPU. This information is used for optimizing purposes. In order to compile a kernel that can run on @@ -42,7 +41,7 @@ config M386 - "GeodeGX1" for Geode GX1 (Cyrix MediaGX). - "Geode GX/LX" For AMD Geode GX and LX processors. - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3. - - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above). + - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above). If you don't know what to do, choose "386". @@ -302,7 +301,7 @@ config X86_USE_PPRO_CHECKSUM config X86_USE_3DNOW bool - depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML + depends on MCYRIXIII || MK7 || MGEODE_LX default y config X86_OOSTORE @@ -312,5 +311,5 @@ config X86_OOSTORE config X86_TSC bool - depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ && !X86_XEN + depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ default y diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index a454cbe5d..fb28fe741 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug @@ -1,9 +1,5 @@ menu "Kernel hacking" -config TRACE_IRQFLAGS_SUPPORT - bool - default y - source "lib/Kconfig.debug" config EARLY_PRINTK @@ -35,6 +31,15 @@ config DEBUG_STACK_USAGE This option will slow down process creation somewhat. +config STACK_BACKTRACE_COLS + int "Stack backtraces per line" if DEBUG_KERNEL + range 1 3 + default 2 + help + Selects how many stack backtrace entries per line to display. + + This can save screen space when displaying traces. + comment "Page alloc debug is incompatible with Software Suspend on i386" depends on DEBUG_KERNEL && SOFTWARE_SUSPEND diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile index e97946626..33e554763 100644 --- a/arch/i386/boot/Makefile +++ b/arch/i386/boot/Makefile @@ -109,13 +109,8 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf isoimage: $(BOOTIMAGE) -rm -rf $(obj)/isoimage mkdir $(obj)/isoimage - for i in lib lib64 share end ; do \ - if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ - cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ - break ; \ - fi ; \ - if [ $$i = end ] ; then exit 1 ; fi ; \ - done + cp `echo /usr/lib*/syslinux/isolinux.bin | awk '{ print $1; }'` \ + $(obj)/isoimage cp $(BOOTIMAGE) $(obj)/isoimage/linux echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg if [ -f '$(FDINITRD)' ] ; then \ diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c index b2ccd5434..f19f3a749 100644 --- a/arch/i386/boot/compressed/misc.c +++ b/arch/i386/boot/compressed/misc.c @@ -24,6 +24,14 @@ #undef memset #undef memcpy + +/* + * Why do we do this? Don't ask me.. + * + * Incomprehensible are the ways of bootloaders. + */ +static void* memset(void *, int, size_t); +static void* memcpy(void *, __const void *, size_t); #define memzero(s, n) memset ((s), 0, (n)) typedef unsigned char uch; @@ -85,7 +93,7 @@ static unsigned char *real_mode; /* Pointer to real-mode data */ #endif #define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0)) -extern unsigned char input_data[]; +extern char input_data[]; extern int input_len; static long bytes_out = 0; @@ -95,9 +103,6 @@ static unsigned long output_ptr = 0; static void *malloc(int size); static void free(void *where); -static void *memset(void *s, int c, unsigned n); -static void *memcpy(void *dest, const void *src, unsigned n); - static void putstr(const char *); extern int end; @@ -200,7 +205,7 @@ static void putstr(const char *s) outb_p(0xff & (pos >> 1), vidport+1); } -static void* memset(void* s, int c, unsigned n) +static void* memset(void* s, int c, size_t n) { int i; char *ss = (char*)s; @@ -209,13 +214,14 @@ static void* memset(void* s, int c, unsigned n) return s; } -static void* memcpy(void* dest, const void* src, unsigned n) +static void* memcpy(void* __dest, __const void* __src, + size_t __n) { int i; - char *d = (char *)dest, *s = (char *)src; + char *d = (char *)__dest, *s = (char *)__src; - for (i=0;i RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory"); #endif - output_data = (unsigned char *)__PHYSICAL_START; /* Normally Points to 1M */ + output_data = (char *)__PHYSICAL_START; /* Normally Points to 1M */ free_mem_end_ptr = (long)real_mode; } @@ -318,9 +324,11 @@ static void setup_output_buffer_if_we_run_high(struct moveparams *mv) #ifdef STANDARD_MEMORY_BIOS_CALL if (RM_EXT_MEM_K < (3*1024)) error("Less than 4MB of memory"); #else - if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory"); + if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < + (3*1024)) + error("Less than 4MB of memory"); #endif - mv->low_buffer_start = output_data = (unsigned char *)LOW_BUFFER_START; + mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START; low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX ? LOW_BUFFER_MAX : (unsigned int)real_mode) & ~0xfff; low_buffer_size = low_buffer_end - LOW_BUFFER_START; diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index d2b684cd6..ca668d9df 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -46,8 +46,9 @@ * by Robert Schwebel, December 2001 */ +#include #include -#include +#include #include #include #include diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 5846d69dc..668b99600 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S @@ -11,6 +11,8 @@ * */ +#include /* for CONFIG_VIDEO_* */ + /* Enable autodetection of SVGA adapters and modes. */ #undef CONFIG_VIDEO_SVGA @@ -1931,7 +1933,7 @@ skip10: movb %ah, %al ret store_edid: -#ifdef CONFIG_FIRMWARE_EDID +#ifdef CONFIG_FB_FIRMWARE_EDID pushw %es # just save all registers pushw %ax pushw %bx @@ -1949,26 +1951,19 @@ store_edid: rep stosl - pushw %es # save ES - xorw %di, %di # Report Capability - pushw %di - popw %es # ES:DI must be 0:0 - movw $0x4f15, %ax - xorw %bx, %bx - xorw %cx, %cx - int $0x10 - popw %es # restore ES - - cmpb $0x00, %ah # call successful - jne no_edid - - cmpb $0x4f, %al # function supported - jne no_edid + movw $0x4f15, %ax # do VBE/DDC + movw $0x00, %bx # INSTALLATION CHECK / CAPABILITIES + movw $0x00, %cx + movw $0x00, %dx + movw $0x140, %di + int $0x10 + cmpb $0x01, %ah + je no_edid movw $0x4f15, %ax # do VBE/DDC - movw $0x01, %bx + movw $0x01, %bx # READ_EDID movw $0x00, %cx - movw $0x00, %dx + movw $0x00, %dx movw $0x140, %di int $0x10 diff --git a/arch/i386/crypto/aes-i586-asm.S b/arch/i386/crypto/aes-i586-asm.S index f942f0c8f..911b15377 100644 --- a/arch/i386/crypto/aes-i586-asm.S +++ b/arch/i386/crypto/aes-i586-asm.S @@ -36,19 +36,22 @@ .file "aes-i586-asm.S" .text -#include - +// aes_rval aes_enc_blk(const unsigned char in_blk[], unsigned char out_blk[], const aes_ctx cx[1])// +// aes_rval aes_dec_blk(const unsigned char in_blk[], unsigned char out_blk[], const aes_ctx cx[1])// + #define tlen 1024 // length of each of 4 'xor' arrays (256 32-bit words) -/* offsets to parameters with one register pushed onto stack */ -#define tfm 8 -#define out_blk 12 -#define in_blk 16 +// offsets to parameters with one register pushed onto stack + +#define in_blk 8 // input byte array address parameter +#define out_blk 12 // output byte array address parameter +#define ctx 16 // AES context structure + +// offsets in context structure -/* offsets in crypto_tfm structure */ -#define ekey (crypto_tfm_ctx_offset + 0) -#define nrnd (crypto_tfm_ctx_offset + 256) -#define dkey (crypto_tfm_ctx_offset + 260) +#define ekey 0 // encryption key schedule base address +#define nrnd 256 // number of rounds +#define dkey 260 // decryption key schedule base address // register mapping for encrypt and decrypt subroutines @@ -217,7 +220,6 @@ do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */ // AES (Rijndael) Encryption Subroutine -/* void aes_enc_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */ .global aes_enc_blk @@ -228,7 +230,7 @@ aes_enc_blk: push %ebp - mov tfm(%esp),%ebp + mov ctx(%esp),%ebp // pointer to context // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -293,7 +295,6 @@ aes_enc_blk: ret // AES (Rijndael) Decryption Subroutine -/* void aes_dec_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */ .global aes_dec_blk @@ -304,7 +305,7 @@ aes_enc_blk: aes_dec_blk: push %ebp - mov tfm(%esp),%ebp + mov ctx(%esp),%ebp // pointer to context // CAUTION: the order and the values used in these assigns // rely on the register mappings diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c index d3806daa3..a50397b1d 100644 --- a/arch/i386/crypto/aes.c +++ b/arch/i386/crypto/aes.c @@ -45,8 +45,8 @@ #include #include -asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); -asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src); +asmlinkage void aes_enc_blk(const u8 *src, u8 *dst, void *ctx); +asmlinkage void aes_dec_blk(const u8 *src, u8 *dst, void *ctx); #define AES_MIN_KEY_SIZE 16 #define AES_MAX_KEY_SIZE 32 @@ -378,12 +378,12 @@ static void gen_tabs(void) k[8*(i)+11] = ss[3]; \ } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int +aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) { int i; u32 ss[8]; - struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + struct aes_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; /* encryption schedule */ @@ -464,16 +464,16 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, return 0; } -static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static inline void aes_encrypt(void *ctx, u8 *dst, const u8 *src) { - aes_enc_blk(tfm, dst, src); + aes_enc_blk(src, dst, ctx); } - -static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src) { - aes_dec_blk(tfm, dst, src); + aes_dec_blk(src, dst, ctx); } + static struct crypto_alg aes_alg = { .cra_name = "aes", .cra_driver_name = "aes-i586", diff --git a/arch/i386/defconfig b/arch/i386/defconfig index 89ebb7a31..1629c3ac9 100644 --- a/arch/i386/defconfig +++ b/arch/i386/defconfig @@ -197,7 +197,7 @@ CONFIG_PM=y # CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set CONFIG_SOFTWARE_SUSPEND=y -CONFIG_PM_STD_PARTITION="" +CONFIG_PM_STD_PARTITION="/dev/hda2" # # ACPI (Advanced Configuration and Power Interface) Support diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 9bfc980ae..ddaa19d89 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -7,10 +7,10 @@ extra-y := head.o init_task.o vmlinux.lds obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ pci-dma.o i386_ksyms.o i387.o bootflag.o \ - quirks.o i8237.o topology.o alternative.o i8253.o tsc.o + quirks.o i8237.o topology.o alternative.o -obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += cpu/ +obj-y += timers/ obj-y += acpi/ obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o obj-$(CONFIG_MCA) += mca.o @@ -37,8 +37,6 @@ obj-$(CONFIG_EFI) += efi.o efi_stub.o obj-$(CONFIG_DOUBLEFAULT) += doublefault.o obj-$(CONFIG_VM86) += vm86.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -obj-$(CONFIG_HPET_TIMER) += hpet.o -obj-$(CONFIG_K8_NB) += k8.o EXTRA_AFLAGS := -traditional @@ -64,8 +62,7 @@ quiet_cmd_syscall = SYSCALL $@ export CPPFLAGS_vsyscall.lds += -P -C -U$(ARCH) -vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ - $(call ld-option, -Wl$(comma)--hash-style=sysv) +vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 SYSCFLAGS_vsyscall-sysenter.so = $(vsyscall-flags) SYSCFLAGS_vsyscall-int80.so = $(vsyscall-flags) @@ -86,9 +83,6 @@ $(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \ $(obj)/vsyscall-sysenter.o $(obj)/$(vsyscall_note) FORCE $(call if_changed,syscall) -k8-y += ../../x86_64/kernel/k8.o -stacktrace-y += ../../x86_64/kernel/stacktrace.o - ifdef CONFIG_XEN include $(srctree)/scripts/Makefile.xen diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index ee003bc0e..40e5aba3a 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -24,6 +24,7 @@ */ #include +#include #include #include #include @@ -59,7 +60,7 @@ static inline int gsi_irq_sharing(int gsi) { return gsi; } #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ - ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) + ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) #define PREFIX "ACPI: " @@ -201,8 +202,6 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) if (mcfg->config[i].base_reserved) { printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n"); - kfree(pci_mmcfg_config); - pci_mmcfg_config_num = 0; return -ENODEV; } } @@ -216,7 +215,7 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) { struct acpi_table_madt *madt = NULL; - if (!phys_addr || !size || !cpu_has_apic) + if (!phys_addr || !size) return -EINVAL; madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); @@ -622,9 +621,9 @@ extern u32 pmtmr_ioport; static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) { - struct fadt_descriptor *fadt = NULL; + struct fadt_descriptor_rev2 *fadt = NULL; - fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size); + fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size); if (!fadt) { printk(KERN_WARNING PREFIX "Unable to map FADT\n"); return 0; @@ -755,7 +754,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) return -ENODEV; } - if (!cpu_has_apic) + if (!cpu_has_apic) return -ENODEV; /* diff --git a/arch/i386/kernel/acpi/processor.c b/arch/i386/kernel/acpi/processor.c index b54fded49..9f4cc0271 100644 --- a/arch/i386/kernel/acpi/processor.c +++ b/arch/i386/kernel/acpi/processor.c @@ -47,7 +47,7 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) buf[2] = ACPI_PDC_C_CAPABILITY_SMP; if (cpu_has(c, X86_FEATURE_EST)) - buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP; + buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; obj->type = ACPI_TYPE_BUFFER; obj->buffer.length = 12; diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c index 4ee83577b..1cb2b186a 100644 --- a/arch/i386/kernel/acpi/sleep.c +++ b/arch/i386/kernel/acpi/sleep.c @@ -8,17 +8,30 @@ #include #include #include -#include - #include +#include /* 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 void zap_low_mappings(void); + extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); +static void init_low_mapping(pgd_t * pgd, int pgd_limit) +{ + int pgd_ofs = 0; + + while ((pgd_ofs < pgd_limit) + && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) { + set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD)); + pgd_ofs++, pgd++; + } + flush_tlb_all(); +} + /** * acpi_save_state_mem - save kernel state * @@ -29,6 +42,7 @@ int acpi_save_state_mem(void) { if (!acpi_wakeup_address) return 1; + init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD); memcpy((void *)acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); acpi_copy_wakeup_routine(acpi_wakeup_address); @@ -41,6 +55,7 @@ int acpi_save_state_mem(void) */ void acpi_restore_state_mem(void) { + zap_low_mappings(); } /** diff --git a/arch/i386/kernel/acpi/wakeup.S b/arch/i386/kernel/acpi/wakeup.S index b781b3813..7c74fe0dc 100644 --- a/arch/i386/kernel/acpi/wakeup.S +++ b/arch/i386/kernel/acpi/wakeup.S @@ -56,7 +56,7 @@ wakeup_code: 1: # set up page table - movl $swsusp_pg_dir-__PAGE_OFFSET, %eax + movl $swapper_pg_dir-__PAGE_OFFSET, %eax movl %eax, %cr3 testl $1, real_efer_save_restore - wakeup_code @@ -265,6 +265,11 @@ ENTRY(acpi_copy_wakeup_routine) movl $0x12345678, saved_magic ret +.data +ALIGN +ENTRY(saved_magic) .long 0 +ENTRY(saved_eip) .long 0 + save_registers: leal 4(%esp), %eax movl %eax, saved_context_esp @@ -292,21 +297,14 @@ ENTRY(do_suspend_lowlevel) pushl $3 call acpi_enter_sleep_state addl $4, %esp - -# In case of S3 failure, we'll emerge here. Jump -# to ret_point to recover - jmp ret_point + ret .p2align 4,,7 ret_point: call restore_registers call restore_processor_state ret -.data ALIGN -ENTRY(saved_magic) .long 0 -ENTRY(saved_eip) .long 0 - # saved registers saved_gdt: .long 0,0 saved_idt: .long 0,0 diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 42fbec7e7..f36e6ecc7 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c @@ -4,45 +4,27 @@ #include #include -#ifdef CONFIG_X86_64_XEN -static int no_replacement = 1; +#define DEBUG 0 +#if DEBUG +# define DPRINTK(fmt, args...) printk(fmt, args) #else -static int no_replacement = 0; +# define DPRINTK(fmt, args...) #endif -static int smp_alt_once = 0; -static int debug_alternative = 0; -static int __init noreplacement_setup(char *s) -{ - no_replacement = 1; - return 1; -} -static int __init bootonly(char *str) -{ - smp_alt_once = 1; - return 1; -} -static int __init debug_alt(char *str) -{ - debug_alternative = 1; - return 1; -} - -__setup("noreplacement", noreplacement_setup); -__setup("smp-alt-boot", bootonly); -__setup("debug-alternative", debug_alt); - -#define DPRINTK(fmt, args...) if (debug_alternative) \ - printk(KERN_DEBUG fmt, args) - -#ifdef GENERIC_NOP1 /* Use inline assembly to define this because the nops are defined as inline assembly strings in the include files and we cannot get them easily into strings. */ asm("\t.data\nintelnops: " GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 GENERIC_NOP7 GENERIC_NOP8); -extern unsigned char intelnops[]; +asm("\t.data\nk8nops: " + K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 + K8_NOP7 K8_NOP8); +asm("\t.data\nk7nops: " + K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 + K7_NOP7 K7_NOP8); + +extern unsigned char intelnops[], k8nops[], k7nops[]; static unsigned char *intel_nops[ASM_NOP_MAX+1] = { NULL, intelnops, @@ -54,13 +36,6 @@ static unsigned char *intel_nops[ASM_NOP_MAX+1] = { intelnops + 1 + 2 + 3 + 4 + 5 + 6, intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7, }; -#endif - -#ifdef K8_NOP1 -asm("\t.data\nk8nops: " - K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 - K8_NOP7 K8_NOP8); -extern unsigned char k8nops[]; static unsigned char *k8_nops[ASM_NOP_MAX+1] = { NULL, k8nops, @@ -72,13 +47,6 @@ static unsigned char *k8_nops[ASM_NOP_MAX+1] = { k8nops + 1 + 2 + 3 + 4 + 5 + 6, k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, }; -#endif - -#ifdef K7_NOP1 -asm("\t.data\nk7nops: " - K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 - K7_NOP7 K7_NOP8); -extern unsigned char k7nops[]; static unsigned char *k7_nops[ASM_NOP_MAX+1] = { NULL, k7nops, @@ -90,18 +58,6 @@ static unsigned char *k7_nops[ASM_NOP_MAX+1] = { k7nops + 1 + 2 + 3 + 4 + 5 + 6, k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, }; -#endif - -#ifdef CONFIG_X86_64 - -extern char __vsyscall_0; -static inline unsigned char** find_nop_table(void) -{ - return k8_nops; -} - -#else /* CONFIG_X86_64 */ - static struct nop { int cpuid; unsigned char **noptable; @@ -111,6 +67,14 @@ static struct nop { { -1, NULL } }; + +extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; +extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[]; +extern u8 *__smp_locks[], *__smp_locks_end[]; + +extern u8 __smp_alt_begin[], __smp_alt_end[]; + + static unsigned char** find_nop_table(void) { unsigned char **noptable = intel_nops; @@ -125,14 +89,6 @@ static unsigned char** find_nop_table(void) return noptable; } -#endif /* CONFIG_X86_64 */ - -extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; -extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[]; -extern u8 *__smp_locks[], *__smp_locks_end[]; - -extern u8 __smp_alt_begin[], __smp_alt_end[]; - /* Replace instructions with better alternatives for this CPU type. This runs before SMP is initialized to avoid SMP problems with self modifying code. This implies that assymetric systems where @@ -143,7 +99,6 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) { unsigned char **noptable = find_nop_table(); struct alt_instr *a; - u8 *instr; int diff, i, k; DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end); @@ -151,20 +106,7 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) BUG_ON(a->replacementlen > a->instrlen); if (!boot_cpu_has(a->cpuid)) continue; - instr = a->instr; -#ifdef CONFIG_X86_64 - /* vsyscall code is not mapped yet. resolve it manually. */ - if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END) { -#ifdef CONFIG_XEN - instr = __va(instr - (u8*)VSYSCALL_START + (u8*)phys_to_machine(__pa_symbol(&__vsyscall_0))); -#else - instr = __va(instr - (u8*)VSYSCALL_START + (u8*)__pa_symbol(&__vsyscall_0)); -#endif - DPRINTK("%s: vsyscall fixup: %p => %p\n", - __FUNCTION__, a->instr, instr); - } -#endif - memcpy(instr, a->replacement, a->replacementlen); + memcpy(a->instr, a->replacement, a->replacementlen); diff = a->instrlen - a->replacementlen; /* Pad the rest with nops */ for (i = a->replacementlen; diff > 0; diff -= k, i += k) { @@ -177,7 +119,6 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) } #ifdef CONFIG_SMP - static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) { struct alt_instr *a; @@ -246,6 +187,14 @@ struct smp_alt_module { static LIST_HEAD(smp_alt_modules); static DEFINE_SPINLOCK(smp_alt); +static int smp_alt_once = 0; +static int __init bootonly(char *str) +{ + smp_alt_once = 1; + return 1; +} +__setup("smp-alt-boot", bootonly); + void alternatives_smp_module_add(struct module *mod, char *name, void *locks, void *locks_end, void *text, void *text_end) @@ -253,9 +202,6 @@ void alternatives_smp_module_add(struct module *mod, char *name, struct smp_alt_module *smp; unsigned long flags; - if (no_replacement) - return; - if (smp_alt_once) { if (boot_cpu_has(X86_FEATURE_UP)) alternatives_smp_unlock(locks, locks_end, @@ -290,7 +236,7 @@ void alternatives_smp_module_del(struct module *mod) struct smp_alt_module *item; unsigned long flags; - if (no_replacement || smp_alt_once) + if (smp_alt_once) return; spin_lock_irqsave(&smp_alt, flags); @@ -311,17 +257,7 @@ void alternatives_smp_switch(int smp) struct smp_alt_module *mod; unsigned long flags; -#ifdef CONFIG_LOCKDEP - /* - * A not yet fixed binutils section handling bug prevents - * alternatives-replacement from working reliably, so turn - * it off: - */ - printk("lockdep: not fixing up alternatives.\n"); - return; -#endif - - if (no_replacement || smp_alt_once) + if (smp_alt_once) return; BUG_ON(!smp && (num_online_cpus() > 1)); @@ -347,23 +283,15 @@ void alternatives_smp_switch(int smp) } spin_unlock_irqrestore(&smp_alt, flags); } - #endif + void __init alternative_instructions(void) { - unsigned long flags; - if (no_replacement) { - printk(KERN_INFO "(SMP-)alternatives turned off\n"); - free_init_pages("SMP alternatives", - (unsigned long)__smp_alt_begin, - (unsigned long)__smp_alt_end); - return; - } - - local_irq_save(flags); apply_alternatives(__alt_instructions, __alt_instructions_end); +#ifdef CONFIG_SMP + /* switch to patch-once-at-boottime-only mode and free the * tables in case we know the number of CPUs will never ever * change */ @@ -374,7 +302,6 @@ void __init alternative_instructions(void) smp_alt_once = 1; #endif -#ifdef CONFIG_SMP if (smp_alt_once) { if (1 == num_possible_cpus()) { printk(KERN_INFO "SMP alternatives: switching to UP code\n"); @@ -397,5 +324,4 @@ void __init alternative_instructions(void) alternatives_smp_switch(0); } #endif - local_irq_restore(flags); } diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 8c844d078..3d4b2f3d1 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -14,6 +14,7 @@ * Mikael Pettersson : PM converted to driver model. */ +#include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include @@ -62,7 +62,7 @@ int apic_verbosity; static void apic_pm_activate(void); -static int modern_apic(void) +int modern_apic(void) { unsigned int lvr, version; /* AMD systems use old APIC versions, so check the CPU */ @@ -113,7 +113,7 @@ void __init apic_intr_init(void) } /* Using APIC to generate smp_local_timer_interrupt? */ -int using_apic_timer __read_mostly = 0; +int using_apic_timer = 0; static int enabled_via_apicbase; @@ -156,7 +156,7 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); /* - * Masking an LVT entry can trigger a local APIC error + * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. */ if (maxlvt >= 3) { @@ -1117,18 +1117,7 @@ void disable_APIC_timer(void) unsigned long v; v = apic_read(APIC_LVTT); - /* - * When an illegal vector value (0-15) is written to an LVT - * entry and delivery mode is Fixed, the APIC may signal an - * illegal vector error, with out regard to whether the mask - * bit is set or whether an interrupt is actually seen on input. - * - * Boot sequence might call this function when the LVTT has - * '0' vector value. So make sure vector field is set to - * valid value. - */ - v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); - apic_write_around(APIC_LVTT, v); + apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); } } diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index e7f943fcc..df0e1745f 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -201,6 +201,7 @@ * http://www.microsoft.com/hwdev/busbios/amp_12.htm] */ +#include #include #include @@ -373,14 +374,14 @@ static struct { unsigned short segment; } apm_bios_entry; static int clock_slowed; -static int idle_threshold __read_mostly = DEFAULT_IDLE_THRESHOLD; -static int idle_period __read_mostly = DEFAULT_IDLE_PERIOD; +static int idle_threshold = DEFAULT_IDLE_THRESHOLD; +static int idle_period = DEFAULT_IDLE_PERIOD; static int set_pm_idle; static int suspends_pending; static int standbys_pending; static int ignore_sys_suspend; static int ignore_normal_resume; -static int bounce_interval __read_mostly = DEFAULT_BOUNCE_INTERVAL; +static int bounce_interval = DEFAULT_BOUNCE_INTERVAL; #ifdef CONFIG_APM_RTC_IS_GMT # define clock_cmos_diff 0 @@ -389,8 +390,8 @@ static int bounce_interval __read_mostly = DEFAULT_BOUNCE_INTERVAL; static long clock_cmos_diff; static int got_clock_diff; #endif -static int debug __read_mostly; -static int smp __read_mostly; +static int debug; +static int smp; static int apm_disabled = -1; #ifdef CONFIG_SMP static int power_off; @@ -402,8 +403,8 @@ static int realmode_power_off = 1; #else static int realmode_power_off; #endif -static int exit_kapmd __read_mostly; -static int kapmd_running __read_mostly; +static int exit_kapmd; +static int kapmd_running; #ifdef CONFIG_APM_ALLOW_INTS static int allow_ints = 1; #else @@ -415,15 +416,15 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); static struct apm_user * user_list; static DEFINE_SPINLOCK(user_list_lock); -static const struct desc_struct bad_bios_desc = { 0, 0x00409200 }; +static struct desc_struct bad_bios_desc = { 0, 0x00409200 }; -static const char driver_version[] = "1.16ac"; /* no spaces */ +static char driver_version[] = "1.16ac"; /* no spaces */ /* * APM event names taken from the APM 1.2 specification. These are * the message codes that the BIOS uses to tell us about events */ -static const char * const apm_event_name[] = { +static char * apm_event_name[] = { "system standby", "system suspend", "normal resume", @@ -539,22 +540,11 @@ static inline void apm_restore_cpus(cpumask_t mask) * Also, we KNOW that for the non error case of apm_bios_call, there * is no useful data returned in the low order 8 bits of eax. */ -#define APM_DO_CLI \ - do { \ - if (apm_info.allow_ints) { \ - if (irqs_disabled_flags(flags)) \ - local_irq_enable(); \ - } else \ - local_irq_disable(); \ - } while (0) - -#define APM_DO_STI \ - do { \ - if (irqs_disabled_flags(flags)) \ - local_irq_disable(); \ - else if (irqs_disabled()) \ - local_irq_enable(); \ - } while (0) +#define APM_DO_CLI \ + if (apm_info.allow_ints) \ + local_irq_enable(); \ + else \ + local_irq_disable(); #ifdef APM_ZERO_SEGS # define APM_DECL_SEGS \ @@ -611,7 +601,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in, APM_DO_SAVE_SEGS; apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; - APM_DO_STI; + local_irq_restore(flags); gdt[0x40 / 8] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); @@ -626,7 +616,7 @@ static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in, * @ecx_in: ECX register value for BIOS call * @eax: EAX register on return from the BIOS call * - * Make a BIOS call that returns one value only, or just status. + * Make a BIOS call that does only returns one value, or just status. * If there is an error, then the error code is returned in AH * (bits 8-15 of eax) and this function returns non-zero. This is * used for simpler BIOS operations. This call may hold interrupts @@ -655,7 +645,7 @@ static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax) APM_DO_SAVE_SEGS; error = apm_bios_call_simple_asm(func, ebx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; - APM_DO_STI; + local_irq_restore(flags); gdt[0x40 / 8] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); @@ -774,9 +764,9 @@ static int apm_do_idle(void) int idled = 0; int polling; - polling = !!(current_thread_info()->status & TS_POLLING); + polling = test_thread_flag(TIF_POLLING_NRFLAG); if (polling) { - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); } if (!need_resched()) { @@ -784,7 +774,7 @@ static int apm_do_idle(void) ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax); } if (polling) - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); if (!idled) return 0; @@ -832,7 +822,7 @@ static void apm_do_busy(void) #define IDLE_CALC_LIMIT (HZ * 100) #define IDLE_LEAKY_MAX 16 -static void (*original_pm_idle)(void) __read_mostly; +static void (*original_pm_idle)(void); /** * apm_cpu_idle - cpu idling for APM capable Linux @@ -1073,8 +1063,7 @@ static int apm_engage_power_management(u_short device, int enable) static int apm_console_blank(int blank) { - int error = APM_NOT_ENGAGED; /* silence gcc */ - int i; + int error, i; u_short state; static const u_short dev[3] = { 0x100, 0x1FF, 0x101 }; @@ -1115,8 +1104,7 @@ static int queue_empty(struct apm_user *as) static apm_event_t get_queued_event(struct apm_user *as) { - if (++as->event_tail >= APM_MAX_EVENTS) - as->event_tail = 0; + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; return as->events[as->event_tail]; } @@ -1130,16 +1118,13 @@ static void queue_event(apm_event_t event, struct apm_user *sender) for (as = user_list; as != NULL; as = as->next) { if ((as == sender) || (!as->reader)) continue; - if (++as->event_head >= APM_MAX_EVENTS) - as->event_head = 0; - + as->event_head = (as->event_head + 1) % APM_MAX_EVENTS; if (as->event_head == as->event_tail) { static int notified; if (notified++ == 0) printk(KERN_ERR "apm: an event queue overflowed\n"); - if (++as->event_tail >= APM_MAX_EVENTS) - as->event_tail = 0; + as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; } as->events[as->event_head] = event; if ((!as->suser) || (!as->writer)) @@ -1297,7 +1282,7 @@ static void standby(void) static apm_event_t get_event(void) { int error; - apm_event_t event = APM_NO_EVENTS; /* silence gcc */ + apm_event_t event; apm_eventinfo_t info; static int notified; diff --git a/arch/i386/kernel/asm-offsets.c b/arch/i386/kernel/asm-offsets.c index 8eda1abcd..c6b52aa8d 100644 --- a/arch/i386/kernel/asm-offsets.c +++ b/arch/i386/kernel/asm-offsets.c @@ -4,7 +4,6 @@ * to extract and format the required data. */ -#include #include #include #include @@ -76,7 +75,4 @@ void foo(void) #endif DEFINE(PAGE_SIZE_asm, PAGE_SIZE); - DEFINE(VDSO_PRELINK, VDSO_PRELINK); - - OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx); } diff --git a/arch/i386/kernel/bootflag.c b/arch/i386/kernel/bootflag.c index 0b9860530..4c30ed01f 100644 --- a/arch/i386/kernel/bootflag.c +++ b/arch/i386/kernel/bootflag.c @@ -3,6 +3,7 @@ */ +#include #include #include #include diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index e6a2d6b80..786d1a570 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c @@ -224,26 +224,22 @@ static void __init init_amd(struct cpuinfo_x86 *c) #ifdef CONFIG_X86_HT /* - * On a AMD multi core setup the lower bits of the APIC id - * distingush the cores. + * On a AMD dual core setup the lower bits of the APIC id + * distingush the cores. Assumes number of cores is a power + * of two. */ if (c->x86_max_cores > 1) { int cpu = smp_processor_id(); - unsigned bits = (cpuid_ecx(0x80000008) >> 12) & 0xf; - - if (bits == 0) { - while ((1 << bits) < c->x86_max_cores) - bits++; - } - c->cpu_core_id = c->phys_proc_id & ((1<phys_proc_id >>= bits; + unsigned bits = 0; + while ((1 << bits) < c->x86_max_cores) + bits++; + cpu_core_id[cpu] = phys_proc_id[cpu] & ((1<>= bits; printk(KERN_INFO "CPU %d(%d) -> Core %d\n", - cpu, c->x86_max_cores, c->cpu_core_id); + cpu, c->x86_max_cores, cpu_core_id[cpu]); } #endif - if (cpuid_eax(0x80000000) >= 0x80000006) - num_cache_leaves = 3; } static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size) diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 7dda85f66..ad8cc4bd2 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #ifdef CONFIG_X86_LOCAL_APIC #include #include @@ -294,7 +292,7 @@ void __cpuinit generic_identify(struct cpuinfo_x86 * c) if (c->x86 >= 0x6) c->x86_model += ((tfms >> 16) & 0xF) << 4; c->x86_mask = tfms & 15; -#ifdef CONFIG_X86_HT +#ifdef CONFIG_SMP c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0); #else c->apicid = (ebx >> 24) & 0xFF; @@ -319,7 +317,7 @@ void __cpuinit generic_identify(struct cpuinfo_x86 * c) early_intel_workaround(c); #ifdef CONFIG_X86_HT - c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; + phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; #endif } @@ -484,9 +482,11 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) { u32 eax, ebx, ecx, edx; int index_msb, core_bits; + int cpu = smp_processor_id(); cpuid(1, &eax, &ebx, &ecx, &edx); + if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) return; @@ -497,17 +497,16 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) } else if (smp_num_siblings > 1 ) { if (smp_num_siblings > NR_CPUS) { - printk(KERN_WARNING "CPU: Unsupported number of the " - "siblings %d", smp_num_siblings); + printk(KERN_WARNING "CPU: Unsupported number of the siblings %d", smp_num_siblings); smp_num_siblings = 1; return; } index_msb = get_count_order(smp_num_siblings); - c->phys_proc_id = phys_pkg_id((ebx >> 24) & 0xFF, index_msb); + phys_proc_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb); printk(KERN_INFO "CPU: Physical Processor ID: %d\n", - c->phys_proc_id); + phys_proc_id[cpu]); smp_num_siblings = smp_num_siblings / c->x86_max_cores; @@ -515,12 +514,12 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) core_bits = get_count_order(c->x86_max_cores); - c->cpu_core_id = phys_pkg_id((ebx >> 24) & 0xFF, index_msb) & + cpu_core_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb) & ((1 << core_bits) - 1); if (c->x86_max_cores > 1) printk(KERN_INFO "CPU: Processor Core ID: %d\n", - c->cpu_core_id); + cpu_core_id[cpu]); } } #endif @@ -619,12 +618,6 @@ void __cpuinit cpu_init(void) set_in_cr4(X86_CR4_TSD); } - /* The CPU hotplug case */ - if (cpu_gdt_descr->address) { - gdt = (struct desc_struct *)cpu_gdt_descr->address; - memset(gdt, 0, PAGE_SIZE); - goto old_gdt; - } /* * This is a horrible hack to allocate the GDT. The problem * is that cpu_init() is called really early for the boot CPU @@ -643,7 +636,7 @@ void __cpuinit cpu_init(void) local_irq_enable(); } } -old_gdt: + /* * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index ccc1edff5..e44a4c6a4 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig @@ -96,7 +96,6 @@ config X86_POWERNOW_K8_ACPI config X86_GX_SUSPMOD tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" - depends on PCI help This add the CPUFreq driver for NatSemi Geode processors which support suspend modulation. @@ -203,7 +202,7 @@ config X86_LONGRUN config X86_LONGHAUL tristate "VIA Cyrix III Longhaul" select CPU_FREQ_TABLE - depends on ACPI_PROCESSOR + depends on BROKEN help This adds the CPUFreq driver for VIA Samuel/CyrixIII, VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index ec0c5c24a..97ddb54fe 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -24,6 +24,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include #include #include #include @@ -47,13 +48,12 @@ MODULE_LICENSE("GPL"); struct cpufreq_acpi_io { - struct acpi_processor_performance *acpi_data; + struct acpi_processor_performance acpi_data; struct cpufreq_frequency_table *freq_table; unsigned int resume; }; static struct cpufreq_acpi_io *acpi_io_data[NR_CPUS]; -static struct acpi_processor_performance *acpi_perf_data[NR_CPUS]; static struct cpufreq_driver acpi_cpufreq_driver; @@ -104,43 +104,64 @@ acpi_processor_set_performance ( { u16 port = 0; u8 bit_width = 0; - int i = 0; int ret = 0; u32 value = 0; + int i = 0; + struct cpufreq_freqs cpufreq_freqs; + cpumask_t saved_mask; int retval; - struct acpi_processor_performance *perf; dprintk("acpi_processor_set_performance\n"); - retval = 0; - perf = data->acpi_data; - if (state == perf->state) { + /* + * TBD: Use something other than set_cpus_allowed. + * As set_cpus_allowed is a bit racy, + * with any other set_cpus_allowed for this process. + */ + saved_mask = current->cpus_allowed; + set_cpus_allowed(current, cpumask_of_cpu(cpu)); + if (smp_processor_id() != cpu) { + return (-EAGAIN); + } + + if (state == data->acpi_data.state) { if (unlikely(data->resume)) { dprintk("Called after resume, resetting to P%d\n", state); data->resume = 0; } else { dprintk("Already at target state (P%d)\n", state); - return (retval); + retval = 0; + goto migrate_end; } } - dprintk("Transitioning from P%d to P%d\n", perf->state, state); + dprintk("Transitioning from P%d to P%d\n", + data->acpi_data.state, state); + + /* cpufreq frequency struct */ + cpufreq_freqs.cpu = cpu; + cpufreq_freqs.old = data->freq_table[data->acpi_data.state].frequency; + cpufreq_freqs.new = data->freq_table[state].frequency; + + /* notify cpufreq */ + cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE); /* * First we write the target state's 'control' value to the * control_register. */ - port = perf->control_register.address; - bit_width = perf->control_register.bit_width; - value = (u32) perf->states[state].control; + port = data->acpi_data.control_register.address; + bit_width = data->acpi_data.control_register.bit_width; + value = (u32) data->acpi_data.states[state].control; dprintk("Writing 0x%08x to port 0x%04x\n", value, port); ret = acpi_processor_write_port(port, bit_width, value); if (ret) { dprintk("Invalid port width 0x%04x\n", bit_width); - return (ret); + retval = ret; + goto migrate_end; } /* @@ -156,35 +177,49 @@ acpi_processor_set_performance ( * before giving up. */ - port = perf->status_register.address; - bit_width = perf->status_register.bit_width; + port = data->acpi_data.status_register.address; + bit_width = data->acpi_data.status_register.bit_width; dprintk("Looking for 0x%08x from port 0x%04x\n", - (u32) perf->states[state].status, port); + (u32) data->acpi_data.states[state].status, port); - for (i = 0; i < 100; i++) { + for (i=0; i<100; i++) { ret = acpi_processor_read_port(port, bit_width, &value); if (ret) { dprintk("Invalid port width 0x%04x\n", bit_width); - return (ret); + retval = ret; + goto migrate_end; } - if (value == (u32) perf->states[state].status) + if (value == (u32) data->acpi_data.states[state].status) break; udelay(10); } } else { - value = (u32) perf->states[state].status; + i = 0; + value = (u32) data->acpi_data.states[state].status; } - if (unlikely(value != (u32) perf->states[state].status)) { + /* notify cpufreq */ + cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE); + + if (unlikely(value != (u32) data->acpi_data.states[state].status)) { + unsigned int tmp = cpufreq_freqs.new; + cpufreq_freqs.new = cpufreq_freqs.old; + cpufreq_freqs.old = tmp; + cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_PRECHANGE); + cpufreq_notify_transition(&cpufreq_freqs, CPUFREQ_POSTCHANGE); printk(KERN_WARNING "acpi-cpufreq: Transition failed\n"); retval = -ENODEV; - return (retval); + goto migrate_end; } dprintk("Transition successful after %d microseconds\n", i * 10); - perf->state = state; + data->acpi_data.state = state; + + retval = 0; +migrate_end: + set_cpus_allowed(current, saved_mask); return (retval); } @@ -196,17 +231,8 @@ acpi_cpufreq_target ( unsigned int relation) { struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu]; - struct acpi_processor_performance *perf; - struct cpufreq_freqs freqs; - cpumask_t online_policy_cpus; - cpumask_t saved_mask; - cpumask_t set_mask; - cpumask_t covered_cpus; - unsigned int cur_state = 0; unsigned int next_state = 0; unsigned int result = 0; - unsigned int j; - unsigned int tmp; dprintk("acpi_cpufreq_setpolicy\n"); @@ -215,95 +241,11 @@ acpi_cpufreq_target ( target_freq, relation, &next_state); - if (unlikely(result)) + if (result) return (result); - perf = data->acpi_data; - cur_state = perf->state; - freqs.old = data->freq_table[cur_state].frequency; - freqs.new = data->freq_table[next_state].frequency; - -#ifdef CONFIG_HOTPLUG_CPU - /* cpufreq holds the hotplug lock, so we are safe from here on */ - cpus_and(online_policy_cpus, cpu_online_map, policy->cpus); -#else - online_policy_cpus = policy->cpus; -#endif - - for_each_cpu_mask(j, online_policy_cpus) { - freqs.cpu = j; - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - } - - /* - * We need to call driver->target() on all or any CPU in - * policy->cpus, depending on policy->shared_type. - */ - saved_mask = current->cpus_allowed; - cpus_clear(covered_cpus); - for_each_cpu_mask(j, online_policy_cpus) { - /* - * Support for SMP systems. - * Make sure we are running on CPU that wants to change freq - */ - cpus_clear(set_mask); - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - cpus_or(set_mask, set_mask, online_policy_cpus); - else - cpu_set(j, set_mask); - - set_cpus_allowed(current, set_mask); - if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { - dprintk("couldn't limit to CPUs in this domain\n"); - result = -EAGAIN; - break; - } - - result = acpi_processor_set_performance (data, j, next_state); - if (result) { - result = -EAGAIN; - break; - } - - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - break; - - cpu_set(j, covered_cpus); - } - - for_each_cpu_mask(j, online_policy_cpus) { - freqs.cpu = j; - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } - - if (unlikely(result)) { - /* - * We have failed halfway through the frequency change. - * We have sent callbacks to online_policy_cpus and - * acpi_processor_set_performance() has been called on - * coverd_cpus. Best effort undo.. - */ + result = acpi_processor_set_performance (data, policy->cpu, next_state); - if (!cpus_empty(covered_cpus)) { - for_each_cpu_mask(j, covered_cpus) { - policy->cpu = j; - acpi_processor_set_performance (data, - j, - cur_state); - } - } - - tmp = freqs.new; - freqs.new = freqs.old; - freqs.old = tmp; - for_each_cpu_mask(j, online_policy_cpus) { - freqs.cpu = j; - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } - } - - set_cpus_allowed(current, saved_mask); return (result); } @@ -329,64 +271,30 @@ acpi_cpufreq_guess_freq ( struct cpufreq_acpi_io *data, unsigned int cpu) { - struct acpi_processor_performance *perf = data->acpi_data; - if (cpu_khz) { /* search the closest match to cpu_khz */ unsigned int i; unsigned long freq; - unsigned long freqn = perf->states[0].core_frequency * 1000; + unsigned long freqn = data->acpi_data.states[0].core_frequency * 1000; - for (i = 0; i < (perf->state_count - 1); i++) { + for (i=0; i < (data->acpi_data.state_count - 1); i++) { freq = freqn; - freqn = perf->states[i+1].core_frequency * 1000; + freqn = data->acpi_data.states[i+1].core_frequency * 1000; if ((2 * cpu_khz) > (freqn + freq)) { - perf->state = i; + data->acpi_data.state = i; return (freq); } } - perf->state = perf->state_count - 1; + data->acpi_data.state = data->acpi_data.state_count - 1; return (freqn); - } else { + } else /* assume CPU is at P0... */ - perf->state = 0; - return perf->states[0].core_frequency * 1000; - } + data->acpi_data.state = 0; + return data->acpi_data.states[0].core_frequency * 1000; + } -/* - * acpi_cpufreq_early_init - initialize ACPI P-States library - * - * Initialize the ACPI P-States library (drivers/acpi/processor_perflib.c) - * in order to determine correct frequency and voltage pairings. We can - * do _PDC and _PSD and find out the processor dependency for the - * actual init that will happen later... - */ -static int acpi_cpufreq_early_init_acpi(void) -{ - struct acpi_processor_performance *data; - unsigned int i, j; - - dprintk("acpi_cpufreq_early_init\n"); - - for_each_possible_cpu(i) { - data = kzalloc(sizeof(struct acpi_processor_performance), - GFP_KERNEL); - if (!data) { - for_each_possible_cpu(j) { - kfree(acpi_perf_data[j]); - acpi_perf_data[j] = NULL; - } - return (-ENOMEM); - } - acpi_perf_data[i] = data; - } - - /* Do initialization in ACPI core */ - return acpi_processor_preregister_performance(acpi_perf_data); -} - static int acpi_cpufreq_cpu_init ( struct cpufreq_policy *policy) @@ -396,57 +304,41 @@ acpi_cpufreq_cpu_init ( struct cpufreq_acpi_io *data; unsigned int result = 0; struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; - struct acpi_processor_performance *perf; dprintk("acpi_cpufreq_cpu_init\n"); - if (!acpi_perf_data[cpu]) - return (-ENODEV); - data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); if (!data) return (-ENOMEM); - data->acpi_data = acpi_perf_data[cpu]; acpi_io_data[cpu] = data; - result = acpi_processor_register_performance(data->acpi_data, cpu); + result = acpi_processor_register_performance(&data->acpi_data, cpu); if (result) goto err_free; - perf = data->acpi_data; - policy->shared_type = perf->shared_type; - /* - * Will let policy->cpus know about dependency only when software - * coordination is required. - */ - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || - policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - policy->cpus = perf->shared_cpu_map; - if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; } /* capability check */ - if (perf->state_count <= 1) { + if (data->acpi_data.state_count <= 1) { dprintk("No P-States\n"); result = -ENODEV; goto err_unreg; } - - if ((perf->control_register.space_id != ACPI_ADR_SPACE_SYSTEM_IO) || - (perf->status_register.space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { + if ((data->acpi_data.control_register.space_id != ACPI_ADR_SPACE_SYSTEM_IO) || + (data->acpi_data.status_register.space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { dprintk("Unsupported address space [%d, %d]\n", - (u32) (perf->control_register.space_id), - (u32) (perf->status_register.space_id)); + (u32) (data->acpi_data.control_register.space_id), + (u32) (data->acpi_data.status_register.space_id)); result = -ENODEV; goto err_unreg; } /* alloc freq_table */ - data->freq_table = kmalloc(sizeof(struct cpufreq_frequency_table) * (perf->state_count + 1), GFP_KERNEL); + data->freq_table = kmalloc(sizeof(struct cpufreq_frequency_table) * (data->acpi_data.state_count + 1), GFP_KERNEL); if (!data->freq_table) { result = -ENOMEM; goto err_unreg; @@ -454,9 +346,9 @@ acpi_cpufreq_cpu_init ( /* detect transition latency */ policy->cpuinfo.transition_latency = 0; - for (i=0; istate_count; i++) { - if ((perf->states[i].transition_latency * 1000) > policy->cpuinfo.transition_latency) - policy->cpuinfo.transition_latency = perf->states[i].transition_latency * 1000; + for (i=0; iacpi_data.state_count; i++) { + if ((data->acpi_data.states[i].transition_latency * 1000) > policy->cpuinfo.transition_latency) + policy->cpuinfo.transition_latency = data->acpi_data.states[i].transition_latency * 1000; } policy->governor = CPUFREQ_DEFAULT_GOVERNOR; @@ -464,11 +356,11 @@ acpi_cpufreq_cpu_init ( policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); /* table init */ - for (i=0; i<=perf->state_count; i++) + for (i=0; i<=data->acpi_data.state_count; i++) { data->freq_table[i].index = i; - if (istate_count) - data->freq_table[i].frequency = perf->states[i].core_frequency * 1000; + if (iacpi_data.state_count) + data->freq_table[i].frequency = data->acpi_data.states[i].core_frequency * 1000; else data->freq_table[i].frequency = CPUFREQ_TABLE_END; } @@ -483,12 +375,12 @@ acpi_cpufreq_cpu_init ( printk(KERN_INFO "acpi-cpufreq: CPU%u - ACPI performance management activated.\n", cpu); - for (i = 0; i < perf->state_count; i++) + for (i = 0; i < data->acpi_data.state_count; i++) dprintk(" %cP%d: %d MHz, %d mW, %d uS\n", - (i == perf->state?'*':' '), i, - (u32) perf->states[i].core_frequency, - (u32) perf->states[i].power, - (u32) perf->states[i].transition_latency); + (i == data->acpi_data.state?'*':' '), i, + (u32) data->acpi_data.states[i].core_frequency, + (u32) data->acpi_data.states[i].power, + (u32) data->acpi_data.states[i].transition_latency); cpufreq_frequency_table_get_attr(data->freq_table, policy->cpu); @@ -503,7 +395,7 @@ acpi_cpufreq_cpu_init ( err_freqfree: kfree(data->freq_table); err_unreg: - acpi_processor_unregister_performance(perf, cpu); + acpi_processor_unregister_performance(&data->acpi_data, cpu); err_free: kfree(data); acpi_io_data[cpu] = NULL; @@ -524,7 +416,7 @@ acpi_cpufreq_cpu_exit ( if (data) { cpufreq_frequency_table_put_attr(policy->cpu); acpi_io_data[policy->cpu] = NULL; - acpi_processor_unregister_performance(data->acpi_data, policy->cpu); + acpi_processor_unregister_performance(&data->acpi_data, policy->cpu); kfree(data); } @@ -552,40 +444,38 @@ static struct freq_attr* acpi_cpufreq_attr[] = { }; static struct cpufreq_driver acpi_cpufreq_driver = { - .verify = acpi_cpufreq_verify, - .target = acpi_cpufreq_target, - .init = acpi_cpufreq_cpu_init, - .exit = acpi_cpufreq_cpu_exit, - .resume = acpi_cpufreq_resume, - .name = "acpi-cpufreq", - .owner = THIS_MODULE, - .attr = acpi_cpufreq_attr, + .verify = acpi_cpufreq_verify, + .target = acpi_cpufreq_target, + .init = acpi_cpufreq_cpu_init, + .exit = acpi_cpufreq_cpu_exit, + .resume = acpi_cpufreq_resume, + .name = "acpi-cpufreq", + .owner = THIS_MODULE, + .attr = acpi_cpufreq_attr, + .flags = CPUFREQ_STICKY, }; static int __init acpi_cpufreq_init (void) { - dprintk("acpi_cpufreq_init\n"); + int result = 0; - acpi_cpufreq_early_init_acpi(); + dprintk("acpi_cpufreq_init\n"); - return cpufreq_register_driver(&acpi_cpufreq_driver); + result = cpufreq_register_driver(&acpi_cpufreq_driver); + + return (result); } static void __exit acpi_cpufreq_exit (void) { - unsigned int i; dprintk("acpi_cpufreq_exit\n"); cpufreq_unregister_driver(&acpi_cpufreq_driver); - for_each_possible_cpu(i) { - kfree(acpi_perf_data[i]); - acpi_perf_data[i] = NULL; - } return; } diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c index 0d49d73d1..f275e0d4a 100644 --- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c @@ -1,5 +1,5 @@ /* - * (C) 2004-2006 Sebastian Witt + * (C) 2004 Sebastian Witt * * Licensed under the terms of the GNU GPL License version 2. * Based upon reverse engineered information @@ -90,7 +90,7 @@ static int nforce2_calc_pll(unsigned int fsb) /* Try to calculate multiplier and divider up to 4 times */ while (((mul == 0) || (div == 0)) && (tried <= 3)) { - for (xdiv = 2; xdiv <= 0x80; xdiv++) + for (xdiv = 1; xdiv <= 0x80; xdiv++) for (xmul = 1; xmul <= 0xfe; xmul++) if (nforce2_calc_fsb(NFORCE2_PLL(xmul, xdiv)) == fsb + tried) { @@ -117,7 +117,8 @@ static void nforce2_write_pll(int pll) int temp; /* Set the pll addr. to 0x00 */ - pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLADR, 0); + temp = 0x00; + pci_write_config_dword(nforce2_chipset_dev, NFORCE2_PLLADR, temp); /* Now write the value in all 64 registers */ for (temp = 0; temp <= 0x3f; temp++) @@ -265,7 +266,7 @@ static int nforce2_target(struct cpufreq_policy *policy, if (freqs.old == freqs.new) return 0; - dprintk("Old CPU frequency %d kHz, new %d kHz\n", + dprintk(KERN_INFO "cpufreq: Old CPU frequency %d kHz, new %d kHz\n", freqs.old, freqs.new); cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); @@ -277,7 +278,7 @@ static int nforce2_target(struct cpufreq_policy *policy, printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n", target_fsb); else - dprintk("Changed FSB successfully to %d\n", + dprintk(KERN_INFO "cpufreq: Changed FSB successfully to %d\n", target_fsb); /* Enable IRQs */ diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 4f2c3aeef..8ef385444 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c @@ -29,13 +29,11 @@ #include #include #include +#include #include #include #include -#include -#include -#include #include "longhaul.h" @@ -58,8 +56,6 @@ static int minvid, maxvid; static unsigned int minmult, maxmult; static int can_scale_voltage; static int vrmrev; -static struct acpi_processor *pr = NULL; -static struct acpi_processor_cx *cx = NULL; /* Module parameters */ static int dont_scale_voltage; @@ -81,17 +77,13 @@ static char speedbuffer[8]; static char *print_speed(int speed) { - if (speed < 1000) { - snprintf(speedbuffer, sizeof(speedbuffer),"%dMHz", speed); - return speedbuffer; - } - - if (speed%1000 == 0) - snprintf(speedbuffer, sizeof(speedbuffer), - "%dGHz", speed/1000); - else - snprintf(speedbuffer, sizeof(speedbuffer), - "%d.%dGHz", speed/1000, (speed%1000)/100); + if (speed > 1000) { + if (speed%1000 == 0) + sprintf (speedbuffer, "%dGHz", speed/1000); + else + sprintf (speedbuffer, "%d.%dGHz", speed/1000, (speed%1000)/100); + } else + sprintf (speedbuffer, "%dMHz", speed); return speedbuffer; } @@ -122,65 +114,84 @@ static int longhaul_get_cpu_mult(void) return eblcr_table[invalue]; } -/* For processor with BCR2 MSR */ -static void do_longhaul1(int cx_address, unsigned int clock_ratio_index) +static void do_powersaver(union msr_longhaul *longhaul, + unsigned int clock_ratio_index) { - union msr_bcr2 bcr2; - u32 t; + struct pci_dev *dev; + unsigned long flags; + unsigned int tmp_mask; + int version; + int i; + u16 pci_cmd; + u16 cmd_state[64]; - rdmsrl(MSR_VIA_BCR2, bcr2.val); - /* Enable software clock multiplier */ - bcr2.bits.ESOFTBF = 1; - bcr2.bits.CLOCKMUL = clock_ratio_index; + switch (cpu_model) { + case CPU_EZRA_T: + version = 3; + break; + case CPU_NEHEMIAH: + version = 0xf; + break; + default: + return; + } - /* Sync to timer tick */ - safe_halt(); - ACPI_FLUSH_CPU_CACHE(); - /* Change frequency on next halt or sleep */ - wrmsrl(MSR_VIA_BCR2, bcr2.val); - /* Invoke C3 */ - inb(cx_address); - /* Dummy op - must do something useless after P_LVL3 read */ - t = inl(acpi_fadt.xpm_tmr_blk.address); - - /* Disable software clock multiplier */ - local_irq_disable(); - rdmsrl(MSR_VIA_BCR2, bcr2.val); - bcr2.bits.ESOFTBF = 0; - wrmsrl(MSR_VIA_BCR2, bcr2.val); -} + rdmsrl(MSR_VIA_LONGHAUL, longhaul->val); + longhaul->bits.SoftBusRatio = clock_ratio_index & 0xf; + longhaul->bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; + longhaul->bits.EnableSoftBusRatio = 1; + longhaul->bits.RevisionKey = 0; -/* For processor with Longhaul MSR */ + preempt_disable(); + local_irq_save(flags); -static void do_powersaver(int cx_address, unsigned int clock_ratio_index) -{ - union msr_longhaul longhaul; - u32 t; + /* + * get current pci bus master state for all devices + * and clear bus master bit + */ + dev = NULL; + i = 0; + do { + dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev); + if (dev != NULL) { + pci_read_config_word(dev, PCI_COMMAND, &pci_cmd); + cmd_state[i++] = pci_cmd; + pci_cmd &= ~PCI_COMMAND_MASTER; + pci_write_config_word(dev, PCI_COMMAND, pci_cmd); + } + } while (dev != NULL); - rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); - longhaul.bits.RevisionKey = longhaul.bits.RevisionID; - longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf; - longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; - longhaul.bits.EnableSoftBusRatio = 1; + tmp_mask=inb(0x21); /* works on C3. save mask. */ + outb(0xFE,0x21); /* TMR0 only */ + outb(0xFF,0x80); /* delay */ - /* Sync to timer tick */ safe_halt(); - ACPI_FLUSH_CPU_CACHE(); - /* Change frequency on next halt or sleep */ - wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); - /* Invoke C3 */ - inb(cx_address); - /* Dummy op - must do something useless after P_LVL3 read */ - t = inl(acpi_fadt.xpm_tmr_blk.address); - - /* Disable bus ratio bit */ + wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); + halt(); + local_irq_disable(); - longhaul.bits.RevisionKey = longhaul.bits.RevisionID; - longhaul.bits.EnableSoftBusRatio = 0; - longhaul.bits.EnableSoftBSEL = 0; - longhaul.bits.EnableSoftVID = 0; - wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); + + outb(tmp_mask,0x21); /* restore mask */ + + /* restore pci bus master state for all devices */ + dev = NULL; + i = 0; + do { + dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev); + if (dev != NULL) { + pci_cmd = cmd_state[i++]; + pci_write_config_byte(dev, PCI_COMMAND, pci_cmd); + } + } while (dev != NULL); + local_irq_restore(flags); + preempt_enable(); + + /* disable bus ratio bit */ + rdmsrl(MSR_VIA_LONGHAUL, longhaul->val); + longhaul->bits.EnableSoftBusRatio = 0; + longhaul->bits.RevisionKey = version; + wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); } /** @@ -194,9 +205,9 @@ static void longhaul_setstate(unsigned int clock_ratio_index) { int speed, mult; struct cpufreq_freqs freqs; + union msr_longhaul longhaul; + union msr_bcr2 bcr2; static unsigned int old_ratio=-1; - unsigned long flags; - unsigned int pic1_mask, pic2_mask; if (old_ratio == clock_ratio_index) return; @@ -219,20 +230,6 @@ static void longhaul_setstate(unsigned int clock_ratio_index) dprintk ("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n", fsb, mult/10, mult%10, print_speed(speed/1000)); - preempt_disable(); - local_irq_save(flags); - - pic2_mask = inb(0xA1); - pic1_mask = inb(0x21); /* works on C3. save mask. */ - outb(0xFF,0xA1); /* Overkill */ - outb(0xFE,0x21); /* TMR0 only */ - - /* Disable bus master arbitration */ - if (pr->flags.bm_check) { - acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, - ACPI_MTX_DO_NOT_LOCK); - } - switch (longhaul_version) { /* @@ -244,7 +241,20 @@ static void longhaul_setstate(unsigned int clock_ratio_index) */ case TYPE_LONGHAUL_V1: case TYPE_LONGHAUL_V2: - do_longhaul1(cx->address, clock_ratio_index); + rdmsrl (MSR_VIA_BCR2, bcr2.val); + /* Enable software clock multiplier */ + bcr2.bits.ESOFTBF = 1; + bcr2.bits.CLOCKMUL = clock_ratio_index; + local_irq_disable(); + wrmsrl (MSR_VIA_BCR2, bcr2.val); + safe_halt(); + + /* Disable software clock multiplier */ + rdmsrl (MSR_VIA_BCR2, bcr2.val); + bcr2.bits.ESOFTBF = 0; + local_irq_disable(); + wrmsrl (MSR_VIA_BCR2, bcr2.val); + local_irq_enable(); break; /* @@ -259,22 +269,10 @@ static void longhaul_setstate(unsigned int clock_ratio_index) * to work in practice. */ case TYPE_POWERSAVER: - do_powersaver(cx->address, clock_ratio_index); + do_powersaver(&longhaul, clock_ratio_index); break; } - /* Enable bus master arbitration */ - if (pr->flags.bm_check) { - acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, - ACPI_MTX_DO_NOT_LOCK); - } - - outb(pic2_mask,0xA1); /* restore mask */ - outb(pic1_mask,0x21); - - local_irq_restore(flags); - preempt_enable(); - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } @@ -322,11 +320,9 @@ static int guess_fsb(void) static int __init longhaul_get_ranges(void) { unsigned long invalue; - unsigned int ezra_t_multipliers[32]= { - 90, 30, 40, 100, 55, 35, 45, 95, - 50, 70, 80, 60, 120, 75, 85, 65, - -1, 110, 120, -1, 135, 115, 125, 105, - 130, 150, 160, 140, -1, 155, -1, 145 }; + unsigned int multipliers[32]= { + 50,30,40,100,55,35,45,95,90,70,80,60,120,75,85,65, + -1,110,120,-1,135,115,125,105,130,150,160,140,-1,155,-1,145 }; unsigned int j, k = 0; union msr_longhaul longhaul; unsigned long lo, hi; @@ -355,13 +351,13 @@ static int __init longhaul_get_ranges(void) invalue = longhaul.bits.MaxMHzBR; if (longhaul.bits.MaxMHzBR4) invalue += 16; - maxmult=ezra_t_multipliers[invalue]; + maxmult=multipliers[invalue]; invalue = longhaul.bits.MinMHzBR; if (longhaul.bits.MinMHzBR4 == 1) minmult = 30; else - minmult = ezra_t_multipliers[invalue]; + minmult = multipliers[invalue]; fsb = eblcr_fsb_table_v2[longhaul.bits.MaxMHzFSB]; break; } @@ -527,18 +523,6 @@ static unsigned int longhaul_get(unsigned int cpu) return calc_speed(longhaul_get_cpu_mult()); } -static acpi_status longhaul_walk_callback(acpi_handle obj_handle, - u32 nesting_level, - void *context, void **return_value) -{ - struct acpi_device *d; - - if ( acpi_bus_get_device(obj_handle, &d) ) { - return 0; - } - *return_value = (void *)acpi_driver_data(d); - return 1; -} static int __init longhaul_cpu_init(struct cpufreq_policy *policy) { @@ -546,15 +530,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) char *cpuname=NULL; int ret; - /* Check ACPI support for C3 state */ - acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - &longhaul_walk_callback, NULL, (void *)&pr); - if (pr == NULL) goto err_acpi; - - cx = &pr->power.states[ACPI_STATE_C3]; - if (cx->address == 0 || cx->latency > 1000) goto err_acpi; - - /* Now check what we have on this motherboard */ switch (c->x86_model) { case 6: cpu_model = CPU_SAMUEL; @@ -655,10 +630,6 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) cpufreq_frequency_table_get_attr(longhaul_table, policy->cpu); return 0; - -err_acpi: - printk(KERN_ERR PFX "No ACPI support for CPU frequency changes.\n"); - return -ENODEV; } static int __devexit longhaul_cpu_exit(struct cpufreq_policy *policy) @@ -691,18 +662,6 @@ static int __init longhaul_init(void) if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6) return -ENODEV; -#ifdef CONFIG_SMP - if (num_online_cpus() > 1) { - return -ENODEV; - printk(KERN_ERR PFX "More than 1 CPU detected, longhaul disabled.\n"); - } -#endif -#ifdef CONFIG_X86_IO_APIC - if (cpu_has_apic) { - printk(KERN_ERR PFX "APIC detected. Longhaul is currently broken in this configuration.\n"); - return -ENODEV; - } -#endif switch (c->x86_model) { case 6 ... 9: return cpufreq_register_driver(&longhaul_driver); @@ -716,7 +675,7 @@ static int __init longhaul_init(void) static void __exit longhaul_exit(void) { - int i; + int i=0; for (i=0; i < numscales; i++) { if (clock_ratio[i] == maxmult) { @@ -736,6 +695,6 @@ MODULE_AUTHOR ("Dave Jones "); MODULE_DESCRIPTION ("Longhaul driver for VIA Cyrix processors."); MODULE_LICENSE ("GPL"); -late_initcall(longhaul_init); +module_init(longhaul_init); module_exit(longhaul_exit); diff --git a/arch/i386/kernel/cpu/cpufreq/longrun.c b/arch/i386/kernel/cpu/cpufreq/longrun.c index b26895142..e3868de4d 100644 --- a/arch/i386/kernel/cpu/cpufreq/longrun.c +++ b/arch/i386/kernel/cpu/cpufreq/longrun.c @@ -223,6 +223,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, /* set to 0 to try_hi perf_pctg */ msr_lo &= 0xFFFFFF80; msr_hi &= 0xFFFFFF80; + msr_lo |= 0; msr_hi |= try_hi; wrmsr(MSR_TMTA_LONGRUN_CTRL, msr_lo, msr_hi); diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index 304d2eaa4..ab6504efd 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c index 543827609..a748409b7 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c @@ -12,6 +12,7 @@ * - We disable half multipliers if ACPI is used on A0 stepping CPUs. */ +#include #include #include #include @@ -451,23 +452,23 @@ static int powernow_decode_bios (int maxfid, int startvid) pst = (struct pst_s *) p; - for (j=0; jnumpst; j++) { + for (i = 0 ; i numpst; i++) { pst = (struct pst_s *) p; number_scales = pst->numpstates; if ((etuple == pst->cpuid) && check_fsb(pst->fsbspeed) && (maxfid==pst->maxfid) && (startvid==pst->startvid)) { - dprintk ("PST:%d (@%p)\n", j, pst); + dprintk ("PST:%d (@%p)\n", i, pst); dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n", pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); ret = get_ranges ((char *) pst + sizeof (struct pst_s)); return ret; + } else { - unsigned int k; p = (char *) pst + sizeof (struct pst_s); - for (k=0; k> did; -} - -static u32 find_khz_freq_from_fiddid(u32 fid, u32 did) +/* Return a voltage in miliVolts, given an input vid */ +static u32 find_millivolts_from_vid(struct powernow_k8_data *data, u32 vid) { - return 1000 * find_freq_from_fiddid(fid, did); -} - -static u32 find_fid_from_pstate(u32 pstate) -{ - u32 hi, lo; - rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi); - return lo & HW_PSTATE_FID_MASK; -} - -static u32 find_did_from_pstate(u32 pstate) -{ - u32 hi, lo; - rdmsr(MSR_PSTATE_DEF_BASE + pstate, lo, hi); - return (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; + return 1550-vid*25; } /* Return the vco fid for an input fid @@ -120,9 +98,6 @@ static int pending_bit_stuck(void) { u32 lo, hi; - if (cpu_family == CPU_HW_PSTATE) - return 0; - rdmsr(MSR_FIDVID_STATUS, lo, hi); return lo & MSR_S_LO_CHANGE_PENDING ? 1 : 0; } @@ -136,14 +111,6 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data) u32 lo, hi; u32 i = 0; - if (cpu_family == CPU_HW_PSTATE) { - rdmsr(MSR_PSTATE_STATUS, lo, hi); - i = lo & HW_PSTATE_MASK; - rdmsr(MSR_PSTATE_DEF_BASE + i, lo, hi); - data->currfid = lo & HW_PSTATE_FID_MASK; - data->currdid = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; - return 0; - } do { if (i++ > 10000) { dprintk("detected change pending stuck\n"); @@ -208,7 +175,7 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid) do { wrmsr(MSR_FIDVID_CTL, lo, data->plllock * PLL_LOCK_CONVERSION); if (i++ > 100) { - printk(KERN_ERR PFX "Hardware error - pending bit very stuck - no further pstate changes possible\n"); + printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n"); return 1; } } while (query_current_values_with_pending_wait(data)); @@ -288,15 +255,7 @@ static int decrease_vid_code_by_step(struct powernow_k8_data *data, u32 reqvid, return 0; } -/* Change hardware pstate by single MSR write */ -static int transition_pstate(struct powernow_k8_data *data, u32 pstate) -{ - wrmsr(MSR_PSTATE_CTRL, pstate, 0); - data->currfid = find_fid_from_pstate(pstate); - return 0; -} - -/* Change Opteron/Athlon64 fid and vid, by the 3 phases. */ +/* Change the fid and vid, by the 3 phases. */ static int transition_fid_vid(struct powernow_k8_data *data, u32 reqfid, u32 reqvid) { if (core_voltage_pre_transition(data, reqvid)) @@ -515,35 +474,26 @@ static int check_supported_cpu(unsigned int cpu) goto out; eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); - if (((eax & CPUID_XFAM) != CPUID_XFAM_K8) && - ((eax & CPUID_XFAM) < CPUID_XFAM_10H)) + if ((eax & CPUID_XFAM) != CPUID_XFAM_K8) goto out; - if ((eax & CPUID_XFAM) == CPUID_XFAM_K8) { - if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || - ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { - printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); - goto out; - } + if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || + ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { + printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); + goto out; + } - eax = cpuid_eax(CPUID_GET_MAX_CAPABILITIES); - if (eax < CPUID_FREQ_VOLT_CAPABILITIES) { - printk(KERN_INFO PFX - "No frequency change capabilities detected\n"); - goto out; - } + eax = cpuid_eax(CPUID_GET_MAX_CAPABILITIES); + if (eax < CPUID_FREQ_VOLT_CAPABILITIES) { + printk(KERN_INFO PFX + "No frequency change capabilities detected\n"); + goto out; + } - cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx); - if ((edx & P_STATE_TRANSITION_CAPABLE) != P_STATE_TRANSITION_CAPABLE) { - printk(KERN_INFO PFX "Power state transitions not supported\n"); - goto out; - } - } else { /* must be a HW Pstate capable processor */ - cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx); - if ((edx & USE_HW_PSTATE) == USE_HW_PSTATE) - cpu_family = CPU_HW_PSTATE; - else - goto out; + cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx); + if ((edx & P_STATE_TRANSITION_CAPABLE) != P_STATE_TRANSITION_CAPABLE) { + printk(KERN_INFO PFX "Power state transitions not supported\n"); + goto out; } rc = 1; @@ -597,18 +547,12 @@ static void print_basics(struct powernow_k8_data *data) { int j; for (j = 0; j < data->numps; j++) { - if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) { - if (cpu_family == CPU_HW_PSTATE) { - printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8, - (data->powernow_table[j].index & 0xff0000) >> 16, - data->powernow_table[j].frequency/1000); - } else { - printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, + if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) + printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x (%d mV)\n", j, data->powernow_table[j].index & 0xff, data->powernow_table[j].frequency/1000, - data->powernow_table[j].index >> 8); - } - } + data->powernow_table[j].index >> 8, + find_millivolts_from_vid(data, data->powernow_table[j].index >> 8)); } if (data->batps) printk(KERN_INFO PFX "Only %d pstates on battery\n", data->batps); @@ -758,7 +702,7 @@ static int find_psb_table(struct powernow_k8_data *data) #ifdef CONFIG_X86_POWERNOW_K8_ACPI static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { - if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE)) + if (!data->acpi_data.state_count) return; data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK; @@ -771,8 +715,9 @@ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { + int i; + int cntlofreq = 0; struct cpufreq_frequency_table *powernow_table; - int ret_val; if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { dprintk("register performance failed: bad ACPI data\n"); @@ -801,92 +746,13 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) goto err_out; } - if (cpu_family == CPU_HW_PSTATE) - ret_val = fill_powernow_table_pstate(data, powernow_table); - else - ret_val = fill_powernow_table_fidvid(data, powernow_table); - if (ret_val) - goto err_out_mem; - - powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END; - powernow_table[data->acpi_data.state_count].index = 0; - data->powernow_table = powernow_table; - - /* fill in data */ - data->numps = data->acpi_data.state_count; - print_basics(data); - powernow_k8_acpi_pst_values(data, 0); - - /* notify BIOS that we exist */ - acpi_processor_notify_smm(THIS_MODULE); - - return 0; - -err_out_mem: - kfree(powernow_table); - -err_out: - acpi_processor_unregister_performance(&data->acpi_data, data->cpu); - - /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */ - data->acpi_data.state_count = 0; - - return -ENODEV; -} - -static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table) -{ - int i; - - for (i = 0; i < data->acpi_data.state_count; i++) { - u32 index; - u32 hi = 0, lo = 0; - u32 fid; - u32 did; - - index = data->acpi_data.states[i].control & HW_PSTATE_MASK; - if (index > MAX_HW_PSTATE) { - printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index); - printk(KERN_ERR PFX "Please report to BIOS manufacturer\n"); - } - rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi); - if (!(hi & HW_PSTATE_VALID_MASK)) { - dprintk("invalid pstate %d, ignoring\n", index); - powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; - continue; - } - - fid = lo & HW_PSTATE_FID_MASK; - did = (lo & HW_PSTATE_DID_MASK) >> HW_PSTATE_DID_SHIFT; - - dprintk(" %d : fid 0x%x, did 0x%x\n", index, fid, did); - - powernow_table[i].index = index | (fid << HW_FID_INDEX_SHIFT) | (did << HW_DID_INDEX_SHIFT); - - powernow_table[i].frequency = find_khz_freq_from_fiddid(fid, did); - - if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { - printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n", - powernow_table[i].frequency, - (unsigned int) (data->acpi_data.states[i].core_frequency * 1000)); - powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; - continue; - } - } - return 0; -} - -static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table) -{ - int i; - int cntlofreq = 0; for (i = 0; i < data->acpi_data.state_count; i++) { u32 fid; u32 vid; if (data->exttype) { - fid = data->acpi_data.states[i].status & EXT_FID_MASK; - vid = (data->acpi_data.states[i].status >> VID_SHIFT) & EXT_VID_MASK; + fid = data->acpi_data.states[i].status & FID_MASK; + vid = (data->acpi_data.states[i].status >> VID_SHIFT) & VID_MASK; } else { fid = data->acpi_data.states[i].control & FID_MASK; vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK; @@ -920,7 +786,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) || (powernow_table[i].index != powernow_table[cntlofreq].index)) { printk(KERN_ERR PFX "Too many lo freq table entries\n"); - return 1; + goto err_out_mem; } dprintk("double low frequency table entry, ignoring it.\n"); @@ -938,7 +804,31 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf continue; } } + + powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END; + powernow_table[data->acpi_data.state_count].index = 0; + data->powernow_table = powernow_table; + + /* fill in data */ + data->numps = data->acpi_data.state_count; + print_basics(data); + powernow_k8_acpi_pst_values(data, 0); + + /* notify BIOS that we exist */ + acpi_processor_notify_smm(THIS_MODULE); + return 0; + +err_out_mem: + kfree(powernow_table); + +err_out: + acpi_processor_unregister_performance(&data->acpi_data, data->cpu); + + /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */ + data->acpi_data.state_count = 0; + + return -ENODEV; } static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) @@ -954,20 +844,20 @@ static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned #endif /* CONFIG_X86_POWERNOW_K8_ACPI */ /* Take a frequency, and issue the fid/vid transition command */ -static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned int index) +static int transition_frequency(struct powernow_k8_data *data, unsigned int index) { - u32 fid = 0; - u32 vid = 0; + u32 fid; + u32 vid; int res, i; struct cpufreq_freqs freqs; dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); - /* fid/vid correctness check for k8 */ /* fid are the lower 8 bits of the index we stored into - * the cpufreq frequency table in find_psb_table, vid - * are the upper 8 bits. + * the cpufreq frequency table in find_psb_table, vid are + * the upper 8 bits. */ + fid = data->powernow_table[index].index & 0xFF; vid = (data->powernow_table[index].index & 0xFF00) >> 8; @@ -991,58 +881,22 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned i dprintk("cpu %d, changing to fid 0x%x, vid 0x%x\n", smp_processor_id(), fid, vid); + + freqs.cpu = data->cpu; freqs.old = find_khz_freq_from_fid(data->currfid); freqs.new = find_khz_freq_from_fid(fid); - - for_each_cpu_mask(i, *(data->available_cores)) { + for_each_cpu_mask(i, cpu_core_map[data->cpu]) { freqs.cpu = i; cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); } res = transition_fid_vid(data, fid, vid); - freqs.new = find_khz_freq_from_fid(data->currfid); - for_each_cpu_mask(i, *(data->available_cores)) { - freqs.cpu = i; - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } - return res; -} - -/* Take a frequency, and issue the hardware pstate transition command */ -static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned int index) -{ - u32 fid = 0; - u32 did = 0; - u32 pstate = 0; - int res, i; - struct cpufreq_freqs freqs; - - dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); - - /* get fid did for hardware pstate transition */ - pstate = index & HW_PSTATE_MASK; - if (pstate > MAX_HW_PSTATE) - return 0; - fid = (index & HW_FID_INDEX_MASK) >> HW_FID_INDEX_SHIFT; - did = (index & HW_DID_INDEX_MASK) >> HW_DID_INDEX_SHIFT; - freqs.old = find_khz_freq_from_fiddid(data->currfid, data->currdid); - freqs.new = find_khz_freq_from_fiddid(fid, did); - - for_each_cpu_mask(i, *(data->available_cores)) { - freqs.cpu = i; - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - } - - res = transition_pstate(data, pstate); - data->currfid = find_fid_from_pstate(pstate); - data->currdid = find_did_from_pstate(pstate); - freqs.new = find_khz_freq_from_fiddid(data->currfid, data->currdid); - - for_each_cpu_mask(i, *(data->available_cores)) { + freqs.new = find_khz_freq_from_fid(data->currfid); + for_each_cpu_mask(i, cpu_core_map[data->cpu]) { freqs.cpu = i; cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } + } return res; } @@ -1079,21 +933,18 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi dprintk("targ: cpu %d, %d kHz, min %d, max %d, relation %d\n", pol->cpu, targfreq, pol->min, pol->max, relation); - if (query_current_values_with_pending_wait(data)) + if (query_current_values_with_pending_wait(data)) { + ret = -EIO; goto err_out; + } - if (cpu_family == CPU_HW_PSTATE) - dprintk("targ: curr fid 0x%x, did 0x%x\n", - data->currfid, data->currvid); - else { - dprintk("targ: curr fid 0x%x, vid 0x%x\n", + dprintk("targ: curr fid 0x%x, vid 0x%x\n", data->currfid, data->currvid); - if ((checkvid != data->currvid) || (checkfid != data->currfid)) { - printk(KERN_INFO PFX - "error - out of sync, fix 0x%x 0x%x, vid 0x%x 0x%x\n", - checkfid, data->currfid, checkvid, data->currvid); - } + if ((checkvid != data->currvid) || (checkfid != data->currfid)) { + printk(KERN_INFO PFX + "error - out of sync, fix 0x%x 0x%x, vid 0x%x 0x%x\n", + checkfid, data->currfid, checkvid, data->currvid); } if (cpufreq_frequency_table_target(pol, data->powernow_table, targfreq, relation, &newstate)) @@ -1103,11 +954,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi powernow_k8_acpi_pst_values(data, newstate); - if (cpu_family == CPU_HW_PSTATE) - ret = transition_frequency_pstate(data, newstate); - else - ret = transition_frequency_fidvid(data, newstate); - if (ret) { + if (transition_frequency(data, newstate)) { printk(KERN_ERR PFX "transition frequency failed\n"); ret = 1; mutex_unlock(&fidvid_mutex); @@ -1115,10 +962,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi } mutex_unlock(&fidvid_mutex); - if (cpu_family == CPU_HW_PSTATE) - pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); - else - pol->cur = find_khz_freq_from_fid(data->currfid); + pol->cur = find_khz_freq_from_fid(data->currfid); ret = 0; err_out: @@ -1163,13 +1007,14 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) * Use the PSB BIOS structure. This is only availabe on * an UP version, and is deprecated by AMD. */ + if (num_online_cpus() != 1) { printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); kfree(data); return -ENODEV; } if (pol->cpu != 0) { - printk(KERN_ERR PFX "No _PSS objects for CPU other than CPU0\n"); + printk(KERN_ERR PFX "init not cpu 0\n"); kfree(data); return -ENODEV; } @@ -1197,28 +1042,20 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) if (query_current_values_with_pending_wait(data)) goto err_out; - if (cpu_family == CPU_OPTERON) - fidvid_msr_init(); + fidvid_msr_init(); /* run on any CPU again */ set_cpus_allowed(current, oldmask); pol->governor = CPUFREQ_DEFAULT_GOVERNOR; - if (cpu_family == CPU_HW_PSTATE) - pol->cpus = cpumask_of_cpu(pol->cpu); - else - pol->cpus = cpu_core_map[pol->cpu]; - data->available_cores = &(pol->cpus); + pol->cpus = cpu_core_map[pol->cpu]; /* Take a crude guess here. * That guess was in microseconds, so multiply with 1000 */ pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US) + (3 * (1 << data->irt) * 10)) * 1000; - if (cpu_family == CPU_HW_PSTATE) - pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); - else - pol->cur = find_khz_freq_from_fid(data->currfid); + pol->cur = find_khz_freq_from_fid(data->currfid); dprintk("policy current frequency %d kHz\n", pol->cur); /* min/max the cpu is capable of */ @@ -1232,12 +1069,8 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); - if (cpu_family == CPU_HW_PSTATE) - dprintk("cpu_init done, current fid 0x%x, did 0x%x\n", - data->currfid, data->currdid); - else - dprintk("cpu_init done, current fid 0x%x, vid 0x%x\n", - data->currfid, data->currvid); + printk("cpu_init done, current fid 0x%x, vid 0x%x\n", + data->currfid, data->currvid); powernow_data[pol->cpu] = data; @@ -1323,9 +1156,8 @@ static int __cpuinit powernowk8_init(void) } if (supported_cpus == num_online_cpus()) { - printk(KERN_INFO PFX "Found %d %s " - "processors (" VERSION ")\n", supported_cpus, - boot_cpu_data.x86_model_id); + printk(KERN_INFO PFX "Found %d AMD Athlon 64 / Opteron " + "processors (" VERSION ")\n", supported_cpus); return cpufreq_register_driver(&cpufreq_amd64_driver); } diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h index 0fb2a3001..79a7c5c87 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h @@ -1,5 +1,5 @@ /* - * (c) 2003-2006 Advanced Micro Devices, Inc. + * (c) 2003, 2004, 2005 Advanced Micro Devices, Inc. * Your use of this code is subject to the terms and conditions of the * GNU general public license version 2. See "COPYING" or * http://www.gnu.org/licenses/gpl.html @@ -21,8 +21,8 @@ struct powernow_k8_data { u32 plllock; /* pll lock time, units 1 us */ u32 exttype; /* extended interface = 1 */ - /* keep track of the current fid / vid or did */ - u32 currvid, currfid, currdid; + /* keep track of the current fid / vid */ + u32 currvid, currfid; /* the powernow_table includes all frequency and vid/fid pairings: * fid are the lower 8 bits of the index, vid are the upper 8 bits. @@ -34,10 +34,6 @@ struct powernow_k8_data { * used to determine valid frequency/vid/fid states */ struct acpi_processor_performance acpi_data; #endif - /* we need to keep track of associated cores, but let cpufreq - * handle hotplug events - so just point at cpufreq pol->cpus - * structure */ - cpumask_t *available_cores; }; @@ -47,7 +43,6 @@ struct powernow_k8_data { #define CPUID_XFAM_K8 0 #define CPUID_XMOD 0x000f0000 /* extended model */ #define CPUID_XMOD_REV_G 0x00060000 -#define CPUID_XFAM_10H 0x00100000 /* family 0x10 */ #define CPUID_USE_XFAM_XMOD 0x00000f00 #define CPUID_GET_MAX_CAPABILITIES 0x80000000 #define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 @@ -84,32 +79,6 @@ struct powernow_k8_data { #define MSR_S_HI_CURRENT_VID 0x0000003f #define MSR_C_HI_STP_GNT_BENIGN 0x00000001 - -/* Hardware Pstate _PSS and MSR definitions */ -#define USE_HW_PSTATE 0x00000080 -#define HW_PSTATE_FID_MASK 0x0000003f -#define HW_PSTATE_DID_MASK 0x000001c0 -#define HW_PSTATE_DID_SHIFT 6 -#define HW_PSTATE_MASK 0x00000007 -#define HW_PSTATE_VALID_MASK 0x80000000 -#define HW_FID_INDEX_SHIFT 8 -#define HW_FID_INDEX_MASK 0x0000ff00 -#define HW_DID_INDEX_SHIFT 16 -#define HW_DID_INDEX_MASK 0x00ff0000 -#define HW_WATTS_MASK 0xff -#define HW_PWR_DVR_MASK 0x300 -#define HW_PWR_DVR_SHIFT 8 -#define HW_PWR_MAX_MULT 3 -#define MAX_HW_PSTATE 8 /* hw pstate supports up to 8 */ -#define MSR_PSTATE_DEF_BASE 0xc0010064 /* base of Pstate MSRs */ -#define MSR_PSTATE_STATUS 0xc0010063 /* Pstate Status MSR */ -#define MSR_PSTATE_CTRL 0xc0010062 /* Pstate control MSR */ - -/* define the two driver architectures */ -#define CPU_OPTERON 0 -#define CPU_HW_PSTATE 1 - - /* * There are restrictions frequencies have to follow: * - only 1 entry in the low fid table ( <=1.4GHz ) @@ -169,9 +138,7 @@ struct powernow_k8_data { #define MVS_MASK 3 #define VST_MASK 0x7f #define VID_MASK 0x1f -#define FID_MASK 0x1f -#define EXT_VID_MASK 0x3f -#define EXT_FID_MASK 0x3f +#define FID_MASK 0x3f /* @@ -215,9 +182,6 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid); static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index); -static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table); -static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpufreq_frequency_table *powernow_table); - #ifdef CONFIG_SMP static inline void define_siblings(int cpu, cpumask_t cpu_sharedcore_mask[]) { diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index b77f1358b..b0ff90757 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c @@ -2,21 +2,26 @@ * cpufreq driver for Enhanced SpeedStep, as found in Intel's Pentium * M (part of the Centrino chipset). * - * Since the original Pentium M, most new Intel CPUs support Enhanced - * SpeedStep. - * * Despite the "SpeedStep" in the name, this is almost entirely unlike * traditional SpeedStep. * * Modelled on speedstep.c * * Copyright (C) 2003 Jeremy Fitzhardinge + * + * WARNING WARNING WARNING + * + * This driver manipulates the PERF_CTL MSR, which is only somewhat + * documented. While it seems to work on my laptop, it has not been + * tested anywhere else, and it may not work for you, do strange + * things or simply crash. */ #include #include #include #include +#include #include /* current */ #include #include @@ -31,7 +36,7 @@ #include #define PFX "speedstep-centrino: " -#define MAINTAINER "cpufreq@lists.linux.org.uk" +#define MAINTAINER "Jeremy Fitzhardinge " #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) @@ -245,7 +250,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) if (model->cpu_id == NULL) { /* No match at all */ - dprintk("no support for CPU model \"%s\": " + dprintk(KERN_INFO PFX "no support for CPU model \"%s\": " "send /proc/cpuinfo to " MAINTAINER "\n", cpu->x86_model_id); return -ENOENT; @@ -253,10 +258,10 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) if (model->op_points == NULL) { /* Matched a non-match */ - dprintk("no table support for CPU model \"%s\"\n", + dprintk(KERN_INFO PFX "no table support for CPU model \"%s\"\n", cpu->x86_model_id); #ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI - dprintk("try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n"); + dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n"); #endif return -ENOENT; } @@ -346,36 +351,7 @@ static unsigned int get_cur_freq(unsigned int cpu) #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI -static struct acpi_processor_performance *acpi_perf_data[NR_CPUS]; - -/* - * centrino_cpu_early_init_acpi - Do the preregistering with ACPI P-States - * library - * - * Before doing the actual init, we need to do _PSD related setup whenever - * supported by the BIOS. These are handled by this early_init routine. - */ -static int centrino_cpu_early_init_acpi(void) -{ - unsigned int i, j; - struct acpi_processor_performance *data; - - for_each_possible_cpu(i) { - data = kzalloc(sizeof(struct acpi_processor_performance), - GFP_KERNEL); - if (!data) { - for_each_possible_cpu(j) { - kfree(acpi_perf_data[j]); - acpi_perf_data[j] = NULL; - } - return (-ENOMEM); - } - acpi_perf_data[i] = data; - } - - acpi_processor_preregister_performance(acpi_perf_data); - return 0; -} +static struct acpi_processor_performance p; /* * centrino_cpu_init_acpi - register with ACPI P-States library @@ -389,57 +365,46 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) unsigned long cur_freq; int result = 0, i; unsigned int cpu = policy->cpu; - struct acpi_processor_performance *p; - - p = acpi_perf_data[cpu]; /* register with ACPI core */ - if (acpi_processor_register_performance(p, cpu)) { - dprintk(PFX "obtaining ACPI data failed\n"); + if (acpi_processor_register_performance(&p, cpu)) { + dprintk(KERN_INFO PFX "obtaining ACPI data failed\n"); return -EIO; } - policy->shared_type = p->shared_type; - /* - * Will let policy->cpus know about dependency only when software - * coordination is required. - */ - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || - policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - policy->cpus = p->shared_cpu_map; /* verify the acpi_data */ - if (p->state_count <= 1) { + if (p.state_count <= 1) { dprintk("No P-States\n"); result = -ENODEV; goto err_unreg; } - if ((p->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || - (p->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { + if ((p.control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || + (p.status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { dprintk("Invalid control/status registers (%x - %x)\n", - p->control_register.space_id, p->status_register.space_id); + p.control_register.space_id, p.status_register.space_id); result = -EIO; goto err_unreg; } - for (i=0; istate_count; i++) { - if (p->states[i].control != p->states[i].status) { + for (i=0; istates[i].control, p->states[i].status); + p.states[i].control, p.states[i].status); result = -EINVAL; goto err_unreg; } - if (!p->states[i].core_frequency) { + if (!p.states[i].core_frequency) { dprintk("Zero core frequency for state %u\n", i); result = -EINVAL; goto err_unreg; } - if (p->states[i].core_frequency > p->states[0].core_frequency) { + if (p.states[i].core_frequency > p.states[0].core_frequency) { dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i, - p->states[i].core_frequency, p->states[0].core_frequency); - p->states[i].core_frequency = 0; + p.states[i].core_frequency, p.states[0].core_frequency); + p.states[i].core_frequency = 0; continue; } } @@ -451,26 +416,26 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) } centrino_model[cpu]->model_name=NULL; - centrino_model[cpu]->max_freq = p->states[0].core_frequency * 1000; + centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000; centrino_model[cpu]->op_points = kmalloc(sizeof(struct cpufreq_frequency_table) * - (p->state_count + 1), GFP_KERNEL); + (p.state_count + 1), GFP_KERNEL); if (!centrino_model[cpu]->op_points) { result = -ENOMEM; goto err_kfree; } - for (i=0; istate_count; i++) { - centrino_model[cpu]->op_points[i].index = p->states[i].control; - centrino_model[cpu]->op_points[i].frequency = p->states[i].core_frequency * 1000; + for (i=0; iop_points[i].index = p.states[i].control; + centrino_model[cpu]->op_points[i].frequency = p.states[i].core_frequency * 1000; dprintk("adding state %i with frequency %u and control value %04x\n", i, centrino_model[cpu]->op_points[i].frequency, centrino_model[cpu]->op_points[i].index); } - centrino_model[cpu]->op_points[p->state_count].frequency = CPUFREQ_TABLE_END; + centrino_model[cpu]->op_points[p.state_count].frequency = CPUFREQ_TABLE_END; cur_freq = get_cur_freq(cpu); - for (i=0; istate_count; i++) { - if (!p->states[i].core_frequency) { + for (i=0; iop_points[i].frequency = CPUFREQ_ENTRY_INVALID; continue; @@ -486,7 +451,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) } if (cur_freq == centrino_model[cpu]->op_points[i].frequency) - p->state = i; + p.state = i; } /* notify BIOS that we exist */ @@ -499,13 +464,12 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) err_kfree: kfree(centrino_model[cpu]); err_unreg: - acpi_processor_unregister_performance(p, cpu); - dprintk(PFX "invalid ACPI data\n"); + acpi_processor_unregister_performance(&p, cpu); + dprintk(KERN_INFO PFX "invalid ACPI data\n"); return (result); } #else static inline int centrino_cpu_init_acpi(struct cpufreq_policy *policy) { return -ENODEV; } -static inline int centrino_cpu_early_init_acpi(void) { return 0; } #endif static int centrino_cpu_init(struct cpufreq_policy *policy) @@ -535,7 +499,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) centrino_cpu[policy->cpu] = &cpu_ids[i]; if (!centrino_cpu[policy->cpu]) { - dprintk("found unsupported CPU with " + dprintk(KERN_INFO PFX "found unsupported CPU with " "Enhanced SpeedStep: send /proc/cpuinfo to " MAINTAINER "\n"); return -ENODEV; @@ -591,15 +555,10 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy) #ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI if (!centrino_model[cpu]->model_name) { - static struct acpi_processor_performance *p; - - if (acpi_perf_data[cpu]) { - p = acpi_perf_data[cpu]; - dprintk("unregistering and freeing ACPI data\n"); - acpi_processor_unregister_performance(p, cpu); - kfree(centrino_model[cpu]->op_points); - kfree(centrino_model[cpu]); - } + dprintk("unregistering and freeing ACPI data\n"); + acpi_processor_unregister_performance(&p, cpu); + kfree(centrino_model[cpu]->op_points); + kfree(centrino_model[cpu]); } #endif @@ -633,128 +592,63 @@ static int centrino_target (struct cpufreq_policy *policy, unsigned int relation) { unsigned int newstate = 0; - unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; + unsigned int msr, oldmsr, h, cpu = policy->cpu; struct cpufreq_freqs freqs; - cpumask_t online_policy_cpus; cpumask_t saved_mask; - cpumask_t set_mask; - cpumask_t covered_cpus; - int retval = 0; - unsigned int j, k, first_cpu, tmp; + int retval; - if (unlikely(centrino_model[cpu] == NULL)) + if (centrino_model[cpu] == NULL) return -ENODEV; - if (unlikely(cpufreq_frequency_table_target(policy, - centrino_model[cpu]->op_points, - target_freq, - relation, - &newstate))) { - return -EINVAL; + /* + * Support for SMP systems. + * Make sure we are running on the CPU that wants to change frequency + */ + saved_mask = current->cpus_allowed; + set_cpus_allowed(current, policy->cpus); + if (!cpu_isset(smp_processor_id(), policy->cpus)) { + dprintk("couldn't limit to CPUs in this domain\n"); + return(-EAGAIN); } -#ifdef CONFIG_HOTPLUG_CPU - /* cpufreq holds the hotplug lock, so we are safe from here on */ - cpus_and(online_policy_cpus, cpu_online_map, policy->cpus); -#else - online_policy_cpus = policy->cpus; -#endif + if (cpufreq_frequency_table_target(policy, centrino_model[cpu]->op_points, target_freq, + relation, &newstate)) { + retval = -EINVAL; + goto migrate_end; + } - saved_mask = current->cpus_allowed; - first_cpu = 1; - cpus_clear(covered_cpus); - for_each_cpu_mask(j, online_policy_cpus) { - /* - * Support for SMP systems. - * Make sure we are running on CPU that wants to change freq - */ - cpus_clear(set_mask); - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - cpus_or(set_mask, set_mask, online_policy_cpus); - else - cpu_set(j, set_mask); - - set_cpus_allowed(current, set_mask); - if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { - dprintk("couldn't limit to CPUs in this domain\n"); - retval = -EAGAIN; - if (first_cpu) { - /* We haven't started the transition yet. */ - goto migrate_end; - } - break; - } + msr = centrino_model[cpu]->op_points[newstate].index; + rdmsr(MSR_IA32_PERF_CTL, oldmsr, h); - msr = centrino_model[cpu]->op_points[newstate].index; - - if (first_cpu) { - rdmsr(MSR_IA32_PERF_CTL, oldmsr, h); - if (msr == (oldmsr & 0xffff)) { - dprintk("no change needed - msr was and needs " - "to be %x\n", oldmsr); - retval = 0; - goto migrate_end; - } - - freqs.old = extract_clock(oldmsr, cpu, 0); - freqs.new = extract_clock(msr, cpu, 0); - - dprintk("target=%dkHz old=%d new=%d msr=%04x\n", - target_freq, freqs.old, freqs.new, msr); - - for_each_cpu_mask(k, online_policy_cpus) { - freqs.cpu = k; - cpufreq_notify_transition(&freqs, - CPUFREQ_PRECHANGE); - } - - first_cpu = 0; - /* all but 16 LSB are reserved, treat them with care */ - oldmsr &= ~0xffff; - msr &= 0xffff; - oldmsr |= msr; - } + if (msr == (oldmsr & 0xffff)) { + retval = 0; + dprintk("no change needed - msr was and needs to be %x\n", oldmsr); + goto migrate_end; + } - wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); - if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) - break; + freqs.cpu = cpu; + freqs.old = extract_clock(oldmsr, cpu, 0); + freqs.new = extract_clock(msr, cpu, 0); - cpu_set(j, covered_cpus); - } + dprintk("target=%dkHz old=%d new=%d msr=%04x\n", + target_freq, freqs.old, freqs.new, msr); - for_each_cpu_mask(k, online_policy_cpus) { - freqs.cpu = k; - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - if (unlikely(retval)) { - /* - * We have failed halfway through the frequency change. - * We have sent callbacks to policy->cpus and - * MSRs have already been written on coverd_cpus. - * Best effort undo.. - */ + /* all but 16 LSB are "reserved", so treat them with + care */ + oldmsr &= ~0xffff; + msr &= 0xffff; + oldmsr |= msr; - if (!cpus_empty(covered_cpus)) { - for_each_cpu_mask(j, covered_cpus) { - set_cpus_allowed(current, cpumask_of_cpu(j)); - wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); - } - } + wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); - tmp = freqs.new; - freqs.new = freqs.old; - freqs.old = tmp; - for_each_cpu_mask(j, online_policy_cpus) { - freqs.cpu = j; - cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); - } - } + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); + retval = 0; migrate_end: set_cpus_allowed(current, saved_mask); - return 0; + return (retval); } static struct freq_attr* centrino_attr[] = { @@ -796,25 +690,12 @@ static int __init centrino_init(void) if (!cpu_has(cpu, X86_FEATURE_EST)) return -ENODEV; - centrino_cpu_early_init_acpi(); - return cpufreq_register_driver(¢rino_driver); } static void __exit centrino_exit(void) { -#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI - unsigned int j; -#endif - cpufreq_unregister_driver(¢rino_driver); - -#ifdef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI - for_each_possible_cpu(j) { - kfree(acpi_perf_data[j]); - acpi_perf_data[j] = NULL; - } -#endif } MODULE_AUTHOR ("Jeremy Fitzhardinge "); diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c index ff0d89806..c28333d53 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c @@ -360,6 +360,9 @@ static int __init speedstep_init(void) case SPEEDSTEP_PROCESSOR_PIII_C: case SPEEDSTEP_PROCESSOR_PIII_C_EARLY: break; + case SPEEDSTEP_PROCESSOR_P4M: + printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n"); + break; default: speedstep_processor = 0; } diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index f03b7f94c..00f2e0587 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c @@ -184,7 +184,7 @@ static void __init geode_configure(void) #ifdef CONFIG_PCI -static struct pci_device_id __initdata cyrix_55x0[] = { +static struct pci_device_id cyrix_55x0[] = { { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510) }, { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520) }, { }, @@ -272,15 +272,14 @@ static void __init init_cyrix(struct cpuinfo_x86 *c) printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n"); isa_dma_bridge_buggy = 2; - - +#endif + c->x86_cache_size=16; /* Yep 16K integrated cache thats it */ + /* * The 5510/5520 companion chips have a funky PIT. */ if (pci_dev_present(cyrix_55x0)) pit_latch_buggy = 1; -#endif - c->x86_cache_size=16; /* Yep 16K integrated cache thats it */ /* GXm supports extended cpuid levels 'ala' AMD */ if (c->cpuid_level == 2) { @@ -354,7 +353,7 @@ static void __init init_nsc(struct cpuinfo_x86 *c) * This function only handles the GX processor, and kicks every * thing else to the Cyrix init function above - that should * cover any processors that might have been branded differently - * after NSC acquired Cyrix. + * after NSC aquired Cyrix. * * If this breaks your GX1 horribly, please e-mail * info-linux@ldcmail.amd.com to tell us. diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index 5a2e27092..5386b29bb 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c @@ -1,3 +1,4 @@ +#include #include #include @@ -121,12 +122,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) select_idle_routine(c); l2 = init_intel_cacheinfo(c); - if (c->cpuid_level > 9 ) { - unsigned eax = cpuid_eax(10); - /* Check for version and the number of counters */ - if ((eax & 0xff) && (((eax>>8) & 0xff) > 1)) - set_bit(X86_FEATURE_ARCH_PERFMON, c->x86_capability); - } /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it until model 3 mask 3 */ if ((c->x86<<8 | c->x86_model<<4 | c->x86_mask) < 0x633) diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index 5c43be475..f3f2bc883 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c @@ -4,7 +4,6 @@ * Changes: * Venkatesh Pallipadi : Adding cache identification through cpuid(4) * Ashok Raj : Work with CPU hotplug infrastructure. - * Andi Kleen : CPUID4 emulation on AMD. */ #include @@ -131,111 +130,25 @@ struct _cpuid4_info { cpumask_t shared_cpu_map; }; -unsigned short num_cache_leaves; - -/* AMD doesn't have CPUID4. Emulate it here to report the same - information to the user. This makes some assumptions about the machine: - No L3, L2 not shared, no SMT etc. that is currently true on AMD CPUs. - - In theory the TLBs could be reported as fake type (they are in "dummy"). - Maybe later */ -union l1_cache { - struct { - unsigned line_size : 8; - unsigned lines_per_tag : 8; - unsigned assoc : 8; - unsigned size_in_kb : 8; - }; - unsigned val; -}; - -union l2_cache { - struct { - unsigned line_size : 8; - unsigned lines_per_tag : 4; - unsigned assoc : 4; - unsigned size_in_kb : 16; - }; - unsigned val; -}; - -static const unsigned short assocs[] = { - [1] = 1, [2] = 2, [4] = 4, [6] = 8, - [8] = 16, - [0xf] = 0xffff // ?? - }; -static const unsigned char levels[] = { 1, 1, 2 }; -static const unsigned char types[] = { 1, 2, 3 }; - -static void __cpuinit amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, - union _cpuid4_leaf_ebx *ebx, - union _cpuid4_leaf_ecx *ecx) -{ - unsigned dummy; - unsigned line_size, lines_per_tag, assoc, size_in_kb; - union l1_cache l1i, l1d; - union l2_cache l2; - - eax->full = 0; - ebx->full = 0; - ecx->full = 0; - - cpuid(0x80000005, &dummy, &dummy, &l1d.val, &l1i.val); - cpuid(0x80000006, &dummy, &dummy, &l2.val, &dummy); - - if (leaf > 2 || !l1d.val || !l1i.val || !l2.val) - return; - - eax->split.is_self_initializing = 1; - eax->split.type = types[leaf]; - eax->split.level = levels[leaf]; - eax->split.num_threads_sharing = 0; - eax->split.num_cores_on_die = current_cpu_data.x86_max_cores - 1; - - if (leaf <= 1) { - union l1_cache *l1 = leaf == 0 ? &l1d : &l1i; - assoc = l1->assoc; - line_size = l1->line_size; - lines_per_tag = l1->lines_per_tag; - size_in_kb = l1->size_in_kb; - } else { - assoc = l2.assoc; - line_size = l2.line_size; - lines_per_tag = l2.lines_per_tag; - /* cpu_data has errata corrections for K7 applied */ - size_in_kb = current_cpu_data.x86_cache_size; - } - - if (assoc == 0xf) - eax->split.is_fully_associative = 1; - ebx->split.coherency_line_size = line_size - 1; - ebx->split.ways_of_associativity = assocs[assoc] - 1; - ebx->split.physical_line_partition = lines_per_tag - 1; - ecx->split.number_of_sets = (size_in_kb * 1024) / line_size / - (ebx->split.ways_of_associativity + 1) - 1; -} +static unsigned short num_cache_leaves; static int __cpuinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) { - union _cpuid4_leaf_eax eax; - union _cpuid4_leaf_ebx ebx; - union _cpuid4_leaf_ecx ecx; - unsigned edx; + unsigned int eax, ebx, ecx, edx; + union _cpuid4_leaf_eax cache_eax; - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) - amd_cpuid4(index, &eax, &ebx, &ecx); - else - cpuid_count(4, index, &eax.full, &ebx.full, &ecx.full, &edx); - if (eax.split.type == CACHE_TYPE_NULL) + cpuid_count(4, index, &eax, &ebx, &ecx, &edx); + cache_eax.full = eax; + if (cache_eax.split.type == CACHE_TYPE_NULL) return -EIO; /* better error ? */ - this_leaf->eax = eax; - this_leaf->ebx = ebx; - this_leaf->ecx = ecx; - this_leaf->size = (ecx.split.number_of_sets + 1) * - (ebx.split.coherency_line_size + 1) * - (ebx.split.physical_line_partition + 1) * - (ebx.split.ways_of_associativity + 1); + this_leaf->eax.full = eax; + this_leaf->ebx.full = ebx; + this_leaf->ecx.full = ecx; + this_leaf->size = (this_leaf->ecx.split.number_of_sets + 1) * + (this_leaf->ebx.split.coherency_line_size + 1) * + (this_leaf->ebx.split.physical_line_partition + 1) * + (this_leaf->ebx.split.ways_of_associativity + 1); return 0; } @@ -261,7 +174,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; -#ifdef CONFIG_X86_HT +#ifdef CONFIG_SMP unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); #endif @@ -383,14 +296,14 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) if (new_l2) { l2 = new_l2; -#ifdef CONFIG_X86_HT +#ifdef CONFIG_SMP cpu_llc_id[cpu] = l2_id; #endif } if (new_l3) { l3 = new_l3; -#ifdef CONFIG_X86_HT +#ifdef CONFIG_SMP cpu_llc_id[cpu] = l3_id; #endif } @@ -715,7 +628,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) return retval; } -static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) +static void cache_remove_dev(struct sys_device * sys_dev) { unsigned int cpu = sys_dev->id; unsigned long i; @@ -729,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) return; } -static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, +static int cacheinfo_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -747,7 +660,7 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cacheinfo_cpu_notifier = +static struct notifier_block cacheinfo_cpu_notifier = { .notifier_call = cacheinfo_cpu_callback, }; @@ -759,7 +672,7 @@ static int __cpuinit cache_sysfs_init(void) if (num_cache_leaves == 0) return 0; - register_hotcpu_notifier(&cacheinfo_cpu_notifier); + register_cpu_notifier(&cacheinfo_cpu_notifier); for_each_online_cpu(i) { cacheinfo_cpu_callback(&cacheinfo_cpu_notifier, CPU_ONLINE, diff --git a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c index b0862af59..fc5d5215e 100644 --- a/arch/i386/kernel/cpu/mcheck/k7.c +++ b/arch/i386/kernel/cpu/mcheck/k7.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c index d555bec0d..afa0888f9 100644 --- a/arch/i386/kernel/cpu/mcheck/mce.c +++ b/arch/i386/kernel/cpu/mcheck/mce.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/i386/kernel/cpu/mcheck/mce.h b/arch/i386/kernel/cpu/mcheck/mce.h index 84fd4cf7d..dc2416dfe 100644 --- a/arch/i386/kernel/cpu/mcheck/mce.h +++ b/arch/i386/kernel/cpu/mcheck/mce.h @@ -9,6 +9,6 @@ void winchip_mcheck_init(struct cpuinfo_x86 *c); /* Call the installed machine check handler for this CPU setup. */ extern fastcall void (*machine_check_vector)(struct pt_regs *, long error_code); -extern int mce_disabled; +extern int mce_disabled __initdata; extern int nr_mce_banks; diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c index 1f9153ae5..82dffe0d4 100644 --- a/arch/i386/kernel/cpu/mcheck/non-fatal.c +++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c index b95f1b3d5..fd2c459a3 100644 --- a/arch/i386/kernel/cpu/mcheck/p4.c +++ b/arch/i386/kernel/cpu/mcheck/p4.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c index f54a15268..f94cdb7ac 100644 --- a/arch/i386/kernel/cpu/proc.c +++ b/arch/i386/kernel/cpu/proc.c @@ -18,7 +18,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) * applications want to get the raw CPUID data, they should access * /dev/cpu//cpuid instead. */ - static const char * const x86_cap_flags[] = { + static char *x86_cap_flags[] = { /* Intel-defined */ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", @@ -52,7 +52,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) /* VIA/Cyrix/Centaur-defined */ NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en", - "ace2", "ace2_en", "phe", "phe_en", "pmm", "pmm_en", NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -62,7 +62,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; - static const char * const x86_power_flags[] = { + static char *x86_power_flags[] = { "ts", /* temperature sensor */ "fid", /* frequency id control */ "vid", /* voltage id control */ @@ -109,9 +109,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); #ifdef CONFIG_X86_HT if (c->x86_max_cores * smp_num_siblings > 1) { - seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); + seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]); seq_printf(m, "siblings\t: %d\n", cpus_weight(cpu_core_map[n])); - seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id); + seq_printf(m, "core id\t\t: %d\n", cpu_core_id[n]); seq_printf(m, "cpu cores\t: %d\n", c->booted_cores); } #endif diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index fde8bea85..1d9a4abcd 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c @@ -24,6 +24,7 @@ */ #include +#include #include #include @@ -167,7 +168,6 @@ static int cpuid_class_device_create(int i) return err; } -#ifdef CONFIG_HOTPLUG_CPU static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -183,11 +183,10 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = +static struct notifier_block cpuid_class_cpu_notifier = { .notifier_call = cpuid_class_cpu_callback, }; -#endif /* !CONFIG_HOTPLUG_CPU */ static int __init cpuid_init(void) { @@ -210,7 +209,7 @@ static int __init cpuid_init(void) if (err != 0) goto out_class; } - register_hotcpu_notifier(&cpuid_class_cpu_notifier); + register_cpu_notifier(&cpuid_class_cpu_notifier); err = 0; goto out; @@ -235,7 +234,7 @@ static void __exit cpuid_exit(void) class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); class_destroy(cpuid_class); unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); - unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); + unregister_cpu_notifier(&cpuid_class_cpu_notifier); } module_init(cpuid_init); diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 5b96f0383..2b0cfce24 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -90,7 +90,7 @@ static void crash_save_self(struct pt_regs *regs) crash_save_this_cpu(regs, cpu); } -#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) +#ifdef CONFIG_SMP static atomic_t waiting_for_crash_ipi; static int crash_nmi_callback(struct pt_regs *regs, int cpu) @@ -114,15 +114,19 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) atomic_dec(&waiting_for_crash_ipi); /* Assume hlt works */ halt(); - for (;;) - cpu_relax(); + for(;;); return 1; } +/* + * By using the NMI code instead of a vector we just sneak thru the + * word generator coming out with just what we want. AND it does + * not matter if clustered_apic_mode is set or not. + */ static void smp_send_nmi_allbutself(void) { - send_IPI_allbutself(NMI_VECTOR); + send_IPI_allbutself(APIC_DM_NMI); } static void nmi_shootdown_cpus(void) @@ -158,7 +162,7 @@ static void nmi_shootdown_cpus(void) void machine_crash_shutdown(struct pt_regs *regs) { /* This function is only called after the system - * has panicked or is otherwise in a critical state. + * has paniced or is otherwise in a critical state. * The minimum amount of code to allow a kexec'd kernel * to run successfully needs to happen here. * diff --git a/arch/i386/kernel/doublefault.c b/arch/i386/kernel/doublefault.c index b4d14c2eb..5edb1d379 100644 --- a/arch/i386/kernel/doublefault.c +++ b/arch/i386/kernel/doublefault.c @@ -44,8 +44,7 @@ static void doublefault_fn(void) } } - for (;;) - cpu_relax(); + for (;;) /* nothing */; } struct tss_struct doublefault_tss __cacheline_aligned = { diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index fe1580421..9202b67c4 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c @@ -19,6 +19,7 @@ * Skip non-WB memory and ignore empty memory ranges. */ +#include #include #include #include @@ -600,10 +601,8 @@ efi_initialize_iomem_resources(struct resource *code_resource, 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%llx-0x%llx\n", res->name, - (unsigned long long)res->start, - (unsigned long long)res->end); + 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. diff --git a/arch/i386/kernel/efi_stub.S b/arch/i386/kernel/efi_stub.S index d3ee73a3e..08c0312d9 100644 --- a/arch/i386/kernel/efi_stub.S +++ b/arch/i386/kernel/efi_stub.S @@ -5,6 +5,7 @@ * turned off. */ +#include #include #include #include diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index fd0f85ff5..eed41e6dd 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -40,15 +40,14 @@ * "current" is in register %ebx during any slow entries. */ +#include #include #include -#include #include #include #include #include #include -#include #include "irq_vectors.h" #define nr_syscalls ((syscall_table_size)/4) @@ -77,91 +76,40 @@ NT_MASK = 0x00004000 VM_MASK = 0x00020000 #ifdef CONFIG_PREEMPT -#define preempt_stop cli; TRACE_IRQS_OFF +#define preempt_stop cli #else #define preempt_stop #define resume_kernel restore_nocheck #endif -.macro TRACE_IRQS_IRET -#ifdef CONFIG_TRACE_IRQFLAGS - testl $IF_MASK,EFLAGS(%esp) # interrupts off? - jz 1f - TRACE_IRQS_ON -1: -#endif -.endm - -#ifdef CONFIG_VM86 -#define resume_userspace_sig check_userspace -#else -#define resume_userspace_sig resume_userspace -#endif - #define SAVE_ALL \ cld; \ pushl %es; \ - CFI_ADJUST_CFA_OFFSET 4;\ - /*CFI_REL_OFFSET es, 0;*/\ pushl %ds; \ - CFI_ADJUST_CFA_OFFSET 4;\ - /*CFI_REL_OFFSET ds, 0;*/\ pushl %eax; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET eax, 0;\ pushl %ebp; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET ebp, 0;\ pushl %edi; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET edi, 0;\ pushl %esi; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET esi, 0;\ pushl %edx; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET edx, 0;\ pushl %ecx; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET ecx, 0;\ pushl %ebx; \ - CFI_ADJUST_CFA_OFFSET 4;\ - CFI_REL_OFFSET ebx, 0;\ movl $(__USER_DS), %edx; \ movl %edx, %ds; \ movl %edx, %es; #define RESTORE_INT_REGS \ popl %ebx; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE ebx;\ popl %ecx; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE ecx;\ popl %edx; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE edx;\ popl %esi; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE esi;\ popl %edi; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE edi;\ popl %ebp; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE ebp;\ - popl %eax; \ - CFI_ADJUST_CFA_OFFSET -4;\ - CFI_RESTORE eax + popl %eax #define RESTORE_REGS \ RESTORE_INT_REGS; \ 1: popl %ds; \ - CFI_ADJUST_CFA_OFFSET -4;\ - /*CFI_RESTORE ds;*/\ 2: popl %es; \ - CFI_ADJUST_CFA_OFFSET -4;\ - /*CFI_RESTORE es;*/\ .section .fixup,"ax"; \ 3: movl $0,(%esp); \ jmp 1b; \ @@ -174,47 +122,13 @@ VM_MASK = 0x00020000 .long 2b,4b; \ .previous -#define RING0_INT_FRAME \ - CFI_STARTPROC simple;\ - CFI_DEF_CFA esp, 3*4;\ - /*CFI_OFFSET cs, -2*4;*/\ - CFI_OFFSET eip, -3*4 - -#define RING0_EC_FRAME \ - CFI_STARTPROC simple;\ - CFI_DEF_CFA esp, 4*4;\ - /*CFI_OFFSET cs, -2*4;*/\ - CFI_OFFSET eip, -3*4 - -#define RING0_PTREGS_FRAME \ - CFI_STARTPROC simple;\ - CFI_DEF_CFA esp, OLDESP-EBX;\ - /*CFI_OFFSET cs, CS-OLDESP;*/\ - CFI_OFFSET eip, EIP-OLDESP;\ - /*CFI_OFFSET es, ES-OLDESP;*/\ - /*CFI_OFFSET ds, DS-OLDESP;*/\ - CFI_OFFSET eax, EAX-OLDESP;\ - CFI_OFFSET ebp, EBP-OLDESP;\ - CFI_OFFSET edi, EDI-OLDESP;\ - CFI_OFFSET esi, ESI-OLDESP;\ - CFI_OFFSET edx, EDX-OLDESP;\ - CFI_OFFSET ecx, ECX-OLDESP;\ - CFI_OFFSET ebx, EBX-OLDESP ENTRY(ret_from_fork) - CFI_STARTPROC pushl %eax - CFI_ADJUST_CFA_OFFSET 4 call schedule_tail GET_THREAD_INFO(%ebp) popl %eax - CFI_ADJUST_CFA_OFFSET -4 - pushl $0x0202 # Reset kernel eflags - CFI_ADJUST_CFA_OFFSET 4 - popfl - CFI_ADJUST_CFA_OFFSET -4 jmp syscall_exit - CFI_ENDPROC /* * Return to user mode is not as complex as all this looks, @@ -225,12 +139,10 @@ ENTRY(ret_from_fork) # userspace resumption stub bypassing syscall exit tracing ALIGN - RING0_PTREGS_FRAME ret_from_exception: preempt_stop ret_from_intr: GET_THREAD_INFO(%ebp) -check_userspace: movl EFLAGS(%esp), %eax # mix EFLAGS and CS movb CS(%esp), %al testl $(VM_MASK | 3), %eax @@ -259,43 +171,25 @@ need_resched: call preempt_schedule_irq jmp need_resched #endif - CFI_ENDPROC /* SYSENTER_RETURN points to after the "sysenter" instruction in the vsyscall page. See vsyscall-sysentry.S, which defines the symbol. */ # sysenter call handler stub ENTRY(sysenter_entry) - CFI_STARTPROC simple - CFI_DEF_CFA esp, 0 - CFI_REGISTER esp, ebp movl SYSENTER_stack_esp0(%esp),%esp sysenter_past_esp: - /* - * No need to follow this irqs on/off section: the syscall - * disabled irqs and here we enable it straight after entry: - */ sti pushl $(__USER_DS) - CFI_ADJUST_CFA_OFFSET 4 - /*CFI_REL_OFFSET ss, 0*/ pushl %ebp - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET esp, 0 pushfl - CFI_ADJUST_CFA_OFFSET 4 pushl $(__USER_CS) - CFI_ADJUST_CFA_OFFSET 4 - /*CFI_REL_OFFSET cs, 0*/ /* * Push current_thread_info()->sysenter_return to the stack. * A tiny bit of offset fixup is necessary - 4*4 means the 4 words * pushed above; +8 corresponds to copy_thread's esp0 setting. */ pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp) - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET eip, 0 - /* * Load the potential sixth argument from user stack. * Careful about security. @@ -309,7 +203,6 @@ sysenter_past_esp: .previous pushl %eax - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL GET_THREAD_INFO(%ebp) @@ -321,7 +214,6 @@ sysenter_past_esp: call *sys_call_table(,%eax,4) movl %eax,EAX(%esp) cli - TRACE_IRQS_OFF movl TI_flags(%ebp), %ecx testw $_TIF_ALLWORK_MASK, %cx jne syscall_exit_work @@ -329,17 +221,13 @@ sysenter_past_esp: movl EIP(%esp), %edx movl OLDESP(%esp), %ecx xorl %ebp,%ebp - TRACE_IRQS_ON sti sysexit - CFI_ENDPROC # system call handler stub ENTRY(system_call) - RING0_INT_FRAME # can't unwind into user space anyway pushl %eax # save orig_eax - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL GET_THREAD_INFO(%ebp) testl $TF_MASK,EFLAGS(%esp) @@ -359,7 +247,6 @@ syscall_exit: cli # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret - TRACE_IRQS_OFF movl TI_flags(%ebp), %ecx testw $_TIF_ALLWORK_MASK, %cx # current->work jne syscall_exit_work @@ -373,18 +260,13 @@ restore_all: movb CS(%esp), %al andl $(VM_MASK | (4 << 8) | 3), %eax cmpl $((4 << 8) | 3), %eax - CFI_REMEMBER_STATE je ldt_ss # returning to user-space with LDT SS restore_nocheck: - TRACE_IRQS_IRET -restore_nocheck_notrace: RESTORE_REGS addl $4, %esp - CFI_ADJUST_CFA_OFFSET -4 1: iret .section .fixup,"ax" iret_exc: - TRACE_IRQS_ON sti pushl $0 # no error code pushl $do_iret_error @@ -395,7 +277,6 @@ iret_exc: .long 1b,iret_exc .previous - CFI_RESTORE_STATE ldt_ss: larl OLDSS(%esp), %eax jnz restore_nocheck @@ -408,15 +289,11 @@ ldt_ss: * CPUs, which we can try to work around to make * dosemu and wine happy. */ subl $8, %esp # reserve space for switch16 pointer - CFI_ADJUST_CFA_OFFSET 8 cli - TRACE_IRQS_OFF movl %esp, %eax /* Set up the 16bit stack frame with switch32 pointer on top, * and a switch16 pointer on top of the current frame. */ call setup_x86_bogus_stack - CFI_ADJUST_CFA_OFFSET -8 # frame has moved - TRACE_IRQS_IRET RESTORE_REGS lss 20+4(%esp), %esp # switch to 16bit stack 1: iret @@ -424,11 +301,9 @@ ldt_ss: .align 4 .long 1b,iret_exc .previous - CFI_ENDPROC # perform work that needs to be done immediately before resumption ALIGN - RING0_PTREGS_FRAME # can't unwind into user space anyway work_pending: testb $_TIF_NEED_RESCHED, %cl jz work_notifysig @@ -437,7 +312,6 @@ work_resched: cli # make sure we don't miss an interrupt # setting need_resched or sigpending # between sampling and the iret - TRACE_IRQS_OFF movl TI_flags(%ebp), %ecx andl $_TIF_WORK_MASK, %ecx # is there any work to be done other # than syscall tracing? @@ -453,20 +327,18 @@ work_notifysig: # deal with pending signals and # vm86-space xorl %edx, %edx call do_notify_resume - jmp resume_userspace_sig + jmp resume_userspace ALIGN work_notifysig_v86: #ifdef CONFIG_VM86 pushl %ecx # save ti_flags for do_notify_resume - CFI_ADJUST_CFA_OFFSET 4 call save_v86_state # %eax contains pt_regs pointer popl %ecx - CFI_ADJUST_CFA_OFFSET -4 movl %eax, %esp xorl %edx, %edx call do_notify_resume - jmp resume_userspace_sig + jmp resume_userspace #endif # perform syscall exit tracing @@ -489,28 +361,25 @@ syscall_trace_entry: syscall_exit_work: testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl jz work_pending - TRACE_IRQS_ON sti # could let do_syscall_trace() call # schedule() instead movl %esp, %eax movl $1, %edx call do_syscall_trace jmp resume_userspace - CFI_ENDPROC - RING0_INT_FRAME # can't unwind into user space anyway + ALIGN syscall_fault: pushl %eax # save orig_eax - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL GET_THREAD_INFO(%ebp) movl $-EFAULT,EAX(%esp) jmp resume_userspace + ALIGN syscall_badsys: movl $-ENOSYS,EAX(%esp) jmp resume_userspace - CFI_ENDPROC #define FIXUP_ESPFIX_STACK \ movl %esp, %eax; \ @@ -522,21 +391,16 @@ syscall_badsys: movl %eax, %esp; #define UNWIND_ESPFIX_STACK \ pushl %eax; \ - CFI_ADJUST_CFA_OFFSET 4; \ movl %ss, %eax; \ /* see if on 16bit stack */ \ cmpw $__ESPFIX_SS, %ax; \ - je 28f; \ -27: popl %eax; \ - CFI_ADJUST_CFA_OFFSET -4; \ -.section .fixup,"ax"; \ -28: movl $__KERNEL_DS, %eax; \ - movl %eax, %ds; \ - movl %eax, %es; \ + jne 28f; \ + movl $__KERNEL_DS, %edx; \ + movl %edx, %ds; \ + movl %edx, %es; \ /* switch to 32bit stack */ \ - FIXUP_ESPFIX_STACK; \ - jmp 27b; \ -.previous + FIXUP_ESPFIX_STACK \ +28: popl %eax; /* * Build the entry stubs and pointer table with @@ -548,14 +412,9 @@ ENTRY(interrupt) vector=0 ENTRY(irq_entries_start) - RING0_INT_FRAME .rept NR_IRQS ALIGN - .if vector - CFI_ADJUST_CFA_OFFSET -4 - .endif 1: pushl $~(vector) - CFI_ADJUST_CFA_OFFSET 4 jmp common_interrupt .data .long 1b @@ -563,111 +422,66 @@ ENTRY(irq_entries_start) vector=vector+1 .endr -/* - * the CPU automatically disables interrupts when executing an IRQ vector, - * so IRQ-flags tracing has to follow that: - */ ALIGN common_interrupt: SAVE_ALL - TRACE_IRQS_OFF movl %esp,%eax call do_IRQ jmp ret_from_intr - CFI_ENDPROC #define BUILD_INTERRUPT(name, nr) \ ENTRY(name) \ - RING0_INT_FRAME; \ pushl $~(nr); \ - CFI_ADJUST_CFA_OFFSET 4; \ - SAVE_ALL; \ - TRACE_IRQS_OFF \ + SAVE_ALL \ movl %esp,%eax; \ call smp_/**/name; \ - jmp ret_from_intr; \ - CFI_ENDPROC + jmp ret_from_intr; /* The include is where all of the SMP etc. interrupts come from */ #include "entry_arch.h" ENTRY(divide_error) - RING0_INT_FRAME pushl $0 # no error code - CFI_ADJUST_CFA_OFFSET 4 pushl $do_divide_error - CFI_ADJUST_CFA_OFFSET 4 ALIGN error_code: pushl %ds - CFI_ADJUST_CFA_OFFSET 4 - /*CFI_REL_OFFSET ds, 0*/ pushl %eax - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET eax, 0 xorl %eax, %eax pushl %ebp - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ebp, 0 pushl %edi - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edi, 0 pushl %esi - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET esi, 0 pushl %edx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET edx, 0 decl %eax # eax = -1 pushl %ecx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ecx, 0 pushl %ebx - CFI_ADJUST_CFA_OFFSET 4 - CFI_REL_OFFSET ebx, 0 cld pushl %es - CFI_ADJUST_CFA_OFFSET 4 - /*CFI_REL_OFFSET es, 0*/ UNWIND_ESPFIX_STACK popl %ecx - CFI_ADJUST_CFA_OFFSET -4 - /*CFI_REGISTER es, ecx*/ movl ES(%esp), %edi # get the function address movl ORIG_EAX(%esp), %edx # get the error code movl %eax, ORIG_EAX(%esp) movl %ecx, ES(%esp) - /*CFI_REL_OFFSET es, ES*/ movl $(__USER_DS), %ecx movl %ecx, %ds movl %ecx, %es movl %esp,%eax # pt_regs pointer call *%edi jmp ret_from_exception - CFI_ENDPROC ENTRY(coprocessor_error) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_coprocessor_error - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(simd_coprocessor_error) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_simd_coprocessor_error - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(device_not_available) - RING0_INT_FRAME pushl $-1 # mark this as an int - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL movl %cr0, %eax testl $0x4, %eax # EM (math emulation bit) @@ -677,12 +491,9 @@ ENTRY(device_not_available) jmp ret_from_exception device_not_available_emulate: pushl $0 # temporary storage for ORIG_EIP - CFI_ADJUST_CFA_OFFSET 4 call math_emulate addl $4, %esp - CFI_ADJUST_CFA_OFFSET -4 jmp ret_from_exception - CFI_ENDPROC /* * Debug traps and NMI can happen at the one SYSENTER instruction @@ -702,30 +513,21 @@ device_not_available_emulate: jne ok; \ label: \ movl SYSENTER_stack_esp0+offset(%esp),%esp; \ - CFI_DEF_CFA esp, 0; \ - CFI_UNDEFINED eip; \ pushfl; \ - CFI_ADJUST_CFA_OFFSET 4; \ pushl $__KERNEL_CS; \ - CFI_ADJUST_CFA_OFFSET 4; \ - pushl $sysenter_past_esp; \ - CFI_ADJUST_CFA_OFFSET 4; \ - CFI_REL_OFFSET eip, 0 + pushl $sysenter_past_esp KPROBE_ENTRY(debug) - RING0_INT_FRAME cmpl $sysenter_entry,(%esp) jne debug_stack_correct FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn) debug_stack_correct: pushl $-1 # mark this as an int - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL xorl %edx,%edx # error code 0 movl %esp,%eax # pt_regs pointer call do_debug jmp ret_from_exception - CFI_ENDPROC .previous .text /* * NMI is doubly nasty. It can happen _while_ we're handling @@ -736,18 +538,14 @@ debug_stack_correct: * fault happened on the sysenter path. */ ENTRY(nmi) - RING0_INT_FRAME pushl %eax - CFI_ADJUST_CFA_OFFSET 4 movl %ss, %eax cmpw $__ESPFIX_SS, %ax popl %eax - CFI_ADJUST_CFA_OFFSET -4 je nmi_16bit_stack cmpl $sysenter_entry,(%esp) je nmi_stack_fixup pushl %eax - CFI_ADJUST_CFA_OFFSET 4 movl %esp,%eax /* Do not access memory above the end of our stack page, * it might not exist. @@ -755,28 +553,21 @@ ENTRY(nmi) andl $(THREAD_SIZE-1),%eax cmpl $(THREAD_SIZE-20),%eax popl %eax - CFI_ADJUST_CFA_OFFSET -4 jae nmi_stack_correct cmpl $sysenter_entry,12(%esp) je nmi_debug_stack_check nmi_stack_correct: - /* We have a RING0_INT_FRAME here */ pushl %eax - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL xorl %edx,%edx # zero error code movl %esp,%eax # pt_regs pointer call do_nmi - jmp restore_nocheck_notrace - CFI_ENDPROC + jmp restore_all nmi_stack_fixup: - RING0_INT_FRAME FIX_STACK(12,nmi_stack_correct, 1) jmp nmi_stack_correct - nmi_debug_stack_check: - /* We have a RING0_INT_FRAME here */ cmpw $__KERNEL_CS,16(%esp) jne nmi_stack_correct cmpl $debug,(%esp) @@ -787,192 +578,94 @@ nmi_debug_stack_check: jmp nmi_stack_correct nmi_16bit_stack: - /* We have a RING0_INT_FRAME here. - * - * create the pointer to lss back - */ + /* create the pointer to lss back */ pushl %ss - CFI_ADJUST_CFA_OFFSET 4 pushl %esp - CFI_ADJUST_CFA_OFFSET 4 movzwl %sp, %esp addw $4, (%esp) /* copy the iret frame of 12 bytes */ .rept 3 pushl 16(%esp) - CFI_ADJUST_CFA_OFFSET 4 .endr pushl %eax - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL FIXUP_ESPFIX_STACK # %eax == %esp - CFI_ADJUST_CFA_OFFSET -20 # the frame has now moved xorl %edx,%edx # zero error code call do_nmi RESTORE_REGS lss 12+4(%esp), %esp # back to 16bit stack 1: iret - CFI_ENDPROC .section __ex_table,"a" .align 4 .long 1b,iret_exc .previous KPROBE_ENTRY(int3) - RING0_INT_FRAME pushl $-1 # mark this as an int - CFI_ADJUST_CFA_OFFSET 4 SAVE_ALL xorl %edx,%edx # zero error code movl %esp,%eax # pt_regs pointer call do_int3 jmp ret_from_exception - CFI_ENDPROC .previous .text ENTRY(overflow) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_overflow - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(bounds) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_bounds - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(invalid_op) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_invalid_op - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(coprocessor_segment_overrun) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_coprocessor_segment_overrun - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(invalid_TSS) - RING0_EC_FRAME pushl $do_invalid_TSS - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(segment_not_present) - RING0_EC_FRAME pushl $do_segment_not_present - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC ENTRY(stack_segment) - RING0_EC_FRAME pushl $do_stack_segment - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC KPROBE_ENTRY(general_protection) - RING0_EC_FRAME pushl $do_general_protection - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC .previous .text ENTRY(alignment_check) - RING0_EC_FRAME pushl $do_alignment_check - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC KPROBE_ENTRY(page_fault) - RING0_EC_FRAME pushl $do_page_fault - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC .previous .text #ifdef CONFIG_X86_MCE ENTRY(machine_check) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl machine_check_vector - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC #endif ENTRY(spurious_interrupt_bug) - RING0_INT_FRAME pushl $0 - CFI_ADJUST_CFA_OFFSET 4 pushl $do_spurious_interrupt_bug - CFI_ADJUST_CFA_OFFSET 4 jmp error_code - CFI_ENDPROC - -#ifdef CONFIG_STACK_UNWIND -ENTRY(arch_unwind_init_running) - CFI_STARTPROC - movl 4(%esp), %edx - movl (%esp), %ecx - leal 4(%esp), %eax - movl %ebx, EBX(%edx) - xorl %ebx, %ebx - movl %ebx, ECX(%edx) - movl %ebx, EDX(%edx) - movl %esi, ESI(%edx) - movl %edi, EDI(%edx) - movl %ebp, EBP(%edx) - movl %ebx, EAX(%edx) - movl $__USER_DS, DS(%edx) - movl $__USER_DS, ES(%edx) - movl %ebx, ORIG_EAX(%edx) - movl %ecx, EIP(%edx) - movl 12(%esp), %ecx - movl $__KERNEL_CS, CS(%edx) - movl %ebx, EFLAGS(%edx) - movl %eax, OLDESP(%edx) - movl 8(%esp), %eax - movl %ecx, 8(%esp) - movl EBX(%edx), %ebx - movl $__KERNEL_DS, OLDSS(%edx) - jmpl *%eax - CFI_ENDPROC -ENDPROC(arch_unwind_init_running) -#endif - -ENTRY(kernel_thread_helper) - pushl $0 # fake return address for unwinder - CFI_STARTPROC - movl %edx,%eax - push %edx - CFI_ADJUST_CFA_OFFSET 4 - call *%ebx - push %eax - CFI_ADJUST_CFA_OFFSET 4 - call do_exit - CFI_ENDPROC -ENDPROC(kernel_thread_helper) .section .rodata,"a" #include "syscall_table.S" diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index a6b8bd89a..3debc2e26 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -8,6 +8,7 @@ */ .text +#include #include #include #include @@ -317,14 +318,20 @@ is386: movl $2,%ecx # set MP movl %eax,%gs lldt %ax cld # gcc2 wants the direction flag cleared at all times - pushl %eax # fake return address #ifdef CONFIG_SMP movb ready, %cl movb $1, ready - cmpb $0,%cl # the first CPU calls start_kernel - jne initialize_secondary # all other CPUs call initialize_secondary + cmpb $0,%cl + je 1f # the first CPU calls start_kernel + # all other CPUs call initialize_secondary + call initialize_secondary + jmp L6 +1: #endif /* CONFIG_SMP */ - jmp start_kernel + call start_kernel +L6: + jmp L6 # main should never return here, but + # just in case, we know what happens. /* * We depend on ET to be correct. This checks for 287/387. diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c deleted file mode 100644 index 17647a530..000000000 --- a/arch/i386/kernel/hpet.c +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include -#include - -#include -#include - -#define HPET_MASK CLOCKSOURCE_MASK(32) -#define HPET_SHIFT 22 - -/* FSEC = 10^-15 NSEC = 10^-9 */ -#define FSEC_PER_NSEC 1000000 - -static void *hpet_ptr; - -static cycle_t read_hpet(void) -{ - return (cycle_t)readl(hpet_ptr); -} - -static struct clocksource clocksource_hpet = { - .name = "hpet", - .rating = 250, - .read = read_hpet, - .mask = HPET_MASK, - .mult = 0, /* set below */ - .shift = HPET_SHIFT, - .is_continuous = 1, -}; - -static int __init init_hpet_clocksource(void) -{ - unsigned long hpet_period; - void __iomem* hpet_base; - u64 tmp; - - if (!is_hpet_enabled()) - return -ENODEV; - - /* calculate the hpet address: */ - hpet_base = - (void __iomem*)ioremap_nocache(hpet_address, HPET_MMAP_SIZE); - hpet_ptr = hpet_base + HPET_COUNTER; - - /* calculate the frequency: */ - hpet_period = readl(hpet_base + HPET_PERIOD); - - /* - * hpet period is in femto seconds per cycle - * so we need to convert this to ns/cyc units - * aproximated by mult/2^shift - * - * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift - * fsec/cyc * 1ns/1000000fsec * 2^shift = mult - * fsec/cyc * 2^shift * 1nsec/1000000fsec = mult - * (fsec/cyc << shift)/1000000 = mult - * (hpet_period << shift)/FSEC_PER_NSEC = mult - */ - tmp = (u64)hpet_period << HPET_SHIFT; - do_div(tmp, FSEC_PER_NSEC); - clocksource_hpet.mult = (u32)tmp; - - return clocksource_register(&clocksource_hpet); -} - -module_init(init_hpet_clocksource); diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index e3d4b73bf..036a98579 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c index 665847281..d75524758 100644 --- a/arch/i386/kernel/i387.c +++ b/arch/i386/kernel/i387.c @@ -8,6 +8,7 @@ * Gareth Hughes , May 2000 */ +#include #include #include #include @@ -24,7 +25,7 @@ #define HAVE_HWFP 1 #endif -static unsigned long mxcsr_feature_mask __read_mostly = 0xffffffff; +static unsigned long mxcsr_feature_mask = 0xffffffff; void mxcsr_feature_mask_init(void) { diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c deleted file mode 100644 index 477b24daf..000000000 --- a/arch/i386/kernel/i8253.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * i8253.c 8253/PIT functions - * - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "io_ports.h" - -DEFINE_SPINLOCK(i8253_lock); -EXPORT_SYMBOL(i8253_lock); - -void setup_pit_timer(void) -{ - unsigned long flags; - - spin_lock_irqsave(&i8253_lock, flags); - outb_p(0x34,PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ - udelay(10); - outb_p(LATCH & 0xff , PIT_CH0); /* LSB */ - udelay(10); - outb(LATCH >> 8 , PIT_CH0); /* MSB */ - spin_unlock_irqrestore(&i8253_lock, flags); -} - -/* - * Since the PIT overflows every tick, its not very useful - * to just read by itself. So use jiffies to emulate a free - * running counter: - */ -static cycle_t pit_read(void) -{ - unsigned long flags; - int count; - u32 jifs; - static int old_count; - static u32 old_jifs; - - spin_lock_irqsave(&i8253_lock, flags); - /* - * Although our caller may have the read side of xtime_lock, - * this is now a seqlock, and we are cheating in this routine - * by having side effects on state that we cannot undo if - * there is a collision on the seqlock and our caller has to - * retry. (Namely, old_jifs and old_count.) So we must treat - * jiffies as volatile despite the lock. We read jiffies - * before latching the timer count to guarantee that although - * the jiffies value might be older than the count (that is, - * the counter may underflow between the last point where - * jiffies was incremented and the point where we latch the - * count), it cannot be newer. - */ - jifs = jiffies; - outb_p(0x00, PIT_MODE); /* latch the count ASAP */ - count = inb_p(PIT_CH0); /* read the latched count */ - count |= inb_p(PIT_CH0) << 8; - - /* VIA686a test code... reset the latch if count > max + 1 */ - if (count > LATCH) { - outb_p(0x34, PIT_MODE); - outb_p(LATCH & 0xff, PIT_CH0); - outb(LATCH >> 8, PIT_CH0); - count = LATCH - 1; - } - - /* - * It's possible for count to appear to go the wrong way for a - * couple of reasons: - * - * 1. The timer counter underflows, but we haven't handled the - * resulting interrupt and incremented jiffies yet. - * 2. Hardware problem with the timer, not giving us continuous time, - * the counter does small "jumps" upwards on some Pentium systems, - * (see c't 95/10 page 335 for Neptun bug.) - * - * Previous attempts to handle these cases intelligently were - * buggy, so we just do the simple thing now. - */ - if (count > old_count && jifs == old_jifs) { - count = old_count; - } - old_count = count; - old_jifs = jifs; - - spin_unlock_irqrestore(&i8253_lock, flags); - - count = (LATCH - 1) - count; - - return (cycle_t)(jifs * LATCH) + count; -} - -static struct clocksource clocksource_pit = { - .name = "pit", - .rating = 110, - .read = pit_read, - .mask = CLOCKSOURCE_MASK(32), - .mult = 0, - .shift = 20, -}; - -static int __init init_pit_clocksource(void) -{ - if (num_possible_cpus() > 4) /* PIT does not scale! */ - return 0; - - clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20); - return clocksource_register(&clocksource_pit); -} -module_init(init_pit_clocksource); diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index d4756d154..323ef8ab3 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -131,7 +132,7 @@ void make_8259A_irq(unsigned int irq) { disable_irq_nosync(irq); io_apic_irqs &= ~(1< #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include @@ -50,7 +50,6 @@ atomic_t irq_mis_count; static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; static DEFINE_SPINLOCK(ioapic_lock); -static DEFINE_SPINLOCK(vector_lock); int timer_over_8254 __initdata = 1; @@ -268,7 +267,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask) # include /* kmalloc() */ # include /* time_after() */ -#ifdef CONFIG_BALANCED_IRQ_DEBUG +# ifdef CONFIG_BALANCED_IRQ_DEBUG # define TDprintk(x...) do { printk("<%ld:%s:%d>: ", jiffies, __FILE__, __LINE__); printk(x); } while (0) # define Dprintk(x...) do { TDprintk(x); } while (0) # else @@ -276,15 +275,10 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask) # define Dprintk(x...) # endif -#define IRQBALANCE_CHECK_ARCH -999 -#define MAX_BALANCED_IRQ_INTERVAL (5*HZ) -#define MIN_BALANCED_IRQ_INTERVAL (HZ/2) -#define BALANCED_IRQ_MORE_DELTA (HZ/10) -#define BALANCED_IRQ_LESS_DELTA (HZ) -static int irqbalance_disabled __read_mostly = IRQBALANCE_CHECK_ARCH; -static int physical_balance __read_mostly; -static long balanced_irq_interval __read_mostly = MAX_BALANCED_IRQ_INTERVAL; +#define IRQBALANCE_CHECK_ARCH -999 +static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH; +static int physical_balance = 0; static struct irq_cpu_info { unsigned long * last_irq; @@ -303,14 +297,12 @@ static struct irq_cpu_info { #define CPU_TO_PACKAGEINDEX(i) (first_cpu(cpu_sibling_map[i])) -static cpumask_t balance_irq_affinity[NR_IRQS] = { - [0 ... NR_IRQS-1] = CPU_MASK_ALL -}; +#define MAX_BALANCED_IRQ_INTERVAL (5*HZ) +#define MIN_BALANCED_IRQ_INTERVAL (HZ/2) +#define BALANCED_IRQ_MORE_DELTA (HZ/10) +#define BALANCED_IRQ_LESS_DELTA (HZ) -void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) -{ - balance_irq_affinity[irq] = mask; -} +static long balanced_irq_interval = MAX_BALANCED_IRQ_INTERVAL; static unsigned long move(int curr_cpu, cpumask_t allowed_mask, unsigned long now, int direction) @@ -348,7 +340,7 @@ static inline void balance_irq(int cpu, int irq) if (irqbalance_disabled) return; - cpus_and(allowed_mask, cpu_online_map, balance_irq_affinity[irq]); + cpus_and(allowed_mask, cpu_online_map, irq_affinity[irq]); new_cpu = move(cpu, allowed_mask, now, 1); if (cpu != new_cpu) { set_pending_irq(irq, cpumask_of_cpu(new_cpu)); @@ -537,9 +529,7 @@ tryanotherirq: } } - cpus_and(allowed_mask, - cpu_online_map, - balance_irq_affinity[selected_irq]); + cpus_and(allowed_mask, cpu_online_map, irq_affinity[selected_irq]); target_cpu_mask = cpumask_of_cpu(min_loaded); cpus_and(tmp, target_cpu_mask, allowed_mask); @@ -580,7 +570,7 @@ static int balanced_irq(void *unused) /* push everything to CPU 0 to give us a starting point. */ for (i = 0 ; i < NR_IRQS ; i++) { - irq_desc[i].pending_mask = cpumask_of_cpu(0); + pending_irq_cpumask[i] = cpumask_of_cpu(0); set_pending_irq(i, cpumask_of_cpu(0)); } @@ -1162,17 +1152,10 @@ u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }; int assign_irq_vector(int irq) { static int current_vector = FIRST_DEVICE_VECTOR, offset = 0; - unsigned long flags; - int vector; - - BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS); - spin_lock_irqsave(&vector_lock, flags); - - if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) { - spin_unlock_irqrestore(&vector_lock, flags); + BUG_ON(irq >= NR_IRQ_VECTORS); + if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) return IO_APIC_VECTOR(irq); - } next: current_vector += 8; if (current_vector == SYSCALL_VECTOR) @@ -1180,21 +1163,16 @@ next: if (current_vector >= FIRST_SYSTEM_VECTOR) { offset++; - if (!(offset%8)) { - spin_unlock_irqrestore(&vector_lock, flags); + if (!(offset%8)) return -ENOSPC; - } current_vector = FIRST_DEVICE_VECTOR + offset; } - vector = current_vector; - vector_irq[vector] = irq; + vector_irq[current_vector] = irq; if (irq != AUTO_ASSIGN) - IO_APIC_VECTOR(irq) = vector; - - spin_unlock_irqrestore(&vector_lock, flags); + IO_APIC_VECTOR(irq) = current_vector; - return vector; + return current_vector; } static struct hw_interrupt_type ioapic_level_type; @@ -1204,18 +1182,23 @@ static struct hw_interrupt_type ioapic_edge_type; #define IOAPIC_EDGE 0 #define IOAPIC_LEVEL 1 -static void ioapic_register_intr(int irq, int vector, unsigned long trigger) +static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger) { - unsigned idx; - - idx = use_pci_vector() && !platform_legacy_irq(irq) ? vector : irq; - - if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || - trigger == IOAPIC_LEVEL) - irq_desc[idx].chip = &ioapic_level_type; - else - irq_desc[idx].chip = &ioapic_edge_type; - set_intr_gate(vector, interrupt[idx]); + 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]); + } } static void __init setup_IO_APIC_irqs(void) @@ -1326,7 +1309,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in * The timer IRQ doesn't have to know that behind the * scene we have a 8259A-master in AEOI mode ... */ - irq_desc[0].chip = &ioapic_edge_type; + irq_desc[0].handler = &ioapic_edge_type; /* * Add it to the IO-APIC irq-routing table: @@ -2070,13 +2053,6 @@ static void set_ioapic_affinity_vector (unsigned int vector, #endif #endif -static int ioapic_retrigger(unsigned int irq) -{ - send_IPI_self(IO_APIC_VECTOR(irq)); - - return 1; -} - /* * Level and edge triggered IO-APIC interrupts need different handling, * so we use two separate IRQ descriptors. Edge triggered IRQs can be @@ -2096,7 +2072,6 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = { #ifdef CONFIG_SMP .set_affinity = set_ioapic_affinity, #endif - .retrigger = ioapic_retrigger, }; static struct hw_interrupt_type ioapic_level_type __read_mostly = { @@ -2110,7 +2085,6 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = { #ifdef CONFIG_SMP .set_affinity = set_ioapic_affinity, #endif - .retrigger = ioapic_retrigger, }; static inline void init_IO_APIC_traps(void) @@ -2145,7 +2119,7 @@ static inline void init_IO_APIC_traps(void) make_8259A_irq(irq); else /* Strange. Oh, well.. */ - irq_desc[irq].chip = &no_irq_type; + irq_desc[irq].handler = &no_irq_type; } } } @@ -2361,7 +2335,7 @@ static inline void check_timer(void) printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); disable_8259A_irq(0); - irq_desc[0].chip = &lapic_irq_type; + irq_desc[0].handler = &lapic_irq_type; apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ enable_8259A_irq(0); diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c index 498e8bc19..79026f026 100644 --- a/arch/i386/kernel/ioport.c +++ b/arch/i386/kernel/ioport.c @@ -79,7 +79,6 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) memset(bitmap, 0xff, IO_BITMAP_BYTES); t->io_bitmap_ptr = bitmap; - set_thread_flag(TIF_IO_BITMAP); } /* diff --git a/arch/i386/kernel/irq-xen.c b/arch/i386/kernel/irq-xen.c index 280c8fb4b..b4a38e4d9 100644 --- a/arch/i386/kernel/irq-xen.c +++ b/arch/i386/kernel/irq-xen.c @@ -42,8 +42,8 @@ union irq_ctx { u32 stack[THREAD_SIZE/sizeof(u32)]; }; -static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; -static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; +static union irq_ctx *hardirq_ctx[NR_CPUS]; +static union irq_ctx *softirq_ctx[NR_CPUS]; #endif /* @@ -60,12 +60,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) u32 *isp; #endif - if (unlikely((unsigned)irq >= NR_IRQS)) { - printk(KERN_EMERG "%s: cannot handle IRQ %d\n", - __FUNCTION__, irq); - BUG(); - } - irq_enter(); #ifdef CONFIG_DEBUG_STACKOVERFLOW /* Debugging check for stack overflow: is there less than 1KB free? */ @@ -81,6 +75,7 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) } } #endif + #ifdef CONFIG_4KSTACKS curctx = (union irq_ctx *) current_thread_info(); @@ -100,14 +95,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) irqctx->tinfo.task = curctx->tinfo.task; irqctx->tinfo.previous_esp = current_stack_pointer; - /* - * Copy the softirq bits in preempt_count so that the - * softirq checks work in the hardirq context. - */ - irqctx->tinfo.preempt_count = - (irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK) | - (curctx->tinfo.preempt_count & SOFTIRQ_MASK); - asm volatile( " xchgl %%ebx,%%esp \n" " call __do_IRQ \n" @@ -160,7 +147,7 @@ void irq_ctx_init(int cpu) irqctx->tinfo.task = NULL; irqctx->tinfo.exec_domain = NULL; irqctx->tinfo.cpu = cpu; - irqctx->tinfo.preempt_count = 0; + irqctx->tinfo.preempt_count = SOFTIRQ_OFFSET; irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); softirq_ctx[cpu] = irqctx; @@ -205,10 +192,6 @@ asmlinkage void do_softirq(void) : "0"(isp) : "memory", "cc", "edx", "ecx", "eax" ); - /* - * Shouldnt happen, we returned above if in_interrupt(): - */ - WARN_ON_ONCE(softirq_count()); } local_irq_restore(flags); @@ -236,7 +219,7 @@ int show_interrupts(struct seq_file *p, void *v) if (i == 0) { seq_printf(p, " "); for_each_online_cpu(j) - seq_printf(p, "CPU%-8d ",j); + seq_printf(p, "CPU%d ",j); seq_putc(p, '\n'); } @@ -252,7 +235,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -293,13 +276,13 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_desc[irq].affinity, map); + cpus_and(mask, irq_affinity[irq], map); if (any_online_cpu(mask) == NR_CPUS) { /*printk("Breaking affinity for irq %i\n", irq);*/ mask = map; } - if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity(irq, mask); + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); else if (irq_desc[irq].action && !(warned++)) printk("Cannot set affinity for irq %i\n", irq); } diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c index 5fe547cd8..2904a6686 100644 --- a/arch/i386/kernel/irq.c +++ b/arch/i386/kernel/irq.c @@ -42,8 +42,8 @@ union irq_ctx { u32 stack[THREAD_SIZE/sizeof(u32)]; }; -static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; -static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; +static union irq_ctx *hardirq_ctx[NR_CPUS]; +static union irq_ctx *softirq_ctx[NR_CPUS]; #endif /* @@ -60,12 +60,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) u32 *isp; #endif - if (unlikely((unsigned)irq >= NR_IRQS)) { - printk(KERN_EMERG "%s: cannot handle IRQ %d\n", - __FUNCTION__, irq); - BUG(); - } - irq_enter(); #ifdef CONFIG_DEBUG_STACKOVERFLOW /* Debugging check for stack overflow: is there less than 1KB free? */ @@ -101,14 +95,6 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) irqctx->tinfo.task = curctx->tinfo.task; irqctx->tinfo.previous_esp = current_stack_pointer; - /* - * Copy the softirq bits in preempt_count so that the - * softirq checks work in the hardirq context. - */ - irqctx->tinfo.preempt_count = - (irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK) | - (curctx->tinfo.preempt_count & SOFTIRQ_MASK); - asm volatile( " xchgl %%ebx,%%esp \n" " call __do_IRQ \n" @@ -161,7 +147,7 @@ void irq_ctx_init(int cpu) irqctx->tinfo.task = NULL; irqctx->tinfo.exec_domain = NULL; irqctx->tinfo.cpu = cpu; - irqctx->tinfo.preempt_count = 0; + irqctx->tinfo.preempt_count = SOFTIRQ_OFFSET; irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); softirq_ctx[cpu] = irqctx; @@ -206,10 +192,6 @@ asmlinkage void do_softirq(void) : "0"(isp) : "memory", "cc", "edx", "ecx", "eax" ); - /* - * Shouldnt happen, we returned above if in_interrupt(): - */ - WARN_ON_ONCE(softirq_count()); } local_irq_restore(flags); @@ -237,7 +219,7 @@ int show_interrupts(struct seq_file *p, void *v) if (i == 0) { seq_printf(p, " "); for_each_online_cpu(j) - seq_printf(p, "CPU%-8d",j); + seq_printf(p, "CPU%d ",j); seq_putc(p, '\n'); } @@ -253,7 +235,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -295,13 +277,13 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_desc[irq].affinity, map); + cpus_and(mask, irq_affinity[irq], map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; } - if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity(irq, mask); + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); else if (irq_desc[irq].action && !(warned++)) printk("Cannot set affinity for irq %i\n", irq); } diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index afe6505ca..38806f427 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c @@ -28,6 +28,7 @@ * added function-return probes. */ +#include #include #include #include @@ -56,85 +57,34 @@ static __always_inline void set_jmp_op(void *from, void *to) /* * returns non-zero if opcodes can be boosted. */ -static __always_inline int can_boost(kprobe_opcode_t *opcodes) +static __always_inline int can_boost(kprobe_opcode_t opcode) { -#define W(row,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,ba,bb,bc,bd,be,bf) \ - (((b0##UL << 0x0)|(b1##UL << 0x1)|(b2##UL << 0x2)|(b3##UL << 0x3) | \ - (b4##UL << 0x4)|(b5##UL << 0x5)|(b6##UL << 0x6)|(b7##UL << 0x7) | \ - (b8##UL << 0x8)|(b9##UL << 0x9)|(ba##UL << 0xa)|(bb##UL << 0xb) | \ - (bc##UL << 0xc)|(bd##UL << 0xd)|(be##UL << 0xe)|(bf##UL << 0xf)) \ - << (row % 32)) - /* - * Undefined/reserved opcodes, conditional jump, Opcode Extension - * Groups, and some special opcodes can not be boost. - */ - static const unsigned long twobyte_is_boostable[256 / 32] = { - /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - /* ------------------------------- */ - W(0x00, 0,0,1,1,0,0,1,0,1,1,0,0,0,0,0,0)| /* 00 */ - W(0x10, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), /* 10 */ - W(0x20, 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0)| /* 20 */ - W(0x30, 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0), /* 30 */ - W(0x40, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)| /* 40 */ - W(0x50, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), /* 50 */ - W(0x60, 1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1)| /* 60 */ - W(0x70, 0,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1), /* 70 */ - W(0x80, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)| /* 80 */ - W(0x90, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), /* 90 */ - W(0xa0, 1,1,0,1,1,1,0,0,1,1,0,1,1,1,0,1)| /* a0 */ - W(0xb0, 1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1), /* b0 */ - W(0xc0, 1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1)| /* c0 */ - W(0xd0, 0,1,1,1,0,1,0,0,1,1,0,1,1,1,0,1), /* d0 */ - W(0xe0, 0,1,1,0,0,1,0,0,1,1,0,1,1,1,0,1)| /* e0 */ - W(0xf0, 0,1,1,1,0,1,0,0,1,1,1,0,1,1,1,0) /* f0 */ - /* ------------------------------- */ - /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - }; -#undef W - kprobe_opcode_t opcode; - kprobe_opcode_t *orig_opcodes = opcodes; -retry: - if (opcodes - orig_opcodes > MAX_INSN_SIZE - 1) - return 0; - opcode = *(opcodes++); - - /* 2nd-byte opcode */ - if (opcode == 0x0f) { - if (opcodes - orig_opcodes > MAX_INSN_SIZE - 1) - return 0; - return test_bit(*opcodes, twobyte_is_boostable); - } - - switch (opcode & 0xf0) { - case 0x60: - if (0x63 < opcode && opcode < 0x67) - goto retry; /* prefixes */ - /* can't boost Address-size override and bound */ - return (opcode != 0x62 && opcode != 0x67); + switch (opcode & 0xf0 ) { case 0x70: return 0; /* can't boost conditional jump */ + case 0x90: + /* can't boost call and pushf */ + return opcode != 0x9a && opcode != 0x9c; case 0xc0: - /* can't boost software-interruptions */ - return (0xc1 < opcode && opcode < 0xcc) || opcode == 0xcf; + /* can't boost undefined opcodes and soft-interruptions */ + return (0xc1 < opcode && opcode < 0xc6) || + (0xc7 < opcode && opcode < 0xcc) || opcode == 0xcf; case 0xd0: /* can boost AA* and XLAT */ return (opcode == 0xd4 || opcode == 0xd5 || opcode == 0xd7); case 0xe0: - /* can boost in/out and absolute jmps */ - return ((opcode & 0x04) || opcode == 0xea); + /* can boost in/out and (may be) jmps */ + return (0xe3 < opcode && opcode != 0xe8); case 0xf0: - if ((opcode & 0x0c) == 0 && opcode != 0xf1) - goto retry; /* lock/rep(ne) prefix */ /* clear and set flags can be boost */ return (opcode == 0xf5 || (0xf7 < opcode && opcode < 0xfe)); default: - if (opcode == 0x26 || opcode == 0x36 || opcode == 0x3e) - goto retry; /* prefixes */ - /* can't boost CS override and call */ - return (opcode != 0x2e && opcode != 0x9a); + /* currently, can't boost 2 bytes opcodes */ + return opcode != 0x0f; } } + /* * returns non-zero if opcode modifies the interrupt flag. */ @@ -159,7 +109,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); p->opcode = *p->addr; - if (can_boost(p->addr)) { + if (can_boost(p->opcode)) { p->ainsn.boostable = 0; } else { p->ainsn.boostable = -1; @@ -256,6 +206,9 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) int ret = 0; kprobe_opcode_t *addr; struct kprobe_ctlblk *kcb; +#ifdef CONFIG_PREEMPT + unsigned pre_preempt_count = preempt_count(); +#endif /* CONFIG_PREEMPT */ addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); @@ -332,16 +285,22 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) /* handler has already set things up, so skip ss setup */ return 1; -ss_probe: -#ifndef CONFIG_PREEMPT - if (p->ainsn.boostable == 1 && !p->post_handler){ + if (p->ainsn.boostable == 1 && +#ifdef CONFIG_PREEMPT + !(pre_preempt_count) && /* + * This enables booster when the direct + * execution path aren't preempted. + */ +#endif /* CONFIG_PREEMPT */ + !p->post_handler && !p->break_handler ) { /* Boost up -- we can execute copied instructions directly */ reset_current_kprobe(); regs->eip = (unsigned long)p->ainsn.insn; preempt_enable_no_resched(); return 1; } -#endif + +ss_probe: prepare_singlestep(p, regs); kcb->kprobe_status = KPROBE_HIT_SS; return 1; @@ -648,7 +607,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, struct die_args *args = (struct die_args *)data; int ret = NOTIFY_DONE; - if (args->regs && user_mode_vm(args->regs)) + if (args->regs && user_mode(args->regs)) return ret; switch (val) { diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c index 6b1ae6ba7..f73d7374a 100644 --- a/arch/i386/kernel/machine_kexec.c +++ b/arch/i386/kernel/machine_kexec.c @@ -133,9 +133,9 @@ typedef asmlinkage NORET_TYPE void (*relocate_new_kernel_t)( unsigned long start_address, unsigned int has_pae) ATTRIB_NORET; -extern const unsigned char relocate_new_kernel[]; +const extern unsigned char relocate_new_kernel[]; extern void relocate_new_kernel_end(void); -extern const unsigned int relocate_new_kernel_size; +const extern unsigned int relocate_new_kernel_size; /* * A architecture hook called to validate the @@ -189,11 +189,14 @@ NORET_TYPE void machine_kexec(struct kimage *image) memcpy((void *)reboot_code_buffer, relocate_new_kernel, relocate_new_kernel_size); - /* The segment registers are funny things, they have both a - * visible and an invisible part. Whenever the visible part is - * set to a specific selector, the invisible part is loaded - * with from a table in memory. At no other time is the - * descriptor table in memory accessed. + /* The segment registers are funny things, they are + * automatically loaded from a table, in memory wherever you + * set them to a specific selector, but this table is never + * accessed again you set the segment to a different selector. + * + * The more common model is are caches where the behide + * the scenes work is done, but is also dropped at arbitrary + * times. * * I take advantage of this here by force loading the * segments, before I zap the gdt with an invalid value. diff --git a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c index cd5456f14..558bb2077 100644 --- a/arch/i386/kernel/mca.c +++ b/arch/i386/kernel/mca.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index e5520eb87..e7c138f66 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -91,10 +91,7 @@ MODULE_DESCRIPTION("Intel CPU (IA-32) Microcode Update Driver"); MODULE_AUTHOR("Tigran Aivazian "); MODULE_LICENSE("GPL"); -static int verbose; -module_param(verbose, int, 0644); - -#define MICROCODE_VERSION "1.14a" +#define MICROCODE_VERSION "1.14" #define DEFAULT_UCODE_DATASIZE (2000) /* 2000 bytes */ #define MC_HEADER_SIZE (sizeof (microcode_header_t)) /* 48 bytes */ @@ -125,15 +122,14 @@ static unsigned int user_buffer_size; /* it's size */ typedef enum mc_error_code { MC_SUCCESS = 0, - MC_IGNORED = 1, - MC_NOTFOUND = 2, - MC_MARKED = 3, - MC_ALLOCATED = 4, + MC_NOTFOUND = 1, + MC_MARKED = 2, + MC_ALLOCATED = 3, } mc_error_code_t; static struct ucode_cpu_info { unsigned int sig; - unsigned int pf, orig_pf; + unsigned int pf; unsigned int rev; unsigned int cksum; mc_error_code_t err; @@ -168,7 +164,6 @@ static void collect_cpu_info (void *unused) rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]); uci->pf = 1 << ((val[1] >> 18) & 7); } - uci->orig_pf = uci->pf; } wrmsr(MSR_IA32_UCODE_REV, 0, 0); @@ -202,34 +197,21 @@ static inline void mark_microcode_update (int cpu_num, microcode_header_t *mc_he pr_debug(" Checksum 0x%x\n", cksum); if (mc_header->rev < uci->rev) { - if (uci->err == MC_NOTFOUND) { - uci->err = MC_IGNORED; - uci->cksum = mc_header->rev; - } else if (uci->err == MC_IGNORED && uci->cksum < mc_header->rev) - uci->cksum = mc_header->rev; + printk(KERN_ERR "microcode: CPU%d not 'upgrading' to earlier revision" + " 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); + goto out; } else if (mc_header->rev == uci->rev) { - if (uci->err < MC_MARKED) { - /* notify the caller of success on this cpu */ - uci->err = MC_SUCCESS; - } - } else if (uci->err != MC_ALLOCATED || mc_header->rev > uci->mc->hdr.rev) { - pr_debug("microcode: CPU%d found a matching microcode update with " - " revision 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); - uci->cksum = cksum; - uci->pf = pf; /* keep the original mc pf for cksum calculation */ - uci->err = MC_MARKED; /* found the match */ - for_each_online_cpu(cpu_num) { - if (ucode_cpu_info + cpu_num != uci - && ucode_cpu_info[cpu_num].mc == uci->mc) { - uci->mc = NULL; - break; - } - } - if (uci->mc != NULL) { - vfree(uci->mc); - uci->mc = NULL; - } + /* notify the caller of success on this cpu */ + uci->err = MC_SUCCESS; + goto out; } + + pr_debug("microcode: CPU%d found a matching microcode update with " + " revision 0x%x (current=0x%x)\n", cpu_num, mc_header->rev, uci->rev); + uci->cksum = cksum; + uci->pf = pf; /* keep the original mc pf for cksum calculation */ + uci->err = MC_MARKED; /* found the match */ +out: return; } @@ -250,14 +232,14 @@ static int find_matching_ucodes (void) } total_size = get_totalsize(&mc_header); - if (cursor + total_size > user_buffer_size) { + if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) { printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); error = -EINVAL; goto out; } data_size = get_datasize(&mc_header); - if (data_size + MC_HEADER_SIZE > total_size) { + if ((data_size + MC_HEADER_SIZE > total_size) || (data_size < DEFAULT_UCODE_DATASIZE)) { printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); error = -EINVAL; goto out; @@ -271,8 +253,10 @@ static int find_matching_ucodes (void) for_each_online_cpu(cpu_num) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; + if (uci->err != MC_NOTFOUND) /* already found a match or not an online cpu*/ + continue; - if (sigmatch(mc_header.sig, uci->sig, mc_header.pf, uci->orig_pf)) + if (sigmatch(mc_header.sig, uci->sig, mc_header.pf, uci->pf)) mark_microcode_update(cpu_num, &mc_header, mc_header.sig, mc_header.pf, mc_header.cksum); } @@ -311,8 +295,9 @@ static int find_matching_ucodes (void) } for_each_online_cpu(cpu_num) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; - - if (sigmatch(ext_sig.sig, uci->sig, ext_sig.pf, uci->orig_pf)) { + if (uci->err != MC_NOTFOUND) /* already found a match or not an online cpu*/ + continue; + if (sigmatch(ext_sig.sig, uci->sig, ext_sig.pf, uci->pf)) { mark_microcode_update(cpu_num, &mc_header, ext_sig.sig, ext_sig.pf, ext_sig.cksum); } } @@ -383,13 +368,6 @@ static void do_update_one (void * unused) struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; if (uci->mc == NULL) { - if (verbose) { - if (uci->err == MC_SUCCESS) - printk(KERN_INFO "microcode: CPU%d already at revision 0x%x\n", - cpu_num, uci->rev); - else - printk(KERN_INFO "microcode: No new microcode data for CPU%d\n", cpu_num); - } return; } @@ -448,9 +426,6 @@ out_free: ucode_cpu_info[j].mc = NULL; } } - if (ucode_cpu_info[i].err == MC_IGNORED && verbose) - printk(KERN_WARNING "microcode: CPU%d not 'upgrading' to earlier revision" - " 0x%x (current=0x%x)\n", i, ucode_cpu_info[i].cksum, ucode_cpu_info[i].rev); } out: return error; @@ -460,6 +435,11 @@ static ssize_t microcode_write (struct file *file, const char __user *buf, size_ { ssize_t ret; + if (len < DEFAULT_UCODE_TOTALSIZE) { + printk(KERN_ERR "microcode: not enough data\n"); + return -EINVAL; + } + if ((len >> PAGE_SHIFT) > num_physpages) { printk(KERN_ERR "microcode: too much data (max %ld pages)\n", num_physpages); return -EINVAL; @@ -488,6 +468,7 @@ static struct file_operations microcode_fops = { static struct miscdevice microcode_dev = { .minor = MICROCODE_MINOR, .name = "microcode", + .devfs_name = "cpu/microcode", .fops = µcode_fops, }; diff --git a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c index 470cf97e7..2c6e3bed5 100644 --- a/arch/i386/kernel/module.c +++ b/arch/i386/kernel/module.c @@ -125,6 +125,7 @@ int module_finalize(const Elf_Ehdr *hdr, void *aseg = (void *)alt->sh_addr; apply_alternatives(aseg, aseg + alt->sh_size); } +#ifdef CONFIG_SMP if (locks && text) { void *lseg = (void *)locks->sh_addr; void *tseg = (void *)text->sh_addr; @@ -132,10 +133,13 @@ int module_finalize(const Elf_Ehdr *hdr, lseg, lseg + locks->sh_size, tseg, tseg + text->sh_size); } +#endif return 0; } void module_arch_cleanup(struct module *mod) { +#ifdef CONFIG_SMP alternatives_smp_module_del(mod); +#endif } diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index a70b5fa0e..6b1392d33 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index d535cdbbf..7a328230e 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c @@ -24,6 +24,7 @@ */ #include +#include #include #include @@ -250,9 +251,7 @@ static int msr_class_device_create(int i) return err; } -#ifdef CONFIG_HOTPLUG_CPU -static int msr_class_cpu_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) +static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -267,11 +266,10 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata msr_class_cpu_notifier = +static struct notifier_block msr_class_cpu_notifier = { .notifier_call = msr_class_cpu_callback, }; -#endif static int __init msr_init(void) { @@ -294,7 +292,7 @@ static int __init msr_init(void) if (err != 0) goto out_class; } - register_hotcpu_notifier(&msr_class_cpu_notifier); + register_cpu_notifier(&msr_class_cpu_notifier); err = 0; goto out; @@ -317,7 +315,7 @@ static void __exit msr_exit(void) class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); class_destroy(msr_class); unregister_chrdev(MSR_MAJOR, "cpu/msr"); - unregister_hotcpu_notifier(&msr_class_cpu_notifier); + unregister_cpu_notifier(&msr_class_cpu_notifier); } module_init(msr_init); diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index ce9d5bb75..d43b498ec 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -13,17 +13,22 @@ * Mikael Pettersson : PM converted to driver model. Disable/enable API. */ +#include +#include #include +#include +#include #include +#include +#include #include #include #include #include -#include #include +#include #include -#include #include "mach_traps.h" @@ -95,9 +100,6 @@ int nmi_active; (P4_CCCR_OVF_PMI0|P4_CCCR_THRESHOLD(15)|P4_CCCR_COMPLEMENT| \ P4_CCCR_COMPARE|P4_CCCR_REQUIRED|P4_CCCR_ESCR_SELECT(4)|P4_CCCR_ENABLE) -#define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL -#define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK - #ifdef CONFIG_SMP /* The performance counters used by NMI_LOCAL_APIC don't trigger when * the CPU is idle. To make sure the NMI watchdog really ticks on all @@ -106,7 +108,7 @@ int nmi_active; static __init void nmi_cpu_busy(void *data) { volatile int *endflag = data; - local_irq_enable_in_hardirq(); + local_irq_enable(); /* Intentionally don't use cpu_relax here. This is to make sure that the performance counter really ticks, even if there is a simulator or similar that catches the @@ -210,8 +212,6 @@ static int __init setup_nmi_watchdog(char *str) __setup("nmi_watchdog=", setup_nmi_watchdog); -static void disable_intel_arch_watchdog(void); - static void disable_lapic_nmi_watchdog(void) { if (nmi_active <= 0) @@ -221,10 +221,6 @@ static void disable_lapic_nmi_watchdog(void) wrmsr(MSR_K7_EVNTSEL0, 0, 0); break; case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - disable_intel_arch_watchdog(); - break; - } switch (boot_cpu_data.x86) { case 6: if (boot_cpu_data.x86_model > 0xd) @@ -453,53 +449,6 @@ static int setup_p4_watchdog(void) return 1; } -static void disable_intel_arch_watchdog(void) -{ - unsigned ebx; - - /* - * Check whether the Architectural PerfMon supports - * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. - */ - ebx = cpuid_ebx(10); - if (!(ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, 0, 0); -} - -static int setup_intel_arch_watchdog(void) -{ - unsigned int evntsel; - unsigned ebx; - - /* - * Check whether the Architectural PerfMon supports - * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. - */ - ebx = cpuid_ebx(10); - if ((ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - return 0; - - nmi_perfctr_msr = MSR_ARCH_PERFMON_PERFCTR0; - - clear_msr_range(MSR_ARCH_PERFMON_EVENTSEL0, 2); - clear_msr_range(MSR_ARCH_PERFMON_PERFCTR0, 2); - - evntsel = ARCH_PERFMON_EVENTSEL_INT - | ARCH_PERFMON_EVENTSEL_OS - | ARCH_PERFMON_EVENTSEL_USR - | ARCH_PERFMON_NMI_EVENT_SEL - | ARCH_PERFMON_NMI_EVENT_UMASK; - - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); - write_watchdog_counter("INTEL_ARCH_PERFCTR0"); - apic_write(APIC_LVTPC, APIC_DM_NMI); - evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE; - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); - return 1; -} - void setup_apic_nmi_watchdog (void) { switch (boot_cpu_data.x86_vendor) { @@ -509,11 +458,6 @@ void setup_apic_nmi_watchdog (void) setup_k7_watchdog(); break; case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - if (!setup_intel_arch_watchdog()) - return; - break; - } switch (boot_cpu_data.x86) { case 6: if (boot_cpu_data.x86_model > 0xd) @@ -574,7 +518,6 @@ void touch_nmi_watchdog (void) */ touch_softlockup_watchdog(); } -EXPORT_SYMBOL(touch_nmi_watchdog); extern void die_nmi(struct pt_regs *, const char *msg); @@ -618,8 +561,7 @@ void nmi_watchdog_tick (struct pt_regs * regs) wrmsr(MSR_P4_IQ_CCCR0, nmi_p4_cccr_val, 0); apic_write(APIC_LVTPC, APIC_DM_NMI); } - else if (nmi_perfctr_msr == MSR_P6_PERFCTR0 || - nmi_perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { + else if (nmi_perfctr_msr == MSR_P6_PERFCTR0) { /* Only P6 based Pentium M need to re-unmask * the apic vector but it doesn't hurt * other P6 variant */ diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c index 9000d82c6..5f5b075f8 100644 --- a/arch/i386/kernel/numaq.c +++ b/arch/i386/kernel/numaq.c @@ -23,6 +23,7 @@ * Send feedback to */ +#include #include #include #include @@ -78,12 +79,10 @@ int __init get_memcfg_numaq(void) return 1; } -static int __init numaq_tsc_disable(void) +static int __init numaq_dsc_disable(void) { - if (num_online_nodes() > 1) { - printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); - tsc_disable = 1; - } + printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); + tsc_disable = 1; return 0; } -arch_initcall(numaq_tsc_disable); +core_initcall(numaq_dsc_disable); diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index ea4ffbbda..a995ce854 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -101,7 +102,7 @@ void default_idle(void) local_irq_enable(); if (!hlt_counter && boot_cpu_data.hlt_works_ok) { - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); while (!need_resched()) { local_irq_disable(); @@ -110,7 +111,7 @@ void default_idle(void) else local_irq_enable(); } - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); } else { while (!need_resched()) cpu_relax(); @@ -173,7 +174,7 @@ void cpu_idle(void) { int cpu = smp_processor_id(); - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); /* endless idle loop with no priority at all */ while (1) { @@ -311,7 +312,7 @@ void show_regs(struct pt_regs * regs) cr3 = read_cr3(); cr4 = read_cr4_safe(); printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); - show_trace(NULL, regs, ®s->esp); + show_trace(NULL, ®s->esp); } /* @@ -320,6 +321,15 @@ void show_regs(struct pt_regs * regs) * the "args". */ extern void kernel_thread_helper(void); +__asm__(".section .text\n" + ".align 4\n" + "kernel_thread_helper:\n\t" + "movl %edx,%eax\n\t" + "pushl %edx\n\t" + "call *%ebx\n\t" + "pushl %eax\n\t" + "call do_exit\n" + ".previous"); /* * Create a kernel thread @@ -327,7 +337,6 @@ extern void kernel_thread_helper(void); int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { struct pt_regs regs; - int err; memset(®s, 0, sizeof(regs)); @@ -342,10 +351,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2; /* Ok, create the new process.. */ - err = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL); - if (err == 0) /* terminate kernel stack */ - task_pt_regs(current)->eip = 0; - return err; + return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL); } EXPORT_SYMBOL(kernel_thread); @@ -354,16 +360,16 @@ EXPORT_SYMBOL(kernel_thread); */ void exit_thread(void) { + struct task_struct *tsk = current; + struct thread_struct *t = &tsk->thread; + /* The process may have allocated an io port bitmap... nuke it. */ - if (unlikely(test_thread_flag(TIF_IO_BITMAP))) { - struct task_struct *tsk = current; - struct thread_struct *t = &tsk->thread; + if (unlikely(NULL != t->io_bitmap_ptr)) { int cpu = get_cpu(); struct tss_struct *tss = &per_cpu(init_tss, cpu); kfree(t->io_bitmap_ptr); t->io_bitmap_ptr = NULL; - clear_thread_flag(TIF_IO_BITMAP); /* * Careful, clear this in the TSS too: */ @@ -382,7 +388,6 @@ void flush_thread(void) memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8); memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); - clear_tsk_thread_flag(tsk, TIF_DEBUG); /* * Forget coprocessor state.. */ @@ -427,7 +432,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, savesegment(gs,p->thread.gs); tsk = current; - if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { + if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) { p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); if (!p->thread.io_bitmap_ptr) { p->thread.io_bitmap_max = 0; @@ -435,7 +440,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, } memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr, IO_BITMAP_BYTES); - set_tsk_thread_flag(p, TIF_IO_BITMAP); } /* @@ -530,24 +534,10 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) return 1; } -static noinline void __switch_to_xtra(struct task_struct *next_p, - struct tss_struct *tss) +static inline void +handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss) { - struct thread_struct *next; - - next = &next_p->thread; - - if (test_tsk_thread_flag(next_p, TIF_DEBUG)) { - set_debugreg(next->debugreg[0], 0); - set_debugreg(next->debugreg[1], 1); - set_debugreg(next->debugreg[2], 2); - set_debugreg(next->debugreg[3], 3); - /* no 4 and 5 */ - set_debugreg(next->debugreg[6], 6); - set_debugreg(next->debugreg[7], 7); - } - - if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { + if (!next->io_bitmap_ptr) { /* * Disable the bitmap via an invalid offset. We still cache * the previous bitmap owner and the IO bitmap contents: @@ -555,7 +545,6 @@ static noinline void __switch_to_xtra(struct task_struct *next_p, tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET; return; } - if (likely(next == tss->io_bitmap_owner)) { /* * Previous owner of the bitmap (hence the bitmap content) @@ -685,11 +674,20 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas set_iopl_mask(next->iopl); /* - * Now maybe handle debug registers and/or IO bitmaps + * Now maybe reload the debug registers */ - if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW) - || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP))) - __switch_to_xtra(next_p, tss); + if (unlikely(next->debugreg[7])) { + set_debugreg(next->debugreg[0], 0); + set_debugreg(next->debugreg[1], 1); + set_debugreg(next->debugreg[2], 2); + set_debugreg(next->debugreg[3], 3); + /* no 4 and 5 */ + set_debugreg(next->debugreg[6], 6); + set_debugreg(next->debugreg[7], 7); + } + + if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) + handle_io_bitmap(next, tss); disable_tsc(prev_p, next_p); diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index d3db03f40..fd7eaf786 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -468,11 +468,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) for(i=0; i<4; i++) if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1) goto out_tsk; - if (data) - set_tsk_thread_flag(child, TIF_DEBUG); - else - clear_tsk_thread_flag(child, TIF_DEBUG); } + addr -= (long) &dummy->u_debugreg; addr = addr >> 2; child->thread.debugreg[addr] = data; diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index 9f6ab1789..87ccdac84 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c @@ -1,6 +1,7 @@ /* * This file contains work-arounds for x86 and x86_64 platform bugs. */ +#include #include #include diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 54cfeabbc..d20724297 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c @@ -2,6 +2,7 @@ * linux/arch/i386/kernel/reboot.c */ +#include #include #include #include diff --git a/arch/i386/kernel/scx200.c b/arch/i386/kernel/scx200.c index c7d3df23f..321f5fd26 100644 --- a/arch/i386/kernel/scx200.c +++ b/arch/i386/kernel/scx200.c @@ -4,11 +4,11 @@ National Semiconductor SCx200 support. */ +#include #include #include #include #include -#include #include #include @@ -45,19 +45,11 @@ static struct pci_driver scx200_pci_driver = { .probe = scx200_probe, }; -static DEFINE_MUTEX(scx200_gpio_config_lock); - -static void __devinit scx200_init_shadow(void) -{ - int bank; - - /* read the current values driven on the GPIO signals */ - for (bank = 0; bank < 2; ++bank) - scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); -} +static DEFINE_SPINLOCK(scx200_gpio_config_lock); static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { + int bank; unsigned base; if (pdev->device == PCI_DEVICE_ID_NS_SCx200_BRIDGE || @@ -71,7 +63,10 @@ static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_ } scx200_gpio_base = base; - scx200_init_shadow(); + + /* read the current values driven on the GPIO signals */ + for (bank = 0; bank < 2; ++bank) + scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); } else { /* find the base of the Configuration Block */ @@ -92,11 +87,12 @@ static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_ return 0; } -u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits) +u32 scx200_gpio_configure(int index, u32 mask, u32 bits) { u32 config, new_config; + unsigned long flags; - mutex_lock(&scx200_gpio_config_lock); + spin_lock_irqsave(&scx200_gpio_config_lock, flags); outl(index, scx200_gpio_base + 0x20); config = inl(scx200_gpio_base + 0x24); @@ -104,11 +100,45 @@ u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits) new_config = (config & mask) | bits; outl(new_config, scx200_gpio_base + 0x24); - mutex_unlock(&scx200_gpio_config_lock); + spin_unlock_irqrestore(&scx200_gpio_config_lock, flags); return config; } +#if 0 +void scx200_gpio_dump(unsigned index) +{ + u32 config = scx200_gpio_configure(index, ~0, 0); + printk(KERN_DEBUG "GPIO%02u: 0x%08lx", index, (unsigned long)config); + + if (config & 1) + printk(" OE"); /* output enabled */ + else + printk(" TS"); /* tristate */ + if (config & 2) + printk(" PP"); /* push pull */ + else + printk(" OD"); /* open drain */ + if (config & 4) + printk(" PUE"); /* pull up enabled */ + else + printk(" PUD"); /* pull up disabled */ + if (config & 8) + printk(" LOCKED"); /* locked */ + if (config & 16) + printk(" LEVEL"); /* level input */ + else + printk(" EDGE"); /* edge input */ + if (config & 32) + printk(" HI"); /* trigger on rising edge */ + else + printk(" LO"); /* trigger on falling edge */ + if (config & 64) + printk(" DEBOUNCE"); /* debounce */ + printk("\n"); +} +#endif /* 0 */ + static int __init scx200_init(void) { printk(KERN_INFO NAME ": NatSemi SCx200 Driver\n"); @@ -129,3 +159,10 @@ EXPORT_SYMBOL(scx200_gpio_base); EXPORT_SYMBOL(scx200_gpio_shadow); EXPORT_SYMBOL(scx200_gpio_configure); EXPORT_SYMBOL(scx200_cb_base); + +/* + Local variables: + compile-command: "make -k -C ../../.. SUBDIRS=arch/i386/kernel modules" + c-basic-offset: 8 + End: +*/ diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c index 98352c374..967dc74df 100644 --- a/arch/i386/kernel/semaphore.c +++ b/arch/i386/kernel/semaphore.c @@ -12,6 +12,7 @@ * * rw semaphores implemented November 1999 by Benjamin LaHaise */ +#include #include /* diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index f1682206d..dd6b0e338 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -23,10 +23,11 @@ * This file handles the architecture-dependent parts of initialization */ +#include #include #include #include -#include +#include #include #include #include @@ -59,7 +60,7 @@ #include #include #include -#include +#include "setup_arch_pre.h" #include /* Forward Declaration. */ @@ -409,8 +410,8 @@ static void __init limit_regions(unsigned long long size) } } -void __init add_memory_region(unsigned long long start, - unsigned long long size, int type) +static void __init add_memory_region(unsigned long long start, + unsigned long long size, int type) { int x; @@ -473,7 +474,7 @@ static struct change_member *change_point[2*E820MAX] __initdata; static struct e820entry *overlap_list[E820MAX] __initdata; static struct e820entry new_bios[E820MAX] __initdata; -int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) +static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) { struct change_member *change_tmp; unsigned long current_type, last_type; @@ -642,7 +643,7 @@ int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) * thinkpad 560x, for example, does not cooperate with the memory * detection code.) */ -int __init copy_e820_map(struct e820entry * biosmap, int nr_map) +static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) { /* Only one memory region (or negative)? Ignore it */ if (nr_map < 2) @@ -700,6 +701,12 @@ static inline void copy_edd(void) } #endif +/* + * Do NOT EVER look at the BIOS memory size location. + * It does not work on many machines. + */ +#define LOWMEMSIZE() (0x9f000) + static void __init parse_cmdline_early (char ** cmdline_p) { char c = ' ', *to = command_line, *from = saved_command_line; @@ -1313,10 +1320,8 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat probe_roms(); for (i = 0; i < e820.nr_map; i++) { struct resource *res; -#ifndef CONFIG_RESOURCES_64BIT if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) continue; -#endif res = kzalloc(sizeof(struct resource), GFP_ATOMIC); switch (e820.map[i].type) { case E820_RAM: res->name = "System RAM"; break; @@ -1327,10 +1332,7 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat res->start = e820.map[i].addr; res->end = res->start + e820.map[i].size - 1; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; - if (request_resource(&iomem_resource, res)) { - kfree(res); - continue; - } + request_resource(&iomem_resource, res); if (e820.map[i].type == E820_RAM) { /* * We don't know which RAM region contains kernel data, @@ -1421,6 +1423,8 @@ static void __init register_memory(void) pci_mem_start, gapstart, gapsize); } +static char * __init machine_specific_memory_setup(void); + #ifdef CONFIG_MCA static void set_mca_bus(int x) { @@ -1579,7 +1583,6 @@ void __init setup_arch(char **cmdline_p) conswitchp = &dummy_con; #endif #endif - tsc_init(); } static __init int add_pcspkr(void) @@ -1599,6 +1602,7 @@ static __init int add_pcspkr(void) } device_initcall(add_pcspkr); +#include "setup_arch_post.h" /* * Local Variables: * mode:c diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 43002cfb4..9ffe9bf14 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -351,7 +351,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, goto give_sigsegv; } - restorer = (void *)VDSO_SYM(&__kernel_sigreturn); + restorer = current->mm->context.vdso + (long)&__kernel_sigreturn; if (ka->sa.sa_flags & SA_RESTORER) restorer = ka->sa.sa_restorer; @@ -447,7 +447,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, goto give_sigsegv; /* Set up to return from userspace. */ - restorer = (void *)VDSO_SYM(&__kernel_rt_sigreturn); + restorer = current->mm->context.vdso + (long)&__kernel_rt_sigreturn; if (ka->sa.sa_flags & SA_RESTORER) restorer = ka->sa.sa_restorer; err |= __put_user(restorer, &frame->pretcode); diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index d2523c3ce..a48c8c035 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c @@ -115,17 +115,7 @@ DEFINE_PER_CPU(struct tlb_state, cpu_tlbstate) ____cacheline_aligned = { &init_m static inline int __prepare_ICR (unsigned int shortcut, int vector) { - unsigned int icr = shortcut | APIC_DEST_LOGICAL; - - switch (vector) { - default: - icr |= APIC_DM_FIXED | vector; - break; - case NMI_VECTOR: - icr |= APIC_DM_NMI; - break; - } - return icr; + return APIC_DM_FIXED | shortcut | vector | APIC_DEST_LOGICAL; } static inline int __prepare_ICR2 (unsigned int mask) diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 42f7799e3..825b2b4ca 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -34,6 +34,7 @@ * Rusty Russell : Hacked into shape for new "hotplug" boot process. */ #include +#include #include #include @@ -51,7 +52,6 @@ #include #include #include -#include #include #include @@ -66,6 +66,12 @@ int smp_num_siblings = 1; EXPORT_SYMBOL(smp_num_siblings); #endif +/* Package ID of each logical CPU */ +int phys_proc_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID}; + +/* Core ID of each logical CPU */ +int cpu_core_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID}; + /* Last level cache ID of each logical CPU */ int cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; @@ -212,20 +218,14 @@ valid_k7: * then we print a warning if not, and always resync. */ -static struct { - atomic_t start_flag; - atomic_t count_start; - atomic_t count_stop; - unsigned long long values[NR_CPUS]; -} tsc __initdata = { - .start_flag = ATOMIC_INIT(0), - .count_start = ATOMIC_INIT(0), - .count_stop = ATOMIC_INIT(0), -}; +static atomic_t tsc_start_flag = ATOMIC_INIT(0); +static atomic_t tsc_count_start = ATOMIC_INIT(0); +static atomic_t tsc_count_stop = ATOMIC_INIT(0); +static unsigned long long tsc_values[NR_CPUS]; #define NR_LOOPS 5 -static void __init synchronize_tsc_bp(void) +static void __init synchronize_tsc_bp (void) { int i; unsigned long long t0; @@ -239,7 +239,7 @@ static void __init synchronize_tsc_bp(void) /* convert from kcyc/sec to cyc/usec */ one_usec = cpu_khz / 1000; - atomic_set(&tsc.start_flag, 1); + atomic_set(&tsc_start_flag, 1); wmb(); /* @@ -256,16 +256,16 @@ static void __init synchronize_tsc_bp(void) /* * all APs synchronize but they loop on '== num_cpus' */ - while (atomic_read(&tsc.count_start) != num_booting_cpus()-1) - cpu_relax(); - atomic_set(&tsc.count_stop, 0); + while (atomic_read(&tsc_count_start) != num_booting_cpus()-1) + mb(); + atomic_set(&tsc_count_stop, 0); wmb(); /* * this lets the APs save their current TSC: */ - atomic_inc(&tsc.count_start); + atomic_inc(&tsc_count_start); - rdtscll(tsc.values[smp_processor_id()]); + rdtscll(tsc_values[smp_processor_id()]); /* * We clear the TSC in the last loop: */ @@ -275,54 +275,56 @@ static void __init synchronize_tsc_bp(void) /* * Wait for all APs to leave the synchronization point: */ - while (atomic_read(&tsc.count_stop) != num_booting_cpus()-1) - cpu_relax(); - atomic_set(&tsc.count_start, 0); + while (atomic_read(&tsc_count_stop) != num_booting_cpus()-1) + mb(); + atomic_set(&tsc_count_start, 0); wmb(); - atomic_inc(&tsc.count_stop); + atomic_inc(&tsc_count_stop); } sum = 0; for (i = 0; i < NR_CPUS; i++) { if (cpu_isset(i, cpu_callout_map)) { - t0 = tsc.values[i]; + t0 = tsc_values[i]; sum += t0; } } avg = sum; do_div(avg, num_booting_cpus()); + sum = 0; for (i = 0; i < NR_CPUS; i++) { if (!cpu_isset(i, cpu_callout_map)) continue; - delta = tsc.values[i] - avg; + delta = tsc_values[i] - avg; if (delta < 0) delta = -delta; /* * We report bigger than 2 microseconds clock differences. */ if (delta > 2*one_usec) { - long long realdelta; - + long realdelta; if (!buggy) { buggy = 1; printk("\n"); } realdelta = delta; do_div(realdelta, one_usec); - if (tsc.values[i] < avg) + if (tsc_values[i] < avg) realdelta = -realdelta; - if (realdelta) - printk(KERN_INFO "CPU#%d had %Ld usecs TSC " + if (realdelta > 0) + printk(KERN_INFO "CPU#%d had %ld usecs TSC " "skew, fixed it up.\n", i, realdelta); } + + sum += delta; } if (!buggy) printk("passed.\n"); } -static void __init synchronize_tsc_ap(void) +static void __init synchronize_tsc_ap (void) { int i; @@ -331,21 +333,19 @@ static void __init synchronize_tsc_ap(void) * this gets called, so we first wait for the BP to * finish SMP initialization: */ - while (!atomic_read(&tsc.start_flag)) - cpu_relax(); + while (!atomic_read(&tsc_start_flag)) mb(); for (i = 0; i < NR_LOOPS; i++) { - atomic_inc(&tsc.count_start); - while (atomic_read(&tsc.count_start) != num_booting_cpus()) - cpu_relax(); + atomic_inc(&tsc_count_start); + while (atomic_read(&tsc_count_start) != num_booting_cpus()) + mb(); - rdtscll(tsc.values[smp_processor_id()]); + rdtscll(tsc_values[smp_processor_id()]); if (i == NR_LOOPS-1) write_tsc(0, 0); - atomic_inc(&tsc.count_stop); - while (atomic_read(&tsc.count_stop) != num_booting_cpus()) - cpu_relax(); + atomic_inc(&tsc_count_stop); + while (atomic_read(&tsc_count_stop) != num_booting_cpus()) mb(); } } #undef NR_LOOPS @@ -451,12 +451,10 @@ cpumask_t cpu_coregroup_map(int cpu) struct cpuinfo_x86 *c = cpu_data + cpu; /* * For perf, we return last level cache shared map. - * And for power savings, we return cpu_core_map + * TBD: when power saving sched policy is added, we will return + * cpu_core_map when power saving policy is enabled */ - if (sched_mc_power_savings || sched_smt_power_savings) - return cpu_core_map[cpu]; - else - return c->llc_shared_map; + return c->llc_shared_map; } /* representing cpus for which sibling maps can be computed */ @@ -472,8 +470,8 @@ set_cpu_sibling_map(int cpu) if (smp_num_siblings > 1) { for_each_cpu_mask(i, cpu_sibling_setup_map) { - if (c[cpu].phys_proc_id == c[i].phys_proc_id && - c[cpu].cpu_core_id == c[i].cpu_core_id) { + if (phys_proc_id[cpu] == phys_proc_id[i] && + cpu_core_id[cpu] == cpu_core_id[i]) { cpu_set(i, cpu_sibling_map[cpu]); cpu_set(cpu, cpu_sibling_map[i]); cpu_set(i, cpu_core_map[cpu]); @@ -500,7 +498,7 @@ set_cpu_sibling_map(int cpu) cpu_set(i, c[cpu].llc_shared_map); cpu_set(cpu, c[i].llc_shared_map); } - if (c[cpu].phys_proc_id == c[i].phys_proc_id) { + if (phys_proc_id[cpu] == phys_proc_id[i]) { cpu_set(i, cpu_core_map[cpu]); cpu_set(cpu, cpu_core_map[i]); /* @@ -642,13 +640,9 @@ static void map_cpu_to_logical_apicid(void) { int cpu = smp_processor_id(); int apicid = logical_smp_processor_id(); - int node = apicid_to_node(apicid); - - if (!node_online(node)) - node = first_online_node; cpu_2_logical_apicid[cpu] = apicid; - map_cpu_to_node(cpu, node); + map_cpu_to_node(cpu, apicid_to_node(apicid)); } static void unmap_cpu_to_logical_apicid(int cpu) @@ -1055,11 +1049,10 @@ static void __cpuinit do_warm_boot_cpu(void *p) static int __cpuinit __smp_prepare_cpu(int cpu) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); struct warm_boot_cpu_info info; struct work_struct task; int apicid, ret; - struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); apicid = x86_cpu_to_apicid[cpu]; if (apicid == BAD_APICID) { @@ -1067,18 +1060,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu) goto exit; } - /* - * the CPU isn't initialized at boot time, allocate gdt table here. - * cpu_init will initialize it - */ - if (!cpu_gdt_descr->address) { - cpu_gdt_descr->address = get_zeroed_page(GFP_KERNEL); - if (!cpu_gdt_descr->address) - printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu); - ret = -ENOMEM; - goto exit; - } - info.complete = &done; info.apicid = apicid; info.cpu = cpu; @@ -1356,8 +1337,8 @@ remove_siblinginfo(int cpu) cpu_clear(cpu, cpu_sibling_map[sibling]); cpus_clear(cpu_sibling_map[cpu]); cpus_clear(cpu_core_map[cpu]); - c[cpu].phys_proc_id = 0; - c[cpu].cpu_core_id = 0; + phys_proc_id[cpu] = BAD_APICID; + cpu_core_id[cpu] = BAD_APICID; cpu_clear(cpu, cpu_sibling_setup_map); } @@ -1452,7 +1433,7 @@ int __devinit __cpu_up(unsigned int cpu) /* Unleash the CPU! */ cpu_set(cpu, smp_commenced_mask); while (!cpu_isset(cpu, cpu_online_map)) - cpu_relax(); + mb(); return 0; } diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c index b1809c9a0..52b3ed5d2 100644 --- a/arch/i386/kernel/srat.c +++ b/arch/i386/kernel/srat.c @@ -23,6 +23,7 @@ * * Send feedback to Pat Gaughen */ +#include #include #include #include @@ -38,6 +39,7 @@ #define NODE_ARRAY_OFFSET(x) ((x) % 8) /* 8 bits/char */ #define BMAP_SET(bmap, bit) ((bmap)[NODE_ARRAY_INDEX(bit)] |= 1 << NODE_ARRAY_OFFSET(bit)) #define BMAP_TEST(bmap, bit) ((bmap)[NODE_ARRAY_INDEX(bit)] & (1 << NODE_ARRAY_OFFSET(bit))) +#define MAX_PXM_DOMAINS 256 /* 1 byte and no promises about values */ /* bitmap length; _PXM is at most 255 */ #define PXM_BITMAP_LEN (MAX_PXM_DOMAINS / 8) static u8 pxm_bitmap[PXM_BITMAP_LEN]; /* bitmap of proximity domains */ @@ -211,11 +213,19 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c node_end_pfn[nid] = memory_chunk->end_pfn; } +static u8 pxm_to_nid_map[MAX_PXM_DOMAINS];/* _PXM to logical node ID map */ + +int pxm_to_node(int pxm) +{ + return pxm_to_nid_map[pxm]; +} + /* Parse the ACPI Static Resource Affinity Table */ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) { u8 *start, *end, *p; int i, j, nid; + u8 nid_to_pxm_map[MAX_NUMNODES];/* logical node ID to _PXM map */ start = (u8 *)(&(sratp->reserved) + 1); /* skip header */ p = start; @@ -225,6 +235,10 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) memset(node_memory_chunk, 0, sizeof(node_memory_chunk)); memset(zholes_size, 0, sizeof(zholes_size)); + /* -1 in these maps means not available */ + memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map)); + memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map)); + num_memory_chunks = 0; while (p < end) { switch (*p) { @@ -264,7 +278,9 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) nodes_clear(node_online_map); for (i = 0; i < MAX_PXM_DOMAINS; i++) { if (BMAP_TEST(pxm_bitmap, i)) { - int nid = acpi_map_pxm_to_node(i); + nid = num_online_nodes(); + pxm_to_nid_map[i] = nid; + nid_to_pxm_map[nid] = i; node_set_online(nid); } } @@ -272,7 +288,7 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) /* set cnode id in memory chunk structure */ for (i = 0; i < num_memory_chunks; i++) - node_memory_chunk[i].nid = pxm_to_node(node_memory_chunk[i].pxm); + node_memory_chunk[i].nid = pxm_to_nid_map[node_memory_chunk[i].pxm]; printk("pxm bitmap: "); for (i = 0; i < sizeof(pxm_bitmap); i++) { diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S index 98beadc78..0867c74d3 100644 --- a/arch/i386/kernel/syscall_table.S +++ b/arch/i386/kernel/syscall_table.S @@ -324,4 +324,3 @@ ENTRY(sys_call_table) .long sys_sync_file_range .long sys_tee /* 315 */ .long sys_vmsplice - .long sys_move_pages diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c index 765af04c4..b97719aa4 100644 --- a/arch/i386/kernel/sysenter.c +++ b/arch/i386/kernel/sysenter.c @@ -2,8 +2,6 @@ * linux/arch/i386/kernel/sysenter.c * * (C) Copyright 2002 Linus Torvalds - * Portions based on the vdso-randomization code from exec-shield: - * Copyright(C) 2005-2006, Red Hat, Inc., Ingo Molnar * * This file contains the needed initializations to support sysenter. */ @@ -17,10 +15,8 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -30,23 +26,6 @@ #include #endif -/* - * Should the kernel map a VDSO page into processes and pass its - * address down to glibc upon exec()? - */ -unsigned int __read_mostly vdso_enabled = 1; - -EXPORT_SYMBOL_GPL(vdso_enabled); - -static int __init vdso_setup(char *s) -{ - vdso_enabled = simple_strtoul(s, NULL, 0); - - return 1; -} - -__setup("vdso=", vdso_setup); - extern asmlinkage void sysenter_entry(void); void enable_sep_cpu(void) @@ -75,11 +54,13 @@ void enable_sep_cpu(void) */ extern const char vsyscall_int80_start, vsyscall_int80_end; extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; -static void *syscall_page; +static struct page *sysenter_pages[2]; int __init sysenter_setup(void) { - syscall_page = (void *)get_zeroed_page(GFP_ATOMIC); + void *page = (void *)get_zeroed_page(GFP_ATOMIC); + + sysenter_pages[0] = virt_to_page(page); #ifdef CONFIG_XEN if (boot_cpu_has(X86_FEATURE_SEP)) { @@ -93,111 +74,84 @@ int __init sysenter_setup(void) } #endif -#ifdef CONFIG_COMPAT_VDSO - __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); - printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); -#else - /* - * In the non-compat case the ELF coredumping code needs the fixmap: - */ -#ifdef CONFIG_XEN - __set_fixmap(FIX_VDSO, virt_to_machine(syscall_page), PAGE_KERNEL_RO); -#else - __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_KERNEL_RO); -#endif -#endif - - if (!boot_cpu_has(X86_FEATURE_SEP)) { - memcpy(syscall_page, - &vsyscall_int80_start, - &vsyscall_int80_end - &vsyscall_int80_start); + if (boot_cpu_has(X86_FEATURE_SEP)) { + memcpy(page, + &vsyscall_sysenter_start, + &vsyscall_sysenter_end - &vsyscall_sysenter_start); return 0; } - memcpy(syscall_page, - &vsyscall_sysenter_start, - &vsyscall_sysenter_end - &vsyscall_sysenter_start); + memcpy(page, + &vsyscall_int80_start, + &vsyscall_int80_end - &vsyscall_int80_start); return 0; } -static struct page *syscall_nopage(struct vm_area_struct *vma, - unsigned long adr, int *type) -{ - struct page *p = virt_to_page(adr - vma->vm_start + syscall_page); - get_page(p); - return p; -} +extern void SYSENTER_RETURN_OFFSET; -/* Prevent VMA merging */ -static void syscall_vma_close(struct vm_area_struct *vma) -{ -} +unsigned int vdso_enabled = 1; -static struct vm_operations_struct syscall_vm_ops = { - .close = syscall_vma_close, - .nopage = syscall_nopage, -}; +/* + * This is called from binfmt_elf, we create the special vma for the + * vDSO and insert it into the mm struct tree. + */ +int arch_setup_additional_pages(struct linux_binprm *bprm, + int executable_stack, unsigned long start_code, + unsigned long interp_map_address) +{ + struct thread_info *ti = current_thread_info(); + unsigned long addr = 0, len; + unsigned flags = MAP_PRIVATE; + int err; -/* Defined in vsyscall-sysenter.S */ -extern void SYSENTER_RETURN; + current->mm->context.vdso = NULL; + if (unlikely(!vdso_enabled) || unlikely(!sysenter_pages[0])) + return 0; -/* Setup a VMA at program startup for the vsyscall page */ -int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack, - unsigned long start_code, unsigned long interp_map_address) -{ - struct vm_area_struct *vma; - struct mm_struct *mm = current->mm; - unsigned long addr; - int ret; - - down_write(&mm->mmap_sem); - addr = get_unmapped_area_prot(NULL, 0, PAGE_SIZE, 0, 0, 1); - if (IS_ERR_VALUE(addr)) { - ret = addr; - goto up_fail; + /* + * Map the vDSO (it will be randomized): + */ + down_write(¤t->mm->mmap_sem); + len = PAGE_SIZE > ELF_EXEC_PAGESIZE ? PAGE_SIZE : ELF_EXEC_PAGESIZE; + if (0==exec_shield) { /* off; %cs limit off */ + addr = STACK_TOP; /* minimal interference with anybody */ + flags = MAP_PRIVATE | MAP_FIXED; } - - vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL); - if (!vma) { - ret = -ENOMEM; - goto up_fail; + else if ((3<<2) & exec_shield) { /* vdso just below .text */ + addr = (((2<<2) & exec_shield) && interp_map_address) ? + interp_map_address : start_code; + /* 1MB for vm86; 64K for vm86 himem */ + if ((0x110000 + len) <= addr) { + addr = (PAGE_MASK & addr) - len; + } + else { /* start_code is too low */ + addr = 0; + } } - - vma->vm_start = addr; - vma->vm_end = addr + PAGE_SIZE; - /* MAYWRITE to allow gdb to COW and set breakpoints */ - vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE; - vma->vm_flags |= mm->def_flags; - vma->vm_page_prot = protection_map[vma->vm_flags & 7]; - vma->vm_ops = &syscall_vm_ops; - vma->vm_mm = mm; - - ret = insert_vm_struct(mm, vma); - if (unlikely(ret)) { - kmem_cache_free(vm_area_cachep, vma); - goto up_fail; + addr = get_unmapped_area_prot(NULL, addr, len, 0, + flags, PROT_READ | PROT_EXEC); + if (unlikely(addr & ~PAGE_MASK)) { + up_write(¤t->mm->mmap_sem); + return addr; } - - current->mm->context.vdso = (void *)addr; - current_thread_info()->sysenter_return = - (void *)VDSO_SYM(&SYSENTER_RETURN); - vx_vmpages_inc(mm); -up_fail: - up_write(&mm->mmap_sem); - return ret; -} - -const char *arch_vma_name(struct vm_area_struct *vma) -{ - if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) - return "[vdso]"; - return NULL; + err = install_special_mapping(current->mm, addr, len, + VM_DONTEXPAND | VM_READ | VM_EXEC | + VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC, + PAGE_READONLY_EXEC, + sysenter_pages); + if (likely(err == 0)) { + current->mm->context.vdso = (void *)addr; + ti->sysenter_return = &SYSENTER_RETURN_OFFSET + addr; + } + up_write(¤t->mm->mmap_sem); + return err; } -struct vm_area_struct *get_gate_vma(struct task_struct *tsk) +#ifndef CONFIG_XEN +int in_gate_area_no_task(unsigned long addr) { - return NULL; + return 0; } int in_gate_area(struct task_struct *task, unsigned long addr) @@ -205,7 +159,8 @@ int in_gate_area(struct task_struct *task, unsigned long addr) return 0; } -int in_gate_area_no_task(unsigned long addr) +struct vm_area_struct *get_gate_vma(struct task_struct *tsk) { - return 0; + return NULL; } +#endif diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index edd00f6ce..9d3074759 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c @@ -60,6 +60,7 @@ #include "mach_time.h" #include +#include #include @@ -81,6 +82,13 @@ extern unsigned long wall_jiffies; DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL(rtc_lock); +#include + +DEFINE_SPINLOCK(i8253_lock); +EXPORT_SYMBOL(i8253_lock); + +struct timer_opts *cur_timer __read_mostly = &timer_none; + /* * This is a special lock that is owned by the CPU and holds the index * register we are working with. It is required for NMI access to the @@ -110,19 +118,99 @@ void rtc_cmos_write(unsigned char val, unsigned char addr) } EXPORT_SYMBOL(rtc_cmos_write); +/* + * This version of gettimeofday has microsecond resolution + * and better than microsecond precision on fast x86 machines with TSC. + */ +void do_gettimeofday(struct timeval *tv) +{ + unsigned long seq; + unsigned long usec, sec; + unsigned long max_ntp_tick; + + do { + unsigned long lost; + + seq = read_seqbegin(&xtime_lock); + + usec = cur_timer->get_offset(); + lost = jiffies - wall_jiffies; + + /* + * 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.. + */ + 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 * (USEC_PER_SEC / HZ); + + sec = xtime.tv_sec; + usec += (xtime.tv_nsec / 1000); + } while (read_seqretry(&xtime_lock, seq)); + + while (usec >= 1000000) { + usec -= 1000000; + sec++; + } + + tv->tv_sec = sec; + tv->tv_usec = usec; +} + +EXPORT_SYMBOL(do_gettimeofday); + +int do_settimeofday(struct timespec *tv) +{ + time_t wtm_sec, sec = tv->tv_sec; + long wtm_nsec, nsec = tv->tv_nsec; + + if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) + return -EINVAL; + + write_seqlock_irq(&xtime_lock); + /* + * This is revolting. We need to set "xtime" correctly. However, the + * value in this location is the value at the most recent update of + * wall time. Discover what correction gettimeofday() would have + * made, and then undo it! + */ + nsec -= cur_timer->get_offset() * NSEC_PER_USEC; + nsec -= (jiffies - wall_jiffies) * TICK_NSEC; + + wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); + wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); + + set_normalized_timespec(&xtime, sec, nsec); + set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); + + ntp_clear(); + write_sequnlock_irq(&xtime_lock); + clock_was_set(); + return 0; +} + +EXPORT_SYMBOL(do_settimeofday); + static int set_rtc_mmss(unsigned long nowtime) { int retval; - unsigned long flags; + + WARN_ON(irqs_disabled()); /* gets recalled with irq locally disabled */ - /* XXX - does irqsave resolve this? -johnstul */ - spin_lock_irqsave(&rtc_lock, flags); + spin_lock_irq(&rtc_lock); if (efi_enabled) retval = efi_set_rtc_mmss(nowtime); else retval = mach_set_rtc_mmss(nowtime); - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock_irq(&rtc_lock); return retval; } @@ -130,12 +218,22 @@ static int set_rtc_mmss(unsigned long nowtime) int timer_ack; +/* monotonic_clock(): returns # of nanoseconds passed since time_init() + * Note: This function is required to return accurate + * time even in the absence of multiple timer ticks. + */ +unsigned long long monotonic_clock(void) +{ + return cur_timer->monotonic_clock(); +} +EXPORT_SYMBOL(monotonic_clock); + #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) unsigned long profile_pc(struct pt_regs *regs) { unsigned long pc = instruction_pointer(regs); - if (!user_mode_vm(regs) && in_lock_functions(pc)) + if (in_lock_functions(pc)) return *(unsigned long *)(regs->ebp + 4); return pc; @@ -144,21 +242,11 @@ EXPORT_SYMBOL(profile_pc); #endif /* - * This is the same as the above, except we _also_ save the current - * Time Stamp Counter value at the time of the timer interrupt, so that - * we later on can estimate the time of day more exactly. + * timer_interrupt() needs to keep up the real-time clock, + * as well as call the "do_timer()" routine every clocktick */ -irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static inline void do_timer_interrupt(int irq, struct pt_regs *regs) { - /* - * Here we are in the timer irq handler. We just have irqs locally - * disabled but we don't know if the timer_bh is running on the other - * CPU. We need to avoid to SMP race with it. NOTE: we don' t need - * the irq version of write_lock because as just said we have irq - * locally disabled. -arca - */ - write_seqlock(&xtime_lock); - #ifdef CONFIG_X86_IO_APIC if (timer_ack) { /* @@ -191,6 +279,27 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) irq = inb_p( 0x61 ); /* read the current state */ outb_p( irq|0x80, 0x61 ); /* reset the IRQ */ } +} + +/* + * This is the same as the above, except we _also_ save the current + * Time Stamp Counter value at the time of the timer interrupt, so that + * we later on can estimate the time of day more exactly. + */ +irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + /* + * Here we are in the timer irq handler. We just have irqs locally + * disabled but we don't know if the timer_bh is running on the other + * CPU. We need to avoid to SMP race with it. NOTE: we don' t need + * the irq version of write_lock because as just said we have irq + * locally disabled. -arca + */ + write_seqlock(&xtime_lock); + + cur_timer->mark_offset(); + + do_timer_interrupt(irq, regs); write_sequnlock(&xtime_lock); @@ -206,16 +315,15 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) unsigned long get_cmos_time(void) { unsigned long retval; - unsigned long flags; - spin_lock_irqsave(&rtc_lock, flags); + spin_lock(&rtc_lock); if (efi_enabled) retval = efi_get_time(); else retval = mach_get_cmos_time(); - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock(&rtc_lock); return retval; } @@ -272,6 +380,7 @@ void notify_arch_cmos_timer(void) static long clock_cmos_diff, sleep_start; +static struct timer_opts *last_timer; static int timer_suspend(struct sys_device *dev, pm_message_t state) { /* @@ -280,6 +389,10 @@ static int timer_suspend(struct sys_device *dev, pm_message_t state) clock_cmos_diff = -get_cmos_time(); clock_cmos_diff += get_seconds(); sleep_start = get_cmos_time(); + last_timer = cur_timer; + cur_timer = &timer_none; + if (last_timer->suspend) + last_timer->suspend(state); return 0; } @@ -302,6 +415,10 @@ static int timer_resume(struct sys_device *dev) jiffies_64 += sleep_length; wall_jiffies += sleep_length; write_sequnlock_irqrestore(&xtime_lock, flags); + if (last_timer->resume) + last_timer->resume(); + cur_timer = last_timer; + last_timer = NULL; touch_softlockup_watchdog(); return 0; } @@ -343,6 +460,9 @@ static void __init hpet_time_init(void) printk("Using HPET for base-timer\n"); } + cur_timer = select_timer(); + printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); + time_init_hook(); } #endif @@ -364,5 +484,8 @@ void __init time_init(void) set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec); + cur_timer = select_timer(); + printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name); + time_init_hook(); } diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c index 14a1376fe..a529f0cdc 100644 --- a/arch/i386/kernel/time_hpet.c +++ b/arch/i386/kernel/time_hpet.c @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/arch/i386/kernel/timers/Makefile b/arch/i386/kernel/timers/Makefile new file mode 100644 index 000000000..8fa12be65 --- /dev/null +++ b/arch/i386/kernel/timers/Makefile @@ -0,0 +1,9 @@ +# +# Makefile for x86 timers +# + +obj-y := timer.o timer_none.o timer_tsc.o timer_pit.o common.o + +obj-$(CONFIG_X86_CYCLONE_TIMER) += timer_cyclone.o +obj-$(CONFIG_HPET_TIMER) += timer_hpet.o +obj-$(CONFIG_X86_PM_TIMER) += timer_pm.o diff --git a/arch/i386/kernel/timers/common.c b/arch/i386/kernel/timers/common.c new file mode 100644 index 000000000..8163fe0cf --- /dev/null +++ b/arch/i386/kernel/timers/common.c @@ -0,0 +1,172 @@ +/* + * Common functions used across the timers go here + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "mach_timer.h" + +/* ------ Calibrate the TSC ------- + * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). + * Too much 64-bit arithmetic here to do this cleanly in C, and for + * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) + * output busy loop as low as possible. We avoid reading the CTC registers + * directly because of the awkward 8-bit access mechanism of the 82C54 + * device. + */ + +#define CALIBRATE_TIME (5 * 1000020/HZ) + +unsigned long calibrate_tsc(void) +{ + mach_prepare_counter(); + + { + unsigned long startlow, starthigh; + unsigned long endlow, endhigh; + unsigned long count; + + rdtsc(startlow,starthigh); + mach_countup(&count); + rdtsc(endlow,endhigh); + + + /* Error: ECTCNEVERSET */ + if (count <= 1) + goto bad_ctc; + + /* 64-bit subtract - gcc just messes up with long longs */ + __asm__("subl %2,%0\n\t" + "sbbl %3,%1" + :"=a" (endlow), "=d" (endhigh) + :"g" (startlow), "g" (starthigh), + "0" (endlow), "1" (endhigh)); + + /* Error: ECPUTOOFAST */ + if (endhigh) + goto bad_ctc; + + /* Error: ECPUTOOSLOW */ + if (endlow <= CALIBRATE_TIME) + goto bad_ctc; + + __asm__("divl %2" + :"=a" (endlow), "=d" (endhigh) + :"r" (endlow), "0" (0), "1" (CALIBRATE_TIME)); + + return endlow; + } + + /* + * The CTC wasn't reliable: we got a hit on the very first read, + * or the CPU was so fast/slow that the quotient wouldn't fit in + * 32 bits.. + */ +bad_ctc: + return 0; +} + +#ifdef CONFIG_HPET_TIMER +/* ------ Calibrate the TSC using HPET ------- + * Return 2^32 * (1 / (TSC clocks per usec)) for getting the CPU freq. + * Second output is parameter 1 (when non NULL) + * Set 2^32 * (1 / (tsc per HPET clk)) for delay_hpet(). + * calibrate_tsc() calibrates the processor TSC by comparing + * it to the HPET timer of known frequency. + * Too much 64-bit arithmetic here to do this cleanly in C + */ +#define CALIBRATE_CNT_HPET (5 * hpet_tick) +#define CALIBRATE_TIME_HPET (5 * KERNEL_TICK_USEC) + +unsigned long __devinit calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr) +{ + unsigned long tsc_startlow, tsc_starthigh; + unsigned long tsc_endlow, tsc_endhigh; + unsigned long hpet_start, hpet_end; + unsigned long result, remain; + + hpet_start = hpet_readl(HPET_COUNTER); + rdtsc(tsc_startlow, tsc_starthigh); + do { + hpet_end = hpet_readl(HPET_COUNTER); + } while ((hpet_end - hpet_start) < CALIBRATE_CNT_HPET); + rdtsc(tsc_endlow, tsc_endhigh); + + /* 64-bit subtract - gcc just messes up with long longs */ + __asm__("subl %2,%0\n\t" + "sbbl %3,%1" + :"=a" (tsc_endlow), "=d" (tsc_endhigh) + :"g" (tsc_startlow), "g" (tsc_starthigh), + "0" (tsc_endlow), "1" (tsc_endhigh)); + + /* Error: ECPUTOOFAST */ + if (tsc_endhigh) + goto bad_calibration; + + /* Error: ECPUTOOSLOW */ + if (tsc_endlow <= CALIBRATE_TIME_HPET) + goto bad_calibration; + + ASM_DIV64_REG(result, remain, tsc_endlow, 0, CALIBRATE_TIME_HPET); + if (remain > (tsc_endlow >> 1)) + result++; /* rounding the result */ + + if (tsc_hpet_quotient_ptr) { + unsigned long tsc_hpet_quotient; + + ASM_DIV64_REG(tsc_hpet_quotient, remain, tsc_endlow, 0, + CALIBRATE_CNT_HPET); + if (remain > (tsc_endlow >> 1)) + tsc_hpet_quotient++; /* rounding the result */ + *tsc_hpet_quotient_ptr = tsc_hpet_quotient; + } + + return result; +bad_calibration: + /* + * the CPU was so fast/slow that the quotient wouldn't fit in + * 32 bits.. + */ + return 0; +} +#endif + + +unsigned long read_timer_tsc(void) +{ + unsigned long retval; + rdtscl(retval); + return retval; +} + + +/* calculate cpu_khz */ +void init_cpu_khz(void) +{ + if (cpu_has_tsc) { + unsigned long tsc_quotient = calibrate_tsc(); + if (tsc_quotient) { + /* report CPU clock rate in Hz. + * The formula is (10^6 * 2^32) / (2^32 * 1 / (clocks/us)) = + * clock/second. Our precision is about 100 ppm. + */ + { unsigned long eax=0, edx=1000; + __asm__("divl %2" + :"=a" (cpu_khz), "=d" (edx) + :"r" (tsc_quotient), + "0" (eax), "1" (edx)); + printk("Detected %u.%03u MHz processor.\n", + cpu_khz / 1000, cpu_khz % 1000); + } + } + } +} + diff --git a/arch/i386/kernel/timers/timer.c b/arch/i386/kernel/timers/timer.c new file mode 100644 index 000000000..7e39ed8e3 --- /dev/null +++ b/arch/i386/kernel/timers/timer.c @@ -0,0 +1,75 @@ +#include +#include +#include +#include + +#ifdef CONFIG_HPET_TIMER +/* + * HPET memory read is slower than tsc reads, but is more dependable as it + * always runs at constant frequency and reduces complexity due to + * cpufreq. So, we prefer HPET timer to tsc based one. Also, we cannot use + * timer_pit when HPET is active. So, we default to timer_tsc. + */ +#endif +/* list of timers, ordered by preference, NULL terminated */ +static struct init_timer_opts* __initdata timers[] = { +#ifdef CONFIG_X86_CYCLONE_TIMER + &timer_cyclone_init, +#endif +#ifdef CONFIG_HPET_TIMER + &timer_hpet_init, +#endif +#ifdef CONFIG_X86_PM_TIMER + &timer_pmtmr_init, +#endif + &timer_tsc_init, + &timer_pit_init, + NULL, +}; + +static char clock_override[10] __initdata; + +static int __init clock_setup(char* str) +{ + if (str) + strlcpy(clock_override, str, sizeof(clock_override)); + return 1; +} +__setup("clock=", clock_setup); + + +/* The chosen timesource has been found to be bad. + * Fall back to a known good timesource (the PIT) + */ +void clock_fallback(void) +{ + cur_timer = &timer_pit; +} + +/* iterates through the list of timers, returning the first + * one that initializes successfully. + */ +struct timer_opts* __init select_timer(void) +{ + int i = 0; + + /* find most preferred working timer */ + while (timers[i]) { + if (timers[i]->init) + if (timers[i]->init(clock_override) == 0) + return timers[i]->opts; + ++i; + } + + panic("select_timer: Cannot find a suitable timer\n"); + return NULL; +} + +int read_current_timer(unsigned long *timer_val) +{ + if (cur_timer->read_timer) { + *timer_val = cur_timer->read_timer(); + return 0; + } + return -1; +} diff --git a/arch/i386/kernel/timers/timer_cyclone.c b/arch/i386/kernel/timers/timer_cyclone.c new file mode 100644 index 000000000..13892a65c --- /dev/null +++ b/arch/i386/kernel/timers/timer_cyclone.c @@ -0,0 +1,259 @@ +/* Cyclone-timer: + * This code implements timer_ops for the cyclone counter found + * on IBM x440, x360, and other Summit based systems. + * + * Copyright (C) 2002 IBM, John Stultz (johnstul@us.ibm.com) + */ + + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "io_ports.h" + +/* Number of usecs that the last interrupt was delayed */ +static int delay_at_last_interrupt; + +#define CYCLONE_CBAR_ADDR 0xFEB00CD0 +#define CYCLONE_PMCC_OFFSET 0x51A0 +#define CYCLONE_MPMC_OFFSET 0x51D0 +#define CYCLONE_MPCS_OFFSET 0x51A8 +#define CYCLONE_TIMER_FREQ 100000000 +#define CYCLONE_TIMER_MASK (((u64)1<<40)-1) /* 40 bit mask */ +int use_cyclone = 0; + +static u32* volatile cyclone_timer; /* Cyclone MPMC0 register */ +static u32 last_cyclone_low; +static u32 last_cyclone_high; +static unsigned long long monotonic_base; +static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; + +/* helper macro to atomically read both cyclone counter registers */ +#define read_cyclone_counter(low,high) \ + do{ \ + high = cyclone_timer[1]; low = cyclone_timer[0]; \ + } while (high != cyclone_timer[1]); + + +static void mark_offset_cyclone(void) +{ + unsigned long lost, delay; + unsigned long delta = last_cyclone_low; + int count; + unsigned long long this_offset, last_offset; + + write_seqlock(&monotonic_lock); + last_offset = ((unsigned long long)last_cyclone_high<<32)|last_cyclone_low; + + spin_lock(&i8253_lock); + read_cyclone_counter(last_cyclone_low,last_cyclone_high); + + /* read values for delay_at_last_interrupt */ + outb_p(0x00, 0x43); /* latch the count ASAP */ + + count = inb_p(0x40); /* read the latched count */ + count |= inb(0x40) << 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); + + /* lost tick compensation */ + delta = last_cyclone_low - delta; + delta /= (CYCLONE_TIMER_FREQ/1000000); + delta += delay_at_last_interrupt; + lost = delta/(1000000/HZ); + delay = delta%(1000000/HZ); + if (lost >= 2) + jiffies_64 += lost-1; + + /* update the monotonic base value */ + this_offset = ((unsigned long long)last_cyclone_high<<32)|last_cyclone_low; + monotonic_base += (this_offset - last_offset) & CYCLONE_TIMER_MASK; + write_sequnlock(&monotonic_lock); + + /* calculate delay_at_last_interrupt */ + count = ((LATCH-1) - count) * TICK_SIZE; + delay_at_last_interrupt = (count + LATCH/2) / LATCH; + + + /* catch corner case where tick rollover occured + * between cyclone and pit reads (as noted when + * usec delta is > 90% # of usecs/tick) + */ + if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ)) + jiffies_64++; +} + +static unsigned long get_offset_cyclone(void) +{ + u32 offset; + + if(!cyclone_timer) + return delay_at_last_interrupt; + + /* Read the cyclone timer */ + offset = cyclone_timer[0]; + + /* .. relative to previous jiffy */ + offset = offset - last_cyclone_low; + + /* convert cyclone ticks to microseconds */ + /* XXX slow, can we speed this up? */ + offset = offset/(CYCLONE_TIMER_FREQ/1000000); + + /* our adjusted time offset in microseconds */ + return delay_at_last_interrupt + offset; +} + +static unsigned long long monotonic_clock_cyclone(void) +{ + u32 now_low, now_high; + unsigned long long last_offset, this_offset, base; + unsigned long long ret; + unsigned seq; + + /* atomically read monotonic base & last_offset */ + do { + seq = read_seqbegin(&monotonic_lock); + last_offset = ((unsigned long long)last_cyclone_high<<32)|last_cyclone_low; + base = monotonic_base; + } while (read_seqretry(&monotonic_lock, seq)); + + + /* Read the cyclone counter */ + read_cyclone_counter(now_low,now_high); + this_offset = ((unsigned long long)now_high<<32)|now_low; + + /* convert to nanoseconds */ + ret = base + ((this_offset - last_offset)&CYCLONE_TIMER_MASK); + return ret * (1000000000 / CYCLONE_TIMER_FREQ); +} + +static int __init init_cyclone(char* override) +{ + u32* reg; + u32 base; /* saved cyclone base address */ + u32 pageaddr; /* page that contains cyclone_timer register */ + u32 offset; /* offset from pageaddr to cyclone_timer register */ + int i; + + /* check clock override */ + if (override[0] && strncmp(override,"cyclone",7)) + return -ENODEV; + + /*make sure we're on a summit box*/ + if(!use_cyclone) return -ENODEV; + + printk(KERN_INFO "Summit chipset: Starting Cyclone Counter.\n"); + + /* find base address */ + pageaddr = (CYCLONE_CBAR_ADDR)&PAGE_MASK; + offset = (CYCLONE_CBAR_ADDR)&(~PAGE_MASK); + set_fixmap_nocache(FIX_CYCLONE_TIMER, pageaddr); + reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset); + if(!reg){ + printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n"); + return -ENODEV; + } + base = *reg; + if(!base){ + printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n"); + return -ENODEV; + } + + /* setup PMCC */ + pageaddr = (base + CYCLONE_PMCC_OFFSET)&PAGE_MASK; + offset = (base + CYCLONE_PMCC_OFFSET)&(~PAGE_MASK); + set_fixmap_nocache(FIX_CYCLONE_TIMER, pageaddr); + reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset); + if(!reg){ + printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n"); + return -ENODEV; + } + reg[0] = 0x00000001; + + /* setup MPCS */ + pageaddr = (base + CYCLONE_MPCS_OFFSET)&PAGE_MASK; + offset = (base + CYCLONE_MPCS_OFFSET)&(~PAGE_MASK); + set_fixmap_nocache(FIX_CYCLONE_TIMER, pageaddr); + reg = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset); + if(!reg){ + printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n"); + return -ENODEV; + } + reg[0] = 0x00000001; + + /* map in cyclone_timer */ + pageaddr = (base + CYCLONE_MPMC_OFFSET)&PAGE_MASK; + offset = (base + CYCLONE_MPMC_OFFSET)&(~PAGE_MASK); + set_fixmap_nocache(FIX_CYCLONE_TIMER, pageaddr); + cyclone_timer = (u32*)(fix_to_virt(FIX_CYCLONE_TIMER) + offset); + if(!cyclone_timer){ + printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n"); + return -ENODEV; + } + + /*quick test to make sure its ticking*/ + for(i=0; i<3; i++){ + u32 old = cyclone_timer[0]; + int stall = 100; + while(stall--) barrier(); + if(cyclone_timer[0] == old){ + printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n"); + cyclone_timer = 0; + return -ENODEV; + } + } + + init_cpu_khz(); + + /* Everything looks good! */ + return 0; +} + + +static void delay_cyclone(unsigned long loops) +{ + unsigned long bclock, now; + if(!cyclone_timer) + return; + bclock = cyclone_timer[0]; + do { + rep_nop(); + now = cyclone_timer[0]; + } while ((now-bclock) < loops); +} +/************************************************************/ + +/* cyclone timer_opts struct */ +static struct timer_opts timer_cyclone = { + .name = "cyclone", + .mark_offset = mark_offset_cyclone, + .get_offset = get_offset_cyclone, + .monotonic_clock = monotonic_clock_cyclone, + .delay = delay_cyclone, +}; + +struct init_timer_opts __initdata timer_cyclone_init = { + .init = init_cyclone, + .opts = &timer_cyclone, +}; diff --git a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c new file mode 100644 index 000000000..17a6fe716 --- /dev/null +++ b/arch/i386/kernel/timers/timer_hpet.c @@ -0,0 +1,217 @@ +/* + * This code largely moved from arch/i386/kernel/time.c. + * See comments there for proper credits. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "io_ports.h" +#include "mach_timer.h" +#include + +static unsigned long hpet_usec_quotient __read_mostly; /* convert hpet clks to usec */ +static unsigned long tsc_hpet_quotient __read_mostly; /* convert tsc to hpet clks */ +static unsigned long hpet_last; /* hpet counter value at last tick*/ +static unsigned long last_tsc_low; /* lsb 32 bits of Time Stamp Counter */ +static unsigned long last_tsc_high; /* msb 32 bits of Time Stamp Counter */ +static unsigned long long monotonic_base; +static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; + +/* convert from cycles(64bits) => nanoseconds (64bits) + * basic equation: + * ns = cycles / (freq / ns_per_sec) + * ns = cycles * (ns_per_sec / freq) + * ns = cycles * (10^9 / (cpu_khz * 10^3)) + * ns = cycles * (10^6 / cpu_khz) + * + * Then we use scaling math (suggested by george@mvista.com) to get: + * ns = cycles * (10^6 * SC / cpu_khz) / SC + * ns = cycles * cyc2ns_scale / SC + * + * And since SC is a constant power of two, we can convert the div + * into a shift. + * + * We can use khz divisor instead of mhz to keep a better percision, since + * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. + * (mathieu.desnoyers@polymtl.ca) + * + * -johnstul@us.ibm.com "math is hard, lets go shopping!" + */ +static unsigned long cyc2ns_scale __read_mostly; +#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ + +static inline void set_cyc2ns_scale(unsigned long cpu_khz) +{ + cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; +} + +static inline unsigned long long cycles_2_ns(unsigned long long cyc) +{ + return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; +} + +static unsigned long long monotonic_clock_hpet(void) +{ + unsigned long long last_offset, this_offset, base; + unsigned seq; + + /* atomically read monotonic base & last_offset */ + do { + seq = read_seqbegin(&monotonic_lock); + last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + base = monotonic_base; + } while (read_seqretry(&monotonic_lock, seq)); + + /* Read the Time Stamp Counter */ + rdtscll(this_offset); + + /* return the value in ns */ + return base + cycles_2_ns(this_offset - last_offset); +} + +static unsigned long get_offset_hpet(void) +{ + register unsigned long eax, edx; + + eax = hpet_readl(HPET_COUNTER); + eax -= hpet_last; /* hpet delta */ + eax = min(hpet_tick, eax); + /* + * Time offset = (hpet delta) * ( usecs per HPET clock ) + * = (hpet delta) * ( usecs per tick / HPET clocks per tick) + * = (hpet delta) * ( hpet_usec_quotient ) / (2^32) + * + * Where, + * hpet_usec_quotient = (2^32 * usecs per tick)/HPET clocks per tick + * + * Using a mull instead of a divl saves some cycles in critical path. + */ + ASM_MUL64_REG(eax, edx, hpet_usec_quotient, eax); + + /* our adjusted time offset in microseconds */ + return edx; +} + +static void mark_offset_hpet(void) +{ + unsigned long long this_offset, last_offset; + unsigned long offset; + + write_seqlock(&monotonic_lock); + last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + rdtsc(last_tsc_low, last_tsc_high); + + if (hpet_use_timer) + offset = hpet_readl(HPET_T0_CMP) - hpet_tick; + else + offset = hpet_readl(HPET_COUNTER); + if (unlikely(((offset - hpet_last) >= (2*hpet_tick)) && (hpet_last != 0))) { + int lost_ticks = ((offset - hpet_last) / hpet_tick) - 1; + jiffies_64 += lost_ticks; + } + hpet_last = offset; + + /* update the monotonic base value */ + this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + monotonic_base += cycles_2_ns(this_offset - last_offset); + write_sequnlock(&monotonic_lock); +} + +static void delay_hpet(unsigned long loops) +{ + unsigned long hpet_start, hpet_end; + unsigned long eax; + + /* loops is the number of cpu cycles. Convert it to hpet clocks */ + ASM_MUL64_REG(eax, loops, tsc_hpet_quotient, loops); + + hpet_start = hpet_readl(HPET_COUNTER); + do { + rep_nop(); + hpet_end = hpet_readl(HPET_COUNTER); + } while ((hpet_end - hpet_start) < (loops)); +} + +static struct timer_opts timer_hpet; + +static int __init init_hpet(char* override) +{ + unsigned long result, remain; + + /* check clock override */ + if (override[0] && strncmp(override,"hpet",4)) + return -ENODEV; + + if (!is_hpet_enabled()) + return -ENODEV; + + printk("Using HPET for gettimeofday\n"); + if (cpu_has_tsc) { + unsigned long tsc_quotient = calibrate_tsc_hpet(&tsc_hpet_quotient); + if (tsc_quotient) { + /* report CPU clock rate in Hz. + * The formula is (10^6 * 2^32) / (2^32 * 1 / (clocks/us)) = + * clock/second. Our precision is about 100 ppm. + */ + { unsigned long eax=0, edx=1000; + ASM_DIV64_REG(cpu_khz, edx, tsc_quotient, + eax, edx); + printk("Detected %u.%03u MHz processor.\n", + cpu_khz / 1000, cpu_khz % 1000); + } + set_cyc2ns_scale(cpu_khz); + } + /* set this only when cpu_has_tsc */ + timer_hpet.read_timer = read_timer_tsc; + } + + /* + * Math to calculate hpet to usec multiplier + * Look for the comments at get_offset_hpet() + */ + ASM_DIV64_REG(result, remain, hpet_tick, 0, KERNEL_TICK_USEC); + if (remain > (hpet_tick >> 1)) + result++; /* rounding the result */ + hpet_usec_quotient = result; + + return 0; +} + +static int hpet_resume(void) +{ + write_seqlock(&monotonic_lock); + /* Assume this is the last mark offset time */ + rdtsc(last_tsc_low, last_tsc_high); + + if (hpet_use_timer) + hpet_last = hpet_readl(HPET_T0_CMP) - hpet_tick; + else + hpet_last = hpet_readl(HPET_COUNTER); + write_sequnlock(&monotonic_lock); + return 0; +} +/************************************************************/ + +/* tsc timer_opts struct */ +static struct timer_opts timer_hpet __read_mostly = { + .name = "hpet", + .mark_offset = mark_offset_hpet, + .get_offset = get_offset_hpet, + .monotonic_clock = monotonic_clock_hpet, + .delay = delay_hpet, + .resume = hpet_resume, +}; + +struct init_timer_opts __initdata timer_hpet_init = { + .init = init_hpet, + .opts = &timer_hpet, +}; diff --git a/arch/i386/kernel/timers/timer_none.c b/arch/i386/kernel/timers/timer_none.c new file mode 100644 index 000000000..4ea2f414d --- /dev/null +++ b/arch/i386/kernel/timers/timer_none.c @@ -0,0 +1,39 @@ +#include +#include + +static void mark_offset_none(void) +{ + /* nothing needed */ +} + +static unsigned long get_offset_none(void) +{ + return 0; +} + +static unsigned long long monotonic_clock_none(void) +{ + return 0; +} + +static void delay_none(unsigned long loops) +{ + int d0; + __asm__ __volatile__( + "\tjmp 1f\n" + ".align 16\n" + "1:\tjmp 2f\n" + ".align 16\n" + "2:\tdecl %0\n\tjns 2b" + :"=&a" (d0) + :"0" (loops)); +} + +/* none timer_opts struct */ +struct timer_opts timer_none = { + .name = "none", + .mark_offset = mark_offset_none, + .get_offset = get_offset_none, + .monotonic_clock = monotonic_clock_none, + .delay = delay_none, +}; diff --git a/arch/i386/kernel/timers/timer_pit.c b/arch/i386/kernel/timers/timer_pit.c new file mode 100644 index 000000000..b9b6bd56b --- /dev/null +++ b/arch/i386/kernel/timers/timer_pit.c @@ -0,0 +1,177 @@ +/* + * This code largely moved from arch/i386/kernel/time.c. + * See comments there for proper credits. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "do_timer.h" +#include "io_ports.h" + +static int count_p; /* counter in get_offset_pit() */ + +static int __init init_pit(char* override) +{ + /* check clock override */ + if (override[0] && strncmp(override,"pit",3)) + printk(KERN_ERR "Warning: clock= override failed. Defaulting " + "to PIT\n"); + init_cpu_khz(); + count_p = LATCH; + return 0; +} + +static void mark_offset_pit(void) +{ + /* nothing needed */ +} + +static unsigned long long monotonic_clock_pit(void) +{ + return 0; +} + +static void delay_pit(unsigned long loops) +{ + int d0; + __asm__ __volatile__( + "\tjmp 1f\n" + ".align 16\n" + "1:\tjmp 2f\n" + ".align 16\n" + "2:\tdecl %0\n\tjns 2b" + :"=&a" (d0) + :"0" (loops)); +} + + +/* This function must be called with xtime_lock held. + * It was inspired by Steve McCanne's microtime-i386 for BSD. -- jrs + * + * However, the pc-audio speaker driver changes the divisor so that + * it gets interrupted rather more often - it loads 64 into the + * counter rather than 11932! This has an adverse impact on + * do_gettimeoffset() -- it stops working! What is also not + * good is that the interval that our timer function gets called + * is no longer 10.0002 ms, but 9.9767 ms. To get around this + * would require using a different timing source. Maybe someone + * could use the RTC - I know that this can interrupt at frequencies + * ranging from 8192Hz to 2Hz. If I had the energy, I'd somehow fix + * it so that at startup, the timer code in sched.c would select + * using either the RTC or the 8253 timer. The decision would be + * based on whether there was any other device around that needed + * to trample on the 8253. I'd set up the RTC to interrupt at 1024 Hz, + * and then do some jiggery to have a version of do_timer that + * advanced the clock by 1/1024 s. Every time that reached over 1/100 + * of a second, then do all the old code. If the time was kept correct + * then do_gettimeoffset could just return 0 - there is no low order + * divider that can be accessed. + * + * Ideally, you would be able to use the RTC for the speaker driver, + * but it appears that the speaker driver really needs interrupt more + * often than every 120 us or so. + * + * Anyway, this needs more thought.... pjsg (1993-08-28) + * + * If you are really that interested, you should be reading + * comp.protocols.time.ntp! + */ + +static unsigned long get_offset_pit(void) +{ + int count; + unsigned long flags; + static unsigned long jiffies_p = 0; + + /* + * cache volatile jiffies temporarily; we have xtime_lock. + */ + unsigned long jiffies_t; + + spin_lock_irqsave(&i8253_lock, flags); + /* timer count may underflow right here */ + outb_p(0x00, PIT_MODE); /* latch the count ASAP */ + + count = inb_p(PIT_CH0); /* read the latched count */ + + /* + * We do this guaranteed double memory access instead of a _p + * postfix in the previous port access. Wheee, hackady hack + */ + jiffies_t = jiffies; + + count |= inb_p(PIT_CH0) << 8; + + /* VIA686a test code... reset the latch if count > max + 1 */ + if (count > LATCH) { + outb_p(0x34, PIT_MODE); + outb_p(LATCH & 0xff, PIT_CH0); + outb(LATCH >> 8, PIT_CH0); + count = LATCH - 1; + } + + /* + * avoiding timer inconsistencies (they are rare, but they happen)... + * there are two kinds of problems that must be avoided here: + * 1. the timer counter underflows + * 2. hardware problem with the timer, not giving us continuous time, + * the counter does small "jumps" upwards on some Pentium systems, + * (see c't 95/10 page 335 for Neptun bug.) + */ + + if( jiffies_t == jiffies_p ) { + if( count > count_p ) { + /* the nutcase */ + count = do_timer_overflow(count); + } + } else + jiffies_p = jiffies_t; + + count_p = count; + + spin_unlock_irqrestore(&i8253_lock, flags); + + count = ((LATCH-1) - count) * TICK_SIZE; + count = (count + LATCH/2) / LATCH; + + return count; +} + + +/* tsc timer_opts struct */ +struct timer_opts timer_pit = { + .name = "pit", + .mark_offset = mark_offset_pit, + .get_offset = get_offset_pit, + .monotonic_clock = monotonic_clock_pit, + .delay = delay_pit, +}; + +struct init_timer_opts __initdata timer_pit_init = { + .init = init_pit, + .opts = &timer_pit, +}; + +void setup_pit_timer(void) +{ + unsigned long flags; + + spin_lock_irqsave(&i8253_lock, flags); + outb_p(0x34,PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ + udelay(10); + outb_p(LATCH & 0xff , PIT_CH0); /* LSB */ + udelay(10); + outb(LATCH >> 8 , PIT_CH0); /* MSB */ + spin_unlock_irqrestore(&i8253_lock, flags); +} diff --git a/arch/i386/kernel/timers/timer_pm.c b/arch/i386/kernel/timers/timer_pm.c new file mode 100644 index 000000000..144e94a04 --- /dev/null +++ b/arch/i386/kernel/timers/timer_pm.c @@ -0,0 +1,342 @@ +/* + * (C) Dominik Brodowski 2003 + * + * Driver to use the Power Management Timer (PMTMR) available in some + * southbridges as primary timing source for the Linux kernel. + * + * Based on parts of linux/drivers/acpi/hardware/hwtimer.c, timer_pit.c, + * timer_hpet.c, and on Arjan van de Ven's implementation for 2.4. + * + * This file is licensed under the GPL v2. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "mach_timer.h" + +/* Number of PMTMR ticks expected during calibration run */ +#define PMTMR_TICKS_PER_SEC 3579545 +#define PMTMR_EXPECTED_RATE \ + ((CALIBRATE_LATCH * (PMTMR_TICKS_PER_SEC >> 10)) / (CLOCK_TICK_RATE>>10)) + + +/* The I/O port the PMTMR resides at. + * The location is detected during setup_arch(), + * in arch/i386/acpi/boot.c */ +u32 pmtmr_ioport = 0; + + +/* value of the Power timer at last timer interrupt */ +static u32 offset_tick; +static u32 offset_delay; + +static unsigned long long monotonic_base; +static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; + +#define ACPI_PM_MASK 0xFFFFFF /* limit it to 24 bits */ + +static int pmtmr_need_workaround __read_mostly = 1; + +/*helper function to safely read acpi pm timesource*/ +static inline u32 read_pmtmr(void) +{ + if (pmtmr_need_workaround) { + u32 v1, v2, v3; + + /* It has been reported that because of various broken + * chipsets (ICH4, PIIX4 and PIIX4E) where the ACPI PM time + * source is not latched, so you must read it multiple + * times to insure a safe value is read. + */ + do { + v1 = inl(pmtmr_ioport); + v2 = inl(pmtmr_ioport); + v3 = inl(pmtmr_ioport); + } while ((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1) + || (v3 > v1 && v3 < v2)); + + /* mask the output to 24 bits */ + return v2 & ACPI_PM_MASK; + } + + return inl(pmtmr_ioport) & ACPI_PM_MASK; +} + + +/* + * Some boards have the PMTMR running way too fast. We check + * the PMTMR rate against PIT channel 2 to catch these cases. + */ +static int verify_pmtmr_rate(void) +{ + u32 value1, value2; + unsigned long count, delta; + + mach_prepare_counter(); + value1 = read_pmtmr(); + mach_countup(&count); + value2 = read_pmtmr(); + delta = (value2 - value1) & ACPI_PM_MASK; + + /* Check that the PMTMR delta is within 5% of what we expect */ + if (delta < (PMTMR_EXPECTED_RATE * 19) / 20 || + delta > (PMTMR_EXPECTED_RATE * 21) / 20) { + printk(KERN_INFO "PM-Timer running at invalid rate: %lu%% of normal - aborting.\n", 100UL * delta / PMTMR_EXPECTED_RATE); + return -1; + } + + return 0; +} + + +static int init_pmtmr(char* override) +{ + u32 value1, value2; + unsigned int i; + + if (override[0] && strncmp(override,"pmtmr",5)) + return -ENODEV; + + if (!pmtmr_ioport) + return -ENODEV; + + /* we use the TSC for delay_pmtmr, so make sure it exists */ + if (!cpu_has_tsc) + return -ENODEV; + + /* "verify" this timing source */ + value1 = read_pmtmr(); + for (i = 0; i < 10000; i++) { + value2 = read_pmtmr(); + if (value2 == value1) + continue; + if (value2 > value1) + goto pm_good; + if ((value2 < value1) && ((value2) < 0xFFF)) + goto pm_good; + printk(KERN_INFO "PM-Timer had inconsistent results: 0x%#x, 0x%#x - aborting.\n", value1, value2); + return -EINVAL; + } + printk(KERN_INFO "PM-Timer had no reasonable result: 0x%#x - aborting.\n", value1); + return -ENODEV; + +pm_good: + if (verify_pmtmr_rate() != 0) + return -ENODEV; + + init_cpu_khz(); + return 0; +} + +static inline u32 cyc2us(u32 cycles) +{ + /* The Power Management Timer ticks at 3.579545 ticks per microsecond. + * 1 / PM_TIMER_FREQUENCY == 0.27936511 =~ 286/1024 [error: 0.024%] + * + * Even with HZ = 100, delta is at maximum 35796 ticks, so it can + * easily be multiplied with 286 (=0x11E) without having to fear + * u32 overflows. + */ + cycles *= 286; + return (cycles >> 10); +} + +/* + * this gets called during each timer interrupt + * - Called while holding the writer xtime_lock + */ +static void mark_offset_pmtmr(void) +{ + u32 lost, delta, last_offset; + static int first_run = 1; + last_offset = offset_tick; + + write_seqlock(&monotonic_lock); + + offset_tick = read_pmtmr(); + + /* calculate tick interval */ + delta = (offset_tick - last_offset) & ACPI_PM_MASK; + + /* convert to usecs */ + delta = cyc2us(delta); + + /* update the monotonic base value */ + monotonic_base += delta * NSEC_PER_USEC; + write_sequnlock(&monotonic_lock); + + /* convert to ticks */ + delta += offset_delay; + lost = delta / (USEC_PER_SEC / HZ); + offset_delay = delta % (USEC_PER_SEC / HZ); + + + /* compensate for lost ticks */ + if (lost >= 2) + jiffies_64 += lost - 1; + + /* don't calculate delay for first run, + or if we've got less then a tick */ + if (first_run || (lost < 1)) { + first_run = 0; + offset_delay = 0; + } +} + +static int pmtmr_resume(void) +{ + write_seqlock(&monotonic_lock); + /* Assume this is the last mark offset time */ + offset_tick = read_pmtmr(); + write_sequnlock(&monotonic_lock); + return 0; +} + +static unsigned long long monotonic_clock_pmtmr(void) +{ + u32 last_offset, this_offset; + unsigned long long base, ret; + unsigned seq; + + + /* atomically read monotonic base & last_offset */ + do { + seq = read_seqbegin(&monotonic_lock); + last_offset = offset_tick; + base = monotonic_base; + } while (read_seqretry(&monotonic_lock, seq)); + + /* Read the pmtmr */ + this_offset = read_pmtmr(); + + /* convert to nanoseconds */ + ret = (this_offset - last_offset) & ACPI_PM_MASK; + ret = base + (cyc2us(ret) * NSEC_PER_USEC); + return ret; +} + +static void delay_pmtmr(unsigned long loops) +{ + unsigned long bclock, now; + + rdtscl(bclock); + do + { + rep_nop(); + rdtscl(now); + } while ((now-bclock) < loops); +} + + +/* + * get the offset (in microseconds) from the last call to mark_offset() + * - Called holding a reader xtime_lock + */ +static unsigned long get_offset_pmtmr(void) +{ + u32 now, offset, delta = 0; + + offset = offset_tick; + now = read_pmtmr(); + delta = (now - offset)&ACPI_PM_MASK; + + return (unsigned long) offset_delay + cyc2us(delta); +} + + +/* acpi timer_opts struct */ +static struct timer_opts timer_pmtmr = { + .name = "pmtmr", + .mark_offset = mark_offset_pmtmr, + .get_offset = get_offset_pmtmr, + .monotonic_clock = monotonic_clock_pmtmr, + .delay = delay_pmtmr, + .read_timer = read_timer_tsc, + .resume = pmtmr_resume, +}; + +struct init_timer_opts __initdata timer_pmtmr_init = { + .init = init_pmtmr, + .opts = &timer_pmtmr, +}; + +#ifdef CONFIG_PCI +/* + * PIIX4 Errata: + * + * The power management timer may return improper results when read. + * Although the timer value settles properly after incrementing, + * while incrementing there is a 3 ns window every 69.8 ns where the + * timer value is indeterminate (a 4.2% chance that the data will be + * incorrect when read). As a result, the ACPI free running count up + * timer specification is violated due to erroneous reads. + */ +static int __init pmtmr_bug_check(void) +{ + static struct pci_device_id gray_list[] __initdata = { + /* these chipsets may have bug. */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82801DB_0) }, + { }, + }; + struct pci_dev *dev; + int pmtmr_has_bug = 0; + u8 rev; + + if (cur_timer != &timer_pmtmr || !pmtmr_need_workaround) + return 0; + + dev = pci_get_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82371AB_3, NULL); + if (dev) { + pci_read_config_byte(dev, PCI_REVISION_ID, &rev); + /* the bug has been fixed in PIIX4M */ + if (rev < 3) { + printk(KERN_WARNING "* Found PM-Timer Bug on this " + "chipset. Due to workarounds for a bug,\n" + "* this time source is slow. Consider trying " + "other time sources (clock=)\n"); + pmtmr_has_bug = 1; + } + pci_dev_put(dev); + } + + if (pci_dev_present(gray_list)) { + printk(KERN_WARNING "* This chipset may have PM-Timer Bug. Due" + " to workarounds for a bug,\n" + "* this time source is slow. If you are sure your timer" + " does not have\n" + "* this bug, please use \"pmtmr_good\" to disable the " + "workaround\n"); + pmtmr_has_bug = 1; + } + + if (!pmtmr_has_bug) + pmtmr_need_workaround = 0; + + return 0; +} +device_initcall(pmtmr_bug_check); +#endif + +static int __init pmtr_good_setup(char *__str) +{ + pmtmr_need_workaround = 0; + return 1; +} +__setup("pmtmr_good", pmtr_good_setup); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Dominik Brodowski "); +MODULE_DESCRIPTION("Power Management Timer (PMTMR) as primary timing source for x86"); diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c new file mode 100644 index 000000000..f1187ddb0 --- /dev/null +++ b/arch/i386/kernel/timers/timer_tsc.c @@ -0,0 +1,617 @@ +/* + * This code largely moved from arch/i386/kernel/time.c. + * See comments there for proper credits. + * + * 2004-06-25 Jesper Juhl + * moved mark_offset_tsc below cpufreq_delayed_get to avoid gcc 3.4 + * failing to inline. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +/* processor.h for distable_tsc flag */ +#include + +#include "io_ports.h" +#include "mach_timer.h" + +#include +#include + +#ifdef CONFIG_HPET_TIMER +static unsigned long hpet_usec_quotient; +static unsigned long hpet_last; +static struct timer_opts timer_tsc; +#endif + +static inline void cpufreq_delayed_get(void); + +int tsc_disable __devinitdata = 0; + +static int use_tsc; +/* Number of usecs that the last interrupt was delayed */ +static int delay_at_last_interrupt; + +static unsigned long last_tsc_low; /* lsb 32 bits of Time Stamp Counter */ +static unsigned long last_tsc_high; /* msb 32 bits of Time Stamp Counter */ +static unsigned long long monotonic_base; +static seqlock_t monotonic_lock = SEQLOCK_UNLOCKED; + +/* Avoid compensating for lost ticks before TSCs are synched */ +static int detect_lost_ticks; +static int __init start_lost_tick_compensation(void) +{ + detect_lost_ticks = 1; + return 0; +} +late_initcall(start_lost_tick_compensation); + +/* convert from cycles(64bits) => nanoseconds (64bits) + * basic equation: + * ns = cycles / (freq / ns_per_sec) + * ns = cycles * (ns_per_sec / freq) + * ns = cycles * (10^9 / (cpu_khz * 10^3)) + * ns = cycles * (10^6 / cpu_khz) + * + * Then we use scaling math (suggested by george@mvista.com) to get: + * ns = cycles * (10^6 * SC / cpu_khz) / SC + * ns = cycles * cyc2ns_scale / SC + * + * And since SC is a constant power of two, we can convert the div + * into a shift. + * + * We can use khz divisor instead of mhz to keep a better percision, since + * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. + * (mathieu.desnoyers@polymtl.ca) + * + * -johnstul@us.ibm.com "math is hard, lets go shopping!" + */ +static unsigned long cyc2ns_scale __read_mostly; +#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ + +static inline void set_cyc2ns_scale(unsigned long cpu_khz) +{ + cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; +} + +static inline unsigned long long cycles_2_ns(unsigned long long cyc) +{ + return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; +} + +static int count2; /* counter for mark_offset_tsc() */ + +/* Cached *multiplier* to convert TSC counts to microseconds. + * (see the equation below). + * Equal to 2^32 * (1 / (clocks per usec) ). + * Initialized in time_init. + */ +static unsigned long fast_gettimeoffset_quotient; + +static unsigned long get_offset_tsc(void) +{ + register unsigned long eax, edx; + + /* Read the Time Stamp Counter */ + + rdtsc(eax,edx); + + /* .. relative to previous jiffy (32 bits is enough) */ + eax -= last_tsc_low; /* tsc_low delta */ + + /* + * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient + * = (tsc_low delta) * (usecs_per_clock) + * = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy) + * + * Using a mull instead of a divl saves up to 31 clock cycles + * in the critical path. + */ + + __asm__("mull %2" + :"=a" (eax), "=d" (edx) + :"rm" (fast_gettimeoffset_quotient), + "0" (eax)); + + /* our adjusted time offset in microseconds */ + return delay_at_last_interrupt + edx; +} + +static unsigned long long monotonic_clock_tsc(void) +{ + unsigned long long last_offset, this_offset, base; + unsigned seq; + + /* atomically read monotonic base & last_offset */ + do { + seq = read_seqbegin(&monotonic_lock); + last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + base = monotonic_base; + } while (read_seqretry(&monotonic_lock, seq)); + + /* Read the Time Stamp Counter */ + rdtscll(this_offset); + + /* return the value in ns */ + return base + cycles_2_ns(this_offset - last_offset); +} + +/* + * Scheduler clock - returns current time in nanosec units. + */ +unsigned long long sched_clock(void) +{ + unsigned long long this_offset; + + /* + * In the NUMA case we dont use the TSC as they are not + * synchronized across all CPUs. + */ +#ifndef CONFIG_NUMA + if (!use_tsc) +#endif + /* no locking but a rare wrong value is not a big deal */ + return jiffies_64 * (1000000000 / HZ); + + /* Read the Time Stamp Counter */ + rdtscll(this_offset); + + /* return the value in ns */ + return cycles_2_ns(this_offset); +} + +static void delay_tsc(unsigned long loops) +{ + unsigned long bclock, now; + + rdtscl(bclock); + do + { + rep_nop(); + rdtscl(now); + } while ((now-bclock) < loops); +} + +#ifdef CONFIG_HPET_TIMER +static void mark_offset_tsc_hpet(void) +{ + unsigned long long this_offset, last_offset; + unsigned long offset, temp, hpet_current; + + write_seqlock(&monotonic_lock); + last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + /* + * It is important that these two operations happen almost at + * the same time. We do the RDTSC stuff first, since it's + * faster. To avoid any inconsistencies, we need interrupts + * disabled locally. + */ + /* + * Interrupts are just disabled locally since the timer irq + * has the SA_INTERRUPT flag set. -arca + */ + /* read Pentium cycle counter */ + + hpet_current = hpet_readl(HPET_COUNTER); + rdtsc(last_tsc_low, last_tsc_high); + + /* lost tick compensation */ + offset = hpet_readl(HPET_T0_CMP) - hpet_tick; + if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0)) + && detect_lost_ticks) { + int lost_ticks = (offset - hpet_last) / hpet_tick; + jiffies_64 += lost_ticks; + } + hpet_last = hpet_current; + + /* update the monotonic base value */ + this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + monotonic_base += cycles_2_ns(this_offset - last_offset); + write_sequnlock(&monotonic_lock); + + /* calculate delay_at_last_interrupt */ + /* + * Time offset = (hpet delta) * ( usecs per HPET clock ) + * = (hpet delta) * ( usecs per tick / HPET clocks per tick) + * = (hpet delta) * ( hpet_usec_quotient ) / (2^32) + * Where, + * hpet_usec_quotient = (2^32 * usecs per tick)/HPET clocks per tick + */ + delay_at_last_interrupt = hpet_current - offset; + ASM_MUL64_REG(temp, delay_at_last_interrupt, + hpet_usec_quotient, delay_at_last_interrupt); +} +#endif + + +#ifdef CONFIG_CPU_FREQ +#include + +static unsigned int cpufreq_delayed_issched = 0; +static unsigned int cpufreq_init = 0; +static struct work_struct cpufreq_delayed_get_work; + +static void handle_cpufreq_delayed_get(void *v) +{ + unsigned int cpu; + for_each_online_cpu(cpu) { + cpufreq_get(cpu); + } + cpufreq_delayed_issched = 0; +} + +/* if we notice lost ticks, schedule a call to cpufreq_get() as it tries + * to verify the CPU frequency the timing core thinks the CPU is running + * at is still correct. + */ +static inline void cpufreq_delayed_get(void) +{ + if (cpufreq_init && !cpufreq_delayed_issched) { + cpufreq_delayed_issched = 1; + printk(KERN_DEBUG "Losing some ticks... checking if CPU frequency changed.\n"); + schedule_work(&cpufreq_delayed_get_work); + } +} + +/* If the CPU frequency is scaled, TSC-based delays will need a different + * loops_per_jiffy value to function properly. + */ + +static unsigned int ref_freq = 0; +static unsigned long loops_per_jiffy_ref = 0; + +#ifndef CONFIG_SMP +static unsigned long fast_gettimeoffset_ref = 0; +static unsigned int cpu_khz_ref = 0; +#endif + +static int +time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, + void *data) +{ + struct cpufreq_freqs *freq = data; + + if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) + write_seqlock_irq(&xtime_lock); + if (!ref_freq) { + if (!freq->old){ + ref_freq = freq->new; + goto end; + } + ref_freq = freq->old; + loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; +#ifndef CONFIG_SMP + fast_gettimeoffset_ref = fast_gettimeoffset_quotient; + cpu_khz_ref = cpu_khz; +#endif + } + + if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) || + (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || + (val == CPUFREQ_RESUMECHANGE)) { + if (!(freq->flags & CPUFREQ_CONST_LOOPS)) + cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new); +#ifndef CONFIG_SMP + if (cpu_khz) + cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new); + if (use_tsc) { + if (!(freq->flags & CPUFREQ_CONST_LOOPS)) { + fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq); + set_cyc2ns_scale(cpu_khz); + } + } +#endif + } + +end: + if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) + write_sequnlock_irq(&xtime_lock); + + return 0; +} + +static struct notifier_block time_cpufreq_notifier_block = { + .notifier_call = time_cpufreq_notifier +}; + + +static int __init cpufreq_tsc(void) +{ + int ret; + INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL); + ret = cpufreq_register_notifier(&time_cpufreq_notifier_block, + CPUFREQ_TRANSITION_NOTIFIER); + if (!ret) + cpufreq_init = 1; + return ret; +} +core_initcall(cpufreq_tsc); + +#else /* CONFIG_CPU_FREQ */ +static inline void cpufreq_delayed_get(void) { return; } +#endif + +int recalibrate_cpu_khz(void) +{ +#ifndef CONFIG_SMP + unsigned int cpu_khz_old = cpu_khz; + + if (cpu_has_tsc) { + local_irq_disable(); + init_cpu_khz(); + local_irq_enable(); + cpu_data[0].loops_per_jiffy = + cpufreq_scale(cpu_data[0].loops_per_jiffy, + cpu_khz_old, + cpu_khz); + return 0; + } else + return -ENODEV; +#else + return -ENODEV; +#endif +} +EXPORT_SYMBOL(recalibrate_cpu_khz); + +static void mark_offset_tsc(void) +{ + unsigned long lost,delay; + unsigned long delta = last_tsc_low; + int count; + int countmp; + static int count1 = 0; + unsigned long long this_offset, last_offset; + static int lost_count = 0; + + write_seqlock(&monotonic_lock); + last_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + /* + * It is important that these two operations happen almost at + * the same time. We do the RDTSC stuff first, since it's + * faster. To avoid any inconsistencies, we need interrupts + * disabled locally. + */ + + /* + * Interrupts are just disabled locally since the timer irq + * has the SA_INTERRUPT flag set. -arca + */ + + /* read Pentium cycle counter */ + + rdtsc(last_tsc_low, last_tsc_high); + + spin_lock(&i8253_lock); + outb_p(0x00, PIT_MODE); /* latch the count ASAP */ + + 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) { + /* get center value of last 3 time lutch */ + if ((count2 >= count && count >= count1) + || (count1 >= count && count >= count2)) { + count2 = count1; count1 = count; + } else if ((count1 >= count2 && count2 >= count) + || (count >= count2 && count2 >= count1)) { + countmp = count;count = count2; + count2 = count1;count1 = countmp; + } else { + count2 = count1; count1 = count; count = count1; + } + } + + /* lost tick compensation */ + delta = last_tsc_low - delta; + { + register unsigned long eax, edx; + eax = delta; + __asm__("mull %2" + :"=a" (eax), "=d" (edx) + :"rm" (fast_gettimeoffset_quotient), + "0" (eax)); + delta = edx; + } + delta += delay_at_last_interrupt; + lost = delta/(1000000/HZ); + delay = delta%(1000000/HZ); + if (lost >= 2 && detect_lost_ticks) { + jiffies_64 += lost-1; + + /* sanity check to ensure we're not always losing ticks */ + if (lost_count++ > 100) { + printk(KERN_WARNING "Losing too many ticks!\n"); + printk(KERN_WARNING "TSC cannot be used as a timesource. \n"); + printk(KERN_WARNING "Possible reasons for this are:\n"); + printk(KERN_WARNING " You're running with Speedstep,\n"); + printk(KERN_WARNING " You don't have DMA enabled for your hard disk (see hdparm),\n"); + printk(KERN_WARNING " Incorrect TSC synchronization on an SMP system (see dmesg).\n"); + printk(KERN_WARNING "Falling back to a sane timesource now.\n"); + + clock_fallback(); + } + /* ... but give the TSC a fair chance */ + if (lost_count > 25) + cpufreq_delayed_get(); + } else + lost_count = 0; + /* update the monotonic base value */ + this_offset = ((unsigned long long)last_tsc_high<<32)|last_tsc_low; + monotonic_base += cycles_2_ns(this_offset - last_offset); + write_sequnlock(&monotonic_lock); + + /* calculate delay_at_last_interrupt */ + count = ((LATCH-1) - count) * TICK_SIZE; + delay_at_last_interrupt = (count + LATCH/2) / LATCH; + + /* catch corner case where tick rollover occured + * between tsc and pit reads (as noted when + * usec delta is > 90% # of usecs/tick) + */ + if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ)) + jiffies_64++; +} + +static int __init init_tsc(char* override) +{ + + /* check clock override */ + if (override[0] && strncmp(override,"tsc",3)) { +#ifdef CONFIG_HPET_TIMER + if (is_hpet_enabled()) { + printk(KERN_ERR "Warning: clock= override failed. Defaulting to tsc\n"); + } else +#endif + { + return -ENODEV; + } + } + + /* + * If we have APM enabled or the CPU clock speed is variable + * (CPU stops clock on HLT or slows clock to save power) + * then the TSC timestamps may diverge by up to 1 jiffy from + * 'real time' but nothing will break. + * The most frequent case is that the CPU is "woken" from a halt + * state by the timer interrupt itself, so we get 0 error. In the + * rare cases where a driver would "wake" the CPU and request a + * timestamp, the maximum error is < 1 jiffy. But timestamps are + * still perfectly ordered. + * Note that the TSC counter will be reset if APM suspends + * to disk; this won't break the kernel, though, 'cuz we're + * smart. See arch/i386/kernel/apm.c. + */ + /* + * Firstly we have to do a CPU check for chips with + * a potentially buggy TSC. At this point we haven't run + * the ident/bugs checks so we must run this hook as it + * may turn off the TSC flag. + * + * NOTE: this doesn't yet handle SMP 486 machines where only + * 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! + */ + + count2 = LATCH; /* initialize counter for mark_offset_tsc() */ + + if (cpu_has_tsc) { + unsigned long tsc_quotient; +#ifdef CONFIG_HPET_TIMER + if (is_hpet_enabled() && hpet_use_timer) { + unsigned long result, remain; + printk("Using TSC for gettimeofday\n"); + tsc_quotient = calibrate_tsc_hpet(NULL); + timer_tsc.mark_offset = &mark_offset_tsc_hpet; + /* + * Math to calculate hpet to usec multiplier + * Look for the comments at get_offset_tsc_hpet() + */ + ASM_DIV64_REG(result, remain, hpet_tick, + 0, KERNEL_TICK_USEC); + if (remain > (hpet_tick >> 1)) + result++; /* rounding the result */ + + hpet_usec_quotient = result; + } else +#endif + { + tsc_quotient = calibrate_tsc(); + } + + if (tsc_quotient) { + fast_gettimeoffset_quotient = tsc_quotient; + use_tsc = 1; + /* + * We could be more selective here I suspect + * and just enable this for the next intel chips ? + */ + /* report CPU clock rate in Hz. + * The formula is (10^6 * 2^32) / (2^32 * 1 / (clocks/us)) = + * clock/second. Our precision is about 100 ppm. + */ + { unsigned long eax=0, edx=1000; + __asm__("divl %2" + :"=a" (cpu_khz), "=d" (edx) + :"r" (tsc_quotient), + "0" (eax), "1" (edx)); + printk("Detected %u.%03u MHz processor.\n", + cpu_khz / 1000, cpu_khz % 1000); + } + set_cyc2ns_scale(cpu_khz); + return 0; + } + } + return -ENODEV; +} + +static int tsc_resume(void) +{ + write_seqlock(&monotonic_lock); + /* Assume this is the last mark offset time */ + rdtsc(last_tsc_low, last_tsc_high); +#ifdef CONFIG_HPET_TIMER + if (is_hpet_enabled() && hpet_use_timer) + hpet_last = hpet_readl(HPET_COUNTER); +#endif + write_sequnlock(&monotonic_lock); + return 0; +} + +#ifndef CONFIG_X86_TSC +/* disable flag for tsc. Takes effect by clearing the TSC cpu flag + * in cpu/common.c */ +static int __init tsc_setup(char *str) +{ + tsc_disable = 1; + return 1; +} +#else +static int __init tsc_setup(char *str) +{ + printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " + "cannot disable TSC.\n"); + return 1; +} +#endif +__setup("notsc", tsc_setup); + + + +/************************************************************/ + +/* tsc timer_opts struct */ +static struct timer_opts timer_tsc = { + .name = "tsc", + .mark_offset = mark_offset_tsc, + .get_offset = get_offset_tsc, + .monotonic_clock = monotonic_clock_tsc, + .delay = delay_tsc, + .read_timer = read_timer_tsc, + .resume = tsc_resume, +}; + +struct init_timer_opts __initdata timer_tsc_init = { + .init = init_tsc, + .opts = &timer_tsc, +}; diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index e2e281d4b..296355292 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c @@ -32,8 +32,15 @@ static struct i386_cpu cpu_devices[NR_CPUS]; -int arch_register_cpu(int num) -{ +int arch_register_cpu(int num){ + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + if (node_online(node)) + parent = &node_devices[node].node; +#endif /* CONFIG_NUMA */ + /* * CPU0 cannot be offlined due to several * restrictions and assumptions in kernel. This basically @@ -43,13 +50,21 @@ int arch_register_cpu(int num) if (!num) cpu_devices[num].cpu.no_control = 1; - return register_cpu(&cpu_devices[num].cpu, num); + return register_cpu(&cpu_devices[num].cpu, num, parent); } #ifdef CONFIG_HOTPLUG_CPU void arch_unregister_cpu(int num) { - return unregister_cpu(&cpu_devices[num].cpu); + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + if (node_online(node)) + parent = &node_devices[node].node; +#endif /* CONFIG_NUMA */ + + return unregister_cpu(&cpu_devices[num].cpu, parent); } EXPORT_SYMBOL(arch_register_cpu); EXPORT_SYMBOL(arch_unregister_cpu); @@ -59,13 +74,16 @@ EXPORT_SYMBOL(arch_unregister_cpu); #ifdef CONFIG_NUMA #include +#include + +struct i386_node node_devices[MAX_NUMNODES]; static int __init topology_init(void) { int i; for_each_online_node(i) - register_one_node(i); + arch_register_node(i); for_each_present_cpu(i) arch_register_cpu(i); diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 05ab8b0fe..5b65cb842 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -11,6 +11,7 @@ * 'Traps.c' handles hardware traps and faults after we have saved some * state in 'asm.s'. */ +#include #include #include #include @@ -27,7 +28,6 @@ #include #include #include -#include #ifdef CONFIG_EISA #include @@ -47,11 +47,10 @@ #include #include #include -#include + #include #include #include -#include #include #include @@ -94,11 +93,6 @@ asmlinkage void spurious_interrupt_bug(void); asmlinkage void machine_check(void); static int kstack_depth_to_print = 24; -#ifdef CONFIG_STACK_UNWIND -static int call_trace = 1; -#else -#define call_trace (-1) -#endif ATOMIC_NOTIFIER_HEAD(i386die_chain); extern char last_sysfs_file[]; @@ -108,13 +102,13 @@ int register_die_notifier(struct notifier_block *nb) vmalloc_sync_all(); return atomic_notifier_chain_register(&i386die_chain, nb); } -EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ +EXPORT_SYMBOL(register_die_notifier); int unregister_die_notifier(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&i386die_chain, nb); } -EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ +EXPORT_SYMBOL(unregister_die_notifier); static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) { @@ -122,182 +116,92 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) p < (void *)tinfo + THREAD_SIZE - 3; } +/* + * Print CONFIG_STACK_BACKTRACE_COLS address/symbol entries per line. + */ +static inline int print_addr_and_symbol(unsigned long addr, char *log_lvl, + int printed) +{ + if (!printed) + printk(log_lvl); + +#if CONFIG_STACK_BACKTRACE_COLS == 1 + printk(" [<%08lx>] ", addr); +#else + printk(" <%08lx> ", addr); +#endif + print_symbol("%s", addr); + + printed = (printed + 1) % CONFIG_STACK_BACKTRACE_COLS; + if (printed) + printk(" "); + else + printk("\n"); + + return printed; +} + static inline unsigned long print_context_stack(struct thread_info *tinfo, unsigned long *stack, unsigned long ebp, - struct stacktrace_ops *ops, void *data) + char *log_lvl) { unsigned long addr; + int printed = 0; /* nr of entries already printed on current line */ #ifdef CONFIG_FRAME_POINTER while (valid_stack_ptr(tinfo, (void *)ebp)) { addr = *(unsigned long *)(ebp + 4); - ops->address(data, addr); - /* - * break out of recursive entries (such as - * end_of_stack_stop_unwind_function): - */ - if (ebp == *(unsigned long *)ebp) - break; + printed = print_addr_and_symbol(addr, log_lvl, printed); ebp = *(unsigned long *)ebp; } #else while (valid_stack_ptr(tinfo, stack)) { addr = *stack++; if (__kernel_text_address(addr)) - ops->address(data, addr); + printed = print_addr_and_symbol(addr, log_lvl, printed); } #endif - return ebp; -} + if (printed) + printk("\n"); -struct ops_and_data { - struct stacktrace_ops *ops; - void *data; -}; - -static asmlinkage int -dump_trace_unwind(struct unwind_frame_info *info, void *data) -{ - struct ops_and_data *oad = (struct ops_and_data *)data; - int n = 0; - - while (unwind(info) == 0 && UNW_PC(info)) { - n++; - oad->ops->address(oad->data, UNW_PC(info)); - if (arch_unw_user_mode(info)) - break; - } - return n; + return ebp; } -void dump_trace(struct task_struct *task, struct pt_regs *regs, - unsigned long *stack, - struct stacktrace_ops *ops, void *data) +static void show_trace_log_lvl(struct task_struct *task, + unsigned long *stack, char *log_lvl) { - unsigned long ebp = 0; + unsigned long ebp; if (!task) task = current; - if (call_trace >= 0) { - int unw_ret = 0; - struct unwind_frame_info info; - struct ops_and_data oad = { .ops = ops, .data = data }; - - if (regs) { - if (unwind_init_frame_info(&info, task, regs) == 0) - unw_ret = dump_trace_unwind(&info, &oad); - } else if (task == current) - unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); - else { - if (unwind_init_blocked(&info, task) == 0) - unw_ret = dump_trace_unwind(&info, &oad); - } - if (unw_ret > 0) { - if (call_trace == 1 && !arch_unw_user_mode(&info)) { - ops->warning_symbol(data, "DWARF2 unwinder stuck at %s", - UNW_PC(&info)); - if (UNW_SP(&info) >= PAGE_OFFSET) { - ops->warning(data, "Leftover inexact backtrace:"); - stack = (void *)UNW_SP(&info); - if (!stack) - return; - ebp = UNW_FP(&info); - } else - ops->warning(data, "Full inexact backtrace again:"); - } else if (call_trace >= 1) - return; - else - ops->warning(data, "Full inexact backtrace again:"); - } else - ops->warning(data, "Inexact backtrace:"); - } - if (!stack) { - unsigned long dummy; - stack = &dummy; - if (task && task != current) - stack = (unsigned long *)task->thread.esp; - } - -#ifdef CONFIG_FRAME_POINTER - if (!ebp) { - if (task == current) { - /* Grab ebp right from our regs */ - asm ("movl %%ebp, %0" : "=r" (ebp) : ); - } else { - /* ebp is the last reg pushed by switch_to */ - ebp = *(unsigned long *) task->thread.esp; - } + if (task == current) { + /* Grab ebp right from our regs */ + asm ("movl %%ebp, %0" : "=r" (ebp) : ); + } else { + /* ebp is the last reg pushed by switch_to */ + ebp = *(unsigned long *) task->thread.esp; } -#endif while (1) { struct thread_info *context; context = (struct thread_info *) ((unsigned long)stack & (~(THREAD_SIZE - 1))); - ebp = print_context_stack(context, stack, ebp, ops, data); - /* Should be after the line below, but somewhere - in early boot context comes out corrupted and we - can't reference it -AK */ - if (ops->stack(data, "IRQ") < 0) - break; + ebp = print_context_stack(context, stack, ebp, log_lvl); stack = (unsigned long*)context->previous_esp; if (!stack) break; + printk("%s =======================\n", log_lvl); } } -EXPORT_SYMBOL(dump_trace); -static void -print_trace_warning_symbol(void *data, char *msg, unsigned long symbol) +void show_trace(struct task_struct *task, unsigned long * stack) { - printk(data); - print_symbol(msg, symbol); - printk("\n"); + show_trace_log_lvl(task, stack, ""); } -static void print_trace_warning(void *data, char *msg) -{ - printk("%s%s\n", (char *)data, msg); -} - -static int print_trace_stack(void *data, char *name) -{ - return 0; -} - -/* - * Print one address/symbol entries per line. - */ -static void print_trace_address(void *data, unsigned long addr) -{ - printk("%s [<%08lx>] ", (char *)data, addr); - print_symbol("%s\n", addr); -} - -static struct stacktrace_ops print_trace_ops = { - .warning = print_trace_warning, - .warning_symbol = print_trace_warning_symbol, - .stack = print_trace_stack, - .address = print_trace_address, -}; - -static void -show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, - unsigned long * stack, char *log_lvl) -{ - dump_trace(task, regs, stack, &print_trace_ops, log_lvl); - printk("%s =======================\n", log_lvl); -} - -void show_trace(struct task_struct *task, struct pt_regs *regs, - unsigned long * stack) -{ - show_trace_log_lvl(task, regs, stack, ""); -} - -static void show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, - unsigned long *esp, char *log_lvl) +static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp, + char *log_lvl) { unsigned long *stack; int i; @@ -318,13 +222,13 @@ static void show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, printk("%08lx ", *stack++); } printk("\n%sCall Trace:\n", log_lvl); - show_trace_log_lvl(task, regs, esp, log_lvl); + show_trace_log_lvl(task, esp, log_lvl); } void show_stack(struct task_struct *task, unsigned long *esp) { printk(" "); - show_stack_log_lvl(task, NULL, esp, ""); + show_stack_log_lvl(task, esp, ""); } /* @@ -334,7 +238,7 @@ void dump_stack(void) { unsigned long stack; - show_trace(current, NULL, &stack); + show_trace(current, &stack); } EXPORT_SYMBOL(dump_stack); @@ -367,9 +271,9 @@ void show_registers(struct pt_regs *regs) regs->esi, regs->edi, regs->ebp, esp); printk(KERN_EMERG "ds: %04x es: %04x ss: %04x\n", regs->xds & 0xffff, regs->xes & 0xffff, ss); - printk(KERN_EMERG "Process %.*s (pid: %d[#%u], ti=%p task=%p task.ti=%p)", - TASK_COMM_LEN, current->comm, current->pid, current->xid, - current_thread_info(), current, current->thread_info); + printk(KERN_EMERG "Process %s (pid: %d[#%u], threadinfo=%p task=%p)", + current->comm, current->pid, current->xid, + current_thread_info(), current); /* * When in-kernel, we also print out the stack and code at the * time of the fault.. @@ -378,7 +282,7 @@ void show_registers(struct pt_regs *regs) u8 __user *eip; printk("\n" KERN_EMERG "Stack: "); - show_stack_log_lvl(NULL, regs, (unsigned long *)esp, KERN_EMERG); + show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG); printk(KERN_EMERG "Code: "); @@ -401,35 +305,35 @@ void show_registers(struct pt_regs *regs) static void handle_BUG(struct pt_regs *regs) { - unsigned long eip = regs->eip; unsigned short ud2; + unsigned short line; + char *file; + char c; + unsigned long eip; + + eip = regs->eip; if (eip < PAGE_OFFSET) - return; + goto no_bug; if (__get_user(ud2, (unsigned short __user *)eip)) - return; + goto no_bug; if (ud2 != 0x0b0f) - return; + goto no_bug; + if (__get_user(line, (unsigned short __user *)(eip + 2))) + goto bug; + if (__get_user(file, (char * __user *)(eip + 4)) || + (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) + file = ""; printk(KERN_EMERG "------------[ cut here ]------------\n"); + printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line); -#ifdef CONFIG_DEBUG_BUGVERBOSE - do { - unsigned short line; - char *file; - char c; - - if (__get_user(line, (unsigned short __user *)(eip + 2))) - break; - if (__get_user(file, (char * __user *)(eip + 4)) || - (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) - file = ""; +no_bug: + return; - printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line); - return; - } while (0); -#endif - printk(KERN_EMERG "Kernel BUG at [verbose debug info unavailable]\n"); + /* Here we know it was a BUG but file-n-line is unavailable */ +bug: + printk(KERN_EMERG "Kernel BUG\n"); } /* This is gone through when something in the kernel @@ -524,9 +428,11 @@ void die(const char * str, struct pt_regs * regs, long err) if (in_interrupt()) panic("Fatal exception in interrupt"); - if (panic_on_oops) + if (panic_on_oops) { + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); panic("Fatal exception"); - + } oops_exit(); do_exit(SIGSEGV); } @@ -840,6 +746,7 @@ void die_nmi (struct pt_regs *regs, const char *msg) printk(" on CPU%d, eip %08lx, registers:\n", smp_processor_id(), regs->eip); show_registers(regs); + printk(KERN_EMERG "console shuts up ...\n"); console_silent(); spin_unlock(&nmi_print_lock); bust_spinlocks(0); @@ -1392,19 +1299,3 @@ static int __init kstack_setup(char *s) return 1; } __setup("kstack=", kstack_setup); - -#ifdef CONFIG_STACK_UNWIND -static int __init call_trace_setup(char *s) -{ - if (strcmp(s, "old") == 0) - call_trace = -1; - else if (strcmp(s, "both") == 0) - call_trace = 0; - else if (strcmp(s, "newfallback") == 0) - call_trace = 1; - else if (strcmp(s, "new") == 2) - call_trace = 2; - return 1; -} -__setup("call_trace=", call_trace_setup); -#endif diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c deleted file mode 100644 index 650b7462a..000000000 --- a/arch/i386/kernel/tsc.c +++ /dev/null @@ -1,480 +0,0 @@ -/* - * This code largely moved from arch/i386/kernel/timer/timer_tsc.c - * which was originally moved from arch/i386/kernel/time.c. - * See comments there for proper credits. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "mach_timer.h" - -/* - * On some systems the TSC frequency does not - * change with the cpu frequency. So we need - * an extra value to store the TSC freq - */ -unsigned int tsc_khz; - -int tsc_disable __cpuinitdata = 0; - -#ifdef CONFIG_X86_TSC -static int __init tsc_setup(char *str) -{ - printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " - "cannot disable TSC.\n"); - return 1; -} -#else -/* - * disable flag for tsc. Takes effect by clearing the TSC cpu flag - * in cpu/common.c - */ -static int __init tsc_setup(char *str) -{ - tsc_disable = 1; - - return 1; -} -#endif - -__setup("notsc", tsc_setup); - -/* - * code to mark and check if the TSC is unstable - * due to cpufreq or due to unsynced TSCs - */ -static int tsc_unstable; - -static inline int check_tsc_unstable(void) -{ - return tsc_unstable; -} - -void mark_tsc_unstable(void) -{ - tsc_unstable = 1; -} -EXPORT_SYMBOL_GPL(mark_tsc_unstable); - -/* Accellerators for sched_clock() - * convert from cycles(64bits) => nanoseconds (64bits) - * basic equation: - * ns = cycles / (freq / ns_per_sec) - * ns = cycles * (ns_per_sec / freq) - * ns = cycles * (10^9 / (cpu_khz * 10^3)) - * ns = cycles * (10^6 / cpu_khz) - * - * Then we use scaling math (suggested by george@mvista.com) to get: - * ns = cycles * (10^6 * SC / cpu_khz) / SC - * ns = cycles * cyc2ns_scale / SC - * - * And since SC is a constant power of two, we can convert the div - * into a shift. - * - * We can use khz divisor instead of mhz to keep a better percision, since - * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. - * (mathieu.desnoyers@polymtl.ca) - * - * -johnstul@us.ibm.com "math is hard, lets go shopping!" - */ -static unsigned long cyc2ns_scale __read_mostly; - -#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ - -static inline void set_cyc2ns_scale(unsigned long cpu_khz) -{ - cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; -} - -static inline unsigned long long cycles_2_ns(unsigned long long cyc) -{ - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - -#ifndef CONFIG_XEN -/* - * Scheduler clock - returns current time in nanosec units. - */ -unsigned long long sched_clock(void) -{ - unsigned long long this_offset; - - /* - * in the NUMA case we dont use the TSC as they are not - * synchronized across all CPUs. - */ -#ifndef CONFIG_NUMA - if (!cpu_khz || check_tsc_unstable()) -#endif - /* no locking but a rare wrong value is not a big deal */ - return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); - - /* read the Time Stamp Counter: */ - rdtscll(this_offset); - - /* return the value in ns */ - return cycles_2_ns(this_offset); -} -#endif - -static unsigned long calculate_cpu_khz(void) -{ - unsigned long long start, end; - unsigned long count; - u64 delta64; - int i; - unsigned long flags; - - local_irq_save(flags); - - /* run 3 times to ensure the cache is warm */ - for (i = 0; i < 3; i++) { - mach_prepare_counter(); - rdtscll(start); - mach_countup(&count); - rdtscll(end); - } - /* - * Error: ECTCNEVERSET - * The CTC wasn't reliable: we got a hit on the very first read, - * or the CPU was so fast/slow that the quotient wouldn't fit in - * 32 bits.. - */ - if (count <= 1) - goto err; - - delta64 = end - start; - - /* cpu freq too fast: */ - if (delta64 > (1ULL<<32)) - goto err; - - /* cpu freq too slow: */ - if (delta64 <= CALIBRATE_TIME_MSEC) - goto err; - - delta64 += CALIBRATE_TIME_MSEC/2; /* round for do_div */ - do_div(delta64,CALIBRATE_TIME_MSEC); - - local_irq_restore(flags); - return (unsigned long)delta64; -err: - local_irq_restore(flags); - return 0; -} - -int recalibrate_cpu_khz(void) -{ -#ifndef CONFIG_SMP - unsigned long cpu_khz_old = cpu_khz; - - if (cpu_has_tsc) { - cpu_khz = calculate_cpu_khz(); - tsc_khz = cpu_khz; - cpu_data[0].loops_per_jiffy = - cpufreq_scale(cpu_data[0].loops_per_jiffy, - cpu_khz_old, cpu_khz); - return 0; - } else - return -ENODEV; -#else - return -ENODEV; -#endif -} - -EXPORT_SYMBOL(recalibrate_cpu_khz); - -void tsc_init(void) -{ - if (!cpu_has_tsc || tsc_disable) - return; - - cpu_khz = calculate_cpu_khz(); - tsc_khz = cpu_khz; - - if (!cpu_khz) - return; - - printk("Detected %lu.%03lu MHz processor.\n", - (unsigned long)cpu_khz / 1000, - (unsigned long)cpu_khz % 1000); - - set_cyc2ns_scale(cpu_khz); - use_tsc_delay(); -} - -#ifdef CONFIG_CPU_FREQ - -static unsigned int cpufreq_delayed_issched = 0; -static unsigned int cpufreq_init = 0; -static struct work_struct cpufreq_delayed_get_work; - -static void handle_cpufreq_delayed_get(void *v) -{ - unsigned int cpu; - - for_each_online_cpu(cpu) - cpufreq_get(cpu); - - cpufreq_delayed_issched = 0; -} - -/* - * if we notice cpufreq oddness, schedule a call to cpufreq_get() as it tries - * to verify the CPU frequency the timing core thinks the CPU is running - * at is still correct. - */ -static inline void cpufreq_delayed_get(void) -{ - if (cpufreq_init && !cpufreq_delayed_issched) { - cpufreq_delayed_issched = 1; - printk(KERN_DEBUG "Checking if CPU frequency changed.\n"); - schedule_work(&cpufreq_delayed_get_work); - } -} - -/* - * if the CPU frequency is scaled, TSC-based delays will need a different - * loops_per_jiffy value to function properly. - */ -static unsigned int ref_freq = 0; -static unsigned long loops_per_jiffy_ref = 0; -static unsigned long cpu_khz_ref = 0; - -static int -time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) -{ - struct cpufreq_freqs *freq = data; - - if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) - write_seqlock_irq(&xtime_lock); - - if (!ref_freq) { - if (!freq->old){ - ref_freq = freq->new; - goto end; - } - ref_freq = freq->old; - loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; - cpu_khz_ref = cpu_khz; - } - - if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) || - (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || - (val == CPUFREQ_RESUMECHANGE)) { - if (!(freq->flags & CPUFREQ_CONST_LOOPS)) - cpu_data[freq->cpu].loops_per_jiffy = - cpufreq_scale(loops_per_jiffy_ref, - ref_freq, freq->new); - - if (cpu_khz) { - - if (num_online_cpus() == 1) - cpu_khz = cpufreq_scale(cpu_khz_ref, - ref_freq, freq->new); - if (!(freq->flags & CPUFREQ_CONST_LOOPS)) { - tsc_khz = cpu_khz; - set_cyc2ns_scale(cpu_khz); - /* - * TSC based sched_clock turns - * to junk w/ cpufreq - */ - mark_tsc_unstable(); - } - } - } -end: - if (val != CPUFREQ_RESUMECHANGE && val != CPUFREQ_SUSPENDCHANGE) - write_sequnlock_irq(&xtime_lock); - - return 0; -} - -static struct notifier_block time_cpufreq_notifier_block = { - .notifier_call = time_cpufreq_notifier -}; - -static int __init cpufreq_tsc(void) -{ - int ret; - - INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL); - ret = cpufreq_register_notifier(&time_cpufreq_notifier_block, - CPUFREQ_TRANSITION_NOTIFIER); - if (!ret) - cpufreq_init = 1; - - return ret; -} - -core_initcall(cpufreq_tsc); - -#endif - -/* clock source code */ - -static unsigned long current_tsc_khz = 0; -static int tsc_update_callback(void); - -static cycle_t read_tsc(void) -{ - cycle_t ret; - - rdtscll(ret); - - return ret; -} - -static struct clocksource clocksource_tsc = { - .name = "tsc", - .rating = 300, - .read = read_tsc, - .mask = CLOCKSOURCE_MASK(64), - .mult = 0, /* to be set */ - .shift = 22, - .update_callback = tsc_update_callback, - .is_continuous = 1, -}; - -static int tsc_update_callback(void) -{ - int change = 0; - - /* check to see if we should switch to the safe clocksource: */ - if (clocksource_tsc.rating != 50 && check_tsc_unstable()) { - clocksource_tsc.rating = 50; - clocksource_reselect(); - change = 1; - } - - /* only update if tsc_khz has changed: */ - if (current_tsc_khz != tsc_khz) { - current_tsc_khz = tsc_khz; - clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, - clocksource_tsc.shift); - change = 1; - } - - return change; -} - -static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) -{ - printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", - d->ident); - mark_tsc_unstable(); - return 0; -} - -/* List of systems that have known TSC problems */ -static struct dmi_system_id __initdata bad_tsc_dmi_table[] = { - { - .callback = dmi_mark_tsc_unstable, - .ident = "IBM Thinkpad 380XD", - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "IBM"), - DMI_MATCH(DMI_BOARD_NAME, "2635FA0"), - }, - }, - {} -}; - -#define TSC_FREQ_CHECK_INTERVAL (10*MSEC_PER_SEC) /* 10sec in MS */ -static struct timer_list verify_tsc_freq_timer; - -/* XXX - Probably should add locking */ -static void verify_tsc_freq(unsigned long unused) -{ - static u64 last_tsc; - static unsigned long last_jiffies; - - u64 now_tsc, interval_tsc; - unsigned long now_jiffies, interval_jiffies; - - - if (check_tsc_unstable()) - return; - - rdtscll(now_tsc); - now_jiffies = jiffies; - - if (!last_jiffies) { - goto out; - } - - interval_jiffies = now_jiffies - last_jiffies; - interval_tsc = now_tsc - last_tsc; - interval_tsc *= HZ; - do_div(interval_tsc, cpu_khz*1000); - - if (interval_tsc < (interval_jiffies * 3 / 4)) { - printk("TSC appears to be running slowly. " - "Marking it as unstable\n"); - mark_tsc_unstable(); - return; - } - -out: - last_tsc = now_tsc; - last_jiffies = now_jiffies; - /* set us up to go off on the next interval: */ - mod_timer(&verify_tsc_freq_timer, - jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL)); -} - -/* - * Make an educated guess if the TSC is trustworthy and synchronized - * over all CPUs. - */ -static __init int unsynchronized_tsc(void) -{ - /* - * Intel systems are normally all synchronized. - * Exceptions must mark TSC as unstable: - */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) - return 0; - - /* assume multi socket systems are not synchronized: */ - return num_possible_cpus() > 1; -} - -static int __init init_tsc_clocksource(void) -{ - - if (cpu_has_tsc && tsc_khz && !tsc_disable) { - /* check blacklist */ - dmi_check_system(bad_tsc_dmi_table); - - if (unsynchronized_tsc()) /* mark unstable if unsynced */ - mark_tsc_unstable(); - current_tsc_khz = tsc_khz; - clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, - clocksource_tsc.shift); - /* lower the rating if we already know its unstable: */ - if (check_tsc_unstable()) - clocksource_tsc.rating = 50; - - init_timer(&verify_tsc_freq_timer); - verify_tsc_freq_timer.function = verify_tsc_freq; - verify_tsc_freq_timer.expires = - jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL); - add_timer(&verify_tsc_freq_timer); - - return clocksource_register(&clocksource_tsc); - } - - return 0; -} - -module_init(init_tsc_clocksource); diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index 76ed78094..c0adee5da 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -31,6 +31,7 @@ */ #include +#include #include #include #include diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 1e7ac1c44..8831303a4 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S @@ -13,12 +13,6 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(phys_startup_32) jiffies = jiffies_64; - -PHDRS { - text PT_LOAD FLAGS(5); /* R_E */ - data PT_LOAD FLAGS(7); /* RWE */ - note PT_NOTE FLAGS(4); /* R__ */ -} SECTIONS { . = __KERNEL_START; @@ -32,7 +26,7 @@ SECTIONS KPROBES_TEXT *(.fixup) *(.gnu.warning) - } :text = 0x9090 + } = 0x9090 _etext = .; /* End of text section */ @@ -43,18 +37,11 @@ SECTIONS RODATA - . = ALIGN(4); - __tracedata_start = .; - .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { - *(.tracedata) - } - __tracedata_end = .; - /* writeable */ .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ *(.data) CONSTRUCTORS - } :data + } . = ALIGN(4096); __nosave_begin = .; @@ -77,15 +64,6 @@ SECTIONS .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { *(.data.read_mostly) } _edata = .; /* End of data section */ -#ifdef CONFIG_STACK_UNWIND - . = ALIGN(4); - .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { - __start_unwind = .; - *(.eh_frame) - __end_unwind = .; - } -#endif - . = ALIGN(THREAD_SIZE); /* init_task */ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { *(.data.init_task) @@ -190,6 +168,4 @@ SECTIONS STABS_DEBUG DWARF_DEBUG - - NOTES } diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S index 1a36d26e1..6de83657a 100644 --- a/arch/i386/kernel/vsyscall-sysenter.S +++ b/arch/i386/kernel/vsyscall-sysenter.S @@ -42,11 +42,11 @@ __kernel_vsyscall: /* 7: align return point with nop's to make disassembly easier */ .space 7,0x90 - /* 14: System call restart point is here! (SYSENTER_RETURN-2) */ + /* 14: System call restart point is here! (SYSENTER_RETURN_OFFSET-2) */ jmp .Lenter_kernel /* 16: System call normal return point is here! */ - .globl SYSENTER_RETURN /* Symbol used by sysenter.c */ -SYSENTER_RETURN: + .globl SYSENTER_RETURN_OFFSET /* Symbol used by sysenter.c */ +SYSENTER_RETURN_OFFSET: pop %ebp .Lpop_ebp: pop %edx diff --git a/arch/i386/kernel/vsyscall.lds.S b/arch/i386/kernel/vsyscall.lds.S index f66cd11ad..1a670805a 100644 --- a/arch/i386/kernel/vsyscall.lds.S +++ b/arch/i386/kernel/vsyscall.lds.S @@ -7,10 +7,9 @@ SECTIONS { - . = VDSO_PRELINK + SIZEOF_HEADERS; + . = SIZEOF_HEADERS; .hash : { *(.hash) } :text - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } @@ -21,7 +20,7 @@ SECTIONS For the layouts to match, we need to skip more than enough space for the dynamic symbol table et al. If this amount is insufficient, ld -shared will barf. Just increase it here. */ - . = VDSO_PRELINK + 0x400; + . = 0x400; .text : { *(.text) } :text =0x90909090 .note : { *(.note.*) } :text :note diff --git a/arch/i386/lib/checksum.S b/arch/i386/lib/checksum.S index 75ffd0265..94c7867dd 100644 --- a/arch/i386/lib/checksum.S +++ b/arch/i386/lib/checksum.S @@ -25,6 +25,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include /* diff --git a/arch/i386/lib/delay.c b/arch/i386/lib/delay.c index 5818c316b..c49a6acbe 100644 --- a/arch/i386/lib/delay.c +++ b/arch/i386/lib/delay.c @@ -10,92 +10,43 @@ * we have to worry about. */ -#include +#include #include #include - +#include #include #include #include #ifdef CONFIG_SMP -# include +#include #endif -/* simple loop based delay: */ -static void delay_loop(unsigned long loops) -{ - int d0; - - __asm__ __volatile__( - "\tjmp 1f\n" - ".align 16\n" - "1:\tjmp 2f\n" - ".align 16\n" - "2:\tdecl %0\n\tjns 2b" - :"=&a" (d0) - :"0" (loops)); -} - -/* TSC based delay: */ -static void delay_tsc(unsigned long loops) -{ - unsigned long bclock, now; - - rdtscl(bclock); - do { - rep_nop(); - rdtscl(now); - } while ((now-bclock) < loops); -} - -/* - * Since we calibrate only once at boot, this - * function should be set once at boot and not changed - */ -static void (*delay_fn)(unsigned long) = delay_loop; - -void use_tsc_delay(void) -{ - delay_fn = delay_tsc; -} +extern struct timer_opts* timer; -#ifndef CONFIG_X86_XEN -int read_current_timer(unsigned long *timer_val) -{ - if (delay_fn == delay_tsc) { - rdtscl(*timer_val); - return 0; - } - return -1; -} -#endif void __delay(unsigned long loops) { - delay_fn(loops); + cur_timer->delay(loops); } inline void __const_udelay(unsigned long xloops) { int d0; - xloops *= 4; __asm__("mull %0" :"=d" (xloops), "=&a" (d0) - :"1" (xloops), "0" - (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))); - - __delay(++xloops); + :"1" (xloops),"0" (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))); + __delay(++xloops); } void __udelay(unsigned long usecs) { - __const_udelay(usecs * 0x000010c7); /* 2**32 / 1000000 (rounded up) */ + __const_udelay(usecs * 0x000010c7); /* 2**32 / 1000000 (rounded up) */ } void __ndelay(unsigned long nsecs) { - __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ + __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ } EXPORT_SYMBOL(__delay); diff --git a/arch/i386/lib/memcpy.c b/arch/i386/lib/memcpy.c index 8ac51b82a..891b2359d 100644 --- a/arch/i386/lib/memcpy.c +++ b/arch/i386/lib/memcpy.c @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/i386/lib/mmx.c b/arch/i386/lib/mmx.c index 28084d2e8..2afda94df 100644 --- a/arch/i386/lib/mmx.c +++ b/arch/i386/lib/mmx.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c index efc7e7d5f..4cf981d70 100644 --- a/arch/i386/lib/usercopy.c +++ b/arch/i386/lib/usercopy.c @@ -5,6 +5,7 @@ * Copyright 1997 Andi Kleen * Copyright 1997 Linus Torvalds */ +#include #include #include #include @@ -424,212 +425,15 @@ __copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size) : "eax", "edx", "memory"); return size; } - -/* - * Non Temporal Hint version of __copy_user_zeroing_intel. It is cache aware. - * hyoshiok@miraclelinux.com - */ - -static unsigned long __copy_user_zeroing_intel_nocache(void *to, - const void __user *from, unsigned long size) -{ - int d0, d1; - - __asm__ __volatile__( - " .align 2,0x90\n" - "0: movl 32(%4), %%eax\n" - " cmpl $67, %0\n" - " jbe 2f\n" - "1: movl 64(%4), %%eax\n" - " .align 2,0x90\n" - "2: movl 0(%4), %%eax\n" - "21: movl 4(%4), %%edx\n" - " movnti %%eax, 0(%3)\n" - " movnti %%edx, 4(%3)\n" - "3: movl 8(%4), %%eax\n" - "31: movl 12(%4),%%edx\n" - " movnti %%eax, 8(%3)\n" - " movnti %%edx, 12(%3)\n" - "4: movl 16(%4), %%eax\n" - "41: movl 20(%4), %%edx\n" - " movnti %%eax, 16(%3)\n" - " movnti %%edx, 20(%3)\n" - "10: movl 24(%4), %%eax\n" - "51: movl 28(%4), %%edx\n" - " movnti %%eax, 24(%3)\n" - " movnti %%edx, 28(%3)\n" - "11: movl 32(%4), %%eax\n" - "61: movl 36(%4), %%edx\n" - " movnti %%eax, 32(%3)\n" - " movnti %%edx, 36(%3)\n" - "12: movl 40(%4), %%eax\n" - "71: movl 44(%4), %%edx\n" - " movnti %%eax, 40(%3)\n" - " movnti %%edx, 44(%3)\n" - "13: movl 48(%4), %%eax\n" - "81: movl 52(%4), %%edx\n" - " movnti %%eax, 48(%3)\n" - " movnti %%edx, 52(%3)\n" - "14: movl 56(%4), %%eax\n" - "91: movl 60(%4), %%edx\n" - " movnti %%eax, 56(%3)\n" - " movnti %%edx, 60(%3)\n" - " addl $-64, %0\n" - " addl $64, %4\n" - " addl $64, %3\n" - " cmpl $63, %0\n" - " ja 0b\n" - " sfence \n" - "5: movl %0, %%eax\n" - " shrl $2, %0\n" - " andl $3, %%eax\n" - " cld\n" - "6: rep; movsl\n" - " movl %%eax,%0\n" - "7: rep; movsb\n" - "8:\n" - ".section .fixup,\"ax\"\n" - "9: lea 0(%%eax,%0,4),%0\n" - "16: pushl %0\n" - " pushl %%eax\n" - " xorl %%eax,%%eax\n" - " rep; stosb\n" - " popl %%eax\n" - " popl %0\n" - " jmp 8b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 0b,16b\n" - " .long 1b,16b\n" - " .long 2b,16b\n" - " .long 21b,16b\n" - " .long 3b,16b\n" - " .long 31b,16b\n" - " .long 4b,16b\n" - " .long 41b,16b\n" - " .long 10b,16b\n" - " .long 51b,16b\n" - " .long 11b,16b\n" - " .long 61b,16b\n" - " .long 12b,16b\n" - " .long 71b,16b\n" - " .long 13b,16b\n" - " .long 81b,16b\n" - " .long 14b,16b\n" - " .long 91b,16b\n" - " .long 6b,9b\n" - " .long 7b,16b\n" - ".previous" - : "=&c"(size), "=&D" (d0), "=&S" (d1) - : "1"(to), "2"(from), "0"(size) - : "eax", "edx", "memory"); - return size; -} - -static unsigned long __copy_user_intel_nocache(void *to, - const void __user *from, unsigned long size) -{ - int d0, d1; - - __asm__ __volatile__( - " .align 2,0x90\n" - "0: movl 32(%4), %%eax\n" - " cmpl $67, %0\n" - " jbe 2f\n" - "1: movl 64(%4), %%eax\n" - " .align 2,0x90\n" - "2: movl 0(%4), %%eax\n" - "21: movl 4(%4), %%edx\n" - " movnti %%eax, 0(%3)\n" - " movnti %%edx, 4(%3)\n" - "3: movl 8(%4), %%eax\n" - "31: movl 12(%4),%%edx\n" - " movnti %%eax, 8(%3)\n" - " movnti %%edx, 12(%3)\n" - "4: movl 16(%4), %%eax\n" - "41: movl 20(%4), %%edx\n" - " movnti %%eax, 16(%3)\n" - " movnti %%edx, 20(%3)\n" - "10: movl 24(%4), %%eax\n" - "51: movl 28(%4), %%edx\n" - " movnti %%eax, 24(%3)\n" - " movnti %%edx, 28(%3)\n" - "11: movl 32(%4), %%eax\n" - "61: movl 36(%4), %%edx\n" - " movnti %%eax, 32(%3)\n" - " movnti %%edx, 36(%3)\n" - "12: movl 40(%4), %%eax\n" - "71: movl 44(%4), %%edx\n" - " movnti %%eax, 40(%3)\n" - " movnti %%edx, 44(%3)\n" - "13: movl 48(%4), %%eax\n" - "81: movl 52(%4), %%edx\n" - " movnti %%eax, 48(%3)\n" - " movnti %%edx, 52(%3)\n" - "14: movl 56(%4), %%eax\n" - "91: movl 60(%4), %%edx\n" - " movnti %%eax, 56(%3)\n" - " movnti %%edx, 60(%3)\n" - " addl $-64, %0\n" - " addl $64, %4\n" - " addl $64, %3\n" - " cmpl $63, %0\n" - " ja 0b\n" - " sfence \n" - "5: movl %0, %%eax\n" - " shrl $2, %0\n" - " andl $3, %%eax\n" - " cld\n" - "6: rep; movsl\n" - " movl %%eax,%0\n" - "7: rep; movsb\n" - "8:\n" - ".section .fixup,\"ax\"\n" - "9: lea 0(%%eax,%0,4),%0\n" - "16: jmp 8b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 0b,16b\n" - " .long 1b,16b\n" - " .long 2b,16b\n" - " .long 21b,16b\n" - " .long 3b,16b\n" - " .long 31b,16b\n" - " .long 4b,16b\n" - " .long 41b,16b\n" - " .long 10b,16b\n" - " .long 51b,16b\n" - " .long 11b,16b\n" - " .long 61b,16b\n" - " .long 12b,16b\n" - " .long 71b,16b\n" - " .long 13b,16b\n" - " .long 81b,16b\n" - " .long 14b,16b\n" - " .long 91b,16b\n" - " .long 6b,9b\n" - " .long 7b,16b\n" - ".previous" - : "=&c"(size), "=&D" (d0), "=&S" (d1) - : "1"(to), "2"(from), "0"(size) - : "eax", "edx", "memory"); - return size; -} - #else - /* * Leave these declared but undefined. They should not be any references to * them */ -unsigned long __copy_user_zeroing_intel(void *to, const void __user *from, - unsigned long size); -unsigned long __copy_user_intel(void __user *to, const void *from, - unsigned long size); -unsigned long __copy_user_zeroing_intel_nocache(void *to, - const void __user *from, unsigned long size); +unsigned long +__copy_user_zeroing_intel(void *to, const void __user *from, unsigned long size); +unsigned long +__copy_user_intel(void __user *to, const void *from, unsigned long size); #endif /* CONFIG_X86_INTEL_USERCOPY */ /* Generic arbitrary sized copy. */ @@ -711,8 +515,8 @@ do { \ : "memory"); \ } while (0) -unsigned long __copy_to_user_ll(void __user *to, const void *from, - unsigned long n) + +unsigned long __copy_to_user_ll(void __user *to, const void *from, unsigned long n) { BUG_ON((long) n < 0); #ifndef CONFIG_X86_WP_WORKS_OK @@ -772,8 +576,8 @@ survive: } EXPORT_SYMBOL(__copy_to_user_ll); -unsigned long __copy_from_user_ll(void *to, const void __user *from, - unsigned long n) +unsigned long +__copy_from_user_ll(void *to, const void __user *from, unsigned long n) { BUG_ON((long)n < 0); if (movsl_is_ok(to, from, n)) @@ -784,49 +588,6 @@ unsigned long __copy_from_user_ll(void *to, const void __user *from, } EXPORT_SYMBOL(__copy_from_user_ll); -unsigned long __copy_from_user_ll_nozero(void *to, const void __user *from, - unsigned long n) -{ - BUG_ON((long)n < 0); - if (movsl_is_ok(to, from, n)) - __copy_user(to, from, n); - else - n = __copy_user_intel((void __user *)to, - (const void *)from, n); - return n; -} -EXPORT_SYMBOL(__copy_from_user_ll_nozero); - -unsigned long __copy_from_user_ll_nocache(void *to, const void __user *from, - unsigned long n) -{ - BUG_ON((long)n < 0); -#ifdef CONFIG_X86_INTEL_USERCOPY - if ( n > 64 && cpu_has_xmm2) - n = __copy_user_zeroing_intel_nocache(to, from, n); - else - __copy_user_zeroing(to, from, n); -#else - __copy_user_zeroing(to, from, n); -#endif - return n; -} - -unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *from, - unsigned long n) -{ - BUG_ON((long)n < 0); -#ifdef CONFIG_X86_INTEL_USERCOPY - if ( n > 64 && cpu_has_xmm2) - n = __copy_user_intel_nocache(to, from, n); - else - __copy_user(to, from, n); -#else - __copy_user(to, from, n); -#endif - return n; -} - /** * copy_to_user: - Copy a block of data into user space. * @to: Destination address, in user space. @@ -843,6 +604,7 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) { + might_sleep(); BUG_ON((long) n < 0); if (access_ok(VERIFY_WRITE, to, n)) n = __copy_to_user(to, from, n); @@ -869,6 +631,7 @@ EXPORT_SYMBOL(copy_to_user); unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) { + might_sleep(); BUG_ON((long) n < 0); if (access_ok(VERIFY_READ, from, n)) n = __copy_from_user(to, from, n); diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c index c511705c3..b4a7455c6 100644 --- a/arch/i386/mach-default/setup.c +++ b/arch/i386/mach-default/setup.c @@ -2,13 +2,12 @@ * Machine specific setup for generic */ +#include #include #include #include #include #include -#include -#include #ifdef CONFIG_HOTPLUG_CPU #define DEFAULT_SEND_IPI (1) @@ -79,7 +78,7 @@ void __init trap_init_hook(void) { } -static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; +static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; /** * time_init_hook - do any specific initialisations for the system timer. @@ -131,44 +130,3 @@ static int __init print_ipi_mode(void) } late_initcall(print_ipi_mode); - -/** - * machine_specific_memory_setup - Hook for machine specific memory setup. - * - * Description: - * This is included late in kernel/setup.c so that it can make - * use of all of the static functions. - **/ - -char * __init machine_specific_memory_setup(void) -{ - char *who; - - - who = "BIOS-e820"; - - /* - * Try to copy the BIOS-supplied E820-map. - * - * Otherwise fake a memory map; one section from 0k->640k, - * the next section from 1mb->appropriate_mem_k - */ - sanitize_e820_map(E820_MAP, &E820_MAP_NR); - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { - unsigned long mem_size; - - /* compare results from other methods and take the greater */ - if (ALT_MEM_K < EXT_MEM_K) { - mem_size = EXT_MEM_K; - who = "BIOS-88"; - } else { - mem_size = ALT_MEM_K; - who = "BIOS-e801"; - } - - e820.nr_map = 0; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); - } - return who; -} diff --git a/arch/i386/mach-generic/bigsmp.c b/arch/i386/mach-generic/bigsmp.c index ef7a6e6fc..037b2af1a 100644 --- a/arch/i386/mach-generic/bigsmp.c +++ b/arch/i386/mach-generic/bigsmp.c @@ -3,6 +3,7 @@ * Drives the local APIC in "clustered mode". */ #define APIC_DEFINITION 1 +#include #include #include #include diff --git a/arch/i386/mach-generic/default.c b/arch/i386/mach-generic/default.c index 96c19821e..7da14e9a7 100644 --- a/arch/i386/mach-generic/default.c +++ b/arch/i386/mach-generic/default.c @@ -2,6 +2,7 @@ * Default generic APIC driver. This handles upto 8 CPUs. */ #define APIC_DEFINITION 1 +#include #include #include #include diff --git a/arch/i386/mach-generic/es7000.c b/arch/i386/mach-generic/es7000.c index 845cdd0b3..48d3ec372 100644 --- a/arch/i386/mach-generic/es7000.c +++ b/arch/i386/mach-generic/es7000.c @@ -2,6 +2,7 @@ * APIC driver for the Unisys ES7000 chipset. */ #define APIC_DEFINITION 1 +#include #include #include #include diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index bcd1bcfaa..d55fa7b18 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c @@ -3,6 +3,7 @@ * * Generic x86 APIC driver probe layer. */ +#include #include #include #include diff --git a/arch/i386/mach-generic/summit.c b/arch/i386/mach-generic/summit.c index b73501ddd..65ddf74d7 100644 --- a/arch/i386/mach-generic/summit.c +++ b/arch/i386/mach-generic/summit.c @@ -2,6 +2,7 @@ * APIC driver for the IBM "Summit" chipset. */ #define APIC_DEFINITION 1 +#include #include #include #include diff --git a/arch/i386/mach-visws/mpparse.c b/arch/i386/mach-visws/mpparse.c index f3c74fab8..5f3d7e6de 100644 --- a/arch/i386/mach-visws/mpparse.c +++ b/arch/i386/mach-visws/mpparse.c @@ -1,4 +1,5 @@ +#include #include #include diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c index 885c7cbfd..07fac7e74 100644 --- a/arch/i386/mach-visws/setup.c +++ b/arch/i386/mach-visws/setup.c @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include "cobalt.h" #include "piix4.h" @@ -115,7 +113,7 @@ void __init pre_setup_arch_hook() static struct irqaction irq0 = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "timer", }; @@ -135,46 +133,3 @@ void __init time_init_hook(void) /* Wire cpu IDT entry to s/w handler (and Cobalt APIC to IDT) */ setup_irq(0, &irq0); } - -/* Hook for machine specific memory setup. */ - -#define MB (1024 * 1024) - -unsigned long sgivwfb_mem_phys; -unsigned long sgivwfb_mem_size; - -long long mem_size __initdata = 0; - -char * __init machine_specific_memory_setup(void) -{ - long long gfx_mem_size = 8 * MB; - - mem_size = ALT_MEM_K; - - if (!mem_size) { - printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n"); - mem_size = 128 * MB; - } - - /* - * this hardcodes the graphics memory to 8 MB - * it really should be sized dynamically (or at least - * set as a boot param) - */ - if (!sgivwfb_mem_size) { - printk(KERN_WARNING "Defaulting to 8 MB framebuffer size\n"); - sgivwfb_mem_size = 8 * MB; - } - - /* - * Trim to nearest MB - */ - sgivwfb_mem_size &= ~((1 << 20) - 1); - sgivwfb_mem_phys = mem_size - gfx_mem_size; - - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size - sgivwfb_mem_size - HIGH_MEMORY, E820_RAM); - add_memory_region(sgivwfb_mem_phys, sgivwfb_mem_size, E820_RESERVED); - - return "PROM"; -} diff --git a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c index 5199bd032..964353992 100644 --- a/arch/i386/mach-visws/traps.c +++ b/arch/i386/mach-visws/traps.c @@ -1,5 +1,6 @@ /* VISWS traps */ +#include #include #include #include diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c index 828522541..3e64fb721 100644 --- a/arch/i386/mach-visws/visws_apic.c +++ b/arch/i386/mach-visws/visws_apic.c @@ -16,6 +16,7 @@ * 25/11/2002 - Updated for 2.5 by Andrey Panin */ +#include #include #include #include @@ -277,22 +278,22 @@ void init_VISWS_APIC_irqs(void) irq_desc[i].depth = 1; if (i == 0) { - irq_desc[i].chip = &cobalt_irq_type; + irq_desc[i].handler = &cobalt_irq_type; } else if (i == CO_IRQ_IDE0) { - irq_desc[i].chip = &cobalt_irq_type; + irq_desc[i].handler = &cobalt_irq_type; } else if (i == CO_IRQ_IDE1) { - irq_desc[i].chip = &cobalt_irq_type; + irq_desc[i].handler = &cobalt_irq_type; } else if (i == CO_IRQ_8259) { - irq_desc[i].chip = &piix4_master_irq_type; + irq_desc[i].handler = &piix4_master_irq_type; } else if (i < CO_IRQ_APIC0) { - irq_desc[i].chip = &piix4_virtual_irq_type; + irq_desc[i].handler = &piix4_virtual_irq_type; } else if (IS_CO_APIC(i)) { - irq_desc[i].chip = &cobalt_irq_type; + irq_desc[i].handler = &cobalt_irq_type; } } diff --git a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c index cfa16c151..7d8a3acb9 100644 --- a/arch/i386/mach-voyager/setup.c +++ b/arch/i386/mach-voyager/setup.c @@ -2,13 +2,11 @@ * Machine specific setup for generic */ +#include #include #include +#include #include -#include -#include -#include -#include void __init pre_intr_init_hook(void) { @@ -26,7 +24,8 @@ void __init intr_init_hook(void) smp_intr_init(); #endif - setup_irq(2, &irq2); + if (!acpi_ioapic) + setup_irq(2, &irq2); } void __init pre_setup_arch_hook(void) @@ -40,80 +39,9 @@ void __init trap_init_hook(void) { } -static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; +static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; void __init time_init_hook(void) { setup_irq(0, &irq0); } - -/* Hook for machine specific memory setup. */ - -char * __init machine_specific_memory_setup(void) -{ - char *who; - - who = "NOT VOYAGER"; - - if(voyager_level == 5) { - __u32 addr, length; - int i; - - who = "Voyager-SUS"; - - e820.nr_map = 0; - for(i=0; voyager_memory_detect(i, &addr, &length); i++) { - add_memory_region(addr, length, E820_RAM); - } - return who; - } else if(voyager_level == 4) { - __u32 tom; - __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8; - /* select the DINO config space */ - outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT); - /* Read DINO top of memory register */ - tom = ((inb(catbase + 0x4) & 0xf0) << 16) - + ((inb(catbase + 0x5) & 0x7f) << 24); - - if(inb(catbase) != VOYAGER_DINO) { - printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); - tom = (EXT_MEM_K)<<10; - } - who = "Voyager-TOM"; - add_memory_region(0, 0x9f000, E820_RAM); - /* map from 1M to top of memory */ - add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM); - /* FIXME: Should check the ASICs to see if I need to - * take out the 8M window. Just do it at the moment - * */ - add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED); - return who; - } - - who = "BIOS-e820"; - - /* - * Try to copy the BIOS-supplied E820-map. - * - * Otherwise fake a memory map; one section from 0k->640k, - * the next section from 1mb->appropriate_mem_k - */ - sanitize_e820_map(E820_MAP, &E820_MAP_NR); - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { - unsigned long mem_size; - - /* compare results from other methods and take the greater */ - if (ALT_MEM_K < EXT_MEM_K) { - mem_size = EXT_MEM_K; - who = "BIOS-88"; - } else { - mem_size = ALT_MEM_K; - who = "BIOS-e801"; - } - - e820.nr_map = 0; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); - } - return who; -} diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 80b7f2fc4..b584060ec 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c @@ -12,6 +12,7 @@ * voyager_smp.c - Voyager SMP hal (emulates linux smp.c) */ +#include #include #include #include diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c index f50c6c6ad..10d21df14 100644 --- a/arch/i386/mach-voyager/voyager_cat.c +++ b/arch/i386/mach-voyager/voyager_cat.c @@ -16,6 +16,7 @@ * of bit shift manipulations to send and receive packets on the * serial bus */ +#include #include #include #include diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 6c86575ff..70e560a1b 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c @@ -9,6 +9,7 @@ * This file provides all the same external entries as smp.c but uses * the voyager hal to provide the functionality */ +#include #include #include #include @@ -660,7 +661,6 @@ do_boot_cpu(__u8 cpu) print_cpu_info(&cpu_data[cpu]); wmb(); cpu_set(cpu, cpu_callout_map); - cpu_set(cpu, cpu_present_map); } else { printk("CPU%d FAILED TO BOOT: ", cpu); @@ -1418,7 +1418,7 @@ smp_intr_init(void) * This is for later: first 16 correspond to PC IRQs; next 16 * are Primary MC IRQs and final 16 are Secondary MC IRQs */ for(i = 0; i < 48; i++) - irq_desc[i].chip = &vic_irq_type; + irq_desc[i].handler = &vic_irq_type; } /* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per @@ -1912,7 +1912,6 @@ void __devinit smp_prepare_boot_cpu(void) cpu_set(smp_processor_id(), cpu_online_map); cpu_set(smp_processor_id(), cpu_callout_map); cpu_set(smp_processor_id(), cpu_possible_map); - cpu_set(smp_processor_id(), cpu_present_map); } int __devinit @@ -1937,9 +1936,3 @@ smp_cpus_done(unsigned int max_cpus) { zap_low_mappings(); } - -void __init -smp_setup_processor_id(void) -{ - current_thread_info()->cpu = hard_smp_processor_id(); -} diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c index f39887359..2b03884fd 100644 --- a/arch/i386/mach-voyager/voyager_thread.c +++ b/arch/i386/mach-voyager/voyager_thread.c @@ -14,6 +14,7 @@ * */ #include +#include #include #include #include @@ -130,6 +131,7 @@ thread(void *unused) init_timer(&wakeup_timer); sigfillset(¤t->blocked); + current->signal->tty = NULL; printk(KERN_NOTICE "Voyager starting monitor thread\n"); diff --git a/arch/i386/mach-xen/irqflags.c b/arch/i386/mach-xen/irqflags.c deleted file mode 100644 index c990ca5d2..000000000 --- a/arch/i386/mach-xen/irqflags.c +++ /dev/null @@ -1,99 +0,0 @@ -#include -#include -#include -#include - -/* interrupt control.. */ - -/* - * The use of 'barrier' in the following reflects their use as local-lock - * operations. Reentrancy must be prevented (e.g., __cli()) /before/ following - * critical operations are executed. All critical operations must complete - * /before/ reentrancy is permitted (e.g., __sti()). Alpha architecture also - * includes these barriers, for example. - */ - -unsigned long __raw_local_save_flags(void) -{ - struct vcpu_info *_vcpu; - unsigned long flags; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - flags = _vcpu->evtchn_upcall_mask; - preempt_enable(); - - return flags; -} -EXPORT_SYMBOL(__raw_local_save_flags); - -void raw_local_irq_restore(unsigned long flags) -{ - struct vcpu_info *_vcpu; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - if ((_vcpu->evtchn_upcall_mask = flags) == 0) { - barrier(); /* unmask then check (avoid races) */ - if (unlikely(_vcpu->evtchn_upcall_pending)) - force_evtchn_callback(); - preempt_enable(); - } else - preempt_enable_no_resched(); - -} -EXPORT_SYMBOL(raw_local_irq_restore); - -void raw_local_irq_disable(void) -{ - struct vcpu_info *_vcpu; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - _vcpu->evtchn_upcall_mask = 1; - preempt_enable_no_resched(); -} -EXPORT_SYMBOL(raw_local_irq_disable); - -void raw_local_irq_enable(void) -{ - struct vcpu_info *_vcpu; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - _vcpu->evtchn_upcall_mask = 0; - barrier(); /* unmask then check (avoid races) */ - if (unlikely(_vcpu->evtchn_upcall_pending)) - force_evtchn_callback(); - preempt_enable(); -} -EXPORT_SYMBOL(raw_local_irq_enable); - -/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */ -int raw_irqs_disabled(void) -{ - struct vcpu_info *_vcpu; - int disabled; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - disabled = (_vcpu->evtchn_upcall_mask != 0); - preempt_enable_no_resched(); - return disabled; -} -EXPORT_SYMBOL(raw_irqs_disabled); - -unsigned long __raw_local_irq_save(void) -{ - struct vcpu_info *_vcpu; - unsigned long flags; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - flags = _vcpu->evtchn_upcall_mask; - _vcpu->evtchn_upcall_mask = 1; - preempt_enable_no_resched(); - - return flags; -} -EXPORT_SYMBOL(__raw_local_irq_save); diff --git a/arch/i386/mm/boot_ioremap.c b/arch/i386/mm/boot_ioremap.c index 5cf739a44..523b30634 100644 --- a/arch/i386/mm/boot_ioremap.c +++ b/arch/i386/mm/boot_ioremap.c @@ -15,6 +15,7 @@ * boot_pte_t is defined only if this all works correctly */ +#include #undef CONFIG_X86_PAE #include #include @@ -29,11 +30,8 @@ */ #define BOOT_PTE_PTRS (PTRS_PER_PTE*2) - -static unsigned long boot_pte_index(unsigned long vaddr) -{ - return __pa(vaddr) >> PAGE_SHIFT; -} +#define boot_pte_index(address) \ + (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1)) static inline boot_pte_t* boot_vaddr_to_pte(void *address) { diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 7c392dc55..fe6eb9013 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -22,6 +22,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -42,7 +43,7 @@ EXPORT_SYMBOL(node_data); bootmem_data_t node0_bdata; /* - * numa interface - we expect the numa architecture specific code to have + * numa interface - we expect the numa architecture specfic code to have * populated the following initialisation. * * 1) node_online_map - the map of all nodes configured (online) in the system diff --git a/arch/i386/mm/extable.c b/arch/i386/mm/extable.c index de03c5430..f70644931 100644 --- a/arch/i386/mm/extable.c +++ b/arch/i386/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/i386/mm/extable.c */ +#include #include #include #include diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index f72794683..7f0fcf219 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -30,40 +30,6 @@ extern void die(const char *,struct pt_regs *,long); -#ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); -int register_page_fault_notifier(struct notifier_block *nb) -{ - vmalloc_sync_all(); - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} - -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); -} -#else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - return NOTIFY_DONE; -} -#endif - - /* * Unlock any spinlocks which will prevent us from getting the * message out @@ -111,15 +77,12 @@ static inline unsigned long get_segment_eip(struct pt_regs *regs, unsigned seg = regs->xcs & 0xffff; u32 seg_ar, seg_limit, base, *desc; - /* Unlikely, but must come before segment checks. */ - if (unlikely(regs->eflags & VM_MASK)) { - base = seg << 4; - *eip_limit = base + 0xffff; - return base + (eip & 0xffff); - } - /* The standard kernel/user address space limit. */ *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; + + /* Unlikely, but must come before segment checks. */ + if (unlikely((regs->eflags & VM_MASK) != 0)) + return eip + (seg << 4); /* By far the most common cases. */ if (likely(seg == __USER_CS || seg == __KERNEL_CS)) @@ -358,7 +321,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, if (unlikely(address >= TASK_SIZE)) { if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0) return; - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, SIGSEGV) == NOTIFY_STOP) return; /* @@ -368,7 +331,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, goto bad_area_nosemaphore; } - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, SIGSEGV) == NOTIFY_STOP) return; @@ -389,7 +352,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, /* When running in the kernel we expect faults to occur only to * addresses in user space. All other faults represent errors in the * kernel and should generate an OOPS. Unfortunatly, in the case of an - * erroneous fault occurring in a code path which already holds mmap_sem + * erroneous fault occuring in a code path which already holds mmap_sem * we will deadlock attempting to validate the fault against the * address space. Luckily the kernel only validly references user * space from well defined areas of code, which are listed in the @@ -417,12 +380,12 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, goto bad_area; if (error_code & 4) { /* - * Accessing the stack below %esp is always a bug. - * The large cushion allows instructions like enter - * and pusha to work. ("enter $65535,$31" pushes - * 32 pointers and then decrements %esp by 65535.) + * accessing the stack below %esp is always a bug. + * The "+ 32" is there due to some instructions (like + * pusha) doing post-decrement on the stack and that + * doesn't show up until later.. */ - if (address + 65536 + 32 * sizeof(unsigned long) < regs->esp) + if (address + 32 < regs->esp) goto bad_area; } if (expand_stack(vma, address)) diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 1719a8141..a7d891585 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c @@ -4,6 +4,7 @@ * Copyright (C) 2002, Rohit Seth */ +#include #include #include #include diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index f136da564..fa6830992 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -6,6 +6,7 @@ * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 */ +#include #include #include #include @@ -22,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include @@ -406,7 +405,7 @@ static void __init pagetable_init (void) #endif } -#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) +#ifdef CONFIG_SOFTWARE_SUSPEND /* * Swap suspend & friends need this for resume because things like the intel-agp * driver might have split up a kernel 4MB mapping. @@ -679,7 +678,7 @@ void __init mem_init(void) */ #ifdef CONFIG_MEMORY_HOTPLUG #ifndef CONFIG_NEED_MULTIPLE_NODES -int arch_add_memory(int nid, u64 start, u64 size) +int add_memory(u64 start, u64 size) { struct pglist_data *pgdata = &contig_page_data; struct zone *zone = pgdata->node_zones + MAX_NR_ZONES-1; @@ -750,15 +749,16 @@ static int noinline do_test_wp_bit(void) #ifdef CONFIG_DEBUG_RODATA +extern char __start_rodata, __end_rodata; void mark_rodata_ro(void) { - unsigned long addr = (unsigned long)__start_rodata; + unsigned long addr = (unsigned long)&__start_rodata; - for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) + for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO); - printk("Write protecting the kernel read-only data: %uk\n", - (__end_rodata - __start_rodata) >> 10); + printk ("Write protecting the kernel read-only data: %luk\n", + (unsigned long)(&__end_rodata - &__start_rodata) >> 10); /* * change_page_attr() requires a global_flush_tlb() call after it. @@ -777,7 +777,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) for (addr = begin; addr < end; addr += PAGE_SIZE) { ClearPageReserved(virt_to_page(addr)); init_page_count(virt_to_page(addr)); - memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); + memset((void *)addr, 0xcc, PAGE_SIZE); free_page(addr); totalram_pages++; } diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index ad0f86a6a..a00267a5b 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c @@ -3,13 +3,12 @@ * Thanks to Ben LaHaise for precious feedback. */ +#include #include #include #include #include #include -#include -#include #include #include #include @@ -132,12 +131,6 @@ __change_page_attr(struct page *page, pgprot_t prot) BUG_ON(PageHighMem(page)); address = (unsigned long)page_address(page); - if (address >= (unsigned long)__start_rodata && address <= (unsigned long)__end_rodata && - (pgprot_val(prot) & _PAGE_RW)) { - pgprot_val(prot) &= ~(_PAGE_RW); - add_taint(TAINT_MACHINE_CHECK); - } - kpte = lookup_address(address); if (!kpte) return -EINVAL; @@ -216,19 +209,19 @@ int change_page_attr(struct page *page, int numpages, pgprot_t prot) } void global_flush_tlb(void) -{ - struct list_head l; +{ + LIST_HEAD(l); struct page *pg, *next; BUG_ON(irqs_disabled()); spin_lock_irq(&cpa_lock); - list_replace_init(&df_list, &l); + list_splice_init(&df_list, &l); spin_unlock_irq(&cpa_lock); flush_map(); list_for_each_entry_safe(pg, next, &l, lru) __free_page(pg); -} +} #ifdef CONFIG_DEBUG_PAGEALLOC void kernel_map_pages(struct page *page, int numpages, int enable) @@ -236,8 +229,8 @@ void kernel_map_pages(struct page *page, int numpages, int enable) if (PageHighMem(page)) return; if (!enable) - debug_check_no_locks_freed(page_address(page), - numpages * PAGE_SIZE); + mutex_debug_check_no_locks_freed(page_address(page), + numpages * PAGE_SIZE); /* the return value is ignored - the calls cannot fail, * large pages are disabled at boot time. diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index bd98768d8..de8d18774 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -2,6 +2,7 @@ * linux/arch/i386/mm/pgtable.c */ +#include #include #include #include @@ -12,6 +13,7 @@ #include #include #include +#include #include #include @@ -29,6 +31,7 @@ void show_mem(void) struct page *page; pg_data_t *pgdat; unsigned long i; + struct page_state ps; unsigned long flags; printk(KERN_INFO "Mem-info:\n"); @@ -56,13 +59,12 @@ void show_mem(void) printk(KERN_INFO "%d pages shared\n", shared); printk(KERN_INFO "%d pages swap cached\n", cached); - printk(KERN_INFO "%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); - printk(KERN_INFO "%lu pages writeback\n", - global_page_state(NR_WRITEBACK)); - printk(KERN_INFO "%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); - printk(KERN_INFO "%lu pages slab\n", global_page_state(NR_SLAB)); - printk(KERN_INFO "%lu pages pagetables\n", - global_page_state(NR_PAGETABLE)); + get_page_state(&ps); + printk(KERN_INFO "%lu pages dirty\n", ps.nr_dirty); + printk(KERN_INFO "%lu pages writeback\n", ps.nr_writeback); + printk(KERN_INFO "%lu pages mapped\n", ps.nr_mapped); + printk(KERN_INFO "%lu pages slab\n", ps.nr_slab); + printk(KERN_INFO "%lu pages pagetables\n", ps.nr_page_table_pages); } /* @@ -137,6 +139,10 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) __flush_tlb_one(vaddr); } +static int nr_fixmaps = 0; +unsigned long __FIXADDR_TOP = 0xfffff000; +EXPORT_SYMBOL(__FIXADDR_TOP); + void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) { unsigned long address = __fix_to_virt(idx); @@ -146,6 +152,13 @@ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags) return; } set_pte_pfn(address, phys >> PAGE_SHIFT, flags); + nr_fixmaps++; +} + +void set_fixaddr_top(unsigned long top) +{ + BUG_ON(nr_fixmaps > 0); + __FIXADDR_TOP = top - PAGE_SIZE; } pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 5f8dc8a21..ec0fd3cfa 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -282,9 +281,9 @@ static int nmi_create_files(struct super_block * sb, struct dentry * root) for (i = 0; i < model->num_counters; ++i) { struct dentry * dir; - char buf[4]; + char buf[2]; - snprintf(buf, sizeof(buf), "%d", i); + snprintf(buf, 2, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled); oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event); @@ -297,14 +296,12 @@ static int nmi_create_files(struct super_block * sb, struct dentry * root) return 0; } -static int p4force; -module_param(p4force, int, 0); static int __init p4_init(char ** cpu_type) { __u8 cpu_model = boot_cpu_data.x86_model; - if (!p4force && (cpu_model > 6 || cpu_model == 5)) + if (cpu_model > 4) return 0; #ifndef CONFIG_SMP @@ -337,8 +334,6 @@ static int __init ppro_init(char ** cpu_type) if (cpu_model == 14) *cpu_type = "i386/core"; - else if (cpu_model == 15) - *cpu_type = "i386/core_2"; else if (cpu_model > 0xd) return 0; else if (cpu_model == 9) { diff --git a/arch/i386/oprofile/op_model_athlon.c b/arch/i386/oprofile/op_model_athlon.c index 693bdea4a..3ad9a72a5 100644 --- a/arch/i386/oprofile/op_model_athlon.c +++ b/arch/i386/oprofile/op_model_athlon.c @@ -13,7 +13,6 @@ #include #include #include -#include #include "op_x86_model.h" #include "op_counter.h" diff --git a/arch/i386/oprofile/op_model_p4.c b/arch/i386/oprofile/op_model_p4.c index 7c61d357b..ac8a06603 100644 --- a/arch/i386/oprofile/op_model_p4.c +++ b/arch/i386/oprofile/op_model_p4.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "op_x86_model.h" #include "op_counter.h" diff --git a/arch/i386/oprofile/op_model_ppro.c b/arch/i386/oprofile/op_model_ppro.c index 5c3ab4b02..d719015fc 100644 --- a/arch/i386/oprofile/op_model_ppro.c +++ b/arch/i386/oprofile/op_model_ppro.c @@ -14,7 +14,6 @@ #include #include #include -#include #include "op_x86_model.h" #include "op_counter.h" diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index 0a362e3ae..dbece776c 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c @@ -17,6 +17,10 @@ #include "pci.h" +#ifdef CONFIG_PCI_BIOS +extern void pcibios_sort(void); +#endif + unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | PCI_PROBE_MMCONF; @@ -284,7 +288,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) void pcibios_disable_device (struct pci_dev *dev) { - pcibios_disable_resources(dev); if (pcibios_disable_irq) pcibios_disable_irq(dev); } diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index 8277aba4d..ed2c8c899 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c @@ -48,10 +48,10 @@ */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; @@ -110,7 +110,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) continue; pr = pci_find_parent_resource(dev, r); if (!r->start || !pr || request_resource(pr, r) < 0) { - printk(KERN_DEBUG "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); + printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); /* Something is wrong with the region. Invalidate the resource to prevent child resource allocations in this range. */ @@ -242,15 +242,6 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) return 0; } -void pcibios_disable_resources(struct pci_dev *dev) -{ - u16 cmd; - - pci_read_config_word(dev, PCI_COMMAND, &cmd); - cmd &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY); - pci_write_config_word(dev, PCI_COMMAND, cmd); -} - /* * If we set up a device for bus mastering, we need to check the latency * timer as certain crappy BIOSes forget to set it properly. @@ -285,6 +276,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, /* Leave vm_pgoff as-is, the PCI space address is the physical * address on this platform. */ + vma->vm_flags |= (VM_SHM | VM_LOCKED | VM_IO); + prot = pgprot_val(vma->vm_page_prot); if (boot_cpu_data.x86 > 3) prot |= _PAGE_PCD | _PAGE_PWT; diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c index 51087a9d9..f9156d3ac 100644 --- a/arch/i386/pci/init.c +++ b/arch/i386/pci/init.c @@ -1,3 +1,4 @@ +#include #include #include #include "pci.h" @@ -14,12 +15,8 @@ static __init int pci_access_init(void) #ifdef CONFIG_PCI_BIOS pci_pcbios_init(); #endif - /* - * don't check for raw_pci_ops here because we want pcbios as last - * fallback, yet it's needed to run first to set pcibios_last_bus - * in case legacy PCI probing is used. otherwise detecting peer busses - * fails. - */ + if (raw_pci_ops) + return 0; #ifdef CONFIG_PCI_DIRECT pci_direct_init(); #endif diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index 65a2ce8c7..06dab00aa 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c @@ -4,6 +4,7 @@ * (c) 1999--2000 Martin Mares */ +#include #include #include #include @@ -197,14 +198,14 @@ static void write_config_nybble(struct pci_dev *router, unsigned offset, unsigne */ static int pirq_ali_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { - static const unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 }; + static unsigned char irqmap[16] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 }; return irqmap[read_config_nybble(router, 0x48, pirq-1)]; } static int pirq_ali_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) { - static const unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 }; + static unsigned char irqmap[16] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 }; unsigned int val = irqmap[irq]; if (val) { @@ -255,13 +256,13 @@ static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i */ static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { - static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; + static unsigned int pirqmap[4] = { 3, 2, 5, 1 }; return read_config_nybble(router, 0x55, pirqmap[pirq-1]); } static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) { - static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; + static unsigned int pirqmap[4] = { 3, 2, 5, 1 }; write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); return 1; } @@ -273,13 +274,13 @@ static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq */ static int pirq_ite_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { - static const unsigned char pirqmap[4] = { 1, 0, 2, 3 }; + static unsigned char pirqmap[4] = { 1, 0, 2, 3 }; return read_config_nybble(router,0x43, pirqmap[pirq-1]); } static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) { - static const unsigned char pirqmap[4] = { 1, 0, 2, 3 }; + static unsigned char pirqmap[4] = { 1, 0, 2, 3 }; write_config_nybble(router, 0x43, pirqmap[pirq-1], irq); return 1; } @@ -504,7 +505,7 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) { - static struct pci_device_id __initdata pirq_440gx[] = { + static struct pci_device_id pirq_440gx[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) }, { }, @@ -864,7 +865,7 @@ 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] && can_request_irq(i, IRQF_SHARED)) + if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, SA_SHIRQ)) newirq = i; } } @@ -879,7 +880,6 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) ((!(pci_probe & PCI_USE_PIRQ_MASK)) || ((1 << irq) & mask)) ) { DBG(" -> got IRQ %d\n", irq); msg = "Found"; - eisa_set_level_irq(irq); } else if (newirq && r->set && (dev->class >> 8) != PCI_CLASS_DISPLAY_VGA) { DBG(" -> assigning IRQ %d", newirq); if (r->set(pirq_router_dev, dev, pirq, newirq)) { diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 972180f73..e545b0992 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c @@ -178,7 +178,7 @@ static __init void unreachable_devices(void) pci_exp_set_dev_base(addr, k, PCI_DEVFN(i, 0)); if (addr == 0 || readl((u32 __iomem *)mmcfg_virt_addr) != val1) { - set_bit(i + 32*k, fallback_slots); + set_bit(i, fallback_slots); printk(KERN_NOTICE "PCI: No mmconfig possible on %x:%x\n", k, i); } diff --git a/arch/i386/pci/pcbios.c b/arch/i386/pci/pcbios.c index ed1512a17..1eec0868f 100644 --- a/arch/i386/pci/pcbios.c +++ b/arch/i386/pci/pcbios.c @@ -371,7 +371,8 @@ void __devinit pcibios_sort(void) list_for_each(ln, &pci_devices) { d = pci_dev_g(ln); if (d->bus->number == bus && d->devfn == devfn) { - list_move_tail(&d->global_list, &sorted_devices); + list_del(&d->global_list); + list_add_tail(&d->global_list, &sorted_devices); if (d == dev) found = 1; break; @@ -389,7 +390,8 @@ void __devinit pcibios_sort(void) if (!found) { printk(KERN_WARNING "PCI: Device %s not found by BIOS\n", pci_name(dev)); - list_move_tail(&dev->global_list, &sorted_devices); + list_del(&dev->global_list); + list_add_tail(&dev->global_list, &sorted_devices); } } list_splice(&sorted_devices, &pci_devices); diff --git a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h index bf4e79335..12035e291 100644 --- a/arch/i386/pci/pci.h +++ b/arch/i386/pci/pci.h @@ -35,7 +35,6 @@ extern unsigned int pcibios_max_latency; void pcibios_resource_survey(void); int pcibios_enable_resources(struct pci_dev *, int); -void pcibios_disable_resources(struct pci_dev *); /* pci-pc.c */ @@ -84,4 +83,4 @@ extern int pci_conf1_read(unsigned int seg, unsigned int bus, extern void pci_direct_init(void); extern void pci_pcbios_init(void); extern void pci_mmcfg_init(void); -extern void pcibios_sort(void); + diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c index f1b486d41..6c17433fd 100644 --- a/arch/i386/pci/visws.c +++ b/arch/i386/pci/visws.c @@ -4,6 +4,7 @@ * (c) 1999--2000 Martin Mares */ +#include #include #include #include diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index 5a1abeff0..79b2370c7 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c @@ -7,10 +7,9 @@ * Copyright (c) 2001 Patrick Mochel */ +#include #include #include -#include -#include static struct saved_context saved_context; diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index b946bac7b..1e3ad1ecc 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -58,20 +58,6 @@ config GENERIC_IOMAP bool default y -config XEN - bool "Xen hypervisor support" - default y - help - Enable Xen hypervisor support. Resulting kernel runs - both as a guest OS on Xen and natively on hardware. - -config XEN_IA64_VDSO_PARAVIRT - bool - depends on XEN && !ITANIUM - default y - help - vDSO paravirtualization - config SCHED_NO_NO_OMIT_FRAME_POINTER bool default y @@ -84,15 +70,6 @@ config DMA_IS_DMA32 bool default y -config DMA_IS_NORMAL - bool - depends on IA64_SGI_SN2 - default y - -config AUDIT_ARCH - bool - default y - choice prompt "System type" default IA64_GENERIC @@ -100,7 +77,6 @@ choice config IA64_GENERIC bool "generic" select ACPI - select PCI select NUMA select ACPI_NUMA help @@ -276,7 +252,7 @@ config NR_CPUS int "Maximum number of CPUs (2-1024)" range 2 1024 depends on SMP - default "1024" + default "64" help You should set this to the number of CPUs in your system, but keep in mind that a kernel compiled for, e.g., 2 CPUs will boot but @@ -300,6 +276,7 @@ config ARCH_ENABLE_MEMORY_HOTPLUG config SCHED_SMT bool "SMT scheduler support" depends on SMP + default off help Improves the CPU scheduler's decision making when dealing with Intel IA64 chips with MultiThreading at a cost of slightly increased @@ -372,7 +349,7 @@ config NUMA config NODES_SHIFT int "Max num nodes shift(3-10)" range 3 10 - default "10" + default "8" depends on NEED_MULTIPLE_NODES help This option specifies the maximum number of nodes in your SSI system. @@ -400,10 +377,6 @@ config HAVE_ARCH_EARLY_PFN_TO_NID def_bool y depends on NEED_MULTIPLE_NODES -config HAVE_ARCH_NODEDATA_EXTENSION - def_bool y - depends on NUMA - config IA32_SUPPORT bool "Support for Linux/x86 binaries" help @@ -479,23 +452,6 @@ config PCI_DOMAINS bool default PCI -config XEN_PCIDEV_FRONTEND - bool "Xen PCI Frontend" - depends on PCI && XEN - default y - help - The PCI device frontend driver allows the kernel to import arbitrary - PCI devices from a PCI backend to support PCI driver domains. - -config XEN_PCIDEV_FE_DEBUG - bool "Xen PCI Frontend Debugging" - depends on XEN_PCIDEV_FRONTEND - default n - help - Enables some debug statements within the PCI Frontend. - -source "drivers/pci/pcie/Kconfig" - source "drivers/pci/Kconfig" source "drivers/pci/hotplug/Kconfig" @@ -530,10 +486,6 @@ config GENERIC_PENDING_IRQ depends on GENERIC_HARDIRQS && SMP default y -config IRQ_PER_CPU - bool - default y - source "arch/ia64/hp/sim/Kconfig" menu "Instrumentation Support" @@ -559,34 +511,3 @@ source "kernel/vserver/Kconfig" source "security/Kconfig" source "crypto/Kconfig" - -# -# override default values of drivers/xen/Kconfig -# -if XEN -config XEN_UTIL - default n - -config HAVE_ARCH_ALLOC_SKB - default y - -config HAVE_ARCH_DEV_ALLOC_SKB - default y - -config XEN_BALLOON - default y - -config XEN_SKBUFF - default y - -config XEN_DEVMEM - default n - -config XEN_REBOOT - default y - -config XEN_SMPBOOT - default n -endif - -source "drivers/xen/Kconfig" diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index c68f03077..80ea7506f 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile @@ -45,12 +45,6 @@ ifeq ($(call cc-version),0304) endif CFLAGS += $(cflags-y) - -cppflags-$(CONFIG_XEN) += \ - -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) - -CPPFLAGS += $(cppflags-y) - head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o libs-y += arch/ia64/lib/ @@ -61,15 +55,9 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/ core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/ -core-$(CONFIG_XEN) += arch/ia64/xen/ drivers-$(CONFIG_PCI) += arch/ia64/pci/ -ifneq ($(CONFIG_XEN),y) drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ -endif -ifneq ($(CONFIG_IA64_GENERIC),y) -drivers-$(CONFIG_XEN) += arch/ia64/hp/sim/ -endif drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/ @@ -83,8 +71,6 @@ all: compressed unwcheck compressed: vmlinux.gz -vmlinuz: vmlinux.gz - vmlinux.gz: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ @@ -99,8 +85,8 @@ CLEAN_FILES += vmlinux.gz bootloader boot: lib/lib.a vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ -install: - -yes | sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" +install: vmlinux.gz + sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" define archhelp echo '* compressed - Build compressed kernel image' diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig index 0f14a82b8..9ea35398e 100644 --- a/arch/ia64/configs/sn2_defconfig +++ b/arch/ia64/configs/sn2_defconfig @@ -363,7 +363,7 @@ CONFIG_BLK_DEV_IDECD=y # CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=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 diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index 9d1cffb57..766bf4955 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig @@ -114,7 +114,7 @@ CONFIG_IA64_CYCLONE=y CONFIG_IOSAPIC=y CONFIG_FORCE_MAX_ZONEORDER=17 CONFIG_SMP=y -CONFIG_NR_CPUS=16 +CONFIG_NR_CPUS=4 CONFIG_HOTPLUG_CPU=y CONFIG_PERMIT_BSP_REMOVE=y CONFIG_FORCE_CPEI_RETARGET=y diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig index 9001b3fba..6cba55da5 100644 --- a/arch/ia64/defconfig +++ b/arch/ia64/defconfig @@ -366,7 +366,7 @@ CONFIG_BLK_DEV_IDESCSI=m # CONFIG_IDE_GENERIC is not set # CONFIG_BLK_DEV_IDEPNP is not set CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_IDEPCI_SHARE_IRQ is not set # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set diff --git a/arch/ia64/dig/setup.c b/arch/ia64/dig/setup.c index 93048b2c1..38aa9c108 100644 --- a/arch/ia64/dig/setup.c +++ b/arch/ia64/dig/setup.c @@ -8,13 +8,14 @@ * Copyright (C) 1999 Walt Drummond * Copyright (C) 1999 Vijay Chander */ +#include #include #include #include #include #include -#include +#include #include #include #include @@ -24,8 +25,6 @@ #include #include -#include - void __init dig_setup (char **cmdline_p) { @@ -69,19 +68,4 @@ dig_setup (char **cmdline_p) screen_info.orig_video_mode = 3; /* XXX fake */ screen_info.orig_video_isVGA = 1; /* XXX fake */ screen_info.orig_video_ega_bx = 3; /* XXX fake */ -#ifdef CONFIG_XEN - if (!is_running_on_xen() || !is_initial_xendomain()) - return; - - if (xen_start_info->console.dom0.info_size >= - sizeof(struct dom0_vga_console_info)) { - const struct dom0_vga_console_info *info = - (struct dom0_vga_console_info *)( - (char *)xen_start_info + - xen_start_info->console.dom0.info_off); - dom0_init_screen_info(info); - } - xen_start_info->console.domU.mfn = 0; - xen_start_info->console.domU.evtchn = 0; -#endif } diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index db8e1fcfa..bdccd0b1e 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -19,6 +19,7 @@ ** */ +#include #include #include #include @@ -1957,7 +1958,7 @@ sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) if (pxm < 0) return; - node = pxm_to_node(pxm); + node = pxm_to_nid_map[pxm]; if (node >= MAX_NUMNODES || !node_online(node)) return; @@ -1998,7 +1999,7 @@ acpi_sba_ioc_add(struct acpi_device *device) if (!iovp_shift) iovp_shift = min(PAGE_SHIFT, 16); } - kfree(dev_info); + ACPI_MEM_FREE(dev_info); /* * default anything not caught above or specified on cmdline to 4k diff --git a/arch/ia64/hp/sim/Makefile b/arch/ia64/hp/sim/Makefile index b0916cdf9..d10da4793 100644 --- a/arch/ia64/hp/sim/Makefile +++ b/arch/ia64/hp/sim/Makefile @@ -14,5 +14,3 @@ obj-$(CONFIG_HP_SIMETH) += simeth.o obj-$(CONFIG_HP_SIMSERIAL) += simserial.o obj-$(CONFIG_HP_SIMSERIAL_CONSOLE) += hpsim_console.o obj-$(CONFIG_HP_SIMSCSI) += simscsi.o -obj-$(CONFIG_XEN) += simserial.o -obj-$(CONFIG_XEN) += hpsim_console.o diff --git a/arch/ia64/hp/sim/boot/bootloader.c b/arch/ia64/hp/sim/boot/bootloader.c index c5e9baafa..51a7b7b4d 100644 --- a/arch/ia64/hp/sim/boot/bootloader.c +++ b/arch/ia64/hp/sim/boot/bootloader.c @@ -11,6 +11,7 @@ */ struct task_struct; /* forward declaration for elf.h */ +#include #include #include #include diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c index 5a0a7afcf..30fdfb1d0 100644 --- a/arch/ia64/hp/sim/boot/fw-emu.c +++ b/arch/ia64/hp/sim/boot/fw-emu.c @@ -4,6 +4,7 @@ * Copyright (C) 1998-2001 Hewlett-Packard Co * David Mosberger-Tang */ +#include #ifdef CONFIG_PCI # include diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c index 6e149c8ab..5deff21e5 100644 --- a/arch/ia64/hp/sim/hpsim_console.c +++ b/arch/ia64/hp/sim/hpsim_console.c @@ -5,6 +5,7 @@ * David Mosberger-Tang * Copyright (C) 1999 Vijay Chander */ +#include #include #include diff --git a/arch/ia64/hp/sim/hpsim_irq.c b/arch/ia64/hp/sim/hpsim_irq.c index 8145547bb..c0d25a2a3 100644 --- a/arch/ia64/hp/sim/hpsim_irq.c +++ b/arch/ia64/hp/sim/hpsim_irq.c @@ -44,8 +44,8 @@ hpsim_irq_init (void) int i; for (i = 0; i < NR_IRQS; ++i) { - idesc = irq_desc + i; - if (idesc->chip == &no_irq_type) - idesc->chip = &irq_type_hp_sim; + idesc = irq_descp(i); + if (idesc->handler == &no_irq_type) + idesc->handler = &irq_type_hp_sim; } } diff --git a/arch/ia64/hp/sim/hpsim_setup.c b/arch/ia64/hp/sim/hpsim_setup.c index f2297192a..694fc86bf 100644 --- a/arch/ia64/hp/sim/hpsim_setup.c +++ b/arch/ia64/hp/sim/hpsim_setup.c @@ -5,6 +5,7 @@ * David Mosberger-Tang * Copyright (C) 1999 Vijay Chander */ +#include #include #include #include diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c index b5195be62..0639ec0ed 100644 --- a/arch/ia64/hp/sim/simeth.c +++ b/arch/ia64/hp/sim/simeth.c @@ -4,6 +4,7 @@ * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co * Stephane Eranian */ +#include #include #include #include diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c index 8f0a16a79..a3fe97531 100644 --- a/arch/ia64/hp/sim/simscsi.c +++ b/arch/ia64/hp/sim/simscsi.c @@ -151,7 +151,7 @@ static void simscsi_sg_readwrite (struct scsi_cmnd *sc, int mode, unsigned long offset) { int list_len = sc->use_sg; - struct scatterlist *sl = (struct scatterlist *)sc->request_buffer; + struct scatterlist *sl = (struct scatterlist *)sc->buffer; struct disk_stat stat; struct disk_req req; @@ -244,8 +244,7 @@ static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len) if (scatterlen == 0) memcpy(sc->request_buffer, buf, len); - else for (slp = (struct scatterlist *)sc->request_buffer; - scatterlen-- > 0 && len > 0; slp++) { + else for (slp = (struct scatterlist *)sc->buffer; scatterlen-- > 0 && len > 0; slp++) { unsigned thislen = min(len, slp->length); memcpy(page_address(slp->page) + slp->offset, buf, thislen); diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 0daacc20e..0e5c6ae50 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c @@ -16,6 +16,7 @@ * 07/30/02 D. Mosberger Replace sti()/cli() with explicit spinlocks & local irq masking */ +#include #include #include #include @@ -46,7 +47,7 @@ #define NR_PORTS 1 /* only one port for now */ -#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) +#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) #define SSC_GETCHAR 21 diff --git a/arch/ia64/ia32/Makefile b/arch/ia64/ia32/Makefile index baad8c769..61cb60aff 100644 --- a/arch/ia64/ia32/Makefile +++ b/arch/ia64/ia32/Makefile @@ -4,7 +4,6 @@ obj-y := ia32_entry.o sys_ia32.o ia32_signal.o \ ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o -obj-$(CONFIG_AUDIT) += audit.o # Don't let GCC uses f16-f31 so that save_ia32_fpstate_live() and # restore_ia32_fpstate_live() can be sure the live register contain user-level state. diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c deleted file mode 100644 index 92d7d0c8d..000000000 --- a/arch/ia64/ia32/audit.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -unsigned ia32_dir_class[] = { -#include -~0U -}; - -unsigned ia32_chattr_class[] = { -#include -~0U -}; - -unsigned ia32_write_class[] = { -#include -~0U -}; - -unsigned ia32_read_class[] = { -#include -~0U -}; - -int ia32_classify_syscall(unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 1; - } -} diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index d6535e734..a3e5d0242 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c @@ -9,6 +9,7 @@ * 04/13/01 D. Mosberger dropped saving tssd in ar.k1---it's not needed * 09/14/01 D. Mosberger fixed memory management for gdt/tss page */ +#include #include #include diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h index 703a67c93..ccb98ed48 100644 --- a/arch/ia64/ia32/ia32priv.h +++ b/arch/ia64/ia32/ia32priv.h @@ -1,6 +1,7 @@ #ifndef _ASM_IA64_IA32_PRIV_H #define _ASM_IA64_IA32_PRIV_H +#include #include diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index bb86b8a92..5366b3b23 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c @@ -14,6 +14,7 @@ * environment. */ +#include #include #include #include @@ -125,7 +126,6 @@ sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __use int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf) { - compat_ino_t ino; int err; if ((u64) stat->size > MAX_NON_LFS || @@ -133,15 +133,11 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf) !old_valid_dev(stat->rdev)) return -EOVERFLOW; - ino = stat->ino; - if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) - return -EOVERFLOW; - if (clear_user(ubuf, sizeof(*ubuf))) return -EFAULT; err = __put_user(old_encode_dev(stat->dev), &ubuf->st_dev); - err |= __put_user(ino, &ubuf->st_ino); + err |= __put_user(stat->ino, &ubuf->st_ino); err |= __put_user(stat->mode, &ubuf->st_mode); err |= __put_user(stat->nlink, &ubuf->st_nlink); err |= __put_user(high2lowuid(stat->uid), &ubuf->st_uid); @@ -1227,20 +1223,16 @@ struct readdir32_callback { }; static int -filldir32 (void *__buf, const char *name, int namlen, loff_t offset, u64 ino, +filldir32 (void *__buf, const char *name, int namlen, loff_t offset, ino_t ino, unsigned int d_type) { struct compat_dirent __user * dirent; struct getdents32_callback * buf = (struct getdents32_callback *) __buf; int reclen = ROUND_UP(offsetof(struct compat_dirent, d_name) + namlen + 1, 4); - u32 d_ino; buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; buf->error = -EFAULT; /* only used if we fail.. */ dirent = buf->previous; if (dirent) @@ -1248,7 +1240,7 @@ filldir32 (void *__buf, const char *name, int namlen, loff_t offset, u64 ino, return -EFAULT; dirent = buf->current_dir; buf->previous = dirent; - if (put_user(d_ino, &dirent->d_ino) + if (put_user(ino, &dirent->d_ino) || put_user(reclen, &dirent->d_reclen) || copy_to_user(dirent->d_name, name, namlen) || put_user(0, dirent->d_name + namlen)) @@ -1296,21 +1288,17 @@ out: } static int -fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, u64 ino, +fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, ino_t ino, unsigned int d_type) { struct readdir32_callback * buf = (struct readdir32_callback *) __buf; struct old_linux32_dirent __user * dirent; - u32 d_ino; if (buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; buf->count++; dirent = buf->dirent; - if (put_user(d_ino, &dirent->d_ino) + if (put_user(ino, &dirent->d_ino) || put_user(offset, &dirent->d_offset) || put_user(namlen, &dirent->d_namlen) || copy_to_user(dirent->d_name, name, namlen) diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index ad8215a3c..09a0dbc17 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile @@ -29,7 +29,6 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o -obj-$(CONFIG_AUDIT) += audit.o mca_recovery-y += mca_drv.o mca_drv_asm.o # The gate DSO image is built using a special linker script. @@ -45,8 +44,7 @@ CPPFLAGS_gate.lds := -P -C -U$(ARCH) quiet_cmd_gate = GATE $@ cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ -GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ - $(call ld-option, -Wl$(comma)--hash-style=sysv) +GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE $(call if_changed,gate) diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index b7515bc80..fff82929d 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -50,7 +51,7 @@ static acpi_status hp_ccsr_locate(acpi_handle obj, u64 *base, u64 *length) memcpy(length, vendor->byte_data + 8, sizeof(*length)); exit: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return status; } diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 32c3abede..58c93a303 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -32,6 +32,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include #include #include #include @@ -55,7 +56,7 @@ #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ - ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) + ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) #define PREFIX "ACPI: " @@ -67,6 +68,8 @@ EXPORT_SYMBOL(pm_power_off); unsigned char acpi_kbd_controller_present = 1; unsigned char acpi_legacy_devices; +static unsigned int __initdata acpi_madt_rev; + unsigned int acpi_cpei_override; unsigned int acpi_cpei_phys_cpuid; @@ -240,8 +243,6 @@ acpi_parse_iosapic(acpi_table_entry_header * header, const unsigned long end) return iosapic_init(iosapic->address, iosapic->global_irq_base); } -static unsigned int __initdata acpi_madt_rev; - static int __init acpi_parse_plat_int_src(acpi_table_entry_header * header, const unsigned long end) @@ -414,6 +415,9 @@ static int __initdata srat_num_cpus; /* number of cpus */ static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) +/* maps to convert between proximity domain and logical node ID */ +int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; +int __initdata nid_to_pxm_map[MAX_NUMNODES]; static struct acpi_table_slit __initdata *slit_table; static int get_processor_proximity_domain(struct acpi_table_processor_affinity *pa) @@ -529,17 +533,22 @@ void __init acpi_numa_arch_fixup(void) * MCD - This can probably be dropped now. No need for pxm ID to node ID * mapping with sparse node numbering iff MAX_PXM_DOMAINS <= MAX_NUMNODES. */ + /* calculate total number of nodes in system from PXM bitmap */ + memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map)); + memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map)); nodes_clear(node_online_map); for (i = 0; i < MAX_PXM_DOMAINS; i++) { if (pxm_bit_test(i)) { - int nid = acpi_map_pxm_to_node(i); + int nid = num_online_nodes(); + pxm_to_nid_map[i] = nid; + nid_to_pxm_map[nid] = i; node_set_online(nid); } } /* set logical node id in memory chunk structure */ for (i = 0; i < num_node_memblks; i++) - node_memblk[i].nid = pxm_to_node(node_memblk[i].nid); + node_memblk[i].nid = pxm_to_nid_map[node_memblk[i].nid]; /* assign memory bank numbers for each chunk on each node */ for_each_online_node(i) { @@ -553,7 +562,7 @@ void __init acpi_numa_arch_fixup(void) /* set logical node id in cpu structure */ for (i = 0; i < srat_num_cpus; i++) - node_cpuid[i].nid = pxm_to_node(node_cpuid[i].nid); + node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid]; printk(KERN_INFO "Number of logical nodes in system = %d\n", num_online_nodes()); @@ -566,11 +575,11 @@ void __init acpi_numa_arch_fixup(void) for (i = 0; i < slit_table->localities; i++) { if (!pxm_bit_test(i)) continue; - node_from = pxm_to_node(i); + node_from = pxm_to_nid_map[i]; for (j = 0; j < slit_table->localities; j++) { if (!pxm_bit_test(j)) continue; - node_to = pxm_to_node(j); + node_to = pxm_to_nid_map[j]; node_distance(node_from, node_to) = slit_table->entry[i * slit_table->localities + j]; } @@ -617,7 +626,7 @@ EXPORT_SYMBOL(acpi_unregister_gsi); static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size) { struct acpi_table_header *fadt_header; - struct fadt_descriptor *fadt; + struct fadt_descriptor_rev2 *fadt; if (!phys_addr || !size) return -EINVAL; @@ -626,7 +635,7 @@ static int __init acpi_parse_fadt(unsigned long phys_addr, unsigned long size) if (fadt_header->revision != 3) return -ENODEV; /* Only deal with ACPI 2.0 FADT */ - fadt = (struct fadt_descriptor *)fadt_header; + fadt = (struct fadt_descriptor_rev2 *)fadt_header; if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER)) acpi_kbd_controller_present = 0; @@ -771,19 +780,16 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) { #ifdef CONFIG_ACPI_NUMA int pxm_id; - int nid; pxm_id = acpi_get_pxm(handle); + /* - * We don't have cpu-only-node hotadd. But if the system equips - * SRAT table, pxm is already found and node is ready. - * So, just pxm_to_nid(pxm) is OK. - * This code here is for the system which doesn't have full SRAT - * table for possible cpus. + * Assuming that the container driver would have set the proximity + * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag */ - nid = acpi_map_pxm_to_node(pxm_id); + node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_nid_map[pxm_id]; + node_cpuid[cpu].phys_id = physid; - node_cpuid[cpu].nid = nid; #endif return (0); } @@ -859,7 +865,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) obj = buffer.pointer; if (obj->type != ACPI_TYPE_BUFFER || obj->buffer.length < sizeof(*lsapic)) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return -EINVAL; } @@ -867,13 +873,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) if ((lsapic->header.type != ACPI_MADT_LSAPIC) || (!lsapic->flags.enabled)) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return -EINVAL; } physid = ((lsapic->id << 8) | (lsapic->eid)); - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); buffer.length = ACPI_ALLOCATE_BUFFER; buffer.pointer = NULL; @@ -937,20 +943,20 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) obj = buffer.pointer; if (obj->type != ACPI_TYPE_BUFFER || obj->buffer.length < sizeof(*iosapic)) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return AE_OK; } iosapic = (struct acpi_table_iosapic *)obj->buffer.pointer; if (iosapic->header.type != ACPI_MADT_IOSAPIC) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return AE_OK; } gsi_base = iosapic->global_irq_base; - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); /* * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell @@ -960,7 +966,7 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) if (pxm < 0) return AE_OK; - node = pxm_to_node(pxm); + node = pxm_to_nid_map[pxm]; if (node >= MAX_NUMNODES || !node_online(node) || cpus_empty(node_to_cpumask(node))) diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index 9ada8fc28..77225659e 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c @@ -5,6 +5,7 @@ */ #define ASM_OFFSETS_C 1 +#include #include @@ -216,24 +217,16 @@ void foo(void) DEFINE(IA64_MCA_CPU_INIT_STACK_OFFSET, offsetof (struct ia64_mca_cpu, init_stack)); BLANK(); + DEFINE(IA64_SAL_OS_STATE_COMMON_OFFSET, + offsetof (struct ia64_sal_os_state, sal_ra)); DEFINE(IA64_SAL_OS_STATE_OS_GP_OFFSET, offsetof (struct ia64_sal_os_state, os_gp)); - DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET, - offsetof (struct ia64_sal_os_state, proc_state_param)); - DEFINE(IA64_SAL_OS_STATE_SAL_RA_OFFSET, - offsetof (struct ia64_sal_os_state, sal_ra)); - DEFINE(IA64_SAL_OS_STATE_SAL_GP_OFFSET, - offsetof (struct ia64_sal_os_state, sal_gp)); DEFINE(IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET, offsetof (struct ia64_sal_os_state, pal_min_state)); - DEFINE(IA64_SAL_OS_STATE_OS_STATUS_OFFSET, - offsetof (struct ia64_sal_os_state, os_status)); - DEFINE(IA64_SAL_OS_STATE_CONTEXT_OFFSET, - offsetof (struct ia64_sal_os_state, context)); + DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET, + offsetof (struct ia64_sal_os_state, proc_state_param)); DEFINE(IA64_SAL_OS_STATE_SIZE, sizeof (struct ia64_sal_os_state)); - BLANK(); - DEFINE(IA64_PMSA_GR_OFFSET, offsetof (struct pal_min_state_area_s, pmsa_gr)); DEFINE(IA64_PMSA_BANK1_GR_OFFSET, @@ -268,29 +261,4 @@ void foo(void) DEFINE(IA64_TIME_SOURCE_MMIO64, TIME_SOURCE_MMIO64); DEFINE(IA64_TIME_SOURCE_MMIO32, TIME_SOURCE_MMIO32); DEFINE(IA64_TIMESPEC_TV_NSEC_OFFSET, offsetof (struct timespec, tv_nsec)); - -#ifdef CONFIG_XEN - BLANK(); - -#define DEFINE_MAPPED_REG_OFS(sym, field) \ - DEFINE(sym, (XMAPPEDREGS_OFS + offsetof(mapped_regs_t, field))) - - DEFINE_MAPPED_REG_OFS(XSI_PSR_I_ADDR_OFS, interrupt_mask_addr); - DEFINE_MAPPED_REG_OFS(XSI_IPSR_OFS, ipsr); - DEFINE_MAPPED_REG_OFS(XSI_IIP_OFS, iip); - DEFINE_MAPPED_REG_OFS(XSI_IFS_OFS, ifs); - DEFINE_MAPPED_REG_OFS(XSI_PRECOVER_IFS_OFS, precover_ifs); - DEFINE_MAPPED_REG_OFS(XSI_ISR_OFS, isr); - DEFINE_MAPPED_REG_OFS(XSI_IFA_OFS, ifa); - DEFINE_MAPPED_REG_OFS(XSI_IIPA_OFS, iipa); - DEFINE_MAPPED_REG_OFS(XSI_IIM_OFS, iim); - DEFINE_MAPPED_REG_OFS(XSI_IHA_OFS, iha); - DEFINE_MAPPED_REG_OFS(XSI_ITIR_OFS, itir); - DEFINE_MAPPED_REG_OFS(XSI_PSR_IC_OFS, interrupt_collection_enabled); - DEFINE_MAPPED_REG_OFS(XSI_PEND_OFS, pending_interruption); - DEFINE_MAPPED_REG_OFS(XSI_INCOMPL_REGFR_OFS, incomplete_regframe); - DEFINE_MAPPED_REG_OFS(XSI_BANKNUM_OFS, banknum); - DEFINE_MAPPED_REG_OFS(XSI_BANK0_R16_OFS, bank0_regs[0]); - DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]); -#endif /* CONFIG_XEN */ } diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c deleted file mode 100644 index 04682555a..000000000 --- a/arch/ia64/kernel/audit.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ -#ifdef CONFIG_IA32_SUPPORT - extern int ia32_classify_syscall(unsigned); - if (abi == AUDIT_ARCH_I386) - return ia32_classify_syscall(syscall); -#endif - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ -#ifdef CONFIG_IA32_SUPPORT - extern __u32 ia32_dir_class[]; - extern __u32 ia32_write_class[]; - extern __u32 ia32_read_class[]; - extern __u32 ia32_chattr_class[]; - audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); - audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); - audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); -#endif - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index 86faf221a..5a1bf8152 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c @@ -9,6 +9,7 @@ * Venkatesh Pallipadi */ +#include #include #include #include diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index bb8770a17..12cfedce7 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -8,8 +8,6 @@ * Copyright (C) 1999-2003 Hewlett-Packard Co. * David Mosberger-Tang * Stephane Eranian - * (c) Copyright 2006 Hewlett-Packard Development Company, L.P. - * Bjorn Helgaas * * All EFI Runtime Services are not implemented yet as EFI only * supports physical mode addressing on SoftSDV. This is to be fixed @@ -20,6 +18,7 @@ * Goutham Rao: * Skip non-WB memory and ignore empty memory ranges. */ +#include #include #include #include @@ -623,20 +622,28 @@ efi_get_iobase (void) return 0; } -static struct kern_memdesc * -kern_memory_descriptor (unsigned long phys_addr) +static efi_memory_desc_t * +efi_memory_descriptor (unsigned long phys_addr) { - struct kern_memdesc *md; + void *efi_map_start, *efi_map_end, *p; + efi_memory_desc_t *md; + u64 efi_desc_size; + + efi_map_start = __va(ia64_boot_param->efi_memmap); + efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size; + efi_desc_size = ia64_boot_param->efi_memdesc_size; - for (md = kern_memmap; md->start != ~0UL; md++) { - if (phys_addr - md->start < (md->num_pages << EFI_PAGE_SHIFT)) + for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { + md = p; + + if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT)) return md; } - return NULL; + return 0; } -static efi_memory_desc_t * -efi_memory_descriptor (unsigned long phys_addr) +static int +efi_memmap_has_mmio (void) { void *efi_map_start, *efi_map_end, *p; efi_memory_desc_t *md; @@ -649,10 +656,10 @@ efi_memory_descriptor (unsigned long phys_addr) for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { md = p; - if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT)) - return md; + if (md->type == EFI_MEMORY_MAPPED_IO) + return 1; } - return NULL; + return 0; } u32 @@ -676,125 +683,71 @@ efi_mem_attributes (unsigned long phys_addr) } EXPORT_SYMBOL(efi_mem_attributes); -u64 -efi_mem_attribute (unsigned long phys_addr, unsigned long size) +/* + * Determines whether the memory at phys_addr supports the desired + * attribute (WB, UC, etc). If this returns 1, the caller can safely + * access size bytes at phys_addr with the specified attribute. + */ +int +efi_mem_attribute_range (unsigned long phys_addr, unsigned long size, u64 attr) { unsigned long end = phys_addr + size; efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); - u64 attr; - - if (!md) - return 0; - - /* - * EFI_MEMORY_RUNTIME is not a memory attribute; it just tells - * the kernel that firmware needs this region mapped. - */ - attr = md->attribute & ~EFI_MEMORY_RUNTIME; - do { - unsigned long md_end = efi_md_end(md); - - if (end <= md_end) - return attr; - - md = efi_memory_descriptor(md_end); - if (!md || (md->attribute & ~EFI_MEMORY_RUNTIME) != attr) - return 0; - } while (md); - return 0; -} - -u64 -kern_mem_attribute (unsigned long phys_addr, unsigned long size) -{ - unsigned long end = phys_addr + size; - struct kern_memdesc *md; - u64 attr; /* - * This is a hack for ioremap calls before we set up kern_memmap. - * Maybe we should do efi_memmap_init() earlier instead. + * Some firmware doesn't report MMIO regions in the EFI memory + * map. The Intel BigSur (a.k.a. HP i2000) has this problem. + * On those platforms, we have to assume UC is valid everywhere. */ - if (!kern_memmap) { - attr = efi_mem_attribute(phys_addr, size); - if (attr & EFI_MEMORY_WB) - return EFI_MEMORY_WB; + if (!md || (md->attribute & attr) != attr) { + if (attr == EFI_MEMORY_UC && !efi_memmap_has_mmio()) + return 1; return 0; } - md = kern_memory_descriptor(phys_addr); - if (!md) - return 0; - - attr = md->attribute; do { - unsigned long md_end = kmd_end(md); + unsigned long md_end = efi_md_end(md); if (end <= md_end) - return attr; + return 1; - md = kern_memory_descriptor(md_end); - if (!md || md->attribute != attr) + md = efi_memory_descriptor(md_end); + if (!md || (md->attribute & attr) != attr) return 0; } while (md); return 0; } -EXPORT_SYMBOL(kern_mem_attribute); +/* + * For /dev/mem, we only allow read & write system calls to access + * write-back memory, because read & write don't allow the user to + * control access size. + */ int valid_phys_addr_range (unsigned long phys_addr, unsigned long size) { - u64 attr; - - /* - * /dev/mem reads and writes use copy_to_user(), which implicitly - * uses a granule-sized kernel identity mapping. It's really - * only safe to do this for regions in kern_memmap. For more - * details, see Documentation/ia64/aliasing.txt. - */ - attr = kern_mem_attribute(phys_addr, size); - if (attr & EFI_MEMORY_WB || attr & EFI_MEMORY_UC) - return 1; - return 0; + return efi_mem_attribute_range(phys_addr, size, EFI_MEMORY_WB); } +/* + * We allow mmap of anything in the EFI memory map that supports + * either write-back or uncacheable access. For uncacheable regions, + * the supported access sizes are system-dependent, and the user is + * responsible for using the correct size. + * + * Note that this doesn't currently allow access to hot-added memory, + * because that doesn't appear in the boot-time EFI memory map. + */ int -valid_mmap_phys_addr_range (unsigned long pfn, unsigned long size) -{ - /* - * MMIO regions are often missing from the EFI memory map. - * We must allow mmap of them for programs like X, so we - * currently can't do any useful validation. - */ - return 1; -} - -pgprot_t -phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long size, - pgprot_t vma_prot) +valid_mmap_phys_addr_range (unsigned long phys_addr, unsigned long size) { - unsigned long phys_addr = pfn << PAGE_SHIFT; - u64 attr; - - /* - * For /dev/mem mmap, we use user mappings, but if the region is - * in kern_memmap (and hence may be covered by a kernel mapping), - * we must use the same attribute as the kernel mapping. - */ - attr = kern_mem_attribute(phys_addr, size); - if (attr & EFI_MEMORY_WB) - return pgprot_cacheable(vma_prot); - else if (attr & EFI_MEMORY_UC) - return pgprot_noncached(vma_prot); + if (efi_mem_attribute_range(phys_addr, size, EFI_MEMORY_WB)) + return 1; - /* - * Some chipsets don't support UC access to memory. If - * WB is supported, we prefer that. - */ - if (efi_mem_attribute(phys_addr, size) & EFI_MEMORY_WB) - return pgprot_cacheable(vma_prot); + if (efi_mem_attribute_range(phys_addr, size, EFI_MEMORY_UC)) + return 1; - return pgprot_noncached(vma_prot); + return 0; } int __init @@ -923,7 +876,7 @@ find_memmap_space (void) void efi_memmap_init(unsigned long *s, unsigned long *e) { - struct kern_memdesc *k, *prev = NULL; + struct kern_memdesc *k, *prev = 0; u64 contig_low=0, contig_high=0; u64 as, ae, lim; void *efi_map_start, *efi_map_end, *p, *q; diff --git a/arch/ia64/kernel/efi_stub.S b/arch/ia64/kernel/efi_stub.S index a56e161d7..5a7fe7021 100644 --- a/arch/ia64/kernel/efi_stub.S +++ b/arch/ia64/kernel/efi_stub.S @@ -61,7 +61,7 @@ GLOBAL_ENTRY(efi_call_phys) or loc3=loc3,r17 mov b6=r2 ;; - andcm r16=loc3,r16 // get psr with IT, DT, and RT bits cleared + andcm r16=loc3,r16 // get psr with IT, DT, and RT bits cleared br.call.sptk.many rp=ia64_switch_mode_phys .ret0: mov out4=in5 mov out0=in1 diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 25054bc84..62f472be9 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -31,6 +31,7 @@ * pNonSys: !pSys */ +#include #include #include @@ -180,7 +181,7 @@ END(sys_clone) * called. The code starting at .map relies on this. The rest of the code * doesn't care about the interrupt masking status. */ -GLOBAL_ENTRY(__ia64_switch_to) +GLOBAL_ENTRY(ia64_switch_to) .prologue alloc r16=ar.pfs,1,0,0,0 DO_SAVE_SWITCH_STACK @@ -234,7 +235,7 @@ GLOBAL_ENTRY(__ia64_switch_to) ;; srlz.d br.cond.sptk .done -END(__ia64_switch_to) +END(ia64_switch_to) /* * Note that interrupts are enabled during save_switch_stack and load_switch_stack. This @@ -375,7 +376,7 @@ END(save_switch_stack) * - b7 holds address to return to * - must not touch r8-r11 */ -GLOBAL_ENTRY(load_switch_stack) +ENTRY(load_switch_stack) .prologue .altrp b7 @@ -510,7 +511,7 @@ END(clone) * because some system calls (such as ia64_execve) directly * manipulate ar.pfs. */ -GLOBAL_ENTRY(__ia64_trace_syscall) +GLOBAL_ENTRY(ia64_trace_syscall) PT_REGS_UNWIND_INFO(0) /* * We need to preserve the scratch registers f6-f11 in case the system @@ -582,7 +583,7 @@ strace_error: (p6) mov r10=-1 (p6) mov r8=r9 br.cond.sptk .strace_save_retval -END(__ia64_trace_syscall) +END(ia64_trace_syscall) /* * When traced and returning from sigreturn, we invoke syscall_trace but then @@ -635,11 +636,8 @@ GLOBAL_ENTRY(ia64_ret_from_syscall) adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8 mov r10=r0 // clear error indication in r10 (p7) br.cond.spnt handle_syscall_error // handle potential syscall failure - ;; - // don't fall through, ia64_leave_syscall may be #define'd - br.cond.sptk.few ia64_leave_syscall - ;; END(ia64_ret_from_syscall) + // fall through /* * ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't * need to switch to bank 0 and doesn't restore the scratch registers. @@ -684,7 +682,7 @@ END(ia64_ret_from_syscall) * ar.csd: cleared * ar.ssd: cleared */ -GLOBAL_ENTRY(__ia64_leave_syscall) +ENTRY(ia64_leave_syscall) PT_REGS_UNWIND_INFO(0) /* * work.need_resched etc. mustn't get changed by this CPU before it returns to @@ -792,7 +790,7 @@ GLOBAL_ENTRY(__ia64_leave_syscall) mov.m ar.ssd=r0 // M2 clear ar.ssd mov f11=f0 // F clear f11 br.cond.sptk.many rbs_switch // B -END(__ia64_leave_syscall) +END(ia64_leave_syscall) #ifdef CONFIG_IA32_SUPPORT GLOBAL_ENTRY(ia64_ret_from_ia32_execve) @@ -804,13 +802,10 @@ GLOBAL_ENTRY(ia64_ret_from_ia32_execve) st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit .mem.offset 8,0 st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit - ;; - // don't fall through, ia64_leave_kernel may be #define'd - br.cond.sptk.few ia64_leave_kernel - ;; END(ia64_ret_from_ia32_execve) + // fall through #endif /* CONFIG_IA32_SUPPORT */ -GLOBAL_ENTRY(__ia64_leave_kernel) +GLOBAL_ENTRY(ia64_leave_kernel) PT_REGS_UNWIND_INFO(0) /* * work.need_resched etc. mustn't get changed by this CPU before it returns to @@ -1141,7 +1136,7 @@ skip_rbs_switch: ld8 r10=[r3] br.cond.sptk.many .work_processed_syscall // re-check -END(__ia64_leave_kernel) +END(ia64_leave_kernel) ENTRY(handle_syscall_error) /* @@ -1181,7 +1176,7 @@ END(ia64_invoke_schedule_tail) * be set up by the caller. We declare 8 input registers so the system call * args get preserved, in case we need to restart a system call. */ -GLOBAL_ENTRY(notify_resume_user) +ENTRY(notify_resume_user) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! mov r9=ar.unat @@ -1269,7 +1264,7 @@ ENTRY(sys_rt_sigreturn) adds sp=16,sp ;; ld8 r9=[sp] // load new ar.unat - mov.sptk b7=r8,__ia64_leave_kernel + mov.sptk b7=r8,ia64_leave_kernel ;; mov ar.unat=r9 br.many b7 @@ -1597,7 +1592,7 @@ sys_call_table: data8 sys_keyctl data8 sys_ioprio_set data8 sys_ioprio_get // 1275 - data8 sys_move_pages + data8 sys_ni_syscall data8 sys_inotify_init data8 sys_inotify_add_watch data8 sys_inotify_rm_watch @@ -1619,8 +1614,8 @@ sys_call_table: data8 sys_ni_syscall // 1295 reserved for ppoll data8 sys_unshare data8 sys_splice - data8 sys_ni_syscall // reserved for set_robust_list - data8 sys_ni_syscall // reserved for get_robust_list + data8 sys_set_robust_list + data8 sys_get_robust_list data8 sys_sync_file_range // 1300 data8 sys_tee data8 sys_vmsplice diff --git a/arch/ia64/kernel/entry.h b/arch/ia64/kernel/entry.h index b83edac02..78eeb0793 100644 --- a/arch/ia64/kernel/entry.h +++ b/arch/ia64/kernel/entry.h @@ -1,3 +1,4 @@ +#include /* * Preserved registers that are shared between code in ivt.S and @@ -22,7 +23,6 @@ #define PT(f) (IA64_PT_REGS_##f##_OFFSET) #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET) -#define SOS(f) (IA64_SAL_OS_STATE_##f##_OFFSET) #define PT_REGS_SAVES(off) \ .unwabi 3, 'i'; \ diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S index 30c2dc3d3..86064ca98 100644 --- a/arch/ia64/kernel/gate.S +++ b/arch/ia64/kernel/gate.S @@ -6,15 +6,14 @@ * David Mosberger-Tang */ +#include + #include #include #include #include #include #include -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -# include -#endif /* * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, @@ -34,52 +33,6 @@ [1:](pr)brl.cond.sptk 0; \ .xdata4 ".data.patch.brl_fsys_bubble_down", 1b-. -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - // The page in which hyperprivop lives must be pinned by ITR. - // However vDSO area isn't pinned. So issuing hyperprivop - // from vDSO page causes trouble that Kevin pointed out. - // After clearing vpsr.ic, the vcpu is pre-empted and the itlb - // is flushed. Then vcpu get cpu again, tlb miss fault occures. - // However it results in nested dtlb fault because vpsr.ic is off. - // To avoid such a situation, we jump into the kernel text area - // which is pinned, and then issue hyperprivop and return back - // to vDSO page. - // This is Dan Magenheimer's idea. - - // Currently is_running_on_xen() is defined as running_on_xen. - // If is_running_on_xen() is a real function, we must update - // according to it. - .section ".data.patch.running_on_xen", "a" - .previous -#define LOAD_RUNNING_ON_XEN(reg) \ -[1:] movl reg=0; \ - .xdata4 ".data.patch.running_on_xen", 1b-. - - .section ".data.patch.brl_xen_rsm_be_i", "a" - .previous -#define BRL_COND_XEN_RSM_BE_I(pr) \ -[1:](pr)brl.cond.sptk 0; \ - .xdata4 ".data.patch.brl_xen_rsm_be_i", 1b-. - - .section ".data.patch.brl_xen_get_psr", "a" - .previous -#define BRL_COND_XEN_GET_PSR(pr) \ -[1:](pr)brl.cond.sptk 0; \ - .xdata4 ".data.patch.brl_xen_get_psr", 1b-. - - .section ".data.patch.brl_xen_ssm_i_0", "a" - .previous -#define BRL_COND_XEN_SSM_I_0(pr) \ -[1:](pr)brl.cond.sptk 0; \ - .xdata4 ".data.patch.brl_xen_ssm_i_0", 1b-. - - .section ".data.patch.brl_xen_ssm_i_1", "a" - .previous -#define BRL_COND_XEN_SSM_I_1(pr) \ -[1:](pr)brl.cond.sptk 0; \ - .xdata4 ".data.patch.brl_xen_ssm_i_1", 1b-. -#endif - GLOBAL_ENTRY(__kernel_syscall_via_break) .prologue .altrp b6 @@ -124,39 +77,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) epc // B causes split-issue } ;; -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - // r20 = 1 - // r22 = &vcpu->evtchn_mask - // r23 = &vpsr.ic - // r24 = &vcpu->pending_interruption - // r25 = tmp - // r28 = &running_on_xen - // r30 = running_on_xen - // r31 = tmp - // p11 = tmp - // p12 = running_on_xen - // p13 = !running_on_xen - // p14 = tmp - // p15 = tmp -#define isXen p12 -#define isRaw p13 - LOAD_RUNNING_ON_XEN(r28) - movl r22=XSI_PSR_I_ADDR - movl r23=XSI_PSR_IC - movl r24=XSI_PSR_I_ADDR+(XSI_PEND_OFS-XSI_PSR_I_ADDR_OFS) - mov r20=1 - ;; - ld4 r30=[r28] - ;; - cmp.ne isXen,isRaw=r0,r30 - ;; -(isRaw) rsm psr.be | psr.i - BRL_COND_XEN_RSM_BE_I(isXen) - .global .vdso_rsm_be_i_ret -.vdso_rsm_be_i_ret: -#else rsm psr.be | psr.i // M2 (5 cyc to srlz.d) -#endif LOAD_FSYSCALL_TABLE(r14) // X ;; mov r16=IA64_KR(CURRENT) // M2 (12 cyc) @@ -164,14 +85,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) mov r19=NR_syscalls-1 // A ;; lfetch [r18] // M0|1 -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) mov r29=psr - BRL_COND_XEN_GET_PSR(isXen) - .global .vdso_get_psr_ret -.vdso_get_psr_ret: -#else mov r29=psr // M2 (12 cyc) -#endif // If r17 is a NaT, p6 will be zero cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? ;; @@ -185,21 +99,9 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) ;; nop.m 0 (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - ;; - // p14 = running_on_xen && p8 - // p15 = !running_on_xen && p8 -(p8) cmp.ne.unc p14,p15=r0,r30 - ;; -(p15) ssm psr.i - BRL_COND_XEN_SSM_I_0(p14) - .global .vdso_ssm_i_0_ret -.vdso_ssm_i_0_ret: -#else nop.i 0 ;; (p8) ssm psr.i -#endif (p6) mov b7=r18 // I0 (p8) br.dptk.many b7 // B @@ -220,21 +122,9 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) #else BRL_COND_FSYS_BUBBLE_DOWN(p6) #endif -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -(isRaw) ssm psr.i - BRL_COND_XEN_SSM_I_1(isXen) - .global .vdso_ssm_i_1_ret -.vdso_ssm_i_1_ret: -#else ssm psr.i -#endif mov r10=-1 (p10) mov r8=EINVAL -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - dv_serialize_data // shut up gas warning. - // we know xen_hyper_ssm_i_0 or xen_hyper_ssm_i_1 - // doesn't change p9 and p10 -#endif (p9) mov r8=ENOSYS FSYS_RETURN END(__kernel_syscall_via_epc) diff --git a/arch/ia64/kernel/gate.lds.S b/arch/ia64/kernel/gate.lds.S index 983719c32..7c99e6ec3 100644 --- a/arch/ia64/kernel/gate.lds.S +++ b/arch/ia64/kernel/gate.lds.S @@ -4,6 +4,7 @@ * in one page). This script controls its layout. */ +#include #include @@ -12,7 +13,6 @@ SECTIONS . = GATE_ADDR + SIZEOF_HEADERS; .hash : { *(.hash) } :readable - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } @@ -43,28 +43,6 @@ SECTIONS __start_gate_brl_fsys_bubble_down_patchlist = .; *(.data.patch.brl_fsys_bubble_down) __end_gate_brl_fsys_bubble_down_patchlist = .; - -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT - __start_gate_running_on_xen_patchlist = .; - *(.data.patch.running_on_xen) - __end_gate_running_on_xen_patchlist = .; - - __start_gate_brl_xen_rsm_be_i_patchlist = .; - *(.data.patch.brl_xen_rsm_be_i) - __end_gate_brl_xen_rsm_be_i_patchlist = .; - - __start_gate_brl_xen_get_psr_patchlist = .; - *(.data.patch.brl_xen_get_psr) - __end_gate_brl_xen_get_psr_patchlist = .; - - __start_gate_brl_xen_ssm_i_0_patchlist = .; - *(.data.patch.brl_xen_ssm_i_0) - __end_gate_brl_xen_ssm_i_0_patchlist = .; - - __start_gate_brl_xen_ssm_i_1_patchlist = .; - *(.data.patch.brl_xen_ssm_i_1) - __end_gate_brl_xen_ssm_i_1_patchlist = .; -#endif } :readable .IA_64.unwind_info : { *(.IA_64.unwind_info*) } .IA_64.unwind : { *(.IA_64.unwind*) } :readable :unwind diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index dded6f24f..f1778a84e 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S @@ -19,6 +19,7 @@ * Support for CPU Hotplug */ +#include #include #include @@ -197,11 +198,6 @@ start_ap: ;; srlz.i ;; - { - flushrs // must be first insn in group - srlz.i - } - ;; /* * Save the region registers, predicate before they get clobbered */ @@ -367,12 +363,6 @@ start_ap: ;; (isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader -#ifdef CONFIG_XEN - // Note: isBP is used by the subprogram. - br.call.sptk.many rp=early_xen_setup - ;; -#endif - #ifdef CONFIG_SMP (isAP) br.call.sptk.many rp=start_secondary .ret0: @@ -864,6 +854,7 @@ END(__ia64_init_fpu) */ GLOBAL_ENTRY(ia64_switch_mode_phys) { + alloc r2=ar.pfs,0,0,0,0 rsm psr.i | psr.ic // disable interrupts and interrupt collection mov r15=ip } @@ -912,6 +903,7 @@ END(ia64_switch_mode_phys) */ GLOBAL_ENTRY(ia64_switch_mode_virt) { + alloc r2=ar.pfs,0,0,0,0 rsm psr.i | psr.ic // disable interrupts and interrupt collection mov r15=ip } diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index 252b55de6..624cf6c1a 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c @@ -5,6 +5,7 @@ * All other exports should be put directly after the definition. */ +#include #include #include @@ -42,7 +43,6 @@ EXPORT_SYMBOL(__do_clear_user); EXPORT_SYMBOL(__strlen_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(copy_page); #define __KERNEL_SYSCALLS__ #include @@ -68,7 +68,7 @@ EXPORT_SYMBOL(__udivdi3); EXPORT_SYMBOL(__moddi3); EXPORT_SYMBOL(__umoddi3); -#if defined(CONFIG_MD_RAID456) || defined(CONFIG_MD_RAID456_MODULE) +#if defined(CONFIG_MD_RAID5) || defined(CONFIG_MD_RAID5_MODULE) extern void xor_ia64_2(void); extern void xor_ia64_3(void); extern void xor_ia64_4(void); diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 034104828..d58c1c5c9 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -79,6 +79,7 @@ * describeinterrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ * (isa_irq) is the only exception in this source code. */ +#include #include #include @@ -159,65 +160,6 @@ static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ static int iosapic_kmalloc_ok; static LIST_HEAD(free_rte_list); -#ifdef CONFIG_XEN -#include -#include -#include -static inline unsigned int xen_iosapic_read(char __iomem *iosapic, unsigned int reg) -{ - struct physdev_apic apic_op; - int ret; - - apic_op.apic_physbase = (unsigned long)iosapic - - __IA64_UNCACHED_OFFSET; - apic_op.reg = reg; - ret = HYPERVISOR_physdev_op(PHYSDEVOP_apic_read, &apic_op); - if (ret) - return ret; - return apic_op.value; -} - -static inline void xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) -{ - struct physdev_apic apic_op; - - apic_op.apic_physbase = (unsigned long)iosapic - - __IA64_UNCACHED_OFFSET; - apic_op.reg = reg; - apic_op.value = val; - HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); -} - -static inline unsigned int iosapic_read(char __iomem *iosapic, unsigned int reg) -{ - if (!is_running_on_xen()) { - writel(reg, iosapic + IOSAPIC_REG_SELECT); - return readl(iosapic + IOSAPIC_WINDOW); - } else - return xen_iosapic_read(iosapic, reg); -} - -static inline void iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) -{ - if (!is_running_on_xen()) { - writel(reg, iosapic + IOSAPIC_REG_SELECT); - writel(val, iosapic + IOSAPIC_WINDOW); - } else - xen_iosapic_write(iosapic, reg, val); -} - -int xen_assign_irq_vector(int irq) -{ - struct physdev_irq irq_op; - - irq_op.irq = irq; - if (HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, &irq_op)) - return -ENOSPC; - - return irq_op.vector; -} -#endif /* XEN */ - /* * Find an IOSAPIC associated with a GSI */ @@ -514,7 +456,7 @@ iosapic_startup_edge_irq (unsigned int irq) static void iosapic_ack_edge_irq (unsigned int irq) { - irq_desc_t *idesc = irq_desc + irq; + irq_desc_t *idesc = irq_descp(irq); move_native_irq(irq); /* @@ -712,22 +654,19 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, iosapic_intr_info[vector].dmode = delivery; iosapic_intr_info[vector].trigger = trigger; - if (is_running_on_xen()) - return 0; - if (trigger == IOSAPIC_EDGE) irq_type = &irq_type_iosapic_edge; else irq_type = &irq_type_iosapic_level; - idesc = irq_desc + vector; - if (idesc->chip != irq_type) { - if (idesc->chip != &no_irq_type) + idesc = irq_descp(vector); + if (idesc->handler != irq_type) { + if (idesc->handler != &no_irq_type) printk(KERN_WARNING "%s: changing vector %d from %s to %s\n", __FUNCTION__, vector, - idesc->chip->typename, irq_type->typename); - idesc->chip = irq_type; + idesc->handler->typename, irq_type->typename); + idesc->handler = irq_type; } return 0; } @@ -854,14 +793,14 @@ again: return -ENOSPC; } - spin_lock_irqsave(&irq_desc[vector].lock, flags); + spin_lock_irqsave(&irq_descp(vector)->lock, flags); spin_lock(&iosapic_lock); { if (gsi_to_vector(gsi) > 0) { if (list_empty(&iosapic_intr_info[vector].rtes)) free_irq_vector(vector); spin_unlock(&iosapic_lock); - spin_unlock_irqrestore(&irq_desc[vector].lock, + spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); goto again; } @@ -871,7 +810,7 @@ again: polarity, trigger); if (err < 0) { spin_unlock(&iosapic_lock); - spin_unlock_irqrestore(&irq_desc[vector].lock, + spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); return err; } @@ -886,7 +825,7 @@ again: set_rte(gsi, vector, dest, mask); } spin_unlock(&iosapic_lock); - spin_unlock_irqrestore(&irq_desc[vector].lock, flags); + spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n", gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), @@ -921,7 +860,7 @@ iosapic_unregister_intr (unsigned int gsi) } vector = irq_to_vector(irq); - idesc = irq_desc + irq; + idesc = irq_descp(irq); spin_lock_irqsave(&idesc->lock, flags); spin_lock(&iosapic_lock); { @@ -964,7 +903,7 @@ iosapic_unregister_intr (unsigned int gsi) BUG_ON(iosapic_intr_info[vector].count); /* Clear the interrupt controller descriptor */ - idesc->chip = &no_irq_type; + idesc->handler = &no_irq_type; /* Clear the interrupt information */ memset(&iosapic_intr_info[vector], 0, @@ -1077,9 +1016,6 @@ iosapic_system_init (int system_pcat_compat) } pcat_compat = system_pcat_compat; - if (is_running_on_xen()) - return; - if (pcat_compat) { /* * Disable the compatibility mode interrupts (8259 style), diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 7852382de..9c72ea3f6 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c @@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); } #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -100,7 +100,7 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir) cpu_set(cpu_logical_id(hwid), mask); if (irq < NR_IRQS) { - irq_desc[irq].affinity = mask; + irq_affinity[irq] = mask; irq_redir[irq] = (char) (redir & 0xff); } } @@ -120,7 +120,7 @@ static void migrate_irqs(void) int irq, new_cpu; for (irq=0; irq < NR_IRQS; irq++) { - desc = irq_desc + irq; + desc = irq_descp(irq); /* * No handling for now. @@ -131,7 +131,7 @@ static void migrate_irqs(void) if (desc->status == IRQ_PER_CPU) continue; - cpus_and(mask, irq_desc[irq].affinity, cpu_online_map); + cpus_and(mask, irq_affinity[irq], cpu_online_map); if (any_online_cpu(mask) == NR_CPUS) { /* * Save it for phase 2 processing @@ -144,15 +144,15 @@ static void migrate_irqs(void) /* * Al three are essential, currently WARN_ON.. maybe panic? */ - if (desc->chip && desc->chip->disable && - desc->chip->enable && desc->chip->set_affinity) { - desc->chip->disable(irq); - desc->chip->set_affinity(irq, mask); - desc->chip->enable(irq); + if (desc->handler && desc->handler->disable && + desc->handler->enable && desc->handler->set_affinity) { + desc->handler->disable(irq); + desc->handler->set_affinity(irq, mask); + desc->handler->enable(irq); } else { - WARN_ON((!(desc->chip) || !(desc->chip->disable) || - !(desc->chip->enable) || - !(desc->chip->set_affinity))); + WARN_ON((!(desc->handler) || !(desc->handler->disable) || + !(desc->handler->enable) || + !(desc->handler->set_affinity))); } } } diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 3b752a812..6c4d59fd0 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -14,6 +14,7 @@ * Added CPU Hotplug handling for IPF. */ +#include #include #include @@ -30,9 +31,6 @@ #include #include #include -#ifdef CONFIG_XEN -#include -#endif #include #include @@ -48,10 +46,6 @@ #define IRQ_DEBUG 0 -/* These can be overridden in platform_irq_init */ -int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR; -int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR; - /* default base addr of IPI table */ void __iomem *ipi_base_addr = ((void __iomem *) (__IA64_UNCACHED_OFFSET | IA64_IPI_DEFAULT_BASE_ADDR)); @@ -66,19 +60,12 @@ __u8 isa_irq_to_vector_map[16] = { }; EXPORT_SYMBOL(isa_irq_to_vector_map); -static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_MAX_DEVICE_VECTORS)]; +static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_NUM_DEVICE_VECTORS)]; int assign_irq_vector (int irq) { int pos, vector; - -#ifdef CONFIG_XEN - if (is_running_on_xen()) { - extern int xen_assign_irq_vector(int); - return xen_assign_irq_vector(irq); - } -#endif again: pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); vector = IA64_FIRST_DEVICE_VECTOR + pos; @@ -102,19 +89,6 @@ free_irq_vector (int vector) printk(KERN_WARNING "%s: double free!\n", __FUNCTION__); } -int -reserve_irq_vector (int vector) -{ - int pos; - - if (vector < IA64_FIRST_DEVICE_VECTOR || - vector > IA64_LAST_DEVICE_VECTOR) - return -EINVAL; - - pos = vector - IA64_FIRST_DEVICE_VECTOR; - return test_and_set_bit(pos, ia64_vector_mask); -} - #ifdef CONFIG_SMP # define IS_RESCHEDULE(vec) (vec == IA64_IPI_RESCHEDULE) #else @@ -245,223 +219,22 @@ extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs *regs); static struct irqaction ipi_irqaction = { .handler = handle_IPI, - .flags = IRQF_DISABLED, - .name = "IPI" -}; -#endif - -#ifdef CONFIG_XEN -#include -#include - -static DEFINE_PER_CPU(int, timer_irq) = -1; -static DEFINE_PER_CPU(int, ipi_irq) = -1; -static DEFINE_PER_CPU(int, resched_irq) = -1; -static char timer_name[NR_CPUS][15]; -static char ipi_name[NR_CPUS][15]; -static char resched_name[NR_CPUS][15]; - -struct saved_irq { - unsigned int irq; - struct irqaction *action; -}; -/* 16 should be far optimistic value, since only several percpu irqs - * are registered early. - */ -#define MAX_LATE_IRQ 16 -static struct saved_irq saved_percpu_irqs[MAX_LATE_IRQ]; -static unsigned short late_irq_cnt = 0; -static unsigned short saved_irq_cnt = 0; -static int xen_slab_ready = 0; - -#ifdef CONFIG_SMP -/* Dummy stub. Though we may check RESCHEDULE_VECTOR before __do_IRQ, - * it ends up to issue several memory accesses upon percpu data and - * thus adds unnecessary traffic to other paths. - */ -static irqreturn_t -handle_reschedule(int irq, void *dev_id, struct pt_regs *regs) -{ - - return IRQ_HANDLED; -} - -static struct irqaction resched_irqaction = { - .handler = handle_reschedule, .flags = SA_INTERRUPT, - .name = "RESCHED" -}; -#endif - -/* - * This is xen version percpu irq registration, which needs bind - * to xen specific evtchn sub-system. One trick here is that xen - * evtchn binding interface depends on kmalloc because related - * port needs to be freed at device/cpu down. So we cache the - * registration on BSP before slab is ready and then deal them - * at later point. For rest instances happening after slab ready, - * we hook them to xen evtchn immediately. - * - * FIXME: MCA is not supported by far, and thus "nomca" boot param is - * required. - */ -static void -xen_register_percpu_irq (unsigned int irq, struct irqaction *action, int save) -{ - unsigned int cpu = smp_processor_id(); - int ret = 0; - - if (xen_slab_ready) { - switch (irq) { - case IA64_TIMER_VECTOR: - sprintf(timer_name[cpu], "%s%d", action->name, cpu); - ret = bind_virq_to_irqhandler(VIRQ_ITC, cpu, - action->handler, action->flags, - timer_name[cpu], action->dev_id); - per_cpu(timer_irq,cpu) = ret; - printk(KERN_INFO "register VIRQ_ITC (%s) to xen irq (%d)\n", timer_name[cpu], ret); - break; - case IA64_IPI_RESCHEDULE: - sprintf(resched_name[cpu], "%s%d", action->name, cpu); - ret = bind_ipi_to_irqhandler(RESCHEDULE_VECTOR, cpu, - action->handler, action->flags, - resched_name[cpu], action->dev_id); - per_cpu(resched_irq,cpu) = ret; - printk(KERN_INFO "register RESCHEDULE_VECTOR (%s) to xen irq (%d)\n", resched_name[cpu], ret); - break; - case IA64_IPI_VECTOR: - sprintf(ipi_name[cpu], "%s%d", action->name, cpu); - ret = bind_ipi_to_irqhandler(IPI_VECTOR, cpu, - action->handler, action->flags, - ipi_name[cpu], action->dev_id); - per_cpu(ipi_irq,cpu) = ret; - printk(KERN_INFO "register IPI_VECTOR (%s) to xen irq (%d)\n", ipi_name[cpu], ret); - break; - case IA64_SPURIOUS_INT_VECTOR: - break; - default: - printk(KERN_WARNING "Percpu irq %d is unsupported by xen!\n", irq); - break; - } - BUG_ON(ret < 0); - } - - /* For BSP, we cache registered percpu irqs, and then re-walk - * them when initializing APs - */ - if (!cpu && save) { - BUG_ON(saved_irq_cnt == MAX_LATE_IRQ); - saved_percpu_irqs[saved_irq_cnt].irq = irq; - saved_percpu_irqs[saved_irq_cnt].action = action; - saved_irq_cnt++; - if (!xen_slab_ready) - late_irq_cnt++; - } -} - -static void -xen_bind_early_percpu_irq (void) -{ - int i; - - xen_slab_ready = 1; - /* There's no race when accessing this cached array, since only - * BSP will face with such step shortly - */ - for (i = 0; i < late_irq_cnt; i++) - xen_register_percpu_irq(saved_percpu_irqs[i].irq, - saved_percpu_irqs[i].action, 0); -} - -/* FIXME: There's no obvious point to check whether slab is ready. So - * a hack is used here by utilizing a late time hook. - */ -extern void (*late_time_init)(void); -extern char xen_event_callback; -extern void xen_init_IRQ(void); - -#ifdef CONFIG_HOTPLUG_CPU -static int __devinit -unbind_evtchn_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) -{ - unsigned int cpu = (unsigned long)hcpu; - - if (action == CPU_DEAD) { - /* Unregister evtchn. */ - if (per_cpu(ipi_irq,cpu) >= 0) { - unbind_from_irqhandler (per_cpu(ipi_irq, cpu), NULL); - per_cpu(ipi_irq, cpu) = -1; - } - if (per_cpu(resched_irq,cpu) >= 0) { - unbind_from_irqhandler (per_cpu(resched_irq, cpu), - NULL); - per_cpu(resched_irq, cpu) = -1; - } - if (per_cpu(timer_irq,cpu) >= 0) { - unbind_from_irqhandler (per_cpu(timer_irq, cpu), NULL); - per_cpu(timer_irq, cpu) = -1; - } - } - return NOTIFY_OK; -} - -static struct notifier_block unbind_evtchn_notifier = { - .notifier_call = unbind_evtchn_callback, - .priority = 0 + .name = "IPI" }; #endif -DECLARE_PER_CPU(int, ipi_to_irq[NR_IPIS]); -void xen_smp_intr_init(void) -{ -#ifdef CONFIG_SMP - unsigned int cpu = smp_processor_id(); - unsigned int i = 0; - struct callback_register event = { - .type = CALLBACKTYPE_event, - .address = (unsigned long)&xen_event_callback, - }; - - if (cpu == 0) { - /* Initialization was already done for boot cpu. */ -#ifdef CONFIG_HOTPLUG_CPU - /* Register the notifier only once. */ - register_cpu_notifier(&unbind_evtchn_notifier); -#endif - return; - } - - /* This should be piggyback when setup vcpu guest context */ - BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event)); - - for (i = 0; i < saved_irq_cnt; i++) - xen_register_percpu_irq(saved_percpu_irqs[i].irq, - saved_percpu_irqs[i].action, 0); -#endif /* CONFIG_SMP */ -} -#endif /* CONFIG_XEN */ - void register_percpu_irq (ia64_vector vec, struct irqaction *action) { irq_desc_t *desc; unsigned int irq; -#ifdef CONFIG_XEN - if (is_running_on_xen()) - return xen_register_percpu_irq(vec, action, 1); -#endif - for (irq = 0; irq < NR_IRQS; ++irq) if (irq_to_vector(irq) == vec) { -#ifdef CONFIG_XEN - if (is_running_on_xen()) - return xen_register_percpu_irq(vec, action, 1); -#endif - desc = irq_desc + irq; + desc = irq_descp(irq); desc->status |= IRQ_PER_CPU; - desc->chip = &irq_type_ia64_lsapic; + desc->handler = &irq_type_ia64_lsapic; if (action) setup_irq(irq, action); } @@ -470,21 +243,6 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action) void __init init_IRQ (void) { -#ifdef CONFIG_XEN - /* Maybe put into platform_irq_init later */ - if (is_running_on_xen()) { - struct callback_register event = { - .type = CALLBACKTYPE_event, - .address = (unsigned long)&xen_event_callback, - }; - xen_init_IRQ(); - BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event)); - late_time_init = xen_bind_early_percpu_irq; -#ifdef CONFIG_SMP - register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction); -#endif /* CONFIG_SMP */ - } -#endif /* CONFIG_XEN */ register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); #ifdef CONFIG_SMP register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); @@ -502,39 +260,6 @@ ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect) unsigned long ipi_data; unsigned long phys_cpu_id; -#ifdef CONFIG_XEN - if (is_running_on_xen()) { - int irq = -1; - -#ifdef CONFIG_SMP - /* TODO: we need to call vcpu_up here */ - if (unlikely(vector == ap_wakeup_vector)) { - extern void xen_send_ipi (int cpu, int vec); - xen_send_ipi (cpu, vector); - //vcpu_prepare_and_up(cpu); - return; - } -#endif - - switch(vector) { - case IA64_IPI_VECTOR: - irq = per_cpu(ipi_to_irq, cpu)[IPI_VECTOR]; - break; - case IA64_IPI_RESCHEDULE: - irq = per_cpu(ipi_to_irq, cpu)[RESCHEDULE_VECTOR]; - break; - default: - printk(KERN_WARNING"Unsupported IPI type 0x%x\n", vector); - irq = 0; - break; - } - - BUG_ON(irq < 0); - notify_remote_via_irq(irq); - return; - } -#endif /* CONFIG_XEN */ - #ifdef CONFIG_SMP phys_cpu_id = cpu_physical_id(cpu); #else diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c index 1ab58b09f..ea14e6a04 100644 --- a/arch/ia64/kernel/irq_lsapic.c +++ b/arch/ia64/kernel/irq_lsapic.c @@ -26,13 +26,6 @@ lsapic_noop (unsigned int irq) /* nuthing to do... */ } -static int lsapic_retrigger(unsigned int irq) -{ - ia64_resend_irq(irq); - - return 1; -} - struct hw_interrupt_type irq_type_ia64_lsapic = { .typename = "LSAPIC", .startup = lsapic_noop_startup, @@ -40,6 +33,5 @@ struct hw_interrupt_type irq_type_ia64_lsapic = { .enable = lsapic_noop, .disable = lsapic_noop, .ack = lsapic_noop, - .end = lsapic_noop, - .retrigger = lsapic_retrigger, + .end = lsapic_noop }; diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 6b7fcbd3f..829a43cab 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S @@ -38,6 +38,7 @@ * Table is based upon EAS2.6 (Oct 1999) */ +#include #include #include diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 781960f80..f9039f88d 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -23,6 +23,7 @@ * adapted from i386 */ +#include #include #include #include @@ -448,20 +449,11 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) return 0; } -void __kprobes flush_insn_slot(struct kprobe *p) -{ - unsigned long arm_addr; - - arm_addr = ((unsigned long)&p->opcode.bundle) & ~0xFULL; - flush_icache_range(arm_addr, arm_addr + sizeof(bundle_t)); -} - void __kprobes arch_arm_kprobe(struct kprobe *p) { unsigned long addr = (unsigned long)p->addr; unsigned long arm_addr = addr & ~0xFULL; - flush_insn_slot(p); memcpy((char *)arm_addr, &p->ainsn.insn.bundle, sizeof(bundle_t)); flush_icache_range(arm_addr, arm_addr + sizeof(bundle_t)); } diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c index d4a546aa5..4b0b71d5a 100644 --- a/arch/ia64/kernel/machvec.c +++ b/arch/ia64/kernel/machvec.c @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 2fbe4536f..6a0880639 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -55,6 +55,7 @@ * 2005-10-07 Keith Owens * Add notify_die() hooks. */ +#include #include #include #include @@ -678,7 +679,7 @@ copy_reg(const u64 *fr, u64 fnat, u64 *tr, u64 *tnat) */ static void -ia64_mca_modify_comm(const struct task_struct *previous_current) +ia64_mca_modify_comm(const task_t *previous_current) { char *p, comm[sizeof(current->comm)]; if (previous_current->pid) @@ -709,7 +710,7 @@ ia64_mca_modify_comm(const struct task_struct *previous_current) * that we can do backtrace on the MCA/INIT handler code itself. */ -static struct task_struct * +static task_t * ia64_mca_modify_original_stack(struct pt_regs *regs, const struct switch_stack *sw, struct ia64_sal_os_state *sos, @@ -719,7 +720,7 @@ ia64_mca_modify_original_stack(struct pt_regs *regs, ia64_va va; extern char ia64_leave_kernel[]; /* Need asm address, not function descriptor */ const pal_min_state_area_t *ms = sos->pal_min_state; - struct task_struct *previous_current; + task_t *previous_current; struct pt_regs *old_regs; struct switch_stack *old_sw; unsigned size = sizeof(struct pt_regs) + @@ -1023,7 +1024,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, pal_processor_state_info_t *psp = (pal_processor_state_info_t *) &sos->proc_state_param; int recover, cpu = smp_processor_id(); - struct task_struct *previous_current; + task_t *previous_current; struct ia64_mca_notify_die nd = { .sos = sos, .monarch_cpu = &monarch_cpu }; @@ -1352,7 +1353,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw, { static atomic_t slaves; static atomic_t monarchs; - struct task_struct *previous_current; + task_t *previous_current; int cpu = smp_processor_id(); struct ia64_mca_notify_die nd = { .sos = sos, .monarch_cpu = &monarch_cpu }; @@ -1457,38 +1458,38 @@ __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling); static struct irqaction cmci_irqaction = { .handler = ia64_mca_cmc_int_handler, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "cmc_hndlr" }; static struct irqaction cmcp_irqaction = { .handler = ia64_mca_cmc_int_caller, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "cmc_poll" }; static struct irqaction mca_rdzv_irqaction = { .handler = ia64_mca_rendez_int_handler, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "mca_rdzv" }; static struct irqaction mca_wkup_irqaction = { .handler = ia64_mca_wakeup_int_handler, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "mca_wkup" }; #ifdef CONFIG_ACPI static struct irqaction mca_cpe_irqaction = { .handler = ia64_mca_cpe_int_handler, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "cpe_hndlr" }; static struct irqaction mca_cpep_irqaction = { .handler = ia64_mca_cpe_int_caller, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "cpe_poll" }; #endif /* CONFIG_ACPI */ @@ -1787,7 +1788,7 @@ ia64_mca_late_init(void) cpe_poll_enabled = 0; for (irq = 0; irq < NR_IRQS; ++irq) if (irq_to_vector(irq) == cpe_vector) { - desc = irq_desc + irq; + desc = irq_descp(irq); desc->status |= IRQ_PER_CPU; setup_irq(irq, &mca_cpe_irqaction); ia64_cpe_irq = irq; diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index 96047491d..6dff024cd 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S @@ -19,6 +19,7 @@ // 12/08/05 Keith Owens // Use per cpu MCA/INIT stacks for all data. // +#include #include #include @@ -158,7 +159,7 @@ ia64_os_mca_spin: GET_IA64_MCA_DATA(r2) // Using MCA stack, struct ia64_sal_os_state, variable proc_state_param ;; - add r3=IA64_MCA_CPU_MCA_STACK_OFFSET+MCA_SOS_OFFSET+SOS(PROC_STATE_PARAM), r2 + add r3=IA64_MCA_CPU_MCA_STACK_OFFSET+MCA_SOS_OFFSET+IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET, r2 ;; ld8 r18=[r3] // Get processor state parameter on existing PALE_CHECK. ;; @@ -478,11 +479,9 @@ ia64_state_save: st8 [temp2]=r11,16 // rv_rc mov r11=cr.iipa ;; - st8 [temp1]=r18 // proc_state_param - st8 [temp2]=r19 // monarch + st8 [temp1]=r18,16 // proc_state_param + st8 [temp2]=r19,16 // monarch mov r6=IA64_KR(CURRENT) - add temp1=SOS(SAL_RA), regs - add temp2=SOS(SAL_GP), regs ;; st8 [temp1]=r12,16 // sal_ra st8 [temp2]=r10,16 // sal_gp @@ -504,14 +503,12 @@ ia64_state_save: st8 [temp2]=r11,16 // cr.iipa mov r12=cr.iim ;; - st8 [temp1]=r12 // cr.iim + st8 [temp1]=r12,16 // cr.iim (p1) mov r12=IA64_MCA_COLD_BOOT (p2) mov r12=IA64_INIT_WARM_BOOT mov r6=cr.iha - add temp1=SOS(OS_STATUS), regs ;; - st8 [temp2]=r6 // cr.iha - add temp2=SOS(CONTEXT), regs + st8 [temp2]=r6,16 // cr.iha st8 [temp1]=r12 // os_status, default is cold boot mov r6=IA64_MCA_SAME_CONTEXT ;; @@ -823,8 +820,8 @@ ia64_state_restore: // Restore the SAL to OS state. The previous code left regs at pt_regs. add regs=MCA_SOS_OFFSET-MCA_PT_REGS_OFFSET, regs ;; - add temp1=SOS(SAL_RA), regs - add temp2=SOS(SAL_GP), regs + add temp1=IA64_SAL_OS_STATE_COMMON_OFFSET, regs + add temp2=IA64_SAL_OS_STATE_COMMON_OFFSET+8, regs ;; ld8 r12=[temp1],16 // sal_ra ld8 r9=[temp2],16 // sal_gp @@ -845,10 +842,8 @@ ia64_state_restore: ;; mov cr.itir=temp3 mov cr.iipa=temp4 - ld8 temp3=[temp1] // cr.iim - ld8 temp4=[temp2] // cr.iha - add temp1=SOS(OS_STATUS), regs - add temp2=SOS(CONTEXT), regs + ld8 temp3=[temp1],16 // cr.iim + ld8 temp4=[temp2],16 // cr.iha ;; mov cr.iim=temp3 mov cr.iha=temp4 @@ -921,7 +916,7 @@ ia64_state_restore: ia64_new_stack: add regs=MCA_PT_REGS_OFFSET, r3 - add temp2=MCA_SOS_OFFSET+SOS(PAL_MIN_STATE), r3 + add temp2=MCA_SOS_OFFSET+IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET, r3 mov b0=r2 // save return address GET_IA64_MCA_DATA(temp1) invala @@ -1025,7 +1020,7 @@ ia64_old_stack: ia64_set_kernel_registers: add temp3=MCA_SP_OFFSET, r3 - add temp4=MCA_SOS_OFFSET+SOS(OS_GP), r3 + add temp4=MCA_SOS_OFFSET+IA64_SAL_OS_STATE_OS_GP_OFFSET, r3 mov b0=r2 // save return address GET_IA64_MCA_DATA(temp1) ;; diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 8db6e0ced..ca6666b51 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c @@ -8,6 +8,7 @@ * Copyright (C) 2005 Keith Owens * Copyright (C) 2006 Russ Anderson */ +#include #include #include #include diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S index f2d490075..e6a580d35 100644 --- a/arch/ia64/kernel/mca_drv_asm.S +++ b/arch/ia64/kernel/mca_drv_asm.S @@ -5,6 +5,7 @@ * Copyright (C) 2004 FUJITSU LIMITED * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) */ +#include #include #include diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index c9ac8bada..85ed54179 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h @@ -1,3 +1,4 @@ +#include #include diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index 158e3c51b..3a30cfc95 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c @@ -25,6 +25,7 @@ SEGREL64LSB */ +#include #include #include diff --git a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c index 203406311..0766493d4 100644 --- a/arch/ia64/kernel/numa.c +++ b/arch/ia64/kernel/numa.c @@ -19,6 +19,7 @@ * Copyright (C) 2004 Silicon Graphics, Inc. * Jesse Barnes */ +#include #include #include #include @@ -29,36 +30,6 @@ EXPORT_SYMBOL(cpu_to_node_map); cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; -void __cpuinit map_cpu_to_node(int cpu, int nid) -{ - int oldnid; - if (nid < 0) { /* just initialize by zero */ - cpu_to_node_map[cpu] = 0; - return; - } - /* sanity check first */ - oldnid = cpu_to_node_map[cpu]; - if (cpu_isset(cpu, node_to_cpu_mask[oldnid])) { - return; /* nothing to do */ - } - /* we don't have cpu-driven node hot add yet... - In usual case, node is created from SRAT at boot time. */ - if (!node_online(nid)) - nid = first_online_node; - cpu_to_node_map[cpu] = nid; - cpu_set(cpu, node_to_cpu_mask[nid]); - return; -} - -void __cpuinit unmap_cpu_from_node(int cpu, int nid) -{ - WARN_ON(!cpu_isset(cpu, node_to_cpu_mask[nid])); - WARN_ON(cpu_to_node_map[cpu] != nid); - cpu_to_node_map[cpu] = 0; - cpu_clear(cpu, node_to_cpu_mask[nid]); -} - - /** * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays * @@ -79,6 +50,8 @@ void __init build_cpu_to_node_map(void) node = node_cpuid[i].nid; break; } - map_cpu_to_node(cpu, node); + cpu_to_node_map[cpu] = (node >= 0) ? node : 0; + if (node >= 0) + cpu_set(cpu, node_to_cpu_mask[node]); } } diff --git a/arch/ia64/kernel/pal.S b/arch/ia64/kernel/pal.S index af5cc0bc4..5018c7f2e 100644 --- a/arch/ia64/kernel/pal.S +++ b/arch/ia64/kernel/pal.S @@ -16,7 +16,6 @@ #include .data - .globl pal_entry_point pal_entry_point: data8 ia64_pal_default_handler .text @@ -54,7 +53,7 @@ END(ia64_pal_default_handler) * in4 1 ==> clear psr.ic, 0 ==> don't clear psr.ic * */ -GLOBAL_ENTRY(__ia64_pal_call_static) +GLOBAL_ENTRY(ia64_pal_call_static) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) alloc loc1 = ar.pfs,5,5,0,0 movl loc2 = pal_entry_point @@ -91,7 +90,7 @@ GLOBAL_ENTRY(__ia64_pal_call_static) ;; srlz.d // seralize restoration of psr.l br.ret.sptk.many b0 -END(__ia64_pal_call_static) +END(ia64_pal_call_static) /* * Make a PAL call using the stacked registers calling convention. @@ -218,7 +217,12 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked) .body ;; ld8 loc2 = [loc2] // loc2 <- entry point - mov loc3 = psr // save psr + mov out0 = in0 // first argument + mov out1 = in1 // copy arg2 + mov out2 = in2 // copy arg3 + mov out3 = in3 // copy arg3 + ;; + mov loc3 = psr // save psr ;; mov loc4=ar.rsc // save RSE configuration dep.z loc2=loc2,0,61 // convert pal entry point to physical @@ -232,23 +236,18 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked) ;; andcm r16=loc3,r16 // removes bits to clear from psr br.call.sptk.many rp=ia64_switch_mode_phys - - mov out0 = in0 // first argument - mov out1 = in1 // copy arg2 - mov out2 = in2 // copy arg3 - mov out3 = in3 // copy arg3 +.ret6: mov loc5 = r19 mov loc6 = r20 - br.call.sptk.many rp=b7 // now make the call - +.ret7: mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 // r16= original psr mov r19=loc5 mov r20=loc6 br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode - mov psr.l = loc3 // restore init PSR +.ret8: mov psr.l = loc3 // restore init PSR mov ar.pfs = loc1 mov rp = loc0 ;; diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 0b546e2b3..859fb37ff 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c @@ -17,6 +17,7 @@ * 10/23/2001 S.Eranian updated pal_perf_mon_info bug fixes * 03/24/2004 Ashok Raj updated to work with CPU Hotplug */ +#include #include #include #include @@ -566,23 +567,29 @@ version_info(char *page) pal_version_u_t min_ver, cur_ver; char *p = page; - if (ia64_pal_version(&min_ver, &cur_ver) != 0) - return 0; + /* The PAL_VERSION call is advertised as being able to support + * both physical and virtual mode calls. This seems to be a documentation + * bug rather than firmware bug. In fact, it does only support physical mode. + * So now the code reflects this fact and the pal_version() has been updated + * accordingly. + */ + if (ia64_pal_version(&min_ver, &cur_ver) != 0) return 0; p += sprintf(p, "PAL_vendor : 0x%02x (min=0x%02x)\n" - "PAL_A : %02x.%02x (min=%02x.%02x)\n" - "PAL_B : %02x.%02x (min=%02x.%02x)\n", - cur_ver.pal_version_s.pv_pal_vendor, - min_ver.pal_version_s.pv_pal_vendor, - cur_ver.pal_version_s.pv_pal_a_model, - cur_ver.pal_version_s.pv_pal_a_rev, - min_ver.pal_version_s.pv_pal_a_model, - min_ver.pal_version_s.pv_pal_a_rev, - cur_ver.pal_version_s.pv_pal_b_model, - cur_ver.pal_version_s.pv_pal_b_rev, - min_ver.pal_version_s.pv_pal_b_model, - min_ver.pal_version_s.pv_pal_b_rev); + "PAL_A : %x.%x.%x (min=%x.%x.%x)\n" + "PAL_B : %x.%x.%x (min=%x.%x.%x)\n", + cur_ver.pal_version_s.pv_pal_vendor, min_ver.pal_version_s.pv_pal_vendor, + + cur_ver.pal_version_s.pv_pal_a_model>>4, + cur_ver.pal_version_s.pv_pal_a_model&0xf, cur_ver.pal_version_s.pv_pal_a_rev, + min_ver.pal_version_s.pv_pal_a_model>>4, + min_ver.pal_version_s.pv_pal_a_model&0xf, min_ver.pal_version_s.pv_pal_a_rev, + + cur_ver.pal_version_s.pv_pal_b_model>>4, + cur_ver.pal_version_s.pv_pal_b_model&0xf, cur_ver.pal_version_s.pv_pal_b_rev, + min_ver.pal_version_s.pv_pal_b_model>>4, + min_ver.pal_version_s.pv_pal_b_model&0xf, min_ver.pal_version_s.pv_pal_b_rev); return p - page; } @@ -952,9 +959,9 @@ remove_palinfo_proc_entries(unsigned int hcpu) } } -#ifdef CONFIG_HOTPLUG_CPU static int palinfo_cpu_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) + unsigned long action, + void *hcpu) { unsigned int hotcpu = (unsigned long)hcpu; @@ -962,9 +969,11 @@ static int palinfo_cpu_callback(struct notifier_block *nfb, case CPU_ONLINE: create_palinfo_proc_entries(hotcpu); break; +#ifdef CONFIG_HOTPLUG_CPU case CPU_DEAD: remove_palinfo_proc_entries(hotcpu); break; +#endif } return NOTIFY_OK; } @@ -974,7 +983,6 @@ static struct notifier_block palinfo_cpu_notifier = .notifier_call = palinfo_cpu_callback, .priority = 0, }; -#endif static int __init palinfo_init(void) @@ -990,7 +998,7 @@ palinfo_init(void) } /* Register for future delivery via notify registration */ - register_hotcpu_notifier(&palinfo_cpu_notifier); + register_cpu_notifier(&palinfo_cpu_notifier); return 0; } @@ -1013,7 +1021,7 @@ palinfo_exit(void) /* * Unregister from cpu notifier callbacks */ - unregister_hotcpu_notifier(&palinfo_cpu_notifier); + unregister_cpu_notifier(&palinfo_cpu_notifier); } module_init(palinfo_init); diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index 6f221688c..bc11bb096 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c @@ -184,73 +184,6 @@ patch_brl_fsys_bubble_down (unsigned long start, unsigned long end) ia64_srlz_i(); } -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -extern char __start_gate_running_on_xen_patchlist[]; -extern char __end_gate_running_on_xen_patchlist[]; - -void __init -patch_running_on_xen(unsigned long start, unsigned long end) -{ - extern int running_on_xen; - s32 *offp = (s32 *)start; - u64 ip; - - while (offp < (s32 *)end) { - ip = (u64)ia64_imva((char *)offp + *offp); - ia64_patch_imm64(ip, (u64)&running_on_xen); - ia64_fc((void *)ip); - ++offp; - } - ia64_sync_i(); - ia64_srlz_i(); -} - -static void __init -patch_brl_symaddr(unsigned long start, unsigned long end, - unsigned long symaddr) -{ - s32 *offp = (s32 *)start; - u64 ip; - - while (offp < (s32 *)end) { - ip = (u64)offp + *offp; - ia64_patch_imm60((u64)ia64_imva((void *)ip), - (u64)(symaddr - (ip & -16)) / 16); - ia64_fc((void *)ip); - ++offp; - } - ia64_sync_i(); - ia64_srlz_i(); -} - -#define EXTERN_PATCHLIST(name) \ - extern char __start_gate_brl_##name##_patchlist[]; \ - extern char __end_gate_brl_##name##_patchlist[]; \ - extern char name[] - -#define PATCH_BRL_SYMADDR(name) \ - patch_brl_symaddr((unsigned long)__start_gate_brl_##name##_patchlist, \ - (unsigned long)__end_gate_brl_##name##_patchlist, \ - (unsigned long)name) - -static void __init -patch_brl_in_vdso(void) -{ - EXTERN_PATCHLIST(xen_rsm_be_i); - EXTERN_PATCHLIST(xen_get_psr); - EXTERN_PATCHLIST(xen_ssm_i_0); - EXTERN_PATCHLIST(xen_ssm_i_1); - - PATCH_BRL_SYMADDR(xen_rsm_be_i); - PATCH_BRL_SYMADDR(xen_get_psr); - PATCH_BRL_SYMADDR(xen_ssm_i_0); - PATCH_BRL_SYMADDR(xen_ssm_i_1); -} -#else -#define patch_running_on_xen(start, end) do { } while (0) -#define patch_brl_in_vdso() do { } while (0) -#endif - void __init ia64_patch_gate (void) { @@ -259,10 +192,6 @@ ia64_patch_gate (void) patch_fsyscall_table(START(fsyscall), END(fsyscall)); patch_brl_fsys_bubble_down(START(brl_fsys_bubble_down), END(brl_fsys_bubble_down)); -#ifdef CONFIG_XEN - patch_running_on_xen(START(running_on_xen), END(running_on_xen)); - patch_brl_in_vdso(); -#endif ia64_patch_vtop(START(vtop), END(vtop)); ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); } diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f6284f417..249b590c7 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -19,6 +19,7 @@ * http://www.hpl.hp.com/research/linux/perfmon */ +#include #include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include #include @@ -532,6 +534,7 @@ static ctl_table pfm_sysctl_root[] = { static struct ctl_table_header *pfm_sysctl_header; static int pfm_context_unload(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs); +static int pfm_flush(struct file *filp); #define pfm_get_cpu_var(v) __ia64_per_cpu_var(v) #define pfm_get_cpu_data(a,b) per_cpu(a, b) @@ -594,11 +597,10 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, } -static int -pfmfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block * +pfmfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return get_sb_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC, mnt); + return get_sb_pseudo(fs_type, "pfm:", NULL, PFMFS_MAGIC); } static struct file_system_type pfm_fs_type = { @@ -1773,7 +1775,7 @@ pfm_syswide_cleanup_other_cpu(pfm_context_t *ctx) * When caller is self-monitoring, the context is unloaded. */ static int -pfm_flush(struct file *filp, fl_owner_t id) +pfm_flush(struct file *filp) { pfm_context_t *ctx; struct task_struct *task; @@ -4937,15 +4939,13 @@ abort_locked: if (likely(ctx)) { DPRINT(("context unlocked\n")); UNPROTECT_CTX(ctx, flags); + fput(file); } /* copy argument back to user, if needed */ if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; error_args: - if (file) - fput(file); - kfree(args_k); DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); @@ -6167,7 +6167,7 @@ pfm_load_regs (struct task_struct *task) /* * will replay the PMU interrupt */ - if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); + if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; } @@ -6307,7 +6307,7 @@ pfm_load_regs (struct task_struct *task) /* * will replay the PMU interrupt */ - if (need_irq_resend) ia64_resend_irq(IA64_PERFMON_VECTOR); + if (need_irq_resend) hw_resend_irq(NULL, IA64_PERFMON_VECTOR); pfm_stats[smp_processor_id()].pfm_replay_ovfl_intr_count++; } @@ -6442,7 +6442,7 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) static struct irqaction perfmon_irqaction = { .handler = pfm_interrupt_handler, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "perfmon" }; diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c index ff80eab83..344941db0 100644 --- a/arch/ia64/kernel/perfmon_default_smpl.c +++ b/arch/ia64/kernel/perfmon_default_smpl.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index ea914cc68..355d57970 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -9,6 +9,7 @@ * Add notify_die() hooks. */ #define __KERNEL_SYSCALLS__ /* see */ +#include #include #include @@ -271,9 +272,9 @@ cpu_idle (void) /* endless idle loop with no priority at all */ while (1) { if (can_do_pal_halt) - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); else - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); if (!need_resched()) { void (*idle)(void); diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 004f8b67f..7dc0f7feb 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c @@ -6,6 +6,7 @@ * * Derived from the x86 and Alpha versions. */ +#include #include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c index 642fdc7b9..056f7a6ee 100644 --- a/arch/ia64/kernel/sal.c +++ b/arch/ia64/kernel/sal.c @@ -6,6 +6,7 @@ * Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond */ +#include #include #include @@ -226,7 +227,7 @@ static int sal_cache_flush_drops_interrupts; static void __init check_sal_cache_flush (void) { - unsigned long flags; + unsigned long flags, itv; int cpu; u64 vector; @@ -237,6 +238,9 @@ check_sal_cache_flush (void) * Schedule a timer interrupt, wait until it's reported, and see if * SAL_CACHE_FLUSH drops it. */ + itv = ia64_get_itv(); + BUG_ON((itv & (1 << 16)) == 0); + ia64_set_itv(IA64_TIMER_VECTOR); ia64_set_itm(ia64_get_itc() + 1000); @@ -256,6 +260,7 @@ check_sal_cache_flush (void) ia64_eoi(); } + ia64_set_itv(itv); local_irq_restore(flags); put_cpu(); } diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 9065f0f01..663a186ad 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c @@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = { }; #ifdef CONFIG_HOTPLUG_CPU -static int __devinit +static int salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) { unsigned int i, cpu = (unsigned long)hcpu; @@ -673,7 +673,9 @@ salinfo_init(void) salinfo_timer.function = &salinfo_timeout; add_timer(&salinfo_timer); - register_hotcpu_notifier(&salinfo_cpu_notifier); +#ifdef CONFIG_HOTPLUG_CPU + register_cpu_notifier(&salinfo_cpu_notifier); +#endif return 0; } diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 5c7cd7179..e4dfda1eb 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -22,6 +22,7 @@ * 06/24/99 W.Drummond added boot_cpu_data. * 05/28/05 Z. Menyhart Dynamic stride size for "flush_icache_range()" */ +#include #include #include @@ -35,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -60,10 +61,6 @@ #include #include #include -#ifdef CONFIG_XEN -#include -#endif -#include #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) # error "struct cpuinfo_ia64 too big!" @@ -74,22 +71,6 @@ unsigned long __per_cpu_offset[NR_CPUS]; EXPORT_SYMBOL(__per_cpu_offset); #endif -#ifdef CONFIG_XEN -static int -xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) -{ - HYPERVISOR_shutdown(SHUTDOWN_crash); - /* we're never actually going to get here... */ - return NOTIFY_DONE; -} - -static struct notifier_block xen_panic_block = { - .notifier_call = xen_panic_event, - .next = NULL, - .priority = 0 /* try to go last */ -}; -#endif - extern void ia64_setup_printk_clock(void); DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); @@ -196,33 +177,15 @@ filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) return 0; } -static int __init -rsvd_region_cmp(struct rsvd_region *lhs, struct rsvd_region *rhs) -{ - if (lhs->start > rhs->start) - return 1; - if (lhs->start < rhs->start) - return -1; - - if (lhs->end > rhs->end) - return 1; - if (lhs->end < rhs->end) - return -1; - - return 0; -} - static void __init sort_regions (struct rsvd_region *rsvd_region, int max) { - int num = max; int j; /* simple bubble sorting */ while (max--) { for (j = 0; j < max; ++j) { - if (rsvd_region_cmp(&rsvd_region[j], - &rsvd_region[j + 1]) > 0) { + if (rsvd_region[j].start > rsvd_region[j+1].start) { struct rsvd_region tmp; tmp = rsvd_region[j]; rsvd_region[j] = rsvd_region[j + 1]; @@ -230,36 +193,6 @@ sort_regions (struct rsvd_region *rsvd_region, int max) } } } - - for (j = 0; j < num - 1; j++) { - int k; - unsigned long start = rsvd_region[j].start; - unsigned long end = rsvd_region[j].end; - int collapsed; - - for (k = j + 1; k < num; k++) { - BUG_ON(start > rsvd_region[k].start); - if (end < rsvd_region[k].start) { - k--; - break; - } - end = max(end, rsvd_region[k].end); - } - if (k == num) - k--; - rsvd_region[j].end = end; - collapsed = k - j; - num -= collapsed; - for (k = j + 1; k < num; k++) { - rsvd_region[k] = rsvd_region[k + collapsed]; - } - } - - num_rsvd_regions = num; - for (j = 0; j < num; j++) { - printk("rsvd_region[%d]: [0x%016lx, 0x%06lx)\n", - j, rsvd_region[j].start, rsvd_region[j].end); - } } /* @@ -310,14 +243,6 @@ reserve_memory (void) rsvd_region[n].end = (unsigned long) ia64_imva(_end); n++; -#ifdef CONFIG_XEN - if (is_running_on_xen()) { - rsvd_region[n].start = (unsigned long)__va((HYPERVISOR_shared_info->arch.start_info_pfn << PAGE_SHIFT)); - rsvd_region[n].end = rsvd_region[n].start + PAGE_SIZE; - n++; - } -#endif - #ifdef CONFIG_BLK_DEV_INITRD if (ia64_boot_param->initrd_start) { rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start); @@ -335,7 +260,6 @@ reserve_memory (void) n++; num_rsvd_regions = n; - BUG_ON(IA64_MAX_RSVD_REGIONS + 1 < n); sort_regions(rsvd_region, num_rsvd_regions); } @@ -409,16 +333,6 @@ early_console_setup (char *cmdline) { int earlycons = 0; -#ifdef CONFIG_XEN -#ifndef CONFIG_IA64_HP_SIM - if (is_running_on_xen()) { - extern struct console hpsim_cons; - hpsim_cons.flags |= CON_BOOT; - register_console(&hpsim_cons); - earlycons++; - } -#endif -#endif #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE { extern int sn_serial_console_early_setup(void); @@ -488,14 +402,6 @@ setup_arch (char **cmdline_p) { unw_init(); -#ifdef CONFIG_XEN - if (is_running_on_xen()) { - setup_xen_features(); - /* Register a call for panic conditions. */ - atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block); - } -#endif - ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); *cmdline_p = __va(ia64_boot_param->command_line); @@ -572,23 +478,6 @@ setup_arch (char **cmdline_p) conswitchp = &vga_con; # endif } -#ifdef CONFIG_XEN - if (is_running_on_xen()) { - shared_info_t *s = HYPERVISOR_shared_info; - - xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT); - - printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld " - "flags=0x%x\n", s->arch.start_info_pfn, - xen_start_info->nr_pages, xen_start_info->flags); - - if (!is_initial_xendomain()) { -#if !defined(CONFIG_VT) || !defined(CONFIG_DUMMY_CONSOLE) - conswitchp = NULL; -#endif - } - } -#endif #endif /* enable IA-64 Machine Check Abort Handling unless disabled */ @@ -597,9 +486,6 @@ setup_arch (char **cmdline_p) platform_setup(cmdline_p); paging_init(); -#ifdef CONFIG_XEN - contiguous_bitmap_init(max_pfn); -#endif } /* @@ -984,15 +870,6 @@ cpu_init (void) /* size of physical stacked register partition plus 8 bytes: */ __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; platform_cpu_init(); - -#ifdef CONFIG_XEN - /* Need to be moved into platform_cpu_init later */ - if (is_running_on_xen()) { - extern void xen_smp_intr_init(void); - xen_smp_intr_init(); - } -#endif - pm_idle = default_idle; } diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 77f8b49c7..1d7903ee2 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c @@ -7,6 +7,7 @@ * Derived from i386 and Alpha versions. */ +#include #include #include #include diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 6203ed4ec..44e954787 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c @@ -21,6 +21,7 @@ * 05/01/30 Suresh Siddha * Setup cpu_sibling_map and cpu_core_map */ +#include #include #include @@ -124,7 +125,7 @@ extern void __devinit calibrate_delay (void); extern void start_ap (void); extern unsigned long ia64_iobase; -struct task_struct *task_for_booting_cpu; +task_t *task_for_booting_cpu; /* * State for each CPU @@ -676,16 +677,16 @@ int migrate_platform_irqs(unsigned int cpu) new_cpei_cpu = any_online_cpu(cpu_online_map); mask = cpumask_of_cpu(new_cpei_cpu); set_cpei_target_cpu(new_cpei_cpu); - desc = irq_desc + ia64_cpe_irq; + desc = irq_descp(ia64_cpe_irq); /* * Switch for now, immediatly, we need to do fake intr * as other interrupts, but need to study CPEI behaviour with * polling before making changes. */ if (desc) { - desc->chip->disable(ia64_cpe_irq); - desc->chip->set_affinity(ia64_cpe_irq, mask); - desc->chip->enable(ia64_cpe_irq); + desc->handler->disable(ia64_cpe_irq); + desc->handler->set_affinity(ia64_cpe_irq, mask); + desc->handler->enable(ia64_cpe_irq); printk ("Re-targetting CPEI to cpu %d\n", new_cpei_cpu); } } diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 9ef62a3fb..3edefc8f6 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c @@ -5,6 +5,7 @@ * Copyright (C) 1999-2000, 2002-2003, 2005 Hewlett-Packard Co * David Mosberger-Tang */ +#include #include #include #include @@ -163,7 +164,7 @@ sys_pipe (void) return retval; } -int ia64_mmap_check(unsigned long addr, unsigned long len, +int ia64_map_check_rgn(unsigned long addr, unsigned long len, unsigned long flags) { unsigned long roff; diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 6928ef0d6..499589040 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -8,6 +8,7 @@ * Copyright (C) 1999-2000 VA Linux Systems * Copyright (C) 1999-2000 Walt Drummond */ +#include #include #include @@ -231,7 +232,7 @@ ia64_init_itm (void) static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "timer" }; diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 5629b45e8..4f3a16b37 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c @@ -13,6 +13,7 @@ * Populate cpu cache entries in sysfs for cpu cache info */ +#include #include #include #include @@ -25,10 +26,19 @@ #include #include +#ifdef CONFIG_NUMA +static struct node *sysfs_nodes; +#endif static struct ia64_cpu *sysfs_cpus; int arch_register_cpu(int num) { + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + parent = &sysfs_nodes[cpu_to_node(num)]; +#endif /* CONFIG_NUMA */ + #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) /* * If CPEI cannot be re-targetted, and this is @@ -36,18 +46,23 @@ int arch_register_cpu(int num) */ if (!can_cpei_retarget() && is_cpu_cpei_target(num)) sysfs_cpus[num].cpu.no_control = 1; - map_cpu_to_node(num, node_cpuid[num].nid); #endif - return register_cpu(&sysfs_cpus[num].cpu, num); + return register_cpu(&sysfs_cpus[num].cpu, num, parent); } #ifdef CONFIG_HOTPLUG_CPU void arch_unregister_cpu(int num) { - unregister_cpu(&sysfs_cpus[num].cpu); - unmap_cpu_from_node(num, cpu_to_node(num)); + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + parent = &sysfs_nodes[node]; +#endif /* CONFIG_NUMA */ + + return unregister_cpu(&sysfs_cpus[num].cpu, parent); } EXPORT_SYMBOL(arch_register_cpu); EXPORT_SYMBOL(arch_unregister_cpu); @@ -59,18 +74,26 @@ static int __init topology_init(void) int i, err = 0; #ifdef CONFIG_NUMA + sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); + if (!sysfs_nodes) { + err = -ENOMEM; + goto out; + } + /* * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */ for_each_online_node(i) { - if ((err = register_one_node(i))) + if ((err = register_node(&sysfs_nodes[i], i, 0))) goto out; } #endif sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); - if (!sysfs_cpus) - panic("kzalloc in topology_init failed - NR_CPUS too big?"); + if (!sysfs_cpus) { + err = -ENOMEM; + goto out; + } for_each_present_cpu(i) { if((err = arch_register_cpu(i))) @@ -143,7 +166,7 @@ static void cache_shared_cpu_map_setup( unsigned int cpu, num_shared = (int) csi.num_shared; do { - for_each_possible_cpu(j) + for_each_cpu(j) if (cpu_data(cpu)->socket_id == cpu_data(j)->socket_id && cpu_data(j)->core_id == csi.log1_cid && cpu_data(j)->thread_id == csi.log1_tid) @@ -403,7 +426,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) * When a cpu is hot-plugged, do a check and initiate * cache kobject if necessary */ -static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, +static int cache_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -421,7 +444,7 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cache_cpu_notifier = +static struct notifier_block cache_cpu_notifier = { .notifier_call = cache_cpu_callback }; @@ -435,7 +458,7 @@ static int __cpuinit cache_sysfs_init(void) (void *)(long)i); } - register_hotcpu_notifier(&cache_cpu_notifier); + register_cpu_notifier(&cache_cpu_notifier); return 0; } diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index fffa9e082..7c1ddc8ac 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -7,6 +7,7 @@ * 05/12/00 grao : added isr in siginfo for SIGFPE */ +#include #include #include #include @@ -117,8 +118,11 @@ die (const char *str, struct pt_regs *regs, long err) die.lock_owner = -1; spin_unlock_irq(&die.lock); - if (panic_on_oops) + if (panic_on_oops) { + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); panic("Fatal exception"); + } do_exit(SIGSEGV); } diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index 4c73a6763..fcd2bad02 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2006 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2001-2005 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 @@ -29,86 +29,68 @@ #include #include +#define DEBUG 0 -extern void __init efi_memmap_walk_uc(efi_freemem_callback_t, void *); +#if DEBUG +#define dprintk printk +#else +#define dprintk(x...) do { } while (0) +#endif -struct uncached_pool { - struct gen_pool *pool; - struct mutex add_chunk_mutex; /* serialize adding a converted chunk */ - int nchunks_added; /* #of converted chunks added to pool */ - atomic_t status; /* smp called function's return status*/ -}; +void __init efi_memmap_walk_uc (efi_freemem_callback_t callback); -#define MAX_CONVERTED_CHUNKS_PER_NODE 2 +#define MAX_UNCACHED_GRANULES 5 +static int allocated_granules; -struct uncached_pool uncached_pools[MAX_NUMNODES]; +struct gen_pool *uncached_pool[MAX_NUMNODES]; static void uncached_ipi_visibility(void *data) { int status; - struct uncached_pool *uc_pool = (struct uncached_pool *)data; status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); if ((status != PAL_VISIBILITY_OK) && (status != PAL_VISIBILITY_OK_REMOTE_NEEDED)) - atomic_inc(&uc_pool->status); + printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on " + "CPU %i\n", status, raw_smp_processor_id()); } static void uncached_ipi_mc_drain(void *data) { int status; - struct uncached_pool *uc_pool = (struct uncached_pool *)data; - status = ia64_pal_mc_drain(); - if (status != PAL_STATUS_SUCCESS) - atomic_inc(&uc_pool->status); + if (status) + printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on " + "CPU %i\n", status, raw_smp_processor_id()); } -/* - * Add a new chunk of uncached memory pages to the specified pool. - * - * @pool: pool to add new chunk of uncached memory to - * @nid: node id of node to allocate memory from, or -1 - * - * This is accomplished by first allocating a granule of cached memory pages - * and then converting them to uncached memory pages. - */ -static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) +static unsigned long +uncached_get_new_chunk(struct gen_pool *poolp) { struct page *page; - int status, i, nchunks_added = uc_pool->nchunks_added; - unsigned long c_addr, uc_addr; + void *tmp; + int status, i; + unsigned long addr, node; - if (mutex_lock_interruptible(&uc_pool->add_chunk_mutex) != 0) - return -1; /* interrupted by a signal */ - - if (uc_pool->nchunks_added > nchunks_added) { - /* someone added a new chunk while we were waiting */ - mutex_unlock(&uc_pool->add_chunk_mutex); + if (allocated_granules >= MAX_UNCACHED_GRANULES) return 0; - } - - if (uc_pool->nchunks_added >= MAX_CONVERTED_CHUNKS_PER_NODE) { - mutex_unlock(&uc_pool->add_chunk_mutex); - return -1; - } - - /* attempt to allocate a granule's worth of cached memory pages */ - page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO, + node = poolp->private; + page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, IA64_GRANULE_SHIFT-PAGE_SHIFT); - if (!page) { - mutex_unlock(&uc_pool->add_chunk_mutex); - return -1; - } - /* convert the memory pages from cached to uncached */ + dprintk(KERN_INFO "get_new_chunk page %p, addr %lx\n", + page, (unsigned long)(page-vmem_map) << PAGE_SHIFT); - c_addr = (unsigned long)page_address(page); - uc_addr = c_addr - PAGE_OFFSET + __IA64_UNCACHED_OFFSET; + /* + * Do magic if no mem on local node! XXX + */ + if (!page) + return 0; + tmp = page_address(page); /* * There's a small race here where it's possible for someone to @@ -118,98 +100,76 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid) for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) SetPageUncached(&page[i]); - flush_tlb_kernel_range(uc_addr, uc_adddr + IA64_GRANULE_SIZE); + flush_tlb_kernel_range(tmp, tmp + IA64_GRANULE_SIZE); status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL); - if (status == PAL_VISIBILITY_OK_REMOTE_NEEDED) { - atomic_set(&uc_pool->status, 0); - status = smp_call_function(uncached_ipi_visibility, uc_pool, - 0, 1); - if (status || atomic_read(&uc_pool->status)) - goto failed; - } else if (status != PAL_VISIBILITY_OK) - goto failed; - preempt_disable(); + dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n", + status, raw_smp_processor_id()); + + if (!status) { + status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1); + if (status) + printk(KERN_WARNING "smp_call_function failed for " + "uncached_ipi_visibility! (%i)\n", status); + } if (ia64_platform_is("sn2")) - sn_flush_all_caches(uc_addr, IA64_GRANULE_SIZE); + sn_flush_all_caches((unsigned long)tmp, IA64_GRANULE_SIZE); else - flush_icache_range(uc_addr, uc_addr + IA64_GRANULE_SIZE); + flush_icache_range((unsigned long)tmp, + (unsigned long)tmp+IA64_GRANULE_SIZE); - /* flush the just introduced uncached translation from the TLB */ - local_flush_tlb_all(); - - preempt_enable(); - - status = ia64_pal_mc_drain(); - if (status != PAL_STATUS_SUCCESS) - goto failed; - atomic_set(&uc_pool->status, 0); - status = smp_call_function(uncached_ipi_mc_drain, uc_pool, 0, 1); - if (status || atomic_read(&uc_pool->status)) - goto failed; - - /* - * The chunk of memory pages has been converted to uncached so now we - * can add it to the pool. - */ - status = gen_pool_add(uc_pool->pool, uc_addr, IA64_GRANULE_SIZE, nid); + ia64_pal_mc_drain(); + status = smp_call_function(uncached_ipi_mc_drain, NULL, 0, 1); if (status) - goto failed; - - uc_pool->nchunks_added++; - mutex_unlock(&uc_pool->add_chunk_mutex); - return 0; + printk(KERN_WARNING "smp_call_function failed for " + "uncached_ipi_mc_drain! (%i)\n", status); - /* failed to convert or add the chunk so give it back to the kernel */ -failed: - for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++) - ClearPageUncached(&page[i]); + addr = (unsigned long)tmp - PAGE_OFFSET + __IA64_UNCACHED_OFFSET; - free_pages(c_addr, IA64_GRANULE_SHIFT-PAGE_SHIFT); - mutex_unlock(&uc_pool->add_chunk_mutex); - return -1; + allocated_granules++; + return addr; } /* * uncached_alloc_page * - * @starting_nid: node id of node to start with, or -1 - * * Allocate 1 uncached page. Allocates on the requested node. If no * uncached pages are available on the requested node, roundrobin starting - * with the next higher node. + * with higher nodes. */ -unsigned long uncached_alloc_page(int starting_nid) +unsigned long +uncached_alloc_page(int nid) { - unsigned long uc_addr; - struct uncached_pool *uc_pool; - int nid; + unsigned long maddr; - if (unlikely(starting_nid >= MAX_NUMNODES)) - return 0; + maddr = gen_pool_alloc(uncached_pool[nid], PAGE_SIZE); - if (starting_nid < 0) - starting_nid = numa_node_id(); - nid = starting_nid; + dprintk(KERN_DEBUG "uncached_alloc_page returns %lx on node %i\n", + maddr, nid); - do { - if (!node_online(nid)) - continue; - uc_pool = &uncached_pools[nid]; - if (uc_pool->pool == NULL) - continue; - do { - uc_addr = gen_pool_alloc(uc_pool->pool, PAGE_SIZE); - if (uc_addr != 0) - return uc_addr; - } while (uncached_add_chunk(uc_pool, nid) == 0); - - } while ((nid = (nid + 1) % MAX_NUMNODES) != starting_nid); + /* + * If no memory is availble on our local node, try the + * remaining nodes in the system. + */ + if (!maddr) { + int i; + + for (i = MAX_NUMNODES - 1; i >= 0; i--) { + if (i == nid || !node_online(i)) + continue; + maddr = gen_pool_alloc(uncached_pool[i], PAGE_SIZE); + dprintk(KERN_DEBUG "uncached_alloc_page alternate search " + "returns %lx on node %i\n", maddr, i); + if (maddr) { + break; + } + } + } - return 0; + return maddr; } EXPORT_SYMBOL(uncached_alloc_page); @@ -217,22 +177,21 @@ EXPORT_SYMBOL(uncached_alloc_page); /* * uncached_free_page * - * @uc_addr: uncached address of page to free - * * Free a single uncached page. */ -void uncached_free_page(unsigned long uc_addr) +void +uncached_free_page(unsigned long maddr) { - int nid = paddr_to_nid(uc_addr - __IA64_UNCACHED_OFFSET); - struct gen_pool *pool = uncached_pools[nid].pool; + int node; - if (unlikely(pool == NULL)) - return; + node = paddr_to_nid(maddr - __IA64_UNCACHED_OFFSET); - if ((uc_addr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) - panic("uncached_free_page invalid address %lx\n", uc_addr); + dprintk(KERN_DEBUG "uncached_free_page(%lx) on node %i\n", maddr, node); - gen_pool_free(pool, uc_addr, PAGE_SIZE); + if ((maddr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET) + panic("uncached_free_page invalid address %lx\n", maddr); + + gen_pool_free(uncached_pool[node], maddr, PAGE_SIZE); } EXPORT_SYMBOL(uncached_free_page); @@ -240,40 +199,43 @@ EXPORT_SYMBOL(uncached_free_page); /* * uncached_build_memmap, * - * @uc_start: uncached starting address of a chunk of uncached memory - * @uc_end: uncached ending address of a chunk of uncached memory - * @arg: ignored, (NULL argument passed in on call to efi_memmap_walk_uc()) - * * Called at boot time to build a map of pages that can be used for * memory special operations. */ -static int __init uncached_build_memmap(unsigned long uc_start, - unsigned long uc_end, void *arg) +static int __init +uncached_build_memmap(unsigned long start, unsigned long end, void *arg) { - int nid = paddr_to_nid(uc_start - __IA64_UNCACHED_OFFSET); - struct gen_pool *pool = uncached_pools[nid].pool; - size_t size = uc_end - uc_start; + long length = end - start; + int node; + + dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); touch_softlockup_watchdog(); + memset((char *)start, 0, length); - if (pool != NULL) { - memset((char *)uc_start, 0, size); - (void) gen_pool_add(pool, uc_start, size, nid); + node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET); + + for (; start < end ; start += PAGE_SIZE) { + dprintk(KERN_INFO "sticking %lx into the pool!\n", start); + gen_pool_free(uncached_pool[node], start, PAGE_SIZE); } + return 0; } -static int __init uncached_init(void) -{ - int nid; +static int __init uncached_init(void) { + int i; - for_each_online_node(nid) { - uncached_pools[nid].pool = gen_pool_create(PAGE_SHIFT, nid); - mutex_init(&uncached_pools[nid].add_chunk_mutex); + for (i = 0; i < MAX_NUMNODES; i++) { + if (!node_online(i)) + continue; + uncached_pool[i] = gen_pool_create(0, IA64_GRANULE_SHIFT, + &uncached_get_new_chunk, i); } - efi_memmap_walk_uc(uncached_build_memmap, NULL); + efi_memmap_walk_uc(uncached_build_memmap); + return 0; } diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 5b0d5f64a..783600fe5 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile index 38fa6e49e..d8536a2c2 100644 --- a/arch/ia64/lib/Makefile +++ b/arch/ia64/lib/Makefile @@ -14,7 +14,7 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o lib-$(CONFIG_PERFMON) += carta_random.o -lib-$(CONFIG_MD_RAID456) += xor.o +lib-$(CONFIG_MD_RAID5) += xor.o AFLAGS___divdi3.o = AFLAGS___udivdi3.o = -DUNSIGNED diff --git a/arch/ia64/lib/clear_page.S b/arch/ia64/lib/clear_page.S index 2d814e7ed..d4987061d 100644 --- a/arch/ia64/lib/clear_page.S +++ b/arch/ia64/lib/clear_page.S @@ -8,6 +8,7 @@ * 2/12/02 kchen Tuned for both Itanium and McKinley * 3/08/02 davidm Some more tweaking */ +#include #include #include diff --git a/arch/ia64/lib/io.c b/arch/ia64/lib/io.c index bcd16f8ad..8949e4409 100644 --- a/arch/ia64/lib/io.c +++ b/arch/ia64/lib/io.c @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/ia64/lib/memcpy_mck.S b/arch/ia64/lib/memcpy_mck.S index ab0f87639..9e534d52b 100644 --- a/arch/ia64/lib/memcpy_mck.S +++ b/arch/ia64/lib/memcpy_mck.S @@ -13,6 +13,7 @@ * Copyright (C) 2002 Intel Corp. * Copyright (C) 2002 Ken Chen */ +#include #include #include diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index e004143ba..84fd1c14c 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c @@ -14,6 +14,7 @@ * Routines used by ia64 machines with contiguous (or virtually contiguous) * memory. */ +#include #include #include #include @@ -27,7 +28,6 @@ #ifdef CONFIG_VIRTUAL_MEM_MAP static unsigned long num_dma_physpages; -static unsigned long max_gap; #endif /** @@ -46,15 +46,9 @@ show_mem (void) printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); i = max_mapnr; - for (i = 0; i < max_mapnr; i++) { - if (!pfn_valid(i)) { -#ifdef CONFIG_VIRTUAL_MEM_MAP - if (max_gap < LARGE_GAP) - continue; - i = vmemmap_find_next_valid_pfn(0, i) - 1; -#endif + while (i-- > 0) { + if (!pfn_valid(i)) continue; - } total++; if (PageReserved(mem_map+i)) reserved++; @@ -241,6 +235,7 @@ paging_init (void) unsigned long zones_size[MAX_NR_ZONES]; #ifdef CONFIG_VIRTUAL_MEM_MAP unsigned long zholes_size[MAX_NR_ZONES]; + unsigned long max_gap; #endif /* initialize mem_map[] */ @@ -272,6 +267,7 @@ paging_init (void) } } + max_gap = 0; efi_memmap_walk(find_largest_hole, (u64 *)&max_gap); if (max_gap < LARGE_GAP) { vmem_map = (struct page *) 0; @@ -282,8 +278,7 @@ paging_init (void) /* allocate virtual_mem_map */ - map_size = PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * - sizeof(struct page)); + map_size = PAGE_ALIGN(max_low_pfn * sizeof(struct page)); vmalloc_end -= map_size; vmem_map = (struct page *) vmalloc_end; efi_memmap_walk(create_mem_map_page_table, NULL); diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index d260bffa0..b6bcc9fa3 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -33,6 +33,7 @@ */ struct early_node_data { struct ia64_node_data *node_data; + pg_data_t *pgdat; unsigned long pernode_addr; unsigned long pernode_size; struct bootmem_data bootmem_data; @@ -45,8 +46,6 @@ struct early_node_data { static struct early_node_data mem_data[MAX_NUMNODES] __initdata; static nodemask_t memory_less_mask __initdata; -static pg_data_t *pgdat_list[MAX_NUMNODES]; - /* * To prevent cache aliasing effects, align per-node structures so that they * start at addresses that are strided by node number. @@ -100,7 +99,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len, * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been * called yet. Note that node 0 will also count all non-existent cpus. */ -static int __meminit early_nr_cpus_node(int node) +static int __init early_nr_cpus_node(int node) { int cpu, n = 0; @@ -115,7 +114,7 @@ static int __meminit early_nr_cpus_node(int node) * compute_pernodesize - compute size of pernode data * @node: the node id. */ -static unsigned long __meminit compute_pernodesize(int node) +static unsigned long __init compute_pernodesize(int node) { unsigned long pernodesize = 0, cpus; @@ -176,13 +175,13 @@ static void __init fill_pernode(int node, unsigned long pernode, pernode += PERCPU_PAGE_SIZE * cpus; pernode += node * L1_CACHE_BYTES; - pgdat_list[node] = __va(pernode); + mem_data[node].pgdat = __va(pernode); pernode += L1_CACHE_ALIGN(sizeof(pg_data_t)); mem_data[node].node_data = __va(pernode); pernode += L1_CACHE_ALIGN(sizeof(struct ia64_node_data)); - pgdat_list[node]->bdata = bdp; + mem_data[node].pgdat->bdata = bdp; pernode += L1_CACHE_ALIGN(sizeof(pg_data_t)); cpu_data = per_cpu_node_setup(cpu_data, node); @@ -269,7 +268,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len, static int __init free_node_bootmem(unsigned long start, unsigned long len, int node) { - free_bootmem_node(pgdat_list[node], start, len); + free_bootmem_node(mem_data[node].pgdat, start, len); return 0; } @@ -288,7 +287,7 @@ static void __init reserve_pernode_space(void) int node; for_each_online_node(node) { - pg_data_t *pdp = pgdat_list[node]; + pg_data_t *pdp = mem_data[node].pgdat; if (node_isset(node, memory_less_mask)) continue; @@ -308,27 +307,6 @@ static void __init reserve_pernode_space(void) } } -static void __meminit scatter_node_data(void) -{ - pg_data_t **dst; - int node; - - /* - * for_each_online_node() can't be used at here. - * node_online_map is not set for hot-added nodes at this time, - * because we are halfway through initialization of the new node's - * structures. If for_each_online_node() is used, a new node's - * pg_data_ptrs will be not initialized. Insted of using it, - * pgdat_list[] is checked. - */ - for_each_node(node) { - if (pgdat_list[node]) { - dst = LOCAL_DATA_ADDR(pgdat_list[node])->pg_data_ptrs; - memcpy(dst, pgdat_list, sizeof(pgdat_list)); - } - } -} - /** * initialize_pernode_data - fixup per-cpu & per-node pointers * @@ -339,10 +317,17 @@ static void __meminit scatter_node_data(void) */ static void __init initialize_pernode_data(void) { + pg_data_t *pgdat_list[MAX_NUMNODES]; int cpu, node; - scatter_node_data(); + for_each_online_node(node) + pgdat_list[node] = mem_data[node].pgdat; + /* Copy the pg_data_t list to each node and init the node field */ + for_each_online_node(node) { + memcpy(mem_data[node].node_data->pg_data_ptrs, pgdat_list, + sizeof(pgdat_list)); + } #ifdef CONFIG_SMP /* Set the node_data pointer for each per-cpu struct */ for (cpu = 0; cpu < NR_CPUS; cpu++) { @@ -387,7 +372,7 @@ static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize) if (bestnode == -1) bestnode = anynode; - ptr = __alloc_bootmem_node(pgdat_list[bestnode], pernodesize, + ptr = __alloc_bootmem_node(mem_data[bestnode].pgdat, pernodesize, PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); return ptr; @@ -491,7 +476,7 @@ void __init find_memory(void) pernodesize = mem_data[node].pernode_size; map = pernode + pernodesize; - init_bootmem_node(pgdat_list[node], + init_bootmem_node(mem_data[node].pgdat, map>>PAGE_SHIFT, bdp->node_boot_start>>PAGE_SHIFT, bdp->node_low_pfn); @@ -534,6 +519,68 @@ void __cpuinit *per_cpu_init(void) } #endif /* CONFIG_SMP */ +#ifdef CONFIG_VIRTUAL_MEM_MAP +static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i) +{ + unsigned long end_address, hole_next_pfn; + unsigned long stop_address; + + end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i]; + end_address = PAGE_ALIGN(end_address); + + stop_address = (unsigned long) &vmem_map[ + pgdat->node_start_pfn + pgdat->node_spanned_pages]; + + do { + pgd_t *pgd; + pud_t *pud; + pmd_t *pmd; + pte_t *pte; + + pgd = pgd_offset_k(end_address); + if (pgd_none(*pgd)) { + end_address += PGDIR_SIZE; + continue; + } + + pud = pud_offset(pgd, end_address); + if (pud_none(*pud)) { + end_address += PUD_SIZE; + continue; + } + + pmd = pmd_offset(pud, end_address); + if (pmd_none(*pmd)) { + end_address += PMD_SIZE; + continue; + } + + pte = pte_offset_kernel(pmd, end_address); +retry_pte: + if (pte_none(*pte)) { + end_address += PAGE_SIZE; + pte++; + if ((end_address < stop_address) && + (end_address != ALIGN(end_address, 1UL << PMD_SHIFT))) + goto retry_pte; + continue; + } + /* Found next valid vmem_map page */ + break; + } while (end_address < stop_address); + + end_address = min(end_address, stop_address); + end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1; + hole_next_pfn = end_address / sizeof(struct page); + return hole_next_pfn - pgdat->node_start_pfn; +} +#else +static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i) +{ + return i + 1; +} +#endif + /** * show_mem - give short summary of memory stats * @@ -563,8 +610,7 @@ void show_mem(void) if (pfn_valid(pgdat->node_start_pfn + i)) page = pfn_to_page(pgdat->node_start_pfn + i); else { - i = vmemmap_find_next_valid_pfn(pgdat->node_id, - i) - 1; + i = find_next_valid_pfn_for_pgdat(pgdat, i) - 1; continue; } if (PageReserved(page)) @@ -690,8 +736,7 @@ void __init paging_init(void) efi_memmap_walk(filter_rsvd_memory, count_node_pages); #ifdef CONFIG_VIRTUAL_MEM_MAP - vmalloc_end -= PAGE_ALIGN(ALIGN(max_low_pfn, MAX_ORDER_NR_PAGES) * - sizeof(struct page)); + vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page)); vmem_map = (struct page *) vmalloc_end; efi_memmap_walk(create_mem_map_page_table, NULL); printk("Virtual mem_map starts at 0x%p\n", vmem_map); @@ -741,21 +786,3 @@ void __init paging_init(void) zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); } - -pg_data_t *arch_alloc_nodedata(int nid) -{ - unsigned long size = compute_pernodesize(nid); - - return kzalloc(size, GFP_KERNEL); -} - -void arch_free_nodedata(pg_data_t *pgdat) -{ - kfree(pgdat); -} - -void arch_refresh_nodedata(int update_node, pg_data_t *update_pgdat) -{ - pgdat_list[update_node] = update_pgdat; - scatter_node_data(); -} diff --git a/arch/ia64/mm/extable.c b/arch/ia64/mm/extable.c index 71c50dd8f..6d259e34f 100644 --- a/arch/ia64/mm/extable.c +++ b/arch/ia64/mm/extable.c @@ -5,6 +5,7 @@ * David Mosberger-Tang */ +#include #include #include diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 82d978a35..08de59834 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c @@ -20,40 +20,6 @@ extern void die (char *, struct pt_regs *, long); -#ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} - -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); -} -#else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - return NOTIFY_DONE; -} -#endif - /* * Return TRUE if ADDRESS points at a page in the kernel's mapped segment * (inside region 5, on ia64) and that page is present. @@ -119,7 +85,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re /* * This is to handle the kprobes on user space access instructions */ - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, code, TRAP_BRKPT, + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, code, TRAP_BRKPT, SIGSEGV) == NOTIFY_STOP) return; diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index eee5c1cfb..8d506710f 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c @@ -8,6 +8,7 @@ * Feb, 2004: dynamic hugetlb page size via boot parameter */ +#include #include #include #include diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 4eb2f59b8..95f320932 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -4,6 +4,7 @@ * Copyright (C) 1998-2003 Hewlett-Packard Co * David Mosberger-Tang */ +#include #include #include @@ -422,61 +423,6 @@ ia64_mmu_init (void *my_cpu_data) } #ifdef CONFIG_VIRTUAL_MEM_MAP -int vmemmap_find_next_valid_pfn(int node, int i) -{ - unsigned long end_address, hole_next_pfn; - unsigned long stop_address; - pg_data_t *pgdat = NODE_DATA(node); - - end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i]; - end_address = PAGE_ALIGN(end_address); - - stop_address = (unsigned long) &vmem_map[ - pgdat->node_start_pfn + pgdat->node_spanned_pages]; - - do { - pgd_t *pgd; - pud_t *pud; - pmd_t *pmd; - pte_t *pte; - - pgd = pgd_offset_k(end_address); - if (pgd_none(*pgd)) { - end_address += PGDIR_SIZE; - continue; - } - - pud = pud_offset(pgd, end_address); - if (pud_none(*pud)) { - end_address += PUD_SIZE; - continue; - } - - pmd = pmd_offset(pud, end_address); - if (pmd_none(*pmd)) { - end_address += PMD_SIZE; - continue; - } - - pte = pte_offset_kernel(pmd, end_address); -retry_pte: - if (pte_none(*pte)) { - end_address += PAGE_SIZE; - pte++; - if ((end_address < stop_address) && - (end_address != ALIGN(end_address, 1UL << PMD_SHIFT))) - goto retry_pte; - continue; - } - /* Found next valid vmem_map page */ - break; - } while (end_address < stop_address); - - end_address = min(end_address, stop_address); - end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1; - hole_next_pfn = end_address / sizeof(struct page); - return hole_next_pfn - pgdat->node_start_pfn; -} int __init create_mem_map_page_table (u64 start, u64 end, void *arg) @@ -713,7 +659,7 @@ void online_page(struct page *page) num_physpages++; } -int arch_add_memory(int nid, u64 start, u64 size) +int add_memory(u64 start, u64 size) { pg_data_t *pgdat; struct zone *zone; @@ -721,7 +667,7 @@ int arch_add_memory(int nid, u64 start, u64 size) unsigned long nr_pages = size >> PAGE_SHIFT; int ret; - pgdat = NODE_DATA(nid); + pgdat = NODE_DATA(0); zone = pgdat->node_zones + ZONE_NORMAL; ret = __add_pages(zone, start_pfn, nr_pages); @@ -737,5 +683,4 @@ int remove_memory(u64 start, u64 size) { return -EINVAL; } -EXPORT_SYMBOL_GPL(remove_memory); #endif diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c index 0c08ce109..643ccc696 100644 --- a/arch/ia64/mm/ioremap.c +++ b/arch/ia64/mm/ioremap.c @@ -11,43 +11,26 @@ #include #include #include -#include static inline void __iomem * __ioremap (unsigned long offset, unsigned long size) { -#ifdef CONFIG_XEN - offset = HYPERVISOR_ioremap(offset, size); -#endif return (void __iomem *) (__IA64_UNCACHED_OFFSET | offset); } void __iomem * ioremap (unsigned long offset, unsigned long size) { - u64 attr; - unsigned long gran_base, gran_size; + if (efi_mem_attribute_range(offset, size, EFI_MEMORY_WB)) + return phys_to_virt(offset); - /* - * For things in kern_memmap, we must use the same attribute - * as the rest of the kernel. For more details, see - * Documentation/ia64/aliasing.txt. - */ - attr = kern_mem_attribute(offset, size); - if (attr & EFI_MEMORY_WB) - return (void __iomem *) phys_to_virt(offset); - else if (attr & EFI_MEMORY_UC) + if (efi_mem_attribute_range(offset, size, EFI_MEMORY_UC)) return __ioremap(offset, size); /* - * Some chipsets don't support UC access to memory. If - * WB is supported for the whole granule, we prefer that. + * Someday this should check ACPI resources so we + * can do the right thing for hot-plugged regions. */ - gran_base = GRANULEROUNDDOWN(offset); - gran_size = GRANULEROUNDUP(offset + size) - gran_base; - if (efi_mem_attribute(gran_base, gran_size) & EFI_MEMORY_WB) - return (void __iomem *) phys_to_virt(offset); - return __ioremap(offset, size); } EXPORT_SYMBOL(ioremap); @@ -55,9 +38,6 @@ EXPORT_SYMBOL(ioremap); void __iomem * ioremap_nocache (unsigned long offset, unsigned long size) { - if (kern_mem_attribute(offset, size) & EFI_MEMORY_WB) - return NULL; - return __ioremap(offset, size); } EXPORT_SYMBOL(ioremap_nocache); diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c index 64e4c21f3..4e5c8b36a 100644 --- a/arch/ia64/mm/numa.c +++ b/arch/ia64/mm/numa.c @@ -10,6 +10,7 @@ * 2002/08/07 Erich Focht */ +#include #include #include #include diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index ffad76244..4dbbca0b5 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c @@ -11,6 +11,7 @@ * Rohit Seth * Ken Chen */ +#include #include #include #include diff --git a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c index bc41dd32f..b7975a469 100644 --- a/arch/ia64/oprofile/perfmon.c +++ b/arch/ia64/oprofile/perfmon.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 60b45e79f..ab829a22f 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -10,6 +10,7 @@ * * Note: Above list of copyright holders is incomplete... */ +#include #include #include @@ -351,7 +352,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) pxm = acpi_get_pxm(controller->acpi_handle); #ifdef CONFIG_NUMA if (pxm >= 0) - controller->node = pxm_to_node(pxm); + controller->node = pxm_to_nid_map[pxm]; #endif acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, @@ -567,7 +568,7 @@ pcibios_disable_device (struct pci_dev *dev) void pcibios_align_resource (void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { } @@ -601,6 +602,8 @@ pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, * Leave vm_pgoff as-is, the PCI space address is the physical * address on this platform. */ + vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO); + if (write_combine && efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start)) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); @@ -642,30 +645,18 @@ char *ia64_pci_get_legacy_mem(struct pci_bus *bus) int pci_mmap_legacy_page_range(struct pci_bus *bus, struct vm_area_struct *vma) { - unsigned long size = vma->vm_end - vma->vm_start; - pgprot_t prot; char *addr; - /* - * Avoid attribute aliasing. See Documentation/ia64/aliasing.txt - * for more details. - */ - if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) - return -EINVAL; - prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size, - vma->vm_page_prot); - if (pgprot_val(prot) != pgprot_val(pgprot_noncached(vma->vm_page_prot))) - return -EINVAL; - addr = pci_get_legacy_mem(bus); if (IS_ERR(addr)) return PTR_ERR(addr); vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT; - vma->vm_page_prot = prot; + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + vma->vm_flags |= (VM_SHM | VM_RESERVED | VM_IO); if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - size, vma->vm_page_prot)) + vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; return 0; diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index c55f487b6..e952ef4f6 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c @@ -6,6 +6,7 @@ * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. */ +#include #include #include #include @@ -382,13 +383,14 @@ bte_result_t bte_unaligned_copy(u64 src, u64 dest, u64 len, u64 mode) * bcopy to the destination. */ + /* Add the leader from source */ + headBteLen = len + (src & L1_CACHE_MASK); + /* Add the trailing bytes from footer. */ + headBteLen += L1_CACHE_BYTES - (headBteLen & L1_CACHE_MASK); + headBteSource = src & ~L1_CACHE_MASK; headBcopySrcOffset = src & L1_CACHE_MASK; headBcopyDest = dest; headBcopyLen = len; - - headBteSource = src - headBcopySrcOffset; - /* Add the leading and trailing bytes from source */ - headBteLen = L1_CACHE_ALIGN(len + headBcopySrcOffset); } if (headBcopyLen > 0) { diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c index 96fb81e63..56ab6bae0 100644 --- a/arch/ia64/sn/kernel/huberror.c +++ b/arch/ia64/sn/kernel/huberror.c @@ -178,7 +178,7 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info) */ void hub_error_init(struct hubdev_info *hubdev_info) { - if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, IRQF_SHARED, + if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, SA_SHIRQ, "SN_hub_error", (void *)hubdev_info)) printk("hub_error_init: Failed to request_irq for 0x%p\n", hubdev_info); @@ -196,7 +196,7 @@ void hub_error_init(struct hubdev_info *hubdev_info) void ice_error_init(struct hubdev_info *hubdev_info) { if (request_irq - (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error", + (SGI_TIO_ERROR, (void *)hub_eint_handler, SA_SHIRQ, "SN_TIO_error", (void *)hubdev_info)) printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", hubdev_info); diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index dc09a6a28..5101ac462 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -58,7 +58,7 @@ static int max_pcibus_number = 255; /* Default highest pci bus number */ */ static dma_addr_t -sn_default_pci_map(struct pci_dev *pdev, unsigned long paddr, size_t size, int type) +sn_default_pci_map(struct pci_dev *pdev, unsigned long paddr, size_t size) { return 0; } @@ -457,6 +457,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev) pcidev_info->pdi_sn_irq_info = NULL; kfree(sn_irq_info); } + + /* + * MSI currently not supported on altix. Remove this when + * the MSI abstraction patches are integrated into the kernel + * (sometime after 2.6.16 releases) + */ + dev->no_msi = 1; } /* diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 7bb6ad188..c265e02f5 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c @@ -26,11 +26,11 @@ static void unregister_intr_pda(struct sn_irq_info *sn_irq_info); int sn_force_interrupt_flag = 1; extern int sn_ioif_inited; -struct list_head **sn_irq_lh; -static DEFINE_SPINLOCK(sn_irq_info_lock); /* non-IRQ lock */ +static struct list_head **sn_irq_lh; +static spinlock_t sn_irq_info_lock = SPIN_LOCK_UNLOCKED; /* non-IRQ lock */ -u64 sn_intr_alloc(nasid_t local_nasid, int local_widget, - struct sn_irq_info *sn_irq_info, +static inline u64 sn_intr_alloc(nasid_t local_nasid, int local_widget, + u64 sn_irq_info, int req_irq, nasid_t req_nasid, int req_slice) { @@ -40,13 +40,12 @@ u64 sn_intr_alloc(nasid_t local_nasid, int local_widget, SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_IOIF_INTERRUPT, (u64) SAL_INTR_ALLOC, (u64) local_nasid, - (u64) local_widget, __pa(sn_irq_info), (u64) req_irq, + (u64) local_widget, (u64) sn_irq_info, (u64) req_irq, (u64) req_nasid, (u64) req_slice); - return ret_stuff.status; } -void sn_intr_free(nasid_t local_nasid, int local_widget, +static inline void sn_intr_free(nasid_t local_nasid, int local_widget, struct sn_irq_info *sn_irq_info) { struct ia64_sal_retval ret_stuff; @@ -113,91 +112,73 @@ static void sn_end_irq(unsigned int irq) static void sn_irq_info_free(struct rcu_head *head); -struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info, - nasid_t nasid, int slice) +static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask) { - int vector; - int cpuphys; - int64_t bridge; - int local_widget, status; - nasid_t local_nasid; - struct sn_irq_info *new_irq_info; - struct sn_pcibus_provider *pci_provider; - - new_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_ATOMIC); - if (new_irq_info == NULL) - return NULL; - - memcpy(new_irq_info, sn_irq_info, sizeof(struct sn_irq_info)); + struct sn_irq_info *sn_irq_info, *sn_irq_info_safe; + int cpuid, cpuphys; - bridge = (u64) new_irq_info->irq_bridge; - if (!bridge) { - kfree(new_irq_info); - return NULL; /* irq is not a device interrupt */ - } + cpuid = first_cpu(mask); + cpuphys = cpu_physical_id(cpuid); - local_nasid = NASID_GET(bridge); + list_for_each_entry_safe(sn_irq_info, sn_irq_info_safe, + sn_irq_lh[irq], list) { + u64 bridge; + int local_widget, status; + nasid_t local_nasid; + struct sn_irq_info *new_irq_info; + struct sn_pcibus_provider *pci_provider; + + new_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_ATOMIC); + if (new_irq_info == NULL) + break; + memcpy(new_irq_info, sn_irq_info, sizeof(struct sn_irq_info)); + + bridge = (u64) new_irq_info->irq_bridge; + if (!bridge) { + kfree(new_irq_info); + break; /* irq is not a device interrupt */ + } - if (local_nasid & 1) - local_widget = TIO_SWIN_WIDGETNUM(bridge); - else - local_widget = SWIN_WIDGETNUM(bridge); + local_nasid = NASID_GET(bridge); - vector = sn_irq_info->irq_irq; - /* Free the old PROM new_irq_info structure */ - sn_intr_free(local_nasid, local_widget, new_irq_info); - /* Update kernels new_irq_info with new target info */ - unregister_intr_pda(new_irq_info); + if (local_nasid & 1) + local_widget = TIO_SWIN_WIDGETNUM(bridge); + else + local_widget = SWIN_WIDGETNUM(bridge); - /* allocate a new PROM new_irq_info struct */ - status = sn_intr_alloc(local_nasid, local_widget, - new_irq_info, vector, - nasid, slice); + /* Free the old PROM new_irq_info structure */ + sn_intr_free(local_nasid, local_widget, new_irq_info); + /* Update kernels new_irq_info with new target info */ + unregister_intr_pda(new_irq_info); - /* SAL call failed */ - if (status) { - kfree(new_irq_info); - return NULL; - } + /* allocate a new PROM new_irq_info struct */ + status = sn_intr_alloc(local_nasid, local_widget, + __pa(new_irq_info), irq, + cpuid_to_nasid(cpuid), + cpuid_to_slice(cpuid)); - cpuphys = nasid_slice_to_cpuid(nasid, slice); - new_irq_info->irq_cpuid = cpuphys; - register_intr_pda(new_irq_info); + /* SAL call failed */ + if (status) { + kfree(new_irq_info); + break; + } - pci_provider = sn_pci_provider[new_irq_info->irq_bridge_type]; + new_irq_info->irq_cpuid = cpuid; + register_intr_pda(new_irq_info); - /* - * If this represents a line interrupt, target it. If it's - * an msi (irq_int_bit < 0), it's already targeted. - */ - if (new_irq_info->irq_int_bit >= 0 && - pci_provider && pci_provider->target_interrupt) - (pci_provider->target_interrupt)(new_irq_info); + pci_provider = sn_pci_provider[new_irq_info->irq_bridge_type]; + if (pci_provider && pci_provider->target_interrupt) + (pci_provider->target_interrupt)(new_irq_info); - spin_lock(&sn_irq_info_lock); - list_replace_rcu(&sn_irq_info->list, &new_irq_info->list); - spin_unlock(&sn_irq_info_lock); - call_rcu(&sn_irq_info->rcu, sn_irq_info_free); + spin_lock(&sn_irq_info_lock); + list_replace_rcu(&sn_irq_info->list, &new_irq_info->list); + spin_unlock(&sn_irq_info_lock); + call_rcu(&sn_irq_info->rcu, sn_irq_info_free); #ifdef CONFIG_SMP - set_irq_affinity_info((vector & 0xff), cpuphys, 0); + set_irq_affinity_info((irq & 0xff), cpuphys, 0); #endif - - return new_irq_info; -} - -static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask) -{ - struct sn_irq_info *sn_irq_info, *sn_irq_info_safe; - nasid_t nasid; - int slice; - - nasid = cpuid_to_nasid(first_cpu(mask)); - slice = cpuid_to_slice(first_cpu(mask)); - - list_for_each_entry_safe(sn_irq_info, sn_irq_info_safe, - sn_irq_lh[irq], list) - (void)sn_retarget_vector(sn_irq_info, nasid, slice); + } } struct hw_interrupt_type irq_type_sn = { @@ -221,12 +202,9 @@ void sn_irq_init(void) int i; irq_desc_t *base_desc = irq_desc; - ia64_first_device_vector = IA64_SN2_FIRST_DEVICE_VECTOR; - ia64_last_device_vector = IA64_SN2_LAST_DEVICE_VECTOR; - for (i = 0; i < NR_IRQS; i++) { - if (base_desc[i].chip == &no_irq_type) { - base_desc[i].chip = &irq_type_sn; + if (base_desc[i].handler == &no_irq_type) { + base_desc[i].handler = &irq_type_sn; } } } @@ -307,7 +285,6 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) /* link it into the sn_irq[irq] list */ spin_lock(&sn_irq_info_lock); list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]); - reserve_irq_vector(sn_irq_info->irq_irq); spin_unlock(&sn_irq_info_lock); register_intr_pda(sn_irq_info); @@ -333,11 +310,8 @@ void sn_irq_unfixup(struct pci_dev *pci_dev) spin_lock(&sn_irq_info_lock); list_del_rcu(&sn_irq_info->list); spin_unlock(&sn_irq_info_lock); - if (list_empty(sn_irq_lh[sn_irq_info->irq_irq])) - free_irq_vector(sn_irq_info->irq_irq); call_rcu(&sn_irq_info->rcu, sn_irq_info_free); pci_dev_put(pci_dev); - } static inline void diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index 5f2dcba7f..30988dfbd 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c @@ -6,13 +6,14 @@ * Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All rights reserved. */ +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -138,7 +139,7 @@ static int __init pxm_to_nasid(int pxm) int i; int nid; - nid = pxm_to_node(pxm); + nid = pxm_to_nid_map[pxm]; for (i = 0; i < num_node_memblks; i++) { if (node_memblk[i].nid == nid) { return NASID_GET(node_memblk[i].start_paddr); @@ -457,7 +458,7 @@ void __init sn_setup(char **cmdline_p) * support here so we don't have to listen to failed keyboard probe * messages. */ - if (is_shub1() && version <= 0x0209 && acpi_kbd_controller_present) { + if (version <= 0x0209 && acpi_kbd_controller_present) { printk(KERN_INFO "Disabling legacy keyboard support as prom " "is too old and doesn't provide FADT\n"); acpi_kbd_controller_present = 0; @@ -565,7 +566,7 @@ static void __init sn_init_pdas(char **cmdline_p) * Also sets up a few fields in the nodepda. Also known as * platform_cpu_init() by the ia64 machvec code. */ -void __cpuinit sn_cpu_init(void) +void __init sn_cpu_init(void) { int cpuid; int cpuphyid; @@ -576,8 +577,7 @@ void __cpuinit sn_cpu_init(void) int i; static int wars_have_been_checked; - cpuid = smp_processor_id(); - if (cpuid == 0 && IS_MEDUSA()) { + if (smp_processor_id() == 0 && IS_MEDUSA()) { if (ia64_sn_is_fake_prom()) sn_prom_type = 2; else @@ -596,12 +596,6 @@ void __cpuinit sn_cpu_init(void) BUG(); sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2; - /* - * Don't check status. The SAL call is not supported on all PROMs - * but a failure is harmless. - */ - (void) ia64_sn_set_cpu_number(cpuid); - /* * The boot cpu makes this call again after platform initialization is * complete. @@ -613,6 +607,7 @@ void __cpuinit sn_cpu_init(void) if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0) break; + cpuid = smp_processor_id(); cpuphyid = get_sapicid(); if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice)) @@ -709,7 +704,7 @@ void __init build_cnode_tables(void) * cnode == node for all C & M bricks. */ for_each_online_node(node) { - nasid = pxm_to_nasid(node_to_pxm(node)); + nasid = pxm_to_nasid(nid_to_pxm_map[node]); sn_cnodeid_to_nasid[node] = nasid; physical_node_map[nasid] = node; } diff --git a/arch/ia64/sn/kernel/sn2/cache.c b/arch/ia64/sn/kernel/sn2/cache.c index 2862cb330..bc3cfa17c 100644 --- a/arch/ia64/sn/kernel/sn2/cache.c +++ b/arch/ia64/sn/kernel/sn2/cache.c @@ -3,12 +3,11 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2001-2003, 2006 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2001-2003 Silicon Graphics, Inc. All rights reserved. * */ #include #include -#include /** * sn_flush_all_caches - flush a range of address from all caches (incl. L4) @@ -18,24 +17,18 @@ * Flush a range of addresses from all caches including L4. * All addresses fully or partially contained within * @flush_addr to @flush_addr + @bytes are flushed - * from all caches. + * from the all caches. */ void sn_flush_all_caches(long flush_addr, long bytes) { - unsigned long addr = flush_addr; - - /* SHub1 requires a cached address */ - if (is_shub1() && (addr & RGN_BITS) == RGN_BASE(RGN_UNCACHED)) - addr = (addr - RGN_BASE(RGN_UNCACHED)) + RGN_BASE(RGN_KERNEL); - - flush_icache_range(addr, addr + bytes); + flush_icache_range(flush_addr, flush_addr+bytes); /* * The last call may have returned before the caches * were actually flushed, so we call it again to make * sure. */ - flush_icache_range(addr, addr + bytes); + flush_icache_range(flush_addr, flush_addr+bytes); mb(); } EXPORT_SYMBOL(sn_flush_all_caches); diff --git a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c index 4dcce3d0e..6ae276d5d 100644 --- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c +++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c @@ -8,6 +8,7 @@ * Module to export the system's Firmware Interface Tables, including * PROM revision numbers and banners, in /proc */ +#include #include #include #include diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 9a8a29339..739c948dc 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c @@ -51,8 +51,6 @@ static nasid_t sn_hwperf_master_nasid = INVALID_NASID; static int sn_hwperf_init(void); static DECLARE_MUTEX(sn_hwperf_init_mutex); -#define cnode_possible(n) ((n) < num_cnodes) - static int sn_hwperf_enum_objects(int *nobj, struct sn_hwperf_object_info **ret) { int e; @@ -129,14 +127,14 @@ static int sn_hwperf_geoid_to_cnode(char *location) } } - return cnode_possible(cnode) ? cnode : -1; + return node_possible(cnode) ? cnode : -1; } static int sn_hwperf_obj_to_cnode(struct sn_hwperf_object_info * obj) { if (!SN_HWPERF_IS_NODE(obj) && !SN_HWPERF_IS_IONODE(obj)) BUG(); - if (SN_HWPERF_FOREIGN(obj)) + if (!obj->sn_hwp_this_part) return -1; return sn_hwperf_geoid_to_cnode(obj->location); } @@ -201,12 +199,12 @@ static void print_pci_topology(struct seq_file *s) static inline int sn_hwperf_has_cpus(cnodeid_t node) { - return node < MAX_NUMNODES && node_online(node) && nr_cpus_node(node); + return node_online(node) && nr_cpus_node(node); } static inline int sn_hwperf_has_mem(cnodeid_t node) { - return node < MAX_NUMNODES && node_online(node) && NODE_DATA(node)->node_present_pages; + return node_online(node) && NODE_DATA(node)->node_present_pages; } static struct sn_hwperf_object_info * @@ -239,7 +237,7 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb int found_mem = 0; int found_cpu = 0; - if (!cnode_possible(node)) + if (!node_possible(node)) return -EINVAL; if (sn_hwperf_has_cpus(node)) { @@ -444,7 +442,7 @@ static int sn_topology_show(struct seq_file *s, void *d) seq_printf(s, "%s %d %s %s asic %s", slabname, ordinal, obj->location, obj->sn_hwp_this_part ? "local" : "shared", obj->name); - if (ordinal < 0 || (!SN_HWPERF_IS_NODE(obj) && !SN_HWPERF_IS_IONODE(obj))) + if (!SN_HWPERF_IS_NODE(obj) && !SN_HWPERF_IS_IONODE(obj)) seq_putc(s, '\n'); else { cnodeid_t near_mem = -1; @@ -470,24 +468,22 @@ static int sn_topology_show(struct seq_file *s, void *d) /* * CPUs on this node, if any */ - if (!SN_HWPERF_IS_IONODE(obj)) { - cpumask = node_to_cpumask(ordinal); - for_each_online_cpu(i) { - if (cpu_isset(i, cpumask)) { - slice = 'a' + cpuid_to_slice(i); - c = cpu_data(i); - seq_printf(s, "cpu %d %s%c local" - " freq %luMHz, arch ia64", - i, obj->location, slice, - c->proc_freq / 1000000); - for_each_online_cpu(j) { - seq_printf(s, j ? ":%d" : ", dist %d", - node_distance( - cpu_to_node(i), - cpu_to_node(j))); - } - seq_putc(s, '\n'); + cpumask = node_to_cpumask(ordinal); + for_each_online_cpu(i) { + if (cpu_isset(i, cpumask)) { + slice = 'a' + cpuid_to_slice(i); + c = cpu_data(i); + seq_printf(s, "cpu %d %s%c local" + " freq %luMHz, arch ia64", + i, obj->location, slice, + c->proc_freq / 1000000); + for_each_online_cpu(j) { + seq_printf(s, j ? ":%d" : ", dist %d", + node_distance( + cpu_to_node(i), + cpu_to_node(j))); } + seq_putc(s, '\n'); } } } @@ -527,7 +523,7 @@ static int sn_topology_show(struct seq_file *s, void *d) if (obj->sn_hwp_this_part && p->sn_hwp_this_part) /* both ends local to this partition */ seq_puts(s, " local"); - else if (SN_HWPERF_FOREIGN(p)) + else if (!obj->sn_hwp_this_part && !p->sn_hwp_this_part) /* both ends of the link in foreign partiton */ seq_puts(s, " foreign"); else @@ -780,7 +776,7 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg) case SN_HWPERF_GET_NODE_NASID: if (a.sz != sizeof(u64) || - (node = a.arg) < 0 || !cnode_possible(node)) { + (node = a.arg) < 0 || !node_possible(node)) { r = -EINVAL; goto error; } diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index 43ddc2ecc..510026131 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c @@ -5,6 +5,7 @@ * * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. */ +#include #ifdef CONFIG_PROC_FS #include diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 1f3540826..7e8a4d1d9 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c @@ -202,7 +202,7 @@ xpc_setup_infrastructure(struct xpc_partition *part) init_waitqueue_head(&part->channel_mgr_wq); sprintf(part->IPI_owner, "xpc%02d", partid); - ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, IRQF_SHARED, + ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ, part->IPI_owner, (void *) (u64) partid); if (ret != 0) { dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index 740e75a95..6b5d4c44f 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -483,7 +483,7 @@ xpc_activating(void *__partid) partid_t partid = (u64) __partid; struct xpc_partition *part = &xpc_partitions[partid]; unsigned long irq_flags; - struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 }; + struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 }; int ret; diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index 007703c49..e5c6d3c0a 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c @@ -22,6 +22,7 @@ */ +#include #include #include #include diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 7a291a271..b4b84c269 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -113,8 +113,7 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size, * resources. */ - *dma_handle = provider->dma_map_consistent(pdev, phys_addr, size, - SN_DMA_ADDR_PHYS); + *dma_handle = provider->dma_map_consistent(pdev, phys_addr, size); if (!*dma_handle) { printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__); free_pages((unsigned long)cpuaddr, get_order(size)); @@ -177,7 +176,7 @@ dma_addr_t sn_dma_map_single(struct device *dev, void *cpu_addr, size_t size, BUG_ON(dev->bus != &pci_bus_type); phys_addr = __pa(cpu_addr); - dma_addr = provider->dma_map(pdev, phys_addr, size, SN_DMA_ADDR_PHYS); + dma_addr = provider->dma_map(pdev, phys_addr, size); if (!dma_addr) { printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__); return 0; @@ -261,8 +260,7 @@ int sn_dma_map_sg(struct device *dev, struct scatterlist *sg, int nhwentries, for (i = 0; i < nhwentries; i++, sg++) { phys_addr = SG_ENT_PHYS_ADDRESS(sg); sg->dma_address = provider->dma_map(pdev, - phys_addr, sg->length, - SN_DMA_ADDR_PHYS); + phys_addr, sg->length); if (!sg->dma_address) { printk(KERN_ERR "%s: out of ATEs\n", __FUNCTION__); diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c index a86c7b945..9f86bb651 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c @@ -41,7 +41,7 @@ extern int sn_ioif_inited; static dma_addr_t pcibr_dmamap_ate32(struct pcidev_info *info, - u64 paddr, size_t req_size, u64 flags, int dma_flags) + u64 paddr, size_t req_size, u64 flags) { struct pcidev_info *pcidev_info = info->pdi_host_pcidev_info; @@ -81,12 +81,9 @@ pcibr_dmamap_ate32(struct pcidev_info *info, if (IS_PCIX(pcibus_info)) ate_flags &= ~(PCI32_ATE_PREF); - if (SN_DMA_ADDRTYPE(dma_flags == SN_DMA_ADDR_PHYS)) - xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) : - PHYS_TO_TIODMA(paddr); - else - xio_addr = paddr; - + xio_addr = + IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) : + PHYS_TO_TIODMA(paddr); offset = IOPGOFF(xio_addr); ate = ate_flags | (xio_addr - offset); @@ -94,13 +91,6 @@ pcibr_dmamap_ate32(struct pcidev_info *info, if (IS_PIC_SOFT(pcibus_info)) { ate |= (pcibus_info->pbi_hub_xid << PIC_ATE_TARGETID_SHFT); } - - /* - * If we're mapping for MSI, set the MSI bit in the ATE - */ - if (dma_flags & SN_DMA_MSI) - ate |= PCI32_ATE_MSI; - ate_write(pcibus_info, ate_index, ate_count, ate); /* @@ -115,27 +105,20 @@ pcibr_dmamap_ate32(struct pcidev_info *info, if (pcibus_info->pbi_devreg[internal_device] & PCIBR_DEV_SWAP_DIR) ATE_SWAP_ON(pci_addr); - return pci_addr; } static dma_addr_t pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr, - u64 dma_attributes, int dma_flags) + u64 dma_attributes) { struct pcibus_info *pcibus_info = (struct pcibus_info *) ((info->pdi_host_pcidev_info)->pdi_pcibus_info); u64 pci_addr; /* Translate to Crosstalk View of Physical Address */ - if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS) - pci_addr = IS_PIC_SOFT(pcibus_info) ? - PHYS_TO_DMA(paddr) : - PHYS_TO_TIODMA(paddr) | dma_attributes; - else - pci_addr = IS_PIC_SOFT(pcibus_info) ? - paddr : - paddr | dma_attributes; + pci_addr = (IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) : + PHYS_TO_TIODMA(paddr)) | dma_attributes; /* Handle Bus mode */ if (IS_PCIX(pcibus_info)) @@ -147,9 +130,7 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr, ((u64) pcibus_info-> pbi_hub_xid << PIC_PCI64_ATTR_TARG_SHFT); } else - pci_addr |= (dma_flags & SN_DMA_MSI) ? - TIOCP_PCI64_CMDTYPE_MSI : - TIOCP_PCI64_CMDTYPE_MEM; + pci_addr |= TIOCP_PCI64_CMDTYPE_MEM; /* If PCI mode, func zero uses VCHAN0, every other func uses VCHAN1 */ if (!IS_PCIX(pcibus_info) && PCI_FUNC(info->pdi_linux_pcidev->devfn)) @@ -160,7 +141,7 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr, static dma_addr_t pcibr_dmatrans_direct32(struct pcidev_info * info, - u64 paddr, size_t req_size, u64 flags, int dma_flags) + u64 paddr, size_t req_size, u64 flags) { struct pcidev_info *pcidev_info = info->pdi_host_pcidev_info; struct pcibus_info *pcibus_info = (struct pcibus_info *)pcidev_info-> @@ -175,14 +156,8 @@ pcibr_dmatrans_direct32(struct pcidev_info * info, return 0; } - if (dma_flags & SN_DMA_MSI) - return 0; - - if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS) - xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) : - PHYS_TO_TIODMA(paddr); - else - xio_addr = paddr; + xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) : + PHYS_TO_TIODMA(paddr); xio_base = pcibus_info->pbi_dir_xbase; offset = xio_addr - xio_base; @@ -352,7 +327,7 @@ void sn_dma_flush(u64 addr) */ dma_addr_t -pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size, int dma_flags) +pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size) { dma_addr_t dma_handle; struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev); @@ -369,11 +344,11 @@ pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size, int */ dma_handle = pcibr_dmatrans_direct64(pcidev_info, phys_addr, - PCI64_ATTR_PREF, dma_flags); + PCI64_ATTR_PREF); } else { /* Handle 32-63 bit cards via direct mapping */ dma_handle = pcibr_dmatrans_direct32(pcidev_info, phys_addr, - size, 0, dma_flags); + size, 0); if (!dma_handle) { /* * It is a 32 bit card and we cannot do direct mapping, @@ -381,8 +356,7 @@ pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size, int */ dma_handle = pcibr_dmamap_ate32(pcidev_info, phys_addr, - size, PCI32_ATE_PREF, - dma_flags); + size, PCI32_ATE_PREF); } } @@ -391,18 +365,18 @@ pcibr_dma_map(struct pci_dev * hwdev, unsigned long phys_addr, size_t size, int dma_addr_t pcibr_dma_map_consistent(struct pci_dev * hwdev, unsigned long phys_addr, - size_t size, int dma_flags) + size_t size) { dma_addr_t dma_handle; struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(hwdev); if (hwdev->dev.coherent_dma_mask == ~0UL) { dma_handle = pcibr_dmatrans_direct64(pcidev_info, phys_addr, - PCI64_ATTR_BAR, dma_flags); + PCI64_ATTR_BAR); } else { dma_handle = (dma_addr_t) pcibr_dmamap_ate32(pcidev_info, phys_addr, size, - PCI32_ATE_BAR, dma_flags); + PCI32_ATE_BAR); } return dma_handle; diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 838c93c9a..ab1211ef0 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c @@ -139,7 +139,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont * register the bridge's error interrupt handler */ if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler, - IRQF_SHARED, "PCIBR error", (void *)(soft))) { + SA_SHIRQ, "PCIBR error", (void *)(soft))) { printk(KERN_WARNING "pcibr cannot allocate interrupt for error handler\n"); } diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index c36b0f5af..be0176912 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c @@ -515,16 +515,10 @@ tioca_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir) * use the GART mapped mode. */ static u64 -tioca_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) +tioca_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count) { u64 mapaddr; - /* - * Not supported for now ... - */ - if (dma_flags & SN_DMA_MSI) - return 0; - /* * If card is 64 or 48 bit addresable, use a direct mapping. 32 * bit direct is so restrictive w.r.t. where the memory resides that @@ -595,7 +589,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont /* sanity check prom rev */ - if (is_shub1() && sn_sal_rev() < 0x0406) { + if (sn_sal_rev() < 0x0406) { printk (KERN_ERR "%s: SGI prom rev 4.06 or greater required " "for tioca support\n", __FUNCTION__); @@ -646,7 +640,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont if (request_irq(SGI_TIOCA_ERROR, tioca_error_intr_handler, - IRQF_SHARED, "TIOCA error", (void *)tioca_common)) + SA_SHIRQ, "TIOCA error", (void *)tioca_common)) printk(KERN_WARNING "%s: Unable to get irq %d. " "Error interrupts won't be routed for TIOCA bus %d\n", diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index af7171adc..833295624 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (C) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. */ #include @@ -74,7 +74,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr) else mmr_war_offset = 0x158; - readq_relaxed((void __iomem *)(mmr_base + mmr_war_offset)); + readq_relaxed((void *)(mmr_base + mmr_war_offset)); } } @@ -92,8 +92,8 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) if (mmr_offset < 0x45000) { if (mmr_offset == 0x100) - readq_relaxed((void __iomem *)(mmr_base + 0x38)); - readq_relaxed((void __iomem *)(mmr_base + 0xb050)); + readq_relaxed((void *)(mmr_base + 0x38)); + readq_relaxed((void *)(mmr_base + 0xb050)); } } @@ -170,8 +170,7 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) (ATE_PAGE((start)+(len)-1, pagesize) - ATE_PAGE(start, pagesize) + 1) #define ATE_VALID(ate) ((ate) & (1UL << 63)) -#define ATE_MAKE(addr, ps, msi) \ - (((addr) & ~ATE_PAGEMASK(ps)) | (1UL << 63) | ((msi)?(1UL << 62):0)) +#define ATE_MAKE(addr, ps) (((addr) & ~ATE_PAGEMASK(ps)) | (1UL << 63)) /* * Flavors of ate-based mapping supported by tioce_alloc_map() @@ -197,17 +196,15 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) * * 63 - must be 1 to indicate d64 mode to CE hardware * 62 - barrier bit ... controlled with tioce_dma_barrier() - * 61 - msi bit ... specified through dma_flags + * 61 - 0 since this is not an MSI transaction * 60:54 - reserved, MBZ */ static u64 -tioce_dma_d64(unsigned long ct_addr, int dma_flags) +tioce_dma_d64(unsigned long ct_addr) { u64 bus_addr; bus_addr = ct_addr | (1UL << 63); - if (dma_flags & SN_DMA_MSI) - bus_addr |= (1UL << 61); return bus_addr; } @@ -264,7 +261,7 @@ pcidev_to_tioce(struct pci_dev *pdev, struct tioce **base, */ static u64 tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, - u64 ct_addr, int len, int dma_flags) + u64 ct_addr, int len) { int i; int j; @@ -273,7 +270,6 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, int entries; int nates; u64 pagesize; - int msi_capable, msi_wanted; u64 *ate_shadow; u64 *ate_reg; u64 addr; @@ -295,7 +291,6 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, ate_reg = ce_mmr->ce_ure_ate3240; pagesize = ce_kern->ce_ate3240_pagesize; bus_base = TIOCE_M32_MIN; - msi_capable = 1; break; case TIOCE_ATE_M40: first = 0; @@ -304,7 +299,6 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, ate_reg = ce_mmr->ce_ure_ate40; pagesize = MB(64); bus_base = TIOCE_M40_MIN; - msi_capable = 0; break; case TIOCE_ATE_M40S: /* @@ -317,16 +311,11 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, ate_reg = ce_mmr->ce_ure_ate3240; pagesize = GB(16); bus_base = TIOCE_M40S_MIN; - msi_capable = 0; break; default: return 0; } - msi_wanted = dma_flags & SN_DMA_MSI; - if (msi_wanted && !msi_capable) - return 0; - nates = ATE_NPAGES(ct_addr, len, pagesize); if (nates > entries) return 0; @@ -355,7 +344,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, for (j = 0; j < nates; j++) { u64 ate; - ate = ATE_MAKE(addr, pagesize, msi_wanted); + ate = ATE_MAKE(addr, pagesize); ate_shadow[i + j] = ate; tioce_mmr_storei(ce_kern, &ate_reg[i + j], ate); addr += pagesize; @@ -382,7 +371,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port, * Map @paddr into 32-bit bus space of the CE associated with @pcidev_info. */ static u64 -tioce_dma_d32(struct pci_dev *pdev, u64 ct_addr, int dma_flags) +tioce_dma_d32(struct pci_dev *pdev, u64 ct_addr) { int dma_ok; int port; @@ -392,9 +381,6 @@ tioce_dma_d32(struct pci_dev *pdev, u64 ct_addr, int dma_flags) u64 ct_lower; dma_addr_t bus_addr; - if (dma_flags & SN_DMA_MSI) - return 0; - ct_upper = ct_addr & ~0x3fffffffUL; ct_lower = ct_addr & 0x3fffffffUL; @@ -521,7 +507,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir) */ static u64 tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, - int barrier, int dma_flags) + int barrier) { unsigned long flags; u64 ct_addr; @@ -537,18 +523,15 @@ tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, if (dma_mask < 0x7fffffffUL) return 0; - if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS) - ct_addr = PHYS_TO_TIODMA(paddr); - else - ct_addr = paddr; + ct_addr = PHYS_TO_TIODMA(paddr); /* * If the device can generate 64 bit addresses, create a D64 map. + * Since this should never fail, bypass the rest of the checks. */ if (dma_mask == ~0UL) { - mapaddr = tioce_dma_d64(ct_addr, dma_flags); - if (mapaddr) - goto dma_map_done; + mapaddr = tioce_dma_d64(ct_addr); + goto dma_map_done; } pcidev_to_tioce(pdev, NULL, &ce_kern, &port); @@ -591,22 +574,18 @@ tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, if (byte_count > MB(64)) { mapaddr = tioce_alloc_map(ce_kern, TIOCE_ATE_M40S, - port, ct_addr, byte_count, - dma_flags); + port, ct_addr, byte_count); if (!mapaddr) mapaddr = tioce_alloc_map(ce_kern, TIOCE_ATE_M40, -1, - ct_addr, byte_count, - dma_flags); + ct_addr, byte_count); } else { mapaddr = tioce_alloc_map(ce_kern, TIOCE_ATE_M40, -1, - ct_addr, byte_count, - dma_flags); + ct_addr, byte_count); if (!mapaddr) mapaddr = tioce_alloc_map(ce_kern, TIOCE_ATE_M40S, - port, ct_addr, byte_count, - dma_flags); + port, ct_addr, byte_count); } } @@ -614,7 +593,7 @@ tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, * 32-bit direct is the next mode to try */ if (!mapaddr && dma_mask >= 0xffffffffUL) - mapaddr = tioce_dma_d32(pdev, ct_addr, dma_flags); + mapaddr = tioce_dma_d32(pdev, ct_addr); /* * Last resort, try 32-bit ATE-based map. @@ -622,7 +601,7 @@ tioce_do_dma_map(struct pci_dev *pdev, u64 paddr, size_t byte_count, if (!mapaddr) mapaddr = tioce_alloc_map(ce_kern, TIOCE_ATE_M32, -1, ct_addr, - byte_count, dma_flags); + byte_count); spin_unlock_irqrestore(&ce_kern->ce_lock, flags); @@ -643,9 +622,9 @@ dma_map_done: * in the address. */ static u64 -tioce_dma(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) +tioce_dma(struct pci_dev *pdev, u64 paddr, size_t byte_count) { - return tioce_do_dma_map(pdev, paddr, byte_count, 0, dma_flags); + return tioce_do_dma_map(pdev, paddr, byte_count, 0); } /** @@ -657,9 +636,9 @@ tioce_dma(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) * Simply call tioce_do_dma_map() to create a map with the barrier bit set * in the address. */ static u64 -tioce_dma_consistent(struct pci_dev *pdev, u64 paddr, size_t byte_count, int dma_flags) +tioce_dma_consistent(struct pci_dev *pdev, u64 paddr, size_t byte_count) { - return tioce_do_dma_map(pdev, paddr, byte_count, 1, dma_flags); + return tioce_do_dma_map(pdev, paddr, byte_count, 1); } /** @@ -717,7 +696,7 @@ tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit) while (ate_index <= last_ate) { u64 ate; - ate = ATE_MAKE(0xdeadbeef, ps, 0); + ate = ATE_MAKE(0xdeadbeef, ps); ce_kern->ce_ate3240_shadow[ate_index] = ate; tioce_mmr_storei(ce_kern, &ce_mmr->ce_ure_ate3240[ate_index], ate); @@ -1023,11 +1002,11 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_int_status_alias, ~0ULL); tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_error_summary_alias, ~0ULL); - tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_dre_comp_err_addr, 0ULL); + tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_dre_comp_err_addr, ~0ULL); if (request_irq(SGI_PCIASIC_ERROR, tioce_error_intr_handler, - IRQF_SHARED, "TIOCE error", (void *)tioce_common)) + SA_SHIRQ, "TIOCE error", (void *)tioce_common)) printk(KERN_WARNING "%s: Unable to get irq %d. " "Error interrupts won't be routed for " diff --git a/arch/ia64/xen/Makefile b/arch/ia64/xen/Makefile deleted file mode 100644 index c2b4f94ed..000000000 --- a/arch/ia64/xen/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# -# Makefile for Xen components -# - -obj-y := hypercall.o xenivt.o xenentry.o xensetup.o xenpal.o xenhpski.o \ - hypervisor.o pci-dma-xen.o util.o - -pci-dma-xen-y := ../../i386/kernel/pci-dma-xen.o diff --git a/arch/ia64/xen/drivers/README b/arch/ia64/xen/drivers/README deleted file mode 100644 index 33aecaa2a..000000000 --- a/arch/ia64/xen/drivers/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a temporary location for source/Makefiles that need to be -patched/reworked in drivers/xen to work with xenlinux/ia64. diff --git a/arch/ia64/xen/hypercall.S b/arch/ia64/xen/hypercall.S deleted file mode 100644 index 399686576..000000000 --- a/arch/ia64/xen/hypercall.S +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Support routines for Xen hypercalls - * - * Copyright (C) 2005 Dan Magenheimer - */ - -#include -#include - -/* To clear vpsr.ic, vpsr.i needs to be cleared first */ -#define XEN_CLEAR_PSR_IC \ - mov r14=1; \ - movl r15=XSI_PSR_I_ADDR; \ - movl r2=XSI_PSR_IC; \ - ;; \ - ld8 r15=[r15]; \ - ld4 r3=[r2]; \ - ;; \ - ld1 r16=[r15]; \ - ;; \ - st1 [r15]=r14; \ - st4 [r2]=r0; \ - ;; - -/* First restore vpsr.ic, and then vpsr.i */ -#define XEN_RESTORE_PSR_IC \ - st4 [r2]=r3; \ - st1 [r15]=r16; \ - ;; - -GLOBAL_ENTRY(xen_get_ivr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=cr.ivr;; -(p7) br.ret.sptk.many rp - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_IVR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_get_ivr) - -GLOBAL_ENTRY(xen_get_tpr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=cr.tpr;; -(p7) br.ret.sptk.many rp - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_TPR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_get_tpr) - -GLOBAL_ENTRY(xen_set_tpr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov cr.tpr=r32;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_SET_TPR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_set_tpr) - -GLOBAL_ENTRY(xen_eoi) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov cr.eoi=r0;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_EOI - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_eoi) - -GLOBAL_ENTRY(xen_thash) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) thash r8=r32;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_THASH - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_thash) - -GLOBAL_ENTRY(xen_set_itm) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov cr.itm=r32;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_SET_ITM - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_set_itm) - -GLOBAL_ENTRY(xen_ptcga) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) ptc.ga r32,r33;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - mov r9=r33 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_PTC_GA - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_ptcga) - -GLOBAL_ENTRY(xen_get_rr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=rr[r32];; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_RR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_get_rr) - -GLOBAL_ENTRY(xen_set_rr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov rr[r32]=r33;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - mov r9=r33 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_SET_RR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp - ;; -END(xen_set_rr) - -GLOBAL_ENTRY(xen_set_kr) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.ne p7,p0=r8,r0;; -(p7) br.cond.spnt.few 1f; - ;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar0=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar1=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar2=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar3=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar4=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar5=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar6=r9 -(p7) br.ret.sptk.many rp;; - cmp.eq p7,p0=r8,r0 - adds r8=-1,r8;; -(p7) mov ar7=r9 -(p7) br.ret.sptk.many rp;; - -1: mov r8=r32 - mov r9=r33 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_SET_KR - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_set_kr) - -GLOBAL_ENTRY(xen_fc) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) fc r32;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_FC - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_fc) - -GLOBAL_ENTRY(xen_get_cpuid) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=cpuid[r32];; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_CPUID - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_get_cpuid) - -GLOBAL_ENTRY(xen_get_pmd) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=pmd[r32];; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_PMD - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_get_pmd) - -#ifdef CONFIG_IA32_SUPPORT -GLOBAL_ENTRY(xen_get_eflag) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov r8=ar24;; -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_GET_EFLAG - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_get_eflag) - -// some bits aren't set if pl!=0, see SDM vol1 3.1.8 -GLOBAL_ENTRY(xen_set_eflag) - movl r8=running_on_xen;; - ld4 r8=[r8];; - cmp.eq p7,p0=r8,r0;; -(p7) mov ar24=r32 -(p7) br.ret.sptk.many rp - ;; - mov r8=r32 - ;; - XEN_CLEAR_PSR_IC - ;; - XEN_HYPER_SET_EFLAG - ;; - XEN_RESTORE_PSR_IC - ;; - br.ret.sptk.many rp -END(xen_set_eflag) -#endif - -GLOBAL_ENTRY(xen_send_ipi) - mov r14=r32 - mov r15=r33 - mov r2=0x400 - break 0x1000 - ;; - br.ret.sptk.many rp - ;; -END(xen_send_ipi) - -#ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT -// Those are vdso specialized. -// In fsys mode, call, ret can't be used. -GLOBAL_ENTRY(xen_rsm_be_i) - ld8 r22=[r22] - ;; - st1 [r22]=r20 - st4 [r23]=r0 - XEN_HYPER_RSM_BE - st4 [r23]=r20 - brl.cond.sptk .vdso_rsm_be_i_ret - ;; -END(xen_rsm_be_i) - -GLOBAL_ENTRY(xen_get_psr) - mov r31=r8 - mov r25=IA64_PSR_IC - st4 [r23]=r0 - XEN_HYPER_GET_PSR - ;; - st4 [r23]=r20 - or r29=r8,r25 // vpsr.ic was cleared for hyperprivop - mov r8=r31 - brl.cond.sptk .vdso_get_psr_ret - ;; -END(xen_get_psr) - - // see xen_ssm_i() in privop.h - // r22 = &vcpu->evtchn_mask - // r23 = &vpsr.ic - // r24 = &vcpu->pending_interruption - // r25 = tmp - // r31 = tmp - // p11 = tmp - // p14 = tmp -#define XEN_SET_PSR_I \ - ld4 r31=[r22]; \ - ld4 r25=[r24]; \ - ;; \ - st4 [r22]=r0; \ - cmp.ne.unc p14,p0=r0,r31; \ - ;; \ -(p14) cmp.ne.unc p11,p0=r0,r25; \ - ;; \ -(p11) st4 [r22]=r20; \ -(p11) st4 [r23]=r0; \ -(p11) XEN_HYPER_SSM_I; - -GLOBAL_ENTRY(xen_ssm_i_0) - XEN_SET_PSR_I - brl.cond.sptk .vdso_ssm_i_0_ret - ;; -END(xen_ssm_i_0) - -GLOBAL_ENTRY(xen_ssm_i_1) - XEN_SET_PSR_I - brl.cond.sptk .vdso_ssm_i_1_ret - ;; -END(xen_ssm_i_1) -#endif diff --git a/arch/ia64/xen/hypervisor.c b/arch/ia64/xen/hypervisor.c deleted file mode 100644 index 0b286047b..000000000 --- a/arch/ia64/xen/hypervisor.c +++ /dev/null @@ -1,833 +0,0 @@ -/****************************************************************************** - * include/asm-ia64/shadow.h - * - * Copyright (c) 2006 Isaku Yamahata - * VA Linux Systems Japan K.K. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE; -EXPORT_SYMBOL(HYPERVISOR_shared_info); - -start_info_t *xen_start_info; -EXPORT_SYMBOL(xen_start_info); - -int running_on_xen; -EXPORT_SYMBOL(running_on_xen); - -//XXX xen/ia64 copy_from_guest() is broken. -// This is a temporal work around until it is fixed. -// used by balloon.c netfront.c - -// get_xen_guest_handle is defined only when __XEN_TOOLS__ is defined -// if the definition in arch-ia64.h is changed, this must be updated. -#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) - -int -ia64_xenmem_reservation_op(unsigned long op, - struct xen_memory_reservation* reservation__) -{ - struct xen_memory_reservation reservation = *reservation__; - unsigned long* frame_list; - unsigned long nr_extents = reservation__->nr_extents; - int ret = 0; - get_xen_guest_handle(frame_list, reservation__->extent_start); - - BUG_ON(op != XENMEM_increase_reservation && - op != XENMEM_decrease_reservation && - op != XENMEM_populate_physmap); - - while (nr_extents > 0) { - int tmp_ret; - volatile unsigned long dummy; - - set_xen_guest_handle(reservation.extent_start, frame_list); - reservation.nr_extents = nr_extents; - - dummy = frame_list[0];// re-install tlb entry before hypercall - tmp_ret = ____HYPERVISOR_memory_op(op, &reservation); - if (tmp_ret < 0) { - if (ret == 0) { - ret = tmp_ret; - } - break; - } - if (tmp_ret == 0) { - //XXX dirty work around for skbuff_ctor() - // of a non-privileged domain, - if ((op == XENMEM_increase_reservation || - op == XENMEM_populate_physmap) && - !is_initial_xendomain() && - reservation.extent_order > 0) - return ret; - } - frame_list += tmp_ret; - nr_extents -= tmp_ret; - ret += tmp_ret; - } - return ret; -} -EXPORT_SYMBOL(ia64_xenmem_reservation_op); - -//XXX same as i386, x86_64 contiguous_bitmap_set(), contiguous_bitmap_clear() -// move those to lib/contiguous_bitmap? -//XXX discontigmem/sparsemem - -/* - * Bitmap is indexed by page number. If bit is set, the page is part of a - * xen_create_contiguous_region() area of memory. - */ -unsigned long *contiguous_bitmap; - -void -contiguous_bitmap_init(unsigned long end_pfn) -{ - unsigned long size = (end_pfn + 2 * BITS_PER_LONG) >> 3; - contiguous_bitmap = alloc_bootmem_low_pages(size); - BUG_ON(!contiguous_bitmap); - memset(contiguous_bitmap, 0, size); -} - -#if 0 -int -contiguous_bitmap_test(void* p) -{ - return test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap); -} -#endif - -static void contiguous_bitmap_set( - unsigned long first_page, unsigned long nr_pages) -{ - unsigned long start_off, end_off, curr_idx, end_idx; - - curr_idx = first_page / BITS_PER_LONG; - start_off = first_page & (BITS_PER_LONG-1); - end_idx = (first_page + nr_pages) / BITS_PER_LONG; - end_off = (first_page + nr_pages) & (BITS_PER_LONG-1); - - if (curr_idx == end_idx) { - contiguous_bitmap[curr_idx] |= - ((1UL<> PAGE_SHIFT; - unsigned long num_gpfn = 1 << order; - unsigned long i; - unsigned long flags; - - unsigned long *in_frames = discontig_frames, out_frame; - int success; - struct xen_memory_exchange exchange = { - .in = { - .nr_extents = num_gpfn, - .extent_order = 0, - .domid = DOMID_SELF - }, - .out = { - .nr_extents = 1, - .extent_order = order, - .address_bits = address_bits, - .domid = DOMID_SELF - }, - .nr_exchanged = 0 - }; - - if (unlikely(order > MAX_CONTIG_ORDER)) - return -ENOMEM; - - set_xen_guest_handle(exchange.in.extent_start, in_frames); - set_xen_guest_handle(exchange.out.extent_start, &out_frame); - - scrub_pages(vstart, num_gpfn); - - balloon_lock(flags); - - /* Get a new contiguous memory extent. */ - for (i = 0; i < num_gpfn; i++) { - in_frames[i] = start_gpfn + i; - } - out_frame = start_gpfn; - error = HYPERVISOR_memory_op(XENMEM_exchange, &exchange); - success = (exchange.nr_exchanged == num_gpfn); - BUG_ON(!success && ((exchange.nr_exchanged != 0) || (error == 0))); - BUG_ON(success && (error != 0)); - if (unlikely(error == -ENOSYS)) { - /* Compatibility when XENMEM_exchange is unsupported. */ - error = HYPERVISOR_memory_op(XENMEM_decrease_reservation, - &exchange.in); - BUG_ON(error != num_gpfn); - error = HYPERVISOR_memory_op(XENMEM_populate_physmap, - &exchange.out); - if (error != 1) { - /* Couldn't get special memory: fall back to normal. */ - for (i = 0; i < num_gpfn; i++) { - in_frames[i] = start_gpfn + i; - } - error = HYPERVISOR_memory_op(XENMEM_populate_physmap, - &exchange.in); - BUG_ON(error != num_gpfn); - success = 0; - } else - success = 1; - } - if (success) - contiguous_bitmap_set(start_gpfn, num_gpfn); -#if 0 - if (success) { - unsigned long mfn; - unsigned long mfn_prev = ~0UL; - for (i = 0; i < num_gpfn; i++) { - mfn = pfn_to_mfn_for_dma(start_gpfn + i); - if (mfn_prev != ~0UL && mfn != mfn_prev + 1) { - xprintk("\n"); - xprintk("%s:%d order %d " - "start 0x%lx bus 0x%lx " - "machine 0x%lx\n", - __func__, __LINE__, order, - vstart, virt_to_bus((void*)vstart), - phys_to_machine_for_dma(gphys)); - xprintk("mfn: "); - for (i = 0; i < num_gpfn; i++) { - mfn = pfn_to_mfn_for_dma( - start_gpfn + i); - xprintk("0x%lx ", mfn); - } - xprintk("\n"); - break; - } - mfn_prev = mfn; - } - } -#endif - balloon_unlock(flags); - return success? 0: -ENOMEM; -} - -void -__xen_destroy_contiguous_region(unsigned long vstart, unsigned int order) -{ - unsigned long flags; - unsigned long error = 0; - unsigned long start_gpfn = __pa(vstart) >> PAGE_SHIFT; - unsigned long num_gpfn = 1UL << order; - unsigned long i; - - unsigned long *out_frames = discontig_frames, in_frame; - int success; - struct xen_memory_exchange exchange = { - .in = { - .nr_extents = 1, - .extent_order = order, - .domid = DOMID_SELF - }, - .out = { - .nr_extents = num_gpfn, - .extent_order = 0, - .address_bits = 0, - .domid = DOMID_SELF - }, - .nr_exchanged = 0 - }; - - - if (!test_bit(start_gpfn, contiguous_bitmap)) - return; - - if (unlikely(order > MAX_CONTIG_ORDER)) - return; - - set_xen_guest_handle(exchange.in.extent_start, &in_frame); - set_xen_guest_handle(exchange.out.extent_start, out_frames); - - scrub_pages(vstart, num_gpfn); - - balloon_lock(flags); - - contiguous_bitmap_clear(start_gpfn, num_gpfn); - - /* Do the exchange for non-contiguous MFNs. */ - in_frame = start_gpfn; - for (i = 0; i < num_gpfn; i++) { - out_frames[i] = start_gpfn + i; - } - error = HYPERVISOR_memory_op(XENMEM_exchange, &exchange); - success = (exchange.nr_exchanged == 1); - BUG_ON(!success && ((exchange.nr_exchanged != 0) || (error == 0))); - BUG_ON(success && (error != 0)); - if (unlikely(error == -ENOSYS)) { - /* Compatibility when XENMEM_exchange is unsupported. */ - error = HYPERVISOR_memory_op(XENMEM_decrease_reservation, - &exchange.in); - BUG_ON(error != 1); - - error = HYPERVISOR_memory_op(XENMEM_populate_physmap, - &exchange.out); - BUG_ON(error != num_gpfn); - } - balloon_unlock(flags); -} - - -/////////////////////////////////////////////////////////////////////////// -// grant table hack -// cmd: GNTTABOP_xxx - -#include -#include -#include - -static void -gnttab_map_grant_ref_pre(struct gnttab_map_grant_ref *uop) -{ - uint32_t flags; - - flags = uop->flags; - - if (flags & GNTMAP_host_map) { - if (flags & GNTMAP_application_map) { - xprintd("GNTMAP_application_map is not supported yet: flags 0x%x\n", flags); - BUG(); - } - if (flags & GNTMAP_contains_pte) { - xprintd("GNTMAP_contains_pte is not supported yet flags 0x%x\n", flags); - BUG(); - } - } else if (flags & GNTMAP_device_map) { - xprintd("GNTMAP_device_map is not supported yet 0x%x\n", flags); - BUG();//XXX not yet. actually this flag is not used. - } else { - BUG(); - } -} - -int -HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count) -{ - __u64 va1, va2, pa1, pa2; - - if (cmd == GNTTABOP_map_grant_ref) { - unsigned int i; - for (i = 0; i < count; i++) { - gnttab_map_grant_ref_pre( - (struct gnttab_map_grant_ref*)uop + i); - } - } - va1 = (__u64)uop & PAGE_MASK; - pa1 = pa2 = 0; - if ((REGION_NUMBER(va1) == 5) && - ((va1 - KERNEL_START) >= KERNEL_TR_PAGE_SIZE)) { - pa1 = ia64_tpa(va1); - if (cmd <= GNTTABOP_transfer) { - static uint32_t uop_size[GNTTABOP_transfer + 1] = { - sizeof(struct gnttab_map_grant_ref), - sizeof(struct gnttab_unmap_grant_ref), - sizeof(struct gnttab_setup_table), - sizeof(struct gnttab_dump_table), - sizeof(struct gnttab_transfer), - }; - va2 = (__u64)uop + (uop_size[cmd] * count) - 1; - va2 &= PAGE_MASK; - if (va1 != va2) { - /* maximum size of uop is 2pages */ - BUG_ON(va2 > va1 + PAGE_SIZE); - pa2 = ia64_tpa(va2); - } - } - } - return ____HYPERVISOR_grant_table_op(cmd, uop, count, pa1, pa2); -} -EXPORT_SYMBOL(HYPERVISOR_grant_table_op); - -/////////////////////////////////////////////////////////////////////////// -// PageForeign(), SetPageForeign(), ClearPageForeign() - -struct address_space xen_ia64_foreign_dummy_mapping; -EXPORT_SYMBOL(xen_ia64_foreign_dummy_mapping); - -/////////////////////////////////////////////////////////////////////////// -// foreign mapping -#include -#include // for IA64_GRANULE_SIZE, GRANULEROUND{UP,DOWN}() - -static unsigned long privcmd_resource_min = 0; -// Xen/ia64 currently can handle pseudo physical address bits up to -// (PAGE_SHIFT * 3) -static unsigned long privcmd_resource_max = GRANULEROUNDDOWN((1UL << (PAGE_SHIFT * 3)) - 1); -static unsigned long privcmd_resource_align = IA64_GRANULE_SIZE; - -static unsigned long -md_end_addr(const efi_memory_desc_t *md) -{ - return md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT); -} - -#define XEN_IA64_PRIVCMD_LEAST_GAP_SIZE (1024 * 1024 * 1024UL) -static int -xen_ia64_privcmd_check_size(unsigned long start, unsigned long end) -{ - return (start < end && - (end - start) > XEN_IA64_PRIVCMD_LEAST_GAP_SIZE); -} - -static int __init -xen_ia64_privcmd_init(void) -{ - void *efi_map_start, *efi_map_end, *p; - u64 efi_desc_size; - efi_memory_desc_t *md; - unsigned long tmp_min; - unsigned long tmp_max; - unsigned long gap_size; - unsigned long prev_end; - - if (!is_running_on_xen()) - return -1; - - efi_map_start = __va(ia64_boot_param->efi_memmap); - efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size; - efi_desc_size = ia64_boot_param->efi_memdesc_size; - - // at first check the used highest address - for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { - // nothing - } - md = p - efi_desc_size; - privcmd_resource_min = GRANULEROUNDUP(md_end_addr(md)); - if (xen_ia64_privcmd_check_size(privcmd_resource_min, - privcmd_resource_max)) { - goto out; - } - - // the used highest address is too large. try to find the largest gap. - tmp_min = privcmd_resource_max; - tmp_max = 0; - gap_size = 0; - prev_end = 0; - for (p = efi_map_start; - p < efi_map_end - efi_desc_size; - p += efi_desc_size) { - unsigned long end; - efi_memory_desc_t* next; - unsigned long next_start; - - md = p; - end = md_end_addr(md); - if (end > privcmd_resource_max) { - break; - } - if (end < prev_end) { - // work around. - // Xen may pass incompletely sorted memory - // descriptors like - // [x, x + length] - // [x, x] - // this order should be reversed. - continue; - } - next = p + efi_desc_size; - next_start = next->phys_addr; - if (next_start > privcmd_resource_max) { - next_start = privcmd_resource_max; - } - if (end < next_start && gap_size < (next_start - end)) { - tmp_min = end; - tmp_max = next_start; - gap_size = tmp_max - tmp_min; - } - prev_end = end; - } - - privcmd_resource_min = GRANULEROUNDUP(tmp_min); - if (xen_ia64_privcmd_check_size(privcmd_resource_min, tmp_max)) { - privcmd_resource_max = tmp_max; - goto out; - } - - privcmd_resource_min = tmp_min; - privcmd_resource_max = tmp_max; - if (!xen_ia64_privcmd_check_size(privcmd_resource_min, - privcmd_resource_max)) { - // Any large enough gap isn't found. - // go ahead anyway with the warning hoping that large region - // won't be requested. - printk(KERN_WARNING "xen privcmd: large enough region for privcmd mmap is not found.\n"); - } - -out: - printk(KERN_INFO "xen privcmd uses pseudo physical addr range [0x%lx, 0x%lx] (%ldMB)\n", - privcmd_resource_min, privcmd_resource_max, - (privcmd_resource_max - privcmd_resource_min) >> 20); - BUG_ON(privcmd_resource_min >= privcmd_resource_max); - return 0; -} -late_initcall(xen_ia64_privcmd_init); - -struct xen_ia64_privcmd_entry { - atomic_t map_count; -#define INVALID_GPFN (~0UL) - unsigned long gpfn; -}; - -struct xen_ia64_privcmd_range { - atomic_t ref_count; - unsigned long pgoff; // in PAGE_SIZE - struct resource* res; - - unsigned long num_entries; - struct xen_ia64_privcmd_entry entries[0]; -}; - -struct xen_ia64_privcmd_vma { - struct xen_ia64_privcmd_range* range; - - unsigned long num_entries; - struct xen_ia64_privcmd_entry* entries; -}; - -static void -xen_ia64_privcmd_init_entry(struct xen_ia64_privcmd_entry* entry) -{ - atomic_set(&entry->map_count, 0); - entry->gpfn = INVALID_GPFN; -} - -static int -xen_ia64_privcmd_entry_mmap(struct vm_area_struct* vma, - unsigned long addr, - struct xen_ia64_privcmd_range* privcmd_range, - int i, - unsigned long mfn, - pgprot_t prot, - domid_t domid) -{ - int error = 0; - struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i]; - unsigned long gpfn; - unsigned long flags; - - if ((addr & ~PAGE_MASK) != 0 || mfn == INVALID_MFN) { - error = -EINVAL; - goto out; - } - - if (entry->gpfn != INVALID_GPFN) { - error = -EBUSY; - goto out; - } - gpfn = (privcmd_range->res->start >> PAGE_SHIFT) + i; - - flags = ASSIGN_writable; - if (pgprot_val(prot) == PROT_READ) { - flags = ASSIGN_readonly; - } - error = HYPERVISOR_add_physmap(gpfn, mfn, flags, domid); - if (error != 0) { - goto out; - } - - prot = vma->vm_page_prot; - error = remap_pfn_range(vma, addr, gpfn, 1 << PAGE_SHIFT, prot); - if (error != 0) { - error = HYPERVISOR_zap_physmap(gpfn, 0); - if (error) { - BUG();//XXX - } - } else { - atomic_inc(&entry->map_count); - entry->gpfn = gpfn; - } - -out: - return error; -} - -static void -xen_ia64_privcmd_entry_munmap(struct xen_ia64_privcmd_range* privcmd_range, - int i) -{ - struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i]; - unsigned long gpfn = entry->gpfn; - //gpfn = (privcmd_range->res->start >> PAGE_SHIFT) + - // (vma->vm_pgoff - privcmd_range->pgoff); - int error; - - error = HYPERVISOR_zap_physmap(gpfn, 0); - if (error) { - BUG();//XXX - } - entry->gpfn = INVALID_GPFN; -} - -static void -xen_ia64_privcmd_entry_open(struct xen_ia64_privcmd_range* privcmd_range, - int i) -{ - struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i]; - if (entry->gpfn != INVALID_GPFN) { - atomic_inc(&entry->map_count); - } else { - BUG_ON(atomic_read(&entry->map_count) != 0); - } -} - -static void -xen_ia64_privcmd_entry_close(struct xen_ia64_privcmd_range* privcmd_range, - int i) -{ - struct xen_ia64_privcmd_entry* entry = &privcmd_range->entries[i]; - if (entry->gpfn != INVALID_GPFN && - atomic_dec_and_test(&entry->map_count)) { - xen_ia64_privcmd_entry_munmap(privcmd_range, i); - } -} - -static void xen_ia64_privcmd_vma_open(struct vm_area_struct* vma); -static void xen_ia64_privcmd_vma_close(struct vm_area_struct* vma); - -struct vm_operations_struct xen_ia64_privcmd_vm_ops = { - .open = &xen_ia64_privcmd_vma_open, - .close = &xen_ia64_privcmd_vma_close, -}; - -static void -__xen_ia64_privcmd_vma_open(struct vm_area_struct* vma, - struct xen_ia64_privcmd_vma* privcmd_vma, - struct xen_ia64_privcmd_range* privcmd_range) -{ - unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff; - unsigned long num_entries = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; - unsigned long i; - - BUG_ON(entry_offset < 0); - BUG_ON(entry_offset + num_entries > privcmd_range->num_entries); - - privcmd_vma->range = privcmd_range; - privcmd_vma->num_entries = num_entries; - privcmd_vma->entries = &privcmd_range->entries[entry_offset]; - vma->vm_private_data = privcmd_vma; - for (i = 0; i < privcmd_vma->num_entries; i++) { - xen_ia64_privcmd_entry_open(privcmd_range, entry_offset + i); - } - - vma->vm_private_data = privcmd_vma; - vma->vm_ops = &xen_ia64_privcmd_vm_ops; -} - -static void -xen_ia64_privcmd_vma_open(struct vm_area_struct* vma) -{ - struct xen_ia64_privcmd_vma* privcmd_vma = (struct xen_ia64_privcmd_vma*)vma->vm_private_data; - struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range; - - atomic_inc(&privcmd_range->ref_count); - // vm_op->open() can't fail. - privcmd_vma = kmalloc(sizeof(*privcmd_vma), GFP_KERNEL | __GFP_NOFAIL); - - __xen_ia64_privcmd_vma_open(vma, privcmd_vma, privcmd_range); -} - -static void -xen_ia64_privcmd_vma_close(struct vm_area_struct* vma) -{ - struct xen_ia64_privcmd_vma* privcmd_vma = - (struct xen_ia64_privcmd_vma*)vma->vm_private_data; - struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range; - unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff; - unsigned long i; - - for (i = 0; i < privcmd_vma->num_entries; i++) { - xen_ia64_privcmd_entry_close(privcmd_range, entry_offset + i); - } - vma->vm_private_data = NULL; - kfree(privcmd_vma); - - if (atomic_dec_and_test(&privcmd_range->ref_count)) { -#if 1 - for (i = 0; i < privcmd_range->num_entries; i++) { - struct xen_ia64_privcmd_entry* entry = - &privcmd_range->entries[i]; - BUG_ON(atomic_read(&entry->map_count) != 0); - BUG_ON(entry->gpfn != INVALID_GPFN); - } -#endif - release_resource(privcmd_range->res); - kfree(privcmd_range->res); - vfree(privcmd_range); - } -} - -int -privcmd_mmap(struct file * file, struct vm_area_struct * vma) -{ - int error; - unsigned long size = vma->vm_end - vma->vm_start; - unsigned long num_entries = size >> PAGE_SHIFT; - struct xen_ia64_privcmd_range* privcmd_range = NULL; - struct xen_ia64_privcmd_vma* privcmd_vma = NULL; - struct resource* res = NULL; - unsigned long i; - BUG_ON(!is_running_on_xen()); - - BUG_ON(file->private_data != NULL); - - error = -ENOMEM; - privcmd_range = - vmalloc(sizeof(*privcmd_range) + - sizeof(privcmd_range->entries[0]) * num_entries); - if (privcmd_range == NULL) { - goto out_enomem0; - } - privcmd_vma = kmalloc(sizeof(*privcmd_vma), GFP_KERNEL); - if (privcmd_vma == NULL) { - goto out_enomem1; - } - res = kzalloc(sizeof(*res), GFP_KERNEL); - if (res == NULL) { - goto out_enomem1; - } - res->name = "Xen privcmd mmap"; - error = allocate_resource(&iomem_resource, res, size, - privcmd_resource_min, privcmd_resource_max, - privcmd_resource_align, NULL, NULL); - if (error) { - goto out_enomem1; - } - privcmd_range->res = res; - - /* DONTCOPY is essential for Xen as copy_page_range is broken. */ - vma->vm_flags |= VM_RESERVED | VM_IO | VM_DONTCOPY | VM_PFNMAP; - - atomic_set(&privcmd_range->ref_count, 1); - privcmd_range->pgoff = vma->vm_pgoff; - privcmd_range->num_entries = num_entries; - for (i = 0; i < privcmd_range->num_entries; i++) { - xen_ia64_privcmd_init_entry(&privcmd_range->entries[i]); - } - - __xen_ia64_privcmd_vma_open(vma, privcmd_vma, privcmd_range); - return 0; - -out_enomem1: - kfree(res); - kfree(privcmd_vma); -out_enomem0: - vfree(privcmd_range); - return error; -} - -int -direct_remap_pfn_range(struct vm_area_struct *vma, - unsigned long address, // process virtual address - unsigned long mfn, // mfn, mfn + 1, ... mfn + size/PAGE_SIZE - unsigned long size, - pgprot_t prot, - domid_t domid) // target domain -{ - struct xen_ia64_privcmd_vma* privcmd_vma = - (struct xen_ia64_privcmd_vma*)vma->vm_private_data; - struct xen_ia64_privcmd_range* privcmd_range = privcmd_vma->range; - unsigned long entry_offset = vma->vm_pgoff - privcmd_range->pgoff; - - unsigned long i; - unsigned long offset; - int error = 0; - BUG_ON(!is_running_on_xen()); - -#if 0 - if (prot != vm->vm_page_prot) { - return -EINVAL; - } -#endif - - i = (address - vma->vm_start) >> PAGE_SHIFT; - for (offset = 0; offset < size; offset += PAGE_SIZE) { - error = xen_ia64_privcmd_entry_mmap(vma, (address + offset) & PAGE_MASK, privcmd_range, entry_offset + i, mfn, prot, domid); - if (error != 0) { - break; - } - - i++; - mfn++; - } - - return error; -} - - -/* Called after suspend, to resume time. */ -void -time_resume(void) -{ - extern void ia64_cpu_local_tick(void); - - /* Just trigger a tick. */ - ia64_cpu_local_tick(); -} diff --git a/arch/ia64/xen/util.c b/arch/ia64/xen/util.c deleted file mode 100644 index 03ac49584..000000000 --- a/arch/ia64/xen/util.c +++ /dev/null @@ -1,115 +0,0 @@ -/****************************************************************************** - * arch/ia64/xen/util.c - * This file is the ia64 counterpart of drivers/xen/util.c - * - * Copyright (c) 2006 Isaku Yamahata - * VA Linux Systems Japan K.K. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include -#include - -struct vm_struct *alloc_vm_area(unsigned long size) -{ - int order; - unsigned long virt; - unsigned long nr_pages; - struct vm_struct* area; - - order = get_order(size); - virt = __get_free_pages(GFP_KERNEL, order); - if (virt == 0) { - goto err0; - } - nr_pages = 1 << order; - scrub_pages(virt, nr_pages); - - area = kmalloc(sizeof(*area), GFP_KERNEL); - if (area == NULL) { - goto err1; - } - - area->flags = VM_IOREMAP;//XXX - area->addr = (void*)virt; - area->size = size; - area->pages = NULL; //XXX - area->nr_pages = nr_pages; - area->phys_addr = 0; /* xenbus_map_ring_valloc uses this field! */ - - return area; - -err1: - free_pages(virt, order); -err0: - return NULL; - -} -EXPORT_SYMBOL_GPL(alloc_vm_area); - -void free_vm_area(struct vm_struct *area) -{ - unsigned int order = get_order(area->size); - unsigned long i; - unsigned long phys_addr = __pa(area->addr); - - // This area is used for foreign page mappping. - // So underlying machine page may not be assigned. - for (i = 0; i < (1 << order); i++) { - unsigned long ret; - unsigned long gpfn = (phys_addr >> PAGE_SHIFT) + i; - struct xen_memory_reservation reservation = { - .nr_extents = 1, - .address_bits = 0, - .extent_order = 0, - .domid = DOMID_SELF - }; - set_xen_guest_handle(reservation.extent_start, &gpfn); - ret = HYPERVISOR_memory_op(XENMEM_populate_physmap, - &reservation); - BUG_ON(ret != 1); - } - free_pages((unsigned long)area->addr, order); - kfree(area); -} -EXPORT_SYMBOL_GPL(free_vm_area); - -void lock_vm_area(struct vm_struct *area) -{ - // nothing -} -EXPORT_SYMBOL_GPL(lock_vm_area); - -void unlock_vm_area(struct vm_struct *area) -{ - // nothing -} -EXPORT_SYMBOL_GPL(unlock_vm_area); - -/* - * Local variables: - * c-file-style: "linux" - * indent-tabs-mode: t - * c-indent-level: 8 - * c-basic-offset: 8 - * tab-width: 8 - * End: - */ diff --git a/arch/ia64/xen/xenentry.S b/arch/ia64/xen/xenentry.S deleted file mode 100644 index ad9e79a91..000000000 --- a/arch/ia64/xen/xenentry.S +++ /dev/null @@ -1,867 +0,0 @@ -/* - * ia64/xen/entry.S - * - * Alternate kernel routines for Xen. Heavily leveraged from - * ia64/kernel/entry.S - * - * Copyright (C) 2005 Hewlett-Packard Co - * Dan Magenheimer - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_XEN -#include "xenminstate.h" -#else -#include "minstate.h" -#endif - -/* - * prev_task <- ia64_switch_to(struct task_struct *next) - * With Ingo's new scheduler, interrupts are disabled when this routine gets - * called. The code starting at .map relies on this. The rest of the code - * doesn't care about the interrupt masking status. - */ -#ifdef CONFIG_XEN -GLOBAL_ENTRY(xen_switch_to) - .prologue - alloc r16=ar.pfs,1,0,0,0 - movl r22=running_on_xen;; - ld4 r22=[r22];; - cmp.eq p7,p0=r22,r0 -(p7) br.cond.sptk.many __ia64_switch_to;; -#else -GLOBAL_ENTRY(ia64_switch_to) - .prologue - alloc r16=ar.pfs,1,0,0,0 -#endif - DO_SAVE_SWITCH_STACK - .body - - adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13 - movl r25=init_task - mov r27=IA64_KR(CURRENT_STACK) - adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0 - dep r20=0,in0,61,3 // physical address of "next" - ;; - st8 [r22]=sp // save kernel stack pointer of old task - shr.u r26=r20,IA64_GRANULE_SHIFT - cmp.eq p7,p6=r25,in0 - ;; -#ifdef CONFIG_XEN - movl r8=XSI_PSR_IC - ;; - st4 [r8]=r0 // force psr.ic off for hyperprivop(s) - ;; -#endif - /* - * If we've already mapped this task's page, we can skip doing it again. - */ -(p6) cmp.eq p7,p6=r26,r27 -(p6) br.cond.dpnt .map - ;; -.done: -#ifdef CONFIG_XEN - // psr.ic already off - // update "current" application register - mov r8=IA64_KR_CURRENT - mov r9=in0;; - XEN_HYPER_SET_KR - ld8 sp=[r21] // load kernel stack pointer of new task - movl r27=XSI_PSR_IC - mov r8=1 - ;; - st4 [r27]=r8 // psr.ic back on -#else - ld8 sp=[r21] // load kernel stack pointer of new task - mov IA64_KR(CURRENT)=in0 // update "current" application register -#endif - mov r8=r13 // return pointer to previously running task - mov r13=in0 // set "current" pointer - ;; - DO_LOAD_SWITCH_STACK - -#ifdef CONFIG_SMP - sync.i // ensure "fc"s done by this CPU are visible on other CPUs -#endif - br.ret.sptk.many rp // boogie on out in new context - -.map: -#ifdef CONFIG_XEN - // psr.ic already off -#else - rsm psr.ic // interrupts (psr.i) are already disabled here -#endif - movl r25=PAGE_KERNEL - ;; - srlz.d - or r23=r25,r20 // construct PA | page properties - mov r25=IA64_GRANULE_SHIFT<<2 - ;; -#ifdef CONFIG_XEN - movl r8=XSI_ITIR - ;; - st8 [r8]=r25 - ;; - movl r8=XSI_IFA - ;; - st8 [r8]=in0 // VA of next task... - ;; - mov r25=IA64_TR_CURRENT_STACK - // remember last page we mapped... - mov r8=IA64_KR_CURRENT_STACK - mov r9=r26;; - XEN_HYPER_SET_KR;; -#else - mov cr.itir=r25 - mov cr.ifa=in0 // VA of next task... - ;; - mov r25=IA64_TR_CURRENT_STACK - mov IA64_KR(CURRENT_STACK)=r26 // remember last page we mapped... -#endif - ;; - itr.d dtr[r25]=r23 // wire in new mapping... -#ifndef CONFIG_XEN - ssm psr.ic // reenable the psr.ic bit - ;; - srlz.d -#endif - br.cond.sptk .done -#ifdef CONFIG_XEN -END(xen_switch_to) -#else -END(ia64_switch_to) -#endif - - /* - * 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. - */ -#ifdef CONFIG_XEN -GLOBAL_ENTRY(xen_trace_syscall) - PT_REGS_UNWIND_INFO(0) - movl r16=running_on_xen;; - ld4 r16=[r16];; - cmp.eq p7,p0=r16,r0 -(p7) br.cond.sptk.many __ia64_trace_syscall;; -#else -GLOBAL_ENTRY(ia64_trace_syscall) - PT_REGS_UNWIND_INFO(0) -#endif - /* - * We need to preserve the scratch registers f6-f11 in case the system - * call is sigreturn. - */ - adds r16=PT(F6)+16,sp - adds r17=PT(F7)+16,sp - ;; - stf.spill [r16]=f6,32 - stf.spill [r17]=f7,32 - ;; - stf.spill [r16]=f8,32 - stf.spill [r17]=f9,32 - ;; - stf.spill [r16]=f10 - stf.spill [r17]=f11 - br.call.sptk.many rp=syscall_trace_enter // give parent a chance to catch syscall args - adds r16=PT(F6)+16,sp - adds r17=PT(F7)+16,sp - ;; - ldf.fill f6=[r16],32 - ldf.fill f7=[r17],32 - ;; - ldf.fill f8=[r16],32 - ldf.fill f9=[r17],32 - ;; - ldf.fill f10=[r16] - ldf.fill f11=[r17] - // 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: -.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 - br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value -.ret3: -(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk - br.cond.sptk .work_pending_syscall_end - -strace_error: - ld8 r3=[r2] // load pt_regs.r8 - sub r9=0,r8 // negate return value to get errno value - ;; - cmp.ne p6,p0=r3,r0 // is pt_regs.r8!=0? - adds r3=16,r2 // r3=&pt_regs.r10 - ;; -(p6) mov r10=-1 -(p6) mov r8=r9 - br.cond.sptk .strace_save_retval -#ifdef CONFIG_XEN -END(xen_trace_syscall) -#else -END(ia64_trace_syscall) -#endif - -/* - * ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't - * need to switch to bank 0 and doesn't restore the scratch registers. - * To avoid leaking kernel bits, the scratch registers are set to - * the following known-to-be-safe values: - * - * r1: restored (global pointer) - * r2: cleared - * r3: 1 (when returning to user-level) - * r8-r11: restored (syscall return value(s)) - * r12: restored (user-level stack pointer) - * r13: restored (user-level thread pointer) - * r14: set to __kernel_syscall_via_epc - * r15: restored (syscall #) - * r16-r17: cleared - * r18: user-level b6 - * r19: cleared - * r20: user-level ar.fpsr - * r21: user-level b0 - * r22: cleared - * r23: user-level ar.bspstore - * r24: user-level ar.rnat - * r25: user-level ar.unat - * r26: user-level ar.pfs - * r27: user-level ar.rsc - * r28: user-level ip - * r29: user-level psr - * r30: user-level cfm - * r31: user-level pr - * f6-f11: cleared - * pr: restored (user-level pr) - * b0: restored (user-level rp) - * b6: restored - * b7: set to __kernel_syscall_via_epc - * ar.unat: restored (user-level ar.unat) - * ar.pfs: restored (user-level ar.pfs) - * ar.rsc: restored (user-level ar.rsc) - * ar.rnat: restored (user-level ar.rnat) - * ar.bspstore: restored (user-level ar.bspstore) - * ar.fpsr: restored (user-level ar.fpsr) - * ar.ccv: cleared - * ar.csd: cleared - * ar.ssd: cleared - */ -#ifdef CONFIG_XEN -GLOBAL_ENTRY(xen_leave_syscall) - PT_REGS_UNWIND_INFO(0) - movl r22=running_on_xen;; - ld4 r22=[r22];; - cmp.eq p7,p0=r22,r0 -(p7) br.cond.sptk.many __ia64_leave_syscall;; -#else -ENTRY(ia64_leave_syscall) - PT_REGS_UNWIND_INFO(0) -#endif - /* - * work.need_resched etc. mustn't get changed by this CPU before it returns to - * user- or fsys-mode, hence we disable interrupts early on. - * - * p6 controls whether current_thread_info()->flags needs to be check for - * extra work. We always check for extra work when returning to user-level. - * With CONFIG_PREEMPT, we also check for extra work when the preempt_count - * is 0. After extra work processing has been completed, execution - * resumes at .work_processed_syscall with p6 set to 1 if the extra-work-check - * needs to be redone. - */ -#ifdef CONFIG_PREEMPT - rsm psr.i // disable interrupts - cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall -(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 - ;; - .pred.rel.mutex pUStk,pKStk -(pKStk) ld4 r21=[r20] // r21 <- preempt_count -(pUStk) mov r21=0 // r21 <- 0 - ;; - cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) -#else /* !CONFIG_PREEMPT */ -#ifdef CONFIG_XEN - movl r2=XSI_PSR_I_ADDR - mov r18=1 - ;; - ld8 r2=[r2] - ;; -(pUStk) st1 [r2]=r18 -#else -(pUStk) rsm psr.i -#endif - cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall -(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk -#endif -.work_processed_syscall: - adds r2=PT(LOADRS)+16,r12 - adds r3=PT(AR_BSPSTORE)+16,r12 - adds r18=TI_FLAGS+IA64_TASK_SIZE,r13 - ;; -(p6) ld4 r31=[r18] // load current_thread_info()->flags - ld8 r19=[r2],PT(B6)-PT(LOADRS) // load ar.rsc value for "loadrs" - nop.i 0 - ;; - mov r16=ar.bsp // M2 get existing backing store pointer - ld8 r18=[r2],PT(R9)-PT(B6) // load b6 -(p6) and r15=TIF_WORK_MASK,r31 // any work other than TIF_SYSCALL_TRACE? - ;; - ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE) // load ar.bspstore (may be garbage) -(p6) cmp4.ne.unc p6,p0=r15, r0 // any special work pending? -(p6) br.cond.spnt .work_pending_syscall - ;; - // start restoring the state saved on the kernel stack (struct pt_regs): - ld8 r9=[r2],PT(CR_IPSR)-PT(R9) - ld8 r11=[r3],PT(CR_IIP)-PT(R11) -(pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE! - ;; - invala // M0|1 invalidate ALAT -#ifdef CONFIG_XEN - movl r28=XSI_PSR_I_ADDR - movl r29=XSI_PSR_IC - ;; - ld8 r28=[r28] - mov r30=1 - ;; - st1 [r28]=r30 - st4 [r29]=r0 // note: clears both vpsr.i and vpsr.ic! - ;; -#else - rsm psr.i | psr.ic // M2 turn off interrupts and interruption collection -#endif - cmp.eq p9,p0=r0,r0 // A set p9 to indicate that we should restore cr.ifs - - ld8 r29=[r2],16 // M0|1 load cr.ipsr - ld8 r28=[r3],16 // M0|1 load cr.iip - mov r22=r0 // A clear r22 - ;; - ld8 r30=[r2],16 // M0|1 load cr.ifs - ld8 r25=[r3],16 // M0|1 load ar.unat -(pUStk) add r14=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 - ;; - ld8 r26=[r2],PT(B0)-PT(AR_PFS) // M0|1 load ar.pfs -(pKStk) mov r22=psr // M2 read PSR now that interrupts are disabled - nop 0 - ;; - ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // M0|1 load b0 - ld8 r27=[r3],PT(PR)-PT(AR_RSC) // M0|1 load ar.rsc - mov f6=f0 // F clear f6 - ;; - ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT) // M0|1 load ar.rnat (may be garbage) - ld8 r31=[r3],PT(R1)-PT(PR) // M0|1 load predicates - mov f7=f0 // F clear f7 - ;; - ld8 r20=[r2],PT(R12)-PT(AR_FPSR) // M0|1 load ar.fpsr - ld8.fill r1=[r3],16 // M0|1 load r1 -(pUStk) mov r17=1 // A - ;; -(pUStk) st1 [r14]=r17 // M2|3 - ld8.fill r13=[r3],16 // M0|1 - mov f8=f0 // F clear f8 - ;; - ld8.fill r12=[r2] // M0|1 restore r12 (sp) - ld8.fill r15=[r3] // M0|1 restore r15 - mov b6=r18 // I0 restore b6 - - addl r17=THIS_CPU(ia64_phys_stacked_size_p8),r0 // A - mov f9=f0 // F clear f9 -(pKStk) br.cond.dpnt.many skip_rbs_switch // B - - srlz.d // M0 ensure interruption collection is off (for cover) - shr.u r18=r19,16 // I0|1 get byte size of existing "dirty" partition -#ifdef CONFIG_XEN - XEN_HYPER_COVER; -#else - cover // B add current frame into dirty partition & set cr.ifs -#endif - ;; -(pUStk) ld4 r17=[r17] // M0|1 r17 = cpu_data->phys_stacked_size_p8 - mov r19=ar.bsp // M2 get new backing store pointer - mov f10=f0 // F clear f10 - - nop.m 0 - movl r14=__kernel_syscall_via_epc // X - ;; - mov.m ar.csd=r0 // M2 clear ar.csd - mov.m ar.ccv=r0 // M2 clear ar.ccv - mov b7=r14 // I0 clear b7 (hint with __kernel_syscall_via_epc) - - mov.m ar.ssd=r0 // M2 clear ar.ssd - mov f11=f0 // F clear f11 - br.cond.sptk.many rbs_switch // B -#ifdef CONFIG_XEN -END(xen_leave_syscall) -#else -END(ia64_leave_syscall) -#endif - -#ifdef CONFIG_XEN -GLOBAL_ENTRY(xen_leave_kernel) - PT_REGS_UNWIND_INFO(0) - movl r22=running_on_xen;; - ld4 r22=[r22];; - cmp.eq p7,p0=r22,r0 -(p7) br.cond.sptk.many __ia64_leave_kernel;; -#else -GLOBAL_ENTRY(ia64_leave_kernel) - PT_REGS_UNWIND_INFO(0) -#endif - /* - * work.need_resched etc. mustn't get changed by this CPU before it returns to - * user- or fsys-mode, hence we disable interrupts early on. - * - * p6 controls whether current_thread_info()->flags needs to be check for - * extra work. We always check for extra work when returning to user-level. - * With CONFIG_PREEMPT, we also check for extra work when the preempt_count - * is 0. After extra work processing has been completed, execution - * resumes at .work_processed_syscall with p6 set to 1 if the extra-work-check - * needs to be redone. - */ -#ifdef CONFIG_PREEMPT - rsm psr.i // disable interrupts - cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel -(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 - ;; - .pred.rel.mutex pUStk,pKStk -(pKStk) ld4 r21=[r20] // r21 <- preempt_count -(pUStk) mov r21=0 // r21 <- 0 - ;; - cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) -#else -#ifdef CONFIG_XEN -(pUStk) movl r17=XSI_PSR_I_ADDR -(pUStk) mov r31=1 - ;; -(pUStk) ld8 r17=[r17] - ;; -(pUStk) st1 [r17]=r31 - ;; -#else -(pUStk) rsm psr.i -#endif - cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel -(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk -#endif -.work_processed_kernel: - adds r17=TI_FLAGS+IA64_TASK_SIZE,r13 - ;; -(p6) ld4 r31=[r17] // load current_thread_info()->flags - adds r21=PT(PR)+16,r12 - ;; - - lfetch [r21],PT(CR_IPSR)-PT(PR) - adds r2=PT(B6)+16,r12 - adds r3=PT(R16)+16,r12 - ;; - lfetch [r21] - ld8 r28=[r2],8 // load b6 - adds r29=PT(R24)+16,r12 - - ld8.fill r16=[r3],PT(AR_CSD)-PT(R16) - adds r30=PT(AR_CCV)+16,r12 -(p6) and r19=TIF_WORK_MASK,r31 // any work other than TIF_SYSCALL_TRACE? - ;; - ld8.fill r24=[r29] - ld8 r15=[r30] // load ar.ccv -(p6) cmp4.ne.unc p6,p0=r19, r0 // any special work pending? - ;; - ld8 r29=[r2],16 // load b7 - ld8 r30=[r3],16 // load ar.csd -(p6) br.cond.spnt .work_pending - ;; - ld8 r31=[r2],16 // load ar.ssd - ld8.fill r8=[r3],16 - ;; - ld8.fill r9=[r2],16 - ld8.fill r10=[r3],PT(R17)-PT(R10) - ;; - ld8.fill r11=[r2],PT(R18)-PT(R11) - ld8.fill r17=[r3],16 - ;; - ld8.fill r18=[r2],16 - ld8.fill r19=[r3],16 - ;; - ld8.fill r20=[r2],16 - ld8.fill r21=[r3],16 - mov ar.csd=r30 - mov ar.ssd=r31 - ;; -#ifdef CONFIG_XEN - movl r23=XSI_PSR_I_ADDR - movl r22=XSI_PSR_IC - ;; - ld8 r23=[r23] - mov r25=1 - ;; - st1 [r23]=r25 - st4 [r22]=r0 // note: clears both vpsr.i and vpsr.ic! - ;; -#else - rsm psr.i | psr.ic // initiate turning off of interrupt and interruption collection -#endif - invala // invalidate ALAT - ;; - ld8.fill r22=[r2],24 - ld8.fill r23=[r3],24 - mov b6=r28 - ;; - ld8.fill r25=[r2],16 - ld8.fill r26=[r3],16 - mov b7=r29 - ;; - ld8.fill r27=[r2],16 - ld8.fill r28=[r3],16 - ;; - ld8.fill r29=[r2],16 - ld8.fill r30=[r3],24 - ;; - ld8.fill r31=[r2],PT(F9)-PT(R31) - adds r3=PT(F10)-PT(F6),r3 - ;; - ldf.fill f9=[r2],PT(F6)-PT(F9) - ldf.fill f10=[r3],PT(F8)-PT(F10) - ;; - ldf.fill f6=[r2],PT(F7)-PT(F6) - ;; - ldf.fill f7=[r2],PT(F11)-PT(F7) - ldf.fill f8=[r3],32 - ;; - srlz.d // ensure that inter. collection is off (VHPT is don't care, since text is pinned) - mov ar.ccv=r15 - ;; - ldf.fill f11=[r2] -#ifdef CONFIG_XEN - ;; - // r16-r31 all now hold bank1 values - movl r2=XSI_BANK1_R16 - movl r3=XSI_BANK1_R16+8 - ;; -.mem.offset 0,0; st8.spill [r2]=r16,16 -.mem.offset 8,0; st8.spill [r3]=r17,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r18,16 -.mem.offset 8,0; st8.spill [r3]=r19,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r20,16 -.mem.offset 8,0; st8.spill [r3]=r21,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r22,16 -.mem.offset 8,0; st8.spill [r3]=r23,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r24,16 -.mem.offset 8,0; st8.spill [r3]=r25,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r26,16 -.mem.offset 8,0; st8.spill [r3]=r27,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r28,16 -.mem.offset 8,0; st8.spill [r3]=r29,16 - ;; -.mem.offset 0,0; st8.spill [r2]=r30,16 -.mem.offset 8,0; st8.spill [r3]=r31,16 - ;; - movl r2=XSI_BANKNUM;; - st4 [r2]=r0; -#else - bsw.0 // switch back to bank 0 (no stop bit required beforehand...) -#endif - ;; -(pUStk) mov r18=IA64_KR(CURRENT)// M2 (12 cycle read latency) - adds r16=PT(CR_IPSR)+16,r12 - adds r17=PT(CR_IIP)+16,r12 - -(pKStk) mov r22=psr // M2 read PSR now that interrupts are disabled - nop.i 0 - nop.i 0 - ;; - ld8 r29=[r16],16 // load cr.ipsr - ld8 r28=[r17],16 // load cr.iip - ;; - ld8 r30=[r16],16 // load cr.ifs - ld8 r25=[r17],16 // load ar.unat - ;; - ld8 r26=[r16],16 // load ar.pfs - ld8 r27=[r17],16 // load ar.rsc - cmp.eq p9,p0=r0,r0 // set p9 to indicate that we should restore cr.ifs - ;; - ld8 r24=[r16],16 // load ar.rnat (may be garbage) - ld8 r23=[r17],16 // load ar.bspstore (may be garbage) - ;; - ld8 r31=[r16],16 // load predicates - ld8 r21=[r17],16 // load b0 - ;; - ld8 r19=[r16],16 // load ar.rsc value for "loadrs" - ld8.fill r1=[r17],16 // load r1 - ;; - ld8.fill r12=[r16],16 - ld8.fill r13=[r17],16 -(pUStk) adds r18=IA64_TASK_THREAD_ON_USTACK_OFFSET,r18 - ;; - ld8 r20=[r16],16 // ar.fpsr - ld8.fill r15=[r17],16 - ;; - ld8.fill r14=[r16],16 - ld8.fill r2=[r17] -(pUStk) mov r17=1 - ;; - ld8.fill r3=[r16] -(pUStk) st1 [r18]=r17 // restore current->thread.on_ustack - shr.u r18=r19,16 // get byte size of existing "dirty" partition - ;; - mov r16=ar.bsp // get existing backing store pointer - addl r17=THIS_CPU(ia64_phys_stacked_size_p8),r0 - ;; - ld4 r17=[r17] // r17 = cpu_data->phys_stacked_size_p8 -(pKStk) br.cond.dpnt skip_rbs_switch - - /* - * Restore user backing store. - * - * NOTE: alloc, loadrs, and cover can't be predicated. - */ -(pNonSys) br.cond.dpnt dont_preserve_current_frame - -#ifdef CONFIG_XEN - XEN_HYPER_COVER; -#else - cover // add current frame into dirty partition and set cr.ifs -#endif - ;; - mov r19=ar.bsp // get new backing store pointer -rbs_switch: - sub r16=r16,r18 // krbs = old bsp - size of dirty partition - cmp.ne p9,p0=r0,r0 // clear p9 to skip restore of cr.ifs - ;; - sub r19=r19,r16 // calculate total byte size of dirty partition - add r18=64,r18 // don't force in0-in7 into memory... - ;; - shl r19=r19,16 // shift size of dirty partition into loadrs position - ;; -dont_preserve_current_frame: - /* - * To prevent leaking bits between the kernel and user-space, - * we must clear the stacked registers in the "invalid" partition here. - * Not pretty, but at least it's fast (3.34 registers/cycle on Itanium, - * 5 registers/cycle on McKinley). - */ -# define pRecurse p6 -# define pReturn p7 -#ifdef CONFIG_ITANIUM -# define Nregs 10 -#else -# define Nregs 14 -#endif - alloc loc0=ar.pfs,2,Nregs-2,2,0 - shr.u loc1=r18,9 // RNaTslots <= floor(dirtySize / (64*8)) - sub r17=r17,r18 // r17 = (physStackedSize + 8) - dirtySize - ;; - mov ar.rsc=r19 // load ar.rsc to be used for "loadrs" - shladd in0=loc1,3,r17 - mov in1=0 - ;; - TEXT_ALIGN(32) -rse_clear_invalid: -#ifdef CONFIG_ITANIUM - // cycle 0 - { .mii - alloc loc0=ar.pfs,2,Nregs-2,2,0 - cmp.lt pRecurse,p0=Nregs*8,in0 // if more than Nregs regs left to clear, (re)curse - add out0=-Nregs*8,in0 -}{ .mfb - add out1=1,in1 // increment recursion count - nop.f 0 - nop.b 0 // can't do br.call here because of alloc (WAW on CFM) - ;; -}{ .mfi // cycle 1 - mov loc1=0 - nop.f 0 - mov loc2=0 -}{ .mib - mov loc3=0 - mov loc4=0 -(pRecurse) br.call.sptk.many b0=rse_clear_invalid - -}{ .mfi // cycle 2 - mov loc5=0 - nop.f 0 - cmp.ne pReturn,p0=r0,in1 // if recursion count != 0, we need to do a br.ret -}{ .mib - mov loc6=0 - mov loc7=0 -(pReturn) br.ret.sptk.many b0 -} -#else /* !CONFIG_ITANIUM */ - alloc loc0=ar.pfs,2,Nregs-2,2,0 - cmp.lt pRecurse,p0=Nregs*8,in0 // if more than Nregs regs left to clear, (re)curse - add out0=-Nregs*8,in0 - add out1=1,in1 // increment recursion count - mov loc1=0 - mov loc2=0 - ;; - mov loc3=0 - mov loc4=0 - mov loc5=0 - mov loc6=0 - mov loc7=0 -(pRecurse) br.call.dptk.few b0=rse_clear_invalid - ;; - mov loc8=0 - mov loc9=0 - cmp.ne pReturn,p0=r0,in1 // if recursion count != 0, we need to do a br.ret - mov loc10=0 - mov loc11=0 -(pReturn) br.ret.dptk.many b0 -#endif /* !CONFIG_ITANIUM */ -# undef pRecurse -# undef pReturn - ;; - alloc r17=ar.pfs,0,0,0,0 // drop current register frame - ;; - loadrs - ;; -skip_rbs_switch: - mov ar.unat=r25 // M2 -(pKStk) extr.u r22=r22,21,1 // I0 extract current value of psr.pp from r22 -(pLvSys)mov r19=r0 // A clear r19 for leave_syscall, no-op otherwise - ;; -(pUStk) mov ar.bspstore=r23 // M2 -(pKStk) dep r29=r22,r29,21,1 // I0 update ipsr.pp with psr.pp -(pLvSys)mov r16=r0 // A clear r16 for leave_syscall, no-op otherwise - ;; -#ifdef CONFIG_XEN - movl r25=XSI_IPSR - ;; - st8[r25]=r29,XSI_IFS_OFS-XSI_IPSR_OFS - ;; -#else - mov cr.ipsr=r29 // M2 -#endif - mov ar.pfs=r26 // I0 -(pLvSys)mov r17=r0 // A clear r17 for leave_syscall, no-op otherwise - -#ifdef CONFIG_XEN -(p9) st8 [r25]=r30 - ;; - adds r25=XSI_IIP_OFS-XSI_IFS_OFS,r25 - ;; -#else -(p9) mov cr.ifs=r30 // M2 -#endif - mov b0=r21 // I0 -(pLvSys)mov r18=r0 // A clear r18 for leave_syscall, no-op otherwise - - mov ar.fpsr=r20 // M2 -#ifdef CONFIG_XEN - st8 [r25]=r28 -#else - mov cr.iip=r28 // M2 -#endif - nop 0 - ;; -(pUStk) mov ar.rnat=r24 // M2 must happen with RSE in lazy mode - nop 0 -(pLvSys)mov r2=r0 - - mov ar.rsc=r27 // M2 - mov pr=r31,-1 // I0 -#ifdef CONFIG_XEN - ;; - XEN_HYPER_RFI; -#else - rfi // B -#endif - - /* - * On entry: - * r20 = ¤t->thread_info->pre_count (if CONFIG_PREEMPT) - * r31 = current->thread_info->flags - * On exit: - * p6 = TRUE if work-pending-check needs to be redone - */ -.work_pending_syscall: - add r2=-8,r2 - add r3=-8,r3 - ;; - st8 [r2]=r8 - st8 [r3]=r10 -.work_pending: - tbit.z p6,p0=r31,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? -(p6) br.cond.sptk.few .notify -#ifdef CONFIG_PREEMPT -(pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 - ;; -(pKStk) st4 [r20]=r21 - ssm psr.i // enable interrupts -#endif - br.call.spnt.many rp=schedule -.ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 -#ifdef CONFIG_XEN - movl r2=XSI_PSR_I_ADDR - mov r20=1 - ;; - ld8 r2=[r2] - ;; - st1 [r2]=r20 -#else - rsm psr.i // disable interrupts -#endif - ;; -#ifdef CONFIG_PREEMPT -(pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 - ;; -(pKStk) st4 [r20]=r0 // preempt_count() <- 0 -#endif -(pLvSys)br.cond.sptk.few .work_pending_syscall_end - br.cond.sptk.many .work_processed_kernel // re-check - -.notify: -(pUStk) br.call.spnt.many rp=notify_resume_user -.ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 -(pLvSys)br.cond.sptk.few .work_pending_syscall_end - br.cond.sptk.many .work_processed_kernel // don't re-check - -.work_pending_syscall_end: - adds r2=PT(R8)+16,r12 - adds r3=PT(R10)+16,r12 - ;; - ld8 r8=[r2] - ld8 r10=[r3] - br.cond.sptk.many .work_processed_syscall // re-check - -#ifdef CONFIG_XEN -END(xen_leave_kernel) -#else -END(ia64_leave_kernel) -#endif diff --git a/arch/ia64/xen/xenhpski.c b/arch/ia64/xen/xenhpski.c deleted file mode 100644 index 3bc6cdbf7..000000000 --- a/arch/ia64/xen/xenhpski.c +++ /dev/null @@ -1,19 +0,0 @@ - -extern unsigned long xen_get_cpuid(int); - -int -running_on_sim(void) -{ - int i; - long cpuid[6]; - - for (i = 0; i < 5; ++i) - cpuid[i] = xen_get_cpuid(i); - if ((cpuid[0] & 0xff) != 'H') return 0; - if ((cpuid[3] & 0xff) != 0x4) return 0; - if (((cpuid[3] >> 8) & 0xff) != 0x0) return 0; - if (((cpuid[3] >> 16) & 0xff) != 0x0) return 0; - if (((cpuid[3] >> 24) & 0x7) != 0x7) return 0; - return 1; -} - diff --git a/arch/ia64/xen/xenivt.S b/arch/ia64/xen/xenivt.S deleted file mode 100644 index 9c9e9f267..000000000 --- a/arch/ia64/xen/xenivt.S +++ /dev/null @@ -1,2169 +0,0 @@ -/* - * arch/ia64/xen/ivt.S - * - * Copyright (C) 2005 Hewlett-Packard Co - * Dan Magenheimer - */ -/* - * This file defines the interruption vector table used by the CPU. - * It does not include one entry per possible cause of interruption. - * - * The first 20 entries of the table contain 64 bundles each while the - * remaining 48 entries contain only 16 bundles each. - * - * The 64 bundles are used to allow inlining the whole handler for critical - * interruptions like TLB misses. - * - * For each entry, the comment is as follows: - * - * // 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51) - * entry offset ----/ / / / / - * entry number ---------/ / / / - * size of the entry -------------/ / / - * vector name -------------------------------------/ / - * interruptions triggering this vector ----------------------/ - * - * The table is 32KB in size and must be aligned on 32KB boundary. - * (The CPU ignores the 15 lower bits of the address) - * - * Table is based upon EAS2.6 (Oct 1999) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_XEN -#define ia64_ivt xen_ivt -#endif - -#if 1 -# define PSR_DEFAULT_BITS psr.ac -#else -# define PSR_DEFAULT_BITS 0 -#endif - -#if 0 - /* - * This lets you track the last eight faults that occurred on the CPU. Make sure ar.k2 isn't - * needed for something else before enabling this... - */ -# define DBG_FAULT(i) mov r16=ar.k2;; shl r16=r16,8;; add r16=(i),r16;;mov ar.k2=r16 -#else -# define DBG_FAULT(i) -#endif - -#define MINSTATE_VIRT /* needed by minstate.h */ -#include "xenminstate.h" - -#define FAULT(n) \ - mov r31=pr; \ - mov r19=n;; /* prepare to save predicates */ \ - br.sptk.many dispatch_to_fault_handler - - .section .text.ivt,"ax" - - .align 32768 // align on 32KB boundary - .global ia64_ivt -ia64_ivt: -///////////////////////////////////////////////////////////////////////////////////////// -// 0x0000 Entry 0 (size 64 bundles) VHPT Translation (8,20,47) -ENTRY(vhpt_miss) - DBG_FAULT(0) - /* - * The VHPT vector is invoked when the TLB entry for the virtual page table - * is missing. This happens only as a result of a previous - * (the "original") TLB miss, which may either be caused by an instruction - * fetch or a data access (or non-access). - * - * What we do here is normal TLB miss handing for the _original_ miss, - * followed by inserting the TLB entry for the virtual page table page - * that the VHPT walker was attempting to access. The latter gets - * inserted as long as page table entry above pte level have valid - * mappings for the faulting address. The TLB entry for the original - * miss gets inserted only if the pte entry indicates that the page is - * present. - * - * do_page_fault gets invoked in the following cases: - * - the faulting virtual address uses unimplemented address bits - * - the faulting virtual address has no valid page table mapping - */ -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] -#ifdef CONFIG_HUGETLB_PAGE - movl r18=PAGE_SHIFT - movl r25=XSI_ITIR - ;; - ld8 r25=[r25] -#endif - ;; -#else - mov r16=cr.ifa // get address that caused the TLB miss -#ifdef CONFIG_HUGETLB_PAGE - movl r18=PAGE_SHIFT - mov r25=cr.itir -#endif -#endif - ;; -#ifdef CONFIG_XEN - XEN_HYPER_RSM_PSR_DT; -#else - rsm psr.dt // use physical addressing for data -#endif - mov r31=pr // save the predicate registers - mov r19=IA64_KR(PT_BASE) // get page table base address - shl r21=r16,3 // shift bit 60 into sign bit - shr.u r17=r16,61 // get the region number into r17 - ;; - shr.u r22=r21,3 -#ifdef CONFIG_HUGETLB_PAGE - extr.u r26=r25,2,6 - ;; - cmp.ne p8,p0=r18,r26 - sub r27=r26,r18 - ;; -(p8) dep r25=r18,r25,2,6 -(p8) shr r22=r22,r27 -#endif - ;; - cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5? - shr.u r18=r22,PGDIR_SHIFT // get bottom portion of pgd index bit - ;; -(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place - - srlz.d - LOAD_PHYSICAL(p6, r19, swapper_pg_dir) // region 5 is rooted at swapper_pg_dir - - .pred.rel "mutex", p6, p7 -(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT -(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 - ;; -(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 -(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] - cmp.eq p7,p6=0,r21 // unused address bits all zeroes? -#ifdef CONFIG_PGTABLE_4 - shr.u r28=r22,PUD_SHIFT // shift pud index into position -#else - shr.u r18=r22,PMD_SHIFT // shift pmd index into position -#endif - ;; - ld8 r17=[r17] // get *pgd (may be 0) - ;; -(p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? -#ifdef CONFIG_PGTABLE_4 - dep r28=r28,r17,3,(PAGE_SHIFT-3) // r28=pud_offset(pgd,addr) - ;; - shr.u r18=r22,PMD_SHIFT // shift pmd index into position -(p7) ld8 r29=[r28] // get *pud (may be 0) - ;; -(p7) cmp.eq.or.andcm p6,p7=r29,r0 // was pud_present(*pud) == NULL? - dep r17=r18,r29,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr) -#else - dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pgd,addr) -#endif - ;; -(p7) ld8 r20=[r17] // get *pmd (may be 0) - shr.u r19=r22,PAGE_SHIFT // shift pte index into position - ;; -(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was pmd_present(*pmd) == NULL? - dep r21=r19,r20,3,(PAGE_SHIFT-3) // r21=pte_offset(pmd,addr) - ;; -(p7) ld8 r18=[r21] // read *pte -#ifdef CONFIG_XEN - movl r19=XSI_ISR - ;; - ld8 r19=[r19] -#else - mov r19=cr.isr // cr.isr bit 32 tells us if this is an insn miss -#endif - ;; -(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? -#ifdef CONFIG_XEN - movl r22=XSI_IHA - ;; - ld8 r22=[r22] -#else - mov r22=cr.iha // get the VHPT address that caused the TLB miss -#endif - ;; // avoid RAW on p7 -(p7) tbit.nz.unc p10,p11=r19,32 // is it an instruction TLB miss? - dep r23=0,r20,0,PAGE_SHIFT // clear low bits to get page address - ;; -#ifdef CONFIG_XEN - mov r24=r8 - mov r8=r18 - ;; -(p10) XEN_HYPER_ITC_I - ;; -(p11) XEN_HYPER_ITC_D - ;; - mov r8=r24 - ;; -#else -(p10) itc.i r18 // insert the instruction TLB entry -(p11) itc.d r18 // insert the data TLB entry -#endif -(p6) br.cond.spnt.many page_fault // handle bad address/page not present (page fault) -#ifdef CONFIG_XEN - movl r24=XSI_IFA - ;; - st8 [r24]=r22 - ;; -#else - mov cr.ifa=r22 -#endif - -#ifdef CONFIG_HUGETLB_PAGE -(p8) mov cr.itir=r25 // change to default page-size for VHPT -#endif - - /* - * Now compute and insert the TLB entry for the virtual page table. We never - * execute in a page table page so there is no need to set the exception deferral - * bit. - */ - adds r24=__DIRTY_BITS_NO_ED|_PAGE_PL_0|_PAGE_AR_RW,r23 - ;; -#ifdef CONFIG_XEN -(p7) mov r25=r8 -(p7) mov r8=r24 - ;; -(p7) XEN_HYPER_ITC_D - ;; -(p7) mov r8=r25 - ;; -#else -(p7) itc.d r24 -#endif - ;; -#ifdef CONFIG_SMP - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - - /* - * Re-check pagetable entry. If they changed, we may have received a ptc.g - * between reading the pagetable and the "itc". If so, flush the entry we - * inserted and retry. At this point, we have: - * - * r28 = equivalent of pud_offset(pgd, ifa) - * r17 = equivalent of pmd_offset(pud, ifa) - * r21 = equivalent of pte_offset(pmd, ifa) - * - * r29 = *pud - * r20 = *pmd - * r18 = *pte - */ - ld8 r25=[r21] // read *pte again - ld8 r26=[r17] // read *pmd again -#ifdef CONFIG_PGTABLE_4 - ld8 r19=[r28] // read *pud again -#endif - cmp.ne p6,p7=r0,r0 - ;; - cmp.ne.or.andcm p6,p7=r26,r20 // did *pmd change -#ifdef CONFIG_PGTABLE_4 - cmp.ne.or.andcm p6,p7=r19,r29 // did *pud change -#endif - mov r27=PAGE_SHIFT<<2 - ;; -(p6) ptc.l r22,r27 // purge PTE page translation -(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did *pte change - ;; -(p6) ptc.l r16,r27 // purge translation -#endif - - mov pr=r31,-1 // restore predicate registers -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(vhpt_miss) - - .org ia64_ivt+0x400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x0400 Entry 1 (size 64 bundles) ITLB (21) -ENTRY(itlb_miss) - DBG_FAULT(1) - /* - * The ITLB handler accesses the PTE via the virtually mapped linear - * page table. If a nested TLB miss occurs, we switch into physical - * mode, walk the page table, and then re-execute the PTE read and - * go on normally after that. - */ -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] -#else - mov r16=cr.ifa // get virtual address -#endif - mov r29=b0 // save b0 - mov r31=pr // save predicates -.itlb_fault: -#ifdef CONFIG_XEN - movl r17=XSI_IHA - ;; - ld8 r17=[r17] // get virtual address of L3 PTE -#else - mov r17=cr.iha // get virtual address of PTE -#endif - movl r30=1f // load nested fault continuation point - ;; -1: ld8 r18=[r17] // read *pte - ;; - mov b0=r29 - tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? -(p6) br.cond.spnt page_fault - ;; -#ifdef CONFIG_XEN - mov r19=r8 - mov r8=r18 - ;; - XEN_HYPER_ITC_I - ;; - mov r8=r19 -#else - itc.i r18 -#endif - ;; -#ifdef CONFIG_SMP - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - - ld8 r19=[r17] // read *pte again and see if same - mov r20=PAGE_SHIFT<<2 // setup page size for purge - ;; - cmp.ne p7,p0=r18,r19 - ;; -(p7) ptc.l r16,r20 -#endif - mov pr=r31,-1 -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(itlb_miss) - - .org ia64_ivt+0x0800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x0800 Entry 2 (size 64 bundles) DTLB (9,48) -ENTRY(dtlb_miss) - DBG_FAULT(2) - /* - * The DTLB handler accesses the PTE via the virtually mapped linear - * page table. If a nested TLB miss occurs, we switch into physical - * mode, walk the page table, and then re-execute the PTE read and - * go on normally after that. - */ -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] -#else - mov r16=cr.ifa // get virtual address -#endif - mov r29=b0 // save b0 - mov r31=pr // save predicates -dtlb_fault: -#ifdef CONFIG_XEN - movl r17=XSI_IHA - ;; - ld8 r17=[r17] // get virtual address of L3 PTE -#else - mov r17=cr.iha // get virtual address of PTE -#endif - movl r30=1f // load nested fault continuation point - ;; -1: ld8 r18=[r17] // read *pte - ;; - mov b0=r29 - tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? -(p6) br.cond.spnt page_fault - ;; -#ifdef CONFIG_XEN - mov r19=r8 - mov r8=r18 - ;; - XEN_HYPER_ITC_D - ;; - mov r8=r19 - ;; -#else - itc.d r18 -#endif - ;; -#ifdef CONFIG_SMP - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - - ld8 r19=[r17] // read *pte again and see if same - mov r20=PAGE_SHIFT<<2 // setup page size for purge - ;; - cmp.ne p7,p0=r18,r19 - ;; -(p7) ptc.l r16,r20 -#endif - mov pr=r31,-1 -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(dtlb_miss) - - .org ia64_ivt+0x0c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x0c00 Entry 3 (size 64 bundles) Alt ITLB (19) -ENTRY(alt_itlb_miss) - DBG_FAULT(3) -#ifdef CONFIG_XEN - movl r31=XSI_IPSR - ;; - ld8 r21=[r31],XSI_IFA_OFS-XSI_IPSR_OFS // get ipsr, point to ifa - movl r17=PAGE_KERNEL - ;; - ld8 r16=[r31] // get ifa -#else - mov r16=cr.ifa // get address that caused the TLB miss - movl r17=PAGE_KERNEL - mov r21=cr.ipsr -#endif - movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) - mov r31=pr - ;; -#ifdef CONFIG_DISABLE_VHPT - shr.u r22=r16,61 // get the region number into r21 - ;; - cmp.gt p8,p0=6,r22 // user mode - ;; -#ifndef CONFIG_XEN -(p8) thash r17=r16 - ;; -(p8) mov cr.iha=r17 -#endif -(p8) mov r29=b0 // save b0 -(p8) br.cond.dptk .itlb_fault -#endif - extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl - and r19=r19,r16 // clear ed, reserved bits, and PTE control bits - shr.u r18=r16,57 // move address bit 61 to bit 4 - ;; - andcm r18=0x10,r18 // bit 4=~address-bit(61) - cmp.ne p8,p0=r0,r23 // psr.cpl != 0? - or r19=r17,r19 // insert PTE control bits into r19 - ;; - or r19=r19,r18 // set bit 4 (uncached) if the access was to region 6 -(p8) br.cond.spnt page_fault - ;; -#ifdef CONFIG_XEN - mov r18=r8 - mov r8=r19 - ;; - XEN_HYPER_ITC_I - ;; - mov r8=r18 - ;; - mov pr=r31,-1 - ;; - XEN_HYPER_RFI; -#else - itc.i r19 // insert the TLB entry - mov pr=r31,-1 - rfi -#endif -END(alt_itlb_miss) - - .org ia64_ivt+0x1000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x1000 Entry 4 (size 64 bundles) Alt DTLB (7,46) -ENTRY(alt_dtlb_miss) - DBG_FAULT(4) -#ifdef CONFIG_XEN - movl r31=XSI_IPSR - ;; - ld8 r21=[r31],XSI_ISR_OFS-XSI_IPSR_OFS // get ipsr, point to isr - movl r17=PAGE_KERNEL - ;; - ld8 r20=[r31],XSI_IFA_OFS-XSI_ISR_OFS // get isr, point to ifa - movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) - ;; - ld8 r16=[r31] // get ifa -#else - mov r16=cr.ifa // get address that caused the TLB miss - movl r17=PAGE_KERNEL - mov r20=cr.isr - movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) - mov r21=cr.ipsr -#endif - mov r31=pr - ;; -#ifdef CONFIG_DISABLE_VHPT - shr.u r22=r16,61 // get the region number into r21 - ;; - cmp.gt p8,p0=6,r22 // access to region 0-5 - ;; -#ifndef CONFIG_XEN -(p8) thash r17=r16 - ;; -(p8) mov cr.iha=r17 -#endif -(p8) mov r29=b0 // save b0 -(p8) br.cond.dptk dtlb_fault -#endif - extr.u r23=r21,IA64_PSR_CPL0_BIT,2 // extract psr.cpl - and r22=IA64_ISR_CODE_MASK,r20 // get the isr.code field - tbit.nz p6,p7=r20,IA64_ISR_SP_BIT // is speculation bit on? - shr.u r18=r16,57 // move address bit 61 to bit 4 - and r19=r19,r16 // clear ed, reserved bits, and PTE control bits - tbit.nz p9,p0=r20,IA64_ISR_NA_BIT // is non-access bit on? - ;; - andcm r18=0x10,r18 // bit 4=~address-bit(61) - cmp.ne p8,p0=r0,r23 -(p9) cmp.eq.or.andcm p6,p7=IA64_ISR_CODE_LFETCH,r22 // check isr.code field -(p8) br.cond.spnt page_fault - - dep r21=-1,r21,IA64_PSR_ED_BIT,1 - or r19=r19,r17 // insert PTE control bits into r19 - ;; - or r19=r19,r18 // set bit 4 (uncached) if the access was to region 6 -(p6) mov cr.ipsr=r21 - ;; -#ifdef CONFIG_XEN -(p7) mov r18=r8 -(p7) mov r8=r19 - ;; -(p7) XEN_HYPER_ITC_D - ;; -(p7) mov r8=r18 - ;; - mov pr=r31,-1 - ;; - XEN_HYPER_RFI; -#else -(p7) itc.d r19 // insert the TLB entry - mov pr=r31,-1 - rfi -#endif -END(alt_dtlb_miss) - - .org ia64_ivt+0x1400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x1400 Entry 5 (size 64 bundles) Data nested TLB (6,45) -ENTRY(nested_dtlb_miss) - /* - * In the absence of kernel bugs, we get here when the virtually mapped linear - * page table is accessed non-speculatively (e.g., in the Dirty-bit, Instruction - * Access-bit, or Data Access-bit faults). If the DTLB entry for the virtual page - * table is missing, a nested TLB miss fault is triggered and control is - * transferred to this point. When this happens, we lookup the pte for the - * faulting address by walking the page table in physical mode and return to the - * continuation point passed in register r30 (or call page_fault if the address is - * not mapped). - * - * Input: r16: faulting address - * r29: saved b0 - * r30: continuation address - * r31: saved pr - * - * Output: r17: physical address of PTE of faulting address - * r29: saved b0 - * r30: continuation address - * r31: saved pr - * - * Clobbered: b0, r18, r19, r21, r22, psr.dt (cleared) - */ -#ifdef CONFIG_XEN - XEN_HYPER_RSM_PSR_DT; -#else - rsm psr.dt // switch to using physical data addressing -#endif - mov r19=IA64_KR(PT_BASE) // get the page table base address - shl r21=r16,3 // shift bit 60 into sign bit -#ifdef CONFIG_XEN - movl r18=XSI_ITIR - ;; - ld8 r18=[r18] -#else - mov r18=cr.itir -#endif - ;; - shr.u r17=r16,61 // get the region number into r17 - extr.u r18=r18,2,6 // get the faulting page size - ;; - cmp.eq p6,p7=5,r17 // is faulting address in region 5? - add r22=-PAGE_SHIFT,r18 // adjustment for hugetlb address - add r18=PGDIR_SHIFT-PAGE_SHIFT,r18 - ;; - shr.u r22=r16,r22 - shr.u r18=r16,r18 -(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place - - srlz.d - LOAD_PHYSICAL(p6, r19, swapper_pg_dir) // region 5 is rooted at swapper_pg_dir - - .pred.rel "mutex", p6, p7 -(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT -(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 - ;; -(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5 -(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4] - cmp.eq p7,p6=0,r21 // unused address bits all zeroes? -#ifdef CONFIG_PGTABLE_4 - shr.u r18=r22,PUD_SHIFT // shift pud index into position -#else - shr.u r18=r22,PMD_SHIFT // shift pmd index into position -#endif - ;; - ld8 r17=[r17] // get *pgd (may be 0) - ;; -(p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL? - dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=p[u|m]d_offset(pgd,addr) - ;; -#ifdef CONFIG_PGTABLE_4 -(p7) ld8 r17=[r17] // get *pud (may be 0) - shr.u r18=r22,PMD_SHIFT // shift pmd index into position - ;; -(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pud_present(*pud) == NULL? - dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr) - ;; -#endif -(p7) ld8 r17=[r17] // get *pmd (may be 0) - shr.u r19=r22,PAGE_SHIFT // shift pte index into position - ;; -(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pmd_present(*pmd) == NULL? - dep r17=r19,r17,3,(PAGE_SHIFT-3) // r17=pte_offset(pmd,addr); -(p6) br.cond.spnt page_fault - mov b0=r30 - br.sptk.many b0 // return to continuation point -END(nested_dtlb_miss) - - .org ia64_ivt+0x1800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x1800 Entry 6 (size 64 bundles) Instruction Key Miss (24) -ENTRY(ikey_miss) - DBG_FAULT(6) - FAULT(6) -END(ikey_miss) - - //----------------------------------------------------------------------------------- - // call do_page_fault (predicates are in r31, psr.dt may be off, r16 is faulting address) -ENTRY(page_fault) -#ifdef CONFIG_XEN - XEN_HYPER_SSM_PSR_DT -#else - ssm psr.dt - ;; - srlz.i -#endif - ;; - SAVE_MIN_WITH_COVER - alloc r15=ar.pfs,0,0,3,0 -#ifdef CONFIG_XEN - movl r3=XSI_ISR - ;; - ld8 out1=[r3],XSI_IFA_OFS-XSI_ISR_OFS // get vcr.isr, point to ifa - ;; - ld8 out0=[r3] // get vcr.ifa - mov r14=1 - ;; - add r3=XSI_PSR_IC_OFS-XSI_IFA_OFS, r3 // point to vpsr.ic - ;; - st4 [r3]=r14 // vpsr.ic = 1 - adds r3=8,r2 // set up second base pointer - ;; -#else - mov out0=cr.ifa - mov out1=cr.isr - adds r3=8,r2 // set up second base pointer - ;; - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collectin is on - ;; -#endif -#ifdef CONFIG_XEN - br.cond.sptk.many xen_page_fault - ;; -done_xen_page_fault: -#endif -(p15) ssm psr.i // restore psr.i - movl r14=ia64_leave_kernel - ;; - SAVE_REST - mov rp=r14 - ;; - adds out2=16,r12 // out2 = pointer to pt_regs - br.call.sptk.many b6=ia64_do_page_fault // ignore return address -END(page_fault) - - .org ia64_ivt+0x1c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51) -ENTRY(dkey_miss) - DBG_FAULT(7) - FAULT(7) -#ifdef CONFIG_XEN - // Leaving this code inline above results in an IVT section overflow - // There is no particular reason for this code to be here... -xen_page_fault: -(p15) movl r3=XSI_PSR_I_ADDR - ;; -(p15) ld8 r3=[r3] - ;; -(p15) st1 [r3]=r0,XSI_PEND_OFS-XSI_PSR_I_ADDR_OFS // if (p15) vpsr.i = 1 - mov r14=r0 - ;; -(p15) ld4 r14=[r3] // if (pending_interrupts) - adds r3=8,r2 // re-set up second base pointer - ;; -(p15) cmp.ne p15,p0=r14,r0 - ;; - br.cond.sptk.many done_xen_page_fault - ;; -#endif -END(dkey_miss) - - .org ia64_ivt+0x2000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x2000 Entry 8 (size 64 bundles) Dirty-bit (54) -ENTRY(dirty_bit) - DBG_FAULT(8) - /* - * What we do here is to simply turn on the dirty bit in the PTE. We need to - * update both the page-table and the TLB entry. To efficiently access the PTE, - * we address it through the virtual page table. Most likely, the TLB entry for - * the relevant virtual page table page is still present in the TLB so we can - * normally do this without additional TLB misses. In case the necessary virtual - * page table TLB entry isn't present, we take a nested TLB miss hit where we look - * up the physical address of the L3 PTE and then continue at label 1 below. - */ -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] - ;; -#else - mov r16=cr.ifa // get the address that caused the fault -#endif - movl r30=1f // load continuation point in case of nested fault - ;; -#ifdef CONFIG_XEN - mov r18=r8; - mov r8=r16; - XEN_HYPER_THASH;; - mov r17=r8; - mov r8=r18;; -#else - thash r17=r16 // compute virtual address of L3 PTE -#endif - mov r29=b0 // save b0 in case of nested fault - mov r31=pr // save pr -#ifdef CONFIG_SMP - mov r28=ar.ccv // save ar.ccv - ;; -1: ld8 r18=[r17] - ;; // avoid RAW on r18 - mov ar.ccv=r18 // set compare value for cmpxchg - or r25=_PAGE_D|_PAGE_A,r18 // set the dirty and accessed bits - tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit - ;; -(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only update if page is present - mov r24=PAGE_SHIFT<<2 - ;; -(p6) cmp.eq p6,p7=r26,r18 // Only compare if page is present - ;; -#ifdef CONFIG_XEN -(p6) mov r18=r8 -(p6) mov r8=r25 - ;; -(p6) XEN_HYPER_ITC_D - ;; -(p6) mov r8=r18 -#else -(p6) itc.d r25 // install updated PTE -#endif - ;; - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - - ld8 r18=[r17] // read PTE again - ;; - cmp.eq p6,p7=r18,r25 // is it same as the newly installed - ;; -(p7) ptc.l r16,r24 - mov b0=r29 // restore b0 - mov ar.ccv=r28 -#else - ;; -1: ld8 r18=[r17] - ;; // avoid RAW on r18 - or r18=_PAGE_D|_PAGE_A,r18 // set the dirty and accessed bits - mov b0=r29 // restore b0 - ;; - st8 [r17]=r18 // store back updated PTE - itc.d r18 // install updated PTE -#endif - mov pr=r31,-1 // restore pr -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(dirty_bit) - - .org ia64_ivt+0x2400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x2400 Entry 9 (size 64 bundles) Instruction Access-bit (27) -ENTRY(iaccess_bit) - DBG_FAULT(9) - // Like Entry 8, except for instruction access -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] - ;; -#else - mov r16=cr.ifa // get the address that caused the fault -#endif - movl r30=1f // load continuation point in case of nested fault - mov r31=pr // save predicates -#ifdef CONFIG_ITANIUM - /* - * Erratum 10 (IFA may contain incorrect address) has "NoFix" status. - */ - mov r17=cr.ipsr - ;; - mov r18=cr.iip - tbit.z p6,p0=r17,IA64_PSR_IS_BIT // IA64 instruction set? - ;; -(p6) mov r16=r18 // if so, use cr.iip instead of cr.ifa -#endif /* CONFIG_ITANIUM */ - ;; -#ifdef CONFIG_XEN - mov r18=r8; - mov r8=r16; - XEN_HYPER_THASH;; - mov r17=r8; - mov r8=r18;; -#else - thash r17=r16 // compute virtual address of L3 PTE -#endif - mov r29=b0 // save b0 in case of nested fault) -#ifdef CONFIG_SMP - mov r28=ar.ccv // save ar.ccv - ;; -1: ld8 r18=[r17] - ;; - mov ar.ccv=r18 // set compare value for cmpxchg - or r25=_PAGE_A,r18 // set the accessed bit - tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit - ;; -(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only if page present - mov r24=PAGE_SHIFT<<2 - ;; -(p6) cmp.eq p6,p7=r26,r18 // Only if page present - ;; -#ifdef CONFIG_XEN - mov r26=r8 - mov r8=r25 - ;; -(p6) XEN_HYPER_ITC_I - ;; - mov r8=r26 - ;; -#else -(p6) itc.i r25 // install updated PTE -#endif - ;; - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - - ld8 r18=[r17] // read PTE again - ;; - cmp.eq p6,p7=r18,r25 // is it same as the newly installed - ;; -(p7) ptc.l r16,r24 - mov b0=r29 // restore b0 - mov ar.ccv=r28 -#else /* !CONFIG_SMP */ - ;; -1: ld8 r18=[r17] - ;; - or r18=_PAGE_A,r18 // set the accessed bit - mov b0=r29 // restore b0 - ;; - st8 [r17]=r18 // store back updated PTE - itc.i r18 // install updated PTE -#endif /* !CONFIG_SMP */ - mov pr=r31,-1 -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(iaccess_bit) - - .org ia64_ivt+0x2800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x2800 Entry 10 (size 64 bundles) Data Access-bit (15,55) -ENTRY(daccess_bit) - DBG_FAULT(10) - // Like Entry 8, except for data access -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] - ;; -#else - mov r16=cr.ifa // get the address that caused the fault -#endif - movl r30=1f // load continuation point in case of nested fault - ;; -#ifdef CONFIG_XEN - mov r18=r8 - mov r8=r16 - XEN_HYPER_THASH - ;; - mov r17=r8 - mov r8=r18 - ;; -#else - thash r17=r16 // compute virtual address of L3 PTE -#endif - mov r31=pr - mov r29=b0 // save b0 in case of nested fault) -#ifdef CONFIG_SMP - mov r28=ar.ccv // save ar.ccv - ;; -1: ld8 r18=[r17] - ;; // avoid RAW on r18 - mov ar.ccv=r18 // set compare value for cmpxchg - or r25=_PAGE_A,r18 // set the dirty bit - tbit.z p7,p6 = r18,_PAGE_P_BIT // Check present bit - ;; -(p6) cmpxchg8.acq r26=[r17],r25,ar.ccv // Only if page is present - mov r24=PAGE_SHIFT<<2 - ;; -(p6) cmp.eq p6,p7=r26,r18 // Only if page is present - ;; -#ifdef CONFIG_XEN - mov r26=r8 - mov r8=r25 - ;; -(p6) XEN_HYPER_ITC_D - ;; - mov r8=r26 - ;; -#else -(p6) itc.d r25 // install updated PTE -#endif - /* - * Tell the assemblers dependency-violation checker that the above "itc" instructions - * cannot possibly affect the following loads: - */ - dv_serialize_data - ;; - ld8 r18=[r17] // read PTE again - ;; - cmp.eq p6,p7=r18,r25 // is it same as the newly installed - ;; -(p7) ptc.l r16,r24 - mov ar.ccv=r28 -#else - ;; -1: ld8 r18=[r17] - ;; // avoid RAW on r18 - or r18=_PAGE_A,r18 // set the accessed bit - ;; - st8 [r17]=r18 // store back updated PTE - itc.d r18 // install updated PTE -#endif - mov b0=r29 // restore b0 - mov pr=r31,-1 -#ifdef CONFIG_XEN - XEN_HYPER_RFI - dv_serialize_data -#else - rfi -#endif -END(daccess_bit) - - .org ia64_ivt+0x2c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x2c00 Entry 11 (size 64 bundles) Break instruction (33) -ENTRY(break_fault) - /* - * The streamlined system call entry/exit paths only save/restore the initial part - * of pt_regs. This implies that the callers of system-calls must adhere to the - * normal procedure calling conventions. - * - * Registers to be saved & restored: - * CR registers: cr.ipsr, cr.iip, cr.ifs - * AR registers: ar.unat, ar.pfs, ar.rsc, ar.rnat, ar.bspstore, ar.fpsr - * others: pr, b0, b6, loadrs, r1, r11, r12, r13, r15 - * Registers to be restored only: - * r8-r11: output value from the system call. - * - * During system call exit, scratch registers (including r15) are modified/cleared - * to prevent leaking bits from kernel to user level. - */ - DBG_FAULT(11) - mov.m r16=IA64_KR(CURRENT) // M2 r16 <- current task (12 cyc) -#ifdef CONFIG_XEN - movl r22=XSI_IPSR - ;; - ld8 r29=[r22],XSI_IIM_OFS-XSI_IPSR_OFS // get ipsr, point to iip -#else - mov r29=cr.ipsr // M2 (12 cyc) -#endif - mov r31=pr // I0 (2 cyc) - -#ifdef CONFIG_XEN - ;; - ld8 r17=[r22],XSI_IIP_OFS-XSI_IIM_OFS -#else - mov r17=cr.iim // M2 (2 cyc) -#endif - mov.m r27=ar.rsc // M2 (12 cyc) - mov r18=__IA64_BREAK_SYSCALL // A - - mov.m ar.rsc=0 // M2 - mov.m r21=ar.fpsr // M2 (12 cyc) - mov r19=b6 // I0 (2 cyc) - ;; - mov.m r23=ar.bspstore // M2 (12 cyc) - mov.m r24=ar.rnat // M2 (5 cyc) - mov.i r26=ar.pfs // I0 (2 cyc) - - invala // M0|1 - nop.m 0 // M - mov r20=r1 // A save r1 - - nop.m 0 - movl r30=sys_call_table // X - -#ifdef CONFIG_XEN - ld8 r28=[r22] -#else - mov r28=cr.iip // M2 (2 cyc) -#endif - cmp.eq p0,p7=r18,r17 // I0 is this a system call? -(p7) br.cond.spnt non_syscall // B no -> - // - // From this point on, we are definitely on the syscall-path - // and we can use (non-banked) scratch registers. - // -/////////////////////////////////////////////////////////////////////// - mov r1=r16 // A move task-pointer to "addl"-addressable reg - mov r2=r16 // A setup r2 for ia64_syscall_setup - add r9=TI_FLAGS+IA64_TASK_SIZE,r16 // A r9 = ¤t_thread_info()->flags - - adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 - adds r15=-1024,r15 // A subtract 1024 from syscall number - mov r3=NR_syscalls - 1 - ;; - ld1.bias r17=[r16] // M0|1 r17 = current->thread.on_ustack flag - ld4 r9=[r9] // M0|1 r9 = current_thread_info()->flags - extr.u r8=r29,41,2 // I0 extract ei field from cr.ipsr - - shladd r30=r15,3,r30 // A r30 = sys_call_table + 8*(syscall-1024) - addl r22=IA64_RBS_OFFSET,r1 // A compute base of RBS - cmp.leu p6,p7=r15,r3 // A syscall number in range? - ;; - - lfetch.fault.excl.nt1 [r22] // M0|1 prefetch RBS -(p6) ld8 r30=[r30] // M0|1 load address of syscall entry point - tnat.nz.or p7,p0=r15 // I0 is syscall nr a NaT? - - mov.m ar.bspstore=r22 // M2 switch to kernel RBS - cmp.eq p8,p9=2,r8 // A isr.ei==2? - ;; - -(p8) mov r8=0 // A clear ei to 0 -(p7) movl r30=sys_ni_syscall // X - -(p8) adds r28=16,r28 // A switch cr.iip to next bundle -(p9) adds r8=1,r8 // A increment ei to next slot - nop.i 0 - ;; - - mov.m r25=ar.unat // M2 (5 cyc) - dep r29=r8,r29,41,2 // I0 insert new ei into cr.ipsr - adds r15=1024,r15 // A restore original syscall number - // - // If any of the above loads miss in L1D, we'll stall here until - // the data arrives. - // -/////////////////////////////////////////////////////////////////////// - st1 [r16]=r0 // M2|3 clear current->thread.on_ustack flag - mov b6=r30 // I0 setup syscall handler branch reg early - cmp.eq pKStk,pUStk=r0,r17 // A were we on kernel stacks already? - - and r9=_TIF_SYSCALL_TRACEAUDIT,r9 // A mask trace or audit - mov r18=ar.bsp // M2 (12 cyc) -(pKStk) br.cond.spnt .break_fixup // B we're already in kernel-mode -- fix up RBS - ;; -.back_from_break_fixup: -(pUStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1 // A compute base of memory stack - cmp.eq p14,p0=r9,r0 // A are syscalls being traced/audited? - br.call.sptk.many b7=ia64_syscall_setup // B -1: - mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0 - nop 0 -#ifdef CONFIG_XEN - mov r2=b0; br.call.sptk b0=xen_bsw1;; mov b0=r2;; -#else - bsw.1 // B (6 cyc) regs are saved, switch to bank 1 -#endif - ;; - -#ifdef CONFIG_XEN - movl r16=XSI_PSR_IC - mov r3=1 - ;; - st4 [r16]=r3,XSI_PSR_I_ADDR_OFS-XSI_PSR_IC_OFS // vpsr.ic = 1 -#else - ssm psr.ic | PSR_DEFAULT_BITS // M2 now it's safe to re-enable intr.-collection -#endif - movl r3=ia64_ret_from_syscall // X - ;; - - srlz.i // M0 ensure interruption collection is on - mov rp=r3 // I0 set the real return addr -(p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT - -#ifdef CONFIG_XEN -(p15) ld8 r16=[r16] // vpsr.i - ;; -(p15) st1 [r16]=r0,XSI_PEND_OFS-XSI_PSR_I_ADDR_OFS // if (p15) vpsr.i = 1 - mov r2=r0 - ;; -(p15) ld4 r2=[r16] // if (pending_interrupts) - ;; - cmp.ne p6,p0=r2,r0 - ;; -(p6) ssm psr.i // do a real ssm psr.i -#else -(p15) ssm psr.i // M2 restore psr.i -#endif -(p14) br.call.sptk.many b6=b6 // B invoke syscall-handker (ignore return addr) - br.cond.spnt.many ia64_trace_syscall // B do syscall-tracing thingamagic - // NOT REACHED -/////////////////////////////////////////////////////////////////////// - // On entry, we optimistically assumed that we're coming from user-space. - // For the rare cases where a system-call is done from within the kernel, - // we fix things up at this point: -.break_fixup: - add r1=-IA64_PT_REGS_SIZE,sp // A allocate space for pt_regs structure - mov ar.rnat=r24 // M2 restore kernel's AR.RNAT - ;; - mov ar.bspstore=r23 // M2 restore kernel's AR.BSPSTORE - br.cond.sptk .back_from_break_fixup -END(break_fault) - - .org ia64_ivt+0x3000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x3000 Entry 12 (size 64 bundles) External Interrupt (4) -ENTRY(interrupt) - DBG_FAULT(12) - mov r31=pr // prepare to save predicates - ;; - SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 -#ifdef CONFIG_XEN - movl r3=XSI_PSR_IC - mov r14=1 - ;; - st4 [r3]=r14 -#else - ssm psr.ic | PSR_DEFAULT_BITS -#endif - ;; - adds r3=8,r2 // set up second base pointer for SAVE_REST - srlz.i // ensure everybody knows psr.ic is back on - ;; - SAVE_REST - ;; - alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group -#ifdef CONFIG_XEN - ;; - br.call.sptk.many rp=xen_get_ivr - ;; - mov out0=r8 // pass cr.ivr as first arg -#else - mov out0=cr.ivr // pass cr.ivr as first arg -#endif - add out1=16,sp // pass pointer to pt_regs as second arg - ;; - srlz.d // make sure we see the effect of cr.ivr - movl r14=ia64_leave_kernel - ;; - mov rp=r14 - br.call.sptk.many b6=ia64_handle_irq -END(interrupt) - - .org ia64_ivt+0x3400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x3400 Entry 13 (size 64 bundles) Reserved - DBG_FAULT(13) - FAULT(13) - - .org ia64_ivt+0x3800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x3800 Entry 14 (size 64 bundles) Reserved - DBG_FAULT(14) - FAULT(14) - - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - * - * ia64_syscall_setup() is a separate subroutine so that it can - * allocate stacked registers so it can safely demine any - * potential NaT values from the input registers. - * - * On entry: - * - executing on bank 0 or bank 1 register set (doesn't matter) - * - r1: stack pointer - * - r2: current task pointer - * - r3: preserved - * - r11: original contents (saved ar.pfs to be saved) - * - r12: original contents (sp to be saved) - * - r13: original contents (tp to be saved) - * - r15: original contents (syscall # to be saved) - * - r18: saved bsp (after switching to kernel stack) - * - r19: saved b6 - * - r20: saved r1 (gp) - * - r21: saved ar.fpsr - * - r22: kernel's register backing store base (krbs_base) - * - r23: saved ar.bspstore - * - r24: saved ar.rnat - * - r25: saved ar.unat - * - r26: saved ar.pfs - * - r27: saved ar.rsc - * - r28: saved cr.iip - * - r29: saved cr.ipsr - * - r31: saved pr - * - b0: original contents (to be saved) - * On exit: - * - p10: TRUE if syscall is invoked with more than 8 out - * registers or r15's Nat is true - * - r1: kernel's gp - * - r3: preserved (same as on entry) - * - r8: -EINVAL if p10 is true - * - r12: points to kernel stack - * - r13: points to current task - * - r14: preserved (same as on entry) - * - p13: preserved - * - p15: TRUE if interrupts need to be re-enabled - * - ar.fpsr: set to kernel settings - * - b6: preserved (same as on entry) - */ -#ifndef CONFIG_XEN -GLOBAL_ENTRY(ia64_syscall_setup) -#if PT(B6) != 0 -# error This code assumes that b6 is the first field in pt_regs. -#endif - st8 [r1]=r19 // save b6 - add r16=PT(CR_IPSR),r1 // initialize first base pointer - add r17=PT(R11),r1 // initialize second base pointer - ;; - alloc r19=ar.pfs,8,0,0,0 // ensure in0-in7 are writable - st8 [r16]=r29,PT(AR_PFS)-PT(CR_IPSR) // save cr.ipsr - tnat.nz p8,p0=in0 - - st8.spill [r17]=r11,PT(CR_IIP)-PT(R11) // save r11 - tnat.nz p9,p0=in1 -(pKStk) mov r18=r0 // make sure r18 isn't NaT - ;; - - st8 [r16]=r26,PT(CR_IFS)-PT(AR_PFS) // save ar.pfs - st8 [r17]=r28,PT(AR_UNAT)-PT(CR_IIP) // save cr.iip - mov r28=b0 // save b0 (2 cyc) - ;; - - st8 [r17]=r25,PT(AR_RSC)-PT(AR_UNAT) // save ar.unat - dep r19=0,r19,38,26 // clear all bits but 0..37 [I0] -(p8) mov in0=-1 - ;; - - st8 [r16]=r19,PT(AR_RNAT)-PT(CR_IFS) // store ar.pfs.pfm in cr.ifs - extr.u r11=r19,7,7 // I0 // get sol of ar.pfs - and r8=0x7f,r19 // A // get sof of ar.pfs - - st8 [r17]=r27,PT(AR_BSPSTORE)-PT(AR_RSC)// save ar.rsc - tbit.nz p15,p0=r29,IA64_PSR_I_BIT // I0 -(p9) mov in1=-1 - ;; - -(pUStk) sub r18=r18,r22 // r18=RSE.ndirty*8 - tnat.nz p10,p0=in2 - add r11=8,r11 - ;; -(pKStk) adds r16=PT(PR)-PT(AR_RNAT),r16 // skip over ar_rnat field -(pKStk) adds r17=PT(B0)-PT(AR_BSPSTORE),r17 // skip over ar_bspstore field - tnat.nz p11,p0=in3 - ;; -(p10) mov in2=-1 - tnat.nz p12,p0=in4 // [I0] -(p11) mov in3=-1 - ;; -(pUStk) st8 [r16]=r24,PT(PR)-PT(AR_RNAT) // save ar.rnat -(pUStk) st8 [r17]=r23,PT(B0)-PT(AR_BSPSTORE) // save ar.bspstore - shl r18=r18,16 // compute ar.rsc to be used for "loadrs" - ;; - st8 [r16]=r31,PT(LOADRS)-PT(PR) // save predicates - st8 [r17]=r28,PT(R1)-PT(B0) // save b0 - tnat.nz p13,p0=in5 // [I0] - ;; - st8 [r16]=r18,PT(R12)-PT(LOADRS) // save ar.rsc value for "loadrs" - st8.spill [r17]=r20,PT(R13)-PT(R1) // save original r1 -(p12) mov in4=-1 - ;; - -.mem.offset 0,0; st8.spill [r16]=r12,PT(AR_FPSR)-PT(R12) // save r12 -.mem.offset 8,0; st8.spill [r17]=r13,PT(R15)-PT(R13) // save r13 -(p13) mov in5=-1 - ;; - st8 [r16]=r21,PT(R8)-PT(AR_FPSR) // save ar.fpsr - tnat.nz p13,p0=in6 - cmp.lt p10,p9=r11,r8 // frame size can't be more than local+8 - ;; - mov r8=1 -(p9) tnat.nz p10,p0=r15 - adds r12=-16,r1 // switch to kernel memory stack (with 16 bytes of scratch) - - st8.spill [r17]=r15 // save r15 - tnat.nz p8,p0=in7 - nop.i 0 - - mov r13=r2 // establish `current' - movl r1=__gp // establish kernel global pointer - ;; - st8 [r16]=r8 // ensure pt_regs.r8 != 0 (see handle_syscall_error) -(p13) mov in6=-1 -(p8) mov in7=-1 - - cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 - movl r17=FPSR_DEFAULT - ;; - mov.m ar.fpsr=r17 // set ar.fpsr to kernel default value -(p10) mov r8=-EINVAL - br.ret.sptk.many b7 -END(ia64_syscall_setup) -#endif - - .org ia64_ivt+0x3c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x3c00 Entry 15 (size 64 bundles) Reserved - DBG_FAULT(15) - FAULT(15) - - /* - * Squatting in this space ... - * - * This special case dispatcher for illegal operation faults allows preserved - * registers to be modified through a callback function (asm only) that is handed - * back from the fault handler in r8. Up to three arguments can be passed to the - * callback function by returning an aggregate with the callback as its first - * element, followed by the arguments. - */ -ENTRY(dispatch_illegal_op_fault) - .prologue - .body - SAVE_MIN_WITH_COVER - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i // restore psr.i - adds r3=8,r2 // set up second base pointer for SAVE_REST - ;; - alloc r14=ar.pfs,0,0,1,0 // must be first in insn group - mov out0=ar.ec - ;; - SAVE_REST - PT_REGS_UNWIND_INFO(0) - ;; - br.call.sptk.many rp=ia64_illegal_op_fault -.ret0: ;; - alloc r14=ar.pfs,0,0,3,0 // must be first in insn group - mov out0=r9 - mov out1=r10 - mov out2=r11 - movl r15=ia64_leave_kernel - ;; - mov rp=r15 - mov b6=r8 - ;; - cmp.ne p6,p0=0,r8 -(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel - br.sptk.many ia64_leave_kernel -END(dispatch_illegal_op_fault) - - .org ia64_ivt+0x4000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x4000 Entry 16 (size 64 bundles) Reserved - DBG_FAULT(16) - FAULT(16) - - .org ia64_ivt+0x4400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x4400 Entry 17 (size 64 bundles) Reserved - DBG_FAULT(17) - FAULT(17) - -ENTRY(non_syscall) - mov ar.rsc=r27 // restore ar.rsc before SAVE_MIN_WITH_COVER - ;; - SAVE_MIN_WITH_COVER - - // There is no particular reason for this code to be here, other than that - // there happens to be space here that would go unused otherwise. If this - // fault ever gets "unreserved", simply moved the following code to a more - // suitable spot... - - alloc r14=ar.pfs,0,0,2,0 - mov out0=cr.iim - add out1=16,sp - adds r3=8,r2 // set up second base pointer for SAVE_REST - - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i // restore psr.i - movl r15=ia64_leave_kernel - ;; - SAVE_REST - mov rp=r15 - ;; - br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM and ignore return addr -END(non_syscall) - - .org ia64_ivt+0x4800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x4800 Entry 18 (size 64 bundles) Reserved - DBG_FAULT(18) - FAULT(18) - - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - */ - -ENTRY(dispatch_unaligned_handler) - SAVE_MIN_WITH_COVER - ;; - alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first in insn group!) - mov out0=cr.ifa - adds out1=16,sp - - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i // restore psr.i - adds r3=8,r2 // set up second base pointer - ;; - SAVE_REST - movl r14=ia64_leave_kernel - ;; - mov rp=r14 - br.sptk.many ia64_prepare_handle_unaligned -END(dispatch_unaligned_handler) - - .org ia64_ivt+0x4c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x4c00 Entry 19 (size 64 bundles) Reserved - DBG_FAULT(19) - FAULT(19) - - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - */ - -ENTRY(dispatch_to_fault_handler) - /* - * Input: - * psr.ic: off - * r19: fault vector number (e.g., 24 for General Exception) - * r31: contains saved predicates (pr) - */ - SAVE_MIN_WITH_COVER_R19 - alloc r14=ar.pfs,0,0,5,0 - mov out0=r15 -#ifdef CONFIG_XEN - movl out1=XSI_ISR - ;; - adds out2=XSI_IFA-XSI_ISR,out1 - adds out3=XSI_IIM-XSI_ISR,out1 - adds out4=XSI_ITIR-XSI_ISR,out1 - ;; - ld8 out1=[out1] - ld8 out2=[out2] - ld8 out3=[out4] - ld8 out4=[out4] - ;; -#else - mov out1=cr.isr - mov out2=cr.ifa - mov out3=cr.iim - mov out4=cr.itir - ;; -#endif - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i // restore psr.i - adds r3=8,r2 // set up second base pointer for SAVE_REST - ;; - SAVE_REST - movl r14=ia64_leave_kernel - ;; - mov rp=r14 - br.call.sptk.many b6=ia64_fault -END(dispatch_to_fault_handler) - -// -// --- End of long entries, Beginning of short entries -// - - .org ia64_ivt+0x5000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5000 Entry 20 (size 16 bundles) Page Not Present (10,22,49) -ENTRY(page_not_present) - DBG_FAULT(20) - mov r16=cr.ifa - rsm psr.dt - /* - * The Linux page fault handler doesn't expect non-present pages to be in - * the TLB. Flush the existing entry now, so we meet that expectation. - */ - mov r17=PAGE_SHIFT<<2 - ;; - ptc.l r16,r17 - ;; - mov r31=pr - srlz.d - br.sptk.many page_fault -END(page_not_present) - - .org ia64_ivt+0x5100 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5100 Entry 21 (size 16 bundles) Key Permission (13,25,52) -ENTRY(key_permission) - DBG_FAULT(21) - mov r16=cr.ifa - rsm psr.dt - mov r31=pr - ;; - srlz.d - br.sptk.many page_fault -END(key_permission) - - .org ia64_ivt+0x5200 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5200 Entry 22 (size 16 bundles) Instruction Access Rights (26) -ENTRY(iaccess_rights) - DBG_FAULT(22) - mov r16=cr.ifa - rsm psr.dt - mov r31=pr - ;; - srlz.d - br.sptk.many page_fault -END(iaccess_rights) - - .org ia64_ivt+0x5300 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5300 Entry 23 (size 16 bundles) Data Access Rights (14,53) -ENTRY(daccess_rights) - DBG_FAULT(23) -#ifdef CONFIG_XEN - movl r16=XSI_IFA - ;; - ld8 r16=[r16] - ;; - XEN_HYPER_RSM_PSR_DT -#else - mov r16=cr.ifa - rsm psr.dt -#endif - mov r31=pr - ;; - srlz.d - br.sptk.many page_fault -END(daccess_rights) - - .org ia64_ivt+0x5400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5400 Entry 24 (size 16 bundles) General Exception (5,32,34,36,38,39) -ENTRY(general_exception) - DBG_FAULT(24) - mov r16=cr.isr - mov r31=pr - ;; - cmp4.eq p6,p0=0,r16 -(p6) br.sptk.many dispatch_illegal_op_fault - ;; - mov r19=24 // fault number - br.sptk.many dispatch_to_fault_handler -END(general_exception) - - .org ia64_ivt+0x5500 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5500 Entry 25 (size 16 bundles) Disabled FP-Register (35) -ENTRY(disabled_fp_reg) - DBG_FAULT(25) - rsm psr.dfh // ensure we can access fph - ;; - srlz.d - mov r31=pr - mov r19=25 - br.sptk.many dispatch_to_fault_handler -END(disabled_fp_reg) - - .org ia64_ivt+0x5600 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5600 Entry 26 (size 16 bundles) Nat Consumption (11,23,37,50) -ENTRY(nat_consumption) - DBG_FAULT(26) - - mov r16=cr.ipsr - mov r17=cr.isr - mov r31=pr // save PR - ;; - and r18=0xf,r17 // r18 = cr.ipsr.code{3:0} - tbit.z p6,p0=r17,IA64_ISR_NA_BIT - ;; - cmp.ne.or p6,p0=IA64_ISR_CODE_LFETCH,r18 - dep r16=-1,r16,IA64_PSR_ED_BIT,1 -(p6) br.cond.spnt 1f // branch if (cr.ispr.na == 0 || cr.ipsr.code{3:0} != LFETCH) - ;; - mov cr.ipsr=r16 // set cr.ipsr.na - mov pr=r31,-1 - ;; - rfi - -1: mov pr=r31,-1 - ;; - FAULT(26) -END(nat_consumption) - - .org ia64_ivt+0x5700 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5700 Entry 27 (size 16 bundles) Speculation (40) -ENTRY(speculation_vector) - DBG_FAULT(27) - /* - * A [f]chk.[as] instruction needs to take the branch to the recovery code but - * this part of the architecture is not implemented in hardware on some CPUs, such - * as Itanium. Thus, in general we need to emulate the behavior. IIM contains - * the relative target (not yet sign extended). So after sign extending it we - * simply add it to IIP. We also need to reset the EI field of the IPSR to zero, - * i.e., the slot to restart into. - * - * cr.imm contains zero_ext(imm21) - */ - mov r18=cr.iim - ;; - mov r17=cr.iip - shl r18=r18,43 // put sign bit in position (43=64-21) - ;; - - mov r16=cr.ipsr - shr r18=r18,39 // sign extend (39=43-4) - ;; - - add r17=r17,r18 // now add the offset - ;; - mov cr.iip=r17 - dep r16=0,r16,41,2 // clear EI - ;; - - mov cr.ipsr=r16 - ;; - -#ifdef CONFIG_XEN - XEN_HYPER_RFI; -#else - rfi // and go back -#endif -END(speculation_vector) - - .org ia64_ivt+0x5800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5800 Entry 28 (size 16 bundles) Reserved - DBG_FAULT(28) - FAULT(28) - - .org ia64_ivt+0x5900 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5900 Entry 29 (size 16 bundles) Debug (16,28,56) -ENTRY(debug_vector) - DBG_FAULT(29) - FAULT(29) -END(debug_vector) - - .org ia64_ivt+0x5a00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5a00 Entry 30 (size 16 bundles) Unaligned Reference (57) -ENTRY(unaligned_access) - DBG_FAULT(30) - mov r31=pr // prepare to save predicates - ;; - br.sptk.many dispatch_unaligned_handler -END(unaligned_access) - - .org ia64_ivt+0x5b00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5b00 Entry 31 (size 16 bundles) Unsupported Data Reference (57) -ENTRY(unsupported_data_reference) - DBG_FAULT(31) - FAULT(31) -END(unsupported_data_reference) - - .org ia64_ivt+0x5c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5c00 Entry 32 (size 16 bundles) Floating-Point Fault (64) -ENTRY(floating_point_fault) - DBG_FAULT(32) - FAULT(32) -END(floating_point_fault) - - .org ia64_ivt+0x5d00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5d00 Entry 33 (size 16 bundles) Floating Point Trap (66) -ENTRY(floating_point_trap) - DBG_FAULT(33) - FAULT(33) -END(floating_point_trap) - - .org ia64_ivt+0x5e00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5e00 Entry 34 (size 16 bundles) Lower Privilege Transfer Trap (66) -ENTRY(lower_privilege_trap) - DBG_FAULT(34) - FAULT(34) -END(lower_privilege_trap) - - .org ia64_ivt+0x5f00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x5f00 Entry 35 (size 16 bundles) Taken Branch Trap (68) -ENTRY(taken_branch_trap) - DBG_FAULT(35) - FAULT(35) -END(taken_branch_trap) - - .org ia64_ivt+0x6000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6000 Entry 36 (size 16 bundles) Single Step Trap (69) -ENTRY(single_step_trap) - DBG_FAULT(36) - FAULT(36) -END(single_step_trap) - - .org ia64_ivt+0x6100 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6100 Entry 37 (size 16 bundles) Reserved - DBG_FAULT(37) - FAULT(37) - - .org ia64_ivt+0x6200 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6200 Entry 38 (size 16 bundles) Reserved - DBG_FAULT(38) - FAULT(38) - - .org ia64_ivt+0x6300 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6300 Entry 39 (size 16 bundles) Reserved - DBG_FAULT(39) - FAULT(39) - - .org ia64_ivt+0x6400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6400 Entry 40 (size 16 bundles) Reserved - DBG_FAULT(40) - FAULT(40) - - .org ia64_ivt+0x6500 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6500 Entry 41 (size 16 bundles) Reserved - DBG_FAULT(41) - FAULT(41) - - .org ia64_ivt+0x6600 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6600 Entry 42 (size 16 bundles) Reserved - DBG_FAULT(42) - FAULT(42) - - .org ia64_ivt+0x6700 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6700 Entry 43 (size 16 bundles) Reserved - DBG_FAULT(43) - FAULT(43) - - .org ia64_ivt+0x6800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6800 Entry 44 (size 16 bundles) Reserved - DBG_FAULT(44) - FAULT(44) - - .org ia64_ivt+0x6900 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6900 Entry 45 (size 16 bundles) IA-32 Exeception (17,18,29,41,42,43,44,58,60,61,62,72,73,75,76,77) -ENTRY(ia32_exception) - DBG_FAULT(45) - FAULT(45) -END(ia32_exception) - - .org ia64_ivt+0x6a00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6a00 Entry 46 (size 16 bundles) IA-32 Intercept (30,31,59,70,71) -ENTRY(ia32_intercept) - DBG_FAULT(46) -#ifdef CONFIG_IA32_SUPPORT - mov r31=pr - mov r16=cr.isr - ;; - extr.u r17=r16,16,8 // get ISR.code - mov r18=ar.eflag - mov r19=cr.iim // old eflag value - ;; - cmp.ne p6,p0=2,r17 -(p6) br.cond.spnt 1f // not a system flag fault - xor r16=r18,r19 - ;; - extr.u r17=r16,18,1 // get the eflags.ac bit - ;; - cmp.eq p6,p0=0,r17 -(p6) br.cond.spnt 1f // eflags.ac bit didn't change - ;; - mov pr=r31,-1 // restore predicate registers -#ifdef CONFIG_XEN - XEN_HYPER_RFI; -#else - rfi -#endif - -1: -#endif // CONFIG_IA32_SUPPORT - FAULT(46) -END(ia32_intercept) - - .org ia64_ivt+0x6b00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6b00 Entry 47 (size 16 bundles) IA-32 Interrupt (74) -ENTRY(ia32_interrupt) - DBG_FAULT(47) -#ifdef CONFIG_IA32_SUPPORT - mov r31=pr - br.sptk.many dispatch_to_ia32_handler -#else - FAULT(47) -#endif -END(ia32_interrupt) - - .org ia64_ivt+0x6c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6c00 Entry 48 (size 16 bundles) Reserved - DBG_FAULT(48) - FAULT(48) - - .org ia64_ivt+0x6d00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6d00 Entry 49 (size 16 bundles) Reserved - DBG_FAULT(49) - FAULT(49) - - .org ia64_ivt+0x6e00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6e00 Entry 50 (size 16 bundles) Reserved - DBG_FAULT(50) - FAULT(50) - - .org ia64_ivt+0x6f00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x6f00 Entry 51 (size 16 bundles) Reserved - DBG_FAULT(51) - FAULT(51) - - .org ia64_ivt+0x7000 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7000 Entry 52 (size 16 bundles) Reserved - DBG_FAULT(52) - FAULT(52) - - .org ia64_ivt+0x7100 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7100 Entry 53 (size 16 bundles) Reserved - DBG_FAULT(53) - FAULT(53) - - .org ia64_ivt+0x7200 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7200 Entry 54 (size 16 bundles) Reserved - DBG_FAULT(54) - FAULT(54) - - .org ia64_ivt+0x7300 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7300 Entry 55 (size 16 bundles) Reserved - DBG_FAULT(55) - FAULT(55) - - .org ia64_ivt+0x7400 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7400 Entry 56 (size 16 bundles) Reserved - DBG_FAULT(56) - FAULT(56) - - .org ia64_ivt+0x7500 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7500 Entry 57 (size 16 bundles) Reserved - DBG_FAULT(57) - FAULT(57) - - .org ia64_ivt+0x7600 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7600 Entry 58 (size 16 bundles) Reserved - DBG_FAULT(58) - FAULT(58) - - .org ia64_ivt+0x7700 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7700 Entry 59 (size 16 bundles) Reserved - DBG_FAULT(59) - FAULT(59) - - .org ia64_ivt+0x7800 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7800 Entry 60 (size 16 bundles) Reserved - DBG_FAULT(60) - FAULT(60) - - .org ia64_ivt+0x7900 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7900 Entry 61 (size 16 bundles) Reserved - DBG_FAULT(61) - FAULT(61) - - .org ia64_ivt+0x7a00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7a00 Entry 62 (size 16 bundles) Reserved - DBG_FAULT(62) - FAULT(62) - - .org ia64_ivt+0x7b00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7b00 Entry 63 (size 16 bundles) Reserved - DBG_FAULT(63) - FAULT(63) - - .org ia64_ivt+0x7c00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7c00 Entry 64 (size 16 bundles) Reserved - DBG_FAULT(64) - FAULT(64) - - .org ia64_ivt+0x7d00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7d00 Entry 65 (size 16 bundles) Reserved - DBG_FAULT(65) - FAULT(65) - - .org ia64_ivt+0x7e00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7e00 Entry 66 (size 16 bundles) Reserved - DBG_FAULT(66) - FAULT(66) - -#ifdef CONFIG_XEN - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - */ - -GLOBAL_ENTRY(xen_bsw1) - /* FIXME: THIS CODE IS NOT NaT SAFE! */ - movl r30=XSI_BANKNUM; - mov r31=1;; - st4 [r30]=r31; - movl r30=XSI_BANK1_R16; - movl r31=XSI_BANK1_R16+8;; - ld8 r16=[r30],16; ld8 r17=[r31],16;; - ld8 r18=[r30],16; ld8 r19=[r31],16;; - ld8 r20=[r30],16; ld8 r21=[r31],16;; - ld8 r22=[r30],16; ld8 r23=[r31],16;; - ld8 r24=[r30],16; ld8 r25=[r31],16;; - ld8 r26=[r30],16; ld8 r27=[r31],16;; - ld8 r28=[r30],16; ld8 r29=[r31],16;; - ld8 r30=[r30]; ld8 r31=[r31];; - br.ret.sptk.many b0 -END(xen_bsw1) -#endif - - .org ia64_ivt+0x7f00 -///////////////////////////////////////////////////////////////////////////////////////// -// 0x7f00 Entry 67 (size 16 bundles) Reserved - DBG_FAULT(67) - FAULT(67) - -#ifdef CONFIG_IA32_SUPPORT - - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - */ - - // IA32 interrupt entry point - -ENTRY(dispatch_to_ia32_handler) - SAVE_MIN - ;; - mov r14=cr.isr - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i - adds r3=8,r2 // Base pointer for SAVE_REST - ;; - SAVE_REST - ;; - mov r15=0x80 - shr r14=r14,16 // Get interrupt number - ;; - cmp.ne p6,p0=r14,r15 -(p6) br.call.dpnt.many b6=non_ia32_syscall - - adds r14=IA64_PT_REGS_R8_OFFSET + 16,sp // 16 byte hole per SW conventions - adds r15=IA64_PT_REGS_R1_OFFSET + 16,sp - ;; - cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 - ld8 r8=[r14] // get r8 - ;; - st8 [r15]=r8 // save original EAX in r1 (IA32 procs don't use the GP) - ;; - alloc r15=ar.pfs,0,0,6,0 // must first in an insn group - ;; - ld4 r8=[r14],8 // r8 == eax (syscall number) - mov r15=IA32_NR_syscalls - ;; - cmp.ltu.unc p6,p7=r8,r15 - ld4 out1=[r14],8 // r9 == ecx - ;; - ld4 out2=[r14],8 // r10 == edx - ;; - ld4 out0=[r14] // r11 == ebx - adds r14=(IA64_PT_REGS_R13_OFFSET) + 16,sp - ;; - ld4 out5=[r14],PT(R14)-PT(R13) // r13 == ebp - ;; - ld4 out3=[r14],PT(R15)-PT(R14) // r14 == esi - adds r2=TI_FLAGS+IA64_TASK_SIZE,r13 - ;; - ld4 out4=[r14] // r15 == edi - movl r16=ia32_syscall_table - ;; -(p6) shladd r16=r8,3,r16 // force ni_syscall if not valid syscall number - ld4 r2=[r2] // r2 = current_thread_info()->flags - ;; - ld8 r16=[r16] - and r2=_TIF_SYSCALL_TRACEAUDIT,r2 // mask trace or audit - ;; - mov b6=r16 - movl r15=ia32_ret_from_syscall - cmp.eq p8,p0=r2,r0 - ;; - mov rp=r15 -(p8) br.call.sptk.many b6=b6 - br.cond.sptk ia32_trace_syscall - -non_ia32_syscall: - alloc r15=ar.pfs,0,0,2,0 - mov out0=r14 // interrupt # - add out1=16,sp // pointer to pt_regs - ;; // avoid WAW on CFM - br.call.sptk.many rp=ia32_bad_interrupt -.ret1: movl r15=ia64_leave_kernel - ;; - mov rp=r15 - br.ret.sptk.many rp -END(dispatch_to_ia32_handler) -#endif /* CONFIG_IA32_SUPPORT */ - -#ifdef CONFIG_XEN - .section .text,"ax" -GLOBAL_ENTRY(xen_event_callback) - mov r31=pr // prepare to save predicates - ;; - SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 - ;; - movl r3=XSI_PSR_IC - mov r14=1 - ;; - st4 [r3]=r14 - ;; - adds r3=8,r2 // set up second base pointer for SAVE_REST - srlz.i // ensure everybody knows psr.ic is back on - ;; - SAVE_REST - ;; - alloc r14=ar.pfs,0,0,1,0 // must be first in an insn group - add out0=16,sp // pass pointer to pt_regs as first arg - ;; - srlz.d // make sure we see the effect of cr.ivr - movl r14=ia64_leave_kernel - ;; - mov rp=r14 - br.call.sptk.many b6=evtchn_do_upcall -END(xen_event_callback) -#endif diff --git a/arch/ia64/xen/xenminstate.h b/arch/ia64/xen/xenminstate.h deleted file mode 100644 index f92fc6eda..000000000 --- a/arch/ia64/xen/xenminstate.h +++ /dev/null @@ -1,368 +0,0 @@ - -#include - -#ifdef CONFIG_XEN -#include "../kernel/entry.h" -#else -#include "entry.h" -#endif - -/* - * For ivt.s we want to access the stack virtually so we don't have to disable translation - * on interrupts. - * - * On entry: - * r1: pointer to current task (ar.k6) - */ -#define MINSTATE_START_SAVE_MIN_VIRT \ -(pUStk) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ - ;; \ -(pUStk) mov.m r24=ar.rnat; \ -(pUStk) addl r22=IA64_RBS_OFFSET,r1; /* compute base of RBS */ \ -(pKStk) mov r1=sp; /* get sp */ \ - ;; \ -(pUStk) lfetch.fault.excl.nt1 [r22]; \ -(pUStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1; /* compute base of memory stack */ \ -(pUStk) mov r23=ar.bspstore; /* save ar.bspstore */ \ - ;; \ -(pUStk) mov ar.bspstore=r22; /* switch to kernel RBS */ \ -(pKStk) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ - ;; \ -(pUStk) mov r18=ar.bsp; \ -(pUStk) mov ar.rsc=0x3; /* set eager mode, pl 0, little-endian, loadrs=0 */ \ - -#define MINSTATE_END_SAVE_MIN_VIRT \ - bsw.1; /* switch back to bank 1 (must be last in insn group) */ \ - ;; - -/* - * For mca_asm.S we want to access the stack physically since the state is saved before we - * go virtual and don't want to destroy the iip or ipsr. - */ -#define MINSTATE_START_SAVE_MIN_PHYS \ -(pKStk) mov r3=IA64_KR(PER_CPU_DATA);; \ -(pKStk) addl r3=THIS_CPU(ia64_mca_data),r3;; \ -(pKStk) ld8 r3 = [r3];; \ -(pKStk) addl r3=IA64_MCA_CPU_INIT_STACK_OFFSET,r3;; \ -(pKStk) addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r3; \ -(pUStk) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ -(pUStk) addl r22=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ - ;; \ -(pUStk) mov r24=ar.rnat; \ -(pUStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1; /* compute base of memory stack */ \ -(pUStk) mov r23=ar.bspstore; /* save ar.bspstore */ \ -(pUStk) dep r22=-1,r22,61,3; /* compute kernel virtual addr of RBS */ \ - ;; \ -(pKStk) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ -(pUStk) mov ar.bspstore=r22; /* switch to kernel RBS */ \ - ;; \ -(pUStk) mov r18=ar.bsp; \ -(pUStk) mov ar.rsc=0x3; /* set eager mode, pl 0, little-endian, loadrs=0 */ \ - -#define MINSTATE_END_SAVE_MIN_PHYS \ - dep r12=-1,r12,61,3; /* make sp a kernel virtual address */ \ - ;; - -#ifdef MINSTATE_VIRT -# define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT) -# define MINSTATE_START_SAVE_MIN MINSTATE_START_SAVE_MIN_VIRT -# define MINSTATE_END_SAVE_MIN MINSTATE_END_SAVE_MIN_VIRT -#endif - -#ifdef MINSTATE_PHYS -# define MINSTATE_GET_CURRENT(reg) mov reg=IA64_KR(CURRENT);; tpa reg=reg -# define MINSTATE_START_SAVE_MIN MINSTATE_START_SAVE_MIN_PHYS -# define MINSTATE_END_SAVE_MIN MINSTATE_END_SAVE_MIN_PHYS -#endif - -/* - * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves - * the minimum state necessary that allows us to turn psr.ic back - * on. - * - * Assumed state upon entry: - * psr.ic: off - * r31: contains saved predicates (pr) - * - * Upon exit, the state is as follows: - * psr.ic: off - * r2 = points to &pt_regs.r16 - * r8 = contents of ar.ccv - * r9 = contents of ar.csd - * r10 = contents of ar.ssd - * r11 = FPSR_DEFAULT - * r12 = kernel sp (kernel virtual address) - * r13 = points to current task_struct (kernel virtual address) - * p15 = TRUE if psr.i is set in cr.ipsr - * predicate registers (other than p2, p3, and p15), b6, r3, r14, r15: - * preserved - * CONFIG_XEN note: p6/p7 are not preserved - * - * Note that psr.ic is NOT turned on by this macro. This is so that - * we can pass interruption state as arguments to a handler. - */ -#ifdef CONFIG_XEN -#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ - MINSTATE_GET_CURRENT(r16); /* M (or M;;I) */ \ - mov r27=ar.rsc; /* M */ \ - mov r20=r1; /* A */ \ - mov r25=ar.unat; /* M */ \ - /* mov r29=cr.ipsr; /* M */ \ - movl r29=XSI_IPSR;; \ - ld8 r29=[r29];; \ - mov r26=ar.pfs; /* I */ \ - /* mov r28=cr.iip; /* M */ \ - movl r28=XSI_IIP;; \ - ld8 r28=[r28];; \ - mov r21=ar.fpsr; /* M */ \ - COVER; /* B;; (or nothing) */ \ - ;; \ - adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ - ;; \ - ld1 r17=[r16]; /* load current->thread.on_ustack flag */ \ - st1 [r16]=r0; /* clear current->thread.on_ustack flag */ \ - adds r1=-IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 \ - /* switch from user to kernel RBS: */ \ - ;; \ - invala; /* M */ \ - /* SAVE_IFS; /* see xen special handling below */ \ - cmp.eq pKStk,pUStk=r0,r17; /* are we in kernel mode already? */ \ - ;; \ - MINSTATE_START_SAVE_MIN \ - adds r17=2*L1_CACHE_BYTES,r1; /* really: biggest cache-line size */ \ - adds r16=PT(CR_IPSR),r1; \ - ;; \ - lfetch.fault.excl.nt1 [r17],L1_CACHE_BYTES; \ - st8 [r16]=r29; /* save cr.ipsr */ \ - ;; \ - lfetch.fault.excl.nt1 [r17]; \ - tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ - mov r29=b0 \ - ;; \ - adds r16=PT(R8),r1; /* initialize first base pointer */ \ - adds r17=PT(R9),r1; /* initialize second base pointer */ \ -(pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r8,16; \ -.mem.offset 8,0; st8.spill [r17]=r9,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r10,24; \ -.mem.offset 8,0; st8.spill [r17]=r11,24; \ - ;; \ - /* xen special handling for possibly lazy cover */ \ - movl r8=XSI_INCOMPL_REGFR; \ - ;; \ - ld4 r30=[r8]; \ - ;; \ - /* set XSI_INCOMPL_REGFR 0 */ \ - st4 [r8]=r0; \ - cmp.eq p6,p7=r30,r0; \ - ;; /* not sure if this stop bit is necessary */ \ -(p6) adds r8=XSI_PRECOVER_IFS-XSI_INCOMPL_REGFR,r8; \ -(p7) adds r8=XSI_IFS-XSI_INCOMPL_REGFR,r8; \ - ;; \ - ld8 r30=[r8]; \ - ;; \ - st8 [r16]=r28,16; /* save cr.iip */ \ - st8 [r17]=r30,16; /* save cr.ifs */ \ -(pUStk) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ \ - mov r8=ar.ccv; \ - mov r9=ar.csd; \ - mov r10=ar.ssd; \ - movl r11=FPSR_DEFAULT; /* L-unit */ \ - ;; \ - st8 [r16]=r25,16; /* save ar.unat */ \ - st8 [r17]=r26,16; /* save ar.pfs */ \ - shl r18=r18,16; /* compute ar.rsc to be used for "loadrs" */ \ - ;; \ - st8 [r16]=r27,16; /* save ar.rsc */ \ -(pUStk) st8 [r17]=r24,16; /* save ar.rnat */ \ -(pKStk) adds r17=16,r17; /* skip over ar_rnat field */ \ - ;; /* avoid RAW on r16 & r17 */ \ -(pUStk) st8 [r16]=r23,16; /* save ar.bspstore */ \ - st8 [r17]=r31,16; /* save predicates */ \ -(pKStk) adds r16=16,r16; /* skip over ar_bspstore field */ \ - ;; \ - st8 [r16]=r29,16; /* save b0 */ \ - st8 [r17]=r18,16; /* save ar.rsc value for "loadrs" */ \ - cmp.eq pNonSys,pSys=r0,r0 /* initialize pSys=0, pNonSys=1 */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r20,16; /* save original r1 */ \ -.mem.offset 8,0; st8.spill [r17]=r12,16; \ - adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r13,16; \ -.mem.offset 8,0; st8.spill [r17]=r21,16; /* save ar.fpsr */ \ - mov r13=IA64_KR(CURRENT); /* establish `current' */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r15,16; \ -.mem.offset 8,0; st8.spill [r17]=r14,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r2,16; \ -.mem.offset 8,0; st8.spill [r17]=r3,16; \ - ;; \ - EXTRA; \ - mov r2=b0; br.call.sptk b0=xen_bsw1;; mov b0=r2; \ - adds r2=IA64_PT_REGS_R16_OFFSET,r1; \ - ;; \ - movl r1=__gp; /* establish kernel global pointer */ \ - ;; \ - /* MINSTATE_END_SAVE_MIN */ -#else -#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ - MINSTATE_GET_CURRENT(r16); /* M (or M;;I) */ \ - mov r27=ar.rsc; /* M */ \ - mov r20=r1; /* A */ \ - mov r25=ar.unat; /* M */ \ - mov r29=cr.ipsr; /* M */ \ - mov r26=ar.pfs; /* I */ \ - mov r28=cr.iip; /* M */ \ - mov r21=ar.fpsr; /* M */ \ - COVER; /* B;; (or nothing) */ \ - ;; \ - adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ - ;; \ - ld1 r17=[r16]; /* load current->thread.on_ustack flag */ \ - st1 [r16]=r0; /* clear current->thread.on_ustack flag */ \ - adds r1=-IA64_TASK_THREAD_ON_USTACK_OFFSET,r16 \ - /* switch from user to kernel RBS: */ \ - ;; \ - invala; /* M */ \ - SAVE_IFS; \ - cmp.eq pKStk,pUStk=r0,r17; /* are we in kernel mode already? */ \ - ;; \ - MINSTATE_START_SAVE_MIN \ - adds r17=2*L1_CACHE_BYTES,r1; /* really: biggest cache-line size */ \ - adds r16=PT(CR_IPSR),r1; \ - ;; \ - lfetch.fault.excl.nt1 [r17],L1_CACHE_BYTES; \ - st8 [r16]=r29; /* save cr.ipsr */ \ - ;; \ - lfetch.fault.excl.nt1 [r17]; \ - tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ - mov r29=b0 \ - ;; \ - adds r16=PT(R8),r1; /* initialize first base pointer */ \ - adds r17=PT(R9),r1; /* initialize second base pointer */ \ -(pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r8,16; \ -.mem.offset 8,0; st8.spill [r17]=r9,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r10,24; \ -.mem.offset 8,0; st8.spill [r17]=r11,24; \ - ;; \ - st8 [r16]=r28,16; /* save cr.iip */ \ - st8 [r17]=r30,16; /* save cr.ifs */ \ -(pUStk) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ \ - mov r8=ar.ccv; \ - mov r9=ar.csd; \ - mov r10=ar.ssd; \ - movl r11=FPSR_DEFAULT; /* L-unit */ \ - ;; \ - st8 [r16]=r25,16; /* save ar.unat */ \ - st8 [r17]=r26,16; /* save ar.pfs */ \ - shl r18=r18,16; /* compute ar.rsc to be used for "loadrs" */ \ - ;; \ - st8 [r16]=r27,16; /* save ar.rsc */ \ -(pUStk) st8 [r17]=r24,16; /* save ar.rnat */ \ -(pKStk) adds r17=16,r17; /* skip over ar_rnat field */ \ - ;; /* avoid RAW on r16 & r17 */ \ -(pUStk) st8 [r16]=r23,16; /* save ar.bspstore */ \ - st8 [r17]=r31,16; /* save predicates */ \ -(pKStk) adds r16=16,r16; /* skip over ar_bspstore field */ \ - ;; \ - st8 [r16]=r29,16; /* save b0 */ \ - st8 [r17]=r18,16; /* save ar.rsc value for "loadrs" */ \ - cmp.eq pNonSys,pSys=r0,r0 /* initialize pSys=0, pNonSys=1 */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r20,16; /* save original r1 */ \ -.mem.offset 8,0; st8.spill [r17]=r12,16; \ - adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r13,16; \ -.mem.offset 8,0; st8.spill [r17]=r21,16; /* save ar.fpsr */ \ - mov r13=IA64_KR(CURRENT); /* establish `current' */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r15,16; \ -.mem.offset 8,0; st8.spill [r17]=r14,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r2,16; \ -.mem.offset 8,0; st8.spill [r17]=r3,16; \ - adds r2=IA64_PT_REGS_R16_OFFSET,r1; \ - ;; \ - EXTRA; \ - movl r1=__gp; /* establish kernel global pointer */ \ - ;; \ - MINSTATE_END_SAVE_MIN -#endif - -/* - * SAVE_REST saves the remainder of pt_regs (with psr.ic on). - * - * Assumed state upon entry: - * psr.ic: on - * r2: points to &pt_regs.r16 - * r3: points to &pt_regs.r17 - * r8: contents of ar.ccv - * r9: contents of ar.csd - * r10: contents of ar.ssd - * r11: FPSR_DEFAULT - * - * Registers r14 and r15 are guaranteed not to be touched by SAVE_REST. - */ -#define SAVE_REST \ -.mem.offset 0,0; st8.spill [r2]=r16,16; \ -.mem.offset 8,0; st8.spill [r3]=r17,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r18,16; \ -.mem.offset 8,0; st8.spill [r3]=r19,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r20,16; \ -.mem.offset 8,0; st8.spill [r3]=r21,16; \ - mov r18=b6; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r22,16; \ -.mem.offset 8,0; st8.spill [r3]=r23,16; \ - mov r19=b7; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r24,16; \ -.mem.offset 8,0; st8.spill [r3]=r25,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r26,16; \ -.mem.offset 8,0; st8.spill [r3]=r27,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r28,16; \ -.mem.offset 8,0; st8.spill [r3]=r29,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r30,16; \ -.mem.offset 8,0; st8.spill [r3]=r31,32; \ - ;; \ - mov ar.fpsr=r11; /* M-unit */ \ - st8 [r2]=r8,8; /* ar.ccv */ \ - adds r24=PT(B6)-PT(F7),r3; \ - ;; \ - stf.spill [r2]=f6,32; \ - stf.spill [r3]=f7,32; \ - ;; \ - stf.spill [r2]=f8,32; \ - stf.spill [r3]=f9,32; \ - ;; \ - stf.spill [r2]=f10; \ - stf.spill [r3]=f11; \ - adds r25=PT(B7)-PT(F11),r3; \ - ;; \ - st8 [r24]=r18,16; /* b6 */ \ - st8 [r25]=r19,16; /* b7 */ \ - ;; \ - st8 [r24]=r9; /* ar.csd */ \ - st8 [r25]=r10; /* ar.ssd */ \ - ;; - -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) -#ifdef CONFIG_XEN -#define SAVE_MIN break 0;; /* FIXME: non-cover version only for ia32 support? */ -#else -#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) -#endif diff --git a/arch/ia64/xen/xenpal.S b/arch/ia64/xen/xenpal.S deleted file mode 100644 index 5f9681e49..000000000 --- a/arch/ia64/xen/xenpal.S +++ /dev/null @@ -1,76 +0,0 @@ -/* - * ia64/xen/xenpal.S - * - * Alternate PAL routines for Xen. Heavily leveraged from - * ia64/kernel/pal.S - * - * Copyright (C) 2005 Hewlett-Packard Co - * Dan Magenheimer - */ - -#include -#include - -GLOBAL_ENTRY(xen_pal_call_static) - .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(5) - alloc loc1 = ar.pfs,5,5,0,0 -#ifdef CONFIG_XEN - movl r22=running_on_xen;; - ld4 r22=[r22];; - cmp.eq p7,p0=r22,r0 -(p7) br.cond.spnt.many __ia64_pal_call_static;; -#endif - movl loc2 = pal_entry_point -1: { - mov r28 = in0 - mov r29 = in1 - mov r8 = ip - } - ;; - ld8 loc2 = [loc2] // loc2 <- entry point - tbit.nz p6,p7 = in4, 0 - adds r8 = 1f-1b,r8 - mov loc4=ar.rsc // save RSE configuration - ;; - mov ar.rsc=0 // put RSE in enforced lazy, LE mode - mov loc3 = psr - mov loc0 = rp - .body - mov r30 = in2 - -#ifdef CONFIG_XEN - // this is low priority for paravirtualization, but is called - // from the idle loop so confuses privop counting - movl r31=XSI_PSR_IC - ;; -(p6) st4 [r31]=r0 - ;; -(p7) adds r31=XSI_PSR_I_ADDR_OFS-XSI_PSR_IC_OFS,r31 -(p7) mov r22=1 - ;; -(p7) ld8 r31=[r31] - ;; -(p7) st1 [r31]=r22 - ;; - mov r31 = in3 - mov b7 = loc2 - ;; -#else -(p6) rsm psr.i | psr.ic - mov r31 = in3 - mov b7 = loc2 - -(p7) rsm psr.i - ;; -(p6) srlz.i -#endif - mov rp = r8 - br.cond.sptk.many b7 -1: mov psr.l = loc3 - mov ar.rsc = loc4 // restore RSE configuration - mov ar.pfs = loc1 - mov rp = loc0 - ;; - srlz.d // seralize restoration of psr.l - br.ret.sptk.many b0 -END(xen_pal_call_static) diff --git a/arch/ia64/xen/xensetup.S b/arch/ia64/xen/xensetup.S deleted file mode 100644 index a2beb1cfd..000000000 --- a/arch/ia64/xen/xensetup.S +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Support routines for Xen - * - * Copyright (C) 2005 Dan Magenheimer - */ - -#include -#include - -#define isBP p3 // are we the Bootstrap Processor? - - .text -GLOBAL_ENTRY(early_xen_setup) - mov r8=ar.rsc // Initialized in head.S -(isBP) movl r9=running_on_xen;; - extr.u r8=r8,2,2;; // Extract pl fields - cmp.eq p7,p0=r8,r0 // p7: !running on xen - mov r8=1 // booleanize. -(p7) br.ret.sptk.many rp;; -(isBP) st4 [r9]=r8 - movl r10=xen_ivt;; - - mov cr.iva=r10 - -#if XSI_BASE != 0xf100000000000000UL - /* Backward compatibility. */ -(isBP) mov r2=0x600 -(isBP) movl r28=XSI_BASE;; -(isBP) break 0x1000;; -#endif - - br.ret.sptk.many rp - ;; -END(early_xen_setup) - -#include - -/* Stub for suspend. - Just force the stacked registers to be written in memory. */ -GLOBAL_ENTRY(HYPERVISOR_suspend) - alloc r20=ar.pfs,0,0,0,0 - mov r14=2 - mov r15=r12 - ;; - /* We don't want to deal with RSE. */ - flushrs - mov r2=__HYPERVISOR_sched_op - st4 [r12]=r14 - ;; - break 0x1000 - ;; - mov ar.pfs=r20 - br.ret.sptk.many b0 -END(HYPERVISOR_suspend) diff --git a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S index 95a0563ff..234d8b1e0 100644 --- a/arch/m32r/boot/compressed/head.S +++ b/arch/m32r/boot/compressed/head.S @@ -7,6 +7,7 @@ */ .text +#include #include #include #include diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c index bce8af5e3..8f9a57271 100644 --- a/arch/m32r/boot/compressed/m32r_sio.c +++ b/arch/m32r/boot/compressed/m32r_sio.c @@ -5,6 +5,7 @@ * */ +#include #include static void putc(char c); diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 600d40e33..70fa79900 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c @@ -12,6 +12,7 @@ * This is based on arch/sh/boot/compressed/misc.c. */ +#include #include /* diff --git a/arch/m32r/boot/compressed/vmlinux.lds.S b/arch/m32r/boot/compressed/vmlinux.lds.S index dd11963f6..a18431759 100644 --- a/arch/m32r/boot/compressed/vmlinux.lds.S +++ b/arch/m32r/boot/compressed/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include OUTPUT_ARCH(m32r) ENTRY(startup) diff --git a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S index ef843d630..398542507 100644 --- a/arch/m32r/boot/setup.S +++ b/arch/m32r/boot/setup.S @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/m32r/kernel/align.c b/arch/m32r/kernel/align.c index ab871ccd3..48ec29714 100644 --- a/arch/m32r/kernel/align.c +++ b/arch/m32r/kernel/align.c @@ -4,6 +4,7 @@ * Copyright (c) 2003 Hitoshi Yamamoto */ +#include #include #include diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 5b01fd209..920bb742b 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S @@ -23,37 +23,38 @@ * updated in fork.c:copy_thread, signal.c:do_signal, * ptrace.c and ptrace.h * - * M32R/M32Rx/M32R2 - * @(sp) - r4 - * @(0x04,sp) - r5 - * @(0x08,sp) - r6 - * @(0x0c,sp) - *pt_regs - * @(0x10,sp) - r0 - * @(0x14,sp) - r1 - * @(0x18,sp) - r2 - * @(0x1c,sp) - r3 - * @(0x20,sp) - r7 - * @(0x24,sp) - r8 - * @(0x28,sp) - r9 - * @(0x2c,sp) - r10 - * @(0x30,sp) - r11 - * @(0x34,sp) - r12 - * @(0x38,sp) - syscall_nr - * @(0x3c,sp) - acc0h - * @(0x40,sp) - acc0l - * @(0x44,sp) - acc1h ; ISA_DSP_LEVEL2 only - * @(0x48,sp) - acc1l ; ISA_DSP_LEVEL2 only - * @(0x4c,sp) - psw - * @(0x50,sp) - bpc - * @(0x54,sp) - bbpsw - * @(0x58,sp) - bbpc - * @(0x5c,sp) - spu (cr3) - * @(0x60,sp) - fp (r13) - * @(0x64,sp) - lr (r14) - * @(0x68,sp) - spi (cr2) - * @(0x6c,sp) - orig_r0 + * M32Rx/M32R2 M32R + * @(sp) - r4 ditto + * @(0x04,sp) - r5 ditto + * @(0x08,sp) - r6 ditto + * @(0x0c,sp) - *pt_regs ditto + * @(0x10,sp) - r0 ditto + * @(0x14,sp) - r1 ditto + * @(0x18,sp) - r2 ditto + * @(0x1c,sp) - r3 ditto + * @(0x20,sp) - r7 ditto + * @(0x24,sp) - r8 ditto + * @(0x28,sp) - r9 ditto + * @(0x2c,sp) - r10 ditto + * @(0x30,sp) - r11 ditto + * @(0x34,sp) - r12 ditto + * @(0x38,sp) - syscall_nr ditto + * @(0x3c,sp) - acc0h @(0x3c,sp) - acch + * @(0x40,sp) - acc0l @(0x40,sp) - accl + * @(0x44,sp) - acc1h @(0x44,sp) - dummy_acc1h + * @(0x48,sp) - acc1l @(0x48,sp) - dummy_acc1l + * @(0x4c,sp) - psw ditto + * @(0x50,sp) - bpc ditto + * @(0x54,sp) - bbpsw ditto + * @(0x58,sp) - bbpc ditto + * @(0x5c,sp) - spu (cr3) ditto + * @(0x60,sp) - fp (r13) ditto + * @(0x64,sp) - lr (r14) ditto + * @(0x68,sp) - spi (cr2) ditto + * @(0x6c,sp) - orig_r0 ditto */ +#include #include #include #include @@ -95,10 +96,17 @@ #define R11(reg) @(0x30,reg) #define R12(reg) @(0x34,reg) #define SYSCALL_NR(reg) @(0x38,reg) +#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) #define ACC0H(reg) @(0x3C,reg) #define ACC0L(reg) @(0x40,reg) #define ACC1H(reg) @(0x44,reg) #define ACC1L(reg) @(0x48,reg) +#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) +#define ACCH(reg) @(0x3C,reg) +#define ACCL(reg) @(0x40,reg) +#else +#error unknown isa configuration +#endif #define PSW(reg) @(0x4C,reg) #define BPC(reg) @(0x50,reg) #define BBPSW(reg) @(0x54,reg) diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index 0d3c8ee0e..3e8317399 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S @@ -14,6 +14,7 @@ __INIT __INITDATA .text +#include #include #include #include diff --git a/arch/m32r/kernel/io_m32104ut.c b/arch/m32r/kernel/io_m32104ut.c index 2189eca30..d26adab95 100644 --- a/arch/m32r/kernel/io_m32104ut.c +++ b/arch/m32r/kernel/io_m32104ut.c @@ -8,6 +8,7 @@ * Naoto Sugai, Hayato Fujiwara */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c index 5898f4031..939932d6c 100644 --- a/arch/m32r/kernel/io_m32700ut.c +++ b/arch/m32r/kernel/io_m32700ut.c @@ -11,6 +11,7 @@ * archive for more details. */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c index 31396789a..a662b537c 100644 --- a/arch/m32r/kernel/io_mappi.c +++ b/arch/m32r/kernel/io_mappi.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c index ecc6aa88f..e72d72560 100644 --- a/arch/m32r/kernel/io_mappi2.c +++ b/arch/m32r/kernel/io_mappi2.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c index a13b5f6b0..ed6da930b 100644 --- a/arch/m32r/kernel/io_mappi3.c +++ b/arch/m32r/kernel/io_mappi3.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c index 068bf4706..910dd131c 100644 --- a/arch/m32r/kernel/io_oaks32r.c +++ b/arch/m32r/kernel/io_oaks32r.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index da6c5f5c1..bec69297d 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c @@ -11,6 +11,7 @@ * archive for more details. */ +#include #include #include #include diff --git a/arch/m32r/kernel/io_usrv.c b/arch/m32r/kernel/io_usrv.c index a8c0e2ece..39a379af4 100644 --- a/arch/m32r/kernel/io_usrv.c +++ b/arch/m32r/kernel/io_usrv.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index 3841861df..a4634b06f 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c @@ -54,7 +54,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index 8cbbb0b11..c50330fa8 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c index 8d4205794..f6a79a016 100644 --- a/arch/m32r/kernel/module.c +++ b/arch/m32r/kernel/module.c @@ -15,6 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 44cbe0ce0..065f5e719 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 5f02b3144..340a3bf59 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c @@ -14,6 +14,7 @@ * Copyright (C) 2000 Russell King */ +#include #include #include #include diff --git a/arch/m32r/kernel/semaphore.c b/arch/m32r/kernel/semaphore.c index 940c2d37c..9a6e6d754 100644 --- a/arch/m32r/kernel/semaphore.c +++ b/arch/m32r/kernel/semaphore.c @@ -21,6 +21,7 @@ * * rw semaphores implemented November 1999 by Benjamin LaHaise */ +#include #include #include #include diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 3f35ab3d2..3cd3c2988 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto */ +#include #include #include #include @@ -21,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -274,7 +275,7 @@ static int __init topology_init(void) int i; for_each_present_cpu(i) - register_cpu(&cpu_devices[i], i); + register_cpu(&cpu_devices[i], i, NULL); return 0; } diff --git a/arch/m32r/kernel/setup_m32104ut.c b/arch/m32r/kernel/setup_m32104ut.c index 1692b321f..6328e1357 100644 --- a/arch/m32r/kernel/setup_m32104ut.c +++ b/arch/m32r/kernel/setup_m32104ut.c @@ -8,6 +8,7 @@ * Naoto Sugai, Hayato Fujiwara */ +#include #include #include #include @@ -86,7 +87,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SMC91X) /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT0].chip = &m32104ut_irq_type; + irq_desc[M32R_IRQ_INT0].handler = &m32104ut_irq_type; irq_desc[M32R_IRQ_INT0].action = 0; irq_desc[M32R_IRQ_INT0].depth = 1; icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */ @@ -95,7 +96,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &m32104ut_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &m32104ut_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -104,7 +105,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_SIO /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &m32104ut_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &m32104ut_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; @@ -112,7 +113,7 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &m32104ut_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &m32104ut_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c index 7efc145c7..fad1fc99b 100644 --- a/arch/m32r/kernel/setup_m32700ut.c +++ b/arch/m32r/kernel/setup_m32700ut.c @@ -11,6 +11,7 @@ * archive for more details. */ +#include #include #include #include @@ -300,7 +301,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SMC91X) /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED; - irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type; + irq_desc[M32700UT_LAN_IRQ_LAN].handler = &m32700ut_lanpld_irq_type; irq_desc[M32700UT_LAN_IRQ_LAN].action = 0; irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ @@ -309,7 +310,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -317,7 +318,7 @@ void __init init_IRQ(void) /* SIO0 : receive */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -325,7 +326,7 @@ void __init init_IRQ(void) /* SIO0 : send */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; @@ -333,7 +334,7 @@ void __init init_IRQ(void) /* SIO1 : receive */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -341,7 +342,7 @@ void __init init_IRQ(void) /* SIO1 : send */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -349,7 +350,7 @@ void __init init_IRQ(void) /* DMA1 : */ irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_DMA1].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_DMA1].action = 0; irq_desc[M32R_IRQ_DMA1].depth = 1; icu_data[M32R_IRQ_DMA1].icucr = 0; @@ -358,7 +359,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_PLDSIO /* INT#1: SIO0 Receive on PLD */ irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_SIO0_RCV].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_SIO0_RCV].action = 0; irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; @@ -366,7 +367,7 @@ void __init init_IRQ(void) /* INT#1: SIO0 Send on PLD */ irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_SIO0_SND].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_SIO0_SND].action = 0; irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; @@ -375,7 +376,7 @@ void __init init_IRQ(void) /* INT#1: CFC IREQ on PLD */ irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_CFIREQ].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_CFIREQ].action = 0; irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ @@ -383,7 +384,7 @@ void __init init_IRQ(void) /* INT#1: CFC Insert on PLD */ irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_CFC_INSERT].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_CFC_INSERT].action = 0; irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ @@ -391,7 +392,7 @@ void __init init_IRQ(void) /* INT#1: CFC Eject on PLD */ irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_CFC_EJECT].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_CFC_EJECT].action = 0; irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ @@ -415,7 +416,7 @@ void __init init_IRQ(void) outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; - irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type; + irq_desc[M32700UT_LCD_IRQ_USB_INT1].handler = &m32700ut_lcdpld_irq_type; irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0; irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1; lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ @@ -433,7 +434,7 @@ void __init init_IRQ(void) * INT3# is used for AR */ irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type; + irq_desc[M32R_IRQ_INT3].handler = &m32700ut_irq_type; irq_desc[M32R_IRQ_INT3].action = 0; irq_desc[M32R_IRQ_INT3].depth = 1; icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 67dbbdc9d..00f253209 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto */ +#include #include #include #include @@ -85,7 +86,7 @@ void __init init_IRQ(void) #ifdef CONFIG_NE2000 /* INT0 : LAN controller (RTL8019AS) */ irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_INT0].handler = &mappi_irq_type; irq_desc[M32R_IRQ_INT0].action = 0; irq_desc[M32R_IRQ_INT0].depth = 1; icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; @@ -94,7 +95,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &mappi_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -103,7 +104,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_SIO /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -111,7 +112,7 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; @@ -119,7 +120,7 @@ void __init init_IRQ(void) /* SIO1_R : uart receive data */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -127,7 +128,7 @@ void __init init_IRQ(void) /* SIO1_S : uart send data */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -137,7 +138,7 @@ void __init init_IRQ(void) #if defined(CONFIG_M32R_PCC) /* INT1 : pccard0 interrupt */ irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_INT1].handler = &mappi_irq_type; irq_desc[M32R_IRQ_INT1].action = 0; irq_desc[M32R_IRQ_INT1].depth = 1; icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; @@ -145,7 +146,7 @@ void __init init_IRQ(void) /* INT2 : pccard1 interrupt */ irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_INT2].handler = &mappi_irq_type; irq_desc[M32R_IRQ_INT2].action = 0; irq_desc[M32R_IRQ_INT2].depth = 1; icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c index 55abb2102..eebc9d8b4 100644 --- a/arch/m32r/kernel/setup_mappi2.c +++ b/arch/m32r/kernel/setup_mappi2.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include @@ -86,7 +87,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SMC91X) /* INT0 : LAN controller (SMC91111) */ irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT0].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_INT0].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_INT0].action = 0; irq_desc[M32R_IRQ_INT0].depth = 1; icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; @@ -95,7 +96,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -104,7 +105,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_SIO /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -112,14 +113,14 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; disable_mappi2_irq(M32R_IRQ_SIO0_S); /* SIO1_R : uart receive data */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -127,7 +128,7 @@ void __init init_IRQ(void) /* SIO1_S : uart send data */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -137,7 +138,7 @@ void __init init_IRQ(void) #if defined(CONFIG_USB) /* INT1 : USB Host controller interrupt */ irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT1].chip = &mappi2_irq_type; + irq_desc[M32R_IRQ_INT1].handler = &mappi2_irq_type; irq_desc[M32R_IRQ_INT1].action = 0; irq_desc[M32R_IRQ_INT1].depth = 1; icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; @@ -146,7 +147,7 @@ void __init init_IRQ(void) /* ICUCR40: CFC IREQ */ irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi2_irq_type; + irq_desc[PLD_IRQ_CFIREQ].handler = &mappi2_irq_type; irq_desc[PLD_IRQ_CFIREQ].action = 0; irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; @@ -155,7 +156,7 @@ void __init init_IRQ(void) #if defined(CONFIG_M32R_CFC) /* ICUCR41: CFC Insert */ irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi2_irq_type; + irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi2_irq_type; irq_desc[PLD_IRQ_CFC_INSERT].action = 0; irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; @@ -163,7 +164,7 @@ void __init init_IRQ(void) /* ICUCR42: CFC Eject */ irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_EJECT].chip = &mappi2_irq_type; + irq_desc[PLD_IRQ_CFC_EJECT].handler = &mappi2_irq_type; irq_desc[PLD_IRQ_CFC_EJECT].action = 0; irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c index 93dc010c7..d2ff021e2 100644 --- a/arch/m32r/kernel/setup_mappi3.c +++ b/arch/m32r/kernel/setup_mappi3.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include @@ -86,7 +87,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SMC91X) /* INT0 : LAN controller (SMC91111) */ irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT0].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_INT0].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_INT0].action = 0; irq_desc[M32R_IRQ_INT0].depth = 1; icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; @@ -95,7 +96,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -104,7 +105,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_SIO /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -112,14 +113,14 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; disable_mappi3_irq(M32R_IRQ_SIO0_S); /* SIO1_R : uart receive data */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -127,7 +128,7 @@ void __init init_IRQ(void) /* SIO1_S : uart send data */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -137,7 +138,7 @@ void __init init_IRQ(void) #if defined(CONFIG_USB) /* INT1 : USB Host controller interrupt */ irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT1].chip = &mappi3_irq_type; + irq_desc[M32R_IRQ_INT1].handler = &mappi3_irq_type; irq_desc[M32R_IRQ_INT1].action = 0; irq_desc[M32R_IRQ_INT1].depth = 1; icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; @@ -146,7 +147,7 @@ void __init init_IRQ(void) /* CFC IREQ */ irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFIREQ].chip = &mappi3_irq_type; + irq_desc[PLD_IRQ_CFIREQ].handler = &mappi3_irq_type; irq_desc[PLD_IRQ_CFIREQ].action = 0; irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; @@ -155,7 +156,7 @@ void __init init_IRQ(void) #if defined(CONFIG_M32R_CFC) /* ICUCR41: CFC Insert & eject */ irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi3_irq_type; + irq_desc[PLD_IRQ_CFC_INSERT].handler = &mappi3_irq_type; irq_desc[PLD_IRQ_CFC_INSERT].action = 0; irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; @@ -165,7 +166,7 @@ void __init init_IRQ(void) /* IDE IREQ */ irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_IDEIREQ].chip = &mappi3_irq_type; + irq_desc[PLD_IRQ_IDEIREQ].handler = &mappi3_irq_type; irq_desc[PLD_IRQ_IDEIREQ].action = 0; irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */ icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c index cd62598e3..0e9e63538 100644 --- a/arch/m32r/kernel/setup_oaks32r.c +++ b/arch/m32r/kernel/setup_oaks32r.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto, Mamoru Sakugawa */ +#include #include #include #include @@ -84,7 +85,7 @@ void __init init_IRQ(void) #ifdef CONFIG_NE2000 /* INT3 : LAN controller (RTL8019AS) */ irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT3].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_INT3].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_INT3].action = 0; irq_desc[M32R_IRQ_INT3].depth = 1; icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; @@ -93,7 +94,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -102,7 +103,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_SIO /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -110,7 +111,7 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; @@ -118,7 +119,7 @@ void __init init_IRQ(void) /* SIO1_R : uart receive data */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -126,7 +127,7 @@ void __init init_IRQ(void) /* SIO1_S : uart send data */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &oaks32r_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &oaks32r_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index 61d3b01cb..548e8fc79 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c @@ -12,6 +12,7 @@ * archive for more details. */ +#include #include #include #include @@ -301,7 +302,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SMC91X) /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; - irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; + irq_desc[OPSPUT_LAN_IRQ_LAN].handler = &opsput_lanpld_irq_type; irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0; irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ @@ -310,7 +311,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &opsput_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -318,7 +319,7 @@ void __init init_IRQ(void) /* SIO0 : receive */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &opsput_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -326,7 +327,7 @@ void __init init_IRQ(void) /* SIO0 : send */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &opsput_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; @@ -334,7 +335,7 @@ void __init init_IRQ(void) /* SIO1 : receive */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &opsput_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -342,7 +343,7 @@ void __init init_IRQ(void) /* SIO1 : send */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &opsput_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -350,7 +351,7 @@ void __init init_IRQ(void) /* DMA1 : */ irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_DMA1].handler = &opsput_irq_type; irq_desc[M32R_IRQ_DMA1].action = 0; irq_desc[M32R_IRQ_DMA1].depth = 1; icu_data[M32R_IRQ_DMA1].icucr = 0; @@ -359,7 +360,7 @@ void __init init_IRQ(void) #ifdef CONFIG_SERIAL_M32R_PLDSIO /* INT#1: SIO0 Receive on PLD */ irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; + irq_desc[PLD_IRQ_SIO0_RCV].handler = &opsput_pld_irq_type; irq_desc[PLD_IRQ_SIO0_RCV].action = 0; irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; @@ -367,7 +368,7 @@ void __init init_IRQ(void) /* INT#1: SIO0 Send on PLD */ irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; + irq_desc[PLD_IRQ_SIO0_SND].handler = &opsput_pld_irq_type; irq_desc[PLD_IRQ_SIO0_SND].action = 0; irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; @@ -377,7 +378,7 @@ void __init init_IRQ(void) #if defined(CONFIG_M32R_CFC) /* INT#1: CFC IREQ on PLD */ irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; + irq_desc[PLD_IRQ_CFIREQ].handler = &opsput_pld_irq_type; irq_desc[PLD_IRQ_CFIREQ].action = 0; irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ @@ -385,7 +386,7 @@ void __init init_IRQ(void) /* INT#1: CFC Insert on PLD */ irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; + irq_desc[PLD_IRQ_CFC_INSERT].handler = &opsput_pld_irq_type; irq_desc[PLD_IRQ_CFC_INSERT].action = 0; irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ @@ -393,7 +394,7 @@ void __init init_IRQ(void) /* INT#1: CFC Eject on PLD */ irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; + irq_desc[PLD_IRQ_CFC_EJECT].handler = &opsput_pld_irq_type; irq_desc[PLD_IRQ_CFC_EJECT].action = 0; irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ @@ -419,7 +420,7 @@ void __init init_IRQ(void) outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; - irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; + irq_desc[OPSPUT_LCD_IRQ_USB_INT1].handler = &opsput_lcdpld_irq_type; irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1; lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ @@ -437,7 +438,7 @@ void __init init_IRQ(void) * INT3# is used for AR */ irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; + irq_desc[M32R_IRQ_INT3].handler = &opsput_irq_type; irq_desc[M32R_IRQ_INT3].action = 0; irq_desc[M32R_IRQ_INT3].depth = 1; icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c index f5b4b5ac3..64be659a2 100644 --- a/arch/m32r/kernel/setup_usrv.c +++ b/arch/m32r/kernel/setup_usrv.c @@ -7,6 +7,7 @@ * Hitoshi Yamamoto */ +#include #include #include #include @@ -157,7 +158,7 @@ void __init init_IRQ(void) /* MFT2 : system timer */ irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_MFT2].handler = &mappi_irq_type; irq_desc[M32R_IRQ_MFT2].action = 0; irq_desc[M32R_IRQ_MFT2].depth = 1; icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; @@ -166,7 +167,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SERIAL_M32R_SIO) /* SIO0_R : uart receive data */ irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO0_R].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO0_R].action = 0; irq_desc[M32R_IRQ_SIO0_R].depth = 1; icu_data[M32R_IRQ_SIO0_R].icucr = 0; @@ -174,7 +175,7 @@ void __init init_IRQ(void) /* SIO0_S : uart send data */ irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO0_S].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO0_S].action = 0; irq_desc[M32R_IRQ_SIO0_S].depth = 1; icu_data[M32R_IRQ_SIO0_S].icucr = 0; @@ -182,7 +183,7 @@ void __init init_IRQ(void) /* SIO1_R : uart receive data */ irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO1_R].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO1_R].action = 0; irq_desc[M32R_IRQ_SIO1_R].depth = 1; icu_data[M32R_IRQ_SIO1_R].icucr = 0; @@ -190,7 +191,7 @@ void __init init_IRQ(void) /* SIO1_S : uart send data */ irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; - irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; + irq_desc[M32R_IRQ_SIO1_S].handler = &mappi_irq_type; irq_desc[M32R_IRQ_SIO1_S].action = 0; irq_desc[M32R_IRQ_SIO1_S].depth = 1; icu_data[M32R_IRQ_SIO1_S].icucr = 0; @@ -200,7 +201,7 @@ void __init init_IRQ(void) /* INT#67-#71: CFC#0 IREQ on PLD */ for (i = 0 ; i < CONFIG_CFC_NUM ; i++ ) { irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_CF0 + i].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_CF0 + i].action = 0; irq_desc[PLD_IRQ_CF0 + i].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr @@ -211,7 +212,7 @@ void __init init_IRQ(void) #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) /* INT#76: 16552D#0 IREQ on PLD */ irq_desc[PLD_IRQ_UART0].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_UART0].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_UART0].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_UART0].action = 0; irq_desc[PLD_IRQ_UART0].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr @@ -220,7 +221,7 @@ void __init init_IRQ(void) /* INT#77: 16552D#1 IREQ on PLD */ irq_desc[PLD_IRQ_UART1].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_UART1].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_UART1].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_UART1].action = 0; irq_desc[PLD_IRQ_UART1].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr @@ -231,7 +232,7 @@ void __init init_IRQ(void) #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) /* INT#80: AK4524 IREQ on PLD */ irq_desc[PLD_IRQ_SNDINT].status = IRQ_DISABLED; - irq_desc[PLD_IRQ_SNDINT].chip = &m32700ut_pld_irq_type; + irq_desc[PLD_IRQ_SNDINT].handler = &m32700ut_pld_irq_type; irq_desc[PLD_IRQ_SNDINT].action = 0; irq_desc[PLD_IRQ_SNDINT].depth = 1; /* disable nested irq */ pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index a9174efe8..6498ee70b 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c @@ -10,6 +10,7 @@ * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes */ +#include #include #include #include diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index fa7865609..840b4348b 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -40,6 +40,7 @@ */ #include +#include #include #include #include diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index f74306001..7f66e34ea 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c @@ -7,6 +7,7 @@ * Taken from i386 version. */ +#include #include #include #include diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index ded0be07a..b8e68b542 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c @@ -17,6 +17,7 @@ #undef DEBUG_TIMER +#include #include #include #include @@ -237,7 +238,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, +struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "MFT2", NULL, NULL }; void __init time_init(void) diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index c1daf2c40..5fe8ed6d6 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c @@ -9,6 +9,7 @@ * 'traps.c' handles hardware traps and faults after we have saved some * state in 'entry.S'. */ +#include #include #include #include diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S index 13c7bb698..729a2645a 100644 --- a/arch/m32r/kernel/vmlinux.lds.S +++ b/arch/m32r/kernel/vmlinux.lds.S @@ -1,6 +1,7 @@ /* ld script to make M32R Linux kernel */ +#include #include #include #include diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S index 107594b65..78effca9d 100644 --- a/arch/m32r/lib/ashxdi3.S +++ b/arch/m32r/lib/ashxdi3.S @@ -6,6 +6,7 @@ */ /* $Id$ */ +#include ; ; input (r0,r1) src diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/checksum.S index cfbe00e51..f6fc1bdb8 100644 --- a/arch/m32r/lib/checksum.S +++ b/arch/m32r/lib/checksum.S @@ -28,6 +28,7 @@ /* $Id$ */ +#include #include #include #include diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c index 06382a38c..fb29632c7 100644 --- a/arch/m32r/lib/delay.c +++ b/arch/m32r/lib/delay.c @@ -7,6 +7,7 @@ /* $Id$ */ +#include #include #ifdef CONFIG_SMP #include diff --git a/arch/m32r/lib/memcpy.S b/arch/m32r/lib/memcpy.S index 2089a2153..800898a2d 100644 --- a/arch/m32r/lib/memcpy.S +++ b/arch/m32r/lib/memcpy.S @@ -14,6 +14,7 @@ .text +#include #include #include diff --git a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S index b47fa3537..6e26df120 100644 --- a/arch/m32r/lib/memset.S +++ b/arch/m32r/lib/memset.S @@ -14,6 +14,7 @@ */ /* $Id$ */ +#include .text .global memset diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S index 5f41aacd7..8d23cfbd6 100644 --- a/arch/m32r/lib/strlen.S +++ b/arch/m32r/lib/strlen.S @@ -9,6 +9,7 @@ /* $Id$ */ +#include #include #include diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c index 896cef1ac..2d1dd2106 100644 --- a/arch/m32r/lib/usercopy.c +++ b/arch/m32r/lib/usercopy.c @@ -6,6 +6,7 @@ * Copyright 1997 Linus Torvalds * Copyright 2001, 2002, 2004 Hirokazu Takata */ +#include #include #include #include diff --git a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c index fac759584..9f54dd937 100644 --- a/arch/m32r/mm/cache.c +++ b/arch/m32r/mm/cache.c @@ -4,6 +4,7 @@ * Copyright (C) 2002-2005 Hirokazu Takata, Hayato Fujiwara */ +#include #include #undef MCCR diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index abb34ccd5..cf610a7c5 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c @@ -6,6 +6,7 @@ * Copyright (c) 2003 Hitoshi Yamamoto */ +#include #include #include #include diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c index 03fc4c858..d9d488d78 100644 --- a/arch/m32r/mm/fault-nommu.c +++ b/arch/m32r/mm/fault-nommu.c @@ -9,6 +9,7 @@ /* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */ +#include #include #include #include diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c index dc18a33ee..bf7fb58ef 100644 --- a/arch/m32r/mm/fault.c +++ b/arch/m32r/mm/fault.c @@ -8,6 +8,7 @@ * Copyright (C) 1995 Linus Torvalds */ +#include #include #include #include @@ -147,7 +148,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, /* When running in the kernel we expect faults to occur only to * addresses in user space. All other faults represent errors in the * kernel and should generate an OOPS. Unfortunatly, in the case of an - * erroneous fault occurring in a code path which already holds mmap_sem + * erroneous fault occuring in a code path which already holds mmap_sem * we will deadlock attempting to validate the fault against the * address space. Luckily the kernel only validly references user * space from well defined areas of code, which are listed in the diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 9a4d40b3d..0c28f11d6 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S @@ -6,6 +6,7 @@ /* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */ +#include /* CONFIG_MMU */ #include #include #include diff --git a/arch/m68k/amiga/amiga_ksyms.c b/arch/m68k/amiga/amiga_ksyms.c index 7fdcf6bf3..b7bd84c73 100644 --- a/arch/m68k/amiga/amiga_ksyms.c +++ b/arch/m68k/amiga/amiga_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -22,6 +23,8 @@ EXPORT_SYMBOL(amiga_chip_avail); EXPORT_SYMBOL(amiga_chip_size); EXPORT_SYMBOL(amiga_audio_period); EXPORT_SYMBOL(amiga_audio_min_period); +EXPORT_SYMBOL(amiga_do_irq); +EXPORT_SYMBOL(amiga_do_irq_list); #ifdef CONFIG_AMIGA_PCMCIA EXPORT_SYMBOL(pcmcia_reset); diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index 96c79d840..b0aa61bf8 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c @@ -22,7 +22,7 @@ * * 07/08/99: rewamp of the interrupt handling - we now have two types of * interrupts, normal and fast handlers, fast handlers being - * marked with IRQF_DISABLED and runs with all other interrupts + * marked with SA_INTERRUPT and runs with all other interrupts * disabled. Normal interrupts disable their own source but * run with all other interrupt sources enabled. * PORTS and EXTER interrupts are always shared even if the @@ -35,30 +35,61 @@ * /Jes */ +#include +#include +#include +#include #include -#include #include +#include +#include #include #include #include #include #include -static void amiga_enable_irq(unsigned int irq); -static void amiga_disable_irq(unsigned int irq); -static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp); -static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp); -static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp); -static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp); - -static struct irq_controller amiga_irq_controller = { - .name = "amiga", - .lock = SPIN_LOCK_UNLOCKED, - .enable = amiga_enable_irq, - .disable = amiga_disable_irq, +extern int cia_request_irq(struct ciabase *base,int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id); +extern void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id); +extern void cia_init_IRQ(struct ciabase *base); +extern int cia_get_irq_list(struct ciabase *base, struct seq_file *p); + +/* irq node variables for amiga interrupt sources */ +static irq_node_t *ami_irq_list[AMI_STD_IRQS]; + +static unsigned short amiga_intena_vals[AMI_STD_IRQS] = { + [IRQ_AMIGA_VERTB] = IF_VERTB, + [IRQ_AMIGA_COPPER] = IF_COPER, + [IRQ_AMIGA_AUD0] = IF_AUD0, + [IRQ_AMIGA_AUD1] = IF_AUD1, + [IRQ_AMIGA_AUD2] = IF_AUD2, + [IRQ_AMIGA_AUD3] = IF_AUD3, + [IRQ_AMIGA_BLIT] = IF_BLIT, + [IRQ_AMIGA_DSKSYN] = IF_DSKSYN, + [IRQ_AMIGA_DSKBLK] = IF_DSKBLK, + [IRQ_AMIGA_RBF] = IF_RBF, + [IRQ_AMIGA_TBE] = IF_TBE, + [IRQ_AMIGA_SOFT] = IF_SOFT, + [IRQ_AMIGA_PORTS] = IF_PORTS, + [IRQ_AMIGA_EXTER] = IF_EXTER +}; +static const unsigned char ami_servers[AMI_STD_IRQS] = { + [IRQ_AMIGA_VERTB] = 1, + [IRQ_AMIGA_PORTS] = 1, + [IRQ_AMIGA_EXTER] = 1 }; +static short ami_ablecount[AMI_IRQS]; + +static irqreturn_t ami_badint(int irq, void *dev_id, struct pt_regs *fp) +{ + num_spurious += 1; + return IRQ_NONE; +} + /* * void amiga_init_IRQ(void) * @@ -72,12 +103,23 @@ static struct irq_controller amiga_irq_controller = { void __init amiga_init_IRQ(void) { - request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL); - request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL); - request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL); - request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL); + int i; - m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS); + /* initialize handlers */ + for (i = 0; i < AMI_STD_IRQS; i++) { + if (ami_servers[i]) { + ami_irq_list[i] = NULL; + } else { + ami_irq_list[i] = new_irq_node(); + ami_irq_list[i]->handler = ami_badint; + ami_irq_list[i]->flags = 0; + ami_irq_list[i]->dev_id = NULL; + ami_irq_list[i]->devname = NULL; + ami_irq_list[i]->next = NULL; + } + } + for (i = 0; i < AMI_IRQS; i++) + ami_ablecount[i] = 0; /* turn off PCMCIA interrupts */ if (AMIGAHW_PRESENT(PCMCIA)) @@ -92,21 +134,249 @@ void __init amiga_init_IRQ(void) cia_init_IRQ(&ciab_base); } +static inline int amiga_insert_irq(irq_node_t **list, irq_node_t *node) +{ + unsigned long flags; + irq_node_t *cur; + + if (!node->dev_id) + printk("%s: Warning: dev_id of %s is zero\n", + __FUNCTION__, node->devname); + + local_irq_save(flags); + + cur = *list; + + if (node->flags & SA_INTERRUPT) { + if (node->flags & SA_SHIRQ) + return -EBUSY; + /* + * There should never be more than one + */ + while (cur && cur->flags & SA_INTERRUPT) { + list = &cur->next; + cur = cur->next; + } + } else { + while (cur) { + list = &cur->next; + cur = cur->next; + } + } + + node->next = cur; + *list = node; + + local_irq_restore(flags); + return 0; +} + +static inline void amiga_delete_irq(irq_node_t **list, void *dev_id) +{ + unsigned long flags; + irq_node_t *node; + + local_irq_save(flags); + + for (node = *list; node; list = &node->next, node = *list) { + if (node->dev_id == dev_id) { + *list = node->next; + /* Mark it as free. */ + node->handler = NULL; + local_irq_restore(flags); + return; + } + } + local_irq_restore(flags); + printk ("%s: tried to remove invalid irq\n", __FUNCTION__); +} + +/* + * amiga_request_irq : add an interrupt service routine for a particular + * machine specific interrupt source. + * If the addition was successful, it returns 0. + */ + +int amiga_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + irq_node_t *node; + int error = 0; + + if (irq >= AMI_IRQS) { + printk ("%s: Unknown IRQ %d from %s\n", __FUNCTION__, + irq, devname); + return -ENXIO; + } + + if (irq >= IRQ_AMIGA_AUTO) + return cpu_request_irq(irq - IRQ_AMIGA_AUTO, handler, + flags, devname, dev_id); + + if (irq >= IRQ_AMIGA_CIAB) + return cia_request_irq(&ciab_base, irq - IRQ_AMIGA_CIAB, + handler, flags, devname, dev_id); + + if (irq >= IRQ_AMIGA_CIAA) + return cia_request_irq(&ciaa_base, irq - IRQ_AMIGA_CIAA, + handler, flags, devname, dev_id); + + /* + * IRQ_AMIGA_PORTS & IRQ_AMIGA_EXTER defaults to shared, + * we could add a check here for the SA_SHIRQ flag but all drivers + * should be aware of sharing anyway. + */ + if (ami_servers[irq]) { + if (!(node = new_irq_node())) + return -ENOMEM; + node->handler = handler; + node->flags = flags; + node->dev_id = dev_id; + node->devname = devname; + node->next = NULL; + error = amiga_insert_irq(&ami_irq_list[irq], node); + } else { + ami_irq_list[irq]->handler = handler; + ami_irq_list[irq]->flags = flags; + ami_irq_list[irq]->dev_id = dev_id; + ami_irq_list[irq]->devname = devname; + } + + /* enable the interrupt */ + if (irq < IRQ_AMIGA_PORTS && !ami_ablecount[irq]) + amiga_custom.intena = IF_SETCLR | amiga_intena_vals[irq]; + + return error; +} + +void amiga_free_irq(unsigned int irq, void *dev_id) +{ + if (irq >= AMI_IRQS) { + printk ("%s: Unknown IRQ %d\n", __FUNCTION__, irq); + return; + } + + if (irq >= IRQ_AMIGA_AUTO) + cpu_free_irq(irq - IRQ_AMIGA_AUTO, dev_id); + + if (irq >= IRQ_AMIGA_CIAB) { + cia_free_irq(&ciab_base, irq - IRQ_AMIGA_CIAB, dev_id); + return; + } + + if (irq >= IRQ_AMIGA_CIAA) { + cia_free_irq(&ciaa_base, irq - IRQ_AMIGA_CIAA, dev_id); + return; + } + + if (ami_servers[irq]) { + amiga_delete_irq(&ami_irq_list[irq], dev_id); + /* if server list empty, disable the interrupt */ + if (!ami_irq_list[irq] && irq < IRQ_AMIGA_PORTS) + amiga_custom.intena = amiga_intena_vals[irq]; + } else { + if (ami_irq_list[irq]->dev_id != dev_id) + printk("%s: removing probably wrong IRQ %d from %s\n", + __FUNCTION__, irq, ami_irq_list[irq]->devname); + ami_irq_list[irq]->handler = ami_badint; + ami_irq_list[irq]->flags = 0; + ami_irq_list[irq]->dev_id = NULL; + ami_irq_list[irq]->devname = NULL; + amiga_custom.intena = amiga_intena_vals[irq]; + } +} + /* * Enable/disable a particular machine specific interrupt source. * Note that this may affect other interrupts in case of a shared interrupt. * This function should only be called for a _very_ short time to change some * internal data, that may not be changed by the interrupt at the same time. + * ami_(enable|disable)_irq calls may also be nested. */ -static void amiga_enable_irq(unsigned int irq) +void amiga_enable_irq(unsigned int irq) +{ + if (irq >= AMI_IRQS) { + printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq); + return; + } + + if (--ami_ablecount[irq]) + return; + + /* No action for auto-vector interrupts */ + if (irq >= IRQ_AMIGA_AUTO){ + printk("%s: Trying to enable auto-vector IRQ %i\n", + __FUNCTION__, irq - IRQ_AMIGA_AUTO); + return; + } + + if (irq >= IRQ_AMIGA_CIAB) { + cia_set_irq(&ciab_base, (1 << (irq - IRQ_AMIGA_CIAB))); + cia_able_irq(&ciab_base, CIA_ICR_SETCLR | + (1 << (irq - IRQ_AMIGA_CIAB))); + return; + } + + if (irq >= IRQ_AMIGA_CIAA) { + cia_set_irq(&ciaa_base, (1 << (irq - IRQ_AMIGA_CIAA))); + cia_able_irq(&ciaa_base, CIA_ICR_SETCLR | + (1 << (irq - IRQ_AMIGA_CIAA))); + return; + } + + /* enable the interrupt */ + amiga_custom.intena = IF_SETCLR | amiga_intena_vals[irq]; +} + +void amiga_disable_irq(unsigned int irq) +{ + if (irq >= AMI_IRQS) { + printk("%s: Unknown IRQ %d\n", __FUNCTION__, irq); + return; + } + + if (ami_ablecount[irq]++) + return; + + /* No action for auto-vector interrupts */ + if (irq >= IRQ_AMIGA_AUTO) { + printk("%s: Trying to disable auto-vector IRQ %i\n", + __FUNCTION__, irq - IRQ_AMIGA_AUTO); + return; + } + + if (irq >= IRQ_AMIGA_CIAB) { + cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB)); + return; + } + + if (irq >= IRQ_AMIGA_CIAA) { + cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA)); + return; + } + + /* disable the interrupt */ + amiga_custom.intena = amiga_intena_vals[irq]; +} + +inline void amiga_do_irq(int irq, struct pt_regs *fp) { - amiga_custom.intena = IF_SETCLR | (1 << (irq - IRQ_USER)); + kstat_cpu(0).irqs[SYS_IRQS + irq]++; + ami_irq_list[irq]->handler(irq, ami_irq_list[irq]->dev_id, fp); } -static void amiga_disable_irq(unsigned int irq) +void amiga_do_irq_list(int irq, struct pt_regs *fp) { - amiga_custom.intena = 1 << (irq - IRQ_USER); + irq_node_t *node; + + kstat_cpu(0).irqs[SYS_IRQS + irq]++; + + amiga_custom.intreq = amiga_intena_vals[irq]; + + for (node = ami_irq_list[irq]; node; node = node->next) + node->handler(irq, node->dev_id, fp); } /* @@ -120,19 +390,19 @@ static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp) /* if serial transmit buffer empty, interrupt */ if (ints & IF_TBE) { amiga_custom.intreq = IF_TBE; - m68k_handle_int(IRQ_AMIGA_TBE, fp); + amiga_do_irq(IRQ_AMIGA_TBE, fp); } /* if floppy disk transfer complete, interrupt */ if (ints & IF_DSKBLK) { amiga_custom.intreq = IF_DSKBLK; - m68k_handle_int(IRQ_AMIGA_DSKBLK, fp); + amiga_do_irq(IRQ_AMIGA_DSKBLK, fp); } /* if software interrupt set, interrupt */ if (ints & IF_SOFT) { amiga_custom.intreq = IF_SOFT; - m68k_handle_int(IRQ_AMIGA_SOFT, fp); + amiga_do_irq(IRQ_AMIGA_SOFT, fp); } return IRQ_HANDLED; } @@ -144,20 +414,18 @@ static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp) /* if a blitter interrupt */ if (ints & IF_BLIT) { amiga_custom.intreq = IF_BLIT; - m68k_handle_int(IRQ_AMIGA_BLIT, fp); + amiga_do_irq(IRQ_AMIGA_BLIT, fp); } /* if a copper interrupt */ if (ints & IF_COPER) { amiga_custom.intreq = IF_COPER; - m68k_handle_int(IRQ_AMIGA_COPPER, fp); + amiga_do_irq(IRQ_AMIGA_COPPER, fp); } /* if a vertical blank interrupt */ - if (ints & IF_VERTB) { - amiga_custom.intreq = IF_VERTB; - m68k_handle_int(IRQ_AMIGA_VERTB, fp); - } + if (ints & IF_VERTB) + amiga_do_irq_list(IRQ_AMIGA_VERTB, fp); return IRQ_HANDLED; } @@ -168,25 +436,25 @@ static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp) /* if audio 0 interrupt */ if (ints & IF_AUD0) { amiga_custom.intreq = IF_AUD0; - m68k_handle_int(IRQ_AMIGA_AUD0, fp); + amiga_do_irq(IRQ_AMIGA_AUD0, fp); } /* if audio 1 interrupt */ if (ints & IF_AUD1) { amiga_custom.intreq = IF_AUD1; - m68k_handle_int(IRQ_AMIGA_AUD1, fp); + amiga_do_irq(IRQ_AMIGA_AUD1, fp); } /* if audio 2 interrupt */ if (ints & IF_AUD2) { amiga_custom.intreq = IF_AUD2; - m68k_handle_int(IRQ_AMIGA_AUD2, fp); + amiga_do_irq(IRQ_AMIGA_AUD2, fp); } /* if audio 3 interrupt */ if (ints & IF_AUD3) { amiga_custom.intreq = IF_AUD3; - m68k_handle_int(IRQ_AMIGA_AUD3, fp); + amiga_do_irq(IRQ_AMIGA_AUD3, fp); } return IRQ_HANDLED; } @@ -198,13 +466,55 @@ static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp) /* if serial receive buffer full interrupt */ if (ints & IF_RBF) { /* acknowledge of IF_RBF must be done by the serial interrupt */ - m68k_handle_int(IRQ_AMIGA_RBF, fp); + amiga_do_irq(IRQ_AMIGA_RBF, fp); } /* if a disk sync interrupt */ if (ints & IF_DSKSYN) { amiga_custom.intreq = IF_DSKSYN; - m68k_handle_int(IRQ_AMIGA_DSKSYN, fp); + amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); } return IRQ_HANDLED; } + +static irqreturn_t ami_int7(int irq, void *dev_id, struct pt_regs *fp) +{ + panic ("level 7 interrupt received\n"); +} + +irqreturn_t (*amiga_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { + [0] = ami_badint, + [1] = ami_int1, + [2] = ami_badint, + [3] = ami_int3, + [4] = ami_int4, + [5] = ami_int5, + [6] = ami_badint, + [7] = ami_int7 +}; + +int show_amiga_interrupts(struct seq_file *p, void *v) +{ + int i; + irq_node_t *node; + + for (i = 0; i < AMI_STD_IRQS; i++) { + if (!(node = ami_irq_list[i])) + continue; + seq_printf(p, "ami %2d: %10u ", i, + kstat_cpu(0).irqs[SYS_IRQS + i]); + do { + if (node->flags & SA_INTERRUPT) + seq_puts(p, "F "); + else + seq_puts(p, " "); + seq_printf(p, "%s\n", node->devname); + if ((node = node->next)) + seq_puts(p, " "); + } while (node); + } + + cia_get_irq_list(&ciaa_base, p); + cia_get_irq_list(&ciab_base, p); + return 0; +} diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index 1f5bfb584..ae94db5d9 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c @@ -8,6 +8,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c index de1304c91..558d5fd2d 100644 --- a/arch/m68k/amiga/chipram.c +++ b/arch/m68k/amiga/chipram.c @@ -7,6 +7,7 @@ ** Rewritten 15/9/2000 by Geert to use resource management */ +#include #include #include #include diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index dbad30054..9476eb944 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c @@ -29,18 +29,21 @@ struct ciabase { unsigned short int_mask; int handler_irq, cia_irq, server_irq; char *name; + irq_handler_t irq_list[CIA_IRQS]; } ciaa_base = { .cia = &ciaa, .int_mask = IF_PORTS, - .handler_irq = IRQ_AMIGA_PORTS, + .handler_irq = IRQ_AMIGA_AUTO_2, .cia_irq = IRQ_AMIGA_CIAA, - .name = "CIAA" + .server_irq = IRQ_AMIGA_PORTS, + .name = "CIAA handler" }, ciab_base = { .cia = &ciab, .int_mask = IF_EXTER, - .handler_irq = IRQ_AMIGA_EXTER, + .handler_irq = IRQ_AMIGA_AUTO_6, .cia_irq = IRQ_AMIGA_CIAB, - .name = "CIAB" + .server_irq = IRQ_AMIGA_EXTER, + .name = "CIAB handler" }; /* @@ -63,11 +66,13 @@ unsigned char cia_set_irq(struct ciabase *base, unsigned char mask) /* * Enable or disable CIA interrupts, return old interrupt mask, + * interrupts will only be enabled if a handler exists */ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask) { - unsigned char old; + unsigned char old, tmp; + int i; old = base->icr_mask; base->icr_data |= base->cia->icr; @@ -77,104 +82,99 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask) else base->icr_mask &= ~mask; base->icr_mask &= CIA_ICR_ALL; + for (i = 0, tmp = 1; i < CIA_IRQS; i++, tmp <<= 1) { + if ((tmp & base->icr_mask) && !base->irq_list[i].handler) { + base->icr_mask &= ~tmp; + base->cia->icr = tmp; + } + } if (base->icr_data & base->icr_mask) amiga_custom.intreq = IF_SETCLR | base->int_mask; return old; } +int cia_request_irq(struct ciabase *base, unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + unsigned char mask; + + base->irq_list[irq].handler = handler; + base->irq_list[irq].flags = flags; + base->irq_list[irq].dev_id = dev_id; + base->irq_list[irq].devname = devname; + + /* enable the interrupt */ + mask = 1 << irq; + cia_set_irq(base, mask); + cia_able_irq(base, CIA_ICR_SETCLR | mask); + return 0; +} + +void cia_free_irq(struct ciabase *base, unsigned int irq, void *dev_id) +{ + if (base->irq_list[irq].dev_id != dev_id) + printk("%s: removing probably wrong IRQ %i from %s\n", + __FUNCTION__, base->cia_irq + irq, + base->irq_list[irq].devname); + + base->irq_list[irq].handler = NULL; + base->irq_list[irq].flags = 0; + + cia_able_irq(base, 1 << irq); +} + static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp) { struct ciabase *base = (struct ciabase *)dev_id; - int mach_irq; + int mach_irq, i; unsigned char ints; mach_irq = base->cia_irq; + irq = SYS_IRQS + mach_irq; ints = cia_set_irq(base, CIA_ICR_ALL); amiga_custom.intreq = base->int_mask; - for (; ints; mach_irq++, ints >>= 1) { - if (ints & 1) - m68k_handle_int(mach_irq, fp); + for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) { + if (ints & 1) { + kstat_cpu(0).irqs[irq]++; + base->irq_list[i].handler(mach_irq, base->irq_list[i].dev_id, fp); + } + ints >>= 1; } + amiga_do_irq_list(base->server_irq, fp); return IRQ_HANDLED; } -static void cia_enable_irq(unsigned int irq) +void __init cia_init_IRQ(struct ciabase *base) { - unsigned char mask; + int i; - if (irq >= IRQ_AMIGA_CIAB) { - mask = 1 << (irq - IRQ_AMIGA_CIAB); - cia_set_irq(&ciab_base, mask); - cia_able_irq(&ciab_base, CIA_ICR_SETCLR | mask); - } else { - mask = 1 << (irq - IRQ_AMIGA_CIAA); - cia_set_irq(&ciaa_base, mask); - cia_able_irq(&ciaa_base, CIA_ICR_SETCLR | mask); + /* init isr handlers */ + for (i = 0; i < CIA_IRQS; i++) { + base->irq_list[i].handler = NULL; + base->irq_list[i].flags = 0; } -} - -static void cia_disable_irq(unsigned int irq) -{ - if (irq >= IRQ_AMIGA_CIAB) - cia_able_irq(&ciab_base, 1 << (irq - IRQ_AMIGA_CIAB)); - else - cia_able_irq(&ciaa_base, 1 << (irq - IRQ_AMIGA_CIAA)); -} -static struct irq_controller cia_irq_controller = { - .name = "cia", - .lock = SPIN_LOCK_UNLOCKED, - .enable = cia_enable_irq, - .disable = cia_disable_irq, -}; + /* clear any pending interrupt and turn off all interrupts */ + cia_set_irq(base, CIA_ICR_ALL); + cia_able_irq(base, CIA_ICR_ALL); -/* - * Override auto irq 2 & 6 and use them as general chain - * for external interrupts, we link the CIA interrupt sources - * into this chain. - */ + /* install CIA handler */ + request_irq(base->handler_irq, cia_handler, 0, base->name, base); -static void auto_enable_irq(unsigned int irq) -{ - switch (irq) { - case IRQ_AUTO_2: - amiga_custom.intena = IF_SETCLR | IF_PORTS; - break; - case IRQ_AUTO_6: - amiga_custom.intena = IF_SETCLR | IF_EXTER; - break; - } + amiga_custom.intena = IF_SETCLR | base->int_mask; } -static void auto_disable_irq(unsigned int irq) +int cia_get_irq_list(struct ciabase *base, struct seq_file *p) { - switch (irq) { - case IRQ_AUTO_2: - amiga_custom.intena = IF_PORTS; - break; - case IRQ_AUTO_6: - amiga_custom.intena = IF_EXTER; - break; + int i, j; + + j = base->cia_irq; + for (i = 0; i < CIA_IRQS; i++) { + seq_printf(p, "cia %2d: %10d ", j + i, + kstat_cpu(0).irqs[SYS_IRQS + j + i]); + seq_puts(p, " "); + seq_printf(p, "%s\n", base->irq_list[i].devname); } -} - -static struct irq_controller auto_irq_controller = { - .name = "auto", - .lock = SPIN_LOCK_UNLOCKED, - .enable = auto_enable_irq, - .disable = auto_disable_irq, -}; - -void __init cia_init_IRQ(struct ciabase *base) -{ - m68k_setup_irq_controller(&cia_irq_controller, base->cia_irq, CIA_IRQS); - - /* clear any pending interrupt and turn off all interrupts */ - cia_set_irq(base, CIA_ICR_ALL); - cia_able_irq(base, CIA_ICR_ALL); - - /* override auto int and install CIA handler */ - m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); - m68k_irq_startup(base->handler_irq); - request_irq(base->handler_irq, cia_handler, IRQF_SHARED, base->name, base); + return 0; } diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 092e50d2c..12e3706fe 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -12,6 +12,7 @@ * Miscellaneous Amiga stuff */ +#include #include #include #include @@ -86,8 +87,17 @@ extern char m68k_debug_device[]; static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); /* amiga specific irq functions */ extern void amiga_init_IRQ (void); +extern irqreturn_t (*amiga_default_handler[]) (int, void *, struct pt_regs *); +extern int amiga_request_irq (unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, + void *dev_id); +extern void amiga_free_irq (unsigned int irq, void *dev_id); +extern void amiga_enable_irq (unsigned int); +extern void amiga_disable_irq (unsigned int); static void amiga_get_model(char *model); static int amiga_get_hardware_list(char *buffer); +extern int show_amiga_interrupts (struct seq_file *, void *); /* amiga specific timer functions */ static unsigned long amiga_gettimeoffset (void); static int a3000_hwclk (int, struct rtc_time *); @@ -382,8 +392,14 @@ void __init config_amiga(void) mach_sched_init = amiga_sched_init; mach_init_IRQ = amiga_init_IRQ; + mach_default_handler = &amiga_default_handler; + mach_request_irq = amiga_request_irq; + mach_free_irq = amiga_free_irq; + enable_irq = amiga_enable_irq; + disable_irq = amiga_disable_irq; mach_get_model = amiga_get_model; mach_get_hardware_list = amiga_get_hardware_list; + mach_get_irq_list = show_amiga_interrupts; mach_gettimeoffset = amiga_gettimeoffset; if (AMIGAHW_PRESENT(A3000_CLK)){ mach_hwclk = a3000_hwclk; diff --git a/arch/m68k/apollo/Makefile b/arch/m68k/apollo/Makefile index 76a057962..39264f3b6 100644 --- a/arch/m68k/apollo/Makefile +++ b/arch/m68k/apollo/Makefile @@ -2,4 +2,4 @@ # Makefile for Linux arch/m68k/amiga source directory # -obj-y := config.o dn_ints.o +obj-y := config.o dn_ints.o dma.o diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 6f4581575..d401962d9 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -27,6 +28,11 @@ u_long apollo_model; extern void dn_sched_init(irqreturn_t (*handler)(int,void *,struct pt_regs *)); extern void dn_init_IRQ(void); +extern int dn_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); +extern void dn_free_irq(unsigned int irq, void *dev_id); +extern void dn_enable_irq(unsigned int); +extern void dn_disable_irq(unsigned int); +extern int show_dn_interrupts(struct seq_file *, void *); extern unsigned long dn_gettimeoffset(void); extern int dn_dummy_hwclk(int, struct rtc_time *); extern int dn_dummy_set_clock_mmss(unsigned long); @@ -34,11 +40,13 @@ extern void dn_dummy_reset(void); extern void dn_dummy_waitbut(void); extern struct fb_info *dn_fb_init(long *); extern void dn_dummy_debug_init(void); +extern void dn_dummy_video_setup(char *,int *); extern irqreturn_t dn_process_int(int irq, struct pt_regs *fp); #ifdef CONFIG_HEARTBEAT static void dn_heartbeat(int on); #endif static irqreturn_t dn_timer_int(int irq,void *, struct pt_regs *); +static irqreturn_t (*sched_timer_handler)(int, void *, struct pt_regs *)=NULL; static void dn_get_model(char *model); static const char *apollo_models[] = { [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)", @@ -156,10 +164,17 @@ void config_apollo(void) { mach_sched_init=dn_sched_init; /* */ mach_init_IRQ=dn_init_IRQ; + mach_default_handler=NULL; + mach_request_irq = dn_request_irq; + mach_free_irq = dn_free_irq; + enable_irq = dn_enable_irq; + disable_irq = dn_disable_irq; + mach_get_irq_list = show_dn_interrupts; mach_gettimeoffset = dn_gettimeoffset; mach_max_dma_address = 0xffffffff; mach_hwclk = dn_dummy_hwclk; /* */ mach_set_clock_mmss = dn_dummy_set_clock_mmss; /* */ + mach_process_int = dn_process_int; mach_reset = dn_dummy_reset; /* */ #ifdef CONFIG_HEARTBEAT mach_heartbeat = dn_heartbeat; @@ -174,13 +189,11 @@ void config_apollo(void) { } -irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) -{ - irqreturn_t (*timer_handler)(int, void *, struct pt_regs *) = dev_id; +irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) { volatile unsigned char x; - timer_handler(irq, dev_id, fp); + sched_timer_handler(irq,dev_id,fp); x=*(volatile unsigned char *)(timer+3); x=*(volatile unsigned char *)(timer+5); @@ -204,7 +217,9 @@ void dn_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); #endif - request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine); + sched_timer_handler=timer_routine; + request_irq(0,dn_timer_int,0,NULL,NULL); + } unsigned long dn_gettimeoffset(void) { diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c index 9fe078037..a31259359 100644 --- a/arch/m68k/apollo/dn_ints.c +++ b/arch/m68k/apollo/dn_ints.c @@ -1,44 +1,125 @@ -#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include +#include -void dn_process_int(unsigned int irq, struct pt_regs *fp) +static irq_handler_t dn_irqs[16]; + +irqreturn_t dn_process_int(int irq, struct pt_regs *fp) { - m68k_handle_int(irq, fp); + irqreturn_t res = IRQ_NONE; + + if(dn_irqs[irq-160].handler) { + res = dn_irqs[irq-160].handler(irq,dn_irqs[irq-160].dev_id,fp); + } else { + printk("spurious irq %d occurred\n",irq); + } + + *(volatile unsigned char *)(pica)=0x20; + *(volatile unsigned char *)(picb)=0x20; - *(volatile unsigned char *)(pica)=0x20; - *(volatile unsigned char *)(picb)=0x20; + return res; } -int apollo_irq_startup(unsigned int irq) -{ - if (irq < 8) - *(volatile unsigned char *)(pica+1) &= ~(1 << irq); - else - *(volatile unsigned char *)(picb+1) &= ~(1 << (irq - 8)); - return 0; +void dn_init_IRQ(void) { + + int i; + + for(i=0;i<16;i++) { + dn_irqs[i].handler=NULL; + dn_irqs[i].flags=IRQ_FLG_STD; + dn_irqs[i].dev_id=NULL; + dn_irqs[i].devname=NULL; + } + } -void apollo_irq_shutdown(unsigned int irq) -{ - if (irq < 8) - *(volatile unsigned char *)(pica+1) |= (1 << irq); - else - *(volatile unsigned char *)(picb+1) |= (1 << (irq - 8)); +int dn_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) { + + if((irq<0) || (irq>15)) { + printk("Trying to request invalid IRQ\n"); + return -ENXIO; + } + + if(!dn_irqs[irq].handler) { + dn_irqs[irq].handler=handler; + dn_irqs[irq].flags=IRQ_FLG_STD; + dn_irqs[irq].dev_id=dev_id; + dn_irqs[irq].devname=devname; + if(irq<8) + *(volatile unsigned char *)(pica+1)&=~(1<15)) { + printk("Trying to free invalid IRQ\n"); + return ; + } + + if(irq<8) + *(volatile unsigned char *)(pica+1)|=(1< 0 && \ @@ -295,14 +301,6 @@ __asm__ (__ALIGN_STR "\n" ); for (;;); } -#endif - -/* - * Bitmap for free interrupt vector numbers - * (new vectors starting from 0x70 can be allocated by - * atari_register_vme_int()) - */ -static int free_vme_vec_bitmap; /* GK: * HBL IRQ handler for Falcon. Nobody needs it :-) @@ -315,33 +313,12 @@ __ALIGN_STR "\n\t" "orw #0x200,%sp@\n\t" /* set saved ipl to 2 */ "rte"); -extern void atari_microwire_cmd(int cmd); - -extern int atari_SCC_reset_done; - -static int atari_startup_irq(unsigned int irq) -{ - m68k_irq_startup(irq); - atari_turnon_irq(irq); - atari_enable_irq(irq); - return 0; -} +/* Defined in entry.S; only increments 'num_spurious' */ +asmlinkage void bad_interrupt(void); -static void atari_shutdown_irq(unsigned int irq) -{ - atari_disable_irq(irq); - atari_turnoff_irq(irq); - m68k_irq_shutdown(irq); -} +extern void atari_microwire_cmd( int cmd ); -static struct irq_controller atari_irq_controller = { - .name = "atari", - .lock = SPIN_LOCK_UNLOCKED, - .startup = atari_startup_irq, - .shutdown = atari_shutdown_irq, - .enable = atari_enable_irq, - .disable = atari_disable_irq, -}; +extern int atari_SCC_reset_done; /* * void atari_init_IRQ (void) @@ -356,8 +333,12 @@ static struct irq_controller atari_irq_controller = { void __init atari_init_IRQ(void) { - m68k_setup_user_interrupt(VEC_USER, 192, NULL); - m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); + int i; + + /* initialize the vector table */ + for (i = 0; i < NUM_INT_SOURCES; ++i) { + vectors[IRQ_SOURCE_TO_VECTOR(i)] = bad_interrupt; + } /* Initialize the MFP(s) */ @@ -397,7 +378,8 @@ void __init atari_init_IRQ(void) * enabled in VME mask */ tt_scu.vme_mask = 0x60; /* enable MFP and SCC ints */ - } else { + } + else { /* If no SCU and no Hades, the HSYNC interrupt needs to be * disabled this way. (Else _inthandler in kernel/sys_call.S * gets overruns) @@ -422,6 +404,184 @@ void __init atari_init_IRQ(void) } +static irqreturn_t atari_call_irq_list( int irq, void *dev_id, struct pt_regs *fp ) +{ + irq_node_t *node; + + for (node = (irq_node_t *)dev_id; node; node = node->next) + node->handler(irq, node->dev_id, fp); + return IRQ_HANDLED; +} + + +/* + * atari_request_irq : add an interrupt service routine for a particular + * machine specific interrupt source. + * If the addition was successful, it returns 0. + */ + +int atari_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + int vector; + unsigned long oflags = flags; + + /* + * The following is a hack to make some PCI card drivers work, + * which set the SA_SHIRQ flag. + */ + + flags &= ~SA_SHIRQ; + + if (flags == SA_INTERRUPT) { + printk ("%s: SA_INTERRUPT changed to IRQ_TYPE_SLOW for %s\n", + __FUNCTION__, devname); + flags = IRQ_TYPE_SLOW; + } + if (flags < IRQ_TYPE_SLOW || flags > IRQ_TYPE_PRIO) { + printk ("%s: Bad irq type 0x%lx <0x%lx> requested from %s\n", + __FUNCTION__, flags, oflags, devname); + return -EINVAL; + } + if (!IS_VALID_INTNO(irq)) { + printk ("%s: Unknown irq %d requested from %s\n", + __FUNCTION__, irq, devname); + return -ENXIO; + } + vector = IRQ_SOURCE_TO_VECTOR(irq); + + /* + * Check type/source combination: slow ints are (currently) + * only possible for MFP-interrupts. + */ + if (flags == IRQ_TYPE_SLOW && + (irq < STMFP_SOURCE_BASE || irq >= SCC_SOURCE_BASE)) { + printk ("%s: Slow irq requested for non-MFP source %d from %s\n", + __FUNCTION__, irq, devname); + return -EINVAL; + } + + if (vectors[vector] == bad_interrupt) { + /* int has no handler yet */ + irq_handler[irq].handler = handler; + irq_handler[irq].dev_id = dev_id; + irq_param[irq].flags = flags; + irq_param[irq].devname = devname; + vectors[vector] = + (flags == IRQ_TYPE_SLOW) ? slow_handlers[irq-STMFP_SOURCE_BASE] : + (flags == IRQ_TYPE_FAST) ? atari_fast_irq_handler : + atari_prio_irq_handler; + /* If MFP int, also enable and umask it */ + atari_turnon_irq(irq); + atari_enable_irq(irq); + + return 0; + } + else if (irq_param[irq].flags == flags) { + /* old handler is of same type -> handlers can be chained */ + irq_node_t *node; + unsigned long flags; + + local_irq_save(flags); + + if (irq_handler[irq].handler != atari_call_irq_list) { + /* Only one handler yet, make a node for this first one */ + if (!(node = new_irq_node())) + return -ENOMEM; + node->handler = irq_handler[irq].handler; + node->dev_id = irq_handler[irq].dev_id; + node->devname = irq_param[irq].devname; + node->next = NULL; + + irq_handler[irq].handler = atari_call_irq_list; + irq_handler[irq].dev_id = node; + irq_param[irq].devname = "chained"; + } + + if (!(node = new_irq_node())) + return -ENOMEM; + node->handler = handler; + node->dev_id = dev_id; + node->devname = devname; + /* new handlers are put in front of the queue */ + node->next = irq_handler[irq].dev_id; + irq_handler[irq].dev_id = node; + + local_irq_restore(flags); + return 0; + } else { + printk ("%s: Irq %d allocated by other type int (call from %s)\n", + __FUNCTION__, irq, devname); + return -EBUSY; + } +} + +void atari_free_irq(unsigned int irq, void *dev_id) +{ + unsigned long flags; + int vector; + irq_node_t **list, *node; + + if (!IS_VALID_INTNO(irq)) { + printk("%s: Unknown irq %d\n", __FUNCTION__, irq); + return; + } + + vector = IRQ_SOURCE_TO_VECTOR(irq); + if (vectors[vector] == bad_interrupt) + goto not_found; + + local_irq_save(flags); + + if (irq_handler[irq].handler != atari_call_irq_list) { + /* It's the only handler for the interrupt */ + if (irq_handler[irq].dev_id != dev_id) { + local_irq_restore(flags); + goto not_found; + } + irq_handler[irq].handler = NULL; + irq_handler[irq].dev_id = NULL; + irq_param[irq].devname = NULL; + vectors[vector] = bad_interrupt; + /* If MFP int, also disable it */ + atari_disable_irq(irq); + atari_turnoff_irq(irq); + + local_irq_restore(flags); + return; + } + + /* The interrupt is chained, find the irq on the list */ + for(list = (irq_node_t **)&irq_handler[irq].dev_id; *list; list = &(*list)->next) { + if ((*list)->dev_id == dev_id) break; + } + if (!*list) { + local_irq_restore(flags); + goto not_found; + } + + (*list)->handler = NULL; /* Mark it as free for reallocation */ + *list = (*list)->next; + + /* If there's now only one handler, unchain the interrupt, i.e. plug in + * the handler directly again and omit atari_call_irq_list */ + node = (irq_node_t *)irq_handler[irq].dev_id; + if (node && !node->next) { + irq_handler[irq].handler = node->handler; + irq_handler[irq].dev_id = node->dev_id; + irq_param[irq].devname = node->devname; + node->handler = NULL; /* Mark it as free for reallocation */ + } + + local_irq_restore(flags); + return; + +not_found: + printk("%s: tried to remove invalid irq\n", __FUNCTION__); + return; +} + + /* * atari_register_vme_int() returns the number of a free interrupt vector for * hardware with a programmable int vector (probably a VME board). @@ -431,24 +591,58 @@ unsigned long atari_register_vme_int(void) { int i; - for (i = 0; i < 32; i++) - if ((free_vme_vec_bitmap & (1 << i)) == 0) + for(i = 0; i < 32; i++) + if((free_vme_vec_bitmap & (1 << i)) == 0) break; - if (i == 16) + if(i == 16) return 0; free_vme_vec_bitmap |= 1 << i; - return VME_SOURCE_BASE + i; + return (VME_SOURCE_BASE + i); } void atari_unregister_vme_int(unsigned long irq) { - if (irq >= VME_SOURCE_BASE && irq < VME_SOURCE_BASE + VME_MAX_SOURCES) { + if(irq >= VME_SOURCE_BASE && irq < VME_SOURCE_BASE + VME_MAX_SOURCES) { irq -= VME_SOURCE_BASE; free_vme_vec_bitmap &= ~(1 << irq); } } +int show_atari_interrupts(struct seq_file *p, void *v) +{ + int i; + + for (i = 0; i < NUM_INT_SOURCES; ++i) { + if (vectors[IRQ_SOURCE_TO_VECTOR(i)] == bad_interrupt) + continue; + if (i < STMFP_SOURCE_BASE) + seq_printf(p, "auto %2d: %10u ", + i, kstat_cpu(0).irqs[i]); + else + seq_printf(p, "vec $%02x: %10u ", + IRQ_SOURCE_TO_VECTOR(i), + kstat_cpu(0).irqs[i]); + + if (irq_handler[i].handler != atari_call_irq_list) { + seq_printf(p, "%s\n", irq_param[i].devname); + } + else { + irq_node_t *n; + for( n = (irq_node_t *)irq_handler[i].dev_id; n; n = n->next ) { + seq_printf(p, "%s\n", n->devname); + if (n->next) + seq_puts(p, " " ); + } + } + } + if (num_spurious) + seq_printf(p, "spurio.: %10u\n", num_spurious); + + return 0; +} + + diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index b2079252a..1012b08e5 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c @@ -24,6 +24,7 @@ * Miscellaneous atari stuff */ +#include #include #include #include @@ -56,6 +57,12 @@ static int atari_get_hardware_list(char *buffer); /* atari specific irq functions */ extern void atari_init_IRQ (void); +extern int atari_request_irq (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id); +extern void atari_free_irq (unsigned int irq, void *dev_id); +extern void atari_enable_irq (unsigned int); +extern void atari_disable_irq (unsigned int); +extern int show_atari_interrupts (struct seq_file *, void *); extern void atari_mksound( unsigned int count, unsigned int ticks ); #ifdef CONFIG_HEARTBEAT static void atari_heartbeat( int on ); @@ -225,8 +232,13 @@ void __init config_atari(void) mach_sched_init = atari_sched_init; mach_init_IRQ = atari_init_IRQ; + mach_request_irq = atari_request_irq; + mach_free_irq = atari_free_irq; + enable_irq = atari_enable_irq; + disable_irq = atari_disable_irq; mach_get_model = atari_get_model; mach_get_hardware_list = atari_get_hardware_list; + mach_get_irq_list = show_atari_interrupts; mach_gettimeoffset = atari_gettimeoffset; mach_reset = atari_reset; mach_max_dma_address = 0xffffff; diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 4ae01004d..ace05f79d 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c @@ -10,6 +10,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c index 6ca57b656..8888debf7 100644 --- a/arch/m68k/atari/hades-pci.c +++ b/arch/m68k/atari/hades-pci.c @@ -4,6 +4,7 @@ * Written by Wout Klaren. */ +#include #include #include #include diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index bf4588cbe..22e0481a5 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c @@ -8,6 +8,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/m68k/bvme6000/Makefile b/arch/m68k/bvme6000/Makefile index d8174004f..2348e6cee 100644 --- a/arch/m68k/bvme6000/Makefile +++ b/arch/m68k/bvme6000/Makefile @@ -2,4 +2,4 @@ # Makefile for Linux arch/m68k/bvme6000 source directory # -obj-y := config.o rtc.o +obj-y := config.o bvmeints.o rtc.o diff --git a/arch/m68k/bvme6000/bvmeints.c b/arch/m68k/bvme6000/bvmeints.c new file mode 100644 index 000000000..298a8df02 --- /dev/null +++ b/arch/m68k/bvme6000/bvmeints.c @@ -0,0 +1,160 @@ +/* + * arch/m68k/bvme6000/bvmeints.c + * + * Copyright (C) 1997 Richard Hirst [richard@sleepie.demon.co.uk] + * + * based on amiints.c -- Amiga Linux interrupt handling code + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file README.legal in the main directory of this archive + * for more details. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp); + +/* + * This should ideally be 4 elements only, for speed. + */ + +static struct { + irqreturn_t (*handler)(int, void *, struct pt_regs *); + unsigned long flags; + void *dev_id; + const char *devname; + unsigned count; +} irq_tab[256]; + +/* + * void bvme6000_init_IRQ (void) + * + * Parameters: None + * + * Returns: Nothing + * + * This function is called during kernel startup to initialize + * the bvme6000 IRQ handling routines. + */ + +void bvme6000_init_IRQ (void) +{ + int i; + + for (i = 0; i < 256; i++) { + irq_tab[i].handler = bvme6000_defhand; + irq_tab[i].flags = IRQ_FLG_STD; + irq_tab[i].dev_id = NULL; + irq_tab[i].devname = NULL; + irq_tab[i].count = 0; + } +} + +int bvme6000_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + if (irq > 255) { + printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); + return -ENXIO; + } +#if 0 + /* Nothing special about auto-vectored devices for the BVME6000, + * but treat it specially to avoid changes elsewhere. + */ + + if (irq >= VEC_INT1 && irq <= VEC_INT7) + return cpu_request_irq(irq - VEC_SPUR, handler, flags, + devname, dev_id); +#endif + if (!(irq_tab[irq].flags & IRQ_FLG_STD)) { + if (irq_tab[irq].flags & IRQ_FLG_LOCK) { + printk("%s: IRQ %d from %s is not replaceable\n", + __FUNCTION__, irq, irq_tab[irq].devname); + return -EBUSY; + } + if (flags & IRQ_FLG_REPLACE) { + printk("%s: %s can't replace IRQ %d from %s\n", + __FUNCTION__, devname, irq, irq_tab[irq].devname); + return -EBUSY; + } + } + irq_tab[irq].handler = handler; + irq_tab[irq].flags = flags; + irq_tab[irq].dev_id = dev_id; + irq_tab[irq].devname = devname; + return 0; +} + +void bvme6000_free_irq(unsigned int irq, void *dev_id) +{ + if (irq > 255) { + printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); + return; + } +#if 0 + if (irq >= VEC_INT1 && irq <= VEC_INT7) { + cpu_free_irq(irq - VEC_SPUR, dev_id); + return; + } +#endif + if (irq_tab[irq].dev_id != dev_id) + printk("%s: Removing probably wrong IRQ %d from %s\n", + __FUNCTION__, irq, irq_tab[irq].devname); + + irq_tab[irq].handler = bvme6000_defhand; + irq_tab[irq].flags = IRQ_FLG_STD; + irq_tab[irq].dev_id = NULL; + irq_tab[irq].devname = NULL; +} + +irqreturn_t bvme6000_process_int (unsigned long vec, struct pt_regs *fp) +{ + if (vec > 255) { + printk ("bvme6000_process_int: Illegal vector %ld", vec); + return IRQ_NONE; + } else { + irq_tab[vec].count++; + irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); + return IRQ_HANDLED; + } +} + +int show_bvme6000_interrupts(struct seq_file *p, void *v) +{ + int i; + + for (i = 0; i < 256; i++) { + if (irq_tab[i].count) + seq_printf(p, "Vec 0x%02x: %8d %s\n", + i, irq_tab[i].count, + irq_tab[i].devname ? irq_tab[i].devname : "free"); + } + return 0; +} + + +static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp) +{ + printk ("Unknown interrupt 0x%02x\n", irq); + return IRQ_NONE; +} + +void bvme6000_enable_irq (unsigned int irq) +{ +} + + +void bvme6000_disable_irq (unsigned int irq) +{ +} + diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index d1e916ae5..c90cb5fcc 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c @@ -36,8 +36,15 @@ #include #include +extern irqreturn_t bvme6000_process_int (int level, struct pt_regs *regs); +extern void bvme6000_init_IRQ (void); +extern void bvme6000_free_irq (unsigned int, void *); +extern int show_bvme6000_interrupts(struct seq_file *, void *); +extern void bvme6000_enable_irq (unsigned int); +extern void bvme6000_disable_irq (unsigned int); static void bvme6000_get_model(char *model); static int bvme6000_get_hardware_list(char *buffer); +extern int bvme6000_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); extern void bvme6000_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); extern unsigned long bvme6000_gettimeoffset (void); extern int bvme6000_hwclk (int, struct rtc_time *); @@ -93,14 +100,6 @@ static int bvme6000_get_hardware_list(char *buffer) return 0; } -/* - * This function is called during kernel startup to initialize - * the bvme6000 IRQ handling routines. - */ -static void bvme6000_init_IRQ(void) -{ - m68k_setup_user_interrupt(VEC_USER, 192, NULL); -} void __init config_bvme6000(void) { @@ -128,6 +127,12 @@ void __init config_bvme6000(void) mach_hwclk = bvme6000_hwclk; mach_set_clock_mmss = bvme6000_set_clock_mmss; mach_reset = bvme6000_reset; + mach_free_irq = bvme6000_free_irq; + mach_process_int = bvme6000_process_int; + mach_get_irq_list = show_bvme6000_interrupts; + mach_request_irq = bvme6000_request_irq; + enable_irq = bvme6000_enable_irq; + disable_irq = bvme6000_disable_irq; mach_get_model = bvme6000_get_model; mach_get_hardware_list = bvme6000_get_hardware_list; diff --git a/arch/m68k/hp300/Makefile b/arch/m68k/hp300/Makefile index 288b9c67c..89b631789 100644 --- a/arch/m68k/hp300/Makefile +++ b/arch/m68k/hp300/Makefile @@ -2,4 +2,4 @@ # Makefile for Linux arch/m68k/hp300 source directory # -obj-y := ksyms.o config.o time.o reboot.o +obj-y := ksyms.o config.o ints.o time.o reboot.o diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c index 1c05a6260..6d129eef3 100644 --- a/arch/m68k/hp300/config.c +++ b/arch/m68k/hp300/config.c @@ -7,6 +7,7 @@ * called by setup.c. */ +#include #include #include #include @@ -20,6 +21,7 @@ #include #include +#include "ints.h" #include "time.h" unsigned long hp300_model; @@ -62,6 +64,8 @@ static char *hp300_models[] __initdata = { static char hp300_model_name[13] = "HP9000/"; extern void hp300_reset(void); +extern irqreturn_t (*hp300_default_handler[])(int, void *, struct pt_regs *); +extern int show_hp300_interrupts(struct seq_file *, void *); #ifdef CONFIG_SERIAL_8250_CONSOLE extern int hp300_setup_serial_console(void) __init; #endif @@ -241,16 +245,16 @@ static unsigned int hp300_get_ss(void) hp300_rtc_read(RTC_REG_SEC2); } -static void __init hp300_init_IRQ(void) -{ -} - void __init config_hp300(void) { mach_sched_init = hp300_sched_init; mach_init_IRQ = hp300_init_IRQ; + mach_request_irq = hp300_request_irq; + mach_free_irq = hp300_free_irq; mach_get_model = hp300_get_model; + mach_get_irq_list = show_hp300_interrupts; mach_gettimeoffset = hp300_gettimeoffset; + mach_default_handler = &hp300_default_handler; mach_hwclk = hp300_hwclk; mach_get_ss = hp300_get_ss; mach_reset = hp300_reset; diff --git a/arch/m68k/hp300/ints.c b/arch/m68k/hp300/ints.c new file mode 100644 index 000000000..0c5bb403e --- /dev/null +++ b/arch/m68k/hp300/ints.c @@ -0,0 +1,175 @@ +/* + * linux/arch/m68k/hp300/ints.c + * + * Copyright (C) 1998 Philip Blundell + * + * This file contains the HP300-specific interrupt handling. + * We only use the autovector interrupts, and therefore we need to + * maintain lists of devices sharing each ipl. + * [ipl list code added by Peter Maydell 06/1998] + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ints.h" + +/* Each ipl has a linked list of interrupt service routines. + * Service routines are added via hp300_request_irq() and removed + * via hp300_free_irq(). The device driver should set IRQ_FLG_FAST + * if it needs to be serviced early (eg FIFOless UARTs); this will + * cause it to be added at the front of the queue rather than + * the back. + * Currently IRQ_FLG_SLOW and flags=0 are treated identically; if + * we needed three levels of priority we could distinguish them + * but this strikes me as mildly ugly... + */ + +/* we start with no entries in any list */ +static irq_node_t *hp300_irq_list[HP300_NUM_IRQS]; + +static spinlock_t irqlist_lock; + +/* This handler receives all interrupts, dispatching them to the registered handlers */ +static irqreturn_t hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp) +{ + irq_node_t *t; + /* We just give every handler on the chain an opportunity to handle + * the interrupt, in priority order. + */ + for(t = hp300_irq_list[irq]; t; t=t->next) + t->handler(irq, t->dev_id, fp); + /* We could put in some accounting routines, checks for stray interrupts, + * etc, in here. Note that currently we can't tell whether or not + * a handler handles the interrupt, though. + */ + return IRQ_HANDLED; +} + +static irqreturn_t hp300_badint(int irq, void *dev_id, struct pt_regs *fp) +{ + num_spurious += 1; + return IRQ_NONE; +} + +irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { + [0] = hp300_badint, + [1] = hp300_int_handler, + [2] = hp300_int_handler, + [3] = hp300_int_handler, + [4] = hp300_int_handler, + [5] = hp300_int_handler, + [6] = hp300_int_handler, + [7] = hp300_int_handler +}; + +/* dev_id had better be unique to each handler because it's the only way we have + * to distinguish handlers when removing them... + * + * It would be pretty easy to support IRQ_FLG_LOCK (handler is not replacable) + * and IRQ_FLG_REPLACE (handler replaces existing one with this dev_id) + * if we wanted to. IRQ_FLG_FAST is needed for devices where interrupt latency + * matters (eg the dreaded FIFOless UART...) + */ +int hp300_request_irq(unsigned int irq, + irqreturn_t (*handler) (int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + irq_node_t *t, *n = new_irq_node(); + + if (!n) /* oops, no free nodes */ + return -ENOMEM; + + spin_lock_irqsave(&irqlist_lock, flags); + + if (!hp300_irq_list[irq]) { + /* no list yet */ + hp300_irq_list[irq] = n; + n->next = NULL; + } else if (flags & IRQ_FLG_FAST) { + /* insert at head of list */ + n->next = hp300_irq_list[irq]; + hp300_irq_list[irq] = n; + } else { + /* insert at end of list */ + for(t = hp300_irq_list[irq]; t->next; t = t->next) + /* do nothing */; + n->next = NULL; + t->next = n; + } + + /* Fill in n appropriately */ + n->handler = handler; + n->flags = flags; + n->dev_id = dev_id; + n->devname = devname; + spin_unlock_irqrestore(&irqlist_lock, flags); + return 0; +} + +void hp300_free_irq(unsigned int irq, void *dev_id) +{ + irq_node_t *t; + unsigned long flags; + + spin_lock_irqsave(&irqlist_lock, flags); + + t = hp300_irq_list[irq]; + if (!t) /* no handlers at all for that IRQ */ + { + printk(KERN_ERR "hp300_free_irq: attempt to remove nonexistent handler for IRQ %d\n", irq); + spin_unlock_irqrestore(&irqlist_lock, flags); + return; + } + + if (t->dev_id == dev_id) + { /* removing first handler on chain */ + t->flags = IRQ_FLG_STD; /* we probably don't really need these */ + t->dev_id = NULL; + t->devname = NULL; + t->handler = NULL; /* frees this irq_node_t */ + hp300_irq_list[irq] = t->next; + spin_unlock_irqrestore(&irqlist_lock, flags); + return; + } + + /* OK, must be removing from middle of the chain */ + + for (t = hp300_irq_list[irq]; t->next && t->next->dev_id != dev_id; t = t->next) + /* do nothing */; + if (!t->next) + { + printk(KERN_ERR "hp300_free_irq: attempt to remove nonexistent handler for IRQ %d\n", irq); + spin_unlock_irqrestore(&irqlist_lock, flags); + return; + } + /* remove the entry after t: */ + t->next->flags = IRQ_FLG_STD; + t->next->dev_id = NULL; + t->next->devname = NULL; + t->next->handler = NULL; + t->next = t->next->next; + + spin_unlock_irqrestore(&irqlist_lock, flags); +} + +int show_hp300_interrupts(struct seq_file *p, void *v) +{ + return 0; +} + +void __init hp300_init_IRQ(void) +{ + spin_lock_init(&irqlist_lock); +} diff --git a/arch/m68k/hp300/ints.h b/arch/m68k/hp300/ints.h new file mode 100644 index 000000000..8cfabe2f3 --- /dev/null +++ b/arch/m68k/hp300/ints.h @@ -0,0 +1,9 @@ +extern void hp300_init_IRQ(void); +extern void (*hp300_handlers[8])(int, void *, struct pt_regs *); +extern void hp300_free_irq(unsigned int irq, void *dev_id); +extern int hp300_request_irq(unsigned int irq, + irqreturn_t (*handler) (int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id); + +/* number of interrupts, includes 0 (what's that?) */ +#define HP300_NUM_IRQS 8 diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c index 7df05662b..8da5b1b31 100644 --- a/arch/m68k/hp300/time.c +++ b/arch/m68k/hp300/time.c @@ -18,6 +18,7 @@ #include #include #include +#include "ints.h" /* Clock hardware definitions */ @@ -70,7 +71,7 @@ void __init hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs * asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); - request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector); + cpu_request_irq(6, hp300_tick, IRQ_FLG_STD, "timer tick", vector); out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ out_8(CLOCKBASE + CLKCR1, 0x40); /* enable irq */ diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile index dae609797..458925c47 100644 --- a/arch/m68k/kernel/Makefile +++ b/arch/m68k/kernel/Makefile @@ -9,8 +9,8 @@ else endif extra-y += vmlinux.lds -obj-y := entry.o process.o traps.o ints.o dma.o signal.o ptrace.o \ - sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o +obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \ + sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o obj-$(CONFIG_PCI) += bios32.o obj-$(CONFIG_MODULES) += module.o diff --git a/arch/m68k/kernel/bios32.c b/arch/m68k/kernel/bios32.c index af170c2be..a901685eb 100644 --- a/arch/m68k/kernel/bios32.c +++ b/arch/m68k/kernel/bios32.c @@ -6,6 +6,7 @@ * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger. */ +#include #include #include diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c deleted file mode 100644 index fc449f8b2..000000000 --- a/arch/m68k/kernel/dma.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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. - */ - -#undef DEBUG - -#include -#include -#include -#include - -#include -#include - -void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *handle, int flag) -{ - struct page *page, **map; - pgprot_t pgprot; - void *addr; - int i, order; - - pr_debug("dma_alloc_coherent: %d,%x\n", size, flag); - - size = PAGE_ALIGN(size); - order = get_order(size); - - page = alloc_pages(flag, order); - if (!page) - return NULL; - - *handle = page_to_phys(page); - map = kmalloc(sizeof(struct page *) << order, flag & ~__GFP_DMA); - if (!map) { - __free_pages(page, order); - return NULL; - } - split_page(page, order); - - order = 1 << order; - size >>= PAGE_SHIFT; - map[0] = page; - for (i = 1; i < size; i++) - map[i] = page + i; - for (; i < order; i++) - __free_page(page + i); - pgprot = __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_DIRTY); - if (CPU_IS_040_OR_060) - pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S; - else - pgprot_val(pgprot) |= _PAGE_NOCACHE030; - addr = vmap(map, size, flag, pgprot); - kfree(map); - - return addr; -} -EXPORT_SYMBOL(dma_alloc_coherent); - -void dma_free_coherent(struct device *dev, size_t size, - void *addr, dma_addr_t handle) -{ - pr_debug("dma_free_coherent: %p, %x\n", addr, handle); - vfree(addr); -} -EXPORT_SYMBOL(dma_free_coherent); - -inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, - enum dma_data_direction dir) -{ - switch (dir) { - case DMA_TO_DEVICE: - cache_push(handle, size); - break; - case DMA_FROM_DEVICE: - cache_clear(handle, size); - break; - default: - if (printk_ratelimit()) - printk("dma_sync_single_for_device: unsupported dir %u\n", dir); - break; - } -} -EXPORT_SYMBOL(dma_sync_single_for_device); - -void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, - enum dma_data_direction dir) -{ - int i; - - for (i = 0; i < nents; sg++, i++) - dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir); -} -EXPORT_SYMBOL(dma_sync_sg_for_device); - -dma_addr_t dma_map_single(struct device *dev, void *addr, size_t size, - enum dma_data_direction dir) -{ - dma_addr_t handle = virt_to_bus(addr); - - dma_sync_single_for_device(dev, handle, size, dir); - return handle; -} -EXPORT_SYMBOL(dma_map_single); - -dma_addr_t dma_map_page(struct device *dev, struct page *page, - unsigned long offset, size_t size, - enum dma_data_direction dir) -{ - dma_addr_t handle = page_to_phys(page) + offset; - - dma_sync_single_for_device(dev, handle, size, dir); - return handle; -} -EXPORT_SYMBOL(dma_map_page); - -int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, - enum dma_data_direction dir) -{ - int i; - - for (i = 0; i < nents; sg++, i++) { - sg->dma_address = page_to_phys(sg->page) + sg->offset; - dma_sync_single_for_device(dev, sg->dma_address, sg->length, dir); - } - return nents; -} -EXPORT_SYMBOL(dma_map_sg); diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 9083c8b76..320fde05d 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S @@ -33,6 +33,7 @@ * for 68040 */ +#include #include #include #include @@ -44,11 +45,9 @@ #include .globl system_call, buserr, trap, resume -.globl sys_call_table +.globl inthandler, sys_call_table .globl sys_fork, sys_clone, sys_vfork .globl ret_from_interrupt, bad_interrupt -.globl auto_irqhandler_fixup -.globl user_irqvec_fixup, user_irqhandler_fixup .text ENTRY(buserr) @@ -192,29 +191,65 @@ do_delayed_trace: jbra resume_userspace -/* This is the main interrupt handler for autovector interrupts */ +#if 0 +#ifdef CONFIG_AMIGA +ami_inthandler: + addql #1,irq_stat+CPUSTAT_LOCAL_IRQ_COUNT + SAVE_ALL_INT + GET_CURRENT(%d0) -ENTRY(auto_inthandler) + bfextu %sp@(PT_VECTOR){#4,#12},%d0 + movel %d0,%a0 + addql #1,%a0@(kstat+STAT_IRQ-VECOFF(VEC_SPUR)) + movel %a0@(autoirq_list-VECOFF(VEC_SPUR)),%a0 + +| amiga vector int handler get the req mask instead of irq vector + lea CUSTOMBASE,%a1 + movew %a1@(C_INTREQR),%d0 + andw %a1@(C_INTENAR),%d0 + +| prepare stack (push frame pointer, dev_id & req mask) + pea %sp@ + movel %a0@(IRQ_DEVID),%sp@- + movel %d0,%sp@- + pea %pc@(ret_from_interrupt:w) + jbra @(IRQ_HANDLER,%a0)@(0) + +ENTRY(nmi_handler) + rte +#endif +#endif + +/* +** This is the main interrupt handler, responsible for calling process_int() +*/ +inthandler: SAVE_ALL_INT GET_CURRENT(%d0) - addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) + addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2) | put exception # in d0 - bfextu %sp@(PT_VECTOR){#4,#10},%d0 - subw #VEC_SPUR,%d0 + bfextu %sp@(PT_VECTOR){#4,#10},%d0 movel %sp,%sp@- movel %d0,%sp@- | put vector # on stack -auto_irqhandler_fixup = . + 2 - jsr m68k_handle_int | process the IRQ - addql #8,%sp | pop parameters off stack +#if defined(MACH_Q40_ONLY) && defined(CONFIG_BLK_DEV_FD) + btstb #4,0xff000000 | Q40 floppy needs very special treatment ... + jbeq 1f + btstb #3,0xff000004 + jbeq 1f + jbsr floppy_hardint + jbra 3f +1: +#endif + jbsr process_int | process the IRQ +3: addql #8,%sp | pop parameters off stack ret_from_interrupt: - subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) - jeq ret_from_last_interrupt -2: RESTORE_ALL - - ALIGN -ret_from_last_interrupt: + subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2) + jeq 1f +2: + RESTORE_ALL +1: moveq #(~ALLOWINT>>8)&0xff,%d0 andb %sp@(PT_SR),%d0 jne 2b @@ -225,42 +260,12 @@ ret_from_last_interrupt: pea ret_from_exception jra do_softirq -/* Handler for user defined interrupt vectors */ - -ENTRY(user_inthandler) - SAVE_ALL_INT - GET_CURRENT(%d0) - addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) - | put exception # in d0 - bfextu %sp@(PT_VECTOR){#4,#10},%d0 -user_irqvec_fixup = . + 2 - subw #VEC_USER,%d0 - - movel %sp,%sp@- - movel %d0,%sp@- | put vector # on stack -user_irqhandler_fixup = . + 2 - jsr m68k_handle_int | process the IRQ - addql #8,%sp | pop parameters off stack - - subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) - jeq ret_from_last_interrupt - RESTORE_ALL /* Handler for uninitialized and spurious interrupts */ -ENTRY(bad_inthandler) - SAVE_ALL_INT - GET_CURRENT(%d0) - addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) - - movel %sp,%sp@- - jsr handle_badint - addql #4,%sp - - subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) - jeq ret_from_last_interrupt - RESTORE_ALL - +bad_interrupt: + addql #1,num_spurious + rte ENTRY(sys_fork) SAVE_SWITCH_STACK diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 6739e87fe..70002c146 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -255,6 +255,7 @@ * MAC_USE_SCC_B: Use the SCC port B (printer) for serial debug (default). */ +#include #include #include #include diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index b33e37fb7..514d323ad 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c @@ -25,6 +25,7 @@ * which must be served /Roman Zippel */ +#include #include #include #include @@ -38,40 +39,47 @@ #include #include #include -#include #ifdef CONFIG_Q40 #include #endif -extern u32 auto_irqhandler_fixup[]; -extern u32 user_irqhandler_fixup[]; -extern u16 user_irqvec_fixup[]; - /* table for system interrupt handlers */ -static struct irq_node *irq_list[NR_IRQS]; -static struct irq_controller *irq_controller[NR_IRQS]; -static int irq_depth[NR_IRQS]; - -static int m68k_first_user_vec; - -static struct irq_controller auto_irq_controller = { - .name = "auto", - .lock = SPIN_LOCK_UNLOCKED, - .startup = m68k_irq_startup, - .shutdown = m68k_irq_shutdown, +static irq_handler_t irq_list[SYS_IRQS]; + +static const char *default_names[SYS_IRQS] = { + [0] = "spurious int", + [1] = "int1 handler", + [2] = "int2 handler", + [3] = "int3 handler", + [4] = "int4 handler", + [5] = "int5 handler", + [6] = "int6 handler", + [7] = "int7 handler" }; -static struct irq_controller user_irq_controller = { - .name = "user", - .lock = SPIN_LOCK_UNLOCKED, - .startup = m68k_irq_startup, - .shutdown = m68k_irq_shutdown, -}; +/* The number of spurious interrupts */ +volatile unsigned int num_spurious; #define NUM_IRQ_NODES 100 static irq_node_t nodes[NUM_IRQ_NODES]; +static void dummy_enable_irq(unsigned int irq); +static void dummy_disable_irq(unsigned int irq); +static int dummy_request_irq(unsigned int irq, + irqreturn_t (*handler) (int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id); +static void dummy_free_irq(unsigned int irq, void *dev_id); + +void (*enable_irq) (unsigned int) = dummy_enable_irq; +void (*disable_irq) (unsigned int) = dummy_disable_irq; + +int (*mach_request_irq) (unsigned int, irqreturn_t (*)(int, void *, struct pt_regs *), + unsigned long, const char *, void *) = dummy_request_irq; +void (*mach_free_irq) (unsigned int, void *) = dummy_free_irq; + +void init_irq_proc(void); + /* * void init_IRQ(void) * @@ -87,76 +95,18 @@ void __init init_IRQ(void) { int i; - /* assembly irq entry code relies on this... */ - if (HARDIRQ_MASK != 0x00ff0000) { - extern void hardirq_mask_is_broken(void); - hardirq_mask_is_broken(); + for (i = 0; i < SYS_IRQS; i++) { + if (mach_default_handler) + irq_list[i].handler = (*mach_default_handler)[i]; + irq_list[i].flags = 0; + irq_list[i].dev_id = NULL; + irq_list[i].devname = default_names[i]; } - for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) - irq_controller[i] = &auto_irq_controller; - - mach_init_IRQ(); -} - -/** - * m68k_setup_auto_interrupt - * @handler: called from auto vector interrupts - * - * setup the handler to be called from auto vector interrupts instead of the - * standard m68k_handle_int(), it will be called with irq numbers in the range - * from IRQ_AUTO_1 - IRQ_AUTO_7. - */ -void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) -{ - if (handler) - *auto_irqhandler_fixup = (u32)handler; - flush_icache(); -} - -/** - * m68k_setup_user_interrupt - * @vec: first user vector interrupt to handle - * @cnt: number of active user vector interrupts - * @handler: called from user vector interrupts - * - * setup user vector interrupts, this includes activating the specified range - * of interrupts, only then these interrupts can be requested (note: this is - * different from auto vector interrupts). An optional handler can be installed - * to be called instead of the default m68k_handle_int(), it will be called - * with irq numbers starting from IRQ_USER. - */ -void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, - void (*handler)(unsigned int, struct pt_regs *)) -{ - int i; - - m68k_first_user_vec = vec; - for (i = 0; i < cnt; i++) - irq_controller[IRQ_USER + i] = &user_irq_controller; - *user_irqvec_fixup = vec - IRQ_USER; - if (handler) - *user_irqhandler_fixup = (u32)handler; - flush_icache(); -} - -/** - * m68k_setup_irq_controller - * @contr: irq controller which controls specified irq - * @irq: first irq to be managed by the controller - * - * Change the controller for the specified range of irq, which will be used to - * manage these irq. auto/user irq already have a default controller, which can - * be changed as well, but the controller probably should use m68k_irq_startup/ - * m68k_irq_shutdown. - */ -void m68k_setup_irq_controller(struct irq_controller *contr, unsigned int irq, - unsigned int cnt) -{ - int i; + for (i = 0; i < NUM_IRQ_NODES; i++) + nodes[i].handler = NULL; - for (i = 0; i < cnt; i++) - irq_controller[irq + i] = contr; + mach_init_IRQ (); } irq_node_t *new_irq_node(void) @@ -164,183 +114,84 @@ irq_node_t *new_irq_node(void) irq_node_t *node; short i; - for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) { - if (!node->handler) { - memset(node, 0, sizeof(*node)); + for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) + if (!node->handler) return node; - } - } printk ("new_irq_node: out of nodes\n"); return NULL; } -int setup_irq(unsigned int irq, struct irq_node *node) -{ - struct irq_controller *contr; - struct irq_node **prev; - unsigned long flags; - - if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { - printk("%s: Incorrect IRQ %d from %s\n", - __FUNCTION__, irq, node->devname); - return -ENXIO; - } - - spin_lock_irqsave(&contr->lock, flags); - - prev = irq_list + irq; - if (*prev) { - /* Can't share interrupts unless both agree to */ - if (!((*prev)->flags & node->flags & IRQF_SHARED)) { - spin_unlock_irqrestore(&contr->lock, flags); - return -EBUSY; - } - while (*prev) - prev = &(*prev)->next; - } - - if (!irq_list[irq]) { - if (contr->startup) - contr->startup(irq); - else - contr->enable(irq); - } - node->next = NULL; - *prev = node; - - spin_unlock_irqrestore(&contr->lock, flags); - - return 0; -} - +/* + * We will keep these functions until I have convinced Linus to move + * the declaration of them from include/linux/sched.h to + * include/asm/irq.h. + */ int request_irq(unsigned int irq, irqreturn_t (*handler) (int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) { - struct irq_node *node; - int res; - - node = new_irq_node(); - if (!node) - return -ENOMEM; - - node->handler = handler; - node->flags = flags; - node->dev_id = dev_id; - node->devname = devname; - - res = setup_irq(irq, node); - if (res) - node->handler = NULL; - - return res; + return mach_request_irq(irq, handler, flags, devname, dev_id); } EXPORT_SYMBOL(request_irq); void free_irq(unsigned int irq, void *dev_id) { - struct irq_controller *contr; - struct irq_node **p, *node; - unsigned long flags; - - if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { - printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); - return; - } - - spin_lock_irqsave(&contr->lock, flags); - - p = irq_list + irq; - while ((node = *p)) { - if (node->dev_id == dev_id) - break; - p = &node->next; - } - - if (node) { - *p = node->next; - node->handler = NULL; - } else - printk("%s: Removing probably wrong IRQ %d\n", - __FUNCTION__, irq); - - if (!irq_list[irq]) { - if (contr->shutdown) - contr->shutdown(irq); - else - contr->disable(irq); - } - - spin_unlock_irqrestore(&contr->lock, flags); + mach_free_irq(irq, dev_id); } EXPORT_SYMBOL(free_irq); -void enable_irq(unsigned int irq) +int cpu_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) { - struct irq_controller *contr; - unsigned long flags; - - if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { - printk("%s: Incorrect IRQ %d\n", - __FUNCTION__, irq); - return; + if (irq < IRQ1 || irq > IRQ7) { + printk("%s: Incorrect IRQ %d from %s\n", + __FUNCTION__, irq, devname); + return -ENXIO; } - spin_lock_irqsave(&contr->lock, flags); - if (irq_depth[irq]) { - if (!--irq_depth[irq]) { - if (contr->enable) - contr->enable(irq); +#if 0 + if (!(irq_list[irq].flags & IRQ_FLG_STD)) { + if (irq_list[irq].flags & IRQ_FLG_LOCK) { + printk("%s: IRQ %d from %s is not replaceable\n", + __FUNCTION__, irq, irq_list[irq].devname); + return -EBUSY; } - } else - WARN_ON(1); - spin_unlock_irqrestore(&contr->lock, flags); -} + if (!(flags & IRQ_FLG_REPLACE)) { + printk("%s: %s can't replace IRQ %d from %s\n", + __FUNCTION__, devname, irq, irq_list[irq].devname); + return -EBUSY; + } + } +#endif -EXPORT_SYMBOL(enable_irq); + irq_list[irq].handler = handler; + irq_list[irq].flags = flags; + irq_list[irq].dev_id = dev_id; + irq_list[irq].devname = devname; + return 0; +} -void disable_irq(unsigned int irq) +void cpu_free_irq(unsigned int irq, void *dev_id) { - struct irq_controller *contr; - unsigned long flags; - - if (irq >= NR_IRQS || !(contr = irq_controller[irq])) { - printk("%s: Incorrect IRQ %d\n", - __FUNCTION__, irq); + if (irq < IRQ1 || irq > IRQ7) { + printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); return; } - spin_lock_irqsave(&contr->lock, flags); - if (!irq_depth[irq]++) { - if (contr->disable) - contr->disable(irq); - } - spin_unlock_irqrestore(&contr->lock, flags); -} + if (irq_list[irq].dev_id != dev_id) + printk("%s: Removing probably wrong IRQ %d from %s\n", + __FUNCTION__, irq, irq_list[irq].devname); -EXPORT_SYMBOL(disable_irq); - -int m68k_irq_startup(unsigned int irq) -{ - if (irq <= IRQ_AUTO_7) - vectors[VEC_SPUR + irq] = auto_inthandler; - else - vectors[m68k_first_user_vec + irq - IRQ_USER] = user_inthandler; - return 0; + irq_list[irq].handler = (*mach_default_handler)[irq]; + irq_list[irq].flags = 0; + irq_list[irq].dev_id = NULL; + irq_list[irq].devname = default_names[irq]; } -void m68k_irq_shutdown(unsigned int irq) -{ - if (irq <= IRQ_AUTO_7) - vectors[VEC_SPUR + irq] = bad_inthandler; - else - vectors[m68k_first_user_vec + irq - IRQ_USER] = bad_inthandler; -} - - /* * Do we need these probe functions on the m68k? * @@ -368,50 +219,58 @@ int probe_irq_off (unsigned long irqs) EXPORT_SYMBOL(probe_irq_off); -unsigned int irq_canonicalize(unsigned int irq) +static void dummy_enable_irq(unsigned int irq) { -#ifdef CONFIG_Q40 - if (MACH_IS_Q40 && irq == 11) - irq = 10; -#endif - return irq; + printk("calling uninitialized enable_irq()\n"); } -EXPORT_SYMBOL(irq_canonicalize); +static void dummy_disable_irq(unsigned int irq) +{ + printk("calling uninitialized disable_irq()\n"); +} -asmlinkage void m68k_handle_int(unsigned int irq, struct pt_regs *regs) +static int dummy_request_irq(unsigned int irq, + irqreturn_t (*handler) (int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) { - struct irq_node *node; - - kstat_cpu(0).irqs[irq]++; - node = irq_list[irq]; - do { - node->handler(irq, node->dev_id, regs); - node = node->next; - } while (node); + printk("calling uninitialized request_irq()\n"); + return 0; } -asmlinkage void handle_badint(struct pt_regs *regs) +static void dummy_free_irq(unsigned int irq, void *dev_id) { - kstat_cpu(0).irqs[0]++; - printk("unexpected interrupt from %u\n", regs->vector); + printk("calling uninitialized disable_irq()\n"); +} + +asmlinkage void process_int(unsigned long vec, struct pt_regs *fp) +{ + if (vec >= VEC_INT1 && vec <= VEC_INT7 && !MACH_IS_BVME6000) { + vec -= VEC_SPUR; + kstat_cpu(0).irqs[vec]++; + irq_list[vec].handler(vec, irq_list[vec].dev_id, fp); + } else { + if (mach_process_int) + mach_process_int(vec, fp); + else + panic("Can't process interrupt vector %ld\n", vec); + return; + } } int show_interrupts(struct seq_file *p, void *v) { - struct irq_controller *contr; - struct irq_node *node; int i = *(loff_t *) v; /* autovector interrupts */ - if (irq_list[i]) { - contr = irq_controller[i]; - node = irq_list[i]; - seq_printf(p, "%-8s %3u: %10u %s", contr->name, i, kstat_cpu(0).irqs[i], node->devname); - while ((node = node->next)) - seq_printf(p, ", %s", node->devname); - seq_puts(p, "\n"); - } + if (i < SYS_IRQS) { + if (mach_default_handler) { + 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); + } + } else if (i == SYS_IRQS) + mach_get_irq_list(p, v); return 0; } diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index aff26a521..5b7952ea2 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -56,6 +57,8 @@ EXPORT_SYMBOL(dump_thread); EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strrchr); EXPORT_SYMBOL(strstr); +EXPORT_SYMBOL(enable_irq); +EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(kernel_thread); #ifdef CONFIG_VME EXPORT_SYMBOL(vme_brdtype); diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 45a46646c..33648efb7 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c @@ -10,6 +10,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 608a1621b..deddf3920 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/arch/m68k/kernel/semaphore.c b/arch/m68k/kernel/semaphore.c index d12cbbfe6..1ebb79baa 100644 --- a/arch/m68k/kernel/semaphore.c +++ b/arch/m68k/kernel/semaphore.c @@ -3,6 +3,7 @@ * specific changes in */ +#include #include #include #include diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index f2d7ee0ee..750d5b3c9 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c @@ -8,6 +8,7 @@ * This file handles the architecture-dependent parts of system setup */ +#include #include #include #include @@ -67,8 +68,11 @@ char m68k_debug_device[6] = ""; void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; /* machine dependent irq functions */ void (*mach_init_IRQ) (void) __initdata = NULL; +irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); void (*mach_get_model) (char *model); int (*mach_get_hardware_list) (char *buffer); +int (*mach_get_irq_list) (struct seq_file *, void *); +irqreturn_t (*mach_process_int) (int, struct pt_regs *); /* machine dependent timer functions */ unsigned long (*mach_gettimeoffset) (void); int (*mach_hwclk) (int, struct rtc_time*); diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index f9af893cd..866917bfa 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -763,7 +763,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (!sas_ss_flags(usp)) + if (!on_sig_stack(usp)) usp = current->sas_ss_sp + current->sas_ss_size; } return (void __user *)((usp - frame_size) & -8UL); diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 073d945bb..98e4b1adf 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c @@ -10,6 +10,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include /* CONFIG_HEARTBEAT */ #include #include #include diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c index 4569406a2..cdf58fbb3 100644 --- a/arch/m68k/kernel/traps.c +++ b/arch/m68k/kernel/traps.c @@ -18,6 +18,7 @@ * Sets up all exception vectors */ +#include #include #include #include @@ -44,6 +45,7 @@ asmlinkage void system_call(void); asmlinkage void buserr(void); asmlinkage void trap(void); +asmlinkage void inthandler(void); asmlinkage void nmihandler(void); #ifdef CONFIG_M68KFPU_EMU asmlinkage void fpu_emu(void); @@ -51,7 +53,51 @@ asmlinkage void fpu_emu(void); e_vector vectors[256] = { [VEC_BUSERR] = buserr, + [VEC_ADDRERR] = trap, + [VEC_ILLEGAL] = trap, + [VEC_ZERODIV] = trap, + [VEC_CHK] = trap, + [VEC_TRAP] = trap, + [VEC_PRIV] = trap, + [VEC_TRACE] = trap, + [VEC_LINE10] = trap, + [VEC_LINE11] = trap, + [VEC_RESV12] = trap, + [VEC_COPROC] = trap, + [VEC_FORMAT] = trap, + [VEC_UNINT] = trap, + [VEC_RESV16] = trap, + [VEC_RESV17] = trap, + [VEC_RESV18] = trap, + [VEC_RESV19] = trap, + [VEC_RESV20] = trap, + [VEC_RESV21] = trap, + [VEC_RESV22] = trap, + [VEC_RESV23] = trap, + [VEC_SPUR] = inthandler, + [VEC_INT1] = inthandler, + [VEC_INT2] = inthandler, + [VEC_INT3] = inthandler, + [VEC_INT4] = inthandler, + [VEC_INT5] = inthandler, + [VEC_INT6] = inthandler, + [VEC_INT7] = inthandler, [VEC_SYS] = system_call, + [VEC_TRAP1] = trap, + [VEC_TRAP2] = trap, + [VEC_TRAP3] = trap, + [VEC_TRAP4] = trap, + [VEC_TRAP5] = trap, + [VEC_TRAP6] = trap, + [VEC_TRAP7] = trap, + [VEC_TRAP8] = trap, + [VEC_TRAP9] = trap, + [VEC_TRAP10] = trap, + [VEC_TRAP11] = trap, + [VEC_TRAP12] = trap, + [VEC_TRAP13] = trap, + [VEC_TRAP14] = trap, + [VEC_TRAP15] = trap, }; /* nmi handler for the Amiga */ @@ -68,7 +114,7 @@ void __init base_trap_init(void) if(MACH_IS_SUN3X) { extern e_vector *sun3x_prom_vbr; - __asm__ volatile ("movec %%vbr, %0" : "=r" (sun3x_prom_vbr)); + __asm__ volatile ("movec %%vbr, %0" : "=r" ((void*)sun3x_prom_vbr)); } /* setup the exception vector table */ @@ -86,15 +132,12 @@ void __init trap_init (void) { int i; - for (i = VEC_SPUR; i <= VEC_INT7; i++) - vectors[i] = bad_inthandler; - - for (i = 0; i < VEC_USER; i++) + for (i = 48; i < 64; i++) if (!vectors[i]) vectors[i] = trap; - for (i = VEC_USER; i < 256; i++) - vectors[i] = bad_inthandler; + for (i = 64; i < 256; i++) + vectors[i] = inthandler; #ifdef CONFIG_M68KFPU_EMU if (FPU_IS_EMU) @@ -884,94 +927,71 @@ void show_trace(unsigned long *stack) void show_registers(struct pt_regs *regs) { struct frame *fp = (struct frame *)regs; - mm_segment_t old_fs = get_fs(); - u16 c, *cp; unsigned long addr; int i; - print_modules(); - printk("PC: [<%08lx>]",regs->pc); - print_symbol(" %s", regs->pc); - printk("\nSR: %04x SP: %p a2: %08lx\n", - regs->sr, regs, regs->a2); - printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", - regs->d0, regs->d1, regs->d2, regs->d3); - printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", - regs->d4, regs->d5, regs->a0, regs->a1); - - printk("Process %s (pid: %d, task=%p)\n", - current->comm, current->pid, current); addr = (unsigned long)&fp->un; - printk("Frame format=%X ", regs->format); - switch (regs->format) { + printk("Frame format=%X ", fp->ptregs.format); + switch (fp->ptregs.format) { case 0x2: - printk("instr addr=%08lx\n", fp->un.fmt2.iaddr); - addr += sizeof(fp->un.fmt2); - break; + printk("instr addr=%08lx\n", fp->un.fmt2.iaddr); + addr += sizeof(fp->un.fmt2); + break; case 0x3: - printk("eff addr=%08lx\n", fp->un.fmt3.effaddr); - addr += sizeof(fp->un.fmt3); - break; + printk("eff addr=%08lx\n", fp->un.fmt3.effaddr); + addr += sizeof(fp->un.fmt3); + break; case 0x4: - printk((CPU_IS_060 ? "fault addr=%08lx fslw=%08lx\n" - : "eff addr=%08lx pc=%08lx\n"), - fp->un.fmt4.effaddr, fp->un.fmt4.pc); - addr += sizeof(fp->un.fmt4); - break; + printk((CPU_IS_060 ? "fault addr=%08lx fslw=%08lx\n" + : "eff addr=%08lx pc=%08lx\n"), + fp->un.fmt4.effaddr, fp->un.fmt4.pc); + addr += sizeof(fp->un.fmt4); + break; case 0x7: - printk("eff addr=%08lx ssw=%04x faddr=%08lx\n", - fp->un.fmt7.effaddr, fp->un.fmt7.ssw, fp->un.fmt7.faddr); - printk("wb 1 stat/addr/data: %04x %08lx %08lx\n", - fp->un.fmt7.wb1s, fp->un.fmt7.wb1a, fp->un.fmt7.wb1dpd0); - printk("wb 2 stat/addr/data: %04x %08lx %08lx\n", - fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, fp->un.fmt7.wb2d); - printk("wb 3 stat/addr/data: %04x %08lx %08lx\n", - fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, fp->un.fmt7.wb3d); - printk("push data: %08lx %08lx %08lx %08lx\n", - fp->un.fmt7.wb1dpd0, fp->un.fmt7.pd1, fp->un.fmt7.pd2, - fp->un.fmt7.pd3); - addr += sizeof(fp->un.fmt7); - break; + printk("eff addr=%08lx ssw=%04x faddr=%08lx\n", + fp->un.fmt7.effaddr, fp->un.fmt7.ssw, fp->un.fmt7.faddr); + printk("wb 1 stat/addr/data: %04x %08lx %08lx\n", + fp->un.fmt7.wb1s, fp->un.fmt7.wb1a, fp->un.fmt7.wb1dpd0); + printk("wb 2 stat/addr/data: %04x %08lx %08lx\n", + fp->un.fmt7.wb2s, fp->un.fmt7.wb2a, fp->un.fmt7.wb2d); + printk("wb 3 stat/addr/data: %04x %08lx %08lx\n", + fp->un.fmt7.wb3s, fp->un.fmt7.wb3a, fp->un.fmt7.wb3d); + printk("push data: %08lx %08lx %08lx %08lx\n", + fp->un.fmt7.wb1dpd0, fp->un.fmt7.pd1, fp->un.fmt7.pd2, + fp->un.fmt7.pd3); + addr += sizeof(fp->un.fmt7); + break; case 0x9: - printk("instr addr=%08lx\n", fp->un.fmt9.iaddr); - addr += sizeof(fp->un.fmt9); - break; + printk("instr addr=%08lx\n", fp->un.fmt9.iaddr); + addr += sizeof(fp->un.fmt9); + break; case 0xa: - printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", - fp->un.fmta.ssw, fp->un.fmta.isc, fp->un.fmta.isb, - fp->un.fmta.daddr, fp->un.fmta.dobuf); - addr += sizeof(fp->un.fmta); - break; + printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", + fp->un.fmta.ssw, fp->un.fmta.isc, fp->un.fmta.isb, + fp->un.fmta.daddr, fp->un.fmta.dobuf); + addr += sizeof(fp->un.fmta); + break; case 0xb: - printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", - fp->un.fmtb.ssw, fp->un.fmtb.isc, fp->un.fmtb.isb, - fp->un.fmtb.daddr, fp->un.fmtb.dobuf); - printk("baddr=%08lx dibuf=%08lx ver=%x\n", - fp->un.fmtb.baddr, fp->un.fmtb.dibuf, fp->un.fmtb.ver); - addr += sizeof(fp->un.fmtb); - break; + printk("ssw=%04x isc=%04x isb=%04x daddr=%08lx dobuf=%08lx\n", + fp->un.fmtb.ssw, fp->un.fmtb.isc, fp->un.fmtb.isb, + fp->un.fmtb.daddr, fp->un.fmtb.dobuf); + printk("baddr=%08lx dibuf=%08lx ver=%x\n", + fp->un.fmtb.baddr, fp->un.fmtb.dibuf, fp->un.fmtb.ver); + addr += sizeof(fp->un.fmtb); + break; default: - printk("\n"); + printk("\n"); } show_stack(NULL, (unsigned long *)addr); - printk("Code:"); - set_fs(KERNEL_DS); - cp = (u16 *)regs->pc; - for (i = -8; i < 16; i++) { - if (get_user(c, cp + i) && i >= 0) { - printk(" Bad PC value."); - break; - } - printk(i ? " %04x" : " <%04x>", c); - } - set_fs(old_fs); + printk("Code: "); + for (i = 0; i < 10; i++) + printk("%04x ", 0xffff & ((short *) fp->ptregs.pc)[i]); printk ("\n"); } void show_stack(struct task_struct *task, unsigned long *stack) { - unsigned long *p; unsigned long *endstack; int i; @@ -984,13 +1004,12 @@ void show_stack(struct task_struct *task, unsigned long *stack) endstack = (unsigned long *)(((unsigned long)stack + THREAD_SIZE - 1) & -THREAD_SIZE); printk("Stack from %08lx:", (unsigned long)stack); - p = stack; for (i = 0; i < kstack_depth_to_print; i++) { - if (p + 1 > endstack) + if (stack + 1 > endstack) break; if (i % 8 == 0) printk("\n "); - printk(" %08lx", *p++); + printk(" %08lx", *stack++); } printk("\n"); show_trace(stack); @@ -1169,7 +1188,19 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr) console_verbose(); printk("%s: %08x\n",str,nr); - show_registers(fp); + print_modules(); + printk("PC: [<%08lx>]",fp->pc); + print_symbol(" %s\n", fp->pc); + printk("\nSR: %04x SP: %p a2: %08lx\n", + fp->sr, fp, fp->a2); + printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", + fp->d0, fp->d1, fp->d2, fp->d3); + printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n", + fp->d4, fp->d5, fp->a0, fp->a1); + + printk("Process %s (pid: %d, stackpage=%08lx)\n", + current->comm, current->pid, PAGE_SIZE+(unsigned long)current); + show_stack(NULL, (unsigned long *)fp); do_exit(SIGSEGV); } diff --git a/arch/m68k/kernel/vmlinux.lds.S b/arch/m68k/kernel/vmlinux.lds.S index 99ba315bd..497b924f3 100644 --- a/arch/m68k/kernel/vmlinux.lds.S +++ b/arch/m68k/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include PHDRS { text PT_LOAD FILEHDR PHDRS FLAGS (7); diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile index 6bbf19f96..ebe51a513 100644 --- a/arch/m68k/lib/Makefile +++ b/arch/m68k/lib/Makefile @@ -4,5 +4,5 @@ EXTRA_AFLAGS := -traditional -lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ - checksum.o string.o semaphore.o uaccess.o +lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ + checksum.o string.o semaphore.o diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c deleted file mode 100644 index 1bc188c0d..000000000 --- a/arch/m68k/lib/uaccess.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive - * for more details. - */ - -#include -#include - -unsigned long __generic_copy_from_user(void *to, const void __user *from, - unsigned long n) -{ - unsigned long tmp, res; - - asm volatile ("\n" - " tst.l %0\n" - " jeq 2f\n" - "1: moves.l (%1)+,%3\n" - " move.l %3,(%2)+\n" - " subq.l #1,%0\n" - " jne 1b\n" - "2: btst #1,%5\n" - " jeq 4f\n" - "3: moves.w (%1)+,%3\n" - " move.w %3,(%2)+\n" - "4: btst #0,%5\n" - " jeq 6f\n" - "5: moves.b (%1)+,%3\n" - " move.b %3,(%2)+\n" - "6:\n" - " .section .fixup,\"ax\"\n" - " .even\n" - "10: move.l %0,%3\n" - "7: clr.l (%2)+\n" - " subq.l #1,%3\n" - " jne 7b\n" - " lsl.l #2,%0\n" - " btst #1,%5\n" - " jeq 8f\n" - "30: clr.w (%2)+\n" - " addq.l #2,%0\n" - "8: btst #0,%5\n" - " jeq 6b\n" - "50: clr.b (%2)+\n" - " addq.l #1,%0\n" - " jra 6b\n" - " .previous\n" - "\n" - " .section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b,10b\n" - " .long 3b,30b\n" - " .long 5b,50b\n" - " .previous" - : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp) - : "0" (n / 4), "d" (n & 3)); - - return res; -} -EXPORT_SYMBOL(__generic_copy_from_user); - -unsigned long __generic_copy_to_user(void __user *to, const void *from, - unsigned long n) -{ - unsigned long tmp, res; - - asm volatile ("\n" - " tst.l %0\n" - " jeq 4f\n" - "1: move.l (%1)+,%3\n" - "2: moves.l %3,(%2)+\n" - "3: subq.l #1,%0\n" - " jne 1b\n" - "4: btst #1,%5\n" - " jeq 6f\n" - " move.w (%1)+,%3\n" - "5: moves.w %3,(%2)+\n" - "6: btst #0,%5\n" - " jeq 8f\n" - " move.b (%1)+,%3\n" - "7: moves.b %3,(%2)+\n" - "8:\n" - " .section .fixup,\"ax\"\n" - " .even\n" - "20: lsl.l #2,%0\n" - "50: add.l %5,%0\n" - " jra 7b\n" - " .previous\n" - "\n" - " .section __ex_table,\"a\"\n" - " .align 4\n" - " .long 2b,20b\n" - " .long 3b,20b\n" - " .long 5b,50b\n" - " .long 6b,50b\n" - " .long 7b,50b\n" - " .long 8b,50b\n" - " .previous" - : "=d" (res), "+a" (from), "+a" (to), "=&r" (tmp) - : "0" (n / 4), "d" (n & 3)); - - return res; -} -EXPORT_SYMBOL(__generic_copy_to_user); - -/* - * Copy a null terminated string from userspace. - */ -long strncpy_from_user(char *dst, const char __user *src, long count) -{ - long res; - char c; - - if (count <= 0) - return count; - - asm volatile ("\n" - "1: moves.b (%2)+,%4\n" - " move.b %4,(%1)+\n" - " jeq 2f\n" - " subq.l #1,%3\n" - " jne 1b\n" - "2: sub.l %3,%0\n" - "3:\n" - " .section .fixup,\"ax\"\n" - " .even\n" - "10: move.l %5,%0\n" - " jra 3b\n" - " .previous\n" - "\n" - " .section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b,10b\n" - " .previous" - : "=d" (res), "+a" (dst), "+a" (src), "+r" (count), "=&d" (c) - : "i" (-EFAULT), "0" (count)); - - return res; -} -EXPORT_SYMBOL(strncpy_from_user); - -/* - * Return the size of a string (including the ending 0) - * - * Return 0 on exception, a value greater than N if too long - */ -long strnlen_user(const char __user *src, long n) -{ - char c; - long res; - - asm volatile ("\n" - "1: subq.l #1,%1\n" - " jmi 3f\n" - "2: moves.b (%0)+,%2\n" - " tst.b %2\n" - " jne 1b\n" - " jra 4f\n" - "\n" - "3: addq.l #1,%0\n" - "4: sub.l %4,%0\n" - "5:\n" - " .section .fixup,\"ax\"\n" - " .even\n" - "20: sub.l %0,%0\n" - " jra 5b\n" - " .previous\n" - "\n" - " .section __ex_table,\"a\"\n" - " .align 4\n" - " .long 2b,20b\n" - " .previous\n" - : "=&a" (res), "+d" (n), "=&d" (c) - : "0" (src), "r" (src)); - - return res; -} -EXPORT_SYMBOL(strnlen_user); - -/* - * Zero Userspace - */ - -unsigned long clear_user(void __user *to, unsigned long n) -{ - unsigned long res; - - asm volatile ("\n" - " tst.l %0\n" - " jeq 3f\n" - "1: moves.l %2,(%1)+\n" - "2: subq.l #1,%0\n" - " jne 1b\n" - "3: btst #1,%4\n" - " jeq 5f\n" - "4: moves.w %2,(%1)+\n" - "5: btst #0,%4\n" - " jeq 7f\n" - "6: moves.b %2,(%1)\n" - "7:\n" - " .section .fixup,\"ax\"\n" - " .even\n" - "10: lsl.l #2,%0\n" - "40: add.l %4,%0\n" - " jra 7b\n" - " .previous\n" - "\n" - " .section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b,10b\n" - " .long 2b,10b\n" - " .long 4b,40b\n" - " .long 5b,40b\n" - " .long 6b,40b\n" - " .long 7b,40b\n" - " .previous" - : "=d" (res), "+a" (to) - : "r" (0), "0" (n / 4), "d" (n & 3)); - - return res; -} -EXPORT_SYMBOL(clear_user); diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 6eaa88179..b19b7dd9b 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -81,7 +81,7 @@ irqreturn_t baboon_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) { if (events & irq_bit/* & baboon_active*/) { baboon_active &= ~irq_bit; - m68k_handle_int(IRQ_BABOON_0 + i, regs); + mac_do_irq_list(IRQ_BABOON_0 + i, regs); baboon_active |= irq_bit; baboon->mb_ifr &= ~irq_bit; } diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 85dda1095..14f8d3f4e 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -10,6 +10,7 @@ * Miscellaneous linux stuff */ +#include #include #include #include @@ -88,11 +89,38 @@ extern void mac_debugging_long(int, long); static void mac_get_model(char *str); +void mac_bang(int irq, void *vector, struct pt_regs *p) +{ + printk(KERN_INFO "Resetting ...\n"); + mac_reset(); +} + static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) { via_init_clock(vector); } +#if 0 +void mac_waitbut (void) +{ + ; +} +#endif + +extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *); + +irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)= +{ + mac_default_handler, + mac_default_handler, + mac_default_handler, + mac_default_handler, + mac_default_handler, + mac_default_handler, + mac_default_handler, + mac_default_handler +}; + /* * Parse a Macintosh-specific record in the bootinfo */ @@ -168,7 +196,13 @@ void __init config_mac(void) mach_sched_init = mac_sched_init; mach_init_IRQ = mac_init_IRQ; + mach_request_irq = mac_request_irq; + mach_free_irq = mac_free_irq; + enable_irq = mac_enable_irq; + disable_irq = mac_disable_irq; mach_get_model = mac_get_model; + mach_default_handler = &mac_handlers; + mach_get_irq_list = show_mac_interrupts; mach_gettimeoffset = mac_gettimeoffset; #warning move to adb/via init #if 0 diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c index 4eeb09dc0..cc62ed61c 100644 --- a/arch/m68k/mac/debug.c +++ b/arch/m68k/mac/debug.c @@ -14,6 +14,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index bc657b105..9179a3798 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -104,6 +104,7 @@ * should execute quickly.) */ +#include #include #include #include @@ -316,7 +317,7 @@ void __init iop_register_interrupts(void) { if (iop_ism_present) { if (oss_present) { - request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, + cpu_request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, IRQ_FLG_LOCK, "ISM IOP", (void *) IOP_NUM_ISM); oss_irq_enable(IRQ_MAC_ADB); diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index 694b14bb0..1809601ad 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c @@ -137,6 +137,14 @@ #define DEBUG_SPURIOUS #define SHUTUP_SONIC +/* + * The mac_irq_list array is an array of linked lists of irq_node_t nodes. + * Each node contains one handler to be called whenever the interrupt + * occurs, with fast handlers listed before slow handlers. + */ + +irq_node_t *mac_irq_list[NUM_MAC_SOURCES]; + /* SCC interrupt mask */ static int scc_mask; @@ -201,37 +209,34 @@ extern int baboon_irq_pending(int); * SCC interrupt routines */ -static void scc_irq_enable(unsigned int); -static void scc_irq_disable(unsigned int); +static void scc_irq_enable(int); +static void scc_irq_disable(int); /* * console_loglevel determines NMI handler function */ +extern irqreturn_t mac_bang(int, void *, struct pt_regs *); irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *); irqreturn_t mac_debug_handler(int, void *, struct pt_regs *); /* #define DEBUG_MACINTS */ -static void mac_enable_irq(unsigned int irq); -static void mac_disable_irq(unsigned int irq); - -static struct irq_controller mac_irq_controller = { - .name = "mac", - .lock = SPIN_LOCK_UNLOCKED, - .enable = mac_enable_irq, - .disable = mac_disable_irq, -}; - void mac_init_IRQ(void) { + int i; + #ifdef DEBUG_MACINTS printk("mac_init_IRQ(): Setting things up...\n"); #endif + /* Initialize the IRQ handler lists. Initially each list is empty, */ + + for (i = 0; i < NUM_MAC_SOURCES; i++) { + mac_irq_list[i] = NULL; + } + scc_mask = 0; - m68k_setup_irq_controller(&mac_irq_controller, IRQ_USER, - NUM_MAC_SOURCES - IRQ_USER); /* Make sure the SONIC interrupt is cleared or things get ugly */ #ifdef SHUTUP_SONIC printk("Killing onboard sonic... "); @@ -248,22 +253,119 @@ void mac_init_IRQ(void) * at levels 1-7. Most of the work is done elsewhere. */ - if (oss_present) + if (oss_present) { oss_register_interrupts(); - else + } else { via_register_interrupts(); - if (psc_present) - psc_register_interrupts(); - if (baboon_present) - baboon_register_interrupts(); + } + if (psc_present) psc_register_interrupts(); + if (baboon_present) baboon_register_interrupts(); iop_register_interrupts(); - request_irq(IRQ_AUTO_7, mac_nmi_handler, 0, "NMI", + cpu_request_irq(7, mac_nmi_handler, IRQ_FLG_LOCK, "NMI", mac_nmi_handler); #ifdef DEBUG_MACINTS printk("mac_init_IRQ(): Done!\n"); #endif } +/* + * Routines to work with irq_node_t's on linked lists lifted from + * the Amiga code written by Roman Zippel. + */ + +static inline void mac_insert_irq(irq_node_t **list, irq_node_t *node) +{ + unsigned long flags; + irq_node_t *cur; + + if (!node->dev_id) + printk("%s: Warning: dev_id of %s is zero\n", + __FUNCTION__, node->devname); + + local_irq_save(flags); + + cur = *list; + + if (node->flags & IRQ_FLG_FAST) { + node->flags &= ~IRQ_FLG_SLOW; + while (cur && cur->flags & IRQ_FLG_FAST) { + list = &cur->next; + cur = cur->next; + } + } else if (node->flags & IRQ_FLG_SLOW) { + while (cur) { + list = &cur->next; + cur = cur->next; + } + } else { + while (cur && !(cur->flags & IRQ_FLG_SLOW)) { + list = &cur->next; + cur = cur->next; + } + } + + node->next = cur; + *list = node; + + local_irq_restore(flags); +} + +static inline void mac_delete_irq(irq_node_t **list, void *dev_id) +{ + unsigned long flags; + irq_node_t *node; + + local_irq_save(flags); + + for (node = *list; node; list = &node->next, node = *list) { + if (node->dev_id == dev_id) { + *list = node->next; + /* Mark it as free. */ + node->handler = NULL; + local_irq_restore(flags); + return; + } + } + local_irq_restore(flags); + printk ("%s: tried to remove invalid irq\n", __FUNCTION__); +} + +/* + * Call all the handlers for a given interrupt. Fast handlers are called + * first followed by slow handlers. + * + * This code taken from the original Amiga code written by Roman Zippel. + */ + +void mac_do_irq_list(int irq, struct pt_regs *fp) +{ + irq_node_t *node, *slow_nodes; + unsigned long flags; + + kstat_cpu(0).irqs[irq]++; + +#ifdef DEBUG_SPURIOUS + if (!mac_irq_list[irq] && (console_loglevel > 7)) { + printk("mac_do_irq_list: spurious interrupt %d!\n", irq); + return; + } +#endif + + /* serve first fast and normal handlers */ + for (node = mac_irq_list[irq]; + node && (!(node->flags & IRQ_FLG_SLOW)); + node = node->next) + node->handler(irq, node->dev_id, fp); + if (!node) return; + local_save_flags(flags); + local_irq_restore((flags & ~0x0700) | (fp->sr & 0x0700)); + /* if slow handlers exists, serve them now */ + slow_nodes = node; + for (; node; node = node->next) { + node->handler(irq, node->dev_id, fp); + } +} + /* * mac_enable_irq - enable an interrupt source * mac_disable_irq - disable an interrupt source @@ -273,124 +375,276 @@ void mac_init_IRQ(void) * These routines are just dispatchers to the VIA/OSS/PSC routines. */ -static void mac_enable_irq(unsigned int irq) +void mac_enable_irq (unsigned int irq) { - int irq_src = IRQ_SRC(irq); + int irq_src = IRQ_SRC(irq); switch(irq_src) { - case 1: - via_irq_enable(irq); - break; - case 2: - case 7: - if (oss_present) - oss_irq_enable(irq); - else - via_irq_enable(irq); - break; - case 3: - case 4: - case 5: - case 6: - if (psc_present) - psc_irq_enable(irq); - else if (oss_present) - oss_irq_enable(irq); - else if (irq_src == 4) - scc_irq_enable(irq); - break; - case 8: - if (baboon_present) - baboon_irq_enable(irq); - break; + case 1: via_irq_enable(irq); + break; + case 2: + case 7: if (oss_present) { + oss_irq_enable(irq); + } else { + via_irq_enable(irq); + } + break; + case 3: + case 4: + case 5: + case 6: if (psc_present) { + psc_irq_enable(irq); + } else if (oss_present) { + oss_irq_enable(irq); + } else if (irq_src == 4) { + scc_irq_enable(irq); + } + break; + case 8: if (baboon_present) { + baboon_irq_enable(irq); + } + break; } } -static void mac_disable_irq(unsigned int irq) +void mac_disable_irq (unsigned int irq) { - int irq_src = IRQ_SRC(irq); + int irq_src = IRQ_SRC(irq); switch(irq_src) { - case 1: - via_irq_disable(irq); - break; - case 2: - case 7: - if (oss_present) - oss_irq_disable(irq); - else - via_irq_disable(irq); - break; - case 3: - case 4: - case 5: - case 6: - if (psc_present) - psc_irq_disable(irq); - else if (oss_present) - oss_irq_disable(irq); - else if (irq_src == 4) - scc_irq_disable(irq); - break; - case 8: - if (baboon_present) - baboon_irq_disable(irq); - break; + case 1: via_irq_disable(irq); + break; + case 2: + case 7: if (oss_present) { + oss_irq_disable(irq); + } else { + via_irq_disable(irq); + } + break; + case 3: + case 4: + case 5: + case 6: if (psc_present) { + psc_irq_disable(irq); + } else if (oss_present) { + oss_irq_disable(irq); + } else if (irq_src == 4) { + scc_irq_disable(irq); + } + break; + case 8: if (baboon_present) { + baboon_irq_disable(irq); + } + break; } } -void mac_clear_irq(unsigned int irq) +void mac_clear_irq( unsigned int irq ) { switch(IRQ_SRC(irq)) { - case 1: - via_irq_clear(irq); - break; - case 2: - case 7: - if (oss_present) - oss_irq_clear(irq); - else - via_irq_clear(irq); - break; - case 3: - case 4: - case 5: - case 6: - if (psc_present) - psc_irq_clear(irq); - else if (oss_present) - oss_irq_clear(irq); - break; - case 8: - if (baboon_present) - baboon_irq_clear(irq); - break; + case 1: via_irq_clear(irq); + break; + case 2: + case 7: if (oss_present) { + oss_irq_clear(irq); + } else { + via_irq_clear(irq); + } + break; + case 3: + case 4: + case 5: + case 6: if (psc_present) { + psc_irq_clear(irq); + } else if (oss_present) { + oss_irq_clear(irq); + } + break; + case 8: if (baboon_present) { + baboon_irq_clear(irq); + } + break; } } -int mac_irq_pending(unsigned int irq) +int mac_irq_pending( unsigned int irq ) { switch(IRQ_SRC(irq)) { - case 1: - return via_irq_pending(irq); - case 2: - case 7: - if (oss_present) - return oss_irq_pending(irq); - else - return via_irq_pending(irq); - case 3: - case 4: - case 5: - case 6: - if (psc_present) - return psc_irq_pending(irq); - else if (oss_present) - return oss_irq_pending(irq); + case 1: return via_irq_pending(irq); + case 2: + case 7: if (oss_present) { + return oss_irq_pending(irq); + } else { + return via_irq_pending(irq); + } + case 3: + case 4: + case 5: + case 6: if (psc_present) { + return psc_irq_pending(irq); + } else if (oss_present) { + return oss_irq_pending(irq); + } + } + return 0; +} + +/* + * Add an interrupt service routine to an interrupt source. + * Returns 0 on success. + * + * FIXME: You can register interrupts on nonexistent source (ie PSC4 on a + * non-PSC machine). We should return -EINVAL in those cases. + */ + +int mac_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + irq_node_t *node; + +#ifdef DEBUG_MACINTS + printk ("%s: irq %d requested for %s\n", __FUNCTION__, irq, devname); +#endif + + if (irq < VIA1_SOURCE_BASE) { + return cpu_request_irq(irq, handler, flags, devname, dev_id); } + + if (irq >= NUM_MAC_SOURCES) { + printk ("%s: unknown irq %d requested by %s\n", + __FUNCTION__, irq, devname); + } + + /* Get a node and stick it onto the right list */ + + if (!(node = new_irq_node())) return -ENOMEM; + + node->handler = handler; + node->flags = flags; + node->dev_id = dev_id; + node->devname = devname; + node->next = NULL; + mac_insert_irq(&mac_irq_list[irq], node); + + /* Now enable the IRQ source */ + + mac_enable_irq(irq); + return 0; } +/* + * Removes an interrupt service routine from an interrupt source. + */ + +void mac_free_irq(unsigned int irq, void *dev_id) +{ +#ifdef DEBUG_MACINTS + printk ("%s: irq %d freed by %p\n", __FUNCTION__, irq, dev_id); +#endif + + if (irq < VIA1_SOURCE_BASE) { + cpu_free_irq(irq, dev_id); + return; + } + + if (irq >= NUM_MAC_SOURCES) { + printk ("%s: unknown irq %d freed\n", + __FUNCTION__, irq); + return; + } + + mac_delete_irq(&mac_irq_list[irq], dev_id); + + /* If the list for this interrupt is */ + /* empty then disable the source. */ + + if (!mac_irq_list[irq]) { + mac_disable_irq(irq); + } +} + +/* + * Generate a pretty listing for /proc/interrupts + * + * By the time we're called the autovector interrupt list has already been + * generated, so we just need to do the machspec interrupts. + * + * 990506 (jmt) - rewritten to handle chained machspec interrupt handlers. + * Also removed display of num_spurious it is already + * displayed for us as autovector irq 0. + */ + +int show_mac_interrupts(struct seq_file *p, void *v) +{ + int i; + irq_node_t *node; + char *base; + + /* Don't do Nubus interrupts in this loop; we do them separately */ + /* below so that we can print slot numbers instead of IRQ numbers */ + + for (i = VIA1_SOURCE_BASE ; i < NUM_MAC_SOURCES ; ++i) { + + /* Nonexistant interrupt or nothing registered; skip it. */ + + if ((node = mac_irq_list[i]) == NULL) continue; + if (node->flags & IRQ_FLG_STD) continue; + + base = ""; + switch(IRQ_SRC(i)) { + case 1: base = "via1"; + break; + case 2: if (oss_present) { + base = "oss"; + } else { + base = "via2"; + } + break; + case 3: + case 4: + case 5: + case 6: if (psc_present) { + base = "psc"; + } else if (oss_present) { + base = "oss"; + } else { + if (IRQ_SRC(i) == 4) base = "scc"; + } + break; + case 7: base = "nbus"; + break; + case 8: base = "bbn"; + break; + } + seq_printf(p, "%4s %2d: %10u ", base, i, kstat_cpu(0).irqs[i]); + + do { + if (node->flags & IRQ_FLG_FAST) { + seq_puts(p, "F "); + } else if (node->flags & IRQ_FLG_SLOW) { + seq_puts(p, "S "); + } else { + seq_puts(p, " "); + } + seq_printf(p, "%s\n", node->devname); + if ((node = node->next)) { + seq_puts(p, " "); + } + } while(node); + + } + return 0; +} + +void mac_default_handler(int irq, void *dev_id, struct pt_regs *regs) +{ +#ifdef DEBUG_SPURIOUS + printk("Unexpected IRQ %d on device %p\n", irq, dev_id); +#endif +} + static int num_debug[8]; irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs) @@ -430,7 +684,7 @@ irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp) while (nmi_hold == 1) udelay(1000); - if (console_loglevel >= 8) { + if ( console_loglevel >= 8 ) { #if 0 show_state(); printk("PC: %08lx\nSR: %04x SP: %p\n", fp->pc, fp->sr, fp); @@ -459,16 +713,14 @@ irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp) * done in hardware (only the PSC can do that.) */ -static void scc_irq_enable(unsigned int irq) -{ - int irq_idx = IRQ_IDX(irq); +static void scc_irq_enable(int irq) { + int irq_idx = IRQ_IDX(irq); scc_mask |= (1 << irq_idx); } -static void scc_irq_disable(unsigned int irq) -{ - int irq_idx = IRQ_IDX(irq); +static void scc_irq_disable(int irq) { + int irq_idx = IRQ_IDX(irq); scc_mask &= ~(1 << irq_idx); } @@ -503,8 +755,6 @@ void mac_scc_dispatch(int irq, void *dev_id, struct pt_regs *regs) /* and since they're autovector interrupts they */ /* pretty much kill the system. */ - if (reg & 0x38) - m68k_handle_int(IRQ_SCCA, regs); - if (reg & 0x07) - m68k_handle_int(IRQ_SCCB, regs); + if (reg & 0x38) mac_do_irq_list(IRQ_SCCA, regs); + if (reg & 0x07) mac_do_irq_list(IRQ_SCCB, regs); } diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 56d1f5676..bbb0c3b95 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -2,6 +2,7 @@ * Miscellaneous Mac68K-specific stuff */ +#include #include #include #include diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index 63e043651..333547692 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c @@ -67,15 +67,15 @@ void __init oss_init(void) void __init oss_register_interrupts(void) { - request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, + cpu_request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, "scsi", (void *) oss); - request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK, + cpu_request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK, "scc", mac_scc_dispatch); - request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, + cpu_request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, "nubus", (void *) oss); - request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, + cpu_request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, "sound", (void *) oss); - request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, + cpu_request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, "via1", (void *) via1); } @@ -113,7 +113,7 @@ irqreturn_t oss_irq(int irq, void *dev_id, struct pt_regs *regs) oss->irq_pending &= ~OSS_IP_SOUND; } else if (events & OSS_IP_SCSI) { oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED; - m68k_handle_int(IRQ_MAC_SCSI, regs); + mac_do_irq_list(IRQ_MAC_SCSI, regs); oss->irq_pending &= ~OSS_IP_SCSI; oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI; } else { @@ -146,7 +146,7 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) { if (events & irq_bit) { oss->irq_level[i] = OSS_IRQLEV_DISABLED; - m68k_handle_int(NUBUS_SOURCE_BASE + i, regs); + mac_do_irq_list(NUBUS_SOURCE_BASE + i, regs); oss->irq_pending &= ~irq_bit; oss->irq_level[i] = OSS_IRQLEV_NUBUS; } diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index e26218091..e72384e43 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c @@ -117,10 +117,10 @@ void __init psc_init(void) void __init psc_register_interrupts(void) { - request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30); - request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40); - request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50); - request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60); + cpu_request_irq(3, psc_irq, IRQ_FLG_LOCK, "psc3", (void *) 0x30); + cpu_request_irq(4, psc_irq, IRQ_FLG_LOCK, "psc4", (void *) 0x40); + cpu_request_irq(5, psc_irq, IRQ_FLG_LOCK, "psc5", (void *) 0x50); + cpu_request_irq(6, psc_irq, IRQ_FLG_LOCK, "psc6", (void *) 0x60); } /* @@ -149,7 +149,7 @@ irqreturn_t psc_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) { if (events & irq_bit) { psc_write_byte(pIER, irq_bit); - m68k_handle_int(base_irq + i, regs); + mac_do_irq_list(base_irq + i, regs); psc_write_byte(pIFR, irq_bit); psc_write_byte(pIER, irq_bit | 0x80); } diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index c4aa345d5..cd528bf7b 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,7 @@ void via_irq_enable(int irq); void via_irq_disable(int irq); void via_irq_clear(int irq); +extern irqreturn_t mac_bang(int, void *, struct pt_regs *); extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); extern int oss_present; @@ -210,6 +212,11 @@ void __init via_init(void) break; } #else + /* The alernate IRQ mapping seems to just not work. Anyone with a */ + /* supported machine is welcome to take a stab at fixing it. It */ + /* _should_ work on the following Quadras: 610,650,700,800,900,950 */ + /* - 1999-06-12 (jmt) */ + via_alt_mapping = 0; #endif @@ -253,21 +260,27 @@ void __init via_init_clock(irqreturn_t (*func)(int, void *, struct pt_regs *)) void __init via_register_interrupts(void) { if (via_alt_mapping) { - request_irq(IRQ_AUTO_1, via1_irq, + cpu_request_irq(IRQ_AUTO_1, via1_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", (void *) via1); - request_irq(IRQ_AUTO_6, via1_irq, + cpu_request_irq(IRQ_AUTO_6, via1_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", (void *) via1); } else { - request_irq(IRQ_AUTO_1, via1_irq, + cpu_request_irq(IRQ_AUTO_1, via1_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", (void *) via1); +#if 0 /* interferes with serial on some machines */ + if (!psc_present) { + cpu_request_irq(IRQ_AUTO_6, mac_bang, IRQ_FLG_LOCK, + "Off Switch", mac_bang); + } +#endif } - request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, + cpu_request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, "via2", (void *) via2); if (!psc_present) { - request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK, + cpu_request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK, "scc", mac_scc_dispatch); } request_irq(IRQ_MAC_NUBUS, via_nubus_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, @@ -424,7 +437,7 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) if (events & irq_bit) { via1[vIER] = irq_bit; - m68k_handle_int(VIA1_SOURCE_BASE + i, regs); + mac_do_irq_list(VIA1_SOURCE_BASE + i, regs); via1[vIFR] = irq_bit; via1[vIER] = irq_bit | 0x80; } @@ -439,7 +452,7 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs) /* No, it won't be set. that's why we're doing this. */ via_irq_disable(IRQ_MAC_NUBUS); via_irq_clear(IRQ_MAC_NUBUS); - m68k_handle_int(IRQ_MAC_NUBUS, regs); + mac_do_irq_list(IRQ_MAC_NUBUS, regs); via_irq_enable(IRQ_MAC_NUBUS); } #endif @@ -458,8 +471,8 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) if (events & irq_bit) { via2[gIER] = irq_bit; + mac_do_irq_list(VIA2_SOURCE_BASE + i, regs); via2[gIFR] = irq_bit | rbv_clear; - m68k_handle_int(VIA2_SOURCE_BASE + i, regs); via2[gIER] = irq_bit | 0x80; } return IRQ_HANDLED; @@ -481,7 +494,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id, struct pt_regs *regs) for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) { if (events & irq_bit) { via_irq_disable(NUBUS_SOURCE_BASE + i); - m68k_handle_int(NUBUS_SOURCE_BASE + i, regs); + mac_do_irq_list(NUBUS_SOURCE_BASE + i, regs); via_irq_enable(NUBUS_SOURCE_BASE + i); } } @@ -516,7 +529,6 @@ void via_irq_enable(int irq) { } via2[gIER] = irq_bit | 0x80; } else if (irq_src == 7) { - nubus_active |= irq_bit; if (rbv_present) { /* enable the slot interrupt. SIER works like IER. */ via2[rSIER] = IER_SET_BIT(irq_idx); @@ -538,6 +550,7 @@ void via_irq_enable(int irq) { } } } + nubus_active |= irq_bit; } } diff --git a/arch/m68k/math-emu/fp_entry.S b/arch/m68k/math-emu/fp_entry.S index 954b4f304..5ec2d9101 100644 --- a/arch/m68k/math-emu/fp_entry.S +++ b/arch/m68k/math-emu/fp_entry.S @@ -35,6 +35,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include diff --git a/arch/m68k/math-emu/fp_util.S b/arch/m68k/math-emu/fp_util.S index b093b85fc..a9f7f0129 100644 --- a/arch/m68k/math-emu/fp_util.S +++ b/arch/m68k/math-emu/fp_util.S @@ -35,6 +35,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include "fp_emu.h" /* diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index ab90213e5..a190e39c9 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c @@ -7,6 +7,7 @@ * to motorola.c and sun3mmu.c */ +#include #include #include #include diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c index f46f049d2..85ad19a0a 100644 --- a/arch/m68k/mm/kmap.c +++ b/arch/m68k/mm/kmap.c @@ -7,6 +7,7 @@ * used by other architectures /Roman Zippel */ +#include #include #include #include @@ -258,15 +259,13 @@ void __iounmap(void *addr, unsigned long size) if (CPU_IS_020_OR_030) { int pmd_off = (virtaddr/PTRTREESIZE) & 15; - int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK; - if (pmd_type == _PAGE_PRESENT) { + if ((pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK) == _PAGE_PRESENT) { pmd_dir->pmd[pmd_off] = 0; virtaddr += PTRTREESIZE; size -= PTRTREESIZE; continue; - } else if (pmd_type == 0) - continue; + } } if (pmd_bad(*pmd_dir)) { diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index a0c095e17..d6d582a5a 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c @@ -4,6 +4,7 @@ * Copyright (C) 1995 Hamish Macdonald */ +#include #include #include #include @@ -93,7 +94,8 @@ pmd_t *get_pointer_table (void) PD_MARKBITS(dp) = mask & ~tmp; if (!PD_MARKBITS(dp)) { /* move to end of list */ - list_move_tail(dp, &ptable_list); + list_del(dp); + list_add_tail(dp, &ptable_list); } return (pmd_t *) (page_address(PD_PAGE(dp)) + off); } @@ -121,7 +123,8 @@ int free_pointer_table (pmd_t *ptable) * move this descriptor to the front of the list, since * it has one or more free tables. */ - list_move(dp, &ptable_list); + list_del(dp); + list_add(dp, &ptable_list); } return 0; } diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 49015e32d..afb57eeaf 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -8,6 +8,7 @@ * Moved 8/20/1999 Sam Creasey */ +#include #include #include #include @@ -202,7 +203,7 @@ void __init paging_init(void) { int chunk; unsigned long mem_avail = 0; - unsigned long zones_size[MAX_NR_ZONES] = { 0, }; + unsigned long zones_size[3] = { 0, }; #ifdef DEBUG { @@ -256,12 +257,12 @@ void __init paging_init(void) #ifdef DEBUG printk ("before free_area_init\n"); #endif - zones_size[ZONE_DMA] = (mach_max_dma_address < (unsigned long)high_memory ? - (mach_max_dma_address+1) : (unsigned long)high_memory); - zones_size[ZONE_NORMAL] = (unsigned long)high_memory - zones_size[0]; + zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ? + (mach_max_dma_address+1) : (unsigned long)high_memory); + zones_size[1] = (unsigned long)high_memory - zones_size[0]; - zones_size[ZONE_DMA] = (zones_size[ZONE_DMA] - PAGE_OFFSET) >> PAGE_SHIFT; - zones_size[ZONE_NORMAL] >>= PAGE_SHIFT; + zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT; + zones_size[1] >>= PAGE_SHIFT; free_area_init(zones_size); } diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c index ac6640ade..a47be196a 100644 --- a/arch/m68k/mm/sun3mmu.c +++ b/arch/m68k/mm/sun3mmu.c @@ -46,7 +46,7 @@ void __init paging_init(void) unsigned long address; unsigned long next_pgtable; unsigned long bootmem_end; - unsigned long zones_size[MAX_NR_ZONES] = { 0, }; + unsigned long zones_size[3] = {0, 0, 0}; unsigned long size; @@ -92,7 +92,8 @@ void __init paging_init(void) current->mm = NULL; /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ - zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; + zones_size[0] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; + zones_size[1] = 0; free_area_init(zones_size); diff --git a/arch/m68k/mvme147/147ints.c b/arch/m68k/mvme147/147ints.c new file mode 100644 index 000000000..69a744ee3 --- /dev/null +++ b/arch/m68k/mvme147/147ints.c @@ -0,0 +1,145 @@ +/* + * arch/m68k/mvme147/147ints.c + * + * Copyright (C) 1997 Richard Hirst [richard@sleepie.demon.co.uk] + * + * based on amiints.c -- Amiga Linux interrupt handling code + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file README.legal in the main directory of this archive + * for more details. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +static irqreturn_t mvme147_defhand (int irq, void *dev_id, struct pt_regs *fp); + +/* + * This should ideally be 4 elements only, for speed. + */ + +static struct { + irqreturn_t (*handler)(int, void *, struct pt_regs *); + unsigned long flags; + void *dev_id; + const char *devname; + unsigned count; +} irq_tab[256]; + +/* + * void mvme147_init_IRQ (void) + * + * Parameters: None + * + * Returns: Nothing + * + * This function is called during kernel startup to initialize + * the mvme147 IRQ handling routines. + */ + +void mvme147_init_IRQ (void) +{ + int i; + + for (i = 0; i < 256; i++) { + irq_tab[i].handler = mvme147_defhand; + irq_tab[i].flags = IRQ_FLG_STD; + irq_tab[i].dev_id = NULL; + irq_tab[i].devname = NULL; + irq_tab[i].count = 0; + } +} + +int mvme147_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + if (irq > 255) { + printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); + return -ENXIO; + } + if (!(irq_tab[irq].flags & IRQ_FLG_STD)) { + if (irq_tab[irq].flags & IRQ_FLG_LOCK) { + printk("%s: IRQ %d from %s is not replaceable\n", + __FUNCTION__, irq, irq_tab[irq].devname); + return -EBUSY; + } + if (flags & IRQ_FLG_REPLACE) { + printk("%s: %s can't replace IRQ %d from %s\n", + __FUNCTION__, devname, irq, irq_tab[irq].devname); + return -EBUSY; + } + } + irq_tab[irq].handler = handler; + irq_tab[irq].flags = flags; + irq_tab[irq].dev_id = dev_id; + irq_tab[irq].devname = devname; + return 0; +} + +void mvme147_free_irq(unsigned int irq, void *dev_id) +{ + if (irq > 255) { + printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); + return; + } + if (irq_tab[irq].dev_id != dev_id) + printk("%s: Removing probably wrong IRQ %d from %s\n", + __FUNCTION__, irq, irq_tab[irq].devname); + + irq_tab[irq].handler = mvme147_defhand; + irq_tab[irq].flags = IRQ_FLG_STD; + irq_tab[irq].dev_id = NULL; + irq_tab[irq].devname = NULL; +} + +irqreturn_t mvme147_process_int (unsigned long vec, struct pt_regs *fp) +{ + if (vec > 255) { + printk ("mvme147_process_int: Illegal vector %ld\n", vec); + return IRQ_NONE; + } else { + irq_tab[vec].count++; + irq_tab[vec].handler(vec, irq_tab[vec].dev_id, fp); + return IRQ_HANDLED; + } +} + +int show_mvme147_interrupts (struct seq_file *p, void *v) +{ + int i; + + for (i = 0; i < 256; i++) { + if (irq_tab[i].count) + seq_printf(p, "Vec 0x%02x: %8d %s\n", + i, irq_tab[i].count, + irq_tab[i].devname ? irq_tab[i].devname : "free"); + } + return 0; +} + + +static irqreturn_t mvme147_defhand (int irq, void *dev_id, struct pt_regs *fp) +{ + printk ("Unknown interrupt 0x%02x\n", irq); + return IRQ_NONE; +} + +void mvme147_enable_irq (unsigned int irq) +{ +} + + +void mvme147_disable_irq (unsigned int irq) +{ +} + diff --git a/arch/m68k/mvme147/Makefile b/arch/m68k/mvme147/Makefile index a36d38dbf..f0153ed3e 100644 --- a/arch/m68k/mvme147/Makefile +++ b/arch/m68k/mvme147/Makefile @@ -2,4 +2,4 @@ # Makefile for Linux arch/m68k/mvme147 source directory # -obj-y := config.o +obj-y := config.o 147ints.o diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 0cd0e5bdd..0fcf9720c 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c @@ -36,8 +36,15 @@ #include +extern irqreturn_t mvme147_process_int (int level, struct pt_regs *regs); +extern void mvme147_init_IRQ (void); +extern void mvme147_free_irq (unsigned int, void *); +extern int show_mvme147_interrupts (struct seq_file *, void *); +extern void mvme147_enable_irq (unsigned int); +extern void mvme147_disable_irq (unsigned int); static void mvme147_get_model(char *model); static int mvme147_get_hardware_list(char *buffer); +extern int mvme147_request_irq (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); extern void mvme147_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); extern unsigned long mvme147_gettimeoffset (void); extern int mvme147_hwclk (int, struct rtc_time *); @@ -84,15 +91,6 @@ static int mvme147_get_hardware_list(char *buffer) return 0; } -/* - * This function is called during kernel startup to initialize - * the mvme147 IRQ handling routines. - */ - -void mvme147_init_IRQ(void) -{ - m68k_setup_user_interrupt(VEC_USER, 192, NULL); -} void __init config_mvme147(void) { @@ -103,6 +101,12 @@ void __init config_mvme147(void) mach_hwclk = mvme147_hwclk; mach_set_clock_mmss = mvme147_set_clock_mmss; mach_reset = mvme147_reset; + mach_free_irq = mvme147_free_irq; + mach_process_int = mvme147_process_int; + mach_get_irq_list = show_mvme147_interrupts; + mach_request_irq = mvme147_request_irq; + enable_irq = mvme147_enable_irq; + disable_irq = mvme147_disable_irq; mach_get_model = mvme147_get_model; mach_get_hardware_list = mvme147_get_hardware_list; diff --git a/arch/m68k/mvme16x/16xints.c b/arch/m68k/mvme16x/16xints.c new file mode 100644 index 000000000..793ef735b --- /dev/null +++ b/arch/m68k/mvme16x/16xints.c @@ -0,0 +1,149 @@ +/* + * arch/m68k/mvme16x/16xints.c + * + * Copyright (C) 1995 Richard Hirst [richard@sleepie.demon.co.uk] + * + * based on amiints.c -- Amiga Linux interrupt handling code + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file README.legal in the main directory of this archive + * for more details. + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +static irqreturn_t mvme16x_defhand (int irq, void *dev_id, struct pt_regs *fp); + +/* + * This should ideally be 4 elements only, for speed. + */ + +static struct { + irqreturn_t (*handler)(int, void *, struct pt_regs *); + unsigned long flags; + void *dev_id; + const char *devname; + unsigned count; +} irq_tab[192]; + +/* + * void mvme16x_init_IRQ (void) + * + * Parameters: None + * + * Returns: Nothing + * + * This function is called during kernel startup to initialize + * the mvme16x IRQ handling routines. Should probably ensure + * that the base vectors for the VMEChip2 and PCCChip2 are valid. + */ + +void mvme16x_init_IRQ (void) +{ + int i; + + for (i = 0; i < 192; i++) { + irq_tab[i].handler = mvme16x_defhand; + irq_tab[i].flags = IRQ_FLG_STD; + irq_tab[i].dev_id = NULL; + irq_tab[i].devname = NULL; + irq_tab[i].count = 0; + } +} + +int mvme16x_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + if (irq < 64 || irq > 255) { + printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); + return -ENXIO; + } + + if (!(irq_tab[irq-64].flags & IRQ_FLG_STD)) { + if (irq_tab[irq-64].flags & IRQ_FLG_LOCK) { + printk("%s: IRQ %d from %s is not replaceable\n", + __FUNCTION__, irq, irq_tab[irq-64].devname); + return -EBUSY; + } + if (flags & IRQ_FLG_REPLACE) { + printk("%s: %s can't replace IRQ %d from %s\n", + __FUNCTION__, devname, irq, irq_tab[irq-64].devname); + return -EBUSY; + } + } + irq_tab[irq-64].handler = handler; + irq_tab[irq-64].flags = flags; + irq_tab[irq-64].dev_id = dev_id; + irq_tab[irq-64].devname = devname; + return 0; +} + +void mvme16x_free_irq(unsigned int irq, void *dev_id) +{ + if (irq < 64 || irq > 255) { + printk("%s: Incorrect IRQ %d\n", __FUNCTION__, irq); + return; + } + + if (irq_tab[irq-64].dev_id != dev_id) + printk("%s: Removing probably wrong IRQ %d from %s\n", + __FUNCTION__, irq, irq_tab[irq-64].devname); + + irq_tab[irq-64].handler = mvme16x_defhand; + irq_tab[irq-64].flags = IRQ_FLG_STD; + irq_tab[irq-64].dev_id = NULL; + irq_tab[irq-64].devname = NULL; +} + +irqreturn_t mvme16x_process_int (unsigned long vec, struct pt_regs *fp) +{ + if (vec < 64 || vec > 255) { + printk ("mvme16x_process_int: Illegal vector %ld", vec); + return IRQ_NONE; + } else { + irq_tab[vec-64].count++; + irq_tab[vec-64].handler(vec, irq_tab[vec-64].dev_id, fp); + return IRQ_HANDLED; + } +} + +int show_mvme16x_interrupts (struct seq_file *p, void *v) +{ + int i; + + for (i = 0; i < 192; i++) { + if (irq_tab[i].count) + seq_printf(p, "Vec 0x%02x: %8d %s\n", + i+64, irq_tab[i].count, + irq_tab[i].devname ? irq_tab[i].devname : "free"); + } + return 0; +} + + +static irqreturn_t mvme16x_defhand (int irq, void *dev_id, struct pt_regs *fp) +{ + printk ("Unknown interrupt 0x%02x\n", irq); + return IRQ_NONE; +} + + +void mvme16x_enable_irq (unsigned int irq) +{ +} + + +void mvme16x_disable_irq (unsigned int irq) +{ +} + + diff --git a/arch/m68k/mvme16x/Makefile b/arch/m68k/mvme16x/Makefile index 950e82f21..5129f56b6 100644 --- a/arch/m68k/mvme16x/Makefile +++ b/arch/m68k/mvme16x/Makefile @@ -2,4 +2,4 @@ # Makefile for Linux arch/m68k/mvme16x source directory # -obj-y := config.o rtc.o mvme16x_ksyms.o +obj-y := config.o 16xints.o rtc.o mvme16x_ksyms.o diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index ce2727ed1..26ce81c13 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c @@ -40,8 +40,15 @@ extern t_bdid mvme_bdid; static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE; +extern irqreturn_t mvme16x_process_int (int level, struct pt_regs *regs); +extern void mvme16x_init_IRQ (void); +extern void mvme16x_free_irq (unsigned int, void *); +extern int show_mvme16x_interrupts (struct seq_file *, void *); +extern void mvme16x_enable_irq (unsigned int); +extern void mvme16x_disable_irq (unsigned int); static void mvme16x_get_model(char *model); static int mvme16x_get_hardware_list(char *buffer); +extern int mvme16x_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); extern void mvme16x_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); extern unsigned long mvme16x_gettimeoffset (void); extern int mvme16x_hwclk (int, struct rtc_time *); @@ -113,16 +120,6 @@ static int mvme16x_get_hardware_list(char *buffer) return (len); } -/* - * This function is called during kernel startup to initialize - * the mvme16x IRQ handling routines. Should probably ensure - * that the base vectors for the VMEChip2 and PCCChip2 are valid. - */ - -static void mvme16x_init_IRQ (void) -{ - m68k_setup_user_interrupt(VEC_USER, 192, NULL); -} #define pcc2chip ((volatile u_char *)0xfff42000) #define PccSCCMICR 0x1d @@ -141,6 +138,12 @@ void __init config_mvme16x(void) mach_hwclk = mvme16x_hwclk; mach_set_clock_mmss = mvme16x_set_clock_mmss; mach_reset = mvme16x_reset; + mach_free_irq = mvme16x_free_irq; + mach_process_int = mvme16x_process_int; + mach_get_irq_list = show_mvme16x_interrupts; + mach_request_irq = mvme16x_request_irq; + enable_irq = mvme16x_enable_irq; + disable_irq = mvme16x_disable_irq; mach_get_model = mvme16x_get_model; mach_get_hardware_list = mvme16x_get_hardware_list; diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index 9a1827876..5e0f9b04d 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ -12,6 +12,7 @@ * for more details. */ +#include #include #include #include @@ -36,9 +37,15 @@ #include extern irqreturn_t q40_process_int (int level, struct pt_regs *regs); +extern irqreturn_t (*q40_default_handler[]) (int, void *, struct pt_regs *); /* added just for debugging */ extern void q40_init_IRQ (void); +extern void q40_free_irq (unsigned int, void *); +extern int show_q40_interrupts (struct seq_file *, void *); +extern void q40_enable_irq (unsigned int); +extern void q40_disable_irq (unsigned int); static void q40_get_model(char *model); static int q40_get_hardware_list(char *buffer); +extern int q40_request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); extern void q40_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); extern unsigned long q40_gettimeoffset (void); @@ -168,6 +175,13 @@ void __init config_q40(void) mach_set_clock_mmss = q40_set_clock_mmss; mach_reset = q40_reset; + mach_free_irq = q40_free_irq; + mach_process_int = q40_process_int; + mach_get_irq_list = show_q40_interrupts; + mach_request_irq = q40_request_irq; + enable_irq = q40_enable_irq; + disable_irq = q40_disable_irq; + mach_default_handler = &q40_default_handler; mach_get_model = q40_get_model; mach_get_hardware_list = q40_get_hardware_list; diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 472f41c41..f8ecc2664 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c @@ -14,8 +14,13 @@ #include #include #include +#include +#include +#include #include +#include +#include #include #include #include @@ -34,37 +39,29 @@ * */ -static void q40_irq_handler(unsigned int, struct pt_regs *fp); -static void q40_enable_irq(unsigned int); -static void q40_disable_irq(unsigned int); +extern int ints_inited; -unsigned short q40_ablecount[35]; -unsigned short q40_state[35]; -static int q40_irq_startup(unsigned int irq) -{ - /* test for ISA ints not implemented by HW */ - switch (irq) { - case 1: case 2: case 8: case 9: - case 11: case 12: case 13: - printk("%s: ISA IRQ %d not implemented by HW\n", __FUNCTION__, irq); - return -ENXIO; - } - return 0; -} +irqreturn_t q40_irq2_handler (int, void *, struct pt_regs *fp); -static void q40_irq_shutdown(unsigned int irq) -{ -} -static struct irq_controller q40_irq_controller = { - .name = "q40", - .lock = SPIN_LOCK_UNLOCKED, - .startup = q40_irq_startup, - .shutdown = q40_irq_shutdown, - .enable = q40_enable_irq, - .disable = q40_disable_irq, -}; +static irqreturn_t q40_defhand (int irq, void *dev_id, struct pt_regs *fp); +static irqreturn_t default_handler(int lev, void *dev_id, struct pt_regs *regs); + + +#define DEVNAME_SIZE 24 + +static struct q40_irq_node { + irqreturn_t (*handler)(int, void *, struct pt_regs *); + unsigned long flags; + void *dev_id; + /* struct q40_irq_node *next;*/ + char devname[DEVNAME_SIZE]; + unsigned count; + unsigned short state; +} irq_tab[Q40_IRQ_MAX+1]; + +short unsigned q40_ablecount[Q40_IRQ_MAX+1]; /* * void q40_init_IRQ (void) @@ -77,29 +74,139 @@ static struct irq_controller q40_irq_controller = { * the q40 IRQ handling routines. */ -static int disabled; +static int disabled=0; -void q40_init_IRQ(void) +void q40_init_IRQ (void) { - m68k_setup_irq_controller(&q40_irq_controller, 1, Q40_IRQ_MAX); + int i; - /* setup handler for ISA ints */ - m68k_setup_auto_interrupt(q40_irq_handler); + disabled=0; + for (i = 0; i <= Q40_IRQ_MAX; i++) { + irq_tab[i].handler = q40_defhand; + irq_tab[i].flags = 0; + irq_tab[i].dev_id = NULL; + /* irq_tab[i].next = NULL;*/ + irq_tab[i].devname[0] = 0; + irq_tab[i].count = 0; + irq_tab[i].state =0; + q40_ablecount[i]=0; /* all enabled */ + } - m68k_irq_startup(IRQ_AUTO_2); - m68k_irq_startup(IRQ_AUTO_4); + /* setup handler for ISA ints */ + cpu_request_irq(IRQ2, q40_irq2_handler, 0, "q40 ISA and master chip", + NULL); /* now enable some ints.. */ - master_outb(1, EXT_ENABLE_REG); /* ISA IRQ 5-15 */ + master_outb(1,EXT_ENABLE_REG); /* ISA IRQ 5-15 */ /* make sure keyboard IRQ is disabled */ - master_outb(0, KEY_IRQ_ENABLE_REG); + master_outb(0,KEY_IRQ_ENABLE_REG); } +int q40_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id) +{ + /*printk("q40_request_irq %d, %s\n",irq,devname);*/ + + if (irq > Q40_IRQ_MAX || (irq>15 && irq<32)) { + printk("%s: Incorrect IRQ %d from %s\n", __FUNCTION__, irq, devname); + return -ENXIO; + } + + /* test for ISA ints not implemented by HW */ + switch (irq) + { + case 1: case 2: case 8: case 9: + case 12: case 13: + printk("%s: ISA IRQ %d from %s not implemented by HW\n", __FUNCTION__, irq, devname); + return -ENXIO; + case 11: + printk("warning IRQ 10 and 11 not distinguishable\n"); + irq=10; + default: + ; + } + + if (irq Q40_IRQ_MAX || (irq>15 && irq<32)) { + printk("%s: Incorrect IRQ %d, dev_id %x \n", __FUNCTION__, irq, (unsigned)dev_id); + return; + } + + /* test for ISA ints not implemented by HW */ + switch (irq) + { + case 1: case 2: case 8: case 9: + case 12: case 13: + printk("%s: ISA IRQ %d from %x invalid\n", __FUNCTION__, irq, (unsigned)dev_id); + return; + case 11: irq=10; + default: + ; + } + + if (irqpc, fp->d0, fp->orig_d0, fp->d1, fp->d2); + printk("\tIIRQ_REG = %x, EIRQ_REG = %x\n",master_inb(IIRQ_REG),master_inb(EIRQ_REG)); + return IRQ_HANDLED; +} /* * this stuff doesn't really belong here.. - */ +*/ int ql_ticks; /* 200Hz ticks since last jiffie */ static int sound_ticks; @@ -108,53 +215,54 @@ static int sound_ticks; void q40_mksound(unsigned int hz, unsigned int ticks) { - /* for now ignore hz, except that hz==0 switches off sound */ - /* simply alternate the ampl (128-SVOL)-(128+SVOL)-..-.. at 200Hz */ - if (hz == 0) { - if (sound_ticks) - sound_ticks = 1; - - *DAC_LEFT = 128; - *DAC_RIGHT = 128; - - return; - } - /* sound itself is done in q40_timer_int */ - if (sound_ticks == 0) - sound_ticks = 1000; /* pretty long beep */ - sound_ticks = ticks << 1; + /* for now ignore hz, except that hz==0 switches off sound */ + /* simply alternate the ampl (128-SVOL)-(128+SVOL)-..-.. at 200Hz */ + if (hz==0) + { + if (sound_ticks) + sound_ticks=1; + + *DAC_LEFT=128; + *DAC_RIGHT=128; + + return; + } + /* sound itself is done in q40_timer_int */ + if (sound_ticks == 0) sound_ticks=1000; /* pretty long beep */ + sound_ticks=ticks<<1; } static irqreturn_t (*q40_timer_routine)(int, void *, struct pt_regs *); static irqreturn_t q40_timer_int (int irq, void * dev, struct pt_regs * regs) { - ql_ticks = ql_ticks ? 0 : 1; - if (sound_ticks) { - unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL; - sound_ticks--; - *DAC_LEFT=sval; - *DAC_RIGHT=sval; - } - - if (!ql_ticks) - q40_timer_routine(irq, dev, regs); - return IRQ_HANDLED; + ql_ticks = ql_ticks ? 0 : 1; + if (sound_ticks) + { + unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL; + sound_ticks--; + *DAC_LEFT=sval; + *DAC_RIGHT=sval; + } + + if (!ql_ticks) + q40_timer_routine(irq, dev, regs); + return IRQ_HANDLED; } void q40_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) { - int timer_irq; + int timer_irq; - q40_timer_routine = timer_routine; - timer_irq = Q40_IRQ_FRAME; + q40_timer_routine = timer_routine; + timer_irq=Q40_IRQ_FRAME; - if (request_irq(timer_irq, q40_timer_int, 0, + if (request_irq(timer_irq, q40_timer_int, 0, "timer", q40_timer_int)) - panic("Couldn't register timer int"); + panic ("Couldn't register timer int"); - master_outb(-1, FRAME_CLEAR_REG); - master_outb( 1, FRAME_RATE_REG); + master_outb(-1,FRAME_CLEAR_REG); + master_outb( 1,FRAME_RATE_REG); } @@ -200,132 +308,169 @@ static int mext_disabled=0; /* ext irq disabled by master chip? */ static int aliased_irq=0; /* how many times inside handler ?*/ -/* got interrupt, dispatch to ISA or keyboard/timer IRQs */ -static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) +/* got level 2 interrupt, dispatch to ISA or keyboard/timer IRQs */ +irqreturn_t q40_irq2_handler (int vec, void *devname, struct pt_regs *fp) { - unsigned mir, mer; - int i; + unsigned mir, mer; + int irq,i; //repeat: - mir = master_inb(IIRQ_REG); -#ifdef CONFIG_BLK_DEV_FD - if ((mir & Q40_IRQ_EXT_MASK) && - (master_inb(EIRQ_REG) & Q40_IRQ6_MASK)) { - floppy_hardint(); - return; - } -#endif - switch (irq) { - case 4: - case 6: - m68k_handle_int(Q40_IRQ_SAMPLE, fp); - return; - } - if (mir & Q40_IRQ_FRAME_MASK) { - m68k_handle_int(Q40_IRQ_FRAME, fp); - master_outb(-1, FRAME_CLEAR_REG); - } - if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) { - mer = master_inb(EIRQ_REG); - for (i = 0; eirqs[i].mask; i++) { - if (mer & eirqs[i].mask) { - irq = eirqs[i].irq; + mir=master_inb(IIRQ_REG); + if (mir&Q40_IRQ_FRAME_MASK) { + irq_tab[Q40_IRQ_FRAME].count++; + irq_tab[Q40_IRQ_FRAME].handler(Q40_IRQ_FRAME,irq_tab[Q40_IRQ_FRAME].dev_id,fp); + master_outb(-1,FRAME_CLEAR_REG); + } + if ((mir&Q40_IRQ_SER_MASK) || (mir&Q40_IRQ_EXT_MASK)) { + mer=master_inb(EIRQ_REG); + for (i=0; eirqs[i].mask; i++) { + if (mer&(eirqs[i].mask)) { + irq=eirqs[i].irq; /* * There is a little mess wrt which IRQ really caused this irq request. The * main problem is that IIRQ_REG and EIRQ_REG reflect the state when they * are read - which is long after the request came in. In theory IRQs should * not just go away but they occassionally do */ - if (irq > 4 && irq <= 15 && mext_disabled) { - /*aliased_irq++;*/ - goto iirq; - } - if (q40_state[irq] & IRQ_INPROGRESS) { - /* some handlers do local_irq_enable() for irq latency reasons, */ - /* however reentering an active irq handler is not permitted */ + if (irq>4 && irq<=15 && mext_disabled) { + /*aliased_irq++;*/ + goto iirq; + } + if (irq_tab[irq].handler == q40_defhand ) { + printk("handler for IRQ %d not defined\n",irq); + continue; /* ignore uninited INTs :-( */ + } + if ( irq_tab[irq].state & IRQ_INPROGRESS ) { + /* some handlers do local_irq_enable() for irq latency reasons, */ + /* however reentering an active irq handler is not permitted */ #ifdef IP_USE_DISABLE - /* in theory this is the better way to do it because it still */ - /* lets through eg the serial irqs, unfortunately it crashes */ - disable_irq(irq); - disabled = 1; + /* in theory this is the better way to do it because it still */ + /* lets through eg the serial irqs, unfortunately it crashes */ + disable_irq(irq); + disabled=1; #else - /*printk("IRQ_INPROGRESS detected for irq %d, disabling - %s disabled\n", - irq, disabled ? "already" : "not yet"); */ - fp->sr = (((fp->sr) & (~0x700))+0x200); - disabled = 1; + /*printk("IRQ_INPROGRESS detected for irq %d, disabling - %s disabled\n",irq,disabled ? "already" : "not yet"); */ + fp->sr = (((fp->sr) & (~0x700))+0x200); + disabled=1; #endif - goto iirq; - } - q40_state[irq] |= IRQ_INPROGRESS; - m68k_handle_int(irq, fp); - q40_state[irq] &= ~IRQ_INPROGRESS; - - /* naively enable everything, if that fails than */ - /* this function will be reentered immediately thus */ - /* getting another chance to disable the IRQ */ - - if (disabled) { + goto iirq; + } + irq_tab[irq].count++; + irq_tab[irq].state |= IRQ_INPROGRESS; + irq_tab[irq].handler(irq,irq_tab[irq].dev_id,fp); + irq_tab[irq].state &= ~IRQ_INPROGRESS; + + /* naively enable everything, if that fails than */ + /* this function will be reentered immediately thus */ + /* getting another chance to disable the IRQ */ + + if ( disabled ) { #ifdef IP_USE_DISABLE - if (irq > 4) { - disabled = 0; - enable_irq(irq); - } + if (irq>4){ + disabled=0; + enable_irq(irq);} #else - disabled = 0; - /*printk("reenabling irq %d\n", irq); */ + disabled=0; + /*printk("reenabling irq %d\n",irq); */ #endif - } + } // used to do 'goto repeat;' here, this delayed bh processing too long - return; - } - } - if (mer && ccleirq > 0 && !aliased_irq) { - printk("ISA interrupt from unknown source? EIRQ_REG = %x\n",mer); - ccleirq--; - } - } + return IRQ_HANDLED; + } + } + if (mer && ccleirq>0 && !aliased_irq) + printk("ISA interrupt from unknown source? EIRQ_REG = %x\n",mer),ccleirq--; + } iirq: - mir = master_inb(IIRQ_REG); - /* should test whether keyboard irq is really enabled, doing it in defhand */ - if (mir & Q40_IRQ_KEYB_MASK) - m68k_handle_int(Q40_IRQ_KEYBOARD, fp); - - return; + mir=master_inb(IIRQ_REG); + /* should test whether keyboard irq is really enabled, doing it in defhand */ + if (mir&Q40_IRQ_KEYB_MASK) { + irq_tab[Q40_IRQ_KEYBOARD].count++; + irq_tab[Q40_IRQ_KEYBOARD].handler(Q40_IRQ_KEYBOARD,irq_tab[Q40_IRQ_KEYBOARD].dev_id,fp); + } + return IRQ_HANDLED; } -void q40_enable_irq(unsigned int irq) +int show_q40_interrupts (struct seq_file *p, void *v) { - if (irq >= 5 && irq <= 15) { - mext_disabled--; - if (mext_disabled > 0) - printk("q40_enable_irq : nested disable/enable\n"); - if (mext_disabled == 0) - master_outb(1, EXT_ENABLE_REG); + int i; + + for (i = 0; i <= Q40_IRQ_MAX; i++) { + if (irq_tab[i].count) + seq_printf(p, "%sIRQ %02d: %8d %s%s\n", + (i<=15) ? "ISA-" : " " , + i, irq_tab[i].count, + irq_tab[i].devname[0] ? irq_tab[i].devname : "?", + irq_tab[i].handler == q40_defhand ? + " (now unassigned)" : ""); } + return 0; } -void q40_disable_irq(unsigned int irq) +static irqreturn_t q40_defhand (int irq, void *dev_id, struct pt_regs *fp) { - /* disable ISA iqs : only do something if the driver has been - * verified to be Q40 "compatible" - right now IDE, NE2K - * Any driver should not attempt to sleep across disable_irq !! - */ - - if (irq >= 5 && irq <= 15) { - master_outb(0, EXT_ENABLE_REG); - mext_disabled++; - if (mext_disabled > 1) - printk("disable_irq nesting count %d\n",mext_disabled); - } + if (irq!=Q40_IRQ_KEYBOARD) + printk ("Unknown q40 interrupt %d\n", irq); + else master_outb(-1,KEYBOARD_UNLOCK_REG); + return IRQ_NONE; +} +static irqreturn_t default_handler(int lev, void *dev_id, struct pt_regs *regs) +{ + printk ("Uninitialised interrupt level %d\n", lev); + return IRQ_NONE; +} + +irqreturn_t (*q40_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = { + [0] = default_handler, + [1] = default_handler, + [2] = default_handler, + [3] = default_handler, + [4] = default_handler, + [5] = default_handler, + [6] = default_handler, + [7] = default_handler +}; + + +void q40_enable_irq (unsigned int irq) +{ + if ( irq>=5 && irq<=15 ) + { + mext_disabled--; + if (mext_disabled>0) + printk("q40_enable_irq : nested disable/enable\n"); + if (mext_disabled==0) + master_outb(1,EXT_ENABLE_REG); + } } -unsigned long q40_probe_irq_on(void) + +void q40_disable_irq (unsigned int irq) { - printk("irq probing not working - reconfigure the driver to avoid this\n"); - return -1; + /* disable ISA iqs : only do something if the driver has been + * verified to be Q40 "compatible" - right now IDE, NE2K + * Any driver should not attempt to sleep across disable_irq !! + */ + + if ( irq>=5 && irq<=15 ) { + master_outb(0,EXT_ENABLE_REG); + mext_disabled++; + if (mext_disabled>1) printk("disable_irq nesting count %d\n",mext_disabled); + } } -int q40_probe_irq_off(unsigned long irqs) + +unsigned long q40_probe_irq_on (void) { - return -1; + printk("irq probing not working - reconfigure the driver to avoid this\n"); + return -1; } +int q40_probe_irq_off (unsigned long irqs) +{ + return -1; +} +/* + * Local variables: + * compile-command: "m68k-linux-gcc -D__KERNEL__ -I/home/rz/lx/linux-2.2.6/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -ffixed-a2 -m68040 -c -o q40ints.o q40ints.c" + * End: + */ diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c index d09d03b3d..f1ca0dfba 100644 --- a/arch/m68k/sun3/config.c +++ b/arch/m68k/sun3/config.c @@ -8,6 +8,7 @@ * for more details. */ +#include #include #include #include @@ -35,6 +36,7 @@ extern char _text, _end; char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; extern unsigned long sun3_gettimeoffset(void); +extern int show_sun3_interrupts (struct seq_file *, void *); extern void sun3_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); extern void sun3_get_model (char* model); extern void idprom_init (void); @@ -145,6 +147,13 @@ void __init config_sun3(void) mach_sched_init = sun3_sched_init; mach_init_IRQ = sun3_init_IRQ; + mach_default_handler = &sun3_default_handler; + mach_request_irq = sun3_request_irq; + mach_free_irq = sun3_free_irq; + enable_irq = sun3_enable_irq; + disable_irq = sun3_disable_irq; + mach_process_int = sun3_process_int; + mach_get_irq_list = show_sun3_interrupts; mach_reset = sun3_reboot; mach_gettimeoffset = sun3_gettimeoffset; mach_get_model = sun3_get_model; diff --git a/arch/m68k/sun3/prom/init.c b/arch/m68k/sun3/prom/init.c index 202adfcc3..2e6ae56ae 100644 --- a/arch/m68k/sun3/prom/init.c +++ b/arch/m68k/sun3/prom/init.c @@ -5,6 +5,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include diff --git a/arch/m68k/sun3/prom/printf.c b/arch/m68k/sun3/prom/printf.c index e7bfde377..e6ee10063 100644 --- a/arch/m68k/sun3/prom/printf.c +++ b/arch/m68k/sun3/prom/printf.c @@ -8,6 +8,7 @@ * about or use it! It's simple and smelly anyway.... */ +#include #include #include diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index 6c265222c..f04a1d25f 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c @@ -6,6 +6,7 @@ * Contains common routines for sun3/sun3x DVMA management. */ +#include #include #include #include @@ -118,7 +119,8 @@ static inline int refill(void) if(hole->end == prev->start) { hole->size += prev->size; hole->end = prev->end; - list_move(&(prev->list), &hole_cache); + list_del(&(prev->list)); + list_add(&(prev->list), &hole_cache); ret++; } @@ -180,7 +182,8 @@ static inline unsigned long get_baddr(int len, unsigned long align) #endif return hole->end; } else if(hole->size == newlen) { - list_move(&(hole->list), &hole_cache); + list_del(&(hole->list)); + list_add(&(hole->list), &hole_cache); dvma_entry_use(hole->start) = newlen; #ifdef DVMA_DEBUG dvma_allocs++; diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index f18b9d3ef..e62a033cd 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c @@ -6,6 +6,7 @@ * for more details. */ +#include #include #include #include @@ -18,6 +19,7 @@ #include extern void sun3_leds (unsigned char); +static irqreturn_t sun3_inthandle(int irq, void *dev_id, struct pt_regs *fp); void sun3_disable_interrupts(void) { @@ -38,30 +40,48 @@ int led_pattern[8] = { volatile unsigned char* sun3_intreg; +void sun3_insert_irq(irq_node_t **list, irq_node_t *node) +{ +} + +void sun3_delete_irq(irq_node_t **list, void *dev_id) +{ +} + void sun3_enable_irq(unsigned int irq) { - *sun3_intreg |= (1 << irq); + *sun3_intreg |= (1<= 64) && (irq <= 255)) { + int vec; + + vec = irq - 64; + if(sun3_vechandler[vec] != NULL) { + printk("sun3_request_irq: request for vec %d -- already taken!\n", irq); + return 1; + } + + sun3_vechandler[vec] = handler; + vec_ids[vec] = dev_id; + vec_names[vec] = devname; + vec_ints[vec] = 0; + + return 0; + } + } + + printk("sun3_request_irq: invalid irq %d\n", irq); + return 1; + +} + +void sun3_free_irq(unsigned int irq, void *dev_id) { - *sun3_intreg = 1; - m68k_setup_auto_interrupt(sun3_inthandle); - m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7); - m68k_setup_user_interrupt(VEC_USER, 192, NULL); + if(irq < SYS_IRQS) { + if(sun3_inthandler[irq] == NULL) + panic("sun3_free_int: attempt to free unused irq %d\n", irq); + if(dev_ids[irq] != dev_id) + panic("sun3_free_int: incorrect dev_id for irq %d\n", irq); + + sun3_inthandler[irq] = NULL; + return; + } else if((irq >= 64) && (irq <= 255)) { + int vec; + + vec = irq - 64; + if(sun3_vechandler[vec] == NULL) + panic("sun3_free_int: attempt to free unused vector %d\n", irq); + if(vec_ids[irq] != dev_id) + panic("sun3_free_int: incorrect dev_id for vec %d\n", irq); + + sun3_vechandler[vec] = NULL; + return; + } else { + panic("sun3_free_irq: invalid irq %d\n", irq); + } +} + +irqreturn_t sun3_process_int(int irq, struct pt_regs *regs) +{ + + if((irq >= 64) && (irq <= 255)) { + int vec; + + vec = irq - 64; + if(sun3_vechandler[vec] == NULL) + panic ("bad interrupt vector %d received\n",irq); - request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL); - request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL); - request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL); + vec_ints[vec]++; + return sun3_vechandler[vec](irq, vec_ids[vec], regs); + } else { + panic("sun3_process_int: unable to handle interrupt vector %d\n", + irq); + } } diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c index 987891783..0920f5d33 100644 --- a/arch/m68k/sun3x/config.c +++ b/arch/m68k/sun3x/config.c @@ -6,6 +6,7 @@ * based on code from Oliver Jowett */ +#include #include #include #include @@ -51,10 +52,17 @@ void __init config_sun3x(void) sun3x_prom_init(); + mach_get_irq_list = show_sun3_interrupts; mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */ + mach_default_handler = &sun3_default_handler; mach_sched_init = sun3x_sched_init; mach_init_IRQ = sun3_init_IRQ; + enable_irq = sun3_enable_irq; + disable_irq = sun3_disable_irq; + mach_request_irq = sun3_request_irq; + mach_free_irq = sun3_free_irq; + mach_process_int = sun3_process_int; mach_gettimeoffset = sun3x_gettimeoffset; mach_reset = sun3x_reboot; diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 1f9aeee84..b08c82877 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig @@ -5,7 +5,7 @@ mainmenu "uClinux/68k (w/o MMU) Kernel Configuration" -config M68K +config M68KNOMMU bool default y @@ -119,11 +119,6 @@ config M5307 help Motorola ColdFire 5307 processor support. -config M532x - bool "MCF532x" - help - Freescale (Motorola) ColdFire 532x processor support. - config M5407 bool "MCF5407" help @@ -138,43 +133,125 @@ config M527x config COLDFIRE bool - depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407) + depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M5407) default y -config CLOCK_SET - bool "Enable setting the CPU clock frequency" - default n +choice + prompt "CPU CLOCK Frequency" + default AUTO + +config CLOCK_AUTO + bool "AUTO" + ---help--- + Define the CPU clock frequency in use. On many boards you don't + really need to know, so you can select the AUTO option. On some + boards you need to know the real clock frequency to determine other + system timing (for example baud rate dividors, etc). Some processors + have an internal PLL and you can select a frequency to run at. + You need to know a little about the internals of your processor to + set this. If in doubt choose the AUTO option. + +config CLOCK_11MHz + bool "11MHz" + help + Select a 11MHz CPU clock frequency. + +config CLOCK_16MHz + bool "16MHz" + help + Select a 16MHz CPU clock frequency. + +config CLOCK_20MHz + bool "20MHz" + help + Select a 20MHz CPU clock frequency. + +config CLOCK_24MHz + bool "24MHz" + help + Select a 24MHz CPU clock frequency. + +config CLOCK_25MHz + bool "25MHz" + help + Select a 25MHz CPU clock frequency. + +config CLOCK_33MHz + bool "33MHz" + help + Select a 33MHz CPU clock frequency. + +config CLOCK_40MHz + bool "40MHz" + help + Select a 40MHz CPU clock frequency. + +config CLOCK_45MHz + bool "45MHz" + help + Select a 45MHz CPU clock frequency. + +config CLOCK_48MHz + bool "48MHz" + help + Select a 48MHz CPU clock frequency. + +config CLOCK_50MHz + bool "50MHz" + help + Select a 50MHz CPU clock frequency. + +config CLOCK_54MHz + bool "54MHz" + help + Select a 54MHz CPU clock frequency. + +config CLOCK_60MHz + bool "60MHz" + help + Select a 60MHz CPU clock frequency. + +config CLOCK_62_5MHz + bool "62.5MHz" + help + Select a 62.5MHz CPU clock frequency. + +config CLOCK_64MHz + bool "64MHz" + help + Select a 64MHz CPU clock frequency. + +config CLOCK_66MHz + bool "66MHz" + help + Select a 66MHz CPU clock frequency. + +config CLOCK_70MHz + bool "70MHz" + help + Select a 70MHz CPU clock frequency. + +config CLOCK_100MHz + bool "100MHz" help - On some CPU's you do not need to know what the core CPU clock - frequency is. On these you can disable clock setting. On some - traditional 68K parts, and on all ColdFire parts you need to set - the appropriate CPU clock frequency. On these devices many of the - onboard peripherals derive their timing from the master CPU clock - frequency. - -config CLOCK_FREQ - int "Set the core clock frequency" - default "66666666" - depends on CLOCK_SET - help - Define the CPU clock frequency in use. This is the core clock - frequency, it may or may not be the same as the external clock - crystal fitted to your board. Some processors have an internal - PLL and can have their frequency programmed at run time, others - use internal dividers. In gernal the kernel won't setup a PLL - if it is fitted (there are some expections). This value will be - specific to the exact CPU that you are using. - -config CLOCK_DIV - int "Set the core/bus clock divide ratio" - default "1" - depends on CLOCK_SET - help - On many SoC style CPUs the master CPU clock is also used to drive - on-chip peripherals. The clock that is distributed to these - peripherals is sometimes a fixed ratio of the master clock - frequency. If so then set this to the divider ration of the - master clock to the peripheral clock. If not sure then select 1. + Select a 100MHz CPU clock frequency. + +config CLOCK_140MHz + bool "140MHz" + help + Select a 140MHz CPU clock frequency. + +config CLOCK_150MHz + bool "150MHz" + help + Select a 150MHz CPU clock frequency. + +config CLOCK_166MHz + bool "166MHz" + help + Select a 166MHz CPU clock frequency. + +endchoice config OLDMASK bool "Old mask 5307 (1H55J) silicon" @@ -300,12 +377,6 @@ config COBRA5272 help Support for the senTec COBRA5272 board. -config AVNET5282 - bool "Avnet 5282 board support" - depends on M528x - help - Support for the Avnet 5282 board. - config M5282EVB bool "Motorola M5282EVB board support" depends on M528x @@ -348,18 +419,6 @@ config SECUREEDGEMP3 help Support for the SnapGear SecureEdge/MP3 platform. -config M5329EVB - bool "Freescale (Motorola) M5329EVB board support" - depends on M532x - help - Support for the Freescale (Motorola) M5329EVB board. - -config COBRA5329 - bool "senTec COBRA5329 board support" - depends on M532x - help - Support for the senTec COBRA5329 board. - config M5407C3 bool "Motorola M5407C3 board support" depends on M5407 @@ -428,7 +487,7 @@ config ARNEWSH config FREESCALE bool default y - depends on (M5206eC3 || M5208EVB || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5329EVB || M5407C3) + depends on (M5206eC3 || M5208EVB || M5235EVB || M5249C3 || M5271EVB || M5272C3 || M5275EVB || M5282EVB || M5307C3 || M5407C3) config HW_FEITH bool @@ -449,11 +508,6 @@ config SNEHA bool default y depends on CPU16B - -config AVNET - bool - default y - depends on (AVNET5282) config LARGE_ALLOCS bool "Allow allocating large blocks (> 1MB) of memory" @@ -472,46 +526,38 @@ config 4KSTACKS running more threads on a system and also reduces the pressure on the VM subsystem for higher order allocations. -comment "RAM configuration" +choice + prompt "RAM size" + default AUTO + +config RAMAUTO + bool "AUTO" + ---help--- + Configure the RAM size on your platform. Many platforms can auto + detect this, on those choose the AUTO option. Otherwise set the + RAM size you intend using. -config RAMBASE - hex "Address of the base of RAM" - default "0" +config RAM4MB + bool "4MiB" help - Define the address that RAM starts at. On many platforms this is - 0, the base of the address space. And this is the default. Some - platforms choose to setup their RAM at other addresses within the - processor address space. + Set RAM size to be 4MiB. -config RAMSIZE - hex "Size of RAM (in bytes)" - default "0x400000" +config RAM8MB + bool "8MiB" help - Define the size of the system RAM. If you select 0 then the - kernel will try to probe the RAM size at runtime. This is not - supported on all CPU types. + Set RAM size to be 8MiB. -config VECTORBASE - hex "Address of the base of system vectors" - default "0" +config RAM16MB + bool "16MiB" help - Define the address of the the system vectors. Commonly this is - put at the start of RAM, but it doesn't have to be. On ColdFire - platforms this address is programmed into the VBR register, thus - actually setting the address to use. + Set RAM size to be 16MiB. -config KERNELBASE - hex "Address of the base of kernel code" - default "0x400" +config RAM32MB + bool "32MiB" help - Typically on m68k systems the kernel will not start at the base - of RAM, but usually some small offset from it. Define the start - address of the kernel here. The most common setup will have the - processor vectors at the base of RAM and then the start of the - kernel. On some platforms some RAM is reserved for boot loaders - and the kernel starts after that. The 0x400 default was based on - a system with the RAM based at address 0, and leaving enough room - for the theoretical maximum number of 256 vectors. + Set RAM size to be 32MiB. + +endchoice choice prompt "RAM bus width" @@ -519,7 +565,7 @@ choice config RAMAUTOBIT bool "AUTO" - help + ---help--- Select the physical RAM data bus size. Not needed on most platforms, so you can generally choose AUTO. @@ -540,59 +586,6 @@ config RAM32BIT endchoice -comment "ROM configuration" - -config ROM - bool "Specify ROM linker regions" - default n - help - Define a ROM region for the linker script. This creates a kernel - that can be stored in flash, with possibly the text, and data - regions being copied out to RAM at startup. - -config ROMBASE - hex "Address of the base of ROM device" - default "0" - depends on ROM - help - Define the address that the ROM region starts at. Some platforms - use this to set their chip select region accordingly for the boot - device. - -config ROMVEC - hex "Address of the base of the ROM vectors" - default "0" - depends on ROM - help - This is almost always the same as the base of the ROM. Since on all - 68000 type varients the vectors are at the base of the boot device - on system startup. - -config ROMVECSIZE - hex "Size of ROM vector region (in bytes)" - default "0x400" - depends on ROM - help - Define the size of the vector region in ROM. For most 68000 - varients this would be 0x400 bytes in size. Set to 0 if you do - not want a vector region at the start of the ROM. - -config ROMSTART - hex "Address of the base of system image in ROM" - default "0x400" - depends on ROM - help - Define the start address of the system image in ROM. Commonly this - is strait after the ROM vectors. - -config ROMSIZE - hex "Size of the ROM device" - default "0x100000" - depends on ROM - help - Size of the ROM device. On some platforms this is used to setup - the chip select that controls the boot ROM device. - choice prompt "Kernel executes from" ---help--- @@ -606,9 +599,7 @@ config RAMKERNEL config ROMKERNEL bool "ROM" help - The kernel will be resident in FLASH/ROM when running. This is - often referred to as Execute-in-Place (XIP), since the kernel - code executes from the position it is stored in the FLASH/ROM. + The kernel will be resident in FLASH/ROM when running. endchoice diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 8951793fd..6f880cbff 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile @@ -21,7 +21,6 @@ platform-$(CONFIG_M527x) := 527x platform-$(CONFIG_M5272) := 5272 platform-$(CONFIG_M528x) := 528x platform-$(CONFIG_M5307) := 5307 -platform-$(CONFIG_M532x) := 532x platform-$(CONFIG_M5407) := 5407 PLATFORM := $(platform-y) @@ -45,7 +44,6 @@ board-$(CONFIG_senTec) := senTec board-$(CONFIG_SNEHA) := SNEHA board-$(CONFIG_M5208EVB) := M5208EVB board-$(CONFIG_MOD5272) := MOD5272 -board-$(CONFIG_AVNET) := AVNET BOARD := $(board-y) model-$(CONFIG_RAMKERNEL) := ram @@ -67,7 +65,6 @@ cpuclass-$(CONFIG_M527x) := 5307 cpuclass-$(CONFIG_M5272) := 5307 cpuclass-$(CONFIG_M528x) := 5307 cpuclass-$(CONFIG_M5307) := 5307 -cpuclass-$(CONFIG_M532x) := 5307 cpuclass-$(CONFIG_M5407) := 5307 cpuclass-$(CONFIG_M68328) := 68328 cpuclass-$(CONFIG_M68EZ328) := 68328 @@ -84,17 +81,16 @@ export PLATFORM BOARD MODEL CPUCLASS # # Some CFLAG additions based on specific CPU type. # -cflags-$(CONFIG_M5206) := -m5200 -cflags-$(CONFIG_M5206e) := -m5200 -cflags-$(CONFIG_M520x) := -m5307 -cflags-$(CONFIG_M523x) := -m5307 -cflags-$(CONFIG_M5249) := -m5200 -cflags-$(CONFIG_M527x) := -m5307 -cflags-$(CONFIG_M5272) := -m5307 -cflags-$(CONFIG_M528x) := -m5307 -cflags-$(CONFIG_M5307) := -m5307 -cflags-$(CONFIG_M532x) := -m5307 -cflags-$(CONFIG_M5407) := -m5200 +cflags-$(CONFIG_M5206) := -m5200 -Wa,-S -Wa,-m5200 +cflags-$(CONFIG_M5206e) := -m5200 -Wa,-S -Wa,-m5200 +cflags-$(CONFIG_M520x) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M523x) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M5249) := -m5200 -Wa,-S -Wa,-m5200 +cflags-$(CONFIG_M527x) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M5272) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M528x) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M5307) := -m5307 -Wa,-S -Wa,-m5307 +cflags-$(CONFIG_M5407) := -m5200 -Wa,-S -Wa,-m5200 cflags-$(CONFIG_M68328) := -m68000 cflags-$(CONFIG_M68EZ328) := -m68000 cflags-$(CONFIG_M68VZ328) := -m68000 diff --git a/arch/m68knommu/defconfig b/arch/m68knommu/defconfig index 3891de09a..2d59ba1a7 100644 --- a/arch/m68knommu/defconfig +++ b/arch/m68knommu/defconfig @@ -1,22 +1,21 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Tue Jun 27 12:57:06 2006 +# Linux kernel version: 2.6.13-uc0 +# Wed Aug 31 15:03:26 2005 # -CONFIG_M68K=y +CONFIG_M68KNOMMU=y # CONFIG_MMU is not set # CONFIG_FPU is not set +CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_LOW_RES=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 @@ -24,54 +23,32 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # General setup # CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SYSVIPC is not set # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set # CONFIG_AUDIT is not set +# CONFIG_HOTPLUG is not set +# CONFIG_KOBJECT_UEVENT is not set # CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EMBEDDED=y # CONFIG_KALLSYMS is not set -# CONFIG_HOTPLUG is not set CONFIG_PRINTK=y CONFIG_BUG=y -CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -CONFIG_SLAB=y -CONFIG_TINY_SHMEM=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set # # Loadable module support # # CONFIG_MODULES is not set -# -# Block layer -# -# CONFIG_BLK_DEV_IO_TRACE is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" - # # Processor type and features # @@ -81,7 +58,6 @@ CONFIG_DEFAULT_IOSCHED="noop" # CONFIG_M68360 is not set # CONFIG_M5206 is not set # CONFIG_M5206e is not set -# CONFIG_M520x is not set # CONFIG_M523x is not set # CONFIG_M5249 is not set # CONFIG_M5271 is not set @@ -89,12 +65,29 @@ CONFIG_M5272=y # CONFIG_M5275 is not set # CONFIG_M528x is not set # CONFIG_M5307 is not set -# CONFIG_M532x is not set # CONFIG_M5407 is not set CONFIG_COLDFIRE=y -CONFIG_CLOCK_SET=y -CONFIG_CLOCK_FREQ=66666666 -CONFIG_CLOCK_DIV=1 +# CONFIG_CLOCK_AUTO is not set +# CONFIG_CLOCK_11MHz is not set +# CONFIG_CLOCK_16MHz is not set +# CONFIG_CLOCK_20MHz is not set +# CONFIG_CLOCK_24MHz is not set +# CONFIG_CLOCK_25MHz is not set +# CONFIG_CLOCK_33MHz is not set +# CONFIG_CLOCK_40MHz is not set +# CONFIG_CLOCK_45MHz is not set +# CONFIG_CLOCK_48MHz is not set +# CONFIG_CLOCK_50MHz is not set +# CONFIG_CLOCK_54MHz is not set +# CONFIG_CLOCK_60MHz is not set +# CONFIG_CLOCK_62_5MHz is not set +# CONFIG_CLOCK_64MHz is not set +CONFIG_CLOCK_66MHz=y +# CONFIG_CLOCK_70MHz is not set +# CONFIG_CLOCK_100MHz is not set +# CONFIG_CLOCK_140MHz is not set +# CONFIG_CLOCK_150MHz is not set +# CONFIG_CLOCK_166MHz is not set # # Platform @@ -109,14 +102,11 @@ CONFIG_M5272C3=y CONFIG_FREESCALE=y # CONFIG_LARGE_ALLOCS is not set CONFIG_4KSTACKS=y - -# -# RAM configuration -# -CONFIG_RAMBASE=0x0 -CONFIG_RAMSIZE=0x800000 -CONFIG_VECTORBASE=0x0 -CONFIG_KERNELBASE=0x20000 +CONFIG_RAMAUTO=y +# CONFIG_RAM4MB is not set +# CONFIG_RAM8MB is not set +# CONFIG_RAM16MB is not set +# CONFIG_RAM32MB is not set CONFIG_RAMAUTOBIT=y # CONFIG_RAM8BIT is not set # CONFIG_RAM16BIT is not set @@ -129,8 +119,6 @@ CONFIG_FLATMEM_MANUAL=y # CONFIG_SPARSEMEM_MANUAL is not set CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) @@ -152,7 +140,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_BINFMT_FLAT=y # CONFIG_BINFMT_ZFLAT is not set # CONFIG_BINFMT_SHARED_FLAT is not set -# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set # @@ -168,7 +155,6 @@ CONFIG_NET=y # # Networking options # -# CONFIG_NETDEBUG is not set CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y @@ -185,30 +171,18 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -# CONFIG_INET_DIAG is not set +# CONFIG_IP_TCPDIAG is not set +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set # CONFIG_NETFILTER is not set -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - # # SCTP Configuration (EXPERIMENTAL) # # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -221,11 +195,8 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -234,7 +205,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_IEEE80211 is not set # # Device Drivers @@ -247,11 +217,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - # # Memory Technology Devices (MTD) # @@ -270,7 +235,6 @@ CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set # # RAM/ROM/Flash chip drivers @@ -290,13 +254,13 @@ CONFIG_MTD_CFI_I2=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set CONFIG_MTD_UCLINUX=y +# CONFIG_MTD_SNAPGEARuC is not set # CONFIG_MTD_PLATRAM is not set # @@ -305,6 +269,7 @@ CONFIG_MTD_UCLINUX=y # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLKMTD is not set # CONFIG_MTD_BLOCK2MTD is not set # @@ -319,11 +284,6 @@ CONFIG_MTD_UCLINUX=y # # CONFIG_MTD_NAND is not set -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - # # Parallel port support # @@ -336,6 +296,7 @@ CONFIG_MTD_UCLINUX=y # # Block devices # +# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set @@ -343,7 +304,16 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" # CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set # CONFIG_ATA_OVER_ETH is not set # @@ -354,7 +324,6 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # # SCSI device support # -# CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set # @@ -384,16 +353,14 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# -# PHY device support -# -# CONFIG_PHYLIB is not set - # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NE2000 is not set +# CONFIG_NET_PCI is not set CONFIG_FEC=y # CONFIG_FEC2 is not set @@ -425,7 +392,6 @@ CONFIG_PPP=y # CONFIG_PPP_SYNC_TTY is not set # CONFIG_PPP_DEFLATE is not set # CONFIG_PPP_BSDCOMP is not set -# CONFIG_PPP_MPPE is not set # CONFIG_PPPOE is not set # CONFIG_SLIP is not set # CONFIG_SHAPER is not set @@ -459,6 +425,8 @@ CONFIG_PPP=y # # CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_LEDMAN is not set +# CONFIG_RESETSWITCH is not set # # Serial drivers @@ -482,6 +450,8 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set +# CONFIG_MCFWATCHDOG is not set +# CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -494,19 +464,14 @@ CONFIG_LEGACY_PTY_COUNT=256 # # TPM devices # -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set +# CONFIG_MCF_QSPI is not set +# CONFIG_M41T11M6 is not set # # I2C support # # CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set +# CONFIG_I2C_SENSOR is not set # # Dallas's 1-wire bus @@ -517,7 +482,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Hardware Monitoring support # # CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set # # Misc devices @@ -527,7 +491,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -539,6 +502,11 @@ CONFIG_VIDEO_V4L2=y # # CONFIG_FB is not set +# +# SPI support +# +# CONFIG_SPI is not set + # # Sound # @@ -549,11 +517,6 @@ CONFIG_VIDEO_V4L2=y # # CONFIG_USB_ARCH_HAS_HCD is not set # CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# # # USB Gadget Support @@ -565,32 +528,14 @@ CONFIG_VIDEO_V4L2=y # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # # -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# SN Devices # -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - # # File systems # @@ -598,11 +543,15 @@ CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP 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_FS_POSIX_ACL is not set + +# +# XFS support +# # CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_INOTIFY is not set @@ -610,7 +559,6 @@ CONFIG_ROMFS_FS=y # CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -633,7 +581,6 @@ CONFIG_SYSFS=y # CONFIG_TMPFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set # # Miscellaneous filesystems @@ -664,7 +611,6 @@ CONFIG_RAMFS=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set # # Partition Types @@ -681,12 +627,8 @@ CONFIG_MSDOS_PARTITION=y # Kernel hacking # # CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_UNWIND_INFO is not set # CONFIG_FULLDEBUG is not set # CONFIG_HIGHPROFILE is not set # CONFIG_BOOTPARAM is not set @@ -713,6 +655,5 @@ CONFIG_LOG_BUF_SHIFT=14 # Library routines # # CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/m68knommu/kernel/comempci.c b/arch/m68knommu/kernel/comempci.c index 6ee00effb..8670938f1 100644 --- a/arch/m68knommu/kernel/comempci.c +++ b/arch/m68knommu/kernel/comempci.c @@ -9,6 +9,7 @@ /*****************************************************************************/ +#include #include #include #include @@ -356,8 +357,7 @@ void pcibios_fixup_bus(struct pci_bus *b) /*****************************************************************************/ -void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) +void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align) { } diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S index 1e7ea6a3e..8b1f47239 100644 --- a/arch/m68knommu/kernel/entry.S +++ b/arch/m68knommu/kernel/entry.S @@ -24,6 +24,7 @@ * linux 2.4 support David McCullough */ +#include #include #include #include diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c index 1e62150f3..4320d5dcc 100644 --- a/arch/m68knommu/kernel/m68k_ksyms.c +++ b/arch/m68knommu/kernel/m68k_ksyms.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index c18a83306..f861755ec 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -13,6 +13,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 913011953..382ca5797 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/arch/m68knommu/kernel/semaphore.c b/arch/m68knommu/kernel/semaphore.c index bce2bc7d8..c083f4772 100644 --- a/arch/m68knommu/kernel/semaphore.c +++ b/arch/m68knommu/kernel/semaphore.c @@ -3,6 +3,7 @@ * specific changes in */ +#include #include #include #include diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index bde9811cf..93120b9bf 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c @@ -16,6 +16,7 @@ * This file handles the architecture-dependent parts of system setup */ +#include #include #include #include @@ -41,6 +42,7 @@ #include #endif +unsigned long rom_length; unsigned long memory_start; unsigned long memory_end; @@ -54,29 +56,29 @@ static void dummy_waitbut(void) { } -void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); -void (*mach_tick)( void ); +void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) = NULL; +void (*mach_tick)( void ) = NULL; /* machine dependent keyboard functions */ -int (*mach_keyb_init) (void); -int (*mach_kbdrate) (struct kbd_repeat *); -void (*mach_kbd_leds) (unsigned int); +int (*mach_keyb_init) (void) = NULL; +int (*mach_kbdrate) (struct kbd_repeat *) = NULL; +void (*mach_kbd_leds) (unsigned int) = NULL; /* machine dependent irq functions */ -void (*mach_init_IRQ) (void); -irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); -int (*mach_get_irq_list) (struct seq_file *, void *); -void (*mach_process_int) (int irq, struct pt_regs *fp); +void (*mach_init_IRQ) (void) = NULL; +irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL; +int (*mach_get_irq_list) (struct seq_file *, void *) = NULL; +void (*mach_process_int) (int irq, struct pt_regs *fp) = NULL; void (*mach_trap_init) (void); /* machine dependent timer functions */ -unsigned long (*mach_gettimeoffset) (void); -void (*mach_gettod) (int*, int*, int*, int*, int*, int*); -int (*mach_hwclk) (int, struct hwclk_time*); -int (*mach_set_clock_mmss) (unsigned long); -void (*mach_mksound)( unsigned int count, unsigned int ticks ); -void (*mach_reset)( void ); +unsigned long (*mach_gettimeoffset) (void) = NULL; +void (*mach_gettod) (int*, int*, int*, int*, int*, int*) = NULL; +int (*mach_hwclk) (int, struct hwclk_time*) = NULL; +int (*mach_set_clock_mmss) (unsigned long) = NULL; +void (*mach_mksound)( unsigned int count, unsigned int ticks ) = NULL; +void (*mach_reset)( void ) = NULL; void (*waitbut)(void) = dummy_waitbut; -void (*mach_debug_init)(void); -void (*mach_halt)( void ); -void (*mach_power_off)( void ); +void (*mach_debug_init)(void) = NULL; +void (*mach_halt)( void ) = NULL; +void (*mach_power_off)( void ) = NULL; #ifdef CONFIG_M68000 @@ -127,9 +129,6 @@ void (*mach_power_off)( void ); #if defined(CONFIG_M5307) #define CPU "COLDFIRE(m5307)" #endif -#if defined(CONFIG_M532x) - #define CPU "COLDFIRE(m532x)" -#endif #if defined(CONFIG_M5407) #define CPU "COLDFIRE(m5407)" #endif @@ -268,6 +267,34 @@ void setup_arch(char **cmdline_p) paging_init(); } +int get_cpuinfo(char * buffer) +{ + char *cpu, *mmu, *fpu; + u_long clockfreq; + + cpu = CPU; + mmu = "none"; + fpu = "none"; + +#ifdef CONFIG_COLDFIRE + clockfreq = (loops_per_jiffy*HZ)*3; +#else + clockfreq = (loops_per_jiffy*HZ)*16; +#endif + + return(sprintf(buffer, "CPU:\t\t%s\n" + "MMU:\t\t%s\n" + "FPU:\t\t%s\n" + "Clocking:\t%lu.%1luMHz\n" + "BogoMips:\t%lu.%02lu\n" + "Calibration:\t%lu loops\n", + cpu, mmu, fpu, + clockfreq/1000000,(clockfreq/100000)%10, + (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100, + (loops_per_jiffy*HZ))); + +} + /* * Get CPU information for use by the procfs. */ diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c index 437f8c6c1..e1b3aa39e 100644 --- a/arch/m68knommu/kernel/signal.c +++ b/arch/m68knommu/kernel/signal.c @@ -553,7 +553,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) /* This is the X/Open sanctioned signal stack switching. */ if (ka->sa.sa_flags & SA_ONSTACK) { - if (!sas_ss_flags(usp)) + if (!on_sig_stack(usp)) usp = current->sas_ss_sp + current->sas_ss_size; } return (void *)((usp - frame_size) & -8UL); @@ -608,7 +608,7 @@ adjust_stack: if (regs->stkadj) { struct pt_regs *tregs = (struct pt_regs *)((ulong)regs + regs->stkadj); -#if defined(DEBUG) +#if DEBUG printk(KERN_DEBUG "Performing stackadjust=%04x\n", regs->stkadj); #endif /* This must be copied with decreasing addresses to @@ -678,7 +678,7 @@ adjust_stack: if (regs->stkadj) { struct pt_regs *tregs = (struct pt_regs *)((ulong)regs + regs->stkadj); -#if defined(DEBUG) +#if DEBUG printk(KERN_DEBUG "Performing stackadjust=%04x\n", regs->stkadj); #endif /* This must be copied with decreasing addresses to diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S index 617e43ec9..897deaa06 100644 --- a/arch/m68knommu/kernel/syscalltable.S +++ b/arch/m68knommu/kernel/syscalltable.S @@ -11,6 +11,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include #include #include #include diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index 1db987272..b9d8abb45 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c @@ -10,6 +10,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c index 17649d254..5bc068462 100644 --- a/arch/m68knommu/kernel/traps.c +++ b/arch/m68knommu/kernel/traps.c @@ -16,6 +16,7 @@ /* * Sets up all exception vectors */ +#include #include #include #include @@ -92,12 +93,12 @@ asmlinkage void buserr_c(struct frame *fp) if (user_mode(&fp->ptregs)) current->thread.esp0 = (unsigned long) fp; -#if defined(DEBUG) +#if DEBUG printk (KERN_DEBUG "*** Bus Error *** Format is %x\n", fp->ptregs.format); #endif die_if_kernel("bad frame format",&fp->ptregs,0); -#if defined(DEBUG) +#if DEBUG printk(KERN_DEBUG "Unknown SIGSEGV - 4\n"); #endif force_sig(SIGSEGV, current); diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index ccd2ceb05..a331cc907 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S @@ -1,29 +1,205 @@ /* * vmlinux.lds.S -- master linker script for m68knommu arch * - * (C) Copyright 2002-2006, Greg Ungerer + * (C) Copyright 2002-2004, Greg Ungerer * - * This linker script is equiped to build either ROM loaded or RAM - * run kernels. + * This ends up looking compilcated, because of the number of + * address variations for ram and rom/flash layouts. The real + * work of the linker script is all at the end, and reasonably + * strait forward. */ +#include #include +/* + * Original Palm pilot (same for Xcopilot). + * There is really only a rom target for this. + */ +#ifdef CONFIG_PILOT3 +#define ROMVEC_START 0x10c00000 +#define ROMVEC_LENGTH 0x10400 +#define ROM_START 0x10c10400 +#define ROM_LENGTH 0xfec00 +#define ROM_END 0x10d00000 +#define RAMVEC_START 0x00000000 +#define RAMVEC_LENGTH 0x400 +#define RAM_START 0x10000400 +#define RAM_LENGTH 0xffc00 +#define RAM_END 0x10100000 +#define _ramend _ram_end_notused +#define DATA_ADDR RAM_START +#endif + +/* + * Same setup on both the uCsimm and uCdimm. + */ +#if defined(CONFIG_UCSIMM) || defined(CONFIG_UCDIMM) +#ifdef CONFIG_RAMKERNEL +#define ROMVEC_START 0x10c10000 +#define ROMVEC_LENGTH 0x400 +#define ROM_START 0x10c10400 +#define ROM_LENGTH 0x1efc00 +#define ROM_END 0x10e00000 +#define RAMVEC_START 0x00000000 +#define RAMVEC_LENGTH 0x400 +#define RAM_START 0x00020400 +#define RAM_LENGTH 0x7dfc00 +#define RAM_END 0x00800000 +#endif +#ifdef CONFIG_ROMKERNEL +#define ROMVEC_START 0x10c10000 +#define ROMVEC_LENGTH 0x400 +#define ROM_START 0x10c10400 +#define ROM_LENGTH 0x1efc00 +#define ROM_END 0x10e00000 +#define RAMVEC_START 0x00000000 +#define RAMVEC_LENGTH 0x400 +#define RAM_START 0x00020000 +#define RAM_LENGTH 0x600000 +#define RAM_END 0x00800000 +#endif +#ifdef CONFIG_HIMEMKERNEL +#define ROMVEC_START 0x00600000 +#define ROMVEC_LENGTH 0x400 +#define ROM_START 0x00600400 +#define ROM_LENGTH 0x1efc00 +#define ROM_END 0x007f0000 +#define RAMVEC_START 0x00000000 +#define RAMVEC_LENGTH 0x400 +#define RAM_START 0x00020000 +#define RAM_LENGTH 0x5e0000 +#define RAM_END 0x00600000 +#endif +#endif + +#ifdef CONFIG_DRAGEN2 +#define RAM_START 0x10000 +#define RAM_LENGTH 0x7f0000 +#endif + +#ifdef CONFIG_UCQUICC +#define ROMVEC_START 0x00000000 +#define ROMVEC_LENGTH 0x404 +#define ROM_START 0x00000404 +#define ROM_LENGTH 0x1ff6fc +#define ROM_END 0x00200000 +#define RAMVEC_START 0x00200000 +#define RAMVEC_LENGTH 0x404 +#define RAM_START 0x00200404 +#define RAM_LENGTH 0x1ff6fc +#define RAM_END 0x00400000 +#endif + +/* + * The standard Arnewsh 5206 board only has 1MiB of ram. Not normally + * enough to be useful. Assume the user has fitted something larger, + * at least 4MiB in size. No point in not letting the kernel completely + * link, it will be obvious if it is too big when they go to load it. + */ +#if defined(CONFIG_ARN5206) +#define RAM_START 0x10000 +#define RAM_LENGTH 0x3f0000 +#endif + +/* + * The Motorola 5206eLITE board only has 1MiB of static RAM. + */ +#if defined(CONFIG_ELITE) +#define RAM_START 0x30020000 +#define RAM_LENGTH 0xe0000 +#endif + +/* + * All the Motorola eval boards have the same basic arrangement. + * The end of RAM will vary depending on how much ram is fitted, + * but this isn't important here, we assume at least 4MiB. + */ +#if defined(CONFIG_M5206eC3) || defined(CONFIG_M5249C3) || \ + defined(CONFIG_M5272C3) || defined(CONFIG_M5307C3) || \ + defined(CONFIG_ARN5307) || defined(CONFIG_M5407C3) || \ + defined(CONFIG_M5271EVB) || defined(CONFIG_M5275EVB) || \ + defined(CONFIG_M5235EVB) +#define RAM_START 0x20000 +#define RAM_LENGTH 0x3e0000 +#endif + +/* + * The Freescale 5208EVB board has 32MB of RAM. + */ +#if defined(CONFIG_M5208EVB) +#define RAM_START 0x40020000 +#define RAM_LENGTH 0x01fe0000 +#endif + +/* + * The senTec COBRA5272 board has nearly the same memory layout as + * the M5272C3. We assume 16MiB ram. + */ +#if defined(CONFIG_COBRA5272) +#define RAM_START 0x20000 +#define RAM_LENGTH 0xfe0000 +#endif + +#if defined(CONFIG_M5282EVB) +#define RAM_START 0x10000 +#define RAM_LENGTH 0x3f0000 +#endif + +/* + * The senTec COBRA5282 board has the same memory layout as the M5282EVB. + */ +#if defined(CONFIG_COBRA5282) +#define RAM_START 0x10000 +#define RAM_LENGTH 0x3f0000 +#endif + + +/* + * The EMAC SoM-5282EM module. + */ +#if defined(CONFIG_SOM5282EM) +#define RAM_START 0x10000 +#define RAM_LENGTH 0xff0000 +#endif + + +/* + * These flash boot boards use all of ram for operation. Again the + * actual memory size is not important here, assume at least 4MiB. + * They currently have no support for running in flash. + */ +#if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \ + defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \ + defined(CONFIG_HW_FEITH) +#define RAM_START 0x400 +#define RAM_LENGTH 0x3ffc00 +#endif + +/* + * Sneha Boards mimimun memory + * The end of RAM will vary depending on how much ram is fitted, + * but this isn't important here, we assume at least 4MiB. + */ +#if defined(CONFIG_CPU16B) +#define RAM_START 0x20000 +#define RAM_LENGTH 0x3e0000 +#endif + +#if defined(CONFIG_MOD5272) +#define RAM_START 0x02000000 +#define RAM_LENGTH 0x00800000 +#define RAMVEC_START 0x20000000 +#define RAMVEC_LENGTH 0x00000400 +#endif + #if defined(CONFIG_RAMKERNEL) -#define RAM_START CONFIG_KERNELBASE -#define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) #define TEXT ram #define DATA ram #define INIT ram #define BSS ram #endif #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) -#define RAM_START CONFIG_RAMBASE -#define RAM_LENGTH CONFIG_RAMSIZE -#define ROMVEC_START CONFIG_ROMVEC -#define ROMVEC_LENGTH CONFIG_ROMVECSIZE -#define ROM_START CONFIG_ROMSTART -#define ROM_LENGTH CONFIG_ROMSIZE #define TEXT rom #define DATA ram #define INIT ram @@ -39,10 +215,17 @@ OUTPUT_ARCH(m68k) ENTRY(_start) MEMORY { +#ifdef RAMVEC_START + ramvec : ORIGIN = RAMVEC_START, LENGTH = RAMVEC_LENGTH +#endif ram : ORIGIN = RAM_START, LENGTH = RAM_LENGTH +#ifdef RAM_END + eram : ORIGIN = RAM_END, LENGTH = 0 +#endif #ifdef ROM_START romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH + erom : ORIGIN = ROM_END, LENGTH = 0 #endif } @@ -119,6 +302,19 @@ SECTIONS { _etext = . ; } > TEXT +#ifdef ROM_END + . = ROM_END ; + .erom : { + __rom_end = . ; + } > erom +#endif +#ifdef RAMVEC_START + . = RAMVEC_START ; + .ramvec : { + __ramvec = .; + } > ramvec +#endif + .data DATA_ADDR : { . = ALIGN(4); _sdata = . ; @@ -177,5 +373,12 @@ SECTIONS { _ebss = . ; } > BSS +#ifdef RAM_END + . = RAM_END ; + .eram : { + __ramend = . ; + _ramend = . ; + } > eram +#endif } diff --git a/arch/m68knommu/lib/semaphore.S b/arch/m68knommu/lib/semaphore.S index 87c746034..76765362f 100644 --- a/arch/m68knommu/lib/semaphore.S +++ b/arch/m68knommu/lib/semaphore.S @@ -9,6 +9,7 @@ */ #include +#include #include /* diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c index e4c233eef..d79503fe6 100644 --- a/arch/m68knommu/mm/init.c +++ b/arch/m68knommu/mm/init.c @@ -15,6 +15,7 @@ * DEC/2000 -- linux 2.4 support */ +#include #include #include #include @@ -62,6 +63,8 @@ static unsigned long empty_bad_page; unsigned long empty_zero_page; +extern unsigned long rom_length; + void show_mem(void) { unsigned long i; @@ -175,9 +178,11 @@ void mem_init(void) initk = (&__init_begin - &__init_end) >> 10; tmp = nr_free_pages() << PAGE_SHIFT; - printk(KERN_INFO "Memory available: %luk/%luk RAM, (%dk kernel code, %dk data)\n", + printk(KERN_INFO "Memory available: %luk/%luk RAM, %luk/%luk ROM (%dk kernel code, %dk data)\n", tmp >> 10, len >> 10, + (rom_length > 0) ? ((rom_length >> 10) - codek) : 0, + rom_length >> 10, codek, datak ); diff --git a/arch/m68knommu/mm/kmap.c b/arch/m68knommu/mm/kmap.c index bc32f3884..04213e1c1 100644 --- a/arch/m68knommu/mm/kmap.c +++ b/arch/m68knommu/mm/kmap.c @@ -5,6 +5,7 @@ * Copyright (C) 2000-2002 David McCullough */ +#include #include #include #include diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c index 411e45248..0eef72915 100644 --- a/arch/m68knommu/mm/memory.c +++ b/arch/m68knommu/mm/memory.c @@ -11,6 +11,7 @@ * Copyright (C) 1995 Hamish Macdonald */ +#include #include #include #include diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c index 34657f85e..987c91a9a 100644 --- a/arch/m68knommu/platform/5206/config.c +++ b/arch/m68knommu/platform/5206/config.c @@ -9,6 +9,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c index 48e4d6266..f35b8606c 100644 --- a/arch/m68knommu/platform/5206e/config.c +++ b/arch/m68knommu/platform/5206e/config.c @@ -8,6 +8,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c index 823f561f3..71dea2e0f 100644 --- a/arch/m68knommu/platform/520x/config.c +++ b/arch/m68knommu/platform/520x/config.c @@ -11,6 +11,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c index 85de817e9..22767ce50 100644 --- a/arch/m68knommu/platform/523x/config.c +++ b/arch/m68knommu/platform/523x/config.c @@ -12,6 +12,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c index 9d19d5bdb..289c1821b 100644 --- a/arch/m68knommu/platform/5249/config.c +++ b/arch/m68knommu/platform/5249/config.c @@ -8,6 +8,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c index d500e27ed..cf36e7d00 100644 --- a/arch/m68knommu/platform/5272/config.c +++ b/arch/m68knommu/platform/5272/config.c @@ -9,6 +9,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c index bbae51597..804de33cd 100644 --- a/arch/m68knommu/platform/527x/config.c +++ b/arch/m68knommu/platform/527x/config.c @@ -12,6 +12,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c index 18dad9046..a5d2aa38a 100644 --- a/arch/m68knommu/platform/528x/config.c +++ b/arch/m68knommu/platform/528x/config.c @@ -12,6 +12,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile index 2fd37dcc3..8d1619dc1 100644 --- a/arch/m68knommu/platform/5307/Makefile +++ b/arch/m68knommu/platform/5307/Makefile @@ -25,7 +25,6 @@ obj-$(CONFIG_M5249) += timers.o obj-$(CONFIG_M527x) += pit.o obj-$(CONFIG_M5272) += timers.o obj-$(CONFIG_M5307) += config.o timers.o -obj-$(CONFIG_M532x) += timers.o obj-$(CONFIG_M528x) += pit.o obj-$(CONFIG_M5407) += timers.o diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c index 8074ac56f..7ed5782e9 100644 --- a/arch/m68knommu/platform/5307/config.c +++ b/arch/m68knommu/platform/5307/config.c @@ -9,6 +9,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S index f0dba84d9..89b180d4e 100644 --- a/arch/m68knommu/platform/5307/entry.S +++ b/arch/m68knommu/platform/5307/entry.S @@ -4,8 +4,8 @@ * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) * Copyright (C) 1998 D. Jeff Dionne , * Kenneth Albanowski , - * Copyright (C) 2000 Lineo Inc. (www.lineo.com) - * Copyright (C) 2004-2006 Macq Electronique SA. (www.macqel.com) + * Copyright (C) 2000 Lineo Inc. (www.lineo.com) + * Copyright (C) 2004 Macq Electronique SA. (www.macqel.com) * * Based on: * @@ -26,6 +26,7 @@ * Bug, speed and maintainability fixes by Philippe De Muyter */ +#include #include #include #include @@ -55,27 +56,32 @@ sw_usp: .globl inthandler .globl fasthandler -enosys: - mov.l #sys_ni_syscall,%d3 - bra 1f - ENTRY(system_call) SAVE_ALL move #0x2000,%sr /* enable intrs again */ - cmpl #NR_syscalls,%d0 - jcc enosys + movel #-LENOSYS,%d2 + movel %d2,PT_D0(%sp) /* default return value in d0 */ + /* original D0 is in orig_d0 */ + movel %d0,%d2 + + /* save top of frame */ + pea %sp@ + jbsr set_esp0 + addql #4,%sp + + cmpl #NR_syscalls,%d2 + jcc ret_from_exception lea sys_call_table,%a0 - lsll #2,%d0 /* movel %a0@(%d0:l:4),%d3 */ - movel %a0@(%d0),%d3 - jeq enosys + lsll #2,%d2 /* movel %a0@(%d2:l:4),%d3 */ + movel %a0@(%d2),%d3 + jeq ret_from_exception + lsrl #2,%d2 -1: movel %sp,%d2 /* get thread_info pointer */ andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ movel %d2,%a0 - movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ - btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) + btst #TIF_SYSCALL_TRACE,%a0@(TI_FLAGS) bnes 1f movel %d3,%a0 @@ -120,8 +126,8 @@ Luser_return: jne Lwork_to_do /* still work to do */ Lreturn: - move #0x2700,%sr /* disable intrs */ - movel sw_usp,%a0 /* get usp */ + move #0x2700,%sr /* disable intrs */ + movel sw_usp,%a0 /* get usp */ movel %sp@(PT_PC),%a0@- /* copy exception program counter */ movel %sp@(PT_FORMATVEC),%a0@-/* copy exception format/vector/sr */ moveml %sp@,%d1-%d5/%a0-%a2 @@ -164,7 +170,7 @@ ENTRY(inthandler) movel %d0,%sp@(PT_ORIG_D0) addql #1,local_irq_count - movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */ + movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */ andl #0x03fc,%d0 /* mask out vector only */ leal per_cpu__kstat+STAT_IRQ,%a0 @@ -178,7 +184,7 @@ ENTRY(inthandler) movel %sp,%sp@- /* push regs arg onto stack */ movel %a0@(8),%sp@- /* push devid arg */ - movel %d0,%sp@- /* push vector # on stack */ + movel %d0,%sp@- /* push vector # on stack */ movel %a0@,%a0 /* get function to call */ jbsr %a0@ /* call vector handler */ @@ -195,7 +201,7 @@ ENTRY(inthandler) ENTRY(fasthandler) SAVE_LOCAL - movew %sp@(PT_FORMATVEC),%d0 + movew %sp@(PT_FORMATVEC),%d0 andl #0x03fc,%d0 /* mask out vector only */ leal per_cpu__kstat+STAT_IRQ,%a0 @@ -204,7 +210,7 @@ ENTRY(fasthandler) movel %sp,%sp@- /* push regs arg onto stack */ clrl %sp@- /* push devid arg */ lsrl #2,%d0 /* calculate real vector # */ - movel %d0,%sp@- /* push vector # on stack */ + movel %d0,%sp@- /* push vector # on stack */ lsll #4,%d0 /* adjust for array offset */ lea irq_list,%a0 @@ -259,3 +265,4 @@ ENTRY(resume) movew %a1@(TASK_THREAD+THREAD_SR),%d0 /* restore thread status reg */ movew %d0, %sr rts + diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S index f2edb6498..c30c462b9 100644 --- a/arch/m68knommu/platform/5307/head.S +++ b/arch/m68knommu/platform/5307/head.S @@ -3,11 +3,12 @@ /* * head.S -- common startup code for ColdFire CPUs. * - * (C) Copyright 1999-2006, Greg Ungerer . + * (C) Copyright 1999-2004, Greg Ungerer (gerg@snapgear.com). */ /*****************************************************************************/ +#include #include #include #include @@ -18,15 +19,47 @@ /*****************************************************************************/ /* - * If we don't have a fixed memory size, then lets build in code + * Define fixed memory sizes. Configuration of a fixed memory size + * overrides everything else. If the user defined a size we just + * blindly use it (they know what they are doing right :-) + */ +#if defined(CONFIG_RAM32MB) +#define MEM_SIZE 0x02000000 /* memory size 32Mb */ +#elif defined(CONFIG_RAM16MB) +#define MEM_SIZE 0x01000000 /* memory size 16Mb */ +#elif defined(CONFIG_RAM8MB) +#define MEM_SIZE 0x00800000 /* memory size 8Mb */ +#elif defined(CONFIG_RAM4MB) +#define MEM_SIZE 0x00400000 /* memory size 4Mb */ +#elif defined(CONFIG_RAM1MB) +#define MEM_SIZE 0x00100000 /* memory size 1Mb */ +#endif + +/* + * Memory size exceptions for special cases. Some boards may be set + * for auto memory sizing, but we can't do it that way for some reason. + * For example the 5206eLITE board has static RAM, and auto-detecting + * the SDRAM will do you no good at all. Same goes for the MOD5272. + */ +#ifdef CONFIG_RAMAUTO +#if defined(CONFIG_M5206eLITE) +#define MEM_SIZE 0x00100000 /* 1MiB default memory */ +#endif +#if defined(CONFIG_MOD5272) +#define MEM_SIZE 0x00800000 /* 8MiB default memory */ +#endif +#endif /* CONFIG_RAMAUTO */ + + +/* + * If we don't have a fixed memory size now, then lets build in code * to auto detect the DRAM size. Obviously this is the prefered - * method, and should work for most boards. It won't work for those - * that do not have their RAM starting at address 0, and it only - * works on SDRAM (not boards fitted with SRAM). + * method, and should work for most boards (it won't work for those + * that do not have their RAM starting at address 0). */ -#if CONFIG_RAMSIZE != 0 +#if defined(MEM_SIZE) .macro GET_MEM_SIZE - movel #CONFIG_RAMSIZE,%d0 /* hard coded memory size */ + movel #MEM_SIZE,%d0 /* hard coded memory size */ .endm #elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ @@ -65,7 +98,37 @@ .endm #else -#error "ERROR: I don't know how to probe your boards memory size?" +#error "ERROR: I don't know how to determine your boards memory size?" +#endif + + +/* + * Most ColdFire boards have their DRAM starting at address 0. + * Notable exception is the 5206eLITE board, another is the MOD5272. + */ +#if defined(CONFIG_M5206eLITE) +#define MEM_BASE 0x30000000 +#endif +#if defined(CONFIG_MOD5272) +#define MEM_BASE 0x02000000 +#define VBR_BASE 0x20000000 /* vectors in SRAM */ +#endif +#if defined(CONFIG_M5208EVB) +#define MEM_BASE 0x40000000 +#endif + +#ifndef MEM_BASE +#define MEM_BASE 0x00000000 /* memory base at address 0 */ +#endif + +/* + * The default location for the vectors is at the base of RAM. + * Some boards might like to use internal SRAM or something like + * that. If no board specific header defines an alternative then + * use the base of RAM. + */ +#ifndef VBR_BASE +#define VBR_BASE MEM_BASE /* vector address */ #endif /*****************************************************************************/ @@ -128,11 +191,11 @@ _start: * Create basic memory configuration. Set VBR accordingly, * and size memory. */ - movel #CONFIG_VECTORBASE,%a7 + movel #VBR_BASE,%a7 movec %a7,%VBR /* set vectors addr */ movel %a7,_ramvec - movel #CONFIG_RAMBASE,%a7 /* mark the base of RAM */ + movel #MEM_BASE,%a7 /* mark the base of RAM */ movel %a7,_rambase GET_MEM_SIZE /* macro code determines size */ diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c index b4b55093a..a134fb2f0 100644 --- a/arch/m68knommu/platform/5307/ints.c +++ b/arch/m68knommu/platform/5307/ints.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c index 9dc5688f7..323f2677e 100644 --- a/arch/m68knommu/platform/5307/pit.c +++ b/arch/m68knommu/platform/5307/pit.c @@ -1,23 +1,23 @@ /***************************************************************************/ /* - * pit.c -- Freescale ColdFire PIT timer. Currently this type of - * hardware timer only exists in the Freescale ColdFire + * pit.c -- Motorola ColdFire PIT timer. Currently this type of + * hardware timer only exists in the Motorola ColdFire * 5270/5271, 5282 and other CPUs. * - * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com) + * Copyright (C) 1999-2004, Greg Ungerer (gerg@snapgear.com) * Copyright (C) 2001-2004, SnapGear Inc. (www.snapgear.com) * */ /***************************************************************************/ +#include #include #include #include #include #include -#include #include #include #include @@ -25,20 +25,13 @@ /***************************************************************************/ -/* - * By default use timer1 as the system clock timer. - */ -#define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) - -/***************************************************************************/ - void coldfire_pit_tick(void) { - unsigned short pcsr; + volatile struct mcfpit *tp; /* Reset the ColdFire timer */ - pcsr = __raw_readw(TA(MCFPIT_PCSR)); - __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); + tp->pcsr |= MCFPIT_PCSR_PIF; } /***************************************************************************/ @@ -47,8 +40,9 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) { volatile unsigned char *icrp; volatile unsigned long *imrp; + volatile struct mcfpit *tp; - request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED, + request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, SA_INTERRUPT, "ColdFire Timer", NULL); icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + @@ -59,23 +53,27 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) *imrp &= ~MCFPIT_IMR_IBIT; /* Set up PIT timer 1 as poll clock */ - __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR)); - __raw_writew(((MCF_CLK / 2) / 64) / HZ, TA(MCFPIT_PMR)); - __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | - MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR)); + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); + tp->pcsr = MCFPIT_PCSR_DISABLE; + + tp->pmr = ((MCF_CLK / 2) / 64) / HZ; + tp->pcsr = MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW | + MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64; } /***************************************************************************/ unsigned long coldfire_pit_offset(void) { + volatile struct mcfpit *tp; volatile unsigned long *ipr; unsigned long pmr, pcntr, offset; + tp = (volatile struct mcfpit *) (MCF_IPSBAR + MCFPIT_BASE1); ipr = (volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFPIT_IMR); - pmr = __raw_readw(TA(MCFPIT_PMR)); - pcntr = __raw_readw(TA(MCFPIT_PCNTR)); + pmr = *(&tp->pmr); + pcntr = *(&tp->pcntr); /* * If we are still in the first half of the upcount and a diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c index 24781f009..ef49596aa 100644 --- a/arch/m68knommu/platform/5307/timers.c +++ b/arch/m68knommu/platform/5307/timers.c @@ -8,12 +8,12 @@ /***************************************************************************/ +#include #include #include #include #include #include -#include #include #include #include @@ -23,11 +23,6 @@ /***************************************************************************/ -/* - * By default use timer1 as the system clock timer. - */ -#define TA(a) (MCF_MBAR + MCFTIMER_BASE1 + (a)) - /* * Default the timer and vector to use for ColdFire. Some ColdFire * CPU's and some boards may want different. Their sub-architecture @@ -37,6 +32,8 @@ unsigned int mcf_timervector = 29; unsigned int mcf_profilevector = 31; unsigned int mcf_timerlevel = 5; +static volatile struct mcftimer *mcf_timerp; + /* * These provide the underlying interrupt vector support. * Unfortunately it is a little different on each ColdFire. @@ -49,19 +46,22 @@ extern int mcf_timerirqpending(int timer); void coldfire_tick(void) { /* Reset the ColdFire timer */ - __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); + mcf_timerp->ter = MCFTIMER_TER_CAP | MCFTIMER_TER_REF; } /***************************************************************************/ void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) { - __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); - __raw_writew(((MCF_BUSCLK / 16) / HZ), TA(MCFTIMER_TRR)); - __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | - MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); + /* Set up an internal TIMER as poll clock */ + mcf_timerp = (volatile struct mcftimer *) (MCF_MBAR + MCFTIMER_BASE1); + mcf_timerp->tmr = MCFTIMER_TMR_DISABLE; + + mcf_timerp->trr = (unsigned short) ((MCF_BUSCLK / 16) / HZ); + mcf_timerp->tmr = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | + MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE; - request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL); + request_irq(mcf_timervector, handler, SA_INTERRUPT, "timer", NULL); mcf_settimericr(1, mcf_timerlevel); #ifdef CONFIG_HIGHPROFILE @@ -75,8 +75,13 @@ unsigned long coldfire_timer_offset(void) { unsigned long trr, tcn, offset; - tcn = __raw_readw(TA(MCFTIMER_TCN)); - trr = __raw_readw(TA(MCFTIMER_TRR)); + /* + * The change to pointer and de-reference is to force the compiler + * to read the registers with a single 16bit access. Otherwise it + * does some crazy 8bit read combining. + */ + tcn = *(&mcf_timerp->tcn); + trr = *(&mcf_timerp->trr); offset = (tcn * (1000000 / HZ)) / trr; /* Check if we just wrapped the counters and maybe missed a tick */ @@ -89,24 +94,22 @@ unsigned long coldfire_timer_offset(void) #ifdef CONFIG_HIGHPROFILE /***************************************************************************/ -/* - * By default use timer2 as the profiler clock timer. - */ -#define PA(a) (MCF_MBAR + MCFTIMER_BASE2 + (a)) - /* * Choose a reasonably fast profile timer. Make it an odd value to * try and get good coverage of kernal operations. */ #define PROFILEHZ 1013 +static volatile struct mcftimer *mcf_proftp; + /* * Use the other timer to provide high accuracy profiling info. */ + void coldfire_profile_tick(int irq, void *dummy, struct pt_regs *regs) { /* Reset ColdFire timer2 */ - __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, PA(MCFTIMER_TER)); + mcf_proftp->ter = MCFTIMER_TER_CAP | MCFTIMER_TER_REF; if (current->pid) profile_tick(CPU_PROFILING, regs); } @@ -118,14 +121,15 @@ void coldfire_profile_init(void) printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", PROFILEHZ); /* Set up TIMER 2 as high speed profile clock */ - __raw_writew(MCFTIMER_TMR_DISABLE, PA(MCFTIMER_TMR)); + mcf_proftp = (volatile struct mcftimer *) (MCF_MBAR + MCFTIMER_BASE2); + mcf_proftp->tmr = MCFTIMER_TMR_DISABLE; - __raw_writew(((MCF_CLK / 16) / PROFILEHZ), PA(MCFTIMER_TRR)); - __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | - MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); + mcf_proftp->trr = (unsigned short) ((MCF_CLK / 16) / PROFILEHZ); + mcf_proftp->tmr = MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | + MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE; request_irq(mcf_profilevector, coldfire_profile_tick, - (IRQF_DISABLED | IRQ_FLG_FAST), "profile timer", NULL); + (SA_INTERRUPT | IRQ_FLG_FAST), "profile timer", NULL); mcf_settimericr(2, 7); } diff --git a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c index 2a8b0d044..ac313a160 100644 --- a/arch/m68knommu/platform/5307/vectors.c +++ b/arch/m68knommu/platform/5307/vectors.c @@ -8,6 +8,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/532x/Makefile b/arch/m68knommu/platform/532x/Makefile deleted file mode 100644 index 12301803b..000000000 --- a/arch/m68knommu/platform/532x/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# -# Makefile for the m68knommu linux kernel. -# - -# -# If you want to play with the HW breakpoints then you will -# need to add define this, which will give you a stack backtrace -# on the console port whenever a DBG interrupt occurs. You have to -# set up you HW breakpoints to trigger a DBG interrupt: -# -# EXTRA_CFLAGS += -DTRAP_DBG_INTERRUPT -# EXTRA_AFLAGS += -DTRAP_DBG_INTERRUPT -# - -ifdef CONFIG_FULLDEBUG -AFLAGS += -DDEBUGGER_COMPATIBLE_CACHE=1 -endif - -#obj-y := config.o usb-mcf532x.o spi-mcf532x.o -obj-y := config.o diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c deleted file mode 100644 index c7d6ad513..000000000 --- a/arch/m68knommu/platform/532x/config.c +++ /dev/null @@ -1,485 +0,0 @@ -/***************************************************************************/ - -/* - * linux/arch/m68knommu/platform/532x/config.c - * - * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) - * Copyright (C) 2000, Lineo (www.lineo.com) - * Yaroslav Vinogradov yaroslav.vinogradov@freescale.com - * Copyright Freescale Semiconductor, Inc 2006 - * Copyright (c) 2006, emlix, Sebastian Hess - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -/***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/***************************************************************************/ - -void coldfire_tick(void); -void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); -unsigned long coldfire_timer_offset(void); -void coldfire_trap_init(void); -void coldfire_reset(void); - -extern unsigned int mcf_timervector; -extern unsigned int mcf_profilevector; -extern unsigned int mcf_timerlevel; - -/***************************************************************************/ - -/* - * DMA channel base address table. - */ -unsigned int dma_base_addr[MAX_M68K_DMA_CHANNELS] = { }; -unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; - -/***************************************************************************/ - -void mcf_settimericr(unsigned int timer, unsigned int level) -{ - volatile unsigned char *icrp; - unsigned int icr; - unsigned char irq; - - if (timer <= 2) { - switch (timer) { - case 2: irq = 33; icr = MCFSIM_ICR_TIMER2; break; - default: irq = 32; icr = MCFSIM_ICR_TIMER1; break; - } - - icrp = (volatile unsigned char *) (MCF_MBAR + icr); - *icrp = level; - mcf_enable_irq0(irq); - } -} - -/***************************************************************************/ - -int mcf_timerirqpending(int timer) -{ - unsigned int imr = 0; - - switch (timer) { - case 1: imr = 0x1; break; - case 2: imr = 0x2; break; - default: break; - } - return (mcf_getiprh() & imr); -} - -/***************************************************************************/ - -void config_BSP(char *commandp, int size) -{ - mcf_setimr(MCFSIM_IMR_MASKALL); - -#if defined(CONFIG_BOOTPARAM) - strncpy(commandp, CONFIG_BOOTPARAM_STRING, size); - commandp[size-1] = 0; -#else - /* Copy command line from FLASH to local buffer... */ - memcpy(commandp, (char *) 0x4000, 4); - if(strncmp(commandp, "kcl ", 4) == 0){ - memcpy(commandp, (char *) 0x4004, size); - commandp[size-1] = 0; - } else { - memset(commandp, 0, size); - } -#endif - - mcf_timervector = 64+32; - mcf_profilevector = 64+33; - mach_sched_init = coldfire_timer_init; - mach_tick = coldfire_tick; - mach_gettimeoffset = coldfire_timer_offset; - mach_trap_init = coldfire_trap_init; - mach_reset = coldfire_reset; - -#ifdef MCF_BDM_DISABLE - /* - * Disable the BDM clocking. This also turns off most of the rest of - * the BDM device. This is good for EMC reasons. This option is not - * incompatible with the memory protection option. - */ - wdebug(MCFDEBUG_CSR, MCFDEBUG_CSR_PSTCLK); -#endif -} - -/***************************************************************************/ -/* Board initialization */ - -/********************************************************************/ -/* - * PLL min/max specifications - */ -#define MAX_FVCO 500000 /* KHz */ -#define MAX_FSYS 80000 /* KHz */ -#define MIN_FSYS 58333 /* KHz */ -#define FREF 16000 /* KHz */ - - -#define MAX_MFD 135 /* Multiplier */ -#define MIN_MFD 88 /* Multiplier */ -#define BUSDIV 6 /* Divider */ - -/* - * Low Power Divider specifications - */ -#define MIN_LPD (1 << 0) /* Divider (not encoded) */ -#define MAX_LPD (1 << 15) /* Divider (not encoded) */ -#define DEFAULT_LPD (1 << 1) /* Divider (not encoded) */ - -#define SYS_CLK_KHZ 80000 -#define SYSTEM_PERIOD 12.5 -/* - * SDRAM Timing Parameters - */ -#define SDRAM_BL 8 /* # of beats in a burst */ -#define SDRAM_TWR 2 /* in clocks */ -#define SDRAM_CASL 2.5 /* CASL in clocks */ -#define SDRAM_TRCD 2 /* in clocks */ -#define SDRAM_TRP 2 /* in clocks */ -#define SDRAM_TRFC 7 /* in clocks */ -#define SDRAM_TREFI 7800 /* in ns */ - -#define EXT_SRAM_ADDRESS (0xC0000000) -#define FLASH_ADDRESS (0x00000000) -#define SDRAM_ADDRESS (0x40000000) - -#define NAND_FLASH_ADDRESS (0xD0000000) - -int sys_clk_khz = 0; -int sys_clk_mhz = 0; - -void wtm_init(void); -void scm_init(void); -void gpio_init(void); -void fbcs_init(void); -void sdramc_init(void); -int clock_pll (int fsys, int flags); -int clock_limp (int); -int clock_exit_limp (void); -int get_sys_clock (void); - -asmlinkage void __init sysinit(void) -{ - sys_clk_khz = clock_pll(0, 0); - sys_clk_mhz = sys_clk_khz/1000; - - wtm_init(); - scm_init(); - gpio_init(); - fbcs_init(); - sdramc_init(); -} - -void wtm_init(void) -{ - /* Disable watchdog timer */ - MCF_WTM_WCR = 0; -} - -#define MCF_SCM_BCR_GBW (0x00000100) -#define MCF_SCM_BCR_GBR (0x00000200) - -void scm_init(void) -{ - /* All masters are trusted */ - MCF_SCM_MPR = 0x77777777; - - /* Allow supervisor/user, read/write, and trusted/untrusted - access to all slaves */ - MCF_SCM_PACRA = 0; - MCF_SCM_PACRB = 0; - MCF_SCM_PACRC = 0; - MCF_SCM_PACRD = 0; - MCF_SCM_PACRE = 0; - MCF_SCM_PACRF = 0; - - /* Enable bursts */ - MCF_SCM_BCR = (MCF_SCM_BCR_GBR | MCF_SCM_BCR_GBW); -} - - -void fbcs_init(void) -{ - MCF_GPIO_PAR_CS = 0x0000003E; - - /* Latch chip select */ - MCF_FBCS1_CSAR = 0x10080000; - - MCF_FBCS1_CSCR = 0x002A3780; - MCF_FBCS1_CSMR = (MCF_FBCS_CSMR_BAM_2M | MCF_FBCS_CSMR_V); - - /* Initialize latch to drive signals to inactive states */ - *((u16 *)(0x10080000)) = 0xFFFF; - - /* External SRAM */ - MCF_FBCS1_CSAR = EXT_SRAM_ADDRESS; - MCF_FBCS1_CSCR = (MCF_FBCS_CSCR_PS_16 - | MCF_FBCS_CSCR_AA - | MCF_FBCS_CSCR_SBM - | MCF_FBCS_CSCR_WS(1)); - MCF_FBCS1_CSMR = (MCF_FBCS_CSMR_BAM_512K - | MCF_FBCS_CSMR_V); - - /* Boot Flash connected to FBCS0 */ - MCF_FBCS0_CSAR = FLASH_ADDRESS; - MCF_FBCS0_CSCR = (MCF_FBCS_CSCR_PS_16 - | MCF_FBCS_CSCR_BEM - | MCF_FBCS_CSCR_AA - | MCF_FBCS_CSCR_SBM - | MCF_FBCS_CSCR_WS(7)); - MCF_FBCS0_CSMR = (MCF_FBCS_CSMR_BAM_32M - | MCF_FBCS_CSMR_V); -} - -void sdramc_init(void) -{ - /* - * Check to see if the SDRAM has already been initialized - * by a run control tool - */ - if (!(MCF_SDRAMC_SDCR & MCF_SDRAMC_SDCR_REF)) { - /* SDRAM chip select initialization */ - - /* Initialize SDRAM chip select */ - MCF_SDRAMC_SDCS0 = (0 - | MCF_SDRAMC_SDCS_BA(SDRAM_ADDRESS) - | MCF_SDRAMC_SDCS_CSSZ(MCF_SDRAMC_SDCS_CSSZ_32MBYTE)); - - /* - * Basic configuration and initialization - */ - MCF_SDRAMC_SDCFG1 = (0 - | MCF_SDRAMC_SDCFG1_SRD2RW((int)((SDRAM_CASL + 2) + 0.5 )) - | MCF_SDRAMC_SDCFG1_SWT2RD(SDRAM_TWR + 1) - | MCF_SDRAMC_SDCFG1_RDLAT((int)((SDRAM_CASL*2) + 2)) - | MCF_SDRAMC_SDCFG1_ACT2RW((int)((SDRAM_TRCD ) + 0.5)) - | MCF_SDRAMC_SDCFG1_PRE2ACT((int)((SDRAM_TRP ) + 0.5)) - | MCF_SDRAMC_SDCFG1_REF2ACT((int)(((SDRAM_TRFC) ) + 0.5)) - | MCF_SDRAMC_SDCFG1_WTLAT(3)); - MCF_SDRAMC_SDCFG2 = (0 - | MCF_SDRAMC_SDCFG2_BRD2PRE(SDRAM_BL/2 + 1) - | MCF_SDRAMC_SDCFG2_BWT2RW(SDRAM_BL/2 + SDRAM_TWR) - | MCF_SDRAMC_SDCFG2_BRD2WT((int)((SDRAM_CASL+SDRAM_BL/2-1.0)+0.5)) - | MCF_SDRAMC_SDCFG2_BL(SDRAM_BL-1)); - - - /* - * Precharge and enable write to SDMR - */ - MCF_SDRAMC_SDCR = (0 - | MCF_SDRAMC_SDCR_MODE_EN - | MCF_SDRAMC_SDCR_CKE - | MCF_SDRAMC_SDCR_DDR - | MCF_SDRAMC_SDCR_MUX(1) - | MCF_SDRAMC_SDCR_RCNT((int)(((SDRAM_TREFI/(SYSTEM_PERIOD*64)) - 1) + 0.5)) - | MCF_SDRAMC_SDCR_PS_16 - | MCF_SDRAMC_SDCR_IPALL); - - /* - * Write extended mode register - */ - MCF_SDRAMC_SDMR = (0 - | MCF_SDRAMC_SDMR_BNKAD_LEMR - | MCF_SDRAMC_SDMR_AD(0x0) - | MCF_SDRAMC_SDMR_CMD); - - /* - * Write mode register and reset DLL - */ - MCF_SDRAMC_SDMR = (0 - | MCF_SDRAMC_SDMR_BNKAD_LMR - | MCF_SDRAMC_SDMR_AD(0x163) - | MCF_SDRAMC_SDMR_CMD); - - /* - * Execute a PALL command - */ - MCF_SDRAMC_SDCR |= MCF_SDRAMC_SDCR_IPALL; - - /* - * Perform two REF cycles - */ - MCF_SDRAMC_SDCR |= MCF_SDRAMC_SDCR_IREF; - MCF_SDRAMC_SDCR |= MCF_SDRAMC_SDCR_IREF; - - /* - * Write mode register and clear reset DLL - */ - MCF_SDRAMC_SDMR = (0 - | MCF_SDRAMC_SDMR_BNKAD_LMR - | MCF_SDRAMC_SDMR_AD(0x063) - | MCF_SDRAMC_SDMR_CMD); - - /* - * Enable auto refresh and lock SDMR - */ - MCF_SDRAMC_SDCR &= ~MCF_SDRAMC_SDCR_MODE_EN; - MCF_SDRAMC_SDCR |= (0 - | MCF_SDRAMC_SDCR_REF - | MCF_SDRAMC_SDCR_DQS_OE(0xC)); - } -} - -void gpio_init(void) -{ - /* Enable UART0 pins */ - MCF_GPIO_PAR_UART = ( 0 - | MCF_GPIO_PAR_UART_PAR_URXD0 - | MCF_GPIO_PAR_UART_PAR_UTXD0); - - /* Initialize TIN3 as a GPIO output to enable the write - half of the latch */ - MCF_GPIO_PAR_TIMER = 0x00; - MCF_GPIO_PDDR_TIMER = 0x08; - MCF_GPIO_PCLRR_TIMER = 0x0; - -} - -int clock_pll(int fsys, int flags) -{ - int fref, temp, fout, mfd; - u32 i; - - fref = FREF; - - if (fsys == 0) { - /* Return current PLL output */ - mfd = MCF_PLL_PFDR; - - return (fref * mfd / (BUSDIV * 4)); - } - - /* Check bounds of requested system clock */ - if (fsys > MAX_FSYS) - fsys = MAX_FSYS; - if (fsys < MIN_FSYS) - fsys = MIN_FSYS; - - /* Multiplying by 100 when calculating the temp value, - and then dividing by 100 to calculate the mfd allows - for exact values without needing to include floating - point libraries. */ - temp = 100 * fsys / fref; - mfd = 4 * BUSDIV * temp / 100; - - /* Determine the output frequency for selected values */ - fout = (fref * mfd / (BUSDIV * 4)); - - /* - * Check to see if the SDRAM has already been initialized. - * If it has then the SDRAM needs to be put into self refresh - * mode before reprogramming the PLL. - */ - if (MCF_SDRAMC_SDCR & MCF_SDRAMC_SDCR_REF) - /* Put SDRAM into self refresh mode */ - MCF_SDRAMC_SDCR &= ~MCF_SDRAMC_SDCR_CKE; - - /* - * Initialize the PLL to generate the new system clock frequency. - * The device must be put into LIMP mode to reprogram the PLL. - */ - - /* Enter LIMP mode */ - clock_limp(DEFAULT_LPD); - - /* Reprogram PLL for desired fsys */ - MCF_PLL_PODR = (0 - | MCF_PLL_PODR_CPUDIV(BUSDIV/3) - | MCF_PLL_PODR_BUSDIV(BUSDIV)); - - MCF_PLL_PFDR = mfd; - - /* Exit LIMP mode */ - clock_exit_limp(); - - /* - * Return the SDRAM to normal operation if it is in use. - */ - if (MCF_SDRAMC_SDCR & MCF_SDRAMC_SDCR_REF) - /* Exit self refresh mode */ - MCF_SDRAMC_SDCR |= MCF_SDRAMC_SDCR_CKE; - - /* Errata - workaround for SDRAM opeartion after exiting LIMP mode */ - MCF_SDRAMC_LIMP_FIX = MCF_SDRAMC_REFRESH; - - /* wait for DQS logic to relock */ - for (i = 0; i < 0x200; i++) - ; - - return fout; -} - -int clock_limp(int div) -{ - u32 temp; - - /* Check bounds of divider */ - if (div < MIN_LPD) - div = MIN_LPD; - if (div > MAX_LPD) - div = MAX_LPD; - - /* Save of the current value of the SSIDIV so we don't - overwrite the value*/ - temp = (MCF_CCM_CDR & MCF_CCM_CDR_SSIDIV(0xF)); - - /* Apply the divider to the system clock */ - MCF_CCM_CDR = ( 0 - | MCF_CCM_CDR_LPDIV(div) - | MCF_CCM_CDR_SSIDIV(temp)); - - MCF_CCM_MISCCR |= MCF_CCM_MISCCR_LIMP; - - return (FREF/(3*(1 << div))); -} - -int clock_exit_limp(void) -{ - int fout; - - /* Exit LIMP mode */ - MCF_CCM_MISCCR = (MCF_CCM_MISCCR & ~ MCF_CCM_MISCCR_LIMP); - - /* Wait for PLL to lock */ - while (!(MCF_CCM_MISCCR & MCF_CCM_MISCCR_PLL_LOCK)) - ; - - fout = get_sys_clock(); - - return fout; -} - -int get_sys_clock(void) -{ - int divider; - - /* Test to see if device is in LIMP mode */ - if (MCF_CCM_MISCCR & MCF_CCM_MISCCR_LIMP) { - divider = MCF_CCM_CDR & MCF_CCM_CDR_LPDIV(0xF); - return (FREF/(2 << divider)); - } - else - return ((FREF * MCF_PLL_PFDR) / (BUSDIV * 4)); -} diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c index 5aad2645f..f7c9018b8 100644 --- a/arch/m68knommu/platform/5407/config.c +++ b/arch/m68knommu/platform/5407/config.c @@ -9,6 +9,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/68328/Makefile b/arch/m68knommu/platform/68328/Makefile index 5e5435552..1b3b719e4 100644 --- a/arch/m68knommu/platform/68328/Makefile +++ b/arch/m68knommu/platform/68328/Makefile @@ -8,7 +8,6 @@ head-$(CONFIG_DRAGEN2) = head-de2.o obj-y += entry.o ints.o timers.o obj-$(CONFIG_M68328) += config.o -obj-$(CONFIG_ROM) += romvec.o extra-y := head.o extra-$(CONFIG_M68328) += bootlogo.rh head.o diff --git a/arch/m68knommu/platform/68328/config.c b/arch/m68knommu/platform/68328/config.c index 26ffeba28..bcfa5d7fe 100644 --- a/arch/m68knommu/platform/68328/config.c +++ b/arch/m68knommu/platform/68328/config.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S index f97862715..7d8990d78 100644 --- a/arch/m68knommu/platform/68328/entry.S +++ b/arch/m68knommu/platform/68328/entry.S @@ -10,6 +10,7 @@ * Linux/m68k support by Hamish Macdonald */ +#include #include #include #include diff --git a/arch/m68knommu/platform/68328/head-de2.S b/arch/m68knommu/platform/68328/head-de2.S index 92d96456d..94c5a1609 100644 --- a/arch/m68knommu/platform/68328/head-de2.S +++ b/arch/m68knommu/platform/68328/head-de2.S @@ -1,3 +1,4 @@ +#include #if defined(CONFIG_RAM32MB) #define MEM_END 0x02000000 /* Memory size 32Mb */ diff --git a/arch/m68knommu/platform/68328/head-pilot.S b/arch/m68knommu/platform/68328/head-pilot.S index 9e07faa3e..c46775fe0 100644 --- a/arch/m68knommu/platform/68328/head-pilot.S +++ b/arch/m68knommu/platform/68328/head-pilot.S @@ -15,11 +15,13 @@ #define IMMED # #define DBG_PUTC(x) moveb IMMED x, 0xfffff907 +#include .global _stext .global _start .global _rambase +.global __ramvec .global _ramvec .global _ramstart .global _ramend @@ -119,7 +121,7 @@ L0: DBG_PUTC('B') /* Copy command line from beginning of RAM (+16) to end of bss */ - movel #CONFIG_VECTORBASE, %d7 + movel #__ramvec, %d7 addl #16, %d7 moveal %d7, %a0 moveal #_ebss, %a1 diff --git a/arch/m68knommu/platform/68328/head-ram.S b/arch/m68knommu/platform/68328/head-ram.S index 252b80b02..6bdc9bce4 100644 --- a/arch/m68knommu/platform/68328/head-ram.S +++ b/arch/m68knommu/platform/68328/head-ram.S @@ -1,6 +1,10 @@ +#include .global __main + .global __ram_start + .global __ram_end .global __rom_start + .global __rom_end .global _rambase .global _ramstart @@ -8,7 +12,6 @@ .global splash_bits .global _start .global _stext - .global _edata #define DEBUG #define ROM_OFFSET 0x10C00000 @@ -70,7 +73,7 @@ pclp1: #ifdef CONFIG_RELOCATE /* Copy me to RAM */ moveal #__rom_start, %a0 - moveal #_stext, %a1 + moveal #__ram_start, %a1 moveal #_edata, %a2 /* Copy %a0 to %a1 until %a1 == %a2 */ diff --git a/arch/m68knommu/platform/68328/head-rom.S b/arch/m68knommu/platform/68328/head-rom.S index 6ec77d3ea..2b448a297 100644 --- a/arch/m68knommu/platform/68328/head-rom.S +++ b/arch/m68knommu/platform/68328/head-rom.S @@ -1,3 +1,4 @@ +#include .global _start .global _stext @@ -27,8 +28,6 @@ _ramstart: _ramend: .long 0 -#define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) - #ifdef CONFIG_INIT_LCD splash_bits: #include "bootlogo.rh" @@ -49,7 +48,7 @@ _stext: movew #0x2700,%sr moveb #0x81, 0xfffffA27 /* LCKCON */ movew #0xff00, 0xfffff412 /* LCD pins */ #endif - moveal #RAMEND-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp + moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp movew #32767, %d0 /* PLL settle wait loop */ 1: subq #1, %d0 bne 1b @@ -74,13 +73,13 @@ _stext: movew #0x2700,%sr bhi 1b movel #_sdata, %d0 - movel %d0, _rambase - movel #_ebss, %d0 - movel %d0, _ramstart - movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0 - movel %d0, _ramend - movel #CONFIG_VECTORBASE, %d0 - movel %d0, _ramvec + movel %d0, _rambase + movel #_ebss, %d0 + movel %d0, _ramstart + movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0 + movel %d0, _ramend + movel #__ramvec, %d0 + movel %d0, _ramvec /* * load the current task pointer and stack diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c index 2dda7339a..743721781 100644 --- a/arch/m68knommu/platform/68328/ints.c +++ b/arch/m68knommu/platform/68328/ints.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -83,6 +82,25 @@ unsigned int local_irq_count[NR_CPUS]; /* irq node variables for the 32 (potential) on chip sources */ static irq_node_t int_irq_list[NR_IRQS]; +#if !defined(CONFIG_DRAGEN2) +asm (".global _start, __ramend/n/t" + ".section .romvec/n" + "e_vectors:\n\t" + ".long __ramend-4, _start, buserr, trap, trap, trap, trap, trap\n\t" + ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" + ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" + ".long trap, trap, trap, trap\n\t" + ".long trap, trap, trap, trap\n\t" + /*.long inthandler, inthandler, inthandler, inthandler + .long inthandler4, inthandler, inthandler, inthandler */ + /* TRAP #0-15 */ + ".long system_call, trap, trap, trap, trap, trap, trap, trap\n\t" + ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" + ".long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n\t" + ".text\n" + "ignore: rte"); +#endif + /* * This function should be called during kernel startup to initialize * the IRQ handling routines. diff --git a/arch/m68knommu/platform/68328/romvec.S b/arch/m68knommu/platform/68328/romvec.S deleted file mode 100644 index 31084466e..000000000 --- a/arch/m68knommu/platform/68328/romvec.S +++ /dev/null @@ -1,35 +0,0 @@ -/* - * linux/arch/m68knommu/platform/68328/romvec.S - * - * 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 1996 Roman Zippel - * Copyright 1999 D. Jeff Dionne - * Copyright 2006 Greg Ungerer - */ - -.global _start -.global _buserr -.global trap -.global system_call - -.section .romvec - -e_vectors: -.long CONFIG_RAMBASE+CONFIG_RAMSIZE-4, _start, buserr, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -/* TRAP #0-15 */ -.long system_call, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long trap, trap, trap, trap -.long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c index 438ef6ee9..68c2cd6b0 100644 --- a/arch/m68knommu/platform/68328/timers.c +++ b/arch/m68knommu/platform/68328/timers.c @@ -14,6 +14,7 @@ /***************************************************************************/ +#include #include #include #include diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c index c5482e362..3db244625 100644 --- a/arch/m68knommu/platform/68360/config.c +++ b/arch/m68knommu/platform/68360/config.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -140,13 +141,13 @@ int BSP_set_clock_mmss (unsigned long nowtime) void BSP_reset (void) { local_irq_disable(); - asm volatile ( - "moveal #_start, %a0;\n" - "moveb #0, 0xFFFFF300;\n" - "moveal 0(%a0), %sp;\n" - "moveal 4(%a0), %a0;\n" - "jmp (%a0);\n" - ); + asm volatile (" + moveal #_start, %a0; + moveb #0, 0xFFFFF300; + moveal 0(%a0), %sp; + moveal 4(%a0), %a0; + jmp (%a0); + "); } unsigned char *scc1_hwaddr; diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S index f1af8977f..8ff48adf2 100644 --- a/arch/m68knommu/platform/68360/entry.S +++ b/arch/m68knommu/platform/68360/entry.S @@ -12,6 +12,7 @@ * M68360 Port by SED Systems, and Lineo. */ +#include #include #include #include diff --git a/arch/m68knommu/platform/68360/head-ram.S b/arch/m68knommu/platform/68360/head-ram.S index 2ea51479f..a5c639a51 100644 --- a/arch/m68knommu/platform/68360/head-ram.S +++ b/arch/m68knommu/platform/68360/head-ram.S @@ -12,11 +12,13 @@ * */ #define ASSEMBLY +#include .global _stext .global _start .global _rambase +.global __ramvec .global _ramvec .global _ramstart .global _ramend @@ -24,8 +26,6 @@ .global _quicc_base .global _periph_base -#define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) - #define REGB 0x1000 #define PEPAR (_dprbase + REGB + 0x0016) #define GMR (_dprbase + REGB + 0x0040) @@ -103,7 +103,7 @@ _stext: nop ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ /* We should not need to setup the boot stack the reset should do it. */ - movea.l #RAMEND, %sp /*set up stack at the end of DRAM:*/ + movea.l #__ramend, %sp /*set up stack at the end of DRAM:*/ set_mbar_register: moveq.l #0x07, %d1 /* Setup MBAR */ @@ -163,7 +163,7 @@ configure_memory_controller: move.l %d0, GMR configure_chip_select_0: - move.l #RAMEND, %d0 + move.l #__ramend, %d0 subi.l #__ramstart, %d0 subq.l #0x01, %d0 eori.l #SIM_OR_MASK, %d0 @@ -234,10 +234,16 @@ store_ram_size: /* Set ram size information */ move.l #_sdata, _rambase move.l #_ebss, _ramstart - move.l #RAMEND, %d0 + move.l #__ramend, %d0 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from RAMEND.*/ + move.l %d0, _ramend /* Different from __ramend.*/ +store_flash_size: + /* Set rom size information */ + move.l #__rom_end, %d0 + sub.l #__rom_start, %d0 + move.l %d0, rom_length + pea 0 pea env pea %sp@(4) @@ -280,7 +286,7 @@ _dprbase: */ .section ".data.initvect","awx" - .long RAMEND /* Reset: Initial Stack Pointer - 0. */ + .long __ramend /* Reset: Initial Stack Pointer - 0. */ .long _start /* Reset: Initial Program Counter - 1. */ .long buserr /* Bus Error - 2. */ .long trap /* Address Error - 3. */ diff --git a/arch/m68knommu/platform/68360/head-rom.S b/arch/m68knommu/platform/68360/head-rom.S index 62ecf4144..0da357a4c 100644 --- a/arch/m68knommu/platform/68360/head-rom.S +++ b/arch/m68knommu/platform/68360/head-rom.S @@ -11,12 +11,14 @@ * Copyright (C) 1998 D. Jeff Dionne , * */ +#include .global _stext .global _sbss .global _start .global _rambase +.global __ramvec .global _ramvec .global _ramstart .global _ramend @@ -24,8 +26,6 @@ .global _quicc_base .global _periph_base -#define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) - #define REGB 0x1000 #define PEPAR (_dprbase + REGB + 0x0016) #define GMR (_dprbase + REGB + 0x0040) @@ -115,7 +115,7 @@ _stext: nop ori.w #MCU_DISABLE_INTRPTS, %sr /* disable interrupts: */ /* We should not need to setup the boot stack the reset should do it. */ - movea.l #RAMEND, %sp /* set up stack at the end of DRAM:*/ + movea.l #__ramend, %sp /* set up stack at the end of DRAM:*/ set_mbar_register: @@ -245,10 +245,16 @@ store_ram_size: /* Set ram size information */ move.l #_sdata, _rambase move.l #_ebss, _ramstart - move.l #RAMEND, %d0 + move.l #__ramend, %d0 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ - move.l %d0, _ramend /* Different from RAMEND.*/ + move.l %d0, _ramend /* Different from __ramend.*/ +store_flash_size: + /* Set rom size information */ + move.l #__rom_end, %d0 + sub.l #__rom_start, %d0 + move.l %d0, rom_length + pea 0 pea env pea %sp@(4) @@ -292,7 +298,7 @@ _dprbase: */ .section ".data.initvect","awx" - .long RAMEND /* Reset: Initial Stack Pointer - 0. */ + .long __ramend /* Reset: Initial Stack Pointer - 0. */ .long _start /* Reset: Initial Program Counter - 1. */ .long buserr /* Bus Error - 2. */ .long trap /* Address Error - 3. */ diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c index 4df3c146e..ba184db16 100644 --- a/arch/m68knommu/platform/68360/ints.c +++ b/arch/m68knommu/platform/68360/ints.c @@ -10,6 +10,7 @@ * Copyright (c) 1999 D. Jeff Dionne */ +#include #include #include #include @@ -19,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/arch/m68knommu/platform/68EZ328/config.c b/arch/m68knommu/platform/68EZ328/config.c index 659b80aca..d8d56e5de 100644 --- a/arch/m68knommu/platform/68EZ328/config.c +++ b/arch/m68knommu/platform/68EZ328/config.c @@ -14,6 +14,7 @@ /***************************************************************************/ #include +#include #include #include #include @@ -41,13 +42,13 @@ void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int void m68ez328_reset(void) { local_irq_disable(); - asm volatile ( - "moveal #0x10c00000, %a0;\n" - "moveb #0, 0xFFFFF300;\n" - "moveal 0(%a0), %sp;\n" - "moveal 4(%a0), %a0;\n" - "jmp (%a0);\n" - ); + asm volatile (" + moveal #0x10c00000, %a0; + moveb #0, 0xFFFFF300; + moveal 0(%a0), %sp; + moveal 4(%a0), %a0; + jmp (%a0); + "); } /***************************************************************************/ diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c index fcd100b75..d926524cd 100644 --- a/arch/m68knommu/platform/68VZ328/config.c +++ b/arch/m68knommu/platform/68VZ328/config.c @@ -14,6 +14,7 @@ /***************************************************************************/ +#include #include #include #include @@ -140,13 +141,13 @@ static void init_hardware(char *command, int size) static void m68vz328_reset(void) { local_irq_disable(); - asm volatile ( - "moveal #0x10c00000, %a0;\n\t" - "moveb #0, 0xFFFFF300;\n\t" - "moveal 0(%a0), %sp;\n\t" - "moveal 4(%a0), %a0;\n\t" - "jmp (%a0);\n" - ); + asm volatile (" + moveal #0x10c00000, %a0; + moveb #0, 0xFFFFF300; + moveal 0(%a0), %sp; + moveal 4(%a0), %a0; + jmp (%a0); + "); } unsigned char *cs8900a_hwaddr; diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 1f9a0c98f..f95dfd547 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -119,32 +119,6 @@ config MIPS_MIRAGE select SYS_HAS_CPU_MIPS32_R1 select SYS_SUPPORTS_LITTLE_ENDIAN -config BASLER_EXCITE - bool "Basler eXcite smart camera support" - select DMA_COHERENT - select HW_HAS_PCI - select IRQ_CPU - select IRQ_CPU_RM7K - select IRQ_CPU_RM9K - select SERIAL_RM9000 - select SYS_HAS_CPU_RM9000 - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_64BIT_KERNEL - select SYS_SUPPORTS_BIG_ENDIAN - help - The eXcite is a smart camera platform manufactured by - Basler Vision Technologies AG - -config BASLER_EXCITE_PROTOTYPE - bool "Support for pre-release units" - depends on BASLER_EXCITE - default n - help - Pre-series (prototype) units are different from later ones in - some ways. Select this option if you have one of these. Please - note that a kernel built with this option selected will not be - able to run on normal units. - config MIPS_COBALT bool "Cobalt Server" select DMA_NONCOHERENT @@ -168,9 +142,6 @@ config MACH_DECSTATION select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_SUPPORTS_128HZ - select SYS_SUPPORTS_256HZ - select SYS_SUPPORTS_1024HZ help This enables support for DEC's MIPS based workstations. For details see the Linux/MIPS FAQ on and the @@ -268,7 +239,6 @@ config MACH_JAZZ select SYS_HAS_CPU_R4X00 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL - select SYS_SUPPORTS_100HZ help This a family of machines based on the MIPS R4030 chipset which was used by several vendors to build RISC/os and Windows NT workstations. @@ -308,7 +278,6 @@ config MIPS_ATLAS select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_SUPPORTS_MULTITHREADING if EXPERIMENTAL help This enables support for the MIPS Technologies Atlas evaluation board. @@ -325,7 +294,6 @@ config MIPS_MALTA select I8259 select MIPS_BOARDS_GEN select MIPS_BONITO64 - select MIPS_CPU_SCACHE select MIPS_GT64120 select MIPS_MSC select SWAP_IO_SPACE @@ -338,7 +306,6 @@ config MIPS_MALTA select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_SUPPORTS_MULTITHREADING help This enables support for the MIPS Technologies Malta evaluation board. @@ -360,27 +327,6 @@ config MIPS_SEAD This enables support for the MIPS Technologies SEAD evaluation board. -config WR_PPMC - bool "Wind River PPMC board" - select IRQ_CPU - select BOOT_ELF32 - select DMA_NONCOHERENT - select HW_HAS_PCI - select MIPS_GT64120 - select SWAP_IO_SPACE - select SYS_HAS_CPU_MIPS32_R1 - select SYS_HAS_CPU_MIPS32_R2 - select SYS_HAS_CPU_MIPS64_R1 - select SYS_HAS_CPU_NEVADA - select SYS_HAS_CPU_RM7000 - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_64BIT_KERNEL - select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_LITTLE_ENDIAN - help - This enables support for the Wind River MIPS32 4KC PPMC evaluation - board, which is based on GT64120 bridge chip. - config MIPS_SIM bool 'MIPS simulator (MIPSsim)' select DMA_NONCOHERENT @@ -480,7 +426,6 @@ config MOMENCO_OCELOT_G select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select ARCH_SPARSEMEM_ENABLE help The Ocelot is a MIPS-based Single Board Computer (SBC) made by Momentum Computer . @@ -493,16 +438,53 @@ config MIPS_XXS1500 config PNX8550_V2PCI bool "Philips PNX8550 based Viper2-PCI board" - depends on BROKEN select PNX8550 select SYS_SUPPORTS_LITTLE_ENDIAN config PNX8550_JBS bool "Philips PNX8550 based JBS board" - depends on BROKEN select PNX8550 select SYS_SUPPORTS_LITTLE_ENDIAN +config DDB5074 + bool "NEC DDB Vrc-5074 (EXPERIMENTAL)" + depends on EXPERIMENTAL + select DDB5XXX_COMMON + select DMA_NONCOHERENT + select HAVE_STD_PC_SERIAL_PORT + select HW_HAS_PCI + select IRQ_CPU + select I8259 + select ISA + select SYS_HAS_CPU_R5000 + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL + select SYS_SUPPORTS_LITTLE_ENDIAN + help + This enables support for the VR5000-based NEC DDB Vrc-5074 + evaluation board. + +config DDB5476 + bool "NEC DDB Vrc-5476" + select DDB5XXX_COMMON + select DMA_NONCOHERENT + select HAVE_STD_PC_SERIAL_PORT + select HW_HAS_PCI + select IRQ_CPU + select I8259 + select ISA + select SYS_HAS_CPU_R5432 + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL + select SYS_SUPPORTS_LITTLE_ENDIAN + help + This enables support for the R5432-based NEC DDB Vrc-5476 + evaluation board. + + Features : kernel debugging, serial terminal, NFS root fs, on-board + ether port USB, AC97, PCI, PCI VGA card & framebuffer console, + IDE controller, PS2 keyboard, PS2 mouse, etc. + config DDB5477 bool "NEC DDB Vrc-5477" select DDB5XXX_COMMON @@ -540,7 +522,6 @@ config PMC_YOSEMITE select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_HIGHMEM - select SYS_SUPPORTS_SMP help Yosemite is an evaluation board for the RM9000x2 processor manufactured by PMC-Sierra. @@ -557,7 +538,6 @@ config QEMU select SYS_HAS_CPU_MIPS32_R1 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select ARCH_SPARSEMEM_ENABLE help Qemu is a software emulator which among other architectures also can simulate a MIPS32 4Kc system. This patch adds support for the @@ -566,20 +546,6 @@ config QEMU simulate actual MIPS hardware platforms. More information on Qemu can be found at http://www.linux-mips.org/wiki/Qemu. -config MARKEINS - bool "Support for NEC EMMA2RH Mark-eins" - select DMA_NONCOHERENT - select HW_HAS_PCI - select IRQ_CPU - select SWAP_IO_SPACE - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_HAS_CPU_R5000 - help - This enables support for the R5432-based NEC Mark-eins - boards with R5500 CPU. - config SGI_IP22 bool "SGI IP22 (Indy/Indigo2)" select ARC @@ -589,7 +555,6 @@ config SGI_IP22 select HW_HAS_EISA select IP22_CPU_SCACHE select IRQ_CPU - select NO_ISA if ISA select SWAP_IO_SPACE select SYS_HAS_CPU_R4X00 select SYS_HAS_CPU_R5000 @@ -607,13 +572,11 @@ config SGI_IP27 select ARC64 select BOOT_ELF64 select DMA_IP27 - select EARLY_PRINTK select HW_HAS_PCI select PCI_DOMAINS select SYS_HAS_CPU_R10000 select SYS_SUPPORTS_64BIT_KERNEL select SYS_SUPPORTS_BIG_ENDIAN - select SYS_SUPPORTS_NUMA help This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics workstations. To compile a Linux kernel that runs on these, say Y @@ -744,8 +707,8 @@ config SIBYTE_CRHONE config SNI_RM200_PCI bool "SNI RM200 PCI" - select ARC if CPU_LITTLE_ENDIAN - select ARC32 if CPU_LITTLE_ENDIAN + select ARC + select ARC32 select ARCH_MAY_HAVE_PC_FDC select BOOT_ELF32 select DMA_NONCOHERENT @@ -756,13 +719,10 @@ config SNI_RM200_PCI select I8253 select I8259 select ISA - select SWAP_IO_SPACE if CPU_BIG_ENDIAN select SYS_HAS_CPU_R4X00 - select SYS_HAS_CPU_R5000 - select R5000_CPU_SCACHE select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL - select SYS_SUPPORTS_BIG_ENDIAN + select SYS_SUPPORTS_BIG_ENDIAN if EXPERIMENTAL select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_LITTLE_ENDIAN help @@ -1019,11 +979,6 @@ config SOC_PNX8550 config SWAP_IO_SPACE bool -config EMMA2RH - bool - depends on MARKEINS - default y - # # Unfortunately not all GT64120 systems run the chip at the same clock. # As the user for the clock rate and try to minimize the available options. @@ -1256,7 +1211,7 @@ config CPU_R6000 select CPU_SUPPORTS_32BIT_KERNEL help MIPS Technologies R6000 and R6000A series processors. Note these - processors are extremely rare and the support for them is incomplete. + processors are extremly rare and the support for them is incomplete. config CPU_NEVADA bool "RM52xx" @@ -1377,7 +1332,7 @@ config SYS_HAS_CPU_SB1 endmenu # -# These two indicate any level of the MIPS32 and MIPS64 architecture +# These two indicate any levelof the MIPS32 and MIPS64 architecture # config CPU_MIPS32 bool @@ -1388,7 +1343,7 @@ config CPU_MIPS64 default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 # -# These two indicate the revision of the architecture, either Release 1 or Release 2 +# These two indicate the revision of the architecture, either 32 bot 64 bit. # config CPU_MIPSR1 bool @@ -1481,13 +1436,6 @@ config IP22_CPU_SCACHE bool select BOARD_SCACHE -# -# Support for a MIPS32 / MIPS64 style S-caches -# -config MIPS_CPU_SCACHE - bool - select BOARD_SCACHE - config R5000_CPU_SCACHE bool select BOARD_SCACHE @@ -1507,57 +1455,32 @@ config SIBYTE_DMA_PAGEOPS config CPU_HAS_PREFETCH bool +config MIPS_MT + bool "Enable MIPS MT" + choice prompt "MIPS MT options" - -config MIPS_MT_DISABLED - bool "Disable multithreading support." - help - Use this option if your workload can't take advantage of - MIPS hardware multithreading support. On systems that don't have - the option of an MT-enabled processor this option will be the only - option in this menu. + depends on MIPS_MT config MIPS_MT_SMTC bool "SMTC: Use all TCs on all VPEs for SMP" - depends on CPU_MIPS32_R2 - #depends on CPU_MIPS64_R2 # once there is hardware ... - depends on SYS_SUPPORTS_MULTITHREADING select CPU_MIPSR2_IRQ_VI select CPU_MIPSR2_SRS - select MIPS_MT select SMP - help - This is a kernel model which is known a SMTC or lately has been - marketesed into SMVP. config MIPS_MT_SMP bool "Use 1 TC on each available VPE for SMP" - depends on SYS_SUPPORTS_MULTITHREADING - select CPU_MIPSR2_IRQ_VI - select CPU_MIPSR2_SRS - select MIPS_MT select SMP - help - This is a kernel model which is also known a VSMP or lately - has been marketesed into SMVP. config MIPS_VPE_LOADER bool "VPE loader support." - depends on SYS_SUPPORTS_MULTITHREADING - select MIPS_MT + depends on MIPS_MT help Includes a loader for loading an elf relocatable object onto another VPE and running it. endchoice -config MIPS_MT - bool - -config SYS_SUPPORTS_MULTITHREADING - bool - config MIPS_MT_FPAFF bool "Dynamic FPU affinity for FP-intensive threads" depends on MIPS_MT @@ -1614,23 +1537,32 @@ config CPU_HAS_LLSC config CPU_HAS_WB bool -# -# Vectored interrupt mode is an R2 feature -# config CPU_MIPSR2_IRQ_VI - bool + bool "Vectored interrupt mode" + depends on CPU_MIPSR2 + help + Vectored interrupt mode allowing faster dispatching of interrupts. + The board support code needs to be written to take advantage of this + mode. Compatibility code is included to allow the kernel to run on + a CPU that does not support vectored interrupts. It's safe to + say Y here. -# -# Extended interrupt mode is an R2 feature -# config CPU_MIPSR2_IRQ_EI - bool + bool "External interrupt controller mode" + depends on CPU_MIPSR2 + help + Extended interrupt mode takes advantage of an external interrupt + controller to allow fast dispatching from many possible interrupt + sources. Say N unless you know that external interrupt support is + required. -# -# Shadow registers are an R2 feature -# config CPU_MIPSR2_SRS - bool + bool "Make shadow set registers available for interrupt handlers" + depends on CPU_MIPSR2_IRQ_VI || CPU_MIPSR2_IRQ_EI + help + Allow the kernel to use shadow register sets for fast interrupts. + Interrupt handlers must be specially written to use shadow sets. + Say N unless you know that shadow register set upport is needed. config CPU_HAS_SYNC bool @@ -1648,11 +1580,6 @@ config GENERIC_IRQ_PROBE bool default y -config IRQ_PER_CPU - depends on SMP - bool - default y - # # - Highmem only makes sense for the 32-bit kernel. # - The current highmem code will only work properly on physically indexed @@ -1680,35 +1607,6 @@ config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA -config ARCH_DISCONTIGMEM_ENABLE - bool - default y if SGI_IP27 - help - Say Y to upport efficient handling of discontiguous physical memory, - for architectures which are either NUMA (Non-Uniform Memory Access) - or have huge holes in the physical address space for other reasons. - See for more. - -config ARCH_SPARSEMEM_ENABLE - bool - -config ARCH_SPARSEMEM_ENABLE - bool - select SPARSEMEM_STATIC - -config NUMA - bool "NUMA Support" - depends on SYS_SUPPORTS_NUMA - help - Say Y to compile the kernel to support NUMA (Non-Uniform Memory - Access). This option improves performance on systems with more - than two nodes; on two node systems it is generally better to - leave it disabled; on single node systems disable this option - disabled. - -config SYS_SUPPORTS_NUMA - bool - config NODES_SHIFT int default "6" @@ -1718,8 +1616,8 @@ source "mm/Kconfig" config SMP bool "Multi-Processing support" - depends on SYS_SUPPORTS_SMP - help + depends on CPU_RM9000 || ((SIBYTE_BCM1x80 || SIBYTE_BCM1x55 || SIBYTE_SB1250 || QEMU) && !SIBYTE_STANDALONE) || SGI_IP27 || MIPS_MT_SMP || MIPS_MT_SMTC + ---help--- This enables support for systems with more than one CPU. If you have a system with only one CPU, like most personal computers, say N. If you have a system with more than one CPU, say Y. @@ -1738,9 +1636,6 @@ config SMP If you don't know what to do here, say N. -config SYS_SUPPORTS_SMP - bool - config NR_CPUS int "Maximum number of CPUs (2-64)" range 2 64 @@ -1756,77 +1651,6 @@ config NR_CPUS This is purely to save memory - each supported CPU adds approximately eight kilobytes to the kernel image. -# -# Timer Interrupt Frequency Configuration -# - -choice - prompt "Timer frequency" - default HZ_250 - help - Allows the configuration of the timer frequency. - - config HZ_48 - bool "48 HZ" if SYS_SUPPORTS_48HZ - - config HZ_100 - bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ - - config HZ_128 - bool "128 HZ" if SYS_SUPPORTS_128HZ || SYS_SUPPORTS_ARBIT_HZ - - config HZ_250 - bool "250 HZ" if SYS_SUPPORTS_250HZ || SYS_SUPPORTS_ARBIT_HZ - - config HZ_256 - bool "256 HZ" if SYS_SUPPORTS_256HZ || SYS_SUPPORTS_ARBIT_HZ - - config HZ_1000 - bool "1000 HZ" if SYS_SUPPORTS_1000HZ || SYS_SUPPORTS_ARBIT_HZ - - config HZ_1024 - bool "1024 HZ" if SYS_SUPPORTS_1024HZ || SYS_SUPPORTS_ARBIT_HZ - -endchoice - -config SYS_SUPPORTS_48HZ - bool - -config SYS_SUPPORTS_100HZ - bool - -config SYS_SUPPORTS_128HZ - bool - -config SYS_SUPPORTS_250HZ - bool - -config SYS_SUPPORTS_256HZ - bool - -config SYS_SUPPORTS_1000HZ - bool - -config SYS_SUPPORTS_1024HZ - bool - -config SYS_SUPPORTS_ARBIT_HZ - bool - default y if !SYS_SUPPORTS_48HZ && !SYS_SUPPORTS_100HZ && \ - !SYS_SUPPORTS_128HZ && !SYS_SUPPORTS_250HZ && \ - !SYS_SUPPORTS_256HZ && !SYS_SUPPORTS_1000HZ && \ - !SYS_SUPPORTS_1024HZ - -config HZ - int - default 48 if HZ_48 - default 100 if HZ_100 - default 128 if HZ_128 - default 250 if HZ_250 - default 256 if HZ_256 - default 1000 if HZ_1000 - default 1024 if HZ_1024 - source "kernel/Kconfig.preempt" config RTC_DS1742 @@ -1886,9 +1710,6 @@ source "drivers/pci/Kconfig" config ISA bool -config NO_ISA - bool - config EISA bool "EISA support" depends on HW_HAS_EISA @@ -2019,32 +1840,6 @@ config PM bool "Power Management support (EXPERIMENTAL)" depends on EXPERIMENTAL && SOC_AU1X00 -config APM - tristate "Advanced Power Management Emulation" - depends on PM - ---help--- - APM is a BIOS specification for saving power using several different - techniques. This is mostly useful for battery powered systems with - APM compliant BIOSes. If you say Y here, the system time will be - reset after a RESUME operation, the /proc/apm device will provide - battery status information, and user-space programs will receive - notification of APM "events" (e.g. battery status change). - - In order to use APM, you will need supporting software. For location - and more information, read and the - Battery Powered Linux mini-HOWTO, available from - . - - This driver does not spin down disk drives (see the hdparm(8) - manpage ("man 8 hdparm") for that), and it doesn't turn off - VESA-compliant "green" monitors. - - Generally, if you don't have a battery in your machine, there isn't - much point in using this driver and you should say N. If you get - random kernel OOPSes or reboots that don't seem to be related to - anything, try disabling/enabling this option (or disabling/enabling - APM in your BIOS). - endmenu source "net/Kconfig" diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index 5d6afb52d..515f9e611 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -1,9 +1,5 @@ menu "Kernel hacking" -config TRACE_IRQFLAGS_SUPPORT - bool - default y - source "lib/Kconfig.debug" config CROSSCOMPILE diff --git a/arch/mips/Makefile b/arch/mips/Makefile index d333ce4ba..133900aca 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -83,8 +83,6 @@ cflags-y += -msoft-float LDFLAGS_vmlinux += -G 0 -static -n -nostdlib MODFLAGS += -mlong-calls -cflags-y += -ffreestanding - # # We explicitly add the endianness specifier if needed, this allows # to compile kernels with a toolchain for the other endianness. We @@ -286,13 +284,6 @@ core-$(CONFIG_MIPS_EV96100) += arch/mips/galileo-boards/ev96100/ cflags-$(CONFIG_MIPS_EV96100) += -Iinclude/asm-mips/mach-ev96100 load-$(CONFIG_MIPS_EV96100) += 0xffffffff80100000 -# -# Wind River PPMC Board (4KC + GT64120) -# -core-$(CONFIG_WR_PPMC) += arch/mips/gt64120/wrppmc/ -cflags-$(CONFIG_WR_PPMC) += -Iinclude/asm-mips/mach-wrppmc -load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 - # # Globespan IVR eval board with QED 5231 CPU # @@ -374,7 +365,6 @@ core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/ cflags-$(CONFIG_PMC_YOSEMITE) += -Iinclude/asm-mips/mach-yosemite load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 -# # Qemu simulating MIPS32 4Kc # core-$(CONFIG_QEMU) += arch/mips/qemu/ @@ -388,13 +378,6 @@ core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/ cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3 load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000 -# -# Basler eXcite -# -core-$(CONFIG_BASLER_EXCITE) += arch/mips/basler/excite/ -cflags-$(CONFIG_BASLER_EXCITE) += -Iinclude/asm-mips/mach-excite -load-$(CONFIG_BASLER_EXCITE) += 0x80100000 - # # Momentum Jaguar ATX # @@ -411,6 +394,18 @@ load-$(CONFIG_MOMENCO_JAGUAR_ATX) += 0xffffffff80100000 # core-$(CONFIG_DDB5XXX_COMMON) += arch/mips/ddb5xxx/common/ +# +# NEC DDB Vrc-5074 +# +core-$(CONFIG_DDB5074) += arch/mips/ddb5xxx/ddb5074/ +load-$(CONFIG_DDB5074) += 0xffffffff80080000 + +# +# NEC DDB Vrc-5476 +# +core-$(CONFIG_DDB5476) += arch/mips/ddb5xxx/ddb5476/ +load-$(CONFIG_DDB5476) += 0xffffffff80080000 + # # NEC DDB Vrc-5477 # @@ -473,15 +468,6 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/ #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 -# NEC EMMA2RH boards -# -core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ -cflags-$(CONFIG_EMMA2RH) += -Iinclude/asm-mips/mach-emma2rh - -# NEC EMMA2RH Mark-eins -core-$(CONFIG_MARKEINS) += arch/mips/emma2rh/markeins/ -load-$(CONFIG_MARKEINS) += 0xffffffff88100000 - # # SGI IP22 (Indy/Indigo2) # @@ -712,14 +698,16 @@ endif vmlinux.bin: $(vmlinux-32) +@$(call makeboot,$@) -vmlinux.ecoff: $(vmlinux-32) +vmlinux.ecoff vmlinux.rm200: $(vmlinux-32) +@$(call makeboot,$@) vmlinux.srec: $(vmlinux-32) +@$(call makeboot,$@) CLEAN_FILES += vmlinux.ecoff \ - vmlinux.srec + vmlinux.srec \ + vmlinux.rm200.tmp \ + vmlinux.rm200 archclean: @$(MAKE) $(clean)=arch/mips/boot diff --git a/arch/mips/arc/identify.c b/arch/mips/arc/identify.c index 3ba7c47f9..1bd6199e1 100644 --- a/arch/mips/arc/identify.c +++ b/arch/mips/arc/identify.c @@ -11,6 +11,7 @@ * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) */ +#include #include #include #include diff --git a/arch/mips/au1000/common/au1xxx_irqmap.c b/arch/mips/au1000/common/au1xxx_irqmap.c index 7acfe9bf5..0b2c03c52 100644 --- a/arch/mips/au1000/common/au1xxx_irqmap.c +++ b/arch/mips/au1000/common/au1xxx_irqmap.c @@ -25,6 +25,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -54,7 +55,7 @@ * Careful if you change match 2 request! * The interrupt handler is called directly from the low level dispatch code. */ -au1xxx_irq_map_t __initdata au1xxx_ic0_map[] = { +au1xxx_irq_map_t au1xxx_ic0_map[] = { #if defined(CONFIG_SOC_AU1000) { AU1000_UART0_INT, INTC_INT_HIGH_LEVEL, 0}, @@ -219,5 +220,5 @@ au1xxx_irq_map_t __initdata au1xxx_ic0_map[] = { }; -int __initdata au1xxx_ic0_nr_irqs = ARRAY_SIZE(au1xxx_ic0_map); +int au1xxx_ic0_nr_irqs = sizeof(au1xxx_ic0_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index 98244d51c..6ee090bd8 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c @@ -30,6 +30,7 @@ * */ +#include #include #include #include @@ -289,7 +290,7 @@ au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, /* If kmalloc fails, it is caught below same * as a channel not available. */ - ctp = kmalloc(sizeof(chan_tab_t), GFP_ATOMIC); + ctp = kmalloc(sizeof(chan_tab_t), GFP_KERNEL); chan_tab_ptr[i] = ctp; break; } @@ -729,8 +730,6 @@ au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes) return rv; } -EXPORT_SYMBOL_GPL(au1xxx_dbdma_get_dest); - void au1xxx_dbdma_stop(u32 chanid) { @@ -822,8 +821,6 @@ au1xxx_get_dma_residue(u32 chanid) return rv; } -EXPORT_SYMBOL_GPL(au1xxx_get_dma_residue); - void au1xxx_dbdma_chan_free(u32 chanid) { @@ -892,7 +889,7 @@ static void au1xxx_dbdma_init(void) #error Unknown Au1x00 SOC #endif - if (request_irq(irq_nr, dbdma_interrupt, IRQF_DISABLED, + if (request_irq(irq_nr, dbdma_interrupt, SA_INTERRUPT, "Au1xxx dbdma", (void *)dbdma_gptr)) printk("Can't get 1550 dbdma irq"); } diff --git a/arch/mips/au1000/common/dbg_io.c b/arch/mips/au1000/common/dbg_io.c index 0a50af7f3..7bc768e55 100644 --- a/arch/mips/au1000/common/dbg_io.c +++ b/arch/mips/au1000/common/dbg_io.c @@ -1,4 +1,5 @@ +#include #include #include diff --git a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c index fb7c47c15..1d82f2277 100644 --- a/arch/mips/au1000/common/dma.c +++ b/arch/mips/au1000/common/dma.c @@ -30,6 +30,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ +#include #include #include #include diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c index ce55297dc..5f5915b83 100644 --- a/arch/mips/au1000/common/gpio.c +++ b/arch/mips/au1000/common/gpio.c @@ -19,6 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c index 316722ee8..afe05ec12 100644 --- a/arch/mips/au1000/common/irq.c +++ b/arch/mips/au1000/common/irq.c @@ -26,6 +26,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -251,7 +252,7 @@ void restore_local_and_enable(int controller, unsigned long mask) } -static struct irq_chip rise_edge_irq_type = { +static struct hw_interrupt_type rise_edge_irq_type = { .typename = "Au1000 Rise Edge", .startup = startup_irq, .shutdown = shutdown_irq, @@ -261,7 +262,7 @@ static struct irq_chip rise_edge_irq_type = { .end = end_irq, }; -static struct irq_chip fall_edge_irq_type = { +static struct hw_interrupt_type fall_edge_irq_type = { .typename = "Au1000 Fall Edge", .startup = startup_irq, .shutdown = shutdown_irq, @@ -271,7 +272,7 @@ static struct irq_chip fall_edge_irq_type = { .end = end_irq, }; -static struct irq_chip either_edge_irq_type = { +static struct hw_interrupt_type either_edge_irq_type = { .typename = "Au1000 Rise or Fall Edge", .startup = startup_irq, .shutdown = shutdown_irq, @@ -281,7 +282,7 @@ static struct irq_chip either_edge_irq_type = { .end = end_irq, }; -static struct irq_chip level_irq_type = { +static struct hw_interrupt_type level_irq_type = { .typename = "Au1000 Level", .startup = startup_irq, .shutdown = shutdown_irq, @@ -309,7 +310,7 @@ void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_reg * can avoid it. --cgray */ action.dev_id = handler; - action.flags = IRQF_DISABLED; + action.flags = SA_INTERRUPT; cpus_clear(action.mask); action.name = "Au1xxx TOY"; action.handler = handler; @@ -332,31 +333,31 @@ static void setup_local_irq(unsigned int irq_nr, int type, int int_req) au_writel(1<<(irq_nr-32), IC1_CFG2CLR); au_writel(1<<(irq_nr-32), IC1_CFG1CLR); au_writel(1<<(irq_nr-32), IC1_CFG0SET); - irq_desc[irq_nr].chip = &rise_edge_irq_type; + irq_desc[irq_nr].handler = &rise_edge_irq_type; break; case INTC_INT_FALL_EDGE: /* 0:1:0 */ au_writel(1<<(irq_nr-32), IC1_CFG2CLR); au_writel(1<<(irq_nr-32), IC1_CFG1SET); au_writel(1<<(irq_nr-32), IC1_CFG0CLR); - irq_desc[irq_nr].chip = &fall_edge_irq_type; + irq_desc[irq_nr].handler = &fall_edge_irq_type; break; case INTC_INT_RISE_AND_FALL_EDGE: /* 0:1:1 */ au_writel(1<<(irq_nr-32), IC1_CFG2CLR); au_writel(1<<(irq_nr-32), IC1_CFG1SET); au_writel(1<<(irq_nr-32), IC1_CFG0SET); - irq_desc[irq_nr].chip = &either_edge_irq_type; + irq_desc[irq_nr].handler = &either_edge_irq_type; break; case INTC_INT_HIGH_LEVEL: /* 1:0:1 */ au_writel(1<<(irq_nr-32), IC1_CFG2SET); au_writel(1<<(irq_nr-32), IC1_CFG1CLR); au_writel(1<<(irq_nr-32), IC1_CFG0SET); - irq_desc[irq_nr].chip = &level_irq_type; + irq_desc[irq_nr].handler = &level_irq_type; break; case INTC_INT_LOW_LEVEL: /* 1:1:0 */ au_writel(1<<(irq_nr-32), IC1_CFG2SET); au_writel(1<<(irq_nr-32), IC1_CFG1SET); au_writel(1<<(irq_nr-32), IC1_CFG0CLR); - irq_desc[irq_nr].chip = &level_irq_type; + irq_desc[irq_nr].handler = &level_irq_type; break; case INTC_INT_DISABLED: /* 0:0:0 */ au_writel(1<<(irq_nr-32), IC1_CFG0CLR); @@ -384,31 +385,31 @@ static void setup_local_irq(unsigned int irq_nr, int type, int int_req) au_writel(1< #include #include #include @@ -39,17 +40,17 @@ /* TBD */ static struct resource pci_io_resource = { - .start = PCI_IO_START, - .end = PCI_IO_END, - .name = "PCI IO space", - .flags = IORESOURCE_IO + "pci IO space", + (u32)PCI_IO_START, + (u32)PCI_IO_END, + IORESOURCE_IO }; static struct resource pci_mem_resource = { - .start = PCI_MEM_START, - .end = PCI_MEM_END, - .name = "PCI memory space", - .flags = IORESOURCE_MEM + "pci memory space", + (u32)PCI_MEM_START, + (u32)PCI_MEM_END, + IORESOURCE_MEM }; extern struct pci_ops au1x_pci_ops; diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c index 8fd203d4a..32702e5fb 100644 --- a/arch/mips/au1000/common/platform.c +++ b/arch/mips/au1000/common/platform.c @@ -7,6 +7,7 @@ * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ +#include #include #include #include diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index 7504a6364..f4926315f 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c @@ -29,6 +29,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -79,17 +80,17 @@ static DEFINE_SPINLOCK(pm_lock); * We only have to save/restore registers that aren't otherwise * done as part of a driver pm_* function. */ -static unsigned int sleep_aux_pll_cntrl; -static unsigned int sleep_cpu_pll_cntrl; -static unsigned int sleep_pin_function; -static unsigned int sleep_uart0_inten; -static unsigned int sleep_uart0_fifoctl; -static unsigned int sleep_uart0_linectl; -static unsigned int sleep_uart0_clkdiv; -static unsigned int sleep_uart0_enable; -static unsigned int sleep_usbhost_enable; -static unsigned int sleep_usbdev_enable; -static unsigned int sleep_static_memctlr[4][3]; +static uint sleep_aux_pll_cntrl; +static uint sleep_cpu_pll_cntrl; +static uint sleep_pin_function; +static uint sleep_uart0_inten; +static uint sleep_uart0_fifoctl; +static uint sleep_uart0_linectl; +static uint sleep_uart0_clkdiv; +static uint sleep_uart0_enable; +static uint sleep_usbhost_enable; +static uint sleep_usbdev_enable; +static uint sleep_static_memctlr[4][3]; /* Define this to cause the value you write to /proc/sys/pm/sleep to * set the TOY timer for the amount of time you want to sleep. diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c index b4b010a2f..ae7d8c57b 100644 --- a/arch/mips/au1000/common/prom.c +++ b/arch/mips/au1000/common/prom.c @@ -1,7 +1,7 @@ /* * * BRIEF MODULE DESCRIPTION - * PROM library initialisation code, supports YAMON and U-Boot. + * PROM library initialisation code, assuming YAMON is the boot loader. * * Copyright 2000, 2001, 2006 MontaVista Software Inc. * Author: MontaVista Software, Inc. @@ -46,6 +46,12 @@ extern int prom_argc; extern char **prom_argv, **prom_envp; +typedef struct +{ + char *name; + char *val; +} t_env_var; + char * prom_getcmdline(void) { @@ -78,21 +84,13 @@ char *prom_getenv(char *envname) { /* * Return a pointer to the given environment variable. - * YAMON uses "name", "value" pairs, while U-Boot uses "name=value". */ - char **env = prom_envp; - int i = strlen(envname); - int yamon = (*env && strchr(*env, '=') == NULL); - - while (*env) { - if (yamon) { - if (strcmp(envname, *env++) == 0) - return *env; - } else { - if (strncmp(envname, *env, i) == 0 && (*env)[i] == '=') - return *env + i + 1; - } + t_env_var *env = (t_env_var *)prom_envp; + + while (env->name) { + if (strcmp(envname, env->name) == 0) + return env->val; env++; } return NULL; diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c index de5447e83..c93af224c 100644 --- a/arch/mips/au1000/common/reset.c +++ b/arch/mips/au1000/common/reset.c @@ -27,6 +27,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index 377ae0d8f..307e98c29 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c @@ -25,6 +25,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -48,12 +49,17 @@ extern void __init board_setup(void); extern void au1000_restart(char *); extern void au1000_halt(void); extern void au1000_power_off(void); +extern struct resource ioport_resource; +extern struct resource iomem_resource; +extern void (*board_time_init)(void); extern void au1x_time_init(void); +extern void (*board_timer_setup)(struct irqaction *irq); extern void au1x_timer_setup(struct irqaction *irq); extern void au1xxx_time_init(void); +extern void au1xxx_timer_setup(struct irqaction *irq); extern void set_cpuspec(void); -void __init plat_mem_setup(void) +void __init plat_setup(void) { struct cpu_spec *sp; char *argptr; @@ -122,6 +128,7 @@ void __init plat_mem_setup(void) _machine_halt = au1000_halt; pm_power_off = au1000_power_off; board_time_init = au1xxx_time_init; + board_timer_setup = au1xxx_timer_setup; /* IO/MEM resources. */ set_io_port_base(0); diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index 7fbea1bf7..f74d66a58 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c @@ -33,6 +33,7 @@ */ #include +#include #include #include #include @@ -49,6 +50,10 @@ #include #include +extern void do_softirq(void); +extern volatile unsigned long wall_jiffies; +unsigned long missed_heart_beats = 0; + static unsigned long r4k_offset; /* Amount to increment compare reg each time */ static unsigned long r4k_cur; /* What counter should be at next timer irq */ int no_au1xxx_32khz; @@ -383,9 +388,10 @@ static unsigned long do_fast_pm_gettimeoffset(void) } #endif -void __init plat_timer_setup(struct irqaction *irq) +void au1xxx_timer_setup(struct irqaction *irq) { - unsigned int est_freq; + unsigned int est_freq; + extern unsigned long (*do_gettimeoffset)(void); printk("calculating r4koff... "); r4k_offset = cal_r4koff(); diff --git a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c index 63bcb3a95..2cab76297 100644 --- a/arch/mips/au1000/common/usbdev.c +++ b/arch/mips/au1000/common/usbdev.c @@ -1465,14 +1465,14 @@ usbdev_init(struct usb_device_descriptor* dev_desc, */ /* request the USB device transfer complete interrupt */ - if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, IRQF_DISABLED, + if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, SA_INTERRUPT, "USBdev req", &usbdev)) { err("Can't get device request intr"); ret = -ENXIO; goto out; } /* request the USB device suspend interrupt */ - if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, IRQF_DISABLED, + if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, SA_INTERRUPT, "USBdev sus", &usbdev)) { err("Can't get device suspend intr"); ret = -ENXIO; @@ -1483,7 +1483,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc, if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id, ep_dma_id[0].str, dma_done_ep0_intr, - IRQF_DISABLED, + SA_INTERRUPT, &usbdev)) < 0) { err("Can't get %s DMA", ep_dma_id[0].str); ret = -ENXIO; @@ -1516,7 +1516,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc, request_au1000_dma(ep_dma_id[ep->address].id, ep_dma_id[ep->address].str, dma_done_ep_intr, - IRQF_DISABLED, + SA_INTERRUPT, &usbdev); if (ep->indma < 0) { err("Can't get %s DMA", diff --git a/arch/mips/au1000/csb250/Makefile b/arch/mips/au1000/csb250/Makefile new file mode 100644 index 000000000..c0c4dcdcc --- /dev/null +++ b/arch/mips/au1000/csb250/Makefile @@ -0,0 +1,8 @@ +# +# Copyright 2002 Cogent Computer Systems +# dan@embeddededge.com +# +# Makefile for the Cogent CSB250 Au1500 board. Copied from Pb1500. +# + +obj-y := init.o board_setup.o irqmap.o diff --git a/arch/mips/au1000/csb250/board_setup.c b/arch/mips/au1000/csb250/board_setup.c new file mode 100644 index 000000000..1c55c5f59 --- /dev/null +++ b/arch/mips/au1000/csb250/board_setup.c @@ -0,0 +1,239 @@ +/* + * + * BRIEF MODULE DESCRIPTION + * Cogent CSB250 board setup. + * + * Copyright 2002 Cogent Computer Systems, Inc. + * dan@embeddededge.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern int (*board_pci_idsel)(unsigned int devsel, int assert); +int csb250_pci_idsel(unsigned int devsel, int assert); + +void __init board_setup(void) +{ + u32 pin_func, pin_val; + u32 sys_freqctrl, sys_clksrc; + + + // set AUX clock to 12MHz * 8 = 96 MHz + au_writel(8, SYS_AUXPLL); + au_writel(0, SYS_PINSTATERD); + udelay(100); + +#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) + + /* GPIO201 is input for PCMCIA card detect */ + /* GPIO203 is input for PCMCIA interrupt request */ + au_writel(au_readl(GPIO2_DIR) & (u32)(~((1<<1)|(1<<3))), GPIO2_DIR); + + /* zero and disable FREQ2 */ + sys_freqctrl = au_readl(SYS_FREQCTRL0); + sys_freqctrl &= ~0xFFF00000; + au_writel(sys_freqctrl, SYS_FREQCTRL0); + + /* zero and disable USBH/USBD clocks */ + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x00007FE0; + au_writel(sys_clksrc, SYS_CLKSRC); + + sys_freqctrl = au_readl(SYS_FREQCTRL0); + sys_freqctrl &= ~0xFFF00000; + + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x00007FE0; + + // FREQ2 = aux/2 = 48 MHz + sys_freqctrl |= ((0<<22) | (1<<21) | (1<<20)); + au_writel(sys_freqctrl, SYS_FREQCTRL0); + + /* + * Route 48MHz FREQ2 into USB Host and/or Device + */ +#ifdef CONFIG_USB_OHCI + sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); +#endif +#ifdef CONFIG_AU1X00_USB_DEVICE + sys_clksrc |= ((4<<7) | (0<<6) | (0<<5)); +#endif + au_writel(sys_clksrc, SYS_CLKSRC); + + + pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); +#ifndef CONFIG_AU1X00_USB_DEVICE + // 2nd USB port is USB host + pin_func |= 0x8000; +#endif + au_writel(pin_func, SYS_PINFUNC); +#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) + + /* Configure GPIO2....it's used by PCI among other things. + */ + + /* Make everything but GP200 (PCI RST) an input until we get + * the pins set correctly. + */ + au_writel(0x00000001, GPIO2_DIR); + + /* Set the pins used for output. + * A zero bit will leave PCI reset, LEDs off, power up USB, + * IDSEL disabled. + */ + pin_val = ((3 << 30) | (7 << 19) | (1 << 17) | (1 << 16)); + au_writel(pin_val, GPIO2_OUTPUT); + + /* Set the output direction. + */ + pin_val = ((3 << 14) | (7 << 3) | (1 << 1) | (1 << 0)); + au_writel(pin_val, GPIO2_DIR); + +#ifdef CONFIG_PCI + /* Use FREQ1 for the PCI output clock. We use the + * CPU clock of 384 MHz divided by 12 to get 32 MHz PCI. + * If Michael changes the CPU speed, we need to adjust + * that here as well :-). + */ + + /* zero and disable FREQ1 + */ + sys_freqctrl = au_readl(SYS_FREQCTRL0); + sys_freqctrl &= ~0x000ffc00; + au_writel(sys_freqctrl, SYS_FREQCTRL0); + + /* zero and disable PCI clock + */ + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x000f8000; + au_writel(sys_clksrc, SYS_CLKSRC); + + /* Get current values (which really should match above). + */ + sys_freqctrl = au_readl(SYS_FREQCTRL0); + sys_freqctrl &= ~0x000ffc00; + + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x000f8000; + + /* FREQ1 = cpu/12 = 32 MHz + */ + sys_freqctrl |= ((5<<12) | (1<<11) | (0<<10)); + au_writel(sys_freqctrl, SYS_FREQCTRL0); + + /* Just connect the clock without further dividing. + */ + sys_clksrc |= ((3<<17) | (0<<16) | (0<<15)); + au_writel(sys_clksrc, SYS_CLKSRC); + + udelay(1); + + /* Now that clocks should be running, take PCI out of reset. + */ + pin_val = au_readl(GPIO2_OUTPUT); + pin_val |= ((1 << 16) | 1); + au_writel(pin_val, GPIO2_OUTPUT); + + // Setup PCI bus controller + au_writel(0, Au1500_PCI_CMEM); + au_writel(0x00003fff, Au1500_CFG_BASE); + + /* We run big endian without any of the software byte swapping, + * so configure the PCI bridge to help us out. + */ + au_writel(0xf | (2<<6) | (1<<5) | (1<<4), Au1500_PCI_CFG); + + au_writel(0xf0000000, Au1500_PCI_MWMASK_DEV); + au_writel(0, Au1500_PCI_MWBASE_REV_CCL); + au_writel(0x02a00356, Au1500_PCI_STATCMD); + au_writel(0x00003c04, Au1500_PCI_HDRTYPE); + au_writel(0x00000008, Au1500_PCI_MBAR); + au_sync(); + + board_pci_idsel = csb250_pci_idsel; +#endif + + /* Enable sys bus clock divider when IDLE state or no bus activity. */ + au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); + +#ifdef CONFIG_RTC + // Enable the RTC if not already enabled + if (!(au_readl(0xac000028) & 0x20)) { + printk("enabling clock ...\n"); + au_writel((au_readl(0xac000028) | 0x20), 0xac000028); + } + // Put the clock in BCD mode + if (readl(0xac00002C) & 0x4) { /* reg B */ + au_writel(au_readl(0xac00002c) & ~0x4, 0xac00002c); + au_sync(); + } +#endif +} + +/* The IDSEL is selected in the GPIO2 register. We will make device + * 12 appear in slot 0 and device 13 appear in slot 1. + */ +int +csb250_pci_idsel(unsigned int devsel, int assert) +{ + int retval; + unsigned int gpio2_pins; + + retval = 1; + + /* First, disable both selects, then assert the one requested. + */ + au_writel(0xc000c000, GPIO2_OUTPUT); + au_sync(); + + if (assert) { + if (devsel == 12) + gpio2_pins = 0x40000000; + else if (devsel == 13) + gpio2_pins = 0x80000000; + else { + gpio2_pins = 0xc000c000; + retval = 0; + } + au_writel(gpio2_pins, GPIO2_OUTPUT); + } + au_sync(); + + return retval; +} diff --git a/arch/mips/au1000/csb250/init.c b/arch/mips/au1000/csb250/init.c new file mode 100644 index 000000000..a4898b1bc --- /dev/null +++ b/arch/mips/au1000/csb250/init.c @@ -0,0 +1,94 @@ +/* + * + * BRIEF MODULE DESCRIPTION + * Cogent CSB250 board setup + * + * Copyright 2002 Cogent Computer Systems, Inc. + * dan@embeddededge.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +int prom_argc; +char **prom_argv, **prom_envp; +extern void __init prom_init_cmdline(void); +extern char *prom_getenv(char *envname); + +/* When we get initrd working someday......... +*/ +int my_initrd_start, my_initrd_size; + +/* Start arguments and environment. +*/ +static char *csb_env[2]; +static char *csb_arg[4]; +static char *arg1 = "console=ttyS3,38400"; +static char *arg2 = "root=/dev/nfs rw ip=any"; +static char *env1 = "ethaddr=00:30:23:50:00:00"; + +const char *get_system_type(void) +{ + return "Cogent CSB250"; +} + +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) +{ + unsigned char *memsize_str; + unsigned long memsize; + + /* We use a0 and a1 to pass initrd start and size. + */ + if (((uint) argc > 0) && ((uint)argv > 0)) { + my_initrd_start = (uint)argc; + my_initrd_size = (uint)argv; + } + + /* First argv is ignored. + */ + prom_argc = 3; + prom_argv = csb_arg; + prom_envp = csb_env; + csb_arg[1] = arg1; + csb_arg[2] = arg2; + csb_env[0] = env1; + + mips_machgroup = MACH_GROUP_ALCHEMY; + mips_machtype = MACH_CSB250; + + prom_init_cmdline(); + memsize_str = prom_getenv("memsize"); + if (!memsize_str) { + memsize = 0x02000000; + } else { + memsize = simple_strtol(memsize_str, NULL, 0); + } + add_memory_region(0, memsize, BOOT_MEM_RAM); + return 0; +} diff --git a/arch/mips/au1000/csb250/irqmap.c b/arch/mips/au1000/csb250/irqmap.c new file mode 100644 index 000000000..5cb1166be --- /dev/null +++ b/arch/mips/au1000/csb250/irqmap.c @@ -0,0 +1,60 @@ +/* + * BRIEF MODULE DESCRIPTION + * Au1xxx irq map table + * + * Copyright 2003 Embedded Edge, LLC + * dan@embeddededge.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +au1xxx_irq_map_t au1xxx_irq_map[] = { + + { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, + { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 }, +}; + +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/db1x00/board_setup.c b/arch/mips/au1000/db1x00/board_setup.c index 7a79293f8..f00ec3b17 100644 --- a/arch/mips/au1000/db1x00/board_setup.c +++ b/arch/mips/au1000/db1x00/board_setup.c @@ -27,6 +27,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c index 0a3f025eb..41e0522f3 100644 --- a/arch/mips/au1000/db1x00/init.c +++ b/arch/mips/au1000/db1x00/init.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/arch/mips/au1000/db1x00/irqmap.c b/arch/mips/au1000/db1x00/irqmap.c index 3e5729145..f63024a98 100644 --- a/arch/mips/au1000/db1x00/irqmap.c +++ b/arch/mips/au1000/db1x00/irqmap.c @@ -25,6 +25,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -79,7 +80,7 @@ char irq_tab_alchemy[][5] __initdata = { #endif -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { #ifndef CONFIG_MIPS_MIRAGE #ifdef CONFIG_MIPS_DB1550 @@ -100,4 +101,4 @@ au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/db1x00/mirage_ts.c b/arch/mips/au1000/db1x00/mirage_ts.c index 0942dcf69..c29852c24 100644 --- a/arch/mips/au1000/db1x00/mirage_ts.c +++ b/arch/mips/au1000/db1x00/mirage_ts.c @@ -31,6 +31,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/hydrogen3/Makefile b/arch/mips/au1000/hydrogen3/Makefile new file mode 100644 index 000000000..974f79256 --- /dev/null +++ b/arch/mips/au1000/hydrogen3/Makefile @@ -0,0 +1,9 @@ +# +# Copyright 2000 MontaVista Software Inc. +# Author: MontaVista Software, Inc. +# ppopov@mvista.com or source@mvista.com +# +# Makefile for the Alchemy Semiconductor PB1000 board. +# + +obj-y := init.o board_setup.o irqmap.o diff --git a/arch/mips/au1000/hydrogen3/board_setup.c b/arch/mips/au1000/hydrogen3/board_setup.c new file mode 100644 index 000000000..2efae1064 --- /dev/null +++ b/arch/mips/au1000/hydrogen3/board_setup.c @@ -0,0 +1,70 @@ +/* + * + * BRIEF MODULE DESCRIPTION + * Alchemy Db1x00 board setup. + * + * Copyright 2000 MontaVista Software Inc. + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +void board_reset (void) +{ +} + +void __init board_setup(void) +{ + u32 pin_func; + +#ifdef CONFIG_AU1X00_USB_DEVICE + // 2nd USB port is USB device + pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); + au_writel(pin_func, SYS_PINFUNC); +#endif + +#if defined(CONFIG_IRDA) && (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) + /* set IRFIRSEL instead of GPIO15 */ + pin_func = au_readl(SYS_PINFUNC) | (u32)((1<<8)); + au_writel(pin_func, SYS_PINFUNC); + au_sync(); +#endif + + printk("AMD Alchemy Hydrogen3 Board\n"); +} diff --git a/arch/mips/au1000/hydrogen3/init.c b/arch/mips/au1000/hydrogen3/init.c new file mode 100644 index 000000000..01ab28483 --- /dev/null +++ b/arch/mips/au1000/hydrogen3/init.c @@ -0,0 +1,76 @@ +/* + * + * BRIEF MODULE DESCRIPTION + * PB1000 board setup + * + * Copyright 2001 MontaVista Software Inc. + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include + +int prom_argc; +char **prom_argv, **prom_envp; +extern void __init prom_init_cmdline(void); +extern char *prom_getenv(char *envname); + +const char *get_system_type(void) +{ +#ifdef CONFIG_MIPS_BOSPORUS + return "Alchemy Bosporus Gateway Reference"; +#else + return "Alchemy Db1x00"; +#endif +} + +int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) +{ + unsigned char *memsize_str; + unsigned long memsize; + + prom_argc = argc; + prom_argv = argv; + prom_envp = envp; + + mips_machgroup = MACH_GROUP_ALCHEMY; + mips_machtype = MACH_DB1000; /* set the platform # */ + prom_init_cmdline(); + + memsize_str = prom_getenv("memsize"); + if (!memsize_str) { + memsize = 0x04000000; + } else { + memsize = simple_strtol(memsize_str, NULL, 0); + } + add_memory_region(0, memsize, BOOT_MEM_RAM); + return 0; +} diff --git a/arch/mips/au1000/hydrogen3/irqmap.c b/arch/mips/au1000/hydrogen3/irqmap.c new file mode 100644 index 000000000..6eacaa0da --- /dev/null +++ b/arch/mips/au1000/hydrogen3/irqmap.c @@ -0,0 +1,56 @@ +/* + * BRIEF MODULE DESCRIPTION + * Au1xxx irq map table + * + * Copyright 2003 Embedded Edge, LLC + * dan@embeddededge.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +au1xxx_irq_map_t au1xxx_irq_map[] = { + + /* { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, */ + { AU1000_GPIO_21, INTC_INT_LOW_LEVEL, 0 }, +}; + +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c index e917e54fc..638de7bb4 100644 --- a/arch/mips/au1000/mtx-1/board_setup.c +++ b/arch/mips/au1000/mtx-1/board_setup.c @@ -28,6 +28,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/mtx-1/irqmap.c b/arch/mips/au1000/mtx-1/irqmap.c index 4693a4eb2..f9a0a8b9d 100644 --- a/arch/mips/au1000/mtx-1/irqmap.c +++ b/arch/mips/au1000/mtx-1/irqmap.c @@ -58,7 +58,7 @@ char irq_tab_alchemy[][5] __initdata = { [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ }; -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, @@ -66,4 +66,4 @@ au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c index 1cf18e16a..0b4807dc9 100644 --- a/arch/mips/au1000/pb1000/board_setup.c +++ b/arch/mips/au1000/pb1000/board_setup.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/pb1000/irqmap.c b/arch/mips/au1000/pb1000/irqmap.c index 156500ba4..a3c460e3c 100644 --- a/arch/mips/au1000/pb1000/irqmap.c +++ b/arch/mips/au1000/pb1000/irqmap.c @@ -47,8 +47,8 @@ #include #include -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 }, }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/pb1100/board_setup.c b/arch/mips/au1000/pb1100/board_setup.c index db27b9331..13c2f6ca7 100644 --- a/arch/mips/au1000/pb1100/board_setup.c +++ b/arch/mips/au1000/pb1100/board_setup.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/pb1100/irqmap.c b/arch/mips/au1000/pb1100/irqmap.c index d98691622..43be7158b 100644 --- a/arch/mips/au1000/pb1100/irqmap.c +++ b/arch/mips/au1000/pb1100/irqmap.c @@ -47,11 +47,11 @@ #include #include -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1000_GPIO_9, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card Fully_Interted# { AU1000_GPIO_10, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card STSCHG# { AU1000_GPIO_11, INTC_INT_LOW_LEVEL, 0 }, // PCMCIA Card IRQ# { AU1000_GPIO_13, INTC_INT_LOW_LEVEL, 0 }, // DC_IRQ# }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c index 8b953b9fc..a45b17538 100644 --- a/arch/mips/au1000/pb1200/board_setup.c +++ b/arch/mips/au1000/pb1200/board_setup.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c index f66779f0d..59e70e5cf 100644 --- a/arch/mips/au1000/pb1200/irqmap.c +++ b/arch/mips/au1000/pb1200/irqmap.c @@ -22,6 +22,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -54,11 +55,11 @@ #define PB1200_INT_END DB1200_INT_END #endif -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1000_GPIO_7, INTC_INT_LOW_LEVEL, 0 }, // This is exteranl interrupt cascade }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); /* * Support for External interrupts on the PbAu1200 Development platform. @@ -148,7 +149,7 @@ static void pb1200_end_irq(unsigned int irq_nr) } } -static struct irq_chip external_irq_type = +static struct hw_interrupt_type external_irq_type = { #ifdef CONFIG_MIPS_PB1200 "Pb1200 Ext", @@ -171,7 +172,7 @@ void _board_init_irq(void) for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++) { - irq_desc[irq_nr].chip = &external_irq_type; + irq_desc[irq_nr].handler = &external_irq_type; pb1200_disable_irq(irq_nr); } diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c index 1a9a293de..30bb87282 100644 --- a/arch/mips/au1000/pb1500/board_setup.c +++ b/arch/mips/au1000/pb1500/board_setup.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/pb1500/irqmap.c b/arch/mips/au1000/pb1500/irqmap.c index 409d1612b..8cb76c2ed 100644 --- a/arch/mips/au1000/pb1500/irqmap.c +++ b/arch/mips/au1000/pb1500/irqmap.c @@ -52,7 +52,7 @@ char irq_tab_alchemy[][5] __initdata = { [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot */ }; -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, @@ -60,4 +60,4 @@ au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/pb1550/irqmap.c b/arch/mips/au1000/pb1550/irqmap.c index 24a9d186c..47c7a1c19 100644 --- a/arch/mips/au1000/pb1550/irqmap.c +++ b/arch/mips/au1000/pb1550/irqmap.c @@ -52,9 +52,9 @@ char irq_tab_alchemy[][5] __initdata = { [13] = { -1, INTA, INTB, INTC, INTD}, /* IDSEL 13 - PCI slot 1 (right) */ }; -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/au1000/xxs1500/board_setup.c b/arch/mips/au1000/xxs1500/board_setup.c index ae3d6b19e..1e59433df 100644 --- a/arch/mips/au1000/xxs1500/board_setup.c +++ b/arch/mips/au1000/xxs1500/board_setup.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/au1000/xxs1500/irqmap.c b/arch/mips/au1000/xxs1500/irqmap.c index 3844c6429..52f2f7dae 100644 --- a/arch/mips/au1000/xxs1500/irqmap.c +++ b/arch/mips/au1000/xxs1500/irqmap.c @@ -47,7 +47,7 @@ #include #include -au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { +au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, @@ -63,4 +63,4 @@ au1xxx_irq_map_t __initdata au1xxx_irq_map[] = { { AU1000_GPIO_5, INTC_INT_LOW_LEVEL, 0 }, }; -int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map); +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff --git a/arch/mips/basler/excite/Makefile b/arch/mips/basler/excite/Makefile deleted file mode 100644 index 519142c2e..000000000 --- a/arch/mips/basler/excite/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile for Basler eXcite -# - -obj-$(CONFIG_BASLER_EXCITE) += excite_irq.o excite_prom.o excite_setup.o \ - excite_device.o excite_procfs.o - -obj-$(CONFIG_KGDB) += excite_dbg_io.o -obj-m += excite_iodev.o diff --git a/arch/mips/basler/excite/excite_dbg_io.c b/arch/mips/basler/excite/excite_dbg_io.c deleted file mode 100644 index c04505afa..000000000 --- a/arch/mips/basler/excite/excite_dbg_io.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2004 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include - -#if defined(CONFIG_SERIAL_8250) && CONFIG_SERIAL_8250_NR_UARTS > 1 -#error Debug port used by serial driver -#endif - -#define UART_CLK 25000000 -#define BASE_BAUD (UART_CLK / 16) -#define REGISTER_BASE_0 0x0208UL -#define REGISTER_BASE_1 0x0238UL - -#define REGISTER_BASE_DBG REGISTER_BASE_1 - -#define CPRR 0x0004 -#define UACFG 0x0200 -#define UAINTS 0x0204 -#define UARBR (REGISTER_BASE_DBG + 0x0000) -#define UATHR (REGISTER_BASE_DBG + 0x0004) -#define UADLL (REGISTER_BASE_DBG + 0x0008) -#define UAIER (REGISTER_BASE_DBG + 0x000c) -#define UADLH (REGISTER_BASE_DBG + 0x0010) -#define UAIIR (REGISTER_BASE_DBG + 0x0014) -#define UAFCR (REGISTER_BASE_DBG + 0x0018) -#define UALCR (REGISTER_BASE_DBG + 0x001c) -#define UAMCR (REGISTER_BASE_DBG + 0x0020) -#define UALSR (REGISTER_BASE_DBG + 0x0024) -#define UAMSR (REGISTER_BASE_DBG + 0x0028) -#define UASCR (REGISTER_BASE_DBG + 0x002c) - -#define PARITY_NONE 0 -#define PARITY_ODD 0x08 -#define PARITY_EVEN 0x18 -#define PARITY_MARK 0x28 -#define PARITY_SPACE 0x38 - -#define DATA_5BIT 0x0 -#define DATA_6BIT 0x1 -#define DATA_7BIT 0x2 -#define DATA_8BIT 0x3 - -#define STOP_1BIT 0x0 -#define STOP_2BIT 0x4 - -#define BAUD_DBG 57600 -#define PARITY_DBG PARITY_NONE -#define DATA_DBG DATA_8BIT -#define STOP_DBG STOP_1BIT - -/* Initialize the serial port for KGDB debugging */ -void __init excite_kgdb_init(void) -{ - const u32 divisor = BASE_BAUD / BAUD_DBG; - - /* Take the UART out of reset */ - titan_writel(0x00ff1cff, CPRR); - titan_writel(0x00000000, UACFG); - titan_writel(0x00000002, UACFG); - - titan_writel(0x0, UALCR); - titan_writel(0x0, UAIER); - - /* Disable FIFOs */ - titan_writel(0x00, UAFCR); - - titan_writel(0x80, UALCR); - titan_writel(divisor & 0xff, UADLL); - titan_writel((divisor & 0xff00) >> 8, UADLH); - titan_writel(0x0, UALCR); - - titan_writel(DATA_DBG | PARITY_DBG | STOP_DBG, UALCR); - - /* Enable receiver interrupt */ - titan_readl(UARBR); - titan_writel(0x1, UAIER); -} - -int getDebugChar(void) -{ - while (!(titan_readl(UALSR) & 0x1)); - return titan_readl(UARBR); -} - -int putDebugChar(int data) -{ - while (!(titan_readl(UALSR) & 0x20)); - titan_writel(data, UATHR); - return 1; -} - -/* KGDB interrupt handler */ -asmlinkage void excite_kgdb_inthdl(struct pt_regs *regs) -{ - if (unlikely( - ((titan_readl(UAIIR) & 0x7) == 4) - && ((titan_readl(UARBR) & 0xff) == 0x3))) - set_async_breakpoint(®s->cp0_epc); -} diff --git a/arch/mips/basler/excite/excite_device.c b/arch/mips/basler/excite/excite_device.c deleted file mode 100644 index bbb4ea43d..000000000 --- a/arch/mips/basler/excite/excite_device.c +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright (C) 2004 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "excite_iodev.h" - -#define RM9K_GE_UNIT 0 -#define XICAP_UNIT 0 -#define NAND_UNIT 0 - -#define DLL_TIMEOUT 3 /* seconds */ - - -#define RINIT(__start__, __end__, __name__, __parent__) { \ - .name = __name__ "_0", \ - .start = (__start__), \ - .end = (__end__), \ - .flags = 0, \ - .parent = (__parent__) \ -} - -#define RINIT_IRQ(__irq__, __name__) { \ - .name = __name__ "_0", \ - .start = (__irq__), \ - .end = (__irq__), \ - .flags = IORESOURCE_IRQ, \ - .parent = NULL \ -} - - - -enum { - slice_xicap, - slice_eth -}; - - - -static struct resource - excite_ctr_resource = { - .name = "GPI counters", - .start = 0, - .end = 5, - .flags = 0, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_gpislice_resource = { - .name = "GPI slices", - .start = 0, - .end = 1, - .flags = 0, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_mdio_channel_resource = { - .name = "MDIO channels", - .start = 0, - .end = 1, - .flags = 0, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_fifomem_resource = { - .name = "FIFO memory", - .start = 0, - .end = 767, - .flags = 0, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_scram_resource = { - .name = "Scratch RAM", - .start = EXCITE_PHYS_SCRAM, - .end = EXCITE_PHYS_SCRAM + EXCITE_SIZE_SCRAM - 1, - .flags = IORESOURCE_MEM, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_fpga_resource = { - .name = "System FPGA", - .start = EXCITE_PHYS_FPGA, - .end = EXCITE_PHYS_FPGA + EXCITE_SIZE_FPGA - 1, - .flags = IORESOURCE_MEM, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_nand_resource = { - .name = "NAND flash control", - .start = EXCITE_PHYS_NAND, - .end = EXCITE_PHYS_NAND + EXCITE_SIZE_NAND - 1, - .flags = IORESOURCE_MEM, - .parent = NULL, - .sibling = NULL, - .child = NULL - }, - excite_titan_resource = { - .name = "TITAN registers", - .start = EXCITE_PHYS_TITAN, - .end = EXCITE_PHYS_TITAN + EXCITE_SIZE_TITAN - 1, - .flags = IORESOURCE_MEM, - .parent = NULL, - .sibling = NULL, - .child = NULL - }; - - - -static void adjust_resources(struct resource *res, unsigned int n) -{ - struct resource *p; - const unsigned long mask = IORESOURCE_IO | IORESOURCE_MEM - | IORESOURCE_IRQ | IORESOURCE_DMA; - - for (p = res; p < res + n; p++) { - const struct resource * const parent = p->parent; - if (parent) { - p->start += parent->start; - p->end += parent->start; - p->flags = parent->flags & mask; - } - } -} - - - -#if defined(CONFIG_EXCITE_FCAP_GPI) || defined(CONFIG_EXCITE_FCAP_GPI_MODULE) -static struct resource xicap_rsrc[] = { - RINIT(0x4840, 0x486f, XICAP_RESOURCE_FIFO_RX, &excite_titan_resource), - RINIT(0x4940, 0x494b, XICAP_RESOURCE_FIFO_TX, &excite_titan_resource), - RINIT(0x5040, 0x5127, XICAP_RESOURCE_XDMA, &excite_titan_resource), - RINIT(0x1000, 0x112f, XICAP_RESOURCE_PKTPROC, &excite_titan_resource), - RINIT(0x1100, 0x110f, XICAP_RESOURCE_PKT_STREAM, &excite_fpga_resource), - RINIT(0x0800, 0x0bff, XICAP_RESOURCE_DMADESC, &excite_scram_resource), - RINIT(slice_xicap, slice_xicap, XICAP_RESOURCE_GPI_SLICE, &excite_gpislice_resource), - RINIT(0x0100, 0x02ff, XICAP_RESOURCE_FIFO_BLK, &excite_fifomem_resource), - RINIT_IRQ(TITAN_IRQ, XICAP_RESOURCE_IRQ) -}; - -static struct platform_device xicap_pdev = { - .name = XICAP_NAME, - .id = XICAP_UNIT, - .num_resources = ARRAY_SIZE(xicap_rsrc), - .resource = xicap_rsrc -}; - -/* - * Create a platform device for the GPI port that receives the - * image data from the embedded camera. - */ -static int __init xicap_devinit(void) -{ - unsigned long tend; - u32 reg; - int retval; - - adjust_resources(xicap_rsrc, ARRAY_SIZE(xicap_rsrc)); - - /* Power up the slice and configure it. */ - reg = titan_readl(CPTC1R); - reg &= ~(0x11100 << slice_xicap); - titan_writel(reg, CPTC1R); - - /* Enable slice & DLL. */ - reg= titan_readl(CPRR); - reg &= ~(0x00030003 << (slice_xicap * 2)); - titan_writel(reg, CPRR); - - /* Wait for DLLs to lock */ - tend = jiffies + DLL_TIMEOUT * HZ; - while (time_before(jiffies, tend)) { - if (!(~titan_readl(CPDSR) & (0x1 << (slice_xicap * 4)))) - break; - yield(); - } - - if (~titan_readl(CPDSR) & (0x1 << (slice_xicap * 4))) { - printk(KERN_ERR "%s: DLL not locked after %u seconds\n", - xicap_pdev.name, DLL_TIMEOUT); - retval = -ETIME; - } else { - /* Register platform device */ - retval = platform_device_register(&xicap_pdev); - } - - return retval; -} - -device_initcall(xicap_devinit); -#endif /* defined(CONFIG_EXCITE_FCAP_GPI) || defined(CONFIG_EXCITE_FCAP_GPI_MODULE) */ - - - -#if defined(CONFIG_WDT_RM9K_GPI) || defined(CONFIG_WDT_RM9K_GPI_MODULE) -static struct resource wdt_rsrc[] = { - RINIT(0, 0, WDT_RESOURCE_COUNTER, &excite_ctr_resource), - RINIT(0x0084, 0x008f, WDT_RESOURCE_REGS, &excite_titan_resource), - RINIT_IRQ(TITAN_IRQ, WDT_RESOURCE_IRQ) -}; - -static struct platform_device wdt_pdev = { - .name = WDT_NAME, - .id = -1, - .num_resources = ARRAY_SIZE(wdt_rsrc), - .resource = wdt_rsrc -}; - -/* - * Create a platform device for the GPI port that receives the - * image data from the embedded camera. - */ -static int __init wdt_devinit(void) -{ - adjust_resources(wdt_rsrc, ARRAY_SIZE(wdt_rsrc)); - return platform_device_register(&wdt_pdev); -} - -device_initcall(wdt_devinit); -#endif /* defined(CONFIG_WDT_RM9K_GPI) || defined(CONFIG_WDT_RM9K_GPI_MODULE) */ - - - -static struct resource excite_nandflash_rsrc[] = { - RINIT(0x2000, 0x201f, EXCITE_NANDFLASH_RESOURCE_REGS, &excite_nand_resource) -}; - -static struct platform_device excite_nandflash_pdev = { - .name = "excite_nand", - .id = NAND_UNIT, - .num_resources = ARRAY_SIZE(excite_nandflash_rsrc), - .resource = excite_nandflash_rsrc -}; - -/* - * Create a platform device for the access to the nand-flash - * port - */ -static int __init excite_nandflash_devinit(void) -{ - adjust_resources(excite_nandflash_rsrc, ARRAY_SIZE(excite_nandflash_rsrc)); - - /* nothing to be done here */ - - /* Register platform device */ - return platform_device_register(&excite_nandflash_pdev); -} - -device_initcall(excite_nandflash_devinit); - - - -static struct resource iodev_rsrc[] = { - RINIT_IRQ(FPGA1_IRQ, IODEV_RESOURCE_IRQ) -}; - -static struct platform_device io_pdev = { - .name = IODEV_NAME, - .id = -1, - .num_resources = ARRAY_SIZE(iodev_rsrc), - .resource = iodev_rsrc -}; - -/* - * Create a platform device for the external I/O ports. - */ -static int __init io_devinit(void) -{ - adjust_resources(iodev_rsrc, ARRAY_SIZE(iodev_rsrc)); - return platform_device_register(&io_pdev); -} - -device_initcall(io_devinit); - - - - -#if defined(CONFIG_RM9K_GE) || defined(CONFIG_RM9K_GE_MODULE) -static struct resource rm9k_ge_rsrc[] = { - RINIT(0x2200, 0x27ff, RM9K_GE_RESOURCE_MAC, &excite_titan_resource), - RINIT(0x1800, 0x1fff, RM9K_GE_RESOURCE_MSTAT, &excite_titan_resource), - RINIT(0x2000, 0x212f, RM9K_GE_RESOURCE_PKTPROC, &excite_titan_resource), - RINIT(0x5140, 0x5227, RM9K_GE_RESOURCE_XDMA, &excite_titan_resource), - RINIT(0x4870, 0x489f, RM9K_GE_RESOURCE_FIFO_RX, &excite_titan_resource), - RINIT(0x494c, 0x4957, RM9K_GE_RESOURCE_FIFO_TX, &excite_titan_resource), - RINIT(0x0000, 0x007f, RM9K_GE_RESOURCE_FIFOMEM_RX, &excite_fifomem_resource), - RINIT(0x0080, 0x00ff, RM9K_GE_RESOURCE_FIFOMEM_TX, &excite_fifomem_resource), - RINIT(0x0180, 0x019f, RM9K_GE_RESOURCE_PHY, &excite_titan_resource), - RINIT(0x0000, 0x03ff, RM9K_GE_RESOURCE_DMADESC_RX, &excite_scram_resource), - RINIT(0x0400, 0x07ff, RM9K_GE_RESOURCE_DMADESC_TX, &excite_scram_resource), - RINIT(slice_eth, slice_eth, RM9K_GE_RESOURCE_GPI_SLICE, &excite_gpislice_resource), - RINIT(0, 0, RM9K_GE_RESOURCE_MDIO_CHANNEL, &excite_mdio_channel_resource), - RINIT_IRQ(TITAN_IRQ, RM9K_GE_RESOURCE_IRQ_MAIN), - RINIT_IRQ(PHY_IRQ, RM9K_GE_RESOURCE_IRQ_PHY) -}; - -static struct platform_device rm9k_ge_pdev = { - .name = RM9K_GE_NAME, - .id = RM9K_GE_UNIT, - .num_resources = ARRAY_SIZE(rm9k_ge_rsrc), - .resource = rm9k_ge_rsrc -}; - - - -/* - * Create a platform device for the Ethernet port. - */ -static int __init rm9k_ge_devinit(void) -{ - u32 reg; - - adjust_resources(rm9k_ge_rsrc, ARRAY_SIZE(rm9k_ge_rsrc)); - - /* Power up the slice and configure it. */ - reg = titan_readl(CPTC1R); - reg &= ~(0x11000 << slice_eth); - reg |= 0x100 << slice_eth; - titan_writel(reg, CPTC1R); - - /* Take the MAC out of reset, reset the DLLs. */ - reg = titan_readl(CPRR); - reg &= ~(0x00030000 << (slice_eth * 2)); - reg |= 0x3 << (slice_eth * 2); - titan_writel(reg, CPRR); - - return platform_device_register(&rm9k_ge_pdev); -} - -device_initcall(rm9k_ge_devinit); -#endif /* defined(CONFIG_RM9K_GE) || defined(CONFIG_RM9K_GE_MODULE) */ - - - -static int __init excite_setup_devs(void) -{ - int res; - u32 reg; - - /* Enable xdma and fifo interrupts */ - reg = titan_readl(0x0050); - titan_writel(reg | 0x18000000, 0x0050); - - res = request_resource(&iomem_resource, &excite_titan_resource); - if (res) - return res; - res = request_resource(&iomem_resource, &excite_scram_resource); - if (res) - return res; - res = request_resource(&iomem_resource, &excite_fpga_resource); - if (res) - return res; - res = request_resource(&iomem_resource, &excite_nand_resource); - if (res) - return res; - excite_fpga_resource.flags = excite_fpga_resource.parent->flags & - ( IORESOURCE_IO | IORESOURCE_MEM - | IORESOURCE_IRQ | IORESOURCE_DMA); - excite_nand_resource.flags = excite_nand_resource.parent->flags & - ( IORESOURCE_IO | IORESOURCE_MEM - | IORESOURCE_IRQ | IORESOURCE_DMA); - - return 0; -} - -arch_initcall(excite_setup_devs); - diff --git a/arch/mips/basler/excite/excite_flashtest.c b/arch/mips/basler/excite/excite_flashtest.c deleted file mode 100644 index f0024a8e3..000000000 --- a/arch/mips/basler/excite/excite_flashtest.c +++ /dev/null @@ -1,294 +0,0 @@ -/* -* Copyright (C) 2005 by Basler Vision Technologies AG -* Author: Thies Moeller -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include // for ocd_write -#include // for queue - -#include "excite_nandflash.h" -#include "nandflash.h" - -#define PFX "excite flashtest: " -typedef void __iomem *io_reg_t; - -#define io_readb(__a__) __raw_readb((__a__)) -#define io_writeb(__v__, __a__) __raw_writeb((__v__), (__a__)) - - - -static inline const struct resource *excite_nandflash_get_resource( - struct platform_device *d, unsigned long flags, const char *basename) -{ - const char fmt[] = "%s_%u"; - char buf[80]; - - if (unlikely(snprintf(buf, sizeof buf, fmt, basename, d->id) >= sizeof buf)) - return NULL; - - return platform_get_resource_byname(d, flags, buf); -} - -static inline io_reg_t -excite_nandflash_map_regs(struct platform_device *d, const char *basename) -{ - void *result = NULL; - const struct resource *const r = - excite_nandflash_get_resource(d, IORESOURCE_MEM, basename); - if (r) - result = ioremap_nocache(r->start, r->end + 1 - r->start); - return result; -} - -/* controller and mtd information */ - -struct excite_nandflash_drvdata { - struct mtd_info board_mtd; - struct nand_chip board_chip; - io_reg_t regs; -}; - - -/* command and control functions */ -static void excite_nandflash_hwcontrol(struct mtd_info *mtd, int cmd) -{ - struct nand_chip *this = mtd->priv; - io_reg_t regs = container_of(mtd,struct excite_nandflash_drvdata,board_mtd)->regs; - - switch (cmd) { - /* Select the command latch */ - case NAND_CTL_SETCLE: this->IO_ADDR_W = regs + EXCITE_NANDFLASH_CMD; - break; - /* Deselect the command latch */ - case NAND_CTL_CLRCLE: this->IO_ADDR_W = regs + EXCITE_NANDFLASH_DATA; - break; - /* Select the address latch */ - case NAND_CTL_SETALE: this->IO_ADDR_W = regs + EXCITE_NANDFLASH_ADDR; - break; - /* Deselect the address latch */ - case NAND_CTL_CLRALE: this->IO_ADDR_W = regs + EXCITE_NANDFLASH_DATA; - break; - /* Select the chip -- not used */ - case NAND_CTL_SETNCE: - break; - /* Deselect the chip -- not used */ - case NAND_CTL_CLRNCE: - break; - } - - this->IO_ADDR_R = this->IO_ADDR_W; -} - -/* excite_nandflash_devready() - * - * returns 0 if the nand is busy, 1 if it is ready - */ -static int excite_nandflash_devready(struct mtd_info *mtd) -{ - struct excite_nandflash_drvdata *drvdata = - container_of(mtd, struct excite_nandflash_drvdata, board_mtd); - - return io_readb(drvdata->regs + EXCITE_NANDFLASH_STATUS); -} - -/* device management functions */ - -/* excite_nandflash_remove - * - * called by device layer to remove the driver - * the binding to the mtd and all allocated - * resources are released - */ -static int excite_nandflash_remove(struct device *dev) -{ - struct excite_nandflash_drvdata *this = dev_get_drvdata(dev); - - pr_info(PFX "remove"); - - dev_set_drvdata(dev, NULL); - - if (this == NULL) { - pr_debug(PFX "call remove without private data!!"); - return 0; - } - - - /* free the common resources */ - if (this->regs != NULL) { - iounmap(this->regs); - this->regs = NULL; - } - - kfree(this); - - return 0; -} - -static int elapsed; - -void my_workqueue_handler(void *arg) -{ - elapsed = 1; -} - -DECLARE_WORK(sigElapsed, my_workqueue_handler, 0); - - -/* excite_nandflash_probe - * - * called by device layer when it finds a device matching - * one our driver can handled. This code checks to see if - * it can allocate all necessary resources then calls the - * nand layer to look for devices -*/ -static int excite_nandflash_probe(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - - struct excite_nandflash_drvdata *drvdata; /* private driver data */ - struct nand_chip *board_chip; /* private flash chip data */ - struct mtd_info *board_mtd; /* mtd info for this board */ - - int err = 0; - int count = 0; - struct timeval tv,endtv; - unsigned int dt; - - pr_info(PFX "probe dev: (%p)\n", dev); - - pr_info(PFX "adjust LB timing\n"); - ocd_writel(0x00000330, LDP2); - - drvdata = kmalloc(sizeof(*drvdata), GFP_KERNEL); - if (unlikely(!drvdata)) { - printk(KERN_ERR PFX "no memory for drvdata\n"); - err = -ENOMEM; - goto mem_error; - } - - /* Initialize structures */ - memset(drvdata, 0, sizeof(*drvdata)); - - /* bind private data into driver */ - dev_set_drvdata(dev, drvdata); - - /* allocate and map the resource */ - drvdata->regs = - excite_nandflash_map_regs(pdev, EXCITE_NANDFLASH_RESOURCE_REGS); - - if (unlikely(!drvdata->regs)) { - printk(KERN_ERR PFX "cannot reserve register region\n"); - err = -ENXIO; - goto io_error; - } - - /* initialise our chip */ - board_chip = &drvdata->board_chip; - - board_chip->IO_ADDR_R = drvdata->regs + EXCITE_NANDFLASH_DATA; - board_chip->IO_ADDR_W = drvdata->regs + EXCITE_NANDFLASH_DATA; - - board_chip->hwcontrol = excite_nandflash_hwcontrol; - board_chip->dev_ready = excite_nandflash_devready; - - board_chip->chip_delay = 25; - #if 0 - /* TODO: speedup the initial scan */ - board_chip->options = NAND_USE_FLASH_BBT; - #endif - board_chip->eccmode = NAND_ECC_SOFT; - - /* link chip to mtd */ - board_mtd = &drvdata->board_mtd; - board_mtd->priv = board_chip; - - - pr_info(PFX "FlashTest\n"); - elapsed = 0; -/* schedule_delayed_work(&sigElapsed, 1*HZ); - while (!elapsed) { - io_readb(drvdata->regs + EXCITE_NANDFLASH_STATUS); - count++; - } - pr_info(PFX "reads in 1 sec --> %d\n",count); -*/ - do_gettimeofday(&tv); - for (count = 0 ; count < 1000000; count ++) { - io_readb(drvdata->regs + EXCITE_NANDFLASH_STATUS); - } - do_gettimeofday(&endtv); - dt = (endtv.tv_sec - tv.tv_sec) * 1000000 + endtv.tv_usec - tv.tv_usec; - pr_info(PFX "%8d us timeval\n",dt); - pr_info(PFX "EndFlashTest\n"); - -/* return with error to unload everything -*/ -io_error: - iounmap(drvdata->regs); - -mem_error: - kfree(drvdata); - - if (err == 0) - err = -EINVAL; - return err; -} - -static struct device_driver excite_nandflash_driver = { - .name = "excite_nand", - .bus = &platform_bus_type, - .probe = excite_nandflash_probe, - .remove = excite_nandflash_remove, -}; - -static int __init excite_nandflash_init(void) -{ - pr_info(PFX "register Driver (Rev: $Revision:$)\n"); - return driver_register(&excite_nandflash_driver); -} - -static void __exit excite_nandflash_exit(void) -{ - driver_unregister(&excite_nandflash_driver); - pr_info(PFX "Driver unregistered"); -} - -module_init(excite_nandflash_init); -module_exit(excite_nandflash_exit); - -MODULE_AUTHOR("Thies Moeller "); -MODULE_DESCRIPTION("Basler eXcite NAND-Flash driver"); -MODULE_LICENSE("GPL"); diff --git a/arch/mips/basler/excite/excite_fpga.h b/arch/mips/basler/excite/excite_fpga.h deleted file mode 100644 index 38fcda703..000000000 --- a/arch/mips/basler/excite/excite_fpga.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef EXCITE_FPGA_H_INCLUDED -#define EXCITE_FPGA_H_INCLUDED - - -/** - * Adress alignment of the individual FPGA bytes. - * The address arrangement of the individual bytes of the FPGA is two - * byte aligned at the embedded MK2 platform. - */ -#ifdef EXCITE_CCI_FPGA_MK2 -typedef unsigned char excite_cci_fpga_align_t __attribute__ ((aligned(2))); -#else -typedef unsigned char excite_cci_fpga_align_t; -#endif - - -/** - * Size of Dual Ported RAM. - */ -#define EXCITE_DPR_SIZE 263 - - -/** - * Size of Reserved Status Fields in Dual Ported RAM. - */ -#define EXCITE_DPR_STATUS_SIZE 7 - - - -/** - * FPGA. - * Hardware register layout of the FPGA interface. The FPGA must accessed - * byte wise solely. - * @see EXCITE_CCI_DPR_MK2 - */ -typedef struct excite_fpga { - - /** - * Dual Ported RAM. - */ - excite_cci_fpga_align_t dpr[EXCITE_DPR_SIZE]; - - /** - * Status. - */ - excite_cci_fpga_align_t status[EXCITE_DPR_STATUS_SIZE]; - -#ifdef EXCITE_CCI_FPGA_MK2 - /** - * RM9000 Interrupt. - * Write access initiates interrupt at the RM9000 (MIPS) processor of the eXcite. - */ - excite_cci_fpga_align_t rm9k_int; -#else - /** - * MK2 Interrupt. - * Write access initiates interrupt at the ARM processor of the MK2. - */ - excite_cci_fpga_align_t mk2_int; - - excite_cci_fpga_align_t gap[0x1000-0x10f]; - - /** - * IRQ Source/Acknowledge. - */ - excite_cci_fpga_align_t rm9k_irq_src; - - /** - * IRQ Mask. - * Set bits enable the related interrupt. - */ - excite_cci_fpga_align_t rm9k_irq_mask; -#endif - - -} excite_fpga; - - - -#endif /* ndef EXCITE_FPGA_H_INCLUDED */ diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c deleted file mode 100644 index 10bbb8cfb..000000000 --- a/arch/mips/basler/excite/excite_iodev.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2005 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "excite_iodev.h" - - - -static const struct resource *iodev_get_resource(struct platform_device *, const char *, unsigned int); -static int __init iodev_probe(struct device *); -static int __exit iodev_remove(struct device *); -static int iodev_open(struct inode *, struct file *); -static int iodev_release(struct inode *, struct file *); -static ssize_t iodev_read(struct file *, char __user *, size_t s, loff_t *); -static unsigned int iodev_poll(struct file *, struct poll_table_struct *); -static irqreturn_t iodev_irqhdl(int, void *, struct pt_regs *); - - - -static const char iodev_name[] = "iodev"; -static unsigned int iodev_irq; -static DECLARE_WAIT_QUEUE_HEAD(wq); - - - -static struct file_operations fops = -{ - .owner = THIS_MODULE, - .open = iodev_open, - .release = iodev_release, - .read = iodev_read, - .poll = iodev_poll -}; - -static struct miscdevice miscdev = -{ - .minor = MISC_DYNAMIC_MINOR, - .name = iodev_name, - .fops = &fops -}; - -static struct device_driver iodev_driver = -{ - .name = (char *) iodev_name, - .bus = &platform_bus_type, - .owner = THIS_MODULE, - .probe = iodev_probe, - .remove = __exit_p(iodev_remove) -}; - - - -static const struct resource * -iodev_get_resource(struct platform_device *pdv, const char *name, - unsigned int type) -{ - char buf[80]; - if (snprintf(buf, sizeof buf, "%s_0", name) >= sizeof buf) - return NULL; - return platform_get_resource_byname(pdv, type, buf); -} - - - -/* No hotplugging on the platform bus - use __init */ -static int __init iodev_probe(struct device *dev) -{ - struct platform_device * const pdv = to_platform_device(dev); - const struct resource * const ri = - iodev_get_resource(pdv, IODEV_RESOURCE_IRQ, IORESOURCE_IRQ); - - if (unlikely(!ri)) - return -ENXIO; - - iodev_irq = ri->start; - return misc_register(&miscdev); -} - - - -static int __exit iodev_remove(struct device *dev) -{ - return misc_deregister(&miscdev); -} - - - -static int iodev_open(struct inode *i, struct file *f) -{ - return request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED, - iodev_name, &miscdev); -} - - - -static int iodev_release(struct inode *i, struct file *f) -{ - free_irq(iodev_irq, &miscdev); - return 0; -} - - - - -static ssize_t -iodev_read(struct file *f, char __user *d, size_t s, loff_t *o) -{ - ssize_t ret; - DEFINE_WAIT(w); - - prepare_to_wait(&wq, &w, TASK_INTERRUPTIBLE); - if (!signal_pending(current)) - schedule(); - ret = signal_pending(current) ? -ERESTARTSYS : 0; - finish_wait(&wq, &w); - return ret; -} - - -static unsigned int iodev_poll(struct file *f, struct poll_table_struct *p) -{ - poll_wait(f, &wq, p); - return POLLOUT | POLLWRNORM; -} - - - - -static irqreturn_t iodev_irqhdl(int irq, void *ctxt, struct pt_regs *regs) -{ - wake_up(&wq); - return IRQ_HANDLED; -} - - - -static int __init iodev_init_module(void) -{ - return driver_register(&iodev_driver); -} - - - -static void __exit iodev_cleanup_module(void) -{ - driver_unregister(&iodev_driver); -} - -module_init(iodev_init_module); -module_exit(iodev_cleanup_module); - - - -MODULE_AUTHOR("Thomas Koeller "); -MODULE_DESCRIPTION("Basler eXcite i/o interrupt handler"); -MODULE_VERSION("0.0"); -MODULE_LICENSE("GPL"); diff --git a/arch/mips/basler/excite/excite_iodev.h b/arch/mips/basler/excite/excite_iodev.h deleted file mode 100644 index cbfbb5d2e..000000000 --- a/arch/mips/basler/excite/excite_iodev.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __EXCITE_IODEV_H__ -#define __EXCITE_IODEV_H__ - -/* Device name */ -#define IODEV_NAME "iodev" - -/* Resource names */ -#define IODEV_RESOURCE_IRQ "excite_iodev_irq" - -#endif /* __EXCITE_IODEV_H__ */ diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c deleted file mode 100644 index 511ad8730..000000000 --- a/arch/mips/basler/excite/excite_irq.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -extern asmlinkage void excite_handle_int(void); - -/* - * Initialize the interrupt handler - */ -void __init arch_init_irq(void) -{ - mips_cpu_irq_init(0); - rm7k_cpu_irq_init(8); - rm9k_cpu_irq_init(12); - -#ifdef CONFIG_KGDB - excite_kgdb_init(); -#endif -} - -asmlinkage void plat_irq_dispatch(struct pt_regs *regs) -{ - const u32 - interrupts = read_c0_cause() >> 8, - mask = ((read_c0_status() >> 8) & 0x000000ff) | - (read_c0_intcontrol() & 0x0000ff00), - pending = interrupts & mask; - u32 msgintflags, msgintmask, msgint; - - /* process timer interrupt */ - if (pending & (1 << TIMER_IRQ)) { - do_IRQ(TIMER_IRQ, regs); - return; - } - - /* Process PCI interrupts */ -#if USB_IRQ < 10 - msgintflags = ocd_readl(INTP0Status0 + (USB_MSGINT / 0x20 * 0x10)); - msgintmask = ocd_readl(INTP0Mask0 + (USB_MSGINT / 0x20 * 0x10)); - msgint = msgintflags & msgintmask & (0x1 << (USB_MSGINT % 0x20)); - if ((pending & (1 << USB_IRQ)) && msgint) { -#else - if (pending & (1 << USB_IRQ)) { -#endif - do_IRQ(USB_IRQ, regs); - return; - } - - /* Process TITAN interrupts */ - msgintflags = ocd_readl(INTP0Status0 + (TITAN_MSGINT / 0x20 * 0x10)); - msgintmask = ocd_readl(INTP0Mask0 + (TITAN_MSGINT / 0x20 * 0x10)); - msgint = msgintflags & msgintmask & (0x1 << (TITAN_MSGINT % 0x20)); - if ((pending & (1 << TITAN_IRQ)) && msgint) { - ocd_writel(msgint, INTP0Clear0 + (TITAN_MSGINT / 0x20 * 0x10)); -#if defined(CONFIG_KGDB) - excite_kgdb_inthdl(regs); -#endif - do_IRQ(TITAN_IRQ, regs); - return; - } - - /* Process FPGA line #0 interrupts */ - msgintflags = ocd_readl(INTP0Status0 + (FPGA0_MSGINT / 0x20 * 0x10)); - msgintmask = ocd_readl(INTP0Mask0 + (FPGA0_MSGINT / 0x20 * 0x10)); - msgint = msgintflags & msgintmask & (0x1 << (FPGA0_MSGINT % 0x20)); - if ((pending & (1 << FPGA0_IRQ)) && msgint) { - do_IRQ(FPGA0_IRQ, regs); - return; - } - - /* Process FPGA line #1 interrupts */ - msgintflags = ocd_readl(INTP0Status0 + (FPGA1_MSGINT / 0x20 * 0x10)); - msgintmask = ocd_readl(INTP0Mask0 + (FPGA1_MSGINT / 0x20 * 0x10)); - msgint = msgintflags & msgintmask & (0x1 << (FPGA1_MSGINT % 0x20)); - if ((pending & (1 << FPGA1_IRQ)) && msgint) { - do_IRQ(FPGA1_IRQ, regs); - return; - } - - /* Process PHY interrupts */ - msgintflags = ocd_readl(INTP0Status0 + (PHY_MSGINT / 0x20 * 0x10)); - msgintmask = ocd_readl(INTP0Mask0 + (PHY_MSGINT / 0x20 * 0x10)); - msgint = msgintflags & msgintmask & (0x1 << (PHY_MSGINT % 0x20)); - if ((pending & (1 << PHY_IRQ)) && msgint) { - do_IRQ(PHY_IRQ, regs); - return; - } - - /* Process spurious interrupts */ - spurious_interrupt(regs); -} diff --git a/arch/mips/basler/excite/excite_procfs.c b/arch/mips/basler/excite/excite_procfs.c deleted file mode 100644 index 9ee67a95f..000000000 --- a/arch/mips/basler/excite/excite_procfs.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2004, 2005 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * Procfs support for Basler eXcite - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include - -#include - -static int excite_get_unit_id(char *buf, char **addr, off_t offs, int size) -{ - const int len = snprintf(buf, PAGE_SIZE, "%06x", unit_id); - const int w = len - offs; - *addr = buf + offs; - return w < size ? w : size; -} - -static int -excite_bootrom_read(char *page, char **start, off_t off, int count, - int *eof, void *data) -{ - void __iomem * src; - - if (off >= EXCITE_SIZE_BOOTROM) { - *eof = 1; - return 0; - } - - if ((off + count) > EXCITE_SIZE_BOOTROM) - count = EXCITE_SIZE_BOOTROM - off; - - src = ioremap(EXCITE_PHYS_BOOTROM + off, count); - if (src) { - memcpy_fromio(page, src, count); - iounmap(src); - *start = page; - } else { - count = -ENOMEM; - } - - return count; -} - -void excite_procfs_init(void) -{ - /* Create & populate /proc/excite */ - struct proc_dir_entry * const pdir = proc_mkdir("excite", &proc_root); - if (pdir) { - struct proc_dir_entry * e; - - e = create_proc_info_entry("unit_id", S_IRUGO, pdir, - excite_get_unit_id); - if (e) e->size = 6; - - e = create_proc_read_entry("bootrom", S_IRUGO, pdir, - excite_bootrom_read, NULL); - if (e) e->size = EXCITE_SIZE_BOOTROM; - } -} diff --git a/arch/mips/basler/excite/excite_prom.c b/arch/mips/basler/excite/excite_prom.c deleted file mode 100644 index 6ecd512b9..000000000 --- a/arch/mips/basler/excite/excite_prom.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2004, 2005 by Thomas Koeller (thomas.koeller@baslerweb.com) - * Based on the PMC-Sierra Yosemite board support by Ralf Baechle and - * Manish Lachwani. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -/* This struct is used by Redboot to pass arguments to the kernel */ -typedef struct -{ - char *name; - char *val; -} t_env_var; - -struct parmblock { - t_env_var memsize; - t_env_var modetty0; - t_env_var ethaddr; - t_env_var env_end; - char *argv[2]; - char text[0]; -}; - -static unsigned int prom_argc; -static const char ** prom_argv; -static const t_env_var * prom_env; - -static void prom_halt(void) __attribute__((noreturn)); -static void prom_exit(void) __attribute__((noreturn)); - - - -const char *get_system_type(void) -{ - return "Basler eXcite"; -} - -/* - * Halt the system - */ -static void prom_halt(void) -{ - printk(KERN_NOTICE "\n** System halted.\n"); - while (1) - asm volatile ( - "\t.set\tmips3\n" - "\twait\n" - "\t.set\tmips0\n" - ); -} - -/* - * Reset the CPU and re-enter Redboot - */ -static void prom_exit(void) -{ - unsigned int i; - volatile unsigned char * const flg = - (volatile unsigned char *) (EXCITE_ADDR_FPGA + EXCITE_FPGA_DPR); - - /* Clear the watchdog reset flag, set the reboot flag */ - *flg &= ~0x01; - *flg |= 0x80; - - for (i = 0; i < 10; i++) { - *(volatile unsigned char *) (EXCITE_ADDR_FPGA + EXCITE_FPGA_SYSCTL) = 0x02; - iob(); - mdelay(1000); - } - - printk(KERN_NOTICE "Reset failed\n"); - prom_halt(); -} - -static const char __init *prom_getenv(char *name) -{ - const t_env_var * p; - for (p = prom_env; p->name != NULL; p++) - if(strcmp(name, p->name) == 0) - break; - return p->val; -} - -/* - * Init routine which accepts the variables from Redboot - */ -void __init prom_init(void) -{ - const struct parmblock * const pb = (struct parmblock *) fw_arg2; - - prom_argc = fw_arg0; - prom_argv = (const char **) fw_arg1; - prom_env = &pb->memsize; - - /* Callbacks for halt, restart */ - _machine_restart = (void (*)(char *)) prom_exit; - _machine_halt = prom_halt; - -#ifdef CONFIG_32BIT - /* copy command line */ - strcpy(arcs_cmdline, prom_argv[1]); - memsize = simple_strtol(prom_getenv("memsize"), NULL, 16); - strcpy(modetty, prom_getenv("modetty0")); -#endif /* CONFIG_32BIT */ - -#ifdef CONFIG_64BIT -# error 64 bit support not implemented -#endif /* CONFIG_64BIT */ - - mips_machgroup = MACH_GROUP_TITAN; - mips_machtype = MACH_TITAN_EXCITE; -} - -/* This is called from free_initmem(), so we need to provide it */ -void __init prom_free_prom_memory(void) -{ - /* Nothing to do */ -} diff --git a/arch/mips/basler/excite/excite_setup.c b/arch/mips/basler/excite/excite_setup.c deleted file mode 100644 index a1ce45800..000000000 --- a/arch/mips/basler/excite/excite_setup.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (C) 2004, 2005 by Basler Vision Technologies AG - * Author: Thomas Koeller - * Based on the PMC-Sierra Yosemite board support by Ralf Baechle and - * Manish Lachwani. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define TITAN_UART_CLK 25000000 - -#if 1 -/* normal serial port assignment */ -#define REGBASE_SER0 0x0208 -#define REGBASE_SER1 0x0238 -#define MASK_SER0 0x1 -#define MASK_SER1 0x2 -#else -/* serial ports swapped */ -#define REGBASE_SER0 0x0238 -#define REGBASE_SER1 0x0208 -#define MASK_SER0 0x2 -#define MASK_SER1 0x1 -#endif - -unsigned long memsize; -char modetty[30]; -unsigned int titan_irq = TITAN_IRQ; -static void __iomem * ctl_regs; -u32 unit_id; - -volatile void __iomem * const ocd_base = (void *) (EXCITE_ADDR_OCD); -volatile void __iomem * const titan_base = (void *) (EXCITE_ADDR_TITAN); - -/* Protect access to shared GPI registers */ -spinlock_t titan_lock = SPIN_LOCK_UNLOCKED; -int titan_irqflags; - - -static void excite_timer_init(void) -{ - const u32 modebit5 = ocd_readl(0x00e4); - unsigned int - mult = ((modebit5 >> 11) & 0x1f) + 2, - div = ((modebit5 >> 16) & 0x1f) + 2; - - if (div == 33) div = 1; - mips_hpt_frequency = EXCITE_CPU_EXT_CLOCK * mult / div / 2; -} - -void __init plat_timer_setup(struct irqaction *irq) -{ - /* The eXcite platform uses the alternate timer interrupt */ - set_c0_intcontrol(0x80); - setup_irq(TIMER_IRQ, irq); -} - -static int __init excite_init_console(void) -{ -#if defined(CONFIG_SERIAL_8250) - static __initdata char serr[] = - KERN_ERR "Serial port #%u setup failed\n"; - struct uart_port up; - - /* Take the DUART out of reset */ - titan_writel(0x00ff1cff, CPRR); - -#if defined(CONFIG_KGDB) || (CONFIG_SERIAL_8250_NR_UARTS > 1) - /* Enable both ports */ - titan_writel(MASK_SER0 | MASK_SER1, UACFG); -#else - /* Enable port #0 only */ - titan_writel(MASK_SER0, UACFG); -#endif /* defined(CONFIG_KGDB) */ - - /* - * Set up serial port #0. Do not use autodetection; the result is - * not what we want. - */ - memset(&up, 0, sizeof(up)); - up.membase = (char *) titan_addr(REGBASE_SER0); - up.irq = TITAN_IRQ; - up.uartclk = TITAN_UART_CLK; - up.regshift = 0; - up.iotype = UPIO_MEM32; - up.type = PORT_RM9000; - up.flags = UPF_SHARE_IRQ; - up.line = 0; - if (early_serial_setup(&up)) - printk(serr, up.line); - -#if CONFIG_SERIAL_8250_NR_UARTS > 1 - /* And now for port #1. */ - up.membase = (char *) titan_addr(REGBASE_SER1); - up.line = 1; - if (early_serial_setup(&up)) - printk(serr, up.line); -#endif /* CONFIG_SERIAL_8250_NR_UARTS > 1 */ -#else - /* Leave the DUART in reset */ - titan_writel(0x00ff3cff, CPRR); -#endif /* defined(CONFIG_SERIAL_8250) */ - - return 0; -} - -static int __init excite_platform_init(void) -{ - unsigned int i; - unsigned char buf[3]; - u8 reg; - void __iomem * dpr; - - /* BIU buffer allocations */ - ocd_writel(8, CPURSLMT); /* CPU */ - titan_writel(4, CPGRWL); /* GPI / Ethernet */ - - /* Map control registers located in FPGA */ - ctl_regs = ioremap_nocache(EXCITE_PHYS_FPGA + EXCITE_FPGA_SYSCTL, 16); - if (!ctl_regs) - panic("eXcite: failed to map platform control registers\n"); - memcpy_fromio(buf, ctl_regs + 2, ARRAY_SIZE(buf)); - unit_id = buf[0] | (buf[1] << 8) | (buf[2] << 16); - - /* Clear the reboot flag */ - dpr = ioremap_nocache(EXCITE_PHYS_FPGA + EXCITE_FPGA_DPR, 1); - reg = __raw_readb(dpr); - __raw_writeb(reg & 0x7f, dpr); - iounmap(dpr); - - /* Interrupt controller setup */ - for (i = INTP0Status0; i < INTP0Status0 + 0x80; i += 0x10) { - ocd_writel(0x00000000, i + 0x04); - ocd_writel(0xffffffff, i + 0x0c); - } - ocd_writel(0x2, NMICONFIG); - - ocd_writel(0x1 << (TITAN_MSGINT % 0x20), - INTP0Mask0 + (0x10 * (TITAN_MSGINT / 0x20))); - ocd_writel((0x1 << (FPGA0_MSGINT % 0x20)) - | ocd_readl(INTP0Mask0 + (0x10 * (FPGA0_MSGINT / 0x20))), - INTP0Mask0 + (0x10 * (FPGA0_MSGINT / 0x20))); - ocd_writel((0x1 << (FPGA1_MSGINT % 0x20)) - | ocd_readl(INTP0Mask0 + (0x10 * (FPGA1_MSGINT / 0x20))), - INTP0Mask0 + (0x10 * (FPGA1_MSGINT / 0x20))); - ocd_writel((0x1 << (PHY_MSGINT % 0x20)) - | ocd_readl(INTP0Mask0 + (0x10 * (PHY_MSGINT / 0x20))), - INTP0Mask0 + (0x10 * (PHY_MSGINT / 0x20))); -#if USB_IRQ < 10 - ocd_writel((0x1 << (USB_MSGINT % 0x20)) - | ocd_readl(INTP0Mask0 + (0x10 * (USB_MSGINT / 0x20))), - INTP0Mask0 + (0x10 * (USB_MSGINT / 0x20))); -#endif - /* Enable the packet FIFO, XDMA and XDMA arbiter */ - titan_writel(0x00ff18ff, CPRR); - - /* - * Set up the PADMUX. Power down all ethernet slices, - * they will be powered up and configured at device startup. - */ - titan_writel(0x00878206, CPTC1R); - titan_writel(0x00001100, CPTC0R); /* latch PADMUX, enable WCIMODE */ - - /* Reset and enable the FIFO block */ - titan_writel(0x00000001, SDRXFCIE); - titan_writel(0x00000001, SDTXFCIE); - titan_writel(0x00000100, SDRXFCIE); - titan_writel(0x00000000, SDTXFCIE); - - /* - * Initialize the common interrupt shared by all components of - * the GPI/Ethernet subsystem. - */ - titan_writel((EXCITE_PHYS_OCD >> 12), CPCFG0); - titan_writel(TITAN_MSGINT, CPCFG1); - - /* - * XDMA configuration. - * In order for the XDMA to be sharable among multiple drivers, - * the setup must be done here in the platform. The reason is that - * this setup can only be done while the XDMA is in reset. If this - * were done in a driver, it would interrupt all other drivers - * using the XDMA. - */ - titan_writel(0x80021dff, GXCFG); /* XDMA reset */ - titan_writel(0x00000000, CPXCISRA); - titan_writel(0x00000000, CPXCISRB); /* clear pending interrupts */ -#if defined (CONFIG_HIGHMEM) -# error change for HIGHMEM support! -#else - titan_writel(0x00000000, GXDMADRPFX); /* buffer address prefix */ -#endif - titan_writel(0, GXDMA_DESCADR); - - for (i = 0x5040; i <= 0x5300; i += 0x0040) - titan_writel(0x80080000, i); /* reset channel */ - - titan_writel((0x1 << 29) /* no sparse tx descr. */ - | (0x1 << 28) /* no sparse rx descr. */ - | (0x1 << 23) | (0x1 << 24) /* descriptor coherency */ - | (0x1 << 21) | (0x1 << 22) /* data coherency */ - | (0x1 << 17) - | 0x1dff, - GXCFG); - -#if defined(CONFIG_SMP) -# error No SMP support -#else - /* All interrupts go to core #0 only. */ - titan_writel(0x1f007fff, CPDST0A); - titan_writel(0x00000000, CPDST0B); - titan_writel(0x0000ff3f, CPDST1A); - titan_writel(0x00000000, CPDST1B); - titan_writel(0x00ffffff, CPXDSTA); - titan_writel(0x00000000, CPXDSTB); -#endif - - /* Enable DUART interrupts, disable everything else. */ - titan_writel(0x04000000, CPGIG0ER); - titan_writel(0x000000c0, CPGIG1ER); - - excite_procfs_init(); - return 0; -} - -void __init plat_mem_setup(void) -{ - volatile u32 * const boot_ocd_base = (u32 *) 0xbf7fc000; - - /* Announce RAM to system */ - add_memory_region(0x00000000, memsize, BOOT_MEM_RAM); - - /* Set up timer initialization hooks */ - board_time_init = excite_timer_init; - - /* Set up the peripheral address map */ - *(boot_ocd_base + (LKB9 / sizeof (u32))) = 0; - *(boot_ocd_base + (LKB10 / sizeof (u32))) = 0; - *(boot_ocd_base + (LKB11 / sizeof (u32))) = 0; - *(boot_ocd_base + (LKB12 / sizeof (u32))) = 0; - wmb(); - *(boot_ocd_base + (LKB0 / sizeof (u32))) = EXCITE_PHYS_OCD >> 4; - wmb(); - - ocd_writel((EXCITE_PHYS_TITAN >> 4) | 0x1UL, LKB5); - ocd_writel(((EXCITE_SIZE_TITAN >> 4) & 0x7fffff00) - 0x100, LKM5); - ocd_writel((EXCITE_PHYS_SCRAM >> 4) | 0x1UL, LKB13); - ocd_writel(((EXCITE_SIZE_SCRAM >> 4) & 0xffffff00) - 0x100, LKM13); - - /* Local bus slot #0 */ - ocd_writel(0x00040510, LDP0); - ocd_writel((EXCITE_PHYS_BOOTROM >> 4) | 0x1UL, LKB9); - ocd_writel(((EXCITE_SIZE_BOOTROM >> 4) & 0x03ffff00) - 0x100, LKM9); - - /* Local bus slot #2 */ - ocd_writel(0x00000330, LDP2); - ocd_writel((EXCITE_PHYS_FPGA >> 4) | 0x1, LKB11); - ocd_writel(((EXCITE_SIZE_FPGA >> 4) - 0x100) & 0x03ffff00, LKM11); - - /* Local bus slot #3 */ - ocd_writel(0x00123413, LDP3); - ocd_writel((EXCITE_PHYS_NAND >> 4) | 0x1, LKB12); - ocd_writel(((EXCITE_SIZE_NAND >> 4) - 0x100) & 0x03ffff00, LKM12); -} - - - -console_initcall(excite_init_console); -arch_initcall(excite_platform_init); - -EXPORT_SYMBOL(titan_lock); -EXPORT_SYMBOL(titan_irqflags); -EXPORT_SYMBOL(titan_irq); -EXPORT_SYMBOL(ocd_base); -EXPORT_SYMBOL(titan_base); diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c index 46c23b66b..45c2d27c7 100644 --- a/arch/mips/cobalt/console.c +++ b/arch/mips/cobalt/console.c @@ -2,6 +2,7 @@ * (C) P. Horton 2006 */ +#include #include #include #include @@ -40,8 +41,3 @@ void __init cobalt_early_console(void) printk("Cobalt: early console registered\n"); } - -void __init disable_early_printk(void) -{ - unregister_console(&cons_info); -} diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c index c01a0170e..4f9ea1210 100644 --- a/arch/mips/cobalt/setup.c +++ b/arch/mips/cobalt/setup.c @@ -9,6 +9,7 @@ * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv) * */ +#include #include #include #include @@ -49,7 +50,7 @@ const char *get_system_type(void) return "MIPS Cobalt"; } -void __init plat_timer_setup(struct irqaction *irq) +static void __init cobalt_timer_setup(struct irqaction *irq) { /* Load timer value for 1KHz (TCLK is 50MHz) */ GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS); @@ -67,46 +68,19 @@ void __init plat_timer_setup(struct irqaction *irq) extern struct pci_ops gt64111_pci_ops; static struct resource cobalt_mem_resource = { - .start = GT64111_MEM_BASE, - .end = GT64111_MEM_END, - .name = "PCI memory", - .flags = IORESOURCE_MEM + "PCI memory", GT64111_MEM_BASE, GT64111_MEM_END, IORESOURCE_MEM }; static struct resource cobalt_io_resource = { - .start = 0x1000, - .end = 0xffff, - .name = "PCI I/O", - .flags = IORESOURCE_IO + "PCI I/O", 0x1000, 0xffff, IORESOURCE_IO }; static struct resource cobalt_io_resources[] = { - { - .start = 0x00, - .end = 0x1f, - .name = "dma1", - .flags = IORESOURCE_BUSY - }, { - .start = 0x40, - .end = 0x5f, - .name = "timer", - .flags = IORESOURCE_BUSY - }, { - .start = 0x60, - .end = 0x6f, - .name = "keyboard", - .flags = IORESOURCE_BUSY - }, { - .start = 0x80, - .end = 0x8f, - .name = "dma page reg", - .flags = IORESOURCE_BUSY - }, { - .start = 0xc0, - .end = 0xdf, - .name = "dma2", - .flags = IORESOURCE_BUSY - }, + { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, + { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, + { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, + { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, + { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, }; #define COBALT_IO_RESOURCES (sizeof(cobalt_io_resources)/sizeof(struct resource)) @@ -119,7 +93,7 @@ static struct pci_controller cobalt_pci_controller = { .io_offset = 0 - GT64111_IO_BASE }; -void __init plat_mem_setup(void) +void __init plat_setup(void) { static struct uart_port uart; unsigned int devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0); @@ -129,6 +103,8 @@ void __init plat_mem_setup(void) _machine_halt = cobalt_machine_halt; pm_power_off = cobalt_machine_power_off; + board_timer_setup = cobalt_timer_setup; + set_io_port_base(CKSEG1ADDR(GT64111_IO_BASE)); /* I/O port resource must include UART and LCD/buttons */ diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig index 54274065e..4b080bcb2 100644 --- a/arch/mips/configs/atlas_defconfig +++ b/arch/mips/configs/atlas_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 09:59:39 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:55 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y CONFIG_MIPS_ATLAS=y # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_ATLAS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_MIPS_BONITO64=y @@ -129,11 +127,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set -CONFIG_SYS_SUPPORTS_MULTITHREADING=y +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -149,20 +143,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -CONFIG_HZ_100=y -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -# CONFIG_HZ_1000 is not set -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -194,12 +177,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -301,8 +282,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -350,10 +329,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -370,8 +346,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -387,11 +361,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -401,7 +373,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -412,7 +383,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -443,7 +413,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -605,7 +574,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -724,7 +692,6 @@ CONFIG_ISCSI_TCP=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -753,8 +720,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -810,8 +778,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -874,7 +840,6 @@ CONFIG_LAN_SAA9730=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -956,7 +921,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -988,7 +952,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -1037,7 +1000,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -1047,7 +1009,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -1110,19 +1071,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1149,6 +1097,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y @@ -1157,7 +1106,6 @@ CONFIG_XFS_POSIX_ACL=y CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -1215,8 +1163,6 @@ CONFIG_VXFS_FS=m # CONFIG_QNX4FS_FS is not set CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1241,7 +1187,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1307,7 +1252,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1366,10 +1310,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_RIO=n -CONFIG_I2C_OCORES=n -CONFIG_DEBUG_RT_MUTEXES=n -CONFIG_RT_MUTEX_TESTER=n -CONFIG_DEBUG_RWSEMS=n -CONFIG_DEBUG_LOCKING_API_SELFTESTS=n diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index 887fd9594..d85cda58d 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:02:58 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:55 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -84,7 +83,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_COHERENT=y CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set @@ -132,15 +130,11 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set # CONFIG_SIBYTE_DMA_PAGEOPS is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_IRQ_PER_CPU=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y @@ -151,24 +145,12 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y CONFIG_SMP=y -CONFIG_SYS_SUPPORTS_SMP=y CONFIG_NR_CPUS=4 -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_BKL is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -203,12 +185,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -266,7 +246,7 @@ CONFIG_MMU=y # CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -# CONFIG_BUILD_ELF64 is not set +CONFIG_BUILD_ELF64=y CONFIG_MIPS32_COMPAT=y CONFIG_COMPAT=y CONFIG_MIPS32_O32=y @@ -305,8 +285,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -314,7 +292,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -369,7 +346,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -522,7 +498,6 @@ CONFIG_NET_SB1250_MAC=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -590,7 +565,6 @@ CONFIG_SERIAL_NONSTANDARD=y # CONFIG_N_HDLC is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set -# CONFIG_RIO is not set # CONFIG_STALDRV is not set CONFIG_SIBYTE_SB1250_DUART=y CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y @@ -617,7 +591,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -663,7 +636,6 @@ CONFIG_I2C_ALGO_SIBYTE=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -701,6 +673,7 @@ CONFIG_I2C_DEBUG_CHIP=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -716,7 +689,6 @@ CONFIG_I2C_DEBUG_CHIP=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -726,7 +698,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -783,19 +754,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -814,7 +772,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -880,7 +837,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -907,19 +863,14 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_PRINTK_TIME=y CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set @@ -982,4 +933,3 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index a01344f3a..ca0af1683 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:24 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:08:06 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -76,7 +75,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -121,10 +119,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -137,20 +132,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,12 +166,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -279,8 +261,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -288,7 +268,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -342,7 +321,6 @@ CONFIG_NETWORK_SECMARK=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -461,8 +439,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -529,7 +505,6 @@ CONFIG_8139TOO_PIO=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -599,7 +574,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -628,7 +602,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -678,7 +651,6 @@ CONFIG_GPIO_VR41XX=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -688,7 +660,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -760,30 +731,13 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set CONFIG_RTC_DRV_VR41XX=y # CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# # # File systems @@ -800,7 +754,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -867,7 +820,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -894,7 +846,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -923,4 +874,3 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,38400" # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index c95682445..7d269e609 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:25 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:57 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set CONFIG_MIPS_COBALT=y # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_COBALT=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_COBALT=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_I8259=y @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -134,20 +129,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -179,12 +163,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -267,8 +249,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -276,7 +256,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -336,7 +315,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -486,8 +464,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -539,7 +515,6 @@ CONFIG_TULIP=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -617,7 +592,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -649,7 +623,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y CONFIG_COBALT_LCD=y # CONFIG_DTLK is not set @@ -698,7 +671,6 @@ CONFIG_COBALT_LCD=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -708,7 +680,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -771,19 +742,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -802,7 +760,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -865,7 +822,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -892,7 +848,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -934,6 +889,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -948,4 +904,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index c2f33d3af..579b665e3 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:33 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:57 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_DB1000=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_DB1000=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_DB1000=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -116,10 +114,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -180,15 +164,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -286,8 +269,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -300,7 +281,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -315,7 +295,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -326,10 +305,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -399,7 +376,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -549,7 +525,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -559,8 +535,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -672,7 +646,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_AU1X00_GPIO is not set # CONFIG_TS_AU1X00_ADS7846 is not set @@ -706,7 +679,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -760,7 +732,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -770,7 +741,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -832,19 +802,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -873,7 +830,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -943,7 +899,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1009,7 +964,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1069,4 +1023,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index 8c44d16ae..e5eb53867 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:34 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:58 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_DB1100=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_DB1100=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_DB1100=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -116,10 +114,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -180,15 +164,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -275,8 +258,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -289,7 +270,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -304,7 +284,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -315,10 +294,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -388,7 +365,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -538,7 +514,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -548,8 +524,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -648,7 +622,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_AU1X00_GPIO is not set # CONFIG_TS_AU1X00_ADS7846 is not set @@ -681,7 +654,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -728,7 +700,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -738,13 +709,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_S1D13XXX is not set @@ -832,19 +802,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -873,7 +830,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -943,7 +899,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1009,7 +964,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1069,4 +1023,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig index c13768e75..a43fb2329 100644 --- a/arch/mips/configs/db1200_defconfig +++ b/arch/mips/configs/db1200_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:43 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:58 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set CONFIG_MIPS_DB1200=y # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_DB1200=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_DB1200=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_COHERENT=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -116,10 +114,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,15 +165,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -282,8 +265,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -296,7 +277,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -309,7 +289,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -320,10 +299,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -387,7 +364,6 @@ CONFIG_NET_CLS_ROUTE=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -468,7 +444,6 @@ CONFIG_MTD_ALCHEMY=y # CONFIG_MTD_NAND=y # CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_AU1550 is not set # CONFIG_MTD_NAND_DISKONCHIP is not set @@ -709,7 +684,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_AU1X00_GPIO is not set # CONFIG_TS_AU1X00_ADS7846 is not set @@ -743,7 +717,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -781,6 +754,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -796,7 +770,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -806,13 +779,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_S1D13XXX is not set @@ -901,19 +873,6 @@ CONFIG_MMC_AU1X=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -941,7 +900,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -994,7 +952,6 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -1024,7 +981,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=y # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1090,7 +1046,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1126,4 +1081,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index 8aea73fae..ad632d87c 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:56 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:59 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_DB1500=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_DB1500=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_DB1500=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y @@ -118,10 +116,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -137,20 +132,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,15 +166,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -293,8 +276,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -307,7 +288,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -322,7 +302,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -333,10 +312,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -406,7 +383,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -593,7 +569,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -603,8 +579,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -649,7 +623,6 @@ CONFIG_MIPS_AU1X00_ENET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -773,7 +746,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -829,7 +801,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -840,7 +811,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -896,18 +866,6 @@ CONFIG_SND_MTPAV=m # CONFIG_SND_CMIPCI is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -951,8 +909,6 @@ CONFIG_SND_AU1X00=m # # PCMCIA devices # -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set # # Open Sound System @@ -1067,12 +1023,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set CONFIG_USB_LD=m # @@ -1116,19 +1070,6 @@ CONFIG_USB_LD=m # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1157,7 +1098,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -1227,7 +1167,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1293,7 +1232,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1353,4 +1291,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig index 90ccb7359..8130e23dc 100644 --- a/arch/mips/configs/db1550_defconfig +++ b/arch/mips/configs/db1550_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:03:59 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:00 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y CONFIG_MIPS_DB1550=y # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_DB1550=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_DB1550=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -136,20 +131,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,15 +165,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -292,8 +275,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -306,7 +287,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -321,7 +301,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -332,10 +311,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -405,7 +382,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -487,7 +463,6 @@ CONFIG_MTD_ALCHEMY=y # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set CONFIG_MTD_NAND_IDS=m CONFIG_MTD_NAND_AU1550=m # CONFIG_MTD_NAND_DISKONCHIP is not set @@ -626,7 +601,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -636,8 +611,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -682,7 +655,6 @@ CONFIG_MIPS_AU1X00_ENET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -814,7 +786,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -870,7 +841,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -880,7 +850,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -937,19 +906,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -978,7 +934,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -1048,7 +1003,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1114,7 +1068,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1174,4 +1127,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/ddb5476_defconfig similarity index 70% rename from arch/mips/configs/wrppmc_defconfig rename to arch/mips/configs/ddb5476_defconfig index 3e4b16b39..8d88ac1bb 100644 --- a/arch/mips/configs/wrppmc_defconfig +++ b/arch/mips/configs/ddb5476_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:21 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:00 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -CONFIG_WR_PPMC=y # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_WR_PPMC=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +CONFIG_DDB5476=y # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,23 +67,21 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +CONFIG_I8259=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y CONFIG_IRQ_CPU=y -CONFIG_MIPS_GT64120=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_BOOT_ELF32=y +CONFIG_DDB5XXX_COMMON=y CONFIG_MIPS_L1_CACHE_SHIFT=5 +CONFIG_HAVE_STD_PC_SERIAL_PORT=y # # CPU selection # -CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R1 is not set # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS64_R1 is not set # CONFIG_CPU_MIPS64_R2 is not set @@ -95,7 +92,7 @@ CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_R4X00 is not set # CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set +CONFIG_CPU_R5432=y # CONFIG_CPU_R6000 is not set # CONFIG_CPU_NEVADA is not set # CONFIG_CPU_R8000 is not set @@ -103,16 +100,11 @@ CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_SYS_HAS_CPU_MIPS32_R2=y -CONFIG_SYS_HAS_CPU_MIPS64_R1=y -CONFIG_SYS_HAS_CPU_NEVADA=y -CONFIG_SYS_HAS_CPU_RM7000=y -CONFIG_CPU_MIPS32=y -CONFIG_CPU_MIPSR1=y +CONFIG_SYS_HAS_CPU_R5432=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y # # Kernel type @@ -123,17 +115,11 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set -# CONFIG_64BIT_PHYS_ADDR is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -143,20 +129,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -170,31 +145,28 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set +CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set +CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y -# CONFIG_EPOLL is not set +CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -202,12 +174,7 @@ CONFIG_BASE_SMALL=0 # # Loadable module support # -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_KMOD is not set +# CONFIG_MODULES is not set # # Block layer @@ -234,6 +201,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_HW_HAS_PCI=y CONFIG_PCI=y +CONFIG_ISA=y CONFIG_MMU=y # @@ -244,16 +212,13 @@ CONFIG_MMU=y # # PCI Hotplug Support # -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats # CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +# CONFIG_BINFMT_MISC is not set CONFIG_TRAD_SIGNALS=y # @@ -266,33 +231,28 @@ CONFIG_NET=y # # CONFIG_NETDEBUG is not set CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y +# CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=y CONFIG_INET=y -CONFIG_IP_MULTICAST=y +# CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_FIB_HASH=y CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_DHCP is not set CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y +# CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set -CONFIG_IP_MROUTE=y -# CONFIG_IP_PIMSM_V1 is not set -# CONFIG_IP_PIMSM_V2 is not set -CONFIG_ARPD=y +# CONFIG_ARPD 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 # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -300,7 +260,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -342,7 +301,13 @@ CONFIG_NETWORK_SECMARK=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_IEEE80211 is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +CONFIG_IEEE80211_CRYPT_CCMP=y +CONFIG_IEEE80211_SOFTMAC=y +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -353,13 +318,13 @@ CONFIG_NETWORK_SECMARK=y # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set +CONFIG_FW_LOADER=y # # Connector - unified userspace <-> kernelspace linker # -# CONFIG_CONNECTOR is not set +CONFIG_CONNECTOR=y +CONFIG_PROC_EVENTS=y # # Memory Technology Devices (MTD) @@ -374,6 +339,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # # Plug and Play support # +# CONFIG_PNP is not set # # Block devices @@ -386,24 +352,52 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CDROM_PKTCDVD=y +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +CONFIG_ATA_OVER_ETH=y # # ATA/ATAPI/MFM/RLL support # -# CONFIG_IDE is not set +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_IDE_SATA is not set +CONFIG_BLK_DEV_IDEDISK=y +# CONFIG_IDEDISK_MULTI_MODE 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 + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +# CONFIG_BLK_DEV_IDEPCI is not set +# CONFIG_IDE_ARM is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_BLK_DEV_HD is not set # # SCSI device support # -# CONFIG_RAID_ATTRS is not set +CONFIG_RAID_ATTRS=y # CONFIG_SCSI is not set +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + # # Multi-device support (RAID and LVM) # @@ -446,50 +440,34 @@ CONFIG_PHYLIB=y # # MII PHY device drivers # -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m +CONFIG_MARVELL_PHY=y +CONFIG_DAVICOM_PHY=y +CONFIG_QSEMI_PHY=y +CONFIG_LXT_PHY=y +CONFIG_CICADA_PHY=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_CASSINI is not set # CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_DM9000 is not set +# CONFIG_NET_VENDOR_RACAL is not set # # Tulip family network device support # # CONFIG_NET_TULIP is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set # CONFIG_HP100 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_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=y -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# 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_LAN_SAA9730 is not set +# CONFIG_NET_ISA is not set +# CONFIG_NET_PCI is not set # # Ethernet (1000 Mbit) @@ -505,7 +483,6 @@ CONFIG_E100=y # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2 is not set @@ -515,7 +492,6 @@ CONFIG_E100=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -553,18 +529,46 @@ CONFIG_E100=y # # Input device support # -# CONFIG_INPUT is not set +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 is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set # # Hardware I/O ports # -# CONFIG_SERIO is not set +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set +CONFIG_SERIO_RAW=y # CONFIG_GAMEPORT is not set # # Character devices # -# CONFIG_VT is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -573,8 +577,8 @@ CONFIG_E100=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=1 -CONFIG_SERIAL_8250_RUNTIME_UARTS=1 +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -596,8 +600,8 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_RTC=y +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -628,15 +632,13 @@ CONFIG_RTC=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # -CONFIG_HWMON=y +# CONFIG_HWMON is not set # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set # # Misc devices @@ -646,7 +648,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -656,8 +657,49 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB is not set +CONFIG_FB=y +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_FIRMWARE_EDID=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA 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_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_SMIVGX is not set +# CONFIG_FB_TRIDENT is not set +# 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 is not set + +# +# Logo configuration +# +# CONFIG_LOGO is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -713,23 +755,12 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # -# CONFIG_EXT2_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set # CONFIG_EXT3_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set @@ -739,12 +770,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set +CONFIG_FUSE_FS=y # # CD-ROM/DVD Filesystems @@ -765,7 +795,7 @@ CONFIG_DNOTIFY=y CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y -CONFIG_TMPFS=y +# CONFIG_TMPFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set @@ -791,21 +821,18 @@ CONFIG_RAMFS=y # Network File Systems # CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -832,23 +859,48 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set +# CONFIG_UNWIND_INFO is not set CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="console=ttyS0,115200n8" +CONFIG_CMDLINE="ip=any" # # Security options # -# CONFIG_KEYS is not set +CONFIG_KEYS=y +CONFIG_KEYS_DEBUG_PROC_KEYS=y # CONFIG_SECURITY is not set # # Cryptographic options # -# CONFIG_CRYPTO is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +CONFIG_CRYPTO_WP512=y +CONFIG_CRYPTO_TGR192=y +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_BLOWFISH=y +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_SERPENT=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_CAST5=y +CONFIG_CRYPTO_CAST6=y +CONFIG_CRYPTO_TEA=y +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_KHAZAD=y +CONFIG_CRYPTO_ANUBIS=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -857,8 +909,9 @@ CONFIG_CMDLINE="console=ttyS0,115200n8" # # Library routines # -CONFIG_CRC_CCITT=y +# CONFIG_CRC_CCITT is not set CONFIG_CRC16=y CONFIG_CRC32=y CONFIG_LIBCRC32C=y -CONFIG_PLIST=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig index b598cf08f..8c911b671 100644 --- a/arch/mips/configs/ddb5477_defconfig +++ b/arch/mips/configs/ddb5477_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:00 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:01 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set CONFIG_DDB5477=y # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_I8259=y @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -134,20 +129,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -179,12 +163,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -270,8 +252,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -279,7 +259,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -339,7 +318,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -437,8 +415,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -501,7 +477,6 @@ CONFIG_PCNET32=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -579,7 +554,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -611,7 +585,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -660,7 +633,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -670,7 +642,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -733,19 +704,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -761,7 +719,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y @@ -828,7 +785,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -855,7 +811,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -897,6 +852,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -911,4 +867,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index 597150b14..d838496e1 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:01 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:01 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set CONFIG_MACH_DECSTATION=y # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MACH_DECSTATION=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MACH_DECSTATION=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -116,10 +114,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_WB=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -133,22 +128,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_128=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -# CONFIG_HZ_1000 is not set -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_128HZ=y -CONFIG_SYS_SUPPORTS_256HZ=y -CONFIG_SYS_SUPPORTS_1024HZ=y -CONFIG_HZ=128 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,12 +163,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -255,8 +235,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -275,8 +253,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -284,7 +260,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +320,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -465,8 +439,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -556,7 +528,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -602,7 +573,6 @@ CONFIG_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -612,13 +582,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_S1D13XXX is not set @@ -690,19 +659,6 @@ CONFIG_LOGO_DEC_CLUT224=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -721,7 +677,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -768,8 +723,6 @@ CONFIG_RAMFS=y # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=y -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -789,7 +742,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -831,19 +783,14 @@ CONFIG_ULTRIX_PARTITION=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set @@ -906,4 +853,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index fa2996bb4..0760f4318 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:02 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:08:20 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -74,7 +73,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -119,10 +117,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -178,12 +162,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -255,7 +237,6 @@ CONFIG_TRAD_SIGNALS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -390,7 +371,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -431,7 +411,6 @@ CONFIG_WATCHDOG=y # CONFIG_PCWATCHDOG is not set # CONFIG_MIXCOMWD is not set # CONFIG_WDT is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -463,6 +442,7 @@ CONFIG_GPIO_VR41XX=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -478,7 +458,6 @@ CONFIG_GPIO_VR41XX=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -487,7 +466,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -549,19 +527,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -576,7 +541,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -645,7 +609,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -674,4 +637,3 @@ CONFIG_CMDLINE="console=ttyVR0,19200 mem=8M" # CONFIG_CRC16 is not set # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/mips/configs/emma2rh_defconfig b/arch/mips/configs/emma2rh_defconfig deleted file mode 100644 index 375b2ac24..000000000 --- a/arch/mips/configs/emma2rh_defconfig +++ /dev/null @@ -1,1241 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:05 2006 -# -CONFIG_MIPS=y - -# -# Machine selection -# -# CONFIG_MIPS_MTX1 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_PB1200 is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_DB1200 is not set -# CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_MIPS_ITE8172 is not set -# CONFIG_MACH_JAZZ is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set -# CONFIG_MIPS_SIM is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_3 is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MIPS_XXS1500 is not set -# CONFIG_PNX8550_V2PCI is not set -# CONFIG_PNX8550_JBS is not set -# CONFIG_DDB5477 is not set -# CONFIG_MACH_VR41XX is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_QEMU is not set -CONFIG_MARKEINS=y -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP27 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SIBYTE_BIGSUR is not set -# CONFIG_SIBYTE_SWARM is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_EMMA2RH=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 - -# -# CPU selection -# -# CONFIG_CPU_MIPS32_R1 is not set -# CONFIG_CPU_MIPS32_R2 is not set -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_VR41XX is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -CONFIG_CPU_R5000=y -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_R5000=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y - -# -# Kernel type -# -CONFIG_32BIT=y -# CONFIG_64BIT is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set -# CONFIG_64BIT_PHYS_ADDR is not set -CONFIG_CPU_HAS_LLSC=y -CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_BKL=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -CONFIG_MMU=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -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_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -# CONFIG_IPV6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NF_CONNTRACK is not set -# CONFIG_NETFILTER_XTABLES is not set - -# -# IP: Netfilter Configuration -# -# CONFIG_IP_NF_CONNTRACK is not set -# CONFIG_IP_NF_QUEUE is not set - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x1e000000 -CONFIG_MTD_PHYSMAP_LEN=0x02000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# 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_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN 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 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC 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 - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_DM9000 is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 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_B44 is not set -# CONFIG_FORCEDETH 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=y -# CONFIG_NE2K_PCI is not set -# 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_LAN_SAA9730 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -# CONFIG_PPP_MPPE is not set -# CONFIG_PPPOE is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_RTC=m -CONFIG_GEN_RTC=m -CONFIG_GEN_RTC_X=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -CONFIG_I2C_DEBUG_CORE=y -# CONFIG_I2C_DEBUG_ALGO is not set -CONFIG_I2C_DEBUG_BUS=y -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS 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_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -CONFIG_CRAMFS=y -# 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_V3_ACL is not set -CONFIG_NFS_V4=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -# CONFIG_NFSD_V4 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -# CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="" -CONFIG_NLS_CODEPAGE_437=m -# 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_ASCII=m -CONFIG_NLS_ISO8859_1=m -# 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=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="console=ttyS0,115200 mem=192m ip=bootp root=/dev/nfs rw" - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig index b0afc118b..7067f608b 100644 --- a/arch/mips/configs/ev64120_defconfig +++ b/arch/mips/configs/ev64120_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:05 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:02 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set CONFIG_MIPS_EV64120=y @@ -33,7 +32,6 @@ CONFIG_MIPS_EV64120=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_EV64120=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -118,10 +116,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -136,20 +131,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,12 +165,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -276,8 +258,6 @@ CONFIG_IP_PNP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -285,7 +265,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +324,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -442,8 +420,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -486,7 +462,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -572,7 +547,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -604,7 +578,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -653,7 +626,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -663,7 +635,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -726,19 +697,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -754,7 +712,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -818,7 +775,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -845,7 +801,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -901,4 +856,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ev96100_defconfig b/arch/mips/configs/ev96100_defconfig index 0bdc10f11..00b56ed0e 100644 --- a/arch/mips/configs/ev96100_defconfig +++ b/arch/mips/configs/ev96100_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:05 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:03 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_EV96100=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_EV96100=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -121,10 +119,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -140,20 +135,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -185,12 +169,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -279,8 +261,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -288,7 +268,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -348,7 +327,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -433,8 +411,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -524,7 +500,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -554,7 +529,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -601,7 +575,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -611,7 +584,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -672,19 +644,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -700,7 +659,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -764,7 +722,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -791,7 +748,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -847,4 +803,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/excite_defconfig b/arch/mips/configs/excite_defconfig deleted file mode 100644 index 045ebd089..000000000 --- a/arch/mips/configs/excite_defconfig +++ /dev/null @@ -1,1245 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:09 2006 -# -CONFIG_MIPS=y - -# -# Machine selection -# -# CONFIG_MIPS_MTX1 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_PB1200 is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_DB1200 is not set -# CONFIG_MIPS_MIRAGE is not set -CONFIG_BASLER_EXCITE=y -# CONFIG_BASLER_EXCITE_PROTOTYPE is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_MIPS_ITE8172 is not set -# CONFIG_MACH_JAZZ is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set -# CONFIG_MIPS_SIM is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_3 is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MIPS_XXS1500 is not set -# CONFIG_PNX8550_V2PCI is not set -# CONFIG_PNX8550_JBS is not set -# CONFIG_DDB5477 is not set -# CONFIG_MACH_VR41XX is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP27 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SIBYTE_BIGSUR is not set -# CONFIG_SIBYTE_SWARM is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_DMA_COHERENT=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_IRQ_CPU_RM7K=y -CONFIG_IRQ_CPU_RM9K=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 - -# -# CPU selection -# -# CONFIG_CPU_MIPS32_R1 is not set -# CONFIG_CPU_MIPS32_R2 is not set -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_VR41XX is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -CONFIG_CPU_RM9000=y -# CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_RM9000=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y - -# -# Kernel type -# -CONFIG_32BIT=y -# CONFIG_64BIT is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_64KB is not set -CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set -# CONFIG_64BIT_PHYS_ADDR is not set -CONFIG_CPU_HAS_LLSC=y -CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 -# CONFIG_PREEMPT_NONE is not set -# CONFIG_PREEMPT_VOLUNTARY is not set -CONFIG_PREEMPT=y -CONFIG_PREEMPT_BKL=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -CONFIG_MMU=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD 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 -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_VERIFY_WRITE=y -# CONFIG_MTD_NAND_ECC_SMC is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_NANDSIM is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# 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_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN 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 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC 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 - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# - -# -# Ethernet (10 or 100Mbit) -# -# CONFIG_NET_ETHERNET 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=m -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=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_RSA is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -# CONFIG_FB_CFB_FILLRECT is not set -# CONFIG_FB_CFB_COPYAREA is not set -# CONFIG_FB_CFB_IMAGEBLIT is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA 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_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_SMIVGX is not set -# CONFIG_FB_TRIDENT is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=m -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -# CONFIG_LOGO is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_UHCI_HCD is not set -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_MON is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -# CONFIG_EXT3_FS is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN 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_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# 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_ASCII is not set -CONFIG_NLS_ISO8859_1=m -# 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 -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="" - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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_WP512 is not set -# CONFIG_CRYPTO_TGR192 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_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index ef16d1fb5..607e2985f 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:10 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:54 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set CONFIG_SGI_IP22=y # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARC=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_64KB is not set CONFIG_BOARD_SCACHE=y CONFIG_IP22_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -141,20 +136,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +171,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -283,8 +265,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -332,10 +312,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -351,8 +328,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -367,11 +342,9 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -381,7 +354,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m # CONFIG_IP_NF_CT_PROTO_SCTP is not set @@ -392,7 +364,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -423,7 +394,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -556,7 +526,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -676,8 +645,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set # # Ethernet (10 or 100Mbit) @@ -775,7 +742,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -808,7 +774,6 @@ CONFIG_WATCHDOG=y # # CONFIG_SOFT_WATCHDOG is not set CONFIG_INDYDOG=m -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set CONFIG_SGI_DS1286=m # CONFIG_GEN_RTC is not set @@ -857,7 +822,6 @@ CONFIG_MAX_RAW_DEVS=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -867,7 +831,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set # @@ -939,19 +902,6 @@ CONFIG_LOGO_SGI_CLUT224=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -969,6 +919,7 @@ CONFIG_FS_MBCACHE=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y # CONFIG_XFS_POSIX_ACL is not set @@ -977,7 +928,6 @@ CONFIG_XFS_SECURITY=y CONFIG_MINIX_FS=m # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=m @@ -1034,8 +984,6 @@ CONFIG_EFS_FS=m # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1065,9 +1013,7 @@ CONFIG_SMB_NLS_DEFAULT=y CONFIG_SMB_NLS_REMOTE="cp437" CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set CONFIG_CODA_FS=m @@ -1150,7 +1096,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1210,4 +1155,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index 4bf1ee7f5..f724b4b2e 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:10 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:04 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set CONFIG_SGI_IP27=y # CONFIG_SGI_IP32 is not set @@ -64,17 +63,16 @@ CONFIG_SGI_IP27=y # CONFIG_TOSHIBA_JMR3927 is not set # CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_SGI_SN_M_MODE=y -# CONFIG_SGI_SN_N_MODE is not set +# CONFIG_SGI_SN0_N_MODE is not set +CONFIG_ARCH_DISCONTIGMEM_ENABLE=y +CONFIG_NUMA=y # CONFIG_MAPPED_KERNEL is not set # CONFIG_REPLICATE_KTEXT is not set # CONFIG_REPLICATE_EXHANDLERS is not set -CONFIG_EARLY_PRINTK=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARC=y CONFIG_DMA_IP27=y CONFIG_CPU_BIG_ENDIAN=y @@ -121,19 +119,12 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_IRQ_PER_CPU=y CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_NUMA=y -CONFIG_SYS_SUPPORTS_NUMA=y CONFIG_NODES_SHIFT=6 CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set @@ -145,25 +136,13 @@ CONFIG_NEED_MULTIPLE_NODES=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_SMP=y -CONFIG_SYS_SUPPORTS_SMP=y CONFIG_NR_CPUS=64 -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y # CONFIG_MIPS_INSANE_LARGE is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -197,12 +176,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -299,8 +276,6 @@ CONFIG_IP_PNP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -308,7 +283,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -406,7 +380,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -499,7 +472,6 @@ CONFIG_SCSI_SAS_ATTRS=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -523,8 +495,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=y CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -580,8 +553,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -589,6 +560,8 @@ CONFIG_SMSC_PHY=m CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_SGI_IOC3_ETH=y +CONFIG_SGI_IOC3_ETH_HW_RX_CSUM=y +CONFIG_SGI_IOC3_ETH_HW_TX_CSUM=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_CASSINI is not set @@ -625,7 +598,6 @@ CONFIG_SGI_IOC3_ETH=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -716,7 +688,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set CONFIG_SGI_IP27_RTC=y # CONFIG_GEN_RTC is not set @@ -766,7 +737,6 @@ CONFIG_SGI_IP27_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -776,7 +746,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -833,19 +802,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -873,7 +829,6 @@ CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_QUOTACTL=y CONFIG_DNOTIFY=y @@ -941,7 +896,6 @@ CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -983,7 +937,6 @@ CONFIG_SGI_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=15 # CONFIG_DEBUG_FS is not set @@ -1039,4 +992,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index f83dc09c3..8f11d3565 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:11 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:05 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set CONFIG_SGI_IP32=y @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARC=y CONFIG_DMA_IP32=y CONFIG_DMA_NONCOHERENT=y @@ -124,10 +122,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_R5000_CPU_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -141,20 +136,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +171,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -281,8 +263,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -290,7 +270,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -350,7 +329,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -449,7 +427,6 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -514,8 +491,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -559,7 +534,6 @@ CONFIG_SGI_O2MACE_ETH=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -639,7 +613,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -671,7 +644,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -720,7 +692,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -730,7 +701,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -793,19 +763,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -821,7 +778,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -887,7 +843,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -925,7 +880,6 @@ CONFIG_SGI_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -967,6 +921,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -981,4 +936,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/it8172_defconfig b/arch/mips/configs/it8172_defconfig index a91d72a9c..757adf238 100644 --- a/arch/mips/configs/it8172_defconfig +++ b/arch/mips/configs/it8172_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:11 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:05 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_ITE8172=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_ITE8172=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -118,10 +116,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,15 +165,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -276,8 +259,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -285,7 +266,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +325,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -527,8 +506,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -617,7 +594,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_QTRONIX_KEYBOARD is not set # CONFIG_IT8172_SCR0 is not set @@ -651,7 +627,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -698,7 +673,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -708,7 +682,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -782,19 +755,6 @@ CONFIG_SOUND_IT8172=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -810,7 +770,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -876,7 +835,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -903,7 +861,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -959,4 +916,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ivr_defconfig b/arch/mips/configs/ivr_defconfig index cebc67212..021761a8a 100644 --- a/arch/mips/configs/ivr_defconfig +++ b/arch/mips/configs/ivr_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:12 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:06 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_IVR=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_IVR=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -115,10 +113,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -132,20 +127,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -178,12 +162,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -274,8 +256,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -283,7 +263,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -343,7 +322,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -462,8 +440,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -506,7 +482,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -584,7 +559,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set CONFIG_QTRONIX_KEYBOARD=y CONFIG_IT8172_SCR0=y @@ -619,7 +593,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -667,7 +640,6 @@ CONFIG_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -677,7 +649,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -740,19 +711,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -768,7 +726,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -832,7 +789,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -859,7 +815,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -915,4 +870,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig index 5d9eb11ab..08f6c30b0 100644 --- a/arch/mips/configs/jaguar-atx_defconfig +++ b/arch/mips/configs/jaguar-atx_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:12 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:06 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set CONFIG_MOMENCO_JAGUAR_ATX=y # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MOMENCO_JAGUAR_ATX=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_LIMITED_DMA=y @@ -124,10 +122,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -141,20 +136,10 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 +# CONFIG_SMP is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -185,12 +170,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -277,8 +260,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -291,10 +272,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -330,7 +308,6 @@ CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -425,8 +402,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -448,7 +423,6 @@ CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set CONFIG_EEPRO100=y @@ -489,7 +463,6 @@ CONFIG_MV643XX_ETH_2=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -567,7 +540,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -614,7 +586,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -624,7 +595,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -680,19 +650,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # Real Time Clock # -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -705,7 +662,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -758,7 +714,6 @@ CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -778,7 +733,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -834,4 +788,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index be45a9044..38b1e026e 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:12 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:07 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -114,10 +112,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -130,21 +125,10 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_RTC_DS1742=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -176,12 +160,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -267,8 +249,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -276,7 +256,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -336,7 +315,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -434,8 +412,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -478,7 +454,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -556,7 +531,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set @@ -601,7 +575,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -650,7 +623,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -660,13 +632,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set @@ -758,19 +729,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -784,7 +742,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -848,7 +805,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -875,7 +831,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -917,6 +872,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -931,4 +887,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig index 64dc9f45a..4d25990a0 100644 --- a/arch/mips/configs/lasat200_defconfig +++ b/arch/mips/configs/lasat200_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:12 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:07 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_LASAT=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_LASAT=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -72,7 +71,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_MIPS_NILE4=y @@ -121,10 +119,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_64KB is not set CONFIG_BOARD_SCACHE=y CONFIG_R5000_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -139,20 +134,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -184,15 +168,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -276,8 +259,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -285,7 +266,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +325,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -569,8 +548,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -613,7 +590,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -691,7 +667,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -723,7 +698,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -772,7 +746,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -782,7 +755,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -845,19 +817,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -879,7 +838,6 @@ CONFIG_FS_MBCACHE=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -946,7 +904,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -973,7 +930,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1029,4 +985,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index 2690baf15..977f52be5 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:13 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:08 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set CONFIG_MIPS_MALTA=y # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_MALTA=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y @@ -130,21 +128,19 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_BOARD_SCACHE=y -CONFIG_MIPS_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_MIPS_MT_DISABLED is not set +CONFIG_MIPS_MT=y # CONFIG_MIPS_MT_SMTC is not set # CONFIG_MIPS_MT_SMP is not set CONFIG_MIPS_VPE_LOADER=y -CONFIG_MIPS_MT=y -CONFIG_SYS_SUPPORTS_MULTITHREADING=y CONFIG_MIPS_MT_FPAFF=y CONFIG_MIPS_VPE_LOADER_TOM=y CONFIG_MIPS_VPE_APSP_API=y CONFIG_MIPS_APSP_KSPD=y # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y +# CONFIG_CPU_MIPSR2_IRQ_VI is not set +# CONFIG_CPU_MIPSR2_IRQ_EI is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -158,20 +154,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -CONFIG_HZ_100=y -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -# CONFIG_HZ_1000 is not set -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -203,12 +188,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -310,8 +293,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -359,10 +340,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -379,8 +357,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -396,11 +372,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -410,7 +384,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -421,7 +394,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -452,7 +424,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -614,7 +585,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -769,7 +739,6 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -794,8 +763,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -851,8 +821,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -915,7 +883,6 @@ CONFIG_PCNET32=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -994,7 +961,6 @@ CONFIG_SERIO_SERPORT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -1026,7 +992,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -1074,7 +1039,6 @@ CONFIG_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -1084,7 +1048,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -1147,19 +1110,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1186,6 +1136,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y @@ -1194,7 +1145,6 @@ CONFIG_XFS_POSIX_ACL=y CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -1252,8 +1202,6 @@ CONFIG_VXFS_FS=m # CONFIG_QNX4FS_FS is not set CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1278,7 +1226,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1344,7 +1291,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1403,4 +1349,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig index c298979c1..00560e014 100644 --- a/arch/mips/configs/mipssim_defconfig +++ b/arch/mips/configs/mipssim_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:13 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:09 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set CONFIG_MIPS_SIM=y # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_SIM=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -117,10 +115,14 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y +CONFIG_MIPS_MT=y # CONFIG_MIPS_MT_SMTC is not set # CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +CONFIG_MIPS_VPE_LOADER=y +CONFIG_MIPS_MT_FPAFF=y +CONFIG_MIPS_VPE_LOADER_TOM=y +CONFIG_MIPS_VPE_APSP_API=y +CONFIG_MIPS_APSP_KSPD=y # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -136,20 +138,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,12 +173,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -283,8 +272,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -292,7 +279,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -388,7 +374,6 @@ CONFIG_NET_ESTIMATOR=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -573,7 +558,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -604,6 +588,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -619,7 +604,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -629,7 +613,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -684,19 +667,6 @@ CONFIG_VIDEO_V4L2=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -708,6 +678,7 @@ CONFIG_EXT2_FS=y # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y # CONFIG_INOTIFY is not set @@ -775,7 +746,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -802,19 +772,14 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DETECT_SOFTLOCKUP is not set # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_VM is not set @@ -872,4 +837,3 @@ CONFIG_CRYPTO_MD5=y CONFIG_CRC16=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index 938b38ab5..286a01837 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:15 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:09 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -76,7 +75,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -121,10 +119,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -137,20 +132,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,12 +166,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -289,8 +271,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -298,7 +278,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -359,7 +338,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -498,7 +476,6 @@ CONFIG_MII=m # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -547,10 +524,8 @@ CONFIG_PCMCIA_HERMES=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # # CONFIG_PRISM54 is not set -# CONFIG_USB_ZD1201 is not set # CONFIG_HOSTAP is not set # CONFIG_BCM43XX is not set -# CONFIG_ZD1211RW is not set CONFIG_NET_WIRELESS=y # @@ -632,7 +607,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -658,7 +632,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -715,7 +688,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -726,7 +698,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -820,6 +791,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_PEGASUS=m # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set # CONFIG_USB_MON is not set # @@ -841,12 +813,10 @@ CONFIG_USB_PEGASUS=m # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -891,19 +861,6 @@ CONFIG_USB_PEGASUS=m # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -919,7 +876,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y @@ -982,7 +938,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1009,7 +964,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1065,4 +1019,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig index ec5758f22..1ce4310fd 100644 --- a/arch/mips/configs/ocelot_3_defconfig +++ b/arch/mips/configs/ocelot_3_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:15 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:10 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MOMENCO_OCELOT_3=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -122,10 +120,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -141,20 +136,10 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 +# CONFIG_SMP is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +172,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -283,8 +266,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -303,10 +284,7 @@ CONFIG_IPV6_ROUTE_INFO=y # CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -321,7 +299,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -332,10 +309,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -411,7 +386,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -502,7 +476,6 @@ CONFIG_ISCSI_TCP=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -568,8 +541,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -636,7 +607,6 @@ CONFIG_MV643XX_ETH_2=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -720,7 +690,6 @@ CONFIG_SERIO=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -752,7 +721,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -800,7 +768,6 @@ CONFIG_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -810,13 +777,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set @@ -915,19 +881,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -948,6 +901,7 @@ CONFIG_REISERFS_FS=m # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set @@ -956,7 +910,6 @@ CONFIG_XFS_FS=m # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y @@ -1028,7 +981,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1094,7 +1046,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1153,4 +1104,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig index 0d33d87de..8a6aa5012 100644 --- a/arch/mips/configs/ocelot_c_defconfig +++ b/arch/mips/configs/ocelot_c_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:16 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:10 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MOMENCO_OCELOT_C=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -120,10 +118,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -138,20 +133,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -183,12 +167,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -276,8 +258,6 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -285,7 +265,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +324,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -443,8 +421,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -488,7 +464,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -566,7 +541,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -598,7 +572,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -647,7 +620,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -657,7 +629,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -720,19 +691,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -748,7 +706,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -815,7 +772,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -842,7 +798,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -884,6 +839,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -898,4 +854,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig index 4b9991027..f9ee35eeb 100644 --- a/arch/mips/configs/ocelot_defconfig +++ b/arch/mips/configs/ocelot_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:16 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:11 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set CONFIG_MOMENCO_OCELOT=y @@ -43,11 +41,12 @@ CONFIG_MOMENCO_OCELOT=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -142,20 +137,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +171,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -276,8 +258,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -285,7 +265,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -345,7 +324,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -431,8 +409,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -521,7 +497,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -551,7 +526,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -598,7 +572,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -608,7 +581,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -669,19 +641,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -697,7 +656,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -764,7 +722,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -791,7 +748,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -833,6 +789,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -847,4 +804,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig index 827b344f6..b48bdee24 100644 --- a/arch/mips/configs/ocelot_g_defconfig +++ b/arch/mips/configs/ocelot_g_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:16 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:11 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MOMENCO_OCELOT_G=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_CPU_BIG_ENDIAN=y @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y CONFIG_BOARD_SCACHE=y CONFIG_RM7000_CPU_SCACHE=y CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -141,20 +136,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -186,12 +170,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -279,8 +261,6 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -288,7 +268,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -348,7 +327,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -446,8 +424,6 @@ CONFIG_DAVICOM_PHY=y CONFIG_QSEMI_PHY=y CONFIG_LXT_PHY=y CONFIG_CICADA_PHY=y -CONFIG_VITESSE_PHY=y -CONFIG_SMSC_PHY=y # # Ethernet (10 or 100Mbit) @@ -491,7 +467,6 @@ CONFIG_GALILEO_64240_ETH=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -569,7 +544,6 @@ CONFIG_SERIO_RAW=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -601,7 +575,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -650,7 +623,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -660,7 +632,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -723,19 +694,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -751,7 +709,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -818,7 +775,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -845,7 +801,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -887,6 +842,7 @@ CONFIG_CRYPTO_ANUBIS=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_MICHAEL_MIC=y CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices @@ -901,4 +857,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 9ed60fef6..01aac4063 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:17 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:12 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_PB1100=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_PB1100=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_PB1100=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -118,10 +116,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -137,20 +132,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,15 +166,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -288,8 +271,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -302,7 +283,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -317,7 +297,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -328,10 +307,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -401,7 +378,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -561,8 +537,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -666,7 +640,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_AU1X00_GPIO is not set # CONFIG_TS_AU1X00_ADS7846 is not set @@ -700,7 +673,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -754,7 +726,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -764,7 +735,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -826,19 +796,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -867,7 +824,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -937,7 +893,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1003,7 +958,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1063,4 +1017,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index 6774254b1..398c3c265 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:17 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:13 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_PB1500=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_PB1500=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_PB1500=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -136,20 +131,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,15 +165,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -293,8 +276,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -307,7 +288,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -322,7 +302,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -333,10 +312,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -406,7 +383,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -621,7 +597,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -631,8 +607,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -677,7 +651,6 @@ CONFIG_MIPS_AU1X00_ENET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -809,7 +782,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -865,7 +837,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -875,7 +846,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -932,19 +902,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -973,7 +930,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -1043,7 +999,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1109,7 +1064,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1169,4 +1123,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 1afe5bf6e..ea282a53b 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:17 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:13 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS_PB1550=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS_PB1550=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_PB1550=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_64BIT_PHYS_ADDR=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -136,20 +131,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -181,15 +165,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -293,8 +276,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -307,7 +288,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -322,7 +302,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -333,10 +312,8 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -406,7 +383,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -621,7 +597,7 @@ CONFIG_NETDEVICES=y # # PHY device support # -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers @@ -631,8 +607,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -677,7 +651,6 @@ CONFIG_MIPS_AU1X00_ENET=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -801,7 +774,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -857,7 +829,6 @@ CONFIG_SYNCLINK_CS=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -867,7 +838,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -924,19 +894,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -965,7 +922,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -1035,7 +991,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1101,7 +1056,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1161,4 +1115,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig index ac616c82d..4c57e564d 100644 --- a/arch/mips/configs/pnx8550-jbs_defconfig +++ b/arch/mips/configs/pnx8550-jbs_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:18 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:14 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -42,13 +40,14 @@ CONFIG_MIPS=y # CONFIG_MOMENCO_OCELOT_G is not set # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set -# CONFIG_PNX8550_JBS is not set +CONFIG_PNX8550_JBS=y +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set -CONFIG_SGI_IP22=y +# CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set # CONFIG_SIBYTE_BIGSUR is not set @@ -68,25 +67,19 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARC=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_ARC32=y -CONFIG_BOOT_ELF32=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_PNX8550=y +CONFIG_SOC_PNX8550=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_ARC_CONSOLE is not set -CONFIG_ARC_PROMLIB=y # # CPU selection # -# CONFIG_CPU_MIPS32_R1 is not set +CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS64_R1 is not set # CONFIG_CPU_MIPS64_R2 is not set @@ -94,7 +87,7 @@ CONFIG_ARC_PROMLIB=y # CONFIG_CPU_TX39XX is not set # CONFIG_CPU_VR41XX is not set # CONFIG_CPU_R4300 is not set -CONFIG_CPU_R4X00=y +# CONFIG_CPU_R4X00 is not set # CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set # CONFIG_CPU_R5432 is not set @@ -105,12 +98,11 @@ CONFIG_CPU_R4X00=y # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_R4X00=y -CONFIG_SYS_HAS_CPU_R5000=y +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y # # Kernel type @@ -121,17 +113,14 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_BOARD_SCACHE=y -CONFIG_IP22_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +CONFIG_CPU_HAS_PREFETCH=y +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -141,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -188,12 +166,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -230,8 +206,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) # -CONFIG_HW_HAS_EISA=y -# CONFIG_EISA is not set +CONFIG_HW_HAS_PCI=y +CONFIG_PCI=y +# CONFIG_PCI_DEBUG is not set CONFIG_MMU=y # @@ -242,6 +219,7 @@ CONFIG_MMU=y # # PCI Hotplug Support # +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -262,8 +240,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -282,8 +258,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -291,7 +265,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -346,7 +319,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -370,10 +342,16 @@ CONFIG_FW_LOADER=y # # Block devices # +# 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_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 @@ -403,8 +381,38 @@ CONFIG_BLK_DEV_IDESCSI=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +CONFIG_BLK_DEV_OFFBOARD=y +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 is not set +# 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=y +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_IT821X 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_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set # CONFIG_IDEDMA_AUTO is not set # CONFIG_BLK_DEV_HD is not set @@ -444,8 +452,31 @@ CONFIG_SCSI_ISCSI_ATTRS=m # SCSI low-level drivers # CONFIG_ISCSI_TCP=m -# CONFIG_SGIWD93_SCSI is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# 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_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN 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 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC 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 # @@ -457,14 +488,19 @@ CONFIG_ISCSI_TCP=m # Fusion MPT device support # # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support # +# CONFIG_I2O is not set # # Network device support @@ -475,6 +511,11 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + # # PHY device support # @@ -485,20 +526,71 @@ CONFIG_NETDEVICES=y # CONFIG_NET_ETHERNET=y CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set # CONFIG_DM9000 is not set -# CONFIG_SGISEEQ is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 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_B44 is not set +# CONFIG_FORCEDETH 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 is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_TUNE_TWISTER=y +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET 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_LAN_SAA9730 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_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set # # Ethernet (10000 Mbit) # +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set # # Token Ring devices # +# CONFIG_TR is not set # # Wireless LAN (non-hamradio) @@ -509,8 +601,11 @@ CONFIG_MII=y # Wan interfaces # # CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set +# CONFIG_NET_FC is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -555,6 +650,7 @@ CONFIG_INPUT=y CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set @@ -565,7 +661,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -576,7 +671,8 @@ CONFIG_VT_HW_CONSOLE_BINDING=y # # Non-8250 serial port support # -# CONFIG_SERIAL_IP22_ZILOG is not set +# CONFIG_SERIAL_IP3106 is not set +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -590,16 +686,16 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set -# CONFIG_SGI_DS1286 is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # @@ -622,13 +718,13 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_HWMON_DEBUG_CHIP is not set @@ -640,24 +736,22 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_SGI_NEWPORT_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # @@ -668,14 +762,125 @@ CONFIG_DUMMY_CONSOLE=y # # USB support # -# CONFIG_USB_ARCH_HAS_HCD is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +# CONFIG_USB_HID is not set + +# +# USB HID Boot Protocol drivers +# +# CONFIG_USB_KBD is not set +# CONFIG_USB_MOUSE is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_LD is not set + +# +# USB DSL modem support +# + # # USB Gadget Support # @@ -702,6 +907,7 @@ CONFIG_DUMMY_CONSOLE=y # # InfiniBand support # +# CONFIG_INFINIBAND is not set # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -712,19 +918,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -740,7 +933,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set @@ -812,7 +1004,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -823,7 +1014,6 @@ CONFIG_SUNRPC=y # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -CONFIG_SGI_PARTITION=y # # Native Language Support @@ -879,20 +1069,15 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set CONFIG_DEBUG_SLAB=y # CONFIG_DEBUG_SLAB_LEAK is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set @@ -952,4 +1137,3 @@ CONFIG_CRC_CCITT=m # CONFIG_CRC16 is not set CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/pnx8550-v2pci_defconfig b/arch/mips/configs/pnx8550-v2pci_defconfig index a8eb51bae..3c8f35162 100644 --- a/arch/mips/configs/pnx8550-v2pci_defconfig +++ b/arch/mips/configs/pnx8550-v2pci_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:18 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:14 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -41,14 +39,15 @@ CONFIG_MIPS=y # CONFIG_MOMENCO_OCELOT_C is not set # CONFIG_MOMENCO_OCELOT_G is not set # CONFIG_MIPS_XXS1500 is not set -# CONFIG_PNX8550_V2PCI is not set +CONFIG_PNX8550_V2PCI=y # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set -CONFIG_SGI_IP22=y +# CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set # CONFIG_SIBYTE_BIGSUR is not set @@ -68,25 +67,19 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARC=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y -CONFIG_CPU_BIG_ENDIAN=y -# CONFIG_CPU_LITTLE_ENDIAN is not set -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_ARC32=y -CONFIG_BOOT_ELF32=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_PNX8550=y +CONFIG_SOC_PNX8550=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_ARC_CONSOLE is not set -CONFIG_ARC_PROMLIB=y # # CPU selection # -# CONFIG_CPU_MIPS32_R1 is not set +CONFIG_CPU_MIPS32_R1=y # CONFIG_CPU_MIPS32_R2 is not set # CONFIG_CPU_MIPS64_R1 is not set # CONFIG_CPU_MIPS64_R2 is not set @@ -94,7 +87,7 @@ CONFIG_ARC_PROMLIB=y # CONFIG_CPU_TX39XX is not set # CONFIG_CPU_VR41XX is not set # CONFIG_CPU_R4300 is not set -CONFIG_CPU_R4X00=y +# CONFIG_CPU_R4X00 is not set # CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set # CONFIG_CPU_R5432 is not set @@ -105,12 +98,11 @@ CONFIG_CPU_R4X00=y # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_R4X00=y -CONFIG_SYS_HAS_CPU_R5000=y +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y -CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y # # Kernel type @@ -121,17 +113,14 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_BOARD_SCACHE=y -CONFIG_IP22_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +CONFIG_CPU_HAS_PREFETCH=y +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -141,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +165,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -229,8 +205,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # # Bus options (PCI, PCMCIA, EISA, ISA, TC) # -CONFIG_HW_HAS_EISA=y -# CONFIG_EISA is not set +CONFIG_HW_HAS_PCI=y +CONFIG_PCI=y CONFIG_MMU=y # @@ -241,6 +217,7 @@ CONFIG_MMU=y # # PCI Hotplug Support # +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -261,8 +238,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set @@ -281,8 +256,6 @@ CONFIG_IP_PNP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -301,10 +274,7 @@ CONFIG_IPV6_ROUTE_INFO=y # CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -317,7 +287,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -325,13 +294,10 @@ CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -401,7 +367,6 @@ CONFIG_NET_CLS_ROUTE=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -425,10 +390,16 @@ CONFIG_FW_LOADER=y # # Block devices # +# 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_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 @@ -458,9 +429,40 @@ CONFIG_IDEDISK_MULTI_MODE=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_IDEPCI=y +CONFIG_IDEPCI_SHARE_IRQ=y +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_GENERIC is not set +# 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_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_IT821X 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_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y # CONFIG_BLK_DEV_HD is not set # @@ -499,8 +501,36 @@ CONFIG_SCSI_ISCSI_ATTRS=m # SCSI low-level drivers # CONFIG_ISCSI_TCP=m -# CONFIG_SGIWD93_SCSI is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_FUTURE_DOMAIN 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 is not set +# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_LPFC 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 # @@ -512,14 +542,19 @@ CONFIG_ISCSI_TCP=m # Fusion MPT device support # # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support # +# CONFIG_IEEE1394 is not set # # I2O device support # +# CONFIG_I2O is not set # # Network device support @@ -530,6 +565,11 @@ CONFIG_NETDEVICES=y # CONFIG_EQUALIZER is not set CONFIG_TUN=m +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + # # PHY device support # @@ -540,20 +580,71 @@ CONFIG_TUN=m # CONFIG_NET_ETHERNET=y CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set # CONFIG_DM9000 is not set -# CONFIG_SGISEEQ is not set + +# +# Tulip family network device support +# +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 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_B44 is not set +# CONFIG_FORCEDETH 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=y +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET 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_LAN_SAA9730 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_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set # # Ethernet (10000 Mbit) # +# CONFIG_CHELSIO_T1 is not set +# CONFIG_IXGB is not set +# CONFIG_S2IO is not set # # Token Ring devices # +# CONFIG_TR is not set # # Wireless LAN (non-hamradio) @@ -564,6 +655,8 @@ CONFIG_MII=y # Wan interfaces # # CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set @@ -574,6 +667,7 @@ CONFIG_PPP_DEFLATE=m CONFIG_PPP_MPPE=m # CONFIG_PPPOE is not set # CONFIG_SLIP is not set +# CONFIG_NET_FC is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set @@ -629,6 +723,7 @@ CONFIG_MOUSE_PS2=y CONFIG_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set @@ -639,7 +734,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y # CONFIG_VT_CONSOLE is not set CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set @@ -649,6 +743,7 @@ CONFIG_SERIAL_NONSTANDARD=y # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set # CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set # CONFIG_N_HDLC is not set # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -664,7 +759,8 @@ CONFIG_SERIAL_NONSTANDARD=y # # Non-8250 serial port support # -# CONFIG_SERIAL_IP22_ZILOG is not set +# CONFIG_SERIAL_IP3106 is not set +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -678,16 +774,16 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set -# CONFIG_SGI_DS1286 is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set # # Ftape, the floppy tape device driver # +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set # @@ -708,14 +804,29 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_ALGOBIT=m # CONFIG_I2C_ALGOPCF is not set # CONFIG_I2C_ALGOPCA is not set -# CONFIG_I2C_ALGO_SGI is not set # # I2C Hardware Bus support # -# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_I810 is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_PROSAVAGE is not set +# CONFIG_I2C_SAVAGE4 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set # CONFIG_I2C_STUB is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set +# CONFIG_I2C_VOODOO3 is not set # CONFIG_I2C_PCA_ISA is not set # @@ -742,13 +853,13 @@ CONFIG_I2C_ALGOBIT=m # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -775,11 +886,12 @@ CONFIG_HWMON=y # CONFIG_SENSORS_LM92 is not set # CONFIG_SENSORS_MAX1619 is not set # CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_VIA686A is not set +# CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -794,33 +906,50 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set # CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA 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_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_SMIVGX is not set +# CONFIG_FB_TRIDENT is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_SGI_NEWPORT_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE is not set @@ -838,14 +967,123 @@ CONFIG_DUMMY_CONSOLE=y # # USB support # -# CONFIG_USB_ARCH_HAS_HCD is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +CONFIG_USB_MON=y + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + # # USB Gadget Support # @@ -872,6 +1110,7 @@ CONFIG_DUMMY_CONSOLE=y # # InfiniBand support # +# CONFIG_INFINIBAND is not set # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -882,19 +1121,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -912,6 +1138,7 @@ CONFIG_FS_MBCACHE=y # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set @@ -920,7 +1147,6 @@ CONFIG_XFS_FS=m # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y @@ -993,7 +1219,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1004,7 +1229,6 @@ CONFIG_SMB_FS=m # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y -CONFIG_SGI_PARTITION=y # # Native Language Support @@ -1060,7 +1284,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1119,4 +1342,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/qemu_defconfig b/arch/mips/configs/qemu_defconfig index 6a63a113b..4bcc01dea 100644 --- a/arch/mips/configs/qemu_defconfig +++ b/arch/mips/configs/qemu_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:18 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:15 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set CONFIG_QEMU=y -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_COHERENT=y CONFIG_GENERIC_ISA_DMA=y CONFIG_I8259=y @@ -117,10 +115,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -128,25 +123,14 @@ CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -CONFIG_HZ_100=y -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -# CONFIG_HZ_1000 is not set -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=100 +# CONFIG_SMP is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -180,7 +164,6 @@ CONFIG_ELF_CORE=y # CONFIG_EPOLL is not set # CONFIG_SHMEM is not set CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y CONFIG_TINY_SHMEM=y CONFIG_BASE_SMALL=1 # CONFIG_SLOB is not set @@ -245,8 +228,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -265,8 +246,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -274,7 +253,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -307,7 +285,6 @@ CONFIG_NETWORK_SECMARK=y CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -489,7 +466,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -519,7 +495,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -564,7 +539,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -574,7 +548,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -636,19 +609,6 @@ CONFIG_DUMMY_CONSOLE=y # Real Time Clock # -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -661,7 +621,6 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set @@ -716,7 +675,6 @@ CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -736,7 +694,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set diff --git a/arch/mips/configs/rbhma4500_defconfig b/arch/mips/configs/rbhma4500_defconfig index 6779f449b..3d441932e 100644 --- a/arch/mips/configs/rbhma4500_defconfig +++ b/arch/mips/configs/rbhma4500_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:19 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:16 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -75,7 +74,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y CONFIG_GENERIC_ISA_DMA=y @@ -126,10 +124,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -143,20 +138,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -193,10 +177,10 @@ CONFIG_BASE_FULL=y # CONFIG_EPOLL is not set CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=y # # Loadable module support @@ -264,8 +248,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -285,8 +267,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -305,10 +285,7 @@ CONFIG_IPV6_ROUTE_INFO=y # CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -323,7 +300,6 @@ CONFIG_NETFILTER_XTABLES=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m @@ -331,13 +307,10 @@ CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -414,7 +387,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -645,8 +617,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -727,7 +697,6 @@ CONFIG_NET_PCI=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -753,7 +722,7 @@ CONFIG_NET_RADIO=y # CONFIG_IPW2100 is not set CONFIG_IPW2200=m # CONFIG_IPW2200_MONITOR is not set -# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW_QOS is not set # CONFIG_IPW2200_DEBUG is not set # CONFIG_HERMES is not set # CONFIG_ATMEL is not set @@ -762,10 +731,8 @@ CONFIG_IPW2200=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # # CONFIG_PRISM54 is not set -# CONFIG_USB_ZD1201 is not set # CONFIG_HOSTAP is not set # CONFIG_BCM43XX is not set -# CONFIG_ZD1211RW is not set CONFIG_NET_WIRELESS=y # @@ -853,7 +820,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -883,7 +849,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -923,7 +888,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_HWMON_DEBUG_CHIP is not set @@ -935,7 +899,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -946,13 +909,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set @@ -1076,6 +1038,7 @@ CONFIG_USB_YEALINK=m # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set CONFIG_USB_MON=y # @@ -1097,12 +1060,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_LD is not set # @@ -1146,19 +1107,6 @@ CONFIG_USB_MON=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1179,6 +1127,7 @@ CONFIG_REISERFS_FS=m # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set @@ -1187,7 +1136,6 @@ CONFIG_XFS_FS=m # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set @@ -1238,7 +1186,6 @@ CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -1272,7 +1219,6 @@ CONFIG_SUNRPC=y CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1338,7 +1284,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index b7826d3a2..edfb9679a 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:19 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:16 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARC=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMA_NONCOHERENT=y @@ -110,7 +108,6 @@ CONFIG_CPU_R4X00=y # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set CONFIG_SYS_HAS_CPU_R4X00=y -CONFIG_SYS_HAS_CPU_R5000=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y @@ -125,12 +122,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_BOARD_SCACHE=y -CONFIG_R5000_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -146,20 +138,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -193,12 +174,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -294,8 +273,6 @@ CONFIG_IP_PIMSM_V2=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -314,10 +291,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -334,8 +308,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m @@ -350,11 +322,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -364,7 +334,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -375,7 +344,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -406,7 +374,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -585,7 +552,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -607,7 +573,6 @@ CONFIG_PARPORT_SERIAL=m # CONFIG_PARPORT_PC_SUPERIO is not set CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -727,7 +692,6 @@ CONFIG_MEGARAID_MAILBOX=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set @@ -774,8 +738,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +# CONFIG_MD_RAID6 is not set CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -831,8 +796,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -914,7 +877,6 @@ CONFIG_VIA_VELOCITY=m # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -1006,7 +968,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -1044,7 +1005,6 @@ CONFIG_TIPAR=m # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=m # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -1078,13 +1038,12 @@ CONFIG_RTC=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # # CONFIG_W1_MASTER_MATROX is not set -# CONFIG_W1_MASTER_DS2490 is not set +# CONFIG_W1_MASTER_DS9490 is not set # # 1-wire Slaves @@ -1107,7 +1066,6 @@ CONFIG_W1_CON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -1118,7 +1076,6 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -1157,7 +1114,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1256,7 +1212,6 @@ CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m CONFIG_USB_SERIAL_ANYDATA=m -# CONFIG_USB_SERIAL_ARK3116 is not set CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m @@ -1297,7 +1252,6 @@ CONFIG_USB_SERIAL_SAFE_PADDED=y # CONFIG_USB_SERIAL_TI is not set CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m -# CONFIG_USB_SERIAL_OPTION is not set CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_EZUSB=y @@ -1311,12 +1265,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CY7C63 is not set CONFIG_USB_CYTHERM=m CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set CONFIG_USB_SISUSBVGA=m # CONFIG_USB_SISUSBVGA_CON is not set CONFIG_USB_LD=m @@ -1363,19 +1315,6 @@ CONFIG_USB_TEST=m # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1398,6 +1337,7 @@ CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y # CONFIG_XFS_POSIX_ACL is not set @@ -1406,7 +1346,6 @@ CONFIG_XFS_SECURITY=y CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_QUOTACTL=y CONFIG_DNOTIFY=y @@ -1465,8 +1404,6 @@ CONFIG_HPFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1493,9 +1430,7 @@ CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1587,7 +1522,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1647,4 +1581,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 625c1c619..e388a3dae 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:19 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:17 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -85,7 +84,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_COHERENT=y CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set @@ -134,16 +132,12 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_64KB is not set # CONFIG_SIBYTE_DMA_PAGEOPS is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_SB1_PASS_1_WORKAROUNDS=y CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_IRQ_PER_CPU=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_SYS_SUPPORTS_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y @@ -155,24 +149,12 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y CONFIG_SMP=y -CONFIG_SYS_SUPPORTS_SMP=y CONFIG_NR_CPUS=2 -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -205,12 +187,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -305,8 +285,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -314,7 +292,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -374,7 +351,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -496,8 +472,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -541,7 +515,6 @@ CONFIG_NET_SB1250_MAC=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -609,7 +582,6 @@ CONFIG_SERIAL_NONSTANDARD=y # CONFIG_N_HDLC is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set -# CONFIG_RIO is not set # CONFIG_STALDRV is not set CONFIG_SIBYTE_SB1250_DUART=y CONFIG_SIBYTE_SB1250_DUART_CONSOLE=y @@ -636,7 +608,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -685,7 +656,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -695,7 +665,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -752,19 +721,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -783,7 +739,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -849,7 +804,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -876,7 +830,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=15 # CONFIG_DEBUG_FS is not set @@ -933,4 +886,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig index 4401b6021..6b8a6a416 100644 --- a/arch/mips/configs/sead_defconfig +++ b/arch/mips/configs/sead_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:20 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:17 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set CONFIG_MIPS_SEAD=y -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS_SEAD=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -120,10 +118,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -139,20 +134,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -182,12 +166,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -253,7 +235,6 @@ CONFIG_TRAD_SIGNALS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -367,7 +348,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -398,6 +378,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -413,7 +394,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -422,7 +402,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -477,19 +456,6 @@ CONFIG_VIDEO_V4L2=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -504,7 +470,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -584,7 +549,6 @@ CONFIG_PARTITION_ADVANCED=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -614,4 +578,3 @@ CONFIG_CMDLINE="" CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index 2ba4e25e8..dba0bdcdc 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:20 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:08:41 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -78,7 +77,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -139,20 +134,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -184,12 +168,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -260,8 +242,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -287,8 +267,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -296,7 +274,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -350,7 +327,6 @@ CONFIG_NETWORK_SECMARK=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -444,7 +420,6 @@ CONFIG_SCSI_MULTI_LUN=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -510,8 +485,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -574,7 +547,6 @@ CONFIG_E100=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -645,7 +617,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -674,7 +645,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -725,7 +695,6 @@ CONFIG_GPIO_VR41XX=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -736,7 +705,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -773,7 +741,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -864,12 +831,10 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -924,30 +889,13 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set CONFIG_RTC_DRV_VR41XX=y # CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# # # File systems @@ -964,7 +912,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1035,7 +982,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1062,7 +1008,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1092,4 +1037,3 @@ CONFIG_CMDLINE="mem=32M console=ttyVR0,115200" # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig index fc8a407c1..5a924c1a5 100644 --- a/arch/mips/configs/tb0229_defconfig +++ b/arch/mips/configs/tb0229_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:20 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:08:59 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -78,7 +77,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -139,20 +134,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -184,12 +168,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -260,8 +242,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -288,8 +268,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -297,7 +275,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -351,7 +328,6 @@ CONFIG_NETWORK_SECMARK=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -450,8 +426,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -495,7 +469,6 @@ CONFIG_R8169=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -565,7 +538,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -594,7 +566,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -629,6 +600,7 @@ CONFIG_GPIO_VR41XX=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -644,7 +616,6 @@ CONFIG_GPIO_VR41XX=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -655,7 +626,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -692,7 +662,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -773,12 +742,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -833,30 +800,13 @@ CONFIG_RTC_HCTOSYS_DEVICE="rtc0" CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set CONFIG_RTC_DRV_VR41XX=y # CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# # # File systems @@ -873,7 +823,6 @@ CONFIG_EXT2_FS=y # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -944,7 +893,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -971,7 +919,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1001,4 +948,3 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig index effcb63b8..9f215ea35 100644 --- a/arch/mips/configs/tb0287_defconfig +++ b/arch/mips/configs/tb0287_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:21 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:09:17 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -123,10 +122,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -139,20 +135,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -184,12 +169,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -260,8 +243,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -288,8 +269,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_ADVANCED=y @@ -305,13 +284,9 @@ CONFIG_TCP_CONG_HTCP=m # CONFIG_TCP_CONG_HYBLA is not set # CONFIG_TCP_CONG_VEGAS is not set # CONFIG_TCP_CONG_SCALABLE is not set -# CONFIG_TCP_CONG_LP is not set -# CONFIG_TCP_CONG_VENO is not set -# CONFIG_TCP_CONG_COMPOUND is not set # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -365,7 +340,6 @@ CONFIG_NETWORK_SECMARK=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -511,7 +485,6 @@ CONFIG_BLK_DEV_SD=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -568,6 +541,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -638,7 +612,6 @@ CONFIG_R8169=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -709,7 +682,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -738,7 +710,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -773,6 +744,7 @@ CONFIG_GPIO_VR41XX=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -788,7 +760,6 @@ CONFIG_GPIO_VR41XX=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -799,13 +770,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_CIRRUS is not set @@ -871,7 +841,6 @@ CONFIG_USB=m CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -967,12 +936,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set @@ -1017,19 +984,6 @@ CONFIG_USB_MON=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1055,7 +1009,6 @@ CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_QUOTACTL=y # CONFIG_DNOTIFY is not set @@ -1122,7 +1075,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -1149,7 +1101,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1179,4 +1130,3 @@ CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index 4891d02ef..ac7765eb8 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:21 2006 +# Linux kernel version: 2.6.17-rc2 +# Tue Apr 25 00:09:33 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set CONFIG_MACH_VR41XX=y # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -74,7 +73,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y # CONFIG_CPU_BIG_ENDIAN is not set @@ -119,10 +117,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y @@ -135,20 +130,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -180,12 +164,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -284,8 +266,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -293,7 +273,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # @@ -348,7 +327,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -467,8 +445,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -603,7 +579,6 @@ CONFIG_INPUT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -631,7 +606,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -686,7 +660,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -696,7 +669,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -758,19 +730,6 @@ CONFIG_DUMMY_CONSOLE=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -789,7 +748,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -855,7 +813,6 @@ CONFIG_SUNRPC=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -882,7 +839,6 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -911,4 +867,3 @@ CONFIG_CMDLINE="console=ttyVR0,19200 mem=16M" # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index 3a68d8a25..b52d709de 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 10:04:21 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:51:20 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set CONFIG_PMC_YOSEMITE=y # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set # CONFIG_SGI_IP22 is not set # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -69,7 +68,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_DMA_COHERENT=y CONFIG_CPU_BIG_ENDIAN=y # CONFIG_CPU_LITTLE_ENDIAN is not set @@ -118,16 +116,12 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_IRQ_PER_CPU=y CONFIG_HIGHMEM=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_SYS_SUPPORTS_HIGHMEM=y @@ -136,24 +130,12 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set CONFIG_SMP=y -CONFIG_SYS_SUPPORTS_SMP=y CONFIG_NR_CPUS=2 -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -186,12 +168,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -281,8 +261,6 @@ CONFIG_IP_PNP_BOOTP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -295,10 +273,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y # CONFIG_NETFILTER is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -335,7 +310,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -430,8 +404,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m # # Ethernet (10 or 100Mbit) @@ -473,7 +445,6 @@ CONFIG_TITAN_GE=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -551,7 +522,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set CONFIG_GEN_RTC=y CONFIG_GEN_RTC_X=y @@ -599,7 +569,6 @@ CONFIG_GEN_RTC_X=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -609,7 +578,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set # @@ -665,19 +633,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # Real Time Clock # -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -690,7 +645,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -743,7 +697,6 @@ CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -763,19 +716,14 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_HIGHMEM is not set # CONFIG_DEBUG_INFO is not set @@ -838,4 +786,3 @@ CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_PLIST=y diff --git a/arch/mips/ddb5xxx/common/prom.c b/arch/mips/ddb5xxx/common/prom.c index efef0f57c..b8d1f7489 100644 --- a/arch/mips/ddb5xxx/common/prom.c +++ b/arch/mips/ddb5xxx/common/prom.c @@ -7,6 +7,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -20,6 +21,8 @@ const char *get_system_type(void) { switch (mips_machtype) { + case MACH_NEC_DDB5074: return "NEC DDB Vrc-5074"; + case MACH_NEC_DDB5476: return "NEC DDB Vrc-5476"; case MACH_NEC_DDB5477: return "NEC DDB Vrc-5477"; case MACH_NEC_ROCKHOPPER: return "NEC Rockhopper"; case MACH_NEC_ROCKHOPPERII: return "NEC RockhopperII"; @@ -53,7 +56,13 @@ void __init prom_init(void) mips_machgroup = MACH_GROUP_NEC_DDB; -#if defined(CONFIG_DDB5477) +#if defined(CONFIG_DDB5074) + mips_machtype = MACH_NEC_DDB5074; + add_memory_region(0, DDB_SDRAM_SIZE, BOOT_MEM_RAM); +#elif defined(CONFIG_DDB5476) + mips_machtype = MACH_NEC_DDB5476; + add_memory_region(0, DDB_SDRAM_SIZE, BOOT_MEM_RAM); +#elif defined(CONFIG_DDB5477) ddb5477_runtime_detection(); add_memory_region(0, board_ram_size, BOOT_MEM_RAM); #endif diff --git a/arch/mips/ddb5xxx/ddb5074/Makefile b/arch/mips/ddb5xxx/ddb5074/Makefile new file mode 100644 index 000000000..304c02107 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5074/Makefile @@ -0,0 +1,8 @@ +# +# Makefile for the NEC DDB Vrc-5074 specific kernel interface routines +# under Linux. +# + +obj-y += setup.o irq.o nile4_pic.o + +EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/ddb5xxx/ddb5074/irq.c b/arch/mips/ddb5xxx/ddb5074/irq.c new file mode 100644 index 000000000..60c087b77 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5074/irq.c @@ -0,0 +1,169 @@ +/* + * arch/mips/ddb5074/irq.c -- NEC DDB Vrc-5074 interrupt routines + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; + +#define M1543_PNP_CONFIG 0x03f0 /* PnP Config Port */ +#define M1543_PNP_INDEX 0x03f0 /* PnP Index Port */ +#define M1543_PNP_DATA 0x03f1 /* PnP Data Port */ + +#define M1543_PNP_ALT_CONFIG 0x0370 /* Alternative PnP Config Port */ +#define M1543_PNP_ALT_INDEX 0x0370 /* Alternative PnP Index Port */ +#define M1543_PNP_ALT_DATA 0x0371 /* Alternative PnP Data Port */ + +#define M1543_INT1_MASTER_CTRL 0x0020 /* INT_1 (master) Control Register */ +#define M1543_INT1_MASTER_MASK 0x0021 /* INT_1 (master) Mask Register */ + +#define M1543_INT1_SLAVE_CTRL 0x00a0 /* INT_1 (slave) Control Register */ +#define M1543_INT1_SLAVE_MASK 0x00a1 /* INT_1 (slave) Mask Register */ + +#define M1543_INT1_MASTER_ELCR 0x04d0 /* INT_1 (master) Edge/Level Control */ +#define M1543_INT1_SLAVE_ELCR 0x04d1 /* INT_1 (slave) Edge/Level Control */ + + +static void m1543_irq_setup(void) +{ + /* + * The ALI M1543 has 13 interrupt inputs, IRQ1..IRQ13. Not all + * the possible IO sources in the M1543 are in use by us. We will + * use the following mapping: + * + * IRQ1 - keyboard (default set by M1543) + * IRQ3 - reserved for UART B (default set by M1543) (note that + * the schematics for the DDB Vrc-5074 board seem to + * indicate that IRQ3 is connected to the DS1386 + * watchdog timer interrupt output so we might have + * a conflict) + * IRQ4 - reserved for UART A (default set by M1543) + * IRQ5 - parallel (default set by M1543) + * IRQ8 - DS1386 time of day (RTC) interrupt + * IRQ12 - mouse + */ + + /* + * Assing mouse interrupt to IRQ12 + */ + + /* Enter configuration mode */ + outb(0x51, M1543_PNP_CONFIG); + outb(0x23, M1543_PNP_CONFIG); + + /* Select logical device 7 (Keyboard) */ + outb(0x07, M1543_PNP_INDEX); + outb(0x07, M1543_PNP_DATA); + + /* Select IRQ12 */ + outb(0x72, M1543_PNP_INDEX); + outb(0x0c, M1543_PNP_DATA); + + outb(0x30, M1543_PNP_INDEX); + printk("device 7, 0x30: %02x\n",inb(M1543_PNP_DATA)); + + outb(0x70, M1543_PNP_INDEX); + printk("device 7, 0x70: %02x\n",inb(M1543_PNP_DATA)); + + /* Leave configration mode */ + outb(0xbb, M1543_PNP_CONFIG); + + +} + +static void ddb_local0_irqdispatch(struct pt_regs *regs) +{ + u32 mask; + int nile4_irq; + + mask = nile4_get_irq_stat(0); + + /* Handle the timer interrupt first */ +#if 0 + if (mask & (1 << NILE4_INT_GPT)) { + do_IRQ(nile4_to_irq(NILE4_INT_GPT), regs); + mask &= ~(1 << NILE4_INT_GPT); + } +#endif + for (nile4_irq = 0; mask; nile4_irq++, mask >>= 1) + if (mask & 1) { + if (nile4_irq == NILE4_INT_INTE) { + int i8259_irq; + + nile4_clear_irq(NILE4_INT_INTE); + i8259_irq = nile4_i8259_iack(); + do_IRQ(i8259_irq, regs); + } else + do_IRQ(nile4_to_irq(nile4_irq), regs); + + } +} + +static void ddb_local1_irqdispatch(void) +{ + printk("ddb_local1_irqdispatch called\n"); +} + +static void ddb_buserror_irq(void) +{ + printk("ddb_buserror_irq called\n"); +} + +static void ddb_8254timer_irq(void) +{ + printk("ddb_8254timer_irq called\n"); +} + +asmlinkage void plat_irq_dispatch(struct pt_regs *regs) +{ + unsigned int pending = read_c0_cause() & read_c0_status(); + + if (pending & CAUSEF_IP2) + ddb_local0_irqdispatch(regs); + else if (pending & CAUSEF_IP3) + ddb_local1_irqdispatch(); + else if (pending & CAUSEF_IP6) + ddb_buserror_irq(); + else if (pending & (CAUSEF_IP4 | CAUSEF_IP5)) + ddb_8254timer_irq(); +} + +void __init arch_init_irq(void) +{ + /* setup cascade interrupts */ + setup_irq(NILE4_IRQ_BASE + NILE4_INT_INTE, &irq_cascade); + setup_irq(CPU_IRQ_BASE + CPU_NILE4_CASCADE, &irq_cascade); + + nile4_irq_setup(NILE4_IRQ_BASE); + m1543_irq_setup(); + init_i8259_irqs(); + + + printk("CPU_IRQ_BASE: %d\n",CPU_IRQ_BASE); + + mips_cpu_irq_init(CPU_IRQ_BASE); + + printk("enabling 8259 cascade\n"); + + ddb5074_led_hex(0); + + /* Enable the interrupt cascade */ + nile4_enable_irq(NILE4_IRQ_BASE+IRQ_I8259_CASCADE); +} diff --git a/arch/mips/ddb5xxx/ddb5074/nile4_pic.c b/arch/mips/ddb5xxx/ddb5074/nile4_pic.c new file mode 100644 index 000000000..8743ffce8 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5074/nile4_pic.c @@ -0,0 +1,286 @@ +/* + * arch/mips/ddb5476/nile4.c -- + * low-level PIC code for NEC Vrc-5476 (Nile 4) + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + * + * Copyright 2001 MontaVista Software Inc. + * Author: jsun@mvista.com or jsun@junsun.net + * + */ +#include +#include +#include +#include +#include + +#include + +#include + +static int irq_base; + +/* + * Interrupt Programming + */ +void nile4_map_irq(int nile4_irq, int cpu_irq) +{ + u32 offset, t; + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + t = ddb_in32(offset); + t &= ~(7 << (nile4_irq * 4)); + t |= cpu_irq << (nile4_irq * 4); + ddb_out32(offset, t); +} + +void nile4_map_irq_all(int cpu_irq) +{ + u32 all, t; + + all = cpu_irq; + all |= all << 4; + all |= all << 8; + all |= all << 16; + t = ddb_in32(DDB_INTCTRL); + t &= 0x88888888; + t |= all; + ddb_out32(DDB_INTCTRL, t); + t = ddb_in32(DDB_INTCTRL + 4); + t &= 0x88888888; + t |= all; + ddb_out32(DDB_INTCTRL + 4, t); +} + +void nile4_enable_irq(unsigned int nile4_irq) +{ + u32 offset, t; + + nile4_irq-=irq_base; + + ddb5074_led_hex(8); + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + ddb5074_led_hex(9); + t = ddb_in32(offset); + ddb5074_led_hex(0xa); + t |= 8 << (nile4_irq * 4); + ddb_out32(offset, t); + ddb5074_led_hex(0xb); +} + +void nile4_disable_irq(unsigned int nile4_irq) +{ + u32 offset, t; + + nile4_irq-=irq_base; + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + t = ddb_in32(offset); + t &= ~(8 << (nile4_irq * 4)); + ddb_out32(offset, t); +} + +void nile4_disable_irq_all(void) +{ + ddb_out32(DDB_INTCTRL, 0); + ddb_out32(DDB_INTCTRL + 4, 0); +} + +u16 nile4_get_irq_stat(int cpu_irq) +{ + return ddb_in16(DDB_INTSTAT0 + cpu_irq * 2); +} + +void nile4_enable_irq_output(int cpu_irq) +{ + u32 t; + + t = ddb_in32(DDB_INTSTAT1 + 4); + t |= 1 << (16 + cpu_irq); + ddb_out32(DDB_INTSTAT1, t); +} + +void nile4_disable_irq_output(int cpu_irq) +{ + u32 t; + + t = ddb_in32(DDB_INTSTAT1 + 4); + t &= ~(1 << (16 + cpu_irq)); + ddb_out32(DDB_INTSTAT1, t); +} + +void nile4_set_pci_irq_polarity(int pci_irq, int high) +{ + u32 t; + + t = ddb_in32(DDB_INTPPES); + if (high) + t &= ~(1 << (pci_irq * 2)); + else + t |= 1 << (pci_irq * 2); + ddb_out32(DDB_INTPPES, t); +} + +void nile4_set_pci_irq_level_or_edge(int pci_irq, int level) +{ + u32 t; + + t = ddb_in32(DDB_INTPPES); + if (level) + t |= 2 << (pci_irq * 2); + else + t &= ~(2 << (pci_irq * 2)); + ddb_out32(DDB_INTPPES, t); +} + +void nile4_clear_irq(int nile4_irq) +{ + nile4_irq-=irq_base; + ddb_out32(DDB_INTCLR, 1 << nile4_irq); +} + +void nile4_clear_irq_mask(u32 mask) +{ + ddb_out32(DDB_INTCLR, mask); +} + +u8 nile4_i8259_iack(void) +{ + u8 irq; + u32 reg; + + /* Set window 0 for interrupt acknowledge */ + reg = ddb_in32(DDB_PCIINIT0); + + ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IACK, 0, DDB_PCI_ACCESS_32); + irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE); + /* restore window 0 for PCI I/O space */ + // ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IO, 0, DDB_PCI_ACCESS_32); + ddb_out32(DDB_PCIINIT0, reg); + + /* i8269.c set the base vector to be 0x0 */ + return irq ; +} + +static unsigned int nile4_irq_startup(unsigned int irq) { + + nile4_enable_irq(irq); + return 0; + +} + +static void nile4_ack_irq(unsigned int irq) { + + ddb5074_led_hex(4); + + nile4_clear_irq(irq); + ddb5074_led_hex(2); + nile4_disable_irq(irq); + + ddb5074_led_hex(0); +} + +static void nile4_irq_end(unsigned int irq) { + + ddb5074_led_hex(3); + if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { + ddb5074_led_hex(5); + nile4_enable_irq(irq); + ddb5074_led_hex(7); + } + + ddb5074_led_hex(1); +} + +#define nile4_irq_shutdown nile4_disable_irq + +static hw_irq_controller nile4_irq_controller = { + .typename = "nile4", + .startup = nile4_irq_startup, + .shutdown = nile4_irq_shutdown, + .enable = nile4_enable_irq, + .disable = nile4_disable_irq, + .ack = nile4_ack_irq, + .end = nile4_irq_end, +}; + +void nile4_irq_setup(u32 base) { + + int i; + + irq_base=base; + + /* Map all interrupts to CPU int #0 */ + nile4_map_irq_all(0); + + /* PCI INTA#-E# must be level triggered */ + nile4_set_pci_irq_level_or_edge(0, 1); + nile4_set_pci_irq_level_or_edge(1, 1); + nile4_set_pci_irq_level_or_edge(2, 1); + nile4_set_pci_irq_level_or_edge(3, 1); + nile4_set_pci_irq_level_or_edge(4, 1); + + /* PCI INTA#-D# must be active low, INTE# must be active high */ + nile4_set_pci_irq_polarity(0, 0); + nile4_set_pci_irq_polarity(1, 0); + nile4_set_pci_irq_polarity(2, 0); + nile4_set_pci_irq_polarity(3, 0); + nile4_set_pci_irq_polarity(4, 1); + + + for (i = 0; i < 16; i++) { + nile4_clear_irq(i); + nile4_disable_irq(i); + } + + /* Enable CPU int #0 */ + nile4_enable_irq_output(0); + + for (i= base; i< base + NUM_NILE4_INTERRUPTS; i++) { + irq_desc[i].status = IRQ_DISABLED; + irq_desc[i].action = NULL; + irq_desc[i].depth = 1; + irq_desc[i].handler = &nile4_irq_controller; + } +} + +#if defined(CONFIG_RUNTIME_DEBUG) +void nile4_dump_irq_status(void) +{ + printk(KERN_DEBUG " + CPUSTAT = %p:%p\n", (void *) ddb_in32(DDB_CPUSTAT + 4), + (void *) ddb_in32(DDB_CPUSTAT)); + printk(KERN_DEBUG " + INTCTRL = %p:%p\n", (void *) ddb_in32(DDB_INTCTRL + 4), + (void *) ddb_in32(DDB_INTCTRL)); + printk(KERN_DEBUG + "INTSTAT0 = %p:%p\n", + (void *) ddb_in32(DDB_INTSTAT0 + 4), + (void *) ddb_in32(DDB_INTSTAT0)); + printk(KERN_DEBUG + "INTSTAT1 = %p:%p\n", + (void *) ddb_in32(DDB_INTSTAT1 + 4), + (void *) ddb_in32(DDB_INTSTAT1)); + printk(KERN_DEBUG + "INTCLR = %p:%p\n", (void *) ddb_in32(DDB_INTCLR + 4), + (void *) ddb_in32(DDB_INTCLR)); + printk(KERN_DEBUG + "INTPPES = %p:%p\n", (void *) ddb_in32(DDB_INTPPES + 4), + (void *) ddb_in32(DDB_INTPPES)); +} + +#endif diff --git a/arch/mips/ddb5xxx/ddb5074/setup.c b/arch/mips/ddb5xxx/ddb5074/setup.c new file mode 100644 index 000000000..91456b068 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5074/setup.c @@ -0,0 +1,234 @@ +/* + * arch/mips/ddb5074/setup.c -- NEC DDB Vrc-5074 setup routines + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void (*back_to_prom) (void) = (void (*)(void)) 0xbfc00000; + +static void ddb_machine_restart(char *command) +{ + u32 t; + + /* PCI cold reset */ + t = nile4_in32(NILE4_PCICTRL + 4); + t |= 0x40000000; + nile4_out32(NILE4_PCICTRL + 4, t); + /* CPU cold reset */ + t = nile4_in32(NILE4_CPUSTAT); + t |= 1; + nile4_out32(NILE4_CPUSTAT, t); + /* Call the PROM */ + back_to_prom(); +} + +static void ddb_machine_halt(void) +{ + printk("DDB Vrc-5074 halted.\n"); + do { + } while (1); +} + +static void ddb_machine_power_off(void) +{ + printk("DDB Vrc-5074 halted. Please turn off the power.\n"); + do { + } while (1); +} + +extern void rtc_ds1386_init(unsigned long base); + +extern void (*board_timer_setup) (struct irqaction * irq); + +static void __init ddb_timer_init(struct irqaction *irq) +{ + /* set the clock to 1 Hz */ + nile4_out32(NILE4_T2CTRL, 1000000); + /* enable the General-Purpose Timer */ + nile4_out32(NILE4_T2CTRL + 4, 0x00000001); + /* reset timer */ + nile4_out32(NILE4_T2CNTR, 0); + /* enable interrupt */ + setup_irq(nile4_to_irq(NILE4_INT_GPT), irq); + nile4_enable_irq(nile4_to_irq(NILE4_INT_GPT)); + change_c0_status(ST0_IM, + IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4); + +} + +static void __init ddb_time_init(void) +{ + /* we have ds1396 RTC chip */ + rtc_ds1386_init(KSEG1ADDR(DDB_PCI_MEM_BASE)); +} + + + +void __init plat_setup(void) +{ + set_io_port_base(NILE4_PCI_IO_BASE); + isa_slot_offset = NILE4_PCI_MEM_BASE; + board_timer_setup = ddb_timer_init; + board_time_init = ddb_time_init; + + + _machine_restart = ddb_machine_restart; + _machine_halt = ddb_machine_halt; + pm_power_off = ddb_machine_power_off; + + ddb_out32(DDB_BAR0, 0); + + ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IO, 0, 0x10); + ddb_set_pmr(DDB_PCIINIT1, DDB_PCICMD_MEM, DDB_PCI_MEM_BASE , 0x10); + + /* Reboot on panic */ + panic_timeout = 180; +} + +#define USE_NILE4_SERIAL 0 + +#if USE_NILE4_SERIAL +#define ns16550_in(reg) nile4_in8((reg)*8) +#define ns16550_out(reg, val) nile4_out8((reg)*8, (val)) +#else +#define NS16550_BASE (NILE4_PCI_IO_BASE+0x03f8) +static inline u8 ns16550_in(u32 reg) +{ + return *(volatile u8 *) (NS16550_BASE + reg); +} + +static inline void ns16550_out(u32 reg, u8 val) +{ + *(volatile u8 *) (NS16550_BASE + reg) = val; +} +#endif + +#define NS16550_RBR 0 +#define NS16550_THR 0 +#define NS16550_DLL 0 +#define NS16550_IER 1 +#define NS16550_DLM 1 +#define NS16550_FCR 2 +#define NS16550_IIR 2 +#define NS16550_LCR 3 +#define NS16550_MCR 4 +#define NS16550_LSR 5 +#define NS16550_MSR 6 +#define NS16550_SCR 7 + +#define NS16550_LSR_DR 0x01 /* Data ready */ +#define NS16550_LSR_OE 0x02 /* Overrun */ +#define NS16550_LSR_PE 0x04 /* Parity error */ +#define NS16550_LSR_FE 0x08 /* Framing error */ +#define NS16550_LSR_BI 0x10 /* Break */ +#define NS16550_LSR_THRE 0x20 /* Xmit holding register empty */ +#define NS16550_LSR_TEMT 0x40 /* Xmitter empty */ +#define NS16550_LSR_ERR 0x80 /* Error */ + + +void _serinit(void) +{ +#if USE_NILE4_SERIAL + ns16550_out(NS16550_LCR, 0x80); + ns16550_out(NS16550_DLM, 0x00); + ns16550_out(NS16550_DLL, 0x36); /* 9600 baud */ + ns16550_out(NS16550_LCR, 0x00); + ns16550_out(NS16550_LCR, 0x03); + ns16550_out(NS16550_FCR, 0x47); +#else + /* done by PMON */ +#endif +} + +void _putc(char c) +{ + while (!(ns16550_in(NS16550_LSR) & NS16550_LSR_THRE)); + ns16550_out(NS16550_THR, c); + if (c == '\n') { + while (!(ns16550_in(NS16550_LSR) & NS16550_LSR_THRE)); + ns16550_out(NS16550_THR, '\r'); + } +} + +void _puts(const char *s) +{ + char c; + while ((c = *s++)) + _putc(c); +} + +char _getc(void) +{ + while (!(ns16550_in(NS16550_LSR) & NS16550_LSR_DR)); + return ns16550_in(NS16550_RBR); +} + +int _testc(void) +{ + return (ns16550_in(NS16550_LSR) & NS16550_LSR_DR) != 0; +} + + +/* + * Hexadecimal 7-segment LED + */ +void ddb5074_led_hex(int hex) +{ + outb(hex, 0x80); +} + + +/* + * LEDs D2 and D3, connected to the GPIO pins of the PMU in the ALi M1543 + */ +struct pci_dev *pci_pmu = NULL; + +void ddb5074_led_d2(int on) +{ + u8 t; + + if (pci_pmu) { + pci_read_config_byte(pci_pmu, 0x7e, &t); + if (on) + t &= 0x7f; + else + t |= 0x80; + pci_write_config_byte(pci_pmu, 0x7e, t); + } +} + +void ddb5074_led_d3(int on) +{ + u8 t; + + if (pci_pmu) { + pci_read_config_byte(pci_pmu, 0x7e, &t); + if (on) + t &= 0xbf; + else + t |= 0x40; + pci_write_config_byte(pci_pmu, 0x7e, t); + } +} diff --git a/arch/mips/ddb5xxx/ddb5476/Makefile b/arch/mips/ddb5xxx/ddb5476/Makefile new file mode 100644 index 000000000..ab0312cb4 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/Makefile @@ -0,0 +1,9 @@ +# +# Makefile for the NEC DDB Vrc-5476 specific kernel interface routines +# under Linux. +# + +obj-y += setup.o irq.o nile4_pic.o vrc5476_irq.o +obj-$(CONFIG_KGDB) += dbg_io.o + +EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/ddb5xxx/ddb5476/dbg_io.c b/arch/mips/ddb5xxx/ddb5476/dbg_io.c new file mode 100644 index 000000000..f2296a999 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/dbg_io.c @@ -0,0 +1,136 @@ +/* + * kgdb io functions for DDB5476. We use the second serial port. + * + * Copyright (C) 2001 MontaVista Software Inc. + * Author: jsun@mvista.com or jsun@junsun.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. + * + */ + +/* ======================= CONFIG ======================== */ + +/* [jsun] we use the second serial port for kdb */ +#define BASE 0xa60002f8 +#define MAX_BAUD 115200 + +/* distance in bytes between two serial registers */ +#define REG_OFFSET 1 + +/* + * 0 - kgdb does serial init + * 1 - kgdb skip serial init + */ +static int remoteDebugInitialized = 0; + +/* + * the default baud rate *if* kgdb does serial init + */ +#define BAUD_DEFAULT UART16550_BAUD_38400 + +/* ======================= END OF CONFIG ======================== */ + +typedef unsigned char uint8; +typedef unsigned int uint32; + +#define UART16550_BAUD_2400 2400 +#define UART16550_BAUD_4800 4800 +#define UART16550_BAUD_9600 9600 +#define UART16550_BAUD_19200 19200 +#define UART16550_BAUD_38400 38400 +#define UART16550_BAUD_57600 57600 +#define UART16550_BAUD_115200 115200 + +#define UART16550_PARITY_NONE 0 +#define UART16550_PARITY_ODD 0x08 +#define UART16550_PARITY_EVEN 0x18 +#define UART16550_PARITY_MARK 0x28 +#define UART16550_PARITY_SPACE 0x38 + +#define UART16550_DATA_5BIT 0x0 +#define UART16550_DATA_6BIT 0x1 +#define UART16550_DATA_7BIT 0x2 +#define UART16550_DATA_8BIT 0x3 + +#define UART16550_STOP_1BIT 0x0 +#define UART16550_STOP_2BIT 0x4 + +/* register offset */ +#define OFS_RCV_BUFFER 0 +#define OFS_TRANS_HOLD 0 +#define OFS_SEND_BUFFER 0 +#define OFS_INTR_ENABLE (1*REG_OFFSET) +#define OFS_INTR_ID (2*REG_OFFSET) +#define OFS_DATA_FORMAT (3*REG_OFFSET) +#define OFS_LINE_CONTROL (3*REG_OFFSET) +#define OFS_MODEM_CONTROL (4*REG_OFFSET) +#define OFS_RS232_OUTPUT (4*REG_OFFSET) +#define OFS_LINE_STATUS (5*REG_OFFSET) +#define OFS_MODEM_STATUS (6*REG_OFFSET) +#define OFS_RS232_INPUT (6*REG_OFFSET) +#define OFS_SCRATCH_PAD (7*REG_OFFSET) + +#define OFS_DIVISOR_LSB (0*REG_OFFSET) +#define OFS_DIVISOR_MSB (1*REG_OFFSET) + + +/* memory-mapped read/write of the port */ +#define UART16550_READ(y) (*((volatile uint8*)(BASE + y))) +#define UART16550_WRITE(y, z) ((*((volatile uint8*)(BASE + y))) = z) + +void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) +{ + /* disable interrupts */ + UART16550_WRITE(OFS_INTR_ENABLE, 0); + + /* set up baud rate */ + { + uint32 divisor; + + /* set DIAB bit */ + UART16550_WRITE(OFS_LINE_CONTROL, 0x80); + + /* set divisor */ + divisor = MAX_BAUD / baud; + UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff); + UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8); + + /* clear DIAB bit */ + UART16550_WRITE(OFS_LINE_CONTROL, 0x0); + } + + /* set data format */ + UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop); +} + + +uint8 getDebugChar(void) +{ + if (!remoteDebugInitialized) { + remoteDebugInitialized = 1; + debugInit(BAUD_DEFAULT, + UART16550_DATA_8BIT, + UART16550_PARITY_NONE, UART16550_STOP_1BIT); + } + + while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0); + return UART16550_READ(OFS_RCV_BUFFER); +} + + +int putDebugChar(uint8 byte) +{ + if (!remoteDebugInitialized) { + remoteDebugInitialized = 1; + debugInit(BAUD_DEFAULT, + UART16550_DATA_8BIT, + UART16550_PARITY_NONE, UART16550_STOP_1BIT); + } + + while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0); + UART16550_WRITE(OFS_SEND_BUFFER, byte); + return 1; +} diff --git a/arch/mips/ddb5xxx/ddb5476/irq.c b/arch/mips/ddb5xxx/ddb5476/irq.c new file mode 100644 index 000000000..7583a1f30 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/irq.c @@ -0,0 +1,165 @@ +/* + * arch/mips/ddb5476/irq.c -- NEC DDB Vrc-5476 interrupt routines + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + * + * Re-write the whole thing to use new irq.c file. + * Copyright (C) 2001 MontaVista Software Inc. + * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net + * + */ +#include +#include +#include +#include + +#include +#include +#include + +#include + +#define M1543_PNP_CONFIG 0x03f0 /* PnP Config Port */ +#define M1543_PNP_INDEX 0x03f0 /* PnP Index Port */ +#define M1543_PNP_DATA 0x03f1 /* PnP Data Port */ + +#define M1543_PNP_ALT_CONFIG 0x0370 /* Alternative PnP Config Port */ +#define M1543_PNP_ALT_INDEX 0x0370 /* Alternative PnP Index Port */ +#define M1543_PNP_ALT_DATA 0x0371 /* Alternative PnP Data Port */ + +#define M1543_INT1_MASTER_CTRL 0x0020 /* INT_1 (master) Control Register */ +#define M1543_INT1_MASTER_MASK 0x0021 /* INT_1 (master) Mask Register */ + +#define M1543_INT1_SLAVE_CTRL 0x00a0 /* INT_1 (slave) Control Register */ +#define M1543_INT1_SLAVE_MASK 0x00a1 /* INT_1 (slave) Mask Register */ + +#define M1543_INT1_MASTER_ELCR 0x04d0 /* INT_1 (master) Edge/Level Control */ +#define M1543_INT1_SLAVE_ELCR 0x04d1 /* INT_1 (slave) Edge/Level Control */ + +static void m1543_irq_setup(void) +{ + /* + * The ALI M1543 has 13 interrupt inputs, IRQ1..IRQ13. Not all + * the possible IO sources in the M1543 are in use by us. We will + * use the following mapping: + * + * IRQ1 - keyboard (default set by M1543) + * IRQ3 - reserved for UART B (default set by M1543) (note that + * the schematics for the DDB Vrc-5476 board seem to + * indicate that IRQ3 is connected to the DS1386 + * watchdog timer interrupt output so we might have + * a conflict) + * IRQ4 - reserved for UART A (default set by M1543) + * IRQ5 - parallel (default set by M1543) + * IRQ8 - DS1386 time of day (RTC) interrupt + * IRQ9 - USB (hardwired in ddb_setup) + * IRQ10 - PMU (hardwired in ddb_setup) + * IRQ12 - mouse + * IRQ14,15 - IDE controller (need to be confirmed, jsun) + */ + + /* + * Assing mouse interrupt to IRQ12 + */ + + /* Enter configuration mode */ + outb(0x51, M1543_PNP_CONFIG); + outb(0x23, M1543_PNP_CONFIG); + + /* Select logical device 7 (Keyboard) */ + outb(0x07, M1543_PNP_INDEX); + outb(0x07, M1543_PNP_DATA); + + /* Select IRQ12 */ + outb(0x72, M1543_PNP_INDEX); + outb(0x0c, M1543_PNP_DATA); + + /* Leave configration mode */ + outb(0xbb, M1543_PNP_CONFIG); +} + +static void nile4_irq_setup(void) +{ + int i; + + /* Map all interrupts to CPU int #0 (IP2) */ + nile4_map_irq_all(0); + + /* PCI INTA#-E# must be level triggered */ + nile4_set_pci_irq_level_or_edge(0, 1); + nile4_set_pci_irq_level_or_edge(1, 1); + nile4_set_pci_irq_level_or_edge(2, 1); + nile4_set_pci_irq_level_or_edge(3, 1); + + /* PCI INTA#, B#, D# must be active low, INTC# must be active high */ + nile4_set_pci_irq_polarity(0, 0); + nile4_set_pci_irq_polarity(1, 0); + nile4_set_pci_irq_polarity(2, 1); + nile4_set_pci_irq_polarity(3, 0); + + for (i = 0; i < 16; i++) + nile4_clear_irq(i); + + /* Enable CPU int #0 */ + nile4_enable_irq_output(0); + + /* memory resource acquire in ddb_setup */ +} + +static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; +static struct irqaction irq_error = { no_action, 0, CPU_MASK_NONE, "error", NULL, NULL }; + +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); +extern void mips_cpu_irq_init(u32 irq_base); +extern void vrc5476_irq_init(u32 irq_base); + +extern void vrc5476_irq_dispatch(struct pt_regs *regs); + +asmlinkage void plat_irq_dispatch(struct pt_regs *regs) +{ + unsigned int pending = read_c0_cause() & read_c0_status(); + + if (pending & STATUSF_IP7) + do_IRQ(CPU_IRQ_BASE + 7, regs); + else if (pending & STATUSF_IP2) + vrc5476_irq_dispatch(regs); + else if (pending & STATUSF_IP3) + do_IRQ(CPU_IRQ_BASE + 3, regs); + else if (pending & STATUSF_IP4) + do_IRQ(CPU_IRQ_BASE + 4, regs); + else if (pending & STATUSF_IP5) + do_IRQ(CPU_IRQ_BASE + 5, regs); + else if (pending & STATUSF_IP6) + do_IRQ(CPU_IRQ_BASE + 6, regs); + else if (pending & STATUSF_IP0) + do_IRQ(CPU_IRQ_BASE, regs); + else if (pending & STATUSF_IP1) + do_IRQ(CPU_IRQ_BASE + 1, regs); + + vrc5476_irq_dispatch(regs); +} + +void __init arch_init_irq(void) +{ + /* hardware initialization */ + nile4_irq_setup(); + m1543_irq_setup(); + + /* controller setup */ + init_i8259_irqs(); + vrc5476_irq_init(VRC5476_IRQ_BASE); + mips_cpu_irq_init(CPU_IRQ_BASE); + + /* setup cascade interrupts */ + setup_irq(VRC5476_IRQ_BASE + VRC5476_I8259_CASCADE, &irq_cascade); + setup_irq(CPU_IRQ_BASE + CPU_VRC5476_CASCADE, &irq_cascade); + + /* setup error interrupts for debugging */ + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_CPCE, &irq_error); + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_CNTD, &irq_error); + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_MCE, &irq_error); + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_LBRT, &irq_error); + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_PCIS, &irq_error); + setup_irq(VRC5476_IRQ_BASE + VRC5476_IRQ_PCI, &irq_error); +} diff --git a/arch/mips/ddb5xxx/ddb5476/nile4_pic.c b/arch/mips/ddb5xxx/ddb5476/nile4_pic.c new file mode 100644 index 000000000..e930cee79 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/nile4_pic.c @@ -0,0 +1,190 @@ +/* + * arch/mips/ddb5476/nile4.c -- + * low-level PIC code for NEC Vrc-5476 (Nile 4) + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + * + * Copyright 2001 MontaVista Software Inc. + * Author: jsun@mvista.com or jsun@junsun.net + * + */ +#include +#include +#include + +#include + +#include + + +/* + * Interrupt Programming + */ +void nile4_map_irq(int nile4_irq, int cpu_irq) +{ + u32 offset, t; + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + t = ddb_in32(offset); + t &= ~(7 << (nile4_irq * 4)); + t |= cpu_irq << (nile4_irq * 4); + ddb_out32(offset, t); +} + +void nile4_map_irq_all(int cpu_irq) +{ + u32 all, t; + + all = cpu_irq; + all |= all << 4; + all |= all << 8; + all |= all << 16; + t = ddb_in32(DDB_INTCTRL); + t &= 0x88888888; + t |= all; + ddb_out32(DDB_INTCTRL, t); + t = ddb_in32(DDB_INTCTRL + 4); + t &= 0x88888888; + t |= all; + ddb_out32(DDB_INTCTRL + 4, t); +} + +void nile4_enable_irq(int nile4_irq) +{ + u32 offset, t; + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + t = ddb_in32(offset); + t |= 8 << (nile4_irq * 4); + ddb_out32(offset, t); +} + +void nile4_disable_irq(int nile4_irq) +{ + u32 offset, t; + + offset = DDB_INTCTRL; + if (nile4_irq >= 8) { + offset += 4; + nile4_irq -= 8; + } + t = ddb_in32(offset); + t &= ~(8 << (nile4_irq * 4)); + ddb_out32(offset, t); +} + +void nile4_disable_irq_all(void) +{ + ddb_out32(DDB_INTCTRL, 0); + ddb_out32(DDB_INTCTRL + 4, 0); +} + +u16 nile4_get_irq_stat(int cpu_irq) +{ + return ddb_in16(DDB_INTSTAT0 + cpu_irq * 2); +} + +void nile4_enable_irq_output(int cpu_irq) +{ + u32 t; + + t = ddb_in32(DDB_INTSTAT1 + 4); + t |= 1 << (16 + cpu_irq); + ddb_out32(DDB_INTSTAT1, t); +} + +void nile4_disable_irq_output(int cpu_irq) +{ + u32 t; + + t = ddb_in32(DDB_INTSTAT1 + 4); + t &= ~(1 << (16 + cpu_irq)); + ddb_out32(DDB_INTSTAT1, t); +} + +void nile4_set_pci_irq_polarity(int pci_irq, int high) +{ + u32 t; + + t = ddb_in32(DDB_INTPPES); + if (high) + t &= ~(1 << (pci_irq * 2)); + else + t |= 1 << (pci_irq * 2); + ddb_out32(DDB_INTPPES, t); +} + +void nile4_set_pci_irq_level_or_edge(int pci_irq, int level) +{ + u32 t; + + t = ddb_in32(DDB_INTPPES); + if (level) + t |= 2 << (pci_irq * 2); + else + t &= ~(2 << (pci_irq * 2)); + ddb_out32(DDB_INTPPES, t); +} + +void nile4_clear_irq(int nile4_irq) +{ + ddb_out32(DDB_INTCLR, 1 << nile4_irq); +} + +void nile4_clear_irq_mask(u32 mask) +{ + ddb_out32(DDB_INTCLR, mask); +} + +u8 nile4_i8259_iack(void) +{ + u8 irq; + u32 reg; + + /* Set window 0 for interrupt acknowledge */ + reg = ddb_in32(DDB_PCIINIT0); + + ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IACK, 0, DDB_PCI_ACCESS_32); + irq = *(volatile u8 *) KSEG1ADDR(DDB_PCI_IACK_BASE); + /* restore window 0 for PCI I/O space */ + // ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IO, 0, DDB_PCI_ACCESS_32); + ddb_out32(DDB_PCIINIT0, reg); + + /* i8269.c set the base vector to be 0x0 */ + return irq + I8259_IRQ_BASE; +} + +#if defined(CONFIG_RUNTIME_DEBUG) +void nile4_dump_irq_status(void) +{ + printk(KERN_DEBUG " + CPUSTAT = %p:%p\n", (void *) ddb_in32(DDB_CPUSTAT + 4), + (void *) ddb_in32(DDB_CPUSTAT)); + printk(KERN_DEBUG " + INTCTRL = %p:%p\n", (void *) ddb_in32(DDB_INTCTRL + 4), + (void *) ddb_in32(DDB_INTCTRL)); + printk(KERN_DEBUG + "INTSTAT0 = %p:%p\n", + (void *) ddb_in32(DDB_INTSTAT0 + 4), + (void *) ddb_in32(DDB_INTSTAT0)); + printk(KERN_DEBUG + "INTSTAT1 = %p:%p\n", + (void *) ddb_in32(DDB_INTSTAT1 + 4), + (void *) ddb_in32(DDB_INTSTAT1)); + printk(KERN_DEBUG + "INTCLR = %p:%p\n", (void *) ddb_in32(DDB_INTCLR + 4), + (void *) ddb_in32(DDB_INTCLR)); + printk(KERN_DEBUG + "INTPPES = %p:%p\n", (void *) ddb_in32(DDB_INTPPES + 4), + (void *) ddb_in32(DDB_INTPPES)); +} +#endif diff --git a/arch/mips/ddb5xxx/ddb5476/setup.c b/arch/mips/ddb5xxx/ddb5476/setup.c new file mode 100644 index 000000000..c902adef5 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/setup.c @@ -0,0 +1,296 @@ +/* + * arch/mips/ddb5476/setup.c -- NEC DDB Vrc-5476 setup routines + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// #define USE_CPU_COUNTER_TIMER /* whether we use cpu counter */ + +#ifdef USE_CPU_COUNTER_TIMER + +#define CPU_COUNTER_FREQUENCY 83000000 +#else +/* otherwise we use general purpose timer */ +#define TIMER_FREQUENCY 83000000 +#define TIMER_BASE DDB_T2CTRL +#define TIMER_IRQ (VRC5476_IRQ_BASE + VRC5476_IRQ_GPT) +#endif + +static void (*back_to_prom) (void) = (void (*)(void)) 0xbfc00000; + +static void ddb_machine_restart(char *command) +{ + u32 t; + + /* PCI cold reset */ + t = ddb_in32(DDB_PCICTRL + 4); + t |= 0x40000000; + ddb_out32(DDB_PCICTRL + 4, t); + /* CPU cold reset */ + t = ddb_in32(DDB_CPUSTAT); + t |= 1; + ddb_out32(DDB_CPUSTAT, t); + /* Call the PROM */ + back_to_prom(); +} + +static void ddb_machine_halt(void) +{ + printk(KERN_NOTICE "DDB Vrc-5476 halted.\n"); + while (1); +} + +static void ddb_machine_power_off(void) +{ + printk(KERN_NOTICE "DDB Vrc-5476 halted. Please turn off the power.\n"); + while (1); +} + +extern void rtc_ds1386_init(unsigned long base); + +static void __init ddb_time_init(void) +{ +#if defined(USE_CPU_COUNTER_TIMER) + mips_hpt_frequency = CPU_COUNTER_FREQUENCY; +#endif + + /* we have ds1396 RTC chip */ + rtc_ds1386_init(KSEG1ADDR(DDB_PCI_MEM_BASE)); +} + + +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); +static void __init ddb_timer_setup(struct irqaction *irq) +{ +#if defined(USE_CPU_COUNTER_TIMER) + + unsigned int count; + + /* we are using the cpu counter for timer interrupts */ + setup_irq(CPU_IRQ_BASE + 7, irq); + + /* to generate the first timer interrupt */ + count = read_c0_count(); + write_c0_compare(count + 1000); + +#else + + ddb_out32(TIMER_BASE, TIMER_FREQUENCY/HZ); + ddb_out32(TIMER_BASE+4, 0x1); /* enable timer */ + setup_irq(TIMER_IRQ, irq); +#endif +} + +static struct { + struct resource dma1; + struct resource timer; + struct resource rtc; + struct resource dma_page_reg; + struct resource dma2; +} ddb5476_ioport = { + { + "dma1", 0x00, 0x1f, IORESOURCE_BUSY}, { + "timer", 0x40, 0x5f, IORESOURCE_BUSY}, { + "rtc", 0x70, 0x7f, IORESOURCE_BUSY}, { + "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY}, { + "dma2", 0xc0, 0xdf, IORESOURCE_BUSY} +}; + +static struct { + struct resource nile4; +} ddb5476_iomem = { + { "Nile 4", DDB_BASE, DDB_BASE + DDB_SIZE - 1, IORESOURCE_BUSY} +}; + + +static void ddb5476_board_init(void); + +void __init plat_setup(void) +{ + set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE)); + + board_time_init = ddb_time_init; + board_timer_setup = ddb_timer_setup; + + _machine_restart = ddb_machine_restart; + _machine_halt = ddb_machine_halt; + pm_power_off = ddb_machine_power_off; + + /* request io port/mem resources */ + if (request_resource(&ioport_resource, &ddb5476_ioport.dma1) || + request_resource(&ioport_resource, &ddb5476_ioport.timer) || + request_resource(&ioport_resource, &ddb5476_ioport.rtc) || + request_resource(&ioport_resource, + &ddb5476_ioport.dma_page_reg) + || request_resource(&ioport_resource, &ddb5476_ioport.dma2) + || request_resource(&iomem_resource, &ddb5476_iomem.nile4)) { + printk + ("ddb_setup - requesting oo port resources failed.\n"); + for (;;); + } + + /* Reboot on panic */ + panic_timeout = 180; + + /* [jsun] we need to set BAR0 so that SDRAM 0 appears at 0x0 in PCI */ + /* *(long*)0xbfa00218 = 0x8; */ + + /* board initialization stuff */ + ddb5476_board_init(); +} + +/* + * We don't trust bios. We essentially does hardware re-initialization + * as complete as possible, as far as we know we can safely do. + */ +static void ddb5476_board_init(void) +{ + /* ----------- setup PDARs ------------ */ + /* check SDRAM0, whether we are on MEM bus does not matter */ + db_assert((ddb_in32(DDB_SDRAM0) & 0xffffffef) == + ddb_calc_pdar(DDB_SDRAM_BASE, DDB_SDRAM_SIZE, 32, 0, 1)); + + /* SDRAM1 should be turned off. What is this for anyway ? */ + db_assert( (ddb_in32(DDB_SDRAM1) & 0xf) == 0); + + /* flash 1&2, DDB status, DDB control */ + ddb_set_pdar(DDB_DCS2, DDB_DCS2_BASE, DDB_DCS2_SIZE, 16, 0, 0); + ddb_set_pdar(DDB_DCS3, DDB_DCS3_BASE, DDB_DCS3_SIZE, 16, 0, 0); + ddb_set_pdar(DDB_DCS4, DDB_DCS4_BASE, DDB_DCS4_SIZE, 8, 0, 0); + ddb_set_pdar(DDB_DCS5, DDB_DCS5_BASE, DDB_DCS5_SIZE, 8, 0, 0); + + /* shut off other pdar so they don't accidentally get into the way */ + ddb_set_pdar(DDB_DCS6, 0xffffffff, 0, 32, 0, 0); + ddb_set_pdar(DDB_DCS7, 0xffffffff, 0, 32, 0, 0); + ddb_set_pdar(DDB_DCS8, 0xffffffff, 0, 32, 0, 0); + + /* verify VRC5477 base addr */ + /* don't care about some details */ + db_assert((ddb_in32(DDB_INTCS) & 0xffffff0f) == + ddb_calc_pdar(DDB_INTCS_BASE, DDB_INTCS_SIZE, 8, 0, 0)); + + /* verify BOOT ROM addr */ + /* don't care about some details */ + db_assert((ddb_in32(DDB_BOOTCS) & 0xffffff0f) == + ddb_calc_pdar(DDB_BOOTCS_BASE, DDB_BOOTCS_SIZE, 8, 0, 0)); + + /* setup PCI windows - window1 for MEM/config, window0 for IO */ + ddb_set_pdar(DDB_PCIW0, DDB_PCI_IO_BASE, DDB_PCI_IO_SIZE, 32, 0, 1); + ddb_set_pmr(DDB_PCIINIT0, DDB_PCICMD_IO, 0, DDB_PCI_ACCESS_32); + + ddb_set_pdar(DDB_PCIW1, DDB_PCI_MEM_BASE, DDB_PCI_MEM_SIZE, 32, 0, 1); + ddb_set_pmr(DDB_PCIINIT1, DDB_PCICMD_MEM, DDB_PCI_MEM_BASE, DDB_PCI_ACCESS_32); + + /* ----------- setup PDARs ------------ */ + /* this is problematic - it will reset Aladin which cause we loose + * serial port, and we don't know how to set up Aladin chip again. + */ + // ddb_pci_reset_bus(); + + ddb_out32(DDB_BAR0, 0x00000008); + + ddb_out32(DDB_BARC, 0xffffffff); + ddb_out32(DDB_BARB, 0xffffffff); + ddb_out32(DDB_BAR1, 0xffffffff); + ddb_out32(DDB_BAR2, 0xffffffff); + ddb_out32(DDB_BAR3, 0xffffffff); + ddb_out32(DDB_BAR4, 0xffffffff); + ddb_out32(DDB_BAR5, 0xffffffff); + ddb_out32(DDB_BAR6, 0xffffffff); + ddb_out32(DDB_BAR7, 0xffffffff); + ddb_out32(DDB_BAR8, 0xffffffff); + + /* ----------- switch PCI1 to PCI CONFIG space ------------ */ + ddb_set_pdar(DDB_PCIW1, DDB_PCI_CONFIG_BASE, DDB_PCI_CONFIG_SIZE, 32, 0, 1); + ddb_set_pmr(DDB_PCIINIT1, DDB_PCICMD_CFG, 0x0, DDB_PCI_ACCESS_32); + + /* ----- M1543 PCI setup ------ */ + + /* we know M1543 PCI-ISA controller is at addr:18 */ + /* xxxx1010 makes USB at addr:13 and PMU at addr:14 */ + *(volatile unsigned char *) 0xa8040072 &= 0xf0; + *(volatile unsigned char *) 0xa8040072 |= 0xa; + + /* setup USB interrupt to IRQ 9, (bit 0:3 - 0001) + * no IOCHRDY signal, (bit 7 - 1) + * M1543C & M7101 VID and Subsys Device ID are read-only (bit 6 - 1) + * Make USB Master INTAJ level to edge conversion (bit 4 - 1) + */ + *(unsigned char *) 0xa8040074 = 0xd1; + + /* setup PMU(SCI to IRQ 10 (bit 0:3 - 0011) + * SCI routing to IRQ 13 disabled (bit 7 - 1) + * SCI interrupt level to edge conversion bypassed (bit 4 - 0) + */ + *(unsigned char *) 0xa8040076 = 0x83; + + /* setup IDE controller + * enable IDE controller (bit 6 - 1) + * IDE IDSEL to be addr:24 (bit 4:5 - 11) + * no IDE ATA Secondary Bus Signal Pad Control (bit 3 - 0) + * no IDE ATA Primary Bus Signal Pad Control (bit 2 - 0) + * primary IRQ is 14, secondary is 15 (bit 1:0 - 01 + */ + // *(unsigned char*)0xa8040058 = 0x71; + // *(unsigned char*)0xa8040058 = 0x79; + // *(unsigned char*)0xa8040058 = 0x74; // use SIRQ, primary tri-state + *(unsigned char *) 0xa8040058 = 0x75; // primary tri-state + +#if 0 + /* this is not necessary if M5229 does not use SIRQ */ + *(unsigned char *) 0xa8040044 = 0x0d; // primary to IRQ 14 + *(unsigned char *) 0xa8040075 = 0x0d; // secondary to IRQ 14 +#endif + + /* enable IDE in the M5229 config register 0x50 (bit 0 - 1) */ + /* M5229 IDSEL is addr:24; see above setting */ + *(unsigned char *) 0xa9000050 |= 0x1; + + /* enable bus master (bit 2) and IO decoding (bit 0) */ + *(unsigned char *) 0xa9000004 |= 0x5; + + /* enable native, copied from arch/ppc/k2boot/head.S */ + /* TODO - need volatile, need to be portable */ + *(unsigned char *) 0xa9000009 = 0xff; + + /* ----- end of M1543 PCI setup ------ */ + + /* ----- reset on-board ether chip ------ */ + *((volatile u32 *) 0xa8020004) |= 1; /* decode I/O */ + *((volatile u32 *) 0xa8020010) = 0; /* set BAR address */ + + /* send reset command */ + *((volatile u32 *) 0xa6000000) = 1; /* do a soft reset */ + + /* disable ether chip */ + *((volatile u32 *) 0xa8020004) = 0; /* disable any decoding */ + + /* put it into sleep */ + *((volatile u32 *) 0xa8020040) = 0x80000000; + + /* ----- end of reset on-board ether chip ------ */ + + /* ----------- switch PCI1 back to PCI MEM space ------------ */ + ddb_set_pdar(DDB_PCIW1, DDB_PCI_MEM_BASE, DDB_PCI_MEM_SIZE, 32, 0, 1); + ddb_set_pmr(DDB_PCIINIT1, DDB_PCICMD_MEM, DDB_PCI_MEM_BASE, DDB_PCI_ACCESS_32); +} diff --git a/arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c b/arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c new file mode 100644 index 000000000..a3c5e7b18 --- /dev/null +++ b/arch/mips/ddb5xxx/ddb5476/vrc5476_irq.c @@ -0,0 +1,109 @@ +/* + * The irq controller for vrc5476. + * + * Copyright (C) 2001 MontaVista Software Inc. + * Author: jsun@mvista.com or jsun@junsun.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. + * + */ +#include +#include +#include +#include +#include + +#include + +#include + +static int irq_base; + +static void vrc5476_irq_enable(uint irq) +{ + nile4_enable_irq(irq - irq_base); +} + +static void vrc5476_irq_disable(uint irq) +{ + nile4_disable_irq(irq - irq_base); +} + +static unsigned int vrc5476_irq_startup(uint irq) +{ + nile4_enable_irq(irq - irq_base); + return 0; +} + +#define vrc5476_irq_shutdown vrc5476_irq_disable + +static void vrc5476_irq_ack(uint irq) +{ + nile4_clear_irq(irq - irq_base); + nile4_disable_irq(irq - irq_base); +} + +static void vrc5476_irq_end(uint irq) +{ + if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + vrc5476_irq_enable(irq); +} + +static hw_irq_controller vrc5476_irq_controller = { + .typename = "vrc5476", + .startup = vrc5476_irq_startup, + .shutdown = vrc5476_irq_shutdown, + .enable = vrc5476_irq_enable, + .disable = vrc5476_irq_disable, + .ack = vrc5476_irq_ack, + .end = vrc5476_irq_end +}; + +void __init +vrc5476_irq_init(u32 base) +{ + u32 i; + + irq_base = base; + for (i= base; i< base + NUM_VRC5476_IRQ; i++) { + irq_desc[i].status = IRQ_DISABLED; + irq_desc[i].action = NULL; + irq_desc[i].depth = 1; + irq_desc[i].handler = &vrc5476_irq_controller; + } +} + + +void +vrc5476_irq_dispatch(struct pt_regs *regs) +{ + u32 mask; + int nile4_irq; + + mask = nile4_get_irq_stat(0); + + /* quick check for possible time interrupt */ + if (mask & (1 << VRC5476_IRQ_GPT)) { + do_IRQ(VRC5476_IRQ_BASE + VRC5476_IRQ_GPT, regs); + return; + } + + /* check for i8259 interrupts */ + if (mask & (1 << VRC5476_I8259_CASCADE)) { + int i8259_irq = nile4_i8259_iack(); + do_IRQ(I8259_IRQ_BASE + i8259_irq, regs); + return; + } + + /* regular nile4 interrupts (we should not really have any */ + for (nile4_irq = 0; mask; nile4_irq++, mask >>= 1) { + if (mask & 1) { + do_IRQ(VRC5476_IRQ_BASE + nile4_irq, regs); + return; + } + } + spurious_interrupt(regs); +} diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c index 513fc6722..de433cf9f 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq.c +++ b/arch/mips/ddb5xxx/ddb5477/irq.c @@ -10,6 +10,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -74,6 +75,7 @@ set_pci_int_attr(u32 pci, u32 intn, u32 active, u32 trigger) extern void vrc5477_irq_init(u32 base); extern void mips_cpu_irq_init(u32 base); +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; void __init arch_init_irq(void) diff --git a/arch/mips/ddb5xxx/ddb5477/irq_5477.c b/arch/mips/ddb5xxx/ddb5477/irq_5477.c index ba52705a2..5fcd5f070 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq_5477.c +++ b/arch/mips/ddb5xxx/ddb5477/irq_5477.c @@ -89,7 +89,7 @@ vrc5477_irq_end(unsigned int irq) ll_vrc5477_irq_enable( irq - vrc5477_irq_base); } -struct irq_chip vrc5477_irq_controller = { +hw_irq_controller vrc5477_irq_controller = { .typename = "vrc5477_irq", .startup = vrc5477_irq_startup, .shutdown = vrc5477_irq_shutdown, @@ -107,7 +107,7 @@ void __init vrc5477_irq_init(u32 irq_base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &vrc5477_irq_controller; + irq_desc[i].handler = &vrc5477_irq_controller; } vrc5477_irq_base = irq_base; diff --git a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c index f0cc0e8a8..2f566034c 100644 --- a/arch/mips/ddb5xxx/ddb5477/setup.c +++ b/arch/mips/ddb5xxx/ddb5477/setup.c @@ -13,13 +13,13 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include #include #include #include -#include #include #include #include /* for HZ */ @@ -147,7 +147,9 @@ static void __init ddb_time_init(void) mips_hpt_frequency = bus_frequency*(i+4)/4; } -void __init plat_timer_setup(struct irqaction *irq) +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); + +static void __init ddb_timer_setup(struct irqaction *irq) { #if defined(USE_CPU_COUNTER_TIMER) @@ -169,7 +171,7 @@ static void ddb5477_board_init(void); extern struct pci_controller ddb5477_ext_controller; extern struct pci_controller ddb5477_io_controller; -void __init plat_mem_setup(void) +void __init plat_setup(void) { /* initialize board - we don't trust the loader */ ddb5477_board_init(); @@ -177,6 +179,7 @@ void __init plat_mem_setup(void) set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE)); board_time_init = ddb_time_init; + board_timer_setup = ddb_timer_setup; _machine_restart = ddb_machine_restart; _machine_halt = ddb_machine_halt; diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index 455a65b91..e8ec93e33 100644 --- a/arch/mips/dec/int-handler.S +++ b/arch/mips/dec/int-handler.S @@ -13,6 +13,7 @@ * Rewritten extensively for controller-driven IRQ support * by Maciej W. Rozycki. */ +#include #include #include diff --git a/arch/mips/dec/ioasic-irq.c b/arch/mips/dec/ioasic-irq.c index 41cd2a961..d5bca5d23 100644 --- a/arch/mips/dec/ioasic-irq.c +++ b/arch/mips/dec/ioasic-irq.c @@ -93,7 +93,7 @@ static inline void end_ioasic_irq(unsigned int irq) enable_ioasic_irq(irq); } -static struct irq_chip ioasic_irq_type = { +static struct hw_interrupt_type ioasic_irq_type = { .typename = "IO-ASIC", .startup = startup_ioasic_irq, .shutdown = shutdown_ioasic_irq, @@ -121,7 +121,7 @@ static inline void end_ioasic_dma_irq(unsigned int irq) end_ioasic_irq(irq); } -static struct irq_chip ioasic_dma_irq_type = { +static struct hw_interrupt_type ioasic_dma_irq_type = { .typename = "IO-ASIC-DMA", .startup = startup_ioasic_dma_irq, .shutdown = shutdown_ioasic_dma_irq, @@ -144,13 +144,13 @@ void __init init_ioasic_irqs(int base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &ioasic_irq_type; + irq_desc[i].handler = &ioasic_irq_type; } for (; i < base + IO_IRQ_LINES; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &ioasic_dma_irq_type; + irq_desc[i].handler = &ioasic_dma_irq_type; } ioasic_irq_base = base; diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c index 04a367a60..898bed502 100644 --- a/arch/mips/dec/kn02-irq.c +++ b/arch/mips/dec/kn02-irq.c @@ -94,7 +94,7 @@ static void end_kn02_irq(unsigned int irq) enable_kn02_irq(irq); } -static struct irq_chip kn02_irq_type = { +static struct hw_interrupt_type kn02_irq_type = { .typename = "KN02-CSR", .startup = startup_kn02_irq, .shutdown = shutdown_kn02_irq, @@ -123,7 +123,7 @@ void __init init_kn02_irqs(int base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &kn02_irq_type; + irq_desc[i].handler = &kn02_irq_type; } kn02_irq_base = base; diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index bf2858071..32a7cc7e4 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c @@ -4,6 +4,7 @@ * Copyright (C) 1998 Harald Koerfgen * Copyright (C) 2002, 2004 Maciej W. Rozycki */ +#include #include #include #include diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index 3027ce782..1edaf3074 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c @@ -4,6 +4,7 @@ * Copyright (C) 1998 Harald Koerfgen, Frieder Streffer and Paul M. Antoine * Copyright (C) 2000, 2002 Maciej W. Rozycki */ +#include #include #include #include diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c index d43241c2f..ad5d436d8 100644 --- a/arch/mips/dec/setup.c +++ b/arch/mips/dec/setup.c @@ -105,7 +105,7 @@ static struct irqaction fpuirq = { }; static struct irqaction busirq = { - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "bus error", }; @@ -124,7 +124,7 @@ static void __init dec_be_init(void) case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ board_be_handler = dec_kn01_be_handler; busirq.handler = dec_kn01_be_interrupt; - busirq.flags |= IRQF_SHARED; + busirq.flags |= SA_SHIRQ; dec_kn01_be_init(); break; case MACH_DS5000_1XX: /* DS5000/1xx 3min */ @@ -145,11 +145,13 @@ static void __init dec_be_init(void) extern void dec_time_init(void); +extern void dec_timer_setup(struct irqaction *); -void __init plat_mem_setup(void) +void __init plat_setup(void) { board_be_init = dec_be_init; board_time_init = dec_time_init; + board_timer_setup = dec_timer_setup; wbflush_setup(); diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c index 57294740c..74cb055d4 100644 --- a/arch/mips/dec/time.c +++ b/arch/mips/dec/time.c @@ -181,12 +181,12 @@ void __init dec_time_init(void) } /* Set up the rate of periodic DS1287 interrupts. */ - CMOS_WRITE(RTC_REF_CLCK_32KHZ | (16 - __ffs(HZ)), RTC_REG_A); + CMOS_WRITE(RTC_REF_CLCK_32KHZ | (16 - LOG_2_HZ), RTC_REG_A); } EXPORT_SYMBOL(do_settimeofday); -void __init plat_timer_setup(struct irqaction *irq) +void __init dec_timer_setup(struct irqaction *irq) { setup_irq(dec_interrupt[DEC_IRQ_RTC], irq); diff --git a/arch/mips/defconfig b/arch/mips/defconfig index fff6fcc96..607e2985f 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc1 -# Thu Jul 6 09:49:33 2006 +# Linux kernel version: 2.6.17-rc2 +# Mon Apr 24 14:50:54 2006 # CONFIG_MIPS=y @@ -21,7 +21,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_DB1550 is not set # CONFIG_MIPS_DB1200 is not set # CONFIG_MIPS_MIRAGE is not set -# CONFIG_BASLER_EXCITE is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MIPS_EV64120 is not set @@ -33,7 +32,6 @@ CONFIG_MIPS=y # CONFIG_MIPS_ATLAS is not set # CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SEAD is not set -# CONFIG_WR_PPMC is not set # CONFIG_MIPS_SIM is not set # CONFIG_MOMENCO_JAGUAR_ATX is not set # CONFIG_MOMENCO_OCELOT is not set @@ -43,11 +41,12 @@ CONFIG_MIPS=y # CONFIG_MIPS_XXS1500 is not set # CONFIG_PNX8550_V2PCI is not set # CONFIG_PNX8550_JBS is not set +# CONFIG_DDB5074 is not set +# CONFIG_DDB5476 is not set # CONFIG_DDB5477 is not set # CONFIG_MACH_VR41XX is not set # CONFIG_PMC_YOSEMITE is not set # CONFIG_QEMU is not set -# CONFIG_MARKEINS is not set CONFIG_SGI_IP22=y # CONFIG_SGI_IP27 is not set # CONFIG_SGI_IP32 is not set @@ -68,7 +67,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARC=y CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NEED_PCI_MAP_STATE=y @@ -123,10 +121,7 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_64KB is not set CONFIG_BOARD_SCACHE=y CONFIG_IP22_CPU_SCACHE=y -CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMTC is not set -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_VPE_LOADER is not set +# CONFIG_MIPS_MT is not set # CONFIG_64BIT_PHYS_ADDR is not set CONFIG_CPU_HAS_LLSC=y CONFIG_CPU_HAS_SYNC=y @@ -141,20 +136,9 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -# CONFIG_HZ_48 is not set -# CONFIG_HZ_100 is not set -# CONFIG_HZ_128 is not set -# CONFIG_HZ_250 is not set -# CONFIG_HZ_256 is not set -CONFIG_HZ_1000=y -# CONFIG_HZ_1024 is not set -CONFIG_SYS_SUPPORTS_ARBIT_HZ=y -CONFIG_HZ=1000 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -187,12 +171,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -283,8 +265,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -332,10 +312,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -351,8 +328,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -367,11 +342,9 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -381,7 +354,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m # CONFIG_IP_NF_CT_PROTO_SCTP is not set @@ -392,7 +364,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -423,7 +394,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -556,7 +526,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -676,8 +645,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set # # Ethernet (10 or 100Mbit) @@ -775,7 +742,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -808,7 +774,6 @@ CONFIG_WATCHDOG=y # # CONFIG_SOFT_WATCHDOG is not set CONFIG_INDYDOG=m -# CONFIG_HW_RANDOM is not set # CONFIG_RTC is not set CONFIG_SGI_DS1286=m # CONFIG_GEN_RTC is not set @@ -857,7 +822,6 @@ CONFIG_MAX_RAW_DEVS=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -867,7 +831,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set # @@ -939,19 +902,6 @@ CONFIG_LOGO_SGI_CLUT224=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -969,6 +919,7 @@ CONFIG_FS_MBCACHE=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y # CONFIG_XFS_POSIX_ACL is not set @@ -977,7 +928,6 @@ CONFIG_XFS_SECURITY=y CONFIG_MINIX_FS=m # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=m @@ -1034,8 +984,6 @@ CONFIG_EFS_FS=m # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1065,9 +1013,7 @@ CONFIG_SMB_NLS_DEFAULT=y CONFIG_SMB_NLS_REMOTE="cp437" CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set CONFIG_CODA_FS=m @@ -1150,7 +1096,6 @@ CONFIG_NLS_UTF8=m # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_FS is not set @@ -1210,4 +1155,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/arch/mips/emma2rh/common/Makefile b/arch/mips/emma2rh/common/Makefile deleted file mode 100644 index 859121b38..000000000 --- a/arch/mips/emma2rh/common/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# arch/mips/emma2rh/common/Makefile -# Makefile for the common code of NEC EMMA2RH based board. -# -# Copyright (C) NEC Electronics Corporation 2005-2006 -# -# 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. -# - -obj-$(CONFIG_MARKEINS) += irq.o irq_emma2rh.o prom.o diff --git a/arch/mips/emma2rh/common/irq.c b/arch/mips/emma2rh/common/irq.c deleted file mode 100644 index 3af57693c..000000000 --- a/arch/mips/emma2rh/common/irq.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * arch/mips/emma2rh/common/irq.c - * This file is common irq dispatcher. - * - * Copyright (C) NEC Electronics Corporation 2005-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c - * - * Copyright 2001 MontaVista Software 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 - */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -/* - * the first level int-handler will jump here if it is a emma2rh irq - */ -asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs) -{ - u32 intStatus; - u32 bitmask; - u32 i; - - intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_0) - & emma2rh_in32(EMMA2RH_BHIF_INT_EN_0); - -#ifdef EMMA2RH_SW_CASCADE - if (intStatus & - (1 << ((EMMA2RH_SW_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) { - u32 swIntStatus; - swIntStatus = emma2rh_in32(EMMA2RH_BHIF_SW_INT) - & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN); - for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { - if (swIntStatus & bitmask) { - do_IRQ(EMMA2RH_SW_IRQ_BASE + i, regs); - return; - } - } - } -#endif - - for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { - if (intStatus & bitmask) { - do_IRQ(EMMA2RH_IRQ_BASE + i, regs); - return; - } - } - - intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_1) - & emma2rh_in32(EMMA2RH_BHIF_INT_EN_1); - -#ifdef EMMA2RH_GPIO_CASCADE - if (intStatus & - (1 << ((EMMA2RH_GPIO_CASCADE - EMMA2RH_IRQ_INT0) & (32 - 1)))) { - u32 gpioIntStatus; - gpioIntStatus = emma2rh_in32(EMMA2RH_GPIO_INT_ST) - & emma2rh_in32(EMMA2RH_GPIO_INT_MASK); - for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { - if (gpioIntStatus & bitmask) { - do_IRQ(EMMA2RH_GPIO_IRQ_BASE + i, regs); - return; - } - } - } -#endif - - for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) { - if (intStatus & bitmask) { - do_IRQ(EMMA2RH_IRQ_BASE + i, regs); - return; - } - } - - intStatus = emma2rh_in32(EMMA2RH_BHIF_INT_ST_2) - & emma2rh_in32(EMMA2RH_BHIF_INT_EN_2); - - for (i = 64, bitmask = 1; i < 96; i++, bitmask <<= 1) { - if (intStatus & bitmask) { - do_IRQ(EMMA2RH_IRQ_BASE + i, regs); - return; - } - } -} diff --git a/arch/mips/emma2rh/common/irq_emma2rh.c b/arch/mips/emma2rh/common/irq_emma2rh.c deleted file mode 100644 index 7c930860c..000000000 --- a/arch/mips/emma2rh/common/irq_emma2rh.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * arch/mips/emma2rh/common/irq_emma2rh.c - * This file defines the irq handler for EMMA2RH. - * - * Copyright (C) NEC Electronics Corporation 2005-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/irq_5477.c - * - * Copyright 2001 MontaVista Software 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 - */ - -/* - * EMMA2RH defines 64 IRQs. - * - * This file exports one function: - * emma2rh_irq_init(u32 irq_base); - */ - -#include -#include -#include - -#include - -#include - -/* number of total irqs supported by EMMA2RH */ -#define NUM_EMMA2RH_IRQ 96 - -static int emma2rh_irq_base = -1; - -void ll_emma2rh_irq_enable(int); -void ll_emma2rh_irq_disable(int); - -static void emma2rh_irq_enable(unsigned int irq) -{ - ll_emma2rh_irq_enable(irq - emma2rh_irq_base); -} - -static void emma2rh_irq_disable(unsigned int irq) -{ - ll_emma2rh_irq_disable(irq - emma2rh_irq_base); -} - -static unsigned int emma2rh_irq_startup(unsigned int irq) -{ - emma2rh_irq_enable(irq); - return 0; -} - -#define emma2rh_irq_shutdown emma2rh_irq_disable - -static void emma2rh_irq_ack(unsigned int irq) -{ - /* disable interrupt - some handler will re-enable the irq - * and if the interrupt is leveled, we will have infinite loop - */ - ll_emma2rh_irq_disable(irq - emma2rh_irq_base); -} - -static void emma2rh_irq_end(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - ll_emma2rh_irq_enable(irq - emma2rh_irq_base); -} - -struct irq_chip emma2rh_irq_controller = { - .typename = "emma2rh_irq", - .startup = emma2rh_irq_startup, - .shutdown = emma2rh_irq_shutdown, - .enable = emma2rh_irq_enable, - .disable = emma2rh_irq_disable, - .ack = emma2rh_irq_ack, - .end = emma2rh_irq_end, - .set_affinity = NULL /* no affinity stuff for UP */ -}; - -void emma2rh_irq_init(u32 irq_base) -{ - u32 i; - - for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ; i++) { - irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].action = NULL; - irq_desc[i].depth = 1; - irq_desc[i].handler = &emma2rh_irq_controller; - } - - emma2rh_irq_base = irq_base; -} - -void ll_emma2rh_irq_enable(int emma2rh_irq) -{ - u32 reg_value; - u32 reg_bitmask; - u32 reg_index; - - reg_index = EMMA2RH_BHIF_INT_EN_0 - + (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0) - * (emma2rh_irq / 32); - reg_value = emma2rh_in32(reg_index); - reg_bitmask = 0x1 << (emma2rh_irq % 32); - db_assert((reg_value & reg_bitmask) == 0); - emma2rh_out32(reg_index, reg_value | reg_bitmask); -} - -void ll_emma2rh_irq_disable(int emma2rh_irq) -{ - u32 reg_value; - u32 reg_bitmask; - u32 reg_index; - - reg_index = EMMA2RH_BHIF_INT_EN_0 - + (EMMA2RH_BHIF_INT_EN_1 - EMMA2RH_BHIF_INT_EN_0) - * (emma2rh_irq / 32); - reg_value = emma2rh_in32(reg_index); - reg_bitmask = 0x1 << (emma2rh_irq % 32); - db_assert((reg_value & reg_bitmask) != 0); - emma2rh_out32(reg_index, reg_value & ~reg_bitmask); -} diff --git a/arch/mips/emma2rh/common/prom.c b/arch/mips/emma2rh/common/prom.c deleted file mode 100644 index 7433bd8e5..000000000 --- a/arch/mips/emma2rh/common/prom.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * arch/mips/emma2rh/common/prom.c - * This file is prom file. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/common/prom.c - * - * Copyright 2001 MontaVista Software 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 - */ -#include -#include -#include -#include - -#include -#include -#include -#include - -const char *get_system_type(void) -{ - switch (mips_machtype) { - case MACH_NEC_MARKEINS: - return "NEC EMMA2RH Mark-eins"; - default: - return "Unknown NEC board"; - } -} - -/* [jsun@junsun.net] PMON passes arguments in C main() style */ -void __init prom_init(void) -{ - int argc = fw_arg0; - char **arg = (char **)fw_arg1; - int i; - - /* if user passes kernel args, ignore the default one */ - if (argc > 1) - arcs_cmdline[0] = '\0'; - - /* arg[0] is "g", the rest is boot parameters */ - for (i = 1; i < argc; i++) { - if (strlen(arcs_cmdline) + strlen(arg[i] + 1) - >= sizeof(arcs_cmdline)) - break; - strcat(arcs_cmdline, arg[i]); - strcat(arcs_cmdline, " "); - } - - mips_machgroup = MACH_GROUP_NEC_EMMA2RH; - -#if defined(CONFIG_MARKEINS) - mips_machtype = MACH_NEC_MARKEINS; - add_memory_region(0, EMMA2RH_RAM_SIZE, BOOT_MEM_RAM); -#endif - -} - -void __init prom_free_prom_memory(void) -{ -} diff --git a/arch/mips/emma2rh/markeins/Makefile b/arch/mips/emma2rh/markeins/Makefile deleted file mode 100644 index 14fc268b1..000000000 --- a/arch/mips/emma2rh/markeins/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# arch/mips/emma2rh/markeins/Makefile -# Makefile for the common code of NEC EMMA2RH based board. -# -# Copyright (C) NEC Electronics Corporation 2005-2006 -# -# 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. -# - -obj-$(CONFIG_MARKEINS) += irq.o irq_markeins.o setup.o led.o platform.o diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c deleted file mode 100644 index 2a736be42..000000000 --- a/arch/mips/emma2rh/markeins/irq.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * arch/mips/emma2rh/markeins/irq.c - * This file defines the irq handler for EMMA2RH. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/irq.c - * - * Copyright 2001 MontaVista Software 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 - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -/* - * IRQ mapping - * - * 0-7: 8 CPU interrupts - * 0 - software interrupt 0 - * 1 - software interrupt 1 - * 2 - most Vrc5477 interrupts are routed to this pin - * 3 - (optional) some other interrupts routed to this pin for debugg - * 4 - not used - * 5 - not used - * 6 - not used - * 7 - cpu timer (used by default) - * - */ - -extern void emma2rh_sw_irq_init(u32 base); -extern void emma2rh_gpio_irq_init(u32 base); -extern void emma2rh_irq_init(u32 base); -extern asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs); - -static struct irqaction irq_cascade = { - .handler = no_action, - .flags = 0, - .mask = CPU_MASK_NONE, - .name = "cascade", - .dev_id = NULL, - .next = NULL, -}; - -void __init arch_init_irq(void) -{ - u32 reg; - - db_run(printk("markeins_irq_setup invoked.\n")); - - /* by default, interrupts are disabled. */ - emma2rh_out32(EMMA2RH_BHIF_INT_EN_0, 0); - emma2rh_out32(EMMA2RH_BHIF_INT_EN_1, 0); - emma2rh_out32(EMMA2RH_BHIF_INT_EN_2, 0); - emma2rh_out32(EMMA2RH_BHIF_INT1_EN_0, 0); - emma2rh_out32(EMMA2RH_BHIF_INT1_EN_1, 0); - emma2rh_out32(EMMA2RH_BHIF_INT1_EN_2, 0); - emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, 0); - - clear_c0_status(0xff00); - set_c0_status(0x0400); - -#define GPIO_PCI (0xf<<15) - /* setup GPIO interrupt for PCI interface */ - /* direction input */ - reg = emma2rh_in32(EMMA2RH_GPIO_DIR); - emma2rh_out32(EMMA2RH_GPIO_DIR, reg & ~GPIO_PCI); - /* disable interrupt */ - reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK); - emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg & ~GPIO_PCI); - /* level triggerd */ - reg = emma2rh_in32(EMMA2RH_GPIO_INT_MODE); - emma2rh_out32(EMMA2RH_GPIO_INT_MODE, reg | GPIO_PCI); - reg = emma2rh_in32(EMMA2RH_GPIO_INT_CND_A); - emma2rh_out32(EMMA2RH_GPIO_INT_CND_A, reg & (~GPIO_PCI)); - /* interrupt clear */ - emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~GPIO_PCI); - - /* init all controllers */ - emma2rh_irq_init(EMMA2RH_IRQ_BASE); - emma2rh_sw_irq_init(EMMA2RH_SW_IRQ_BASE); - emma2rh_gpio_irq_init(EMMA2RH_GPIO_IRQ_BASE); - mips_cpu_irq_init(CPU_IRQ_BASE); - - /* setup cascade interrupts */ - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_SW_CASCADE, &irq_cascade); - setup_irq(EMMA2RH_IRQ_BASE + EMMA2RH_GPIO_CASCADE, &irq_cascade); - setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade); -} - -asmlinkage void plat_irq_dispatch(struct pt_regs *regs) -{ - unsigned int pending = read_c0_status() & read_c0_cause(); - - if (pending & STATUSF_IP7) - do_IRQ(CPU_IRQ_BASE + 7, regs); - else if (pending & STATUSF_IP2) - emma2rh_irq_dispatch(regs); - else if (pending & STATUSF_IP1) - do_IRQ(CPU_IRQ_BASE + 1, regs); - else if (pending & STATUSF_IP0) - do_IRQ(CPU_IRQ_BASE + 0, regs); - else - spurious_interrupt(regs); -} - - diff --git a/arch/mips/emma2rh/markeins/irq_markeins.c b/arch/mips/emma2rh/markeins/irq_markeins.c deleted file mode 100644 index f23ae9fcf..000000000 --- a/arch/mips/emma2rh/markeins/irq_markeins.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * arch/mips/emma2rh/markeins/irq_markeins.c - * This file defines the irq handler for Mark-eins. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/irq_5477.c - * - * Copyright 2001 MontaVista Software 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 - */ -#include -#include -#include -#include - -#include -#include - -static int emma2rh_sw_irq_base = -1; -static int emma2rh_gpio_irq_base = -1; - -void ll_emma2rh_sw_irq_enable(int reg); -void ll_emma2rh_sw_irq_disable(int reg); -void ll_emma2rh_gpio_irq_enable(int reg); -void ll_emma2rh_gpio_irq_disable(int reg); - -static void emma2rh_sw_irq_enable(unsigned int irq) -{ - ll_emma2rh_sw_irq_enable(irq - emma2rh_sw_irq_base); -} - -static void emma2rh_sw_irq_disable(unsigned int irq) -{ - ll_emma2rh_sw_irq_disable(irq - emma2rh_sw_irq_base); -} - -static unsigned int emma2rh_sw_irq_startup(unsigned int irq) -{ - emma2rh_sw_irq_enable(irq); - return 0; -} - -#define emma2rh_sw_irq_shutdown emma2rh_sw_irq_disable - -static void emma2rh_sw_irq_ack(unsigned int irq) -{ - ll_emma2rh_sw_irq_disable(irq - emma2rh_sw_irq_base); -} - -static void emma2rh_sw_irq_end(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - ll_emma2rh_sw_irq_enable(irq - emma2rh_sw_irq_base); -} - -struct irq_chip emma2rh_sw_irq_controller = { - .typename = "emma2rh_sw_irq", - .startup = emma2rh_sw_irq_startup, - .shutdown = emma2rh_sw_irq_shutdown, - .enable = emma2rh_sw_irq_enable, - .disable = emma2rh_sw_irq_disable, - .ack = emma2rh_sw_irq_ack, - .end = emma2rh_sw_irq_end, - .set_affinity = NULL, -}; - -void emma2rh_sw_irq_init(u32 irq_base) -{ - u32 i; - - for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ_SW; i++) { - irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].action = NULL; - irq_desc[i].depth = 2; - irq_desc[i].handler = &emma2rh_sw_irq_controller; - } - - emma2rh_sw_irq_base = irq_base; -} - -void ll_emma2rh_sw_irq_enable(int irq) -{ - u32 reg; - - db_assert(irq >= 0); - db_assert(irq < NUM_EMMA2RH_IRQ_SW); - - reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN); - reg |= 1 << irq; - emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg); -} - -void ll_emma2rh_sw_irq_disable(int irq) -{ - u32 reg; - - db_assert(irq >= 0); - db_assert(irq < 32); - - reg = emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN); - reg &= ~(1 << irq); - emma2rh_out32(EMMA2RH_BHIF_SW_INT_EN, reg); -} - -static void emma2rh_gpio_irq_enable(unsigned int irq) -{ - ll_emma2rh_gpio_irq_enable(irq - emma2rh_gpio_irq_base); -} - -static void emma2rh_gpio_irq_disable(unsigned int irq) -{ - ll_emma2rh_gpio_irq_disable(irq - emma2rh_gpio_irq_base); -} - -static unsigned int emma2rh_gpio_irq_startup(unsigned int irq) -{ - emma2rh_gpio_irq_enable(irq); - return 0; -} - -#define emma2rh_gpio_irq_shutdown emma2rh_gpio_irq_disable - -static void emma2rh_gpio_irq_ack(unsigned int irq) -{ - irq -= emma2rh_gpio_irq_base; - emma2rh_out32(EMMA2RH_GPIO_INT_ST, ~(1 << irq)); - ll_emma2rh_gpio_irq_disable(irq); -} - -static void emma2rh_gpio_irq_end(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - ll_emma2rh_gpio_irq_enable(irq - emma2rh_gpio_irq_base); -} - -struct irq_chip emma2rh_gpio_irq_controller = { - .typename = "emma2rh_gpio_irq", - .startup = emma2rh_gpio_irq_startup, - .shutdown = emma2rh_gpio_irq_shutdown, - .enable = emma2rh_gpio_irq_enable, - .disable = emma2rh_gpio_irq_disable, - .ack = emma2rh_gpio_irq_ack, - .end = emma2rh_gpio_irq_end, - .set_affinity = NULL, -}; - -void emma2rh_gpio_irq_init(u32 irq_base) -{ - u32 i; - - for (i = irq_base; i < irq_base + NUM_EMMA2RH_IRQ_GPIO; i++) { - irq_desc[i].status = IRQ_DISABLED; - irq_desc[i].action = NULL; - irq_desc[i].depth = 2; - irq_desc[i].handler = &emma2rh_gpio_irq_controller; - } - - emma2rh_gpio_irq_base = irq_base; -} - -void ll_emma2rh_gpio_irq_enable(int irq) -{ - u32 reg; - - db_assert(irq >= 0); - db_assert(irq < NUM_EMMA2RH_IRQ_GPIO); - - reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK); - reg |= 1 << irq; - emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg); -} - -void ll_emma2rh_gpio_irq_disable(int irq) -{ - u32 reg; - - db_assert(irq >= 0); - db_assert(irq < NUM_EMMA2RH_IRQ_GPIO); - - reg = emma2rh_in32(EMMA2RH_GPIO_INT_MASK); - reg &= ~(1 << irq); - emma2rh_out32(EMMA2RH_GPIO_INT_MASK, reg); -} diff --git a/arch/mips/emma2rh/markeins/led.c b/arch/mips/emma2rh/markeins/led.c deleted file mode 100644 index b65254c1b..000000000 --- a/arch/mips/emma2rh/markeins/led.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * arch/mips/emma2rh/markeins/led.c - * This file defines the led display for Mark-eins. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include - -const unsigned long clear = 0x20202020; - -#define LED_BASE 0xb1400038 - -void markeins_led_clear(void) -{ - emma2rh_out32(LED_BASE, clear); - emma2rh_out32(LED_BASE + 4, clear); -} - -void markeins_led(const char *str) -{ - int i; - int len = strlen(str); - - markeins_led_clear(); - if (len > 8) - len = 8; - - if (emma2rh_in32(0xb0000800) & (0x1 << 18)) - for (i = 0; i < len; i++) - emma2rh_out8(LED_BASE + i, str[i]); - else - for (i = 0; i < len; i++) - emma2rh_out8(LED_BASE + (i & 4) + (3 - (i & 3)), - str[i]); -} - -void markeins_led_hex(u32 val) -{ - char str[10]; - - sprintf(str, "%08x", val); - markeins_led(str); -} diff --git a/arch/mips/emma2rh/markeins/platform.c b/arch/mips/emma2rh/markeins/platform.c deleted file mode 100644 index 15cc61df3..000000000 --- a/arch/mips/emma2rh/markeins/platform.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * arch/mips/emma2rh/markeins/platofrm.c - * This file sets up platform devices for EMMA2RH Mark-eins. - * - * Copyright(C) MontaVista Software Inc, 2006 - * - * Author: dmitry pervushin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#define I2C_EMMA2RH "emma2rh-iic" /* must be in sync with IIC driver */ - -static struct resource i2c_emma_resources_0[] = { - { NULL, EMMA2RH_IRQ_PIIC0, EMMA2RH_IRQ_PIIC0, IORESOURCE_IRQ }, - { NULL, KSEG1ADDR(EMMA2RH_PIIC0_BASE), KSEG1ADDR(EMMA2RH_PIIC0_BASE + 0x1000), 0 }, -}; - -struct resource i2c_emma_resources_1[] = { - { NULL, EMMA2RH_IRQ_PIIC1, EMMA2RH_IRQ_PIIC1, IORESOURCE_IRQ }, - { NULL, KSEG1ADDR(EMMA2RH_PIIC1_BASE), KSEG1ADDR(EMMA2RH_PIIC1_BASE + 0x1000), 0 }, -}; - -struct resource i2c_emma_resources_2[] = { - { NULL, EMMA2RH_IRQ_PIIC2, EMMA2RH_IRQ_PIIC2, IORESOURCE_IRQ }, - { NULL, KSEG1ADDR(EMMA2RH_PIIC2_BASE), KSEG1ADDR(EMMA2RH_PIIC2_BASE + 0x1000), 0 }, -}; - -struct platform_device i2c_emma_devices[] = { - [0] = { - .name = I2C_EMMA2RH, - .id = 0, - .resource = i2c_emma_resources_0, - .num_resources = ARRAY_SIZE(i2c_emma_resources_0), - }, - [1] = { - .name = I2C_EMMA2RH, - .id = 1, - .resource = i2c_emma_resources_1, - .num_resources = ARRAY_SIZE(i2c_emma_resources_1), - }, - [2] = { - .name = I2C_EMMA2RH, - .id = 2, - .resource = i2c_emma_resources_2, - .num_resources = ARRAY_SIZE(i2c_emma_resources_2), - }, -}; - -#define EMMA2RH_SERIAL_CLOCK 18544000 -#define EMMA2RH_SERIAL_FLAGS UPF_BOOT_AUTOCONF | UPF_SKIP_TEST - -static struct plat_serial8250_port platform_serial_ports[] = { - [0] = { - .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3), - .irq = EMMA2RH_IRQ_PFUR0, - .uartclk = EMMA2RH_SERIAL_CLOCK, - .regshift = 4, - .iotype = UPIO_MEM, - .flags = EMMA2RH_SERIAL_FLAGS, - }, - [1] = { - .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3), - .irq = EMMA2RH_IRQ_PFUR1, - .uartclk = EMMA2RH_SERIAL_CLOCK, - .regshift = 4, - .iotype = UPIO_MEM, - .flags = EMMA2RH_SERIAL_FLAGS, - }, - [2] = { - .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3), - .irq = EMMA2RH_IRQ_PFUR2, - .uartclk = EMMA2RH_SERIAL_CLOCK, - .regshift = 4, - .iotype = UPIO_MEM, - .flags = EMMA2RH_SERIAL_FLAGS, - }, - [3] = { - .flags = 0, - }, -}; - -static struct platform_device serial_emma = { - .name = "serial8250", - .dev = { - .platform_data = &platform_serial_ports, - }, -}; - -static struct platform_device *devices[] = { - &i2c_emma_devices[0], - &i2c_emma_devices[1], - &i2c_emma_devices[2], - &serial_emma, -}; - -static struct mtd_partition markeins_parts[] = { - [0] = { - .name = "RootFS", - .offset = 0x00000000, - .size = 0x00c00000, - }, - [1] = { - .name = "boot code area", - .offset = MTDPART_OFS_APPEND, - .size = 0x00100000, - }, - [2] = { - .name = "kernel image", - .offset = MTDPART_OFS_APPEND, - .size = 0x00300000, - }, - [3] = { - .name = "RootFS2", - .offset = MTDPART_OFS_APPEND, - .size = 0x00c00000, - }, - [4] = { - .name = "boot code area2", - .offset = MTDPART_OFS_APPEND, - .size = 0x00100000, - }, - [5] = { - .name = "kernel image2", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - }, -}; - -static int __init platform_devices_setup(void) -{ - physmap_set_partitions(markeins_parts, ARRAY_SIZE(markeins_parts)); - return platform_add_devices(devices, ARRAY_SIZE(devices)); -} - -arch_initcall(platform_devices_setup); - diff --git a/arch/mips/emma2rh/markeins/setup.c b/arch/mips/emma2rh/markeins/setup.c deleted file mode 100644 index b29a44739..000000000 --- a/arch/mips/emma2rh/markeins/setup.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * arch/mips/emma2rh/markeins/setup.c - * This file is setup for EMMA2RH Mark-eins. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/setup.c. - * - * Copyright 2001 MontaVista Software 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 - */ -#include -#include -#include -#include -#include -#include -#include -#include /* for HZ */ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define USE_CPU_COUNTER_TIMER /* whether we use cpu counter */ - -extern void markeins_led(const char *); - -static int bus_frequency = 0; - -static void markeins_machine_restart(char *command) -{ - static void (*back_to_prom) (void) = (void (*)(void))0xbfc00000; - - printk("cannot EMMA2RH Mark-eins restart.\n"); - markeins_led("restart."); - back_to_prom(); -} - -static void markeins_machine_halt(void) -{ - printk("EMMA2RH Mark-eins halted.\n"); - markeins_led("halted."); - while (1) ; -} - -static void markeins_machine_power_off(void) -{ - printk("EMMA2RH Mark-eins halted. Please turn off the power.\n"); - markeins_led("poweroff."); - while (1) ; -} - -static unsigned long clock[4] = { 166500000, 187312500, 199800000, 210600000 }; - -static unsigned int __init detect_bus_frequency(unsigned long rtc_base) -{ - u32 reg; - - /* detect from boot strap */ - reg = emma2rh_in32(EMMA2RH_BHIF_STRAP_0); - reg = (reg >> 4) & 0x3; - return clock[reg]; -} - -static void __init emma2rh_time_init(void) -{ - u32 reg; - if (bus_frequency == 0) - bus_frequency = detect_bus_frequency(0); - - reg = emma2rh_in32(EMMA2RH_BHIF_STRAP_0); - if ((reg & 0x3) == 0) - reg = (reg >> 6) & 0x3; - else { - reg = emma2rh_in32(EMMA2RH_BHIF_MAIN_CTRL); - reg = (reg >> 4) & 0x3; - } - mips_hpt_frequency = (bus_frequency * (4 + reg)) / 4 / 2; -} - -void __init plat_timer_setup(struct irqaction *irq) -{ - /* we are using the cpu counter for timer interrupts */ - setup_irq(CPU_IRQ_BASE + 7, irq); -} - -static void markeins_board_init(void); -extern void markeins_irq_setup(void); - -static void inline __init markeins_sio_setup(void) -{ -#ifdef CONFIG_KGDB_8250 - struct uart_port emma_port; - - memset(&emma_port, 0, sizeof(emma_port)); - - emma_port.flags = - UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; - emma_port.iotype = UPIO_MEM; - emma_port.regshift = 4; /* I/O addresses are every 8 bytes */ - emma_port.uartclk = 18544000; /* Clock rate of the chip */ - - emma_port.line = 0; - emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3); - emma_port.membase = (u8*)emma_port.mapbase; - early_serial_setup(&emma_port); - - emma_port.line = 1; - emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3); - emma_port.membase = (u8*)emma_port.mapbase; - early_serial_setup(&emma_port); - - emma_port.irq = EMMA2RH_IRQ_PFUR1; - kgdb8250_add_port(1, &emma_port); -#endif -} - -void __init plat_mem_setup(void) -{ - /* initialize board - we don't trust the loader */ - markeins_board_init(); - - set_io_port_base(KSEG1ADDR(EMMA2RH_PCI_IO_BASE)); - - board_time_init = emma2rh_time_init; - - _machine_restart = markeins_machine_restart; - _machine_halt = markeins_machine_halt; - pm_power_off = markeins_machine_power_off; - - /* setup resource limits */ - ioport_resource.start = EMMA2RH_PCI_IO_BASE; - ioport_resource.end = EMMA2RH_PCI_IO_BASE + EMMA2RH_PCI_IO_SIZE - 1; - iomem_resource.start = EMMA2RH_IO_BASE; - iomem_resource.end = EMMA2RH_ROM_BASE - 1; - - /* Reboot on panic */ - panic_timeout = 180; - - markeins_sio_setup(); -} - -static void __init markeins_board_init(void) -{ - u32 val; - - val = emma2rh_in32(EMMA2RH_PBRD_INT_EN); /* open serial interrupts. */ - emma2rh_out32(EMMA2RH_PBRD_INT_EN, val | 0xaa); - val = emma2rh_in32(EMMA2RH_PBRD_CLKSEL); /* set serial clocks. */ - emma2rh_out32(EMMA2RH_PBRD_CLKSEL, val | 0x5); /* 18MHz */ - emma2rh_out32(EMMA2RH_PCI_CONTROL, 0); - - markeins_led("MVL E2RH"); -} diff --git a/arch/mips/galileo-boards/ev96100/setup.c b/arch/mips/galileo-boards/ev96100/setup.c index 639ad5562..78dbb18ed 100644 --- a/arch/mips/galileo-boards/ev96100/setup.c +++ b/arch/mips/galileo-boards/ev96100/setup.c @@ -32,6 +32,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -54,7 +55,7 @@ extern void mips_reboot_setup(void); unsigned char mac_0_1[12]; -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned int config = read_c0_config(); unsigned int status = read_c0_status(); diff --git a/arch/mips/galileo-boards/ev96100/time.c b/arch/mips/galileo-boards/ev96100/time.c index 8cbe84264..bff5b1c17 100644 --- a/arch/mips/galileo-boards/ev96100/time.c +++ b/arch/mips/galileo-boards/ev96100/time.c @@ -32,6 +32,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/gt64120/common/Makefile b/arch/mips/gt64120/common/Makefile index 1ef676e22..eba505101 100644 --- a/arch/mips/gt64120/common/Makefile +++ b/arch/mips/gt64120/common/Makefile @@ -3,3 +3,4 @@ # obj-y += time.o +obj-$(CONFIG_PCI) += pci.o diff --git a/arch/mips/gt64120/common/pci.c b/arch/mips/gt64120/common/pci.c new file mode 100644 index 000000000..e9e5419a0 --- /dev/null +++ b/arch/mips/gt64120/common/pci.c @@ -0,0 +1,147 @@ +/* + * BRIEF MODULE DESCRIPTION + * Galileo Evaluation Boards PCI support. + * + * The general-purpose functions to read/write and configure the GT64120A's + * PCI registers (function names start with pci0 or pci1) are either direct + * copies of functions written by Galileo Technology, or are modifications + * of their functions to work with Linux 2.4 vs Linux 2.2. These functions + * are Copyright - Galileo Technology. + * + * Other functions are derived from other MIPS PCI implementations, or were + * written by RidgeRun, Inc, Copyright (C) 2000 RidgeRun, Inc. + * glonnon@ridgerun.com, skranz@ridgerun.com, stevej@ridgerun.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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 +#include +#include +#include +#include + +#define SELF 0 + +/* + * pciXReadConfigReg - Read from a PCI configuration register + * - Make sure the GT is configured as a master before + * reading from another device on the PCI. + * - The function takes care of Big/Little endian conversion. + * INPUTS: regOffset: The register offset as it apears in the GT spec (or PCI + * spec) + * pciDevNum: The device number needs to be addressed. + * RETURNS: data , if the data == 0xffffffff check the master abort bit in the + * cause register to make sure the data is valid + * + * Configuration Address 0xCF8: + * + * 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number + * |congif|Reserved| Bus |Device|Function|Register|00| + * |Enable| |Number|Number| Number | Number | | <=field Name + * + */ +static unsigned int pci0ReadConfigReg(int offset, struct pci_dev *device) +{ + unsigned int DataForRegCf8; + unsigned int data; + + DataForRegCf8 = ((PCI_SLOT(device->devfn) << 11) | + (PCI_FUNC(device->devfn) << 8) | + (offset & ~0x3)) | 0x80000000; + GT_WRITE(GT_PCI0_CFGADDR_OFS, DataForRegCf8); + + /* + * The casual observer might wonder why the READ is duplicated here, + * rather than immediately following the WRITE, and just have the swap + * in the "if". That's because there is a latency problem with trying + * to read immediately after setting up the address register. The "if" + * check gives enough time for the address to stabilize, so the READ + * can work. + */ + if (PCI_SLOT(device->devfn) == SELF) /* This board */ + return GT_READ(GT_PCI0_CFGDATA_OFS); + else /* PCI is little endian so swap the Data. */ + return __GT_READ(GT_PCI0_CFGDATA_OFS); +} + +/* + * pciXWriteConfigReg - Write to a PCI configuration register + * - Make sure the GT is configured as a master before + * writingto another device on the PCI. + * - The function takes care of Big/Little endian conversion. + * Inputs: unsigned int regOffset: The register offset as it apears in the + * GT spec + * (or any other PCI device spec) + * pciDevNum: The device number needs to be addressed. + * + * Configuration Address 0xCF8: + * + * 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number + * |congif|Reserved| Bus |Device|Function|Register|00| + * |Enable| |Number|Number| Number | Number | | <=field Name + * + */ +static void pci0WriteConfigReg(unsigned int offset, + struct pci_dev *device, unsigned int data) +{ + unsigned int DataForRegCf8; + + DataForRegCf8 = ((PCI_SLOT(device->devfn) << 11) | + (PCI_FUNC(device->devfn) << 8) | + (offset & ~0x3)) | 0x80000000; + GT_WRITE(GT_PCI0_CFGADDR_OFS, DataForRegCf8); + + if (PCI_SLOT(device->devfn) == SELF) /* This board */ + GT_WRITE(GT_PCI0_CFGDATA_OFS, data); + else /* configuration Transaction over the pci. */ + __GT_WRITE(GT_PCI0_CFGDATA_OFS, data); +} + +extern struct pci_ops gt64120_pci_ops; + +void __init pcibios_init(void) +{ + u32 tmp; + struct pci_dev controller; + + controller.devfn = SELF; + + tmp = GT_READ(GT_PCI0_CMD_OFS); /* Huh??? -- Ralf */ + tmp = GT_READ(GT_PCI0_BARE_OFS); + + /* + * You have to enable bus mastering to configure any other + * card on the bus. + */ + tmp = pci0ReadConfigReg(PCI_COMMAND, &controller); + tmp |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_SERR; + pci0WriteConfigReg(PCI_COMMAND, &controller, tmp); + + /* + * Reset PCI I/O and PCI MEM values to ones supported by EVM. + */ + ioport_resource.start = GT_PCI_IO_BASE; + ioport_resource.end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1; + iomem_resource.start = GT_PCI_MEM_BASE; + iomem_resource.end = GT_PCI_MEM_BASE + GT_PCI_MEM_SIZE - 1; + + pci_scan_bus(0, >64120_pci_ops, NULL); +} diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c index d837b26fb..2287b5953 100644 --- a/arch/mips/gt64120/common/time.c +++ b/arch/mips/gt64120/common/time.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include @@ -77,7 +78,7 @@ void gt64120_time_init(void) * the values to the correct interrupt line. */ timer.handler = gt64120_irq; - timer.flags = IRQF_SHARED | IRQF_DISABLED; + timer.flags = SA_SHIRQ | SA_INTERRUPT; timer.name = "timer"; timer.dev_id = NULL; timer.next = NULL; diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c index 5d939ac58..46c468b26 100644 --- a/arch/mips/gt64120/ev64120/irq.c +++ b/arch/mips/gt64120/ev64120/irq.c @@ -104,7 +104,7 @@ static void end_ev64120_irq(unsigned int irq) enable_ev64120_irq(irq); } -static struct irq_chip ev64120_irq_type = { +static struct hw_interrupt_type ev64120_irq_type = { .typename = "EV64120", .startup = startup_ev64120_irq, .shutdown = shutdown_ev64120_irq, @@ -138,7 +138,7 @@ void __init arch_init_irq(void) /* Let's initialize our IRQ descriptors */ for (i = 0; i < NR_IRQS; i++) { irq_desc[i].status = 0; - irq_desc[i].chip = &no_irq_chip; + irq_desc[i].handler = &no_irq_type; irq_desc[i].action = NULL; irq_desc[i].depth = 0; spin_lock_init(&irq_desc[i].lock); diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c index 4236da31e..6d859d1e7 100644 --- a/arch/mips/gt64120/ev64120/setup.c +++ b/arch/mips/gt64120/ev64120/setup.c @@ -71,7 +71,7 @@ unsigned long __init prom_free_prom_memory(void) */ extern void gt64120_time_init(void); -void __init plat_mem_setup(void) +void __init plat_setup(void) { _machine_restart = galileo_machine_restart; _machine_halt = galileo_machine_halt; diff --git a/arch/mips/gt64120/momenco_ocelot/dbg_io.c b/arch/mips/gt64120/momenco_ocelot/dbg_io.c index 212868458..f0a6a38fc 100644 --- a/arch/mips/gt64120/momenco_ocelot/dbg_io.c +++ b/arch/mips/gt64120/momenco_ocelot/dbg_io.c @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_KGDB diff --git a/arch/mips/gt64120/momenco_ocelot/setup.c b/arch/mips/gt64120/momenco_ocelot/setup.c index 9804642ec..20b65d3d2 100644 --- a/arch/mips/gt64120/momenco_ocelot/setup.c +++ b/arch/mips/gt64120/momenco_ocelot/setup.c @@ -152,7 +152,7 @@ void PMON_v2_setup() gt64120_base = 0xe0000000; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { void (*l3func)(unsigned long)=KSEG1ADDR(&setup_l3cache); unsigned int tmpword; @@ -164,8 +164,8 @@ void __init plat_mem_setup(void) pm_power_off = momenco_ocelot_power_off; /* - * initrd_start = (unsigned long)ocelot_initrd_start; - * initrd_end = (unsigned long)ocelot_initrd_start + (ulong)ocelot_initrd_size; + * initrd_start = (ulong)ocelot_initrd_start; + * initrd_end = (ulong)ocelot_initrd_start + (ulong)ocelot_initrd_size; * initrd_below_start_ok = 1; */ diff --git a/arch/mips/gt64120/wrppmc/Makefile b/arch/mips/gt64120/wrppmc/Makefile deleted file mode 100644 index 7cf522055..000000000 --- a/arch/mips/gt64120/wrppmc/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# -# 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 2006 Wind River System, Inc. -# Author: Rongkai.Zhan -# -# Makefile for the Wind River MIPS 4KC PPMC Eval Board -# - -obj-y += irq.o reset.o setup.o time.o pci.o - -EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c deleted file mode 100644 index 8d75a43ce..000000000 --- a/arch/mips/gt64120/wrppmc/irq.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * irq.c: GT64120 Interrupt Controller - * - * Copyright (C) 2006, Wind River System Inc. - * Author: Rongkai.Zhan, - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -asmlinkage void plat_irq_dispatch(struct pt_regs *regs) -{ - unsigned int pending = read_c0_status() & read_c0_cause(); - - if (pending & STATUSF_IP7) - do_IRQ(WRPPMC_MIPS_TIMER_IRQ, regs); /* CPU Compare/Count internal timer */ - else if (pending & STATUSF_IP6) - do_IRQ(WRPPMC_UART16550_IRQ, regs); /* UART 16550 port */ - else if (pending & STATUSF_IP3) - do_IRQ(WRPPMC_PCI_INTA_IRQ, regs); /* PCI INT_A */ - else - spurious_interrupt(regs); -} - -/** - * Initialize GT64120 Interrupt Controller - */ -void gt64120_init_pic(void) -{ - /* clear CPU Interrupt Cause Registers */ - GT_WRITE(GT_INTRCAUSE_OFS, (0x1F << 21)); - GT_WRITE(GT_HINTRCAUSE_OFS, 0x00); - - /* Disable all interrupts from GT64120 bridge chip */ - GT_WRITE(GT_INTRMASK_OFS, 0x00); - GT_WRITE(GT_HINTRMASK_OFS, 0x00); - GT_WRITE(GT_PCI0_ICMASK_OFS, 0x00); - GT_WRITE(GT_PCI0_HICMASK_OFS, 0x00); -} - -void __init arch_init_irq(void) -{ - /* IRQ 0 - 7 are for MIPS common irq_cpu controller */ - mips_cpu_irq_init(0); - - gt64120_init_pic(); -} diff --git a/arch/mips/gt64120/wrppmc/pci.c b/arch/mips/gt64120/wrppmc/pci.c deleted file mode 100644 index 2fbe93467..000000000 --- a/arch/mips/gt64120/wrppmc/pci.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * pci.c: GT64120 PCI support. - * - * Copyright (C) 2006, Wind River System Inc. Rongkai.Zhan - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ -#include -#include -#include -#include -#include - -extern struct pci_ops gt64120_pci_ops; - -static struct resource pci0_io_resource = { - .name = "pci_0 io", - .start = GT_PCI_IO_BASE, - .end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1, - .flags = IORESOURCE_IO, -}; - -static struct resource pci0_mem_resource = { - .name = "pci_0 memory", - .start = GT_PCI_MEM_BASE, - .end = GT_PCI_MEM_BASE + GT_PCI_MEM_SIZE - 1, - .flags = IORESOURCE_MEM, -}; - -static struct pci_controller hose_0 = { - .pci_ops = >64120_pci_ops, - .io_resource = &pci0_io_resource, - .mem_resource = &pci0_mem_resource, -}; - -static int __init gt64120_pci_init(void) -{ - u32 tmp; - - tmp = GT_READ(GT_PCI0_CMD_OFS); /* Huh??? -- Ralf */ - tmp = GT_READ(GT_PCI0_BARE_OFS); - - /* reset the whole PCI I/O space range */ - ioport_resource.start = GT_PCI_IO_BASE; - ioport_resource.end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1; - - register_pci_controller(&hose_0); - return 0; -} - -arch_initcall(gt64120_pci_init); diff --git a/arch/mips/gt64120/wrppmc/reset.c b/arch/mips/gt64120/wrppmc/reset.c deleted file mode 100644 index b97039c6d..000000000 --- a/arch/mips/gt64120/wrppmc/reset.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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) 1997 Ralf Baechle - */ -#include -#include -#include -#include -#include -#include -#include -#include - -void wrppmc_machine_restart(char *command) -{ - /* - * Ouch, we're still alive ... This time we take the silver bullet ... - * ... and find that we leave the hardware in a state in which the - * kernel in the flush locks up somewhen during of after the PCI - * detection stuff. - */ - local_irq_disable(); - set_c0_status(ST0_BEV | ST0_ERL); - change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); - flush_cache_all(); - write_c0_wired(0); - __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000)); -} - -void wrppmc_machine_halt(void) -{ - local_irq_disable(); - - printk(KERN_NOTICE "You can safely turn off the power\n"); - while (1) { - __asm__( - ".set\tmips3\n\t" - "wait\n\t" - ".set\tmips0" - ); - } -} - -void wrppmc_machine_power_off(void) -{ - wrppmc_machine_halt(); -} diff --git a/arch/mips/gt64120/wrppmc/setup.c b/arch/mips/gt64120/wrppmc/setup.c deleted file mode 100644 index 429afc400..000000000 --- a/arch/mips/gt64120/wrppmc/setup.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * setup.c: Setup pointers to hardware dependent routines. - * - * 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) 1996, 1997, 2004 by Ralf Baechle (ralf@linux-mips.org) - * Copyright (C) 2006, Wind River System Inc. Rongkai.zhan - */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -unsigned long gt64120_base = KSEG1ADDR(0x14000000); - -#ifdef WRPPMC_EARLY_DEBUG - -static volatile unsigned char * wrppmc_led = \ - (volatile unsigned char *)KSEG1ADDR(WRPPMC_LED_BASE); - -/* - * PPMC LED control register: - * -) bit[0] controls DS1 LED (1 - OFF, 0 - ON) - * -) bit[1] controls DS2 LED (1 - OFF, 0 - ON) - * -) bit[2] controls DS4 LED (1 - OFF, 0 - ON) - */ -void wrppmc_led_on(int mask) -{ - unsigned char value = *wrppmc_led; - - value &= (0xF8 | mask); - *wrppmc_led = value; -} - -/* If mask = 0, turn off all LEDs */ -void wrppmc_led_off(int mask) -{ - unsigned char value = *wrppmc_led; - - value |= (0x7 & mask); - *wrppmc_led = value; -} - -/* - * We assume that bootloader has initialized UART16550 correctly - */ -void __init wrppmc_early_putc(char ch) -{ - static volatile unsigned char *wrppmc_uart = \ - (volatile unsigned char *)KSEG1ADDR(WRPPMC_UART16550_BASE); - unsigned char value; - - /* Wait until Transmit-Holding-Register is empty */ - while (1) { - value = *(wrppmc_uart + 5); - if (value & 0x20) - break; - } - - *wrppmc_uart = ch; -} - -void __init wrppmc_early_printk(const char *fmt, ...) -{ - static char pbuf[256] = {'\0', }; - char *ch = pbuf; - va_list args; - unsigned int i; - - memset(pbuf, 0, 256); - va_start(args, fmt); - i = vsprintf(pbuf, fmt, args); - va_end(args); - - /* Print the string */ - while (*ch != '\0') { - wrppmc_early_putc(*ch); - /* if print '\n', also print '\r' */ - if (*ch++ == '\n') - wrppmc_early_putc('\r'); - } -} -#endif /* WRPPMC_EARLY_DEBUG */ - -unsigned long __init prom_free_prom_memory(void) -{ - return 0; -} - -#ifdef CONFIG_SERIAL_8250 -static void wrppmc_setup_serial(void) -{ - struct uart_port up; - - memset(&up, 0x00, sizeof(struct uart_port)); - - /* - * A note about mapbase/membase - * -) mapbase is the physical address of the IO port. - * -) membase is an 'ioremapped' cookie. - */ - up.line = 0; - up.type = PORT_16550; - up.iotype = UPIO_MEM; - up.mapbase = WRPPMC_UART16550_BASE; - up.membase = ioremap(up.mapbase, 8); - up.irq = WRPPMC_UART16550_IRQ; - up.uartclk = WRPPMC_UART16550_CLOCK; - up.flags = UPF_SKIP_TEST/* | UPF_BOOT_AUTOCONF */; - up.regshift = 0; - - early_serial_setup(&up); -} -#endif - -void __init plat_mem_setup(void) -{ - extern void wrppmc_time_init(void); - extern void wrppmc_machine_restart(char *command); - extern void wrppmc_machine_halt(void); - extern void wrppmc_machine_power_off(void); - - _machine_restart = wrppmc_machine_restart; - _machine_halt = wrppmc_machine_halt; - pm_power_off = wrppmc_machine_power_off; - - /* Use MIPS Count/Compare Timer */ - board_time_init = wrppmc_time_init; - - /* This makes the operations of 'in/out[bwl]' to the - * physical address ( < KSEG0) can work via KSEG1 - */ - set_io_port_base(KSEG1); - -#ifdef CONFIG_SERIAL_8250 - wrppmc_setup_serial(); -#endif -} - -const char *get_system_type(void) -{ - return "Wind River PPMC (GT64120)"; -} - -/* - * Initializes basic routines and structures pointers, memory size (as - * given by the bios and saves the command line. - */ -void __init prom_init(void) -{ - mips_machgroup = MACH_GROUP_GALILEO; - mips_machtype = MACH_EV64120A; - - add_memory_region(WRPPMC_SDRAM_SCS0_BASE, WRPPMC_SDRAM_SCS0_SIZE, BOOT_MEM_RAM); - add_memory_region(WRPPMC_BOOTROM_BASE, WRPPMC_BOOTROM_SIZE, BOOT_MEM_ROM_DATA); - - wrppmc_early_printk("prom_init: GT64120 SDRAM Bank 0: 0x%x - 0x%08lx\n", - WRPPMC_SDRAM_SCS0_BASE, (WRPPMC_SDRAM_SCS0_BASE + WRPPMC_SDRAM_SCS0_SIZE)); -} diff --git a/arch/mips/gt64120/wrppmc/time.c b/arch/mips/gt64120/wrppmc/time.c deleted file mode 100644 index 5b440859b..000000000 --- a/arch/mips/gt64120/wrppmc/time.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * time.c: MIPS CPU Count/Compare timer hookup - * - * Author: Mark.Zhan, - * - * 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) 1996, 1997, 2004 by Ralf Baechle (ralf@linux-mips.org) - * Copyright (C) 2006, Wind River System Inc. - */ -#include -#include -#include -#include /* for HZ */ -#include -#include -#include - -#include -#include -#include -#include -#include - -#define WRPPMC_CPU_CLK_FREQ 40000000 /* 40MHZ */ - -void __init plat_timer_setup(struct irqaction *irq) -{ - /* Install ISR for timer interrupt */ - setup_irq(WRPPMC_MIPS_TIMER_IRQ, irq); -} - -/* - * Estimate CPU frequency. Sets mips_hpt_frequency as a side-effect - * - * NOTE: We disable all GT64120 timers, and use MIPS processor internal - * timer as the source of kernel clock tick. - */ -void __init wrppmc_time_init(void) -{ - /* Disable GT64120 timers */ - GT_WRITE(GT_TC_CONTROL_OFS, 0x00); - GT_WRITE(GT_TC0_OFS, 0x00); - GT_WRITE(GT_TC1_OFS, 0x00); - GT_WRITE(GT_TC2_OFS, 0x00); - GT_WRITE(GT_TC3_OFS, 0x00); - - /* Use MIPS compare/count internal timer */ - mips_hpt_frequency = WRPPMC_CPU_CLK_FREQ; -} diff --git a/arch/mips/ite-boards/generic/dbg_io.c b/arch/mips/ite-boards/generic/dbg_io.c index 8e9cd8a96..6a7ccaf93 100644 --- a/arch/mips/ite-boards/generic/dbg_io.c +++ b/arch/mips/ite-boards/generic/dbg_io.c @@ -1,4 +1,5 @@ +#include #ifdef CONFIG_KGDB diff --git a/arch/mips/ite-boards/generic/irq.c b/arch/mips/ite-boards/generic/irq.c index cb59ca4f7..77be7216b 100644 --- a/arch/mips/ite-boards/generic/irq.c +++ b/arch/mips/ite-boards/generic/irq.c @@ -133,7 +133,7 @@ static void end_ite_irq(unsigned int irq) enable_it8172_irq(irq); } -static struct irq_chip it8172_irq_type = { +static struct hw_interrupt_type it8172_irq_type = { .typename = "ITE8172", .startup = startup_ite_irq, .shutdown = shutdown_ite_irq, @@ -153,7 +153,7 @@ static void ack_none(unsigned int irq) { } #define shutdown_none disable_none #define end_none enable_none -static struct irq_chip cp0_irq_type = { +static struct hw_interrupt_type cp0_irq_type = { .typename = "CP0 Count", .startup = startup_none, .shutdown = shutdown_none, @@ -208,10 +208,10 @@ void __init arch_init_irq(void) #endif for (i = 0; i <= IT8172_LAST_IRQ; i++) { - irq_desc[i].chip = &it8172_irq_type; + irq_desc[i].handler = &it8172_irq_type; spin_lock_init(&irq_desc[i].lock); } - irq_desc[MIPS_CPU_TIMER_IRQ].chip = &cp0_irq_type; + irq_desc[MIPS_CPU_TIMER_IRQ].handler = &cp0_irq_type; set_c0_status(ALLINTS_NOTIMER); } diff --git a/arch/mips/ite-boards/generic/it8172_cir.c b/arch/mips/ite-boards/generic/it8172_cir.c index bfc25adcf..19deb153d 100644 --- a/arch/mips/ite-boards/generic/it8172_cir.c +++ b/arch/mips/ite-boards/generic/it8172_cir.c @@ -28,6 +28,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #ifdef CONFIG_IT8172_CIR diff --git a/arch/mips/ite-boards/generic/it8172_setup.c b/arch/mips/ite-boards/generic/it8172_setup.c index 07faf3cac..fc73c8d69 100644 --- a/arch/mips/ite-boards/generic/it8172_setup.c +++ b/arch/mips/ite-boards/generic/it8172_setup.c @@ -26,10 +26,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include -#include #include #include #include @@ -59,7 +59,10 @@ extern void it8172_restart(char *command); extern void it8172_halt(void); extern void it8172_power_off(void); +extern void (*board_time_init)(void); +extern void (*board_timer_setup)(struct irqaction *irq); extern void it8172_time_init(void); +extern void it8172_timer_setup(struct irqaction *irq); #ifdef CONFIG_IT8172_REVC struct { @@ -69,29 +72,11 @@ struct { struct resource flash; struct resource boot; } it8172_resources = { - { - .start = 0, /* to be initted */ - .end = 0, - .name = "RAM", - .flags = IORESOURCE_MEM - }, { - .start = 0x10000000, - .end = 0x13FFFFFF, - .name = "PCI Mem", - .flags = IORESOURCE_MEM - }, { - .start = 0x14000000, - .end = 0x17FFFFFF - .name = "PCI I/O", - }, { - .start = 0x08000000, - .end = 0x0CFFFFFF - .name = "Flash", - }, { - .start = 0x1FC00000, - .end = 0x1FFFFFFF - .name = "Boot ROM", - } + { "RAM", 0, 0, IORESOURCE_MEM }, /* to be initted */ + { "PCI Mem", 0x10000000, 0x13FFFFFF, IORESOURCE_MEM }, + { "PCI I/O", 0x14000000, 0x17FFFFFF }, + { "Flash", 0x08000000, 0x0CFFFFFF }, + { "Boot ROM", 0x1FC00000, 0x1FFFFFFF } }; #else struct { @@ -104,44 +89,14 @@ struct { struct resource flash; struct resource boot; } it8172_resources = { - { - .start = 0, /* to be initted */ - .end = 0, - .name = "RAM", - .flags = IORESOURCE_MEM - }, { - .start = 0x0C000000, - .end = 0x0FFFFFFF, - .name = "PCI Mem0", - .flags = IORESOURCE_MEM - }, { - .start = 0x10000000, - .end = 0x13FFFFFF, - .name = "PCI Mem1", - .flags = IORESOURCE_MEM - }, { - .start = 0x14000000, - .end = 0x17FFFFFF - .name = "PCI I/O", - }, { - .start = 0x1A000000, - .end = 0x1BFFFFFF, - .name = "PCI Mem2", - .flags = IORESOURCE_MEM - }, { - .start = 0x1C000000, - .end = 0x1FBFFFFF, - .name = "PCI Mem3", - .flags = IORESOURCE_MEM - }, { - .start = 0x08000000, - .end = 0x0CFFFFFF - .name = "Flash", - }, { - .start = 0x1FC00000, - .end = 0x1FFFFFFF - .name = "Boot ROM", - } + { "RAM", 0, 0, IORESOURCE_MEM }, /* to be initted */ + { "PCI Mem0", 0x0C000000, 0x0FFFFFFF, IORESOURCE_MEM }, + { "PCI Mem1", 0x10000000, 0x13FFFFFF, IORESOURCE_MEM }, + { "PCI I/O", 0x14000000, 0x17FFFFFF }, + { "PCI Mem2", 0x1A000000, 0x1BFFFFFF, IORESOURCE_MEM }, + { "PCI Mem3", 0x1C000000, 0x1FBFFFFF, IORESOURCE_MEM }, + { "Flash", 0x08000000, 0x0CFFFFFF }, + { "Boot ROM", 0x1FC00000, 0x1FFFFFFF } }; #endif @@ -151,7 +106,7 @@ void __init it8172_init_ram_resource(unsigned long memsize) it8172_resources.ram.end = memsize; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned short dsr; char *argptr; @@ -167,6 +122,7 @@ void __init plat_mem_setup(void) clear_c0_status(ST0_FR); board_time_init = it8172_time_init; + board_timer_setup = it8172_timer_setup; _machine_restart = it8172_restart; _machine_halt = it8172_halt; diff --git a/arch/mips/ite-boards/generic/pmon_prom.c b/arch/mips/ite-boards/generic/pmon_prom.c index 7d0a79be3..6e505af0c 100644 --- a/arch/mips/ite-boards/generic/pmon_prom.c +++ b/arch/mips/ite-boards/generic/pmon_prom.c @@ -35,6 +35,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/ite-boards/generic/time.c b/arch/mips/ite-boards/generic/time.c index 3dc55569f..dee497a91 100644 --- a/arch/mips/ite-boards/generic/time.c +++ b/arch/mips/ite-boards/generic/time.c @@ -233,8 +233,7 @@ void __init it8172_time_init(void) } #define ALLINTS (IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5) - -void __init plat_timer_setup(struct irqaction *irq) +void __init it8172_timer_setup(struct irqaction *irq) { puts("timer_setup\n"); put32(NR_IRQS); diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c index eef05093d..becc9accd 100644 --- a/arch/mips/jazz/irq.c +++ b/arch/mips/jazz/irq.c @@ -55,7 +55,7 @@ static void end_r4030_irq(unsigned int irq) enable_r4030_irq(irq); } -static struct irq_chip r4030_irq_type = { +static struct hw_interrupt_type r4030_irq_type = { .typename = "R4030", .startup = startup_r4030_irq, .shutdown = shutdown_r4030_irq, @@ -73,7 +73,7 @@ void __init init_r4030_ints(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &r4030_irq_type; + irq_desc[i].handler = &r4030_irq_type; } r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, 0); diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 487a9ea1e..4036dc434 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c @@ -8,6 +8,7 @@ * Copyright (C) 1996, 1997, 1998, 2001 by Ralf Baechle * Copyright (C) 2001 MIPS Technologies, Inc. */ +#include #include #include #include @@ -37,7 +38,7 @@ extern void jazz_machine_restart(char *command); extern void jazz_machine_halt(void); extern void jazz_machine_power_off(void); -void __init plat_time_init(struct irqaction *irq) +static void __init jazz_time_init(struct irqaction *irq) { /* set the clock to 100 Hz */ r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); @@ -51,7 +52,7 @@ static struct resource jazz_io_resources[] = { { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, }; -void __init plat_mem_setup(void) +void __init plat_setup(void) { int i; @@ -75,6 +76,7 @@ void __init plat_mem_setup(void) for (i = 0; i < ARRAY_SIZE(jazz_io_resources); i++) request_resource(&ioport_resource, jazz_io_resources + i); + board_timer_setup = jazz_time_init; /* The RTC is outside the port address space */ _machine_restart = jazz_machine_restart; diff --git a/arch/mips/jmr3927/rbhma3100/init.c b/arch/mips/jmr3927/rbhma3100/init.c index a55cb4572..a0674d739 100644 --- a/arch/mips/jmr3927/rbhma3100/init.c +++ b/arch/mips/jmr3927/rbhma3100/init.c @@ -27,6 +27,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c index 722174481..11304d135 100644 --- a/arch/mips/jmr3927/rbhma3100/irq.c +++ b/arch/mips/jmr3927/rbhma3100/irq.c @@ -29,6 +29,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include @@ -416,7 +417,7 @@ void __init arch_init_irq(void) set_c0_status(ST0_IM); /* IE bit is still 0. */ } -static struct irq_chip jmr3927_irq_controller = { +static hw_irq_controller jmr3927_irq_controller = { .typename = "jmr3927_irq", .startup = jmr3927_irq_startup, .shutdown = jmr3927_irq_shutdown, @@ -434,7 +435,7 @@ void jmr3927_irq_init(u32 irq_base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &jmr3927_irq_controller; + irq_desc[i].handler = &jmr3927_irq_controller; } jmr3927_irq_base = irq_base; diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c index 025434054..9359cc413 100644 --- a/arch/mips/jmr3927/rbhma3100/setup.c +++ b/arch/mips/jmr3927/rbhma3100/setup.c @@ -33,6 +33,7 @@ *********************************************************************** */ +#include #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include #include #include /* for HZ */ #include @@ -82,54 +82,17 @@ struct { struct resource sio0; struct resource sio1; } jmr3927_resources = { - { - .start = 0, - .end = 0x01FFFFFF, - .name = "RAM0", - .flags = IORESOURCE_MEM - }, { - .start = 0x02000000, - .end = 0x03FFFFFF, - .name = "RAM1", - .flags = IORESOURCE_MEM - }, { - .start = 0x08000000, - .end = 0x07FFFFFF, - .name = "PCIMEM", - .flags = IORESOURCE_MEM - }, { - .start = 0x10000000, - .end = 0x13FFFFFF, - .name = "IOB" - }, { - .start = 0x14000000, - .end = 0x14FFFFFF, - .name = "IOC" - }, { - .start = 0x15000000, - .end = 0x15FFFFFF, - .name = "PCIIO" - }, { - .start = 0x1D000000, - .end = 0x1D3FFFFF, - .name = "JMY1394" - }, { - .start = 0x1E000000, - .end = 0x1E3FFFFF, - .name = "ROM1" - }, { - .start = 0x1FC00000, - .end = 0x1FFFFFFF, - .name = "ROM0" - }, { - .start = 0xFFFEF300, - .end = 0xFFFEF3FF, - .name = "SIO0" - }, { - .start = 0xFFFEF400, - .end = 0xFFFEF4FF, - .name = "SIO1" - }, + { "RAM0", 0, 0x01FFFFFF, IORESOURCE_MEM }, + { "RAM1", 0x02000000, 0x03FFFFFF, IORESOURCE_MEM }, + { "PCIMEM", 0x08000000, 0x07FFFFFF, IORESOURCE_MEM }, + { "IOB", 0x10000000, 0x13FFFFFF }, + { "IOC", 0x14000000, 0x14FFFFFF }, + { "PCIIO", 0x15000000, 0x15FFFFFF }, + { "JMY1394", 0x1D000000, 0x1D3FFFFF }, + { "ROM1", 0x1E000000, 0x1E3FFFFF }, + { "ROM0", 0x1FC00000, 0x1FFFFFFF }, + { "SIO0", 0xFFFEF300, 0xFFFEF3FF }, + { "SIO1", 0xFFFEF400, 0xFFFEF4FF }, }; /* don't enable - see errata */ @@ -184,8 +147,9 @@ static void __init jmr3927_time_init(void) } unsigned long jmr3927_do_gettimeoffset(void); +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); -void __init plat_timer_setup(struct irqaction *irq) +static void __init jmr3927_timer_setup(struct irqaction *irq) { do_gettimeoffset = jmr3927_do_gettimeoffset; @@ -237,13 +201,14 @@ static void jmr3927_board_init(void); extern struct resource pci_io_resource; extern struct resource pci_mem_resource; -void __init plat_mem_setup(void) +void __init plat_setup(void) { char *argptr; set_io_port_base(JMR3927_PORT_BASE + JMR3927_PCIIO); board_time_init = jmr3927_time_init; + board_timer_setup = jmr3927_timer_setup; _machine_restart = jmr3927_machine_restart; _machine_halt = jmr3927_machine_halt; diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 881c467c6..34e8a2567 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -13,8 +13,6 @@ binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ obj-$(CONFIG_MODULES) += mips_ksyms.o module.o -obj-$(CONFIG_APM) += apm.o - obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o diff --git a/arch/mips/kernel/apm.c b/arch/mips/kernel/apm.c deleted file mode 100644 index 528e73104..000000000 --- a/arch/mips/kernel/apm.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * bios-less APM driver for MIPS Linux - * Jamey Hicks - * adapted from the APM BIOS driver for Linux by Stephen Rothwell (sfr@linuxcare.com) - * - * APM 1.2 Reference: - * Intel Corporation, Microsoft Corporation. Advanced Power Management - * (APM) BIOS Interface Specification, Revision 1.2, February 1996. - * - * [This document is available from Microsoft at: - * http://www.microsoft.com/hwdev/busbios/amp_12.htm] - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include /* apm_power_info */ -#include - -/* - * The apm_bios device is one of the misc char devices. - * This is its minor number. - */ -#define APM_MINOR_DEV 134 - -/* - * See Documentation/Config.help for the configuration options. - * - * Various options can be changed at boot time as follows: - * (We allow underscores for compatibility with the modules code) - * apm=on/off enable/disable APM - */ - -/* - * Maximum number of events stored - */ -#define APM_MAX_EVENTS 16 - -struct apm_queue { - unsigned int event_head; - unsigned int event_tail; - apm_event_t events[APM_MAX_EVENTS]; -}; - -/* - * The per-file APM data - */ -struct apm_user { - struct list_head list; - - unsigned int suser: 1; - unsigned int writer: 1; - unsigned int reader: 1; - - int suspend_result; - unsigned int suspend_state; -#define SUSPEND_NONE 0 /* no suspend pending */ -#define SUSPEND_PENDING 1 /* suspend pending read */ -#define SUSPEND_READ 2 /* suspend read, pending ack */ -#define SUSPEND_ACKED 3 /* suspend acked */ -#define SUSPEND_DONE 4 /* suspend completed */ - - struct apm_queue queue; -}; - -/* - * Local variables - */ -static int suspends_pending; -static int apm_disabled; -static int mips_apm_active; - -static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); -static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); - -/* - * This is a list of everyone who has opened /dev/apm_bios - */ -static DECLARE_RWSEM(user_list_lock); -static LIST_HEAD(apm_user_list); - -/* - * kapmd info. kapmd provides us a process context to handle - * "APM" events within - specifically necessary if we're going - * to be suspending the system. - */ -static DECLARE_WAIT_QUEUE_HEAD(kapmd_wait); -static DECLARE_COMPLETION(kapmd_exit); -static DEFINE_SPINLOCK(kapmd_queue_lock); -static struct apm_queue kapmd_queue; - - -static const char driver_version[] = "1.13"; /* no spaces */ - - - -/* - * Compatibility cruft until the IPAQ people move over to the new - * interface. - */ -static void __apm_get_power_status(struct apm_power_info *info) -{ -} - -/* - * This allows machines to provide their own "apm get power status" function. - */ -void (*apm_get_power_status)(struct apm_power_info *) = __apm_get_power_status; -EXPORT_SYMBOL(apm_get_power_status); - - -/* - * APM event queue management. - */ -static inline int queue_empty(struct apm_queue *q) -{ - return q->event_head == q->event_tail; -} - -static inline apm_event_t queue_get_event(struct apm_queue *q) -{ - q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS; - return q->events[q->event_tail]; -} - -static void queue_add_event(struct apm_queue *q, apm_event_t event) -{ - q->event_head = (q->event_head + 1) % APM_MAX_EVENTS; - if (q->event_head == q->event_tail) { - static int notified; - - if (notified++ == 0) - printk(KERN_ERR "apm: an event queue overflowed\n"); - q->event_tail = (q->event_tail + 1) % APM_MAX_EVENTS; - } - q->events[q->event_head] = event; -} - -static void queue_event_one_user(struct apm_user *as, apm_event_t event) -{ - if (as->suser && as->writer) { - switch (event) { - case APM_SYS_SUSPEND: - case APM_USER_SUSPEND: - /* - * If this user already has a suspend pending, - * don't queue another one. - */ - if (as->suspend_state != SUSPEND_NONE) - return; - - as->suspend_state = SUSPEND_PENDING; - suspends_pending++; - break; - } - } - queue_add_event(&as->queue, event); -} - -static void queue_event(apm_event_t event, struct apm_user *sender) -{ - struct apm_user *as; - - down_read(&user_list_lock); - list_for_each_entry(as, &apm_user_list, list) { - if (as != sender && as->reader) - queue_event_one_user(as, event); - } - up_read(&user_list_lock); - wake_up_interruptible(&apm_waitqueue); -} - -static void apm_suspend(void) -{ - struct apm_user *as; - int err = pm_suspend(PM_SUSPEND_MEM); - - /* - * Anyone on the APM queues will think we're still suspended. - * Send a message so everyone knows we're now awake again. - */ - queue_event(APM_NORMAL_RESUME, NULL); - - /* - * Finally, wake up anyone who is sleeping on the suspend. - */ - down_read(&user_list_lock); - list_for_each_entry(as, &apm_user_list, list) { - as->suspend_result = err; - as->suspend_state = SUSPEND_DONE; - } - up_read(&user_list_lock); - - wake_up(&apm_suspend_waitqueue); -} - -static ssize_t apm_read(struct file *fp, char __user *buf, size_t count, loff_t *ppos) -{ - struct apm_user *as = fp->private_data; - apm_event_t event; - int i = count, ret = 0; - - if (count < sizeof(apm_event_t)) - return -EINVAL; - - if (queue_empty(&as->queue) && fp->f_flags & O_NONBLOCK) - return -EAGAIN; - - wait_event_interruptible(apm_waitqueue, !queue_empty(&as->queue)); - - while ((i >= sizeof(event)) && !queue_empty(&as->queue)) { - event = queue_get_event(&as->queue); - - ret = -EFAULT; - if (copy_to_user(buf, &event, sizeof(event))) - break; - - if (event == APM_SYS_SUSPEND || event == APM_USER_SUSPEND) - as->suspend_state = SUSPEND_READ; - - buf += sizeof(event); - i -= sizeof(event); - } - - if (i < count) - ret = count - i; - - return ret; -} - -static unsigned int apm_poll(struct file *fp, poll_table * wait) -{ - struct apm_user *as = fp->private_data; - - poll_wait(fp, &apm_waitqueue, wait); - return queue_empty(&as->queue) ? 0 : POLLIN | POLLRDNORM; -} - -/* - * apm_ioctl - handle APM ioctl - * - * APM_IOC_SUSPEND - * This IOCTL is overloaded, and performs two functions. It is used to: - * - initiate a suspend - * - acknowledge a suspend read from /dev/apm_bios. - * Only when everyone who has opened /dev/apm_bios with write permission - * has acknowledge does the actual suspend happen. - */ -static int -apm_ioctl(struct inode * inode, struct file *filp, unsigned int cmd, unsigned long arg) -{ - struct apm_user *as = filp->private_data; - unsigned long flags; - int err = -EINVAL; - - if (!as->suser || !as->writer) - return -EPERM; - - switch (cmd) { - case APM_IOC_SUSPEND: - as->suspend_result = -EINTR; - - if (as->suspend_state == SUSPEND_READ) { - /* - * If we read a suspend command from /dev/apm_bios, - * then the corresponding APM_IOC_SUSPEND ioctl is - * interpreted as an acknowledge. - */ - as->suspend_state = SUSPEND_ACKED; - suspends_pending--; - } else { - /* - * Otherwise it is a request to suspend the system. - * Queue an event for all readers, and expect an - * acknowledge from all writers who haven't already - * acknowledged. - */ - queue_event(APM_USER_SUSPEND, as); - } - - /* - * If there are no further acknowledges required, suspend - * the system. - */ - if (suspends_pending == 0) - apm_suspend(); - - /* - * Wait for the suspend/resume to complete. If there are - * pending acknowledges, we wait here for them. - * - * Note that we need to ensure that the PM subsystem does - * not kick us out of the wait when it suspends the threads. - */ - flags = current->flags; - current->flags |= PF_NOFREEZE; - - /* - * Note: do not allow a thread which is acking the suspend - * to escape until the resume is complete. - */ - if (as->suspend_state == SUSPEND_ACKED) - wait_event(apm_suspend_waitqueue, - as->suspend_state == SUSPEND_DONE); - else - wait_event_interruptible(apm_suspend_waitqueue, - as->suspend_state == SUSPEND_DONE); - - current->flags = flags; - err = as->suspend_result; - as->suspend_state = SUSPEND_NONE; - break; - } - - return err; -} - -static int apm_release(struct inode * inode, struct file * filp) -{ - struct apm_user *as = filp->private_data; - filp->private_data = NULL; - - down_write(&user_list_lock); - list_del(&as->list); - up_write(&user_list_lock); - - /* - * We are now unhooked from the chain. As far as new - * events are concerned, we no longer exist. However, we - * need to balance suspends_pending, which means the - * possibility of sleeping. - */ - if (as->suspend_state != SUSPEND_NONE) { - suspends_pending -= 1; - if (suspends_pending == 0) - apm_suspend(); - } - - kfree(as); - return 0; -} - -static int apm_open(struct inode * inode, struct file * filp) -{ - struct apm_user *as; - - as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL); - if (as) { - /* - * XXX - this is a tiny bit broken, when we consider BSD - * process accounting. If the device is opened by root, we - * instantly flag that we used superuser privs. Who knows, - * we might close the device immediately without doing a - * privileged operation -- cevans - */ - as->suser = capable(CAP_SYS_ADMIN); - as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE; - as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ; - - down_write(&user_list_lock); - list_add(&as->list, &apm_user_list); - up_write(&user_list_lock); - - filp->private_data = as; - } - - return as ? 0 : -ENOMEM; -} - -static struct file_operations apm_bios_fops = { - .owner = THIS_MODULE, - .read = apm_read, - .poll = apm_poll, - .ioctl = apm_ioctl, - .open = apm_open, - .release = apm_release, -}; - -static struct miscdevice apm_device = { - .minor = APM_MINOR_DEV, - .name = "apm_bios", - .fops = &apm_bios_fops -}; - - -#ifdef CONFIG_PROC_FS -/* - * Arguments, with symbols from linux/apm_bios.h. - * - * 0) Linux driver version (this will change if format changes) - * 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2. - * 2) APM flags from APM Installation Check (0x00): - * bit 0: APM_16_BIT_SUPPORT - * bit 1: APM_32_BIT_SUPPORT - * bit 2: APM_IDLE_SLOWS_CLOCK - * bit 3: APM_BIOS_DISABLED - * bit 4: APM_BIOS_DISENGAGED - * 3) AC line status - * 0x00: Off-line - * 0x01: On-line - * 0x02: On backup power (BIOS >= 1.1 only) - * 0xff: Unknown - * 4) Battery status - * 0x00: High - * 0x01: Low - * 0x02: Critical - * 0x03: Charging - * 0x04: Selected battery not present (BIOS >= 1.2 only) - * 0xff: Unknown - * 5) Battery flag - * bit 0: High - * bit 1: Low - * bit 2: Critical - * bit 3: Charging - * bit 7: No system battery - * 0xff: Unknown - * 6) Remaining battery life (percentage of charge): - * 0-100: valid - * -1: Unknown - * 7) Remaining battery life (time units): - * Number of remaining minutes or seconds - * -1: Unknown - * 8) min = minutes; sec = seconds - */ -static int apm_get_info(char *buf, char **start, off_t fpos, int length) -{ - struct apm_power_info info; - char *units; - int ret; - - info.ac_line_status = 0xff; - info.battery_status = 0xff; - info.battery_flag = 0xff; - info.battery_life = -1; - info.time = -1; - info.units = -1; - - if (apm_get_power_status) - apm_get_power_status(&info); - - switch (info.units) { - default: units = "?"; break; - case 0: units = "min"; break; - case 1: units = "sec"; break; - } - - ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", - driver_version, APM_32_BIT_SUPPORT, - info.ac_line_status, info.battery_status, - info.battery_flag, info.battery_life, - info.time, units); - - return ret; -} -#endif - -static int kapmd(void *arg) -{ - daemonize("kapmd"); - current->flags |= PF_NOFREEZE; - - do { - apm_event_t event; - - wait_event_interruptible(kapmd_wait, - !queue_empty(&kapmd_queue) || !mips_apm_active); - - if (!mips_apm_active) - break; - - spin_lock_irq(&kapmd_queue_lock); - event = 0; - if (!queue_empty(&kapmd_queue)) - event = queue_get_event(&kapmd_queue); - spin_unlock_irq(&kapmd_queue_lock); - - switch (event) { - case 0: - break; - - case APM_LOW_BATTERY: - case APM_POWER_STATUS_CHANGE: - queue_event(event, NULL); - break; - - case APM_USER_SUSPEND: - case APM_SYS_SUSPEND: - queue_event(event, NULL); - if (suspends_pending == 0) - apm_suspend(); - break; - - case APM_CRITICAL_SUSPEND: - apm_suspend(); - break; - } - } while (1); - - complete_and_exit(&kapmd_exit, 0); -} - -static int __init apm_init(void) -{ - int ret; - - if (apm_disabled) { - printk(KERN_NOTICE "apm: disabled on user request.\n"); - return -ENODEV; - } - - mips_apm_active = 1; - - ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); - if (ret < 0) { - mips_apm_active = 0; - return ret; - } - -#ifdef CONFIG_PROC_FS - create_proc_info_entry("apm", 0, NULL, apm_get_info); -#endif - - ret = misc_register(&apm_device); - if (ret != 0) { - remove_proc_entry("apm", NULL); - - mips_apm_active = 0; - wake_up(&kapmd_wait); - wait_for_completion(&kapmd_exit); - } - - return ret; -} - -static void __exit apm_exit(void) -{ - misc_deregister(&apm_device); - remove_proc_entry("apm", NULL); - - mips_apm_active = 0; - wake_up(&kapmd_wait); - wait_for_completion(&kapmd_exit); -} - -module_init(apm_init); -module_exit(apm_exit); - -MODULE_AUTHOR("Stephen Rothwell"); -MODULE_DESCRIPTION("Advanced Power Management"); -MODULE_LICENSE("GPL"); - -#ifndef MODULE -static int __init apm_setup(char *str) -{ - while ((str != NULL) && (*str != '\0')) { - if (strncmp(str, "off", 3) == 0) - apm_disabled = 1; - if (strncmp(str, "on", 2) == 0) - apm_disabled = 0; - str = strchr(str, ','); - if (str != NULL) - str += strspn(str, ", \t"); - } - return 1; -} - -__setup("apm=", apm_setup); -#endif - -/** - * apm_queue_event - queue an APM event for kapmd - * @event: APM event - * - * Queue an APM event for kapmd to process and ultimately take the - * appropriate action. Only a subset of events are handled: - * %APM_LOW_BATTERY - * %APM_POWER_STATUS_CHANGE - * %APM_USER_SUSPEND - * %APM_SYS_SUSPEND - * %APM_CRITICAL_SUSPEND - */ -void apm_queue_event(apm_event_t event) -{ - unsigned long flags; - - spin_lock_irqsave(&kapmd_queue_lock, flags); - queue_add_event(&kapmd_queue, event); - spin_unlock_irqrestore(&kapmd_queue_lock, flags); - - wake_up_interruptible(&kapmd_wait); -} -EXPORT_SYMBOL(apm_queue_event); diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index ec28077d5..0facfaf4e 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c @@ -8,6 +8,7 @@ * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000 MIPS Technologies, Inc. */ +#include #include #include #include @@ -140,72 +141,72 @@ void output_thread_defines(void) void output_thread_fpu_defines(void) { offset("#define THREAD_FPR0 ", - struct task_struct, thread.fpu.fpr[0]); + struct task_struct, thread.fpu.hard.fpr[0]); offset("#define THREAD_FPR1 ", - struct task_struct, thread.fpu.fpr[1]); + struct task_struct, thread.fpu.hard.fpr[1]); offset("#define THREAD_FPR2 ", - struct task_struct, thread.fpu.fpr[2]); + struct task_struct, thread.fpu.hard.fpr[2]); offset("#define THREAD_FPR3 ", - struct task_struct, thread.fpu.fpr[3]); + struct task_struct, thread.fpu.hard.fpr[3]); offset("#define THREAD_FPR4 ", - struct task_struct, thread.fpu.fpr[4]); + struct task_struct, thread.fpu.hard.fpr[4]); offset("#define THREAD_FPR5 ", - struct task_struct, thread.fpu.fpr[5]); + struct task_struct, thread.fpu.hard.fpr[5]); offset("#define THREAD_FPR6 ", - struct task_struct, thread.fpu.fpr[6]); + struct task_struct, thread.fpu.hard.fpr[6]); offset("#define THREAD_FPR7 ", - struct task_struct, thread.fpu.fpr[7]); + struct task_struct, thread.fpu.hard.fpr[7]); offset("#define THREAD_FPR8 ", - struct task_struct, thread.fpu.fpr[8]); + struct task_struct, thread.fpu.hard.fpr[8]); offset("#define THREAD_FPR9 ", - struct task_struct, thread.fpu.fpr[9]); + struct task_struct, thread.fpu.hard.fpr[9]); offset("#define THREAD_FPR10 ", - struct task_struct, thread.fpu.fpr[10]); + struct task_struct, thread.fpu.hard.fpr[10]); offset("#define THREAD_FPR11 ", - struct task_struct, thread.fpu.fpr[11]); + struct task_struct, thread.fpu.hard.fpr[11]); offset("#define THREAD_FPR12 ", - struct task_struct, thread.fpu.fpr[12]); + struct task_struct, thread.fpu.hard.fpr[12]); offset("#define THREAD_FPR13 ", - struct task_struct, thread.fpu.fpr[13]); + struct task_struct, thread.fpu.hard.fpr[13]); offset("#define THREAD_FPR14 ", - struct task_struct, thread.fpu.fpr[14]); + struct task_struct, thread.fpu.hard.fpr[14]); offset("#define THREAD_FPR15 ", - struct task_struct, thread.fpu.fpr[15]); + struct task_struct, thread.fpu.hard.fpr[15]); offset("#define THREAD_FPR16 ", - struct task_struct, thread.fpu.fpr[16]); + struct task_struct, thread.fpu.hard.fpr[16]); offset("#define THREAD_FPR17 ", - struct task_struct, thread.fpu.fpr[17]); + struct task_struct, thread.fpu.hard.fpr[17]); offset("#define THREAD_FPR18 ", - struct task_struct, thread.fpu.fpr[18]); + struct task_struct, thread.fpu.hard.fpr[18]); offset("#define THREAD_FPR19 ", - struct task_struct, thread.fpu.fpr[19]); + struct task_struct, thread.fpu.hard.fpr[19]); offset("#define THREAD_FPR20 ", - struct task_struct, thread.fpu.fpr[20]); + struct task_struct, thread.fpu.hard.fpr[20]); offset("#define THREAD_FPR21 ", - struct task_struct, thread.fpu.fpr[21]); + struct task_struct, thread.fpu.hard.fpr[21]); offset("#define THREAD_FPR22 ", - struct task_struct, thread.fpu.fpr[22]); + struct task_struct, thread.fpu.hard.fpr[22]); offset("#define THREAD_FPR23 ", - struct task_struct, thread.fpu.fpr[23]); + struct task_struct, thread.fpu.hard.fpr[23]); offset("#define THREAD_FPR24 ", - struct task_struct, thread.fpu.fpr[24]); + struct task_struct, thread.fpu.hard.fpr[24]); offset("#define THREAD_FPR25 ", - struct task_struct, thread.fpu.fpr[25]); + struct task_struct, thread.fpu.hard.fpr[25]); offset("#define THREAD_FPR26 ", - struct task_struct, thread.fpu.fpr[26]); + struct task_struct, thread.fpu.hard.fpr[26]); offset("#define THREAD_FPR27 ", - struct task_struct, thread.fpu.fpr[27]); + struct task_struct, thread.fpu.hard.fpr[27]); offset("#define THREAD_FPR28 ", - struct task_struct, thread.fpu.fpr[28]); + struct task_struct, thread.fpu.hard.fpr[28]); offset("#define THREAD_FPR29 ", - struct task_struct, thread.fpu.fpr[29]); + struct task_struct, thread.fpu.hard.fpr[29]); offset("#define THREAD_FPR30 ", - struct task_struct, thread.fpu.fpr[30]); + struct task_struct, thread.fpu.hard.fpr[30]); offset("#define THREAD_FPR31 ", - struct task_struct, thread.fpu.fpr[31]); + struct task_struct, thread.fpu.hard.fpr[31]); offset("#define THREAD_FCR31 ", - struct task_struct, thread.fpu.fcr31); + struct task_struct, thread.fpu.hard.fcr31); linefeed; } diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 76fd3f22c..b6232d903 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c @@ -178,7 +178,7 @@ int __compute_return_epc(struct pt_regs *regs) if (is_fpu_owner()) asm volatile("cfc1\t%0,$31" : "=r" (fcr31)); else - fcr31 = current->thread.fpu.fcr31; + fcr31 = current->thread.fpu.hard.fcr31; preempt_enable(); bit = (insn.i_format.rt >> 2); diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index c09337b94..d268827c6 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c @@ -6,6 +6,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index aa2caa672..8c2c359a0 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -11,6 +11,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -459,7 +460,7 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c) isa = (config0 & MIPS_CONF_AT) >> 13; switch (isa) { case 0: - switch ((config0 & MIPS_CONF_AR) >> 10) { + switch ((config0 >> 10) & 7) { case 0: c->isa_level = MIPS_CPU_ISA_M32R1; break; @@ -471,7 +472,7 @@ static inline unsigned int decode_config0(struct cpuinfo_mips *c) } break; case 2: - switch ((config0 & MIPS_CONF_AR) >> 10) { + switch ((config0 >> 10) & 7) { case 0: c->isa_level = MIPS_CPU_ISA_M64R1; break; @@ -548,7 +549,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c) return config3 & MIPS_CONF_M; } -static void __init decode_configs(struct cpuinfo_mips *c) +static inline void decode_configs(struct cpuinfo_mips *c) { /* MIPS32 or MIPS64 compliant CPU. */ c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER | @@ -596,6 +597,8 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c) break; case PRID_IMP_25KF: c->cputype = CPU_25KF; + /* Probe for L2 cache */ + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; break; case PRID_IMP_34K: c->cputype = CPU_34K; diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index 766655f35..a9c6de1b9 100644 --- a/arch/mips/kernel/entry.S +++ b/arch/mips/kernel/entry.S @@ -7,6 +7,7 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. */ +#include #include #include @@ -65,7 +66,7 @@ need_resched: #endif FEXPORT(ret_from_fork) - jal schedule_tail # a0 = struct task_struct *prev + jal schedule_tail # a0 = task_t *prev FEXPORT(syscall_exit) local_irq_disable # make sure need_resched and @@ -86,7 +87,7 @@ FEXPORT(restore_all) # restore full frame ori v1, v0, TCSTATUS_IXMT mtc0 v1, CP0_TCSTATUS andi v0, TCSTATUS_IXMT - _ehb + ehb mfc0 t0, CP0_TCCONTEXT DMT 9 # dmt t1 jal mips_ihb @@ -94,7 +95,7 @@ FEXPORT(restore_all) # restore full frame andi t3, t0, 0xff00 or t2, t2, t3 mtc0 t2, CP0_STATUS - _ehb + ehb andi t1, t1, VPECONTROL_TE beqz t1, 1f EMT @@ -104,7 +105,7 @@ FEXPORT(restore_all) # restore full frame xori v1, v1, TCSTATUS_IXMT or v1, v0, v1 mtc0 v1, CP0_TCSTATUS - _ehb + ehb xor t0, t0, t3 mtc0 t0, CP0_TCCONTEXT #endif /* CONFIG_MIPS_MT_SMTC */ @@ -113,21 +114,6 @@ FEXPORT(restore_all) # restore full frame RESTORE_AT RESTORE_STATIC FEXPORT(restore_partial) # restore partial frame -#ifdef CONFIG_TRACE_IRQFLAGS - SAVE_STATIC - SAVE_AT - SAVE_TEMP - LONG_L v0, PT_STATUS(sp) - and v0, 1 - beqz v0, 1f - jal trace_hardirqs_on - b 2f -1: jal trace_hardirqs_off -2: - RESTORE_TEMP - RESTORE_AT - RESTORE_STATIC -#endif RESTORE_SOME RESTORE_SP_AND_RET .set at diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S index 2c4460636..5fd7a8af0 100644 --- a/arch/mips/kernel/gdb-low.S +++ b/arch/mips/kernel/gdb-low.S @@ -3,11 +3,11 @@ * * Copyright (C) 1995 Andreas Busse */ +#include #include #include #include -#include #include #include #include @@ -121,7 +121,6 @@ LONG_S $31, GDB_FR_REG31(sp) CLI /* disable interrupts */ - TRACE_IRQS_OFF /* * Followed by the floating point registers @@ -292,7 +291,7 @@ ori t1, t2, TCSTATUS_IXMT mtc0 t1, CP0_TCSTATUS andi t2, t2, TCSTATUS_IXMT - _ehb + ehb DMT 9 # dmt t1 jal mips_ihb nop @@ -311,7 +310,7 @@ xori t1, t1, TCSTATUS_IXMT or t1, t1, t2 mtc0 t1, CP0_TCSTATUS - _ehb + ehb #endif /* CONFIG_MIPS_MT_SMTC */ LONG_L v0, GDB_FR_STATUS(sp) LONG_L v1, GDB_FR_EPC(sp) diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 719d26968..6ecbdc1fe 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c @@ -120,6 +120,7 @@ * breakpoints, single stepping, * printing variables, etc. */ +#include #include #include #include diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 37fda3dcd..ff7af369f 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -8,12 +8,12 @@ * Copyright (C) 2001 MIPS Technologies, Inc. * Copyright (C) 2002 Maciej W. Rozycki */ +#include #include #include #include #include -#include #include #include #include @@ -129,7 +129,6 @@ handle_vcei: NESTED(handle_int, PT_SIZE, sp) SAVE_ALL CLI - TRACE_IRQS_OFF PTR_LA ra, ret_from_irq move a0, sp @@ -215,10 +214,9 @@ NESTED(except_vec_vi_handler, 0, sp) mtc0 t0, CP0_TCCONTEXT xor t1, t1, t0 mtc0 t1, CP0_STATUS - _ehb + ehb #endif /* CONFIG_MIPS_MT_SMTC */ CLI - TRACE_IRQS_OFF move a0, sp jalr v0 j ret_from_irq @@ -291,13 +289,11 @@ NESTED(nmi_handler, PT_SIZE, sp) .endm .macro __build_clear_sti - TRACE_IRQS_ON STI .endm .macro __build_clear_cli CLI - TRACE_IRQS_OFF .endm .macro __build_clear_fpe @@ -305,7 +301,6 @@ NESTED(nmi_handler, PT_SIZE, sp) li a2, ~(0x3f << 12) and a2, a1 ctc1 a2, fcr31 - TRACE_IRQS_ON STI .endm @@ -371,7 +366,7 @@ NESTED(nmi_handler, PT_SIZE, sp) BUILD_HANDLER mdmx mdmx sti silent /* #22 */ BUILD_HANDLER watch watch sti verbose /* #23 */ BUILD_HANDLER mcheck mcheck cli verbose /* #24 */ - BUILD_HANDLER mt mt sti silent /* #25 */ + BUILD_HANDLER mt mt sti verbose /* #25 */ BUILD_HANDLER dsp dsp sti silent /* #26 */ BUILD_HANDLER reserved reserved sti verbose /* others */ diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 8c6db0fc7..bdf6f6eff 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -5,7 +5,7 @@ * * Copyright (C) 1994, 1995 Waldorf Electronics * Written by Ralf Baechle and Andreas Busse - * Copyright (C) 1994 - 99, 2003, 06 Ralf Baechle + * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 Ralf Baechle * Copyright (C) 1996 Paul M. Antoine * Modified for DECStation and hence R3000 support by Paul M. Antoine * Further modifications by David S. Miller and Harald Koerfgen @@ -13,12 +13,12 @@ * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. */ +#include #include #include #include #include -#include #include #include #include @@ -96,7 +96,7 @@ /* Clear TKSU, leave IXMT */ xori t0, 0x00001800 mtc0 t0, CP0_TCSTATUS - _ehb + ehb /* We need to leave the global IE bit set, but clear EXL...*/ mfc0 t0, CP0_STATUS or t0, ST0_CU0 | ST0_EXL | ST0_ERL | \set | \clr diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index ea36c8e88..2125ba5f1 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c @@ -51,7 +51,7 @@ static unsigned int startup_8259A_irq(unsigned int irq) return 0; /* never anything pending */ } -static struct irq_chip i8259A_irq_type = { +static struct hw_interrupt_type i8259A_irq_type = { .typename = "XT-PIC", .startup = startup_8259A_irq, .shutdown = shutdown_8259A_irq, @@ -120,7 +120,7 @@ int i8259A_irq_pending(unsigned int irq) void make_8259A_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &i8259A_irq_type; + irq_desc[irq].handler = &i8259A_irq_type; enable_irq(irq); } @@ -302,11 +302,11 @@ static struct irqaction irq2 = { }; static struct resource pic1_io_resource = { - .name = "pic1", .start = 0x20, .end = 0x3f, .flags = IORESOURCE_BUSY + "pic1", 0x20, 0x3f, IORESOURCE_BUSY }; static struct resource pic2_io_resource = { - .name = "pic2", .start = 0xa0, .end = 0xbf, .flags = IORESOURCE_BUSY + "pic2", 0xa0, 0xbf, IORESOURCE_BUSY }; /* @@ -327,7 +327,7 @@ void __init init_i8259_irqs (void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &i8259A_irq_type; + irq_desc[i].handler = &i8259A_irq_type; } setup_irq(2, &irq2); diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index ab12c8f01..10d3644e3 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -999,6 +999,8 @@ static inline int maydump(struct vm_area_struct *vma) return 1; } +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + /* An ELF note in memory. */ struct memelfnote { diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 676e868d2..8150f071f 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -261,7 +260,7 @@ irix_sigreturn(struct pt_regs *regs) for(i = 0; i < 32; i++) error |= __get_user(fregs[i], &context->fpregs[i]); - error |= __get_user(current->thread.fpu.fcr31, &context->fpcsr); + error |= __get_user(current->thread.fpu.hard.fcr31, &context->fpcsr); } /* XXX do sigstack crapola here... XXX */ @@ -541,6 +540,8 @@ out: #define IRIX_P_PGID 2 #define IRIX_P_ALL 7 +extern int getrusage(struct task_struct *, int, struct rusage __user *); + #define W_EXITED 1 #define W_TRAPPED 2 #define W_STOPPED 4 diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c index 63dfeb417..97ebdc754 100644 --- a/arch/mips/kernel/irq-msc01.c +++ b/arch/mips/kernel/irq-msc01.c @@ -137,7 +137,7 @@ msc_bind_eic_interrupt (unsigned int irq, unsigned int set) #define shutdown_msc_irq disable_msc_irq -struct irq_chip msc_levelirq_type = { +struct hw_interrupt_type msc_levelirq_type = { .typename = "SOC-it-Level", .startup = startup_msc_irq, .shutdown = shutdown_msc_irq, @@ -147,7 +147,7 @@ struct irq_chip msc_levelirq_type = { .end = end_msc_irq, }; -struct irq_chip msc_edgeirq_type = { +struct hw_interrupt_type msc_edgeirq_type = { .typename = "SOC-it-Edge", .startup =startup_msc_irq, .shutdown = shutdown_msc_irq, @@ -174,14 +174,14 @@ void __init init_msc_irqs(unsigned int base, msc_irqmap_t *imp, int nirq) switch (imp->im_type) { case MSC01_IRQ_EDGE: - irq_desc[base+n].chip = &msc_edgeirq_type; + irq_desc[base+n].handler = &msc_edgeirq_type; if (cpu_has_veic) MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT); else MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT | imp->im_lvl); break; case MSC01_IRQ_LEVEL: - irq_desc[base+n].chip = &msc_levelirq_type; + irq_desc[base+n].handler = &msc_levelirq_type; if (cpu_has_veic) MSCIC_WRITE(MSC01_IC_SUP+n*8, 0); else diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c index b117e64da..0613f1f36 100644 --- a/arch/mips/kernel/irq-mv6434x.c +++ b/arch/mips/kernel/irq-mv6434x.c @@ -136,7 +136,7 @@ void ll_mv64340_irq(struct pt_regs *regs) #define shutdown_mv64340_irq disable_mv64340_irq -struct irq_chip mv64340_irq_type = { +struct hw_interrupt_type mv64340_irq_type = { .typename = "MV-64340", .startup = startup_mv64340_irq, .shutdown = shutdown_mv64340_irq, @@ -155,7 +155,7 @@ void __init mv64340_irq_init(unsigned int base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 2; - irq_desc[i].chip = &mv64340_irq_type; + irq_desc[i].handler = &mv64340_irq_type; } irq_base = base; diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c index 6b54c7109..0b130c5ac 100644 --- a/arch/mips/kernel/irq-rm7000.c +++ b/arch/mips/kernel/irq-rm7000.c @@ -71,7 +71,7 @@ static void rm7k_cpu_irq_end(unsigned int irq) unmask_rm7k_irq(irq); } -static struct irq_chip rm7k_irq_controller = { +static hw_irq_controller rm7k_irq_controller = { .typename = "RM7000", .startup = rm7k_cpu_irq_startup, .shutdown = rm7k_cpu_irq_shutdown, @@ -91,7 +91,7 @@ void __init rm7k_cpu_irq_init(int base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &rm7k_irq_controller; + irq_desc[i].handler = &rm7k_irq_controller; } irq_base = base; diff --git a/arch/mips/kernel/irq-rm9000.c b/arch/mips/kernel/irq-rm9000.c index 62f011ba9..9b5f20c32 100644 --- a/arch/mips/kernel/irq-rm9000.c +++ b/arch/mips/kernel/irq-rm9000.c @@ -105,7 +105,7 @@ static void rm9k_cpu_irq_end(unsigned int irq) unmask_rm9k_irq(irq); } -static struct irq_chip rm9k_irq_controller = { +static hw_irq_controller rm9k_irq_controller = { .typename = "RM9000", .startup = rm9k_cpu_irq_startup, .shutdown = rm9k_cpu_irq_shutdown, @@ -115,7 +115,7 @@ static struct irq_chip rm9k_irq_controller = { .end = rm9k_cpu_irq_end, }; -static struct irq_chip rm9k_perfcounter_irq = { +static hw_irq_controller rm9k_perfcounter_irq = { .typename = "RM9000", .startup = rm9k_perfcounter_irq_startup, .shutdown = rm9k_perfcounter_irq_shutdown, @@ -139,11 +139,11 @@ void __init rm9k_cpu_irq_init(int base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &rm9k_irq_controller; + irq_desc[i].handler = &rm9k_irq_controller; } rm9000_perfcount_irq = base + 1; - irq_desc[rm9000_perfcount_irq].chip = &rm9k_perfcounter_irq; + irq_desc[rm9000_perfcount_irq].handler = &rm9k_perfcounter_irq; irq_base = base; } diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index d955aaefb..3dce742e7 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c @@ -8,6 +8,7 @@ * Copyright (C) 1992 Linus Torvalds * Copyright (C) 1994 - 2000 Ralf Baechle */ +#include #include #include #include @@ -94,7 +95,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -136,7 +137,7 @@ void __init init_IRQ(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &no_irq_chip; + irq_desc[i].handler = &no_irq_type; spin_lock_init(&irq_desc[i].lock); #ifdef CONFIG_MIPS_MT_SMTC irq_hwmask[i] = 0; diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c index 9bb21c7f2..5db67e31e 100644 --- a/arch/mips/kernel/irq_cpu.c +++ b/arch/mips/kernel/irq_cpu.c @@ -94,7 +94,7 @@ static void mips_cpu_irq_end(unsigned int irq) unmask_mips_irq(irq); } -static struct irq_chip mips_cpu_irq_controller = { +static hw_irq_controller mips_cpu_irq_controller = { .typename = "MIPS", .startup = mips_cpu_irq_startup, .shutdown = mips_cpu_irq_shutdown, @@ -140,7 +140,7 @@ static void mips_mt_cpu_irq_ack(unsigned int irq) #define mips_mt_cpu_irq_end mips_cpu_irq_end -static struct irq_chip mips_mt_cpu_irq_controller = { +static hw_irq_controller mips_mt_cpu_irq_controller = { .typename = "MIPS", .startup = mips_mt_cpu_irq_startup, .shutdown = mips_mt_cpu_irq_shutdown, @@ -167,14 +167,14 @@ void __init mips_cpu_irq_init(int irq_base) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &mips_mt_cpu_irq_controller; + irq_desc[i].handler = &mips_mt_cpu_irq_controller; } for (i = irq_base + 2; i < irq_base + 8; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &mips_cpu_irq_controller; + irq_desc[i].handler = &mips_cpu_irq_controller; } mips_cpu_irq_base = irq_base; diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 2d5c90282..dc4b7a8ce 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -5,6 +5,7 @@ * Written by Ulf Carlsson (ulfc@engr.sgi.com) * sys32_execve from ia64/ia32 code, Feb 2000, Kanoj Sarcar (kanoj@sgi.com) */ +#include #include #include #include @@ -78,8 +79,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) memset(&tmp, 0, sizeof(tmp)); tmp.st_dev = new_encode_dev(stat->dev); tmp.st_ino = stat->ino; - if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) - return -EOVERFLOW; tmp.st_mode = stat->mode; tmp.st_nlink = stat->nlink; SET_UID(tmp.st_uid, stat->uid); diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c index c1373a6e6..fa6d2b6c0 100644 --- a/arch/mips/kernel/mips-mt.c +++ b/arch/mips/kernel/mips-mt.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -48,7 +48,7 @@ unsigned long mt_fpemul_threshold = 0; * used in sys_sched_set/getaffinity() in kernel/sched.c, so * cloned here. */ -static inline struct task_struct *find_process_by_pid(pid_t pid) +static inline task_t *find_process_by_pid(pid_t pid) { return pid ? find_task_by_pid(pid) : current; } @@ -63,7 +63,7 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, cpumask_t new_mask; cpumask_t effective_mask; int retval; - struct task_struct *p; + task_t *p; if (len < sizeof(new_mask)) return -EINVAL; @@ -128,7 +128,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned int real_len; cpumask_t mask; int retval; - struct task_struct *p; + task_t *p; real_len = sizeof(mask); if (len < real_len) diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index f44a01357..0a71a4c33 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c @@ -8,6 +8,7 @@ * Copyright (C) 1996, 97, 98, 99, 2000, 01, 03, 04, 05 by Ralf Baechle * Copyright (C) 1999, 2000, 01 Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index d8beef107..9def554f3 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c @@ -5,6 +5,7 @@ * Copyright (C) 2001, 2004 MIPS Technologies, Inc. * Copyright (C) 2004 Maciej W. Rozycki */ +#include #include #include #include diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 7ab67f786..199a06e87 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -8,6 +8,7 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2004 Thiemo Seufer */ +#include #include #include #include diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 1c74235f7..ceaf3e947 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -14,6 +14,7 @@ * At this time Linux/MIPS64 only supports syscall tracing, even for 32-bit * binaries. */ +#include #include #include #include @@ -119,11 +120,11 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) __put_user ((__u64) -1, i + (__u64 __user *) data); } - __put_user (child->thread.fpu.fcr31, data + 64); - if (cpu_has_fpu) { unsigned int flags, tmp; + __put_user (child->thread.fpu.hard.fcr31, data + 64); + preempt_disable(); if (cpu_has_mipsmt) { unsigned int vpflags = dvpe(); @@ -141,6 +142,7 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) preempt_enable(); __put_user (tmp, data + 65); } else { + __put_user (child->thread.fpu.soft.fcr31, data + 64); __put_user ((__u32) 0, data + 65); } @@ -160,7 +162,10 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data) for (i = 0; i < 32; i++) __get_user (fregs[i], i + (__u64 __user *) data); - __get_user (child->thread.fpu.fcr31, data + 64); + if (cpu_has_fpu) + __get_user (child->thread.fpu.hard.fcr31, data + 64); + else + __get_user (child->thread.fpu.soft.fcr31, data + 64); /* FIR may not be written. */ @@ -171,9 +176,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) { int ret; - if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) - goto out; - switch (request) { /* when I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ @@ -239,7 +241,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) tmp = regs->lo; break; case FPC_CSR: - tmp = child->thread.fpu.fcr31; + if (cpu_has_fpu) + tmp = child->thread.fpu.hard.fcr31; + else + tmp = child->thread.fpu.soft.fcr31; break; case FPC_EIR: { /* implementation / version register */ unsigned int flags; @@ -331,9 +336,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) if (!tsk_used_math(child)) { /* FP not yet used */ - memset(&child->thread.fpu, ~0, - sizeof(child->thread.fpu)); - child->thread.fpu.fcr31 = 0; + memset(&child->thread.fpu.hard, ~0, + sizeof(child->thread.fpu.hard)); + child->thread.fpu.hard.fcr31 = 0; } #ifdef CONFIG_32BIT /* @@ -364,7 +369,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) regs->lo = data; break; case FPC_CSR: - child->thread.fpu.fcr31 = data; + if (cpu_has_fpu) + child->thread.fpu.hard.fcr31 = data; + else + child->thread.fpu.soft.fcr31 = data; break; case DSP_BASE ... DSP_BASE + 5: { dspreg_t *dregs; @@ -482,6 +490,8 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) goto out; if (!test_thread_flag(TIF_SYSCALL_TRACE)) goto out; + if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT)) + goto out_tsk; /* The 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index f40ecd8be..8704dc049 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c @@ -166,7 +166,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) tmp = regs->lo; break; case FPC_CSR: - tmp = child->thread.fpu.fcr31; + if (cpu_has_fpu) + tmp = child->thread.fpu.hard.fcr31; + else + tmp = child->thread.fpu.soft.fcr31; break; case FPC_EIR: { /* implementation / version register */ unsigned int flags; @@ -285,9 +288,9 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) if (!tsk_used_math(child)) { /* FP not yet used */ - memset(&child->thread.fpu, ~0, - sizeof(child->thread.fpu)); - child->thread.fpu.fcr31 = 0; + memset(&child->thread.fpu.hard, ~0, + sizeof(child->thread.fpu.hard)); + child->thread.fpu.hard.fcr31 = 0; } /* * The odd registers are actually the high order bits @@ -315,7 +318,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) regs->lo = data; break; case FPC_CSR: - child->thread.fpu.fcr31 = data; + if (cpu_has_fpu) + child->thread.fpu.hard.fcr31 = data; + else + child->thread.fpu.soft.fcr31 = data; break; case DSP_BASE ... DSP_BASE + 5: { dspreg_t *dregs; diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 656bde2e1..0d9c4a32a 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S @@ -10,6 +10,7 @@ * Further modifications to make this work: * Copyright (c) 1998-2000 Harald Koerfgen */ +#include #include #include #include diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index 880fa6e84..283a98508 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S @@ -12,6 +12,7 @@ * Copyright (C) 2000 MIPS Technologies, Inc. * Copyright (C) 1999, 2001 Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index d5c8b82fe..0b1b54ace 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S @@ -10,6 +10,7 @@ * Copyright (C) 2000 MIPS Technologies, Inc. * written by Carsten Langgaard, carstenl@mips.com */ +#include #include #include #include @@ -74,8 +75,8 @@ and t0, t0, t1 LONG_S t0, ST_OFF(t3) - fpu_save_double a0 t0 t1 # c0_status passed in t0 - # clobbers t1 + fpu_save_double a0 t1 t0 t2 # c0_status passed in t1 + # clobbers t0 and t2 1: /* @@ -93,7 +94,7 @@ ori t1, t2, TCSTATUS_IXMT mtc0 t1, CP0_TCSTATUS andi t2, t2, TCSTATUS_IXMT - _ehb + ehb DMT 8 # dmt t0 move t1,ra jal mips_ihb @@ -108,7 +109,7 @@ or a2, t1 mtc0 a2, CP0_STATUS #ifdef CONFIG_MIPS_MT_SMTC - _ehb + ehb andi t0, t0, VPECONTROL_TE beqz t0, 1f emt @@ -117,7 +118,7 @@ xori t1, t1, TCSTATUS_IXMT or t1, t1, t2 mtc0 t1, CP0_TCSTATUS - _ehb + ehb #endif /* CONFIG_MIPS_MT_SMTC */ move v0, a0 jr ra @@ -128,9 +129,9 @@ */ LEAF(_save_fp) #ifdef CONFIG_64BIT - mfc0 t0, CP0_STATUS + mfc0 t1, CP0_STATUS #endif - fpu_save_double a0 t0 t1 # clobbers t1 + fpu_save_double a0 t1 t0 t2 # clobbers t1 jr ra END(_save_fp) @@ -138,10 +139,7 @@ LEAF(_save_fp) * Restore a thread's fp context. */ LEAF(_restore_fp) -#ifdef CONFIG_64BIT - mfc0 t0, CP0_STATUS -#endif - fpu_restore_double a0 t0 t1 # clobbers t1 + fpu_restore_double a0, t1 # clobbers t1 jr ra END(_restore_fp) diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index cdab1b2cd..caf777f83 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c @@ -487,7 +487,7 @@ static struct file_operations rtlx_fops = { static struct irqaction rtlx_irq = { .handler = rtlx_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "RTLX", }; diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index b0f6fd11b..c034988e3 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -3,14 +3,14 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1995-99, 2000- 02, 06 Ralf Baechle + * Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 by Ralf Baechle * Copyright (C) 2001 MIPS Technologies, Inc. * Copyright (C) 2004 Thiemo Seufer */ +#include #include #include #include -#include #include #include #include @@ -28,18 +28,6 @@ NESTED(handle_sys, PT_SIZE, sp) .set noat SAVE_SOME -#ifdef CONFIG_TRACE_IRQFLAGS - TRACE_IRQS_ON -#ifdef CONFIG_64BIT - LONG_L $8, PT_R8(sp) - LONG_L $9, PT_R9(sp) -#endif - LONG_L $7, PT_R7(sp) - LONG_L $6, PT_R6(sp) - LONG_L $5, PT_R5(sp) - LONG_L $4, PT_R4(sp) - LONG_L $2, PT_R2(sp) -#endif STI .set at @@ -509,7 +497,7 @@ einval: li v0, -EINVAL sys sys_sched_get_priority_min 1 sys sys_sched_rr_get_interval 2 /* 4165 */ sys sys_nanosleep, 2 - sys sys_mremap, 5 + sys sys_mremap, 4 sys sys_accept 3 sys sys_bind 3 sys sys_connect 3 /* 4170 */ @@ -659,9 +647,6 @@ einval: li v0, -EINVAL sys sys_unshare 1 sys sys_splice 4 sys sys_sync_file_range 7 /* 4305 */ - sys sys_tee 4 - sys sys_vmsplice 4 - sys sys_move_pages 6 .endm /* We pre-compute the number of _instruction_ bytes needed to diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 7696b070d..c2295a43a 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -7,10 +7,10 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. */ +#include #include #include #include -#include #include #include #include @@ -34,7 +34,6 @@ NESTED(handle_sys64, PT_SIZE, sp) */ .set noat SAVE_SOME - TRACE_IRQS_ON STI .set at #endif @@ -463,6 +462,3 @@ sys_call_table: PTR sys_unshare PTR sys_splice PTR sys_sync_file_range - PTR sys_tee /* 5265 */ - PTR sys_vmsplice - PTR sys_move_pages diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index a28aba103..193cff35e 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -7,10 +7,10 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. */ +#include #include #include #include -#include #include #include #include @@ -33,7 +33,6 @@ NESTED(handle_sysn32, PT_SIZE, sp) #ifndef CONFIG_MIPS32_O32 .set noat SAVE_SOME - TRACE_IRQS_ON STI .set at #endif @@ -389,6 +388,3 @@ EXPORT(sysn32_call_table) PTR sys_unshare PTR sys_splice PTR sys_sync_file_range - PTR sys_tee - PTR sys_vmsplice /* 6271 */ - PTR sys_move_pages diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index afdb7bdec..7ac3efeaa 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -13,10 +13,10 @@ * to ABI64 calling convention. 64-bit syscalls are also processed * here for now. */ +#include #include #include #include -#include #include #include #include @@ -28,7 +28,6 @@ NESTED(handle_sys, PT_SIZE, sp) .set noat SAVE_SOME - TRACE_IRQS_ON STI .set at ld t1, PT_EPC(sp) # skip syscall on return @@ -511,7 +510,4 @@ sys_call_table: PTR sys_unshare PTR sys_splice PTR sys32_sync_file_range /* 4305 */ - PTR sys_tee - PTR sys_vmsplice - PTR compat_sys_move_pages .size sys_call_table,.-sys_call_table diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 8c2b596a1..397a70e65 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -10,6 +10,7 @@ * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) 2000 2001, 2002 Maciej W. Rozycki */ +#include #include #include #include @@ -24,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -441,55 +442,10 @@ static inline void bootmem_init(void) #endif /* CONFIG_BLK_DEV_INITRD */ } -/* - * arch_mem_init - initialize memory managment subsystem - * - * o plat_mem_setup() detects the memory configuration and will record detected - * memory areas using add_memory_region. - * o parse_cmdline_early() parses the command line for mem= options which, - * iff detected, will override the results of the automatic detection. - * - * At this stage the memory configuration of the system is known to the - * kernel but generic memory managment system is still entirely uninitialized. - * - * o bootmem_init() - * o sparse_init() - * o paging_init() - * - * At this stage the bootmem allocator is ready to use. - * - * NOTE: historically plat_mem_setup did the entire platform initialization. - * This was rather impractical because it meant plat_mem_setup had to - * get away without any kind of memory allocator. To keep old code from - * breaking plat_setup was just renamed to plat_setup and a second platform - * initialization hook for anything else was introduced. - */ - -extern void plat_mem_setup(void); - -static void __init arch_mem_init(char **cmdline_p) -{ - /* call board setup routine */ - plat_mem_setup(); - - strlcpy(command_line, arcs_cmdline, sizeof(command_line)); - strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); - - *cmdline_p = command_line; - - parse_cmdline_early(); - bootmem_init(); - sparse_init(); - paging_init(); -} - static inline void resource_init(void) { int i; - if (UNCAC_BASE != IO_BASE) - return; - code_resource.start = virt_to_phys(&_text); code_resource.end = virt_to_phys(&_etext) - 1; data_resource.start = virt_to_phys(&_etext); @@ -539,6 +495,8 @@ static inline void resource_init(void) #undef MAXMEM #undef MAXMEM_PFN +extern void plat_setup(void); + void __init setup_arch(char **cmdline_p) { cpu_probe(); @@ -553,8 +511,18 @@ void __init setup_arch(char **cmdline_p) #endif #endif - arch_mem_init(cmdline_p); + /* call board setup routine */ + plat_setup(); + + strlcpy(command_line, arcs_cmdline, sizeof(command_line)); + strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); + + *cmdline_p = command_line; + parse_cmdline_early(); + bootmem_init(); + sparse_init(); + paging_init(); resource_init(); #ifdef CONFIG_SMP plat_smp_setup(); diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h index b1f09d54e..ce6cb915c 100644 --- a/arch/mips/kernel/signal-common.h +++ b/arch/mips/kernel/signal-common.h @@ -8,6 +8,7 @@ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ +#include static inline int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 6b4d9be31..402efd27c 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -7,6 +7,7 @@ * Copyright (C) 1994 - 2000 Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 93429a4d3..57770902b 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c @@ -130,13 +130,13 @@ irqreturn_t ipi_call_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction irq_resched = { .handler = ipi_resched_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "IPI_resched" }; static struct irqaction irq_call = { .handler = ipi_call_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "IPI_call" }; diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 221895802..298f82fe8 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -318,32 +318,6 @@ static void flush_tlb_mm_ipi(void *mm) local_flush_tlb_mm((struct mm_struct *)mm); } -/* - * Special Variant of smp_call_function for use by TLB functions: - * - * o No return value - * o collapses to normal function call on UP kernels - * o collapses to normal function call on systems with a single shared - * primary cache. - * o CONFIG_MIPS_MT_SMTC currently implies there is only one physical core. - */ -static inline void smp_on_other_tlbs(void (*func) (void *info), void *info) -{ -#ifndef CONFIG_MIPS_MT_SMTC - smp_call_function(func, info, 1, 1); -#endif -} - -static inline void smp_on_each_tlb(void (*func) (void *info), void *info) -{ - preempt_disable(); - - smp_on_other_tlbs(func, info); - func(info); - - preempt_enable(); -} - /* * The following tlb flush calls are invoked when old translations are * being torn down, or pte attributes are changing. For single threaded @@ -362,7 +336,7 @@ void flush_tlb_mm(struct mm_struct *mm) preempt_disable(); if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) { - smp_on_other_tlbs(flush_tlb_mm_ipi, (void *)mm); + smp_call_function(flush_tlb_mm_ipi, (void *)mm, 1, 1); } else { int i; for (i = 0; i < num_online_cpus(); i++) @@ -398,7 +372,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l fd.vma = vma; fd.addr1 = start; fd.addr2 = end; - smp_on_other_tlbs(flush_tlb_range_ipi, (void *)&fd); + smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1, 1); } else { int i; for (i = 0; i < num_online_cpus(); i++) @@ -440,7 +414,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) fd.vma = vma; fd.addr1 = page; - smp_on_other_tlbs(flush_tlb_page_ipi, (void *)&fd); + smp_call_function(flush_tlb_page_ipi, (void *)&fd, 1, 1); } else { int i; for (i = 0; i < num_online_cpus(); i++) @@ -460,7 +434,8 @@ static void flush_tlb_one_ipi(void *info) void flush_tlb_one(unsigned long vaddr) { - smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr); + smp_call_function(flush_tlb_one_ipi, (void *) vaddr, 1, 1); + local_flush_tlb_one(vaddr); } static DEFINE_PER_CPU(struct cpu, cpu_devices); @@ -471,7 +446,7 @@ static int __init topology_init(void) int ret; for_each_present_cpu(cpu) { - ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); + ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); if (ret) printk(KERN_WARNING "topology_init: register_cpu %d " "failed (%d)\n", cpu, ret); diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S index 4cc3dea36..c9d65196d 100644 --- a/arch/mips/kernel/smtc-asm.S +++ b/arch/mips/kernel/smtc-asm.S @@ -52,12 +52,12 @@ FEXPORT(__smtc_ipi_vector) .set noat /* Disable thread scheduling to make Status update atomic */ DMT 27 # dmt k1 - _ehb + ehb /* Set EXL */ mfc0 k0,CP0_STATUS ori k0,k0,ST0_EXL mtc0 k0,CP0_STATUS - _ehb + ehb /* Thread scheduling now inhibited by EXL. Restore TE state. */ andi k1,k1,VPECONTROL_TE beqz k1,1f @@ -82,7 +82,7 @@ FEXPORT(__smtc_ipi_vector) li k1,ST0_CU0 or k1,k1,k0 mtc0 k1,CP0_STATUS - _ehb + ehb get_saved_sp /* Interrupting TC will have pre-set values in slots in the new frame */ 2: subu k1,k1,PT_SIZE @@ -90,13 +90,12 @@ FEXPORT(__smtc_ipi_vector) lw k0,PT_TCSTATUS(k1) /* Write it to TCStatus to restore CU/KSU/IXMT state */ mtc0 k0,$2,1 - _ehb + ehb lw k0,PT_EPC(k1) mtc0 k0,CP0_EPC /* Save all will redundantly recompute the SP, but use it for now */ SAVE_ALL CLI - TRACE_IRQS_OFF move a0,sp /* Function to be invoked passed stack pad slot 5 */ lw t0,PT_PADSLOT5(sp) @@ -117,7 +116,7 @@ LEAF(self_ipi) mfc0 t0,CP0_TCSTATUS ori t1,t0,TCSTATUS_IXMT mtc0 t1,CP0_TCSTATUS - _ehb + ehb /* We know we're in kernel mode, so prepare stack frame */ subu t1,sp,PT_SIZE sw ra,PT_EPC(t1) diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 604bcc5cb..2e8e52c13 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c @@ -127,7 +127,7 @@ static int __init stlb_disable(char *s) static int __init asidmask_set(char *str) { get_option(&str, &asidmask); - switch (asidmask) { + switch(asidmask) { case 0x1: case 0x3: case 0x7: @@ -249,7 +249,7 @@ void smtc_configure_tlb(void) /* * Only count if the MMU Type indicated is TLB */ - if (((read_vpe_c0_config() & MIPS_CONF_MT) >> 7) == 1) { + if(((read_vpe_c0_config() & MIPS_CONF_MT) >> 7) == 1) { config1val = read_vpe_c0_config1(); tlbsiz += ((config1val >> 25) & 0x3f) + 1; } @@ -367,7 +367,7 @@ void mipsmt_prepare_cpus(void) dvpe(); dmt(); - spin_lock_init(&freeIPIq.lock); + freeIPIq.lock = SPIN_LOCK_UNLOCKED; /* * We probably don't have as many VPEs as we do SMP "CPUs", @@ -375,7 +375,7 @@ void mipsmt_prepare_cpus(void) */ for (i=0; i #include #include #include @@ -303,7 +304,7 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) * * This is really horribly ugly. */ -asmlinkage int sys_ipc (unsigned int call, int first, int second, +asmlinkage int sys_ipc (uint call, int first, int second, unsigned long third, void __user *ptr, long fifth) { int version, ret; @@ -361,18 +362,18 @@ asmlinkage int sys_ipc (unsigned int call, int first, int second, case SHMAT: switch (version) { default: { - unsigned long raddr; + ulong raddr; ret = do_shmat (first, (char __user *) ptr, second, &raddr); if (ret) return ret; - return put_user (raddr, (unsigned long __user *) third); + return put_user (raddr, (ulong __user *) third); } case 1: /* iBCS2 emulator entry point */ if (!segment_eq(get_fs(), get_ds())) return -EINVAL; return do_shmat (first, (char __user *) ptr, second, - (unsigned long *) third); + (ulong *) third); } case SHMDT: return sys_shmdt ((char __user *)ptr); diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 3371005ba..a456f78a3 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -237,6 +236,7 @@ asmlinkage int irix_prctl(unsigned option, ...) #undef DEBUG_PROCGRPS extern unsigned long irix_mapelf(int fd, struct elf_phdr __user *user_phdrp, int cnt); +extern int getrusage(struct task_struct *p, int who, struct rusage __user *ru); extern char *prom_getenv(char *name); extern long prom_setenv(char *name, char *value); @@ -695,7 +695,7 @@ asmlinkage int irix_statfs(const char __user *path, if (error) goto out; - error = vfs_statfs(nd.dentry, &kbuf); + error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf); if (error) goto dput_and_out; @@ -733,7 +733,7 @@ asmlinkage int irix_fstatfs(unsigned int fd, struct irix_statfs __user *buf) goto out; } - error = vfs_statfs(file->f_dentry, &kbuf); + error = vfs_statfs(file->f_dentry->d_inode->i_sb, &kbuf); if (error) goto out_f; @@ -1361,7 +1361,7 @@ asmlinkage int irix_statvfs(char __user *fname, struct irix_statvfs __user *buf) error = user_path_walk(fname, &nd); if (error) goto out; - error = vfs_statfs(nd.dentry, &kbuf); + error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf); if (error) goto dput_and_out; @@ -1407,7 +1407,7 @@ asmlinkage int irix_fstatvfs(int fd, struct irix_statvfs __user *buf) error = -EBADF; goto out; } - error = vfs_statfs(file->f_dentry, &kbuf); + error = vfs_statfs(file->f_dentry->d_inode->i_sb, &kbuf); if (error) goto out_f; @@ -1612,7 +1612,7 @@ asmlinkage int irix_statvfs64(char __user *fname, struct irix_statvfs64 __user * error = user_path_walk(fname, &nd); if (error) goto out; - error = vfs_statfs(nd.dentry, &kbuf); + error = vfs_statfs(nd.dentry->d_inode->i_sb, &kbuf); if (error) goto dput_and_out; @@ -1659,7 +1659,7 @@ asmlinkage int irix_fstatvfs64(int fd, struct irix_statvfs __user *buf) error = -EBADF; goto out; } - error = vfs_statfs(file->f_dentry, &kbuf); + error = vfs_statfs(file->f_dentry->d_inode->i_sb, &kbuf); if (error) goto out_f; @@ -1740,13 +1740,12 @@ struct irix_dirent32_callback { #define ROUND_UP32(x) (((x)+sizeof(u32)-1) & ~(sizeof(u32)-1)) static int irix_filldir32(void *__buf, const char *name, - int namlen, loff_t offset, u64 ino, unsigned int d_type) + int namlen, loff_t offset, ino_t ino, unsigned int d_type) { struct irix_dirent32 __user *dirent; struct irix_dirent32_callback *buf = __buf; unsigned short reclen = ROUND_UP32(NAME_OFFSET32(dirent) + namlen + 1); int err = 0; - u32 d_ino; #ifdef DEBUG_GETDENTS printk("\nirix_filldir32[reclen<%d>namlen<%d>count<%d>]", @@ -1755,15 +1754,12 @@ static int irix_filldir32(void *__buf, const char *name, buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) err = __put_user(offset, &dirent->d_off); dirent = buf->current_dir; err |= __put_user(dirent, &buf->previous); - err |= __put_user(d_ino, &dirent->d_ino); + err |= __put_user(ino, &dirent->d_ino); err |= __put_user(reclen, &dirent->d_reclen); err |= copy_to_user((char __user *)dirent->d_name, name, namlen) ? -EFAULT : 0; err |= __put_user(0, &dirent->d_name[namlen]); @@ -1842,7 +1838,7 @@ struct irix_dirent64_callback { #define ROUND_UP64(x) (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1)) static int irix_filldir64(void *__buf, const char *name, - int namlen, loff_t offset, u64 ino, unsigned int d_type) + int namlen, loff_t offset, ino_t ino, unsigned int d_type) { struct irix_dirent64 __user *dirent; struct irix_dirent64_callback * buf = __buf; diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 170cb67f4..13ff4da59 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -11,6 +11,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -566,19 +567,20 @@ asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs) * 2) setup xtime based on rtc_mips_get_time(). * 3) choose a appropriate gettimeoffset routine. * 4) calculate a couple of cached variables for later usage - * 5) plat_timer_setup() - + * 5) board_timer_setup() - * a) (optional) over-write any choices made above by time_init(). * b) machine specific code should setup the timer irqaction. * c) enable the timer interrupt */ void (*board_time_init)(void); +void (*board_timer_setup)(struct irqaction *irq); unsigned int mips_hpt_frequency; static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "timer", }; @@ -717,7 +719,7 @@ void __init time_init(void) * to be NULL function so that we are sure the high-level code * is not invoked accidentally. */ - plat_timer_setup(&timer_irqaction); + board_timer_setup(&timer_irqaction); } #define FEBRUARY 2 diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 954a19849..a7564b08e 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -11,6 +11,7 @@ * Copyright (C) 2000, 01 MIPS Technologies, Inc. * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki */ +#include #include #include #include @@ -64,7 +65,7 @@ extern asmlinkage void handle_mcheck(void); extern asmlinkage void handle_reserved(void); extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, - struct mips_fpu_struct *ctx); + struct mips_fpu_soft_struct *ctx); void (*board_be_init)(void); int (*board_be_handler)(struct pt_regs *regs, int is_fixup); @@ -569,8 +570,6 @@ asmlinkage void do_ov(struct pt_regs *regs) */ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) { - die_if_kernel("FP exception in kernel code", regs); - if (fcr31 & FPU_CSR_UNI_X) { int sig; @@ -601,7 +600,8 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) preempt_enable(); /* Run the emulator */ - sig = fpu_emulator_cop1Handler (regs, ¤t->thread.fpu); + sig = fpu_emulator_cop1Handler (regs, + ¤t->thread.fpu.soft); preempt_disable(); @@ -610,7 +610,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) * We can't allow the emulated instruction to leave any of * the cause bit set in $fcr31. */ - current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; + current->thread.fpu.soft.fcr31 &= ~FPU_CSR_ALL_X; /* Restore the hardware register state */ restore_fp(current); @@ -755,7 +755,7 @@ asmlinkage void do_cpu(struct pt_regs *regs) if (!cpu_has_fpu) { int sig = fpu_emulator_cop1Handler(regs, - ¤t->thread.fpu); + ¤t->thread.fpu.soft); if (sig) force_sig(sig, current); #ifdef CONFIG_MIPS_MT_FPAFF @@ -849,29 +849,31 @@ asmlinkage void do_mt(struct pt_regs *regs) { int subcode; + die_if_kernel("MIPS MT Thread exception in kernel", regs); + subcode = (read_vpe_c0_vpecontrol() & VPECONTROL_EXCPT) >> VPECONTROL_EXCPT_SHIFT; switch (subcode) { case 0: - printk(KERN_DEBUG "Thread Underflow\n"); + printk(KERN_ERR "Thread Underflow\n"); break; case 1: - printk(KERN_DEBUG "Thread Overflow\n"); + printk(KERN_ERR "Thread Overflow\n"); break; case 2: - printk(KERN_DEBUG "Invalid YIELD Qualifier\n"); + printk(KERN_ERR "Invalid YIELD Qualifier\n"); break; case 3: - printk(KERN_DEBUG "Gating Storage Exception\n"); + printk(KERN_ERR "Gating Storage Exception\n"); break; case 4: - printk(KERN_DEBUG "YIELD Scheduler Exception\n"); + printk(KERN_ERR "YIELD Scheduler Exception\n"); break; case 5: - printk(KERN_DEBUG "Gating Storage Schedulier Exception\n"); + printk(KERN_ERR "Gating Storage Schedulier Exception\n"); break; default: - printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", + printk(KERN_ERR "*** UNKNOWN THREAD EXCEPTION %d ***\n", subcode); break; } @@ -980,10 +982,10 @@ void ejtag_exception_handler(struct pt_regs *regs) unsigned long depc, old_epc; unsigned int debug; - printk(KERN_DEBUG "SDBBP EJTAG debug exception - not handled yet, just ignored!\n"); + printk("SDBBP EJTAG debug exception - not handled yet, just ignored!\n"); depc = read_c0_depc(); debug = read_c0_debug(); - printk(KERN_DEBUG "c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug); + printk("c0_depc = %0*lx, DEBUG = %08x\n", field, depc, debug); if (debug & 0x80000000) { /* * In branch delay slot. @@ -1001,7 +1003,7 @@ void ejtag_exception_handler(struct pt_regs *regs) write_c0_depc(depc); #if 0 - printk(KERN_DEBUG "\n\n----- Enable EJTAG single stepping ----\n\n"); + printk("\n\n----- Enable EJTAG single stepping ----\n\n"); write_c0_debug(debug | 0x100); #endif } @@ -1049,7 +1051,7 @@ void *set_except_vector(int n, void *addr) return (void *)old_handler; } -#ifdef CONFIG_CPU_MIPSR2_SRS +#ifdef CONFIG_CPU_MIPSR2 /* * MIPSR2 shadow register set allocation * FIXME: SMP... @@ -1068,9 +1070,11 @@ static struct shadow_registers { static void mips_srs_init(void) { +#ifdef CONFIG_CPU_MIPSR2_SRS shadow_registers.sr_supported = ((read_c0_srsctl() >> 26) & 0x0f) + 1; printk(KERN_INFO "%d MIPSR2 register sets available\n", shadow_registers.sr_supported); +#endif shadow_registers.sr_allocated = 1; /* Set 0 used by kernel */ } @@ -1195,14 +1199,7 @@ void *set_vi_handler(int n, void *addr) { return set_vi_srs_handler(n, addr, 0); } - -#else - -static inline void mips_srs_init(void) -{ -} - -#endif /* CONFIG_CPU_MIPSR2_SRS */ +#endif /* * This is used by native signal handling @@ -1392,7 +1389,9 @@ void __init trap_init(void) else ebase = CAC_BASE; +#ifdef CONFIG_CPU_MIPSR2 mips_srs_init(); +#endif per_cpu_trap_init(); diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 7e7d54823..5b5a3736c 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c @@ -72,6 +72,7 @@ * A store crossing a page boundary might be executed only partially. * Undo the partial store in this case. */ +#include #include #include #include diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0bb9cd889..b84d1f9ce 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #include #include diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 9ee0ec2cd..85d7df7b1 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c @@ -28,6 +28,7 @@ * i.e cat spapp >/dev/vpe1. */ +#include #include #include #include diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c index 456be8fc9..2d3472b21 100644 --- a/arch/mips/lasat/interrupt.c +++ b/arch/mips/lasat/interrupt.c @@ -69,7 +69,7 @@ static void end_lasat_irq(unsigned int irq) enable_lasat_irq(irq); } -static struct irq_chip lasat_irq_type = { +static struct hw_interrupt_type lasat_irq_type = { .typename = "Lasat", .startup = startup_lasat_irq, .shutdown = shutdown_lasat_irq, @@ -156,6 +156,6 @@ void __init arch_init_irq(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &lasat_irq_type; + irq_desc[i].handler = &lasat_irq_type; } } diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c index d425120b0..fc9b0e2a6 100644 --- a/arch/mips/lasat/lasat_board.c +++ b/arch/mips/lasat/lasat_board.c @@ -17,6 +17,7 @@ * * Routines specific to the LASAT boards */ +#include #include #include #include diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c index 9e22acf03..181bf6817 100644 --- a/arch/mips/lasat/reset.c +++ b/arch/mips/lasat/reset.c @@ -17,6 +17,7 @@ * * Reset the LASAT board. */ +#include #include #include diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c index 0ffc43c60..bb70a8240 100644 --- a/arch/mips/lasat/setup.c +++ b/arch/mips/lasat/setup.c @@ -22,6 +22,7 @@ * * Lasat specific setup. */ +#include #include #include #include @@ -115,9 +116,12 @@ static void lasat_time_init(void) mips_hpt_frequency = lasat_board_info.li_cpu_hz / 2; } -void __init plat_timer_setup(struct irqaction *irq) +static void lasat_timer_setup(struct irqaction *irq) { - write_c0_compare( read_c0_count() + mips_hpt_frequency / HZ); + + write_c0_compare( + read_c0_count() + + mips_hpt_frequency / HZ); change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5); } @@ -151,7 +155,7 @@ void __init serial_init(void) } #endif -void __init plat_mem_setup(void) +void __init plat_setup(void) { int i; lasat_misc = &lasat_misc_info[mips_machtype]; @@ -167,6 +171,7 @@ void __init plat_mem_setup(void) lasat_reboot_setup(); board_time_init = lasat_time_init; + board_timer_setup = lasat_timer_setup; #ifdef CONFIG_DS1603 ds1603 = &ds_defs[mips_machtype]; diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 6dd7ae1b7..e3d5aaa90 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c index 6a68deb51..c49a925d0 100644 --- a/arch/mips/lib-32/dump_tlb.c +++ b/arch/mips/lib-32/dump_tlb.c @@ -4,6 +4,7 @@ * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle. * Copyright (C) 1999 by Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/lib-64/dump_tlb.c b/arch/mips/lib-64/dump_tlb.c index be8261be6..11a5f015f 100644 --- a/arch/mips/lib-64/dump_tlb.c +++ b/arch/mips/lib-64/dump_tlb.c @@ -4,6 +4,7 @@ * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle. * Copyright (C) 1999 by Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile index b225543f5..cf12caf80 100644 --- a/arch/mips/lib/Makefile +++ b/arch/mips/lib/Makefile @@ -7,7 +7,4 @@ lib-y += csum_partial_copy.o memcpy.o promlib.o strlen_user.o strncpy_user.o \ obj-y += iomap.o -# libgcc-style stuff needed in the kernel -lib-y += ashldi3.o ashrdi3.o lshrdi3.o - EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/lib/ashldi3.c b/arch/mips/lib/ashldi3.c deleted file mode 100644 index beb80f316..000000000 --- a/arch/mips/lib/ashldi3.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -#include "libgcc.h" - -long long __ashldi3(long long u, word_type b) -{ - DWunion uu, w; - word_type bm; - - if (b == 0) - return u; - - uu.ll = u; - bm = 32 - b; - - if (bm <= 0) { - w.s.low = 0; - w.s.high = (unsigned int) uu.s.low << -bm; - } else { - const unsigned int carries = (unsigned int) uu.s.low >> bm; - - w.s.low = (unsigned int) uu.s.low << b; - w.s.high = ((unsigned int) uu.s.high << b) | carries; - } - - return w.ll; -} - -EXPORT_SYMBOL(__ashldi3); diff --git a/arch/mips/lib/ashrdi3.c b/arch/mips/lib/ashrdi3.c deleted file mode 100644 index c884a912b..000000000 --- a/arch/mips/lib/ashrdi3.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -#include "libgcc.h" - -long long __ashrdi3(long long u, word_type b) -{ - DWunion uu, w; - word_type bm; - - if (b == 0) - return u; - - uu.ll = u; - bm = 32 - b; - - if (bm <= 0) { - /* w.s.high = 1..1 or 0..0 */ - w.s.high = - uu.s.high >> 31; - w.s.low = uu.s.high >> -bm; - } else { - const unsigned int carries = (unsigned int) uu.s.high << bm; - - w.s.high = uu.s.high >> b; - w.s.low = ((unsigned int) uu.s.low >> b) | carries; - } - - return w.ll; -} - -EXPORT_SYMBOL(__ashrdi3); diff --git a/arch/mips/lib/libgcc.h b/arch/mips/lib/libgcc.h deleted file mode 100644 index 3f19d1c5d..000000000 --- a/arch/mips/lib/libgcc.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ASM_LIBGCC_H -#define __ASM_LIBGCC_H - -#include - -typedef int word_type __attribute__ ((mode (__word__))); - -#ifdef __BIG_ENDIAN -struct DWstruct { - int high, low; -}; -#elif defined(__LITTLE_ENDIAN) -struct DWstruct { - int low, high; -}; -#else -#error I feel sick. -#endif - -typedef union -{ - struct DWstruct s; - long long ll; -} DWunion; - -#endif /* __ASM_LIBGCC_H */ diff --git a/arch/mips/lib/lshrdi3.c b/arch/mips/lib/lshrdi3.c deleted file mode 100644 index dcf8d6810..000000000 --- a/arch/mips/lib/lshrdi3.c +++ /dev/null @@ -1,29 +0,0 @@ -#include - -#include "libgcc.h" - -long long __lshrdi3(long long u, word_type b) -{ - DWunion uu, w; - word_type bm; - - if (b == 0) - return u; - - uu.ll = u; - bm = 32 - b; - - if (bm <= 0) { - w.s.high = 0; - w.s.low = (unsigned int) uu.s.high >> -bm; - } else { - const unsigned int carries = (unsigned int) uu.s.high << bm; - - w.s.high = (unsigned int) uu.s.high >> b; - w.s.low = ((unsigned int) uu.s.low >> b) | carries; - } - - return w.ll; -} - -EXPORT_SYMBOL(__lshrdi3); diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index a526c62cb..7f9aafa4d 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S @@ -12,6 +12,7 @@ * * Mnemonic names for arguments to memcpy/__copy_user */ +#include /* * Hack to resolve longstanding prefetch issue diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 3f0d5d26d..aa5818a0d 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -60,15 +60,15 @@ /* Function which emulates a floating point instruction. */ -static int fpu_emu(struct pt_regs *, struct mips_fpu_struct *, +static int fpu_emu(struct pt_regs *, struct mips_fpu_soft_struct *, mips_instruction); #if __mips >= 4 && __mips != 32 static int fpux_emu(struct pt_regs *, - struct mips_fpu_struct *, mips_instruction); + struct mips_fpu_soft_struct *, mips_instruction); #endif -/* Further private data for which no space exists in mips_fpu_struct */ +/* Further private data for which no space exists in mips_fpu_soft_struct */ struct mips_fpu_emulator_stats fpuemustats; @@ -203,7 +203,7 @@ static int isBranchInstr(mips_instruction * i) * Two instructions if the instruction is in a branch delay slot. */ -static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx) +static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx) { mips_instruction ir; void * emulpc, *contpc; @@ -595,7 +595,7 @@ DEF3OP(msub, dp, ieee754dp_mul, ieee754dp_sub,); DEF3OP(nmadd, dp, ieee754dp_mul, ieee754dp_add, ieee754dp_neg); DEF3OP(nmsub, dp, ieee754dp_mul, ieee754dp_sub, ieee754dp_neg); -static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, +static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, mips_instruction ir) { unsigned rcsr = 0; /* resulting csr */ @@ -759,7 +759,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, /* * Emulate a single COP1 arithmetic instruction. */ -static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, +static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, mips_instruction ir) { int rfmt; /* resulting format */ @@ -1233,7 +1233,8 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, return 0; } -int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx) +int fpu_emulator_cop1Handler(struct pt_regs *xcp, + struct mips_fpu_soft_struct *ctx) { unsigned long oldepc, prevepc; mips_instruction insn; diff --git a/arch/mips/math-emu/ieee754.h b/arch/mips/math-emu/ieee754.h index dd9173327..171f177c0 100644 --- a/arch/mips/math-emu/ieee754.h +++ b/arch/mips/math-emu/ieee754.h @@ -329,7 +329,7 @@ struct _ieee754_csr { unsigned pad0:7; #endif }; -#define ieee754_csr (*(struct _ieee754_csr *)(¤t->thread.fpu.fcr31)) +#define ieee754_csr (*(struct _ieee754_csr *)(¤t->thread.fpu.soft.fcr31)) static inline unsigned ieee754_getrm(void) { diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c index 5b3390f64..d187ab71c 100644 --- a/arch/mips/math-emu/kernel_linkage.c +++ b/arch/mips/math-emu/kernel_linkage.c @@ -19,6 +19,7 @@ * manipulation primitives for the Algorithmics MIPS * FPU Emulator */ +#include #include #include #include @@ -38,9 +39,9 @@ void fpu_emulator_init_fpu(void) printk("Algorithmics/MIPS FPU Emulator v1.5\n"); } - current->thread.fpu.fcr31 = 0; + current->thread.fpu.soft.fcr31 = 0; for (i = 0; i < 32; i++) { - current->thread.fpu.fpr[i] = SIGNALLING_NAN; + current->thread.fpu.soft.fpr[i] = SIGNALLING_NAN; } } @@ -58,9 +59,10 @@ int fpu_emulator_save_context(struct sigcontext *sc) for (i = 0; i < 32; i++) { err |= - __put_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); + __put_user(current->thread.fpu.soft.fpr[i], + &sc->sc_fpregs[i]); } - err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); + err |= __put_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); return err; } @@ -72,9 +74,10 @@ int fpu_emulator_restore_context(struct sigcontext *sc) for (i = 0; i < 32; i++) { err |= - __get_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); + __get_user(current->thread.fpu.soft.fpr[i], + &sc->sc_fpregs[i]); } - err |= __get_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); + err |= __get_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); return err; } @@ -91,9 +94,10 @@ int fpu_emulator_save_context32(struct sigcontext32 *sc) for (i = 0; i < 32; i+=2) { err |= - __put_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); + __put_user(current->thread.fpu.soft.fpr[i], + &sc->sc_fpregs[i]); } - err |= __put_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); + err |= __put_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); return err; } @@ -105,9 +109,10 @@ int fpu_emulator_restore_context32(struct sigcontext32 *sc) for (i = 0; i < 32; i+=2) { err |= - __get_user(current->thread.fpu.fpr[i], &sc->sc_fpregs[i]); + __get_user(current->thread.fpu.soft.fpr[i], + &sc->sc_fpregs[i]); } - err |= __get_user(current->thread.fpu.fcr31, &sc->sc_fpc_csr); + err |= __get_user(current->thread.fpu.soft.fcr31, &sc->sc_fpc_csr); return err; } diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index fb25e0377..db53950b7 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c @@ -73,7 +73,7 @@ static void end_atlas_irq(unsigned int irq) enable_atlas_irq(irq); } -static struct irq_chip atlas_irq_type = { +static struct hw_interrupt_type atlas_irq_type = { .typename = "Atlas", .startup = startup_atlas_irq, .shutdown = shutdown_atlas_irq, @@ -215,7 +215,7 @@ void __init arch_init_irq(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &atlas_irq_type; + irq_desc[i].handler = &atlas_irq_type; spin_lock_init(&irq_desc[i].lock); } } diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index 9871a91fd..c20d401ec 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c @@ -15,6 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include #include @@ -35,6 +36,7 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); +extern void mips_timer_setup(struct irqaction *irq); extern unsigned long mips_rtc_get_time(void); #ifdef CONFIG_KGDB @@ -48,7 +50,7 @@ const char *get_system_type(void) return "MIPS Atlas"; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { mips_pcibios_init(); @@ -62,6 +64,7 @@ void __init plat_mem_setup(void) mips_reboot_setup(); board_time_init = mips_time_init; + board_timer_setup = mips_timer_setup; rtc_mips_get_time = mips_rtc_get_time; } diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 58a0fe883..df4e94735 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c @@ -19,6 +19,7 @@ * * PROM library initialisation code. */ +#include #include #include #include diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index be80c5dd4..bc4d09368 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c @@ -18,6 +18,7 @@ * PROM library functions for acquiring/using memory descriptors given to * us from the YAMON. */ +#include #include #include #include @@ -47,45 +48,34 @@ static char *mtypes[3] = { }; #endif -/* determined physical memory size, not overridden by command line args */ -unsigned long physical_memsize = 0L; - struct prom_pmemblock * __init prom_getmdesc(void) { char *memsize_str; unsigned int memsize; char cmdline[CL_SIZE], *ptr; - /* otherwise look in the environment */ - memsize_str = prom_getenv("memsize"); - if (!memsize_str) { - prom_printf("memsize not set in boot prom, set to default (32Mb)\n"); - physical_memsize = 0x02000000; - } else { -#ifdef DEBUG - prom_printf("prom_memsize = %s\n", memsize_str); -#endif - physical_memsize = simple_strtol(memsize_str, NULL, 0); - } - -#ifdef CONFIG_CPU_BIG_ENDIAN - /* SOC-it swaps, or perhaps doesn't swap, when DMA'ing the last - word of physical memory */ - physical_memsize -= PAGE_SIZE; -#endif - - /* Check the command line for a memsize directive that overrides - the physical/default amount */ + /* Check the command line first for a memsize directive */ strcpy(cmdline, arcs_cmdline); ptr = strstr(cmdline, "memsize="); if (ptr && (ptr != cmdline) && (*(ptr - 1) != ' ')) ptr = strstr(ptr, " memsize="); - if (ptr) + if (ptr) { memsize = memparse(ptr + 8, &ptr); - else - memsize = physical_memsize; - + } + else { + /* otherwise look in the environment */ + memsize_str = prom_getenv("memsize"); + if (!memsize_str) { + prom_printf("memsize not set in boot prom, set to default (32Mb)\n"); + memsize = 0x02000000; + } else { +#ifdef DEBUG + prom_printf("prom_memsize = %s\n", memsize_str); +#endif + memsize = simple_strtol(memsize_str, NULL, 0); + } + } memset(mdesc, 0, sizeof(mdesc)); mdesc[0].type = yamon_dontuse; diff --git a/arch/mips/mips-boards/generic/printf.c b/arch/mips/mips-boards/generic/printf.c index 1a711bd79..2c1ab1f19 100644 --- a/arch/mips/mips-boards/generic/printf.c +++ b/arch/mips/mips-boards/generic/printf.c @@ -17,6 +17,7 @@ * * Putting things on the screen/serial line using YAMONs facilities. */ +#include #include #include #include diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c index 0996ba368..7213c395f 100644 --- a/arch/mips/mips-boards/generic/reset.c +++ b/arch/mips/mips-boards/generic/reset.c @@ -22,6 +22,7 @@ * Reset the MIPS boards. * */ +#include #include #include diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 557bf961f..a9f6124b3 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -228,7 +229,9 @@ unsigned long __init mips_rtc_get_time(void) void __init mips_time_init(void) { - unsigned int est_freq; + unsigned int est_freq, flags; + + local_irq_save(flags); /* Set Data mode - binary. */ CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); @@ -239,9 +242,11 @@ void __init mips_time_init(void) (est_freq%1000000)*100/1000000); cpu_khz = est_freq / 1000; + + local_irq_restore(flags); } -void __init plat_timer_setup(struct irqaction *irq) +void __init mips_timer_setup(struct irqaction *irq) { if (cpu_has_veic) { set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index ab460f805..b8488aab6 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c @@ -15,11 +15,12 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include #include #include -#include +#include #ifdef CONFIG_MTD #include @@ -44,6 +45,7 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); +extern void mips_timer_setup(struct irqaction *irq); extern unsigned long mips_rtc_get_time(void); #ifdef CONFIG_KGDB @@ -51,11 +53,11 @@ extern void kgdb_config(void); #endif struct resource standard_io_resources[] = { - { .name = "dma1", .start = 0x00, .end = 0x1f, .flags = IORESOURCE_BUSY }, - { .name = "timer", .start = 0x40, .end = 0x5f, .flags = IORESOURCE_BUSY }, - { .name = "keyboard", .start = 0x60, .end = 0x6f, .flags = IORESOURCE_BUSY }, - { .name = "dma page reg", .start = 0x80, .end = 0x8f, .flags = IORESOURCE_BUSY }, - { .name = "dma2", .start = 0xc0, .end = 0xdf, .flags = IORESOURCE_BUSY }, + { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, + { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, + { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, + { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, + { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, }; #ifdef CONFIG_MTD @@ -109,7 +111,7 @@ void __init fd_activate(void) } #endif -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned int i; @@ -222,5 +224,6 @@ void __init plat_mem_setup(void) mips_reboot_setup(); board_time_init = mips_time_init; + board_timer_setup = mips_timer_setup; rtc_mips_get_time = mips_rtc_get_time; } diff --git a/arch/mips/mips-boards/malta/malta_smp.c b/arch/mips/mips-boards/malta/malta_smp.c index cf967170f..6c6c8eeed 100644 --- a/arch/mips/mips-boards/malta/malta_smp.c +++ b/arch/mips/mips-boards/malta/malta_smp.c @@ -33,6 +33,25 @@ void core_send_ipi(int cpu, unsigned int action) #endif /* CONFIG_MIPS_MT_SMTC */ } +/* + * Detect available CPUs/VPEs/TCs and populate phys_cpu_present_map + */ + +void __init prom_build_cpu_map(void) +{ + int nextslot; + + /* + * As of November, 2004, MIPSsim only simulates one core + * at a time. However, that core may be a MIPS MT core + * with multiple virtual processors and thread contexts. + */ + + if (read_c0_config3() & (1<<2)) { + nextslot = mipsmt_build_cpu_map(1); + } +} + /* * Platform "CPU" startup hook */ diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index a189dec7c..4266ce445 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c @@ -17,6 +17,7 @@ * * SEAD specific setup. */ +#include #include #include #include @@ -35,6 +36,7 @@ extern void mips_reboot_setup(void); extern void mips_time_init(void); +extern void mips_timer_setup(struct irqaction *irq); static void __init serial_init(void); @@ -43,13 +45,14 @@ const char *get_system_type(void) return "MIPS SEAD"; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { ioport_resource.end = 0x7fffffff; serial_init (); board_time_init = mips_time_init; + board_timer_setup = mips_timer_setup; mips_reboot_setup(); } diff --git a/arch/mips/mips-boards/sim/Makefile b/arch/mips/mips-boards/sim/Makefile index a12e32aaf..5b977de4e 100644 --- a/arch/mips/mips-boards/sim/Makefile +++ b/arch/mips/mips-boards/sim/Makefile @@ -15,5 +15,6 @@ # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # -obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_cmdline.o +obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_irq.o \ + sim_cmdline.o obj-$(CONFIG_SMP) += sim_smp.o diff --git a/arch/mips/mips-boards/sim/sim_IRQ.c b/arch/mips/mips-boards/sim/sim_IRQ.c new file mode 100644 index 000000000..5b84c7fe1 --- /dev/null +++ b/arch/mips/mips-boards/sim/sim_IRQ.c @@ -0,0 +1,148 @@ +/* + * Carsten Langgaard, carstenl@mips.com + * Copyright (C) 1999, 2000 MIPS Technologies, Inc. All rights reserved. + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + * + * Interrupt exception dispatch code. + */ +#include + +#include +#include +#include +#include + +/* A lot of complication here is taken away because: + * + * 1) We handle one interrupt and return, sitting in a loop and moving across + * all the pending IRQ bits in the cause register is _NOT_ the answer, the + * common case is one pending IRQ so optimize in that direction. + * + * 2) We need not check against bits in the status register IRQ mask, that + * would make this routine slow as hell. + * + * 3) Linux only thinks in terms of all IRQs on or all IRQs off, nothing in + * between like BSD spl() brain-damage. + * + * Furthermore, the IRQs on the MIPS board look basically (barring software + * IRQs which we don't use at all and all external interrupt sources are + * combined together on hardware interrupt 0 (MIPS IRQ 2)) like: + * + * MIPS IRQ Source + * -------- ------ + * 0 Software (ignored) + * 1 Software (ignored) + * 2 Combined hardware interrupt (hw0) + * 3 Hardware (ignored) + * 4 Hardware (ignored) + * 5 Hardware (ignored) + * 6 Hardware (ignored) + * 7 R4k timer (what we use) + * + * Note: On the SEAD board thing are a little bit different. + * Here IRQ 2 (hw0) is wired to the UART0 and IRQ 3 (hw1) is wired + * wired to UART1. + * + * We handle the IRQ according to _our_ priority which is: + * + * Highest ---- R4k Timer + * Lowest ---- Combined hardware interrupt + * + * then we just return, if multiple IRQs are pending then we will just take + * another exception, big deal. + */ + + .text + .set noreorder + .set noat + .align 5 + NESTED(mipsIRQ, PT_SIZE, sp) + SAVE_ALL + CLI + .set at + + mfc0 s0, CP0_CAUSE # get irq bits + mfc0 s1, CP0_STATUS # get irq mask + and s0, s1 + + /* First we check for r4k counter/timer IRQ. */ + andi a0, s0, CAUSEF_IP7 + beq a0, zero, 1f + andi a0, s0, CAUSEF_IP2 # delay slot, check hw0 interrupt + + /* Wheee, a timer interrupt. */ + move a0, sp + jal mips_timer_interrupt + nop + + j ret_from_irq + nop + +1: +#if defined(CONFIG_MIPS_SEAD) + beq a0, zero, 1f + andi a0, s0, CAUSEF_IP3 # delay slot, check hw1 interrupt +#else + beq a0, zero, 1f # delay slot, check hw3 interrupt + andi a0, s0, CAUSEF_IP5 +#endif + + /* Wheee, combined hardware level zero interrupt. */ +#if defined(CONFIG_MIPS_ATLAS) + jal atlas_hw0_irqdispatch +#elif defined(CONFIG_MIPS_MALTA) + jal malta_hw0_irqdispatch +#elif defined(CONFIG_MIPS_SEAD) + jal sead_hw0_irqdispatch +#else +#error "MIPS board not supported\n" +#endif + move a0, sp # delay slot + + j ret_from_irq + nop # delay slot + +1: +#if defined(CONFIG_MIPS_SEAD) + beq a0, zero, 1f + andi a0, s0, CAUSEF_IP5 # delay slot, check hw3 interrupt + jal sead_hw1_irqdispatch + move a0, sp # delay slot + j ret_from_irq + nop # delay slot +1: +#endif +#if defined(CONFIG_MIPS_MALTA) + beq a0, zero, 1f # check hw3 (coreHI) interrupt + nop + jal corehi_irqdispatch + move a0, sp + j ret_from_irq + nop +1: +#endif + /* + * Here by mistake? This is possible, what can happen is that by the + * time we take the exception the IRQ pin goes low, so just leave if + * this is the case. + */ + move a1,s0 + PRINT("Got interrupt: c0_cause = %08x\n") + mfc0 a1, CP0_EPC + PRINT("c0_epc = %08x\n") + + j ret_from_irq + nop + END(mipsIRQ) diff --git a/arch/mips/mips-boards/sim/sim_irq.S b/arch/mips/mips-boards/sim/sim_irq.S new file mode 100644 index 000000000..d16cf3822 --- /dev/null +++ b/arch/mips/mips-boards/sim/sim_irq.S @@ -0,0 +1,101 @@ +/* + * Copyright (C) 1999, 2005 MIPS Technologies, Inc. All rights reserved. + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + * + * Interrupt exception dispatch code. + * + */ +#include + +#include +#include +#include +#include + +#include + + + .text + .set noreorder + .set noat + .align 5 + NESTED(simIRQ, PT_SIZE, sp) + SAVE_ALL + CLI + .set at + + mfc0 s0, CP0_CAUSE # get irq bits + mfc0 s1, CP0_STATUS # get irq mask + andi s0, ST0_IM # CAUSE.CE may be non-zero! + and s0, s1 + +#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) + .set mips32 + clz a0, s0 + .set mips0 + negu a0 + addu a0, 31-CAUSEB_IP + bltz a0, spurious +#else + beqz s0, spurious + li a0, 7 + + and t0, s0, 0xf000 + sltiu t0, t0, 1 + sll t0, 2 + subu a0, t0 + sll s0, t0 + + and t0, s0, 0xc000 + sltiu t0, t0, 1 + sll t0, 1 + subu a0, t0 + sll s0, t0 + + and t0, s0, 0x8000 + sltiu t0, t0, 1 + # sll t0, 0 + subu a0, t0 + # sll s0, t0 +#endif + +#ifdef CASCADE_IRQ + li a1, CASCADE_IRQ + bne a0, a1, 1f + addu a0, MIPSCPU_INT_BASE + + jal CASCADE_DISPATCH + move a0, sp + + j ret_from_irq + nop +1: +#else + addu a0, MIPSCPU_INT_BASE +#endif + + jal do_IRQ + move a1, sp + + j ret_from_irq + nop + + +spurious: + jal spurious_interrupt + nop + j ret_from_irq + nop + END(simIRQ) diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c index 2659c1c3b..a2fd62997 100644 --- a/arch/mips/mips-boards/sim/sim_setup.c +++ b/arch/mips/mips-boards/sim/sim_setup.c @@ -16,6 +16,7 @@ * */ +#include #include #include #include @@ -37,6 +38,7 @@ extern void sim_time_init(void); +extern void sim_timer_setup(struct irqaction *irq); static void __init serial_init(void); unsigned int _isbonito = 0; @@ -48,13 +50,14 @@ const char *get_system_type(void) return "MIPSsim"; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { set_io_port_base(0xbfd00000); serial_init(); board_time_init = sim_time_init; + board_timer_setup = sim_timer_setup; prom_printf("Linux started...\n"); #ifdef CONFIG_MT_SMP diff --git a/arch/mips/mips-boards/sim/sim_smp.c b/arch/mips/mips-boards/sim/sim_smp.c index cb47863ec..b7084e7c4 100644 --- a/arch/mips/mips-boards/sim/sim_smp.c +++ b/arch/mips/mips-boards/sim/sim_smp.c @@ -18,6 +18,7 @@ /* * Simulator Platform-specific hooks for SMP operation */ +#include #include #include #include @@ -49,6 +50,27 @@ void core_send_ipi(int cpu, unsigned int action) } +/* + * Detect available CPUs/VPEs/TCs and populate phys_cpu_present_map + */ + +void __init prom_build_cpu_map(void) +{ +#ifdef CONFIG_MIPS_MT_SMTC + int nextslot; + + /* + * As of November, 2004, MIPSsim only simulates one core + * at a time. However, that core may be a MIPS MT core + * with multiple virtual processors and thread contexts. + */ + + if (read_c0_config3() & (1<<2)) { + nextslot = mipsmt_build_cpu_map(1); + } +#endif /* CONFIG_MIPS_MT_SMTC */ +} + /* * Platform "CPU" startup hook */ diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index 230929ecd..18b968c69 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -33,6 +34,8 @@ unsigned long cpu_khz; +extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs); + irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { #ifdef CONFIG_SMP @@ -183,7 +186,7 @@ static void mips_timer_dispatch (struct pt_regs *regs) } -void __init plat_timer_setup(struct irqaction *irq) +void __init sim_timer_setup(struct irqaction *irq) { if (cpu_has_veic) { set_vi_handler(MSC01E_INT_CPUCTR, mips_timer_dispatch); diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile index 19e41fd18..4a6220116 100644 --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile @@ -30,7 +30,6 @@ obj-$(CONFIG_CPU_VR41XX) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o -obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o # # Choose one DMA coherency model diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 069803f58..4a43924cd 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -7,6 +7,7 @@ * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ +#include #include #include #include @@ -59,13 +60,13 @@ static unsigned long scache_size __read_mostly; /* * Dummy cache handling routines for machines without boardcaches */ -static void cache_noop(void) {} +static void no_sc_noop(void) {} static struct bcache_ops no_sc_ops = { - .bc_enable = (void *)cache_noop, - .bc_disable = (void *)cache_noop, - .bc_wback_inv = (void *)cache_noop, - .bc_inv = (void *)cache_noop + .bc_enable = (void *)no_sc_noop, + .bc_disable = (void *)no_sc_noop, + .bc_wback_inv = (void *)no_sc_noop, + .bc_inv = (void *)no_sc_noop }; struct bcache_ops *bcops = &no_sc_ops; @@ -93,9 +94,7 @@ static inline void r4k_blast_dcache_page_setup(void) { unsigned long dc_lsize = cpu_dcache_line_size(); - if (dc_lsize == 0) - r4k_blast_dcache_page = (void *)cache_noop; - else if (dc_lsize == 16) + if (dc_lsize == 16) r4k_blast_dcache_page = blast_dcache16_page; else if (dc_lsize == 32) r4k_blast_dcache_page = r4k_blast_dcache_page_dc32; @@ -107,9 +106,7 @@ static inline void r4k_blast_dcache_page_indexed_setup(void) { unsigned long dc_lsize = cpu_dcache_line_size(); - if (dc_lsize == 0) - r4k_blast_dcache_page_indexed = (void *)cache_noop; - else if (dc_lsize == 16) + if (dc_lsize == 16) r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed; else if (dc_lsize == 32) r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed; @@ -121,9 +118,7 @@ static inline void r4k_blast_dcache_setup(void) { unsigned long dc_lsize = cpu_dcache_line_size(); - if (dc_lsize == 0) - r4k_blast_dcache = (void *)cache_noop; - else if (dc_lsize == 16) + if (dc_lsize == 16) r4k_blast_dcache = blast_dcache16; else if (dc_lsize == 32) r4k_blast_dcache = blast_dcache32; @@ -206,9 +201,7 @@ static inline void r4k_blast_icache_page_setup(void) { unsigned long ic_lsize = cpu_icache_line_size(); - if (ic_lsize == 0) - r4k_blast_icache_page = (void *)cache_noop; - else if (ic_lsize == 16) + if (ic_lsize == 16) r4k_blast_icache_page = blast_icache16_page; else if (ic_lsize == 32) r4k_blast_icache_page = blast_icache32_page; @@ -223,9 +216,7 @@ static inline void r4k_blast_icache_page_indexed_setup(void) { unsigned long ic_lsize = cpu_icache_line_size(); - if (ic_lsize == 0) - r4k_blast_icache_page_indexed = (void *)cache_noop; - else if (ic_lsize == 16) + if (ic_lsize == 16) r4k_blast_icache_page_indexed = blast_icache16_page_indexed; else if (ic_lsize == 32) { if (R4600_V1_INDEX_ICACHEOP_WAR && cpu_is_r4600_v1_x()) @@ -247,9 +238,7 @@ static inline void r4k_blast_icache_setup(void) { unsigned long ic_lsize = cpu_icache_line_size(); - if (ic_lsize == 0) - r4k_blast_icache = (void *)cache_noop; - else if (ic_lsize == 16) + if (ic_lsize == 16) r4k_blast_icache = blast_icache16; else if (ic_lsize == 32) { if (R4600_V1_INDEX_ICACHEOP_WAR && cpu_is_r4600_v1_x()) @@ -269,7 +258,7 @@ static inline void r4k_blast_scache_page_setup(void) unsigned long sc_lsize = cpu_scache_line_size(); if (scache_size == 0) - r4k_blast_scache_page = (void *)cache_noop; + r4k_blast_scache_page = (void *)no_sc_noop; else if (sc_lsize == 16) r4k_blast_scache_page = blast_scache16_page; else if (sc_lsize == 32) @@ -287,7 +276,7 @@ static inline void r4k_blast_scache_page_indexed_setup(void) unsigned long sc_lsize = cpu_scache_line_size(); if (scache_size == 0) - r4k_blast_scache_page_indexed = (void *)cache_noop; + r4k_blast_scache_page_indexed = (void *)no_sc_noop; else if (sc_lsize == 16) r4k_blast_scache_page_indexed = blast_scache16_page_indexed; else if (sc_lsize == 32) @@ -305,7 +294,7 @@ static inline void r4k_blast_scache_setup(void) unsigned long sc_lsize = cpu_scache_line_size(); if (scache_size == 0) - r4k_blast_scache = (void *)cache_noop; + r4k_blast_scache = (void *)no_sc_noop; else if (sc_lsize == 16) r4k_blast_scache = blast_scache16; else if (sc_lsize == 32) @@ -519,7 +508,7 @@ static inline void local_r4k_flush_icache_range(void *args) unsigned long end = fir_args->end; if (!cpu_has_ic_fills_f_dc) { - if (end - start >= dcache_size) { + if (end - start > dcache_size) { r4k_blast_dcache(); } else { R4600_HIT_CACHEOP_WAR_IMPL; @@ -578,7 +567,7 @@ static inline void local_r4k_flush_icache_page(void *args) * secondary cache will result in any entries in the primary caches * also getting invalidated which hopefully is a bit more economical. */ - if (cpu_has_inclusive_pcaches) { + if (cpu_has_subset_pcaches) { unsigned long addr = (unsigned long) page_address(page); r4k_blast_scache_page(addr); @@ -634,7 +623,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) /* Catch bad driver code */ BUG_ON(size == 0); - if (cpu_has_inclusive_pcaches) { + if (cpu_has_subset_pcaches) { if (size >= scache_size) r4k_blast_scache(); else @@ -662,7 +651,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) /* Catch bad driver code */ BUG_ON(size == 0); - if (cpu_has_inclusive_pcaches) { + if (cpu_has_subset_pcaches) { if (size >= scache_size) r4k_blast_scache(); else @@ -694,12 +683,10 @@ static void local_r4k_flush_cache_sigtramp(void * arg) unsigned long addr = (unsigned long) arg; R4600_HIT_CACHEOP_WAR_IMPL; - if (dc_lsize) - protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); + protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); if (!cpu_icache_snoops_remote_store && scache_size) protected_writeback_scache_line(addr & ~(sc_lsize - 1)); - if (ic_lsize) - protected_flush_icache_line(addr & ~(ic_lsize - 1)); + protected_flush_icache_line(addr & ~(ic_lsize - 1)); if (MIPS4K_ICACHE_REFILL_WAR) { __asm__ __volatile__ ( ".set push\n\t" @@ -862,18 +849,15 @@ static void __init probe_pcache(void) break; case CPU_VR4133: - write_c0_config(config & ~VR41_CONF_P4K); + write_c0_config(config & ~CONF_EB); case CPU_VR4131: /* Workaround for cache instruction bug of VR4131 */ if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U || c->processor_id == 0x0c82U) { - config |= 0x00400000U; - if (c->processor_id == 0x0c80U) - config |= VR41_CONF_BP; + config &= ~0x00000030U; + config |= 0x00410000U; write_c0_config(config); - } else - c->options |= MIPS_CPU_CACHE_CDEX_P; - + } icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); c->icache.linesz = 16 << ((config & CONF_IB) >> 5); c->icache.ways = 2; @@ -883,6 +867,8 @@ static void __init probe_pcache(void) c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); c->dcache.ways = 2; c->dcache.waybit = __ffs(dcache_size/2); + + c->options |= MIPS_CPU_CACHE_CDEX_P; break; case CPU_VR41XX: @@ -987,10 +973,8 @@ static void __init probe_pcache(void) c->icache.waysize = icache_size / c->icache.ways; c->dcache.waysize = dcache_size / c->dcache.ways; - c->icache.sets = c->icache.linesz ? - icache_size / (c->icache.linesz * c->icache.ways) : 0; - c->dcache.sets = c->dcache.linesz ? - dcache_size / (c->dcache.linesz * c->dcache.ways) : 0; + c->icache.sets = icache_size / (c->icache.linesz * c->icache.ways); + c->dcache.sets = dcache_size / (c->dcache.linesz * c->dcache.ways); /* * R10000 and R12000 P-caches are odd in a positive way. They're 32kB @@ -1009,16 +993,10 @@ static void __init probe_pcache(void) break; case CPU_24K: case CPU_34K: - case CPU_74K: - if ((read_c0_config7() & (1 << 16))) { - /* effectively physically indexed dcache, - thus no virtual aliases. */ - c->dcache.flags |= MIPS_CACHE_PINDEX; - break; - } + if (!(read_c0_config7() & (1 << 16))) default: - if (c->dcache.waysize > PAGE_SIZE) - c->dcache.flags |= MIPS_CACHE_ALIASES; + if (c->dcache.waysize > PAGE_SIZE) + c->dcache.flags |= MIPS_CACHE_ALIASES; } switch (c->cputype) { @@ -1114,7 +1092,6 @@ static int __init probe_scache(void) extern int r5k_sc_init(void); extern int rm7k_sc_init(void); -extern int mips_sc_init(void); static void __init setup_scache(void) { @@ -1162,29 +1139,17 @@ static void __init setup_scache(void) return; default: - if (c->isa_level == MIPS_CPU_ISA_M32R1 || - c->isa_level == MIPS_CPU_ISA_M32R2 || - c->isa_level == MIPS_CPU_ISA_M64R1 || - c->isa_level == MIPS_CPU_ISA_M64R2) { -#ifdef CONFIG_MIPS_CPU_SCACHE - if (mips_sc_init ()) { - scache_size = c->scache.ways * c->scache.sets * c->scache.linesz; - printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n", - scache_size >> 10, - way_string[c->scache.ways], c->scache.linesz); - } -#else - if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT)) - panic("Dunno how to handle MIPS32 / MIPS64 second level cache"); -#endif - return; - } sc_present = 0; } if (!sc_present) return; + if ((c->isa_level == MIPS_CPU_ISA_M32R1 || + c->isa_level == MIPS_CPU_ISA_M64R1) && + !(c->scache.flags & MIPS_CACHE_NOT_PRESENT)) + panic("Dunno how to handle MIPS32 / MIPS64 second level cache"); + /* compute a couple of other cache variables */ c->scache.waysize = scache_size / c->scache.ways; @@ -1193,7 +1158,7 @@ static void __init setup_scache(void) printk("Unified secondary cache %ldkB %s, linesize %d bytes.\n", scache_size >> 10, way_string[c->scache.ways], c->scache.linesz); - c->options |= MIPS_CPU_INCLUSIVE_CACHES; + c->options |= MIPS_CPU_SUBSET_CACHES; } void au1x00_fixup_config_od(void) @@ -1281,12 +1246,10 @@ void __init r4k_cache_init(void) * This code supports virtually indexed processors and will be * unnecessarily inefficient on physically indexed processors. */ - if (c->dcache.linesz) - shm_align_mask = max_t( unsigned long, - c->dcache.sets * c->dcache.linesz - 1, - PAGE_SIZE - 1); - else - shm_align_mask = PAGE_SIZE-1; + shm_align_mask = max_t( unsigned long, + c->dcache.sets * c->dcache.linesz - 1, + PAGE_SIZE - 1); + flush_cache_all = r4k_flush_cache_all; __flush_cache_all = r4k___flush_cache_all; flush_cache_mm = r4k_flush_cache_mm; diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c index 2d71efb82..f9b129491 100644 --- a/arch/mips/mm/c-sb1.c +++ b/arch/mips/mm/c-sb1.c @@ -18,6 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index ddd3a2de1..83a56296b 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -5,6 +5,7 @@ * * Copyright (C) 1994 - 2003 by Ralf Baechle */ +#include #include #include #include diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c index e19fbb9ee..1cf3c6006 100644 --- a/arch/mips/mm/cerr-sb1.c +++ b/arch/mips/mm/cerr-sb1.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/mm/dma-coherent.c b/arch/mips/mm/dma-coherent.c index 7fa5fd16e..f6b3c7222 100644 --- a/arch/mips/mm/dma-coherent.c +++ b/arch/mips/mm/dma-coherent.c @@ -7,6 +7,7 @@ * Copyright (C) 2000, 2001 Ralf Baechle * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. */ +#include #include #include #include diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c index 2eeffe5c2..cd4ea8474 100644 --- a/arch/mips/mm/dma-noncoherent.c +++ b/arch/mips/mm/dma-noncoherent.c @@ -7,6 +7,7 @@ * Copyright (C) 2000, 2001 Ralf Baechle * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. */ +#include #include #include #include diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 99ebf3ccc..0c544375b 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index c52497bb1..33f6e1cdf 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -8,6 +8,7 @@ * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. */ +#include #include #include #include @@ -139,36 +140,10 @@ void __init fixrange_init(unsigned long start, unsigned long end, #ifndef CONFIG_NEED_MULTIPLE_NODES extern void pagetable_init(void); -static int __init page_is_ram(unsigned long pagenr) -{ - int i; - - for (i = 0; i < boot_mem_map.nr_map; i++) { - unsigned long addr, end; - - if (boot_mem_map.map[i].type != BOOT_MEM_RAM) - /* not usable memory */ - continue; - - addr = PFN_UP(boot_mem_map.map[i].addr); - end = PFN_DOWN(boot_mem_map.map[i].addr + - boot_mem_map.map[i].size); - - if (pagenr >= addr && pagenr < end) - return 1; - } - - return 0; -} - void __init paging_init(void) { - unsigned long zones_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 }; + unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0}; unsigned long max_dma, high, low; -#ifndef CONFIG_FLATMEM - unsigned long zholes_size[] = { [0 ... MAX_NR_ZONES - 1] = 0 }; - unsigned long i, j, pfn; -#endif pagetable_init(); @@ -200,16 +175,29 @@ void __init paging_init(void) zones_size[ZONE_HIGHMEM] = high - low; #endif -#ifdef CONFIG_FLATMEM free_area_init(zones_size); -#else - pfn = 0; - for (i = 0; i < MAX_NR_ZONES; i++) - for (j = 0; j < zones_size[i]; j++, pfn++) - if (!page_is_ram(pfn)) - zholes_size[i]++; - free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size); -#endif +} + +static inline int page_is_ram(unsigned long pagenr) +{ + int i; + + for (i = 0; i < boot_mem_map.nr_map; i++) { + unsigned long addr, end; + + if (boot_mem_map.map[i].type != BOOT_MEM_RAM) + /* not usable memory */ + continue; + + addr = PFN_UP(boot_mem_map.map[i].addr); + end = PFN_DOWN(boot_mem_map.map[i].addr + + boot_mem_map.map[i].size); + + if (pagenr >= addr && pagenr < end) + return 1; + } + + return 0; } static struct kcore_list kcore_mem, kcore_vmalloc; @@ -226,9 +214,9 @@ void __init mem_init(void) #ifdef CONFIG_DISCONTIGMEM #error "CONFIG_HIGHMEM and CONFIG_DISCONTIGMEM dont work together yet" #endif - max_mapnr = highend_pfn; + max_mapnr = num_physpages = highend_pfn; #else - max_mapnr = max_low_pfn; + max_mapnr = num_physpages = max_low_pfn; #endif high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); @@ -242,7 +230,6 @@ void __init mem_init(void) if (PageReserved(pfn_to_page(tmp))) reservedpages++; } - num_physpages = ram; #ifdef CONFIG_HIGHMEM for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { @@ -261,7 +248,6 @@ void __init mem_init(void) totalhigh_pages++; } totalram_pages += totalhigh_pages; - num_physpages += totalhigh_pages; #endif codesize = (unsigned long) &_etext - (unsigned long) &_text; diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c index fc3c7878f..148c65b9c 100644 --- a/arch/mips/mm/pg-sb1.c +++ b/arch/mips/mm/pg-sb1.c @@ -22,6 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c index 4bdaa05f4..4a3c4919e 100644 --- a/arch/mips/mm/pgtable-32.c +++ b/arch/mips/mm/pgtable-32.c @@ -5,6 +5,7 @@ * * Copyright (C) 2003 by Ralf Baechle */ +#include #include #include #include diff --git a/arch/mips/mm/pgtable.c b/arch/mips/mm/pgtable.c index c93aa6cbc..3fe94202d 100644 --- a/arch/mips/mm/pgtable.c +++ b/arch/mips/mm/pgtable.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -15,8 +16,6 @@ void show_mem(void) printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); pfn = max_mapnr; while (pfn-- > 0) { - if (!pfn_valid(pfn)) - continue; page = pfn_to_page(pfn); total++; if (PageHighMem(page)) diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c deleted file mode 100644 index 42b50964c..000000000 --- a/arch/mips/mm/sc-mips.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2006 Chris Dearman (chris@mips.com), - */ -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * MIPS32/MIPS64 L2 cache handling - */ - -/* - * Writeback and invalidate the secondary cache before DMA. - */ -static void mips_sc_wback_inv(unsigned long addr, unsigned long size) -{ - blast_scache_range(addr, addr + size); -} - -/* - * Invalidate the secondary cache before DMA. - */ -static void mips_sc_inv(unsigned long addr, unsigned long size) -{ - blast_inv_scache_range(addr, addr + size); -} - -static void mips_sc_enable(void) -{ - /* L2 cache is permanently enabled */ -} - -static void mips_sc_disable(void) -{ - /* L2 cache is permanently enabled */ -} - -static struct bcache_ops mips_sc_ops = { - .bc_enable = mips_sc_enable, - .bc_disable = mips_sc_disable, - .bc_wback_inv = mips_sc_wback_inv, - .bc_inv = mips_sc_inv -}; - -static inline int __init mips_sc_probe(void) -{ - struct cpuinfo_mips *c = ¤t_cpu_data; - unsigned int config1, config2; - unsigned int tmp; - - /* Mark as not present until probe completed */ - c->scache.flags |= MIPS_CACHE_NOT_PRESENT; - - /* Ignore anything but MIPSxx processors */ - if (c->isa_level != MIPS_CPU_ISA_M32R1 && - c->isa_level != MIPS_CPU_ISA_M32R2 && - c->isa_level != MIPS_CPU_ISA_M64R1 && - c->isa_level != MIPS_CPU_ISA_M64R2) - return 0; - - /* Does this MIPS32/MIPS64 CPU have a config2 register? */ - config1 = read_c0_config1(); - if (!(config1 & MIPS_CONF_M)) - return 0; - - config2 = read_c0_config2(); - tmp = (config2 >> 4) & 0x0f; - if (0 < tmp && tmp <= 7) - c->scache.linesz = 2 << tmp; - else - return 0; - - tmp = (config2 >> 8) & 0x0f; - if (0 <= tmp && tmp <= 7) - c->scache.sets = 64 << tmp; - else - return 0; - - tmp = (config2 >> 0) & 0x0f; - if (0 <= tmp && tmp <= 7) - c->scache.ways = tmp + 1; - else - return 0; - - c->scache.waysize = c->scache.sets * c->scache.linesz; - c->scache.waybit = __ffs(c->scache.waysize); - - c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; - - return 1; -} - -int __init mips_sc_init(void) -{ - int found = mips_sc_probe (); - if (found) { - mips_sc_enable(); - bcops = &mips_sc_ops; - } - return found; -} - diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 2cde1b772..9dca099ba 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c @@ -8,6 +8,7 @@ * Carsten Langgaard, carstenl@mips.com * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved. */ +#include #include #include #include @@ -412,6 +413,7 @@ out: return ret; } +extern void __init sanitize_tlb_entries(void); static void __init probe_tlb(unsigned long config) { struct cpuinfo_mips *c = ¤t_cpu_data; diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c index 266a47d65..1bfb09198 100644 --- a/arch/mips/mm/tlb-r8k.c +++ b/arch/mips/mm/tlb-r8k.c @@ -8,6 +8,7 @@ * Carsten Langgaard, carstenl@mips.com * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved. */ +#include #include #include #include diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 375e09915..54507be2a 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -5,7 +5,7 @@ * * Synthesize TLB refill handlers at runtime. * - * Copyright (C) 2004,2005,2006 by Thiemo Seufer + * Copyright (C) 2004,2005 by Thiemo Seufer * Copyright (C) 2005 Maciej W. Rozycki * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) * @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -35,6 +36,8 @@ #include #include +/* #define DEBUG_TLB */ + static __init int __attribute__((unused)) r45k_bvahwbug(void) { /* XXX: We should probe for the presence of this bug, but we don't. */ @@ -726,7 +729,6 @@ static void __init build_r3000_tlb_refill_handler(void) { long pgdc = (long)pgd_current; u32 *p; - int i; memset(tlb_handler, 0, sizeof(tlb_handler)); p = tlb_handler; @@ -752,14 +754,16 @@ static void __init build_r3000_tlb_refill_handler(void) if (p > tlb_handler + 32) panic("TLB refill handler space exceeded"); - pr_info("Synthesized TLB refill handler (%u instructions).\n", - (unsigned int)(p - tlb_handler)); + printk("Synthesized TLB refill handler (%u instructions).\n", + (unsigned int)(p - tlb_handler)); +#ifdef DEBUG_TLB + { + int i; - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - tlb_handler); i++) - pr_debug("\t.word 0x%08x\n", tlb_handler[i]); - pr_debug("\t.set pop\n"); + for (i = 0; i < (p - tlb_handler); i++) + printk("%08x\n", tlb_handler[i]); + } +#endif memcpy((void *)ebase, tlb_handler, 0x80); } @@ -1172,7 +1176,6 @@ static void __init build_r4000_tlb_refill_handler(void) struct reloc *r = relocs; u32 *f; unsigned int final_len; - int i; memset(tlb_handler, 0, sizeof(tlb_handler)); memset(labels, 0, sizeof(labels)); @@ -1270,21 +1273,24 @@ static void __init build_r4000_tlb_refill_handler(void) #endif /* CONFIG_64BIT */ resolve_relocs(relocs, labels); - pr_info("Synthesized TLB refill handler (%u instructions).\n", - final_len); + printk("Synthesized TLB refill handler (%u instructions).\n", + final_len); - f = final_handler; +#ifdef DEBUG_TLB + { + int i; + + f = final_handler; #ifdef CONFIG_64BIT - if (final_len > 32) - final_len = 64; - else - f = final_handler + 32; + if (final_len > 32) + final_len = 64; + else + f = final_handler + 32; #endif /* CONFIG_64BIT */ - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < final_len; i++) - pr_debug("\t.word 0x%08x\n", f[i]); - pr_debug("\t.set pop\n"); + for (i = 0; i < final_len; i++) + printk("%08x\n", f[i]); + } +#endif memcpy((void *)ebase, final_handler, 0x100); } @@ -1517,7 +1523,6 @@ static void __init build_r3000_tlb_load_handler(void) u32 *p = handle_tlbl; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbl, 0, sizeof(handle_tlbl)); memset(labels, 0, sizeof(labels)); @@ -1537,14 +1542,17 @@ static void __init build_r3000_tlb_load_handler(void) panic("TLB load handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB load handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbl)); + printk("Synthesized TLB load handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbl)); + +#ifdef DEBUG_TLB + { + int i; - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbl); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbl[i]); - pr_debug("\t.set pop\n"); + for (i = 0; i < (p - handle_tlbl); i++) + printk("%08x\n", handle_tlbl[i]); + } +#endif } static void __init build_r3000_tlb_store_handler(void) @@ -1552,7 +1560,6 @@ static void __init build_r3000_tlb_store_handler(void) u32 *p = handle_tlbs; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbs, 0, sizeof(handle_tlbs)); memset(labels, 0, sizeof(labels)); @@ -1572,14 +1579,17 @@ static void __init build_r3000_tlb_store_handler(void) panic("TLB store handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB store handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbs)); + printk("Synthesized TLB store handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbs)); - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbs); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbs[i]); - pr_debug("\t.set pop\n"); +#ifdef DEBUG_TLB + { + int i; + + for (i = 0; i < (p - handle_tlbs); i++) + printk("%08x\n", handle_tlbs[i]); + } +#endif } static void __init build_r3000_tlb_modify_handler(void) @@ -1587,7 +1597,6 @@ static void __init build_r3000_tlb_modify_handler(void) u32 *p = handle_tlbm; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbm, 0, sizeof(handle_tlbm)); memset(labels, 0, sizeof(labels)); @@ -1607,14 +1616,17 @@ static void __init build_r3000_tlb_modify_handler(void) panic("TLB modify handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbm)); + printk("Synthesized TLB modify handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbm)); - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbm); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbm[i]); - pr_debug("\t.set pop\n"); +#ifdef DEBUG_TLB + { + int i; + + for (i = 0; i < (p - handle_tlbm); i++) + printk("%08x\n", handle_tlbm[i]); + } +#endif } /* @@ -1666,7 +1678,6 @@ static void __init build_r4000_tlb_load_handler(void) u32 *p = handle_tlbl; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbl, 0, sizeof(handle_tlbl)); memset(labels, 0, sizeof(labels)); @@ -1694,14 +1705,17 @@ static void __init build_r4000_tlb_load_handler(void) panic("TLB load handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB load handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbl)); + printk("Synthesized TLB load handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbl)); + +#ifdef DEBUG_TLB + { + int i; - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbl); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbl[i]); - pr_debug("\t.set pop\n"); + for (i = 0; i < (p - handle_tlbl); i++) + printk("%08x\n", handle_tlbl[i]); + } +#endif } static void __init build_r4000_tlb_store_handler(void) @@ -1709,7 +1723,6 @@ static void __init build_r4000_tlb_store_handler(void) u32 *p = handle_tlbs; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbs, 0, sizeof(handle_tlbs)); memset(labels, 0, sizeof(labels)); @@ -1728,14 +1741,17 @@ static void __init build_r4000_tlb_store_handler(void) panic("TLB store handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB store handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbs)); + printk("Synthesized TLB store handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbs)); + +#ifdef DEBUG_TLB + { + int i; - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbs); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbs[i]); - pr_debug("\t.set pop\n"); + for (i = 0; i < (p - handle_tlbs); i++) + printk("%08x\n", handle_tlbs[i]); + } +#endif } static void __init build_r4000_tlb_modify_handler(void) @@ -1743,7 +1759,6 @@ static void __init build_r4000_tlb_modify_handler(void) u32 *p = handle_tlbm; struct label *l = labels; struct reloc *r = relocs; - int i; memset(handle_tlbm, 0, sizeof(handle_tlbm)); memset(labels, 0, sizeof(labels)); @@ -1763,14 +1778,17 @@ static void __init build_r4000_tlb_modify_handler(void) panic("TLB modify handler fastpath space exceeded"); resolve_relocs(relocs, labels); - pr_info("Synthesized TLB modify handler fastpath (%u instructions).\n", - (unsigned int)(p - handle_tlbm)); - - pr_debug("\t.set push\n"); - pr_debug("\t.set noreorder\n"); - for (i = 0; i < (p - handle_tlbm); i++) - pr_debug("\t.word 0x%08x\n", handle_tlbm[i]); - pr_debug("\t.set pop\n"); + printk("Synthesized TLB modify handler fastpath (%u instructions).\n", + (unsigned int)(p - handle_tlbm)); + +#ifdef DEBUG_TLB + { + int i; + + for (i = 0; i < (p - handle_tlbm); i++) + printk("%08x\n", handle_tlbm[i]); + } +#endif } void __init build_tlb_refill_handler(void) diff --git a/arch/mips/momentum/jaguar_atx/dbg_io.c b/arch/mips/momentum/jaguar_atx/dbg_io.c index b85a6521f..d7dea0a13 100644 --- a/arch/mips/momentum/jaguar_atx/dbg_io.c +++ b/arch/mips/momentum/jaguar_atx/dbg_io.c @@ -1,3 +1,4 @@ +#include #if defined(CONFIG_REMOTE_DEBUG) diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c index f9067469a..ec4032b38 100644 --- a/arch/mips/momentum/jaguar_atx/irq.c +++ b/arch/mips/momentum/jaguar_atx/irq.c @@ -71,7 +71,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs) } static struct irqaction cascade_mv64340 = { - no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL + no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL }; void __init arch_init_irq(void) diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c index 3d2712929..1cadaa929 100644 --- a/arch/mips/momentum/jaguar_atx/prom.c +++ b/arch/mips/momentum/jaguar_atx/prom.c @@ -16,6 +16,7 @@ * * Added changes for SMP - Manish Lachwani (lachwani@pmc-sierra.com) */ +#include #include #include #include diff --git a/arch/mips/momentum/jaguar_atx/reset.c b/arch/mips/momentum/jaguar_atx/reset.c index c73b0897d..ce9fb2e3d 100644 --- a/arch/mips/momentum/jaguar_atx/reset.c +++ b/arch/mips/momentum/jaguar_atx/reset.c @@ -14,6 +14,7 @@ * Louis Hamilton, Red Hat, Inc. * hamilton@redhat.com [MIPS64 modifications] */ +#include #include #include #include diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c index e6fe29922..1379c7684 100644 --- a/arch/mips/momentum/jaguar_atx/setup.c +++ b/arch/mips/momentum/jaguar_atx/setup.c @@ -39,6 +39,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -212,7 +213,7 @@ int m48t37y_set_time(unsigned long sec) return 0; } -void __init plat_timer_setup(struct irqaction *irq) +void momenco_timer_setup(struct irqaction *irq) { setup_irq(8, irq); } @@ -226,6 +227,7 @@ void momenco_time_init(void) wire_stupidity_into_tlb(); mips_hpt_frequency = cpu_clock / 2; + board_timer_setup = momenco_timer_setup; rtc_mips_get_time = m48t37y_get_time; rtc_mips_set_time = m48t37y_set_time; @@ -357,7 +359,7 @@ static __init int __init ja_pci_init(void) arch_initcall(ja_pci_init); -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned int tmpword; @@ -368,8 +370,8 @@ void __init plat_mem_setup(void) pm_power_off = momenco_jaguar_power_off; /* - * initrd_start = (unsigned long)jaguar_initrd_start; - * initrd_end = (unsigned long)jaguar_initrd_start + (ulong)jaguar_initrd_size; + * initrd_start = (ulong)jaguar_initrd_start; + * initrd_end = (ulong)jaguar_initrd_start + (ulong)jaguar_initrd_size; * initrd_below_start_ok = 1; */ diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c index 793782a9c..87c63c340 100644 --- a/arch/mips/momentum/ocelot_3/irq.c +++ b/arch/mips/momentum/ocelot_3/irq.c @@ -54,7 +54,7 @@ #include static struct irqaction cascade_mv64340 = { - no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL + no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL }; void __init arch_init_irq(void) diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c index 296d945bc..9803daa2a 100644 --- a/arch/mips/momentum/ocelot_3/prom.c +++ b/arch/mips/momentum/ocelot_3/prom.c @@ -21,6 +21,7 @@ * Author: Manish Lachwani, mlachwani@mvista.com * */ +#include #include #include #include diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c index 435d07873..c69195234 100644 --- a/arch/mips/momentum/ocelot_3/setup.c +++ b/arch/mips/momentum/ocelot_3/setup.c @@ -197,7 +197,7 @@ int m48t37y_set_time(unsigned long sec) return 0; } -void __init plat_timer_setup(struct irqaction *irq) +void momenco_timer_setup(struct irqaction *irq) { setup_irq(7, irq); /* Timer interrupt, unmask status IM7 */ } @@ -211,6 +211,7 @@ void momenco_time_init(void) * the Rm7900 and the Rm7065C */ mips_hpt_frequency = cpu_clock / 2; + board_timer_setup = momenco_timer_setup; rtc_mips_get_time = m48t37y_get_time; rtc_mips_set_time = m48t37y_set_time; @@ -312,7 +313,7 @@ static __init int __init ja_pci_init(void) arch_initcall(ja_pci_init); -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned int tmpword; diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c index a5dc23052..bd885785e 100644 --- a/arch/mips/momentum/ocelot_c/cpci-irq.c +++ b/arch/mips/momentum/ocelot_c/cpci-irq.c @@ -128,7 +128,7 @@ void ll_cpci_irq(struct pt_regs *regs) #define shutdown_cpci_irq disable_cpci_irq -struct irq_chip cpci_irq_type = { +struct hw_interrupt_type cpci_irq_type = { .typename = "CPCI/FPGA", .startup = startup_cpci_irq, .shutdown = shutdown_cpci_irq, @@ -147,6 +147,6 @@ void cpci_irq_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 2; - irq_desc[i].chip = &cpci_irq_type; + irq_desc[i].handler = &cpci_irq_type; } } diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c index 212868458..f0a6a38fc 100644 --- a/arch/mips/momentum/ocelot_c/dbg_io.c +++ b/arch/mips/momentum/ocelot_c/dbg_io.c @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_KGDB diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c index 9d44ae1e1..86f61ce59 100644 --- a/arch/mips/momentum/ocelot_c/irq.c +++ b/arch/mips/momentum/ocelot_c/irq.c @@ -52,11 +52,11 @@ extern void uart_irq_init(void); extern void cpci_irq_init(void); static struct irqaction cascade_fpga = { - no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL + no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL }; static struct irqaction cascade_mv64340 = { - no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL + no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL }; extern void ll_uart_irq(struct pt_regs *regs); diff --git a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h index 7228cd19e..97fb77dad 100644 --- a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h +++ b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h @@ -30,6 +30,7 @@ #ifndef __OCELOT_C_FPGA_H__ #define __OCELOT_C_FPGA_H__ +#include #ifdef CONFIG_64BIT #define OCELOT_C_CS0_ADDR (0xfffffffffc000000) diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c index 4c50a147f..e92364482 100644 --- a/arch/mips/momentum/ocelot_c/prom.c +++ b/arch/mips/momentum/ocelot_c/prom.c @@ -14,6 +14,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/mips/momentum/ocelot_c/reset.c b/arch/mips/momentum/ocelot_c/reset.c index 3fdcb64ff..9dcd154c7 100644 --- a/arch/mips/momentum/ocelot_c/reset.c +++ b/arch/mips/momentum/ocelot_c/reset.c @@ -14,6 +14,7 @@ * Louis Hamilton, Red Hat, Inc. * hamilton@redhat.com [MIPS64 modifications] */ +#include #include #include #include diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c index 36f570ecc..a3e6f5575 100644 --- a/arch/mips/momentum/ocelot_c/setup.c +++ b/arch/mips/momentum/ocelot_c/setup.c @@ -40,6 +40,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ +#include #include #include #include @@ -209,7 +210,7 @@ int m48t37y_set_time(unsigned long sec) return 0; } -void __init plat_timer_setup(struct irqaction *irq) +void momenco_timer_setup(struct irqaction *irq) { setup_irq(7, irq); } @@ -224,12 +225,13 @@ void momenco_time_init(void) #error Unknown CPU for this board #endif printk("momenco_time_init cpu_clock=%d\n", cpu_clock); + board_timer_setup = momenco_timer_setup; rtc_mips_get_time = m48t37y_get_time; rtc_mips_set_time = m48t37y_set_time; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { unsigned int tmpword; @@ -240,8 +242,8 @@ void __init plat_mem_setup(void) pm_power_off = momenco_ocelot_power_off; /* - * initrd_start = (unsigned long)ocelot_initrd_start; - * initrd_end = (unsigned long)ocelot_initrd_start + (ulong)ocelot_initrd_size; + * initrd_start = (ulong)ocelot_initrd_start; + * initrd_end = (ulong)ocelot_initrd_start + (ulong)ocelot_initrd_size; * initrd_below_start_ok = 1; */ diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c index 9f33d8f1d..755bde514 100644 --- a/arch/mips/momentum/ocelot_c/uart-irq.c +++ b/arch/mips/momentum/ocelot_c/uart-irq.c @@ -121,7 +121,7 @@ void ll_uart_irq(struct pt_regs *regs) #define shutdown_uart_irq disable_uart_irq -struct irq_chip uart_irq_type = { +struct hw_interrupt_type uart_irq_type = { .typename = "UART/FPGA", .startup = startup_uart_irq, .shutdown = shutdown_uart_irq, @@ -137,10 +137,10 @@ void uart_irq_init(void) irq_desc[80].status = IRQ_DISABLED; irq_desc[80].action = 0; irq_desc[80].depth = 2; - irq_desc[80].chip = &uart_irq_type; + irq_desc[80].handler = &uart_irq_type; irq_desc[81].status = IRQ_DISABLED; irq_desc[81].action = 0; irq_desc[81].depth = 2; - irq_desc[81].chip = &uart_irq_type; + irq_desc[81].handler = &uart_irq_type; } diff --git a/arch/mips/momentum/ocelot_g/dbg_io.c b/arch/mips/momentum/ocelot_g/dbg_io.c index 212868458..f0a6a38fc 100644 --- a/arch/mips/momentum/ocelot_g/dbg_io.c +++ b/arch/mips/momentum/ocelot_g/dbg_io.c @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_KGDB diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c index 9fb2493ff..e5eceed1b 100644 --- a/arch/mips/momentum/ocelot_g/gt-irq.c +++ b/arch/mips/momentum/ocelot_g/gt-irq.c @@ -11,6 +11,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -58,7 +59,7 @@ void hook_irq_handler(int int_cause, int bit_num, void *isr_ptr) * bit_num - Indicates which bit number in the cause register * * Outputs : - * 1 if successful, 0 if failure + * 1 if succesful, 0 if failure */ int enable_galileo_irq(int int_cause, int bit_num) { @@ -82,7 +83,7 @@ int enable_galileo_irq(int int_cause, int bit_num) * bit_num - Indicates which bit number in the cause register * * Outputs : - * 1 if successful, 0 if failure + * 1 if succesful, 0 if failure */ int disable_galileo_irq(int int_cause, int bit_num) { @@ -173,7 +174,7 @@ void gt64240_time_init(void) * the values to the correct interrupt line. */ timer.handler = >64240_p0int_irq; - timer.flags = IRQF_SHARED | IRQF_DISABLED; + timer.flags = SA_SHIRQ | SA_INTERRUPT; timer.name = "timer"; timer.dev_id = NULL; timer.next = NULL; diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c index 6509a9c98..6b4f577c2 100644 --- a/arch/mips/momentum/ocelot_g/prom.c +++ b/arch/mips/momentum/ocelot_g/prom.c @@ -11,6 +11,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c index c580b1de3..fed4e8eee 100644 --- a/arch/mips/momentum/ocelot_g/setup.c +++ b/arch/mips/momentum/ocelot_g/setup.c @@ -37,6 +37,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ +#include #include #include #include @@ -161,7 +162,7 @@ static void __init setup_l3cache(unsigned long size) printk("Done\n"); } -void __init plat_mem_setup(void) +void __init plat_setup(void) { void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache); unsigned int tmpword; @@ -173,8 +174,8 @@ void __init plat_mem_setup(void) pm_power_off = momenco_ocelot_power_off; /* - * initrd_start = (unsigned long)ocelot_initrd_start; - * initrd_end = (unsigned long)ocelot_initrd_start + (ulong)ocelot_initrd_size; + * initrd_start = (ulong)ocelot_initrd_start; + * initrd_end = (ulong)ocelot_initrd_start + (ulong)ocelot_initrd_size; * initrd_below_start_ok = 1; */ diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 65eb55400..c31e4cff6 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c @@ -38,7 +38,7 @@ static int op_mips_create_files(struct super_block * sb, struct dentry * root) for (i = 0; i < model->num_counters; ++i) { struct dentry *dir; - char buf[4]; + char buf[3]; snprintf(buf, sizeof buf, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index a175d6735..f26a00e13 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c @@ -12,72 +12,16 @@ #include "op_impl.h" -#define M_PERFCTL_EXL (1UL << 0) -#define M_PERFCTL_KERNEL (1UL << 1) -#define M_PERFCTL_SUPERVISOR (1UL << 2) -#define M_PERFCTL_USER (1UL << 3) -#define M_PERFCTL_INTERRUPT_ENABLE (1UL << 4) -#define M_PERFCTL_EVENT(event) ((event) << 5) -#define M_PERFCTL_VPEID(vpe) ((vpe) << 16) -#define M_PERFCTL_MT_EN(filter) ((filter) << 20) -#define M_TC_EN_ALL M_PERFCTL_MT_EN(0) -#define M_TC_EN_VPE M_PERFCTL_MT_EN(1) -#define M_TC_EN_TC M_PERFCTL_MT_EN(2) -#define M_PERFCTL_TCID(tcid) ((tcid) << 22) -#define M_PERFCTL_WIDE (1UL << 30) -#define M_PERFCTL_MORE (1UL << 31) - -#define M_COUNTER_OVERFLOW (1UL << 31) - -#ifdef CONFIG_MIPS_MT_SMP -#define WHAT (M_TC_EN_VPE | M_PERFCTL_VPEID(smp_processor_id())) -#else -#define WHAT 0 -#endif +#define M_PERFCTL_EXL (1UL << 0) +#define M_PERFCTL_KERNEL (1UL << 1) +#define M_PERFCTL_SUPERVISOR (1UL << 2) +#define M_PERFCTL_USER (1UL << 3) +#define M_PERFCTL_INTERRUPT_ENABLE (1UL << 4) +#define M_PERFCTL_EVENT(event) ((event) << 5) +#define M_PERFCTL_WIDE (1UL << 30) +#define M_PERFCTL_MORE (1UL << 31) -#define __define_perf_accessors(r, n, np) \ - \ -static inline unsigned int r_c0_ ## r ## n(void) \ -{ \ - unsigned int cpu = smp_processor_id(); \ - \ - switch (cpu) { \ - case 0: \ - return read_c0_ ## r ## n(); \ - case 1: \ - return read_c0_ ## r ## np(); \ - default: \ - BUG(); \ - } \ - return 0; \ -} \ - \ -static inline void w_c0_ ## r ## n(unsigned int value) \ -{ \ - unsigned int cpu = smp_processor_id(); \ - \ - switch (cpu) { \ - case 0: \ - write_c0_ ## r ## n(value); \ - return; \ - case 1: \ - write_c0_ ## r ## np(value); \ - return; \ - default: \ - BUG(); \ - } \ - return; \ -} \ - -__define_perf_accessors(perfcntr, 0, 2) -__define_perf_accessors(perfcntr, 1, 3) -__define_perf_accessors(perfcntr, 2, 2) -__define_perf_accessors(perfcntr, 3, 2) - -__define_perf_accessors(perfctrl, 0, 2) -__define_perf_accessors(perfctrl, 1, 3) -__define_perf_accessors(perfctrl, 2, 2) -__define_perf_accessors(perfctrl, 3, 2) +#define M_COUNTER_OVERFLOW (1UL << 31) struct op_mips_model op_model_mipsxx_ops; @@ -122,17 +66,17 @@ static void mipsxx_cpu_setup (void *args) switch (counters) { case 4: - w_c0_perfctrl3(0); - w_c0_perfcntr3(reg.counter[3]); + write_c0_perfctrl3(0); + write_c0_perfcntr3(reg.counter[3]); case 3: - w_c0_perfctrl2(0); - w_c0_perfcntr2(reg.counter[2]); + write_c0_perfctrl2(0); + write_c0_perfcntr2(reg.counter[2]); case 2: - w_c0_perfctrl1(0); - w_c0_perfcntr1(reg.counter[1]); + write_c0_perfctrl1(0); + write_c0_perfcntr1(reg.counter[1]); case 1: - w_c0_perfctrl0(0); - w_c0_perfcntr0(reg.counter[0]); + write_c0_perfctrl0(0); + write_c0_perfcntr0(reg.counter[0]); } } @@ -143,13 +87,13 @@ static void mipsxx_cpu_start(void *args) switch (counters) { case 4: - w_c0_perfctrl3(WHAT | reg.control[3]); + write_c0_perfctrl3(reg.control[3]); case 3: - w_c0_perfctrl2(WHAT | reg.control[2]); + write_c0_perfctrl2(reg.control[2]); case 2: - w_c0_perfctrl1(WHAT | reg.control[1]); + write_c0_perfctrl1(reg.control[1]); case 1: - w_c0_perfctrl0(WHAT | reg.control[0]); + write_c0_perfctrl0(reg.control[0]); } } @@ -160,13 +104,13 @@ static void mipsxx_cpu_stop(void *args) switch (counters) { case 4: - w_c0_perfctrl3(0); + write_c0_perfctrl3(0); case 3: - w_c0_perfctrl2(0); + write_c0_perfctrl2(0); case 2: - w_c0_perfctrl1(0); + write_c0_perfctrl1(0); case 1: - w_c0_perfctrl0(0); + write_c0_perfctrl0(0); } } @@ -180,12 +124,12 @@ static int mipsxx_perfcount_handler(struct pt_regs *regs) switch (counters) { #define HANDLE_COUNTER(n) \ case n + 1: \ - control = r_c0_perfctrl ## n(); \ - counter = r_c0_perfcntr ## n(); \ + control = read_c0_perfctrl ## n(); \ + counter = read_c0_perfcntr ## n(); \ if ((control & M_PERFCTL_INTERRUPT_ENABLE) && \ (counter & M_COUNTER_OVERFLOW)) { \ oprofile_add_sample(regs, n); \ - w_c0_perfcntr ## n(reg.counter[n]); \ + write_c0_perfcntr ## n(reg.counter[n]); \ handled = 1; \ } HANDLE_COUNTER(3) @@ -199,47 +143,35 @@ static int mipsxx_perfcount_handler(struct pt_regs *regs) #define M_CONFIG1_PC (1 << 4) -static inline int __n_counters(void) +static inline int n_counters(void) { if (!(read_c0_config1() & M_CONFIG1_PC)) return 0; - if (!(r_c0_perfctrl0() & M_PERFCTL_MORE)) + if (!(read_c0_perfctrl0() & M_PERFCTL_MORE)) return 1; - if (!(r_c0_perfctrl1() & M_PERFCTL_MORE)) + if (!(read_c0_perfctrl1() & M_PERFCTL_MORE)) return 2; - if (!(r_c0_perfctrl2() & M_PERFCTL_MORE)) + if (!(read_c0_perfctrl2() & M_PERFCTL_MORE)) return 3; return 4; } -static inline int n_counters(void) -{ - int counters = __n_counters(); - -#ifndef CONFIG_SMP - if (current_cpu_data.cputype == CPU_34K) - return counters >> 1; -#endif - - return counters; -} - static inline void reset_counters(int counters) { switch (counters) { case 4: - w_c0_perfctrl3(0); - w_c0_perfcntr3(0); + write_c0_perfctrl3(0); + write_c0_perfcntr3(0); case 3: - w_c0_perfctrl2(0); - w_c0_perfcntr2(0); + write_c0_perfctrl2(0); + write_c0_perfcntr2(0); case 2: - w_c0_perfctrl1(0); - w_c0_perfcntr1(0); + write_c0_perfctrl1(0); + write_c0_perfcntr1(0); case 1: - w_c0_perfctrl0(0); - w_c0_perfcntr0(0); + write_c0_perfctrl0(0); + write_c0_perfcntr0(0); } } @@ -269,6 +201,7 @@ static int __init mipsxx_init(void) op_model_mipsxx_ops.cpu_type = "mips/25K"; break; +#ifndef CONFIG_SMP case CPU_34K: op_model_mipsxx_ops.cpu_type = "mips/34K"; break; @@ -276,6 +209,7 @@ static int __init mipsxx_init(void) case CPU_74K: op_model_mipsxx_ops.cpu_type = "mips/74K"; break; +#endif case CPU_5KC: op_model_mipsxx_ops.cpu_type = "mips/5K"; diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 35d592770..16205b587 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile @@ -18,12 +18,12 @@ obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o obj-$(CONFIG_MIPS_TX3927) += ops-tx3927.o obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o obj-$(CONFIG_NEC_CMBVR4133) += fixup-vr4133.o -obj-$(CONFIG_MARKEINS) += ops-emma2rh.o pci-emma2rh.o fixup-emma2rh.o # # These are still pretty much in the old state, watch, go blind. # -obj-$(CONFIG_BASLER_EXCITE) += ops-titan.o pci-excite.o fixup-excite.o +obj-$(CONFIG_DDB5074) += fixup-ddb5074.o pci-ddb5074.o ops-ddb5074.o +obj-$(CONFIG_DDB5476) += ops-ddb5476.o pci-ddb5476.o obj-$(CONFIG_DDB5477) += fixup-ddb5477.o pci-ddb5477.o ops-ddb5477.o obj-$(CONFIG_LASAT) += pci-lasat.o obj-$(CONFIG_MIPS_ATLAS) += fixup-atlas.o @@ -43,7 +43,7 @@ obj-$(CONFIG_MOMENCO_OCELOT_C) += fixup-ocelot-c.o pci-ocelot-c.o obj-$(CONFIG_MOMENCO_OCELOT_G) += fixup-ocelot-g.o pci-ocelot-g.o obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \ pci-yosemite.o -obj-$(CONFIG_SGI_IP27) += ops-bridge.o pci-ip27.o +obj-$(CONFIG_SGI_IP27) += pci-ip27.o obj-$(CONFIG_SGI_IP32) += fixup-ip32.o ops-mace.o pci-ip32.o obj-$(CONFIG_SIBYTE_SB1250) += fixup-sb1250.o pci-sb1250.o obj-$(CONFIG_SIBYTE_BCM112X) += fixup-sb1250.o pci-sb1250.o @@ -57,4 +57,3 @@ obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o ops-tx4927.o obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o -obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o diff --git a/arch/mips/pci/fixup-atlas.c b/arch/mips/pci/fixup-atlas.c index 439510af3..87920b245 100644 --- a/arch/mips/pci/fixup-atlas.c +++ b/arch/mips/pci/fixup-atlas.c @@ -16,6 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include diff --git a/arch/mips/pci/fixup-ddb5074.c b/arch/mips/pci/fixup-ddb5074.c new file mode 100644 index 000000000..5a4a7c239 --- /dev/null +++ b/arch/mips/pci/fixup-ddb5074.c @@ -0,0 +1,21 @@ +/* + * It's nice to have the LEDs on the GPIO pins available for debugging + */ +static void ddb5074_fixup(struct pci_dev *dev) +{ + extern struct pci_dev *pci_pmu; + u8 t8; + + pci_pmu = dev; /* for LEDs D2 and D3 */ + /* Program the lines for LEDs D2 and D3 to output */ + pci_read_config_byte(dev, 0x7d, &t8); + t8 |= 0xc0; + pci_write_config_byte(dev, 0x7d, t8); + /* Turn LEDs D2 and D3 off */ + pci_read_config_byte(dev, 0x7e, &t8); + t8 |= 0xc0; + pci_write_config_byte(dev, 0x7e, t8); +} + +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, + ddb5074_fixup); diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c deleted file mode 100644 index 7abcfd175..000000000 --- a/arch/mips/pci/fixup-emma2rh.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * arch/mips/pci/fixup-emma2rh.c - * This file defines the PCI configration. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c - * - * Copyright 2001 MontaVista Software 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 - */ - -#include -#include -#include -#include - -#include -#include - -#include - -#define EMMA2RH_PCI_HOST_SLOT 0x09 -#define EMMA2RH_USB_SLOT 0x03 -#define PCI_DEVICE_ID_NEC_EMMA2RH 0x014b /* EMMA2RH PCI Host */ - -/* - * we fix up irqs based on the slot number. - * The first entry is at AD:11. - * Fortunately this works because, although we have two pci buses, - * they all have different slot numbers (except for rockhopper slot 20 - * which is handled below). - * - */ - -#define MAX_SLOT_NUM 10 -static unsigned char irq_map[][5] __initdata = { - [3] = {0, MARKEINS_PCI_IRQ_INTB, MARKEINS_PCI_IRQ_INTC, - MARKEINS_PCI_IRQ_INTD, 0,}, - [4] = {0, MARKEINS_PCI_IRQ_INTA, 0, 0, 0,}, - [5] = {0, 0, 0, 0, 0,}, - [6] = {0, MARKEINS_PCI_IRQ_INTC, MARKEINS_PCI_IRQ_INTD, - MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,}, -}; - -static void __devinit nec_usb_controller_fixup(struct pci_dev *dev) -{ - if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) - /* on board USB controller configuration */ - pci_write_config_dword(dev, 0xe4, 1 << 5); -} - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, - nec_usb_controller_fixup); - -/* - * Prevent the PCI layer from seeing the resources allocated to this device - * if it is the host bridge by marking it as such. These resources are of - * no consequence to the PCI layer (they are handled elsewhere). - */ -static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev) -{ - int i; - - if (PCI_SLOT(dev->devfn) == EMMA2RH_PCI_HOST_SLOT) { - dev->class &= 0xff; - dev->class |= PCI_CLASS_BRIDGE_HOST << 8; - for (i = 0; i < PCI_NUM_RESOURCES; i++) { - dev->resource[i].start = 0; - dev->resource[i].end = 0; - dev->resource[i].flags = 0; - } - } -} - -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH, - emma2rh_pci_host_fixup); - -int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - return irq_map[slot][pin]; -} - -/* Do platform specific device initialization at pci_enable_device() time */ -int pcibios_plat_dev_init(struct pci_dev *dev) -{ - return 0; -} diff --git a/arch/mips/pci/fixup-excite.c b/arch/mips/pci/fixup-excite.c deleted file mode 100644 index 1da696d43..000000000 --- a/arch/mips/pci/fixup-excite.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2004 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include - -int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - if (pin == 0) - return -1; - - return USB_IRQ; /* USB controller is the only PCI device */ -} - -/* Do platform specific device initialization at pci_enable_device() time */ -int pcibios_plat_dev_init(struct pci_dev *dev) -{ - return 0; -} diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c index 3c9ae41f7..b67ddaa47 100644 --- a/arch/mips/pci/fixup-mpc30x.c +++ b/arch/mips/pci/fixup-mpc30x.c @@ -21,6 +21,7 @@ #include #include +#include static const int internal_func_irqs[] __initdata = { VRC4173_CASCADE_IRQ, diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c index 8e01d0c1b..a8a47b494 100644 --- a/arch/mips/pci/fixup-vr4133.c +++ b/arch/mips/pci/fixup-vr4133.c @@ -15,6 +15,7 @@ * Author: Manish Lachwani (mlachwani@mvista.com) * */ +#include #include #include diff --git a/arch/mips/pci/fixup-wrppmc.c b/arch/mips/pci/fixup-wrppmc.c deleted file mode 100644 index 3357c1300..000000000 --- a/arch/mips/pci/fixup-wrppmc.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * fixup-wrppmc.c: PPMC board specific PCI fixup - * - * 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) 2006, Wind River Inc. Rongkai.zhan (rongkai.zhan@windriver.com) - */ -#include -#include -#include - -/* PCI interrupt pins */ -#define PCI_INTA 1 -#define PCI_INTB 2 -#define PCI_INTC 3 -#define PCI_INTD 4 - -#define PCI_SLOT_MAXNR 32 /* Each PCI bus has 32 physical slots */ - -static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = { - /* 0 INTA INTB INTC INTD */ - [0] = {0, 0, 0, 0, 0}, /* Slot 0: GT64120 PCI bridge */ - [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0}, -}; - -int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - return pci_irq_tab[slot][pin]; -} - -/* Do platform specific device initialization at pci_enable_device() time */ -int pcibios_plat_dev_init(struct pci_dev *dev) -{ - return 0; -} diff --git a/arch/mips/pci/ops-au1000.c b/arch/mips/pci/ops-au1000.c index 0c0c1e651..be1420126 100644 --- a/arch/mips/pci/ops-au1000.c +++ b/arch/mips/pci/ops-au1000.c @@ -28,6 +28,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c deleted file mode 100644 index 1fa09929c..000000000 --- a/arch/mips/pci/ops-bridge.c +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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) 1999, 2000, 04, 06 Ralf Baechle (ralf@linux-mips.org) - * Copyright (C) 1999, 2000 Silicon Graphics, Inc. - */ -#include -#include -#include -#include -#include -#include - -/* - * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is - * not really documented, so right now I can't write code which uses it. - * Therefore we use type 0 accesses for now even though they won't work - * correcly for PCI-to-PCI bridges. - * - * The function is complicated by the ultimate brokeness of the IOC3 chip - * which is used in SGI systems. The IOC3 can only handle 32-bit PCI - * accesses and does only decode parts of it's address space. - */ - -static int pci_conf0_read_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 * value) -{ - struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); - bridge_t *bridge = bc->base; - int slot = PCI_SLOT(devfn); - int fn = PCI_FUNC(devfn); - volatile void *addr; - u32 cf, shift, mask; - int res; - - addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[PCI_VENDOR_ID]; - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at it for real ... - */ - if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) - goto oh_my_gawd; - - addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[where ^ (4 - size)]; - - if (size == 1) - res = get_dbe(*value, (u8 *) addr); - else if (size == 2) - res = get_dbe(*value, (u16 *) addr); - else - res = get_dbe(*value, (u32 *) addr); - - return res ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; - -oh_my_gawd: - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at the wrong register. - */ - if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { - *value = 0; - return PCIBIOS_SUCCESSFUL; - } - - /* - * IOC3 is fucked fucked beyond believe ... Don't try to access - * anything but 32-bit words ... - */ - addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; - - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - shift = ((where & 3) << 3); - mask = (0xffffffffU >> ((4 - size) << 3)); - *value = (cf >> shift) & mask; - - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_read_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 * value) -{ - struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); - bridge_t *bridge = bc->base; - int busno = bus->number; - int slot = PCI_SLOT(devfn); - int fn = PCI_FUNC(devfn); - volatile void *addr; - u32 cf, shift, mask; - int res; - - bridge->b_pci_cfg = (busno << 16) | (slot << 11); - addr = &bridge->b_type1_cfg.c[(fn << 8) | PCI_VENDOR_ID]; - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at it for real ... - */ - if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) - goto oh_my_gawd; - - bridge->b_pci_cfg = (busno << 16) | (slot << 11); - addr = &bridge->b_type1_cfg.c[(fn << 8) | (where ^ (4 - size))]; - - if (size == 1) - res = get_dbe(*value, (u8 *) addr); - else if (size == 2) - res = get_dbe(*value, (u16 *) addr); - else - res = get_dbe(*value, (u32 *) addr); - - return res ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; - -oh_my_gawd: - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at the wrong register. - */ - if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { - *value = 0; - return PCIBIOS_SUCCESSFUL; - } - - /* - * IOC3 is fucked fucked beyond believe ... Don't try to access - * anything but 32-bit words ... - */ - bridge->b_pci_cfg = (busno << 16) | (slot << 11); - addr = &bridge->b_type1_cfg.c[(fn << 8) | where]; - - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - shift = ((where & 3) << 3); - mask = (0xffffffffU >> ((4 - size) << 3)); - *value = (cf >> shift) & mask; - - return PCIBIOS_SUCCESSFUL; -} - -static int pci_read_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 * value) -{ - if (bus->number > 0) - return pci_conf1_read_config(bus, devfn, where, size, value); - - return pci_conf0_read_config(bus, devfn, where, size, value); -} - -static int pci_conf0_write_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 value) -{ - struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); - bridge_t *bridge = bc->base; - int slot = PCI_SLOT(devfn); - int fn = PCI_FUNC(devfn); - volatile void *addr; - u32 cf, shift, mask, smask; - int res; - - addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[PCI_VENDOR_ID]; - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at it for real ... - */ - if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) - goto oh_my_gawd; - - addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[where ^ (4 - size)]; - - if (size == 1) { - res = put_dbe(value, (u8 *) addr); - } else if (size == 2) { - res = put_dbe(value, (u16 *) addr); - } else { - res = put_dbe(value, (u32 *) addr); - } - - if (res) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; - -oh_my_gawd: - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to touch the wrong register. - */ - if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) - return PCIBIOS_SUCCESSFUL; - - /* - * IOC3 is fucked fucked beyond believe ... Don't try to access - * anything but 32-bit words ... - */ - addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; - - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - shift = ((where & 3) << 3); - mask = (0xffffffffU >> ((4 - size) << 3)); - smask = mask << shift; - - cf = (cf & ~smask) | ((value & mask) << shift); - if (put_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; -} - -static int pci_conf1_write_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 value) -{ - struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); - bridge_t *bridge = bc->base; - int slot = PCI_SLOT(devfn); - int fn = PCI_FUNC(devfn); - int busno = bus->number; - volatile void *addr; - u32 cf, shift, mask, smask; - int res; - - bridge->b_pci_cfg = (busno << 16) | (slot << 11); - addr = &bridge->b_type1_cfg.c[(fn << 8) | PCI_VENDOR_ID]; - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to look at it for real ... - */ - if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) - goto oh_my_gawd; - - addr = &bridge->b_type1_cfg.c[(fn << 8) | (where ^ (4 - size))]; - - if (size == 1) { - res = put_dbe(value, (u8 *) addr); - } else if (size == 2) { - res = put_dbe(value, (u16 *) addr); - } else { - res = put_dbe(value, (u32 *) addr); - } - - if (res) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; - -oh_my_gawd: - - /* - * IOC3 is fucked fucked beyond believe ... Don't even give the - * generic PCI code a chance to touch the wrong register. - */ - if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) - return PCIBIOS_SUCCESSFUL; - - /* - * IOC3 is fucked fucked beyond believe ... Don't try to access - * anything but 32-bit words ... - */ - addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; - - if (get_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - shift = ((where & 3) << 3); - mask = (0xffffffffU >> ((4 - size) << 3)); - smask = mask << shift; - - cf = (cf & ~smask) | ((value & mask) << shift); - if (put_dbe(cf, (u32 *) addr)) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; -} - -static int pci_write_config(struct pci_bus *bus, unsigned int devfn, - int where, int size, u32 value) -{ - if (bus->number > 0) - return pci_conf1_write_config(bus, devfn, where, size, value); - - return pci_conf0_write_config(bus, devfn, where, size, value); -} - -struct pci_ops bridge_pci_ops = { - .read = pci_read_config, - .write = pci_write_config, -}; diff --git a/arch/mips/pci/ops-ddb5074.c b/arch/mips/pci/ops-ddb5074.c new file mode 100644 index 000000000..89f97bef4 --- /dev/null +++ b/arch/mips/pci/ops-ddb5074.c @@ -0,0 +1,271 @@ +/* + * Copyright 2001 MontaVista Software Inc. + * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net + * + * arch/mips/ddb5xxx/ddb5476/pci_ops.c + * Define the pci_ops for DB5477. + * + * Much of the code is derived from the original DDB5074 port by + * Geert Uytterhoeven + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include + +#include +#include + +#include + +/* + * config_swap structure records what set of pdar/pmr are used + * to access pci config space. It also provides a place hold the + * original values for future restoring. + */ +struct pci_config_swap { + u32 pdar; + u32 pmr; + u32 config_base; + u32 config_size; + u32 pdar_backup; + u32 pmr_backup; +}; + +/* + * On DDB5476, we have one set of swap registers + */ +struct pci_config_swap ext_pci_swap = { + DDB_PCIW0, + DDB_PCIINIT0, + DDB_PCI_CONFIG_BASE, + DDB_PCI_CONFIG_SIZE +}; + +static int pci_config_workaround = 1; + +/* + * access config space + */ +static inline u32 ddb_access_config_base(struct pci_config_swap *swap, u32 bus, /* 0 means top level bus */ + u32 slot_num) +{ + u32 pci_addr = 0; + u32 pciinit_offset = 0; + u32 virt_addr = swap->config_base; + u32 option; + + if (pci_config_workaround) { + if (slot_num == 5) + slot_num = 14; + } else { + if (slot_num == 5) + return DDB_BASE + DDB_PCI_BASE; + } + + /* minimum pdar (window) size is 2MB */ + db_assert(swap->config_size >= (2 << 20)); + + db_assert(slot_num < (1 << 5)); + db_assert(bus < (1 << 8)); + + /* backup registers */ + swap->pdar_backup = ddb_in32(swap->pdar); + swap->pmr_backup = ddb_in32(swap->pmr); + + /* set the pdar (pci window) register */ + ddb_set_pdar(swap->pdar, swap->config_base, swap->config_size, 32, /* 32 bit wide */ + 0, /* not on local memory bus */ + 0); /* not visible from PCI bus (N/A) */ + + /* + * calcuate the absolute pci config addr; + * according to the spec, we start scanning from adr:11 (0x800) + */ + if (bus == 0) { + /* type 0 config */ + pci_addr = 0x00040000 << slot_num; + } else { + /* type 1 config */ + pci_addr = 0x00040000 << slot_num; + panic + ("ddb_access_config_base: we don't support type 1 config Yet"); + } + + /* + * if pci_addr is less than pci config window size, we set + * pciinit_offset to 0 and adjust the virt_address. + * Otherwise we will try to adjust pciinit_offset. + */ + if (pci_addr < swap->config_size) { + virt_addr = KSEG1ADDR(swap->config_base + pci_addr); + pciinit_offset = 0; + } else { + db_assert((pci_addr & (swap->config_size - 1)) == 0); + virt_addr = KSEG1ADDR(swap->config_base); + pciinit_offset = pci_addr; + } + + /* set the pmr register */ + option = DDB_PCI_ACCESS_32; + if (bus != 0) + option |= DDB_PCI_CFGTYPE1; + ddb_set_pmr(swap->pmr, DDB_PCICMD_CFG, pciinit_offset, option); + + return virt_addr; +} + +static inline void ddb_close_config_base(struct pci_config_swap *swap) +{ + ddb_out32(swap->pdar, swap->pdar_backup); + ddb_out32(swap->pmr, swap->pmr_backup); +} + +static int read_config_dword(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u32 * val) +{ + u32 bus, slot_num, func_num; + u32 base; + + db_assert((where & 3) == 0); + db_assert(where < (1 << 8)); + + /* check if the bus is top-level */ + if (dev->bus->parent != NULL) { + bus = dev->bus->number; + db_assert(bus != 0); + } else { + bus = 0; + } + + slot_num = PCI_SLOT(dev->devfn); + func_num = PCI_FUNC(dev->devfn); + base = ddb_access_config_base(swap, bus, slot_num); + *val = *(volatile u32 *) (base + (func_num << 8) + where); + ddb_close_config_base(swap); + return PCIBIOS_SUCCESSFUL; +} + +static int read_config_word(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u16 * val) +{ + int status; + u32 result; + + db_assert((where & 1) == 0); + + status = read_config_dword(swap, dev, where & ~3, &result); + if (where & 2) + result >>= 16; + *val = result & 0xffff; + return status; +} + +static int read_config_byte(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u8 * val) +{ + int status; + u32 result; + + status = read_config_dword(swap, dev, where & ~3, &result); + if (where & 1) + result >>= 8; + if (where & 2) + result >>= 16; + *val = result & 0xff; + return status; +} + +static int write_config_dword(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u32 val) +{ + u32 bus, slot_num, func_num; + u32 base; + + db_assert((where & 3) == 0); + db_assert(where < (1 << 8)); + + /* check if the bus is top-level */ + if (dev->bus->parent != NULL) { + bus = dev->bus->number; + db_assert(bus != 0); + } else { + bus = 0; + } + + slot_num = PCI_SLOT(dev->devfn); + func_num = PCI_FUNC(dev->devfn); + base = ddb_access_config_base(swap, bus, slot_num); + *(volatile u32 *) (base + (func_num << 8) + where) = val; + ddb_close_config_base(swap); + return PCIBIOS_SUCCESSFUL; +} + +static int write_config_word(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u16 val) +{ + int status, shift = 0; + u32 result; + + db_assert((where & 1) == 0); + + status = read_config_dword(swap, dev, where & ~3, &result); + if (status != PCIBIOS_SUCCESSFUL) + return status; + + if (where & 2) + shift += 16; + result &= ~(0xffff << shift); + result |= val << shift; + return write_config_dword(swap, dev, where & ~3, result); +} + +static int write_config_byte(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u8 val) +{ + int status, shift = 0; + u32 result; + + status = read_config_dword(swap, dev, where & ~3, &result); + if (status != PCIBIOS_SUCCESSFUL) + return status; + + if (where & 2) + shift += 16; + if (where & 1) + shift += 8; + result &= ~(0xff << shift); + result |= val << shift; + return write_config_dword(swap, dev, where & ~3, result); +} + +#define MAKE_PCI_OPS(prefix, rw, unitname, unittype, pciswap) \ +static int prefix##_##rw##_config_##unitname(struct pci_dev *dev, int where, unittype val) \ +{ \ + return rw##_config_##unitname(pciswap, \ + dev, \ + where, \ + val); \ +} + +MAKE_PCI_OPS(extpci, read, byte, u8 *, &ext_pci_swap) + MAKE_PCI_OPS(extpci, read, word, u16 *, &ext_pci_swap) + MAKE_PCI_OPS(extpci, read, dword, u32 *, &ext_pci_swap) + + MAKE_PCI_OPS(extpci, write, byte, u8, &ext_pci_swap) + MAKE_PCI_OPS(extpci, write, word, u16, &ext_pci_swap) + MAKE_PCI_OPS(extpci, write, dword, u32, &ext_pci_swap) + +struct pci_ops ddb5476_ext_pci_ops = { + extpci_read_config_byte, + extpci_read_config_word, + extpci_read_config_dword, + extpci_write_config_byte, + extpci_write_config_word, + extpci_write_config_dword +}; diff --git a/arch/mips/pci/ops-ddb5476.c b/arch/mips/pci/ops-ddb5476.c new file mode 100644 index 000000000..12da58e75 --- /dev/null +++ b/arch/mips/pci/ops-ddb5476.c @@ -0,0 +1,286 @@ +/* + * Copyright 2001 MontaVista Software Inc. + * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net + * + * arch/mips/ddb5xxx/ddb5476/pci_ops.c + * Define the pci_ops for DB5477. + * + * Much of the code is derived from the original DDB5074 port by + * Geert Uytterhoeven + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include + +#include +#include + +#include + +/* + * config_swap structure records what set of pdar/pmr are used + * to access pci config space. It also provides a place hold the + * original values for future restoring. + */ +struct pci_config_swap { + u32 pdar; + u32 pmr; + u32 config_base; + u32 config_size; + u32 pdar_backup; + u32 pmr_backup; +}; + +/* + * On DDB5476, we have one set of swap registers + */ +struct pci_config_swap ext_pci_swap = { + DDB_PCIW0, + DDB_PCIINIT0, + DDB_PCI_CONFIG_BASE, + DDB_PCI_CONFIG_SIZE +}; + +static int pci_config_workaround = 1; + +/* + * access config space + */ +static inline u32 ddb_access_config_base(struct pci_config_swap *swap, u32 bus, /* 0 means top level bus */ + u32 slot_num) +{ + u32 pci_addr = 0; + u32 pciinit_offset = 0; + u32 virt_addr = swap->config_base; + u32 option; + + if (pci_config_workaround) { + /* [jsun] work around Vrc5476 controller itself, returnning + * slot 0 essentially makes vrc5476 invisible + */ + if (slot_num == 12) + slot_num = 0; + +#if 0 + /* BUG : skip P2P bridge for now */ + if (slot_num == 5) + slot_num = 0; +#endif + + } else { + /* now we have to be hornest, returning the true + * PCI config headers for vrc5476 + */ + if (slot_num == 12) { + swap->pdar_backup = ddb_in32(swap->pdar); + swap->pmr_backup = ddb_in32(swap->pmr); + return DDB_BASE + DDB_PCI_BASE; + } + } + + /* minimum pdar (window) size is 2MB */ + db_assert(swap->config_size >= (2 << 20)); + + db_assert(slot_num < (1 << 5)); + db_assert(bus < (1 << 8)); + + /* backup registers */ + swap->pdar_backup = ddb_in32(swap->pdar); + swap->pmr_backup = ddb_in32(swap->pmr); + + /* set the pdar (pci window) register */ + ddb_set_pdar(swap->pdar, swap->config_base, swap->config_size, 32, /* 32 bit wide */ + 0, /* not on local memory bus */ + 0); /* not visible from PCI bus (N/A) */ + + /* + * calcuate the absolute pci config addr; + * according to the spec, we start scanning from adr:11 (0x800) + */ + if (bus == 0) { + /* type 0 config */ + pci_addr = 0x800 << slot_num; + } else { + /* type 1 config */ + pci_addr = (bus << 16) | (slot_num << 11); + /* panic("ddb_access_config_base: we don't support type 1 config Yet"); */ + } + + /* + * if pci_addr is less than pci config window size, we set + * pciinit_offset to 0 and adjust the virt_address. + * Otherwise we will try to adjust pciinit_offset. + */ + if (pci_addr < swap->config_size) { + virt_addr = KSEG1ADDR(swap->config_base + pci_addr); + pciinit_offset = 0; + } else { + db_assert((pci_addr & (swap->config_size - 1)) == 0); + virt_addr = KSEG1ADDR(swap->config_base); + pciinit_offset = pci_addr; + } + + /* set the pmr register */ + option = DDB_PCI_ACCESS_32; + if (bus != 0) + option |= DDB_PCI_CFGTYPE1; + ddb_set_pmr(swap->pmr, DDB_PCICMD_CFG, pciinit_offset, option); + + return virt_addr; +} + +static inline void ddb_close_config_base(struct pci_config_swap *swap) +{ + ddb_out32(swap->pdar, swap->pdar_backup); + ddb_out32(swap->pmr, swap->pmr_backup); +} + +static int read_config_dword(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u32 * val) +{ + u32 bus, slot_num, func_num; + u32 base; + + db_assert((where & 3) == 0); + db_assert(where < (1 << 8)); + + /* check if the bus is top-level */ + if (dev->bus->parent != NULL) { + bus = dev->bus->number; + db_assert(bus != 0); + } else { + bus = 0; + } + + slot_num = PCI_SLOT(dev->devfn); + func_num = PCI_FUNC(dev->devfn); + base = ddb_access_config_base(swap, bus, slot_num); + *val = *(volatile u32 *) (base + (func_num << 8) + where); + ddb_close_config_base(swap); + return PCIBIOS_SUCCESSFUL; +} + +static int read_config_word(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u16 * val) +{ + int status; + u32 result; + + db_assert((where & 1) == 0); + + status = read_config_dword(swap, dev, where & ~3, &result); + if (where & 2) + result >>= 16; + *val = result & 0xffff; + return status; +} + +static int read_config_byte(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u8 * val) +{ + int status; + u32 result; + + status = read_config_dword(swap, dev, where & ~3, &result); + if (where & 1) + result >>= 8; + if (where & 2) + result >>= 16; + *val = result & 0xff; + return status; +} + +static int write_config_dword(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u32 val) +{ + u32 bus, slot_num, func_num; + u32 base; + + db_assert((where & 3) == 0); + db_assert(where < (1 << 8)); + + /* check if the bus is top-level */ + if (dev->bus->parent != NULL) { + bus = dev->bus->number; + db_assert(bus != 0); + } else { + bus = 0; + } + + slot_num = PCI_SLOT(dev->devfn); + func_num = PCI_FUNC(dev->devfn); + base = ddb_access_config_base(swap, bus, slot_num); + *(volatile u32 *) (base + (func_num << 8) + where) = val; + ddb_close_config_base(swap); + return PCIBIOS_SUCCESSFUL; +} + +static int write_config_word(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u16 val) +{ + int status, shift = 0; + u32 result; + + db_assert((where & 1) == 0); + + status = read_config_dword(swap, dev, where & ~3, &result); + if (status != PCIBIOS_SUCCESSFUL) + return status; + + if (where & 2) + shift += 16; + result &= ~(0xffff << shift); + result |= val << shift; + return write_config_dword(swap, dev, where & ~3, result); +} + +static int write_config_byte(struct pci_config_swap *swap, + struct pci_dev *dev, u32 where, u8 val) +{ + int status, shift = 0; + u32 result; + + status = read_config_dword(swap, dev, where & ~3, &result); + if (status != PCIBIOS_SUCCESSFUL) + return status; + + if (where & 2) + shift += 16; + if (where & 1) + shift += 8; + result &= ~(0xff << shift); + result |= val << shift; + return write_config_dword(swap, dev, where & ~3, result); +} + +#define MAKE_PCI_OPS(prefix, rw, unitname, unittype, pciswap) \ +static int prefix##_##rw##_config_##unitname(struct pci_dev *dev, int where, unittype val) \ +{ \ + return rw##_config_##unitname(pciswap, \ + dev, \ + where, \ + val); \ +} + +MAKE_PCI_OPS(extpci, read, byte, u8 *, &ext_pci_swap) + MAKE_PCI_OPS(extpci, read, word, u16 *, &ext_pci_swap) + MAKE_PCI_OPS(extpci, read, dword, u32 *, &ext_pci_swap) + + MAKE_PCI_OPS(extpci, write, byte, u8, &ext_pci_swap) + MAKE_PCI_OPS(extpci, write, word, u16, &ext_pci_swap) + MAKE_PCI_OPS(extpci, write, dword, u32, &ext_pci_swap) + +struct pci_ops ddb5476_ext_pci_ops = { + extpci_read_config_byte, + extpci_read_config_word, + extpci_read_config_dword, + extpci_write_config_byte, + extpci_write_config_word, + extpci_write_config_dword +}; diff --git a/arch/mips/pci/ops-emma2rh.c b/arch/mips/pci/ops-emma2rh.c deleted file mode 100644 index 38f181625..000000000 --- a/arch/mips/pci/ops-emma2rh.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * arch/mips/pci/ops-emma2rh.c - * This file defines the PCI operation for EMMA2RH. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/pci/ops-vr41xx.c - * - * Copyright 2001 MontaVista Software 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 - */ - -#include -#include -#include - -#include -#include - -#include - -#define RTABORT (0x1<<9) -#define RMABORT (0x1<<10) -#define EMMA2RH_PCI_SLOT_NUM 9 /* 0000:09.0 is final PCI device */ - -/* - * access config space - */ - -static int check_args(struct pci_bus *bus, u32 devfn, u32 * bus_num) -{ - /* check if the bus is top-level */ - if (bus->parent != NULL) { - *bus_num = bus->number; - db_assert(bus_num != 0); - } else - *bus_num = 0; - - if (*bus_num == 0) { - /* Type 0 */ - if (PCI_SLOT(devfn) >= 10) - return PCIBIOS_DEVICE_NOT_FOUND; - } else { - /* Type 1 */ - if ((*bus_num >= 64) || (PCI_SLOT(devfn) >= 16)) - return PCIBIOS_DEVICE_NOT_FOUND; - } - return 0; -} - -static inline int set_pci_configuration_address(unsigned char bus_num, - unsigned int devfn, int where) -{ - u32 config_win0; - - emma2rh_out32(EMMA2RH_PCI_INT, ~RMABORT); - if (bus_num == 0) - /* - * Type 0 configuration - */ - config_win0 = (1 << (22 + PCI_SLOT(devfn))) | (5 << 9); - else - /* - * Type 1 configuration - */ - config_win0 = (bus_num << 26) | (PCI_SLOT(devfn) << 22) | - (1 << 15) | (5 << 9); - - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, config_win0); - - return 0; -} - -static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, - int size, uint32_t * val) -{ - u32 bus_num; - u32 base = KSEG1ADDR(EMMA2RH_PCI_CONFIG_BASE); - u32 backup_win0; - u32 data; - - *val = 0xffffffffU; - - if (check_args(bus, devfn, &bus_num) == PCIBIOS_DEVICE_NOT_FOUND) - return PCIBIOS_DEVICE_NOT_FOUND; - - backup_win0 = emma2rh_in32(EMMA2RH_PCI_IWIN0_CTR); - - if (set_pci_configuration_address(bus_num, devfn, where) < 0) - return PCIBIOS_DEVICE_NOT_FOUND; - - data = - *(volatile u32 *)(base + (PCI_FUNC(devfn) << 8) + - (where & 0xfffffffc)); - - switch (size) { - case 1: - *val = (data >> ((where & 3) << 3)) & 0xffU; - break; - case 2: - *val = (data >> ((where & 2) << 3)) & 0xffffU; - break; - case 4: - *val = data; - break; - default: - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, backup_win0); - return PCIBIOS_FUNC_NOT_SUPPORTED; - } - - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, backup_win0); - - if (emma2rh_in32(EMMA2RH_PCI_INT) & RMABORT) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; -} - -static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, - int size, u32 val) -{ - u32 bus_num; - u32 base = KSEG1ADDR(EMMA2RH_PCI_CONFIG_BASE); - u32 backup_win0; - u32 data; - int shift; - - if (check_args(bus, devfn, &bus_num) == PCIBIOS_DEVICE_NOT_FOUND) - return PCIBIOS_DEVICE_NOT_FOUND; - - backup_win0 = emma2rh_in32(EMMA2RH_PCI_IWIN0_CTR); - - if (set_pci_configuration_address(bus_num, devfn, where) < 0) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* read modify write */ - data = - *(volatile u32 *)(base + (PCI_FUNC(devfn) << 8) + - (where & 0xfffffffc)); - - switch (size) { - case 1: - shift = (where & 3) << 3; - data &= ~(0xffU << shift); - data |= ((val & 0xffU) << shift); - break; - case 2: - shift = (where & 2) << 3; - data &= ~(0xffffU << shift); - data |= ((val & 0xffffU) << shift); - break; - case 4: - data = val; - break; - default: - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, backup_win0); - return PCIBIOS_FUNC_NOT_SUPPORTED; - } - *(volatile u32 *)(base + (PCI_FUNC(devfn) << 8) + - (where & 0xfffffffc)) = data; - - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, backup_win0); - if (emma2rh_in32(EMMA2RH_PCI_INT) & RMABORT) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; -} - -struct pci_ops emma2rh_pci_ops = { - .read = pci_config_read, - .write = pci_config_write, -}; diff --git a/arch/mips/pci/ops-it8172.c b/arch/mips/pci/ops-it8172.c index ba8328505..b7a8b9a6f 100644 --- a/arch/mips/pci/ops-it8172.c +++ b/arch/mips/pci/ops-it8172.c @@ -50,28 +50,30 @@ static struct resource pci_mem_resource_1; static struct resource pci_io_resource = { - .start = 0x14018000, - .end = 0x17FFFFFF, - .name = "io pci IO space", - .flags = IORESOURCE_IO + "io pci IO space", + 0x14018000, + 0x17FFFFFF, + IORESOURCE_IO }; static struct resource pci_mem_resource_0 = { - .start = 0x10101000, - .end = 0x13FFFFFF, - .name = "ext pci memory space 0/1", - .flags = IORESOURCE_MEM, - .parent = &pci_mem_resource_0, - .sibling = NULL, - .child = &pci_mem_resource_1 + "ext pci memory space 0/1", + 0x10101000, + 0x13FFFFFF, + IORESOURCE_MEM, + &pci_mem_resource_0, + NULL, + &pci_mem_resource_1 }; static struct resource pci_mem_resource_1 = { - .start = 0x1A000000, - .end = 0x1FBFFFFF, - .name = "ext pci memory space 2/3", - .flags = IORESOURCE_MEM, - .parent = &pci_mem_resource_0 + "ext pci memory space 2/3", + 0x1A000000, + 0x1FBFFFFF, + IORESOURCE_MEM, + &pci_mem_resource_0, + NULL, + NULL }; extern struct pci_ops it8172_pci_ops; diff --git a/arch/mips/pci/ops-sni.c b/arch/mips/pci/ops-sni.c index 2b0ccd6d9..62bdd19c7 100644 --- a/arch/mips/pci/ops-sni.c +++ b/arch/mips/pci/ops-sni.c @@ -47,13 +47,13 @@ static int pcimt_read(struct pci_bus *bus, unsigned int devfn, int reg, switch (size) { case 1: - *val = inb(PCIMT_CONFIG_DATA + (reg & 3)); + *val = *(volatile u8 *) (PCIMT_CONFIG_DATA + (reg & 3)); break; case 2: - *val = inw(PCIMT_CONFIG_DATA + (reg & 2)); + *val = *(volatile u16 *) (PCIMT_CONFIG_DATA + (reg & 2)); break; case 4: - *val = inl(PCIMT_CONFIG_DATA); + *val = *(volatile u32 *) PCIMT_CONFIG_DATA; break; } @@ -70,13 +70,13 @@ static int pcimt_write(struct pci_bus *bus, unsigned int devfn, int reg, switch (size) { case 1: - outb (val, PCIMT_CONFIG_DATA + (reg & 3)); + *(volatile u8 *) (PCIMT_CONFIG_DATA + (reg & 3)) = val; break; case 2: - outw (val, PCIMT_CONFIG_DATA + (reg & 2)); + *(volatile u16 *) (PCIMT_CONFIG_DATA + (reg & 2)) = val; break; case 4: - outl (val, PCIMT_CONFIG_DATA); + *(volatile u32 *) PCIMT_CONFIG_DATA = val; break; } diff --git a/arch/mips/pci/ops-titan.c b/arch/mips/pci/ops-titan.c index ebf8fc40e..233ec6f20 100644 --- a/arch/mips/pci/ops-titan.c +++ b/arch/mips/pci/ops-titan.c @@ -26,19 +26,8 @@ #include #include -#include -#include -#include +#include -/* - * PCI specific defines - */ -#define TITAN_PCI_0_CONFIG_ADDRESS 0x780 -#define TITAN_PCI_0_CONFIG_DATA 0x784 - -/* - * Titan PCI Config Read Byte - */ static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 * val) { @@ -54,8 +43,8 @@ static int titan_read_config(struct pci_bus *bus, unsigned int devfn, int reg, /* start the configuration cycle */ - ocd_writel(address, TITAN_PCI_0_CONFIG_ADDRESS); - tmp = ocd_readl(TITAN_PCI_0_CONFIG_DATA) >> ((reg & 3) << 3); + TITAN_WRITE(TITAN_PCI_0_CONFIG_ADDRESS, address); + tmp = TITAN_READ(TITAN_PCI_0_CONFIG_DATA) >> ((reg & 3) << 3); switch (size) { case 1: @@ -82,20 +71,20 @@ static int titan_write_config(struct pci_bus *bus, unsigned int devfn, int reg, (reg & 0xfc) | 0x80000000; /* start the configuration cycle */ - ocd_writel(address, TITAN_PCI_0_CONFIG_ADDRESS); + TITAN_WRITE(TITAN_PCI_0_CONFIG_ADDRESS, address); /* write the data */ switch (size) { case 1: - ocd_writeb(val, TITAN_PCI_0_CONFIG_DATA + (~reg & 0x3)); + TITAN_WRITE_8(TITAN_PCI_0_CONFIG_DATA + (~reg & 0x3), val); break; case 2: - ocd_writew(val, TITAN_PCI_0_CONFIG_DATA + (~reg & 0x2)); + TITAN_WRITE_16(TITAN_PCI_0_CONFIG_DATA + (~reg & 0x2), val); break; case 4: - ocd_writel(val, TITAN_PCI_0_CONFIG_DATA); + TITAN_WRITE(TITAN_PCI_0_CONFIG_DATA, val); break; } diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index 150419c8b..7688b7711 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c @@ -119,7 +119,7 @@ static int tx4927_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, i switch (size) { case 1: - *val = *(volatile u8 *) ((unsigned long) & tx4927_pcicptr-> + *val = *(volatile u8 *) ((ulong) & tx4927_pcicptr-> g2pcfgdata | #ifdef __LITTLE_ENDIAN (where & 3)); @@ -128,7 +128,7 @@ static int tx4927_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, i #endif break; case 2: - *val = *(volatile u16 *) ((unsigned long) & tx4927_pcicptr-> + *val = *(volatile u16 *) ((ulong) & tx4927_pcicptr-> g2pcfgdata | #ifdef __LITTLE_ENDIAN (where & 3)); @@ -168,7 +168,7 @@ static int tx4927_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, switch (size) { case 1: - *(volatile u8 *) ((unsigned long) & tx4927_pcicptr-> + *(volatile u8 *) ((ulong) & tx4927_pcicptr-> g2pcfgdata | #ifdef __LITTLE_ENDIAN (where & 3)) = val; @@ -178,7 +178,7 @@ static int tx4927_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, break; case 2: - *(volatile u16 *) ((unsigned long) & tx4927_pcicptr-> + *(volatile u16 *) ((ulong) & tx4927_pcicptr-> g2pcfgdata | #ifdef __LITTLE_ENDIAN (where & 3)) = val; diff --git a/arch/mips/pci/ops-tx4938.c b/arch/mips/pci/ops-tx4938.c index 445007084..0ff083489 100644 --- a/arch/mips/pci/ops-tx4938.c +++ b/arch/mips/pci/ops-tx4938.c @@ -106,7 +106,7 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, switch (size) { case 1: - *val = *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata | + *val = *(volatile u8 *) ((ulong) & tx4938_pcicptr->g2pcfgdata | #ifdef __BIG_ENDIAN ((where & 3) ^ 3)); #else @@ -114,7 +114,7 @@ static int tx4938_pcibios_read_config(struct pci_bus *bus, unsigned int devfn, #endif break; case 2: - *val = *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata | + *val = *(volatile u16 *) ((ulong) & tx4938_pcicptr->g2pcfgdata | #ifdef __BIG_ENDIAN ((where & 3) ^ 2)); #else @@ -154,7 +154,7 @@ static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, switch (size) { case 1: - *(volatile u8 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata | + *(volatile u8 *) ((ulong) & tx4938_pcicptr->g2pcfgdata | #ifdef __BIG_ENDIAN ((where & 3) ^ 3)) = val; #else @@ -162,7 +162,7 @@ static int tx4938_pcibios_write_config(struct pci_bus *bus, unsigned int devfn, #endif break; case 2: - *(volatile u16 *) ((unsigned long) & tx4938_pcicptr->g2pcfgdata | + *(volatile u16 *) ((ulong) & tx4938_pcicptr->g2pcfgdata | #ifdef __BIG_ENDIAN ((where & 0x3) ^ 0x2)) = val; #else diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index f6774f54c..f4ef1a35c 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c @@ -32,6 +32,7 @@ * * XXX: AT THIS TIME, ONLY the NATIVE PCI-X INTERFACE IS SUPPORTED. */ +#include #include #include #include diff --git a/arch/mips/pci/pci-bcm1480ht.c b/arch/mips/pci/pci-bcm1480ht.c index ba2e34b09..a3eebe589 100644 --- a/arch/mips/pci/pci-bcm1480ht.c +++ b/arch/mips/pci/pci-bcm1480ht.c @@ -31,6 +31,7 @@ * problem. * */ +#include #include #include #include diff --git a/arch/mips/pci/pci-ddb5074.c b/arch/mips/pci/pci-ddb5074.c new file mode 100644 index 000000000..73f9ceeb2 --- /dev/null +++ b/arch/mips/pci/pci-ddb5074.c @@ -0,0 +1,79 @@ +#include +#include +#include +#include + +#include + +#include + +static struct resource extpci_io_resource = { + "pci IO space", + 0x1000, /* leave some room for ISA bus */ + DDB_PCI_IO_SIZE - 1, + IORESOURCE_IO +}; + +static struct resource extpci_mem_resource = { + "pci memory space", + DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */ + DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1, + IORESOURCE_MEM +}; + +extern struct pci_ops ddb5476_ext_pci_ops; + +struct pci_controller ddb5476_controller = { + .pci_ops = &ddb5476_ext_pci_ops, + .io_resource = &extpci_io_resource, + .mem_resource = &extpci_mem_resource, +}; + +#define PCI_EXT_INTA 8 +#define PCI_EXT_INTB 9 +#define PCI_EXT_INTC 10 +#define PCI_EXT_INTD 11 +#define PCI_EXT_INTE 12 + +#define MAX_SLOT_NUM 14 + +static unsigned char irq_map[MAX_SLOT_NUM] = { + [ 0] = nile4_to_irq(PCI_EXT_INTE), + [ 1] = nile4_to_irq(PCI_EXT_INTA), + [ 2] = nile4_to_irq(PCI_EXT_INTA), + [ 3] = nile4_to_irq(PCI_EXT_INTB), + [ 4] = nile4_to_irq(PCI_EXT_INTC), + [ 5] = nile4_to_irq(NILE4_INT_UART), + [10] = nile4_to_irq(PCI_EXT_INTE), + [13] = nile4_to_irq(PCI_EXT_INTE), +}; + +int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + return irq_map[slot]; +} + +/* Do platform specific device initialization at pci_enable_device() time */ +int pcibios_plat_dev_init(struct pci_dev *dev) +{ + return 0; +} + +void __init ddb_pci_reset_bus(void) +{ + u32 temp; + + /* + * I am not sure about the "official" procedure, the following + * steps work as far as I know: + * We first set PCI cold reset bit (bit 31) in PCICTRL-H. + * Then we clear the PCI warm reset bit (bit 30) to 0 in PCICTRL-H. + * The same is true for both PCI channels. + */ + temp = ddb_in32(DDB_PCICTRL + 4); + temp |= 0x80000000; + ddb_out32(DDB_PCICTRL + 4, temp); + temp &= ~0xc0000000; + ddb_out32(DDB_PCICTRL + 4, temp); + +} diff --git a/arch/mips/pci/pci-ddb5476.c b/arch/mips/pci/pci-ddb5476.c new file mode 100644 index 000000000..90dd49509 --- /dev/null +++ b/arch/mips/pci/pci-ddb5476.c @@ -0,0 +1,93 @@ +#include +#include +#include +#include + +#include + +#include + +static struct resource extpci_io_resource = { + "pci IO space", + 0x1000, /* leave some room for ISA bus */ + DDB_PCI_IO_SIZE - 1, + IORESOURCE_IO +}; + +static struct resource extpci_mem_resource = { + "pci memory space", + DDB_PCI_MEM_BASE + 0x00100000, /* leave 1 MB for RTC */ + DDB_PCI_MEM_BASE + DDB_PCI_MEM_SIZE - 1, + IORESOURCE_MEM +}; + +extern struct pci_ops ddb5476_ext_pci_ops; + +struct pci_controller ddb5476_controller = { + .pci_ops = &ddb5476_ext_pci_ops, + .io_resource = &extpci_io_resource, + .mem_resource = &extpci_mem_resource +}; + + +/* + * we fix up irqs based on the slot number. + * The first entry is at AD:11. + * + * This does not work for devices on sub-buses yet. + */ + +/* + * temporary + */ + +#define PCI_EXT_INTA 8 +#define PCI_EXT_INTB 9 +#define PCI_EXT_INTC 10 +#define PCI_EXT_INTD 11 +#define PCI_EXT_INTE 12 + +/* + * based on ddb5477 manual page 11 + */ +#define MAX_SLOT_NUM 21 +static unsigned char irq_map[MAX_SLOT_NUM] = { + [ 2] = 9, /* AD:13 USB */ + [ 3] = 10, /* AD:14 PMU */ + [ 5] = 0, /* AD:16 P2P bridge */ + [ 6] = nile4_to_irq(PCI_EXT_INTB), /* AD:17 */ + [ 7] = nile4_to_irq(PCI_EXT_INTC), /* AD:18 */ + [ 8] = nile4_to_irq(PCI_EXT_INTD), /* AD:19 */ + [ 9] = nile4_to_irq(PCI_EXT_INTA), /* AD:20 */ + [13] = 14, /* AD:24 HD controller, M5229 */ +}; + +int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + return irq_map[slot]; +} + +/* Do platform specific device initialization at pci_enable_device() time */ +int pcibios_plat_dev_init(struct pci_dev *dev) +{ + return 0; +} + +void __init ddb_pci_reset_bus(void) +{ + u32 temp; + + /* + * I am not sure about the "official" procedure, the following + * steps work as far as I know: + * We first set PCI cold reset bit (bit 31) in PCICTRL-H. + * Then we clear the PCI warm reset bit (bit 30) to 0 in PCICTRL-H. + * The same is true for both PCI channels. + */ + temp = ddb_in32(DDB_PCICTRL + 4); + temp |= 0x80000000; + ddb_out32(DDB_PCICTRL + 4, temp); + temp &= ~0xc0000000; + ddb_out32(DDB_PCICTRL + 4, temp); + +} diff --git a/arch/mips/pci/pci-ddb5477.c b/arch/mips/pci/pci-ddb5477.c index d071bc375..826d65318 100644 --- a/arch/mips/pci/pci-ddb5477.c +++ b/arch/mips/pci/pci-ddb5477.c @@ -22,31 +22,31 @@ #include static struct resource extpci_io_resource = { - .start = DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + 0x4000, - .end = DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI0_IO_SIZE - 1, - .name = "ext pci IO space", - .flags = IORESOURCE_IO + "ext pci IO space", + DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + 0x4000, + DDB_PCI0_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI0_IO_SIZE - 1, + IORESOURCE_IO }; static struct resource extpci_mem_resource = { - .start = DDB_PCI0_MEM_BASE + 0x100000, - .end = DDB_PCI0_MEM_BASE + DDB_PCI0_MEM_SIZE - 1, - .name = "ext pci memory space", - .flags = IORESOURCE_MEM + "ext pci memory space", + DDB_PCI0_MEM_BASE + 0x100000, + DDB_PCI0_MEM_BASE + DDB_PCI0_MEM_SIZE - 1, + IORESOURCE_MEM }; static struct resource iopci_io_resource = { - .start = DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE, - .end = DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI1_IO_SIZE - 1, - .name = "io pci IO space", - .flags = IORESOURCE_IO + "io pci IO space", + DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE, + DDB_PCI1_IO_BASE - DDB_PCI_IO_BASE + DDB_PCI1_IO_SIZE - 1, + IORESOURCE_IO }; static struct resource iopci_mem_resource = { - .start = DDB_PCI1_MEM_BASE, - .end = DDB_PCI1_MEM_BASE + DDB_PCI1_MEM_SIZE - 1, - .name = "ext pci memory space", - .flags = IORESOURCE_MEM + "ext pci memory space", + DDB_PCI1_MEM_BASE, + DDB_PCI1_MEM_BASE + DDB_PCI1_MEM_SIZE - 1, + IORESOURCE_MEM }; extern struct pci_ops ddb5477_ext_pci_ops; diff --git a/arch/mips/pci/pci-emma2rh.c b/arch/mips/pci/pci-emma2rh.c deleted file mode 100644 index d99591a0c..000000000 --- a/arch/mips/pci/pci-emma2rh.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * arch/mips/pci/pci-emma2rh.c - * This file defines the PCI configration. - * - * Copyright (C) NEC Electronics Corporation 2004-2006 - * - * This file is based on the arch/mips/ddb5xxx/ddb5477/pci.c - * - * Copyright 2001 MontaVista Software 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 - */ - -#include -#include -#include -#include - -#include -#include - -#include - -static struct resource pci_io_resource = { - .name = "pci IO space", - .start = EMMA2RH_PCI_IO_BASE, - .end = EMMA2RH_PCI_IO_BASE + EMMA2RH_PCI_IO_SIZE - 1, - .flags = IORESOURCE_IO, -}; - -static struct resource pci_mem_resource = { - .name = "pci memory space", - .start = EMMA2RH_PCI_MEM_BASE, - .end = EMMA2RH_PCI_MEM_BASE + EMMA2RH_PCI_MEM_SIZE - 1, - .flags = IORESOURCE_MEM, -}; - -extern struct pci_ops emma2rh_pci_ops; - -static struct pci_controller emma2rh_pci_controller = { - .pci_ops = &emma2rh_pci_ops, - .mem_resource = &pci_mem_resource, - .io_resource = &pci_io_resource, - .mem_offset = -0x04000000, - .io_offset = 0, -}; - -static void __init emma2rh_pci_init(void) -{ - /* setup PCI interface */ - emma2rh_out32(EMMA2RH_PCI_ARBIT_CTR, 0x70f); - - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, 0x80000a18); - emma2rh_out32(EMMA2RH_PCI_CONFIG_BASE + PCI_COMMAND, - PCI_STATUS_DEVSEL_MEDIUM | PCI_STATUS_CAP_LIST | - PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); - emma2rh_out32(EMMA2RH_PCI_CONFIG_BASE + PCI_BASE_ADDRESS_0, 0x10000000); - emma2rh_out32(EMMA2RH_PCI_CONFIG_BASE + PCI_BASE_ADDRESS_1, 0x00000000); - - emma2rh_out32(EMMA2RH_PCI_IWIN0_CTR, 0x12000000 | 0x218); - emma2rh_out32(EMMA2RH_PCI_IWIN1_CTR, 0x18000000 | 0x600); - emma2rh_out32(EMMA2RH_PCI_INIT_ESWP, 0x00000200); - - emma2rh_out32(EMMA2RH_PCI_TWIN_CTR, 0x00009200); - emma2rh_out32(EMMA2RH_PCI_TWIN_BADR, 0x00000000); - emma2rh_out32(EMMA2RH_PCI_TWIN0_DADR, 0x00000000); - emma2rh_out32(EMMA2RH_PCI_TWIN1_DADR, 0x00000000); -} - -static int __init emma2rh_pci_setup(void) -{ - emma2rh_pci_init(); - register_pci_controller(&emma2rh_pci_controller); - return 0; -} - -arch_initcall(emma2rh_pci_setup); diff --git a/arch/mips/pci/pci-excite.c b/arch/mips/pci/pci-excite.c deleted file mode 100644 index 3c86c77cb..000000000 --- a/arch/mips/pci/pci-excite.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2004 by Basler Vision Technologies AG - * Author: Thomas Koeller - * Based on the PMC-Sierra Yosemite board support by Ralf Baechle. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include -#include -#include -#include - - -extern struct pci_ops titan_pci_ops; - - -static struct resource - mem_resource = { - .name = "PCI memory", - .start = EXCITE_PHYS_PCI_MEM, - .end = EXCITE_PHYS_PCI_MEM + EXCITE_SIZE_PCI_MEM - 1, - .flags = IORESOURCE_MEM - }, - io_resource = { - .name = "PCI I/O", - .start = EXCITE_PHYS_PCI_IO, - .end = EXCITE_PHYS_PCI_IO + EXCITE_SIZE_PCI_IO - 1, - .flags = IORESOURCE_IO - }; - - -static struct pci_controller bx_controller = { - .pci_ops = &titan_pci_ops, - .mem_resource = &mem_resource, - .mem_offset = 0x00000000UL, - .io_resource = &io_resource, - .io_offset = 0x00000000UL -}; - - -static char - iopage_failed[] __initdata = "Cannot allocate PCI I/O page", - modebits_no_pci[] __initdata = "PCI is not configured in mode bits"; - -#define RM9000x2_OCD_HTSC 0x0604 -#define RM9000x2_OCD_HTBHL 0x060c -#define RM9000x2_OCD_PCIHRST 0x078c - -#define RM9K_OCD_MODEBIT1 0x00d4 /* (MODEBIT1) Mode Bit 1 */ -#define RM9K_OCD_CPHDCR 0x00f4 /* CPU-PCI/HT Data Control. */ - -#define PCISC_FB2B 0x00000200 -#define PCISC_MWICG 0x00000010 -#define PCISC_EMC 0x00000004 -#define PCISC_ERMA 0x00000002 - - - -static int __init basler_excite_pci_setup(void) -{ - const unsigned int fullbars = memsize / (256 << 20); - unsigned int i; - - /* Check modebits to see if PCI is really enabled. */ - if (!((ocd_readl(RM9K_OCD_MODEBIT1) >> (47-32)) & 0x1)) - panic(modebits_no_pci); - - if (NULL == request_mem_region(EXCITE_PHYS_PCI_IO, EXCITE_SIZE_PCI_IO, - "Memory-mapped PCI I/O page")) - panic(iopage_failed); - - /* Enable PCI 0 as master for config cycles */ - ocd_writel(PCISC_EMC | PCISC_ERMA, RM9000x2_OCD_HTSC); - - - /* Set up latency timer */ - ocd_writel(0x8008, RM9000x2_OCD_HTBHL); - - /* Setup host IO and Memory space */ - ocd_writel((EXCITE_PHYS_PCI_IO >> 4) | 1, LKB7); - ocd_writel(((EXCITE_SIZE_PCI_IO >> 4) & 0x7fffff00) - 0x100, LKM7); - ocd_writel((EXCITE_PHYS_PCI_MEM >> 4) | 1, LKB8); - ocd_writel(((EXCITE_SIZE_PCI_MEM >> 4) & 0x7fffff00) - 0x100, LKM8); - - /* Set up PCI BARs to map all installed memory */ - for (i = 0; i < 6; i++) { - const unsigned int bar = 0x610 + i * 4; - - if (i < fullbars) { - ocd_writel(0x10000000 * i, bar); - ocd_writel(0x01000000 * i, bar + 0x140); - ocd_writel(0x0ffff029, bar + 0x100); - continue; - } - - if (i == fullbars) { - int o; - u32 mask; - - const unsigned long rem = memsize - i * 0x10000000; - if (!rem) { - ocd_writel(0x00000000, bar + 0x100); - continue; - } - - o = ffs(rem) - 1; - if (rem & ~(0x1 << o)) - o++; - mask = ((0x1 << o) & 0x0ffff000) - 0x1000; - ocd_writel(0x10000000 * i, bar); - ocd_writel(0x01000000 * i, bar + 0x140); - ocd_writel(0x00000029 | mask, bar + 0x100); - continue; - } - - ocd_writel(0x00000000, bar + 0x100); - } - - /* Finally, enable the PCI interupt */ -#if USB_IRQ > 7 - set_c0_intcontrol(1 << USB_IRQ); -#else - set_c0_status(1 << (USB_IRQ + 8)); -#endif - - ioport_resource.start = EXCITE_PHYS_PCI_IO; - ioport_resource.end = EXCITE_PHYS_PCI_IO + EXCITE_SIZE_PCI_IO - 1; - set_io_port_base((unsigned long) ioremap_nocache(EXCITE_PHYS_PCI_IO, EXCITE_SIZE_PCI_IO)); - register_pci_controller(&bx_controller); - return 0; -} - - -arch_initcall(basler_excite_pci_setup); diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index 80eb9af9e..6002d2a6a 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c @@ -40,7 +40,297 @@ static struct bridge_controller bridges[MAX_PCI_BUSSES]; struct bridge_controller *irq_to_bridge[MAX_PCI_BUSSES * MAX_DEVICES_PER_PCIBUS]; int irq_to_slot[MAX_PCI_BUSSES * MAX_DEVICES_PER_PCIBUS]; -extern struct pci_ops bridge_pci_ops; +/* + * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is + * not really documented, so right now I can't write code which uses it. + * Therefore we use type 0 accesses for now even though they won't work + * correcly for PCI-to-PCI bridges. + * + * The function is complicated by the ultimate brokeness of the IOC3 chip + * which is used in SGI systems. The IOC3 can only handle 32-bit PCI + * accesses and does only decode parts of it's address space. + */ + +static int pci_conf0_read_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 * value) +{ + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); + bridge_t *bridge = bc->base; + int slot = PCI_SLOT(devfn); + int fn = PCI_FUNC(devfn); + volatile void *addr; + u32 cf, shift, mask; + int res; + + addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[PCI_VENDOR_ID]; + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at it for real ... + */ + if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) + goto oh_my_gawd; + + addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[where ^ (4 - size)]; + + if (size == 1) + res = get_dbe(*value, (u8 *) addr); + else if (size == 2) + res = get_dbe(*value, (u16 *) addr); + else + res = get_dbe(*value, (u32 *) addr); + + return res ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; + +oh_my_gawd: + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at the wrong register. + */ + if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { + *value = 0; + return PCIBIOS_SUCCESSFUL; + } + + /* + * IOC3 is fucked fucked beyond believe ... Don't try to access + * anything but 32-bit words ... + */ + addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; + + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + shift = ((where & 3) << 3); + mask = (0xffffffffU >> ((4 - size) << 3)); + *value = (cf >> shift) & mask; + + return PCIBIOS_SUCCESSFUL; +} + +static int pci_conf1_read_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 * value) +{ + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); + bridge_t *bridge = bc->base; + int busno = bus->number; + int slot = PCI_SLOT(devfn); + int fn = PCI_FUNC(devfn); + volatile void *addr; + u32 cf, shift, mask; + int res; + + bridge->b_pci_cfg = (busno << 16) | (slot << 11); + addr = &bridge->b_type1_cfg.c[(fn << 8) | PCI_VENDOR_ID]; + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at it for real ... + */ + if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) + goto oh_my_gawd; + + bridge->b_pci_cfg = (busno << 16) | (slot << 11); + addr = &bridge->b_type1_cfg.c[(fn << 8) | (where ^ (4 - size))]; + + if (size == 1) + res = get_dbe(*value, (u8 *) addr); + else if (size == 2) + res = get_dbe(*value, (u16 *) addr); + else + res = get_dbe(*value, (u32 *) addr); + + return res ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL; + +oh_my_gawd: + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at the wrong register. + */ + if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { + *value = 0; + return PCIBIOS_SUCCESSFUL; + } + + /* + * IOC3 is fucked fucked beyond believe ... Don't try to access + * anything but 32-bit words ... + */ + bridge->b_pci_cfg = (busno << 16) | (slot << 11); + addr = &bridge->b_type1_cfg.c[(fn << 8) | where]; + + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + shift = ((where & 3) << 3); + mask = (0xffffffffU >> ((4 - size) << 3)); + *value = (cf >> shift) & mask; + + return PCIBIOS_SUCCESSFUL; +} + +static int pci_read_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 * value) +{ + if (bus->number > 0) + return pci_conf1_read_config(bus, devfn, where, size, value); + + return pci_conf0_read_config(bus, devfn, where, size, value); +} + +static int pci_conf0_write_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 value) +{ + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); + bridge_t *bridge = bc->base; + int slot = PCI_SLOT(devfn); + int fn = PCI_FUNC(devfn); + volatile void *addr; + u32 cf, shift, mask, smask; + int res; + + addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[PCI_VENDOR_ID]; + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at it for real ... + */ + if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) + goto oh_my_gawd; + + addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[where ^ (4 - size)]; + + if (size == 1) { + res = put_dbe(value, (u8 *) addr); + } else if (size == 2) { + res = put_dbe(value, (u16 *) addr); + } else { + res = put_dbe(value, (u32 *) addr); + } + + if (res) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; + +oh_my_gawd: + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to touch the wrong register. + */ + if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) + return PCIBIOS_SUCCESSFUL; + + /* + * IOC3 is fucked fucked beyond believe ... Don't try to access + * anything but 32-bit words ... + */ + addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; + + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + shift = ((where & 3) << 3); + mask = (0xffffffffU >> ((4 - size) << 3)); + smask = mask << shift; + + cf = (cf & ~smask) | ((value & mask) << shift); + if (put_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; +} + +static int pci_conf1_write_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 value) +{ + struct bridge_controller *bc = BRIDGE_CONTROLLER(bus); + bridge_t *bridge = bc->base; + int slot = PCI_SLOT(devfn); + int fn = PCI_FUNC(devfn); + int busno = bus->number; + volatile void *addr; + u32 cf, shift, mask, smask; + int res; + + bridge->b_pci_cfg = (busno << 16) | (slot << 11); + addr = &bridge->b_type1_cfg.c[(fn << 8) | PCI_VENDOR_ID]; + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to look at it for real ... + */ + if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16))) + goto oh_my_gawd; + + addr = &bridge->b_type1_cfg.c[(fn << 8) | (where ^ (4 - size))]; + + if (size == 1) { + res = put_dbe(value, (u8 *) addr); + } else if (size == 2) { + res = put_dbe(value, (u16 *) addr); + } else { + res = put_dbe(value, (u32 *) addr); + } + + if (res) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; + +oh_my_gawd: + + /* + * IOC3 is fucked fucked beyond believe ... Don't even give the + * generic PCI code a chance to touch the wrong register. + */ + if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) + return PCIBIOS_SUCCESSFUL; + + /* + * IOC3 is fucked fucked beyond believe ... Don't try to access + * anything but 32-bit words ... + */ + addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; + + if (get_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + shift = ((where & 3) << 3); + mask = (0xffffffffU >> ((4 - size) << 3)); + smask = mask << shift; + + cf = (cf & ~smask) | ((value & mask) << shift); + if (put_dbe(cf, (u32 *) addr)) + return PCIBIOS_DEVICE_NOT_FOUND; + + return PCIBIOS_SUCCESSFUL; +} + +static int pci_write_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 value) +{ + if (bus->number > 0) + return pci_conf1_write_config(bus, devfn, where, size, value); + + return pci_conf0_write_config(bus, devfn, where, size, value); +} + +static struct pci_ops bridge_pci_ops = { + .read = pci_read_config, + .write = pci_write_config, +}; int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid) { @@ -80,7 +370,8 @@ int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid) bc->widget_id = widget_id; bc->nasid = nasid; - bc->baddr = (u64)masterwid << 60 | PCI64_ATTR_BAR; + bc->baddr = (u64)masterwid << 60; + bc->baddr |= (1UL << 56); /* Barrier set */ /* * point to this bridge diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c index 17c7932cf..180af89bc 100644 --- a/arch/mips/pci/pci-ip32.c +++ b/arch/mips/pci/pci-ip32.c @@ -6,6 +6,7 @@ * Copyright (C) 2000, 2001 Keith M Wesolowski * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) */ +#include #include #include #include diff --git a/arch/mips/pci/pci-jmr3927.c b/arch/mips/pci/pci-jmr3927.c index cb84f4e8c..f02ef6e36 100644 --- a/arch/mips/pci/pci-jmr3927.c +++ b/arch/mips/pci/pci-jmr3927.c @@ -35,17 +35,17 @@ #include struct resource pci_io_resource = { - .name = "IO MEM", - .start = 0x1000, /* reserve regacy I/O space */ - .end = 0x1000 + JMR3927_PCIIO_SIZE - 1, - .flags = IORESOURCE_IO + "IO MEM", + 0x1000, /* reserve regacy I/O space */ + 0x1000 + JMR3927_PCIIO_SIZE - 1, + IORESOURCE_IO }; struct resource pci_mem_resource = { - .name = "PCI MEM", - .start = JMR3927_PCIMEM, - .end = JMR3927_PCIMEM + JMR3927_PCIMEM_SIZE - 1, - .flags = IORESOURCE_MEM + "PCI MEM", + JMR3927_PCIMEM, + JMR3927_PCIMEM + JMR3927_PCIMEM_SIZE - 1, + IORESOURCE_MEM }; extern struct pci_ops jmr3927_pci_ops; diff --git a/arch/mips/pci/pci-ocelot.c b/arch/mips/pci/pci-ocelot.c index 2b9495dce..3da8a4ee6 100644 --- a/arch/mips/pci/pci-ocelot.c +++ b/arch/mips/pci/pci-ocelot.c @@ -71,13 +71,13 @@ static inline void pci0WriteConfigReg(unsigned int offset, unsigned int data) } static struct resource ocelot_mem_resource = { - start = GT_PCI_MEM_BASE; - end = GT_PCI_MEM_BASE + GT_PCI_MEM_BASE - 1; + iomem_resource.start = GT_PCI_MEM_BASE; + iomem_resource.end = GT_PCI_MEM_BASE + GT_PCI_MEM_BASE - 1; }; static struct resource ocelot_io_resource = { - start = GT_PCI_IO_BASE; - end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1; + ioport_resource.start = GT_PCI_IO_BASE; + ioport_resource.end = GT_PCI_IO_BASE + GT_PCI_IO_SIZE - 1; }; static struct pci_controller ocelot_pci_controller = { diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c index 80f5e8c4b..7cca3bde5 100644 --- a/arch/mips/pci/pci-sb1250.c +++ b/arch/mips/pci/pci-sb1250.c @@ -30,6 +30,7 @@ * kernel mapped memory. Hopefully neither of these should be a huge * problem. */ +#include #include #include #include diff --git a/arch/mips/pci/pci-yosemite.c b/arch/mips/pci/pci-yosemite.c index 0357946f3..dac9ed4b0 100644 --- a/arch/mips/pci/pci-yosemite.c +++ b/arch/mips/pci/pci-yosemite.c @@ -14,10 +14,7 @@ extern struct pci_ops titan_pci_ops; static struct resource py_mem_resource = { - .start = 0xe0000000UL, - .end = 0xe3ffffffUL, - .name = "Titan PCI MEM", - .flags = IORESOURCE_MEM + "Titan PCI MEM", 0xe0000000UL, 0xe3ffffffUL, IORESOURCE_MEM }; /* @@ -29,10 +26,7 @@ static struct resource py_mem_resource = { #define TITAN_IO_BASE 0xe8000000UL static struct resource py_io_resource = { - .start = 0x00001000UL, - .end = TITAN_IO_SIZE - 1, - .name = "Titan IO MEM", - .flags = IORESOURCE_IO, + "Titan IO MEM", 0x00001000UL, TITAN_IO_SIZE - 1, IORESOURCE_IO, }; static struct pci_controller py_controller = { diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 5ace36865..21402ffd7 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -6,6 +6,7 @@ * * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org) */ +#include #include #include #include @@ -50,11 +51,11 @@ unsigned long PCIBIOS_MIN_MEM = 0; */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { struct pci_dev *dev = data; struct pci_controller *hose = dev->sysdata; - resource_size_t start = res->start; + unsigned long start = res->start; if (res->flags & IORESOURCE_IO) { /* Make sure we start at our min on all hoses */ @@ -75,6 +76,11 @@ pcibios_align_resource(void *data, struct resource *res, res->start = start; } +struct pci_controller * __init alloc_pci_controller(void) +{ + return alloc_bootmem(sizeof(struct pci_controller)); +} + void __init register_pci_controller(struct pci_controller *hose) { *hose_tail = hose; diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c index 099679a9d..39ee6314f 100644 --- a/arch/mips/philips/pnx8550/common/int.c +++ b/arch/mips/philips/pnx8550/common/int.c @@ -23,6 +23,7 @@ * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * */ +#include #include #include #include @@ -207,7 +208,7 @@ static void end_irq(unsigned int irq) } } -static struct irq_chip level_irq_type = { +static struct hw_interrupt_type level_irq_type = { .typename = "PNX Level IRQ", .startup = startup_irq, .shutdown = shutdown_irq, @@ -219,13 +220,13 @@ static struct irq_chip level_irq_type = { static struct irqaction gic_action = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "GIC", }; static struct irqaction timer_action = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "Timer", }; @@ -235,7 +236,7 @@ void __init arch_init_irq(void) int configPR; for (i = 0; i < PNX8550_INT_CP0_TOTINT; i++) { - irq_desc[i].chip = &level_irq_type; + irq_desc[i].handler = &level_irq_type; pnx8550_ack(i); /* mask the irq just in case */ } @@ -272,7 +273,7 @@ void __init arch_init_irq(void) /* mask/priority is still 0 so we will not get any * interrupts until it is unmasked */ - irq_desc[i].chip = &level_irq_type; + irq_desc[i].handler = &level_irq_type; } /* Priority level 0 */ @@ -281,12 +282,12 @@ void __init arch_init_irq(void) /* Set int vector table address */ PNX8550_GIC_VECTOR_0 = PNX8550_GIC_VECTOR_1 = 0; - irq_desc[MIPS_CPU_GIC_IRQ].chip = &level_irq_type; + irq_desc[MIPS_CPU_GIC_IRQ].handler = &level_irq_type; setup_irq(MIPS_CPU_GIC_IRQ, &gic_action); /* init of Timer interrupts */ for (i = PNX8550_INT_TIMER_MIN; i <= PNX8550_INT_TIMER_MAX; i++) { - irq_desc[i].chip = &level_irq_type; + irq_desc[i].handler = &level_irq_type; } /* Stop Timer 1-3 */ @@ -294,7 +295,7 @@ void __init arch_init_irq(void) configPR |= 0x00000038; write_c0_config7(configPR); - irq_desc[MIPS_CPU_TIMER_IRQ].chip = &level_irq_type; + irq_desc[MIPS_CPU_TIMER_IRQ].handler = &level_irq_type; setup_irq(MIPS_CPU_TIMER_IRQ, &timer_action); } diff --git a/arch/mips/philips/pnx8550/common/pci.c b/arch/mips/philips/pnx8550/common/pci.c index eee4f3dfc..baa6905f6 100644 --- a/arch/mips/philips/pnx8550/common/pci.c +++ b/arch/mips/philips/pnx8550/common/pci.c @@ -27,17 +27,17 @@ #include static struct resource pci_io_resource = { - .start = PNX8550_PCIIO + 0x1000, /* reserve regacy I/O space */ - .end = PNX8550_PCIIO + PNX8550_PCIIO_SIZE, - .name = "pci IO space", - .flags = IORESOURCE_IO + "pci IO space", + (u32)(PNX8550_PCIIO + 0x1000), /* reserve regacy I/O space */ + (u32)(PNX8550_PCIIO + PNX8550_PCIIO_SIZE), + IORESOURCE_IO }; static struct resource pci_mem_resource = { - .start = PNX8550_PCIMEM, - .end = PNX8550_PCIMEM + PNX8550_PCIMEM_SIZE - 1, - .name = "pci memory space", - .flags = IORESOURCE_MEM + "pci memory space", + (u32)(PNX8550_PCIMEM), + (u32)(PNX8550_PCIMEM + PNX8550_PCIMEM_SIZE - 1), + IORESOURCE_MEM }; extern struct pci_ops pnx8550_pci_ops; diff --git a/arch/mips/philips/pnx8550/common/setup.c b/arch/mips/philips/pnx8550/common/setup.c index 36b0c8bc6..0d8a77619 100644 --- a/arch/mips/philips/pnx8550/common/setup.c +++ b/arch/mips/philips/pnx8550/common/setup.c @@ -17,10 +17,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include #include -#include #include #include #include @@ -49,33 +49,19 @@ extern void pnx8550_machine_halt(void); extern void pnx8550_machine_power_off(void); extern struct resource ioport_resource; extern struct resource iomem_resource; +extern void (*board_time_init)(void); extern void pnx8550_time_init(void); +extern void (*board_timer_setup)(struct irqaction *irq); +extern void pnx8550_timer_setup(struct irqaction *irq); extern void rs_kgdb_hook(int tty_no); extern void prom_printf(char *fmt, ...); extern char *prom_getcmdline(void); struct resource standard_io_resources[] = { - { - .start = .0x00, - .end = 0x1f, - .name = "dma1", - .flags = IORESOURCE_BUSY - }, { - .start = 0x40, - .end = 0x5f, - .name = "timer", - .flags = IORESOURCE_BUSY - }, { - .start = 0x80, - .end = 0x8f, - .name = "dma page reg", - .flags = IORESOURCE_BUSY - }, { - .start = 0xc0, - .end = 0xdf, - .name = "dma2", - .flags = IORESOURCE_BUSY - }, + {"dma1", 0x00, 0x1f, IORESOURCE_BUSY}, + {"timer", 0x40, 0x5f, IORESOURCE_BUSY}, + {"dma page reg", 0x80, 0x8f, IORESOURCE_BUSY}, + {"dma2", 0xc0, 0xdf, IORESOURCE_BUSY}, }; #define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) @@ -96,7 +82,7 @@ unsigned long get_system_mem_size(void) int pnx8550_console_port = -1; -void __init plat_mem_setup(void) +void __init plat_setup(void) { int i; char* argptr; @@ -108,6 +94,7 @@ void __init plat_mem_setup(void) pm_power_off = pnx8550_machine_power_off; board_time_init = pnx8550_time_init; + board_timer_setup = pnx8550_timer_setup; /* Clear the Global 2 Register, PCI Inta Output Enable Registers Bit 1:Enable DAC Powerdown diff --git a/arch/mips/philips/pnx8550/common/time.c b/arch/mips/philips/pnx8550/common/time.c index 0af655b1f..70664ea96 100644 --- a/arch/mips/philips/pnx8550/common/time.c +++ b/arch/mips/philips/pnx8550/common/time.c @@ -70,7 +70,16 @@ void pnx8550_time_init(void) mips_hpt_frequency = 27UL * ((1000000UL * n)/(m * pow2p)); } -void __init plat_timer_setup(struct irqaction *irq) +/* + * pnx8550_timer_setup() - it does the following things: + * + * 5) board_timer_setup() - + * a) (optional) over-write any choices made above by time_init(). + * b) machine specific code should setup the timer irqaction. + * c) enable the timer interrupt + */ + +void __init pnx8550_timer_setup(struct irqaction *irq) { int configPR; diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c index 1f7c999eb..54b65a80a 100644 --- a/arch/mips/pmc-sierra/yosemite/ht.c +++ b/arch/mips/pmc-sierra/yosemite/ht.c @@ -23,6 +23,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -382,12 +383,12 @@ void pcibios_update_resource(struct pci_dev *dev, struct resource *root, void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; /* We need to avoid collisions with `mirrored' VGA ports and other strange ISA hardware, so we always want the diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c index b91d0aa3b..a1f524fc4 100644 --- a/arch/mips/pmc-sierra/yosemite/irq.c +++ b/arch/mips/pmc-sierra/yosemite/irq.c @@ -26,6 +26,7 @@ * * Second level Interrupt handlers for the PMC-Sierra Titan/Yosemite board */ +#include #include #include #include diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c index 9fe497337..165275c00 100644 --- a/arch/mips/pmc-sierra/yosemite/prom.c +++ b/arch/mips/pmc-sierra/yosemite/prom.c @@ -8,6 +8,7 @@ * Author: Manish Lachwani (lachwani@pmc-sierra.com) * Copyright (C) 2004 Ralf Baechle */ +#include #include #include #include diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c index 0a6ee8e5e..3f724d661 100644 --- a/arch/mips/pmc-sierra/yosemite/setup.c +++ b/arch/mips/pmc-sierra/yosemite/setup.c @@ -133,13 +133,14 @@ int m48t37y_set_time(unsigned long sec) return 0; } -void __init plat_timer_setup(struct irqaction *irq) +void yosemite_timer_setup(struct irqaction *irq) { setup_irq(7, irq); } void yosemite_time_init(void) { + board_timer_setup = yosemite_timer_setup; mips_hpt_frequency = cpu_clock / 2; mips_hpt_frequency = 33000000 * 3 * 5; } @@ -217,7 +218,7 @@ static void __init py_late_time_init(void) py_rtc_setup(); } -void __init plat_mem_setup(void) +void __init plat_setup(void) { board_time_init = yosemite_time_init; late_time_init = py_late_time_init; diff --git a/arch/mips/qemu/Makefile b/arch/mips/qemu/Makefile index 078cd3029..730f459f3 100644 --- a/arch/mips/qemu/Makefile +++ b/arch/mips/qemu/Makefile @@ -2,6 +2,6 @@ # Makefile for Qemu specific kernel interface routines under Linux. # -obj-y = q-firmware.o q-irq.o q-mem.o q-setup.o q-reset.o +obj-y = q-firmware.o q-irq.o q-mem.o q-setup.o obj-$(CONFIG_SMP) += q-smp.o diff --git a/arch/mips/qemu/q-reset.c b/arch/mips/qemu/q-reset.c deleted file mode 100644 index dbbe44ad7..000000000 --- a/arch/mips/qemu/q-reset.c +++ /dev/null @@ -1,33 +0,0 @@ - -#include -#include -#include -#include - -static void qemu_machine_restart(char *command) -{ - volatile unsigned int *reg = (unsigned int *)QEMU_RESTART_REG; - - set_c0_status(ST0_BEV | ST0_ERL); - change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); - flush_cache_all(); - write_c0_wired(0); - *reg = 42; - while (1) - cpu_wait(); -} - -static void qemu_machine_halt(void) -{ - volatile unsigned int *reg = (unsigned int *)QEMU_HALT_REG; - - *reg = 42; - while (1) - cpu_wait(); -} - -void qemu_reboot_setup(void) -{ - _machine_restart = qemu_machine_restart; - _machine_halt = qemu_machine_halt; -} diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c index 841394336..022eb1af6 100644 --- a/arch/mips/qemu/q-setup.c +++ b/arch/mips/qemu/q-setup.c @@ -2,8 +2,6 @@ #include #include -extern void qemu_reboot_setup(void); - #define QEMU_PORT_BASE 0xb4000000 const char *get_system_type(void) @@ -11,7 +9,7 @@ const char *get_system_type(void) return "Qemu"; } -void __init plat_timer_setup(struct irqaction *irq) +static void __init qemu_timer_setup(struct irqaction *irq) { /* set the clock to 100 Hz */ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ @@ -20,8 +18,8 @@ void __init plat_timer_setup(struct irqaction *irq) setup_irq(0, irq); } -void __init plat_mem_setup(void) +void __init plat_setup(void) { set_io_port_base(QEMU_PORT_BASE); - qemu_reboot_setup(); + board_timer_setup = qemu_timer_setup; } diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c index ee0514a29..b19820110 100644 --- a/arch/mips/sgi-ip22/ip22-eisa.c +++ b/arch/mips/sgi-ip22/ip22-eisa.c @@ -19,6 +19,7 @@ * - Fix more bugs. */ +#include #include #include #include @@ -144,7 +145,7 @@ static void end_eisa1_irq(unsigned int irq) enable_eisa1_irq(irq); } -static struct irq_chip ip22_eisa1_irq_type = { +static struct hw_interrupt_type ip22_eisa1_irq_type = { .typename = "IP22 EISA", .startup = startup_eisa1_irq, .shutdown = shutdown_eisa1_irq, @@ -206,7 +207,7 @@ static void end_eisa2_irq(unsigned int irq) enable_eisa2_irq(irq); } -static struct irq_chip ip22_eisa2_irq_type = { +static struct hw_interrupt_type ip22_eisa2_irq_type = { .typename = "IP22 EISA", .startup = startup_eisa2_irq, .shutdown = shutdown_eisa2_irq, @@ -278,9 +279,9 @@ int __init ip22_eisa_init(void) irq_desc[i].action = 0; irq_desc[i].depth = 1; if (i < (SGINT_EISA + 8)) - irq_desc[i].chip = &ip22_eisa1_irq_type; + irq_desc[i].handler = &ip22_eisa1_irq_type; else - irq_desc[i].chip = &ip22_eisa2_irq_type; + irq_desc[i].handler = &ip22_eisa2_irq_type; } /* Cannot use request_irq because of kmalloc not being ready at such diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index f66026e5d..fc6a7e2b1 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c @@ -9,6 +9,7 @@ * - Interrupt handling fixes * Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org) */ +#include #include #include #include @@ -74,7 +75,7 @@ static void end_local0_irq (unsigned int irq) enable_local0_irq(irq); } -static struct irq_chip ip22_local0_irq_type = { +static struct hw_interrupt_type ip22_local0_irq_type = { .typename = "IP22 local 0", .startup = startup_local0_irq, .shutdown = shutdown_local0_irq, @@ -120,7 +121,7 @@ static void end_local1_irq (unsigned int irq) enable_local1_irq(irq); } -static struct irq_chip ip22_local1_irq_type = { +static struct hw_interrupt_type ip22_local1_irq_type = { .typename = "IP22 local 1", .startup = startup_local1_irq, .shutdown = shutdown_local1_irq, @@ -166,7 +167,7 @@ static void end_local2_irq (unsigned int irq) enable_local2_irq(irq); } -static struct irq_chip ip22_local2_irq_type = { +static struct hw_interrupt_type ip22_local2_irq_type = { .typename = "IP22 local 2", .startup = startup_local2_irq, .shutdown = shutdown_local2_irq, @@ -212,7 +213,7 @@ static void end_local3_irq (unsigned int irq) enable_local3_irq(irq); } -static struct irq_chip ip22_local3_irq_type = { +static struct hw_interrupt_type ip22_local3_irq_type = { .typename = "IP22 local 3", .startup = startup_local3_irq, .shutdown = shutdown_local3_irq, @@ -272,32 +273,32 @@ static void indy_buserror_irq(struct pt_regs *regs) static struct irqaction local0_cascade = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "local0 cascade", }; static struct irqaction local1_cascade = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "local1 cascade", }; static struct irqaction buserr = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "Bus Error", }; static struct irqaction map0_cascade = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "mapable0 cascade", }; #ifdef USE_LIO3_IRQ static struct irqaction map1_cascade = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "mapable1 cascade", }; #define SGI_INTERRUPTS SGINT_END @@ -421,7 +422,7 @@ void __init arch_init_irq(void) mips_cpu_irq_init(SGINT_CPU); for (i = SGINT_LOCAL0; i < SGI_INTERRUPTS; i++) { - struct irq_chip *handler; + hw_irq_controller *handler; if (i < SGINT_LOCAL1) handler = &ip22_local0_irq_type; @@ -435,7 +436,7 @@ void __init arch_init_irq(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = handler; + irq_desc[i].handler = handler; } /* vector handler. this register the IRQ as non-sharable */ diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index 8134220ed..a9c58e067 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c @@ -34,7 +34,7 @@ #define POWERDOWN_TIMEOUT 120 /* - * Blink frequency during reboot grace period and when panicked. + * Blink frequency during reboot grace period and when paniced. */ #define POWERDOWN_FREQ (HZ / 4) #define PANIC_FREQ (HZ / 8) diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c index 25097ecc9..7018e1833 100644 --- a/arch/mips/sgi-ip22/ip22-setup.c +++ b/arch/mips/sgi-ip22/ip22-setup.c @@ -4,6 +4,7 @@ * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) */ +#include #include #include #include @@ -52,7 +53,7 @@ EXPORT_SYMBOL(ip22_do_break); extern void ip22_be_init(void) __init; extern void ip22_time_init(void) __init; -void __init plat_mem_setup(void) +void __init plat_setup(void) { char *ctype; char *cserial; diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c index 0e061890f..cca688ad6 100644 --- a/arch/mips/sgi-ip22/ip22-time.c +++ b/arch/mips/sgi-ip22/ip22-time.c @@ -7,12 +7,11 @@ * Ralf Baechle or David S. Miller (sorry guys, i'm really not sure) * * Copyright (C) 2001 by Ladislav Michl - * Copyright (C) 2003, 06 Ralf Baechle (ralf@linux-mips.org) + * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org) */ #include #include #include -#include #include #include #include @@ -77,7 +76,7 @@ static int indy_rtc_set_time(unsigned long tim) save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff; hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE; - hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year); + hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec); hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon); hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday); hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour); @@ -199,7 +198,9 @@ void indy_r4k_timer_interrupt(struct pt_regs *regs) irq_exit(); } -void __init plat_timer_setup(struct irqaction *irq) +extern int setup_irq(unsigned int irq, struct irqaction *irqaction); + +static void indy_timer_setup(struct irqaction *irq) { /* over-write the handler, we use our own way */ irq->handler = no_action; @@ -215,4 +216,5 @@ void __init ip22_time_init(void) rtc_mips_set_time = indy_rtc_set_time; board_time_init = indy_time_init; + board_timer_setup = indy_timer_setup; } diff --git a/arch/mips/sgi-ip27/Kconfig b/arch/mips/sgi-ip27/Kconfig index 5e960ae97..7b0bc4437 100644 --- a/arch/mips/sgi-ip27/Kconfig +++ b/arch/mips/sgi-ip27/Kconfig @@ -4,42 +4,43 @@ # This options adds support for userspace processes upto 16TB size. # Normally the limit is just .5TB. -choice - prompt "Node addressing mode" +config SGI_SN0_N_MODE + bool "IP27 N-Mode" depends on SGI_IP27 - default SGI_SN_M_MODE - -config SGI_SN_M_MODE - bool "IP27 M-Mode" help - The nodes of Origin, Onyx, Fuel and Tezro systems can be configured - in either N-Modes which allows for more nodes or M-Mode which allows - for more memory. Your hardware is almost certainly running in - M-Mode, so choose M-mode here. + The nodes of Origin 200, Origin 2000 and Onyx 2 systems can be + configured in either N-Modes which allows for more nodes or M-Mode + which allows for more memory. Your system is most probably + running in M-Mode, so you should say N here. -config SGI_SN_N_MODE - bool "IP27 N-Mode" - depends on EXPERIMENTAL +config ARCH_DISCONTIGMEM_ENABLE + bool + default y if SGI_IP27 help - The nodes of Origin, Onyx, Fuel and Tezro systems can be configured - in either N-Modes which allows for more nodes or M-Mode which allows - for more memory. Your hardware is almost certainly running in - M-Mode, so choose M-mode here. + Say Y to upport efficient handling of discontiguous physical memory, + for architectures which are either NUMA (Non-Uniform Memory Access) + or have huge holes in the physical address space for other reasons. + See for more. -endchoice +config NUMA + bool "NUMA Support" + depends on SGI_IP27 + help + Say Y to compile the kernel to support NUMA (Non-Uniform Memory + Access). This option is for configuring high-end multiprocessor + server machines. If in doubt, say N. config MAPPED_KERNEL bool "Mapped kernel support" depends on SGI_IP27 help Change the way a Linux kernel is loaded into memory on a MIPS64 - machine. This is required in order to support text replication on + machine. This is required in order to support text replication and NUMA. If you need to understand it, read the source code. config REPLICATE_KTEXT bool "Kernel text replication support" depends on SGI_IP27 - select MAPPED_KERNEL help Say Y here to enable replicating the kernel text across multiple nodes in a NUMA cluster. This trades memory for speed. diff --git a/arch/mips/sgi-ip27/Makefile b/arch/mips/sgi-ip27/Makefile index a457263f4..686ba14e2 100644 --- a/arch/mips/sgi-ip27/Makefile +++ b/arch/mips/sgi-ip27/Makefile @@ -2,12 +2,11 @@ # Makefile for the IP27 specific kernel interface routines under Linux. # -obj-y := ip27-berr.o ip27-irq.o ip27-init.o ip27-klconfig.o ip27-klnuma.o \ - ip27-memory.o ip27-nmi.o ip27-reset.o ip27-timer.o ip27-hubio.o \ - ip27-xtalk.o +obj-y := ip27-berr.o ip27-console.o ip27-irq.o ip27-init.o \ + ip27-klconfig.o ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-reset.o \ + ip27-timer.o ip27-hubio.o ip27-xtalk.o -obj-$(CONFIG_EARLY_PRINTK) += ip27-console.o -obj-$(CONFIG_KGDB) += ip27-dbgio.o -obj-$(CONFIG_SMP) += ip27-smp.o +obj-$(CONFIG_KGDB) += ip27-dbgio.o +obj-$(CONFIG_SMP) += ip27-smp.o EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/sgi-ip27/ip27-console.c b/arch/mips/sgi-ip27/ip27-console.c index 14211e382..3e1ac299b 100644 --- a/arch/mips/sgi-ip27/ip27-console.c +++ b/arch/mips/sgi-ip27/ip27-console.c @@ -46,29 +46,33 @@ void prom_putchar(char c) uart->iu_thr = c; } -static void ioc3_console_write(struct console *con, const char *s, unsigned n) +char __init prom_getchar(void) { - while (n-- && *s) { - if (*s == '\n') - prom_putchar('\r'); - prom_putchar(*s); - s++; - } + return 0; } -static struct console ioc3_console = { - .name = "ioc3", - .write = ioc3_console_write, - .flags = CON_PRINTBUFFER | CON_BOOT, - .index = -1 -}; - -__init void ip27_setup_console(void) +static void inline ioc3_console_probe(void) { - register_console(&ioc3_console); + struct uart_port up; + + /* + * Register to interrupt zero because we share the interrupt with + * the serial driver which we don't properly support yet. + */ + memset(&up, 0, sizeof(up)); + up.membase = (unsigned char *) console_uart(); + up.irq = 0; + up.uartclk = IOC3_CLK; + up.regshift = 0; + up.iotype = UPIO_MEM; + up.flags = IOC3_FLAGS; + up.line = 0; + + if (early_serial_setup(&up)) + printk(KERN_ERR "Early serial init of port 0 failed\n"); } -void __init disable_early_printk(void) +__init void ip27_setup_console(void) { - unregister_console(&ioc3_console); + ioc3_console_probe(); } diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 9094baf31..8651a0e75 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c @@ -6,6 +6,7 @@ * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com) * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc. */ +#include #include #include #include @@ -195,7 +196,7 @@ extern void ip27_setup_console(void); extern void ip27_time_init(void); extern void ip27_reboot_setup(void); -void __init plat_mem_setup(void) +void __init plat_setup(void) { hubreg_t p, e, n_mode; nasid_t nid; @@ -227,7 +228,7 @@ void __init plat_mem_setup(void) */ n_mode = LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_MORENODES_MASK; printk("Machine is in %c mode.\n", n_mode ? 'N' : 'M'); -#ifdef CONFIG_SGI_SN_N_MODE +#ifdef CONFIG_SGI_SN0_N_MODE if (!n_mode) panic("Kernel compiled for M mode."); #else diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 24a853722..2e643d2f5 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c @@ -8,6 +8,7 @@ #undef DEBUG +#include #include #include #include @@ -118,7 +119,7 @@ static int ms1bit(unsigned long x) } /* - * This code is unnecessarily complex, because we do IRQF_DISABLED + * This code is unnecessarily complex, because we do SA_INTERRUPT * intr enabling. Basically, once we grab the set of intrs we need * to service, we must mask _all_ these interrupts; firstly, to make * sure the same intr does not intr again, causing recursion that @@ -296,6 +297,7 @@ static void shutdown_bridge_irq(unsigned int irq) struct bridge_controller *bc = IRQ_TO_BRIDGE(irq); struct hub_data *hub = hub_data(cpu_to_node(bc->irq_cpu)); bridge_t *bridge = bc->base; + struct slice_data *si = cpu_data[bc->irq_cpu].data; int pin, swlevel; cpuid_t cpu; @@ -310,6 +312,7 @@ static void shutdown_bridge_irq(unsigned int irq) intr_disconnect_level(cpu, swlevel); __clear_bit(swlevel, hub->irq_alloc_mask); + si->level_to_irq[swlevel] = -1; bridge->b_int_enable &= ~(1 << pin); bridge->b_wid_tflush; @@ -345,7 +348,7 @@ static void end_bridge_irq(unsigned int irq) enable_bridge_irq(irq); } -static struct irq_chip bridge_irq_type = { +static struct hw_interrupt_type bridge_irq_type = { .typename = "bridge", .startup = startup_bridge_irq, .shutdown = shutdown_bridge_irq, @@ -357,7 +360,7 @@ static struct irq_chip bridge_irq_type = { static unsigned long irq_map[NR_IRQS / BITS_PER_LONG]; -int allocate_irqno(void) +static int allocate_irqno(void) { int irq; @@ -383,7 +386,7 @@ void __devinit register_bridge_irq(unsigned int irq) irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 1; - irq_desc[irq].chip = &bridge_irq_type; + irq_desc[irq].handler = &bridge_irq_type; } int __devinit request_bridge_irq(struct bridge_controller *bc) diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c index d777b7d1a..41c3f405e 100644 --- a/arch/mips/sgi-ip27/ip27-klnuma.c +++ b/arch/mips/sgi-ip27/ip27-klnuma.c @@ -3,6 +3,7 @@ * Copyright 2000 - 2001 Silicon Graphics, Inc. * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com) */ +#include #include #include #include diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index efe6971fc..6c00dce9f 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c @@ -10,6 +10,7 @@ * On SGI IP27 the ARC memory configuration data is completly bogus but * alternate easier to use mechanisms are available. */ +#include #include #include #include diff --git a/arch/mips/sgi-ip27/ip27-reset.c b/arch/mips/sgi-ip27/ip27-reset.c index c17076108..4322db57d 100644 --- a/arch/mips/sgi-ip27/ip27-reset.c +++ b/arch/mips/sgi-ip27/ip27-reset.c @@ -8,6 +8,7 @@ * Copyright (C) 1997, 1998, 1999, 2000, 06 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ +#include #include #include #include diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index b029ba79c..36b662e27 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c @@ -1,5 +1,5 @@ /* - * Copytight (C) 1999, 2000, 05, 06 Ralf Baechle (ralf@linux-mips.org) + * Copytight (C) 1999, 2000, 05 Ralf Baechle (ralf@linux-mips.org) * Copytight (C) 1999, 2000 Silicon Graphics, Inc. */ #include @@ -89,13 +89,11 @@ static int set_rtc_mmss(unsigned long nowtime) } #endif -static unsigned int rt_timer_irq; - void ip27_rt_timer_interrupt(struct pt_regs *regs) { int cpu = smp_processor_id(); int cpuA = cputoslice(cpu) == 0; - unsigned int irq = rt_timer_irq; + int irq = 9; /* XXX Assign number */ irq_enter(); write_seqlock(&xtime_lock); @@ -181,73 +179,13 @@ static __init unsigned long get_m48t35_time(void) return mktime(year, month, date, hour, min, sec); } -static unsigned int startup_rt_irq(unsigned int irq) -{ - return 0; -} - -static void shutdown_rt_irq(unsigned int irq) -{ -} - -static void enable_rt_irq(unsigned int irq) -{ -} - -static void disable_rt_irq(unsigned int irq) -{ -} - -static void mask_and_ack_rt(unsigned int irq) +static void ip27_timer_setup(struct irqaction *irq) { -} - -static void end_rt_irq(unsigned int irq) -{ -} - -static struct irq_chip rt_irq_type = { - .typename = "SN HUB RT timer", - .startup = startup_rt_irq, - .shutdown = shutdown_rt_irq, - .enable = enable_rt_irq, - .disable = disable_rt_irq, - .ack = mask_and_ack_rt, - .end = end_rt_irq, -}; - -static struct irqaction rt_irqaction = { - .handler = ip27_rt_timer_interrupt, - .flags = IRQF_DISABLED, - .mask = CPU_MASK_NONE, - .name = "timer" -}; - -extern int allocate_irqno(void); - -void __init plat_timer_setup(struct irqaction *irq) -{ - int irqno = allocate_irqno(); - - if (irqno < 0) - panic("Can't allocate interrupt number for timer interrupt"); - - irq_desc[irqno].status = IRQ_DISABLED; - irq_desc[irqno].action = NULL; - irq_desc[irqno].depth = 1; - irq_desc[irqno].chip = &rt_irq_type; - /* over-write the handler, we use our own way */ irq->handler = no_action; /* setup irqaction */ - irq_desc[irqno].status |= IRQ_PER_CPU; - - rt_timer_irq = irqno; - /* - * Only needed to get /proc/interrupt to display timer irq stats - */ - setup_irq(irqno, &rt_irqaction); +// setup_irq(IP27_TIMER_IRQ, irq); /* XXX Can't do this yet. */ } void __init ip27_time_init(void) @@ -256,6 +194,8 @@ void __init ip27_time_init(void) xtime.tv_nsec = 0; do_gettimeoffset = ip27_do_gettimeoffset; + + board_timer_setup = ip27_timer_setup; } void __init cpu_time_init(void) diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index c64a82037..8ba08047d 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c @@ -125,9 +125,9 @@ extern irqreturn_t crime_memerr_intr (int irq, void *dev_id, extern irqreturn_t crime_cpuerr_intr (int irq, void *dev_id, struct pt_regs *regs); -struct irqaction memerr_irq = { crime_memerr_intr, IRQF_DISABLED, +struct irqaction memerr_irq = { crime_memerr_intr, SA_INTERRUPT, CPU_MASK_NONE, "CRIME memory error", NULL, NULL }; -struct irqaction cpuerr_irq = { crime_cpuerr_intr, IRQF_DISABLED, +struct irqaction cpuerr_irq = { crime_cpuerr_intr, SA_INTERRUPT, CPU_MASK_NONE, "CRIME CPU error", NULL, NULL }; /* @@ -160,7 +160,7 @@ static void end_cpu_irq(unsigned int irq) #define shutdown_cpu_irq disable_cpu_irq #define mask_and_ack_cpu_irq disable_cpu_irq -static struct irq_chip ip32_cpu_interrupt = { +static struct hw_interrupt_type ip32_cpu_interrupt = { .typename = "IP32 CPU", .startup = startup_cpu_irq, .shutdown = shutdown_cpu_irq, @@ -230,7 +230,7 @@ static void end_crime_irq(unsigned int irq) #define shutdown_crime_irq disable_crime_irq -static struct irq_chip ip32_crime_interrupt = { +static struct hw_interrupt_type ip32_crime_interrupt = { .typename = "IP32 CRIME", .startup = startup_crime_irq, .shutdown = shutdown_crime_irq, @@ -289,7 +289,7 @@ static void end_macepci_irq(unsigned int irq) #define shutdown_macepci_irq disable_macepci_irq #define mask_and_ack_macepci_irq disable_macepci_irq -static struct irq_chip ip32_macepci_interrupt = { +static struct hw_interrupt_type ip32_macepci_interrupt = { .typename = "IP32 MACE PCI", .startup = startup_macepci_irq, .shutdown = shutdown_macepci_irq, @@ -419,7 +419,7 @@ static void end_maceisa_irq(unsigned irq) #define shutdown_maceisa_irq disable_maceisa_irq -static struct irq_chip ip32_maceisa_interrupt = { +static struct hw_interrupt_type ip32_maceisa_interrupt = { .typename = "IP32 MACE ISA", .startup = startup_maceisa_irq, .shutdown = shutdown_maceisa_irq, @@ -469,7 +469,7 @@ static void end_mace_irq(unsigned int irq) #define shutdown_mace_irq disable_mace_irq #define mask_and_ack_mace_irq disable_mace_irq -static struct irq_chip ip32_mace_interrupt = { +static struct hw_interrupt_type ip32_mace_interrupt = { .typename = "IP32 MACE", .startup = startup_mace_irq, .shutdown = shutdown_mace_irq, @@ -575,7 +575,7 @@ void __init arch_init_irq(void) mace->perif.ctrl.imask = 0; for (irq = 0; irq <= IP32_IRQ_MAX; irq++) { - struct irq_chip *controller; + hw_irq_controller *controller; if (irq == IP32_R4K_TIMER_IRQ) controller = &ip32_cpu_interrupt; @@ -591,7 +591,7 @@ void __init arch_init_irq(void) irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 0; - irq_desc[irq].chip = controller; + irq_desc[irq].handler = controller; } setup_irq(CRIME_MEMERR_IRQ, &memerr_irq); setup_irq(CRIME_CPUERR_IRQ, &cpuerr_irq); diff --git a/arch/mips/sgi-ip32/ip32-reset.c b/arch/mips/sgi-ip32/ip32-reset.c index 79ddb4605..ab9d9cef0 100644 --- a/arch/mips/sgi-ip32/ip32-reset.c +++ b/arch/mips/sgi-ip32/ip32-reset.c @@ -28,13 +28,13 @@ #define POWERDOWN_TIMEOUT 120 /* - * Blink frequency during reboot grace period and when panicked. + * Blink frequency during reboot grace period and when paniced. */ #define POWERDOWN_FREQ (HZ / 4) #define PANIC_FREQ (HZ / 8) static struct timer_list power_timer, blink_timer, debounce_timer; -static int has_panicked, shuting_down; +static int has_paniced, shuting_down; static void ip32_machine_restart(char *command) __attribute__((noreturn)); static void ip32_machine_halt(void) __attribute__((noreturn)); @@ -109,7 +109,7 @@ static void debounce(unsigned long data) } CMOS_WRITE(reg_a & ~DS_REGA_DV0, RTC_REG_A); - if (has_panicked) + if (has_paniced) ip32_machine_restart(NULL); enable_irq(MACEISA_RTC_IRQ); @@ -117,7 +117,7 @@ static void debounce(unsigned long data) static inline void ip32_power_button(void) { - if (has_panicked) + if (has_paniced) return; if (shuting_down || kill_proc(1, SIGINT, 1)) { @@ -161,9 +161,9 @@ static int panic_event(struct notifier_block *this, unsigned long event, { unsigned long led; - if (has_panicked) + if (has_paniced) return NOTIFY_DONE; - has_panicked = 1; + has_paniced = 1; /* turn off the green LED */ led = mace->perif.ctrl.misc | MACEISA_LED_GREEN; diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c index 57708fe28..a2dd8ae1e 100644 --- a/arch/mips/sgi-ip32/ip32-setup.c +++ b/arch/mips/sgi-ip32/ip32-setup.c @@ -7,8 +7,8 @@ * * Copyright (C) 2000 Harald Koerfgen * Copyright (C) 2002, 2003, 2005 Ilya A. Volynets - * Copyright (C) 2006 Ralf Baechle */ +#include #include #include #include @@ -81,13 +81,13 @@ void __init ip32_time_init(void) printk("%d MHz CPU detected\n", mips_hpt_frequency * 2 / 1000000); } -void __init plat_timer_setup(struct irqaction *irq) +void __init ip32_timer_setup(struct irqaction *irq) { irq->handler = no_action; setup_irq(IP32_R4K_TIMER_IRQ, irq); } -void __init plat_mem_setup(void) +void __init plat_setup(void) { board_be_init = ip32_be_init; @@ -95,6 +95,7 @@ void __init plat_mem_setup(void) rtc_mips_set_mmss = mc146818_set_rtc_mmss; board_time_init = ip32_time_init; + board_timer_setup = ip32_timer_setup; #ifdef CONFIG_SERIAL_8250 { diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig index ec7a2cffa..816aee7fc 100644 --- a/arch/mips/sibyte/Kconfig +++ b/arch/mips/sibyte/Kconfig @@ -3,7 +3,6 @@ config SIBYTE_SB1250 select HW_HAS_PCI select SIBYTE_HAS_LDT select SIBYTE_SB1xxx_SOC - select SYS_SUPPORTS_SMP config SIBYTE_BCM1120 bool @@ -31,13 +30,11 @@ config SIBYTE_BCM1x80 bool select HW_HAS_PCI select SIBYTE_SB1xxx_SOC - select SYS_SUPPORTS_SMP config SIBYTE_BCM1x55 bool select HW_HAS_PCI select SIBYTE_SB1xxx_SOC - select SYS_SUPPORTS_SMP config SIBYTE_SB1xxx_SOC bool diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index ed325f0ab..e61760b14 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include @@ -83,7 +84,7 @@ extern char sb1250_duart_present[]; #endif #endif -static struct irq_chip bcm1480_irq_type = { +static struct hw_interrupt_type bcm1480_irq_type = { .typename = "BCM1480-IMR", .startup = startup_bcm1480_irq, .shutdown = shutdown_bcm1480_irq, @@ -140,7 +141,7 @@ static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask) { int i = 0, old_cpu, cpu, int_on, k; u64 cur_ints; - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; unsigned int irq_dirty; @@ -275,10 +276,10 @@ void __init init_bcm1480_irqs(void) irq_desc[i].action = 0; irq_desc[i].depth = 1; if (i < BCM1480_NR_IRQS) { - irq_desc[i].chip = &bcm1480_irq_type; + irq_desc[i].handler = &bcm1480_irq_type; bcm1480_irq_owner[i] = 0; } else { - irq_desc[i].chip = &no_irq_chip; + irq_desc[i].handler = &no_irq_type; } } } @@ -301,7 +302,7 @@ static struct irqaction bcm1480_dummy_action = { int bcm1480_steal_irq(int irq) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; int retval = 0; @@ -502,23 +503,22 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs) #ifdef CONFIG_SIBYTE_BCM1480_PROF if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ sbprof_cpu_intr(exception_epc(regs)); - else #endif if (pending & CAUSEF_IP4) bcm1480_timer_interrupt(regs); #ifdef CONFIG_SMP - else if (pending & CAUSEF_IP3) + if (pending & CAUSEF_IP3) bcm1480_mailbox_interrupt(regs); #endif #ifdef CONFIG_KGDB - else if (pending & CAUSEF_IP6) + if (pending & CAUSEF_IP6) bcm1480_kgdb_interrupt(regs); /* KGDB (uart 1) */ #endif - else if (pending & CAUSEF_IP2) { + if (pending & CAUSEF_IP2) { unsigned long long mask_h, mask_l; unsigned long base; @@ -534,7 +534,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs) mask_l = __raw_readq( IOADDR(base + R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L)); - if (mask_h) { + if (!mask_h) { if (mask_h ^ 1) do_IRQ(63 - dclz(mask_h), regs); else diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c index 8236d0c48..d90a0b878 100644 --- a/arch/mips/sibyte/bcm1480/setup.c +++ b/arch/mips/sibyte/bcm1480/setup.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c index 7e088f6c4..e54575269 100644 --- a/arch/mips/sibyte/bcm1480/time.c +++ b/arch/mips/sibyte/bcm1480/time.c @@ -25,6 +25,7 @@ * code to do general bookkeeping (e.g. update jiffies, run * bottom halves, etc.) */ +#include #include #include #include @@ -109,18 +110,17 @@ void bcm1480_timer_interrupt(struct pt_regs *regs) __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); + /* + * CPU 0 handles the global timer interrupt job + */ if (cpu == 0) { - /* - * CPU 0 handles the global timer interrupt job - */ ll_timer_interrupt(irq, regs); } - else { - /* - * other CPUs should just do profiling and process accounting - */ - ll_local_timer_interrupt(irq, regs); - } + + /* + * every CPU should do profiling and process accouting + */ + ll_local_timer_interrupt(irq, regs); } /* diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c index c6ec74817..7721100d0 100644 --- a/arch/mips/sibyte/cfe/console.c +++ b/arch/mips/sibyte/cfe/console.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c index 6e8952da6..ea3080294 100644 --- a/arch/mips/sibyte/cfe/setup.c +++ b/arch/mips/sibyte/cfe/setup.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c index bb90649fb..482dee054 100644 --- a/arch/mips/sibyte/sb1250/bus_watcher.c +++ b/arch/mips/sibyte/sb1250/bus_watcher.c @@ -25,6 +25,7 @@ * /proc/bus_watcher if PROC_FS is on. */ +#include #include #include #include diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 1de71adec..0f6e54db4 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include @@ -69,7 +70,7 @@ extern char sb1250_duart_present[]; #endif #endif -static struct irq_chip sb1250_irq_type = { +static struct hw_interrupt_type sb1250_irq_type = { .typename = "SB1250-IMR", .startup = startup_sb1250_irq, .shutdown = shutdown_sb1250_irq, @@ -120,7 +121,7 @@ static void sb1250_set_affinity(unsigned int irq, cpumask_t mask) { int i = 0, old_cpu, cpu, int_on; u64 cur_ints; - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; i = first_cpu(mask); @@ -245,10 +246,10 @@ void __init init_sb1250_irqs(void) irq_desc[i].action = 0; irq_desc[i].depth = 1; if (i < SB1250_NR_IRQS) { - irq_desc[i].chip = &sb1250_irq_type; + irq_desc[i].handler = &sb1250_irq_type; sb1250_irq_owner[i] = 0; } else { - irq_desc[i].chip = &no_irq_chip; + irq_desc[i].handler = &no_irq_type; } } } @@ -271,7 +272,7 @@ static struct irqaction sb1250_dummy_action = { int sb1250_steal_irq(int irq) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; int retval = 0; @@ -434,17 +435,13 @@ static inline int dclz(unsigned long long x) return lz; } -extern void sb1250_timer_interrupt(struct pt_regs *regs); -extern void sb1250_mailbox_interrupt(struct pt_regs *regs); -extern void sb1250_kgdb_interrupt(struct pt_regs *regs); - asmlinkage void plat_irq_dispatch(struct pt_regs *regs) { unsigned int pending; #ifdef CONFIG_SIBYTE_SB1250_PROF /* Set compare to count to silence count/compare timer interrupts */ - write_c0_compare(read_c0_count()); + write_c0_count(read_c0_count()); #endif /* @@ -460,32 +457,32 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs) pending = read_c0_cause(); #ifdef CONFIG_SIBYTE_SB1250_PROF - if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ + if (pending & CAUSEF_IP7) { /* Cpu performance counter interrupt */ sbprof_cpu_intr(exception_epc(regs)); - else + } #endif if (pending & CAUSEF_IP4) sb1250_timer_interrupt(regs); #ifdef CONFIG_SMP - else if (pending & CAUSEF_IP3) + if (pending & CAUSEF_IP3) sb1250_mailbox_interrupt(regs); #endif #ifdef CONFIG_KGDB - else if (pending & CAUSEF_IP6) /* KGDB (uart 1) */ + if (pending & CAUSEF_IP6) /* KGDB (uart 1) */ sb1250_kgdb_interrupt(regs); #endif - else if (pending & CAUSEF_IP2) { + if (pending & CAUSEF_IP2) { unsigned long long mask; /* * Default...we've hit an IP[2] interrupt, which means we've * got to check the 1250 interrupt registers to figure out what * to do. Need to detect which CPU we're on, now that - * smp_affinity is supported. + ~ smp_affinity is supported. */ mask = __raw_readq(IOADDR(A_IMR_REGISTER(smp_processor_id(), R_IMR_INTERRUPT_STATUS_BASE))); diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c index 3c33a4517..742043f8d 100644 --- a/arch/mips/sibyte/sb1250/prom.c +++ b/arch/mips/sibyte/sb1250/prom.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index d0ee1d5b8..fde4751c8 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index 4b669dc86..1588f6deb 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c @@ -25,6 +25,7 @@ * code to do general bookkeeping (e.g. update jiffies, run * bottom halves, etc.) */ +#include #include #include #include diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index ac342f564..4b5f74ff3 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c @@ -21,13 +21,14 @@ * Setup code for the SWARM board */ +#include #include #include #include #include #include #include -#include +#include #include #include @@ -71,13 +72,11 @@ const char *get_system_type(void) void __init swarm_time_init(void) { -#if defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) /* Setup HPT */ sb1250_hpt_setup(); -#endif } -void __init plat_timer_setup(struct irqaction *irq) +void __init swarm_timer_setup(struct irqaction *irq) { /* * we don't set up irqaction, because we will deliver timer @@ -104,7 +103,7 @@ int swarm_be_handler(struct pt_regs *regs, int is_fixup) return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL); } -void __init plat_mem_setup(void) +void __init plat_setup(void) { #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) bcm1480_setup(); @@ -117,6 +116,7 @@ void __init plat_mem_setup(void) panic_timeout = 5; /* For debug. */ board_time_init = swarm_time_init; + board_timer_setup = swarm_timer_setup; board_be_handler = swarm_be_handler; if (xicor_probe()) { diff --git a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile index a5eb0adb8..9c7eaa5fb 100644 --- a/arch/mips/sni/Makefile +++ b/arch/mips/sni/Makefile @@ -3,6 +3,5 @@ # obj-y += irq.o pcimt_scache.o reset.o setup.o -obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c index cda165f42..7365b4853 100644 --- a/arch/mips/sni/irq.c +++ b/arch/mips/sni/irq.c @@ -55,7 +55,7 @@ static void end_pciasic_irq(unsigned int irq) enable_pciasic_irq(irq); } -static struct irq_chip pciasic_irq_type = { +static struct hw_interrupt_type pciasic_irq_type = { .typename = "ASIC-PCI", .startup = startup_pciasic_irq, .shutdown = shutdown_pciasic_irq, @@ -203,7 +203,7 @@ void __init arch_init_irq(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &pciasic_irq_type; + irq_desc[i].handler = &pciasic_irq_type; } change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ2|IE_IRQ3|IE_IRQ4); diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 4e98feb15..01ba6c581 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c @@ -7,6 +7,7 @@ * * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) */ +#include #include #include #include @@ -18,13 +19,10 @@ #include #include #include -#include +#include -#ifdef CONFIG_ARC #include #include -#endif - #include #include #include @@ -41,7 +39,7 @@ extern void sni_machine_restart(char *command); extern void sni_machine_halt(void); extern void sni_machine_power_off(void); -void __init plat_timer_setup(struct irqaction *irq) +static void __init sni_rm200_pci_timer_setup(struct irqaction *irq) { /* set the clock to 100 Hz */ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ @@ -74,7 +72,8 @@ static inline void sni_pcimt_detect(void) static void __init sni_display_setup(void) { -#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) && defined(CONFIG_ARC) +#ifdef CONFIG_VT +#if defined(CONFIG_VGA_CONSOLE) struct screen_info *si = &screen_info; DISPLAY_STATUS *di; @@ -89,54 +88,24 @@ static void __init sni_display_setup(void) si->orig_video_points = 16; } #endif +#endif } static struct resource sni_io_resource = { - .start = 0x00001000UL, - .end = 0x03bfffffUL, - .name = "PCIMT IO MEM", - .flags = IORESOURCE_IO, + "PCIMT IO MEM", 0x00001000UL, 0x03bfffffUL, IORESOURCE_IO, }; static struct resource pcimt_io_resources[] = { - { - .start = 0x00, - .end = 0x1f, - .name = "dma1", - .flags = IORESOURCE_BUSY - }, { - .start = 0x40, - .end = 0x5f, - .name = "timer", - .flags = IORESOURCE_BUSY - }, { - .start = 0x60, - .end = 0x6f, - .name = "keyboard", - .flags = IORESOURCE_BUSY - }, { - .start = 0x80, - .end = 0x8f, - .name = "dma page reg", - .flags = IORESOURCE_BUSY - }, { - .start = 0xc0, - .end = 0xdf, - .name = "dma2", - .flags = IORESOURCE_BUSY - }, { - .start = 0xcfc, - .end = 0xcff, - .name = "PCI config data", - .flags = IORESOURCE_BUSY - } + { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, + { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, + { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, + { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, + { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, + { "PCI config data", 0xcfc, 0xcff, IORESOURCE_BUSY } }; static struct resource sni_mem_resource = { - .start = 0x10000000UL, - .end = 0xffffffffUL, - .name = "PCIMT PCI MEM", - .flags = IORESOURCE_MEM + "PCIMT PCI MEM", 0x10000000UL, 0xffffffffUL, IORESOURCE_MEM }; /* @@ -153,72 +122,19 @@ static struct resource sni_mem_resource = { * 0xa0000000 - 0xffffffff (1.5GB) PCI/EISA Bus Memory */ static struct resource pcimt_mem_resources[] = { - { - .start = 0x100a0000, - .end = 0x100bffff, - .name = "Video RAM area", - .flags = IORESOURCE_BUSY - }, { - .start = 0x100c0000, - .end = 0x100fffff, - .name = "ISA Reserved", - .flags = IORESOURCE_BUSY - }, { - .start = 0x14000000, - .end = 0x17bfffff, - .name = "PCI IO", - .flags = IORESOURCE_BUSY - }, { - .start = 0x17c00000, - .end = 0x17ffffff, - .name = "Cache Replacement Area", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1a000000, - .end = 0x1a000003, - .name = "PCI INT Acknowledge", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1fc00000, - .end = 0x1fc7ffff, - .name = "Boot PROM", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1fc80000, - .end = 0x1fcfffff, - .name = "Diag PROM", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1fd00000, - .end = 0x1fdfffff, - .name = "X-Bus", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1fe00000, - .end = 0x1fefffff, - .name = "BIOS map", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1ff00000, - .end = 0x1ff7ffff, - .name = "NVRAM / EEPROM", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1fff0000, - .end = 0x1fffefff, - .name = "ASIC PCI", - .flags = IORESOURCE_BUSY - }, { - .start = 0x1ffff000, - .end = 0x1fffffff, - .name = "MP Agent", - .flags = IORESOURCE_BUSY - }, { - .start = 0x20000000, - .end = 0x9fffffff, - .name = "Main Memory", - .flags = IORESOURCE_BUSY - } + { "Video RAM area", 0x100a0000, 0x100bffff, IORESOURCE_BUSY }, + { "ISA Reserved", 0x100c0000, 0x100fffff, IORESOURCE_BUSY }, + { "PCI IO", 0x14000000, 0x17bfffff, IORESOURCE_BUSY }, + { "Cache Replacement Area", 0x17c00000, 0x17ffffff, IORESOURCE_BUSY}, + { "PCI INT Acknowledge", 0x1a000000, 0x1a000003, IORESOURCE_BUSY }, + { "Boot PROM", 0x1fc00000, 0x1fc7ffff, IORESOURCE_BUSY}, + { "Diag PROM", 0x1fc80000, 0x1fcfffff, IORESOURCE_BUSY}, + { "X-Bus", 0x1fd00000, 0x1fdfffff, IORESOURCE_BUSY}, + { "BIOS map", 0x1fe00000, 0x1fefffff, IORESOURCE_BUSY}, + { "NVRAM / EEPROM", 0x1ff00000, 0x1ff7ffff, IORESOURCE_BUSY}, + { "ASIC PCI", 0x1fff0000, 0x1fffefff, IORESOURCE_BUSY}, + { "MP Agent", 0x1ffff000, 0x1fffffff, IORESOURCE_BUSY}, + { "Main Memory", 0x20000000, 0x9fffffff, IORESOURCE_BUSY} }; static void __init sni_resource_init(void) @@ -252,7 +168,7 @@ static inline void sni_pcimt_time_init(void) rtc_mips_set_time = mc146818_set_rtc_mmss; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { sni_pcimt_detect(); sni_pcimt_sc_init(); @@ -270,6 +186,7 @@ void __init plat_mem_setup(void) #endif sni_resource_init(); + board_timer_setup = sni_rm200_pci_timer_setup; _machine_restart = sni_machine_restart; _machine_halt = sni_machine_halt; diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c deleted file mode 100644 index d1d0f1f49..000000000 --- a/arch/mips/sni/sniprom.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Big Endian PROM code for SNI RM machines - * - * 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) 2005-2006 Florian Lohoff (flo@rfc822.org) - * Copyright (C) 2005-2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) - */ - -#include -#include -#include - -#include -#include -#include -#include - -/* special SNI prom calls */ -/* - * This does not exist in all proms - SINIX compares - * the prom env variable "version" against "2.0008" - * or greater. If lesser it tries to probe interesting - * registers - */ -#define PROM_GET_MEMCONF 58 - -#define PROM_VEC (u64 *)CKSEG1ADDR(0x1fc00000) -#define PROM_ENTRY(x) (PROM_VEC + (x)) - - -#undef DEBUG -#ifdef DEBUG -#define DBG_PRINTF(x...) prom_printf(x) -#else -#define DBG_PRINTF(x...) -#endif - -static int *(*__prom_putchar)(int) = (int *(*)(int))PROM_ENTRY(PROM_PUTCHAR); -static char *(*__prom_getenv)(char *) = (char *(*)(char *))PROM_ENTRY(PROM_GETENV); -static void (*__prom_get_memconf)(void *) = (void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF); - -char *prom_getenv (char *s) -{ - return __prom_getenv(s); -} - -void prom_printf(char *fmt, ...) -{ - va_list args; - char ppbuf[1024]; - char *bptr; - - va_start(args, fmt); - vsprintf(ppbuf, fmt, args); - - bptr = ppbuf; - - while (*bptr != 0) { - if (*bptr == '\n') - __prom_putchar('\r'); - - __prom_putchar(*bptr++); - } - va_end(args); -} - -unsigned long prom_free_prom_memory(void) -{ - return 0; -} - -/* - * /proc/cpuinfo system type - * - */ -static const char *systype = "Unknown"; -const char *get_system_type(void) -{ - return systype; -} - -#define SNI_IDPROM_BASE 0xbff00000 -#define SNI_IDPROM_MEMSIZE (SNI_IDPROM_BASE+0x28) /* Memsize in 16MB quantities */ -#define SNI_IDPROM_BRDTYPE (SNI_IDPROM_BASE+0x29) /* Board Type */ -#define SNI_IDPROM_CPUTYPE (SNI_IDPROM_BASE+0x30) /* CPU Type */ - -#define SNI_IDPROM_SIZE 0x1000 - -#ifdef DEBUG -static void sni_idprom_dump(void) -{ - int i; - - prom_printf("SNI IDProm dump (first 128byte):\n"); - for(i=0;i<128;i++) { - if (i%16 == 0) - prom_printf("%04x ", i); - - prom_printf("%02x ", *(unsigned char *) (SNI_IDPROM_BASE+i)); - - if (i%16 == 15) - prom_printf("\n"); - } -} -#endif - -static void sni_mem_init(void ) -{ - int i, memsize; - struct membank { - u32 size; - u32 base; - u32 size2; - u32 pad1; - u32 pad2; - } memconf[8]; - - /* MemSIZE from prom in 16MByte chunks */ - memsize=*((unsigned char *) SNI_IDPROM_MEMSIZE) * 16; - - DBG_PRINTF("IDProm memsize: %lu MByte\n", memsize); - - /* get memory bank layout from prom */ - __prom_get_memconf(&memconf); - - DBG_PRINTF("prom_get_mem_conf memory configuration:\n"); - for(i=0;i<8 && memconf[i].size;i++) { - prom_printf("Bank%d: %08x @ %08x\n", i, - memconf[i].size, memconf[i].base); - add_memory_region(memconf[i].base, memconf[i].size, BOOT_MEM_RAM); - } -} - -void __init prom_init(void) -{ - int argc = fw_arg0; - char **argv = (void *)fw_arg1; - unsigned int sni_brd_type = *(unsigned char *) SNI_IDPROM_BRDTYPE; - int i; - - DBG_PRINTF("Found SNI brdtype %02x\n", sni_brd_type); - -#ifdef DEBUG - sni_idprom_dump(); -#endif - sni_mem_init(); - - /* copy prom cmdline parameters to kernel cmdline */ - for (i = 1; i < argc; i++) { - strcat(arcs_cmdline, argv[i]); - if (i < (argc - 1)) - strcat(arcs_cmdline, " "); - } -} - diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c index cd176f6a0..8ca68015c 100644 --- a/arch/mips/tx4927/common/tx4927_irq.c +++ b/arch/mips/tx4927/common/tx4927_irq.c @@ -23,6 +23,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -146,7 +147,7 @@ static DEFINE_SPINLOCK(tx4927_cp0_lock); static DEFINE_SPINLOCK(tx4927_pic_lock); #define TX4927_CP0_NAME "TX4927-CP0" -static struct irq_chip tx4927_irq_cp0_type = { +static struct hw_interrupt_type tx4927_irq_cp0_type = { .typename = TX4927_CP0_NAME, .startup = tx4927_irq_cp0_startup, .shutdown = tx4927_irq_cp0_shutdown, @@ -158,7 +159,7 @@ static struct irq_chip tx4927_irq_cp0_type = { }; #define TX4927_PIC_NAME "TX4927-PIC" -static struct irq_chip tx4927_irq_pic_type = { +static struct hw_interrupt_type tx4927_irq_pic_type = { .typename = TX4927_PIC_NAME, .startup = tx4927_irq_pic_startup, .shutdown = tx4927_irq_pic_shutdown, @@ -226,7 +227,7 @@ static void __init tx4927_irq_cp0_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &tx4927_irq_cp0_type; + irq_desc[i].handler = &tx4927_irq_cp0_type; } return; @@ -434,7 +435,7 @@ static void __init tx4927_irq_pic_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 2; - irq_desc[i].chip = &tx4927_irq_pic_type; + irq_desc[i].handler = &tx4927_irq_pic_type; } setup_irq(TX4927_IRQ_NEST_PIC_ON_CP0, &tx4927_irq_pic_action); diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c index 3ace40373..77c3b66fb 100644 --- a/arch/mips/tx4927/common/tx4927_setup.c +++ b/arch/mips/tx4927/common/tx4927_setup.c @@ -24,6 +24,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -50,6 +51,7 @@ #undef DEBUG void __init tx4927_time_init(void); +void __init tx4927_timer_setup(struct irqaction *irq); void dump_cp0(char *key); @@ -62,9 +64,10 @@ static void tx4927_write_buffer_flush(void) } -void __init plat_mem_setup(void) +void __init plat_setup(void) { board_time_init = tx4927_time_init; + board_timer_setup = tx4927_timer_setup; __wbflush = tx4927_write_buffer_flush; #ifdef CONFIG_TOSHIBA_RBTX4927 @@ -89,7 +92,7 @@ void __init tx4927_time_init(void) } -void __init plat_timer_setup(struct irqaction *irq) +void __init tx4927_timer_setup(struct irqaction *irq) { u32 count; u32 c1; diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c index b0f021f2a..aee07ff22 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c @@ -111,6 +111,7 @@ SuperIO/PS2/Mouse, using INTR via ISA IRQ12 (mouse not currently supported) JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthBridge, JP4, JP5, JP6 */ +#include #include #include #include @@ -251,7 +252,7 @@ static DEFINE_SPINLOCK(toshiba_rbtx4927_ioc_lock); #define TOSHIBA_RBTX4927_IOC_NAME "RBTX4927-IOC" -static struct irq_chip toshiba_rbtx4927_irq_ioc_type = { +static struct hw_interrupt_type toshiba_rbtx4927_irq_ioc_type = { .typename = TOSHIBA_RBTX4927_IOC_NAME, .startup = toshiba_rbtx4927_irq_ioc_startup, .shutdown = toshiba_rbtx4927_irq_ioc_shutdown, @@ -267,7 +268,7 @@ static struct irq_chip toshiba_rbtx4927_irq_ioc_type = { #ifdef CONFIG_TOSHIBA_FPCIB0 #define TOSHIBA_RBTX4927_ISA_NAME "RBTX4927-ISA" -static struct irq_chip toshiba_rbtx4927_irq_isa_type = { +static struct hw_interrupt_type toshiba_rbtx4927_irq_isa_type = { .typename = TOSHIBA_RBTX4927_ISA_NAME, .startup = toshiba_rbtx4927_irq_isa_startup, .shutdown = toshiba_rbtx4927_irq_isa_shutdown, @@ -337,7 +338,7 @@ int toshiba_rbtx4927_irq_nested(int sw_irq) } //#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL } -#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, IRQF_SHARED, CPU_MASK_NONE, s, NULL, NULL } +#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, SA_SHIRQ, CPU_MASK_NONE, s, NULL, NULL } static struct irqaction toshiba_rbtx4927_irq_ioc_action = TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME); #ifdef CONFIG_TOSHIBA_FPCIB0 @@ -367,7 +368,7 @@ static void __init toshiba_rbtx4927_irq_ioc_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 3; - irq_desc[i].chip = &toshiba_rbtx4927_irq_ioc_type; + irq_desc[i].handler = &toshiba_rbtx4927_irq_ioc_type; } setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_IOC_ON_PIC, @@ -525,7 +526,7 @@ static void __init toshiba_rbtx4927_irq_isa_init(void) irq_desc[i].action = 0; irq_desc[i].depth = ((i < TOSHIBA_RBTX4927_IRQ_ISA_MID) ? (4) : (5)); - irq_desc[i].chip = &toshiba_rbtx4927_irq_isa_type; + irq_desc[i].handler = &toshiba_rbtx4927_irq_isa_type; } setup_irq(TOSHIBA_RBTX4927_IRQ_NEST_ISA_ON_IOC, @@ -691,13 +692,13 @@ void toshiba_rbtx4927_irq_dump(char *key) { u32 i, j = 0; for (i = 0; i < NR_IRQS; i++) { - if (strcmp(irq_desc[i].chip->typename, "none") + if (strcmp(irq_desc[i].handler->typename, "none") == 0) continue; if ((i >= 1) - && (irq_desc[i - 1].chip->typename == - irq_desc[i].chip->typename)) { + && (irq_desc[i - 1].handler->typename == + irq_desc[i].handler->typename)) { j++; } else { j = 0; @@ -706,12 +707,12 @@ void toshiba_rbtx4927_irq_dump(char *key) (TOSHIBA_RBTX4927_IRQ_INFO, "%s irq=0x%02x/%3d s=0x%08x h=0x%08x a=0x%08x ah=0x%08x d=%1d n=%s/%02d\n", key, i, i, irq_desc[i].status, - (u32) irq_desc[i].chip, + (u32) irq_desc[i].handler, (u32) irq_desc[i].action, (u32) (irq_desc[i].action ? irq_desc[i]. action->handler : 0), irq_desc[i].depth, - irq_desc[i].chip->typename, j); + irq_desc[i].handler->typename, j); } } #endif diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index f0d70c476..6dcf077f6 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c @@ -42,6 +42,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c index dc30d6612..873805178 100644 --- a/arch/mips/tx4938/common/irq.c +++ b/arch/mips/tx4938/common/irq.c @@ -57,7 +57,7 @@ DEFINE_SPINLOCK(tx4938_cp0_lock); DEFINE_SPINLOCK(tx4938_pic_lock); #define TX4938_CP0_NAME "TX4938-CP0" -static struct irq_chip tx4938_irq_cp0_type = { +static struct hw_interrupt_type tx4938_irq_cp0_type = { .typename = TX4938_CP0_NAME, .startup = tx4938_irq_cp0_startup, .shutdown = tx4938_irq_cp0_shutdown, @@ -69,7 +69,7 @@ static struct irq_chip tx4938_irq_cp0_type = { }; #define TX4938_PIC_NAME "TX4938-PIC" -static struct irq_chip tx4938_irq_pic_type = { +static struct hw_interrupt_type tx4938_irq_pic_type = { .typename = TX4938_PIC_NAME, .startup = tx4938_irq_pic_startup, .shutdown = tx4938_irq_pic_shutdown, @@ -102,7 +102,7 @@ tx4938_irq_cp0_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; - irq_desc[i].chip = &tx4938_irq_cp0_type; + irq_desc[i].handler = &tx4938_irq_cp0_type; } return; @@ -306,7 +306,7 @@ tx4938_irq_pic_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 2; - irq_desc[i].chip = &tx4938_irq_pic_type; + irq_desc[i].handler = &tx4938_irq_pic_type; } setup_irq(TX4938_IRQ_NEST_PIC_ON_CP0, &tx4938_irq_pic_action); diff --git a/arch/mips/tx4938/common/setup.c b/arch/mips/tx4938/common/setup.c index 71859c4fe..fc992953b 100644 --- a/arch/mips/tx4938/common/setup.c +++ b/arch/mips/tx4938/common/setup.c @@ -39,6 +39,7 @@ extern void rbtx4938_time_init(void); void __init tx4938_setup(void); void __init tx4938_time_init(void); +void __init tx4938_timer_setup(struct irqaction *irq); void dump_cp0(char *key); void (*__wbflush) (void); @@ -60,9 +61,10 @@ tx4938_write_buffer_flush(void) } void __init -plat_mem_setup(void) +plat_setup(void) { board_time_init = tx4938_time_init; + board_timer_setup = tx4938_timer_setup; __wbflush = tx4938_write_buffer_flush; toshiba_rbtx4938_setup(); } @@ -73,7 +75,8 @@ tx4938_time_init(void) rbtx4938_time_init(); } -void __init plat_timer_setup(struct irqaction *irq) +void __init +tx4938_timer_setup(struct irqaction *irq) { u32 count; u32 c1; diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c index 83f275082..9cd9c0fe2 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c @@ -97,7 +97,7 @@ static void toshiba_rbtx4938_irq_ioc_end(unsigned int irq); DEFINE_SPINLOCK(toshiba_rbtx4938_ioc_lock); #define TOSHIBA_RBTX4938_IOC_NAME "RBTX4938-IOC" -static struct irq_chip toshiba_rbtx4938_irq_ioc_type = { +static struct hw_interrupt_type toshiba_rbtx4938_irq_ioc_type = { .typename = TOSHIBA_RBTX4938_IOC_NAME, .startup = toshiba_rbtx4938_irq_ioc_startup, .shutdown = toshiba_rbtx4938_irq_ioc_shutdown, @@ -146,7 +146,7 @@ toshiba_rbtx4938_irq_ioc_init(void) irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 3; - irq_desc[i].chip = &toshiba_rbtx4938_irq_ioc_type; + irq_desc[i].handler = &toshiba_rbtx4938_irq_ioc_type; } setup_irq(RBTX4938_IRQ_IOCINT, diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c index e44daf30a..7df8b32ba 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/prom.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c @@ -12,6 +12,7 @@ * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) */ +#include #include #include #include diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 66163ba45..9166cd455 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c @@ -11,6 +11,7 @@ * * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) */ +#include #include #include #include @@ -663,10 +664,7 @@ static struct resource rbtx4938_fpga_resource; static char pcode_str[8]; static struct resource tx4938_reg_resource = { - .start = TX4938_REG_BASE, - .end = TX4938_REG_BASE + TX4938_REG_SIZE, - .name = pcode_str, - .flags = IORESOURCE_MEM + pcode_str, TX4938_REG_BASE, TX4938_REG_BASE+TX4938_REG_SIZE, IORESOURCE_MEM }; void __init tx4938_board_setup(void) diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c index 89596e62f..951a208ee 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c @@ -9,6 +9,7 @@ * * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) */ +#include #include #include #include diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index 92f41f6f9..055a2cdfc 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig @@ -4,6 +4,7 @@ config CASIO_E55 select DMA_NONCOHERENT select IRQ_CPU select ISA + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN @@ -13,15 +14,18 @@ config IBM_WORKPAD select DMA_NONCOHERENT select IRQ_CPU select ISA + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN config NEC_CMBVR4133 bool "Support for NEC CMB-VR4133" depends on MACH_VR41XX + select CPU_VR41XX select DMA_NONCOHERENT select IRQ_CPU select HW_HAS_PCI + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN @@ -37,6 +41,7 @@ config TANBAC_TB022X select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN help @@ -69,6 +74,7 @@ config VICTOR_MPC30X select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN @@ -78,6 +84,7 @@ config ZAO_CAPCELLA select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU + select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN @@ -86,3 +93,9 @@ config PCI_VR41XX depends on MACH_VR41XX && HW_HAS_PCI default y select PCI + +config VRC4173 + tristate "Add NEC VRC4173 companion chip support" + depends on MACH_VR41XX && PCI_VR41XX + help + The NEC VRC4173 is a companion chip for NEC VR4122/VR4131. diff --git a/arch/mips/vr41xx/casio-e55/setup.c b/arch/mips/vr41xx/casio-e55/setup.c index 6d9bab890..814900915 100644 --- a/arch/mips/vr41xx/casio-e55/setup.c +++ b/arch/mips/vr41xx/casio-e55/setup.c @@ -1,7 +1,7 @@ /* * setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65. * - * Copyright (C) 2002-2006 Yoichi Yuasa + * Copyright (C) 2002-2005 Yoichi Yuasa * * 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 @@ -21,18 +21,13 @@ #include #include - -#define E55_ISA_IO_BASE 0x1400c000 -#define E55_ISA_IO_SIZE 0x03ff4000 -#define E55_ISA_IO_START 0 -#define E55_ISA_IO_END (E55_ISA_IO_SIZE - 1) -#define E55_IO_PORT_BASE KSEG1ADDR(E55_ISA_IO_BASE) +#include static int __init casio_e55_setup(void) { - set_io_port_base(E55_IO_PORT_BASE); - ioport_resource.start = E55_ISA_IO_START; - ioport_resource.end = E55_ISA_IO_END; + set_io_port_base(IO_PORT_BASE); + ioport_resource.start = IO_PORT_RESOURCE_START; + ioport_resource.end = IO_PORT_RESOURCE_END; return 0; } diff --git a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile index 975d5caf9..aa373974c 100644 --- a/arch/mips/vr41xx/common/Makefile +++ b/arch/mips/vr41xx/common/Makefile @@ -2,6 +2,7 @@ # Makefile for common code of the NEC VR4100 series. # -obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o +obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o +obj-$(CONFIG_VRC4173) += vrc4173.o EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index 7a5c31d58..07ae19cf0 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c @@ -38,7 +38,6 @@ #include #include -#include #include static void __iomem *icu1_base; @@ -153,7 +152,7 @@ static inline uint16_t icu2_clear(uint8_t offset, uint16_t clear) void vr41xx_enable_piuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + PIU_IRQ; + irq_desc_t *desc = irq_desc + PIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -168,7 +167,7 @@ EXPORT_SYMBOL(vr41xx_enable_piuint); void vr41xx_disable_piuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + PIU_IRQ; + irq_desc_t *desc = irq_desc + PIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -183,7 +182,7 @@ EXPORT_SYMBOL(vr41xx_disable_piuint); void vr41xx_enable_aiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + AIU_IRQ; + irq_desc_t *desc = irq_desc + AIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -198,7 +197,7 @@ EXPORT_SYMBOL(vr41xx_enable_aiuint); void vr41xx_disable_aiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + AIU_IRQ; + irq_desc_t *desc = irq_desc + AIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -213,7 +212,7 @@ EXPORT_SYMBOL(vr41xx_disable_aiuint); void vr41xx_enable_kiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + KIU_IRQ; + irq_desc_t *desc = irq_desc + KIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -228,7 +227,7 @@ EXPORT_SYMBOL(vr41xx_enable_kiuint); void vr41xx_disable_kiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + KIU_IRQ; + irq_desc_t *desc = irq_desc + KIU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4111 || @@ -243,7 +242,7 @@ EXPORT_SYMBOL(vr41xx_disable_kiuint); void vr41xx_enable_dsiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + DSIU_IRQ; + irq_desc_t *desc = irq_desc + DSIU_IRQ; unsigned long flags; spin_lock_irqsave(&desc->lock, flags); @@ -255,7 +254,7 @@ EXPORT_SYMBOL(vr41xx_enable_dsiuint); void vr41xx_disable_dsiuint(uint16_t mask) { - struct irq_desc *desc = irq_desc + DSIU_IRQ; + irq_desc_t *desc = irq_desc + DSIU_IRQ; unsigned long flags; spin_lock_irqsave(&desc->lock, flags); @@ -267,7 +266,7 @@ EXPORT_SYMBOL(vr41xx_disable_dsiuint); void vr41xx_enable_firint(uint16_t mask) { - struct irq_desc *desc = irq_desc + FIR_IRQ; + irq_desc_t *desc = irq_desc + FIR_IRQ; unsigned long flags; spin_lock_irqsave(&desc->lock, flags); @@ -279,7 +278,7 @@ EXPORT_SYMBOL(vr41xx_enable_firint); void vr41xx_disable_firint(uint16_t mask) { - struct irq_desc *desc = irq_desc + FIR_IRQ; + irq_desc_t *desc = irq_desc + FIR_IRQ; unsigned long flags; spin_lock_irqsave(&desc->lock, flags); @@ -291,7 +290,7 @@ EXPORT_SYMBOL(vr41xx_disable_firint); void vr41xx_enable_pciint(void) { - struct irq_desc *desc = irq_desc + PCI_IRQ; + irq_desc_t *desc = irq_desc + PCI_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -307,7 +306,7 @@ EXPORT_SYMBOL(vr41xx_enable_pciint); void vr41xx_disable_pciint(void) { - struct irq_desc *desc = irq_desc + PCI_IRQ; + irq_desc_t *desc = irq_desc + PCI_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -323,7 +322,7 @@ EXPORT_SYMBOL(vr41xx_disable_pciint); void vr41xx_enable_scuint(void) { - struct irq_desc *desc = irq_desc + SCU_IRQ; + irq_desc_t *desc = irq_desc + SCU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -339,7 +338,7 @@ EXPORT_SYMBOL(vr41xx_enable_scuint); void vr41xx_disable_scuint(void) { - struct irq_desc *desc = irq_desc + SCU_IRQ; + irq_desc_t *desc = irq_desc + SCU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -355,7 +354,7 @@ EXPORT_SYMBOL(vr41xx_disable_scuint); void vr41xx_enable_csiint(uint16_t mask) { - struct irq_desc *desc = irq_desc + CSI_IRQ; + irq_desc_t *desc = irq_desc + CSI_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -371,7 +370,7 @@ EXPORT_SYMBOL(vr41xx_enable_csiint); void vr41xx_disable_csiint(uint16_t mask) { - struct irq_desc *desc = irq_desc + CSI_IRQ; + irq_desc_t *desc = irq_desc + CSI_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -387,7 +386,7 @@ EXPORT_SYMBOL(vr41xx_disable_csiint); void vr41xx_enable_bcuint(void) { - struct irq_desc *desc = irq_desc + BCU_IRQ; + irq_desc_t *desc = irq_desc + BCU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -403,7 +402,7 @@ EXPORT_SYMBOL(vr41xx_enable_bcuint); void vr41xx_disable_bcuint(void) { - struct irq_desc *desc = irq_desc + BCU_IRQ; + irq_desc_t *desc = irq_desc + BCU_IRQ; unsigned long flags; if (current_cpu_data.cputype == CPU_VR4122 || @@ -443,7 +442,7 @@ static void end_sysint1_irq(unsigned int irq) icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); } -static struct irq_chip sysint1_irq_type = { +static struct hw_interrupt_type sysint1_irq_type = { .typename = "SYSINT1", .startup = startup_sysint1_irq, .shutdown = shutdown_sysint1_irq, @@ -479,7 +478,7 @@ static void end_sysint2_irq(unsigned int irq) icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); } -static struct irq_chip sysint2_irq_type = { +static struct hw_interrupt_type sysint2_irq_type = { .typename = "SYSINT2", .startup = startup_sysint2_irq, .shutdown = shutdown_sysint2_irq, @@ -491,7 +490,7 @@ static struct irq_chip sysint2_irq_type = { static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; uint16_t intassign0, intassign1; unsigned int pin; @@ -550,7 +549,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; uint16_t intassign2, intassign3; unsigned int pin; @@ -723,10 +722,10 @@ static int __init vr41xx_icu_init(void) icu2_write(MGIUINTHREG, 0xffff); for (i = SYSINT1_IRQ_BASE; i <= SYSINT1_IRQ_LAST; i++) - irq_desc[i].chip = &sysint1_irq_type; + irq_desc[i].handler = &sysint1_irq_type; for (i = SYSINT2_IRQ_BASE; i <= SYSINT2_IRQ_LAST; i++) - irq_desc[i].chip = &sysint2_irq_type; + irq_desc[i].handler = &sysint2_irq_type; cascade_irq(INT0_IRQ, icu_get_irq); cascade_irq(INT1_IRQ, icu_get_irq); diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index a2e285c1d..707bd0933 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c @@ -24,7 +24,6 @@ #include #include -#include #include #define IO_MEM_RESOURCE_START 0UL @@ -48,7 +47,7 @@ static void __init setup_timer_frequency(void) mips_hpt_frequency = tclock / 4; } -void __init plat_timer_setup(struct irqaction *irq) +static void __init setup_timer_irq(struct irqaction *irq) { setup_irq(TIMER_IRQ, irq); } @@ -56,9 +55,10 @@ void __init plat_timer_setup(struct irqaction *irq) static void __init timer_init(void) { board_time_init = setup_timer_frequency; + board_timer_setup = setup_timer_irq; } -void __init plat_mem_setup(void) +void __init plat_setup(void) { vr41xx_calculate_clock_frequency(); diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c index 4733c5344..86796bb63 100644 --- a/arch/mips/vr41xx/common/irq.c +++ b/arch/mips/vr41xx/common/irq.c @@ -22,7 +22,7 @@ #include #include -#include +#include typedef struct irq_cascade { int (*get_irq)(unsigned int, struct pt_regs *); @@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(cascade_irq); static void irq_dispatch(unsigned int irq, struct pt_regs *regs) { irq_cascade_t *cascade; - struct irq_desc *desc; + irq_desc_t *desc; if (irq >= NR_IRQS) { atomic_inc(&irq_err_count); @@ -73,13 +73,13 @@ static void irq_dispatch(unsigned int irq, struct pt_regs *regs) if (cascade->get_irq != NULL) { unsigned int source_irq = irq; desc = irq_desc + source_irq; - desc->chip->ack(source_irq); + desc->handler->ack(source_irq); irq = cascade->get_irq(irq, regs); if (irq < 0) atomic_inc(&irq_err_count); else irq_dispatch(irq, regs); - desc->chip->end(source_irq); + desc->handler->end(source_irq); } else do_IRQ(irq, regs); } diff --git a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c new file mode 100644 index 000000000..3e31f8193 --- /dev/null +++ b/arch/mips/vr41xx/common/vrc4173.c @@ -0,0 +1,581 @@ +/* + * vrc4173.c, NEC VRC4173 base driver for NEC VR4122/VR4131. + * + * Copyright (C) 2001-2003 MontaVista Software Inc. + * Author: Yoichi Yuasa + * Copyright (C) 2004 Yoichi Yuasa + * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +MODULE_DESCRIPTION("NEC VRC4173 base driver for NEC VR4122/4131"); +MODULE_AUTHOR("Yoichi Yuasa "); +MODULE_LICENSE("GPL"); + +#define VRC4173_CMUCLKMSK 0x040 + #define MSKPIU 0x0001 + #define MSKKIU 0x0002 + #define MSKAIU 0x0004 + #define MSKPS2CH1 0x0008 + #define MSKPS2CH2 0x0010 + #define MSKUSB 0x0020 + #define MSKCARD1 0x0040 + #define MSKCARD2 0x0080 + #define MSKAC97 0x0100 + #define MSK48MUSB 0x0400 + #define MSK48MPIN 0x0800 + #define MSK48MOSC 0x1000 +#define VRC4173_CMUSRST 0x042 + #define USBRST 0x0001 + #define CARD1RST 0x0002 + #define CARD2RST 0x0004 + #define AC97RST 0x0008 + +#define VRC4173_SYSINT1REG 0x060 +#define VRC4173_MSYSINT1REG 0x06c +#define VRC4173_MPIUINTREG 0x06e +#define VRC4173_MAIUINTREG 0x070 +#define VRC4173_MKIUINTREG 0x072 + +#define VRC4173_SELECTREG 0x09e + #define SEL3 0x0008 + #define SEL2 0x0004 + #define SEL1 0x0002 + #define SEL0 0x0001 + +static struct pci_device_id vrc4173_id_table[] __devinitdata = { + { .vendor = PCI_VENDOR_ID_NEC, + .device = PCI_DEVICE_ID_NEC_VRC4173, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, }, + { .vendor = 0, }, +}; + +unsigned long vrc4173_io_offset = 0; + +EXPORT_SYMBOL(vrc4173_io_offset); + +static int vrc4173_initialized; +static uint16_t vrc4173_cmuclkmsk; +static uint16_t vrc4173_selectreg; +static DEFINE_SPINLOCK(vrc4173_cmu_lock); +static DEFINE_SPINLOCK(vrc4173_giu_lock); + +static inline void set_cmusrst(uint16_t val) +{ + uint16_t cmusrst; + + cmusrst = vrc4173_inw(VRC4173_CMUSRST); + cmusrst |= val; + vrc4173_outw(cmusrst, VRC4173_CMUSRST); +} + +static inline void clear_cmusrst(uint16_t val) +{ + uint16_t cmusrst; + + cmusrst = vrc4173_inw(VRC4173_CMUSRST); + cmusrst &= ~val; + vrc4173_outw(cmusrst, VRC4173_CMUSRST); +} + +void vrc4173_supply_clock(vrc4173_clock_t clock) +{ + if (vrc4173_initialized) { + spin_lock_irq(&vrc4173_cmu_lock); + + switch (clock) { + case VRC4173_PIU_CLOCK: + vrc4173_cmuclkmsk |= MSKPIU; + break; + case VRC4173_KIU_CLOCK: + vrc4173_cmuclkmsk |= MSKKIU; + break; + case VRC4173_AIU_CLOCK: + vrc4173_cmuclkmsk |= MSKAIU; + break; + case VRC4173_PS2_CH1_CLOCK: + vrc4173_cmuclkmsk |= MSKPS2CH1; + break; + case VRC4173_PS2_CH2_CLOCK: + vrc4173_cmuclkmsk |= MSKPS2CH2; + break; + case VRC4173_USBU_PCI_CLOCK: + set_cmusrst(USBRST); + vrc4173_cmuclkmsk |= MSKUSB; + break; + case VRC4173_CARDU1_PCI_CLOCK: + set_cmusrst(CARD1RST); + vrc4173_cmuclkmsk |= MSKCARD1; + break; + case VRC4173_CARDU2_PCI_CLOCK: + set_cmusrst(CARD2RST); + vrc4173_cmuclkmsk |= MSKCARD2; + break; + case VRC4173_AC97U_PCI_CLOCK: + set_cmusrst(AC97RST); + vrc4173_cmuclkmsk |= MSKAC97; + break; + case VRC4173_USBU_48MHz_CLOCK: + set_cmusrst(USBRST); + vrc4173_cmuclkmsk |= MSK48MUSB; + break; + case VRC4173_EXT_48MHz_CLOCK: + if (vrc4173_cmuclkmsk & MSK48MOSC) + vrc4173_cmuclkmsk |= MSK48MPIN; + else + printk(KERN_WARNING + "vrc4173_supply_clock: " + "Please supply VRC4173_48MHz_CLOCK first " + "rather than VRC4173_EXT_48MHz_CLOCK.\n"); + break; + case VRC4173_48MHz_CLOCK: + vrc4173_cmuclkmsk |= MSK48MOSC; + break; + default: + printk(KERN_WARNING + "vrc4173_supply_clock: Invalid CLOCK value %u\n", clock); + break; + } + + vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK); + + switch (clock) { + case VRC4173_USBU_PCI_CLOCK: + case VRC4173_USBU_48MHz_CLOCK: + clear_cmusrst(USBRST); + break; + case VRC4173_CARDU1_PCI_CLOCK: + clear_cmusrst(CARD1RST); + break; + case VRC4173_CARDU2_PCI_CLOCK: + clear_cmusrst(CARD2RST); + break; + case VRC4173_AC97U_PCI_CLOCK: + clear_cmusrst(AC97RST); + break; + default: + break; + } + + spin_unlock_irq(&vrc4173_cmu_lock); + } +} + +EXPORT_SYMBOL(vrc4173_supply_clock); + +void vrc4173_mask_clock(vrc4173_clock_t clock) +{ + if (vrc4173_initialized) { + spin_lock_irq(&vrc4173_cmu_lock); + + switch (clock) { + case VRC4173_PIU_CLOCK: + vrc4173_cmuclkmsk &= ~MSKPIU; + break; + case VRC4173_KIU_CLOCK: + vrc4173_cmuclkmsk &= ~MSKKIU; + break; + case VRC4173_AIU_CLOCK: + vrc4173_cmuclkmsk &= ~MSKAIU; + break; + case VRC4173_PS2_CH1_CLOCK: + vrc4173_cmuclkmsk &= ~MSKPS2CH1; + break; + case VRC4173_PS2_CH2_CLOCK: + vrc4173_cmuclkmsk &= ~MSKPS2CH2; + break; + case VRC4173_USBU_PCI_CLOCK: + set_cmusrst(USBRST); + vrc4173_cmuclkmsk &= ~MSKUSB; + break; + case VRC4173_CARDU1_PCI_CLOCK: + set_cmusrst(CARD1RST); + vrc4173_cmuclkmsk &= ~MSKCARD1; + break; + case VRC4173_CARDU2_PCI_CLOCK: + set_cmusrst(CARD2RST); + vrc4173_cmuclkmsk &= ~MSKCARD2; + break; + case VRC4173_AC97U_PCI_CLOCK: + set_cmusrst(AC97RST); + vrc4173_cmuclkmsk &= ~MSKAC97; + break; + case VRC4173_USBU_48MHz_CLOCK: + set_cmusrst(USBRST); + vrc4173_cmuclkmsk &= ~MSK48MUSB; + break; + case VRC4173_EXT_48MHz_CLOCK: + vrc4173_cmuclkmsk &= ~MSK48MPIN; + break; + case VRC4173_48MHz_CLOCK: + vrc4173_cmuclkmsk &= ~MSK48MOSC; + break; + default: + printk(KERN_WARNING "vrc4173_mask_clock: Invalid CLOCK value %u\n", clock); + break; + } + + vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK); + + switch (clock) { + case VRC4173_USBU_PCI_CLOCK: + case VRC4173_USBU_48MHz_CLOCK: + clear_cmusrst(USBRST); + break; + case VRC4173_CARDU1_PCI_CLOCK: + clear_cmusrst(CARD1RST); + break; + case VRC4173_CARDU2_PCI_CLOCK: + clear_cmusrst(CARD2RST); + break; + case VRC4173_AC97U_PCI_CLOCK: + clear_cmusrst(AC97RST); + break; + default: + break; + } + + spin_unlock_irq(&vrc4173_cmu_lock); + } +} + +EXPORT_SYMBOL(vrc4173_mask_clock); + +static inline void vrc4173_cmu_init(void) +{ + vrc4173_cmuclkmsk = vrc4173_inw(VRC4173_CMUCLKMSK); + + spin_lock_init(&vrc4173_cmu_lock); +} + +void vrc4173_select_function(vrc4173_function_t function) +{ + if (vrc4173_initialized) { + spin_lock_irq(&vrc4173_giu_lock); + + switch(function) { + case PS2_CHANNEL1: + vrc4173_selectreg |= SEL2; + break; + case PS2_CHANNEL2: + vrc4173_selectreg |= SEL1; + break; + case TOUCHPANEL: + vrc4173_selectreg &= SEL2 | SEL1 | SEL0; + break; + case KEYBOARD_8SCANLINES: + vrc4173_selectreg &= SEL3 | SEL2 | SEL1; + break; + case KEYBOARD_10SCANLINES: + vrc4173_selectreg &= SEL3 | SEL2; + break; + case KEYBOARD_12SCANLINES: + vrc4173_selectreg &= SEL3; + break; + case GPIO_0_15PINS: + vrc4173_selectreg |= SEL0; + break; + case GPIO_16_20PINS: + vrc4173_selectreg |= SEL3; + break; + } + + vrc4173_outw(vrc4173_selectreg, VRC4173_SELECTREG); + + spin_unlock_irq(&vrc4173_giu_lock); + } +} + +EXPORT_SYMBOL(vrc4173_select_function); + +static inline void vrc4173_giu_init(void) +{ + vrc4173_selectreg = vrc4173_inw(VRC4173_SELECTREG); + + spin_lock_init(&vrc4173_giu_lock); +} + +void vrc4173_enable_piuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MPIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MPIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_enable_piuint); + +void vrc4173_disable_piuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_PIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MPIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MPIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_piuint); + +void vrc4173_enable_aiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MAIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MAIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_enable_aiuint); + +void vrc4173_disable_aiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_AIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MAIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MAIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_aiuint); + +void vrc4173_enable_kiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MKIUINTREG); + val |= mask; + vrc4173_outw(val, VRC4173_MKIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_enable_kiuint); + +void vrc4173_disable_kiuint(uint16_t mask) +{ + irq_desc_t *desc = irq_desc + VRC4173_KIU_IRQ; + unsigned long flags; + uint16_t val; + + spin_lock_irqsave(&desc->lock, flags); + val = vrc4173_inw(VRC4173_MKIUINTREG); + val &= ~mask; + vrc4173_outw(val, VRC4173_MKIUINTREG); + spin_unlock_irqrestore(&desc->lock, flags); +} + +EXPORT_SYMBOL(vrc4173_disable_kiuint); + +static void enable_vrc4173_irq(unsigned int irq) +{ + uint16_t val; + + val = vrc4173_inw(VRC4173_MSYSINT1REG); + val |= (uint16_t)1 << (irq - VRC4173_IRQ_BASE); + vrc4173_outw(val, VRC4173_MSYSINT1REG); +} + +static void disable_vrc4173_irq(unsigned int irq) +{ + uint16_t val; + + val = vrc4173_inw(VRC4173_MSYSINT1REG); + val &= ~((uint16_t)1 << (irq - VRC4173_IRQ_BASE)); + vrc4173_outw(val, VRC4173_MSYSINT1REG); +} + +static unsigned int startup_vrc4173_irq(unsigned int irq) +{ + enable_vrc4173_irq(irq); + return 0; /* never anything pending */ +} + +#define shutdown_vrc4173_irq disable_vrc4173_irq +#define ack_vrc4173_irq disable_vrc4173_irq + +static void end_vrc4173_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_vrc4173_irq(irq); +} + +static struct hw_interrupt_type vrc4173_irq_type = { + .typename = "VRC4173", + .startup = startup_vrc4173_irq, + .shutdown = shutdown_vrc4173_irq, + .enable = enable_vrc4173_irq, + .disable = disable_vrc4173_irq, + .ack = ack_vrc4173_irq, + .end = end_vrc4173_irq, +}; + +static int vrc4173_get_irq_number(int irq) +{ + uint16_t status, mask; + int i; + + status = vrc4173_inw(VRC4173_SYSINT1REG); + mask = vrc4173_inw(VRC4173_MSYSINT1REG); + + status &= mask; + if (status) { + for (i = 0; i < 16; i++) + if (status & (0x0001 << i)) + return VRC4173_IRQ(i); + } + + return -EINVAL; +} + +static inline int vrc4173_icu_init(int cascade_irq) +{ + int i; + + if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15)) + return -EINVAL; + + vrc4173_outw(0, VRC4173_MSYSINT1REG); + + vr41xx_set_irq_trigger(GIU_IRQ_TO_PIN(cascade_irq), TRIGGER_LEVEL, SIGNAL_THROUGH); + vr41xx_set_irq_level(GIU_IRQ_TO_PIN(cascade_irq), LEVEL_LOW); + + for (i = VRC4173_IRQ_BASE; i <= VRC4173_IRQ_LAST; i++) + irq_desc[i].handler = &vrc4173_irq_type; + + return 0; +} + +static int __devinit vrc4173_probe(struct pci_dev *dev, + const struct pci_device_id *id) +{ + unsigned long start, flags; + int err; + + err = pci_enable_device(dev); + if (err < 0) { + printk(KERN_ERR "vrc4173: Failed to enable PCI device, aborting\n"); + return err; + } + + pci_set_master(dev); + + start = pci_resource_start(dev, 0); + if (start == 0) { + printk(KERN_ERR "vrc4173:No such PCI I/O resource, aborting\n"); + return -ENXIO; + } + + flags = pci_resource_flags(dev, 0); + if ((flags & IORESOURCE_IO) == 0) { + printk(KERN_ERR "vrc4173: No such PCI I/O resource, aborting\n"); + return -ENXIO; + } + + err = pci_request_regions(dev, "NEC VRC4173"); + if (err < 0) { + printk(KERN_ERR "vrc4173: PCI resources are busy, aborting\n"); + return err; + } + + set_vrc4173_io_offset(start); + + vrc4173_cmu_init(); + vrc4173_giu_init(); + + err = vrc4173_icu_init(dev->irq); + if (err < 0) { + printk(KERN_ERR "vrc4173: Invalid IRQ %d, aborting\n", dev->irq); + return err; + } + + err = vr41xx_cascade_irq(dev->irq, vrc4173_get_irq_number); + if (err < 0) { + printk(KERN_ERR "vrc4173: IRQ resource %d is busy, aborting\n", dev->irq); + return err; + } + + printk(KERN_INFO + "NEC VRC4173 at 0x%#08lx, IRQ is cascaded to %d\n", start, dev->irq); + + return 0; +} + +static void vrc4173_remove(struct pci_dev *dev) +{ + free_irq(dev->irq, NULL); + + pci_release_regions(dev); +} + +static struct pci_driver vrc4173_driver = { + .name = "NEC VRC4173", + .probe = vrc4173_probe, + .remove = vrc4173_remove, + .id_table = vrc4173_id_table, +}; + +static int __devinit vrc4173_init(void) +{ + int err; + + err = pci_register_driver(&vrc4173_driver); + if (err < 0) + return err; + + vrc4173_initialized = 1; + + return 0; +} + +static void __devexit vrc4173_exit(void) +{ + vrc4173_initialized = 0; + + pci_unregister_driver(&vrc4173_driver); +} + +module_init(vrc4173_init); +module_exit(vrc4173_exit); diff --git a/arch/mips/vr41xx/ibm-workpad/setup.c b/arch/mips/vr41xx/ibm-workpad/setup.c index 9eef297ec..50fe8af4c 100644 --- a/arch/mips/vr41xx/ibm-workpad/setup.c +++ b/arch/mips/vr41xx/ibm-workpad/setup.c @@ -1,7 +1,7 @@ /* * setup.c, Setup for the IBM WorkPad z50. * - * Copyright (C) 2002-2006 Yoichi Yuasa + * Copyright (C) 2002-2005 Yoichi Yuasa * * 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 @@ -21,18 +21,13 @@ #include #include - -#define WORKPAD_ISA_IO_BASE 0x15000000 -#define WORKPAD_ISA_IO_SIZE 0x03000000 -#define WORKPAD_ISA_IO_START 0 -#define WORKPAD_ISA_IO_END (WORKPAD_ISA_IO_SIZE - 1) -#define WORKPAD_IO_PORT_BASE KSEG1ADDR(WORKPAD_ISA_IO_BASE) +#include static int __init ibm_workpad_setup(void) { - set_io_port_base(WORKPAD_IO_PORT_BASE); - ioport_resource.start = WORKPAD_ISA_IO_START; - ioport_resource.end = WORKPAD_ISA_IO_END; + set_io_port_base(IO_PORT_BASE); + ioport_resource.start = IO_PORT_RESOURCE_START; + ioport_resource.end = IO_PORT_RESOURCE_END; return 0; } diff --git a/arch/mips/vr41xx/nec-cmbvr4133/init.c b/arch/mips/vr41xx/nec-cmbvr4133/init.c index ae1af6b21..be590edb0 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/init.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/init.c @@ -15,6 +15,7 @@ * Support for NEC-CMBVR4133 in 2.6 * Manish Lachwani (mlachwani@mvista.com) */ +#include #ifdef CONFIG_ROCKHOPPER #include diff --git a/arch/mips/vr41xx/nec-cmbvr4133/irq.c b/arch/mips/vr41xx/nec-cmbvr4133/irq.c index 248348734..31db6b61a 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/irq.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/irq.c @@ -62,7 +62,7 @@ static void end_i8259_irq(unsigned int irq) enable_8259A_irq(irq - I8259_IRQ_BASE); } -static struct irq_chip i8259_irq_type = { +static struct hw_interrupt_type i8259_irq_type = { .typename = "XT-PIC", .startup = startup_i8259_irq, .shutdown = shutdown_i8259_irq, @@ -104,7 +104,7 @@ void __init rockhopper_init_irq(void) } for (i = I8259_IRQ_BASE; i <= I8259_IRQ_LAST; i++) - irq_desc[i].chip = &i8259_irq_type; + irq_desc[i].handler = &i8259_irq_type; setup_irq(I8259_SLAVE_IRQ, &i8259_slave_cascade); diff --git a/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c b/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c index f45cacced..1f6b24ef8 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c @@ -14,6 +14,7 @@ * Support for NEC-CMBVR4133 in 2.6 * Author: Manish Lachwani (mlachwani@mvista.com) */ +#include #include #include #include diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c b/arch/mips/vr41xx/nec-cmbvr4133/setup.c index b20b93b2b..53272a5c3 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/setup.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/setup.c @@ -14,6 +14,7 @@ * Support for CMBVR4133 board in 2.6 * Author: Manish Lachwani (mlachwani@mvista.com) */ +#include #include #include #include diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 232a064ac..93e3d12f7 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -51,10 +51,6 @@ config GENERIC_HARDIRQS config GENERIC_IRQ_PROBE def_bool y -config IRQ_PER_CPU - bool - default y - # unless you want to implement ACPI on PA-RISC ... ;-) config PM bool diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 6e79dbf3f..d7c80edf4 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c @@ -77,21 +77,17 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, { struct hpux_dirent * dirent; struct getdents_callback * buf = (struct getdents_callback *) __buf; - ino_t d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) put_user(offset, &dirent->d_off); dirent = buf->current_dir; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(reclen, &dirent->d_reclen); put_user(namlen, &dirent->d_namlen); copy_to_user(dirent->d_name, name, namlen); diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c index ba94c0cfc..2ef63ba48 100644 --- a/arch/parisc/hpux/sys_hpux.c +++ b/arch/parisc/hpux/sys_hpux.c @@ -146,7 +146,7 @@ static int hpux_ustat(dev_t dev, struct hpux_ustat __user *ubuf) s = user_get_super(dev); if (s == NULL) goto out; - err = vfs_statfs(s->s_root, &sbuf); + err = vfs_statfs(s, &sbuf); drop_super(s); if (err) goto out; @@ -187,12 +187,12 @@ struct hpux_statfs { int16_t f_pad; }; -static int vfs_statfs_hpux(struct dentry *dentry, struct hpux_statfs *buf) +static int vfs_statfs_hpux(struct super_block *sb, struct hpux_statfs *buf) { struct kstatfs st; int retval; - retval = vfs_statfs(dentry, &st); + retval = vfs_statfs(sb, &st); if (retval) return retval; @@ -220,7 +220,7 @@ asmlinkage long hpux_statfs(const char __user *path, error = user_path_walk(path, &nd); if (!error) { struct hpux_statfs tmp; - error = vfs_statfs_hpux(nd.dentry, &tmp); + error = vfs_statfs_hpux(nd.dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; path_release(&nd); @@ -238,7 +238,7 @@ asmlinkage long hpux_fstatfs(unsigned int fd, struct hpux_statfs __user * buf) file = fget(fd); if (!file) goto out; - error = vfs_statfs_hpux(file->f_dentry, &tmp); + error = vfs_statfs_hpux(file->f_dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; fput(file); diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index bc7c4a4e2..c057ad760 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -97,17 +97,15 @@ update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t pte) void show_cache_info(struct seq_file *m) { - char buf[32]; - seq_printf(m, "I-cache\t\t: %ld KB\n", cache_info.ic_size/1024 ); - if (cache_info.dc_loop == 1) - snprintf(buf, 32, "%lu-way associative", cache_info.dc_loop); - seq_printf(m, "D-cache\t\t: %ld KB (%s%s, %s)\n", + seq_printf(m, "D-cache\t\t: %ld KB (%s%s, %d-way associative)\n", cache_info.dc_size/1024, (cache_info.dc_conf.cc_wt ? "WT":"WB"), (cache_info.dc_conf.cc_sh ? ", shared I/D":""), - ((cache_info.dc_loop == 1) ? "direct mapped" : buf)); + (cache_info.dc_conf.cc_assoc) + ); + seq_printf(m, "ITLB entries\t: %ld\n" "DTLB entries\t: %ld%s\n", cache_info.it_size, cache_info.dt_size, @@ -160,11 +158,11 @@ parisc_cache_init(void) cache_info.dc_conf.cc_block, cache_info.dc_conf.cc_line, cache_info.dc_conf.cc_shift); - printk(" wt %d sh %d cst %d hv %d\n", + printk(" wt %d sh %d cst %d assoc %d\n", cache_info.dc_conf.cc_wt, cache_info.dc_conf.cc_sh, cache_info.dc_conf.cc_cst, - cache_info.dc_conf.cc_hv); + cache_info.dc_conf.cc_assoc); printk("IC base 0x%lx stride 0x%lx count 0x%lx loop 0x%lx\n", cache_info.ic_base, @@ -178,11 +176,11 @@ parisc_cache_init(void) cache_info.ic_conf.cc_block, cache_info.ic_conf.cc_line, cache_info.ic_conf.cc_shift); - printk(" wt %d sh %d cst %d hv %d\n", + printk(" wt %d sh %d cst %d assoc %d\n", cache_info.ic_conf.cc_wt, cache_info.ic_conf.cc_sh, cache_info.ic_conf.cc_cst, - cache_info.ic_conf.cc_hv); + cache_info.ic_conf.cc_assoc); printk("D-TLB conf: sh %d page %d cst %d aid %d pad1 %d \n", cache_info.dt_conf.tc_sh, @@ -236,8 +234,7 @@ parisc_cache_init(void) void disable_sr_hashing(void) { - int srhash_type, retval; - unsigned long space_bits; + int srhash_type; switch (boot_cpu_data.cpu_type) { case pcx: /* We shouldn't get this far. setup.c should prevent it. */ @@ -263,13 +260,6 @@ void disable_sr_hashing(void) } disable_sr_hashing_asm(srhash_type); - - retval = pdc_spaceid_bits(&space_bits); - /* If this procedure isn't implemented, don't panic. */ - if (retval < 0 && retval != PDC_BAD_OPTION) - panic("pdc_spaceid_bits call failed.\n"); - if (space_bits != 0) - panic("SpaceID hashing is still on!\n"); } void flush_dcache_page(struct page *page) diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 95c1b8ec4..d9e53cf03 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -22,6 +22,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include /* we have the following possibilities to act on an interruption: @@ -1637,7 +1638,7 @@ dbit_trap_20w: load32 PA(pa_dbit_lock),t0 dbit_spin_20w: - LDCW 0(t0),t1 + ldcw 0(t0),t1 cmpib,= 0,t1,dbit_spin_20w nop @@ -1673,7 +1674,7 @@ dbit_trap_11: load32 PA(pa_dbit_lock),t0 dbit_spin_11: - LDCW 0(t0),t1 + ldcw 0(t0),t1 cmpib,= 0,t1,dbit_spin_11 nop @@ -1713,7 +1714,7 @@ dbit_trap_20: load32 PA(pa_dbit_lock),t0 dbit_spin_20: - LDCW 0(t0),t1 + ldcw 0(t0),t1 cmpib,= 0,t1,dbit_spin_20 nop diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 4398d2a95..2dc06b8e1 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -11,7 +11,7 @@ * Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy) * Copyright 2003 Grant Grundler * Copyright 2003,2004 Ryan Bradetich - * Copyright 2004,2006 Thibaut VARENE + * Copyright 2004 Thibaut VARENE * * 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 @@ -252,8 +252,10 @@ int pdc_pat_chassis_send_log(unsigned long state, unsigned long data) #endif /** - * pdc_chassis_disp - Updates chassis code + * pdc_chassis_disp - Updates display * @retval: -1 on error, 0 on success + * + * Works on old PDC only (E class, others?) */ int pdc_chassis_disp(unsigned long disp) { @@ -266,22 +268,6 @@ int pdc_chassis_disp(unsigned long disp) return retval; } -/** - * pdc_chassis_warn - Fetches chassis warnings - * @retval: -1 on error, 0 on success - */ -int pdc_chassis_warn(unsigned long *warn) -{ - int retval = 0; - - spin_lock_irq(&pdc_lock); - retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(pdc_result)); - *warn = pdc_result[0]; - spin_unlock_irq(&pdc_lock); - - return retval; -} - /** * pdc_coproc_cfg - To identify coprocessors attached to the processor. * @pdc_coproc_info: Return buffer address. @@ -407,9 +393,7 @@ int pdc_model_info(struct pdc_model *model) * pdc_model_sysmodel - Get the system model name. * @name: A char array of at least 81 characters. * - * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L). - * Using OS_ID_HPUX will return the equivalent of the 'modelname' command - * on HP/UX. + * Get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L) */ int pdc_model_sysmodel(char *name) { @@ -514,26 +498,6 @@ int pdc_cache_info(struct pdc_cache_info *cache_info) return retval; } -/** - * pdc_spaceid_bits - Return whether Space ID hashing is turned on. - * @space_bits: Should be 0, if not, bad mojo! - * - * Returns information about Space ID hashing. - */ -int pdc_spaceid_bits(unsigned long *space_bits) -{ - int retval; - - spin_lock_irq(&pdc_lock); - pdc_result[0] = 0; - retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0); - convert_to_wide(pdc_result); - *space_bits = pdc_result[0]; - spin_unlock_irq(&pdc_lock); - - return retval; -} - #ifndef CONFIG_PA20 /** * pdc_btlb_info - Return block TLB information. diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index eaad2328f..3e79e62f7 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S @@ -12,6 +12,8 @@ * Initial Version 04-23-1999 by Helge Deller */ +#include /* for CONFIG_SMP */ + #include #include #include diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 5b8803cc3..197936d93 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -22,6 +22,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include +#include #include #include #include @@ -93,7 +94,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest) if (irq == TIMER_IRQ || irq == IPI_IRQ) { /* Bad linux design decision. The mask has already * been set; we must reset it */ - irq_desc[irq].affinity = CPU_MASK_ALL; + irq_affinity[irq] = CPU_MASK_ALL; return -EINVAL; } @@ -109,7 +110,7 @@ static void cpu_set_affinity_irq(unsigned int irq, cpumask_t dest) if (cpu_check_affinity(irq, &dest)) return; - irq_desc[irq].affinity = dest; + irq_affinity[irq] = dest; } #endif @@ -124,10 +125,6 @@ static struct hw_interrupt_type cpu_interrupt_type = { #ifdef CONFIG_SMP .set_affinity = cpu_set_affinity_irq, #endif - /* XXX: Needs to be written. We managed without it so far, but - * we really ought to write it. - */ - .retrigger = NULL, }; int show_interrupts(struct seq_file *p, void *v) @@ -161,7 +158,7 @@ int show_interrupts(struct seq_file *p, void *v) seq_printf(p, "%10u ", kstat_irqs(i)); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); #ifndef PARISC_IRQ_CR16_COUNTS seq_printf(p, " %s", action->name); @@ -213,12 +210,12 @@ int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *type, void *data) { if (irq_desc[irq].action) return -EBUSY; - if (irq_desc[irq].chip != &cpu_interrupt_type) + if (irq_desc[irq].handler != &cpu_interrupt_type) return -EBUSY; if (type) { - irq_desc[irq].chip = type; - irq_desc[irq].chip_data = data; + irq_desc[irq].handler = type; + irq_desc[irq].handler_data = data; cpu_interrupt_type.enable(irq); } return 0; @@ -268,7 +265,7 @@ int txn_alloc_irq(unsigned int bits_wide) unsigned long txn_affinity_addr(unsigned int irq, int cpu) { #ifdef CONFIG_SMP - irq_desc[irq].affinity = cpumask_of_cpu(cpu); + irq_affinity[irq] = cpumask_of_cpu(cpu); #endif return cpu_data[cpu].txn_addr; @@ -329,7 +326,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) /* Work our way from MSb to LSb...same order we alloc EIRs */ for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { #ifdef CONFIG_SMP - cpumask_t dest = irq_desc[irq].affinity; + cpumask_t dest = irq_affinity[irq]; #endif if (!(bit & eirr_val)) continue; @@ -366,14 +363,14 @@ void do_cpu_irq_mask(struct pt_regs *regs) static struct irqaction timer_action = { .handler = timer_interrupt, .name = "timer", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; #ifdef CONFIG_SMP static struct irqaction ipi_action = { .handler = ipi_interrupt, .name = "IPI", - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; #endif @@ -381,7 +378,7 @@ static void claim_cpu_irqs(void) { int i; for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { - irq_desc[i].chip = &cpu_interrupt_type; + irq_desc[i].handler = &cpu_interrupt_type; } irq_desc[TIMER_IRQ].action = &timer_action; @@ -407,6 +404,13 @@ void __init init_IRQ(void) } +void hw_resend_irq(struct hw_interrupt_type *type, unsigned int irq) +{ + /* XXX: Needs to be written. We managed without it so far, but + * we really ought to write it. + */ +} + void ack_bad_irq(unsigned int irq) { printk("unexpected IRQ %d\n", irq); diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index aee311884..f27cfe477 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -89,12 +89,6 @@ static inline int is_local(struct module *me, void *loc) return is_init(me, loc) || is_core(me, loc); } -static inline int is_local_section(struct module *me, void *loc, void *dot) -{ - return (is_init(me, loc) && is_init(me, dot)) || - (is_core(me, loc) && is_core(me, dot)); -} - #ifndef __LP64__ struct got_entry { @@ -370,14 +364,8 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value) } #endif /* __LP64__ */ -enum elf_stub_type { - ELF_STUB_GOT, - ELF_STUB_MILLI, - ELF_STUB_DIRECT, -}; - static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, - enum elf_stub_type stub_type, int init_section) + int millicode, int init_section) { unsigned long i; struct stub_entry *stub; @@ -408,7 +396,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, stub->insns[1] |= reassemble_17(rrsel(value, addend) / 4); #else -/* for 64-bit we have three kinds of stubs: +/* for 64-bit we have two kinds of stubs: * for normal function calls: * ldd 0(%dp),%dp * ldd 10(%dp), %r1 @@ -420,23 +408,18 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, * ldo 0(%r1), %r1 * ldd 10(%r1), %r1 * bve,n (%r1) - * - * for direct branches (jumps between different section of the - * same module): - * ldil 0, %r1 - * ldo 0(%r1), %r1 - * bve,n (%r1) */ - switch (stub_type) { - case ELF_STUB_GOT: + if (!millicode) + { stub->insns[0] = 0x537b0000; /* ldd 0(%dp),%dp */ stub->insns[1] = 0x53610020; /* ldd 10(%dp),%r1 */ stub->insns[2] = 0xe820d000; /* bve (%r1) */ stub->insns[3] = 0x537b0030; /* ldd 18(%dp),%dp */ stub->insns[0] |= reassemble_14(get_got(me, value, addend) & 0x3fff); - break; - case ELF_STUB_MILLI: + } + else + { stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ stub->insns[1] = 0x34210000; /* ldo 0(%r1), %r1 */ stub->insns[2] = 0x50210020; /* ldd 10(%r1),%r1 */ @@ -444,17 +427,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, stub->insns[0] |= reassemble_21(lrsel(value, addend)); stub->insns[1] |= reassemble_14(rrsel(value, addend)); - break; - case ELF_STUB_DIRECT: - stub->insns[0] = 0x20200000; /* ldil 0,%r1 */ - stub->insns[1] = 0x34210000; /* ldo 0(%r1), %r1 */ - stub->insns[2] = 0xe820d002; /* bve,n (%r1) */ - - stub->insns[0] |= reassemble_21(lrsel(value, addend)); - stub->insns[1] |= reassemble_14(rrsel(value, addend)); - break; } - #endif return (Elf_Addr)stub; @@ -566,14 +539,14 @@ int apply_relocate_add(Elf_Shdr *sechdrs, break; case R_PARISC_PCREL17F: /* 17-bit PC relative address */ - val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc)); + val = get_stub(me, val, addend, 0, is_init(me, loc)); val = (val - dot - 8)/4; CHECK_RELOC(val, 17) *loc = (*loc & ~0x1f1ffd) | reassemble_17(val); break; case R_PARISC_PCREL22F: /* 22-bit PC relative address; only defined for pa20 */ - val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc)); + val = get_stub(me, val, addend, 0, is_init(me, loc)); DEBUGP("STUB FOR %s loc %lx+%lx at %lx\n", strtab + sym->st_name, (unsigned long)loc, addend, val) @@ -670,23 +643,13 @@ int apply_relocate_add(Elf_Shdr *sechdrs, strtab + sym->st_name, loc, val); /* can we reach it locally? */ - if(!is_local_section(me, (void *)val, (void *)dot)) { - - if (is_local(me, (void *)val)) - /* this is the case where the - * symbol is local to the - * module, but in a different - * section, so stub the jump - * in case it's more than 22 - * bits away */ - val = get_stub(me, val, addend, ELF_STUB_DIRECT, - is_init(me, loc)); - else if (strncmp(strtab + sym->st_name, "$$", 2) + if(!is_local(me, (void *)val)) { + if (strncmp(strtab + sym->st_name, "$$", 2) == 0) - val = get_stub(me, val, addend, ELF_STUB_MILLI, + val = get_stub(me, val, addend, 1, is_init(me, loc)); else - val = get_stub(me, val, addend, ELF_STUB_GOT, + val = get_stub(me, val, addend, 0, is_init(me, loc)); } DEBUGP("STUB FOR %s loc %lx, val %lx+%lx at %lx\n", diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index e81c9937d..f60055641 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S @@ -40,6 +40,7 @@ .level 2.0 #endif +#include #include #include diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 6d57553d8..fc107add6 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c @@ -24,6 +24,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index d3b8fc52d..79c7db270 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c @@ -9,6 +9,7 @@ * Copyright (C) 1999-2001 Hewlett-Packard Company * Copyright (C) 1999-2001 Grant Grundler */ +#include #include #include #include @@ -288,7 +289,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); * than res->start. */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t alignment) + unsigned long size, unsigned long alignment) { unsigned long mask, align; diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c index d47ba1aa8..a45e2e2ff 100644 --- a/arch/parisc/kernel/pdc_chassis.c +++ b/arch/parisc/kernel/pdc_chassis.c @@ -1,8 +1,8 @@ /* - * interfaces to Chassis Codes via PDC (firmware) + * interfaces to log Chassis Codes via PDC (firmware) * * Copyright (C) 2002 Laurent Canet - * Copyright (C) 2002-2006 Thibaut VARENE + * Copyright (C) 2002-2004 Thibaut VARENE * * 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 @@ -16,10 +16,6 @@ * 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 - * - * TODO: poll chassis warns, trigger (configurable) machine shutdown when - * needed. - * Find out how to get Chassis warnings out of PAT boxes? */ #undef PDC_CHASSIS_DEBUG @@ -34,16 +30,15 @@ #include #include #include -#include #include #include #include #include -#define PDC_CHASSIS_VER "0.05" #ifdef CONFIG_PDC_CHASSIS +static int pdc_chassis_old __read_mostly = 0; static unsigned int pdc_chassis_enabled __read_mostly = 1; @@ -69,7 +64,7 @@ __setup("pdcchassis=", pdc_chassis_setup); * Currently, only E class and A180 are known to work with this. * Inspired by Christoph Plattner */ -#if 0 + static void __init pdc_chassis_checkold(void) { switch(CPU_HVERSION) { @@ -78,6 +73,7 @@ static void __init pdc_chassis_checkold(void) case 0x482: /* E45 */ case 0x483: /* E55 */ case 0x516: /* A180 */ + pdc_chassis_old = 1; break; default: @@ -85,7 +81,7 @@ static void __init pdc_chassis_checkold(void) } DPRINTK(KERN_DEBUG "%s: pdc_chassis_checkold(); pdc_chassis_old = %d\n", __FILE__, pdc_chassis_old); } -#endif + /** * pdc_chassis_panic_event() - Called by the panic handler. @@ -135,20 +131,30 @@ static struct notifier_block pdc_chassis_reboot_block = { void __init parisc_pdc_chassis_init(void) { #ifdef CONFIG_PDC_CHASSIS + int handle = 0; if (likely(pdc_chassis_enabled)) { DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__); /* Let see if we have something to handle... */ - printk(KERN_INFO "Enabling %s chassis codes support v%s\n", - is_pdc_pat() ? "PDC_PAT" : "regular", - PDC_CHASSIS_VER); - - /* initialize panic notifier chain */ - atomic_notifier_chain_register(&panic_notifier_list, - &pdc_chassis_panic_block); - - /* initialize reboot notifier chain */ - register_reboot_notifier(&pdc_chassis_reboot_block); + /* Check for PDC_PAT or old LED Panel */ + pdc_chassis_checkold(); + if (is_pdc_pat()) { + printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n"); + handle = 1; + } + else if (unlikely(pdc_chassis_old)) { + printk(KERN_INFO "Enabling old style chassis LED panel support.\n"); + handle = 1; + } + + if (handle) { + /* initialize panic notifier chain */ + atomic_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 */ } @@ -209,12 +215,9 @@ int pdc_chassis_send_status(int message) } } else retval = -1; #else - if (1) { + if (unlikely(pdc_chassis_old)) { switch (message) { case PDC_CHASSIS_DIRECT_BSTART: - retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_INIT)); - break; - case PDC_CHASSIS_DIRECT_BCOMPLETE: retval = pdc_chassis_disp(PDC_CHASSIS_DISP_DATA(OSTAT_RUN)); break; @@ -241,61 +244,3 @@ int pdc_chassis_send_status(int message) #endif /* CONFIG_PDC_CHASSIS */ return retval; } - -#ifdef CONFIG_PDC_CHASSIS_WARN -#ifdef CONFIG_PROC_FS -static int pdc_chassis_warn_pread(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *out = page; - int len, ret; - unsigned long warn; - u32 warnreg; - - ret = pdc_chassis_warn(&warn); - if (ret != PDC_OK) - return -EIO; - - warnreg = (warn & 0xFFFFFFFF); - - if ((warnreg >> 24) & 0xFF) - out += sprintf(out, "Chassis component failure! (eg fan or PSU): 0x%.2x\n", ((warnreg >> 24) & 0xFF)); - - out += sprintf(out, "Battery: %s\n", (warnreg & 0x04) ? "Low!" : "OK"); - out += sprintf(out, "Temp low: %s\n", (warnreg & 0x02) ? "Exceeded!" : "OK"); - out += sprintf(out, "Temp mid: %s\n", (warnreg & 0x01) ? "Exceeded!" : "OK"); - - len = out - page - off; - if (len < count) { - *eof = 1; - if (len <= 0) return 0; - } else { - len = count; - } - *start = page + off; - return len; -} - -static int __init pdc_chassis_create_procfs(void) -{ - unsigned long test; - int ret; - - ret = pdc_chassis_warn(&test); - if ((ret == PDC_BAD_PROC) || (ret == PDC_BAD_OPTION)) { - /* seems that some boxes (eg L1000) do not implement this */ - printk(KERN_INFO "Chassis warnings not supported.\n"); - return 0; - } - - printk(KERN_INFO "Enabling PDC chassis warnings support v%s\n", - PDC_CHASSIS_VER); - create_proc_read_entry("chassis", 0400, NULL, pdc_chassis_warn_pread, - NULL); - return 0; -} - -__initcall(pdc_chassis_create_procfs); - -#endif /* CONFIG_PROC_FS */ -#endif /* CONFIG_PDC_CHASSIS_WARN */ diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index aab057674..215d78c87 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -44,6 +44,7 @@ #define EARLY_BOOTUP_DEBUG +#include #include #include #include @@ -89,8 +90,6 @@ static int pdc_console_setup(struct console *co, char *options) } #if defined(CONFIG_PDC_CONSOLE) -#include - static struct tty_driver * pdc_console_device (struct console *c, int *index) { extern struct tty_driver console_driver; diff --git a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S index 5e7bb90e7..adb3c6444 100644 --- a/arch/parisc/kernel/perf_asm.S +++ b/arch/parisc/kernel/perf_asm.S @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #ifdef CONFIG_64BIT diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 99d7fca93..6df9f62ce 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -26,6 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ +#include #include #include #include diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 3f28de974..413292f1a 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c @@ -91,7 +91,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) int copied; #ifdef __LP64__ - if (__is_compat_task(child)) { + if (personality(child->personality) == PER_LINUX32) { unsigned int tmp; addr &= 0xffffffffL; @@ -123,7 +123,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) case PTRACE_POKEDATA: ret = 0; #ifdef __LP64__ - if (__is_compat_task(child)) { + if (personality(child->personality) == PER_LINUX32) { unsigned int tmp = (unsigned int)data; DBG("sys_ptrace(POKE%s, %d, %lx, %lx)\n", request == PTRACE_POKETEXT ? "TEXT" : "DATA", @@ -146,7 +146,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) case PTRACE_PEEKUSR: { ret = -EIO; #ifdef __LP64__ - if (__is_compat_task(child)) { + if (personality(child->personality) == PER_LINUX32) { unsigned int tmp; if (addr & (sizeof(int)-1)) @@ -205,7 +205,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) goto out_tsk; } #ifdef __LP64__ - if (__is_compat_task(child)) { + if (personality(child->personality) == PER_LINUX32) { if (addr & (sizeof(int)-1)) goto out_tsk; if ((addr = translate_usr_offset(addr)) < 0) diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S index 789061f6c..8c2859cca 100644 --- a/arch/parisc/kernel/real2.S +++ b/arch/parisc/kernel/real2.S @@ -7,6 +7,7 @@ * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com) * */ +#include #include #include @@ -275,6 +276,15 @@ r64_ret: #endif + .export pc_in_user_space + .text + /* Doesn't belong here but I couldn't find a nicer spot. */ + /* Should never get called, only used by profile stuff in time.c */ +pc_in_user_space: + bv,n 0(%rp) + nop + + .export __canonicalize_funcptr_for_compare .text /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 3c7a3faf7..4a36ec3f6 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include @@ -302,8 +303,6 @@ extern void eisa_init(void); static int __init parisc_init(void) { - u32 osid = (OS_ID_LINUX << 16); - parisc_proc_mkdir(); parisc_init_resources(); do_device_inventory(); /* probe for hardware */ @@ -312,9 +311,6 @@ static int __init parisc_init(void) /* set up a new led state on systems shipped LED State panel */ pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BSTART); - - /* tell PDC we're Linux. Nevermind failure. */ - pdc_stable_write(0x40, &osid, sizeof(osid)); processor_init(); printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n", diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index bb83880c5..05767e83c 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -76,7 +76,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *r #ifdef __LP64__ compat_sigset_t newset32; - if (is_compat_task()) { + if(personality(current->personality) == PER_LINUX32){ /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigsetsize != sizeof(compat_sigset_t)) return -EINVAL; @@ -153,7 +153,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) compat_sigset_t compat_set; struct compat_rt_sigframe __user * compat_frame; - if (is_compat_task()) + if(personality(current->personality) == PER_LINUX32) sigframe_size = PARISC_RT_SIGFRAME_SIZE32; #endif @@ -166,7 +166,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) #ifdef __LP64__ compat_frame = (struct compat_rt_sigframe __user *)frame; - if (is_compat_task()) { + 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; @@ -186,7 +186,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall) /* Good thing we saved the old gr[30], eh? */ #ifdef __LP64__ - if (is_compat_task()) { + 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 @@ -248,7 +248,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) 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 && ! sas_ss_flags(sp)) + 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); @@ -315,7 +315,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, compat_frame = (struct compat_rt_sigframe __user *)frame; - if (is_compat_task()) { + if(personality(current->personality) == PER_LINUX32) { DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info); err |= copy_siginfo_to_user32(&compat_frame->info, info); DBG(1,"SETUP_RT_FRAME: 1\n"); @@ -392,7 +392,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, haddr = A(ka->sa.sa_handler); /* The sa_handler may be a pointer to a function descriptor */ #ifdef __LP64__ - if (is_compat_task()) { + if(personality(current->personality) == PER_LINUX32) { #endif if (haddr & PA_PLABEL_FDESC) { Elf32_Fdesc fdesc; @@ -427,19 +427,19 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, */ sigframe_size = PARISC_RT_SIGFRAME_SIZE; #ifdef __LP64__ - if (is_compat_task()) + if(personality(current->personality) == PER_LINUX32) sigframe_size = PARISC_RT_SIGFRAME_SIZE32; #endif if (in_syscall) { regs->gr[31] = haddr; #ifdef __LP64__ - if (personality(current->personality) == PER_LINUX) + if(personality(current->personality) == PER_LINUX) sigframe_size |= 1; #endif } else { unsigned long psw = USER_PSW; #ifdef __LP64__ - if (personality(current->personality) == PER_LINUX) + if(personality(current->personality) == PER_LINUX) psw |= PSW_W; #endif @@ -464,7 +464,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, regs->gr[26] = sig; /* signal number */ #ifdef __LP64__ - if (is_compat_task()) { + 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 diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 98e40959a..d6ac1c60a 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -18,6 +18,7 @@ */ #undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */ +#include #include #include diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index bca48bd52..f9a8cd369 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c @@ -9,6 +9,7 @@ * environment. Based heavily on sys_ia32.c and sys_sparc32.c. */ +#include #include #include #include @@ -237,19 +238,14 @@ int sys32_settimeofday(struct compat_timeval __user *tv, struct timezone __user int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) { - compat_ino_t ino; int err; if (stat->size > MAX_NON_LFS || !new_valid_dev(stat->dev) || !new_valid_dev(stat->rdev)) return -EOVERFLOW; - ino = stat->ino; - if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) - return -EOVERFLOW; - err = put_user(new_encode_dev(stat->dev), &statbuf->st_dev); - err |= put_user(ino, &statbuf->st_ino); + err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->mode, &statbuf->st_mode); err |= put_user(stat->nlink, &statbuf->st_nlink); err |= put_user(0, &statbuf->st_reserved1); @@ -317,20 +313,16 @@ filldir32 (void *__buf, const char *name, int namlen, loff_t offset, ino_t ino, struct linux32_dirent __user * dirent; struct getdents32_callback * buf = (struct getdents32_callback *) __buf; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); - u32 d_ino; buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) put_user(offset, &dirent->d_off); dirent = buf->current_dir; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); @@ -380,16 +372,12 @@ fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, ino_t { struct readdir32_callback * buf = (struct readdir32_callback *) __buf; struct old_linux32_dirent __user * dirent; - u32 d_ino; if (buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; buf->count++; dirent = buf->dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(offset, &dirent->d_offset); put_user(namlen, &dirent->d_namlen); copy_to_user(dirent->d_name, name, namlen); diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index a05800429..479d9a017 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -6,6 +6,7 @@ * thanks to Philipp Rumpf, Mike Shaver and various others * sorry about the wall, puffin.. */ +#include /* for CONFIG_SMP */ #include #include @@ -28,6 +29,18 @@ .level 1.1 #endif +#ifndef CONFIG_64BIT + .macro fixup_branch,lbl + b \lbl + .endm +#else + .macro fixup_branch,lbl + ldil L%\lbl, %r1 + ldo R%\lbl(%r1), %r1 + bv,n %r0(%r1) + .endm +#endif + .text .import syscall_exit,code @@ -528,7 +541,7 @@ cas_nocontend: # endif /* ENABLE_LWS_DEBUG */ - LDCW 0(%sr2,%r20), %r28 /* Try to acquire the lock */ + ldcw 0(%sr2,%r20), %r28 /* Try to acquire the lock */ cmpb,<>,n %r0, %r28, cas_action /* Did we get it? */ cas_wouldblock: ldo 2(%r0), %r28 /* 2nd case */ diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 5facc9bff..594930bc4 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c @@ -10,6 +10,7 @@ * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include @@ -156,22 +157,8 @@ do_gettimeofday (struct timeval *tv) usec += (xtime.tv_nsec / 1000); } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); - if (unlikely(usec > LONG_MAX)) { - /* This can happen if the gettimeoffset adjustment is - * negative and xtime.tv_nsec is smaller than the - * adjustment */ - printk(KERN_ERR "do_gettimeofday() spurious xtime.tv_nsec of %ld\n", usec); - usec += USEC_PER_SEC; - --sec; - /* This should never happen, it means the negative - * time adjustment was more than a second, so there's - * something seriously wrong */ - BUG_ON(usec > LONG_MAX); - } - - - while (usec >= USEC_PER_SEC) { - usec -= USEC_PER_SEC; + while (usec >= 1000000) { + usec -= 1000000; ++sec; } diff --git a/arch/parisc/kernel/topology.c b/arch/parisc/kernel/topology.c index 068b20d82..3ba040050 100644 --- a/arch/parisc/kernel/topology.c +++ b/arch/parisc/kernel/topology.c @@ -26,10 +26,11 @@ static struct cpu cpu_devices[NR_CPUS] __read_mostly; static int __init topology_init(void) { + struct node *parent = NULL; int num; for_each_present_cpu(num) { - register_cpu(&cpu_devices[num], num); + register_cpu(&cpu_devices[num], num, parent); } return 0; } diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 77b28cb8a..ff200608c 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -10,6 +10,7 @@ * state in 'asm.s'. */ +#include #include #include #include @@ -65,42 +66,57 @@ int printbinary(char *buf, unsigned long x, int nbits) #else #define RFMT "%08lx" #endif -#define FFMT "%016llx" /* fpregs are 64-bit always */ -#define PRINTREGS(lvl,r,f,fmt,x) \ - printk("%s%s%02d-%02d " fmt " " fmt " " fmt " " fmt "\n", \ - lvl, f, (x), (x+3), (r)[(x)+0], (r)[(x)+1], \ - (r)[(x)+2], (r)[(x)+3]) - -static void print_gr(char *level, struct pt_regs *regs) +void show_regs(struct pt_regs *regs) { int i; - char buf[64]; + char buf[128], *p; + char *level; + unsigned long cr30; + unsigned long cr31; + /* carlos says that gcc understands better memory in a struct, + * and it makes our life easier with fpregs -- T-Bone */ + struct { u32 sw[2]; } s; + + level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT; + + printk("%s\n", level); /* don't want to have that pretty register dump messed up */ - printk("%s\n", level); printk("%s YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\n", level); printbinary(buf, regs->gr[0], 32); printk("%sPSW: %s %s\n", level, buf, print_tainted()); - for (i = 0; i < 32; i += 4) - PRINTREGS(level, regs->gr, "r", RFMT, i); -} + for (i = 0; i < 32; i += 4) { + int j; + p = buf; + p += sprintf(p, "%sr%02d-%02d ", level, i, i + 3); + for (j = 0; j < 4; j++) { + p += sprintf(p, " " RFMT, (i+j) == 0 ? 0 : regs->gr[i + j]); + } + printk("%s\n", buf); + } -static void print_fr(char *level, struct pt_regs *regs) -{ - int i; - char buf[64]; - struct { u32 sw[2]; } s; + for (i = 0; i < 8; i += 4) { + int j; + p = buf; + p += sprintf(p, "%ssr%d-%d ", level, i, i + 3); + for (j = 0; j < 4; j++) { + p += sprintf(p, " " RFMT, regs->sr[i + j]); + } + printk("%s\n", buf); + } /* FR are 64bit everywhere. Need to use asm to get the content * of fpsr/fper1, and we assume that we won't have a FP Identify * in our way, otherwise we're screwed. * The fldd is used to restore the T-bit if there was one, as the * store clears it anyway. - * PA2.0 book says "thou shall not use fstw on FPSR/FPERs" - T-Bone */ - asm volatile ("fstd %%fr0,0(%1) \n\t" - "fldd 0(%1),%%fr0 \n\t" - : "=m" (s) : "r" (&s) : "r0"); + * BTW, PA2.0 book says "thou shall not use fstw on FPSR/FPERs". */ + __asm__ ( + "fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s) : "r" (&s) : "%r0" + ); printk("%s\n", level); printk("%s VZOUICununcqcqcqcqcqcrmunTDVZOUI\n", level); @@ -109,25 +125,14 @@ static void print_fr(char *level, struct pt_regs *regs) printk("%sFPER1: %08x\n", level, s.sw[1]); /* here we'll print fr0 again, tho it'll be meaningless */ - for (i = 0; i < 32; i += 4) - PRINTREGS(level, regs->fr, "fr", FFMT, i); -} - -void show_regs(struct pt_regs *regs) -{ - int i; - char *level; - unsigned long cr30, cr31; - - level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT; - - print_gr(level, regs); - - for (i = 0; i < 8; i += 4) - PRINTREGS(level, regs->sr, "sr", RFMT, i); - - if (user_mode(regs)) - print_fr(level, regs); + for (i = 0; i < 32; i += 4) { + int j; + p = buf; + p += sprintf(p, "%sfr%02d-%02d ", level, i, i + 3); + for (j = 0; j < 4; j++) + p += sprintf(p, " %016llx", (i+j) == 0 ? 0 : regs->fr[i+j]); + printk("%s\n", buf); + } cr30 = mfctl(30); cr31 = mfctl(31); diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index bd2230d6a..de0a1b21c 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -42,8 +43,6 @@ "\tldil L%%" #lbl ", %%r1\n" \ "\tldo R%%" #lbl "(%%r1), %%r1\n" \ "\tbv,n %%r0(%%r1)\n" -/* If you use FIXUP_BRANCH, then you must list this clobber */ -#define FIXUP_BRANCH_CLOBBER "r1" /* 1111 1100 0000 0000 0001 0011 1100 0000 */ #define OPCODE1(a,b,c) ((a)<<26|(b)<<12|(c)<<6) @@ -158,7 +157,7 @@ static int emulate_ldh(struct pt_regs *regs, int toreg) " .previous\n" : "=r" (val), "=r" (ret) : "0" (val), "r" (saddr), "r" (regs->isr) - : "r20", FIXUP_BRANCH_CLOBBER ); + : "r20" ); DPRINTF("val = 0x" RFMT "\n", val); @@ -203,7 +202,7 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop) " .previous\n" : "=r" (val), "=r" (ret) : "0" (val), "r" (saddr), "r" (regs->isr) - : "r19", "r20", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20" ); DPRINTF("val = 0x" RFMT "\n", val); @@ -254,7 +253,7 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) " .previous\n" : "=r" (val), "=r" (ret) : "0" (val), "r" (saddr), "r" (regs->isr) - : "r19", "r20", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20" ); #else { unsigned long valh=0,vall=0; @@ -288,7 +287,7 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop) " .previous\n" : "=r" (valh), "=r" (vall), "=r" (ret) : "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr) - : "r19", "r20", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20" ); val=((__u64)valh<<32)|(__u64)vall; } #endif @@ -336,7 +335,7 @@ static int emulate_sth(struct pt_regs *regs, int frreg) " .previous\n" : "=r" (ret) : "r" (val), "r" (regs->ior), "r" (regs->isr) - : "r19", FIXUP_BRANCH_CLOBBER ); + : "r19" ); return ret; } @@ -390,7 +389,7 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop) " .previous\n" : "=r" (ret) : "r" (val), "r" (regs->ior), "r" (regs->isr) - : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20", "r21", "r22", "r1" ); return 0; } @@ -451,7 +450,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop) " .previous\n" : "=r" (ret) : "r" (val), "r" (regs->ior), "r" (regs->isr) - : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20", "r21", "r22", "r1" ); #else { unsigned long valh=(val>>32),vall=(val&0xffffffffl); @@ -496,7 +495,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop) " .previous\n" : "=r" (ret) : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr) - : "r19", "r20", "r21", "r1", FIXUP_BRANCH_CLOBBER ); + : "r19", "r20", "r21", "r1" ); } #endif diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 920bdbf84..cc1c1afc3 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -8,6 +8,7 @@ * understand what is happening here */ +#include #include #include #include diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index b3677fc8e..94dcc03a2 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -23,6 +23,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include /* needed for the processor specific cache alignment size */ #include @@ -204,7 +205,6 @@ SECTIONS *(.dynstr) *(.dynamic) *(.hash) - *(.gnu.hash) #endif } diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c index f352666b5..90f400b10 100644 --- a/arch/parisc/lib/bitops.c +++ b/arch/parisc/lib/bitops.c @@ -6,6 +6,7 @@ * Copyright 2000 Grant Grundler (grundler@cup.hp.com) */ +#include #include #include #include diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S index ecce3d354..e0661c297 100644 --- a/arch/parisc/lib/fixup.S +++ b/arch/parisc/lib/fixup.S @@ -19,6 +19,7 @@ * * Fixup routines for kernel exception handling. */ +#include #include #include #include diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index 5575e41f9..b70980353 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c @@ -53,6 +53,7 @@ */ #ifdef __KERNEL__ +#include #include #include #include diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index f2b96f1e0..631712562 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -10,6 +10,7 @@ * */ +#include #include #include @@ -27,7 +28,6 @@ #include #include #include -#include DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); @@ -418,10 +418,11 @@ void free_initmem(void) #ifdef CONFIG_DEBUG_RODATA void mark_rodata_ro(void) { + extern char __start_rodata, __end_rodata; /* rodata memory was already mapped with KERNEL_RO access rights by pagetable_init() and map_pages(). No need to do additional stuff here */ printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n", - (unsigned long)(__end_rodata - __start_rodata) >> 10); + (unsigned long)(&__end_rodata - &__start_rodata) >> 10); } #endif diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ab0851ecf..f35dd7b70 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -30,10 +30,6 @@ config GENERIC_HARDIRQS bool default y -config IRQ_PER_CPU - bool - default y - config RWSEM_GENERIC_SPINLOCK bool @@ -49,10 +45,6 @@ config GENERIC_CALIBRATE_DELAY bool default y -config GENERIC_FIND_NEXT_BIT - bool - default y - config PPC bool default y @@ -95,10 +87,6 @@ config GENERIC_TBSYNC default y if PPC32 && SMP default n -config AUDIT_ARCH - bool - default y - config DEFAULT_UIMAGE bool help @@ -149,15 +137,6 @@ config PPC_85xx select FSL_SOC select 85xx -config PPC_86xx - bool "Freescale 86xx" - select 6xx - select FSL_SOC - select PPC_FPU - select ALTIVEC - help - The Freescale E600 SoCs have 74xx cores. - config 40x bool "AMCC 40x" @@ -344,7 +323,7 @@ config PPC_ISERIES config EMBEDDED6xx bool "Embedded 6xx/7xx/7xxx-based board" - depends on PPC32 && (BROKEN||BROKEN_ON_SMP) + depends on PPC32 && BROKEN config APUS bool "Amiga-APUS" @@ -357,8 +336,7 @@ endchoice config PPC_PSERIES depends on PPC_MULTIPLATFORM && PPC64 - bool "IBM pSeries & new (POWER5-based) iSeries" - select MPIC + bool " IBM pSeries & new (POWER5-based) iSeries" select PPC_I8259 select PPC_RTAS select RTAS_ERROR_LOGGING @@ -366,9 +344,8 @@ config PPC_PSERIES default y config PPC_CHRP - bool "Common Hardware Reference Platform (CHRP) based machines" + bool " Common Hardware Reference Platform (CHRP) based machines" depends on PPC_MULTIPLATFORM && PPC32 - select MPIC select PPC_I8259 select PPC_INDIRECT_PCI select PPC_RTAS @@ -377,9 +354,8 @@ config PPC_CHRP default y config PPC_PMAC - bool "Apple PowerMac based machines" + bool " Apple PowerMac based machines" depends on PPC_MULTIPLATFORM - select MPIC select PPC_INDIRECT_PCI if PPC32 select PPC_MPC106 if PPC32 default y @@ -387,7 +363,6 @@ config PPC_PMAC config PPC_PMAC64 bool depends on PPC_PMAC && POWER4 - select MPIC select U3_DART select MPIC_BROKEN_U3 select GENERIC_TBSYNC @@ -395,9 +370,8 @@ config PPC_PMAC64 default y config PPC_PREP - bool "PowerPC Reference Platform (PReP) based machines" + bool " PowerPC Reference Platform (PReP) based machines" depends on PPC_MULTIPLATFORM && PPC32 && BROKEN - select MPIC select PPC_I8259 select PPC_INDIRECT_PCI select PPC_UDBG_16550 @@ -405,8 +379,7 @@ config PPC_PREP config PPC_MAPLE depends on PPC_MULTIPLATFORM && PPC64 - bool "Maple 970FX Evaluation Board" - select MPIC + bool " Maple 970FX Evaluation Board" select U3_DART select MPIC_BROKEN_U3 select GENERIC_TBSYNC @@ -418,26 +391,11 @@ config PPC_MAPLE For more informations, refer to config PPC_CELL - bool - default n - -config PPC_CELL_NATIVE - bool - select PPC_CELL - default n - -config PPC_IBM_CELL_BLADE - bool "IBM Cell Blade" + bool " Cell Broadband Processor Architecture" depends on PPC_MULTIPLATFORM && PPC64 - select PPC_CELL_NATIVE select PPC_RTAS select MMIO_NVRAM select PPC_UDBG_16550 - select UDBG_RTAS_CONSOLE - -config UDBG_RTAS_CONSOLE - bool - default n # Systemsim configuration config MAMBO @@ -470,6 +428,11 @@ config U3_DART depends on PPC_MULTIPLATFORM && PPC64 default n +config MPIC + depends on PPC_PSERIES || PPC_PMAC || PPC_MAPLE || PPC_CHRP + bool + default y + config PPC_RTAS bool default n @@ -497,6 +460,11 @@ config MPIC_BROKEN_U3 depends on PPC_MAPLE default y +config CELL_IIC + depends on PPC_CELL + bool + default y + config IBMVIO depends on PPC_PSERIES || PPC_ISERIES bool @@ -529,7 +497,7 @@ config CPU_FREQ_PMAC config CPU_FREQ_PMAC64 bool "Support for some Apple G5s" - depends on CPU_FREQ && PPC64 + depends on CPU_FREQ && PMAC_SMU && PPC64 select CPU_FREQ_TABLE help This adds support for frequency switching on Apple iMac G5, @@ -592,20 +560,12 @@ config TAU_AVERAGE /proc/cpuinfo. If in doubt, say N here. - -config PPC_TODC - depends on EMBEDDED6xx - bool "Generic Time-of-day Clock (TODC) support" - ---help--- - This adds support for many TODC/RTC chips. - endmenu source arch/powerpc/platforms/embedded6xx/Kconfig source arch/powerpc/platforms/4xx/Kconfig source arch/powerpc/platforms/83xx/Kconfig source arch/powerpc/platforms/85xx/Kconfig -source arch/powerpc/platforms/86xx/Kconfig source arch/powerpc/platforms/8xx/Kconfig source arch/powerpc/platforms/cell/Kconfig @@ -669,10 +629,10 @@ config KEXEC help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is independent of the system firmware. And like a reboot + but it is indepedent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. - The name comes from the similarity to the exec system call. + The name comes from the similiarity to the exec system call. It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not @@ -750,15 +710,6 @@ config ARCH_MEMORY_PROBE def_bool y depends on MEMORY_HOTPLUG -# Some NUMA nodes have memory ranges that span -# other nodes. Even though a pfn is valid and -# between a node's start and end pfns, it may not -# reside on that node. See memmap_init_zone() -# for details. -config NODES_SPAN_OTHER_NODES - def_bool y - depends on NEED_MULTIPLE_NODES - config PPC_64K_PAGES bool "64k page size" depends on PPC64 @@ -772,6 +723,7 @@ config PPC_64K_PAGES config SCHED_SMT bool "SMT (Hyperthreading) scheduler support" depends on PPC64 && SMP + default off help SMT scheduler support improves the CPU scheduler's decision making when dealing with POWER5 cpus at a cost of slightly increased @@ -846,14 +798,6 @@ config GENERIC_ISA_DMA depends on PPC64 || POWER4 || 6xx && !CPM2 default y -config MPIC - bool - default n - -config MPIC_WEIRD - bool - default n - config PPC_I8259 bool default n @@ -878,10 +822,8 @@ config MCA bool config PCI - bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ - || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) || MPC7448HPC2 - default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ - && !PPC_85xx && !PPC_86xx + bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) + default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS default PCI_QSPAN if !4xx && !CPM2 && 8xx help @@ -909,12 +851,12 @@ config PCI_8260 default y config 8260_PCI9 - bool "Enable workaround for MPC826x erratum PCI 9" + bool " Enable workaround for MPC826x erratum PCI 9" depends on PCI_8260 && !ADS8272 default y choice - prompt "IDMA channel for PCI 9 workaround" + prompt " IDMA channel for PCI 9 workaround" depends on 8260_PCI9 config 8260_PCI9_IDMA1 @@ -931,8 +873,6 @@ config 8260_PCI9_IDMA4 endchoice -source "drivers/pci/pcie/Kconfig" - source "drivers/pci/Kconfig" source "drivers/pcmcia/Kconfig" diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index e29ef77d3..8d48e9e71 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -110,16 +110,13 @@ config SERIAL_TEXT_DEBUG depends on 4xx || LOPEC || MV64X60 || PPLUS || PRPMC800 || \ PPC_GEN550 || PPC_MPC52xx -config PPC_EARLY_DEBUG - bool "Early debugging (dangerous)" - choice - prompt "Early debugging console" - depends on PPC_EARLY_DEBUG + prompt "Early debugging (dangerous)" + bool + optional help - Use the selected console for early debugging. Careful, if you - enable debugging for the wrong type of machine your kernel - _will not boot_. + Enable early debugging. Careful, if you enable debugging for the + wrong type of machine your kernel _will not boot_. config PPC_EARLY_DEBUG_LPAR bool "LPAR HV Console" @@ -134,19 +131,12 @@ config PPC_EARLY_DEBUG_G5 help Select this to enable early debugging for Apple G5 machines. -config PPC_EARLY_DEBUG_RTAS_PANEL +config PPC_EARLY_DEBUG_RTAS bool "RTAS Panel" depends on PPC_RTAS help Select this to enable early debugging via the RTAS panel. -config PPC_EARLY_DEBUG_RTAS_CONSOLE - bool "RTAS Console" - depends on PPC_RTAS - select UDBG_RTAS_CONSOLE - help - Select this to enable early debugging via the RTAS console. - config PPC_EARLY_DEBUG_MAPLE bool "Maple real mode" depends on PPC_MAPLE diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 01667d1d5..ed5b26aa8 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -108,6 +108,7 @@ ifeq ($(CONFIG_6xx),y) CFLAGS += -mcpu=powerpc endif +cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index d961bfeed..840ae595a 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -29,8 +29,8 @@ OBJCOPYFLAGS := contents,alloc,load,readonly,data OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 OBJCOPY_MIB_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment -zlib := inffast.c inflate.c inftrees.c -zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h +zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c +zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h zliblinuxheader := zlib.h zconf.h zutil.h $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts deleted file mode 100644 index d7b985e6b..000000000 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * MPC7448HPC2 (Taiga) board Device Tree Source - * - * Copyright 2006 Freescale Semiconductor Inc. - * 2006 Roy Zang . - * - * 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. - */ - - -/ { - model = "mpc7448hpc2"; - compatible = "mpc74xx"; - #address-cells = <1>; - #size-cells = <1>; - linux,phandle = <100>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells =<0>; - linux,phandle = <200>; - - PowerPC,7448@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K bytes - i-cache-size = <8000>; // L1, 32K bytes - timebase-frequency = <0>; // 33 MHz, from uboot - clock-frequency = <0>; // From U-Boot - bus-frequency = <0>; // From U-Boot - 32-bit; - linux,phandle = <201>; - linux,boot-cpu; - }; - }; - - memory { - device_type = "memory"; - linux,phandle = <300>; - reg = <00000000 20000000 // DDR2 512M at 0 - >; - }; - - tsi108@c0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "tsi-bridge"; - ranges = <00000000 c0000000 00010000>; - reg = ; - bus-frequency = <0>; - - i2c@7000 { - interrupt-parent = <7400>; - interrupts = ; - reg = <7000 400>; - device_type = "i2c"; - compatible = "tsi-i2c"; - }; - - mdio@6000 { - device_type = "mdio"; - compatible = "tsi-ethernet"; - - ethernet-phy@6000 { - linux,phandle = <6000>; - interrupt-parent = <7400>; - interrupts = <2 1>; - reg = <6000 50>; - phy-id = <8>; - device_type = "ethernet-phy"; - }; - - ethernet-phy@6400 { - linux,phandle = <6400>; - interrupt-parent = <7400>; - interrupts = <2 1>; - reg = <6000 50>; - phy-id = <9>; - device_type = "ethernet-phy"; - }; - - }; - - ethernet@6200 { - #size-cells = <0>; - device_type = "network"; - model = "TSI-ETH"; - compatible = "tsi-ethernet"; - reg = <6000 200>; - address = [ 00 06 D2 00 00 01 ]; - interrupts = <10 2>; - interrupt-parent = <7400>; - phy-handle = <6000>; - }; - - ethernet@6600 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSI-ETH"; - compatible = "tsi-ethernet"; - reg = <6400 200>; - address = [ 00 06 D2 00 00 02 ]; - interrupts = <11 2>; - interrupt-parent = <7400>; - phy-handle = <6400>; - }; - - serial@7808 { - device_type = "serial"; - compatible = "ns16550"; - reg = <7808 200>; - clock-frequency = <3f6b5a00>; - interrupts = ; - interrupt-parent = <7400>; - }; - - serial@7c08 { - device_type = "serial"; - compatible = "ns16550"; - reg = <7c08 200>; - clock-frequency = <3f6b5a00>; - interrupts = ; - interrupt-parent = <7400>; - }; - - pic@7400 { - linux,phandle = <7400>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <7400 400>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - }; - pci@1000 { - compatible = "tsi10x"; - device_type = "pci"; - linux,phandle = <1000>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <1000 1000>; - bus-range = <0 0>; - ranges = <02000000 0 e0000000 e0000000 0 1A000000 - 01000000 0 00000000 fa000000 0 00010000>; - clock-frequency = <7f28154>; - interrupt-parent = <7400>; - interrupts = <17 2>; - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x11 */ - 0800 0 0 1 7400 24 0 - 0800 0 0 2 7400 25 0 - 0800 0 0 3 7400 26 0 - 0800 0 0 4 7400 27 0 - - /* IDSEL 0x12 */ - 1000 0 0 1 7400 25 0 - 1000 0 0 2 7400 26 0 - 1000 0 0 3 7400 27 0 - 1000 0 0 4 7400 24 0 - - /* IDSEL 0x13 */ - 1800 0 0 1 7400 26 0 - 1800 0 0 2 7400 27 0 - 1800 0 0 3 7400 24 0 - 1800 0 0 4 7400 25 0 - - /* IDSEL 0x14 */ - 2000 0 0 1 7400 27 0 - 2000 0 0 2 7400 24 0 - 2000 0 0 3 7400 25 0 - 2000 0 0 4 7400 26 0 - >; - }; - }; - -}; diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc8349emds.dts deleted file mode 100644 index 12f5dbf30..000000000 --- a/arch/powerpc/boot/dts/mpc8349emds.dts +++ /dev/null @@ -1,328 +0,0 @@ -/* - * MPC8349E MDS Device Tree Source - * - * Copyright 2005, 2006 Freescale Semiconductor 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. - */ - -/ { - model = "MPC8349EMDS"; - compatible = "MPC834xMDS"; - #address-cells = <1>; - #size-cells = <1>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells = <0>; - - PowerPC,8349@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // from bootloader - bus-frequency = <0>; // from bootloader - clock-frequency = <0>; // from bootloader - 32-bit; - }; - }; - - memory { - device_type = "memory"; - reg = <00000000 10000000>; // 256MB at 0 - }; - - soc8349@e0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 e0000000 00100000>; - reg = ; - bus-frequency = <0>; - - wdt@200 { - device_type = "watchdog"; - compatible = "mpc83xx_wdt"; - reg = <200 100>; - }; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = ; - interrupt-parent = <700>; - dfsrr; - }; - - i2c@3100 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3100 100>; - interrupts = ; - interrupt-parent = <700>; - dfsrr; - }; - - spi@7000 { - device_type = "spi"; - compatible = "mpc83xx_spi"; - reg = <7000 1000>; - interrupts = <10 8>; - interrupt-parent = <700>; - mode = <0>; - }; - - /* phy type (ULPI or SERIAL) are only types supportted for MPH */ - /* port = 0 or 1 */ - usb@22000 { - device_type = "usb"; - compatible = "fsl-usb2-mph"; - reg = <22000 1000>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-parent = <700>; - interrupts = <27 2>; - phy_type = "ulpi"; - port1; - }; - /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ - usb@23000 { - device_type = "usb"; - compatible = "fsl-usb2-dr"; - reg = <23000 1000>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-parent = <700>; - interrupts = <26 2>; - phy_type = "ulpi"; - }; - - mdio@24520 { - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - #address-cells = <1>; - #size-cells = <0>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <700>; - interrupts = <11 2>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <700>; - interrupts = <12 2>; - reg = <1>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - address = [ 00 00 00 00 00 00 ]; - local-mac-address = [ 00 00 00 00 00 00 ]; - interrupts = <20 8 21 8 22 8>; - interrupt-parent = <700>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - address = [ 00 00 00 00 00 00 ]; - local-mac-address = [ 00 00 00 00 00 00 ]; - interrupts = <23 8 24 8 25 8>; - interrupt-parent = <700>; - phy-handle = <2452001>; - }; - - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; - clock-frequency = <0>; - interrupts = <9 8>; - interrupt-parent = <700>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; - clock-frequency = <0>; - interrupts = ; - interrupt-parent = <700>; - }; - - pci@8500 { - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x11 */ - 8800 0 0 1 700 14 8 - 8800 0 0 2 700 15 8 - 8800 0 0 3 700 16 8 - 8800 0 0 4 700 17 8 - - /* IDSEL 0x12 */ - 9000 0 0 1 700 16 8 - 9000 0 0 2 700 17 8 - 9000 0 0 3 700 14 8 - 9000 0 0 4 700 15 8 - - /* IDSEL 0x13 */ - 9800 0 0 1 700 17 8 - 9800 0 0 2 700 14 8 - 9800 0 0 3 700 15 8 - 9800 0 0 4 700 16 8 - - /* IDSEL 0x15 */ - a800 0 0 1 700 14 8 - a800 0 0 2 700 15 8 - a800 0 0 3 700 16 8 - a800 0 0 4 700 17 8 - - /* IDSEL 0x16 */ - b000 0 0 1 700 17 8 - b000 0 0 2 700 14 8 - b000 0 0 3 700 15 8 - b000 0 0 4 700 16 8 - - /* IDSEL 0x17 */ - b800 0 0 1 700 16 8 - b800 0 0 2 700 17 8 - b800 0 0 3 700 14 8 - b800 0 0 4 700 15 8 - - /* IDSEL 0x18 */ - b000 0 0 1 700 15 8 - b000 0 0 2 700 16 8 - b000 0 0 3 700 17 8 - b000 0 0 4 700 14 8>; - interrupt-parent = <700>; - interrupts = <42 8>; - bus-range = <0 0>; - ranges = <02000000 0 a0000000 a0000000 0 10000000 - 42000000 0 80000000 80000000 0 10000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8500 100>; - compatible = "83xx"; - device_type = "pci"; - }; - - pci@8600 { - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x11 */ - 8800 0 0 1 700 14 8 - 8800 0 0 2 700 15 8 - 8800 0 0 3 700 16 8 - 8800 0 0 4 700 17 8 - - /* IDSEL 0x12 */ - 9000 0 0 1 700 16 8 - 9000 0 0 2 700 17 8 - 9000 0 0 3 700 14 8 - 9000 0 0 4 700 15 8 - - /* IDSEL 0x13 */ - 9800 0 0 1 700 17 8 - 9800 0 0 2 700 14 8 - 9800 0 0 3 700 15 8 - 9800 0 0 4 700 16 8 - - /* IDSEL 0x15 */ - a800 0 0 1 700 14 8 - a800 0 0 2 700 15 8 - a800 0 0 3 700 16 8 - a800 0 0 4 700 17 8 - - /* IDSEL 0x16 */ - b000 0 0 1 700 17 8 - b000 0 0 2 700 14 8 - b000 0 0 3 700 15 8 - b000 0 0 4 700 16 8 - - /* IDSEL 0x17 */ - b800 0 0 1 700 16 8 - b800 0 0 2 700 17 8 - b800 0 0 3 700 14 8 - b800 0 0 4 700 15 8 - - /* IDSEL 0x18 */ - b000 0 0 1 700 15 8 - b000 0 0 2 700 16 8 - b000 0 0 3 700 17 8 - b000 0 0 4 700 14 8>; - interrupt-parent = <700>; - interrupts = <42 8>; - bus-range = <0 0>; - ranges = <02000000 0 b0000000 b0000000 0 10000000 - 42000000 0 90000000 90000000 0 10000000 - 01000000 0 00000000 e2100000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8600 100>; - compatible = "83xx"; - device_type = "pci"; - }; - - /* May need to remove if on a part without crypto engine */ - crypto@30000 { - device_type = "crypto"; - model = "SEC2"; - compatible = "talitos"; - reg = <30000 10000>; - interrupts = ; - interrupt-parent = <700>; - num-channels = <4>; - channel-fifo-len = <18>; - exec-units-mask = <0000007e>; - /* desc mask is for rev2.0, - * we need runtime fixup for >2.0 */ - descriptor-types-mask = <01010ebf>; - }; - - /* IPIC - * interrupts cell = - * sense values match linux IORESOURCE_IRQ_* defines: - * sense == 8: Level, low assertion - * sense == 2: Edge, high-to-low change - */ - pic@700 { - linux,phandle = <700>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <700 100>; - built-in; - device_type = "ipic"; - }; - }; -}; diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts deleted file mode 100644 index 5f41c1f7a..000000000 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ /dev/null @@ -1,257 +0,0 @@ -/* - * MPC8540 ADS Device Tree Source - * - * Copyright 2006 Freescale Semiconductor 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. - */ - - -/ { - model = "MPC8540ADS"; - compatible = "MPC85xxADS"; - #address-cells = <1>; - #size-cells = <1>; - linux,phandle = <100>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells = <0>; - linux,phandle = <200>; - - PowerPC,8540@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // 166 MHz - clock-frequency = <0>; // 825 MHz, from uboot - 32-bit; - linux,phandle = <201>; - }; - }; - - memory { - device_type = "memory"; - linux,phandle = <300>; - reg = <00000000 08000000>; // 128M at 0x0 - }; - - soc8540@e0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 e0000000 00100000>; - reg = ; // CCSRBAR 1M - bus-frequency = <0>; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <1b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <40000>; - interrupts = <35 1>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <40000>; - interrupts = <35 1>; - reg = <1>; - device_type = "ethernet-phy"; - }; - ethernet-phy@3 { - linux,phandle = <2452003>; - interrupt-parent = <40000>; - interrupts = <37 1>; - reg = <3>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - address = [ 00 E0 0C 00 73 00 ]; - local-mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = ; - interrupt-parent = <40000>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - address = [ 00 E0 0C 00 73 01 ]; - local-mac-address = [ 00 E0 0C 00 73 01 ]; - interrupts = <13 2 14 2 18 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - - ethernet@26000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "FEC"; - compatible = "gianfar"; - reg = <26000 1000>; - address = [ 00 E0 0C 00 73 02 ]; - local-mac-address = [ 00 E0 0C 00 73 02 ]; - interrupts = <19 2>; - interrupt-parent = <40000>; - phy-handle = <2452003>; - }; - - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - pci@8000 { - linux,phandle = <8000>; - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x02 */ - 1000 0 0 1 40000 31 1 - 1000 0 0 2 40000 32 1 - 1000 0 0 3 40000 33 1 - 1000 0 0 4 40000 34 1 - - /* IDSEL 0x03 */ - 1800 0 0 1 40000 34 1 - 1800 0 0 2 40000 31 1 - 1800 0 0 3 40000 32 1 - 1800 0 0 4 40000 33 1 - - /* IDSEL 0x04 */ - 2000 0 0 1 40000 33 1 - 2000 0 0 2 40000 34 1 - 2000 0 0 3 40000 31 1 - 2000 0 0 4 40000 32 1 - - /* IDSEL 0x05 */ - 2800 0 0 1 40000 32 1 - 2800 0 0 2 40000 33 1 - 2800 0 0 3 40000 34 1 - 2800 0 0 4 40000 31 1 - - /* IDSEL 0x0c */ - 6000 0 0 1 40000 31 1 - 6000 0 0 2 40000 32 1 - 6000 0 0 3 40000 33 1 - 6000 0 0 4 40000 34 1 - - /* IDSEL 0x0d */ - 6800 0 0 1 40000 34 1 - 6800 0 0 2 40000 31 1 - 6800 0 0 3 40000 32 1 - 6800 0 0 4 40000 33 1 - - /* IDSEL 0x0e */ - 7000 0 0 1 40000 33 1 - 7000 0 0 2 40000 34 1 - 7000 0 0 3 40000 31 1 - 7000 0 0 4 40000 32 1 - - /* IDSEL 0x0f */ - 7800 0 0 1 40000 32 1 - 7800 0 0 2 40000 33 1 - 7800 0 0 3 40000 34 1 - 7800 0 0 4 40000 31 1 - - /* IDSEL 0x12 */ - 9000 0 0 1 40000 31 1 - 9000 0 0 2 40000 32 1 - 9000 0 0 3 40000 33 1 - 9000 0 0 4 40000 34 1 - - /* IDSEL 0x13 */ - 9800 0 0 1 40000 34 1 - 9800 0 0 2 40000 31 1 - 9800 0 0 3 40000 32 1 - 9800 0 0 4 40000 33 1 - - /* IDSEL 0x14 */ - a000 0 0 1 40000 33 1 - a000 0 0 2 40000 34 1 - a000 0 0 3 40000 31 1 - a000 0 0 4 40000 32 1 - - /* IDSEL 0x15 */ - a800 0 0 1 40000 32 1 - a800 0 0 2 40000 33 1 - a800 0 0 3 40000 34 1 - a800 0 0 4 40000 31 1>; - interrupt-parent = <40000>; - interrupts = <08 2>; - bus-range = <0 0>; - ranges = <02000000 0 80000000 80000000 0 20000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - compatible = "85xx"; - device_type = "pci"; - }; - - pic@40000 { - linux,phandle = <40000>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <40000 40000>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - }; - }; -}; diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts deleted file mode 100644 index 7be0bc659..000000000 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ /dev/null @@ -1,244 +0,0 @@ -/* - * MPC8541 CDS Device Tree Source - * - * Copyright 2006 Freescale Semiconductor 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. - */ - - -/ { - model = "MPC8541CDS"; - compatible = "MPC85xxCDS"; - #address-cells = <1>; - #size-cells = <1>; - linux,phandle = <100>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells = <0>; - linux,phandle = <200>; - - PowerPC,8541@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // 166 MHz - clock-frequency = <0>; // 825 MHz, from uboot - 32-bit; - linux,phandle = <201>; - }; - }; - - memory { - device_type = "memory"; - linux,phandle = <300>; - reg = <00000000 08000000>; // 128M at 0x0 - }; - - soc8541@e0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 e0000000 00100000>; - reg = ; // CCSRBAR 1M - bus-frequency = <0>; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <1b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <1>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - local-mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = ; - interrupt-parent = <40000>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - local-mac-address = [ 00 E0 0C 00 73 01 ]; - interrupts = <13 2 14 2 18 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - pci@8000 { - linux,phandle = <8000>; - interrupt-map-mask = <1f800 0 0 7>; - interrupt-map = < - - /* IDSEL 0x10 */ - 08000 0 0 1 40000 30 1 - 08000 0 0 2 40000 31 1 - 08000 0 0 3 40000 32 1 - 08000 0 0 4 40000 33 1 - - /* IDSEL 0x11 */ - 08800 0 0 1 40000 30 1 - 08800 0 0 2 40000 31 1 - 08800 0 0 3 40000 32 1 - 08800 0 0 4 40000 33 1 - - /* IDSEL 0x12 (Slot 1) */ - 09000 0 0 1 40000 30 1 - 09000 0 0 2 40000 31 1 - 09000 0 0 3 40000 32 1 - 09000 0 0 4 40000 33 1 - - /* IDSEL 0x13 (Slot 2) */ - 09800 0 0 1 40000 31 1 - 09800 0 0 2 40000 32 1 - 09800 0 0 3 40000 33 1 - 09800 0 0 4 40000 30 1 - - /* IDSEL 0x14 (Slot 3) */ - 0a000 0 0 1 40000 32 1 - 0a000 0 0 2 40000 33 1 - 0a000 0 0 3 40000 30 1 - 0a000 0 0 4 40000 31 1 - - /* IDSEL 0x15 (Slot 4) */ - 0a800 0 0 1 40000 33 1 - 0a800 0 0 2 40000 30 1 - 0a800 0 0 3 40000 31 1 - 0a800 0 0 4 40000 32 1 - - /* Bus 1 (Tundra Bridge) */ - /* IDSEL 0x12 (ISA bridge) */ - 19000 0 0 1 40000 30 1 - 19000 0 0 2 40000 31 1 - 19000 0 0 3 40000 32 1 - 19000 0 0 4 40000 33 1>; - interrupt-parent = <40000>; - interrupts = <08 2>; - bus-range = <0 0>; - ranges = <02000000 0 80000000 80000000 0 20000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - compatible = "85xx"; - device_type = "pci"; - - i8259@19000 { - clock-frequency = <0>; - interrupt-controller; - device_type = "interrupt-controller"; - reg = <19000 0 0 0 1>; - #address-cells = <0>; - #interrupt-cells = <2>; - built-in; - compatible = "chrp,iic"; - big-endian; - interrupts = <1>; - interrupt-parent = <8000>; - }; - }; - - pci@9000 { - linux,phandle = <9000>; - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x15 */ - a800 0 0 1 40000 3b 1 - a800 0 0 2 40000 3b 1 - a800 0 0 3 40000 3b 1 - a800 0 0 4 40000 3b 1>; - interrupt-parent = <40000>; - interrupts = <09 2>; - bus-range = <0 0>; - ranges = <02000000 0 a0000000 a0000000 0 20000000 - 01000000 0 00000000 e3000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <9000 1000>; - compatible = "85xx"; - device_type = "pci"; - }; - - pic@40000 { - linux,phandle = <40000>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <40000 40000>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - }; - }; -}; diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts deleted file mode 100644 index 893d7957c..000000000 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ /dev/null @@ -1,287 +0,0 @@ -/* - * MPC8555 CDS Device Tree Source - * - * Copyright 2006 Freescale Semiconductor 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. - */ - - -/ { - model = "MPC8548CDS"; - compatible = "MPC85xxCDS"; - #address-cells = <1>; - #size-cells = <1>; - linux,phandle = <100>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells = <0>; - linux,phandle = <200>; - - PowerPC,8548@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // 166 MHz - clock-frequency = <0>; // 825 MHz, from uboot - 32-bit; - linux,phandle = <201>; - }; - }; - - memory { - device_type = "memory"; - linux,phandle = <300>; - reg = <00000000 08000000>; // 128M at 0x0 - }; - - soc8548@e0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 e0000000 00100000>; - reg = ; // CCSRBAR 1M - bus-frequency = <0>; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <1b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <1>; - device_type = "ethernet-phy"; - }; - - ethernet-phy@2 { - linux,phandle = <2452002>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <2>; - device_type = "ethernet-phy"; - }; - ethernet-phy@3 { - linux,phandle = <2452003>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <3>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "eTSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - local-mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = ; - interrupt-parent = <40000>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "eTSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - local-mac-address = [ 00 E0 0C 00 73 01 ]; - interrupts = <13 2 14 2 18 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - - ethernet@26000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "eTSEC"; - compatible = "gianfar"; - reg = <26000 1000>; - local-mac-address = [ 00 E0 0C 00 73 02 ]; - interrupts = ; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - -/* eTSEC 4 is currently broken - ethernet@27000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "eTSEC"; - compatible = "gianfar"; - reg = <27000 1000>; - local-mac-address = [ 00 E0 0C 00 73 03 ]; - interrupts = <15 2 16 2 17 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - */ - - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - pci@8000 { - linux,phandle = <8000>; - interrupt-map-mask = <1f800 0 0 7>; - interrupt-map = < - - /* IDSEL 0x10 */ - 08000 0 0 1 40000 30 1 - 08000 0 0 2 40000 31 1 - 08000 0 0 3 40000 32 1 - 08000 0 0 4 40000 33 1 - - /* IDSEL 0x11 */ - 08800 0 0 1 40000 30 1 - 08800 0 0 2 40000 31 1 - 08800 0 0 3 40000 32 1 - 08800 0 0 4 40000 33 1 - - /* IDSEL 0x12 (Slot 1) */ - 09000 0 0 1 40000 30 1 - 09000 0 0 2 40000 31 1 - 09000 0 0 3 40000 32 1 - 09000 0 0 4 40000 33 1 - - /* IDSEL 0x13 (Slot 2) */ - 09800 0 0 1 40000 31 1 - 09800 0 0 2 40000 32 1 - 09800 0 0 3 40000 33 1 - 09800 0 0 4 40000 30 1 - - /* IDSEL 0x14 (Slot 3) */ - 0a000 0 0 1 40000 32 1 - 0a000 0 0 2 40000 33 1 - 0a000 0 0 3 40000 30 1 - 0a000 0 0 4 40000 31 1 - - /* IDSEL 0x15 (Slot 4) */ - 0a800 0 0 1 40000 33 1 - 0a800 0 0 2 40000 30 1 - 0a800 0 0 3 40000 31 1 - 0a800 0 0 4 40000 32 1 - - /* Bus 1 (Tundra Bridge) */ - /* IDSEL 0x12 (ISA bridge) */ - 19000 0 0 1 40000 30 1 - 19000 0 0 2 40000 31 1 - 19000 0 0 3 40000 32 1 - 19000 0 0 4 40000 33 1>; - interrupt-parent = <40000>; - interrupts = <08 2>; - bus-range = <0 0>; - ranges = <02000000 0 80000000 80000000 0 20000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - compatible = "85xx"; - device_type = "pci"; - - i8259@19000 { - clock-frequency = <0>; - interrupt-controller; - device_type = "interrupt-controller"; - reg = <19000 0 0 0 1>; - #address-cells = <0>; - #interrupt-cells = <2>; - built-in; - compatible = "chrp,iic"; - big-endian; - interrupts = <1>; - interrupt-parent = <8000>; - }; - }; - - pci@9000 { - linux,phandle = <9000>; - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x15 */ - a800 0 0 1 40000 3b 1 - a800 0 0 2 40000 3b 1 - a800 0 0 3 40000 3b 1 - a800 0 0 4 40000 3b 1>; - interrupt-parent = <40000>; - interrupts = <09 2>; - bus-range = <0 0>; - ranges = <02000000 0 a0000000 a0000000 0 20000000 - 01000000 0 00000000 e3000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <9000 1000>; - compatible = "85xx"; - device_type = "pci"; - }; - - pic@40000 { - linux,phandle = <40000>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <40000 40000>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - }; - }; -}; diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts deleted file mode 100644 index 118f5a887..000000000 --- a/arch/powerpc/boot/dts/mpc8555cds.dts +++ /dev/null @@ -1,244 +0,0 @@ -/* - * MPC8555 CDS Device Tree Source - * - * Copyright 2006 Freescale Semiconductor 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. - */ - - -/ { - model = "MPC8555CDS"; - compatible = "MPC85xxCDS"; - #address-cells = <1>; - #size-cells = <1>; - linux,phandle = <100>; - - cpus { - #cpus = <1>; - #address-cells = <1>; - #size-cells = <0>; - linux,phandle = <200>; - - PowerPC,8555@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // 166 MHz - clock-frequency = <0>; // 825 MHz, from uboot - 32-bit; - linux,phandle = <201>; - }; - }; - - memory { - device_type = "memory"; - linux,phandle = <300>; - reg = <00000000 08000000>; // 128M at 0x0 - }; - - soc8555@e0000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 e0000000 00100000>; - reg = ; // CCSRBAR 1M - bus-frequency = <0>; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <1b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <40000>; - interrupts = <35 0>; - reg = <1>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - local-mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = <0d 2 0e 2 12 2>; - interrupt-parent = <40000>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - local-mac-address = [ 00 E0 0C 00 73 01 ]; - interrupts = <13 2 14 2 18 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; // reg base, size - clock-frequency = <0>; // should we fill in in uboot? - interrupts = <1a 2>; - interrupt-parent = <40000>; - }; - - pci@8000 { - linux,phandle = <8000>; - interrupt-map-mask = <1f800 0 0 7>; - interrupt-map = < - - /* IDSEL 0x10 */ - 08000 0 0 1 40000 30 1 - 08000 0 0 2 40000 31 1 - 08000 0 0 3 40000 32 1 - 08000 0 0 4 40000 33 1 - - /* IDSEL 0x11 */ - 08800 0 0 1 40000 30 1 - 08800 0 0 2 40000 31 1 - 08800 0 0 3 40000 32 1 - 08800 0 0 4 40000 33 1 - - /* IDSEL 0x12 (Slot 1) */ - 09000 0 0 1 40000 30 1 - 09000 0 0 2 40000 31 1 - 09000 0 0 3 40000 32 1 - 09000 0 0 4 40000 33 1 - - /* IDSEL 0x13 (Slot 2) */ - 09800 0 0 1 40000 31 1 - 09800 0 0 2 40000 32 1 - 09800 0 0 3 40000 33 1 - 09800 0 0 4 40000 30 1 - - /* IDSEL 0x14 (Slot 3) */ - 0a000 0 0 1 40000 32 1 - 0a000 0 0 2 40000 33 1 - 0a000 0 0 3 40000 30 1 - 0a000 0 0 4 40000 31 1 - - /* IDSEL 0x15 (Slot 4) */ - 0a800 0 0 1 40000 33 1 - 0a800 0 0 2 40000 30 1 - 0a800 0 0 3 40000 31 1 - 0a800 0 0 4 40000 32 1 - - /* Bus 1 (Tundra Bridge) */ - /* IDSEL 0x12 (ISA bridge) */ - 19000 0 0 1 40000 30 1 - 19000 0 0 2 40000 31 1 - 19000 0 0 3 40000 32 1 - 19000 0 0 4 40000 33 1>; - interrupt-parent = <40000>; - interrupts = <08 2>; - bus-range = <0 0>; - ranges = <02000000 0 80000000 80000000 0 20000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - compatible = "85xx"; - device_type = "pci"; - - i8259@19000 { - clock-frequency = <0>; - interrupt-controller; - device_type = "interrupt-controller"; - reg = <19000 0 0 0 1>; - #address-cells = <0>; - #interrupt-cells = <2>; - built-in; - compatible = "chrp,iic"; - big-endian; - interrupts = <1>; - interrupt-parent = <8000>; - }; - }; - - pci@9000 { - linux,phandle = <9000>; - interrupt-map-mask = ; - interrupt-map = < - - /* IDSEL 0x15 */ - a800 0 0 1 40000 3b 1 - a800 0 0 2 40000 3b 1 - a800 0 0 3 40000 3b 1 - a800 0 0 4 40000 3b 1>; - interrupt-parent = <40000>; - interrupts = <09 2>; - bus-range = <0 0>; - ranges = <02000000 0 a0000000 a0000000 0 20000000 - 01000000 0 00000000 e3000000 0 00100000>; - clock-frequency = <3f940aa>; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <9000 1000>; - compatible = "85xx"; - device_type = "pci"; - }; - - pic@40000 { - linux,phandle = <40000>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <40000 40000>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - }; - }; -}; diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts deleted file mode 100644 index f0c773174..000000000 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ /dev/null @@ -1,339 +0,0 @@ -/* - * MPC8641 HPCN Device Tree Source - * - * Copyright 2006 Freescale Semiconductor 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. - */ - - -/ { - model = "MPC8641HPCN"; - compatible = "mpc86xx"; - #address-cells = <1>; - #size-cells = <1>; - - cpus { - #cpus = <2>; - #address-cells = <1>; - #size-cells = <0>; - - PowerPC,8641@0 { - device_type = "cpu"; - reg = <0>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // From uboot - clock-frequency = <0>; // From uboot - 32-bit; - linux,boot-cpu; - }; - PowerPC,8641@1 { - device_type = "cpu"; - reg = <1>; - d-cache-line-size = <20>; // 32 bytes - i-cache-line-size = <20>; // 32 bytes - d-cache-size = <8000>; // L1, 32K - i-cache-size = <8000>; // L1, 32K - timebase-frequency = <0>; // 33 MHz, from uboot - bus-frequency = <0>; // From uboot - clock-frequency = <0>; // From uboot - 32-bit; - }; - }; - - memory { - device_type = "memory"; - reg = <00000000 40000000>; // 1G at 0x0 - }; - - soc8641@f8000000 { - #address-cells = <1>; - #size-cells = <1>; - #interrupt-cells = <2>; - device_type = "soc"; - ranges = <0 f8000000 00100000>; - reg = ; // CCSRBAR 1M - bus-frequency = <0>; - - i2c@3000 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3000 100>; - interrupts = <2b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - i2c@3100 { - device_type = "i2c"; - compatible = "fsl-i2c"; - reg = <3100 100>; - interrupts = <2b 2>; - interrupt-parent = <40000>; - dfsrr; - }; - - mdio@24520 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "mdio"; - compatible = "gianfar"; - reg = <24520 20>; - linux,phandle = <24520>; - ethernet-phy@0 { - linux,phandle = <2452000>; - interrupt-parent = <40000>; - interrupts = <4a 1>; - reg = <0>; - device_type = "ethernet-phy"; - }; - ethernet-phy@1 { - linux,phandle = <2452001>; - interrupt-parent = <40000>; - interrupts = <4a 1>; - reg = <1>; - device_type = "ethernet-phy"; - }; - ethernet-phy@2 { - linux,phandle = <2452002>; - interrupt-parent = <40000>; - interrupts = <4a 1>; - reg = <2>; - device_type = "ethernet-phy"; - }; - ethernet-phy@3 { - linux,phandle = <2452003>; - interrupt-parent = <40000>; - interrupts = <4a 1>; - reg = <3>; - device_type = "ethernet-phy"; - }; - }; - - ethernet@24000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <24000 1000>; - mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = <1d 2 1e 2 22 2>; - interrupt-parent = <40000>; - phy-handle = <2452000>; - }; - - ethernet@25000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <25000 1000>; - mac-address = [ 00 E0 0C 00 73 01 ]; - interrupts = <23 2 24 2 28 2>; - interrupt-parent = <40000>; - phy-handle = <2452001>; - }; - - ethernet@26000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <26000 1000>; - mac-address = [ 00 E0 0C 00 02 FD ]; - interrupts = <1F 2 20 2 21 2>; - interrupt-parent = <40000>; - phy-handle = <2452002>; - }; - - ethernet@27000 { - #address-cells = <1>; - #size-cells = <0>; - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <27000 1000>; - mac-address = [ 00 E0 0C 00 03 FD ]; - interrupts = <25 2 26 2 27 2>; - interrupt-parent = <40000>; - phy-handle = <2452003>; - }; - serial@4500 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4500 100>; - clock-frequency = <0>; - interrupts = <2a 2>; - interrupt-parent = <40000>; - }; - - serial@4600 { - device_type = "serial"; - compatible = "ns16550"; - reg = <4600 100>; - clock-frequency = <0>; - interrupts = <1c 2>; - interrupt-parent = <40000>; - }; - - pci@8000 { - compatible = "86xx"; - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - reg = <8000 1000>; - bus-range = <0 fe>; - ranges = <02000000 0 80000000 80000000 0 20000000 - 01000000 0 00000000 e2000000 0 00100000>; - clock-frequency = <1fca055>; - interrupt-parent = <40000>; - interrupts = <18 2>; - interrupt-map-mask = ; - interrupt-map = < - /* IDSEL 0x11 */ - 8800 0 0 1 4d0 3 2 - 8800 0 0 2 4d0 4 2 - 8800 0 0 3 4d0 5 2 - 8800 0 0 4 4d0 6 2 - - /* IDSEL 0x12 */ - 9000 0 0 1 4d0 4 2 - 9000 0 0 2 4d0 5 2 - 9000 0 0 3 4d0 6 2 - 9000 0 0 4 4d0 3 2 - - /* IDSEL 0x13 */ - 9800 0 0 1 4d0 0 0 - 9800 0 0 2 4d0 0 0 - 9800 0 0 3 4d0 0 0 - 9800 0 0 4 4d0 0 0 - - /* IDSEL 0x14 */ - a000 0 0 1 4d0 0 0 - a000 0 0 2 4d0 0 0 - a000 0 0 3 4d0 0 0 - a000 0 0 4 4d0 0 0 - - /* IDSEL 0x15 */ - a800 0 0 1 4d0 0 0 - a800 0 0 2 4d0 0 0 - a800 0 0 3 4d0 0 0 - a800 0 0 4 4d0 0 0 - - /* IDSEL 0x16 */ - b000 0 0 1 4d0 0 0 - b000 0 0 2 4d0 0 0 - b000 0 0 3 4d0 0 0 - b000 0 0 4 4d0 0 0 - - /* IDSEL 0x17 */ - b800 0 0 1 4d0 0 0 - b800 0 0 2 4d0 0 0 - b800 0 0 3 4d0 0 0 - b800 0 0 4 4d0 0 0 - - /* IDSEL 0x18 */ - c000 0 0 1 4d0 0 0 - c000 0 0 2 4d0 0 0 - c000 0 0 3 4d0 0 0 - c000 0 0 4 4d0 0 0 - - /* IDSEL 0x19 */ - c800 0 0 1 4d0 0 0 - c800 0 0 2 4d0 0 0 - c800 0 0 3 4d0 0 0 - c800 0 0 4 4d0 0 0 - - /* IDSEL 0x1a */ - d000 0 0 1 4d0 6 2 - d000 0 0 2 4d0 3 2 - d000 0 0 3 4d0 4 2 - d000 0 0 4 4d0 5 2 - - - /* IDSEL 0x1b */ - d800 0 0 1 4d0 5 2 - d800 0 0 2 4d0 0 0 - d800 0 0 3 4d0 0 0 - d800 0 0 4 4d0 0 0 - - /* IDSEL 0x1c */ - e000 0 0 1 4d0 9 2 - e000 0 0 2 4d0 a 2 - e000 0 0 3 4d0 c 2 - e000 0 0 4 4d0 7 2 - - /* IDSEL 0x1d */ - e800 0 0 1 4d0 9 2 - e800 0 0 2 4d0 a 2 - e800 0 0 3 4d0 b 2 - e800 0 0 4 4d0 0 0 - - /* IDSEL 0x1e */ - f000 0 0 1 4d0 c 2 - f000 0 0 2 4d0 0 0 - f000 0 0 3 4d0 0 0 - f000 0 0 4 4d0 0 0 - - /* IDSEL 0x1f */ - f800 0 0 1 4d0 6 2 - f800 0 0 2 4d0 0 0 - f800 0 0 3 4d0 0 0 - f800 0 0 4 4d0 0 0 - >; - i8259@4d0 { - linux,phandle = <4d0>; - clock-frequency = <0>; - interrupt-controller; - device_type = "interrupt-controller"; - #address-cells = <0>; - #interrupt-cells = <2>; - built-in; - compatible = "chrp,iic"; - big-endian; - interrupts = <49 2>; - interrupt-parent = <40000>; - }; - - }; - pic@40000 { - linux,phandle = <40000>; - clock-frequency = <0>; - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <2>; - reg = <40000 40000>; - built-in; - compatible = "chrp,open-pic"; - device_type = "open-pic"; - big-endian; - interrupts = < - 10 2 11 2 12 2 13 2 - 14 2 15 2 16 2 17 2 - 18 2 19 2 1a 2 1b 2 - 1c 2 1d 2 1e 2 1f 2 - 20 2 21 2 22 2 23 2 - 24 2 25 2 26 2 27 2 - 28 2 29 2 2a 2 2b 2 - 2c 2 2d 2 2e 2 2f 2 - 30 2 31 2 32 2 33 2 - 34 2 35 2 36 2 37 2 - 38 2 39 2 2a 2 3b 2 - 3c 2 3d 2 3e 2 3f 2 - 48 1 49 2 4a 1 - >; - interrupt-parent = <40000>; - }; - }; -}; diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 6040bc8d8..747cf9cec 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c @@ -36,14 +36,6 @@ extern char _vmlinux_end[]; extern char _initrd_start[]; extern char _initrd_end[]; -/* A buffer that may be edited by tools operating on a zImage binary so as to - * edit the command line passed to vmlinux (by setting /chosen/bootargs). - * The buffer is put in it's own section so that tools may locate it easier. - */ -static char builtin_cmdline[512] - __attribute__((section("__builtin_cmdline"))); - - struct addr_range { unsigned long addr; unsigned long size; @@ -215,23 +207,6 @@ static int is_elf32(void *hdr) return 1; } -void export_cmdline(void* chosen_handle) -{ - int len; - char cmdline[2] = { 0, 0 }; - - if (builtin_cmdline[0] == 0) - return; - - len = getprop(chosen_handle, "bootargs", cmdline, sizeof(cmdline)); - if (len > 0 && cmdline[0] != 0) - return; - - setprop(chosen_handle, "bootargs", builtin_cmdline, - strlen(builtin_cmdline) + 1); -} - - void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) { int len; @@ -317,8 +292,6 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) memmove((void *)vmlinux.addr,(void *)vmlinuz.addr,vmlinuz.size); } - export_cmdline(chosen_handle); - /* Skip over the ELF header */ #ifdef DEBUG printf("... skipping 0x%lx bytes of ELF header\n\r", diff --git a/arch/powerpc/boot/prom.h b/arch/powerpc/boot/prom.h index a57b184c5..3e2ddd4a5 100644 --- a/arch/powerpc/boot/prom.h +++ b/arch/powerpc/boot/prom.h @@ -31,11 +31,4 @@ static inline int getprop(void *phandle, const char *name, return call_prom("getprop", 4, 1, phandle, name, buf, buflen); } - -static inline int setprop(void *phandle, const char *name, - void *buf, int buflen) -{ - return call_prom("setprop", 4, 1, phandle, name, buf, buflen); -} - #endif /* _PPC_BOOT_PROM_H_ */ diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig index 6fd9e7ace..dbe421dc3 100644 --- a/arch/powerpc/configs/cell_defconfig +++ b/arch/powerpc/configs/cell_defconfig @@ -1,18 +1,16 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:20:32 2006 +# Linux kernel version: 2.6.16 +# Thu Mar 23 20:48:09 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -36,7 +34,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=4 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -54,12 +51,11 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_CPUSETS=y +# CONFIG_CPUSETS is not set # CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -72,12 +68,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -122,28 +116,23 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_PPC_PMAC is not set # CONFIG_PPC_MAPLE is not set CONFIG_PPC_CELL=y -CONFIG_PPC_CELL_NATIVE=y -CONFIG_PPC_IBM_CELL_BLADE=y -CONFIG_UDBG_RTAS_CONSOLE=y # CONFIG_U3_DART is not set CONFIG_PPC_RTAS=y # CONFIG_RTAS_ERROR_LOGGING is not set CONFIG_RTAS_PROC=y CONFIG_RTAS_FLASH=y CONFIG_MMIO_NVRAM=y +CONFIG_CELL_IIC=y # CONFIG_PPC_MPC106 is not set # CONFIG_PPC_970_NAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_WANT_EARLY_SERIAL is not set -# CONFIG_MPIC is not set # # Cell Broadband Engine options # CONFIG_SPU_FS=m -CONFIG_SPU_BASE=y CONFIG_SPUFS_MMAP=y -CONFIG_CBE_RAS=y # # Kernel options @@ -160,29 +149,23 @@ CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_FORCE_MAX_ZONEORDER=13 # CONFIG_IOMMU_VMERGE is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y -CONFIG_NUMA=y -CONFIG_NODES_SHIFT=4 +# CONFIG_NUMA is not set CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set # CONFIG_DISCONTIGMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y +# CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_ARCH_MEMORY_PROBE=y # CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y CONFIG_PROC_DEVICETREE=y @@ -195,12 +178,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y # CONFIG_PCI_DEBUG is not set # @@ -244,8 +225,6 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -263,10 +242,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y CONFIG_IPV6_TUNNEL=m -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -291,7 +267,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_PPTP is not set # CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set CONFIG_IP_NF_QUEUE=m # @@ -351,7 +326,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -388,7 +362,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=131072 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -466,7 +439,8 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m # CONFIG_MD_RAID10 is not set -# CONFIG_MD_RAID456 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_RAID6 is not set # CONFIG_MD_MULTIPATH is not set # CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m @@ -502,7 +476,7 @@ CONFIG_DM_MULTIPATH=m # CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set -CONFIG_BONDING=y +# CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set @@ -560,7 +534,6 @@ CONFIG_SPIDER_NET=m # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -637,7 +610,6 @@ CONFIG_SERIO_SERPORT=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set @@ -652,7 +624,6 @@ CONFIG_SERIAL_NONSTANDARD=y # CONFIG_N_HDLC is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set -# CONFIG_RIO is not set # CONFIG_STALDRV is not set # @@ -698,7 +669,6 @@ CONFIG_WATCHDOG_RTAS=y # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set -# CONFIG_HW_RANDOM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -744,7 +714,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -781,6 +750,7 @@ CONFIG_I2C_ALGOBIT=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -796,7 +766,6 @@ CONFIG_I2C_ALGOBIT=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -806,7 +775,6 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set # @@ -814,7 +782,6 @@ CONFIG_FIRMWARE_EDID=y # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -862,7 +829,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_INFINIBAND=y CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m @@ -878,19 +844,6 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -912,7 +865,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1070,9 +1022,6 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y # # Instrumentation Support @@ -1085,19 +1034,14 @@ CONFIG_PLIST=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=15 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1107,11 +1051,14 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set CONFIG_DEBUGGER=y -CONFIG_XMON=y -CONFIG_XMON_DEFAULT=y +# CONFIG_XMON is not set CONFIG_IRQSTACKS=y # CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig deleted file mode 100644 index bbf2b5f8a..000000000 --- a/arch/powerpc/configs/chrp32_defconfig +++ /dev/null @@ -1,1397 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:22:54 2006 -# -# CONFIG_PPC64 is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -CONFIG_GENERIC_TBSYNC=y -# CONFIG_DEFAULT_UIMAGE is not set - -# -# Processor support -# -CONFIG_CLASSIC32=y -# CONFIG_PPC_52xx is not set -# CONFIG_PPC_82xx is not set -# CONFIG_PPC_83xx is not set -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_8xx is not set -# CONFIG_E200 is not set -CONFIG_6xx=y -CONFIG_PPC_FPU=y -# CONFIG_ALTIVEC is not set -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -CONFIG_SMP=y -CONFIG_NR_CPUS=4 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_CPUSETS is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Block layer -# -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Platform support -# -CONFIG_PPC_MULTIPLATFORM=y -# CONFIG_PPC_ISERIES is not set -# CONFIG_EMBEDDED6xx is not set -# CONFIG_APUS is not set -CONFIG_PPC_CHRP=y -# CONFIG_PPC_PMAC is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set -CONFIG_PPC_RTAS=y -# CONFIG_RTAS_ERROR_LOGGING is not set -CONFIG_RTAS_PROC=y -# CONFIG_MMIO_NVRAM is not set -CONFIG_PPC_MPC106=y -# CONFIG_PPC_970_NAP is not set -# CONFIG_CPU_FREQ is not set -# CONFIG_TAU is not set -# CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y - -# -# Kernel options -# -CONFIG_HIGHMEM=y -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -# CONFIG_KEXEC is not set -CONFIG_IRQ_ALL_CPUS=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -CONFIG_SECCOMP=y -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_ISA=y -CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set -CONFIG_PPC_I8259=y -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NETFILTER_XTABLES is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -# CONFIG_IP_NF_CT_ACCT is not set -# CONFIG_IP_NF_CONNTRACK_MARK is not set -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set -# CONFIG_IP_NF_QUEUE is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_STANDALONE is not set -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNP is not set - -# -# Block devices -# -CONFIG_BLK_DEV_FD=y -# CONFIG_BLK_DEV_XD 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH 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_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=y -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -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_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_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_IT821X 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=y -# CONFIG_IDE_ARM 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_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -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=y -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=y -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set -# 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_IN2000 is not set -# CONFIG_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -# CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA 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_IPS is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC 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 -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# 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 is not set -CONFIG_DE4X5=y -# CONFIG_WINBOND_840 is not set -# CONFIG_DM9102 is not set -# CONFIG_ULI526X 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=y -# 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_FORCEDETH 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 is not set -CONFIG_8139CP=y -CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -# CONFIG_8139TOO_8129 is not set -# CONFIG_8139_OLD_RX_RESET 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=y -# CONFIG_VIA_RHINE_MMIO is not set -# CONFIG_VIA_RHINE_NAPI 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set -CONFIG_MV643XX_ETH=y -# CONFIG_MV643XX_ETH_0 is not set -# CONFIG_MV643XX_ETH_1 is not set -# CONFIG_MV643XX_ETH_2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN 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 Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL is not set -# CONFIG_MOUSE_INPORT is not set -# CONFIG_MOUSE_LOGIBM is not set -# CONFIG_MOUSE_PC110PAD is not set -# CONFIG_MOUSE_VSXXXAA 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 - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_HVC_RTAS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_NVRAM=y -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_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=y -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_HYDRA is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_MPC is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_M41T00 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -CONFIG_FB_OF=y -# CONFIG_FB_CT65550 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_VGA16 is not set -# CONFIG_FB_S1D13XXX is not set -# CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set -CONFIG_FB_MATROX=y -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -# CONFIG_FB_MATROX_I2C is not set -# CONFIG_FB_MATROX_MULTIHEAD is not set -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -CONFIG_FB_ATY=y -CONFIG_FB_ATY_CT=y -# CONFIG_FB_ATY_GENERIC_LCD is not set -CONFIG_FB_ATY_GX=y -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -CONFIG_FB_3DFX=y -# CONFIG_FB_3DFX_ACCEL 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_VGACON_SOFT_SCROLLBACK is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# 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_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -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=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_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 is not set -# CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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=y -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_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -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_ASCII=y -CONFIG_NLS_ISO8859_1=m -# 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 - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=m -CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUGGER=y -CONFIG_XMON=y -CONFIG_XMON_DEFAULT=y -# CONFIG_BDI_SWITCH is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_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_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index 4b9c2ed92..a45627547 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig @@ -1,18 +1,16 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:22:55 2006 +# Linux kernel version: 2.6.17-rc1 +# Wed Apr 19 13:24:37 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -35,7 +33,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=4 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -53,7 +50,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y @@ -71,12 +67,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -122,15 +116,12 @@ CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC64=y # CONFIG_PPC_MAPLE is not set # CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_PPC_IBM_CELL_BLADE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set CONFIG_U3_DART=y +CONFIG_MPIC=y # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set CONFIG_MPIC_BROKEN_U3=y # CONFIG_PPC_MPC106 is not set -CONFIG_PPC_970_NAP=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set @@ -145,7 +136,6 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_PMAC64=y # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -163,7 +153,6 @@ CONFIG_BINFMT_ELF=y CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y # CONFIG_HOTPLUG_CPU is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y @@ -179,7 +168,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -192,12 +180,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_DEBUG is not set # @@ -241,8 +227,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -255,7 +239,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -280,7 +263,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_PPTP is not set # CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set CONFIG_IP_NF_QUEUE=m # @@ -336,7 +318,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -374,7 +355,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -437,6 +417,7 @@ CONFIG_IDEDMA_PCI_AUTO=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +# CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -497,7 +478,6 @@ CONFIG_SCSI_SATA_SVW=y # CONFIG_SCSI_SATA_MV is not set # CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_PDC_ADMA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_SATA_QSTOR is not set # CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_SX4 is not set @@ -517,6 +497,7 @@ CONFIG_SCSI_SATA_SVW=y # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -533,7 +514,9 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=m -# CONFIG_MD_RAID456 is not set +CONFIG_MD_RAID5=y +# CONFIG_MD_RAID5_RESHAPE is not set +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y @@ -576,6 +559,7 @@ CONFIG_IEEE1394_OHCI1394=y # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=y @@ -589,7 +573,6 @@ CONFIG_IEEE1394_RAWIO=y # Macintosh device drivers # CONFIG_ADB_PMU=y -# CONFIG_ADB_PMU_LED is not set CONFIG_PMAC_SMU=y CONFIG_THERM_PM72=y CONFIG_WINDFARM=y @@ -660,7 +643,6 @@ CONFIG_TIGON3=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -757,7 +739,6 @@ CONFIG_SERIO=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -783,7 +764,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -794,7 +774,6 @@ CONFIG_GEN_RTC=y # Ftape, the floppy tape device driver # CONFIG_AGP=m -# CONFIG_AGP_SIS is not set # CONFIG_AGP_VIA is not set CONFIG_AGP_UNINORTH=m # CONFIG_DRM is not set @@ -834,7 +813,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_POWERMAC=y # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -871,6 +849,7 @@ CONFIG_I2C_POWERMAC=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -886,7 +865,6 @@ CONFIG_I2C_POWERMAC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -897,19 +875,22 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y +# CONFIG_FB_CONTROL is not set +# CONFIG_FB_PLATINUM is not set +# CONFIG_FB_VALKYRIE is not set +# CONFIG_FB_CT65550 is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set @@ -1009,18 +990,6 @@ CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_CMIPCI is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -1057,17 +1026,6 @@ CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -1102,7 +1060,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1153,7 +1110,9 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1195,7 +1154,7 @@ CONFIG_USB_MON=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_ANYDATA is not set CONFIG_USB_SERIAL_BELKIN=m # CONFIG_USB_SERIAL_WHITEHEAT is not set CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m @@ -1203,7 +1162,6 @@ CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m CONFIG_USB_SERIAL_IPAQ=m CONFIG_USB_SERIAL_IR=m @@ -1233,11 +1191,9 @@ CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_HP4X is not set CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m -# CONFIG_USB_SERIAL_OPTION is not set CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_EZUSB=y @@ -1251,12 +1207,10 @@ CONFIG_USB_EZUSB=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -CONFIG_USB_APPLEDISPLAY=m # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1280,14 +1234,6 @@ CONFIG_USB_APPLEDISPLAY=m # # CONFIG_NEW_LEDS is not set -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # @@ -1302,19 +1248,6 @@ CONFIG_USB_APPLEDISPLAY=m # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1340,6 +1273,7 @@ CONFIG_REISERFS_FS_SECURITY=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y @@ -1348,7 +1282,6 @@ CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -1430,9 +1363,7 @@ CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set # CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1513,9 +1444,6 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y # # Instrumentation Support @@ -1529,19 +1457,14 @@ CONFIG_OPROFILE=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1553,7 +1476,11 @@ CONFIG_FORCED_INLINING=y # CONFIG_DEBUGGER is not set CONFIG_IRQSTACKS=y CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig index eb0885ea0..a95e455a1 100644 --- a/arch/powerpc/configs/iseries_defconfig +++ b/arch/powerpc/configs/iseries_defconfig @@ -1,18 +1,16 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:22:57 2006 +# Linux kernel version: 2.6.17-rc1 +# Wed Apr 19 11:46:44 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -36,7 +34,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=32 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -54,7 +51,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y @@ -73,12 +69,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -119,17 +113,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_PPC_ISERIES=y # CONFIG_EMBEDDED6xx is not set # CONFIG_APUS is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set CONFIG_IBMVIO=y # CONFIG_PPC_MPC106 is not set -# CONFIG_PPC_970_NAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_WANT_EARLY_SERIAL is not set -# CONFIG_MPIC is not set # # Kernel options @@ -146,7 +135,6 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_IRQ_ALL_CPUS=y CONFIG_LPARCFG=y # CONFIG_NUMA is not set @@ -161,7 +149,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -173,12 +160,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_DEBUG is not set # @@ -222,8 +207,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -236,7 +219,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -264,11 +246,9 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m # CONFIG_NETFILTER_XT_MATCH_POLICY is not set # CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -287,7 +267,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_PPTP is not set # CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -381,7 +360,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -418,7 +396,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -476,7 +453,6 @@ CONFIG_SCSI_FC_ATTRS=y # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -488,6 +464,7 @@ CONFIG_SCSI_IBMVSCSI=m # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -504,7 +481,9 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=m -# CONFIG_MD_RAID456 is not set +CONFIG_MD_RAID5=y +# CONFIG_MD_RAID5_RESHAPE is not set +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y @@ -617,7 +596,6 @@ CONFIG_E1000=m # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -728,7 +706,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -764,6 +741,7 @@ CONFIG_MAX_RAW_DEVS=256 # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -779,7 +757,6 @@ CONFIG_MAX_RAW_DEVS=256 # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -789,9 +766,7 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -825,14 +800,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_NEW_LEDS is not set -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # @@ -847,19 +814,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -889,6 +843,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y @@ -897,7 +852,6 @@ CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=m @@ -979,10 +933,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1061,12 +1013,10 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support # -# CONFIG_PROFILING is not set # CONFIG_KPROBES is not set # @@ -1074,19 +1024,14 @@ CONFIG_PLIST=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1097,7 +1042,11 @@ CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUGGER is not set CONFIG_IRQSTACKS=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig index 2860be106..80a0db43a 100644 --- a/arch/powerpc/configs/maple_defconfig +++ b/arch/powerpc/configs/maple_defconfig @@ -1,18 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:24:55 2006 +# Linux kernel version: 2.6.16-rc6 +# Wed Mar 15 16:19:54 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -32,10 +29,8 @@ CONFIG_POWER4=y CONFIG_PPC_FPU=y # CONFIG_ALTIVEC is not set CONFIG_PPC_STD_MMU=y -CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=2 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -53,13 +48,11 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_CPUSETS is not set -# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set @@ -71,12 +64,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -87,6 +82,7 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y @@ -95,7 +91,6 @@ CONFIG_STOP_MACHINE=y # # Block layer # -# CONFIG_BLK_DEV_IO_TRACE is not set # # IO Schedulers @@ -121,18 +116,14 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_PPC_PMAC is not set CONFIG_PPC_MAPLE=y # CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_PPC_IBM_CELL_BLADE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set CONFIG_U3_DART=y +CONFIG_MPIC=y # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set CONFIG_MPIC_BROKEN_U3=y # CONFIG_PPC_MPC106 is not set -CONFIG_PPC_970_NAP=y # CONFIG_CPU_FREQ is not set # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -149,7 +140,6 @@ CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y @@ -165,7 +155,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -178,12 +167,11 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set +CONFIG_PCI_LEGACY_PROC=y # CONFIG_PCI_DEBUG is not set # @@ -209,8 +197,6 @@ CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -228,18 +214,12 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -294,7 +274,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -331,7 +310,6 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -506,7 +484,6 @@ CONFIG_E1000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -579,7 +556,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200 CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -587,7 +563,6 @@ CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -611,7 +586,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -657,10 +632,10 @@ CONFIG_I2C_AMD8111=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set @@ -679,7 +654,9 @@ CONFIG_I2C_AMD8111=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -694,6 +671,7 @@ CONFIG_I2C_AMD8111=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -705,22 +683,23 @@ CONFIG_I2C_AMD8111=y # Misc devices # +# +# Multimedia Capabilities Port drivers +# + # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set # @@ -728,7 +707,6 @@ CONFIG_FIRMWARE_EDID=y # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -740,7 +718,6 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -758,7 +735,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -795,7 +771,9 @@ CONFIG_USB_HIDINPUT=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -808,6 +786,15 @@ CONFIG_USB_HIDINPUT=y # # CONFIG_USB_MDC800 is not set +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + # # USB Network Adapters # @@ -829,7 +816,7 @@ CONFIG_USB_SERIAL=y # CONFIG_USB_SERIAL_CONSOLE is not set CONFIG_USB_SERIAL_GENERIC=y # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_ANYDATA is not set # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -837,7 +824,6 @@ CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_CYPRESS_M8=m # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set # CONFIG_USB_SERIAL_VISOR is not set # CONFIG_USB_SERIAL_IPAQ is not set # CONFIG_USB_SERIAL_IR is not set @@ -862,15 +848,12 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_NAVMAN is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set CONFIG_USB_SERIAL_TI=m # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OPTION is not set # CONFIG_USB_SERIAL_OMNINET is not set CONFIG_USB_EZUSB=y @@ -884,12 +867,10 @@ CONFIG_USB_EZUSB=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -908,19 +889,6 @@ CONFIG_USB_EZUSB=y # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # @@ -930,24 +898,6 @@ CONFIG_USB_EZUSB=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -967,7 +917,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1000,6 +949,7 @@ CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1117,7 +1067,6 @@ CONFIG_CRC_CCITT=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y -CONFIG_PLIST=y # # Instrumentation Support @@ -1130,20 +1079,14 @@ CONFIG_PLIST=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SLAB_LEAK is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1157,7 +1100,11 @@ CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_IRQSTACKS is not set CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig deleted file mode 100644 index 719fba4eb..000000000 --- a/arch/powerpc/configs/mpc7448_hpc2_defconfig +++ /dev/null @@ -1,963 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:26:55 2006 -# -# CONFIG_PPC64 is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -# CONFIG_GENERIC_TBSYNC is not set -CONFIG_DEFAULT_UIMAGE=y - -# -# Processor support -# -CONFIG_CLASSIC32=y -# CONFIG_PPC_52xx is not set -# CONFIG_PPC_82xx is not set -# CONFIG_PPC_83xx is not set -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_8xx is not set -# CONFIG_E200 is not set -CONFIG_6xx=y -CONFIG_PPC_FPU=y -# CONFIG_ALTIVEC is not set -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -# CONFIG_SMP is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Block layer -# -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Platform support -# -# CONFIG_PPC_MULTIPLATFORM is not set -# CONFIG_PPC_ISERIES is not set -CONFIG_EMBEDDED6xx=y -# CONFIG_APUS is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set -# CONFIG_PPC_RTAS is not set -# CONFIG_MMIO_NVRAM is not set -# CONFIG_PPC_MPC106 is not set -# CONFIG_PPC_970_NAP is not set -# CONFIG_CPU_FREQ is not set -# CONFIG_TAU is not set -# CONFIG_PPC_TODC is not set -# CONFIG_KATANA is not set -# CONFIG_WILLOW is not set -# CONFIG_CPCI690 is not set -# CONFIG_POWERPMC250 is not set -# CONFIG_CHESTNUT is not set -# CONFIG_SPRUCE is not set -# CONFIG_HDPU is not set -# CONFIG_EV64260 is not set -# CONFIG_LOPEC is not set -# CONFIG_MVME5100 is not set -# CONFIG_PPLUS is not set -# CONFIG_PRPMC750 is not set -# CONFIG_PRPMC800 is not set -# CONFIG_SANDPOINT is not set -CONFIG_MPC7448HPC2=y -# CONFIG_RADSTONE_PPC7D is not set -# CONFIG_PAL4 is not set -# CONFIG_GEMINI is not set -# CONFIG_EST8260 is not set -# CONFIG_SBC82xx is not set -# CONFIG_SBS8260 is not set -# CONFIG_RPX8260 is not set -# CONFIG_TQM8260 is not set -# CONFIG_ADS8272 is not set -# CONFIG_PQ2FADS is not set -# CONFIG_LITE5200 is not set -# CONFIG_EV64360 is not set -CONFIG_TSI108_BRIDGE=y -# CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y - -# -# Kernel options -# -# CONFIG_HIGHMEM is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -# CONFIG_SECCOMP is not set -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_GENERIC_ISA_DMA=y -CONFIG_MPIC_WEIRD=y -# CONFIG_PPC_I8259 is not set -# CONFIG_PPC_INDIRECT_PCI is not set -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=131072 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# 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_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -CONFIG_SCSI_SATA=y -# CONFIG_SCSI_SATA_AHCI is not set -# CONFIG_SCSI_SATA_SVW is not set -# CONFIG_SCSI_ATA_PIIX is not set -CONFIG_SCSI_SATA_MV=y -# CONFIG_SCSI_SATA_NV is not set -# CONFIG_SCSI_PDC_ADMA is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_SATA_QSTOR is not set -# CONFIG_SCSI_SATA_PROMISE is not set -# CONFIG_SCSI_SATA_SX4 is not set -# CONFIG_SCSI_SATA_SIL is not set -# CONFIG_SCSI_SATA_SIL24 is not set -# CONFIG_SCSI_SATA_SIS is not set -# CONFIG_SCSI_SATA_ULI is not set -# CONFIG_SCSI_SATA_VIA is not set -# CONFIG_SCSI_SATA_VITESSE is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA 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 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC 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 - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 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_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=y -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -# CONFIG_8139TOO_8129 is not set -# CONFIG_8139_OLD_RX_RESET 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 - -# -# 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM 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_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -# CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_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 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -# CONFIG_UNWIND_INFO is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig deleted file mode 100644 index 8da6a47f0..000000000 --- a/arch/powerpc/configs/mpc834x_itx_defconfig +++ /dev/null @@ -1,1344 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:28:05 2006 -# -# CONFIG_PPC64 is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -# CONFIG_GENERIC_TBSYNC is not set -CONFIG_DEFAULT_UIMAGE=y - -# -# Processor support -# -# CONFIG_CLASSIC32 is not set -# CONFIG_PPC_52xx is not set -# CONFIG_PPC_82xx is not set -CONFIG_PPC_83xx=y -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_8xx is not set -# CONFIG_E200 is not set -CONFIG_6xx=y -CONFIG_83xx=y -CONFIG_PPC_FPU=y -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -# CONFIG_SMP is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -# CONFIG_EPOLL is not set -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" -CONFIG_PPC_GEN550=y -# CONFIG_WANT_EARLY_SERIAL is not set - -# -# Platform support -# -# CONFIG_MPC834x_SYS is not set -CONFIG_MPC834x_ITX=y -CONFIG_MPC834x=y -# CONFIG_MPIC is not set - -# -# Kernel options -# -# CONFIG_HIGHMEM is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -CONFIG_SECCOMP=y -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set -# CONFIG_PPC_I8259 is not set -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_FSL_SOC=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_PARTITIONS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -# CONFIG_MTD_BLOCK is not set -# CONFIG_MTD_BLOCK_RO is not set -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -# CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y -# CONFIG_MTD_CFI_STAA is not set -CONFIG_MTD_CFI_UTIL=y -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xfe000000 -CONFIG_MTD_PHYSMAP_LEN=0x1000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_DATAFLASH is not set -# CONFIG_MTD_M25P80 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -# CONFIG_BLK_DEV_IDE is not set -# CONFIG_BLK_DEV_HD_ONLY is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=y -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AACRAID is not set -# 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_MEGARAID_NEWGEN is not set -# CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set -CONFIG_SCSI_SATA=y -# CONFIG_SCSI_SATA_AHCI is not set -# CONFIG_SCSI_SATA_SVW is not set -# CONFIG_SCSI_ATA_PIIX is not set -# CONFIG_SCSI_SATA_MV is not set -# CONFIG_SCSI_SATA_NV is not set -# CONFIG_SCSI_PDC_ADMA is not set -# CONFIG_SCSI_HPTIOP is not set -# CONFIG_SCSI_SATA_QSTOR is not set -# CONFIG_SCSI_SATA_PROMISE is not set -# CONFIG_SCSI_SATA_SX4 is not set -CONFIG_SCSI_SATA_SIL=y -# CONFIG_SCSI_SATA_SIL24 is not set -# CONFIG_SCSI_SATA_SIS is not set -# CONFIG_SCSI_SATA_ULI is not set -# CONFIG_SCSI_SATA_VIA is not set -# CONFIG_SCSI_SATA_VITESSE is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA 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 is not set -# CONFIG_SCSI_IPR is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC 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 - -# -# 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_RAID10 is not set -# CONFIG_MD_RAID456 is not set -# CONFIG_MD_MULTIPATH is not set -# CONFIG_MD_FAULTY is not set -# CONFIG_BLK_DEV_DM is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -CONFIG_CICADA_PHY=y -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 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_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=y -# CONFIG_FEALNX is not set -# CONFIG_NATSEMI is not set -# CONFIG_NE2K_PCI is not set -# 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 - -# -# 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set -CONFIG_GIANFAR=y -CONFIG_GFAR_NAPI=y - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_83xx_WDT=y - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -CONFIG_HW_RANDOM=y -# CONFIG_NVRAM is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_MPC=y -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_M41T00 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -CONFIG_SPI=y -# CONFIG_SPI_DEBUG is not set -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y -CONFIG_SPI_MPC83xx=y - -# -# SPI Protocol Masters -# - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM70 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -# CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_SPLIT_ISO is not set -# CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=y -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y -CONFIG_USB_GADGET_NET2280=y -CONFIG_USB_NET2280=y -# CONFIG_USB_GADGET_PXA2XX is not set -# CONFIG_USB_GADGET_GOKU is not set -# CONFIG_USB_GADGET_LH7A40X is not set -# CONFIG_USB_GADGET_OMAP is not set -# CONFIG_USB_GADGET_AT91 is not set -# CONFIG_USB_GADGET_DUMMY_HCD is not set -CONFIG_USB_GADGET_DUALSPEED=y -# CONFIG_USB_ZERO is not set -CONFIG_USB_ETH=y -CONFIG_USB_ETH_RNDIS=y -# CONFIG_USB_GADGETFS is not set -# CONFIG_USB_FILE_STORAGE is not set -# CONFIG_USB_G_SERIAL is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y - -# -# RTC drivers -# -# CONFIG_RTC_DRV_X1205 is not set -CONFIG_RTC_DRV_DS1307=y -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -# CONFIG_RTC_DRV_MAX6902 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=y - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_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_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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 is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -CONFIG_PRINTK_TIME=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUGGER is not set -# CONFIG_BDI_SWITCH is not set -CONFIG_BOOTX_TEXT=y -CONFIG_SERIAL_TEXT_DEBUG=y -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY 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=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_sys_defconfig similarity index 90% rename from arch/powerpc/configs/mpc834x_mds_defconfig rename to arch/powerpc/configs/mpc834x_sys_defconfig index 9eefab967..5078b0441 100644 --- a/arch/powerpc/configs/mpc834x_mds_defconfig +++ b/arch/powerpc/configs/mpc834x_sys_defconfig @@ -1,18 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:28:54 2006 +# Linux kernel version: 2.6.16-rc6 +# Wed Mar 15 16:19:56 2006 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y @@ -30,19 +27,17 @@ CONFIG_DEFAULT_UIMAGE=y # CONFIG_PPC_52xx is not set # CONFIG_PPC_82xx is not set CONFIG_PPC_83xx=y -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_8xx is not set # CONFIG_E200 is not set +# CONFIG_E500 is not set CONFIG_6xx=y CONFIG_83xx=y CONFIG_PPC_FPU=y CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU_32=y # CONFIG_SMP is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -60,11 +55,9 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EMBEDDED=y @@ -74,12 +67,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y # CONFIG_EPOLL is not set CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -90,6 +85,7 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set @@ -98,8 +94,6 @@ CONFIG_MODULE_UNLOAD=y # Block layer # # CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set # # IO Schedulers @@ -120,9 +114,7 @@ CONFIG_PPC_GEN550=y # Platform support # CONFIG_MPC834x_SYS=y -# CONFIG_MPC834x_ITX is not set CONFIG_MPC834x=y -# CONFIG_MPIC is not set # # Kernel options @@ -137,7 +129,6 @@ CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -147,10 +138,10 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set +# CONFIG_SOFTWARE_SUSPEND is not set CONFIG_SECCOMP=y CONFIG_ISA_DMA_API=y @@ -158,13 +149,12 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set CONFIG_PPC_INDIRECT_PCI=y CONFIG_FSL_SOC=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set +# CONFIG_PCI_LEGACY_PROC is not set # # PCCARD (PCMCIA/CardBus) support @@ -202,8 +192,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -221,18 +209,12 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -286,7 +268,6 @@ CONFIG_TCP_CONG_BIC=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -323,7 +304,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -391,9 +371,6 @@ CONFIG_MARVELL_PHY=y # CONFIG_QSEMI_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set # # Ethernet (10 or 100Mbit) @@ -456,7 +433,6 @@ CONFIG_GIANFAR=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -531,7 +507,6 @@ CONFIG_INPUT=y # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -568,7 +543,6 @@ CONFIG_83xx_WDT=y # # CONFIG_PCIPCWATCHDOG is not set # CONFIG_WDTPCI is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -615,10 +589,10 @@ CONFIG_I2C_CHARDEV=y # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_MPC=y # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set @@ -637,8 +611,10 @@ CONFIG_I2C_MPC=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_M41T00 is not set # CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -653,13 +629,13 @@ CONFIG_I2C_MPC=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -688,12 +664,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -704,11 +678,14 @@ CONFIG_HWMON=y # Misc devices # +# +# Multimedia Capabilities Port drivers +# + # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -718,9 +695,7 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -732,7 +707,6 @@ CONFIG_FIRMWARE_EDID=y # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_USB is not set # @@ -749,19 +723,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # @@ -771,24 +732,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -810,7 +753,6 @@ CONFIG_FS_MBCACHE=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -839,6 +781,7 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -911,7 +854,6 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y # # Instrumentation Support @@ -923,13 +865,15 @@ CONFIG_PLIST=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set # CONFIG_BOOTX_TEXT is not set # CONFIG_SERIAL_TEXT_DEBUG is not set -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig index 67e7d0b57..7f0780f1a 100644 --- a/arch/powerpc/configs/mpc8540_ads_defconfig +++ b/arch/powerpc/configs/mpc8540_ads_defconfig @@ -1,18 +1,16 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:29:23 2006 +# Linux kernel version: 2.6.16 +# Mon Mar 27 23:37:36 2006 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y @@ -31,7 +29,6 @@ CONFIG_DEFAULT_UIMAGE=y # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set CONFIG_PPC_85xx=y -# CONFIG_PPC_86xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_8xx is not set @@ -42,7 +39,6 @@ CONFIG_BOOKE=y CONFIG_FSL_BOOKE=y # CONFIG_PHYS_64BIT is not set CONFIG_SPE=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -60,7 +56,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set @@ -76,12 +71,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -110,16 +103,15 @@ CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_MPIC=y # CONFIG_WANT_EARLY_SERIAL is not set # # Platform support # CONFIG_MPC8540_ADS=y -# CONFIG_MPC85xx_CDS is not set CONFIG_MPC8540=y CONFIG_PPC_INDIRECT_PCI_BE=y -CONFIG_MPIC=y # # Kernel options @@ -135,7 +127,6 @@ CONFIG_PREEMPT_NONE=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y CONFIG_MATH_EMULATION=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -145,17 +136,16 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set +# CONFIG_SOFTWARE_SUSPEND is not set # CONFIG_SECCOMP is not set CONFIG_ISA_DMA_API=y # # Bus options # -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set CONFIG_PPC_INDIRECT_PCI=y CONFIG_FSL_SOC=y @@ -197,8 +187,6 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -216,18 +204,12 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -282,7 +264,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -314,7 +295,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -375,9 +355,6 @@ CONFIG_PHYLIB=y # CONFIG_QSEMI_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set # # Ethernet (10 or 100Mbit) @@ -487,7 +464,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -497,6 +473,7 @@ CONFIG_GEN_RTC=y # # Ftape, the floppy tape device driver # +# CONFIG_AGP is not set # CONFIG_RAW_DRIVER is not set # @@ -519,13 +496,13 @@ CONFIG_GEN_RTC=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_HWMON_DEBUG_CHIP is not set @@ -537,7 +514,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -547,9 +523,7 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y # CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -577,19 +551,6 @@ CONFIG_FIRMWARE_EDID=y # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # @@ -598,24 +559,6 @@ CONFIG_FIRMWARE_EDID=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -637,7 +580,6 @@ CONFIG_FS_MBCACHE=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -735,7 +677,6 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y # # Instrumentation Support @@ -747,19 +688,14 @@ CONFIG_PLIST=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set @@ -770,7 +706,11 @@ CONFIG_FORCED_INLINING=y # CONFIG_DEBUGGER is not set # CONFIG_BDI_SWITCH is not set # CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig deleted file mode 100644 index 72edf9f66..000000000 --- a/arch/powerpc/configs/mpc85xx_cds_defconfig +++ /dev/null @@ -1,895 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:29:49 2006 -# -# CONFIG_PPC64 is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -# CONFIG_GENERIC_TBSYNC is not set -CONFIG_DEFAULT_UIMAGE=y - -# -# Processor support -# -# CONFIG_CLASSIC32 is not set -# CONFIG_PPC_52xx is not set -# CONFIG_PPC_82xx is not set -# CONFIG_PPC_83xx is not set -CONFIG_PPC_85xx=y -# CONFIG_PPC_86xx is not set -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_8xx is not set -# CONFIG_E200 is not set -CONFIG_85xx=y -CONFIG_E500=y -CONFIG_BOOKE=y -CONFIG_FSL_BOOKE=y -# CONFIG_PHYS_64BIT is not set -CONFIG_SPE=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" -# CONFIG_WANT_EARLY_SERIAL is not set - -# -# Platform support -# -# CONFIG_MPC8540_ADS is not set -CONFIG_MPC85xx_CDS=y -CONFIG_MPC8540=y -CONFIG_PPC_INDIRECT_PCI_BE=y -CONFIG_MPIC=y - -# -# Kernel options -# -# CONFIG_HIGHMEM is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_MATH_EMULATION=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -# CONFIG_SECCOMP is not set -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -# CONFIG_MPIC_WEIRD is not set -# CONFIG_PPC_I8259 is not set -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_FSL_SOC=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH 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_IDE_SATA is not set -# CONFIG_BLK_DEV_IDEDISK is not set -# CONFIG_IDEDISK_MULTI_MODE 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 - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -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_SL82C105 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -# CONFIG_IDEDMA_PCI_AUTO is not set -# 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_IT821X 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=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NET_PCI is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=y -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set -CONFIG_GIANFAR=y -CONFIG_GFAR_NAPI=y - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM 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_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -# CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_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 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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 is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUGGER is not set -# CONFIG_BDI_SWITCH is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig deleted file mode 100644 index 92a527fcc..000000000 --- a/arch/powerpc/configs/mpc8641_hpcn_defconfig +++ /dev/null @@ -1,963 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:30:15 2006 -# -# CONFIG_PPC64 is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -CONFIG_GENERIC_TBSYNC=y -# CONFIG_DEFAULT_UIMAGE is not set - -# -# Processor support -# -# CONFIG_CLASSIC32 is not set -# CONFIG_PPC_52xx is not set -# CONFIG_PPC_82xx is not set -# CONFIG_PPC_83xx is not set -# CONFIG_PPC_85xx is not set -CONFIG_PPC_86xx=y -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_8xx is not set -# CONFIG_E200 is not set -CONFIG_6xx=y -CONFIG_PPC_FPU=y -CONFIG_ALTIVEC=y -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -# CONFIG_SYSVIPC is not set -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_CPUSETS is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set -CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -# CONFIG_SLAB is not set -CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -CONFIG_SLOB=y - -# -# Loadable module support -# -# CONFIG_MODULES is not set - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" -# CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_PPC_INDIRECT_PCI_BE=y -CONFIG_MPIC=y - -# -# Platform Support -# -CONFIG_MPC8641_HPCN=y -CONFIG_MPC8641=y - -# -# Kernel options -# -CONFIG_HIGHMEM=y -# CONFIG_HZ_100 is not set -# CONFIG_HZ_250 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -# CONFIG_IRQ_ALL_CPUS is not set -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -# CONFIG_SECCOMP is not set -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set -CONFIG_PPC_I8259=y -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_FSL_SOC=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=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_FIB_HASH=y -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_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y -CONFIG_IPV6=y -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -# CONFIG_INET6_AH is not set -# CONFIG_INET6_ESP is not set -# CONFIG_INET6_IPCOMP is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y -# CONFIG_IPV6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_IEEE80211 is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD 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_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=131072 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_DUMMY=y -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -# CONFIG_MARVELL_PHY is not set -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -CONFIG_VITESSE_PHY=y -# CONFIG_SMSC_PHY is not set -# CONFIG_FIXED_PHY is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NET_PCI 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_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set -CONFIG_GIANFAR=y -# CONFIG_GFAR_NAPI is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -# CONFIG_SERIO_RAW is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -# CONFIG_I2C_CHARDEV is not set - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_MPC=y -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -CONFIG_SENSORS_EEPROM=y -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_M41T00 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -CONFIG_FIRMWARE_EDID=y -# CONFIG_FB is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -# CONFIG_VGACON_SOFT_SCROLLBACK is not set -CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_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_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -# CONFIG_NFSD_V3 is not set -CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -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=y -# CONFIG_LDM_DEBUG is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -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_ASCII 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 - -# -# Library routines -# -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_HIGHMEM is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_UNWIND_INFO is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_DEBUGGER is not set -# CONFIG_BDI_SWITCH is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Hardware crypto devices -# diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index 6861dde7d..57a027971 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig @@ -1,18 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:30:23 2006 +# Linux kernel version: 2.6.16-rc6 +# Wed Mar 15 16:21:32 2006 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y @@ -30,19 +27,17 @@ CONFIG_CLASSIC32=y # CONFIG_PPC_52xx is not set # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_8xx is not set # CONFIG_E200 is not set +# CONFIG_E500 is not set CONFIG_6xx=y CONFIG_PPC_FPU=y CONFIG_ALTIVEC=y CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU_32=y # CONFIG_SMP is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -60,12 +55,10 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # CONFIG_EMBEDDED is not set @@ -77,12 +70,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -93,6 +88,7 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y @@ -101,8 +97,6 @@ CONFIG_KMOD=y # Block layer # CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -CONFIG_LSF=y # # IO Schedulers @@ -126,13 +120,10 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set # CONFIG_PPC_CHRP is not set CONFIG_PPC_PMAC=y -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set +CONFIG_MPIC=y # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set CONFIG_PPC_MPC106=y -# CONFIG_PPC_970_NAP is not set CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set @@ -149,7 +140,6 @@ CONFIG_CPU_FREQ_PMAC=y CONFIG_PPC601_SYNC_FIX=y # CONFIG_TAU is not set # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -164,7 +154,6 @@ CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_KEXEC is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y @@ -175,7 +164,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set CONFIG_PM=y @@ -190,12 +178,11 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set CONFIG_PPC_INDIRECT_PCI=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set +CONFIG_PCI_LEGACY_PROC=y # CONFIG_PCI_DEBUG is not set # @@ -252,9 +239,7 @@ CONFIG_NET=y CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y +# CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set @@ -265,13 +250,10 @@ CONFIG_IP_FIB_HASH=y # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -282,9 +264,6 @@ CONFIG_TCP_CONG_BIC=y # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -299,21 +278,16 @@ CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=m CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -331,16 +305,15 @@ CONFIG_IP_NF_NETBIOS_NS=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -# CONFIG_IP_NF_SIP is not set # CONFIG_IP_NF_QUEUE is not set CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MULTIPORT=m CONFIG_IP_NF_MATCH_TOS=m CONFIG_IP_NF_MATCH_RECENT=m CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_AH_ESP=m CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_ADDRTYPE=m @@ -362,7 +335,6 @@ CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -378,12 +350,10 @@ CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_IP_DCCP=m CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y # # DCCP CCIDs Configuration (EXPERIMENTAL) # -CONFIG_IP_DCCP_CCID2=m CONFIG_IP_DCCP_CCID3=m CONFIG_IP_DCCP_TFRC_LIB=m @@ -391,6 +361,7 @@ CONFIG_IP_DCCP_TFRC_LIB=m # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set +# CONFIG_IP_DCCP_UNLOAD_HACK is not set # # SCTP Configuration (EXPERIMENTAL) @@ -477,7 +448,6 @@ CONFIG_IRTTY_SIR=m # CONFIG_ALI_FIR is not set # CONFIG_VLSI_FIR is not set # CONFIG_VIA_FIR is not set -# CONFIG_MCS_FIR is not set CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -507,8 +477,6 @@ CONFIG_IEEE80211=m CONFIG_IEEE80211_CRYPT_WEP=m CONFIG_IEEE80211_CRYPT_CCMP=m CONFIG_IEEE80211_CRYPT_TKIP=m -# CONFIG_IEEE80211_SOFTMAC is not set -CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -521,7 +489,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -561,7 +528,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -623,6 +589,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_BLINK=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -683,7 +650,6 @@ CONFIG_SCSI_AIC7XXX_OLD=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -696,8 +662,9 @@ CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set # CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set @@ -727,15 +694,16 @@ CONFIG_BLK_DEV_MD=m CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -# CONFIG_MD_RAID456 is not set +# CONFIG_MD_RAID10 is not set +CONFIG_MD_RAID5=m +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set # CONFIG_DM_MULTIPATH is not set # @@ -771,7 +739,8 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m -# CONFIG_IEEE1394_ETH1394 is not set +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set +CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -786,12 +755,9 @@ CONFIG_IEEE1394_RAWIO=m CONFIG_ADB=y CONFIG_ADB_CUDA=y CONFIG_ADB_PMU=y -CONFIG_ADB_PMU_LED=y -CONFIG_ADB_PMU_LED_IDE=y CONFIG_PMAC_APM_EMU=m CONFIG_PMAC_MEDIABAY=y CONFIG_PMAC_BACKLIGHT=y -CONFIG_PMAC_BACKLIGHT_LEGACY=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y CONFIG_THERM_WINDTUNNEL=m @@ -803,10 +769,10 @@ CONFIG_THERM_ADT746X=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_DUMMY=m +# CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set -CONFIG_TUN=m +# CONFIG_TUN is not set # # ARCnet devices @@ -881,7 +847,6 @@ CONFIG_PCNET32=y # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -892,7 +857,6 @@ CONFIG_PCNET32=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y -# CONFIG_NET_WIRELESS_RTNETLINK is not set # # Obsolete Wireless cards support (pre-802.11) @@ -932,7 +896,6 @@ CONFIG_APPLE_AIRPORT=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -# CONFIG_USB_ZD1201 is not set # CONFIG_HOSTAP is not set CONFIG_NET_WIRELESS=y @@ -1023,14 +986,12 @@ CONFIG_SERIO=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_PCI=m # CONFIG_SERIAL_8250_CS is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 @@ -1055,7 +1016,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_NVRAM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -1067,8 +1027,6 @@ CONFIG_GEN_RTC=y # Ftape, the floppy tape device driver # CONFIG_AGP=m -# CONFIG_AGP_SIS is not set -# CONFIG_AGP_VIA is not set CONFIG_AGP_UNINORTH=m CONFIG_DRM=m # CONFIG_DRM_TDFX is not set @@ -1120,10 +1078,10 @@ CONFIG_I2C_ALGOBIT=y CONFIG_I2C_POWERMAC=y # CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set @@ -1142,8 +1100,10 @@ CONFIG_I2C_POWERMAC=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_M41T00 is not set # CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -1170,28 +1130,28 @@ CONFIG_I2C_POWERMAC=y # Misc devices # +# +# Multimedia Capabilities Port drivers +# + # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -CONFIG_FB_BACKLIGHT=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set @@ -1208,7 +1168,6 @@ CONFIG_FB_IMSTT=y # CONFIG_FB_S1D13XXX is not set CONFIG_FB_NVIDIA=y CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_NVIDIA_BACKLIGHT=y # CONFIG_FB_RIVA is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y @@ -1216,17 +1175,15 @@ CONFIG_FB_MATROX_MYSTIQUE=y # CONFIG_FB_MATROX_G is not set # CONFIG_FB_MATROX_I2C is not set # CONFIG_FB_MATROX_MULTIHEAD is not set +# CONFIG_FB_RADEON_OLD is not set CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_BACKLIGHT=y # CONFIG_FB_RADEON_DEBUG is not set CONFIG_FB_ATY128=y -CONFIG_FB_ATY128_BACKLIGHT=y CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y # CONFIG_FB_ATY_GENERIC_LCD is not set CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_BACKLIGHT=y # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set @@ -1255,11 +1212,7 @@ CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -1281,11 +1234,9 @@ CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_SEQUENCER_OSS=y # CONFIG_SND_DYNAMIC_MINORS is not set CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -1302,7 +1253,6 @@ CONFIG_SND_DUMMY=m # PCI devices # # CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALS4000 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set @@ -1316,18 +1266,6 @@ CONFIG_SND_DUMMY=m # CONFIG_SND_CMIPCI is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -1347,7 +1285,6 @@ CONFIG_SND_DUMMY=m # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set @@ -1364,17 +1301,6 @@ CONFIG_SND_DUMMY=m CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -1384,8 +1310,6 @@ CONFIG_SND_USB_AUDIO=m # # PCMCIA devices # -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set # # Open Sound System @@ -1397,7 +1321,6 @@ CONFIG_SND_USB_AUDIO=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -1413,10 +1336,7 @@ CONFIG_USB_DYNAMIC_MINORS=y # # USB Host Controller Drivers # -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1427,6 +1347,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # # USB Device Class drivers # +# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m @@ -1437,17 +1358,7 @@ CONFIG_USB_PRINTER=m # # may also be needed; see USB_STORAGE Help for more information # -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE is not set # CONFIG_USB_LIBUSUAL is not set # @@ -1463,7 +1374,9 @@ CONFIG_USB_HIDINPUT_POWERBOOK=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1477,6 +1390,15 @@ CONFIG_USB_APPLETOUCH=y # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + # # USB Network Adapters # @@ -1493,6 +1415,7 @@ CONFIG_USB_NET_NET1080=m # CONFIG_USB_NET_RNDIS_HOST is not set # CONFIG_USB_NET_CDC_SUBSET is not set CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_ZD1201 is not set CONFIG_USB_MON=y # @@ -1505,7 +1428,7 @@ CONFIG_USB_MON=y CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_GENERIC is not set # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_ANYDATA is not set # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -1513,7 +1436,6 @@ CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m CONFIG_USB_SERIAL_IPAQ=m # CONFIG_USB_SERIAL_IR is not set @@ -1538,11 +1460,9 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_NAVMAN is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set # CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set @@ -1560,13 +1480,10 @@ CONFIG_USB_EZUSB=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -CONFIG_USB_APPLEDISPLAY=m -# CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1584,24 +1501,6 @@ CONFIG_USB_APPLEDISPLAY=m # # CONFIG_MMC is not set -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -# CONFIG_LEDS_TRIGGER_TIMER is not set -CONFIG_LEDS_TRIGGER_IDE_DISK=y -# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set - # # InfiniBand support # @@ -1611,24 +1510,6 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1637,24 +1518,23 @@ CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XIP is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=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 # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y +# CONFIG_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +# CONFIG_AUTOFS4_FS is not set CONFIG_FUSE_FS=m # @@ -1686,6 +1566,7 @@ CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y +CONFIG_RELAYFS_FS=m # CONFIG_CONFIGFS_FS is not set # @@ -1709,24 +1590,17 @@ CONFIG_HFSPLUS_FS=m # Network File Systems # CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y +CONFIG_NFSD=y +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=y +CONFIG_EXPORTFS=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set @@ -1807,14 +1681,13 @@ CONFIG_NLS_UTF8=m CONFIG_CRC_CCITT=y CONFIG_CRC16=y CONFIG_CRC32=y -CONFIG_LIBCRC32C=m +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support @@ -1827,19 +1700,14 @@ CONFIG_OPROFILE=y # # CONFIG_PRINTK_TIME is not set # CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set @@ -1851,7 +1719,11 @@ CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_BDI_SWITCH is not set CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options @@ -1863,29 +1735,29 @@ CONFIG_BOOTX_TEXT=y # Cryptographic options # CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=y -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=y -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m +# 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_WP512 is not set +# CONFIG_CRYPTO_TGR192 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=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m +# CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_TEST is not set # diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 7517d0c53..395e49847 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig @@ -1,18 +1,15 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:45:11 2006 +# Linux kernel version: 2.6.16-rc2 +# Fri Feb 10 17:32:14 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -33,10 +30,8 @@ CONFIG_POWER4=y CONFIG_PPC_FPU=y CONFIG_ALTIVEC=y CONFIG_PPC_STD_MMU=y -CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=32 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -54,14 +49,11 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_CPUSETS=y -CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set @@ -73,12 +65,14 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -89,6 +83,7 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_KMOD=y @@ -97,7 +92,6 @@ CONFIG_STOP_MACHINE=y # # Block layer # -CONFIG_BLK_DEV_IO_TRACE=y # # IO Schedulers @@ -123,22 +117,19 @@ CONFIG_PPC_PSERIES=y CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC64=y CONFIG_PPC_MAPLE=y -CONFIG_PPC_CELL=y -CONFIG_PPC_CELL_NATIVE=y -CONFIG_PPC_IBM_CELL_BLADE=y -CONFIG_UDBG_RTAS_CONSOLE=y +# CONFIG_PPC_CELL is not set CONFIG_XICS=y CONFIG_U3_DART=y +CONFIG_MPIC=y CONFIG_PPC_RTAS=y CONFIG_RTAS_ERROR_LOGGING=y CONFIG_RTAS_PROC=y CONFIG_RTAS_FLASH=m -CONFIG_MMIO_NVRAM=y +# CONFIG_MMIO_NVRAM is not set CONFIG_MPIC_BROKEN_U3=y CONFIG_IBMVIO=y # CONFIG_IBMEBUS is not set # CONFIG_PPC_MPC106 is not set -CONFIG_PPC_970_NAP=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set @@ -153,15 +144,6 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_PMAC64=y # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y - -# -# Cell Broadband Engine options -# -CONFIG_SPU_FS=m -CONFIG_SPU_BASE=y -CONFIG_SPUFS_MMAP=y -CONFIG_CBE_RAS=y # # Kernel options @@ -179,7 +161,6 @@ CONFIG_BINFMT_MISC=m CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y @@ -200,10 +181,9 @@ CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y +# CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_MEMORY_PROBE=y +CONFIG_MIGRATION=y # CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -216,12 +196,11 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set CONFIG_PPC_I8259=y # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set +# CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_DEBUG is not set # @@ -268,10 +247,7 @@ CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -282,9 +258,6 @@ CONFIG_TCP_CONG_BIC=y # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -311,8 +284,6 @@ CONFIG_IP_NF_IRC=m CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m # @@ -368,7 +339,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -406,7 +376,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -467,6 +436,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +# CONFIG_BLK_DEV_IDE_PMAC_BLINK is not set # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -527,7 +497,6 @@ CONFIG_SCSI_SATA_SVW=y # CONFIG_SCSI_SATA_MV is not set # CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_PDC_ADMA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_SATA_QSTOR is not set # CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_SX4 is not set @@ -550,10 +519,11 @@ CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set CONFIG_SCSI_IPR=y CONFIG_SCSI_IPR_TRACE=y CONFIG_SCSI_IPR_DUMP=y +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set CONFIG_SCSI_LPFC=m @@ -570,8 +540,8 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=y -CONFIG_MD_RAID456=y -CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID5=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y @@ -615,6 +585,7 @@ CONFIG_IEEE1394_OHCI1394=y # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=y @@ -628,7 +599,6 @@ CONFIG_IEEE1394_RAWIO=y # Macintosh device drivers # CONFIG_ADB_PMU=y -# CONFIG_ADB_PMU_LED is not set CONFIG_PMAC_SMU=y CONFIG_THERM_PM72=y CONFIG_WINDFARM=y @@ -712,7 +682,6 @@ CONFIG_E1000=y # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # CONFIG_BNX2 is not set -CONFIG_SPIDER_NET=m # CONFIG_MV643XX_ETH is not set # @@ -722,7 +691,6 @@ CONFIG_SPIDER_NET=m CONFIG_IXGB=m # CONFIG_IXGB_NAPI is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -824,7 +792,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -832,7 +799,6 @@ CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -848,9 +814,7 @@ CONFIG_SERIAL_ICOM=m CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_HVC_DRIVER=y CONFIG_HVC_CONSOLE=y -CONFIG_HVC_RTAS=y CONFIG_HVCS=m # @@ -862,7 +826,7 @@ CONFIG_HVCS=m # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -910,10 +874,10 @@ CONFIG_I2C_AMD8111=y # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_POWERMAC=y # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set @@ -932,7 +896,9 @@ CONFIG_I2C_POWERMAC=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_MAX6875 is not set +# CONFIG_RTC_X1205_I2C is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -947,6 +913,7 @@ CONFIG_I2C_POWERMAC=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -958,34 +925,38 @@ CONFIG_I2C_POWERMAC=y # Misc devices # +# +# Multimedia Capabilities Port drivers +# + # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support # -CONFIG_FIRMWARE_EDID=y CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y +# CONFIG_FB_CONTROL is not set +# CONFIG_FB_PLATINUM is not set +# CONFIG_FB_VALKYRIE is not set +# CONFIG_FB_CT65550 is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set @@ -999,6 +970,7 @@ CONFIG_FB_MATROX_G=y CONFIG_FB_MATROX_I2C=m CONFIG_FB_MATROX_MAVEN=m CONFIG_FB_MATROX_MULTIHEAD=y +# CONFIG_FB_RADEON_OLD is not set CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y # CONFIG_FB_RADEON_DEBUG is not set @@ -1053,11 +1025,9 @@ CONFIG_SND_SEQ_DUMMY=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_SEQUENCER_OSS=y # CONFIG_SND_DYNAMIC_MINORS is not set CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set @@ -1074,7 +1044,6 @@ CONFIG_SND_VERBOSE_PROCFS=y # PCI devices # # CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALS4000 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set @@ -1088,18 +1057,6 @@ CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_CMIPCI is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -1119,7 +1076,6 @@ CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set @@ -1136,17 +1092,6 @@ CONFIG_SND_VERBOSE_PROCFS=y CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -1163,7 +1108,6 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -1181,7 +1125,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -CONFIG_USB_EHCI_TT_NEWSCHED=y # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1192,6 +1135,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # # USB Device Class drivers # +# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set @@ -1229,7 +1173,9 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1243,6 +1189,15 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + # # USB Network Adapters # @@ -1272,12 +1227,10 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -CONFIG_USB_APPLEDISPLAY=m # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1296,54 +1249,24 @@ CONFIG_USB_APPLEDISPLAY=m # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # CONFIG_INFINIBAND=m # CONFIG_INFINIBAND_USER_MAD is not set # CONFIG_INFINIBAND_USER_ACCESS is not set -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set # CONFIG_INFINIBAND_SRP is not set -CONFIG_INFINIBAND_ISER=m # -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# SN Devices # # -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices +# EDAC - error detection and reporting (RAS) # # @@ -1375,6 +1298,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y @@ -1383,7 +1307,6 @@ CONFIG_XFS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y CONFIG_AUTOFS_FS=y @@ -1419,6 +1342,7 @@ CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y +# CONFIG_RELAYFS_FS is not set # CONFIG_CONFIGFS_FS is not set # @@ -1464,10 +1388,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1548,9 +1470,6 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y # # Instrumentation Support @@ -1564,19 +1483,14 @@ CONFIG_OPROFILE=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1590,7 +1504,11 @@ CONFIG_XMON=y # CONFIG_XMON_DEFAULT is not set CONFIG_IRQSTACKS=y CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 40782c0de..58e68ce09 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig @@ -1,18 +1,16 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Sun Sep 10 10:45:12 2006 +# Linux kernel version: 2.6.17-rc1 +# Wed Apr 19 11:48:00 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -36,7 +34,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=128 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -54,7 +51,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y @@ -73,12 +69,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -123,23 +117,19 @@ CONFIG_PPC_PSERIES=y # CONFIG_PPC_PMAC is not set # CONFIG_PPC_MAPLE is not set # CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_PPC_IBM_CELL_BLADE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set CONFIG_XICS=y # CONFIG_U3_DART is not set +CONFIG_MPIC=y CONFIG_PPC_RTAS=y CONFIG_RTAS_ERROR_LOGGING=y CONFIG_RTAS_PROC=y CONFIG_RTAS_FLASH=m # CONFIG_MMIO_NVRAM is not set CONFIG_IBMVIO=y -CONFIG_IBMEBUS=y +# CONFIG_IBMEBUS is not set # CONFIG_PPC_MPC106 is not set -# CONFIG_PPC_970_NAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -153,11 +143,10 @@ CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_BKL is not set CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=m +# CONFIG_BINFMT_MISC is not set CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y @@ -166,7 +155,6 @@ CONFIG_EEH=y CONFIG_SCANLOG=m CONFIG_LPARCFG=y CONFIG_NUMA=y -CONFIG_NODES_SHIFT=4 CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y @@ -182,9 +170,7 @@ CONFIG_SPARSEMEM_EXTREME=y # CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_NODES_SPAN_OTHER_NODES=y # CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y CONFIG_PROC_DEVICETREE=y @@ -197,12 +183,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set CONFIG_PPC_I8259=y # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -# CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_DEBUG is not set # @@ -251,8 +235,6 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -265,7 +247,6 @@ CONFIG_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -293,7 +274,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m # CONFIG_IP_NF_PPTP is not set # CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set CONFIG_IP_NF_QUEUE=m # @@ -333,7 +313,6 @@ CONFIG_LLC=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -350,7 +329,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -371,7 +349,6 @@ CONFIG_PARPORT_PC=m # CONFIG_PARPORT_PC_FIFO is not set # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set # CONFIG_PARPORT_1284 is not set # @@ -396,7 +373,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=65536 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -491,7 +467,7 @@ CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set # # SCSI low-level drivers @@ -508,7 +484,6 @@ CONFIG_SCSI_SAS_ATTRS=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -524,12 +499,13 @@ CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set CONFIG_SCSI_IPR=y CONFIG_SCSI_IPR_TRACE=y CONFIG_SCSI_IPR_DUMP=y +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA_FC=m +# CONFIG_SCSI_QLA_FC is not set CONFIG_SCSI_LPFC=m # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set @@ -544,7 +520,9 @@ CONFIG_MD_LINEAR=y CONFIG_MD_RAID0=y CONFIG_MD_RAID1=y CONFIG_MD_RAID10=m -# CONFIG_MD_RAID456 is not set +CONFIG_MD_RAID5=y +# CONFIG_MD_RAID5_RESHAPE is not set +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=y @@ -665,7 +643,6 @@ CONFIG_IXGB=m # CONFIG_IXGB_NAPI is not set CONFIG_S2IO=m # CONFIG_S2IO_NAPI is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -769,7 +746,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -788,7 +764,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -797,7 +773,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_TIPAR is not set CONFIG_HVC_DRIVER=y CONFIG_HVC_CONSOLE=y -CONFIG_HVC_RTAS=y +# CONFIG_HVC_RTAS is not set CONFIG_HVCS=m # @@ -809,7 +785,6 @@ CONFIG_HVCS=m # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_DTLK is not set @@ -856,7 +831,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set @@ -894,6 +868,7 @@ CONFIG_I2C_ALGOBIT=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support @@ -909,7 +884,6 @@ CONFIG_I2C_ALGOBIT=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -920,19 +894,19 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -CONFIG_FIRMWARE_EDID=y CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_FIRMWARE_EDID=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y +# CONFIG_FB_CT65550 is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set @@ -1011,7 +985,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1058,7 +1031,9 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_YEALINK is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set @@ -1102,12 +1077,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1131,28 +1104,17 @@ CONFIG_USB_MON=y # # CONFIG_NEW_LEDS is not set -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y +# CONFIG_INFINIBAND_USER_MAD is not set +# CONFIG_INFINIBAND_USER_ACCESS is not set CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set -CONFIG_INFINIBAND_SRP=m -# CONFIG_INFINIBAND_ISER is not set +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set +# CONFIG_INFINIBAND_SRP is not set # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -1163,19 +1125,6 @@ CONFIG_INFINIBAND_SRP=m # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # File systems # @@ -1205,21 +1154,20 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set -CONFIG_OCFS2_FS=m -CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m +CONFIG_AUTOFS_FS=m +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -1251,7 +1199,7 @@ CONFIG_TMPFS=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m +# CONFIG_CONFIGFS_FS is not set # # Miscellaneous filesystems @@ -1296,10 +1244,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set @@ -1365,35 +1311,27 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_PLIST=y # # Instrumentation Support # CONFIG_PROFILING=y CONFIG_OPROFILE=y -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y @@ -1401,13 +1339,17 @@ CONFIG_DEBUG_FS=y CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_XMON=y CONFIG_XMON_DEFAULT=y CONFIG_IRQSTACKS=y # CONFIG_BOOTX_TEXT is not set -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 7d32ad019..803858e86 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -50,8 +50,7 @@ extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o extra-$(CONFIG_8xx) := head_8xx.o extra-y += vmlinux.lds -obj-y += time.o prom.o traps.o setup-common.o \ - udbg.o misc.o +obj-y += time.o prom.o traps.o setup-common.o udbg.o obj-$(CONFIG_PPC32) += entry_32.o setup_32.o misc_32.o obj-$(CONFIG_PPC64) += misc_64.o dma_64.o iommu.o obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o @@ -67,11 +66,9 @@ pci64-$(CONFIG_PPC64) += pci_64.o pci_dn.o pci_iommu.o \ pci_direct_iommu.o iomap.o pci32-$(CONFIG_PPC32) := pci_32.o obj-$(CONFIG_PCI) += $(pci64-y) $(pci32-y) -kexec-$(CONFIG_PPC64) := machine_kexec_64.o +kexec-$(CONFIG_PPC64) := machine_kexec_64.o crash.o kexec-$(CONFIG_PPC32) := machine_kexec_32.o -obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o $(kexec-y) -obj-$(CONFIG_AUDIT) += audit.o -obj64-$(CONFIG_AUDIT) += compat_audit.o +obj-$(CONFIG_KEXEC) += machine_kexec.o $(kexec-y) ifeq ($(CONFIG_PPC_ISERIES),y) $(obj)/head_64.o: $(obj)/lparmap.s diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 4734b5de5..faaec9c6f 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c @@ -35,19 +35,17 @@ struct aligninfo { #define INVALID { 0, 0 } -/* Bits in the flags field */ -#define LD 0 /* load */ -#define ST 1 /* store */ -#define SE 2 /* sign-extend value */ -#define F 4 /* to/from fp regs */ -#define U 8 /* update index register */ -#define M 0x10 /* multiple load/store */ -#define SW 0x20 /* byte swap */ -#define S 0x40 /* single-precision fp or... */ -#define SX 0x40 /* ... byte count in XER */ +#define LD 1 /* load */ +#define ST 2 /* store */ +#define SE 4 /* sign-extend value */ +#define F 8 /* to/from fp regs */ +#define U 0x10 /* update index register */ +#define M 0x20 /* multiple load/store */ +#define SW 0x40 /* byte swap int or ... */ +#define S 0x40 /* ... single-precision fp */ +#define SX 0x40 /* byte count in XER */ #define HARD 0x80 /* string, stwcx. */ -/* DSISR bits reported for a DCBZ instruction: */ #define DCBZ 0x5f /* 8xx/82xx dcbz faults when cache not enabled */ #define SWAP(a, b) (t = (a), (a) = (b), (b) = t) @@ -258,16 +256,12 @@ static int emulate_dcbz(struct pt_regs *regs, unsigned char __user *addr) #define REG_BYTE(rp, i) *((u8 *)(rp) + (i)) #endif -#define SWIZ_PTR(p) ((unsigned char __user *)((p) ^ swiz)) - static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, unsigned int reg, unsigned int nb, - unsigned int flags, unsigned int instr, - unsigned long swiz) + unsigned int flags, unsigned int instr) { unsigned long *rptr; - unsigned int nb0, i, bswiz; - unsigned long p; + unsigned int nb0, i; /* * We do not try to emulate 8 bytes multiple as they aren't really @@ -286,12 +280,9 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, if (nb == 0) return 1; } else { - unsigned long pc = regs->nip ^ (swiz & 4); - - if (__get_user(instr, (unsigned int __user *)pc)) + if (__get_user(instr, + (unsigned int __user *)regs->nip)) return -EFAULT; - if (swiz == 0 && (flags & SW)) - instr = cpu_to_le32(instr); nb = (instr >> 11) & 0x1f; if (nb == 0) nb = 32; @@ -309,10 +300,7 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, return -EFAULT; /* bad address */ rptr = ®s->gpr[reg]; - p = (unsigned long) addr; - bswiz = (flags & SW)? 3: 0; - - if (!(flags & ST)) { + if (flags & LD) { /* * This zeroes the top 4 bytes of the affected registers * in 64-bit mode, and also zeroes out any remaining @@ -323,28 +311,26 @@ static int emulate_multiple(struct pt_regs *regs, unsigned char __user *addr, memset(®s->gpr[0], 0, ((nb0 + 3) / 4) * sizeof(unsigned long)); - for (i = 0; i < nb; ++i, ++p) - if (__get_user(REG_BYTE(rptr, i ^ bswiz), SWIZ_PTR(p))) + for (i = 0; i < nb; ++i) + if (__get_user(REG_BYTE(rptr, i), addr + i)) return -EFAULT; if (nb0 > 0) { rptr = ®s->gpr[0]; addr += nb; - for (i = 0; i < nb0; ++i, ++p) - if (__get_user(REG_BYTE(rptr, i ^ bswiz), - SWIZ_PTR(p))) + for (i = 0; i < nb0; ++i) + if (__get_user(REG_BYTE(rptr, i), addr + i)) return -EFAULT; } } else { - for (i = 0; i < nb; ++i, ++p) - if (__put_user(REG_BYTE(rptr, i ^ bswiz), SWIZ_PTR(p))) + for (i = 0; i < nb; ++i) + if (__put_user(REG_BYTE(rptr, i), addr + i)) return -EFAULT; if (nb0 > 0) { rptr = ®s->gpr[0]; addr += nb; - for (i = 0; i < nb0; ++i, ++p) - if (__put_user(REG_BYTE(rptr, i ^ bswiz), - SWIZ_PTR(p))) + for (i = 0; i < nb0; ++i) + if (__put_user(REG_BYTE(rptr, i), addr + i)) return -EFAULT; } } @@ -366,7 +352,7 @@ int fix_alignment(struct pt_regs *regs) unsigned int reg, areg; unsigned int dsisr; unsigned char __user *addr; - unsigned long p, swiz; + unsigned char __user *p; int ret, t; union { u64 ll; @@ -394,15 +380,11 @@ int fix_alignment(struct pt_regs *regs) * let's make one up from the instruction */ if (cpu_has_feature(CPU_FTR_NODSISRALIGN)) { - unsigned long pc = regs->nip; - - if (cpu_has_feature(CPU_FTR_PPC_LE) && (regs->msr & MSR_LE)) - pc ^= 4; - if (unlikely(__get_user(instr, (unsigned int __user *)pc))) + unsigned int real_instr; + if (unlikely(__get_user(real_instr, + (unsigned int __user *)regs->nip))) return -EFAULT; - if (cpu_has_feature(CPU_FTR_REAL_LE) && (regs->msr & MSR_LE)) - instr = cpu_to_le32(instr); - dsisr = make_dsisr(instr); + dsisr = make_dsisr(real_instr); } /* extract the operation and registers from the dsisr */ @@ -415,24 +397,6 @@ int fix_alignment(struct pt_regs *regs) nb = aligninfo[instr].len; flags = aligninfo[instr].flags; - /* Byteswap little endian loads and stores */ - swiz = 0; - if (regs->msr & MSR_LE) { - flags ^= SW; - /* - * So-called "PowerPC little endian" mode works by - * swizzling addresses rather than by actually doing - * any byte-swapping. To emulate this, we XOR each - * byte address with 7. We also byte-swap, because - * the processor's address swizzling depends on the - * operand size (it xors the address with 7 for bytes, - * 6 for halfwords, 4 for words, 0 for doublewords) but - * we will xor with 7 and load/store each byte separately. - */ - if (cpu_has_feature(CPU_FTR_PPC_LE)) - swiz = 7; - } - /* DAR has the operand effective address */ addr = (unsigned char __user *)regs->dar; @@ -448,8 +412,7 @@ int fix_alignment(struct pt_regs *regs) * function */ if (flags & M) - return emulate_multiple(regs, addr, reg, nb, - flags, instr, swiz); + return emulate_multiple(regs, addr, reg, nb, flags, instr); /* Verify the address of the operand */ if (unlikely(user_mode(regs) && @@ -468,71 +431,51 @@ int fix_alignment(struct pt_regs *regs) /* If we are loading, get the data from user space, else * get it from register values */ - if (!(flags & ST)) { + if (flags & LD) { data.ll = 0; ret = 0; - p = (unsigned long) addr; + p = addr; switch (nb) { case 8: - ret |= __get_user(data.v[0], SWIZ_PTR(p++)); - ret |= __get_user(data.v[1], SWIZ_PTR(p++)); - ret |= __get_user(data.v[2], SWIZ_PTR(p++)); - ret |= __get_user(data.v[3], SWIZ_PTR(p++)); + ret |= __get_user(data.v[0], p++); + ret |= __get_user(data.v[1], p++); + ret |= __get_user(data.v[2], p++); + ret |= __get_user(data.v[3], p++); case 4: - ret |= __get_user(data.v[4], SWIZ_PTR(p++)); - ret |= __get_user(data.v[5], SWIZ_PTR(p++)); + ret |= __get_user(data.v[4], p++); + ret |= __get_user(data.v[5], p++); case 2: - ret |= __get_user(data.v[6], SWIZ_PTR(p++)); - ret |= __get_user(data.v[7], SWIZ_PTR(p++)); + ret |= __get_user(data.v[6], p++); + ret |= __get_user(data.v[7], p++); if (unlikely(ret)) return -EFAULT; } - } else if (flags & F) { + } else if (flags & F) data.dd = current->thread.fpr[reg]; - if (flags & S) { - /* Single-precision FP store requires conversion... */ -#ifdef CONFIG_PPC_FPU - preempt_disable(); - enable_kernel_fp(); - cvt_df(&data.dd, (float *)&data.v[4], ¤t->thread); - preempt_enable(); -#else - return 0; -#endif - } - } else + else data.ll = regs->gpr[reg]; - if (flags & SW) { - switch (nb) { - case 8: - SWAP(data.v[0], data.v[7]); - SWAP(data.v[1], data.v[6]); - SWAP(data.v[2], data.v[5]); - SWAP(data.v[3], data.v[4]); - break; - case 4: - SWAP(data.v[4], data.v[7]); - SWAP(data.v[5], data.v[6]); - break; - case 2: - SWAP(data.v[6], data.v[7]); - break; - } - } - - /* Perform other misc operations like sign extension + /* Perform other misc operations like sign extension, byteswap, * or floating point single precision conversion */ - switch (flags & ~(U|SW)) { + switch (flags & ~U) { case LD+SE: /* sign extend */ if ( nb == 2 ) data.ll = data.x16.low16; else /* nb must be 4 */ data.ll = data.x32.low32; break; + case LD+S: /* byte-swap */ + case ST+S: + if (nb == 2) { + SWAP(data.v[6], data.v[7]); + } else { + SWAP(data.v[4], data.v[7]); + SWAP(data.v[5], data.v[6]); + } + break; - /* Single-precision FP load requires conversion... */ + /* Single-precision FP load and store require conversions... */ case LD+F+S: #ifdef CONFIG_PPC_FPU preempt_disable(); @@ -541,6 +484,16 @@ int fix_alignment(struct pt_regs *regs) preempt_enable(); #else return 0; +#endif + break; + case ST+F+S: +#ifdef CONFIG_PPC_FPU + preempt_disable(); + enable_kernel_fp(); + cvt_df(&data.dd, (float *)&data.v[4], ¤t->thread); + preempt_enable(); +#else + return 0; #endif break; } @@ -548,19 +501,19 @@ int fix_alignment(struct pt_regs *regs) /* Store result to memory or update registers */ if (flags & ST) { ret = 0; - p = (unsigned long) addr; + p = addr; switch (nb) { case 8: - ret |= __put_user(data.v[0], SWIZ_PTR(p++)); - ret |= __put_user(data.v[1], SWIZ_PTR(p++)); - ret |= __put_user(data.v[2], SWIZ_PTR(p++)); - ret |= __put_user(data.v[3], SWIZ_PTR(p++)); + ret |= __put_user(data.v[0], p++); + ret |= __put_user(data.v[1], p++); + ret |= __put_user(data.v[2], p++); + ret |= __put_user(data.v[3], p++); case 4: - ret |= __put_user(data.v[4], SWIZ_PTR(p++)); - ret |= __put_user(data.v[5], SWIZ_PTR(p++)); + ret |= __put_user(data.v[4], p++); + ret |= __put_user(data.v[5], p++); case 2: - ret |= __put_user(data.v[6], SWIZ_PTR(p++)); - ret |= __put_user(data.v[7], SWIZ_PTR(p++)); + ret |= __put_user(data.v[6], p++); + ret |= __put_user(data.v[7], p++); } if (unlikely(ret)) return -EFAULT; diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 7ee849680..8f85c5e8a 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -121,8 +122,9 @@ int main(void) DEFINE(PACASLBCACHE, offsetof(struct paca_struct, slb_cache)); DEFINE(PACASLBCACHEPTR, offsetof(struct paca_struct, slb_cache_ptr)); DEFINE(PACACONTEXTID, offsetof(struct paca_struct, context.id)); - DEFINE(PACACONTEXTSLLP, offsetof(struct paca_struct, context.sllp)); - DEFINE(PACAVMALLOCSLLP, offsetof(struct paca_struct, vmalloc_sllp)); +#ifdef CONFIG_PPC_64K_PAGES + DEFINE(PACAPGDIR, offsetof(struct paca_struct, pgdir)); +#endif #ifdef CONFIG_HUGETLB_PAGE DEFINE(PACALOWHTLBAREAS, offsetof(struct paca_struct, context.low_htlb_areas)); DEFINE(PACAHIGHHTLBAREAS, offsetof(struct paca_struct, context.high_htlb_areas)); diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c deleted file mode 100644 index 7fe5e6300..000000000 --- a/arch/powerpc/kernel/audit.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ -#ifdef CONFIG_PPC64 - extern int ppc32_classify_syscall(unsigned); - if (abi == AUDIT_ARCH_PPC) - return ppc32_classify_syscall(syscall); -#endif - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ -#ifdef CONFIG_PPC64 - extern __u32 ppc32_dir_class[]; - extern __u32 ppc32_write_class[]; - extern __u32 ppc32_read_class[]; - extern __u32 ppc32_chattr_class[]; - audit_register_class(AUDIT_CLASS_WRITE_32, ppc32_write_class); - audit_register_class(AUDIT_CLASS_READ_32, ppc32_read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ppc32_dir_class); - audit_register_class(AUDIT_CLASS_CHATTR_32, ppc32_chattr_class); -#endif - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/arch/powerpc/kernel/binfmt_elf32.c b/arch/powerpc/kernel/binfmt_elf32.c index 5cb58757e..8ad6b0f33 100644 --- a/arch/powerpc/kernel/binfmt_elf32.c +++ b/arch/powerpc/kernel/binfmt_elf32.c @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c index f4e5e14ee..6223d3917 100644 --- a/arch/powerpc/kernel/btext.c +++ b/arch/powerpc/kernel/btext.c @@ -3,6 +3,7 @@ * * Benjamin Herrenschmidt */ +#include #include #include #include @@ -111,7 +112,7 @@ void __init btext_setup_display(int width, int height, int depth, int pitch, logicalDisplayBase = (unsigned char *)address; dispDeviceBase = (unsigned char *)address; dispDeviceRowBytes = pitch; - dispDeviceDepth = depth == 15 ? 16 : depth; + dispDeviceDepth = depth; dispDeviceRect[0] = dispDeviceRect[1] = 0; dispDeviceRect[2] = width; dispDeviceRect[3] = height; @@ -160,28 +161,20 @@ int btext_initialize(struct device_node *np) unsigned long address = 0; u32 *prop; - prop = (u32 *)get_property(np, "linux,bootx-width", NULL); - if (prop == NULL) - prop = (u32 *)get_property(np, "width", NULL); + prop = (u32 *)get_property(np, "width", NULL); if (prop == NULL) return -EINVAL; width = *prop; - prop = (u32 *)get_property(np, "linux,bootx-height", NULL); - if (prop == NULL) - prop = (u32 *)get_property(np, "height", NULL); + prop = (u32 *)get_property(np, "height", NULL); if (prop == NULL) return -EINVAL; height = *prop; - prop = (u32 *)get_property(np, "linux,bootx-depth", NULL); - if (prop == NULL) - prop = (u32 *)get_property(np, "depth", NULL); + prop = (u32 *)get_property(np, "depth", NULL); if (prop == NULL) return -EINVAL; depth = *prop; pitch = width * ((depth + 7) / 8); - prop = (u32 *)get_property(np, "linux,bootx-linebytes", NULL); - if (prop == NULL) - prop = (u32 *)get_property(np, "linebytes", NULL); + prop = (u32 *)get_property(np, "linebytes", NULL); if (prop) pitch = *prop; if (pitch == 1) @@ -202,7 +195,7 @@ int btext_initialize(struct device_node *np) g_max_loc_Y = height / 16; dispDeviceBase = (unsigned char *)address; dispDeviceRowBytes = pitch; - dispDeviceDepth = depth == 15 ? 16 : depth; + dispDeviceDepth = depth; dispDeviceRect[0] = dispDeviceRect[1] = 0; dispDeviceRect[2] = width; dispDeviceRect[3] = height; diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c deleted file mode 100644 index 640d4bb29..000000000 --- a/arch/powerpc/kernel/compat_audit.c +++ /dev/null @@ -1,38 +0,0 @@ -#undef __powerpc64__ -#include - -unsigned ppc32_dir_class[] = { -#include -~0U -}; - -unsigned ppc32_chattr_class[] = { -#include -~0U -}; - -unsigned ppc32_write_class[] = { -#include -~0U -}; - -unsigned ppc32_read_class[] = { -#include -~0U -}; - -int ppc32_classify_syscall(unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 1; - } -} diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S index 8b4a4ee85..55ed77166 100644 --- a/arch/powerpc/kernel/cpu_setup_6xx.S +++ b/arch/powerpc/kernel/cpu_setup_6xx.S @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -209,11 +210,9 @@ setup_745x_specifics: * the firmware. If any, we disable NAP capability as * it's known to be bogus on rev 2.1 and earlier */ -BEGIN_FTR_SECTION mfspr r11,SPRN_L3CR andis. r11,r11,L3CR_L3E@h beq 1f -END_FTR_SECTION_IFSET(CPU_FTR_L3CR) lwz r6,CPU_SPEC_FEATURES(r5) andi. r0,r6,CPU_FTR_L3_DISABLE_NAP beq 1f diff --git a/arch/powerpc/kernel/cpu_setup_power4.S b/arch/powerpc/kernel/cpu_setup_power4.S index 76e97aa71..55f367edd 100644 --- a/arch/powerpc/kernel/cpu_setup_power4.S +++ b/arch/powerpc/kernel/cpu_setup_power4.S @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -72,6 +73,23 @@ _GLOBAL(__970_cpu_preinit) isync blr +_GLOBAL(__setup_cpu_power4) + blr + +_GLOBAL(__setup_cpu_be) + /* Set large page sizes LP=0: 16MB, LP=1: 64KB */ + addi r3, 0, 0 + ori r3, r3, HID6_LB + sldi r3, r3, 32 + nor r3, r3, r3 + mfspr r4, SPRN_HID6 + and r4, r4, r3 + addi r3, 0, 0x02000 + sldi r3, r3, 32 + or r4, r4, r3 + mtspr SPRN_HID6, r4 + blr + _GLOBAL(__setup_cpu_ppc970) mfspr r0,SPRN_HID0 li r11,5 /* clear DOZE and SLEEP */ @@ -126,12 +144,7 @@ _GLOBAL(__save_cpu_setup) cmpwi r0,0x44 bne 2f -1: /* skip if not running in HV mode */ - mfmsr r0 - rldicl. r0,r0,4,63 - beq 2f - - /* Save HID0,1,4 and 5 */ +1: /* Save HID0,1,4 and 5 */ mfspr r3,SPRN_HID0 std r3,CS_HID0(r5) mfspr r3,SPRN_HID1 @@ -165,12 +178,7 @@ _GLOBAL(__restore_cpu_setup) cmpwi r0,0x44 bnelr -1: /* skip if not running in HV mode */ - mfmsr r0 - rldicl. r0,r0,4,63 - beqlr - - /* Before accessing memory, we make sure rm_ci is clear */ +1: /* Before accessing memory, we make sure rm_ci is clear */ li r0,0 mfspr r3,SPRN_HID4 rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 272e43622..3f7182db9 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -29,7 +30,11 @@ EXPORT_SYMBOL(cur_cpu_spec); * part of the cputable though. That has to be fixed for both ppc32 * and ppc64 */ -#ifdef CONFIG_PPC32 +#ifdef CONFIG_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); +extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec); +#else extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); @@ -53,8 +58,7 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\ - PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \ - PPC_FEATURE_TRUE_LE) + PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ PPC_FEATURE_BOOKE) @@ -74,10 +78,11 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00400000, .cpu_name = "POWER3 (630)", .cpu_features = CPU_FTRS_POWER3, - .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER_PPC64, .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", .oprofile_type = PPC_OPROFILE_RS64, .platform = "power3", @@ -87,10 +92,11 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00410000, .cpu_name = "POWER3 (630+)", .cpu_features = CPU_FTRS_POWER3, - .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER_PPC64, .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/power3", .oprofile_type = PPC_OPROFILE_RS64, .platform = "power3", @@ -104,6 +110,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", .oprofile_type = PPC_OPROFILE_RS64, .platform = "rs64", @@ -117,6 +124,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", .oprofile_type = PPC_OPROFILE_RS64, .platform = "rs64", @@ -130,6 +138,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", .oprofile_type = PPC_OPROFILE_RS64, .platform = "rs64", @@ -143,6 +152,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power3, .oprofile_cpu_type = "ppc64/rs64", .oprofile_type = PPC_OPROFILE_RS64, .platform = "rs64", @@ -156,6 +166,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", .oprofile_type = PPC_OPROFILE_POWER4, .platform = "power4", @@ -169,6 +180,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 8, + .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power4", .oprofile_type = PPC_OPROFILE_POWER4, .platform = "power4", @@ -188,11 +200,17 @@ struct cpu_spec cpu_specs[] = { .oprofile_type = PPC_OPROFILE_POWER4, .platform = "ppc970", }, +#endif /* CONFIG_PPC64 */ +#if defined(CONFIG_PPC64) || defined(CONFIG_POWER4) { /* PPC970FX */ .pvr_mask = 0xffff0000, .pvr_value = 0x003c0000, .cpu_name = "PPC970FX", +#ifdef CONFIG_PPC32 + .cpu_features = CPU_FTRS_970_32, +#else .cpu_features = CPU_FTRS_PPC970, +#endif .cpu_user_features = COMMON_USER_POWER4 | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 128, @@ -203,6 +221,8 @@ struct cpu_spec cpu_specs[] = { .oprofile_type = PPC_OPROFILE_POWER4, .platform = "ppc970", }, +#endif /* defined(CONFIG_PPC64) || defined(CONFIG_POWER4) */ +#ifdef CONFIG_PPC64 { /* PPC970MP */ .pvr_mask = 0xffff0000, .pvr_value = 0x00440000, @@ -212,7 +232,6 @@ struct cpu_spec cpu_specs[] = { PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 128, .dcache_bsize = 128, - .num_pmcs = 8, .cpu_setup = __setup_cpu_ppc970, .oprofile_cpu_type = "ppc64/970", .oprofile_type = PPC_OPROFILE_POWER4, @@ -227,13 +246,9 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 6, + .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5", .oprofile_type = PPC_OPROFILE_POWER4, - /* SIHV / SIPR bits are implemented on POWER4+ (GQ) - * and above but only works on POWER5 and above - */ - .oprofile_mmcra_sihv = MMCRA_SIHV, - .oprofile_mmcra_sipr = MMCRA_SIPR, .platform = "power5", }, { /* Power5 GS */ @@ -245,10 +260,9 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 6, + .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power5+", .oprofile_type = PPC_OPROFILE_POWER4, - .oprofile_mmcra_sihv = MMCRA_SIHV, - .oprofile_mmcra_sipr = MMCRA_SIPR, .platform = "power5+", }, { /* Power6 */ @@ -259,13 +273,10 @@ struct cpu_spec cpu_specs[] = { .cpu_user_features = COMMON_USER_POWER6, .icache_bsize = 128, .dcache_bsize = 128, - .num_pmcs = 8, + .num_pmcs = 6, + .cpu_setup = __setup_cpu_power4, .oprofile_cpu_type = "ppc64/power6", .oprofile_type = PPC_OPROFILE_POWER4, - .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, - .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, - .oprofile_mmcra_clear = POWER6_MMCRA_THRM | - POWER6_MMCRA_OTHER, .platform = "power6", }, { /* Cell Broadband Engine */ @@ -278,6 +289,7 @@ struct cpu_spec cpu_specs[] = { PPC_FEATURE_SMT, .icache_bsize = 128, .dcache_bsize = 128, + .cpu_setup = __setup_cpu_be, .platform = "ppc-cell-be", }, { /* default match */ @@ -289,6 +301,7 @@ struct cpu_spec cpu_specs[] = { .icache_bsize = 128, .dcache_bsize = 128, .num_pmcs = 6, + .cpu_setup = __setup_cpu_power4, .platform = "power4", } #endif /* CONFIG_PPC64 */ @@ -310,7 +323,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00030000, .cpu_name = "603", .cpu_features = CPU_FTRS_603, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .cpu_setup = __setup_cpu_603, @@ -321,7 +334,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00060000, .cpu_name = "603e", .cpu_features = CPU_FTRS_603, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .cpu_setup = __setup_cpu_603, @@ -332,7 +345,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00070000, .cpu_name = "603ev", .cpu_features = CPU_FTRS_603, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .cpu_setup = __setup_cpu_603, @@ -343,7 +356,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00040000, .cpu_name = "604", .cpu_features = CPU_FTRS_604, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 2, @@ -355,7 +368,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00090000, .cpu_name = "604e", .cpu_features = CPU_FTRS_604, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -367,7 +380,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00090000, .cpu_name = "604r", .cpu_features = CPU_FTRS_604, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -379,7 +392,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x000a0000, .cpu_name = "604ev", .cpu_features = CPU_FTRS_604, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -391,7 +404,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00084202, .cpu_name = "740/750", .cpu_features = CPU_FTRS_740_NOTAU, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -403,7 +416,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00080100, .cpu_name = "750CX", .cpu_features = CPU_FTRS_750, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -415,7 +428,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00082200, .cpu_name = "750CX", .cpu_features = CPU_FTRS_750, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -427,7 +440,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00082210, .cpu_name = "750CXe", .cpu_features = CPU_FTRS_750, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -439,7 +452,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00083214, .cpu_name = "750CXe", .cpu_features = CPU_FTRS_750, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -451,7 +464,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00083000, .cpu_name = "745/755", .cpu_features = CPU_FTRS_750, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -463,7 +476,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x70000100, .cpu_name = "750FX", .cpu_features = CPU_FTRS_750FX1, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -475,7 +488,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x70000200, .cpu_name = "750FX", .cpu_features = CPU_FTRS_750FX2, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -487,7 +500,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x70000000, .cpu_name = "750FX", .cpu_features = CPU_FTRS_750FX, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -499,7 +512,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x70020000, .cpu_name = "750GX", .cpu_features = CPU_FTRS_750GX, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -511,7 +524,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x00080000, .cpu_name = "740/750", .cpu_features = CPU_FTRS_740, - .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -523,8 +536,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x000c1101, .cpu_name = "7400 (1.1)", .cpu_features = CPU_FTRS_7400_NOTAU, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -536,8 +548,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x000c0000, .cpu_name = "7400", .cpu_features = CPU_FTRS_7400, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -549,8 +560,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x800c0000, .cpu_name = "7410", .cpu_features = CPU_FTRS_7400, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 4, @@ -562,8 +572,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80000200, .cpu_name = "7450", .cpu_features = CPU_FTRS_7450_20, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -577,8 +586,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80000201, .cpu_name = "7450", .cpu_features = CPU_FTRS_7450_21, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -592,8 +600,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80000000, .cpu_name = "7450", .cpu_features = CPU_FTRS_7450_23, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -607,8 +614,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80010100, .cpu_name = "7455", .cpu_features = CPU_FTRS_7455_1, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -622,8 +628,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80010200, .cpu_name = "7455", .cpu_features = CPU_FTRS_7455_20, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -637,8 +642,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80010000, .cpu_name = "7455", .cpu_features = CPU_FTRS_7455, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -652,8 +656,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80020100, .cpu_name = "7447/7457", .cpu_features = CPU_FTRS_7447_10, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -667,8 +670,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80020101, .cpu_name = "7447/7457", .cpu_features = CPU_FTRS_7447_10, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -682,7 +684,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80020000, .cpu_name = "7447/7457", .cpu_features = CPU_FTRS_7447, - .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -696,8 +698,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80030000, .cpu_name = "7447A", .cpu_features = CPU_FTRS_7447A, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, @@ -711,8 +712,7 @@ struct cpu_spec cpu_specs[] = { .pvr_value = 0x80040000, .cpu_name = "7448", .cpu_features = CPU_FTRS_7447A, - .cpu_user_features = COMMON_USER | - PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE, + .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, .icache_bsize = 32, .dcache_bsize = 32, .num_pmcs = 6, diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 1af41f761..dbcb85994 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c @@ -24,11 +24,9 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -43,8 +41,6 @@ /* This keeps a track of which one is crashing cpu. */ int crashing_cpu = -1; -static cpumask_t cpus_in_crash = CPU_MASK_NONE; -cpumask_t cpus_in_sr = CPU_MASK_NONE; static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data, size_t data_len) @@ -102,72 +98,34 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu) } #ifdef CONFIG_SMP -static atomic_t enter_on_soft_reset = ATOMIC_INIT(0); +static atomic_t waiting_for_crash_ipi; void crash_ipi_callback(struct pt_regs *regs) { int cpu = smp_processor_id(); - if (!cpu_online(cpu)) + if (cpu == crashing_cpu) return; - local_irq_disable(); - if (!cpu_isset(cpu, cpus_in_crash)) - crash_save_this_cpu(regs, cpu); - cpu_set(cpu, cpus_in_crash); - - /* - * Entered via soft-reset - could be the kdump - * process is invoked using soft-reset or user activated - * it if some CPU did not respond to an IPI. - * For soft-reset, the secondary CPU can enter this func - * twice. 1 - using IPI, and 2. soft-reset. - * Tell the kexec CPU that entered via soft-reset and ready - * to go down. - */ - if (cpu_isset(cpu, cpus_in_sr)) { - cpu_clear(cpu, cpus_in_sr); - atomic_inc(&enter_on_soft_reset); - } - - /* - * Starting the kdump boot. - * This barrier is needed to make sure that all CPUs are stopped. - * If not, soft-reset will be invoked to bring other CPUs. - */ - while (!cpu_isset(crashing_cpu, cpus_in_crash)) - cpu_relax(); + if (!cpu_online(cpu)) + return; if (ppc_md.kexec_cpu_down) ppc_md.kexec_cpu_down(1, 1); -#ifdef CONFIG_PPC64 - kexec_smp_wait(); -#else - for (;;); /* FIXME */ -#endif + local_irq_disable(); + crash_save_this_cpu(regs, cpu); + atomic_dec(&waiting_for_crash_ipi); + kexec_smp_wait(); /* NOTREACHED */ } -/* - * Wait until all CPUs are entered via soft-reset. - */ -static void crash_soft_reset_check(int cpu) -{ - unsigned int ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ - - cpu_clear(cpu, cpus_in_sr); - while (atomic_read(&enter_on_soft_reset) != ncpus) - cpu_relax(); -} - - -static void crash_kexec_prepare_cpus(int cpu) +static void crash_kexec_prepare_cpus(void) { unsigned int msecs; - unsigned int ncpus = num_online_cpus() - 1;/* Excluding the panic cpu */ + atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); crash_send_ipi(crash_ipi_callback); smp_wmb(); @@ -175,13 +133,14 @@ static void crash_kexec_prepare_cpus(int cpu) /* * FIXME: Until we will have the way to stop other CPUSs reliabally, * the crash CPU will send an IPI and wait for other CPUs to - * respond. + * respond. If not, proceed the kexec boot even though we failed to + * capture other CPU states. * Delay of at least 10 seconds. */ - printk(KERN_EMERG "Sending IPI to other cpus...\n"); + printk(KERN_ALERT "Sending IPI to other cpus...\n"); msecs = 10000; - while ((cpus_weight(cpus_in_crash) < ncpus) && (--msecs > 0)) { - cpu_relax(); + while ((atomic_read(&waiting_for_crash_ipi) > 0) && (--msecs > 0)) { + barrier(); mdelay(1); } @@ -190,71 +149,18 @@ static void crash_kexec_prepare_cpus(int cpu) /* * FIXME: In case if we do not get all CPUs, one possibility: ask the * user to do soft reset such that we get all. - * Soft-reset will be used until better mechanism is implemented. - */ - if (cpus_weight(cpus_in_crash) < ncpus) { - printk(KERN_EMERG "done waiting: %d cpu(s) not responding\n", - ncpus - cpus_weight(cpus_in_crash)); - printk(KERN_EMERG "Activate soft-reset to stop other cpu(s)\n"); - cpus_in_sr = CPU_MASK_NONE; - atomic_set(&enter_on_soft_reset, 0); - while (cpus_weight(cpus_in_crash) < ncpus) - cpu_relax(); - } - /* - * Make sure all CPUs are entered via soft-reset if the kdump is - * invoked using soft-reset. + * IPI handler is already set by the panic cpu initially. Therefore, + * all cpus could invoke this handler from die() and the panic CPU + * will call machine_kexec() directly from this handler to do + * kexec boot. */ - if (cpu_isset(cpu, cpus_in_sr)) - crash_soft_reset_check(cpu); + if (atomic_read(&waiting_for_crash_ipi)) + printk(KERN_ALERT "done waiting: %d cpus not responding\n", + atomic_read(&waiting_for_crash_ipi)); /* Leave the IPI callback set */ } - -/* - * This function will be called by secondary cpus or by kexec cpu - * if soft-reset is activated to stop some CPUs. - */ -void crash_kexec_secondary(struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - unsigned long flags; - int msecs = 5; - - local_irq_save(flags); - /* Wait 5ms if the kexec CPU is not entered yet. */ - while (crashing_cpu < 0) { - if (--msecs < 0) { - /* - * Either kdump image is not loaded or - * kdump process is not started - Probably xmon - * exited using 'x'(exit and recover) or - * kexec_should_crash() failed for all running tasks. - */ - cpu_clear(cpu, cpus_in_sr); - local_irq_restore(flags); - return; - } - mdelay(1); - cpu_relax(); - } - if (cpu == crashing_cpu) { - /* - * Panic CPU will enter this func only via soft-reset. - * Wait until all secondary CPUs entered and - * then start kexec boot. - */ - crash_soft_reset_check(cpu); - cpu_set(crashing_cpu, cpus_in_crash); - if (ppc_md.kexec_cpu_down) - ppc_md.kexec_cpu_down(1, 0); - machine_kexec(kexec_crash_image); - /* NOTREACHED */ - } - crash_ipi_callback(regs); -} - #else -static void crash_kexec_prepare_cpus(int cpu) +static void crash_kexec_prepare_cpus(void) { /* * move the secondarys to us so that we can copy @@ -262,17 +168,9 @@ static void crash_kexec_prepare_cpus(int cpu) * * do this if kexec in setup.c ? */ -#ifdef CONFIG_PPC64 smp_release_cpus(); -#else - /* FIXME */ -#endif } -void crash_kexec_secondary(struct pt_regs *regs) -{ - cpus_in_sr = CPU_MASK_NONE; -} #endif void default_machine_crash_shutdown(struct pt_regs *regs) @@ -281,7 +179,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) /* * This function is only called after the system - * has panicked or is otherwise in a critical state. + * has paniced or is otherwise in a critical state. * The minimum amount of code to allow a kexec'd kernel * to run successfully needs to happen here. * @@ -292,23 +190,23 @@ void default_machine_crash_shutdown(struct pt_regs *regs) local_irq_disable(); for_each_irq(irq) { - struct irq_desc *desc = irq_desc + irq; + struct irq_desc *desc = irq_descp(irq); if (desc->status & IRQ_INPROGRESS) - desc->chip->eoi(irq); + desc->handler->end(irq); if (!(desc->status & IRQ_DISABLED)) - desc->chip->disable(irq); + desc->handler->disable(irq); } + if (ppc_md.kexec_cpu_down) + ppc_md.kexec_cpu_down(1, 0); + /* * Make a note of crashing cpu. Will be used in machine_kexec * such that another IPI will not be sent. */ crashing_cpu = smp_processor_id(); + crash_kexec_prepare_cpus(); crash_save_this_cpu(regs, crashing_cpu); - crash_kexec_prepare_cpus(crashing_cpu); - cpu_set(crashing_cpu, cpus_in_crash); - if (ppc_md.kexec_cpu_down) - ppc_md.kexec_cpu_down(1, 0); } diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 371973be8..764d07329 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c @@ -25,11 +25,6 @@ #define DBG(fmt...) #endif -void reserve_kdump_trampoline(void) -{ - lmb_reserve(0, KDUMP_RESERVE_LIMIT); -} - static void __init create_trampoline(unsigned long addr) { /* The maximum range of a single instruction branch, is the current @@ -44,11 +39,11 @@ static void __init create_trampoline(unsigned long addr) create_branch(addr + 4, addr + PHYSICAL_START, 0); } -void __init setup_kdump_trampoline(void) +void __init kdump_setup(void) { unsigned long i; - DBG(" -> setup_kdump_trampoline()\n"); + DBG(" -> kdump_setup()\n"); for (i = KDUMP_TRAMPOLINE_START; i < KDUMP_TRAMPOLINE_END; i += 8) { create_trampoline(i); @@ -57,7 +52,7 @@ void __init setup_kdump_trampoline(void) create_trampoline(__pa(system_reset_fwnmi) - PHYSICAL_START); create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START); - DBG(" <- setup_kdump_trampoline()\n"); + DBG(" <- kdump_setup()\n"); } #ifdef CONFIG_PROC_VMCORE diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c03e829fe..8866fd26c 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 54d9f5cda..19ad5c6b1 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -18,6 +18,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -56,7 +57,6 @@ system_call_common: beq- 1f ld r1,PACAKSAVE(r13) 1: std r10,0(r1) - crclr so std r11,_NIP(r1) std r12,_MSR(r1) std r0,GPR0(r1) @@ -75,6 +75,7 @@ system_call_common: std r11,GPR11(r1) std r11,GPR12(r1) std r9,GPR13(r1) + crclr so mfcr r9 mflr r10 li r11,0xc01 diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c index 1679a70bb..0bfe90617 100644 --- a/arch/powerpc/kernel/firmware.c +++ b/arch/powerpc/kernel/firmware.c @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 821e152e0..340730fb8 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S @@ -2,11 +2,6 @@ * FPU support code, moved here from head.S so that it can be used * by chips which use other head-whatever.S files. * - * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) - * Copyright (C) 1996 Cort Dougan - * Copyright (C) 1996 Paul Mackerras. - * Copyright (C) 1997 Dan Malek (dmalek@jlc.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 @@ -14,6 +9,7 @@ * */ +#include #include #include #include @@ -76,7 +72,7 @@ _GLOBAL(load_up_fpu) std r12,_MSR(r1) #endif lfd fr0,THREAD_FPSCR(r5) - MTFSF_L(fr0) + mtfsf 0xff,fr0 REST_32FPRS(0, r5) #ifndef CONFIG_SMP subi r4,r5,THREAD @@ -131,7 +127,7 @@ _GLOBAL(giveup_fpu) _GLOBAL(cvt_fd) lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ - MTFSF_L(0) + mtfsf 0xff,0 lfs 0,0(r3) stfd 0,0(r4) mffs 0 @@ -140,7 +136,7 @@ _GLOBAL(cvt_fd) _GLOBAL(cvt_df) lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ - MTFSF_L(0) + mtfsf 0xff,0 lfd 0,0(r3) stfs 0,0(r4) mffs 0 diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index d88e182e4..a0579e859 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -22,6 +22,7 @@ * */ +#include #include #include #include @@ -972,13 +973,6 @@ __secondary_start_gemini: b __secondary_start #endif /* CONFIG_GEMINI */ - .globl __secondary_start_mpc86xx -__secondary_start_mpc86xx: - mfspr r3, SPRN_PIR - stw r3, __secondary_hold_acknowledge@l(0) - mr r24, r3 /* cpu # */ - b __secondary_start - .globl __secondary_start_pmac_0 __secondary_start_pmac_0: /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */ @@ -1094,12 +1088,7 @@ load_up_mmu: LOAD_BAT(1,r3,r4,r5) LOAD_BAT(2,r3,r4,r5) LOAD_BAT(3,r3,r4,r5) -BEGIN_FTR_SECTION - LOAD_BAT(4,r3,r4,r5) - LOAD_BAT(5,r3,r4,r5) - LOAD_BAT(6,r3,r4,r5) - LOAD_BAT(7,r3,r4,r5) -END_FTR_SECTION_IFSET(CPU_FTR_HAS_HIGH_BATS) + blr /* diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index accb39d49..47c7fa148 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -28,6 +28,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/head_4xx.S b/arch/powerpc/kernel/head_4xx.S index adc7f8097..2590e97f5 100644 --- a/arch/powerpc/kernel/head_4xx.S +++ b/arch/powerpc/kernel/head_4xx.S @@ -31,6 +31,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 6ff3cf506..b7d140430 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -21,6 +21,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -84,6 +85,34 @@ END_FTR_SECTION(0, 1) /* Catch branch to 0 in real mode */ trap +#ifdef CONFIG_PPC_ISERIES + /* + * 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_map + * 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) + */ + .llong mschunks_map-KERNELBASE + .llong 0 /* pidhash-KERNELBASE SFRXXX */ + + /* Offset 0x38 - Pointer to start of embedded System.map */ + .globl embedded_sysmap_start +embedded_sysmap_start: + .llong 0 + /* Offset 0x40 - Pointer to end of embedded System.map */ + .globl embedded_sysmap_end +embedded_sysmap_end: + .llong 0 + +#endif /* CONFIG_PPC_ISERIES */ + /* Secondary processors spin on this value until it goes to 1. */ .globl __secondary_hold_spinloop __secondary_hold_spinloop: @@ -95,15 +124,6 @@ __secondary_hold_spinloop: __secondary_hold_acknowledge: .llong 0x0 -#ifdef CONFIG_PPC_ISERIES - /* - * At offset 0x20, there is a pointer to iSeries LPAR data. - * This is required by the hypervisor - */ - . = 0x20 - .llong hvReleaseData-KERNELBASE -#endif /* CONFIG_PPC_ISERIES */ - . = 0x60 /* * The following code is used on pSeries to hold secondary processors @@ -191,37 +211,6 @@ exception_marker: ori reg,reg,(label)@l; /* virt addr of handler ... */ #endif -/* - * Equal to EXCEPTION_PROLOG_PSERIES, except that it forces 64bit mode. - * The firmware calls the registered system_reset_fwnmi and - * machine_check_fwnmi handlers in 32bit mode if the cpu happens to run - * a 32bit application at the time of the event. - * This firmware bug is present on POWER4 and JS20. - */ -#define EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(area, label) \ - mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ - std r9,area+EX_R9(r13); /* save r9 - r12 */ \ - std r10,area+EX_R10(r13); \ - std r11,area+EX_R11(r13); \ - std r12,area+EX_R12(r13); \ - mfspr r9,SPRN_SPRG1; \ - std r9,area+EX_R13(r13); \ - mfcr r9; \ - clrrdi r12,r13,32; /* get high part of &label */ \ - mfmsr r10; \ - /* force 64bit mode */ \ - li r11,5; /* MSR_SF_LG|MSR_ISF_LG */ \ - rldimi r10,r11,61,0; /* insert into top 3 bits */ \ - /* done 64bit mode */ \ - mfspr r11,SPRN_SRR0; /* save SRR0 */ \ - LOAD_HANDLER(r12,label) \ - ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ - mtspr SPRN_SRR0,r12; \ - mfspr r12,SPRN_SRR1; /* and SRR1 */ \ - mtspr SPRN_SRR1,r10; \ - rfid; \ - b . /* prevent speculative execution */ - #define EXCEPTION_PROLOG_PSERIES(area, label) \ mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ std r9,area+EX_R9(r13); /* save r9 - r12 */ \ @@ -327,21 +316,6 @@ label##_pSeries: \ mtspr SPRN_SPRG1,r13; /* save r13 */ \ EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) -#define HSTD_EXCEPTION_PSERIES(n, label) \ - . = n; \ - .globl label##_pSeries; \ -label##_pSeries: \ - HMT_MEDIUM; \ - mtspr SPRN_SPRG1,r20; /* save r20 */ \ - mfspr r20,SPRN_HSRR0; /* copy HSRR0 to SRR0 */ \ - mtspr SPRN_SRR0,r20; \ - mfspr r20,SPRN_HSRR1; /* copy HSRR0 to SRR0 */ \ - mtspr SPRN_SRR1,r20; \ - mfspr r20,SPRN_SPRG1; /* restore r20 */ \ - mtspr SPRN_SPRG1,r13; /* save r13 */ \ - EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common) - - #define STD_EXCEPTION_ISERIES(n, label, area) \ .globl label##_iSeries; \ label##_iSeries: \ @@ -570,17 +544,8 @@ system_call_pSeries: STD_EXCEPTION_PSERIES(0xf20, altivec_unavailable) -#ifdef CONFIG_CBE_RAS - HSTD_EXCEPTION_PSERIES(0x1200, cbe_system_error) -#endif /* CONFIG_CBE_RAS */ STD_EXCEPTION_PSERIES(0x1300, instruction_breakpoint) -#ifdef CONFIG_CBE_RAS - HSTD_EXCEPTION_PSERIES(0x1600, cbe_maintenance) -#endif /* CONFIG_CBE_RAS */ STD_EXCEPTION_PSERIES(0x1700, altivec_assist) -#ifdef CONFIG_CBE_RAS - HSTD_EXCEPTION_PSERIES(0x1800, cbe_thermal) -#endif /* CONFIG_CBE_RAS */ . = 0x3000 @@ -635,14 +600,14 @@ slb_miss_user_pseries: system_reset_fwnmi: HMT_MEDIUM mtspr SPRN_SPRG1,r13 /* save r13 */ - EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXGEN, system_reset_common) + EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) .globl machine_check_fwnmi .align 7 machine_check_fwnmi: HMT_MEDIUM mtspr SPRN_SPRG1,r13 /* save r13 */ - EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) + EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) #ifdef CONFIG_PPC_ISERIES /*** ISeries-LPAR interrupt handlers ***/ @@ -862,11 +827,6 @@ machine_check_common: #else STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception) #endif -#ifdef CONFIG_CBE_RAS - STD_EXCEPTION_COMMON(0x1200, cbe_system_error, .cbe_system_error_exception) - STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, .cbe_maintenance_exception) - STD_EXCEPTION_COMMON(0x1800, cbe_thermal, .cbe_thermal_exception) -#endif /* CONFIG_CBE_RAS */ /* * Here we have detected that the kernel stack pointer is bad. @@ -1613,6 +1573,9 @@ _GLOBAL(__start_initialization_multiplatform) /* Setup some critical 970 SPRs before switching MMU off */ bl .__970_cpu_preinit + /* cpu # */ + li r24,0 + /* Switch off MMU if not already */ LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) add r4,r4,r30 @@ -1691,9 +1654,6 @@ _STATIC(__after_prom_start) /* i.e. where we are running */ /* the source addr */ - cmpdi r4,0 /* In some cases the loader may */ - beq .start_here_multiplatform /* have already put us at zero */ - /* so we can skip the copy. */ LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */ sub r5,r5,r27 @@ -1973,6 +1933,14 @@ _STATIC(start_here_common) li r3,0 bl .do_cpu_ftr_fixups + LOAD_REG_IMMEDIATE(r26, boot_cpuid) + lwz r26,0(r26) + + LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */ + mulli r13,r26,PACA_SIZE /* Calculate vaddr of right paca */ + add r13,r13,r24 /* for this processor. */ + mtspr SPRN_SPRG3,r13 + /* ptr to current */ LOAD_REG_IMMEDIATE(r4, init_task) std r4,PACACURRENT(r13) @@ -1998,6 +1966,17 @@ _STATIC(start_here_common) /* Not reached */ BUG_OPCODE +/* Put the paca pointer into r13 and SPRG3 */ +_GLOBAL(setup_boot_paca) + LOAD_REG_IMMEDIATE(r3, boot_cpuid) + lwz r3,0(r3) + LOAD_REG_IMMEDIATE(r4, paca) /* Get base vaddr of paca array */ + mulli r3,r3,PACA_SIZE /* Calculate vaddr of right paca */ + add r13,r3,r4 /* for this processor. */ + mtspr SPRN_SPRG3,r13 + + blr + /* * We put a few things here that have to be page-aligned. * This stuff goes at the beginning of the bss, which is page-aligned. diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 901be47a0..28941f5ce 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 66877bdfe..dd86bbed7 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S @@ -30,6 +30,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 68e5ab044..e47d40ac6 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c @@ -323,11 +323,13 @@ int ibmebus_request_irq(struct ibmebus_dev *dev, unsigned long irq_flags, const char * devname, void *dev_id) { - unsigned int irq = irq_create_mapping(NULL, ist); + unsigned int irq = virt_irq_create_mapping(ist); if (irq == NO_IRQ) return -EINVAL; + irq = irq_offset_up(irq); + return request_irq(irq, handler, irq_flags, devname, dev_id); } @@ -335,9 +337,12 @@ EXPORT_SYMBOL(ibmebus_request_irq); void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id) { - unsigned int irq = irq_find_mapping(NULL, ist); + unsigned int irq = virt_irq_create_mapping(ist); + irq = irq_offset_up(irq); free_irq(irq, dev_id); + + return; } EXPORT_SYMBOL(ibmebus_free_irq); diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 4180c3998..d491052c8 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c @@ -19,6 +19,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S index 01bcd52bb..b45fa0e37 100644 --- a/arch/powerpc/kernel/idle_6xx.S +++ b/arch/powerpc/kernel/idle_6xx.S @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index 30de81da7..d85c7c938 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S @@ -7,6 +7,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index a13a93dfc..fd8214cae 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c @@ -106,6 +106,8 @@ EXPORT_SYMBOL(iowrite32_rep); void __iomem *ioport_map(unsigned long port, unsigned int len) { + if (!_IO_IS_VALID(port)) + return NULL; return (void __iomem *) (port+pci_io_base); } diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index ba0694071..4eba60a32 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -23,6 +23,7 @@ */ +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #define DBG(...) @@ -418,11 +418,10 @@ void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, * Build a iommu_table structure. This contains a bit map which * is used to manage allocation of the tce space. */ -struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid) +struct iommu_table *iommu_init_table(struct iommu_table *tbl) { unsigned long sz; static int welcomed = 0; - struct page *page; /* Set aside 1/4 of the table for large allocations. */ tbl->it_halfpoint = tbl->it_size * 3 / 4; @@ -430,47 +429,18 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid) /* number of bytes needed for the bitmap */ sz = (tbl->it_size + 7) >> 3; - page = alloc_pages_node(nid, GFP_ATOMIC, get_order(sz)); - if (!page) + tbl->it_map = (unsigned long *)__get_free_pages(GFP_ATOMIC, get_order(sz)); + if (!tbl->it_map) panic("iommu_init_table: Can't allocate %ld bytes\n", sz); - tbl->it_map = page_address(page); + memset(tbl->it_map, 0, sz); tbl->it_hint = 0; tbl->it_largehint = tbl->it_halfpoint; spin_lock_init(&tbl->it_lock); -#ifdef CONFIG_CRASH_DUMP - if (ppc_md.tce_get) { - unsigned long index, tceval; - unsigned long tcecount = 0; - - /* - * Reserve the existing mappings left by the first kernel. - */ - for (index = 0; index < tbl->it_size; index++) { - tceval = ppc_md.tce_get(tbl, index + tbl->it_offset); - /* - * Freed TCE entry contains 0x7fffffffffffffff on JS20 - */ - if (tceval && (tceval != 0x7fffffffffffffffUL)) { - __set_bit(index, tbl->it_map); - tcecount++; - } - } - if ((tbl->it_size - tcecount) < KDUMP_MIN_TCE_ENTRIES) { - printk(KERN_WARNING "TCE table is full; "); - printk(KERN_WARNING "freeing %d entries for the kdump boot\n", - KDUMP_MIN_TCE_ENTRIES); - for (index = tbl->it_size - KDUMP_MIN_TCE_ENTRIES; - index < tbl->it_size; index++) - __clear_bit(index, tbl->it_map); - } - } -#else /* Clear the hardware table in case firmware left allocations in it */ ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size); -#endif if (!welcomed) { printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n", @@ -566,12 +536,11 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle, * to the dma address (mapping) of the first page. */ void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, - dma_addr_t *dma_handle, unsigned long mask, gfp_t flag, int node) + dma_addr_t *dma_handle, unsigned long mask, gfp_t flag) { void *ret = NULL; dma_addr_t mapping; unsigned int npages, order; - struct page *page; size = PAGE_ALIGN(size); npages = size >> PAGE_SHIFT; @@ -591,10 +560,9 @@ void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, return NULL; /* Alloc enough pages (and possibly more) */ - page = alloc_pages_node(node, flag, order); - if (!page) + ret = (void *)__get_free_pages(flag, order); + if (!ret) return NULL; - ret = page_address(page); memset(ret, 0, size); /* Set up tces to cover the allocated range */ @@ -602,9 +570,9 @@ void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, mask >> PAGE_SHIFT, order); if (mapping == DMA_ERROR_CODE) { free_pages((unsigned long)ret, order); - return NULL; - } - *dma_handle = mapping; + ret = NULL; + } else + *dma_handle = mapping; return ret; } diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 12c5971d6..57d560c68 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -29,8 +29,6 @@ * to reduce code space and undefined function references. */ -#undef DEBUG - #include #include #include @@ -40,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -48,10 +47,6 @@ #include #include #include -#include -#include -#include -#include #include #include @@ -62,38 +57,39 @@ #include #include #include -#include #ifdef CONFIG_PPC_ISERIES #include #endif int __irq_offset_value; -static int ppc_spurious_interrupts; - #ifdef CONFIG_PPC32 EXPORT_SYMBOL(__irq_offset_value); -atomic_t ppc_n_lost_interrupts; +#endif + +static int ppc_spurious_interrupts; -#ifndef CONFIG_PPC_MERGE +#ifdef CONFIG_PPC32 #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) + unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; -#endif +atomic_t ppc_n_lost_interrupts; #ifdef CONFIG_TAU_INT extern int tau_initialized; extern int tau_interrupts(int); #endif -#endif /* CONFIG_PPC32 */ #if defined(CONFIG_SMP) && !defined(CONFIG_PPC_MERGE) extern atomic_t ipi_recv; extern atomic_t ipi_sent; #endif +#endif /* CONFIG_PPC32 */ #ifdef CONFIG_PPC64 EXPORT_SYMBOL(irq_desc); int distribute_irqs = 1; +u64 ppc64_interrupt_controller; #endif /* CONFIG_PPC64 */ int show_interrupts(struct seq_file *p, void *v) @@ -123,8 +119,8 @@ int show_interrupts(struct seq_file *p, void *v) #else seq_printf(p, "%10u ", kstat_irqs(i)); #endif /* CONFIG_SMP */ - if (desc->chip) - seq_printf(p, " %s ", desc->chip->typename); + if (desc->handler) + seq_printf(p, " %s ", desc->handler->typename); else seq_puts(p, " None "); seq_printf(p, "%s", (desc->status & IRQ_LEVEL) ? "Level " : "Edge "); @@ -167,13 +163,13 @@ void fixup_irqs(cpumask_t map) if (irq_desc[irq].status & IRQ_PER_CPU) continue; - cpus_and(mask, irq_desc[irq].affinity, map); + cpus_and(mask, irq_affinity[irq], map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; } - if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity(irq, mask); + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); else if (irq_desc[irq].action && !(warned++)) printk("Cannot set affinity for irq %i\n", irq); } @@ -186,7 +182,7 @@ void fixup_irqs(cpumask_t map) void do_IRQ(struct pt_regs *regs) { - unsigned int irq; + int irq; #ifdef CONFIG_IRQSTACKS struct thread_info *curtp, *irqtp; #endif @@ -217,26 +213,22 @@ void do_IRQ(struct pt_regs *regs) */ irq = ppc_md.get_irq(regs); - if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) { + if (irq >= 0) { #ifdef CONFIG_IRQSTACKS /* Switch to the irq stack to handle this */ curtp = current_thread_info(); irqtp = hardirq_ctx[smp_processor_id()]; if (curtp != irqtp) { - struct irq_desc *desc = irq_desc + irq; - void *handler = desc->handle_irq; - if (handler == NULL) - handler = &__do_IRQ; irqtp->task = curtp->task; irqtp->flags = 0; - call_handle_irq(irq, desc, regs, irqtp, handler); + call___do_IRQ(irq, regs, irqtp); irqtp->task = NULL; if (irqtp->flags) set_bits(irqtp->flags, &curtp->flags); } else #endif - generic_handle_irq(irq, regs); - } else if (irq != NO_IRQ_IGNORE) + __do_IRQ(irq, regs); + } else if (irq != -2) /* That's not SMP safe ... but who cares ? */ ppc_spurious_interrupts++; @@ -253,643 +245,196 @@ void do_IRQ(struct pt_regs *regs) void __init init_IRQ(void) { - ppc_md.init_IRQ(); #ifdef CONFIG_PPC64 - irq_ctx_init(); -#endif -} - - -#ifdef CONFIG_IRQSTACKS -struct thread_info *softirq_ctx[NR_CPUS] __read_mostly; -struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly; - -void irq_ctx_init(void) -{ - struct thread_info *tp; - int i; - - for_each_possible_cpu(i) { - memset((void *)softirq_ctx[i], 0, THREAD_SIZE); - tp = softirq_ctx[i]; - tp->cpu = i; - tp->preempt_count = SOFTIRQ_OFFSET; - - memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); - tp = hardirq_ctx[i]; - tp->cpu = i; - tp->preempt_count = HARDIRQ_OFFSET; - } -} - -static inline void do_softirq_onstack(void) -{ - struct thread_info *curtp, *irqtp; - - curtp = current_thread_info(); - irqtp = softirq_ctx[smp_processor_id()]; - irqtp->task = curtp->task; - call_do_softirq(irqtp); - irqtp->task = NULL; -} - -#else -#define do_softirq_onstack() __do_softirq() -#endif /* CONFIG_IRQSTACKS */ - -void do_softirq(void) -{ - unsigned long flags; + static int once = 0; - if (in_interrupt()) + if (once) return; - local_irq_save(flags); + once++; - if (local_softirq_pending()) - do_softirq_onstack(); - - local_irq_restore(flags); +#endif + ppc_md.init_IRQ(); +#ifdef CONFIG_PPC64 + irq_ctx_init(); +#endif } -EXPORT_SYMBOL(do_softirq); - +#ifdef CONFIG_PPC64 /* - * IRQ controller and virtual interrupts + * Virtual IRQ mapping code, used on systems with XICS interrupt controllers. */ -#ifdef CONFIG_PPC_MERGE - -static LIST_HEAD(irq_hosts); -static spinlock_t irq_big_lock = SPIN_LOCK_UNLOCKED; -static DEFINE_PER_CPU(unsigned int, irq_radix_reader); -static unsigned int irq_radix_writer; -struct irq_map_entry irq_map[NR_IRQS]; -static unsigned int irq_virq_count = NR_IRQS; -static struct irq_host *irq_default_host; - -struct irq_host *irq_alloc_host(unsigned int revmap_type, - unsigned int revmap_arg, - struct irq_host_ops *ops, - irq_hw_number_t inval_irq) -{ - struct irq_host *host; - unsigned int size = sizeof(struct irq_host); - unsigned int i; - unsigned int *rmap; - unsigned long flags; - - /* Allocate structure and revmap table if using linear mapping */ - if (revmap_type == IRQ_HOST_MAP_LINEAR) - size += revmap_arg * sizeof(unsigned int); - if (mem_init_done) - host = kzalloc(size, GFP_KERNEL); - else { - host = alloc_bootmem(size); - if (host) - memset(host, 0, size); - } - if (host == NULL) - return NULL; - - /* Fill structure */ - host->revmap_type = revmap_type; - host->inval_irq = inval_irq; - host->ops = ops; - - spin_lock_irqsave(&irq_big_lock, flags); - - /* If it's a legacy controller, check for duplicates and - * mark it as allocated (we use irq 0 host pointer for that - */ - if (revmap_type == IRQ_HOST_MAP_LEGACY) { - if (irq_map[0].host != NULL) { - spin_unlock_irqrestore(&irq_big_lock, flags); - /* If we are early boot, we can't free the structure, - * too bad... - * this will be fixed once slab is made available early - * instead of the current cruft - */ - if (mem_init_done) - kfree(host); - return NULL; - } - irq_map[0].host = host; - } - - list_add(&host->link, &irq_hosts); - spin_unlock_irqrestore(&irq_big_lock, flags); - - /* Additional setups per revmap type */ - switch(revmap_type) { - case IRQ_HOST_MAP_LEGACY: - /* 0 is always the invalid number for legacy */ - host->inval_irq = 0; - /* setup us as the host for all legacy interrupts */ - for (i = 1; i < NUM_ISA_INTERRUPTS; i++) { - irq_map[i].hwirq = 0; - smp_wmb(); - irq_map[i].host = host; - smp_wmb(); - - /* Clear norequest flags */ - get_irq_desc(i)->status &= ~IRQ_NOREQUEST; - - /* Legacy flags are left to default at this point, - * one can then use irq_create_mapping() to - * explicitely change them - */ - ops->map(host, i, i); - } - break; - case IRQ_HOST_MAP_LINEAR: - rmap = (unsigned int *)(host + 1); - for (i = 0; i < revmap_arg; i++) - rmap[i] = IRQ_NONE; - host->revmap_data.linear.size = revmap_arg; - smp_wmb(); - host->revmap_data.linear.revmap = rmap; - break; - default: - break; - } - - pr_debug("irq: Allocated host of type %d @0x%p\n", revmap_type, host); - - return host; -} - -struct irq_host *irq_find_host(struct device_node *node) -{ - struct irq_host *h, *found = NULL; - unsigned long flags; - - /* We might want to match the legacy controller last since - * it might potentially be set to match all interrupts in - * the absence of a device node. This isn't a problem so far - * yet though... - */ - spin_lock_irqsave(&irq_big_lock, flags); - list_for_each_entry(h, &irq_hosts, link) - if (h->ops->match == NULL || h->ops->match(h, node)) { - found = h; - break; - } - spin_unlock_irqrestore(&irq_big_lock, flags); - return found; -} -EXPORT_SYMBOL_GPL(irq_find_host); - -void irq_set_default_host(struct irq_host *host) -{ - pr_debug("irq: Default host set to @0x%p\n", host); +#define UNDEFINED_IRQ 0xffffffff +unsigned int virt_irq_to_real_map[NR_IRQS]; - irq_default_host = host; -} - -void irq_set_virq_count(unsigned int count) -{ - pr_debug("irq: Trying to set virq count to %d\n", count); - - BUG_ON(count < NUM_ISA_INTERRUPTS); - if (count < NR_IRQS) - irq_virq_count = count; -} - -/* radix tree not lockless safe ! we use a brlock-type mecanism - * for now, until we can use a lockless radix tree +/* + * Don't use virtual irqs 0, 1, 2 for devices. + * The pcnet32 driver considers interrupt numbers < 2 to be invalid, + * and 2 is the XICS IPI interrupt. + * We limit virtual irqs to __irq_offet_value less than virt_irq_max so + * that when we offset them we don't end up with an interrupt + * number >= virt_irq_max. */ -static void irq_radix_wrlock(unsigned long *flags) -{ - unsigned int cpu, ok; +#define MIN_VIRT_IRQ 3 - spin_lock_irqsave(&irq_big_lock, *flags); - irq_radix_writer = 1; - smp_mb(); - do { - barrier(); - ok = 1; - for_each_possible_cpu(cpu) { - if (per_cpu(irq_radix_reader, cpu)) { - ok = 0; - break; - } - } - if (!ok) - cpu_relax(); - } while(!ok); -} +unsigned int virt_irq_max; +static unsigned int max_virt_irq; +static unsigned int nr_virt_irqs; -static void irq_radix_wrunlock(unsigned long flags) +void +virt_irq_init(void) { - smp_wmb(); - irq_radix_writer = 0; - spin_unlock_irqrestore(&irq_big_lock, flags); -} + int i; -static void irq_radix_rdlock(unsigned long *flags) -{ - local_irq_save(*flags); - __get_cpu_var(irq_radix_reader) = 1; - smp_mb(); - if (likely(irq_radix_writer == 0)) - return; - __get_cpu_var(irq_radix_reader) = 0; - smp_wmb(); - spin_lock(&irq_big_lock); - __get_cpu_var(irq_radix_reader) = 1; - spin_unlock(&irq_big_lock); -} + if ((virt_irq_max == 0) || (virt_irq_max > (NR_IRQS - 1))) + virt_irq_max = NR_IRQS - 1; + max_virt_irq = virt_irq_max - __irq_offset_value; + nr_virt_irqs = max_virt_irq - MIN_VIRT_IRQ + 1; -static void irq_radix_rdunlock(unsigned long flags) -{ - __get_cpu_var(irq_radix_reader) = 0; - local_irq_restore(flags); + for (i = 0; i < NR_IRQS; i++) + virt_irq_to_real_map[i] = UNDEFINED_IRQ; } - -unsigned int irq_create_mapping(struct irq_host *host, - irq_hw_number_t hwirq) +/* Create a mapping for a real_irq if it doesn't already exist. + * Return the virtual irq as a convenience. + */ +int virt_irq_create_mapping(unsigned int real_irq) { - unsigned int virq, hint; - - pr_debug("irq: irq_create_mapping(0x%p, 0x%lx)\n", host, hwirq); - - /* Look for default host if nececssary */ - if (host == NULL) - host = irq_default_host; - if (host == NULL) { - printk(KERN_WARNING "irq_create_mapping called for" - " NULL host, hwirq=%lx\n", hwirq); - WARN_ON(1); - return NO_IRQ; - } - pr_debug("irq: -> using host @%p\n", host); - - /* Check if mapping already exist, if it does, call - * host->ops->map() to update the flags - */ - virq = irq_find_mapping(host, hwirq); - if (virq != IRQ_NONE) { - pr_debug("irq: -> existing mapping on virq %d\n", virq); - return virq; - } + unsigned int virq, first_virq; + static int warned; - /* Get a virtual interrupt number */ - if (host->revmap_type == IRQ_HOST_MAP_LEGACY) { - /* Handle legacy */ - virq = (unsigned int)hwirq; - if (virq == 0 || virq >= NUM_ISA_INTERRUPTS) - return NO_IRQ; - return virq; - } else { - /* Allocate a virtual interrupt number */ - hint = hwirq % irq_virq_count; - virq = irq_alloc_virt(host, 1, hint); - if (virq == NO_IRQ) { - pr_debug("irq: -> virq allocation failed\n"); - return NO_IRQ; - } - } - pr_debug("irq: -> obtained virq %d\n", virq); - - /* Clear IRQ_NOREQUEST flag */ - get_irq_desc(virq)->status &= ~IRQ_NOREQUEST; - - /* map it */ - smp_wmb(); - irq_map[virq].hwirq = hwirq; - smp_mb(); - if (host->ops->map(host, virq, hwirq)) { - pr_debug("irq: -> mapping failed, freeing\n"); - irq_free_virt(virq, 1); - return NO_IRQ; - } - return virq; -} -EXPORT_SYMBOL_GPL(irq_create_mapping); + if (ppc64_interrupt_controller == IC_OPEN_PIC) + return real_irq; /* no mapping for openpic (for now) */ -extern unsigned int irq_create_of_mapping(struct device_node *controller, - u32 *intspec, unsigned int intsize) -{ - struct irq_host *host; - irq_hw_number_t hwirq; - unsigned int type = IRQ_TYPE_NONE; - unsigned int virq; + if (ppc64_interrupt_controller == IC_CELL_PIC) + return real_irq; /* no mapping for iic either */ - if (controller == NULL) - host = irq_default_host; - else - host = irq_find_host(controller); - if (host == NULL) { - printk(KERN_WARNING "irq: no irq host found for %s !\n", - controller->full_name); - return NO_IRQ; + /* don't map interrupts < MIN_VIRT_IRQ */ + if (real_irq < MIN_VIRT_IRQ) { + virt_irq_to_real_map[real_irq] = real_irq; + return real_irq; } - /* If host has no translation, then we assume interrupt line */ - if (host->ops->xlate == NULL) - hwirq = intspec[0]; - else { - if (host->ops->xlate(host, controller, intspec, intsize, - &hwirq, &type)) - return NO_IRQ; + /* map to a number between MIN_VIRT_IRQ and max_virt_irq */ + virq = real_irq; + if (virq > max_virt_irq) + virq = (virq % nr_virt_irqs) + MIN_VIRT_IRQ; + + /* search for this number or a free slot */ + first_virq = virq; + while (virt_irq_to_real_map[virq] != UNDEFINED_IRQ) { + if (virt_irq_to_real_map[virq] == real_irq) + return virq; + if (++virq > max_virt_irq) + virq = MIN_VIRT_IRQ; + if (virq == first_virq) + goto nospace; /* oops, no free slots */ } - /* Create mapping */ - virq = irq_create_mapping(host, hwirq); - if (virq == NO_IRQ) - return virq; - - /* Set type if specified and different than the current one */ - if (type != IRQ_TYPE_NONE && - type != (get_irq_desc(virq)->status & IRQF_TRIGGER_MASK)) - set_irq_type(virq, type); + virt_irq_to_real_map[virq] = real_irq; return virq; -} -EXPORT_SYMBOL_GPL(irq_create_of_mapping); - -unsigned int irq_of_parse_and_map(struct device_node *dev, int index) -{ - struct of_irq oirq; - - if (of_irq_map_one(dev, index, &oirq)) - return NO_IRQ; - - return irq_create_of_mapping(oirq.controller, oirq.specifier, - oirq.size); -} -EXPORT_SYMBOL_GPL(irq_of_parse_and_map); - -void irq_dispose_mapping(unsigned int virq) -{ - struct irq_host *host = irq_map[virq].host; - irq_hw_number_t hwirq; - unsigned long flags; - - WARN_ON (host == NULL); - if (host == NULL) - return; - /* Never unmap legacy interrupts */ - if (host->revmap_type == IRQ_HOST_MAP_LEGACY) - return; - - /* remove chip and handler */ - set_irq_chip_and_handler(virq, NULL, NULL); - - /* Make sure it's completed */ - synchronize_irq(virq); - - /* Tell the PIC about it */ - if (host->ops->unmap) - host->ops->unmap(host, virq); - smp_mb(); - - /* Clear reverse map */ - hwirq = irq_map[virq].hwirq; - switch(host->revmap_type) { - case IRQ_HOST_MAP_LINEAR: - if (hwirq < host->revmap_data.linear.size) - host->revmap_data.linear.revmap[hwirq] = IRQ_NONE; - break; - case IRQ_HOST_MAP_TREE: - /* Check if radix tree allocated yet */ - if (host->revmap_data.tree.gfp_mask == 0) - break; - irq_radix_wrlock(&flags); - radix_tree_delete(&host->revmap_data.tree, hwirq); - irq_radix_wrunlock(flags); - break; + nospace: + if (!warned) { + printk(KERN_CRIT "Interrupt table is full\n"); + printk(KERN_CRIT "Increase virt_irq_max (currently %d) " + "in your kernel sources and rebuild.\n", virt_irq_max); + warned = 1; } - - /* Destroy map */ - smp_mb(); - irq_map[virq].hwirq = host->inval_irq; - - /* Set some flags */ - get_irq_desc(virq)->status |= IRQ_NOREQUEST; - - /* Free it */ - irq_free_virt(virq, 1); -} -EXPORT_SYMBOL_GPL(irq_dispose_mapping); - -unsigned int irq_find_mapping(struct irq_host *host, - irq_hw_number_t hwirq) -{ - unsigned int i; - unsigned int hint = hwirq % irq_virq_count; - - /* Look for default host if nececssary */ - if (host == NULL) - host = irq_default_host; - if (host == NULL) - return NO_IRQ; - - /* legacy -> bail early */ - if (host->revmap_type == IRQ_HOST_MAP_LEGACY) - return hwirq; - - /* Slow path does a linear search of the map */ - if (hint < NUM_ISA_INTERRUPTS) - hint = NUM_ISA_INTERRUPTS; - i = hint; - do { - if (irq_map[i].host == host && - irq_map[i].hwirq == hwirq) - return i; - i++; - if (i >= irq_virq_count) - i = NUM_ISA_INTERRUPTS; - } while(i != hint); return NO_IRQ; } -EXPORT_SYMBOL_GPL(irq_find_mapping); - -unsigned int irq_radix_revmap(struct irq_host *host, - irq_hw_number_t hwirq) +/* + * In most cases will get a hit on the very first slot checked in the + * virt_irq_to_real_map. Only when there are a large number of + * IRQs will this be expensive. + */ +unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) { - struct radix_tree_root *tree; - struct irq_map_entry *ptr; unsigned int virq; - unsigned long flags; + unsigned int first_virq; - WARN_ON(host->revmap_type != IRQ_HOST_MAP_TREE); + virq = real_irq; - /* Check if the radix tree exist yet. We test the value of - * the gfp_mask for that. Sneaky but saves another int in the - * structure. If not, we fallback to slow mode - */ - tree = &host->revmap_data.tree; - if (tree->gfp_mask == 0) - return irq_find_mapping(host, hwirq); - - /* Now try to resolve */ - irq_radix_rdlock(&flags); - ptr = radix_tree_lookup(tree, hwirq); - irq_radix_rdunlock(flags); - - /* Found it, return */ - if (ptr) { - virq = ptr - irq_map; - return virq; - } + if (virq > max_virt_irq) + virq = (virq % nr_virt_irqs) + MIN_VIRT_IRQ; - /* If not there, try to insert it */ - virq = irq_find_mapping(host, hwirq); - if (virq != NO_IRQ) { - irq_radix_wrlock(&flags); - radix_tree_insert(tree, hwirq, &irq_map[virq]); - irq_radix_wrunlock(flags); - } - return virq; -} + first_virq = virq; -unsigned int irq_linear_revmap(struct irq_host *host, - irq_hw_number_t hwirq) -{ - unsigned int *revmap; + do { + if (virt_irq_to_real_map[virq] == real_irq) + return virq; - WARN_ON(host->revmap_type != IRQ_HOST_MAP_LINEAR); + virq++; - /* Check revmap bounds */ - if (unlikely(hwirq >= host->revmap_data.linear.size)) - return irq_find_mapping(host, hwirq); + if (virq >= max_virt_irq) + virq = 0; - /* Check if revmap was allocated */ - revmap = host->revmap_data.linear.revmap; - if (unlikely(revmap == NULL)) - return irq_find_mapping(host, hwirq); + } while (first_virq != virq); - /* Fill up revmap with slow path if no mapping found */ - if (unlikely(revmap[hwirq] == NO_IRQ)) - revmap[hwirq] = irq_find_mapping(host, hwirq); + return NO_IRQ; - return revmap[hwirq]; } +#endif /* CONFIG_PPC64 */ -unsigned int irq_alloc_virt(struct irq_host *host, - unsigned int count, - unsigned int hint) -{ - unsigned long flags; - unsigned int i, j, found = NO_IRQ; - unsigned int limit = irq_virq_count - count; - - if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS)) - return NO_IRQ; - - spin_lock_irqsave(&irq_big_lock, flags); - - /* Use hint for 1 interrupt if any */ - if (count == 1 && hint >= NUM_ISA_INTERRUPTS && - hint < irq_virq_count && irq_map[hint].host == NULL) { - found = hint; - goto hint_found; - } - - /* Look for count consecutive numbers in the allocatable - * (non-legacy) space - */ - for (i = NUM_ISA_INTERRUPTS; i <= limit; ) { - for (j = i; j < (i + count); j++) - if (irq_map[j].host != NULL) { - i = j + 1; - continue; - } - found = i; - break; - } - if (found == NO_IRQ) { - spin_unlock_irqrestore(&irq_big_lock, flags); - return NO_IRQ; - } - hint_found: - for (i = found; i < (found + count); i++) { - irq_map[i].hwirq = host->inval_irq; - smp_wmb(); - irq_map[i].host = host; - } - spin_unlock_irqrestore(&irq_big_lock, flags); - return found; -} +#ifdef CONFIG_IRQSTACKS +struct thread_info *softirq_ctx[NR_CPUS]; +struct thread_info *hardirq_ctx[NR_CPUS]; -void irq_free_virt(unsigned int virq, unsigned int count) +void irq_ctx_init(void) { - unsigned long flags; - unsigned int i; - - WARN_ON (virq < NUM_ISA_INTERRUPTS); - WARN_ON (count == 0 || (virq + count) > irq_virq_count); - - spin_lock_irqsave(&irq_big_lock, flags); - for (i = virq; i < (virq + count); i++) { - struct irq_host *host; + struct thread_info *tp; + int i; - if (i < NUM_ISA_INTERRUPTS || - (virq + count) > irq_virq_count) - continue; + for_each_possible_cpu(i) { + memset((void *)softirq_ctx[i], 0, THREAD_SIZE); + tp = softirq_ctx[i]; + tp->cpu = i; + tp->preempt_count = SOFTIRQ_OFFSET; - host = irq_map[i].host; - irq_map[i].hwirq = host->inval_irq; - smp_wmb(); - irq_map[i].host = NULL; + memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); + tp = hardirq_ctx[i]; + tp->cpu = i; + tp->preempt_count = HARDIRQ_OFFSET; } - spin_unlock_irqrestore(&irq_big_lock, flags); } -void irq_early_init(void) +static inline void do_softirq_onstack(void) { - unsigned int i; + struct thread_info *curtp, *irqtp; - for (i = 0; i < NR_IRQS; i++) - get_irq_desc(i)->status |= IRQ_NOREQUEST; + curtp = current_thread_info(); + irqtp = softirq_ctx[smp_processor_id()]; + irqtp->task = curtp->task; + call_do_softirq(irqtp); + irqtp->task = NULL; } -/* We need to create the radix trees late */ -static int irq_late_init(void) +#else +#define do_softirq_onstack() __do_softirq() +#endif /* CONFIG_IRQSTACKS */ + +void do_softirq(void) { - struct irq_host *h; unsigned long flags; - irq_radix_wrlock(&flags); - list_for_each_entry(h, &irq_hosts, link) { - if (h->revmap_type == IRQ_HOST_MAP_TREE) - INIT_RADIX_TREE(&h->revmap_data.tree, GFP_ATOMIC); - } - irq_radix_wrunlock(flags); - - return 0; -} -arch_initcall(irq_late_init); + if (in_interrupt()) + return; -#endif /* CONFIG_PPC_MERGE */ + local_irq_save(flags); -#ifdef CONFIG_PCI_MSI -int pci_enable_msi(struct pci_dev * pdev) -{ - if (ppc_md.enable_msi) - return ppc_md.enable_msi(pdev); - else - return -1; -} + if (local_softirq_pending()) { + account_system_vtime(current); + local_bh_disable(); + do_softirq_onstack(); + account_system_vtime(current); + __local_bh_enable(); + } -void pci_disable_msi(struct pci_dev * pdev) -{ - if (ppc_md.disable_msi) - ppc_md.disable_msi(pdev); + local_irq_restore(flags); } - -void pci_scan_msi_device(struct pci_dev *dev) {} -int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) {return -1;} -void pci_disable_msix(struct pci_dev *dev) {} -void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} -void disable_msi_mode(struct pci_dev *dev, int pos, int type) {} -void pci_no_msi(void) {} - -#endif +EXPORT_SYMBOL(do_softirq); #ifdef CONFIG_PPC64 static int __init setup_noirqdistrib(char *str) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index cd65c367b..f78866367 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -26,6 +26,7 @@ * for PPC64 */ +#include #include #include #include @@ -61,8 +62,6 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) if (!ret) { memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); p->opcode = *p->addr; - flush_icache_range((unsigned long)p->ainsn.insn, - (unsigned long)p->ainsn.insn + sizeof(kprobe_opcode_t)); } return ret; diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S index 858f28ac8..d7f4e982b 100644 --- a/arch/powerpc/kernel/l2cr_6xx.S +++ b/arch/powerpc/kernel/l2cr_6xx.S @@ -40,6 +40,7 @@ Author: Terry Greeniaus (tgree@phys.ualberta.ca) Please e-mail updates to this file to me, thanks! */ +#include #include #include #include diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 40a392918..6e67b5b49 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -28,7 +29,6 @@ static struct legacy_serial_info { struct device_node *np; unsigned int speed; unsigned int clock; - int irq_check_parent; phys_addr_t taddr; } legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS]; static unsigned int legacy_serial_count; @@ -37,7 +37,7 @@ static int legacy_serial_console = -1; static int __init add_legacy_port(struct device_node *np, int want_index, int iotype, phys_addr_t base, phys_addr_t taddr, unsigned long irq, - upf_t flags, int irq_check_parent) + upf_t flags) { u32 *clk, *spd, clock = BASE_BAUD * 16; int index; @@ -69,7 +69,7 @@ static int __init add_legacy_port(struct device_node *np, int want_index, if (legacy_serial_infos[index].np != 0) { /* if we still have some room, move it, else override */ if (legacy_serial_count < MAX_LEGACY_SERIAL_PORTS) { - printk(KERN_DEBUG "Moved legacy port %d -> %d\n", + printk(KERN_INFO "Moved legacy port %d -> %d\n", index, legacy_serial_count); legacy_serial_ports[legacy_serial_count] = legacy_serial_ports[index]; @@ -77,7 +77,7 @@ static int __init add_legacy_port(struct device_node *np, int want_index, legacy_serial_infos[index]; legacy_serial_count++; } else { - printk(KERN_DEBUG "Replacing legacy port %d\n", index); + printk(KERN_INFO "Replacing legacy port %d\n", index); } } @@ -96,11 +96,10 @@ static int __init add_legacy_port(struct device_node *np, int want_index, legacy_serial_infos[index].np = of_node_get(np); legacy_serial_infos[index].clock = clock; legacy_serial_infos[index].speed = spd ? *spd : 0; - legacy_serial_infos[index].irq_check_parent = irq_check_parent; - printk(KERN_DEBUG "Found legacy serial port %d for %s\n", + printk(KERN_INFO "Found legacy serial port %d for %s\n", index, np->full_name); - printk(KERN_DEBUG " %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n", + printk(KERN_INFO " %s=%llx, taddr=%llx, irq=%lx, clk=%d, speed=%d\n", (iotype == UPIO_PORT) ? "port" : "mem", (unsigned long long)base, (unsigned long long)taddr, irq, legacy_serial_ports[index].uartclk, @@ -112,10 +111,9 @@ static int __init add_legacy_port(struct device_node *np, int want_index, static int __init add_legacy_soc_port(struct device_node *np, struct device_node *soc_dev) { - u64 addr; + phys_addr_t addr; u32 *addrp; upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; - struct device_node *tsi = of_get_parent(np); /* We only support ports that have a clock frequency properly * encoded in the device-tree. @@ -129,16 +127,11 @@ static int __init add_legacy_soc_port(struct device_node *np, return -1; addr = of_translate_address(soc_dev, addrp); - if (addr == OF_BAD_ADDR) - return -1; /* Add port, irq will be dealt with later. We passed a translated * IO port value. It will be fixed up later along with the irq */ - if (tsi && !strcmp(tsi->type, "tsi-bridge")) - return add_legacy_port(np, -1, UPIO_TSI, addr, addr, NO_IRQ, flags, 0); - else - return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags, 0); + return add_legacy_port(np, -1, UPIO_MEM, addr, addr, NO_IRQ, flags); } static int __init add_legacy_isa_port(struct device_node *np, @@ -147,9 +140,7 @@ static int __init add_legacy_isa_port(struct device_node *np, u32 *reg; char *typep; int index = -1; - u64 taddr; - - DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); + phys_addr_t taddr; /* Get the ISA port number */ reg = (u32 *)get_property(np, "reg", NULL); @@ -169,17 +160,11 @@ static int __init add_legacy_isa_port(struct device_node *np, if (typep && *typep == 'S') index = simple_strtol(typep+1, NULL, 0) - 1; - /* Translate ISA address. If it fails, we still register the port - * with no translated address so that it can be picked up as an IO - * port later by the serial driver - */ + /* Translate ISA address */ taddr = of_translate_address(np, reg); - if (taddr == OF_BAD_ADDR) - taddr = 0; /* Add port, irq will be dealt with later */ - return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, - NO_IRQ, UPF_BOOT_AUTOCONF, 0); + return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, NO_IRQ, UPF_BOOT_AUTOCONF); } @@ -187,13 +172,11 @@ static int __init add_legacy_isa_port(struct device_node *np, static int __init add_legacy_pci_port(struct device_node *np, struct device_node *pci_dev) { - u64 addr, base; + phys_addr_t addr, base; u32 *addrp; unsigned int flags; int iotype, index = -1, lindex = 0; - DBG(" -> add_legacy_pci_port(%s)\n", np->full_name); - /* We only support ports that have a clock frequency properly * encoded in the device-tree (that is have an fcode). Anything * else can't be used that early and will be normally probed by @@ -212,8 +195,6 @@ static int __init add_legacy_pci_port(struct device_node *np, /* We only support BAR 0 for now */ iotype = (flags & IORESOURCE_MEM) ? UPIO_MEM : UPIO_PORT; addr = of_translate_address(pci_dev, addrp); - if (addr == OF_BAD_ADDR) - return -1; /* Set the IO base to the same as the translated address for MMIO, * or to the domain local IO base for PIO (it will be fixed up later) @@ -251,8 +232,7 @@ static int __init add_legacy_pci_port(struct device_node *np, /* Add port, irq will be dealt with later. We passed a translated * IO port value. It will be fixed up later along with the irq */ - return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, - UPF_BOOT_AUTOCONF, np != pci_dev); + return add_legacy_port(np, index, iotype, base, addr, NO_IRQ, UPF_BOOT_AUTOCONF); } #endif @@ -322,17 +302,6 @@ void __init find_legacy_serial_ports(void) of_node_put(isa); } - /* First fill our array with tsi-bridge ports */ - for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { - struct device_node *tsi = of_get_parent(np); - if (tsi && !strcmp(tsi->type, "tsi-bridge")) { - index = add_legacy_soc_port(np, np); - if (index >= 0 && np == stdout) - legacy_serial_console = index; - } - of_node_put(tsi); - } - #ifdef CONFIG_PCI /* Next, try to locate PCI ports */ for (np = NULL; (np = of_find_all_nodes(np));) { @@ -383,22 +352,27 @@ static void __init fixup_port_irq(int index, struct device_node *np, struct plat_serial8250_port *port) { - unsigned int virq; - DBG("fixup_port_irq(%d)\n", index); - virq = irq_of_parse_and_map(np, 0); - if (virq == NO_IRQ && legacy_serial_infos[index].irq_check_parent) { - np = of_get_parent(np); - if (np == NULL) - return; - virq = irq_of_parse_and_map(np, 0); - of_node_put(np); + /* Check for interrupts in that node */ + if (np->n_intrs > 0) { + port->irq = np->intrs[0].line; + DBG(" port %d (%s), irq=%d\n", + index, np->full_name, port->irq); + return; } - if (virq == NO_IRQ) + + /* Check for interrupts in the parent */ + np = of_get_parent(np); + if (np == NULL) return; - port->irq = virq; + if (np->n_intrs > 0) { + port->irq = np->intrs[0].line; + DBG(" port %d (%s), irq=%d\n", + index, np->full_name, port->irq); + } + of_node_put(np); } static void __init fixup_port_pio(int index, @@ -468,7 +442,7 @@ static int __init serial_dev_init(void) fixup_port_irq(i, np, port); if (port->iotype == UPIO_PORT) fixup_port_pio(i, np, port); - if ((port->iotype == UPIO_MEM) || (port->iotype == UPIO_TSI)) + if (port->iotype == UPIO_MEM) fixup_port_mmio(i, np, port); } diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 23f34daa0..2cbde865d 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -18,6 +18,7 @@ * keyword - value pairs that specify the configuration of the partition. */ +#include #include #include #include @@ -44,9 +45,11 @@ static struct proc_dir_entry *proc_ppc64_lparcfg; #define LPARCFG_BUFF_SIZE 4096 +#ifdef CONFIG_PPC_ISERIES + /* - * Track sum of all purrs across all processors. This is used to further - * calculate usage values by different applications + * For iSeries legacy systems, the PPA purr function is available from the + * emulated_time_base field in the paca. */ static unsigned long get_purr(void) { @@ -54,31 +57,48 @@ static unsigned long get_purr(void) int cpu; for_each_possible_cpu(cpu) { - if (firmware_has_feature(FW_FEATURE_ISERIES)) - sum_purr += lppaca[cpu].emulated_time_base; - else { - struct cpu_usage *cu; + sum_purr += lppaca[cpu].emulated_time_base; - cu = &per_cpu(cpu_usage_array, cpu); - sum_purr += cu->current_tb; - } +#ifdef PURR_DEBUG + printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n", + cpu, lppaca[cpu].emulated_time_base); +#endif } return sum_purr; } -#ifdef CONFIG_PPC_ISERIES +#define lparcfg_write NULL /* * Methods used to fetch LPAR data when running on an iSeries platform. */ -static int iseries_lparcfg_data(struct seq_file *m, void *v) +static int lparcfg_data(struct seq_file *m, void *v) { - unsigned long pool_id; + unsigned long pool_id, lp_index; int shared, entitled_capacity, max_entitled_capacity; int processors, max_processors; unsigned long purr = get_purr(); + seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); + shared = (int)(get_lppaca()->shared_proc); + seq_printf(m, "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])); + + seq_printf(m, "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(); + seq_printf(m, "partition_id=%d\n", (int)lp_index); seq_printf(m, "system_active_processors=%d\n", (int)HvLpConfig_getSystemPhysicalProcessors()); @@ -117,14 +137,6 @@ static int iseries_lparcfg_data(struct seq_file *m, void *v) return 0; } - -#else /* CONFIG_PPC_ISERIES */ - -static int iseries_lparcfg_data(struct seq_file *m, void *v) -{ - return 0; -} - #endif /* CONFIG_PPC_ISERIES */ #ifdef CONFIG_PPC_PSERIES @@ -201,6 +213,22 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs) log_plpar_hcall_return(rc, "H_PIC"); } +/* Track sum of all purrs across all processors. This is used to further */ +/* calculate usage values by different applications */ + +static unsigned long get_purr(void) +{ + unsigned long sum_purr = 0; + int cpu; + struct cpu_usage *cu; + + for_each_possible_cpu(cpu) { + cu = &per_cpu(cpu_usage_array, cpu); + sum_purr += cu->current_tb; + } + return sum_purr; +} + #define SPLPAR_CHARACTERISTICS_TOKEN 20 #define SPLPAR_MAXLENGTH 1026*(sizeof(char)) @@ -305,13 +333,35 @@ static int lparcfg_count_active_processors(void) return count; } -static int pseries_lparcfg_data(struct seq_file *m, void *v) +static int lparcfg_data(struct seq_file *m, void *v) { int partition_potential_processors; int partition_active_processors; + struct device_node *rootdn; + const char *model = ""; + const char *system_id = ""; + unsigned int *lp_index_ptr, lp_index = 0; struct device_node *rtas_node; int *lrdrp = NULL; + rootdn = find_path_device("/"); + if (rootdn) { + model = get_property(rootdn, "model", NULL); + system_id = get_property(rootdn, "system-id", NULL); + lp_index_ptr = (unsigned int *) + get_property(rootdn, "ibm,partition-no", NULL); + if (lp_index_ptr) + lp_index = *lp_index_ptr; + } + + seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); + + seq_printf(m, "serial_number=%s\n", system_id); + + seq_printf(m, "system_type=%s\n", model); + + seq_printf(m, "partition_id=%d\n", (int)lp_index); + rtas_node = find_path_device("/rtas"); if (rtas_node) lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", @@ -471,10 +521,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf, current_weight = (resource >> 5 * 8) & 0xFF; - pr_debug("%s: current_entitled = %lu, current_weight = %u\n", + pr_debug("%s: current_entitled = %lu, current_weight = %lu\n", __FUNCTION__, current_entitled, current_weight); - pr_debug("%s: new_entitled = %lu, new_weight = %u\n", + pr_debug("%s: new_entitled = %lu, new_weight = %lu\n", __FUNCTION__, *new_entitled_ptr, *new_weight_ptr); retval = plpar_hcall_norets(H_SET_PPP, *new_entitled_ptr, @@ -499,61 +549,8 @@ out: return retval; } -#else /* CONFIG_PPC_PSERIES */ - -static int pseries_lparcfg_data(struct seq_file *m, void *v) -{ - return 0; -} - -static ssize_t lparcfg_write(struct file *file, const char __user * buf, - size_t count, loff_t * off) -{ - return count; -} - #endif /* CONFIG_PPC_PSERIES */ -static int lparcfg_data(struct seq_file *m, void *v) -{ - struct device_node *rootdn; - const char *model = ""; - const char *system_id = ""; - const char *tmp; - unsigned int *lp_index_ptr, lp_index = 0; - - seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS); - - rootdn = find_path_device("/"); - if (rootdn) { - tmp = get_property(rootdn, "model", NULL); - if (tmp) { - model = tmp; - /* Skip "IBM," - see platforms/iseries/dt.c */ - if (firmware_has_feature(FW_FEATURE_ISERIES)) - model += 4; - } - tmp = get_property(rootdn, "system-id", NULL); - if (tmp) { - system_id = tmp; - /* Skip "IBM," - see platforms/iseries/dt.c */ - if (firmware_has_feature(FW_FEATURE_ISERIES)) - system_id += 4; - } - lp_index_ptr = (unsigned int *) - get_property(rootdn, "ibm,partition-no", NULL); - if (lp_index_ptr) - lp_index = *lp_index_ptr; - } - seq_printf(m, "serial_number=%s\n", system_id); - seq_printf(m, "system_type=%s\n", model); - seq_printf(m, "partition_id=%d\n", (int)lp_index); - - if (firmware_has_feature(FW_FEATURE_ISERIES)) - return iseries_lparcfg_data(m, v); - return pseries_lparcfg_data(m, v); -} - static int lparcfg_open(struct inode *inode, struct file *file) { return single_open(file, lparcfg_data, NULL); @@ -572,8 +569,7 @@ int __init lparcfg_init(void) mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; /* Allow writing if we have FW_FEATURE_SPLPAR */ - if (firmware_has_feature(FW_FEATURE_SPLPAR) && - !firmware_has_feature(FW_FEATURE_ISERIES)) { + if (firmware_has_feature(FW_FEATURE_SPLPAR)) { lparcfg_fops.write = lparcfg_write; mode |= S_IWUSR; } diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index e60a0c544..a81ca1b84 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c @@ -13,7 +13,6 @@ #include #include #include -#include void machine_crash_shutdown(struct pt_regs *regs) { @@ -60,58 +59,3 @@ NORET_TYPE void machine_kexec(struct kimage *image) } for(;;); } - -static int __init early_parse_crashk(char *p) -{ - unsigned long size; - - if (!p) - return 1; - - size = memparse(p, &p); - - if (*p == '@') - crashk_res.start = memparse(p + 1, &p); - else - crashk_res.start = KDUMP_KERNELBASE; - - crashk_res.end = crashk_res.start + size - 1; - - return 0; -} -early_param("crashkernel", early_parse_crashk); - -void __init reserve_crashkernel(void) -{ - unsigned long size; - - if (crashk_res.start == 0) - return; - - /* We might have got these values via the command line or the - * device tree, either way sanitise them now. */ - - size = crashk_res.end - crashk_res.start + 1; - - if (crashk_res.start != KDUMP_KERNELBASE) - printk("Crash kernel location must be 0x%x\n", - KDUMP_KERNELBASE); - - crashk_res.start = KDUMP_KERNELBASE; - size = PAGE_ALIGN(size); - crashk_res.end = crashk_res.start + size - 1; - - /* Crash kernel trumps memory limit */ - if (memory_limit && memory_limit <= crashk_res.end) { - memory_limit = crashk_res.end + 1; - printk("Adjusted memory limit for crashkernel, now 0x%lx\n", - memory_limit); - } - - lmb_reserve(crashk_res.start, size); -} - -int overlaps_crashkernel(unsigned long start, unsigned long size) -{ - return (start + size) > crashk_res.start && start <= crashk_res.end; -} diff --git a/arch/powerpc/kernel/machine_kexec_32.c b/arch/powerpc/kernel/machine_kexec_32.c index cbaa34196..443606134 100644 --- a/arch/powerpc/kernel/machine_kexec_32.c +++ b/arch/powerpc/kernel/machine_kexec_32.c @@ -30,8 +30,8 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)( */ void default_machine_kexec(struct kimage *image) { - extern const unsigned char relocate_new_kernel[]; - extern const unsigned int relocate_new_kernel_size; + const extern unsigned char relocate_new_kernel[]; + const extern unsigned int relocate_new_kernel_size; unsigned long page_list; unsigned long reboot_code_buffer, reboot_code_buffer_phys; relocate_new_kernel_t rnk; diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index be58985c7..ee166c586 100644 --- a/arch/powerpc/kernel/machine_kexec_64.c +++ b/arch/powerpc/kernel/machine_kexec_64.c @@ -10,6 +10,7 @@ */ +#include #include #include #include @@ -334,52 +335,7 @@ static void __init export_htab_values(void) of_node_put(node); } -static struct property crashk_base_prop = { - .name = "linux,crashkernel-base", - .length = sizeof(unsigned long), - .value = (unsigned char *)&crashk_res.start, -}; - -static unsigned long crashk_size; - -static struct property crashk_size_prop = { - .name = "linux,crashkernel-size", - .length = sizeof(unsigned long), - .value = (unsigned char *)&crashk_size, -}; - -static void __init export_crashk_values(void) -{ - struct device_node *node; - struct property *prop; - - node = of_find_node_by_path("/chosen"); - if (!node) - return; - - /* There might be existing crash kernel properties, but we can't - * be sure what's in them, so remove them. */ - prop = of_find_property(node, "linux,crashkernel-base", NULL); - if (prop) - prom_remove_property(node, prop); - - prop = of_find_property(node, "linux,crashkernel-size", NULL); - if (prop) - prom_remove_property(node, prop); - - if (crashk_res.start != 0) { - prom_add_property(node, &crashk_base_prop); - crashk_size = crashk_res.end - crashk_res.start + 1; - prom_add_property(node, &crashk_size_prop); - } - - of_node_put(node); -} - -static int __init kexec_setup(void) +void __init kexec_setup(void) { export_htab_values(); - export_crashk_values(); - return 0; } -__initcall(kexec_setup); diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S deleted file mode 100644 index f770805f1..000000000 --- a/arch/powerpc/kernel/misc.S +++ /dev/null @@ -1,204 +0,0 @@ -/* - * This file contains miscellaneous low-level functions. - * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) - * - * Largely rewritten by Cort Dougan (cort@cs.nmt.edu) - * and Paul Mackerras. - * - * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com) - * PPC64 updates by Dave Engebretsen (engebret@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 - - .text - -/* - * Returns (address we are running at) - (address we were linked at) - * for use before the text and data are mapped to KERNELBASE. - */ - -_GLOBAL(reloc_offset) - mflr r0 - bl 1f -1: mflr r3 - LOAD_REG_IMMEDIATE(r4,1b) - subf r3,r4,r3 - mtlr r0 - blr - -/* - * add_reloc_offset(x) returns x + reloc_offset(). - */ -_GLOBAL(add_reloc_offset) - mflr r0 - bl 1f -1: mflr r5 - LOAD_REG_IMMEDIATE(r4,1b) - subf r5,r4,r5 - add r3,r3,r5 - mtlr r0 - blr - -/* - * I/O string operations - * - * insb(port, buf, len) - * outsb(port, buf, len) - * insw(port, buf, len) - * outsw(port, buf, len) - * insl(port, buf, len) - * outsl(port, buf, len) - * insw_ns(port, buf, len) - * outsw_ns(port, buf, len) - * insl_ns(port, buf, len) - * outsl_ns(port, buf, len) - * - * The *_ns versions don't do byte-swapping. - */ -_GLOBAL(_insb) - sync - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,1 - blelr- -00: lbz r5,0(r3) - eieio - stbu r5,1(r4) - bdnz 00b - twi 0,r5,0 - isync - blr - -_GLOBAL(_outsb) - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,1 - blelr- - sync -00: lbzu r5,1(r4) - stb r5,0(r3) - bdnz 00b - sync - blr - -_GLOBAL(_insw) - sync - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,2 - blelr- -00: lhbrx r5,0,r3 - eieio - sthu r5,2(r4) - bdnz 00b - twi 0,r5,0 - isync - blr - -_GLOBAL(_outsw) - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,2 - blelr- - sync -00: lhzu r5,2(r4) - sthbrx r5,0,r3 - bdnz 00b - sync - blr - -_GLOBAL(_insl) - sync - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,4 - blelr- -00: lwbrx r5,0,r3 - eieio - stwu r5,4(r4) - bdnz 00b - twi 0,r5,0 - isync - blr - -_GLOBAL(_outsl) - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,4 - blelr- - sync -00: lwzu r5,4(r4) - stwbrx r5,0,r3 - bdnz 00b - sync - blr - -#ifdef CONFIG_PPC32 -_GLOBAL(__ide_mm_insw) -#endif -_GLOBAL(_insw_ns) - sync - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,2 - blelr- -00: lhz r5,0(r3) - eieio - sthu r5,2(r4) - bdnz 00b - twi 0,r5,0 - isync - blr - -#ifdef CONFIG_PPC32 -_GLOBAL(__ide_mm_outsw) -#endif -_GLOBAL(_outsw_ns) - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,2 - blelr- - sync -00: lhzu r5,2(r4) - sth r5,0(r3) - bdnz 00b - sync - blr - -#ifdef CONFIG_PPC32 -_GLOBAL(__ide_mm_insl) -#endif -_GLOBAL(_insl_ns) - sync - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,4 - blelr- -00: lwz r5,0(r3) - eieio - stwu r5,4(r4) - bdnz 00b - twi 0,r5,0 - isync - blr - -#ifdef CONFIG_PPC32 -_GLOBAL(__ide_mm_outsl) -#endif -_GLOBAL(_outsl_ns) - cmpwi 0,r5,0 - mtctr r5 - subi r4,r4,4 - blelr- - sync -00: lwzu r5,4(r4) - stw r5,0(r3) - bdnz 00b - sync - blr - diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 58758d883..be9820234 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -16,6 +16,7 @@ * */ +#include #include #include #include @@ -59,6 +60,32 @@ _GLOBAL(mulhdu) addze r3,r3 blr +/* + * Returns (address we're running at) - (address we were linked at) + * for use before the text and data are mapped to KERNELBASE. + */ +_GLOBAL(reloc_offset) + mflr r0 + bl 1f +1: mflr r3 + LOAD_REG_IMMEDIATE(r4,1b) + subf r3,r4,r3 + mtlr r0 + blr + +/* + * add_reloc_offset(x) returns x + reloc_offset(). + */ +_GLOBAL(add_reloc_offset) + mflr r0 + bl 1f +1: mflr r5 + LOAD_REG_IMMEDIATE(r4,1b) + subf r5,r4,r5 + add r3,r3,r5 + mtlr r0 + blr + /* * sub_reloc_offset(x) returns x - reloc_offset(). */ @@ -189,7 +216,7 @@ _GLOBAL(call_setup_cpu) lwz r4,0(r4) add r4,r4,r3 lwz r5,CPU_SPEC_SETUP(r4) - cmpwi 0,r5,0 + cmpi 0,r5,0 add r5,r5,r3 beqlr mtctr r5 @@ -753,6 +780,136 @@ _GLOBAL(atomic_set_mask) bne- 10b blr +/* + * I/O string operations + * + * insb(port, buf, len) + * outsb(port, buf, len) + * insw(port, buf, len) + * outsw(port, buf, len) + * insl(port, buf, len) + * outsl(port, buf, len) + * insw_ns(port, buf, len) + * outsw_ns(port, buf, len) + * insl_ns(port, buf, len) + * outsl_ns(port, buf, len) + * + * The *_ns versions don't do byte-swapping. + */ +_GLOBAL(_insb) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,1 + blelr- +00: lbz r5,0(r3) + eieio + stbu r5,1(r4) + bdnz 00b + blr + +_GLOBAL(_outsb) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,1 + blelr- +00: lbzu r5,1(r4) + stb r5,0(r3) + eieio + bdnz 00b + blr + +_GLOBAL(_insw) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhbrx r5,0,r3 + eieio + sthu r5,2(r4) + bdnz 00b + blr + +_GLOBAL(_outsw) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhzu r5,2(r4) + eieio + sthbrx r5,0,r3 + bdnz 00b + blr + +_GLOBAL(_insl) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwbrx r5,0,r3 + eieio + stwu r5,4(r4) + bdnz 00b + blr + +_GLOBAL(_outsl) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwzu r5,4(r4) + stwbrx r5,0,r3 + eieio + bdnz 00b + blr + +_GLOBAL(__ide_mm_insw) +_GLOBAL(_insw_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhz r5,0(r3) + eieio + sthu r5,2(r4) + bdnz 00b + blr + +_GLOBAL(__ide_mm_outsw) +_GLOBAL(_outsw_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhzu r5,2(r4) + sth r5,0(r3) + eieio + bdnz 00b + blr + +_GLOBAL(__ide_mm_insl) +_GLOBAL(_insl_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwz r5,0(r3) + eieio + stwu r5,4(r4) + bdnz 00b + blr + +_GLOBAL(__ide_mm_outsl) +_GLOBAL(_outsl_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwzu r5,4(r4) + stw r5,0(r3) + eieio + bdnz 00b + blr + /* * Extended precision shifts. * diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index e3ed21cd3..2778cce05 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S @@ -1,12 +1,14 @@ /* + * arch/powerpc/kernel/misc64.S + * * This file contains miscellaneous low-level functions. * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) * * Largely rewritten by Cort Dougan (cort@cs.nmt.edu) * and Paul Mackerras. * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com) - * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com) - * + * PPC64 updates by Dave Engebretsen (engebret@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 @@ -14,6 +16,7 @@ * */ +#include #include #include #include @@ -27,10 +30,41 @@ .text +/* + * Returns (address we are running at) - (address we were linked at) + * for use before the text and data are mapped to KERNELBASE. + */ + +_GLOBAL(reloc_offset) + mflr r0 + bl 1f +1: mflr r3 + LOAD_REG_IMMEDIATE(r4,1b) + subf r3,r4,r3 + mtlr r0 + blr + +/* + * add_reloc_offset(x) returns x + reloc_offset(). + */ +_GLOBAL(add_reloc_offset) + mflr r0 + bl 1f +1: mflr r5 + LOAD_REG_IMMEDIATE(r4,1b) + subf r5,r4,r5 + add r3,r3,r5 + mtlr r0 + blr + _GLOBAL(get_msr) mfmsr r3 blr +_GLOBAL(get_dar) + mfdar r3 + blr + _GLOBAL(get_srr0) mfsrr0 r3 blr @@ -38,6 +72,10 @@ _GLOBAL(get_srr0) _GLOBAL(get_srr1) mfsrr1 r3 blr + +_GLOBAL(get_sp) + mr r3,r1 + blr #ifdef CONFIG_IRQSTACKS _GLOBAL(call_do_softirq) @@ -51,20 +89,60 @@ _GLOBAL(call_do_softirq) mtlr r0 blr -_GLOBAL(call_handle_irq) - ld r8,0(r7) +_GLOBAL(call___do_IRQ) mflr r0 std r0,16(r1) - mtctr r8 - stdu r1,THREAD_SIZE-112(r6) - mr r1,r6 - bctrl + stdu r1,THREAD_SIZE-112(r5) + mr r1,r5 + bl .__do_IRQ ld r1,0(r1) ld r0,16(r1) mtlr r0 blr #endif /* CONFIG_IRQSTACKS */ + /* + * To be called by C code which needs to do some operations with MMU + * disabled. Note that interrupts have to be disabled by the caller + * prior to calling us. The code called _MUST_ be in the RMO of course + * and part of the linear mapping as we don't attempt to translate the + * stack pointer at all. The function is called with the stack switched + * to this CPU emergency stack + * + * prototype is void *call_with_mmu_off(void *func, void *data); + * + * the called function is expected to be of the form + * + * void *called(void *data); + */ +_GLOBAL(call_with_mmu_off) + mflr r0 /* get link, save it on stackframe */ + std r0,16(r1) + mr r1,r5 /* save old stack ptr */ + ld r1,PACAEMERGSP(r13) /* get emerg. stack */ + subi r1,r1,STACK_FRAME_OVERHEAD + std r0,16(r1) /* save link on emerg. stack */ + std r5,0(r1) /* save old stack ptr in backchain */ + ld r3,0(r3) /* get to real function ptr (assume same TOC) */ + bl 2f /* we need LR to return, continue at label 2 */ + + ld r0,16(r1) /* we return here from the call, get LR and */ + ld r1,0(r1) /* .. old stack ptr */ + mtspr SPRN_SRR0,r0 /* and get back to virtual mode with these */ + mfmsr r4 + ori r4,r4,MSR_IR|MSR_DR + mtspr SPRN_SRR1,r4 + rfid + +2: mtspr SPRN_SRR0,r3 /* coming from above, enter real mode */ + mr r3,r4 /* get parameter */ + mfmsr r0 + ori r0,r0,MSR_IR|MSR_DR + xori r0,r0,MSR_IR|MSR_DR + mtspr SPRN_SRR1,r0 + rfid + + .section ".toc","aw" PPC64_CACHES: .tc ppc64_caches[TC],ppc64_caches @@ -245,6 +323,144 @@ _GLOBAL(__flush_dcache_icache) bdnz 1b isync blr + +/* + * I/O string operations + * + * insb(port, buf, len) + * outsb(port, buf, len) + * insw(port, buf, len) + * outsw(port, buf, len) + * insl(port, buf, len) + * outsl(port, buf, len) + * insw_ns(port, buf, len) + * outsw_ns(port, buf, len) + * insl_ns(port, buf, len) + * outsl_ns(port, buf, len) + * + * The *_ns versions don't do byte-swapping. + */ +_GLOBAL(_insb) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,1 + blelr- +00: lbz r5,0(r3) + eieio + stbu r5,1(r4) + bdnz 00b + twi 0,r5,0 + isync + blr + +_GLOBAL(_outsb) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,1 + blelr- +00: lbzu r5,1(r4) + stb r5,0(r3) + bdnz 00b + sync + blr + +_GLOBAL(_insw) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhbrx r5,0,r3 + eieio + sthu r5,2(r4) + bdnz 00b + twi 0,r5,0 + isync + blr + +_GLOBAL(_outsw) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhzu r5,2(r4) + sthbrx r5,0,r3 + bdnz 00b + sync + blr + +_GLOBAL(_insl) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwbrx r5,0,r3 + eieio + stwu r5,4(r4) + bdnz 00b + twi 0,r5,0 + isync + blr + +_GLOBAL(_outsl) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwzu r5,4(r4) + stwbrx r5,0,r3 + bdnz 00b + sync + blr + +/* _GLOBAL(ide_insw) now in drivers/ide/ide-iops.c */ +_GLOBAL(_insw_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhz r5,0(r3) + eieio + sthu r5,2(r4) + bdnz 00b + twi 0,r5,0 + isync + blr + +/* _GLOBAL(ide_outsw) now in drivers/ide/ide-iops.c */ +_GLOBAL(_outsw_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,2 + blelr- +00: lhzu r5,2(r4) + sth r5,0(r3) + bdnz 00b + sync + blr + +_GLOBAL(_insl_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwz r5,0(r3) + eieio + stwu r5,4(r4) + bdnz 00b + twi 0,r5,0 + isync + blr + +_GLOBAL(_outsl_ns) + cmpwi 0,r5,0 + mtctr r5 + subi r4,r4,4 + blelr- +00: lwzu r5,4(r4) + stw r5,0(r3) + bdnz 00b + sync + blr /* * identify_cpu and calls setup_cpu @@ -266,9 +482,7 @@ _GLOBAL(identify_cpu) sub r0,r3,r5 std r0,0(r4) ld r4,CPU_SPEC_SETUP(r3) - cmpdi 0,r4,0 add r4,r4,r5 - beqlr ld r4,0(r4) add r4,r4,r5 mtctr r4 @@ -389,7 +603,6 @@ _GLOBAL(real_writeb) blr #endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ -#ifdef CONFIG_CPU_FREQ_PMAC64 /* * SCOM access functions for 970 (FX only for now) * @@ -458,7 +671,6 @@ _GLOBAL(scom970_write) /* restore interrupts */ mtmsrd r5,1 blr -#endif /* CONFIG_CPU_FREQ_PMAC64 */ /* @@ -556,6 +768,9 @@ _GLOBAL(giveup_altivec) #endif /* CONFIG_ALTIVEC */ +_GLOBAL(__setup_cpu_power3) + blr + _GLOBAL(execve) li r0,__NR_execve sc @@ -687,7 +902,7 @@ _GLOBAL(kexec_sequence) /* clear out hardware hash page table and tlb */ ld r5,0(r27) /* deref function descriptor */ mtctr r5 - bctrl /* ppc_md.hpte_clear_all(void); */ + bctrl /* ppc_md.hash_clear_all(void); */ /* * kexec image calling is: diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index 6960f0909..ada50aa5b 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -204,7 +204,7 @@ static void nvram_print_partitions(char * 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 "%4d \t%02x\t%02x\t%d\t%s\n", + 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); diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 3262b73a3..9feeeef5a 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index c68741fed..f505a8827 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c @@ -7,6 +7,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 09b1e1bbb..b129d2e4b 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -2,6 +2,7 @@ * Common pmac/prep/chrp pci routines. -- Cort */ +#include #include #include #include @@ -11,7 +12,6 @@ #include #include #include -#include #include #include @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -98,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev *dev) if (!res->flags) continue; if (res->end == 0xffffffff) { - DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n", + DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", pci_name(dev), i, res->start, res->end); res->end -= res->start; res->start = 0; @@ -116,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev *dev) res->start += offset; res->end += offset; #ifdef DEBUG - printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n", + printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n", i, res->flags, pci_name(dev), res->start - offset, res->start); #endif @@ -172,18 +173,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); * but we want to try to avoid allocating at 0x2900-0x2bff * which might have be mirrored at 0x0100-0x03ff.. */ -void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) +void pcibios_align_resource(void *data, struct resource *res, unsigned long size, + unsigned long align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" - " (%lld bytes)\n", pci_name(dev), - dev->resource - res, (unsigned long long)size); + " (%ld bytes)\n", pci_name(dev), + dev->resource - res, size); } if (start & 0x300) { @@ -254,8 +255,8 @@ pcibios_allocate_bus_resources(struct list_head *bus_list) } } - DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n", - res->start, res->end, res->flags, pr); + DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", + res->start, res->end, res->flags, pr); if (pr) { if (request_resource(pr, res) == 0) continue; @@ -305,7 +306,7 @@ reparent_resources(struct resource *parent, struct resource *res) *pp = NULL; for (p = res->child; p != NULL; p = p->sibling) { p->parent = res; - DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", + DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", p->name, p->start, p->end, res->name); } return 0; @@ -361,14 +362,13 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i) try = conflict->start - 1; } if (request_resource(pr, res)) { - DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n", + DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", res->start, res->end); return -1; /* "can't happen" */ } update_bridge_base(bus, i); - printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n", - bus->number, i, (unsigned long long)res->start, - (unsigned long long)res->end); + printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", + bus->number, i, res->start, res->end); return 0; } @@ -479,14 +479,14 @@ static inline void alloc_resource(struct pci_dev *dev, int idx) { struct resource *pr, *r = &dev->resource[idx]; - DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n", + DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", pci_name(dev), idx, r->start, r->end, r->flags); pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) { printk(KERN_ERR "PCI: Cannot allocate resource region %d" " of device %s\n", idx, pci_name(dev)); if (pr) - DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n", + DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", pr, pr->start, pr->end, pr->flags); /* We'll assign a new address later */ r->flags |= IORESOURCE_UNSET; @@ -956,7 +956,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose, res = &hose->io_resource; res->flags = IORESOURCE_IO; res->start = ranges[2]; - DBG("PCI: IO 0x%llx -> 0x%llx\n", + DBG("PCI: IO 0x%lx -> 0x%lx\n", res->start, res->start + size - 1); break; case 2: /* memory space */ @@ -978,7 +978,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose, if(ranges[0] & 0x40000000) res->flags |= IORESOURCE_PREFETCH; res->start = ranges[na+2]; - DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno, + DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno, res->start, res->start + size - 1); } break; @@ -1074,7 +1074,7 @@ do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga) DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); - DBG(" IO window: %016llx-%016llx\n", res.start, res.end); + DBG(" IO window: %08lx-%08lx\n", res.start, res.end); /* Set up the top and bottom of the PCI I/O segment for this bus. */ pci_read_config_dword(bridge, PCI_IO_BASE, &l); @@ -1113,10 +1113,9 @@ check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga) int i; int rc = 0; -#define push_end(res, mask) do { \ - BUG_ON((mask+1) & mask); \ - res->end = (res->end + mask) | mask; \ -} while (0) +#define push_end(res, size) do { unsigned long __sz = (size) ; \ + res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \ + } while (0) list_for_each_entry(dev, &bus->devices, bus_list) { u16 class = dev->class >> 8; @@ -1223,8 +1222,8 @@ do_fixup_p2p_level(struct pci_bus *bus) continue; if ((r->flags & IORESOURCE_IO) == 0) continue; - DBG("Trying to allocate from %016llx, size %016llx from parent" - " res %d: %016llx -> %016llx\n", + DBG("Trying to allocate from %08lx, size %08lx from parent" + " res %d: %08lx -> %08lx\n", res->start, res->end, i, r->start, r->end); if (allocate_resource(r, res, res->end + 1, res->start, max, @@ -1404,65 +1403,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq) /* XXX FIXME - update OF device tree node interrupt property */ } -#ifdef CONFIG_PPC_MERGE -/* XXX This is a copy of the ppc64 version. This is temporary until we start - * merging the 2 PCI layers - */ -/* - * Reads the interrupt pin to determine if interrupt is use by card. - * If the interrupt is used, then gets the interrupt line from the - * openfirmware and sets it in the pci_dev and pci_config line. - */ -int pci_read_irq_line(struct pci_dev *pci_dev) -{ - struct of_irq oirq; - unsigned int virq; - - DBG("Try to map irq for %s...\n", pci_name(pci_dev)); - - /* Try to get a mapping from the device-tree */ - if (of_irq_map_pci(pci_dev, &oirq)) { - u8 line, pin; - - /* If that fails, lets fallback to what is in the config - * space and map that through the default controller. We - * also set the type to level low since that's what PCI - * interrupts are. If your platform does differently, then - * either provide a proper interrupt tree or don't use this - * function. - */ - if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin)) - return -1; - if (pin == 0) - return -1; - if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) || - line == 0xff) { - return -1; - } - DBG(" -> no map ! Using irq line %d from PCI config\n", line); - - virq = irq_create_mapping(NULL, line); - if (virq != NO_IRQ) - set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); - } else { - DBG(" -> got one, spec %d cells (0x%08x...) on %s\n", - oirq.size, oirq.specifier[0], oirq.controller->full_name); - - virq = irq_create_of_mapping(oirq.controller, oirq.specifier, - oirq.size); - } - if(virq == NO_IRQ) { - DBG(" -> failed to map !\n"); - return -1; - } - pci_dev->irq = virq; - pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq); - - return 0; -} -EXPORT_SYMBOL(pci_read_irq_line); -#endif /* CONFIG_PPC_MERGE */ - int pcibios_enable_device(struct pci_dev *dev, int mask) { u16 cmd, old_cmd; @@ -1633,8 +1573,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, else prot |= _PAGE_GUARDED; - printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev), - (unsigned long long)rp->start, prot); + printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, + prot); return __pgprot(prot); } @@ -1713,6 +1653,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return -EINVAL; vma->vm_pgoff = offset >> PAGE_SHIFT; + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp, vma->vm_page_prot, mmap_state, write_combine); @@ -1814,7 +1755,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - resource_size_t *start, resource_size_t *end) + u64 *start, u64 *end) { struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); unsigned long offset = 0; diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 138134c8c..4c4449be8 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -13,6 +13,7 @@ #undef DEBUG +#include #include #include #include @@ -21,13 +22,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include @@ -41,6 +42,14 @@ unsigned long pci_probe_only = 1; int pci_assign_all_buses = 0; +/* + * legal IO pages under MAX_ISA_PORT. This is to ensure we don't touch + * devices we don't have access to. + */ +unsigned long io_page_mask; + +EXPORT_SYMBOL(io_page_mask); + #ifdef CONFIG_PPC_MULTIPLATFORM static void fixup_resource(struct resource *res, struct pci_dev *dev); static void do_bus_setup(struct pci_bus *bus); @@ -137,11 +146,11 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); * which might have be mirrored at 0x0100-0x03ff.. */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { struct pci_dev *dev = data; struct pci_controller *hose = pci_bus_to_host(dev->bus); - resource_size_t start = res->start; + unsigned long start = res->start; unsigned long alignto; if (res->flags & IORESOURCE_IO) { @@ -226,10 +235,8 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev) pci_setup_pci_controller(phb); phb->arch_data = dev; phb->is_dynamic = mem_init_done; - if (dev) { - PHB_SET_NODE(phb, of_node_to_nid(dev)); + if (dev) add_linux_pci_domain(dev, phb); - } return phb; } @@ -389,7 +396,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, dev->current_state = 4; /* unknown power state */ - if (!strcmp(type, "pci") || !strcmp(type, "pciex")) { + if (!strcmp(type, "pci")) { /* a PCI-PCI bridge */ dev->hdr_type = PCI_HEADER_TYPE_BRIDGE; dev->rom_base_reg = PCI_ROM_ADDRESS1; @@ -398,8 +405,12 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, } else { dev->hdr_type = PCI_HEADER_TYPE_NORMAL; dev->rom_base_reg = PCI_ROM_ADDRESS; - /* Maybe do a default OF mapping here */ dev->irq = NO_IRQ; + if (node->n_intrs > 0) { + dev->irq = node->intrs[0].line; + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, + dev->irq); + } } pci_parse_of_addrs(node, dev); @@ -594,7 +605,7 @@ static int __init pcibios_init(void) iSeries_pcibios_init(); #endif - printk(KERN_DEBUG "PCI: Probing PCI hardware\n"); + printk("PCI: Probing PCI hardware\n"); /* Scan all of the recorded PCI controllers. */ list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { @@ -619,14 +630,14 @@ static int __init pcibios_init(void) /* Cache the location of the ISA bridge (if we have one) */ ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); if (ppc64_isabridge_dev != NULL) - printk(KERN_DEBUG "ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); + printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); #ifdef CONFIG_PPC_MULTIPLATFORM /* map in PCI I/O space */ phbs_remap_io(); #endif - printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); + printk("PCI: Probing PCI hardware done\n"); return 0; } @@ -793,7 +804,7 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, else prot |= _PAGE_GUARDED; - printk(KERN_DEBUG "PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, + printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, prot); return __pgprot(prot); @@ -872,6 +883,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return -EINVAL; vma->vm_pgoff = offset >> PAGE_SHIFT; + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp, vma->vm_page_prot, mmap_state, write_combine); @@ -882,8 +894,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return ret; } -static ssize_t pci_show_devspec(struct device *dev, - struct device_attribute *attr, char *buf) +#ifdef CONFIG_PPC_MULTIPLATFORM +static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) { struct pci_dev *pdev; struct device_node *np; @@ -895,10 +907,13 @@ static ssize_t pci_show_devspec(struct device *dev, return sprintf(buf, "%s", np->full_name); } static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); +#endif /* CONFIG_PPC_MULTIPLATFORM */ void pcibios_add_platform_entries(struct pci_dev *pdev) { +#ifdef CONFIG_PPC_MULTIPLATFORM device_create_file(&pdev->dev, &dev_attr_devspec); +#endif /* CONFIG_PPC_MULTIPLATFORM */ } #ifdef CONFIG_PPC_MULTIPLATFORM @@ -1089,6 +1104,8 @@ void __init pci_setup_phb_io(struct pci_controller *hose, int primary) pci_process_ISA_OF_ranges(isa_dn, hose->io_base_phys, hose->io_base_virt); of_node_put(isa_dn); + /* Allow all IO */ + io_page_mask = -1; } } @@ -1195,7 +1212,7 @@ int remap_bus_range(struct pci_bus *bus) return 1; if (start_phys == 0) return 1; - printk(KERN_DEBUG "mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); + printk("mapping IO %lx -> %lx, size: %lx\n", start_phys, start_virt, size); if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE | _PAGE_GUARDED)) return 1; @@ -1215,13 +1232,27 @@ static void phbs_remap_io(void) static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) { struct pci_controller *hose = pci_bus_to_host(dev->bus); - unsigned long offset; + unsigned long start, end, mask, offset; if (res->flags & IORESOURCE_IO) { offset = (unsigned long)hose->io_base_virt - pci_io_base; - res->start += offset; - res->end += offset; + start = res->start += offset; + end = res->end += offset; + + /* Need to allow IO access to pages that are in the + ISA range */ + if (start < MAX_ISA_PORT) { + if (end > MAX_ISA_PORT) + end = MAX_ISA_PORT; + + start >>= PAGE_SHIFT; + end >>= PAGE_SHIFT; + + /* get the range of pages for the map */ + mask = ((1 << (end+1)) - 1) ^ ((1 << start) - 1); + io_page_mask |= mask; + } } else if (res->flags & IORESOURCE_MEM) { res->start += hose->pci_mem_offset; res->end += hose->pci_mem_offset; @@ -1284,55 +1315,23 @@ EXPORT_SYMBOL(pcibios_fixup_bus); */ int pci_read_irq_line(struct pci_dev *pci_dev) { - struct of_irq oirq; - unsigned int virq; + u8 intpin; + struct device_node *node; - DBG("Try to map irq for %s...\n", pci_name(pci_dev)); - -#ifdef DEBUG - memset(&oirq, 0xff, sizeof(oirq)); -#endif - /* Try to get a mapping from the device-tree */ - if (of_irq_map_pci(pci_dev, &oirq)) { - u8 line, pin; - - /* If that fails, lets fallback to what is in the config - * space and map that through the default controller. We - * also set the type to level low since that's what PCI - * interrupts are. If your platform does differently, then - * either provide a proper interrupt tree or don't use this - * function. - */ - if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &pin)) - return -1; - if (pin == 0) - return -1; - if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) || - line == 0xff) { - return -1; - } - DBG(" -> no map ! Using irq line %d from PCI config\n", line); + pci_read_config_byte(pci_dev, PCI_INTERRUPT_PIN, &intpin); + if (intpin == 0) + return 0; - virq = irq_create_mapping(NULL, line); - if (virq != NO_IRQ) - set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); - } else { - DBG(" -> got one, spec %d cells (0x%08x 0x%08x...) on %s\n", - oirq.size, oirq.specifier[0], oirq.specifier[1], - oirq.controller->full_name); + node = pci_device_to_OF_node(pci_dev); + if (node == NULL) + return -1; - virq = irq_create_of_mapping(oirq.controller, oirq.specifier, - oirq.size); - } - if(virq == NO_IRQ) { - DBG(" -> failed to map !\n"); + if (node->n_intrs == 0) return -1; - } - DBG(" -> mapped to linux irq %d\n", virq); + pci_dev->irq = node->intrs[0].line; - pci_dev->irq = virq; - pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq); + pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, pci_dev->irq); return 0; } @@ -1443,12 +1442,3 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, return -EOPNOTSUPP; } - -#ifdef CONFIG_NUMA -int pcibus_to_node(struct pci_bus *bus) -{ - struct pci_controller *phb = pci_bus_to_host(bus); - return phb->node; -} -EXPORT_SYMBOL(pcibus_to_node); -#endif diff --git a/arch/powerpc/kernel/pci_direct_iommu.c b/arch/powerpc/kernel/pci_direct_iommu.c index 72ce082ce..e1a32f802 100644 --- a/arch/powerpc/kernel/pci_direct_iommu.c +++ b/arch/powerpc/kernel/pci_direct_iommu.c @@ -82,17 +82,13 @@ static int pci_direct_dma_supported(struct device *dev, u64 mask) return mask < 0x100000000ull; } -static struct dma_mapping_ops pci_direct_ops = { - .alloc_coherent = pci_direct_alloc_coherent, - .free_coherent = pci_direct_free_coherent, - .map_single = pci_direct_map_single, - .unmap_single = pci_direct_unmap_single, - .map_sg = pci_direct_map_sg, - .unmap_sg = pci_direct_unmap_sg, - .dma_supported = pci_direct_dma_supported, -}; - void __init pci_direct_iommu_init(void) { - pci_dma_ops = pci_direct_ops; + pci_dma_ops.alloc_coherent = pci_direct_alloc_coherent; + pci_dma_ops.free_coherent = pci_direct_free_coherent; + pci_dma_ops.map_single = pci_direct_map_single; + pci_dma_ops.unmap_single = pci_direct_unmap_single; + pci_dma_ops.map_sg = pci_direct_map_sg; + pci_dma_ops.unmap_sg = pci_direct_unmap_sg; + pci_dma_ops.dma_supported = pci_direct_dma_supported; } diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 1c1895351..12c4c9e9b 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c @@ -31,7 +31,6 @@ #include #include #include -#include /* * Traverse_func that inits the PCI fields of the device node. @@ -60,11 +59,6 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data) pdn->busno = (regs[0] >> 16) & 0xff; pdn->devfn = (regs[0] >> 8) & 0xff; } - if (firmware_has_feature(FW_FEATURE_ISERIES)) { - u32 *busp = (u32 *)get_property(dn, "linux,subbus", NULL); - if (busp) - pdn->bussubno = *busp; - } pdn->pci_ext_config_space = (type && *type == 1); return NULL; diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index 0688b2534..c1d95e14b 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c @@ -44,16 +44,16 @@ */ #define PCI_GET_DN(dev) ((struct device_node *)((dev)->sysdata)) -static inline struct iommu_table *device_to_table(struct device *hwdev) +static inline struct iommu_table *devnode_table(struct device *dev) { struct pci_dev *pdev; - if (!hwdev) { + if (!dev) { pdev = ppc64_isabridge_dev; if (!pdev) return NULL; } else - pdev = to_pci_dev(hwdev); + pdev = to_pci_dev(dev); return PCI_DN(PCI_GET_DN(pdev))->iommu_table; } @@ -85,15 +85,14 @@ static inline unsigned long device_to_mask(struct device *hwdev) static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flag) { - return iommu_alloc_coherent(device_to_table(hwdev), size, dma_handle, - device_to_mask(hwdev), flag, - pcibus_to_node(to_pci_dev(hwdev)->bus)); + return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle, + device_to_mask(hwdev), flag); } static void pci_iommu_free_coherent(struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { - iommu_free_coherent(device_to_table(hwdev), size, vaddr, dma_handle); + iommu_free_coherent(devnode_table(hwdev), size, vaddr, dma_handle); } /* Creates TCEs for a user provided buffer. The user buffer must be @@ -105,7 +104,7 @@ static void pci_iommu_free_coherent(struct device *hwdev, size_t size, static dma_addr_t pci_iommu_map_single(struct device *hwdev, void *vaddr, size_t size, enum dma_data_direction direction) { - return iommu_map_single(device_to_table(hwdev), vaddr, size, + return iommu_map_single(devnode_table(hwdev), vaddr, size, device_to_mask(hwdev), direction); } @@ -113,27 +112,27 @@ static dma_addr_t pci_iommu_map_single(struct device *hwdev, void *vaddr, static void pci_iommu_unmap_single(struct device *hwdev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) { - iommu_unmap_single(device_to_table(hwdev), dma_handle, size, direction); + iommu_unmap_single(devnode_table(hwdev), dma_handle, size, direction); } static int pci_iommu_map_sg(struct device *pdev, struct scatterlist *sglist, int nelems, enum dma_data_direction direction) { - return iommu_map_sg(pdev, device_to_table(pdev), sglist, + return iommu_map_sg(pdev, devnode_table(pdev), sglist, nelems, device_to_mask(pdev), direction); } static void pci_iommu_unmap_sg(struct device *pdev, struct scatterlist *sglist, int nelems, enum dma_data_direction direction) { - iommu_unmap_sg(device_to_table(pdev), sglist, nelems, direction); + iommu_unmap_sg(devnode_table(pdev), sglist, nelems, direction); } /* We support DMA to/from any memory page via the iommu */ static int pci_iommu_dma_supported(struct device *dev, u64 mask) { - struct iommu_table *tbl = device_to_table(dev); + struct iommu_table *tbl = devnode_table(dev); if (!tbl || tbl->it_offset > mask) { printk(KERN_INFO "Warning: IOMMU table offset too big for device mask\n"); @@ -148,17 +147,13 @@ static int pci_iommu_dma_supported(struct device *dev, u64 mask) return 1; } -struct dma_mapping_ops pci_iommu_ops = { - .alloc_coherent = pci_iommu_alloc_coherent, - .free_coherent = pci_iommu_free_coherent, - .map_single = pci_iommu_map_single, - .unmap_single = pci_iommu_unmap_single, - .map_sg = pci_iommu_map_sg, - .unmap_sg = pci_iommu_unmap_sg, - .dma_supported = pci_iommu_dma_supported, -}; - void pci_iommu_init(void) { - pci_dma_ops = pci_iommu_ops; + pci_dma_ops.alloc_coherent = pci_iommu_alloc_coherent; + pci_dma_ops.free_coherent = pci_iommu_free_coherent; + pci_dma_ops.map_single = pci_iommu_map_single; + pci_dma_ops.unmap_single = pci_iommu_unmap_single; + pci_dma_ops.map_sg = pci_iommu_map_sg; + pci_dma_ops.unmap_sg = pci_iommu_unmap_sg; + pci_dma_ops.dma_supported = pci_iommu_dma_supported; } diff --git a/arch/powerpc/kernel/perfmon_fsl_booke.c b/arch/powerpc/kernel/perfmon_fsl_booke.c index bdc3977a7..32455dfcc 100644 --- a/arch/powerpc/kernel/perfmon_fsl_booke.c +++ b/arch/powerpc/kernel/perfmon_fsl_booke.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c index a0a2efade..e6fb194fe 100644 --- a/arch/powerpc/kernel/pmc.c +++ b/arch/powerpc/kernel/pmc.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 23ccd5ddc..4b052ae5d 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -5,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,12 +93,6 @@ EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -#ifndef __powerpc64__ -EXPORT_SYMBOL(copy_page); -#else -EXPORT_SYMBOL(copy_4K_page); -#endif - #ifndef __powerpc64__ EXPORT_SYMBOL(__ide_mm_insl); EXPORT_SYMBOL(__ide_mm_outsw); @@ -132,6 +127,10 @@ EXPORT_SYMBOL(pci_bus_mem_base_phys); EXPORT_SYMBOL(pci_bus_to_hose); #endif /* CONFIG_PCI */ +#ifdef CONFIG_NOT_COHERENT_CACHE +EXPORT_SYMBOL(flush_dcache_all); +#endif + EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(kernel_thread); diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c index f598cb519..3c2cf661f 100644 --- a/arch/powerpc/kernel/proc_ppc64.c +++ b/arch/powerpc/kernel/proc_ppc64.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -51,7 +52,7 @@ static int __init proc_ppc64_create(void) if (!root) return 1; - if (!of_find_node_by_path("/rtas")) + if (!machine_is(pseries) && !machine_is(cell)) return 0; if (!proc_mkdir("rtas", root)) @@ -114,6 +115,8 @@ static int page_map_mmap( struct file *file, struct vm_area_struct *vma ) { struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode); + vma->vm_flags |= VM_SHM | VM_LOCKED; + if ((vma->vm_end - vma->vm_start) > dp->size) return -EINVAL; diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index f5e91f0ec..5e8b8aeed 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -708,61 +709,6 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr) return put_user(val, (unsigned int __user *) adr); } -int set_endian(struct task_struct *tsk, unsigned int val) -{ - struct pt_regs *regs = tsk->thread.regs; - - if ((val == PR_ENDIAN_LITTLE && !cpu_has_feature(CPU_FTR_REAL_LE)) || - (val == PR_ENDIAN_PPC_LITTLE && !cpu_has_feature(CPU_FTR_PPC_LE))) - return -EINVAL; - - if (regs == NULL) - return -EINVAL; - - if (val == PR_ENDIAN_BIG) - regs->msr &= ~MSR_LE; - else if (val == PR_ENDIAN_LITTLE || val == PR_ENDIAN_PPC_LITTLE) - regs->msr |= MSR_LE; - else - return -EINVAL; - - return 0; -} - -int get_endian(struct task_struct *tsk, unsigned long adr) -{ - struct pt_regs *regs = tsk->thread.regs; - unsigned int val; - - if (!cpu_has_feature(CPU_FTR_PPC_LE) && - !cpu_has_feature(CPU_FTR_REAL_LE)) - return -EINVAL; - - if (regs == NULL) - return -EINVAL; - - if (regs->msr & MSR_LE) { - if (cpu_has_feature(CPU_FTR_REAL_LE)) - val = PR_ENDIAN_LITTLE; - else - val = PR_ENDIAN_PPC_LITTLE; - } else - val = PR_ENDIAN_BIG; - - return put_user(val, (unsigned int __user *)adr); -} - -int set_unalign_ctl(struct task_struct *tsk, unsigned int val) -{ - tsk->thread.align_ctl = val; - return 0; -} - -int get_unalign_ctl(struct task_struct *tsk, unsigned long adr) -{ - return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr); -} - #define TRUNC_PTR(x) ((typeof(x))(((unsigned long)(x)) & 0xffffffff)) int sys_clone(unsigned long clone_flags, unsigned long usp, diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index a1787ffb6..9a07f97f0 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -16,6 +16,7 @@ #undef DEBUG #include +#include #include #include #include @@ -29,8 +30,6 @@ #include #include #include -#include -#include #include #include @@ -51,7 +50,6 @@ #include #include #include -#include #ifdef DEBUG #define DBG(fmt...) printk(KERN_ERR fmt) @@ -87,6 +85,424 @@ static DEFINE_RWLOCK(devtree_lock); /* export that to outside world */ struct device_node *of_chosen; +struct device_node *dflt_interrupt_controller; +int num_interrupt_controllers; + +/* + * Wrapper for allocating memory for various data that needs to be + * attached to device nodes as they are processed at boot or when + * added to the device tree later (e.g. DLPAR). At boot there is + * already a region reserved so we just increment *mem_start by size; + * otherwise we call kmalloc. + */ +static void * prom_alloc(unsigned long size, unsigned long *mem_start) +{ + unsigned long tmp; + + if (!mem_start) + return kmalloc(size, GFP_KERNEL); + + tmp = *mem_start; + *mem_start += size; + return (void *)tmp; +} + +/* + * Find the device_node with a given phandle. + */ +static struct device_node * find_phandle(phandle ph) +{ + struct device_node *np; + + for (np = allnodes; np != 0; np = np->allnext) + if (np->linux_phandle == ph) + return np; + return NULL; +} + +/* + * Find the interrupt parent of a node. + */ +static struct device_node * __devinit intr_parent(struct device_node *p) +{ + phandle *parp; + + parp = (phandle *) get_property(p, "interrupt-parent", NULL); + if (parp == NULL) + return p->parent; + p = find_phandle(*parp); + if (p != NULL) + return p; + /* + * On a powermac booted with BootX, we don't get to know the + * phandles for any nodes, so find_phandle will return NULL. + * Fortunately these machines only have one interrupt controller + * so there isn't in fact any ambiguity. -- paulus + */ + if (num_interrupt_controllers == 1) + p = dflt_interrupt_controller; + return p; +} + +/* + * Find out the size of each entry of the interrupts property + * for a node. + */ +int __devinit prom_n_intr_cells(struct device_node *np) +{ + struct device_node *p; + unsigned int *icp; + + for (p = np; (p = intr_parent(p)) != NULL; ) { + icp = (unsigned int *) + get_property(p, "#interrupt-cells", NULL); + if (icp != NULL) + return *icp; + if (get_property(p, "interrupt-controller", NULL) != NULL + || get_property(p, "interrupt-map", NULL) != NULL) { + printk("oops, node %s doesn't have #interrupt-cells\n", + p->full_name); + return 1; + } + } +#ifdef DEBUG_IRQ + printk("prom_n_intr_cells failed for %s\n", np->full_name); +#endif + return 1; +} + +/* + * Map an interrupt from a device up to the platform interrupt + * descriptor. + */ +static int __devinit map_interrupt(unsigned int **irq, struct device_node **ictrler, + struct device_node *np, unsigned int *ints, + int nintrc) +{ + struct device_node *p, *ipar; + unsigned int *imap, *imask, *ip; + int i, imaplen, match; + int newintrc = 0, newaddrc = 0; + unsigned int *reg; + int naddrc; + + reg = (unsigned int *) get_property(np, "reg", NULL); + naddrc = prom_n_addr_cells(np); + p = intr_parent(np); + while (p != NULL) { + if (get_property(p, "interrupt-controller", NULL) != NULL) + /* this node is an interrupt controller, stop here */ + break; + imap = (unsigned int *) + get_property(p, "interrupt-map", &imaplen); + if (imap == NULL) { + p = intr_parent(p); + continue; + } + imask = (unsigned int *) + get_property(p, "interrupt-map-mask", NULL); + if (imask == NULL) { + printk("oops, %s has interrupt-map but no mask\n", + p->full_name); + return 0; + } + imaplen /= sizeof(unsigned int); + match = 0; + ipar = NULL; + while (imaplen > 0 && !match) { + /* check the child-interrupt field */ + match = 1; + for (i = 0; i < naddrc && match; ++i) + match = ((reg[i] ^ imap[i]) & imask[i]) == 0; + for (; i < naddrc + nintrc && match; ++i) + match = ((ints[i-naddrc] ^ imap[i]) & imask[i]) == 0; + imap += naddrc + nintrc; + imaplen -= naddrc + nintrc; + /* grab the interrupt parent */ + ipar = find_phandle((phandle) *imap++); + --imaplen; + if (ipar == NULL && num_interrupt_controllers == 1) + /* cope with BootX not giving us phandles */ + ipar = dflt_interrupt_controller; + if (ipar == NULL) { + printk("oops, no int parent %x in map of %s\n", + imap[-1], p->full_name); + return 0; + } + /* find the parent's # addr and intr cells */ + ip = (unsigned int *) + get_property(ipar, "#interrupt-cells", NULL); + if (ip == NULL) { + printk("oops, no #interrupt-cells on %s\n", + ipar->full_name); + return 0; + } + newintrc = *ip; + ip = (unsigned int *) + get_property(ipar, "#address-cells", NULL); + newaddrc = (ip == NULL)? 0: *ip; + imap += newaddrc + newintrc; + imaplen -= newaddrc + newintrc; + } + if (imaplen < 0) { + printk("oops, error decoding int-map on %s, len=%d\n", + p->full_name, imaplen); + return 0; + } + if (!match) { +#ifdef DEBUG_IRQ + printk("oops, no match in %s int-map for %s\n", + p->full_name, np->full_name); +#endif + return 0; + } + p = ipar; + naddrc = newaddrc; + nintrc = newintrc; + ints = imap - nintrc; + reg = ints - naddrc; + } + if (p == NULL) { +#ifdef DEBUG_IRQ + printk("hmmm, int tree for %s doesn't have ctrler\n", + np->full_name); +#endif + return 0; + } + *irq = ints; + *ictrler = p; + return nintrc; +} + +static unsigned char map_isa_senses[4] = { + IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE, + IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE, + IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE, + IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE +}; + +static unsigned char map_mpic_senses[4] = { + IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE, + IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE, + /* 2 seems to be used for the 8259 cascade... */ + IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE, + IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE, +}; + +static int __devinit finish_node_interrupts(struct device_node *np, + unsigned long *mem_start, + int measure_only) +{ + unsigned int *ints; + int intlen, intrcells, intrcount; + int i, j, n, sense; + unsigned int *irq, virq; + struct device_node *ic; + int trace = 0; + + //#define TRACE(fmt...) do { if (trace) { printk(fmt); mdelay(1000); } } while(0) +#define TRACE(fmt...) + + if (!strcmp(np->name, "smu-doorbell")) + trace = 1; + + TRACE("Finishing SMU doorbell ! num_interrupt_controllers = %d\n", + num_interrupt_controllers); + + if (num_interrupt_controllers == 0) { + /* + * Old machines just have a list of interrupt numbers + * and no interrupt-controller nodes. + */ + ints = (unsigned int *) get_property(np, "AAPL,interrupts", + &intlen); + /* XXX old interpret_pci_props looked in parent too */ + /* XXX old interpret_macio_props looked for interrupts + before AAPL,interrupts */ + if (ints == NULL) + ints = (unsigned int *) get_property(np, "interrupts", + &intlen); + if (ints == NULL) + return 0; + + np->n_intrs = intlen / sizeof(unsigned int); + np->intrs = prom_alloc(np->n_intrs * sizeof(np->intrs[0]), + mem_start); + if (!np->intrs) + return -ENOMEM; + if (measure_only) + return 0; + + for (i = 0; i < np->n_intrs; ++i) { + np->intrs[i].line = *ints++; + np->intrs[i].sense = IRQ_SENSE_LEVEL + | IRQ_POLARITY_NEGATIVE; + } + return 0; + } + + ints = (unsigned int *) get_property(np, "interrupts", &intlen); + TRACE("ints=%p, intlen=%d\n", ints, intlen); + if (ints == NULL) + return 0; + intrcells = prom_n_intr_cells(np); + intlen /= intrcells * sizeof(unsigned int); + TRACE("intrcells=%d, new intlen=%d\n", intrcells, intlen); + np->intrs = prom_alloc(intlen * sizeof(*(np->intrs)), mem_start); + if (!np->intrs) + return -ENOMEM; + + if (measure_only) + return 0; + + intrcount = 0; + for (i = 0; i < intlen; ++i, ints += intrcells) { + n = map_interrupt(&irq, &ic, np, ints, intrcells); + TRACE("map, irq=%d, ic=%p, n=%d\n", irq, ic, n); + if (n <= 0) + continue; + + /* don't map IRQ numbers under a cascaded 8259 controller */ + if (ic && device_is_compatible(ic, "chrp,iic")) { + np->intrs[intrcount].line = irq[0]; + sense = (n > 1)? (irq[1] & 3): 3; + np->intrs[intrcount].sense = map_isa_senses[sense]; + } else { + virq = virt_irq_create_mapping(irq[0]); + TRACE("virq=%d\n", virq); +#ifdef CONFIG_PPC64 + if (virq == NO_IRQ) { + printk(KERN_CRIT "Could not allocate interrupt" + " number for %s\n", np->full_name); + continue; + } +#endif + np->intrs[intrcount].line = irq_offset_up(virq); + sense = (n > 1)? (irq[1] & 3): 1; + + /* Apple uses bits in there in a different way, let's + * only keep the real sense bit on macs + */ + if (machine_is(powermac)) + sense &= 0x1; + np->intrs[intrcount].sense = map_mpic_senses[sense]; + } + +#ifdef CONFIG_PPC64 + /* We offset irq numbers for the u3 MPIC by 128 in PowerMac */ + if (machine_is(powermac) && ic && ic->parent) { + char *name = get_property(ic->parent, "name", NULL); + if (name && !strcmp(name, "u3")) + np->intrs[intrcount].line += 128; + else if (!(name && (!strcmp(name, "mac-io") || + !strcmp(name, "u4")))) + /* ignore other cascaded controllers, such as + the k2-sata-root */ + break; + } +#endif /* CONFIG_PPC64 */ + if (n > 2) { + printk("hmmm, got %d intr cells for %s:", n, + np->full_name); + for (j = 0; j < n; ++j) + printk(" %d", irq[j]); + printk("\n"); + } + ++intrcount; + } + np->n_intrs = intrcount; + + return 0; +} + +static int __devinit finish_node(struct device_node *np, + unsigned long *mem_start, + int measure_only) +{ + struct device_node *child; + int rc = 0; + + rc = finish_node_interrupts(np, mem_start, measure_only); + if (rc) + goto out; + + for (child = np->child; child != NULL; child = child->sibling) { + rc = finish_node(child, mem_start, measure_only); + if (rc) + goto out; + } +out: + return rc; +} + +static void __init scan_interrupt_controllers(void) +{ + struct device_node *np; + int n = 0; + char *name, *ic; + int iclen; + + for (np = allnodes; np != NULL; np = np->allnext) { + ic = get_property(np, "interrupt-controller", &iclen); + name = get_property(np, "name", NULL); + /* checking iclen makes sure we don't get a false + match on /chosen.interrupt_controller */ + if ((name != NULL + && strcmp(name, "interrupt-controller") == 0) + || (ic != NULL && iclen == 0 + && strcmp(name, "AppleKiwi"))) { + if (n == 0) + dflt_interrupt_controller = np; + ++n; + } + } + num_interrupt_controllers = n; +} + +/** + * finish_device_tree is called once things are running normally + * (i.e. with text and data mapped to the address they were linked at). + * It traverses the device tree and fills in some of the additional, + * fields in each node like {n_}addrs and {n_}intrs, the virt interrupt + * mapping is also initialized at this point. + */ +void __init finish_device_tree(void) +{ + unsigned long start, end, size = 0; + + DBG(" -> finish_device_tree\n"); + +#ifdef CONFIG_PPC64 + /* Initialize virtual IRQ map */ + virt_irq_init(); +#endif + scan_interrupt_controllers(); + + /* + * Finish device-tree (pre-parsing some properties etc...) + * We do this in 2 passes. One with "measure_only" set, which + * will only measure the amount of memory needed, then we can + * allocate that memory, and call finish_node again. However, + * we must be careful as most routines will fail nowadays when + * prom_alloc() returns 0, so we must make sure our first pass + * doesn't start at 0. We pre-initialize size to 16 for that + * reason and then remove those additional 16 bytes + */ + size = 16; + finish_node(allnodes, &size, 1); + size -= 16; + + if (0 == size) + end = start = 0; + else + end = start = (unsigned long)__va(lmb_alloc(size, 128)); + + finish_node(allnodes, &end, 0); + BUG_ON(end != start + size); + + DBG(" <- finish_device_tree\n"); +} + static inline char *find_flat_dt_string(u32 offset) { return ((char *)initial_boot_params) + @@ -420,42 +836,6 @@ static unsigned long __init unflatten_dt_node(unsigned long mem, return mem; } -static int __init early_parse_mem(char *p) -{ - if (!p) - return 1; - - memory_limit = PAGE_ALIGN(memparse(p, &p)); - DBG("memory limit = 0x%lx\n", memory_limit); - - return 0; -} -early_param("mem", early_parse_mem); - -/* - * The device tree may be allocated below our memory limit, or inside the - * crash kernel region for kdump. If so, move it out now. - */ -static void move_device_tree(void) -{ - unsigned long start, size; - void *p; - - DBG("-> move_device_tree\n"); - - start = __pa(initial_boot_params); - size = initial_boot_params->totalsize; - - if ((memory_limit && (start + size) > memory_limit) || - overlaps_crashkernel(start, size)) { - p = __va(lmb_alloc_base(size, PAGE_SIZE, lmb.rmo_size)); - memcpy(p, initial_boot_params, size); - initial_boot_params = (struct boot_param_header *)p; - DBG("Moved device tree to 0x%p\n", p); - } - - DBG("<- move_device_tree\n"); -} /** * unflattens the device-tree passed by the firmware, creating the @@ -531,11 +911,7 @@ static struct ibm_pa_feature { {CPU_FTR_CTRL, 0, 0, 3, 0}, {CPU_FTR_NOEXECUTE, 0, 0, 6, 0}, {CPU_FTR_NODSISRALIGN, 0, 1, 1, 1}, -#if 0 - /* put this back once we know how to test if firmware does 64k IO */ {CPU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, -#endif - {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, }; static void __init check_cpu_pa_features(unsigned long node) @@ -694,7 +1070,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node, iommu_force_on = 1; #endif - /* mem=x on the command line is the preferred mechanism */ lprop = of_get_flat_dt_prop(node, "linux,memory-limit", NULL); if (lprop) memory_limit = *lprop; @@ -708,6 +1083,24 @@ static int __init early_init_dt_scan_chosen(unsigned long node, tce_alloc_end = *lprop; #endif +#ifdef CONFIG_PPC_RTAS + /* To help early debugging via the front panel, we retrieve a minimal + * set of RTAS infos now if available + */ + { + u64 *basep, *entryp, *sizep; + + basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL); + entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL); + sizep = of_get_flat_dt_prop(node, "linux,rtas-size", NULL); + if (basep && entryp && sizep) { + rtas.base = *basep; + rtas.entry = *entryp; + rtas.size = *sizep; + } + } +#endif /* CONFIG_PPC_RTAS */ + #ifdef CONFIG_KEXEC lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); if (lprop) @@ -730,6 +1123,17 @@ static int __init early_init_dt_scan_chosen(unsigned long node, DBG("Command line is: %s\n", cmd_line); + if (strstr(cmd_line, "mem=")) { + char *p, *q; + + for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) { + q = p + 4; + if (p > cmd_line && p[-1] != ' ') + continue; + memory_limit = memparse(q, &q); + } + } + /* break now */ return 1; } @@ -833,17 +1237,9 @@ static void __init early_reserve_mem(void) { u64 base, size; u64 *reserve_map; - unsigned long self_base; - unsigned long self_size; reserve_map = (u64 *)(((unsigned long)initial_boot_params) + initial_boot_params->off_mem_rsvmap); - - /* before we do anything, lets reserve the dt blob */ - self_base = __pa((unsigned long)initial_boot_params); - self_size = initial_boot_params->totalsize; - lmb_reserve(self_base, self_size); - #ifdef CONFIG_PPC32 /* * Handle the case where we might be booting from an old kexec @@ -858,9 +1254,6 @@ static void __init early_reserve_mem(void) size_32 = *(reserve_map_32++); if (size_32 == 0) break; - /* skip if the reservation is for the blob */ - if (base_32 == self_base && size_32 == self_size) - continue; DBG("reserving: %x -> %x\n", base_32, size_32); lmb_reserve(base_32, size_32); } @@ -872,9 +1265,6 @@ static void __init early_reserve_mem(void) size = *(reserve_map++); if (size == 0) break; - /* skip if the reservation is for the blob */ - if (base == self_base && size == self_size) - continue; DBG("reserving: %llx -> %llx\n", base, size); lmb_reserve(base, size); } @@ -892,11 +1282,6 @@ void __init early_init_devtree(void *params) /* Setup flat device-tree pointer */ initial_boot_params = params; -#ifdef CONFIG_PPC_RTAS - /* Some machines might need RTAS info for debugging, grab it now. */ - of_scan_flat_dt(early_init_dt_scan_rtas, NULL); -#endif - /* Retrieve various informations from the /chosen node of the * device-tree, including the platform type, initrd location and * size, TCE reserve, and more ... @@ -907,25 +1292,17 @@ void __init early_init_devtree(void *params) lmb_init(); of_scan_flat_dt(early_init_dt_scan_root, NULL); of_scan_flat_dt(early_init_dt_scan_memory, NULL); - - /* Save command line for /proc/cmdline and then parse parameters */ - strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); - parse_early_param(); - - /* Reserve LMB regions used by kernel, initrd, dt, etc... */ - lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); - reserve_kdump_trampoline(); - reserve_crashkernel(); - early_reserve_mem(); - lmb_enforce_memory_limit(memory_limit); lmb_analyze(); DBG("Phys. mem: %lx\n", lmb_phys_mem_size()); - /* We may need to relocate the flat tree, do it now. - * FIXME .. and the initrd too? */ - move_device_tree(); + /* Reserve LMB regions used by kernel, initrd, dt, etc... */ + lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); +#ifdef CONFIG_CRASH_DUMP + lmb_reserve(0, KDUMP_RESERVE_LIMIT); +#endif + early_reserve_mem(); DBG("Scanning CPUs ...\n"); @@ -971,6 +1348,27 @@ prom_n_size_cells(struct device_node* np) } EXPORT_SYMBOL(prom_n_size_cells); +/** + * Work out the sense (active-low level / active-high edge) + * of each interrupt from the device tree. + */ +void __init prom_get_irq_senses(unsigned char *senses, int off, int max) +{ + struct device_node *np; + int i, j; + + /* default to level-triggered */ + memset(senses, IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE, max - off); + + for (np = allnodes; np != 0; np = np->allnext) { + for (j = 0; j < np->n_intrs; j++) { + i = np->intrs[j].line; + if (i >= off && i < max) + senses[i-off] = np->intrs[j].sense; + } + } +} + /** * Construct and return a list of the device_nodes with a given name. */ @@ -1370,6 +1768,7 @@ static void of_node_release(struct kref *kref) node->deadprops = NULL; } } + kfree(node->intrs); kfree(node->full_name); kfree(node->data); kfree(node); @@ -1442,7 +1841,13 @@ void of_detach_node(const struct device_node *np) #ifdef CONFIG_PPC_PSERIES /* * Fix up the uninitialized fields in a new device node: - * name, type and pci-specific fields + * 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) @@ -1483,6 +1888,8 @@ static int prom_reconfig_notifier(struct notifier_block *nb, switch (action) { case PSERIES_RECONFIG_ADD: err = of_finish_dynamic_node(node); + if (!err) + finish_node(node, NULL, 0); if (err < 0) { printk(KERN_ERR "finish_node returned %d\n", err); err = NOTIFY_BAD; @@ -1528,7 +1935,8 @@ struct property *of_find_property(struct device_node *np, const char *name, * Find a property with a given name for a given node * and return the value. */ -void *get_property(struct device_node *np, const char *name, int *lenp) +unsigned char *get_property(struct device_node *np, const char *name, + int *lenp) { struct property *pp = of_find_property(np,name,lenp); return pp ? pp->value : NULL; @@ -1645,70 +2053,29 @@ int prom_update_property(struct device_node *np, return 0; } - -/* Find the device node for a given logical cpu number, also returns the cpu - * local thread number (index in ibm,interrupt-server#s) if relevant and - * asked for (non NULL) - */ -struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) +#ifdef CONFIG_KEXEC +/* We may have allocated the flat device tree inside the crash kernel region + * in prom_init. If so we need to move it out into regular memory. */ +void kdump_move_device_tree(void) { - int hardid; - struct device_node *np; - - hardid = get_hard_smp_processor_id(cpu); + unsigned long start, end; + struct boot_param_header *new; - for_each_node_by_type(np, "cpu") { - u32 *intserv; - unsigned int plen, t; - - /* Check for ibm,ppc-interrupt-server#s. If it doesn't exist - * fallback to "reg" property and assume no threads - */ - intserv = (u32 *)get_property(np, "ibm,ppc-interrupt-server#s", - &plen); - if (intserv == NULL) { - u32 *reg = (u32 *)get_property(np, "reg", NULL); - if (reg == NULL) - continue; - if (*reg == hardid) { - if (thread) - *thread = 0; - return np; - } - } else { - plen /= sizeof(u32); - for (t = 0; t < plen; t++) { - if (hardid == intserv[t]) { - if (thread) - *thread = t; - return np; - } - } - } - } - return NULL; -} + start = __pa((unsigned long)initial_boot_params); + end = start + initial_boot_params->totalsize; -#ifdef DEBUG -static struct debugfs_blob_wrapper flat_dt_blob; + if (end < crashk_res.start || start > crashk_res.end) + return; -static int __init export_flat_device_tree(void) -{ - struct dentry *d; + new = (struct boot_param_header*) + __va(lmb_alloc(initial_boot_params->totalsize, PAGE_SIZE)); - d = debugfs_create_dir("powerpc", NULL); - if (!d) - return 1; + memcpy(new, initial_boot_params, initial_boot_params->totalsize); - flat_dt_blob.data = initial_boot_params; - flat_dt_blob.size = initial_boot_params->totalsize; + initial_boot_params = new; - d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR, - d, &flat_dt_blob); - if (!d) - return 1; + DBG("Flat device tree blob moved to %p\n", initial_boot_params); - return 0; + /* XXX should we unreserve the old DT? */ } -__initcall(export_flat_device_tree); -#endif +#endif /* CONFIG_KEXEC */ diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 59465e568..2e9c95386 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -16,6 +16,7 @@ #undef DEBUG_PROM #include +#include #include #include #include @@ -193,12 +194,19 @@ static int __initdata of_platform; static char __initdata prom_cmd_line[COMMAND_LINE_SIZE]; +static unsigned long __initdata prom_memory_limit; + static unsigned long __initdata alloc_top; static unsigned long __initdata alloc_top_high; static unsigned long __initdata alloc_bottom; static unsigned long __initdata rmo_top; static unsigned long __initdata ram_top; +#ifdef CONFIG_KEXEC +static unsigned long __initdata prom_crashk_base; +static unsigned long __initdata prom_crashk_size; +#endif + static struct mem_map_entry __initdata mem_reserve_map[MEM_RESERVE_MAP_SIZE]; static int __initdata mem_reserve_cnt; @@ -557,9 +565,7 @@ unsigned long prom_memparse(const char *ptr, const char **retptr) static void __init early_cmdline_parse(void) { struct prom_t *_prom = &RELOC(prom); -#ifdef CONFIG_PPC64 const char *opt; -#endif char *p; int l = 0; @@ -568,7 +574,7 @@ static void __init early_cmdline_parse(void) if ((long)_prom->chosen > 0) l = prom_getprop(_prom->chosen, "bootargs", p, COMMAND_LINE_SIZE-1); #ifdef CONFIG_CMDLINE - if (l <= 0 || p[0] == '\0') /* dbl check */ + if (l == 0) /* dbl check */ strlcpy(RELOC(prom_cmd_line), RELOC(CONFIG_CMDLINE), sizeof(prom_cmd_line)); #endif /* CONFIG_CMDLINE */ @@ -587,6 +593,45 @@ static void __init early_cmdline_parse(void) RELOC(iommu_force_on) = 1; } #endif + + opt = strstr(RELOC(prom_cmd_line), RELOC("mem=")); + if (opt) { + opt += 4; + RELOC(prom_memory_limit) = prom_memparse(opt, (const char **)&opt); +#ifdef CONFIG_PPC64 + /* Align to 16 MB == size of ppc64 large page */ + RELOC(prom_memory_limit) = ALIGN(RELOC(prom_memory_limit), 0x1000000); +#endif + } + +#ifdef CONFIG_KEXEC + /* + * crashkernel=size@addr specifies the location to reserve for + * crash kernel. + */ + opt = strstr(RELOC(prom_cmd_line), RELOC("crashkernel=")); + if (opt) { + opt += 12; + RELOC(prom_crashk_size) = + prom_memparse(opt, (const char **)&opt); + + if (ALIGN(RELOC(prom_crashk_size), 0x1000000) != + RELOC(prom_crashk_size)) { + prom_printf("Warning: crashkernel size is not " + "aligned to 16MB\n"); + } + + /* + * At present, the crash kernel always run at 32MB. + * Just ignore whatever user passed. + */ + RELOC(prom_crashk_base) = 0x2000000; + if (*opt == '@') { + prom_printf("Warning: PPC64 kdump kernel always runs " + "at 32 MB\n"); + } + } +#endif } #ifdef CONFIG_PPC_PSERIES @@ -646,13 +691,13 @@ static unsigned char ibm_architecture_vec[] = { 5 - 1, /* 5 option vectors */ /* option vector 1: processor architectures supported */ - 3 - 2, /* length */ + 3 - 1, /* length */ 0, /* don't ignore, don't halt */ OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 | OV1_PPC_2_04 | OV1_PPC_2_05, /* option vector 2: Open Firmware options supported */ - 34 - 2, /* length */ + 34 - 1, /* length */ OV2_REAL_MODE, 0, 0, W(0xffffffff), /* real_base */ @@ -666,16 +711,16 @@ static unsigned char ibm_architecture_vec[] = { 48, /* max log_2(hash table size) */ /* option vector 3: processor options supported */ - 3 - 2, /* length */ + 3 - 1, /* length */ 0, /* don't ignore, don't halt */ OV3_FP | OV3_VMX, /* option vector 4: IBM PAPR implementation */ - 2 - 2, /* length */ + 2 - 1, /* length */ 0, /* don't halt */ /* option vector 5: PAPR/OF options */ - 3 - 2, /* length */ + 3 - 1, /* length */ 0, /* don't ignore, don't halt */ OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES, }; @@ -989,7 +1034,7 @@ static void reserve_mem(u64 base, u64 size) } /* - * Initialize memory allocation mechanism, parse "memory" nodes and + * Initialize memory allocation mecanism, parse "memory" nodes and * obtain that way the top of memory and RMO to setup out local allocator */ static void __init prom_init_mem(void) @@ -1070,6 +1115,29 @@ static void __init prom_init_mem(void) RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); } + /* + * If prom_memory_limit is set we reduce the upper limits *except* for + * alloc_top_high. This must be the real top of RAM so we can put + * TCE's up there. + */ + + RELOC(alloc_top_high) = RELOC(ram_top); + + if (RELOC(prom_memory_limit)) { + if (RELOC(prom_memory_limit) <= RELOC(alloc_bottom)) { + prom_printf("Ignoring mem=%x <= alloc_bottom.\n", + RELOC(prom_memory_limit)); + RELOC(prom_memory_limit) = 0; + } else if (RELOC(prom_memory_limit) >= RELOC(ram_top)) { + prom_printf("Ignoring mem=%x >= ram_top.\n", + RELOC(prom_memory_limit)); + RELOC(prom_memory_limit) = 0; + } else { + RELOC(ram_top) = RELOC(prom_memory_limit); + RELOC(rmo_top) = min(RELOC(rmo_top), RELOC(prom_memory_limit)); + } + } + /* * Setup our top alloc point, that is top of RMO or top of * segment 0 when running non-LPAR. @@ -1082,14 +1150,20 @@ static void __init prom_init_mem(void) RELOC(rmo_top) = RELOC(ram_top); RELOC(rmo_top) = min(0x30000000ul, RELOC(rmo_top)); RELOC(alloc_top) = RELOC(rmo_top); - RELOC(alloc_top_high) = RELOC(ram_top); prom_printf("memory layout at init:\n"); + prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); prom_printf(" alloc_top : %x\n", RELOC(alloc_top)); prom_printf(" alloc_top_hi : %x\n", RELOC(alloc_top_high)); prom_printf(" rmo_top : %x\n", RELOC(rmo_top)); prom_printf(" ram_top : %x\n", RELOC(ram_top)); +#ifdef CONFIG_KEXEC + if (RELOC(prom_crashk_base)) { + prom_printf(" crashk_base : %x\n", RELOC(prom_crashk_base)); + prom_printf(" crashk_size : %x\n", RELOC(prom_crashk_size)); + } +#endif } @@ -1275,10 +1349,16 @@ static void __init prom_initialize_tce_table(void) reserve_mem(local_alloc_bottom, local_alloc_top - local_alloc_bottom); - /* These are only really needed if there is a memory limit in - * effect, but we don't know so export them always. */ - RELOC(prom_tce_alloc_start) = local_alloc_bottom; - RELOC(prom_tce_alloc_end) = local_alloc_top; + if (RELOC(prom_memory_limit)) { + /* + * We align the start to a 16MB boundary so we can map + * the TCE area using large pages if possible. + * The end should be the top of RAM so no need to align it. + */ + RELOC(prom_tce_alloc_start) = _ALIGN_DOWN(local_alloc_bottom, + 0x1000000); + RELOC(prom_tce_alloc_end) = local_alloc_top; + } /* Flag the first invalid entry */ prom_debug("ending prom_initialize_tce_table\n"); @@ -1961,7 +2041,11 @@ static void __init flatten_device_tree(void) /* Version 16 is not backward compatible */ hdr->last_comp_version = 0x10; - /* Copy the reserve map in */ + /* Reserve the whole thing and copy the reserve map in, we + * also bump mem_reserve_cnt to cause further reservations to + * fail since it's too late. + */ + reserve_mem(RELOC(dt_header_start), hdr->totalsize); memcpy(rsvmap, RELOC(mem_reserve_map), sizeof(mem_reserve_map)); #ifdef DEBUG_PROM @@ -1974,9 +2058,6 @@ static void __init flatten_device_tree(void) RELOC(mem_reserve_map)[i].size); } #endif - /* Bump mem_reserve_cnt to cause further reservations to fail - * since it's too late. - */ RELOC(mem_reserve_cnt) = MEM_RESERVE_MAP_SIZE; prom_printf("Device tree strings 0x%x -> 0x%x\n", @@ -1992,22 +2073,12 @@ static void __init flatten_device_tree(void) static void __init fixup_device_tree_maple(void) { phandle isa; - u32 rloc = 0x01002000; /* IO space; PCI device = 4 */ u32 isa_ranges[6]; - char *name; - - name = "/ht@0/isa@4"; - isa = call_prom("finddevice", 1, 1, ADDR(name)); - if (!PHANDLE_VALID(isa)) { - name = "/ht@0/isa@6"; - isa = call_prom("finddevice", 1, 1, ADDR(name)); - rloc = 0x01003000; /* IO space; PCI device = 6 */ - } + + isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); if (!PHANDLE_VALID(isa)) return; - if (prom_getproplen(isa, "ranges") != 12) - return; if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) == PROM_ERROR) return; @@ -2017,54 +2088,21 @@ static void __init fixup_device_tree_maple(void) isa_ranges[2] != 0x00010000) return; - prom_printf("Fixing up bogus ISA range on Maple/Apache...\n"); + prom_printf("fixing up bogus ISA range on Maple...\n"); isa_ranges[0] = 0x1; isa_ranges[1] = 0x0; - isa_ranges[2] = rloc; + isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ isa_ranges[3] = 0x0; isa_ranges[4] = 0x0; isa_ranges[5] = 0x00010000; - prom_setprop(isa, name, "ranges", + prom_setprop(isa, "/ht@0/isa@4", "ranges", isa_ranges, sizeof(isa_ranges)); } #else #define fixup_device_tree_maple() #endif -#ifdef CONFIG_PPC_CHRP -/* Pegasos lacks the "ranges" property in the isa node */ -static void __init fixup_device_tree_chrp(void) -{ - phandle isa; - u32 isa_ranges[6]; - char *name; - int rc; - - name = "/pci@80000000/isa@c"; - isa = call_prom("finddevice", 1, 1, ADDR(name)); - if (!PHANDLE_VALID(isa)) - return; - - rc = prom_getproplen(isa, "ranges"); - if (rc != 0 && rc != PROM_ERROR) - return; - - prom_printf("Fixing up missing ISA range on Pegasos...\n"); - - isa_ranges[0] = 0x1; - isa_ranges[1] = 0x0; - isa_ranges[2] = 0x01006000; - isa_ranges[3] = 0x0; - isa_ranges[4] = 0x0; - isa_ranges[5] = 0x00010000; - prom_setprop(isa, name, "ranges", - isa_ranges, sizeof(isa_ranges)); -} -#else -#define fixup_device_tree_chrp() -#endif - #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) static void __init fixup_device_tree_pmac(void) { @@ -2112,7 +2150,6 @@ static void __init fixup_device_tree_pmac(void) static void __init fixup_device_tree(void) { fixup_device_tree_maple(); - fixup_device_tree_chrp(); fixup_device_tree_pmac(); } @@ -2243,6 +2280,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, */ prom_init_mem(); +#ifdef CONFIG_KEXEC + if (RELOC(prom_crashk_base)) + reserve_mem(RELOC(prom_crashk_base), RELOC(prom_crashk_size)); +#endif /* * Determine which cpu is actually running right _now_ */ @@ -2276,6 +2317,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, /* * Fill in some infos for use by the kernel later on */ + if (RELOC(prom_memory_limit)) + prom_setprop(_prom->chosen, "/chosen", "linux,memory-limit", + &RELOC(prom_memory_limit), + sizeof(prom_memory_limit)); #ifdef CONFIG_PPC64 if (RELOC(ppc64_iommu_off)) prom_setprop(_prom->chosen, "/chosen", "linux,iommu-off", @@ -2295,6 +2340,16 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, } #endif +#ifdef CONFIG_KEXEC + if (RELOC(prom_crashk_base)) { + prom_setprop(_prom->chosen, "/chosen", "linux,crashkernel-base", + PTRRELOC(&prom_crashk_base), + sizeof(RELOC(prom_crashk_base))); + prom_setprop(_prom->chosen, "/chosen", "linux,crashkernel-size", + PTRRELOC(&prom_crashk_size), + sizeof(RELOC(prom_crashk_size))); + } +#endif /* * Fixup any known bugs in the device-tree */ diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index a10825a5d..3934c2275 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -38,6 +38,14 @@ static void of_dump_addr(const char *s, u32 *addr, int na) static void of_dump_addr(const char *s, u32 *addr, int na) { } #endif +/* Read a big address */ +static inline u64 of_read_addr(u32 *cell, int size) +{ + u64 r = 0; + while (size--) + r = (r << 32) | *(cell++); + return r; +} /* Callbacks for bus specific translators */ struct of_bus { @@ -69,9 +77,9 @@ static u64 of_bus_default_map(u32 *addr, u32 *range, int na, int ns, int pna) { u64 cp, s, da; - cp = of_read_number(range, na); - s = of_read_number(range + na + pna, ns); - da = of_read_number(addr, na); + cp = of_read_addr(range, na); + s = of_read_addr(range + na + pna, ns); + da = of_read_addr(addr, na); DBG("OF: default map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da); @@ -83,7 +91,7 @@ static u64 of_bus_default_map(u32 *addr, u32 *range, int na, int ns, int pna) static int of_bus_default_translate(u32 *addr, u64 offset, int na) { - u64 a = of_read_number(addr, na); + u64 a = of_read_addr(addr, na); memset(addr, 0, na * 4); a += offset; if (na > 1) @@ -127,9 +135,9 @@ static u64 of_bus_pci_map(u32 *addr, u32 *range, int na, int ns, int pna) return OF_BAD_ADDR; /* Read address values, skipping high cell */ - cp = of_read_number(range + 1, na - 1); - s = of_read_number(range + na + pna, ns); - da = of_read_number(addr + 1, na - 1); + cp = of_read_addr(range + 1, na - 1); + s = of_read_addr(range + na + pna, ns); + da = of_read_addr(addr + 1, na - 1); DBG("OF: PCI map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da); @@ -187,9 +195,9 @@ static u64 of_bus_isa_map(u32 *addr, u32 *range, int na, int ns, int pna) return OF_BAD_ADDR; /* Read address values, skipping high cell */ - cp = of_read_number(range + 1, na - 1); - s = of_read_number(range + na + pna, ns); - da = of_read_number(addr + 1, na - 1); + cp = of_read_addr(range + 1, na - 1); + s = of_read_addr(range + na + pna, ns); + da = of_read_addr(addr + 1, na - 1); DBG("OF: ISA map, cp="PRu64", s="PRu64", da="PRu64"\n", cp, s, da); @@ -287,7 +295,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, */ ranges = (u32 *)get_property(parent, "ranges", &rlen); if (ranges == NULL || rlen == 0) { - offset = of_read_number(addr, na); + offset = of_read_addr(addr, na); memset(addr, 0, pna * 4); DBG("OF: no ranges, 1:1 translation\n"); goto finish; @@ -370,7 +378,7 @@ u64 of_translate_address(struct device_node *dev, u32 *in_addr) /* If root, we have finished */ if (parent == NULL) { DBG("OF: reached root node\n"); - result = of_read_number(addr, na); + result = of_read_addr(addr, na); break; } @@ -434,7 +442,7 @@ u32 *of_get_address(struct device_node *dev, int index, u64 *size, for (i = 0; psize >= onesize; psize -= onesize, prop += onesize, i++) if (i == index) { if (size) - *size = of_read_number(prop + na, ns); + *size = of_read_addr(prop + na, ns); if (flags) *flags = bus->get_flags(prop); return prop; @@ -476,7 +484,7 @@ u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, for (i = 0; psize >= onesize; psize -= onesize, prop += onesize, i++) if ((prop[0] & 0xff) == ((bar_no * 4) + PCI_BASE_ADDRESS_0)) { if (size) - *size = of_read_number(prop + na, ns); + *size = of_read_addr(prop + na, ns); if (flags) *flags = bus->get_flags(prop); return prop; @@ -540,441 +548,3 @@ int of_pci_address_to_resource(struct device_node *dev, int bar, return __of_address_to_resource(dev, addrp, size, flags, r); } EXPORT_SYMBOL_GPL(of_pci_address_to_resource); - -void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop, - unsigned long *busno, unsigned long *phys, unsigned long *size) -{ - u32 *dma_window, cells; - unsigned char *prop; - - dma_window = (u32 *)dma_window_prop; - - /* busno is always one cell */ - *busno = *(dma_window++); - - prop = get_property(dn, "ibm,#dma-address-cells", NULL); - if (!prop) - prop = get_property(dn, "#address-cells", NULL); - - cells = prop ? *(u32 *)prop : prom_n_addr_cells(dn); - *phys = of_read_number(dma_window, cells); - - dma_window += cells; - - prop = get_property(dn, "ibm,#dma-size-cells", NULL); - cells = prop ? *(u32 *)prop : prom_n_size_cells(dn); - *size = of_read_number(dma_window, cells); -} - -/* - * Interrupt remapper - */ - -static unsigned int of_irq_workarounds; -static struct device_node *of_irq_dflt_pic; - -static struct device_node *of_irq_find_parent(struct device_node *child) -{ - struct device_node *p; - phandle *parp; - - if (!of_node_get(child)) - return NULL; - - do { - parp = (phandle *)get_property(child, "interrupt-parent", NULL); - if (parp == NULL) - p = of_get_parent(child); - else { - if (of_irq_workarounds & OF_IMAP_NO_PHANDLE) - p = of_node_get(of_irq_dflt_pic); - else - p = of_find_node_by_phandle(*parp); - } - of_node_put(child); - child = p; - } while (p && get_property(p, "#interrupt-cells", NULL) == NULL); - - return p; -} - -/* This doesn't need to be called if you don't have any special workaround - * flags to pass - */ -void of_irq_map_init(unsigned int flags) -{ - of_irq_workarounds = flags; - - /* OldWorld, don't bother looking at other things */ - if (flags & OF_IMAP_OLDWORLD_MAC) - return; - - /* If we don't have phandles, let's try to locate a default interrupt - * controller (happens when booting with BootX). We do a first match - * here, hopefully, that only ever happens on machines with one - * controller. - */ - if (flags & OF_IMAP_NO_PHANDLE) { - struct device_node *np; - - for(np = NULL; (np = of_find_all_nodes(np)) != NULL;) { - if (get_property(np, "interrupt-controller", NULL) - == NULL) - continue; - /* Skip /chosen/interrupt-controller */ - if (strcmp(np->name, "chosen") == 0) - continue; - /* It seems like at least one person on this planet wants - * to use BootX on a machine with an AppleKiwi controller - * which happens to pretend to be an interrupt - * controller too. - */ - if (strcmp(np->name, "AppleKiwi") == 0) - continue; - /* I think we found one ! */ - of_irq_dflt_pic = np; - break; - } - } - -} - -int of_irq_map_raw(struct device_node *parent, u32 *intspec, u32 ointsize, - u32 *addr, struct of_irq *out_irq) -{ - struct device_node *ipar, *tnode, *old = NULL, *newpar = NULL; - u32 *tmp, *imap, *imask; - u32 intsize = 1, addrsize, newintsize = 0, newaddrsize = 0; - int imaplen, match, i; - - DBG("of_irq_map_raw: par=%s,intspec=[0x%08x 0x%08x...],ointsize=%d\n", - parent->full_name, intspec[0], intspec[1], ointsize); - - ipar = of_node_get(parent); - - /* First get the #interrupt-cells property of the current cursor - * that tells us how to interpret the passed-in intspec. If there - * is none, we are nice and just walk up the tree - */ - do { - tmp = (u32 *)get_property(ipar, "#interrupt-cells", NULL); - if (tmp != NULL) { - intsize = *tmp; - break; - } - tnode = ipar; - ipar = of_irq_find_parent(ipar); - of_node_put(tnode); - } while (ipar); - if (ipar == NULL) { - DBG(" -> no parent found !\n"); - goto fail; - } - - DBG("of_irq_map_raw: ipar=%s, size=%d\n", ipar->full_name, intsize); - - if (ointsize != intsize) - return -EINVAL; - - /* Look for this #address-cells. We have to implement the old linux - * trick of looking for the parent here as some device-trees rely on it - */ - old = of_node_get(ipar); - do { - tmp = (u32 *)get_property(old, "#address-cells", NULL); - tnode = of_get_parent(old); - of_node_put(old); - old = tnode; - } while(old && tmp == NULL); - of_node_put(old); - old = NULL; - addrsize = (tmp == NULL) ? 2 : *tmp; - - DBG(" -> addrsize=%d\n", addrsize); - - /* Now start the actual "proper" walk of the interrupt tree */ - while (ipar != NULL) { - /* Now check if cursor is an interrupt-controller and if it is - * then we are done - */ - if (get_property(ipar, "interrupt-controller", NULL) != NULL) { - DBG(" -> got it !\n"); - memcpy(out_irq->specifier, intspec, - intsize * sizeof(u32)); - out_irq->size = intsize; - out_irq->controller = ipar; - of_node_put(old); - return 0; - } - - /* Now look for an interrupt-map */ - imap = (u32 *)get_property(ipar, "interrupt-map", &imaplen); - /* No interrupt map, check for an interrupt parent */ - if (imap == NULL) { - DBG(" -> no map, getting parent\n"); - newpar = of_irq_find_parent(ipar); - goto skiplevel; - } - imaplen /= sizeof(u32); - - /* Look for a mask */ - imask = (u32 *)get_property(ipar, "interrupt-map-mask", NULL); - - /* If we were passed no "reg" property and we attempt to parse - * an interrupt-map, then #address-cells must be 0. - * Fail if it's not. - */ - if (addr == NULL && addrsize != 0) { - DBG(" -> no reg passed in when needed !\n"); - goto fail; - } - - /* Parse interrupt-map */ - match = 0; - while (imaplen > (addrsize + intsize + 1) && !match) { - /* Compare specifiers */ - match = 1; - for (i = 0; i < addrsize && match; ++i) { - u32 mask = imask ? imask[i] : 0xffffffffu; - match = ((addr[i] ^ imap[i]) & mask) == 0; - } - for (; i < (addrsize + intsize) && match; ++i) { - u32 mask = imask ? imask[i] : 0xffffffffu; - match = - ((intspec[i-addrsize] ^ imap[i]) & mask) == 0; - } - imap += addrsize + intsize; - imaplen -= addrsize + intsize; - - DBG(" -> match=%d (imaplen=%d)\n", match, imaplen); - - /* Get the interrupt parent */ - if (of_irq_workarounds & OF_IMAP_NO_PHANDLE) - newpar = of_node_get(of_irq_dflt_pic); - else - newpar = of_find_node_by_phandle((phandle)*imap); - imap++; - --imaplen; - - /* Check if not found */ - if (newpar == NULL) { - DBG(" -> imap parent not found !\n"); - goto fail; - } - - /* Get #interrupt-cells and #address-cells of new - * parent - */ - tmp = (u32 *)get_property(newpar, "#interrupt-cells", - NULL); - if (tmp == NULL) { - DBG(" -> parent lacks #interrupt-cells !\n"); - goto fail; - } - newintsize = *tmp; - tmp = (u32 *)get_property(newpar, "#address-cells", - NULL); - newaddrsize = (tmp == NULL) ? 0 : *tmp; - - DBG(" -> newintsize=%d, newaddrsize=%d\n", - newintsize, newaddrsize); - - /* Check for malformed properties */ - if (imaplen < (newaddrsize + newintsize)) - goto fail; - - imap += newaddrsize + newintsize; - imaplen -= newaddrsize + newintsize; - - DBG(" -> imaplen=%d\n", imaplen); - } - if (!match) - goto fail; - - of_node_put(old); - old = of_node_get(newpar); - addrsize = newaddrsize; - intsize = newintsize; - intspec = imap - intsize; - addr = intspec - addrsize; - - skiplevel: - /* Iterate again with new parent */ - DBG(" -> new parent: %s\n", newpar ? newpar->full_name : "<>"); - of_node_put(ipar); - ipar = newpar; - newpar = NULL; - } - fail: - of_node_put(ipar); - of_node_put(old); - of_node_put(newpar); - - return -EINVAL; -} -EXPORT_SYMBOL_GPL(of_irq_map_raw); - -#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) -static int of_irq_map_oldworld(struct device_node *device, int index, - struct of_irq *out_irq) -{ - u32 *ints; - int intlen; - - /* - * Old machines just have a list of interrupt numbers - * and no interrupt-controller nodes. - */ - ints = (u32 *) get_property(device, "AAPL,interrupts", &intlen); - if (ints == NULL) - return -EINVAL; - intlen /= sizeof(u32); - - if (index >= intlen) - return -EINVAL; - - out_irq->controller = NULL; - out_irq->specifier[0] = ints[index]; - out_irq->size = 1; - - return 0; -} -#else /* defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) */ -static int of_irq_map_oldworld(struct device_node *device, int index, - struct of_irq *out_irq) -{ - return -EINVAL; -} -#endif /* !(defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)) */ - -int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq) -{ - struct device_node *p; - u32 *intspec, *tmp, intsize, intlen, *addr; - int res; - - DBG("of_irq_map_one: dev=%s, index=%d\n", device->full_name, index); - - /* OldWorld mac stuff is "special", handle out of line */ - if (of_irq_workarounds & OF_IMAP_OLDWORLD_MAC) - return of_irq_map_oldworld(device, index, out_irq); - - /* Get the interrupts property */ - intspec = (u32 *)get_property(device, "interrupts", &intlen); - if (intspec == NULL) - return -EINVAL; - intlen /= sizeof(u32); - - /* Get the reg property (if any) */ - addr = (u32 *)get_property(device, "reg", NULL); - - /* Look for the interrupt parent. */ - p = of_irq_find_parent(device); - if (p == NULL) - return -EINVAL; - - /* Get size of interrupt specifier */ - tmp = (u32 *)get_property(p, "#interrupt-cells", NULL); - if (tmp == NULL) { - of_node_put(p); - return -EINVAL; - } - intsize = *tmp; - - DBG(" intsize=%d intlen=%d\n", intsize, intlen); - - /* Check index */ - if ((index + 1) * intsize > intlen) - return -EINVAL; - - /* Get new specifier and map it */ - res = of_irq_map_raw(p, intspec + index * intsize, intsize, - addr, out_irq); - of_node_put(p); - return res; -} -EXPORT_SYMBOL_GPL(of_irq_map_one); - -#ifdef CONFIG_PCI -static u8 of_irq_pci_swizzle(u8 slot, u8 pin) -{ - return (((pin - 1) + slot) % 4) + 1; -} - -int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq) -{ - struct device_node *dn, *ppnode; - struct pci_dev *ppdev; - u32 lspec; - u32 laddr[3]; - u8 pin; - int rc; - - /* Check if we have a device node, if yes, fallback to standard OF - * parsing - */ - dn = pci_device_to_OF_node(pdev); - if (dn) - return of_irq_map_one(dn, 0, out_irq); - - /* Ok, we don't, time to have fun. Let's start by building up an - * interrupt spec. we assume #interrupt-cells is 1, which is standard - * for PCI. If you do different, then don't use that routine. - */ - rc = pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pin); - if (rc != 0) - return rc; - /* No pin, exit */ - if (pin == 0) - return -ENODEV; - - /* Now we walk up the PCI tree */ - lspec = pin; - for (;;) { - /* Get the pci_dev of our parent */ - ppdev = pdev->bus->self; - - /* Ouch, it's a host bridge... */ - if (ppdev == NULL) { -#ifdef CONFIG_PPC64 - ppnode = pci_bus_to_OF_node(pdev->bus); -#else - struct pci_controller *host; - host = pci_bus_to_host(pdev->bus); - ppnode = host ? host->arch_data : NULL; -#endif - /* No node for host bridge ? give up */ - if (ppnode == NULL) - return -EINVAL; - } else - /* We found a P2P bridge, check if it has a node */ - ppnode = pci_device_to_OF_node(ppdev); - - /* Ok, we have found a parent with a device-node, hand over to - * the OF parsing code. - * We build a unit address from the linux device to be used for - * resolution. Note that we use the linux bus number which may - * not match your firmware bus numbering. - * Fortunately, in most cases, interrupt-map-mask doesn't include - * the bus number as part of the matching. - * You should still be careful about that though if you intend - * to rely on this function (you ship a firmware that doesn't - * create device nodes for all PCI devices). - */ - if (ppnode) - break; - - /* We can only get here if we hit a P2P bridge with no node, - * let's do standard swizzling and try again - */ - lspec = of_irq_pci_swizzle(PCI_SLOT(pdev->devfn), lspec); - pdev = ppdev; - } - - laddr[0] = (pdev->bus->number << 16) - | (pdev->devfn << 8); - laddr[1] = laddr[2] = 0; - return of_irq_map_raw(ppnode, &lspec, 1, laddr, out_irq); -} -EXPORT_SYMBOL_GPL(of_irq_map_pci); -#endif /* CONFIG_PCI */ diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h index 8797ae737..c42a860c8 100644 --- a/arch/powerpc/kernel/ptrace-common.h +++ b/arch/powerpc/kernel/ptrace-common.h @@ -10,6 +10,7 @@ #ifndef _PPC64_PTRACE_COMMON_H #define _PPC64_PTRACE_COMMON_H +#include #include /* diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index dea75d73f..4a677d1bd 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@ -15,6 +15,7 @@ * this archive for more details. */ +#include #include #include #include @@ -403,6 +404,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = ptrace_detach(child, data); break; +#ifdef CONFIG_PPC64 case PPC_PTRACE_GETREGS: { /* Get GPRs 0 - 31. */ int i; unsigned long *reg = &((unsigned long *)child->thread.regs)[0]; @@ -466,6 +468,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) } break; } +#endif /* CONFIG_PPC64 */ #ifdef CONFIG_ALTIVEC case PTRACE_GETVRREGS: diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 9b9a23034..826ee3d05 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c @@ -17,6 +17,7 @@ * this archive for more details. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c index 77578c093..34d073fb6 100644 --- a/arch/powerpc/kernel/rtas-rtc.c +++ b/arch/powerpc/kernel/rtas-rtc.c @@ -14,20 +14,19 @@ unsigned long __init rtas_get_boot_time(void) { int ret[8]; - int error; - unsigned int wait_time; + int error, wait_time; u64 max_wait_tb; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; do { error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); - - wait_time = rtas_busy_delay_time(error); - if (wait_time) { + if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { + wait_time = rtas_extended_busy_delay_time(error); /* This is boot time so we spin. */ udelay(wait_time*1000); + error = RTAS_CLOCK_BUSY; } - } while (wait_time && (get_tb() < max_wait_tb)); + } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb)); if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", @@ -45,25 +44,24 @@ unsigned long __init rtas_get_boot_time(void) void rtas_get_rtc_time(struct rtc_time *rtc_tm) { int ret[8]; - int error; - unsigned int wait_time; + int error, wait_time; u64 max_wait_tb; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; do { error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); - - wait_time = rtas_busy_delay_time(error); - if (wait_time) { + if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { if (in_interrupt() && printk_ratelimit()) { memset(rtc_tm, 0, sizeof(struct rtc_time)); printk(KERN_WARNING "error: reading clock" " would delay interrupt\n"); return; /* delay not allowed */ } + wait_time = rtas_extended_busy_delay_time(error); msleep(wait_time); + error = RTAS_CLOCK_BUSY; } - } while (wait_time && (get_tb() < max_wait_tb)); + } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb)); if (error != 0 && printk_ratelimit()) { printk(KERN_WARNING "error: reading the clock failed (%d)\n", @@ -90,14 +88,14 @@ int rtas_set_rtc_time(struct rtc_time *tm) tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, 0); - - wait_time = rtas_busy_delay_time(error); - if (wait_time) { + if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { if (in_interrupt()) return 1; /* probably decrementer */ + wait_time = rtas_extended_busy_delay_time(error); msleep(wait_time); + error = RTAS_CLOCK_BUSY; } - } while (wait_time && (get_tb() < max_wait_tb)); + } while (error == RTAS_CLOCK_BUSY && (get_tb() < max_wait_tb)); if (error != 0 && printk_ratelimit()) printk(KERN_WARNING "error: setting the clock failed (%d)\n", diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 77f1e06d2..011231821 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c @@ -38,19 +38,16 @@ struct rtas_t rtas = { .lock = SPIN_LOCK_UNLOCKED }; -EXPORT_SYMBOL(rtas); struct rtas_suspend_me_data { long waiting; struct rtas_args *args; }; -DEFINE_SPINLOCK(rtas_data_buf_lock); -EXPORT_SYMBOL(rtas_data_buf_lock); +EXPORT_SYMBOL(rtas); +DEFINE_SPINLOCK(rtas_data_buf_lock); char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned; -EXPORT_SYMBOL(rtas_data_buf); - unsigned long rtas_rmo_buf; /* @@ -109,71 +106,11 @@ static void call_rtas_display_status_delay(char c) } } -void __init udbg_init_rtas_panel(void) +void __init udbg_init_rtas(void) { udbg_putc = call_rtas_display_status_delay; } -#ifdef CONFIG_UDBG_RTAS_CONSOLE - -/* If you think you're dying before early_init_dt_scan_rtas() does its - * work, you can hard code the token values for your firmware here and - * hardcode rtas.base/entry etc. - */ -static unsigned int rtas_putchar_token = RTAS_UNKNOWN_SERVICE; -static unsigned int rtas_getchar_token = RTAS_UNKNOWN_SERVICE; - -static void udbg_rtascon_putc(char c) -{ - int tries; - - if (!rtas.base) - return; - - /* Add CRs before LFs */ - if (c == '\n') - udbg_rtascon_putc('\r'); - - /* if there is more than one character to be displayed, wait a bit */ - for (tries = 0; tries < 16; tries++) { - if (rtas_call(rtas_putchar_token, 1, 1, NULL, c) == 0) - break; - udelay(1000); - } -} - -static int udbg_rtascon_getc_poll(void) -{ - int c; - - if (!rtas.base) - return -1; - - if (rtas_call(rtas_getchar_token, 0, 2, &c)) - return -1; - - return c; -} - -static int udbg_rtascon_getc(void) -{ - int c; - - while ((c = udbg_rtascon_getc_poll()) == -1) - ; - - return c; -} - - -void __init udbg_init_rtas_console(void) -{ - udbg_putc = udbg_rtascon_putc; - udbg_getc = udbg_rtascon_getc; - udbg_getc_poll = udbg_rtascon_getc_poll; -} -#endif /* CONFIG_UDBG_RTAS_CONSOLE */ - void rtas_progress(char *s, unsigned short hex) { struct device_node *root; @@ -299,7 +236,6 @@ int rtas_token(const char *service) tokp = (int *) get_property(rtas.dev, service, NULL); return tokp ? *tokp : RTAS_UNKNOWN_SERVICE; } -EXPORT_SYMBOL(rtas_token); #ifdef CONFIG_RTAS_ERROR_LOGGING /* @@ -392,7 +328,7 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...) char *buff_copy = NULL; int ret; - if (!rtas.entry || token == RTAS_UNKNOWN_SERVICE) + if (token == RTAS_UNKNOWN_SERVICE) return -1; /* Gotta do something different here, use global lock for now... */ @@ -433,41 +369,26 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...) } return ret; } -EXPORT_SYMBOL(rtas_call); -/* For RTAS_BUSY (-2), delay for 1 millisecond. For an extended busy status - * code of 990n, perform the hinted delay of 10^n (last digit) milliseconds. +/* 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). */ -unsigned int rtas_busy_delay_time(int status) +unsigned int rtas_extended_busy_delay_time(int status) { - int order; - unsigned int ms = 0; - - if (status == RTAS_BUSY) { - ms = 1; - } else if (status >= 9900 && status <= 9905) { - order = status - 9900; - for (ms = 1; order > 0; order--) - ms *= 10; - } - - return ms; -} -EXPORT_SYMBOL(rtas_busy_delay_time); + int order = status - 9900; + unsigned long ms; -/* For an RTAS busy status code, perform the hinted delay. */ -unsigned int rtas_busy_delay(int status) -{ - unsigned int ms; + if (order < 0) + order = 0; /* RTC depends on this for -2 clock busy */ + else if (order > 5) + order = 5; /* bound */ - might_sleep(); - ms = rtas_busy_delay_time(status); - if (ms) - msleep(ms); + /* Use microseconds for reasonable accuracy */ + for (ms = 1; order > 0; order--) + ms *= 10; - return ms; + return ms; } -EXPORT_SYMBOL(rtas_busy_delay); int rtas_error_rc(int rtas_rc) { @@ -513,80 +434,80 @@ int rtas_get_power_level(int powerdomain, int *level) return rtas_error_rc(rc); return rc; } -EXPORT_SYMBOL(rtas_get_power_level); int rtas_set_power_level(int powerdomain, int level, int *setlevel) { int token = rtas_token("set-power-level"); + unsigned int wait_time; int rc; if (token == RTAS_UNKNOWN_SERVICE) return -ENOENT; - do { + while (1) { rc = rtas_call(token, 2, 2, setlevel, powerdomain, level); - } while (rtas_busy_delay(rc)); + 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; + } if (rc < 0) return rtas_error_rc(rc); return rc; } -EXPORT_SYMBOL(rtas_set_power_level); int rtas_get_sensor(int sensor, int index, int *state) { int token = rtas_token("get-sensor-state"); + unsigned int wait_time; int rc; if (token == RTAS_UNKNOWN_SERVICE) return -ENOENT; - do { + while (1) { rc = rtas_call(token, 2, 2, state, sensor, index); - } while (rtas_busy_delay(rc)); + 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; + } if (rc < 0) return rtas_error_rc(rc); return rc; } -EXPORT_SYMBOL(rtas_get_sensor); 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 -ENOENT; - do { + while (1) { rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value); - } while (rtas_busy_delay(rc)); - - if (rc < 0) - return rtas_error_rc(rc); - return rc; -} -EXPORT_SYMBOL(rtas_set_indicator); - -/* - * Ignoring RTAS extended delay - */ -int rtas_set_indicator_fast(int indicator, int index, int new_value) -{ - int rc; - int token = rtas_token("set-indicator"); - - if (token == RTAS_UNKNOWN_SERVICE) - return -ENOENT; - - rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value); - - WARN_ON(rc == -2 || (rc >= 9900 && rc <= 9905)); + 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; + } if (rc < 0) return rtas_error_rc(rc); - return rc; } @@ -634,11 +555,13 @@ void rtas_os_term(char *str) do { status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, __pa(rtas_os_term_buf)); - } while (rtas_busy_delay(status)); - if (status != 0) - printk(KERN_EMERG "ibm,os-term call failed %d\n", + if (status == RTAS_BUSY) + udelay(1); + else if (status != 0) + printk(KERN_EMERG "ibm,os-term call failed %d\n", status); + } while (status == RTAS_BUSY); } static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; @@ -685,31 +608,9 @@ out: static int rtas_ibm_suspend_me(struct rtas_args *args) { int i; - long state; - long rc; - unsigned long dummy; struct rtas_suspend_me_data data; - /* Make sure the state is valid */ - rc = plpar_hcall(H_VASI_STATE, - ((u64)args->args[0] << 32) | args->args[1], - 0, 0, 0, - &state, &dummy, &dummy); - - if (rc) { - printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc); - return rc; - } else if (state == H_VASI_ENABLED) { - args->args[args->nargs] = RTAS_NOT_SUSPENDABLE; - return 0; - } else if (state != H_VASI_SUSPENDING) { - printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned state %ld\n", - state); - args->args[args->nargs] = -1; - return 0; - } - data.waiting = 1; data.args = args; @@ -883,34 +784,13 @@ void __init rtas_initialize(void) #endif } -int __init early_init_dt_scan_rtas(unsigned long node, - const char *uname, int depth, void *data) -{ - u32 *basep, *entryp, *sizep; - - if (depth != 1 || strcmp(uname, "rtas") != 0) - return 0; - - basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL); - entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL); - sizep = of_get_flat_dt_prop(node, "rtas-size", NULL); - - if (basep && entryp && sizep) { - rtas.base = *basep; - rtas.entry = *entryp; - rtas.size = *sizep; - } - -#ifdef CONFIG_UDBG_RTAS_CONSOLE - basep = of_get_flat_dt_prop(node, "put-term-char", NULL); - if (basep) - rtas_putchar_token = *basep; - - basep = of_get_flat_dt_prop(node, "get-term-char", NULL); - if (basep) - rtas_getchar_token = *basep; -#endif - /* break now */ - return 1; -} +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_power_level); +EXPORT_SYMBOL(rtas_set_indicator); diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 1442b63a7..aaf384c3f 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -365,12 +365,20 @@ static int rtas_excl_release(struct inode *inode, struct file *file) static void manage_flash(struct rtas_manage_flash_t *args_buf) { + unsigned int wait_time; s32 rc; - do { + while (1) { rc = rtas_call(rtas_token("ibm,manage-flash-image"), 1, 1, NULL, args_buf->op); - } while (rtas_busy_delay(rc)); + 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; } @@ -443,18 +451,27 @@ static ssize_t manage_flash_write(struct file *file, const char __user *buf, static void validate_flash(struct rtas_validate_flash_t *args_buf) { int token = rtas_token("ibm,validate-flash-image"); + unsigned int wait_time; int update_results; s32 rc; rc = 0; - do { + while(1) { spin_lock(&rtas_data_buf_lock); memcpy(rtas_data_buf, args_buf->buf, VALIDATE_BUF_SIZE); rc = rtas_call(token, 2, 2, &update_results, (u32) __pa(rtas_data_buf), args_buf->buf_size); memcpy(args_buf->buf, rtas_data_buf, VALIDATE_BUF_SIZE); spin_unlock(&rtas_data_buf_lock); - } while (rtas_busy_delay(rc)); + + 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 = update_results; diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index cda022657..57b539a03 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c @@ -297,15 +297,23 @@ unsigned long __init find_and_init_phbs(void) struct device_node *node; struct pci_controller *phb; unsigned int index; + unsigned int root_size_cells = 0; + unsigned int *opprop = NULL; struct device_node *root = of_find_node_by_path("/"); + if (ppc64_interrupt_controller == IC_OPEN_PIC) { + opprop = (unsigned int *)get_property(root, + "platform-open-pic", NULL); + } + + root_size_cells = prom_n_size_cells(root); + index = 0; + for (node = of_get_next_child(root, NULL); node != NULL; node = of_get_next_child(root, node)) { - - if (node->type == NULL || (strcmp(node->type, "pci") != 0 && - strcmp(node->type, "pciex") != 0)) + if (node->type == NULL || strcmp(node->type, "pci") != 0) continue; phb = pcibios_alloc_controller(node); @@ -314,6 +322,13 @@ unsigned long __init find_and_init_phbs(void) setup_phb(node, phb); pci_process_bridge_OF_ranges(phb, node, 0); pci_setup_phb_io(phb, index == 0); +#ifdef CONFIG_PPC_PSERIES + /* XXX This code need serious fixing ... --BenH */ + if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) { + int addr = root_size_cells * (index + 2) - 1; + mpic_assign_isu(pSeries_mpic, index, opprop[addr]); + } +#endif index++; } diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 499c38610..684ab1d49 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -12,6 +12,7 @@ #undef DEBUG +#include #include #include #include @@ -26,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -442,7 +443,6 @@ void __init smp_setup_cpu_maps(void) } #endif /* CONFIG_SMP */ -int __initdata do_early_xmon; #ifdef CONFIG_XMON static int __init early_xmon(char *p) { @@ -456,7 +456,7 @@ static int __init early_xmon(char *p) return 0; } xmon_init(1); - do_early_xmon = 1; + debugger(NULL); return 0; } @@ -524,20 +524,3 @@ int check_legacy_ioport(unsigned long base_port) return ppc_md.check_legacy_ioport(base_port); } EXPORT_SYMBOL(check_legacy_ioport); - -static int ppc_panic_event(struct notifier_block *this, - unsigned long event, void *ptr) -{ - ppc_md.panic(ptr); /* May not return */ - return NOTIFY_DONE; -} - -static struct notifier_block ppc_panic_block = { - .notifier_call = ppc_panic_event, - .priority = INT_MIN /* may not return; must be done last */ -}; - -void __init setup_panic(void) -{ - atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block); -} diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h index 4c67ad7fa..2ebba7552 100644 --- a/arch/powerpc/kernel/setup.h +++ b/arch/powerpc/kernel/setup.h @@ -2,8 +2,5 @@ #define _POWERPC_KERNEL_SETUP_H void check_for_initrd(void); -void do_init_bootmem(void); -void setup_panic(void); -extern int do_early_xmon; #endif /* _POWERPC_KERNEL_SETUP_H */ diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index e0df2ba1a..69ac25701 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -2,6 +2,7 @@ * Common prep/pmac/chrp boot and setup code. */ +#include #include #include #include @@ -51,6 +52,7 @@ extern void bootx_init(unsigned long r4, unsigned long phys); +boot_infos_t *boot_infos; struct ide_machdep_calls ppc_ide_md; int boot_cpuid; @@ -129,6 +131,12 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) /* Do some early initialization based on the flat device tree */ early_init_devtree(__va(dt_ptr)); + /* Check default command line */ +#ifdef CONFIG_CMDLINE + if (cmd_line[0] == 0) + strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); +#endif /* CONFIG_CMDLINE */ + probe_machine(); #ifdef CONFIG_6xx @@ -213,7 +221,7 @@ int __init ppc_init(void) /* register CPU devices */ for_each_possible_cpu(i) - register_cpu(&cpu_devices[i], i); + register_cpu(&cpu_devices[i], i, NULL); /* call platform init */ if (ppc_md.init != NULL) { @@ -227,7 +235,7 @@ arch_initcall(ppc_init); /* Warning, IO base is not yet inited */ void __init setup_arch(char **cmdline_p) { - *cmdline_p = cmd_line; + extern void do_init_bootmem(void); /* so udelay does something sensible, assume <= 1000 bogomips */ loops_per_jiffy = 500000000 / HZ; @@ -239,6 +247,7 @@ void __init setup_arch(char **cmdline_p) ppc_md.init_early(); find_legacy_serial_ports(); + finish_device_tree(); smp_setup_cpu_maps(); @@ -276,16 +285,16 @@ void __init setup_arch(char **cmdline_p) /* reboot on panic */ panic_timeout = 180; - if (ppc_md.panic) - setup_panic(); - init_mm.start_code = PAGE_OFFSET; init_mm.end_code = (unsigned long) _etext; init_mm.end_data = (unsigned long) _edata; init_mm.brk = klimit; - if (do_early_xmon) - debugger(NULL); + /* Save unparsed command line copy for /proc/cmdline */ + strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); + *cmdline_p = cmd_line; + + parse_early_param(); /* set up the bootmem stuff with available memory */ do_init_bootmem(); diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index fd1785e4c..4467c4990 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -12,6 +12,7 @@ #undef DEBUG +#include #include #include #include @@ -99,6 +100,12 @@ unsigned long SYSRQ_KEY; #endif /* CONFIG_MAGIC_SYSRQ */ +static int ppc64_panic_event(struct notifier_block *, unsigned long, void *); +static struct notifier_block ppc64_panic_block = { + .notifier_call = ppc64_panic_event, + .priority = INT_MIN /* may not return; must be done last */ +}; + #ifdef CONFIG_SMP static int smt_enabled_cmdline; @@ -148,13 +155,6 @@ early_param("smt-enabled", early_smt_enabled); #define check_smt_enabled() #endif /* CONFIG_SMP */ -/* Put the paca pointer into r13 and SPRG3 */ -void __init setup_paca(int cpu) -{ - local_paca = &paca[cpu]; - mtspr(SPRN_SPRG3, local_paca); -} - /* * Early initialization entry point. This is called by head.S * with MMU translation disabled. We rely on the "feature" of @@ -176,9 +176,6 @@ void __init setup_paca(int cpu) void __init early_setup(unsigned long dt_ptr) { - /* Assume we're on cpu 0 for now. Don't write to the paca yet! */ - setup_paca(0); - /* Enable early debugging if any specified (see udbg.h) */ udbg_early_init(); @@ -192,7 +189,7 @@ void __init early_setup(unsigned long dt_ptr) early_init_devtree(__va(dt_ptr)); /* Now we know the logical id of our boot cpu, setup the paca. */ - setup_paca(boot_cpuid); + setup_boot_paca(); /* Fix up paca fields required for the boot cpu */ get_paca()->cpu_start = 1; @@ -202,7 +199,9 @@ void __init early_setup(unsigned long dt_ptr) /* Probe the machine type */ probe_machine(); - setup_kdump_trampoline(); +#ifdef CONFIG_CRASH_DUMP + kdump_setup(); +#endif DBG("Found, Initializing memory management...\n"); @@ -354,22 +353,30 @@ void __init setup_system(void) { DBG(" -> setup_system()\n"); +#ifdef CONFIG_KEXEC + kdump_move_device_tree(); +#endif /* * Unflatten the device-tree passed by prom_init or kexec */ unflatten_device_tree(); +#ifdef CONFIG_KEXEC + kexec_setup(); /* requires unflattened device tree. */ +#endif + /* * Fill the ppc64_caches & systemcfg structures with informations - * retrieved from the device-tree. + * retrieved from the device-tree. Need to be called before + * finish_device_tree() since the later requires some of the + * informations filled up here to properly parse the interrupt + * tree. + * It also sets up the cache line sizes which allows to call + * routines like flush_icache_range (used by the hash init + * later on). */ initialize_cache_info(); - /* - * Initialize irq remapping subsystem - */ - irq_early_init(); - #ifdef CONFIG_PPC_RTAS /* * Initialize RTAS if available @@ -396,6 +403,12 @@ void __init setup_system(void) */ find_legacy_serial_ports(); + /* + * "Finish" the device-tree, that is do the actual parsing of + * some of the properties like the interrupt map + */ + finish_device_tree(); + /* * Initialize xmon */ @@ -407,8 +420,10 @@ void __init setup_system(void) */ register_early_udbg_console(); - if (do_early_xmon) - debugger(NULL); + /* Save unparsed command line copy for /proc/cmdline */ + strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); + + parse_early_param(); check_smt_enabled(); smp_setup_cpu_maps(); @@ -424,6 +439,8 @@ void __init setup_system(void) printk("-----------------------------------------------------\n"); printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); + printk("ppc64_interrupt_controller = 0x%ld\n", + ppc64_interrupt_controller); printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size()); printk("ppc64_caches.dcache_line_size = 0x%x\n", ppc64_caches.dline_size); @@ -439,6 +456,13 @@ void __init setup_system(void) DBG(" <- setup_system()\n"); } +static int ppc64_panic_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + ppc_md.panic((char *)ptr); /* May not return */ + return NOTIFY_DONE; +} + #ifdef CONFIG_IRQSTACKS static void __init irqstack_early_init(void) { @@ -493,6 +517,8 @@ static void __init emergency_stack_init(void) */ void __init setup_arch(char **cmdline_p) { + extern void do_init_bootmem(void); + ppc64_boot_msg(0x12, "Setup Arch"); *cmdline_p = cmd_line; @@ -509,7 +535,8 @@ void __init setup_arch(char **cmdline_p) panic_timeout = 180; if (ppc_md.panic) - setup_panic(); + atomic_notifier_chain_register(&panic_notifier_list, + &ppc64_panic_block); init_mm.start_code = PAGE_OFFSET; init_mm.end_code = (unsigned long) _etext; diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 320353f09..8fdeca2d4 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -17,6 +17,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -418,7 +419,9 @@ static long restore_user_regs(struct pt_regs *regs, { long err; unsigned int save_r2 = 0; +#if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE) unsigned long msr; +#endif /* * restore general registers but not including MSR or SOFTE. Also @@ -427,16 +430,11 @@ static long restore_user_regs(struct pt_regs *regs, if (!sig) save_r2 = (unsigned int)regs->gpr[2]; err = restore_general_regs(regs, sr); - err |= __get_user(msr, &sr->mc_gregs[PT_MSR]); if (!sig) regs->gpr[2] = (unsigned long) save_r2; if (err) return 1; - /* if doing signal return, restore the previous little-endian mode */ - if (sig) - regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE); - /* * Do this before updating the thread state in * current->thread.fpr/vr/evr. That way, if we get preempted @@ -457,7 +455,7 @@ static long restore_user_regs(struct pt_regs *regs, /* force the process to reload the altivec registers from current->thread when it next does altivec instructions */ regs->msr &= ~MSR_VEC; - if (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))) @@ -474,7 +472,7 @@ static long restore_user_regs(struct pt_regs *regs, /* force the process to reload the spe registers from current->thread when it next does spe instructions */ regs->msr &= ~MSR_SPE; - if (msr & MSR_SPE) { + if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_SPE) != 0) { /* restore spe registers from the stack */ if (__copy_from_user(current->thread.evr, &sr->mc_vregs, ELF_NEVRREG * sizeof(u32))) @@ -759,10 +757,10 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, /* Save user registers on the stack */ frame = &rt_sf->uc.uc_mcontext; - if (vdso32_rt_sigtramp && current->mm->context.vdso_base) { + if (vdso32_rt_sigtramp && current->thread.vdso_base) { if (save_user_regs(regs, frame, 0)) goto badframe; - regs->link = current->mm->context.vdso_base + vdso32_rt_sigtramp; + regs->link = current->thread.vdso_base + vdso32_rt_sigtramp; } else { if (save_user_regs(regs, frame, __NR_rt_sigreturn)) goto badframe; @@ -779,8 +777,6 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka, regs->gpr[5] = (unsigned long) &rt_sf->uc; regs->gpr[6] = (unsigned long) rt_sf; regs->nip = (unsigned long) ka->sa.sa_handler; - /* enter the signal handler in big-endian mode */ - regs->msr &= ~MSR_LE; regs->trap = 0; return 1; @@ -1042,10 +1038,10 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka, || __put_user(sig, &sc->signal)) goto badframe; - if (vdso32_sigtramp && current->mm->context.vdso_base) { + if (vdso32_sigtramp && current->thread.vdso_base) { if (save_user_regs(regs, &frame->mctx, 0)) goto badframe; - regs->link = current->mm->context.vdso_base + vdso32_sigtramp; + regs->link = current->thread.vdso_base + vdso32_sigtramp; } else { if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) goto badframe; @@ -1060,8 +1056,6 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka, regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) sc; regs->nip = (unsigned long) ka->sa.sa_handler; - /* enter the signal handler in big-endian mode */ - regs->msr &= ~MSR_LE; regs->trap = 0; return 1; diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index f72e8e823..c2db642f4 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -140,7 +141,9 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, unsigned long err = 0; unsigned long save_r13 = 0; elf_greg_t *gregs = (elf_greg_t *)regs; +#ifdef CONFIG_ALTIVEC unsigned long msr; +#endif int i; /* If this is not a signal return, we preserve the TLS in r13 */ @@ -151,12 +154,7 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, err |= __copy_from_user(regs, &sc->gp_regs, PT_MSR*sizeof(unsigned long)); - /* get MSR separately, transfer the LE bit if doing signal return */ - err |= __get_user(msr, &sc->gp_regs[PT_MSR]); - if (sig) - regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE); - - /* skip SOFTE */ + /* skip MSR and SOFTE */ for (i = PT_MSR+1; i <= PT_RESULT; i++) { if (i == PT_SOFTE) continue; @@ -181,6 +179,7 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, #ifdef CONFIG_ALTIVEC err |= __get_user(v_regs, &sc->v_regs); + err |= __get_user(msr, &sc->gp_regs[PT_MSR]); if (err) return err; if (v_regs && !access_ok(VERIFY_READ, v_regs, 34 * sizeof(vector128))) @@ -397,8 +396,8 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, current->thread.fpscr.val = 0; /* Set up to return from userspace. */ - if (vdso64_rt_sigtramp && current->mm->context.vdso_base) { - regs->link = current->mm->context.vdso_base + vdso64_rt_sigtramp; + if (vdso64_rt_sigtramp && current->thread.vdso_base) { + regs->link = current->thread.vdso_base + vdso64_rt_sigtramp; } else { err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]); if (err) @@ -413,8 +412,6 @@ static int setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info, /* Set up "regs" so we "return" to the signal handler. */ err |= get_user(regs->nip, &funct_desc_ptr->entry); - /* enter the signal handler in big-endian mode */ - regs->msr &= ~MSR_LE; regs->gpr[1] = newsp; err |= get_user(regs->gpr[2], &funct_desc_ptr->toc); regs->gpr[3] = signr; diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c index de59c6c31..9adef3bdd 100644 --- a/arch/powerpc/kernel/smp-tbsync.c +++ b/arch/powerpc/kernel/smp-tbsync.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include @@ -45,9 +46,8 @@ void __devinit smp_generic_take_timebase(void) { int cmd; u64 tb; - unsigned long flags; - local_irq_save(flags); + local_irq_disable(); while (!running) barrier(); rmb(); @@ -71,7 +71,7 @@ void __devinit smp_generic_take_timebase(void) set_tb(tb >> 32, tb & 0xfffffffful); enter_contest(tbsync->mark, -1); } - local_irq_restore(flags); + local_irq_enable(); } static int __devinit start_contest(int cmd, long offset, int num) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 6a9bc9ce5..530f7dba0 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -17,6 +17,7 @@ #undef DEBUG +#include #include #include #include @@ -144,15 +145,13 @@ void smp_message_recv(int msg, struct pt_regs *regs) void smp_send_reschedule(int cpu) { - if (likely(smp_ops)) - smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); + smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); } #ifdef CONFIG_DEBUGGER void smp_send_debugger_break(int cpu) { - if (likely(smp_ops)) - smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); + smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); } #endif @@ -160,7 +159,7 @@ void smp_send_debugger_break(int cpu) void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)) { crash_ipi_function_ptr = crash_ipi_callback; - if (crash_ipi_callback && smp_ops) { + if (crash_ipi_callback) { mb(); smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_DEBUGGER_BREAK); } @@ -222,9 +221,6 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, /* Can deadlock when called with interrupts disabled */ WARN_ON(irqs_disabled()); - if (unlikely(smp_ops == NULL)) - return -1; - data.func = func; data.info = info; atomic_set(&data.started, 0); @@ -362,10 +358,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) smp_store_cpu_info(boot_cpuid); cpu_callin_map[boot_cpuid] = 1; - if (smp_ops) - max_cpus = smp_ops->probe(); - else - max_cpus = 1; + max_cpus = smp_ops->probe(); smp_space_timers(max_cpus); @@ -461,7 +454,7 @@ void generic_mach_cpu_die(void) static int __devinit cpu_enable(unsigned int cpu) { - if (smp_ops && smp_ops->cpu_enable) + if (smp_ops->cpu_enable) return smp_ops->cpu_enable(cpu); return -ENOSYS; @@ -475,8 +468,7 @@ int __devinit __cpu_up(unsigned int cpu) if (!cpu_enable(cpu)) return 0; - if (smp_ops == NULL || - (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) + if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) return -EINVAL; /* Make sure callin-map entry is 0 (can be leftover a CPU @@ -500,7 +492,7 @@ int __devinit __cpu_up(unsigned int cpu) * -- Cort */ if (system_state < SYSTEM_RUNNING) - for (c = 50000; c && !cpu_callin_map[cpu]; c--) + for (c = 5000; c && !cpu_callin_map[cpu]; c--) udelay(100); #ifdef CONFIG_HOTPLUG_CPU else @@ -577,8 +569,7 @@ void __init smp_cpus_done(unsigned int max_cpus) old_mask = current->cpus_allowed; set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); - if (smp_ops) - smp_ops->setup_cpu(boot_cpuid); + smp_ops->setup_cpu(boot_cpuid); set_cpus_allowed(current, old_mask); diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S index 7369f9a6a..69773cc1a 100644 --- a/arch/powerpc/kernel/swsusp_32.S +++ b/arch/powerpc/kernel/swsusp_32.S @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 245717844..ec274e688 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -69,20 +70,16 @@ struct readdir_callback32 { }; static int fillonedir(void * __buf, const char * name, int namlen, - off_t offset, u64 ino, unsigned int d_type) + off_t offset, ino_t ino, unsigned int d_type) { struct readdir_callback32 * buf = (struct readdir_callback32 *) __buf; struct old_linux_dirent32 __user * dirent; - ino_t d_ino; if (buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; buf->count++; dirent = buf->dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(offset, &dirent->d_offset); put_user(namlen, &dirent->d_namlen); copy_to_user(dirent->d_name, name, namlen); @@ -124,20 +121,15 @@ asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp, int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) { - compat_ino_t ino; long err; if (stat->size > MAX_NON_LFS || !new_valid_dev(stat->dev) || !new_valid_dev(stat->rdev)) return -EOVERFLOW; - ino = stat->ino; - if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) - return -EOVERFLOW; - err = access_ok(VERIFY_WRITE, statbuf, sizeof(*statbuf)) ? 0 : -EFAULT; err |= __put_user(new_encode_dev(stat->dev), &statbuf->st_dev); - err |= __put_user(ino, &statbuf->st_ino); + err |= __put_user(stat->ino, &statbuf->st_ino); err |= __put_user(stat->mode, &statbuf->st_mode); err |= __put_user(stat->nlink, &statbuf->st_nlink); err |= __put_user(stat->uid, &statbuf->st_uid); diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index fec228cd0..5bc2585c8 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -278,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, +static int sysfs_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned int)(long)hcpu; @@ -296,19 +297,30 @@ static int __cpuinit sysfs_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata sysfs_cpu_nb = { +static struct notifier_block sysfs_cpu_nb = { .notifier_call = sysfs_cpu_notify, }; /* NUMA stuff */ #ifdef CONFIG_NUMA +static struct node node_devices[MAX_NUMNODES]; + static void register_nodes(void) { int i; - for (i = 0; i < MAX_NUMNODES; i++) - register_one_node(i); + for (i = 0; i < MAX_NUMNODES; i++) { + if (node_online(i)) { + int p_node = parent_node(i); + struct node *parent = NULL; + + if (p_node != i) + parent = &node_devices[p_node]; + + register_node(&node_devices[i], i, parent); + } + } } int sysfs_add_device_to_node(struct sys_device *dev, int nid) @@ -347,13 +359,23 @@ static SYSDEV_ATTR(physical_id, 0444, show_physical_id, NULL); static int __init topology_init(void) { int cpu; + struct node *parent = NULL; register_nodes(); + register_cpu_notifier(&sysfs_cpu_nb); for_each_possible_cpu(cpu) { struct cpu *c = &per_cpu(cpu_devices, cpu); +#ifdef CONFIG_NUMA + /* The node to which a cpu belongs can't be known + * until the cpu is made present. + */ + parent = NULL; + if (cpu_present(cpu)) + parent = &node_devices[cpu_to_node(cpu)]; +#endif /* * For now, we just see if the system supports making * the RTAS calls for CPU hotplug. But, there may be a @@ -365,7 +387,7 @@ static int __init topology_init(void) c->no_control = 1; if (cpu_online(cpu) || (c->no_control == 0)) { - register_cpu(c, cpu); + register_cpu(c, cpu, parent); sysdev_create_file(&c->sysdev, &attr_physical_id); } diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 579de70e0..cd73ccc2b 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #ifdef CONFIG_PPC64 @@ -31,10 +32,6 @@ #define SYS32ONLY(func) .long sys_##func #define SYSX(f, f3264, f32) .long f32 #endif -#define SYSCALL_SPU(func) SYSCALL(func) -#define COMPAT_SYS_SPU(func) COMPAT_SYS(func) -#define PPC_SYS_SPU(func) PPC_SYS(func) -#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32) #ifdef CONFIG_PPC64 #define sys_sigpending sys_ni_syscall @@ -42,4 +39,309 @@ #endif _GLOBAL(sys_call_table) -#include +SYSCALL(restart_syscall) +SYSCALL(exit) +PPC_SYS(fork) +SYSCALL(read) +SYSCALL(write) +COMPAT_SYS(open) +SYSCALL(close) +COMPAT_SYS(waitpid) +COMPAT_SYS(creat) +SYSCALL(link) +SYSCALL(unlink) +COMPAT_SYS(execve) +SYSCALL(chdir) +COMPAT_SYS(time) +SYSCALL(mknod) +SYSCALL(chmod) +SYSCALL(lchown) +SYSCALL(ni_syscall) +OLDSYS(stat) +SYSX(sys_lseek,ppc32_lseek,sys_lseek) +SYSCALL(getpid) +COMPAT_SYS(mount) +SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) +SYSCALL(setuid) +SYSCALL(getuid) +COMPAT_SYS(stime) +COMPAT_SYS(ptrace) +SYSCALL(alarm) +OLDSYS(fstat) +COMPAT_SYS(pause) +COMPAT_SYS(utime) +SYSCALL(ni_syscall) +SYSCALL(ni_syscall) +COMPAT_SYS(access) +COMPAT_SYS(nice) +SYSCALL(ni_syscall) +SYSCALL(sync) +COMPAT_SYS(kill) +SYSCALL(rename) +COMPAT_SYS(mkdir) +SYSCALL(rmdir) +SYSCALL(dup) +SYSCALL(pipe) +COMPAT_SYS(times) +SYSCALL(ni_syscall) +SYSCALL(brk) +SYSCALL(setgid) +SYSCALL(getgid) +SYSCALL(signal) +SYSCALL(geteuid) +SYSCALL(getegid) +SYSCALL(acct) +SYSCALL(umount) +SYSCALL(ni_syscall) +COMPAT_SYS(ioctl) +COMPAT_SYS(fcntl) +SYSCALL(ni_syscall) +COMPAT_SYS(setpgid) +SYSCALL(ni_syscall) +SYSX(sys_ni_syscall,sys_olduname, sys_olduname) +COMPAT_SYS(umask) +SYSCALL(chroot) +SYSCALL(ustat) +SYSCALL(dup2) +SYSCALL(getppid) +SYSCALL(getpgrp) +SYSCALL(setsid) +SYS32ONLY(sigaction) +SYSCALL(sgetmask) +COMPAT_SYS(ssetmask) +SYSCALL(setreuid) +SYSCALL(setregid) +SYS32ONLY(sigsuspend) +COMPAT_SYS(sigpending) +COMPAT_SYS(sethostname) +COMPAT_SYS(setrlimit) +COMPAT_SYS(old_getrlimit) +COMPAT_SYS(getrusage) +COMPAT_SYS(gettimeofday) +COMPAT_SYS(settimeofday) +COMPAT_SYS(getgroups) +COMPAT_SYS(setgroups) +SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select) +SYSCALL(symlink) +OLDSYS(lstat) +COMPAT_SYS(readlink) +SYSCALL(uselib) +SYSCALL(swapon) +SYSCALL(reboot) +SYSX(sys_ni_syscall,old32_readdir,old_readdir) +SYSCALL(mmap) +SYSCALL(munmap) +SYSCALL(truncate) +SYSCALL(ftruncate) +SYSCALL(fchmod) +SYSCALL(fchown) +COMPAT_SYS(getpriority) +COMPAT_SYS(setpriority) +SYSCALL(ni_syscall) +COMPAT_SYS(statfs) +COMPAT_SYS(fstatfs) +SYSCALL(ni_syscall) +COMPAT_SYS(socketcall) +COMPAT_SYS(syslog) +COMPAT_SYS(setitimer) +COMPAT_SYS(getitimer) +COMPAT_SYS(newstat) +COMPAT_SYS(newlstat) +COMPAT_SYS(newfstat) +SYSX(sys_ni_syscall,sys_uname,sys_uname) +SYSCALL(ni_syscall) +SYSCALL(vhangup) +SYSCALL(ni_syscall) +SYSCALL(ni_syscall) +COMPAT_SYS(wait4) +SYSCALL(swapoff) +COMPAT_SYS(sysinfo) +COMPAT_SYS(ipc) +SYSCALL(fsync) +SYS32ONLY(sigreturn) +PPC_SYS(clone) +COMPAT_SYS(setdomainname) +PPC_SYS(newuname) +SYSCALL(ni_syscall) +COMPAT_SYS(adjtimex) +SYSCALL(mprotect) +SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask) +SYSCALL(ni_syscall) +SYSCALL(init_module) +SYSCALL(delete_module) +SYSCALL(ni_syscall) +SYSCALL(quotactl) +COMPAT_SYS(getpgid) +SYSCALL(fchdir) +SYSCALL(bdflush) +COMPAT_SYS(sysfs) +SYSX(ppc64_personality,ppc64_personality,sys_personality) +SYSCALL(ni_syscall) +SYSCALL(setfsuid) +SYSCALL(setfsgid) +SYSCALL(llseek) +COMPAT_SYS(getdents) +SYSX(sys_select,ppc32_select,ppc_select) +SYSCALL(flock) +SYSCALL(msync) +COMPAT_SYS(readv) +COMPAT_SYS(writev) +COMPAT_SYS(getsid) +SYSCALL(fdatasync) +COMPAT_SYS(sysctl) +SYSCALL(mlock) +SYSCALL(munlock) +SYSCALL(mlockall) +SYSCALL(munlockall) +COMPAT_SYS(sched_setparam) +COMPAT_SYS(sched_getparam) +COMPAT_SYS(sched_setscheduler) +COMPAT_SYS(sched_getscheduler) +SYSCALL(sched_yield) +COMPAT_SYS(sched_get_priority_max) +COMPAT_SYS(sched_get_priority_min) +COMPAT_SYS(sched_rr_get_interval) +COMPAT_SYS(nanosleep) +SYSCALL(mremap) +SYSCALL(setresuid) +SYSCALL(getresuid) +SYSCALL(ni_syscall) +SYSCALL(poll) +COMPAT_SYS(nfsservctl) +SYSCALL(setresgid) +SYSCALL(getresgid) +COMPAT_SYS(prctl) +COMPAT_SYS(rt_sigreturn) +COMPAT_SYS(rt_sigaction) +COMPAT_SYS(rt_sigprocmask) +COMPAT_SYS(rt_sigpending) +COMPAT_SYS(rt_sigtimedwait) +COMPAT_SYS(rt_sigqueueinfo) +COMPAT_SYS(rt_sigsuspend) +COMPAT_SYS(pread64) +COMPAT_SYS(pwrite64) +SYSCALL(chown) +SYSCALL(getcwd) +SYSCALL(capget) +SYSCALL(capset) +COMPAT_SYS(sigaltstack) +SYSX(sys_sendfile64,compat_sys_sendfile,sys_sendfile) +SYSCALL(ni_syscall) +SYSCALL(ni_syscall) +PPC_SYS(vfork) +COMPAT_SYS(getrlimit) +COMPAT_SYS(readahead) +SYS32ONLY(mmap2) +SYS32ONLY(truncate64) +SYS32ONLY(ftruncate64) +SYSX(sys_ni_syscall,sys_stat64,sys_stat64) +SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64) +SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64) +SYSCALL(pciconfig_read) +SYSCALL(pciconfig_write) +SYSCALL(pciconfig_iobase) +SYSCALL(ni_syscall) +SYSCALL(getdents64) +SYSCALL(pivot_root) +SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64) +SYSCALL(madvise) +SYSCALL(mincore) +SYSCALL(gettid) +SYSCALL(tkill) +SYSCALL(setxattr) +SYSCALL(lsetxattr) +SYSCALL(fsetxattr) +SYSCALL(getxattr) +SYSCALL(lgetxattr) +SYSCALL(fgetxattr) +SYSCALL(listxattr) +SYSCALL(llistxattr) +SYSCALL(flistxattr) +SYSCALL(removexattr) +SYSCALL(lremovexattr) +SYSCALL(fremovexattr) +COMPAT_SYS(futex) +COMPAT_SYS(sched_setaffinity) +COMPAT_SYS(sched_getaffinity) +SYSCALL(ni_syscall) +SYSCALL(ni_syscall) +SYS32ONLY(sendfile64) +COMPAT_SYS(io_setup) +SYSCALL(io_destroy) +COMPAT_SYS(io_getevents) +COMPAT_SYS(io_submit) +SYSCALL(io_cancel) +SYSCALL(set_tid_address) +SYSX(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) +SYSCALL(exit_group) +SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie) +SYSCALL(epoll_create) +SYSCALL(epoll_ctl) +SYSCALL(epoll_wait) +SYSCALL(remap_file_pages) +SYSX(sys_timer_create,compat_sys_timer_create,sys_timer_create) +COMPAT_SYS(timer_settime) +COMPAT_SYS(timer_gettime) +SYSCALL(timer_getoverrun) +SYSCALL(timer_delete) +COMPAT_SYS(clock_settime) +COMPAT_SYS(clock_gettime) +COMPAT_SYS(clock_getres) +COMPAT_SYS(clock_nanosleep) +SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext) +COMPAT_SYS(tgkill) +COMPAT_SYS(utimes) +COMPAT_SYS(statfs64) +COMPAT_SYS(fstatfs64) +SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64) +PPC_SYS(rtas) +OLDSYS(debug_setcontext) +SYSX(sys_vserver, sys32_vserver, sys_vserver) +SYSCALL(ni_syscall) +COMPAT_SYS(mbind) +COMPAT_SYS(get_mempolicy) +COMPAT_SYS(set_mempolicy) +COMPAT_SYS(mq_open) +SYSCALL(mq_unlink) +COMPAT_SYS(mq_timedsend) +COMPAT_SYS(mq_timedreceive) +COMPAT_SYS(mq_notify) +COMPAT_SYS(mq_getsetattr) +COMPAT_SYS(kexec_load) +COMPAT_SYS(add_key) +COMPAT_SYS(request_key) +COMPAT_SYS(keyctl) +COMPAT_SYS(waitid) +COMPAT_SYS(ioprio_set) +COMPAT_SYS(ioprio_get) +SYSCALL(inotify_init) +SYSCALL(inotify_add_watch) +SYSCALL(inotify_rm_watch) +SYSCALL(spu_run) +SYSCALL(spu_create) +COMPAT_SYS(pselect6) +COMPAT_SYS(ppoll) +SYSCALL(unshare) +SYSCALL(splice) +SYSCALL(tee) +SYSCALL(vmsplice) +COMPAT_SYS(openat) +SYSCALL(mkdirat) +SYSCALL(mknodat) +SYSCALL(fchownat) +COMPAT_SYS(futimesat) +SYSX(sys_newfstatat, sys_fstatat64, sys_fstatat64) +SYSCALL(unlinkat) +SYSCALL(renameat) +SYSCALL(linkat) +SYSCALL(symlinkat) +SYSCALL(readlinkat) +SYSCALL(fchmodat) +SYSCALL(faccessat) +COMPAT_SYS(get_robust_list) +COMPAT_SYS(set_robust_list) + +/* + * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c + * as well when appropriate. + */ diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c index 368a4934f..26bd8ea35 100644 --- a/arch/powerpc/kernel/tau_6xx.c +++ b/arch/powerpc/kernel/tau_6xx.c @@ -11,6 +11,7 @@ * life in portables, and add a 'performance/watt' metric somewhere in /proc */ +#include #include #include #include diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index a124499e6..24e3ad756 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -32,6 +32,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -75,6 +76,7 @@ /* keep track of when we need to update the rtc */ time_t last_rtc_update; +extern int piranha_simulator; #ifdef CONFIG_PPC_ISERIES unsigned long iSeries_recal_titan = 0; unsigned long iSeries_recal_tb = 0; @@ -101,7 +103,7 @@ EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ u64 tb_to_xs; unsigned tb_to_us; -#define TICKLEN_SCALE TICK_LENGTH_SHIFT +#define TICKLEN_SCALE (SHIFT_SCALE - 10) u64 last_tick_len; /* units are ns / 2^TICKLEN_SCALE */ u64 ticklen_to_xs; /* 0.64 fraction */ @@ -125,8 +127,15 @@ static long timezone_offset; unsigned long ppc_proc_freq; unsigned long ppc_tb_freq; -static u64 tb_last_jiffy __cacheline_aligned_in_smp; -static DEFINE_PER_CPU(u64, last_jiffy); +u64 tb_last_jiffy __cacheline_aligned_in_smp; +unsigned long tb_last_stamp; + +/* + * Note that on ppc32 this only stores the bottom 32 bits of + * the timebase value, but that's enough to tell when a jiffy + * has passed. + */ +DEFINE_PER_CPU(unsigned long, last_jiffy); #ifdef CONFIG_VIRT_CPU_ACCOUNTING /* @@ -410,7 +419,7 @@ static __inline__ void timer_check_rtc(void) /* * This version of gettimeofday has microsecond resolution. */ -static inline void __do_gettimeofday(struct timeval *tv) +static inline void __do_gettimeofday(struct timeval *tv, u64 tb_val) { unsigned long sec, usec; u64 tb_ticks, xsec; @@ -424,12 +433,7 @@ static inline void __do_gettimeofday(struct timeval *tv) * without a divide (and in fact, without a multiply) */ temp_varp = do_gtod.varp; - - /* Sampling the time base must be done after loading - * do_gtod.varp in order to avoid racing with update_gtod. - */ - data_barrier(temp_varp); - tb_ticks = get_tb() - temp_varp->tb_orig_stamp; + tb_ticks = tb_val - temp_varp->tb_orig_stamp; temp_tb_to_xs = temp_varp->tb_to_xs; temp_stamp_xsec = temp_varp->stamp_xsec; xsec = temp_stamp_xsec + mulhdu(tb_ticks, temp_tb_to_xs); @@ -451,7 +455,7 @@ void do_gettimeofday(struct timeval *tv) do { seq = read_seqbegin_irqsave(&xtime_lock, flags); sec = xtime.tv_sec; - nsec = xtime.tv_nsec + tb_ticks_since(tb_last_jiffy); + nsec = xtime.tv_nsec + tb_ticks_since(tb_last_stamp); } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); usec = nsec / 1000; while (usec >= 1000000) { @@ -462,7 +466,7 @@ void do_gettimeofday(struct timeval *tv) tv->tv_usec = usec; return; } - __do_gettimeofday(tv); + __do_gettimeofday(tv, get_tb()); } EXPORT_SYMBOL(do_gettimeofday); @@ -648,7 +652,6 @@ void timer_interrupt(struct pt_regs * regs) int next_dec; int cpu = smp_processor_id(); unsigned long ticks; - u64 tb_next_jiffy; #ifdef CONFIG_PPC32 if (atomic_read(&ppc_n_lost_interrupts) != 0) @@ -690,13 +693,11 @@ void timer_interrupt(struct pt_regs * regs) continue; write_seqlock(&xtime_lock); - tb_next_jiffy = tb_last_jiffy + tb_ticks_per_jiffy; - if (per_cpu(last_jiffy, cpu) >= tb_next_jiffy) { - tb_last_jiffy = tb_next_jiffy; - do_timer(regs); - timer_recalc_offset(tb_last_jiffy); - timer_check_rtc(); - } + tb_last_jiffy += tb_ticks_per_jiffy; + tb_last_stamp = per_cpu(last_jiffy, cpu); + do_timer(regs); + timer_recalc_offset(tb_last_jiffy); + timer_check_rtc(); write_sequnlock(&xtime_lock); } @@ -741,7 +742,7 @@ void __init smp_space_timers(unsigned int max_cpus) int i; unsigned long half = tb_ticks_per_jiffy / 2; unsigned long offset = tb_ticks_per_jiffy / max_cpus; - u64 previous_tb = per_cpu(last_jiffy, boot_cpuid); + unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ previous_tb -= tb_ticks_per_jiffy; @@ -822,7 +823,7 @@ int do_settimeofday(struct timespec *tv) * and therefore the (jiffies - wall_jiffies) computation * has been removed. */ - tb_delta = tb_ticks_since(tb_last_jiffy); + tb_delta = tb_ticks_since(tb_last_stamp); tb_delta = mulhdu(tb_delta, do_gtod.varp->tb_to_xs); /* in xsec */ new_nsec -= SCALE_XSEC(tb_delta, 1000000000); @@ -857,50 +858,42 @@ int do_settimeofday(struct timespec *tv) EXPORT_SYMBOL(do_settimeofday); -static int __init get_freq(char *name, int cells, unsigned long *val) +void __init generic_calibrate_decr(void) { struct device_node *cpu; unsigned int *fp; - int found = 0; + int node_found; - /* The cpu node should have timebase and clock frequency properties */ + /* + * The cpu node should have a timebase-frequency property + * to tell us the rate at which the decrementer counts. + */ cpu = of_find_node_by_type(NULL, "cpu"); + ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ + node_found = 0; if (cpu) { - fp = (unsigned int *)get_property(cpu, name, NULL); + fp = (unsigned int *)get_property(cpu, "timebase-frequency", + NULL); if (fp) { - found = 1; - *val = 0; - while (cells--) - *val = (*val << 32) | *fp++; + node_found = 1; + ppc_tb_freq = *fp; } - - of_node_put(cpu); } - - return found; -} - -void __init generic_calibrate_decr(void) -{ - ppc_tb_freq = DEFAULT_TB_FREQ; /* hardcoded default */ - - if (!get_freq("ibm,extended-timebase-frequency", 2, &ppc_tb_freq) && - !get_freq("timebase-frequency", 1, &ppc_tb_freq)) { - + if (!node_found) printk(KERN_ERR "WARNING: Estimating decrementer frequency " "(not found)\n"); - } - - ppc_proc_freq = DEFAULT_PROC_FREQ; /* hardcoded default */ - if (!get_freq("ibm,extended-clock-frequency", 2, &ppc_proc_freq) && - !get_freq("clock-frequency", 1, &ppc_proc_freq)) { - - printk(KERN_ERR "WARNING: Estimating processor frequency " - "(not found)\n"); + ppc_proc_freq = DEFAULT_PROC_FREQ; + node_found = 0; + if (cpu) { + fp = (unsigned int *)get_property(cpu, "clock-frequency", + NULL); + if (fp) { + node_found = 1; + ppc_proc_freq = *fp; + } } - #ifdef CONFIG_BOOKE /* Set the time base to zero */ mtspr(SPRN_TBWL, 0); @@ -912,6 +905,11 @@ void __init generic_calibrate_decr(void) /* Enable decrementer interrupt */ mtspr(SPRN_TCR, TCR_DIE); #endif + if (!node_found) + printk(KERN_ERR "WARNING: Estimating processor frequency " + "(not found)\n"); + + of_node_put(cpu); } unsigned long get_boot_time(void) @@ -942,15 +940,16 @@ void __init time_init(void) if (__USE_RTC()) { /* 601 processor: dec counts down by 128 every 128ns */ ppc_tb_freq = 1000000000; - tb_last_jiffy = get_rtcl(); + tb_last_stamp = get_rtcl(); + tb_last_jiffy = tb_last_stamp; } else { /* Normal PowerPC with timebase register */ ppc_md.calibrate_decr(); - printk(KERN_DEBUG "time_init: decrementer frequency = %lu.%.6lu MHz\n", + printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", ppc_tb_freq / 1000000, ppc_tb_freq % 1000000); - printk(KERN_DEBUG "time_init: processor frequency = %lu.%.6lu MHz\n", + printk(KERN_INFO "time_init: processor frequency = %lu.%.6lu MHz\n", ppc_proc_freq / 1000000, ppc_proc_freq % 1000000); - tb_last_jiffy = get_tb(); + tb_last_stamp = tb_last_jiffy = get_tb(); } tb_ticks_per_jiffy = ppc_tb_freq / HZ; @@ -1011,7 +1010,10 @@ void __init time_init(void) tb_to_ns_scale = scale; tb_to_ns_shift = shift; - tm = get_boot_time(); +#ifdef CONFIG_PPC_ISERIES + if (!piranha_simulator) +#endif + tm = get_boot_time(); write_seqlock_irqsave(&xtime_lock, flags); @@ -1027,7 +1029,7 @@ void __init time_init(void) do_gtod.varp = &do_gtod.vars[0]; do_gtod.var_idx = 0; do_gtod.varp->tb_orig_stamp = tb_last_jiffy; - __get_cpu_var(last_jiffy) = tb_last_jiffy; + __get_cpu_var(last_jiffy) = tb_last_stamp; do_gtod.varp->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC; do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; do_gtod.varp->tb_to_xs = tb_to_xs; diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 20780f83f..064a52564 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -14,6 +14,7 @@ * This file handles the architecture-dependent parts of hardware exceptions */ +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include #include @@ -51,7 +51,6 @@ #include #include #endif -#include #ifdef CONFIG_PPC64 /* XXX */ #define _IO_BASE pci_io_base @@ -97,7 +96,7 @@ static DEFINE_SPINLOCK(die_lock); int die(const char *str, struct pt_regs *regs, long err) { - static int die_counter; + static int die_counter, crash_dump_start = 0; if (debugger(regs)) return 1; @@ -106,18 +105,10 @@ int die(const char *str, struct pt_regs *regs, long err) spin_lock_irq(&die_lock); bust_spinlocks(1); #ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - if (machine_is(powermac) && pmac_backlight) { - struct backlight_properties *props; - - down(&pmac_backlight->sem); - props = pmac_backlight->props; - props->brightness = props->max_brightness; - props->power = FB_BLANK_UNBLANK; - props->update_status(pmac_backlight); - up(&pmac_backlight->sem); + if (machine_is(powermac)) { + set_backlight_enable(1); + set_backlight_level(BACKLIGHT_MAX); } - mutex_unlock(&pmac_backlight_mutex); #endif printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); #ifdef CONFIG_PREEMPT @@ -137,19 +128,32 @@ int die(const char *str, struct pt_regs *regs, long err) print_modules(); show_regs(regs); bust_spinlocks(0); - spin_unlock_irq(&die_lock); - if (kexec_should_crash(current) || - kexec_sr_activated(smp_processor_id())) + if (!crash_dump_start && kexec_should_crash(current)) { + crash_dump_start = 1; + spin_unlock_irq(&die_lock); crash_kexec(regs); - crash_kexec_secondary(regs); + /* NOTREACHED */ + } + spin_unlock_irq(&die_lock); + if (crash_dump_start) + /* + * Only for soft-reset: Other CPUs will be responded to an IPI + * sent by first kexec CPU. + */ + for(;;) + ; if (in_interrupt()) panic("Fatal exception in interrupt"); - if (panic_on_oops) + if (panic_on_oops) { +#ifdef CONFIG_PPC64 + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); +#endif panic("Fatal exception"); - + } do_exit(err); return 0; @@ -202,25 +206,8 @@ void system_reset_exception(struct pt_regs *regs) return; } -#ifdef CONFIG_KEXEC - cpu_set(smp_processor_id(), cpus_in_sr); -#endif - die("System Reset", regs, SIGABRT); - /* - * Some CPUs when released from the debugger will execute this path. - * These CPUs entered the debugger via a soft-reset. If the CPU was - * hung before entering the debugger it will return to the hung - * state when exiting this function. This causes a problem in - * kdump since the hung CPU(s) will not respond to the IPI sent - * from kdump. To prevent the problem we call crash_kexec_secondary() - * here. If a kdump had not been initiated or we exit the debugger - * with the "exit and recover" command (x) crash_kexec_secondary() - * will return after 5ms and the CPU returns to its previous state. - */ - crash_kexec_secondary(regs); - /* Must die if the interrupt is not recoverable */ if (!(regs->msr & MSR_RI)) panic("Unrecoverable System Reset"); @@ -585,14 +572,14 @@ static void parse_fpe(struct pt_regs *regs) #define INST_MFSPR_PVR_MASK 0xfc1fffff #define INST_DCBA 0x7c0005ec -#define INST_DCBA_MASK 0xfc0007fe +#define INST_DCBA_MASK 0x7c0007fe #define INST_MCRXR 0x7c000400 -#define INST_MCRXR_MASK 0xfc0007fe +#define INST_MCRXR_MASK 0x7c0007fe #define INST_STRING 0x7c00042a -#define INST_STRING_MASK 0xfc0007fe -#define INST_STRING_GEN_MASK 0xfc00067e +#define INST_STRING_MASK 0x7c0007fe +#define INST_STRING_GEN_MASK 0x7c00067e #define INST_LSWI 0x7c0004aa #define INST_LSWX 0x7c00042a #define INST_STSWI 0x7c0005aa @@ -671,7 +658,7 @@ static int emulate_instruction(struct pt_regs *regs) u32 instword; u32 rd; - if (!user_mode(regs) || (regs->msr & MSR_LE)) + if (!user_mode(regs)) return -EINVAL; CHECK_FULL_REGS(regs); @@ -818,11 +805,9 @@ void __kprobes program_check_exception(struct pt_regs *regs) void alignment_exception(struct pt_regs *regs) { - int sig, code, fixed = 0; + int fixed; - /* we don't implement logging of alignment exceptions */ - if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) - fixed = fix_alignment(regs); + fixed = fix_alignment(regs); if (fixed == 1) { regs->nip += 4; /* skip over emulated instruction */ @@ -832,16 +817,14 @@ void alignment_exception(struct pt_regs *regs) /* Operand address was bad */ if (fixed == -EFAULT) { - sig = SIGSEGV; - code = SEGV_ACCERR; - } else { - sig = SIGBUS; - code = BUS_ADRALN; + if (user_mode(regs)) + _exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar); + else + /* Search exception table */ + bad_page_fault(regs, regs->dar, SIGSEGV); + return; } - if (user_mode(regs)) - _exception(sig, regs, code, regs->dar); - else - bad_page_fault(regs, regs->dar, sig); + _exception(SIGBUS, regs, BUS_ADRALN, regs->dar); } void StackOverflow(struct pt_regs *regs) diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 5730906b2..3774e8009 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c @@ -10,10 +10,10 @@ */ #include +#include #include #include #include -#include #include #include @@ -33,12 +33,9 @@ void __init udbg_early_init(void) #elif defined(CONFIG_PPC_EARLY_DEBUG_G5) /* For use on Apple G5 machines */ udbg_init_pmac_realmode(); -#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL) +#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS) /* RTAS panel debug */ - udbg_init_rtas_panel(); -#elif defined(CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE) - /* RTAS console debug */ - udbg_init_rtas_console(); + udbg_init_rtas(); #elif defined(CONFIG_PPC_EARLY_DEBUG_MAPLE) /* Maple real mode debug */ udbg_init_maple_realmode(); @@ -144,14 +141,12 @@ static int early_console_initialized; void __init disable_early_printk(void) { +#if 1 if (!early_console_initialized) return; - if (strstr(saved_command_line, "udbg-immortal")) { - printk(KERN_INFO "early console immortal !\n"); - return; - } unregister_console(&udbg_console); early_console_initialized = 0; +#endif } /* called by setup_system */ diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 2d17f2b8e..5d29dcca5 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -81,14 +82,10 @@ static int udbg_550_getc(void) void udbg_init_uart(void __iomem *comport, unsigned int speed, unsigned int clock) { - unsigned int dll, base_bauds; + unsigned int dll, base_bauds = clock / 16; - if (clock == 0) - clock = 1843200; if (speed == 0) speed = 9600; - - base_bauds = clock / 16; dll = base_bauds / speed; if (comport) { diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 1d135e93d..256faa779 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -8,6 +8,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -224,7 +225,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, struct vm_area_struct *vma; unsigned long vdso_pages; unsigned long vdso_base; - int rc; #ifdef CONFIG_PPC64 if (test_thread_flag(TIF_32BIT)) { @@ -239,13 +239,20 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, vdso_base = VDSO32_MBASE; #endif - current->mm->context.vdso_base = 0; + current->thread.vdso_base = 0; /* vDSO has a problem and was disabled, just don't "enable" it for the * process */ if (vdso_pages == 0) return 0; + + vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); + if (vma == NULL) + return -ENOMEM; + + memset(vma, 0, sizeof(*vma)); + /* Add a page to the vdso size for the data page */ vdso_pages ++; @@ -254,23 +261,17 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, * at vdso_base which is the "natural" base for it, but we might fail * and end up putting it elsewhere. */ - down_write(&mm->mmap_sem); vdso_base = get_unmapped_area(NULL, vdso_base, vdso_pages << PAGE_SHIFT, 0, 0); - if (IS_ERR_VALUE(vdso_base)) { - rc = vdso_base; - goto fail_mmapsem; + if (vdso_base & ~PAGE_MASK) { + kmem_cache_free(vm_area_cachep, vma); + return (int)vdso_base; } + current->thread.vdso_base = vdso_base; - /* Allocate a VMA structure and fill it up */ - vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL); - if (vma == NULL) { - rc = -ENOMEM; - goto fail_mmapsem; - } vma->vm_mm = mm; - vma->vm_start = vdso_base; + vma->vm_start = current->thread.vdso_base; vma->vm_end = vma->vm_start + (vdso_pages << PAGE_SHIFT); /* @@ -283,38 +284,23 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, * It's fine to use that for setting breakpoints in the vDSO code * pages though */ - vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC; + vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; vma->vm_flags |= mm->def_flags; vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; vma->vm_ops = &vdso_vmops; - /* Insert new VMA */ - rc = insert_vm_struct(mm, vma); - if (rc) - goto fail_vma; - - /* Put vDSO base into mm struct and account for memory usage */ - current->mm->context.vdso_base = vdso_base; + down_write(&mm->mmap_sem); + if (insert_vm_struct(mm, vma)) { + up_write(&mm->mmap_sem); + kmem_cache_free(vm_area_cachep, vma); + return -ENOMEM; + } vx_vmpages_add(mm, (vma->vm_end - vma->vm_start) >> PAGE_SHIFT); up_write(&mm->mmap_sem); - return 0; - fail_vma: - kmem_cache_free(vm_area_cachep, vma); - fail_mmapsem: - up_write(&mm->mmap_sem); - return rc; -} - -const char *arch_vma_name(struct vm_area_struct *vma) -{ - if (vma->vm_mm && vma->vm_start == vma->vm_mm->context.vdso_base) - return "[vdso]"; - return NULL; + return 0; } - - static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname, unsigned long *size) { diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile index 3726358fa..8a3bed5f1 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile @@ -14,8 +14,7 @@ obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin -EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ - $(call ld-option, -Wl$(comma)--hash-style=sysv) +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 EXTRA_AFLAGS := -D__VDSO32__ -s obj-y += vdso32_wrapper.o diff --git a/arch/powerpc/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S index 9cb319992..09629aea3 100644 --- a/arch/powerpc/kernel/vdso32/cacheflush.S +++ b/arch/powerpc/kernel/vdso32/cacheflush.S @@ -9,6 +9,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S index dc21e891d..4709f1d95 100644 --- a/arch/powerpc/kernel/vdso32/datapage.S +++ b/arch/powerpc/kernel/vdso32/datapage.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index 05909f754..7eebff03a 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S @@ -10,6 +10,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S index 68d49dd71..0c6a37b29 100644 --- a/arch/powerpc/kernel/vdso32/sigtramp.S +++ b/arch/powerpc/kernel/vdso32/sigtramp.S @@ -10,6 +10,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S index 6187af2d5..f4bad720c 100644 --- a/arch/powerpc/kernel/vdso32/vdso32.lds.S +++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S @@ -14,7 +14,6 @@ SECTIONS { . = VDSO32_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile index 43af9b2a6..ab3998845 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile @@ -8,8 +8,7 @@ targets := $(obj-vdso64) vdso64.so obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) EXTRA_CFLAGS := -shared -s -fno-common -fno-builtin -EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ - $(call ld-option, -Wl$(comma)--hash-style=sysv) +EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 EXTRA_AFLAGS := -D__VDSO64__ -s obj-y += vdso64_wrapper.o diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S index 66a36d3cc..cb4ae0a5e 100644 --- a/arch/powerpc/kernel/vdso64/cacheflush.S +++ b/arch/powerpc/kernel/vdso64/cacheflush.S @@ -9,6 +9,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S index 79796de11..3b2dd7d0c 100644 --- a/arch/powerpc/kernel/vdso64/datapage.S +++ b/arch/powerpc/kernel/vdso64/datapage.S @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S index 56e76ff54..4ee871f1c 100644 --- a/arch/powerpc/kernel/vdso64/gettimeofday.S +++ b/arch/powerpc/kernel/vdso64/gettimeofday.S @@ -11,6 +11,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 17a83fa6d..7479edb10 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S @@ -10,6 +10,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S index 4a2b6dc09..4bdf22446 100644 --- a/arch/powerpc/kernel/vdso64/vdso64.lds.S +++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S @@ -12,7 +12,6 @@ SECTIONS { . = VDSO64_LBASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index 49ac3d6e1..66b3d03c5 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S @@ -1,3 +1,4 @@ +#include #include #include @@ -52,12 +53,12 @@ fpenable: stfd fr31,8(r1) LDCONST(fr1, fpzero) mffs fr31 - MTFSF_L(fr1) + mtfsf 0xff,fr1 blr fpdisable: mtlr r12 - MTFSF_L(fr31) + mtfsf 0xff,fr31 lfd fr31,8(r1) lfd fr1,16(r1) lfd fr0,24(r1) diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index fad8580f9..971020cf3 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -13,116 +13,27 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include #include #include #include #include #include -#include - #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern struct subsystem devices_subsys; /* needed for vio_find_name() */ - -static struct vio_dev vio_bus_device = { /* fake "parent" device */ + +static const struct vio_device_id *vio_match_device( + const struct vio_device_id *, const struct vio_dev *); + +struct vio_dev vio_bus_device = { /* fake "parent" device */ .name = vio_bus_device.dev.bus_id, .type = "", .dev.bus_id = "vio", .dev.bus = &vio_bus_type, }; -#ifdef CONFIG_PPC_ISERIES -struct device *iSeries_vio_dev = &vio_bus_device.dev; -EXPORT_SYMBOL(iSeries_vio_dev); - -static struct iommu_table veth_iommu_table; -static struct iommu_table vio_iommu_table; - -static void __init iommu_vio_init(void) -{ - iommu_table_getparms_iSeries(255, 0, 0xff, &veth_iommu_table); - veth_iommu_table.it_size /= 2; - vio_iommu_table = veth_iommu_table; - vio_iommu_table.it_offset += veth_iommu_table.it_size; - - if (!iommu_init_table(&veth_iommu_table, -1)) - printk("Virtual Bus VETH TCE table failed.\n"); - if (!iommu_init_table(&vio_iommu_table, -1)) - printk("Virtual Bus VIO TCE table failed.\n"); -} -#endif - -static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) -{ -#ifdef CONFIG_PPC_ISERIES - if (firmware_has_feature(FW_FEATURE_ISERIES)) { - if (strcmp(dev->type, "network") == 0) - return &veth_iommu_table; - return &vio_iommu_table; - } else -#endif - { - unsigned char *dma_window; - struct iommu_table *tbl; - unsigned long offset, size; - - dma_window = get_property(dev->dev.platform_data, - "ibm,my-dma-window", NULL); - if (!dma_window) - return NULL; - - tbl = kmalloc(sizeof(*tbl), GFP_KERNEL); - - of_parse_dma_window(dev->dev.platform_data, dma_window, - &tbl->it_index, &offset, &size); - - /* TCE table size - measured in tce entries */ - tbl->it_size = size >> PAGE_SHIFT; - /* offset for VIO should always be 0 */ - tbl->it_offset = offset >> PAGE_SHIFT; - tbl->it_busno = 0; - tbl->it_type = TCE_VB; - - return iommu_init_table(tbl, -1); - } -} - -/** - * 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. - */ -static const struct vio_device_id *vio_match_device( - const struct vio_device_id *ids, const struct vio_dev *dev) -{ - while (ids->type[0] != '\0') { - if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) && - device_is_compatible(dev->dev.platform_data, ids->compat)) - return ids; - ids++; - } - return NULL; -} +static struct vio_bus_ops vio_bus_ops; /* * Convert from struct device to struct vio_dev and pass to driver. @@ -195,100 +106,35 @@ void vio_unregister_driver(struct vio_driver *viodrv) } EXPORT_SYMBOL(vio_unregister_driver); -/* vio_dev refcount hit 0 */ -static void __devinit vio_dev_release(struct device *dev) -{ - if (dev->platform_data) { - /* XXX free TCE table */ - of_node_put(dev->platform_data); - } - kfree(to_vio_dev(dev)); -} - /** - * vio_register_device_node: - Register a new vio device. - * @of_node: The OF node for this device. + * 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 * - * Creates and initializes a vio_dev structure from the data in - * of_node (dev.platform_data) 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. + * 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. */ -struct vio_dev * __devinit vio_register_device_node(struct device_node *of_node) +static const struct vio_device_id *vio_match_device( + const struct vio_device_id *ids, const struct vio_dev *dev) { - struct vio_dev *viodev; - unsigned int *unit_address; - - /* we need the 'device_type' property, in order to match with drivers */ - if (of_node->type == NULL) { - printk(KERN_WARNING "%s: node %s missing 'device_type'\n", - __FUNCTION__, - of_node->name ? of_node->name : ""); - return NULL; - } - - unit_address = (unsigned int *)get_property(of_node, "reg", NULL); - if (unit_address == NULL) { - printk(KERN_WARNING "%s: node %s missing 'reg'\n", - __FUNCTION__, - of_node->name ? of_node->name : ""); - return NULL; - } - - /* allocate a vio_dev for this node */ - viodev = kzalloc(sizeof(struct vio_dev), GFP_KERNEL); - if (viodev == NULL) - return NULL; - - viodev->dev.platform_data = of_node_get(of_node); - - viodev->irq = irq_of_parse_and_map(of_node, 0); - - snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address); - viodev->name = of_node->name; - viodev->type = of_node->type; - viodev->unit_address = *unit_address; - if (firmware_has_feature(FW_FEATURE_ISERIES)) { - unit_address = (unsigned int *)get_property(of_node, - "linux,unit_address", NULL); - if (unit_address != NULL) - viodev->unit_address = *unit_address; - } - viodev->iommu_table = vio_build_iommu_table(viodev); - - /* init generic 'struct device' fields: */ - viodev->dev.parent = &vio_bus_device.dev; - viodev->dev.bus = &vio_bus_type; - viodev->dev.release = vio_dev_release; - - /* register with generic device framework */ - if (device_register(&viodev->dev)) { - printk(KERN_ERR "%s: failed to register device %s\n", - __FUNCTION__, viodev->dev.bus_id); - /* XXX free TCE table */ - kfree(viodev); - return NULL; + while (ids->type[0] != '\0') { + if (vio_bus_ops.match(ids, dev)) + return ids; + ids++; } - - return viodev; + return NULL; } -EXPORT_SYMBOL(vio_register_device_node); /** * vio_bus_init: - Initialize the virtual IO bus */ -static int __init vio_bus_init(void) +int __init vio_bus_init(struct vio_bus_ops *ops) { int err; - struct device_node *node_vroot; -#ifdef CONFIG_PPC_ISERIES - if (firmware_has_feature(FW_FEATURE_ISERIES)) { - iommu_vio_init(); - vio_bus_device.iommu_table = &vio_iommu_table; - iSeries_vio_dev = &vio_bus_device.dev; - } -#endif + vio_bus_ops = *ops; err = bus_register(&vio_bus_type); if (err) { @@ -307,48 +153,47 @@ static int __init vio_bus_init(void) return err; } - node_vroot = find_devices("vdevice"); - if (node_vroot) { - struct device_node *of_node; - - /* - * Create struct vio_devices for each virtual device in - * the device tree. Drivers will associate with them later. - */ - for (of_node = node_vroot->child; of_node != NULL; - of_node = of_node->sibling) { - printk(KERN_DEBUG "%s: processing %p\n", - __FUNCTION__, of_node); - vio_register_device_node(of_node); - } - } - return 0; } -__initcall(vio_bus_init); -static ssize_t name_show(struct device *dev, +/* vio_dev refcount hit 0 */ +static void __devinit vio_dev_release(struct device *dev) +{ + if (vio_bus_ops.release_device) + vio_bus_ops.release_device(dev); + kfree(to_vio_dev(dev)); +} + +static ssize_t viodev_show_name(struct device *dev, struct device_attribute *attr, char *buf) { return sprintf(buf, "%s\n", to_vio_dev(dev)->name); } +DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_name, NULL); -static ssize_t devspec_show(struct device *dev, - struct device_attribute *attr, char *buf) +struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev) { - struct device_node *of_node = dev->platform_data; + /* init generic 'struct device' fields: */ + viodev->dev.parent = &vio_bus_device.dev; + viodev->dev.bus = &vio_bus_type; + viodev->dev.release = vio_dev_release; - return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none"); -} + /* register with generic device framework */ + if (device_register(&viodev->dev)) { + printk(KERN_ERR "%s: failed to register device %s\n", + __FUNCTION__, viodev->dev.bus_id); + return NULL; + } + device_create_file(&viodev->dev, &dev_attr_name); -static struct device_attribute vio_dev_attrs[] = { - __ATTR_RO(name), - __ATTR_RO(devspec), - __ATTR_NULL -}; + return viodev; +} void __devinit vio_unregister_device(struct vio_dev *viodev) { + if (vio_bus_ops.unregister_device) + vio_bus_ops.unregister_device(viodev); + device_remove_file(&viodev->dev, &dev_attr_name); device_unregister(&viodev->dev); } EXPORT_SYMBOL(vio_unregister_device); @@ -384,7 +229,7 @@ static void *vio_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) { return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size, - dma_handle, ~0ul, flag, -1); + dma_handle, ~0ul, flag); } static void vio_free_coherent(struct device *dev, size_t size, @@ -422,23 +267,22 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size) { const struct vio_dev *vio_dev = to_vio_dev(dev); - struct device_node *dn = dev->platform_data; char *cp; int length; if (!num_envp) return -ENOMEM; - if (!dn) + if (!vio_dev->dev.platform_data) return -ENODEV; - cp = (char *)get_property(dn, "compatible", &length); + cp = (char *)get_property(vio_dev->dev.platform_data, "compatible", &length); if (!cp) return -ENODEV; envp[0] = buffer; length = scnprintf(buffer, buffer_size, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); - if ((buffer_size - length) <= 0) + if (buffer_size - length <= 0) return -ENOMEM; envp[1] = NULL; return 0; @@ -446,81 +290,9 @@ static int vio_hotplug(struct device *dev, char **envp, int num_envp, struct bus_type vio_bus_type = { .name = "vio", - .dev_attrs = vio_dev_attrs, .uevent = vio_hotplug, .match = vio_bus_match, .probe = vio_bus_probe, .remove = vio_bus_remove, .shutdown = vio_bus_shutdown, }; - -/** - * 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 @which -*/ -const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length) -{ - return get_property(vdev->dev.platform_data, which, length); -} -EXPORT_SYMBOL(vio_get_attribute); - -#ifdef CONFIG_PPC_PSERIES -/* vio_find_name() - internal because only vio.c knows how we formatted the - * kobject name - * XXX once vio_bus_type.devices is actually used as a kset in - * drivers/base/bus.c, this function should be removed in favor of - * "device_find(kobj_name, &vio_bus_type)" - */ -static struct vio_dev *vio_find_name(const char *kobj_name) -{ - struct kobject *found; - - found = kset_find_obj(&devices_subsys.kset, kobj_name); - if (!found) - return NULL; - - return to_vio_dev(container_of(found, struct device, kobj)); -} - -/** - * vio_find_node - find an already-registered vio_dev - * @vnode: device_node of the virtual device we're looking for - */ -struct vio_dev *vio_find_node(struct device_node *vnode) -{ - uint32_t *unit_address; - char kobj_name[BUS_ID_SIZE]; - - /* construct the kobject name from the device node */ - unit_address = (uint32_t *)get_property(vnode, "reg", NULL); - if (!unit_address) - return NULL; - snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); - - return vio_find_name(kobj_name); -} -EXPORT_SYMBOL(vio_find_node); - -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); -#endif /* CONFIG_PPC_PSERIES */ diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 02665a021..fe79c2584 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_PPC64 #include #define PROVIDE32(x) PROVIDE(__unused__##x) @@ -92,11 +93,6 @@ SECTIONS __ptov_table_begin = .; *(.ptov_fixup); __ptov_table_end = .; -#ifdef CONFIG_PPC_ISERIES - __dt_strings_start = .; - *(.dt_strings); - __dt_strings_end = .; -#endif } . = ALIGN(16); diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index ff7096458..34f5c2e07 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile @@ -2,15 +2,12 @@ # Makefile for ppc-specific library files.. # -ifeq ($(CONFIG_PPC64),y) -EXTRA_CFLAGS += -mno-minimal-toc -endif - ifeq ($(CONFIG_PPC_MERGE),y) obj-y := string.o strcase.o obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o endif +obj-y += bitops.o obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \ memcpy_64.o usercopy_64.o mem_64.o string.o \ strcase.o diff --git a/arch/powerpc/lib/bitops.c b/arch/powerpc/lib/bitops.c new file mode 100644 index 000000000..f68ad71a0 --- /dev/null +++ b/arch/powerpc/lib/bitops.c @@ -0,0 +1,150 @@ +#include +#include +#include +#include + +/** + * find_next_bit - find the next set bit in a memory region + * @addr: The address to base the search on + * @offset: The bitnumber to start searching at + * @size: The maximum size to search + */ +unsigned long find_next_bit(const unsigned long *addr, unsigned long size, + unsigned long offset) +{ + const unsigned long *p = addr + BITOP_WORD(offset); + unsigned long result = offset & ~(BITS_PER_LONG-1); + unsigned long tmp; + + if (offset >= size) + return size; + size -= result; + offset %= BITS_PER_LONG; + if (offset) { + tmp = *(p++); + tmp &= (~0UL << offset); + if (size < BITS_PER_LONG) + goto found_first; + if (tmp) + goto found_middle; + size -= BITS_PER_LONG; + result += BITS_PER_LONG; + } + while (size & ~(BITS_PER_LONG-1)) { + if ((tmp = *(p++))) + goto found_middle; + result += BITS_PER_LONG; + size -= BITS_PER_LONG; + } + if (!size) + return result; + tmp = *p; + +found_first: + tmp &= (~0UL >> (BITS_PER_LONG - size)); + if (tmp == 0UL) /* Are any bits set? */ + return result + size; /* Nope. */ +found_middle: + return result + __ffs(tmp); +} +EXPORT_SYMBOL(find_next_bit); + +/* + * This implementation of find_{first,next}_zero_bit was stolen from + * Linus' asm-alpha/bitops.h. + */ +unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, + unsigned long offset) +{ + const unsigned long *p = addr + BITOP_WORD(offset); + unsigned long result = offset & ~(BITS_PER_LONG-1); + unsigned long tmp; + + if (offset >= size) + return size; + size -= result; + offset %= BITS_PER_LONG; + if (offset) { + tmp = *(p++); + tmp |= ~0UL >> (BITS_PER_LONG - offset); + if (size < BITS_PER_LONG) + goto found_first; + if (~tmp) + goto found_middle; + size -= BITS_PER_LONG; + result += BITS_PER_LONG; + } + while (size & ~(BITS_PER_LONG-1)) { + if (~(tmp = *(p++))) + goto found_middle; + result += BITS_PER_LONG; + size -= BITS_PER_LONG; + } + if (!size) + return result; + tmp = *p; + +found_first: + tmp |= ~0UL << size; + if (tmp == ~0UL) /* Are any bits zero? */ + return result + size; /* Nope. */ +found_middle: + return result + ffz(tmp); +} +EXPORT_SYMBOL(find_next_zero_bit); + +static inline unsigned int ext2_ilog2(unsigned int x) +{ + int lz; + + asm("cntlzw %0,%1": "=r"(lz):"r"(x)); + return 31 - lz; +} + +static inline unsigned int ext2_ffz(unsigned int x) +{ + u32 rc; + if ((x = ~x) == 0) + return 32; + rc = ext2_ilog2(x & -x); + return rc; +} + +unsigned long find_next_zero_le_bit(const unsigned long *addr, + unsigned long size, unsigned long offset) +{ + const unsigned int *p = ((const unsigned int *)addr) + (offset >> 5); + unsigned int result = offset & ~31; + unsigned int tmp; + + if (offset >= size) + return size; + size -= result; + offset &= 31; + if (offset) { + tmp = cpu_to_le32p(p++); + tmp |= ~0U >> (32 - offset); /* bug or feature ? */ + if (size < 32) + goto found_first; + if (tmp != ~0) + goto found_middle; + size -= 32; + result += 32; + } + while (size >= 32) { + if ((tmp = cpu_to_le32p(p++)) != ~0) + goto found_middle; + result += 32; + size -= 32; + } + if (!size) + return result; + tmp = cpu_to_le32p(p); +found_first: + tmp |= ~0 << size; + if (tmp == ~0) /* Are any bits zero? */ + return result + size; /* Nope. */ +found_middle: + return result + ext2_ffz(tmp); +} +EXPORT_SYMBOL(find_next_zero_le_bit); diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S index c657de59a..bee514148 100644 --- a/arch/powerpc/lib/copy_32.S +++ b/arch/powerpc/lib/copy_32.S @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 077bed7dc..8362fa272 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 7173ba98f..fd66acfd3 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S @@ -11,7 +11,6 @@ .align 7 _GLOBAL(memcpy) - std r3,48(r1) /* save destination pointer for return value */ mtcrf 0x01,r5 cmpldi cr1,r5,16 neg r6,r3 # LS 3 bits = # bytes to 8-byte dest bdry @@ -39,7 +38,7 @@ _GLOBAL(memcpy) stdu r9,16(r3) bdnz 1b 3: std r8,8(r3) - beq 3f + beqlr addi r3,r3,16 ld r9,8(r4) .Ldo_tail: @@ -54,8 +53,7 @@ _GLOBAL(memcpy) 2: bf cr7*4+3,3f rotldi r9,r9,8 stb r9,0(r3) -3: ld r3,48(r1) /* return dest pointer */ - blr +3: blr .Lsrc_unaligned: srdi r6,r5,3 @@ -117,7 +115,7 @@ _GLOBAL(memcpy) 5: srd r12,r9,r11 or r12,r8,r12 std r12,24(r3) - beq 4f + beqlr cmpwi cr1,r5,8 addi r3,r3,32 sld r9,r9,r10 @@ -169,5 +167,4 @@ _GLOBAL(memcpy) 3: bf cr7*4+3,4f lbz r0,0(r4) stb r0,0(r3) -4: ld r3,48(r1) /* return dest pointer */ - blr +4: blr diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 9590ba780..c251d9936 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index c4c622d8e..b9ca84ed8 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/math-emu/math.c b/arch/powerpc/math-emu/math.c index 69058b287..589153472 100644 --- a/arch/powerpc/math-emu/math.c +++ b/arch/powerpc/math-emu/math.c @@ -2,6 +2,7 @@ * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) */ +#include #include #include diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c index 0a0a0487b..3d79ce281 100644 --- a/arch/powerpc/mm/44x_mmu.c +++ b/arch/powerpc/mm/44x_mmu.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include @@ -103,7 +104,7 @@ unsigned long __init mmu_mapin_ram(void) /* Determine number of entries necessary to cover lowmem */ pinned_tlbs = (unsigned int) - (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT); + (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); /* Write upper watermark to save location */ tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; @@ -111,7 +112,7 @@ unsigned long __init mmu_mapin_ram(void) /* If necessary, set additional pinned TLBs */ if (pinned_tlbs > 1) for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { - unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE; + unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); } diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c index 838e09db7..4d006aa1a 100644 --- a/arch/powerpc/mm/4xx_mmu.c +++ b/arch/powerpc/mm/4xx_mmu.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 78a0d5990..fdbba4206 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -39,40 +40,6 @@ #include #include -#ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} - -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); -} -#else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - return NOTIFY_DONE; -} -#endif - /* * Check whether the instruction at regs->nip is a store using * an update addressing form which will update r1. @@ -175,7 +142,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, is_write = error_code & ESR_DST; #endif /* CONFIG_4xx || CONFIG_BOOKE */ - if (notify_page_fault(DIE_PAGE_FAULT, "page_fault", regs, error_code, + if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, error_code, 11, SIGSEGV) == NOTIFY_STOP) return 0; diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index 123da03ab..5d581bb3a 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index bd68df5fa..ea469eefa 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S @@ -21,6 +21,7 @@ * */ +#include #include #include #include @@ -73,6 +74,12 @@ _GLOBAL(hash_page_sync) */ .text _GLOBAL(hash_page) +#ifdef CONFIG_PPC64BRIDGE + mfmsr r0 + clrldi r0,r0,1 /* make sure it's in 32-bit mode */ + MTMSRD(r0) + isync +#endif tophys(r7,0) /* gets -KERNELBASE into r7 */ #ifdef CONFIG_SMP addis r8,r7,mmu_hash_lock@h @@ -278,6 +285,7 @@ Hash_base = 0xc0180000 Hash_bits = 12 /* e.g. 256kB hash table */ Hash_msk = (((1 << Hash_bits) - 1) * 64) +#ifndef CONFIG_PPC64BRIDGE /* defines for the PTE format for 32-bit PPCs */ #define PTE_SIZE 8 #define PTEG_SIZE 64 @@ -291,6 +299,21 @@ Hash_msk = (((1 << Hash_bits) - 1) * 64) #define SET_V(r) oris r,r,PTE_V@h #define CLR_V(r,t) rlwinm r,r,0,1,31 +#else +/* defines for the PTE format for 64-bit PPCs */ +#define PTE_SIZE 16 +#define PTEG_SIZE 128 +#define LG_PTEG_SIZE 7 +#define LDPTEu ldu +#define STPTE std +#define CMPPTE cmpd +#define PTE_H 2 +#define PTE_V 1 +#define TST_V(r) andi. r,r,PTE_V +#define SET_V(r) ori r,r,PTE_V +#define CLR_V(r,t) li t,PTE_V; andc r,r,t +#endif /* CONFIG_PPC64BRIDGE */ + #define HASH_LEFT 31-(LG_PTEG_SIZE+Hash_bits-1) #define HASH_RIGHT 31-LG_PTEG_SIZE @@ -308,8 +331,14 @@ BEGIN_FTR_SECTION END_FTR_SECTION_IFSET(CPU_FTR_NEED_COHERENT) /* Construct the high word of the PPC-style PTE (r5) */ +#ifndef CONFIG_PPC64BRIDGE rlwinm r5,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ rlwimi r5,r4,10,26,31 /* put in API (abbrev page index) */ +#else /* CONFIG_PPC64BRIDGE */ + clrlwi r3,r3,8 /* reduce vsid to 24 bits */ + sldi r5,r3,12 /* shift vsid into position */ + rlwimi r5,r4,16,20,24 /* put in API (abbrev page index) */ +#endif /* CONFIG_PPC64BRIDGE */ SET_V(r5) /* set V (valid) bit */ /* Get the address of the primary PTE group in the hash table (r3) */ @@ -487,8 +516,14 @@ _GLOBAL(flush_hash_pages) add r3,r3,r0 /* note code below trims to 24 bits */ /* Construct the high word of the PPC-style PTE (r11) */ +#ifndef CONFIG_PPC64BRIDGE rlwinm r11,r3,7,1,24 /* put VSID in 0x7fffff80 bits */ rlwimi r11,r4,10,26,31 /* put in API (abbrev page index) */ +#else /* CONFIG_PPC64BRIDGE */ + clrlwi r3,r3,8 /* reduce vsid to 24 bits */ + sldi r11,r3,12 /* shift vsid into position */ + rlwimi r11,r4,16,20,24 /* put in API (abbrev page index) */ +#endif /* CONFIG_PPC64BRIDGE */ SET_V(r11) /* set V (valid) bit */ #ifdef CONFIG_SMP diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index 9bc0a9c2b..e0d02c4a2 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S @@ -10,6 +10,7 @@ * described in the kernel's COPYING file. */ +#include #include #include #include @@ -135,7 +136,6 @@ _GLOBAL(__hash_page_4K) 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 */ - ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ /* We eventually do the icache sync here (maybe inline that * code rather than call a C function...) @@ -368,7 +368,6 @@ _GLOBAL(__hash_page_4K) rlwinm r30,r4,32-9+7,31-7,31-7 /* _PAGE_RW -> _PAGE_DIRTY */ or r30,r30,r31 ori r30,r30,_PAGE_BUSY | _PAGE_ACCESSED | _PAGE_HASHPTE - oris r30,r30,_PAGE_COMBO@h /* Write the linux PTE atomically (setting busy) */ stdcx. r30,0,r6 bne- 1b @@ -401,7 +400,6 @@ _GLOBAL(__hash_page_4K) 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 */ - ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ /* We eventually do the icache sync here (maybe inline that * code rather than call a C function...) @@ -428,14 +426,6 @@ END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) andi. r0,r31,_PAGE_HASHPTE li r26,0 /* Default hidx */ beq htab_insert_pte - - /* - * Check if the pte was already inserted into the hash table - * as a 64k HW page, and invalidate the 64k HPTE if so. - */ - andis. r0,r31,_PAGE_COMBO@h - beq htab_inval_old_hpte - ld r6,STK_PARM(r6)(r1) ori r26,r6,0x8000 /* Load the hidx mask */ ld r26,0(r26) @@ -506,19 +496,6 @@ _GLOBAL(htab_call_hpte_remove) /* Try all again */ b htab_insert_pte - /* - * Call out to C code to invalidate an 64k HW HPTE that is - * useless now that the segment has been switched to 4k pages. - */ -htab_inval_old_hpte: - mr r3,r29 /* virtual addr */ - mr r4,r31 /* PTE.pte */ - li r5,0 /* PTE.hidx */ - li r6,MMU_PAGE_64K /* psize */ - ld r7,STK_PARM(r8)(r1) /* local */ - bl .flush_hash_page - b htab_insert_pte - htab_bail_ok: li r3,0 b htab_bail @@ -659,12 +636,6 @@ _GLOBAL(__hash_page_64K) * is changing this PTE anyway and might hash it. */ bne- ht64_bail_ok -BEGIN_FTR_SECTION - /* Check if PTE has the cache-inhibit bit set */ - andi. r0,r31,_PAGE_NO_CACHE - /* If so, bail out and refault as a 4k page */ - bne- ht64_bail_ok -END_FTR_SECTION_IFCLR(CPU_FTR_CI_LARGE_PAGE) /* Prepare new PTE value (turn access RW into DIRTY, then * add BUSY,HASHPTE and ACCESSED) */ @@ -700,7 +671,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_CI_LARGE_PAGE) 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 */ - ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ /* We eventually do the icache sync here (maybe inline that * code rather than call a C function...) diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index c90f124f3..994856e55 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c @@ -238,7 +238,7 @@ static long native_hpte_updatepp(unsigned long slot, unsigned long newpp, DBG_LOW(" -> hit\n"); /* Update the HPTE */ hptep->r = (hptep->r & ~(HPTE_R_PP | HPTE_R_N)) | - (newpp & (HPTE_R_PP | HPTE_R_N | HPTE_R_C)); + (newpp & (HPTE_R_PP | HPTE_R_N)); native_unlock_hpte(hptep); } @@ -520,7 +520,7 @@ static inline int tlb_batching_enabled(void) } #endif -void __init hpte_init_native(void) +void hpte_init_native(void) { ppc_md.hpte_invalidate = native_hpte_invalidate; ppc_md.hpte_updatepp = native_hpte_updatepp; @@ -530,4 +530,5 @@ void __init hpte_init_native(void) ppc_md.hpte_clear_all = native_hpte_clear; if (tlb_batching_enabled()) ppc_md.flush_hash_range = native_flush_hash_range; + htab_finish_init(); } diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 1915661c2..c006d9039 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -21,6 +21,7 @@ #undef DEBUG #undef DEBUG_LOW +#include #include #include #include @@ -91,15 +92,10 @@ unsigned long htab_size_bytes; unsigned long htab_hash_mask; int mmu_linear_psize = MMU_PAGE_4K; int mmu_virtual_psize = MMU_PAGE_4K; -int mmu_vmalloc_psize = MMU_PAGE_4K; -int mmu_io_psize = MMU_PAGE_4K; #ifdef CONFIG_HUGETLB_PAGE int mmu_huge_psize = MMU_PAGE_16M; unsigned int HPAGE_SHIFT; #endif -#ifdef CONFIG_PPC_64K_PAGES -int mmu_ci_restrictions; -#endif /* There are definitions of page sizes arrays to be used when none * is provided by the firmware. @@ -166,12 +162,34 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, hash = hpt_hash(va, shift); hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); - DBG("htab_bolt_mapping: calling %p\n", ppc_md.hpte_insert); - - BUG_ON(!ppc_md.hpte_insert); - ret = ppc_md.hpte_insert(hpteg, va, paddr, - tmp_mode, HPTE_V_BOLTED, psize); - + /* The crap below can be cleaned once ppd_md.probe() can + * set up the hash callbacks, thus we can just used the + * normal insert callback here. + */ +#ifdef CONFIG_PPC_ISERIES + if (machine_is(iseries)) + ret = iSeries_hpte_insert(hpteg, va, + paddr, + tmp_mode, + HPTE_V_BOLTED, + psize); + else +#endif +#ifdef CONFIG_PPC_PSERIES + if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) + ret = pSeries_lpar_hpte_insert(hpteg, va, + paddr, + tmp_mode, + HPTE_V_BOLTED, + psize); + else +#endif +#ifdef CONFIG_PPC_MULTIPLATFORM + ret = native_hpte_insert(hpteg, va, + paddr, + tmp_mode, HPTE_V_BOLTED, + psize); +#endif if (ret < 0) break; } @@ -290,31 +308,20 @@ static void __init htab_init_page_sizes(void) else if (mmu_psize_defs[MMU_PAGE_1M].shift) mmu_linear_psize = MMU_PAGE_1M; -#ifdef CONFIG_PPC_64K_PAGES /* * Pick a size for the ordinary pages. Default is 4K, we support - * 64K for user mappings and vmalloc if supported by the processor. - * We only use 64k for ioremap if the processor - * (and firmware) support cache-inhibited large pages. - * If not, we use 4k and set mmu_ci_restrictions so that - * hash_page knows to switch processes that use cache-inhibited - * mappings to 4k pages. + * 64K if cache inhibited large pages are supported by the + * processor */ - if (mmu_psize_defs[MMU_PAGE_64K].shift) { +#ifdef CONFIG_PPC_64K_PAGES + if (mmu_psize_defs[MMU_PAGE_64K].shift && + cpu_has_feature(CPU_FTR_CI_LARGE_PAGE)) mmu_virtual_psize = MMU_PAGE_64K; - mmu_vmalloc_psize = MMU_PAGE_64K; - if (cpu_has_feature(CPU_FTR_CI_LARGE_PAGE)) - mmu_io_psize = MMU_PAGE_64K; - else - mmu_ci_restrictions = 1; - } #endif - printk(KERN_DEBUG "Page orders: linear mapping = %d, " - "virtual = %d, io = %d\n", + printk(KERN_INFO "Page orders: linear mapping = %d, others = %d\n", mmu_psize_defs[mmu_linear_psize].shift, - mmu_psize_defs[mmu_virtual_psize].shift, - mmu_psize_defs[mmu_io_psize].shift); + mmu_psize_defs[mmu_virtual_psize].shift); #ifdef CONFIG_HUGETLB_PAGE /* Init large page size. Currently, we pick 16M or 1M depending @@ -390,41 +397,6 @@ void create_section_mapping(unsigned long start, unsigned long end) } #endif /* CONFIG_MEMORY_HOTPLUG */ -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); -} - -static 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; - -#ifdef CONFIG_PPC_64K_PAGES - extern unsigned int *ht64_call_hpte_insert1; - extern unsigned int *ht64_call_hpte_insert2; - extern unsigned int *ht64_call_hpte_remove; - extern unsigned int *ht64_call_hpte_updatepp; - - make_bl(ht64_call_hpte_insert1, ppc_md.hpte_insert); - make_bl(ht64_call_hpte_insert2, ppc_md.hpte_insert); - make_bl(ht64_call_hpte_remove, ppc_md.hpte_remove); - make_bl(ht64_call_hpte_updatepp, ppc_md.hpte_updatepp); -#endif /* CONFIG_PPC_64K_PAGES */ - - 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); -} - void __init htab_initialize(void) { unsigned long table; @@ -537,8 +509,6 @@ void __init htab_initialize(void) mmu_linear_psize)); } - htab_finish_init(); - DBG(" <- htab_initialize()\n"); } #undef KB @@ -586,7 +556,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) pte_t *ptep; cpumask_t tmp; int rc, user_region = 0, local = 0; - int psize; DBG_LOW("hash_page(ea=%016lx, access=%lx, trap=%lx\n", ea, access, trap); @@ -606,15 +575,10 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) return 1; } vsid = get_vsid(mm->context.id, ea); - psize = mm->context.user_psize; break; case VMALLOC_REGION_ID: mm = &init_mm; vsid = get_kernel_vsid(ea); - if (ea < VMALLOC_END) - psize = mmu_vmalloc_psize; - else - psize = mmu_io_psize; break; default: /* Not a valid range @@ -665,40 +629,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) #ifndef CONFIG_PPC_64K_PAGES rc = __hash_page_4K(ea, access, vsid, ptep, trap, local); #else - if (mmu_ci_restrictions) { - /* If this PTE is non-cacheable, switch to 4k */ - if (psize == MMU_PAGE_64K && - (pte_val(*ptep) & _PAGE_NO_CACHE)) { - if (user_region) { - psize = MMU_PAGE_4K; - mm->context.user_psize = MMU_PAGE_4K; - mm->context.sllp = SLB_VSID_USER | - mmu_psize_defs[MMU_PAGE_4K].sllp; - } else if (ea < VMALLOC_END) { - /* - * some driver did a non-cacheable mapping - * in vmalloc space, so switch vmalloc - * to 4k pages - */ - printk(KERN_ALERT "Reducing vmalloc segment " - "to 4kB pages because of " - "non-cacheable mapping\n"); - psize = mmu_vmalloc_psize = MMU_PAGE_4K; - } - } - if (user_region) { - if (psize != get_paca()->context.user_psize) { - get_paca()->context = mm->context; - slb_flush_and_rebolt(); - } - } else if (get_paca()->vmalloc_sllp != - mmu_psize_defs[mmu_vmalloc_psize].sllp) { - get_paca()->vmalloc_sllp = - mmu_psize_defs[mmu_vmalloc_psize].sllp; - slb_flush_and_rebolt(); - } - } - if (psize == MMU_PAGE_64K) + if (mmu_virtual_psize == MMU_PAGE_64K) rc = __hash_page_64K(ea, access, vsid, ptep, trap, local); else rc = __hash_page_4K(ea, access, vsid, ptep, trap, local); @@ -750,18 +681,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, #ifndef CONFIG_PPC_64K_PAGES __hash_page_4K(ea, access, vsid, ptep, trap, local); #else - if (mmu_ci_restrictions) { - /* If this PTE is non-cacheable, switch to 4k */ - if (mm->context.user_psize == MMU_PAGE_64K && - (pte_val(*ptep) & _PAGE_NO_CACHE)) { - mm->context.user_psize = MMU_PAGE_4K; - mm->context.sllp = SLB_VSID_USER | - mmu_psize_defs[MMU_PAGE_4K].sllp; - get_paca()->context = mm->context; - slb_flush_and_rebolt(); - } - } - if (mm->context.user_psize == MMU_PAGE_64K) + if (mmu_virtual_psize == MMU_PAGE_64K) __hash_page_64K(ea, access, vsid, ptep, trap, local); else __hash_page_4K(ea, access, vsid, ptep, trap, local); @@ -801,6 +721,16 @@ void flush_hash_range(unsigned long number, int 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); +} + /* * low_hash_fault is called when we the low level hash code failed * to instert a PTE due to an hypervisor error @@ -819,3 +749,28 @@ void low_hash_fault(struct pt_regs *regs, unsigned long address) } bad_page_fault(regs, address, SIGBUS); } + +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; + +#ifdef CONFIG_PPC_64K_PAGES + extern unsigned int *ht64_call_hpte_insert1; + extern unsigned int *ht64_call_hpte_insert2; + extern unsigned int *ht64_call_hpte_remove; + extern unsigned int *ht64_call_hpte_updatepp; + + make_bl(ht64_call_hpte_insert1, ppc_md.hpte_insert); + make_bl(ht64_call_hpte_insert2, ppc_md.hpte_insert); + make_bl(ht64_call_hpte_remove, ppc_md.hpte_remove); + make_bl(ht64_call_hpte_updatepp, ppc_md.hpte_updatepp); +#endif /* CONFIG_PPC_64K_PAGES */ + + 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); +} diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 5615acc29..266b8b2ce 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -153,7 +153,7 @@ static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) hpdp->pd = 0; tlb->need_flush = 1; pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, HUGEPTE_CACHE_NUM, - PGF_CACHENUM_MASK)); + HUGEPTE_TABLE_SIZE-1)); } #ifdef CONFIG_PPC_64K_PAGES diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 0e53ca8f0..b57fb3a2b 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 3ff374697..9e30f968c 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -22,6 +22,7 @@ #undef DEBUG +#include #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include #include #include @@ -90,7 +90,7 @@ void free_initmem(void) addr = (unsigned long)__init_begin; for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { - memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); + memset((void *)addr, 0xcc, PAGE_SIZE); ClearPageReserved(virt_to_page(addr)); init_page_count(virt_to_page(addr)); free_page(addr); diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 716a2906a..417d58518 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -88,23 +89,18 @@ static long __init lmb_regions_adjacent(struct lmb_region *rgn, return lmb_addrs_adjacent(base1, size1, base2, size2); } -static void __init lmb_remove_region(struct lmb_region *rgn, unsigned long r) -{ - unsigned long i; - - for (i = r; i < rgn->cnt - 1; i++) { - rgn->region[i].base = rgn->region[i + 1].base; - rgn->region[i].size = rgn->region[i + 1].size; - } - rgn->cnt--; -} - /* Assumption: base addr of region 1 < base addr of region 2 */ static void __init lmb_coalesce_regions(struct lmb_region *rgn, unsigned long r1, unsigned long r2) { + unsigned long i; + rgn->region[r1].size += rgn->region[r2].size; - lmb_remove_region(rgn, r2); + for (i=r2; i < rgn->cnt-1; i++) { + rgn->region[i].base = rgn->region[i+1].base; + rgn->region[i].size = rgn->region[i+1].size; + } + rgn->cnt--; } /* This routine called with relocation disabled. */ @@ -298,16 +294,17 @@ unsigned long __init lmb_end_of_DRAM(void) return (lmb.memory.region[idx].base + lmb.memory.region[idx].size); } -/* You must call lmb_analyze() after this. */ +/* + * Truncate the lmb list to memory_limit if it's set + * You must call lmb_analyze() after this. + */ void __init lmb_enforce_memory_limit(unsigned long memory_limit) { unsigned long i, limit; - struct lmb_property *p; if (! memory_limit) return; - /* Truncate the lmb regions to satisfy the memory limit. */ limit = memory_limit; for (i = 0; i < lmb.memory.cnt; i++) { if (limit > lmb.memory.region[i].size) { @@ -319,22 +316,4 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit) lmb.memory.cnt = i + 1; break; } - - if (lmb.memory.region[0].size < lmb.rmo_size) - lmb.rmo_size = lmb.memory.region[0].size; - - /* And truncate any reserves above the limit also. */ - for (i = 0; i < lmb.reserved.cnt; i++) { - p = &lmb.reserved.region[i]; - - if (p->base > memory_limit) - p->size = 0; - else if ((p->base + p->size) > memory_limit) - p->size = memory_limit - p->base; - - if (p->size == 0) { - lmb_remove_region(&lmb.reserved, i); - i--; - } - } } diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 1b44f7b42..457b7ee6e 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include @@ -114,20 +115,15 @@ void online_page(struct page *page) num_physpages++; } -#ifdef CONFIG_NUMA -int memory_add_physaddr_to_nid(u64 start) -{ - return hot_add_scn_to_nid(start); -} -#endif - -int __devinit arch_add_memory(int nid, u64 start, u64 size) +int __devinit add_memory(u64 start, u64 size) { struct pglist_data *pgdata; struct zone *zone; + int nid; unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long nr_pages = size >> PAGE_SHIFT; + nid = hot_add_scn_to_nid(start); pgdata = NODE_DATA(nid); start = (unsigned long)__va(start); @@ -304,9 +300,9 @@ void __init paging_init(void) kmap_prot = PAGE_KERNEL; #endif /* CONFIG_HIGHMEM */ - printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", + printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", top_of_ram, total_ram); - printk(KERN_DEBUG "Memory hole size: %ldMB\n", + printk(KERN_INFO "Memory hole size: %ldMB\n", (top_of_ram - total_ram) >> 20); /* * All pages are DMA-able so we put them all in the DMA zone. @@ -398,7 +394,7 @@ void __init mem_init(void) totalhigh_pages++; } totalram_pages += totalhigh_pages; - printk(KERN_DEBUG "High memory: %luk\n", + printk(KERN_INFO "High memory: %luk\n", totalhigh_pages << (PAGE_SHIFT-10)); } #endif /* CONFIG_HIGHMEM */ diff --git a/arch/powerpc/mm/mmu_context_32.c b/arch/powerpc/mm/mmu_context_32.c index 792086b01..a8816e0f6 100644 --- a/arch/powerpc/mm/mmu_context_32.c +++ b/arch/powerpc/mm/mmu_context_32.c @@ -23,13 +23,14 @@ * */ +#include #include #include #include #include -unsigned long next_mmu_context; +mm_context_t next_mmu_context; unsigned long context_map[LAST_CONTEXT / BITS_PER_LONG + 1]; #ifdef FEW_CONTEXTS atomic_t nr_free_contexts; diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 90a06ac02..714a84dd8 100644 --- a/arch/powerpc/mm/mmu_context_64.c +++ b/arch/powerpc/mm/mmu_context_64.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -43,16 +44,11 @@ again: return err; if (index > MAX_CONTEXT) { - spin_lock(&mmu_context_lock); idr_remove(&mmu_context_idr, index); - spin_unlock(&mmu_context_lock); return -ENOMEM; } mm->context.id = index; - mm->context.user_psize = mmu_virtual_psize; - mm->context.sllp = SLB_VSID_USER | - mmu_psize_defs[mmu_virtual_psize].sllp; return 0; } diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index fbe23933f..092355f37 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -334,7 +334,7 @@ out: return nid; } -static int __cpuinit cpu_numa_callback(struct notifier_block *nfb, +static int cpu_numa_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -487,9 +487,9 @@ static void __init setup_nonnuma(void) unsigned long total_ram = lmb_phys_mem_size(); unsigned int i; - printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", + printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", top_of_ram, total_ram); - printk(KERN_DEBUG "Memory hole size: %ldMB\n", + printk(KERN_INFO "Memory hole size: %ldMB\n", (top_of_ram - total_ram) >> 20); for (i = 0; i < lmb.memory.cnt; ++i) @@ -507,7 +507,7 @@ void __init dump_numa_cpu_topology(void) return; for_each_online_node(node) { - printk(KERN_DEBUG "Node %d CPUs:", node); + printk(KERN_INFO "Node %d CPUs:", node); count = 0; /* @@ -543,7 +543,7 @@ static void __init dump_numa_memory_topology(void) for_each_online_node(node) { unsigned long i; - printk(KERN_DEBUG "Node %d Memory:", node); + printk(KERN_INFO "Node %d Memory:", node); count = 0; @@ -609,15 +609,14 @@ static void __init *careful_allocation(int nid, unsigned long size, return (void *)ret; } -static struct notifier_block __cpuinitdata ppc64_numa_nb = { - .notifier_call = cpu_numa_callback, - .priority = 1 /* Must run before sched domains notifier. */ -}; - void __init do_init_bootmem(void) { int nid; unsigned int i; + static struct notifier_block ppc64_numa_nb = { + .notifier_call = cpu_numa_callback, + .priority = 1 /* Must run before sched domains notifier. */ + }; min_low_pfn = 0; max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 8fcacb023..90628601f 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index b1da03165..7b278d837 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -22,6 +22,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c index 7cceb2c44..ed7fcfe5f 100644 --- a/arch/powerpc/mm/ppc_mmu_32.c +++ b/arch/powerpc/mm/ppc_mmu_32.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -41,14 +42,18 @@ unsigned long _SDR1; union ubat { /* BAT register values to be loaded */ BAT bat; +#ifdef CONFIG_PPC64BRIDGE + u64 word[2]; +#else u32 word[2]; -} BATS[8][2]; /* 8 pairs of IBAT, DBAT */ +#endif +} BATS[4][2]; /* 4 pairs of IBAT, DBAT */ struct batrange { /* stores address ranges mapped by BATs */ unsigned long start; unsigned long limit; unsigned long phys; -} bat_addrs[8]; +} bat_addrs[4]; /* * Return PA for this VA if it is mapped by a BAT, or 0 @@ -185,7 +190,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, return; pmd = pmd_offset(pgd_offset(mm, ea), ea); if (!pmd_none(*pmd)) - add_hash_page(mm->context.id, ea, pmd_val(*pmd)); + add_hash_page(mm->context, ea, pmd_val(*pmd)); } /* @@ -215,9 +220,15 @@ void __init MMU_init_hw(void) if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105); +#ifdef CONFIG_PPC64BRIDGE +#define LG_HPTEG_SIZE 7 /* 128 bytes per HPTEG */ +#define SDR1_LOW_BITS (lg_n_hpteg - 11) +#define MIN_N_HPTEG 2048 /* min 256kB hash table */ +#else #define LG_HPTEG_SIZE 6 /* 64 bytes per HPTEG */ #define SDR1_LOW_BITS ((n_hpteg - 1) >> 10) #define MIN_N_HPTEG 1024 /* min 64kB hash table */ +#endif /* * Allow 1 HPTE (1/8 HPTEG) for each page of memory. diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index de0c88424..ffc8ed4de 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c @@ -16,6 +16,7 @@ #undef DEBUG +#include #include #include #include @@ -59,19 +60,19 @@ static inline void create_slbe(unsigned long ea, unsigned long flags, : "memory" ); } -void slb_flush_and_rebolt(void) +static void slb_flush_and_rebolt(void) { /* If you change this make sure you change SLB_NUM_BOLTED * appropriately too. */ - unsigned long linear_llp, vmalloc_llp, lflags, vflags; + unsigned long linear_llp, virtual_llp, lflags, vflags; unsigned long ksp_esid_data; WARN_ON(!irqs_disabled()); linear_llp = mmu_psize_defs[mmu_linear_psize].sllp; - vmalloc_llp = mmu_psize_defs[mmu_vmalloc_psize].sllp; + virtual_llp = mmu_psize_defs[mmu_virtual_psize].sllp; lflags = SLB_VSID_KERNEL | linear_llp; - vflags = SLB_VSID_KERNEL | vmalloc_llp; + vflags = SLB_VSID_KERNEL | virtual_llp; ksp_esid_data = mk_esid_data(get_paca()->kstack, 2); if ((ksp_esid_data & ESID_MASK) == PAGE_OFFSET) @@ -121,6 +122,9 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) get_paca()->slb_cache_ptr = 0; get_paca()->context = mm->context; +#ifdef CONFIG_PPC_64K_PAGES + get_paca()->pgdir = mm->pgd; +#endif /* CONFIG_PPC_64K_PAGES */ /* * preload some userspace segments into the SLB. @@ -163,10 +167,11 @@ static inline void patch_slb_encoding(unsigned int *insn_addr, void slb_initialize(void) { - unsigned long linear_llp, vmalloc_llp, io_llp; + unsigned long linear_llp, virtual_llp; static int slb_encoding_inited; extern unsigned int *slb_miss_kernel_load_linear; - extern unsigned int *slb_miss_kernel_load_io; + extern unsigned int *slb_miss_kernel_load_virtual; + extern unsigned int *slb_miss_user_load_normal; #ifdef CONFIG_HUGETLB_PAGE extern unsigned int *slb_miss_user_load_huge; unsigned long huge_llp; @@ -176,19 +181,18 @@ void slb_initialize(void) /* Prepare our SLB miss handler based on our page size */ linear_llp = mmu_psize_defs[mmu_linear_psize].sllp; - io_llp = mmu_psize_defs[mmu_io_psize].sllp; - vmalloc_llp = mmu_psize_defs[mmu_vmalloc_psize].sllp; - get_paca()->vmalloc_sllp = SLB_VSID_KERNEL | vmalloc_llp; - + virtual_llp = mmu_psize_defs[mmu_virtual_psize].sllp; if (!slb_encoding_inited) { slb_encoding_inited = 1; patch_slb_encoding(slb_miss_kernel_load_linear, SLB_VSID_KERNEL | linear_llp); - patch_slb_encoding(slb_miss_kernel_load_io, - SLB_VSID_KERNEL | io_llp); + patch_slb_encoding(slb_miss_kernel_load_virtual, + SLB_VSID_KERNEL | virtual_llp); + patch_slb_encoding(slb_miss_user_load_normal, + SLB_VSID_USER | virtual_llp); DBG("SLB: linear LLP = %04x\n", linear_llp); - DBG("SLB: io LLP = %04x\n", io_llp); + DBG("SLB: virtual LLP = %04x\n", virtual_llp); #ifdef CONFIG_HUGETLB_PAGE patch_slb_encoding(slb_miss_user_load_huge, SLB_VSID_USER | huge_llp); @@ -203,7 +207,7 @@ void slb_initialize(void) unsigned long lflags, vflags; lflags = SLB_VSID_KERNEL | linear_llp; - vflags = SLB_VSID_KERNEL | vmalloc_llp; + vflags = SLB_VSID_KERNEL | virtual_llp; /* Invalidate the entire SLB (even slot 0) & all the ERATS */ asm volatile("isync":::"memory"); @@ -211,6 +215,7 @@ void slb_initialize(void) asm volatile("isync; slbia; isync":::"memory"); create_slbe(PAGE_OFFSET, lflags, 0); + /* VMALLOC space has 4K pages always for now */ create_slbe(VMALLOC_START, vflags, 1); /* We don't bolt the stack for the time being - we're in boot, diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index dbc1abbde..abfaabf66 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -58,19 +59,10 @@ _GLOBAL(slb_miss_kernel_load_linear) li r11,0 b slb_finish_load -1: /* vmalloc/ioremap mapping encoding bits, the "li" instructions below +1: /* vmalloc/ioremap mapping encoding bits, the "li" instruction below * will be patched by the kernel at boot */ -BEGIN_FTR_SECTION - /* check whether this is in vmalloc or ioremap space */ - clrldi r11,r10,48 - cmpldi r11,(VMALLOC_SIZE >> 28) - 1 - bgt 5f - lhz r11,PACAVMALLOCSLLP(r13) - b slb_finish_load -5: -END_FTR_SECTION_IFCLR(CPU_FTR_CI_LARGE_PAGE) -_GLOBAL(slb_miss_kernel_load_io) +_GLOBAL(slb_miss_kernel_load_virtual) li r11,0 b slb_finish_load @@ -104,7 +96,9 @@ _GLOBAL(slb_miss_user_load_huge) 1: #endif /* CONFIG_HUGETLB_PAGE */ - lhz r11,PACACONTEXTSLLP(r13) +_GLOBAL(slb_miss_user_load_normal) + li r11,0 + 2: ld r9,PACACONTEXTID(r13) rldimi r10,r9,USER_ESID_BITS,0 diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index eeeacab54..4a9291d9f 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -199,6 +200,10 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) __get_cpu_var(stab_cache_ptr) = 0; +#ifdef CONFIG_PPC_64K_PAGES + get_paca()->pgdir = mm->pgd; +#endif /* CONFIG_PPC_64K_PAGES */ + /* Now preload some entries for the new task */ if (test_tsk_thread_flag(tsk, TIF_32BIT)) unmapped_base = TASK_UNMAPPED_BASE_USER32; diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c index 925ff70be..ad580f374 100644 --- a/arch/powerpc/mm/tlb_32.c +++ b/arch/powerpc/mm/tlb_32.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -41,7 +42,7 @@ void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, unsigned long addr) if (Hash != 0) { ptephys = __pa(ptep) & PAGE_MASK; - flush_hash_pages(mm->context.id, addr, ptephys, 1); + flush_hash_pages(mm->context, addr, ptephys, 1); } } @@ -101,7 +102,7 @@ static void flush_range(struct mm_struct *mm, unsigned long start, pmd_t *pmd; unsigned long pmd_end; int count; - unsigned int ctx = mm->context.id; + unsigned int ctx = mm->context; if (Hash == 0) { _tlbia(); @@ -171,7 +172,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) mm = (vmaddr < TASK_SIZE)? vma->vm_mm: &init_mm; pmd = pmd_offset(pgd_offset(mm, vmaddr), vmaddr); if (!pmd_none(*pmd)) - flush_hash_pages(mm->context.id, vmaddr, pmd_val(*pmd), 1); + flush_hash_pages(mm->context, vmaddr, pmd_val(*pmd), 1); FINISH_FLUSH; } diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index f6eef78ef..f734b1156 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c @@ -22,6 +22,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -130,7 +131,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr, { struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); unsigned long vsid; - unsigned int psize; + unsigned int psize = mmu_virtual_psize; int i; i = batch->index; @@ -147,8 +148,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr, #else BUG(); #endif - } else - psize = pte_pagesize_index(pte); + } /* * This can happen when we are in the middle of a TLB batch and diff --git a/arch/powerpc/oprofile/Kconfig b/arch/powerpc/oprofile/Kconfig index eb2dece76..d03c0e5ca 100644 --- a/arch/powerpc/oprofile/Kconfig +++ b/arch/powerpc/oprofile/Kconfig @@ -1,4 +1,5 @@ config PROFILING + depends on !PPC_ISERIES bool "Profiling support (EXPERIMENTAL)" help Say Y here to enable the extended profiling support mechanisms used diff --git a/arch/powerpc/oprofile/Makefile b/arch/powerpc/oprofile/Makefile index 3145d610b..f5f9859a8 100644 --- a/arch/powerpc/oprofile/Makefile +++ b/arch/powerpc/oprofile/Makefile @@ -1,7 +1,3 @@ -ifeq ($(CONFIG_PPC64),y) -EXTRA_CFLAGS += -mno-minimal-toc -endif - obj-$(CONFIG_OPROFILE) += oprofile.o DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \ diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c index fd0bbbe7a..5b1de7e80 100644 --- a/arch/powerpc/oprofile/common.c +++ b/arch/powerpc/oprofile/common.c @@ -22,7 +22,6 @@ #include #include #include -#include static struct op_powerpc_model *model; @@ -94,7 +93,7 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) for (i = 0; i < model->num_counters; ++i) { struct dentry *dir; - char buf[4]; + char buf[3]; snprintf(buf, sizeof buf, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); @@ -131,9 +130,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) if (!cur_cpu_spec->oprofile_cpu_type) return -ENODEV; - if (firmware_has_feature(FW_FEATURE_ISERIES)) - return -ENODEV; - switch (cur_cpu_spec->oprofile_type) { #ifdef CONFIG_PPC64 case PPC_OPROFILE_RS64: @@ -166,7 +162,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) ops->stop = op_powerpc_stop; ops->backtrace = op_powerpc_backtrace; - printk(KERN_DEBUG "oprofile: using %s performance monitoring.\n", + printk(KERN_INFO "oprofile: using %s performance monitoring.\n", ops->cpu_type); return 0; diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 506f6b79f..4c2beab1f 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c @@ -24,6 +24,10 @@ static unsigned long reset_value[OP_MAX_COUNTER]; static int oprofile_running; +static int mmcra_has_sihv; +/* Unfortunately these bits vary between CPUs */ +static unsigned long mmcra_sihv = MMCRA_SIHV; +static unsigned long mmcra_sipr = MMCRA_SIPR; /* mmcr values are set in power4_reg_setup, used in power4_cpu_setup */ static u32 mmcr0_val; @@ -36,6 +40,16 @@ static void power4_reg_setup(struct op_counter_config *ctr, { int i; + /* + * SIHV / SIPR bits are only implemented on POWER4+ (GQ) and above. + * However we disable it on all POWER4 until we verify it works + * (I was seeing some strange behaviour last time I tried). + * + * It has been verified to work on POWER5 so we enable it there. + */ + if (cpu_has_feature(CPU_FTR_MMCRA_SIHV)) + mmcra_has_sihv = 1; + /* * The performance counter event settings are given in the mmcr0, * mmcr1 and mmcra values passed from the user in the @@ -188,19 +202,18 @@ static unsigned long get_pc(struct pt_regs *regs) unsigned long mmcra; /* Cant do much about it */ - if (!cur_cpu_spec->oprofile_mmcra_sihv) + if (!mmcra_has_sihv) return pc; mmcra = mfspr(SPRN_MMCRA); /* Were we in the hypervisor? */ - if (firmware_has_feature(FW_FEATURE_LPAR) && - (mmcra & cur_cpu_spec->oprofile_mmcra_sihv)) + if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & mmcra_sihv)) /* function descriptor madness */ return *((unsigned long *)hypervisor_bucket); /* We were in userspace, nothing to do */ - if (mmcra & cur_cpu_spec->oprofile_mmcra_sipr) + if (mmcra & mmcra_sipr) return pc; #ifdef CONFIG_PPC_RTAS @@ -222,14 +235,15 @@ static unsigned long get_pc(struct pt_regs *regs) return pc; } -static int get_kernel(unsigned long pc, unsigned long mmcra) +static int get_kernel(unsigned long pc) { int is_kernel; - if (!cur_cpu_spec->oprofile_mmcra_sihv) { + if (!mmcra_has_sihv) { is_kernel = is_kernel_addr(pc); } else { - is_kernel = ((mmcra & cur_cpu_spec->oprofile_mmcra_sipr) == 0); + unsigned long mmcra = mfspr(SPRN_MMCRA); + is_kernel = ((mmcra & mmcra_sipr) == 0); } return is_kernel; @@ -243,12 +257,9 @@ static void power4_handle_interrupt(struct pt_regs *regs, int val; int i; unsigned int mmcr0; - unsigned long mmcra; - - mmcra = mfspr(SPRN_MMCRA); pc = get_pc(regs); - is_kernel = get_kernel(pc, mmcra); + is_kernel = get_kernel(pc); /* set the PMM bit (see comment below) */ mtmsrd(mfmsr() | MSR_PMM); @@ -276,10 +287,6 @@ static void power4_handle_interrupt(struct pt_regs *regs, */ mmcr0 &= ~MMCR0_PMAO; - /* Clear the appropriate bits in the MMCRA */ - mmcra &= ~cur_cpu_spec->oprofile_mmcra_clear; - mtspr(SPRN_MMCRA, mmcra); - /* * now clear the freeze bit, counting will not start until we * rfid from this exception, because only at that point will diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index 5fe7b7faf..7675e675d 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig @@ -16,21 +16,12 @@ config MPC834x_SYS 3 PCI slots. The PIBs PCI initialization is the bootloader's responsiblilty. -config MPC834x_ITX - bool "Freescale MPC834x ITX" - select DEFAULT_UIMAGE - help - This option enables support for the MPC 834x ITX evaluation board. - - Be aware that PCI initialization is the bootloader's - responsiblilty. - endchoice config MPC834x bool select PPC_UDBG_16550 select PPC_INDIRECT_PCI - default y if MPC834x_SYS || MPC834x_ITX + default y if MPC834x_SYS endmenu diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9387a110d..5c7236744 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile @@ -4,4 +4,3 @@ obj-y := misc.o obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o -obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c index f0c6df61f..1455bcef4 100644 --- a/arch/powerpc/platforms/83xx/misc.c +++ b/arch/powerpc/platforms/83xx/misc.c @@ -9,6 +9,7 @@ * option) any later version. */ +#include #include #include diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c deleted file mode 100644 index 8eed8723d..000000000 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * arch/powerpc/platforms/83xx/mpc834x_itx.c - * - * MPC834x ITX board specific routines - * - * Maintainer: Kumar Gala - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "mpc83xx.h" - -#include - -#ifndef CONFIG_PCI -unsigned long isa_io_base = 0; -unsigned long isa_mem_base = 0; -#endif - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc834x_itx_setup_arch(void) -{ - struct device_node *np; - - if (ppc_md.progress) - ppc_md.progress("mpc834x_itx_setup_arch()", 0); - - np = of_find_node_by_type(NULL, "cpu"); - if (np != 0) { - unsigned int *fp = - (int *)get_property(np, "clock-frequency", NULL); - if (fp != 0) - loops_per_jiffy = *fp / HZ; - else - loops_per_jiffy = 50000000 / HZ; - of_node_put(np); - } -#ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) - add_bridge(np); - - ppc_md.pci_exclude_device = mpc83xx_exclude_device; -#endif - -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif -} - -void __init mpc834x_itx_init_IRQ(void) -{ - struct device_node *np; - - np = of_find_node_by_type(NULL, "ipic"); - if (!np) - return; - - ipic_init(np, 0); - - /* Initialize the default interrupt mapping priorities, - * in case the boot rom changed something on us. - */ - ipic_set_default_priority(); -} - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc834x_itx_probe(void) -{ - /* We always match for now, eventually we should look at the flat - dev tree to ensure this is the board we are suppose to run on - */ - return 1; -} - -define_machine(mpc834x_itx) { - .name = "MPC834x ITX", - .probe = mpc834x_itx_probe, - .setup_arch = mpc834x_itx_setup_arch, - .init_IRQ = mpc834x_itx_init_IRQ, - .get_irq = ipic_get_irq, - .restart = mpc83xx_restart, - .time_init = mpc83xx_time_init, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -#ifdef CONFIG_PCI - .pcibios_fixup = mpc83xx_pcibios_fixup, -#endif -}; diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.h b/arch/powerpc/platforms/83xx/mpc834x_itx.h deleted file mode 100644 index 174ca4ef5..000000000 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * arch/powerpc/platforms/83xx/mpc834x_itx.h - * - * MPC834X ITX common board definitions - * - * Maintainer: Kumar Gala - * - * 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 __MACH_MPC83XX_ITX_H__ -#define __MACH_MPC83XX_ITX_H__ - -#define PIRQA MPC83xx_IRQ_EXT4 -#define PIRQB MPC83xx_IRQ_EXT5 -#define PIRQC MPC83xx_IRQ_EXT6 -#define PIRQD MPC83xx_IRQ_EXT7 - -#endif /* __MACH_MPC83XX_ITX_H__ */ diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 32df239d1..7e789d242 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include @@ -43,6 +44,33 @@ unsigned long isa_io_base = 0; unsigned long isa_mem_base = 0; #endif +#ifdef CONFIG_PCI +static int +mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */ + {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */ + {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x13 */ + {0, 0, 0, 0}, + {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x15 */ + {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x16 */ + {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x17 */ + {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x18 */ + {0, 0, 0, 0}, /* idsel 0x19 */ + {0, 0, 0, 0}, /* idsel 0x20 */ + }; + + const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +} +#endif /* CONFIG_PCI */ + /* ************************************************************************ * * Setup the architecture @@ -69,6 +97,8 @@ static void __init mpc834x_sys_setup_arch(void) for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) add_bridge(np); + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = mpc83xx_map_irq; ppc_md.pci_exclude_device = mpc83xx_exclude_device; #endif @@ -81,13 +111,25 @@ static void __init mpc834x_sys_setup_arch(void) void __init mpc834x_sys_init_IRQ(void) { - struct device_node *np; - - np = of_find_node_by_type(NULL, "ipic"); - if (!np) - return; + u8 senses[8] = { + 0, /* EXT 0 */ + IRQ_SENSE_LEVEL, /* EXT 1 */ + IRQ_SENSE_LEVEL, /* EXT 2 */ + 0, /* EXT 3 */ +#ifdef CONFIG_PCI + IRQ_SENSE_LEVEL, /* EXT 4 */ + IRQ_SENSE_LEVEL, /* EXT 5 */ + IRQ_SENSE_LEVEL, /* EXT 6 */ + IRQ_SENSE_LEVEL, /* EXT 7 */ +#else + 0, /* EXT 4 */ + 0, /* EXT 5 */ + 0, /* EXT 6 */ + 0, /* EXT 7 */ +#endif + }; - ipic_init(np, 0); + ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8); /* Initialize the default interrupt mapping priorities, * in case the boot rom changed something on us. @@ -137,7 +179,4 @@ define_machine(mpc834x_sys) { .time_init = mpc83xx_time_init, .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, -#ifdef CONFIG_PCI - .pcibios_fixup = mpc83xx_pcibios_fixup, -#endif }; diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 2c82bca9b..01cae1069 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h @@ -11,7 +11,6 @@ extern int add_bridge(struct device_node *dev); extern int mpc83xx_exclude_device(u_char bus, u_char devfn); -extern void mpc83xx_pcibios_fixup(void); extern void mpc83xx_restart(char *cmd); extern long mpc83xx_time_init(void); diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 5d84a9ccd..16f7d3b30 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c @@ -9,6 +9,7 @@ * option) any later version. */ +#include #include #include #include @@ -45,15 +46,6 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn) return PCIBIOS_SUCCESSFUL; } -void __init mpc83xx_pcibios_fixup(void) -{ - struct pci_dev *dev = NULL; - - /* map all the PCI irqs */ - for_each_pci_dev(dev) - pci_read_irq_line(dev); -} - int __init add_bridge(struct device_node *dev) { int len; @@ -99,10 +91,9 @@ int __init add_bridge(struct device_node *dev) mpc83xx_pci2_busno = hose->first_busno; } - printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " + printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " "Firmware bus number: %d->%d\n", - (unsigned long long)rsrc.start, hose->first_busno, - hose->last_busno); + rsrc.start, hose->first_busno, hose->last_busno); DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", hose, hose->cfg_addr, hose->cfg_data); diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index c3268d987..06e371282 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -11,19 +11,13 @@ config MPC8540_ADS help This option enables support for the MPC 8540 ADS board -config MPC85xx_CDS - bool "Freescale MPC85xx CDS" - select DEFAULT_UIMAGE - help - This option enables support for the MPC85xx CDS board - endchoice config MPC8540 bool select PPC_UDBG_16550 select PPC_INDIRECT_PCI - default y if MPC8540_ADS || MPC85xx_CDS + default y if MPC8540_ADS config PPC_INDIRECT_PCI_BE bool diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 7615aa59c..ffc4139cb 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile @@ -3,4 +3,3 @@ # obj-$(CONFIG_PPC_85xx) += misc.o pci.o obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o -obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h index c0d56d2bb..f770cadb2 100644 --- a/arch/powerpc/platforms/85xx/mpc8540_ads.h +++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h @@ -17,6 +17,7 @@ #ifndef __MACH_MPC8540ADS_H__ #define __MACH_MPC8540ADS_H__ +#include #include #define BOARD_CCSRBAR ((uint)0xe0000000) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 9d2acfbbe..5eeff370f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include @@ -37,7 +38,79 @@ unsigned long isa_io_base = 0; unsigned long isa_mem_base = 0; #endif +/* + * Internal interrupts are all Level Sensitive, and Positive Polarity + * + * Note: Likely, this table and the following function should be + * obtained and derived from the OF Device Tree. + */ +static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { + MPC85XX_INTERNAL_IRQ_SENSES, + 0x0, /* External 0: */ +#if defined(CONFIG_PCI) + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 4: PCI slot 3 */ +#else + 0x0, /* External 1: */ + 0x0, /* External 2: */ + 0x0, /* External 3: */ + 0x0, /* External 4: */ +#endif + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ + 0x0, /* External 6: */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */ + 0x0, /* External 8: */ + 0x0, /* External 9: */ + 0x0, /* External 10: */ + 0x0, /* External 11: */ +}; + #ifdef CONFIG_PCI +/* + * interrupt routing + */ + +int +mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * This is little evil, but works around the fact + * that revA boards have IDSEL starting at 18 + * and others boards (older) start at 12 + * + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */ + {PIRQD, PIRQA, PIRQB, PIRQC}, + {PIRQC, PIRQD, PIRQA, PIRQB}, + {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */ + {PIRQD, PIRQA, PIRQB, PIRQC}, + {PIRQC, PIRQD, PIRQA, PIRQB}, + {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */ + {0, 0, 0, 0}, /* -- */ + {0, 0, 0, 0}, /* -- */ + {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */ + {PIRQD, PIRQA, PIRQB, PIRQC}, + {PIRQC, PIRQD, PIRQA, PIRQB}, + {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */ + }; + + const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +} + int mpc85xx_exclude_device(u_char bus, u_char devfn) { @@ -47,63 +120,44 @@ mpc85xx_exclude_device(u_char bus, u_char devfn) return PCIBIOS_SUCCESSFUL; } -void __init -mpc85xx_pcibios_fixup(void) -{ - struct pci_dev *dev = NULL; - - for_each_pci_dev(dev) - pci_read_irq_line(dev); -} #endif /* CONFIG_PCI */ void __init mpc85xx_ads_pic_init(void) { - struct mpic *mpic; - struct resource r; - struct device_node *np = NULL; - - np = of_find_node_by_type(np, "open-pic"); - - if (np == NULL) { - printk(KERN_ERR "Could not find open-pic node\n"); - return; - } - - if(of_address_to_resource(np, 0, &r)) { - printk(KERN_ERR "Could not map mpic register space\n"); - of_node_put(np); - return; - } - - mpic = mpic_alloc(np, r.start, - MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, - 4, 0, " OpenPIC "); - BUG_ON(mpic == NULL); - of_node_put(np); - - mpic_assign_isu(mpic, 0, r.start + 0x10200); - mpic_assign_isu(mpic, 1, r.start + 0x10280); - mpic_assign_isu(mpic, 2, r.start + 0x10300); - mpic_assign_isu(mpic, 3, r.start + 0x10380); - mpic_assign_isu(mpic, 4, r.start + 0x10400); - mpic_assign_isu(mpic, 5, r.start + 0x10480); - mpic_assign_isu(mpic, 6, r.start + 0x10500); - mpic_assign_isu(mpic, 7, r.start + 0x10580); - - /* Unused on this platform (leave room for 8548) */ - mpic_assign_isu(mpic, 8, r.start + 0x10600); - mpic_assign_isu(mpic, 9, r.start + 0x10680); - mpic_assign_isu(mpic, 10, r.start + 0x10700); - mpic_assign_isu(mpic, 11, r.start + 0x10780); - - /* External Interrupts */ - mpic_assign_isu(mpic, 12, r.start + 0x10000); - mpic_assign_isu(mpic, 13, r.start + 0x10080); - mpic_assign_isu(mpic, 14, r.start + 0x10100); - - mpic_init(mpic); + struct mpic *mpic1; + phys_addr_t OpenPIC_PAddr; + + /* Determine the Physical Address of the OpenPIC regs */ + OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET; + + mpic1 = mpic_alloc(OpenPIC_PAddr, + MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, + 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250, + mpc85xx_ads_openpic_initsenses, + sizeof(mpc85xx_ads_openpic_initsenses), + " OpenPIC "); + BUG_ON(mpic1 == NULL); + mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200); + mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280); + mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300); + mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380); + mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400); + mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480); + mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500); + mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580); + + /* dummy mappings to get to 48 */ + mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600); + mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680); + mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700); + mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780); + + /* External ints */ + mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000); + mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080); + mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100); + mpic_init(mpic1); } /* @@ -112,9 +166,7 @@ void __init mpc85xx_ads_pic_init(void) static void __init mpc85xx_ads_setup_arch(void) { struct device_node *cpu; -#ifdef CONFIG_PCI struct device_node *np; -#endif if (ppc_md.progress) ppc_md.progress("mpc85xx_ads_setup_arch()", 0); @@ -135,7 +187,8 @@ static void __init mpc85xx_ads_setup_arch(void) for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) add_bridge(np); - ppc_md.pcibios_fixup = mpc85xx_pcibios_fixup; + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = mpc85xx_map_irq; ppc_md.pci_exclude_device = mpc85xx_exclude_device; #endif diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c deleted file mode 100644 index 76b827ca8..000000000 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - * MPC85xx setup and early boot code plus other random bits. - * - * Maintained by Kumar Gala (see MAINTAINERS for contact information) - * - * Copyright 2005 Freescale Semiconductor 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "mpc85xx.h" - -#ifndef CONFIG_PCI -unsigned long isa_io_base = 0; -unsigned long isa_mem_base = 0; -#endif - -static int cds_pci_slot = 2; -static volatile u8 *cadmus; - - -#ifdef CONFIG_PCI - -#define ARCADIA_HOST_BRIDGE_IDSEL 17 -#define ARCADIA_2ND_BRIDGE_IDSEL 3 - -extern int mpc85xx_pci2_busno; - -int -mpc85xx_exclude_device(u_char bus, u_char devfn) -{ - if (bus == 0 && PCI_SLOT(devfn) == 0) - return PCIBIOS_DEVICE_NOT_FOUND; - if (mpc85xx_pci2_busno) - if (bus == (mpc85xx_pci2_busno) && PCI_SLOT(devfn) == 0) - return PCIBIOS_DEVICE_NOT_FOUND; - /* We explicitly do not go past the Tundra 320 Bridge */ - if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) - return PCIBIOS_DEVICE_NOT_FOUND; - if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) - return PCIBIOS_DEVICE_NOT_FOUND; - else - return PCIBIOS_SUCCESSFUL; -} - -void __init -mpc85xx_cds_pcibios_fixup(void) -{ - struct pci_dev *dev; - u_char c; - - if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, - PCI_DEVICE_ID_VIA_82C586_1, NULL))) { - /* - * U-Boot does not set the enable bits - * for the IDE device. Force them on here. - */ - pci_read_config_byte(dev, 0x40, &c); - c |= 0x03; /* IDE: Chip Enable Bits */ - pci_write_config_byte(dev, 0x40, c); - - /* - * Since only primary interface works, force the - * IDE function to standard primary IDE interrupt - * w/ 8259 offset - */ - dev->irq = 14; - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); - pci_dev_put(dev); - } - - /* - * Force legacy USB interrupt routing - */ - if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, - PCI_DEVICE_ID_VIA_82C586_2, NULL))) { - dev->irq = 10; - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); - pci_dev_put(dev); - } - - if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, - PCI_DEVICE_ID_VIA_82C586_2, dev))) { - dev->irq = 11; - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); - pci_dev_put(dev); - } - - /* Now map all the PCI irqs */ - dev = NULL; - for_each_pci_dev(dev) - pci_read_irq_line(dev); -} - -#ifdef CONFIG_PPC_I8259 -#warning The i8259 PIC support is currently broken -static void mpc85xx_8259_cascade(unsigned int irq, struct - irq_desc *desc, struct pt_regs *regs) -{ - unsigned int cascade_irq = i8259_irq(regs); - - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - - desc->chip->eoi(irq); -} -#endif /* PPC_I8259 */ -#endif /* CONFIG_PCI */ - -void __init mpc85xx_cds_pic_init(void) -{ - struct mpic *mpic; - struct resource r; - struct device_node *np = NULL; - struct device_node *cascade_node = NULL; - int cascade_irq; - - np = of_find_node_by_type(np, "open-pic"); - - if (np == NULL) { - printk(KERN_ERR "Could not find open-pic node\n"); - return; - } - - if (of_address_to_resource(np, 0, &r)) { - printk(KERN_ERR "Failed to map mpic register space\n"); - of_node_put(np); - return; - } - - mpic = mpic_alloc(np, r.start, - MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, - 4, 0, " OpenPIC "); - BUG_ON(mpic == NULL); - - /* Return the mpic node */ - of_node_put(np); - - mpic_assign_isu(mpic, 0, r.start + 0x10200); - mpic_assign_isu(mpic, 1, r.start + 0x10280); - mpic_assign_isu(mpic, 2, r.start + 0x10300); - mpic_assign_isu(mpic, 3, r.start + 0x10380); - mpic_assign_isu(mpic, 4, r.start + 0x10400); - mpic_assign_isu(mpic, 5, r.start + 0x10480); - mpic_assign_isu(mpic, 6, r.start + 0x10500); - mpic_assign_isu(mpic, 7, r.start + 0x10580); - - /* Used only for 8548 so far, but no harm in - * allocating them for everyone */ - mpic_assign_isu(mpic, 8, r.start + 0x10600); - mpic_assign_isu(mpic, 9, r.start + 0x10680); - mpic_assign_isu(mpic, 10, r.start + 0x10700); - mpic_assign_isu(mpic, 11, r.start + 0x10780); - - /* External Interrupts */ - mpic_assign_isu(mpic, 12, r.start + 0x10000); - mpic_assign_isu(mpic, 13, r.start + 0x10080); - mpic_assign_isu(mpic, 14, r.start + 0x10100); - - mpic_init(mpic); - -#ifdef CONFIG_PPC_I8259 - /* Initialize the i8259 controller */ - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "chrp,iic")) { - cascade_node = np; - break; - } - - if (cascade_node == NULL) { - printk(KERN_DEBUG "Could not find i8259 PIC\n"); - return; - } - - cascade_irq = irq_of_parse_and_map(cascade_node, 0); - if (cascade_irq == NO_IRQ) { - printk(KERN_ERR "Failed to map cascade interrupt\n"); - return; - } - - i8259_init(cascade_node, 0); - of_node_put(cascade_node); - - set_irq_chained_handler(cascade_irq, mpc85xx_8259_cascade); -#endif /* CONFIG_PPC_I8259 */ -} - - -/* - * Setup the architecture - */ -static void __init -mpc85xx_cds_setup_arch(void) -{ - struct device_node *cpu; -#ifdef CONFIG_PCI - struct device_node *np; -#endif - - if (ppc_md.progress) - ppc_md.progress("mpc85xx_cds_setup_arch()", 0); - - cpu = of_find_node_by_type(NULL, "cpu"); - if (cpu != 0) { - unsigned int *fp; - - fp = (int *)get_property(cpu, "clock-frequency", NULL); - if (fp != 0) - loops_per_jiffy = *fp / HZ; - else - loops_per_jiffy = 500000000 / HZ; - of_node_put(cpu); - } - - cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE); - cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1; - - if (ppc_md.progress) { - char buf[40]; - snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n", - cadmus[CM_VER], cds_pci_slot); - ppc_md.progress(buf, 0); - } - -#ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) - add_bridge(np); - - ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; - ppc_md.pci_exclude_device = mpc85xx_exclude_device; -#endif - -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif -} - - -void -mpc85xx_cds_show_cpuinfo(struct seq_file *m) -{ - uint pvid, svid, phid1; - uint memsize = total_memory; - - pvid = mfspr(SPRN_PVR); - svid = mfspr(SPRN_SVR); - - seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - seq_printf(m, "Machine\t\t: MPC85xx CDS (0x%x)\n", cadmus[CM_VER]); - seq_printf(m, "PVR\t\t: 0x%x\n", pvid); - seq_printf(m, "SVR\t\t: 0x%x\n", svid); - - /* Display cpu Pll setting */ - phid1 = mfspr(SPRN_HID1); - seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); - - /* Display the amount of memory */ - seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); -} - - -/* - * Called very early, device-tree isn't unflattened - */ -static int __init mpc85xx_cds_probe(void) -{ - /* We always match for now, eventually we should look at - * the flat dev tree to ensure this is the board we are - * supposed to run on - */ - return 1; -} - -define_machine(mpc85xx_cds) { - .name = "MPC85xx CDS", - .probe = mpc85xx_cds_probe, - .setup_arch = mpc85xx_cds_setup_arch, - .init_IRQ = mpc85xx_cds_pic_init, - .show_cpuinfo = mpc85xx_cds_show_cpuinfo, - .get_irq = mpic_get_irq, - .restart = mpc85xx_restart, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.h b/arch/powerpc/platforms/85xx/mpc85xx_cds.h deleted file mode 100644 index 671f54ff1..000000000 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * arch/ppc/platforms/85xx/mpc85xx_cds_common.h - * - * MPC85xx CDS board definitions - * - * Maintainer: Kumar Gala - * - * Copyright 2004 Freescale Semiconductor, 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. - * - */ - -#ifndef __MACH_MPC85XX_CDS_H__ -#define __MACH_MPC85XX_CDS_H__ - -/* CADMUS info */ -#define CADMUS_BASE (0xf8004000) -#define CADMUS_SIZE (256) -#define CM_VER (0) -#define CM_CSR (1) -#define CM_RST (2) - -/* CDS NVRAM/RTC */ -#define CDS_RTC_ADDR (0xf8000000) -#define CDS_RTC_SIZE (8 * 1024) - -/* PCI interrupt controller */ -#define PIRQ0A MPC85xx_IRQ_EXT0 -#define PIRQ0B MPC85xx_IRQ_EXT1 -#define PIRQ0C MPC85xx_IRQ_EXT2 -#define PIRQ0D MPC85xx_IRQ_EXT3 -#define PIRQ1A MPC85xx_IRQ_EXT11 - -#define NR_8259_INTS 16 -#define CPM_IRQ_OFFSET NR_8259_INTS - -#define MPC85xx_OPENPIC_IRQ_OFFSET 80 - -#endif /* __MACH_MPC85XX_CDS_H__ */ diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c index 1d51f3242..bad290110 100644 --- a/arch/powerpc/platforms/85xx/pci.c +++ b/arch/powerpc/platforms/85xx/pci.c @@ -9,6 +9,7 @@ * option) any later version. */ +#include #include #include #include @@ -78,10 +79,9 @@ int __init add_bridge(struct device_node *dev) mpc85xx_pci2_busno = hose->first_busno; } - printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. " + printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " "Firmware bus number: %d->%d\n", - (unsigned long long)rsrc.start, hose->first_busno, - hose->last_busno); + rsrc.start, hose->first_busno, hose->last_busno); DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", hose, hose->cfg_addr, hose->cfg_data); diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig deleted file mode 100644 index d1ecc0f9a..000000000 --- a/arch/powerpc/platforms/86xx/Kconfig +++ /dev/null @@ -1,32 +0,0 @@ -menu "Platform Support" - depends on PPC_86xx - -choice - prompt "Machine Type" - default MPC8641_HPCN - -config MPC8641_HPCN - bool "Freescale MPC8641 HPCN" - select PPC_I8259 - help - This option enables support for the MPC8641 HPCN board. - -endchoice - - -config MPC8641 - bool - select PPC_INDIRECT_PCI - select PPC_UDBG_16550 - default y if MPC8641_HPCN - -config MPIC - bool - default y - -config PPC_INDIRECT_PCI_BE - bool - depends on PPC_86xx - default y - -endmenu diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile deleted file mode 100644 index 476a6eeee..000000000 --- a/arch/powerpc/platforms/86xx/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile for the PowerPC 86xx linux kernel. -# - -obj-$(CONFIG_SMP) += mpc86xx_smp.o -obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o -obj-$(CONFIG_PCI) += pci.o mpc86xx_pcie.o diff --git a/arch/powerpc/platforms/86xx/mpc8641_hpcn.h b/arch/powerpc/platforms/86xx/mpc8641_hpcn.h deleted file mode 100644 index 41e554c4a..000000000 --- a/arch/powerpc/platforms/86xx/mpc8641_hpcn.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * MPC8641 HPCN board definitions - * - * Copyright 2006 Freescale Semiconductor 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. - * - * Author: Xianghua Xiao - */ - -#ifndef __MPC8641_HPCN_H__ -#define __MPC8641_HPCN_H__ - -#include - -#define MPC86XX_RSTCR_OFFSET (0xe00b0) /* Reset Control Register */ - -#endif /* __MPC8641_HPCN_H__ */ diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h b/arch/powerpc/platforms/86xx/mpc86xx.h deleted file mode 100644 index 283446259..000000000 --- a/arch/powerpc/platforms/86xx/mpc86xx.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2006 Freescale Semiconductor 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. - */ - -#ifndef __MPC86XX_H__ -#define __MPC86XX_H__ - -/* - * Declaration for the various functions exported by the - * mpc86xx_* files. Mostly for use by mpc86xx_setup(). - */ - -extern int add_bridge(struct device_node *dev); - -extern int mpc86xx_exclude_device(u_char bus, u_char devfn); - -extern void setup_indirect_pcie(struct pci_controller *hose, - u32 cfg_addr, u32 cfg_data); -extern void setup_indirect_pcie_nomap(struct pci_controller *hose, - void __iomem *cfg_addr, - void __iomem *cfg_data); - -extern void __init mpc86xx_smp_init(void); - -#endif /* __MPC86XX_H__ */ diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c deleted file mode 100644 index 5e583cf38..000000000 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ /dev/null @@ -1,471 +0,0 @@ -/* - * MPC86xx HPCN board specific routines - * - * Recode: ZHANG WEI - * Initial author: Xianghua Xiao - * - * Copyright 2006 Freescale Semiconductor 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. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include "mpc86xx.h" -#include "mpc8641_hpcn.h" - -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt...) do { printk(KERN_ERR fmt); } while(0) -#else -#define DBG(fmt...) do { } while(0) -#endif - -#ifndef CONFIG_PCI -unsigned long isa_io_base = 0; -unsigned long isa_mem_base = 0; -unsigned long pci_dram_offset = 0; -#endif - - -#ifdef CONFIG_PCI -static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) -{ - unsigned int cascade_irq = i8259_irq(regs); - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - desc->chip->eoi(irq); -} -#endif /* CONFIG_PCI */ - -void __init -mpc86xx_hpcn_init_irq(void) -{ - struct mpic *mpic1; - struct device_node *np; - struct resource res; -#ifdef CONFIG_PCI - struct device_node *cascade_node = NULL; - int cascade_irq; -#endif - - /* Determine PIC address. */ - np = of_find_node_by_type(NULL, "open-pic"); - if (np == NULL) - return; - of_address_to_resource(np, 0, &res); - - /* Alloc mpic structure and per isu has 16 INT entries. */ - mpic1 = mpic_alloc(np, res.start, - MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, - 16, NR_IRQS - 4, - " MPIC "); - BUG_ON(mpic1 == NULL); - - mpic_assign_isu(mpic1, 0, res.start + 0x10000); - - /* 48 Internal Interrupts */ - mpic_assign_isu(mpic1, 1, res.start + 0x10200); - mpic_assign_isu(mpic1, 2, res.start + 0x10400); - mpic_assign_isu(mpic1, 3, res.start + 0x10600); - - /* 16 External interrupts - * Moving them from [0 - 15] to [64 - 79] - */ - mpic_assign_isu(mpic1, 4, res.start + 0x10000); - - mpic_init(mpic1); - -#ifdef CONFIG_PCI - /* Initialize i8259 controller */ - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "chrp,iic")) { - cascade_node = np; - break; - } - if (cascade_node == NULL) { - printk(KERN_DEBUG "mpc86xxhpcn: no ISA interrupt controller\n"); - return; - } - - cascade_irq = irq_of_parse_and_map(cascade_node, 0); - if (cascade_irq == NO_IRQ) { - printk(KERN_ERR "mpc86xxhpcn: failed to map cascade interrupt"); - return; - } - DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq); - - i8259_init(cascade_node, 0); - set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade); -#endif -} - -#ifdef CONFIG_PCI - -enum pirq{PIRQA = 8, PIRQB, PIRQC, PIRQD, PIRQE, PIRQF, PIRQG, PIRQH}; -const unsigned char uli1575_irq_route_table[16] = { - 0, /* 0: Reserved */ - 0x8, /* 1: 0b1000 */ - 0, /* 2: Reserved */ - 0x2, /* 3: 0b0010 */ - 0x4, /* 4: 0b0100 */ - 0x5, /* 5: 0b0101 */ - 0x7, /* 6: 0b0111 */ - 0x6, /* 7: 0b0110 */ - 0, /* 8: Reserved */ - 0x1, /* 9: 0b0001 */ - 0x3, /* 10: 0b0011 */ - 0x9, /* 11: 0b1001 */ - 0xb, /* 12: 0b1011 */ - 0, /* 13: Reserved */ - 0xd, /* 14, 0b1101 */ - 0xf, /* 15, 0b1111 */ -}; - -static int __devinit -get_pci_irq_from_of(struct pci_controller *hose, int slot, int pin) -{ - struct of_irq oirq; - u32 laddr[3]; - struct device_node *hosenode = hose ? hose->arch_data : NULL; - - if (!hosenode) return -EINVAL; - - laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(slot, 0) << 8); - laddr[1] = laddr[2] = 0; - of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); - DBG("mpc86xx_hpcn: pci irq addr %x, slot %d, pin %d, irq %d\n", - laddr[0], slot, pin, oirq.specifier[0]); - return oirq.specifier[0]; -} - -static void __devinit quirk_uli1575(struct pci_dev *dev) -{ - unsigned short temp; - struct pci_controller *hose = pci_bus_to_host(dev->bus); - unsigned char irq2pin[16]; - unsigned long pirq_map_word = 0; - u32 irq; - int i; - - /* - * ULI1575 interrupts route setup - */ - memset(irq2pin, 0, 16); /* Initialize default value 0 */ - - /* - * PIRQA -> PIRQD mapping read from OF-tree - * - * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD - * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA - */ - for (i = 0; i < 4; i++){ - irq = get_pci_irq_from_of(hose, 17, i + 1); - if (irq > 0 && irq < 16) - irq2pin[irq] = PIRQA + i; - else - printk(KERN_WARNING "ULI1575 device" - "(slot %d, pin %d) irq %d is invalid.\n", - 17, i, irq); - } - - /* - * PIRQE -> PIRQF mapping set manually - * - * IRQ pin IRQ# - * PIRQE ---- 9 - * PIRQF ---- 10 - * PIRQG ---- 11 - * PIRQH ---- 12 - */ - for (i = 0; i < 4; i++) irq2pin[i + 9] = PIRQE + i; - - /* Set IRQ-PIRQ Mapping to ULI1575 */ - for (i = 0; i < 16; i++) - if (irq2pin[i]) - pirq_map_word |= (uli1575_irq_route_table[i] & 0xf) - << ((irq2pin[i] - PIRQA) * 4); - - /* ULI1575 IRQ mapping conf register default value is 0xb9317542 */ - DBG("Setup ULI1575 IRQ mapping configuration register value = 0x%x\n", - pirq_map_word); - pci_write_config_dword(dev, 0x48, pirq_map_word); - -#define ULI1575_SET_DEV_IRQ(slot, pin, reg) \ - do { \ - int irq; \ - irq = get_pci_irq_from_of(hose, slot, pin); \ - if (irq > 0 && irq < 16) \ - pci_write_config_byte(dev, reg, irq2pin[irq]); \ - else \ - printk(KERN_WARNING "ULI1575 device" \ - "(slot %d, pin %d) irq %d is invalid.\n", \ - slot, pin, irq); \ - } while(0) - - /* USB 1.1 OHCI controller 1, slot 28, pin 1 */ - ULI1575_SET_DEV_IRQ(28, 1, 0x86); - - /* USB 1.1 OHCI controller 2, slot 28, pin 2 */ - ULI1575_SET_DEV_IRQ(28, 2, 0x87); - - /* USB 1.1 OHCI controller 3, slot 28, pin 3 */ - ULI1575_SET_DEV_IRQ(28, 3, 0x88); - - /* USB 2.0 controller, slot 28, pin 4 */ - irq = get_pci_irq_from_of(hose, 28, 4); - if (irq >= 0 && irq <=15) - pci_write_config_dword(dev, 0x74, uli1575_irq_route_table[irq]); - - /* Audio controller, slot 29, pin 1 */ - ULI1575_SET_DEV_IRQ(29, 1, 0x8a); - - /* Modem controller, slot 29, pin 2 */ - ULI1575_SET_DEV_IRQ(29, 2, 0x8b); - - /* HD audio controller, slot 29, pin 3 */ - ULI1575_SET_DEV_IRQ(29, 3, 0x8c); - - /* SMB interrupt: slot 30, pin 1 */ - ULI1575_SET_DEV_IRQ(30, 1, 0x8e); - - /* PMU ACPI SCI interrupt: slot 30, pin 2 */ - ULI1575_SET_DEV_IRQ(30, 2, 0x8f); - - /* Serial ATA interrupt: slot 31, pin 1 */ - ULI1575_SET_DEV_IRQ(31, 1, 0x8d); - - /* Primary PATA IDE IRQ: 14 - * Secondary PATA IDE IRQ: 15 - */ - pci_write_config_byte(dev, 0x44, 0x30 | uli1575_irq_route_table[14]); - pci_write_config_byte(dev, 0x75, uli1575_irq_route_table[15]); - - /* Set IRQ14 and IRQ15 to legacy IRQs */ - pci_read_config_word(dev, 0x46, &temp); - temp |= 0xc000; - pci_write_config_word(dev, 0x46, temp); - - /* Set i8259 interrupt trigger - * IRQ 3: Level - * IRQ 4: Level - * IRQ 5: Level - * IRQ 6: Level - * IRQ 7: Level - * IRQ 9: Level - * IRQ 10: Level - * IRQ 11: Level - * IRQ 12: Level - * IRQ 14: Edge - * IRQ 15: Edge - */ - outb(0xfa, 0x4d0); - outb(0x1e, 0x4d1); - -#undef ULI1575_SET_DEV_IRQ -} - -static void __devinit quirk_uli5288(struct pci_dev *dev) -{ - unsigned char c; - - pci_read_config_byte(dev,0x83,&c); - c |= 0x80; - pci_write_config_byte(dev, 0x83, c); - - pci_write_config_byte(dev, 0x09, 0x01); - pci_write_config_byte(dev, 0x0a, 0x06); - - pci_read_config_byte(dev,0x83,&c); - c &= 0x7f; - pci_write_config_byte(dev, 0x83, c); - - pci_read_config_byte(dev,0x84,&c); - c |= 0x01; - pci_write_config_byte(dev, 0x84, c); -} - -static void __devinit quirk_uli5229(struct pci_dev *dev) -{ - unsigned short temp; - pci_write_config_word(dev, 0x04, 0x0405); - pci_read_config_word(dev, 0x4a, &temp); - temp |= 0x1000; - pci_write_config_word(dev, 0x4a, temp); -} - -static void __devinit early_uli5249(struct pci_dev *dev) -{ - unsigned char temp; - pci_write_config_word(dev, 0x04, 0x0007); - pci_read_config_byte(dev, 0x7c, &temp); - pci_write_config_byte(dev, 0x7c, 0x80); - pci_write_config_byte(dev, 0x09, 0x01); - pci_write_config_byte(dev, 0x7c, temp); - dev->class |= 0x1; -} - -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249); -#endif /* CONFIG_PCI */ - - -static void __init -mpc86xx_hpcn_setup_arch(void) -{ - struct device_node *np; - - if (ppc_md.progress) - ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); - - np = of_find_node_by_type(NULL, "cpu"); - if (np != 0) { - unsigned int *fp; - - fp = (int *)get_property(np, "clock-frequency", NULL); - if (fp != 0) - loops_per_jiffy = *fp / HZ; - else - loops_per_jiffy = 50000000 / HZ; - of_node_put(np); - } - -#ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) - add_bridge(np); - - ppc_md.pci_exclude_device = mpc86xx_exclude_device; -#endif - - printk("MPC86xx HPCN board from Freescale Semiconductor\n"); - -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif - -#ifdef CONFIG_SMP - mpc86xx_smp_init(); -#endif -} - - -void -mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) -{ - struct device_node *root; - uint memsize = total_memory; - const char *model = ""; - uint svid = mfspr(SPRN_SVR); - - seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); - - root = of_find_node_by_path("/"); - if (root) - model = get_property(root, "model", NULL); - seq_printf(m, "Machine\t\t: %s\n", model); - of_node_put(root); - - seq_printf(m, "SVR\t\t: 0x%x\n", svid); - seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); -} - - -void __init mpc86xx_hpcn_pcibios_fixup(void) -{ - struct pci_dev *dev = NULL; - - for_each_pci_dev(dev) - pci_read_irq_line(dev); -} - - -/* - * Called very early, device-tree isn't unflattened - */ -static int __init mpc86xx_hpcn_probe(void) -{ - unsigned long root = of_get_flat_dt_root(); - - if (of_flat_dt_is_compatible(root, "mpc86xx")) - return 1; /* Looks good */ - - return 0; -} - - -void -mpc86xx_restart(char *cmd) -{ - void __iomem *rstcr; - - rstcr = ioremap(get_immrbase() + MPC86XX_RSTCR_OFFSET, 0x100); - - local_irq_disable(); - - /* Assert reset request to Reset Control Register */ - out_be32(rstcr, 0x2); - - /* not reached */ -} - - -long __init -mpc86xx_time_init(void) -{ - unsigned int temp; - - /* Set the time base to zero */ - mtspr(SPRN_TBWL, 0); - mtspr(SPRN_TBWU, 0); - - temp = mfspr(SPRN_HID0); - temp |= HID0_TBEN; - mtspr(SPRN_HID0, temp); - asm volatile("isync"); - - return 0; -} - - -define_machine(mpc86xx_hpcn) { - .name = "MPC86xx HPCN", - .probe = mpc86xx_hpcn_probe, - .setup_arch = mpc86xx_hpcn_setup_arch, - .init_IRQ = mpc86xx_hpcn_init_irq, - .show_cpuinfo = mpc86xx_hpcn_show_cpuinfo, - .pcibios_fixup = mpc86xx_hpcn_pcibios_fixup, - .get_irq = mpic_get_irq, - .restart = mpc86xx_restart, - .time_init = mpc86xx_time_init, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; diff --git a/arch/powerpc/platforms/86xx/mpc86xx_pcie.c b/arch/powerpc/platforms/86xx/mpc86xx_pcie.c deleted file mode 100644 index a2f4f7302..000000000 --- a/arch/powerpc/platforms/86xx/mpc86xx_pcie.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Support for indirect PCI bridges. - * - * Copyright (C) 1998 Gabriel Paubert. - * - * 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. - * - * "Temporary" MPC8548 Errata file - - * The standard indirect_pci code should work with future silicon versions. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "mpc86xx.h" - -#define PCI_CFG_OUT out_be32 - -/* ERRATA PCI-Ex 14 PCIE Controller timeout */ -#define PCIE_FIX out_be32(hose->cfg_addr+0x4, 0x0400ffff) - - -static int -indirect_read_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset, - int len, u32 *val) -{ - struct pci_controller *hose = bus->sysdata; - volatile void __iomem *cfg_data; - u32 temp; - - if (ppc_md.pci_exclude_device) - if (ppc_md.pci_exclude_device(bus->number, devfn)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* Possible artifact of CDCpp50937 needs further investigation */ - if (devfn != 0x0 && bus->number == 0xff) - return PCIBIOS_DEVICE_NOT_FOUND; - - PCIE_FIX; - if (bus->number == 0xff) { - PCI_CFG_OUT(hose->cfg_addr, - (0x80000000 | ((offset & 0xf00) << 16) | - ((bus->number - hose->bus_offset) << 16) - | (devfn << 8) | ((offset & 0xfc) ))); - } else { - PCI_CFG_OUT(hose->cfg_addr, - (0x80000001 | ((offset & 0xf00) << 16) | - ((bus->number - hose->bus_offset) << 16) - | (devfn << 8) | ((offset & 0xfc) ))); - } - - /* - * Note: the caller has already checked that offset is - * suitably aligned and that len is 1, 2 or 4. - */ - /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */ - cfg_data = hose->cfg_data; - PCIE_FIX; - temp = in_le32(cfg_data); - switch (len) { - case 1: - *val = (temp >> (((offset & 3))*8)) & 0xff; - break; - case 2: - *val = (temp >> (((offset & 3))*8)) & 0xffff; - break; - default: - *val = temp; - break; - } - return PCIBIOS_SUCCESSFUL; -} - -static int -indirect_write_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset, - int len, u32 val) -{ - struct pci_controller *hose = bus->sysdata; - volatile void __iomem *cfg_data; - u32 temp; - - if (ppc_md.pci_exclude_device) - if (ppc_md.pci_exclude_device(bus->number, devfn)) - return PCIBIOS_DEVICE_NOT_FOUND; - - /* Possible artifact of CDCpp50937 needs further investigation */ - if (devfn != 0x0 && bus->number == 0xff) - return PCIBIOS_DEVICE_NOT_FOUND; - - PCIE_FIX; - if (bus->number == 0xff) { - PCI_CFG_OUT(hose->cfg_addr, - (0x80000000 | ((offset & 0xf00) << 16) | - ((bus->number - hose->bus_offset) << 16) - | (devfn << 8) | ((offset & 0xfc) ))); - } else { - PCI_CFG_OUT(hose->cfg_addr, - (0x80000001 | ((offset & 0xf00) << 16) | - ((bus->number - hose->bus_offset) << 16) - | (devfn << 8) | ((offset & 0xfc) ))); - } - - /* - * Note: the caller has already checked that offset is - * suitably aligned and that len is 1, 2 or 4. - */ - /* ERRATA PCI-Ex 12 - Configuration Address/Data Alignment */ - cfg_data = hose->cfg_data; - switch (len) { - case 1: - PCIE_FIX; - temp = in_le32(cfg_data); - temp = (temp & ~(0xff << ((offset & 3) * 8))) | - (val << ((offset & 3) * 8)); - PCIE_FIX; - out_le32(cfg_data, temp); - break; - case 2: - PCIE_FIX; - temp = in_le32(cfg_data); - temp = (temp & ~(0xffff << ((offset & 3) * 8))); - temp |= (val << ((offset & 3) * 8)) ; - PCIE_FIX; - out_le32(cfg_data, temp); - break; - default: - PCIE_FIX; - out_le32(cfg_data, val); - break; - } - PCIE_FIX; - return PCIBIOS_SUCCESSFUL; -} - -static struct pci_ops indirect_pcie_ops = { - indirect_read_config_pcie, - indirect_write_config_pcie -}; - -void __init -setup_indirect_pcie_nomap(struct pci_controller* hose, void __iomem * cfg_addr, - void __iomem * cfg_data) -{ - hose->cfg_addr = cfg_addr; - hose->cfg_data = cfg_data; - hose->ops = &indirect_pcie_ops; -} - -void __init -setup_indirect_pcie(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data) -{ - unsigned long base = cfg_addr & PAGE_MASK; - void __iomem *mbase, *addr, *data; - - mbase = ioremap(base, PAGE_SIZE); - addr = mbase + (cfg_addr & ~PAGE_MASK); - if ((cfg_data & PAGE_MASK) != base) - mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); - data = mbase + (cfg_data & ~PAGE_MASK); - setup_indirect_pcie_nomap(hose, addr, data); -} diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c deleted file mode 100644 index bb7fb4193..000000000 --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Author: Xianghua Xiao - * Zhang Wei - * - * Copyright 2006 Freescale Semiconductor 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. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "mpc86xx.h" - -extern void __secondary_start_mpc86xx(void); -extern unsigned long __secondary_hold_acknowledge; - - -static void __init -smp_86xx_release_core(int nr) -{ - __be32 __iomem *mcm_vaddr; - unsigned long pcr; - - if (nr < 0 || nr >= NR_CPUS) - return; - - /* - * Startup Core #nr. - */ - mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET, - MPC86xx_MCM_SIZE); - pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2)); - pcr |= 1 << (nr + 24); - out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr); -} - - -static void __init -smp_86xx_kick_cpu(int nr) -{ - unsigned int save_vector; - unsigned long target, flags; - int n = 0; - volatile unsigned int *vector - = (volatile unsigned int *)(KERNELBASE + 0x100); - - if (nr < 0 || nr >= NR_CPUS) - return; - - pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr); - - local_irq_save(flags); - local_irq_disable(); - - /* Save reset vector */ - save_vector = *vector; - - /* Setup fake reset vector to call __secondary_start_mpc86xx. */ - target = (unsigned long) __secondary_start_mpc86xx; - create_branch((unsigned long)vector, target, BRANCH_SET_LINK); - - /* Kick that CPU */ - smp_86xx_release_core(nr); - - /* Wait a bit for the CPU to take the exception. */ - while ((__secondary_hold_acknowledge != nr) && (n++, n < 1000)) - mdelay(1); - - /* Restore the exception vector */ - *vector = save_vector; - flush_icache_range((unsigned long) vector, (unsigned long) vector + 4); - - local_irq_restore(flags); - - pr_debug("wait CPU #%d for %d msecs.\n", nr, n); -} - - -static void __init -smp_86xx_setup_cpu(int cpu_nr) -{ - mpic_setup_this_cpu(); -} - - -struct smp_ops_t smp_86xx_ops = { - .message_pass = smp_mpic_message_pass, - .probe = smp_mpic_probe, - .kick_cpu = smp_86xx_kick_cpu, - .setup_cpu = smp_86xx_setup_cpu, - .take_timebase = smp_generic_take_timebase, - .give_timebase = smp_generic_give_timebase, -}; - - -void __init -mpc86xx_smp_init(void) -{ - smp_ops = &smp_86xx_ops; -} diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c deleted file mode 100644 index a8c8f0a44..000000000 --- a/arch/powerpc/platforms/86xx/pci.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * MPC86XX pci setup code - * - * Recode: ZHANG WEI - * Initial author: Xianghua Xiao - * - * Copyright 2006 Freescale Semiconductor 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. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "mpc86xx.h" - -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) -#else -#define DBG(fmt, args...) -#endif - -struct pcie_outbound_window_regs { - uint pexotar; /* 0x.0 - PCI Express outbound translation address register */ - uint pexotear; /* 0x.4 - PCI Express outbound translation extended address register */ - uint pexowbar; /* 0x.8 - PCI Express outbound window base address register */ - char res1[4]; - uint pexowar; /* 0x.10 - PCI Express outbound window attributes register */ - char res2[12]; -}; - -struct pcie_inbound_window_regs { - uint pexitar; /* 0x.0 - PCI Express inbound translation address register */ - char res1[4]; - uint pexiwbar; /* 0x.8 - PCI Express inbound window base address register */ - uint pexiwbear; /* 0x.c - PCI Express inbound window base extended address register */ - uint pexiwar; /* 0x.10 - PCI Express inbound window attributes register */ - char res2[12]; -}; - -static void __init setup_pcie_atmu(struct pci_controller *hose, struct resource *rsrc) -{ - volatile struct ccsr_pex *pcie; - volatile struct pcie_outbound_window_regs *pcieow; - volatile struct pcie_inbound_window_regs *pcieiw; - int i = 0; - - DBG("PCIE memory map start 0x%x, size 0x%x\n", rsrc->start, - rsrc->end - rsrc->start + 1); - pcie = ioremap(rsrc->start, rsrc->end - rsrc->start + 1); - - /* Disable all windows (except pexowar0 since its ignored) */ - pcie->pexowar1 = 0; - pcie->pexowar2 = 0; - pcie->pexowar3 = 0; - pcie->pexowar4 = 0; - pcie->pexiwar1 = 0; - pcie->pexiwar2 = 0; - pcie->pexiwar3 = 0; - - pcieow = (struct pcie_outbound_window_regs *)&pcie->pexotar1; - pcieiw = (struct pcie_inbound_window_regs *)&pcie->pexitar1; - - /* Setup outbound MEM window */ - for(i = 0; i < 3; i++) - if (hose->mem_resources[i].flags & IORESOURCE_MEM){ - DBG("PCIE MEM resource start 0x%08x, size 0x%08x.\n", - hose->mem_resources[i].start, - hose->mem_resources[i].end - - hose->mem_resources[i].start + 1); - pcieow->pexotar = (hose->mem_resources[i].start) >> 12 - & 0x000fffff; - pcieow->pexotear = 0; - pcieow->pexowbar = (hose->mem_resources[i].start) >> 12 - & 0x000fffff; - /* Enable, Mem R/W */ - pcieow->pexowar = 0x80044000 | - (__ilog2(hose->mem_resources[i].end - - hose->mem_resources[i].start + 1) - - 1); - pcieow++; - } - - /* Setup outbound IO window */ - if (hose->io_resource.flags & IORESOURCE_IO){ - DBG("PCIE IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n", - hose->io_resource.start, - hose->io_resource.end - hose->io_resource.start + 1, - hose->io_base_phys); - pcieow->pexotar = (hose->io_resource.start) >> 12 & 0x000fffff; - pcieow->pexotear = 0; - pcieow->pexowbar = (hose->io_base_phys) >> 12 & 0x000fffff; - /* Enable, IO R/W */ - pcieow->pexowar = 0x80088000 | (__ilog2(hose->io_resource.end - - hose->io_resource.start + 1) - 1); - } - - /* Setup 2G inbound Memory Window @ 0 */ - pcieiw->pexitar = 0x00000000; - pcieiw->pexiwbar = 0x00000000; - /* Enable, Prefetch, Local Mem, Snoop R/W, 2G */ - pcieiw->pexiwar = 0xa0f5501e; -} - -static void __init -mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size) -{ - u16 cmd; - unsigned int temps; - - DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n", - pcie_offset, pcie_size); - - early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY - | PCI_COMMAND_IO; - early_write_config_word(hose, 0, 0, PCI_COMMAND, cmd); - - early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80); - - /* PCIE Bus, Fix the MPC8641D host bridge's location to bus 0xFF. */ - early_read_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, &temps); - temps = (temps & 0xff000000) | (0xff) | (0x0 << 8) | (0xfe << 16); - early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps); -} - -int mpc86xx_exclude_device(u_char bus, u_char devfn) -{ - if (bus == 0 && PCI_SLOT(devfn) == 0) - return PCIBIOS_DEVICE_NOT_FOUND; - - return PCIBIOS_SUCCESSFUL; -} - -int __init add_bridge(struct device_node *dev) -{ - int len; - struct pci_controller *hose; - struct resource rsrc; - int *bus_range; - int has_address = 0; - int primary = 0; - - DBG("Adding PCIE host bridge %s\n", dev->full_name); - - /* Fetch host bridge registers address */ - has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); - - /* Get bus range if any */ - bus_range = (int *) get_property(dev, "bus-range", &len); - if (bus_range == NULL || len < 2 * sizeof(int)) - printk(KERN_WARNING "Can't get bus-range for %s, assume" - " bus 0\n", dev->full_name); - - hose = pcibios_alloc_controller(); - if (!hose) - return -ENOMEM; - hose->arch_data = dev; - hose->set_cfg_type = 1; - - /* last_busno = 0xfe cause by MPC8641 PCIE bug */ - hose->first_busno = bus_range ? bus_range[0] : 0x0; - hose->last_busno = bus_range ? bus_range[1] : 0xfe; - - setup_indirect_pcie(hose, rsrc.start, rsrc.start + 0x4); - - /* Setup the PCIE host controller. */ - mpc86xx_setup_pcie(hose, rsrc.start, rsrc.end - rsrc.start + 1); - - if ((rsrc.start & 0xfffff) == 0x8000) - primary = 1; - - printk(KERN_INFO "Found MPC86xx PCIE host bridge at 0x%08lx. " - "Firmware bus number: %d->%d\n", - (unsigned long) rsrc.start, - hose->first_busno, hose->last_busno); - - DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", - hose, hose->cfg_addr, hose->cfg_data); - - /* Interpret the "ranges" property */ - /* This also maps the I/O region and sets isa_io/mem_base */ - pci_process_bridge_OF_ranges(hose, dev, primary); - - /* Setup PEX window registers */ - setup_pcie_atmu(hose, &rsrc); - - return 0; -} diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 5cf46dc57..c4f6b0d2d 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile @@ -9,9 +9,7 @@ obj-$(CONFIG_PPC_CHRP) += chrp/ obj-$(CONFIG_4xx) += 4xx/ obj-$(CONFIG_PPC_83xx) += 83xx/ obj-$(CONFIG_PPC_85xx) += 85xx/ -obj-$(CONFIG_PPC_86xx) += 86xx/ obj-$(CONFIG_PPC_PSERIES) += pseries/ obj-$(CONFIG_PPC_ISERIES) += iseries/ obj-$(CONFIG_PPC_MAPLE) += maple/ obj-$(CONFIG_PPC_CELL) += cell/ -obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/ diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index 0c8c7b6ab..6a02d5108 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig @@ -5,24 +5,15 @@ config SPU_FS tristate "SPU file system" default m depends on PPC_CELL - select SPU_BASE - select MEMORY_HOTPLUG help The SPU file system is used to access Synergistic Processing Units on machines implementing the Broadband Processor Architecture. -config SPU_BASE - bool - default n - config SPUFS_MMAP bool depends on SPU_FS && SPARSEMEM - default y - -config CBE_RAS - bool "RAS features for bare metal Cell BE" + select MEMORY_HOTPLUG default y endmenu diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index c89cdd673..e570bad06 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile @@ -1,15 +1,16 @@ -obj-$(CONFIG_PPC_CELL_NATIVE) += interrupt.o iommu.o setup.o \ - cbe_regs.o spider-pic.o pervasive.o -obj-$(CONFIG_CBE_RAS) += ras.o +obj-y += interrupt.o iommu.o setup.o spider-pic.o +obj-y += pervasive.o -ifeq ($(CONFIG_SMP),y) -obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o -endif +obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_SPU_FS) += spu-base.o spufs/ + +spu-base-y += spu_base.o spu_priv1.o # needed only when building loadable spufs.ko -spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o -spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o +spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o +obj-y += $(spufs-modular-m) + +# always needed in kernel +spufs-builtin-$(CONFIG_SPU_FS) += spu_callbacks.o +obj-y += $(spufs-builtin-y) $(spufs-builtin-m) -obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ - $(spufs-modular-m) \ - $(spu-priv1-y) spufs/ diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c deleted file mode 100644 index 7315f66d1..000000000 --- a/arch/powerpc/platforms/cell/cbe_regs.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * cbe_regs.c - * - * Accessor routines for the various MMIO register blocks of the CBE - * - * (c) 2006 Benjamin Herrenschmidt , IBM Corp. - */ - -#include -#include - -#include -#include -#include -#include - -#include "cbe_regs.h" - -#define MAX_CBE 2 - -/* - * Current implementation uses "cpu" nodes. We build our own mapping - * array of cpu numbers to cpu nodes locally for now to allow interrupt - * time code to have a fast path rather than call of_get_cpu_node(). If - * we implement cpu hotplug, we'll have to install an appropriate norifier - * in order to release references to the cpu going away - */ -static struct cbe_regs_map -{ - struct device_node *cpu_node; - struct cbe_pmd_regs __iomem *pmd_regs; - struct cbe_iic_regs __iomem *iic_regs; -} cbe_regs_maps[MAX_CBE]; -static int cbe_regs_map_count; - -static struct cbe_thread_map -{ - struct device_node *cpu_node; - struct cbe_regs_map *regs; -} cbe_thread_map[NR_CPUS]; - -static struct cbe_regs_map *cbe_find_map(struct device_node *np) -{ - int i; - - for (i = 0; i < cbe_regs_map_count; i++) - if (cbe_regs_maps[i].cpu_node == np) - return &cbe_regs_maps[i]; - return NULL; -} - -struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np) -{ - struct cbe_regs_map *map = cbe_find_map(np); - if (map == NULL) - return NULL; - return map->pmd_regs; -} - -struct cbe_pmd_regs __iomem *cbe_get_cpu_pmd_regs(int cpu) -{ - struct cbe_regs_map *map = cbe_thread_map[cpu].regs; - if (map == NULL) - return NULL; - return map->pmd_regs; -} - - -struct cbe_iic_regs __iomem *cbe_get_iic_regs(struct device_node *np) -{ - struct cbe_regs_map *map = cbe_find_map(np); - if (map == NULL) - return NULL; - return map->iic_regs; -} -struct cbe_iic_regs __iomem *cbe_get_cpu_iic_regs(int cpu) -{ - struct cbe_regs_map *map = cbe_thread_map[cpu].regs; - if (map == NULL) - return NULL; - return map->iic_regs; -} - -void __init cbe_regs_init(void) -{ - int i; - struct device_node *cpu; - - /* Build local fast map of CPUs */ - for_each_possible_cpu(i) - cbe_thread_map[i].cpu_node = of_get_cpu_node(i, NULL); - - /* Find maps for each device tree CPU */ - for_each_node_by_type(cpu, "cpu") { - struct cbe_regs_map *map = &cbe_regs_maps[cbe_regs_map_count++]; - - /* That hack must die die die ! */ - struct address_prop { - unsigned long address; - unsigned int len; - } __attribute__((packed)) *prop; - - - if (cbe_regs_map_count > MAX_CBE) { - printk(KERN_ERR "cbe_regs: More BE chips than supported" - "!\n"); - cbe_regs_map_count--; - return; - } - map->cpu_node = cpu; - for_each_possible_cpu(i) - if (cbe_thread_map[i].cpu_node == cpu) - cbe_thread_map[i].regs = map; - - prop = (struct address_prop *)get_property(cpu, "pervasive", - NULL); - if (prop != NULL) - map->pmd_regs = ioremap(prop->address, prop->len); - - prop = (struct address_prop *)get_property(cpu, "iic", - NULL); - if (prop != NULL) - map->iic_regs = ioremap(prop->address, prop->len); - } -} - diff --git a/arch/powerpc/platforms/cell/cbe_regs.h b/arch/powerpc/platforms/cell/cbe_regs.h deleted file mode 100644 index e76e4a6af..000000000 --- a/arch/powerpc/platforms/cell/cbe_regs.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * cbe_regs.h - * - * This file is intended to hold the various register definitions for CBE - * on-chip system devices (memory controller, IO controller, etc...) - * - * (c) 2006 Benjamin Herrenschmidt , IBM Corp. - */ - -#ifndef CBE_REGS_H -#define CBE_REGS_H - -/* - * - * Some HID register definitions - * - */ - -/* CBE specific HID0 bits */ -#define HID0_CBE_THERM_WAKEUP 0x0000020000000000ul -#define HID0_CBE_SYSERR_WAKEUP 0x0000008000000000ul -#define HID0_CBE_THERM_INT_EN 0x0000000400000000ul -#define HID0_CBE_SYSERR_INT_EN 0x0000000200000000ul - - -/* - * - * Pervasive unit register definitions - * - */ - -struct cbe_pmd_regs { - u8 pad_0x0000_0x0800[0x0800 - 0x0000]; /* 0x0000 */ - - /* Thermal Sensor Registers */ - u64 ts_ctsr1; /* 0x0800 */ - u64 ts_ctsr2; /* 0x0808 */ - u64 ts_mtsr1; /* 0x0810 */ - u64 ts_mtsr2; /* 0x0818 */ - u64 ts_itr1; /* 0x0820 */ - u64 ts_itr2; /* 0x0828 */ - u64 ts_gitr; /* 0x0830 */ - u64 ts_isr; /* 0x0838 */ - u64 ts_imr; /* 0x0840 */ - u64 tm_cr1; /* 0x0848 */ - u64 tm_cr2; /* 0x0850 */ - u64 tm_simr; /* 0x0858 */ - u64 tm_tpr; /* 0x0860 */ - u64 tm_str1; /* 0x0868 */ - u64 tm_str2; /* 0x0870 */ - u64 tm_tsr; /* 0x0878 */ - - /* Power Management */ - u64 pm_control; /* 0x0880 */ -#define CBE_PMD_PAUSE_ZERO_CONTROL 0x10000 - u64 pm_status; /* 0x0888 */ - - /* Time Base Register */ - u64 tbr; /* 0x0890 */ - - u8 pad_0x0898_0x0c00 [0x0c00 - 0x0898]; /* 0x0898 */ - - /* Fault Isolation Registers */ - u64 checkstop_fir; /* 0x0c00 */ - u64 recoverable_fir; - u64 spec_att_mchk_fir; - u64 fir_mode_reg; - u64 fir_enable_mask; - - u8 pad_0x0c28_0x1000 [0x1000 - 0x0c28]; /* 0x0c28 */ -}; - -extern struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np); -extern struct cbe_pmd_regs __iomem *cbe_get_cpu_pmd_regs(int cpu); - -/* - * - * IIC unit register definitions - * - */ - -struct cbe_iic_pending_bits { - u32 data; - u8 flags; - u8 class; - u8 source; - u8 prio; -}; - -#define CBE_IIC_IRQ_VALID 0x80 -#define CBE_IIC_IRQ_IPI 0x40 - -struct cbe_iic_thread_regs { - struct cbe_iic_pending_bits pending; - struct cbe_iic_pending_bits pending_destr; - u64 generate; - u64 prio; -}; - -struct cbe_iic_regs { - u8 pad_0x0000_0x0400[0x0400 - 0x0000]; /* 0x0000 */ - - /* IIC interrupt registers */ - struct cbe_iic_thread_regs thread[2]; /* 0x0400 */ - u64 iic_ir; /* 0x0440 */ - u64 iic_is; /* 0x0448 */ - - u8 pad_0x0450_0x0500[0x0500 - 0x0450]; /* 0x0450 */ - - /* IOC FIR */ - u64 ioc_fir_reset; /* 0x0500 */ - u64 ioc_fir_set; - u64 ioc_checkstop_enable; - u64 ioc_fir_error_mask; - u64 ioc_syserr_enable; - u64 ioc_fir; - - u8 pad_0x0530_0x1000[0x1000 - 0x0530]; /* 0x0530 */ -}; - -extern struct cbe_iic_regs __iomem *cbe_get_iic_regs(struct device_node *np); -extern struct cbe_iic_regs __iomem *cbe_get_cpu_iic_regs(int cpu); - - -/* Init this module early */ -extern void cbe_regs_init(void); - - -#endif /* CBE_REGS_H */ diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index d7bbb6110..978be1c30 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c @@ -1,9 +1,6 @@ /* * Cell Internal Interrupt Controller * - * Copyright (C) 2006 Benjamin Herrenschmidt (benh@kernel.crashing.org) - * IBM, Corp. - * * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 * * Author: Arnd Bergmann @@ -23,84 +20,269 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include #include #include -#include #include #include #include #include -#include #include "interrupt.h" -#include "cbe_regs.h" + +struct iic_pending_bits { + u32 data; + u8 flags; + u8 class; + u8 source; + u8 prio; +}; + +enum iic_pending_flags { + IIC_VALID = 0x80, + IIC_IPI = 0x40, +}; + +struct iic_regs { + struct iic_pending_bits pending; + struct iic_pending_bits pending_destr; + u64 generate; + u64 prio; +}; struct iic { - struct cbe_iic_thread_regs __iomem *regs; + struct iic_regs __iomem *regs; u8 target_id; - u8 eoi_stack[16]; - int eoi_ptr; - struct irq_host *host; }; static DEFINE_PER_CPU(struct iic, iic); -#define IIC_NODE_COUNT 2 -static struct irq_host *iic_hosts[IIC_NODE_COUNT]; -/* Convert between "pending" bits and hw irq number */ -static irq_hw_number_t iic_pending_to_hwnum(struct cbe_iic_pending_bits bits) +void iic_local_enable(void) { - unsigned char unit = bits.source & 0xf; + struct iic *iic = &__get_cpu_var(iic); + u64 tmp; + + /* + * There seems to be a bug that is present in DD2.x CPUs + * and still only partially fixed in DD3.1. + * This bug causes a value written to the priority register + * not to make it there, resulting in a system hang unless we + * write it again. + * Masking with 0xf0 is done because the Cell BE does not + * implement the lower four bits of the interrupt priority, + * they always read back as zeroes, although future CPUs + * might implement different bits. + */ + do { + out_be64(&iic->regs->prio, 0xff); + tmp = in_be64(&iic->regs->prio); + } while ((tmp & 0xf0) != 0xf0); +} - if (bits.flags & CBE_IIC_IRQ_IPI) - return IIC_IRQ_IPI0 | (bits.prio >> 4); - else if (bits.class <= 3) - return (bits.class << 4) | unit; - else - return IIC_IRQ_INVALID; +void iic_local_disable(void) +{ + out_be64(&__get_cpu_var(iic).regs->prio, 0x0); } -static void iic_mask(unsigned int irq) +static unsigned int iic_startup(unsigned int irq) { + return 0; } -static void iic_unmask(unsigned int irq) +static void iic_enable(unsigned int irq) { + iic_local_enable(); } -static void iic_eoi(unsigned int irq) +static void iic_disable(unsigned int irq) { - struct iic *iic = &__get_cpu_var(iic); - out_be64(&iic->regs->prio, iic->eoi_stack[--iic->eoi_ptr]); - BUG_ON(iic->eoi_ptr < 0); } -static struct irq_chip iic_chip = { +static void iic_end(unsigned int irq) +{ + iic_local_enable(); +} + +static struct hw_interrupt_type iic_pic = { .typename = " CELL-IIC ", - .mask = iic_mask, - .unmask = iic_unmask, - .eoi = iic_eoi, + .startup = iic_startup, + .enable = iic_enable, + .disable = iic_disable, + .end = iic_end, }; +static int iic_external_get_irq(struct iic_pending_bits pending) +{ + int irq; + unsigned char node, unit; + + node = pending.source >> 4; + unit = pending.source & 0xf; + irq = -1; + + /* + * This mapping is specific to the Cell Broadband + * Engine. We might need to get the numbers + * from the device tree to support future CPUs. + */ + switch (unit) { + case 0x00: + case 0x0b: + /* + * One of these units can be connected + * to an external interrupt controller. + */ + if (pending.prio > 0x3f || + pending.class != 2) + break; + irq = IIC_EXT_OFFSET + + spider_get_irq(node) + + node * IIC_NODE_STRIDE; + break; + case 0x01 ... 0x04: + case 0x07 ... 0x0a: + /* + * These units are connected to the SPEs + */ + if (pending.class > 2) + break; + irq = IIC_SPE_OFFSET + + pending.class * IIC_CLASS_STRIDE + + node * IIC_NODE_STRIDE + + unit; + break; + } + if (irq == -1) + printk(KERN_WARNING "Unexpected interrupt class %02x, " + "source %02x, prio %02x, cpu %02x\n", pending.class, + pending.source, pending.prio, smp_processor_id()); + return irq; +} + /* Get an IRQ number from the pending state register of the IIC */ -static unsigned int iic_get_irq(struct pt_regs *regs) +int iic_get_irq(struct pt_regs *regs) +{ + struct iic *iic; + int irq; + struct iic_pending_bits pending; + + iic = &__get_cpu_var(iic); + *(unsigned long *) &pending = + in_be64((unsigned long __iomem *) &iic->regs->pending_destr); + + irq = -1; + if (pending.flags & IIC_VALID) { + if (pending.flags & IIC_IPI) { + irq = IIC_IPI_OFFSET + (pending.prio >> 4); +/* + if (irq > 0x80) + printk(KERN_WARNING "Unexpected IPI prio %02x" + "on CPU %02x\n", pending.prio, + smp_processor_id()); +*/ + } else { + irq = iic_external_get_irq(pending); + } + } + return irq; +} + +/* hardcoded part to be compatible with older firmware */ + +static int setup_iic_hardcoded(void) { - struct cbe_iic_pending_bits pending; - struct iic *iic; - - iic = &__get_cpu_var(iic); - *(unsigned long *) &pending = - in_be64((unsigned long __iomem *) &iic->regs->pending_destr); - iic->eoi_stack[++iic->eoi_ptr] = pending.prio; - BUG_ON(iic->eoi_ptr > 15); - if (pending.flags & CBE_IIC_IRQ_VALID) - return irq_linear_revmap(iic->host, - iic_pending_to_hwnum(pending)); - return NO_IRQ; + struct device_node *np; + int nodeid, cpu; + unsigned long regs; + struct iic *iic; + + for_each_cpu(cpu) { + iic = &per_cpu(iic, cpu); + nodeid = cpu/2; + + for (np = of_find_node_by_type(NULL, "cpu"); + np; + np = of_find_node_by_type(np, "cpu")) { + if (nodeid == *(int *)get_property(np, "node-id", NULL)) + break; + } + + if (!np) { + printk(KERN_WARNING "IIC: CPU %d not found\n", cpu); + iic->regs = NULL; + iic->target_id = 0xff; + return -ENODEV; + } + + regs = *(long *)get_property(np, "iic", NULL); + + /* hack until we have decided on the devtree info */ + regs += 0x400; + if (cpu & 1) + regs += 0x20; + + printk(KERN_INFO "IIC for CPU %d at %lx\n", cpu, regs); + iic->regs = ioremap(regs, sizeof(struct iic_regs)); + iic->target_id = (nodeid << 4) + ((cpu & 1) ? 0xf : 0xe); + } + + return 0; +} + +static int setup_iic(void) +{ + struct device_node *dn; + unsigned long *regs; + char *compatible; + unsigned *np, found = 0; + struct iic *iic = NULL; + + for (dn = NULL; (dn = of_find_node_by_name(dn, "interrupt-controller"));) { + compatible = (char *)get_property(dn, "compatible", NULL); + + if (!compatible) { + printk(KERN_WARNING "no compatible property found !\n"); + continue; + } + + if (strstr(compatible, "IBM,CBEA-Internal-Interrupt-Controller")) + regs = (unsigned long *)get_property(dn,"reg", NULL); + else + continue; + + if (!regs) + printk(KERN_WARNING "IIC: no reg property\n"); + + np = (unsigned int *)get_property(dn, "ibm,interrupt-server-ranges", NULL); + + if (!np) { + printk(KERN_WARNING "IIC: CPU association not found\n"); + iic->regs = NULL; + iic->target_id = 0xff; + return -ENODEV; + } + + iic = &per_cpu(iic, np[0]); + iic->regs = ioremap(regs[0], sizeof(struct iic_regs)); + iic->target_id = ((np[0] & 2) << 3) + ((np[0] & 1) ? 0xf : 0xe); + printk("IIC for CPU %d at %lx mapped to %p\n", np[0], regs[0], iic->regs); + + iic = &per_cpu(iic, np[1]); + iic->regs = ioremap(regs[2], sizeof(struct iic_regs)); + iic->target_id = ((np[1] & 2) << 3) + ((np[1] & 1) ? 0xf : 0xe); + printk("IIC for CPU %d at %lx mapped to %p\n", np[1], regs[2], iic->regs); + + found++; + } + + if (found) + return 0; + else + return -ENODEV; } #ifdef CONFIG_SMP @@ -108,12 +290,12 @@ static unsigned int iic_get_irq(struct pt_regs *regs) /* Use the highest interrupt priorities for IPI */ static inline int iic_ipi_to_irq(int ipi) { - return IIC_IRQ_IPI0 + IIC_NUM_IPIS - 1 - ipi; + return IIC_IPI_OFFSET + IIC_NUM_IPIS - 1 - ipi; } static inline int iic_irq_to_ipi(int irq) { - return IIC_NUM_IPIS - 1 - (irq - IIC_IRQ_IPI0); + return IIC_NUM_IPIS - 1 - (irq - IIC_IPI_OFFSET); } void iic_setup_cpu(void) @@ -132,51 +314,22 @@ u8 iic_get_target_id(int cpu) } EXPORT_SYMBOL_GPL(iic_get_target_id); -struct irq_host *iic_get_irq_host(int node) -{ - if (node < 0 || node >= IIC_NODE_COUNT) - return NULL; - return iic_hosts[node]; -} -EXPORT_SYMBOL_GPL(iic_get_irq_host); - - static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) { - int ipi = (int)(long)dev_id; - - smp_message_recv(ipi, regs); - + smp_message_recv(iic_irq_to_ipi(irq), regs); return IRQ_HANDLED; } static void iic_request_ipi(int ipi, const char *name) { - int node, virq; - - for (node = 0; node < IIC_NODE_COUNT; node++) { - char *rname; - if (iic_hosts[node] == NULL) - continue; - virq = irq_create_mapping(iic_hosts[node], - iic_ipi_to_irq(ipi)); - if (virq == NO_IRQ) { - printk(KERN_ERR - "iic: failed to map IPI %s on node %d\n", - name, node); - continue; - } - rname = kzalloc(strlen(name) + 16, GFP_KERNEL); - if (rname) - sprintf(rname, "%s node %d", name, node); - else - rname = (char *)name; - if (request_irq(virq, iic_ipi_action, IRQF_DISABLED, - rname, (void *)(long)ipi)) - printk(KERN_ERR - "iic: failed to request IPI %s on node %d\n", - name, node); - } + int irq; + + irq = iic_ipi_to_irq(ipi); + /* IPIs are marked SA_INTERRUPT as they must run with irqs + * disabled */ + get_irq_desc(irq)->handler = &iic_pic; + get_irq_desc(irq)->status |= IRQ_PER_CPU; + request_irq(irq, iic_ipi_action, SA_INTERRUPT, name, NULL); } void iic_request_IPIs(void) @@ -187,119 +340,34 @@ void iic_request_IPIs(void) iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug"); #endif /* CONFIG_DEBUGGER */ } - #endif /* CONFIG_SMP */ - -static int iic_host_match(struct irq_host *h, struct device_node *node) -{ - return h->host_data != NULL && node == h->host_data; -} - -static int iic_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) +static void iic_setup_spe_handlers(void) { - if (hw < IIC_IRQ_IPI0) - set_irq_chip_and_handler(virq, &iic_chip, handle_fasteoi_irq); - else - set_irq_chip_and_handler(virq, &iic_chip, handle_percpu_irq); - return 0; -} + int be, isrc; -static int iic_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) - -{ - /* Currently, we don't translate anything. That needs to be fixed as - * we get better defined device-trees. iic interrupts have to be - * explicitely mapped by whoever needs them - */ - return -ENODEV; -} - -static struct irq_host_ops iic_host_ops = { - .match = iic_host_match, - .map = iic_host_map, - .xlate = iic_host_xlate, -}; - -static void __init init_one_iic(unsigned int hw_cpu, unsigned long addr, - struct irq_host *host) -{ - /* XXX FIXME: should locate the linux CPU number from the HW cpu - * number properly. We are lucky for now - */ - struct iic *iic = &per_cpu(iic, hw_cpu); - - iic->regs = ioremap(addr, sizeof(struct cbe_iic_thread_regs)); - BUG_ON(iic->regs == NULL); - - iic->target_id = ((hw_cpu & 2) << 3) | ((hw_cpu & 1) ? 0xf : 0xe); - iic->eoi_stack[0] = 0xff; - iic->host = host; - out_be64(&iic->regs->prio, 0); - - printk(KERN_INFO "IIC for CPU %d at %lx mapped to %p, target id 0x%x\n", - hw_cpu, addr, iic->regs, iic->target_id); -} - -static int __init setup_iic(void) -{ - struct device_node *dn; - struct resource r0, r1; - struct irq_host *host; - int found = 0; - u32 *np; - - for (dn = NULL; - (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) { - if (!device_is_compatible(dn, - "IBM,CBEA-Internal-Interrupt-Controller")) - continue; - np = (u32 *)get_property(dn, "ibm,interrupt-server-ranges", - NULL); - if (np == NULL) { - printk(KERN_WARNING "IIC: CPU association not found\n"); - of_node_put(dn); - return -ENODEV; - } - if (of_address_to_resource(dn, 0, &r0) || - of_address_to_resource(dn, 1, &r1)) { - printk(KERN_WARNING "IIC: Can't resolve addresses\n"); - of_node_put(dn); - return -ENODEV; + /* Assume two threads per BE are present */ + for (be=0; be < num_present_cpus() / 2; be++) { + for (isrc = 0; isrc < IIC_CLASS_STRIDE * 3; isrc++) { + int irq = IIC_NODE_STRIDE * be + IIC_SPE_OFFSET + isrc; + get_irq_desc(irq)->handler = &iic_pic; } - host = NULL; - if (found < IIC_NODE_COUNT) { - host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, - IIC_SOURCE_COUNT, - &iic_host_ops, - IIC_IRQ_INVALID); - iic_hosts[found] = host; - BUG_ON(iic_hosts[found] == NULL); - iic_hosts[found]->host_data = of_node_get(dn); - found++; - } - init_one_iic(np[0], r0.start, host); - init_one_iic(np[1], r1.start, host); } - - if (found) - return 0; - else - return -ENODEV; } -void __init iic_init_IRQ(void) +void iic_init_IRQ(void) { - /* Discover and initialize iics */ - if (setup_iic() < 0) - panic("IIC: Failed to initialize !\n"); + int cpu, irq_offset; + struct iic *iic; - /* Set master interrupt handling function */ - ppc_md.get_irq = iic_get_irq; + if (setup_iic() < 0) + setup_iic_hardcoded(); - /* Enable on current CPU */ - iic_setup_cpu(); + irq_offset = 0; + for_each_possible_cpu(cpu) { + iic = &per_cpu(iic, cpu); + if (iic->regs) + out_be64(&iic->regs->prio, 0xff); + } + iic_setup_spe_handlers(); } diff --git a/arch/powerpc/platforms/cell/interrupt.h b/arch/powerpc/platforms/cell/interrupt.h index 5560a92ec..799f77d98 100644 --- a/arch/powerpc/platforms/cell/interrupt.h +++ b/arch/powerpc/platforms/cell/interrupt.h @@ -37,24 +37,27 @@ */ enum { - IIC_IRQ_INVALID = 0xff, - IIC_IRQ_MAX = 0x3f, - IIC_IRQ_EXT_IOIF0 = 0x20, - IIC_IRQ_EXT_IOIF1 = 0x2b, - IIC_IRQ_IPI0 = 0x40, - IIC_NUM_IPIS = 0x10, /* IRQs reserved for IPI */ - IIC_SOURCE_COUNT = 0x50, + IIC_EXT_OFFSET = 0x00, /* Start of south bridge IRQs */ + IIC_NUM_EXT = 0x40, /* Number of south bridge IRQs */ + IIC_SPE_OFFSET = 0x40, /* Start of SPE interrupts */ + IIC_CLASS_STRIDE = 0x10, /* SPE IRQs per class */ + IIC_IPI_OFFSET = 0x70, /* Start of IPI IRQs */ + IIC_NUM_IPIS = 0x10, /* IRQs reserved for IPI */ + IIC_NODE_STRIDE = 0x80, /* Total IRQs per node */ }; extern void iic_init_IRQ(void); +extern int iic_get_irq(struct pt_regs *regs); extern void iic_cause_IPI(int cpu, int mesg); extern void iic_request_IPIs(void); extern void iic_setup_cpu(void); +extern void iic_local_enable(void); +extern void iic_local_disable(void); extern u8 iic_get_target_id(int cpu); -extern struct irq_host *iic_get_irq_host(int node); extern void spider_init_IRQ(void); +extern int spider_get_irq(int node); #endif #endif /* ASM_CELL_PIC_H */ diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index a35004e14..a49ceb799 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c @@ -473,16 +473,6 @@ static int cell_dma_supported(struct device *dev, u64 mask) return mask < 0x100000000ull; } -static struct dma_mapping_ops cell_iommu_ops = { - .alloc_coherent = cell_alloc_coherent, - .free_coherent = cell_free_coherent, - .map_single = cell_map_single, - .unmap_single = cell_unmap_single, - .map_sg = cell_map_sg, - .unmap_sg = cell_unmap_sg, - .dma_supported = cell_dma_supported, -}; - void cell_init_iommu(void) { int setup_bus = 0; @@ -508,5 +498,11 @@ void cell_init_iommu(void) } } - pci_dma_ops = cell_iommu_ops; + pci_dma_ops.alloc_coherent = cell_alloc_coherent; + pci_dma_ops.free_coherent = cell_free_coherent; + pci_dma_ops.map_single = cell_map_single; + pci_dma_ops.unmap_single = cell_unmap_single; + pci_dma_ops.map_sg = cell_map_sg; + pci_dma_ops.unmap_sg = cell_unmap_sg; + pci_dma_ops.dma_supported = cell_dma_supported; } diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c index 9f2e4ed20..7eed8c624 100644 --- a/arch/powerpc/platforms/cell/pervasive.c +++ b/arch/powerpc/platforms/cell/pervasive.c @@ -23,6 +23,7 @@ #undef DEBUG +#include #include #include #include @@ -36,28 +37,36 @@ #include #include "pervasive.h" -#include "cbe_regs.h" static DEFINE_SPINLOCK(cbe_pervasive_lock); +struct cbe_pervasive { + struct pmd_regs __iomem *regs; + unsigned int thread; +}; + +/* can't use per_cpu from setup_arch */ +static struct cbe_pervasive cbe_pervasive[NR_CPUS]; static void __init cbe_enable_pause_zero(void) { unsigned long thread_switch_control; unsigned long temp_register; - struct cbe_pmd_regs __iomem *pregs; + struct cbe_pervasive *p; + int thread; spin_lock_irq(&cbe_pervasive_lock); - pregs = cbe_get_cpu_pmd_regs(smp_processor_id()); - if (pregs == NULL) + p = &cbe_pervasive[smp_processor_id()]; + + if (!cbe_pervasive->regs) goto out; pr_debug("Power Management: CPU %d\n", smp_processor_id()); /* Enable Pause(0) control bit */ - temp_register = in_be64(&pregs->pm_control); + temp_register = in_be64(&p->regs->pm_control); - out_be64(&pregs->pm_control, - temp_register | CBE_PMD_PAUSE_ZERO_CONTROL); + out_be64(&p->regs->pm_control, + temp_register|PMD_PAUSE_ZERO_CONTROL); /* Enable DEC and EE interrupt request */ thread_switch_control = mfspr(SPRN_TSC_CELL); @@ -66,16 +75,25 @@ static void __init cbe_enable_pause_zero(void) switch ((mfspr(SPRN_CTRLF) & CTRL_CT)) { case CTRL_CT0: thread_switch_control |= TSC_CELL_DEC_ENABLE_0; + thread = 0; break; case CTRL_CT1: thread_switch_control |= TSC_CELL_DEC_ENABLE_1; + thread = 1; break; default: printk(KERN_WARNING "%s: unknown configuration\n", __FUNCTION__); + thread = -1; break; } + if (p->thread != thread) + printk(KERN_WARNING "%s: device tree inconsistant, " + "cpu %i: %d/%d\n", __FUNCTION__, + smp_processor_id(), + p->thread, thread); + mtspr(SPRN_TSC_CELL, thread_switch_control); out: @@ -86,11 +104,6 @@ static void cbe_idle(void) { unsigned long ctrl; - /* Why do we do that on every idle ? Couldn't that be done once for - * all or do we lose the state some way ? Also, the pm_control - * register setting, that can't be set once at boot ? We really want - * to move that away in order to implement a simple powersave - */ cbe_enable_pause_zero(); while (1) { @@ -139,15 +152,8 @@ static int cbe_system_reset_exception(struct pt_regs *regs) timer_interrupt(regs); break; case SRR1_WAKEMT: + /* no action required */ break; -#ifdef CONFIG_CBE_RAS - case SRR1_WAKESYSERR: - cbe_system_error_exception(regs); - break; - case SRR1_WAKETHERM: - cbe_thermal_exception(regs); - break; -#endif /* CONFIG_CBE_RAS */ default: /* do system reset */ return 0; @@ -156,11 +162,68 @@ static int cbe_system_reset_exception(struct pt_regs *regs) return 1; } -void __init cbe_pervasive_init(void) +static int __init cbe_find_pmd_mmio(int cpu, struct cbe_pervasive *p) +{ + struct device_node *node; + unsigned int *int_servers; + char *addr; + unsigned long real_address; + unsigned int size; + + struct pmd_regs __iomem *pmd_mmio_area; + int hardid, thread; + int proplen; + + pmd_mmio_area = NULL; + hardid = get_hard_smp_processor_id(cpu); + for (node = NULL; (node = of_find_node_by_type(node, "cpu"));) { + int_servers = (void *) get_property(node, + "ibm,ppc-interrupt-server#s", &proplen); + if (!int_servers) { + printk(KERN_WARNING "%s misses " + "ibm,ppc-interrupt-server#s property", + node->full_name); + continue; + } + for (thread = 0; thread < proplen / sizeof (int); thread++) { + if (hardid == int_servers[thread]) { + addr = get_property(node, "pervasive", NULL); + goto found; + } + } + } + + printk(KERN_WARNING "%s: CPU %d not found\n", __FUNCTION__, cpu); + return -EINVAL; + +found: + real_address = *(unsigned long*) addr; + addr += sizeof (unsigned long); + size = *(unsigned int*) addr; + + pr_debug("pervasive area for CPU %d at %lx, size %x\n", + cpu, real_address, size); + p->regs = ioremap(real_address, size); + p->thread = thread; + return 0; +} + +void __init cell_pervasive_init(void) { + struct cbe_pervasive *p; + int cpu; + int ret; + if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO)) return; + for_each_possible_cpu(cpu) { + p = &cbe_pervasive[cpu]; + ret = cbe_find_pmd_mmio(cpu, p); + if (ret) + return; + } + ppc_md.idle_loop = cbe_idle; ppc_md.system_reset_exception = cbe_system_reset_exception; } diff --git a/arch/powerpc/platforms/cell/pervasive.h b/arch/powerpc/platforms/cell/pervasive.h index 7b50947f8..da1fb85ca 100644 --- a/arch/powerpc/platforms/cell/pervasive.h +++ b/arch/powerpc/platforms/cell/pervasive.h @@ -25,9 +25,38 @@ #ifndef PERVASIVE_H #define PERVASIVE_H -extern void cbe_pervasive_init(void); -extern void cbe_system_error_exception(struct pt_regs *regs); -extern void cbe_maintenance_exception(struct pt_regs *regs); -extern void cbe_thermal_exception(struct pt_regs *regs); +struct pmd_regs { + u8 pad_0x0000_0x0800[0x0800 - 0x0000]; /* 0x0000 */ + + /* Thermal Sensor Registers */ + u64 ts_ctsr1; /* 0x0800 */ + u64 ts_ctsr2; /* 0x0808 */ + u64 ts_mtsr1; /* 0x0810 */ + u64 ts_mtsr2; /* 0x0818 */ + u64 ts_itr1; /* 0x0820 */ + u64 ts_itr2; /* 0x0828 */ + u64 ts_gitr; /* 0x0830 */ + u64 ts_isr; /* 0x0838 */ + u64 ts_imr; /* 0x0840 */ + u64 tm_cr1; /* 0x0848 */ + u64 tm_cr2; /* 0x0850 */ + u64 tm_simr; /* 0x0858 */ + u64 tm_tpr; /* 0x0860 */ + u64 tm_str1; /* 0x0868 */ + u64 tm_str2; /* 0x0870 */ + u64 tm_tsr; /* 0x0878 */ + + /* Power Management */ + u64 pm_control; /* 0x0880 */ +#define PMD_PAUSE_ZERO_CONTROL 0x10000 + u64 pm_status; /* 0x0888 */ + + /* Time Base Register */ + u64 tbr; /* 0x0890 */ + + u8 pad_0x0898_0x1000 [0x1000 - 0x0898]; /* 0x0898 */ +}; + +void __init cell_pervasive_init(void); #endif diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c deleted file mode 100644 index 0984c7071..000000000 --- a/arch/powerpc/platforms/cell/ras.c +++ /dev/null @@ -1,111 +0,0 @@ -#define DEBUG - -#include -#include -#include - -#include -#include -#include -#include - -#include "ras.h" -#include "cbe_regs.h" - - -static void dump_fir(int cpu) -{ - struct cbe_pmd_regs __iomem *pregs = cbe_get_cpu_pmd_regs(cpu); - struct cbe_iic_regs __iomem *iregs = cbe_get_cpu_iic_regs(cpu); - - if (pregs == NULL) - return; - - /* Todo: do some nicer parsing of bits and based on them go down - * to other sub-units FIRs and not only IIC - */ - printk(KERN_ERR "Global Checkstop FIR : 0x%016lx\n", - in_be64(&pregs->checkstop_fir)); - printk(KERN_ERR "Global Recoverable FIR : 0x%016lx\n", - in_be64(&pregs->checkstop_fir)); - printk(KERN_ERR "Global MachineCheck FIR : 0x%016lx\n", - in_be64(&pregs->spec_att_mchk_fir)); - - if (iregs == NULL) - return; - printk(KERN_ERR "IOC FIR : 0x%016lx\n", - in_be64(&iregs->ioc_fir)); - -} - -void cbe_system_error_exception(struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - printk(KERN_ERR "System Error Interrupt on CPU %d !\n", cpu); - dump_fir(cpu); - dump_stack(); -} - -void cbe_maintenance_exception(struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - /* - * Nothing implemented for the maintenance interrupt at this point - */ - - printk(KERN_ERR "Unhandled Maintenance interrupt on CPU %d !\n", cpu); - dump_stack(); -} - -void cbe_thermal_exception(struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - /* - * Nothing implemented for the thermal interrupt at this point - */ - - printk(KERN_ERR "Unhandled Thermal interrupt on CPU %d !\n", cpu); - dump_stack(); -} - -static int cbe_machine_check_handler(struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - printk(KERN_ERR "Machine Check Interrupt on CPU %d !\n", cpu); - dump_fir(cpu); - - /* No recovery from this code now, lets continue */ - return 0; -} - -void __init cbe_ras_init(void) -{ - unsigned long hid0; - - /* - * Enable System Error & thermal interrupts and wakeup conditions - */ - - hid0 = mfspr(SPRN_HID0); - hid0 |= HID0_CBE_THERM_INT_EN | HID0_CBE_THERM_WAKEUP | - HID0_CBE_SYSERR_INT_EN | HID0_CBE_SYSERR_WAKEUP; - mtspr(SPRN_HID0, hid0); - mb(); - - /* - * Install machine check handler. Leave setting of precise mode to - * what the firmware did for now - */ - ppc_md.machine_check_exception = cbe_machine_check_handler; - mb(); - - /* - * For now, we assume that IOC_FIR is already set to forward some - * error conditions to the System Error handler. If that is not true - * then it will have to be fixed up here. - */ -} diff --git a/arch/powerpc/platforms/cell/ras.h b/arch/powerpc/platforms/cell/ras.h deleted file mode 100644 index eb7ee54c8..000000000 --- a/arch/powerpc/platforms/cell/ras.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef RAS_H -#define RAS_H - -extern void cbe_system_error_exception(struct pt_regs *regs); -extern void cbe_maintenance_exception(struct pt_regs *regs); -extern void cbe_thermal_exception(struct pt_regs *regs); -extern void cbe_ras_init(void); - -#endif /* RAS_H */ diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 282987d6d..fd3e5609e 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -14,6 +14,7 @@ */ #undef DEBUG +#include #include #include #include @@ -48,14 +49,10 @@ #include #include #include -#include -#include #include "interrupt.h" #include "iommu.h" -#include "cbe_regs.h" #include "pervasive.h" -#include "ras.h" #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -80,31 +77,10 @@ static void cell_progress(char *s, unsigned short hex) printk("*** %04x : %s\n", hex, s ? s : ""); } -static void __init cell_pcibios_fixup(void) -{ - struct pci_dev *dev = NULL; - - for_each_pci_dev(dev) - pci_read_irq_line(dev); -} - -static void __init cell_init_irq(void) -{ - iic_init_IRQ(); - spider_init_IRQ(); -} - static void __init cell_setup_arch(void) { -#ifdef CONFIG_SPU_BASE - spu_priv1_ops = &spu_priv1_mmio_ops; -#endif - - cbe_regs_init(); - -#ifdef CONFIG_CBE_RAS - cbe_ras_init(); -#endif + ppc_md.init_IRQ = iic_init_IRQ; + ppc_md.get_irq = iic_get_irq; #ifdef CONFIG_SMP smp_init_cell(); @@ -121,7 +97,8 @@ static void __init cell_setup_arch(void) /* Find and initialize PCI host bridges */ init_pci_config_tokens(); find_and_init_phbs(); - cbe_pervasive_init(); + spider_init_IRQ(); + cell_pervasive_init(); #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; #endif @@ -136,8 +113,12 @@ static void __init cell_init_early(void) { DBG(" -> cell_init_early()\n"); + hpte_init_native(); + cell_init_iommu(); + ppc64_interrupt_controller = IC_CELL_PIC; + DBG(" <- cell_init_early()\n"); } @@ -146,17 +127,11 @@ static int __init cell_probe(void) { unsigned long root = of_get_flat_dt_root(); - if (!of_flat_dt_is_compatible(root, "IBM,CBEA") && - !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0")) - return 0; - -#ifdef CONFIG_UDBG_RTAS_CONSOLE - udbg_init_rtas_console(); -#endif - - hpte_init_native(); + if (of_flat_dt_is_compatible(root, "IBM,CBEA") || + of_flat_dt_is_compatible(root, "IBM,CPBW-1.0")) + return 1; - return 1; + return 0; } /* @@ -183,8 +158,6 @@ define_machine(cell) { .calibrate_decr = generic_calibrate_decr, .check_legacy_ioport = cell_check_legacy_ioport, .progress = cell_progress, - .init_IRQ = cell_init_irq, - .pcibios_fixup = cell_pcibios_fixup, #ifdef CONFIG_KEXEC .machine_kexec = default_machine_kexec, .machine_kexec_prepare = default_machine_kexec_prepare, diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index 46aef0640..bdf6c5fe5 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c @@ -14,6 +14,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 15217bb04..55cbdd77a 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -57,323 +56,184 @@ enum { REISWAITEN = 0x508, /* Reissue Wait Control*/ }; -#define SPIDER_CHIP_COUNT 4 -#define SPIDER_SRC_COUNT 64 -#define SPIDER_IRQ_INVALID 63 +static void __iomem *spider_pics[4]; -struct spider_pic { - struct irq_host *host; - struct device_node *of_node; - void __iomem *regs; - unsigned int node_id; -}; -static struct spider_pic spider_pics[SPIDER_CHIP_COUNT]; - -static struct spider_pic *spider_virq_to_pic(unsigned int virq) +static void __iomem *spider_get_pic(int irq) { - return irq_map[virq].host->host_data; + int node = irq / IIC_NODE_STRIDE; + irq %= IIC_NODE_STRIDE; + + if (irq >= IIC_EXT_OFFSET && + irq < IIC_EXT_OFFSET + IIC_NUM_EXT && + spider_pics) + return spider_pics[node]; + return NULL; } -static void __iomem *spider_get_irq_config(struct spider_pic *pic, - unsigned int src) +static int spider_get_nr(unsigned int irq) { - return pic->regs + TIR_CFGA + 8 * src; + return (irq % IIC_NODE_STRIDE) - IIC_EXT_OFFSET; } -static void spider_unmask_irq(unsigned int virq) +static void __iomem *spider_get_irq_config(int irq) { - struct spider_pic *pic = spider_virq_to_pic(virq); - void __iomem *cfg = spider_get_irq_config(pic, irq_map[virq].hwirq); - - out_be32(cfg, in_be32(cfg) | 0x30000000u); + void __iomem *pic; + pic = spider_get_pic(irq); + return pic + TIR_CFGA + 8 * spider_get_nr(irq); } -static void spider_mask_irq(unsigned int virq) +static void spider_enable_irq(unsigned int irq) { - struct spider_pic *pic = spider_virq_to_pic(virq); - void __iomem *cfg = spider_get_irq_config(pic, irq_map[virq].hwirq); + int nodeid = (irq / IIC_NODE_STRIDE) * 0x10; + void __iomem *cfg = spider_get_irq_config(irq); + irq = spider_get_nr(irq); - out_be32(cfg, in_be32(cfg) & ~0x30000000u); + out_be32(cfg, (in_be32(cfg) & ~0xf0)| 0x3107000eu | nodeid); + out_be32(cfg + 4, in_be32(cfg + 4) | 0x00020000u | irq); } -static void spider_ack_irq(unsigned int virq) +static void spider_disable_irq(unsigned int irq) { - struct spider_pic *pic = spider_virq_to_pic(virq); - unsigned int src = irq_map[virq].hwirq; - - /* Reset edge detection logic if necessary - */ - if (get_irq_desc(virq)->status & IRQ_LEVEL) - return; - - /* Only interrupts 47 to 50 can be set to edge */ - if (src < 47 || src > 50) - return; + void __iomem *cfg = spider_get_irq_config(irq); + irq = spider_get_nr(irq); - /* Perform the clear of the edge logic */ - out_be32(pic->regs + TIR_EDC, 0x100 | (src & 0xf)); + out_be32(cfg, in_be32(cfg) & ~0x30000000u); } -static int spider_set_irq_type(unsigned int virq, unsigned int type) +static unsigned int spider_startup_irq(unsigned int irq) { - unsigned int sense = type & IRQ_TYPE_SENSE_MASK; - struct spider_pic *pic = spider_virq_to_pic(virq); - unsigned int hw = irq_map[virq].hwirq; - void __iomem *cfg = spider_get_irq_config(pic, hw); - struct irq_desc *desc = get_irq_desc(virq); - u32 old_mask; - u32 ic; - - /* Note that only level high is supported for most interrupts */ - if (sense != IRQ_TYPE_NONE && sense != IRQ_TYPE_LEVEL_HIGH && - (hw < 47 || hw > 50)) - return -EINVAL; - - /* Decode sense type */ - switch(sense) { - case IRQ_TYPE_EDGE_RISING: - ic = 0x3; - break; - case IRQ_TYPE_EDGE_FALLING: - ic = 0x2; - break; - case IRQ_TYPE_LEVEL_LOW: - ic = 0x0; - break; - case IRQ_TYPE_LEVEL_HIGH: - case IRQ_TYPE_NONE: - ic = 0x1; - break; - default: - return -EINVAL; - } - - /* Update irq_desc */ - desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); - desc->status |= type & IRQ_TYPE_SENSE_MASK; - if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) - desc->status |= IRQ_LEVEL; - - /* Configure the source. One gross hack that was there before and - * that I've kept around is the priority to the BE which I set to - * be the same as the interrupt source number. I don't know wether - * that's supposed to make any kind of sense however, we'll have to - * decide that, but for now, I'm not changing the behaviour. - */ - old_mask = in_be32(cfg) & 0x30000000u; - out_be32(cfg, old_mask | (ic << 24) | (0x7 << 16) | - (pic->node_id << 4) | 0xe); - out_be32(cfg + 4, (0x2 << 16) | (hw & 0xff)); - + spider_enable_irq(irq); return 0; } -static struct irq_chip spider_pic = { - .typename = " SPIDER ", - .unmask = spider_unmask_irq, - .mask = spider_mask_irq, - .ack = spider_ack_irq, - .set_type = spider_set_irq_type, -}; - -static int spider_host_match(struct irq_host *h, struct device_node *node) +static void spider_shutdown_irq(unsigned int irq) { - struct spider_pic *pic = h->host_data; - return node == pic->of_node; + spider_disable_irq(irq); } -static int spider_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) +static void spider_end_irq(unsigned int irq) { - set_irq_chip_and_handler(virq, &spider_pic, handle_level_irq); - - /* Set default irq type */ - set_irq_type(virq, IRQ_TYPE_NONE); - - return 0; + spider_enable_irq(irq); } -static int spider_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) - +static void spider_ack_irq(unsigned int irq) { - /* Spider interrupts have 2 cells, first is the interrupt source, - * second, well, I don't know for sure yet ... We mask the top bits - * because old device-trees encode a node number in there - */ - *out_hwirq = intspec[0] & 0x3f; - *out_flags = IRQ_TYPE_LEVEL_HIGH; - return 0; + spider_disable_irq(irq); + iic_local_enable(); } -static struct irq_host_ops spider_host_ops = { - .match = spider_host_match, - .map = spider_host_map, - .xlate = spider_host_xlate, +static struct hw_interrupt_type spider_pic = { + .typename = " SPIDER ", + .startup = spider_startup_irq, + .shutdown = spider_shutdown_irq, + .enable = spider_enable_irq, + .disable = spider_disable_irq, + .ack = spider_ack_irq, + .end = spider_end_irq, }; -static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) +int spider_get_irq(int node) { - struct spider_pic *pic = desc->handler_data; - unsigned int cs, virq; + unsigned long cs; + void __iomem *regs = spider_pics[node]; + + cs = in_be32(regs + TIR_CS) >> 24; - cs = in_be32(pic->regs + TIR_CS) >> 24; - if (cs == SPIDER_IRQ_INVALID) - virq = NO_IRQ; + if (cs == 63) + return -1; else - virq = irq_linear_revmap(pic->host, cs); - if (virq != NO_IRQ) - generic_handle_irq(virq, regs); - desc->chip->eoi(irq); + return cs; } -/* For hooking up the cascace we have a problem. Our device-tree is - * crap and we don't know on which BE iic interrupt we are hooked on at - * least not the "standard" way. We can reconstitute it based on two - * informations though: which BE node we are connected to and wether - * we are connected to IOIF0 or IOIF1. Right now, we really only care - * about the IBM cell blade and we know that its firmware gives us an - * interrupt-map property which is pretty strange. - */ -static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) +/* hardcoded part to be compatible with older firmware */ + +void spider_init_IRQ_hardcoded(void) { - unsigned int virq; - u32 *imap, *tmp; - int imaplen, intsize, unit; - struct device_node *iic; - struct irq_host *iic_host; - -#if 0 /* Enable that when we have a way to retreive the node as well */ - /* First, we check wether we have a real "interrupts" in the device - * tree in case the device-tree is ever fixed - */ - struct of_irq oirq; - if (of_irq_map_one(pic->of_node, 0, &oirq) == 0) { - virq = irq_create_of_mapping(oirq.controller, oirq.specifier, - oirq.size); - goto bail; - } -#endif - - /* Now do the horrible hacks */ - tmp = (u32 *)get_property(pic->of_node, "#interrupt-cells", NULL); - if (tmp == NULL) - return NO_IRQ; - intsize = *tmp; - imap = (u32 *)get_property(pic->of_node, "interrupt-map", &imaplen); - if (imap == NULL || imaplen < (intsize + 1)) - return NO_IRQ; - iic = of_find_node_by_phandle(imap[intsize]); - if (iic == NULL) - return NO_IRQ; - imap += intsize + 1; - tmp = (u32 *)get_property(iic, "#interrupt-cells", NULL); - if (tmp == NULL) - return NO_IRQ; - intsize = *tmp; - /* Assume unit is last entry of interrupt specifier */ - unit = imap[intsize - 1]; - /* Ok, we have a unit, now let's try to get the node */ - tmp = (u32 *)get_property(iic, "ibm,interrupt-server-ranges", NULL); - if (tmp == NULL) { - of_node_put(iic); - return NO_IRQ; + int node; + long spiderpic; + long pics[] = { 0x24000008000, 0x34000008000 }; + int n; + + pr_debug("%s(%d): Using hardcoded defaults\n", __FUNCTION__, __LINE__); + + for (node = 0; node < num_present_cpus()/2; node++) { + spiderpic = pics[node]; + printk(KERN_DEBUG "SPIDER addr: %lx\n", spiderpic); + spider_pics[node] = ioremap(spiderpic, 0x800); + for (n = 0; n < IIC_NUM_EXT; n++) { + int irq = n + IIC_EXT_OFFSET + node * IIC_NODE_STRIDE; + get_irq_desc(irq)->handler = &spider_pic; + } + + /* do not mask any interrupts because of level */ + out_be32(spider_pics[node] + TIR_MSK, 0x0); + + /* disable edge detection clear */ + /* out_be32(spider_pics[node] + TIR_EDC, 0x0); */ + + /* enable interrupt packets to be output */ + out_be32(spider_pics[node] + TIR_PIEN, + in_be32(spider_pics[node] + TIR_PIEN) | 0x1); + + /* Enable the interrupt detection enable bit. Do this last! */ + out_be32(spider_pics[node] + TIR_DEN, + in_be32(spider_pics[node] + TIR_DEN) | 0x1); } - /* ugly as hell but works for now */ - pic->node_id = (*tmp) >> 1; - of_node_put(iic); - - /* Ok, now let's get cracking. You may ask me why I just didn't match - * the iic host from the iic OF node, but that way I'm still compatible - * with really really old old firmwares for which we don't have a node - */ - iic_host = iic_get_irq_host(pic->node_id); - if (iic_host == NULL) - return NO_IRQ; - /* Manufacture an IIC interrupt number of class 2 */ - virq = irq_create_mapping(iic_host, 0x20 | unit); - if (virq == NO_IRQ) - printk(KERN_ERR "spider_pic: failed to map cascade !"); - return virq; } - -static void __init spider_init_one(struct device_node *of_node, int chip, - unsigned long addr) +void spider_init_IRQ(void) { - struct spider_pic *pic = &spider_pics[chip]; - int i, virq; - - /* Map registers */ - pic->regs = ioremap(addr, 0x1000); - if (pic->regs == NULL) - panic("spider_pic: can't map registers !"); - - /* Allocate a host */ - pic->host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, SPIDER_SRC_COUNT, - &spider_host_ops, SPIDER_IRQ_INVALID); - if (pic->host == NULL) - panic("spider_pic: can't allocate irq host !"); - pic->host->host_data = pic; - - /* Fill out other bits */ - pic->of_node = of_node_get(of_node); - - /* Go through all sources and disable them */ - for (i = 0; i < SPIDER_SRC_COUNT; i++) { - void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; - out_be32(cfg, in_be32(cfg) & ~0x30000000u); - } + long spider_reg; + struct device_node *dn; + char *compatible; + int n, node = 0; - /* do not mask any interrupts because of level */ - out_be32(pic->regs + TIR_MSK, 0x0); + for (dn = NULL; (dn = of_find_node_by_name(dn, "interrupt-controller"));) { + compatible = (char *)get_property(dn, "compatible", NULL); - /* enable interrupt packets to be output */ - out_be32(pic->regs + TIR_PIEN, in_be32(pic->regs + TIR_PIEN) | 0x1); + if (!compatible) + continue; - /* Hook up the cascade interrupt to the iic and nodeid */ - virq = spider_find_cascade_and_node(pic); - if (virq == NO_IRQ) - return; - set_irq_data(virq, pic); - set_irq_chained_handler(virq, spider_irq_cascade); + if (strstr(compatible, "CBEA,platform-spider-pic")) + spider_reg = *(long *)get_property(dn,"reg", NULL); + else if (strstr(compatible, "sti,platform-spider-pic")) { + spider_init_IRQ_hardcoded(); + return; + } else + continue; - printk(KERN_INFO "spider_pic: node %d, addr: 0x%lx %s\n", - pic->node_id, addr, of_node->full_name); + if (!spider_reg) + printk("interrupt controller does not have reg property !\n"); - /* Enable the interrupt detection enable bit. Do this last! */ - out_be32(pic->regs + TIR_DEN, in_be32(pic->regs + TIR_DEN) | 0x1); -} + n = prom_n_addr_cells(dn); -void __init spider_init_IRQ(void) -{ - struct resource r; - struct device_node *dn; - int chip = 0; - - /* XXX node numbers are totally bogus. We _hope_ we get the device - * nodes in the right order here but that's definitely not guaranteed, - * we need to get the node from the device tree instead. - * There is currently no proper property for it (but our whole - * device-tree is bogus anyway) so all we can do is pray or maybe test - * the address and deduce the node-id - */ - for (dn = NULL; - (dn = of_find_node_by_name(dn, "interrupt-controller"));) { - if (device_is_compatible(dn, "CBEA,platform-spider-pic")) { - if (of_address_to_resource(dn, 0, &r)) { - printk(KERN_WARNING "spider-pic: Failed\n"); - continue; - } - } else if (device_is_compatible(dn, "sti,platform-spider-pic") - && (chip < 2)) { - static long hard_coded_pics[] = - { 0x24000008000, 0x34000008000 }; - r.start = hard_coded_pics[chip]; - } else - continue; - spider_init_one(dn, chip++, r.start); + if ( n != 2) + printk("reg property with invalid number of elements \n"); + + spider_pics[node] = ioremap(spider_reg, 0x800); + + printk("SPIDER addr: %lx with %i addr_cells mapped to %p\n", + spider_reg, n, spider_pics[node]); + + for (n = 0; n < IIC_NUM_EXT; n++) { + int irq = n + IIC_EXT_OFFSET + node * IIC_NODE_STRIDE; + get_irq_desc(irq)->handler = &spider_pic; + } + + /* do not mask any interrupts because of level */ + out_be32(spider_pics[node] + TIR_MSK, 0x0); + + /* disable edge detection clear */ + /* out_be32(spider_pics[node] + TIR_EDC, 0x0); */ + + /* enable interrupt packets to be output */ + out_be32(spider_pics[node] + TIR_PIEN, + in_be32(spider_pics[node] + TIR_PIEN) | 0x1); + + /* Enable the interrupt detection enable bit. Do this last! */ + out_be32(spider_pics[node] + TIR_DEN, + in_be32(spider_pics[node] + TIR_DEN) | 0x1); + + node++; } } diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index d06042deb..ad141fe8d 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c @@ -34,15 +34,10 @@ #include #include #include -#include #include #include "interrupt.h" -const struct spu_priv1_ops *spu_priv1_ops; - -EXPORT_SYMBOL_GPL(spu_priv1_ops); - static int __spu_trap_invalid_dma(struct spu *spu) { pr_debug("%s\n", __FUNCTION__); @@ -76,7 +71,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) { struct spu_priv2 __iomem *priv2 = spu->priv2; struct mm_struct *mm = spu->mm; - u64 esid, vsid, llp; + u64 esid, vsid; pr_debug("%s\n", __FUNCTION__); @@ -96,14 +91,9 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) } esid = (ea & ESID_MASK) | SLB_ESID_V; -#ifdef CONFIG_HUGETLB_PAGE + vsid = (get_vsid(mm->context.id, ea) << SLB_VSID_SHIFT) | SLB_VSID_USER; if (in_hugepage_area(mm->context, ea)) - llp = mmu_psize_defs[mmu_huge_psize].sllp; - else -#endif - llp = mmu_psize_defs[mmu_virtual_psize].sllp; - vsid = (get_vsid(mm->context.id, ea) << SLB_VSID_SHIFT) | - SLB_VSID_USER | llp; + vsid |= SLB_VSID_L; out_be64(&priv2->slb_index_W, spu->slb_replace); out_be64(&priv2->slb_vsid_RW, vsid); @@ -140,7 +130,57 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) spu->dar = ea; spu->dsisr = dsisr; mb(); - spu->stop_callback(spu); + if (spu->stop_callback) + spu->stop_callback(spu); + return 0; +} + +static int __spu_trap_mailbox(struct spu *spu) +{ + if (spu->ibox_callback) + spu->ibox_callback(spu); + + /* atomically disable SPU mailbox interrupts */ + spin_lock(&spu->register_lock); + spu_int_mask_and(spu, 2, ~0x1); + spin_unlock(&spu->register_lock); + return 0; +} + +static int __spu_trap_stop(struct spu *spu) +{ + pr_debug("%s\n", __FUNCTION__); + spu->stop_code = in_be32(&spu->problem->spu_status_R); + if (spu->stop_callback) + spu->stop_callback(spu); + return 0; +} + +static int __spu_trap_halt(struct spu *spu) +{ + pr_debug("%s\n", __FUNCTION__); + spu->stop_code = in_be32(&spu->problem->spu_status_R); + if (spu->stop_callback) + spu->stop_callback(spu); + return 0; +} + +static int __spu_trap_tag_group(struct spu *spu) +{ + pr_debug("%s\n", __FUNCTION__); + spu->mfc_callback(spu); + return 0; +} + +static int __spu_trap_spubox(struct spu *spu) +{ + if (spu->wbox_callback) + spu->wbox_callback(spu); + + /* atomically disable SPU mailbox interrupts */ + spin_lock(&spu->register_lock); + spu_int_mask_and(spu, 2, ~0x10); + spin_unlock(&spu->register_lock); return 0; } @@ -151,7 +191,8 @@ spu_irq_class_0(int irq, void *data, struct pt_regs *regs) spu = data; spu->class_0_pending = 1; - spu->stop_callback(spu); + if (spu->stop_callback) + spu->stop_callback(spu); return IRQ_HANDLED; } @@ -168,12 +209,12 @@ spu_irq_class_0_bottom(struct spu *spu) stat &= mask; - if (stat & 1) /* invalid DMA alignment */ - __spu_trap_dma_align(spu); - - if (stat & 2) /* invalid MFC DMA */ + if (stat & 1) /* invalid MFC DMA */ __spu_trap_invalid_dma(spu); + if (stat & 2) /* invalid DMA alignment */ + __spu_trap_dma_align(spu); + if (stat & 4) /* error on SPU */ __spu_trap_error(spu); @@ -229,92 +270,77 @@ spu_irq_class_2(int irq, void *data, struct pt_regs *regs) unsigned long mask; spu = data; - spin_lock(&spu->register_lock); stat = spu_int_stat_get(spu, 2); mask = spu_int_mask_get(spu, 2); - /* ignore interrupts we're not waiting for */ - stat &= mask; - /* - * mailbox interrupts (0x1 and 0x10) are level triggered. - * mask them now before acknowledging. - */ - if (stat & 0x11) - spu_int_mask_and(spu, 2, ~(stat & 0x11)); - /* acknowledge all interrupts before the callbacks */ - spu_int_stat_clear(spu, 2, stat); - spin_unlock(&spu->register_lock); pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask); + stat &= mask; + if (stat & 1) /* PPC core mailbox */ - spu->ibox_callback(spu); + __spu_trap_mailbox(spu); if (stat & 2) /* SPU stop-and-signal */ - spu->stop_callback(spu); + __spu_trap_stop(spu); if (stat & 4) /* SPU halted */ - spu->stop_callback(spu); + __spu_trap_halt(spu); if (stat & 8) /* DMA tag group complete */ - spu->mfc_callback(spu); + __spu_trap_tag_group(spu); if (stat & 0x10) /* SPU mailbox threshold */ - spu->wbox_callback(spu); + __spu_trap_spubox(spu); + spu_int_stat_clear(spu, 2, stat); return stat ? IRQ_HANDLED : IRQ_NONE; } -static int spu_request_irqs(struct spu *spu) +static int +spu_request_irqs(struct spu *spu) { - int ret = 0; + int ret; + int irq_base; - if (spu->irqs[0] != NO_IRQ) { - snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", - spu->number); - ret = request_irq(spu->irqs[0], spu_irq_class_0, - IRQF_DISABLED, - spu->irq_c0, spu); - if (ret) - goto bail0; - } - if (spu->irqs[1] != NO_IRQ) { - snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", - spu->number); - ret = request_irq(spu->irqs[1], spu_irq_class_1, - IRQF_DISABLED, - spu->irq_c1, spu); - if (ret) - goto bail1; - } - if (spu->irqs[2] != NO_IRQ) { - snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", - spu->number); - ret = request_irq(spu->irqs[2], spu_irq_class_2, - IRQF_DISABLED, - spu->irq_c2, spu); - if (ret) - goto bail2; - } - return 0; + irq_base = IIC_NODE_STRIDE * spu->node + IIC_SPE_OFFSET; -bail2: - if (spu->irqs[1] != NO_IRQ) - free_irq(spu->irqs[1], spu); -bail1: - if (spu->irqs[0] != NO_IRQ) - free_irq(spu->irqs[0], spu); -bail0: + snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number); + ret = request_irq(irq_base + spu->isrc, + spu_irq_class_0, SA_INTERRUPT, spu->irq_c0, spu); + if (ret) + goto out; + + snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number); + ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, + spu_irq_class_1, SA_INTERRUPT, spu->irq_c1, spu); + if (ret) + goto out1; + + snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number); + ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, + spu_irq_class_2, SA_INTERRUPT, spu->irq_c2, spu); + if (ret) + goto out2; + goto out; + +out2: + free_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, spu); +out1: + free_irq(irq_base + spu->isrc, spu); +out: return ret; } -static void spu_free_irqs(struct spu *spu) +static void +spu_free_irqs(struct spu *spu) { - if (spu->irqs[0] != NO_IRQ) - free_irq(spu->irqs[0], spu); - if (spu->irqs[1] != NO_IRQ) - free_irq(spu->irqs[1], spu); - if (spu->irqs[2] != NO_IRQ) - free_irq(spu->irqs[2], spu); + int irq_base; + + irq_base = IIC_NODE_STRIDE * spu->node + IIC_SPE_OFFSET; + + free_irq(irq_base + spu->isrc, spu); + free_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, spu); + free_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, spu); } static LIST_HEAD(spu_list); @@ -486,6 +512,14 @@ int spu_irq_class_1_bottom(struct spu *spu) return ret; } +void spu_irq_setaffinity(struct spu *spu, int cpu) +{ + u64 target = iic_get_target_id(cpu); + u64 route = target << 48 | target << 32 | target << 16; + spu_int_route_set(spu, route); +} +EXPORT_SYMBOL_GPL(spu_irq_setaffinity); + static int __init find_spu_node_id(struct device_node *spe) { unsigned int *id; @@ -565,38 +599,17 @@ static void spu_unmap(struct spu *spu) iounmap((u8 __iomem *)spu->local_store); } -/* This function shall be abstracted for HV platforms */ -static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) -{ - struct irq_host *host; - unsigned int isrc; - u32 *tmp; - - host = iic_get_irq_host(spu->node); - if (host == NULL) - return -ENODEV; - - /* Get the interrupt source from the device-tree */ - tmp = (u32 *)get_property(np, "isrc", NULL); - if (!tmp) - return -ENODEV; - spu->isrc = isrc = tmp[0]; - - /* Now map interrupts of all 3 classes */ - spu->irqs[0] = irq_create_mapping(host, 0x00 | isrc); - spu->irqs[1] = irq_create_mapping(host, 0x10 | isrc); - spu->irqs[2] = irq_create_mapping(host, 0x20 | isrc); - - /* Right now, we only fail if class 2 failed */ - return spu->irqs[2] == NO_IRQ ? -EINVAL : 0; -} - static int __init spu_map_device(struct spu *spu, struct device_node *node) { char *prop; int ret; ret = -ENODEV; + prop = get_property(node, "isrc", NULL); + if (!prop) + goto out; + spu->isrc = *(unsigned int *)prop; + spu->name = get_property(node, "name", NULL); if (!spu->name) goto out; @@ -636,47 +649,6 @@ out: return ret; } -struct sysdev_class spu_sysdev_class = { - set_kset_name("spu") -}; - -static ssize_t spu_show_isrc(struct sys_device *sysdev, char *buf) -{ - struct spu *spu = container_of(sysdev, struct spu, sysdev); - return sprintf(buf, "%d\n", spu->isrc); - -} -static SYSDEV_ATTR(isrc, 0400, spu_show_isrc, NULL); - -extern int attach_sysdev_to_node(struct sys_device *dev, int nid); - -static int spu_create_sysdev(struct spu *spu) -{ - int ret; - - spu->sysdev.id = spu->number; - spu->sysdev.cls = &spu_sysdev_class; - ret = sysdev_register(&spu->sysdev); - if (ret) { - printk(KERN_ERR "Can't register SPU %d with sysfs\n", - spu->number); - return ret; - } - - if (spu->isrc != 0) - sysdev_create_file(&spu->sysdev, &attr_isrc); - sysfs_add_device_to_node(&spu->sysdev, spu->nid); - - return 0; -} - -static void spu_destroy_sysdev(struct spu *spu) -{ - sysdev_remove_file(&spu->sysdev, &attr_isrc); - sysfs_remove_device_from_node(&spu->sysdev, spu->nid); - sysdev_unregister(&spu->sysdev); -} - static int __init create_spu(struct device_node *spe) { struct spu *spu; @@ -684,7 +656,7 @@ static int __init create_spu(struct device_node *spe) static int number; ret = -ENOMEM; - spu = kzalloc(sizeof (*spu), GFP_KERNEL); + spu = kmalloc(sizeof (*spu), GFP_KERNEL); if (!spu) goto out; @@ -696,23 +668,33 @@ static int __init create_spu(struct device_node *spe) spu->nid = of_node_to_nid(spe); if (spu->nid == -1) spu->nid = 0; - ret = spu_map_interrupts(spu, spe); - if (ret) - goto out_unmap; + + spu->stop_code = 0; + spu->slb_replace = 0; + spu->mm = NULL; + spu->ctx = NULL; + spu->rq = NULL; + spu->pid = 0; + spu->class_0_pending = 0; + spu->flags = 0UL; + spu->dar = 0UL; + spu->dsisr = 0UL; spin_lock_init(&spu->register_lock); + spu_mfc_sdr_set(spu, mfspr(SPRN_SDR1)); spu_mfc_sr1_set(spu, 0x33); - mutex_lock(&spu_mutex); + spu->ibox_callback = NULL; + spu->wbox_callback = NULL; + spu->stop_callback = NULL; + spu->mfc_callback = NULL; + + mutex_lock(&spu_mutex); spu->number = number++; ret = spu_request_irqs(spu); if (ret) goto out_unmap; - ret = spu_create_sysdev(spu); - if (ret) - goto out_free_irqs; - list_add(&spu->list, &spu_list); mutex_unlock(&spu_mutex); @@ -721,9 +703,6 @@ static int __init create_spu(struct device_node *spe) spu->problem, spu->priv1, spu->priv2, spu->number); goto out; -out_free_irqs: - spu_free_irqs(spu); - out_unmap: mutex_unlock(&spu_mutex); spu_unmap(spu); @@ -737,7 +716,6 @@ static void destroy_spu(struct spu *spu) { list_del_init(&spu->list); - spu_destroy_sysdev(spu); spu_free_irqs(spu); spu_unmap(spu); kfree(spu); @@ -750,7 +728,6 @@ static void cleanup_spu_base(void) list_for_each_entry_safe(spu, tmp, &spu_list, list) destroy_spu(spu); mutex_unlock(&spu_mutex); - sysdev_class_unregister(&spu_sysdev_class); } module_exit(cleanup_spu_base); @@ -759,11 +736,6 @@ static int __init init_spu_base(void) struct device_node *node; int ret; - /* create sysdev class for spus */ - ret = sysdev_class_register(&spu_sysdev_class); - if (ret) - return ret; - ret = -ENODEV; for (node = of_find_node_by_type(NULL, "spe"); node; node = of_find_node_by_type(node, "spe")) { diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c index 47ec3be3e..b47fcc5dd 100644 --- a/arch/powerpc/platforms/cell/spu_callbacks.c +++ b/arch/powerpc/platforms/cell/spu_callbacks.c @@ -34,19 +34,307 @@ */ void *spu_syscall_table[] = { -#define SYSCALL(func) sys_ni_syscall, -#define COMPAT_SYS(func) sys_ni_syscall, -#define PPC_SYS(func) sys_ni_syscall, -#define OLDSYS(func) sys_ni_syscall, -#define SYS32ONLY(func) sys_ni_syscall, -#define SYSX(f, f3264, f32) sys_ni_syscall, - -#define SYSCALL_SPU(func) sys_##func, -#define COMPAT_SYS_SPU(func) sys_##func, -#define PPC_SYS_SPU(func) ppc_##func, -#define SYSX_SPU(f, f3264, f32) f, - -#include + [__NR_restart_syscall] sys_ni_syscall, /* sys_restart_syscall */ + [__NR_exit] sys_ni_syscall, /* sys_exit */ + [__NR_fork] sys_ni_syscall, /* ppc_fork */ + [__NR_read] sys_read, + [__NR_write] sys_write, + [__NR_open] sys_open, + [__NR_close] sys_close, + [__NR_waitpid] sys_waitpid, + [__NR_creat] sys_creat, + [__NR_link] sys_link, + [__NR_unlink] sys_unlink, + [__NR_execve] sys_ni_syscall, /* sys_execve */ + [__NR_chdir] sys_chdir, + [__NR_time] sys_time, + [__NR_mknod] sys_mknod, + [__NR_chmod] sys_chmod, + [__NR_lchown] sys_lchown, + [__NR_break] sys_ni_syscall, + [__NR_oldstat] sys_ni_syscall, + [__NR_lseek] sys_lseek, + [__NR_getpid] sys_getpid, + [__NR_mount] sys_ni_syscall, /* sys_mount */ + [__NR_umount] sys_ni_syscall, + [__NR_setuid] sys_setuid, + [__NR_getuid] sys_getuid, + [__NR_stime] sys_stime, + [__NR_ptrace] sys_ni_syscall, /* sys_ptrace */ + [__NR_alarm] sys_alarm, + [__NR_oldfstat] sys_ni_syscall, + [__NR_pause] sys_ni_syscall, /* sys_pause */ + [__NR_utime] sys_ni_syscall, /* sys_utime */ + [__NR_stty] sys_ni_syscall, + [__NR_gtty] sys_ni_syscall, + [__NR_access] sys_access, + [__NR_nice] sys_nice, + [__NR_ftime] sys_ni_syscall, + [__NR_sync] sys_sync, + [__NR_kill] sys_kill, + [__NR_rename] sys_rename, + [__NR_mkdir] sys_mkdir, + [__NR_rmdir] sys_rmdir, + [__NR_dup] sys_dup, + [__NR_pipe] sys_pipe, + [__NR_times] sys_times, + [__NR_prof] sys_ni_syscall, + [__NR_brk] sys_brk, + [__NR_setgid] sys_setgid, + [__NR_getgid] sys_getgid, + [__NR_signal] sys_ni_syscall, /* sys_signal */ + [__NR_geteuid] sys_geteuid, + [__NR_getegid] sys_getegid, + [__NR_acct] sys_ni_syscall, /* sys_acct */ + [__NR_umount2] sys_ni_syscall, /* sys_umount */ + [__NR_lock] sys_ni_syscall, + [__NR_ioctl] sys_ioctl, + [__NR_fcntl] sys_fcntl, + [__NR_mpx] sys_ni_syscall, + [__NR_setpgid] sys_setpgid, + [__NR_ulimit] sys_ni_syscall, + [__NR_oldolduname] sys_ni_syscall, + [__NR_umask] sys_umask, + [__NR_chroot] sys_chroot, + [__NR_ustat] sys_ni_syscall, /* sys_ustat */ + [__NR_dup2] sys_dup2, + [__NR_getppid] sys_getppid, + [__NR_getpgrp] sys_getpgrp, + [__NR_setsid] sys_setsid, + [__NR_sigaction] sys_ni_syscall, + [__NR_sgetmask] sys_sgetmask, + [__NR_ssetmask] sys_ssetmask, + [__NR_setreuid] sys_setreuid, + [__NR_setregid] sys_setregid, + [__NR_sigsuspend] sys_ni_syscall, + [__NR_sigpending] sys_ni_syscall, + [__NR_sethostname] sys_sethostname, + [__NR_setrlimit] sys_setrlimit, + [__NR_getrlimit] sys_ni_syscall, + [__NR_getrusage] sys_getrusage, + [__NR_gettimeofday] sys_gettimeofday, + [__NR_settimeofday] sys_settimeofday, + [__NR_getgroups] sys_getgroups, + [__NR_setgroups] sys_setgroups, + [__NR_select] sys_ni_syscall, + [__NR_symlink] sys_symlink, + [__NR_oldlstat] sys_ni_syscall, + [__NR_readlink] sys_readlink, + [__NR_uselib] sys_ni_syscall, /* sys_uselib */ + [__NR_swapon] sys_ni_syscall, /* sys_swapon */ + [__NR_reboot] sys_ni_syscall, /* sys_reboot */ + [__NR_readdir] sys_ni_syscall, + [__NR_mmap] sys_mmap, + [__NR_munmap] sys_munmap, + [__NR_truncate] sys_truncate, + [__NR_ftruncate] sys_ftruncate, + [__NR_fchmod] sys_fchmod, + [__NR_fchown] sys_fchown, + [__NR_getpriority] sys_getpriority, + [__NR_setpriority] sys_setpriority, + [__NR_profil] sys_ni_syscall, + [__NR_statfs] sys_ni_syscall, /* sys_statfs */ + [__NR_fstatfs] sys_ni_syscall, /* sys_fstatfs */ + [__NR_ioperm] sys_ni_syscall, + [__NR_socketcall] sys_socketcall, + [__NR_syslog] sys_syslog, + [__NR_setitimer] sys_setitimer, + [__NR_getitimer] sys_getitimer, + [__NR_stat] sys_newstat, + [__NR_lstat] sys_newlstat, + [__NR_fstat] sys_newfstat, + [__NR_olduname] sys_ni_syscall, + [__NR_iopl] sys_ni_syscall, + [__NR_vhangup] sys_vhangup, + [__NR_idle] sys_ni_syscall, + [__NR_vm86] sys_ni_syscall, + [__NR_wait4] sys_wait4, + [__NR_swapoff] sys_ni_syscall, /* sys_swapoff */ + [__NR_sysinfo] sys_sysinfo, + [__NR_ipc] sys_ni_syscall, /* sys_ipc */ + [__NR_fsync] sys_fsync, + [__NR_sigreturn] sys_ni_syscall, + [__NR_clone] sys_ni_syscall, /* ppc_clone */ + [__NR_setdomainname] sys_setdomainname, + [__NR_uname] ppc_newuname, + [__NR_modify_ldt] sys_ni_syscall, + [__NR_adjtimex] sys_adjtimex, + [__NR_mprotect] sys_mprotect, + [__NR_sigprocmask] sys_ni_syscall, + [__NR_create_module] sys_ni_syscall, + [__NR_init_module] sys_ni_syscall, /* sys_init_module */ + [__NR_delete_module] sys_ni_syscall, /* sys_delete_module */ + [__NR_get_kernel_syms] sys_ni_syscall, + [__NR_quotactl] sys_ni_syscall, /* sys_quotactl */ + [__NR_getpgid] sys_getpgid, + [__NR_fchdir] sys_fchdir, + [__NR_bdflush] sys_bdflush, + [__NR_sysfs] sys_ni_syscall, /* sys_sysfs */ + [__NR_personality] ppc64_personality, + [__NR_afs_syscall] sys_ni_syscall, + [__NR_setfsuid] sys_setfsuid, + [__NR_setfsgid] sys_setfsgid, + [__NR__llseek] sys_llseek, + [__NR_getdents] sys_getdents, + [__NR__newselect] sys_select, + [__NR_flock] sys_flock, + [__NR_msync] sys_msync, + [__NR_readv] sys_readv, + [__NR_writev] sys_writev, + [__NR_getsid] sys_getsid, + [__NR_fdatasync] sys_fdatasync, + [__NR__sysctl] sys_ni_syscall, /* sys_sysctl */ + [__NR_mlock] sys_mlock, + [__NR_munlock] sys_munlock, + [__NR_mlockall] sys_mlockall, + [__NR_munlockall] sys_munlockall, + [__NR_sched_setparam] sys_sched_setparam, + [__NR_sched_getparam] sys_sched_getparam, + [__NR_sched_setscheduler] sys_sched_setscheduler, + [__NR_sched_getscheduler] sys_sched_getscheduler, + [__NR_sched_yield] sys_sched_yield, + [__NR_sched_get_priority_max] sys_sched_get_priority_max, + [__NR_sched_get_priority_min] sys_sched_get_priority_min, + [__NR_sched_rr_get_interval] sys_sched_rr_get_interval, + [__NR_nanosleep] sys_nanosleep, + [__NR_mremap] sys_mremap, + [__NR_setresuid] sys_setresuid, + [__NR_getresuid] sys_getresuid, + [__NR_query_module] sys_ni_syscall, + [__NR_poll] sys_poll, + [__NR_nfsservctl] sys_ni_syscall, /* sys_nfsservctl */ + [__NR_setresgid] sys_setresgid, + [__NR_getresgid] sys_getresgid, + [__NR_prctl] sys_prctl, + [__NR_rt_sigreturn] sys_ni_syscall, /* ppc64_rt_sigreturn */ + [__NR_rt_sigaction] sys_ni_syscall, /* sys_rt_sigaction */ + [__NR_rt_sigprocmask] sys_ni_syscall, /* sys_rt_sigprocmask */ + [__NR_rt_sigpending] sys_ni_syscall, /* sys_rt_sigpending */ + [__NR_rt_sigtimedwait] sys_ni_syscall, /* sys_rt_sigtimedwait */ + [__NR_rt_sigqueueinfo] sys_ni_syscall, /* sys_rt_sigqueueinfo */ + [__NR_rt_sigsuspend] sys_ni_syscall, /* sys_rt_sigsuspend */ + [__NR_pread64] sys_pread64, + [__NR_pwrite64] sys_pwrite64, + [__NR_chown] sys_chown, + [__NR_getcwd] sys_getcwd, + [__NR_capget] sys_capget, + [__NR_capset] sys_capset, + [__NR_sigaltstack] sys_ni_syscall, /* sys_sigaltstack */ + [__NR_sendfile] sys_sendfile64, + [__NR_getpmsg] sys_ni_syscall, + [__NR_putpmsg] sys_ni_syscall, + [__NR_vfork] sys_ni_syscall, /* ppc_vfork */ + [__NR_ugetrlimit] sys_getrlimit, + [__NR_readahead] sys_readahead, + [192] sys_ni_syscall, + [193] sys_ni_syscall, + [194] sys_ni_syscall, + [195] sys_ni_syscall, + [196] sys_ni_syscall, + [197] sys_ni_syscall, + [__NR_pciconfig_read] sys_ni_syscall, /* sys_pciconfig_read */ + [__NR_pciconfig_write] sys_ni_syscall, /* sys_pciconfig_write */ + [__NR_pciconfig_iobase] sys_ni_syscall, /* sys_pciconfig_iobase */ + [__NR_multiplexer] sys_ni_syscall, + [__NR_getdents64] sys_getdents64, + [__NR_pivot_root] sys_pivot_root, + [204] sys_ni_syscall, + [__NR_madvise] sys_madvise, + [__NR_mincore] sys_mincore, + [__NR_gettid] sys_gettid, + [__NR_tkill] sys_tkill, + [__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_futex] sys_futex, + [__NR_sched_setaffinity] sys_sched_setaffinity, + [__NR_sched_getaffinity] sys_sched_getaffinity, + [224] sys_ni_syscall, + [__NR_tuxcall] sys_ni_syscall, + [226] 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_set_tid_address] sys_ni_syscall, /* sys_set_tid_address */ + [__NR_fadvise64] sys_fadvise64, + [__NR_exit_group] sys_ni_syscall, /* sys_exit_group */ + [__NR_lookup_dcookie] sys_ni_syscall, /* sys_lookup_dcookie */ + [__NR_epoll_create] sys_epoll_create, + [__NR_epoll_ctl] sys_epoll_ctl, + [__NR_epoll_wait] sys_epoll_wait, + [__NR_remap_file_pages] sys_remap_file_pages, + [__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_swapcontext] sys_ni_syscall, /* ppc64_swapcontext */ + [__NR_tgkill] sys_tgkill, + [__NR_utimes] sys_utimes, + [__NR_statfs64] sys_statfs64, + [__NR_fstatfs64] sys_fstatfs64, + [254] sys_ni_syscall, + [__NR_rtas] ppc_rtas, + [256] sys_ni_syscall, + [257] sys_ni_syscall, + [258] sys_ni_syscall, + [__NR_mbind] sys_ni_syscall, /* sys_mbind */ + [__NR_get_mempolicy] sys_ni_syscall, /* sys_get_mempolicy */ + [__NR_set_mempolicy] sys_ni_syscall, /* sys_set_mempolicy */ + [__NR_mq_open] sys_ni_syscall, /* sys_mq_open */ + [__NR_mq_unlink] sys_ni_syscall, /* sys_mq_unlink */ + [__NR_mq_timedsend] sys_ni_syscall, /* sys_mq_timedsend */ + [__NR_mq_timedreceive] sys_ni_syscall, /* sys_mq_timedreceive */ + [__NR_mq_notify] sys_ni_syscall, /* sys_mq_notify */ + [__NR_mq_getsetattr] sys_ni_syscall, /* sys_mq_getsetattr */ + [__NR_kexec_load] sys_ni_syscall, /* sys_kexec_load */ + [__NR_add_key] sys_ni_syscall, /* sys_add_key */ + [__NR_request_key] sys_ni_syscall, /* sys_request_key */ + [__NR_keyctl] sys_ni_syscall, /* sys_keyctl */ + [__NR_waitid] sys_ni_syscall, /* sys_waitid */ + [__NR_ioprio_set] sys_ni_syscall, /* sys_ioprio_set */ + [__NR_ioprio_get] sys_ni_syscall, /* sys_ioprio_get */ + [__NR_inotify_init] sys_ni_syscall, /* sys_inotify_init */ + [__NR_inotify_add_watch] sys_ni_syscall, /* sys_inotify_add_watch */ + [__NR_inotify_rm_watch] sys_ni_syscall, /* sys_inotify_rm_watch */ + [__NR_spu_run] sys_ni_syscall, /* sys_spu_run */ + [__NR_spu_create] sys_ni_syscall, /* sys_spu_create */ + [__NR_pselect6] sys_ni_syscall, /* sys_pselect */ + [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */ + [__NR_unshare] sys_unshare, + [__NR_splice] sys_splice, + [__NR_tee] sys_tee, + [__NR_vmsplice] sys_vmsplice, + [__NR_openat] sys_openat, + [__NR_mkdirat] sys_mkdirat, + [__NR_mknodat] sys_mknodat, + [__NR_fchownat] sys_fchownat, + [__NR_futimesat] sys_futimesat, + [__NR_newfstatat] sys_newfstatat, + [__NR_unlinkat] sys_unlinkat, + [__NR_renameat] sys_renameat, + [__NR_linkat] sys_linkat, + [__NR_symlinkat] sys_symlinkat, + [__NR_readlinkat] sys_readlinkat, + [__NR_fchmodat] sys_fchmodat, + [__NR_faccessat] sys_faccessat, + [__NR_get_robust_list] sys_get_robust_list, + [__NR_set_robust_list] sys_set_robust_list, }; long spu_sys_callback(struct spu_syscall_block *s) diff --git a/arch/powerpc/platforms/cell/spu_priv1.c b/arch/powerpc/platforms/cell/spu_priv1.c new file mode 100644 index 000000000..b2656421c --- /dev/null +++ b/arch/powerpc/platforms/cell/spu_priv1.c @@ -0,0 +1,133 @@ +/* + * access to SPU privileged registers + */ +#include + +#include +#include + +void spu_int_mask_and(struct spu *spu, int class, u64 mask) +{ + u64 old_mask; + + old_mask = in_be64(&spu->priv1->int_mask_RW[class]); + out_be64(&spu->priv1->int_mask_RW[class], old_mask & mask); +} +EXPORT_SYMBOL_GPL(spu_int_mask_and); + +void spu_int_mask_or(struct spu *spu, int class, u64 mask) +{ + u64 old_mask; + + old_mask = in_be64(&spu->priv1->int_mask_RW[class]); + out_be64(&spu->priv1->int_mask_RW[class], old_mask | mask); +} +EXPORT_SYMBOL_GPL(spu_int_mask_or); + +void spu_int_mask_set(struct spu *spu, int class, u64 mask) +{ + out_be64(&spu->priv1->int_mask_RW[class], mask); +} +EXPORT_SYMBOL_GPL(spu_int_mask_set); + +u64 spu_int_mask_get(struct spu *spu, int class) +{ + return in_be64(&spu->priv1->int_mask_RW[class]); +} +EXPORT_SYMBOL_GPL(spu_int_mask_get); + +void spu_int_stat_clear(struct spu *spu, int class, u64 stat) +{ + out_be64(&spu->priv1->int_stat_RW[class], stat); +} +EXPORT_SYMBOL_GPL(spu_int_stat_clear); + +u64 spu_int_stat_get(struct spu *spu, int class) +{ + return in_be64(&spu->priv1->int_stat_RW[class]); +} +EXPORT_SYMBOL_GPL(spu_int_stat_get); + +void spu_int_route_set(struct spu *spu, u64 route) +{ + out_be64(&spu->priv1->int_route_RW, route); +} +EXPORT_SYMBOL_GPL(spu_int_route_set); + +u64 spu_mfc_dar_get(struct spu *spu) +{ + return in_be64(&spu->priv1->mfc_dar_RW); +} +EXPORT_SYMBOL_GPL(spu_mfc_dar_get); + +u64 spu_mfc_dsisr_get(struct spu *spu) +{ + return in_be64(&spu->priv1->mfc_dsisr_RW); +} +EXPORT_SYMBOL_GPL(spu_mfc_dsisr_get); + +void spu_mfc_dsisr_set(struct spu *spu, u64 dsisr) +{ + out_be64(&spu->priv1->mfc_dsisr_RW, dsisr); +} +EXPORT_SYMBOL_GPL(spu_mfc_dsisr_set); + +void spu_mfc_sdr_set(struct spu *spu, u64 sdr) +{ + out_be64(&spu->priv1->mfc_sdr_RW, sdr); +} +EXPORT_SYMBOL_GPL(spu_mfc_sdr_set); + +void spu_mfc_sr1_set(struct spu *spu, u64 sr1) +{ + out_be64(&spu->priv1->mfc_sr1_RW, sr1); +} +EXPORT_SYMBOL_GPL(spu_mfc_sr1_set); + +u64 spu_mfc_sr1_get(struct spu *spu) +{ + return in_be64(&spu->priv1->mfc_sr1_RW); +} +EXPORT_SYMBOL_GPL(spu_mfc_sr1_get); + +void spu_mfc_tclass_id_set(struct spu *spu, u64 tclass_id) +{ + out_be64(&spu->priv1->mfc_tclass_id_RW, tclass_id); +} +EXPORT_SYMBOL_GPL(spu_mfc_tclass_id_set); + +u64 spu_mfc_tclass_id_get(struct spu *spu) +{ + return in_be64(&spu->priv1->mfc_tclass_id_RW); +} +EXPORT_SYMBOL_GPL(spu_mfc_tclass_id_get); + +void spu_tlb_invalidate(struct spu *spu) +{ + out_be64(&spu->priv1->tlb_invalidate_entry_W, 0ul); +} +EXPORT_SYMBOL_GPL(spu_tlb_invalidate); + +void spu_resource_allocation_groupID_set(struct spu *spu, u64 id) +{ + out_be64(&spu->priv1->resource_allocation_groupID_RW, id); +} +EXPORT_SYMBOL_GPL(spu_resource_allocation_groupID_set); + +u64 spu_resource_allocation_groupID_get(struct spu *spu) +{ + return in_be64(&spu->priv1->resource_allocation_groupID_RW); +} +EXPORT_SYMBOL_GPL(spu_resource_allocation_groupID_get); + +void spu_resource_allocation_enable_set(struct spu *spu, u64 enable) +{ + out_be64(&spu->priv1->resource_allocation_enable_RW, enable); +} +EXPORT_SYMBOL_GPL(spu_resource_allocation_enable_set); + +u64 spu_resource_allocation_enable_get(struct spu *spu) +{ + return in_be64(&spu->priv1->resource_allocation_enable_RW); +} +EXPORT_SYMBOL_GPL(spu_resource_allocation_enable_get); diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c deleted file mode 100644 index 71b69f0a1..000000000 --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * spu hypervisor abstraction for direct hardware access. - * - * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 - * Copyright 2006 Sony Corp. - * - * 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; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include -#include -#include - -#include "interrupt.h" - -static void int_mask_and(struct spu *spu, int class, u64 mask) -{ - u64 old_mask; - - old_mask = in_be64(&spu->priv1->int_mask_RW[class]); - out_be64(&spu->priv1->int_mask_RW[class], old_mask & mask); -} - -static void int_mask_or(struct spu *spu, int class, u64 mask) -{ - u64 old_mask; - - old_mask = in_be64(&spu->priv1->int_mask_RW[class]); - out_be64(&spu->priv1->int_mask_RW[class], old_mask | mask); -} - -static void int_mask_set(struct spu *spu, int class, u64 mask) -{ - out_be64(&spu->priv1->int_mask_RW[class], mask); -} - -static u64 int_mask_get(struct spu *spu, int class) -{ - return in_be64(&spu->priv1->int_mask_RW[class]); -} - -static void int_stat_clear(struct spu *spu, int class, u64 stat) -{ - out_be64(&spu->priv1->int_stat_RW[class], stat); -} - -static u64 int_stat_get(struct spu *spu, int class) -{ - return in_be64(&spu->priv1->int_stat_RW[class]); -} - -static void cpu_affinity_set(struct spu *spu, int cpu) -{ - u64 target = iic_get_target_id(cpu); - u64 route = target << 48 | target << 32 | target << 16; - out_be64(&spu->priv1->int_route_RW, route); -} - -static u64 mfc_dar_get(struct spu *spu) -{ - return in_be64(&spu->priv1->mfc_dar_RW); -} - -static u64 mfc_dsisr_get(struct spu *spu) -{ - return in_be64(&spu->priv1->mfc_dsisr_RW); -} - -static void mfc_dsisr_set(struct spu *spu, u64 dsisr) -{ - out_be64(&spu->priv1->mfc_dsisr_RW, dsisr); -} - -static void mfc_sdr_set(struct spu *spu, u64 sdr) -{ - out_be64(&spu->priv1->mfc_sdr_RW, sdr); -} - -static void mfc_sr1_set(struct spu *spu, u64 sr1) -{ - out_be64(&spu->priv1->mfc_sr1_RW, sr1); -} - -static u64 mfc_sr1_get(struct spu *spu) -{ - return in_be64(&spu->priv1->mfc_sr1_RW); -} - -static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id) -{ - out_be64(&spu->priv1->mfc_tclass_id_RW, tclass_id); -} - -static u64 mfc_tclass_id_get(struct spu *spu) -{ - return in_be64(&spu->priv1->mfc_tclass_id_RW); -} - -static void tlb_invalidate(struct spu *spu) -{ - out_be64(&spu->priv1->tlb_invalidate_entry_W, 0ul); -} - -static void resource_allocation_groupID_set(struct spu *spu, u64 id) -{ - out_be64(&spu->priv1->resource_allocation_groupID_RW, id); -} - -static u64 resource_allocation_groupID_get(struct spu *spu) -{ - return in_be64(&spu->priv1->resource_allocation_groupID_RW); -} - -static void resource_allocation_enable_set(struct spu *spu, u64 enable) -{ - out_be64(&spu->priv1->resource_allocation_enable_RW, enable); -} - -static u64 resource_allocation_enable_get(struct spu *spu) -{ - return in_be64(&spu->priv1->resource_allocation_enable_RW); -} - -const struct spu_priv1_ops spu_priv1_mmio_ops = -{ - .int_mask_and = int_mask_and, - .int_mask_or = int_mask_or, - .int_mask_set = int_mask_set, - .int_mask_get = int_mask_get, - .int_stat_clear = int_stat_clear, - .int_stat_get = int_stat_get, - .cpu_affinity_set = cpu_affinity_set, - .mfc_dar_get = mfc_dar_get, - .mfc_dsisr_get = mfc_dsisr_get, - .mfc_dsisr_set = mfc_dsisr_set, - .mfc_sdr_set = mfc_sdr_set, - .mfc_sr1_set = mfc_sr1_set, - .mfc_sr1_get = mfc_sr1_get, - .mfc_tclass_id_set = mfc_tclass_id_set, - .mfc_tclass_id_get = mfc_tclass_id_get, - .tlb_invalidate = tlb_invalidate, - .resource_allocation_groupID_set = resource_allocation_groupID_set, - .resource_allocation_groupID_get = resource_allocation_groupID_get, - .resource_allocation_enable_set = resource_allocation_enable_set, - .resource_allocation_enable_get = resource_allocation_enable_get, -}; diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile index bb5dc6342..a7cddf40e 100644 --- a/arch/powerpc/platforms/cell/spufs/Makefile +++ b/arch/powerpc/platforms/cell/spufs/Makefile @@ -1,7 +1,5 @@ -obj-y += switch.o - obj-$(CONFIG_SPU_FS) += spufs.o -spufs-y += inode.o file.o context.o syscalls.o +spufs-y += inode.o file.o context.o switch.o syscalls.o spufs-y += sched.o backing_ops.o hw_ops.o run.o # Rules to build switch.o with the help of SPU tool chain @@ -10,14 +8,11 @@ SPU_CC := $(SPU_CROSS)gcc SPU_AS := $(SPU_CROSS)gcc SPU_LD := $(SPU_CROSS)ld SPU_OBJCOPY := $(SPU_CROSS)objcopy -SPU_CFLAGS := -O2 -Wall -I$(srctree)/include \ - -I$(objtree)/include2 -D__KERNEL__ -SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include \ - -I$(objtree)/include2 -D__KERNEL__ +SPU_CFLAGS := -O2 -Wall -I$(srctree)/include -I$(objtree)/include2 +SPU_AFLAGS := -c -D__ASSEMBLY__ -I$(srctree)/include -I$(objtree)/include2 SPU_LDFLAGS := -N -Ttext=0x0 $(obj)/switch.o: $(obj)/spu_save_dump.h $(obj)/spu_restore_dump.h -clean-files := spu_save_dump.h spu_restore_dump.h # Compile SPU files cmd_spu_cc = $(SPU_CC) $(SPU_CFLAGS) -c -o $@ $< @@ -50,8 +45,7 @@ cmd_hexdump = ( \ echo " * Hex-dump auto generated from $*.c." ; \ echo " * Do not edit!" ; \ echo " */" ; \ - echo "static unsigned int $*_code[] " \ - "__attribute__((__aligned__(128))) = {" ; \ + echo "static unsigned int $*_code[] __page_aligned = {" ; \ hexdump -v -e '"0x" 4/1 "%02x" "," "\n"' $< ; \ echo "};" ; \ ) > $@ diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c index 2d22cd59d..f1d35ddc9 100644 --- a/arch/powerpc/platforms/cell/spufs/backing_ops.c +++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c @@ -21,6 +21,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index 36439c5e9..8bb33abfa 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c @@ -30,7 +30,7 @@ struct spu_context *alloc_spu_context(void) { struct spu_context *ctx; - ctx = kzalloc(sizeof *ctx, GFP_KERNEL); + ctx = kmalloc(sizeof *ctx, GFP_KERNEL); if (!ctx) goto out; /* Binding to physical processor deferred @@ -48,7 +48,17 @@ struct spu_context *alloc_spu_context(void) init_waitqueue_head(&ctx->wbox_wq); init_waitqueue_head(&ctx->stop_wq); init_waitqueue_head(&ctx->mfc_wq); + ctx->ibox_fasync = NULL; + ctx->wbox_fasync = NULL; + ctx->mfc_fasync = NULL; + ctx->mfc = NULL; + ctx->tagwait = 0; ctx->state = SPU_STATE_SAVED; + ctx->local_store = NULL; + ctx->cntl = NULL; + ctx->signal1 = NULL; + ctx->signal2 = NULL; + ctx->spu = NULL; ctx->ops = &spu_backing_ops; ctx->owner = get_task_mm(current); goto out; diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 58e794f9d..366185e92 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -204,7 +204,7 @@ static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma) vma->vm_flags |= VM_RESERVED; vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) - | _PAGE_NO_CACHE | _PAGE_GUARDED); + | _PAGE_NO_CACHE); vma->vm_ops = &spufs_cntl_mmap_vmops; return 0; @@ -675,7 +675,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma) vma->vm_flags |= VM_RESERVED; vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) - | _PAGE_NO_CACHE | _PAGE_GUARDED); + | _PAGE_NO_CACHE); vma->vm_ops = &spufs_signal1_mmap_vmops; return 0; @@ -762,7 +762,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma) /* FIXME: */ vma->vm_flags |= VM_RESERVED; vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) - | _PAGE_NO_CACHE | _PAGE_GUARDED); + | _PAGE_NO_CACHE); vma->vm_ops = &spufs_signal2_mmap_vmops; return 0; @@ -824,55 +824,6 @@ static u64 spufs_signal2_type_get(void *data) DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get, spufs_signal2_type_set, "%llu"); -#ifdef CONFIG_SPUFS_MMAP -static struct page *spufs_mss_mmap_nopage(struct vm_area_struct *vma, - unsigned long address, int *type) -{ - return spufs_ps_nopage(vma, address, type, 0x0000); -} - -static struct vm_operations_struct spufs_mss_mmap_vmops = { - .nopage = spufs_mss_mmap_nopage, -}; - -/* - * mmap support for problem state MFC DMA area [0x0000 - 0x0fff]. - * Mapping this area requires that the application have CAP_SYS_RAWIO, - * as these registers require special care when read/writing. - */ -static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma) -{ - if (!(vma->vm_flags & VM_SHARED)) - return -EINVAL; - - if (!capable(CAP_SYS_RAWIO)) - return -EPERM; - - vma->vm_flags |= VM_RESERVED; - vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) - | _PAGE_NO_CACHE | _PAGE_GUARDED); - - vma->vm_ops = &spufs_mss_mmap_vmops; - return 0; -} -#endif - -static int spufs_mss_open(struct inode *inode, struct file *file) -{ - struct spufs_inode_info *i = SPUFS_I(inode); - - file->private_data = i->i_ctx; - return nonseekable_open(inode, file); -} - -static struct file_operations spufs_mss_fops = { - .open = spufs_mss_open, -#ifdef CONFIG_SPUFS_MMAP - .mmap = spufs_mss_mmap, -#endif -}; - - #ifdef CONFIG_SPUFS_MMAP static struct page *spufs_mfc_mmap_nopage(struct vm_area_struct *vma, unsigned long address, int *type) @@ -899,7 +850,7 @@ static int spufs_mfc_mmap(struct file *file, struct vm_area_struct *vma) vma->vm_flags |= VM_RESERVED; vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) - | _PAGE_NO_CACHE | _PAGE_GUARDED); + | _PAGE_NO_CACHE); vma->vm_ops = &spufs_mfc_mmap_vmops; return 0; @@ -1150,7 +1101,7 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait) return mask; } -static int spufs_mfc_flush(struct file *file, fl_owner_t id) +static int spufs_mfc_flush(struct file *file) { struct spu_context *ctx = file->private_data; int ret; @@ -1176,7 +1127,7 @@ out: static int spufs_mfc_fsync(struct file *file, struct dentry *dentry, int datasync) { - return spufs_mfc_flush(file, NULL); + return spufs_mfc_flush(file); } static int spufs_mfc_fasync(int fd, struct file *file, int on) @@ -1328,22 +1279,6 @@ static u64 spufs_srr0_get(void *data) DEFINE_SIMPLE_ATTRIBUTE(spufs_srr0_ops, spufs_srr0_get, spufs_srr0_set, "%llx\n") -static u64 spufs_id_get(void *data) -{ - struct spu_context *ctx = data; - u64 num; - - spu_acquire(ctx); - if (ctx->state == SPU_STATE_RUNNABLE) - num = ctx->spu->number; - else - num = (unsigned int)-1; - spu_release(ctx); - - return num; -} -DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, 0, "0x%llx\n") - struct tree_descr spufs_dir_contents[] = { { "mem", &spufs_mem_fops, 0666, }, { "regs", &spufs_regs_fops, 0666, }, @@ -1357,7 +1292,6 @@ struct tree_descr spufs_dir_contents[] = { { "signal2", &spufs_signal2_fops, 0666, }, { "signal1_type", &spufs_signal1_type, 0666, }, { "signal2_type", &spufs_signal2_type, 0666, }, - { "mss", &spufs_mss_fops, 0666, }, { "mfc", &spufs_mfc_fops, 0666, }, { "cntl", &spufs_cntl_fops, 0666, }, { "npc", &spufs_npc_ops, 0666, }, @@ -1367,6 +1301,5 @@ struct tree_descr spufs_dir_contents[] = { { "spu_tag_mask", &spufs_spu_tag_mask_ops, 0666, }, { "event_mask", &spufs_event_mask_ops, 0666, }, { "srr0", &spufs_srr0_ops, 0666, }, - { "phys-id", &spufs_id_ops, 0666, }, {}, }; diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c index c8670f519..a13a8b5a0 100644 --- a/arch/powerpc/platforms/cell/spufs/hw_ops.c +++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c @@ -18,6 +18,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include #include "spufs.h" diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 3950ddccb..d9554199a 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -82,6 +82,7 @@ spufs_new_inode(struct super_block *sb, int mode) inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; out: @@ -119,7 +120,7 @@ spufs_new_file(struct super_block *sb, struct dentry *dentry, ret = 0; inode->i_op = &spufs_file_iops; inode->i_fop = fops; - inode->i_private = SPUFS_I(inode)->i_ctx = get_spu_context(ctx); + inode->u.generic_ip = SPUFS_I(inode)->i_ctx = get_spu_context(ctx); d_add(dentry, inode); out: return ret; @@ -156,12 +157,20 @@ static void spufs_prune_dir(struct dentry *dir) mutex_unlock(&dir->d_inode->i_mutex); } -/* Caller must hold root->i_mutex */ static int spufs_rmdir(struct inode *root, struct dentry *dir_dentry) { + struct spu_context *ctx; + /* remove all entries */ + mutex_lock(&root->i_mutex); spufs_prune_dir(dir_dentry); + mutex_unlock(&root->i_mutex); + + /* We have to give up the mm_struct */ + ctx = SPUFS_I(dir_dentry->d_inode)->i_ctx; + spu_forget(ctx); + /* XXX Do we need to hold i_mutex here ? */ return simple_rmdir(root, dir_dentry); } @@ -190,23 +199,16 @@ out: static int spufs_dir_close(struct inode *inode, struct file *file) { - struct spu_context *ctx; struct inode *dir; struct dentry *dentry; int ret; dentry = file->f_dentry; dir = dentry->d_parent->d_inode; - ctx = SPUFS_I(dentry->d_inode)->i_ctx; - mutex_lock(&dir->i_mutex); ret = spufs_rmdir(dir, dentry); - mutex_unlock(&dir->i_mutex); WARN_ON(ret); - /* We have to give up the mm_struct */ - spu_forget(ctx); - return dcache_dir_close(inode, file); } @@ -303,10 +305,6 @@ long spufs_create_thread(struct nameidata *nd, nd->dentry != nd->dentry->d_sb->s_root) goto out; - /* all flags are reserved */ - if (flags) - goto out; - dentry = lookup_create(nd, 1); ret = PTR_ERR(dentry); if (IS_ERR(dentry)) @@ -326,13 +324,8 @@ long spufs_create_thread(struct nameidata *nd, * in error path of *_open(). */ ret = spufs_context_open(dget(dentry), mntget(nd->mnt)); - if (ret < 0) { - WARN_ON(spufs_rmdir(nd->dentry->d_inode, dentry)); - mutex_unlock(&nd->dentry->d_inode->i_mutex); - spu_forget(SPUFS_I(dentry->d_inode)->i_ctx); - dput(dentry); - goto out; - } + if (ret < 0) + spufs_rmdir(nd->dentry->d_inode, dentry); out_dput: dput(dentry); @@ -435,11 +428,11 @@ spufs_fill_super(struct super_block *sb, void *data, int silent) return spufs_create_root(sb, data); } -static int +static struct super_block * spufs_get_sb(struct file_system_type *fstype, int flags, - const char *name, void *data, struct vfsmount *mnt) + const char *name, void *data) { - return get_sb_single(fstype, flags, data, spufs_fill_super, mnt); + return get_sb_single(fstype, flags, data, spufs_fill_super); } static struct file_system_type spufs_type = { diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 135029448..bf652cd77 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -26,6 +26,7 @@ #undef DEBUG +#include #include #include #include @@ -42,7 +43,6 @@ #include #include #include -#include #include "spufs.h" #define SPU_MIN_TIMESLICE (100 * HZ / 1000) @@ -363,7 +363,7 @@ int spu_activate(struct spu_context *ctx, u64 flags) * We're likely to wait for interrupts on the same * CPU that we are now on, so send them here. */ - spu_cpu_affinity_set(spu, raw_smp_processor_id()); + spu_irq_setaffinity(spu, raw_smp_processor_id()); put_active_spu(spu); return 0; } diff --git a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped index 15183d209..1b2355ff7 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped +++ b/arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped @@ -3,901 +3,229 @@ * Hex-dump auto generated from spu_restore.c. * Do not edit! */ -static unsigned int spu_restore_code[] __attribute__((__aligned__(128))) = { -0x40800000, -0x409ff801, -0x24000080, -0x24fd8081, -0x1cd80081, -0x33001180, -0x42030003, -0x33800284, -0x1c010204, -0x40200000, -0x40200000, -0x40200000, -0x34000190, -0x34004191, -0x34008192, -0x3400c193, -0x141fc205, -0x23fffd84, -0x1c100183, -0x217ffa85, -0x3080a000, -0x3080a201, -0x3080a402, -0x3080a603, -0x3080a804, -0x3080aa05, -0x3080ac06, -0x3080ae07, -0x3080b008, -0x3080b209, -0x3080b40a, -0x3080b60b, -0x3080b80c, -0x3080ba0d, -0x3080bc0e, -0x3080be0f, -0x00003ffc, -0x00000000, -0x00000000, -0x00000000, -0x01a00182, -0x3ec00083, -0xb0a14103, -0x01a00204, -0x3ec10082, -0x4202800e, -0x04000703, -0xb0a14202, -0x21a00803, -0x3fbf028d, -0x3f20068d, -0x3fbe0682, -0x3fe30102, -0x21a00882, -0x3f82028f, -0x3fe3078f, -0x3fbf0784, -0x3f200204, -0x3fbe0204, -0x3fe30204, -0x04000203, -0x21a00903, -0x40848002, -0x21a00982, -0x40800003, -0x21a00a03, -0x40802002, -0x21a00a82, -0x21a00083, -0x40800082, -0x21a00b02, -0x10002818, -0x42a00002, -0x32800007, -0x4207000c, -0x18008208, -0x40a0000b, -0x4080020a, -0x40800709, -0x00200000, -0x42070002, -0x3ac30384, -0x1cffc489, -0x00200000, -0x18008383, -0x38830382, -0x4cffc486, -0x3ac28185, -0xb0408584, -0x28830382, -0x1c020387, -0x38828182, -0xb0408405, -0x1802c408, -0x28828182, -0x217ff886, -0x04000583, -0x21a00803, -0x3fbe0682, -0x3fe30102, -0x04000106, -0x21a00886, -0x04000603, -0x21a00903, -0x40803c02, -0x21a00982, -0x40800003, -0x04000184, -0x21a00a04, -0x40802202, -0x21a00a82, -0x42028005, -0x34208702, -0x21002282, -0x21a00804, -0x21a00886, -0x3fbf0782, -0x3f200102, -0x3fbe0102, -0x3fe30102, -0x21a00902, -0x40804003, -0x21a00983, -0x21a00a04, -0x40805a02, -0x21a00a82, -0x40800083, -0x21a00b83, -0x01a00c02, -0x01a00d83, -0x3420c282, -0x21a00e02, -0x34210283, -0x21a00f03, -0x34200284, -0x77400200, -0x3421c282, -0x21a00702, -0x34218283, -0x21a00083, -0x34214282, -0x21a00b02, -0x4200480c, -0x00200000, -0x1c010286, -0x34220284, -0x34220302, -0x0f608203, -0x5c024204, -0x3b81810b, -0x42013c02, -0x00200000, -0x18008185, -0x38808183, -0x3b814182, -0x21004e84, -0x4020007f, -0x35000100, -0x000004e0, -0x000002a0, -0x000002e8, -0x00000428, -0x00000360, -0x000002e8, -0x000004a0, -0x00000468, -0x000003c8, -0x00000360, -0x409ffe02, -0x30801203, -0x40800204, -0x3ec40085, -0x10009c09, -0x3ac10606, -0xb060c105, -0x4020007f, -0x4020007f, -0x20801203, -0x38810602, -0xb0408586, -0x28810602, -0x32004180, -0x34204702, -0x21a00382, -0x4020007f, -0x327fdc80, -0x409ffe02, -0x30801203, -0x40800204, -0x3ec40087, -0x40800405, -0x00200000, -0x40800606, -0x3ac10608, -0x3ac14609, -0x3ac1860a, -0xb060c107, -0x20801203, -0x41004003, -0x38810602, -0x4020007f, -0xb0408188, -0x4020007f, -0x28810602, -0x41201002, -0x38814603, -0x10009c09, -0xb060c109, -0x4020007f, -0x28814603, -0x41193f83, -0x38818602, -0x60ffc003, -0xb040818a, -0x28818602, -0x32003080, -0x409ffe02, -0x30801203, -0x40800204, -0x3ec40087, -0x41201008, -0x10009c14, -0x40800405, -0x3ac10609, -0x40800606, -0x3ac1460a, -0xb060c107, -0x3ac1860b, -0x20801203, -0x38810602, -0xb0408409, -0x28810602, -0x38814603, -0xb060c40a, -0x4020007f, -0x28814603, -0x41193f83, -0x38818602, -0x60ffc003, -0xb040818b, -0x28818602, -0x32002380, -0x409ffe02, -0x30801204, -0x40800205, -0x3ec40083, -0x40800406, -0x3ac14607, -0x3ac18608, -0xb0810103, -0x41004002, -0x20801204, -0x4020007f, -0x38814603, -0x10009c0b, -0xb060c107, -0x4020007f, -0x4020007f, -0x28814603, -0x38818602, -0x4020007f, -0x4020007f, -0xb0408588, -0x28818602, -0x4020007f, -0x32001780, -0x409ffe02, -0x1000640e, -0x40800204, -0x30801203, -0x40800405, -0x3ec40087, -0x40800606, -0x3ac10608, -0x3ac14609, -0x3ac1860a, -0xb060c107, -0x20801203, -0x413d8003, -0x38810602, -0x4020007f, -0x327fd780, -0x409ffe02, -0x10007f0c, -0x40800205, -0x30801204, -0x40800406, -0x3ec40083, -0x3ac14607, -0x3ac18608, -0xb0810103, -0x413d8002, -0x20801204, -0x38814603, -0x4020007f, -0x327feb80, -0x409ffe02, -0x30801203, -0x40800204, -0x3ec40087, -0x40800405, -0x1000650a, -0x40800606, -0x3ac10608, -0x3ac14609, -0x3ac1860a, -0xb060c107, -0x20801203, -0x38810602, -0xb0408588, -0x4020007f, -0x327fc980, -0x00400000, -0x40800003, -0x4020007f, -0x35000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, +static unsigned int spu_restore_code[] __page_aligned = { +0x40800000, 0x409ff801, 0x24000080, 0x24fd8081, +0x1cd80081, 0x33001180, 0x42030003, 0x33800284, +0x1c010204, 0x40200000, 0x40200000, 0x40200000, +0x34000190, 0x34004191, 0x34008192, 0x3400c193, +0x141fc205, 0x23fffd84, 0x1c100183, 0x217ffa85, +0x3080a000, 0x3080a201, 0x3080a402, 0x3080a603, +0x3080a804, 0x3080aa05, 0x3080ac06, 0x3080ae07, +0x3080b008, 0x3080b209, 0x3080b40a, 0x3080b60b, +0x3080b80c, 0x3080ba0d, 0x3080bc0e, 0x3080be0f, +0x00003ffc, 0x00000000, 0x00000000, 0x00000000, +0x01a00182, 0x3ec00083, 0xb0a14103, 0x01a00204, +0x3ec10082, 0x4202800e, 0x04000703, 0xb0a14202, +0x21a00803, 0x3fbf028d, 0x3f20068d, 0x3fbe0682, +0x3fe30102, 0x21a00882, 0x3f82028f, 0x3fe3078f, +0x3fbf0784, 0x3f200204, 0x3fbe0204, 0x3fe30204, +0x04000203, 0x21a00903, 0x40848002, 0x21a00982, +0x40800003, 0x21a00a03, 0x40802002, 0x21a00a82, +0x21a00083, 0x40800082, 0x21a00b02, 0x10002818, +0x40a80002, 0x32800007, 0x4207000c, 0x18008208, +0x40a0000b, 0x4080020a, 0x40800709, 0x00200000, +0x42070002, 0x3ac30384, 0x1cffc489, 0x00200000, +0x18008383, 0x38830382, 0x4cffc486, 0x3ac28185, +0xb0408584, 0x28830382, 0x1c020387, 0x38828182, +0xb0408405, 0x1802c408, 0x28828182, 0x217ff886, +0x04000583, 0x21a00803, 0x3fbe0682, 0x3fe30102, +0x04000106, 0x21a00886, 0x04000603, 0x21a00903, +0x40803c02, 0x21a00982, 0x40800003, 0x04000184, +0x21a00a04, 0x40802202, 0x21a00a82, 0x42028005, +0x34208702, 0x21002282, 0x21a00804, 0x21a00886, +0x3fbf0782, 0x3f200102, 0x3fbe0102, 0x3fe30102, +0x21a00902, 0x40804003, 0x21a00983, 0x21a00a04, +0x40805a02, 0x21a00a82, 0x40800083, 0x21a00b83, +0x01a00c02, 0x01a00d83, 0x3420c282, 0x21a00e02, +0x34210283, 0x21a00f03, 0x34200284, 0x77400200, +0x3421c282, 0x21a00702, 0x34218283, 0x21a00083, +0x34214282, 0x21a00b02, 0x4200480c, 0x00200000, +0x1c010286, 0x34220284, 0x34220302, 0x0f608203, +0x5c024204, 0x3b81810b, 0x42013c02, 0x00200000, +0x18008185, 0x38808183, 0x3b814182, 0x21004e84, +0x4020007f, 0x35000100, 0x000004e0, 0x000002a0, +0x000002e8, 0x00000428, 0x00000360, 0x000002e8, +0x000004a0, 0x00000468, 0x000003c8, 0x00000360, +0x409ffe02, 0x30801203, 0x40800204, 0x3ec40085, +0x10009c09, 0x3ac10606, 0xb060c105, 0x4020007f, +0x4020007f, 0x20801203, 0x38810602, 0xb0408586, +0x28810602, 0x32004180, 0x34204702, 0x21a00382, +0x4020007f, 0x327fdc80, 0x409ffe02, 0x30801203, +0x40800204, 0x3ec40087, 0x40800405, 0x00200000, +0x40800606, 0x3ac10608, 0x3ac14609, 0x3ac1860a, +0xb060c107, 0x20801203, 0x41004003, 0x38810602, +0x4020007f, 0xb0408188, 0x4020007f, 0x28810602, +0x41201002, 0x38814603, 0x10009c09, 0xb060c109, +0x4020007f, 0x28814603, 0x41193f83, 0x38818602, +0x60ffc003, 0xb040818a, 0x28818602, 0x32003080, +0x409ffe02, 0x30801203, 0x40800204, 0x3ec40087, +0x41201008, 0x10009c14, 0x40800405, 0x3ac10609, +0x40800606, 0x3ac1460a, 0xb060c107, 0x3ac1860b, +0x20801203, 0x38810602, 0xb0408409, 0x28810602, +0x38814603, 0xb060c40a, 0x4020007f, 0x28814603, +0x41193f83, 0x38818602, 0x60ffc003, 0xb040818b, +0x28818602, 0x32002380, 0x409ffe02, 0x30801204, +0x40800205, 0x3ec40083, 0x40800406, 0x3ac14607, +0x3ac18608, 0xb0810103, 0x41004002, 0x20801204, +0x4020007f, 0x38814603, 0x10009c0b, 0xb060c107, +0x4020007f, 0x4020007f, 0x28814603, 0x38818602, +0x4020007f, 0x4020007f, 0xb0408588, 0x28818602, +0x4020007f, 0x32001780, 0x409ffe02, 0x1000640e, +0x40800204, 0x30801203, 0x40800405, 0x3ec40087, +0x40800606, 0x3ac10608, 0x3ac14609, 0x3ac1860a, +0xb060c107, 0x20801203, 0x413d8003, 0x38810602, +0x4020007f, 0x327fd780, 0x409ffe02, 0x10007f0c, +0x40800205, 0x30801204, 0x40800406, 0x3ec40083, +0x3ac14607, 0x3ac18608, 0xb0810103, 0x413d8002, +0x20801204, 0x38814603, 0x4020007f, 0x327feb80, +0x409ffe02, 0x30801203, 0x40800204, 0x3ec40087, +0x40800405, 0x1000650a, 0x40800606, 0x3ac10608, +0x3ac14609, 0x3ac1860a, 0xb060c107, 0x20801203, +0x38810602, 0xb0408588, 0x4020007f, 0x327fc980, +0x00400000, 0x40800003, 0x4020007f, 0x35000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, }; diff --git a/arch/powerpc/platforms/cell/spufs/spu_save_dump.h_shipped b/arch/powerpc/platforms/cell/spufs/spu_save_dump.h_shipped index b9f81ac8a..39e54003f 100644 --- a/arch/powerpc/platforms/cell/spufs/spu_save_dump.h_shipped +++ b/arch/powerpc/platforms/cell/spufs/spu_save_dump.h_shipped @@ -3,741 +3,189 @@ * Hex-dump auto generated from spu_save.c. * Do not edit! */ -static unsigned int spu_save_code[] __attribute__((__aligned__(128))) = { -0x20805000, -0x20805201, -0x20805402, -0x20805603, -0x20805804, -0x20805a05, -0x20805c06, -0x20805e07, -0x20806008, -0x20806209, -0x2080640a, -0x2080660b, -0x2080680c, -0x20806a0d, -0x20806c0e, -0x20806e0f, -0x4201c003, -0x33800184, -0x1c010204, -0x40200000, -0x24000190, -0x24004191, -0x24008192, -0x2400c193, -0x141fc205, -0x23fffd84, -0x1c100183, -0x217ffb85, -0x40800000, -0x409ff801, -0x24000080, -0x24fd8081, -0x1cd80081, -0x33000180, -0x00000000, -0x00000000, -0x01a00182, -0x3ec00083, -0xb1c38103, -0x01a00204, -0x3ec10082, -0x4201400d, -0xb1c38202, -0x01a00583, -0x34218682, -0x3ed80684, -0xb0408184, -0x24218682, -0x01a00603, -0x00200000, -0x34214682, -0x3ed40684, -0xb0408184, -0x40800003, -0x24214682, -0x21a00083, -0x40800082, -0x21a00b02, -0x4020007f, -0x1000251e, -0x42a00002, -0x32800008, -0x4205c00c, -0x00200000, -0x40a0000b, -0x3f82070f, -0x4080020a, -0x40800709, -0x3fe3078f, -0x3fbf0783, -0x3f200183, -0x3fbe0183, -0x3fe30187, -0x18008387, -0x4205c002, -0x3ac30404, -0x1cffc489, -0x00200000, -0x18008403, -0x38830402, -0x4cffc486, -0x3ac28185, -0xb0408584, -0x28830402, -0x1c020408, -0x38828182, -0xb0408385, -0x1802c387, -0x28828182, -0x217ff886, -0x04000582, -0x32800007, -0x21a00802, -0x3fbf0705, -0x3f200285, -0x3fbe0285, -0x3fe30285, -0x21a00885, -0x04000603, -0x21a00903, -0x40803c02, -0x21a00982, -0x04000386, -0x21a00a06, -0x40801202, -0x21a00a82, -0x73000003, -0x24200683, -0x01a00404, -0x00200000, -0x34204682, -0x3ec40683, -0xb0408203, -0x24204682, -0x01a00783, -0x00200000, -0x3421c682, -0x3edc0684, -0xb0408184, -0x2421c682, -0x21a00806, -0x21a00885, -0x3fbf0784, -0x3f200204, -0x3fbe0204, -0x3fe30204, -0x21a00904, -0x40804002, -0x21a00982, -0x21a00a06, -0x40805a02, -0x21a00a82, -0x04000683, -0x21a00803, -0x21a00885, -0x21a00904, -0x40848002, -0x21a00982, -0x21a00a06, -0x40801002, -0x21a00a82, -0x21a00a06, -0x40806602, -0x00200000, -0x35800009, -0x21a00a82, -0x40800083, -0x21a00b83, -0x01a00c02, -0x01a00d83, -0x00003ffb, -0x40800003, -0x4020007f, -0x35000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, -0x00000000, +static unsigned int spu_save_code[] __page_aligned = { +0x20805000, 0x20805201, 0x20805402, 0x20805603, +0x20805804, 0x20805a05, 0x20805c06, 0x20805e07, +0x20806008, 0x20806209, 0x2080640a, 0x2080660b, +0x2080680c, 0x20806a0d, 0x20806c0e, 0x20806e0f, +0x4201c003, 0x33800184, 0x1c010204, 0x40200000, +0x24000190, 0x24004191, 0x24008192, 0x2400c193, +0x141fc205, 0x23fffd84, 0x1c100183, 0x217ffb85, +0x40800000, 0x409ff801, 0x24000080, 0x24fd8081, +0x1cd80081, 0x33000180, 0x00000000, 0x00000000, +0x01a00182, 0x3ec00083, 0xb1c38103, 0x01a00204, +0x3ec10082, 0x4201400d, 0xb1c38202, 0x01a00583, +0x34218682, 0x3ed80684, 0xb0408184, 0x24218682, +0x01a00603, 0x00200000, 0x34214682, 0x3ed40684, +0xb0408184, 0x40800003, 0x24214682, 0x21a00083, +0x40800082, 0x21a00b02, 0x4020007f, 0x1000251e, +0x40a80002, 0x32800008, 0x4205c00c, 0x00200000, +0x40a0000b, 0x3f82070f, 0x4080020a, 0x40800709, +0x3fe3078f, 0x3fbf0783, 0x3f200183, 0x3fbe0183, +0x3fe30187, 0x18008387, 0x4205c002, 0x3ac30404, +0x1cffc489, 0x00200000, 0x18008403, 0x38830402, +0x4cffc486, 0x3ac28185, 0xb0408584, 0x28830402, +0x1c020408, 0x38828182, 0xb0408385, 0x1802c387, +0x28828182, 0x217ff886, 0x04000582, 0x32800007, +0x21a00802, 0x3fbf0705, 0x3f200285, 0x3fbe0285, +0x3fe30285, 0x21a00885, 0x04000603, 0x21a00903, +0x40803c02, 0x21a00982, 0x04000386, 0x21a00a06, +0x40801202, 0x21a00a82, 0x73000003, 0x24200683, +0x01a00404, 0x00200000, 0x34204682, 0x3ec40683, +0xb0408203, 0x24204682, 0x01a00783, 0x00200000, +0x3421c682, 0x3edc0684, 0xb0408184, 0x2421c682, +0x21a00806, 0x21a00885, 0x3fbf0784, 0x3f200204, +0x3fbe0204, 0x3fe30204, 0x21a00904, 0x40804002, +0x21a00982, 0x21a00a06, 0x40805a02, 0x21a00a82, +0x04000683, 0x21a00803, 0x21a00885, 0x21a00904, +0x40848002, 0x21a00982, 0x21a00a06, 0x40801002, +0x21a00a82, 0x21a00a06, 0x40806602, 0x00200000, +0x35800009, 0x21a00a82, 0x40800083, 0x21a00b83, +0x01a00c02, 0x01a00d83, 0x00003ffb, 0x40800003, +0x4020007f, 0x35000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, +0x00000000, 0x00000000, 0x00000000, 0x00000000, }; diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c index 9d9d82dd3..1726bfe38 100644 --- a/arch/powerpc/platforms/cell/spufs/switch.c +++ b/arch/powerpc/platforms/cell/spufs/switch.c @@ -32,6 +32,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -45,7 +46,6 @@ #include #include -#include #include #include @@ -463,8 +463,7 @@ static inline void wait_purge_complete(struct spu_state *csa, struct spu *spu) * Poll MFC_CNTL[Ps] until value '11' is read * (purge complete). */ - POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) & - MFC_CNTL_PURGE_DMA_STATUS_MASK) == + POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW) & MFC_CNTL_PURGE_DMA_COMPLETE); } @@ -623,17 +622,12 @@ static inline void save_ppuint_mb(struct spu_state *csa, struct spu *spu) static inline void save_ch_part1(struct spu_state *csa, struct spu *spu) { struct spu_priv2 __iomem *priv2 = spu->priv2; - u64 idx, ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; + u64 idx, ch_indices[7] = { 0UL, 1UL, 3UL, 4UL, 24UL, 25UL, 27UL }; int i; /* Save, Step 42: + * Save the following CH: [0,1,3,4,24,25,27] */ - - /* Save CH 1, without channel count */ - out_be64(&priv2->spu_chnlcntptr_RW, 1); - csa->spu_chnldata_RW[1] = in_be64(&priv2->spu_chnldata_RW); - - /* Save the following CH: [0,3,4,24,25,27] */ for (i = 0; i < 7; i++) { idx = ch_indices[i]; out_be64(&priv2->spu_chnlcntptr_RW, idx); @@ -724,15 +718,13 @@ static inline void invalidate_slbs(struct spu_state *csa, struct spu *spu) static inline void get_kernel_slb(u64 ea, u64 slb[2]) { - u64 llp; - - if (REGION_ID(ea) == KERNEL_REGION_ID) - llp = mmu_psize_defs[mmu_linear_psize].sllp; - else - llp = mmu_psize_defs[mmu_virtual_psize].sllp; - slb[0] = (get_kernel_vsid(ea) << SLB_VSID_SHIFT) | - SLB_VSID_KERNEL | llp; + slb[0] = (get_kernel_vsid(ea) << SLB_VSID_SHIFT) | SLB_VSID_KERNEL; slb[1] = (ea & ESID_MASK) | SLB_ESID_V; + + /* Large pages are used for kernel text/data, but not vmalloc. */ + if (cpu_has_feature(CPU_FTR_16M_PAGE) + && REGION_ID(ea) == KERNEL_REGION_ID) + slb[0] |= SLB_VSID_L; } static inline void load_mfc_slb(struct spu *spu, u64 slb[2], int slbe) @@ -1028,8 +1020,7 @@ static inline void wait_suspend_mfc_complete(struct spu_state *csa, * Restore, Step 47. * Poll MFC_CNTL[Ss] until 11 is returned. */ - POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) & - MFC_CNTL_SUSPEND_DMA_STATUS_MASK) == + POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW) & MFC_CNTL_SUSPEND_COMPLETE); } @@ -1112,18 +1103,13 @@ static inline void clear_spu_status(struct spu_state *csa, struct spu *spu) static inline void reset_ch_part1(struct spu_state *csa, struct spu *spu) { struct spu_priv2 __iomem *priv2 = spu->priv2; - u64 ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; + u64 ch_indices[7] = { 0UL, 1UL, 3UL, 4UL, 24UL, 25UL, 27UL }; u64 idx; int i; /* Restore, Step 20: + * Reset the following CH: [0,1,3,4,24,25,27] */ - - /* Reset CH 1 */ - out_be64(&priv2->spu_chnlcntptr_RW, 1); - out_be64(&priv2->spu_chnldata_RW, 0UL); - - /* Reset the following CH: [0,3,4,24,25,27] */ for (i = 0; i < 7; i++) { idx = ch_indices[i]; out_be64(&priv2->spu_chnlcntptr_RW, idx); @@ -1584,17 +1570,12 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu) static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu) { struct spu_priv2 __iomem *priv2 = spu->priv2; - u64 idx, ch_indices[7] = { 0UL, 3UL, 4UL, 24UL, 25UL, 27UL }; + u64 idx, ch_indices[7] = { 0UL, 1UL, 3UL, 4UL, 24UL, 25UL, 27UL }; int i; /* Restore, Step 59: + * Restore the following CH: [0,1,3,4,24,25,27] */ - - /* Restore CH 1 without count */ - out_be64(&priv2->spu_chnlcntptr_RW, 1); - out_be64(&priv2->spu_chnldata_RW, csa->spu_chnldata_RW[1]); - - /* Restore the following CH: [0,3,4,24,25,27] */ for (i = 0; i < 7; i++) { idx = ch_indices[i]; out_be64(&priv2->spu_chnlcntptr_RW, idx); @@ -2093,7 +2074,6 @@ int spu_save(struct spu_state *prev, struct spu *spu) } return rc; } -EXPORT_SYMBOL_GPL(spu_save); /** * spu_restore - SPU context restore, with harvest and locking. @@ -2101,7 +2081,7 @@ EXPORT_SYMBOL_GPL(spu_save); * @spu: pointer to SPU iomem structure. * * Perform harvest + restore, as we may not be coming - * from a previous successful save operation, and the + * from a previous succesful save operation, and the * hardware state is unknown. */ int spu_restore(struct spu_state *new, struct spu *spu) @@ -2110,6 +2090,7 @@ int spu_restore(struct spu_state *new, struct spu *spu) acquire_spu_lock(spu); harvest(NULL, spu); + spu->stop_code = 0; spu->dar = 0; spu->dsisr = 0; spu->slb_replace = 0; @@ -2122,7 +2103,6 @@ int spu_restore(struct spu_state *new, struct spu *spu) } return rc; } -EXPORT_SYMBOL_GPL(spu_restore); /** * spu_harvest - SPU harvest (reset) operation @@ -2145,7 +2125,6 @@ static void init_prob(struct spu_state *csa) csa->spu_chnlcnt_RW[28] = 1; csa->spu_chnlcnt_RW[30] = 1; csa->prob.spu_runcntl_RW = SPU_RUNCNTL_STOP; - csa->prob.mb_stat_R = 0x000400; } static void init_priv1(struct spu_state *csa) @@ -2204,7 +2183,7 @@ void spu_init_csa(struct spu_state *csa) memset(lscsa, 0, sizeof(struct spu_lscsa)); csa->lscsa = lscsa; - spin_lock_init(&csa->register_lock); + csa->register_lock = SPIN_LOCK_UNLOCKED; /* Set LS pages reserved to allow for user-space mapping. */ for (p = lscsa->ls; p < lscsa->ls + LS_SIZE; p += PAGE_SIZE) @@ -2214,7 +2193,6 @@ void spu_init_csa(struct spu_state *csa) init_priv1(csa); init_priv2(csa); } -EXPORT_SYMBOL_GPL(spu_init_csa); void spu_fini_csa(struct spu_state *csa) { @@ -2225,4 +2203,3 @@ void spu_fini_csa(struct spu_state *csa) vfree(csa->lscsa); } -EXPORT_SYMBOL_GPL(spu_fini_csa); diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 6802cdc31..ac224876c 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c @@ -2,6 +2,7 @@ * CHRP pci routines. */ +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include #include @@ -141,7 +143,7 @@ hydra_init(void) if (np == NULL || of_address_to_resource(np, 0, &r)) return 0; Hydra = ioremap(r.start, r.end-r.start); - printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start); + printk("Hydra Mac I/O at %lx\n", r.start); printk("Hydra Feature_Control was %x", in_le32(&Hydra->Feature_Control)); out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN | @@ -160,9 +162,15 @@ void __init chrp_pcibios_fixup(void) { struct pci_dev *dev = NULL; + struct device_node *np; - for_each_pci_dev(dev) - pci_read_irq_line(dev); + /* PCI interrupts are controlled by the OpenPIC */ + for_each_pci_dev(dev) { + np = pci_device_to_OF_node(dev); + if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0)) + dev->irq = np->intrs[0].line; + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); + } } #define PRG_CL_RESET_VALID 0x00010000 @@ -259,7 +267,7 @@ chrp_find_bridges(void) bus_range[0], bus_range[1]); printk(" controlled by %s", dev->type); if (!is_longtrail) - printk(" at %llx", (unsigned long long)r.start); + printk(" at %lx", r.start); printk("\n"); hose = pcibios_alloc_controller(); diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 9c08ff322..18d89f387 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c @@ -8,6 +8,7 @@ * bootup setup stuff.. */ +#include #include #include #include @@ -24,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +60,7 @@ void rtas_indicator_progress(char *, unsigned short); int _chrp_type; EXPORT_SYMBOL(_chrp_type); -static struct mpic *chrp_mpic; +struct mpic *chrp_mpic; /* Used for doing CHRP event-scans */ DEFINE_PER_CPU(struct timer_list, heartbeat_timer); @@ -291,6 +292,10 @@ void __init chrp_setup_arch(void) pci_create_OF_bus_map(); +#ifdef CONFIG_SMP + smp_ops = &chrp_smp_ops; +#endif /* CONFIG_SMP */ + /* * Print the banner, then scroll down so boot progress * can be printed. -- Cort @@ -311,32 +316,24 @@ chrp_event_scan(unsigned long unused) jiffies + event_scan_interval); } -static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) -{ - unsigned int cascade_irq = i8259_irq(regs); - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - desc->chip->eoi(irq); -} - /* * Finds the open-pic node and sets up the mpic driver. */ static void __init chrp_find_openpic(void) { struct device_node *np, *root; - int len, i, j; + int len, i, j, irq_count; int isu_size, idu_size; unsigned int *iranges, *opprop = NULL; int oplen = 0; unsigned long opaddr; int na = 1; + unsigned char init_senses[NR_IRQS - NUM_8259_INTERRUPTS]; - np = of_find_node_by_type(NULL, "open-pic"); + np = find_type_devices("open-pic"); if (np == NULL) return; - root = of_find_node_by_path("/"); + root = find_path_device("/"); if (root) { opprop = (unsigned int *) get_property (root, "platform-open-pic", &oplen); @@ -347,15 +344,19 @@ static void __init chrp_find_openpic(void) oplen /= na * sizeof(unsigned int); } else { struct resource r; - if (of_address_to_resource(np, 0, &r)) { - goto bail; - } + if (of_address_to_resource(np, 0, &r)) + return; opaddr = r.start; oplen = 0; } printk(KERN_INFO "OpenPIC at %lx\n", opaddr); + irq_count = NR_IRQS - NUM_ISA_INTERRUPTS - 4; /* leave room for IPIs */ + prom_get_irq_senses(init_senses, NUM_ISA_INTERRUPTS, NR_IRQS - 4); + /* i8259 cascade is always positive level */ + init_senses[0] = IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE; + iranges = (unsigned int *) get_property(np, "interrupt-ranges", &len); if (iranges == NULL) len = 0; /* non-distributed mpic */ @@ -382,12 +383,15 @@ static void __init chrp_find_openpic(void) if (len > 1) isu_size = iranges[3]; - chrp_mpic = mpic_alloc(np, opaddr, MPIC_PRIMARY, - isu_size, 0, " MPIC "); + chrp_mpic = mpic_alloc(opaddr, MPIC_PRIMARY, + isu_size, NUM_ISA_INTERRUPTS, irq_count, + NR_IRQS - 4, init_senses, irq_count, + " MPIC "); if (chrp_mpic == NULL) { printk(KERN_ERR "Failed to allocate MPIC structure\n"); - goto bail; + return; } + j = na - 1; for (i = 1; i < len; ++i) { iranges += 2; @@ -399,10 +403,7 @@ static void __init chrp_find_openpic(void) } mpic_init(chrp_mpic); - ppc_md.get_irq = mpic_get_irq; - bail: - of_node_put(root); - of_node_put(np); + mpic_setup_cascade(NUM_ISA_INTERRUPTS, i8259_irq_cascade, NULL); } #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) @@ -413,34 +414,14 @@ static struct irqaction xmon_irqaction = { }; #endif -static void __init chrp_find_8259(void) +void __init chrp_init_IRQ(void) { - struct device_node *np, *pic = NULL; + struct device_node *np; unsigned long chrp_int_ack = 0; - unsigned int cascade_irq; - - /* Look for cascade */ - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "chrp,iic")) { - pic = np; - break; - } - /* Ok, 8259 wasn't found. We need to handle the case where - * we have a pegasos that claims to be chrp but doesn't have - * a proper interrupt tree - */ - if (pic == NULL && chrp_mpic != NULL) { - printk(KERN_ERR "i8259: Not found in device-tree" - " assuming no legacy interrupts\n"); - return; - } +#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) + struct device_node *kbd; +#endif - /* Look for intack. In a perfect world, we would look for it on - * the ISA bus that holds the 8259 but heh... Works that way. If - * we ever see a problem, we can try to re-use the pSeries code here. - * Also, Pegasos-type platforms don't have a proper node to start - * from anyway - */ for (np = find_devices("pci"); np != NULL; np = np->next) { unsigned int *addrp = (unsigned int *) get_property(np, "8259-interrupt-acknowledge", NULL); @@ -451,37 +432,11 @@ static void __init chrp_find_8259(void) break; } if (np == NULL) - printk(KERN_WARNING "Cannot find PCI interrupt acknowledge" - " address, polling\n"); - - i8259_init(pic, chrp_int_ack); - if (ppc_md.get_irq == NULL) - ppc_md.get_irq = i8259_irq; - if (chrp_mpic != NULL) { - cascade_irq = irq_of_parse_and_map(pic, 0); - if (cascade_irq == NO_IRQ) - printk(KERN_ERR "i8259: failed to map cascade irq\n"); - else - set_irq_chained_handler(cascade_irq, - chrp_8259_cascade); - } -} + printk(KERN_ERR "Cannot find PCI interrupt acknowledge address\n"); -void __init chrp_init_IRQ(void) -{ -#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) - struct device_node *kbd; -#endif chrp_find_openpic(); - chrp_find_8259(); -#ifdef CONFIG_SMP - /* Pegasos has no MPIC, those ops would make it crash. It might be an - * option to move setting them to after we probe the PIC though - */ - if (chrp_mpic != NULL) - smp_ops = &chrp_smp_ops; -#endif /* CONFIG_SMP */ + i8259_init(chrp_int_ack, 0); if (_chrp_type == _CHRP_Pegasos) ppc_md.get_irq = i8259_irq; @@ -566,6 +521,10 @@ static int __init chrp_probe(void) DMA_MODE_READ = 0x44; DMA_MODE_WRITE = 0x48; isa_io_base = CHRP_ISA_IO_BASE; /* default value */ + ppc_do_canonicalize_irqs = 1; + + /* Assume we have an 8259... */ + __irq_offset_value = NUM_ISA_INTERRUPTS; return 1; } @@ -577,6 +536,7 @@ define_machine(chrp) { .init = chrp_init2, .show_cpuinfo = chrp_show_cpuinfo, .init_IRQ = chrp_init_IRQ, + .get_irq = mpic_get_irq, .pcibios_fixup = chrp_pcibios_fixup, .restart = rtas_restart, .power_off = rtas_power_off, diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c index 1d2307e87..b616053bc 100644 --- a/arch/powerpc/platforms/chrp/smp.c +++ b/arch/powerpc/platforms/chrp/smp.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 234a86187..4fdbc9ae8 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig @@ -74,17 +74,6 @@ config SANDPOINT Select SANDPOINT if configuring for a Motorola Sandpoint X3 (any flavor). -config MPC7448HPC2 - bool "Freescale MPC7448HPC2(Taiga)" - select TSI108_BRIDGE - select DEFAULT_UIMAGE - select PPC_UDBG_16550 - select MPIC - select MPIC_WEIRD - help - Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) - platform - config RADSTONE_PPC7D bool "Radstone Technology PPC7D board" select PPC_I8259 @@ -232,11 +221,6 @@ config MV64X60 select PPC_INDIRECT_PCI default y -config TSI108_BRIDGE - bool - depends on MPC7448HPC2 - default y - menu "Set bridge options" depends on MV64X60 diff --git a/arch/powerpc/platforms/embedded6xx/Makefile b/arch/powerpc/platforms/embedded6xx/Makefile deleted file mode 100644 index fa499fe59..000000000 --- a/arch/powerpc/platforms/embedded6xx/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -# -# Makefile for the 6xx/7xx/7xxxx linux kernel. -# -obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c deleted file mode 100644 index 6260bc526..000000000 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * mpc7448_hpc2.c - * - * Board setup routines for the Freescale mpc7448hpc2(taiga) platform - * - * Author: Jacob Pan - * jacob.pan@freescale.com - * Author: Xianghua Xiao - * x.xiao@freescale.com - * Maintainer: Roy Zang - * Add Flat Device Tree support fot mpc7448hpc2 board - * - * Copyright 2004-2006 Freescale Semiconductor, 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "mpc7448_hpc2.h" -#include -#include - -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) do { printk(fmt); } while(0) -#else -#define DBG(fmt...) do { } while(0) -#endif - -#ifndef CONFIG_PCI -isa_io_base = MPC7448_HPC2_ISA_IO_BASE; -isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE; -pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET; -#endif - -extern int tsi108_setup_pci(struct device_node *dev); -extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); -extern void tsi108_pci_int_init(void); -extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs); - -int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn) -{ - if (bus == 0 && PCI_SLOT(devfn) == 0) - return PCIBIOS_DEVICE_NOT_FOUND; - else - return PCIBIOS_SUCCESSFUL; -} - -/* - * find pci slot by devfn in interrupt map of OF tree - */ -u8 find_slot_by_devfn(unsigned int *interrupt_map, unsigned int devfn) -{ - int i; - unsigned int tmp; - for (i = 0; i < 4; i++){ - tmp = interrupt_map[i*4*7]; - if ((tmp >> 11) == (devfn >> 3)) - return i; - } - return i; -} - -/* - * Scans the interrupt map for pci device - */ -void mpc7448_hpc2_fixup_irq(struct pci_dev *dev) -{ - struct pci_controller *hose; - struct device_node *node; - unsigned int *interrupt; - int busnr; - int len; - u8 slot; - u8 pin; - - /* Lookup the hose */ - busnr = dev->bus->number; - hose = pci_bus_to_hose(busnr); - if (!hose) - printk(KERN_ERR "No pci hose found\n"); - - /* Check it has an OF node associated */ - node = (struct device_node *) hose->arch_data; - if (!node) - printk(KERN_ERR "No pci node found\n"); - - interrupt = (unsigned int *) get_property(node, "interrupt-map", &len); - slot = find_slot_by_devfn(interrupt, dev->devfn); - pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); - if (pin == 0 || pin > 4) - pin = 1; - pin--; - dev->irq = interrupt[slot*4*7 + pin*7 + 5]; - DBG("TSI_PCI: dev->irq = 0x%x\n", dev->irq); -} -/* temporary pci irq map fixup*/ - -void __init mpc7448_hpc2_pcibios_fixup(void) -{ - struct pci_dev *dev = NULL; - for_each_pci_dev(dev) { - mpc7448_hpc2_fixup_irq(dev); - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); - } -} - -static void __init mpc7448_hpc2_setup_arch(void) -{ - struct device_node *cpu; - struct device_node *np; - if (ppc_md.progress) - ppc_md.progress("mpc7448_hpc2_setup_arch():set_bridge", 0); - - cpu = of_find_node_by_type(NULL, "cpu"); - if (cpu != 0) { - unsigned int *fp; - - fp = (int *)get_property(cpu, "clock-frequency", NULL); - if (fp != 0) - loops_per_jiffy = *fp / HZ; - else - loops_per_jiffy = 50000000 / HZ; - of_node_put(cpu); - } - tsi108_csr_vir_base = get_vir_csrbase(); - -#ifdef CONFIG_ROOT_NFS - ROOT_DEV = Root_NFS; -#else - ROOT_DEV = Root_HDA1; -#endif - -#ifdef CONFIG_BLK_DEV_INITRD - ROOT_DEV = Root_RAM0; -#endif - - /* setup PCI host bridge */ -#ifdef CONFIG_PCI - for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) - tsi108_setup_pci(np); - - ppc_md.pci_exclude_device = mpc7448_hpc2_exclude_device; - if (ppc_md.progress) - ppc_md.progress("tsi108: resources set", 0x100); -#endif - - printk(KERN_INFO "MPC7448HPC2 (TAIGA) Platform\n"); - printk(KERN_INFO - "Jointly ported by Freescale and Tundra Semiconductor\n"); - printk(KERN_INFO - "Enabling L2 cache then enabling the HID0 prefetch engine.\n"); -} - -/* - * Interrupt setup and service. Interrrupts on the mpc7448_hpc2 come - * from the four external INT pins, PCI interrupts are routed via - * PCI interrupt control registers, it generates internal IRQ23 - * - * Interrupt routing on the Taiga Board: - * TSI108:PB_INT[0] -> CPU0:INT# - * TSI108:PB_INT[1] -> CPU0:MCP# - * TSI108:PB_INT[2] -> N/C - * TSI108:PB_INT[3] -> N/C - */ -static void __init mpc7448_hpc2_init_IRQ(void) -{ - struct mpic *mpic; - phys_addr_t mpic_paddr = 0; - unsigned int cascade_pci_irq; - struct device_node *tsi_pci; - struct device_node *tsi_pic; - - tsi_pic = of_find_node_by_type(NULL, "open-pic"); - if (tsi_pic) { - unsigned int size; - void *prop = get_property(tsi_pic, "reg", &size); - mpic_paddr = of_translate_address(tsi_pic, prop); - } - - if (mpic_paddr == 0) { - printk("%s: No tsi108 PIC found !\n", __FUNCTION__); - return; - } - - DBG("%s: tsi108pic phys_addr = 0x%x\n", __FUNCTION__, - (u32) mpic_paddr); - - mpic = mpic_alloc(tsi_pic, mpic_paddr, - MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET | - MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, - 0, /* num_sources used */ - 0, /* num_sources used */ - "Tsi108_PIC"); - - BUG_ON(mpic == NULL); /* XXXX */ - mpic_init(mpic); - - tsi_pci = of_find_node_by_type(NULL, "pci"); - if (tsi_pci == 0) { - printk("%s: No tsi108 pci node found !\n", __FUNCTION__); - return; - } - - cascade_pci_irq = irq_of_parse_and_map(tsi_pci, 0); - set_irq_data(cascade_pci_irq, mpic); - set_irq_chained_handler(cascade_pci_irq, tsi108_irq_cascade); - - tsi108_pci_int_init(); - - /* Configure MPIC outputs to CPU0 */ - tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0); - of_node_put(tsi_pic); -} - -void mpc7448_hpc2_show_cpuinfo(struct seq_file *m) -{ - seq_printf(m, "vendor\t\t: Freescale Semiconductor\n"); - seq_printf(m, "machine\t\t: MPC7448hpc2\n"); -} - -void mpc7448_hpc2_restart(char *cmd) -{ - local_irq_disable(); - - /* Set exception prefix high - to the firmware */ - _nmask_and_or_msr(0, MSR_IP); - - for (;;) ; /* Spin until reset happens */ -} - -void mpc7448_hpc2_power_off(void) -{ - local_irq_disable(); - for (;;) ; /* No way to shut power off with software */ -} - -void mpc7448_hpc2_halt(void) -{ - mpc7448_hpc2_power_off(); -} - -/* - * Called very early, device-tree isn't unflattened - */ -static int __init mpc7448_hpc2_probe(void) -{ - unsigned long root = of_get_flat_dt_root(); - - if (!of_flat_dt_is_compatible(root, "mpc74xx")) - return 0; - return 1; -} - -static int mpc7448_machine_check_exception(struct pt_regs *regs) -{ - extern void tsi108_clear_pci_cfg_error(void); - const struct exception_table_entry *entry; - - /* Are we prepared to handle this fault */ - if ((entry = search_exception_tables(regs->nip)) != NULL) { - tsi108_clear_pci_cfg_error(); - regs->msr |= MSR_RI; - regs->nip = entry->fixup; - return 1; - } - return 0; - -} - -define_machine(mpc7448_hpc2){ - .name = "MPC7448 HPC2", - .probe = mpc7448_hpc2_probe, - .setup_arch = mpc7448_hpc2_setup_arch, - .init_IRQ = mpc7448_hpc2_init_IRQ, - .show_cpuinfo = mpc7448_hpc2_show_cpuinfo, - .get_irq = mpic_get_irq, - .pcibios_fixup = mpc7448_hpc2_pcibios_fixup, - .restart = mpc7448_hpc2_restart, - .calibrate_decr = generic_calibrate_decr, - .machine_check_exception= mpc7448_machine_check_exception, - .progress = udbg_progress, -}; diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h deleted file mode 100644 index a543a5242..000000000 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * mpc7448_hpc2.h - * - * Definitions for Freescale MPC7448_HPC2 platform - * - * Author: Jacob Pan - * jacob.pan@freescale.com - * Maintainer: Roy Zang - * - * 2006 (c) Freescale Semiconductor, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __PPC_PLATFORMS_MPC7448_HPC2_H -#define __PPC_PLATFORMS_MPC7448_HPC2_H - -#include - -/* Base Addresses for the PCI bus - */ -#define MPC7448_HPC2_PCI_MEM_OFFSET (0x00000000) -#define MPC7448_HPC2_ISA_IO_BASE (0x00000000) -#define MPC7448_HPC2_ISA_MEM_BASE (0x00000000) -#endif /* __PPC_PLATFORMS_MPC7448_HPC2_H */ diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile index dee4eb4d8..ce8c0b943 100644 --- a/arch/powerpc/platforms/iseries/Makefile +++ b/arch/powerpc/platforms/iseries/Makefile @@ -1,11 +1,9 @@ EXTRA_CFLAGS += -mno-minimal-toc -obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ +obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o mf.o lpevents.o \ hvcall.o proc.o htab.o iommu.o misc.o irq.o obj-$(CONFIG_PCI) += pci.o vpdinfo.o +obj-$(CONFIG_IBMVIO) += vio.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_VIOPATH) += viopath.o obj-$(CONFIG_MODULES) += ksyms.o - -$(obj)/dt_mod.o: $(obj)/dt.o - @$(OBJCOPY) --rename-section .rodata.str1.8=.dt_strings $(obj)/dt.o $(obj)/dt_mod.o diff --git a/arch/powerpc/platforms/iseries/call_pci.h b/arch/powerpc/platforms/iseries/call_pci.h index dbdf69850..59d4e0ad5 100644 --- a/arch/powerpc/platforms/iseries/call_pci.h +++ b/arch/powerpc/platforms/iseries/call_pci.h @@ -145,25 +145,6 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, return retVal.rc; } -static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, - u8 deviceId, u32 offset, u32 *value) -{ - struct HvCallPci_DsaAddr dsa; - struct HvCallPci_LoadReturn retVal; - - *((u64*)&dsa) = 0; - - dsa.busNumber = busNumber; - dsa.subBusNumber = subBusNumber; - dsa.deviceId = deviceId; - - HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0); - - *value = retVal.value; - - return retVal.rc; -} - static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, u8 deviceId, u32 offset, u8 value) { diff --git a/arch/powerpc/platforms/iseries/dt.c b/arch/powerpc/platforms/iseries/dt.c deleted file mode 100644 index d194140c1..000000000 --- a/arch/powerpc/platforms/iseries/dt.c +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright (c) 2005-2006 Michael Ellerman, IBM Corporation - * - * Description: - * This file contains all the routines to build a flattened device - * tree for a legacy iSeries machine. - * - * 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. - */ - -#undef DEBUG - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* ETH_ALEN */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "processor_vpd.h" -#include "call_hpt.h" -#include "call_pci.h" -#include "pci.h" - -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif - -/* - * These are created by the linker script at the start and end - * of the section containing all the strings from this file. - */ -extern char __dt_strings_start[]; -extern char __dt_strings_end[]; - -struct iseries_flat_dt { - struct boot_param_header header; - u64 reserve_map[2]; -}; - -static void * __initdata dt_data; - -/* - * Putting these strings here keeps them out of the section - * that we rename to .dt_strings using objcopy and capture - * for the strings blob of the flattened device tree. - */ -static char __initdata device_type_cpu[] = "cpu"; -static char __initdata device_type_memory[] = "memory"; -static char __initdata device_type_serial[] = "serial"; -static char __initdata device_type_network[] = "network"; -static char __initdata device_type_block[] = "block"; -static char __initdata device_type_byte[] = "byte"; -static char __initdata device_type_pci[] = "pci"; -static char __initdata device_type_vdevice[] = "vdevice"; -static char __initdata device_type_vscsi[] = "vscsi"; - -static struct iseries_flat_dt * __init dt_init(void) -{ - struct iseries_flat_dt *dt; - unsigned long str_len; - - str_len = __dt_strings_end - __dt_strings_start; - dt = (struct iseries_flat_dt *)ALIGN(klimit, 8); - dt->header.off_mem_rsvmap = - offsetof(struct iseries_flat_dt, reserve_map); - dt->header.off_dt_strings = ALIGN(sizeof(*dt), 8); - dt->header.off_dt_struct = dt->header.off_dt_strings - + ALIGN(str_len, 8); - dt_data = (void *)((unsigned long)dt + dt->header.off_dt_struct); - dt->header.dt_strings_size = str_len; - - /* There is no notion of hardware cpu id on iSeries */ - dt->header.boot_cpuid_phys = smp_processor_id(); - - memcpy((char *)dt + dt->header.off_dt_strings, __dt_strings_start, - str_len); - - dt->header.magic = OF_DT_HEADER; - dt->header.version = 0x10; - dt->header.last_comp_version = 0x10; - - dt->reserve_map[0] = 0; - dt->reserve_map[1] = 0; - - return dt; -} - -static void __init dt_push_u32(struct iseries_flat_dt *dt, u32 value) -{ - *((u32 *)dt_data) = value; - dt_data += sizeof(u32); -} - -#ifdef notyet -static void __init dt_push_u64(struct iseries_flat_dt *dt, u64 value) -{ - *((u64 *)dt_data) = value; - dt_data += sizeof(u64); -} -#endif - -static void __init dt_push_bytes(struct iseries_flat_dt *dt, const char *data, - int len) -{ - memcpy(dt_data, data, len); - dt_data += ALIGN(len, 4); -} - -static void __init dt_start_node(struct iseries_flat_dt *dt, const char *name) -{ - dt_push_u32(dt, OF_DT_BEGIN_NODE); - dt_push_bytes(dt, name, strlen(name) + 1); -} - -#define dt_end_node(dt) dt_push_u32(dt, OF_DT_END_NODE) - -static void __init dt_prop(struct iseries_flat_dt *dt, const char *name, - const void *data, int len) -{ - unsigned long offset; - - dt_push_u32(dt, OF_DT_PROP); - - /* Length of the data */ - dt_push_u32(dt, len); - - offset = name - __dt_strings_start; - - /* The offset of the properties name in the string blob. */ - dt_push_u32(dt, (u32)offset); - - /* The actual data. */ - dt_push_bytes(dt, data, len); -} - -static void __init dt_prop_str(struct iseries_flat_dt *dt, const char *name, - const char *data) -{ - dt_prop(dt, name, data, strlen(data) + 1); /* + 1 for NULL */ -} - -static void __init dt_prop_u32(struct iseries_flat_dt *dt, const char *name, - u32 data) -{ - dt_prop(dt, name, &data, sizeof(u32)); -} - -#ifdef notyet -static void __init dt_prop_u64(struct iseries_flat_dt *dt, const char *name, - u64 data) -{ - dt_prop(dt, name, &data, sizeof(u64)); -} -#endif - -static void __init dt_prop_u64_list(struct iseries_flat_dt *dt, - const char *name, u64 *data, int n) -{ - dt_prop(dt, name, data, sizeof(u64) * n); -} - -static void __init dt_prop_u32_list(struct iseries_flat_dt *dt, - const char *name, u32 *data, int n) -{ - dt_prop(dt, name, data, sizeof(u32) * n); -} - -#ifdef notyet -static void __init dt_prop_empty(struct iseries_flat_dt *dt, const char *name) -{ - dt_prop(dt, name, NULL, 0); -} -#endif - -static void __init dt_cpus(struct iseries_flat_dt *dt) -{ - unsigned char buf[32]; - unsigned char *p; - unsigned int i, index; - struct IoHriProcessorVpd *d; - u32 pft_size[2]; - - /* yuck */ - snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); - p = strchr(buf, ' '); - if (!p) p = buf + strlen(buf); - - dt_start_node(dt, "cpus"); - dt_prop_u32(dt, "#address-cells", 1); - dt_prop_u32(dt, "#size-cells", 0); - - pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */ - pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE); - - for (i = 0; i < NR_CPUS; i++) { - if (lppaca[i].dyn_proc_status >= 2) - continue; - - snprintf(p, 32 - (p - buf), "@%d", i); - dt_start_node(dt, buf); - - dt_prop_str(dt, "device_type", device_type_cpu); - - index = lppaca[i].dyn_hv_phys_proc_index; - d = &xIoHriProcessorVpd[index]; - - dt_prop_u32(dt, "i-cache-size", d->xInstCacheSize * 1024); - dt_prop_u32(dt, "i-cache-line-size", d->xInstCacheOperandSize); - - dt_prop_u32(dt, "d-cache-size", d->xDataL1CacheSizeKB * 1024); - dt_prop_u32(dt, "d-cache-line-size", d->xDataCacheOperandSize); - - /* magic conversions to Hz copied from old code */ - dt_prop_u32(dt, "clock-frequency", - ((1UL << 34) * 1000000) / d->xProcFreq); - dt_prop_u32(dt, "timebase-frequency", - ((1UL << 32) * 1000000) / d->xTimeBaseFreq); - - dt_prop_u32(dt, "reg", i); - - dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2); - - dt_end_node(dt); - } - - dt_end_node(dt); -} - -static void __init dt_model(struct iseries_flat_dt *dt) -{ - char buf[16] = "IBM,"; - - /* N.B. lparcfg.c knows about the "IBM," prefixes ... */ - /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ - strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); - strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); - buf[11] = '\0'; - dt_prop_str(dt, "system-id", buf); - - /* "IBM," + machineType[0:4] */ - strne2a(buf + 4, xItExtVpdPanel.machineType, 4); - buf[8] = '\0'; - dt_prop_str(dt, "model", buf); - - dt_prop_str(dt, "compatible", "IBM,iSeries"); - dt_prop_u32(dt, "ibm,partition-no", HvLpConfig_getLpIndex()); -} - -static void __init dt_do_vdevice(struct iseries_flat_dt *dt, - const char *name, u32 reg, int unit, - const char *type, const char *compat, int end) -{ - char buf[32]; - - snprintf(buf, 32, "%s@%08x", name, reg + ((unit >= 0) ? unit : 0)); - dt_start_node(dt, buf); - dt_prop_str(dt, "device_type", type); - if (compat) - dt_prop_str(dt, "compatible", compat); - dt_prop_u32(dt, "reg", reg + ((unit >= 0) ? unit : 0)); - if (unit >= 0) - dt_prop_u32(dt, "linux,unit_address", unit); - if (end) - dt_end_node(dt); -} - -static void __init dt_vdevices(struct iseries_flat_dt *dt) -{ - u32 reg = 0; - HvLpIndexMap vlan_map; - int i; - - dt_start_node(dt, "vdevice"); - dt_prop_str(dt, "device_type", device_type_vdevice); - dt_prop_str(dt, "compatible", "IBM,iSeries-vdevice"); - dt_prop_u32(dt, "#address-cells", 1); - dt_prop_u32(dt, "#size-cells", 0); - - dt_do_vdevice(dt, "vty", reg, -1, device_type_serial, NULL, 1); - reg++; - - dt_do_vdevice(dt, "v-scsi", reg, -1, device_type_vscsi, - "IBM,v-scsi", 1); - reg++; - - vlan_map = HvLpConfig_getVirtualLanIndexMap(); - for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; i++) { - unsigned char mac_addr[ETH_ALEN]; - - if ((vlan_map & (0x8000 >> i)) == 0) - continue; - dt_do_vdevice(dt, "l-lan", reg, i, device_type_network, - "IBM,iSeries-l-lan", 0); - mac_addr[0] = 0x02; - mac_addr[1] = 0x01; - mac_addr[2] = 0xff; - mac_addr[3] = i; - mac_addr[4] = 0xff; - mac_addr[5] = HvLpConfig_getLpIndex_outline(); - dt_prop(dt, "local-mac-address", (char *)mac_addr, ETH_ALEN); - dt_prop(dt, "mac-address", (char *)mac_addr, ETH_ALEN); - dt_prop_u32(dt, "max-frame-size", 9000); - dt_prop_u32(dt, "address-bits", 48); - - dt_end_node(dt); - } - reg += HVMAXARCHITECTEDVIRTUALLANS; - - for (i = 0; i < HVMAXARCHITECTEDVIRTUALDISKS; i++) - dt_do_vdevice(dt, "viodasd", reg, i, device_type_block, - "IBM,iSeries-viodasd", 1); - reg += HVMAXARCHITECTEDVIRTUALDISKS; - - for (i = 0; i < HVMAXARCHITECTEDVIRTUALCDROMS; i++) - dt_do_vdevice(dt, "viocd", reg, i, device_type_block, - "IBM,iSeries-viocd", 1); - reg += HVMAXARCHITECTEDVIRTUALCDROMS; - - for (i = 0; i < HVMAXARCHITECTEDVIRTUALTAPES; i++) - dt_do_vdevice(dt, "viotape", reg, i, device_type_byte, - "IBM,iSeries-viotape", 1); - - dt_end_node(dt); -} - -struct pci_class_name { - u16 code; - const char *name; - const char *type; -}; - -static struct pci_class_name __initdata pci_class_name[] = { - { PCI_CLASS_NETWORK_ETHERNET, "ethernet", device_type_network }, -}; - -static struct pci_class_name * __init dt_find_pci_class_name(u16 class_code) -{ - struct pci_class_name *cp; - - for (cp = pci_class_name; - cp < &pci_class_name[ARRAY_SIZE(pci_class_name)]; cp++) - if (cp->code == class_code) - return cp; - return NULL; -} - -/* - * This assumes that the node slot is always on the primary bus! - */ -static void __init scan_bridge_slot(struct iseries_flat_dt *dt, - HvBusNumber bus, struct HvCallPci_BridgeInfo *bridge_info) -{ - HvSubBusNumber sub_bus = bridge_info->subBusNumber; - u16 vendor_id; - u16 device_id; - u32 class_id; - int err; - char buf[32]; - u32 reg[5]; - int id_sel = ISERIES_GET_DEVICE_FROM_SUBBUS(sub_bus); - int function = ISERIES_GET_FUNCTION_FROM_SUBBUS(sub_bus); - HvAgentId eads_id_sel = ISERIES_PCI_AGENTID(id_sel, function); - u8 devfn; - struct pci_class_name *cp; - - /* - * Connect all functions of any device found. - */ - for (id_sel = 1; id_sel <= bridge_info->maxAgents; id_sel++) { - for (function = 0; function < 8; function++) { - HvAgentId agent_id = ISERIES_PCI_AGENTID(id_sel, - function); - err = HvCallXm_connectBusUnit(bus, sub_bus, - agent_id, 0); - if (err) { - if (err != 0x302) - DBG("connectBusUnit(%x, %x, %x) %x\n", - bus, sub_bus, agent_id, err); - continue; - } - - err = HvCallPci_configLoad16(bus, sub_bus, agent_id, - PCI_VENDOR_ID, &vendor_id); - if (err) { - DBG("ReadVendor(%x, %x, %x) %x\n", - bus, sub_bus, agent_id, err); - continue; - } - err = HvCallPci_configLoad16(bus, sub_bus, agent_id, - PCI_DEVICE_ID, &device_id); - if (err) { - DBG("ReadDevice(%x, %x, %x) %x\n", - bus, sub_bus, agent_id, err); - continue; - } - err = HvCallPci_configLoad32(bus, sub_bus, agent_id, - PCI_CLASS_REVISION , &class_id); - if (err) { - DBG("ReadClass(%x, %x, %x) %x\n", - bus, sub_bus, agent_id, err); - continue; - } - - devfn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(eads_id_sel), - function); - cp = dt_find_pci_class_name(class_id >> 16); - if (cp && cp->name) - strncpy(buf, cp->name, sizeof(buf) - 1); - else - snprintf(buf, sizeof(buf), "pci%x,%x", - vendor_id, device_id); - buf[sizeof(buf) - 1] = '\0'; - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "@%x", PCI_SLOT(devfn)); - buf[sizeof(buf) - 1] = '\0'; - if (function != 0) - snprintf(buf + strlen(buf), - sizeof(buf) - strlen(buf), - ",%x", function); - dt_start_node(dt, buf); - reg[0] = (bus << 16) | (devfn << 8); - reg[1] = 0; - reg[2] = 0; - reg[3] = 0; - reg[4] = 0; - dt_prop_u32_list(dt, "reg", reg, 5); - if (cp && (cp->type || cp->name)) - dt_prop_str(dt, "device_type", - cp->type ? cp->type : cp->name); - dt_prop_u32(dt, "vendor-id", vendor_id); - dt_prop_u32(dt, "device-id", device_id); - dt_prop_u32(dt, "class-code", class_id >> 8); - dt_prop_u32(dt, "revision-id", class_id & 0xff); - dt_prop_u32(dt, "linux,subbus", sub_bus); - dt_prop_u32(dt, "linux,agent-id", agent_id); - dt_prop_u32(dt, "linux,logical-slot-number", - bridge_info->logicalSlotNumber); - dt_end_node(dt); - - } - } -} - -static void __init scan_bridge(struct iseries_flat_dt *dt, HvBusNumber bus, - HvSubBusNumber sub_bus, int id_sel) -{ - struct HvCallPci_BridgeInfo bridge_info; - HvAgentId agent_id; - int function; - int ret; - - /* Note: hvSubBus and irq is always be 0 at this level! */ - for (function = 0; function < 8; ++function) { - agent_id = ISERIES_PCI_AGENTID(id_sel, function); - ret = HvCallXm_connectBusUnit(bus, sub_bus, agent_id, 0); - if (ret != 0) { - if (ret != 0xb) - DBG("connectBusUnit(%x, %x, %x) %x\n", - bus, sub_bus, agent_id, ret); - continue; - } - DBG("found device at bus %d idsel %d func %d (AgentId %x)\n", - bus, id_sel, function, agent_id); - ret = HvCallPci_getBusUnitInfo(bus, sub_bus, agent_id, - iseries_hv_addr(&bridge_info), - sizeof(struct HvCallPci_BridgeInfo)); - if (ret != 0) - continue; - DBG("bridge info: type %x subbus %x " - "maxAgents %x maxsubbus %x logslot %x\n", - bridge_info.busUnitInfo.deviceType, - bridge_info.subBusNumber, - bridge_info.maxAgents, - bridge_info.maxSubBusNumber, - bridge_info.logicalSlotNumber); - if (bridge_info.busUnitInfo.deviceType == - HvCallPci_BridgeDevice) - scan_bridge_slot(dt, bus, &bridge_info); - else - DBG("PCI: Invalid Bridge Configuration(0x%02X)", - bridge_info.busUnitInfo.deviceType); - } -} - -static void __init scan_phb(struct iseries_flat_dt *dt, HvBusNumber bus) -{ - struct HvCallPci_DeviceInfo dev_info; - const HvSubBusNumber sub_bus = 0; /* EADs is always 0. */ - int err; - int id_sel; - const int max_agents = 8; - - /* - * Probe for EADs Bridges - */ - for (id_sel = 1; id_sel < max_agents; ++id_sel) { - err = HvCallPci_getDeviceInfo(bus, sub_bus, id_sel, - iseries_hv_addr(&dev_info), - sizeof(struct HvCallPci_DeviceInfo)); - if (err) { - if (err != 0x302) - DBG("getDeviceInfo(%x, %x, %x) %x\n", - bus, sub_bus, id_sel, err); - continue; - } - if (dev_info.deviceType != HvCallPci_NodeDevice) { - DBG("PCI: Invalid System Configuration" - "(0x%02X) for bus 0x%02x id 0x%02x.\n", - dev_info.deviceType, bus, id_sel); - continue; - } - scan_bridge(dt, bus, sub_bus, id_sel); - } -} - -static void __init dt_pci_devices(struct iseries_flat_dt *dt) -{ - HvBusNumber bus; - char buf[32]; - u32 buses[2]; - int phb_num = 0; - - /* Check all possible buses. */ - for (bus = 0; bus < 256; bus++) { - int err = HvCallXm_testBus(bus); - - if (err) { - /* - * Check for Unexpected Return code, a clue that - * something has gone wrong. - */ - if (err != 0x0301) - DBG("Unexpected Return on Probe(0x%02X) " - "0x%04X\n", bus, err); - continue; - } - DBG("bus %d appears to exist\n", bus); - snprintf(buf, 32, "pci@%d", phb_num); - dt_start_node(dt, buf); - dt_prop_str(dt, "device_type", device_type_pci); - dt_prop_str(dt, "compatible", "IBM,iSeries-Logical-PHB"); - dt_prop_u32(dt, "#address-cells", 3); - dt_prop_u32(dt, "#size-cells", 2); - buses[0] = buses[1] = bus; - dt_prop_u32_list(dt, "bus-range", buses, 2); - scan_phb(dt, bus); - dt_end_node(dt); - phb_num++; - } -} - -static void dt_finish(struct iseries_flat_dt *dt) -{ - dt_push_u32(dt, OF_DT_END); - dt->header.totalsize = (unsigned long)dt_data - (unsigned long)dt; - klimit = ALIGN((unsigned long)dt_data, 8); -} - -void * __init build_flat_dt(unsigned long phys_mem_size) -{ - struct iseries_flat_dt *iseries_dt; - u64 tmp[2]; - - iseries_dt = dt_init(); - - dt_start_node(iseries_dt, ""); - - dt_prop_u32(iseries_dt, "#address-cells", 2); - dt_prop_u32(iseries_dt, "#size-cells", 2); - dt_model(iseries_dt); - - /* /memory */ - dt_start_node(iseries_dt, "memory@0"); - dt_prop_str(iseries_dt, "device_type", device_type_memory); - tmp[0] = 0; - tmp[1] = phys_mem_size; - dt_prop_u64_list(iseries_dt, "reg", tmp, 2); - dt_end_node(iseries_dt); - - /* /chosen */ - dt_start_node(iseries_dt, "chosen"); - dt_prop_str(iseries_dt, "bootargs", cmd_line); - dt_end_node(iseries_dt); - - dt_cpus(iseries_dt); - - dt_vdevices(iseries_dt); - dt_pci_devices(iseries_dt); - - dt_end_node(iseries_dt); - - dt_finish(iseries_dt); - - return iseries_dt; -} diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c index ed44dfcea..30bdcf392 100644 --- a/arch/powerpc/platforms/iseries/htab.c +++ b/arch/powerpc/platforms/iseries/htab.c @@ -242,11 +242,13 @@ static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va, local_irq_restore(flags); } -void __init hpte_init_iSeries(void) +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; + + htab_finish_init(); } diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index e3bd2015f..bea0b703f 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c @@ -4,7 +4,6 @@ * Rewrite, cleanup: * * Copyright (C) 2004 Olof Johansson , IBM Corporation - * Copyright (C) 2006 Olof Johansson * * Dynamic DMA mapping support, iSeries-specific parts. * @@ -32,37 +31,42 @@ #include #include #include -#include #include #include -#include + +#include "iommu.h" + +extern struct list_head iSeries_Global_Device_List; + static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, unsigned long uaddr, enum dma_data_direction direction) { u64 rc; - u64 tce, rpn; + union tce_entry tce; index <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; while (npages--) { - rpn = virt_to_abs(uaddr) >> TCE_SHIFT; - tce = (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; + tce.te_word = 0; + tce.te_bits.tb_rpn = virt_to_abs(uaddr) >> TCE_SHIFT; if (tbl->it_type == TCE_VB) { /* Virtual Bus */ - tce |= TCE_VALID|TCE_ALLIO; + tce.te_bits.tb_valid = 1; + tce.te_bits.tb_allio = 1; if (direction != DMA_TO_DEVICE) - tce |= TCE_VB_WRITE; + tce.te_bits.tb_rdwr = 1; } else { /* PCI Bus */ - tce |= TCE_PCI_READ; /* Read allowed */ + tce.te_bits.tb_rdwr = 1; /* Read allowed */ if (direction != DMA_TO_DEVICE) - tce |= TCE_PCI_WRITE; + tce.te_bits.tb_pciwr = 1; } - rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, tce); + rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, + tce.te_word); if (rc) panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n", rc); @@ -120,7 +124,7 @@ void iommu_table_getparms_iSeries(unsigned long busno, /* itc_size is in pages worth of table, it_size is in # of entries */ tbl->it_size = ((parms->itc_size * TCE_PAGE_SIZE) / - TCE_ENTRY_SIZE) >> TCE_PAGE_FACTOR; + sizeof(union tce_entry)) >> TCE_PAGE_FACTOR; tbl->it_busno = parms->itc_busno; tbl->it_offset = parms->itc_offset >> TCE_PAGE_FACTOR; tbl->it_index = parms->itc_index; @@ -138,15 +142,10 @@ void iommu_table_getparms_iSeries(unsigned long busno, */ static struct iommu_table *iommu_table_find(struct iommu_table * tbl) { - struct device_node *node; + struct pci_dn *pdn; - for (node = NULL; (node = of_find_all_nodes(node)); ) { - struct pci_dn *pdn = PCI_DN(node); - struct iommu_table *it; - - if (pdn == NULL) - continue; - it = pdn->iommu_table; + list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { + struct iommu_table *it = pdn->iommu_table; if ((it != NULL) && (it->it_type == TCE_PCI) && (it->it_offset == tbl->it_offset) && @@ -162,18 +161,15 @@ void iommu_devnode_init_iSeries(struct device_node *dn) { struct iommu_table *tbl; struct pci_dn *pdn = PCI_DN(dn); - u32 *lsn = (u32 *)get_property(dn, "linux,logical-slot-number", NULL); - - BUG_ON(lsn == NULL); tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); - iommu_table_getparms_iSeries(pdn->busno, *lsn, 0, tbl); + iommu_table_getparms_iSeries(pdn->busno, pdn->LogicalSlot, 0, tbl); /* Look for existing tce table */ pdn->iommu_table = iommu_table_find(tbl); if (pdn->iommu_table == NULL) - pdn->iommu_table = iommu_init_table(tbl, -1); + pdn->iommu_table = iommu_init_table(tbl); else kfree(tbl); } diff --git a/include/asm-powerpc/iseries/iommu.h b/arch/powerpc/platforms/iseries/iommu.h similarity index 90% rename from include/asm-powerpc/iseries/iommu.h rename to arch/powerpc/platforms/iseries/iommu.h index 0edbfe10c..cb5658fbe 100644 --- a/include/asm-powerpc/iseries/iommu.h +++ b/arch/powerpc/platforms/iseries/iommu.h @@ -1,5 +1,5 @@ -#ifndef _ASM_POWERPC_ISERIES_IOMMU_H -#define _ASM_POWERPC_ISERIES_IOMMU_H +#ifndef _PLATFORMS_ISERIES_IOMMU_H +#define _PLATFORMS_ISERIES_IOMMU_H /* * Copyright (C) 2005 Stephen Rothwell, IBM Corporation @@ -32,4 +32,4 @@ extern void iommu_table_getparms_iSeries(unsigned long busno, unsigned char slotno, unsigned char virtbus, struct iommu_table *tbl); -#endif /* _ASM_POWERPC_ISERIES_IOMMU_H */ +#endif /* _PLATFORMS_ISERIES_IOMMU_H */ diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index e32446877..be3fbfc24 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c @@ -23,6 +23,7 @@ * Created, December 13, 2000 by Wayne Holm * End Change Activity */ +#include #include #include #include @@ -41,7 +42,6 @@ #include #include "irq.h" -#include "pci.h" #include "call_pci.h" #if defined(CONFIG_SMP) @@ -162,6 +162,27 @@ static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) printk(KERN_ERR "pci_event_handler: NULL event received\n"); } +/* + * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c + * It must be called before the bus walk. + */ +void __init iSeries_init_IRQ(void) +{ + /* Register PCI event handler and open an event path */ + int ret; + + ret = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, + &pci_event_handler); + if (ret == 0) { + ret = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); + if (ret != 0) + printk(KERN_ERR "iseries_init_IRQ: open event path " + "failed with rc 0x%x\n", ret); + } else + printk(KERN_ERR "iseries_init_IRQ: register handler " + "failed with rc 0x%x\n", ret); +} + #define REAL_IRQ_TO_SUBBUS(irq) (((irq) >> 14) & 0xff) #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) #define REAL_IRQ_TO_IDSEL(irq) ((((irq) >> 3) & 7) + 1) @@ -175,7 +196,7 @@ static void iseries_enable_IRQ(unsigned int irq) { u32 bus, dev_id, function, mask; const u32 sub_bus = 0; - unsigned int rirq = (unsigned int)irq_map[irq].hwirq; + unsigned int rirq = virt_irq_to_real_map[irq]; /* The IRQ has already been locked by the caller */ bus = REAL_IRQ_TO_BUS(rirq); @@ -192,7 +213,7 @@ static unsigned int iseries_startup_IRQ(unsigned int irq) { u32 bus, dev_id, function, mask; const u32 sub_bus = 0; - unsigned int rirq = (unsigned int)irq_map[irq].hwirq; + unsigned int rirq = virt_irq_to_real_map[irq]; bus = REAL_IRQ_TO_BUS(rirq); function = REAL_IRQ_TO_FUNC(rirq); @@ -220,9 +241,9 @@ void __init iSeries_activate_IRQs() for_each_irq (irq) { irq_desc_t *desc = get_irq_desc(irq); - if (desc && desc->chip && desc->chip->startup) { + if (desc && desc->handler && desc->handler->startup) { spin_lock_irqsave(&desc->lock, flags); - desc->chip->startup(irq); + desc->handler->startup(irq); spin_unlock_irqrestore(&desc->lock, flags); } } @@ -233,7 +254,7 @@ static void iseries_shutdown_IRQ(unsigned int irq) { u32 bus, dev_id, function, mask; const u32 sub_bus = 0; - unsigned int rirq = (unsigned int)irq_map[irq].hwirq; + unsigned int rirq = virt_irq_to_real_map[irq]; /* irq should be locked by the caller */ bus = REAL_IRQ_TO_BUS(rirq); @@ -256,7 +277,7 @@ static void iseries_disable_IRQ(unsigned int irq) { u32 bus, dev_id, function, mask; const u32 sub_bus = 0; - unsigned int rirq = (unsigned int)irq_map[irq].hwirq; + unsigned int rirq = virt_irq_to_real_map[irq]; /* The IRQ has already been locked by the caller */ bus = REAL_IRQ_TO_BUS(rirq); @@ -270,19 +291,19 @@ static void iseries_disable_IRQ(unsigned int irq) static void iseries_end_IRQ(unsigned int irq) { - unsigned int rirq = (unsigned int)irq_map[irq].hwirq; + unsigned int rirq = virt_irq_to_real_map[irq]; HvCallPci_eoi(REAL_IRQ_TO_BUS(rirq), REAL_IRQ_TO_SUBBUS(rirq), (REAL_IRQ_TO_IDSEL(rirq) << 4) + REAL_IRQ_TO_FUNC(rirq)); } -static struct irq_chip iseries_pic = { - .typename = "iSeries irq controller", - .startup = iseries_startup_IRQ, - .shutdown = iseries_shutdown_IRQ, - .unmask = iseries_enable_IRQ, - .mask = iseries_disable_IRQ, - .eoi = iseries_end_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 }; /* @@ -291,16 +312,19 @@ static struct irq_chip iseries_pic = { * Note that sub_bus is always 0 (at the moment at least). */ int __init iSeries_allocate_IRQ(HvBusNumber bus, - HvSubBusNumber sub_bus, u32 bsubbus) + HvSubBusNumber sub_bus, HvAgentId dev_id) { + int virtirq; unsigned int realirq; - u8 idsel = ISERIES_GET_DEVICE_FROM_SUBBUS(bsubbus); - u8 function = ISERIES_GET_FUNCTION_FROM_SUBBUS(bsubbus); + u8 idsel = (dev_id >> 4); + u8 function = dev_id & 7; realirq = (((((sub_bus << 8) + (bus - 1)) << 3) + (idsel - 1)) << 3) + function; + virtirq = virt_irq_create_mapping(realirq); - return irq_create_mapping(NULL, realirq); + irq_desc[virtirq].handler = &iSeries_IRQ_handler; + return virtirq; } #endif /* CONFIG_PCI */ @@ -308,9 +332,10 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus, /* * Get the next pending IRQ. */ -unsigned int iSeries_get_irq(struct pt_regs *regs) +int iSeries_get_irq(struct pt_regs *regs) { - int irq = NO_IRQ_IGNORE; + /* -2 means ignore this interrupt */ + int irq = -2; #ifdef CONFIG_SMP if (get_lppaca()->int_dword.fields.ipi_cnt) { @@ -333,57 +358,9 @@ unsigned int iSeries_get_irq(struct pt_regs *regs) } spin_unlock(&pending_irqs_lock); if (irq >= NR_IRQS) - irq = NO_IRQ_IGNORE; + irq = -2; } #endif return irq; } - -static int iseries_irq_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - set_irq_chip_and_handler(virq, &iseries_pic, handle_fasteoi_irq); - - return 0; -} - -static struct irq_host_ops iseries_irq_host_ops = { - .map = iseries_irq_host_map, -}; - -/* - * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c - * It must be called before the bus walk. - */ -void __init iSeries_init_IRQ(void) -{ - /* Register PCI event handler and open an event path */ - struct irq_host *host; - int ret; - - /* - * The Hypervisor only allows us up to 256 interrupt - * sources (the irq number is passed in a u8). - */ - irq_set_virq_count(256); - - /* Create irq host. No need for a revmap since HV will give us - * back our virtual irq number - */ - host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &iseries_irq_host_ops, 0); - BUG_ON(host == NULL); - irq_set_default_host(host); - - ret = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, - &pci_event_handler); - if (ret == 0) { - ret = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); - if (ret != 0) - printk(KERN_ERR "iseries_init_IRQ: open event path " - "failed with rc 0x%x\n", ret); - } else - printk(KERN_ERR "iseries_init_IRQ: register handler " - "failed with rc 0x%x\n", ret); -} - diff --git a/arch/powerpc/platforms/iseries/irq.h b/arch/powerpc/platforms/iseries/irq.h index 1ee898514..b9c801ba5 100644 --- a/arch/powerpc/platforms/iseries/irq.h +++ b/arch/powerpc/platforms/iseries/irq.h @@ -2,8 +2,8 @@ #define _ISERIES_IRQ_H extern void iSeries_init_IRQ(void); -extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32); +extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); extern void iSeries_activate_IRQs(void); -extern unsigned int iSeries_get_irq(struct pt_regs *); +extern int iSeries_get_irq(struct pt_regs *); #endif /* _ISERIES_IRQ_H */ diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c index a7769445d..438e2dba6 100644 --- a/arch/powerpc/platforms/iseries/lpardata.c +++ b/arch/powerpc/platforms/iseries/lpardata.c @@ -6,6 +6,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 2a9f81ea2..8ca7b9396 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -51,21 +51,20 @@ static unsigned lpEventHandlerPaths[HvLpEvent_Type_NumTypes]; static struct HvLpEvent * get_next_hvlpevent(void) { struct HvLpEvent * event; - event = (struct HvLpEvent *)hvlpevent_queue.hq_current_event; + event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; if (hvlpevent_is_valid(event)) { /* rmb() needed only for weakly consistent machines (regatta) */ rmb(); /* Set pointer to next potential event */ - hvlpevent_queue.hq_current_event += ((event->xSizeMinus1 + - IT_LP_EVENT_ALIGN) / IT_LP_EVENT_ALIGN) * - IT_LP_EVENT_ALIGN; + hvlpevent_queue.xSlicCurEventPtr += ((event->xSizeMinus1 + + LpEventAlign) / LpEventAlign) * LpEventAlign; /* Wrap to beginning if no room at end */ - if (hvlpevent_queue.hq_current_event > - hvlpevent_queue.hq_last_event) { - hvlpevent_queue.hq_current_event = - hvlpevent_queue.hq_event_stack; + if (hvlpevent_queue.xSlicCurEventPtr > + hvlpevent_queue.xSlicLastValidEventPtr) { + hvlpevent_queue.xSlicCurEventPtr = + hvlpevent_queue.xSlicEventStackPtr; } } else { event = NULL; @@ -83,10 +82,10 @@ int hvlpevent_is_pending(void) if (smp_processor_id() >= spread_lpevents) return 0; - next_event = (struct HvLpEvent *)hvlpevent_queue.hq_current_event; + next_event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; return hvlpevent_is_valid(next_event) || - hvlpevent_queue.hq_overflow_pending; + hvlpevent_queue.xPlicOverflowIntPending; } static void hvlpevent_clear_valid(struct HvLpEvent * event) @@ -96,18 +95,18 @@ static void hvlpevent_clear_valid(struct HvLpEvent * event) * ie. on 64-byte boundaries. */ struct HvLpEvent *tmp; - unsigned extra = ((event->xSizeMinus1 + IT_LP_EVENT_ALIGN) / - IT_LP_EVENT_ALIGN) - 1; + unsigned extra = ((event->xSizeMinus1 + LpEventAlign) / + LpEventAlign) - 1; switch (extra) { case 3: - tmp = (struct HvLpEvent*)((char*)event + 3 * IT_LP_EVENT_ALIGN); + tmp = (struct HvLpEvent*)((char*)event + 3 * LpEventAlign); hvlpevent_invalidate(tmp); case 2: - tmp = (struct HvLpEvent*)((char*)event + 2 * IT_LP_EVENT_ALIGN); + tmp = (struct HvLpEvent*)((char*)event + 2 * LpEventAlign); hvlpevent_invalidate(tmp); case 1: - tmp = (struct HvLpEvent*)((char*)event + 1 * IT_LP_EVENT_ALIGN); + tmp = (struct HvLpEvent*)((char*)event + 1 * LpEventAlign); hvlpevent_invalidate(tmp); } @@ -121,7 +120,7 @@ void process_hvlpevents(struct pt_regs *regs) struct HvLpEvent * event; /* If we have recursed, just return */ - if (!spin_trylock(&hvlpevent_queue.hq_lock)) + if (!spin_trylock(&hvlpevent_queue.lock)) return; for (;;) { @@ -149,17 +148,17 @@ void process_hvlpevents(struct pt_regs *regs) printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); hvlpevent_clear_valid(event); - } else if (hvlpevent_queue.hq_overflow_pending) + } else if (hvlpevent_queue.xPlicOverflowIntPending) /* * No more valid events. If overflow events are * pending process them */ - HvCallEvent_getOverflowLpEvents(hvlpevent_queue.hq_index); + HvCallEvent_getOverflowLpEvents(hvlpevent_queue.xIndex); else break; } - spin_unlock(&hvlpevent_queue.hq_lock); + spin_unlock(&hvlpevent_queue.lock); } static int set_spread_lpevents(char *str) @@ -185,20 +184,20 @@ void setup_hvlpevent_queue(void) { void *eventStack; - spin_lock_init(&hvlpevent_queue.hq_lock); + spin_lock_init(&hvlpevent_queue.lock); /* Allocate a page for the Event Stack. */ - eventStack = alloc_bootmem_pages(IT_LP_EVENT_STACK_SIZE); - memset(eventStack, 0, IT_LP_EVENT_STACK_SIZE); + eventStack = alloc_bootmem_pages(LpEventStackSize); + memset(eventStack, 0, LpEventStackSize); /* Invoke the hypervisor to initialize the event stack */ - HvCallEvent_setLpEventStack(0, eventStack, IT_LP_EVENT_STACK_SIZE); + HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); - hvlpevent_queue.hq_event_stack = eventStack; - hvlpevent_queue.hq_current_event = eventStack; - hvlpevent_queue.hq_last_event = (char *)eventStack + - (IT_LP_EVENT_STACK_SIZE - IT_LP_EVENT_MAX_SIZE); - hvlpevent_queue.hq_index = 0; + hvlpevent_queue.xSlicEventStackPtr = (char *)eventStack; + hvlpevent_queue.xSlicCurEventPtr = (char *)eventStack; + hvlpevent_queue.xSlicLastValidEventPtr = (char *)eventStack + + (LpEventStackSize - LpEventMaxSize); + hvlpevent_queue.xIndex = 0; } /* Register a handler for an LpEvent type */ diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index 1a2c2a50f..d771b8ee8 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c @@ -45,6 +45,7 @@ #include "setup.h" +extern int piranha_simulator; static int mf_initialized; /* @@ -657,7 +658,7 @@ static void mf_clear_src(void) void __init mf_display_progress(u16 value) { - if (!mf_initialized) + if (piranha_simulator || !mf_initialized) return; if (0xFFFF == value) @@ -1294,6 +1295,9 @@ __initcall(mf_proc_init); */ void iSeries_get_rtc_time(struct rtc_time *rtc_tm) { + if (piranha_simulator) + return; + mf_get_rtc(rtc_tm); rtc_tm->tm_mon--; } @@ -1312,6 +1316,9 @@ unsigned long iSeries_get_boot_time(void) { struct rtc_time tm; + if (piranha_simulator) + return 0; + mf_get_boot_rtc(&tm); return mktime(tm.tm_year + 1900, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 35bcc9811..a19833b88 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c @@ -37,18 +37,36 @@ #include #include -#include #include #include "irq.h" #include "pci.h" #include "call_pci.h" +#include "iommu.h" + +extern unsigned long io_page_mask; /* * Forward declares of prototypes. */ static struct device_node *find_Device_Node(int bus, int devfn); +static void scan_PHB_slots(struct pci_controller *Phb); +static void scan_EADS_bridge(HvBusNumber Bus, HvSubBusNumber SubBus, int IdSel); +static int scan_bridge_slot(HvBusNumber Bus, struct HvCallPci_BridgeInfo *Info); + +LIST_HEAD(iSeries_Global_Device_List); + +static int DeviceCount; + +/* 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 int Pci_Retry_Max = 3; /* Only retry 3 times */ static int Pci_Error_Flag = 1; /* Set Retry Error on. */ @@ -63,18 +81,40 @@ static struct pci_ops iSeries_pci_ops; #define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL #define BASE_IO_MEMORY 0xE000000000000000UL -static unsigned long max_io_memory = BASE_IO_MEMORY; +static unsigned long max_io_memory = 0xE000000000000000UL; static long current_iomm_table_entry; /* * Lookup Tables. */ -static struct device_node *iomm_table[IOMM_TABLE_MAX_ENTRIES]; -static u8 iobar_table[IOMM_TABLE_MAX_ENTRIES]; +static struct device_node **iomm_table; +static u8 *iobar_table; -static const char pci_io_text[] = "iSeries PCI I/O"; +/* + * Static and Global variables + */ +static char *pci_io_text = "iSeries PCI I/O"; static DEFINE_SPINLOCK(iomm_table_lock); +/* + * iomm_table_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. + */ +static void iomm_table_initialize(void) +{ + spin_lock(&iomm_table_lock); + iomm_table = kmalloc(sizeof(*iomm_table) * IOMM_TABLE_MAX_ENTRIES, + GFP_KERNEL); + iobar_table = kmalloc(sizeof(*iobar_table) * IOMM_TABLE_MAX_ENTRIES, + GFP_KERNEL); + spin_unlock(&iomm_table_lock); + if ((iomm_table == NULL) || (iobar_table == NULL)) + panic("PCI: I/O tables allocation failed.\n"); +} + /* * iomm_table_allocate_entry * @@ -102,8 +142,9 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) */ spin_lock(&iomm_table_lock); bar_res->name = pci_io_text; - bar_res->start = BASE_IO_MEMORY + + bar_res->start = IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry; + bar_res->start += BASE_IO_MEMORY; bar_res->end = bar_res->start + bar_size - 1; /* * Allocate the number of table entries needed for BAR. @@ -115,7 +156,7 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) ++current_iomm_table_entry; } max_io_memory = BASE_IO_MEMORY + - IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry; + (IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry); spin_unlock(&iomm_table_lock); } @@ -132,10 +173,13 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) */ static void allocate_device_bars(struct pci_dev *dev) { + struct resource *bar_res; int bar_num; - for (bar_num = 0; bar_num <= PCI_ROM_RESOURCE; ++bar_num) + for (bar_num = 0; bar_num <= PCI_ROM_RESOURCE; ++bar_num) { + bar_res = &dev->resource[bar_num]; iomm_table_allocate_entry(dev, bar_num); + } } /* @@ -155,7 +199,34 @@ static void pci_Log_Error(char *Error_Text, int Bus, int SubBus, } /* - * iSeries_pcibios_init + * build_device_node(u16 Bus, int SubBus, u8 DevFn) + */ +static struct device_node *build_device_node(HvBusNumber Bus, + HvSubBusNumber SubBus, int AgentId, int Function) +{ + struct device_node *node; + struct pci_dn *pdn; + + node = kmalloc(sizeof(struct device_node), GFP_KERNEL); + if (node == NULL) + return NULL; + memset(node, 0, sizeof(struct device_node)); + pdn = kzalloc(sizeof(*pdn), GFP_KERNEL); + if (pdn == NULL) { + kfree(node); + return NULL; + } + node->data = pdn; + pdn->node = node; + list_add_tail(&pdn->Device_List, &iSeries_Global_Device_List); + pdn->busno = Bus; + pdn->bussubno = SubBus; + pdn->devfn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId), Function); + return node; +} + +/* + * unsigned long __init find_and_init_phbs(void) * * Description: * This function checks for all possible system PCI host bridges that connect @@ -163,42 +234,50 @@ static void pci_Log_Error(char *Error_Text, int Bus, int SubBus, * ownership status. A pci_controller is built for any bus which is partially * owned or fully owned by this guest partition. */ -void iSeries_pcibios_init(void) +unsigned long __init find_and_init_phbs(void) { struct pci_controller *phb; - struct device_node *root = of_find_node_by_path("/"); - struct device_node *node = NULL; + HvBusNumber bus; - if (root == NULL) { - printk(KERN_CRIT "iSeries_pcibios_init: can't find root " - "of device tree\n"); - return; - } - while ((node = of_get_next_child(root, node)) != NULL) { - HvBusNumber bus; - u32 *busp; - - if ((node->type == NULL) || (strcmp(node->type, "pci") != 0)) - continue; - - busp = (u32 *)get_property(node, "bus-range", NULL); - if (busp == NULL) - continue; - bus = *busp; - printk("bus %d appears to exist\n", bus); - phb = pcibios_alloc_controller(node); - if (phb == NULL) - continue; - - phb->pci_mem_offset = phb->local_number = bus; - phb->first_busno = bus; - phb->last_busno = bus; - phb->ops = &iSeries_pci_ops; - } + /* 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 = pcibios_alloc_controller(NULL); + if (phb == NULL) + return -ENOMEM; - of_node_put(root); + phb->pci_mem_offset = phb->local_number = bus; + phb->first_busno = bus; + phb->last_busno = bus; + phb->ops = &iSeries_pci_ops; - pci_devs_phb_init(); + /* Find and connect the devices. */ + scan_PHB_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); + } + return 0; +} + +/* + * iSeries_pcibios_init + * + * Chance to initialize and structures or variable before PCI Bus walk. + */ +void iSeries_pcibios_init(void) +{ + iomm_table_initialize(); + find_and_init_phbs(); + io_page_mask = -1; } /* @@ -220,34 +299,6 @@ void __init iSeries_pci_final_fixup(void) pdev->bus->number, pdev->devfn, node); if (node != NULL) { - struct pci_dn *pdn = PCI_DN(node); - u32 *agent; - - agent = (u32 *)get_property(node, "linux,agent-id", - NULL); - if ((pdn != NULL) && (agent != NULL)) { - u8 irq = iSeries_allocate_IRQ(pdn->busno, 0, - pdn->bussubno); - int err; - - err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno, - *agent, irq); - if (err) - pci_Log_Error("Connect Bus Unit", - pdn->busno, pdn->bussubno, *agent, err); - else { - err = HvCallPci_configStore8(pdn->busno, pdn->bussubno, - *agent, - PCI_INTERRUPT_LINE, - irq); - if (err) - pci_Log_Error("PciCfgStore Irq Failed!", - pdn->busno, pdn->bussubno, *agent, err); - } - if (!err) - pdev->irq = irq; - } - ++DeviceCount; pdev->sysdata = (void *)node; PCI_DN(node)->pcidev = pdev; @@ -257,6 +308,7 @@ void __init iSeries_pci_final_fixup(void) } else printk("PCI: Device Tree not found for 0x%016lX\n", (unsigned long)pdev); + pdev->irq = PCI_DN(node)->Irq; } iSeries_activate_IRQs(); mf_display_src(0xC9000200); @@ -270,6 +322,148 @@ void pcibios_fixup_resources(struct pci_dev *pdev) { } +/* + * Loop through each node function to find usable EADs bridges. + */ +static void scan_PHB_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; + + 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, + iseries_hv_addr(DevInfo), + sizeof(struct HvCallPci_DeviceInfo)); + if (HvRc == 0) { + if (DevInfo->deviceType == HvCallPci_NodeDevice) + 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); + } + else + pci_Log_Error("getDeviceInfo", bus, SubBus, IdSel, HvRc); + } + kfree(DevInfo); +} + +static void 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) { + AgentId = ISERIES_PCI_AGENTID(IdSel, Function); + 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 */ + HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId, + iseries_hv_addr(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); + if (BridgeInfo->busUnitInfo.deviceType == + HvCallPci_BridgeDevice) { + /* Scan_Bridge_Slot...: 0x18.00.12 */ + 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); + } + kfree(BridgeInfo); +} + +/* + * This assumes that the node slot is always on the primary bus! + */ +static int scan_bridge_slot(HvBusNumber Bus, + struct HvCallPci_BridgeInfo *BridgeInfo) +{ + struct device_node *node; + 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); + + /* + * 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; + } + + HvRc = HvCallPci_configLoad16(Bus, SubBus, AgentId, + PCI_VENDOR_ID, &VendorId); + if (HvRc != 0) { + pci_Log_Error("Read Vendor", + Bus, SubBus, AgentId, HvRc); + continue; + } + printk("read vendor ID: %x\n", VendorId); + + /* FoundDevice: 0x18.28.10 = 0x12AE */ + 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); + PCI_DN(node)->Irq = Irq; + PCI_DN(node)->LogicalSlot = BridgeInfo->logicalSlotNumber; + + } /* 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 @@ -315,13 +509,11 @@ EXPORT_SYMBOL(iSeries_memcpy_fromio); */ static struct device_node *find_Device_Node(int bus, int devfn) { - struct device_node *node; - - for (node = NULL; (node = of_find_all_nodes(node)); ) { - struct pci_dn *pdn = PCI_DN(node); + struct pci_dn *pdn; - if (pdn && (bus == pdn->busno) && (devfn == pdn->devfn)) - return node; + list_for_each_entry(pdn, &iSeries_Global_Device_List, Device_List) { + if ((bus == pdn->busno) && (devfn == pdn->devfn)) + return pdn->node; } return NULL; } @@ -433,6 +625,7 @@ static int CheckReturnCode(char *TextHdr, struct device_node *DevNode, if (ret != 0) { struct pci_dn *pdn = PCI_DN(DevNode); + ++Pci_Error_Count; (*retry)++; printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n", TextHdr, pdn->busno, pdn->devfn, @@ -514,6 +707,7 @@ u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) return 0xff; } do { + ++Pci_Io_Read_Count; HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0); } while (CheckReturnCode("RDB", DevNode, &retry, ret.rc) != 0); @@ -543,6 +737,7 @@ u16 iSeries_Read_Word(const volatile void __iomem *IoAddress) return 0xffff; } do { + ++Pci_Io_Read_Count; HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa, BarOffset, 0); } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0); @@ -573,6 +768,7 @@ u32 iSeries_Read_Long(const volatile void __iomem *IoAddress) return 0xffffffff; } do { + ++Pci_Io_Read_Count; HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa, BarOffset, 0); } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0); @@ -610,6 +806,7 @@ void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress) return; } do { + ++Pci_Io_Write_Count; rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0); } while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0); } @@ -637,6 +834,7 @@ void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress) return; } do { + ++Pci_Io_Write_Count; rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, swab16(data), 0); } while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0); } @@ -664,6 +862,7 @@ void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress) return; } do { + ++Pci_Io_Write_Count; rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, swab32(data), 0); } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0); } diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c index c24141362..e68b6b5fa 100644 --- a/arch/powerpc/platforms/iseries/proc.c +++ b/arch/powerpc/platforms/iseries/proc.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "processor_vpd.h" diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index c9605d773..a6fd9bedb 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c @@ -16,6 +16,7 @@ #undef DEBUG +#include #include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -79,11 +81,18 @@ extern void iSeries_pci_final_fixup(void); static void iSeries_pci_final_fixup(void) { } #endif +/* Global Variables */ +int piranha_simulator; + extern int rd_size; /* Defined in drivers/block/rd.c */ +extern unsigned long embedded_sysmap_start; +extern unsigned long embedded_sysmap_end; extern unsigned long iSeries_recal_tb; extern unsigned long iSeries_recal_titan; +static unsigned long cmd_mem_limit; + struct MemoryBlock { unsigned long absStart; unsigned long absEnd; @@ -294,6 +303,8 @@ static void __init iSeries_init_early(void) { DBG(" -> iSeries_init_early()\n"); + ppc64_interrupt_controller = IC_ISERIES; + #if defined(CONFIG_BLK_DEV_INITRD) /* * If the init RAM disk has been configured and there is @@ -315,6 +326,11 @@ static void __init iSeries_init_early(void) iSeries_recal_tb = get_tb(); iSeries_recal_titan = HvCallXm_loadTod(); + /* + * Initialize the hash table management pointers + */ + hpte_init_iSeries(); + /* * Initialize the DMA/TCE management */ @@ -324,6 +340,8 @@ static void __init iSeries_init_early(void) #ifdef CONFIG_SMP smp_init_iSeries(); #endif + if (itLpNaca.xPirEnvironMode == 0) + piranha_simulator = 1; /* Associate Lp Event Queue 0 with processor 0 */ HvCallEvent_setLpEventQueueInterruptProc(0, 0); @@ -518,10 +536,10 @@ static void __init iSeries_setup_arch(void) { if (get_lppaca()->shared_proc) { ppc_md.idle_loop = iseries_shared_idle; - printk(KERN_DEBUG "Using shared processor idle loop\n"); + printk(KERN_INFO "Using shared processor idle loop\n"); } else { ppc_md.idle_loop = iseries_dedicated_idle; - printk(KERN_DEBUG "Using dedicated idle loop\n"); + printk(KERN_INFO "Using dedicated idle loop\n"); } /* Setup the Lp Event Queue */ @@ -553,6 +571,16 @@ static void __init iSeries_fixup_klimit(void) if (naca.xRamDisk) klimit = KERNELBASE + (u64)naca.xRamDisk + (naca.xRamDiskSize * HW_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 + */ + if (embedded_sysmap_end) + klimit = KERNELBASE + ((embedded_sysmap_end + 4095) & + 0xfffffffffffff000); + } } static int __init iSeries_src_init(void) @@ -657,7 +685,11 @@ static int __init iseries_probe(void) powerpc_firmware_features |= FW_FEATURE_ISERIES; powerpc_firmware_features |= FW_FEATURE_LPAR; - hpte_init_iSeries(); + /* + * The Hypervisor only allows us up to 256 interrupt + * sources (the irq number is passed in a u8). + */ + virt_irq_max = 255; return 1; } @@ -682,6 +714,243 @@ define_machine(iseries) { /* XXX Implement enable_pmcs for iSeries */ }; +struct blob { + unsigned char data[PAGE_SIZE]; + unsigned long next; +}; + +struct iseries_flat_dt { + struct boot_param_header header; + u64 reserve_map[2]; + struct blob dt; + struct blob strings; +}; + +struct iseries_flat_dt iseries_dt; + +void dt_init(struct iseries_flat_dt *dt) +{ + dt->header.off_mem_rsvmap = + offsetof(struct iseries_flat_dt, reserve_map); + dt->header.off_dt_struct = offsetof(struct iseries_flat_dt, dt); + dt->header.off_dt_strings = offsetof(struct iseries_flat_dt, strings); + dt->header.totalsize = sizeof(struct iseries_flat_dt); + dt->header.dt_strings_size = sizeof(struct blob); + + /* There is no notion of hardware cpu id on iSeries */ + dt->header.boot_cpuid_phys = smp_processor_id(); + + dt->dt.next = (unsigned long)&dt->dt.data; + dt->strings.next = (unsigned long)&dt->strings.data; + + dt->header.magic = OF_DT_HEADER; + dt->header.version = 0x10; + dt->header.last_comp_version = 0x10; + + dt->reserve_map[0] = 0; + dt->reserve_map[1] = 0; +} + +void dt_check_blob(struct blob *b) +{ + if (b->next >= (unsigned long)&b->next) { + DBG("Ran out of space in flat device tree blob!\n"); + BUG(); + } +} + +void dt_push_u32(struct iseries_flat_dt *dt, u32 value) +{ + *((u32*)dt->dt.next) = value; + dt->dt.next += sizeof(u32); + + dt_check_blob(&dt->dt); +} + +void dt_push_u64(struct iseries_flat_dt *dt, u64 value) +{ + *((u64*)dt->dt.next) = value; + dt->dt.next += sizeof(u64); + + dt_check_blob(&dt->dt); +} + +unsigned long dt_push_bytes(struct blob *blob, char *data, int len) +{ + unsigned long start = blob->next - (unsigned long)blob->data; + + memcpy((char *)blob->next, data, len); + blob->next = _ALIGN(blob->next + len, 4); + + dt_check_blob(blob); + + return start; +} + +void dt_start_node(struct iseries_flat_dt *dt, char *name) +{ + dt_push_u32(dt, OF_DT_BEGIN_NODE); + dt_push_bytes(&dt->dt, name, strlen(name) + 1); +} + +#define dt_end_node(dt) dt_push_u32(dt, OF_DT_END_NODE) + +void dt_prop(struct iseries_flat_dt *dt, char *name, char *data, int len) +{ + unsigned long offset; + + dt_push_u32(dt, OF_DT_PROP); + + /* Length of the data */ + dt_push_u32(dt, len); + + /* Put the property name in the string blob. */ + offset = dt_push_bytes(&dt->strings, name, strlen(name) + 1); + + /* The offset of the properties name in the string blob. */ + dt_push_u32(dt, (u32)offset); + + /* The actual data. */ + dt_push_bytes(&dt->dt, data, len); +} + +void dt_prop_str(struct iseries_flat_dt *dt, char *name, char *data) +{ + dt_prop(dt, name, data, strlen(data) + 1); /* + 1 for NULL */ +} + +void dt_prop_u32(struct iseries_flat_dt *dt, char *name, u32 data) +{ + dt_prop(dt, name, (char *)&data, sizeof(u32)); +} + +void dt_prop_u64(struct iseries_flat_dt *dt, char *name, u64 data) +{ + dt_prop(dt, name, (char *)&data, sizeof(u64)); +} + +void dt_prop_u64_list(struct iseries_flat_dt *dt, char *name, u64 *data, int n) +{ + dt_prop(dt, name, (char *)data, sizeof(u64) * n); +} + +void dt_prop_u32_list(struct iseries_flat_dt *dt, char *name, u32 *data, int n) +{ + dt_prop(dt, name, (char *)data, sizeof(u32) * n); +} + +void dt_prop_empty(struct iseries_flat_dt *dt, char *name) +{ + dt_prop(dt, name, NULL, 0); +} + +void dt_cpus(struct iseries_flat_dt *dt) +{ + unsigned char buf[32]; + unsigned char *p; + unsigned int i, index; + struct IoHriProcessorVpd *d; + u32 pft_size[2]; + + /* yuck */ + snprintf(buf, 32, "PowerPC,%s", cur_cpu_spec->cpu_name); + p = strchr(buf, ' '); + if (!p) p = buf + strlen(buf); + + dt_start_node(dt, "cpus"); + dt_prop_u32(dt, "#address-cells", 1); + dt_prop_u32(dt, "#size-cells", 0); + + pft_size[0] = 0; /* NUMA CEC cookie, 0 for non NUMA */ + pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE); + + for (i = 0; i < NR_CPUS; i++) { + if (lppaca[i].dyn_proc_status >= 2) + continue; + + snprintf(p, 32 - (p - buf), "@%d", i); + dt_start_node(dt, buf); + + dt_prop_str(dt, "device_type", "cpu"); + + index = lppaca[i].dyn_hv_phys_proc_index; + d = &xIoHriProcessorVpd[index]; + + dt_prop_u32(dt, "i-cache-size", d->xInstCacheSize * 1024); + dt_prop_u32(dt, "i-cache-line-size", d->xInstCacheOperandSize); + + dt_prop_u32(dt, "d-cache-size", d->xDataL1CacheSizeKB * 1024); + dt_prop_u32(dt, "d-cache-line-size", d->xDataCacheOperandSize); + + /* magic conversions to Hz copied from old code */ + dt_prop_u32(dt, "clock-frequency", + ((1UL << 34) * 1000000) / d->xProcFreq); + dt_prop_u32(dt, "timebase-frequency", + ((1UL << 32) * 1000000) / d->xTimeBaseFreq); + + dt_prop_u32(dt, "reg", i); + + dt_prop_u32_list(dt, "ibm,pft-size", pft_size, 2); + + dt_end_node(dt); + } + + dt_end_node(dt); +} + +void dt_model(struct iseries_flat_dt *dt) +{ + char buf[16] = "IBM,"; + + /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ + strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); + strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); + buf[11] = '\0'; + dt_prop_str(dt, "system-id", buf); + + /* "IBM," + machineType[0:4] */ + strne2a(buf + 4, xItExtVpdPanel.machineType, 4); + buf[8] = '\0'; + dt_prop_str(dt, "model", buf); + + dt_prop_str(dt, "compatible", "IBM,iSeries"); +} + +void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) +{ + u64 tmp[2]; + + dt_init(dt); + + dt_start_node(dt, ""); + + dt_prop_u32(dt, "#address-cells", 2); + dt_prop_u32(dt, "#size-cells", 2); + dt_model(dt); + + /* /memory */ + dt_start_node(dt, "memory@0"); + dt_prop_str(dt, "name", "memory"); + dt_prop_str(dt, "device_type", "memory"); + tmp[0] = 0; + tmp[1] = phys_mem_size; + dt_prop_u64_list(dt, "reg", tmp, 2); + dt_end_node(dt); + + /* /chosen */ + dt_start_node(dt, "chosen"); + dt_prop_str(dt, "bootargs", cmd_line); + if (cmd_mem_limit) + dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); + dt_end_node(dt); + + dt_cpus(dt); + + dt_end_node(dt); + + dt_push_u32(dt, OF_DT_END); +} + void * __init iSeries_early_setup(void) { unsigned long phys_mem_size; @@ -696,8 +965,28 @@ void * __init iSeries_early_setup(void) iSeries_get_cmdline(); - return (void *) __pa(build_flat_dt(phys_mem_size)); + /* Save unparsed command line copy for /proc/cmdline */ + strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); + + /* Parse early parameters, in particular mem=x */ + parse_early_param(); + + build_flat_dt(&iseries_dt, phys_mem_size); + + return (void *) __pa(&iseries_dt); +} + +/* + * On iSeries we just parse the mem=X option from the command line. + * On pSeries it's a bit more complicated, see prom_init_mem() + */ +static int __init early_parsemem(char *p) +{ + if (p) + cmd_mem_limit = ALIGN(memparse(p, &p), PAGE_SIZE); + return 0; } +early_param("mem", early_parsemem); static void hvputc(char c) { diff --git a/arch/powerpc/platforms/iseries/setup.h b/arch/powerpc/platforms/iseries/setup.h index 0a47ac53c..5213044ec 100644 --- a/arch/powerpc/platforms/iseries/setup.h +++ b/arch/powerpc/platforms/iseries/setup.h @@ -21,6 +21,4 @@ extern unsigned long iSeries_get_boot_time(void); extern int iSeries_set_rtc_time(struct rtc_time *tm); extern void iSeries_get_rtc_time(struct rtc_time *tm); -extern void *build_flat_dt(unsigned long phys_mem_size); - #endif /* __ISERIES_SETUP_H__ */ diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c index 2eb095edb..6f9d407a7 100644 --- a/arch/powerpc/platforms/iseries/smp.c +++ b/arch/powerpc/platforms/iseries/smp.c @@ -14,6 +14,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c new file mode 100644 index 000000000..ad36ab063 --- /dev/null +++ b/arch/powerpc/platforms/iseries/vio.c @@ -0,0 +1,131 @@ +/* + * IBM PowerPC iSeries Virtual I/O Infrastructure Support. + * + * Copyright (c) 2005 Stephen Rothwell, IBM Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "iommu.h" + +struct device *iSeries_vio_dev = &vio_bus_device.dev; +EXPORT_SYMBOL(iSeries_vio_dev); + +static struct iommu_table veth_iommu_table; +static struct iommu_table vio_iommu_table; + +static void __init iommu_vio_init(void) +{ + iommu_table_getparms_iSeries(255, 0, 0xff, &veth_iommu_table); + veth_iommu_table.it_size /= 2; + vio_iommu_table = veth_iommu_table; + vio_iommu_table.it_offset += veth_iommu_table.it_size; + + if (!iommu_init_table(&veth_iommu_table)) + printk("Virtual Bus VETH TCE table failed.\n"); + if (!iommu_init_table(&vio_iommu_table)) + printk("Virtual Bus VIO TCE table failed.\n"); +} + +/** + * vio_register_device_iseries: - Register a new iSeries vio device. + * @voidev: The device to register. + */ +static struct vio_dev *__init vio_register_device_iseries(char *type, + uint32_t unit_num) +{ + struct vio_dev *viodev; + + /* allocate a vio_dev for this device */ + viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); + if (!viodev) + return NULL; + memset(viodev, 0, sizeof(struct vio_dev)); + + snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num); + + viodev->name = viodev->dev.bus_id; + viodev->type = type; + viodev->unit_address = unit_num; + viodev->iommu_table = &vio_iommu_table; + if (vio_register_device(viodev) == NULL) { + kfree(viodev); + return NULL; + } + return viodev; +} + +void __init probe_bus_iseries(void) +{ + HvLpIndexMap vlan_map; + struct vio_dev *viodev; + int i; + + /* there is only one of each of these */ + vio_register_device_iseries("viocons", 0); + vio_register_device_iseries("vscsi", 0); + + vlan_map = HvLpConfig_getVirtualLanIndexMap(); + for (i = 0; i < HVMAXARCHITECTEDVIRTUALLANS; i++) { + if ((vlan_map & (0x8000 >> i)) == 0) + continue; + viodev = vio_register_device_iseries("vlan", i); + /* veth is special and has it own iommu_table */ + viodev->iommu_table = &veth_iommu_table; + } + for (i = 0; i < HVMAXARCHITECTEDVIRTUALDISKS; i++) + vio_register_device_iseries("viodasd", i); + for (i = 0; i < HVMAXARCHITECTEDVIRTUALCDROMS; i++) + vio_register_device_iseries("viocd", i); + for (i = 0; i < HVMAXARCHITECTEDVIRTUALTAPES; i++) + vio_register_device_iseries("viotape", i); +} + +/** + * vio_match_device_iseries: - Tell if a iSeries VIO device matches a + * vio_device_id + */ +static int vio_match_device_iseries(const struct vio_device_id *id, + const struct vio_dev *dev) +{ + return strncmp(dev->type, id->type, strlen(id->type)) == 0; +} + +static struct vio_bus_ops vio_bus_ops_iseries = { + .match = vio_match_device_iseries, +}; + +/** + * vio_bus_init_iseries: - Initialize the iSeries virtual IO bus + */ +static int __init vio_bus_init_iseries(void) +{ + int err; + + err = vio_bus_init(&vio_bus_ops_iseries); + if (err == 0) { + iommu_vio_init(); + vio_bus_device.iommu_table = &vio_iommu_table; + iSeries_vio_dev = &vio_bus_device.dev; + probe_bus_iseries(); + } + return err; +} + +__initcall(vio_bus_init_iseries); diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 63a1670d3..85d6c9365 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c @@ -376,10 +376,9 @@ static void __init maple_fixup_phb_resources(void) unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; hose->io_resource.start += offset; hose->io_resource.end += offset; - printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n", + printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", hose->global_number, - (unsigned long long)hose->io_resource.start, - (unsigned long long)hose->io_resource.end); + hose->io_resource.start, hose->io_resource.end); } } @@ -438,28 +437,26 @@ void __init maple_pci_init(void) /* Tell pci.c to not change any resource allocations. */ pci_probe_only = 1; + + /* Allow all IO */ + io_page_mask = -1; } int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) { struct device_node *np; - unsigned int defirq = channel ? 15 : 14; - unsigned int irq; + int irq = channel ? 15 : 14; if (pdev->vendor != PCI_VENDOR_ID_AMD || pdev->device != PCI_DEVICE_ID_AMD_8111_IDE) - return defirq; + return irq; np = pci_device_to_OF_node(pdev); if (np == NULL) - return defirq; - irq = irq_of_parse_and_map(np, channel & 0x1); - if (irq == NO_IRQ) { - printk("Failed to map onboard IDE interrupt for channel %d\n", - channel); - return defirq; - } - return irq; + return irq; + if (np->n_intrs < 2) + return irq; + return np->intrs[channel & 0x1].line; } /* XXX: To remove once all firmwares are ok */ diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 57567dfb9..24c0aef4e 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c @@ -11,8 +11,9 @@ * */ -#undef DEBUG +#define DEBUG +#include #include #include #include @@ -188,7 +189,7 @@ void __init maple_setup_arch(void) conswitchp = &dummy_con; #endif - printk(KERN_DEBUG "Using native/NAP idle loop\n"); + printk(KERN_INFO "Using native/NAP idle loop\n"); } /* @@ -198,90 +199,55 @@ static void __init maple_init_early(void) { DBG(" -> maple_init_early\n"); + /* Initialize hash table, from now on, we can take hash faults + * and call ioremap + */ + hpte_init_native(); + + /* Setup interrupt mapping options */ + ppc64_interrupt_controller = IC_OPEN_PIC; + iommu_init_early_dart(); DBG(" <- maple_init_early\n"); } -/* - * This is almost identical to pSeries and CHRP. We need to make that - * code generic at one point, with appropriate bits in the device-tree to - * identify the presence of an HT APIC - */ -static void __init maple_init_IRQ(void) + +static __init void maple_init_IRQ(void) { - struct device_node *root, *np, *mpic_node = NULL; + struct device_node *root; unsigned int *opprop; - unsigned long openpic_addr = 0; - int naddr, n, i, opplen, has_isus = 0; + unsigned long opic_addr; struct mpic *mpic; - unsigned int flags = MPIC_PRIMARY; - - /* Locate MPIC in the device-tree. Note that there is a bug - * in Maple device-tree where the type of the controller is - * open-pic and not interrupt-controller - */ + unsigned char senses[128]; + int n; - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "open-pic")) { - mpic_node = np; - break; - } - if (mpic_node == NULL) - for_each_node_by_type(np, "open-pic") { - mpic_node = np; - break; - } - if (mpic_node == NULL) { - printk(KERN_ERR - "Failed to locate the MPIC interrupt controller\n"); - return; - } + DBG(" -> maple_init_IRQ\n"); - /* Find address list in /platform-open-pic */ + /* XXX: Non standard, replace that with a proper openpic/mpic node + * in the device-tree. Find the Open PIC if present */ root = of_find_node_by_path("/"); - naddr = prom_n_addr_cells(root); - opprop = (unsigned int *) get_property(root, "platform-open-pic", - &opplen); - if (opprop != 0) { - openpic_addr = of_read_number(opprop, naddr); - has_isus = (opplen > naddr); - printk(KERN_DEBUG "OpenPIC addr: %lx, has ISUs: %d\n", - openpic_addr, has_isus); - } + opprop = (unsigned int *) get_property(root, + "platform-open-pic", NULL); + if (opprop == 0) + panic("OpenPIC not found !\n"); + + n = prom_n_addr_cells(root); + for (opic_addr = 0; n > 0; --n) + opic_addr = (opic_addr << 32) + *opprop++; of_node_put(root); - BUG_ON(openpic_addr == 0); - - /* Check for a big endian MPIC */ - if (get_property(np, "big-endian", NULL) != NULL) - flags |= MPIC_BIG_ENDIAN; - - /* XXX Maple specific bits */ - flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET; - /* All U3/U4 are big-endian, older SLOF firmware doesn't encode this */ - flags |= MPIC_BIG_ENDIAN; + /* Obtain sense values from device-tree */ + prom_get_irq_senses(senses, 0, 128); - /* Setup the openpic driver. More device-tree junks, we hard code no - * ISUs for now. I'll have to revisit some stuffs with the folks doing - * the firmware for those - */ - mpic = mpic_alloc(mpic_node, openpic_addr, flags, - /*has_isus ? 16 :*/ 0, 0, " MPIC "); + mpic = mpic_alloc(opic_addr, + MPIC_PRIMARY | MPIC_BIG_ENDIAN | + MPIC_BROKEN_U3 | MPIC_WANTS_RESET, + 0, 0, 128, 128, senses, 128, "U3-MPIC"); BUG_ON(mpic == NULL); - - /* Add ISUs */ - opplen /= sizeof(u32); - for (n = 0, i = naddr; i < opplen; i += naddr, n++) { - unsigned long isuaddr = of_read_number(opprop + i, naddr); - mpic_assign_isu(mpic, n, isuaddr); - } - - /* All ISUs are setup, complete initialization */ mpic_init(mpic); - ppc_md.get_irq = mpic_get_irq; - of_node_put(mpic_node); - of_node_put(root); + + DBG(" <- maple_init_IRQ\n"); } static void __init maple_progress(char *s, unsigned short hex) @@ -296,9 +262,7 @@ static void __init maple_progress(char *s, unsigned short hex) static int __init maple_probe(void) { unsigned long root = of_get_flat_dt_root(); - - if (!of_flat_dt_is_compatible(root, "Momentum,Maple") && - !of_flat_dt_is_compatible(root, "Momentum,Apache")) + if (!of_flat_dt_is_compatible(root, "Momentum,Maple")) return 0; /* * On U3, the DART (iommu) must be allocated now since it @@ -308,8 +272,6 @@ static int __init maple_probe(void) */ alloc_dart_table(); - hpte_init_native(); - return 1; } @@ -319,6 +281,7 @@ define_machine(maple_md) { .setup_arch = maple_setup_arch, .init_early = maple_init_early, .init_IRQ = maple_init_IRQ, + .get_irq = mpic_get_irq, .pcibios_fixup = maple_pcibios_fixup, .pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq, .restart = maple_restart, diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c index 9f7579b38..b9a2b3d4b 100644 --- a/arch/powerpc/platforms/maple/time.c +++ b/arch/powerpc/platforms/maple/time.c @@ -11,6 +11,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c index d66415491..8be2f7d07 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c @@ -3,222 +3,200 @@ * Contains support for the backlight. * * Copyright (C) 2000 Benjamin Herrenschmidt - * Copyright (C) 2006 Michael Hanselmann * */ +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include -#define OLD_BACKLIGHT_MAX 15 - -static void pmac_backlight_key_worker(void *data); -static void pmac_backlight_set_legacy_worker(void *data); - -static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker, NULL); -static DECLARE_WORK(pmac_backlight_set_legacy_work, pmac_backlight_set_legacy_worker, NULL); - -/* Although these variables are used in interrupt context, it makes no sense to - * protect them. No user is able to produce enough key events per second and - * notice the errors that might happen. - */ -static int pmac_backlight_key_queued; -static int pmac_backlight_set_legacy_queued; - -/* The via-pmu code allows the backlight to be grabbed, in which case the - * in-kernel control of the brightness needs to be disabled. This should - * only be used by really old PowerBooks. - */ -static atomic_t kernel_backlight_disabled = ATOMIC_INIT(0); - -/* Protect the pmac_backlight variable */ -DEFINE_MUTEX(pmac_backlight_mutex); - -/* Main backlight storage - * - * Backlight drivers in this variable are required to have the "props" - * attribute set and to have an update_status function. - * - * We can only store one backlight here, but since Apple laptops have only one - * internal display, it doesn't matter. Other backlight drivers can be used - * independently. - * - * Lock ordering: - * pmac_backlight_mutex (global, main backlight) - * pmac_backlight->sem (backlight class) - */ -struct backlight_device *pmac_backlight; - -int pmac_has_backlight_type(const char *type) -{ - struct device_node* bk_node = find_devices("backlight"); +#include +#include - if (bk_node) { - char *prop = get_property(bk_node, "backlight-control", NULL); - if (prop && strncmp(prop, type, strlen(type)) == 0) - return 1; - } +static struct backlight_controller *backlighter; +static void* backlighter_data; +static int backlight_autosave; +static int backlight_level = BACKLIGHT_MAX; +static int backlight_enabled = 1; +static int backlight_req_level = -1; +static int backlight_req_enable = -1; - return 0; -} +static void backlight_callback(void *); +static DECLARE_WORK(backlight_work, backlight_callback, NULL); -int pmac_backlight_curve_lookup(struct fb_info *info, int value) +void register_backlight_controller(struct backlight_controller *ctrler, + void *data, char *type) { - int level = (FB_BACKLIGHT_LEVELS - 1); - - if (info && info->bl_dev) { - int i, max = 0; - - /* Look for biggest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) - max = max((int)info->bl_curve[i], max); + struct device_node* bk_node; + char *prop; + int valid = 0; - /* Look for nearest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) { - int diff = abs(info->bl_curve[i] - value); - if (diff < max) { - max = diff; - level = i; - } - } + /* There's already a matching controller, bail out */ + if (backlighter != NULL) + return; + bk_node = find_devices("backlight"); + +#ifdef CONFIG_ADB_PMU + /* Special case for the old PowerBook since I can't test on it */ + backlight_autosave = machine_is_compatible("AAPL,3400/2400") + || machine_is_compatible("AAPL,3500"); + if ((backlight_autosave + || machine_is_compatible("AAPL,PowerBook1998") + || machine_is_compatible("PowerBook1,1")) + && !strcmp(type, "pmu")) + valid = 1; +#endif + if (bk_node) { + prop = get_property(bk_node, "backlight-control", NULL); + if (prop && !strncmp(prop, type, strlen(type))) + valid = 1; } - - return level; -} - -static void pmac_backlight_key_worker(void *data) -{ - if (atomic_read(&kernel_backlight_disabled)) + if (!valid) return; + backlighter = ctrler; + backlighter_data = data; + + if (bk_node && !backlight_autosave) + prop = get_property(bk_node, "bklt", NULL); + else + prop = NULL; + if (prop) { + backlight_level = ((*prop)+1) >> 1; + if (backlight_level > BACKLIGHT_MAX) + backlight_level = BACKLIGHT_MAX; + } - mutex_lock(&pmac_backlight_mutex); - if (pmac_backlight) { - struct backlight_properties *props; - int brightness; - - down(&pmac_backlight->sem); - props = pmac_backlight->props; - - brightness = props->brightness + - ((pmac_backlight_key_queued?-1:1) * - (props->max_brightness / 15)); - - if (brightness < 0) - brightness = 0; - else if (brightness > props->max_brightness) - brightness = props->max_brightness; - - props->brightness = brightness; - props->update_status(pmac_backlight); - - up(&pmac_backlight->sem); +#ifdef CONFIG_ADB_PMU + if (backlight_autosave) { + struct adb_request req; + pmu_request(&req, NULL, 2, 0xd9, 0); + while (!req.complete) + pmu_poll(); + backlight_level = req.reply[0] >> 4; } - mutex_unlock(&pmac_backlight_mutex); +#endif + acquire_console_sem(); + if (!backlighter->set_enable(1, backlight_level, data)) + backlight_enabled = 1; + release_console_sem(); + + printk(KERN_INFO "Registered \"%s\" backlight controller," + "level: %d/15\n", type, backlight_level); } +EXPORT_SYMBOL(register_backlight_controller); -/* This function is called in interrupt context */ -void pmac_backlight_key(int direction) +void unregister_backlight_controller(struct backlight_controller + *ctrler, void *data) { - if (atomic_read(&kernel_backlight_disabled)) - return; - - /* we can receive multiple interrupts here, but the scheduled work - * will run only once, with the last value - */ - pmac_backlight_key_queued = direction; - schedule_work(&pmac_backlight_key_work); + /* We keep the current backlight level (for now) */ + if (ctrler == backlighter && data == backlighter_data) + backlighter = NULL; } +EXPORT_SYMBOL(unregister_backlight_controller); -static int __pmac_backlight_set_legacy_brightness(int brightness) +static int __set_backlight_enable(int enable) { - int error = -ENXIO; - - mutex_lock(&pmac_backlight_mutex); - if (pmac_backlight) { - struct backlight_properties *props; - - down(&pmac_backlight->sem); - props = pmac_backlight->props; - props->brightness = brightness * - (props->max_brightness + 1) / - (OLD_BACKLIGHT_MAX + 1); - - if (props->brightness > props->max_brightness) - props->brightness = props->max_brightness; - else if (props->brightness < 0) - props->brightness = 0; - - props->update_status(pmac_backlight); - up(&pmac_backlight->sem); - - error = 0; - } - mutex_unlock(&pmac_backlight_mutex); - - return error; + int rc; + + if (!backlighter) + return -ENODEV; + acquire_console_sem(); + rc = backlighter->set_enable(enable, backlight_level, + backlighter_data); + if (!rc) + backlight_enabled = enable; + release_console_sem(); + return rc; } - -static void pmac_backlight_set_legacy_worker(void *data) +int set_backlight_enable(int enable) { - if (atomic_read(&kernel_backlight_disabled)) - return; - - __pmac_backlight_set_legacy_brightness(pmac_backlight_set_legacy_queued); + if (!backlighter) + return -ENODEV; + backlight_req_enable = enable; + schedule_work(&backlight_work); + return 0; } -/* This function is called in interrupt context */ -void pmac_backlight_set_legacy_brightness_pmu(int brightness) { - if (atomic_read(&kernel_backlight_disabled)) - return; - - pmac_backlight_set_legacy_queued = brightness; - schedule_work(&pmac_backlight_set_legacy_work); -} +EXPORT_SYMBOL(set_backlight_enable); -int pmac_backlight_set_legacy_brightness(int brightness) +int get_backlight_enable(void) { - return __pmac_backlight_set_legacy_brightness(brightness); + if (!backlighter) + return -ENODEV; + return backlight_enabled; } +EXPORT_SYMBOL(get_backlight_enable); -int pmac_backlight_get_legacy_brightness() +static int __set_backlight_level(int level) { - int result = -ENXIO; - - mutex_lock(&pmac_backlight_mutex); - if (pmac_backlight) { - struct backlight_properties *props; - - down(&pmac_backlight->sem); - props = pmac_backlight->props; - - result = props->brightness * - (OLD_BACKLIGHT_MAX + 1) / - (props->max_brightness + 1); - - up(&pmac_backlight->sem); + int rc = 0; + + if (!backlighter) + return -ENODEV; + if (level < BACKLIGHT_MIN) + level = BACKLIGHT_OFF; + if (level > BACKLIGHT_MAX) + level = BACKLIGHT_MAX; + acquire_console_sem(); + if (backlight_enabled) + rc = backlighter->set_level(level, backlighter_data); + if (!rc) + backlight_level = level; + release_console_sem(); + if (!rc && !backlight_autosave) { + level <<=1; + if (level & 0x10) + level |= 0x01; + // -- todo: save to property "bklt" } - mutex_unlock(&pmac_backlight_mutex); - - return result; + return rc; } - -void pmac_backlight_disable() +int set_backlight_level(int level) { - atomic_inc(&kernel_backlight_disabled); + if (!backlighter) + return -ENODEV; + backlight_req_level = level; + schedule_work(&backlight_work); + return 0; } -void pmac_backlight_enable() +EXPORT_SYMBOL(set_backlight_level); + +int get_backlight_level(void) { - atomic_dec(&kernel_backlight_disabled); + if (!backlighter) + return -ENODEV; + return backlight_level; } +EXPORT_SYMBOL(get_backlight_level); -EXPORT_SYMBOL_GPL(pmac_backlight); -EXPORT_SYMBOL_GPL(pmac_backlight_mutex); -EXPORT_SYMBOL_GPL(pmac_has_backlight_type); +static void backlight_callback(void *dummy) +{ + int level, enable; + + do { + level = backlight_req_level; + enable = backlight_req_enable; + mb(); + + if (level >= 0) + __set_backlight_level(level); + if (enable >= 0) + __set_backlight_enable(enable); + } while(cmpxchg(&backlight_req_level, level, -1) != level || + cmpxchg(&backlight_req_enable, enable, -1) != enable); +} diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c index 9d73d0234..eacbfd9be 100644 --- a/arch/powerpc/platforms/powermac/bootx_init.c +++ b/arch/powerpc/platforms/powermac/bootx_init.c @@ -9,10 +9,11 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include -#include +#include #include #include #include @@ -162,8 +163,6 @@ static void __init bootx_add_chosen_props(unsigned long base, { u32 val; - bootx_dt_add_prop("linux,bootx", NULL, 0, mem_end); - if (bootx_info->kernelParamsOffset) { char *args = (char *)((unsigned long)bootx_info) + bootx_info->kernelParamsOffset; @@ -181,32 +180,10 @@ static void __init bootx_add_chosen_props(unsigned long base, } static void __init bootx_add_display_props(unsigned long base, - unsigned long *mem_end, - int has_real_node) + unsigned long *mem_end) { - boot_infos_t *bi = bootx_info; - u32 tmp; - - if (has_real_node) { - bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); - bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); - } else - bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); - - tmp = bi->dispDeviceDepth; - bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); - tmp = bi->dispDeviceRect[2] - bi->dispDeviceRect[0]; - bootx_dt_add_prop("linux,bootx-width", &tmp, 4, mem_end); - tmp = bi->dispDeviceRect[3] - bi->dispDeviceRect[1]; - bootx_dt_add_prop("linux,bootx-height", &tmp, 4, mem_end); - tmp = bi->dispDeviceRowBytes; - bootx_dt_add_prop("linux,bootx-linebytes", &tmp, 4, mem_end); - tmp = (u32)bi->dispDeviceBase; - if (tmp == 0) - tmp = (u32)bi->logicalDisplayBase; - tmp += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; - tmp += bi->dispDeviceRect[0] * ((bi->dispDeviceDepth + 7) / 8); - bootx_dt_add_prop("linux,bootx-addr", &tmp, 4, mem_end); + bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); + bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); } static void __init bootx_dt_add_string(char *s, unsigned long *mem_end) @@ -235,7 +212,7 @@ static void __init bootx_scan_dt_build_strings(unsigned long base, if (!strcmp(namep, "/chosen")) { DBG(" detected /chosen ! adding properties names !\n"); - bootx_dt_add_string("linux,bootx", mem_end); + bootx_dt_add_string("linux,platform", mem_end); bootx_dt_add_string("linux,stdout-path", mem_end); bootx_dt_add_string("linux,initrd-start", mem_end); bootx_dt_add_string("linux,initrd-end", mem_end); @@ -329,13 +306,10 @@ static void __init bootx_scan_dt_build_struct(unsigned long base, ppp = &pp->next; } - if (node == bootx_node_chosen) { + if (node == bootx_node_chosen) bootx_add_chosen_props(base, mem_end); - if (bootx_info->dispDeviceRegEntryOffset == 0) - bootx_add_display_props(base, mem_end, 0); - } - else if (node == bootx_info->dispDeviceRegEntryOffset) - bootx_add_display_props(base, mem_end, 1); + if (node == bootx_info->dispDeviceRegEntryOffset) + bootx_add_display_props(base, mem_end); /* do all our children */ cpp = &np->child; @@ -377,14 +351,6 @@ static unsigned long __init bootx_flatten_dt(unsigned long start) mem_end += 4; bootx_dt_strend = mem_end; bootx_scan_dt_build_strings(base, 4, &mem_end); - /* Add some strings */ - bootx_dt_add_string("linux,bootx-noscreen", &mem_end); - bootx_dt_add_string("linux,bootx-depth", &mem_end); - bootx_dt_add_string("linux,bootx-width", &mem_end); - bootx_dt_add_string("linux,bootx-height", &mem_end); - bootx_dt_add_string("linux,bootx-linebytes", &mem_end); - bootx_dt_add_string("linux,bootx-addr", &mem_end); - /* Wrap up strings */ hdr->off_dt_strings = bootx_dt_strbase - mem_start; hdr->dt_strings_size = bootx_dt_strend - bootx_dt_strbase; @@ -411,15 +377,8 @@ static unsigned long __init bootx_flatten_dt(unsigned long start) DBG("End of boot params: %x\n", mem_end); rsvmap[0] = mem_start; rsvmap[1] = mem_end; - if (bootx_info->ramDisk) { - rsvmap[2] = ((unsigned long)bootx_info) + bootx_info->ramDisk; - rsvmap[3] = rsvmap[2] + bootx_info->ramDiskSize; - rsvmap[4] = 0; - rsvmap[5] = 0; - } else { - rsvmap[2] = 0; - rsvmap[3] = 0; - } + rsvmap[2] = 0; + rsvmap[3] = 0; return (unsigned long)hdr; } @@ -485,15 +444,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4) if (!BOOT_INFO_IS_V2_COMPATIBLE(bi)) bi->logicalDisplayBase = bi->dispDeviceBase; - /* Fixup depth 16 -> 15 as that's what MacOS calls 16bpp */ - if (bi->dispDeviceDepth == 16) - bi->dispDeviceDepth = 15; - - #ifdef CONFIG_BOOTX_TEXT - ptr = (unsigned long)bi->logicalDisplayBase; - ptr += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; - ptr += bi->dispDeviceRect[0] * ((bi->dispDeviceDepth + 7) / 8); btext_setup_display(bi->dispDeviceRect[2] - bi->dispDeviceRect[0], bi->dispDeviceRect[3] - bi->dispDeviceRect[1], bi->dispDeviceDepth, bi->dispDeviceRowBytes, @@ -527,7 +478,6 @@ void __init bootx_init(unsigned long r3, unsigned long r4) #ifdef CONFIG_BOOTX_TEXT btext_welcome(bi); #endif - /* New BootX enters kernel with MMU off, i/os are not allowed * here. This hack will have been done by the boostrap anyway. */ @@ -550,12 +500,12 @@ void __init bootx_init(unsigned long r3, unsigned long r4) */ if (bi->version < 5) { space = bi->deviceTreeOffset + bi->deviceTreeSize; - if (bi->ramDisk >= space) + if (bi->ramDisk) space = bi->ramDisk + bi->ramDiskSize; } else space = bi->totalParamsSize; - bootx_printf("Total space used by parameters & ramdisk: 0x%x \n", space); + bootx_printf("Total space used by parameters & ramdisk: %x \n", space); /* New BootX will have flushed all TLBs and enters kernel with * MMU switched OFF, so this should not be useful anymore. diff --git a/arch/powerpc/platforms/powermac/cache.S b/arch/powerpc/platforms/powermac/cache.S index 6be1a4af3..fb977de6b 100644 --- a/arch/powerpc/platforms/powermac/cache.S +++ b/arch/powerpc/platforms/powermac/cache.S @@ -14,6 +14,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 62926248b..cfd6527a0 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -67,7 +68,7 @@ static unsigned int cur_freq; static unsigned int sleep_freq; /* - * Different models uses different mechanisms to switch the frequency + * Different models uses different mecanisms to switch the frequency */ static int (*set_speed_proc)(int low_speed); static unsigned int (*get_speed_proc)(void); @@ -267,7 +268,7 @@ static int pmu_set_cpu_speed(int low_speed) /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occurring while we did + /* Make sure any pending DEC interrupt occuring while we did * the above didn't re-enable the DEC */ mb(); asm volatile("mtdec %0" : : "r" (0x7fffffff)); @@ -313,7 +314,7 @@ static int pmu_set_cpu_speed(int low_speed) _set_L3CR(save_l3cr); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + set_context(current->active_mm->context, current->active_mm->pgd); #ifdef DEBUG_FREQ printk(KERN_DEBUG "HID1, after: %x\n", mfspr(SPRN_HID1)); diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c index b55ec2add..b57e465a1 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_64.c +++ b/arch/powerpc/platforms/powermac/cpufreq_64.c @@ -10,8 +10,7 @@ * that is iMac G5 and latest single CPU desktop. */ -#undef DEBUG - +#include #include #include #include @@ -32,7 +31,13 @@ #include #include -#define DBG(fmt...) pr_debug(fmt) +#undef DEBUG + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif /* see 970FX user manual */ @@ -78,6 +83,8 @@ static struct freq_attr* g5_cpu_freqs_attr[] = { /* Power mode data is an array of the 32 bits PCR values to use for * the various frequencies, retrieved from the device-tree */ +static u32 *g5_pmode_data; +static int g5_pmode_max; static int g5_pmode_cur; static void (*g5_switch_volt)(int speed_mode); @@ -87,11 +94,6 @@ static int (*g5_query_freq)(void); static DEFINE_MUTEX(g5_switch_mutex); -#ifdef CONFIG_PMAC_SMU - -static u32 *g5_pmode_data; -static int g5_pmode_max; - static struct smu_sdbp_fvt *g5_fvt_table; /* table of op. points */ static int g5_fvt_count; /* number of op. points */ static int g5_fvt_cur; /* current op. point */ @@ -104,7 +106,7 @@ static void g5_smu_switch_volt(int speed_mode) { struct smu_simple_cmd cmd; - DECLARE_COMPLETION_ONSTACK(comp); + DECLARE_COMPLETION(comp); smu_queue_simple(&cmd, SMU_CMD_POWER_COMMAND, 8, smu_done_complete, &comp, 'V', 'S', 'L', 'E', 'W', 0xff, g5_fvt_cur+1, speed_mode); @@ -208,16 +210,6 @@ static int g5_scom_query_freq(void) return i; } -/* - * Fake voltage switching for platforms with missing support - */ - -static void g5_dummy_switch_volt(int speed_mode) -{ -} - -#endif /* CONFIG_PMAC_SMU */ - /* * Platform function based voltage switching for PowerMac7,2 & 7,3 */ @@ -257,9 +249,6 @@ static int g5_pfunc_switch_freq(int speed_mode) struct pmf_args args; u32 done = 0; unsigned long timeout; - int rc; - - DBG("g5_pfunc_switch_freq(%d)\n", speed_mode); /* If frequency is going up, first ramp up the voltage */ if (speed_mode < g5_pmode_cur) @@ -267,12 +256,9 @@ static int g5_pfunc_switch_freq(int speed_mode) /* Do it */ if (speed_mode == CPUFREQ_HIGH) - rc = pmf_call_one(pfunc_cpu_setfreq_high, NULL); + pmf_call_one(pfunc_cpu_setfreq_high, NULL); else - rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); - - if (rc) - printk(KERN_WARNING "cpufreq: pfunc switch error %d\n", rc); + pmf_call_one(pfunc_cpu_setfreq_low, NULL); /* It's an irq GPIO so we should be able to just block here, * I'll do that later after I've properly tested the IRQ code for @@ -311,6 +297,13 @@ static int g5_pfunc_query_freq(void) return val ? CPUFREQ_HIGH : CPUFREQ_LOW; } +/* + * Fake voltage switching for platforms with missing support + */ + +static void g5_dummy_switch_volt(int speed_mode) +{ +} /* * Common interface to the cpufreq core @@ -383,8 +376,6 @@ static struct cpufreq_driver g5_cpufreq_driver = { }; -#ifdef CONFIG_PMAC_SMU - static int __init g5_neo2_cpufreq_init(struct device_node *cpus) { struct device_node *cpunode; @@ -535,9 +526,6 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus) return rc; } -#endif /* CONFIG_PMAC_SMU */ - - static int __init g5_pm72_cpufreq_init(struct device_node *cpus) { struct device_node *cpuid = NULL, *hwclock = NULL, *cpunode = NULL; @@ -546,9 +534,6 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) u64 max_freq, min_freq, ih, il; int has_volt = 1, rc = 0; - DBG("cpufreq: Initializing for PowerMac7,2, PowerMac7,3 and" - " RackMac3,1...\n"); - /* Get first CPU node */ for (cpunode = NULL; (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) { @@ -652,15 +637,6 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) */ ih = *((u32 *)(eeprom + 0x10)); il = *((u32 *)(eeprom + 0x20)); - - /* Check for machines with no useful settings */ - if (il == ih) { - printk(KERN_WARNING "cpufreq: No low frequency mode available" - " on this model !\n"); - rc = -ENODEV; - goto bail; - } - min_freq = 0; if (ih != 0 && il != 0) min_freq = (max_freq * il) / ih; @@ -668,7 +644,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) /* Sanity check */ if (min_freq >= max_freq || min_freq < 1000) { printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n"); - rc = -ENXIO; + rc = -ENODEV; goto bail; } g5_cpu_freqs[0].frequency = max_freq; @@ -715,10 +691,16 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) return rc; } +static int __init g5_rm31_cpufreq_init(struct device_node *cpus) +{ + /* NYI */ + return 0; +} + static int __init g5_cpufreq_init(void) { struct device_node *cpus; - int rc = 0; + int rc; cpus = of_find_node_by_path("/cpus"); if (cpus == NULL) { @@ -727,13 +709,12 @@ static int __init g5_cpufreq_init(void) } if (machine_is_compatible("PowerMac7,2") || - machine_is_compatible("PowerMac7,3") || - machine_is_compatible("RackMac3,1")) + machine_is_compatible("PowerMac7,3")) rc = g5_pm72_cpufreq_init(cpus); -#ifdef CONFIG_PMAC_SMU + else if (machine_is_compatible("RackMac3,1")) + rc = g5_rm31_cpufreq_init(cpus); else rc = g5_neo2_cpufreq_init(cpus); -#endif /* CONFIG_PMAC_SMU */ of_node_put(cpus); return rc; diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index f8313bf9a..a5063cd67 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -16,6 +16,7 @@ * - Split split split... * */ +#include #include #include #include @@ -2509,7 +2510,7 @@ found: if (get_property(np, "flush-on-lock", NULL)) break; powersave_nap = 1; - printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n"); + printk(KERN_INFO "Processor NAP mode on idle enabled.\n"); break; } diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 8677f50c2..c896ce83d 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c @@ -30,6 +30,7 @@ #undef DEBUG #undef DEBUG_LOW +#include #include #include #include @@ -522,11 +523,10 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np) host->speed = KW_I2C_MODE_25KHZ; break; } - host->irq = irq_of_parse_and_map(np, 0); - if (host->irq == NO_IRQ) - printk(KERN_WARNING - "low_i2c: Failed to map interrupt for %s\n", - np->full_name); + if (np->n_intrs > 0) + host->irq = np->intrs[0].line; + else + host->irq = NO_IRQ; host->base = ioremap((*addrp), 0x1000); if (host->base == NULL) { diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 692945c14..262f967b8 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c @@ -8,6 +8,7 @@ * * Todo: - add support for the OF persistent properties */ +#include #include #include #include @@ -29,8 +30,6 @@ #include #include -#include "pmac.h" - #define DEBUG #ifdef DEBUG @@ -82,6 +81,9 @@ static int nvram_partitions[3]; // XXX Turn that into a sem static DEFINE_SPINLOCK(nv_lock); +extern int pmac_newworld; +extern int system_running; + static int (*core99_write_bank)(int bank, u8* datas); static int (*core99_erase_bank)(int bank); @@ -195,7 +197,7 @@ static void pmu_nvram_complete(struct adb_request *req) static unsigned char pmu_nvram_read_byte(int addr) { struct adb_request req; - DECLARE_COMPLETION_ONSTACK(req_complete); + DECLARE_COMPLETION(req_complete); req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL; if (pmu_request(&req, pmu_nvram_complete, 3, PMU_READ_NVRAM, @@ -211,7 +213,7 @@ static unsigned char pmu_nvram_read_byte(int addr) static void pmu_nvram_write_byte(int addr, unsigned char val) { struct adb_request req; - DECLARE_COMPLETION_ONSTACK(req_complete); + DECLARE_COMPLETION(req_complete); req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL; if (pmu_request(&req, pmu_nvram_complete, 4, PMU_WRITE_NVRAM, diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 205d04471..ea179afea 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -25,7 +24,10 @@ #include #include #include +#ifdef CONFIG_PPC64 +//#include #include +#endif #undef DEBUG @@ -44,8 +46,6 @@ static int has_uninorth; static struct pci_controller *u3_agp; static struct pci_controller *u4_pcie; static struct pci_controller *u3_ht; -#else -static int has_second_ohare; #endif /* CONFIG_PPC64 */ extern u8 pci_cache_line_size; @@ -647,33 +647,6 @@ static void __init init_p2pbridge(void) early_write_config_word(hose, bus, devfn, PCI_BRIDGE_CONTROL, val); } -static void __init init_second_ohare(void) -{ - struct device_node *np = of_find_node_by_name(NULL, "pci106b,7"); - unsigned char bus, devfn; - unsigned short cmd; - - if (np == NULL) - return; - - /* This must run before we initialize the PICs since the second - * ohare hosts a PIC that will be accessed there. - */ - if (pci_device_from_OF_node(np, &bus, &devfn) == 0) { - struct pci_controller* hose = - pci_find_hose_for_OF_device(np); - if (!hose) { - printk(KERN_ERR "Can't find PCI hose for OHare2 !\n"); - return; - } - early_read_config_word(hose, bus, devfn, PCI_COMMAND, &cmd); - cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; - cmd &= ~PCI_COMMAND_IO; - early_write_config_word(hose, bus, devfn, PCI_COMMAND, cmd); - } - has_second_ohare = 1; -} - /* * Some Apple desktop machines have a NEC PD720100A USB2 controller * on the motherboard. Open Firmware, on these, will disable the @@ -715,6 +688,9 @@ static void __init fixup_nec_usb2(void) " EHCI, fixing up...\n"); data &= ~1UL; early_write_config_dword(hose, bus, devfn, 0xe4, data); + early_write_config_byte(hose, bus, + devfn | 2, PCI_INTERRUPT_LINE, + nec->intrs[0].line); } } } @@ -963,10 +939,9 @@ static int __init add_bridge(struct device_node *dev) disp_name = "Chaos"; primary = 0; } - printk(KERN_INFO "Found %s PCI host bridge at 0x%016llx. " + printk(KERN_INFO "Found %s PCI host bridge at 0x%08lx. " "Firmware bus number: %d->%d\n", - disp_name, (unsigned long long)rsrc.start, hose->first_busno, - hose->last_busno); + disp_name, rsrc.start, hose->first_busno, hose->last_busno); #endif /* CONFIG_PPC32 */ DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", @@ -982,32 +957,32 @@ static int __init add_bridge(struct device_node *dev) return 0; } -void __init pmac_pcibios_fixup(void) +static void __init pcibios_fixup_OF_interrupts(void) { struct pci_dev* dev = NULL; + /* + * Open Firmware often doesn't initialize the + * PCI_INTERRUPT_LINE config register properly, so we + * should find the device node and apply the interrupt + * obtained from the OF device-tree + */ for_each_pci_dev(dev) { - /* Read interrupt from the device-tree */ - pci_read_irq_line(dev); - -#ifdef CONFIG_PPC32 - /* Fixup interrupt for the modem/ethernet combo controller. - * on machines with a second ohare chip. - * The number in the device tree (27) is bogus (correct for - * the ethernet-only board but not the combo ethernet/modem - * board). The real interrupt is 28 on the second controller - * -> 28+32 = 60. - */ - if (has_second_ohare && - dev->vendor == PCI_VENDOR_ID_DEC && - dev->device == PCI_DEVICE_ID_DEC_TULIP_PLUS) { - dev->irq = irq_create_mapping(NULL, 60); - set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW); - } -#endif /* CONFIG_PPC32 */ + struct device_node *node; + node = pci_device_to_OF_node(dev); + /* this is the node, see if it has interrupts */ + if (node && node->n_intrs > 0) + dev->irq = node->intrs[0].line; + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); } } +void __init pmac_pcibios_fixup(void) +{ + /* Fixup interrupts according to OF tree */ + pcibios_fixup_OF_interrupts(); +} + #ifdef CONFIG_PPC64 static void __init pmac_fixup_phb_resources(void) { @@ -1093,9 +1068,11 @@ void __init pmac_pci_init(void) /* Tell pci.c to not use the common resource allocation mechanism */ pci_probe_only = 1; + /* Allow all IO */ + io_page_mask = -1; + #else /* CONFIG_PPC64 */ init_p2pbridge(); - init_second_ohare(); fixup_nec_usb2(); /* We are still having some issues with the Xserve G4, enabling diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c index aacfa5959..a3bd3e728 100644 --- a/arch/powerpc/platforms/powermac/pfunc_base.c +++ b/arch/powerpc/platforms/powermac/pfunc_base.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -24,18 +25,19 @@ static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs) static int macio_do_gpio_irq_enable(struct pmf_function *func) { - unsigned int irq = irq_of_parse_and_map(func->node, 0); - if (irq == NO_IRQ) + if (func->node->n_intrs < 1) return -EINVAL; - return request_irq(irq, macio_gpio_irq, 0, func->node->name, func); + + return request_irq(func->node->intrs[0].line, macio_gpio_irq, 0, + func->node->name, func); } static int macio_do_gpio_irq_disable(struct pmf_function *func) { - unsigned int irq = irq_of_parse_and_map(func->node, 0); - if (irq == NO_IRQ) + if (func->node->n_intrs < 1) return -EINVAL; - free_irq(irq, func); + + free_irq(func->node->intrs[0].line, func); return 0; } @@ -256,7 +258,7 @@ static struct pmf_handlers macio_mmio_handlers = { .write_reg32 = macio_do_write_reg32, .read_reg32 = macio_do_read_reg32, .write_reg8 = macio_do_write_reg8, - .read_reg8 = macio_do_read_reg8, + .read_reg32 = macio_do_read_reg8, .read_reg32_msrx = macio_do_read_reg32_msrx, .read_reg8_msrx = macio_do_read_reg8_msrx, .write_reg32_slm = macio_do_write_reg32_slm, diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index b117adbf9..f08173b0f 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c @@ -5,6 +5,7 @@ * FIXME: LOCKING !!! */ +#include #include #include #include @@ -545,7 +546,7 @@ struct pmf_device { }; static LIST_HEAD(pmf_devices); -static DEFINE_SPINLOCK(pmf_lock); +static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED; static DEFINE_MUTEX(pmf_irq_mutex); static void pmf_release_device(struct kref *kref) @@ -870,17 +871,10 @@ int pmf_register_irq_client(struct device_node *target, spin_unlock_irqrestore(&pmf_lock, flags); if (func == NULL) return -ENODEV; - - /* guard against manipulations of list */ mutex_lock(&pmf_irq_mutex); if (list_empty(&func->irq_clients)) func->dev->handlers->irq_enable(func); - - /* guard against pmf_do_irq while changing list */ - spin_lock_irqsave(&pmf_lock, flags); list_add(&client->link, &func->irq_clients); - spin_unlock_irqrestore(&pmf_lock, flags); - client->func = func; mutex_unlock(&pmf_irq_mutex); @@ -891,19 +885,12 @@ EXPORT_SYMBOL_GPL(pmf_register_irq_client); void pmf_unregister_irq_client(struct pmf_irq_client *client) { struct pmf_function *func = client->func; - unsigned long flags; BUG_ON(func == NULL); - /* guard against manipulations of list */ mutex_lock(&pmf_irq_mutex); client->func = NULL; - - /* guard against pmf_do_irq while changing list */ - spin_lock_irqsave(&pmf_lock, flags); list_del(&client->link); - spin_unlock_irqrestore(&pmf_lock, flags); - if (list_empty(&func->irq_clients)) func->dev->handlers->irq_disable(func); mutex_unlock(&pmf_irq_mutex); diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 39f7ddb55..18bf3011d 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c @@ -15,6 +15,7 @@ * */ +#include #include #include #include @@ -65,36 +66,39 @@ static u32 level_mask[4]; static DEFINE_SPINLOCK(pmac_pic_lock); +#define GATWICK_IRQ_POOL_SIZE 10 +static struct interrupt_info gatwick_int_pool[GATWICK_IRQ_POOL_SIZE]; + #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) static unsigned long ppc_lost_interrupts[NR_MASK_WORDS]; -static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; -static int pmac_irq_cascade = -1; -static struct irq_host *pmac_pic_host; -static void __pmac_retrigger(unsigned int irq_nr) +/* + * Mark an irq as "lost". This is only used on the pmac + * since it can lose interrupts (see pmac_set_irq_mask). + * -- Cort + */ +void __set_lost(unsigned long irq_nr, int nokick) { - if (irq_nr >= max_real_irqs && pmac_irq_cascade > 0) { - __set_bit(irq_nr, ppc_lost_interrupts); - irq_nr = pmac_irq_cascade; - mb(); - } - if (!__test_and_set_bit(irq_nr, ppc_lost_interrupts)) { + if (!test_and_set_bit(irq_nr, ppc_lost_interrupts)) { atomic_inc(&ppc_n_lost_interrupts); - set_dec(1); + if (!nokick) + set_dec(1); } } -static void pmac_mask_and_ack_irq(unsigned int virq) +static void pmac_mask_and_ack_irq(unsigned int irq_nr) { - unsigned int src = irq_map[virq].hwirq; - unsigned long bit = 1UL << (src & 0x1f); - int i = src >> 5; + unsigned long bit = 1UL << (irq_nr & 0x1f); + int i = irq_nr >> 5; unsigned long flags; - spin_lock_irqsave(&pmac_pic_lock, flags); - __clear_bit(src, ppc_cached_irq_mask); - if (__test_and_clear_bit(src, ppc_lost_interrupts)) + if ((unsigned)irq_nr >= max_irqs) + return; + + clear_bit(irq_nr, ppc_cached_irq_mask); + if (test_and_clear_bit(irq_nr, ppc_lost_interrupts)) atomic_dec(&ppc_n_lost_interrupts); + spin_lock_irqsave(&pmac_pic_lock, flags); out_le32(&pmac_irq_hw[i]->enable, ppc_cached_irq_mask[i]); out_le32(&pmac_irq_hw[i]->ack, bit); do { @@ -106,29 +110,16 @@ static void pmac_mask_and_ack_irq(unsigned int virq) spin_unlock_irqrestore(&pmac_pic_lock, flags); } -static void pmac_ack_irq(unsigned int virq) -{ - unsigned int src = irq_map[virq].hwirq; - unsigned long bit = 1UL << (src & 0x1f); - int i = src >> 5; - unsigned long flags; - - spin_lock_irqsave(&pmac_pic_lock, flags); - if (__test_and_clear_bit(src, ppc_lost_interrupts)) - atomic_dec(&ppc_n_lost_interrupts); - out_le32(&pmac_irq_hw[i]->ack, bit); - (void)in_le32(&pmac_irq_hw[i]->ack); - spin_unlock_irqrestore(&pmac_pic_lock, flags); -} - -static void __pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) +static void pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) { unsigned long bit = 1UL << (irq_nr & 0x1f); int i = irq_nr >> 5; + unsigned long flags; if ((unsigned)irq_nr >= max_irqs) return; + spin_lock_irqsave(&pmac_pic_lock, flags); /* enable unmasked interrupts */ out_le32(&pmac_irq_hw[i]->enable, ppc_cached_irq_mask[i]); @@ -145,78 +136,71 @@ static void __pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) * the bit in the flag register or request another interrupt. */ if (bit & ppc_cached_irq_mask[i] & in_le32(&pmac_irq_hw[i]->level)) - __pmac_retrigger(irq_nr); + __set_lost((ulong)irq_nr, nokicklost); + spin_unlock_irqrestore(&pmac_pic_lock, flags); } /* When an irq gets requested for the first client, if it's an * edge interrupt, we clear any previous one on the controller */ -static unsigned int pmac_startup_irq(unsigned int virq) +static unsigned int pmac_startup_irq(unsigned int irq_nr) { - unsigned long flags; - unsigned int src = irq_map[virq].hwirq; - unsigned long bit = 1UL << (src & 0x1f); - int i = src >> 5; + unsigned long bit = 1UL << (irq_nr & 0x1f); + int i = irq_nr >> 5; - spin_lock_irqsave(&pmac_pic_lock, flags); - if ((irq_desc[virq].status & IRQ_LEVEL) == 0) + if ((irq_desc[irq_nr].status & IRQ_LEVEL) == 0) out_le32(&pmac_irq_hw[i]->ack, bit); - __set_bit(src, ppc_cached_irq_mask); - __pmac_set_irq_mask(src, 0); - spin_unlock_irqrestore(&pmac_pic_lock, flags); + set_bit(irq_nr, ppc_cached_irq_mask); + pmac_set_irq_mask(irq_nr, 0); return 0; } -static void pmac_mask_irq(unsigned int virq) +static void pmac_mask_irq(unsigned int irq_nr) { - unsigned long flags; - unsigned int src = irq_map[virq].hwirq; - - spin_lock_irqsave(&pmac_pic_lock, flags); - __clear_bit(src, ppc_cached_irq_mask); - __pmac_set_irq_mask(src, 1); - spin_unlock_irqrestore(&pmac_pic_lock, flags); + clear_bit(irq_nr, ppc_cached_irq_mask); + pmac_set_irq_mask(irq_nr, 0); + mb(); } -static void pmac_unmask_irq(unsigned int virq) +static void pmac_unmask_irq(unsigned int irq_nr) { - unsigned long flags; - unsigned int src = irq_map[virq].hwirq; - - spin_lock_irqsave(&pmac_pic_lock, flags); - __set_bit(src, ppc_cached_irq_mask); - __pmac_set_irq_mask(src, 0); - spin_unlock_irqrestore(&pmac_pic_lock, flags); + set_bit(irq_nr, ppc_cached_irq_mask); + pmac_set_irq_mask(irq_nr, 0); } -static int pmac_retrigger(unsigned int virq) +static void pmac_end_irq(unsigned int irq_nr) { - unsigned long flags; - - spin_lock_irqsave(&pmac_pic_lock, flags); - __pmac_retrigger(irq_map[virq].hwirq); - spin_unlock_irqrestore(&pmac_pic_lock, flags); - return 1; + if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) + && irq_desc[irq_nr].action) { + set_bit(irq_nr, ppc_cached_irq_mask); + pmac_set_irq_mask(irq_nr, 1); + } } -static struct irq_chip pmac_pic = { + +struct hw_interrupt_type pmac_pic = { .typename = " PMAC-PIC ", .startup = pmac_startup_irq, - .mask = pmac_mask_irq, - .ack = pmac_ack_irq, - .mask_ack = pmac_mask_and_ack_irq, - .unmask = pmac_unmask_irq, - .retrigger = pmac_retrigger, + .enable = pmac_unmask_irq, + .disable = pmac_mask_irq, + .ack = pmac_mask_and_ack_irq, + .end = pmac_end_irq, +}; + +struct hw_interrupt_type gatwick_pic = { + .typename = " GATWICK ", + .startup = pmac_startup_irq, + .enable = pmac_unmask_irq, + .disable = pmac_mask_irq, + .ack = pmac_mask_and_ack_irq, + .end = pmac_end_irq, }; static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs) { - unsigned long flags; int irq, bits; - int rc = IRQ_NONE; - spin_lock_irqsave(&pmac_pic_lock, flags); for (irq = max_irqs; (irq -= 32) >= max_real_irqs; ) { int i = irq >> 5; bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i]; @@ -226,20 +210,17 @@ static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs) if (bits == 0) continue; irq += __ilog2(bits); - spin_unlock_irqrestore(&pmac_pic_lock, flags); __do_IRQ(irq, regs); - spin_lock_irqsave(&pmac_pic_lock, flags); - rc = IRQ_HANDLED; + return IRQ_HANDLED; } - spin_unlock_irqrestore(&pmac_pic_lock, flags); - return rc; + printk("gatwick irq not from gatwick pic\n"); + return IRQ_NONE; } -static unsigned int pmac_pic_get_irq(struct pt_regs *regs) +static int pmac_get_irq(struct pt_regs *regs) { int irq; unsigned long bits = 0; - unsigned long flags; #ifdef CONFIG_SMP void psurge_smp_message_recv(struct pt_regs *); @@ -247,10 +228,9 @@ static unsigned int pmac_pic_get_irq(struct pt_regs *regs) /* IPI's are a hack on the powersurge -- Cort */ if ( smp_processor_id() != 0 ) { psurge_smp_message_recv(regs); - return NO_IRQ_IGNORE; /* ignore, already handled */ + return -2; /* ignore, already handled */ } #endif /* CONFIG_SMP */ - spin_lock_irqsave(&pmac_pic_lock, flags); for (irq = max_real_irqs; (irq -= 32) >= 0; ) { int i = irq >> 5; bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i]; @@ -262,10 +242,133 @@ static unsigned int pmac_pic_get_irq(struct pt_regs *regs) irq += __ilog2(bits); break; } - spin_unlock_irqrestore(&pmac_pic_lock, flags); - if (unlikely(irq < 0)) - return NO_IRQ; - return irq_linear_revmap(pmac_pic_host, irq); + + return irq; +} + +/* This routine will fix some missing interrupt values in the device tree + * on the gatwick mac-io controller used by some PowerBooks + * + * Walking of OF nodes could use a bit more fixing up here, but it's not + * very important as this is all boot time code on static portions of the + * device-tree. + * + * However, the modifications done to "intrs" will have to be removed and + * replaced with proper updates of the "interrupts" properties or + * AAPL,interrupts, yet to be decided, once the dynamic parsing is there. + */ +static void __init pmac_fix_gatwick_interrupts(struct device_node *gw, + int irq_base) +{ + struct device_node *node; + int count; + + memset(gatwick_int_pool, 0, sizeof(gatwick_int_pool)); + count = 0; + for (node = NULL; (node = of_get_next_child(gw, node)) != NULL;) { + /* Fix SCC */ + if ((strcasecmp(node->name, "escc") == 0) && node->child) { + if (node->child->n_intrs < 3) { + node->child->intrs = &gatwick_int_pool[count]; + count += 3; + } + node->child->n_intrs = 3; + node->child->intrs[0].line = 15+irq_base; + node->child->intrs[1].line = 4+irq_base; + node->child->intrs[2].line = 5+irq_base; + printk(KERN_INFO "irq: fixed SCC on gatwick" + " (%d,%d,%d)\n", + node->child->intrs[0].line, + node->child->intrs[1].line, + node->child->intrs[2].line); + } + /* Fix media-bay & left SWIM */ + if (strcasecmp(node->name, "media-bay") == 0) { + struct device_node* ya_node; + + if (node->n_intrs == 0) + node->intrs = &gatwick_int_pool[count++]; + node->n_intrs = 1; + node->intrs[0].line = 29+irq_base; + printk(KERN_INFO "irq: fixed media-bay on gatwick" + " (%d)\n", node->intrs[0].line); + + ya_node = node->child; + while(ya_node) { + if (strcasecmp(ya_node->name, "floppy") == 0) { + if (ya_node->n_intrs < 2) { + ya_node->intrs = &gatwick_int_pool[count]; + count += 2; + } + ya_node->n_intrs = 2; + ya_node->intrs[0].line = 19+irq_base; + ya_node->intrs[1].line = 1+irq_base; + printk(KERN_INFO "irq: fixed floppy on second controller (%d,%d)\n", + ya_node->intrs[0].line, ya_node->intrs[1].line); + } + if (strcasecmp(ya_node->name, "ata4") == 0) { + if (ya_node->n_intrs < 2) { + ya_node->intrs = &gatwick_int_pool[count]; + count += 2; + } + ya_node->n_intrs = 2; + ya_node->intrs[0].line = 14+irq_base; + ya_node->intrs[1].line = 3+irq_base; + printk(KERN_INFO "irq: fixed ide on second controller (%d,%d)\n", + ya_node->intrs[0].line, ya_node->intrs[1].line); + } + ya_node = ya_node->sibling; + } + } + } + if (count > 10) { + printk("WARNING !! Gatwick interrupt pool overflow\n"); + printk(" GATWICK_IRQ_POOL_SIZE = %d\n", GATWICK_IRQ_POOL_SIZE); + printk(" requested = %d\n", count); + } +} + +/* + * The PowerBook 3400/2400/3500 can have a combo ethernet/modem + * card which includes an ohare chip that acts as a second interrupt + * controller. If we find this second ohare, set it up and fix the + * interrupt value in the device tree for the ethernet chip. + */ +static void __init enable_second_ohare(struct device_node *np) +{ + unsigned char bus, devfn; + unsigned short cmd; + struct device_node *ether; + + /* This code doesn't strictly belong here, it could be part of + * either the PCI initialisation or the feature code. It's kept + * here for historical reasons. + */ + if (pci_device_from_OF_node(np, &bus, &devfn) == 0) { + struct pci_controller* hose = + pci_find_hose_for_OF_device(np); + if (!hose) { + printk(KERN_ERR "Can't find PCI hose for OHare2 !\n"); + return; + } + early_read_config_word(hose, bus, devfn, PCI_COMMAND, &cmd); + cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; + cmd &= ~PCI_COMMAND_IO; + early_write_config_word(hose, bus, devfn, PCI_COMMAND, cmd); + } + + /* Fix interrupt for the modem/ethernet combo controller. The number + * in the device tree (27) is bogus (correct for the ethernet-only + * board but not the combo ethernet/modem board). + * The real interrupt is 28 on the second controller -> 28+32 = 60. + */ + ether = of_find_node_by_name(NULL, "pci1011,14"); + if (ether && ether->n_intrs > 0) { + ether->intrs[0].line = 60; + printk(KERN_INFO "irq: Fixed ethernet IRQ to %d\n", + ether->intrs[0].line); + } + of_node_put(ether); } #ifdef CONFIG_XMON @@ -279,66 +382,22 @@ static struct irqaction xmon_action = { static struct irqaction gatwick_cascade_action = { .handler = gatwick_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "cascade", }; -static int pmac_pic_host_match(struct irq_host *h, struct device_node *node) -{ - /* We match all, we don't always have a node anyway */ - return 1; -} - -static int pmac_pic_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - struct irq_desc *desc = get_irq_desc(virq); - int level; - - if (hw >= max_irqs) - return -EINVAL; - - /* Mark level interrupts, set delayed disable for edge ones and set - * handlers - */ - level = !!(level_mask[hw >> 5] & (1UL << (hw & 0x1f))); - if (level) - desc->status |= IRQ_LEVEL; - else - desc->status |= IRQ_DELAYED_DISABLE; - set_irq_chip_and_handler(virq, &pmac_pic, level ? - handle_level_irq : handle_edge_irq); - return 0; -} - -static int pmac_pic_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, - unsigned int *out_flags) - -{ - *out_flags = IRQ_TYPE_NONE; - *out_hwirq = *intspec; - return 0; -} - -static struct irq_host_ops pmac_pic_host_ops = { - .match = pmac_pic_host_match, - .map = pmac_pic_host_map, - .xlate = pmac_pic_host_xlate, -}; - static void __init pmac_pic_probe_oldstyle(void) { int i; + int irq_cascade = -1; struct device_node *master = NULL; struct device_node *slave = NULL; u8 __iomem *addr; struct resource r; /* Set our get_irq function */ - ppc_md.get_irq = pmac_pic_get_irq; + ppc_md.get_irq = pmac_get_irq; /* * Find the interrupt controller type & node @@ -356,6 +415,7 @@ static void __init pmac_pic_probe_oldstyle(void) if (slave) { max_irqs = 64; level_mask[1] = OHARE_LEVEL_MASK; + enable_second_ohare(slave); } } else if ((master = of_find_node_by_name(NULL, "mac-io")) != NULL) { max_irqs = max_real_irqs = 64; @@ -379,18 +439,14 @@ static void __init pmac_pic_probe_oldstyle(void) max_irqs = 128; level_mask[2] = HEATHROW_LEVEL_MASK; level_mask[3] = 0; + pmac_fix_gatwick_interrupts(slave, max_real_irqs); } } BUG_ON(master == NULL); - /* - * Allocate an irq host - */ - pmac_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, max_irqs, - &pmac_pic_host_ops, - max_irqs); - BUG_ON(pmac_pic_host == NULL); - irq_set_default_host(pmac_pic_host); + /* Set the handler for the main PIC */ + for ( i = 0; i < max_real_irqs ; i++ ) + irq_desc[i].handler = &pmac_pic; /* Get addresses of first controller if we have a node for it */ BUG_ON(of_address_to_resource(master, 0, &r)); @@ -417,38 +473,39 @@ static void __init pmac_pic_probe_oldstyle(void) pmac_irq_hw[i++] = (volatile struct pmac_irq_hw __iomem *) (addr + 0x10); - pmac_irq_cascade = irq_of_parse_and_map(slave, 0); + irq_cascade = slave->intrs[0].line; printk(KERN_INFO "irq: Found slave Apple PIC %s for %d irqs" " cascade: %d\n", slave->full_name, - max_irqs - max_real_irqs, pmac_irq_cascade); + max_irqs - max_real_irqs, irq_cascade); } of_node_put(slave); - /* Disable all interrupts in all controllers */ + /* disable all interrupts in all controllers */ for (i = 0; i * 32 < max_irqs; ++i) out_le32(&pmac_irq_hw[i]->enable, 0); - /* Hookup cascade irq */ - if (slave && pmac_irq_cascade != NO_IRQ) - setup_irq(pmac_irq_cascade, &gatwick_cascade_action); + /* mark level interrupts */ + for (i = 0; i < max_irqs; i++) + if (level_mask[i >> 5] & (1UL << (i & 0x1f))) + irq_desc[i].status = IRQ_LEVEL; + /* Setup handlers for secondary controller and hook cascade irq*/ + if (slave) { + for ( i = max_real_irqs ; i < max_irqs ; i++ ) + irq_desc[i].handler = &gatwick_pic; + setup_irq(irq_cascade, &gatwick_cascade_action); + } printk(KERN_INFO "irq: System has %d possible interrupts\n", max_irqs); #ifdef CONFIG_XMON - setup_irq(irq_create_mapping(NULL, 20), &xmon_action); + setup_irq(20, &xmon_action); #endif } #endif /* CONFIG_PPC32 */ -static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) +static int pmac_u3_cascade(struct pt_regs *regs, void *data) { - struct mpic *mpic = desc->handler_data; - - unsigned int cascade_irq = mpic_get_one_irq(mpic, regs); - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - desc->chip->eoi(irq); + return mpic_get_one_irq((struct mpic *)data, regs); } static void __init pmac_pic_setup_mpic_nmi(struct mpic *mpic) @@ -458,20 +515,21 @@ static void __init pmac_pic_setup_mpic_nmi(struct mpic *mpic) int nmi_irq; pswitch = of_find_node_by_name(NULL, "programmer-switch"); - if (pswitch) { - nmi_irq = irq_of_parse_and_map(pswitch, 0); - if (nmi_irq != NO_IRQ) { - mpic_irq_set_priority(nmi_irq, 9); - setup_irq(nmi_irq, &xmon_action); - } - of_node_put(pswitch); + if (pswitch && pswitch->n_intrs) { + nmi_irq = pswitch->intrs[0].line; + mpic_irq_set_priority(nmi_irq, 9); + setup_irq(nmi_irq, &xmon_action); } + of_node_put(pswitch); #endif /* defined(CONFIG_XMON) && defined(CONFIG_PPC32) */ } static struct mpic * __init pmac_setup_one_mpic(struct device_node *np, int master) { + unsigned char senses[128]; + int offset = master ? 0 : 128; + int count = master ? 128 : 124; const char *name = master ? " MPIC 1 " : " MPIC 2 "; struct resource r; struct mpic *mpic; @@ -484,6 +542,8 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np, pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0); + prom_get_irq_senses(senses, offset, offset + count); + flags |= MPIC_WANTS_RESET; if (get_property(np, "big-endian", NULL)) flags |= MPIC_BIG_ENDIAN; @@ -494,7 +554,8 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np, if (master && (flags & MPIC_BIG_ENDIAN)) flags |= MPIC_BROKEN_U3; - mpic = mpic_alloc(np, r.start, flags, 0, 0, name); + mpic = mpic_alloc(r.start, flags, 0, offset, count, master ? 252 : 0, + senses, count, name); if (mpic == NULL) return NULL; @@ -507,7 +568,6 @@ static int __init pmac_pic_probe_mpic(void) { struct mpic *mpic1, *mpic2; struct device_node *np, *master = NULL, *slave = NULL; - unsigned int cascade; /* We can have up to 2 MPICs cascaded */ for (np = NULL; (np = of_find_node_by_type(np, "open-pic")) @@ -544,24 +604,16 @@ static int __init pmac_pic_probe_mpic(void) of_node_put(master); /* No slave, let's go out */ - if (slave == NULL) + if (slave == NULL || slave->n_intrs < 1) return 0; - /* Get/Map slave interrupt */ - cascade = irq_of_parse_and_map(slave, 0); - if (cascade == NO_IRQ) { - printk(KERN_ERR "Failed to map cascade IRQ\n"); - return 0; - } - mpic2 = pmac_setup_one_mpic(slave, 0); if (mpic2 == NULL) { printk(KERN_ERR "Failed to setup slave MPIC\n"); of_node_put(slave); return 0; } - set_irq_data(cascade, mpic2); - set_irq_chained_handler(cascade, pmac_u3_cascade); + mpic_setup_cascade(slave->intrs[0].line, pmac_u3_cascade, mpic2); of_node_put(slave); return 0; @@ -570,20 +622,6 @@ static int __init pmac_pic_probe_mpic(void) void __init pmac_pic_init(void) { - unsigned int flags = 0; - - /* We configure the OF parsing based on our oldworld vs. newworld - * platform type and wether we were booted by BootX. - */ -#ifdef CONFIG_PPC32 - if (!pmac_newworld) - flags |= OF_IMAP_OLDWORLD_MAC; - if (get_property(of_chosen, "linux,bootx", NULL) != NULL) - flags |= OF_IMAP_NO_PHANDLE; -#endif /* CONFIG_PPC_32 */ - - of_irq_map_init(flags); - /* We first try to detect Apple's new Core99 chipset, since mac-io * is quite different on those machines and contains an IBM MPIC2. */ @@ -606,7 +644,6 @@ unsigned long sleep_save_mask[2]; /* This used to be passed by the PMU driver but that link got * broken with the new driver model. We use this tweak for now... - * We really want to do things differently though... */ static int pmacpic_find_viaint(void) { @@ -620,7 +657,7 @@ static int pmacpic_find_viaint(void) np = of_find_node_by_name(NULL, "via-pmu"); if (np == NULL) goto not_found; - viaint = irq_of_parse_and_map(np, 0);; + viaint = np->intrs[0].line; #endif /* CONFIG_ADB_PMU */ not_found: diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h index 94e7b24b8..21c7b0f8f 100644 --- a/arch/powerpc/platforms/powermac/pmac.h +++ b/arch/powerpc/platforms/powermac/pmac.h @@ -12,8 +12,6 @@ struct rtc_time; -extern int pmac_newworld; - extern long pmac_time_init(void); extern unsigned long pmac_get_boot_time(void); extern void pmac_get_rtc_time(struct rtc_time *); diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 31a9da769..b9200fb07 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -23,6 +23,7 @@ * bootup setup stuff.. */ +#include #include #include #include @@ -457,7 +458,7 @@ static int pmac_pm_finish(suspend_state_t state) printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + set_context(current->active_mm->context, current->active_mm->pgd); return 0; } @@ -599,6 +600,13 @@ pmac_halt(void) */ static void __init pmac_init_early(void) { +#ifdef CONFIG_PPC64 + /* Initialize hash table, from now on, we can take hash faults + * and call ioremap + */ + hpte_init_native(); +#endif + /* Enable early btext debug if requested */ if (strstr(cmd_line, "btextdbg")) { udbg_adb_init_early(); @@ -613,6 +621,9 @@ static void __init pmac_init_early(void) udbg_adb_init(!!strstr(cmd_line, "btextdbg")); #ifdef CONFIG_PPC64 + /* Setup interrupt mapping options */ + ppc64_interrupt_controller = IC_OPEN_PIC; + iommu_init_early_dart(); #endif } @@ -672,8 +683,6 @@ static int __init pmac_probe(void) * part of the cacheable linar mapping */ alloc_dart_table(); - - hpte_init_native(); #endif #ifdef CONFIG_PPC32 diff --git a/arch/powerpc/platforms/powermac/sleep.S b/arch/powerpc/platforms/powermac/sleep.S index 1174ca128..22b113d19 100644 --- a/arch/powerpc/platforms/powermac/sleep.S +++ b/arch/powerpc/platforms/powermac/sleep.S @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 827b7121f..1065d87fc 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c @@ -21,6 +21,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -377,7 +378,7 @@ static void __init psurge_dual_sync_tb(int cpu_nr) static struct irqaction psurge_irqaction = { .handler = psurge_primary_intr, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "primary IPI", }; diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index a4173906e..890758aa9 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c @@ -9,6 +9,7 @@ * Copyright (C) 2003-2005 Benjamin Herrenschmidt. * */ +#include #include #include #include diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c index 6124e59e1..06c8265c2 100644 --- a/arch/powerpc/platforms/powermac/udbg_adb.c +++ b/arch/powerpc/platforms/powermac/udbg_adb.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c index 37e5b1eff..b4fa9f03b 100644 --- a/arch/powerpc/platforms/powermac/udbg_scc.c +++ b/arch/powerpc/platforms/powermac/udbg_scc.c @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index e5e0ff466..930898635 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile @@ -1,11 +1,8 @@ -ifeq ($(CONFIG_PPC64),y) -EXTRA_CFLAGS += -mno-minimal-toc -endif - obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ firmware.o obj-$(CONFIG_SMP) += smp.o +obj-$(CONFIG_IBMVIO) += vio.o obj-$(CONFIG_XICS) += xics.o obj-$(CONFIG_SCANLOG) += scanlog.o obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index c37a8497c..d4a402c58 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c @@ -287,7 +287,7 @@ void pci_addr_cache_remove_device(struct pci_dev *dev) * find the pci device that corresponds to a given address. * This routine scans all pci busses to build the cache. * Must be run late in boot process, after the pci controllers - * have been scanned for devices (after all device resources are known). + * have been scaned for devices (after all device resources are known). */ void __init pci_addr_cache_build(void) { @@ -304,8 +304,6 @@ void __init pci_addr_cache_build(void) pci_addr_cache_insert_device(dev); dn = pci_device_to_OF_node(dev); - if (!dn) - continue; pci_dev_get (dev); /* matching put is in eeh_remove_device() */ PCI_DN(dn)->pcidev = dev; } diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index aaad2c0af..1fba695e3 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -23,8 +23,9 @@ * */ #include -#include #include +#include +#include #include #include #include @@ -175,7 +176,7 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata) * * pSeries systems will isolate a PCI slot if the PCI-Host * bridge detects address or data parity errors, DMA's - * occurring to wild addresses (which usually happen due to + * occuring to wild addresses (which usually happen due to * bugs in device drivers or in PCI adapter firmware). * Slot isolations also occur if #SERR, #PERR or other misc * PCI-related errors are detected. @@ -201,11 +202,7 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata) static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) { - int cnt, rc; - - /* pcibios will clear the counter; save the value */ - cnt = pe_dn->eeh_freeze_count; - + int rc; if (bus) pcibios_remove_pci_devices(bus); @@ -244,7 +241,6 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) ssleep (5); pcibios_add_pci_devices(bus); } - pe_dn->eeh_freeze_count = cnt; return 0; } @@ -254,29 +250,23 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) */ #define MAX_WAIT_FOR_RECOVERY 15 -struct pci_dn * handle_eeh_events (struct eeh_event *event) +void handle_eeh_events (struct eeh_event *event) { struct device_node *frozen_dn; struct pci_dn *frozen_pdn; struct pci_bus *frozen_bus; int rc = 0; enum pci_ers_result result = PCI_ERS_RESULT_NONE; - const char *location, *pci_str, *drv_str; + const char *pci_str, *drv_str; frozen_dn = find_device_pe(event->dn); frozen_bus = pcibios_find_pci_bus(frozen_dn); if (!frozen_dn) { - - location = (char *) get_property(event->dn, "ibm,loc-code", NULL); - location = location ? location : "unknown"; - printk(KERN_ERR "EEH: Error: Cannot find partition endpoint " - "for location=%s pci addr=%s\n", - location, pci_name(event->dev)); - return NULL; + printk(KERN_ERR "EEH: Error: Cannot find partition endpoint for %s\n", + pci_name(event->dev)); + return; } - location = (char *) get_property(frozen_dn, "ibm,loc-code", NULL); - location = location ? location : "unknown"; /* There are two different styles for coming up with the PE. * In the old style, it was the highest EEH-capable device @@ -288,10 +278,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) frozen_bus = pcibios_find_pci_bus (frozen_dn->parent); if (!frozen_bus) { - printk(KERN_ERR "EEH: Cannot find PCI bus " - "for location=%s dn=%s\n", - location, frozen_dn->full_name); - return NULL; + printk(KERN_ERR "EEH: Cannot find PCI bus for %s\n", + frozen_dn->full_name); + return; } #if 0 @@ -325,9 +314,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) eeh_slot_error_detail(frozen_pdn, 1 /* Temporary Error */); printk(KERN_WARNING - "EEH: This PCI device has failed %d times since last reboot: " - "location=%s driver=%s pci addr=%s\n", - frozen_pdn->eeh_freeze_count, location, drv_str, pci_str); + "EEH: This PCI device has failed %d times since last reboot: %s - %s\n", + frozen_pdn->eeh_freeze_count, drv_str, pci_str); /* Walk the various device drivers attached to this slot through * a reset sequence, giving each an opportunity to do what it needs @@ -367,7 +355,7 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) /* Tell all device drivers that they can resume operations */ pci_walk_bus(frozen_bus, eeh_report_resume, NULL); - return frozen_pdn; + return; excess_failures: /* @@ -376,18 +364,17 @@ excess_failures: * due to actual, failed cards. */ printk(KERN_ERR - "EEH: PCI device at location=%s driver=%s pci addr=%s \n" - "has failed %d times and has been permanently disabled. \n" - "Please try reseating this device or replacing it.\n", - location, drv_str, pci_str, frozen_pdn->eeh_freeze_count); + "EEH: PCI device %s - %s has failed %d times \n" + "and has been permanently disabled. Please try reseating\n" + "this device or replacing it.\n", + drv_str, pci_str, frozen_pdn->eeh_freeze_count); goto perm_error; hard_fail: printk(KERN_ERR - "EEH: Unable to recover from failure of PCI device " - "at location=%s driver=%s pci addr=%s \n" + "EEH: Unable to recover from failure of PCI device %s - %s\n" "Please try reseating this device or replacing it.\n", - location, drv_str, pci_str); + drv_str, pci_str); perm_error: eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); @@ -397,8 +384,6 @@ perm_error: /* Shut down the device drivers for good. */ pcibios_remove_pci_devices(frozen_bus); - - return NULL; } /* ---------- end of file ---------- */ diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 45ccc687e..40020c65c 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c @@ -18,7 +18,6 @@ * Copyright (c) 2005 Linas Vepstas */ -#include #include #include #include @@ -35,7 +34,7 @@ */ /* EEH event workqueue setup. */ -static DEFINE_SPINLOCK(eeh_eventlist_lock); +static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED; LIST_HEAD(eeh_eventlist); static void eeh_thread_launcher(void *); DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL); @@ -57,43 +56,38 @@ static int eeh_event_handler(void * dummy) { unsigned long flags; struct eeh_event *event; - struct pci_dn *pdn; daemonize ("eehd"); - set_current_state(TASK_INTERRUPTIBLE); - spin_lock_irqsave(&eeh_eventlist_lock, flags); - event = NULL; + while (1) { + set_current_state(TASK_INTERRUPTIBLE); - /* Unqueue the event, get ready to process. */ - if (!list_empty(&eeh_eventlist)) { - event = list_entry(eeh_eventlist.next, struct eeh_event, list); - list_del(&event->list); - } - spin_unlock_irqrestore(&eeh_eventlist_lock, flags); + spin_lock_irqsave(&eeh_eventlist_lock, flags); + event = NULL; - if (event == NULL) - return 0; + /* Unqueue the event, get ready to process. */ + if (!list_empty(&eeh_eventlist)) { + event = list_entry(eeh_eventlist.next, struct eeh_event, list); + list_del(&event->list); + } + spin_unlock_irqrestore(&eeh_eventlist_lock, flags); - /* Serialize processing of EEH events */ - mutex_lock(&eeh_event_mutex); - eeh_mark_slot(event->dn, EEH_MODE_RECOVERING); + if (event == NULL) + break; - printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", - pci_name(event->dev)); + /* Serialize processing of EEH events */ + mutex_lock(&eeh_event_mutex); + eeh_mark_slot(event->dn, EEH_MODE_RECOVERING); - pdn = handle_eeh_events(event); + printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", + pci_name(event->dev)); - eeh_clear_slot(event->dn, EEH_MODE_RECOVERING); - pci_dev_put(event->dev); - kfree(event); - mutex_unlock(&eeh_event_mutex); + handle_eeh_events(event); - /* If there are no new errors after an hour, clear the counter. */ - if (pdn && pdn->eeh_freeze_count>0) { - msleep_interruptible (3600*1000); - if (pdn->eeh_freeze_count>0) - pdn->eeh_freeze_count--; + eeh_clear_slot(event->dn, EEH_MODE_RECOVERING); + pci_dev_put(event->dev); + kfree(event); + mutex_unlock(&eeh_event_mutex); } return 0; diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index d67af2c65..264307843 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -1,29 +1,29 @@ /* * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation * - * Rewrite, cleanup: + * Rewrite, cleanup: * * Copyright (C) 2004 Olof Johansson , IBM Corporation - * Copyright (C) 2006 Olof Johansson * * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. * - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -49,101 +49,97 @@ #define DBG(fmt...) -static void tce_build_pSeries(struct iommu_table *tbl, long index, - long npages, unsigned long uaddr, +static void tce_build_pSeries(struct iommu_table *tbl, long index, + long npages, unsigned long uaddr, enum dma_data_direction direction) { - u64 proto_tce; - u64 *tcep; - u64 rpn; + union tce_entry t; + union tce_entry *tp; index <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; - proto_tce = TCE_PCI_READ; // Read allowed + t.te_word = 0; + t.te_rdwr = 1; // Read allowed if (direction != DMA_TO_DEVICE) - proto_tce |= TCE_PCI_WRITE; + t.te_pciwr = 1; - tcep = ((u64 *)tbl->it_base) + index; + tp = ((union tce_entry *)tbl->it_base) + index; while (npages--) { /* can't move this out since we might cross LMB boundary */ - rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; - *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; + t.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; + + tp->te_word = t.te_word; uaddr += TCE_PAGE_SIZE; - tcep++; + tp++; } } static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages) { - u64 *tcep; + union tce_entry t; + union tce_entry *tp; npages <<= TCE_PAGE_FACTOR; index <<= TCE_PAGE_FACTOR; - tcep = ((u64 *)tbl->it_base) + index; - - while (npages--) - *(tcep++) = 0; + t.te_word = 0; + tp = ((union tce_entry *)tbl->it_base) + index; + + while (npages--) { + tp->te_word = t.te_word; + + tp++; + } } -static unsigned long tce_get_pseries(struct iommu_table *tbl, long index) -{ - u64 *tcep; - - index <<= TCE_PAGE_FACTOR; - tcep = ((u64 *)tbl->it_base) + index; - - return *tcep; -} static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages, unsigned long uaddr, enum dma_data_direction direction) { u64 rc; - u64 proto_tce, tce; - u64 rpn; + union tce_entry tce; tcenum <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; - rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; - proto_tce = TCE_PCI_READ; + tce.te_word = 0; + tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; + tce.te_rdwr = 1; if (direction != DMA_TO_DEVICE) - proto_tce |= TCE_PCI_WRITE; + tce.te_pciwr = 1; while (npages--) { - tce = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; - rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, tce); - + rc = plpar_tce_put((u64)tbl->it_index, + (u64)tcenum << 12, + tce.te_word ); + if (rc && printk_ratelimit()) { printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); printk("\tindex = 0x%lx\n", (u64)tbl->it_index); printk("\ttcenum = 0x%lx\n", (u64)tcenum); - printk("\ttce val = 0x%lx\n", tce ); + printk("\ttce val = 0x%lx\n", tce.te_word ); show_stack(current, (unsigned long *)__get_SP()); } - + tcenum++; - rpn++; + tce.te_rpn++; } } -static DEFINE_PER_CPU(u64 *, tce_page) = NULL; +static DEFINE_PER_CPU(void *, tce_page) = NULL; static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages, unsigned long uaddr, enum dma_data_direction direction) { u64 rc; - u64 proto_tce; - u64 *tcep; - u64 rpn; + union tce_entry tce, *tcep; long l, limit; if (TCE_PAGE_FACTOR == 0 && npages == 1) @@ -156,7 +152,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, * from iommu_alloc{,_sg}() */ if (!tcep) { - tcep = (u64 *)__get_free_page(GFP_ATOMIC); + tcep = (void *)__get_free_page(GFP_ATOMIC); /* If allocation fails, fall back to the loop implementation */ if (!tcep) return tce_build_pSeriesLP(tbl, tcenum, npages, @@ -167,10 +163,11 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, tcenum <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; - rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; - proto_tce = TCE_PCI_READ; + tce.te_word = 0; + tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT; + tce.te_rdwr = 1; if (direction != DMA_TO_DEVICE) - proto_tce |= TCE_PCI_WRITE; + tce.te_pciwr = 1; /* We can map max one pageful of TCEs at a time */ do { @@ -178,11 +175,11 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, * Set up the page with TCE data, looping through and setting * the values. */ - limit = min_t(long, npages, 4096/TCE_ENTRY_SIZE); + limit = min_t(long, npages, 4096/sizeof(union tce_entry)); for (l = 0; l < limit; l++) { - tcep[l] = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; - rpn++; + tcep[l] = tce; + tce.te_rpn++; } rc = plpar_tce_put_indirect((u64)tbl->it_index, @@ -198,7 +195,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); printk("\tindex = 0x%lx\n", (u64)tbl->it_index); printk("\tnpages = 0x%lx\n", (u64)npages); - printk("\ttce[0] val = 0x%lx\n", tcep[0]); + printk("\ttce[0] val = 0x%lx\n", tcep[0].te_word); show_stack(current, (unsigned long *)__get_SP()); } } @@ -206,17 +203,23 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) { u64 rc; + union tce_entry tce; tcenum <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; + tce.te_word = 0; + while (npages--) { - rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, 0); + rc = plpar_tce_put((u64)tbl->it_index, + (u64)tcenum << 12, + tce.te_word); if (rc && printk_ratelimit()) { printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc); printk("\tindex = 0x%lx\n", (u64)tbl->it_index); printk("\ttcenum = 0x%lx\n", (u64)tcenum); + printk("\ttce val = 0x%lx\n", tce.te_word ); show_stack(current, (unsigned long *)__get_SP()); } @@ -228,43 +231,31 @@ static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages static void tce_freemulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) { u64 rc; + union tce_entry tce; tcenum <<= TCE_PAGE_FACTOR; npages <<= TCE_PAGE_FACTOR; - rc = plpar_tce_stuff((u64)tbl->it_index, (u64)tcenum << 12, 0, npages); + tce.te_word = 0; + + rc = plpar_tce_stuff((u64)tbl->it_index, + (u64)tcenum << 12, + tce.te_word, + npages); if (rc && printk_ratelimit()) { printk("tce_freemulti_pSeriesLP: plpar_tce_stuff failed\n"); printk("\trc = %ld\n", rc); printk("\tindex = 0x%lx\n", (u64)tbl->it_index); printk("\tnpages = 0x%lx\n", (u64)npages); + printk("\ttce val = 0x%lx\n", tce.te_word ); show_stack(current, (unsigned long *)__get_SP()); } } -static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) -{ - u64 rc; - unsigned long tce_ret; - - tcenum <<= TCE_PAGE_FACTOR; - rc = plpar_tce_get((u64)tbl->it_index, (u64)tcenum << 12, &tce_ret); - - if (rc && printk_ratelimit()) { - printk("tce_get_pSeriesLP: plpar_tce_get failed. rc=%ld\n", - rc); - printk("\tindex = 0x%lx\n", (u64)tbl->it_index); - printk("\ttcenum = 0x%lx\n", (u64)tcenum); - show_stack(current, (unsigned long *)__get_SP()); - } - - return tce_ret; -} - static void iommu_table_setparms(struct pci_controller *phb, struct device_node *dn, - struct iommu_table *tbl) + struct iommu_table *tbl) { struct device_node *node; unsigned long *basep; @@ -281,22 +272,19 @@ static void iommu_table_setparms(struct pci_controller *phb, } tbl->it_base = (unsigned long)__va(*basep); - -#ifndef CONFIG_CRASH_DUMP memset((void *)tbl->it_base, 0, *sizep); -#endif tbl->it_busno = phb->bus->number; - + /* Units of tce entries */ tbl->it_offset = phb->dma_window_base_cur >> PAGE_SHIFT; - + /* Test if we are going over 2GB of DMA space */ if (phb->dma_window_base_cur + phb->dma_window_size > 0x80000000ul) { udbg_printf("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); - panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); + panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n"); } - + phb->dma_window_base_cur += phb->dma_window_size; /* Set the tce table size - measured in entries */ @@ -311,22 +299,30 @@ static void iommu_table_setparms(struct pci_controller *phb, * iommu_table_setparms_lpar * * Function: On pSeries LPAR systems, return TCE table info, given a pci bus. + * + * ToDo: properly interpret the ibm,dma-window property. The definition is: + * logical-bus-number (1 word) + * phys-address (#address-cells words) + * size (#cell-size words) + * + * Currently we hard code these sizes (more or less). */ static void iommu_table_setparms_lpar(struct pci_controller *phb, struct device_node *dn, struct iommu_table *tbl, - unsigned char *dma_window) + unsigned int *dma_window) { - unsigned long offset, size; - tbl->it_busno = PCI_DN(dn)->bussubno; - of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size); + /* TODO: Parse field size properties properly. */ + tbl->it_size = (((unsigned long)dma_window[4] << 32) | + (unsigned long)dma_window[5]) >> PAGE_SHIFT; + tbl->it_offset = (((unsigned long)dma_window[2] << 32) | + (unsigned long)dma_window[3]) >> PAGE_SHIFT; tbl->it_base = 0; + tbl->it_index = dma_window[0]; tbl->it_blocksize = 16; tbl->it_type = TCE_PCI; - tbl->it_offset = offset >> PAGE_SHIFT; - tbl->it_size = size >> PAGE_SHIFT; } static void iommu_bus_setup_pSeries(struct pci_bus *bus) @@ -361,9 +357,13 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) if (isa_dn_orig) of_node_put(isa_dn_orig); - /* Count number of direct PCI children of the PHB. */ + /* Count number of direct PCI children of the PHB. + * All PCI device nodes have class-code property, so it's + * an easy way to find them. + */ for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) - children++; + if (get_property(tmp, "class-code", NULL)) + children++; DBG("Children: %d\n", children); @@ -394,11 +394,10 @@ static void iommu_bus_setup_pSeries(struct pci_bus *bus) pci->phb->dma_window_size = 0x8000000ul; pci->phb->dma_window_base_cur = 0x8000000ul; - tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, - pci->phb->node); + tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); iommu_table_setparms(pci->phb, dn, tbl); - pci->iommu_table = iommu_init_table(tbl, pci->phb->node); + pci->iommu_table = iommu_init_table(tbl); /* Divide the rest (1.75GB) among the children */ pci->phb->dma_window_size = 0x80000000ul; @@ -415,7 +414,7 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) struct iommu_table *tbl; struct device_node *dn, *pdn; struct pci_dn *ppci; - unsigned char *dma_window = NULL; + unsigned int *dma_window = NULL; DBG("iommu_bus_setup_pSeriesLP, bus %p, bus->self %p\n", bus, bus->self); @@ -423,7 +422,7 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) /* Find nearest ibm,dma-window, walking up the device tree */ for (pdn = dn; pdn != NULL; pdn = pdn->parent) { - dma_window = get_property(pdn, "ibm,dma-window", NULL); + dma_window = (unsigned int *)get_property(pdn, "ibm,dma-window", NULL); if (dma_window != NULL) break; } @@ -441,12 +440,12 @@ static void iommu_bus_setup_pSeriesLP(struct pci_bus *bus) ppci->bussubno = bus->number; - tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, - ppci->phb->node); - + tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), + GFP_KERNEL); + iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window); - ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); + ppci->iommu_table = iommu_init_table(tbl); } if (pdn != dn) @@ -469,11 +468,9 @@ static void iommu_dev_setup_pSeries(struct pci_dev *dev) */ if (!dev->bus->self) { DBG(" --> first child, no bridge. Allocating iommu table.\n"); - tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, - PCI_DN(dn)->phb->node); + tbl = kmalloc(sizeof(struct iommu_table), GFP_KERNEL); iommu_table_setparms(PCI_DN(dn)->phb, dn, tbl); - PCI_DN(dn)->iommu_table = iommu_init_table(tbl, - PCI_DN(dn)->phb->node); + PCI_DN(mydn)->iommu_table = iommu_init_table(tbl); return; } @@ -519,7 +516,7 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) { struct device_node *pdn, *dn; struct iommu_table *tbl; - unsigned char *dma_window = NULL; + int *dma_window = NULL; struct pci_dn *pci; DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev)); @@ -534,7 +531,8 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) for (pdn = dn; pdn && PCI_DN(pdn) && !PCI_DN(pdn)->iommu_table; pdn = pdn->parent) { - dma_window = get_property(pdn, "ibm,dma-window", NULL); + dma_window = (unsigned int *) + get_property(pdn, "ibm,dma-window", NULL); if (dma_window) break; } @@ -555,12 +553,12 @@ static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev) /* iommu_table_setparms_lpar needs bussubno. */ pci->bussubno = pci->phb->bus->number; - tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, - pci->phb->node); + tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table), + GFP_KERNEL); iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window); - pci->iommu_table = iommu_init_table(tbl, pci->phb->node); + pci->iommu_table = iommu_init_table(tbl); } if (pdn != dn) @@ -590,13 +588,11 @@ void iommu_init_early_pSeries(void) ppc_md.tce_build = tce_build_pSeriesLP; ppc_md.tce_free = tce_free_pSeriesLP; } - ppc_md.tce_get = tce_get_pSeriesLP; ppc_md.iommu_bus_setup = iommu_bus_setup_pSeriesLP; ppc_md.iommu_dev_setup = iommu_dev_setup_pSeriesLP; } else { ppc_md.tce_build = tce_build_pSeries; ppc_md.tce_free = tce_free_pSeries; - ppc_md.tce_get = tce_get_pseries; ppc_md.iommu_bus_setup = iommu_bus_setup_pSeries; ppc_md.iommu_dev_setup = iommu_dev_setup_pSeries; } diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 3aeb40699..634b7d06d 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c @@ -21,6 +21,7 @@ #undef DEBUG_LOW +#include #include #include #include @@ -512,7 +513,7 @@ void pSeries_lpar_flush_hash_range(unsigned long number, int local) spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); } -void __init hpte_init_lpar(void) +void hpte_init_lpar(void) { ppc_md.hpte_invalidate = pSeries_lpar_hpte_invalidate; ppc_md.hpte_updatepp = pSeries_lpar_hpte_updatepp; @@ -521,4 +522,6 @@ void __init hpte_init_lpar(void) ppc_md.hpte_remove = pSeries_lpar_hpte_remove; ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range; ppc_md.hpte_clear_all = pSeries_lpar_hptab_clear; + + htab_finish_init(); } diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index c7ffde1a6..9639c66b4 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c @@ -72,61 +72,32 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id, /* #define DEBUG */ - -static void request_ras_irqs(struct device_node *np, +static void request_ras_irqs(struct device_node *np, char *propname, irqreturn_t (*handler)(int, void *, struct pt_regs *), const char *name) { - int i, index, count = 0; - struct of_irq oirq; - u32 *opicprop; - unsigned int opicplen; - unsigned int virqs[16]; - - /* Check for obsolete "open-pic-interrupt" property. If present, then - * map those interrupts using the default interrupt host and default - * trigger - */ - opicprop = (u32 *)get_property(np, "open-pic-interrupt", &opicplen); - if (opicprop) { - opicplen /= sizeof(u32); - for (i = 0; i < opicplen; i++) { - if (count > 15) - break; - virqs[count] = irq_create_mapping(NULL, *(opicprop++)); - if (virqs[count] == NO_IRQ) - printk(KERN_ERR "Unable to allocate interrupt " - "number for %s\n", np->full_name); - else - count++; - - } - } - /* Else use normal interrupt tree parsing */ - else { - /* First try to do a proper OF tree parsing */ - for (index = 0; of_irq_map_one(np, index, &oirq) == 0; - index++) { - if (count > 15) - break; - virqs[count] = irq_create_of_mapping(oirq.controller, - oirq.specifier, - oirq.size); - if (virqs[count] == NO_IRQ) - printk(KERN_ERR "Unable to allocate interrupt " - "number for %s\n", np->full_name); - else - count++; + unsigned int *ireg, len, i; + int virq, n_intr; + + ireg = (unsigned int *)get_property(np, propname, &len); + if (ireg == NULL) + return; + n_intr = prom_n_intr_cells(np); + len /= n_intr * sizeof(*ireg); + + for (i = 0; i < len; i++) { + virq = virt_irq_create_mapping(*ireg); + if (virq == NO_IRQ) { + printk(KERN_ERR "Unable to allocate interrupt " + "number for %s\n", np->full_name); + return; } - } - - /* Now request them */ - for (i = 0; i < count; i++) { - if (request_irq(virqs[i], handler, 0, name, NULL)) { + if (request_irq(irq_offset_up(virq), handler, 0, name, NULL)) { printk(KERN_ERR "Unable to request interrupt %d for " - "%s\n", virqs[i], np->full_name); + "%s\n", irq_offset_up(virq), np->full_name); return; } + ireg += n_intr; } } @@ -144,14 +115,20 @@ static int __init init_ras_IRQ(void) /* Internal Errors */ np = of_find_node_by_path("/event-sources/internal-errors"); if (np != NULL) { - request_ras_irqs(np, ras_error_interrupt, "RAS_ERROR"); + request_ras_irqs(np, "open-pic-interrupt", ras_error_interrupt, + "RAS_ERROR"); + request_ras_irqs(np, "interrupts", ras_error_interrupt, + "RAS_ERROR"); of_node_put(np); } /* EPOW Events */ np = of_find_node_by_path("/event-sources/epow-events"); if (np != NULL) { - request_ras_irqs(np, ras_epow_interrupt, "RAS_EPOW"); + request_ras_irqs(np, "open-pic-interrupt", ras_epow_interrupt, + "RAS_EPOW"); + request_ras_irqs(np, "interrupts", ras_epow_interrupt, + "RAS_EPOW"); of_node_put(np); } @@ -185,7 +162,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs) status = rtas_call(ras_check_exception_token, 6, 1, NULL, RAS_VECTOR_OFFSET, - irq_map[irq].hwirq, + virt_irq_to_real(irq_offset_down(irq)), RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, critical, __pa(&ras_log_buf), rtas_get_error_log_max()); @@ -221,7 +198,7 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs) status = rtas_call(ras_check_exception_token, 6, 1, NULL, RAS_VECTOR_OFFSET, - irq_map[irq].hwirq, + virt_irq_to_real(irq_offset_down(irq)), RTAS_INTERNAL_ERROR, 1 /*Time Critical */, __pa(&ras_log_buf), rtas_get_error_log_max()); diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c index 2e4e04042..e0000ce76 100644 --- a/arch/powerpc/platforms/pseries/rtasd.c +++ b/arch/powerpc/platforms/pseries/rtasd.c @@ -348,7 +348,7 @@ static int enable_surveillance(int timeout) return 0; if (error == -EINVAL) { - printk(KERN_DEBUG "rtasd: surveillance not supported\n"); + printk(KERN_INFO "rtasd: surveillance not supported\n"); return 0; } @@ -440,7 +440,7 @@ static int rtasd(void *unused) goto error; } - printk(KERN_DEBUG "RTAS daemon started\n"); + printk(KERN_INFO "RTAS daemon started\n"); DEBUG("will sleep for %d milliseconds\n", (30000/rtas_event_scan_rate)); @@ -487,7 +487,7 @@ static int __init rtas_init(void) /* No RTAS */ if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { - printk(KERN_DEBUG "rtasd: no event-scan on system\n"); + printk(KERN_INFO "rtasd: no event-scan on system\n"); return -ENODEV; } diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 77a5bb1d9..50643496e 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c @@ -107,9 +107,9 @@ static ssize_t scanlog_read(struct file *file, char __user *buf, /* Break to sleep default time */ break; default: - /* Assume extended busy */ - wait_time = rtas_busy_delay_time(status); - if (!wait_time) { + if (status > 9900 && status <= 9905) { + wait_time = rtas_extended_busy_delay_time(status); + } else { printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status); return -EIO; } diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 31867a701..3ba878357 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -18,6 +18,7 @@ #undef DEBUG +#include #include #include #include @@ -76,9 +77,6 @@ #define DBG(fmt...) #endif -/* move those away to a .h */ -extern void smp_init_pseries_mpic(void); -extern void smp_init_pseries_xics(void); extern void find_udbg_vterm(void); int fwnmi_active; /* TRUE if an FWNMI handler is present */ @@ -86,7 +84,7 @@ int fwnmi_active; /* TRUE if an FWNMI handler is present */ static void pseries_shared_idle_sleep(void); static void pseries_dedicated_idle_sleep(void); -static struct device_node *pSeries_mpic_node; +struct mpic *pSeries_mpic; static void pSeries_show_cpuinfo(struct seq_file *m) { @@ -121,98 +119,71 @@ static void __init fwnmi_init(void) fwnmi_active = 1; } -void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) +static void __init pSeries_init_mpic(void) { - unsigned int cascade_irq = i8259_irq(regs); - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - desc->chip->eoi(irq); + unsigned int *addrp; + struct device_node *np; + unsigned long intack = 0; + + /* All ISUs are setup, complete initialization */ + mpic_init(pSeries_mpic); + + /* Check what kind of cascade ACK we have */ + if (!(np = of_find_node_by_name(NULL, "pci")) + || !(addrp = (unsigned int *) + get_property(np, "8259-interrupt-acknowledge", NULL))) + printk(KERN_ERR "Cannot find pci to get ack address\n"); + else + intack = addrp[prom_n_addr_cells(np)-1]; + of_node_put(np); + + /* Setup the legacy interrupts & controller */ + i8259_init(intack, 0); + + /* Hook cascade to mpic */ + mpic_setup_cascade(NUM_ISA_INTERRUPTS, i8259_irq_cascade, NULL); } -static void __init pseries_mpic_init_IRQ(void) +static void __init pSeries_setup_mpic(void) { - struct device_node *np, *old, *cascade = NULL; - unsigned int *addrp; - unsigned long intack = 0; unsigned int *opprop; unsigned long openpic_addr = 0; - unsigned int cascade_irq; - int naddr, n, i, opplen; - struct mpic *mpic; + unsigned char senses[NR_IRQS - NUM_ISA_INTERRUPTS]; + struct device_node *root; + int irq_count; - np = of_find_node_by_path("/"); - naddr = prom_n_addr_cells(np); - opprop = (unsigned int *) get_property(np, "platform-open-pic", &opplen); + /* Find the Open PIC if present */ + root = of_find_node_by_path("/"); + opprop = (unsigned int *) get_property(root, "platform-open-pic", NULL); if (opprop != 0) { - openpic_addr = of_read_number(opprop, naddr); + int n = prom_n_addr_cells(root); + + for (openpic_addr = 0; n > 0; --n) + openpic_addr = (openpic_addr << 32) + *opprop++; printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); } - of_node_put(np); + of_node_put(root); BUG_ON(openpic_addr == 0); + /* Get the sense values from OF */ + prom_get_irq_senses(senses, NUM_ISA_INTERRUPTS, NR_IRQS); + /* Setup the openpic driver */ - mpic = mpic_alloc(pSeries_mpic_node, openpic_addr, - MPIC_PRIMARY, - 16, 250, /* isu size, irq count */ - " MPIC "); - BUG_ON(mpic == NULL); - - /* Add ISUs */ - opplen /= sizeof(u32); - for (n = 0, i = naddr; i < opplen; i += naddr, n++) { - unsigned long isuaddr = of_read_number(opprop + i, naddr); - mpic_assign_isu(mpic, n, isuaddr); - } - - /* All ISUs are setup, complete initialization */ - mpic_init(mpic); - - /* Look for cascade */ - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "chrp,iic")) { - cascade = np; - break; - } - if (cascade == NULL) - return; - - cascade_irq = irq_of_parse_and_map(cascade, 0); - if (cascade == NO_IRQ) { - printk(KERN_ERR "xics: failed to map cascade interrupt"); - return; - } - - /* Check ACK type */ - for (old = of_node_get(cascade); old != NULL ; old = np) { - np = of_get_parent(old); - of_node_put(old); - if (np == NULL) - break; - if (strcmp(np->name, "pci") != 0) - continue; - addrp = (u32 *)get_property(np, "8259-interrupt-acknowledge", - NULL); - if (addrp == NULL) - continue; - naddr = prom_n_addr_cells(np); - intack = addrp[naddr-1]; - if (naddr > 1) - intack |= ((unsigned long)addrp[naddr-2]) << 32; - } - if (intack) - printk(KERN_DEBUG "mpic: PCI 8259 intack at 0x%016lx\n", - intack); - i8259_init(cascade, intack); - of_node_put(cascade); - set_irq_chained_handler(cascade_irq, pseries_8259_cascade); + irq_count = NR_IRQS - NUM_ISA_INTERRUPTS - 4; /* leave room for IPIs */ + pSeries_mpic = mpic_alloc(openpic_addr, MPIC_PRIMARY, + 16, 16, irq_count, /* isu size, irq offset, irq count */ + NR_IRQS - 4, /* ipi offset */ + senses, irq_count, /* sense & sense size */ + " MPIC "); } static void pseries_lpar_enable_pmcs(void) { unsigned long set, reset; + power4_enable_pmcs(); + set = 1UL << 63; reset = 0; plpar_hcall_norets(H_PERFMON, set, reset); @@ -222,67 +193,23 @@ static void pseries_lpar_enable_pmcs(void) get_lppaca()->pmcregs_in_use = 1; } -#ifdef CONFIG_KEXEC -static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary) -{ - mpic_teardown_this_cpu(secondary); -} - -static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary) +static void __init pSeries_setup_arch(void) { - /* Don't risk a hypervisor call if we're crashing */ - if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { - unsigned long vpa = __pa(get_lppaca()); - - if (unregister_vpa(hard_smp_processor_id(), vpa)) { - printk("VPA deregistration of cpu %u (hw_cpu_id %d) " - "failed\n", smp_processor_id(), - hard_smp_processor_id()); - } + /* Fixup ppc_md depending on the type of interrupt controller */ + if (ppc64_interrupt_controller == IC_OPEN_PIC) { + ppc_md.init_IRQ = pSeries_init_mpic; + ppc_md.get_irq = mpic_get_irq; + /* Allocate the mpic now, so that find_and_init_phbs() can + * fill the ISUs */ + pSeries_setup_mpic(); + } else { + ppc_md.init_IRQ = xics_init_IRQ; + ppc_md.get_irq = xics_get_irq; } - xics_teardown_cpu(secondary); -} -#endif /* CONFIG_KEXEC */ - -static void __init pseries_discover_pic(void) -{ - struct device_node *np; - char *typep; - for (np = NULL; (np = of_find_node_by_name(np, - "interrupt-controller"));) { - typep = (char *)get_property(np, "compatible", NULL); - if (strstr(typep, "open-pic")) { - pSeries_mpic_node = of_node_get(np); - ppc_md.init_IRQ = pseries_mpic_init_IRQ; - ppc_md.get_irq = mpic_get_irq; -#ifdef CONFIG_KEXEC - ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic; -#endif #ifdef CONFIG_SMP - smp_init_pseries_mpic(); + smp_init_pSeries(); #endif - return; - } else if (strstr(typep, "ppc-xicp")) { - ppc_md.init_IRQ = xics_init_IRQ; -#ifdef CONFIG_KEXEC - ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; -#endif -#ifdef CONFIG_SMP - smp_init_pseries_xics(); -#endif - return; - } - } - printk(KERN_ERR "pSeries_discover_pic: failed to recognize" - " interrupt-controller\n"); -} - -static void __init pSeries_setup_arch(void) -{ - /* Discover PIC type and setup ppc_md accordingly */ - pseries_discover_pic(); - /* openpic global configuration register (64-bit format). */ /* openpic Interrupt Source Unit pointer (64-bit format). */ /* python0 facility area (mmio) (64-bit format) REAL address. */ @@ -308,14 +235,14 @@ static void __init pSeries_setup_arch(void) if (firmware_has_feature(FW_FEATURE_SPLPAR)) { vpa_init(boot_cpuid); if (get_lppaca()->shared_proc) { - printk(KERN_DEBUG "Using shared processor idle loop\n"); + printk(KERN_INFO "Using shared processor idle loop\n"); ppc_md.power_save = pseries_shared_idle_sleep; } else { - printk(KERN_DEBUG "Using dedicated idle loop\n"); + printk(KERN_INFO "Using dedicated idle loop\n"); ppc_md.power_save = pseries_dedicated_idle_sleep; } } else { - printk(KERN_DEBUG "Using default idle loop\n"); + printk(KERN_INFO "Using default idle loop\n"); } if (firmware_has_feature(FW_FEATURE_LPAR)) @@ -334,11 +261,41 @@ static int __init pSeries_init_panel(void) } arch_initcall(pSeries_init_panel); +static void __init pSeries_discover_pic(void) +{ + struct device_node *np; + char *typep; + + /* + * Setup interrupt mapping options that are needed for finish_device_tree + * to properly parse the OF interrupt tree & do the virtual irq mapping + */ + __irq_offset_value = NUM_ISA_INTERRUPTS; + ppc64_interrupt_controller = IC_INVALID; + for (np = NULL; (np = of_find_node_by_name(np, "interrupt-controller"));) { + typep = (char *)get_property(np, "compatible", NULL); + if (strstr(typep, "open-pic")) { + ppc64_interrupt_controller = IC_OPEN_PIC; + break; + } else if (strstr(typep, "ppc-xicp")) { + ppc64_interrupt_controller = IC_PPC_XIC; + break; + } + } + if (ppc64_interrupt_controller == IC_INVALID) + printk("pSeries_discover_pic: failed to recognize" + " interrupt-controller\n"); + +} + static void pSeries_mach_cpu_die(void) { local_irq_disable(); idle_task_exit(); - xics_teardown_cpu(0); + /* Some hardware requires clearing the CPPR, while other hardware does not + * it is safe either way + */ + pSeriesLP_cppr_info(0, 0); rtas_stop_self(); /* Should never get here... */ BUG(); @@ -365,6 +322,11 @@ static void __init pSeries_init_early(void) DBG(" -> pSeries_init_early()\n"); fw_feature_init(); + + if (firmware_has_feature(FW_FEATURE_LPAR)) + hpte_init_lpar(); + else + hpte_init_native(); if (firmware_has_feature(FW_FEATURE_LPAR)) find_udbg_vterm(); @@ -376,6 +338,8 @@ static void __init pSeries_init_early(void) iommu_init_early_pSeries(); + pSeries_discover_pic(); + DBG(" <- pSeries_init_early()\n"); } @@ -420,11 +384,6 @@ static int __init pSeries_probe_hypertas(unsigned long node, if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL) powerpc_firmware_features |= FW_FEATURE_LPAR; - if (firmware_has_feature(FW_FEATURE_LPAR)) - hpte_init_lpar(); - else - hpte_init_native(); - return 1; } @@ -499,8 +458,7 @@ static void pseries_dedicated_idle_sleep(void) } /* - * If not SMT, cede processor. If CPU is running SMT - * cede if the other thread is not idle, so that it can + * Cede if the other thread is not idle, so that it can * go single-threaded. If the other thread is idle, * we ask the hypervisor if it has pending work it * wants to do and cede if it does. Otherwise we keep @@ -513,8 +471,7 @@ static void pseries_dedicated_idle_sleep(void) * very low priority. The cede enables interrupts, which * doesn't matter here. */ - if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle - || poll_pending() == H_PENDING) + if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING) cede_processor(); out: @@ -549,6 +506,27 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus) return PCI_PROBE_NORMAL; } +#ifdef CONFIG_KEXEC +static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) +{ + /* Don't risk a hypervisor call if we're crashing */ + if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { + unsigned long vpa = __pa(get_lppaca()); + + if (unregister_vpa(hard_smp_processor_id(), vpa)) { + printk("VPA deregistration of cpu %u (hw_cpu_id %d) " + "failed\n", smp_processor_id(), + hard_smp_processor_id()); + } + } + + if (ppc64_interrupt_controller == IC_OPEN_PIC) + mpic_teardown_this_cpu(secondary); + else + xics_teardown_cpu(secondary); +} +#endif + define_machine(pseries) { .name = "pSeries", .probe = pSeries_probe, @@ -573,6 +551,7 @@ define_machine(pseries) { .system_reset_exception = pSeries_system_reset_exception, .machine_check_exception = pSeries_machine_check_exception, #ifdef CONFIG_KEXEC + .kexec_cpu_down = pseries_kexec_cpu_down, .machine_kexec = default_machine_kexec, .machine_kexec_prepare = default_machine_kexec_prepare, .machine_crash_shutdown = default_machine_crash_shutdown, diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index ac61098ff..3cf78a6cd 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c @@ -14,6 +14,7 @@ #undef DEBUG +#include #include #include #include @@ -416,12 +417,27 @@ static struct smp_ops_t pSeries_xics_smp_ops = { #endif /* This is called very early */ -static void __init smp_init_pseries(void) +void __init smp_init_pSeries(void) { int i; DBG(" -> smp_init_pSeries()\n"); + switch (ppc64_interrupt_controller) { +#ifdef CONFIG_MPIC + case IC_OPEN_PIC: + smp_ops = &pSeries_mpic_smp_ops; + break; +#endif +#ifdef CONFIG_XICS + case IC_PPC_XIC: + smp_ops = &pSeries_xics_smp_ops; + break; +#endif + default: + panic("Invalid interrupt controller"); + } + #ifdef CONFIG_HOTPLUG_CPU smp_ops->cpu_disable = pSeries_cpu_disable; smp_ops->cpu_die = pSeries_cpu_die; @@ -456,18 +472,3 @@ static void __init smp_init_pseries(void) DBG(" <- smp_init_pSeries()\n"); } -#ifdef CONFIG_MPIC -void __init smp_init_pseries_mpic(void) -{ - smp_ops = &pSeries_mpic_smp_ops; - - smp_init_pseries(); -} -#endif - -void __init smp_init_pseries_xics(void) -{ - smp_ops = &pSeries_xics_smp_ops; - - smp_init_pseries(); -} diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c new file mode 100644 index 000000000..8e53e04ad --- /dev/null +++ b/arch/powerpc/platforms/pseries/vio.c @@ -0,0 +1,274 @@ +/* + * IBM PowerPC pSeries Virtual I/O Infrastructure Support. + * + * Copyright (c) 2003-2005 IBM Corp. + * Dave Engebretsen engebret@us.ibm.com + * Santiago Leon santil@us.ibm.com + * Hollis Blanchard + * Stephen Rothwell + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern struct subsystem devices_subsys; /* needed for vio_find_name() */ + +static void probe_bus_pseries(void) +{ + struct device_node *node_vroot, *of_node; + + node_vroot = find_devices("vdevice"); + if ((node_vroot == NULL) || (node_vroot->child == NULL)) + /* this machine doesn't do virtual IO, and that's ok */ + return; + + /* + * Create struct vio_devices for each virtual device in the device tree. + * Drivers will associate with them later. + */ + for (of_node = node_vroot->child; of_node != NULL; + of_node = of_node->sibling) { + printk(KERN_DEBUG "%s: processing %p\n", __FUNCTION__, of_node); + vio_register_device_node(of_node); + } +} + +/** + * vio_match_device_pseries: - Tell if a pSeries VIO device matches a + * vio_device_id + */ +static int vio_match_device_pseries(const struct vio_device_id *id, + const struct vio_dev *dev) +{ + return (strncmp(dev->type, id->type, strlen(id->type)) == 0) && + device_is_compatible(dev->dev.platform_data, id->compat); +} + +static void vio_release_device_pseries(struct device *dev) +{ + /* XXX free TCE table */ + of_node_put(dev->platform_data); +} + +static ssize_t viodev_show_devspec(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct device_node *of_node = dev->platform_data; + + return sprintf(buf, "%s\n", of_node->full_name); +} +DEVICE_ATTR(devspec, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_devspec, NULL); + +static void vio_unregister_device_pseries(struct vio_dev *viodev) +{ + device_remove_file(&viodev->dev, &dev_attr_devspec); +} + +static struct vio_bus_ops vio_bus_ops_pseries = { + .match = vio_match_device_pseries, + .unregister_device = vio_unregister_device_pseries, + .release_device = vio_release_device_pseries, +}; + +/** + * vio_bus_init_pseries: - Initialize the pSeries virtual IO bus + */ +static int __init vio_bus_init_pseries(void) +{ + int err; + + err = vio_bus_init(&vio_bus_ops_pseries); + if (err == 0) + probe_bus_pseries(); + return err; +} + +__initcall(vio_bus_init_pseries); + +/** + * vio_build_iommu_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. +*/ +static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev) +{ + unsigned int *dma_window; + struct iommu_table *newTceTable; + unsigned long offset; + int dma_window_property_size; + + dma_window = (unsigned int *) get_property(dev->dev.platform_data, "ibm,my-dma-window", &dma_window_property_size); + if(!dma_window) { + return NULL; + } + + newTceTable = (struct iommu_table *) kmalloc(sizeof(struct iommu_table), GFP_KERNEL); + + /* 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 tce entries */ + newTceTable->it_size = dma_window[4] >> PAGE_SHIFT; + /* offset for VIO should always be 0 */ + newTceTable->it_offset = offset; + newTceTable->it_busno = 0; + newTceTable->it_index = (unsigned long)dma_window[0]; + newTceTable->it_type = TCE_VB; + + return iommu_init_table(newTceTable); +} + +/** + * vio_register_device_node: - Register a new vio device. + * @of_node: The OF node for this device. + * + * Creates and initializes a vio_dev structure from the data in + * of_node (dev.platform_data) 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_node(struct device_node *of_node) +{ + struct vio_dev *viodev; + unsigned int *unit_address; + unsigned int *irq_p; + + /* we need the 'device_type' property, in order to match with drivers */ + if ((NULL == of_node->type)) { + printk(KERN_WARNING + "%s: node %s missing 'device_type'\n", __FUNCTION__, + of_node->name ? of_node->name : ""); + return NULL; + } + + unit_address = (unsigned int *)get_property(of_node, "reg", NULL); + if (!unit_address) { + printk(KERN_WARNING "%s: node %s missing 'reg'\n", __FUNCTION__, + of_node->name ? of_node->name : ""); + return NULL; + } + + /* allocate a vio_dev for this node */ + viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL); + if (!viodev) { + return NULL; + } + memset(viodev, 0, sizeof(struct vio_dev)); + + viodev->dev.platform_data = of_node_get(of_node); + + viodev->irq = NO_IRQ; + irq_p = (unsigned int *)get_property(of_node, "interrupts", NULL); + if (irq_p) { + int virq = virt_irq_create_mapping(*irq_p); + if (virq == NO_IRQ) { + printk(KERN_ERR "Unable to allocate interrupt " + "number for %s\n", of_node->full_name); + } else + viodev->irq = irq_offset_up(virq); + } + + snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", *unit_address); + viodev->name = of_node->name; + viodev->type = of_node->type; + viodev->unit_address = *unit_address; + viodev->iommu_table = vio_build_iommu_table(viodev); + + /* register with generic device framework */ + if (vio_register_device(viodev) == NULL) { + /* XXX free TCE table */ + kfree(viodev); + return NULL; + } + device_create_file(&viodev->dev, &dev_attr_devspec); + + return viodev; +} +EXPORT_SYMBOL(vio_register_device_node); + +/** + * 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(vdev->dev.platform_data, (char*)which, length); +} +EXPORT_SYMBOL(vio_get_attribute); + +/* vio_find_name() - internal because only vio.c knows how we formatted the + * kobject name + * XXX once vio_bus_type.devices is actually used as a kset in + * drivers/base/bus.c, this function should be removed in favor of + * "device_find(kobj_name, &vio_bus_type)" + */ +static struct vio_dev *vio_find_name(const char *kobj_name) +{ + struct kobject *found; + + found = kset_find_obj(&devices_subsys.kset, kobj_name); + if (!found) + return NULL; + + return to_vio_dev(container_of(found, struct device, kobj)); +} + +/** + * vio_find_node - find an already-registered vio_dev + * @vnode: device_node of the virtual device we're looking for + */ +struct vio_dev *vio_find_node(struct device_node *vnode) +{ + uint32_t *unit_address; + char kobj_name[BUS_ID_SIZE]; + + /* construct the kobject name from the device node */ + unit_address = (uint32_t *)get_property(vnode, "reg", NULL); + if (!unit_address) + return NULL; + snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); + + return vio_find_name(kobj_name); +} +EXPORT_SYMBOL(vio_find_node); + +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); diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index e98863025..9ff7105bc 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c @@ -8,9 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - -#undef DEBUG - +#include #include #include #include @@ -22,7 +20,6 @@ #include #include #include - #include #include #include @@ -35,6 +32,26 @@ #include "xics.h" +static unsigned int xics_startup(unsigned int irq); +static void xics_enable_irq(unsigned int irq); +static void xics_disable_irq(unsigned int irq); +static void xics_mask_and_ack_irq(unsigned int irq); +static void xics_end_irq(unsigned int irq); +static void xics_set_affinity(unsigned int irq_nr, cpumask_t cpumask); + +static struct hw_interrupt_type xics_pic = { + .typename = " XICS ", + .startup = xics_startup, + .enable = xics_enable_irq, + .disable = xics_disable_irq, + .ack = xics_mask_and_ack_irq, + .end = xics_end_irq, + .set_affinity = xics_set_affinity +}; + +/* This is used to map real irq numbers to virtual */ +static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); + #define XICS_IPI 2 #define XICS_IRQ_SPURIOUS 0 @@ -43,7 +60,7 @@ /* * Mark IPIs as higher priority so we can take them inside interrupts that - * arent marked IRQF_DISABLED + * arent marked SA_INTERRUPT */ #define IPI_PRIORITY 4 @@ -65,12 +82,12 @@ struct xics_ipl { static struct xics_ipl __iomem *xics_per_cpu[NR_CPUS]; +static int xics_irq_8259_cascade = 0; +static int xics_irq_8259_cascade_real = 0; static unsigned int default_server = 0xFF; static unsigned int default_distrib_server = 0; static unsigned int interrupt_server_size = 8; -static struct irq_host *xics_host; - /* * XICS only has a single IPI, so encode the messages per CPU */ @@ -82,34 +99,48 @@ static int ibm_set_xive; static int ibm_int_on; static int ibm_int_off; +typedef struct { + int (*xirr_info_get)(int cpu); + void (*xirr_info_set)(int cpu, int val); + void (*cppr_info)(int cpu, u8 val); + void (*qirr_info)(int cpu, u8 val); +} xics_ops; -/* Direct HW low level accessors */ +/* SMP */ -static inline unsigned int direct_xirr_info_get(int n_cpu) +static int pSeries_xirr_info_get(int n_cpu) { return in_be32(&xics_per_cpu[n_cpu]->xirr.word); } -static inline void direct_xirr_info_set(int n_cpu, int value) +static void pSeries_xirr_info_set(int n_cpu, int value) { out_be32(&xics_per_cpu[n_cpu]->xirr.word, value); } -static inline void direct_cppr_info(int n_cpu, u8 value) +static void pSeries_cppr_info(int n_cpu, u8 value) { out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value); } -static inline void direct_qirr_info(int n_cpu, u8 value) +static void pSeries_qirr_info(int n_cpu, u8 value) { out_8(&xics_per_cpu[n_cpu]->qirr.bytes[0], value); } +static xics_ops pSeries_ops = { + pSeries_xirr_info_get, + pSeries_xirr_info_set, + pSeries_cppr_info, + pSeries_qirr_info +}; -/* LPAR low level accessors */ +static xics_ops *ops = &pSeries_ops; +/* LPAR */ + static inline long plpar_eoi(unsigned long xirr) { return plpar_hcall_norets(H_EOI, xirr); @@ -131,7 +162,7 @@ static inline long plpar_xirr(unsigned long *xirr_ret) return plpar_hcall(H_XIRR, 0, 0, 0, 0, xirr_ret, &dummy, &dummy); } -static inline unsigned int lpar_xirr_info_get(int n_cpu) +static int pSeriesLP_xirr_info_get(int n_cpu) { unsigned long lpar_rc; unsigned long return_value; @@ -139,10 +170,10 @@ static inline unsigned int lpar_xirr_info_get(int n_cpu) lpar_rc = plpar_xirr(&return_value); if (lpar_rc != H_SUCCESS) panic(" bad return code xirr - rc = %lx \n", lpar_rc); - return (unsigned int)return_value; + return (int)return_value; } -static inline void lpar_xirr_info_set(int n_cpu, int value) +static void pSeriesLP_xirr_info_set(int n_cpu, int value) { unsigned long lpar_rc; unsigned long val64 = value & 0xffffffff; @@ -153,7 +184,7 @@ static inline void lpar_xirr_info_set(int n_cpu, int value) val64); } -static inline void lpar_cppr_info(int n_cpu, u8 value) +void pSeriesLP_cppr_info(int n_cpu, u8 value) { unsigned long lpar_rc; @@ -162,7 +193,7 @@ static inline void lpar_cppr_info(int n_cpu, u8 value) panic("bad return code cppr - rc = %lx\n", lpar_rc); } -static inline void lpar_qirr_info(int n_cpu , u8 value) +static void pSeriesLP_qirr_info(int n_cpu , u8 value) { unsigned long lpar_rc; @@ -171,16 +202,43 @@ static inline void lpar_qirr_info(int n_cpu , u8 value) panic("bad return code qirr - rc = %lx\n", lpar_rc); } +xics_ops pSeriesLP_ops = { + pSeriesLP_xirr_info_get, + pSeriesLP_xirr_info_set, + pSeriesLP_cppr_info, + pSeriesLP_qirr_info +}; + +static unsigned int xics_startup(unsigned int virq) +{ + unsigned int irq; + + irq = irq_offset_down(virq); + if (radix_tree_insert(&irq_map, virt_irq_to_real(irq), + &virt_irq_to_real_map[irq]) == -ENOMEM) + printk(KERN_CRIT "Out of memory creating real -> virtual" + " IRQ mapping for irq %u (real 0x%x)\n", + virq, virt_irq_to_real(irq)); + xics_enable_irq(virq); + return 0; /* return value is ignored */ +} -/* High level handlers and init code */ +static unsigned int real_irq_to_virt(unsigned int real_irq) +{ + unsigned int *ptr; + ptr = radix_tree_lookup(&irq_map, real_irq); + if (ptr == NULL) + return NO_IRQ; + return ptr - virt_irq_to_real_map; +} #ifdef CONFIG_SMP -static int get_irq_server(unsigned int virq) +static int get_irq_server(unsigned int irq) { unsigned int server; /* For the moment only implement delivery to all cpus or one cpu */ - cpumask_t cpumask = irq_desc[virq].affinity; + cpumask_t cpumask = irq_affinity[irq]; cpumask_t tmp = CPU_MASK_NONE; if (!distribute_irqs) @@ -201,28 +259,23 @@ static int get_irq_server(unsigned int virq) } #else -static int get_irq_server(unsigned int virq) +static int get_irq_server(unsigned int irq) { return default_server; } #endif - -static void xics_unmask_irq(unsigned int virq) +static void xics_enable_irq(unsigned int virq) { unsigned int irq; int call_status; unsigned int server; - pr_debug("xics: unmask virq %d\n", virq); - - irq = (unsigned int)irq_map[virq].hwirq; - pr_debug(" -> map to hwirq 0x%x\n", irq); - if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) + irq = virt_irq_to_real(irq_offset_down(virq)); + if (irq == XICS_IPI) return; server = get_irq_server(virq); - call_status = rtas_call(ibm_set_xive, 3, 1, NULL, irq, server, DEFAULT_PRIORITY); if (call_status != 0) { @@ -241,7 +294,7 @@ static void xics_unmask_irq(unsigned int virq) } } -static void xics_mask_real_irq(unsigned int irq) +static void xics_disable_real_irq(unsigned int irq) { int call_status; unsigned int server; @@ -266,86 +319,75 @@ static void xics_mask_real_irq(unsigned int irq) } } -static void xics_mask_irq(unsigned int virq) +static void xics_disable_irq(unsigned int virq) { unsigned int irq; - pr_debug("xics: mask virq %d\n", virq); - - irq = (unsigned int)irq_map[virq].hwirq; - if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) - return; - xics_mask_real_irq(irq); + irq = virt_irq_to_real(irq_offset_down(virq)); + xics_disable_real_irq(irq); } -static unsigned int xics_startup(unsigned int virq) -{ - unsigned int irq; - - /* force a reverse mapping of the interrupt so it gets in the cache */ - irq = (unsigned int)irq_map[virq].hwirq; - irq_radix_revmap(xics_host, irq); - - /* unmask it */ - xics_unmask_irq(virq); - return 0; -} - -static void xics_eoi_direct(unsigned int virq) +static void xics_end_irq(unsigned int irq) { int cpu = smp_processor_id(); - unsigned int irq = (unsigned int)irq_map[virq].hwirq; iosync(); - direct_xirr_info_set(cpu, (0xff << 24) | irq); -} + ops->xirr_info_set(cpu, ((0xff << 24) | + (virt_irq_to_real(irq_offset_down(irq))))); +} -static void xics_eoi_lpar(unsigned int virq) +static void xics_mask_and_ack_irq(unsigned int irq) { int cpu = smp_processor_id(); - unsigned int irq = (unsigned int)irq_map[virq].hwirq; - iosync(); - lpar_xirr_info_set(cpu, (0xff << 24) | irq); + if (irq < irq_offset_value()) { + i8259_pic.ack(irq); + iosync(); + ops->xirr_info_set(cpu, ((0xff<<24) | + xics_irq_8259_cascade_real)); + iosync(); + } } -static inline unsigned int xics_remap_irq(unsigned int vec) +int xics_get_irq(struct pt_regs *regs) { - unsigned int irq; + unsigned int cpu = smp_processor_id(); + unsigned int vec; + int irq; + vec = ops->xirr_info_get(cpu); + /* (vec >> 24) == old priority */ vec &= 0x00ffffff; - if (vec == XICS_IRQ_SPURIOUS) - return NO_IRQ; - irq = irq_radix_revmap(xics_host, vec); - if (likely(irq != NO_IRQ)) - return irq; - - printk(KERN_ERR "Interrupt %u (real) is invalid," - " disabling it.\n", vec); - xics_mask_real_irq(vec); - return NO_IRQ; + /* for sanity, this had better be < NR_IRQS - 16 */ + if (vec == xics_irq_8259_cascade_real) { + irq = i8259_irq(regs); + xics_end_irq(irq_offset_up(xics_irq_8259_cascade)); + } else if (vec == XICS_IRQ_SPURIOUS) { + irq = -1; + } else { + irq = real_irq_to_virt(vec); + if (irq == NO_IRQ) + irq = real_irq_to_virt_slowpath(vec); + if (irq == NO_IRQ) { + printk(KERN_ERR "Interrupt %u (real) is invalid," + " disabling it.\n", vec); + xics_disable_real_irq(vec); + } else + irq = irq_offset_up(irq); + } + return irq; } -static unsigned int xics_get_irq_direct(struct pt_regs *regs) -{ - unsigned int cpu = smp_processor_id(); - - return xics_remap_irq(direct_xirr_info_get(cpu)); -} +#ifdef CONFIG_SMP -static unsigned int xics_get_irq_lpar(struct pt_regs *regs) +static irqreturn_t xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs) { - unsigned int cpu = smp_processor_id(); - - return xics_remap_irq(lpar_xirr_info_get(cpu)); -} + int cpu = smp_processor_id(); -#ifdef CONFIG_SMP + ops->qirr_info(cpu, 0xff); -static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs) -{ WARN_ON(cpu_is_offline(cpu)); while (xics_ipi_message[cpu].value) { @@ -377,88 +419,18 @@ static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs) return IRQ_HANDLED; } -static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id, struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - direct_qirr_info(cpu, 0xff); - - return xics_ipi_dispatch(cpu, regs); -} - -static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id, struct pt_regs *regs) -{ - int cpu = smp_processor_id(); - - lpar_qirr_info(cpu, 0xff); - - return xics_ipi_dispatch(cpu, regs); -} - void xics_cause_IPI(int cpu) { - if (firmware_has_feature(FW_FEATURE_LPAR)) - lpar_qirr_info(cpu, IPI_PRIORITY); - else - direct_qirr_info(cpu, IPI_PRIORITY); + ops->qirr_info(cpu, IPI_PRIORITY); } - #endif /* CONFIG_SMP */ -static void xics_set_cpu_priority(int cpu, unsigned char cppr) -{ - if (firmware_has_feature(FW_FEATURE_LPAR)) - lpar_cppr_info(cpu, cppr); - else - direct_cppr_info(cpu, cppr); - iosync(); -} - -static void xics_set_affinity(unsigned int virq, cpumask_t cpumask) -{ - unsigned int irq; - int status; - int xics_status[2]; - unsigned long newmask; - cpumask_t tmp = CPU_MASK_NONE; - - irq = (unsigned int)irq_map[virq].hwirq; - if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) - return; - - status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); - - if (status) { - printk(KERN_ERR "xics_set_affinity: irq=%u ibm,get-xive " - "returns %d\n", irq, status); - return; - } - - /* For the moment only implement delivery to all cpus or one cpu */ - if (cpus_equal(cpumask, CPU_MASK_ALL)) { - newmask = default_distrib_server; - } else { - cpus_and(tmp, cpu_online_map, cpumask); - if (cpus_empty(tmp)) - return; - newmask = get_hard_smp_processor_id(first_cpu(tmp)); - } - - status = rtas_call(ibm_set_xive, 3, 1, NULL, - irq, newmask, xics_status[1]); - - if (status) { - printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive " - "returns %d\n", irq, status); - return; - } -} - void xics_setup_cpu(void) { int cpu = smp_processor_id(); - xics_set_cpu_priority(cpu, 0xff); + ops->cppr_info(cpu, 0xff); + iosync(); /* * Put the calling processor into the GIQ. This is really only @@ -467,256 +439,76 @@ void xics_setup_cpu(void) * * XXX: undo of teardown on kexec needs this too, as may hotplug */ - rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, + rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE, (1UL << interrupt_server_size) - 1 - default_distrib_server, 1); } - -static struct irq_chip xics_pic_direct = { - .typename = " XICS ", - .startup = xics_startup, - .mask = xics_mask_irq, - .unmask = xics_unmask_irq, - .eoi = xics_eoi_direct, - .set_affinity = xics_set_affinity -}; - - -static struct irq_chip xics_pic_lpar = { - .typename = " XICS ", - .startup = xics_startup, - .mask = xics_mask_irq, - .unmask = xics_unmask_irq, - .eoi = xics_eoi_lpar, - .set_affinity = xics_set_affinity -}; - - -static int xics_host_match(struct irq_host *h, struct device_node *node) +void xics_init_IRQ(void) { - /* IBM machines have interrupt parents of various funky types for things - * like vdevices, events, etc... The trick we use here is to match - * everything here except the legacy 8259 which is compatible "chrp,iic" - */ - return !device_is_compatible(node, "chrp,iic"); -} - -static int xics_host_map_direct(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw); - - get_irq_desc(virq)->status |= IRQ_LEVEL; - set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq); - return 0; -} - -static int xics_host_map_lpar(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw); - - get_irq_desc(virq)->status |= IRQ_LEVEL; - set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq); - return 0; -} - -static int xics_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) - -{ - /* Current xics implementation translates everything - * to level. It is not technically right for MSIs but this - * is irrelevant at this point. We might get smarter in the future - */ - *out_hwirq = intspec[0]; - *out_flags = IRQ_TYPE_LEVEL_LOW; - - return 0; -} - -static struct irq_host_ops xics_host_direct_ops = { - .match = xics_host_match, - .map = xics_host_map_direct, - .xlate = xics_host_xlate, -}; - -static struct irq_host_ops xics_host_lpar_ops = { - .match = xics_host_match, - .map = xics_host_map_lpar, - .xlate = xics_host_xlate, -}; - -static void __init xics_init_host(void) -{ - struct irq_host_ops *ops; - - if (firmware_has_feature(FW_FEATURE_LPAR)) - ops = &xics_host_lpar_ops; - else - ops = &xics_host_direct_ops; - xics_host = irq_alloc_host(IRQ_HOST_MAP_TREE, 0, ops, - XICS_IRQ_SPURIOUS); - BUG_ON(xics_host == NULL); - irq_set_default_host(xics_host); -} - -static void __init xics_map_one_cpu(int hw_id, unsigned long addr, - unsigned long size) -{ -#ifdef CONFIG_SMP int i; + unsigned long intr_size = 0; + struct device_node *np; + uint *ireg, ilen, indx = 0; + unsigned long intr_base = 0; + struct xics_interrupt_node { + unsigned long addr; + unsigned long size; + } intnodes[NR_CPUS]; - /* This may look gross but it's good enough for now, we don't quite - * have a hard -> linux processor id matching. - */ - for_each_possible_cpu(i) { - if (!cpu_present(i)) - continue; - if (hw_id == get_hard_smp_processor_id(i)) { - xics_per_cpu[i] = ioremap(addr, size); - return; - } - } -#else - if (hw_id != 0) - return; - xics_per_cpu[0] = ioremap(addr, size); -#endif /* CONFIG_SMP */ -} + ppc64_boot_msg(0x20, "XICS Init"); -static void __init xics_init_one_node(struct device_node *np, - unsigned int *indx) -{ - unsigned int ilen; - u32 *ireg; + ibm_get_xive = rtas_token("ibm,get-xive"); + ibm_set_xive = rtas_token("ibm,set-xive"); + ibm_int_on = rtas_token("ibm,int-on"); + ibm_int_off = rtas_token("ibm,int-off"); - /* This code does the theorically broken assumption that the interrupt - * server numbers are the same as the hard CPU numbers. - * This happens to be the case so far but we are playing with fire... - * should be fixed one of these days. -BenH. - */ - ireg = (u32 *)get_property(np, "ibm,interrupt-server-ranges", NULL); + np = of_find_node_by_type(NULL, "PowerPC-External-Interrupt-Presentation"); + if (!np) + panic("xics_init_IRQ: can't find interrupt presentation"); - /* Do that ever happen ? we'll know soon enough... but even good'old - * f80 does have that property .. - */ - WARN_ON(ireg == NULL); +nextnode: + ireg = (uint *)get_property(np, "ibm,interrupt-server-ranges", NULL); if (ireg) { /* * set node starting index for this node */ - *indx = *ireg; + indx = *ireg; } - ireg = (u32 *)get_property(np, "reg", &ilen); + + ireg = (uint *)get_property(np, "reg", &ilen); if (!ireg) panic("xics_init_IRQ: can't find interrupt reg property"); - while (ilen >= (4 * sizeof(u32))) { - unsigned long addr, size; - - /* XXX Use proper OF parsing code here !!! */ - addr = (unsigned long)*ireg++ << 32; - ilen -= sizeof(u32); - addr |= *ireg++; - ilen -= sizeof(u32); - size = (unsigned long)*ireg++ << 32; - ilen -= sizeof(u32); - size |= *ireg++; - ilen -= sizeof(u32); - xics_map_one_cpu(*indx, addr, size); - (*indx)++; - } -} - - -static void __init xics_setup_8259_cascade(void) -{ - struct device_node *np, *old, *found = NULL; - int cascade, naddr; - u32 *addrp; - unsigned long intack = 0; - - for_each_node_by_type(np, "interrupt-controller") - if (device_is_compatible(np, "chrp,iic")) { - found = np; - break; - } - if (found == NULL) { - printk(KERN_DEBUG "xics: no ISA interrupt controller\n"); - return; - } - cascade = irq_of_parse_and_map(found, 0); - if (cascade == NO_IRQ) { - printk(KERN_ERR "xics: failed to map cascade interrupt"); - return; + while (ilen) { + intnodes[indx].addr = (unsigned long)*ireg++ << 32; + ilen -= sizeof(uint); + intnodes[indx].addr |= *ireg++; + ilen -= sizeof(uint); + intnodes[indx].size = (unsigned long)*ireg++ << 32; + ilen -= sizeof(uint); + intnodes[indx].size |= *ireg++; + ilen -= sizeof(uint); + indx++; + if (indx >= NR_CPUS) break; } - pr_debug("xics: cascade mapped to irq %d\n", cascade); - for (old = of_node_get(found); old != NULL ; old = np) { - np = of_get_parent(old); - of_node_put(old); - if (np == NULL) - break; - if (strcmp(np->name, "pci") != 0) - continue; - addrp = (u32 *)get_property(np, "8259-interrupt-acknowledge", NULL); - if (addrp == NULL) - continue; - naddr = prom_n_addr_cells(np); - intack = addrp[naddr-1]; - if (naddr > 1) - intack |= ((unsigned long)addrp[naddr-2]) << 32; - } - if (intack) - printk(KERN_DEBUG "xics: PCI 8259 intack at 0x%016lx\n", intack); - i8259_init(found, intack); - of_node_put(found); - set_irq_chained_handler(cascade, pseries_8259_cascade); -} - -void __init xics_init_IRQ(void) -{ - int i; - struct device_node *np; - u32 *ireg, ilen, indx = 0; - int found = 0; - - ppc64_boot_msg(0x20, "XICS Init"); - - ibm_get_xive = rtas_token("ibm,get-xive"); - ibm_set_xive = rtas_token("ibm,set-xive"); - ibm_int_on = rtas_token("ibm,int-on"); - ibm_int_off = rtas_token("ibm,int-off"); - - for_each_node_by_type(np, "PowerPC-External-Interrupt-Presentation") { - found = 1; - if (firmware_has_feature(FW_FEATURE_LPAR)) - break; - xics_init_one_node(np, &indx); - } - if (found == 0) - return; - - xics_init_host(); + np = of_find_node_by_type(np, "PowerPC-External-Interrupt-Presentation"); + 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")) { - ireg = (u32 *)get_property(np, "reg", &ilen); + ireg = (uint *)get_property(np, "reg", &ilen); if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) { - ireg = (u32 *)get_property(np, - "ibm,ppc-interrupt-gserver#s", - &ilen); + ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", + &ilen); i = ilen / sizeof(int); if (ireg && i > 0) { default_server = ireg[0]; - /* take last element */ - default_distrib_server = ireg[i-1]; + default_distrib_server = ireg[i-1]; /* take last element */ } - ireg = (u32 *)get_property(np, + ireg = (uint *)get_property(np, "ibm,interrupt-server#-size", NULL); if (ireg) interrupt_server_size = *ireg; @@ -725,57 +517,134 @@ void __init xics_init_IRQ(void) } of_node_put(np); + intr_base = intnodes[0].addr; + intr_size = intnodes[0].size; + + np = of_find_node_by_type(NULL, "interrupt-controller"); + if (!np) { + printk(KERN_WARNING "xics: no ISA interrupt controller\n"); + xics_irq_8259_cascade_real = -1; + xics_irq_8259_cascade = -1; + } else { + ireg = (uint *) get_property(np, "interrupts", NULL); + if (!ireg) + panic("xics_init_IRQ: can't find ISA interrupts property"); + + xics_irq_8259_cascade_real = *ireg; + xics_irq_8259_cascade + = virt_irq_create_mapping(xics_irq_8259_cascade_real); + i8259_init(0, 0); + of_node_put(np); + } + if (firmware_has_feature(FW_FEATURE_LPAR)) - ppc_md.get_irq = xics_get_irq_lpar; - else - ppc_md.get_irq = xics_get_irq_direct; + ops = &pSeriesLP_ops; + else { +#ifdef CONFIG_SMP + for_each_possible_cpu(i) { + int hard_id; - xics_setup_cpu(); + /* FIXME: Do this dynamically! --RR */ + if (!cpu_present(i)) + continue; + + hard_id = get_hard_smp_processor_id(i); + xics_per_cpu[i] = ioremap(intnodes[hard_id].addr, + intnodes[hard_id].size); + } +#else + xics_per_cpu[0] = ioremap(intr_base, intr_size); +#endif /* CONFIG_SMP */ + } - xics_setup_8259_cascade(); + for (i = irq_offset_value(); i < NR_IRQS; ++i) + get_irq_desc(i)->handler = &xics_pic; + + xics_setup_cpu(); ppc64_boot_msg(0x21, "XICS Done"); } +/* + * We cant do this in init_IRQ because we need the memory subsystem up for + * request_irq() + */ +static int __init xics_setup_i8259(void) +{ + if (ppc64_interrupt_controller == IC_PPC_XIC && + xics_irq_8259_cascade != -1) { + if (request_irq(irq_offset_up(xics_irq_8259_cascade), + no_action, 0, "8259 cascade", NULL)) + printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " + "cascade\n"); + } + return 0; +} +arch_initcall(xics_setup_i8259); #ifdef CONFIG_SMP void xics_request_IPIs(void) { - unsigned int ipi; + virt_irq_to_real_map[XICS_IPI] = XICS_IPI; - ipi = irq_create_mapping(xics_host, XICS_IPI); - BUG_ON(ipi == NO_IRQ); + /* 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", NULL); + get_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU; +} +#endif - /* - * IPIs are marked IRQF_DISABLED as they must run with irqs - * disabled - */ - set_irq_handler(ipi, handle_percpu_irq); - if (firmware_has_feature(FW_FEATURE_LPAR)) - request_irq(ipi, xics_ipi_action_lpar, IRQF_DISABLED, - "IPI", NULL); - else - request_irq(ipi, xics_ipi_action_direct, IRQF_DISABLED, - "IPI", NULL); +static void xics_set_affinity(unsigned int virq, cpumask_t cpumask) +{ + unsigned int irq; + int status; + int xics_status[2]; + unsigned long newmask; + cpumask_t tmp = CPU_MASK_NONE; + + irq = virt_irq_to_real(irq_offset_down(virq)); + if (irq == XICS_IPI || irq == NO_IRQ) + return; + + status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); + + if (status) { + printk(KERN_ERR "xics_set_affinity: irq=%u ibm,get-xive " + "returns %d\n", irq, status); + return; + } + + /* For the moment only implement delivery to all cpus or one cpu */ + if (cpus_equal(cpumask, CPU_MASK_ALL)) { + newmask = default_distrib_server; + } else { + cpus_and(tmp, cpu_online_map, cpumask); + if (cpus_empty(tmp)) + return; + newmask = get_hard_smp_processor_id(first_cpu(tmp)); + } + + status = rtas_call(ibm_set_xive, 3, 1, NULL, + irq, newmask, xics_status[1]); + + if (status) { + printk(KERN_ERR "xics_set_affinity: irq=%u ibm,set-xive " + "returns %d\n", irq, status); + return; + } } -#endif /* CONFIG_SMP */ void xics_teardown_cpu(int secondary) { int cpu = smp_processor_id(); - unsigned int ipi; - struct irq_desc *desc; - xics_set_cpu_priority(cpu, 0); + ops->cppr_info(cpu, 0x00); + iosync(); /* * Clear IPI */ - if (firmware_has_feature(FW_FEATURE_LPAR)) - lpar_qirr_info(cpu, 0xff); - else - direct_qirr_info(cpu, 0xff); - + ops->qirr_info(cpu, 0xff); /* * we need to EOI the IPI if we got here from kexec down IPI * @@ -783,22 +652,17 @@ void xics_teardown_cpu(int secondary) * should we be flagging idle loop instead? * or creating some task to be scheduled? */ - - ipi = irq_find_mapping(xics_host, XICS_IPI); - if (ipi == XICS_IRQ_SPURIOUS) - return; - desc = get_irq_desc(ipi); - if (desc->chip && desc->chip->eoi) - desc->chip->eoi(ipi); + ops->xirr_info_set(cpu, XICS_IPI); /* * Some machines need to have at least one cpu in the GIQ, * so leave the master cpu in the group. */ - if (secondary) - rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, - (1UL << interrupt_server_size) - 1 - - default_distrib_server, 0); + if (secondary) + rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE, + (1UL << interrupt_server_size) - 1 - + default_distrib_server, 0); + } #ifdef CONFIG_HOTPLUG_CPU @@ -810,36 +674,38 @@ void xics_migrate_irqs_away(void) unsigned int irq, virq, cpu = smp_processor_id(); /* Reject any interrupt that was queued to us... */ - xics_set_cpu_priority(cpu, 0); + ops->cppr_info(cpu, 0); + iosync(); /* remove ourselves from the global interrupt queue */ - status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, + status = rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE, (1UL << interrupt_server_size) - 1 - default_distrib_server, 0); WARN_ON(status < 0); /* Allow IPIs again... */ - xics_set_cpu_priority(cpu, DEFAULT_PRIORITY); + ops->cppr_info(cpu, DEFAULT_PRIORITY); + iosync(); for_each_irq(virq) { - struct irq_desc *desc; + irq_desc_t *desc; int xics_status[2]; unsigned long flags; /* We cant set affinity on ISA interrupts */ - if (virq < NUM_ISA_INTERRUPTS) - continue; - if (irq_map[virq].host != xics_host) + if (virq < irq_offset_value()) continue; - irq = (unsigned int)irq_map[virq].hwirq; + + desc = get_irq_desc(virq); + irq = virt_irq_to_real(irq_offset_down(virq)); + /* We need to get IPIs still. */ - if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS) + if (irq == XICS_IPI || irq == NO_IRQ) continue; - desc = get_irq_desc(virq); /* We only need to migrate enabled IRQS */ - if (desc == NULL || desc->chip == NULL + if (desc == NULL || desc->handler == NULL || desc->action == NULL - || desc->chip->set_affinity == NULL) + || desc->handler->set_affinity == NULL) continue; spin_lock_irqsave(&desc->lock, flags); @@ -864,8 +730,8 @@ void xics_migrate_irqs_away(void) virq, cpu); /* Reset affinity to all cpus */ - desc->chip->set_affinity(virq, CPU_MASK_ALL); - irq_desc[irq].affinity = CPU_MASK_ALL; + desc->handler->set_affinity(virq, CPU_MASK_ALL); + irq_affinity[virq] = CPU_MASK_ALL; unlock: spin_unlock_irqrestore(&desc->lock, flags); } diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h index 6ee1055b0..e14c70868 100644 --- a/arch/powerpc/platforms/pseries/xics.h +++ b/arch/powerpc/platforms/pseries/xics.h @@ -14,12 +14,13 @@ #include -extern void xics_init_IRQ(void); -extern void xics_setup_cpu(void); -extern void xics_teardown_cpu(int secondary); -extern void xics_cause_IPI(int cpu); -extern void xics_request_IPIs(void); -extern void xics_migrate_irqs_away(void); +void xics_init_IRQ(void); +int xics_get_irq(struct pt_regs *); +void xics_setup_cpu(void); +void xics_teardown_cpu(int secondary); +void xics_cause_IPI(int cpu); +void xics_request_IPIs(void); +void xics_migrate_irqs_away(void); /* first argument is ignored for now*/ void pSeriesLP_cppr_info(int n_cpu, u8 value); @@ -30,8 +31,4 @@ struct xics_ipi_struct { extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; -struct irq_desc; -extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs); - #endif /* _POWERPC_KERNEL_XICS_H */ diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index e5e999ea8..4c2b35677 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -1,19 +1,10 @@ -ifeq ($(CONFIG_PPC64),y) -EXTRA_CFLAGS += -mno-minimal-toc -endif - obj-$(CONFIG_MPIC) += mpic.o obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o +obj-$(CONFIG_PPC_I8259) += i8259.o obj-$(CONFIG_PPC_MPC106) += grackle.o obj-$(CONFIG_BOOKE) += dcr.o obj-$(CONFIG_40x) += dcr.o obj-$(CONFIG_U3_DART) += dart_iommu.o obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o -obj-$(CONFIG_FSL_SOC) += fsl_soc.o -obj-$(CONFIG_PPC_TODC) += todc.o -obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o - -ifeq ($(CONFIG_PPC_MERGE),y) -obj-$(CONFIG_PPC_I8259) += i8259.o obj-$(CONFIG_PPC_83xx) += ipic.o -endif +obj-$(CONFIG_FSL_SOC) += fsl_soc.o diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h index 1c8817c48..c2d05763c 100644 --- a/arch/powerpc/sysdev/dart.h +++ b/arch/powerpc/sysdev/dart.h @@ -47,12 +47,8 @@ /* U4 registers */ #define DART_BASE_U4_BASE_MASK 0xffffff #define DART_BASE_U4_BASE_SHIFT 0 -#define DART_CNTL_U4_ENABLE 0x80000000 -#define DART_CNTL_U4_IONE 0x40000000 #define DART_CNTL_U4_FLUSHTLB 0x20000000 -#define DART_CNTL_U4_IDLE 0x10000000 -#define DART_CNTL_U4_PAR_EN 0x08000000 -#define DART_CNTL_U4_IONE_MASK 0x07ffffff +#define DART_CNTL_U4_ENABLE 0x80000000 #define DART_SIZE_U4_SIZE_MASK 0x1fff #define DART_SIZE_U4_SIZE_SHIFT 0 diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 03b4477dd..38087bd6e 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c @@ -27,6 +27,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -100,8 +101,8 @@ retry: if (l == (1L << limit)) { if (limit < 4) { limit++; - reg = DART_IN(DART_CNTL); - reg &= ~inv_bit; + reg = DART_IN(DART_CNTL); + reg &= ~inv_bit; DART_OUT(DART_CNTL, reg); goto retry; } else @@ -110,40 +111,11 @@ retry: } } -static inline void dart_tlb_invalidate_one(unsigned long bus_rpn) -{ - unsigned int reg; - unsigned int l, limit; - - reg = DART_CNTL_U4_ENABLE | DART_CNTL_U4_IONE | - (bus_rpn & DART_CNTL_U4_IONE_MASK); - DART_OUT(DART_CNTL, reg); - - limit = 0; -wait_more: - l = 0; - while ((DART_IN(DART_CNTL) & DART_CNTL_U4_IONE) && l < (1L << limit)) { - rmb(); - l++; - } - - if (l == (1L << limit)) { - if (limit < 4) { - limit++; - goto wait_more; - } else - panic("DART: TLB did not flush after waiting a long " - "time. Buggy U4 ?"); - } -} - static void dart_flush(struct iommu_table *tbl) { - mb(); - if (dart_dirty) { + if (dart_dirty) dart_tlb_invalidate_all(); - dart_dirty = 0; - } + dart_dirty = 0; } static void dart_build(struct iommu_table *tbl, long index, @@ -152,7 +124,6 @@ static void dart_build(struct iommu_table *tbl, long index, { unsigned int *dp; unsigned int rpn; - long l; DBG("dart: build at: %lx, %lx, addr: %x\n", index, npages, uaddr); @@ -164,8 +135,7 @@ static void dart_build(struct iommu_table *tbl, long index, /* On U3, all memory is contigous, so we can move this * out of the loop. */ - l = npages; - while (l--) { + while (npages--) { rpn = virt_to_abs(uaddr) >> DART_PAGE_SHIFT; *(dp++) = DARTMAP_VALID | (rpn & DARTMAP_RPNMASK); @@ -173,18 +143,7 @@ static void dart_build(struct iommu_table *tbl, long index, uaddr += DART_PAGE_SIZE; } - /* make sure all updates have reached memory */ - mb(); - in_be32((unsigned __iomem *)dp); - mb(); - - if (dart_is_u4) { - rpn = index; - while (npages--) - dart_tlb_invalidate_one(rpn++); - } else { - dart_dirty = 1; - } + dart_dirty = 1; } @@ -287,7 +246,7 @@ static void iommu_table_dart_setup(void) iommu_table_dart.it_base = (unsigned long)dart_vbase; iommu_table_dart.it_index = 0; iommu_table_dart.it_blocksize = 1; - iommu_init_table(&iommu_table_dart, -1); + iommu_init_table(&iommu_table_dart); /* Reserve the last page of the DART to avoid possible prefetch * past the DART mapped area diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index ef10bcf2d..ceb584682 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -9,6 +9,7 @@ * option) any later version. */ +#include #include #include #include @@ -85,8 +86,11 @@ static int __init gfar_mdio_of_init(void) mdio_data.irq[k] = -1; while ((child = of_get_next_child(np, child)) != NULL) { - u32 *id = get_property(child, "reg", NULL); - mdio_data.irq[*id] = irq_of_parse_and_map(child, 0); + if (child->n_intrs) { + u32 *id = + (u32 *) get_property(child, "reg", NULL); + mdio_data.irq[*id] = child->intrs[0].line; + } } ret = @@ -128,7 +132,6 @@ static int __init gfar_of_init(void) char *model; void *mac_addr; phandle *ph; - int n_res = 1; memset(r, 0, sizeof(r)); memset(&gfar_data, 0, sizeof(gfar_data)); @@ -137,7 +140,8 @@ static int __init gfar_of_init(void) if (ret) goto err; - r[1].start = r[1].end = irq_of_parse_and_map(np, 0); + r[1].start = np->intrs[0].line; + r[1].end = np->intrs[0].line; r[1].flags = IORESOURCE_IRQ; model = get_property(np, "model", NULL); @@ -147,35 +151,27 @@ static int __init gfar_of_init(void) r[1].name = gfar_tx_intr; r[2].name = gfar_rx_intr; - r[2].start = r[2].end = irq_of_parse_and_map(np, 1); + r[2].start = np->intrs[1].line; + r[2].end = np->intrs[1].line; r[2].flags = IORESOURCE_IRQ; r[3].name = gfar_err_intr; - r[3].start = r[3].end = irq_of_parse_and_map(np, 2); + r[3].start = np->intrs[2].line; + r[3].end = np->intrs[2].line; r[3].flags = IORESOURCE_IRQ; - - n_res += 2; } gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], - n_res + 1); + np->n_intrs + 1); if (IS_ERR(gfar_dev)) { ret = PTR_ERR(gfar_dev); goto err; } - mac_addr = get_property(np, "local-mac-address", NULL); - if (mac_addr == NULL) - mac_addr = get_property(np, "mac-address", NULL); - if (mac_addr == NULL) { - /* Obsolete */ - mac_addr = get_property(np, "address", NULL); - } - - if (mac_addr) - memcpy(gfar_data.mac_addr, mac_addr, 6); + mac_addr = get_property(np, "address", NULL); + memcpy(gfar_data.mac_addr, mac_addr, 6); if (model && !strcasecmp(model, "TSEC")) gfar_data.device_flags = @@ -256,7 +252,8 @@ static int __init fsl_i2c_of_init(void) if (ret) goto err; - r[1].start = r[1].end = irq_of_parse_and_map(np, 0); + r[1].start = np->intrs[0].line; + r[1].end = np->intrs[0].line; r[1].flags = IORESOURCE_IRQ; i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); @@ -375,7 +372,7 @@ static int __init fsl_usb_of_init(void) { struct device_node *np; unsigned int i; - struct platform_device *usb_dev_mph = NULL, *usb_dev_dr = NULL; + struct platform_device *usb_dev; int ret; for (np = NULL, i = 0; @@ -392,18 +389,19 @@ static int __init fsl_usb_of_init(void) if (ret) goto err; - r[1].start = r[1].end = irq_of_parse_and_map(np, 0); + r[1].start = np->intrs[0].line; + r[1].end = np->intrs[0].line; r[1].flags = IORESOURCE_IRQ; - usb_dev_mph = - platform_device_register_simple("fsl-ehci", i, r, 2); - if (IS_ERR(usb_dev_mph)) { - ret = PTR_ERR(usb_dev_mph); + usb_dev = + platform_device_register_simple("fsl-usb2-mph", i, r, 2); + if (IS_ERR(usb_dev)) { + ret = PTR_ERR(usb_dev); goto err; } - usb_dev_mph->dev.coherent_dma_mask = 0xffffffffUL; - usb_dev_mph->dev.dma_mask = &usb_dev_mph->dev.coherent_dma_mask; + usb_dev->dev.coherent_dma_mask = 0xffffffffUL; + usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; usb_data.operating_mode = FSL_USB2_MPH_HOST; @@ -419,14 +417,31 @@ static int __init fsl_usb_of_init(void) usb_data.phy_mode = determine_usb_phy(prop); ret = - platform_device_add_data(usb_dev_mph, &usb_data, + platform_device_add_data(usb_dev, &usb_data, sizeof(struct fsl_usb2_platform_data)); if (ret) - goto unreg_mph; + goto unreg; } - for (np = NULL; + return 0; + +unreg: + platform_device_unregister(usb_dev); +err: + return ret; +} + +arch_initcall(fsl_usb_of_init); + +static int __init fsl_usb_dr_of_init(void) +{ + struct device_node *np; + unsigned int i; + struct platform_device *usb_dev; + int ret; + + for (np = NULL, i = 0; (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; i++) { struct resource r[2]; @@ -438,20 +453,21 @@ static int __init fsl_usb_of_init(void) ret = of_address_to_resource(np, 0, &r[0]); if (ret) - goto unreg_mph; + goto err; - r[1].start = r[1].end = irq_of_parse_and_map(np, 0); + r[1].start = np->intrs[0].line; + r[1].end = np->intrs[0].line; r[1].flags = IORESOURCE_IRQ; - usb_dev_dr = - platform_device_register_simple("fsl-ehci", i, r, 2); - if (IS_ERR(usb_dev_dr)) { - ret = PTR_ERR(usb_dev_dr); + usb_dev = + platform_device_register_simple("fsl-usb2-dr", i, r, 2); + if (IS_ERR(usb_dev)) { + ret = PTR_ERR(usb_dev); goto err; } - usb_dev_dr->dev.coherent_dma_mask = 0xffffffffUL; - usb_dev_dr->dev.dma_mask = &usb_dev_dr->dev.coherent_dma_mask; + usb_dev->dev.coherent_dma_mask = 0xffffffffUL; + usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; usb_data.operating_mode = FSL_USB2_DR_HOST; @@ -459,22 +475,19 @@ static int __init fsl_usb_of_init(void) usb_data.phy_mode = determine_usb_phy(prop); ret = - platform_device_add_data(usb_dev_dr, &usb_data, + platform_device_add_data(usb_dev, &usb_data, sizeof(struct fsl_usb2_platform_data)); if (ret) - goto unreg_dr; + goto unreg; } + return 0; -unreg_dr: - if (usb_dev_dr) - platform_device_unregister(usb_dev_dr); -unreg_mph: - if (usb_dev_mph) - platform_device_unregister(usb_dev_mph); +unreg: + platform_device_unregister(usb_dev); err: return ret; } -arch_initcall(fsl_usb_of_init); +arch_initcall(fsl_usb_dr_of_init); diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 9855820b9..b7ac32fdd 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c @@ -6,16 +6,11 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#undef DEBUG - #include #include #include -#include -#include #include #include -#include static volatile void __iomem *pci_intack; /* RO, gives us the irq vector */ @@ -25,8 +20,7 @@ static unsigned char cached_8259[2] = { 0xff, 0xff }; static DEFINE_SPINLOCK(i8259_lock); -static struct device_node *i8259_node; -static struct irq_host *i8259_host; +static int i8259_pic_irq_offset; /* * Acknowledge the IRQ using either the PCI host bridge's interrupt @@ -34,18 +28,16 @@ static struct irq_host *i8259_host; * which is called. It should be noted that polling is broken on some * IBM and Motorola PReP boxes so we must use the int-ack feature on them. */ -unsigned int i8259_irq(struct pt_regs *regs) +int i8259_irq(struct pt_regs *regs) { int irq; - int lock = 0; + + spin_lock(&i8259_lock); /* Either int-ack or poll for the IRQ */ if (pci_intack) irq = readb(pci_intack); else { - spin_lock(&i8259_lock); - lock = 1; - /* Perform an interrupt acknowledge cycle on controller 1. */ outb(0x0C, 0x20); /* prepare for poll */ irq = inb(0x20) & 7; @@ -70,13 +62,16 @@ unsigned int i8259_irq(struct pt_regs *regs) if (!pci_intack) outb(0x0B, 0x20); /* ISR register */ if(~inb(0x20) & 0x80) - irq = NO_IRQ; - } else if (irq == 0xff) - irq = NO_IRQ; + irq = -1; + } - if (lock) - spin_unlock(&i8259_lock); - return irq; + spin_unlock(&i8259_lock); + return irq + i8259_pic_irq_offset; +} + +int i8259_irq_cascade(struct pt_regs *regs, void *unused) +{ + return i8259_irq(regs); } static void i8259_mask_and_ack_irq(unsigned int irq_nr) @@ -84,6 +79,7 @@ static void i8259_mask_and_ack_irq(unsigned int irq_nr) unsigned long flags; spin_lock_irqsave(&i8259_lock, flags); + irq_nr -= i8259_pic_irq_offset; if (irq_nr > 7) { cached_A1 |= 1 << (irq_nr-8); inb(0xA1); /* DUMMY */ @@ -109,9 +105,8 @@ static void i8259_mask_irq(unsigned int irq_nr) { unsigned long flags; - pr_debug("i8259_mask_irq(%d)\n", irq_nr); - spin_lock_irqsave(&i8259_lock, flags); + irq_nr -= i8259_pic_irq_offset; if (irq_nr < 8) cached_21 |= 1 << irq_nr; else @@ -124,9 +119,8 @@ static void i8259_unmask_irq(unsigned int irq_nr) { unsigned long flags; - pr_debug("i8259_unmask_irq(%d)\n", irq_nr); - spin_lock_irqsave(&i8259_lock, flags); + irq_nr -= i8259_pic_irq_offset; if (irq_nr < 8) cached_21 &= ~(1 << irq_nr); else @@ -135,11 +129,19 @@ static void i8259_unmask_irq(unsigned int irq_nr) spin_unlock_irqrestore(&i8259_lock, flags); } -static struct irq_chip i8259_pic = { - .typename = " i8259 ", - .mask = i8259_mask_irq, - .unmask = i8259_unmask_irq, - .mask_ack = i8259_mask_and_ack_irq, +static void i8259_end_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) + && irq_desc[irq].action) + i8259_unmask_irq(irq); +} + +struct hw_interrupt_type i8259_pic = { + .typename = " i8259 ", + .enable = i8259_unmask_irq, + .disable = i8259_mask_irq, + .ack = i8259_mask_and_ack_irq, + .end = i8259_end_irq, }; static struct resource pic1_iores = { @@ -163,84 +165,25 @@ static struct resource pic_edgectrl_iores = { .flags = IORESOURCE_BUSY, }; -static int i8259_host_match(struct irq_host *h, struct device_node *node) -{ - return i8259_node == NULL || i8259_node == node; -} - -static int i8259_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - pr_debug("i8259_host_map(%d, 0x%lx)\n", virq, hw); - - /* We block the internal cascade */ - if (hw == 2) - get_irq_desc(virq)->status |= IRQ_NOREQUEST; - - /* We use the level handler only for now, we might want to - * be more cautious here but that works for now - */ - get_irq_desc(virq)->status |= IRQ_LEVEL; - set_irq_chip_and_handler(virq, &i8259_pic, handle_level_irq); - return 0; -} - -static void i8259_host_unmap(struct irq_host *h, unsigned int virq) -{ - /* Make sure irq is masked in hardware */ - i8259_mask_irq(virq); - - /* remove chip and handler */ - set_irq_chip_and_handler(virq, NULL, NULL); - - /* Make sure it's completed */ - synchronize_irq(virq); -} - -static int i8259_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) -{ - static unsigned char map_isa_senses[4] = { - IRQ_TYPE_LEVEL_LOW, - IRQ_TYPE_LEVEL_HIGH, - IRQ_TYPE_EDGE_FALLING, - IRQ_TYPE_EDGE_RISING, - }; - - *out_hwirq = intspec[0]; - if (intsize > 1 && intspec[1] < 4) - *out_flags = map_isa_senses[intspec[1]]; - else - *out_flags = IRQ_TYPE_NONE; - - return 0; -} - -static struct irq_host_ops i8259_host_ops = { - .match = i8259_host_match, - .map = i8259_host_map, - .unmap = i8259_host_unmap, - .xlate = i8259_host_xlate, +static struct irqaction i8259_irqaction = { + .handler = no_action, + .flags = SA_INTERRUPT, + .mask = CPU_MASK_NONE, + .name = "82c59 secondary cascade", }; -/**** - * i8259_init - Initialize the legacy controller - * @node: device node of the legacy PIC (can be NULL, but then, it will match - * all interrupts, so beware) - * @intack_addr: PCI interrupt acknowledge (real) address which will return - * the active irq from the 8259 +/* + * i8259_init() + * intack_addr - PCI interrupt acknowledge (real) address which will return + * the active irq from the 8259 */ -void i8259_init(struct device_node *node, unsigned long intack_addr) +void __init i8259_init(unsigned long intack_addr, int offset) { unsigned long flags; + int i; - /* initialize the controller */ spin_lock_irqsave(&i8259_lock, flags); - - /* Mask all first */ - outb(0xff, 0xA1); - outb(0xff, 0x21); + i8259_pic_irq_offset = offset; /* init master interrupt controller */ outb(0x11, 0x20); /* Start init sequence */ @@ -254,36 +197,21 @@ void i8259_init(struct device_node *node, unsigned long intack_addr) outb(0x02, 0xA1); /* edge triggered, Cascade (slave) on IRQ2 */ outb(0x01, 0xA1); /* Select 8086 mode */ - /* That thing is slow */ - udelay(100); - /* always read ISR */ outb(0x0B, 0x20); outb(0x0B, 0xA0); - /* Unmask the internal cascade */ - cached_21 &= ~(1 << 2); - - /* Set interrupt masks */ + /* Mask all interrupts */ outb(cached_A1, 0xA1); outb(cached_21, 0x21); spin_unlock_irqrestore(&i8259_lock, flags); - /* create a legacy host */ - if (node) - i8259_node = of_node_get(node); - i8259_host = irq_alloc_host(IRQ_HOST_MAP_LEGACY, 0, &i8259_host_ops, 0); - if (i8259_host == NULL) { - printk(KERN_ERR "i8259: failed to allocate irq host !\n"); - return; - } + for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) + irq_desc[offset + i].handler = &i8259_pic; /* reserve our resources */ - /* XXX should we continue doing that ? it seems to cause problems - * with further requesting of PCI IO resources for that range... - * need to look into it. - */ + setup_irq(offset + 2, &i8259_irqaction); request_resource(&ioport_resource, &pic1_iores); request_resource(&ioport_resource, &pic2_iores); request_resource(&ioport_resource, &pic_edgectrl_iores); @@ -291,5 +219,4 @@ void i8259_init(struct device_node *node, unsigned long intack_addr) if (intack_addr != 0) pci_intack = ioremap(intack_addr, 1); - printk(KERN_INFO "i8259 legacy interrupt controller initialized\n"); } diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 70e707785..8f01e0f1d 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c @@ -19,18 +19,15 @@ #include #include #include -#include -#include -#include #include #include -#include #include +#include #include "ipic.h" +static struct ipic p_ipic; static struct ipic * primary_ipic; -static DEFINE_SPINLOCK(ipic_lock); static struct ipic_info ipic_info[] = { [9] = { @@ -376,220 +373,74 @@ static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 out_be32(base + (reg >> 2), value); } -static inline struct ipic * ipic_from_irq(unsigned int virq) +static inline struct ipic * ipic_from_irq(unsigned int irq) { return primary_ipic; } -#define ipic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) - -static void ipic_unmask_irq(unsigned int virq) +static void ipic_enable_irq(unsigned int irq) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); - unsigned long flags; + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; u32 temp; - spin_lock_irqsave(&ipic_lock, flags); - temp = ipic_read(ipic->regs, ipic_info[src].mask); temp |= (1 << (31 - ipic_info[src].bit)); ipic_write(ipic->regs, ipic_info[src].mask, temp); - - spin_unlock_irqrestore(&ipic_lock, flags); } -static void ipic_mask_irq(unsigned int virq) +static void ipic_disable_irq(unsigned int irq) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); - unsigned long flags; + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; u32 temp; - spin_lock_irqsave(&ipic_lock, flags); - temp = ipic_read(ipic->regs, ipic_info[src].mask); temp &= ~(1 << (31 - ipic_info[src].bit)); ipic_write(ipic->regs, ipic_info[src].mask, temp); - - spin_unlock_irqrestore(&ipic_lock, flags); } -static void ipic_ack_irq(unsigned int virq) +static void ipic_disable_irq_and_ack(unsigned int irq) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); - unsigned long flags; + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; u32 temp; - spin_lock_irqsave(&ipic_lock, flags); + ipic_disable_irq(irq); temp = ipic_read(ipic->regs, ipic_info[src].pend); temp |= (1 << (31 - ipic_info[src].bit)); ipic_write(ipic->regs, ipic_info[src].pend, temp); - - spin_unlock_irqrestore(&ipic_lock, flags); } -static void ipic_mask_irq_and_ack(unsigned int virq) +static void ipic_end_irq(unsigned int irq) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); - unsigned long flags; - u32 temp; - - spin_lock_irqsave(&ipic_lock, flags); - - temp = ipic_read(ipic->regs, ipic_info[src].mask); - temp &= ~(1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].mask, temp); - - temp = ipic_read(ipic->regs, ipic_info[src].pend); - temp |= (1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].pend, temp); - - spin_unlock_irqrestore(&ipic_lock, flags); + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) + ipic_enable_irq(irq); } -static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) -{ - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); - struct irq_desc *desc = get_irq_desc(virq); - unsigned int vold, vnew, edibit; - - if (flow_type == IRQ_TYPE_NONE) - flow_type = IRQ_TYPE_LEVEL_LOW; - - /* ipic supports only low assertion and high-to-low change senses - */ - if (!(flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))) { - printk(KERN_ERR "ipic: sense type 0x%x not supported\n", - flow_type); - return -EINVAL; - } - - desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); - desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; - if (flow_type & IRQ_TYPE_LEVEL_LOW) { - desc->status |= IRQ_LEVEL; - set_irq_handler(virq, handle_level_irq); - } else { - set_irq_handler(virq, handle_edge_irq); - } - - /* only EXT IRQ senses are programmable on ipic - * internal IRQ senses are LEVEL_LOW - */ - if (src == IPIC_IRQ_EXT0) - edibit = 15; - else - if (src >= IPIC_IRQ_EXT1 && src <= IPIC_IRQ_EXT7) - edibit = (14 - (src - IPIC_IRQ_EXT1)); - else - return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; - - vold = ipic_read(ipic->regs, IPIC_SECNR); - if ((flow_type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_FALLING) { - vnew = vold | (1 << edibit); - } else { - vnew = vold & ~(1 << edibit); - } - if (vold != vnew) - ipic_write(ipic->regs, IPIC_SECNR, vnew); - return 0; -} - -static struct irq_chip ipic_irq_chip = { - .typename = " IPIC ", - .unmask = ipic_unmask_irq, - .mask = ipic_mask_irq, - .mask_ack = ipic_mask_irq_and_ack, - .ack = ipic_ack_irq, - .set_type = ipic_set_irq_type, -}; - -static int ipic_host_match(struct irq_host *h, struct device_node *node) -{ - struct ipic *ipic = h->host_data; - - /* Exact match, unless ipic node is NULL */ - return ipic->of_node == NULL || ipic->of_node == node; -} - -static int ipic_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - struct ipic *ipic = h->host_data; - struct irq_chip *chip; - - /* Default chip */ - chip = &ipic->hc_irq; - - set_irq_chip_data(virq, ipic); - set_irq_chip_and_handler(virq, chip, handle_level_irq); - - /* Set default irq type */ - set_irq_type(virq, IRQ_TYPE_NONE); - - return 0; -} - -static int ipic_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) - -{ - /* interrupt sense values coming from the device tree equal either - * LEVEL_LOW (low assertion) or EDGE_FALLING (high-to-low change) - */ - *out_hwirq = intspec[0]; - if (intsize > 1) - *out_flags = intspec[1]; - else - *out_flags = IRQ_TYPE_NONE; - return 0; -} - -static struct irq_host_ops ipic_host_ops = { - .match = ipic_host_match, - .map = ipic_host_map, - .xlate = ipic_host_xlate, +struct hw_interrupt_type ipic = { + .typename = " IPIC ", + .enable = ipic_enable_irq, + .disable = ipic_disable_irq, + .ack = ipic_disable_irq_and_ack, + .end = ipic_end_irq, }; -void __init ipic_init(struct device_node *node, - unsigned int flags) +void __init ipic_init(phys_addr_t phys_addr, + unsigned int flags, + unsigned int irq_offset, + unsigned char *senses, + unsigned int senses_count) { - struct ipic *ipic; - struct resource res; - u32 temp = 0, ret; - - ipic = alloc_bootmem(sizeof(struct ipic)); - if (ipic == NULL) - return; - - memset(ipic, 0, sizeof(struct ipic)); - ipic->of_node = node ? of_node_get(node) : NULL; - - ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, - NR_IPIC_INTS, - &ipic_host_ops, 0); - if (ipic->irqhost == NULL) { - of_node_put(node); - return; - } - - ret = of_address_to_resource(node, 0, &res); - if (ret) - return; + u32 i, temp = 0; - ipic->regs = ioremap(res.start, res.end - res.start + 1); + primary_ipic = &p_ipic; + primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE); - ipic->irqhost->host_data = ipic; - ipic->hc_irq = ipic_irq_chip; + primary_ipic->irq_offset = irq_offset; - /* init hw */ - ipic_write(ipic->regs, IPIC_SICNR, 0x0); + ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0); /* default priority scheme is grouped. If spread mode is required * configure SICFR accordingly */ @@ -602,35 +453,49 @@ void __init ipic_init(struct device_node *node, if (flags & IPIC_SPREADMODE_MIX_B) temp |= SICFR_MPSB; - ipic_write(ipic->regs, IPIC_SICNR, temp); + ipic_write(primary_ipic->regs, IPIC_SICNR, temp); /* handle MCP route */ temp = 0; if (flags & IPIC_DISABLE_MCP_OUT) temp = SERCR_MCPR; - ipic_write(ipic->regs, IPIC_SERCR, temp); + ipic_write(primary_ipic->regs, IPIC_SERCR, temp); /* handle routing of IRQ0 to MCP */ - temp = ipic_read(ipic->regs, IPIC_SEMSR); + temp = ipic_read(primary_ipic->regs, IPIC_SEMSR); if (flags & IPIC_IRQ0_MCP) temp |= SEMSR_SIRQ0; else temp &= ~SEMSR_SIRQ0; - ipic_write(ipic->regs, IPIC_SEMSR, temp); + ipic_write(primary_ipic->regs, IPIC_SEMSR, temp); - primary_ipic = ipic; - irq_set_default_host(primary_ipic->irqhost); + for (i = 0 ; i < NR_IPIC_INTS ; i++) { + irq_desc[i+irq_offset].handler = &ipic; + irq_desc[i+irq_offset].status = IRQ_LEVEL; + } - printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, - primary_ipic->regs); + temp = 0; + for (i = 0 ; i < senses_count ; i++) { + if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) { + temp |= 1 << (15 - i); + if (i != 0) + irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0; + else + irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0; + } + } + ipic_write(primary_ipic->regs, IPIC_SECNR, temp); + + printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS, + senses_count, primary_ipic->regs); } -int ipic_set_priority(unsigned int virq, unsigned int priority) +int ipic_set_priority(unsigned int irq, unsigned int priority) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; u32 temp; if (priority > 7) @@ -655,10 +520,10 @@ int ipic_set_priority(unsigned int virq, unsigned int priority) return 0; } -void ipic_set_highest_priority(unsigned int virq) +void ipic_set_highest_priority(unsigned int irq) { - struct ipic *ipic = ipic_from_irq(virq); - unsigned int src = ipic_irq_to_hw(virq); + struct ipic *ipic = ipic_from_irq(irq); + unsigned int src = irq - ipic->irq_offset; u32 temp; temp = ipic_read(ipic->regs, IPIC_SICFR); @@ -672,10 +537,37 @@ void ipic_set_highest_priority(unsigned int virq) void ipic_set_default_priority(void) { - ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT); + ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0); + ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1); + ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2); + ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3); + ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4); + ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5); + ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6); + ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7); + + ipic_set_priority(MPC83xx_IRQ_UART1, 0); + ipic_set_priority(MPC83xx_IRQ_UART2, 1); + ipic_set_priority(MPC83xx_IRQ_SEC2, 2); + ipic_set_priority(MPC83xx_IRQ_IIC1, 5); + ipic_set_priority(MPC83xx_IRQ_IIC2, 6); + ipic_set_priority(MPC83xx_IRQ_SPI, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0); + ipic_set_priority(MPC83xx_IRQ_PIT, 1); + ipic_set_priority(MPC83xx_IRQ_PCI1, 2); + ipic_set_priority(MPC83xx_IRQ_PCI2, 3); + ipic_set_priority(MPC83xx_IRQ_EXT0, 4); + ipic_set_priority(MPC83xx_IRQ_EXT1, 5); + ipic_set_priority(MPC83xx_IRQ_EXT2, 6); + ipic_set_priority(MPC83xx_IRQ_EXT3, 7); + ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0); + ipic_set_priority(MPC83xx_IRQ_MU, 1); + ipic_set_priority(MPC83xx_IRQ_SBA, 2); + ipic_set_priority(MPC83xx_IRQ_DMA, 3); + ipic_set_priority(MPC83xx_IRQ_EXT4, 4); + ipic_set_priority(MPC83xx_IRQ_EXT5, 5); + ipic_set_priority(MPC83xx_IRQ_EXT6, 6); + ipic_set_priority(MPC83xx_IRQ_EXT7, 7); } void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) @@ -708,20 +600,17 @@ void ipic_clear_mcp_status(u32 mask) ipic_write(primary_ipic->regs, IPIC_SERMR, mask); } -/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ -unsigned int ipic_get_irq(struct pt_regs *regs) +/* Return an interrupt vector or -1 if no interrupt is pending. */ +int ipic_get_irq(struct pt_regs *regs) { int irq; - BUG_ON(primary_ipic == NULL); - -#define IPIC_SIVCR_VECTOR_MASK 0x7f - irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & IPIC_SIVCR_VECTOR_MASK; + irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f; if (irq == 0) /* 0 --> no irq is pending */ - return NO_IRQ; + irq = -1; - return irq_linear_revmap(primary_ipic->irqhost, irq); + return irq; } static struct sysdev_class ipic_sysclass = { diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h index c28e58987..a60c9d18b 100644 --- a/arch/powerpc/sysdev/ipic.h +++ b/arch/powerpc/sysdev/ipic.h @@ -15,18 +15,7 @@ #include -#define NR_IPIC_INTS 128 - -/* External IRQS */ -#define IPIC_IRQ_EXT0 48 -#define IPIC_IRQ_EXT1 17 -#define IPIC_IRQ_EXT7 23 - -/* Default Priority Registers */ -#define IPIC_SIPRR_A_DEFAULT 0x05309770 -#define IPIC_SIPRR_D_DEFAULT 0x05309770 -#define IPIC_SMPRR_A_DEFAULT 0x05309770 -#define IPIC_SMPRR_B_DEFAULT 0x05309770 +#define MPC83xx_IPIC_SIZE (0x00100) /* System Global Interrupt Configuration Register */ #define SICFR_IPSA 0x00010000 @@ -42,15 +31,7 @@ struct ipic { volatile u32 __iomem *regs; - - /* The remapper for this IPIC */ - struct irq_host *irqhost; - - /* The "linux" controller struct */ - struct irq_chip hc_irq; - - /* The device node of the interrupt controller */ - struct device_node *of_node; + unsigned int irq_offset; }; struct ipic_info { diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c index 615350d46..74e0d31a3 100644 --- a/arch/powerpc/sysdev/mmio_nvram.c +++ b/arch/powerpc/sysdev/mmio_nvram.c @@ -32,7 +32,7 @@ static void __iomem *mmio_nvram_start; static long mmio_nvram_len; -static DEFINE_SPINLOCK(mmio_nvram_lock); +static spinlock_t mmio_nvram_lock = SPIN_LOCK_UNLOCKED; static ssize_t mmio_nvram_read(char *buf, size_t count, loff_t *index) { diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index b60492640..7dcdfcb3c 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -17,6 +17,7 @@ #undef DEBUG_IRQ #undef DEBUG_LOW +#include #include #include #include @@ -54,94 +55,6 @@ static DEFINE_SPINLOCK(mpic_lock); #endif #endif -#ifdef CONFIG_MPIC_WEIRD -static u32 mpic_infos[][MPIC_IDX_END] = { - [0] = { /* Original OpenPIC compatible MPIC */ - MPIC_GREG_BASE, - MPIC_GREG_FEATURE_0, - MPIC_GREG_GLOBAL_CONF_0, - MPIC_GREG_VENDOR_ID, - MPIC_GREG_IPI_VECTOR_PRI_0, - MPIC_GREG_IPI_STRIDE, - MPIC_GREG_SPURIOUS, - MPIC_GREG_TIMER_FREQ, - - MPIC_TIMER_BASE, - MPIC_TIMER_STRIDE, - MPIC_TIMER_CURRENT_CNT, - MPIC_TIMER_BASE_CNT, - MPIC_TIMER_VECTOR_PRI, - MPIC_TIMER_DESTINATION, - - MPIC_CPU_BASE, - MPIC_CPU_STRIDE, - MPIC_CPU_IPI_DISPATCH_0, - MPIC_CPU_IPI_DISPATCH_STRIDE, - MPIC_CPU_CURRENT_TASK_PRI, - MPIC_CPU_WHOAMI, - MPIC_CPU_INTACK, - MPIC_CPU_EOI, - - MPIC_IRQ_BASE, - MPIC_IRQ_STRIDE, - MPIC_IRQ_VECTOR_PRI, - MPIC_VECPRI_VECTOR_MASK, - MPIC_VECPRI_POLARITY_POSITIVE, - MPIC_VECPRI_POLARITY_NEGATIVE, - MPIC_VECPRI_SENSE_LEVEL, - MPIC_VECPRI_SENSE_EDGE, - MPIC_VECPRI_POLARITY_MASK, - MPIC_VECPRI_SENSE_MASK, - MPIC_IRQ_DESTINATION - }, - [1] = { /* Tsi108/109 PIC */ - TSI108_GREG_BASE, - TSI108_GREG_FEATURE_0, - TSI108_GREG_GLOBAL_CONF_0, - TSI108_GREG_VENDOR_ID, - TSI108_GREG_IPI_VECTOR_PRI_0, - TSI108_GREG_IPI_STRIDE, - TSI108_GREG_SPURIOUS, - TSI108_GREG_TIMER_FREQ, - - TSI108_TIMER_BASE, - TSI108_TIMER_STRIDE, - TSI108_TIMER_CURRENT_CNT, - TSI108_TIMER_BASE_CNT, - TSI108_TIMER_VECTOR_PRI, - TSI108_TIMER_DESTINATION, - - TSI108_CPU_BASE, - TSI108_CPU_STRIDE, - TSI108_CPU_IPI_DISPATCH_0, - TSI108_CPU_IPI_DISPATCH_STRIDE, - TSI108_CPU_CURRENT_TASK_PRI, - TSI108_CPU_WHOAMI, - TSI108_CPU_INTACK, - TSI108_CPU_EOI, - - TSI108_IRQ_BASE, - TSI108_IRQ_STRIDE, - TSI108_IRQ_VECTOR_PRI, - TSI108_VECPRI_VECTOR_MASK, - TSI108_VECPRI_POLARITY_POSITIVE, - TSI108_VECPRI_POLARITY_NEGATIVE, - TSI108_VECPRI_SENSE_LEVEL, - TSI108_VECPRI_SENSE_EDGE, - TSI108_VECPRI_POLARITY_MASK, - TSI108_VECPRI_SENSE_MASK, - TSI108_IRQ_DESTINATION - }, -}; - -#define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name] - -#else /* CONFIG_MPIC_WEIRD */ - -#define MPIC_INFO(name) MPIC_##name - -#endif /* CONFIG_MPIC_WEIRD */ - /* * Register accessor functions */ @@ -168,8 +81,7 @@ static inline void _mpic_write(unsigned int be, volatile u32 __iomem *base, static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) { unsigned int be = (mpic->flags & MPIC_BIG_ENDIAN) != 0; - unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) + - (ipi * MPIC_INFO(GREG_IPI_STRIDE)); + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); if (mpic->flags & MPIC_BROKEN_IPI) be = !be; @@ -178,8 +90,7 @@ static inline u32 _mpic_ipi_read(struct mpic *mpic, unsigned int ipi) static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 value) { - unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) + - (ipi * MPIC_INFO(GREG_IPI_STRIDE)); + unsigned int offset = MPIC_GREG_IPI_VECTOR_PRI_0 + (ipi * 0x10); _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->gregs, offset, value); } @@ -190,8 +101,8 @@ static inline u32 _mpic_cpu_read(struct mpic *mpic, unsigned int reg) if (mpic->flags & MPIC_PRIMARY) cpu = hard_smp_processor_id(); - return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, - mpic->cpuregs[cpu], reg); + + return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->cpuregs[cpu], reg); } static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 value) @@ -210,7 +121,7 @@ static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, unsigne unsigned int idx = src_no & mpic->isu_mask; return _mpic_read(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], - reg + (idx * MPIC_INFO(IRQ_STRIDE))); + reg + (idx * MPIC_IRQ_STRIDE)); } static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, @@ -220,7 +131,7 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no, unsigned int idx = src_no & mpic->isu_mask; _mpic_write(mpic->flags & MPIC_BIG_ENDIAN, mpic->isus[isu], - reg + (idx * MPIC_INFO(IRQ_STRIDE)), value); + reg + (idx * MPIC_IRQ_STRIDE), value); } #define mpic_read(b,r) _mpic_read(mpic->flags & MPIC_BIG_ENDIAN,(b),(r)) @@ -246,8 +157,8 @@ static void __init mpic_test_broken_ipi(struct mpic *mpic) { u32 r; - mpic_write(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0), MPIC_VECPRI_MASK); - r = mpic_read(mpic->gregs, MPIC_INFO(GREG_IPI_VECTOR_PRI_0)); + mpic_write(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0, MPIC_VECPRI_MASK); + r = mpic_read(mpic->gregs, MPIC_GREG_IPI_VECTOR_PRI_0); if (r == le32_to_cpu(MPIC_VECPRI_MASK)) { printk(KERN_INFO "mpic: Detected reversed IPI registers\n"); @@ -294,7 +205,7 @@ static void mpic_startup_ht_interrupt(struct mpic *mpic, unsigned int source, if (fixup->base == NULL) return; - DBG("startup_ht_interrupt(0x%x, 0x%x) index: %d\n", + DBG("startup_ht_interrupt(%u, %u) index: %d\n", source, irqflags, fixup->index); spin_lock_irqsave(&mpic->fixup_lock, flags); /* Enable and configure */ @@ -317,7 +228,7 @@ static void mpic_shutdown_ht_interrupt(struct mpic *mpic, unsigned int source, if (fixup->base == NULL) return; - DBG("shutdown_ht_interrupt(0x%x, 0x%x)\n", source, irqflags); + DBG("shutdown_ht_interrupt(%u, %u)\n", source, irqflags); /* Disable */ spin_lock_irqsave(&mpic->fixup_lock, flags); @@ -427,33 +338,30 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic) } } -#else /* CONFIG_MPIC_BROKEN_U3 */ - -static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source) -{ - return 0; -} - -static void __init mpic_scan_ht_pics(struct mpic *mpic) -{ -} - #endif /* CONFIG_MPIC_BROKEN_U3 */ -#define mpic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq) - /* Find an mpic associated with a given linux interrupt */ static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi) { - unsigned int src = mpic_irq_to_hw(irq); - - if (irq < NUM_ISA_INTERRUPTS) - return NULL; - if (is_ipi) - *is_ipi = (src >= MPIC_VEC_IPI_0 && src <= MPIC_VEC_IPI_3); - - return irq_desc[irq].chip_data; + struct mpic *mpic = mpics; + + while(mpic) { + /* search IPIs first since they may override the main interrupts */ + if (irq >= mpic->ipi_offset && irq < (mpic->ipi_offset + 4)) { + if (is_ipi) + *is_ipi = 1; + return mpic; + } + if (irq >= mpic->irq_offset && + irq < (mpic->irq_offset + mpic->irq_count)) { + if (is_ipi) + *is_ipi = 0; + return mpic; + } + mpic = mpic -> next; + } + return NULL; } /* Convert a cpu mask from logical to physical cpu numbers. */ @@ -471,27 +379,29 @@ static inline u32 mpic_physmask(u32 cpumask) /* Get the mpic structure from the IPI number */ static inline struct mpic * mpic_from_ipi(unsigned int ipi) { - return irq_desc[ipi].chip_data; + return container_of(irq_desc[ipi].handler, struct mpic, hc_ipi); } #endif /* Get the mpic structure from the irq number */ static inline struct mpic * mpic_from_irq(unsigned int irq) { - return irq_desc[irq].chip_data; + return container_of(irq_desc[irq].handler, struct mpic, hc_irq); } /* Send an EOI */ static inline void mpic_eoi(struct mpic *mpic) { - mpic_cpu_write(MPIC_INFO(CPU_EOI), 0); - (void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI)); + mpic_cpu_write(MPIC_CPU_EOI, 0); + (void)mpic_cpu_read(MPIC_CPU_WHOAMI); } #ifdef CONFIG_SMP static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) { - smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0, regs); + struct mpic *mpic = dev_id; + + smp_message_recv(irq - mpic->ipi_offset, regs); return IRQ_HANDLED; } #endif /* CONFIG_SMP */ @@ -501,36 +411,63 @@ static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) */ -static void mpic_unmask_irq(unsigned int irq) +static void mpic_enable_irq(unsigned int irq) { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); + unsigned int src = irq - mpic->irq_offset; DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); - mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), - mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK); + /* make sure mask gets to controller before we return to user */ do { if (!loops--) { printk(KERN_ERR "mpic_enable_irq timeout\n"); break; } - } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK); + } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); + +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic->flags & MPIC_BROKEN_U3) { + unsigned int src = irq - mpic->irq_offset; + if (mpic_is_ht_interrupt(mpic, src) && + (irq_desc[irq].status & IRQ_LEVEL)) + mpic_ht_end_irq(mpic, src); + } +#endif /* CONFIG_MPIC_BROKEN_U3 */ +} + +static unsigned int mpic_startup_irq(unsigned int irq) +{ +#ifdef CONFIG_MPIC_BROKEN_U3 + struct mpic *mpic = mpic_from_irq(irq); + unsigned int src = irq - mpic->irq_offset; +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + mpic_enable_irq(irq); + +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic_is_ht_interrupt(mpic, src)) + mpic_startup_ht_interrupt(mpic, src, irq_desc[irq].status); +#endif /* CONFIG_MPIC_BROKEN_U3 */ + + return 0; } -static void mpic_mask_irq(unsigned int irq) +static void mpic_disable_irq(unsigned int irq) { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); + unsigned int src = irq - mpic->irq_offset; DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); - mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), - mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) | + mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | MPIC_VECPRI_MASK); /* make sure mask gets to controller before we return to user */ @@ -539,61 +476,26 @@ static void mpic_mask_irq(unsigned int irq) printk(KERN_ERR "mpic_enable_irq timeout\n"); break; } - } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK)); + } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); } -static void mpic_end_irq(unsigned int irq) +static void mpic_shutdown_irq(unsigned int irq) { - struct mpic *mpic = mpic_from_irq(irq); - -#ifdef DEBUG_IRQ - DBG("%s: end_irq: %d\n", mpic->name, irq); -#endif - /* We always EOI on end_irq() even for edge interrupts since that - * should only lower the priority, the MPIC should have properly - * latched another edge interrupt coming in anyway - */ - - mpic_eoi(mpic); -} - #ifdef CONFIG_MPIC_BROKEN_U3 - -static void mpic_unmask_ht_irq(unsigned int irq) -{ - struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); - - mpic_unmask_irq(irq); - - if (irq_desc[irq].status & IRQ_LEVEL) - mpic_ht_end_irq(mpic, src); -} - -static unsigned int mpic_startup_ht_irq(unsigned int irq) -{ struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); - - mpic_unmask_irq(irq); - mpic_startup_ht_interrupt(mpic, src, irq_desc[irq].status); + unsigned int src = irq - mpic->irq_offset; - return 0; -} + if (mpic_is_ht_interrupt(mpic, src)) + mpic_shutdown_ht_interrupt(mpic, src, irq_desc[irq].status); -static void mpic_shutdown_ht_irq(unsigned int irq) -{ - struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); +#endif /* CONFIG_MPIC_BROKEN_U3 */ - mpic_shutdown_ht_interrupt(mpic, src, irq_desc[irq].status); - mpic_mask_irq(irq); + mpic_disable_irq(irq); } -static void mpic_end_ht_irq(unsigned int irq) +static void mpic_end_irq(unsigned int irq) { struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); #ifdef DEBUG_IRQ DBG("%s: end_irq: %d\n", mpic->name, irq); @@ -603,24 +505,30 @@ static void mpic_end_ht_irq(unsigned int irq) * latched another edge interrupt coming in anyway */ - if (irq_desc[irq].status & IRQ_LEVEL) - mpic_ht_end_irq(mpic, src); +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic->flags & MPIC_BROKEN_U3) { + unsigned int src = irq - mpic->irq_offset; + if (mpic_is_ht_interrupt(mpic, src) && + (irq_desc[irq].status & IRQ_LEVEL)) + mpic_ht_end_irq(mpic, src); + } +#endif /* CONFIG_MPIC_BROKEN_U3 */ + mpic_eoi(mpic); } -#endif /* !CONFIG_MPIC_BROKEN_U3 */ #ifdef CONFIG_SMP -static void mpic_unmask_ipi(unsigned int irq) +static void mpic_enable_ipi(unsigned int irq) { struct mpic *mpic = mpic_from_ipi(irq); - unsigned int src = mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0; + unsigned int src = irq - mpic->ipi_offset; DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src); mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK); } -static void mpic_mask_ipi(unsigned int irq) +static void mpic_disable_ipi(unsigned int irq) { /* NEVER disable an IPI... that's just plain wrong! */ } @@ -633,7 +541,7 @@ static void mpic_end_ipi(unsigned int irq) * IPIs are marked IRQ_PER_CPU. This has the side effect of * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from * applying to them. We EOI them late to avoid re-entering. - * We mark IPI's with IRQF_DISABLED as they must run with + * We mark IPI's with SA_INTERRUPT as they must run with * irqs disabled. */ mpic_eoi(mpic); @@ -644,211 +552,29 @@ static void mpic_end_ipi(unsigned int irq) static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask) { struct mpic *mpic = mpic_from_irq(irq); - unsigned int src = mpic_irq_to_hw(irq); cpumask_t tmp; cpus_and(tmp, cpumask, cpu_online_map); - mpic_irq_write(src, MPIC_INFO(IRQ_DESTINATION), + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_DESTINATION, mpic_physmask(cpus_addr(tmp)[0])); } -static unsigned int mpic_type_to_vecpri(struct mpic *mpic, unsigned int type) -{ - /* Now convert sense value */ - switch(type & IRQ_TYPE_SENSE_MASK) { - case IRQ_TYPE_EDGE_RISING: - return MPIC_INFO(VECPRI_SENSE_EDGE) | - MPIC_INFO(VECPRI_POLARITY_POSITIVE); - case IRQ_TYPE_EDGE_FALLING: - case IRQ_TYPE_EDGE_BOTH: - return MPIC_INFO(VECPRI_SENSE_EDGE) | - MPIC_INFO(VECPRI_POLARITY_NEGATIVE); - case IRQ_TYPE_LEVEL_HIGH: - return MPIC_INFO(VECPRI_SENSE_LEVEL) | - MPIC_INFO(VECPRI_POLARITY_POSITIVE); - case IRQ_TYPE_LEVEL_LOW: - default: - return MPIC_INFO(VECPRI_SENSE_LEVEL) | - MPIC_INFO(VECPRI_POLARITY_NEGATIVE); - } -} - -static int mpic_set_irq_type(unsigned int virq, unsigned int flow_type) -{ - struct mpic *mpic = mpic_from_irq(virq); - unsigned int src = mpic_irq_to_hw(virq); - struct irq_desc *desc = get_irq_desc(virq); - unsigned int vecpri, vold, vnew; - - DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n", - mpic, virq, src, flow_type); - - if (src >= mpic->irq_count) - return -EINVAL; - - if (flow_type == IRQ_TYPE_NONE) - if (mpic->senses && src < mpic->senses_count) - flow_type = mpic->senses[src]; - if (flow_type == IRQ_TYPE_NONE) - flow_type = IRQ_TYPE_LEVEL_LOW; - - desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); - desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; - if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) - desc->status |= IRQ_LEVEL; - - if (mpic_is_ht_interrupt(mpic, src)) - vecpri = MPIC_VECPRI_POLARITY_POSITIVE | - MPIC_VECPRI_SENSE_EDGE; - else - vecpri = mpic_type_to_vecpri(mpic, flow_type); - - vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); - vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) | - MPIC_INFO(VECPRI_SENSE_MASK)); - vnew |= vecpri; - if (vold != vnew) - mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vnew); - - return 0; -} - -static struct irq_chip mpic_irq_chip = { - .mask = mpic_mask_irq, - .unmask = mpic_unmask_irq, - .eoi = mpic_end_irq, - .set_type = mpic_set_irq_type, -}; - -#ifdef CONFIG_SMP -static struct irq_chip mpic_ipi_chip = { - .mask = mpic_mask_ipi, - .unmask = mpic_unmask_ipi, - .eoi = mpic_end_ipi, -}; -#endif /* CONFIG_SMP */ - -#ifdef CONFIG_MPIC_BROKEN_U3 -static struct irq_chip mpic_irq_ht_chip = { - .startup = mpic_startup_ht_irq, - .shutdown = mpic_shutdown_ht_irq, - .mask = mpic_mask_irq, - .unmask = mpic_unmask_ht_irq, - .eoi = mpic_end_ht_irq, - .set_type = mpic_set_irq_type, -}; -#endif /* CONFIG_MPIC_BROKEN_U3 */ - - -static int mpic_host_match(struct irq_host *h, struct device_node *node) -{ - struct mpic *mpic = h->host_data; - - /* Exact match, unless mpic node is NULL */ - return mpic->of_node == NULL || mpic->of_node == node; -} - -static int mpic_host_map(struct irq_host *h, unsigned int virq, - irq_hw_number_t hw) -{ - struct mpic *mpic = h->host_data; - struct irq_chip *chip; - - DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw); - - if (hw == MPIC_VEC_SPURRIOUS) - return -EINVAL; - -#ifdef CONFIG_SMP - else if (hw >= MPIC_VEC_IPI_0) { - WARN_ON(!(mpic->flags & MPIC_PRIMARY)); - - DBG("mpic: mapping as IPI\n"); - set_irq_chip_data(virq, mpic); - set_irq_chip_and_handler(virq, &mpic->hc_ipi, - handle_percpu_irq); - return 0; - } -#endif /* CONFIG_SMP */ - - if (hw >= mpic->irq_count) - return -EINVAL; - - /* Default chip */ - chip = &mpic->hc_irq; - -#ifdef CONFIG_MPIC_BROKEN_U3 - /* Check for HT interrupts, override vecpri */ - if (mpic_is_ht_interrupt(mpic, hw)) - chip = &mpic->hc_ht_irq; -#endif /* CONFIG_MPIC_BROKEN_U3 */ - - DBG("mpic: mapping to irq chip @%p\n", chip); - - set_irq_chip_data(virq, mpic); - set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq); - - /* Set default irq type */ - set_irq_type(virq, IRQ_TYPE_NONE); - - return 0; -} - -static int mpic_host_xlate(struct irq_host *h, struct device_node *ct, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_flags) - -{ - static unsigned char map_mpic_senses[4] = { - IRQ_TYPE_EDGE_RISING, - IRQ_TYPE_LEVEL_LOW, - IRQ_TYPE_LEVEL_HIGH, - IRQ_TYPE_EDGE_FALLING, - }; - - *out_hwirq = intspec[0]; - if (intsize > 1) { - u32 mask = 0x3; - - /* Apple invented a new race of encoding on machines with - * an HT APIC. They encode, among others, the index within - * the HT APIC. We don't care about it here since thankfully, - * it appears that they have the APIC already properly - * configured, and thus our current fixup code that reads the - * APIC config works fine. However, we still need to mask out - * bits in the specifier to make sure we only get bit 0 which - * is the level/edge bit (the only sense bit exposed by Apple), - * as their bit 1 means something else. - */ - if (machine_is(powermac)) - mask = 0x1; - *out_flags = map_mpic_senses[intspec[1] & mask]; - } else - *out_flags = IRQ_TYPE_NONE; - - DBG("mpic: xlate (%d cells: 0x%08x 0x%08x) to line 0x%lx sense 0x%x\n", - intsize, intspec[0], intspec[1], *out_hwirq, *out_flags); - - return 0; -} - -static struct irq_host_ops mpic_host_ops = { - .match = mpic_host_match, - .map = mpic_host_map, - .xlate = mpic_host_xlate, -}; /* * Exported functions */ -struct mpic * __init mpic_alloc(struct device_node *node, - unsigned long phys_addr, + +struct mpic * __init mpic_alloc(unsigned long phys_addr, unsigned int flags, unsigned int isu_size, + unsigned int irq_offset, unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_count, const char *name) { struct mpic *mpic; @@ -860,55 +586,45 @@ struct mpic * __init mpic_alloc(struct device_node *node, if (mpic == NULL) return NULL; + memset(mpic, 0, sizeof(struct mpic)); mpic->name = name; - mpic->of_node = node ? of_node_get(node) : NULL; - - mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 256, - &mpic_host_ops, - MPIC_VEC_SPURRIOUS); - if (mpic->irqhost == NULL) { - of_node_put(node); - return NULL; - } - mpic->irqhost->host_data = mpic; - mpic->hc_irq = mpic_irq_chip; mpic->hc_irq.typename = name; + mpic->hc_irq.startup = mpic_startup_irq; + mpic->hc_irq.shutdown = mpic_shutdown_irq; + mpic->hc_irq.enable = mpic_enable_irq; + mpic->hc_irq.disable = mpic_disable_irq; + mpic->hc_irq.end = mpic_end_irq; if (flags & MPIC_PRIMARY) mpic->hc_irq.set_affinity = mpic_set_affinity; -#ifdef CONFIG_MPIC_BROKEN_U3 - mpic->hc_ht_irq = mpic_irq_ht_chip; - mpic->hc_ht_irq.typename = name; - if (flags & MPIC_PRIMARY) - mpic->hc_ht_irq.set_affinity = mpic_set_affinity; -#endif /* CONFIG_MPIC_BROKEN_U3 */ #ifdef CONFIG_SMP - mpic->hc_ipi = mpic_ipi_chip; mpic->hc_ipi.typename = name; + mpic->hc_ipi.enable = mpic_enable_ipi; + mpic->hc_ipi.disable = mpic_disable_ipi; + mpic->hc_ipi.end = mpic_end_ipi; #endif /* CONFIG_SMP */ mpic->flags = flags; mpic->isu_size = isu_size; + mpic->irq_offset = irq_offset; mpic->irq_count = irq_count; + mpic->ipi_offset = ipi_offset; mpic->num_sources = 0; /* so far */ - -#ifdef CONFIG_MPIC_WEIRD - mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)]; -#endif + mpic->senses = senses; + mpic->senses_count = senses_count; /* Map the global registers */ - mpic->gregs = ioremap(phys_addr + MPIC_INFO(GREG_BASE), 0x1000); - mpic->tmregs = mpic->gregs + - ((MPIC_INFO(TIMER_BASE) - MPIC_INFO(GREG_BASE)) >> 2); + mpic->gregs = ioremap(phys_addr + MPIC_GREG_BASE, 0x1000); + mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2); BUG_ON(mpic->gregs == NULL); /* Reset */ if (flags & MPIC_WANTS_RESET) { - mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), - mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) | MPIC_GREG_GCONF_RESET); - while( mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) + while( mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) & MPIC_GREG_GCONF_RESET) mb(); } @@ -917,7 +633,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, * MPICs, num sources as well. On ISU MPICs, sources are counted * as ISUs are added */ - reg = mpic_read(mpic->gregs, MPIC_INFO(GREG_FEATURE_0)); + reg = mpic_read(mpic->gregs, MPIC_GREG_FEATURE_0); mpic->num_cpus = ((reg & MPIC_GREG_FEATURE_LAST_CPU_MASK) >> MPIC_GREG_FEATURE_LAST_CPU_SHIFT) + 1; if (isu_size == 0) @@ -926,16 +642,16 @@ struct mpic * __init mpic_alloc(struct device_node *node, /* Map the per-CPU registers */ for (i = 0; i < mpic->num_cpus; i++) { - mpic->cpuregs[i] = ioremap(phys_addr + MPIC_INFO(CPU_BASE) + - i * MPIC_INFO(CPU_STRIDE), 0x1000); + mpic->cpuregs[i] = ioremap(phys_addr + MPIC_CPU_BASE + + i * MPIC_CPU_STRIDE, 0x1000); BUG_ON(mpic->cpuregs[i] == NULL); } /* Initialize main ISU if none provided */ if (mpic->isu_size == 0) { mpic->isu_size = mpic->num_sources; - mpic->isus[0] = ioremap(phys_addr + MPIC_INFO(IRQ_BASE), - MPIC_INFO(IRQ_STRIDE) * mpic->isu_size); + mpic->isus[0] = ioremap(phys_addr + MPIC_IRQ_BASE, + MPIC_IRQ_STRIDE * mpic->isu_size); BUG_ON(mpic->isus[0] == NULL); } mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); @@ -964,10 +680,8 @@ struct mpic * __init mpic_alloc(struct device_node *node, mpic->next = mpics; mpics = mpic; - if (flags & MPIC_PRIMARY) { + if (flags & MPIC_PRIMARY) mpic_primary = mpic; - irq_set_default_host(mpic->irqhost); - } return mpic; } @@ -979,16 +693,31 @@ void __init mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, BUG_ON(isu_num >= MPIC_MAX_ISU); - mpic->isus[isu_num] = ioremap(phys_addr, - MPIC_INFO(IRQ_STRIDE) * mpic->isu_size); + mpic->isus[isu_num] = ioremap(phys_addr, MPIC_IRQ_STRIDE * mpic->isu_size); if ((isu_first + mpic->isu_size) > mpic->num_sources) mpic->num_sources = isu_first + mpic->isu_size; } -void __init mpic_set_default_senses(struct mpic *mpic, u8 *senses, int count) +void __init mpic_setup_cascade(unsigned int irq, mpic_cascade_t handler, + void *data) { - mpic->senses = senses; - mpic->senses_count = count; + struct mpic *mpic = mpic_find(irq, NULL); + unsigned long flags; + + /* Synchronization here is a bit dodgy, so don't try to replace cascade + * interrupts on the fly too often ... but normally it's set up at boot. + */ + spin_lock_irqsave(&mpic_lock, flags); + if (mpic->cascade) + mpic_disable_irq(mpic->cascade_vec + mpic->irq_offset); + mpic->cascade = NULL; + wmb(); + mpic->cascade_vec = irq - mpic->irq_offset; + mpic->cascade_data = data; + wmb(); + mpic->cascade = handler; + mpic_enable_irq(irq); + spin_unlock_irqrestore(&mpic_lock, flags); } void __init mpic_init(struct mpic *mpic) @@ -996,25 +725,18 @@ void __init mpic_init(struct mpic *mpic) int i; BUG_ON(mpic->num_sources == 0); - WARN_ON(mpic->num_sources > MPIC_VEC_IPI_0); - - /* Sanitize source count */ - if (mpic->num_sources > MPIC_VEC_IPI_0) - mpic->num_sources = MPIC_VEC_IPI_0; printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); /* Set current processor priority to max */ - mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf); + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); /* Initialize timers: just disable them all */ for (i = 0; i < 4; i++) { mpic_write(mpic->tmregs, - i * MPIC_INFO(TIMER_STRIDE) + - MPIC_INFO(TIMER_DESTINATION), 0); + i * MPIC_TIMER_STRIDE + MPIC_TIMER_DESTINATION, 0); mpic_write(mpic->tmregs, - i * MPIC_INFO(TIMER_STRIDE) + - MPIC_INFO(TIMER_VECTOR_PRI), + i * MPIC_TIMER_STRIDE + MPIC_TIMER_VECTOR_PRI, MPIC_VECPRI_MASK | (MPIC_VEC_TIMER_0 + i)); } @@ -1026,84 +748,106 @@ void __init mpic_init(struct mpic *mpic) MPIC_VECPRI_MASK | (10 << MPIC_VECPRI_PRIORITY_SHIFT) | (MPIC_VEC_IPI_0 + i)); +#ifdef CONFIG_SMP + if (!(mpic->flags & MPIC_PRIMARY)) + continue; + irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU; + irq_desc[mpic->ipi_offset+i].handler = &mpic->hc_ipi; +#endif /* CONFIG_SMP */ } /* Initialize interrupt sources */ if (mpic->irq_count == 0) mpic->irq_count = mpic->num_sources; +#ifdef CONFIG_MPIC_BROKEN_U3 /* Do the HT PIC fixups on U3 broken mpic */ DBG("MPIC flags: %x\n", mpic->flags); if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY)) - mpic_scan_ht_pics(mpic); + mpic_scan_ht_pics(mpic); +#endif /* CONFIG_MPIC_BROKEN_U3 */ for (i = 0; i < mpic->num_sources; i++) { /* start with vector = source number, and masked */ - u32 vecpri = MPIC_VECPRI_MASK | i | - (8 << MPIC_VECPRI_PRIORITY_SHIFT); + u32 vecpri = MPIC_VECPRI_MASK | i | (8 << MPIC_VECPRI_PRIORITY_SHIFT); + int level = 0; + /* if it's an IPI, we skip it */ + if ((mpic->irq_offset + i) >= (mpic->ipi_offset + i) && + (mpic->irq_offset + i) < (mpic->ipi_offset + i + 4)) + continue; + + /* do senses munging */ + if (mpic->senses && i < mpic->senses_count) { + if (mpic->senses[i] & IRQ_SENSE_LEVEL) + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + if (mpic->senses[i] & IRQ_POLARITY_POSITIVE) + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } else + vecpri |= MPIC_VECPRI_SENSE_LEVEL; + + /* remember if it was a level interrupts */ + level = (vecpri & MPIC_VECPRI_SENSE_LEVEL); + + /* deal with broken U3 */ + if (mpic->flags & MPIC_BROKEN_U3) { +#ifdef CONFIG_MPIC_BROKEN_U3 + if (mpic_is_ht_interrupt(mpic, i)) { + vecpri &= ~(MPIC_VECPRI_SENSE_MASK | + MPIC_VECPRI_POLARITY_MASK); + vecpri |= MPIC_VECPRI_POLARITY_POSITIVE; + } +#else + printk(KERN_ERR "mpic: BROKEN_U3 set, but CONFIG doesn't match\n"); +#endif + } + + DBG("setup source %d, vecpri: %08x, level: %d\n", i, vecpri, + (level != 0)); + /* init hw */ - mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri); - mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), + mpic_irq_write(i, MPIC_IRQ_VECTOR_PRI, vecpri); + mpic_irq_write(i, MPIC_IRQ_DESTINATION, 1 << hard_smp_processor_id()); + + /* init linux descriptors */ + if (i < mpic->irq_count) { + irq_desc[mpic->irq_offset+i].status = level ? IRQ_LEVEL : 0; + irq_desc[mpic->irq_offset+i].handler = &mpic->hc_irq; + } } /* Init spurrious vector */ - mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), MPIC_VEC_SPURRIOUS); + mpic_write(mpic->gregs, MPIC_GREG_SPURIOUS, MPIC_VEC_SPURRIOUS); - /* Disable 8259 passthrough, if supported */ - if (!(mpic->flags & MPIC_NO_PTHROU_DIS)) - mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0), - mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) - | MPIC_GREG_GCONF_8259_PTHROU_DIS); + /* Disable 8259 passthrough */ + mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0, + mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0) + | MPIC_GREG_GCONF_8259_PTHROU_DIS); /* Set current processor priority to 0 */ - mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0); + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); } -void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) -{ - u32 v; - v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); - v &= ~MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK; - v |= MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(clock_ratio); - mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); -} - -void __init mpic_set_serial_int(struct mpic *mpic, int enable) -{ - unsigned long flags; - u32 v; - - spin_lock_irqsave(&mpic_lock, flags); - v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); - if (enable) - v |= MPIC_GREG_GLOBAL_CONF_1_SIE; - else - v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; - mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); - spin_unlock_irqrestore(&mpic_lock, flags); -} void mpic_irq_set_priority(unsigned int irq, unsigned int pri) { int is_ipi; struct mpic *mpic = mpic_find(irq, &is_ipi); - unsigned int src = mpic_irq_to_hw(irq); unsigned long flags; u32 reg; spin_lock_irqsave(&mpic_lock, flags); if (is_ipi) { - reg = mpic_ipi_read(src - MPIC_VEC_IPI_0) & + reg = mpic_ipi_read(irq - mpic->ipi_offset) & ~MPIC_VECPRI_PRIORITY_MASK; - mpic_ipi_write(src - MPIC_VEC_IPI_0, + mpic_ipi_write(irq - mpic->ipi_offset, reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); } else { - reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) + reg = mpic_irq_read(irq - mpic->irq_offset,MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_PRIORITY_MASK; - mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), + mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI, reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); } spin_unlock_irqrestore(&mpic_lock, flags); @@ -1113,15 +857,14 @@ unsigned int mpic_irq_get_priority(unsigned int irq) { int is_ipi; struct mpic *mpic = mpic_find(irq, &is_ipi); - unsigned int src = mpic_irq_to_hw(irq); unsigned long flags; u32 reg; spin_lock_irqsave(&mpic_lock, flags); if (is_ipi) - reg = mpic_ipi_read(src = MPIC_VEC_IPI_0); + reg = mpic_ipi_read(irq - mpic->ipi_offset); else - reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); + reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI); spin_unlock_irqrestore(&mpic_lock, flags); return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; } @@ -1143,16 +886,16 @@ void mpic_setup_this_cpu(void) /* let the mpic know we want intrs. default affinity is 0xffffffff * until changed via /proc. That's how it's done on x86. If we want * it differently, then we should make sure we also change the default - * values of irq_desc[].affinity in irq.c. + * values of irq_affinity in irq.c. */ if (distribute_irqs) { for (i = 0; i < mpic->num_sources ; i++) - mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), - mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) | msk); + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + mpic_irq_read(i, MPIC_IRQ_DESTINATION) | msk); } /* Set current processor priority to 0 */ - mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0); + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); spin_unlock_irqrestore(&mpic_lock, flags); #endif /* CONFIG_SMP */ @@ -1162,7 +905,7 @@ int mpic_cpu_get_priority(void) { struct mpic *mpic = mpic_primary; - return mpic_cpu_read(MPIC_INFO(CPU_CURRENT_TASK_PRI)); + return mpic_cpu_read(MPIC_CPU_CURRENT_TASK_PRI); } void mpic_cpu_set_priority(int prio) @@ -1170,7 +913,7 @@ void mpic_cpu_set_priority(int prio) struct mpic *mpic = mpic_primary; prio &= MPIC_CPU_TASKPRI_MASK; - mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), prio); + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, prio); } /* @@ -1192,11 +935,11 @@ void mpic_teardown_this_cpu(int secondary) /* let the mpic know we don't want intrs. */ for (i = 0; i < mpic->num_sources ; i++) - mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), - mpic_irq_read(i, MPIC_INFO(IRQ_DESTINATION)) & ~msk); + mpic_irq_write(i, MPIC_IRQ_DESTINATION, + mpic_irq_read(i, MPIC_IRQ_DESTINATION) & ~msk); /* Set current processor priority to max */ - mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0xf); + mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0xf); spin_unlock_irqrestore(&mpic_lock, flags); } @@ -1212,25 +955,41 @@ void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask) DBG("%s: send_ipi(ipi_no: %d)\n", mpic->name, ipi_no); #endif - mpic_cpu_write(MPIC_INFO(CPU_IPI_DISPATCH_0) + - ipi_no * MPIC_INFO(CPU_IPI_DISPATCH_STRIDE), + mpic_cpu_write(MPIC_CPU_IPI_DISPATCH_0 + ipi_no * 0x10, mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); } -unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs) +int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs) { - u32 src; + u32 irq; - src = mpic_cpu_read(MPIC_INFO(CPU_INTACK)) & MPIC_INFO(VECPRI_VECTOR_MASK); + irq = mpic_cpu_read(MPIC_CPU_INTACK) & MPIC_VECPRI_VECTOR_MASK; #ifdef DEBUG_LOW - DBG("%s: get_one_irq(): %d\n", mpic->name, src); + DBG("%s: get_one_irq(): %d\n", mpic->name, irq); #endif - if (unlikely(src == MPIC_VEC_SPURRIOUS)) - return NO_IRQ; - return irq_linear_revmap(mpic->irqhost, src); + if (mpic->cascade && irq == mpic->cascade_vec) { +#ifdef DEBUG_LOW + DBG("%s: cascading ...\n", mpic->name); +#endif + irq = mpic->cascade(regs, mpic->cascade_data); + mpic_eoi(mpic); + return irq; + } + if (unlikely(irq == MPIC_VEC_SPURRIOUS)) + return -1; + if (irq < MPIC_VEC_IPI_0) { +#ifdef DEBUG_IRQ + DBG("%s: irq %d\n", mpic->name, irq + mpic->irq_offset); +#endif + return irq + mpic->irq_offset; + } +#ifdef DEBUG_IPI + DBG("%s: ipi %d !\n", mpic->name, irq - MPIC_VEC_IPI_0); +#endif + return irq - MPIC_VEC_IPI_0 + mpic->ipi_offset; } -unsigned int mpic_get_irq(struct pt_regs *regs) +int mpic_get_irq(struct pt_regs *regs) { struct mpic *mpic = mpic_primary; @@ -1244,27 +1003,22 @@ unsigned int mpic_get_irq(struct pt_regs *regs) void mpic_request_ipis(void) { struct mpic *mpic = mpic_primary; - int i; - static char *ipi_names[] = { - "IPI0 (call function)", - "IPI1 (reschedule)", - "IPI2 (unused)", - "IPI3 (debugger break)", - }; - BUG_ON(mpic == NULL); - - printk(KERN_INFO "mpic: requesting IPIs ... \n"); - for (i = 0; i < 4; i++) { - unsigned int vipi = irq_create_mapping(mpic->irqhost, - MPIC_VEC_IPI_0 + i); - if (vipi == NO_IRQ) { - printk(KERN_ERR "Failed to map IPI %d\n", i); - break; - } - request_irq(vipi, mpic_ipi_action, IRQF_DISABLED, - ipi_names[i], mpic); - } + BUG_ON(mpic == NULL); + + printk("requesting IPIs ... \n"); + + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ + request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, + "IPI0 (call function)", mpic); + request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, + "IPI1 (reschedule)", mpic); + request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, + "IPI2 (unused)", mpic); + request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, + "IPI3 (debugger break)", mpic); + + printk("IPIs requested... \n"); } void smp_mpic_message_pass(int target, int msg) diff --git a/arch/powerpc/sysdev/todc.c b/arch/powerpc/sysdev/todc.c deleted file mode 100644 index 0a65980ef..000000000 --- a/arch/powerpc/sysdev/todc.c +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 - * Real Time Clocks/Timekeepers. - * - * Author: Mark A. Greer - * - * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * Depending on the hardware on your board and your board design, the - * RTC/NVRAM may be accessed either directly (like normal memory) or via - * address/data registers. If your board uses the direct method, set - * 'nvram_data' to the base address of your nvram and leave 'nvram_as0' and - * 'nvram_as1' NULL. If your board uses address/data regs to access nvram, - * set 'nvram_as0' to the address of the lower byte, set 'nvram_as1' to the - * address of the upper byte (leave NULL if using mc146818), and set - * 'nvram_data' to the address of the 8-bit data register. - * - * Note: Even though the documentation for the various RTC chips say that it - * take up to a second before it starts updating once the 'R' bit is - * cleared, they always seem to update even though we bang on it many - * times a second. This is true, except for the Dallas Semi 1746/1747 - * (possibly others). Those chips seem to have a real problem whenever - * we set the 'R' bit before reading them, they basically stop counting. - * --MAG - */ - -/* - * 'todc_info' should be initialized in your *_setup.c file to - * point to a fully initialized 'todc_info_t' structure. - * This structure holds all the register offsets for your particular - * TODC/RTC chip. - * TODC_ALLOC()/TODC_INIT() will allocate and initialize this table for you. - */ - -#ifdef RTC_FREQ_SELECT -#undef RTC_FREQ_SELECT -#define RTC_FREQ_SELECT control_b /* Register A */ -#endif - -#ifdef RTC_CONTROL -#undef RTC_CONTROL -#define RTC_CONTROL control_a /* Register B */ -#endif - -#ifdef RTC_INTR_FLAGS -#undef RTC_INTR_FLAGS -#define RTC_INTR_FLAGS watchdog /* Register C */ -#endif - -#ifdef RTC_VALID -#undef RTC_VALID -#define RTC_VALID interrupts /* Register D */ -#endif - -/* Access routines when RTC accessed directly (like normal memory) */ -u_char -todc_direct_read_val(int addr) -{ - return readb((void __iomem *)(todc_info->nvram_data + addr)); -} - -void -todc_direct_write_val(int addr, unsigned char val) -{ - writeb(val, (void __iomem *)(todc_info->nvram_data + addr)); - return; -} - -/* Access routines for accessing m48txx type chips via addr/data regs */ -u_char -todc_m48txx_read_val(int addr) -{ - outb(addr, todc_info->nvram_as0); - outb(addr>>todc_info->as0_bits, todc_info->nvram_as1); - return inb(todc_info->nvram_data); -} - -void -todc_m48txx_write_val(int addr, unsigned char val) -{ - outb(addr, todc_info->nvram_as0); - outb(addr>>todc_info->as0_bits, todc_info->nvram_as1); - outb(val, todc_info->nvram_data); - return; -} - -/* Access routines for accessing mc146818 type chips via addr/data regs */ -u_char -todc_mc146818_read_val(int addr) -{ - outb_p(addr, todc_info->nvram_as0); - return inb_p(todc_info->nvram_data); -} - -void -todc_mc146818_write_val(int addr, unsigned char val) -{ - outb_p(addr, todc_info->nvram_as0); - outb_p(val, todc_info->nvram_data); -} - - -/* - * Routines to make RTC chips with NVRAM buried behind an addr/data pair - * have the NVRAM and clock regs appear at the same level. - * The NVRAM will appear to start at addr 0 and the clock regs will appear - * to start immediately after the NVRAM (actually, start at offset - * todc_info->nvram_size). - */ -static inline u_char -todc_read_val(int addr) -{ - u_char val; - - if (todc_info->sw_flags & TODC_FLAG_2_LEVEL_NVRAM) { - if (addr < todc_info->nvram_size) { /* NVRAM */ - ppc_md.rtc_write_val(todc_info->nvram_addr_reg, addr); - val = ppc_md.rtc_read_val(todc_info->nvram_data_reg); - } else { /* Clock Reg */ - addr -= todc_info->nvram_size; - val = ppc_md.rtc_read_val(addr); - } - } else - val = ppc_md.rtc_read_val(addr); - - return val; -} - -static inline void -todc_write_val(int addr, u_char val) -{ - if (todc_info->sw_flags & TODC_FLAG_2_LEVEL_NVRAM) { - if (addr < todc_info->nvram_size) { /* NVRAM */ - ppc_md.rtc_write_val(todc_info->nvram_addr_reg, addr); - ppc_md.rtc_write_val(todc_info->nvram_data_reg, val); - } else { /* Clock Reg */ - addr -= todc_info->nvram_size; - ppc_md.rtc_write_val(addr, val); - } - } else - ppc_md.rtc_write_val(addr, val); -} - -/* - * TODC routines - * - * There is some ugly stuff in that there are assumptions for the mc146818. - * - * Assumptions: - * - todc_info->control_a has the offset as mc146818 Register B reg - * - todc_info->control_b has the offset as mc146818 Register A reg - * - m48txx control reg's write enable or 'W' bit is same as - * mc146818 Register B 'SET' bit (i.e., 0x80) - * - * These assumptions were made to make the code simpler. - */ -long __init -todc_time_init(void) -{ - u_char cntl_b; - - if (!ppc_md.rtc_read_val) - ppc_md.rtc_read_val = ppc_md.nvram_read_val; - if (!ppc_md.rtc_write_val) - ppc_md.rtc_write_val = ppc_md.nvram_write_val; - - cntl_b = todc_read_val(todc_info->control_b); - - if (todc_info->rtc_type == TODC_TYPE_MC146818) { - if ((cntl_b & 0x70) != 0x20) { - printk(KERN_INFO "TODC real-time-clock was stopped." - " Now starting..."); - cntl_b &= ~0x70; - cntl_b |= 0x20; - } - - todc_write_val(todc_info->control_b, cntl_b); - } else if (todc_info->rtc_type == TODC_TYPE_DS17285) { - u_char mode; - - mode = todc_read_val(TODC_TYPE_DS17285_CNTL_A); - /* Make sure countdown clear is not set */ - mode &= ~0x40; - /* Enable oscillator, extended register set */ - mode |= 0x30; - todc_write_val(TODC_TYPE_DS17285_CNTL_A, mode); - - } else if (todc_info->rtc_type == TODC_TYPE_DS1501) { - u_char month; - - todc_info->enable_read = TODC_DS1501_CNTL_B_TE; - todc_info->enable_write = TODC_DS1501_CNTL_B_TE; - - month = todc_read_val(todc_info->month); - - if ((month & 0x80) == 0x80) { - printk(KERN_INFO "TODC %s %s\n", - "real-time-clock was stopped.", - "Now starting..."); - month &= ~0x80; - todc_write_val(todc_info->month, month); - } - - cntl_b &= ~TODC_DS1501_CNTL_B_TE; - todc_write_val(todc_info->control_b, cntl_b); - } else { /* must be a m48txx type */ - u_char cntl_a; - - todc_info->enable_read = TODC_MK48TXX_CNTL_A_R; - todc_info->enable_write = TODC_MK48TXX_CNTL_A_W; - - cntl_a = todc_read_val(todc_info->control_a); - - /* Check & clear STOP bit in control B register */ - if (cntl_b & TODC_MK48TXX_DAY_CB) { - printk(KERN_INFO "TODC %s %s\n", - "real-time-clock was stopped.", - "Now starting..."); - - cntl_a |= todc_info->enable_write; - cntl_b &= ~TODC_MK48TXX_DAY_CB;/* Start Oscil */ - - todc_write_val(todc_info->control_a, cntl_a); - todc_write_val(todc_info->control_b, cntl_b); - } - - /* Make sure READ & WRITE bits are cleared. */ - cntl_a &= ~(todc_info->enable_write | todc_info->enable_read); - todc_write_val(todc_info->control_a, cntl_a); - } - - return 0; -} - -/* - * There is some ugly stuff in that there are assumptions that for a mc146818, - * the todc_info->control_a has the offset of the mc146818 Register B reg and - * that the register'ss 'SET' bit is the same as the m48txx's write enable - * bit in the control register of the m48txx (i.e., 0x80). - * - * It was done to make the code look simpler. - */ -void -todc_get_rtc_time(struct rtc_time *tm) -{ - uint year = 0, mon = 0, mday = 0, hour = 0, min = 0, sec = 0; - uint limit, i; - u_char save_control, uip = 0; - extern void GregorianDay(struct rtc_time *); - - spin_lock(&rtc_lock); - save_control = todc_read_val(todc_info->control_a); - - if (todc_info->rtc_type != TODC_TYPE_MC146818) { - limit = 1; - - switch (todc_info->rtc_type) { - case TODC_TYPE_DS1553: - case TODC_TYPE_DS1557: - case TODC_TYPE_DS1743: - case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ - case TODC_TYPE_DS1747: - case TODC_TYPE_DS17285: - break; - default: - todc_write_val(todc_info->control_a, - (save_control | todc_info->enable_read)); - } - } else - limit = 100000000; - - for (i=0; irtc_type == TODC_TYPE_MC146818) - uip = todc_read_val(todc_info->RTC_FREQ_SELECT); - - sec = todc_read_val(todc_info->seconds) & 0x7f; - min = todc_read_val(todc_info->minutes) & 0x7f; - hour = todc_read_val(todc_info->hours) & 0x3f; - mday = todc_read_val(todc_info->day_of_month) & 0x3f; - mon = todc_read_val(todc_info->month) & 0x1f; - year = todc_read_val(todc_info->year) & 0xff; - - if (todc_info->rtc_type == TODC_TYPE_MC146818) { - uip |= todc_read_val(todc_info->RTC_FREQ_SELECT); - if ((uip & RTC_UIP) == 0) - break; - } - } - - if (todc_info->rtc_type != TODC_TYPE_MC146818) { - switch (todc_info->rtc_type) { - case TODC_TYPE_DS1553: - case TODC_TYPE_DS1557: - case TODC_TYPE_DS1743: - case TODC_TYPE_DS1746: /* XXXX BAD HACK -> FIX */ - case TODC_TYPE_DS1747: - case TODC_TYPE_DS17285: - break; - default: - save_control &= ~(todc_info->enable_read); - todc_write_val(todc_info->control_a, save_control); - } - } - spin_unlock(&rtc_lock); - - if ((todc_info->rtc_type != TODC_TYPE_MC146818) - || ((save_control & RTC_DM_BINARY) == 0) - || RTC_ALWAYS_BCD) { - BCD_TO_BIN(sec); - BCD_TO_BIN(min); - BCD_TO_BIN(hour); - BCD_TO_BIN(mday); - BCD_TO_BIN(mon); - BCD_TO_BIN(year); - } - - if ((year + 1900) < 1970) { - year += 100; - } - - tm->tm_sec = sec; - tm->tm_min = min; - tm->tm_hour = hour; - tm->tm_mday = mday; - tm->tm_mon = mon; - tm->tm_year = year; - - GregorianDay(tm); -} - -int -todc_set_rtc_time(struct rtc_time *tm) -{ - u_char save_control, save_freq_select = 0; - - spin_lock(&rtc_lock); - save_control = todc_read_val(todc_info->control_a); - - /* Assuming MK48T59_RTC_CA_WRITE & RTC_SET are equal */ - todc_write_val(todc_info->control_a, - (save_control | todc_info->enable_write)); - save_control &= ~(todc_info->enable_write); /* in case it was set */ - - if (todc_info->rtc_type == TODC_TYPE_MC146818) { - save_freq_select = todc_read_val(todc_info->RTC_FREQ_SELECT); - todc_write_val(todc_info->RTC_FREQ_SELECT, - save_freq_select | RTC_DIV_RESET2); - } - - if ((todc_info->rtc_type != TODC_TYPE_MC146818) - || ((save_control & RTC_DM_BINARY) == 0) - || RTC_ALWAYS_BCD) { - BIN_TO_BCD(tm->tm_sec); - BIN_TO_BCD(tm->tm_min); - BIN_TO_BCD(tm->tm_hour); - BIN_TO_BCD(tm->tm_mon); - BIN_TO_BCD(tm->tm_mday); - BIN_TO_BCD(tm->tm_year); - } - - todc_write_val(todc_info->seconds, tm->tm_sec); - todc_write_val(todc_info->minutes, tm->tm_min); - todc_write_val(todc_info->hours, tm->tm_hour); - todc_write_val(todc_info->month, tm->tm_mon); - todc_write_val(todc_info->day_of_month, tm->tm_mday); - todc_write_val(todc_info->year, tm->tm_year); - - todc_write_val(todc_info->control_a, save_control); - - if (todc_info->rtc_type == TODC_TYPE_MC146818) - todc_write_val(todc_info->RTC_FREQ_SELECT, save_freq_select); - - spin_unlock(&rtc_lock); - return 0; -} diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c deleted file mode 100644 index 11de090eb..000000000 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * tsi108/109 device setup code - * - * Maintained by Roy Zang < tie-fei.zang@freescale.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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt...) do { printk(fmt); } while(0) -#else -#define DBG(fmt...) do { } while(0) -#endif - -static phys_addr_t tsi108_csr_base = -1; - -phys_addr_t get_csrbase(void) -{ - struct device_node *tsi; - - if (tsi108_csr_base != -1) - return tsi108_csr_base; - - tsi = of_find_node_by_type(NULL, "tsi-bridge"); - if (tsi) { - unsigned int size; - void *prop = get_property(tsi, "reg", &size); - tsi108_csr_base = of_translate_address(tsi, prop); - of_node_put(tsi); - }; - return tsi108_csr_base; -} - -u32 get_vir_csrbase(void) -{ - return (u32) (ioremap(get_csrbase(), 0x10000)); -} - -EXPORT_SYMBOL(get_csrbase); -EXPORT_SYMBOL(get_vir_csrbase); - -static int __init tsi108_eth_of_init(void) -{ - struct device_node *np; - unsigned int i; - struct platform_device *tsi_eth_dev; - struct resource res; - int ret; - - for (np = NULL, i = 0; - (np = of_find_compatible_node(np, "network", "tsi-ethernet")) != NULL; - i++) { - struct resource r[2]; - struct device_node *phy; - hw_info tsi_eth_data; - unsigned int *id; - unsigned int *phy_id; - void *mac_addr; - phandle *ph; - - memset(r, 0, sizeof(r)); - memset(&tsi_eth_data, 0, sizeof(tsi_eth_data)); - - ret = of_address_to_resource(np, 0, &r[0]); - DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", - __FUNCTION__,r[0].name, r[0].start, r[0].end); - if (ret) - goto err; - - r[1].name = "tx"; - r[1].start = irq_of_parse_and_map(np, 0); - r[1].end = irq_of_parse_and_map(np, 0); - r[1].flags = IORESOURCE_IRQ; - DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", - __FUNCTION__,r[1].name, r[1].start, r[1].end); - - tsi_eth_dev = - platform_device_register_simple("tsi-ethernet", i, &r[0], - 1); - - if (IS_ERR(tsi_eth_dev)) { - ret = PTR_ERR(tsi_eth_dev); - goto err; - } - - mac_addr = get_property(np, "address", NULL); - memcpy(tsi_eth_data.mac_addr, mac_addr, 6); - - ph = (phandle *) get_property(np, "phy-handle", NULL); - phy = of_find_node_by_phandle(*ph); - - if (phy == NULL) { - ret = -ENODEV; - goto unreg; - } - - id = (u32 *) get_property(phy, "reg", NULL); - phy_id = (u32 *) get_property(phy, "phy-id", NULL); - ret = of_address_to_resource(phy, 0, &res); - if (ret) { - of_node_put(phy); - goto unreg; - } - tsi_eth_data.regs = r[0].start; - tsi_eth_data.phyregs = res.start; - tsi_eth_data.phy = *phy_id; - tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); - of_node_put(phy); - ret = - platform_device_add_data(tsi_eth_dev, &tsi_eth_data, - sizeof(hw_info)); - if (ret) - goto unreg; - } - return 0; -unreg: - platform_device_unregister(tsi_eth_dev); -err: - return ret; -} - -arch_initcall(tsi108_eth_of_init); diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c deleted file mode 100644 index 2ab06ed3a..000000000 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Common routines for Tundra Semiconductor TSI108 host bridge. - * - * 2004-2005 (c) Tundra Semiconductor Corp. - * Author: Alex Bounine (alexandreb@tundra.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. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef DEBUG -#ifdef DEBUG -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif - -#define tsi_mk_config_addr(bus, devfunc, offset) \ - ((((bus)<<16) | ((devfunc)<<8) | (offset & 0xfc)) + tsi108_pci_cfg_base) - -u32 tsi108_pci_cfg_base; -u32 tsi108_csr_vir_base; - -extern u32 get_vir_csrbase(void); -extern u32 tsi108_read_reg(u32 reg_offset); -extern void tsi108_write_reg(u32 reg_offset, u32 val); - -int -tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfunc, - int offset, int len, u32 val) -{ - volatile unsigned char *cfg_addr; - - if (ppc_md.pci_exclude_device) - if (ppc_md.pci_exclude_device(bus->number, devfunc)) - return PCIBIOS_DEVICE_NOT_FOUND; - - cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, - devfunc, offset) | - (offset & 0x03)); - -#ifdef DEBUG - printk("PCI CFG write : "); - printk("%d:0x%x:0x%x ", bus->number, devfunc, offset); - printk("%d ADDR=0x%08x ", len, (uint) cfg_addr); - printk("data = 0x%08x\n", val); -#endif - - switch (len) { - case 1: - out_8((u8 *) cfg_addr, val); - break; - case 2: - out_le16((u16 *) cfg_addr, val); - break; - default: - out_le32((u32 *) cfg_addr, val); - break; - } - - return PCIBIOS_SUCCESSFUL; -} - -void tsi108_clear_pci_error(u32 pci_cfg_base) -{ - u32 err_stat, err_addr, pci_stat; - - /* - * Quietly clear PB and PCI error flags set as result - * of PCI/X configuration read requests. - */ - - /* Read PB Error Log Registers */ - - err_stat = tsi108_read_reg(TSI108_PB_OFFSET + TSI108_PB_ERRCS); - err_addr = tsi108_read_reg(TSI108_PB_OFFSET + TSI108_PB_AERR); - - if (err_stat & TSI108_PB_ERRCS_ES) { - /* Clear error flag */ - tsi108_write_reg(TSI108_PB_OFFSET + TSI108_PB_ERRCS, - TSI108_PB_ERRCS_ES); - - /* Clear read error reported in PB_ISR */ - tsi108_write_reg(TSI108_PB_OFFSET + TSI108_PB_ISR, - TSI108_PB_ISR_PBS_RD_ERR); - - /* Clear PCI/X bus cfg errors if applicable */ - if ((err_addr & 0xFF000000) == pci_cfg_base) { - pci_stat = - tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_CSR); - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_CSR, - pci_stat); - } - } - - return; -} - -#define __tsi108_read_pci_config(x, addr, op) \ - __asm__ __volatile__( \ - " "op" %0,0,%1\n" \ - "1: eieio\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: li %0,-1\n" \ - " b 2b\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 2\n" \ - " .long 1b,3b\n" \ - ".text" \ - : "=r"(x) : "r"(addr)) - -int -tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset, - int len, u32 * val) -{ - volatile unsigned char *cfg_addr; - u32 temp; - - if (ppc_md.pci_exclude_device) - if (ppc_md.pci_exclude_device(bus->number, devfn)) - return PCIBIOS_DEVICE_NOT_FOUND; - - cfg_addr = (unsigned char *)(tsi_mk_config_addr(bus->number, - devfn, - offset) | (offset & - 0x03)); - - switch (len) { - case 1: - __tsi108_read_pci_config(temp, cfg_addr, "lbzx"); - break; - case 2: - __tsi108_read_pci_config(temp, cfg_addr, "lhbrx"); - break; - default: - __tsi108_read_pci_config(temp, cfg_addr, "lwbrx"); - break; - } - - *val = temp; - -#ifdef DEBUG - if ((0xFFFFFFFF != temp) && (0xFFFF != temp) && (0xFF != temp)) { - printk("PCI CFG read : "); - printk("%d:0x%x:0x%x ", bus->number, devfn, offset); - printk("%d ADDR=0x%08x ", len, (uint) cfg_addr); - printk("data = 0x%x\n", *val); - } -#endif - return PCIBIOS_SUCCESSFUL; -} - -void tsi108_clear_pci_cfg_error(void) -{ - tsi108_clear_pci_error(TSI108_PCI_CFG_BASE_PHYS); -} - -static struct pci_ops tsi108_direct_pci_ops = { - tsi108_direct_read_config, - tsi108_direct_write_config -}; - -int __init tsi108_setup_pci(struct device_node *dev) -{ - int len; - struct pci_controller *hose; - struct resource rsrc; - int *bus_range; - int primary = 0, has_address = 0; - - /* PCI Config mapping */ - tsi108_pci_cfg_base = (u32)ioremap(TSI108_PCI_CFG_BASE_PHYS, - TSI108_PCI_CFG_SIZE); - DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __FUNCTION__, - tsi108_pci_cfg_base); - - /* Fetch host bridge registers address */ - has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); - - /* Get bus range if any */ - bus_range = (int *)get_property(dev, "bus-range", &len); - if (bus_range == NULL || len < 2 * sizeof(int)) { - printk(KERN_WARNING "Can't get bus-range for %s, assume" - " bus 0\n", dev->full_name); - } - - hose = pcibios_alloc_controller(); - - if (!hose) { - printk("PCI Host bridge init failed\n"); - return -ENOMEM; - } - hose->arch_data = dev; - hose->set_cfg_type = 1; - - hose->first_busno = bus_range ? bus_range[0] : 0; - hose->last_busno = bus_range ? bus_range[1] : 0xff; - - (hose)->ops = &tsi108_direct_pci_ops; - - printk(KERN_INFO "Found tsi108 PCI host bridge at 0x%08x. " - "Firmware bus number: %d->%d\n", - rsrc.start, hose->first_busno, hose->last_busno); - - /* Interpret the "ranges" property */ - /* This also maps the I/O region and sets isa_io/mem_base */ - pci_process_bridge_OF_ranges(hose, dev, primary); - return 0; -} - -/* - * Low level utility functions - */ - -static void tsi108_pci_int_mask(u_int irq) -{ - u_int irp_cfg; - int int_line = (irq - IRQ_PCI_INTAD_BASE); - - irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL); - mb(); - irp_cfg |= (1 << int_line); /* INTx_DIR = output */ - irp_cfg &= ~(3 << (8 + (int_line * 2))); /* INTx_TYPE = unused */ - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg); - mb(); - irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL); -} - -static void tsi108_pci_int_unmask(u_int irq) -{ - u_int irp_cfg; - int int_line = (irq - IRQ_PCI_INTAD_BASE); - - irp_cfg = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL); - mb(); - irp_cfg &= ~(1 << int_line); - irp_cfg |= (3 << (8 + (int_line * 2))); - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, irp_cfg); - mb(); -} - -static void init_pci_source(void) -{ - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL, - 0x0000ff00); - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE, - TSI108_PCI_IRP_ENABLE_P_INT); - mb(); -} - -static inline unsigned int get_pci_source(void) -{ - u_int temp = 0; - int irq = -1; - int i; - u_int pci_irp_stat; - static int mask = 0; - - /* Read PCI/X block interrupt status register */ - pci_irp_stat = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_STAT); - mb(); - - if (pci_irp_stat & TSI108_PCI_IRP_STAT_P_INT) { - /* Process Interrupt from PCI bus INTA# - INTD# lines */ - temp = - tsi108_read_reg(TSI108_PCI_OFFSET + - TSI108_PCI_IRP_INTAD) & 0xf; - mb(); - for (i = 0; i < 4; i++, mask++) { - if (temp & (1 << mask % 4)) { - irq = IRQ_PCI_INTA + mask % 4; - mask++; - break; - } - } - - /* Disable interrupts from PCI block */ - temp = tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE); - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE, - temp & ~TSI108_PCI_IRP_ENABLE_P_INT); - mb(); - (void)tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE); - mb(); - } -#ifdef DEBUG - else { - printk("TSI108_PIC: error in TSI108_PCI_IRP_STAT\n"); - pci_irp_stat = - tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_STAT); - temp = - tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_INTAD); - mb(); - printk(">> stat=0x%08x intad=0x%08x ", pci_irp_stat, temp); - temp = - tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_CFG_CTL); - mb(); - printk("cfg_ctl=0x%08x ", temp); - temp = - tsi108_read_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE); - mb(); - printk("irp_enable=0x%08x\n", temp); - } -#endif /* end of DEBUG */ - - return irq; -} - - -/* - * Linux descriptor level callbacks - */ - -static void tsi108_pci_irq_enable(u_int irq) -{ - tsi108_pci_int_unmask(irq); -} - -static void tsi108_pci_irq_disable(u_int irq) -{ - tsi108_pci_int_mask(irq); -} - -static void tsi108_pci_irq_ack(u_int irq) -{ - tsi108_pci_int_mask(irq); -} - -static void tsi108_pci_irq_end(u_int irq) -{ - tsi108_pci_int_unmask(irq); - - /* Enable interrupts from PCI block */ - tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE, - tsi108_read_reg(TSI108_PCI_OFFSET + - TSI108_PCI_IRP_ENABLE) | - TSI108_PCI_IRP_ENABLE_P_INT); - mb(); -} - -/* - * Interrupt controller descriptor for cascaded PCI interrupt controller. - */ - -static struct irq_chip tsi108_pci_irq = { - .typename = "tsi108_PCI_int", - .mask = tsi108_pci_irq_disable, - .ack = tsi108_pci_irq_ack, - .end = tsi108_pci_irq_end, - .unmask = tsi108_pci_irq_enable, -}; - -/* - * Exported functions - */ - -/* - * The Tsi108 PCI interrupts initialization routine. - * - * The INTA# - INTD# interrupts on the PCI bus are reported by the PCI block - * to the MPIC using single interrupt source (IRQ_TSI108_PCI). Therefore the - * PCI block has to be treated as a cascaded interrupt controller connected - * to the MPIC. - */ - -void __init tsi108_pci_int_init(void) -{ - u_int i; - - DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); - - for (i = 0; i < NUM_PCI_IRQS; i++) { - irq_desc[i + IRQ_PCI_INTAD_BASE].chip = &tsi108_pci_irq; - irq_desc[i + IRQ_PCI_INTAD_BASE].status |= IRQ_LEVEL; - } - - init_pci_source(); -} - -void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) -{ - unsigned int cascade_irq = get_pci_source(); - if (cascade_irq != NO_IRQ) - generic_handle_irq(cascade_irq, regs); - desc->chip->eoi(irq); -} diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 179b10ced..4735b41c1 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -25,6 +26,9 @@ #include #include #include +#ifdef CONFIG_PMAC_BACKLIGHT +#include +#endif #include #include #include diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index b81a367dc..98b25fa00 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c @@ -28,6 +28,7 @@ * is compatible with normal ttyS* devices. */ +#include #include #include #include @@ -1757,7 +1758,7 @@ int __init siccuart_init(void) siccnormal_driver->subtype = SERIAL_TYPE_NORMAL; siccnormal_driver->init_termios = tty_std_termios; siccnormal_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; - siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; tty_set_operations(siccnormal_driver, &sicc_ops); if (tty_register_driver(siccnormal_driver)) diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index e347fe883..4edeede9c 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include @@ -2116,7 +2117,7 @@ init_fcc_startup(fcc_info_t *fip, struct net_device *dev) #ifdef PHY_INTERRUPT #ifdef CONFIG_ADS8272 - if (request_irq(PHY_INTERRUPT, mii_link_interrupt, IRQF_SHARED, + if (request_irq(PHY_INTERRUPT, mii_link_interrupt, SA_SHIRQ, "mii", dev) < 0) printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); #else diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 9b3ace262..12b84ca51 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c @@ -187,7 +187,7 @@ cpm_interrupt_init(void) * interrupt vectors */ for ( i = CPM_IRQ_OFFSET ; i < CPM_IRQ_OFFSET + NR_CPM_INTS ; i++ ) - irq_desc[i].chip = &cpm_pic; + irq_desc[i].handler = &cpm_pic; /* Set our interrupt handler with the core CPU. */ if (setup_irq(CPM_INTERRUPT, &cpm_interrupt_irqaction)) diff --git a/arch/ppc/8xx_io/cs4218.h b/arch/ppc/8xx_io/cs4218.h index e5f943045..f1c739225 100644 --- a/arch/ppc/8xx_io/cs4218.h +++ b/arch/ppc/8xx_io/cs4218.h @@ -13,6 +13,7 @@ #define _cs4218_h_ #include +#include #define SND_NDEVS 256 /* Number of supported devices */ #define SND_DEV_CTL 0 /* Control port /dev/mixer */ diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c index f5f300fc2..a892356d5 100644 --- a/arch/ppc/8xx_io/cs4218_tdm.c +++ b/arch/ppc/8xx_io/cs4218_tdm.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c index a695375c3..ece6a9fbe 100644 --- a/arch/ppc/8xx_io/enet.c +++ b/arch/ppc/8xx_io/enet.c @@ -22,6 +22,7 @@ * small packets. * */ +#include #include #include #include diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c index 8b6295bbb..62f68d618 100644 --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c @@ -28,6 +28,7 @@ * Thomas Lange, thomas@corelatus.com */ +#include #include #include #include diff --git a/arch/ppc/8xx_io/micropatch.c b/arch/ppc/8xx_io/micropatch.c index cfad46ba1..312af0776 100644 --- a/arch/ppc/8xx_io/micropatch.c +++ b/arch/ppc/8xx_io/micropatch.c @@ -4,6 +4,7 @@ * also relocates SMC2, but this would require additional changes * to uart.c, so I am holding off on that for a moment. */ +#include #include #include #include diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index f0d02a8d1..a9be5ac40 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -40,10 +40,6 @@ config GENERIC_NVRAM bool default y -config GENERIC_FIND_NEXT_BIT - bool - default y - config SCHED_NO_NO_OMIT_FRAME_POINTER bool default y @@ -219,10 +215,10 @@ config KEXEC help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is independent of the system firmware. And like a reboot + but it is indepedent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. - The name comes from the similarity to the exec system call. + The name comes from the similiarity to the exec system call. It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index 265fcd3c6..b2bba052a 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c @@ -35,6 +35,7 @@ * /Jes */ +#include #include #include #include diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index bc50ed119..bbe47c9bd 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c @@ -12,6 +12,7 @@ * Miscellaneous Amiga stuff */ +#include #include #include #include diff --git a/arch/ppc/amiga/time.c b/arch/ppc/amiga/time.c index 8c880c0ca..0073527a7 100644 --- a/arch/ppc/amiga/time.c +++ b/arch/ppc/amiga/time.c @@ -1,3 +1,4 @@ +#include /* CONFIG_HEARTBEAT */ #include #include #include diff --git a/arch/ppc/boot/common/crt0.S b/arch/ppc/boot/common/crt0.S index 8f0ef04b8..4d31b824b 100644 --- a/arch/ppc/boot/common/crt0.S +++ b/arch/ppc/boot/common/crt0.S @@ -18,6 +18,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include .text diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index 8e1fccd96..073830a85 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c @@ -13,6 +13,7 @@ */ #include /* for va_ bits */ +#include #include #include #include "nonstdio.h" diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index fc5b72041..4f00c93ac 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c @@ -2,6 +2,7 @@ * COM1 NS16550 support */ +#include #include #include #include diff --git a/arch/ppc/boot/lib/Makefile b/arch/ppc/boot/lib/Makefile index 2f995f712..80c84d562 100644 --- a/arch/ppc/boot/lib/Makefile +++ b/arch/ppc/boot/lib/Makefile @@ -5,7 +5,7 @@ CFLAGS_kbd.o := -Idrivers/char CFLAGS_vreset.o := -Iarch/ppc/boot/include -zlib := inffast.c inflate.c inftrees.c +zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c lib-y += $(zlib:.c=.o) div64.o lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index 840bff2a4..3a51b1062 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #ifdef CONFIG_8xx diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 1b4d7b1d4..160da1006 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S @@ -11,6 +11,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/m8xx_tty.c b/arch/ppc/boot/simple/m8xx_tty.c index cacc40fdb..1d2778e24 100644 --- a/arch/ppc/boot/simple/m8xx_tty.c +++ b/arch/ppc/boot/simple/m8xx_tty.c @@ -8,6 +8,7 @@ * use COM1 instead of SMC1 as the console port. This kinda sucks * for the rest of the kernel, so here we force the use of SMC1 again. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c index 14a4b56d4..b94e142ad 100644 --- a/arch/ppc/boot/simple/misc-chestnut.c +++ b/arch/ppc/boot/simple/misc-chestnut.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c index 10219eeca..3865f3f8d 100644 --- a/arch/ppc/boot/simple/misc-embedded.c +++ b/arch/ppc/boot/simple/misc-embedded.c @@ -6,6 +6,7 @@ * Currently maintained by: Tom Rini */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c index 0b3978632..2678c224a 100644 --- a/arch/ppc/boot/simple/misc-ev64260.c +++ b/arch/ppc/boot/simple/misc-ev64260.c @@ -10,6 +10,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c index 96eaebb78..a212b5b98 100644 --- a/arch/ppc/boot/simple/misc-ev64360.c +++ b/arch/ppc/boot/simple/misc-ev64360.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c index 79a1bbcbc..d97f2ee6f 100644 --- a/arch/ppc/boot/simple/misc-katana.c +++ b/arch/ppc/boot/simple/misc-katana.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 28b310808..71ff20fd4 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c index 0086e1cfb..63def9d13 100644 --- a/arch/ppc/boot/simple/misc-prep.c +++ b/arch/ppc/boot/simple/misc-prep.c @@ -4,6 +4,7 @@ * In the past: Gary Thomas, Cort Dougan */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c index 5b3a6c6f1..0cad2f557 100644 --- a/arch/ppc/boot/simple/misc-spruce.c +++ b/arch/ppc/boot/simple/misc-spruce.c @@ -13,6 +13,7 @@ */ #include +#include #include #include diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c index a5df08963..3d78571ad 100644 --- a/arch/ppc/boot/simple/misc.c +++ b/arch/ppc/boot/simple/misc.c @@ -15,6 +15,7 @@ */ #include +#include #include #include diff --git a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c index 7b5924cc3..1964493cf 100644 --- a/arch/ppc/boot/simple/mpc52xx_tty.c +++ b/arch/ppc/boot/simple/mpc52xx_tty.c @@ -9,6 +9,7 @@ * "as is" without any warranty of any kind, whether express or implied. */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c index 781e040a9..0c52f5c78 100644 --- a/arch/ppc/boot/simple/mv64x60_tty.c +++ b/arch/ppc/boot/simple/mv64x60_tty.c @@ -12,6 +12,7 @@ /* This code assumes that the data cache has been disabled (L1, L2, L3). */ +#include #include #include #include diff --git a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c index 6ff270159..3f2ed53f7 100644 --- a/arch/ppc/boot/simple/openbios.c +++ b/arch/ppc/boot/simple/openbios.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/arch/ppc/boot/simple/pibs.c b/arch/ppc/boot/simple/pibs.c index f39d01e06..67222d57c 100644 --- a/arch/ppc/boot/simple/pibs.c +++ b/arch/ppc/boot/simple/pibs.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S index 0c021556d..2533113c1 100644 --- a/arch/ppc/boot/simple/relocate.S +++ b/arch/ppc/boot/simple/relocate.S @@ -13,6 +13,7 @@ * or implied. */ +#include #include #include diff --git a/arch/ppc/configs/prep_defconfig b/arch/ppc/configs/prep_defconfig index 0aa333178..4d33bee23 100644 --- a/arch/ppc/configs/prep_defconfig +++ b/arch/ppc/configs/prep_defconfig @@ -1,63 +1,56 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc6 -# Wed Sep 6 15:09:32 2006 +# Linux kernel version: 2.6.13-rc3 +# Wed Jul 13 13:34:24 2005 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_HAVE_DEC_LOCK=y CONFIG_PPC=y CONFIG_PPC32=y CONFIG_GENERIC_NVRAM=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options # CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # -CONFIG_LOCALVERSION="-prep" -CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set +CONFIG_HOTPLUG=y +CONFIG_KOBJECT_UEVENT=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y +CONFIG_CC_ALIGN_FUNCTIONS=0 +CONFIG_CC_ALIGN_LABELS=0 +CONFIG_CC_ALIGN_LOOPS=0 +CONFIG_CC_ALIGN_JUMPS=0 # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set # # Loadable module support @@ -65,68 +58,69 @@ CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y -# -# Block layer -# -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - # # Processor # CONFIG_6xx=y # CONFIG_40x is not set # CONFIG_44x is not set +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set # CONFIG_8xx is not set # CONFIG_E200 is not set # CONFIG_E500 is not set CONFIG_PPC_FPU=y -# CONFIG_ALTIVEC is not set -# CONFIG_TAU is not set +CONFIG_ALTIVEC=y +CONFIG_TAU=y +# CONFIG_TAU_INT is not set +# CONFIG_TAU_AVERAGE is not set # CONFIG_KEXEC is not set -# CONFIG_CPU_FREQ is not set +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=m +CONFIG_CPU_FREQ_STAT_DETAILS=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=m +CONFIG_CPU_FREQ_GOV_USERSPACE=m +CONFIG_CPU_FREQ_GOV_ONDEMAND=m +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m +CONFIG_CPU_FREQ_PMAC=y CONFIG_PPC601_SYNC_FIX=y -# CONFIG_WANT_EARLY_SERIAL is not set +CONFIG_PM=y CONFIG_PPC_STD_MMU=y # # Platform options # -CONFIG_PPC_PREP=y +CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set # CONFIG_KATANA is not set # CONFIG_WILLOW is not set # CONFIG_CPCI690 is not set +# CONFIG_PCORE is not set # CONFIG_POWERPMC250 is not set # CONFIG_CHESTNUT is not set # CONFIG_SPRUCE is not set # CONFIG_HDPU is not set # CONFIG_EV64260 is not set # CONFIG_LOPEC is not set +# CONFIG_MCPN765 is not set # CONFIG_MVME5100 is not set # CONFIG_PPLUS is not set # CONFIG_PRPMC750 is not set # CONFIG_PRPMC800 is not set # CONFIG_SANDPOINT is not set # CONFIG_RADSTONE_PPC7D is not set +# CONFIG_ADIR is not set +# CONFIG_K2 is not set # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set # CONFIG_EST8260 is not set @@ -138,7 +132,10 @@ CONFIG_PPC_PREP=y # CONFIG_PQ2FADS is not set # CONFIG_LITE5200 is not set # CONFIG_MPC834x_SYS is not set -# CONFIG_EV64360 is not set +CONFIG_PPC_CHRP=y +CONFIG_PPC_PMAC=y +CONFIG_PPC_PREP=y +CONFIG_PPC_OF=y CONFIG_PPCBUG_NVRAM=y # CONFIG_SMP is not set # CONFIG_HIGHMEM is not set @@ -155,16 +152,12 @@ CONFIG_FLATMEM_MANUAL=y # CONFIG_SPARSEMEM_MANUAL is not set CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m +CONFIG_PROC_DEVICETREE=y CONFIG_PREP_RESIDUAL=y CONFIG_PROC_PREPRESIDUAL=y # CONFIG_CMDLINE_BOOL is not set -CONFIG_PM=y -# CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" @@ -176,10 +169,10 @@ CONFIG_ISA_DMA_API=y # CONFIG_ISA=y CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_I8259=y -CONFIG_PPC_INDIRECT_PCI=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_LEGACY_PROC is not set +# CONFIG_PCI_NAMES is not set # CONFIG_PCI_DEBUG is not set # @@ -194,11 +187,6 @@ CONFIG_CARDBUS=y # PC-card bridges # CONFIG_YENTA=m -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y CONFIG_PCMCIA_PROBE=y CONFIG_PCCARD_NONSTATIC=m @@ -224,7 +212,6 @@ CONFIG_NET=y # # Networking options # -# CONFIG_NETDEBUG is not set CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y @@ -242,11 +229,9 @@ CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_DIAG is not set +CONFIG_IP_TCPDIAG=y +# CONFIG_IP_TCPDIAG_IPV6 is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y @@ -255,77 +240,80 @@ CONFIG_TCP_CONG_BIC=y # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - # # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=m # CONFIG_IP_NF_CT_ACCT is not set CONFIG_IP_NF_CONNTRACK_MARK=y -# CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CONNTRACK_NETLINK is not set # CONFIG_IP_NF_CT_PROTO_SCTP is not set CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m -# CONFIG_IP_NF_PPTP is not set -# CONFIG_IP_NF_H323 is not set -# CONFIG_IP_NF_SIP is not set CONFIG_IP_NF_QUEUE=m -# CONFIG_IP_NF_IPTABLES is not set -# CONFIG_IP_NF_ARPTABLES is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_LIMIT=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_MAC=m +CONFIG_IP_NF_MATCH_PKTTYPE=m +CONFIG_IP_NF_MATCH_MARK=m +CONFIG_IP_NF_MATCH_MULTIPORT=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH_ESP=m +CONFIG_IP_NF_MATCH_LENGTH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_TCPMSS=m +CONFIG_IP_NF_MATCH_HELPER=m +CONFIG_IP_NF_MATCH_STATE=m +CONFIG_IP_NF_MATCH_CONNTRACK=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m +CONFIG_IP_NF_MATCH_SCTP=m +CONFIG_IP_NF_MATCH_COMMENT=m +CONFIG_IP_NF_MATCH_CONNMARK=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_MARK=m +CONFIG_IP_NF_TARGET_CLASSIFY=m +CONFIG_IP_NF_TARGET_CONNMARK=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_TARGET_NOTRACK=m +CONFIG_IP_NF_ARPTABLES=m +# CONFIG_IP_NF_ARPFILTER is not set +# CONFIG_IP_NF_ARP_MANGLE is not set # # SCTP Configuration (EXPERIMENTAL) # # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set @@ -338,10 +326,6 @@ CONFIG_IP_NF_QUEUE=m # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# # CONFIG_NET_SCHED is not set CONFIG_NET_CLS_ROUTE=y @@ -349,11 +333,13 @@ CONFIG_NET_CLS_ROUTE=y # Network testing # # CONFIG_NET_PKTGEN is not set +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_IEEE80211 is not set -CONFIG_WIRELESS_EXT=y # # Device Drivers @@ -366,12 +352,6 @@ CONFIG_WIRELESS_EXT=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set # # Memory Technology Devices (MTD) @@ -387,7 +367,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_FIFO=y CONFIG_PARPORT_PC_SUPERIO=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -399,6 +378,7 @@ CONFIG_PARPORT_1284=y # Block devices # CONFIG_BLK_DEV_FD=m +CONFIG_MAC_FLOPPY=m # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set @@ -414,9 +394,18 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_LBD=y # CONFIG_CDROM_PKTCDVD is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # CONFIG_ATA_OVER_ETH is not set # @@ -433,7 +422,7 @@ CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set +CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=y # CONFIG_IDE_TASK_IOCTL is not set @@ -446,7 +435,7 @@ 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_SL82C105=y +# CONFIG_BLK_DEV_SL82C105 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y @@ -454,7 +443,7 @@ CONFIG_IDEDMA_PCI_AUTO=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_CMD64X=y # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5520 is not set @@ -466,12 +455,17 @@ CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_BLK_DEV_IT821X 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_PDC202XX_NEW=y +# CONFIG_PDC202XX_FORCE 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_IDE_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y +CONFIG_BLK_DEV_IDEDMA_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_BLINK=y # CONFIG_IDE_ARM is not set # CONFIG_IDE_CHIPSETS is not set CONFIG_BLK_DEV_IDEDMA=y @@ -482,7 +476,6 @@ CONFIG_IDEDMA_AUTO=y # # SCSI device support # -# CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y CONFIG_SCSI_PROC_FS=y @@ -510,12 +503,10 @@ CONFIG_SCSI_LOGGING=y CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set # # SCSI low-level drivers # -# CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_7000FASST is not set @@ -523,16 +514,19 @@ CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AACRAID is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC7XXX_OLD is not set +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +CONFIG_AIC7XXX_DEBUG_ENABLE=y +CONFIG_AIC7XXX_DEBUG_MASK=0 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y +CONFIG_SCSI_AIC7XXX_OLD=m # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set -# CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_DTC3280 is not set @@ -551,13 +545,19 @@ CONFIG_SCSI_SYM53C8XX_2=y CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PSI240I is not set # CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_QLA_FC is not set +CONFIG_SCSI_QLA2XXX=y +# CONFIG_SCSI_QLA21XX is not set +# CONFIG_SCSI_QLA22XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC395x is not set @@ -566,6 +566,10 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set +CONFIG_SCSI_MESH=y +CONFIG_SCSI_MESH_SYNC_RATE=5 +CONFIG_SCSI_MESH_RESET_DELAY_MS=4000 +CONFIG_SCSI_MAC53C94=y # # Old CD-ROM drivers (not SCSI, not IDE) @@ -583,7 +587,6 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_FUSION is not set # CONFIG_FUSION_SPI is not set # CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -610,9 +613,12 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m +CONFIG_IEEE1394_CMP=m +CONFIG_IEEE1394_AMDTP=m # # I2O device support @@ -622,7 +628,18 @@ CONFIG_IEEE1394_RAWIO=m # # Macintosh device drivers # -# CONFIG_WINDFARM is not set +CONFIG_ADB=y +CONFIG_ADB_CUDA=y +CONFIG_ADB_PMU=y +CONFIG_PMAC_APM_EMU=y +CONFIG_PMAC_MEDIABAY=y +CONFIG_PMAC_BACKLIGHT=y +CONFIG_ADB_MACIO=y +CONFIG_INPUT_ADBHID=y +CONFIG_MAC_EMUMOUSEBTN=y +CONFIG_THERM_WINDTUNNEL=m +CONFIG_THERM_ADT746X=m +# CONFIG_ANSLCD is not set # # Network device support @@ -638,19 +655,16 @@ CONFIG_TUN=m # # CONFIG_ARCNET is not set -# -# PHY device support -# -# CONFIG_PHYLIB is not set - # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y +CONFIG_MACE=y +# CONFIG_MACE_AAUI_PORT is not set +CONFIG_BMAC=y # CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set +CONFIG_SUNGEM=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_LANCE is not set # CONFIG_NET_VENDOR_SMC is not set @@ -668,7 +682,6 @@ CONFIG_TULIP_MMIO=y CONFIG_DE4X5=m # CONFIG_WINBOND_840 is not set # CONFIG_DM9102 is not set -# CONFIG_ULI526X is not set # CONFIG_PCMCIA_XIRCOM is not set # CONFIG_PCMCIA_XIRTULIP is not set # CONFIG_AT1700 is not set @@ -709,21 +722,18 @@ CONFIG_PCNET32=y # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SKGE is not set -# CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2 is not set +# CONFIG_MV643XX_ETH is not set # # Ethernet (10000 Mbit) # -# CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -734,7 +744,6 @@ CONFIG_PCNET32=y # Wireless LAN (non-hamradio) # CONFIG_NET_RADIO=y -# CONFIG_NET_WIRELESS_RTNETLINK is not set # # Obsolete Wireless cards support (pre-802.11) @@ -746,13 +755,11 @@ CONFIG_NET_RADIO=y # # Wireless 802.11b ISA/PCI cards support # -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set # CONFIG_AIRO is not set CONFIG_HERMES=m +CONFIG_APPLE_AIRPORT=m # CONFIG_PLX_HERMES is not set # CONFIG_TMD_HERMES is not set -# CONFIG_NORTEL_HERMES is not set # CONFIG_PCI_HERMES is not set # CONFIG_ATMEL is not set @@ -760,8 +767,6 @@ CONFIG_HERMES=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # # CONFIG_PRISM54 is not set -# CONFIG_USB_ZD1201 is not set -# CONFIG_HOSTAP is not set CONFIG_NET_WIRELESS=y # @@ -778,16 +783,11 @@ CONFIG_PPP_ASYNC=y # CONFIG_PPP_SYNC_TTY is not set CONFIG_PPP_DEFLATE=y CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set CONFIG_PPPOE=m # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem @@ -835,7 +835,7 @@ CONFIG_MOUSE_PS2=y # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m +# CONFIG_INPUT_PCSPKR is not set CONFIG_INPUT_UINPUT=m # @@ -856,7 +856,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -864,9 +863,7 @@ CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -874,6 +871,8 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_PMACZILOG=y +CONFIG_SERIAL_PMACZILOG_CONSOLE=y # CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y @@ -891,7 +890,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_NVRAM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -902,15 +900,21 @@ CONFIG_GEN_RTC=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_AGP=m +CONFIG_AGP_UNINORTH=m +CONFIG_DRM=m +# CONFIG_DRM_TDFX is not set +CONFIG_DRM_R128=m +CONFIG_DRM_RADEON=m +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set +# CONFIG_DRM_VIA is not set # CONFIG_RAW_DRIVER is not set # # TPM devices # # CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set # # I2C support @@ -934,16 +938,19 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_AMD756 is not set # CONFIG_I2C_AMD8111 is not set # CONFIG_I2C_ELEKTOR is not set +CONFIG_I2C_HYDRA=y # CONFIG_I2C_I801 is not set # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_ISA is not set +CONFIG_I2C_KEYWEST=m # CONFIG_I2C_MPC is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set +# CONFIG_SCx200_ACB is not set # CONFIG_I2C_SIS5595 is not set # CONFIG_I2C_SIS630 is not set # CONFIG_I2C_SIS96X is not set @@ -952,6 +959,7 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set # CONFIG_I2C_PCA_ISA is not set +# CONFIG_I2C_SENSOR is not set # # Miscellaneous I2C Chip support @@ -962,6 +970,7 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set # CONFIG_SENSORS_M41T00 is not set # CONFIG_SENSORS_MAX6875 is not set # CONFIG_I2C_DEBUG_CORE is not set @@ -969,21 +978,15 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # # CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set # # Misc devices @@ -993,36 +996,38 @@ CONFIG_I2C_ALGOBIT=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_SOFT_CURSOR=y +CONFIG_FB_MACMODES=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_CT65550 is not set +CONFIG_FB_OF=y +CONFIG_FB_CONTROL=y +CONFIG_FB_PLATINUM=y +CONFIG_FB_VALKYRIE=y +CONFIG_FB_CT65550=y # CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set +CONFIG_FB_IMSTT=y # CONFIG_FB_VGA16 is not set -# CONFIG_FB_S1D13XXX is not set # CONFIG_FB_NVIDIA is not set -# CONFIG_FB_RIVA is not set +CONFIG_FB_RIVA=y +CONFIG_FB_RIVA_I2C=y +# CONFIG_FB_RIVA_DEBUG is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -1030,27 +1035,34 @@ CONFIG_FB_MATROX_G=y CONFIG_FB_MATROX_I2C=y CONFIG_FB_MATROX_MAVEN=m # CONFIG_FB_MATROX_MULTIHEAD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set +# CONFIG_FB_RADEON_OLD is not set +CONFIG_FB_RADEON=y +CONFIG_FB_RADEON_I2C=y +# CONFIG_FB_RADEON_DEBUG is not set +CONFIG_FB_ATY128=y +CONFIG_FB_ATY=y +CONFIG_FB_ATY_CT=y +CONFIG_FB_ATY_GENERIC_LCD=y +CONFIG_FB_ATY_XL_INIT=y +CONFIG_FB_ATY_GX=y # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set +CONFIG_FB_3DFX=y +# CONFIG_FB_3DFX_ACCEL is not set # CONFIG_FB_VOODOO1 is not set # CONFIG_FB_TRIDENT is not set +# CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y -# CONFIG_VGACON_SOFT_SCROLLBACK is not set # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -1068,6 +1080,8 @@ CONFIG_LOGO_LINUX_CLUT224=y # Sound # CONFIG_SOUND=m +CONFIG_DMASOUND_PMAC=m +CONFIG_DMASOUND=m # # Advanced Linux Sound Architecture @@ -1082,13 +1096,10 @@ CONFIG_SND_SEQUENCER=m CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=m CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y CONFIG_SND_SEQUENCER_OSS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set +CONFIG_SND_GENERIC_PM=y # # Generic devices @@ -1105,9 +1116,7 @@ CONFIG_SND_OPL3_LIB=m # ISA devices # CONFIG_SND_CS4231_LIB=m -# CONFIG_SND_ADLIB is not set # CONFIG_SND_AD1848 is not set -# CONFIG_SND_CMI8330 is not set # CONFIG_SND_CS4231 is not set CONFIG_SND_CS4232=m # CONFIG_SND_CS4236 is not set @@ -1116,24 +1125,23 @@ CONFIG_SND_CS4232=m # CONFIG_SND_GUSCLASSIC is not set # CONFIG_SND_GUSEXTREME is not set # CONFIG_SND_GUSMAX is not set -# CONFIG_SND_OPL3SA2 is not set +# CONFIG_SND_INTERWAVE is not set +# CONFIG_SND_INTERWAVE_STB is not set # CONFIG_SND_OPTI92X_AD1848 is not set # CONFIG_SND_OPTI92X_CS4231 is not set # CONFIG_SND_OPTI93X is not set -# CONFIG_SND_MIRO is not set # CONFIG_SND_SB8 is not set # CONFIG_SND_SB16 is not set # CONFIG_SND_SBAWE is not set +# CONFIG_SND_WAVEFRONT is not set +# CONFIG_SND_CMI8330 is not set +# CONFIG_SND_OPL3SA2 is not set # CONFIG_SND_SGALAXY is not set # CONFIG_SND_SSCAPE is not set -# CONFIG_SND_WAVEFRONT is not set # # PCI devices # -# CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set -# CONFIG_SND_ALS4000 is not set # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set @@ -1142,61 +1150,43 @@ CONFIG_SND_CS4232=m # CONFIG_SND_AU8830 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set -# CONFIG_SND_CA0106 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_CS4281 is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_CMIPCI is not set # CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1371 is not set # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set +# CONFIG_SND_MAESTRO3 is not set # CONFIG_SND_FM801 is not set -# CONFIG_SND_HDA_INTEL is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_HDSPM is not set # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set # CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_PCXHR is not set -# CONFIG_SND_RIPTIDE is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set # CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_TRIDENT is not set # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_HDA_INTEL is not set # # ALSA PowerMac devices # - -# -# Apple Onboard Audio driver -# -# CONFIG_SND_AOA is not set -# CONFIG_SND_AOA_SOUNDBUS is not set +CONFIG_SND_POWERMAC=m # # USB devices @@ -1214,7 +1204,6 @@ CONFIG_SND_USB_AUDIO=m # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set @@ -1233,7 +1222,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1244,15 +1232,14 @@ CONFIG_USB_UHCI_HCD=m # # USB Device Class drivers # +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_BLUETOOTH_TTY is not set +# CONFIG_USB_MIDI is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m # -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information # CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set @@ -1264,15 +1251,12 @@ CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set # # USB Input Devices # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set # CONFIG_HID_FF is not set CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set @@ -1280,13 +1264,12 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set +# CONFIG_USB_MTOUCH is not set +# CONFIG_USB_ITMTOUCH is not set +# CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set # CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set # # USB Imaging devices @@ -1294,6 +1277,15 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set +# +# USB Multimedia devices +# +# CONFIG_USB_DABUSB is not set + +# +# Video4Linux support is needed for USB Multimedia device support +# + # # USB Network Adapters # @@ -1302,6 +1294,7 @@ CONFIG_USB_HIDDEV=y CONFIG_USB_PEGASUS=m # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set +# CONFIG_USB_ZD1201 is not set # CONFIG_USB_MON is not set # @@ -1315,7 +1308,6 @@ CONFIG_USB_PEGASUS=m CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_GENERIC is not set # CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set # CONFIG_USB_SERIAL_BELKIN is not set # CONFIG_USB_SERIAL_WHITEHEAT is not set # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set @@ -1323,7 +1315,6 @@ CONFIG_USB_SERIAL=m # CONFIG_USB_SERIAL_CYPRESS_M8 is not set # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set -# CONFIG_USB_SERIAL_FUNSOFT is not set CONFIG_USB_SERIAL_VISOR=m # CONFIG_USB_SERIAL_IPAQ is not set # CONFIG_USB_SERIAL_IR is not set @@ -1348,11 +1339,9 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y # CONFIG_USB_SERIAL_KLSI is not set # CONFIG_USB_SERIAL_KOBIL_SCT is not set # CONFIG_USB_SERIAL_MCT_U232 is not set -# CONFIG_USB_SERIAL_NAVMAN is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set # CONFIG_USB_SERIAL_TI is not set # CONFIG_USB_SERIAL_CYBERJACK is not set # CONFIG_USB_SERIAL_XIRCOM is not set @@ -1370,12 +1359,10 @@ CONFIG_USB_EZUSB=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1394,44 +1381,13 @@ CONFIG_USB_EZUSB=y # # CONFIG_MMC is not set -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - # # InfiniBand support # # CONFIG_INFINIBAND is not set # -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices +# SN Devices # # @@ -1461,21 +1417,23 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y + +# +# XFS support +# CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y +# CONFIG_XFS_RT is not set # CONFIG_XFS_QUOTA is not set CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y -# CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems @@ -1502,10 +1460,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y +CONFIG_DEVPTS_FS_XATTR=y +CONFIG_DEVPTS_FS_SECURITY=y CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_TMPFS_SECURITY=y # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set # # Miscellaneous filesystems @@ -1524,7 +1485,6 @@ CONFIG_CRAMFS=m # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1553,7 +1513,6 @@ CONFIG_SUNRPC=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set # # Partition Types @@ -1573,7 +1532,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # @@ -1624,44 +1582,33 @@ CONFIG_NLS_UTF8=m # Library routines # CONFIG_CRC_CCITT=y -# CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y + +# +# Profiling support +# # CONFIG_PROFILING is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y +CONFIG_MAGIC_SYSRQ=y CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FORCED_INLINING=y -# CONFIG_RCU_TORTURE_TEST is not set # CONFIG_XMON is not set # CONFIG_BDI_SWITCH is not set +CONFIG_BOOTX_TEXT=y # # Security options diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index 1f91eca2f..2f5c5e157 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c @@ -8,6 +8,7 @@ * #defines from the assembly-language output. */ +#include #include #include #include diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S index 6a674e834..d7bfd60e2 100644 --- a/arch/ppc/kernel/cpu_setup_power4.S +++ b/arch/ppc/kernel/cpu_setup_power4.S @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c index 10fec7363..61465ec88 100644 --- a/arch/ppc/kernel/dma-mapping.c +++ b/arch/ppc/kernel/dma-mapping.c @@ -22,6 +22,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index a9d455369..1adc91455 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 100052aae..01303efed 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S @@ -22,6 +22,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 7e44de5a2..0d8b88219 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S @@ -28,6 +28,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 51da157a6..10c261c67 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S @@ -31,6 +31,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index 944c35c24..7a2f20583 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 66877bdfe..dd86bbed7 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S @@ -30,6 +30,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/kernel/machine_kexec.c b/arch/ppc/kernel/machine_kexec.c index a469ba438..84d65a871 100644 --- a/arch/ppc/kernel/machine_kexec.c +++ b/arch/ppc/kernel/machine_kexec.c @@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)( unsigned long reboot_code_buffer, unsigned long start_address) ATTRIB_NORET; -extern const unsigned char relocate_new_kernel[]; -extern const unsigned int relocate_new_kernel_size; +const extern unsigned char relocate_new_kernel[]; +const extern unsigned int relocate_new_kernel_size; void machine_shutdown(void) { diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index 2fa0075f2..5a936566f 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S @@ -12,6 +12,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 63808e01c..809673a36 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c @@ -2,6 +2,7 @@ * Common prep/chrp pci routines. -- Cort */ +#include #include #include #include @@ -94,10 +95,8 @@ pcibios_fixup_resources(struct pci_dev *dev) if (!res->flags) continue; if (res->end == 0xffffffff) { - DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n", - pci_name(dev), i, - (unsigned long long)res->start, - (unsigned long long)res->end); + DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", + pci_name(dev), i, res->start, res->end); res->end -= res->start; res->start = 0; res->flags |= IORESOURCE_UNSET; @@ -170,18 +169,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); * but we want to try to avoid allocating at 0x2900-0x2bff * which might have be mirrored at 0x0100-0x03ff.. */ -void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) +void pcibios_align_resource(void *data, struct resource *res, unsigned long size, + unsigned long align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" - " (%lld bytes)\n", pci_name(dev), - dev->resource - res, (unsigned long long)size); + " (%ld bytes)\n", pci_name(dev), + dev->resource - res, size); } if (start & 0x300) { @@ -252,9 +251,8 @@ pcibios_allocate_bus_resources(struct list_head *bus_list) } } - DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n", - (unsigned long long)res->start, - (unsigned long long)res->end, res->flags, pr); + DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n", + res->start, res->end, res->flags, pr); if (pr) { if (request_resource(pr, res) == 0) continue; @@ -304,9 +302,8 @@ reparent_resources(struct resource *parent, struct resource *res) *pp = NULL; for (p = res->child; p != NULL; p = p->sibling) { p->parent = res; - DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n", - p->name, (unsigned long long)p->start, - (unsigned long long)p->end, res->name); + DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n", + p->name, p->start, p->end, res->name); } return 0; } @@ -361,15 +358,13 @@ pci_relocate_bridge_resource(struct pci_bus *bus, int i) try = conflict->start - 1; } if (request_resource(pr, res)) { - DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n", - (unsigned long long)res->start, - (unsigned long long)res->end); + DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n", + res->start, res->end); return -1; /* "can't happen" */ } update_bridge_base(bus, i); - printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n", - bus->number, i, (unsigned long long)res->start, - (unsigned long long)res->end); + printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n", + bus->number, i, res->start, res->end); return 0; } @@ -480,17 +475,15 @@ static inline void alloc_resource(struct pci_dev *dev, int idx) { struct resource *pr, *r = &dev->resource[idx]; - DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n", - pci_name(dev), idx, (unsigned long long)r->start, - (unsigned long long)r->end, r->flags); + DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n", + pci_name(dev), idx, r->start, r->end, r->flags); pr = pci_find_parent_resource(dev, r); if (!pr || request_resource(pr, r) < 0) { printk(KERN_ERR "PCI: Cannot allocate resource region %d" " of device %s\n", idx, pci_name(dev)); if (pr) - DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n", - pr, (unsigned long long)pr->start, - (unsigned long long)pr->end, pr->flags); + DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n", + pr, pr->start, pr->end, pr->flags); /* We'll assign a new address later */ r->flags |= IORESOURCE_UNSET; r->end -= r->start; @@ -959,8 +952,8 @@ static pgprot_t __pci_mmap_set_pgprot(struct pci_dev *dev, struct resource *rp, else prot |= _PAGE_GUARDED; - printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev), - (unsigned long long)rp->start, prot); + printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start, + prot); return __pgprot(prot); } @@ -1039,6 +1032,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, return -EINVAL; vma->vm_pgoff = offset >> PAGE_SHIFT; + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; vma->vm_page_prot = __pci_mmap_set_pgprot(dev, rp, vma->vm_page_prot, mmap_state, write_combine); @@ -1129,7 +1123,7 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - resource_size_t *start, resource_size_t *end) + u64 *start, u64 *end) { struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); unsigned long offset = 0; diff --git a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c index 5f9ee7bb6..d61889c24 100644 --- a/arch/ppc/kernel/ppc-stub.c +++ b/arch/ppc/kernel/ppc-stub.c @@ -99,6 +99,7 @@ * ****************************************************************************/ +#include #include #include #include diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c index bd129d3c2..75c645043 100644 --- a/arch/ppc/kernel/ppc_htab.c +++ b/arch/ppc/kernel/ppc_htab.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 3045cc306..b250b1b53 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -5,7 +6,7 @@ #include #include #include -#include +#include #include #include #include @@ -106,8 +107,6 @@ EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strnlen_user); -EXPORT_SYMBOL(copy_page); - /* EXPORT_SYMBOL(inb); EXPORT_SYMBOL(inw); diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index a74f46d98..1f79e84ab 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c @@ -2,6 +2,7 @@ * Common prep boot and setup code. */ +#include #include #include #include @@ -11,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -474,7 +475,7 @@ int __init ppc_init(void) /* register CPU devices */ for_each_possible_cpu(i) - register_cpu(&cpu_devices[i], i); + register_cpu(&cpu_devices[i], i, NULL); /* call platform init */ if (ppc_md.init != NULL) { diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c index d0cf3f869..6a5694fcc 100644 --- a/arch/ppc/kernel/smp-tbsync.c +++ b/arch/ppc/kernel/smp-tbsync.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include @@ -47,9 +48,8 @@ void __devinit smp_generic_take_timebase( void ) { int cmd, tbl, tbu; - unsigned long flags; - local_irq_save(flags); + local_irq_disable(); while( !running ) ; rmb(); @@ -65,7 +65,7 @@ smp_generic_take_timebase( void ) tbu = tbsync->tbu; tbsync->ack = 0; if( cmd == kExit ) - break; + return; if( cmd == kSetAndTest ) { while( tbsync->handshake ) @@ -78,7 +78,7 @@ smp_generic_take_timebase( void ) } enter_contest( tbsync->mark, -1 ); } - local_irq_restore(flags); + local_irq_enable(); } static int __devinit diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c index ca57e896a..f77795a64 100644 --- a/arch/ppc/kernel/smp.c +++ b/arch/ppc/kernel/smp.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index 6ab8cc722..53ea723af 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c @@ -42,6 +42,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 0193cc471..1c0d68026 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -708,7 +709,7 @@ void single_step_exception(struct pt_regs *regs) void alignment_exception(struct pt_regs *regs) { - int sig, code, fixed = 0; + int fixed; fixed = fix_alignment(regs); if (fixed == 1) { @@ -717,16 +718,14 @@ void alignment_exception(struct pt_regs *regs) return; } if (fixed == -EFAULT) { - sig = SIGSEGV; - code = SEGV_ACCERR; - } else { - sig = SIGBUS; - code = BUS_ADRALN; + /* fixed == -EFAULT means the operand address was bad */ + if (user_mode(regs)) + _exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar); + else + bad_page_fault(regs, regs->dar, SIGSEGV); + return; } - if (user_mode(regs)) - _exception(sig, regs, code, regs->dar); - else - bad_page_fault(regs, regs->dar, sig); + _exception(SIGBUS, regs, BUS_ADRALN, regs->dar); } void StackOverflow(struct pt_regs *regs) diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S index 095fd3323..09c6525cf 100644 --- a/arch/ppc/kernel/vmlinux.lds.S +++ b/arch/ppc/kernel/vmlinux.lds.S @@ -8,7 +8,6 @@ SECTIONS . = + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .rel.text : { *(.rel.text) } diff --git a/arch/ppc/lib/locks.c b/arch/ppc/lib/locks.c index ea4aee6b2..c450dc4b7 100644 --- a/arch/ppc/lib/locks.c +++ b/arch/ppc/lib/locks.c @@ -4,6 +4,7 @@ * Written by Cort Dougan (cort@cs.nmt.edu) */ +#include #include #include #include diff --git a/arch/ppc/lib/string.S b/arch/ppc/lib/string.S index 84ed33ab4..2e258c49e 100644 --- a/arch/ppc/lib/string.S +++ b/arch/ppc/lib/string.S @@ -8,6 +8,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c index 0a0a0487b..e0152a9b2 100644 --- a/arch/ppc/mm/44x_mmu.c +++ b/arch/ppc/mm/44x_mmu.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c index 838e09db7..4d006aa1a 100644 --- a/arch/ppc/mm/4xx_mmu.c +++ b/arch/ppc/mm/4xx_mmu.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index 5cdfb71fc..8e08ca325 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c index 123da03ab..5d581bb3a 100644 --- a/arch/ppc/mm/fsl_booke_mmu.c +++ b/arch/ppc/mm/fsl_booke_mmu.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index e756942e6..31d0a9243 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.S @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 523392d46..386e000bc 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include @@ -582,7 +583,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, mm = (address < TASK_SIZE)? vma->vm_mm: &init_mm; pmd = pmd_offset(pgd_offset(mm, address), address); if (!pmd_none(*pmd)) - add_hash_page(mm->context.id, address, pmd_val(*pmd)); + add_hash_page(mm->context, address, pmd_val(*pmd)); } #endif } diff --git a/arch/ppc/mm/mem_pieces.c b/arch/ppc/mm/mem_pieces.c index 6030a0ddf..3d6390520 100644 --- a/arch/ppc/mm/mem_pieces.c +++ b/arch/ppc/mm/mem_pieces.c @@ -14,6 +14,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/mmu_context.c b/arch/ppc/mm/mmu_context.c index 85afa7f8a..b4a4b3f02 100644 --- a/arch/ppc/mm/mmu_context.c +++ b/arch/ppc/mm/mmu_context.c @@ -23,13 +23,14 @@ * */ +#include #include #include #include #include -unsigned long next_mmu_context; +mm_context_t next_mmu_context; unsigned long context_map[LAST_CONTEXT / BITS_PER_LONG + 1]; #ifdef FEW_CONTEXTS atomic_t nr_free_contexts; diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 354a9408f..706bca8eb 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c index 973f1e6af..25bb6f334 100644 --- a/arch/ppc/mm/ppc_mmu.c +++ b/arch/ppc/mm/ppc_mmu.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c index fa29740a2..6c3dc3c44 100644 --- a/arch/ppc/mm/tlb.c +++ b/arch/ppc/mm/tlb.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -41,7 +42,7 @@ void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, unsigned long addr) if (Hash != 0) { ptephys = __pa(ptep) & PAGE_MASK; - flush_hash_pages(mm->context.id, addr, ptephys, 1); + flush_hash_pages(mm->context, addr, ptephys, 1); } } @@ -101,7 +102,7 @@ static void flush_range(struct mm_struct *mm, unsigned long start, pmd_t *pmd; unsigned long pmd_end; int count; - unsigned int ctx = mm->context.id; + unsigned int ctx = mm->context; if (Hash == 0) { _tlbia(); @@ -165,7 +166,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) mm = (vmaddr < TASK_SIZE)? vma->vm_mm: &init_mm; pmd = pmd_offset(pgd_offset(mm, vmaddr), vmaddr); if (!pmd_none(*pmd)) - flush_hash_pages(mm->context.id, vmaddr, pmd_val(*pmd), 1); + flush_hash_pages(mm->context, vmaddr, pmd_val(*pmd), 1); FINISH_FLUSH; } diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index 293bd489e..174ddbc97 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig @@ -183,7 +183,7 @@ config IBM_EMAC4 config BIOS_FIXUP bool - depends on BUBINGA || EP405 || SYCAMORE || WALNUT || CPCI405 + depends on BUBINGA || EP405 || SYCAMORE || WALNUT default y # OAK doesn't exist but wanted to keep this around for any future 403GCX boards diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 349660b84..b940cfd64 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h index dcd3d09a0..31c0dd6a2 100644 --- a/arch/ppc/platforms/4xx/bamboo.h +++ b/arch/ppc/platforms/4xx/bamboo.h @@ -15,6 +15,7 @@ #ifndef __ASM_BAMBOO_H__ #define __ASM_BAMBOO_H__ +#include #include /* F/W TLB mapping used in bootloader glue to reset EMAC */ diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c index 4009f4983..ce48a4f08 100644 --- a/arch/ppc/platforms/4xx/bubinga.c +++ b/arch/ppc/platforms/4xx/bubinga.c @@ -10,6 +10,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h index 5c408060e..606aa9fa5 100644 --- a/arch/ppc/platforms/4xx/bubinga.h +++ b/arch/ppc/platforms/4xx/bubinga.h @@ -19,6 +19,7 @@ #ifndef __BUBINGA_H__ #define __BUBINGA_H__ +#include #include #include diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c index 367430998..6571e39fb 100644 --- a/arch/ppc/platforms/4xx/cpci405.c +++ b/arch/ppc/platforms/4xx/cpci405.c @@ -1,12 +1,10 @@ /* * Board setup routines for the esd CPCI-405 cPCI Board. * - * Copyright 2001-2006 esd electronic system design - hannover germany + * Author: Stefan Roese + * stefan.roese@esd-electronics.com * - * Authors: Matthias Fuchs - * matthias.fuchs@esd-electronics.com - * Stefan Roese - * stefan.roese@esd-electronics.com + * Copyright 2001 esd electronic system design - hannover germany * * 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 @@ -15,23 +13,16 @@ * */ +#include #include #include #include #include #include #include -#include -#include #include -#include -#include -#ifdef CONFIG_GEN_RTC void *cpci405_nvram; -#endif - -extern bd_t __res; /* * Some IRQs unique to CPCI-405. @@ -45,69 +36,18 @@ ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) * A B C D */ { - {28, 29, 30, 27}, /* IDSEL 15 - cPCI slot 8 */ - {29, 30, 27, 28}, /* IDSEL 16 - cPCI slot 7 */ - {30, 27, 28, 29}, /* IDSEL 17 - cPCI slot 6 */ - {27, 28, 29, 30}, /* IDSEL 18 - cPCI slot 5 */ - {28, 29, 30, 27}, /* IDSEL 19 - cPCI slot 4 */ - {29, 30, 27, 28}, /* IDSEL 20 - cPCI slot 3 */ - {30, 27, 28, 29}, /* IDSEL 21 - cPCI slot 2 */ + {28, 28, 28, 28}, /* IDSEL 15 - cPCI slot 8 */ + {29, 29, 29, 29}, /* IDSEL 16 - cPCI slot 7 */ + {30, 30, 30, 30}, /* IDSEL 17 - cPCI slot 6 */ + {27, 27, 27, 27}, /* IDSEL 18 - cPCI slot 5 */ + {28, 28, 28, 28}, /* IDSEL 19 - cPCI slot 4 */ + {29, 29, 29, 29}, /* IDSEL 20 - cPCI slot 3 */ + {30, 30, 30, 30}, /* IDSEL 21 - cPCI slot 2 */ }; const long min_idsel = 15, max_idsel = 21, irqs_per_slot = 4; return PCI_IRQ_TABLE_LOOKUP; }; -/* The serial clock for the chip is an internal clock determined by - * different clock speeds/dividers. - * Calculate the proper input baud rate and setup the serial driver. - */ -static void __init -cpci405_early_serial_map(void) -{ - u32 uart_div; - int uart_clock; - struct uart_port port; - - /* Calculate the serial clock input frequency - * - * The uart clock is the cpu frequency (provided in the board info - * structure) divided by the external UART Divisor. - */ - uart_div = ((mfdcr(DCRN_CHCR_BASE) & CHR0_UDIV) >> 1) + 1; - uart_clock = __res.bi_procfreq / uart_div; - - /* Setup serial port access */ - memset(&port, 0, sizeof(port)); -#if defined(CONFIG_UART0_TTYS0) - port.membase = (void*)UART0_IO_BASE; - port.irq = UART0_INT; -#else - port.membase = (void*)UART1_IO_BASE; - port.irq = UART1_INT; -#endif - port.uartclk = uart_clock; - port.regshift = 0; - port.iotype = UPIO_MEM; - port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; - port.line = 0; - - if (early_serial_setup(&port) != 0) { - printk("Early serial init of port 0 failed\n"); - } -#if defined(CONFIG_UART0_TTYS0) - port.membase = (void*)UART1_IO_BASE; - port.irq = UART1_INT; -#else - port.membase = (void*)UART0_IO_BASE; - port.irq = UART0_INT; -#endif - port.line = 1; - - if (early_serial_setup(&port) != 0) { - printk("Early serial init of port 1 failed\n"); - } -} - void __init cpci405_setup_arch(void) { @@ -115,68 +55,14 @@ cpci405_setup_arch(void) ibm_ocp_set_emac(0, 0); - cpci405_early_serial_map(); - -#ifdef CONFIG_GEN_RTC - TODC_INIT(TODC_TYPE_MK48T35, - cpci405_nvram, cpci405_nvram, cpci405_nvram, 8); -#endif -} - -void __init -bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip) -{ - unsigned int bar_response, bar; - - /* Disable region first */ - out_le32((void *) &(pcip->pmm[0].ma), 0x00000000); - /* PLB starting addr, PCI: 0x80000000 */ - out_le32((void *) &(pcip->pmm[0].la), 0x80000000); - /* PCI start addr, 0x80000000 */ - out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE); - /* 512MB range of PLB to PCI */ - out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000); - /* Enable no pre-fetch, enable region */ - out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff - - (PPC405_PCI_UPPER_MEM - - PPC405_PCI_MEM_BASE)) | 0x01)); - - /* Disable region one */ - out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); - out_le32((void *) &(pcip->pmm[1].la), 0x00000000); - out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000); - out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000); - out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); - out_le32((void *) &(pcip->ptm1ms), 0x00000001); - - /* Disable region two */ - out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); - out_le32((void *) &(pcip->pmm[2].la), 0x00000000); - out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000); - out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000); - out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); - out_le32((void *) &(pcip->ptm2ms), 0x00000000); - out_le32((void *) &(pcip->ptm2la), 0x00000000); - - /* Zero config bars */ - for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) { - early_write_config_dword(hose, hose->first_busno, - PCI_FUNC(hose->first_busno), bar, - 0x00000000); - early_read_config_dword(hose, hose->first_busno, - PCI_FUNC(hose->first_busno), bar, - &bar_response); - } + TODC_INIT(TODC_TYPE_MK48T35, cpci405_nvram, cpci405_nvram, cpci405_nvram, 8); } void __init cpci405_map_io(void) { ppc4xx_map_io(); - -#ifdef CONFIG_GEN_RTC cpci405_nvram = ioremap(CPCI405_NVRAM_PADDR, CPCI405_NVRAM_SIZE); -#endif } void __init @@ -188,11 +74,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ppc_md.setup_arch = cpci405_setup_arch; ppc_md.setup_io_mappings = cpci405_map_io; -#ifdef CONFIG_GEN_RTC ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.nvram_read_val = todc_direct_read_val; ppc_md.nvram_write_val = todc_direct_write_val; -#endif } diff --git a/arch/ppc/platforms/4xx/cpci405.h b/arch/ppc/platforms/4xx/cpci405.h index a6c0a138b..e27f7cb65 100644 --- a/arch/ppc/platforms/4xx/cpci405.h +++ b/arch/ppc/platforms/4xx/cpci405.h @@ -1,28 +1,37 @@ /* * CPCI-405 board specific definitions * - * Copyright 2001-2006 esd electronic system design - hannover germany - * - * Authors: Matthias Fuchs - * matthias.fuchs@esd-electronics.com - * Stefan Roese - * stefan.roese@esd-electronics.com + * Copyright (c) 2001 Stefan Roese (stefan.roese@esd-electronics.com) */ #ifdef __KERNEL__ -#ifndef __CPCI405_H__ -#define __CPCI405_H__ +#ifndef __ASM_CPCI405_H__ +#define __ASM_CPCI405_H__ + +#include +/* We have a 405GP core */ #include + #include +#ifndef __ASSEMBLY__ +/* Some 4xx parts use a different timebase frequency from the internal clock. +*/ +#define bi_tbfreq bi_intfreq + /* Map for the NVRAM space */ #define CPCI405_NVRAM_PADDR ((uint)0xf0200000) #define CPCI405_NVRAM_SIZE ((uint)32*1024) -#define BASE_BAUD 0 +#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK +#define BASE_BAUD 201600 +#else +#define BASE_BAUD 691200 +#endif -#define PPC4xx_MACHINE_NAME "esd CPCI-405" +#define PPC4xx_MACHINE_NAME "esd CPCI-405" -#endif /* __CPCI405_H__ */ +#endif /* !__ASSEMBLY__ */ +#endif /* __ASM_CPCI405_H__ */ #endif /* __KERNEL__ */ diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index f0f9cc848..b4ecb9c79 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c @@ -13,6 +13,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h index f40e33d39..27b2e77c7 100755 --- a/arch/ppc/platforms/4xx/ebony.h +++ b/arch/ppc/platforms/4xx/ebony.h @@ -15,6 +15,7 @@ #ifndef __ASM_EBONY_H__ #define __ASM_EBONY_H__ +#include #include /* F/W TLB mapping used in bootloader glue to reset EMAC */ diff --git a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c index ae5c82081..6efa91ff9 100644 --- a/arch/ppc/platforms/4xx/ep405.c +++ b/arch/ppc/platforms/4xx/ep405.c @@ -9,6 +9,7 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c index fb3630a16..55af769a6 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.c +++ b/arch/ppc/platforms/4xx/ibm405ep.c @@ -10,6 +10,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ibm405ep.h b/arch/ppc/platforms/4xx/ibm405ep.h index 3ef20a547..fe46640de 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.h +++ b/arch/ppc/platforms/4xx/ibm405ep.h @@ -14,6 +14,7 @@ #ifndef __ASM_IBM405EP_H__ #define __ASM_IBM405EP_H__ +#include /* ibm405.h at bottom of this file */ diff --git a/arch/ppc/platforms/4xx/ibm405gp.c b/arch/ppc/platforms/4xx/ibm405gp.c index 2ac67a2f0..e5700469a 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.c +++ b/arch/ppc/platforms/4xx/ibm405gp.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h index 9f15e5518..eaf0ef570 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.h +++ b/arch/ppc/platforms/4xx/ibm405gp.h @@ -11,6 +11,7 @@ #ifndef __ASM_IBM405GP_H__ #define __ASM_IBM405GP_H__ +#include /* ibm405.h at bottom of this file */ diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c index 9f4dacffd..49da61f68 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.c +++ b/arch/ppc/platforms/4xx/ibm405gpr.c @@ -7,6 +7,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h index 9e01f1515..e90c5dde0 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.h +++ b/arch/ppc/platforms/4xx/ibm405gpr.h @@ -11,6 +11,7 @@ #ifndef __ASM_IBM405GPR_H__ #define __ASM_IBM405GPR_H__ +#include /* ibm405.h at bottom of this file */ diff --git a/arch/ppc/platforms/4xx/ibm440ep.h b/arch/ppc/platforms/4xx/ibm440ep.h index d92572727..61717e8a7 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.h +++ b/arch/ppc/platforms/4xx/ibm440ep.h @@ -17,6 +17,7 @@ #ifndef __PPC_PLATFORMS_IBM440EP_H #define __PPC_PLATFORMS_IBM440EP_H +#include #include /* UART */ diff --git a/arch/ppc/platforms/4xx/ibm440gp.h b/arch/ppc/platforms/4xx/ibm440gp.h index 391c90e1f..7b2763b60 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.h +++ b/arch/ppc/platforms/4xx/ibm440gp.h @@ -18,6 +18,7 @@ #ifndef __PPC_PLATFORMS_IBM440GP_H #define __PPC_PLATFORMS_IBM440GP_H +#include /* UART */ #define PPC440GP_UART0_ADDR 0x0000000140000200ULL diff --git a/arch/ppc/platforms/4xx/ibm440gx.h b/arch/ppc/platforms/4xx/ibm440gx.h index 599c4289b..070a34efe 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.h +++ b/arch/ppc/platforms/4xx/ibm440gx.h @@ -17,6 +17,7 @@ #ifndef __PPC_PLATFORMS_IBM440GX_H #define __PPC_PLATFORMS_IBM440GX_H +#include #include diff --git a/arch/ppc/platforms/4xx/ibm440sp.h b/arch/ppc/platforms/4xx/ibm440sp.h index 2978682f1..77e8bb22c 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.h +++ b/arch/ppc/platforms/4xx/ibm440sp.h @@ -15,6 +15,7 @@ #ifndef __PPC_PLATFORMS_IBM440SP_H #define __PPC_PLATFORMS_IBM440SP_H +#include #include diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c index 1afc3642e..f1dcb0ac1 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.c +++ b/arch/ppc/platforms/4xx/ibmnp405h.c @@ -7,6 +7,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h index 4aa8821b4..2c683f6aa 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.h +++ b/arch/ppc/platforms/4xx/ibmnp405h.h @@ -11,6 +11,7 @@ #ifndef __ASM_IBMNP405H_H__ #define __ASM_IBMNP405H_H__ +#include /* ibm405.h at bottom of this file */ diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h index 31a08abaa..9de426597 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.h +++ b/arch/ppc/platforms/4xx/ibmstb4.h @@ -11,6 +11,7 @@ #ifndef __ASM_IBMSTB4_H__ #define __ASM_IBMSTB4_H__ +#include /* serial port defines */ #define STB04xxx_IO_BASE ((uint)0xe0000000) diff --git a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h index 31b63343e..6884a49d3 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.h +++ b/arch/ppc/platforms/4xx/ibmstbx25.h @@ -11,6 +11,7 @@ #ifndef __ASM_IBMSTBX25_H__ #define __ASM_IBMSTBX25_H__ +#include /* serial port defines */ #define STBx25xx_IO_BASE ((uint)0xe0000000) diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 61706ef37..5c37de28e 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h index 68dd46b0a..e0db6a810 100644 --- a/arch/ppc/platforms/4xx/luan.h +++ b/arch/ppc/platforms/4xx/luan.h @@ -16,6 +16,7 @@ #ifndef __ASM_LUAN_H__ #define __ASM_LUAN_H__ +#include #include /* F/W TLB mapping used in bootloader glue to reset EMAC */ diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 84e999d9a..554776d4b 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h index 89730ce23..7c799a9ff 100644 --- a/arch/ppc/platforms/4xx/ocotea.h +++ b/arch/ppc/platforms/4xx/ocotea.h @@ -16,6 +16,7 @@ #ifndef __ASM_OCOTEA_H__ #define __ASM_OCOTEA_H__ +#include #include /* F/W TLB mapping used in bootloader glue to reset EMAC */ diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h index f1e867c4c..d3a620ddc 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.h +++ b/arch/ppc/platforms/4xx/ppc440spe.h @@ -17,6 +17,7 @@ #ifndef __PPC_PLATFORMS_PPC440SPE_H #define __PPC_PLATFORMS_PPC440SPE_H +#include #include diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index edf4d37d1..53da2b4f7 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c index 006e29f83..41b27d106 100644 --- a/arch/ppc/platforms/4xx/redwood6.c +++ b/arch/ppc/platforms/4xx/redwood6.c @@ -7,6 +7,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index c47493e34..bab31eb30 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c @@ -9,6 +9,7 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h index 69b169eac..dae016202 100755 --- a/arch/ppc/platforms/4xx/sycamore.h +++ b/arch/ppc/platforms/4xx/sycamore.h @@ -19,6 +19,7 @@ #ifndef __ASM_SYCAMORE_H__ #define __ASM_SYCAMORE_H__ +#include #include #include diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index f414d2d4c..6bd77902b 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c @@ -11,6 +11,7 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h index d9c4eb788..f13a577f0 100644 --- a/arch/ppc/platforms/4xx/walnut.h +++ b/arch/ppc/platforms/4xx/walnut.h @@ -21,6 +21,7 @@ #ifndef __ASM_WALNUT_H__ #define __ASM_WALNUT_H__ +#include #include #include diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index fb5f0b5e1..d97a7f269 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c @@ -9,6 +9,7 @@ * "as is" without any warranty of any kind, whether express or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c index cb3bf7a2b..4c0c7e4c1 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml403.c +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c @@ -13,6 +13,7 @@ * kind, whether express or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h index cd7d0e7d9..4cf21f256 100644 --- a/arch/ppc/platforms/4xx/xparameters/xparameters.h +++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h @@ -12,6 +12,7 @@ * "as is" without any warranty of any kind, whether express or implied. */ +#include #if defined(CONFIG_XILINX_ML300) #include "xparameters_ml300.h" diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index 346787df0..f287dcdbf 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c @@ -12,6 +12,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h index bc9684e66..7ae230122 100644 --- a/arch/ppc/platforms/4xx/yucca.h +++ b/arch/ppc/platforms/4xx/yucca.h @@ -17,6 +17,7 @@ #ifndef __ASM_YUCCA_H__ #define __ASM_YUCCA_H__ +#include #include /* F/W TLB mapping used in bootloader glue to reset EMAC */ diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 3397f0de1..11626dd90 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index d2e06c95b..6727bbdc3 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC83XX_SYS_H__ #define __MACH_MPC83XX_SYS_H__ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 4f839da67..9b014df51 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h index 7559f9e6f..0b5e7ff85 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.h +++ b/arch/ppc/platforms/85xx/mpc8540_ads.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC8540ADS_H__ #define __MACH_MPC8540ADS_H__ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h index 4f79c372c..9754dbd5d 100644 --- a/arch/ppc/platforms/85xx/mpc8555_cds.h +++ b/arch/ppc/platforms/85xx/mpc8555_cds.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC8555CDS_H__ #define __MACH_MPC8555CDS_H__ +#include #include #include diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 94badafe4..0cb2e8647 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include #include #include @@ -59,71 +59,6 @@ * Setup the architecture * */ -static void init_fcc_ioports(void) -{ - struct immap *immap; - struct io_port *io; - u32 tempval; - - immap = cpm2_immr; - - io = &immap->im_ioport; - /* FCC2/3 are on the ports B/C. */ - tempval = in_be32(&io->iop_pdirb); - tempval &= ~PB2_DIRB0; - tempval |= PB2_DIRB1; - out_be32(&io->iop_pdirb, tempval); - - tempval = in_be32(&io->iop_psorb); - tempval &= ~PB2_PSORB0; - tempval |= PB2_PSORB1; - out_be32(&io->iop_psorb, tempval); - - tempval = in_be32(&io->iop_pparb); - tempval |= (PB2_DIRB0 | PB2_DIRB1); - out_be32(&io->iop_pparb, tempval); - - tempval = in_be32(&io->iop_pdirb); - tempval &= ~PB3_DIRB0; - tempval |= PB3_DIRB1; - out_be32(&io->iop_pdirb, tempval); - - tempval = in_be32(&io->iop_psorb); - tempval &= ~PB3_PSORB0; - tempval |= PB3_PSORB1; - out_be32(&io->iop_psorb, tempval); - - tempval = in_be32(&io->iop_pparb); - tempval |= (PB3_DIRB0 | PB3_DIRB1); - out_be32(&io->iop_pparb, tempval); - - tempval = in_be32(&io->iop_pdirc); - tempval |= PC3_DIRC1; - out_be32(&io->iop_pdirc, tempval); - - tempval = in_be32(&io->iop_pparc); - tempval |= PC3_DIRC1; - out_be32(&io->iop_pparc, tempval); - - /* Port C has clocks...... */ - tempval = in_be32(&io->iop_psorc); - tempval &= ~(CLK_TRX); - out_be32(&io->iop_psorc, tempval); - - tempval = in_be32(&io->iop_pdirc); - tempval &= ~(CLK_TRX); - out_be32(&io->iop_pdirc, tempval); - tempval = in_be32(&io->iop_pparc); - tempval |= (CLK_TRX); - out_be32(&io->iop_pparc, tempval); - - /* Configure Serial Interface clock routing. - * First, clear all FCC bits to zero, - * then set the ones we want. - */ - immap->im_cpmux.cmx_fcr &= ~(CPMUX_CLK_MASK); - immap->im_cpmux.cmx_fcr |= CPMUX_CLK_ROUTE; -} static void __init mpc8560ads_setup_arch(void) @@ -132,7 +67,6 @@ mpc8560ads_setup_arch(void) unsigned int freq; struct gianfar_platform_data *pdata; struct gianfar_mdio_data *mdata; - struct fs_platform_info *fpi; cpm2_reset(); @@ -177,28 +111,6 @@ mpc8560ads_setup_arch(void) memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); } - init_fcc_ioports(); - ppc_sys_device_remove(MPC85xx_CPM_FCC1); - - fpi = (struct fs_platform_info *) ppc_sys_get_pdata(MPC85xx_CPM_FCC2); - if (fpi) { - memcpy(fpi->macaddr, binfo->bi_enet2addr, 6); - fpi->bus_id = "0:02"; - fpi->phy_addr = 2; - fpi->dpram_offset = (u32)cpm2_immr->im_dprambase; - fpi->fcc_regs_c = (u32)&cpm2_immr->im_fcc_c[1]; - } - - fpi = (struct fs_platform_info *) ppc_sys_get_pdata(MPC85xx_CPM_FCC3); - if (fpi) { - memcpy(fpi->macaddr, binfo->bi_enet2addr, 6); - fpi->macaddr[5] += 1; - fpi->bus_id = "0:03"; - fpi->phy_addr = 3; - fpi->dpram_offset = (u32)cpm2_immr->im_dprambase; - fpi->fcc_regs_c = (u32)&cpm2_immr->im_fcc_c[2]; - } - #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; @@ -220,7 +132,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction cpm2_irqaction = { .handler = cpm2_cascade, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "cpm2_cascade", }; diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h index 9f185ab2e..c2247c21f 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.h +++ b/arch/ppc/platforms/85xx/mpc8560_ads.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC8560ADS_H #define __MACH_MPC8560ADS_H +#include #include #include diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index 674806e00..8fd9d763f 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h index c8c322fe3..de8d41aaf 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC85XX_ADS_H__ #define __MACH_MPC85XX_ADS_H__ +#include #include #include @@ -45,23 +46,4 @@ extern void mpc85xx_ads_map_io(void) __init; #define MPC85XX_PCI1_IO_SIZE 0x01000000 -/* FCC1 Clock Source Configuration. These can be - * redefined in the board specific file. - * Can only choose from CLK9-12 */ -#define F1_RXCLK 12 -#define F1_TXCLK 11 - -/* FCC2 Clock Source Configuration. These can be - * redefined in the board specific file. - * Can only choose from CLK13-16 */ -#define F2_RXCLK 13 -#define F2_TXCLK 14 - -/* FCC3 Clock Source Configuration. These can be - * redefined in the board specific file. - * Can only choose from CLK13-16 */ -#define F3_RXCLK 15 -#define F3_TXCLK 16 - - #endif /* __MACH_MPC85XX_ADS_H__ */ diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 75204588a..c9e0aeeca 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include @@ -136,7 +137,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction cpm2_irqaction = { .handler = cpm2_cascade, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "cpm2_cascade", }; @@ -378,12 +379,13 @@ mpc85xx_cds_pcibios_fixup(void) PCI_DEVICE_ID_VIA_82C586_2, NULL))) { dev->irq = 10; pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); + pci_dev_put(dev); + } - if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, + if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, dev))) { - dev->irq = 11; - pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); - } + dev->irq = 11; + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); pci_dev_put(dev); } } diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 32c5455c8..62df54f61 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h @@ -15,6 +15,7 @@ #ifndef __MACH_MPC85XX_CDS_H__ #define __MACH_MPC85XX_CDS_H__ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 764d580ff..b73778ecf 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h index c7d61cf3a..44ffaa2d2 100644 --- a/arch/ppc/platforms/85xx/sbc8560.h +++ b/arch/ppc/platforms/85xx/sbc8560.h @@ -13,6 +13,7 @@ #ifndef __MACH_SBC8560_H__ #define __MACH_SBC8560_H__ +#include #include #define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET) diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c index 2c587ca97..d3ff28051 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.c +++ b/arch/ppc/platforms/85xx/sbc85xx.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h index 21ea7a556..5dd8b6a98 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.h +++ b/arch/ppc/platforms/85xx/sbc85xx.h @@ -14,6 +14,7 @@ #ifndef __PLATFORMS_85XX_SBC85XX_H__ #define __PLATFORMS_85XX_SBC85XX_H__ +#include #include #include #include diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 495aa79bb..8d7baa9a3 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c @@ -16,6 +16,7 @@ * option) any later version. */ +#include #include #include #include @@ -166,7 +167,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction cpm2_irqaction = { .handler = cpm2_cascade, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "cpm2_cascade", }; diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index c6e34c09e..3f71f8f59 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h @@ -17,6 +17,7 @@ #ifndef __MACH_STX_GP3_H #define __MACH_STX_GP3_H +#include #include #include diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index 189ed4175..00af13226 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c @@ -14,6 +14,7 @@ * option) any later version. */ +#include #include #include #include @@ -190,7 +191,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction cpm2_irqaction = { .handler = cpm2_cascade, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "cpm2_cascade", }; diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h index 57284e68f..612d80504 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.h +++ b/arch/ppc/platforms/85xx/tqm85xx.h @@ -14,6 +14,7 @@ #ifndef __MACH_TQM85XX_H #define __MACH_TQM85XX_H +#include #include #include diff --git a/arch/ppc/platforms/apus_pci.c b/arch/ppc/platforms/apus_pci.c index dc165f0c8..33dad6db8 100644 --- a/arch/ppc/platforms/apus_pci.c +++ b/arch/ppc/platforms/apus_pci.c @@ -10,6 +10,7 @@ * */ +#include #ifdef CONFIG_AMIGA #include diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c index 1d034ead2..fe0cdc04d 100644 --- a/arch/ppc/platforms/apus_setup.c +++ b/arch/ppc/platforms/apus_setup.c @@ -11,6 +11,7 @@ * Amiga specific stuff into mach/amiga. */ +#include #include #include #include @@ -733,9 +734,9 @@ void apus_init_IRQ(void) for ( i = 0 ; i < AMI_IRQS; i++ ) { irq_desc[i].status = IRQ_LEVEL; if (i < IRQ_AMIGA_AUTO) { - irq_desc[i].chip = &amiga_irqctrl; + irq_desc[i].handler = &amiga_irqctrl; } else { - irq_desc[i].chip = &amiga_sys_irqctrl; + irq_desc[i].handler = &amiga_sys_irqctrl; action = &amiga_sys_irqaction[i-IRQ_AMIGA_AUTO]; if (action->name) setup_irq(i, action); diff --git a/arch/ppc/platforms/ccm.h b/arch/ppc/platforms/ccm.h index 69000b1c7..edb87b573 100644 --- a/arch/ppc/platforms/ccm.h +++ b/arch/ppc/platforms/ccm.h @@ -7,6 +7,7 @@ #ifndef __MACH_CCM_H #define __MACH_CCM_H +#include #include diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index a764ae71c..f324f757c 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index e78bccf96..790475c22 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c @@ -8,6 +8,7 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c index 4957a7bcd..31e8e21e1 100644 --- a/arch/ppc/platforms/ev64260.c +++ b/arch/ppc/platforms/ev64260.c @@ -20,6 +20,7 @@ * Note: The 750CXe and 7450 are not stable with a 125MHz or 133MHz TCLK/SYSCLK. * At 100MHz, they are solid. */ +#include #include #include diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index 90ed375c9..104ac9b16 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c @@ -11,6 +11,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index 2f9f0f60e..e1c0b1b6d 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h @@ -19,6 +19,7 @@ #ifndef __ASM_FADS_H__ #define __ASM_FADS_H__ +#include #include diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S index e8c84d24f..b181f2108 100644 --- a/arch/ppc/platforms/gemini_prom.S +++ b/arch/ppc/platforms/gemini_prom.S @@ -6,6 +6,7 @@ * ---Dan */ +#include #include #include #include diff --git a/arch/ppc/platforms/gemini_serial.h b/arch/ppc/platforms/gemini_serial.h index b915eff79..69855aeec 100644 --- a/arch/ppc/platforms/gemini_serial.h +++ b/arch/ppc/platforms/gemini_serial.h @@ -2,6 +2,7 @@ #ifndef __ASMPPC_GEMINI_SERIAL_H #define __ASMPPC_GEMINI_SERIAL_H +#include #include #ifdef CONFIG_SERIAL_MANY_PORTS diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c index f48048f36..0090ff154 100644 --- a/arch/ppc/platforms/gemini_setup.c +++ b/arch/ppc/platforms/gemini_setup.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index e0f112a1f..75dc2ee87 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c @@ -12,6 +12,7 @@ * option) any later version. */ +#include #include #include @@ -837,7 +838,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr) mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff); mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff); request_irq(60, hdpu_smp_cpu0_int_handler, - IRQF_DISABLED, hdpu_smp0, 0); + SA_INTERRUPT, hdpu_smp0, 0); } if (cpu_nr == 1) { @@ -857,7 +858,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr) mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0); mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff); request_irq(28, hdpu_smp_cpu1_int_handler, - IRQF_DISABLED, hdpu_smp1, 0); + SA_INTERRUPT, hdpu_smp1, 0); } } diff --git a/arch/ppc/platforms/hermes.h b/arch/ppc/platforms/hermes.h index de91afff8..198fc590b 100644 --- a/arch/ppc/platforms/hermes.h +++ b/arch/ppc/platforms/hermes.h @@ -7,6 +7,7 @@ #ifndef __MACH_HERMES_H #define __MACH_HERMES_H +#include #include diff --git a/arch/ppc/platforms/ip860.h b/arch/ppc/platforms/ip860.h index 2f1f86ce1..8c3836c5f 100644 --- a/arch/ppc/platforms/ip860.h +++ b/arch/ppc/platforms/ip860.h @@ -7,6 +7,7 @@ #ifndef __MACH_IP860_H #define __MACH_IP860_H +#include #include diff --git a/arch/ppc/platforms/ivms8.h b/arch/ppc/platforms/ivms8.h index 9109e684a..d4be310f8 100644 --- a/arch/ppc/platforms/ivms8.h +++ b/arch/ppc/platforms/ivms8.h @@ -13,6 +13,7 @@ #ifndef __ASM_IVMS8_H__ #define __ASM_IVMS8_H__ +#include #include diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 720f8b3e2..ad21280e8 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c @@ -16,6 +16,7 @@ * Supports the Artesyn 750i, 752i, and 3750. The 752i is virtually identical * to the 750i except that it has an mv64460 bridge. */ +#include #include #include #include diff --git a/arch/ppc/platforms/lantec.h b/arch/ppc/platforms/lantec.h index 5e5eb6d0f..8c87642c5 100644 --- a/arch/ppc/platforms/lantec.h +++ b/arch/ppc/platforms/lantec.h @@ -7,6 +7,7 @@ #ifndef __MACH_LANTEC_H #define __MACH_LANTEC_H +#include #include diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index b9e9db63f..fecbe9adc 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c @@ -21,6 +21,7 @@ * kind, whether express or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c index 18dc6e8dd..c6445a727 100644 --- a/arch/ppc/platforms/lopec.c +++ b/arch/ppc/platforms/lopec.c @@ -10,6 +10,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/lwmon.h b/arch/ppc/platforms/lwmon.h index e63f3b07a..995bf5112 100644 --- a/arch/ppc/platforms/lwmon.h +++ b/arch/ppc/platforms/lwmon.h @@ -7,6 +7,7 @@ #ifndef __MACH_LWMON_H #define __MACH_LWMON_H +#include #include diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c index 2a35fe2b9..abb7154de 100644 --- a/arch/ppc/platforms/mpc8272ads_setup.c +++ b/arch/ppc/platforms/mpc8272ads_setup.c @@ -56,51 +56,64 @@ static struct fs_uart_platform_info mpc8272_uart_pdata[] = { }, }; -static struct fs_mii_bb_platform_info m82xx_mii_bb_pdata = { - .mdio_dat.bit = 18, - .mdio_dir.bit = 18, - .mdc_dat.bit = 19, - .delay = 1, +static struct fs_mii_bus_info mii_bus_info = { + .method = fsmii_bitbang, + .id = 0, + .i.bitbang = { + .mdio_port = fsiop_portc, + .mdio_bit = 18, + .mdc_port = fsiop_portc, + .mdc_bit = 19, + .delay = 1, + }, }; -static struct fs_platform_info mpc82xx_enet_pdata[] = { - [fsid_fcc1] = { - .fs_no = fsid_fcc1, - .cp_page = CPM_CR_FCC1_PAGE, - .cp_block = CPM_CR_FCC1_SBLOCK, - - .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), - .clk_route = CMX1_CLK_ROUTE, - .clk_mask = CMX1_CLK_MASK, - .init_ioports = init_fcc1_ioports, - - .mem_offset = FCC1_MEM_OFFSET, - - .rx_ring = 32, - .tx_ring = 32, - .rx_copybreak = 240, - .use_napi = 0, - .napi_weight = 17, - .bus_id = "0:00", - }, - [fsid_fcc2] = { - .fs_no = fsid_fcc2, - .cp_page = CPM_CR_FCC2_PAGE, - .cp_block = CPM_CR_FCC2_SBLOCK, - .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), - .clk_route = CMX2_CLK_ROUTE, - .clk_mask = CMX2_CLK_MASK, - .init_ioports = init_fcc2_ioports, - - .mem_offset = FCC2_MEM_OFFSET, - - .rx_ring = 32, - .tx_ring = 32, - .rx_copybreak = 240, - .use_napi = 0, - .napi_weight = 17, - .bus_id = "0:03", - }, +static struct fs_platform_info mpc82xx_fcc1_pdata = { + .fs_no = fsid_fcc1, + .cp_page = CPM_CR_FCC1_PAGE, + .cp_block = CPM_CR_FCC1_SBLOCK, + .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), + .clk_route = CMX1_CLK_ROUTE, + .clk_mask = CMX1_CLK_MASK, + .init_ioports = init_fcc1_ioports, + + .phy_addr = 0, +#ifdef PHY_INTERRUPT + .phy_irq = PHY_INTERRUPT, +#else + .phy_irq = -1; +#endif + .mem_offset = FCC1_MEM_OFFSET, + .bus_info = &mii_bus_info, + .rx_ring = 32, + .tx_ring = 32, + .rx_copybreak = 240, + .use_napi = 0, + .napi_weight = 17, +}; + +static struct fs_platform_info mpc82xx_fcc2_pdata = { + .fs_no = fsid_fcc2, + .cp_page = CPM_CR_FCC2_PAGE, + .cp_block = CPM_CR_FCC2_SBLOCK, + .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), + .clk_route = CMX2_CLK_ROUTE, + .clk_mask = CMX2_CLK_MASK, + .init_ioports = init_fcc2_ioports, + + .phy_addr = 3, +#ifdef PHY_INTERRUPT + .phy_irq = PHY_INTERRUPT, +#else + .phy_irq = -1; +#endif + .mem_offset = FCC2_MEM_OFFSET, + .bus_info = &mii_bus_info, + .rx_ring = 32, + .tx_ring = 32, + .rx_copybreak = 240, + .use_napi = 0, + .napi_weight = 17, }; static void init_fcc1_ioports(void) @@ -196,21 +209,20 @@ static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, bd_t* bi = (void*)__res; int fs_no = fsid_fcc1+pdev->id-1; - if(fs_no > ARRAY_SIZE(mpc82xx_enet_pdata)) { - return; + mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase; + mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c; + + switch(fs_no) { + case fsid_fcc1: + memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6); + pdev->dev.platform_data = &mpc82xx_fcc1_pdata; + break; + case fsid_fcc2: + memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6); + mpc82xx_fcc2_pdata.macaddr[5] ^= 1; + pdev->dev.platform_data = &mpc82xx_fcc2_pdata; + break; } - - mpc82xx_enet_pdata[fs_no].dpram_offset= - (u32)cpm2_immr->im_dprambase; - mpc82xx_enet_pdata[fs_no].fcc_regs_c = - (u32)cpm2_immr->im_fcc_c; - memcpy(&mpc82xx_enet_pdata[fs_no].macaddr,bi->bi_enetaddr,6); - - /* prevent dup mac */ - if(fs_no == fsid_fcc2) - mpc82xx_enet_pdata[fs_no].macaddr[5] ^= 1; - - pdev->dev.platform_data = &mpc82xx_enet_pdata[fs_no]; } static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev, @@ -262,29 +274,6 @@ static void init_scc4_uart_ioports(void) iounmap(immap); } -static void __init mpc8272ads_fixup_mdio_pdata(struct platform_device *pdev, - int idx) -{ - m82xx_mii_bb_pdata.irq[0] = PHY_INTERRUPT; - m82xx_mii_bb_pdata.irq[1] = -1; - m82xx_mii_bb_pdata.irq[2] = -1; - m82xx_mii_bb_pdata.irq[3] = PHY_INTERRUPT; - m82xx_mii_bb_pdata.irq[31] = -1; - - - m82xx_mii_bb_pdata.mdio_dat.offset = - (u32)&cpm2_immr->im_ioport.iop_pdatc; - - m82xx_mii_bb_pdata.mdio_dir.offset = - (u32)&cpm2_immr->im_ioport.iop_pdirc; - - m82xx_mii_bb_pdata.mdc_dat.offset = - (u32)&cpm2_immr->im_ioport.iop_pdatc; - - - pdev->dev.platform_data = &m82xx_mii_bb_pdata; -} - static int mpc8272ads_platform_notify(struct device *dev) { static const struct platform_notify_dev_map dev_map[] = { @@ -296,10 +285,6 @@ static int mpc8272ads_platform_notify(struct device *dev) .bus_id = "fsl-cpm-scc:uart", .rtn = mpc8272ads_fixup_uart_pdata, }, - { - .bus_id = "fsl-bb-mdio", - .rtn = mpc8272ads_fixup_mdio_pdata, - }, { .bus_id = NULL } @@ -334,7 +319,6 @@ int __init mpc8272ads_init(void) ppc_sys_device_enable(MPC82xx_CPM_SCC4); #endif - ppc_sys_device_enable(MPC82xx_MDIO_BB); return 0; } diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c index e12cece4c..d919dab61 100644 --- a/arch/ppc/platforms/mpc866ads_setup.c +++ b/arch/ppc/platforms/mpc866ads_setup.c @@ -1,16 +1,17 @@ -/*arch/ppc/platforms/mpc866ads-setup.c +/*arch/ppc/platforms/mpc885ads-setup.c * - * Platform setup for the Freescale mpc866ads board + * Platform setup for the Freescale mpc885ads board * * Vitaly Bordug * - * Copyright 2005-2006 MontaVista Software Inc. + * Copyright 2005 MontaVista Software Inc. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied. */ +#include #include #include #include @@ -42,36 +43,49 @@ static void setup_scc1_ioports(void); static void setup_smc1_ioports(void); static void setup_smc2_ioports(void); -static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata; +static struct fs_mii_bus_info fec_mii_bus_info = { + .method = fsmii_fec, + .id = 0, +}; + +static struct fs_mii_bus_info scc_mii_bus_info = { + .method = fsmii_fixed, + .id = 0, + .i.fixed.speed = 10, + .i.fixed.duplex = 0, +}; -static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata; +static struct fs_platform_info mpc8xx_fec_pdata[] = { + { + .rx_ring = 128, + .tx_ring = 16, + .rx_copybreak = 240, -static struct fs_platform_info mpc8xx_enet_pdata[] = { - [fsid_fec1] = { - .rx_ring = 128, - .tx_ring = 16, - .rx_copybreak = 240, + .use_napi = 1, + .napi_weight = 17, - .use_napi = 1, - .napi_weight = 17, + .phy_addr = 15, + .phy_irq = -1, - .init_ioports = setup_fec1_ioports, + .use_rmii = 0, - .bus_id = "0:0f", - .has_phy = 1, - }, - [fsid_scc1] = { - .rx_ring = 64, - .tx_ring = 8, - .rx_copybreak = 240, - .use_napi = 1, - .napi_weight = 17, + .bus_info = &fec_mii_bus_info, + } +}; +static struct fs_platform_info mpc8xx_scc_pdata = { + .rx_ring = 64, + .tx_ring = 8, + .rx_copybreak = 240, - .init_ioports = setup_scc1_ioports, + .use_napi = 1, + .napi_weight = 17, + + .phy_addr = -1, + .phy_irq = -1, + + .bus_info = &scc_mii_bus_info, - .bus_id = "fixed@100:1", - }, }; static struct fs_uart_platform_info mpc866_uart_pdata[] = { @@ -194,6 +208,63 @@ static void setup_scc1_ioports(void) } +static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) +{ + struct fs_platform_info *fpi = pdev->dev.platform_data; + + volatile cpm8xx_t *cp; + bd_t *bd = (bd_t *) __res; + char *e; + int i; + + /* Get pointer to Communication Processor */ + cp = cpmp; + switch (fs_no) { + case fsid_fec1: + fpi = &mpc8xx_fec_pdata[0]; + fpi->init_ioports = &setup_fec1_ioports; + + break; + case fsid_scc1: + fpi = &mpc8xx_scc_pdata; + fpi->init_ioports = &setup_scc1_ioports; + + break; + default: + printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); + return; + } + + pdev->dev.platform_data = fpi; + fpi->fs_no = fs_no; + + e = (unsigned char *)&bd->bi_enetaddr; + for (i = 0; i < 6; i++) + fpi->macaddr[i] = *e++; + + fpi->macaddr[5 - pdev->id]++; + +} + +static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, + int idx) +{ + /* This is for FEC devices only */ + if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) + return; + mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); +} + +static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, + int idx) +{ + /* This is for SCC devices only */ + if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) + return; + + mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); +} + static void setup_smc1_ioports(void) { immap_t *immap = (immap_t *) IMAP_ADDR; @@ -245,56 +316,6 @@ static void setup_smc2_ioports(void) } -static int ma_count = 0; - -static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) -{ - struct fs_platform_info *fpi; - - volatile cpm8xx_t *cp; - bd_t *bd = (bd_t *) __res; - char *e; - int i; - - /* Get pointer to Communication Processor */ - cp = cpmp; - - if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) { - printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); - return; - } - - - fpi = &mpc8xx_enet_pdata[fs_no]; - fpi->fs_no = fs_no; - pdev->dev.platform_data = fpi; - - e = (unsigned char *)&bd->bi_enetaddr; - for (i = 0; i < 6; i++) - fpi->macaddr[i] = *e++; - - fpi->macaddr[5] += ma_count++; -} - -static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, - int idx) -{ - /* This is for FEC devices only */ - if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) - return; - mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); -} - -static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, - int idx) -{ - /* This is for SCC devices only */ - if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) - return; - - mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); -} - static void __init mpc866ads_fixup_uart_pdata(struct platform_device *pdev, int idx) { @@ -339,9 +360,6 @@ static int mpc866ads_platform_notify(struct device *dev) int __init mpc866ads_init(void) { - bd_t *bd = (bd_t *) __res; - struct fs_mii_fec_platform_info* fmpi; - printk(KERN_NOTICE "mpc866ads: Init\n"); platform_notify = mpc866ads_platform_notify; @@ -349,20 +367,11 @@ int __init mpc866ads_init(void) ppc_sys_device_initfunc(); ppc_sys_device_disable_all(); -#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC1 +#ifdef MPC8xx_SECOND_ETH_SCC1 ppc_sys_device_enable(MPC8xx_CPM_SCC1); #endif ppc_sys_device_enable(MPC8xx_CPM_FEC1); - ppc_sys_device_enable(MPC8xx_MDIO_FEC); - - fmpi = ppc_sys_platform_devices[MPC8xx_MDIO_FEC].dev.platform_data = - &mpc8xx_mdio_fec_pdata; - - fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1; - /* No PHY interrupt line here */ - fmpi->irq[0xf] = -1; - /* Since either of the uarts could be used as console, they need to ready */ #ifdef CONFIG_SERIAL_CPM_SMC1 ppc_sys_device_enable(MPC8xx_CPM_SMC1); @@ -373,14 +382,6 @@ int __init mpc866ads_init(void) ppc_sys_device_enable(MPC8xx_CPM_SMC2); ppc_sys_device_setfunc(MPC8xx_CPM_SMC2, PPC_SYS_FUNC_UART); #endif - ppc_sys_device_enable(MPC8xx_MDIO_FEC); - - fmpi = ppc_sys_platform_devices[MPC8xx_MDIO_FEC].dev.platform_data = - &mpc8xx_mdio_fec_pdata; - - fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1; - /* No PHY interrupt line here */ - fmpi->irq[0xf] = -1; return 0; } diff --git a/arch/ppc/platforms/mpc885ads.h b/arch/ppc/platforms/mpc885ads.h index d3bbbb3c9..a80b7d116 100644 --- a/arch/ppc/platforms/mpc885ads.h +++ b/arch/ppc/platforms/mpc885ads.h @@ -15,6 +15,7 @@ #ifndef __ASM_MPC885ADS_H__ #define __ASM_MPC885ADS_H__ +#include #include diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c index 5dfa4e6c2..4b88679cd 100644 --- a/arch/ppc/platforms/mpc885ads_setup.c +++ b/arch/ppc/platforms/mpc885ads_setup.c @@ -11,6 +11,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -38,10 +39,7 @@ extern unsigned char __res[]; static void setup_smc1_ioports(void); static void setup_smc2_ioports(void); -static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata; -static void setup_fec1_ioports(void); -static void setup_fec2_ioports(void); -static void setup_scc3_ioports(void); +static void __init mpc885ads_scc_phy_init(char); static struct fs_uart_platform_info mpc885_uart_pdata[] = { [fsid_smc1_uart] = { @@ -64,8 +62,23 @@ static struct fs_uart_platform_info mpc885_uart_pdata[] = { }, }; -static struct fs_platform_info mpc8xx_enet_pdata[] = { - [fsid_fec1] = { +static struct fs_mii_bus_info fec_mii_bus_info = { + .method = fsmii_fec, + .id = 0, +}; + +static struct fs_mii_bus_info scc_mii_bus_info = { +#ifdef CONFIG_SCC_ENET_8xx_FIXED + .method = fsmii_fixed, +#else + .method = fsmii_fec, +#endif + + .id = 0, +}; + +static struct fs_platform_info mpc8xx_fec_pdata[] = { + { .rx_ring = 128, .tx_ring = 16, .rx_copybreak = 240, @@ -73,12 +86,11 @@ static struct fs_platform_info mpc8xx_enet_pdata[] = { .use_napi = 1, .napi_weight = 17, - .init_ioports = setup_fec1_ioports, + .phy_addr = 0, + .phy_irq = SIU_IRQ7, - .bus_id = "0:00", - .has_phy = 1, - }, - [fsid_fec2] = { + .bus_info = &fec_mii_bus_info, + }, { .rx_ring = 128, .tx_ring = 16, .rx_copybreak = 240, @@ -86,32 +98,35 @@ static struct fs_platform_info mpc8xx_enet_pdata[] = { .use_napi = 1, .napi_weight = 17, - .init_ioports = setup_fec2_ioports, + .phy_addr = 1, + .phy_irq = SIU_IRQ7, + + .bus_info = &fec_mii_bus_info, + } +}; - .bus_id = "0:01", - .has_phy = 1, - }, - [fsid_scc3] = { - .rx_ring = 64, - .tx_ring = 8, - .rx_copybreak = 240, +static struct fs_platform_info mpc8xx_scc_pdata = { + .rx_ring = 64, + .tx_ring = 8, + .rx_copybreak = 240, - .use_napi = 1, - .napi_weight = 17, + .use_napi = 1, + .napi_weight = 17, - .init_ioports = setup_scc3_ioports, -#ifdef CONFIG_FIXED_MII_10_FDX - .bus_id = "fixed@100:1", + .phy_addr = 2, +#ifdef CONFIG_MPC8xx_SCC_ENET_FIXED + .phy_irq = -1, #else - .bus_id = "0:02", - #endif - }, + .phy_irq = SIU_IRQ7, +#endif + + .bus_info = &scc_mii_bus_info, }; void __init board_init(void) { - cpm8xx_t *cp = cpmp; - unsigned int *bcsr_io; + volatile cpm8xx_t *cp = cpmp; + unsigned int *bcsr_io; #ifdef CONFIG_FS_ENET immap_t *immap = (immap_t *) IMAP_ADDR; @@ -150,14 +165,6 @@ void __init board_init(void) /* use MDC for MII (common) */ setbits16(&immap->im_ioport.iop_pdpar, 0x0080); clrbits16(&immap->im_ioport.iop_pddir, 0x0080); - bcsr_io = ioremap(BCSR5, sizeof(unsigned long)); - clrbits32(bcsr_io,BCSR5_MII1_EN); - clrbits32(bcsr_io,BCSR5_MII1_RST); -#ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 - clrbits32(bcsr_io,BCSR5_MII2_EN); - clrbits32(bcsr_io,BCSR5_MII2_RST); -#endif - iounmap(bcsr_io); #endif } @@ -188,8 +195,8 @@ static void setup_fec2_ioports(void) /* configure FEC2 pins */ setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc); setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc); - clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); setbits32(&immap->im_cpm.cp_peso, 0x00037800); + clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); } @@ -207,8 +214,6 @@ static void setup_scc3_ioports(void) /* Enable the PHY. */ - clrbits32(bcsr_io+4, BCSR4_ETH10_RST); - udelay(1000); setbits32(bcsr_io+4, BCSR4_ETH10_RST); /* Configure port A pins for Txd and Rxd. */ @@ -250,38 +255,37 @@ static void setup_scc3_ioports(void) clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA); setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); - setbits32(bcsr_io+4, BCSR1_ETHEN); + setbits32(bcsr_io+1, BCSR1_ETHEN); iounmap(bcsr_io); } -static int mac_count = 0; - static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) { - struct fs_platform_info *fpi; + struct fs_platform_info *fpi = pdev->dev.platform_data; + + volatile cpm8xx_t *cp; bd_t *bd = (bd_t *) __res; char *e; int i; - if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) { - printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); - return; - } - - fpi = &mpc8xx_enet_pdata[fs_no]; - + /* Get pointer to Communication Processor */ + cp = cpmp; switch (fs_no) { case fsid_fec1: + fpi = &mpc8xx_fec_pdata[0]; fpi->init_ioports = &setup_fec1_ioports; break; case fsid_fec2: + fpi = &mpc8xx_fec_pdata[1]; fpi->init_ioports = &setup_fec2_ioports; break; case fsid_scc3: + fpi = &mpc8xx_scc_pdata; fpi->init_ioports = &setup_scc3_ioports; + mpc885ads_scc_phy_init(fpi->phy_addr); break; default: - printk(KERN_WARNING "Device %s is not supported!\n", pdev->name); + printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); return; } @@ -292,7 +296,7 @@ static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) for (i = 0; i < 6; i++) fpi->macaddr[i] = *e++; - fpi->macaddr[5] += mac_count++; + fpi->macaddr[5 - pdev->id]++; } @@ -315,6 +319,58 @@ static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); } +/* SCC ethernet controller does not have MII management channel. FEC1 MII + * channel is used to communicate with the 10Mbit PHY. + */ + +#define MII_ECNTRL_PINMUX 0x4 +#define FEC_ECNTRL_PINMUX 0x00000004 +#define FEC_RCNTRL_MII_MODE 0x00000004 + +/* Make MII read/write commands. + */ +#define mk_mii_write(REG, VAL, PHY_ADDR) (0x50020000 | (((REG) & 0x1f) << 18) | \ + ((VAL) & 0xffff) | ((PHY_ADDR) << 23)) + +static void mpc885ads_scc_phy_init(char phy_addr) +{ + volatile immap_t *immap; + volatile fec_t *fecp; + bd_t *bd; + + bd = (bd_t *) __res; + immap = (immap_t *) IMAP_ADDR; /* pointer to internal registers */ + fecp = &(immap->im_cpm.cp_fec); + + /* Enable MII pins of the FEC1 + */ + setbits16(&immap->im_ioport.iop_pdpar, 0x0080); + clrbits16(&immap->im_ioport.iop_pddir, 0x0080); + /* Set MII speed to 2.5 MHz + */ + out_be32(&fecp->fec_mii_speed, + ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1); + + /* Enable FEC pin MUX + */ + setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); + setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); + + out_be32(&fecp->fec_mii_data, + mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr)); + udelay(100); + out_be32(&fecp->fec_mii_data, + mk_mii_write(MII_ADVERTISE, + ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr)); + udelay(100); + + /* Disable FEC MII settings + */ + clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); + clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); + out_be32(&fecp->fec_mii_speed, 0); +} + static void setup_smc1_ioports(void) { immap_t *immap = (immap_t *) IMAP_ADDR; @@ -407,9 +463,6 @@ static int mpc885ads_platform_notify(struct device *dev) int __init mpc885ads_init(void) { - struct fs_mii_fec_platform_info* fmpi; - bd_t *bd = (bd_t *) __res; - printk(KERN_NOTICE "mpc885ads: Init\n"); platform_notify = mpc885ads_platform_notify; @@ -419,17 +472,8 @@ int __init mpc885ads_init(void) ppc_sys_device_enable(MPC8xx_CPM_FEC1); - ppc_sys_device_enable(MPC8xx_MDIO_FEC); - fmpi = ppc_sys_platform_devices[MPC8xx_MDIO_FEC].dev.platform_data = - &mpc8xx_mdio_fec_pdata; - - fmpi->mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1; - - /* No PHY interrupt line here */ - fmpi->irq[0xf] = SIU_IRQ7; - #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 - ppc_sys_device_enable(MPC8xx_CPM_SCC3); + ppc_sys_device_enable(MPC8xx_CPM_SCC1); #endif #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c index bb8d4a454..c717cd92c 100644 --- a/arch/ppc/platforms/mvme5100.c +++ b/arch/ppc/platforms/mvme5100.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c index 3da47d9ec..3c3d881df 100644 --- a/arch/ppc/platforms/pal4_setup.c +++ b/arch/ppc/platforms/pal4_setup.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/pcu_e.h b/arch/ppc/platforms/pcu_e.h index a2c03a228..91a820a6f 100644 --- a/arch/ppc/platforms/pcu_e.h +++ b/arch/ppc/platforms/pcu_e.h @@ -7,6 +7,7 @@ #ifndef __MACH_PCU_E_H #define __MACH_PCU_E_H +#include #include diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c index 4d46650e0..c3a86be11 100644 --- a/arch/ppc/platforms/powerpmc250.c +++ b/arch/ppc/platforms/powerpmc250.c @@ -11,6 +11,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c index 9778105d4..de2761ebe 100644 --- a/arch/ppc/platforms/pplus.c +++ b/arch/ppc/platforms/pplus.c @@ -13,6 +13,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index 2b287f4e0..6b26dd36c 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h @@ -9,6 +9,7 @@ #ifndef __MACH_ADS8260_DEFS #define __MACH_ADS8260_DEFS +#include #include diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h index 672483df8..8f14a43ea 100644 --- a/arch/ppc/platforms/pq2ads_pd.h +++ b/arch/ppc/platforms/pq2ads_pd.h @@ -29,4 +29,86 @@ #define F3_RXCLK 13 #define F3_TXCLK 14 +/* Automatically generates register configurations */ +#define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ + +#define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ +#define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ +#define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ +#define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ +#define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ +#define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ + +#define PC_F1RXCLK PC_CLK(F1_RXCLK) +#define PC_F1TXCLK PC_CLK(F1_TXCLK) +#define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) +#define CMX1_CLK_MASK ((uint)0xff000000) + +#define PC_F2RXCLK PC_CLK(F2_RXCLK) +#define PC_F2TXCLK PC_CLK(F2_TXCLK) +#define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) +#define CMX2_CLK_MASK ((uint)0x00ff0000) + +#define PC_F3RXCLK PC_CLK(F3_RXCLK) +#define PC_F3TXCLK PC_CLK(F3_TXCLK) +#define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) +#define CMX3_CLK_MASK ((uint)0x0000ff00) + +/* I/O Pin assignment for FCC1. I don't yet know the best way to do this, + * but there is little variation among the choices. + */ +#define PA1_COL 0x00000001U +#define PA1_CRS 0x00000002U +#define PA1_TXER 0x00000004U +#define PA1_TXEN 0x00000008U +#define PA1_RXDV 0x00000010U +#define PA1_RXER 0x00000020U +#define PA1_TXDAT 0x00003c00U +#define PA1_RXDAT 0x0003c000U +#define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) +#define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ + PA1_RXDV | PA1_RXER) +#define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) +#define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) + + +/* I/O Pin assignment for FCC2. I don't yet know the best way to do this, + * but there is little variation among the choices. + */ +#define PB2_TXER 0x00000001U +#define PB2_RXDV 0x00000002U +#define PB2_TXEN 0x00000004U +#define PB2_RXER 0x00000008U +#define PB2_COL 0x00000010U +#define PB2_CRS 0x00000020U +#define PB2_TXDAT 0x000003c0U +#define PB2_RXDAT 0x00003c00U +#define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ + PB2_RXER | PB2_RXDV | PB2_TXER) +#define PB2_PSORB1 (PB2_TXEN) +#define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) +#define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) + + +/* I/O Pin assignment for FCC3. I don't yet know the best way to do this, + * but there is little variation among the choices. + */ +#define PB3_RXDV 0x00004000U +#define PB3_RXER 0x00008000U +#define PB3_TXER 0x00010000U +#define PB3_TXEN 0x00020000U +#define PB3_COL 0x00040000U +#define PB3_CRS 0x00080000U +#define PB3_TXDAT 0x0f000000U +#define PB3_RXDAT 0x00f00000U +#define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ + PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) +#define PB3_PSORB1 0 +#define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) +#define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) + +#define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) +#define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) +#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) + #endif diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c index c627ba413..e50b99968 100644 --- a/arch/ppc/platforms/prep_pci.c +++ b/arch/ppc/platforms/prep_pci.c @@ -6,6 +6,7 @@ * The motherboard routes/maps will disappear shortly. -- Cort */ +#include #include #include #include diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index 1cb75a1f8..e86f6156d 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c @@ -11,6 +11,7 @@ * bootup setup stuff.. */ +#include #include #include #include @@ -23,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c index fcab513e2..cdd9cfb13 100644 --- a/arch/ppc/platforms/prpmc750.c +++ b/arch/ppc/platforms/prpmc750.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c index f4ade5cd7..e459a199f 100644 --- a/arch/ppc/platforms/prpmc800.c +++ b/arch/ppc/platforms/prpmc800.c @@ -7,6 +7,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 3bb530af0..bc26b6d71 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c @@ -18,6 +18,7 @@ * SCSI / VGA. */ +#include #include #include #include @@ -1310,7 +1311,7 @@ static void ppc7d_init2(void) /* Hook up i8259 interrupt which is connected to GPP28 */ request_irq(mv64360_irq_base + MV64x60_IRQ_GPP28, ppc7d_i8259_intr, - IRQF_DISABLED, "I8259 (GPP28) interrupt", (void *)0); + SA_INTERRUPT, "I8259 (GPP28) interrupt", (void *)0); /* Configure MPP16 as watchdog NMI, MPP17 as watchdog WDE */ spin_lock_irqsave(&mv64x60_lock, flags); diff --git a/arch/ppc/platforms/rpxclassic.h b/arch/ppc/platforms/rpxclassic.h index 57a2a55da..6daa10949 100644 --- a/arch/ppc/platforms/rpxclassic.h +++ b/arch/ppc/platforms/rpxclassic.h @@ -8,6 +8,7 @@ #ifndef __MACH_RPX_DEFS #define __MACH_RPX_DEFS +#include #ifndef __ASSEMBLY__ /* A Board Information structure that is given to a program when diff --git a/arch/ppc/platforms/rpxlite.h b/arch/ppc/platforms/rpxlite.h index 719780646..deee5bd36 100644 --- a/arch/ppc/platforms/rpxlite.h +++ b/arch/ppc/platforms/rpxlite.h @@ -8,6 +8,7 @@ #ifndef __MACH_RPX_DEFS #define __MACH_RPX_DEFS +#include #ifndef __ASSEMBLY__ /* A Board Information structure that is given to a program when diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index a76002af6..6dc459dec 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c @@ -60,6 +60,7 @@ * found, we can hopefully stop hardcoding 32MB of RAM. */ +#include #include #include #include diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 60b769c7f..866807b4a 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c @@ -13,6 +13,7 @@ * option) any later version. */ +#include #include #include #include @@ -145,7 +146,7 @@ static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *re static struct irqaction sbc82xx_i8259_irqaction = { .handler = sbc82xx_i8259_demux, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "i8259 demux", }; @@ -171,7 +172,7 @@ void __init sbc82xx_init_IRQ(void) /* Set up the interrupt handlers for the i8259 IRQs */ for (i = NR_SIU_INTS; i < NR_SIU_INTS + 8; i++) { - irq_desc[i].chip = &sbc82xx_i8259_ic; + irq_desc[i].handler = &sbc82xx_i8259_ic; irq_desc[i].status |= IRQ_LEVEL; } diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c index 3c7842784..3783deccd 100644 --- a/arch/ppc/platforms/spruce.c +++ b/arch/ppc/platforms/spruce.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include diff --git a/arch/ppc/platforms/tqm8260.h b/arch/ppc/platforms/tqm8260.h index 7f8c9a692..c7a78a646 100644 --- a/arch/ppc/platforms/tqm8260.h +++ b/arch/ppc/platforms/tqm8260.h @@ -7,6 +7,7 @@ #ifndef __TQM8260_PLATFORM #define __TQM8260_PLATFORM +#include #include diff --git a/arch/ppc/platforms/tqm8xx.h b/arch/ppc/platforms/tqm8xx.h index 662131d0e..43ac064eb 100644 --- a/arch/ppc/platforms/tqm8xx.h +++ b/arch/ppc/platforms/tqm8xx.h @@ -8,6 +8,7 @@ #ifndef __MACH_TQM8xx_H #define __MACH_TQM8xx_H +#include #include diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index dca23f2ef..490749ca8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile @@ -93,7 +93,7 @@ obj-$(CONFIG_PCI) += pci_auto.o endif obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \ - mpc83xx_sys.o mpc83xx_devices.o ipic.o + mpc83xx_sys.o mpc83xx_devices.o ifeq ($(CONFIG_83xx),y) obj-$(CONFIG_PCI) += pci_auto.o endif @@ -104,5 +104,3 @@ obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o \ ifeq ($(CONFIG_PPC_MPC52xx),y) obj-$(CONFIG_PCI) += mpc52xx_pci.o endif - -obj-$(CONFIG_PPC_I8259) += i8259.o diff --git a/arch/ppc/syslib/btext.c b/arch/ppc/syslib/btext.c index d11667046..12fa83e67 100644 --- a/arch/ppc/syslib/btext.c +++ b/arch/ppc/syslib/btext.c @@ -3,10 +3,11 @@ * * Benjamin Herrenschmidt */ +#include #include #include #include -#include +#include #include #include diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 172aa215f..5add0a919 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c @@ -140,12 +140,12 @@ cpc700_init_IRQ(void) /* IRQ 0 is highest */ for (i = 0; i < 17; i++) { - irq_desc[i].chip = &cpc700_pic; + irq_desc[i].handler = &cpc700_pic; cpc700_pic_init_irq(i); } for (i = 20; i < 32; i++) { - irq_desc[i].chip = &cpc700_pic; + irq_desc[i].handler = &cpc700_pic; cpc700_pic_init_irq(i); } diff --git a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c index c0fee0beb..29d95d415 100644 --- a/arch/ppc/syslib/cpm2_pic.c +++ b/arch/ppc/syslib/cpm2_pic.c @@ -171,7 +171,7 @@ void cpm2_init_IRQ(void) /* Enable chaining to OpenPIC, and make everything level */ for (i = 0; i < NR_CPM_INTS; i++) { - irq_desc[i+CPM_IRQ_OFFSET].chip = &cpm2_pic; + irq_desc[i+CPM_IRQ_OFFSET].handler = &cpm2_pic; irq_desc[i+CPM_IRQ_OFFSET].status |= IRQ_LEVEL; } } diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c index 9293f5c59..9fcff74bf 100644 --- a/arch/ppc/syslib/gen550_dbg.c +++ b/arch/ppc/syslib/gen550_dbg.c @@ -14,6 +14,7 @@ * or implied. */ +#include #include #include #include /* For linux/serial_core.h */ diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c index 987cc0414..874078a76 100644 --- a/arch/ppc/syslib/gen550_kgdb.c +++ b/arch/ppc/syslib/gen550_kgdb.c @@ -15,6 +15,7 @@ * or implied. */ +#include #include #include diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index 7fd550a7d..dc3bd9ecb 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c @@ -98,7 +98,7 @@ gt64260_init_irq(void) /* use the gt64260 for all (possible) interrupt sources */ for (i = gt64260_irq_base; i < (gt64260_irq_base + 96); i++) - irq_desc[i].chip = >64260_pic; + irq_desc[i].handler = >64260_pic; if (ppc_md.progress) ppc_md.progress("gt64260_init_irq: exit", 0x0); @@ -297,7 +297,7 @@ gt64260_register_hdlrs(void) /* Register CPU interface error interrupt handler */ if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, - gt64260_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) + gt64260_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) printk(KERN_WARNING "Can't register cpu error handler: %d", rc); mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); @@ -305,7 +305,7 @@ gt64260_register_hdlrs(void) /* Register PCI 0 error interrupt handler */ if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler, - IRQF_DISABLED, PCI0_INTR_STR, (void *)0))) + SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) printk(KERN_WARNING "Can't register pci 0 error handler: %d", rc); @@ -314,7 +314,7 @@ gt64260_register_hdlrs(void) /* Register PCI 1 error interrupt handler */ if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler, - IRQF_DISABLED, PCI1_INTR_STR, (void *)1))) + SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) printk(KERN_WARNING "Can't register pci 1 error handler: %d", rc); diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c deleted file mode 100644 index eb35353af..000000000 --- a/arch/ppc/syslib/i8259.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * i8259 interrupt controller driver. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#include -#include -#include -#include -#include - -static volatile void __iomem *pci_intack; /* RO, gives us the irq vector */ - -static unsigned char cached_8259[2] = { 0xff, 0xff }; -#define cached_A1 (cached_8259[0]) -#define cached_21 (cached_8259[1]) - -static DEFINE_SPINLOCK(i8259_lock); - -static int i8259_pic_irq_offset; - -/* - * Acknowledge the IRQ using either the PCI host bridge's interrupt - * acknowledge feature or poll. How i8259_init() is called determines - * which is called. It should be noted that polling is broken on some - * IBM and Motorola PReP boxes so we must use the int-ack feature on them. - */ -int i8259_irq(struct pt_regs *regs) -{ - int irq; - - spin_lock(&i8259_lock); - - /* Either int-ack or poll for the IRQ */ - if (pci_intack) - irq = readb(pci_intack); - else { - /* Perform an interrupt acknowledge cycle on controller 1. */ - outb(0x0C, 0x20); /* prepare for poll */ - irq = inb(0x20) & 7; - if (irq == 2 ) { - /* - * Interrupt is cascaded so perform interrupt - * acknowledge on controller 2. - */ - outb(0x0C, 0xA0); /* prepare for poll */ - irq = (inb(0xA0) & 7) + 8; - } - } - - if (irq == 7) { - /* - * This may be a spurious interrupt. - * - * Read the interrupt status register (ISR). If the most - * significant bit is not set then there is no valid - * interrupt. - */ - if (!pci_intack) - outb(0x0B, 0x20); /* ISR register */ - if(~inb(0x20) & 0x80) - irq = -1; - } - - spin_unlock(&i8259_lock); - return irq + i8259_pic_irq_offset; -} - -static void i8259_mask_and_ack_irq(unsigned int irq_nr) -{ - unsigned long flags; - - spin_lock_irqsave(&i8259_lock, flags); - irq_nr -= i8259_pic_irq_offset; - if (irq_nr > 7) { - cached_A1 |= 1 << (irq_nr-8); - inb(0xA1); /* DUMMY */ - outb(cached_A1, 0xA1); - outb(0x20, 0xA0); /* Non-specific EOI */ - outb(0x20, 0x20); /* Non-specific EOI to cascade */ - } else { - cached_21 |= 1 << irq_nr; - inb(0x21); /* DUMMY */ - outb(cached_21, 0x21); - outb(0x20, 0x20); /* Non-specific EOI */ - } - spin_unlock_irqrestore(&i8259_lock, flags); -} - -static void i8259_set_irq_mask(int irq_nr) -{ - outb(cached_A1,0xA1); - outb(cached_21,0x21); -} - -static void i8259_mask_irq(unsigned int irq_nr) -{ - unsigned long flags; - - spin_lock_irqsave(&i8259_lock, flags); - irq_nr -= i8259_pic_irq_offset; - if (irq_nr < 8) - cached_21 |= 1 << irq_nr; - else - cached_A1 |= 1 << (irq_nr-8); - i8259_set_irq_mask(irq_nr); - spin_unlock_irqrestore(&i8259_lock, flags); -} - -static void i8259_unmask_irq(unsigned int irq_nr) -{ - unsigned long flags; - - spin_lock_irqsave(&i8259_lock, flags); - irq_nr -= i8259_pic_irq_offset; - if (irq_nr < 8) - cached_21 &= ~(1 << irq_nr); - else - cached_A1 &= ~(1 << (irq_nr-8)); - i8259_set_irq_mask(irq_nr); - spin_unlock_irqrestore(&i8259_lock, flags); -} - -static struct irq_chip i8259_pic = { - .typename = " i8259 ", - .mask = i8259_mask_irq, - .unmask = i8259_unmask_irq, - .mask_ack = i8259_mask_and_ack_irq, -}; - -static struct resource pic1_iores = { - .name = "8259 (master)", - .start = 0x20, - .end = 0x21, - .flags = IORESOURCE_BUSY, -}; - -static struct resource pic2_iores = { - .name = "8259 (slave)", - .start = 0xa0, - .end = 0xa1, - .flags = IORESOURCE_BUSY, -}; - -static struct resource pic_edgectrl_iores = { - .name = "8259 edge control", - .start = 0x4d0, - .end = 0x4d1, - .flags = IORESOURCE_BUSY, -}; - -static struct irqaction i8259_irqaction = { - .handler = no_action, - .flags = SA_INTERRUPT, - .mask = CPU_MASK_NONE, - .name = "82c59 secondary cascade", -}; - -/* - * i8259_init() - * intack_addr - PCI interrupt acknowledge (real) address which will return - * the active irq from the 8259 - */ -void __init i8259_init(unsigned long intack_addr, int offset) -{ - unsigned long flags; - int i; - - spin_lock_irqsave(&i8259_lock, flags); - i8259_pic_irq_offset = offset; - - /* init master interrupt controller */ - outb(0x11, 0x20); /* Start init sequence */ - outb(0x00, 0x21); /* Vector base */ - outb(0x04, 0x21); /* edge tiggered, Cascade (slave) on IRQ2 */ - outb(0x01, 0x21); /* Select 8086 mode */ - - /* init slave interrupt controller */ - outb(0x11, 0xA0); /* Start init sequence */ - outb(0x08, 0xA1); /* Vector base */ - outb(0x02, 0xA1); /* edge triggered, Cascade (slave) on IRQ2 */ - outb(0x01, 0xA1); /* Select 8086 mode */ - - /* always read ISR */ - outb(0x0B, 0x20); - outb(0x0B, 0xA0); - - /* Mask all interrupts */ - outb(cached_A1, 0xA1); - outb(cached_21, 0x21); - - spin_unlock_irqrestore(&i8259_lock, flags); - - for (i = 0; i < NUM_ISA_INTERRUPTS; ++i) { - set_irq_chip_and_handler(offset + i, &i8259_pic, - handle_level_irq); - irq_desc[offset + i].status |= IRQ_LEVEL; - } - - /* reserve our resources */ - setup_irq(offset + 2, &i8259_irqaction); - request_resource(&ioport_resource, &pic1_iores); - request_resource(&ioport_resource, &pic2_iores); - request_resource(&ioport_resource, &pic_edgectrl_iores); - - if (intack_addr != 0) - pci_intack = ioremap(intack_addr, 1); - -} diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index a3927ec9b..fbaae5f6d 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h index 94d783503..f48529f3c 100644 --- a/arch/ppc/syslib/ibm440gp_common.h +++ b/arch/ppc/syslib/ibm440gp_common.h @@ -16,6 +16,7 @@ #ifndef __ASSEMBLY__ +#include #include #include diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index 4b77e6c8c..f6cc16888 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c @@ -10,6 +10,7 @@ * option) any later version. * */ +#include #include #include #include @@ -149,7 +150,7 @@ void __init ibm440gx_l2c_enable(void){ unsigned long flags; /* Install error handler */ - if (request_irq(87, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0){ + if (request_irq(87, l2c_error_handler, SA_INTERRUPT, "L2C", 0) < 0){ printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n"); return; } diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h index 8d6f203e7..a03ec6022 100644 --- a/arch/ppc/syslib/ibm440gx_common.h +++ b/arch/ppc/syslib/ibm440gx_common.h @@ -16,6 +16,7 @@ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c index 571f8bcf7..293e4138d 100644 --- a/arch/ppc/syslib/ibm440sp_common.c +++ b/arch/ppc/syslib/ibm440sp_common.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 01f99b4a6..14a981a5c 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c deleted file mode 100644 index 46801f5ec..000000000 --- a/arch/ppc/syslib/ipic.c +++ /dev/null @@ -1,646 +0,0 @@ -/* - * include/asm-ppc/ipic.c - * - * IPIC routines implementations. - * - * Copyright 2005 Freescale Semiconductor, 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. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ipic.h" - -static struct ipic p_ipic; -static struct ipic * primary_ipic; - -static struct ipic_info ipic_info[] = { - [9] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 24, - .prio_mask = 0, - }, - [10] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 25, - .prio_mask = 1, - }, - [11] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 26, - .prio_mask = 2, - }, - [14] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 29, - .prio_mask = 5, - }, - [15] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 30, - .prio_mask = 6, - }, - [16] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 31, - .prio_mask = 7, - }, - [17] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_A, - .force = IPIC_SEFCR, - .bit = 1, - .prio_mask = 5, - }, - [18] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_A, - .force = IPIC_SEFCR, - .bit = 2, - .prio_mask = 6, - }, - [19] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_A, - .force = IPIC_SEFCR, - .bit = 3, - .prio_mask = 7, - }, - [20] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_B, - .force = IPIC_SEFCR, - .bit = 4, - .prio_mask = 4, - }, - [21] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_B, - .force = IPIC_SEFCR, - .bit = 5, - .prio_mask = 5, - }, - [22] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_B, - .force = IPIC_SEFCR, - .bit = 6, - .prio_mask = 6, - }, - [23] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_B, - .force = IPIC_SEFCR, - .bit = 7, - .prio_mask = 7, - }, - [32] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 0, - .prio_mask = 0, - }, - [33] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 1, - .prio_mask = 1, - }, - [34] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 2, - .prio_mask = 2, - }, - [35] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 3, - .prio_mask = 3, - }, - [36] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 4, - .prio_mask = 4, - }, - [37] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 5, - .prio_mask = 5, - }, - [38] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 6, - .prio_mask = 6, - }, - [39] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_A, - .force = IPIC_SIFCR_H, - .bit = 7, - .prio_mask = 7, - }, - [48] = { - .pend = IPIC_SEPNR, - .mask = IPIC_SEMSR, - .prio = IPIC_SMPRR_A, - .force = IPIC_SEFCR, - .bit = 0, - .prio_mask = 4, - }, - [64] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_A, - .force = IPIC_SIFCR_L, - .bit = 0, - .prio_mask = 0, - }, - [65] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_A, - .force = IPIC_SIFCR_L, - .bit = 1, - .prio_mask = 1, - }, - [66] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_A, - .force = IPIC_SIFCR_L, - .bit = 2, - .prio_mask = 2, - }, - [67] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_A, - .force = IPIC_SIFCR_L, - .bit = 3, - .prio_mask = 3, - }, - [68] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_B, - .force = IPIC_SIFCR_L, - .bit = 4, - .prio_mask = 0, - }, - [69] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_B, - .force = IPIC_SIFCR_L, - .bit = 5, - .prio_mask = 1, - }, - [70] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_B, - .force = IPIC_SIFCR_L, - .bit = 6, - .prio_mask = 2, - }, - [71] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = IPIC_SMPRR_B, - .force = IPIC_SIFCR_L, - .bit = 7, - .prio_mask = 3, - }, - [72] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 8, - }, - [73] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 9, - }, - [74] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 10, - }, - [75] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 11, - }, - [76] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 12, - }, - [77] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 13, - }, - [78] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 14, - }, - [79] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 15, - }, - [80] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 16, - }, - [84] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 20, - }, - [85] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 21, - }, - [90] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 26, - }, - [91] = { - .pend = IPIC_SIPNR_H, - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 27, - }, -}; - -static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg) -{ - return in_be32(base + (reg >> 2)); -} - -static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 value) -{ - out_be32(base + (reg >> 2), value); -} - -static inline struct ipic * ipic_from_irq(unsigned int irq) -{ - return primary_ipic; -} - -static void ipic_enable_irq(unsigned int irq) -{ - struct ipic *ipic = ipic_from_irq(irq); - unsigned int src = irq - ipic->irq_offset; - u32 temp; - - temp = ipic_read(ipic->regs, ipic_info[src].mask); - temp |= (1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].mask, temp); -} - -static void ipic_disable_irq(unsigned int irq) -{ - struct ipic *ipic = ipic_from_irq(irq); - unsigned int src = irq - ipic->irq_offset; - u32 temp; - - temp = ipic_read(ipic->regs, ipic_info[src].mask); - temp &= ~(1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].mask, temp); -} - -static void ipic_disable_irq_and_ack(unsigned int irq) -{ - struct ipic *ipic = ipic_from_irq(irq); - unsigned int src = irq - ipic->irq_offset; - u32 temp; - - ipic_disable_irq(irq); - - temp = ipic_read(ipic->regs, ipic_info[src].pend); - temp |= (1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].pend, temp); -} - -static void ipic_end_irq(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - ipic_enable_irq(irq); -} - -struct hw_interrupt_type ipic = { - .typename = " IPIC ", - .enable = ipic_enable_irq, - .disable = ipic_disable_irq, - .ack = ipic_disable_irq_and_ack, - .end = ipic_end_irq, -}; - -void __init ipic_init(phys_addr_t phys_addr, - unsigned int flags, - unsigned int irq_offset, - unsigned char *senses, - unsigned int senses_count) -{ - u32 i, temp = 0; - - primary_ipic = &p_ipic; - primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE); - - primary_ipic->irq_offset = irq_offset; - - ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0); - - /* default priority scheme is grouped. If spread mode is required - * configure SICFR accordingly */ - if (flags & IPIC_SPREADMODE_GRP_A) - temp |= SICFR_IPSA; - if (flags & IPIC_SPREADMODE_GRP_D) - temp |= SICFR_IPSD; - if (flags & IPIC_SPREADMODE_MIX_A) - temp |= SICFR_MPSA; - if (flags & IPIC_SPREADMODE_MIX_B) - temp |= SICFR_MPSB; - - ipic_write(primary_ipic->regs, IPIC_SICNR, temp); - - /* handle MCP route */ - temp = 0; - if (flags & IPIC_DISABLE_MCP_OUT) - temp = SERCR_MCPR; - ipic_write(primary_ipic->regs, IPIC_SERCR, temp); - - /* handle routing of IRQ0 to MCP */ - temp = ipic_read(primary_ipic->regs, IPIC_SEMSR); - - if (flags & IPIC_IRQ0_MCP) - temp |= SEMSR_SIRQ0; - else - temp &= ~SEMSR_SIRQ0; - - ipic_write(primary_ipic->regs, IPIC_SEMSR, temp); - - for (i = 0 ; i < NR_IPIC_INTS ; i++) { - irq_desc[i+irq_offset].chip = &ipic; - irq_desc[i+irq_offset].status = IRQ_LEVEL; - } - - temp = 0; - for (i = 0 ; i < senses_count ; i++) { - if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) { - temp |= 1 << (15 - i); - if (i != 0) - irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0; - else - irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0; - } - } - ipic_write(primary_ipic->regs, IPIC_SECNR, temp); - - printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS, - senses_count, primary_ipic->regs); -} - -int ipic_set_priority(unsigned int irq, unsigned int priority) -{ - struct ipic *ipic = ipic_from_irq(irq); - unsigned int src = irq - ipic->irq_offset; - u32 temp; - - if (priority > 7) - return -EINVAL; - if (src > 127) - return -EINVAL; - if (ipic_info[src].prio == 0) - return -EINVAL; - - temp = ipic_read(ipic->regs, ipic_info[src].prio); - - if (priority < 4) { - temp &= ~(0x7 << (20 + (3 - priority) * 3)); - temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3); - } else { - temp &= ~(0x7 << (4 + (7 - priority) * 3)); - temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3); - } - - ipic_write(ipic->regs, ipic_info[src].prio, temp); - - return 0; -} - -void ipic_set_highest_priority(unsigned int irq) -{ - struct ipic *ipic = ipic_from_irq(irq); - unsigned int src = irq - ipic->irq_offset; - u32 temp; - - temp = ipic_read(ipic->regs, IPIC_SICFR); - - /* clear and set HPI */ - temp &= 0x7f000000; - temp |= (src & 0x7f) << 24; - - ipic_write(ipic->regs, IPIC_SICFR, temp); -} - -void ipic_set_default_priority(void) -{ - ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0); - ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1); - ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2); - ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3); - ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4); - ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5); - ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6); - ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7); - - ipic_set_priority(MPC83xx_IRQ_UART1, 0); - ipic_set_priority(MPC83xx_IRQ_UART2, 1); - ipic_set_priority(MPC83xx_IRQ_SEC2, 2); - ipic_set_priority(MPC83xx_IRQ_IIC1, 5); - ipic_set_priority(MPC83xx_IRQ_IIC2, 6); - ipic_set_priority(MPC83xx_IRQ_SPI, 7); - ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0); - ipic_set_priority(MPC83xx_IRQ_PIT, 1); - ipic_set_priority(MPC83xx_IRQ_PCI1, 2); - ipic_set_priority(MPC83xx_IRQ_PCI2, 3); - ipic_set_priority(MPC83xx_IRQ_EXT0, 4); - ipic_set_priority(MPC83xx_IRQ_EXT1, 5); - ipic_set_priority(MPC83xx_IRQ_EXT2, 6); - ipic_set_priority(MPC83xx_IRQ_EXT3, 7); - ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0); - ipic_set_priority(MPC83xx_IRQ_MU, 1); - ipic_set_priority(MPC83xx_IRQ_SBA, 2); - ipic_set_priority(MPC83xx_IRQ_DMA, 3); - ipic_set_priority(MPC83xx_IRQ_EXT4, 4); - ipic_set_priority(MPC83xx_IRQ_EXT5, 5); - ipic_set_priority(MPC83xx_IRQ_EXT6, 6); - ipic_set_priority(MPC83xx_IRQ_EXT7, 7); -} - -void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) -{ - struct ipic *ipic = primary_ipic; - u32 temp; - - temp = ipic_read(ipic->regs, IPIC_SERMR); - temp |= (1 << (31 - mcp_irq)); - ipic_write(ipic->regs, IPIC_SERMR, temp); -} - -void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq) -{ - struct ipic *ipic = primary_ipic; - u32 temp; - - temp = ipic_read(ipic->regs, IPIC_SERMR); - temp &= (1 << (31 - mcp_irq)); - ipic_write(ipic->regs, IPIC_SERMR, temp); -} - -u32 ipic_get_mcp_status(void) -{ - return ipic_read(primary_ipic->regs, IPIC_SERMR); -} - -void ipic_clear_mcp_status(u32 mask) -{ - ipic_write(primary_ipic->regs, IPIC_SERMR, mask); -} - -/* Return an interrupt vector or -1 if no interrupt is pending. */ -int ipic_get_irq(struct pt_regs *regs) -{ - int irq; - - irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f; - - if (irq == 0) /* 0 --> no irq is pending */ - irq = -1; - - return irq; -} - -static struct sysdev_class ipic_sysclass = { - set_kset_name("ipic"), -}; - -static struct sys_device device_ipic = { - .id = 0, - .cls = &ipic_sysclass, -}; - -static int __init init_ipic_sysfs(void) -{ - int rc; - - if (!primary_ipic->regs) - return -ENODEV; - printk(KERN_DEBUG "Registering ipic with sysfs...\n"); - - rc = sysdev_class_register(&ipic_sysclass); - if (rc) { - printk(KERN_ERR "Failed registering ipic sys class\n"); - return -ENODEV; - } - rc = sysdev_register(&device_ipic); - if (rc) { - printk(KERN_ERR "Failed registering ipic sys device\n"); - return -ENODEV; - } - return 0; -} - -subsys_initcall(init_ipic_sysfs); diff --git a/arch/ppc/syslib/ipic.h b/arch/ppc/syslib/ipic.h deleted file mode 100644 index a60c9d18b..000000000 --- a/arch/ppc/syslib/ipic.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * IPIC private definitions and structure. - * - * Maintainer: Kumar Gala - * - * Copyright 2005 Freescale Semiconductor, 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. - */ -#ifndef __IPIC_H__ -#define __IPIC_H__ - -#include - -#define MPC83xx_IPIC_SIZE (0x00100) - -/* System Global Interrupt Configuration Register */ -#define SICFR_IPSA 0x00010000 -#define SICFR_IPSD 0x00080000 -#define SICFR_MPSA 0x00200000 -#define SICFR_MPSB 0x00400000 - -/* System External Interrupt Mask Register */ -#define SEMSR_SIRQ0 0x00008000 - -/* System Error Control Register */ -#define SERCR_MCPR 0x00000001 - -struct ipic { - volatile u32 __iomem *regs; - unsigned int irq_offset; -}; - -struct ipic_info { - u8 pend; /* pending register offset from base */ - u8 mask; /* mask register offset from base */ - u8 prio; /* priority register offset from base */ - u8 force; /* force register offset from base */ - u8 bit; /* register bit position (as per doc) - bit mask = 1 << (31 - bit) */ - u8 prio_mask; /* priority mask value */ -}; - -#endif /* __IPIC_H__ */ diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 974581ea4..99e4bc0e4 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c @@ -15,6 +15,7 @@ * or implied. */ #include +#include #include #include #include diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 15f0d7323..b7a6cb2d8 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c @@ -6,6 +6,7 @@ * Further modified for generic 8xx and 8260 by Dan. */ +#include #include #include #include diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c index d3fa264e1..1941a8c7c 100644 --- a/arch/ppc/syslib/m82xx_pci.c +++ b/arch/ppc/syslib/m82xx_pci.c @@ -139,7 +139,7 @@ pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction pq2pci_irqaction = { .handler = pq2pci_irq_demux, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, .name = "PQ2 PCI cascade", }; @@ -159,7 +159,7 @@ pq2pci_init_irq(void) immap->im_memctl.memc_or8 = 0xffff8010; #endif for (irq = NR_CPM_INTS; irq < NR_CPM_INTS + 4; irq++) - irq_desc[irq].chip = &pq2pci_ic; + irq_desc[irq].handler = &pq2pci_ic; /* make PCI IRQ level sensitive */ immap->im_intctl.ic_siexr &= diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 54303a7b4..dae9af78b 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c @@ -10,6 +10,7 @@ * bootup setup stuff.. */ +#include #include #include #include @@ -346,13 +347,13 @@ m8xx_init_IRQ(void) int i; for (i = SIU_IRQ_OFFSET ; i < SIU_IRQ_OFFSET + NR_SIU_INTS ; i++) - irq_desc[i].chip = &ppc8xx_pic; + irq_desc[i].handler = &ppc8xx_pic; cpm_interrupt_init(); #if defined(CONFIG_PCI) for (i = I8259_IRQ_OFFSET ; i < I8259_IRQ_OFFSET + NR_8259_INTS ; i++) - irq_desc[i].chip = &i8259_pic; + irq_desc[i].handler = &i8259_pic; i8259_pic_irq_offset = I8259_IRQ_OFFSET; i8259_init(0); diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 20a0eac0d..5a5a7a9cd 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c @@ -11,6 +11,7 @@ * kind, whether express or implied. */ +#include #include diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c index 6425b5cee..c4406f9dc 100644 --- a/arch/ppc/syslib/mpc52xx_pic.c +++ b/arch/ppc/syslib/mpc52xx_pic.c @@ -204,9 +204,9 @@ mpc52xx_init_irq(void) out_be32(&intr->main_pri1, 0); out_be32(&intr->main_pri2, 0); - /* Initialize irq_desc[i].chip's with mpc52xx_ic. */ + /* Initialize irq_desc[i].handler's with mpc52xx_ic. */ for (i = 0; i < NR_IRQS; i++) { - irq_desc[i].chip = &mpc52xx_ic; + irq_desc[i].handler = &mpc52xx_ic; irq_desc[i].status = IRQ_LEVEL; } diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index 80c609019..ee6379bb4 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c @@ -15,6 +15,7 @@ * kind, whether express or implied. */ +#include #include #include diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index 5c4932ca8..1af2c000f 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c @@ -186,7 +186,7 @@ struct platform_device ppc_sys_platform_devices[] = { }, }, [MPC83xx_USB2_DR] = { - .name = "fsl-ehci", + .name = "fsl-usb2-dr", .id = 1, .num_resources = 2, .resource = (struct resource[]) { @@ -203,8 +203,8 @@ struct platform_device ppc_sys_platform_devices[] = { }, }, [MPC83xx_USB2_MPH] = { - .name = "fsl-ehci", - .id = 2, + .name = "fsl-usb2-mph", + .id = 1, .num_resources = 2, .resource = (struct resource[]) { { diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 325136e5a..7735336f5 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include /* We use offsets for IORESOURCE_MEM since we do not know at compile time * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup @@ -84,60 +82,6 @@ static struct fsl_i2c_platform_data mpc85xx_fsl_i2c2_pdata = { .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, }; -static struct fs_platform_info mpc85xx_fcc1_pdata = { - .fs_no = fsid_fcc1, - .cp_page = CPM_CR_FCC1_PAGE, - .cp_block = CPM_CR_FCC1_SBLOCK, - - .rx_ring = 32, - .tx_ring = 32, - .rx_copybreak = 240, - .use_napi = 0, - .napi_weight = 17, - - .clk_mask = CMX1_CLK_MASK, - .clk_route = CMX1_CLK_ROUTE, - .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), - - .mem_offset = FCC1_MEM_OFFSET, -}; - -static struct fs_platform_info mpc85xx_fcc2_pdata = { - .fs_no = fsid_fcc2, - .cp_page = CPM_CR_FCC2_PAGE, - .cp_block = CPM_CR_FCC2_SBLOCK, - - .rx_ring = 32, - .tx_ring = 32, - .rx_copybreak = 240, - .use_napi = 0, - .napi_weight = 17, - - .clk_mask = CMX2_CLK_MASK, - .clk_route = CMX2_CLK_ROUTE, - .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), - - .mem_offset = FCC2_MEM_OFFSET, -}; - -static struct fs_platform_info mpc85xx_fcc3_pdata = { - .fs_no = fsid_fcc3, - .cp_page = CPM_CR_FCC3_PAGE, - .cp_block = CPM_CR_FCC3_SBLOCK, - - .rx_ring = 32, - .tx_ring = 32, - .rx_copybreak = 240, - .use_napi = 0, - .napi_weight = 17, - - .clk_mask = CMX3_CLK_MASK, - .clk_route = CMX3_CLK_ROUTE, - .clk_trx = (PC_F3RXCLK | PC_F3TXCLK), - - .mem_offset = FCC3_MEM_OFFSET, -}; - static struct plat_serial8250_port serial_platform_data[] = { [0] = { .mapbase = 0x4500, @@ -374,27 +318,18 @@ struct platform_device ppc_sys_platform_devices[] = { [MPC85xx_CPM_FCC1] = { .name = "fsl-cpm-fcc", .id = 1, - .num_resources = 4, - .dev.platform_data = &mpc85xx_fcc1_pdata, + .num_resources = 3, .resource = (struct resource[]) { { - .name = "fcc_regs", .start = 0x91300, .end = 0x9131F, .flags = IORESOURCE_MEM, }, { - .name = "fcc_regs_c", .start = 0x91380, .end = 0x9139F, .flags = IORESOURCE_MEM, }, - { - .name = "fcc_pram", - .start = 0x88400, - .end = 0x884ff, - .flags = IORESOURCE_MEM, - }, { .start = SIU_INT_FCC1, .end = SIU_INT_FCC1, @@ -405,27 +340,18 @@ struct platform_device ppc_sys_platform_devices[] = { [MPC85xx_CPM_FCC2] = { .name = "fsl-cpm-fcc", .id = 2, - .num_resources = 4, - .dev.platform_data = &mpc85xx_fcc2_pdata, + .num_resources = 3, .resource = (struct resource[]) { { - .name = "fcc_regs", .start = 0x91320, .end = 0x9133F, .flags = IORESOURCE_MEM, }, { - .name = "fcc_regs_c", .start = 0x913A0, .end = 0x913CF, .flags = IORESOURCE_MEM, }, - { - .name = "fcc_pram", - .start = 0x88500, - .end = 0x885ff, - .flags = IORESOURCE_MEM, - }, { .start = SIU_INT_FCC2, .end = SIU_INT_FCC2, @@ -436,27 +362,18 @@ struct platform_device ppc_sys_platform_devices[] = { [MPC85xx_CPM_FCC3] = { .name = "fsl-cpm-fcc", .id = 3, - .num_resources = 4, - .dev.platform_data = &mpc85xx_fcc3_pdata, + .num_resources = 3, .resource = (struct resource[]) { { - .name = "fcc_regs", .start = 0x91340, .end = 0x9135F, .flags = IORESOURCE_MEM, }, { - .name = "fcc_regs_c", .start = 0x913D0, .end = 0x913FF, .flags = IORESOURCE_MEM, }, - { - .name = "fcc_pram", - .start = 0x88600, - .end = 0x886ff, - .flags = IORESOURCE_MEM, - }, { .start = SIU_INT_FCC3, .end = SIU_INT_FCC3, diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index cf5ab4748..6f5363838 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c @@ -218,14 +218,6 @@ struct platform_device ppc_sys_platform_devices[] = { }, }, }, - - [MPC8xx_MDIO_FEC] = { - .name = "fsl-cpm-fec-mdio", - .id = 0, - .num_resources = 0, - - }, - }; static int __init mach_mpc8xx_fixup(struct platform_device *pdev) diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index 18ba1d7ff..eee213284 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c @@ -22,7 +22,7 @@ struct ppc_sys_spec ppc_sys_specs[] = { .ppc_sys_name = "MPC86X", .mask = 0xFFFFFFFF, .value = 0x00000000, - .num_devices = 8, + .num_devices = 7, .device_list = (enum ppc_sys_devices[]) { MPC8xx_CPM_FEC1, @@ -32,14 +32,13 @@ struct ppc_sys_spec ppc_sys_specs[] = { MPC8xx_CPM_SCC4, MPC8xx_CPM_SMC1, MPC8xx_CPM_SMC2, - MPC8xx_MDIO_FEC, }, }, { .ppc_sys_name = "MPC885", .mask = 0xFFFFFFFF, .value = 0x00000000, - .num_devices = 9, + .num_devices = 8, .device_list = (enum ppc_sys_devices[]) { MPC8xx_CPM_FEC1, @@ -50,7 +49,6 @@ struct ppc_sys_spec ppc_sys_specs[] = { MPC8xx_CPM_SCC4, MPC8xx_CPM_SMC1, MPC8xx_CPM_SMC2, - MPC8xx_MDIO_FEC, }, }, { /* default match */ diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 3f6d162f8..5a1969706 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c @@ -119,7 +119,7 @@ mv64360_init_irq(void) /* All interrupts are level interrupts */ for (i = mv64360_irq_base; i < (mv64360_irq_base + 96); i++) { irq_desc[i].status |= IRQ_LEVEL; - irq_desc[i].chip = &mv64360_pic; + irq_desc[i].handler = &mv64360_pic; } if (ppc_md.progress) @@ -380,7 +380,7 @@ mv64360_register_hdlrs(void) /* Clear old errors and register CPU interface error intr handler */ mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, - mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) + mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) printk(KERN_WARNING "Can't register cpu error handler: %d", rc); mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); @@ -389,14 +389,14 @@ mv64360_register_hdlrs(void) /* Clear old errors and register internal SRAM error intr handler */ mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, - mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0))) + mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); /* Clear old errors and register PCI 0 error intr handler */ mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, mv64360_pci_error_int_handler, - IRQF_DISABLED, PCI0_INTR_STR, (void *)0))) + SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) printk(KERN_WARNING "Can't register pci 0 error handler: %d", rc); @@ -411,7 +411,7 @@ mv64360_register_hdlrs(void) mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, mv64360_pci_error_int_handler, - IRQF_DISABLED, PCI1_INTR_STR, (void *)1))) + SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) printk(KERN_WARNING "Can't register pci 1 error handler: %d", rc); diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c index e1876261e..9cf18764a 100644 --- a/arch/ppc/syslib/mv64x60_dbg.c +++ b/arch/ppc/syslib/mv64x60_dbg.c @@ -18,6 +18,7 @@ */ +#include #include #include #include diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 50c55622e..a4ecc2ee5 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c @@ -36,6 +36,7 @@ */ #include +#include #include #include #include diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index aa0b95788..70456c8f9 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c @@ -6,6 +6,7 @@ * for more details. */ +#include #include #include #include @@ -372,7 +373,7 @@ void __init openpic_init(int offset) OPENPIC_VEC_IPI+i+offset); /* IPIs are per-CPU */ irq_desc[OPENPIC_VEC_IPI+i+offset].status |= IRQ_PER_CPU; - irq_desc[OPENPIC_VEC_IPI+i+offset].chip = &open_pic_ipi; + irq_desc[OPENPIC_VEC_IPI+i+offset].handler = &open_pic_ipi; } #endif @@ -407,7 +408,7 @@ void __init openpic_init(int offset) /* Init descriptors */ for (i = offset; i < NumSources + offset; i++) - irq_desc[i].chip = &open_pic; + irq_desc[i].handler = &open_pic; /* Initialize the spurious interrupt */ if (ppc_md.progress) ppc_md.progress("openpic: spurious",0x3bd); @@ -575,21 +576,18 @@ void openpic_request_IPIs(void) if (OpenPIC == NULL) return; - /* - * IPIs are marked IRQF_DISABLED as they must run with irqs - * disabled - */ + /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset, - openpic_ipi_action, IRQF_DISABLED, + openpic_ipi_action, SA_INTERRUPT, "IPI0 (call function)", NULL); request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1, - openpic_ipi_action, IRQF_DISABLED, + openpic_ipi_action, SA_INTERRUPT, "IPI1 (reschedule)", NULL); request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2, - openpic_ipi_action, IRQF_DISABLED, + openpic_ipi_action, SA_INTERRUPT, "IPI2 (invalidate tlb)", NULL); request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3, - openpic_ipi_action, IRQF_DISABLED, + openpic_ipi_action, SA_INTERRUPT, "IPI3 (xmon break)", NULL); for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) @@ -617,8 +615,8 @@ void __devinit do_openpic_setup_cpu(void) /* let the openpic know we want intrs. default affinity * is 0xffffffff until changed via /proc * That's how it's done on x86. If we want it differently, then - * we should make sure we also change the default values of - * irq_desc[].affinity in irq.c. + * we should make sure we also change the default values of irq_affinity + * in irq.c. */ for (i = 0; i < NumSources; i++) openpic_mapirq(i, msk, CPU_MASK_ALL); @@ -694,7 +692,7 @@ openpic_init_nmi_irq(u_int irq) static struct irqaction openpic_cascade_irqaction = { .handler = no_action, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, }; diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index e1ff97153..bcbe40de2 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c @@ -10,6 +10,7 @@ * register accesses */ +#include #include #include #include @@ -289,7 +290,7 @@ void __init openpic2_init(int offset) /* Init descriptors */ for (i = offset; i < NumSources + offset; i++) - irq_desc[i].chip = &open_pic2; + irq_desc[i].handler = &open_pic2; /* Initialize the spurious interrupt */ if (ppc_md.progress) ppc_md.progress("openpic2: spurious",0x3bd); diff --git a/arch/ppc/syslib/ppc403_pic.c b/arch/ppc/syslib/ppc403_pic.c index 1584c8b12..c46043c47 100644 --- a/arch/ppc/syslib/ppc403_pic.c +++ b/arch/ppc/syslib/ppc403_pic.c @@ -121,5 +121,5 @@ ppc4xx_pic_init(void) ppc_md.get_irq = ppc403_pic_get_irq; for (i = 0; i < NR_IRQS; i++) - irq_desc[i].chip = &ppc403_aic; + irq_desc[i].handler = &ppc403_aic; } diff --git a/arch/ppc/syslib/ppc440spe_pcie.c b/arch/ppc/syslib/ppc440spe_pcie.c index dd5d4b958..1509fc1dd 100644 --- a/arch/ppc/syslib/ppc440spe_pcie.c +++ b/arch/ppc/syslib/ppc440spe_pcie.c @@ -8,6 +8,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c index 1eef4ffed..b40b96a8c 100644 --- a/arch/ppc/syslib/ppc4xx_dma.c +++ b/arch/ppc/syslib/ppc4xx_dma.c @@ -19,6 +19,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index 745685df5..fd9af0fc0 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c @@ -13,6 +13,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include @@ -275,7 +276,7 @@ void __init ppc4xx_pic_init(void) /* Attach low-level handlers */ for (i = 0; i < (NR_UICS << 5); ++i) { - irq_desc[i].chip = &__uic[i >> 5].decl; + irq_desc[i].handler = &__uic[i >> 5].decl; if (is_level_sensitive(i)) irq_desc[i].status |= IRQ_LEVEL; } diff --git a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c index debe14c08..e83a83fd9 100644 --- a/arch/ppc/syslib/ppc4xx_setup.c +++ b/arch/ppc/syslib/ppc4xx_setup.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 2f83e1629..280ea010a 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c @@ -19,6 +19,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index ec466db52..26afd637d 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c @@ -22,6 +22,7 @@ * Added PCI support -- Tony Li */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index b918a2d24..478b011cd 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h @@ -23,6 +23,7 @@ #ifndef __PPC_SYSLIB_PPC83XX_SETUP_H #define __PPC_SYSLIB_PPC83XX_SETUP_H +#include #include extern unsigned long mpc83xx_find_end_of_memory(void) __init; diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c index e5ac699e7..0145c968f 100644 --- a/arch/ppc/syslib/ppc85xx_common.c +++ b/arch/ppc/syslib/ppc85xx_common.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h index 4fc405425..182744a13 100644 --- a/arch/ppc/syslib/ppc85xx_common.h +++ b/arch/ppc/syslib/ppc85xx_common.h @@ -14,6 +14,7 @@ #ifndef __PPC_SYSLIB_PPC85XX_COMMON_H #define __PPC_SYSLIB_PPC85XX_COMMON_H +#include #include /* Provide access to ccsrbar for any modules, etc */ diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/ppc/syslib/ppc85xx_rio.c index d9b471b4d..297f3b549 100644 --- a/arch/ppc/syslib/ppc85xx_rio.c +++ b/arch/ppc/syslib/ppc85xx_rio.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc85xx_rio.h b/arch/ppc/syslib/ppc85xx_rio.h index 6d3ff30b1..c0827a2c3 100644 --- a/arch/ppc/syslib/ppc85xx_rio.h +++ b/arch/ppc/syslib/ppc85xx_rio.h @@ -13,6 +13,7 @@ #ifndef __PPC_SYSLIB_PPC85XX_RIO_H #define __PPC_SYSLIB_PPC85XX_RIO_H +#include #include extern void mpc85xx_rio_setup(int law_start, int law_size); diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index 2475ec660..79b7089d7 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h index 6ff799952..f55b8032d 100644 --- a/arch/ppc/syslib/ppc85xx_setup.h +++ b/arch/ppc/syslib/ppc85xx_setup.h @@ -15,6 +15,7 @@ #ifndef __PPC_SYSLIB_PPC85XX_SETUP_H #define __PPC_SYSLIB_PPC85XX_SETUP_H +#include #include #include diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c index d6c25fe25..3e6f51a61 100644 --- a/arch/ppc/syslib/ppc8xx_pic.c +++ b/arch/ppc/syslib/ppc8xx_pic.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/ppc/syslib/ppc8xx_pic.h b/arch/ppc/syslib/ppc8xx_pic.h index d7d9f651a..784935eac 100644 --- a/arch/ppc/syslib/ppc8xx_pic.h +++ b/arch/ppc/syslib/ppc8xx_pic.h @@ -1,6 +1,7 @@ #ifndef _PPC_KERNEL_PPC8xx_H #define _PPC_KERNEL_PPC8xx_H +#include #include #include diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index fefbc217a..8692d00c0 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c @@ -369,11 +369,6 @@ struct platform_device ppc_sys_platform_devices[] = { }, }, }, - [MPC82xx_MDIO_BB] = { - .name = "fsl-bb-mdio", - .id = 0, - .num_resources = 0, - }, }; static int __init mach_mpc82xx_fixup(struct platform_device *pdev) diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index f52600c0d..fee894816 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c @@ -139,14 +139,13 @@ struct ppc_sys_spec ppc_sys_specs[] = { .ppc_sys_name = "8272", .mask = 0x0000ff00, .value = 0x00000c00, - .num_devices = 13, + .num_devices = 12, .device_list = (enum ppc_sys_devices[]) { MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, - MPC82xx_MDIO_BB, }, }, /* below is a list of the 8280 family of processors */ diff --git a/arch/ppc/syslib/qspan_pci.c b/arch/ppc/syslib/qspan_pci.c index 85053b281..0970b5d30 100644 --- a/arch/ppc/syslib/qspan_pci.c +++ b/arch/ppc/syslib/qspan_pci.c @@ -15,6 +15,7 @@ * we have switched the chip select. */ +#include #include #include #include diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 39a93dc63..e672b600f 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c @@ -143,7 +143,7 @@ ppc4xx_pic_init(void) ppc_md.get_irq = xilinx_pic_get_irq; for (i = 0; i < NR_IRQS; ++i) { - irq_desc[i].chip = &xilinx_intc; + irq_desc[i].handler = &xilinx_intc; if (XPAR_INTC_0_KIND_OF_INTR & (0x00000001 << i)) irq_desc[i].status &= ~IRQ_LEVEL; diff --git a/arch/ppc/xmon/privinst.h b/arch/ppc/xmon/privinst.h index c492a3568..93978c027 100644 --- a/arch/ppc/xmon/privinst.h +++ b/arch/ppc/xmon/privinst.h @@ -1,6 +1,7 @@ /* * Copyright (C) 1996 Paul Mackerras. */ +#include #define GETREG(reg) \ static inline int get_ ## reg (void) \ diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c index f7e929869..cfc2d6ad4 100644 --- a/arch/ppc/xmon/start.c +++ b/arch/ppc/xmon/start.c @@ -1,6 +1,7 @@ /* * Copyright (C) 1996 Paul Mackerras. */ +#include #include #include #include diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c index 37d234f93..06fa44b5c 100644 --- a/arch/ppc/xmon/xmon.c +++ b/arch/ppc/xmon/xmon.c @@ -3,6 +3,7 @@ * * Copyright (C) 1996 Paul Mackerras. */ +#include #include #include #include diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 46569b789..1a9a6f1bc 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -7,14 +7,6 @@ config MMU bool default y -config LOCKDEP_SUPPORT - bool - default y - -config STACKTRACE_SUPPORT - bool - default y - config RWSEM_GENERIC_SPINLOCK bool @@ -51,10 +43,6 @@ config 64BIT Select this option if you have a 64 bit IBM zSeries machine and want to use the 64 bit addressing mode. -config 32BIT - bool - default y if !64BIT - config SMP bool "Symmetric multi-processing support" ---help--- @@ -122,9 +110,12 @@ config SYSVIPC_COMPAT depends on COMPAT && SYSVIPC default y -config AUDIT_ARCH - bool - default y +config BINFMT_ELF32 + tristate "Kernel support for 31 bit ELF binaries" + depends on COMPAT + help + This allows you to run 32-bit Linux/ELF binaries on your zSeries + in 64 bit mode. Everybody wants this; say Y. comment "Code generation options" @@ -455,14 +446,6 @@ config NO_IDLE_HZ_INIT The HZ timer is switched off in idle by default. That means the HZ timer is already disabled at boot time. -config S390_HYPFS_FS - bool "s390 hypervisor file system support" - select SYS_HYPERVISOR - default y - help - This is a virtual file system intended to provide accounting - information in an s390 hypervisor environment. - config KEXEC bool "kexec system call (EXPERIMENTAL)" depends on EXPERIMENTAL diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug index 2283933a9..f53b6d530 100644 --- a/arch/s390/Kconfig.debug +++ b/arch/s390/Kconfig.debug @@ -1,9 +1,5 @@ menu "Kernel hacking" -config TRACE_IRQFLAGS_SUPPORT - bool - default y - source "lib/Kconfig.debug" endmenu diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 74ef57dcf..7bb16fb97 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -34,11 +34,6 @@ cflags-$(CONFIG_MARCH_G5) += $(call cc-option,-march=g5) cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900) cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990) -# -# Prevent tail-call optimizations, to get clearer backtraces: -# -cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls - # old style option for packed stacks ifeq ($(call cc-option-yn,-mkernel-backchain),y) cflags-$(CONFIG_PACK_STACK) += -mkernel-backchain -D__PACK_STACK @@ -81,7 +76,7 @@ LDFLAGS_vmlinux := -e start head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ arch/$(ARCH)/crypto/ \ - arch/$(ARCH)/appldata/ arch/$(ARCH)/hypfs/ + arch/$(ARCH)/appldata/ libs-y += arch/$(ARCH)/lib/ drivers-y += drivers/s390/ drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/ diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h index 71d65eb30..e806a8922 100644 --- a/arch/s390/appldata/appldata.h +++ b/arch/s390/appldata/appldata.h @@ -3,9 +3,9 @@ * * Definitions and interface for Linux - z/VM Monitor Stream. * - * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. + * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH. * - * Author: Gerald Schaefer + * Author: Gerald Schaefer */ //#define APPLDATA_DEBUG /* Debug messages on/off */ @@ -29,22 +29,6 @@ #define CTL_APPLDATA_NET_SUM 2125 #define CTL_APPLDATA_PROC 2126 -#ifndef CONFIG_64BIT - -#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */ -#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */ -#define APPLDATA_GEN_EVENT_RECORD 0x02 -#define APPLDATA_START_CONFIG_REC 0x03 - -#else - -#define APPLDATA_START_INTERVAL_REC 0x80 -#define APPLDATA_STOP_REC 0x81 -#define APPLDATA_GEN_EVENT_RECORD 0x82 -#define APPLDATA_START_CONFIG_REC 0x83 - -#endif /* CONFIG_64BIT */ - #define P_INFO(x...) printk(KERN_INFO MY_PRINT_NAME " info: " x) #define P_ERROR(x...) printk(KERN_ERR MY_PRINT_NAME " error: " x) #define P_WARNING(x...) printk(KERN_WARNING MY_PRINT_NAME " status: " x) @@ -69,11 +53,7 @@ struct appldata_ops { void *data; /* record data */ unsigned int size; /* size of record */ struct module *owner; /* THIS_MODULE */ - char mod_lvl[2]; /* modification level, EBCDIC */ }; extern int appldata_register_ops(struct appldata_ops *ops); extern void appldata_unregister_ops(struct appldata_ops *ops); -extern int appldata_diag(char record_nr, u16 function, unsigned long buffer, - u16 length, char *mod_lvl); - diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index a0a94e0ef..9a22434a5 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c @@ -5,11 +5,12 @@ * Exports appldata_register_ops() and appldata_unregister_ops() for the * data gathering modules. * - * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. + * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH. * - * Author: Gerald Schaefer + * Author: Gerald Schaefer */ +#include #include #include #include @@ -39,6 +40,22 @@ #define TOD_MICRO 0x01000 /* nr. of TOD clock units for 1 microsecond */ +#ifndef CONFIG_64BIT + +#define APPLDATA_START_INTERVAL_REC 0x00 /* Function codes for */ +#define APPLDATA_STOP_REC 0x01 /* DIAG 0xDC */ +#define APPLDATA_GEN_EVENT_RECORD 0x02 +#define APPLDATA_START_CONFIG_REC 0x03 + +#else + +#define APPLDATA_START_INTERVAL_REC 0x80 +#define APPLDATA_STOP_REC 0x81 +#define APPLDATA_GEN_EVENT_RECORD 0x82 +#define APPLDATA_START_CONFIG_REC 0x83 + +#endif /* CONFIG_64BIT */ + /* * Parameter list for DIAGNOSE X'DC' @@ -178,8 +195,8 @@ static void appldata_work_fn(void *data) * * prepare parameter list, issue DIAG 0xDC */ -int appldata_diag(char record_nr, u16 function, unsigned long buffer, - u16 length, char *mod_lvl) +static int appldata_diag(char record_nr, u16 function, unsigned long buffer, + u16 length) { unsigned long ry; struct appldata_product_id { @@ -197,7 +214,7 @@ int appldata_diag(char record_nr, u16 function, unsigned long buffer, .record_nr = record_nr, .version_nr = {0xF2, 0xF6}, /* "26" */ .release_nr = {0xF0, 0xF1}, /* "01" */ - .mod_lvl = {mod_lvl[0], mod_lvl[1]}, + .mod_lvl = {0xF0, 0xF0}, /* "00" */ }; struct appldata_parameter_list appldata_parameter_list = { .diag = 0xDC, @@ -450,25 +467,24 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, module_put(ops->owner); return -ENODEV; } + ops->active = 1; ops->callback(ops->data); // init record rc = appldata_diag(ops->record_nr, APPLDATA_START_INTERVAL_REC, - (unsigned long) ops->data, ops->size, - ops->mod_lvl); + (unsigned long) ops->data, ops->size); if (rc != 0) { P_ERROR("START DIAG 0xDC for %s failed, " "return code: %d\n", ops->name, rc); module_put(ops->owner); + ops->active = 0; } else { P_INFO("Monitoring %s data enabled, " "DIAG 0xDC started.\n", ops->name); - ops->active = 1; } } else if ((buf[0] == '0') && (ops->active == 1)) { ops->active = 0; rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, - (unsigned long) ops->data, ops->size, - ops->mod_lvl); + (unsigned long) ops->data, ops->size); if (rc != 0) { P_ERROR("STOP DIAG 0xDC for %s failed, " "return code: %d\n", ops->name, rc); @@ -617,8 +633,7 @@ appldata_offline_cpu(int cpu) spin_unlock(&appldata_timer_lock); } -#ifdef CONFIG_HOTPLUG_CPU -static int __cpuinit +static int appldata_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { @@ -626,9 +641,11 @@ appldata_cpu_notify(struct notifier_block *self, case CPU_ONLINE: appldata_online_cpu((long) hcpu); break; +#ifdef CONFIG_HOTPLUG_CPU case CPU_DEAD: appldata_offline_cpu((long) hcpu); break; +#endif default: break; } @@ -638,7 +655,6 @@ appldata_cpu_notify(struct notifier_block *self, static struct notifier_block appldata_nb = { .notifier_call = appldata_cpu_notify, }; -#endif /* * appldata_init() @@ -662,7 +678,7 @@ static int __init appldata_init(void) appldata_online_cpu(i); /* Register cpu hotplug notifier */ - register_hotcpu_notifier(&appldata_nb); + register_cpu_notifier(&appldata_nb); appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 1); #ifdef MODULE @@ -694,8 +710,7 @@ static void __exit appldata_exit(void) list_for_each(lh, &appldata_ops_list) { ops = list_entry(lh, struct appldata_ops, list); rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, - (unsigned long) ops->data, ops->size, - ops->mod_lvl); + (unsigned long) ops->data, ops->size); if (rc != 0) { P_ERROR("STOP DIAG 0xDC for %s failed, " "return code: %d\n", ops->name, rc); @@ -724,7 +739,6 @@ MODULE_DESCRIPTION("Linux-VM Monitor Stream, base infrastructure"); EXPORT_SYMBOL_GPL(appldata_register_ops); EXPORT_SYMBOL_GPL(appldata_unregister_ops); -EXPORT_SYMBOL_GPL(appldata_diag); #ifdef MODULE /* @@ -765,6 +779,8 @@ unsigned long nr_iowait(void) #endif /* MODULE */ EXPORT_SYMBOL_GPL(si_swapinfo); EXPORT_SYMBOL_GPL(nr_threads); +EXPORT_SYMBOL_GPL(avenrun); +EXPORT_SYMBOL_GPL(get_full_page_state); EXPORT_SYMBOL_GPL(nr_running); EXPORT_SYMBOL_GPL(nr_iowait); //EXPORT_SYMBOL_GPL(nr_context_switches); diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index ab3b0765a..f0e2fbed3 100644 --- a/arch/s390/appldata/appldata_mem.c +++ b/arch/s390/appldata/appldata_mem.c @@ -4,11 +4,12 @@ * Data gathering module for Linux-VM Monitor Stream, Stage 1. * Collects data related to memory management. * - * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. + * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH. * - * Author: Gerald Schaefer + * Author: Gerald Schaefer */ +#include #include #include #include @@ -106,21 +107,21 @@ static void appldata_get_mem_data(void *data) * serialized through the appldata_ops_lock and can use static */ static struct sysinfo val; - unsigned long ev[NR_VM_EVENT_ITEMS]; + static struct page_state ps; struct appldata_mem_data *mem_data; mem_data = data; mem_data->sync_count_1++; - all_vm_events(ev); - mem_data->pgpgin = ev[PGPGIN] >> 1; - mem_data->pgpgout = ev[PGPGOUT] >> 1; - mem_data->pswpin = ev[PSWPIN]; - mem_data->pswpout = ev[PSWPOUT]; - mem_data->pgalloc = ev[PGALLOC_HIGH] + ev[PGALLOC_NORMAL] + - ev[PGALLOC_DMA]; - mem_data->pgfault = ev[PGFAULT]; - mem_data->pgmajfault = ev[PGMAJFAULT]; + get_full_page_state(&ps); + mem_data->pgpgin = ps.pgpgin >> 1; + mem_data->pgpgout = ps.pgpgout >> 1; + mem_data->pswpin = ps.pswpin; + mem_data->pswpout = ps.pswpout; + mem_data->pgalloc = ps.pgalloc_high + ps.pgalloc_normal + + ps.pgalloc_dma; + mem_data->pgfault = ps.pgfault; + mem_data->pgmajfault = ps.pgmajfault; si_meminfo(&val); mem_data->sharedram = val.sharedram; @@ -129,8 +130,7 @@ static void appldata_get_mem_data(void *data) mem_data->totalhigh = P2K(val.totalhigh); mem_data->freehigh = P2K(val.freehigh); mem_data->bufferram = P2K(val.bufferram); - mem_data->cached = P2K(global_page_state(NR_FILE_PAGES) - - val.bufferram); + mem_data->cached = P2K(atomic_read(&nr_pagecache) - val.bufferram); si_swapinfo(&val); mem_data->totalswap = P2K(val.totalswap); @@ -152,7 +152,6 @@ static struct appldata_ops ops = { .callback = &appldata_get_mem_data, .data = &appldata_mem_data, .owner = THIS_MODULE, - .mod_lvl = {0xF0, 0xF0}, /* EBCDIC "00" */ }; diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c index 075e619bf..2a4c7432d 100644 --- a/arch/s390/appldata/appldata_net_sum.c +++ b/arch/s390/appldata/appldata_net_sum.c @@ -5,11 +5,12 @@ * Collects accumulated network statistics (Packets received/transmitted, * dropped, errors, ...). * - * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. + * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH. * - * Author: Gerald Schaefer + * Author: Gerald Schaefer */ +#include #include #include #include @@ -151,7 +152,6 @@ static struct appldata_ops ops = { .callback = &appldata_get_net_sum_data, .data = &appldata_net_sum_data, .owner = THIS_MODULE, - .mod_lvl = {0xF0, 0xF0}, /* EBCDIC "00" */ }; diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index 161acc5c8..99ddd3bf2 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c @@ -4,11 +4,12 @@ * Data gathering module for Linux-VM Monitor Stream, Stage 1. * Collects misc. OS related data (CPU utilization, running processes). * - * Copyright (C) 2003,2006 IBM Corporation, IBM Deutschland Entwicklung GmbH. + * Copyright (C) 2003 IBM Corporation, IBM Deutschland Entwicklung GmbH. * - * Author: Gerald Schaefer + * Author: Gerald Schaefer */ +#include #include #include #include @@ -43,14 +44,11 @@ struct appldata_os_per_cpu { u32 per_cpu_system; /* ... spent in kernel mode */ u32 per_cpu_idle; /* ... spent in idle mode */ - /* New in 2.6 */ +// New in 2.6 --> u32 per_cpu_irq; /* ... spent in interrupts */ u32 per_cpu_softirq; /* ... spent in softirqs */ u32 per_cpu_iowait; /* ... spent while waiting for I/O */ - - /* New in modification level 01 */ - u32 per_cpu_steal; /* ... stolen by hypervisor */ - u32 cpu_id; /* number of this CPU */ +// <-- New in 2.6 } __attribute__((packed)); struct appldata_os_data { @@ -70,9 +68,10 @@ struct appldata_os_data { u32 avenrun[3]; /* average nr. of running processes during */ /* the last 1, 5 and 15 minutes */ - /* New in 2.6 */ +// New in 2.6 --> u32 nr_iowait; /* number of blocked threads (waiting for I/O) */ +// <-- New in 2.6 /* per cpu data */ struct appldata_os_per_cpu os_cpu[0]; @@ -80,14 +79,6 @@ struct appldata_os_data { static struct appldata_os_data *appldata_os_data; -static struct appldata_ops ops = { - .ctl_nr = CTL_APPLDATA_OS, - .name = "os", - .record_nr = APPLDATA_RECORD_OS_ID, - .owner = THIS_MODULE, - .mod_lvl = {0xF0, 0xF1}, /* EBCDIC "01" */ -}; - static inline void appldata_print_debug(struct appldata_os_data *os_data) { @@ -109,17 +100,15 @@ static inline void appldata_print_debug(struct appldata_os_data *os_data) P_DEBUG("nr_cpus = %u\n", os_data->nr_cpus); for (i = 0; i < os_data->nr_cpus; i++) { P_DEBUG("cpu%u : user = %u, nice = %u, system = %u, " - "idle = %u, irq = %u, softirq = %u, iowait = %u, " - "steal = %u\n", - os_data->os_cpu[i].cpu_id, + "idle = %u, irq = %u, softirq = %u, iowait = %u\n", + i, os_data->os_cpu[i].per_cpu_user, os_data->os_cpu[i].per_cpu_nice, os_data->os_cpu[i].per_cpu_system, os_data->os_cpu[i].per_cpu_idle, os_data->os_cpu[i].per_cpu_irq, os_data->os_cpu[i].per_cpu_softirq, - os_data->os_cpu[i].per_cpu_iowait, - os_data->os_cpu[i].per_cpu_steal); + os_data->os_cpu[i].per_cpu_iowait); } P_DEBUG("sync_count_1 = %u\n", os_data->sync_count_1); @@ -134,13 +123,14 @@ static inline void appldata_print_debug(struct appldata_os_data *os_data) */ static void appldata_get_os_data(void *data) { - int i, j, rc; + int i, j; struct appldata_os_data *os_data; - unsigned int new_size; os_data = data; os_data->sync_count_1++; + os_data->nr_cpus = num_online_cpus(); + os_data->nr_threads = nr_threads; os_data->nr_running = nr_running(); os_data->nr_iowait = nr_iowait(); @@ -164,44 +154,9 @@ static void appldata_get_os_data(void *data) cputime_to_jiffies(kstat_cpu(i).cpustat.softirq); os_data->os_cpu[j].per_cpu_iowait = cputime_to_jiffies(kstat_cpu(i).cpustat.iowait); - os_data->os_cpu[j].per_cpu_steal = - cputime_to_jiffies(kstat_cpu(i).cpustat.steal); - os_data->os_cpu[j].cpu_id = i; j++; } - os_data->nr_cpus = j; - - new_size = sizeof(struct appldata_os_data) + - (os_data->nr_cpus * sizeof(struct appldata_os_per_cpu)); - if (ops.size != new_size) { - if (ops.active) { - rc = appldata_diag(APPLDATA_RECORD_OS_ID, - APPLDATA_START_INTERVAL_REC, - (unsigned long) ops.data, new_size, - ops.mod_lvl); - if (rc != 0) { - P_ERROR("os: START NEW DIAG 0xDC failed, " - "return code: %d, new size = %i\n", rc, - new_size); - P_INFO("os: stopping old record now\n"); - } else - P_INFO("os: new record size = %i\n", new_size); - - rc = appldata_diag(APPLDATA_RECORD_OS_ID, - APPLDATA_STOP_REC, - (unsigned long) ops.data, ops.size, - ops.mod_lvl); - if (rc != 0) - P_ERROR("os: STOP OLD DIAG 0xDC failed, " - "return code: %d, old size = %i\n", rc, - ops.size); - else - P_INFO("os: old record size = %i stopped\n", - ops.size); - } - ops.size = new_size; - } os_data->timestamp = get_clock(); os_data->sync_count_2++; #ifdef APPLDATA_DEBUG @@ -210,6 +165,15 @@ static void appldata_get_os_data(void *data) } +static struct appldata_ops ops = { + .ctl_nr = CTL_APPLDATA_OS, + .name = "os", + .record_nr = APPLDATA_RECORD_OS_ID, + .callback = &appldata_get_os_data, + .owner = THIS_MODULE, +}; + + /* * appldata_os_init() * @@ -217,25 +181,26 @@ static void appldata_get_os_data(void *data) */ static int __init appldata_os_init(void) { - int rc, max_size; + int rc, size; - max_size = sizeof(struct appldata_os_data) + - (NR_CPUS * sizeof(struct appldata_os_per_cpu)); - if (max_size > APPLDATA_MAX_REC_SIZE) { - P_ERROR("Max. size of OS record = %i, bigger than maximum " - "record size (%i)\n", max_size, APPLDATA_MAX_REC_SIZE); + size = sizeof(struct appldata_os_data) + + (NR_CPUS * sizeof(struct appldata_os_per_cpu)); + if (size > APPLDATA_MAX_REC_SIZE) { + P_ERROR("Size of record = %i, bigger than maximum (%i)!\n", + size, APPLDATA_MAX_REC_SIZE); rc = -ENOMEM; goto out; } - P_DEBUG("max. sizeof(os) = %i, sizeof(os_cpu) = %lu\n", max_size, + P_DEBUG("sizeof(os) = %i, sizeof(os_cpu) = %lu\n", size, sizeof(struct appldata_os_per_cpu)); - appldata_os_data = kzalloc(max_size, GFP_DMA); + appldata_os_data = kmalloc(size, GFP_DMA); if (appldata_os_data == NULL) { P_ERROR("No memory for %s!\n", ops.name); rc = -ENOMEM; goto out; } + memset(appldata_os_data, 0, size); appldata_os_data->per_cpu_size = sizeof(struct appldata_os_per_cpu); appldata_os_data->cpu_offset = offsetof(struct appldata_os_data, @@ -243,7 +208,7 @@ static int __init appldata_os_init(void) P_DEBUG("cpu offset = %u\n", appldata_os_data->cpu_offset); ops.data = appldata_os_data; - ops.callback = &appldata_get_os_data; + ops.size = size; rc = appldata_register_ops(&ops); if (rc != 0) { P_ERROR("Error registering ops, rc = %i\n", rc); diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index 5713c7e5b..c5ca2dc5d 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c @@ -37,10 +37,10 @@ struct s390_aes_ctx { int key_len; }; -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int aes_set_key(void *ctx, const u8 *in_key, unsigned int key_len, + u32 *flags) { - struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); + struct s390_aes_ctx *sctx = ctx; switch (key_len) { case 16: @@ -70,9 +70,9 @@ fail: return -EINVAL; } -static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void aes_encrypt(void *ctx, u8 *out, const u8 *in) { - const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); + const struct s390_aes_ctx *sctx = ctx; switch (sctx->key_len) { case 16: @@ -90,9 +90,9 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) } } -static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void aes_decrypt(void *ctx, u8 *out, const u8 *in) { - const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); + const struct s390_aes_ctx *sctx = ctx; switch (sctx->key_len) { case 16: diff --git a/arch/s390/crypto/des_s390.c b/arch/s390/crypto/des_s390.c index b3f7496a7..e3c37aa0a 100644 --- a/arch/s390/crypto/des_s390.c +++ b/arch/s390/crypto/des_s390.c @@ -44,10 +44,10 @@ struct crypt_s390_des3_192_ctx { u8 key[DES3_192_KEY_SIZE]; }; -static int des_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int des_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) { - struct crypt_s390_des_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des_ctx *dctx = ctx; int ret; /* test if key is valid (not a weak key) */ @@ -57,16 +57,16 @@ static int des_setkey(struct crypto_tfm *tfm, const u8 *key, return ret; } -static void des_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void des_encrypt(void *ctx, u8 *out, const u8 *in) { - struct crypt_s390_des_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des_ctx *dctx = ctx; crypt_s390_km(KM_DEA_ENCRYPT, dctx->key, out, in, DES_BLOCK_SIZE); } -static void des_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void des_decrypt(void *ctx, u8 *out, const u8 *in) { - struct crypt_s390_des_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des_ctx *dctx = ctx; crypt_s390_km(KM_DEA_DECRYPT, dctx->key, out, in, DES_BLOCK_SIZE); } @@ -166,11 +166,11 @@ static struct crypto_alg des_alg = { * Implementers MUST reject keys that exhibit this property. * */ -static int des3_128_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int des3_128_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) { int i, ret; - struct crypt_s390_des3_128_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_128_ctx *dctx = ctx; const u8* temp_key = key; if (!(memcmp(key, &key[DES_KEY_SIZE], DES_KEY_SIZE))) { @@ -186,17 +186,17 @@ static int des3_128_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void des3_128_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_128_encrypt(void *ctx, u8 *dst, const u8 *src) { - struct crypt_s390_des3_128_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_128_ctx *dctx = ctx; crypt_s390_km(KM_TDEA_128_ENCRYPT, dctx->key, dst, (void*)src, DES3_128_BLOCK_SIZE); } -static void des3_128_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_128_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct crypt_s390_des3_128_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_128_ctx *dctx = ctx; crypt_s390_km(KM_TDEA_128_DECRYPT, dctx->key, dst, (void*)src, DES3_128_BLOCK_SIZE); @@ -302,11 +302,11 @@ static struct crypto_alg des3_128_alg = { * property. * */ -static int des3_192_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int des3_192_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) { int i, ret; - struct crypt_s390_des3_192_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_192_ctx *dctx = ctx; const u8* temp_key = key; if (!(memcmp(key, &key[DES_KEY_SIZE], DES_KEY_SIZE) && @@ -325,17 +325,17 @@ static int des3_192_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void des3_192_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_192_encrypt(void *ctx, u8 *dst, const u8 *src) { - struct crypt_s390_des3_192_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_192_ctx *dctx = ctx; crypt_s390_km(KM_TDEA_192_ENCRYPT, dctx->key, dst, (void*)src, DES3_192_BLOCK_SIZE); } -static void des3_192_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_192_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct crypt_s390_des3_192_ctx *dctx = crypto_tfm_ctx(tfm); + struct crypt_s390_des3_192_ctx *dctx = ctx; crypt_s390_km(KM_TDEA_192_DECRYPT, dctx->key, dst, (void*)src, DES3_192_BLOCK_SIZE); diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c index 9d34a35b1..98c896b86 100644 --- a/arch/s390/crypto/sha1_s390.c +++ b/arch/s390/crypto/sha1_s390.c @@ -40,29 +40,28 @@ struct crypt_s390_sha1_ctx { u8 buffer[2 * SHA1_BLOCK_SIZE]; }; -static void sha1_init(struct crypto_tfm *tfm) +static void +sha1_init(void *ctx) { - struct crypt_s390_sha1_ctx *ctx = crypto_tfm_ctx(tfm); - static const u32 initstate[5] = { - 0x67452301, - 0xEFCDAB89, - 0x98BADCFE, - 0x10325476, - 0xC3D2E1F0 + static const struct crypt_s390_sha1_ctx initstate = { + .state = { + 0x67452301, + 0xEFCDAB89, + 0x98BADCFE, + 0x10325476, + 0xC3D2E1F0 + }, }; - - ctx->count = 0; - memcpy(ctx->state, &initstate, sizeof(initstate)); - ctx->buf_len = 0; + memcpy(ctx, &initstate, sizeof(initstate)); } -static void sha1_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void +sha1_update(void *ctx, const u8 *data, unsigned int len) { struct crypt_s390_sha1_ctx *sctx; long imd_len; - sctx = crypto_tfm_ctx(tfm); + sctx = ctx; sctx->count += len * 8; //message bit length //anything in buffer yet? -> must be completed @@ -111,9 +110,10 @@ pad_message(struct crypt_s390_sha1_ctx* sctx) } /* Add padding and return the message digest. */ -static void sha1_final(struct crypto_tfm *tfm, u8 *out) +static void +sha1_final(void* ctx, u8 *out) { - struct crypt_s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm); + struct crypt_s390_sha1_ctx *sctx = ctx; //must perform manual padding pad_message(sctx); diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c index f573df30f..1ec5e92b3 100644 --- a/arch/s390/crypto/sha256_s390.c +++ b/arch/s390/crypto/sha256_s390.c @@ -31,9 +31,9 @@ struct s390_sha256_ctx { u8 buf[2 * SHA256_BLOCK_SIZE]; }; -static void sha256_init(struct crypto_tfm *tfm) +static void sha256_init(void *ctx) { - struct s390_sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct s390_sha256_ctx *sctx = ctx; sctx->state[0] = 0x6a09e667; sctx->state[1] = 0xbb67ae85; @@ -44,12 +44,12 @@ static void sha256_init(struct crypto_tfm *tfm) sctx->state[6] = 0x1f83d9ab; sctx->state[7] = 0x5be0cd19; sctx->count = 0; + memset(sctx->buf, 0, sizeof(sctx->buf)); } -static void sha256_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void sha256_update(void *ctx, const u8 *data, unsigned int len) { - struct s390_sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct s390_sha256_ctx *sctx = ctx; unsigned int index; int ret; @@ -108,9 +108,9 @@ static void pad_message(struct s390_sha256_ctx* sctx) } /* Add padding and return the message digest */ -static void sha256_final(struct crypto_tfm *tfm, u8 *out) +static void sha256_final(void* ctx, u8 *out) { - struct s390_sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct s390_sha256_ctx *sctx = ctx; /* must perform manual padding */ pad_message(sctx); diff --git a/arch/s390/defconfig b/arch/s390/defconfig index f1d4591ed..f4dfc1002 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig @@ -1,16 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc2 -# Thu Jul 27 13:51:07 2006 +# Linux kernel version: 2.6.17-rc1 +# Mon Apr 3 14:34:15 2006 # CONFIG_MMU=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_S390=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -28,7 +25,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y CONFIG_AUDIT=y # CONFIG_AUDITSYSCALL is not set @@ -47,12 +43,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -100,6 +94,7 @@ CONFIG_HOTPLUG_CPU=y CONFIG_DEFAULT_MIGRATION_COST=1000000 CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y +CONFIG_BINFMT_ELF32=y # # Code generation options @@ -120,7 +115,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y # # I/O subsystem configuration @@ -148,7 +142,6 @@ CONFIG_VIRT_CPU_ACCOUNTING=y # CONFIG_APPLDATA_BASE is not set CONFIG_NO_IDLE_HZ=y CONFIG_NO_IDLE_HZ_INIT=y -CONFIG_S390_HYPFS_FS=y CONFIG_KEXEC=y # @@ -181,8 +174,6 @@ CONFIG_IP_FIB_HASH=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -195,10 +186,7 @@ CONFIG_IPV6=y # CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -CONFIG_INET6_XFRM_MODE_TRANSPORT=y -CONFIG_INET6_XFRM_MODE_TUNNEL=y # CONFIG_IPV6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -275,7 +263,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -289,7 +276,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set -CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker @@ -348,7 +334,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set @@ -374,7 +359,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m # CONFIG_MD_RAID10 is not set -# CONFIG_MD_RAID456 is not set +CONFIG_MD_RAID5=m +# CONFIG_MD_RAID5_RESHAPE is not set +# CONFIG_MD_RAID6 is not set CONFIG_MD_MULTIPATH=m # CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=y @@ -432,8 +419,7 @@ CONFIG_S390_TAPE_34XX=m # # Cryptographic devices # -CONFIG_ZCRYPT=m -# CONFIG_ZCRYPT_MONOLITHIC is not set +CONFIG_Z90CRYPT=m # # Network device support @@ -523,7 +509,6 @@ CONFIG_FS_MBCACHE=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -629,36 +614,26 @@ CONFIG_MSDOS_PARTITION=y # Instrumentation Support # # CONFIG_PROFILING is not set -CONFIG_STATISTICS=y -CONFIG_KPROBES=y +# CONFIG_STATISTICS is not set # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 # CONFIG_DETECT_SOFTLOCKUP is not set # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set CONFIG_DEBUG_PREEMPT=y -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set +CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_VM is not set -# CONFIG_FRAME_POINTER is not set # CONFIG_UNWIND_INFO is not set CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set @@ -713,4 +688,3 @@ CONFIG_CRYPTO=y # CONFIG_CRC16 is not set CONFIG_CRC32=m # CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y diff --git a/arch/s390/hypfs/Makefile b/arch/s390/hypfs/Makefile deleted file mode 100644 index f4b00cd81..000000000 --- a/arch/s390/hypfs/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile for the linux hypfs filesystem routines. -# - -obj-$(CONFIG_S390_HYPFS_FS) += s390_hypfs.o - -s390_hypfs-objs := inode.o hypfs_diag.o diff --git a/arch/s390/hypfs/hypfs.h b/arch/s390/hypfs/hypfs.h deleted file mode 100644 index ea5567be0..000000000 --- a/arch/s390/hypfs/hypfs.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * fs/hypfs/hypfs.h - * Hypervisor filesystem for Linux on s390. - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Michael Holzheu - */ - -#ifndef _HYPFS_H_ -#define _HYPFS_H_ - -#include -#include - -#define REG_FILE_MODE 0440 -#define UPDATE_FILE_MODE 0220 -#define DIR_MODE 0550 - -extern struct dentry *hypfs_mkdir(struct super_block *sb, struct dentry *parent, - const char *name); - -extern struct dentry *hypfs_create_u64(struct super_block *sb, - struct dentry *dir, const char *name, - __u64 value); - -extern struct dentry *hypfs_create_str(struct super_block *sb, - struct dentry *dir, const char *name, - char *string); - -#endif /* _HYPFS_H_ */ diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c deleted file mode 100644 index 1785bce2b..000000000 --- a/arch/s390/hypfs/hypfs_diag.c +++ /dev/null @@ -1,696 +0,0 @@ -/* - * fs/hypfs/hypfs_diag.c - * Hypervisor filesystem for Linux on s390. Diag 204 and 224 - * implementation. - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Michael Holzheu - */ - -#include -#include -#include -#include -#include -#include "hypfs.h" - -#define LPAR_NAME_LEN 8 /* lpar name len in diag 204 data */ -#define CPU_NAME_LEN 16 /* type name len of cpus in diag224 name table */ -#define TMP_SIZE 64 /* size of temporary buffers */ - -/* diag 204 subcodes */ -enum diag204_sc { - SUBC_STIB4 = 4, - SUBC_RSI = 5, - SUBC_STIB6 = 6, - SUBC_STIB7 = 7 -}; - -/* The two available diag 204 data formats */ -enum diag204_format { - INFO_SIMPLE = 0, - INFO_EXT = 0x00010000 -}; - -/* bit is set in flags, when physical cpu info is included in diag 204 data */ -#define LPAR_PHYS_FLG 0x80 - -static char *diag224_cpu_names; /* diag 224 name table */ -static enum diag204_sc diag204_store_sc; /* used subcode for store */ -static enum diag204_format diag204_info_type; /* used diag 204 data format */ - -static void *diag204_buf; /* 4K aligned buffer for diag204 data */ -static void *diag204_buf_vmalloc; /* vmalloc pointer for diag204 data */ -static int diag204_buf_pages; /* number of pages for diag204 data */ - -/* - * DIAG 204 data structures and member access functions. - * - * Since we have two different diag 204 data formats for old and new s390 - * machines, we do not access the structs directly, but use getter functions for - * each struct member instead. This should make the code more readable. - */ - -/* Time information block */ - -struct info_blk_hdr { - __u8 npar; - __u8 flags; - __u16 tslice; - __u16 phys_cpus; - __u16 this_part; - __u64 curtod; -} __attribute__ ((packed)); - -struct x_info_blk_hdr { - __u8 npar; - __u8 flags; - __u16 tslice; - __u16 phys_cpus; - __u16 this_part; - __u64 curtod1; - __u64 curtod2; - char reserved[40]; -} __attribute__ ((packed)); - -static inline int info_blk_hdr__size(enum diag204_format type) -{ - if (type == INFO_SIMPLE) - return sizeof(struct info_blk_hdr); - else /* INFO_EXT */ - return sizeof(struct x_info_blk_hdr); -} - -static inline __u8 info_blk_hdr__npar(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct info_blk_hdr *)hdr)->npar; - else /* INFO_EXT */ - return ((struct x_info_blk_hdr *)hdr)->npar; -} - -static inline __u8 info_blk_hdr__flags(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct info_blk_hdr *)hdr)->flags; - else /* INFO_EXT */ - return ((struct x_info_blk_hdr *)hdr)->flags; -} - -static inline __u16 info_blk_hdr__pcpus(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct info_blk_hdr *)hdr)->phys_cpus; - else /* INFO_EXT */ - return ((struct x_info_blk_hdr *)hdr)->phys_cpus; -} - -/* Partition header */ - -struct part_hdr { - __u8 pn; - __u8 cpus; - char reserved[6]; - char part_name[LPAR_NAME_LEN]; -} __attribute__ ((packed)); - -struct x_part_hdr { - __u8 pn; - __u8 cpus; - __u8 rcpus; - __u8 pflag; - __u32 mlu; - char part_name[LPAR_NAME_LEN]; - char lpc_name[8]; - char os_name[8]; - __u64 online_cs; - __u64 online_es; - __u8 upid; - char reserved1[3]; - __u32 group_mlu; - char group_name[8]; - char reserved2[32]; -} __attribute__ ((packed)); - -static inline int part_hdr__size(enum diag204_format type) -{ - if (type == INFO_SIMPLE) - return sizeof(struct part_hdr); - else /* INFO_EXT */ - return sizeof(struct x_part_hdr); -} - -static inline __u8 part_hdr__rcpus(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct part_hdr *)hdr)->cpus; - else /* INFO_EXT */ - return ((struct x_part_hdr *)hdr)->rcpus; -} - -static inline void part_hdr__part_name(enum diag204_format type, void *hdr, - char *name) -{ - if (type == INFO_SIMPLE) - memcpy(name, ((struct part_hdr *)hdr)->part_name, - LPAR_NAME_LEN); - else /* INFO_EXT */ - memcpy(name, ((struct x_part_hdr *)hdr)->part_name, - LPAR_NAME_LEN); - EBCASC(name, LPAR_NAME_LEN); - name[LPAR_NAME_LEN] = 0; - strstrip(name); -} - -struct cpu_info { - __u16 cpu_addr; - char reserved1[2]; - __u8 ctidx; - __u8 cflag; - __u16 weight; - __u64 acc_time; - __u64 lp_time; -} __attribute__ ((packed)); - -struct x_cpu_info { - __u16 cpu_addr; - char reserved1[2]; - __u8 ctidx; - __u8 cflag; - __u16 weight; - __u64 acc_time; - __u64 lp_time; - __u16 min_weight; - __u16 cur_weight; - __u16 max_weight; - char reseved2[2]; - __u64 online_time; - __u64 wait_time; - __u32 pma_weight; - __u32 polar_weight; - char reserved3[40]; -} __attribute__ ((packed)); - -/* CPU info block */ - -static inline int cpu_info__size(enum diag204_format type) -{ - if (type == INFO_SIMPLE) - return sizeof(struct cpu_info); - else /* INFO_EXT */ - return sizeof(struct x_cpu_info); -} - -static inline __u8 cpu_info__ctidx(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct cpu_info *)hdr)->ctidx; - else /* INFO_EXT */ - return ((struct x_cpu_info *)hdr)->ctidx; -} - -static inline __u16 cpu_info__cpu_addr(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct cpu_info *)hdr)->cpu_addr; - else /* INFO_EXT */ - return ((struct x_cpu_info *)hdr)->cpu_addr; -} - -static inline __u64 cpu_info__acc_time(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct cpu_info *)hdr)->acc_time; - else /* INFO_EXT */ - return ((struct x_cpu_info *)hdr)->acc_time; -} - -static inline __u64 cpu_info__lp_time(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct cpu_info *)hdr)->lp_time; - else /* INFO_EXT */ - return ((struct x_cpu_info *)hdr)->lp_time; -} - -static inline __u64 cpu_info__online_time(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return 0; /* online_time not available in simple info */ - else /* INFO_EXT */ - return ((struct x_cpu_info *)hdr)->online_time; -} - -/* Physical header */ - -struct phys_hdr { - char reserved1[1]; - __u8 cpus; - char reserved2[6]; - char mgm_name[8]; -} __attribute__ ((packed)); - -struct x_phys_hdr { - char reserved1[1]; - __u8 cpus; - char reserved2[6]; - char mgm_name[8]; - char reserved3[80]; -} __attribute__ ((packed)); - -static inline int phys_hdr__size(enum diag204_format type) -{ - if (type == INFO_SIMPLE) - return sizeof(struct phys_hdr); - else /* INFO_EXT */ - return sizeof(struct x_phys_hdr); -} - -static inline __u8 phys_hdr__cpus(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct phys_hdr *)hdr)->cpus; - else /* INFO_EXT */ - return ((struct x_phys_hdr *)hdr)->cpus; -} - -/* Physical CPU info block */ - -struct phys_cpu { - __u16 cpu_addr; - char reserved1[2]; - __u8 ctidx; - char reserved2[3]; - __u64 mgm_time; - char reserved3[8]; -} __attribute__ ((packed)); - -struct x_phys_cpu { - __u16 cpu_addr; - char reserved1[2]; - __u8 ctidx; - char reserved2[3]; - __u64 mgm_time; - char reserved3[80]; -} __attribute__ ((packed)); - -static inline int phys_cpu__size(enum diag204_format type) -{ - if (type == INFO_SIMPLE) - return sizeof(struct phys_cpu); - else /* INFO_EXT */ - return sizeof(struct x_phys_cpu); -} - -static inline __u16 phys_cpu__cpu_addr(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct phys_cpu *)hdr)->cpu_addr; - else /* INFO_EXT */ - return ((struct x_phys_cpu *)hdr)->cpu_addr; -} - -static inline __u64 phys_cpu__mgm_time(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct phys_cpu *)hdr)->mgm_time; - else /* INFO_EXT */ - return ((struct x_phys_cpu *)hdr)->mgm_time; -} - -static inline __u64 phys_cpu__ctidx(enum diag204_format type, void *hdr) -{ - if (type == INFO_SIMPLE) - return ((struct phys_cpu *)hdr)->ctidx; - else /* INFO_EXT */ - return ((struct x_phys_cpu *)hdr)->ctidx; -} - -/* Diagnose 204 functions */ - -static int diag204(unsigned long subcode, unsigned long size, void *addr) -{ - register unsigned long _subcode asm("0") = subcode; - register unsigned long _size asm("1") = size; - - asm volatile (" diag %2,%0,0x204\n" - "0: \n" ".section __ex_table,\"a\"\n" -#ifndef __s390x__ - " .align 4\n" - " .long 0b,0b\n" -#else - " .align 8\n" - " .quad 0b,0b\n" -#endif - ".previous":"+d" (_subcode), "+d"(_size) - :"d"(addr) - :"memory"); - if (_subcode) - return -1; - else - return _size; -} - -/* - * For the old diag subcode 4 with simple data format we have to use real - * memory. If we use subcode 6 or 7 with extended data format, we can (and - * should) use vmalloc, since we need a lot of memory in that case. Currently - * up to 93 pages! - */ - -static void diag204_free_buffer(void) -{ - if (!diag204_buf) - return; - if (diag204_buf_vmalloc) { - vfree(diag204_buf_vmalloc); - diag204_buf_vmalloc = NULL; - } else { - free_pages((unsigned long) diag204_buf, 0); - } - diag204_buf_pages = 0; - diag204_buf = NULL; -} - -static void *diag204_alloc_vbuf(int pages) -{ - /* The buffer has to be page aligned! */ - diag204_buf_vmalloc = vmalloc(PAGE_SIZE * (pages + 1)); - if (!diag204_buf_vmalloc) - return ERR_PTR(-ENOMEM); - diag204_buf = (void*)((unsigned long)diag204_buf_vmalloc - & ~0xfffUL) + 0x1000; - diag204_buf_pages = pages; - return diag204_buf; -} - -static void *diag204_alloc_rbuf(void) -{ - diag204_buf = (void*)__get_free_pages(GFP_KERNEL,0); - if (diag204_buf) - return ERR_PTR(-ENOMEM); - diag204_buf_pages = 1; - return diag204_buf; -} - -static void *diag204_get_buffer(enum diag204_format fmt, int *pages) -{ - if (diag204_buf) { - *pages = diag204_buf_pages; - return diag204_buf; - } - if (fmt == INFO_SIMPLE) { - *pages = 1; - return diag204_alloc_rbuf(); - } else {/* INFO_EXT */ - *pages = diag204(SUBC_RSI | INFO_EXT, 0, NULL); - if (*pages <= 0) - return ERR_PTR(-ENOSYS); - else - return diag204_alloc_vbuf(*pages); - } -} - -/* - * diag204_probe() has to find out, which type of diagnose 204 implementation - * we have on our machine. Currently there are three possible scanarios: - * - subcode 4 + simple data format (only one page) - * - subcode 4-6 + extended data format - * - subcode 4-7 + extended data format - * - * Subcode 5 is used to retrieve the size of the data, provided by subcodes - * 6 and 7. Subcode 7 basically has the same function as subcode 6. In addition - * to subcode 6 it provides also information about secondary cpus. - * In order to get as much information as possible, we first try - * subcode 7, then 6 and if both fail, we use subcode 4. - */ - -static int diag204_probe(void) -{ - void *buf; - int pages, rc; - - buf = diag204_get_buffer(INFO_EXT, &pages); - if (!IS_ERR(buf)) { - if (diag204(SUBC_STIB7 | INFO_EXT, pages, buf) >= 0) { - diag204_store_sc = SUBC_STIB7; - diag204_info_type = INFO_EXT; - goto out; - } - if (diag204(SUBC_STIB6 | INFO_EXT, pages, buf) >= 0) { - diag204_store_sc = SUBC_STIB7; - diag204_info_type = INFO_EXT; - goto out; - } - diag204_free_buffer(); - } - - /* subcodes 6 and 7 failed, now try subcode 4 */ - - buf = diag204_get_buffer(INFO_SIMPLE, &pages); - if (IS_ERR(buf)) { - rc = PTR_ERR(buf); - goto fail_alloc; - } - if (diag204(SUBC_STIB4 | INFO_SIMPLE, pages, buf) >= 0) { - diag204_store_sc = SUBC_STIB4; - diag204_info_type = INFO_SIMPLE; - goto out; - } else { - rc = -ENOSYS; - goto fail_store; - } -out: - rc = 0; -fail_store: - diag204_free_buffer(); -fail_alloc: - return rc; -} - -static void *diag204_store(void) -{ - void *buf; - int pages; - - buf = diag204_get_buffer(diag204_info_type, &pages); - if (IS_ERR(buf)) - goto out; - if (diag204(diag204_store_sc | diag204_info_type, pages, buf) < 0) - return ERR_PTR(-ENOSYS); -out: - return buf; -} - -/* Diagnose 224 functions */ - -static void diag224(void *ptr) -{ - asm volatile(" diag %0,%1,0x224\n" - : :"d" (0), "d"(ptr) : "memory"); -} - -static int diag224_get_name_table(void) -{ - /* memory must be below 2GB */ - diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); - if (!diag224_cpu_names) - return -ENOMEM; - diag224(diag224_cpu_names); - EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); - return 0; -} - -static void diag224_delete_name_table(void) -{ - kfree(diag224_cpu_names); -} - -static int diag224_idx2name(int index, char *name) -{ - memcpy(name, diag224_cpu_names + ((index + 1) * CPU_NAME_LEN), - CPU_NAME_LEN); - name[CPU_NAME_LEN] = 0; - strstrip(name); - return 0; -} - -__init int hypfs_diag_init(void) -{ - int rc; - - if (diag204_probe()) { - printk(KERN_ERR "hypfs: diag 204 not working."); - return -ENODATA; - } - rc = diag224_get_name_table(); - if (rc) { - diag224_delete_name_table(); - printk(KERN_ERR "hypfs: could not get name table.\n"); - } - return rc; -} - -__exit void hypfs_diag_exit(void) -{ - diag224_delete_name_table(); - diag204_free_buffer(); -} - -/* - * Functions to create the directory structure - * ******************************************* - */ - -static int hypfs_create_cpu_files(struct super_block *sb, - struct dentry *cpus_dir, void *cpu_info) -{ - struct dentry *cpu_dir; - char buffer[TMP_SIZE]; - void *rc; - - snprintf(buffer, TMP_SIZE, "%d", cpu_info__cpu_addr(diag204_info_type, - cpu_info)); - cpu_dir = hypfs_mkdir(sb, cpus_dir, buffer); - rc = hypfs_create_u64(sb, cpu_dir, "mgmtime", - cpu_info__acc_time(diag204_info_type, cpu_info) - - cpu_info__lp_time(diag204_info_type, cpu_info)); - if (IS_ERR(rc)) - return PTR_ERR(rc); - rc = hypfs_create_u64(sb, cpu_dir, "cputime", - cpu_info__lp_time(diag204_info_type, cpu_info)); - if (IS_ERR(rc)) - return PTR_ERR(rc); - if (diag204_info_type == INFO_EXT) { - rc = hypfs_create_u64(sb, cpu_dir, "onlinetime", - cpu_info__online_time(diag204_info_type, - cpu_info)); - if (IS_ERR(rc)) - return PTR_ERR(rc); - } - diag224_idx2name(cpu_info__ctidx(diag204_info_type, cpu_info), buffer); - rc = hypfs_create_str(sb, cpu_dir, "type", buffer); - if (IS_ERR(rc)) - return PTR_ERR(rc); - return 0; -} - -static void *hypfs_create_lpar_files(struct super_block *sb, - struct dentry *systems_dir, void *part_hdr) -{ - struct dentry *cpus_dir; - struct dentry *lpar_dir; - char lpar_name[LPAR_NAME_LEN + 1]; - void *cpu_info; - int i; - - part_hdr__part_name(diag204_info_type, part_hdr, lpar_name); - lpar_name[LPAR_NAME_LEN] = 0; - lpar_dir = hypfs_mkdir(sb, systems_dir, lpar_name); - if (IS_ERR(lpar_dir)) - return lpar_dir; - cpus_dir = hypfs_mkdir(sb, lpar_dir, "cpus"); - if (IS_ERR(cpus_dir)) - return cpus_dir; - cpu_info = part_hdr + part_hdr__size(diag204_info_type); - for (i = 0; i < part_hdr__rcpus(diag204_info_type, part_hdr); i++) { - int rc; - rc = hypfs_create_cpu_files(sb, cpus_dir, cpu_info); - if (rc) - return ERR_PTR(rc); - cpu_info += cpu_info__size(diag204_info_type); - } - return cpu_info; -} - -static int hypfs_create_phys_cpu_files(struct super_block *sb, - struct dentry *cpus_dir, void *cpu_info) -{ - struct dentry *cpu_dir; - char buffer[TMP_SIZE]; - void *rc; - - snprintf(buffer, TMP_SIZE, "%i", phys_cpu__cpu_addr(diag204_info_type, - cpu_info)); - cpu_dir = hypfs_mkdir(sb, cpus_dir, buffer); - if (IS_ERR(cpu_dir)) - return PTR_ERR(cpu_dir); - rc = hypfs_create_u64(sb, cpu_dir, "mgmtime", - phys_cpu__mgm_time(diag204_info_type, cpu_info)); - if (IS_ERR(rc)) - return PTR_ERR(rc); - diag224_idx2name(phys_cpu__ctidx(diag204_info_type, cpu_info), buffer); - rc = hypfs_create_str(sb, cpu_dir, "type", buffer); - if (IS_ERR(rc)) - return PTR_ERR(rc); - return 0; -} - -static void *hypfs_create_phys_files(struct super_block *sb, - struct dentry *parent_dir, void *phys_hdr) -{ - int i; - void *cpu_info; - struct dentry *cpus_dir; - - cpus_dir = hypfs_mkdir(sb, parent_dir, "cpus"); - if (IS_ERR(cpus_dir)) - return cpus_dir; - cpu_info = phys_hdr + phys_hdr__size(diag204_info_type); - for (i = 0; i < phys_hdr__cpus(diag204_info_type, phys_hdr); i++) { - int rc; - rc = hypfs_create_phys_cpu_files(sb, cpus_dir, cpu_info); - if (rc) - return ERR_PTR(rc); - cpu_info += phys_cpu__size(diag204_info_type); - } - return cpu_info; -} - -int hypfs_diag_create_files(struct super_block *sb, struct dentry *root) -{ - struct dentry *systems_dir, *hyp_dir; - void *time_hdr, *part_hdr; - int i, rc; - void *buffer, *ptr; - - buffer = diag204_store(); - if (IS_ERR(buffer)) - return PTR_ERR(buffer); - - systems_dir = hypfs_mkdir(sb, root, "systems"); - if (IS_ERR(systems_dir)) { - rc = PTR_ERR(systems_dir); - goto err_out; - } - time_hdr = (struct x_info_blk_hdr *)buffer; - part_hdr = time_hdr + info_blk_hdr__size(diag204_info_type); - for (i = 0; i < info_blk_hdr__npar(diag204_info_type, time_hdr); i++) { - part_hdr = hypfs_create_lpar_files(sb, systems_dir, part_hdr); - if (IS_ERR(part_hdr)) { - rc = PTR_ERR(part_hdr); - goto err_out; - } - } - if (info_blk_hdr__flags(diag204_info_type, time_hdr) & LPAR_PHYS_FLG) { - ptr = hypfs_create_phys_files(sb, root, part_hdr); - if (IS_ERR(ptr)) { - rc = PTR_ERR(ptr); - goto err_out; - } - } - hyp_dir = hypfs_mkdir(sb, root, "hyp"); - if (IS_ERR(hyp_dir)) { - rc = PTR_ERR(hyp_dir); - goto err_out; - } - ptr = hypfs_create_str(sb, hyp_dir, "type", "LPAR Hypervisor"); - if (IS_ERR(ptr)) { - rc = PTR_ERR(ptr); - goto err_out; - } - rc = 0; - -err_out: - return rc; -} diff --git a/arch/s390/hypfs/hypfs_diag.h b/arch/s390/hypfs/hypfs_diag.h deleted file mode 100644 index 793dea6b9..000000000 --- a/arch/s390/hypfs/hypfs_diag.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * fs/hypfs/hypfs_diag.h - * Hypervisor filesystem for Linux on s390. - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Michael Holzheu - */ - -#ifndef _HYPFS_DIAG_H_ -#define _HYPFS_DIAG_H_ - -extern int hypfs_diag_init(void); -extern void hypfs_diag_exit(void); -extern int hypfs_diag_create_files(struct super_block *sb, struct dentry *root); - -#endif /* _HYPFS_DIAG_H_ */ diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c deleted file mode 100644 index 666b946f3..000000000 --- a/arch/s390/hypfs/inode.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * fs/hypfs/inode.c - * Hypervisor filesystem for Linux on s390. - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Michael Holzheu - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "hypfs.h" -#include "hypfs_diag.h" - -#define HYPFS_MAGIC 0x687970 /* ASCII 'hyp' */ -#define TMP_SIZE 64 /* size of temporary buffers */ - -static struct dentry *hypfs_create_update_file(struct super_block *sb, - struct dentry *dir); - -struct hypfs_sb_info { - uid_t uid; /* uid used for files and dirs */ - gid_t gid; /* gid used for files and dirs */ - struct dentry *update_file; /* file to trigger update */ - time_t last_update; /* last update time in secs since 1970 */ - struct mutex lock; /* lock to protect update process */ -}; - -static struct file_operations hypfs_file_ops; -static struct file_system_type hypfs_type; -static struct super_operations hypfs_s_ops; - -/* start of list of all dentries, which have to be deleted on update */ -static struct dentry *hypfs_last_dentry; - -static void hypfs_update_update(struct super_block *sb) -{ - struct hypfs_sb_info *sb_info = sb->s_fs_info; - struct inode *inode = sb_info->update_file->d_inode; - - sb_info->last_update = get_seconds(); - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; -} - -/* directory tree removal functions */ - -static void hypfs_add_dentry(struct dentry *dentry) -{ - dentry->d_fsdata = hypfs_last_dentry; - hypfs_last_dentry = dentry; -} - -static void hypfs_remove(struct dentry *dentry) -{ - struct dentry *parent; - - parent = dentry->d_parent; - if (S_ISDIR(dentry->d_inode->i_mode)) - simple_rmdir(parent->d_inode, dentry); - else - simple_unlink(parent->d_inode, dentry); - d_delete(dentry); - dput(dentry); -} - -static void hypfs_delete_tree(struct dentry *root) -{ - while (hypfs_last_dentry) { - struct dentry *next_dentry; - next_dentry = hypfs_last_dentry->d_fsdata; - hypfs_remove(hypfs_last_dentry); - hypfs_last_dentry = next_dentry; - } -} - -static struct inode *hypfs_make_inode(struct super_block *sb, int mode) -{ - struct inode *ret = new_inode(sb); - - if (ret) { - struct hypfs_sb_info *hypfs_info = sb->s_fs_info; - ret->i_mode = mode; - ret->i_uid = hypfs_info->uid; - ret->i_gid = hypfs_info->gid; - ret->i_blocks = 0; - ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; - if (mode & S_IFDIR) - ret->i_nlink = 2; - else - ret->i_nlink = 1; - } - return ret; -} - -static void hypfs_drop_inode(struct inode *inode) -{ - kfree(inode->i_private); - generic_delete_inode(inode); -} - -static int hypfs_open(struct inode *inode, struct file *filp) -{ - char *data = filp->f_dentry->d_inode->i_private; - struct hypfs_sb_info *fs_info; - - if (filp->f_mode & FMODE_WRITE) { - if (!(inode->i_mode & S_IWUGO)) - return -EACCES; - } - if (filp->f_mode & FMODE_READ) { - if (!(inode->i_mode & S_IRUGO)) - return -EACCES; - } - - fs_info = inode->i_sb->s_fs_info; - if(data) { - mutex_lock(&fs_info->lock); - filp->private_data = kstrdup(data, GFP_KERNEL); - if (!filp->private_data) { - mutex_unlock(&fs_info->lock); - return -ENOMEM; - } - mutex_unlock(&fs_info->lock); - } - return 0; -} - -static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf, - size_t count, loff_t offset) -{ - char *data; - size_t len; - struct file *filp = iocb->ki_filp; - - data = filp->private_data; - len = strlen(data); - if (offset > len) { - count = 0; - goto out; - } - if (count > len - offset) - count = len - offset; - if (copy_to_user(buf, data + offset, count)) { - count = -EFAULT; - goto out; - } - iocb->ki_pos += count; - file_accessed(filp); -out: - return count; -} -static ssize_t hypfs_aio_write(struct kiocb *iocb, const char __user *buf, - size_t count, loff_t pos) -{ - int rc; - struct super_block *sb; - struct hypfs_sb_info *fs_info; - - sb = iocb->ki_filp->f_dentry->d_inode->i_sb; - fs_info = sb->s_fs_info; - /* - * Currently we only allow one update per second for two reasons: - * 1. diag 204 is VERY expensive - * 2. If several processes do updates in parallel and then read the - * hypfs data, the likelihood of collisions is reduced, if we restrict - * the minimum update interval. A collision occurs, if during the - * data gathering of one process another process triggers an update - * If the first process wants to ensure consistent data, it has - * to restart data collection in this case. - */ - mutex_lock(&fs_info->lock); - if (fs_info->last_update == get_seconds()) { - rc = -EBUSY; - goto out; - } - hypfs_delete_tree(sb->s_root); - rc = hypfs_diag_create_files(sb, sb->s_root); - if (rc) { - printk(KERN_ERR "hypfs: Update failed\n"); - hypfs_delete_tree(sb->s_root); - goto out; - } - hypfs_update_update(sb); - rc = count; -out: - mutex_unlock(&fs_info->lock); - return rc; -} - -static int hypfs_release(struct inode *inode, struct file *filp) -{ - kfree(filp->private_data); - return 0; -} - -enum { opt_uid, opt_gid, opt_err }; - -static match_table_t hypfs_tokens = { - {opt_uid, "uid=%u"}, - {opt_gid, "gid=%u"}, - {opt_err, NULL} -}; - -static int hypfs_parse_options(char *options, struct super_block *sb) -{ - char *str; - substring_t args[MAX_OPT_ARGS]; - - if (!options) - return 0; - while ((str = strsep(&options, ",")) != NULL) { - int token, option; - struct hypfs_sb_info *hypfs_info = sb->s_fs_info; - - if (!*str) - continue; - token = match_token(str, hypfs_tokens, args); - switch (token) { - case opt_uid: - if (match_int(&args[0], &option)) - return -EINVAL; - hypfs_info->uid = option; - break; - case opt_gid: - if (match_int(&args[0], &option)) - return -EINVAL; - hypfs_info->gid = option; - break; - case opt_err: - default: - printk(KERN_ERR "hypfs: Unrecognized mount option " - "\"%s\" or missing value\n", str); - return -EINVAL; - } - } - return 0; -} - -static int hypfs_fill_super(struct super_block *sb, void *data, int silent) -{ - struct inode *root_inode; - struct dentry *root_dentry; - int rc = 0; - struct hypfs_sb_info *sbi; - - sbi = kzalloc(sizeof(struct hypfs_sb_info), GFP_KERNEL); - if (!sbi) - return -ENOMEM; - mutex_init(&sbi->lock); - sbi->uid = current->uid; - sbi->gid = current->gid; - sb->s_fs_info = sbi; - sb->s_blocksize = PAGE_CACHE_SIZE; - sb->s_blocksize_bits = PAGE_CACHE_SHIFT; - sb->s_magic = HYPFS_MAGIC; - sb->s_op = &hypfs_s_ops; - if (hypfs_parse_options(data, sb)) { - rc = -EINVAL; - goto err_alloc; - } - root_inode = hypfs_make_inode(sb, S_IFDIR | 0755); - if (!root_inode) { - rc = -ENOMEM; - goto err_alloc; - } - root_inode->i_op = &simple_dir_inode_operations; - root_inode->i_fop = &simple_dir_operations; - root_dentry = d_alloc_root(root_inode); - if (!root_dentry) { - iput(root_inode); - rc = -ENOMEM; - goto err_alloc; - } - rc = hypfs_diag_create_files(sb, root_dentry); - if (rc) - goto err_tree; - sbi->update_file = hypfs_create_update_file(sb, root_dentry); - if (IS_ERR(sbi->update_file)) { - rc = PTR_ERR(sbi->update_file); - goto err_tree; - } - hypfs_update_update(sb); - sb->s_root = root_dentry; - return 0; - -err_tree: - hypfs_delete_tree(root_dentry); - d_genocide(root_dentry); - dput(root_dentry); -err_alloc: - kfree(sbi); - return rc; -} - -static int hypfs_get_super(struct file_system_type *fst, int flags, - const char *devname, void *data, struct vfsmount *mnt) -{ - return get_sb_single(fst, flags, data, hypfs_fill_super, mnt); -} - -static void hypfs_kill_super(struct super_block *sb) -{ - struct hypfs_sb_info *sb_info = sb->s_fs_info; - - hypfs_delete_tree(sb->s_root); - hypfs_remove(sb_info->update_file); - kfree(sb->s_fs_info); - sb->s_fs_info = NULL; - kill_litter_super(sb); -} - -static struct dentry *hypfs_create_file(struct super_block *sb, - struct dentry *parent, const char *name, - char *data, mode_t mode) -{ - struct dentry *dentry; - struct inode *inode; - struct qstr qname; - - qname.name = name; - qname.len = strlen(name); - qname.hash = full_name_hash(name, qname.len); - dentry = lookup_one_len(name, parent, strlen(name)); - if (IS_ERR(dentry)) - return ERR_PTR(-ENOMEM); - inode = hypfs_make_inode(sb, mode); - if (!inode) { - dput(dentry); - return ERR_PTR(-ENOMEM); - } - if (mode & S_IFREG) { - inode->i_fop = &hypfs_file_ops; - if (data) - inode->i_size = strlen(data); - else - inode->i_size = 0; - } else if (mode & S_IFDIR) { - inode->i_op = &simple_dir_inode_operations; - inode->i_fop = &simple_dir_operations; - parent->d_inode->i_nlink++; - } else - BUG(); - inode->i_private = data; - d_instantiate(dentry, inode); - dget(dentry); - return dentry; -} - -struct dentry *hypfs_mkdir(struct super_block *sb, struct dentry *parent, - const char *name) -{ - struct dentry *dentry; - - dentry = hypfs_create_file(sb, parent, name, NULL, S_IFDIR | DIR_MODE); - if (IS_ERR(dentry)) - return dentry; - hypfs_add_dentry(dentry); - parent->d_inode->i_nlink++; - return dentry; -} - -static struct dentry *hypfs_create_update_file(struct super_block *sb, - struct dentry *dir) -{ - struct dentry *dentry; - - dentry = hypfs_create_file(sb, dir, "update", NULL, - S_IFREG | UPDATE_FILE_MODE); - /* - * We do not put the update file on the 'delete' list with - * hypfs_add_dentry(), since it should not be removed when the tree - * is updated. - */ - return dentry; -} - -struct dentry *hypfs_create_u64(struct super_block *sb, struct dentry *dir, - const char *name, __u64 value) -{ - char *buffer; - char tmp[TMP_SIZE]; - struct dentry *dentry; - - snprintf(tmp, TMP_SIZE, "%lld\n", (unsigned long long int)value); - buffer = kstrdup(tmp, GFP_KERNEL); - if (!buffer) - return ERR_PTR(-ENOMEM); - dentry = - hypfs_create_file(sb, dir, name, buffer, S_IFREG | REG_FILE_MODE); - if (IS_ERR(dentry)) { - kfree(buffer); - return ERR_PTR(-ENOMEM); - } - hypfs_add_dentry(dentry); - return dentry; -} - -struct dentry *hypfs_create_str(struct super_block *sb, struct dentry *dir, - const char *name, char *string) -{ - char *buffer; - struct dentry *dentry; - - buffer = kmalloc(strlen(string) + 2, GFP_KERNEL); - if (!buffer) - return ERR_PTR(-ENOMEM); - sprintf(buffer, "%s\n", string); - dentry = - hypfs_create_file(sb, dir, name, buffer, S_IFREG | REG_FILE_MODE); - if (IS_ERR(dentry)) { - kfree(buffer); - return ERR_PTR(-ENOMEM); - } - hypfs_add_dentry(dentry); - return dentry; -} - -static struct file_operations hypfs_file_ops = { - .open = hypfs_open, - .release = hypfs_release, - .read = do_sync_read, - .write = do_sync_write, - .aio_read = hypfs_aio_read, - .aio_write = hypfs_aio_write, -}; - -static struct file_system_type hypfs_type = { - .owner = THIS_MODULE, - .name = "s390_hypfs", - .get_sb = hypfs_get_super, - .kill_sb = hypfs_kill_super -}; - -static struct super_operations hypfs_s_ops = { - .statfs = simple_statfs, - .drop_inode = hypfs_drop_inode, -}; - -static decl_subsys(s390, NULL, NULL); - -static int __init hypfs_init(void) -{ - int rc; - - if (MACHINE_IS_VM) - return -ENODATA; - if (hypfs_diag_init()) { - rc = -ENODATA; - goto fail_diag; - } - kset_set_kset_s(&s390_subsys, hypervisor_subsys); - rc = subsystem_register(&s390_subsys); - if (rc) - goto fail_sysfs; - rc = register_filesystem(&hypfs_type); - if (rc) - goto fail_filesystem; - return 0; - -fail_filesystem: - subsystem_unregister(&s390_subsys); -fail_sysfs: - hypfs_diag_exit(); -fail_diag: - printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc); - return rc; -} - -static void __exit hypfs_exit(void) -{ - hypfs_diag_exit(); - unregister_filesystem(&hypfs_type); - subsystem_unregister(&s390_subsys); -} - -module_init(hypfs_init) -module_exit(hypfs_exit) - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Michael Holzheu "); -MODULE_DESCRIPTION("s390 Hypervisor Filesystem"); diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile index 9a33ed6ca..9269b5788 100644 --- a/arch/s390/kernel/Makefile +++ b/arch/s390/kernel/Makefile @@ -16,14 +16,11 @@ extra-y += head.o init_task.o vmlinux.lds obj-$(CONFIG_MODULES) += s390_ksyms.o module.o obj-$(CONFIG_SMP) += smp.o -obj-$(CONFIG_AUDIT) += audit.o -compat-obj-$(CONFIG_AUDIT) += compat_audit.o obj-$(CONFIG_COMPAT) += compat_linux.o compat_signal.o \ - compat_wrapper.o compat_exec_domain.o \ - binfmt_elf32.o $(compat-obj-y) + compat_wrapper.o compat_exec_domain.o +obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o obj-$(CONFIG_VIRT_TIMER) += vtime.o -obj-$(CONFIG_STACKTRACE) += stacktrace.o # Kexec part S390_KEXEC_OBJS := machine_kexec.o crash.o diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index ec514fe5c..3f7018e9d 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c @@ -4,6 +4,7 @@ * and format the required data. */ +#include #include /* Use marker if you need to separate the values later */ diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c deleted file mode 100644 index 0741d9193..000000000 --- a/arch/s390/kernel/audit.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ -#ifdef CONFIG_COMPAT - extern int s390_classify_syscall(unsigned); - if (abi == AUDIT_ARCH_S390) - return s390_classify_syscall(syscall); -#endif - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ -#ifdef CONFIG_COMPAT - extern __u32 s390_dir_class[]; - extern __u32 s390_write_class[]; - extern __u32 s390_read_class[]; - extern __u32 s390_chattr_class[]; - audit_register_class(AUDIT_CLASS_WRITE_32, s390_write_class); - audit_register_class(AUDIT_CLASS_READ_32, s390_read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE_32, s390_dir_class); - audit_register_class(AUDIT_CLASS_CHATTR_32, s390_chattr_class); -#endif - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c index 9565a2dcf..1f451c2cb 100644 --- a/arch/s390/kernel/binfmt_elf32.c +++ b/arch/s390/kernel/binfmt_elf32.c @@ -135,6 +135,7 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) #include #include +#include #include #include #include @@ -176,6 +177,11 @@ struct elf_prpsinfo32 #include +#undef NEW_TO_OLD_UID +#undef NEW_TO_OLD_GID +#define NEW_TO_OLD_UID(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid) +#define NEW_TO_OLD_GID(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid) + #define elf_addr_t u32 /* #define init_elf_binfmt init_elf32_binfmt diff --git a/arch/s390/kernel/compat_audit.c b/arch/s390/kernel/compat_audit.c deleted file mode 100644 index 16d9436bf..000000000 --- a/arch/s390/kernel/compat_audit.c +++ /dev/null @@ -1,38 +0,0 @@ -#undef __s390x__ -#include - -unsigned s390_dir_class[] = { -#include -~0U -}; - -unsigned s390_chattr_class[] = { -#include -~0U -}; - -unsigned s390_write_class[] = { -#include -~0U -}; - -unsigned s390_read_class[] = { -#include -~0U -}; - -int s390_classify_syscall(unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 1; - } -} diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 86e5f9983..5e14de37c 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -16,6 +16,7 @@ */ +#include #include #include #include @@ -357,16 +358,11 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) { - compat_ino_t ino; int err; if (!old_valid_dev(stat->dev) || !old_valid_dev(stat->rdev)) return -EOVERFLOW; - ino = stat->ino; - if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) - return -EOVERFLOW; - err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev); err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->mode, &statbuf->st_mode); @@ -414,7 +410,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info) mm_segment_t old_fs = get_fs (); set_fs (KERNEL_DS); - ret = sys_sysinfo((struct sysinfo __user *) &s); + ret = sys_sysinfo(&s); set_fs (old_fs); err = put_user (s.uptime, &info->uptime); err |= __put_user (s.loads[0], &info->loads[0]); @@ -443,7 +439,7 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid, mm_segment_t old_fs = get_fs (); set_fs (KERNEL_DS); - ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t); + ret = sys_sched_rr_get_interval(pid, &t); set_fs (old_fs); if (put_compat_timespec(&t, interval)) return -EFAULT; @@ -469,10 +465,7 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, } } set_fs (KERNEL_DS); - ret = sys_rt_sigprocmask(how, - set ? (sigset_t __user *) &s : NULL, - oset ? (sigset_t __user *) &s : NULL, - sigsetsize); + ret = sys_rt_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL, sigsetsize); set_fs (old_fs); if (ret) return ret; if (oset) { @@ -497,7 +490,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set, mm_segment_t old_fs = get_fs(); set_fs (KERNEL_DS); - ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); + ret = sys_rt_sigpending(&s, sigsetsize); set_fs (old_fs); if (!ret) { switch (_NSIG_WORDS) { @@ -522,7 +515,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) if (copy_siginfo_from_user32(&info, uinfo)) return -EFAULT; set_fs (KERNEL_DS); - ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); + ret = sys_rt_sigqueueinfo(pid, sig, &info); set_fs (old_fs); return ret; } @@ -682,8 +675,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse return -EFAULT; set_fs(KERNEL_DS); - ret = sys_sendfile(out_fd, in_fd, - offset ? (off_t __user *) &of : NULL, count); + ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); set_fs(old_fs); if (offset && put_user(of, offset)) @@ -703,8 +695,7 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, return -EFAULT; set_fs(KERNEL_DS); - ret = sys_sendfile64(out_fd, in_fd, - offset ? (loff_t __user *) &lof : NULL, count); + ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count); set_fs(old_fs); if (offset && put_user(lof, offset)) diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 1a18e2966..3898f66d0 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h @@ -1,6 +1,7 @@ #ifndef _ASM_S390X_S390_H #define _ASM_S390X_S390_H +#include #include #include #include diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index d49b876a8..b4c815d8e 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -10,6 +10,7 @@ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson */ +#include #include #include #include diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 43f3d0c7e..06a3fbc12 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -10,6 +10,7 @@ * Bugreports to: */ +#include #include #include #include @@ -603,7 +604,7 @@ debug_open(struct inode *inode, struct file *file) debug_info_t *debug_info, *debug_info_snapshot; down(&debug_lock); - debug_info = file->f_dentry->d_inode->i_private; + debug_info = (struct debug_info*)file->f_dentry->d_inode->u.generic_ip; /* find debug view */ for (i = 0; i < DEBUG_MAX_VIEWS; i++) { if (!debug_info->views[i]) diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 5b5799ac8..b24484878 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -58,21 +59,6 @@ STACK_SIZE = 1 << STACK_SHIFT #define BASED(name) name-system_call(%r13) -#ifdef CONFIG_TRACE_IRQFLAGS - .macro TRACE_IRQS_ON - l %r1,BASED(.Ltrace_irq_on) - basr %r14,%r1 - .endm - - .macro TRACE_IRQS_OFF - l %r1,BASED(.Ltrace_irq_off) - basr %r14,%r1 - .endm -#else -#define TRACE_IRQS_ON -#define TRACE_IRQS_OFF -#endif - /* * Register usage in interrupt handlers: * R9 - pointer to current task structure @@ -107,22 +93,13 @@ STACK_SIZE = 1 << STACK_SHIFT l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 .endm - .macro SAVE_ALL_SYNC psworg,savearea + .macro SAVE_ALL psworg,savearea,sync la %r12,\psworg + .if \sync tm \psworg+1,0x01 # test problem state bit bz BASED(2f) # skip stack setup save l %r15,__LC_KERNEL_STACK # problem state -> load ksp -#ifdef CONFIG_CHECK_STACK - b BASED(3f) -2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD - bz BASED(stack_overflow) -3: -#endif -2: - .endm - - .macro SAVE_ALL_ASYNC psworg,savearea - la %r12,\psworg + .else tm \psworg+1,0x01 # test problem state bit bnz BASED(1f) # from user -> load async stack clc \psworg+4(4),BASED(.Lcritical_end) @@ -138,6 +115,7 @@ STACK_SIZE = 1 << STACK_SHIFT sra %r14,STACK_SHIFT be BASED(2f) 1: l %r15,__LC_ASYNC_STACK + .endif #ifdef CONFIG_CHECK_STACK b BASED(3f) 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD @@ -218,7 +196,7 @@ system_call: STORE_TIMER __LC_SYNC_ENTER_TIMER sysc_saveall: SAVE_ALL_BASE __LC_SAVE_AREA - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA lh %r7,0x8a # get svc number from lowcore #ifdef CONFIG_VIRT_CPU_ACCOUNTING @@ -243,9 +221,8 @@ sysc_do_svc: sysc_nr_ok: mvc SP_ARGS(4,%r15),SP_R7(%r15) sysc_do_restart: - l %r8,BASED(.Lsysc_table) tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) - l %r8,0(%r7,%r8) # get system call addr. + l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr. bnz BASED(sysc_tracesys) basr %r14,%r8 # call sys_xxxx st %r2,SP_R2(%r15) # store return value (change R2 on stack) @@ -346,10 +323,9 @@ sysc_tracesys: basr %r14,%r1 clc SP_R2(4,%r15),BASED(.Lnr_syscalls) bnl BASED(sysc_tracenogo) - l %r8,BASED(.Lsysc_table) l %r7,SP_R2(%r15) # strace might have changed the sll %r7,2 # system call - l %r8,0(%r7,%r8) + l %r8,sys_call_table-system_call(%r7,%r13) sysc_tracego: lm %r3,%r6,SP_R3(%r15) l %r2,SP_ORIG_R2(%r15) @@ -376,7 +352,6 @@ ret_from_fork: st %r15,SP_R15(%r15) # store stack pointer for new kthread 0: l %r1,BASED(.Lschedtail) basr %r14,%r1 - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts b BASED(sysc_return) @@ -450,7 +425,7 @@ pgm_check_handler: SAVE_ALL_BASE __LC_SAVE_AREA tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception bnz BASED(pgm_per) # got per exception -> special case - SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -489,7 +464,7 @@ pgm_per: # Normal per exception # pgm_per_std: - SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -515,7 +490,7 @@ pgm_no_vtime2: # it was a single stepped SVC that is causing all the trouble # pgm_svcper: - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -532,7 +507,6 @@ pgm_no_vtime3: mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts b BASED(sysc_do_svc) @@ -545,7 +519,7 @@ io_int_handler: STORE_TIMER __LC_ASYNC_ENTER_TIMER stck __LC_INT_CLOCK SAVE_ALL_BASE __LC_SAVE_AREA+16 - SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 + SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+16,0 CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -556,11 +530,9 @@ io_int_handler: io_no_vtime: #endif l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF l %r1,BASED(.Ldo_IRQ) # load address of do_IRQ la %r2,SP_PTREGS(%r15) # address of register-save area basr %r14,%r1 # branch to standard irq handler - TRACE_IRQS_ON io_return: tm SP_PSW+1(%r15),0x01 # returning to user ? @@ -659,7 +631,7 @@ ext_int_handler: STORE_TIMER __LC_ASYNC_ENTER_TIMER stck __LC_INT_CLOCK SAVE_ALL_BASE __LC_SAVE_AREA+16 - SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 + SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16,0 CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -670,12 +642,10 @@ ext_int_handler: ext_no_vtime: #endif l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF la %r2,SP_PTREGS(%r15) # address of register-save area lh %r3,__LC_EXT_INT_CODE # get interruption code l %r1,BASED(.Ldo_extint) basr %r14,%r1 - TRACE_IRQS_ON b BASED(io_return) __critical_end: @@ -687,31 +657,21 @@ __critical_end: .globl mcck_int_handler mcck_int_handler: spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs SAVE_ALL_BASE __LC_SAVE_AREA+32 la %r12,__LC_MCK_OLD_PSW tm __LC_MCCK_CODE,0x80 # system damage? bo BASED(mcck_int_main) # yes -> rest of mcck code invalid + tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? + bo BASED(0f) + spt __LC_LAST_UPDATE_TIMER # revalidate cpu timer #ifdef CONFIG_VIRT_CPU_ACCOUNTING - mvc __LC_SAVE_AREA+52(8),__LC_ASYNC_ENTER_TIMER - mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA - tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? - bo BASED(1f) - la %r14,__LC_SYNC_ENTER_TIMER - clc 0(8,%r14),__LC_ASYNC_ENTER_TIMER - bl BASED(0f) - la %r14,__LC_ASYNC_ENTER_TIMER -0: clc 0(8,%r14),__LC_EXIT_TIMER - bl BASED(0f) - la %r14,__LC_EXIT_TIMER -0: clc 0(8,%r14),__LC_LAST_UPDATE_TIMER - bl BASED(0f) - la %r14,__LC_LAST_UPDATE_TIMER -0: spt 0(%r14) - mvc __LC_ASYNC_ENTER_TIMER(8),0(%r14) -1: + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER + mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER + mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER #endif - tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? +0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? bno BASED(mcck_int_main) # no -> skip cleanup critical tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit bnz BASED(mcck_int_main) # from user -> load async stack @@ -731,7 +691,7 @@ mcck_int_main: #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? bno BASED(mcck_no_vtime) # no -> skip cleanup critical - tm SP_PSW+1(%r15),0x01 # interrupting from user ? + tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? bz BASED(mcck_no_vtime) UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER @@ -752,25 +712,9 @@ mcck_no_vtime: stosm __SF_EMPTY(%r15),0x04 # turn dat on tm __TI_flags+3(%r9),_TIF_MCCK_PENDING bno BASED(mcck_return) - TRACE_IRQS_OFF l %r1,BASED(.Ls390_handle_mcck) basr %r14,%r1 # call machine check handler - TRACE_IRQS_ON mcck_return: - mvc __LC_RETURN_MCCK_PSW(8),SP_PSW(%r15) # move return PSW - ni __LC_RETURN_MCCK_PSW+1,0xfd # clear wait state bit -#ifdef CONFIG_VIRT_CPU_ACCOUNTING - mvc __LC_ASYNC_ENTER_TIMER(8),__LC_SAVE_AREA+52 - tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ? - bno BASED(0f) - lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 - stpt __LC_EXIT_TIMER - lpsw __LC_RETURN_MCCK_PSW # back to caller -0: -#endif - lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 - lpsw __LC_RETURN_MCCK_PSW # back to caller - RESTORE_ALL __LC_RETURN_MCCK_PSW,0 #ifdef CONFIG_SMP @@ -837,8 +781,6 @@ cleanup_table_sysc_leave: .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 cleanup_table_sysc_work_loop: .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 -cleanup_table_io_return: - .long io_return + 0x80000000, io_leave + 0x80000000 cleanup_table_io_leave: .long io_leave + 0x80000000, io_done + 0x80000000 cleanup_table_io_work_loop: @@ -864,11 +806,6 @@ cleanup_critical: bl BASED(0f) clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) bl BASED(cleanup_sysc_return) -0: - clc 4(4,%r12),BASED(cleanup_table_io_return) - bl BASED(0f) - clc 4(4,%r12),BASED(cleanup_table_io_return+4) - bl BASED(cleanup_io_return) 0: clc 4(4,%r12),BASED(cleanup_table_io_leave) bl BASED(0f) @@ -902,7 +839,7 @@ cleanup_system_call: mvc __LC_SAVE_AREA(16),0(%r12) 0: st %r13,4(%r12) st %r12,__LC_SAVE_AREA+48 # argh - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA l %r12,__LC_SAVE_AREA+48 # argh st %r15,12(%r12) @@ -1034,12 +971,7 @@ cleanup_io_leave_insn: .Ltrace: .long syscall_trace .Lvfork: .long sys_vfork .Lschedtail: .long schedule_tail -.Lsysc_table: .long sys_call_table -#ifdef CONFIG_TRACE_IRQFLAGS -.Ltrace_irq_on:.long trace_hardirqs_on -.Ltrace_irq_off: - .long trace_hardirqs_off -#endif + .Lcritical_start: .long __critical_start + 0x80000000 .Lcritical_end: @@ -1047,8 +979,9 @@ cleanup_io_leave_insn: .Lcleanup_critical: .long cleanup_critical - .section .rodata, "a" #define SYSCALL(esa,esame,emu) .long esa + .globl sys_call_table sys_call_table: #include "syscalls.S" #undef SYSCALL + diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 56f5f613b..2ac095bc0 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -58,19 +59,6 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ #define BASED(name) name-system_call(%r13) -#ifdef CONFIG_TRACE_IRQFLAGS - .macro TRACE_IRQS_ON - brasl %r14,trace_hardirqs_on - .endm - - .macro TRACE_IRQS_OFF - brasl %r14,trace_hardirqs_off - .endm -#else -#define TRACE_IRQS_ON -#define TRACE_IRQS_OFF -#endif - .macro STORE_TIMER lc_offset #ifdef CONFIG_VIRT_CPU_ACCOUNTING stpt \lc_offset @@ -99,22 +87,13 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ larl %r13,system_call .endm - .macro SAVE_ALL_SYNC psworg,savearea + .macro SAVE_ALL psworg,savearea,sync la %r12,\psworg + .if \sync tm \psworg+1,0x01 # test problem state bit jz 2f # skip stack setup save lg %r15,__LC_KERNEL_STACK # problem state -> load ksp -#ifdef CONFIG_CHECK_STACK - j 3f -2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD - jz stack_overflow -3: -#endif -2: - .endm - - .macro SAVE_ALL_ASYNC psworg,savearea - la %r12,\psworg + .else tm \psworg+1,0x01 # test problem state bit jnz 1f # from user -> load kernel stack clc \psworg+8(8),BASED(.Lcritical_end) @@ -129,6 +108,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ srag %r14,%r14,STACK_SHIFT jz 2f 1: lg %r15,__LC_ASYNC_STACK # load async stack + .endif #ifdef CONFIG_CHECK_STACK j 3f 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD @@ -207,7 +187,7 @@ system_call: STORE_TIMER __LC_SYNC_ENTER_TIMER sysc_saveall: SAVE_ALL_BASE __LC_SAVE_AREA - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore #ifdef CONFIG_VIRT_CPU_ACCOUNTING @@ -367,7 +347,6 @@ ret_from_fork: jo 0f stg %r15,SP_R15(%r15) # store stack pointer for new kthread 0: brasl %r14,schedule_tail - TRACE_IRQS_ON stosm 24(%r15),0x03 # reenable interrupts j sysc_return @@ -467,7 +446,7 @@ pgm_check_handler: SAVE_ALL_BASE __LC_SAVE_AREA tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception jnz pgm_per # got per exception -> special case - SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -506,7 +485,7 @@ pgm_per: # Normal per exception # pgm_per_std: - SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -532,7 +511,7 @@ pgm_no_vtime2: # it was a single stepped SVC that is causing all the trouble # pgm_svcper: - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -549,7 +528,6 @@ pgm_no_vtime3: mvc __THREAD_per+__PER_address(8,%r1),__LC_PER_ADDRESS mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID oi __TI_flags+7(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts j sysc_do_svc @@ -561,7 +539,7 @@ io_int_handler: STORE_TIMER __LC_ASYNC_ENTER_TIMER stck __LC_INT_CLOCK SAVE_ALL_BASE __LC_SAVE_AREA+32 - SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+32 + SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+32,0 CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+32 #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -572,10 +550,8 @@ io_int_handler: io_no_vtime: #endif lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF la %r2,SP_PTREGS(%r15) # address of register-save area brasl %r14,do_IRQ # call standard irq handler - TRACE_IRQS_ON io_return: tm SP_PSW+1(%r15),0x01 # returning to user ? @@ -671,7 +647,7 @@ ext_int_handler: STORE_TIMER __LC_ASYNC_ENTER_TIMER stck __LC_INT_CLOCK SAVE_ALL_BASE __LC_SAVE_AREA+32 - SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32 + SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32,0 CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32 #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm SP_PSW+1(%r15),0x01 # interrupting from user ? @@ -682,11 +658,9 @@ ext_int_handler: ext_no_vtime: #endif lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF la %r2,SP_PTREGS(%r15) # address of register-save area llgh %r3,__LC_EXT_INT_CODE # get interruption code brasl %r14,do_extint - TRACE_IRQS_ON j io_return __critical_end: @@ -698,32 +672,21 @@ __critical_end: mcck_int_handler: la %r1,4095 # revalidate r1 spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r1) lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs SAVE_ALL_BASE __LC_SAVE_AREA+64 la %r12,__LC_MCK_OLD_PSW tm __LC_MCCK_CODE,0x80 # system damage? jo mcck_int_main # yes -> rest of mcck code invalid + tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? + jo 0f + spt __LC_LAST_UPDATE_TIMER #ifdef CONFIG_VIRT_CPU_ACCOUNTING - la %r14,4095 - mvc __LC_SAVE_AREA+104(8),__LC_ASYNC_ENTER_TIMER - mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r14) - tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? - jo 1f - la %r14,__LC_SYNC_ENTER_TIMER - clc 0(8,%r14),__LC_ASYNC_ENTER_TIMER - jl 0f - la %r14,__LC_ASYNC_ENTER_TIMER -0: clc 0(8,%r14),__LC_EXIT_TIMER - jl 0f - la %r14,__LC_EXIT_TIMER -0: clc 0(8,%r14),__LC_LAST_UPDATE_TIMER - jl 0f - la %r14,__LC_LAST_UPDATE_TIMER -0: spt 0(%r14) - mvc __LC_ASYNC_ENTER_TIMER(8),0(%r14) -1: + mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER + mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER + mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER #endif - tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? +0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? jno mcck_int_main # no -> skip cleanup critical tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit jnz mcck_int_main # from user -> load kernel stack @@ -742,7 +705,7 @@ mcck_int_main: #ifdef CONFIG_VIRT_CPU_ACCOUNTING tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? jno mcck_no_vtime # no -> no timer update - tm SP_PSW+1(%r15),0x01 # interrupting from user ? + tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? jz mcck_no_vtime UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER @@ -762,21 +725,9 @@ mcck_no_vtime: stosm __SF_EMPTY(%r15),0x04 # turn dat on tm __TI_flags+7(%r9),_TIF_MCCK_PENDING jno mcck_return - TRACE_IRQS_OFF brasl %r14,s390_handle_mcck - TRACE_IRQS_ON mcck_return: - mvc __LC_RETURN_MCCK_PSW(16),SP_PSW(%r15) # move return PSW - ni __LC_RETURN_MCCK_PSW+1,0xfd # clear wait state bit - lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 -#ifdef CONFIG_VIRT_CPU_ACCOUNTING - mvc __LC_ASYNC_ENTER_TIMER(8),__LC_SAVE_AREA+104 - tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ? - jno 0f - stpt __LC_EXIT_TIMER -0: -#endif - lpswe __LC_RETURN_MCCK_PSW # back to caller + RESTORE_ALL __LC_RETURN_MCCK_PSW,0 #ifdef CONFIG_SMP /* @@ -838,8 +789,6 @@ cleanup_table_sysc_leave: .quad sysc_leave, sysc_work_loop cleanup_table_sysc_work_loop: .quad sysc_work_loop, sysc_reschedule -cleanup_table_io_return: - .quad io_return, io_leave cleanup_table_io_leave: .quad io_leave, io_done cleanup_table_io_work_loop: @@ -865,11 +814,6 @@ cleanup_critical: jl 0f clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) jl cleanup_sysc_return -0: - clc 8(8,%r12),BASED(cleanup_table_io_return) - jl 0f - clc 8(8,%r12),BASED(cleanup_table_io_return+8) - jl cleanup_io_return 0: clc 8(8,%r12),BASED(cleanup_table_io_leave) jl 0f @@ -903,7 +847,7 @@ cleanup_system_call: mvc __LC_SAVE_AREA(32),0(%r12) 0: stg %r13,8(%r12) stg %r12,__LC_SAVE_AREA+96 # argh - SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA + SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA lg %r12,__LC_SAVE_AREA+96 # argh stg %r15,24(%r12) @@ -1012,8 +956,8 @@ cleanup_io_leave_insn: .Lcritical_end: .quad __critical_end - .section .rodata, "a" #define SYSCALL(esa,esame,emu) .long esame + .globl sys_call_table sys_call_table: #include "syscalls.S" #undef SYSCALL @@ -1021,6 +965,7 @@ sys_call_table: #ifdef CONFIG_COMPAT #define SYSCALL(esa,esame,emu) .long emu + .globl sys_call_table_emu sys_call_table_emu: #include "syscalls.S" #undef SYSCALL diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index adad8863e..ea88d066b 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S @@ -1,7 +1,7 @@ /* * arch/s390/kernel/head.S * - * Copyright (C) IBM Corp. 1999,2006 + * (C) Copyright IBM Corp. 1999, 2005 * * Author(s): Hartmut Penner * Martin Schwidefsky @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -481,23 +482,24 @@ start: .macro GET_IPL_DEVICE .Lget_ipl_device: - l %r1,0xb8 # get sid + basr %r12,0 +.LGID: l %r1,0xb8 # get sid sll %r1,15 # test if subchannel is enabled srl %r1,31 ltr %r1,%r1 - bz 2f-.LPG1(%r13) # subchannel disabled + bz 0(%r14) # subchannel disabled l %r1,0xb8 - la %r5,.Lipl_schib-.LPG1(%r13) + la %r5,.Lipl_schib-.LGID(%r12) stsch 0(%r5) # get schib of subchannel - bnz 2f-.LPG1(%r13) # schib not available + bnz 0(%r14) # schib not available tm 5(%r5),0x01 # devno valid? - bno 2f-.LPG1(%r13) - la %r6,ipl_parameter_flags-.LPG1(%r13) + bno 0(%r14) + la %r6,ipl_parameter_flags-.LGID(%r12) oi 3(%r6),0x01 # set flag - la %r2,ipl_devno-.LPG1(%r13) + la %r2,ipl_devno-.LGID(%r12) mvc 0(2,%r2),6(%r5) # store devno tm 4(%r5),0x80 # qdio capable device? - bno 2f-.LPG1(%r13) + bno 0(%r14) oi 3(%r6),0x02 # set flag # copy ipl parameters @@ -521,7 +523,7 @@ start: ar %r2,%r1 sr %r0,%r4 jne 1b - b 2f-.LPG1(%r13) + b 0(%r14) .align 4 .Lipl_schib: @@ -535,7 +537,6 @@ ipl_parameter_flags: .globl ipl_devno ipl_devno: .word 0 -2: .endm #ifdef CONFIG_64BIT diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index a4dc61f32..2d3b089bf 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S @@ -1,7 +1,7 @@ /* * arch/s390/kernel/head31.S * - * Copyright (C) IBM Corp. 2005,2006 + * (C) Copyright IBM Corp. 2005 * * Author(s): Hartmut Penner * Martin Schwidefsky @@ -16,31 +16,12 @@ # or linload or SALIPL # .org 0x10000 -startup:basr %r13,0 # get base -.LPG0: l %r13,0f-.LPG0(%r13) - b 0(%r13) -0: .long startup_continue - -# -# params at 10400 (setup.h) -# - .org PARMAREA - .long 0,0 # IPL_DEVICE - .long 0,RAMDISK_ORIGIN # INITRD_START - .long 0,RAMDISK_SIZE # INITRD_SIZE - - .org COMMAND_LINE - .byte "root=/dev/ram0 ro" - .byte 0 - - .org 0x11000 - -startup_continue: - basr %r13,0 # get base -.LPG1: GET_IPL_DEVICE +startup:basr %r13,0 # get base +.LPG1: l %r1, .Lget_ipl_device_addr-.LPG1(%r13) + basr %r14, %r1 lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers - l %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area - # move IPL device to lowcore + la %r12,_pstart-.LPG1(%r13) # pointer to parameter area + # move IPL device to lowcore mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) # @@ -70,8 +51,8 @@ startup_continue: a %r1,__LC_EXT_NEW_PSW+4 # set handler st %r1,__LC_EXT_NEW_PSW+4 - l %r4,.Lsccbaddr-.LPG1(%r13) # %r4 is our index for sccb stuff - lr %r1,%r4 # our sccb + la %r4,_pstart-.LPG1(%r13) # %r4 is our index for sccb stuff + la %r1, .Lsccb-PARMAREA(%r4) # our sccb .insn rre,0xb2200000,%r2,%r1 # service call ipm %r1 srl %r1,28 # get cc code @@ -82,7 +63,7 @@ startup_continue: be .Lservicecall-.LPG1(%r13) lpsw .Lwaitsclp-.LPG1(%r13) .Lsclph: - lh %r1,.Lsccbr-.Lsccb(%r4) + lh %r1,.Lsccbr-PARMAREA(%r4) chi %r1,0x10 # 0x0010 is the sucess code je .Lprocsccb # let's process the sccb chi %r1,0x1f0 @@ -93,7 +74,7 @@ startup_continue: b .Lservicecall-.LPG1(%r13) .Lprocsccb: lhi %r1,0 - icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0 + icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 jnz .Lscnd lhi %r1,0x800 # otherwise report 2GB .Lscnd: @@ -103,10 +84,10 @@ startup_continue: lr %r1,%r3 .Lno2gb: xr %r3,%r3 # same logic - ic %r3,.Lscpa1-.Lsccb(%r4) + ic %r3,.Lscpa1-PARMAREA(%r4) chi %r3,0x00 jne .Lcompmem - l %r3,.Lscpa2-.Lsccb(%r4) + l %r3,.Lscpa2-PARMAREA(%r13) .Lcompmem: mr %r2,%r1 # mem in MB on 128-bit l %r1,.Lonemb-.LPG1(%r13) @@ -114,6 +95,8 @@ startup_continue: b .Lfchunk-.LPG1(%r13) .align 4 +.Lget_ipl_device_addr: + .long .Lget_ipl_device .Lpmask: .byte 0 .align 8 @@ -259,8 +242,6 @@ startup_continue: .long 0 # cr13: home space segment table .long 0xc0000000 # cr14: machine check handling off .long 0 # cr15: linkage stack operations -.Lduct: .long 0,0,0,0,0,0,0,0 - .long 0,0,0,0,0,0,0,0 .Lpcmem:.long 0x00080000,0x80000000 + .Lchkmem .Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu .Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp @@ -271,9 +252,25 @@ startup_continue: .Lmflags:.long machine_flags .Lbss_bgn: .long __bss_start .Lbss_end: .long _end -.Lparmaddr: .long PARMAREA -.Lsccbaddr: .long .Lsccb - .org 0x12000 + + .org PARMAREA-64 +.Lduct: .long 0,0,0,0,0,0,0,0 + .long 0,0,0,0,0,0,0,0 + +# +# params at 10400 (setup.h) +# + .org PARMAREA + .global _pstart +_pstart: + .long 0,0 # IPL_DEVICE + .long 0,RAMDISK_ORIGIN # INITRD_START + .long 0,RAMDISK_SIZE # INITRD_SIZE + + .org COMMAND_LINE + .byte "root=/dev/ram0 ro" + .byte 0 + .org 0x11000 .Lsccb: .hword 0x1000 # length, one page .byte 0x00,0x00,0x00 @@ -290,14 +287,18 @@ startup_continue: .Lscpincr2: .quad 0x00 .fill 3984,1,0 - .org 0x13000 + .org 0x12000 + .global _pend +_pend: + + GET_IPL_DEVICE #ifdef CONFIG_SHARED_KERNEL .org 0x100000 #endif # -# startup-code, running in absolute addressing mode +# startup-code, running in virtual mode # .globl _stext _stext: basr %r13,0 # get base diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 9d80c5b1e..f08c06f45 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S @@ -1,7 +1,7 @@ /* * arch/s390/kernel/head64.S * - * Copyright (C) IBM Corp. 1999,2006 + * (C) Copyright IBM Corp. 1999,2005 * * Author(s): Hartmut Penner * Martin Schwidefsky @@ -15,37 +15,18 @@ # this is called either by the ipl loader or directly by PSW restart # or linload or SALIPL # - .org 0x10000 -startup:basr %r13,0 # get base -.LPG0: l %r13,0f-.LPG0(%r13) - b 0(%r13) -0: .long startup_continue - -# -# params at 10400 (setup.h) -# - .org PARMAREA - .quad 0 # IPL_DEVICE - .quad RAMDISK_ORIGIN # INITRD_START - .quad RAMDISK_SIZE # INITRD_SIZE - - .org COMMAND_LINE - .byte "root=/dev/ram0 ro" - .byte 0 - - .org 0x11000 - -startup_continue: - basr %r13,0 # get base + .org 0x10000 +startup:basr %r13,0 # get base .LPG1: sll %r13,1 # remove high order bit srl %r13,1 - GET_IPL_DEVICE + l %r1,.Lget_ipl_device_addr-.LPG1(%r13) + basr %r14,%r1 lhi %r1,1 # mode 1 = esame slr %r0,%r0 # set cpuid to zero sigp %r1,%r0,0x12 # switch to esame mode sam64 # switch to 64 bit mode lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers - lg %r12,.Lparmaddr-.LPG1(%r13)# pointer to parameter area + larl %r12,_pstart # pointer to parameter area # move IPL device to lowcore mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) @@ -74,8 +55,8 @@ startup_continue: larl %r1,.Lsclph stg %r1,__LC_EXT_NEW_PSW+8 # set handler - larl %r4,.Lsccb # %r4 is our index for sccb stuff - lgr %r1,%r4 # our sccb + larl %r4,_pstart # %r4 is our index for sccb stuff + la %r1,.Lsccb-PARMAREA(%r4) # our sccb .insn rre,0xb2200000,%r2,%r1 # service call ipm %r1 srl %r1,28 # get cc code @@ -86,7 +67,7 @@ startup_continue: be .Lservicecall-.LPG1(%r13) lpswe .Lwaitsclp-.LPG1(%r13) .Lsclph: - lh %r1,.Lsccbr-.Lsccb(%r4) + lh %r1,.Lsccbr-PARMAREA(%r4) chi %r1,0x10 # 0x0010 is the sucess code je .Lprocsccb # let's process the sccb chi %r1,0x1f0 @@ -97,15 +78,15 @@ startup_continue: b .Lservicecall-.LPG1(%r13) .Lprocsccb: lghi %r1,0 - icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0 + icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 jnz .Lscnd - lg %r1,.Lscpincr2-.Lsccb(%r4) # otherwise use this one + lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one .Lscnd: xr %r3,%r3 # same logic - ic %r3,.Lscpa1-.Lsccb(%r4) + ic %r3,.Lscpa1-PARMAREA(%r4) chi %r3,0x00 jne .Lcompmem - l %r3,.Lscpa2-.Lsccb(%r4) + l %r3,.Lscpa2-PARMAREA(%r13) .Lcompmem: mlgr %r2,%r1 # mem in MB on 128-bit l %r1,.Lonemb-.LPG1(%r13) @@ -113,6 +94,8 @@ startup_continue: b .Lfchunk-.LPG1(%r13) .align 4 +.Lget_ipl_device_addr: + .long .Lget_ipl_device .Lpmask: .byte 0 .align 8 @@ -259,16 +242,29 @@ startup_continue: .quad 0 # cr13: home space segment table .quad 0xc0000000 # cr14: machine check handling off .quad 0 # cr15: linkage stack operations -.Lduct: .long 0,0,0,0,0,0,0,0 - .long 0,0,0,0,0,0,0,0 .Lpcmsk:.quad 0x0000000180000000 .L4malign:.quad 0xffffffffffc00000 .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 .Lnop: .long 0x07000700 -.Lparmaddr: - .quad PARMAREA - .org 0x12000 + .org PARMAREA-64 +.Lduct: .long 0,0,0,0,0,0,0,0 + .long 0,0,0,0,0,0,0,0 + +# +# params at 10400 (setup.h) +# + .org PARMAREA + .global _pstart +_pstart: + .quad 0 # IPL_DEVICE + .quad RAMDISK_ORIGIN # INITRD_START + .quad RAMDISK_SIZE # INITRD_SIZE + + .org COMMAND_LINE + .byte "root=/dev/ram0 ro" + .byte 0 + .org 0x11000 .Lsccb: .hword 0x1000 # length, one page .byte 0x00,0x00,0x00 @@ -285,14 +281,18 @@ startup_continue: .Lscpincr2: .quad 0x00 .fill 3984,1,0 - .org 0x13000 + .org 0x12000 + .global _pend +_pend: + + GET_IPL_DEVICE #ifdef CONFIG_SHARED_KERNEL .org 0x100000 #endif # -# startup-code, running in absolute addressing mode +# startup-code, running in virtual mode # .globl _stext _stext: basr %r13,0 # get base @@ -326,3 +326,4 @@ _stext: basr %r13,0 # get base .align 8 .Ldw: .quad 0x0002000180000000,0x0000000000000000 .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index 1eef50918..480b6a5fe 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c @@ -69,6 +69,10 @@ asmlinkage void do_softirq(void) local_irq_save(flags); + account_system_vtime(current); + + local_bh_disable(); + if (local_softirq_pending()) { /* Get current stack pointer. */ asm volatile("la %0,0(15)" : "=a" (old)); @@ -91,6 +95,10 @@ asmlinkage void do_softirq(void) __do_softirq(); } + account_system_vtime(current); + + __local_bh_enable(); + local_irq_restore(flags); } diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 60b1ea9f9..bad81b583 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -27,8 +27,8 @@ static void kexec_halt_all_cpus(void *); typedef void (*relocate_kernel_t) (kimage_entry_t *, unsigned long); -extern const unsigned char relocate_kernel[]; -extern const unsigned long long relocate_kernel_len; +const extern unsigned char relocate_kernel[]; +const extern unsigned long long relocate_kernel_len; int machine_kexec_prepare(struct kimage *image) @@ -63,7 +63,6 @@ NORET_TYPE void machine_kexec(struct kimage *image) { clear_all_subchannels(); - cio_reset_channel_paths(); /* Disable lowcore protection */ ctl_clear_bit(0,28); diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index d989ed45a..c271cdab5 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -119,7 +119,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, int nrela, i, j; /* Find symbol table and string table. */ - symtab = NULL; + symtab = 0; for (i = 0; i < hdr->e_shnum; i++) switch (sechdrs[i].sh_type) { case SHT_SYMTAB: diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 4bffc3aa9..c147da56f 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -15,6 +15,7 @@ * This file handles the architecture-dependent parts of process handling.. */ +#include #include #include #include @@ -142,7 +143,6 @@ static void default_idle(void) return; } - trace_hardirqs_on(); /* Wait for external, I/O or machine check interrupt. */ __load_psw_mask(PSW_KERNEL_BITS | PSW_MASK_WAIT | PSW_MASK_IO | PSW_MASK_EXT); @@ -172,7 +172,7 @@ void show_regs(struct pt_regs *regs) show_registers(regs); /* Show stack backtrace if pt_regs is from kernel mode */ if (!(regs->psw.mask & PSW_MASK_PSTATE)) - show_trace(NULL, (unsigned long *) regs->gprs[15]); + show_trace(0,(unsigned long *) regs->gprs[15]); } extern void kernel_thread_starter(void); diff --git a/arch/s390/kernel/profile.c b/arch/s390/kernel/profile.c index b81aa1f56..7ba777eec 100644 --- a/arch/s390/kernel/profile.c +++ b/arch/s390/kernel/profile.c @@ -13,7 +13,7 @@ static struct proc_dir_entry * root_irq_dir; void init_irq_proc(void) { /* create /proc/irq */ - root_irq_dir = proc_mkdir("irq", NULL); + root_irq_dir = proc_mkdir("irq", 0); /* create /proc/irq/prof_cpu_mask */ create_prof_cpu_mask(root_irq_dir); diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c index c1b383537..207bc511a 100644 --- a/arch/s390/kernel/s390_ext.c +++ b/arch/s390/kernel/s390_ext.c @@ -24,7 +24,7 @@ * (0x1202 external call, 0x1004 cpu timer, 0x2401 hwc console, 0x4000 * iucv and 0x2603 pfault) this is always the first element. */ -ext_int_info_t *ext_int_hash[256] = { NULL, }; +ext_int_info_t *ext_int_hash[256] = { 0, }; static inline int ext_hash(__u16 code) { diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c index c73a45467..4176c7767 100644 --- a/arch/s390/kernel/s390_ksyms.c +++ b/arch/s390/kernel/s390_ksyms.c @@ -3,6 +3,7 @@ * * S390 version */ +#include #include #include #include @@ -45,6 +46,8 @@ EXPORT_SYMBOL(__down_interruptible); */ extern int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs); EXPORT_SYMBOL(dump_fpu); +EXPORT_SYMBOL(overflowuid); +EXPORT_SYMBOL(overflowgid); EXPORT_SYMBOL(empty_zero_page); /* diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index c902f059c..0a04e4a56 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include #include -#include #include #include @@ -47,7 +47,6 @@ #include #include #include -#include /* * Machine setup.. @@ -66,6 +65,11 @@ volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ unsigned long __initdata zholes_size[MAX_NR_ZONES]; static unsigned long __initdata memory_end; +/* + * Setup options + */ +extern int _text,_etext, _edata, _end; + /* * This is set up by the setup-routine at boot-time * for S390 need to find out, what we have to setup @@ -76,11 +80,15 @@ static unsigned long __initdata memory_end; static struct resource code_resource = { .name = "Kernel code", + .start = (unsigned long) &_text, + .end = (unsigned long) &_etext - 1, .flags = IORESOURCE_BUSY | IORESOURCE_MEM, }; static struct resource data_resource = { .name = "Kernel data", + .start = (unsigned long) &_etext, + .end = (unsigned long) &_edata - 1, .flags = IORESOURCE_BUSY | IORESOURCE_MEM, }; @@ -115,7 +123,6 @@ void __devinit cpu_init (void) */ char vmhalt_cmd[128] = ""; char vmpoff_cmd[128] = ""; -char vmpanic_cmd[128] = ""; static inline void strncpy_skip_quote(char *dst, char *src, int n) { @@ -147,38 +154,6 @@ static int __init vmpoff_setup(char *str) __setup("vmpoff=", vmpoff_setup); -static int vmpanic_notify(struct notifier_block *self, unsigned long event, - void *data) -{ - if (MACHINE_IS_VM && strlen(vmpanic_cmd) > 0) - cpcmd(vmpanic_cmd, NULL, 0, NULL); - - return NOTIFY_OK; -} - -#define PANIC_PRI_VMPANIC 0 - -static struct notifier_block vmpanic_nb = { - .notifier_call = vmpanic_notify, - .priority = PANIC_PRI_VMPANIC -}; - -static int __init vmpanic_setup(char *str) -{ - static int register_done __initdata = 0; - - strncpy_skip_quote(vmpanic_cmd, str, 127); - vmpanic_cmd[127] = 0; - if (!register_done) { - register_done = 1; - atomic_notifier_chain_register(&panic_notifier_list, - &vmpanic_nb); - } - return 1; -} - -__setup("vmpanic=", vmpanic_setup); - /* * condev= and conmode= setup parameter. */ @@ -322,34 +297,19 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp; void machine_restart(char *command) { - if (!in_interrupt() || oops_in_progress) - /* - * Only unblank the console if we are called in enabled - * context or a bust_spinlocks cleared the way for us. - */ - console_unblank(); + console_unblank(); _machine_restart(command); } void machine_halt(void) { - if (!in_interrupt() || oops_in_progress) - /* - * Only unblank the console if we are called in enabled - * context or a bust_spinlocks cleared the way for us. - */ - console_unblank(); + console_unblank(); _machine_halt(); } void machine_power_off(void) { - if (!in_interrupt() || oops_in_progress) - /* - * Only unblank the console if we are called in enabled - * context or a bust_spinlocks cleared the way for us. - */ - console_unblank(); + console_unblank(); _machine_power_off(); } @@ -462,11 +422,6 @@ setup_resources(void) struct resource *res; int i; - code_resource.start = (unsigned long) &_text; - code_resource.end = (unsigned long) &_etext - 1; - data_resource.start = (unsigned long) &_etext; - data_resource.end = (unsigned long) &_edata - 1; - for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) { res = alloc_bootmem_low(sizeof(struct resource)); res->flags = IORESOURCE_BUSY | IORESOURCE_MEM; @@ -877,57 +832,31 @@ static struct bin_attribute ipl_scp_data_attr = { static decl_subsys(ipl, NULL, NULL); -static int ipl_register_fcp_files(void) -{ - int rc; - - rc = sysfs_create_group(&ipl_subsys.kset.kobj, - &ipl_fcp_attr_group); - if (rc) - goto out; - rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj, - &ipl_parameter_attr); - if (rc) - goto out_ipl_parm; - rc = sysfs_create_bin_file(&ipl_subsys.kset.kobj, - &ipl_scp_data_attr); - if (!rc) - goto out; - - sysfs_remove_bin_file(&ipl_subsys.kset.kobj, &ipl_parameter_attr); - -out_ipl_parm: - sysfs_remove_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group); -out: - return rc; -} - static int __init ipl_device_sysfs_register(void) { int rc; rc = firmware_register(&ipl_subsys); if (rc) - goto out; + return rc; switch (get_ipl_type()) { case ipl_type_ccw: - rc = sysfs_create_group(&ipl_subsys.kset.kobj, - &ipl_ccw_attr_group); + sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_ccw_attr_group); break; case ipl_type_fcp: - rc = ipl_register_fcp_files(); + sysfs_create_group(&ipl_subsys.kset.kobj, &ipl_fcp_attr_group); + sysfs_create_bin_file(&ipl_subsys.kset.kobj, + &ipl_parameter_attr); + sysfs_create_bin_file(&ipl_subsys.kset.kobj, + &ipl_scp_data_attr); break; default: - rc = sysfs_create_group(&ipl_subsys.kset.kobj, - &ipl_unknown_attr_group); + sysfs_create_group(&ipl_subsys.kset.kobj, + &ipl_unknown_attr_group); break; } - - if (rc) - firmware_unregister(&ipl_subsys); -out: - return rc; + return 0; } __initcall(ipl_device_sysfs_register); diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index a887b686f..d48cfc726 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -11,6 +11,7 @@ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson */ +#include #include #include #include diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 8e03219ee..343120c92 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -869,7 +869,7 @@ static int __init topology_init(void) int ret; for_each_possible_cpu(cpu) { - ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); + ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); if (ret) printk(KERN_WARNING "topology_init: register_cpu %d " "failed (%d)\n", cpu, ret); diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c deleted file mode 100644 index d9428a0fc..000000000 --- a/arch/s390/kernel/stacktrace.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * arch/s390/kernel/stacktrace.c - * - * Stack trace management functions - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Heiko Carstens - */ - -#include -#include -#include - -static inline unsigned long save_context_stack(struct stack_trace *trace, - unsigned int *skip, - unsigned long sp, - unsigned long low, - unsigned long high) -{ - struct stack_frame *sf; - struct pt_regs *regs; - unsigned long addr; - - while(1) { - sp &= PSW_ADDR_INSN; - if (sp < low || sp > high) - return sp; - sf = (struct stack_frame *)sp; - while(1) { - addr = sf->gprs[8] & PSW_ADDR_INSN; - if (!(*skip)) - trace->entries[trace->nr_entries++] = addr; - else - (*skip)--; - if (trace->nr_entries >= trace->max_entries) - return sp; - low = sp; - sp = sf->back_chain & PSW_ADDR_INSN; - if (!sp) - break; - if (sp <= low || sp > high - sizeof(*sf)) - return sp; - sf = (struct stack_frame *)sp; - } - /* Zero backchain detected, check for interrupt frame. */ - sp = (unsigned long)(sf + 1); - if (sp <= low || sp > high - sizeof(*regs)) - return sp; - regs = (struct pt_regs *)sp; - addr = regs->psw.addr & PSW_ADDR_INSN; - if (!(*skip)) - trace->entries[trace->nr_entries++] = addr; - else - (*skip)--; - if (trace->nr_entries >= trace->max_entries) - return sp; - low = sp; - sp = regs->gprs[15]; - } -} - -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) -{ - register unsigned long sp asm ("15"); - unsigned long orig_sp; - - sp &= PSW_ADDR_INSN; - orig_sp = sp; - - sp = save_context_stack(trace, &trace->skip, sp, - S390_lowcore.panic_stack - PAGE_SIZE, - S390_lowcore.panic_stack); - if ((sp != orig_sp) && !trace->all_contexts) - return; - sp = save_context_stack(trace, &trace->skip, sp, - S390_lowcore.async_stack - ASYNC_SIZE, - S390_lowcore.async_stack); - if ((sp != orig_sp) && !trace->all_contexts) - return; - if (task) - save_context_stack(trace, &trace->skip, sp, - (unsigned long) task_stack_page(task), - (unsigned long) task_stack_page(task) + THREAD_SIZE); - else - save_context_stack(trace, &trace->skip, sp, - S390_lowcore.thread_info, - S390_lowcore.thread_info + THREAD_SIZE); - return; -} diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 74e6178fb..2a6c6efb6 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -12,6 +12,7 @@ * Copyright (C) 1991, 1992, 1995 Linus Torvalds */ +#include #include #include #include @@ -379,7 +380,7 @@ void __init time_init(void) -xtime.tv_sec, -xtime.tv_nsec); /* request the clock comparator external interrupt */ - if (register_early_external_interrupt(0x1004, NULL, + if (register_early_external_interrupt(0x1004, 0, &ext_int_info_cc) != 0) panic("Couldn't request external interrupt 0x1004"); diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index bde1d1d59..a46793bee 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -14,6 +14,7 @@ * 'Traps.c' handles hardware traps and faults after we have saved some * state in 'asm.s'. */ +#include #include #include #include @@ -149,11 +150,13 @@ void show_stack(struct task_struct *task, unsigned long *sp) unsigned long *stack; int i; + // debugging aid: "show_stack(NULL);" prints the + // back trace for this cpu. + if (!sp) - stack = task ? (unsigned long *) task->thread.ksp : __r15; - else - stack = sp; + sp = task ? (unsigned long *) task->thread.ksp : __r15; + stack = sp; for (i = 0; i < kstack_depth_to_print; i++) { if (((addr_t) stack & (THREAD_SIZE-1)) == 0) break; @@ -170,7 +173,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) */ void dump_stack(void) { - show_stack(NULL, NULL); + show_stack(0, 0); } EXPORT_SYMBOL(dump_stack); @@ -331,9 +334,9 @@ static void inline do_trap(long interruption_code, int signr, char *str, } } -static inline void __user *get_check_address(struct pt_regs *regs) +static inline void *get_check_address(struct pt_regs *regs) { - return (void __user *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); + return (void *)((regs->psw.addr-S390_lowcore.pgm_ilc) & PSW_ADDR_INSN); } void do_single_step(struct pt_regs *regs) @@ -360,7 +363,7 @@ asmlinkage void name(struct pt_regs * regs, long interruption_code) \ info.si_signo = signr; \ info.si_errno = 0; \ info.si_code = sicode; \ - info.si_addr = siaddr; \ + info.si_addr = (void *)siaddr; \ do_trap(interruption_code, signr, str, regs, &info); \ } @@ -392,7 +395,7 @@ DO_ERROR_INFO(SIGILL, "translation exception", translation_exception, ILL_ILLOPN, get_check_address(regs)) static inline void -do_fp_trap(struct pt_regs *regs, void __user *location, +do_fp_trap(struct pt_regs *regs, void *location, int fpc, long interruption_code) { siginfo_t si; @@ -424,10 +427,10 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) { siginfo_t info; __u8 opcode[6]; - __u16 __user *location; + __u16 *location; int signal = 0; - location = get_check_address(regs); + location = (__u16 *) get_check_address(regs); /* * We got all needed information from the lowcore and can @@ -559,10 +562,10 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception, asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) { - __u16 __user *location; + __u16 *location; int signal = 0; - location = get_check_address(regs); + location = (__u16 *) get_check_address(regs); /* * We got all needed information from the lowcore and can diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index ff5f7bb34..9f34bb54c 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -3,6 +3,7 @@ */ #include +#include #ifndef CONFIG_64BIT OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 2306cd83f..dfe6f0856 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -7,6 +7,7 @@ * Author(s): Jan Glauber */ +#include #include #include #include @@ -355,7 +356,7 @@ static void internal_add_vtimer(struct vtimer_list *timer) set_vtimer(event->expires); spin_unlock_irqrestore(&vt_list->lock, flags); - /* release CPU acquired in prepare_vtimer or mod_virt_timer() */ + /* release CPU aquired in prepare_vtimer or mod_virt_timer() */ put_cpu(); } diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index 1400141ae..e05d087a6 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile @@ -7,4 +7,3 @@ EXTRA_AFLAGS := -traditional lib-y += delay.o string.o lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) lib-$(CONFIG_SMP) += spinlock.o -lib-$(CONFIG_32BIT) += div64.o diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 468f4ea33..71f0a2fb3 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c @@ -11,6 +11,7 @@ * Copyright (C) 1997 Martin Mares */ +#include #include #include diff --git a/arch/s390/lib/div64.c b/arch/s390/lib/div64.c deleted file mode 100644 index 0481f3424..000000000 --- a/arch/s390/lib/div64.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * arch/s390/lib/div64.c - * - * __div64_32 implementation for 31 bit. - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), - */ - -#include -#include - -#ifdef CONFIG_MARCH_G5 - -/* - * Function to divide an unsigned 64 bit integer by an unsigned - * 31 bit integer using signed 64/32 bit division. - */ -static uint32_t __div64_31(uint64_t *n, uint32_t base) -{ - register uint32_t reg2 asm("2"); - register uint32_t reg3 asm("3"); - uint32_t *words = (uint32_t *) n; - uint32_t tmp; - - /* Special case base==1, remainder = 0, quotient = n */ - if (base == 1) - return 0; - /* - * Special case base==0 will cause a fixed point divide exception - * on the dr instruction and may not happen anyway. For the - * following calculation we can assume base > 1. The first - * signed 64 / 32 bit division with an upper half of 0 will - * give the correct upper half of the 64 bit quotient. - */ - reg2 = 0UL; - reg3 = words[0]; - asm volatile( - " dr %0,%2\n" - : "+d" (reg2), "+d" (reg3) : "d" (base) : "cc" ); - words[0] = reg3; - reg3 = words[1]; - /* - * To get the lower half of the 64 bit quotient and the 32 bit - * remainder we have to use a little trick. Since we only have - * a signed division the quotient can get too big. To avoid this - * the 64 bit dividend is halved, then the signed division will - * work. Afterwards the quotient and the remainder are doubled. - * If the last bit of the dividend has been one the remainder - * is increased by one then checked against the base. If the - * remainder has overflown subtract base and increase the - * quotient. Simple, no ? - */ - asm volatile( - " nr %2,%1\n" - " srdl %0,1\n" - " dr %0,%3\n" - " alr %0,%0\n" - " alr %1,%1\n" - " alr %0,%2\n" - " clr %0,%3\n" - " jl 0f\n" - " slr %0,%3\n" - " alr %1,%2\n" - "0:\n" - : "+d" (reg2), "+d" (reg3), "=d" (tmp) - : "d" (base), "2" (1UL) : "cc" ); - words[1] = reg3; - return reg2; -} - -/* - * Function to divide an unsigned 64 bit integer by an unsigned - * 32 bit integer using the unsigned 64/31 bit division. - */ -uint32_t __div64_32(uint64_t *n, uint32_t base) -{ - uint32_t r; - - /* - * If the most significant bit of base is set, divide n by - * (base/2). That allows to use 64/31 bit division and gives a - * good approximation of the result: n = (base/2)*q + r. The - * result needs to be corrected with two simple transformations. - * If base is already < 2^31-1 __div64_31 can be used directly. - */ - r = __div64_31(n, ((signed) base < 0) ? (base/2) : base); - if ((signed) base < 0) { - uint64_t q = *n; - /* - * First transformation: - * n = (base/2)*q + r - * = ((base/2)*2)*(q/2) + ((q&1) ? (base/2) : 0) + r - * Since r < (base/2), r + (base/2) < base. - * With q1 = (q/2) and r1 = r + ((q&1) ? (base/2) : 0) - * n = ((base/2)*2)*q1 + r1 with r1 < base. - */ - if (q & 1) - r += base/2; - q >>= 1; - /* - * Second transformation. ((base/2)*2) could have lost the - * last bit. - * n = ((base/2)*2)*q1 + r1 - * = base*q1 - ((base&1) ? q1 : 0) + r1 - */ - if (base & 1) { - int64_t rx = r - q; - /* - * base is >= 2^31. The worst case for the while - * loop is n=2^64-1 base=2^31+1. That gives a - * maximum for q=(2^64-1)/2^31 = 0x1ffffffff. Since - * base >= 2^31 the loop is finished after a maximum - * of three iterations. - */ - while (rx < 0) { - rx += base; - q--; - } - r = rx; - } - *n = q; - } - return r; -} - -#else /* MARCH_G5 */ - -uint32_t __div64_32(uint64_t *n, uint32_t base) -{ - register uint32_t reg2 asm("2"); - register uint32_t reg3 asm("3"); - uint32_t *words = (uint32_t *) n; - - reg2 = 0UL; - reg3 = words[0]; - asm volatile( - " dlr %0,%2\n" - : "+d" (reg2), "+d" (reg3) : "d" (base) : "cc" ); - words[0] = reg3; - reg3 = words[1]; - asm volatile( - " dlr %0,%2\n" - : "+d" (reg2), "+d" (reg3) : "d" (base) : "cc" ); - words[1] = reg3; - return reg2; -} - -#endif /* MARCH_G5 */ - -EXPORT_SYMBOL(__div64_32); diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c index ae5cf5d03..8240cc77e 100644 --- a/arch/s390/lib/string.c +++ b/arch/s390/lib/string.c @@ -233,7 +233,7 @@ char * strrchr(const char * s, int c) if (s[len] == (char) c) return (char *) s + len; } while (--len > 0); - return NULL; + return 0; } EXPORT_SYMBOL(strrchr); @@ -267,7 +267,7 @@ char * strstr(const char * s1,const char * s2) return (char *) s1; s1++; } - return NULL; + return 0; } EXPORT_SYMBOL(strstr); diff --git a/arch/s390/lib/uaccess.S b/arch/s390/lib/uaccess.S index 90443e742..5d59e2625 100644 --- a/arch/s390/lib/uaccess.S +++ b/arch/s390/lib/uaccess.S @@ -40,17 +40,7 @@ __copy_from_user_asm: # move with the reduced length which is < 256 5: mvcp 0(%r5,%r2),0(%r4),%r0 slr %r3,%r5 - alr %r2,%r5 -6: lr %r5,%r3 # copy remaining size - ahi %r5,-1 # subtract 1 for xc loop - bras %r4,8f - xc 0(1,%r2),0(%r2) -7: xc 0(256,%r2),0(%r2) - la %r2,256(%r2) -8: ahi %r5,-256 - jnm 7b - ex %r5,0(%r4) -9: lr %r2,%r3 +6: lr %r2,%r3 br %r14 .section __ex_table,"a" .long 0b,4b @@ -98,31 +88,30 @@ __copy_to_user_asm: .globl __copy_in_user_asm # %r2 = from, %r3 = n, %r4 = to __copy_in_user_asm: - ahi %r3,-1 - jo 6f sacf 256 - bras %r1,4f -0: ahi %r3,257 -1: mvc 0(1,%r4),0(%r2) + bras 1,1f + mvc 0(1,%r4),0(%r2) +0: mvc 0(256,%r4),0(%r2) + la %r2,256(%r2) + la %r4,256(%r4) +1: ahi %r3,-256 + jnm 0b +2: ex %r3,0(%r1) + sacf 0 + slr %r2,%r2 + br 14 +3: mvc 0(1,%r4),0(%r2) la %r2,1(%r2) la %r4,1(%r4) ahi %r3,-1 - jnz 1b -2: lr %r2,%r3 - br %r14 -3: mvc 0(256,%r4),0(%r2) - la %r2,256(%r2) - la %r4,256(%r4) -4: ahi %r3,-256 jnm 3b -5: ex %r3,4(%r1) +4: lr %r2,%r3 sacf 0 -6: slr %r2,%r2 br %r14 .section __ex_table,"a" - .long 1b,2b - .long 3b,0b - .long 5b,0b + .long 0b,3b + .long 2b,3b + .long 3b,4b .previous .align 4 diff --git a/arch/s390/lib/uaccess64.S b/arch/s390/lib/uaccess64.S index 2d42c7e8c..19b41a33c 100644 --- a/arch/s390/lib/uaccess64.S +++ b/arch/s390/lib/uaccess64.S @@ -40,17 +40,7 @@ __copy_from_user_asm: # move with the reduced length which is < 256 5: mvcp 0(%r5,%r2),0(%r4),%r0 slgr %r3,%r5 - algr %r2,%r5 -6: lgr %r5,%r3 # copy remaining size - aghi %r5,-1 # subtract 1 for xc loop - bras %r4,8f - xc 0(1,%r2),0(%r2) -7: xc 0(256,%r2),0(%r2) - la %r2,256(%r2) -8: aghi %r5,-256 - jnm 7b - ex %r5,0(%r4) -9: lgr %r2,%r3 +6: lgr %r2,%r3 br %r14 .section __ex_table,"a" .quad 0b,4b @@ -98,31 +88,30 @@ __copy_to_user_asm: .globl __copy_in_user_asm # %r2 = from, %r3 = n, %r4 = to __copy_in_user_asm: - aghi %r3,-1 - jo 6f sacf 256 - bras %r1,4f -0: aghi %r3,257 -1: mvc 0(1,%r4),0(%r2) + bras 1,1f + mvc 0(1,%r4),0(%r2) +0: mvc 0(256,%r4),0(%r2) + la %r2,256(%r2) + la %r4,256(%r4) +1: aghi %r3,-256 + jnm 0b +2: ex %r3,0(%r1) + sacf 0 + slgr %r2,%r2 + br 14 +3: mvc 0(1,%r4),0(%r2) la %r2,1(%r2) la %r4,1(%r4) aghi %r3,-1 - jnz 1b -2: lgr %r2,%r3 - br %r14 -3: mvc 0(256,%r4),0(%r2) - la %r2,256(%r2) - la %r4,256(%r4) -4: aghi %r3,-256 jnm 3b -5: ex %r3,4(%r1) +4: lgr %r2,%r3 sacf 0 -6: slgr %r2,%r2 - br 14 + br %r14 .section __ex_table,"a" - .quad 1b,2b - .quad 3b,0b - .quad 5b,0b + .quad 0b,3b + .quad 2b,3b + .quad 3b,4b .previous .align 4 diff --git a/arch/s390/math-emu/math.c b/arch/s390/math-emu/math.c index b4957c84e..648df7140 100644 --- a/arch/s390/math-emu/math.c +++ b/arch/s390/math-emu/math.c @@ -9,6 +9,7 @@ * that does not have the IEEE fpu (all processors before G5). */ +#include #include #include #include diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index ceea51cff..51596f429 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -8,6 +8,7 @@ * Collaborative memory management interface. */ +#include #include #include #include @@ -161,7 +162,7 @@ cmm_thread(void *dummy) static void cmm_start_thread(void) { - kernel_thread(cmm_thread, NULL, 0); + kernel_thread(cmm_thread, 0, 0); } static void diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 7cd825758..81ade401b 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -10,6 +10,7 @@ * Copyright (C) 1995 Linus Torvalds */ +#include #include #include #include @@ -144,7 +145,7 @@ static void do_sigsegv(struct pt_regs *regs, unsigned long error_code, #endif si.si_signo = SIGSEGV; si.si_code = si_code; - si.si_addr = (void __user *) address; + si.si_addr = (void *) address; force_sig_info(SIGSEGV, &si, current); } diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index e71c5ee6e..57fa56a0b 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -9,6 +9,7 @@ * Copyright (C) 1995 Linus Torvalds */ +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include @@ -34,7 +34,6 @@ #include #include #include -#include DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); @@ -91,6 +90,17 @@ void show_mem(void) printk("%d pages swap cached\n",cached); } +/* References to section boundaries */ + +extern unsigned long _text; +extern unsigned long _etext; +extern unsigned long _edata; +extern unsigned long __bss_start; +extern unsigned long _end; + +extern unsigned long __init_begin; +extern unsigned long __init_end; + extern unsigned long __initdata zholes_size[]; /* * paging_init() sets up the page tables @@ -107,10 +117,6 @@ void __init paging_init(void) unsigned long pfn = 0; unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; static const int ssm_mask = 0x04000000L; - unsigned long ro_start_pfn, ro_end_pfn; - - ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); - ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); /* unmap whole virtual address space */ @@ -129,7 +135,7 @@ void __init paging_init(void) /* * pg_table is physical at this point */ - pg_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); + pg_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); pg_dir->pgd0 = (_PAGE_TABLE | __pa(pg_table)); pg_dir->pgd1 = (_PAGE_TABLE | (__pa(pg_table)+1024)); @@ -138,10 +144,7 @@ void __init paging_init(void) pg_dir++; for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { - if (pfn >= ro_start_pfn && pfn < ro_end_pfn) - pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); - else - pte = pfn_pte(pfn, PAGE_KERNEL); + pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) pte_clear(&init_mm, 0, &pte); set_pte(pg_table, pte); @@ -173,7 +176,6 @@ void __init paging_init(void) } #else /* CONFIG_64BIT */ - void __init paging_init(void) { pgd_t * pg_dir; @@ -185,15 +187,13 @@ void __init paging_init(void) unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE; static const int ssm_mask = 0x04000000L; + unsigned long zones_size[MAX_NR_ZONES]; unsigned long dma_pfn, high_pfn; - unsigned long ro_start_pfn, ro_end_pfn; memset(zones_size, 0, sizeof(zones_size)); dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; high_pfn = max_low_pfn; - ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); - ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); if (dma_pfn > high_pfn) zones_size[ZONE_DMA] = high_pfn; @@ -219,7 +219,7 @@ void __init paging_init(void) continue; } - pm_dir = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE * 4); + pm_dir = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE*4); pgd_populate(&init_mm, pg_dir, pm_dir); for (j = 0 ; j < PTRS_PER_PMD ; j++,pm_dir++) { @@ -228,14 +228,11 @@ void __init paging_init(void) continue; } - pt_dir = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); + pt_dir = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); pmd_populate_kernel(&init_mm, pm_dir, pt_dir); for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { - if (pfn >= ro_start_pfn && pfn < ro_end_pfn) - pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); - else - pte = pfn_pte(pfn, PAGE_KERNEL); + pte = pfn_pte(pfn, PAGE_KERNEL); if (pfn >= max_low_pfn) { pte_clear(&init_mm, 0, &pte); continue; @@ -291,9 +288,6 @@ void __init mem_init(void) reservedpages << (PAGE_SHIFT-10), datasize >>10, initsize >> 10); - printk("Write protected kernel read-only data: %#lx - %#lx\n", - (unsigned long)&__start_rodata, - PFN_ALIGN((unsigned long)&__end_rodata) - 1); } void free_initmem(void) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index e710e4594..5025065e7 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -465,10 +465,10 @@ config KEXEC help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is independent of the system firmware. And like a reboot + but it is indepedent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. - The name comes from the similarity to the exec system call. + The name comes from the similiarity to the exec system call. It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not diff --git a/arch/sh/Makefile b/arch/sh/Makefile index e467a4506..c72e17a96 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -147,7 +147,7 @@ endif # them changed. We use .arch and .mach to indicate when they were # updated last, otherwise make uses the target directory mtime. -include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) include/config/auto.conf +include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) include/config/MARKER @echo ' SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)' $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi $(Q)ln -fsn $(incdir-prefix)$(cpuincdir-y) include/asm-sh/cpu @@ -157,7 +157,7 @@ include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) include/config/auto.conf # don't, just reference the parent directory so the semantics are # kept roughly the same. -include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/auto.conf +include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/MARKER @echo -n ' SYMLINK include/asm-sh/mach -> ' $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi $(Q)if [ -d $(incdir-prefix)$(incdir-y) ]; then \ diff --git a/arch/sh/boards/adx/irq_maskreg.c b/arch/sh/boards/adx/irq_maskreg.c index 4b2abe5eb..c0973f8d5 100644 --- a/arch/sh/boards/adx/irq_maskreg.c +++ b/arch/sh/boards/adx/irq_maskreg.c @@ -13,6 +13,7 @@ * Each bit of the register is for masking each interrupt. */ +#include #include #include #include @@ -101,6 +102,6 @@ static void end_maskreg_irq(unsigned int irq) void make_maskreg_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &maskreg_irq_type; + irq_desc[irq].handler = &maskreg_irq_type; disable_maskreg_irq(irq); } diff --git a/arch/sh/boards/bigsur/io.c b/arch/sh/boards/bigsur/io.c index 6835381da..a9fde781b 100644 --- a/arch/sh/boards/bigsur/io.c +++ b/arch/sh/boards/bigsur/io.c @@ -14,6 +14,7 @@ * IO functions for a Hitachi Big Sur Evaluation Board. */ +#include #include #include #include diff --git a/arch/sh/boards/bigsur/irq.c b/arch/sh/boards/bigsur/irq.c index ac946a220..6ddbcc772 100644 --- a/arch/sh/boards/bigsur/irq.c +++ b/arch/sh/boards/bigsur/irq.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -252,7 +253,7 @@ static void make_bigsur_l1isr(unsigned int irq) { /* sanity check first */ if(irq >= BIGSUR_IRQ_LOW && irq < BIGSUR_IRQ_HIGH) { /* save the handler in the main description table */ - irq_desc[irq].chip = &bigsur_l1irq_type; + irq_desc[irq].handler = &bigsur_l1irq_type; irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 1; @@ -269,7 +270,7 @@ static void make_bigsur_l2isr(unsigned int irq) { /* sanity check first */ if(irq >= BIGSUR_2NDLVL_IRQ_LOW && irq < BIGSUR_2NDLVL_IRQ_HIGH) { /* save the handler in the main description table */ - irq_desc[irq].chip = &bigsur_l2irq_type; + irq_desc[irq].handler = &bigsur_l2irq_type; irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 1; diff --git a/arch/sh/boards/bigsur/led.c b/arch/sh/boards/bigsur/led.c index 6b08c0e1c..0a2339c69 100644 --- a/arch/sh/boards/bigsur/led.c +++ b/arch/sh/boards/bigsur/led.c @@ -11,6 +11,7 @@ * This file contains Big Sur specific LED code. */ +#include #include #include diff --git a/arch/sh/boards/bigsur/setup.c b/arch/sh/boards/bigsur/setup.c index dfeede9da..e69be0519 100644 --- a/arch/sh/boards/bigsur/setup.c +++ b/arch/sh/boards/bigsur/setup.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/cat68701/setup.c b/arch/sh/boards/cat68701/setup.c index 90e5175df..ae8a350ad 100644 --- a/arch/sh/boards/cat68701/setup.c +++ b/arch/sh/boards/cat68701/setup.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/sh/boards/cqreek/irq.c b/arch/sh/boards/cqreek/irq.c index 2955adc52..d1da0d844 100644 --- a/arch/sh/boards/cqreek/irq.c +++ b/arch/sh/boards/cqreek/irq.c @@ -103,7 +103,7 @@ void __init init_cqreek_IRQ(void) cqreek_irq_data[14].stat_port = BRIDGE_IDE_INTR_STAT; cqreek_irq_data[14].bit = 1; - irq_desc[14].chip = &cqreek_irq_type; + irq_desc[14].handler = &cqreek_irq_type; irq_desc[14].status = IRQ_DISABLED; irq_desc[14].action = 0; irq_desc[14].depth = 1; @@ -117,7 +117,7 @@ void __init init_cqreek_IRQ(void) cqreek_irq_data[10].bit = (1 << 10); /* XXX: Err... we may need demultiplexer for ISA irq... */ - irq_desc[10].chip = &cqreek_irq_type; + irq_desc[10].handler = &cqreek_irq_type; irq_desc[10].status = IRQ_DISABLED; irq_desc[10].action = 0; irq_desc[10].depth = 1; diff --git a/arch/sh/boards/cqreek/setup.c b/arch/sh/boards/cqreek/setup.c index eff4ed935..29b537cd6 100644 --- a/arch/sh/boards/cqreek/setup.c +++ b/arch/sh/boards/cqreek/setup.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c index 0027b80a2..55dece35c 100644 --- a/arch/sh/boards/dreamcast/setup.c +++ b/arch/sh/boards/dreamcast/setup.c @@ -70,7 +70,7 @@ int __init platform_setup(void) /* Assign all virtual IRQs to the System ASIC int. handler */ for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) - irq_desc[i].chip = &systemasic_int; + irq_desc[i].handler = &systemasic_int; board_time_init = aica_time_init; diff --git a/arch/sh/boards/ec3104/setup.c b/arch/sh/boards/ec3104/setup.c index 4b3ef16a0..5130ba2b6 100644 --- a/arch/sh/boards/ec3104/setup.c +++ b/arch/sh/boards/ec3104/setup.c @@ -63,7 +63,7 @@ int __init platform_setup(void) str[i] = ctrl_readb(EC3104_BASE + i); for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) - irq_desc[i].chip = &ec3104_int; + irq_desc[i].handler = &ec3104_int; printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); diff --git a/arch/sh/boards/harp/irq.c b/arch/sh/boards/harp/irq.c index 96bb41c9f..52d0ba390 100644 --- a/arch/sh/boards/harp/irq.c +++ b/arch/sh/boards/harp/irq.c @@ -9,6 +9,7 @@ * Bases on the IPR irq system */ +#include #include #include @@ -113,7 +114,7 @@ static void enable_harp_irq(unsigned int irq) static void __init make_harp_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &harp_irq_type; + irq_desc[irq].handler = &harp_irq_type; disable_harp_irq(irq); } diff --git a/arch/sh/boards/harp/led.c b/arch/sh/boards/harp/led.c index aeb7b392b..76ca4ccac 100644 --- a/arch/sh/boards/harp/led.c +++ b/arch/sh/boards/harp/led.c @@ -9,6 +9,7 @@ * This file contains ST40STB1 HARP and compatible code. */ +#include #include #include diff --git a/arch/sh/boards/harp/setup.c b/arch/sh/boards/harp/setup.c index 886e450ab..05b01b8f4 100644 --- a/arch/sh/boards/harp/setup.c +++ b/arch/sh/boards/harp/setup.c @@ -9,6 +9,7 @@ * STMicroelectronics ST40STB1 HARP and compatible support. */ +#include #include #include #include diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index 71f315663..6d94a8e2e 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c @@ -9,6 +9,7 @@ * Setup code for an HP680 (internal peripherials only) */ +#include #include #include #include diff --git a/arch/sh/boards/mpc1211/led.c b/arch/sh/boards/mpc1211/led.c index 1fe36927f..0a31beec3 100644 --- a/arch/sh/boards/mpc1211/led.c +++ b/arch/sh/boards/mpc1211/led.c @@ -6,6 +6,7 @@ * This file contains Interface MPC-1211 specific LED code. */ +#include static void mach_led(int position, int value) { diff --git a/arch/sh/boards/mpc1211/pci.c b/arch/sh/boards/mpc1211/pci.c index 4ed1a95c6..ba3a65439 100644 --- a/arch/sh/boards/mpc1211/pci.c +++ b/arch/sh/boards/mpc1211/pci.c @@ -11,6 +11,7 @@ * License. See linux/COPYING for more information. * */ +#include #include #include #include @@ -272,9 +273,9 @@ void __init pcibios_fixup_irqs(void) } void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { - resource_size_t start = res->start; + unsigned long start = res->start; if (res->flags & IORESOURCE_IO) { if (start >= 0x10000UL) { diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c index 2bfb221cc..2bb581b91 100644 --- a/arch/sh/boards/mpc1211/setup.c +++ b/arch/sh/boards/mpc1211/setup.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include @@ -193,7 +194,7 @@ static struct hw_interrupt_type mpc1211_irq_type = { static void make_mpc1211_irq(unsigned int irq) { - irq_desc[irq].chip = &mpc1211_irq_type; + irq_desc[irq].handler = &mpc1211_irq_type; irq_desc[irq].status = IRQ_DISABLED; irq_desc[irq].action = 0; irq_desc[irq].depth = 1; diff --git a/arch/sh/boards/overdrive/fpga.c b/arch/sh/boards/overdrive/fpga.c index 956c23901..3a1ec9403 100644 --- a/arch/sh/boards/overdrive/fpga.c +++ b/arch/sh/boards/overdrive/fpga.c @@ -10,6 +10,7 @@ */ +#include #include #include #include diff --git a/arch/sh/boards/overdrive/galileo.c b/arch/sh/boards/overdrive/galileo.c index 29e48971b..276fa11ee 100644 --- a/arch/sh/boards/overdrive/galileo.c +++ b/arch/sh/boards/overdrive/galileo.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -535,7 +536,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) } void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size) + unsigned long size) { } diff --git a/arch/sh/boards/overdrive/io.c b/arch/sh/boards/overdrive/io.c index 4671b6b04..65f3fd056 100644 --- a/arch/sh/boards/overdrive/io.c +++ b/arch/sh/boards/overdrive/io.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/overdrive/irq.c b/arch/sh/boards/overdrive/irq.c index 5d730c703..715e8feb3 100644 --- a/arch/sh/boards/overdrive/irq.c +++ b/arch/sh/boards/overdrive/irq.c @@ -9,6 +9,7 @@ * Bases on the IPR irq system */ +#include #include #include @@ -149,7 +150,7 @@ static void enable_od_irq(unsigned int irq) static void __init make_od_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &od_irq_type; + irq_desc[irq].handler = &od_irq_type; disable_od_irq(irq); } diff --git a/arch/sh/boards/overdrive/led.c b/arch/sh/boards/overdrive/led.c index 860d7f204..734742e92 100644 --- a/arch/sh/boards/overdrive/led.c +++ b/arch/sh/boards/overdrive/led.c @@ -9,6 +9,7 @@ * This file contains an Overdrive specific LED feature. */ +#include #include #include #include diff --git a/arch/sh/boards/overdrive/setup.c b/arch/sh/boards/overdrive/setup.c index a3a7744c2..94f6165d3 100644 --- a/arch/sh/boards/overdrive/setup.c +++ b/arch/sh/boards/overdrive/setup.c @@ -9,6 +9,7 @@ * STMicroelectronics Overdrive Support. */ +#include #include #include #include diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c index ba143fa4a..8b6f0c2af 100644 --- a/arch/sh/boards/renesas/edosk7705/setup.c +++ b/arch/sh/boards/renesas/edosk7705/setup.c @@ -9,6 +9,7 @@ * board by S. Dunn, 2003. */ +#include #include #include #include diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c index 3a1abfa2f..456753d26 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/arch/sh/boards/renesas/hs7751rvoip/io.c @@ -11,6 +11,7 @@ * expectation of later SuperIO and PCMCIA access. */ +#include #include #include #include diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c index 705b7ddcb..ed4c5b50e 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c @@ -10,6 +10,7 @@ * Lineo uSolutions, Inc. 2003. */ +#include #include #include #include @@ -85,7 +86,7 @@ static struct hw_interrupt_type hs7751rvoip_irq_type = { static void make_hs7751rvoip_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &hs7751rvoip_irq_type; + irq_desc[irq].handler = &hs7751rvoip_irq_type; disable_hs7751rvoip_irq(irq); } diff --git a/arch/sh/boards/renesas/hs7751rvoip/led.c b/arch/sh/boards/renesas/hs7751rvoip/led.c index b6608fff9..18a13c8da 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/led.c +++ b/arch/sh/boards/renesas/hs7751rvoip/led.c @@ -10,6 +10,7 @@ * Lineo uSolutions, Inc. 2003. */ +#include #include #include diff --git a/arch/sh/boards/renesas/hs7751rvoip/mach.c b/arch/sh/boards/renesas/hs7751rvoip/mach.c index caf967f77..8bbed6022 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/mach.c +++ b/arch/sh/boards/renesas/hs7751rvoip/mach.c @@ -9,6 +9,7 @@ * Machine vector for the Renesas Technology sales HS7751RVoIP */ +#include #include #include diff --git a/arch/sh/boards/renesas/hs7751rvoip/pci.c b/arch/sh/boards/renesas/hs7751rvoip/pci.c index 7e5786b58..7a442d1ec 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/pci.c +++ b/arch/sh/boards/renesas/hs7751rvoip/pci.c @@ -11,6 +11,7 @@ * PCI initialization for the Renesas SH7751R HS7751RVoIP board */ +#include #include #include #include diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index 29fb5ff70..f1a78b6c7 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c @@ -10,6 +10,7 @@ * Lineo uSolutions, Inc. 2003. */ +#include #include #include diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index 154535440..d36c9374a 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c @@ -9,6 +9,7 @@ * Atom Create Engineering Co., Ltd. 2002. */ +#include #include #include #include @@ -99,7 +100,7 @@ static struct hw_interrupt_type rts7751r2d_irq_type = { static void make_rts7751r2d_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &rts7751r2d_irq_type; + irq_desc[irq].handler = &rts7751r2d_irq_type; disable_rts7751r2d_irq(irq); } diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c index 4d16de71f..9993259a8 100644 --- a/arch/sh/boards/renesas/rts7751r2d/led.c +++ b/arch/sh/boards/renesas/rts7751r2d/led.c @@ -9,6 +9,7 @@ * This file contains Renesas Technology Sales RTS7751R2D specific LED code. */ +#include #include #include diff --git a/arch/sh/boards/renesas/rts7751r2d/mach.c b/arch/sh/boards/renesas/rts7751r2d/mach.c index 5ed9e97ea..610740512 100644 --- a/arch/sh/boards/renesas/rts7751r2d/mach.c +++ b/arch/sh/boards/renesas/rts7751r2d/mach.c @@ -9,6 +9,7 @@ * Machine vector for the Renesas Technology sales RTS7751R2D */ +#include #include #include diff --git a/arch/sh/boards/renesas/systemh/irq.c b/arch/sh/boards/renesas/systemh/irq.c index 8372d967f..7a2eb10ed 100644 --- a/arch/sh/boards/renesas/systemh/irq.c +++ b/arch/sh/boards/renesas/systemh/irq.c @@ -9,6 +9,7 @@ * Jonathan Short. */ +#include #include #include @@ -104,7 +105,7 @@ static void end_systemh_irq(unsigned int irq) void make_systemh_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &systemh_irq_type; + irq_desc[irq].handler = &systemh_irq_type; disable_systemh_irq(irq); } diff --git a/arch/sh/boards/se/7300/io.c b/arch/sh/boards/se/7300/io.c index f449a94dd..3c89def46 100644 --- a/arch/sh/boards/se/7300/io.c +++ b/arch/sh/boards/se/7300/io.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/7300/irq.c b/arch/sh/boards/se/7300/irq.c index 216a78d1a..96c8c23d6 100644 --- a/arch/sh/boards/se/7300/irq.c +++ b/arch/sh/boards/se/7300/irq.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/7300/led.c b/arch/sh/boards/se/7300/led.c index ad51f0a9c..02c7f846c 100644 --- a/arch/sh/boards/se/7300/led.c +++ b/arch/sh/boards/se/7300/led.c @@ -11,6 +11,7 @@ * This file contains Solution Engine specific LED code. */ +#include #include #include diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c index ebcd98d4c..08536bc22 100644 --- a/arch/sh/boards/se/7300/setup.c +++ b/arch/sh/boards/se/7300/setup.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/73180/io.c b/arch/sh/boards/se/73180/io.c index 755df5ac4..73648cbe3 100644 --- a/arch/sh/boards/se/73180/io.c +++ b/arch/sh/boards/se/73180/io.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/73180/irq.c b/arch/sh/boards/se/73180/irq.c index 4344d0ef2..70f04caad 100644 --- a/arch/sh/boards/se/73180/irq.c +++ b/arch/sh/boards/se/73180/irq.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -84,7 +85,7 @@ void make_intreq_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &intreq_irq_type; + irq_desc[irq].handler = &intreq_irq_type; disable_intreq_irq(irq); } diff --git a/arch/sh/boards/se/73180/led.c b/arch/sh/boards/se/73180/led.c index 610439fde..1e8f1cf3e 100644 --- a/arch/sh/boards/se/73180/led.c +++ b/arch/sh/boards/se/73180/led.c @@ -11,6 +11,7 @@ * This file contains Solution Engine specific LED code. */ +#include #include #include diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c index cdb7b5f8d..07fa90c38 100644 --- a/arch/sh/boards/se/73180/setup.c +++ b/arch/sh/boards/se/73180/setup.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index 3e558716c..210897b31 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/se/770x/led.c b/arch/sh/boards/se/770x/led.c index 3cddbda02..5c64e8ab2 100644 --- a/arch/sh/boards/se/770x/led.c +++ b/arch/sh/boards/se/770x/led.c @@ -9,6 +9,7 @@ * This file contains Solution Engine specific LED code. */ +#include #include static void mach_led(int position, int value) diff --git a/arch/sh/boards/se/770x/mach.c b/arch/sh/boards/se/770x/mach.c index 6ec07bd3d..f9b4c56cc 100644 --- a/arch/sh/boards/se/770x/mach.c +++ b/arch/sh/boards/se/770x/mach.c @@ -9,6 +9,7 @@ * Machine vector for the Hitachi SolutionEngine */ +#include #include #include diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index 7d1a07172..2bed46fb6 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c @@ -8,6 +8,7 @@ * */ +#include #include #include diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c index bf6c02361..ad71f3e66 100644 --- a/arch/sh/boards/se/7751/irq.c +++ b/arch/sh/boards/se/7751/irq.c @@ -9,6 +9,7 @@ * Ian da Silva and Jeremy Siegel, 2001. */ +#include #include #include #include diff --git a/arch/sh/boards/se/7751/led.c b/arch/sh/boards/se/7751/led.c index a878726d3..0c788230c 100644 --- a/arch/sh/boards/se/7751/led.c +++ b/arch/sh/boards/se/7751/led.c @@ -9,6 +9,7 @@ * This file contains Solution Engine specific LED code. */ +#include #include static void mach_led(int position, int value) diff --git a/arch/sh/boards/se/7751/mach.c b/arch/sh/boards/se/7751/mach.c index 62d8d3e62..16d386b7e 100644 --- a/arch/sh/boards/se/7751/mach.c +++ b/arch/sh/boards/se/7751/mach.c @@ -9,6 +9,7 @@ * Machine vector for the Hitachi 7751 SolutionEngine */ +#include #include #include diff --git a/arch/sh/boards/se/7751/pci.c b/arch/sh/boards/se/7751/pci.c index 3ee03014d..1f273efd2 100644 --- a/arch/sh/boards/se/7751/pci.c +++ b/arch/sh/boards/se/7751/pci.c @@ -11,6 +11,7 @@ * PCI initialization for the Hitachi SH7751 Solution Engine board (MS7751SE01) */ +#include #include #include #include diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index 48dc5aee6..9d111bb88 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c @@ -9,6 +9,7 @@ * Ian da Silva and Jeremy Siegel, 2001. */ +#include #include #include diff --git a/arch/sh/boards/sh03/led.c b/arch/sh/boards/sh03/led.c index d38562ad6..c851b0bec 100644 --- a/arch/sh/boards/sh03/led.c +++ b/arch/sh/boards/sh03/led.c @@ -6,6 +6,7 @@ * This file contains Interface CTP/PCI-SH03 specific LED code. */ +#include #include /* Cycle the LED's in the clasic Knightrider/Sun pattern */ diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index 60290f8f2..d2a08ca5e 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/boards/sh2000/setup.c b/arch/sh/boards/sh2000/setup.c index 2fe6a1176..a290b1d09 100644 --- a/arch/sh/boards/sh2000/setup.c +++ b/arch/sh/boards/sh2000/setup.c @@ -7,6 +7,7 @@ * */ +#include #include #include diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index f1f7c70c9..08fc98342 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c @@ -14,6 +14,7 @@ */ /****************************************************************************/ +#include #include #include #include @@ -50,7 +51,7 @@ static int __init eraseconfig_init(void) { printk("SnapGear: EraseConfig init\n"); /* Setup "EraseConfig" switch on external IRQ 0 */ - if (request_irq(IRL0_IRQ, eraseconfig_interrupt, IRQF_DISABLED, + if (request_irq(IRL0_IRQ, eraseconfig_interrupt, SA_INTERRUPT, "Erase Config", NULL)) printk("SnapGear: failed to register IRQ%d for Reset witch\n", IRL0_IRQ); diff --git a/arch/sh/boards/superh/microdev/io.c b/arch/sh/boards/superh/microdev/io.c index 4836b9422..1ed7f880b 100644 --- a/arch/sh/boards/superh/microdev/io.c +++ b/arch/sh/boards/superh/microdev/io.c @@ -11,6 +11,7 @@ * License. See linux/COPYING for more information. */ +#include #include #include #include diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c index 236398fbc..efcbd86b7 100644 --- a/arch/sh/boards/superh/microdev/irq.c +++ b/arch/sh/boards/superh/microdev/irq.c @@ -9,6 +9,7 @@ * License. See linux/COPYING for more information. */ +#include #include #include @@ -146,7 +147,7 @@ static void enable_microdev_irq(unsigned int irq) static void __init make_microdev_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = µdev_irq_type; + irq_desc[irq].handler = µdev_irq_type; disable_microdev_irq(irq); } diff --git a/arch/sh/boards/superh/microdev/led.c b/arch/sh/boards/superh/microdev/led.c index a38f5351b..52a98e69d 100644 --- a/arch/sh/boards/superh/microdev/led.c +++ b/arch/sh/boards/superh/microdev/led.c @@ -9,6 +9,7 @@ * */ +#include #include #define LED_REGISTER 0xa6104d20 diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c index 61b402a3f..892b14d31 100644 --- a/arch/sh/boards/superh/microdev/setup.c +++ b/arch/sh/boards/superh/microdev/setup.c @@ -11,6 +11,7 @@ * License. See linux/COPYING for more information. */ +#include #include #include #include diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c index c5e4ed108..02e84f03f 100644 --- a/arch/sh/boards/unknown/setup.c +++ b/arch/sh/boards/unknown/setup.c @@ -12,6 +12,7 @@ * method to start debugging a new board during bring-up until proper board * setup code is written. */ +#include #include #include #include diff --git a/arch/sh/boot/compressed/head.S b/arch/sh/boot/compressed/head.S index 4c26a1922..88db04d32 100644 --- a/arch/sh/boot/compressed/head.S +++ b/arch/sh/boot/compressed/head.S @@ -7,6 +7,7 @@ .text +#include #include .global startup diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c index f2fed5ce5..211e91100 100644 --- a/arch/sh/boot/compressed/misc.c +++ b/arch/sh/boot/compressed/misc.c @@ -11,6 +11,7 @@ * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000 */ +#include #include #ifdef CONFIG_SH_STANDARD_BIOS #include diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c index ac3062671..4c062d6b7 100644 --- a/arch/sh/cchips/hd6446x/hd64461/io.c +++ b/arch/sh/cchips/hd6446x/hd64461/io.c @@ -4,6 +4,7 @@ * Typical I/O routines for HD64461 system. */ +#include #include #include diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c index ad1260167..f014b9bf6 100644 --- a/arch/sh/cchips/hd6446x/hd64461/setup.c +++ b/arch/sh/cchips/hd6446x/hd64461/setup.c @@ -4,6 +4,7 @@ * Hitachi HD64461 companion chip support */ +#include #include #include #include @@ -133,7 +134,7 @@ int hd64461_irq_demux(int irq) return __irq_demux(irq); } -static struct irqaction irq0 = { hd64461_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64461", NULL, NULL }; +static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64461", NULL, NULL }; int __init setup_hd64461(void) { @@ -153,7 +154,7 @@ int __init setup_hd64461(void) outw(0xffff, HD64461_NIMR); for (i = HD64461_IRQBASE; i < HD64461_IRQBASE + 16; i++) { - irq_desc[i].chip = &hd64461_irq_type; + irq_desc[i].handler = &hd64461_irq_type; } setup_irq(CONFIG_HD64461_IRQ, &irq0); diff --git a/arch/sh/cchips/hd6446x/hd64465/gpio.c b/arch/sh/cchips/hd6446x/hd64465/gpio.c index 72320d02d..9785fdef8 100644 --- a/arch/sh/cchips/hd6446x/hd64465/gpio.c +++ b/arch/sh/cchips/hd6446x/hd64465/gpio.c @@ -170,7 +170,7 @@ static int __init hd64465_gpio_init(void) if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME)) return -EBUSY; if (request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt, - IRQF_DISABLED, MODNAME, 0)) + SA_INTERRUPT, MODNAME, 0)) goto out_irqfailed; printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO); diff --git a/arch/sh/cchips/hd6446x/hd64465/io.c b/arch/sh/cchips/hd6446x/hd64465/io.c index 58704d066..84cb142de 100644 --- a/arch/sh/cchips/hd6446x/hd64465/io.c +++ b/arch/sh/cchips/hd6446x/hd64465/io.c @@ -9,6 +9,7 @@ * Typical I/O routines for HD64465 system. */ +#include #include #include #include diff --git a/arch/sh/cchips/hd6446x/hd64465/setup.c b/arch/sh/cchips/hd6446x/hd64465/setup.c index d2b2851bc..68e4c4e42 100644 --- a/arch/sh/cchips/hd6446x/hd64465/setup.c +++ b/arch/sh/cchips/hd6446x/hd64465/setup.c @@ -9,6 +9,7 @@ * Copyright (C) 2000 YAEGASHI Takeshi */ +#include #include #include #include @@ -153,7 +154,7 @@ int hd64465_irq_demux(int irq) return irq; } -static struct irqaction irq0 = { hd64465_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64465", NULL, NULL}; +static struct irqaction irq0 = { hd64465_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64465", NULL, NULL}; static int __init setup_hd64465(void) @@ -181,7 +182,7 @@ static int __init setup_hd64465(void) outw(0xffff, HD64465_REG_NIMR); /* mask all interrupts */ for (i = 0; i < HD64465_IRQ_NUM ; i++) { - irq_desc[HD64465_IRQ_BASE + i].chip = &hd64465_irq_type; + irq_desc[HD64465_IRQ_BASE + i].handler = &hd64465_irq_type; } setup_irq(CONFIG_HD64465_IRQ, &irq0); diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 0dc1fb8f9..2ee330b3c 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c @@ -21,6 +21,7 @@ #undef DEBUG +#include #include #include #include @@ -165,7 +166,7 @@ int voyagergx_irq_demux(int irq) static struct irqaction irq0 = { .name = "voyagergx", .handler = voyagergx_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, }; @@ -190,7 +191,7 @@ void __init setup_voyagergx_irq(void) flag = 1; } if (flag == 1) - irq_desc[VOYAGER_IRQ_BASE + i].chip = &voyagergx_irq_type; + irq_desc[VOYAGER_IRQ_BASE + i].handler = &voyagergx_irq_type; } setup_irq(IRQ_VOYAGER, &irq0); diff --git a/arch/sh/drivers/dma/dma-g2.c b/arch/sh/drivers/dma/dma-g2.c index 0f866f878..5afab6f56 100644 --- a/arch/sh/drivers/dma/dma-g2.c +++ b/arch/sh/drivers/dma/dma-g2.c @@ -56,7 +56,7 @@ static irqreturn_t g2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction g2_dma_irq = { .name = "g2 DMA handler", .handler = g2_dma_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; static int g2_enable_dma(struct dma_channel *chan) diff --git a/arch/sh/drivers/dma/dma-pvr2.c b/arch/sh/drivers/dma/dma-pvr2.c index 30a580aa7..df604975c 100644 --- a/arch/sh/drivers/dma/dma-pvr2.c +++ b/arch/sh/drivers/dma/dma-pvr2.c @@ -70,7 +70,7 @@ static int pvr2_xfer_dma(struct dma_channel *chan) static struct irqaction pvr2_dma_irq = { .name = "pvr2 DMA handler", .handler = pvr2_dma_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; static struct dma_ops pvr2_dma_ops = { diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index e028a2d2a..cca26c4c9 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c @@ -12,6 +12,7 @@ * for more details. */ +#include #include #include #include @@ -90,7 +91,7 @@ static int sh_dmac_request_dma(struct dma_channel *chan) chan->chan); return request_irq(get_dmte_irq(chan->chan), dma_tei, - IRQF_DISABLED, name, chan); + SA_INTERRUPT, name, chan); } static void sh_dmac_free_dma(struct dma_channel *chan) @@ -258,7 +259,7 @@ static int __init sh_dmac_init(void) #ifdef CONFIG_CPU_SH4 make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); - i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); + i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0); if (i < 0) return i; #endif diff --git a/arch/sh/drivers/pci/dma-dreamcast.c b/arch/sh/drivers/pci/dma-dreamcast.c index 6acf02b93..e12418bb1 100644 --- a/arch/sh/drivers/pci/dma-dreamcast.c +++ b/arch/sh/drivers/pci/dma-dreamcast.c @@ -15,6 +15,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c index 63b1c6f4b..cf30e2fa5 100644 --- a/arch/sh/drivers/pci/fixups-dreamcast.c +++ b/arch/sh/drivers/pci/fixups-dreamcast.c @@ -15,6 +15,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-bigsur.c b/arch/sh/drivers/pci/ops-bigsur.c index ae82c6ca0..9b43da678 100644 --- a/arch/sh/drivers/pci/ops-bigsur.c +++ b/arch/sh/drivers/pci/ops-bigsur.c @@ -11,6 +11,7 @@ * PCI initialization for the Hitachi Big Sur Evaluation Board */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c index 23d527919..69af80b93 100644 --- a/arch/sh/drivers/pci/ops-dreamcast.c +++ b/arch/sh/drivers/pci/ops-dreamcast.c @@ -15,6 +15,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-rts7751r2d.c b/arch/sh/drivers/pci/ops-rts7751r2d.c index 83171d101..beafa11f4 100644 --- a/arch/sh/drivers/pci/ops-rts7751r2d.c +++ b/arch/sh/drivers/pci/ops-rts7751r2d.c @@ -11,6 +11,7 @@ * PCI initialization for the Renesas SH7751R RTS7751R2D board */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-sh03.c b/arch/sh/drivers/pci/ops-sh03.c index e58d556e5..df2199732 100644 --- a/arch/sh/drivers/pci/ops-sh03.c +++ b/arch/sh/drivers/pci/ops-sh03.c @@ -4,6 +4,7 @@ * PCI initialization for the Interface CTP/PCI-SH03 board */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-snapgear.c b/arch/sh/drivers/pci/ops-snapgear.c index 3cbd14dd2..6fdb9765c 100644 --- a/arch/sh/drivers/pci/ops-snapgear.c +++ b/arch/sh/drivers/pci/ops-snapgear.c @@ -13,6 +13,7 @@ * PCI initialization for the SnapGear boards */ +#include #include #include #include diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c index 682f3dae3..30b14ac7a 100644 --- a/arch/sh/drivers/pci/pci-sh7751.c +++ b/arch/sh/drivers/pci/pci-sh7751.c @@ -15,6 +15,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c index 7c81b8b65..cb6752131 100644 --- a/arch/sh/drivers/pci/pci-st40.c +++ b/arch/sh/drivers/pci/pci-st40.c @@ -7,6 +7,7 @@ * Support functions for the ST40 PCI hardware. */ +#include #include #include #include @@ -447,7 +448,7 @@ static int __init pcibios_init(void) PHYSADDR(memory_end) - PHYSADDR(memory_start)); if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq, - IRQF_DISABLED, "st40pci", NULL)) { + SA_INTERRUPT, "st40pci", NULL)) { printk(KERN_ERR "st40pci: Cannot hook interrupt\n"); return -EIO; } diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 3d546ba32..c1669905a 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c @@ -75,7 +75,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root, } void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) __attribute__ ((weak)); /* @@ -85,10 +85,10 @@ void pcibios_align_resource(void *data, struct resource *res, * modulo 0x400. */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c index f1f9ab87f..7a3b18faa 100644 --- a/arch/sh/kernel/cf-enabler.c +++ b/arch/sh/kernel/cf-enabler.c @@ -9,6 +9,7 @@ * Enable the CF configuration. */ +#include #include #include diff --git a/arch/sh/kernel/cpu/irq/imask.c b/arch/sh/kernel/cpu/irq/imask.c index a33ae3e0a..baed9a550 100644 --- a/arch/sh/kernel/cpu/irq/imask.c +++ b/arch/sh/kernel/cpu/irq/imask.c @@ -105,6 +105,6 @@ static void shutdown_imask_irq(unsigned int irq) void make_imask_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &imask_irq_type; + irq_desc[irq].handler = &imask_irq_type; enable_irq(irq); } diff --git a/arch/sh/kernel/cpu/irq/intc2.c b/arch/sh/kernel/cpu/irq/intc2.c index 30064bf6e..06e8afab3 100644 --- a/arch/sh/kernel/cpu/irq/intc2.c +++ b/arch/sh/kernel/cpu/irq/intc2.c @@ -137,7 +137,7 @@ void make_intc2_irq(unsigned int irq, local_irq_restore(flags); - irq_desc[irq].chip = &intc2_irq_type; + irq_desc[irq].handler = &intc2_irq_type; disable_intc2_irq(irq); } diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index 0f545941f..e55150ed0 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c @@ -15,6 +15,7 @@ * */ +#include #include #include #include @@ -114,7 +115,7 @@ void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, int priority) ipr_data[irq].shift = pos*4; /* POSition (0-3) x 4 means shift */ ipr_data[irq].priority = priority; - irq_desc[irq].chip = &ipr_irq_type; + irq_desc[irq].handler = &ipr_irq_type; disable_ipr_irq(irq); } diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c index 80cd8108d..95d6024fe 100644 --- a/arch/sh/kernel/cpu/irq/pint.c +++ b/arch/sh/kernel/cpu/irq/pint.c @@ -10,6 +10,7 @@ * for more details. */ +#include #include #include #include @@ -84,7 +85,7 @@ static void end_pint_irq(unsigned int irq) void make_pint_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &pint_irq_type; + irq_desc[irq].handler = &pint_irq_type; disable_pint_irq(irq); } diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S index cc04e9e23..966c0858b 100644 --- a/arch/sh/kernel/cpu/sh3/ex.S +++ b/arch/sh/kernel/cpu/sh3/ex.S @@ -12,6 +12,7 @@ * */ #include +#include .align 2 .data diff --git a/arch/sh/kernel/cpu/sh4/ex.S b/arch/sh/kernel/cpu/sh4/ex.S index 26a27df06..8221e9d15 100644 --- a/arch/sh/kernel/cpu/sh4/ex.S +++ b/arch/sh/kernel/cpu/sh4/ex.S @@ -12,6 +12,7 @@ * */ #include +#include .align 2 .data diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index b09805f3e..8437ea743 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -416,27 +417,24 @@ static struct file_operations sq_fops = { static struct miscdevice sq_dev = { .minor = STORE_QUEUE_MINOR, .name = "sq", + .devfs_name = "cpu/sq", .fops = &sq_fops, }; static int __init sq_api_init(void) { - int ret; printk(KERN_NOTICE "sq: Registering store queue API.\n"); +#ifdef CONFIG_PROC_FS create_proc_read_entry("sq_mapping", 0, 0, sq_mapping_read_proc, 0); +#endif - ret = misc_register(&sq_dev); - if (ret) - remove_proc_entry("sq_mapping", NULL); - - return ret; + return misc_register(&sq_dev); } static void __exit sq_api_exit(void) { misc_deregister(&sq_dev); - remove_proc_entry("sq_mapping", NULL); } module_init(sq_api_init); diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S index 7dfd2ba75..a440d36ee 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/entry.S @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index c2e07f7f3..b56e79632 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c @@ -47,7 +47,7 @@ int show_interrupts(struct seq_file *p, void *v) goto unlock; seq_printf(p, "%3d: ",i); seq_printf(p, "%10u ", kstat_irqs(i)); - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff --git a/arch/sh/kernel/machine_kexec.c b/arch/sh/kernel/machine_kexec.c index 6bcd8d923..43546525f 100644 --- a/arch/sh/kernel/machine_kexec.c +++ b/arch/sh/kernel/machine_kexec.c @@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)( unsigned long start_address, unsigned long vbr_reg) ATTRIB_NORET; -extern const unsigned char relocate_new_kernel[]; -extern const unsigned int relocate_new_kernel_size; +const extern unsigned char relocate_new_kernel[]; +const extern unsigned int relocate_new_kernel_size; extern void *gdb_vbr_vector; /* diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index f2031314c..22dc9c212 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c @@ -26,7 +26,6 @@ #include #include #include -#include static int hlt_counter=0; diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c index f7eebbde3..3887b4f6f 100644 --- a/arch/sh/kernel/ptrace.c +++ b/arch/sh/kernel/ptrace.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/arch/sh/kernel/relocate_kernel.S b/arch/sh/kernel/relocate_kernel.S index 8221b37c9..b0695cffe 100644 --- a/arch/sh/kernel/relocate_kernel.S +++ b/arch/sh/kernel/relocate_kernel.S @@ -8,6 +8,7 @@ * Version 2. See the file COPYING for more details. */ +#include #include #define PAGE_SIZE 4096 /* must be same value as in */ diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index b368a69fc..1680bb0e5 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -10,7 +10,7 @@ * This file handles the architecture-dependent parts of initialization */ -#include +#include #include #include #include @@ -403,7 +403,7 @@ static int __init topology_init(void) int cpu_id; for_each_possible_cpu(cpu_id) - register_cpu(&cpu[cpu_id], cpu_id); + register_cpu(&cpu[cpu_id], cpu_id, NULL); return 0; } diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 245ed8f94..d5d032533 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 6c0fb7c4a..62c7d1c0a 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c @@ -10,6 +10,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include #include diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index a1589f854..314a275c0 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -10,6 +10,7 @@ * Copyright (C) 1991, 1992, 1995 Linus Torvalds */ +#include #include #include #include diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index d4212add5..96a64cb13 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c @@ -107,7 +107,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id, static struct irqaction tmu_irq = { .name = "timer", .handler = tmu_timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .mask = CPU_MASK_NONE, }; diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index d9db1180f..7eb06719d 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -12,6 +12,7 @@ * 'Traps.c' handles hardware traps and faults after we have saved some * state in 'entry.S'. */ +#include #include #include #include diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 95fdd9135..51bdc1cf7 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S @@ -2,6 +2,7 @@ * ld script to make SuperH Linux kernel * Written by Niibe Yutaka */ +#include #include #ifdef CONFIG_CPU_LITTLE_ENDIAN diff --git a/arch/sh/lib/memcpy-sh4.S b/arch/sh/lib/memcpy-sh4.S index db6b73653..55f227441 100644 --- a/arch/sh/lib/memcpy-sh4.S +++ b/arch/sh/lib/memcpy-sh4.S @@ -8,6 +8,7 @@ * */ #include +#include /* * void *memcpy(void *dst, const void *src, size_t n); diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index 524cea5b4..ab833adf2 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c @@ -10,6 +10,7 @@ * for more details. */ +#include #include #include #include diff --git a/arch/sh/mm/clear_page.S b/arch/sh/mm/clear_page.S index 08acead7b..ae58a61f0 100644 --- a/arch/sh/mm/clear_page.S +++ b/arch/sh/mm/clear_page.S @@ -6,6 +6,7 @@ * Copyright (C) 2001, 2002 Niibe Yutaka * */ +#include #include /* diff --git a/arch/sh/mm/extable.c b/arch/sh/mm/extable.c index c1cf4463d..505ede7c2 100644 --- a/arch/sh/mm/extable.c +++ b/arch/sh/mm/extable.c @@ -4,6 +4,7 @@ * linux/arch/i386/mm/extable.c */ +#include #include #include diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 2a85bc15a..a3568fd51 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c @@ -8,6 +8,7 @@ * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) */ +#include #include #include #include diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 8ea27ca4b..77b4a838f 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -9,6 +9,7 @@ * Copyright (C) 1995 Linus Torvalds */ +#include #include #include #include diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c index c776b60fc..e5907c733 100644 --- a/arch/sh/mm/pg-sh4.c +++ b/arch/sh/mm/pg-sh4.c @@ -6,6 +6,7 @@ * * Released under the terms of the GNU GPL v2.0. */ +#include #include #include #include diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c index c265185b2..5ec9ddcc4 100644 --- a/arch/sh/oprofile/op_model_sh7750.c +++ b/arch/sh/oprofile/op_model_sh7750.c @@ -198,7 +198,7 @@ static int sh7750_perf_counter_create_files(struct super_block *sb, struct dentr for (i = 0; i < NR_CNTRS; i++) { struct dentry *dir; - char buf[4]; + char buf[3]; snprintf(buf, sizeof(buf), "%d", i); dir = oprofilefs_mkdir(sb, root, buf); diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile index ebf200439..8ca57ffa2 100644 --- a/arch/sh64/Makefile +++ b/arch/sh64/Makefile @@ -26,6 +26,7 @@ LDFLAGS += -EB -mshelf32_linux endif # No requirements for endianess support from AFLAGS, 'as' always run through gcc +AFLAGS += -m5 -isa=sh64 -traditional CFLAGS += $(cpu-y) LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ diff --git a/arch/sh64/boot/compressed/misc.c b/arch/sh64/boot/compressed/misc.c index ee7a1b6ac..89dbf45df 100644 --- a/arch/sh64/boot/compressed/misc.c +++ b/arch/sh64/boot/compressed/misc.c @@ -9,6 +9,7 @@ * Adapted for SHmedia from sh by Stuart Menefy, May 2002 */ +#include #include /* cache.c */ diff --git a/arch/sh64/boot/compressed/vmlinux.lds.S b/arch/sh64/boot/compressed/vmlinux.lds.S index 59c2ef4ae..15a737d9b 100644 --- a/arch/sh64/boot/compressed/vmlinux.lds.S +++ b/arch/sh64/boot/compressed/vmlinux.lds.S @@ -4,6 +4,7 @@ * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka */ +#include #ifdef CONFIG_LITTLE_ENDIAN /* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */ diff --git a/arch/sh64/kernel/alphanum.c b/arch/sh64/kernel/alphanum.c index 9079d1e94..56d6f9f71 100644 --- a/arch/sh64/kernel/alphanum.c +++ b/arch/sh64/kernel/alphanum.c @@ -9,6 +9,7 @@ * Machine-independent functions for handling 8-digit alphanumeric display * (e.g. Agilent HDSP-253x) */ +#include #include #include diff --git a/arch/sh64/kernel/dma.c b/arch/sh64/kernel/dma.c index 32c6f0549..09cd9f467 100644 --- a/arch/sh64/kernel/dma.c +++ b/arch/sh64/kernel/dma.c @@ -115,7 +115,7 @@ static irqreturn_t dma_mte(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction irq_dmte = { .handler = dma_mte, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "DMA MTE", }; @@ -152,7 +152,7 @@ static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs) static struct irqaction irq_derr = { .handler = dma_err, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "DMA Error", }; diff --git a/arch/sh64/kernel/entry.S b/arch/sh64/kernel/entry.S index 40d453462..2e2cfe20b 100644 --- a/arch/sh64/kernel/entry.S +++ b/arch/sh64/kernel/entry.S @@ -11,6 +11,7 @@ * */ +#include #include #include diff --git a/arch/sh64/kernel/head.S b/arch/sh64/kernel/head.S index f3740ddbc..cc0b628a9 100644 --- a/arch/sh64/kernel/head.S +++ b/arch/sh64/kernel/head.S @@ -20,6 +20,7 @@ * Add early SCIF console DTLB mapping. */ +#include #include #include diff --git a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c index e7e07f874..d69879c0e 100644 --- a/arch/sh64/kernel/irq.c +++ b/arch/sh64/kernel/irq.c @@ -15,6 +15,7 @@ * Naturally it's not a 1:1 relation, but there are similarities. */ +#include #include #include #include @@ -64,7 +65,7 @@ int show_interrupts(struct seq_file *p, void *v) goto unlock; seq_printf(p, "%3d: ",i); seq_printf(p, "%10u ", kstat_irqs(i)); - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) diff --git a/arch/sh64/kernel/irq_intc.c b/arch/sh64/kernel/irq_intc.c index 42c07d2e7..fc99bf4e3 100644 --- a/arch/sh64/kernel/irq_intc.c +++ b/arch/sh64/kernel/irq_intc.c @@ -15,6 +15,7 @@ * */ +#include #include #include #include @@ -177,7 +178,7 @@ static void end_intc_irq(unsigned int irq) void make_intc_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].chip = &intc_irq_type; + irq_desc[irq].handler = &intc_irq_type; disable_intc_irq(irq); } @@ -207,7 +208,7 @@ void __init init_IRQ(void) /* Set default: per-line enable/disable, priority driven ack/eoi */ for (i = 0; i < NR_INTC_IRQS; i++) { if (platform_int_priority[i] != NO_PRIORITY) { - irq_desc[i].chip = &intc_irq_type; + irq_desc[i].handler = &intc_irq_type; } } diff --git a/arch/sh64/kernel/led.c b/arch/sh64/kernel/led.c index e35d3f667..cf993c4a9 100644 --- a/arch/sh64/kernel/led.c +++ b/arch/sh64/kernel/led.c @@ -8,6 +8,7 @@ * * Flash the LEDs */ +#include #include #include diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 9dae689b6..6197879e8 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c @@ -9,6 +9,7 @@ * Support functions for the SH5 PCI hardware. */ +#include #include #include #include @@ -473,13 +474,13 @@ static void __init pcibios_size_bridges(void) static int __init pcibios_init(void) { if (request_irq(IRQ_ERR, pcish5_err_irq, - IRQF_DISABLED, "PCI Error",NULL) < 0) { + SA_INTERRUPT, "PCI Error",NULL) < 0) { printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n"); return -EINVAL; } if (request_irq(IRQ_SERR, pcish5_serr_irq, - IRQF_DISABLED, "PCI SERR interrupt", NULL) < 0) { + SA_INTERRUPT, "PCI SERR interrupt", NULL) < 0) { printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n"); return -EINVAL; } diff --git a/arch/sh64/kernel/pcibios.c b/arch/sh64/kernel/pcibios.c index 945920bc2..50c61dcb9 100644 --- a/arch/sh64/kernel/pcibios.c +++ b/arch/sh64/kernel/pcibios.c @@ -69,10 +69,10 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root, * modulo 0x400. */ void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (start & 0x300) { start = (start + 0x3ff) & ~0x3ff; diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c index db475b783..1da9c61d6 100644 --- a/arch/sh64/kernel/process.c +++ b/arch/sh64/kernel/process.c @@ -35,6 +35,7 @@ #define __KERNEL_SYSCALLS__ #include +#include #include #include #include @@ -355,9 +356,6 @@ void machine_power_off(void) enter_deep_standby(); } -void (*pm_power_off)(void) = machine_power_off; -EXPORT_SYMBOL(pm_power_off); - void show_regs(struct pt_regs * regs) { unsigned long long ah, al, bh, bl, ch, cl; diff --git a/arch/sh64/kernel/ptrace.c b/arch/sh64/kernel/ptrace.c index 4e95e18b4..cd22e9471 100644 --- a/arch/sh64/kernel/ptrace.c +++ b/arch/sh64/kernel/ptrace.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include diff --git a/arch/sh64/kernel/setup.c b/arch/sh64/kernel/setup.c index ffb310e33..d2711c9c9 100644 --- a/arch/sh64/kernel/setup.c +++ b/arch/sh64/kernel/setup.c @@ -36,9 +36,10 @@ #include #include #include -#include +#include #include #include +#include #include #include #include @@ -308,7 +309,7 @@ static struct cpu cpu[1]; static int __init topology_init(void) { - return register_cpu(cpu, 0); + return register_cpu(cpu, 0, NULL); } subsys_initcall(topology_init); diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c index 4b2df7247..6f3a1c946 100644 --- a/arch/sh64/kernel/sh_ksyms.c +++ b/arch/sh64/kernel/sh_ksyms.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -18,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/sh64/kernel/signal.c b/arch/sh64/kernel/signal.c index 9e2ffc45c..3ea8929e4 100644 --- a/arch/sh64/kernel/signal.c +++ b/arch/sh64/kernel/signal.c @@ -407,7 +407,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, static inline void __user * get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) { - if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) + if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) sp = current->sas_ss_sp + current->sas_ss_size; return (void __user *)((sp - frame_size) & -8ul); diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index b8162e590..6b8f4d22a 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c @@ -15,6 +15,7 @@ * Copyright (C) 1991, 1992, 1995 Linus Torvalds */ +#include #include #include #include @@ -484,8 +485,8 @@ static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id, return IRQ_HANDLED; } -static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; -static struct irqaction irq1 = { sh64_rtc_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "rtc", NULL, NULL}; +static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; +static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL}; void __init time_init(void) { diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S index a8fcc3a71..7d9f7a633 100644 --- a/arch/sh64/kernel/vmlinux.lds.S +++ b/arch/sh64/kernel/vmlinux.lds.S @@ -22,6 +22,7 @@ * Remove support for ancient toolchains. */ +#include #include #include #include diff --git a/arch/sh64/lib/c-checksum.c b/arch/sh64/lib/c-checksum.c index 53c1cabb3..a82d8f1a7 100644 --- a/arch/sh64/lib/c-checksum.c +++ b/arch/sh64/lib/c-checksum.c @@ -7,6 +7,7 @@ #undef DEBUG +#include #include #include #include diff --git a/arch/sh64/lib/dbg.c b/arch/sh64/lib/dbg.c index 1326f45f3..58087331b 100644 --- a/arch/sh64/lib/dbg.c +++ b/arch/sh64/lib/dbg.c @@ -8,6 +8,7 @@ -- Copyright 2004 Richard Curnow (evt_debug etc) -- --------------------------------------------------------------------------*/ +#include #include #include #include diff --git a/arch/sh64/lib/io.c b/arch/sh64/lib/io.c index 587baa3df..277e11b10 100644 --- a/arch/sh64/lib/io.c +++ b/arch/sh64/lib/io.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/arch/sh64/lib/iomap.c b/arch/sh64/lib/iomap.c index 5cd3d5e9c..83c5f0c04 100644 --- a/arch/sh64/lib/iomap.c +++ b/arch/sh64/lib/iomap.c @@ -9,6 +9,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ +#include #include #include diff --git a/arch/sh64/lib/memcpy.c b/arch/sh64/lib/memcpy.c index fba436a92..c785d0aa1 100644 --- a/arch/sh64/lib/memcpy.c +++ b/arch/sh64/lib/memcpy.c @@ -6,6 +6,7 @@ * */ +#include #include #include diff --git a/arch/sh64/lib/udelay.c b/arch/sh64/lib/udelay.c index 327653914..dad2f254e 100644 --- a/arch/sh64/lib/udelay.c +++ b/arch/sh64/lib/udelay.c @@ -10,6 +10,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ +#include #include #include diff --git a/arch/sh64/mach-cayman/iomap.c b/arch/sh64/mach-cayman/iomap.c index 2d06e9a55..d6a538c70 100644 --- a/arch/sh64/mach-cayman/iomap.c +++ b/arch/sh64/mach-cayman/iomap.c @@ -9,6 +9,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ +#include #include #include #include diff --git a/arch/sh64/mach-cayman/irq.c b/arch/sh64/mach-cayman/irq.c index 228ce61c3..f797c84bf 100644 --- a/arch/sh64/mach-cayman/irq.c +++ b/arch/sh64/mach-cayman/irq.c @@ -12,6 +12,7 @@ * Copyright (C) 2002 Stuart Menefy */ +#include #include #include #include @@ -44,13 +45,13 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id, struct pt_regs * static struct irqaction cayman_action_smsc = { .name = "Cayman SMSC Mux", .handler = cayman_interrupt_smsc, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; static struct irqaction cayman_action_pci2 = { .name = "Cayman PCI2 Mux", .handler = cayman_interrupt_pci2, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, }; static void enable_cayman_irq(unsigned int irq) @@ -186,7 +187,7 @@ void init_cayman_irq(void) } for (i=0; i #include +#include #include #include #include @@ -112,10 +113,8 @@ struct resource io_resources[] = { }; struct resource kram_resources[] = { - /* These must be last in the array */ - { .name = "Kernel code", .start = 0, .end = 0 }, - /* These must be last in the array */ - { .name = "Kernel data", .start = 0, .end = 0 } + { "Kernel code", 0, 0 }, /* These must be last in the array */ + { "Kernel data", 0, 0 } /* These must be last in the array */ }; struct resource xram_resources[] = { diff --git a/arch/sh64/mach-harp/setup.c b/arch/sh64/mach-harp/setup.c index fcd90afac..3938a65c4 100644 --- a/arch/sh64/mach-harp/setup.c +++ b/arch/sh64/mach-harp/setup.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh64/mach-romram/setup.c b/arch/sh64/mach-romram/setup.c index eb98a1640..a9ba03fc5 100644 --- a/arch/sh64/mach-romram/setup.c +++ b/arch/sh64/mach-romram/setup.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh64/mach-sim/setup.c b/arch/sh64/mach-sim/setup.c index f09400c1a..a68639cb4 100644 --- a/arch/sh64/mach-sim/setup.c +++ b/arch/sh64/mach-sim/setup.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh64/mm/cache.c b/arch/sh64/mm/cache.c index 421487cff..c0c1b2135 100644 --- a/arch/sh64/mm/cache.c +++ b/arch/sh64/mm/cache.c @@ -13,6 +13,7 @@ /****************************************************************************/ +#include #include #include #include diff --git a/arch/sh64/mm/extable.c b/arch/sh64/mm/extable.c index a2e6e0563..9da50e28b 100644 --- a/arch/sh64/mm/extable.c +++ b/arch/sh64/mm/extable.c @@ -10,6 +10,7 @@ * * Cloned from the 2.5 SH version.. */ +#include #include #include #include diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c index 187cf0175..3d89f2a6c 100644 --- a/arch/sh64/mm/hugetlbpage.c +++ b/arch/sh64/mm/hugetlbpage.c @@ -8,6 +8,7 @@ * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) */ +#include #include #include #include diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c index 80c56754f..fb1866fa2 100644 --- a/arch/sh64/mm/ioremap.c +++ b/arch/sh64/mm/ioremap.c @@ -449,9 +449,7 @@ ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, if (p + 32 >= e) /* Better than nothing */ break; if ((nm = r->name) == 0) nm = "???"; - p += sprintf(p, "%08lx-%08lx: %s\n", - (unsigned long)r->start, - (unsigned long)r->end, nm); + p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm); } return p-buf; diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 6616ee05c..1b83e2184 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -12,7 +12,7 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \ sys_sparc.o sunos_asm.o systbls.o \ time.o windows.o cpu.o devices.o sclow.o \ tadpole.o tick14.o ptrace.o sys_solaris.o \ - unaligned.o muldiv.o semaphore.o prom.o of_device.o + unaligned.o muldiv.o semaphore.o obj-$(CONFIG_PCI) += pcic.o obj-$(CONFIG_SUN4) += sun4setup.o diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index 29d7cfd1c..1f55231f0 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c @@ -10,6 +10,7 @@ * On sparc, thread_info data is static and TI_XXX offsets are computed by hand. */ +#include #include // #include diff --git a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c index 118f3eca3..d3b364836 100644 --- a/arch/sparc/kernel/auxio.c +++ b/arch/sparc/kernel/auxio.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 259a559d4..d7bfc61d2 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c @@ -4,6 +4,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c index af90a5f9a..fcb0c049c 100644 --- a/arch/sparc/kernel/devices.c +++ b/arch/sparc/kernel/devices.c @@ -7,6 +7,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include @@ -15,7 +16,6 @@ #include #include -#include #include #include #include @@ -35,6 +35,12 @@ static int check_cpu_node(int nd, int *cur_inst, int (*compare)(int, int, void *), void *compare_arg, int *prom_node, int *mid) { + char node_str[128]; + + prom_getstring(nd, "device_type", node_str, sizeof(node_str)); + if (strcmp(node_str, "cpu")) + return -ENODEV; + if (!compare(nd, *cur_inst, compare_arg)) { if (prom_node) *prom_node = nd; @@ -54,14 +60,20 @@ static int check_cpu_node(int nd, int *cur_inst, static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, int *prom_node, int *mid) { - struct device_node *dp; - int cur_inst; + int nd, cur_inst, err; + nd = prom_root_node; cur_inst = 0; - for_each_node_by_type(dp, "cpu") { - int err = check_cpu_node(dp->node, &cur_inst, - compare, compare_arg, - prom_node, mid); + + err = check_cpu_node(nd, &cur_inst, compare, compare_arg, + prom_node, mid); + if (!err) + return 0; + + nd = prom_getchild(nd); + while ((nd = prom_getsibling(nd)) != 0) { + err = check_cpu_node(nd, &cur_inst, compare, compare_arg, + prom_node, mid); if (!err) return 0; } diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index 81c0cbd96..5c3529ceb 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c @@ -7,6 +7,7 @@ * Fixes for different platforms by Pete Zaitcev. */ +#include #include #include #include @@ -19,7 +20,6 @@ #include #include #include -#include #include struct linux_ebus *ebus_chain = NULL; @@ -83,81 +83,79 @@ int __init ebus_blacklist_irq(char *name) return 0; } -void __init fill_ebus_child(struct device_node *dp, - struct linux_ebus_child *dev) +void __init fill_ebus_child(int node, struct linux_prom_registers *preg, + struct linux_ebus_child *dev) { - int *regs; - int *irqs; + int regs[PROMREG_MAX]; + int irqs[PROMREG_MAX]; + char lbuf[128]; int i, len; - dev->prom_node = dp; - regs = of_get_property(dp, "reg", &len); - if (!regs) - len = 0; + dev->prom_node = node; + prom_getstring(node, "name", lbuf, sizeof(lbuf)); + strcpy(dev->prom_name, lbuf); + + len = prom_getproperty(node, "reg", (void *)regs, sizeof(regs)); + if (len == -1) len = 0; dev->num_addrs = len / sizeof(regs[0]); for (i = 0; i < dev->num_addrs; i++) { if (regs[i] >= dev->parent->num_addrs) { prom_printf("UGH: property for %s was %d, need < %d\n", - dev->prom_node->name, len, - dev->parent->num_addrs); + dev->prom_name, len, dev->parent->num_addrs); panic(__FUNCTION__); } - - /* XXX resource */ - dev->resource[i].start = - dev->parent->resource[regs[i]].start; + dev->resource[i].start = dev->parent->resource[regs[i]].start; /* XXX resource */ } for (i = 0; i < PROMINTR_MAX; i++) dev->irqs[i] = PCI_IRQ_NONE; - if ((dev->irqs[0] = ebus_blacklist_irq(dev->prom_node->name)) != 0) { + if ((dev->irqs[0] = ebus_blacklist_irq(dev->prom_name)) != 0) { dev->num_irqs = 1; + } else if ((len = prom_getproperty(node, "interrupts", + (char *)&irqs, sizeof(irqs))) == -1 || len == 0) { + dev->num_irqs = 0; + dev->irqs[0] = 0; + if (dev->parent->num_irqs != 0) { + dev->num_irqs = 1; + dev->irqs[0] = dev->parent->irqs[0]; +/* P3 */ /* printk("EBUS: dev %s irq %d from parent\n", dev->prom_name, dev->irqs[0]); */ + } } else { - irqs = of_get_property(dp, "interrupts", &len); - if (!irqs) { + dev->num_irqs = len / sizeof(irqs[0]); + if (irqs[0] == 0 || irqs[0] >= 8) { + /* + * XXX Zero is a valid pin number... + * This works as long as Ebus is not wired to INTA#. + */ + printk("EBUS: %s got bad irq %d from PROM\n", + dev->prom_name, irqs[0]); dev->num_irqs = 0; dev->irqs[0] = 0; - if (dev->parent->num_irqs != 0) { - dev->num_irqs = 1; - dev->irqs[0] = dev->parent->irqs[0]; - } } else { - dev->num_irqs = len / sizeof(irqs[0]); - if (irqs[0] == 0 || irqs[0] >= 8) { - /* - * XXX Zero is a valid pin number... - * This works as long as Ebus is not wired - * to INTA#. - */ - printk("EBUS: %s got bad irq %d from PROM\n", - dev->prom_node->name, irqs[0]); - dev->num_irqs = 0; - dev->irqs[0] = 0; - } else { - dev->irqs[0] = - pcic_pin_to_irq(irqs[0], - dev->prom_node->name); - } + dev->irqs[0] = pcic_pin_to_irq(irqs[0], dev->prom_name); } } } -void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) +void __init fill_ebus_device(int node, struct linux_ebus_device *dev) { - struct linux_prom_registers *regs; + struct linux_prom_registers regs[PROMREG_MAX]; struct linux_ebus_child *child; - int *irqs; + int irqs[PROMINTR_MAX]; + char lbuf[128]; int i, n, len; unsigned long baseaddr; - dev->prom_node = dp; + dev->prom_node = node; + prom_getstring(node, "name", lbuf, sizeof(lbuf)); + strcpy(dev->prom_name, lbuf); - regs = of_get_property(dp, "reg", &len); + len = prom_getproperty(node, "reg", (void *)regs, sizeof(regs)); if (len % sizeof(struct linux_prom_registers)) { prom_printf("UGH: proplen for %s was %d, need multiple of %d\n", - dev->prom_node->name, len, + dev->prom_name, len, (int)sizeof(struct linux_prom_registers)); panic(__FUNCTION__); } @@ -199,7 +197,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d if ((baseaddr = (unsigned long) ioremap(baseaddr, regs[i].reg_size)) == 0) { panic("ebus: unable to remap dev %s", - dev->prom_node->name); + dev->prom_name); } } dev->resource[i].start = baseaddr; /* XXX Unaligned */ @@ -208,43 +206,29 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d for (i = 0; i < PROMINTR_MAX; i++) dev->irqs[i] = PCI_IRQ_NONE; - if ((dev->irqs[0] = ebus_blacklist_irq(dev->prom_node->name)) != 0) { + if ((dev->irqs[0] = ebus_blacklist_irq(dev->prom_name)) != 0) { dev->num_irqs = 1; + } else if ((len = prom_getproperty(node, "interrupts", + (char *)&irqs, sizeof(irqs))) == -1 || len == 0) { + dev->num_irqs = 0; + if ((dev->irqs[0] = dev->bus->self->irq) != 0) { + dev->num_irqs = 1; +/* P3 */ /* printk("EBUS: child %s irq %d from parent\n", dev->prom_name, dev->irqs[0]); */ + } } else { - irqs = of_get_property(dp, "interrupts", &len); - if (!irqs) { + dev->num_irqs = 1; /* dev->num_irqs = len / sizeof(irqs[0]); */ + if (irqs[0] == 0 || irqs[0] >= 8) { + /* See above for the parent. XXX */ + printk("EBUS: %s got bad irq %d from PROM\n", + dev->prom_name, irqs[0]); dev->num_irqs = 0; - if ((dev->irqs[0] = dev->bus->self->irq) != 0) { - dev->num_irqs = 1; -/* P3 */ /* printk("EBUS: child %s irq %d from parent\n", dev->prom_name, dev->irqs[0]); */ - } + dev->irqs[0] = 0; } else { - dev->num_irqs = 1; /* dev->num_irqs = len / sizeof(irqs[0]); */ - if (irqs[0] == 0 || irqs[0] >= 8) { - /* See above for the parent. XXX */ - printk("EBUS: %s got bad irq %d from PROM\n", - dev->prom_node->name, irqs[0]); - dev->num_irqs = 0; - dev->irqs[0] = 0; - } else { - dev->irqs[0] = - pcic_pin_to_irq(irqs[0], - dev->prom_node->name); - } + dev->irqs[0] = pcic_pin_to_irq(irqs[0], dev->prom_name); } } - dev->ofdev.node = dp; - dev->ofdev.dev.parent = &dev->bus->ofdev.dev; - dev->ofdev.dev.bus = &ebus_bus_type; - strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); - - /* Register with core */ - if (of_device_register(&dev->ofdev) != 0) - printk(KERN_DEBUG "ebus: device registration error for %s!\n", - dev->ofdev.dev.bus_id); - - if ((dp = dp->child) != NULL) { + if ((node = prom_getchild(node))) { dev->children = (struct linux_ebus_child *) ebus_alloc(sizeof(struct linux_ebus_child)); @@ -252,9 +236,9 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d child->next = NULL; child->parent = dev; child->bus = dev->bus; - fill_ebus_child(dp, child); + fill_ebus_child(node, ®s[0], child); - while ((dp = dp->sibling) != NULL) { + while ((node = prom_getsibling(node)) != 0) { child->next = (struct linux_ebus_child *) ebus_alloc(sizeof(struct linux_ebus_child)); @@ -262,49 +246,51 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d child->next = NULL; child->parent = dev; child->bus = dev->bus; - fill_ebus_child(dp, child); + fill_ebus_child(node, ®s[0], child); } } } void __init ebus_init(void) { - struct linux_prom_pci_registers *regs; + struct linux_prom_pci_registers regs[PROMREG_MAX]; struct linux_pbm_info *pbm; struct linux_ebus_device *dev; struct linux_ebus *ebus; struct ebus_system_entry *sp; struct pci_dev *pdev; struct pcidev_cookie *cookie; - struct device_node *dp; + char lbuf[128]; unsigned long addr, *base; unsigned short pci_command; - int len, reg, nreg; + int nd, len, ebusnd; + int reg, nreg; int num_ebus = 0; - dp = of_find_node_by_path("/"); + prom_getstring(prom_root_node, "name", lbuf, sizeof(lbuf)); for (sp = ebus_blacklist; sp->esname != NULL; sp++) { - if (strcmp(dp->name, sp->esname) == 0) { + if (strcmp(lbuf, sp->esname) == 0) { ebus_blackp = sp->ipt; break; } } pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, NULL); - if (!pdev) + if (!pdev) { return; - + } cookie = pdev->sysdata; - dp = cookie->prom_node; + ebusnd = cookie->prom_node; ebus_chain = ebus = (struct linux_ebus *) ebus_alloc(sizeof(struct linux_ebus)); ebus->next = NULL; - while (dp) { - struct device_node *nd; + while (ebusnd) { - ebus->prom_node = dp; + prom_getstring(ebusnd, "name", lbuf, sizeof(lbuf)); + ebus->prom_node = ebusnd; + strcpy(ebus->prom_name, lbuf); ebus->self = pdev; ebus->parent = pbm = cookie->pbm; @@ -313,8 +299,9 @@ void __init ebus_init(void) pci_command |= PCI_COMMAND_MASTER; pci_write_config_word(pdev, PCI_COMMAND, pci_command); - regs = of_get_property(dp, "reg", &len); - if (!regs) { + len = prom_getproperty(ebusnd, "reg", (void *)regs, + sizeof(regs)); + if (len == 0 || len == -1) { prom_printf("%s: can't find reg property\n", __FUNCTION__); prom_halt(); @@ -330,18 +317,7 @@ void __init ebus_init(void) *base++ = addr; } - ebus->ofdev.node = dp; - ebus->ofdev.dev.parent = &pdev->dev; - ebus->ofdev.dev.bus = &ebus_bus_type; - strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); - - /* Register with core */ - if (of_device_register(&ebus->ofdev) != 0) - printk(KERN_DEBUG "ebus: device registration error for %s!\n", - ebus->ofdev.dev.bus_id); - - - nd = dp->child; + nd = prom_getchild(ebusnd); if (!nd) goto next_ebus; @@ -354,7 +330,7 @@ void __init ebus_init(void) dev->bus = ebus; fill_ebus_device(nd, dev); - while ((nd = nd->sibling) != NULL) { + while ((nd = prom_getsibling(nd)) != 0) { dev->next = (struct linux_ebus_device *) ebus_alloc(sizeof(struct linux_ebus_device)); @@ -372,7 +348,7 @@ void __init ebus_init(void) break; cookie = pdev->sysdata; - dp = cookie->prom_node; + ebusnd = cookie->prom_node; ebus->next = (struct linux_ebus *) ebus_alloc(sizeof(struct linux_ebus)); diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 831f54025..887f6a160 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -8,6 +8,7 @@ * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) */ +#include #include #include @@ -32,12 +33,13 @@ #include #include #include -#include #include #define curptr g6 +#define NR_SYSCALLS 300 /* Each OS is different... */ + /* These are just handy. */ #define _SV save %sp, -STACKFRAME_SZ, %sp #define _RS restore diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 9a219e8b5..42d3de59d 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c index 3a5bad525..2e1b0f6e9 100644 --- a/arch/sparc/kernel/idprom.c +++ b/arch/sparc/kernel/idprom.c @@ -5,6 +5,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 4c7ec71e3..f9ff29734 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -25,7 +25,7 @@ * Sounds reasonable */ -#include +#include #include #include #include @@ -39,9 +39,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -144,21 +141,6 @@ void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset, phyres->start + offset, size, name); } -void __iomem *of_ioremap(struct resource *res, unsigned long offset, - unsigned long size, char *name) -{ - return _sparc_alloc_io(res->flags & 0xF, - res->start + offset, - size, name); -} -EXPORT_SYMBOL(of_ioremap); - -void of_iounmap(void __iomem *base, unsigned long size) -{ - iounmap(base); -} -EXPORT_SYMBOL(of_iounmap); - /* */ void sbus_iounmap(volatile void __iomem *addr, unsigned long size) @@ -224,7 +206,7 @@ _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz) pa &= PAGE_MASK; sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1); - return (void __iomem *)(unsigned long)(res->start + offset); + return (void __iomem *) (res->start + offset); } /* @@ -242,54 +224,10 @@ static void _sparc_free_io(struct resource *res) #ifdef CONFIG_SBUS -void sbus_set_sbus64(struct sbus_dev *sdev, int x) -{ +void sbus_set_sbus64(struct sbus_dev *sdev, int x) { printk("sbus_set_sbus64: unsupported\n"); } -extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq); -void __init sbus_fill_device_irq(struct sbus_dev *sdev) -{ - struct linux_prom_irqs irqs[PROMINTR_MAX]; - int len; - - len = prom_getproperty(sdev->prom_node, "intr", - (char *)irqs, sizeof(irqs)); - if (len != -1) { - sdev->num_irqs = len / 8; - if (sdev->num_irqs == 0) { - sdev->irqs[0] = 0; - } else if (sparc_cpu_model == sun4d) { - for (len = 0; len < sdev->num_irqs; len++) - sdev->irqs[len] = - sun4d_build_irq(sdev, irqs[len].pri); - } else { - for (len = 0; len < sdev->num_irqs; len++) - sdev->irqs[len] = irqs[len].pri; - } - } else { - int interrupts[PROMINTR_MAX]; - - /* No "intr" node found-- check for "interrupts" node. - * This node contains SBus interrupt levels, not IPLs - * as in "intr", and no vector values. We convert - * SBus interrupt levels to PILs (platform specific). - */ - len = prom_getproperty(sdev->prom_node, "interrupts", - (char *)interrupts, sizeof(interrupts)); - if (len == -1) { - sdev->irqs[0] = 0; - sdev->num_irqs = 0; - } else { - sdev->num_irqs = len / sizeof(int); - for (len = 0; len < sdev->num_irqs; len++) { - sdev->irqs[len] = - sbint_to_irq(sdev, interrupts[len]); - } - } - } -} - /* * Allocate a chunk of memory suitable for DMA. * Typically devices use them for control blocks. @@ -341,7 +279,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) res->name = sdev->prom_name; } - return (void *)(unsigned long)res->start; + return (void *)res->start; err_noiommu: release_resource(res); @@ -476,89 +414,6 @@ void sbus_dma_sync_sg_for_device(struct sbus_dev *sdev, struct scatterlist *sg, { printk("sbus_dma_sync_sg_for_device: not implemented yet\n"); } - -/* Support code for sbus_init(). */ -/* - * XXX This functions appears to be a distorted version of - * prom_sbus_ranges_init(), with all sun4d stuff cut away. - * Ask DaveM what is going on here, how is sun4d supposed to work... XXX - */ -/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */ -void __init sbus_arch_bus_ranges_init(struct device_node *pn, struct sbus_bus *sbus) -{ - int parent_node = pn->node; - - if (sparc_cpu_model == sun4d) { - struct linux_prom_ranges iounit_ranges[PROMREG_MAX]; - int num_iounit_ranges, len; - - len = prom_getproperty(parent_node, "ranges", - (char *) iounit_ranges, - sizeof (iounit_ranges)); - if (len != -1) { - num_iounit_ranges = - (len / sizeof(struct linux_prom_ranges)); - prom_adjust_ranges(sbus->sbus_ranges, - sbus->num_sbus_ranges, - iounit_ranges, num_iounit_ranges); - } - } -} - -void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp) -{ - struct device_node *parent = dp->parent; - - if (sparc_cpu_model != sun4d && - parent != NULL && - !strcmp(parent->name, "iommu")) { - extern void iommu_init(int iommu_node, struct sbus_bus *sbus); - - iommu_init(parent->node, sbus); - } - - if (sparc_cpu_model == sun4d) { - extern void iounit_init(int sbi_node, int iounit_node, - struct sbus_bus *sbus); - - iounit_init(dp->node, parent->node, sbus); - } -} - -void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp) -{ - if (sparc_cpu_model == sun4d) { - struct device_node *parent = dp->parent; - - sbus->devid = of_getintprop_default(parent, "device-id", 0); - sbus->board = of_getintprop_default(parent, "board#", 0); - } -} - -int __init sbus_arch_preinit(void) -{ - extern void register_proc_sparc_ioport(void); - - register_proc_sparc_ioport(); - -#ifdef CONFIG_SUN4 - { - extern void sun4_dvma_init(void); - sun4_dvma_init(); - } - return 1; -#else - return 0; -#endif -} - -void __init sbus_arch_postinit(void) -{ - if (sparc_cpu_model == sun4d) { - extern void sun4d_init_sbi_irq(void); - sun4d_init_sbi_irq(); - } -} #endif /* CONFIG_SBUS */ #ifdef CONFIG_PCI @@ -835,9 +690,7 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof, if (p + 32 >= e) /* Better than nothing */ break; if ((nm = r->name) == 0) nm = "???"; - p += sprintf(p, "%016llx-%016llx: %s\n", - (unsigned long long)r->start, - (unsigned long long)r->end, nm); + p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm); } return p-buf; diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 72f020105..aac8af5aa 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c @@ -11,6 +11,7 @@ * Copyright (C) 1998-2000 Anton Blanchard (anton@samba.org) */ +#include #include #include #include @@ -191,11 +192,11 @@ int show_interrupts(struct seq_file *p, void *v) } #endif seq_printf(p, " %c %s", - (action->flags & IRQF_DISABLED) ? '+' : ' ', + (action->flags & SA_INTERRUPT) ? '+' : ' ', action->name); for (action=action->next; action; action = action->next) { seq_printf(p, ",%s %s", - (action->flags & IRQF_DISABLED) ? " +" : "", + (action->flags & SA_INTERRUPT) ? " +" : "", action->name); } seq_putc(p, '\n'); @@ -243,7 +244,7 @@ void free_irq(unsigned int irq, void *dev_id) printk("Trying to free free shared IRQ%d\n",irq); goto out_unlock; } - } else if (action->flags & IRQF_SHARED) { + } else if (action->flags & SA_SHIRQ) { printk("Trying to free shared IRQ%d with NULL device ID\n", irq); goto out_unlock; } @@ -329,7 +330,7 @@ void handler_irq(int irq, struct pt_regs * regs) disable_pil_irq(irq); #ifdef CONFIG_SMP /* Only rotate on lower priority IRQ's (scsi, ethernet, etc.). */ - if((sparc_cpu_model==sun4m) && (irq < 10)) + if(irq < 10) smp4m_irq_rotate(cpu); #endif action = sparc_irq[irq].action; @@ -395,9 +396,9 @@ int request_fast_irq(unsigned int irq, action = sparc_irq[cpu_irq].action; if(action) { - if(action->flags & IRQF_SHARED) + if(action->flags & SA_SHIRQ) panic("Trying to register fast irq when already shared.\n"); - if(irqflags & IRQF_SHARED) + if(irqflags & SA_SHIRQ) panic("Trying to register fast irq as shared.\n"); /* Anyway, someone already owns it so cannot be made fast. */ @@ -497,11 +498,11 @@ int request_irq(unsigned int irq, actionp = &sparc_irq[cpu_irq].action; action = *actionp; if (action) { - if (!(action->flags & IRQF_SHARED) || !(irqflags & IRQF_SHARED)) { + if (!(action->flags & SA_SHIRQ) || !(irqflags & SA_SHIRQ)) { ret = -EBUSY; goto out_unlock; } - if ((action->flags & IRQF_DISABLED) != (irqflags & IRQF_DISABLED)) { + if ((action->flags & SA_INTERRUPT) != (irqflags & SA_INTERRUPT)) { printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); ret = -EBUSY; goto out_unlock; diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c deleted file mode 100644 index 74bef2a2d..000000000 --- a/arch/sparc/kernel/of_device.c +++ /dev/null @@ -1,823 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include -#include - -/** - * of_match_device - Tell if an of_device structure has a matching - * of_match structure - * @ids: array of of device match structures to search in - * @dev: the of device structure to match against - * - * Used by a driver to check whether an of_device present in the - * system is in its list of supported devices. - */ -const struct of_device_id *of_match_device(const struct of_device_id *matches, - const struct of_device *dev) -{ - if (!dev->node) - return NULL; - while (matches->name[0] || matches->type[0] || matches->compatible[0]) { - int match = 1; - if (matches->name[0]) - match &= dev->node->name - && !strcmp(matches->name, dev->node->name); - if (matches->type[0]) - match &= dev->node->type - && !strcmp(matches->type, dev->node->type); - if (matches->compatible[0]) - match &= of_device_is_compatible(dev->node, - matches->compatible); - if (match) - return matches; - matches++; - } - return NULL; -} - -static int of_platform_bus_match(struct device *dev, struct device_driver *drv) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * of_drv = to_of_platform_driver(drv); - const struct of_device_id * matches = of_drv->match_table; - - if (!matches) - return 0; - - return of_match_device(matches, of_dev) != NULL; -} - -struct of_device *of_dev_get(struct of_device *dev) -{ - struct device *tmp; - - if (!dev) - return NULL; - tmp = get_device(&dev->dev); - if (tmp) - return to_of_device(tmp); - else - return NULL; -} - -void of_dev_put(struct of_device *dev) -{ - if (dev) - put_device(&dev->dev); -} - - -static int of_device_probe(struct device *dev) -{ - int error = -ENODEV; - struct of_platform_driver *drv; - struct of_device *of_dev; - const struct of_device_id *match; - - drv = to_of_platform_driver(dev->driver); - of_dev = to_of_device(dev); - - if (!drv->probe) - return error; - - of_dev_get(of_dev); - - match = of_match_device(drv->match_table, of_dev); - if (match) - error = drv->probe(of_dev, match); - if (error) - of_dev_put(of_dev); - - return error; -} - -static int of_device_remove(struct device *dev) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - - if (dev->driver && drv->remove) - drv->remove(of_dev); - return 0; -} - -static int of_device_suspend(struct device *dev, pm_message_t state) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - int error = 0; - - if (dev->driver && drv->suspend) - error = drv->suspend(of_dev, state); - return error; -} - -static int of_device_resume(struct device * dev) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - int error = 0; - - if (dev->driver && drv->resume) - error = drv->resume(of_dev); - return error; -} - -static int node_match(struct device *dev, void *data) -{ - struct of_device *op = to_of_device(dev); - struct device_node *dp = data; - - return (op->node == dp); -} - -struct of_device *of_find_device_by_node(struct device_node *dp) -{ - struct device *dev = bus_find_device(&of_bus_type, NULL, - dp, node_match); - - if (dev) - return to_of_device(dev); - - return NULL; -} -EXPORT_SYMBOL(of_find_device_by_node); - -#ifdef CONFIG_PCI -struct bus_type ebus_bus_type = { - .name = "ebus", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(ebus_bus_type); -#endif - -#ifdef CONFIG_SBUS -struct bus_type sbus_bus_type = { - .name = "sbus", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(sbus_bus_type); -#endif - -struct bus_type of_bus_type = { - .name = "of", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(of_bus_type); - -static inline u64 of_read_addr(const u32 *cell, int size) -{ - u64 r = 0; - while (size--) - r = (r << 32) | *(cell++); - return r; -} - -static void __init get_cells(struct device_node *dp, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = of_n_addr_cells(dp); - if (sizec) - *sizec = of_n_size_cells(dp); -} - -/* Max address size we deal with */ -#define OF_MAX_ADDR_CELLS 4 - -struct of_bus { - const char *name; - const char *addr_prop_name; - int (*match)(struct device_node *parent); - void (*count_cells)(struct device_node *child, - int *addrc, int *sizec); - int (*map)(u32 *addr, const u32 *range, - int na, int ns, int pna); - unsigned int (*get_flags)(u32 *addr); -}; - -/* - * Default translator (generic bus) - */ - -static void of_bus_default_count_cells(struct device_node *dev, - int *addrc, int *sizec) -{ - get_cells(dev, addrc, sizec); -} - -/* Make sure the least significant 64-bits are in-range. Even - * for 3 or 4 cell values it is a good enough approximation. - */ -static int of_out_of_range(const u32 *addr, const u32 *base, - const u32 *size, int na, int ns) -{ - u64 a = of_read_addr(addr, na); - u64 b = of_read_addr(base, na); - - if (a < b) - return 1; - - b += of_read_addr(size, ns); - if (a >= b) - return 1; - - return 0; -} - -static int of_bus_default_map(u32 *addr, const u32 *range, - int na, int ns, int pna) -{ - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - if (ns > 2) { - printk("of_device: Cannot handle size cells (%d) > 2.", ns); - return -EINVAL; - } - - if (of_out_of_range(addr, range, range + na + pna, na, ns)) - return -EINVAL; - - /* Start with the parent range base. */ - memcpy(result, range + na, pna * 4); - - /* Add in the child address offset. */ - for (i = 0; i < na; i++) - result[pna - 1 - i] += - (addr[na - 1 - i] - - range[na - 1 - i]); - - memcpy(addr, result, pna * 4); - - return 0; -} - -static unsigned int of_bus_default_get_flags(u32 *addr) -{ - return IORESOURCE_MEM; -} - -/* - * PCI bus specific translator - */ - -static int of_bus_pci_match(struct device_node *np) -{ - if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { - /* Do not do PCI specific frobbing if the - * PCI bridge lacks a ranges property. We - * want to pass it through up to the next - * parent as-is, not with the PCI translate - * method which chops off the top address cell. - */ - if (!of_find_property(np, "ranges", NULL)) - return 0; - - return 1; - } - - return 0; -} - -static void of_bus_pci_count_cells(struct device_node *np, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = 3; - if (sizec) - *sizec = 2; -} - -static int of_bus_pci_map(u32 *addr, const u32 *range, - int na, int ns, int pna) -{ - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - /* Check address type match */ - if ((addr[0] ^ range[0]) & 0x03000000) - return -EINVAL; - - if (of_out_of_range(addr + 1, range + 1, range + na + pna, - na - 1, ns)) - return -EINVAL; - - /* Start with the parent range base. */ - memcpy(result, range + na, pna * 4); - - /* Add in the child address offset, skipping high cell. */ - for (i = 0; i < na - 1; i++) - result[pna - 1 - i] += - (addr[na - 1 - i] - - range[na - 1 - i]); - - memcpy(addr, result, pna * 4); - - return 0; -} - -static unsigned int of_bus_pci_get_flags(u32 *addr) -{ - unsigned int flags = 0; - u32 w = addr[0]; - - switch((w >> 24) & 0x03) { - case 0x01: - flags |= IORESOURCE_IO; - case 0x02: /* 32 bits */ - case 0x03: /* 64 bits */ - flags |= IORESOURCE_MEM; - } - if (w & 0x40000000) - flags |= IORESOURCE_PREFETCH; - return flags; -} - -/* - * SBUS bus specific translator - */ - -static int of_bus_sbus_match(struct device_node *np) -{ - return !strcmp(np->name, "sbus") || - !strcmp(np->name, "sbi"); -} - -static void of_bus_sbus_count_cells(struct device_node *child, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = 2; - if (sizec) - *sizec = 1; -} - -static int of_bus_sbus_map(u32 *addr, const u32 *range, int na, int ns, int pna) -{ - return of_bus_default_map(addr, range, na, ns, pna); -} - -static unsigned int of_bus_sbus_get_flags(u32 *addr) -{ - return IORESOURCE_MEM; -} - - -/* - * Array of bus specific translators - */ - -static struct of_bus of_busses[] = { - /* PCI */ - { - .name = "pci", - .addr_prop_name = "assigned-addresses", - .match = of_bus_pci_match, - .count_cells = of_bus_pci_count_cells, - .map = of_bus_pci_map, - .get_flags = of_bus_pci_get_flags, - }, - /* SBUS */ - { - .name = "sbus", - .addr_prop_name = "reg", - .match = of_bus_sbus_match, - .count_cells = of_bus_sbus_count_cells, - .map = of_bus_sbus_map, - .get_flags = of_bus_sbus_get_flags, - }, - /* Default */ - { - .name = "default", - .addr_prop_name = "reg", - .match = NULL, - .count_cells = of_bus_default_count_cells, - .map = of_bus_default_map, - .get_flags = of_bus_default_get_flags, - }, -}; - -static struct of_bus *of_match_bus(struct device_node *np) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(of_busses); i ++) - if (!of_busses[i].match || of_busses[i].match(np)) - return &of_busses[i]; - BUG(); - return NULL; -} - -static int __init build_one_resource(struct device_node *parent, - struct of_bus *bus, - struct of_bus *pbus, - u32 *addr, - int na, int ns, int pna) -{ - u32 *ranges; - unsigned int rlen; - int rone; - - ranges = of_get_property(parent, "ranges", &rlen); - if (ranges == NULL || rlen == 0) { - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - memset(result, 0, pna * 4); - for (i = 0; i < na; i++) - result[pna - 1 - i] = - addr[na - 1 - i]; - - memcpy(addr, result, pna * 4); - return 0; - } - - /* Now walk through the ranges */ - rlen /= 4; - rone = na + pna + ns; - for (; rlen >= rone; rlen -= rone, ranges += rone) { - if (!bus->map(addr, ranges, na, ns, pna)) - return 0; - } - - return 1; -} - -static int of_resource_verbose; - -static void __init build_device_resources(struct of_device *op, - struct device *parent) -{ - struct of_device *p_op; - struct of_bus *bus; - int na, ns; - int index, num_reg; - void *preg; - - if (!parent) - return; - - p_op = to_of_device(parent); - bus = of_match_bus(p_op->node); - bus->count_cells(op->node, &na, &ns); - - preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); - if (!preg || num_reg == 0) - return; - - /* Convert to num-cells. */ - num_reg /= 4; - - /* Conver to num-entries. */ - num_reg /= na + ns; - - for (index = 0; index < num_reg; index++) { - struct resource *r = &op->resource[index]; - u32 addr[OF_MAX_ADDR_CELLS]; - u32 *reg = (preg + (index * ((na + ns) * 4))); - struct device_node *dp = op->node; - struct device_node *pp = p_op->node; - struct of_bus *pbus; - u64 size, result = OF_BAD_ADDR; - unsigned long flags; - int dna, dns; - int pna, pns; - - size = of_read_addr(reg + na, ns); - flags = bus->get_flags(reg); - - memcpy(addr, reg, na * 4); - - /* If the immediate parent has no ranges property to apply, - * just use a 1<->1 mapping. - */ - if (of_find_property(pp, "ranges", NULL) == NULL) { - result = of_read_addr(addr, na); - goto build_res; - } - - dna = na; - dns = ns; - - while (1) { - dp = pp; - pp = dp->parent; - if (!pp) { - result = of_read_addr(addr, dna); - break; - } - - pbus = of_match_bus(pp); - pbus->count_cells(dp, &pna, &pns); - - if (build_one_resource(dp, bus, pbus, addr, - dna, dns, pna)) - break; - - dna = pna; - dns = pns; - bus = pbus; - } - - build_res: - memset(r, 0, sizeof(*r)); - - if (of_resource_verbose) - printk("%s reg[%d] -> %llx\n", - op->node->full_name, index, - result); - - if (result != OF_BAD_ADDR) { - r->start = result & 0xffffffff; - r->end = result + size - 1; - r->flags = flags | ((result >> 32ULL) & 0xffUL); - } else { - r->start = ~0UL; - r->end = ~0UL; - } - r->name = op->node->name; - } -} - -static struct of_device * __init scan_one_device(struct device_node *dp, - struct device *parent) -{ - struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); - struct linux_prom_irqs *intr; - int len, i; - - if (!op) - return NULL; - - op->node = dp; - - op->clock_freq = of_getintprop_default(dp, "clock-frequency", - (25*1000*1000)); - op->portid = of_getintprop_default(dp, "upa-portid", -1); - if (op->portid == -1) - op->portid = of_getintprop_default(dp, "portid", -1); - - intr = of_get_property(dp, "intr", &len); - if (intr) { - op->num_irqs = len / sizeof(struct linux_prom_irqs); - for (i = 0; i < op->num_irqs; i++) - op->irqs[i] = intr[i].pri; - } else { - unsigned int *irq = of_get_property(dp, "interrupts", &len); - - if (irq) { - op->num_irqs = len / sizeof(unsigned int); - for (i = 0; i < op->num_irqs; i++) - op->irqs[i] = irq[i]; - } else { - op->num_irqs = 0; - } - } - if (sparc_cpu_model == sun4d) { - static int pil_to_sbus[] = { - 0, 0, 1, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0, - }; - struct device_node *io_unit, *sbi = dp->parent; - struct linux_prom_registers *regs; - int board, slot; - - while (sbi) { - if (!strcmp(sbi->name, "sbi")) - break; - - sbi = sbi->parent; - } - if (!sbi) - goto build_resources; - - regs = of_get_property(dp, "reg", NULL); - if (!regs) - goto build_resources; - - slot = regs->which_io; - - /* If SBI's parent is not io-unit or the io-unit lacks - * a "board#" property, something is very wrong. - */ - if (!sbi->parent || strcmp(sbi->parent->name, "io-unit")) { - printk("%s: Error, parent is not io-unit.\n", - sbi->full_name); - goto build_resources; - } - io_unit = sbi->parent; - board = of_getintprop_default(io_unit, "board#", -1); - if (board == -1) { - printk("%s: Error, lacks board# property.\n", - io_unit->full_name); - goto build_resources; - } - - for (i = 0; i < op->num_irqs; i++) { - int this_irq = op->irqs[i]; - int sbusl = pil_to_sbus[this_irq]; - - if (sbusl) - this_irq = (((board + 1) << 5) + - (sbusl << 2) + - slot); - - op->irqs[i] = this_irq; - } - } - -build_resources: - build_device_resources(op, parent); - - op->dev.parent = parent; - op->dev.bus = &of_bus_type; - if (!parent) - strcpy(op->dev.bus_id, "root"); - else - strcpy(op->dev.bus_id, dp->path_component_name); - - if (of_device_register(op)) { - printk("%s: Could not register of device.\n", - dp->full_name); - kfree(op); - op = NULL; - } - - return op; -} - -static void __init scan_tree(struct device_node *dp, struct device *parent) -{ - while (dp) { - struct of_device *op = scan_one_device(dp, parent); - - if (op) - scan_tree(dp->child, &op->dev); - - dp = dp->sibling; - } -} - -static void __init scan_of_devices(void) -{ - struct device_node *root = of_find_node_by_path("/"); - struct of_device *parent; - - parent = scan_one_device(root, NULL); - if (!parent) - return; - - scan_tree(root->child, &parent->dev); -} - -static int __init of_bus_driver_init(void) -{ - int err; - - err = bus_register(&of_bus_type); -#ifdef CONFIG_PCI - if (!err) - err = bus_register(&ebus_bus_type); -#endif -#ifdef CONFIG_SBUS - if (!err) - err = bus_register(&sbus_bus_type); -#endif - - if (!err) - scan_of_devices(); - - return err; -} - -postcore_initcall(of_bus_driver_init); - -static int __init of_debug(char *str) -{ - int val = 0; - - get_option(&str, &val); - if (val & 1) - of_resource_verbose = 1; - return 1; -} - -__setup("of_debug=", of_debug); - -int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) -{ - /* initialize common driver fields */ - drv->driver.name = drv->name; - drv->driver.bus = bus; - - /* register with core */ - return driver_register(&drv->driver); -} - -void of_unregister_driver(struct of_platform_driver *drv) -{ - driver_unregister(&drv->driver); -} - - -static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct of_device *ofdev; - - ofdev = to_of_device(dev); - return sprintf(buf, "%s", ofdev->node->full_name); -} - -static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL); - -/** - * of_release_dev - free an of device structure when all users of it are finished. - * @dev: device that's been disconnected - * - * Will be called only by the device core when all users of this of device are - * done. - */ -void of_release_dev(struct device *dev) -{ - struct of_device *ofdev; - - ofdev = to_of_device(dev); - - kfree(ofdev); -} - -int of_device_register(struct of_device *ofdev) -{ - int rc; - - BUG_ON(ofdev->node == NULL); - - rc = device_register(&ofdev->dev); - if (rc) - return rc; - - rc = device_create_file(&ofdev->dev, &dev_attr_devspec); - if (rc) - device_unregister(&ofdev->dev); - - return rc; -} - -void of_device_unregister(struct of_device *ofdev) -{ - device_remove_file(&ofdev->dev, &dev_attr_devspec); - device_unregister(&ofdev->dev); -} - -struct of_device* of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus) -{ - struct of_device *dev; - - dev = kmalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) - return NULL; - memset(dev, 0, sizeof(*dev)); - - dev->dev.parent = parent; - dev->dev.bus = bus; - dev->dev.release = of_release_dev; - - strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); - - if (of_device_register(dev) != 0) { - kfree(dev); - return NULL; - } - - return dev; -} - -EXPORT_SYMBOL(of_match_device); -EXPORT_SYMBOL(of_register_driver); -EXPORT_SYMBOL(of_unregister_driver); -EXPORT_SYMBOL(of_device_register); -EXPORT_SYMBOL(of_device_unregister); -EXPORT_SYMBOL(of_dev_get); -EXPORT_SYMBOL(of_dev_put); -EXPORT_SYMBOL(of_platform_device_create); -EXPORT_SYMBOL(of_release_dev); diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index bfd31aac2..42002b742 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -10,6 +10,7 @@ * CP-1200 by Eric Brower. */ +#include #include #include #include @@ -30,7 +31,6 @@ #include #include -#include #include #include #include @@ -665,7 +665,7 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) /* cookies */ pcp = pci_devcookie_alloc(); pcp->pbm = &pcic->pbm; - pcp->prom_node = of_find_node_by_phandle(node); + pcp->prom_node = node; dev->sysdata = pcp; /* fixing I/O to look like memory */ @@ -745,7 +745,7 @@ void __init pci_time_init(void) writel (PCI_COUNTER_IRQ_SET(timer_irq, 0), pcic->pcic_regs+PCI_COUNTER_IRQ); irq = request_irq(timer_irq, pcic_timer_handler, - (IRQF_DISABLED | SA_STATIC_ALLOC), "timer", NULL); + (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); if (irq) { prom_printf("time_init: unable to attach IRQ%d\n", timer_irq); prom_halt(); @@ -859,7 +859,7 @@ char * __init pcibios_setup(char *str) } void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { } @@ -896,6 +896,13 @@ static inline unsigned long get_irqmask(int irq_nr) return 1 << irq_nr; } +static inline char *pcic_irq_itoa(unsigned int irq) +{ + static char buff[16]; + sprintf(buff, "%d", irq); + return buff; +} + static void pcic_disable_irq(unsigned int irq_nr) { unsigned long mask, flags; @@ -948,6 +955,7 @@ void __init sun4m_pci_init_IRQ(void) BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(clear_profile_irq, pcic_clear_profile_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__irq_itoa, pcic_irq_itoa, BTFIXUPCALL_NORM); } int pcibios_assign_resource(struct pci_dev *pdev, int resource) diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 89a28cc01..118cac84a 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c deleted file mode 100644 index 4ca9e5fc9..000000000 --- a/arch/sparc/kernel/prom.c +++ /dev/null @@ -1,577 +0,0 @@ -/* - * Procedures for creating, accessing and interpreting the device tree. - * - * Paul Mackerras August 1996. - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner. - * {engebret|bergner}@us.ibm.com - * - * Adapted for sparc32 by David S. Miller davem@davemloft.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. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -static struct device_node *allnodes; - -/* use when traversing tree through the allnext, child, sibling, - * or parent members of struct device_node. - */ -static DEFINE_RWLOCK(devtree_lock); - -int of_device_is_compatible(struct device_node *device, const char *compat) -{ - const char* cp; - int cplen, l; - - cp = (char *) of_get_property(device, "compatible", &cplen); - if (cp == NULL) - return 0; - while (cplen > 0) { - if (strncmp(cp, compat, strlen(compat)) == 0) - return 1; - l = strlen(cp) + 1; - cp += l; - cplen -= l; - } - - return 0; -} -EXPORT_SYMBOL(of_device_is_compatible); - -struct device_node *of_get_parent(const struct device_node *node) -{ - struct device_node *np; - - if (!node) - return NULL; - - np = node->parent; - - return np; -} -EXPORT_SYMBOL(of_get_parent); - -struct device_node *of_get_next_child(const struct device_node *node, - struct device_node *prev) -{ - struct device_node *next; - - next = prev ? prev->sibling : node->child; - for (; next != 0; next = next->sibling) { - break; - } - - return next; -} -EXPORT_SYMBOL(of_get_next_child); - -struct device_node *of_find_node_by_path(const char *path) -{ - struct device_node *np = allnodes; - - for (; np != 0; np = np->allnext) { - if (np->full_name != 0 && strcmp(np->full_name, path) == 0) - break; - } - - return np; -} -EXPORT_SYMBOL(of_find_node_by_path); - -struct device_node *of_find_node_by_phandle(phandle handle) -{ - struct device_node *np; - - for (np = allnodes; np != 0; np = np->allnext) - if (np->node == handle) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_phandle); - -struct device_node *of_find_node_by_name(struct device_node *from, - const char *name) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != NULL; np = np->allnext) - if (np->name != NULL && strcmp(np->name, name) == 0) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_name); - -struct device_node *of_find_node_by_type(struct device_node *from, - const char *type) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != 0; np = np->allnext) - if (np->type != 0 && strcmp(np->type, type) == 0) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_type); - -struct device_node *of_find_compatible_node(struct device_node *from, - const char *type, const char *compatible) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != 0; np = np->allnext) { - if (type != NULL - && !(np->type != 0 && strcmp(np->type, type) == 0)) - continue; - if (of_device_is_compatible(np, compatible)) - break; - } - - return np; -} -EXPORT_SYMBOL(of_find_compatible_node); - -struct property *of_find_property(struct device_node *np, const char *name, - int *lenp) -{ - struct property *pp; - - for (pp = np->properties; pp != 0; pp = pp->next) { - if (strcmp(pp->name, name) == 0) { - if (lenp != 0) - *lenp = pp->length; - break; - } - } - return pp; -} -EXPORT_SYMBOL(of_find_property); - -/* - * Find a property with a given name for a given node - * and return the value. - */ -void *of_get_property(struct device_node *np, const char *name, int *lenp) -{ - struct property *pp = of_find_property(np,name,lenp); - return pp ? pp->value : NULL; -} -EXPORT_SYMBOL(of_get_property); - -int of_getintprop_default(struct device_node *np, const char *name, int def) -{ - struct property *prop; - int len; - - prop = of_find_property(np, name, &len); - if (!prop || len != 4) - return def; - - return *(int *) prop->value; -} -EXPORT_SYMBOL(of_getintprop_default); - -int of_n_addr_cells(struct device_node *np) -{ - int* ip; - do { - if (np->parent) - np = np->parent; - ip = of_get_property(np, "#address-cells", NULL); - if (ip != NULL) - return *ip; - } while (np->parent); - /* No #address-cells property for the root node, default to 2 */ - return 2; -} -EXPORT_SYMBOL(of_n_addr_cells); - -int of_n_size_cells(struct device_node *np) -{ - int* ip; - do { - if (np->parent) - np = np->parent; - ip = of_get_property(np, "#size-cells", NULL); - if (ip != NULL) - return *ip; - } while (np->parent); - /* No #size-cells property for the root node, default to 1 */ - return 1; -} -EXPORT_SYMBOL(of_n_size_cells); - -int of_set_property(struct device_node *dp, const char *name, void *val, int len) -{ - struct property **prevp; - void *new_val; - int err; - - new_val = kmalloc(len, GFP_KERNEL); - if (!new_val) - return -ENOMEM; - - memcpy(new_val, val, len); - - err = -ENODEV; - - write_lock(&devtree_lock); - prevp = &dp->properties; - while (*prevp) { - struct property *prop = *prevp; - - if (!strcmp(prop->name, name)) { - void *old_val = prop->value; - int ret; - - ret = prom_setprop(dp->node, name, val, len); - err = -EINVAL; - if (ret >= 0) { - prop->value = new_val; - prop->length = len; - - if (OF_IS_DYNAMIC(prop)) - kfree(old_val); - - OF_MARK_DYNAMIC(prop); - - err = 0; - } - break; - } - prevp = &(*prevp)->next; - } - write_unlock(&devtree_lock); - - /* XXX Upate procfs if necessary... */ - - return err; -} -EXPORT_SYMBOL(of_set_property); - -static unsigned int prom_early_allocated; - -static void * __init prom_early_alloc(unsigned long size) -{ - void *ret; - - ret = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL); - if (ret != NULL) - memset(ret, 0, size); - - prom_early_allocated += size; - - return ret; -} - -static int is_root_node(const struct device_node *dp) -{ - if (!dp) - return 0; - - return (dp->parent == NULL); -} - -/* The following routines deal with the black magic of fully naming a - * node. - * - * Certain well known named nodes are just the simple name string. - * - * Actual devices have an address specifier appended to the base name - * string, like this "foo@addr". The "addr" can be in any number of - * formats, and the platform plus the type of the node determine the - * format and how it is constructed. - * - * For children of the ROOT node, the naming convention is fixed and - * determined by whether this is a sun4u or sun4v system. - * - * For children of other nodes, it is bus type specific. So - * we walk up the tree until we discover a "device_type" property - * we recognize and we go from there. - */ -static void __init sparc32_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_registers *regs; - struct property *rprop; - - rprop = of_find_property(dp, "reg", NULL); - if (!rprop) - return; - - regs = rprop->value; - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - regs->which_io, regs->phys_addr); -} - -/* "name@slot,offset" */ -static void __init sbus_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - regs->which_io, - regs->phys_addr); -} - -/* "name@devnum[,func]" */ -static void __init pci_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_pci_registers *regs; - struct property *prop; - unsigned int devfn; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - devfn = (regs->phys_hi >> 8) & 0xff; - if (devfn & 0x07) { - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - devfn >> 3, - devfn & 0x07); - } else { - sprintf(tmp_buf, "%s@%x", - dp->name, - devfn >> 3); - } -} - -/* "name@addrhi,addrlo" */ -static void __init ebus_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - regs->which_io, regs->phys_addr); -} - -static void __init __build_path_component(struct device_node *dp, char *tmp_buf) -{ - struct device_node *parent = dp->parent; - - if (parent != NULL) { - if (!strcmp(parent->type, "pci") || - !strcmp(parent->type, "pciex")) - return pci_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "sbus")) - return sbus_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "ebus")) - return ebus_path_component(dp, tmp_buf); - - /* "isa" is handled with platform naming */ - } - - /* Use platform naming convention. */ - return sparc32_path_component(dp, tmp_buf); -} - -static char * __init build_path_component(struct device_node *dp) -{ - char tmp_buf[64], *n; - - tmp_buf[0] = '\0'; - __build_path_component(dp, tmp_buf); - if (tmp_buf[0] == '\0') - strcpy(tmp_buf, dp->name); - - n = prom_early_alloc(strlen(tmp_buf) + 1); - strcpy(n, tmp_buf); - - return n; -} - -static char * __init build_full_name(struct device_node *dp) -{ - int len, ourlen, plen; - char *n; - - plen = strlen(dp->parent->full_name); - ourlen = strlen(dp->path_component_name); - len = ourlen + plen + 2; - - n = prom_early_alloc(len); - strcpy(n, dp->parent->full_name); - if (!is_root_node(dp->parent)) { - strcpy(n + plen, "/"); - plen++; - } - strcpy(n + plen, dp->path_component_name); - - return n; -} - -static unsigned int unique_id; - -static struct property * __init build_one_prop(phandle node, char *prev, char *special_name, void *special_val, int special_len) -{ - static struct property *tmp = NULL; - struct property *p; - int len; - const char *name; - - if (tmp) { - p = tmp; - memset(p, 0, sizeof(*p) + 32); - tmp = NULL; - } else { - p = prom_early_alloc(sizeof(struct property) + 32); - p->unique_id = unique_id++; - } - - p->name = (char *) (p + 1); - if (special_name) { - strcpy(p->name, special_name); - p->length = special_len; - p->value = prom_early_alloc(special_len); - memcpy(p->value, special_val, special_len); - } else { - if (prev == NULL) { - name = prom_firstprop(node, NULL); - } else { - name = prom_nextprop(node, prev, NULL); - } - if (strlen(name) == 0) { - tmp = p; - return NULL; - } - strcpy(p->name, name); - p->length = prom_getproplen(node, p->name); - if (p->length <= 0) { - p->length = 0; - } else { - p->value = prom_early_alloc(p->length + 1); - prom_getproperty(node, p->name, p->value, p->length); - ((unsigned char *)p->value)[p->length] = '\0'; - } - } - return p; -} - -static struct property * __init build_prop_list(phandle node) -{ - struct property *head, *tail; - - head = tail = build_one_prop(node, NULL, - ".node", &node, sizeof(node)); - - tail->next = build_one_prop(node, NULL, NULL, NULL, 0); - tail = tail->next; - while(tail) { - tail->next = build_one_prop(node, tail->name, - NULL, NULL, 0); - tail = tail->next; - } - - return head; -} - -static char * __init get_one_property(phandle node, char *name) -{ - char *buf = ""; - int len; - - len = prom_getproplen(node, name); - if (len > 0) { - buf = prom_early_alloc(len); - len = prom_getproperty(node, name, buf, len); - } - - return buf; -} - -static struct device_node * __init create_node(phandle node) -{ - struct device_node *dp; - - if (!node) - return NULL; - - dp = prom_early_alloc(sizeof(*dp)); - dp->unique_id = unique_id++; - - kref_init(&dp->kref); - - dp->name = get_one_property(node, "name"); - dp->type = get_one_property(node, "device_type"); - dp->node = node; - - /* Build interrupts later... */ - - dp->properties = build_prop_list(node); - - return dp; -} - -static struct device_node * __init build_tree(struct device_node *parent, phandle node, struct device_node ***nextp) -{ - struct device_node *dp; - - dp = create_node(node); - if (dp) { - *(*nextp) = dp; - *nextp = &dp->allnext; - - dp->parent = parent; - dp->path_component_name = build_path_component(dp); - dp->full_name = build_full_name(dp); - - dp->child = build_tree(dp, prom_getchild(node), nextp); - - dp->sibling = build_tree(parent, prom_getsibling(node), nextp); - } - - return dp; -} - -void __init prom_build_devicetree(void) -{ - struct device_node **nextp; - - allnodes = create_node(prom_root_node); - allnodes->path_component_name = ""; - allnodes->full_name = "/"; - - nextp = &allnodes->allnext; - allnodes->child = build_tree(allnodes, - prom_getchild(allnodes->node), - &nextp); - printk("PROM: Built device tree with %u bytes of memory.\n", - prom_early_allocated); -} diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 0251cab47..3509e4305 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -17,8 +17,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #include #include @@ -331,7 +331,7 @@ void __init setup_arch(char **cmdline_p) if (!root_flags) root_mountflags &= ~MS_RDONLY; ROOT_DEV = old_decode_dev(root_dev); -#ifdef CONFIG_BLK_DEV_RAM +#ifdef CONFIG_BLK_DEV_INITRD rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK; rd_prompt = ((ram_flags & RAMDISK_PROMPT_FLAG) != 0); rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0); @@ -349,8 +349,6 @@ void __init setup_arch(char **cmdline_p) init_task.thread.kregs = &fake_swapper_regs; paging_init(); - - smp_setup_cpu_possible_map(); } static int __init set_preferred_console(void) @@ -391,8 +389,6 @@ console_initcall(set_preferred_console); extern char *sparc_cpu_type; extern char *sparc_fpu_type; -static int ncpus_probed; - static int show_cpuinfo(struct seq_file *m, void *__unused) { seq_printf(m, @@ -415,7 +411,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) romvec->pv_printrev >> 16, romvec->pv_printrev & 0xffff, &cputypval, - ncpus_probed, + num_possible_cpus(), num_online_cpus() #ifndef CONFIG_SMP , cpu_data(0).udelay_val/(500000/HZ), @@ -475,30 +471,3 @@ void sun_do_break(void) int serial_console = -1; int stop_a_enabled = 1; - -static int __init topology_init(void) -{ - int i, ncpus, err; - - /* Count the number of physically present processors in - * the machine, even on uniprocessor, so that /proc/cpuinfo - * output is consistent with 2.4.x - */ - ncpus = 0; - while (!cpu_find_by_instance(ncpus, NULL, NULL)) - ncpus++; - ncpus_probed = ncpus; - - err = 0; - for_each_online_cpu(i) { - struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); - if (!p) - err = -ENOMEM; - else - register_cpu(p, i); - } - - return err; -} - -subsys_initcall(topology_init); diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index c9301b914..0748d8147 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -7,6 +7,7 @@ * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) */ +#include #include #include #include diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 276f22881..40b42c88e 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c @@ -34,6 +34,7 @@ #include #include +volatile int smp_processors_ready = 0; int smp_num_cpus = 1; volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; unsigned char boot_cpu_id = 0; @@ -57,7 +58,7 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE; /* Used to make bitops atomic */ unsigned char bitops_spinlock = 0; -void __cpuinit smp_store_cpu_info(int id) +void __init smp_store_cpu_info(int id) { int cpu_node; @@ -86,7 +87,6 @@ void __cpuinit smp_store_cpu_info(int id) void __init smp_cpus_done(unsigned int max_cpus) { extern void smp4m_smp_done(void); - extern void smp4d_smp_done(void); unsigned long bogosum = 0; int cpu, num; @@ -100,34 +100,8 @@ void __init smp_cpus_done(unsigned int max_cpus) num, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); - switch(sparc_cpu_model) { - case sun4: - printk("SUN4\n"); - BUG(); - break; - case sun4c: - printk("SUN4C\n"); - BUG(); - break; - case sun4m: - smp4m_smp_done(); - break; - case sun4d: - smp4d_smp_done(); - break; - case sun4e: - printk("SUN4E\n"); - BUG(); - break; - case sun4u: - printk("SUN4U\n"); - BUG(); - break; - default: - printk("UNKNOWN!\n"); - BUG(); - break; - }; + BUG_ON(sparc_cpu_model != sun4m); + smp4m_smp_done(); } void cpu_panic(void) @@ -293,71 +267,30 @@ int setup_profiling_timer(unsigned int multiplier) void __init smp_prepare_cpus(unsigned int max_cpus) { extern void smp4m_boot_cpus(void); - extern void smp4d_boot_cpus(void); - int i, cpuid, extra; + int i, cpuid, ncpus, extra; + BUG_ON(sparc_cpu_model != sun4m); printk("Entering SMP Mode...\n"); + ncpus = 1; extra = 0; for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { - if (cpuid >= NR_CPUS) + if (cpuid == boot_cpu_id) + continue; + if (cpuid < NR_CPUS && ncpus++ < max_cpus) + cpu_set(cpuid, phys_cpu_present_map); + else extra++; } - /* i = number of cpus */ - if (extra && max_cpus > i - extra) + if (max_cpus >= NR_CPUS && extra) printk("Warning: NR_CPUS is too low to start all cpus\n"); smp_store_cpu_info(boot_cpu_id); - switch(sparc_cpu_model) { - case sun4: - printk("SUN4\n"); - BUG(); - break; - case sun4c: - printk("SUN4C\n"); - BUG(); - break; - case sun4m: - smp4m_boot_cpus(); - break; - case sun4d: - smp4d_boot_cpus(); - break; - case sun4e: - printk("SUN4E\n"); - BUG(); - break; - case sun4u: - printk("SUN4U\n"); - BUG(); - break; - default: - printk("UNKNOWN!\n"); - BUG(); - break; - }; + smp4m_boot_cpus(); } -/* Set this up early so that things like the scheduler can init - * properly. We use the same cpu mask for both the present and - * possible cpu map. - */ -void __init smp_setup_cpu_possible_map(void) -{ - int instance, mid; - - instance = 0; - while (!cpu_find_by_instance(instance, NULL, &mid)) { - if (mid < NR_CPUS) { - cpu_set(mid, phys_cpu_present_map); - cpu_set(mid, cpu_present_map); - } - instance++; - } -} - -void __init smp_prepare_boot_cpu(void) +void __devinit smp_prepare_boot_cpu(void) { int cpuid = hard_smp_processor_id(); @@ -373,40 +306,12 @@ void __init smp_prepare_boot_cpu(void) cpu_set(cpuid, phys_cpu_present_map); } -int __cpuinit __cpu_up(unsigned int cpu) +int __devinit __cpu_up(unsigned int cpu) { extern int smp4m_boot_one_cpu(int); - extern int smp4d_boot_one_cpu(int); - int ret=0; - - switch(sparc_cpu_model) { - case sun4: - printk("SUN4\n"); - BUG(); - break; - case sun4c: - printk("SUN4C\n"); - BUG(); - break; - case sun4m: - ret = smp4m_boot_one_cpu(cpu); - break; - case sun4d: - ret = smp4d_boot_one_cpu(cpu); - break; - case sun4e: - printk("SUN4E\n"); - BUG(); - break; - case sun4u: - printk("SUN4U\n"); - BUG(); - break; - default: - printk("UNKNOWN!\n"); - BUG(); - break; - }; + int ret; + + ret = smp4m_boot_one_cpu(cpu); if (!ret) { cpu_set(cpu, smp_commenced_mask); diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 4d441a554..4b376fae7 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c @@ -9,6 +9,7 @@ #define EXPORT_SYMTAB_STROPS #define PROMLIB_INTERNAL +#include #include #include #include @@ -162,6 +163,7 @@ EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); #endif EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq)); EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq)); +EXPORT_SYMBOL(BTFIXUP_CALL(__irq_itoa)); EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); @@ -237,6 +239,7 @@ EXPORT_SYMBOL(prom_node_has_property); EXPORT_SYMBOL(prom_setprop); EXPORT_SYMBOL(saved_command_line); EXPORT_SYMBOL(prom_apply_obio_ranges); +EXPORT_SYMBOL(prom_getname); EXPORT_SYMBOL(prom_feval); EXPORT_SYMBOL(prom_getbool); EXPORT_SYMBOL(prom_getstring); diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index 4be2c86ea..3d6a99073 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c @@ -9,6 +9,7 @@ * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk) */ +#include #include #include #include @@ -179,7 +180,7 @@ static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, stru irq = request_irq(TIMER_IRQ, counter_fn, - (IRQF_DISABLED | SA_STATIC_ALLOC), + (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); if (irq) { prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); @@ -197,6 +198,8 @@ static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, stru static void sun4c_nop(void) {} #endif +extern char *sun4m_irq_itoa(unsigned int irq); + void __init sun4c_init_IRQ(void) { struct linux_prom_registers int_regs[2]; @@ -235,6 +238,7 @@ void __init sun4c_init_IRQ(void) BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(clear_profile_irq, sun4c_clear_profile_irq, BTFIXUPCALL_NOP); BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP); + BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM); sparc_init_timers = sun4c_init_timers; #ifdef CONFIG_SMP BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP); diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 74eed9775..ca656d9bd 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c @@ -6,6 +6,7 @@ * Heavily based on arch/sparc/kernel/irq.c. */ +#include #include #include #include @@ -107,13 +108,13 @@ found_it: seq_printf(p, "%3d: ", i); kstat_cpu(cpu_logical_map(x)).irqs[i]); #endif seq_printf(p, "%c %s", - (action->flags & IRQF_DISABLED) ? '+' : ' ', + (action->flags & SA_INTERRUPT) ? '+' : ' ', action->name); action = action->next; for (;;) { for (; action; action = action->next) { seq_printf(p, ",%s %s", - (action->flags & IRQF_DISABLED) ? " +" : "", + (action->flags & SA_INTERRUPT) ? " +" : "", action->name); } if (!sbusl) break; @@ -160,7 +161,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id) printk("Trying to free free shared IRQ%d\n",irq); goto out_unlock; } - } else if (action->flags & IRQF_SHARED) { + } else if (action->flags & SA_SHIRQ) { printk("Trying to free shared IRQ%d with NULL device ID\n", irq); goto out_unlock; } @@ -298,13 +299,13 @@ int sun4d_request_irq(unsigned int irq, action = *actionp; if (action) { - if ((action->flags & IRQF_SHARED) && (irqflags & IRQF_SHARED)) { + if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { for (tmp = action; tmp->next; tmp = tmp->next); } else { ret = -EBUSY; goto out_unlock; } - if ((action->flags & IRQF_DISABLED) ^ (irqflags & IRQF_DISABLED)) { + if ((action->flags & SA_INTERRUPT) ^ (irqflags & SA_INTERRUPT)) { printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); ret = -EBUSY; goto out_unlock; @@ -490,7 +491,7 @@ static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, stru irq = request_irq(TIMER_IRQ, counter_fn, - (IRQF_DISABLED | SA_STATIC_ALLOC), + (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); if (irq) { prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); @@ -559,6 +560,17 @@ void __init sun4d_init_sbi_irq(void) } } +static char *sun4d_irq_itoa(unsigned int irq) +{ + static char buff[16]; + + if (irq < (1 << 5)) + sprintf(buff, "%d", irq); + else + sprintf(buff, "%d,%x", sbus_to_pil[(irq >> 2) & 7], irq); + return buff; +} + void __init sun4d_init_IRQ(void) { local_irq_disable(); @@ -569,6 +581,7 @@ void __init sun4d_init_IRQ(void) BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(clear_profile_irq, sun4d_clear_profile_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__irq_itoa, sun4d_irq_itoa, BTFIXUPCALL_NORM); sparc_init_timers = sun4d_init_timers; #ifdef CONFIG_SMP BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM); diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 3ff4edd32..b141b7ee6 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -42,11 +42,16 @@ extern ctxd_t *srmmu_ctx_table_phys; extern void calibrate_delay(void); -static volatile int smp_processors_ready = 0; +extern volatile int smp_processors_ready; +extern int smp_num_cpus; static int smp_highest_cpu; extern volatile unsigned long cpu_callin_map[NR_CPUS]; extern cpuinfo_sparc cpu_data[NR_CPUS]; extern unsigned char boot_cpu_id; +extern int smp_activated; +extern volatile int __cpu_number_map[NR_CPUS]; +extern volatile int __cpu_logical_map[NR_CPUS]; +extern volatile unsigned long ipi_count; extern volatile int smp_process_available; extern cpumask_t smp_commenced_mask; @@ -139,8 +144,6 @@ void __init smp4d_callin(void) spin_lock_irqsave(&sun4d_imsk_lock, flags); cc_set_imsk(cc_get_imsk() & ~0x4000); /* Allow PIL 14 as well */ spin_unlock_irqrestore(&sun4d_imsk_lock, flags); - cpu_set(cpuid, cpu_online_map); - } extern void init_IRQ(void); @@ -157,24 +160,51 @@ extern unsigned long trapbase_cpu3[]; void __init smp4d_boot_cpus(void) { + int cpucount = 0; + int i, mid; + + printk("Entering SMP Mode...\n"); + if (boot_cpu_id) current_set[0] = NULL; + + local_irq_enable(); + cpus_clear(cpu_present_map); + + /* XXX This whole thing has to go. See sparc64. */ + for (i = 0; !cpu_find_by_instance(i, NULL, &mid); i++) + cpu_set(mid, cpu_present_map); + SMP_PRINTK(("cpu_present_map %08lx\n", cpus_addr(cpu_present_map)[0])); + for(i=0; i < NR_CPUS; i++) + __cpu_number_map[i] = -1; + for(i=0; i < NR_CPUS; i++) + __cpu_logical_map[i] = -1; + __cpu_number_map[boot_cpu_id] = 0; + __cpu_logical_map[0] = boot_cpu_id; + current_thread_info()->cpu = boot_cpu_id; + smp_store_cpu_info(boot_cpu_id); smp_setup_percpu_timer(); local_flush_cache_all(); -} - -int smp4d_boot_one_cpu(int i) -{ + if (cpu_find_by_instance(1, NULL, NULL)) + return; /* Not an MP box. */ + SMP_PRINTK(("Iterating over CPUs\n")); + for(i = 0; i < NR_CPUS; i++) { + if(i == boot_cpu_id) + continue; + + if (cpu_isset(i, cpu_present_map)) { extern unsigned long sun4d_cpu_startup; unsigned long *entry = &sun4d_cpu_startup; struct task_struct *p; int timeout; - int cpu_node; + int no; - cpu_find_by_instance(i, &cpu_node,NULL); /* Cook up an idler for this guy. */ p = fork_idle(i); + cpucount++; current_set[i] = task_thread_info(p); + for (no = 0; !cpu_find_by_instance(no, NULL, &mid) + && mid != i; no++) ; /* * Initialize the contexts table @@ -186,9 +216,9 @@ int smp4d_boot_one_cpu(int i) smp_penguin_ctable.reg_size = 0; /* whirrr, whirrr, whirrrrrrrrr... */ - SMP_PRINTK(("Starting CPU %d at %p \n", i, entry)); + SMP_PRINTK(("Starting CPU %d at %p task %d node %08x\n", i, entry, cpucount, cpu_data(no).prom_node)); local_flush_cache_all(); - prom_startcpu(cpu_node, + prom_startcpu(cpu_data(no).prom_node, &smp_penguin_ctable, 0, (char *)entry); SMP_PRINTK(("prom_startcpu returned :)\n")); @@ -200,30 +230,39 @@ int smp4d_boot_one_cpu(int i) udelay(200); } - if (!(cpu_callin_map[i])) { - printk("Processor %d is stuck.\n", i); - return -ENODEV; - + if(cpu_callin_map[i]) { + /* Another "Red Snapper". */ + __cpu_number_map[i] = cpucount; + __cpu_logical_map[cpucount] = i; + } else { + cpucount--; + printk("Processor %d is stuck.\n", i); + } + } + if(!(cpu_callin_map[i])) { + cpu_clear(i, cpu_present_map); + __cpu_number_map[i] = -1; + } } local_flush_cache_all(); - return 0; -} - -void __init smp4d_smp_done(void) -{ - int i, first; - int *prev; - - /* setup cpu list for irq rotation */ - first = 0; - prev = &first; - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) { - *prev = i; - prev = &cpu_data(i).next; + if(cpucount == 0) { + printk("Error: only one Processor found.\n"); + cpu_present_map = cpumask_of_cpu(hard_smp4d_processor_id()); + } else { + unsigned long bogosum = 0; + + for_each_present_cpu(i) { + bogosum += cpu_data(i).udelay_val; + smp_highest_cpu = i; } - *prev = first; - local_flush_cache_all(); + SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); + printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", + cpucount + 1, + bogosum/(500000/HZ), + (bogosum/(5000/HZ))%100); + smp_activated = 1; + smp_num_cpus = cpucount + 1; + } /* Free unneeded trap tables */ ClearPageReserved(virt_to_page(trapbase_cpu1)); @@ -295,7 +334,7 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, register int i; mask = cpumask_of_cpu(hard_smp4d_processor_id()); - cpus_andnot(mask, cpu_online_map, mask); + cpus_andnot(mask, cpu_present_map, mask); for(i = 0; i <= high; i++) { if (cpu_isset(i, mask)) { ccall_info.processors_in[i] = 0; diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 7cefa301e..39d712c3c 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c @@ -9,6 +9,7 @@ * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk) */ +#include #include #include #include @@ -228,6 +229,13 @@ static void sun4m_load_profile_irq(int cpu, unsigned int limit) sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit; } +char *sun4m_irq_itoa(unsigned int irq) +{ + static char buff[16]; + sprintf(buff, "%d", irq); + return buff; +} + static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) { int reg_count, irq, cpu; @@ -278,7 +286,7 @@ static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, stru irq = request_irq(TIMER_IRQ, counter_fn, - (IRQF_DISABLED | SA_STATIC_ALLOC), + (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); if (irq) { prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); @@ -380,6 +388,7 @@ void __init sun4m_init_IRQ(void) BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(clear_profile_irq, sun4m_clear_profile_irq, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM); sparc_init_timers = sun4m_init_timers; #ifdef CONFIG_SMP BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM); diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 7d4a64913..70b375a4c 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c @@ -39,6 +39,7 @@ extern ctxd_t *srmmu_ctx_table_phys; extern void calibrate_delay(void); +extern volatile int smp_processors_ready; extern volatile unsigned long cpu_callin_map[NR_CPUS]; extern unsigned char boot_cpu_id; @@ -65,7 +66,7 @@ static inline unsigned long swap(volatile unsigned long *ptr, unsigned long val) static void smp_setup_percpu_timer(void); extern void cpu_probe(void); -void __cpuinit smp4m_callin(void) +void __init smp4m_callin(void) { int cpuid = hard_smp_processor_id(); @@ -111,8 +112,13 @@ void __cpuinit smp4m_callin(void) local_irq_enable(); cpu_set(cpuid, cpu_online_map); + /* last one in gets all the interrupts (for testing) */ + set_irq_udt(boot_cpu_id); } +extern void init_IRQ(void); +extern void cpu_panic(void); + /* * Cycle through the processors asking the PROM to start each one. */ @@ -128,7 +134,7 @@ void __init smp4m_boot_cpus(void) local_flush_cache_all(); } -int __cpuinit smp4m_boot_one_cpu(int i) +int smp4m_boot_one_cpu(int i) { extern unsigned long sun4m_cpu_startup; unsigned long *entry = &sun4m_cpu_startup; @@ -216,6 +222,7 @@ void __init smp4m_smp_done(void) } /* Ok, they are spinning and ready to go. */ + smp_processors_ready = 1; } /* At each hardware IRQ, we get this called to forward IRQ reception diff --git a/arch/sparc/kernel/sys_solaris.c b/arch/sparc/kernel/sys_solaris.c index c09afd96d..fb7578554 100644 --- a/arch/sparc/kernel/sys_solaris.c +++ b/arch/sparc/kernel/sys_solaris.c @@ -4,6 +4,7 @@ * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) */ +#include #include #include #include diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 8318dc6bc..5a220d61b 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c @@ -469,23 +469,21 @@ sys_rt_sigaction(int sig, asmlinkage int sys_getdomainname(char __user *name, int len) { - int nlen, err; + int nlen; + int err = -EFAULT; - if (len < 0) - return -EINVAL; - down_read(&uts_sem); nlen = strlen(vx_new_uts(domainname)) + 1; - err = -EINVAL; - if (nlen > len) - goto out; - err = -EFAULT; - if (!copy_to_user(name, vx_new_uts(domainname), nlen)) - err = 0; - -out: + if (nlen < len) + len = nlen; + if (len > __NEW_UTS_LEN) + goto done; + if (copy_to_user(name, vx_new_uts(domainname), len)) + goto done; + err = 0; +done: up_read(&uts_sem); return err; } diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c index abb4a5c8d..ea99b5d7b 100644 --- a/arch/sparc/kernel/sys_sunos.c +++ b/arch/sparc/kernel/sys_sunos.c @@ -197,7 +197,7 @@ asmlinkage int sunos_brk(unsigned long brk) * simple, it hopefully works in most obvious cases.. Easy to * fool it, but this should catch most mistakes. */ - freepages = global_page_state(NR_FILE_PAGES); + freepages = get_page_cache_size(); freepages >>= 1; freepages += nr_free_pages(); freepages += nr_swap_pages; @@ -326,25 +326,21 @@ struct sunos_dirent_callback { #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) static int sunos_filldir(void * __buf, const char * name, int namlen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct sunos_dirent __user *dirent; struct sunos_dirent_callback * buf = __buf; - unsigned long d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) put_user(offset, &dirent->d_off); dirent = buf->curr; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(namlen, &dirent->d_namlen); put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); @@ -411,23 +407,19 @@ struct sunos_direntry_callback { }; static int sunos_filldirentry(void * __buf, const char * name, int namlen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct sunos_direntry __user *dirent; struct sunos_direntry_callback *buf = __buf; - unsigned long d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; dirent = buf->curr; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(namlen, &dirent->d_namlen); put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index c28a8dc9b..5cf1ca7c0 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S @@ -9,6 +9,7 @@ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) */ +#include .data .align 4 diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c index d3b4daac7..591547af4 100644 --- a/arch/sparc/kernel/tick14.c +++ b/arch/sparc/kernel/tick14.c @@ -74,7 +74,7 @@ void claim_ticker14(irqreturn_t (*handler)(int, void *, struct pt_regs *), if (!request_irq(irq_nr, handler, - (IRQF_DISABLED | SA_STATIC_ALLOC), + (SA_INTERRUPT | SA_STATIC_ALLOC), "counter14", NULL)) { install_linux_ticker(); diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 845081b01..7dadcdb4c 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c @@ -15,6 +15,7 @@ * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include #include #include #include @@ -41,7 +42,6 @@ #include #include #include -#include extern unsigned long wall_jiffies; @@ -225,32 +225,6 @@ static __inline__ int has_low_battery(void) return (data1 == data2); /* Was the write blocked? */ } -static void __init mostek_set_system_time(void) -{ - unsigned int year, mon, day, hour, min, sec; - struct mostek48t02 *mregs; - - mregs = (struct mostek48t02 *)mstk48t02_regs; - if(!mregs) { - prom_printf("Something wrong, clock regs not mapped yet.\n"); - prom_halt(); - } - spin_lock_irq(&mostek_lock); - mregs->creg |= MSTK_CREG_READ; - sec = MSTK_REG_SEC(mregs); - min = MSTK_REG_MIN(mregs); - hour = MSTK_REG_HOUR(mregs); - day = MSTK_REG_DOM(mregs); - mon = MSTK_REG_MONTH(mregs); - year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); - xtime.tv_sec = mktime(year, mon, day, hour, min, sec); - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - mregs->creg &= ~MSTK_CREG_READ; - spin_unlock_irq(&mostek_lock); -} - /* Probe for the real time clock chip on Sun4 */ static __inline__ void sun4_clock_probe(void) { @@ -299,32 +273,83 @@ static __inline__ void sun4_clock_probe(void) #endif } -#ifndef CONFIG_SUN4 -static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) +/* Probe for the mostek real time clock chip. */ +static __inline__ void clock_probe(void) { - struct device_node *dp = op->node; - char *model = of_get_property(dp, "model", NULL); + struct linux_prom_registers clk_reg[2]; + char model[128]; + register int node, cpuunit, bootbus; + struct resource r; - if (!model) - return -ENODEV; + cpuunit = bootbus = 0; + memset(&r, 0, sizeof(r)); - if (!strcmp(model, "mk48t02")) { - sp_clock_typ = MSTK48T02; + /* Determine the correct starting PROM node for the probe. */ + node = prom_getchild(prom_root_node); + switch (sparc_cpu_model) { + case sun4c: + break; + case sun4m: + node = prom_getchild(prom_searchsiblings(node, "obio")); + break; + case sun4d: + node = prom_getchild(bootbus = prom_searchsiblings(prom_getchild(cpuunit = prom_searchsiblings(node, "cpu-unit")), "bootbus")); + break; + default: + prom_printf("CLOCK: Unsupported architecture!\n"); + prom_halt(); + } + /* Find the PROM node describing the real time clock. */ + sp_clock_typ = MSTK_INVALID; + node = prom_searchsiblings(node,"eeprom"); + if (!node) { + prom_printf("CLOCK: No clock found!\n"); + prom_halt(); + } + + /* Get the model name and setup everything up. */ + model[0] = '\0'; + prom_getstring(node, "model", model, sizeof(model)); + if (strcmp(model, "mk48t02") == 0) { + sp_clock_typ = MSTK48T02; + if (prom_getproperty(node, "reg", (char *) clk_reg, sizeof(clk_reg)) == -1) { + prom_printf("clock_probe: FAILED!\n"); + prom_halt(); + } + if (sparc_cpu_model == sun4d) + prom_apply_generic_ranges (bootbus, cpuunit, clk_reg, 1); + else + prom_apply_obio_ranges(clk_reg, 1); /* Map the clock register io area read-only */ - mstk48t02_regs = of_ioremap(&op->resource[0], 0, - sizeof(struct mostek48t02), - "mk48t02"); + r.flags = clk_reg[0].which_io; + r.start = clk_reg[0].phys_addr; + mstk48t02_regs = sbus_ioremap(&r, 0, + sizeof(struct mostek48t02), "mk48t02"); mstk48t08_regs = NULL; /* To catch weirdness */ - } else if (!strcmp(model, "mk48t08")) { + } else if (strcmp(model, "mk48t08") == 0) { sp_clock_typ = MSTK48T08; - mstk48t08_regs = of_ioremap(&op->resource[0], 0, - sizeof(struct mostek48t08), - "mk48t08"); + if(prom_getproperty(node, "reg", (char *) clk_reg, + sizeof(clk_reg)) == -1) { + prom_printf("clock_probe: FAILED!\n"); + prom_halt(); + } + if (sparc_cpu_model == sun4d) + prom_apply_generic_ranges (bootbus, cpuunit, clk_reg, 1); + else + prom_apply_obio_ranges(clk_reg, 1); + /* Map the clock register io area read-only */ + /* XXX r/o attribute is somewhere in r.flags */ + r.flags = clk_reg[0].which_io; + r.start = clk_reg[0].phys_addr; + mstk48t08_regs = sbus_ioremap(&r, 0, + sizeof(struct mostek48t08), "mk48t08"); mstk48t02_regs = &mstk48t08_regs->regs; - } else - return -ENODEV; + } else { + prom_printf("CLOCK: Unknown model name '%s'\n",model); + prom_halt(); + } /* Report a low battery voltage condition. */ if (has_low_battery()) @@ -333,58 +358,53 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id /* Kick start the clock if it is completely stopped. */ if (mostek_read(mstk48t02_regs + MOSTEK_SEC) & MSTK_STOP) kick_start_clock(); - - mostek_set_system_time(); - - return 0; } -static struct of_device_id clock_match[] = { - { - .name = "eeprom", - }, - {}, -}; - -static struct of_platform_driver clock_driver = { - .name = "clock", - .match_table = clock_match, - .probe = clock_probe, -}; - - -/* Probe for the mostek real time clock chip. */ -static int __init clock_init(void) -{ - return of_register_driver(&clock_driver, &of_bus_type); -} - -/* Must be after subsys_initcall() so that busses are probed. Must - * be before device_initcall() because things like the RTC driver - * need to see the clock registers. - */ -fs_initcall(clock_init); -#endif /* !CONFIG_SUN4 */ - void __init sbus_time_init(void) { + unsigned int year, mon, day, hour, min, sec; + struct mostek48t02 *mregs; + +#ifdef CONFIG_SUN4 + int temp; + struct intersil *iregs; +#endif BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); btfixup(); if (ARCH_SUN4) sun4_clock_probe(); + else + clock_probe(); sparc_init_timers(timer_interrupt); #ifdef CONFIG_SUN4 if(idprom->id_machtype == (SM_SUN4 | SM_4_330)) { - mostek_set_system_time(); +#endif + mregs = (struct mostek48t02 *)mstk48t02_regs; + if(!mregs) { + prom_printf("Something wrong, clock regs not mapped yet.\n"); + prom_halt(); + } + spin_lock_irq(&mostek_lock); + mregs->creg |= MSTK_CREG_READ; + sec = MSTK_REG_SEC(mregs); + min = MSTK_REG_MIN(mregs); + hour = MSTK_REG_HOUR(mregs); + day = MSTK_REG_DOM(mregs); + mon = MSTK_REG_MONTH(mregs); + year = MSTK_CVT_YEAR( MSTK_REG_YEAR(mregs) ); + xtime.tv_sec = mktime(year, mon, day, hour, min, sec); + xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); + set_normalized_timespec(&wall_to_monotonic, + -xtime.tv_sec, -xtime.tv_nsec); + mregs->creg &= ~MSTK_CREG_READ; + spin_unlock_irq(&mostek_lock); +#ifdef CONFIG_SUN4 } else if(idprom->id_machtype == (SM_SUN4 | SM_4_260) ) { /* initialise the intersil on sun4 */ - unsigned int year, mon, day, hour, min, sec; - int temp; - struct intersil *iregs; iregs=intersil_clock; if(!iregs) { diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index 6a70d215f..41d45c298 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c @@ -9,6 +9,7 @@ * I hate traps on the sparc, grrr... */ +#include #include /* for jiffies */ #include #include diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 5db7e1d85..fa5006946 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile @@ -9,5 +9,3 @@ lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \ strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \ copy_user.o locks.o atomic.o atomic32.o bitops.o \ lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o - -obj-y += iomap.o diff --git a/arch/sparc/lib/atomic.S b/arch/sparc/lib/atomic.S index 178cbb8ae..f48ad0c4d 100644 --- a/arch/sparc/lib/atomic.S +++ b/arch/sparc/lib/atomic.S @@ -3,6 +3,7 @@ * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu) */ +#include #include #include diff --git a/arch/sparc/lib/bitops.S b/arch/sparc/lib/bitops.S index cb7fb66a4..3e9399769 100644 --- a/arch/sparc/lib/bitops.S +++ b/arch/sparc/lib/bitops.S @@ -3,6 +3,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include diff --git a/arch/sparc/lib/iomap.c b/arch/sparc/lib/iomap.c deleted file mode 100644 index 54501c1ca..000000000 --- a/arch/sparc/lib/iomap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Implement the sparc iomap interfaces - */ -#include -#include -#include - -/* Create a virtual mapping cookie for an IO port range */ -void __iomem *ioport_map(unsigned long port, unsigned int nr) -{ - return (void __iomem *) (unsigned long) port; -} - -void ioport_unmap(void __iomem *addr) -{ - /* Nothing to do */ -} -EXPORT_SYMBOL(ioport_map); -EXPORT_SYMBOL(ioport_unmap); - -/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ -void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) -{ - unsigned long start = pci_resource_start(dev, bar); - unsigned long len = pci_resource_len(dev, bar); - unsigned long flags = pci_resource_flags(dev, bar); - - if (!len || !start) - return NULL; - if (maxlen && len > maxlen) - len = maxlen; - if (flags & IORESOURCE_IO) - return ioport_map(start, len); - if (flags & IORESOURCE_MEM) { - if (flags & IORESOURCE_CACHEABLE) - return ioremap(start, len); - return ioremap_nocache(start, len); - } - /* What? */ - return NULL; -} - -void pci_iounmap(struct pci_dev *dev, void __iomem * addr) -{ - /* nothing to do */ -} -EXPORT_SYMBOL(pci_iomap); -EXPORT_SYMBOL(pci_iounmap); diff --git a/arch/sparc/lib/rwsem.S b/arch/sparc/lib/rwsem.S index 20657744c..e7578dc60 100644 --- a/arch/sparc/lib/rwsem.S +++ b/arch/sparc/lib/rwsem.S @@ -4,6 +4,7 @@ * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) */ +#include #include #include diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c index ec4231c28..f147a44c9 100644 --- a/arch/sparc/mm/btfixup.c +++ b/arch/sparc/mm/btfixup.c @@ -6,6 +6,7 @@ * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include diff --git a/arch/sparc/mm/extable.c b/arch/sparc/mm/extable.c index 16cc28935..c9845c71f 100644 --- a/arch/sparc/mm/extable.c +++ b/arch/sparc/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/sparc/mm/extable.c */ +#include #include #include diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S index d29cc24c5..a231cca37 100644 --- a/arch/sparc/mm/hypersparc.S +++ b/arch/sparc/mm/hypersparc.S @@ -10,6 +10,7 @@ #include #include #include +#include #include .text diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index c85ddf312..898669732 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -7,6 +7,7 @@ * Copyright (C) 2000 Anton Blanchard (anton@samba.org) */ +#include #include #include #include @@ -30,7 +31,6 @@ #include #include /* bug in asm-generic/tlb.h: check_pgt_cache */ #include -#include DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); @@ -349,7 +349,6 @@ void __init paging_init(void) protection_map[14] = PAGE_SHARED; protection_map[15] = PAGE_SHARED; btfixup(); - prom_build_devicetree(); device_scan(); } diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 2bb130900..eefffa1dc 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c @@ -4,6 +4,7 @@ * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include @@ -64,7 +65,6 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus) sbus->iommu = (struct iommu_struct *)iounit; iounit->page_table = xpt; - spin_lock_init(&iounit->lock); for (xptend = iounit->page_table + (16 * PAGE_SIZE) / sizeof(iopte_t); xpt < xptend;) diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index be042efd1..7215849db 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -7,6 +7,7 @@ * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 16e13f663..58c65cc8d 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -8,6 +8,7 @@ * Copyright (C) 1999,2000 Anton Blanchard (anton@samba.org) */ +#include #include #include #include diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 7fdddf3c7..49f28c1bd 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -10,6 +10,7 @@ #define NR_TASK_BUCKETS 512 +#include #include #include #include diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S index 9f4cd396a..cd90f3fdc 100644 --- a/arch/sparc/mm/swift.S +++ b/arch/sparc/mm/swift.S @@ -4,6 +4,7 @@ * Copyright (C) 1999 David S. Miller (davem@redhat.com) */ +#include #include #include #include diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S index 4988e6a31..697af6175 100644 --- a/arch/sparc/mm/tsunami.S +++ b/arch/sparc/mm/tsunami.S @@ -4,6 +4,7 @@ * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S index 754c62254..3cbd6de18 100644 --- a/arch/sparc/mm/viking.S +++ b/arch/sparc/mm/viking.S @@ -6,6 +6,7 @@ * Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz) */ +#include #include #include #include diff --git a/arch/sparc/prom/init.c b/arch/sparc/prom/init.c index 50abfb1b8..b83409c81 100644 --- a/arch/sparc/prom/init.c +++ b/arch/sparc/prom/init.c @@ -6,6 +6,7 @@ * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c index b0c0f9c4f..c20e5309f 100644 --- a/arch/sparc/prom/memory.c +++ b/arch/sparc/prom/memory.c @@ -6,6 +6,7 @@ * Copyright (C) 1997 Michael A. Griffith (grif@acm.org) */ +#include #include #include diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c index 1942c7c05..c840c2062 100644 --- a/arch/sparc/prom/misc.c +++ b/arch/sparc/prom/misc.c @@ -5,6 +5,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/arch/sparc/prom/tree.c b/arch/sparc/prom/tree.c index 5ec246573..2bf03ee8c 100644 --- a/arch/sparc/prom/tree.c +++ b/arch/sparc/prom/tree.c @@ -205,6 +205,24 @@ int prom_searchsiblings(int node_start, char *nodename) return 0; } +/* Gets name in the form prom v2+ uses it (name@x,yyyyy or name (if no reg)) */ +int prom_getname (int node, char *buffer, int len) +{ + int i; + struct linux_prom_registers reg[PROMREG_MAX]; + + i = prom_getproperty (node, "name", buffer, len); + if (i <= 0) return -1; + buffer [i] = 0; + len -= i; + i = prom_getproperty (node, "reg", (char *)reg, sizeof (reg)); + if (i <= 0) return 0; + if (len < 11) return -1; + buffer = strchr (buffer, 0); + sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr); + return 0; +} + /* Interal version of nextprop that does not alter return values. */ char * __prom_nextprop(int node, char * oprop) { diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index a6309b8b8..73afb9c6b 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -34,10 +34,6 @@ config ARCH_MAY_HAVE_PC_FDC bool default y -config AUDIT_ARCH - bool - default y - choice prompt "Kernel page size" default SPARC64_PAGE_SIZE_8KB @@ -91,10 +87,6 @@ config SYSVIPC_COMPAT depends on COMPAT && SYSVIPC default y -config GENERIC_HARDIRQS - bool - default y - menu "General machine setup" config SMP @@ -338,7 +330,7 @@ config COMPAT default y config BINFMT_ELF32 - bool "Kernel support for 32-bit ELF binaries" + tristate "Kernel support for 32-bit ELF binaries" depends on SPARC32_COMPAT help This allows you to run 32-bit Linux/ELF binaries on your Ultra. diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 43d9229fc..f09a70b8a 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc2 -# Fri Jul 21 14:19:24 2006 +# Linux kernel version: 2.6.17-rc3 +# Fri May 12 12:43:49 2006 # CONFIG_SPARC=y CONFIG_SPARC64=y @@ -18,7 +18,6 @@ CONFIG_SECCOMP=y CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -36,7 +35,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set @@ -53,12 +51,10 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -91,7 +87,6 @@ CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_SYSVIPC_COMPAT=y -CONFIG_GENERIC_HARDIRQS=y # # General machine setup @@ -131,8 +126,8 @@ CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y +CONFIG_MEMORY_HOTPLUG=y CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y CONFIG_GENERIC_ISA_DMA=y CONFIG_SBUS=y CONFIG_SBUSCHAR=y @@ -188,8 +183,6 @@ CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y CONFIG_INET_XFRM_TUNNEL=y CONFIG_INET_TUNNEL=y -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_ADVANCED=y @@ -205,8 +198,6 @@ CONFIG_TCP_CONG_HSTCP=m CONFIG_TCP_CONG_HYBLA=m CONFIG_TCP_CONG_VEGAS=m CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m CONFIG_IPV6=m CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y @@ -216,10 +207,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -272,7 +260,6 @@ CONFIG_VLAN_8021Q=m # Network testing # CONFIG_NET_PKTGEN=m -CONFIG_NET_TCPPROBE=m # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -289,7 +276,6 @@ CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -438,7 +424,6 @@ CONFIG_ISCSI_TCP=m # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_IPS is not set @@ -464,8 +449,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m # CONFIG_MD_RAID5_RESHAPE is not set +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m # CONFIG_MD_FAULTY is not set CONFIG_BLK_DEV_DM=m @@ -576,7 +562,6 @@ CONFIG_BNX2=m # CONFIG_CHELSIO_T1 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -665,7 +650,6 @@ CONFIG_SERIO_RAW=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -696,7 +680,6 @@ CONFIG_UNIX98_PTYS=y # Watchdog Cards # # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set CONFIG_RTC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set @@ -739,7 +722,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_I2C_I810 is not set # CONFIG_I2C_PIIX4 is not set # CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set @@ -783,7 +765,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set # CONFIG_SENSORS_ADM1026 is not set @@ -812,12 +793,10 @@ CONFIG_HWMON=y # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83L785TS is not set # CONFIG_SENSORS_W83627HF is not set @@ -832,7 +811,6 @@ CONFIG_HWMON=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -843,13 +821,12 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y # CONFIG_FB_CIRRUS is not set @@ -959,18 +936,6 @@ CONFIG_SND_ALI5451=m # CONFIG_SND_CMIPCI is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set -# CONFIG_SND_DARLA20 is not set -# CONFIG_SND_GINA20 is not set -# CONFIG_SND_LAYLA20 is not set -# CONFIG_SND_DARLA24 is not set -# CONFIG_SND_GINA24 is not set -# CONFIG_SND_LAYLA24 is not set -# CONFIG_SND_MONA is not set -# CONFIG_SND_MIA is not set -# CONFIG_SND_ECHO3G is not set -# CONFIG_SND_INDIGO is not set -# CONFIG_SND_INDIGOIO is not set -# CONFIG_SND_INDIGODJ is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -1041,7 +1006,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1121,12 +1085,10 @@ CONFIG_USB_HIDDEV=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1172,19 +1134,6 @@ CONFIG_USB_HIDDEV=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # Misc Linux/SPARC drivers # @@ -1224,7 +1173,6 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set @@ -1348,19 +1296,14 @@ CONFIG_KPROBES=y # CONFIG_PRINTK_TIME=y CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set @@ -1424,4 +1367,3 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y diff --git a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile index e1eabebae..6f6816488 100644 --- a/arch/sparc64/kernel/Makefile +++ b/arch/sparc64/kernel/Makefile @@ -12,7 +12,7 @@ obj-y := process.o setup.o cpu.o idprom.o \ irq.o ptrace.o time.o sys_sparc.o signal.o \ unaligned.o central.o pci.o starfire.o semaphore.o \ power.o sbus.o iommu_common.o sparc64_ksyms.o chmc.o \ - visemul.o prom.o of_device.o + visemul.o obj-$(CONFIG_PCI) += ebus.o isa.o pci_common.o pci_iommu.o \ pci_psycho.o pci_sabre.o pci_schizo.o \ @@ -25,9 +25,6 @@ obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_US3_FREQ) += us3_cpufreq.o obj-$(CONFIG_US2E_FREQ) += us2e_cpufreq.o obj-$(CONFIG_KPROBES) += kprobes.o -obj-$(CONFIG_AUDIT) += audit.o -obj-$(CONFIG_AUDIT)$(CONFIG_SPARC32_COMPAT) += compat_audit.o -obj-y += $(obj-yy) ifdef CONFIG_SUNOS_EMUL obj-y += sys_sunos32.o sunos_ioctl32.o diff --git a/arch/sparc64/kernel/audit.c b/arch/sparc64/kernel/audit.c deleted file mode 100644 index aef19cc27..000000000 --- a/arch/sparc64/kernel/audit.c +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ -#ifdef CONFIG_SPARC32_COMPAT - extern int sparc32_classify_syscall(unsigned); - if (abi == AUDIT_ARCH_SPARC) - return sparc32_classify_syscall(syscall); -#endif - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ -#ifdef CONFIG_SPARC32_COMPAT - extern __u32 sparc32_dir_class[]; - extern __u32 sparc32_write_class[]; - extern __u32 sparc32_read_class[]; - extern __u32 sparc32_chattr_class[]; - audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); - audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); - audit_register_class(AUDIT_CLASS_CHATTR_32, sparc32_chattr_class); -#endif - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c index 826118ee5..8852c20c8 100644 --- a/arch/sparc64/kernel/auxio.c +++ b/arch/sparc64/kernel/auxio.c @@ -5,18 +5,19 @@ * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net) */ -#include +#include #include #include #include -#include -#include +#include #include +#include +#include #include +/* This cannot be static, as it is referenced in irq.c */ void __iomem *auxio_register = NULL; -EXPORT_SYMBOL(auxio_register); enum auxio_type { AUXIO_TYPE_NODEV, @@ -109,57 +110,43 @@ void auxio_set_lte(int on) } } -static struct of_device_id auxio_match[] = { - { - .name = "auxio", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, auxio_match); - -static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) +void __init auxio_probe(void) { - struct device_node *dp = dev->node; - unsigned long size; - - if (!strcmp(dp->parent->name, "ebus")) { - auxio_devtype = AUXIO_TYPE_EBUS; - size = sizeof(u32); - } else if (!strcmp(dp->parent->name, "sbus")) { - auxio_devtype = AUXIO_TYPE_SBUS; - size = 1; - } else { - printk("auxio: Unknown parent bus type [%s]\n", - dp->parent->name); - return -ENODEV; + struct sbus_bus *sbus; + struct sbus_dev *sdev = NULL; + + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if(!strcmp(sdev->prom_name, "auxio")) + goto found_sdev; + } + } + +found_sdev: + if (sdev) { + auxio_devtype = AUXIO_TYPE_SBUS; + auxio_register = sbus_ioremap(&sdev->resource[0], 0, + sdev->reg_addrs[0].reg_size, + "auxiliaryIO"); } - auxio_register = of_ioremap(&dev->resource[0], 0, size, "auxio"); - if (!auxio_register) - return -ENODEV; - - printk(KERN_INFO "AUXIO: Found device at %s\n", - dp->full_name); - - if (auxio_devtype == AUXIO_TYPE_EBUS) - auxio_set_led(AUXIO_LED_ON); - - return 0; -} - -static struct of_platform_driver auxio_driver = { - .name = "auxio", - .match_table = auxio_match, - .probe = auxio_probe, -}; - -static int __init auxio_init(void) -{ - return of_register_driver(&auxio_driver, &of_bus_type); +#ifdef CONFIG_PCI + else { + struct linux_ebus *ebus; + struct linux_ebus_device *edev = NULL; + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, "auxio")) + goto ebus_done; + } + } + ebus_done: + if (edev) { + auxio_devtype = AUXIO_TYPE_EBUS; + auxio_register = + ioremap(edev->resource[0].start, sizeof(u32)); + } + } + auxio_set_led(AUXIO_LED_ON); +#endif } - -/* Must be after subsys_initcall() so that busses are probed. Must - * be before device_initcall() because things like the floppy driver - * need to use the AUXIO register. - */ -fs_initcall(auxio_init); diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c index a98f3ae17..8a2abcce2 100644 --- a/arch/sparc64/kernel/binfmt_elf32.c +++ b/arch/sparc64/kernel/binfmt_elf32.c @@ -84,6 +84,7 @@ typedef struct { #include #include +#include #include #include diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c index e724c54af..3d184a784 100644 --- a/arch/sparc64/kernel/central.c +++ b/arch/sparc64/kernel/central.c @@ -29,34 +29,28 @@ static void central_probe_failure(int line) prom_halt(); } -static void central_ranges_init(struct linux_central *central) +static void central_ranges_init(int cnode, struct linux_central *central) { - struct device_node *dp = central->prom_node; - void *pval; - int len; + int success; central->num_central_ranges = 0; - pval = of_get_property(dp, "ranges", &len); - if (pval) { - memcpy(central->central_ranges, pval, len); - central->num_central_ranges = - (len / sizeof(struct linux_prom_ranges)); - } + success = prom_getproperty(central->prom_node, "ranges", + (char *) central->central_ranges, + sizeof (central->central_ranges)); + if (success != -1) + central->num_central_ranges = (success/sizeof(struct linux_prom_ranges)); } -static void fhc_ranges_init(struct linux_fhc *fhc) +static void fhc_ranges_init(int fnode, struct linux_fhc *fhc) { - struct device_node *dp = fhc->prom_node; - void *pval; - int len; + int success; fhc->num_fhc_ranges = 0; - pval = of_get_property(dp, "ranges", &len); - if (pval) { - memcpy(fhc->fhc_ranges, pval, len); - fhc->num_fhc_ranges = - (len / sizeof(struct linux_prom_ranges)); - } + success = prom_getproperty(fhc->prom_node, "ranges", + (char *) fhc->fhc_ranges, + sizeof (fhc->fhc_ranges)); + if (success != -1) + fhc->num_fhc_ranges = (success/sizeof(struct linux_prom_ranges)); } /* Range application routines are exported to various drivers, @@ -118,18 +112,19 @@ static unsigned long prom_reg_to_paddr(struct linux_prom_registers *r) static void probe_other_fhcs(void) { - struct device_node *dp; - struct linux_prom64_registers *fpregs; + struct linux_prom64_registers fpregs[6]; + char namebuf[128]; + int node; - for_each_node_by_name(dp, "fhc") { + node = prom_getchild(prom_root_node); + node = prom_searchsiblings(node, "fhc"); + if (node == 0) + central_probe_failure(__LINE__); + while (node) { struct linux_fhc *fhc; int board; u32 tmp; - if (dp->parent && - dp->parent->parent != NULL) - continue; - fhc = (struct linux_fhc *) central_alloc_bootmem(sizeof(struct linux_fhc)); if (fhc == NULL) @@ -142,12 +137,14 @@ static void probe_other_fhcs(void) /* Toplevel FHCs have no parent. */ fhc->parent = NULL; - fhc->prom_node = dp; - fhc_ranges_init(fhc); + fhc->prom_node = node; + prom_getstring(node, "name", namebuf, sizeof(namebuf)); + strcpy(fhc->prom_name, namebuf); + fhc_ranges_init(node, fhc); /* Non-central FHC's have 64-bit OBP format registers. */ - fpregs = of_get_property(dp, "reg", NULL); - if (!fpregs) + if (prom_getproperty(node, "reg", + (char *)&fpregs[0], sizeof(fpregs)) == -1) central_probe_failure(__LINE__); /* Only central FHC needs special ranges applied. */ @@ -158,7 +155,7 @@ static void probe_other_fhcs(void) fhc->fhc_regs.uregs = fpregs[4].phys_addr; fhc->fhc_regs.tregs = fpregs[5].phys_addr; - board = of_getintprop_default(dp, "board#", -1); + board = prom_getintdefault(node, "board#", -1); fhc->board = board; tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_JCTRL); @@ -182,33 +179,33 @@ static void probe_other_fhcs(void) tmp = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_CTRL); tmp |= FHC_CONTROL_IXIST; upa_writel(tmp, fhc->fhc_regs.pregs + FHC_PREGS_CTRL); + + /* Look for the next FHC. */ + node = prom_getsibling(node); + if (node == 0) + break; + node = prom_searchsiblings(node, "fhc"); + if (node == 0) + break; } } static void probe_clock_board(struct linux_central *central, struct linux_fhc *fhc, - struct device_node *fp) + int cnode, int fnode) { - struct device_node *dp; - struct linux_prom_registers cregs[3], *pr; - int nslots, tmp, nregs; + struct linux_prom_registers cregs[3]; + int clknode, nslots, tmp, nregs; - dp = fp->child; - while (dp) { - if (!strcmp(dp->name, "clock-board")) - break; - dp = dp->sibling; - } - if (!dp) + clknode = prom_searchsiblings(prom_getchild(fnode), "clock-board"); + if (clknode == 0 || clknode == -1) central_probe_failure(__LINE__); - pr = of_get_property(dp, "reg", &nregs); - if (!pr) + nregs = prom_getproperty(clknode, "reg", (char *)&cregs[0], sizeof(cregs)); + if (nregs == -1) central_probe_failure(__LINE__); - memcpy(cregs, pr, nregs); nregs /= sizeof(struct linux_prom_registers); - apply_fhc_ranges(fhc, &cregs[0], nregs); apply_central_ranges(central, &cregs[0], nregs); central->cfreg = prom_reg_to_paddr(&cregs[0]); @@ -299,13 +296,13 @@ static void init_all_fhc_hw(void) void central_probe(void) { - struct linux_prom_registers fpregs[6], *pr; + struct linux_prom_registers fpregs[6]; struct linux_fhc *fhc; - struct device_node *dp, *fp; - int err; + char namebuf[128]; + int cnode, fnode, err; - dp = of_find_node_by_name(NULL, "central"); - if (!dp) { + cnode = prom_finddevice("/central"); + if (cnode == 0 || cnode == -1) { if (this_is_starfire) starfire_cpu_setup(); return; @@ -324,31 +321,31 @@ void central_probe(void) /* First init central. */ central_bus->child = fhc; - central_bus->prom_node = dp; - central_ranges_init(central_bus); + central_bus->prom_node = cnode; + + prom_getstring(cnode, "name", namebuf, sizeof(namebuf)); + strcpy(central_bus->prom_name, namebuf); + + central_ranges_init(cnode, central_bus); /* And then central's FHC. */ fhc->next = fhc_list; fhc_list = fhc; fhc->parent = central_bus; - fp = dp->child; - while (fp) { - if (!strcmp(fp->name, "fhc")) - break; - fp = fp->sibling; - } - if (!fp) + fnode = prom_searchsiblings(prom_getchild(cnode), "fhc"); + if (fnode == 0 || fnode == -1) central_probe_failure(__LINE__); - fhc->prom_node = fp; - fhc_ranges_init(fhc); + fhc->prom_node = fnode; + prom_getstring(fnode, "name", namebuf, sizeof(namebuf)); + strcpy(fhc->prom_name, namebuf); + + fhc_ranges_init(fnode, fhc); /* Now, map in FHC register set. */ - pr = of_get_property(fp, "reg", NULL); - if (!pr) + if (prom_getproperty(fnode, "reg", (char *)&fpregs[0], sizeof(fpregs)) == -1) central_probe_failure(__LINE__); - memcpy(fpregs, pr, sizeof(fpregs)); apply_central_ranges(central_bus, &fpregs[0], 6); @@ -369,7 +366,7 @@ void central_probe(void) fhc->jtag_master = 0; /* Attach the clock board registers for CENTRAL. */ - probe_clock_board(central_bus, fhc, fp); + probe_clock_board(central_bus, fhc, cnode, fnode); err = upa_readl(fhc->fhc_regs.pregs + FHC_PREGS_ID); printk("FHC(board %d): Version[%x] PartID[%x] Manuf[%x] (CENTRAL)\n", diff --git a/arch/sparc64/kernel/chmc.c b/arch/sparc64/kernel/chmc.c index 259f37e51..97cf912f0 100644 --- a/arch/sparc64/kernel/chmc.c +++ b/arch/sparc64/kernel/chmc.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #define CHMCTRL_NDGRPS 2 @@ -68,6 +67,7 @@ struct bank_info { struct mctrl_info { struct list_head list; int portid; + int index; struct obp_mem_layout layout_prop; int layout_size; @@ -339,13 +339,12 @@ static void fetch_decode_regs(struct mctrl_info *mp) read_mcreg(mp, CHMCTRL_DECODE4)); } -static int init_one_mctrl(struct device_node *dp) +static int init_one_mctrl(int node, int index) { struct mctrl_info *mp = kmalloc(sizeof(*mp), GFP_KERNEL); - int portid = of_getintprop_default(dp, "portid", -1); - struct linux_prom64_registers *regs; - void *pval; - int len; + int portid = prom_getintdefault(node, "portid", -1); + struct linux_prom64_registers p_reg_prop; + int t; if (!mp) return -1; @@ -354,21 +353,24 @@ static int init_one_mctrl(struct device_node *dp) goto fail; mp->portid = portid; - pval = of_get_property(dp, "memory-layout", &len); - mp->layout_size = len; - if (!pval) + mp->layout_size = prom_getproplen(node, "memory-layout"); + if (mp->layout_size < 0) mp->layout_size = 0; - else { - if (mp->layout_size > sizeof(mp->layout_prop)) - goto fail; - memcpy(&mp->layout_prop, pval, len); - } + if (mp->layout_size > sizeof(mp->layout_prop)) + goto fail; - regs = of_get_property(dp, "reg", NULL); - if (!regs || regs->reg_size != 0x48) + if (mp->layout_size > 0) + prom_getproperty(node, "memory-layout", + (char *) &mp->layout_prop, + mp->layout_size); + + t = prom_getproperty(node, "reg", + (char *) &p_reg_prop, + sizeof(p_reg_prop)); + if (t < 0 || p_reg_prop.reg_size != 0x48) goto fail; - mp->regs = ioremap(regs->phys_addr, regs->reg_size); + mp->regs = ioremap(p_reg_prop.phys_addr, p_reg_prop.reg_size); if (mp->regs == NULL) goto fail; @@ -382,11 +384,13 @@ static int init_one_mctrl(struct device_node *dp) fetch_decode_regs(mp); + mp->index = index; + list_add(&mp->list, &mctrl_list); /* Report the device. */ - printk(KERN_INFO "%s: US3 memory controller at %p [%s]\n", - dp->full_name, + printk(KERN_INFO "chmc%d: US3 memory controller at %p [%s]\n", + mp->index, mp->regs, (mp->layout_size ? "ACTIVE" : "INACTIVE")); return 0; @@ -400,19 +404,34 @@ fail: return -1; } +static int __init probe_for_string(char *name, int index) +{ + int node = prom_getchild(prom_root_node); + + while ((node = prom_searchsiblings(node, name)) != 0) { + int ret = init_one_mctrl(node, index); + + if (!ret) + index++; + + node = prom_getsibling(node); + if (!node) + break; + } + + return index; +} + static int __init chmc_init(void) { - struct device_node *dp; + int index; /* This driver is only for cheetah platforms. */ if (tlb_type != cheetah && tlb_type != cheetah_plus) return -ENODEV; - for_each_node_by_name(dp, "memory-controller") - init_one_mctrl(dp); - - for_each_node_by_name(dp, "mc-us3") - init_one_mctrl(dp); + index = probe_for_string("memory-controller", 0); + index = probe_for_string("mc-us3", index); return 0; } diff --git a/arch/sparc64/kernel/compat_audit.c b/arch/sparc64/kernel/compat_audit.c deleted file mode 100644 index cca96c91b..000000000 --- a/arch/sparc64/kernel/compat_audit.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -unsigned sparc32_dir_class[] = { -#include -~0U -}; - -unsigned sparc32_chattr_class[] = { -#include -~0U -}; - -unsigned sparc32_write_class[] = { -#include -~0U -}; - -unsigned sparc32_read_class[] = { -#include -~0U -}; - -int sparc32_classify_syscall(unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 1; - } -} diff --git a/arch/sparc64/kernel/cpu.c b/arch/sparc64/kernel/cpu.c index 7eb81d395..11cc0caef 100644 --- a/arch/sparc64/kernel/cpu.c +++ b/arch/sparc64/kernel/cpu.c @@ -4,6 +4,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c index ec10f7edc..007e8922c 100644 --- a/arch/sparc64/kernel/devices.c +++ b/arch/sparc64/kernel/devices.c @@ -4,6 +4,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include @@ -20,6 +21,8 @@ #include #include #include +#include +#include /* Used to synchronize acceses to NatSemi SUPER I/O chip configure * operations in asm/ns87303.h @@ -29,6 +32,134 @@ DEFINE_SPINLOCK(ns87303_lock); extern void cpu_probe(void); extern void central_probe(void); +u32 sun4v_vdev_devhandle; +int sun4v_vdev_root; + +struct vdev_intmap { + unsigned int phys; + unsigned int irq; + unsigned int cnode; + unsigned int cinterrupt; +}; + +struct vdev_intmask { + unsigned int phys; + unsigned int interrupt; + unsigned int __unused; +}; + +static struct vdev_intmap *vdev_intmap; +static int vdev_num_intmap; +static struct vdev_intmask vdev_intmask; + +static void __init sun4v_virtual_device_probe(void) +{ + struct linux_prom64_registers regs; + struct vdev_intmap *ip; + int node, sz, err; + + if (tlb_type != hypervisor) + return; + + node = prom_getchild(prom_root_node); + node = prom_searchsiblings(node, "virtual-devices"); + if (!node) { + prom_printf("SUN4V: Fatal error, no virtual-devices node.\n"); + prom_halt(); + } + + sun4v_vdev_root = node; + + prom_getproperty(node, "reg", (char *)®s, sizeof(regs)); + sun4v_vdev_devhandle = (regs.phys_addr >> 32UL) & 0x0fffffff; + + sz = prom_getproplen(node, "interrupt-map"); + if (sz <= 0) { + prom_printf("SUN4V: Error, no vdev interrupt-map.\n"); + prom_halt(); + } + + if ((sz % sizeof(*ip)) != 0) { + prom_printf("SUN4V: Bogus interrupt-map property size %d\n", + sz); + prom_halt(); + } + + vdev_intmap = ip = alloc_bootmem_low_pages(sz); + if (!vdev_intmap) { + prom_printf("SUN4V: Error, cannot allocate vdev_intmap.\n"); + prom_halt(); + } + + err = prom_getproperty(node, "interrupt-map", (char *) ip, sz); + if (err == -1) { + prom_printf("SUN4V: Fatal error, no vdev interrupt-map.\n"); + prom_halt(); + } + if (err != sz) { + prom_printf("SUN4V: Inconsistent interrupt-map size, " + "proplen(%d) vs getprop(%d).\n", sz,err); + prom_halt(); + } + + vdev_num_intmap = err / sizeof(*ip); + + err = prom_getproperty(node, "interrupt-map-mask", + (char *) &vdev_intmask, + sizeof(vdev_intmask)); + if (err <= 0) { + prom_printf("SUN4V: Fatal error, no vdev " + "interrupt-map-mask.\n"); + prom_halt(); + } + if (err % sizeof(vdev_intmask)) { + prom_printf("SUN4V: Bogus interrupt-map-mask " + "property size %d\n", err); + prom_halt(); + } + + printk("SUN4V: virtual-devices devhandle[%x]\n", + sun4v_vdev_devhandle); +} + +unsigned int sun4v_vdev_device_interrupt(unsigned int dev_node) +{ + unsigned int irq, reg; + int err, i; + + err = prom_getproperty(dev_node, "interrupts", + (char *) &irq, sizeof(irq)); + if (err <= 0) { + printk("VDEV: Cannot get \"interrupts\" " + "property for OBP node %x\n", dev_node); + return 0; + } + + err = prom_getproperty(dev_node, "reg", + (char *) ®, sizeof(reg)); + if (err <= 0) { + printk("VDEV: Cannot get \"reg\" " + "property for OBP node %x\n", dev_node); + return 0; + } + + for (i = 0; i < vdev_num_intmap; i++) { + if (vdev_intmap[i].phys == (reg & vdev_intmask.phys) && + vdev_intmap[i].irq == (irq & vdev_intmask.interrupt)) { + irq = vdev_intmap[i].cinterrupt; + break; + } + } + + if (i == vdev_num_intmap) { + printk("VDEV: No matching interrupt map entry " + "for OBP node %x\n", dev_node); + return 0; + } + + return sun4v_build_irq(sun4v_vdev_devhandle, irq, 5, 0); +} + static const char *cpu_mid_prop(void) { if (tlb_type == spitfire) @@ -36,41 +167,38 @@ static const char *cpu_mid_prop(void) return "portid"; } -static int get_cpu_mid(struct device_node *dp) +static int get_cpu_mid(int prom_node) { - struct property *prop; - if (tlb_type == hypervisor) { - struct linux_prom64_registers *reg; - int len; + struct linux_prom64_registers reg; - prop = of_find_property(dp, "cpuid", &len); - if (prop && len == 4) - return *(int *) prop->value; + if (prom_getproplen(prom_node, "cpuid") == 4) + return prom_getintdefault(prom_node, "cpuid", 0); - prop = of_find_property(dp, "reg", NULL); - reg = prop->value; - return (reg[0].phys_addr >> 32) & 0x0fffffffUL; + prom_getproperty(prom_node, "reg", (char *) ®, sizeof(reg)); + return (reg.phys_addr >> 32) & 0x0fffffffUL; } else { const char *prop_name = cpu_mid_prop(); - prop = of_find_property(dp, prop_name, NULL); - if (prop) - return *(int *) prop->value; - return 0; + return prom_getintdefault(prom_node, prop_name, 0); } } -static int check_cpu_node(struct device_node *dp, int *cur_inst, - int (*compare)(struct device_node *, int, void *), - void *compare_arg, - struct device_node **dev_node, int *mid) +static int check_cpu_node(int nd, int *cur_inst, + int (*compare)(int, int, void *), void *compare_arg, + int *prom_node, int *mid) { - if (!compare(dp, *cur_inst, compare_arg)) { - if (dev_node) - *dev_node = dp; + char node_str[128]; + + prom_getstring(nd, "device_type", node_str, sizeof(node_str)); + if (strcmp(node_str, "cpu")) + return -ENODEV; + + if (!compare(nd, *cur_inst, compare_arg)) { + if (prom_node) + *prom_node = nd; if (mid) - *mid = get_cpu_mid(dp); + *mid = get_cpu_mid(nd); return 0; } @@ -79,18 +207,25 @@ static int check_cpu_node(struct device_node *dp, int *cur_inst, return -ENODEV; } -static int __cpu_find_by(int (*compare)(struct device_node *, int, void *), - void *compare_arg, - struct device_node **dev_node, int *mid) +static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg, + int *prom_node, int *mid) { - struct device_node *dp; - int cur_inst; + int nd, cur_inst, err; + nd = prom_root_node; cur_inst = 0; - for_each_node_by_type(dp, "cpu") { - int err = check_cpu_node(dp, &cur_inst, - compare, compare_arg, - dev_node, mid); + + err = check_cpu_node(nd, &cur_inst, + compare, compare_arg, + prom_node, mid); + if (err == 0) + return 0; + + nd = prom_getchild(nd); + while ((nd = prom_getsibling(nd)) != 0) { + err = check_cpu_node(nd, &cur_inst, + compare, compare_arg, + prom_node, mid); if (err == 0) return 0; } @@ -98,7 +233,7 @@ static int __cpu_find_by(int (*compare)(struct device_node *, int, void *), return -ENODEV; } -static int cpu_instance_compare(struct device_node *dp, int instance, void *_arg) +static int cpu_instance_compare(int nd, int instance, void *_arg) { int desired_instance = (int) (long) _arg; @@ -107,27 +242,27 @@ static int cpu_instance_compare(struct device_node *dp, int instance, void *_arg return -ENODEV; } -int cpu_find_by_instance(int instance, struct device_node **dev_node, int *mid) +int cpu_find_by_instance(int instance, int *prom_node, int *mid) { return __cpu_find_by(cpu_instance_compare, (void *)(long)instance, - dev_node, mid); + prom_node, mid); } -static int cpu_mid_compare(struct device_node *dp, int instance, void *_arg) +static int cpu_mid_compare(int nd, int instance, void *_arg) { int desired_mid = (int) (long) _arg; int this_mid; - this_mid = get_cpu_mid(dp); + this_mid = get_cpu_mid(nd); if (this_mid == desired_mid) return 0; return -ENODEV; } -int cpu_find_by_mid(int mid, struct device_node **dev_node) +int cpu_find_by_mid(int mid, int *prom_node) { return __cpu_find_by(cpu_mid_compare, (void *)(long)mid, - dev_node, NULL); + prom_node, NULL); } void __init device_scan(void) @@ -139,47 +274,50 @@ void __init device_scan(void) #ifndef CONFIG_SMP { - struct device_node *dp; - int err, def; + int err, cpu_node, def; - err = cpu_find_by_instance(0, &dp, NULL); + err = cpu_find_by_instance(0, &cpu_node, NULL); if (err) { prom_printf("No cpu nodes, cannot continue\n"); prom_halt(); } - cpu_data(0).clock_tick = - of_getintprop_default(dp, "clock-frequency", 0); + cpu_data(0).clock_tick = prom_getintdefault(cpu_node, + "clock-frequency", + 0); def = ((tlb_type == hypervisor) ? (8 * 1024) : (16 * 1024)); - cpu_data(0).dcache_size = of_getintprop_default(dp, - "dcache-size", - def); + cpu_data(0).dcache_size = prom_getintdefault(cpu_node, + "dcache-size", + def); def = 32; cpu_data(0).dcache_line_size = - of_getintprop_default(dp, "dcache-line-size", def); + prom_getintdefault(cpu_node, "dcache-line-size", + def); def = 16 * 1024; - cpu_data(0).icache_size = of_getintprop_default(dp, - "icache-size", - def); + cpu_data(0).icache_size = prom_getintdefault(cpu_node, + "icache-size", + def); def = 32; cpu_data(0).icache_line_size = - of_getintprop_default(dp, "icache-line-size", def); + prom_getintdefault(cpu_node, "icache-line-size", + def); def = ((tlb_type == hypervisor) ? (3 * 1024 * 1024) : (4 * 1024 * 1024)); - cpu_data(0).ecache_size = of_getintprop_default(dp, - "ecache-size", - def); + cpu_data(0).ecache_size = prom_getintdefault(cpu_node, + "ecache-size", + def); def = 64; cpu_data(0).ecache_line_size = - of_getintprop_default(dp, "ecache-line-size", def); + prom_getintdefault(cpu_node, "ecache-line-size", + def); printk("CPU[0]: Caches " "D[sz(%d):line_sz(%d)] " "I[sz(%d):line_sz(%d)] " @@ -190,6 +328,7 @@ void __init device_scan(void) } #endif + sun4v_virtual_device_probe(); central_probe(); cpu_probe(); diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 8a9b470e1..c69504aa6 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c @@ -5,6 +5,7 @@ * Copyright (C) 1999 David S. Miller (davem@redhat.com) */ +#include #include #include #include @@ -19,8 +20,6 @@ #include #include #include -#include -#include #include #include @@ -140,7 +139,7 @@ int ebus_dma_irq_enable(struct ebus_dma_info *p, int on) if (on) { if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) { - if (request_irq(p->irq, ebus_dma_irq, IRQF_SHARED, p->name, p)) + if (request_irq(p->irq, ebus_dma_irq, SA_SHIRQ, p->name, p)) return -EBUSY; } @@ -270,6 +269,10 @@ EXPORT_SYMBOL(ebus_dma_enable); struct linux_ebus *ebus_chain = NULL; +#ifdef CONFIG_SUN_AUXIO +extern void auxio_probe(void); +#endif + static inline void *ebus_alloc(size_t size) { void *mem; @@ -280,22 +283,77 @@ static inline void *ebus_alloc(size_t size) return mem; } -static void __init fill_ebus_child(struct device_node *dp, - struct linux_ebus_child *dev, - int non_standard_regs) +static void __init ebus_ranges_init(struct linux_ebus *ebus) +{ + int success; + + ebus->num_ebus_ranges = 0; + success = prom_getproperty(ebus->prom_node, "ranges", + (char *)ebus->ebus_ranges, + sizeof(ebus->ebus_ranges)); + if (success != -1) + ebus->num_ebus_ranges = (success/sizeof(struct linux_prom_ebus_ranges)); +} + +static void __init ebus_intmap_init(struct linux_ebus *ebus) +{ + int success; + + ebus->num_ebus_intmap = 0; + success = prom_getproperty(ebus->prom_node, "interrupt-map", + (char *)ebus->ebus_intmap, + sizeof(ebus->ebus_intmap)); + if (success == -1) + return; + + ebus->num_ebus_intmap = (success/sizeof(struct linux_prom_ebus_intmap)); + + success = prom_getproperty(ebus->prom_node, "interrupt-map-mask", + (char *)&ebus->ebus_intmask, + sizeof(ebus->ebus_intmask)); + if (success == -1) { + prom_printf("%s: can't get interrupt-map-mask\n", __FUNCTION__); + prom_halt(); + } +} + +int __init ebus_intmap_match(struct linux_ebus *ebus, + struct linux_prom_registers *reg, + int *interrupt) { - struct of_device *op; - int *regs; + unsigned int hi, lo, irq; + int i; + + if (!ebus->num_ebus_intmap) + return 0; + + hi = reg->which_io & ebus->ebus_intmask.phys_hi; + lo = reg->phys_addr & ebus->ebus_intmask.phys_lo; + irq = *interrupt & ebus->ebus_intmask.interrupt; + for (i = 0; i < ebus->num_ebus_intmap; i++) { + if ((ebus->ebus_intmap[i].phys_hi == hi) && + (ebus->ebus_intmap[i].phys_lo == lo) && + (ebus->ebus_intmap[i].interrupt == irq)) { + *interrupt = ebus->ebus_intmap[i].cinterrupt; + return 0; + } + } + return -1; +} + +void __init fill_ebus_child(int node, struct linux_prom_registers *preg, + struct linux_ebus_child *dev, int non_standard_regs) +{ + int regs[PROMREG_MAX]; + int irqs[PROMREG_MAX]; int i, len; - dev->prom_node = dp; - printk(" (%s)", dp->name); + dev->prom_node = node; + prom_getstring(node, "name", dev->prom_name, sizeof(dev->prom_name)); + printk(" (%s)", dev->prom_name); - regs = of_get_property(dp, "reg", &len); - if (!regs) - dev->num_addrs = 0; - else - dev->num_addrs = len / sizeof(regs[0]); + len = prom_getproperty(node, "reg", (void *)regs, sizeof(regs)); + dev->num_addrs = len / sizeof(regs[0]); if (non_standard_regs) { /* This is to handle reg properties which are not @@ -312,34 +370,30 @@ static void __init fill_ebus_child(struct device_node *dp, int rnum = regs[i]; if (rnum >= dev->parent->num_addrs) { prom_printf("UGH: property for %s was %d, need < %d\n", - dp->name, len, dev->parent->num_addrs); - prom_halt(); + dev->prom_name, len, dev->parent->num_addrs); + panic(__FUNCTION__); } dev->resource[i].start = dev->parent->resource[i].start; dev->resource[i].end = dev->parent->resource[i].end; dev->resource[i].flags = IORESOURCE_MEM; - dev->resource[i].name = dp->name; + dev->resource[i].name = dev->prom_name; } } - op = of_find_device_by_node(dp); - if (!op) { - dev->num_irqs = 0; - } else { - dev->num_irqs = op->num_irqs; - for (i = 0; i < dev->num_irqs; i++) - dev->irqs[i] = op->irqs[i]; - } + for (i = 0; i < PROMINTR_MAX; i++) + dev->irqs[i] = PCI_IRQ_NONE; - if (!dev->num_irqs) { + len = prom_getproperty(node, "interrupts", (char *)&irqs, sizeof(irqs)); + if ((len == -1) || (len == 0)) { + dev->num_irqs = 0; /* * Oh, well, some PROMs don't export interrupts * property to children of EBus devices... * * Be smart about PS/2 keyboard and mouse. */ - if (!strcmp(dev->parent->prom_node->name, "8042")) { - if (!strcmp(dev->prom_node->name, "kb_ps2")) { + if (!strcmp(dev->parent->prom_name, "8042")) { + if (!strcmp(dev->prom_name, "kb_ps2")) { dev->num_irqs = 1; dev->irqs[0] = dev->parent->irqs[0]; } else { @@ -347,57 +401,103 @@ static void __init fill_ebus_child(struct device_node *dp, dev->irqs[0] = dev->parent->irqs[1]; } } + } else { + dev->num_irqs = len / sizeof(irqs[0]); + for (i = 0; i < dev->num_irqs; i++) { + struct pci_pbm_info *pbm = dev->bus->parent; + struct pci_controller_info *p = pbm->parent; + + if (ebus_intmap_match(dev->bus, preg, &irqs[i]) != -1) { + dev->irqs[i] = p->irq_build(pbm, + dev->bus->self, + irqs[i]); + } else { + /* If we get a bogus interrupt property, just + * record the raw value instead of punting. + */ + dev->irqs[i] = irqs[i]; + } + } } } static int __init child_regs_nonstandard(struct linux_ebus_device *dev) { - if (!strcmp(dev->prom_node->name, "i2c") || - !strcmp(dev->prom_node->name, "SUNW,lombus")) + if (!strcmp(dev->prom_name, "i2c") || + !strcmp(dev->prom_name, "SUNW,lombus")) return 1; return 0; } -static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) +void __init fill_ebus_device(int node, struct linux_ebus_device *dev) { + struct linux_prom_registers regs[PROMREG_MAX]; struct linux_ebus_child *child; - struct of_device *op; - int i, len; + int irqs[PROMINTR_MAX]; + int i, n, len; - dev->prom_node = dp; + dev->prom_node = node; + prom_getstring(node, "name", dev->prom_name, sizeof(dev->prom_name)); + printk(" [%s", dev->prom_name); - printk(" [%s", dp->name); - - op = of_find_device_by_node(dp); - if (!op) { + len = prom_getproperty(node, "reg", (void *)regs, sizeof(regs)); + if (len == -1) { dev->num_addrs = 0; - dev->num_irqs = 0; - } else { - (void) of_get_property(dp, "reg", &len); - dev->num_addrs = len / sizeof(struct linux_prom_registers); - - for (i = 0; i < dev->num_addrs; i++) - memcpy(&dev->resource[i], - &op->resource[i], - sizeof(struct resource)); + goto probe_interrupts; + } - dev->num_irqs = op->num_irqs; - for (i = 0; i < dev->num_irqs; i++) - dev->irqs[i] = op->irqs[i]; + if (len % sizeof(struct linux_prom_registers)) { + prom_printf("UGH: proplen for %s was %d, need multiple of %d\n", + dev->prom_name, len, + (int)sizeof(struct linux_prom_registers)); + prom_halt(); + } + dev->num_addrs = len / sizeof(struct linux_prom_registers); + + for (i = 0; i < dev->num_addrs; i++) { + /* XXX Learn how to interpret ebus ranges... -DaveM */ + if (regs[i].which_io >= 0x10) + n = (regs[i].which_io - 0x10) >> 2; + else + n = regs[i].which_io; + + dev->resource[i].start = dev->bus->self->resource[n].start; + dev->resource[i].start += (unsigned long)regs[i].phys_addr; + dev->resource[i].end = + (dev->resource[i].start + (unsigned long)regs[i].reg_size - 1UL); + dev->resource[i].flags = IORESOURCE_MEM; + dev->resource[i].name = dev->prom_name; + request_resource(&dev->bus->self->resource[n], + &dev->resource[i]); } - dev->ofdev.node = dp; - dev->ofdev.dev.parent = &dev->bus->ofdev.dev; - dev->ofdev.dev.bus = &ebus_bus_type; - strcpy(dev->ofdev.dev.bus_id, dp->path_component_name); +probe_interrupts: + for (i = 0; i < PROMINTR_MAX; i++) + dev->irqs[i] = PCI_IRQ_NONE; - /* Register with core */ - if (of_device_register(&dev->ofdev) != 0) - printk(KERN_DEBUG "ebus: device registration error for %s!\n", - dev->ofdev.dev.bus_id); + len = prom_getproperty(node, "interrupts", (char *)&irqs, sizeof(irqs)); + if ((len == -1) || (len == 0)) { + dev->num_irqs = 0; + } else { + dev->num_irqs = len / sizeof(irqs[0]); + for (i = 0; i < dev->num_irqs; i++) { + struct pci_pbm_info *pbm = dev->bus->parent; + struct pci_controller_info *p = pbm->parent; + + if (ebus_intmap_match(dev->bus, ®s[0], &irqs[i]) != -1) { + dev->irqs[i] = p->irq_build(pbm, + dev->bus->self, + irqs[i]); + } else { + /* If we get a bogus interrupt property, just + * record the raw value instead of punting. + */ + dev->irqs[i] = irqs[i]; + } + } + } - dp = dp->child; - if (dp) { + if ((node = prom_getchild(node))) { printk(" ->"); dev->children = ebus_alloc(sizeof(struct linux_ebus_child)); @@ -405,18 +505,18 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de child->next = NULL; child->parent = dev; child->bus = dev->bus; - fill_ebus_child(dp, child, - child_regs_nonstandard(dev)); + fill_ebus_child(node, ®s[0], + child, child_regs_nonstandard(dev)); - while ((dp = dp->sibling) != NULL) { + while ((node = prom_getsibling(node)) != 0) { child->next = ebus_alloc(sizeof(struct linux_ebus_child)); child = child->next; child->next = NULL; child->parent = dev; child->bus = dev->bus; - fill_ebus_child(dp, child, - child_regs_nonstandard(dev)); + fill_ebus_child(node, ®s[0], + child, child_regs_nonstandard(dev)); } } printk("]"); @@ -443,8 +543,7 @@ void __init ebus_init(void) struct linux_ebus *ebus; struct pci_dev *pdev; struct pcidev_cookie *cookie; - struct device_node *dp; - int is_rio; + int nd, ebusnd, is_rio; int num_ebus = 0; pdev = find_next_ebus(NULL, &is_rio); @@ -454,22 +553,20 @@ void __init ebus_init(void) } cookie = pdev->sysdata; - dp = cookie->prom_node; + ebusnd = cookie->prom_node; ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus)); ebus->next = NULL; ebus->is_rio = is_rio; - while (dp) { - struct device_node *child; - + while (ebusnd) { /* SUNW,pci-qfe uses four empty ebuses on it. I think we should not consider them here, as they have half of the properties this code expects and once we do PCI hot-plug, we'd have to tweak with the ebus_chain in the runtime after initialization. -jj */ - if (!dp->child) { + if (!prom_getchild (ebusnd)) { pdev = find_next_ebus(pdev, &is_rio); if (!pdev) { if (ebus == ebus_chain) { @@ -481,29 +578,22 @@ void __init ebus_init(void) } ebus->is_rio = is_rio; cookie = pdev->sysdata; - dp = cookie->prom_node; + ebusnd = cookie->prom_node; continue; } printk("ebus%d:", num_ebus); + prom_getstring(ebusnd, "name", ebus->prom_name, sizeof(ebus->prom_name)); ebus->index = num_ebus; - ebus->prom_node = dp; + ebus->prom_node = ebusnd; ebus->self = pdev; ebus->parent = pbm = cookie->pbm; - ebus->ofdev.node = dp; - ebus->ofdev.dev.parent = &pdev->dev; - ebus->ofdev.dev.bus = &ebus_bus_type; - strcpy(ebus->ofdev.dev.bus_id, dp->path_component_name); - - /* Register with core */ - if (of_device_register(&ebus->ofdev) != 0) - printk(KERN_DEBUG "ebus: device registration error for %s!\n", - ebus->ofdev.dev.bus_id); + ebus_ranges_init(ebus); + ebus_intmap_init(ebus); - - child = dp->child; - if (!child) + nd = prom_getchild(ebusnd); + if (!nd) goto next_ebus; ebus->devices = ebus_alloc(sizeof(struct linux_ebus_device)); @@ -512,16 +602,16 @@ void __init ebus_init(void) dev->next = NULL; dev->children = NULL; dev->bus = ebus; - fill_ebus_device(child, dev); + fill_ebus_device(nd, dev); - while ((child = child->sibling) != NULL) { + while ((nd = prom_getsibling(nd)) != 0) { dev->next = ebus_alloc(sizeof(struct linux_ebus_device)); dev = dev->next; dev->next = NULL; dev->children = NULL; dev->bus = ebus; - fill_ebus_device(child, dev); + fill_ebus_device(nd, dev); } next_ebus: @@ -532,7 +622,7 @@ void __init ebus_init(void) break; cookie = pdev->sysdata; - dp = cookie->prom_node; + ebusnd = cookie->prom_node; ebus->next = ebus_alloc(sizeof(struct linux_ebus)); ebus = ebus->next; @@ -541,4 +631,8 @@ void __init ebus_init(void) ++num_ebus; } pci_dev_put(pdev); /* XXX for the case, when ebusnd is 0, is it OK? */ + +#ifdef CONFIG_SUN_AUXIO + auxio_probe(); +#endif } diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 6f28bec0a..6d0b3ed77 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -7,6 +7,7 @@ * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include @@ -21,11 +22,11 @@ #include #include #include -#include -#include #define curptr g6 +#define NR_SYSCALLS 300 /* Each OS is different... */ + .text .align 32 @@ -430,16 +431,20 @@ do_ivec: membar #Sync sethi %hi(ivector_table), %g2 - sllx %g3, 3, %g3 + sllx %g3, 5, %g3 or %g2, %lo(ivector_table), %g2 add %g2, %g3, %g3 + ldub [%g3 + 0x04], %g4 /* pil */ + mov 1, %g2 + sllx %g2, %g4, %g2 + sllx %g4, 2, %g4 TRAP_LOAD_IRQ_WORK(%g6, %g1) - lduw [%g6], %g5 /* g5 = irq_work(cpu) */ + lduw [%g6 + %g4], %g5 /* g5 = irq_work(cpu, pil) */ stw %g5, [%g3 + 0x00] /* bucket->irq_chain = g5 */ - stw %g3, [%g6] /* irq_work(cpu) = bucket */ - wr %g0, 1 << PIL_DEVICE_IRQ, %set_softint + stw %g3, [%g6 + %g4] /* irq_work(cpu, pil) = bucket */ + wr %g2, 0x0, %set_softint retry do_ivec_xcall: mov 0x50, %g1 diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index 4b2bf9eb4..149383835 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S @@ -5,6 +5,7 @@ * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz) */ +#include #include #include diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index c8e9dc9d6..31c5892f5 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S @@ -7,6 +7,7 @@ * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx) */ +#include #include #include #include @@ -551,10 +552,9 @@ setup_trap_table: save %sp, -192, %sp /* Force interrupts to be disabled. */ - rdpr %pstate, %l0 - andn %l0, PSTATE_IE, %o1 + rdpr %pstate, %o1 + andn %o1, PSTATE_IE, %o1 wrpr %o1, 0x0, %pstate - rdpr %pil, %l1 wrpr %g0, 15, %pil /* Make the firmware call to jump over to the Linux trap table. */ @@ -623,9 +623,11 @@ setup_trap_table: call init_irqwork_curcpu nop - /* Now we can restore interrupt state. */ - wrpr %l0, 0, %pstate - wrpr %l1, 0x0, %pil + /* Now we can turn interrupts back on. */ + rdpr %pstate, %o1 + or %o1, PSTATE_IE, %o1 + wrpr %o1, 0, %pstate + wrpr %g0, 0x0, %pil ret restore diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 4e64724cb..11e645c9e 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -6,6 +6,7 @@ * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) */ +#include #include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include #include @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -43,6 +42,10 @@ #include #include +#ifdef CONFIG_SMP +static void distribute_irqs(void); +#endif + /* UPA nodes send interrupt packet to UltraSparc with first data reg * value low 5 (7 on Starfire) bits holding the IRQ identifier being * delivered. We must translate this into a non-vector IRQ so we can @@ -54,29 +57,10 @@ * The IVEC handler does not need to act atomically, the PIL dispatch * code uses CAS to get an atomic snapshot of the list and clear it * at the same time. - * - * If you make changes to ino_bucket, please update hand coded assembler - * of the vectored interrupt trap handler(s) in entry.S and sun4v_ivec.S */ -struct ino_bucket { - /* Next handler in per-CPU IRQ worklist. We know that - * bucket pointers have the high 32-bits clear, so to - * save space we only store the bits we need. - */ -/*0x00*/unsigned int irq_chain; - /* Virtual interrupt number assigned to this INO. */ -/*0x04*/unsigned int virt_irq; -}; - -#define NUM_IVECS (IMAP_INR + 1) struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BYTES))); -#define __irq_ino(irq) \ - (((struct ino_bucket *)(unsigned long)(irq)) - &ivector_table[0]) -#define __bucket(irq) ((struct ino_bucket *)(unsigned long)(irq)) -#define __irq(bucket) ((unsigned int)(unsigned long)(bucket)) - /* This has to be in the main kernel image, it cannot be * turned into per-cpu data. The reason is that the main * kernel image is locked into the TLB and this structure @@ -84,82 +68,71 @@ struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BY * access to this structure takes a TLB miss it could cause * the 5-level sparc v9 trap stack to overflow. */ -#define irq_work(__cpu) &(trap_block[(__cpu)].irq_worklist) - -static unsigned int virt_to_real_irq_table[NR_IRQS]; -static unsigned char virt_irq_cur = 1; - -static unsigned char virt_irq_alloc(unsigned int real_irq) -{ - unsigned char ent; - - BUILD_BUG_ON(NR_IRQS >= 256); - - ent = virt_irq_cur; - if (ent >= NR_IRQS) { - printk(KERN_ERR "IRQ: Out of virtual IRQs.\n"); - return 0; - } - - virt_irq_cur = ent + 1; - virt_to_real_irq_table[ent] = real_irq; +struct irq_work_struct { + unsigned int irq_worklists[16]; +}; +struct irq_work_struct __irq_work[NR_CPUS]; +#define irq_work(__cpu, __pil) &(__irq_work[(__cpu)].irq_worklists[(__pil)]) - return ent; -} +static struct irqaction *irq_action[NR_IRQS+1]; -#if 0 /* Currently unused. */ -static unsigned char real_to_virt_irq(unsigned int real_irq) -{ - struct ino_bucket *bucket = __bucket(real_irq); - - return bucket->virt_irq; -} -#endif +/* This only synchronizes entities which modify IRQ handler + * state and some selected user-level spots that want to + * read things in the table. IRQ handler processing orders + * its' accesses such that no locking is needed. + */ +static DEFINE_SPINLOCK(irq_action_lock); -static unsigned int virt_to_real_irq(unsigned char virt_irq) -{ - return virt_to_real_irq_table[virt_irq]; -} +static void register_irq_proc (unsigned int irq); /* - * /proc/interrupts printing: + * Upper 2b of irqaction->flags holds the ino. + * irqaction->mask holds the smp affinity information. */ +#define put_ino_in_irqaction(action, irq) \ + action->flags &= 0xffffffffffffUL; \ + if (__bucket(irq) == &pil0_dummy_bucket) \ + action->flags |= 0xdeadUL << 48; \ + else \ + action->flags |= __irq_ino(irq) << 48; +#define get_ino_in_irqaction(action) (action->flags >> 48) + +#define put_smpaff_in_irqaction(action, smpaff) (action)->mask = (smpaff) +#define get_smpaff_in_irqaction(action) ((action)->mask) int show_interrupts(struct seq_file *p, void *v) { - int i = *(loff_t *) v, j; - struct irqaction * action; unsigned long flags; + int i = *(loff_t *) v; + struct irqaction *action; +#ifdef CONFIG_SMP + int j; +#endif - if (i == 0) { - seq_printf(p, " "); - for_each_online_cpu(j) - seq_printf(p, "CPU%d ",j); - seq_putc(p, '\n'); - } - - if (i < NR_IRQS) { - spin_lock_irqsave(&irq_desc[i].lock, flags); - action = irq_desc[i].action; - if (!action) - goto skip; - seq_printf(p, "%3d: ",i); + spin_lock_irqsave(&irq_action_lock, flags); + if (i <= NR_IRQS) { + if (!(action = *(i + irq_action))) + goto out_unlock; + seq_printf(p, "%3d: ", i); #ifndef CONFIG_SMP seq_printf(p, "%10u ", kstat_irqs(i)); #else - for_each_online_cpu(j) - seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); + for_each_online_cpu(j) { + seq_printf(p, "%10u ", + kstat_cpu(j).irqs[i]); + } #endif - seq_printf(p, " %9s", irq_desc[i].chip->typename); - seq_printf(p, " %s", action->name); - - for (action=action->next; action; action = action->next) - seq_printf(p, ", %s", action->name); - + seq_printf(p, " %s:%lx", action->name, + get_ino_in_irqaction(action)); + for (action = action->next; action; action = action->next) { + seq_printf(p, ", %s:%lx", action->name, + get_ino_in_irqaction(action)); + } seq_putc(p, '\n'); -skip: - spin_unlock_irqrestore(&irq_desc[i].lock, flags); } +out_unlock: + spin_unlock_irqrestore(&irq_action_lock, flags); + return 0; } @@ -200,371 +173,694 @@ static unsigned int sun4u_compute_tid(unsigned long imap, unsigned long cpuid) return tid; } -struct irq_handler_data { - unsigned long iclr; - unsigned long imap; +/* Now these are always passed a true fully specified sun4u INO. */ +void enable_irq(unsigned int irq) +{ + struct ino_bucket *bucket = __bucket(irq); + unsigned long imap, cpuid; - void (*pre_handler)(unsigned int, void *, void *); - void *pre_handler_arg1; - void *pre_handler_arg2; -}; + imap = bucket->imap; + if (imap == 0UL) + return; -static inline struct ino_bucket *virt_irq_to_bucket(unsigned int virt_irq) -{ - unsigned int real_irq = virt_to_real_irq(virt_irq); - struct ino_bucket *bucket = NULL; + preempt_disable(); - if (likely(real_irq)) - bucket = __bucket(real_irq); + /* This gets the physical processor ID, even on uniprocessor, + * so we can always program the interrupt target correctly. + */ + cpuid = real_hard_smp_processor_id(); + + if (tlb_type == hypervisor) { + unsigned int ino = __irq_ino(irq); + int err; + + err = sun4v_intr_settarget(ino, cpuid); + if (err != HV_EOK) + printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", + ino, cpuid, err); + err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); + if (err != HV_EOK) + printk("sun4v_intr_setenabled(%x): err(%d)\n", + ino, err); + } else { + unsigned int tid = sun4u_compute_tid(imap, cpuid); + + /* NOTE NOTE NOTE, IGN and INO are read-only, IGN is a product + * of this SYSIO's preconfigured IGN in the SYSIO Control + * Register, the hardware just mirrors that value here. + * However for Graphics and UPA Slave devices the full + * IMAP_INR field can be set by the programmer here. + * + * Things like FFB can now be handled via the new IRQ + * mechanism. + */ + upa_writel(tid | IMAP_VALID, imap); + } - return bucket; + preempt_enable(); } -#ifdef CONFIG_SMP -static int irq_choose_cpu(unsigned int virt_irq) +/* This now gets passed true ino's as well. */ +void disable_irq(unsigned int irq) { - cpumask_t mask = irq_desc[virt_irq].affinity; - int cpuid; + struct ino_bucket *bucket = __bucket(irq); + unsigned long imap; + + imap = bucket->imap; + if (imap != 0UL) { + if (tlb_type == hypervisor) { + unsigned int ino = __irq_ino(irq); + int err; + + err = sun4v_intr_setenabled(ino, HV_INTR_DISABLED); + if (err != HV_EOK) + printk("sun4v_intr_setenabled(%x): " + "err(%d)\n", ino, err); + } else { + u32 tmp; + + /* NOTE: We do not want to futz with the IRQ clear registers + * and move the state to IDLE, the SCSI code does call + * disable_irq() to assure atomicity in the queue cmd + * SCSI adapter driver code. Thus we'd lose interrupts. + */ + tmp = upa_readl(imap); + tmp &= ~IMAP_VALID; + upa_writel(tmp, imap); + } + } +} - if (cpus_equal(mask, CPU_MASK_ALL)) { - static int irq_rover; - static DEFINE_SPINLOCK(irq_rover_lock); - unsigned long flags; +/* The timer is the one "weird" interrupt which is generated by + * the CPU %tick register and not by some normal vectored interrupt + * source. To handle this special case, we use this dummy INO bucket. + */ +static struct irq_desc pil0_dummy_desc; +static struct ino_bucket pil0_dummy_bucket = { + .irq_info = &pil0_dummy_desc, +}; + +static void build_irq_error(const char *msg, unsigned int ino, int pil, int inofixup, + unsigned long iclr, unsigned long imap, + struct ino_bucket *bucket) +{ + prom_printf("IRQ: INO %04x (%d:%016lx:%016lx) --> " + "(%d:%d:%016lx:%016lx), halting...\n", + ino, bucket->pil, bucket->iclr, bucket->imap, + pil, inofixup, iclr, imap); + prom_halt(); +} - /* Round-robin distribution... */ - do_round_robin: - spin_lock_irqsave(&irq_rover_lock, flags); +unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap) +{ + struct ino_bucket *bucket; + int ino; - while (!cpu_online(irq_rover)) { - if (++irq_rover >= NR_CPUS) - irq_rover = 0; + if (pil == 0) { + if (iclr != 0UL || imap != 0UL) { + prom_printf("Invalid dummy bucket for PIL0 (%lx:%lx)\n", + iclr, imap); + prom_halt(); } - cpuid = irq_rover; - do { - if (++irq_rover >= NR_CPUS) - irq_rover = 0; - } while (!cpu_online(irq_rover)); + return __irq(&pil0_dummy_bucket); + } - spin_unlock_irqrestore(&irq_rover_lock, flags); - } else { - cpumask_t tmp; + BUG_ON(tlb_type == hypervisor); + + /* RULE: Both must be specified in all other cases. */ + if (iclr == 0UL || imap == 0UL) { + prom_printf("Invalid build_irq %d %d %016lx %016lx\n", + pil, inofixup, iclr, imap); + prom_halt(); + } + + ino = (upa_readl(imap) & (IMAP_IGN | IMAP_INO)) + inofixup; + if (ino > NUM_IVECS) { + prom_printf("Invalid INO %04x (%d:%d:%016lx:%016lx)\n", + ino, pil, inofixup, iclr, imap); + prom_halt(); + } + + bucket = &ivector_table[ino]; + if (bucket->flags & IBF_ACTIVE) + build_irq_error("IRQ: Trying to build active INO bucket.\n", + ino, pil, inofixup, iclr, imap, bucket); - cpus_and(tmp, cpu_online_map, mask); + if (bucket->irq_info) { + if (bucket->imap != imap || bucket->iclr != iclr) + build_irq_error("IRQ: Trying to reinit INO bucket.\n", + ino, pil, inofixup, iclr, imap, bucket); - if (cpus_empty(tmp)) - goto do_round_robin; + goto out; + } - cpuid = first_cpu(tmp); + bucket->irq_info = kzalloc(sizeof(struct irq_desc), GFP_ATOMIC); + if (!bucket->irq_info) { + prom_printf("IRQ: Error, kmalloc(irq_desc) failed.\n"); + prom_halt(); } - return cpuid; -} -#else -static int irq_choose_cpu(unsigned int virt_irq) -{ - return real_hard_smp_processor_id(); + /* Ok, looks good, set it up. Don't touch the irq_chain or + * the pending flag. + */ + bucket->imap = imap; + bucket->iclr = iclr; + bucket->pil = pil; + bucket->flags = 0; + +out: + return __irq(bucket); } -#endif -static void sun4u_irq_enable(unsigned int virt_irq) +unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsigned char flags) { - irq_desc_t *desc = irq_desc + virt_irq; - struct irq_handler_data *data = desc->handler_data; + struct ino_bucket *bucket; + unsigned long sysino; - if (likely(data)) { - unsigned long cpuid, imap; - unsigned int tid; + sysino = sun4v_devino_to_sysino(devhandle, devino); - cpuid = irq_choose_cpu(virt_irq); - imap = data->imap; + bucket = &ivector_table[sysino]; - tid = sun4u_compute_tid(imap, cpuid); + /* Catch accidental accesses to these things. IMAP/ICLR handling + * is done by hypervisor calls on sun4v platforms, not by direct + * register accesses. + * + * But we need to make them look unique for the disable_irq() logic + * in free_irq(). + */ + bucket->imap = ~0UL - sysino; + bucket->iclr = ~0UL - sysino; - upa_writel(tid | IMAP_VALID, imap); + bucket->pil = pil; + bucket->flags = flags; + + bucket->irq_info = kzalloc(sizeof(struct irq_desc), GFP_ATOMIC); + if (!bucket->irq_info) { + prom_printf("IRQ: Error, kmalloc(irq_desc) failed.\n"); + prom_halt(); } + + return __irq(bucket); } -static void sun4u_irq_disable(unsigned int virt_irq) +static void atomic_bucket_insert(struct ino_bucket *bucket) { - irq_desc_t *desc = irq_desc + virt_irq; - struct irq_handler_data *data = desc->handler_data; + unsigned long pstate; + unsigned int *ent; - if (likely(data)) { - unsigned long imap = data->imap; - u32 tmp = upa_readl(imap); + __asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate)); + __asm__ __volatile__("wrpr %0, %1, %%pstate" + : : "r" (pstate), "i" (PSTATE_IE)); + ent = irq_work(smp_processor_id(), bucket->pil); + bucket->irq_chain = *ent; + *ent = __irq(bucket); + __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); +} - tmp &= ~IMAP_VALID; - upa_writel(tmp, imap); +static int check_irq_sharing(int pil, unsigned long irqflags) +{ + struct irqaction *action, *tmp; + + action = *(irq_action + pil); + if (action) { + if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { + for (tmp = action; tmp->next; tmp = tmp->next) + ; + } else { + return -EBUSY; + } } + return 0; } -static void sun4u_irq_end(unsigned int virt_irq) +static void append_irq_action(int pil, struct irqaction *action) { - irq_desc_t *desc = irq_desc + virt_irq; - struct irq_handler_data *data = desc->handler_data; + struct irqaction **pp = irq_action + pil; - if (likely(data)) - upa_writel(ICLR_IDLE, data->iclr); + while (*pp) + pp = &((*pp)->next); + *pp = action; } -static void sun4v_irq_enable(unsigned int virt_irq) +static struct irqaction *get_action_slot(struct ino_bucket *bucket) { - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - unsigned int ino = bucket - &ivector_table[0]; + struct irq_desc *desc = bucket->irq_info; + int max_irq, i; - if (likely(bucket)) { - unsigned long cpuid; - int err; + max_irq = 1; + if (bucket->flags & IBF_PCI) + max_irq = MAX_IRQ_DESC_ACTION; + for (i = 0; i < max_irq; i++) { + struct irqaction *p = &desc->action[i]; + u32 mask = (1 << i); - cpuid = irq_choose_cpu(virt_irq); + if (desc->action_active_mask & mask) + continue; - err = sun4v_intr_settarget(ino, cpuid); - if (err != HV_EOK) - printk("sun4v_intr_settarget(%x,%lu): err(%d)\n", - ino, cpuid, err); - err = sun4v_intr_setenabled(ino, HV_INTR_ENABLED); - if (err != HV_EOK) - printk("sun4v_intr_setenabled(%x): err(%d)\n", - ino, err); + desc->action_active_mask |= mask; + return p; } + return NULL; } -static void sun4v_irq_disable(unsigned int virt_irq) +int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long irqflags, const char *name, void *dev_id) { - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - unsigned int ino = bucket - &ivector_table[0]; + struct irqaction *action; + struct ino_bucket *bucket = __bucket(irq); + unsigned long flags; + int pending = 0; + + if (unlikely(!handler)) + return -EINVAL; + + if (unlikely(!bucket->irq_info)) + return -ENODEV; + + if ((bucket != &pil0_dummy_bucket) && (irqflags & SA_SAMPLE_RANDOM)) { + /* + * This function might sleep, we want to call it first, + * outside of the atomic block. In SA_STATIC_ALLOC case, + * random driver's kmalloc will fail, but it is safe. + * If already initialized, random driver will not reinit. + * Yes, this might clear the entropy pool if the wrong + * driver is attempted to be loaded, without actually + * installing a new handler, but is this really a problem, + * only the sysadmin is able to do this. + */ + rand_initialize_irq(irq); + } - if (likely(bucket)) { - int err; + spin_lock_irqsave(&irq_action_lock, flags); - err = sun4v_intr_setenabled(ino, HV_INTR_DISABLED); - if (err != HV_EOK) - printk("sun4v_intr_setenabled(%x): " - "err(%d)\n", ino, err); + if (check_irq_sharing(bucket->pil, irqflags)) { + spin_unlock_irqrestore(&irq_action_lock, flags); + return -EBUSY; } -} -static void sun4v_irq_end(unsigned int virt_irq) -{ - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - unsigned int ino = bucket - &ivector_table[0]; + action = get_action_slot(bucket); + if (!action) { + spin_unlock_irqrestore(&irq_action_lock, flags); + return -ENOMEM; + } - if (likely(bucket)) { - int err; + bucket->flags |= IBF_ACTIVE; + pending = 0; + if (bucket != &pil0_dummy_bucket) { + pending = bucket->pending; + if (pending) + bucket->pending = 0; + } - err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); - if (err != HV_EOK) - printk("sun4v_intr_setstate(%x): " - "err(%d)\n", ino, err); + action->handler = handler; + action->flags = irqflags; + action->name = name; + action->next = NULL; + action->dev_id = dev_id; + put_ino_in_irqaction(action, irq); + put_smpaff_in_irqaction(action, CPU_MASK_NONE); + + append_irq_action(bucket->pil, action); + + enable_irq(irq); + + /* We ate the IVEC already, this makes sure it does not get lost. */ + if (pending) { + atomic_bucket_insert(bucket); + set_softint(1 << bucket->pil); } + + spin_unlock_irqrestore(&irq_action_lock, flags); + + if (bucket != &pil0_dummy_bucket) + register_irq_proc(__irq_ino(irq)); + +#ifdef CONFIG_SMP + distribute_irqs(); +#endif + return 0; } -static void run_pre_handler(unsigned int virt_irq) +EXPORT_SYMBOL(request_irq); + +static struct irqaction *unlink_irq_action(unsigned int irq, void *dev_id) { - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - irq_desc_t *desc = irq_desc + virt_irq; - struct irq_handler_data *data = desc->handler_data; + struct ino_bucket *bucket = __bucket(irq); + struct irqaction *action, **pp; - if (likely(data->pre_handler)) { - data->pre_handler(__irq_ino(__irq(bucket)), - data->pre_handler_arg1, - data->pre_handler_arg2); - } -} + pp = irq_action + bucket->pil; + action = *pp; + if (unlikely(!action)) + return NULL; -static struct hw_interrupt_type sun4u_irq = { - .typename = "sun4u", - .enable = sun4u_irq_enable, - .disable = sun4u_irq_disable, - .end = sun4u_irq_end, -}; + if (unlikely(!action->handler)) { + printk("Freeing free IRQ %d\n", bucket->pil); + return NULL; + } -static struct hw_interrupt_type sun4u_irq_ack = { - .typename = "sun4u+ack", - .enable = sun4u_irq_enable, - .disable = sun4u_irq_disable, - .ack = run_pre_handler, - .end = sun4u_irq_end, -}; + while (action && action->dev_id != dev_id) { + pp = &action->next; + action = *pp; + } -static struct hw_interrupt_type sun4v_irq = { - .typename = "sun4v", - .enable = sun4v_irq_enable, - .disable = sun4v_irq_disable, - .end = sun4v_irq_end, -}; + if (likely(action)) + *pp = action->next; -static struct hw_interrupt_type sun4v_irq_ack = { - .typename = "sun4v+ack", - .enable = sun4v_irq_enable, - .disable = sun4v_irq_disable, - .ack = run_pre_handler, - .end = sun4v_irq_end, -}; + return action; +} -void irq_install_pre_handler(int virt_irq, - void (*func)(unsigned int, void *, void *), - void *arg1, void *arg2) +void free_irq(unsigned int irq, void *dev_id) { - irq_desc_t *desc = irq_desc + virt_irq; - struct irq_handler_data *data = desc->handler_data; + struct irqaction *action; + struct ino_bucket *bucket; + unsigned long flags; + + spin_lock_irqsave(&irq_action_lock, flags); - data->pre_handler = func; - data->pre_handler_arg1 = arg1; - data->pre_handler_arg2 = arg2; + action = unlink_irq_action(irq, dev_id); - if (desc->chip == &sun4u_irq_ack || - desc->chip == &sun4v_irq_ack) + spin_unlock_irqrestore(&irq_action_lock, flags); + + if (unlikely(!action)) return; - desc->chip = (desc->chip == &sun4u_irq ? - &sun4u_irq_ack : &sun4v_irq_ack); + synchronize_irq(irq); + + spin_lock_irqsave(&irq_action_lock, flags); + + bucket = __bucket(irq); + if (bucket != &pil0_dummy_bucket) { + struct irq_desc *desc = bucket->irq_info; + int ent, i; + + for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { + struct irqaction *p = &desc->action[i]; + + if (p == action) { + desc->action_active_mask &= ~(1 << i); + break; + } + } + + if (!desc->action_active_mask) { + unsigned long imap = bucket->imap; + + /* This unique interrupt source is now inactive. */ + bucket->flags &= ~IBF_ACTIVE; + + /* See if any other buckets share this bucket's IMAP + * and are still active. + */ + for (ent = 0; ent < NUM_IVECS; ent++) { + struct ino_bucket *bp = &ivector_table[ent]; + if (bp != bucket && + bp->imap == imap && + (bp->flags & IBF_ACTIVE) != 0) + break; + } + + /* Only disable when no other sub-irq levels of + * the same IMAP are active. + */ + if (ent == NUM_IVECS) + disable_irq(irq); + } + } + + spin_unlock_irqrestore(&irq_action_lock, flags); } -unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) +EXPORT_SYMBOL(free_irq); + +#ifdef CONFIG_SMP +void synchronize_irq(unsigned int irq) { - struct ino_bucket *bucket; - struct irq_handler_data *data; - irq_desc_t *desc; - int ino; + struct ino_bucket *bucket = __bucket(irq); + +#if 0 + /* The following is how I wish I could implement this. + * Unfortunately the ICLR registers are read-only, you can + * only write ICLR_foo values to them. To get the current + * IRQ status you would need to get at the IRQ diag registers + * in the PCI/SBUS controller and the layout of those vary + * from one controller to the next, sigh... -DaveM + */ + unsigned long iclr = bucket->iclr; + + while (1) { + u32 tmp = upa_readl(iclr); + + if (tmp == ICLR_TRANSMIT || + tmp == ICLR_PENDING) { + cpu_relax(); + continue; + } + break; + } +#else + /* So we have to do this with a INPROGRESS bit just like x86. */ + while (bucket->flags & IBF_INPROGRESS) + cpu_relax(); +#endif +} +#endif /* CONFIG_SMP */ - BUG_ON(tlb_type == hypervisor); +static void process_bucket(int irq, struct ino_bucket *bp, struct pt_regs *regs) +{ + struct irq_desc *desc = bp->irq_info; + unsigned char flags = bp->flags; + u32 action_mask, i; + int random; - ino = (upa_readl(imap) & (IMAP_IGN | IMAP_INO)) + inofixup; - bucket = &ivector_table[ino]; - if (!bucket->virt_irq) { - bucket->virt_irq = virt_irq_alloc(__irq(bucket)); - irq_desc[bucket->virt_irq].chip = &sun4u_irq; - } + bp->flags |= IBF_INPROGRESS; - desc = irq_desc + bucket->virt_irq; - if (unlikely(desc->handler_data)) + if (unlikely(!(flags & IBF_ACTIVE))) { + bp->pending = 1; goto out; - - data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); - if (unlikely(!data)) { - prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); - prom_halt(); } - desc->handler_data = data; - data->imap = imap; - data->iclr = iclr; + if (desc->pre_handler) + desc->pre_handler(bp, + desc->pre_handler_arg1, + desc->pre_handler_arg2); + + action_mask = desc->action_active_mask; + random = 0; + for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { + struct irqaction *p = &desc->action[i]; + u32 mask = (1 << i); + + if (!(action_mask & mask)) + continue; + + action_mask &= ~mask; + + if (p->handler(__irq(bp), p->dev_id, regs) == IRQ_HANDLED) + random |= p->flags; + + if (!action_mask) + break; + } + if (bp->pil != 0) { + if (tlb_type == hypervisor) { + unsigned int ino = __irq_ino(bp); + int err; + + err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); + if (err != HV_EOK) + printk("sun4v_intr_setstate(%x): " + "err(%d)\n", ino, err); + } else { + upa_writel(ICLR_IDLE, bp->iclr); + } + /* Test and add entropy */ + if (random & SA_SAMPLE_RANDOM) + add_interrupt_randomness(irq); + } out: - return bucket->virt_irq; + bp->flags &= ~IBF_INPROGRESS; } -unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) +void handler_irq(int irq, struct pt_regs *regs) { - struct ino_bucket *bucket; - struct irq_handler_data *data; - unsigned long sysino; - irq_desc_t *desc; + struct ino_bucket *bp; + int cpu = smp_processor_id(); - BUG_ON(tlb_type != hypervisor); +#ifndef CONFIG_SMP + /* + * Check for TICK_INT on level 14 softint. + */ + { + unsigned long clr_mask = 1 << irq; + unsigned long tick_mask = tick_ops->softint_mask; - sysino = sun4v_devino_to_sysino(devhandle, devino); - bucket = &ivector_table[sysino]; - if (!bucket->virt_irq) { - bucket->virt_irq = virt_irq_alloc(__irq(bucket)); - irq_desc[bucket->virt_irq].chip = &sun4v_irq; + if ((irq == 14) && (get_softint() & tick_mask)) { + irq = 0; + clr_mask = tick_mask; + } + clear_softint(clr_mask); } +#else + clear_softint(1 << irq); +#endif - desc = irq_desc + bucket->virt_irq; - if (unlikely(desc->handler_data)) - goto out; + irq_enter(); + kstat_this_cpu.irqs[irq]++; - data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); - if (unlikely(!data)) { - prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); - prom_halt(); + /* Sliiiick... */ +#ifndef CONFIG_SMP + bp = ((irq != 0) ? + __bucket(xchg32(irq_work(cpu, irq), 0)) : + &pil0_dummy_bucket); +#else + bp = __bucket(xchg32(irq_work(cpu, irq), 0)); +#endif + while (bp) { + struct ino_bucket *nbp = __bucket(bp->irq_chain); + + bp->irq_chain = 0; + process_bucket(irq, bp, regs); + bp = nbp; } - desc->handler_data = data; + irq_exit(); +} - /* Catch accidental accesses to these things. IMAP/ICLR handling - * is done by hypervisor calls on sun4v platforms, not by direct - * register accesses. - */ - data->imap = ~0UL; - data->iclr = ~0UL; +#ifdef CONFIG_BLK_DEV_FD +extern irqreturn_t floppy_interrupt(int, void *, struct pt_regs *); -out: - return bucket->virt_irq; -} +/* XXX No easy way to include asm/floppy.h XXX */ +extern unsigned char *pdma_vaddr; +extern unsigned long pdma_size; +extern volatile int doing_pdma; +extern unsigned long fdc_status; -void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq) +irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs) { - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - unsigned long pstate; - unsigned int *ent; + if (likely(doing_pdma)) { + void __iomem *stat = (void __iomem *) fdc_status; + unsigned char *vaddr = pdma_vaddr; + unsigned long size = pdma_size; + u8 val; + + while (size) { + val = readb(stat); + if (unlikely(!(val & 0x80))) { + pdma_vaddr = vaddr; + pdma_size = size; + return IRQ_HANDLED; + } + if (unlikely(!(val & 0x20))) { + pdma_vaddr = vaddr; + pdma_size = size; + doing_pdma = 0; + goto main_interrupt; + } + if (val & 0x40) { + /* read */ + *vaddr++ = readb(stat + 1); + } else { + unsigned char data = *vaddr++; - __asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate)); - __asm__ __volatile__("wrpr %0, %1, %%pstate" - : : "r" (pstate), "i" (PSTATE_IE)); - ent = irq_work(smp_processor_id()); - bucket->irq_chain = *ent; - *ent = __irq(bucket); - set_softint(1 << PIL_DEVICE_IRQ); - __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); + /* write */ + writeb(data, stat + 1); + } + size--; + } + + pdma_vaddr = vaddr; + pdma_size = size; + + /* Send Terminal Count pulse to floppy controller. */ + val = readb(auxio_register); + val |= AUXIO_AUX1_FTCNT; + writeb(val, auxio_register); + val &= ~AUXIO_AUX1_FTCNT; + writeb(val, auxio_register); + + doing_pdma = 0; + } + +main_interrupt: + return floppy_interrupt(irq, dev_cookie, regs); } +EXPORT_SYMBOL(sparc_floppy_irq); +#endif -void ack_bad_irq(unsigned int virt_irq) +/* We really don't need these at all on the Sparc. We only have + * stubs here because they are exported to modules. + */ +unsigned long probe_irq_on(void) { - struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); - unsigned int ino = 0xdeadbeef; + return 0; +} - if (bucket) - ino = bucket - &ivector_table[0]; +EXPORT_SYMBOL(probe_irq_on); - printk(KERN_CRIT "Unexpected IRQ from ino[%x] virt_irq[%u]\n", - ino, virt_irq); +int probe_irq_off(unsigned long mask) +{ + return 0; } -#ifndef CONFIG_SMP -extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *); +EXPORT_SYMBOL(probe_irq_off); -void timer_irq(int irq, struct pt_regs *regs) +#ifdef CONFIG_SMP +static int retarget_one_irq(struct irqaction *p, int goal_cpu) { - unsigned long clr_mask = 1 << irq; - unsigned long tick_mask = tick_ops->softint_mask; + struct ino_bucket *bucket = get_ino_in_irqaction(p) + ivector_table; - if (get_softint() & tick_mask) { - irq = 0; - clr_mask = tick_mask; + while (!cpu_online(goal_cpu)) { + if (++goal_cpu >= NR_CPUS) + goal_cpu = 0; } - clear_softint(clr_mask); - irq_enter(); + if (tlb_type == hypervisor) { + unsigned int ino = __irq_ino(bucket); - kstat_this_cpu.irqs[0]++; - timer_interrupt(irq, NULL, regs); + sun4v_intr_settarget(ino, goal_cpu); + sun4v_intr_setenabled(ino, HV_INTR_ENABLED); + } else { + unsigned long imap = bucket->imap; + unsigned int tid = sun4u_compute_tid(imap, goal_cpu); - irq_exit(); + upa_writel(tid | IMAP_VALID, imap); + } + + do { + if (++goal_cpu >= NR_CPUS) + goal_cpu = 0; + } while (!cpu_online(goal_cpu)); + + return goal_cpu; } -#endif -void handler_irq(int irq, struct pt_regs *regs) +/* Called from request_irq. */ +static void distribute_irqs(void) { - struct ino_bucket *bucket; + unsigned long flags; + int cpu, level; - clear_softint(1 << irq); + spin_lock_irqsave(&irq_action_lock, flags); + cpu = 0; - irq_enter(); - - /* Sliiiick... */ - bucket = __bucket(xchg32(irq_work(smp_processor_id()), 0)); - while (bucket) { - struct ino_bucket *next = __bucket(bucket->irq_chain); + /* + * Skip the timer at [0], and very rare error/power intrs at [15]. + * Also level [12], it causes problems on Ex000 systems. + */ + for (level = 1; level < NR_IRQS; level++) { + struct irqaction *p = irq_action[level]; - bucket->irq_chain = 0; - __do_IRQ(bucket->virt_irq, regs); + if (level == 12) + continue; - bucket = next; + while(p) { + cpu = retarget_one_irq(p, cpu); + p = p->next; + } } - - irq_exit(); + spin_unlock_irqrestore(&irq_action_lock, flags); } +#endif struct sun5_timer { u64 count0; @@ -578,29 +874,23 @@ static u64 prom_limit0, prom_limit1; static void map_prom_timers(void) { - struct device_node *dp; - unsigned int *addr; + unsigned int addr[3]; + int tnode, err; /* PROM timer node hangs out in the top level of device siblings... */ - dp = of_find_node_by_path("/"); - dp = dp->child; - while (dp) { - if (!strcmp(dp->name, "counter-timer")) - break; - dp = dp->sibling; - } + tnode = prom_finddevice("/counter-timer"); /* Assume if node is not present, PROM uses different tick mechanism * which we should not care about. */ - if (!dp) { + if (tnode == 0 || tnode == -1) { prom_timers = (struct sun5_timer *) 0; return; } /* If PROM is really using this, it must be mapped by him. */ - addr = of_get_property(dp, "address", NULL); - if (!addr) { + err = prom_getproperty(tnode, "address", (char *)addr, sizeof(addr)); + if (err == -1) { prom_printf("PROM does not have timer mapped, trying to continue.\n"); prom_timers = (struct sun5_timer *) 0; return; @@ -639,7 +929,7 @@ void init_irqwork_curcpu(void) { int cpu = hard_smp_processor_id(); - trap_block[cpu].irq_worklist = 0; + memset(__irq_work + cpu, 0, sizeof(struct irq_work_struct)); } static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type) @@ -747,10 +1037,6 @@ void __cpuinit sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int } } -static struct irqaction timer_irq_action = { - .name = "timer", -}; - /* Only invoked on boot processor. */ void __init init_IRQ(void) { @@ -778,6 +1064,109 @@ void __init init_IRQ(void) : /* No outputs */ : "i" (PSTATE_IE) : "g1"); +} + +static struct proc_dir_entry * root_irq_dir; +static struct proc_dir_entry * irq_dir [NUM_IVECS]; + +#ifdef CONFIG_SMP + +static int irq_affinity_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + struct ino_bucket *bp = ivector_table + (long)data; + struct irq_desc *desc = bp->irq_info; + struct irqaction *ap = desc->action; + cpumask_t mask; + int len; + + mask = get_smpaff_in_irqaction(ap); + if (cpus_empty(mask)) + mask = cpu_online_map; + + len = cpumask_scnprintf(page, count, mask); + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; +} + +static inline void set_intr_affinity(int irq, cpumask_t hw_aff) +{ + struct ino_bucket *bp = ivector_table + irq; + struct irq_desc *desc = bp->irq_info; + struct irqaction *ap = desc->action; + + /* Users specify affinity in terms of hw cpu ids. + * As soon as we do this, handler_irq() might see and take action. + */ + put_smpaff_in_irqaction(ap, hw_aff); + + /* Migration is simply done by the next cpu to service this + * interrupt. + */ +} + +static int irq_affinity_write_proc (struct file *file, const char __user *buffer, + unsigned long count, void *data) +{ + int irq = (long) data, full_count = count, err; + cpumask_t new_value; + + err = cpumask_parse(buffer, count, new_value); + + /* + * Do not allow disabling IRQs completely - it's a too easy + * way to make the system unusable accidentally :-) At least + * one online CPU still has to be targeted. + */ + cpus_and(new_value, new_value, cpu_online_map); + if (cpus_empty(new_value)) + return -EINVAL; + + set_intr_affinity(irq, new_value); - irq_desc[0].action = &timer_irq_action; + return full_count; } + +#endif + +#define MAX_NAMELEN 10 + +static void register_irq_proc (unsigned int irq) +{ + char name [MAX_NAMELEN]; + + if (!root_irq_dir || irq_dir[irq]) + return; + + memset(name, 0, MAX_NAMELEN); + sprintf(name, "%x", irq); + + /* create /proc/irq/1234 */ + irq_dir[irq] = proc_mkdir(name, root_irq_dir); + +#ifdef CONFIG_SMP + /* XXX SMP affinity not supported on starfire yet. */ + if (this_is_starfire == 0) { + struct proc_dir_entry *entry; + + /* create /proc/irq/1234/smp_affinity */ + entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); + + if (entry) { + entry->nlink = 1; + entry->data = (void *)(long)irq; + entry->read_proc = irq_affinity_read_proc; + entry->write_proc = irq_affinity_write_proc; + } + } +#endif +} + +void init_irq_proc (void) +{ + /* create /proc/irq */ + root_irq_dir = proc_mkdir("irq", NULL); +} + diff --git a/arch/sparc64/kernel/isa.c b/arch/sparc64/kernel/isa.c index 0f3aec72e..30862abee 100644 --- a/arch/sparc64/kernel/isa.c +++ b/arch/sparc64/kernel/isa.c @@ -3,8 +3,6 @@ #include #include #include -#include -#include #include struct sparc_isa_bridge *isa_chain; @@ -17,19 +15,23 @@ static void __init fatal_err(const char *reason) static void __init report_dev(struct sparc_isa_device *isa_dev, int child) { if (child) - printk(" (%s)", isa_dev->prom_node->name); + printk(" (%s)", isa_dev->prom_name); else - printk(" [%s", isa_dev->prom_node->name); + printk(" [%s", isa_dev->prom_name); } -static struct linux_prom_registers * __init -isa_dev_get_resource(struct sparc_isa_device *isa_dev) +static void __init isa_dev_get_resource(struct sparc_isa_device *isa_dev, + struct linux_prom_registers *pregs, + int pregs_size) { - struct linux_prom_registers *pregs; unsigned long base, len; int prop_len; - pregs = of_get_property(isa_dev->prom_node, "reg", &prop_len); + prop_len = prom_getproperty(isa_dev->prom_node, "reg", + (char *) pregs, pregs_size); + + if (prop_len <= 0) + return; /* Only the first one is interesting. */ len = pregs[0].reg_size; @@ -40,37 +42,115 @@ isa_dev_get_resource(struct sparc_isa_device *isa_dev) isa_dev->resource.start = base; isa_dev->resource.end = (base + len - 1UL); isa_dev->resource.flags = IORESOURCE_IO; - isa_dev->resource.name = isa_dev->prom_node->name; + isa_dev->resource.name = isa_dev->prom_name; request_resource(&isa_dev->bus->parent->io_space, &isa_dev->resource); +} - return pregs; +/* I can't believe they didn't put a real INO in the isa device + * interrupts property. The whole point of the OBP properties + * is to shield the kernel from IRQ routing details. + * + * The P1275 standard for ISA devices seems to also have been + * totally ignored. + * + * On later systems, an interrupt-map and interrupt-map-mask scheme + * akin to EBUS is used. + */ +static struct { + int obp_irq; + int pci_ino; +} grover_irq_table[] = { + { 1, 0x00 }, /* dma, unknown ino at this point */ + { 2, 0x27 }, /* floppy */ + { 3, 0x22 }, /* parallel */ + { 4, 0x2b }, /* serial */ + { 5, 0x25 }, /* acpi power management */ + + { 0, 0x00 } /* end of table */ +}; + +static int __init isa_dev_get_irq_using_imap(struct sparc_isa_device *isa_dev, + struct sparc_isa_bridge *isa_br, + int *interrupt, + struct linux_prom_registers *pregs) +{ + unsigned int hi, lo, irq; + int i; + + hi = pregs->which_io & isa_br->isa_intmask.phys_hi; + lo = pregs->phys_addr & isa_br->isa_intmask.phys_lo; + irq = *interrupt & isa_br->isa_intmask.interrupt; + for (i = 0; i < isa_br->num_isa_intmap; i++) { + if ((isa_br->isa_intmap[i].phys_hi == hi) && + (isa_br->isa_intmap[i].phys_lo == lo) && + (isa_br->isa_intmap[i].interrupt == irq)) { + *interrupt = isa_br->isa_intmap[i].cinterrupt; + return 0; + } + } + return -1; } static void __init isa_dev_get_irq(struct sparc_isa_device *isa_dev, struct linux_prom_registers *pregs) { - struct of_device *op = of_find_device_by_node(isa_dev->prom_node); + int irq_prop; - if (!op || !op->num_irqs) { - isa_dev->irq = PCI_IRQ_NONE; + irq_prop = prom_getintdefault(isa_dev->prom_node, + "interrupts", -1); + if (irq_prop <= 0) { + goto no_irq; } else { - isa_dev->irq = op->irqs[0]; + struct pci_controller_info *pcic; + struct pci_pbm_info *pbm; + int i; + + if (isa_dev->bus->num_isa_intmap) { + if (!isa_dev_get_irq_using_imap(isa_dev, + isa_dev->bus, + &irq_prop, + pregs)) + goto route_irq; + } + + for (i = 0; grover_irq_table[i].obp_irq != 0; i++) { + if (grover_irq_table[i].obp_irq == irq_prop) { + int ino = grover_irq_table[i].pci_ino; + + if (ino == 0) + goto no_irq; + + irq_prop = ino; + goto route_irq; + } + } + goto no_irq; + +route_irq: + pbm = isa_dev->bus->parent; + pcic = pbm->parent; + isa_dev->irq = pcic->irq_build(pbm, NULL, irq_prop); + return; } + +no_irq: + isa_dev->irq = PCI_IRQ_NONE; } static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) { - struct device_node *dp = parent_isa_dev->prom_node->child; + int node = prom_getchild(parent_isa_dev->prom_node); - if (!dp) + if (node == 0) return; printk(" ->"); - while (dp) { - struct linux_prom_registers *regs; + while (node != 0) { + struct linux_prom_registers regs[PROMREG_MAX]; struct sparc_isa_device *isa_dev; + int prop_len; isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); if (!isa_dev) { @@ -85,46 +165,49 @@ static void __init isa_fill_children(struct sparc_isa_device *parent_isa_dev) parent_isa_dev->child = isa_dev; isa_dev->bus = parent_isa_dev->bus; - isa_dev->prom_node = dp; + isa_dev->prom_node = node; + prop_len = prom_getproperty(node, "name", + (char *) isa_dev->prom_name, + sizeof(isa_dev->prom_name)); + if (prop_len <= 0) { + fatal_err("cannot get child isa_dev OBP node name"); + prom_halt(); + } + + prop_len = prom_getproperty(node, "compatible", + (char *) isa_dev->compatible, + sizeof(isa_dev->compatible)); + + /* Not having this is OK. */ + if (prop_len <= 0) + isa_dev->compatible[0] = '\0'; - regs = isa_dev_get_resource(isa_dev); + isa_dev_get_resource(isa_dev, regs, sizeof(regs)); isa_dev_get_irq(isa_dev, regs); report_dev(isa_dev, 1); - dp = dp->sibling; + node = prom_getsibling(node); } } static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) { - struct device_node *dp = isa_br->prom_node->child; + int node = prom_getchild(isa_br->prom_node); - while (dp) { - struct linux_prom_registers *regs; + while (node != 0) { + struct linux_prom_registers regs[PROMREG_MAX]; struct sparc_isa_device *isa_dev; + int prop_len; isa_dev = kmalloc(sizeof(*isa_dev), GFP_KERNEL); if (!isa_dev) { - printk(KERN_DEBUG "ISA: cannot allocate isa_dev"); - return; + fatal_err("cannot allocate isa_dev"); + prom_halt(); } memset(isa_dev, 0, sizeof(*isa_dev)); - isa_dev->ofdev.node = dp; - isa_dev->ofdev.dev.parent = &isa_br->ofdev.dev; - isa_dev->ofdev.dev.bus = &isa_bus_type; - strcpy(isa_dev->ofdev.dev.bus_id, dp->path_component_name); - - /* Register with core */ - if (of_device_register(&isa_dev->ofdev) != 0) { - printk(KERN_DEBUG "isa: device registration error for %s!\n", - isa_dev->ofdev.dev.bus_id); - kfree(isa_dev); - goto next_sibling; - } - /* Link it in. */ isa_dev->next = NULL; if (isa_br->devices == NULL) { @@ -139,9 +222,24 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) } isa_dev->bus = isa_br; - isa_dev->prom_node = dp; + isa_dev->prom_node = node; + prop_len = prom_getproperty(node, "name", + (char *) isa_dev->prom_name, + sizeof(isa_dev->prom_name)); + if (prop_len <= 0) { + fatal_err("cannot get isa_dev OBP node name"); + prom_halt(); + } + + prop_len = prom_getproperty(node, "compatible", + (char *) isa_dev->compatible, + sizeof(isa_dev->compatible)); + + /* Not having this is OK. */ + if (prop_len <= 0) + isa_dev->compatible[0] = '\0'; - regs = isa_dev_get_resource(isa_dev); + isa_dev_get_resource(isa_dev, regs, sizeof(regs)); isa_dev_get_irq(isa_dev, regs); report_dev(isa_dev, 0); @@ -150,8 +248,7 @@ static void __init isa_fill_devices(struct sparc_isa_bridge *isa_br) printk("]"); - next_sibling: - dp = dp->sibling; + node = prom_getsibling(node); } } @@ -169,7 +266,7 @@ void __init isa_init(void) struct pcidev_cookie *pdev_cookie; struct pci_pbm_info *pbm; struct sparc_isa_bridge *isa_br; - struct device_node *dp; + int prop_len; pdev_cookie = pdev->sysdata; if (!pdev_cookie) { @@ -178,29 +275,15 @@ void __init isa_init(void) continue; } pbm = pdev_cookie->pbm; - dp = pdev_cookie->prom_node; isa_br = kmalloc(sizeof(*isa_br), GFP_KERNEL); if (!isa_br) { - printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge"); - return; + fatal_err("cannot allocate sparc_isa_bridge"); + prom_halt(); } memset(isa_br, 0, sizeof(*isa_br)); - isa_br->ofdev.node = dp; - isa_br->ofdev.dev.parent = &pdev->dev; - isa_br->ofdev.dev.bus = &isa_bus_type; - strcpy(isa_br->ofdev.dev.bus_id, dp->path_component_name); - - /* Register with core */ - if (of_device_register(&isa_br->ofdev) != 0) { - printk(KERN_DEBUG "isa: device registration error for %s!\n", - isa_br->ofdev.dev.bus_id); - kfree(isa_br); - return; - } - /* Link it in. */ isa_br->next = isa_chain; isa_chain = isa_br; @@ -209,6 +292,33 @@ void __init isa_init(void) isa_br->self = pdev; isa_br->index = index++; isa_br->prom_node = pdev_cookie->prom_node; + strncpy(isa_br->prom_name, pdev_cookie->prom_name, + sizeof(isa_br->prom_name)); + + prop_len = prom_getproperty(isa_br->prom_node, + "ranges", + (char *) isa_br->isa_ranges, + sizeof(isa_br->isa_ranges)); + if (prop_len <= 0) + isa_br->num_isa_ranges = 0; + else + isa_br->num_isa_ranges = + (prop_len / sizeof(struct linux_prom_isa_ranges)); + + prop_len = prom_getproperty(isa_br->prom_node, + "interrupt-map", + (char *) isa_br->isa_intmap, + sizeof(isa_br->isa_intmap)); + if (prop_len <= 0) + isa_br->num_isa_intmap = 0; + else + isa_br->num_isa_intmap = + (prop_len / sizeof(struct linux_prom_isa_intmap)); + + prop_len = prom_getproperty(isa_br->prom_node, + "interrupt-map-mask", + (char *) &(isa_br->isa_intmask), + sizeof(isa_br->isa_intmask)); printk("isa%d:", isa_br->index); diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index 8e75ed762..2e1c824c1 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c @@ -3,6 +3,7 @@ * Copyright (C) 2004 David S. Miller */ +#include #include #include #include diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S index e492db845..31da1e564 100644 --- a/arch/sparc64/kernel/ktlb.S +++ b/arch/sparc64/kernel/ktlb.S @@ -6,6 +6,7 @@ * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c deleted file mode 100644 index 8c7c5004d..000000000 --- a/arch/sparc64/kernel/of_device.c +++ /dev/null @@ -1,1032 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include -#include - -/** - * of_match_device - Tell if an of_device structure has a matching - * of_match structure - * @ids: array of of device match structures to search in - * @dev: the of device structure to match against - * - * Used by a driver to check whether an of_device present in the - * system is in its list of supported devices. - */ -const struct of_device_id *of_match_device(const struct of_device_id *matches, - const struct of_device *dev) -{ - if (!dev->node) - return NULL; - while (matches->name[0] || matches->type[0] || matches->compatible[0]) { - int match = 1; - if (matches->name[0]) - match &= dev->node->name - && !strcmp(matches->name, dev->node->name); - if (matches->type[0]) - match &= dev->node->type - && !strcmp(matches->type, dev->node->type); - if (matches->compatible[0]) - match &= of_device_is_compatible(dev->node, - matches->compatible); - if (match) - return matches; - matches++; - } - return NULL; -} - -static int of_platform_bus_match(struct device *dev, struct device_driver *drv) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * of_drv = to_of_platform_driver(drv); - const struct of_device_id * matches = of_drv->match_table; - - if (!matches) - return 0; - - return of_match_device(matches, of_dev) != NULL; -} - -struct of_device *of_dev_get(struct of_device *dev) -{ - struct device *tmp; - - if (!dev) - return NULL; - tmp = get_device(&dev->dev); - if (tmp) - return to_of_device(tmp); - else - return NULL; -} - -void of_dev_put(struct of_device *dev) -{ - if (dev) - put_device(&dev->dev); -} - - -static int of_device_probe(struct device *dev) -{ - int error = -ENODEV; - struct of_platform_driver *drv; - struct of_device *of_dev; - const struct of_device_id *match; - - drv = to_of_platform_driver(dev->driver); - of_dev = to_of_device(dev); - - if (!drv->probe) - return error; - - of_dev_get(of_dev); - - match = of_match_device(drv->match_table, of_dev); - if (match) - error = drv->probe(of_dev, match); - if (error) - of_dev_put(of_dev); - - return error; -} - -static int of_device_remove(struct device *dev) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - - if (dev->driver && drv->remove) - drv->remove(of_dev); - return 0; -} - -static int of_device_suspend(struct device *dev, pm_message_t state) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - int error = 0; - - if (dev->driver && drv->suspend) - error = drv->suspend(of_dev, state); - return error; -} - -static int of_device_resume(struct device * dev) -{ - struct of_device * of_dev = to_of_device(dev); - struct of_platform_driver * drv = to_of_platform_driver(dev->driver); - int error = 0; - - if (dev->driver && drv->resume) - error = drv->resume(of_dev); - return error; -} - -void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name) -{ - unsigned long ret = res->start + offset; - - if (!request_region(ret, size, name)) - ret = 0; - - return (void __iomem *) ret; -} -EXPORT_SYMBOL(of_ioremap); - -void of_iounmap(void __iomem *base, unsigned long size) -{ - release_region((unsigned long) base, size); -} -EXPORT_SYMBOL(of_iounmap); - -static int node_match(struct device *dev, void *data) -{ - struct of_device *op = to_of_device(dev); - struct device_node *dp = data; - - return (op->node == dp); -} - -struct of_device *of_find_device_by_node(struct device_node *dp) -{ - struct device *dev = bus_find_device(&of_bus_type, NULL, - dp, node_match); - - if (dev) - return to_of_device(dev); - - return NULL; -} -EXPORT_SYMBOL(of_find_device_by_node); - -#ifdef CONFIG_PCI -struct bus_type isa_bus_type = { - .name = "isa", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(isa_bus_type); - -struct bus_type ebus_bus_type = { - .name = "ebus", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(ebus_bus_type); -#endif - -#ifdef CONFIG_SBUS -struct bus_type sbus_bus_type = { - .name = "sbus", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(sbus_bus_type); -#endif - -struct bus_type of_bus_type = { - .name = "of", - .match = of_platform_bus_match, - .probe = of_device_probe, - .remove = of_device_remove, - .suspend = of_device_suspend, - .resume = of_device_resume, -}; -EXPORT_SYMBOL(of_bus_type); - -static inline u64 of_read_addr(const u32 *cell, int size) -{ - u64 r = 0; - while (size--) - r = (r << 32) | *(cell++); - return r; -} - -static void __init get_cells(struct device_node *dp, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = of_n_addr_cells(dp); - if (sizec) - *sizec = of_n_size_cells(dp); -} - -/* Max address size we deal with */ -#define OF_MAX_ADDR_CELLS 4 - -struct of_bus { - const char *name; - const char *addr_prop_name; - int (*match)(struct device_node *parent); - void (*count_cells)(struct device_node *child, - int *addrc, int *sizec); - int (*map)(u32 *addr, const u32 *range, - int na, int ns, int pna); - unsigned int (*get_flags)(u32 *addr); -}; - -/* - * Default translator (generic bus) - */ - -static void of_bus_default_count_cells(struct device_node *dev, - int *addrc, int *sizec) -{ - get_cells(dev, addrc, sizec); -} - -/* Make sure the least significant 64-bits are in-range. Even - * for 3 or 4 cell values it is a good enough approximation. - */ -static int of_out_of_range(const u32 *addr, const u32 *base, - const u32 *size, int na, int ns) -{ - u64 a = of_read_addr(addr, na); - u64 b = of_read_addr(base, na); - - if (a < b) - return 1; - - b += of_read_addr(size, ns); - if (a >= b) - return 1; - - return 0; -} - -static int of_bus_default_map(u32 *addr, const u32 *range, - int na, int ns, int pna) -{ - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - if (ns > 2) { - printk("of_device: Cannot handle size cells (%d) > 2.", ns); - return -EINVAL; - } - - if (of_out_of_range(addr, range, range + na + pna, na, ns)) - return -EINVAL; - - /* Start with the parent range base. */ - memcpy(result, range + na, pna * 4); - - /* Add in the child address offset. */ - for (i = 0; i < na; i++) - result[pna - 1 - i] += - (addr[na - 1 - i] - - range[na - 1 - i]); - - memcpy(addr, result, pna * 4); - - return 0; -} - -static unsigned int of_bus_default_get_flags(u32 *addr) -{ - return IORESOURCE_MEM; -} - -/* - * PCI bus specific translator - */ - -static int of_bus_pci_match(struct device_node *np) -{ - if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { - /* Do not do PCI specific frobbing if the - * PCI bridge lacks a ranges property. We - * want to pass it through up to the next - * parent as-is, not with the PCI translate - * method which chops off the top address cell. - */ - if (!of_find_property(np, "ranges", NULL)) - return 0; - - return 1; - } - - return 0; -} - -static void of_bus_pci_count_cells(struct device_node *np, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = 3; - if (sizec) - *sizec = 2; -} - -static int of_bus_pci_map(u32 *addr, const u32 *range, - int na, int ns, int pna) -{ - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - /* Check address type match */ - if ((addr[0] ^ range[0]) & 0x03000000) - return -EINVAL; - - if (of_out_of_range(addr + 1, range + 1, range + na + pna, - na - 1, ns)) - return -EINVAL; - - /* Start with the parent range base. */ - memcpy(result, range + na, pna * 4); - - /* Add in the child address offset, skipping high cell. */ - for (i = 0; i < na - 1; i++) - result[pna - 1 - i] += - (addr[na - 1 - i] - - range[na - 1 - i]); - - memcpy(addr, result, pna * 4); - - return 0; -} - -static unsigned int of_bus_pci_get_flags(u32 *addr) -{ - unsigned int flags = 0; - u32 w = addr[0]; - - switch((w >> 24) & 0x03) { - case 0x01: - flags |= IORESOURCE_IO; - case 0x02: /* 32 bits */ - case 0x03: /* 64 bits */ - flags |= IORESOURCE_MEM; - } - if (w & 0x40000000) - flags |= IORESOURCE_PREFETCH; - return flags; -} - -/* - * SBUS bus specific translator - */ - -static int of_bus_sbus_match(struct device_node *np) -{ - return !strcmp(np->name, "sbus") || - !strcmp(np->name, "sbi"); -} - -static void of_bus_sbus_count_cells(struct device_node *child, - int *addrc, int *sizec) -{ - if (addrc) - *addrc = 2; - if (sizec) - *sizec = 1; -} - -/* - * FHC/Central bus specific translator. - * - * This is just needed to hard-code the address and size cell - * counts. 'fhc' and 'central' nodes lack the #address-cells and - * #size-cells properties, and if you walk to the root on such - * Enterprise boxes all you'll get is a #size-cells of 2 which is - * not what we want to use. - */ -static int of_bus_fhc_match(struct device_node *np) -{ - return !strcmp(np->name, "fhc") || - !strcmp(np->name, "central"); -} - -#define of_bus_fhc_count_cells of_bus_sbus_count_cells - -/* - * Array of bus specific translators - */ - -static struct of_bus of_busses[] = { - /* PCI */ - { - .name = "pci", - .addr_prop_name = "assigned-addresses", - .match = of_bus_pci_match, - .count_cells = of_bus_pci_count_cells, - .map = of_bus_pci_map, - .get_flags = of_bus_pci_get_flags, - }, - /* SBUS */ - { - .name = "sbus", - .addr_prop_name = "reg", - .match = of_bus_sbus_match, - .count_cells = of_bus_sbus_count_cells, - .map = of_bus_default_map, - .get_flags = of_bus_default_get_flags, - }, - /* FHC */ - { - .name = "fhc", - .addr_prop_name = "reg", - .match = of_bus_fhc_match, - .count_cells = of_bus_fhc_count_cells, - .map = of_bus_default_map, - .get_flags = of_bus_default_get_flags, - }, - /* Default */ - { - .name = "default", - .addr_prop_name = "reg", - .match = NULL, - .count_cells = of_bus_default_count_cells, - .map = of_bus_default_map, - .get_flags = of_bus_default_get_flags, - }, -}; - -static struct of_bus *of_match_bus(struct device_node *np) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(of_busses); i ++) - if (!of_busses[i].match || of_busses[i].match(np)) - return &of_busses[i]; - BUG(); - return NULL; -} - -static int __init build_one_resource(struct device_node *parent, - struct of_bus *bus, - struct of_bus *pbus, - u32 *addr, - int na, int ns, int pna) -{ - u32 *ranges; - unsigned int rlen; - int rone; - - ranges = of_get_property(parent, "ranges", &rlen); - if (ranges == NULL || rlen == 0) { - u32 result[OF_MAX_ADDR_CELLS]; - int i; - - memset(result, 0, pna * 4); - for (i = 0; i < na; i++) - result[pna - 1 - i] = - addr[na - 1 - i]; - - memcpy(addr, result, pna * 4); - return 0; - } - - /* Now walk through the ranges */ - rlen /= 4; - rone = na + pna + ns; - for (; rlen >= rone; rlen -= rone, ranges += rone) { - if (!bus->map(addr, ranges, na, ns, pna)) - return 0; - } - - return 1; -} - -static int __init use_1to1_mapping(struct device_node *pp) -{ - char *model; - - /* If this is on the PMU bus, don't try to translate it even - * if a ranges property exists. - */ - if (!strcmp(pp->name, "pmu")) - return 1; - - /* If we have a ranges property in the parent, use it. */ - if (of_find_property(pp, "ranges", NULL) != NULL) - return 0; - - /* If the parent is the dma node of an ISA bus, pass - * the translation up to the root. - */ - if (!strcmp(pp->name, "dma")) - return 0; - - /* Similarly for Simba PCI bridges. */ - model = of_get_property(pp, "model", NULL); - if (model && !strcmp(model, "SUNW,simba")) - return 0; - - return 1; -} - -static int of_resource_verbose; - -static void __init build_device_resources(struct of_device *op, - struct device *parent) -{ - struct of_device *p_op; - struct of_bus *bus; - int na, ns; - int index, num_reg; - void *preg; - - if (!parent) - return; - - p_op = to_of_device(parent); - bus = of_match_bus(p_op->node); - bus->count_cells(op->node, &na, &ns); - - preg = of_get_property(op->node, bus->addr_prop_name, &num_reg); - if (!preg || num_reg == 0) - return; - - /* Convert to num-cells. */ - num_reg /= 4; - - /* Convert to num-entries. */ - num_reg /= na + ns; - - /* Prevent overruning the op->resources[] array. */ - if (num_reg > PROMREG_MAX) { - printk(KERN_WARNING "%s: Too many regs (%d), " - "limiting to %d.\n", - op->node->full_name, num_reg, PROMREG_MAX); - num_reg = PROMREG_MAX; - } - - for (index = 0; index < num_reg; index++) { - struct resource *r = &op->resource[index]; - u32 addr[OF_MAX_ADDR_CELLS]; - u32 *reg = (preg + (index * ((na + ns) * 4))); - struct device_node *dp = op->node; - struct device_node *pp = p_op->node; - struct of_bus *pbus; - u64 size, result = OF_BAD_ADDR; - unsigned long flags; - int dna, dns; - int pna, pns; - - size = of_read_addr(reg + na, ns); - flags = bus->get_flags(reg); - - memcpy(addr, reg, na * 4); - - if (use_1to1_mapping(pp)) { - result = of_read_addr(addr, na); - goto build_res; - } - - dna = na; - dns = ns; - - while (1) { - dp = pp; - pp = dp->parent; - if (!pp) { - result = of_read_addr(addr, dna); - break; - } - - pbus = of_match_bus(pp); - pbus->count_cells(dp, &pna, &pns); - - if (build_one_resource(dp, bus, pbus, addr, - dna, dns, pna)) - break; - - dna = pna; - dns = pns; - bus = pbus; - } - - build_res: - memset(r, 0, sizeof(*r)); - - if (of_resource_verbose) - printk("%s reg[%d] -> %lx\n", - op->node->full_name, index, - result); - - if (result != OF_BAD_ADDR) { - if (tlb_type == hypervisor) - result &= 0x0fffffffffffffffUL; - - r->start = result; - r->end = result + size - 1; - r->flags = flags; - } else { - r->start = ~0UL; - r->end = ~0UL; - } - r->name = op->node->name; - } -} - -static struct device_node * __init -apply_interrupt_map(struct device_node *dp, struct device_node *pp, - u32 *imap, int imlen, u32 *imask, - unsigned int *irq_p) -{ - struct device_node *cp; - unsigned int irq = *irq_p; - struct of_bus *bus; - phandle handle; - u32 *reg; - int na, num_reg, i; - - bus = of_match_bus(pp); - bus->count_cells(dp, &na, NULL); - - reg = of_get_property(dp, "reg", &num_reg); - if (!reg || !num_reg) - return NULL; - - imlen /= ((na + 3) * 4); - handle = 0; - for (i = 0; i < imlen; i++) { - int j; - - for (j = 0; j < na; j++) { - if ((reg[j] & imask[j]) != imap[j]) - goto next; - } - if (imap[na] == irq) { - handle = imap[na + 1]; - irq = imap[na + 2]; - break; - } - - next: - imap += (na + 3); - } - if (i == imlen) { - /* Psycho and Sabre PCI controllers can have 'interrupt-map' - * properties that do not include the on-board device - * interrupts. Instead, the device's 'interrupts' property - * is already a fully specified INO value. - * - * Handle this by deciding that, if we didn't get a - * match in the parent's 'interrupt-map', and the - * parent is an IRQ translater, then use the parent as - * our IRQ controller. - */ - if (pp->irq_trans) - return pp; - - return NULL; - } - - *irq_p = irq; - cp = of_find_node_by_phandle(handle); - - return cp; -} - -static unsigned int __init pci_irq_swizzle(struct device_node *dp, - struct device_node *pp, - unsigned int irq) -{ - struct linux_prom_pci_registers *regs; - unsigned int devfn, slot, ret; - - if (irq < 1 || irq > 4) - return irq; - - regs = of_get_property(dp, "reg", NULL); - if (!regs) - return irq; - - devfn = (regs->phys_hi >> 8) & 0xff; - slot = (devfn >> 3) & 0x1f; - - ret = ((irq - 1 + (slot & 3)) & 3) + 1; - - return ret; -} - -static int of_irq_verbose; - -static unsigned int __init build_one_device_irq(struct of_device *op, - struct device *parent, - unsigned int irq) -{ - struct device_node *dp = op->node; - struct device_node *pp, *ip; - unsigned int orig_irq = irq; - - if (irq == 0xffffffff) - return irq; - - if (dp->irq_trans) { - irq = dp->irq_trans->irq_build(dp, irq, - dp->irq_trans->data); - - if (of_irq_verbose) - printk("%s: direct translate %x --> %x\n", - dp->full_name, orig_irq, irq); - - return irq; - } - - /* Something more complicated. Walk up to the root, applying - * interrupt-map or bus specific translations, until we hit - * an IRQ translator. - * - * If we hit a bus type or situation we cannot handle, we - * stop and assume that the original IRQ number was in a - * format which has special meaning to it's immediate parent. - */ - pp = dp->parent; - ip = NULL; - while (pp) { - void *imap, *imsk; - int imlen; - - imap = of_get_property(pp, "interrupt-map", &imlen); - imsk = of_get_property(pp, "interrupt-map-mask", NULL); - if (imap && imsk) { - struct device_node *iret; - int this_orig_irq = irq; - - iret = apply_interrupt_map(dp, pp, - imap, imlen, imsk, - &irq); - - if (of_irq_verbose) - printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", - op->node->full_name, - pp->full_name, this_orig_irq, - (iret ? iret->full_name : "NULL"), irq); - - if (!iret) - break; - - if (iret->irq_trans) { - ip = iret; - break; - } - } else { - if (!strcmp(pp->type, "pci") || - !strcmp(pp->type, "pciex")) { - unsigned int this_orig_irq = irq; - - irq = pci_irq_swizzle(dp, pp, irq); - if (of_irq_verbose) - printk("%s: PCI swizzle [%s] " - "%x --> %x\n", - op->node->full_name, - pp->full_name, this_orig_irq, - irq); - - } - - if (pp->irq_trans) { - ip = pp; - break; - } - } - dp = pp; - pp = pp->parent; - } - if (!ip) - return orig_irq; - - irq = ip->irq_trans->irq_build(op->node, irq, - ip->irq_trans->data); - if (of_irq_verbose) - printk("%s: Apply IRQ trans [%s] %x --> %x\n", - op->node->full_name, ip->full_name, orig_irq, irq); - - return irq; -} - -static struct of_device * __init scan_one_device(struct device_node *dp, - struct device *parent) -{ - struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); - unsigned int *irq; - int len, i; - - if (!op) - return NULL; - - op->node = dp; - - op->clock_freq = of_getintprop_default(dp, "clock-frequency", - (25*1000*1000)); - op->portid = of_getintprop_default(dp, "upa-portid", -1); - if (op->portid == -1) - op->portid = of_getintprop_default(dp, "portid", -1); - - irq = of_get_property(dp, "interrupts", &len); - if (irq) { - memcpy(op->irqs, irq, len); - op->num_irqs = len / 4; - } else { - op->num_irqs = 0; - } - - /* Prevent overruning the op->irqs[] array. */ - if (op->num_irqs > PROMINTR_MAX) { - printk(KERN_WARNING "%s: Too many irqs (%d), " - "limiting to %d.\n", - dp->full_name, op->num_irqs, PROMINTR_MAX); - op->num_irqs = PROMINTR_MAX; - } - - build_device_resources(op, parent); - for (i = 0; i < op->num_irqs; i++) - op->irqs[i] = build_one_device_irq(op, parent, op->irqs[i]); - - op->dev.parent = parent; - op->dev.bus = &of_bus_type; - if (!parent) - strcpy(op->dev.bus_id, "root"); - else - strcpy(op->dev.bus_id, dp->path_component_name); - - if (of_device_register(op)) { - printk("%s: Could not register of device.\n", - dp->full_name); - kfree(op); - op = NULL; - } - - return op; -} - -static void __init scan_tree(struct device_node *dp, struct device *parent) -{ - while (dp) { - struct of_device *op = scan_one_device(dp, parent); - - if (op) - scan_tree(dp->child, &op->dev); - - dp = dp->sibling; - } -} - -static void __init scan_of_devices(void) -{ - struct device_node *root = of_find_node_by_path("/"); - struct of_device *parent; - - parent = scan_one_device(root, NULL); - if (!parent) - return; - - scan_tree(root->child, &parent->dev); -} - -static int __init of_bus_driver_init(void) -{ - int err; - - err = bus_register(&of_bus_type); -#ifdef CONFIG_PCI - if (!err) - err = bus_register(&isa_bus_type); - if (!err) - err = bus_register(&ebus_bus_type); -#endif -#ifdef CONFIG_SBUS - if (!err) - err = bus_register(&sbus_bus_type); -#endif - - if (!err) - scan_of_devices(); - - return err; -} - -postcore_initcall(of_bus_driver_init); - -static int __init of_debug(char *str) -{ - int val = 0; - - get_option(&str, &val); - if (val & 1) - of_resource_verbose = 1; - if (val & 2) - of_irq_verbose = 1; - return 1; -} - -__setup("of_debug=", of_debug); - -int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) -{ - /* initialize common driver fields */ - drv->driver.name = drv->name; - drv->driver.bus = bus; - - /* register with core */ - return driver_register(&drv->driver); -} - -void of_unregister_driver(struct of_platform_driver *drv) -{ - driver_unregister(&drv->driver); -} - - -static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct of_device *ofdev; - - ofdev = to_of_device(dev); - return sprintf(buf, "%s", ofdev->node->full_name); -} - -static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL); - -/** - * of_release_dev - free an of device structure when all users of it are finished. - * @dev: device that's been disconnected - * - * Will be called only by the device core when all users of this of device are - * done. - */ -void of_release_dev(struct device *dev) -{ - struct of_device *ofdev; - - ofdev = to_of_device(dev); - - kfree(ofdev); -} - -int of_device_register(struct of_device *ofdev) -{ - int rc; - - BUG_ON(ofdev->node == NULL); - - rc = device_register(&ofdev->dev); - if (rc) - return rc; - - rc = device_create_file(&ofdev->dev, &dev_attr_devspec); - if (rc) - device_unregister(&ofdev->dev); - - return rc; -} - -void of_device_unregister(struct of_device *ofdev) -{ - device_remove_file(&ofdev->dev, &dev_attr_devspec); - device_unregister(&ofdev->dev); -} - -struct of_device* of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus) -{ - struct of_device *dev; - - dev = kmalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) - return NULL; - memset(dev, 0, sizeof(*dev)); - - dev->dev.parent = parent; - dev->dev.bus = bus; - dev->dev.release = of_release_dev; - - strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); - - if (of_device_register(dev) != 0) { - kfree(dev); - return NULL; - } - - return dev; -} - -EXPORT_SYMBOL(of_match_device); -EXPORT_SYMBOL(of_register_driver); -EXPORT_SYMBOL(of_unregister_driver); -EXPORT_SYMBOL(of_device_register); -EXPORT_SYMBOL(of_device_unregister); -EXPORT_SYMBOL(of_dev_get); -EXPORT_SYMBOL(of_dev_put); -EXPORT_SYMBOL(of_platform_device_create); -EXPORT_SYMBOL(of_release_dev); diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index e02f01b64..f97ddeb10 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -6,6 +6,7 @@ * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) */ +#include #include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include unsigned long pci_memspace_mask = 0xffffffffUL; @@ -47,6 +47,12 @@ struct pci_controller_info *pci_controller_root = NULL; /* Each PCI controller found gets a unique index. */ int pci_num_controllers = 0; +/* At boot time the user can give the kernel a command + * line option which controls if and how PCI devices + * are reordered at PCI bus probing time. + */ +int pci_device_reorder = 0; + volatile int pci_poke_in_progress; volatile int pci_poke_cpu = -1; volatile int pci_poke_faulted; @@ -177,16 +183,16 @@ void pci_config_write32(u32 *addr, u32 val) } /* Probe for all PCI controllers in the system. */ -extern void sabre_init(struct device_node *, const char *); -extern void psycho_init(struct device_node *, const char *); -extern void schizo_init(struct device_node *, const char *); -extern void schizo_plus_init(struct device_node *, const char *); -extern void tomatillo_init(struct device_node *, const char *); -extern void sun4v_pci_init(struct device_node *, const char *); +extern void sabre_init(int, char *); +extern void psycho_init(int, char *); +extern void schizo_init(int, char *); +extern void schizo_plus_init(int, char *); +extern void tomatillo_init(int, char *); +extern void sun4v_pci_init(int, char *); static struct { char *model_name; - void (*init)(struct device_node *, const char *); + void (*init)(int, char *); } pci_controller_table[] __initdata = { { "SUNW,sabre", sabre_init }, { "pci108e,a000", sabre_init }, @@ -204,7 +210,7 @@ static struct { #define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ sizeof(pci_controller_table[0])) -static int __init pci_controller_init(const char *model_name, int namelen, struct device_node *dp) +static int __init pci_controller_init(char *model_name, int namelen, int node) { int i; @@ -212,15 +218,18 @@ static int __init pci_controller_init(const char *model_name, int namelen, struc if (!strncmp(model_name, pci_controller_table[i].model_name, namelen)) { - pci_controller_table[i].init(dp, model_name); + pci_controller_table[i].init(node, model_name); return 1; } } + printk("PCI: Warning unknown controller, model name [%s]\n", + model_name); + printk("PCI: Ignoring controller...\n"); return 0; } -static int __init pci_is_controller(const char *model_name, int namelen, struct device_node *dp) +static int __init pci_is_controller(char *model_name, int namelen, int node) { int i; @@ -234,35 +243,36 @@ static int __init pci_is_controller(const char *model_name, int namelen, struct return 0; } -static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *)) +static int __init pci_controller_scan(int (*handler)(char *, int, int)) { - struct device_node *dp; + char namebuf[64]; + int node; int count = 0; - for_each_node_by_name(dp, "pci") { - struct property *prop; + node = prom_getchild(prom_root_node); + while ((node = prom_searchsiblings(node, "pci")) != 0) { int len; - prop = of_find_property(dp, "model", &len); - if (!prop) - prop = of_find_property(dp, "compatible", &len); - - if (prop) { - const char *model = prop->value; + if ((len = prom_getproperty(node, "model", namebuf, sizeof(namebuf))) > 0 || + (len = prom_getproperty(node, "compatible", namebuf, sizeof(namebuf))) > 0) { int item_len = 0; /* Our value may be a multi-valued string in the * case of some compatible properties. For sanity, - * only try the first one. - */ - while (model[item_len] && len) { + * only try the first one. */ + + while (namebuf[item_len] && len) { len--; item_len++; } - if (handler(model, item_len, dp)) + if (handler(namebuf, item_len, node)) count++; } + + node = prom_getsibling(node); + if (!node) + break; } return count; @@ -306,6 +316,28 @@ static void __init pci_scan_each_controller_bus(void) p->scan_bus(p); } +/* Reorder the pci_dev chain, so that onboard devices come first + * and then come the pluggable cards. + */ +static void __init pci_reorder_devs(void) +{ + struct list_head *pci_onboard = &pci_devices; + struct list_head *walk = pci_onboard->next; + + while (walk != pci_onboard) { + struct pci_dev *pdev = pci_dev_g(walk); + struct list_head *walk_next = walk->next; + + if (pdev->irq && (__irq_ino(pdev->irq) & 0x20)) { + list_del(walk); + list_add(walk, pci_onboard); + } + + walk = walk_next; + } +} + +extern void clock_probe(void); extern void power_init(void); static int __init pcibios_init(void) @@ -316,8 +348,12 @@ static int __init pcibios_init(void) pci_scan_each_controller_bus(); + if (pci_device_reorder) + pci_reorder_devs(); + isa_init(); ebus_init(); + clock_probe(); power_init(); return 0; @@ -354,7 +390,7 @@ void pcibios_update_irq(struct pci_dev *pdev, int irq) } void pcibios_align_resource(void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { } @@ -405,6 +441,14 @@ EXPORT_SYMBOL(pcibios_bus_to_resource); char * __init pcibios_setup(char *str) { + if (!strcmp(str, "onboardfirst")) { + pci_device_reorder = 1; + return NULL; + } + if (!strcmp(str, "noreorder")) { + pci_device_reorder = 0; + return NULL; + } return str; } diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 827ae30aa..33dedb1aa 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c @@ -9,10 +9,6 @@ #include #include -#include -#include - -#include "pci_impl.h" /* Fix self device of BUS and hook it into BUS->self. * The pci_scan_bus does not do this for the host bridge. @@ -32,14 +28,16 @@ void __init pci_fixup_host_bridge_self(struct pci_bus *pbus) prom_halt(); } -/* Find the OBP PROM device tree node for a PCI device. */ -static struct device_node * __init -find_device_prom_node(struct pci_pbm_info *pbm, struct pci_dev *pdev, - struct device_node *bus_node, - struct linux_prom_pci_registers **pregs, - int *nregs) +/* Find the OBP PROM device tree node for a PCI device. + * Return zero if not found. + */ +static int __init find_device_prom_node(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + int bus_prom_node, + struct linux_prom_pci_registers *pregs, + int *nregs) { - struct device_node *dp; + int node; *nregs = 0; @@ -56,30 +54,24 @@ find_device_prom_node(struct pci_pbm_info *pbm, struct pci_dev *pdev, pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO || pdev->device == PCI_DEVICE_ID_SUN_SABRE || pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD)) - return bus_node; - - dp = bus_node->child; - while (dp) { - struct linux_prom_pci_registers *regs; - struct property *prop; - int len; - - prop = of_find_property(dp, "reg", &len); - if (!prop) + return bus_prom_node; + + node = prom_getchild(bus_prom_node); + while (node != 0) { + int err = prom_getproperty(node, "reg", + (char *)pregs, + sizeof(*pregs) * PROMREG_MAX); + if (err == 0 || err == -1) goto do_next_sibling; - - regs = prop->value; - if (((regs[0].phys_hi >> 8) & 0xff) == pdev->devfn) { - *pregs = regs; - *nregs = len / sizeof(struct linux_prom_pci_registers); - return dp; + if (((pregs[0].phys_hi >> 8) & 0xff) == pdev->devfn) { + *nregs = err / sizeof(*pregs); + return node; } do_next_sibling: - dp = dp->sibling; + node = prom_getsibling(node); } - - return NULL; + return 0; } /* Older versions of OBP on PCI systems encode 64-bit MEM @@ -136,17 +128,15 @@ static void __init fixup_obp_assignments(struct pci_dev *pdev, */ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm, struct pci_dev *pdev, - struct device_node *bus_node) + int bus_prom_node) { - struct linux_prom_pci_registers *pregs = NULL; + struct linux_prom_pci_registers pregs[PROMREG_MAX]; struct pcidev_cookie *pcp; - struct device_node *dp; - struct property *prop; - int nregs, len; + int device_prom_node, nregs, err; - dp = find_device_prom_node(pbm, pdev, bus_node, - &pregs, &nregs); - if (!dp) { + device_prom_node = find_device_prom_node(pbm, pdev, bus_prom_node, + pregs, &nregs); + if (device_prom_node == 0) { /* If it is not in the OBP device tree then * there must be a damn good reason for it. * @@ -160,44 +150,45 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm, return; } - pcp = kzalloc(sizeof(*pcp), GFP_ATOMIC); + pcp = kmalloc(sizeof(*pcp), GFP_ATOMIC); if (pcp == NULL) { prom_printf("PCI_COOKIE: Fatal malloc error, aborting...\n"); prom_halt(); } pcp->pbm = pbm; - pcp->prom_node = dp; - pcp->op = of_find_device_by_node(dp); - memcpy(pcp->prom_regs, pregs, - nregs * sizeof(struct linux_prom_pci_registers)); + pcp->prom_node = device_prom_node; + memcpy(pcp->prom_regs, pregs, sizeof(pcp->prom_regs)); pcp->num_prom_regs = nregs; - - /* We can't have the pcidev_cookie assignments be just - * direct pointers into the property value, since they - * are potentially modified by the probing process. - */ - prop = of_find_property(dp, "assigned-addresses", &len); - if (!prop) { + err = prom_getproperty(device_prom_node, "name", + pcp->prom_name, sizeof(pcp->prom_name)); + if (err > 0) + pcp->prom_name[err] = 0; + else + pcp->prom_name[0] = 0; + + err = prom_getproperty(device_prom_node, + "assigned-addresses", + (char *)pcp->prom_assignments, + sizeof(pcp->prom_assignments)); + if (err == 0 || err == -1) pcp->num_prom_assignments = 0; - } else { - memcpy(pcp->prom_assignments, prop->value, len); + else pcp->num_prom_assignments = - (len / sizeof(pcp->prom_assignments[0])); - } + (err / sizeof(pcp->prom_assignments[0])); - if (strcmp(dp->name, "ebus") == 0) { - struct linux_prom_ebus_ranges *erng; + if (strcmp(pcp->prom_name, "ebus") == 0) { + struct linux_prom_ebus_ranges erng[PROM_PCIRNG_MAX]; int iter; /* EBUS is special... */ - prop = of_find_property(dp, "ranges", &len); - if (!prop) { + err = prom_getproperty(device_prom_node, "ranges", + (char *)&erng[0], sizeof(erng)); + if (err == 0 || err == -1) { prom_printf("EBUS: Fatal error, no range property\n"); prom_halt(); } - erng = prop->value; - len = (len / sizeof(erng[0])); - for (iter = 0; iter < len; iter++) { + err = (err / sizeof(erng[0])); + for(iter = 0; iter < err; iter++) { struct linux_prom_ebus_ranges *ep = &erng[iter]; struct linux_prom_pci_registers *ap; @@ -209,7 +200,7 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm, ap->size_hi = 0; ap->size_lo = ep->size; } - pcp->num_prom_assignments = len; + pcp->num_prom_assignments = err; } fixup_obp_assignments(pdev, pcp); @@ -219,7 +210,7 @@ static void __init pdev_cookie_fillin(struct pci_pbm_info *pbm, void __init pci_fill_in_pbm_cookies(struct pci_bus *pbus, struct pci_pbm_info *pbm, - struct device_node *dp) + int prom_node) { struct pci_dev *pdev, *pdev_next; struct pci_bus *this_pbus, *pbus_next; @@ -227,7 +218,7 @@ void __init pci_fill_in_pbm_cookies(struct pci_bus *pbus, /* This must be _safe because the cookie fillin routine can delete devices from the tree. */ list_for_each_entry_safe(pdev, pdev_next, &pbus->devices, bus_list) - pdev_cookie_fillin(pbm, pdev, dp); + pdev_cookie_fillin(pbm, pdev, prom_node); list_for_each_entry_safe(this_pbus, pbus_next, &pbus->children, node) { struct pcidev_cookie *pcp = this_pbus->self->sysdata; @@ -250,6 +241,7 @@ static void __init bad_assignment(struct pci_dev *pdev, if (res) prom_printf("PCI: RES[%016lx-->%016lx:(%lx)]\n", res->start, res->end, res->flags); + prom_printf("Please email this information to davem@redhat.com\n"); if (do_prom_halt) prom_halt(); } @@ -281,7 +273,8 @@ __init get_root_resource(struct linux_prom_pci_registers *ap, return &pbm->mem_space; default: - printk("PCI: What is resource space %x?\n", space); + printk("PCI: What is resource space %x? " + "Tell davem@redhat.com about it!\n", space); return NULL; }; } @@ -330,6 +323,19 @@ __init get_device_resource(struct linux_prom_pci_registers *ap, return res; } +static int __init pdev_resource_collisions_expected(struct pci_dev *pdev) +{ + if (pdev->vendor != PCI_VENDOR_ID_SUN) + return 0; + + if (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS || + pdev->device == PCI_DEVICE_ID_SUN_RIO_1394 || + pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) + return 1; + + return 0; +} + static void __init pdev_record_assignments(struct pci_pbm_info *pbm, struct pci_dev *pdev) { @@ -387,23 +393,19 @@ static void __init pdev_record_assignments(struct pci_pbm_info *pbm, pbm->parent->resource_adjust(pdev, res, root); if (request_resource(root, res) < 0) { - int rnum; - /* OK, there is some conflict. But this is fine * since we'll reassign it in the fixup pass. * - * Do not print the warning for ROM resources - * as such a conflict is quite common and - * harmless as the ROM bar is disabled. + * We notify the user that OBP made an error if it + * is a case we don't expect. */ - rnum = (res - &pdev->resource[0]); - if (rnum != PCI_ROM_RESOURCE) - printk(KERN_ERR "PCI: Resource collision, " - "region %d " + if (!pdev_resource_collisions_expected(pdev)) { + printk(KERN_ERR "PCI: Address space collision on region %ld " "[%016lx:%016lx] of device %s\n", - rnum, + (res - &pdev->resource[0]), res->start, res->end, pci_name(pdev)); + } } } } @@ -539,18 +541,287 @@ void __init pci_assign_unassigned(struct pci_pbm_info *pbm, pci_assign_unassigned(pbm, bus); } +static inline unsigned int pci_slot_swivel(struct pci_pbm_info *pbm, + struct pci_dev *toplevel_pdev, + struct pci_dev *pdev, + unsigned int interrupt) +{ + unsigned int ret; + + if (unlikely(interrupt < 1 || interrupt > 4)) { + printk("%s: Device %s interrupt value of %u is strange.\n", + pbm->name, pci_name(pdev), interrupt); + return interrupt; + } + + ret = ((interrupt - 1 + (PCI_SLOT(pdev->devfn) & 3)) & 3) + 1; + + printk("%s: %s IRQ Swivel %s [%x:%x] -> [%x]\n", + pbm->name, pci_name(toplevel_pdev), pci_name(pdev), + interrupt, PCI_SLOT(pdev->devfn), ret); + + return ret; +} + +static inline unsigned int pci_apply_intmap(struct pci_pbm_info *pbm, + struct pci_dev *toplevel_pdev, + struct pci_dev *pbus, + struct pci_dev *pdev, + unsigned int interrupt, + unsigned int *cnode) +{ + struct linux_prom_pci_intmap imap[PROM_PCIIMAP_MAX]; + struct linux_prom_pci_intmask imask; + struct pcidev_cookie *pbus_pcp = pbus->sysdata; + struct pcidev_cookie *pdev_pcp = pdev->sysdata; + struct linux_prom_pci_registers *pregs = pdev_pcp->prom_regs; + int plen, num_imap, i; + unsigned int hi, mid, lo, irq, orig_interrupt; + + *cnode = pbus_pcp->prom_node; + + plen = prom_getproperty(pbus_pcp->prom_node, "interrupt-map", + (char *) &imap[0], sizeof(imap)); + if (plen <= 0 || + (plen % sizeof(struct linux_prom_pci_intmap)) != 0) { + printk("%s: Device %s interrupt-map has bad len %d\n", + pbm->name, pci_name(pbus), plen); + goto no_intmap; + } + num_imap = plen / sizeof(struct linux_prom_pci_intmap); + + plen = prom_getproperty(pbus_pcp->prom_node, "interrupt-map-mask", + (char *) &imask, sizeof(imask)); + if (plen <= 0 || + (plen % sizeof(struct linux_prom_pci_intmask)) != 0) { + printk("%s: Device %s interrupt-map-mask has bad len %d\n", + pbm->name, pci_name(pbus), plen); + goto no_intmap; + } + + orig_interrupt = interrupt; + + hi = pregs->phys_hi & imask.phys_hi; + mid = pregs->phys_mid & imask.phys_mid; + lo = pregs->phys_lo & imask.phys_lo; + irq = interrupt & imask.interrupt; + + for (i = 0; i < num_imap; i++) { + if (imap[i].phys_hi == hi && + imap[i].phys_mid == mid && + imap[i].phys_lo == lo && + imap[i].interrupt == irq) { + *cnode = imap[i].cnode; + interrupt = imap[i].cinterrupt; + } + } + + printk("%s: %s MAP BUS %s DEV %s [%x] -> [%x]\n", + pbm->name, pci_name(toplevel_pdev), + pci_name(pbus), pci_name(pdev), + orig_interrupt, interrupt); + +no_intmap: + return interrupt; +} + +/* For each PCI bus on the way to the root: + * 1) If it has an interrupt-map property, apply it. + * 2) Else, swivel the interrupt number based upon the PCI device number. + * + * Return the "IRQ controller" node. If this is the PBM's device node, + * all interrupt translations are complete, else we should use that node's + * "reg" property to apply the PBM's "interrupt-{map,mask}" to the interrupt. + */ +static unsigned int __init pci_intmap_match_to_root(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int *interrupt) +{ + struct pci_dev *toplevel_pdev = pdev; + struct pcidev_cookie *toplevel_pcp = toplevel_pdev->sysdata; + unsigned int cnode = toplevel_pcp->prom_node; + + while (pdev->bus->number != pbm->pci_first_busno) { + struct pci_dev *pbus = pdev->bus->self; + struct pcidev_cookie *pcp = pbus->sysdata; + int plen; + + plen = prom_getproplen(pcp->prom_node, "interrupt-map"); + if (plen <= 0) { + *interrupt = pci_slot_swivel(pbm, toplevel_pdev, + pdev, *interrupt); + cnode = pcp->prom_node; + } else { + *interrupt = pci_apply_intmap(pbm, toplevel_pdev, + pbus, pdev, + *interrupt, &cnode); + + while (pcp->prom_node != cnode && + pbus->bus->number != pbm->pci_first_busno) { + pbus = pbus->bus->self; + pcp = pbus->sysdata; + } + } + pdev = pbus; + + if (cnode == pbm->prom_node) + break; + } + + return cnode; +} + +static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt) +{ + struct pcidev_cookie *dev_pcp = pdev->sysdata; + struct pci_pbm_info *pbm = dev_pcp->pbm; + struct linux_prom_pci_registers reg[PROMREG_MAX]; + unsigned int hi, mid, lo, irq; + int i, cnode, plen; + + cnode = pci_intmap_match_to_root(pbm, pdev, interrupt); + if (cnode == pbm->prom_node) + goto success; + + plen = prom_getproperty(cnode, "reg", (char *) reg, sizeof(reg)); + if (plen <= 0 || + (plen % sizeof(struct linux_prom_pci_registers)) != 0) { + printk("%s: OBP node %x reg property has bad len %d\n", + pbm->name, cnode, plen); + goto fail; + } + + hi = reg[0].phys_hi & pbm->pbm_intmask.phys_hi; + mid = reg[0].phys_mid & pbm->pbm_intmask.phys_mid; + lo = reg[0].phys_lo & pbm->pbm_intmask.phys_lo; + irq = *interrupt & pbm->pbm_intmask.interrupt; + + for (i = 0; i < pbm->num_pbm_intmap; i++) { + struct linux_prom_pci_intmap *intmap; + + intmap = &pbm->pbm_intmap[i]; + + if (intmap->phys_hi == hi && + intmap->phys_mid == mid && + intmap->phys_lo == lo && + intmap->interrupt == irq) { + *interrupt = intmap->cinterrupt; + goto success; + } + } + +fail: + return 0; + +success: + printk("PCI-IRQ: Routing bus[%2x] slot[%2x] to INO[%02x]\n", + pdev->bus->number, PCI_SLOT(pdev->devfn), + *interrupt); + return 1; +} + static void __init pdev_fixup_irq(struct pci_dev *pdev) { struct pcidev_cookie *pcp = pdev->sysdata; - struct of_device *op = pcp->op; + struct pci_pbm_info *pbm = pcp->pbm; + struct pci_controller_info *p = pbm->parent; + unsigned int portid = pbm->portid; + unsigned int prom_irq; + int prom_node = pcp->prom_node; + int err; + + /* If this is an empty EBUS device, sometimes OBP fails to + * give it a valid fully specified interrupts property. + * The EBUS hooked up to SunHME on PCI I/O boards of + * Ex000 systems is one such case. + * + * The interrupt is not important so just ignore it. + */ + if (pdev->vendor == PCI_VENDOR_ID_SUN && + pdev->device == PCI_DEVICE_ID_SUN_EBUS && + !prom_getchild(prom_node)) { + pdev->irq = 0; + return; + } - if (op->irqs[0] == 0xffffffff) { - pdev->irq = PCI_IRQ_NONE; + err = prom_getproperty(prom_node, "interrupts", + (char *)&prom_irq, sizeof(prom_irq)); + if (err == 0 || err == -1) { + pdev->irq = 0; return; } - pdev->irq = op->irqs[0]; + if (tlb_type != hypervisor) { + /* Fully specified already? */ + if (((prom_irq & PCI_IRQ_IGN) >> 6) == portid) { + pdev->irq = p->irq_build(pbm, pdev, prom_irq); + goto have_irq; + } + + /* An onboard device? (bit 5 set) */ + if ((prom_irq & PCI_IRQ_INO) & 0x20) { + pdev->irq = p->irq_build(pbm, pdev, (portid << 6 | prom_irq)); + goto have_irq; + } + } + + /* Can we find a matching entry in the interrupt-map? */ + if (pci_intmap_match(pdev, &prom_irq)) { + pdev->irq = p->irq_build(pbm, pdev, (portid << 6) | prom_irq); + goto have_irq; + } + + /* Ok, we have to do it the hard way. */ + { + unsigned int bus, slot, line; + + bus = (pbm == &pbm->parent->pbm_B) ? (1 << 4) : 0; + + /* If we have a legal interrupt property, use it as + * the IRQ line. + */ + if (prom_irq > 0 && prom_irq < 5) { + line = ((prom_irq - 1) & 3); + } else { + u8 pci_irq_line; + + /* Else just directly consult PCI config space. */ + pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &pci_irq_line); + line = ((pci_irq_line - 1) & 3); + } + + /* Now figure out the slot. + * + * Basically, device number zero on the top-level bus is + * always the PCI host controller. Slot 0 is then device 1. + * PBM A supports two external slots (0 and 1), and PBM B + * supports 4 external slots (0, 1, 2, and 3). On-board PCI + * devices are wired to device numbers outside of these + * ranges. -DaveM + */ + if (pdev->bus->number == pbm->pci_first_busno) { + slot = PCI_SLOT(pdev->devfn) - pbm->pci_first_slot; + } else { + struct pci_dev *bus_dev; + + /* Underneath a bridge, use slot number of parent + * bridge which is closest to the PBM. + */ + bus_dev = pdev->bus->self; + while (bus_dev->bus && + bus_dev->bus->number != pbm->pci_first_busno) + bus_dev = bus_dev->bus->self; + + slot = PCI_SLOT(bus_dev->devfn) - pbm->pci_first_slot; + } + slot = slot << 2; + + pdev->irq = p->irq_build(pbm, pdev, + ((portid << 6) & PCI_IRQ_IGN) | + (bus | slot | line)); + } +have_irq: pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, pdev->irq & PCI_IRQ_INO); } diff --git a/arch/sparc64/kernel/pci_impl.h b/arch/sparc64/kernel/pci_impl.h index 971e2bea3..6c3205962 100644 --- a/arch/sparc64/kernel/pci_impl.h +++ b/arch/sparc64/kernel/pci_impl.h @@ -10,7 +10,6 @@ #include #include #include -#include extern struct pci_controller_info *pci_controller_root; @@ -20,7 +19,7 @@ extern int pci_num_controllers; extern void pci_fixup_host_bridge_self(struct pci_bus *pbus); extern void pci_fill_in_pbm_cookies(struct pci_bus *pbus, struct pci_pbm_info *pbm, - struct device_node *prom_node); + int prom_node); extern void pci_record_assignments(struct pci_pbm_info *pbm, struct pci_bus *pbus); extern void pci_assign_unassigned(struct pci_pbm_info *pbm, diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 2e7f14270..82e545513 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c @@ -281,7 +281,7 @@ static void pci_4u_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, spin_lock_irqsave(&iommu->lock, flags); - free_npages(iommu, dvma - iommu->page_table_map_base, npages); + free_npages(iommu, dvma, npages); spin_unlock_irqrestore(&iommu->lock, flags); diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 1ec0aab68..d17878b14 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include "pci_impl.h" #include "iommu_common.h" @@ -209,6 +207,187 @@ static struct pci_ops psycho_ops = { .write = psycho_write_pci_cfg, }; +/* PSYCHO interrupt mapping support. */ +#define PSYCHO_IMAP_A_SLOT0 0x0c00UL +#define PSYCHO_IMAP_B_SLOT0 0x0c20UL +static unsigned long psycho_pcislot_imap_offset(unsigned long ino) +{ + unsigned int bus = (ino & 0x10) >> 4; + unsigned int slot = (ino & 0x0c) >> 2; + + if (bus == 0) + return PSYCHO_IMAP_A_SLOT0 + (slot * 8); + else + return PSYCHO_IMAP_B_SLOT0 + (slot * 8); +} + +#define PSYCHO_IMAP_SCSI 0x1000UL +#define PSYCHO_IMAP_ETH 0x1008UL +#define PSYCHO_IMAP_BPP 0x1010UL +#define PSYCHO_IMAP_AU_REC 0x1018UL +#define PSYCHO_IMAP_AU_PLAY 0x1020UL +#define PSYCHO_IMAP_PFAIL 0x1028UL +#define PSYCHO_IMAP_KMS 0x1030UL +#define PSYCHO_IMAP_FLPY 0x1038UL +#define PSYCHO_IMAP_SHW 0x1040UL +#define PSYCHO_IMAP_KBD 0x1048UL +#define PSYCHO_IMAP_MS 0x1050UL +#define PSYCHO_IMAP_SER 0x1058UL +#define PSYCHO_IMAP_TIM0 0x1060UL +#define PSYCHO_IMAP_TIM1 0x1068UL +#define PSYCHO_IMAP_UE 0x1070UL +#define PSYCHO_IMAP_CE 0x1078UL +#define PSYCHO_IMAP_A_ERR 0x1080UL +#define PSYCHO_IMAP_B_ERR 0x1088UL +#define PSYCHO_IMAP_PMGMT 0x1090UL +#define PSYCHO_IMAP_GFX 0x1098UL +#define PSYCHO_IMAP_EUPA 0x10a0UL + +static unsigned long __onboard_imap_off[] = { +/*0x20*/ PSYCHO_IMAP_SCSI, +/*0x21*/ PSYCHO_IMAP_ETH, +/*0x22*/ PSYCHO_IMAP_BPP, +/*0x23*/ PSYCHO_IMAP_AU_REC, +/*0x24*/ PSYCHO_IMAP_AU_PLAY, +/*0x25*/ PSYCHO_IMAP_PFAIL, +/*0x26*/ PSYCHO_IMAP_KMS, +/*0x27*/ PSYCHO_IMAP_FLPY, +/*0x28*/ PSYCHO_IMAP_SHW, +/*0x29*/ PSYCHO_IMAP_KBD, +/*0x2a*/ PSYCHO_IMAP_MS, +/*0x2b*/ PSYCHO_IMAP_SER, +/*0x2c*/ PSYCHO_IMAP_TIM0, +/*0x2d*/ PSYCHO_IMAP_TIM1, +/*0x2e*/ PSYCHO_IMAP_UE, +/*0x2f*/ PSYCHO_IMAP_CE, +/*0x30*/ PSYCHO_IMAP_A_ERR, +/*0x31*/ PSYCHO_IMAP_B_ERR, +/*0x32*/ PSYCHO_IMAP_PMGMT +}; +#define PSYCHO_ONBOARD_IRQ_BASE 0x20 +#define PSYCHO_ONBOARD_IRQ_LAST 0x32 +#define psycho_onboard_imap_offset(__ino) \ + __onboard_imap_off[(__ino) - PSYCHO_ONBOARD_IRQ_BASE] + +#define PSYCHO_ICLR_A_SLOT0 0x1400UL +#define PSYCHO_ICLR_SCSI 0x1800UL + +#define psycho_iclr_offset(ino) \ + ((ino & 0x20) ? (PSYCHO_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \ + (PSYCHO_ICLR_A_SLOT0 + (((ino) & 0x1f)<<3))) + +/* PCI PSYCHO INO number to Sparc PIL level. */ +static unsigned char psycho_pil_table[] = { +/*0x00*/0, 0, 0, 0, /* PCI A slot 0 Int A, B, C, D */ +/*0x04*/0, 0, 0, 0, /* PCI A slot 1 Int A, B, C, D */ +/*0x08*/0, 0, 0, 0, /* PCI A slot 2 Int A, B, C, D */ +/*0x0c*/0, 0, 0, 0, /* PCI A slot 3 Int A, B, C, D */ +/*0x10*/0, 0, 0, 0, /* PCI B slot 0 Int A, B, C, D */ +/*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */ +/*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */ +/*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */ +/*0x20*/5, /* SCSI */ +/*0x21*/5, /* Ethernet */ +/*0x22*/8, /* Parallel Port */ +/*0x23*/13, /* Audio Record */ +/*0x24*/14, /* Audio Playback */ +/*0x25*/15, /* PowerFail */ +/*0x26*/5, /* second SCSI */ +/*0x27*/11, /* Floppy */ +/*0x28*/5, /* Spare Hardware */ +/*0x29*/9, /* Keyboard */ +/*0x2a*/5, /* Mouse */ +/*0x2b*/12, /* Serial */ +/*0x2c*/10, /* Timer 0 */ +/*0x2d*/11, /* Timer 1 */ +/*0x2e*/15, /* Uncorrectable ECC */ +/*0x2f*/15, /* Correctable ECC */ +/*0x30*/15, /* PCI Bus A Error */ +/*0x31*/15, /* PCI Bus B Error */ +/*0x32*/15, /* Power Management */ +}; + +static int psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino) +{ + int ret; + + ret = psycho_pil_table[ino]; + if (ret == 0 && pdev == NULL) { + ret = 5; + } else if (ret == 0) { + switch ((pdev->class >> 16) & 0xff) { + case PCI_BASE_CLASS_STORAGE: + ret = 5; + break; + + case PCI_BASE_CLASS_NETWORK: + ret = 6; + break; + + case PCI_BASE_CLASS_DISPLAY: + ret = 9; + break; + + case PCI_BASE_CLASS_MULTIMEDIA: + case PCI_BASE_CLASS_MEMORY: + case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: + ret = 10; + break; + + default: + ret = 5; + break; + }; + } + + return ret; +} + +static unsigned int psycho_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int ino) +{ + struct ino_bucket *bucket; + unsigned long imap, iclr; + unsigned long imap_off, iclr_off; + int pil, inofixup = 0; + + ino &= PCI_IRQ_INO; + if (ino < PSYCHO_ONBOARD_IRQ_BASE) { + /* PCI slot */ + imap_off = psycho_pcislot_imap_offset(ino); + } else { + /* Onboard device */ + if (ino > PSYCHO_ONBOARD_IRQ_LAST) { + prom_printf("psycho_irq_build: Wacky INO [%x]\n", ino); + prom_halt(); + } + imap_off = psycho_onboard_imap_offset(ino); + } + + /* Now build the IRQ bucket. */ + pil = psycho_ino_to_pil(pdev, ino); + + if (PIL_RESERVED(pil)) + BUG(); + + imap = pbm->controller_regs + imap_off; + imap += 4; + + iclr_off = psycho_iclr_offset(ino); + iclr = pbm->controller_regs + iclr_off; + iclr += 4; + + if ((ino & 0x20) == 0) + inofixup = ino & 0x03; + + bucket = __bucket(build_irq(pil, inofixup, iclr, imap)); + bucket->flags |= IBF_PCI; + + return __irq(bucket); +} + /* PSYCHO error handling support. */ enum psycho_error_type { UE_ERR, CE_ERR, PCI_ERR @@ -841,34 +1020,51 @@ static irqreturn_t psycho_pcierr_intr(int irq, void *dev_id, struct pt_regs *reg #define PSYCHO_ECCCTRL_EE 0x8000000000000000UL /* Enable ECC Checking */ #define PSYCHO_ECCCTRL_UE 0x4000000000000000UL /* Enable UE Interrupts */ #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ +#define PSYCHO_UE_INO 0x2e +#define PSYCHO_CE_INO 0x2f +#define PSYCHO_PCIERR_A_INO 0x30 +#define PSYCHO_PCIERR_B_INO 0x31 static void psycho_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm = &p->pbm_A; /* arbitrary */ - struct of_device *op = of_find_device_by_node(pbm->prom_node); unsigned long base = p->pbm_A.controller_regs; + unsigned int irq, portid = pbm->portid; u64 tmp; - if (!op) - return; + /* Build IRQs and register handlers. */ + irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_UE_INO); + if (request_irq(irq, psycho_ue_intr, + SA_SHIRQ, "PSYCHO UE", p) < 0) { + prom_printf("PSYCHO%d: Cannot register UE interrupt.\n", + p->index); + prom_halt(); + } - /* Psycho interrupt property order is: - * 0: PCIERR PBM B INO - * 1: UE ERR - * 2: CE ERR - * 3: POWER FAIL - * 4: SPARE HARDWARE - * 5: PCIERR PBM A INO - */ + irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_CE_INO); + if (request_irq(irq, psycho_ce_intr, + SA_SHIRQ, "PSYCHO CE", p) < 0) { + prom_printf("PSYCHO%d: Cannot register CE interrupt.\n", + p->index); + prom_halt(); + } - if (op->num_irqs < 6) - return; + pbm = &p->pbm_A; + irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_PCIERR_A_INO); + if (request_irq(irq, psycho_pcierr_intr, + SA_SHIRQ, "PSYCHO PCIERR", &p->pbm_A) < 0) { + prom_printf("PSYCHO%d(PBMA): Cannot register PciERR interrupt.\n", + p->index); + prom_halt(); + } - request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED, "PSYCHO UE", p); - request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED, "PSYCHO CE", p); - request_irq(op->irqs[5], psycho_pcierr_intr, IRQF_SHARED, - "PSYCHO PCIERR-A", &p->pbm_A); - request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED, - "PSYCHO PCIERR-B", &p->pbm_B); + pbm = &p->pbm_B; + irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_PCIERR_B_INO); + if (request_irq(irq, psycho_pcierr_intr, + SA_SHIRQ, "PSYCHO PCIERR", &p->pbm_B) < 0) { + prom_printf("PSYCHO%d(PBMB): Cannot register PciERR interrupt.\n", + p->index); + prom_halt(); + } /* Enable UE and CE interrupts for controller. */ psycho_write(base + PSYCHO_ECC_CTRL, @@ -1051,7 +1247,9 @@ static void psycho_iommu_init(struct pci_controller_info *p) /* If necessary, hook us up for starfire IRQ translations. */ if (this_is_starfire) - starfire_hookup(p->pbm_A.portid); + p->starfire_cookie = starfire_hookup(p->pbm_A.portid); + else + p->starfire_cookie = NULL; } #define PSYCHO_IRQ_RETRY 0x1a00UL @@ -1099,6 +1297,9 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p, { char *name = pbm->name; + sprintf(name, "PSYCHO%d PBM%c", + p->index, + (pbm == &p->pbm_A ? 'A' : 'B')); pbm->io_space.name = pbm->mem_space.name = name; request_resource(&ioport_resource, &pbm->io_space); @@ -1167,12 +1368,11 @@ static void psycho_pbm_strbuf_init(struct pci_controller_info *p, #define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL static void psycho_pbm_init(struct pci_controller_info *p, - struct device_node *dp, int is_pbm_a) + int prom_node, int is_pbm_a) { - unsigned int *busrange; - struct property *prop; + unsigned int busrange[2]; struct pci_pbm_info *pbm; - int len; + int err; if (is_pbm_a) { pbm = &p->pbm_A; @@ -1187,53 +1387,57 @@ static void psycho_pbm_init(struct pci_controller_info *p, } pbm->chip_type = PBM_CHIP_TYPE_PSYCHO; - pbm->chip_version = 0; - prop = of_find_property(dp, "version#", NULL); - if (prop) - pbm->chip_version = *(int *) prop->value; - pbm->chip_revision = 0; - prop = of_find_property(dp, "module-revision#", NULL); - if (prop) - pbm->chip_revision = *(int *) prop->value; + pbm->chip_version = + prom_getintdefault(prom_node, "version#", 0); + pbm->chip_revision = + prom_getintdefault(prom_node, "module-revision#", 0); pbm->io_space.end = pbm->io_space.start + PSYCHO_IOSPACE_SIZE; pbm->io_space.flags = IORESOURCE_IO; pbm->mem_space.end = pbm->mem_space.start + PSYCHO_MEMSPACE_SIZE; pbm->mem_space.flags = IORESOURCE_MEM; - - pbm->parent = p; - pbm->prom_node = dp; - pbm->name = dp->full_name; - pbm_register_toplevel_resources(p, pbm); - printk("%s: PSYCHO PCI Bus Module ver[%x:%x]\n", - pbm->name, - pbm->chip_version, pbm->chip_revision); - - prop = of_find_property(dp, "ranges", &len); - if (prop) { - pbm->pbm_ranges = prop->value; + pbm->parent = p; + pbm->prom_node = prom_node; + prom_getstring(prom_node, "name", + pbm->prom_name, + sizeof(pbm->prom_name)); + + err = prom_getproperty(prom_node, "ranges", + (char *)pbm->pbm_ranges, + sizeof(pbm->pbm_ranges)); + if (err != -1) pbm->num_pbm_ranges = - (len / sizeof(struct linux_prom_pci_ranges)); - } else { + (err / sizeof(struct linux_prom_pci_ranges)); + else pbm->num_pbm_ranges = 0; - } - - prop = of_find_property(dp, "interrupt-map", &len); - if (prop) { - pbm->pbm_intmap = prop->value; - pbm->num_pbm_intmap = - (len / sizeof(struct linux_prom_pci_intmap)); - prop = of_find_property(dp, "interrupt-map-mask", NULL); - pbm->pbm_intmask = prop->value; + err = prom_getproperty(prom_node, "interrupt-map", + (char *)pbm->pbm_intmap, + sizeof(pbm->pbm_intmap)); + if (err != -1) { + pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(prom_node, "interrupt-map-mask", + (char *)&pbm->pbm_intmask, + sizeof(pbm->pbm_intmask)); + if (err == -1) { + prom_printf("PSYCHO-PBM: Fatal error, no " + "interrupt-map-mask.\n"); + prom_halt(); + } } else { pbm->num_pbm_intmap = 0; + memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); } - prop = of_find_property(dp, "bus-range", NULL); - busrange = prop->value; + err = prom_getproperty(prom_node, "bus-range", + (char *)&busrange[0], + sizeof(busrange)); + if (err == 0 || err == -1) { + prom_printf("PSYCHO-PBM: Fatal error, no bus-range.\n"); + prom_halt(); + } pbm->pci_first_busno = busrange[0]; pbm->pci_last_busno = busrange[1]; @@ -1242,24 +1446,20 @@ static void psycho_pbm_init(struct pci_controller_info *p, #define PSYCHO_CONFIGSPACE 0x001000000UL -void psycho_init(struct device_node *dp, char *model_name) +void psycho_init(int node, char *model_name) { - struct linux_prom64_registers *pr_regs; + struct linux_prom64_registers pr_regs[3]; struct pci_controller_info *p; struct pci_iommu *iommu; - struct property *prop; u32 upa_portid; - int is_pbm_a; + int is_pbm_a, err; - upa_portid = 0xff; - prop = of_find_property(dp, "upa-portid", NULL); - if (prop) - upa_portid = *(u32 *) prop->value; + upa_portid = prom_getintdefault(node, "upa-portid", 0xff); for(p = pci_controller_root; p; p = p->next) { if (p->pbm_A.portid == upa_portid) { - is_pbm_a = (p->pbm_A.prom_node == NULL); - psycho_pbm_init(p, dp, is_pbm_a); + is_pbm_a = (p->pbm_A.prom_node == 0); + psycho_pbm_init(p, node, is_pbm_a); return; } } @@ -1284,18 +1484,28 @@ void psycho_init(struct device_node *dp, char *model_name) p->index = pci_num_controllers++; p->pbms_same_domain = 0; p->scan_bus = psycho_scan_bus; + p->irq_build = psycho_irq_build; p->base_address_update = psycho_base_address_update; p->resource_adjust = psycho_resource_adjust; p->pci_ops = &psycho_ops; - prop = of_find_property(dp, "reg", NULL); - pr_regs = prop->value; + err = prom_getproperty(node, "reg", + (char *)&pr_regs[0], + sizeof(pr_regs)); + if (err == 0 || err == -1) { + prom_printf("PSYCHO: Fatal error, no reg property.\n"); + prom_halt(); + } p->pbm_A.controller_regs = pr_regs[2].phys_addr; p->pbm_B.controller_regs = pr_regs[2].phys_addr; + printk("PCI: Found PSYCHO, control regs at %016lx\n", + p->pbm_A.controller_regs); p->pbm_A.config_space = p->pbm_B.config_space = (pr_regs[2].phys_addr + PSYCHO_CONFIGSPACE); + printk("PSYCHO: Shared PCI config space at %016lx\n", + p->pbm_A.config_space); /* * Psycho's PCI MEM space is mapped to a 2GB aligned area, so @@ -1308,5 +1518,5 @@ void psycho_init(struct device_node *dp, char *model_name) psycho_iommu_init(p); is_pbm_a = ((pr_regs[0].phys_addr & 0x6000) == 0x2000); - psycho_pbm_init(p, dp, is_pbm_a); + psycho_pbm_init(p, node, is_pbm_a); } diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index f04c6d288..f67bb7f07 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "pci_impl.h" #include "iommu_common.h" @@ -485,6 +484,191 @@ static struct pci_ops sabre_ops = { .write = sabre_write_pci_cfg, }; +static unsigned long sabre_pcislot_imap_offset(unsigned long ino) +{ + unsigned int bus = (ino & 0x10) >> 4; + unsigned int slot = (ino & 0x0c) >> 2; + + if (bus == 0) + return SABRE_IMAP_A_SLOT0 + (slot * 8); + else + return SABRE_IMAP_B_SLOT0 + (slot * 8); +} + +static unsigned long __onboard_imap_off[] = { +/*0x20*/ SABRE_IMAP_SCSI, +/*0x21*/ SABRE_IMAP_ETH, +/*0x22*/ SABRE_IMAP_BPP, +/*0x23*/ SABRE_IMAP_AU_REC, +/*0x24*/ SABRE_IMAP_AU_PLAY, +/*0x25*/ SABRE_IMAP_PFAIL, +/*0x26*/ SABRE_IMAP_KMS, +/*0x27*/ SABRE_IMAP_FLPY, +/*0x28*/ SABRE_IMAP_SHW, +/*0x29*/ SABRE_IMAP_KBD, +/*0x2a*/ SABRE_IMAP_MS, +/*0x2b*/ SABRE_IMAP_SER, +/*0x2c*/ 0 /* reserved */, +/*0x2d*/ 0 /* reserved */, +/*0x2e*/ SABRE_IMAP_UE, +/*0x2f*/ SABRE_IMAP_CE, +/*0x30*/ SABRE_IMAP_PCIERR, +}; +#define SABRE_ONBOARD_IRQ_BASE 0x20 +#define SABRE_ONBOARD_IRQ_LAST 0x30 +#define sabre_onboard_imap_offset(__ino) \ + __onboard_imap_off[(__ino) - SABRE_ONBOARD_IRQ_BASE] + +#define sabre_iclr_offset(ino) \ + ((ino & 0x20) ? (SABRE_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \ + (SABRE_ICLR_A_SLOT0 + (((ino) & 0x1f)<<3))) + +/* PCI SABRE INO number to Sparc PIL level. */ +static unsigned char sabre_pil_table[] = { +/*0x00*/0, 0, 0, 0, /* PCI A slot 0 Int A, B, C, D */ +/*0x04*/0, 0, 0, 0, /* PCI A slot 1 Int A, B, C, D */ +/*0x08*/0, 0, 0, 0, /* PCI A slot 2 Int A, B, C, D */ +/*0x0c*/0, 0, 0, 0, /* PCI A slot 3 Int A, B, C, D */ +/*0x10*/0, 0, 0, 0, /* PCI B slot 0 Int A, B, C, D */ +/*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */ +/*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */ +/*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */ +/*0x20*/5, /* SCSI */ +/*0x21*/5, /* Ethernet */ +/*0x22*/8, /* Parallel Port */ +/*0x23*/13, /* Audio Record */ +/*0x24*/14, /* Audio Playback */ +/*0x25*/15, /* PowerFail */ +/*0x26*/5, /* second SCSI */ +/*0x27*/11, /* Floppy */ +/*0x28*/5, /* Spare Hardware */ +/*0x29*/9, /* Keyboard */ +/*0x2a*/5, /* Mouse */ +/*0x2b*/12, /* Serial */ +/*0x2c*/10, /* Timer 0 */ +/*0x2d*/11, /* Timer 1 */ +/*0x2e*/15, /* Uncorrectable ECC */ +/*0x2f*/15, /* Correctable ECC */ +/*0x30*/15, /* PCI Bus A Error */ +/*0x31*/15, /* PCI Bus B Error */ +/*0x32*/15, /* Power Management */ +}; + +static int sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino) +{ + int ret; + + if (pdev && + pdev->vendor == PCI_VENDOR_ID_SUN && + pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) + return 9; + + ret = sabre_pil_table[ino]; + if (ret == 0 && pdev == NULL) { + ret = 5; + } else if (ret == 0) { + switch ((pdev->class >> 16) & 0xff) { + case PCI_BASE_CLASS_STORAGE: + ret = 5; + break; + + case PCI_BASE_CLASS_NETWORK: + ret = 6; + break; + + case PCI_BASE_CLASS_DISPLAY: + ret = 9; + break; + + case PCI_BASE_CLASS_MULTIMEDIA: + case PCI_BASE_CLASS_MEMORY: + case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: + ret = 10; + break; + + default: + ret = 5; + break; + }; + } + return ret; +} + +/* When a device lives behind a bridge deeper in the PCI bus topology + * than APB, a special sequence must run to make sure all pending DMA + * transfers at the time of IRQ delivery are visible in the coherency + * domain by the cpu. This sequence is to perform a read on the far + * side of the non-APB bridge, then perform a read of Sabre's DMA + * write-sync register. + */ +static void sabre_wsync_handler(struct ino_bucket *bucket, void *_arg1, void *_arg2) +{ + struct pci_dev *pdev = _arg1; + unsigned long sync_reg = (unsigned long) _arg2; + u16 _unused; + + pci_read_config_word(pdev, PCI_VENDOR_ID, &_unused); + sabre_read(sync_reg); +} + +static unsigned int sabre_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int ino) +{ + struct ino_bucket *bucket; + unsigned long imap, iclr; + unsigned long imap_off, iclr_off; + int pil, inofixup = 0; + + ino &= PCI_IRQ_INO; + if (ino < SABRE_ONBOARD_IRQ_BASE) { + /* PCI slot */ + imap_off = sabre_pcislot_imap_offset(ino); + } else { + /* onboard device */ + if (ino > SABRE_ONBOARD_IRQ_LAST) { + prom_printf("sabre_irq_build: Wacky INO [%x]\n", ino); + prom_halt(); + } + imap_off = sabre_onboard_imap_offset(ino); + } + + /* Now build the IRQ bucket. */ + pil = sabre_ino_to_pil(pdev, ino); + + if (PIL_RESERVED(pil)) + BUG(); + + imap = pbm->controller_regs + imap_off; + imap += 4; + + iclr_off = sabre_iclr_offset(ino); + iclr = pbm->controller_regs + iclr_off; + iclr += 4; + + if ((ino & 0x20) == 0) + inofixup = ino & 0x03; + + bucket = __bucket(build_irq(pil, inofixup, iclr, imap)); + bucket->flags |= IBF_PCI; + + if (pdev) { + struct pcidev_cookie *pcp = pdev->sysdata; + + if (pdev->bus->number != pcp->pbm->pci_first_busno) { + struct pci_controller_info *p = pcp->pbm->parent; + struct irq_desc *d = bucket->irq_info; + + d->pre_handler = sabre_wsync_handler; + d->pre_handler_arg1 = pdev; + d->pre_handler_arg2 = (void *) + p->pbm_A.controller_regs + SABRE_WRSYNC; + } + } + return __irq(bucket); +} + /* SABRE error handling support. */ static void sabre_check_iommu_error(struct pci_controller_info *p, unsigned long afsr, @@ -821,30 +1005,17 @@ static irqreturn_t sabre_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs return IRQ_HANDLED; } +/* XXX What about PowerFail/PowerManagement??? -DaveM */ +#define SABRE_UE_INO 0x2e +#define SABRE_CE_INO 0x2f +#define SABRE_PCIERR_INO 0x30 static void sabre_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm = &p->pbm_A; /* arbitrary */ - struct device_node *dp = pbm->prom_node; - struct of_device *op; unsigned long base = pbm->controller_regs; + unsigned long irq, portid = pbm->portid; u64 tmp; - if (pbm->chip_type == PBM_CHIP_TYPE_SABRE) - dp = dp->parent; - - op = of_find_device_by_node(dp); - if (!op) - return; - - /* Sabre/Hummingbird IRQ property layout is: - * 0: PCI ERR - * 1: UE ERR - * 2: CE ERR - * 3: POWER FAIL - */ - if (op->num_irqs < 4) - return; - /* We clear the error bits in the appropriate AFSR before * registering the handler so that we don't get spurious * interrupts. @@ -853,16 +1024,32 @@ static void sabre_register_error_handlers(struct pci_controller_info *p) (SABRE_UEAFSR_PDRD | SABRE_UEAFSR_PDWR | SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR | SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE)); - - request_irq(op->irqs[1], sabre_ue_intr, IRQF_SHARED, "SABRE UE", p); + irq = sabre_irq_build(pbm, NULL, (portid << 6) | SABRE_UE_INO); + if (request_irq(irq, sabre_ue_intr, + SA_SHIRQ, "SABRE UE", p) < 0) { + prom_printf("SABRE%d: Cannot register UE interrupt.\n", + p->index); + prom_halt(); + } sabre_write(base + SABRE_CE_AFSR, (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR | SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR)); + irq = sabre_irq_build(pbm, NULL, (portid << 6) | SABRE_CE_INO); + if (request_irq(irq, sabre_ce_intr, + SA_SHIRQ, "SABRE CE", p) < 0) { + prom_printf("SABRE%d: Cannot register CE interrupt.\n", + p->index); + prom_halt(); + } - request_irq(op->irqs[2], sabre_ce_intr, IRQF_SHARED, "SABRE CE", p); - request_irq(op->irqs[0], sabre_pcierr_intr, IRQF_SHARED, - "SABRE PCIERR", p); + irq = sabre_irq_build(pbm, NULL, (portid << 6) | SABRE_PCIERR_INO); + if (request_irq(irq, sabre_pcierr_intr, + SA_SHIRQ, "SABRE PCIERR", p) < 0) { + prom_printf("SABRE%d: Cannot register PciERR interrupt.\n", + p->index); + prom_halt(); + } tmp = sabre_read(base + SABRE_PCICTRL); tmp |= SABRE_PCICTRL_ERREN; @@ -1196,36 +1383,34 @@ static void pbm_register_toplevel_resources(struct pci_controller_info *p, &pbm->mem_space); } -static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 dma_start, u32 dma_end) +static void sabre_pbm_init(struct pci_controller_info *p, int sabre_node, u32 dma_begin) { struct pci_pbm_info *pbm; - struct device_node *node; - struct property *prop; - u32 *busrange; - int len, simbas_found; + char namebuf[128]; + u32 busrange[2]; + int node, simbas_found; simbas_found = 0; - node = dp->child; - while (node != NULL) { - if (strcmp(node->name, "pci")) - goto next_pci; + node = prom_getchild(sabre_node); + while ((node = prom_searchsiblings(node, "pci")) != 0) { + int err; - prop = of_find_property(node, "model", NULL); - if (!prop || strncmp(prop->value, "SUNW,simba", prop->length)) + err = prom_getproperty(node, "model", namebuf, sizeof(namebuf)); + if ((err <= 0) || strncmp(namebuf, "SUNW,simba", err)) goto next_pci; - simbas_found++; + err = prom_getproperty(node, "bus-range", + (char *)&busrange[0], sizeof(busrange)); + if (err == 0 || err == -1) { + prom_printf("APB: Error, cannot get PCI bus-range.\n"); + prom_halt(); + } - prop = of_find_property(node, "bus-range", NULL); - busrange = prop->value; + simbas_found++; if (busrange[0] == 1) pbm = &p->pbm_B; else pbm = &p->pbm_A; - - pbm->name = node->full_name; - printk("%s: SABRE PCI Bus Module\n", pbm->name); - pbm->chip_type = PBM_CHIP_TYPE_SABRE; pbm->parent = p; pbm->prom_node = node; @@ -1233,70 +1418,83 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp pbm->pci_first_busno = busrange[0]; pbm->pci_last_busno = busrange[1]; - prop = of_find_property(node, "ranges", &len); - if (prop) { - pbm->pbm_ranges = prop->value; + prom_getstring(node, "name", pbm->prom_name, sizeof(pbm->prom_name)); + err = prom_getproperty(node, "ranges", + (char *)pbm->pbm_ranges, + sizeof(pbm->pbm_ranges)); + if (err != -1) pbm->num_pbm_ranges = - (len / sizeof(struct linux_prom_pci_ranges)); - } else { + (err / sizeof(struct linux_prom_pci_ranges)); + else pbm->num_pbm_ranges = 0; - } - - prop = of_find_property(node, "interrupt-map", &len); - if (prop) { - pbm->pbm_intmap = prop->value; - pbm->num_pbm_intmap = - (len / sizeof(struct linux_prom_pci_intmap)); - prop = of_find_property(node, "interrupt-map-mask", - NULL); - pbm->pbm_intmask = prop->value; + err = prom_getproperty(node, "interrupt-map", + (char *)pbm->pbm_intmap, + sizeof(pbm->pbm_intmap)); + if (err != -1) { + pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(node, "interrupt-map-mask", + (char *)&pbm->pbm_intmask, + sizeof(pbm->pbm_intmask)); + if (err == -1) { + prom_printf("APB: Fatal error, no interrupt-map-mask.\n"); + prom_halt(); + } } else { pbm->num_pbm_intmap = 0; + memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); } pbm_register_toplevel_resources(p, pbm); next_pci: - node = node->sibling; + node = prom_getsibling(node); + if (!node) + break; } if (simbas_found == 0) { - struct resource *rp; + int err; /* No APBs underneath, probably this is a hummingbird * system. */ pbm = &p->pbm_A; pbm->parent = p; - pbm->prom_node = dp; + pbm->prom_node = sabre_node; pbm->pci_first_busno = p->pci_first_busno; pbm->pci_last_busno = p->pci_last_busno; - prop = of_find_property(dp, "ranges", &len); - if (prop) { - pbm->pbm_ranges = prop->value; + prom_getstring(sabre_node, "name", pbm->prom_name, sizeof(pbm->prom_name)); + err = prom_getproperty(sabre_node, "ranges", + (char *) pbm->pbm_ranges, + sizeof(pbm->pbm_ranges)); + if (err != -1) pbm->num_pbm_ranges = - (len / sizeof(struct linux_prom_pci_ranges)); - } else { + (err / sizeof(struct linux_prom_pci_ranges)); + else pbm->num_pbm_ranges = 0; - } - - prop = of_find_property(dp, "interrupt-map", &len); - if (prop) { - pbm->pbm_intmap = prop->value; - pbm->num_pbm_intmap = - (len / sizeof(struct linux_prom_pci_intmap)); - prop = of_find_property(dp, "interrupt-map-mask", - NULL); - pbm->pbm_intmask = prop->value; + err = prom_getproperty(sabre_node, "interrupt-map", + (char *) pbm->pbm_intmap, + sizeof(pbm->pbm_intmap)); + + if (err != -1) { + pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(sabre_node, "interrupt-map-mask", + (char *)&pbm->pbm_intmask, + sizeof(pbm->pbm_intmask)); + if (err == -1) { + prom_printf("Hummingbird: Fatal error, no interrupt-map-mask.\n"); + prom_halt(); + } } else { pbm->num_pbm_intmap = 0; + memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); } - pbm->name = dp->full_name; - printk("%s: SABRE PCI Bus Module\n", pbm->name); + sprintf(pbm->name, "SABRE%d PBM%c", p->index, + (pbm == &p->pbm_A ? 'A' : 'B')); pbm->io_space.name = pbm->mem_space.name = pbm->name; /* Hack up top-level resources. */ @@ -1304,10 +1502,8 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; pbm->io_space.flags = IORESOURCE_IO; - pbm->mem_space.start = - (p->pbm_A.controller_regs + SABRE_MEMSPACE); - pbm->mem_space.end = - (pbm->mem_space.start + ((1UL << 32UL) - 1UL)); + pbm->mem_space.start = p->pbm_A.controller_regs + SABRE_MEMSPACE; + pbm->mem_space.end = pbm->mem_space.start + (unsigned long)dma_begin - 1UL; pbm->mem_space.flags = IORESOURCE_MEM; if (request_resource(&ioport_resource, &pbm->io_space) < 0) { @@ -1319,31 +1515,19 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp prom_halt(); } - rp = kmalloc(sizeof(*rp), GFP_KERNEL); - if (!rp) { - prom_printf("Cannot allocate IOMMU resource.\n"); - prom_halt(); - } - rp->name = "IOMMU"; - rp->start = pbm->mem_space.start + (unsigned long) dma_start; - rp->end = pbm->mem_space.start + (unsigned long) dma_end - 1UL; - rp->flags = IORESOURCE_BUSY; - request_resource(&pbm->mem_space, rp); - pci_register_legacy_regions(&pbm->io_space, &pbm->mem_space); } } -void sabre_init(struct device_node *dp, char *model_name) +void sabre_init(int pnode, char *model_name) { - struct linux_prom64_registers *pr_regs; + struct linux_prom64_registers pr_regs[2]; struct pci_controller_info *p; struct pci_iommu *iommu; - struct property *prop; - int tsbsize; - u32 *busrange; - u32 *vdma; + int tsbsize, err; + u32 busrange[2]; + u32 vdma[2]; u32 upa_portid, dma_mask; u64 clear_irq; @@ -1351,21 +1535,22 @@ void sabre_init(struct device_node *dp, char *model_name) if (!strcmp(model_name, "pci108e,a001")) hummingbird_p = 1; else if (!strcmp(model_name, "SUNW,sabre")) { - prop = of_find_property(dp, "compatible", NULL); - if (prop) { - const char *compat = prop->value; + char compat[64]; - if (!strcmp(compat, "pci108e,a001")) - hummingbird_p = 1; - } - if (!hummingbird_p) { - struct device_node *dp; + if (prom_getproperty(pnode, "compatible", + compat, sizeof(compat)) > 0 && + !strcmp(compat, "pci108e,a001")) { + hummingbird_p = 1; + } else { + int cpu_node; /* Of course, Sun has to encode things a thousand * different ways, inconsistently. */ - cpu_find_by_instance(0, &dp, NULL); - if (!strcmp(dp->name, "SUNW,UltraSPARC-IIe")) + cpu_find_by_instance(0, &cpu_node, NULL); + if (prom_getproperty(cpu_node, "name", + compat, sizeof(compat)) > 0 && + !strcmp(compat, "SUNW,UltraSPARC-IIe")) hummingbird_p = 1; } } @@ -1383,10 +1568,7 @@ void sabre_init(struct device_node *dp, char *model_name) } p->pbm_A.iommu = p->pbm_B.iommu = iommu; - upa_portid = 0xff; - prop = of_find_property(dp, "upa-portid", NULL); - if (prop) - upa_portid = *(u32 *) prop->value; + upa_portid = prom_getintdefault(pnode, "upa-portid", 0xff); p->next = pci_controller_root; pci_controller_root = p; @@ -1396,6 +1578,7 @@ void sabre_init(struct device_node *dp, char *model_name) p->index = pci_num_controllers++; p->pbms_same_domain = 1; p->scan_bus = sabre_scan_bus; + p->irq_build = sabre_irq_build; p->base_address_update = sabre_base_address_update; p->resource_adjust = sabre_resource_adjust; p->pci_ops = &sabre_ops; @@ -1403,9 +1586,13 @@ void sabre_init(struct device_node *dp, char *model_name) /* * Map in SABRE register set and report the presence of this SABRE. */ - - prop = of_find_property(dp, "reg", NULL); - pr_regs = prop->value; + err = prom_getproperty(pnode, "reg", + (char *)&pr_regs[0], sizeof(pr_regs)); + if(err == 0 || err == -1) { + prom_printf("SABRE: Error, cannot get U2P registers " + "from PROM.\n"); + prom_halt(); + } /* * First REG in property is base of entire SABRE register space. @@ -1413,6 +1600,9 @@ void sabre_init(struct device_node *dp, char *model_name) p->pbm_A.controller_regs = pr_regs[0].phys_addr; p->pbm_B.controller_regs = pr_regs[0].phys_addr; + printk("PCI: Found SABRE, main regs at %016lx\n", + p->pbm_A.controller_regs); + /* Clear interrupts */ /* PCI first */ @@ -1431,9 +1621,16 @@ void sabre_init(struct device_node *dp, char *model_name) /* Now map in PCI config space for entire SABRE. */ p->pbm_A.config_space = p->pbm_B.config_space = (p->pbm_A.controller_regs + SABRE_CONFIGSPACE); - - prop = of_find_property(dp, "virtual-dma", NULL); - vdma = prop->value; + printk("SABRE: Shared PCI config space at %016lx\n", + p->pbm_A.config_space); + + err = prom_getproperty(pnode, "virtual-dma", + (char *)&vdma[0], sizeof(vdma)); + if(err == 0 || err == -1) { + prom_printf("SABRE: Error, cannot get virtual-dma property " + "from PROM.\n"); + prom_halt(); + } dma_mask = vdma[0]; switch(vdma[1]) { @@ -1457,13 +1654,21 @@ void sabre_init(struct device_node *dp, char *model_name) sabre_iommu_init(p, tsbsize, vdma[0], dma_mask); - prop = of_find_property(dp, "bus-range", NULL); - busrange = prop->value; + printk("SABRE: DVMA at %08x [%08x]\n", vdma[0], vdma[1]); + + err = prom_getproperty(pnode, "bus-range", + (char *)&busrange[0], sizeof(busrange)); + if(err == 0 || err == -1) { + prom_printf("SABRE: Error, cannot get PCI bus-range " + " from PROM.\n"); + prom_halt(); + } + p->pci_first_busno = busrange[0]; p->pci_last_busno = busrange[1]; /* * Look for APB underneath. */ - sabre_pbm_init(p, dp, vdma[0], vdma[0] + vdma[1]); + sabre_pbm_init(p, pnode, vdma[0]); } diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 75ade83ec..7fe4de03a 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "pci_impl.h" #include "iommu_common.h" @@ -217,6 +216,210 @@ static struct pci_ops schizo_ops = { .write = schizo_write_pci_cfg, }; +/* SCHIZO interrupt mapping support. Unlike Psycho, for this controller the + * imap/iclr registers are per-PBM. + */ +#define SCHIZO_IMAP_BASE 0x1000UL +#define SCHIZO_ICLR_BASE 0x1400UL + +static unsigned long schizo_imap_offset(unsigned long ino) +{ + return SCHIZO_IMAP_BASE + (ino * 8UL); +} + +static unsigned long schizo_iclr_offset(unsigned long ino) +{ + return SCHIZO_ICLR_BASE + (ino * 8UL); +} + +/* PCI SCHIZO INO number to Sparc PIL level. This table only matters for + * INOs which will not have an associated PCI device struct, ie. onboard + * EBUS devices and PCI controller internal error interrupts. + */ +static unsigned char schizo_pil_table[] = { +/*0x00*/0, 0, 0, 0, /* PCI slot 0 Int A, B, C, D */ +/*0x04*/0, 0, 0, 0, /* PCI slot 1 Int A, B, C, D */ +/*0x08*/0, 0, 0, 0, /* PCI slot 2 Int A, B, C, D */ +/*0x0c*/0, 0, 0, 0, /* PCI slot 3 Int A, B, C, D */ +/*0x10*/0, 0, 0, 0, /* PCI slot 4 Int A, B, C, D */ +/*0x14*/0, 0, 0, 0, /* PCI slot 5 Int A, B, C, D */ +/*0x18*/5, /* SCSI */ +/*0x19*/5, /* second SCSI */ +/*0x1a*/0, /* UNKNOWN */ +/*0x1b*/0, /* UNKNOWN */ +/*0x1c*/8, /* Parallel */ +/*0x1d*/5, /* Ethernet */ +/*0x1e*/8, /* Firewire-1394 */ +/*0x1f*/9, /* USB */ +/*0x20*/13, /* Audio Record */ +/*0x21*/14, /* Audio Playback */ +/*0x22*/12, /* Serial */ +/*0x23*/5, /* EBUS I2C */ +/*0x24*/10, /* RTC Clock */ +/*0x25*/11, /* Floppy */ +/*0x26*/0, /* UNKNOWN */ +/*0x27*/0, /* UNKNOWN */ +/*0x28*/0, /* UNKNOWN */ +/*0x29*/0, /* UNKNOWN */ +/*0x2a*/10, /* UPA 1 */ +/*0x2b*/10, /* UPA 2 */ +/*0x2c*/0, /* UNKNOWN */ +/*0x2d*/0, /* UNKNOWN */ +/*0x2e*/0, /* UNKNOWN */ +/*0x2f*/0, /* UNKNOWN */ +/*0x30*/15, /* Uncorrectable ECC */ +/*0x31*/15, /* Correctable ECC */ +/*0x32*/15, /* PCI Bus A Error */ +/*0x33*/15, /* PCI Bus B Error */ +/*0x34*/15, /* Safari Bus Error */ +/*0x35*/0, /* Reserved */ +/*0x36*/0, /* Reserved */ +/*0x37*/0, /* Reserved */ +/*0x38*/0, /* Reserved for NewLink */ +/*0x39*/0, /* Reserved for NewLink */ +/*0x3a*/0, /* Reserved for NewLink */ +/*0x3b*/0, /* Reserved for NewLink */ +/*0x3c*/0, /* Reserved for NewLink */ +/*0x3d*/0, /* Reserved for NewLink */ +/*0x3e*/0, /* Reserved for NewLink */ +/*0x3f*/0, /* Reserved for NewLink */ +}; + +static int schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) +{ + int ret; + + if (pdev && + pdev->vendor == PCI_VENDOR_ID_SUN && + pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) + return 9; + + ret = schizo_pil_table[ino]; + if (ret == 0 && pdev == NULL) { + ret = 5; + } else if (ret == 0) { + switch ((pdev->class >> 16) & 0xff) { + case PCI_BASE_CLASS_STORAGE: + ret = 5; + break; + + case PCI_BASE_CLASS_NETWORK: + ret = 6; + break; + + case PCI_BASE_CLASS_DISPLAY: + ret = 9; + break; + + case PCI_BASE_CLASS_MULTIMEDIA: + case PCI_BASE_CLASS_MEMORY: + case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: + ret = 10; + break; + + default: + ret = 5; + break; + }; + } + + return ret; +} + +static void tomatillo_wsync_handler(struct ino_bucket *bucket, void *_arg1, void *_arg2) +{ + unsigned long sync_reg = (unsigned long) _arg2; + u64 mask = 1UL << (__irq_ino(__irq(bucket)) & IMAP_INO); + u64 val; + int limit; + + schizo_write(sync_reg, mask); + + limit = 100000; + val = 0; + while (--limit) { + val = schizo_read(sync_reg); + if (!(val & mask)) + break; + } + if (limit <= 0) { + printk("tomatillo_wsync_handler: DMA won't sync [%lx:%lx]\n", + val, mask); + } + + if (_arg1) { + static unsigned char cacheline[64] + __attribute__ ((aligned (64))); + + __asm__ __volatile__("rd %%fprs, %0\n\t" + "or %0, %4, %1\n\t" + "wr %1, 0x0, %%fprs\n\t" + "stda %%f0, [%5] %6\n\t" + "wr %0, 0x0, %%fprs\n\t" + "membar #Sync" + : "=&r" (mask), "=&r" (val) + : "0" (mask), "1" (val), + "i" (FPRS_FEF), "r" (&cacheline[0]), + "i" (ASI_BLK_COMMIT_P)); + } +} + +static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int ino) +{ + struct ino_bucket *bucket; + unsigned long imap, iclr; + unsigned long imap_off, iclr_off; + int pil, ign_fixup; + + ino &= PCI_IRQ_INO; + imap_off = schizo_imap_offset(ino); + + /* Now build the IRQ bucket. */ + pil = schizo_ino_to_pil(pdev, ino); + + if (PIL_RESERVED(pil)) + BUG(); + + imap = pbm->pbm_regs + imap_off; + imap += 4; + + iclr_off = schizo_iclr_offset(ino); + iclr = pbm->pbm_regs + iclr_off; + iclr += 4; + + /* On Schizo, no inofixup occurs. This is because each + * INO has it's own IMAP register. On Psycho and Sabre + * there is only one IMAP register for each PCI slot even + * though four different INOs can be generated by each + * PCI slot. + * + * But, for JBUS variants (essentially, Tomatillo), we have + * to fixup the lowest bit of the interrupt group number. + */ + ign_fixup = 0; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { + if (pbm->portid & 1) + ign_fixup = (1 << 6); + } + + bucket = __bucket(build_irq(pil, ign_fixup, iclr, imap)); + bucket->flags |= IBF_PCI; + + if (pdev && pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { + struct irq_desc *p = bucket->irq_info; + + p->pre_handler = tomatillo_wsync_handler; + p->pre_handler_arg1 = ((pbm->chip_version <= 4) ? + (void *) 1 : (void *) 0); + p->pre_handler_arg2 = (void *) pbm->sync_reg; + } + + return __irq(bucket); +} + /* SCHIZO error handling support. */ enum schizo_error_type { UE_ERR, CE_ERR, PCI_ERR, SAFARI_ERR @@ -252,6 +455,35 @@ struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) return &p->pbm_A; } +static void schizo_clear_other_err_intr(struct pci_controller_info *p, int irq) +{ + struct pci_pbm_info *pbm; + struct ino_bucket *bucket; + unsigned long iclr; + + /* Do not clear the interrupt for the other PCI bus. + * + * This "ACK both PBM IRQs" only needs to be performed + * for chip-wide error interrupts. + */ + if ((irq & IMAP_INO) == SCHIZO_PCIERR_A_INO || + (irq & IMAP_INO) == SCHIZO_PCIERR_B_INO) + return; + + pbm = pbm_for_ino(p, irq); + if (pbm == &p->pbm_A) + pbm = &p->pbm_B; + else + pbm = &p->pbm_A; + + irq = schizo_irq_build(pbm, NULL, + (pbm->portid << 6) | (irq & IMAP_INO)); + bucket = __bucket(irq); + iclr = bucket->iclr; + + upa_writel(ICLR_IDLE, iclr); +} + #define SCHIZO_STC_ERR 0xb800UL /* --> 0xba00 */ #define SCHIZO_STC_TAG 0xba00UL /* --> 0xba80 */ #define SCHIZO_STC_LINE 0xbb00UL /* --> 0xbb80 */ @@ -582,6 +814,8 @@ static irqreturn_t schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs) /* Interrogate IOMMU for error status. */ schizo_check_iommu_error(p, UE_ERR); + schizo_clear_other_err_intr(p, irq); + return IRQ_HANDLED; } @@ -671,6 +905,8 @@ static irqreturn_t schizo_ce_intr(int irq, void *dev_id, struct pt_regs *regs) printk("(none)"); printk("]\n"); + schizo_clear_other_err_intr(p, irq); + return IRQ_HANDLED; } @@ -891,6 +1127,8 @@ static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *reg if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR)) pci_scan_for_parity_error(p, pbm, pbm->pci_bus); + schizo_clear_other_err_intr(p, irq); + return IRQ_HANDLED; } @@ -946,6 +1184,7 @@ static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id, struct pt_regs * printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", p->index, errlog); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -953,6 +1192,7 @@ static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id, struct pt_regs * p->index); schizo_check_iommu_error(p, SAFARI_ERR); + schizo_clear_other_err_intr(p, irq); return IRQ_HANDLED; } @@ -984,47 +1224,77 @@ static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id, struct pt_regs * static void tomatillo_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm; - struct of_device *op; + unsigned int irq; + struct ino_bucket *bucket; u64 tmp, err_mask, err_no_mask; - /* Tomatillo IRQ property layout is: - * 0: PCIERR - * 1: UE ERR - * 2: CE ERR - * 3: SERR - * 4: POWER FAIL? - */ - + /* Build IRQs and register handlers. */ pbm = pbm_for_ino(p, SCHIZO_UE_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED, - "TOMATILLO_UE", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_UE_INO); + if (request_irq(irq, schizo_ue_intr, + SA_SHIRQ, "TOMATILLO UE", p) < 0) { + prom_printf("%s: Cannot register UE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_UE_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_CE_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED, - "TOMATILLO CE", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_CE_INO); + if (request_irq(irq, schizo_ce_intr, + SA_SHIRQ, "TOMATILLO CE", p) < 0) { + prom_printf("%s: Cannot register CE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_CE_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, - "TOMATILLO PCIERR-A", pbm); - + irq = schizo_irq_build(pbm, NULL, ((pbm->portid << 6) | + SCHIZO_PCIERR_A_INO)); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "TOMATILLO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM A PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_PCIERR_A_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, - "TOMATILLO PCIERR-B", pbm); + irq = schizo_irq_build(pbm, NULL, ((pbm->portid << 6) | + SCHIZO_PCIERR_B_INO)); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "TOMATILLO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM B PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_PCIERR_B_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_SERR_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED, - "TOMATILLO SERR", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_SERR_INO); + if (request_irq(irq, schizo_safarierr_intr, + SA_SHIRQ, "TOMATILLO SERR", p) < 0) { + prom_printf("%s: Cannot register SafariERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_SERR_INO) + 4)); /* Enable UE and CE interrupts for controller. */ schizo_write(p->pbm_A.controller_regs + SCHIZO_ECC_CTRL, @@ -1092,47 +1362,70 @@ static void tomatillo_register_error_handlers(struct pci_controller_info *p) static void schizo_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm; - struct of_device *op; + unsigned int irq; + struct ino_bucket *bucket; u64 tmp, err_mask, err_no_mask; - /* Schizo IRQ property layout is: - * 0: PCIERR - * 1: UE ERR - * 2: CE ERR - * 3: SERR - * 4: POWER FAIL? - */ - + /* Build IRQs and register handlers. */ pbm = pbm_for_ino(p, SCHIZO_UE_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED, - "SCHIZO_UE", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_UE_INO); + if (request_irq(irq, schizo_ue_intr, + SA_SHIRQ, "SCHIZO UE", p) < 0) { + prom_printf("%s: Cannot register UE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_UE_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_CE_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED, - "SCHIZO CE", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_CE_INO); + if (request_irq(irq, schizo_ce_intr, + SA_SHIRQ, "SCHIZO CE", p) < 0) { + prom_printf("%s: Cannot register CE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_CE_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, - "SCHIZO PCIERR-A", pbm); - + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_PCIERR_A_INO); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "SCHIZO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM A PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_PCIERR_A_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, - "SCHIZO PCIERR-B", pbm); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_PCIERR_B_INO); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "SCHIZO PCIERR", &p->pbm_B) < 0) { + prom_printf("%s: Cannot register PBM B PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_PCIERR_B_INO) + 4)); pbm = pbm_for_ino(p, SCHIZO_SERR_INO); - op = of_find_device_by_node(pbm->prom_node); - if (op) - request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED, - "SCHIZO SERR", p); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_SERR_INO); + if (request_irq(irq, schizo_safarierr_intr, + SA_SHIRQ, "SCHIZO SERR", p) < 0) { + prom_printf("%s: Cannot register SafariERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_SERR_INO) + 4)); /* Enable UE and CE interrupts for controller. */ schizo_write(p->pbm_A.controller_regs + SCHIZO_ECC_CTRL, @@ -1267,12 +1560,10 @@ static void __schizo_scan_bus(struct pci_controller_info *p, pbm_config_busmastering(&p->pbm_B); p->pbm_B.is_66mhz_capable = - (of_find_property(p->pbm_B.prom_node, "66mhz-capable", NULL) - != NULL); + prom_getbool(p->pbm_B.prom_node, "66mhz-capable"); pbm_config_busmastering(&p->pbm_A); p->pbm_A.is_66mhz_capable = - (of_find_property(p->pbm_A.prom_node, "66mhz-capable", NULL) - != NULL); + prom_getbool(p->pbm_A.prom_node, "66mhz-capable"); pbm_scan_bus(p, &p->pbm_B); pbm_scan_bus(p, &p->pbm_A); @@ -1474,18 +1765,13 @@ static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm) { struct pci_iommu *iommu = pbm->iommu; unsigned long i, tagbase, database; - struct property *prop; u32 vdma[2], dma_mask; u64 control; - int tsbsize; - - prop = of_find_property(pbm->prom_node, "virtual-dma", NULL); - if (prop) { - u32 *val = prop->value; + int err, tsbsize; - vdma[0] = val[0]; - vdma[1] = val[1]; - } else { + err = prom_getproperty(pbm->prom_node, "virtual-dma", + (char *)&vdma[0], sizeof(vdma)); + if (err == 0 || err == -1) { /* No property, use default values. */ vdma[0] = 0xc0000000; vdma[1] = 0x40000000; @@ -1596,7 +1882,6 @@ static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm) static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) { - struct property *prop; u64 tmp; schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, 5); @@ -1610,8 +1895,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) pbm->chip_version >= 0x2) tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; - prop = of_find_property(pbm->prom_node, "no-bus-parking", NULL); - if (!prop) + if (!prom_getbool(pbm->prom_node, "no-bus-parking")) tmp |= SCHIZO_PCICTRL_PARK; else tmp &= ~SCHIZO_PCICTRL_PARK; @@ -1651,17 +1935,16 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) } static void schizo_pbm_init(struct pci_controller_info *p, - struct device_node *dp, u32 portid, + int prom_node, u32 portid, int chip_type) { - struct linux_prom64_registers *regs; - struct property *prop; - unsigned int *busrange; + struct linux_prom64_registers pr_regs[4]; + unsigned int busrange[2]; struct pci_pbm_info *pbm; const char *chipset_name; - u32 *ino_bitmap; + u32 ino_bitmap[2]; int is_pbm_a; - int len; + int err; switch (chip_type) { case PBM_CHIP_TYPE_TOMATILLO: @@ -1689,10 +1972,16 @@ static void schizo_pbm_init(struct pci_controller_info *p, * 3) PBM PCI config space * 4) Ichip regs */ - prop = of_find_property(dp, "reg", NULL); - regs = prop->value; + err = prom_getproperty(prom_node, "reg", + (char *)&pr_regs[0], + sizeof(pr_regs)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no reg property.\n", + chipset_name); + prom_halt(); + } - is_pbm_a = ((regs[0].phys_addr & 0x00700000) == 0x00600000); + is_pbm_a = ((pr_regs[0].phys_addr & 0x00700000) == 0x00600000); if (is_pbm_a) pbm = &p->pbm_A; @@ -1701,62 +1990,92 @@ static void schizo_pbm_init(struct pci_controller_info *p, pbm->portid = portid; pbm->parent = p; - pbm->prom_node = dp; + pbm->prom_node = prom_node; pbm->pci_first_slot = 1; pbm->chip_type = chip_type; - pbm->chip_version = 0; - prop = of_find_property(dp, "version#", NULL); - if (prop) - pbm->chip_version = *(int *) prop->value; - pbm->chip_revision = 0; - prop = of_find_property(dp, "module-revision#", NULL); - if (prop) - pbm->chip_revision = *(int *) prop->value; - - pbm->pbm_regs = regs[0].phys_addr; - pbm->controller_regs = regs[1].phys_addr - 0x10000UL; + pbm->chip_version = + prom_getintdefault(prom_node, "version#", 0); + pbm->chip_revision = + prom_getintdefault(prom_node, "module-revision#", 0); + + pbm->pbm_regs = pr_regs[0].phys_addr; + pbm->controller_regs = pr_regs[1].phys_addr - 0x10000UL; if (chip_type == PBM_CHIP_TYPE_TOMATILLO) - pbm->sync_reg = regs[3].phys_addr + 0x1a18UL; + pbm->sync_reg = pr_regs[3].phys_addr + 0x1a18UL; - pbm->name = dp->full_name; + sprintf(pbm->name, + (chip_type == PBM_CHIP_TYPE_TOMATILLO ? + "TOMATILLO%d PBM%c" : + "SCHIZO%d PBM%c"), + p->index, + (pbm == &p->pbm_A ? 'A' : 'B')); - printk("%s: %s PCI Bus Module ver[%x:%x]\n", + printk("%s: ver[%x:%x], portid %x, " + "cregs[%lx] pregs[%lx]\n", pbm->name, - (chip_type == PBM_CHIP_TYPE_TOMATILLO ? - "TOMATILLO" : "SCHIZO"), - pbm->chip_version, pbm->chip_revision); + pbm->chip_version, pbm->chip_revision, + pbm->portid, + pbm->controller_regs, + pbm->pbm_regs); schizo_pbm_hw_init(pbm); - prop = of_find_property(dp, "ranges", &len); - pbm->pbm_ranges = prop->value; + prom_getstring(prom_node, "name", + pbm->prom_name, + sizeof(pbm->prom_name)); + + err = prom_getproperty(prom_node, "ranges", + (char *) pbm->pbm_ranges, + sizeof(pbm->pbm_ranges)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no ranges property.\n", + pbm->name); + prom_halt(); + } + pbm->num_pbm_ranges = - (len / sizeof(struct linux_prom_pci_ranges)); + (err / sizeof(struct linux_prom_pci_ranges)); schizo_determine_mem_io_space(pbm); pbm_register_toplevel_resources(p, pbm); - prop = of_find_property(dp, "interrupt-map", &len); - if (prop) { - pbm->pbm_intmap = prop->value; - pbm->num_pbm_intmap = - (len / sizeof(struct linux_prom_pci_intmap)); - - prop = of_find_property(dp, "interrupt-map-mask", NULL); - pbm->pbm_intmask = prop->value; + err = prom_getproperty(prom_node, "interrupt-map", + (char *)pbm->pbm_intmap, + sizeof(pbm->pbm_intmap)); + if (err != -1) { + pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(prom_node, "interrupt-map-mask", + (char *)&pbm->pbm_intmask, + sizeof(pbm->pbm_intmask)); + if (err == -1) { + prom_printf("%s: Fatal error, no " + "interrupt-map-mask.\n", pbm->name); + prom_halt(); + } } else { pbm->num_pbm_intmap = 0; + memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); } - prop = of_find_property(dp, "ino-bitmap", NULL); - ino_bitmap = prop->value; + err = prom_getproperty(prom_node, "ino-bitmap", + (char *) &ino_bitmap[0], + sizeof(ino_bitmap)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no ino-bitmap.\n", pbm->name); + prom_halt(); + } pbm->ino_bitmap = (((u64)ino_bitmap[1] << 32UL) | ((u64)ino_bitmap[0] << 0UL)); - prop = of_find_property(dp, "bus-range", NULL); - busrange = prop->value; + err = prom_getproperty(prom_node, "bus-range", + (char *)&busrange[0], + sizeof(busrange)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no bus-range.\n", pbm->name); + prom_halt(); + } pbm->pci_first_busno = busrange[0]; pbm->pci_last_busno = busrange[1]; @@ -1774,20 +2093,16 @@ static inline int portid_compare(u32 x, u32 y, int chip_type) return (x == y); } -static void __schizo_init(struct device_node *dp, char *model_name, int chip_type) +static void __schizo_init(int node, char *model_name, int chip_type) { struct pci_controller_info *p; struct pci_iommu *iommu; - struct property *prop; int is_pbm_a; u32 portid; - portid = 0xff; - prop = of_find_property(dp, "portid", NULL); - if (prop) - portid = *(u32 *) prop->value; + portid = prom_getintdefault(node, "portid", 0xff); - for (p = pci_controller_root; p; p = p->next) { + for(p = pci_controller_root; p; p = p->next) { struct pci_pbm_info *pbm; if (p->pbm_A.prom_node && p->pbm_B.prom_node) @@ -1798,8 +2113,8 @@ static void __schizo_init(struct device_node *dp, char *model_name, int chip_typ &p->pbm_B); if (portid_compare(pbm->portid, portid, chip_type)) { - is_pbm_a = (p->pbm_A.prom_node == NULL); - schizo_pbm_init(p, dp, portid, chip_type); + is_pbm_a = (p->pbm_A.prom_node == 0); + schizo_pbm_init(p, node, portid, chip_type); return; } } @@ -1832,6 +2147,7 @@ static void __schizo_init(struct device_node *dp, char *model_name, int chip_typ p->scan_bus = (chip_type == PBM_CHIP_TYPE_TOMATILLO ? tomatillo_scan_bus : schizo_scan_bus); + p->irq_build = schizo_irq_build; p->base_address_update = schizo_base_address_update; p->resource_adjust = schizo_resource_adjust; p->pci_ops = &schizo_ops; @@ -1839,20 +2155,20 @@ static void __schizo_init(struct device_node *dp, char *model_name, int chip_typ /* Like PSYCHO we have a 2GB aligned area for memory space. */ pci_memspace_mask = 0x7fffffffUL; - schizo_pbm_init(p, dp, portid, chip_type); + schizo_pbm_init(p, node, portid, chip_type); } -void schizo_init(struct device_node *dp, char *model_name) +void schizo_init(int node, char *model_name) { - __schizo_init(dp, model_name, PBM_CHIP_TYPE_SCHIZO); + __schizo_init(node, model_name, PBM_CHIP_TYPE_SCHIZO); } -void schizo_plus_init(struct device_node *dp, char *model_name) +void schizo_plus_init(int node, char *model_name) { - __schizo_init(dp, model_name, PBM_CHIP_TYPE_SCHIZO_PLUS); + __schizo_init(node, model_name, PBM_CHIP_TYPE_SCHIZO_PLUS); } -void tomatillo_init(struct device_node *dp, char *model_name) +void tomatillo_init(int node, char *model_name) { - __schizo_init(dp, model_name, PBM_CHIP_TYPE_TOMATILLO); + __schizo_init(node, model_name, PBM_CHIP_TYPE_TOMATILLO); } diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 03ad4c067..0c0895202 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "pci_impl.h" #include "iommu_common.h" @@ -647,37 +646,35 @@ static int pdev_htab_add(u32 devhandle, unsigned int bus, unsigned int device, u /* Recursively descend into the OBP device tree, rooted at toplevel_node, * looking for a PCI device matching bus and devfn. */ -static int obp_find(struct device_node *toplevel_node, unsigned int bus, unsigned int devfn) +static int obp_find(struct linux_prom_pci_registers *pregs, int toplevel_node, unsigned int bus, unsigned int devfn) { - toplevel_node = toplevel_node->child; + toplevel_node = prom_getchild(toplevel_node); - while (toplevel_node != NULL) { - struct linux_prom_pci_registers *regs; - struct property *prop; - int ret; + while (toplevel_node != 0) { + int ret = obp_find(pregs, toplevel_node, bus, devfn); - ret = obp_find(toplevel_node, bus, devfn); if (ret != 0) return ret; - prop = of_find_property(toplevel_node, "reg", NULL); - if (!prop) + ret = prom_getproperty(toplevel_node, "reg", (char *) pregs, + sizeof(*pregs) * PROMREG_MAX); + if (ret == 0 || ret == -1) goto next_sibling; - regs = prop->value; - if (((regs->phys_hi >> 16) & 0xff) == bus && - ((regs->phys_hi >> 8) & 0xff) == devfn) + if (((pregs[0].phys_hi >> 16) & 0xff) == bus && + ((pregs[0].phys_hi >> 8) & 0xff) == devfn) break; next_sibling: - toplevel_node = toplevel_node->sibling; + toplevel_node = prom_getsibling(toplevel_node); } - return toplevel_node != NULL; + return toplevel_node; } static int pdev_htab_populate(struct pci_pbm_info *pbm) { + struct linux_prom_pci_registers pr[PROMREG_MAX]; u32 devhandle = pbm->devhandle; unsigned int bus; @@ -688,7 +685,7 @@ static int pdev_htab_populate(struct pci_pbm_info *pbm) unsigned int device = PCI_SLOT(devfn); unsigned int func = PCI_FUNC(devfn); - if (obp_find(pbm->prom_node, bus, devfn)) { + if (obp_find(pr, pbm->prom_node, bus, devfn)) { int err = pdev_htab_add(devhandle, bus, device, func); if (err) @@ -814,7 +811,8 @@ static void pbm_scan_bus(struct pci_controller_info *p, pci_fixup_host_bridge_self(pbm->pci_bus); pbm->pci_bus->self->sysdata = cookie; #endif - pci_fill_in_pbm_cookies(pbm->pci_bus, pbm, pbm->prom_node); + pci_fill_in_pbm_cookies(pbm->pci_bus, pbm, + pbm->prom_node); pci_record_assignments(pbm, pbm->pci_bus); pci_assign_unassigned(pbm, pbm->pci_bus); pci_fixup_irq(pbm, pbm->pci_bus); @@ -824,18 +822,15 @@ static void pbm_scan_bus(struct pci_controller_info *p, static void pci_sun4v_scan_bus(struct pci_controller_info *p) { - struct property *prop; - struct device_node *dp; - - if ((dp = p->pbm_A.prom_node) != NULL) { - prop = of_find_property(dp, "66mhz-capable", NULL); - p->pbm_A.is_66mhz_capable = (prop != NULL); + if (p->pbm_A.prom_node) { + p->pbm_A.is_66mhz_capable = + prom_getbool(p->pbm_A.prom_node, "66mhz-capable"); pbm_scan_bus(p, &p->pbm_A); } - if ((dp = p->pbm_B.prom_node) != NULL) { - prop = of_find_property(dp, "66mhz-capable", NULL); - p->pbm_B.is_66mhz_capable = (prop != NULL); + if (p->pbm_B.prom_node) { + p->pbm_B.is_66mhz_capable = + prom_getbool(p->pbm_B.prom_node, "66mhz-capable"); pbm_scan_bus(p, &p->pbm_B); } @@ -843,6 +838,45 @@ static void pci_sun4v_scan_bus(struct pci_controller_info *p) /* XXX register error interrupt handlers XXX */ } +static unsigned int pci_sun4v_irq_build(struct pci_pbm_info *pbm, + struct pci_dev *pdev, + unsigned int devino) +{ + u32 devhandle = pbm->devhandle; + int pil; + + pil = 5; + if (pdev) { + switch ((pdev->class >> 16) & 0xff) { + case PCI_BASE_CLASS_STORAGE: + pil = 5; + break; + + case PCI_BASE_CLASS_NETWORK: + pil = 6; + break; + + case PCI_BASE_CLASS_DISPLAY: + pil = 9; + break; + + case PCI_BASE_CLASS_MULTIMEDIA: + case PCI_BASE_CLASS_MEMORY: + case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: + pil = 10; + break; + + default: + pil = 5; + break; + }; + } + BUG_ON(PIL_RESERVED(pil)); + + return sun4v_build_irq(devhandle, devino, pil, IBF_PCI); +} + static void pci_sun4v_base_address_update(struct pci_dev *pdev, int resource) { struct pcidev_cookie *pcp = pdev->sysdata; @@ -978,13 +1012,8 @@ static unsigned long probe_existing_entries(struct pci_pbm_info *pbm, HV_PCI_TSBID(0, i), &io_attrs, &ra); if (ret == HV_EOK) { - if (page_in_phys_avail(ra)) { - pci_sun4v_iommu_demap(devhandle, - HV_PCI_TSBID(0, i), 1); - } else { - cnt++; - __set_bit(i, arena->map); - } + cnt++; + __set_bit(i, arena->map); } } @@ -994,18 +1023,13 @@ static unsigned long probe_existing_entries(struct pci_pbm_info *pbm, static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) { struct pci_iommu *iommu = pbm->iommu; - struct property *prop; unsigned long num_tsb_entries, sz; u32 vdma[2], dma_mask, dma_offset; - int tsbsize; - - prop = of_find_property(pbm->prom_node, "virtual-dma", NULL); - if (prop) { - u32 *val = prop->value; + int err, tsbsize; - vdma[0] = val[0]; - vdma[1] = val[1]; - } else { + err = prom_getproperty(pbm->prom_node, "virtual-dma", + (char *)&vdma[0], sizeof(vdma)); + if (err == 0 || err == -1) { /* No property, use default values. */ vdma[0] = 0x80000000; vdma[1] = 0x80000000; @@ -1057,30 +1081,34 @@ static void pci_sun4v_iommu_init(struct pci_pbm_info *pbm) iommu->arena.limit = num_tsb_entries; sz = probe_existing_entries(pbm, iommu); - if (sz) - printk("%s: Imported %lu TSB entries from OBP\n", - pbm->name, sz); + + printk("%s: TSB entries [%lu], existing mapings [%lu]\n", + pbm->name, num_tsb_entries, sz); } static void pci_sun4v_get_bus_range(struct pci_pbm_info *pbm) { - struct property *prop; - unsigned int *busrange; - - prop = of_find_property(pbm->prom_node, "bus-range", NULL); - - busrange = prop->value; + unsigned int busrange[2]; + int prom_node = pbm->prom_node; + int err; + + err = prom_getproperty(prom_node, "bus-range", + (char *)&busrange[0], + sizeof(busrange)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no bus-range.\n", pbm->name); + prom_halt(); + } pbm->pci_first_busno = busrange[0]; pbm->pci_last_busno = busrange[1]; } -static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node *dp, u32 devhandle) +static void pci_sun4v_pbm_init(struct pci_controller_info *p, int prom_node, u32 devhandle) { struct pci_pbm_info *pbm; - struct property *prop; - int len, i; + int err, i; if (devhandle & 0x40) pbm = &p->pbm_B; @@ -1088,19 +1116,32 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node pbm = &p->pbm_A; pbm->parent = p; - pbm->prom_node = dp; + pbm->prom_node = prom_node; pbm->pci_first_slot = 1; pbm->devhandle = devhandle; - pbm->name = dp->full_name; + sprintf(pbm->name, "SUN4V-PCI%d PBM%c", + p->index, (pbm == &p->pbm_A ? 'A' : 'B')); - printk("%s: SUN4V PCI Bus Module\n", pbm->name); + printk("%s: devhandle[%x] prom_node[%x:%x]\n", + pbm->name, pbm->devhandle, + pbm->prom_node, prom_getchild(pbm->prom_node)); + + prom_getstring(prom_node, "name", + pbm->prom_name, sizeof(pbm->prom_name)); + + err = prom_getproperty(prom_node, "ranges", + (char *) pbm->pbm_ranges, + sizeof(pbm->pbm_ranges)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no ranges property.\n", + pbm->name); + prom_halt(); + } - prop = of_find_property(dp, "ranges", &len); - pbm->pbm_ranges = prop->value; pbm->num_pbm_ranges = - (len / sizeof(struct linux_prom_pci_ranges)); + (err / sizeof(struct linux_prom_pci_ranges)); /* Mask out the top 8 bits of the ranges, leaving the real * physical address. @@ -1111,13 +1152,24 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node pci_sun4v_determine_mem_io_space(pbm); pbm_register_toplevel_resources(p, pbm); - prop = of_find_property(dp, "interrupt-map", &len); - pbm->pbm_intmap = prop->value; - pbm->num_pbm_intmap = - (len / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(prom_node, "interrupt-map", + (char *)pbm->pbm_intmap, + sizeof(pbm->pbm_intmap)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no interrupt-map property.\n", + pbm->name); + prom_halt(); + } - prop = of_find_property(dp, "interrupt-map-mask", NULL); - pbm->pbm_intmask = prop->value; + pbm->num_pbm_intmap = (err / sizeof(struct linux_prom_pci_intmap)); + err = prom_getproperty(prom_node, "interrupt-map-mask", + (char *)&pbm->pbm_intmask, + sizeof(pbm->pbm_intmask)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no interrupt-map-mask.\n", + pbm->name); + prom_halt(); + } pci_sun4v_get_bus_range(pbm); pci_sun4v_iommu_init(pbm); @@ -1125,19 +1177,16 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node pdev_htab_populate(pbm); } -void sun4v_pci_init(struct device_node *dp, char *model_name) +void sun4v_pci_init(int node, char *model_name) { struct pci_controller_info *p; struct pci_iommu *iommu; - struct property *prop; - struct linux_prom64_registers *regs; + struct linux_prom64_registers regs; u32 devhandle; int i; - prop = of_find_property(dp, "reg", NULL); - regs = prop->value; - - devhandle = (regs->phys_addr >> 32UL) & 0x0fffffff; + prom_getproperty(node, "reg", (char *)®s, sizeof(regs)); + devhandle = (regs.phys_addr >> 32UL) & 0x0fffffff; for (p = pci_controller_root; p; p = p->next) { struct pci_pbm_info *pbm; @@ -1150,7 +1199,7 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) &p->pbm_B); if (pbm->devhandle == (devhandle ^ 0x40)) { - pci_sun4v_pbm_init(p, dp, devhandle); + pci_sun4v_pbm_init(p, node, devhandle); return; } } @@ -1191,6 +1240,7 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) p->pbms_same_domain = 0; p->scan_bus = pci_sun4v_scan_bus; + p->irq_build = pci_sun4v_irq_build; p->base_address_update = pci_sun4v_base_address_update; p->resource_adjust = pci_sun4v_resource_adjust; p->pci_ops = &pci_sun4v_ops; @@ -1200,7 +1250,7 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) */ pci_memspace_mask = 0x7fffffffUL; - pci_sun4v_pbm_init(p, dp, devhandle); + pci_sun4v_pbm_init(p, node, devhandle); return; fatal_memory_error: diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c index e55466c77..30bcaf58e 100644 --- a/arch/sparc64/kernel/power.c +++ b/arch/sparc64/kernel/power.c @@ -6,6 +6,7 @@ #define __KERNEL_SYSCALLS__ +#include #include #include #include @@ -16,10 +17,9 @@ #include #include +#include +#include #include -#include -#include -#include #include @@ -30,7 +30,6 @@ int scons_pwroff = 1; #ifdef CONFIG_PCI -#include static void __iomem *power_reg; static DECLARE_WAIT_QUEUE_HEAD(powerd_wait); @@ -106,61 +105,87 @@ again: return 0; } -static int __init has_button_interrupt(unsigned int irq, struct device_node *dp) +static int __init has_button_interrupt(unsigned int irq, int prom_node) { if (irq == PCI_IRQ_NONE) return 0; - if (!of_find_property(dp, "button", NULL)) + if (!prom_node_has_property(prom_node, "button")) return 0; return 1; } -static int __devinit power_probe(struct of_device *op, const struct of_device_id *match) +static int __init power_probe_ebus(struct resource **resp, unsigned int *irq_p, int *prom_node_p) { - struct resource *res = &op->resource[0]; - unsigned int irq= op->irqs[0]; + struct linux_ebus *ebus; + struct linux_ebus_device *edev; + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, "power")) { + *resp = &edev->resource[0]; + *irq_p = edev->irqs[0]; + *prom_node_p = edev->prom_node; + return 0; + } + } + } + return -ENODEV; +} - power_reg = of_ioremap(res, 0, 0x4, "power"); +static int __init power_probe_isa(struct resource **resp, unsigned int *irq_p, int *prom_node_p) +{ + struct sparc_isa_bridge *isa_bus; + struct sparc_isa_device *isa_dev; + + for_each_isa(isa_bus) { + for_each_isadev(isa_dev, isa_bus) { + if (!strcmp(isa_dev->prom_name, "power")) { + *resp = &isa_dev->resource; + *irq_p = isa_dev->irq; + *prom_node_p = isa_dev->prom_node; + return 0; + } + } + } + return -ENODEV; +} + +void __init power_init(void) +{ + struct resource *res = NULL; + unsigned int irq; + int prom_node; + static int invoked; - printk("%s: Control reg at %lx ... ", - op->node->name, res->start); + if (invoked) + return; + invoked = 1; - poweroff_method = machine_halt; /* able to use the standard halt */ + if (!power_probe_ebus(&res, &irq, &prom_node)) + goto found; - if (has_button_interrupt(irq, op->node)) { + if (!power_probe_isa(&res, &irq, &prom_node)) + goto found; + + return; + +found: + power_reg = ioremap(res->start, 0x4); + printk("power: Control reg at %p ... ", power_reg); + poweroff_method = machine_halt; /* able to use the standard halt */ + if (has_button_interrupt(irq, prom_node)) { if (kernel_thread(powerd, NULL, CLONE_FS) < 0) { printk("Failed to start power daemon.\n"); - return 0; + return; } printk("powerd running.\n"); if (request_irq(irq, - power_handler, 0, "power", NULL) < 0) + power_handler, SA_SHIRQ, "power", NULL) < 0) printk("power: Error, cannot register IRQ handler.\n"); } else { printk("not using powerd.\n"); } - - return 0; -} - -static struct of_device_id power_match[] = { - { - .name = "power", - }, - {}, -}; - -static struct of_platform_driver power_driver = { - .name = "power", - .match_table = power_match, - .probe = power_probe, -}; - -void __init power_init(void) -{ - of_register_driver(&power_driver, &of_bus_type); - return; } #endif /* CONFIG_PCI */ diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 7d75cd4eb..1c7ca2f71 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -12,6 +12,7 @@ #include +#include #include #include #include @@ -25,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c deleted file mode 100644 index c60efb3cb..000000000 --- a/arch/sparc64/kernel/prom.c +++ /dev/null @@ -1,1577 +0,0 @@ -/* - * Procedures for creating, accessing and interpreting the device tree. - * - * Paul Mackerras August 1996. - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner. - * {engebret|bergner}@us.ibm.com - * - * Adapted for sparc64 by David S. Miller davem@davemloft.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. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -static struct device_node *allnodes; - -/* use when traversing tree through the allnext, child, sibling, - * or parent members of struct device_node. - */ -static DEFINE_RWLOCK(devtree_lock); - -int of_device_is_compatible(struct device_node *device, const char *compat) -{ - const char* cp; - int cplen, l; - - cp = (char *) of_get_property(device, "compatible", &cplen); - if (cp == NULL) - return 0; - while (cplen > 0) { - if (strncmp(cp, compat, strlen(compat)) == 0) - return 1; - l = strlen(cp) + 1; - cp += l; - cplen -= l; - } - - return 0; -} -EXPORT_SYMBOL(of_device_is_compatible); - -struct device_node *of_get_parent(const struct device_node *node) -{ - struct device_node *np; - - if (!node) - return NULL; - - np = node->parent; - - return np; -} -EXPORT_SYMBOL(of_get_parent); - -struct device_node *of_get_next_child(const struct device_node *node, - struct device_node *prev) -{ - struct device_node *next; - - next = prev ? prev->sibling : node->child; - for (; next != 0; next = next->sibling) { - break; - } - - return next; -} -EXPORT_SYMBOL(of_get_next_child); - -struct device_node *of_find_node_by_path(const char *path) -{ - struct device_node *np = allnodes; - - for (; np != 0; np = np->allnext) { - if (np->full_name != 0 && strcmp(np->full_name, path) == 0) - break; - } - - return np; -} -EXPORT_SYMBOL(of_find_node_by_path); - -struct device_node *of_find_node_by_phandle(phandle handle) -{ - struct device_node *np; - - for (np = allnodes; np != 0; np = np->allnext) - if (np->node == handle) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_phandle); - -struct device_node *of_find_node_by_name(struct device_node *from, - const char *name) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != NULL; np = np->allnext) - if (np->name != NULL && strcmp(np->name, name) == 0) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_name); - -struct device_node *of_find_node_by_type(struct device_node *from, - const char *type) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != 0; np = np->allnext) - if (np->type != 0 && strcmp(np->type, type) == 0) - break; - - return np; -} -EXPORT_SYMBOL(of_find_node_by_type); - -struct device_node *of_find_compatible_node(struct device_node *from, - const char *type, const char *compatible) -{ - struct device_node *np; - - np = from ? from->allnext : allnodes; - for (; np != 0; np = np->allnext) { - if (type != NULL - && !(np->type != 0 && strcmp(np->type, type) == 0)) - continue; - if (of_device_is_compatible(np, compatible)) - break; - } - - return np; -} -EXPORT_SYMBOL(of_find_compatible_node); - -struct property *of_find_property(struct device_node *np, const char *name, - int *lenp) -{ - struct property *pp; - - for (pp = np->properties; pp != 0; pp = pp->next) { - if (strcmp(pp->name, name) == 0) { - if (lenp != 0) - *lenp = pp->length; - break; - } - } - return pp; -} -EXPORT_SYMBOL(of_find_property); - -/* - * Find a property with a given name for a given node - * and return the value. - */ -void *of_get_property(struct device_node *np, const char *name, int *lenp) -{ - struct property *pp = of_find_property(np,name,lenp); - return pp ? pp->value : NULL; -} -EXPORT_SYMBOL(of_get_property); - -int of_getintprop_default(struct device_node *np, const char *name, int def) -{ - struct property *prop; - int len; - - prop = of_find_property(np, name, &len); - if (!prop || len != 4) - return def; - - return *(int *) prop->value; -} -EXPORT_SYMBOL(of_getintprop_default); - -int of_n_addr_cells(struct device_node *np) -{ - int* ip; - do { - if (np->parent) - np = np->parent; - ip = of_get_property(np, "#address-cells", NULL); - if (ip != NULL) - return *ip; - } while (np->parent); - /* No #address-cells property for the root node, default to 2 */ - return 2; -} -EXPORT_SYMBOL(of_n_addr_cells); - -int of_n_size_cells(struct device_node *np) -{ - int* ip; - do { - if (np->parent) - np = np->parent; - ip = of_get_property(np, "#size-cells", NULL); - if (ip != NULL) - return *ip; - } while (np->parent); - /* No #size-cells property for the root node, default to 1 */ - return 1; -} -EXPORT_SYMBOL(of_n_size_cells); - -int of_set_property(struct device_node *dp, const char *name, void *val, int len) -{ - struct property **prevp; - void *new_val; - int err; - - new_val = kmalloc(len, GFP_KERNEL); - if (!new_val) - return -ENOMEM; - - memcpy(new_val, val, len); - - err = -ENODEV; - - write_lock(&devtree_lock); - prevp = &dp->properties; - while (*prevp) { - struct property *prop = *prevp; - - if (!strcmp(prop->name, name)) { - void *old_val = prop->value; - int ret; - - ret = prom_setprop(dp->node, name, val, len); - err = -EINVAL; - if (ret >= 0) { - prop->value = new_val; - prop->length = len; - - if (OF_IS_DYNAMIC(prop)) - kfree(old_val); - - OF_MARK_DYNAMIC(prop); - - err = 0; - } - break; - } - prevp = &(*prevp)->next; - } - write_unlock(&devtree_lock); - - /* XXX Upate procfs if necessary... */ - - return err; -} -EXPORT_SYMBOL(of_set_property); - -static unsigned int prom_early_allocated; - -static void * __init prom_early_alloc(unsigned long size) -{ - void *ret; - - ret = __alloc_bootmem(size, SMP_CACHE_BYTES, 0UL); - if (ret != NULL) - memset(ret, 0, size); - - prom_early_allocated += size; - - return ret; -} - -#ifdef CONFIG_PCI -/* PSYCHO interrupt mapping support. */ -#define PSYCHO_IMAP_A_SLOT0 0x0c00UL -#define PSYCHO_IMAP_B_SLOT0 0x0c20UL -static unsigned long psycho_pcislot_imap_offset(unsigned long ino) -{ - unsigned int bus = (ino & 0x10) >> 4; - unsigned int slot = (ino & 0x0c) >> 2; - - if (bus == 0) - return PSYCHO_IMAP_A_SLOT0 + (slot * 8); - else - return PSYCHO_IMAP_B_SLOT0 + (slot * 8); -} - -#define PSYCHO_IMAP_SCSI 0x1000UL -#define PSYCHO_IMAP_ETH 0x1008UL -#define PSYCHO_IMAP_BPP 0x1010UL -#define PSYCHO_IMAP_AU_REC 0x1018UL -#define PSYCHO_IMAP_AU_PLAY 0x1020UL -#define PSYCHO_IMAP_PFAIL 0x1028UL -#define PSYCHO_IMAP_KMS 0x1030UL -#define PSYCHO_IMAP_FLPY 0x1038UL -#define PSYCHO_IMAP_SHW 0x1040UL -#define PSYCHO_IMAP_KBD 0x1048UL -#define PSYCHO_IMAP_MS 0x1050UL -#define PSYCHO_IMAP_SER 0x1058UL -#define PSYCHO_IMAP_TIM0 0x1060UL -#define PSYCHO_IMAP_TIM1 0x1068UL -#define PSYCHO_IMAP_UE 0x1070UL -#define PSYCHO_IMAP_CE 0x1078UL -#define PSYCHO_IMAP_A_ERR 0x1080UL -#define PSYCHO_IMAP_B_ERR 0x1088UL -#define PSYCHO_IMAP_PMGMT 0x1090UL -#define PSYCHO_IMAP_GFX 0x1098UL -#define PSYCHO_IMAP_EUPA 0x10a0UL - -static unsigned long __psycho_onboard_imap_off[] = { -/*0x20*/ PSYCHO_IMAP_SCSI, -/*0x21*/ PSYCHO_IMAP_ETH, -/*0x22*/ PSYCHO_IMAP_BPP, -/*0x23*/ PSYCHO_IMAP_AU_REC, -/*0x24*/ PSYCHO_IMAP_AU_PLAY, -/*0x25*/ PSYCHO_IMAP_PFAIL, -/*0x26*/ PSYCHO_IMAP_KMS, -/*0x27*/ PSYCHO_IMAP_FLPY, -/*0x28*/ PSYCHO_IMAP_SHW, -/*0x29*/ PSYCHO_IMAP_KBD, -/*0x2a*/ PSYCHO_IMAP_MS, -/*0x2b*/ PSYCHO_IMAP_SER, -/*0x2c*/ PSYCHO_IMAP_TIM0, -/*0x2d*/ PSYCHO_IMAP_TIM1, -/*0x2e*/ PSYCHO_IMAP_UE, -/*0x2f*/ PSYCHO_IMAP_CE, -/*0x30*/ PSYCHO_IMAP_A_ERR, -/*0x31*/ PSYCHO_IMAP_B_ERR, -/*0x32*/ PSYCHO_IMAP_PMGMT, -/*0x33*/ PSYCHO_IMAP_GFX, -/*0x34*/ PSYCHO_IMAP_EUPA, -}; -#define PSYCHO_ONBOARD_IRQ_BASE 0x20 -#define PSYCHO_ONBOARD_IRQ_LAST 0x34 -#define psycho_onboard_imap_offset(__ino) \ - __psycho_onboard_imap_off[(__ino) - PSYCHO_ONBOARD_IRQ_BASE] - -#define PSYCHO_ICLR_A_SLOT0 0x1400UL -#define PSYCHO_ICLR_SCSI 0x1800UL - -#define psycho_iclr_offset(ino) \ - ((ino & 0x20) ? (PSYCHO_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \ - (PSYCHO_ICLR_A_SLOT0 + (((ino) & 0x1f)<<3))) - -static unsigned int psycho_irq_build(struct device_node *dp, - unsigned int ino, - void *_data) -{ - unsigned long controller_regs = (unsigned long) _data; - unsigned long imap, iclr; - unsigned long imap_off, iclr_off; - int inofixup = 0; - - ino &= 0x3f; - if (ino < PSYCHO_ONBOARD_IRQ_BASE) { - /* PCI slot */ - imap_off = psycho_pcislot_imap_offset(ino); - } else { - /* Onboard device */ - if (ino > PSYCHO_ONBOARD_IRQ_LAST) { - prom_printf("psycho_irq_build: Wacky INO [%x]\n", ino); - prom_halt(); - } - imap_off = psycho_onboard_imap_offset(ino); - } - - /* Now build the IRQ bucket. */ - imap = controller_regs + imap_off; - imap += 4; - - iclr_off = psycho_iclr_offset(ino); - iclr = controller_regs + iclr_off; - iclr += 4; - - if ((ino & 0x20) == 0) - inofixup = ino & 0x03; - - return build_irq(inofixup, iclr, imap); -} - -static void psycho_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = psycho_irq_build; - - regs = of_get_property(dp, "reg", NULL); - dp->irq_trans->data = (void *) regs[2].phys_addr; -} - -#define sabre_read(__reg) \ -({ u64 __ret; \ - __asm__ __volatile__("ldxa [%1] %2, %0" \ - : "=r" (__ret) \ - : "r" (__reg), "i" (ASI_PHYS_BYPASS_EC_E) \ - : "memory"); \ - __ret; \ -}) - -struct sabre_irq_data { - unsigned long controller_regs; - unsigned int pci_first_busno; -}; -#define SABRE_CONFIGSPACE 0x001000000UL -#define SABRE_WRSYNC 0x1c20UL - -#define SABRE_CONFIG_BASE(CONFIG_SPACE) \ - (CONFIG_SPACE | (1UL << 24)) -#define SABRE_CONFIG_ENCODE(BUS, DEVFN, REG) \ - (((unsigned long)(BUS) << 16) | \ - ((unsigned long)(DEVFN) << 8) | \ - ((unsigned long)(REG))) - -/* When a device lives behind a bridge deeper in the PCI bus topology - * than APB, a special sequence must run to make sure all pending DMA - * transfers at the time of IRQ delivery are visible in the coherency - * domain by the cpu. This sequence is to perform a read on the far - * side of the non-APB bridge, then perform a read of Sabre's DMA - * write-sync register. - */ -static void sabre_wsync_handler(unsigned int ino, void *_arg1, void *_arg2) -{ - unsigned int phys_hi = (unsigned int) (unsigned long) _arg1; - struct sabre_irq_data *irq_data = _arg2; - unsigned long controller_regs = irq_data->controller_regs; - unsigned long sync_reg = controller_regs + SABRE_WRSYNC; - unsigned long config_space = controller_regs + SABRE_CONFIGSPACE; - unsigned int bus, devfn; - u16 _unused; - - config_space = SABRE_CONFIG_BASE(config_space); - - bus = (phys_hi >> 16) & 0xff; - devfn = (phys_hi >> 8) & 0xff; - - config_space |= SABRE_CONFIG_ENCODE(bus, devfn, 0x00); - - __asm__ __volatile__("membar #Sync\n\t" - "lduha [%1] %2, %0\n\t" - "membar #Sync" - : "=r" (_unused) - : "r" ((u16 *) config_space), - "i" (ASI_PHYS_BYPASS_EC_E_L) - : "memory"); - - sabre_read(sync_reg); -} - -#define SABRE_IMAP_A_SLOT0 0x0c00UL -#define SABRE_IMAP_B_SLOT0 0x0c20UL -#define SABRE_IMAP_SCSI 0x1000UL -#define SABRE_IMAP_ETH 0x1008UL -#define SABRE_IMAP_BPP 0x1010UL -#define SABRE_IMAP_AU_REC 0x1018UL -#define SABRE_IMAP_AU_PLAY 0x1020UL -#define SABRE_IMAP_PFAIL 0x1028UL -#define SABRE_IMAP_KMS 0x1030UL -#define SABRE_IMAP_FLPY 0x1038UL -#define SABRE_IMAP_SHW 0x1040UL -#define SABRE_IMAP_KBD 0x1048UL -#define SABRE_IMAP_MS 0x1050UL -#define SABRE_IMAP_SER 0x1058UL -#define SABRE_IMAP_UE 0x1070UL -#define SABRE_IMAP_CE 0x1078UL -#define SABRE_IMAP_PCIERR 0x1080UL -#define SABRE_IMAP_GFX 0x1098UL -#define SABRE_IMAP_EUPA 0x10a0UL -#define SABRE_ICLR_A_SLOT0 0x1400UL -#define SABRE_ICLR_B_SLOT0 0x1480UL -#define SABRE_ICLR_SCSI 0x1800UL -#define SABRE_ICLR_ETH 0x1808UL -#define SABRE_ICLR_BPP 0x1810UL -#define SABRE_ICLR_AU_REC 0x1818UL -#define SABRE_ICLR_AU_PLAY 0x1820UL -#define SABRE_ICLR_PFAIL 0x1828UL -#define SABRE_ICLR_KMS 0x1830UL -#define SABRE_ICLR_FLPY 0x1838UL -#define SABRE_ICLR_SHW 0x1840UL -#define SABRE_ICLR_KBD 0x1848UL -#define SABRE_ICLR_MS 0x1850UL -#define SABRE_ICLR_SER 0x1858UL -#define SABRE_ICLR_UE 0x1870UL -#define SABRE_ICLR_CE 0x1878UL -#define SABRE_ICLR_PCIERR 0x1880UL - -static unsigned long sabre_pcislot_imap_offset(unsigned long ino) -{ - unsigned int bus = (ino & 0x10) >> 4; - unsigned int slot = (ino & 0x0c) >> 2; - - if (bus == 0) - return SABRE_IMAP_A_SLOT0 + (slot * 8); - else - return SABRE_IMAP_B_SLOT0 + (slot * 8); -} - -static unsigned long __sabre_onboard_imap_off[] = { -/*0x20*/ SABRE_IMAP_SCSI, -/*0x21*/ SABRE_IMAP_ETH, -/*0x22*/ SABRE_IMAP_BPP, -/*0x23*/ SABRE_IMAP_AU_REC, -/*0x24*/ SABRE_IMAP_AU_PLAY, -/*0x25*/ SABRE_IMAP_PFAIL, -/*0x26*/ SABRE_IMAP_KMS, -/*0x27*/ SABRE_IMAP_FLPY, -/*0x28*/ SABRE_IMAP_SHW, -/*0x29*/ SABRE_IMAP_KBD, -/*0x2a*/ SABRE_IMAP_MS, -/*0x2b*/ SABRE_IMAP_SER, -/*0x2c*/ 0 /* reserved */, -/*0x2d*/ 0 /* reserved */, -/*0x2e*/ SABRE_IMAP_UE, -/*0x2f*/ SABRE_IMAP_CE, -/*0x30*/ SABRE_IMAP_PCIERR, -/*0x31*/ 0 /* reserved */, -/*0x32*/ 0 /* reserved */, -/*0x33*/ SABRE_IMAP_GFX, -/*0x34*/ SABRE_IMAP_EUPA, -}; -#define SABRE_ONBOARD_IRQ_BASE 0x20 -#define SABRE_ONBOARD_IRQ_LAST 0x30 -#define sabre_onboard_imap_offset(__ino) \ - __sabre_onboard_imap_off[(__ino) - SABRE_ONBOARD_IRQ_BASE] - -#define sabre_iclr_offset(ino) \ - ((ino & 0x20) ? (SABRE_ICLR_SCSI + (((ino) & 0x1f) << 3)) : \ - (SABRE_ICLR_A_SLOT0 + (((ino) & 0x1f)<<3))) - -static int sabre_device_needs_wsync(struct device_node *dp) -{ - struct device_node *parent = dp->parent; - char *parent_model, *parent_compat; - - /* This traversal up towards the root is meant to - * handle two cases: - * - * 1) non-PCI bus sitting under PCI, such as 'ebus' - * 2) the PCI controller interrupts themselves, which - * will use the sabre_irq_build but do not need - * the DMA synchronization handling - */ - while (parent) { - if (!strcmp(parent->type, "pci")) - break; - parent = parent->parent; - } - - if (!parent) - return 0; - - parent_model = of_get_property(parent, - "model", NULL); - if (parent_model && - (!strcmp(parent_model, "SUNW,sabre") || - !strcmp(parent_model, "SUNW,simba"))) - return 0; - - parent_compat = of_get_property(parent, - "compatible", NULL); - if (parent_compat && - (!strcmp(parent_compat, "pci108e,a000") || - !strcmp(parent_compat, "pci108e,a001"))) - return 0; - - return 1; -} - -static unsigned int sabre_irq_build(struct device_node *dp, - unsigned int ino, - void *_data) -{ - struct sabre_irq_data *irq_data = _data; - unsigned long controller_regs = irq_data->controller_regs; - struct linux_prom_pci_registers *regs; - unsigned long imap, iclr; - unsigned long imap_off, iclr_off; - int inofixup = 0; - int virt_irq; - - ino &= 0x3f; - if (ino < SABRE_ONBOARD_IRQ_BASE) { - /* PCI slot */ - imap_off = sabre_pcislot_imap_offset(ino); - } else { - /* onboard device */ - if (ino > SABRE_ONBOARD_IRQ_LAST) { - prom_printf("sabre_irq_build: Wacky INO [%x]\n", ino); - prom_halt(); - } - imap_off = sabre_onboard_imap_offset(ino); - } - - /* Now build the IRQ bucket. */ - imap = controller_regs + imap_off; - imap += 4; - - iclr_off = sabre_iclr_offset(ino); - iclr = controller_regs + iclr_off; - iclr += 4; - - if ((ino & 0x20) == 0) - inofixup = ino & 0x03; - - virt_irq = build_irq(inofixup, iclr, imap); - - /* If the parent device is a PCI<->PCI bridge other than - * APB, we have to install a pre-handler to ensure that - * all pending DMA is drained before the interrupt handler - * is run. - */ - regs = of_get_property(dp, "reg", NULL); - if (regs && sabre_device_needs_wsync(dp)) { - irq_install_pre_handler(virt_irq, - sabre_wsync_handler, - (void *) (long) regs->phys_hi, - (void *) irq_data); - } - - return virt_irq; -} - -static void sabre_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - struct sabre_irq_data *irq_data; - u32 *busrange; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = sabre_irq_build; - - irq_data = prom_early_alloc(sizeof(struct sabre_irq_data)); - - regs = of_get_property(dp, "reg", NULL); - irq_data->controller_regs = regs[0].phys_addr; - - busrange = of_get_property(dp, "bus-range", NULL); - irq_data->pci_first_busno = busrange[0]; - - dp->irq_trans->data = irq_data; -} - -/* SCHIZO interrupt mapping support. Unlike Psycho, for this controller the - * imap/iclr registers are per-PBM. - */ -#define SCHIZO_IMAP_BASE 0x1000UL -#define SCHIZO_ICLR_BASE 0x1400UL - -static unsigned long schizo_imap_offset(unsigned long ino) -{ - return SCHIZO_IMAP_BASE + (ino * 8UL); -} - -static unsigned long schizo_iclr_offset(unsigned long ino) -{ - return SCHIZO_ICLR_BASE + (ino * 8UL); -} - -static unsigned long schizo_ino_to_iclr(unsigned long pbm_regs, - unsigned int ino) -{ - return pbm_regs + schizo_iclr_offset(ino) + 4; -} - -static unsigned long schizo_ino_to_imap(unsigned long pbm_regs, - unsigned int ino) -{ - return pbm_regs + schizo_imap_offset(ino) + 4; -} - -#define schizo_read(__reg) \ -({ u64 __ret; \ - __asm__ __volatile__("ldxa [%1] %2, %0" \ - : "=r" (__ret) \ - : "r" (__reg), "i" (ASI_PHYS_BYPASS_EC_E) \ - : "memory"); \ - __ret; \ -}) -#define schizo_write(__reg, __val) \ - __asm__ __volatile__("stxa %0, [%1] %2" \ - : /* no outputs */ \ - : "r" (__val), "r" (__reg), \ - "i" (ASI_PHYS_BYPASS_EC_E) \ - : "memory") - -static void tomatillo_wsync_handler(unsigned int ino, void *_arg1, void *_arg2) -{ - unsigned long sync_reg = (unsigned long) _arg2; - u64 mask = 1UL << (ino & IMAP_INO); - u64 val; - int limit; - - schizo_write(sync_reg, mask); - - limit = 100000; - val = 0; - while (--limit) { - val = schizo_read(sync_reg); - if (!(val & mask)) - break; - } - if (limit <= 0) { - printk("tomatillo_wsync_handler: DMA won't sync [%lx:%lx]\n", - val, mask); - } - - if (_arg1) { - static unsigned char cacheline[64] - __attribute__ ((aligned (64))); - - __asm__ __volatile__("rd %%fprs, %0\n\t" - "or %0, %4, %1\n\t" - "wr %1, 0x0, %%fprs\n\t" - "stda %%f0, [%5] %6\n\t" - "wr %0, 0x0, %%fprs\n\t" - "membar #Sync" - : "=&r" (mask), "=&r" (val) - : "0" (mask), "1" (val), - "i" (FPRS_FEF), "r" (&cacheline[0]), - "i" (ASI_BLK_COMMIT_P)); - } -} - -struct schizo_irq_data { - unsigned long pbm_regs; - unsigned long sync_reg; - u32 portid; - int chip_version; -}; - -static unsigned int schizo_irq_build(struct device_node *dp, - unsigned int ino, - void *_data) -{ - struct schizo_irq_data *irq_data = _data; - unsigned long pbm_regs = irq_data->pbm_regs; - unsigned long imap, iclr; - int ign_fixup; - int virt_irq; - int is_tomatillo; - - ino &= 0x3f; - - /* Now build the IRQ bucket. */ - imap = schizo_ino_to_imap(pbm_regs, ino); - iclr = schizo_ino_to_iclr(pbm_regs, ino); - - /* On Schizo, no inofixup occurs. This is because each - * INO has it's own IMAP register. On Psycho and Sabre - * there is only one IMAP register for each PCI slot even - * though four different INOs can be generated by each - * PCI slot. - * - * But, for JBUS variants (essentially, Tomatillo), we have - * to fixup the lowest bit of the interrupt group number. - */ - ign_fixup = 0; - - is_tomatillo = (irq_data->sync_reg != 0UL); - - if (is_tomatillo) { - if (irq_data->portid & 1) - ign_fixup = (1 << 6); - } - - virt_irq = build_irq(ign_fixup, iclr, imap); - - if (is_tomatillo) { - irq_install_pre_handler(virt_irq, - tomatillo_wsync_handler, - ((irq_data->chip_version <= 4) ? - (void *) 1 : (void *) 0), - (void *) irq_data->sync_reg); - } - - return virt_irq; -} - -static void schizo_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - struct schizo_irq_data *irq_data; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = schizo_irq_build; - - irq_data = prom_early_alloc(sizeof(struct schizo_irq_data)); - - regs = of_get_property(dp, "reg", NULL); - dp->irq_trans->data = irq_data; - - irq_data->pbm_regs = regs[0].phys_addr; - irq_data->sync_reg = regs[3].phys_addr + 0x1a18UL; - irq_data->portid = of_getintprop_default(dp, "portid", 0); - irq_data->chip_version = of_getintprop_default(dp, "version#", 0); -} - -static unsigned int pci_sun4v_irq_build(struct device_node *dp, - unsigned int devino, - void *_data) -{ - u32 devhandle = (u32) (unsigned long) _data; - - return sun4v_build_irq(devhandle, devino); -} - -static void pci_sun4v_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = pci_sun4v_irq_build; - - regs = of_get_property(dp, "reg", NULL); - dp->irq_trans->data = (void *) (unsigned long) - ((regs->phys_addr >> 32UL) & 0x0fffffff); -} -#endif /* CONFIG_PCI */ - -#ifdef CONFIG_SBUS -/* INO number to IMAP register offset for SYSIO external IRQ's. - * This should conform to both Sunfire/Wildfire server and Fusion - * desktop designs. - */ -#define SYSIO_IMAP_SLOT0 0x2c04UL -#define SYSIO_IMAP_SLOT1 0x2c0cUL -#define SYSIO_IMAP_SLOT2 0x2c14UL -#define SYSIO_IMAP_SLOT3 0x2c1cUL -#define SYSIO_IMAP_SCSI 0x3004UL -#define SYSIO_IMAP_ETH 0x300cUL -#define SYSIO_IMAP_BPP 0x3014UL -#define SYSIO_IMAP_AUDIO 0x301cUL -#define SYSIO_IMAP_PFAIL 0x3024UL -#define SYSIO_IMAP_KMS 0x302cUL -#define SYSIO_IMAP_FLPY 0x3034UL -#define SYSIO_IMAP_SHW 0x303cUL -#define SYSIO_IMAP_KBD 0x3044UL -#define SYSIO_IMAP_MS 0x304cUL -#define SYSIO_IMAP_SER 0x3054UL -#define SYSIO_IMAP_TIM0 0x3064UL -#define SYSIO_IMAP_TIM1 0x306cUL -#define SYSIO_IMAP_UE 0x3074UL -#define SYSIO_IMAP_CE 0x307cUL -#define SYSIO_IMAP_SBERR 0x3084UL -#define SYSIO_IMAP_PMGMT 0x308cUL -#define SYSIO_IMAP_GFX 0x3094UL -#define SYSIO_IMAP_EUPA 0x309cUL - -#define bogon ((unsigned long) -1) -static unsigned long sysio_irq_offsets[] = { - /* SBUS Slot 0 --> 3, level 1 --> 7 */ - SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, - SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, SYSIO_IMAP_SLOT0, - SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, - SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, SYSIO_IMAP_SLOT1, - SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, - SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, SYSIO_IMAP_SLOT2, - SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, - SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, SYSIO_IMAP_SLOT3, - - /* Onboard devices (not relevant/used on SunFire). */ - SYSIO_IMAP_SCSI, - SYSIO_IMAP_ETH, - SYSIO_IMAP_BPP, - bogon, - SYSIO_IMAP_AUDIO, - SYSIO_IMAP_PFAIL, - bogon, - bogon, - SYSIO_IMAP_KMS, - SYSIO_IMAP_FLPY, - SYSIO_IMAP_SHW, - SYSIO_IMAP_KBD, - SYSIO_IMAP_MS, - SYSIO_IMAP_SER, - bogon, - bogon, - SYSIO_IMAP_TIM0, - SYSIO_IMAP_TIM1, - bogon, - bogon, - SYSIO_IMAP_UE, - SYSIO_IMAP_CE, - SYSIO_IMAP_SBERR, - SYSIO_IMAP_PMGMT, - SYSIO_IMAP_GFX, - SYSIO_IMAP_EUPA, -}; - -#undef bogon - -#define NUM_SYSIO_OFFSETS ARRAY_SIZE(sysio_irq_offsets) - -/* Convert Interrupt Mapping register pointer to associated - * Interrupt Clear register pointer, SYSIO specific version. - */ -#define SYSIO_ICLR_UNUSED0 0x3400UL -#define SYSIO_ICLR_SLOT0 0x340cUL -#define SYSIO_ICLR_SLOT1 0x344cUL -#define SYSIO_ICLR_SLOT2 0x348cUL -#define SYSIO_ICLR_SLOT3 0x34ccUL -static unsigned long sysio_imap_to_iclr(unsigned long imap) -{ - unsigned long diff = SYSIO_ICLR_UNUSED0 - SYSIO_IMAP_SLOT0; - return imap + diff; -} - -static unsigned int sbus_of_build_irq(struct device_node *dp, - unsigned int ino, - void *_data) -{ - unsigned long reg_base = (unsigned long) _data; - struct linux_prom_registers *regs; - unsigned long imap, iclr; - int sbus_slot = 0; - int sbus_level = 0; - - ino &= 0x3f; - - regs = of_get_property(dp, "reg", NULL); - if (regs) - sbus_slot = regs->which_io; - - if (ino < 0x20) - ino += (sbus_slot * 8); - - imap = sysio_irq_offsets[ino]; - if (imap == ((unsigned long)-1)) { - prom_printf("get_irq_translations: Bad SYSIO INO[%x]\n", - ino); - prom_halt(); - } - imap += reg_base; - - /* SYSIO inconsistency. For external SLOTS, we have to select - * the right ICLR register based upon the lower SBUS irq level - * bits. - */ - if (ino >= 0x20) { - iclr = sysio_imap_to_iclr(imap); - } else { - sbus_level = ino & 0x7; - - switch(sbus_slot) { - case 0: - iclr = reg_base + SYSIO_ICLR_SLOT0; - break; - case 1: - iclr = reg_base + SYSIO_ICLR_SLOT1; - break; - case 2: - iclr = reg_base + SYSIO_ICLR_SLOT2; - break; - default: - case 3: - iclr = reg_base + SYSIO_ICLR_SLOT3; - break; - }; - - iclr += ((unsigned long)sbus_level - 1UL) * 8UL; - } - return build_irq(sbus_level, iclr, imap); -} - -static void sbus_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = sbus_of_build_irq; - - regs = of_get_property(dp, "reg", NULL); - dp->irq_trans->data = (void *) (unsigned long) regs->phys_addr; -} -#endif /* CONFIG_SBUS */ - - -static unsigned int central_build_irq(struct device_node *dp, - unsigned int ino, - void *_data) -{ - struct device_node *central_dp = _data; - struct of_device *central_op = of_find_device_by_node(central_dp); - struct resource *res; - unsigned long imap, iclr; - u32 tmp; - - if (!strcmp(dp->name, "eeprom")) { - res = ¢ral_op->resource[5]; - } else if (!strcmp(dp->name, "zs")) { - res = ¢ral_op->resource[4]; - } else if (!strcmp(dp->name, "clock-board")) { - res = ¢ral_op->resource[3]; - } else { - return ino; - } - - imap = res->start + 0x00UL; - iclr = res->start + 0x10UL; - - /* Set the INO state to idle, and disable. */ - upa_writel(0, iclr); - upa_readl(iclr); - - tmp = upa_readl(imap); - tmp &= ~0x80000000; - upa_writel(tmp, imap); - - return build_irq(0, iclr, imap); -} - -static void central_irq_trans_init(struct device_node *dp) -{ - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = central_build_irq; - - dp->irq_trans->data = dp; -} - -struct irq_trans { - const char *name; - void (*init)(struct device_node *); -}; - -#ifdef CONFIG_PCI -static struct irq_trans pci_irq_trans_table[] = { - { "SUNW,sabre", sabre_irq_trans_init }, - { "pci108e,a000", sabre_irq_trans_init }, - { "pci108e,a001", sabre_irq_trans_init }, - { "SUNW,psycho", psycho_irq_trans_init }, - { "pci108e,8000", psycho_irq_trans_init }, - { "SUNW,schizo", schizo_irq_trans_init }, - { "pci108e,8001", schizo_irq_trans_init }, - { "SUNW,schizo+", schizo_irq_trans_init }, - { "pci108e,8002", schizo_irq_trans_init }, - { "SUNW,tomatillo", schizo_irq_trans_init }, - { "pci108e,a801", schizo_irq_trans_init }, - { "SUNW,sun4v-pci", pci_sun4v_irq_trans_init }, -}; -#endif - -static unsigned int sun4v_vdev_irq_build(struct device_node *dp, - unsigned int devino, - void *_data) -{ - u32 devhandle = (u32) (unsigned long) _data; - - return sun4v_build_irq(devhandle, devino); -} - -static void sun4v_vdev_irq_trans_init(struct device_node *dp) -{ - struct linux_prom64_registers *regs; - - dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller)); - dp->irq_trans->irq_build = sun4v_vdev_irq_build; - - regs = of_get_property(dp, "reg", NULL); - dp->irq_trans->data = (void *) (unsigned long) - ((regs->phys_addr >> 32UL) & 0x0fffffff); -} - -static void irq_trans_init(struct device_node *dp) -{ -#ifdef CONFIG_PCI - const char *model; - int i; -#endif - -#ifdef CONFIG_PCI - model = of_get_property(dp, "model", NULL); - if (!model) - model = of_get_property(dp, "compatible", NULL); - if (model) { - for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) { - struct irq_trans *t = &pci_irq_trans_table[i]; - - if (!strcmp(model, t->name)) - return t->init(dp); - } - } -#endif -#ifdef CONFIG_SBUS - if (!strcmp(dp->name, "sbus") || - !strcmp(dp->name, "sbi")) - return sbus_irq_trans_init(dp); -#endif - if (!strcmp(dp->name, "fhc") && - !strcmp(dp->parent->name, "central")) - return central_irq_trans_init(dp); - if (!strcmp(dp->name, "virtual-devices")) - return sun4v_vdev_irq_trans_init(dp); -} - -static int is_root_node(const struct device_node *dp) -{ - if (!dp) - return 0; - - return (dp->parent == NULL); -} - -/* The following routines deal with the black magic of fully naming a - * node. - * - * Certain well known named nodes are just the simple name string. - * - * Actual devices have an address specifier appended to the base name - * string, like this "foo@addr". The "addr" can be in any number of - * formats, and the platform plus the type of the node determine the - * format and how it is constructed. - * - * For children of the ROOT node, the naming convention is fixed and - * determined by whether this is a sun4u or sun4v system. - * - * For children of other nodes, it is bus type specific. So - * we walk up the tree until we discover a "device_type" property - * we recognize and we go from there. - * - * As an example, the boot device on my workstation has a full path: - * - * /pci@1e,600000/ide@d/disk@0,0:c - */ -static void __init sun4v_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom64_registers *regs; - struct property *rprop; - u32 high_bits, low_bits, type; - - rprop = of_find_property(dp, "reg", NULL); - if (!rprop) - return; - - regs = rprop->value; - if (!is_root_node(dp->parent)) { - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - (unsigned int) (regs->phys_addr >> 32UL), - (unsigned int) (regs->phys_addr & 0xffffffffUL)); - return; - } - - type = regs->phys_addr >> 60UL; - high_bits = (regs->phys_addr >> 32UL) & 0x0fffffffUL; - low_bits = (regs->phys_addr & 0xffffffffUL); - - if (type == 0 || type == 8) { - const char *prefix = (type == 0) ? "m" : "i"; - - if (low_bits) - sprintf(tmp_buf, "%s@%s%x,%x", - dp->name, prefix, - high_bits, low_bits); - else - sprintf(tmp_buf, "%s@%s%x", - dp->name, - prefix, - high_bits); - } else if (type == 12) { - sprintf(tmp_buf, "%s@%x", - dp->name, high_bits); - } -} - -static void __init sun4u_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom64_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - if (!is_root_node(dp->parent)) { - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - (unsigned int) (regs->phys_addr >> 32UL), - (unsigned int) (regs->phys_addr & 0xffffffffUL)); - return; - } - - prop = of_find_property(dp, "upa-portid", NULL); - if (!prop) - prop = of_find_property(dp, "portid", NULL); - if (prop) { - unsigned long mask = 0xffffffffUL; - - if (tlb_type >= cheetah) - mask = 0x7fffff; - - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - *(u32 *)prop->value, - (unsigned int) (regs->phys_addr & mask)); - } -} - -/* "name@slot,offset" */ -static void __init sbus_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - regs->which_io, - regs->phys_addr); -} - -/* "name@devnum[,func]" */ -static void __init pci_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom_pci_registers *regs; - struct property *prop; - unsigned int devfn; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - devfn = (regs->phys_hi >> 8) & 0xff; - if (devfn & 0x07) { - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - devfn >> 3, - devfn & 0x07); - } else { - sprintf(tmp_buf, "%s@%x", - dp->name, - devfn >> 3); - } -} - -/* "name@UPA_PORTID,offset" */ -static void __init upa_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom64_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - prop = of_find_property(dp, "upa-portid", NULL); - if (!prop) - return; - - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - *(u32 *) prop->value, - (unsigned int) (regs->phys_addr & 0xffffffffUL)); -} - -/* "name@reg" */ -static void __init vdev_path_component(struct device_node *dp, char *tmp_buf) -{ - struct property *prop; - u32 *regs; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - sprintf(tmp_buf, "%s@%x", dp->name, *regs); -} - -/* "name@addrhi,addrlo" */ -static void __init ebus_path_component(struct device_node *dp, char *tmp_buf) -{ - struct linux_prom64_registers *regs; - struct property *prop; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - sprintf(tmp_buf, "%s@%x,%x", - dp->name, - (unsigned int) (regs->phys_addr >> 32UL), - (unsigned int) (regs->phys_addr & 0xffffffffUL)); -} - -/* "name@bus,addr" */ -static void __init i2c_path_component(struct device_node *dp, char *tmp_buf) -{ - struct property *prop; - u32 *regs; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - /* This actually isn't right... should look at the #address-cells - * property of the i2c bus node etc. etc. - */ - sprintf(tmp_buf, "%s@%x,%x", - dp->name, regs[0], regs[1]); -} - -/* "name@reg0[,reg1]" */ -static void __init usb_path_component(struct device_node *dp, char *tmp_buf) -{ - struct property *prop; - u32 *regs; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - if (prop->length == sizeof(u32) || regs[1] == 1) { - sprintf(tmp_buf, "%s@%x", - dp->name, regs[0]); - } else { - sprintf(tmp_buf, "%s@%x,%x", - dp->name, regs[0], regs[1]); - } -} - -/* "name@reg0reg1[,reg2reg3]" */ -static void __init ieee1394_path_component(struct device_node *dp, char *tmp_buf) -{ - struct property *prop; - u32 *regs; - - prop = of_find_property(dp, "reg", NULL); - if (!prop) - return; - - regs = prop->value; - - if (regs[2] || regs[3]) { - sprintf(tmp_buf, "%s@%08x%08x,%04x%08x", - dp->name, regs[0], regs[1], regs[2], regs[3]); - } else { - sprintf(tmp_buf, "%s@%08x%08x", - dp->name, regs[0], regs[1]); - } -} - -static void __init __build_path_component(struct device_node *dp, char *tmp_buf) -{ - struct device_node *parent = dp->parent; - - if (parent != NULL) { - if (!strcmp(parent->type, "pci") || - !strcmp(parent->type, "pciex")) - return pci_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "sbus")) - return sbus_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "upa")) - return upa_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "ebus")) - return ebus_path_component(dp, tmp_buf); - if (!strcmp(parent->name, "usb") || - !strcmp(parent->name, "hub")) - return usb_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "i2c")) - return i2c_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "firewire")) - return ieee1394_path_component(dp, tmp_buf); - if (!strcmp(parent->type, "virtual-devices")) - return vdev_path_component(dp, tmp_buf); - - /* "isa" is handled with platform naming */ - } - - /* Use platform naming convention. */ - if (tlb_type == hypervisor) - return sun4v_path_component(dp, tmp_buf); - else - return sun4u_path_component(dp, tmp_buf); -} - -static char * __init build_path_component(struct device_node *dp) -{ - char tmp_buf[64], *n; - - tmp_buf[0] = '\0'; - __build_path_component(dp, tmp_buf); - if (tmp_buf[0] == '\0') - strcpy(tmp_buf, dp->name); - - n = prom_early_alloc(strlen(tmp_buf) + 1); - strcpy(n, tmp_buf); - - return n; -} - -static char * __init build_full_name(struct device_node *dp) -{ - int len, ourlen, plen; - char *n; - - plen = strlen(dp->parent->full_name); - ourlen = strlen(dp->path_component_name); - len = ourlen + plen + 2; - - n = prom_early_alloc(len); - strcpy(n, dp->parent->full_name); - if (!is_root_node(dp->parent)) { - strcpy(n + plen, "/"); - plen++; - } - strcpy(n + plen, dp->path_component_name); - - return n; -} - -static unsigned int unique_id; - -static struct property * __init build_one_prop(phandle node, char *prev, char *special_name, void *special_val, int special_len) -{ - static struct property *tmp = NULL; - struct property *p; - - if (tmp) { - p = tmp; - memset(p, 0, sizeof(*p) + 32); - tmp = NULL; - } else { - p = prom_early_alloc(sizeof(struct property) + 32); - p->unique_id = unique_id++; - } - - p->name = (char *) (p + 1); - if (special_name) { - strcpy(p->name, special_name); - p->length = special_len; - p->value = prom_early_alloc(special_len); - memcpy(p->value, special_val, special_len); - } else { - if (prev == NULL) { - prom_firstprop(node, p->name); - } else { - prom_nextprop(node, prev, p->name); - } - if (strlen(p->name) == 0) { - tmp = p; - return NULL; - } - p->length = prom_getproplen(node, p->name); - if (p->length <= 0) { - p->length = 0; - } else { - p->value = prom_early_alloc(p->length + 1); - prom_getproperty(node, p->name, p->value, p->length); - ((unsigned char *)p->value)[p->length] = '\0'; - } - } - return p; -} - -static struct property * __init build_prop_list(phandle node) -{ - struct property *head, *tail; - - head = tail = build_one_prop(node, NULL, - ".node", &node, sizeof(node)); - - tail->next = build_one_prop(node, NULL, NULL, NULL, 0); - tail = tail->next; - while(tail) { - tail->next = build_one_prop(node, tail->name, - NULL, NULL, 0); - tail = tail->next; - } - - return head; -} - -static char * __init get_one_property(phandle node, const char *name) -{ - char *buf = ""; - int len; - - len = prom_getproplen(node, name); - if (len > 0) { - buf = prom_early_alloc(len); - prom_getproperty(node, name, buf, len); - } - - return buf; -} - -static struct device_node * __init create_node(phandle node, struct device_node *parent) -{ - struct device_node *dp; - - if (!node) - return NULL; - - dp = prom_early_alloc(sizeof(*dp)); - dp->unique_id = unique_id++; - dp->parent = parent; - - kref_init(&dp->kref); - - dp->name = get_one_property(node, "name"); - dp->type = get_one_property(node, "device_type"); - dp->node = node; - - dp->properties = build_prop_list(node); - - irq_trans_init(dp); - - return dp; -} - -static struct device_node * __init build_tree(struct device_node *parent, phandle node, struct device_node ***nextp) -{ - struct device_node *dp; - - dp = create_node(node, parent); - if (dp) { - *(*nextp) = dp; - *nextp = &dp->allnext; - - dp->path_component_name = build_path_component(dp); - dp->full_name = build_full_name(dp); - - dp->child = build_tree(dp, prom_getchild(node), nextp); - - dp->sibling = build_tree(parent, prom_getsibling(node), nextp); - } - - return dp; -} - -void __init prom_build_devicetree(void) -{ - struct device_node **nextp; - - allnodes = create_node(prom_root_node, NULL); - allnodes->path_component_name = ""; - allnodes->full_name = "/"; - - nextp = &allnodes->allnext; - allnodes->child = build_tree(allnodes, - prom_getchild(allnodes->node), - &nextp); - printk("PROM: Built device tree with %u bytes of memory.\n", - prom_early_allocated); -} diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 3522cd66f..7130e866f 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S @@ -5,6 +5,7 @@ * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index c49a57795..1d6ffdeab 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include "iommu_common.h" @@ -692,6 +691,36 @@ void sbus_set_sbus64(struct sbus_dev *sdev, int bursts) upa_writeq(val, cfg_reg); } +/* SBUS SYSIO INO number to Sparc PIL level. */ +static unsigned char sysio_ino_to_pil[] = { + 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 0 */ + 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 1 */ + 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 2 */ + 0, 5, 5, 7, 5, 7, 8, 9, /* SBUS slot 3 */ + 5, /* Onboard SCSI */ + 5, /* Onboard Ethernet */ +/*XXX*/ 8, /* Onboard BPP */ + 0, /* Bogon */ + 13, /* Audio */ +/*XXX*/15, /* PowerFail */ + 0, /* Bogon */ + 0, /* Bogon */ + 12, /* Zilog Serial Channels (incl. Keyboard/Mouse lines) */ + 11, /* Floppy */ + 0, /* Spare Hardware (bogon for now) */ + 0, /* Keyboard (bogon for now) */ + 0, /* Mouse (bogon for now) */ + 0, /* Serial (bogon for now) */ + 0, 0, /* Bogon, Bogon */ + 10, /* Timer 0 */ + 11, /* Timer 1 */ + 0, 0, /* Bogon, Bogon */ + 15, /* Uncorrectable SBUS Error */ + 15, /* Correctable SBUS Error */ + 15, /* SBUS Error */ +/*XXX*/ 0, /* Power Management (bogon for now) */ +}; + /* INO number to IMAP register offset for SYSIO external IRQ's. * This should conform to both Sunfire/Wildfire server and Fusion * desktop designs. @@ -783,12 +812,21 @@ unsigned int sbus_build_irq(void *buscookie, unsigned int ino) struct sbus_iommu *iommu = sbus->iommu; unsigned long reg_base = iommu->sbus_control_reg - 0x2000UL; unsigned long imap, iclr; - int sbus_level = 0; + int pil, sbus_level = 0; + + pil = sysio_ino_to_pil[ino]; + if (!pil) { + printk("sbus_irq_build: Bad SYSIO INO[%x]\n", ino); + panic("Bad SYSIO IRQ translations..."); + } + + if (PIL_RESERVED(pil)) + BUG(); imap = sysio_irq_offsets[ino]; if (imap == ((unsigned long)-1)) { - prom_printf("get_irq_translations: Bad SYSIO INO[%x]\n", - ino); + prom_printf("get_irq_translations: Bad SYSIO INO[%x] cpu[%d]\n", + ino, pil); prom_halt(); } imap += reg_base; @@ -822,7 +860,7 @@ unsigned int sbus_build_irq(void *buscookie, unsigned int ino) iclr += ((unsigned long)sbus_level - 1UL) * 8UL; } - return build_irq(sbus_level, iclr, imap); + return build_irq(pil, sbus_level, iclr, imap); } /* Error interrupt handling. */ @@ -1065,7 +1103,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) irq = sbus_build_irq(sbus, SYSIO_UE_INO); if (request_irq(irq, sysio_ue_handler, - IRQF_SHARED, "SYSIO UE", sbus) < 0) { + SA_SHIRQ, "SYSIO UE", sbus) < 0) { prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n", sbus->portid); prom_halt(); @@ -1073,7 +1111,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) irq = sbus_build_irq(sbus, SYSIO_CE_INO); if (request_irq(irq, sysio_ce_handler, - IRQF_SHARED, "SYSIO CE", sbus) < 0) { + SA_SHIRQ, "SYSIO CE", sbus) < 0) { prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n", sbus->portid); prom_halt(); @@ -1081,7 +1119,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO); if (request_irq(irq, sysio_sbus_error_handler, - IRQF_SHARED, "SYSIO SBUS Error", sbus) < 0) { + SA_SHIRQ, "SYSIO SBUS Error", sbus) < 0) { prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n", sbus->portid); prom_halt(); @@ -1099,25 +1137,24 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) } /* Boot time initialization. */ -static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus) +void __init sbus_iommu_init(int prom_node, struct sbus_bus *sbus) { - struct linux_prom64_registers *pr; - struct device_node *dp; + struct linux_prom64_registers rprop; struct sbus_iommu *iommu; unsigned long regs, tsb_base; u64 control; - int i; + int err, i; - dp = of_find_node_by_phandle(__node); + sbus->portid = prom_getintdefault(sbus->prom_node, + "upa-portid", -1); - sbus->portid = of_getintprop_default(dp, "upa-portid", -1); - - pr = of_get_property(dp, "reg", NULL); - if (!pr) { + err = prom_getproperty(prom_node, "reg", + (char *)&rprop, sizeof(rprop)); + if (err < 0) { prom_printf("sbus_iommu_init: Cannot map SYSIO control registers.\n"); prom_halt(); } - regs = pr->phys_addr; + regs = rprop.phys_addr; iommu = kmalloc(sizeof(*iommu) + SMP_CACHE_BYTES, GFP_ATOMIC); if (iommu == NULL) { @@ -1221,52 +1258,9 @@ static void __init sbus_iommu_init(int __node, struct sbus_bus *sbus) /* Now some Xfire specific grot... */ if (this_is_starfire) - starfire_hookup(sbus->portid); + sbus->starfire_cookie = starfire_hookup(sbus->portid); + else + sbus->starfire_cookie = NULL; sysio_register_error_handlers(sbus); } - -void sbus_fill_device_irq(struct sbus_dev *sdev) -{ - struct device_node *dp = of_find_node_by_phandle(sdev->prom_node); - struct linux_prom_irqs *irqs; - - irqs = of_get_property(dp, "interrupts", NULL); - if (!irqs) { - sdev->irqs[0] = 0; - sdev->num_irqs = 0; - } else { - unsigned int pri = irqs[0].pri; - - sdev->num_irqs = 1; - if (pri < 0x20) - pri += sdev->slot * 8; - - sdev->irqs[0] = sbus_build_irq(sdev->bus, pri); - } -} - -void __init sbus_arch_bus_ranges_init(struct device_node *pn, struct sbus_bus *sbus) -{ -} - -void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp) -{ - sbus_iommu_init(dp->node, sbus); -} - -void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp) -{ -} - -int __init sbus_arch_preinit(void) -{ - return 0; -} - -void __init sbus_arch_postinit(void) -{ - extern void firetruck_init(void); - - firetruck_init(); -} diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 958287448..9cf1c88cd 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -16,8 +16,9 @@ #include #include #include -#include +#include #include +#include #include #include #include @@ -375,12 +376,12 @@ void __init setup_arch(char **cmdline_p) } #endif + smp_setup_cpu_possible_map(); + /* Get boot processor trap_block[] setup. */ init_cur_cpu_trap(current_thread_info()); paging_init(); - - smp_setup_cpu_possible_map(); } static int __init set_preferred_console(void) @@ -536,7 +537,7 @@ static int __init topology_init(void) for_each_possible_cpu(i) { struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); if (p) { - register_cpu(p, i); + register_cpu(p, i, NULL); err = 0; } } diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 96d56a841..ca11a4c45 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c @@ -8,6 +8,7 @@ * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #ifdef CONFIG_SPARC32_COMPAT #include /* for compat_old_sigset_t */ #endif diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index f62bf3a2d..f03d52d0b 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -39,7 +39,6 @@ #include #include #include -#include extern void calibrate_delay(void); @@ -77,42 +76,41 @@ void smp_bogo(struct seq_file *m) void __init smp_store_cpu_info(int id) { - struct device_node *dp; - int def; + int cpu_node, def; /* multiplier and counter set by smp_setup_percpu_timer() */ cpu_data(id).udelay_val = loops_per_jiffy; - cpu_find_by_mid(id, &dp); - cpu_data(id).clock_tick = - of_getintprop_default(dp, "clock-frequency", 0); + cpu_find_by_mid(id, &cpu_node); + cpu_data(id).clock_tick = prom_getintdefault(cpu_node, + "clock-frequency", 0); def = ((tlb_type == hypervisor) ? (8 * 1024) : (16 * 1024)); - cpu_data(id).dcache_size = - of_getintprop_default(dp, "dcache-size", def); + cpu_data(id).dcache_size = prom_getintdefault(cpu_node, "dcache-size", + def); def = 32; cpu_data(id).dcache_line_size = - of_getintprop_default(dp, "dcache-line-size", def); + prom_getintdefault(cpu_node, "dcache-line-size", def); def = 16 * 1024; - cpu_data(id).icache_size = - of_getintprop_default(dp, "icache-size", def); + cpu_data(id).icache_size = prom_getintdefault(cpu_node, "icache-size", + def); def = 32; cpu_data(id).icache_line_size = - of_getintprop_default(dp, "icache-line-size", def); + prom_getintdefault(cpu_node, "icache-line-size", def); def = ((tlb_type == hypervisor) ? (3 * 1024 * 1024) : (4 * 1024 * 1024)); - cpu_data(id).ecache_size = - of_getintprop_default(dp, "ecache-size", def); + cpu_data(id).ecache_size = prom_getintdefault(cpu_node, "ecache-size", + def); def = 64; cpu_data(id).ecache_line_size = - of_getintprop_default(dp, "ecache-line-size", def); + prom_getintdefault(cpu_node, "ecache-line-size", def); printk("CPU[%d]: Caches " "D[sz(%d):line_sz(%d)] " @@ -344,10 +342,10 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu) prom_startcpu_cpuid(cpu, entry, cookie); } else { - struct device_node *dp; + int cpu_node; - cpu_find_by_mid(cpu, &dp); - prom_startcpu(dp->node, entry, cookie); + cpu_find_by_mid(cpu, &cpu_node); + prom_startcpu(cpu_node, entry, cookie); } for (timeout = 0; timeout < 5000000; timeout++) { @@ -1291,8 +1289,7 @@ int setup_profiling_timer(unsigned int multiplier) static void __init smp_tune_scheduling(void) { - struct device_node *dp; - int instance; + int instance, node; unsigned int def, smallest = ~0U; def = ((tlb_type == hypervisor) ? @@ -1300,10 +1297,10 @@ static void __init smp_tune_scheduling(void) (4 * 1024 * 1024)); instance = 0; - while (!cpu_find_by_instance(instance, &dp, NULL)) { + while (!cpu_find_by_instance(instance, &node, NULL)) { unsigned int val; - val = of_getintprop_default(dp, "ecache-size", def); + val = prom_getintdefault(node, "ecache-size", def); if (val < smallest) smallest = val; diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index beffc82a1..38e569f78 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -10,6 +10,7 @@ #define EXPORT_SYMTAB_STROPS #define PROMLIB_INTERNAL +#include #include #include #include @@ -124,6 +125,14 @@ EXPORT_SYMBOL(__write_lock); EXPORT_SYMBOL(__write_unlock); EXPORT_SYMBOL(__write_trylock); +/* Hard IRQ locking */ +EXPORT_SYMBOL(synchronize_irq); + +#if defined(CONFIG_MCOUNT) +extern void _mcount(void); +EXPORT_SYMBOL(_mcount); +#endif + /* CPU online map and active count. */ EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(phys_cpu_present_map); @@ -131,11 +140,6 @@ EXPORT_SYMBOL(phys_cpu_present_map); EXPORT_SYMBOL(smp_call_function); #endif /* CONFIG_SMP */ -#if defined(CONFIG_MCOUNT) -extern void _mcount(void); -EXPORT_SYMBOL(_mcount); -#endif - EXPORT_SYMBOL(sparc64_get_clock_tick); /* semaphores */ @@ -171,6 +175,10 @@ EXPORT_SYMBOL(set_bit); EXPORT_SYMBOL(clear_bit); EXPORT_SYMBOL(change_bit); +EXPORT_SYMBOL(ivector_table); +EXPORT_SYMBOL(enable_irq); +EXPORT_SYMBOL(disable_irq); + EXPORT_SYMBOL(__flushw_user); EXPORT_SYMBOL(tlb_type); @@ -254,6 +262,7 @@ EXPORT_SYMBOL(prom_getproperty); EXPORT_SYMBOL(prom_node_has_property); EXPORT_SYMBOL(prom_setprop); EXPORT_SYMBOL(saved_command_line); +EXPORT_SYMBOL(prom_getname); EXPORT_SYMBOL(prom_finddevice); EXPORT_SYMBOL(prom_feval); EXPORT_SYMBOL(prom_getbool); diff --git a/arch/sparc64/kernel/starfire.c b/arch/sparc64/kernel/starfire.c index b930fee77..ae859d407 100644 --- a/arch/sparc64/kernel/starfire.c +++ b/arch/sparc64/kernel/starfire.c @@ -54,7 +54,7 @@ struct starfire_irqinfo { static struct starfire_irqinfo *sflist = NULL; /* Beam me up Scott(McNeil)y... */ -void starfire_hookup(int upaid) +void *starfire_hookup(int upaid) { struct starfire_irqinfo *p; unsigned long treg_base, hwmid, i; @@ -81,6 +81,8 @@ void starfire_hookup(int upaid) p->upaid = upaid; p->next = sflist; sflist = p; + + return (void *) p; } unsigned int starfire_translate(unsigned long imap, diff --git a/arch/sparc64/kernel/sun4v_ivec.S b/arch/sparc64/kernel/sun4v_ivec.S index 49703c3c5..b49a68bdd 100644 --- a/arch/sparc64/kernel/sun4v_ivec.S +++ b/arch/sparc64/kernel/sun4v_ivec.S @@ -5,7 +5,6 @@ #include #include -#include .text .align 32 @@ -103,17 +102,23 @@ sun4v_dev_mondo: /* Get &ivector_table[IVEC] into %g4. */ sethi %hi(ivector_table), %g4 - sllx %g3, 3, %g3 + sllx %g3, 5, %g3 or %g4, %lo(ivector_table), %g4 add %g4, %g3, %g4 + /* Load IRQ %pil into %g5. */ + ldub [%g4 + 0x04], %g5 + /* Insert ivector_table[] entry into __irq_work[] queue. */ - lduw [%g1], %g2 /* g2 = irq_work(cpu) */ + sllx %g5, 2, %g3 + lduw [%g1 + %g3], %g2 /* g2 = irq_work(cpu, pil) */ stw %g2, [%g4 + 0x00] /* bucket->irq_chain = g2 */ - stw %g4, [%g1] /* irq_work(cpu) = bucket */ + stw %g4, [%g1 + %g3] /* irq_work(cpu, pil) = bucket */ /* Signal the interrupt by setting (1 << pil) in %softint. */ - wr %g0, 1 << PIL_DEVICE_IRQ, %set_softint + mov 1, %g2 + sllx %g2, %g5, %g2 + wr %g2, 0x0, %set_softint sun4v_dev_mondo_queue_empty: retry diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index c09ab4b94..bdf1f4d02 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S @@ -6,6 +6,7 @@ * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) */ +#include #include /* NOTE: call as jump breaks return stack, we have to avoid that */ diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 1abfb9c1e..ef419255c 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -6,6 +6,7 @@ * platform. */ +#include #include #include #include @@ -706,23 +707,21 @@ extern void check_pending(int signum); asmlinkage long sys_getdomainname(char __user *name, int len) { - int nlen, err; - - if (len < 0) - return -EINVAL; + int nlen; + int err = -EFAULT; down_read(&uts_sem); nlen = strlen(vx_new_uts(domainname)) + 1; - err = -EINVAL; - if (nlen > len) - goto out; - err = -EFAULT; - if (!copy_to_user(name, vx_new_uts(domainname), nlen)) - err = 0; - -out: + if (nlen < len) + len = nlen; + if (len > __NEW_UTS_LEN) + goto done; + if (copy_to_user(name, vx_new_uts(domainname), len)) + goto done; + err = 0; +done: up_read(&uts_sem); return err; } diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index b4967df83..31030bf00 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -8,6 +8,7 @@ * environment. */ +#include #include #include #include @@ -337,17 +338,12 @@ asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned long high, unsigned int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) { - compat_ino_t ino; int err; if (stat->size > MAX_NON_LFS || !old_valid_dev(stat->dev) || !old_valid_dev(stat->rdev)) return -EOVERFLOW; - ino = stat->ino; - if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino) - return -EOVERFLOW; - err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev); err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->mode, &statbuf->st_mode); diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c index ac6079ffa..058a6a709 100644 --- a/arch/sparc64/kernel/sys_sunos32.c +++ b/arch/sparc64/kernel/sys_sunos32.c @@ -156,7 +156,7 @@ asmlinkage int sunos_brk(u32 baddr) * simple, it hopefully works in most obvious cases.. Easy to * fool it, but this should catch most mistakes. */ - freepages = global_page_state(NR_FILE_PAGES); + freepages = get_page_cache_size(); freepages >>= 1; freepages += nr_free_pages(); freepages += nr_swap_pages; @@ -281,20 +281,16 @@ static int sunos_filldir(void * __buf, const char * name, int namlen, struct sunos_dirent __user *dirent; struct sunos_dirent_callback * buf = (struct sunos_dirent_callback *) __buf; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); - u32 d_ino; buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) put_user(offset, &dirent->d_off); dirent = buf->curr; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(namlen, &dirent->d_namlen); put_user(reclen, &dirent->d_reclen); if (copy_to_user(dirent->d_name, name, namlen)) @@ -368,18 +364,14 @@ static int sunos_filldirentry(void * __buf, const char * name, int namlen, struct sunos_direntry_callback * buf = (struct sunos_direntry_callback *) __buf; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); - u32 d_ino; buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; dirent = buf->curr; buf->previous = dirent; - put_user(d_ino, &dirent->d_ino); + put_user(ino, &dirent->d_ino); put_user(namlen, &dirent->d_namlen); put_user(reclen, &dirent->d_reclen); if (copy_to_user(dirent->d_name, name, namlen)) diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S index d3a5cd553..3527f2090 100644 --- a/arch/sparc64/kernel/systbls.S +++ b/arch/sparc64/kernel/systbls.S @@ -10,6 +10,7 @@ * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) */ +#include .text .align 4 diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index b0b4feeec..e55b5c6ec 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -9,6 +9,7 @@ * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) */ +#include #include #include #include @@ -37,14 +38,16 @@ #include #include #include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include DEFINE_SPINLOCK(mostek_lock); DEFINE_SPINLOCK(rtc_lock); @@ -454,7 +457,7 @@ static inline void timer_check_rtc(void) } } -irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) +static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) { unsigned long ticks, compare, pstate; @@ -752,63 +755,215 @@ retry: return -EOPNOTSUPP; } -static int __init clock_model_matches(char *model) +void __init clock_probe(void) { - if (strcmp(model, "mk48t02") && - strcmp(model, "mk48t08") && - strcmp(model, "mk48t59") && - strcmp(model, "m5819") && - strcmp(model, "m5819p") && - strcmp(model, "m5823") && - strcmp(model, "ds1287")) - return 0; + struct linux_prom_registers clk_reg[2]; + char model[128]; + int node, busnd = -1, err; + unsigned long flags; + struct linux_central *cbus; +#ifdef CONFIG_PCI + struct linux_ebus *ebus = NULL; + struct sparc_isa_bridge *isa_br = NULL; +#endif + static int invoked; - return 1; -} + if (invoked) + return; + invoked = 1; -static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) -{ - struct device_node *dp = op->node; - char *model = of_get_property(dp, "model", NULL); - unsigned long size, flags; - void __iomem *regs; - if (!model || !clock_model_matches(model)) - return -ENODEV; + if (this_is_starfire) { + xtime.tv_sec = starfire_get_time(); + xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); + set_normalized_timespec(&wall_to_monotonic, + -xtime.tv_sec, -xtime.tv_nsec); + return; + } + if (tlb_type == hypervisor) { + xtime.tv_sec = hypervisor_get_time(); + xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); + set_normalized_timespec(&wall_to_monotonic, + -xtime.tv_sec, -xtime.tv_nsec); + return; + } - /* On an Enterprise system there can be multiple mostek clocks. - * We should only match the one that is on the central FHC bus. - */ - if (!strcmp(dp->parent->name, "fhc") && - strcmp(dp->parent->parent->name, "central") != 0) - return -ENODEV; + local_irq_save(flags); - size = (op->resource[0].end - op->resource[0].start) + 1; - regs = of_ioremap(&op->resource[0], 0, size, "clock"); - if (!regs) - return -ENOMEM; + cbus = central_bus; + if (cbus != NULL) + busnd = central_bus->child->prom_node; + /* Check FHC Central then EBUSs then ISA bridges then SBUSs. + * That way we handle the presence of multiple properly. + * + * As a special case, machines with Central must provide the + * timer chip there. + */ #ifdef CONFIG_PCI - if (!strcmp(model, "ds1287") || - !strcmp(model, "m5819") || - !strcmp(model, "m5819p") || - !strcmp(model, "m5823")) { - ds1287_regs = (unsigned long) regs; - } else + if (ebus_chain != NULL) { + ebus = ebus_chain; + if (busnd == -1) + busnd = ebus->prom_node; + } + if (isa_chain != NULL) { + isa_br = isa_chain; + if (busnd == -1) + busnd = isa_br->prom_node; + } #endif - if (model[5] == '0' && model[6] == '2') { - mstk48t02_regs = regs; - } else if(model[5] == '0' && model[6] == '8') { - mstk48t08_regs = regs; - mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; - } else { - mstk48t59_regs = regs; - mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; + if (sbus_root != NULL && busnd == -1) + busnd = sbus_root->prom_node; + + if (busnd == -1) { + prom_printf("clock_probe: problem, cannot find bus to search.\n"); + prom_halt(); } - printk(KERN_INFO "%s: Clock regs at %p\n", dp->full_name, regs); + node = prom_getchild(busnd); - local_irq_save(flags); + while (1) { + if (!node) + model[0] = 0; + else + prom_getstring(node, "model", model, sizeof(model)); + if (strcmp(model, "mk48t02") && + strcmp(model, "mk48t08") && + strcmp(model, "mk48t59") && + strcmp(model, "m5819") && + strcmp(model, "m5819p") && + strcmp(model, "m5823") && + strcmp(model, "ds1287")) { + if (cbus != NULL) { + prom_printf("clock_probe: Central bus lacks timer chip.\n"); + prom_halt(); + } + + if (node != 0) + node = prom_getsibling(node); +#ifdef CONFIG_PCI + while ((node == 0) && ebus != NULL) { + ebus = ebus->next; + if (ebus != NULL) { + busnd = ebus->prom_node; + node = prom_getchild(busnd); + } + } + while ((node == 0) && isa_br != NULL) { + isa_br = isa_br->next; + if (isa_br != NULL) { + busnd = isa_br->prom_node; + node = prom_getchild(busnd); + } + } +#endif + if (node == 0) { + prom_printf("clock_probe: Cannot find timer chip\n"); + prom_halt(); + } + continue; + } + + err = prom_getproperty(node, "reg", (char *)clk_reg, + sizeof(clk_reg)); + if(err == -1) { + prom_printf("clock_probe: Cannot get Mostek reg property\n"); + prom_halt(); + } + + if (cbus != NULL) { + apply_fhc_ranges(central_bus->child, clk_reg, 1); + apply_central_ranges(central_bus, clk_reg, 1); + } +#ifdef CONFIG_PCI + else if (ebus != NULL) { + struct linux_ebus_device *edev; + + for_each_ebusdev(edev, ebus) + if (edev->prom_node == node) + break; + if (edev == NULL) { + if (isa_chain != NULL) + goto try_isa_clock; + prom_printf("%s: Mostek not probed by EBUS\n", + __FUNCTION__); + prom_halt(); + } + + if (!strcmp(model, "ds1287") || + !strcmp(model, "m5819") || + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { + ds1287_regs = edev->resource[0].start; + } else { + mstk48t59_regs = (void __iomem *) + edev->resource[0].start; + mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; + } + break; + } + else if (isa_br != NULL) { + struct sparc_isa_device *isadev; + +try_isa_clock: + for_each_isadev(isadev, isa_br) + if (isadev->prom_node == node) + break; + if (isadev == NULL) { + prom_printf("%s: Mostek not probed by ISA\n"); + prom_halt(); + } + if (!strcmp(model, "ds1287") || + !strcmp(model, "m5819") || + !strcmp(model, "m5819p") || + !strcmp(model, "m5823")) { + ds1287_regs = isadev->resource.start; + } else { + mstk48t59_regs = (void __iomem *) + isadev->resource.start; + mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; + } + break; + } +#endif + else { + if (sbus_root->num_sbus_ranges) { + int nranges = sbus_root->num_sbus_ranges; + int rngc; + + for (rngc = 0; rngc < nranges; rngc++) + if (clk_reg[0].which_io == + sbus_root->sbus_ranges[rngc].ot_child_space) + break; + if (rngc == nranges) { + prom_printf("clock_probe: Cannot find ranges for " + "clock regs.\n"); + prom_halt(); + } + clk_reg[0].which_io = + sbus_root->sbus_ranges[rngc].ot_parent_space; + clk_reg[0].phys_addr += + sbus_root->sbus_ranges[rngc].ot_parent_base; + } + } + + if(model[5] == '0' && model[6] == '2') { + mstk48t02_regs = (void __iomem *) + (((u64)clk_reg[0].phys_addr) | + (((u64)clk_reg[0].which_io)<<32UL)); + } else if(model[5] == '0' && model[6] == '8') { + mstk48t08_regs = (void __iomem *) + (((u64)clk_reg[0].phys_addr) | + (((u64)clk_reg[0].which_io)<<32UL)); + mstk48t02_regs = mstk48t08_regs + MOSTEK_48T08_48T02; + } else { + mstk48t59_regs = (void __iomem *) + (((u64)clk_reg[0].phys_addr) | + (((u64)clk_reg[0].which_io)<<32UL)); + mstk48t02_regs = mstk48t59_regs + MOSTEK_48T59_48T02; + } + break; + } if (mstk48t02_regs != NULL) { /* Report a low battery voltage condition. */ @@ -823,63 +978,17 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id set_system_time(); local_irq_restore(flags); - - return 0; } -static struct of_device_id clock_match[] = { - { - .name = "eeprom", - }, - { - .name = "rtc", - }, - {}, -}; - -static struct of_platform_driver clock_driver = { - .name = "clock", - .match_table = clock_match, - .probe = clock_probe, -}; - -static int __init clock_init(void) -{ - if (this_is_starfire) { - xtime.tv_sec = starfire_get_time(); - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - return 0; - } - if (tlb_type == hypervisor) { - xtime.tv_sec = hypervisor_get_time(); - xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - return 0; - } - - return of_register_driver(&clock_driver, &of_bus_type); -} - -/* Must be after subsys_initcall() so that busses are probed. Must - * be before device_initcall() because things like the RTC driver - * need to see the clock registers. - */ -fs_initcall(clock_init); - /* This is gets the master TICK_INT timer going. */ static unsigned long sparc64_init_timers(void) { - struct device_node *dp; - struct property *prop; unsigned long clock; + int node; #ifdef CONFIG_SMP extern void smp_tick_init(void); #endif - dp = of_find_node_by_path("/"); if (tlb_type == spitfire) { unsigned long ver, manuf, impl; @@ -890,17 +999,18 @@ static unsigned long sparc64_init_timers(void) if (manuf == 0x17 && impl == 0x13) { /* Hummingbird, aka Ultra-IIe */ tick_ops = &hbtick_operations; - prop = of_find_property(dp, "stick-frequency", NULL); + node = prom_root_node; + clock = prom_getint(node, "stick-frequency"); } else { tick_ops = &tick_operations; - cpu_find_by_instance(0, &dp, NULL); - prop = of_find_property(dp, "clock-frequency", NULL); + cpu_find_by_instance(0, &node, NULL); + clock = prom_getint(node, "clock-frequency"); } } else { tick_ops = &stick_operations; - prop = of_find_property(dp, "stick-frequency", NULL); + node = prom_root_node; + clock = prom_getint(node, "stick-frequency"); } - clock = *(unsigned int *) prop->value; timer_tick_offset = clock / HZ; #ifdef CONFIG_SMP @@ -910,9 +1020,19 @@ static unsigned long sparc64_init_timers(void) return clock; } -static void sparc64_start_timers(void) +static void sparc64_start_timers(irqreturn_t (*cfunc)(int, void *, struct pt_regs *)) { unsigned long pstate; + int err; + + /* Register IRQ handler. */ + err = request_irq(build_irq(0, 0, 0UL, 0UL), cfunc, 0, + "timer", NULL); + + if (err) { + prom_printf("Serious problem, cannot register TICK_INT\n"); + prom_halt(); + } /* Guarantee that the following sequences execute * uninterrupted. @@ -928,6 +1048,8 @@ static void sparc64_start_timers(void) __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : /* no outputs */ : "r" (pstate)); + + local_irq_enable(); } struct freq_table { @@ -983,7 +1105,7 @@ static struct time_interpolator sparc64_cpu_interpolator = { }; /* The quotient formula is taken from the IA64 port. */ -#define SPARC64_NSEC_PER_CYC_SHIFT 10UL +#define SPARC64_NSEC_PER_CYC_SHIFT 30UL void __init time_init(void) { unsigned long clock = sparc64_init_timers(); @@ -994,7 +1116,7 @@ void __init time_init(void) /* Now that the interpolator is registered, it is * safe to start the timer ticking. */ - sparc64_start_timers(); + sparc64_start_timers(timer_interrupt); timer_ticks_per_nsec_quotient = (((NSEC_PER_SEC << SPARC64_NSEC_PER_CYC_SHIFT) + diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 68420e2da..563db528e 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -9,6 +9,7 @@ * I like traps on v9, :)))) */ +#include #include #include /* for jiffies */ #include @@ -41,7 +42,6 @@ #ifdef CONFIG_KMOD #include #endif -#include ATOMIC_NOTIFIER_HEAD(sparc64die_chain); @@ -807,8 +807,7 @@ extern unsigned int cheetah_deferred_trap_vector[], cheetah_deferred_trap_vector void __init cheetah_ecache_flush_init(void) { unsigned long largest_size, smallest_linesize, order, ver; - struct device_node *dp; - int i, instance, sz; + int node, i, instance; /* Scan all cpu device tree nodes, note two values: * 1) largest E-cache size @@ -818,14 +817,14 @@ void __init cheetah_ecache_flush_init(void) smallest_linesize = ~0UL; instance = 0; - while (!cpu_find_by_instance(instance, &dp, NULL)) { + while (!cpu_find_by_instance(instance, &node, NULL)) { unsigned long val; - val = of_getintprop_default(dp, "ecache-size", - (2 * 1024 * 1024)); + val = prom_getintdefault(node, "ecache-size", + (2 * 1024 * 1024)); if (val > largest_size) largest_size = val; - val = of_getintprop_default(dp, "ecache-line-size", 64); + val = prom_getintdefault(node, "ecache-line-size", 64); if (val < smallest_linesize) smallest_linesize = val; instance++; @@ -850,16 +849,16 @@ void __init cheetah_ecache_flush_init(void) } /* Now allocate error trap reporting scoreboard. */ - sz = NR_CPUS * (2 * sizeof(struct cheetah_err_info)); + node = NR_CPUS * (2 * sizeof(struct cheetah_err_info)); for (order = 0; order < MAX_ORDER; order++) { - if ((PAGE_SIZE << order) >= sz) + if ((PAGE_SIZE << order) >= node) break; } cheetah_error_log = (struct cheetah_err_info *) __get_free_pages(GFP_KERNEL, order); if (!cheetah_error_log) { prom_printf("cheetah_ecache_flush_init: Failed to allocate " - "error logging scoreboard (%d bytes).\n", sz); + "error logging scoreboard (%d bytes).\n", node); prom_halt(); } memset(cheetah_error_log, 0, PAGE_SIZE << order); @@ -2545,9 +2544,7 @@ void __init trap_init(void) (TRAP_PER_CPU_TSB_HUGE != offsetof(struct trap_per_cpu, tsb_huge)) || (TRAP_PER_CPU_TSB_HUGE_TEMP != - offsetof(struct trap_per_cpu, tsb_huge_temp)) || - (TRAP_PER_CPU_IRQ_WORKLIST != - offsetof(struct trap_per_cpu, irq_worklist))) + offsetof(struct trap_per_cpu, tsb_huge_temp))) trap_per_cpu_offsets_are_bolixed_dave(); if ((TSB_CONFIG_TSB != diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S index eedf94fa5..a0c8ba589 100644 --- a/arch/sparc64/kernel/tsb.S +++ b/arch/sparc64/kernel/tsb.S @@ -3,6 +3,7 @@ * Copyright (C) 2006 David S. Miller */ +#include #include #include diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S index d7d2a8bdc..5d901519d 100644 --- a/arch/sparc64/kernel/ttable.S +++ b/arch/sparc64/kernel/ttable.S @@ -3,6 +3,7 @@ * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net) */ +#include .globl sparc64_ttable_tl0, sparc64_ttable_tl1 .globl tl0_icpe, tl1_icpe @@ -57,11 +58,13 @@ tl0_irq2: BTRAP(0x42) tl0_irq3: BTRAP(0x43) tl0_irq4: BTRAP(0x44) #endif -tl0_irq5: TRAP_IRQ(handler_irq, 5) -tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) -tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) +tl0_irq5: TRAP_IRQ(handler_irq, 5) TRAP_IRQ(handler_irq, 6) +tl0_irq7: TRAP_IRQ(handler_irq, 7) TRAP_IRQ(handler_irq, 8) +tl0_irq9: TRAP_IRQ(handler_irq, 9) TRAP_IRQ(handler_irq, 10) +tl0_irq11: TRAP_IRQ(handler_irq, 11) TRAP_IRQ(handler_irq, 12) +tl0_irq13: TRAP_IRQ(handler_irq, 13) #ifndef CONFIG_SMP -tl0_irq14: TRAP_IRQ(timer_irq, 14) +tl0_irq14: TRAP_IRQ(handler_irq, 14) #else tl0_irq14: TICK_SMP_IRQ #endif diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index a9b765271..001e85183 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c @@ -20,7 +20,6 @@ #include #include #include -#include #include /* #define DEBUG_MNA */ @@ -280,22 +279,12 @@ static void kernel_mna_trap_fault(void) asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn) { - static unsigned long count, last_time; enum direction dir = decode_direction(insn); int size = decode_access_size(insn); current_thread_info()->kern_una_regs = regs; current_thread_info()->kern_una_insn = insn; - if (jiffies - last_time > 5 * HZ) - count = 0; - if (count < 5) { - last_time = jiffies; - count++; - printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); - print_symbol("%s\n", regs->tpc); - } - if (!ok_for_kernel(insn) || dir == both) { printk("Unsupported unaligned load/store trap for kernel " "at <%016lx>.\n", regs->tpc); diff --git a/arch/sparc64/lib/atomic.S b/arch/sparc64/lib/atomic.S index 963375016..faf87c315 100644 --- a/arch/sparc64/lib/atomic.S +++ b/arch/sparc64/lib/atomic.S @@ -4,6 +4,7 @@ * Copyright (C) 1999 David S. Miller (davem@redhat.com) */ +#include #include .text diff --git a/arch/sparc64/lib/bitops.S b/arch/sparc64/lib/bitops.S index 892431a82..31afbfe6c 100644 --- a/arch/sparc64/lib/bitops.S +++ b/arch/sparc64/lib/bitops.S @@ -4,6 +4,7 @@ * Copyright (C) 2000 David S. Miller (davem@redhat.com) */ +#include #include .text diff --git a/arch/sparc64/lib/mcount.S b/arch/sparc64/lib/mcount.S index 9e4534b48..2ef2e268b 100644 --- a/arch/sparc64/lib/mcount.S +++ b/arch/sparc64/lib/mcount.S @@ -5,6 +5,7 @@ * This can also be tweaked for kernel stack overflow detection. */ +#include #include #include diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 55ae802dc..6e002aacb 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -32,40 +31,6 @@ #include #include -#ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} - -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); -} -#else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - return NOTIFY_DONE; -} -#endif - /* * To debug kernel to catch accesses to certain virtual/physical addresses. * Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints. @@ -133,8 +98,6 @@ static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", regs->tpc); - printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]); - print_symbol("RPC: <%s>\n", regs->u_regs[15]); printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr); __asm__("mov %%sp, %0" : "=r" (ksp)); show_stack(current, ksp); @@ -300,7 +263,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) fault_code = get_thread_fault_code(); - if (notify_page_fault(DIE_PAGE_FAULT, "page_fault", regs, + if (notify_die(DIE_PAGE_FAULT, "page_fault", regs, fault_code, 0, SIGSEGV) == NOTIFY_STOP) return; diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c index 53b9b1f52..fbbbebbad 100644 --- a/arch/sparc64/mm/hugetlbpage.c +++ b/arch/sparc64/mm/hugetlbpage.c @@ -4,6 +4,7 @@ * Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net) */ +#include #include #include #include diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 09cb7fccc..1539a8362 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -5,6 +5,7 @@ * Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +42,6 @@ #include #include #include -#include extern void device_scan(void); @@ -102,6 +101,8 @@ static void __init read_obp_memory(const char *property, prom_halt(); } + *num_ents = ents; + /* Sanitize what we got from the firmware, by page aligning * everything. */ @@ -123,25 +124,6 @@ static void __init read_obp_memory(const char *property, regs[i].phys_addr = base; regs[i].reg_size = size; } - - for (i = 0; i < ents; i++) { - if (regs[i].reg_size == 0UL) { - int j; - - for (j = i; j < ents - 1; j++) { - regs[j].phys_addr = - regs[j+1].phys_addr; - regs[j].reg_size = - regs[j+1].reg_size; - } - - ents--; - i--; - } - } - - *num_ents = ents; - sort(regs, ents, sizeof(struct linux_prom64_registers), cmp_p64, NULL); } @@ -920,7 +902,8 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, if (sparc_ramdisk_image || sparc_ramdisk_image64) { unsigned long ramdisk_image = sparc_ramdisk_image ? sparc_ramdisk_image : sparc_ramdisk_image64; - ramdisk_image -= KERNBASE; + if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) + ramdisk_image -= KERNBASE; initrd_start = ramdisk_image + phys_base; initrd_end = initrd_start + sparc_ramdisk_size; if (initrd_end > end_of_phys_memory) { @@ -1356,8 +1339,6 @@ void __init paging_init(void) kernel_physical_mapping_init(); - prom_build_devicetree(); - { unsigned long zones_size[MAX_NR_ZONES]; unsigned long zholes_size[MAX_NR_ZONES]; @@ -1395,7 +1376,7 @@ static void __init taint_real_pages(void) while (old_start < old_end) { int n; - for (n = 0; n < pavail_rescan_ents; n++) { + for (n = 0; pavail_rescan_ents; n++) { unsigned long new_start, new_end; new_start = pavail_rescan[n].phys_addr; @@ -1417,32 +1398,6 @@ static void __init taint_real_pages(void) } } -int __init page_in_phys_avail(unsigned long paddr) -{ - int i; - - paddr &= PAGE_MASK; - - for (i = 0; i < pavail_rescan_ents; i++) { - unsigned long start, end; - - start = pavail_rescan[i].phys_addr; - end = start + pavail_rescan[i].reg_size; - - if (paddr >= start && paddr < end) - return 1; - } - if (paddr >= kern_base && paddr < (kern_base + kern_size)) - return 1; -#ifdef CONFIG_BLK_DEV_INITRD - if (paddr >= __pa(initrd_start) && - paddr < __pa(PAGE_ALIGN(initrd_end))) - return 1; -#endif - - return 0; -} - void __init mem_init(void) { unsigned long codepages, datapages, initpages; @@ -1519,7 +1474,7 @@ void free_initmem(void) page = (addr + ((unsigned long) __va(kern_base)) - ((unsigned long) KERNBASE)); - memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); + memset((void *)addr, 0xcc, PAGE_SIZE); p = virt_to_page(page); ClearPageReserved(p); @@ -1567,7 +1522,6 @@ pgprot_t PAGE_EXEC __read_mostly; unsigned long pg_iobits __read_mostly; unsigned long _PAGE_IE __read_mostly; -EXPORT_SYMBOL(_PAGE_IE); unsigned long _PAGE_E __read_mostly; EXPORT_SYMBOL(_PAGE_E); diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index d70b60a3b..f8479fad4 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S @@ -4,6 +4,7 @@ * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) */ +#include #include #include #include diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index 0b4213720..577bde8b6 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c @@ -6,6 +6,7 @@ * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c index 500f05e2c..49075abd7 100644 --- a/arch/sparc64/prom/tree.c +++ b/arch/sparc64/prom/tree.c @@ -193,6 +193,91 @@ prom_searchsiblings(int node_start, const char *nodename) return 0; } +/* Gets name in the {name@x,yyyyy|name (if no reg)} form */ +int +prom_getname (int node, char *buffer, int len) +{ + int i, sbus = 0; + int pci = 0, ebus = 0, ide = 0; + struct linux_prom_registers *reg; + struct linux_prom64_registers reg64[PROMREG_MAX]; + + for (sbus = prom_getparent (node); sbus; sbus = prom_getparent (sbus)) { + i = prom_getproperty (sbus, "name", buffer, len); + if (i > 0) { + buffer [i] = 0; + if (!strcmp (buffer, "sbus")) + goto getit; + } + } + if ((pci = prom_getparent (node))) { + i = prom_getproperty (pci, "name", buffer, len); + if (i > 0) { + buffer [i] = 0; + if (!strcmp (buffer, "pci")) + goto getit; + } + pci = 0; + } + if ((ebus = prom_getparent (node))) { + i = prom_getproperty (ebus, "name", buffer, len); + if (i > 0) { + buffer[i] = 0; + if (!strcmp (buffer, "ebus")) + goto getit; + } + ebus = 0; + } + if ((ide = prom_getparent (node))) { + i = prom_getproperty (ide, "name", buffer, len); + if (i > 0) { + buffer [i] = 0; + if (!strcmp (buffer, "ide")) + goto getit; + } + ide = 0; + } +getit: + i = prom_getproperty (node, "name", buffer, len); + if (i <= 0) { + buffer [0] = 0; + return -1; + } + buffer [i] = 0; + len -= i; + i = prom_getproperty (node, "reg", (char *)reg64, sizeof (reg64)); + if (i <= 0) return 0; + if (len < 16) return -1; + buffer = strchr (buffer, 0); + if (sbus) { + reg = (struct linux_prom_registers *)reg64; + sprintf (buffer, "@%x,%x", reg[0].which_io, (uint)reg[0].phys_addr); + } else if (pci) { + int dev, fn; + reg = (struct linux_prom_registers *)reg64; + fn = (reg[0].which_io >> 8) & 0x07; + dev = (reg[0].which_io >> 11) & 0x1f; + if (fn) + sprintf (buffer, "@%x,%x", dev, fn); + else + sprintf (buffer, "@%x", dev); + } else if (ebus) { + reg = (struct linux_prom_registers *)reg64; + sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr); + } else if (ide) { + reg = (struct linux_prom_registers *)reg64; + sprintf (buffer, "@%x,%x", reg[0].which_io, reg[0].phys_addr); + } else if (i == 4) { /* Happens on 8042's children on Ultra/PCI. */ + reg = (struct linux_prom_registers *)reg64; + sprintf (buffer, "@%x", reg[0].which_io); + } else { + sprintf (buffer, "@%x,%x", + (unsigned int)(reg64[0].phys_addr >> 36), + (unsigned int)(reg64[0].phys_addr)); + } + return 0; +} + /* Return the first property type for node 'node'. * buffer should be at least 32B in length */ diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c index 8cfb20ef2..612477de6 100644 --- a/arch/sparc64/solaris/fs.c +++ b/arch/sparc64/solaris/fs.c @@ -82,17 +82,12 @@ struct sol_stat64 { static inline int putstat(struct sol_stat __user *ubuf, struct kstat *kbuf) { - u32 ino; - if (kbuf->size > MAX_NON_LFS || !sysv_valid_dev(kbuf->dev) || !sysv_valid_dev(kbuf->rdev)) return -EOVERFLOW; - ino = kbuf->ino; - if (sizeof(ino) < sizeof(kbuf->ino) && ino != kbuf->ino) - return -EOVERFLOW; if (put_user (sysv_encode_dev(kbuf->dev), &ubuf->st_dev) || - __put_user (ino, &ubuf->st_ino) || + __put_user (kbuf->ino, &ubuf->st_ino) || __put_user (kbuf->mode, &ubuf->st_mode) || __put_user (kbuf->nlink, &ubuf->st_nlink) || __put_user (kbuf->uid, &ubuf->st_uid) || @@ -361,7 +356,7 @@ static int report_statvfs(struct vfsmount *mnt, struct inode *inode, u32 buf) int error; struct sol_statvfs __user *ss = A(buf); - error = vfs_statfs(mnt->mnt_root, &s); + error = vfs_statfs(mnt->mnt_sb, &s); if (!error) { const char *p = mnt->mnt_sb->s_type->name; int i = 0; @@ -397,7 +392,7 @@ static int report_statvfs64(struct vfsmount *mnt, struct inode *inode, u32 buf) int error; struct sol_statvfs64 __user *ss = A(buf); - error = vfs_statfs(mnt->mnt_root, &s); + error = vfs_statfs(mnt->mnt_sb, &s); if (!error) { const char *p = mnt->mnt_sb->s_type->name; int i = 0; diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index ebd420743..036d5f223 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -4,6 +4,7 @@ * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) */ +#include #include #include #include @@ -11,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -24,7 +24,6 @@ #include #include #include -#include #include "conv.h" @@ -196,17 +195,14 @@ static char *machine(void) } } -static char *platform(char *buffer, int sz) +static char *platform(char *buffer) { - struct device_node *dp = of_find_node_by_path("/"); int len; *buffer = 0; - len = strlen(dp->name); - if (len > sz) - len = sz; - memcpy(buffer, dp->name, len); - buffer[len] = 0; + len = prom_getproperty(prom_root_node, "name", buffer, 256); + if(len > 0) + buffer[len] = 0; if (*buffer) { char *p; @@ -218,22 +214,16 @@ static char *platform(char *buffer, int sz) return "sun4u"; } -static char *serial(char *buffer, int sz) +static char *serial(char *buffer) { - struct device_node *dp = of_find_node_by_path("/options"); + int node = prom_getchild(prom_root_node); int len; + node = prom_searchsiblings(node, "options"); *buffer = 0; - if (dp) { - char *val = of_get_property(dp, "system-board-serial#", &len); - - if (val && len > 0) { - if (len > sz) - len = sz; - memcpy(buffer, val, len); - buffer[len] = 0; - } - } + len = prom_getproperty(node, "system-board-serial#", buffer, 256); + if(len > 0) + buffer[len] = 0; if (!*buffer) return "4512348717234"; else @@ -316,8 +306,8 @@ asmlinkage int solaris_sysinfo(int cmd, u32 buf, s32 count) case SI_MACHINE: r = machine(); break; case SI_ARCHITECTURE: r = "sparc"; break; case SI_HW_PROVIDER: r = "Sun_Microsystems"; break; - case SI_HW_SERIAL: r = serial(buffer, sizeof(buffer)); break; - case SI_PLATFORM: r = platform(buffer, sizeof(buffer)); break; + case SI_HW_SERIAL: r = serial(buffer); break; + case SI_PLATFORM: r = platform(buffer); break; case SI_SRPC_DOMAIN: r = ""; break; case SI_VERSION: r = "Generic"; break; default: return -EINVAL; @@ -424,7 +414,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) Solaris setpgrp and setsid? */ ret = sys_setpgid(0, 0); if (ret) return ret; - proc_clear_tty(current); + current->signal->tty = NULL; return process_group(current); } case 2: /* getsid */ diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c index bc3df95bc..fc6669e8d 100644 --- a/arch/sparc64/solaris/socksys.c +++ b/arch/sparc64/solaris/socksys.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -189,6 +190,8 @@ init_socksys(void) return ret; } + devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys"); + file = fcheck(ret); /* N.B. Is this valid? Suppose the f_ops are in a module ... */ socksys_file_ops = *file->f_op; @@ -204,4 +207,5 @@ cleanup_socksys(void) { if (unregister_chrdev(30, "socksys")) printk ("Couldn't unregister socksys character device\n"); + devfs_remove ("socksys"); } diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 56a3c7c1c..795d09481 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -1,8 +1,3 @@ -config DEFCONFIG_LIST - string - option defconfig_list - default "arch/$ARCH/defconfig" - # UML uses the generic IRQ sugsystem config GENERIC_HARDIRQS bool diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index 09c1aca63..5681a8bd3 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug @@ -47,4 +47,14 @@ config GCOV If you're involved in UML kernel development and want to use gcov, say Y. If you're unsure, say N. +config SYSCALL_DEBUG + bool "Enable system call debugging" + default N + depends on DEBUG_INFO + help + This adds some system debugging to UML, including keeping a ring buffer + with recent system calls and some global and per-task statistics. + + If unsure, say N + endmenu diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index 3e9b3470c..dfd88b652 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 @@ -1,17 +1,14 @@ # Copyright 2003 - 2004 Pathscale, Inc # Released under the GPL -core-y += arch/um/sys-x86_64/ arch/x86_64/crypto/ +core-y += arch/um/sys-x86_64/ START := 0x60000000 #We #undef __x86_64__ for kernelspace, not for userspace where #it's needed for headers to work! -CFLAGS += -U__$(SUBARCH)__ -fno-builtin -m64 -USER_CFLAGS += -fno-builtin -m64 +CFLAGS += -U__$(SUBARCH)__ -fno-builtin +USER_CFLAGS += -fno-builtin CHECKFLAGS += -m64 -AFLAGS += -m64 -LDFLAGS += -m elf_x86_64 -CPPFLAGS += -m64 ELF_ARCH := i386:x86-64 ELF_FORMAT := elf64-x86-64 @@ -19,4 +16,3 @@ ELF_FORMAT := elf64-x86-64 # Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example. LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64 -LINK-y += -m64 diff --git a/arch/um/defconfig b/arch/um/defconfig index 780cc0a4a..402a74dc5 100644 --- a/arch/um/defconfig +++ b/arch/um/defconfig @@ -526,3 +526,4 @@ CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_GPROF is not set # CONFIG_GCOV is not set +# CONFIG_SYSCALL_DEBUG is not set diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index 64ff22aa0..d18a97473 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c @@ -35,6 +35,7 @@ */ #include +#include #include #include #include diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index 9c598e487..37232f908 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/module.h" #include "linux/init.h" #include "linux/slab.h" diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index ebebaabb7..6c2d4ccaf 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -8,6 +8,7 @@ #include "linux/list.h" #include "linux/kd.h" #include "linux/interrupt.h" +#include "linux/devfs_fs_kernel.h" #include "asm/uaccess.h" #include "chan_kern.h" #include "irq_user.h" @@ -373,7 +374,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data, int err; /* Interrupts are enabled here because we registered the interrupt with - * IRQF_DISABLED (see line_setup_irq).*/ + * SA_INTERRUPT (see line_setup_irq).*/ spin_lock_irq(&line->lock); err = flush_buffer(line); @@ -406,7 +407,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data, int line_setup_irq(int fd, int input, int output, struct line *line, void *data) { struct line_driver *driver = line->driver; - int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM; + int err = 0, flags = SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM; if (input) err = um_request_irq(driver->read_irq, fd, IRQ_READ, @@ -654,6 +655,7 @@ struct tty_driver *line_register_devfs(struct lines *set, driver->driver_name = line_driver->name; driver->name = line_driver->device_name; + driver->devfs_name = line_driver->devfs_name; driver->major = line_driver->major; driver->minor_start = line_driver->minor_start; driver->type = line_driver->type; @@ -767,7 +769,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty) spin_unlock(&winch_handler_lock); if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, - IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "winch", winch) < 0) printk("register_winch_irq - failed to register IRQ\n"); } diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index b414522f7..e4d9bb9fa 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c @@ -23,6 +23,7 @@ #include "linux/list.h" #include "linux/mm.h" #include "linux/console.h" +#include "linux/vs_cvirt.h" #include "asm/irq.h" #include "asm/uaccess.h" #include "user_util.h" @@ -300,6 +301,8 @@ void mconsole_reboot(struct mc_request *req) machine_restart(NULL); } +extern void ctrl_alt_del(void); + void mconsole_cad(struct mc_request *req) { mconsole_reply(req, "", 0, 0); @@ -777,7 +780,7 @@ static int mconsole_init(void) register_reboot_notifier(&reboot_notifier); err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt, - IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "mconsole", (void *)sock); if (err){ printk("Failed to get IRQ for management console\n"); diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 9bfd405c3..4b109fe7f 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c @@ -18,12 +18,7 @@ #include "umid.h" static struct mconsole_command commands[] = { - /* With uts namespaces, uts information becomes process-specific, so - * we need a process context. If we try handling this in interrupt - * context, we may hit an exiting process without a valid uts - * namespace. - */ - { "version", mconsole_version, MCONSOLE_PROC }, + { "version", mconsole_version, MCONSOLE_INTR }, { "halt", mconsole_halt, MCONSOLE_PROC }, { "reboot", mconsole_reboot, MCONSOLE_PROC }, { "config", mconsole_config, MCONSOLE_PROC }, diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 085decb98..8c7279bb3 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c @@ -5,6 +5,7 @@ * Licensed under the GPL. */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/netdevice.h" #include "linux/rtnetlink.h" @@ -127,7 +128,7 @@ static int uml_net_open(struct net_device *dev) } err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt, - IRQF_DISABLED | IRQF_SHARED, dev->name, dev); + SA_INTERRUPT | SA_SHIRQ, dev->name, dev); if(err != 0){ printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); err = -ENETUNREACH; diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 107c5e43f..0a7786e00 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c @@ -22,14 +22,13 @@ int tap_open_common(void *dev, char *gate_addr) { int tap_addr[4]; - if(gate_addr == NULL) - return 0; + if(gate_addr == NULL) return(0); if(sscanf(gate_addr, "%d.%d.%d.%d", &tap_addr[0], &tap_addr[1], &tap_addr[2], &tap_addr[3]) != 4){ printk("Invalid tap IP address - '%s'\n", gate_addr); - return -EINVAL; + return(-EINVAL); } - return 0; + return(0); } void tap_check_ips(char *gate_addr, unsigned char *eth_addr) @@ -95,25 +94,25 @@ int net_read(int fd, void *buf, int len) n = os_read_file(fd, buf, len); if(n == -EAGAIN) - return 0; + return(0); else if(n == 0) - return -ENOTCONN; - return n; + return(-ENOTCONN); + return(n); } int net_recvfrom(int fd, void *buf, int len) { int n; - CATCH_EINTR(n = recvfrom(fd, buf, len, 0, NULL, NULL)); + while(((n = recvfrom(fd, buf, len, 0, NULL, NULL)) < 0) && + (errno == EINTR)) ; + if(n < 0){ - if(errno == EAGAIN) - return 0; - return -errno; + if(errno == EAGAIN) return(0); + return(-errno); } - else if(n == 0) - return -ENOTCONN; - return n; + else if(n == 0) return(-ENOTCONN); + return(n); } int net_write(int fd, void *buf, int len) @@ -123,41 +122,37 @@ int net_write(int fd, void *buf, int len) n = os_write_file(fd, buf, len); if(n == -EAGAIN) - return 0; + return(0); else if(n == 0) - return -ENOTCONN; - return n; + return(-ENOTCONN); + return(n); } int net_send(int fd, void *buf, int len) { int n; - CATCH_EINTR(n = send(fd, buf, len, 0)); + while(((n = send(fd, buf, len, 0)) < 0) && (errno == EINTR)) ; if(n < 0){ - if(errno == EAGAIN) - return 0; - return -errno; + if(errno == EAGAIN) return(0); + return(-errno); } - else if(n == 0) - return -ENOTCONN; - return n; + else if(n == 0) return(-ENOTCONN); + return(n); } int net_sendto(int fd, void *buf, int len, void *to, int sock_len) { int n; - CATCH_EINTR(n = sendto(fd, buf, len, 0, (struct sockaddr *) to, - sock_len)); + while(((n = sendto(fd, buf, len, 0, (struct sockaddr *) to, + sock_len)) < 0) && (errno == EINTR)) ; if(n < 0){ - if(errno == EAGAIN) - return 0; - return -errno; + if(errno == EAGAIN) return(0); + return(-errno); } - else if(n == 0) - return -ENOTCONN; - return n; + else if(n == 0) return(-ENOTCONN); + return(n); } struct change_pre_exec_data { @@ -181,7 +176,7 @@ static int change_tramp(char **argv, char *output, int output_len) err = os_pipe(fds, 1, 0); if(err < 0){ printk("change_tramp - pipe failed, err = %d\n", -err); - return err; + return(err); } pe_data.close_me = fds[0]; pe_data.stdout = fds[1]; @@ -195,7 +190,7 @@ static int change_tramp(char **argv, char *output, int output_len) if (pid > 0) CATCH_EINTR(err = waitpid(pid, NULL, 0)); - return pid; + return(pid); } static void change(char *dev, char *what, unsigned char *addr, @@ -246,15 +241,26 @@ char *split_if_spec(char *str, ...) va_start(ap, str); while((arg = va_arg(ap, char **)) != NULL){ if(*str == '\0') - return NULL; + return(NULL); end = strchr(str, ','); if(end != str) *arg = str; if(end == NULL) - return NULL; + return(NULL); *end++ = '\0'; str = end; } va_end(ap); - return str; + return(str); } + +/* + * 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/port_kern.c b/arch/um/drivers/port_kern.c index 73755f37a..189839e4f 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c @@ -105,7 +105,7 @@ static int port_accept(struct port_list *port) .port = port }); if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, - IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "telnetd", conn)){ printk(KERN_ERR "port_accept : failed to get IRQ for " "telnetd\n"); @@ -186,7 +186,7 @@ void *port_data(int port_num) goto out_free; } if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, - IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port", + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "port", port)){ printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); goto out_close; diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index fcf065ebe..163ee0d5f 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c @@ -1,3 +1,4 @@ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/stddef.h" #include "linux/init.h" diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index e97dffaa3..a4d6415bc 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/fs.h" #include "linux/tty.h" #include "linux/tty_driver.h" @@ -53,6 +54,7 @@ static int ssl_remove(int n); static struct line_driver driver = { .name = "UML serial line", .device_name = "ttyS", + .devfs_name = "tts/", .major = TTY_MAJOR, .minor_start = 64, .type = TTY_DRIVER_TYPE_SERIAL, diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c index 6d2cf32a9..429ae8e6c 100644 --- a/arch/um/drivers/stderr_console.c +++ b/arch/um/drivers/stderr_console.c @@ -8,7 +8,10 @@ /* * Don't register by default -- as this registeres very early in the - * boot process it becomes the default console. + * boot process it becomes the default console. And as this isn't a + * real tty driver init isn't able to open /dev/console then. + * + * In most cases this isn't what you want ... */ static int use_stderr_console = 0; @@ -40,20 +43,3 @@ static int stderr_setup(char *str) return 1; } __setup("stderr=", stderr_setup); - -/* The previous behavior of not unregistering led to /dev/console being - * impossible to open. My FC5 filesystem started having init die, and the - * system panicing because of this. Unregistering causes the real - * console to become the default console, and /dev/console can then be - * opened. Making this an initcall makes this happen late enough that - * there is no added value in dumping everything to stderr, and the - * normal console is good enough to show you all available output. - */ -static int __init unregister_stderr(void) -{ - unregister_console(&stderr_console); - - return 0; -} - -__initcall(unregister_stderr); diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 78ad35fb6..61db8b2fc 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/posix_types.h" #include "linux/tty.h" #include "linux/tty_flip.h" @@ -59,6 +60,7 @@ static int con_remove(int n); static struct line_driver driver = { .name = "UML console", .device_name = "tty", + .devfs_name = "vc/", .major = TTY_MAJOR, .minor_start = 0, .type = TTY_DRIVER_TYPE_CONSOLE, diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c index 9f70edf5d..94c9265a4 100644 --- a/arch/um/drivers/tty.c +++ b/arch/um/drivers/tty.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -25,17 +25,17 @@ static void *tty_chan_init(char *str, int device, struct chan_opts *opts) if(*str != ':'){ printk("tty_init : channel type 'tty' must specify " "a device\n"); - return NULL; + return(NULL); } str++; data = um_kmalloc(sizeof(*data)); if(data == NULL) - return NULL; + return(NULL); *data = ((struct tty_chan) { .dev = str, .raw = opts->raw }); - - return data; + + return(data); } static int tty_open(int input, int output, int primary, void *d, @@ -45,21 +45,19 @@ static int tty_open(int input, int output, int primary, void *d, int fd, err; fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0); - if(fd < 0) - return fd; - + if(fd < 0) return(fd); if(data->raw){ CATCH_EINTR(err = tcgetattr(fd, &data->tt)); if(err) - return err; + return(err); err = raw(fd); if(err) - return err; + return(err); } *dev_out = data->dev; - return fd; + return(fd); } struct chan_ops tty_ops = { @@ -74,3 +72,14 @@ struct chan_ops tty_ops = { .free = generic_free, .winch = 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/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index ffdf3d135..0897852b0 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -20,10 +20,12 @@ #define MAJOR_NR UBD_MAJOR #define UBD_SHIFT 4 +#include "linux/config.h" #include "linux/module.h" #include "linux/blkdev.h" #include "linux/hdreg.h" #include "linux/init.h" +#include "linux/devfs_fs_kernel.h" #include "linux/cdrom.h" #include "linux/proc_fs.h" #include "linux/ctype.h" @@ -626,6 +628,8 @@ 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) @@ -635,10 +639,20 @@ static int ubd_new_disk(int major, u64 size, int unit, disk->first_minor = unit << UBD_SHIFT; disk->fops = &ubd_blops; set_capacity(disk, size / 512); - if(major == MAJOR_NR) + if(major == MAJOR_NR){ sprintf(disk->disk_name, "ubd%c", 'a' + unit); - else + 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); + } /* sysfs register (not for ide fake devices) */ if (major == MAJOR_NR) { @@ -827,6 +841,7 @@ int ubd_init(void) { int i; + devfs_mk_dir("ubd"); if (register_blkdev(MAJOR_NR, "ubd")) return -1; @@ -840,6 +855,7 @@ int ubd_init(void) char name[sizeof("ubd_nnn\0")]; snprintf(name, sizeof(name), "ubd_%d", fake_major); + devfs_mk_dir(name); if (register_blkdev(fake_major, "ubd")) return -1; } @@ -872,7 +888,7 @@ int ubd_driver_init(void){ return(0); } err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, - IRQF_DISABLED, "ubd", ubd_dev); + SA_INTERRUPT, "ubd", ubd_dev); if(err != 0) printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); return 0; @@ -1206,7 +1222,7 @@ int open_ubd_file(char *file, struct openflags *openflags, int shared, } } - /* Successful return case! */ + /* Succesful return case! */ if(backing_file_out == NULL) return(fd); diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c index 6036ec858..d269a80f4 100644 --- a/arch/um/drivers/xterm_kern.c +++ b/arch/um/drivers/xterm_kern.c @@ -54,7 +54,7 @@ int xterm_fd(int socket, int *pid_out) init_completion(&data->ready); err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, - IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "xterm", data); if (err){ printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 39bb21078..356390d1f 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h @@ -15,4 +15,3 @@ DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); DEFINE(UM_ELF_CLASS, ELF_CLASS); DEFINE(UM_ELFCLASS32, ELFCLASS32); DEFINE(UM_ELFCLASS64, ELFCLASS64); -DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index 15d311b9b..69a93c804 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h @@ -6,8 +6,6 @@ #ifndef __IRQ_USER_H__ #define __IRQ_USER_H__ -#include "uml-config.h" - struct irq_fd { struct irq_fd *next; void *id; @@ -28,10 +26,9 @@ extern void free_irq_by_fd(int fd); extern void reactivate_fd(int fd, int irqnum); extern void deactivate_fd(int fd, int irqnum); extern int deactivate_all_fds(void); -extern int activate_ipi(int fd, int pid); - -#ifdef CONFIG_MODE_TT extern void forward_interrupts(int pid); -#endif +extern int activate_ipi(int fd, int pid); +extern unsigned long irq_lock(void); +extern void irq_unlock(unsigned long flags); #endif diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index ab9c0b7fb..310980b32 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h @@ -6,6 +6,7 @@ #ifndef __KERN_UTIL_H__ #define __KERN_UTIL_H__ +#include "linux/threads.h" #include "sysdep/ptrace.h" #include "sysdep/faultinfo.h" @@ -71,8 +72,10 @@ extern void init_flush_vm(void); extern void *syscall_sp(void *t); extern void syscall_trace(union uml_pt_regs *regs, int entryexit); extern int hz(void); +extern void uml_idle_timer(void); extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs); extern int external_pid(void *t); +extern void boot_timer_handler(int sig); extern void interrupt_end(void); extern void initial_thread_cb(void (*proc)(void *), void *arg); extern int debugger_signal(int status, int pid); diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 27bf2f6fb..6ac0f8252 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h @@ -17,6 +17,7 @@ struct line_driver { char *name; char *device_name; + char *devfs_name; short major; short minor_start; short type; diff --git a/arch/um/include/longjmp.h b/arch/um/include/longjmp.h index 1b5c0131a..8e7053013 100644 --- a/arch/um/include/longjmp.h +++ b/arch/um/include/longjmp.h @@ -8,8 +8,8 @@ longjmp(*buf, val); \ } while(0) -#define UML_SETJMP(buf) ({ \ - int n, enable; \ +#define UML_SETJMP(buf, enable) ({ \ + int n; \ enable = get_signals(); \ n = setjmp(*buf); \ if(n != 0) \ diff --git a/arch/um/include/mconsole_kern.h b/arch/um/include/mconsole_kern.h index d0b690197..d86ee1426 100644 --- a/arch/um/include/mconsole_kern.h +++ b/arch/um/include/mconsole_kern.h @@ -6,6 +6,7 @@ #ifndef __MCONSOLE_KERN_H__ #define __MCONSOLE_KERN_H__ +#include "linux/config.h" #include "linux/list.h" #include "mconsole.h" diff --git a/arch/um/include/mode_kern.h b/arch/um/include/mode_kern.h index 88e5e77bf..e7539a845 100644 --- a/arch/um/include/mode_kern.h +++ b/arch/um/include/mode_kern.h @@ -6,6 +6,8 @@ #ifndef __MODE_KERN_H__ #define __MODE_KERN_H__ +#include "linux/config.h" + #ifdef CONFIG_MODE_TT #include "mode_kern_tt.h" #endif diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 5316e8a4a..f88856c28 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -15,9 +15,9 @@ #include "irq_user.h" #include "sysdep/tls.h" -#define OS_TYPE_FILE 1 -#define OS_TYPE_DIR 2 -#define OS_TYPE_SYMLINK 3 +#define OS_TYPE_FILE 1 +#define OS_TYPE_DIR 2 +#define OS_TYPE_SYMLINK 3 #define OS_TYPE_CHARDEV 4 #define OS_TYPE_BLOCKDEV 5 #define OS_TYPE_FIFO 6 @@ -61,68 +61,68 @@ struct openflags { }; #define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \ - .t = 0, .a = 0, .e = 0, .cl = 0 }) + .t = 0, .a = 0, .e = 0, .cl = 0 }) static inline struct openflags of_read(struct openflags flags) { - flags.r = 1; - return flags; + flags.r = 1; + return(flags); } static inline struct openflags of_write(struct openflags flags) { - flags.w = 1; - return flags; + flags.w = 1; + return(flags); } static inline struct openflags of_rdwr(struct openflags flags) { - return of_read(of_write(flags)); + return(of_read(of_write(flags))); } static inline struct openflags of_set_rw(struct openflags flags, int r, int w) { flags.r = r; flags.w = w; - return flags; + return(flags); } static inline struct openflags of_sync(struct openflags flags) -{ - flags.s = 1; - return flags; +{ + flags.s = 1; + return(flags); } static inline struct openflags of_create(struct openflags flags) -{ - flags.c = 1; - return flags; +{ + flags.c = 1; + return(flags); } - + static inline struct openflags of_trunc(struct openflags flags) -{ - flags.t = 1; - return flags; +{ + flags.t = 1; + return(flags); } - + static inline struct openflags of_append(struct openflags flags) -{ - flags.a = 1; - return flags; +{ + flags.a = 1; + return(flags); } - + static inline struct openflags of_excl(struct openflags flags) -{ - flags.e = 1; - return flags; +{ + flags.e = 1; + return(flags); } static inline struct openflags of_cloexec(struct openflags flags) -{ - flags.cl = 1; - return flags; +{ + flags.cl = 1; + return(flags); } - + /* file.c */ extern int os_stat_file(const char *file_name, struct uml_stat *buf); extern int os_stat_fd(const int fd, struct uml_stat *buf); @@ -199,12 +199,12 @@ extern int os_getpid(void); extern int os_getpgrp(void); extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); -extern void init_new_thread_signals(void); +extern void init_new_thread_signals(int altstack); extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); extern int os_map_memory(void *virt, int fd, unsigned long long off, unsigned long len, int r, int w, int x); -extern int os_protect_memory(void *addr, unsigned long len, +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 int os_drop_memory(void *addr, int length); @@ -318,6 +318,7 @@ extern void reboot_skas(void); /* irq.c */ extern int os_waiting_for_events(struct irq_fd *active_fds); +extern int os_isatty(int fd); extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds); extern void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, struct irq_fd *active_fds, struct irq_fd ***last_irq_ptr2); @@ -329,8 +330,9 @@ extern void os_set_ioignore(void); extern void init_irq_signals(int on_sigstack); /* sigio.c */ +extern void write_sigio_workaround(void); +extern int add_sigio_fd(int fd, int read); extern int ignore_sigio_fd(int fd); -extern void maybe_sigio_broken(int fd, int read); /* skas/trap */ extern void sig_handler_common_skas(int sig, void *sc_ptr); diff --git a/arch/um/include/skas/mmu-skas.h b/arch/um/include/skas/mmu-skas.h index b26986c0c..d8869a6ef 100644 --- a/arch/um/include/skas/mmu-skas.h +++ b/arch/um/include/skas/mmu-skas.h @@ -6,6 +6,7 @@ #ifndef __SKAS_MMU_H #define __SKAS_MMU_H +#include "linux/config.h" #include "mm_id.h" #include "asm/ldt.h" diff --git a/arch/um/include/skas/mode_kern_skas.h b/arch/um/include/skas/mode_kern_skas.h index 9cd9c6ec9..63c58739b 100644 --- a/arch/um/include/skas/mode_kern_skas.h +++ b/arch/um/include/skas/mode_kern_skas.h @@ -29,7 +29,8 @@ extern void flush_tlb_mm_skas(struct mm_struct *mm); extern void force_flush_all_skas(void); extern long execute_syscall_skas(void *r); extern void before_mem_skas(unsigned long unused); -extern unsigned long set_task_sizes_skas(unsigned long *task_size_out); +extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, + unsigned long *task_size_out); extern int start_uml_skas(void); extern int external_pid_skas(struct task_struct *task); extern int thread_pid_skas(struct task_struct *task); diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h index 2e58c4c6e..2c13de321 100644 --- a/arch/um/include/sysdep-i386/kernel-offsets.h +++ b/arch/um/include/sysdep-i386/kernel-offsets.h @@ -1,7 +1,6 @@ #include #include #include -#include #include #define DEFINE(sym, val) \ diff --git a/arch/um/include/sysdep-ppc/ptrace.h b/arch/um/include/sysdep-ppc/ptrace.h index df2397dba..8a2735373 100644 --- a/arch/um/include/sysdep-ppc/ptrace.h +++ b/arch/um/include/sysdep-ppc/ptrace.h @@ -5,6 +5,7 @@ #ifndef __SYS_PTRACE_PPC_H #define __SYS_PTRACE_PPC_H +#include "linux/config.h" #include "linux/types.h" /* the following taken from */ diff --git a/arch/um/include/sysdep-x86_64/kernel-offsets.h b/arch/um/include/sysdep-x86_64/kernel-offsets.h index 4cbfbb9d4..939cc4757 100644 --- a/arch/um/include/sysdep-x86_64/kernel-offsets.h +++ b/arch/um/include/sysdep-x86_64/kernel-offsets.h @@ -1,8 +1,8 @@ +#include #include #include #include #include -#include #include #include diff --git a/arch/um/include/sysdep-x86_64/syscalls.h b/arch/um/include/sysdep-x86_64/syscalls.h index 5e86aa047..e06f83e80 100644 --- a/arch/um/include/sysdep-x86_64/syscalls.h +++ b/arch/um/include/sysdep-x86_64/syscalls.h @@ -12,6 +12,8 @@ typedef long syscall_handler_t(void); +extern syscall_handler_t *ia32_sys_call_table[]; + extern syscall_handler_t *sys_call_table[]; #define EXECUTE_SYSCALL(syscall, regs) \ diff --git a/arch/um/include/tt/mode_kern_tt.h b/arch/um/include/tt/mode_kern_tt.h index a4fc63057..efa001255 100644 --- a/arch/um/include/tt/mode_kern_tt.h +++ b/arch/um/include/tt/mode_kern_tt.h @@ -30,7 +30,8 @@ extern void flush_tlb_mm_tt(struct mm_struct *mm); extern void force_flush_all_tt(void); extern long execute_syscall_tt(void *r); extern void before_mem_tt(unsigned long brk_start); -extern unsigned long set_task_sizes_tt(unsigned long *task_size_out); +extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, + unsigned long *task_size_out); extern int start_uml_tt(void); extern int external_pid_tt(struct task_struct *task); extern int thread_pid_tt(struct task_struct *task); diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h index 5126a99b5..4567f1eeb 100644 --- a/arch/um/include/um_uaccess.h +++ b/arch/um/include/um_uaccess.h @@ -6,6 +6,7 @@ #ifndef __ARCH_UM_UACCESS_H #define __ARCH_UM_UACCESS_H +#include "linux/config.h" #include "choose-mode.h" #ifdef CONFIG_MODE_TT diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index a2d93065b..fe08971b6 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile @@ -6,14 +6,16 @@ extra-y := vmlinux.lds clean-files := -obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \ - physmem.o process_kern.o ptrace.o reboot.o resource.o sigio.o \ - signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \ - um_arch.o umid.o +obj-y = config.o exec_kern.o exitcode.o \ + init_task.o irq.o ksyms.o mem.o physmem.o \ + process_kern.o ptrace.o reboot.o resource.o sigio_kern.o \ + signal_kern.o smp.o syscall_kern.o sysrq.o \ + time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o obj-$(CONFIG_GPROF) += gprof_syms.o obj-$(CONFIG_GCOV) += gmon_syms.o +obj-$(CONFIG_SYSCALL_DEBUG) += syscall.o obj-$(CONFIG_MODE_TT) += tt/ obj-$(CONFIG_MODE_SKAS) += skas/ diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 68ed24df5..2517ecb8b 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S @@ -26,7 +26,6 @@ SECTIONS /* Read-only sections, merged into text segment: */ .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec_kern.c similarity index 87% rename from arch/um/kernel/exec.c rename to arch/um/kernel/exec_kern.c index fc38a6d59..c0cb627bf 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec_kern.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -31,27 +31,18 @@ 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); } -#ifdef CONFIG_TTY_LOG -extern void log_exec(char **argv, void *tty); -#endif - static long execve1(char *file, char __user * __user *argv, char __user *__user *env) { long error; #ifdef CONFIG_TTY_LOG - task_lock(current); - log_exec(argv, current->signal->tty); - task_unlock(current); + log_exec(argv, current->tty); #endif error = do_execve(file, argv, env, ¤t->thread.regs); if (error == 0){ task_lock(current); current->ptrace &= ~PT_DTRACE; -#ifdef SUBARCH_EXECVE1 - SUBARCH_EXECVE1(¤t->thread.regs.regs); -#endif task_unlock(current); set_cmdline(current_cmd()); } diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index 8cde43134..49ed5ddf0 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/mm.h" #include "linux/module.h" #include "linux/sched.h" diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 1e766cee6..2ffda0123 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c @@ -5,6 +5,7 @@ * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/module.h" #include "linux/smp.h" @@ -62,7 +63,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -109,7 +110,18 @@ void sigio_handler(int sig, union uml_pt_regs *regs) free_irqs(); } -static DEFINE_SPINLOCK(irq_lock); +static void maybe_sigio_broken(int fd, int type) +{ + if (os_isatty(fd)) { + if ((type == IRQ_WRITE) && !pty_output_sigio) { + write_sigio_workaround(); + add_sigio_fd(fd, 0); + } else if ((type == IRQ_READ) && !pty_close_sigio) { + write_sigio_workaround(); + add_sigio_fd(fd, 1); + } + } +} int activate_fd(int irq, int fd, int type, void *dev_id) { @@ -154,7 +166,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id) * this is called only from process context, and can be locked with * a semaphore. */ - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); for (irq_fd = active_fds; irq_fd != NULL; irq_fd = irq_fd->next) { if ((irq_fd->fd == fd) && (irq_fd->type == type)) { printk("Registering fd %d twice\n", fd); @@ -187,7 +199,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id) * so we will not be able to put new pollfd struct to pollfds * then we free the buffer tmp_fds and try again. */ - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); kfree(tmp_pfd); tmp_pfd = NULL; @@ -195,24 +207,24 @@ int activate_fd(int irq, int fd, int type, void *dev_id) if (tmp_pfd == NULL) goto out_kfree; - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); } /*-------------*/ *last_irq_ptr = new_fd; last_irq_ptr = &new_fd->next; - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); /* This calls activate_fd, so it has to be outside the critical * section. */ - maybe_sigio_broken(fd, (type == IRQ_READ)); + maybe_sigio_broken(fd, type); return(0); out_unlock: - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); out_kfree: kfree(new_fd); out: @@ -223,9 +235,9 @@ static void free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg) { unsigned long flags; - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); os_free_irq_by_cb(test, arg, active_fds, &last_irq_ptr); - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); } struct irq_and_dev { @@ -292,19 +304,19 @@ void reactivate_fd(int fd, int irqnum) unsigned long flags; int i; - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); irq = find_irq_by_fd(fd, irqnum, &i); if (irq == NULL) { - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); return; } os_set_pollfd(i, irq->fd); - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); /* This calls activate_fd, so it has to be outside the critical * section. */ - maybe_sigio_broken(fd, (irq->type == IRQ_READ)); + maybe_sigio_broken(fd, irq->type); } void deactivate_fd(int fd, int irqnum) @@ -313,13 +325,13 @@ void deactivate_fd(int fd, int irqnum) unsigned long flags; int i; - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); irq = find_irq_by_fd(fd, irqnum, &i); if (irq == NULL) goto out; os_set_pollfd(i, -1); out: - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); } int deactivate_all_fds(void) @@ -338,14 +350,13 @@ int deactivate_all_fds(void) return 0; } -#ifdef CONFIG_MODE_TT void forward_interrupts(int pid) { struct irq_fd *irq; unsigned long flags; int err; - spin_lock_irqsave(&irq_lock, flags); + flags = irq_lock(); for (irq = active_fds; irq != NULL; irq = irq->next) { err = os_set_owner(irq->fd, pid); if (err < 0) { @@ -358,9 +369,8 @@ void forward_interrupts(int pid) irq->pid = pid; } - spin_unlock_irqrestore(&irq_lock, flags); + irq_unlock(flags); } -#endif /* * do_IRQ handles all normal device IRQ's (the special @@ -393,6 +403,21 @@ int um_request_irq(unsigned int irq, int fd, int type, EXPORT_SYMBOL(um_request_irq); EXPORT_SYMBOL(reactivate_fd); +static DEFINE_SPINLOCK(irq_spinlock); + +unsigned long irq_lock(void) +{ + unsigned long flags; + + spin_lock_irqsave(&irq_spinlock, flags); + return flags; +} + +void irq_unlock(unsigned long flags) +{ + spin_unlock_irqrestore(&irq_spinlock, flags); +} + /* hw_interrupt_type must define (startup || enable) && * (shutdown || disable) && end */ static void dummy(unsigned int irq) @@ -426,13 +451,13 @@ void __init init_IRQ(void) irq_desc[TIMER_IRQ].status = IRQ_DISABLED; irq_desc[TIMER_IRQ].action = NULL; irq_desc[TIMER_IRQ].depth = 1; - irq_desc[TIMER_IRQ].chip = &SIGVTALRM_irq_type; + irq_desc[TIMER_IRQ].handler = &SIGVTALRM_irq_type; enable_irq(TIMER_IRQ); for (i = 1; i < NR_IRQS; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = NULL; irq_desc[i].depth = 1; - irq_desc[i].chip = &normal_irq_type; + irq_desc[i].handler = &normal_irq_type; enable_irq(i); } } @@ -449,7 +474,7 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, } err = um_request_irq(irq, fds[0], IRQ_READ, handler, - IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name, + SA_INTERRUPT | SA_SAMPLE_RANDOM, name, (void *) (long) fds[0]); if (err) { printk("init_aio_irq - : um_request_irq failed, err = %d\n", diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index cecb34407..432cf0b97 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/module.h" #include "linux/string.h" #include "linux/smp_lock.h" @@ -87,6 +88,12 @@ EXPORT_SYMBOL(dump_thread); EXPORT_SYMBOL(do_gettimeofday); EXPORT_SYMBOL(do_settimeofday); +/* This is here because UML expands lseek to sys_lseek, not to a system + * call instruction. + */ +EXPORT_SYMBOL(sys_lseek); +EXPORT_SYMBOL(sys_wait4); + #ifdef CONFIG_SMP /* required for SMP */ diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 61280167c..44e41a35f 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -24,6 +24,8 @@ #include "init.h" #include "kern_constants.h" +extern char __binary_start; + /* Changed during early boot */ unsigned long *empty_zero_page = NULL; unsigned long *empty_bad_page = NULL; @@ -63,6 +65,8 @@ static void setup_highmem(unsigned long highmem_start, void mem_init(void) { + unsigned long start; + max_low_pfn = (high_physmem - uml_physmem) >> PAGE_SHIFT; /* clear the zero-page */ @@ -77,6 +81,13 @@ void mem_init(void) free_bootmem(__pa(brk_end), uml_reserved - brk_end); uml_reserved = brk_end; + /* Fill in any hole at the start of the binary */ + start = (unsigned long) &__binary_start & PAGE_MASK; + if(uml_physmem != start){ + map_memory(uml_physmem, __pa(uml_physmem), start - uml_physmem, + 1, 1, 0); + } + /* this will put all low memory onto the freelists */ totalram_pages = free_all_bootmem(); totalhigh_pages = highmem >> PAGE_SHIFT; diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 22c40d308..bd4627b4d 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c @@ -69,7 +69,7 @@ static void insert_phys_mapping(struct phys_desc *desc) panic("Physical remapping for %p already present", desc->virt); - rb_link_node(&desc->rb, rb_parent(*n), n); + rb_link_node(&desc->rb, (*n)->rb_parent, n); rb_insert_color(&desc->rb, &phys_mappings); } @@ -319,7 +319,7 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len, } } -extern int __syscall_stub_start; +extern int __syscall_stub_start, __binary_start; void setup_physmem(unsigned long start, unsigned long reserve_end, unsigned long len, unsigned long long highmem) diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index 6a0804f00..f6a5a5021 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c @@ -4,6 +4,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/sched.h" #include "linux/interrupt.h" diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio_kern.c similarity index 68% rename from arch/um/kernel/sigio.c rename to arch/um/kernel/sigio_kern.c index 0ad755ceb..1c1300fb1 100644 --- a/arch/um/kernel/sigio.c +++ b/arch/um/kernel/sigio_kern.c @@ -31,7 +31,7 @@ int write_sigio_irq(int fd) int err; err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, - IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio", + SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio", NULL); if(err){ printk("write_sigio_irq : um_request_irq failed, err = %d\n", @@ -53,3 +53,17 @@ void sigio_unlock(void) { spin_unlock(&sigio_spinlock); } + +extern void sigio_cleanup(void); +__uml_exitcall(sigio_cleanup); + +/* + * 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/kernel/signal.c b/arch/um/kernel/signal_kern.c similarity index 96% rename from arch/um/kernel/signal.c rename to arch/um/kernel/signal_kern.c index 2a32e5e8e..da17b7541 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal_kern.c @@ -1,8 +1,9 @@ -/* +/* * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ +#include "linux/config.h" #include "linux/stddef.h" #include "linux/sys.h" #include "linux/sched.h" @@ -35,7 +36,7 @@ EXPORT_SYMBOL(unblock_signals); /* * OK, we're invoking a handler - */ + */ static int handle_signal(struct pt_regs *regs, unsigned long signr, struct k_sigaction *ka, siginfo_t *info, sigset_t *oldset) @@ -87,7 +88,7 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, force_sigsegv(signr, current); } else { spin_lock_irq(¤t->sighand->siglock); - sigorsets(¤t->blocked, ¤t->blocked, + sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); if(!(ka->sa.sa_flags & SA_NODEFER)) sigaddset(¤t->blocked, signr); @@ -135,7 +136,7 @@ static int kern_do_signal(struct pt_regs *regs) PT_REGS_RESTART_SYSCALL(regs); break; case -ERESTART_RESTARTBLOCK: - PT_REGS_ORIG_SYSCALL(regs) = __NR_restart_syscall; + PT_REGS_SYSCALL_RET(regs) = __NR_restart_syscall; PT_REGS_RESTART_SYSCALL(regs); break; } @@ -145,7 +146,7 @@ static int kern_do_signal(struct pt_regs *regs) * you set a breakpoint on a system call instruction and singlestep * from it, the tracing thread used to PTRACE_SINGLESTEP the process * rather than PTRACE_SYSCALL it, allowing the system call to execute - * on the host. The tracing thread will check this flag and + * on the host. The tracing thread will check this flag and * PTRACE_SYSCALL if necessary. */ if(current->ptrace & PT_DTRACE) diff --git a/arch/um/kernel/skas/mem.c b/arch/um/kernel/skas/mem.c index 0d2cce621..88ab96c60 100644 --- a/arch/um/kernel/skas/mem.c +++ b/arch/um/kernel/skas/mem.c @@ -3,24 +3,37 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/mm.h" #include "asm/pgtable.h" #include "mem_user.h" #include "skas.h" -unsigned long set_task_sizes_skas(unsigned long *task_size_out) +unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, + unsigned long *task_size_out) { /* Round up to the nearest 4M */ - unsigned long host_task_size = ROUND_4M((unsigned long) - &host_task_size); + unsigned long top = ROUND_4M((unsigned long) &arg); #ifdef CONFIG_HOST_TASK_SIZE - *host_size_out = ROUND_4M(CONFIG_HOST_TASK_SIZE); + *host_size_out = CONFIG_HOST_TASK_SIZE; *task_size_out = CONFIG_HOST_TASK_SIZE; #else + *host_size_out = top; if (!skas_needs_stub) - *task_size_out = host_task_size; + *task_size_out = top; else *task_size_out = CONFIG_STUB_START & PGDIR_MASK; #endif - return host_task_size; + return(((unsigned long) set_task_sizes_skas) & ~0xffffff); } + +/* + * 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/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 58fb36ae3..c5c9885a8 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/sched.h" #include "linux/list.h" #include "linux/spinlock.h" @@ -151,7 +152,7 @@ void destroy_context_skas(struct mm_struct *mm) free_page(mmu->id.stack); pte_lock_deinit(virt_to_page(mmu->last_page_table)); pte_free_kernel((pte_t *) mmu->last_page_table); - dec_zone_page_state(virt_to_page(mmu->last_page_table), NR_PAGETABLE); + dec_page_state(nr_page_table_pages); #ifdef CONFIG_3_LEVEL_PGTABLES pmd_free((pmd_t *) mmu->last_pmd); #endif diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index 55caeec8b..2135eaf98 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c @@ -177,7 +177,7 @@ int start_uml_skas(void) if(proc_mm) userspace_pid[0] = start_userspace(0); - init_new_thread_signals(); + init_new_thread_signals(1); init_task.thread.request.u.thread.proc = start_kernel_proc; init_task.thread.request.u.thread.arg = NULL; diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 0ae4eea21..51fb94076 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c @@ -18,7 +18,11 @@ void handle_syscall(union uml_pt_regs *r) struct pt_regs *regs = container_of(r, struct pt_regs, regs); long result; int syscall; +#ifdef UML_CONFIG_SYSCALL_DEBUG + int index; + index = record_syscall_start(UPT_SYSCALL_NR(r)); +#endif syscall_trace(r, 0); current->thread.nsyscalls++; @@ -40,4 +44,7 @@ void handle_syscall(union uml_pt_regs *r) REGS_SET_SYSCALL_RETURN(r->skas.regs, result); syscall_trace(r, 1); +#ifdef UML_CONFIG_SYSCALL_DEBUG + record_syscall_end(index, result); +#endif } diff --git a/arch/um/kernel/skas/tlb.c b/arch/um/kernel/skas/tlb.c index 27eb29ce6..6e84963df 100644 --- a/arch/um/kernel/skas/tlb.c +++ b/arch/um/kernel/skas/tlb.c @@ -6,6 +6,7 @@ #include "linux/stddef.h" #include "linux/sched.h" +#include "linux/config.h" #include "linux/mm.h" #include "asm/page.h" #include "asm/pgtable.h" diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c index 8912cec0f..5992c3257 100644 --- a/arch/um/kernel/skas/uaccess.c +++ b/arch/um/kernel/skas/uaccess.c @@ -8,7 +8,6 @@ #include "linux/kernel.h" #include "linux/string.h" #include "linux/fs.h" -#include "linux/hardirq.h" #include "linux/highmem.h" #include "asm/page.h" #include "asm/pgtable.h" @@ -39,7 +38,7 @@ static unsigned long maybe_map(unsigned long virt, int is_write) return((unsigned long) phys); } -static int do_op_one_page(unsigned long addr, int len, int is_write, +static int do_op(unsigned long addr, int len, int is_write, int (*op)(unsigned long addr, int len, void *arg), void *arg) { struct page *page; @@ -50,11 +49,9 @@ static int do_op_one_page(unsigned long addr, int len, int is_write, return(-1); page = phys_to_page(addr); - addr = (unsigned long) kmap_atomic(page, KM_UML_USERCOPY) + (addr & ~PAGE_MASK); - + addr = (unsigned long) kmap(page) + (addr & ~PAGE_MASK); n = (*op)(addr, len, arg); - - kunmap_atomic(page, KM_UML_USERCOPY); + kunmap(page); return(n); } @@ -80,7 +77,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) remain = len; current->thread.fault_catcher = jmpbuf; - n = do_op_one_page(addr, size, is_write, op, arg); + n = do_op(addr, size, is_write, op, arg); if(n != 0){ *res = (n < 0 ? remain : 0); goto out; @@ -94,7 +91,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) } while(addr < ((addr + remain) & PAGE_MASK)){ - n = do_op_one_page(addr, PAGE_SIZE, is_write, op, arg); + n = do_op(addr, PAGE_SIZE, is_write, op, arg); if(n != 0){ *res = (n < 0 ? remain : 0); goto out; @@ -108,7 +105,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) goto out; } - n = do_op_one_page(addr, remain, is_write, op, arg); + n = do_op(addr, remain, is_write, op, arg); if(n != 0) *res = (n < 0 ? remain : 0); else *res = 0; diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c index 759b07053..511116aeb 100644 --- a/arch/um/kernel/smp.c +++ b/arch/um/kernel/smp.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/percpu.h" #include "asm/pgalloc.h" #include "asm/tlb.h" diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index e7ec407e7..1731d90e6 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c @@ -1,171 +1,36 @@ /* - * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ -#include "linux/sched.h" -#include "linux/file.h" -#include "linux/smp_lock.h" -#include "linux/mm.h" -#include "linux/utsname.h" -#include "linux/msg.h" -#include "linux/shm.h" -#include "linux/sys.h" -#include "linux/syscalls.h" -#include "linux/unistd.h" -#include "linux/slab.h" -#include "linux/utime.h" -#include -#include - -#include "asm/mman.h" -#include "asm/uaccess.h" #include "kern_util.h" -#include "user_util.h" -#include "sysdep/syscalls.h" -#include "mode_kern.h" -#include "choose-mode.h" - -/* Unlocked, I don't care if this is a bit off */ -int nsyscalls = 0; +#include "syscall.h" +#include "os.h" -long sys_fork(void) -{ - long ret; - - current->thread.forking = 1; - ret = do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), - ¤t->thread.regs, 0, NULL, NULL); - current->thread.forking = 0; - return(ret); -} - -long sys_vfork(void) -{ - long ret; - - current->thread.forking = 1; - ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, - UPT_SP(¤t->thread.regs.regs), - ¤t->thread.regs, 0, NULL, NULL); - current->thread.forking = 0; - return(ret); -} +struct { + int syscall; + int pid; + long result; + unsigned long long start; + unsigned long long end; +} syscall_record[1024]; -/* common code for old and new mmaps */ -long sys_mmap2(unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff) +int record_syscall_start(int syscall) { - long error = -EBADF; - struct file * file = NULL; + int max, index; - flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); - if (!(flags & MAP_ANONYMOUS)) { - file = fget(fd); - if (!file) - goto out; - } + max = sizeof(syscall_record)/sizeof(syscall_record[0]); + index = next_syscall_index(max); - down_write(¤t->mm->mmap_sem); - error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); - up_write(¤t->mm->mmap_sem); - - if (file) - fput(file); - out: - return error; + syscall_record[index].syscall = syscall; + syscall_record[index].pid = current_pid(); + syscall_record[index].result = 0xdeadbeef; + syscall_record[index].start = os_nsecs(); + return(index); } -long old_mmap(unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long offset) +void record_syscall_end(int index, long result) { - long err = -EINVAL; - if (offset & ~PAGE_MASK) - goto out; - - err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); - out: - return err; -} -/* - * sys_pipe() is the normal C calling standard for creating - * a pipe. It's not the way unix traditionally does this, though. - */ -long sys_pipe(unsigned long __user * fildes) -{ - int fd[2]; - long error; - - error = do_pipe(fd); - if (!error) { - if (copy_to_user(fildes, fd, sizeof(fd))) - error = -EFAULT; - } - return error; -} - - -long sys_uname(struct old_utsname __user * name) -{ - long err; - if (!name) - return -EFAULT; - down_read(&uts_sem); - err = copy_to_user(name, vx_new_utsname(), sizeof (*name)); - up_read(&uts_sem); - return err?-EFAULT:0; -} - -long sys_olduname(struct oldold_utsname __user * name) -{ - long error; - struct new_utsname *ptr; - - if (!name) - return -EFAULT; - if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) - return -EFAULT; - - down_read(&uts_sem); - - ptr = vx_new_utsname(); - error = __copy_to_user(&name->sysname,ptr->sysname, - __OLD_UTS_LEN); - error |= __put_user(0,name->sysname+__OLD_UTS_LEN); - error |= __copy_to_user(&name->nodename,ptr->nodename, - __OLD_UTS_LEN); - error |= __put_user(0,name->nodename+__OLD_UTS_LEN); - error |= __copy_to_user(&name->release,ptr->release, - __OLD_UTS_LEN); - error |= __put_user(0,name->release+__OLD_UTS_LEN); - error |= __copy_to_user(&name->version,ptr->version, - __OLD_UTS_LEN); - error |= __put_user(0,name->version+__OLD_UTS_LEN); - error |= __copy_to_user(&name->machine,ptr->machine, - __OLD_UTS_LEN); - error |= __put_user(0,name->machine+__OLD_UTS_LEN); - - up_read(&uts_sem); - - error = error ? -EFAULT : 0; - - return error; -} - -DEFINE_SPINLOCK(syscall_lock); - -static int syscall_index = 0; - -int next_syscall_index(int limit) -{ - int ret; - - spin_lock(&syscall_lock); - ret = syscall_index; - if(++syscall_index == limit) - syscall_index = 0; - spin_unlock(&syscall_lock); - return(ret); + syscall_record[index].result = result; + syscall_record[index].end = os_nsecs(); } diff --git a/arch/um/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c new file mode 100644 index 000000000..066e7a62e --- /dev/null +++ b/arch/um/kernel/syscall_kern.c @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) + * Licensed under the GPL + */ + +#include "linux/sched.h" +#include "linux/file.h" +#include "linux/smp_lock.h" +#include "linux/mm.h" +#include "linux/utsname.h" +#include "linux/msg.h" +#include "linux/shm.h" +#include "linux/sys.h" +#include "linux/syscalls.h" +#include "linux/unistd.h" +#include "linux/slab.h" +#include "linux/utime.h" +#include + +#include "asm/mman.h" +#include "asm/uaccess.h" +#include "kern_util.h" +#include "user_util.h" +#include "sysdep/syscalls.h" +#include "mode_kern.h" +#include "choose-mode.h" + +/* Unlocked, I don't care if this is a bit off */ +int nsyscalls = 0; + +long sys_fork(void) +{ + long ret; + + current->thread.forking = 1; + ret = do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), + ¤t->thread.regs, 0, NULL, NULL); + current->thread.forking = 0; + return(ret); +} + +long sys_vfork(void) +{ + long ret; + + current->thread.forking = 1; + ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, + UPT_SP(¤t->thread.regs.regs), + ¤t->thread.regs, 0, NULL, NULL); + current->thread.forking = 0; + return(ret); +} + +/* common code for old and new mmaps */ +long sys_mmap2(unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff) +{ + long error = -EBADF; + struct file * file = NULL; + + flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); + if (!(flags & MAP_ANONYMOUS)) { + file = fget(fd); + if (!file) + goto out; + } + + down_write(¤t->mm->mmap_sem); + error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); + up_write(¤t->mm->mmap_sem); + + if (file) + fput(file); + out: + return error; +} + +long old_mmap(unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long offset) +{ + long err = -EINVAL; + if (offset & ~PAGE_MASK) + goto out; + + err = sys_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); + out: + return err; +} +/* + * sys_pipe() is the normal C calling standard for creating + * a pipe. It's not the way unix traditionally does this, though. + */ +long sys_pipe(unsigned long __user * fildes) +{ + int fd[2]; + long error; + + error = do_pipe(fd); + if (!error) { + if (copy_to_user(fildes, fd, sizeof(fd))) + error = -EFAULT; + } + return error; +} + + +long sys_uname(struct old_utsname __user * name) +{ + long err; + if (!name) + return -EFAULT; + down_read(&uts_sem); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); + up_read(&uts_sem); + return err?-EFAULT:0; +} + +long sys_olduname(struct oldold_utsname __user * name) +{ + long error; + struct new_utsname *ptr; + + if (!name) + return -EFAULT; + if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) + return -EFAULT; + + down_read(&uts_sem); + + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname,ptr->sysname, + __OLD_UTS_LEN); + error |= __put_user(0,name->sysname+__OLD_UTS_LEN); + error |= __copy_to_user(&name->nodename,ptr->nodename, + __OLD_UTS_LEN); + error |= __put_user(0,name->nodename+__OLD_UTS_LEN); + error |= __copy_to_user(&name->release,ptr->release, + __OLD_UTS_LEN); + error |= __put_user(0,name->release+__OLD_UTS_LEN); + error |= __copy_to_user(&name->version,ptr->version, + __OLD_UTS_LEN); + error |= __put_user(0,name->version+__OLD_UTS_LEN); + error |= __copy_to_user(&name->machine,ptr->machine, + __OLD_UTS_LEN); + error |= __put_user(0,name->machine+__OLD_UTS_LEN); + + up_read(&uts_sem); + + error = error ? -EFAULT : 0; + + return error; +} + +DEFINE_SPINLOCK(syscall_lock); + +static int syscall_index = 0; + +int next_syscall_index(int limit) +{ + int ret; + + spin_lock(&syscall_lock); + ret = syscall_index; + if(++syscall_index == limit) + syscall_index = 0; + spin_unlock(&syscall_lock); + return(ret); +} diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 239c98054..b331e9700 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/sched.h" #include "linux/kernel.h" #include "linux/module.h" diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 552ca1cb9..8fa2ae7f3 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -1,182 +1,172 @@ -/* - * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) +/* + * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ -#include "linux/kernel.h" -#include "linux/module.h" -#include "linux/unistd.h" -#include "linux/stddef.h" -#include "linux/spinlock.h" -#include "linux/time.h" -#include "linux/sched.h" -#include "linux/interrupt.h" -#include "linux/init.h" -#include "linux/delay.h" -#include "linux/hrtimer.h" -#include "asm/irq.h" -#include "asm/param.h" -#include "asm/current.h" -#include "kern_util.h" +#include +#include +#include +#include +#include +#include +#include #include "user_util.h" -#include "mode.h" +#include "kern_util.h" +#include "user.h" +#include "process.h" +#include "time_user.h" +#include "kern_constants.h" #include "os.h" -int hz(void) -{ - return(HZ); -} - -/* - * Scheduler clock - returns current time in nanosec units. +/* XXX This really needs to be declared and initialized in a kernel file since + * it's in */ -unsigned long long sched_clock(void) -{ - return (unsigned long long)jiffies_64 * (1000000000 / HZ); -} +extern struct timespec wall_to_monotonic; -/* Changed at early boot */ -int timer_irq_inited = 0; +extern struct timeval xtime; -static unsigned long long prev_nsecs; -#ifdef CONFIG_UML_REAL_TIME_CLOCK -static long long delta; /* Deviation per interval */ -#endif +struct timeval local_offset = { 0, 0 }; -void timer_irq(union uml_pt_regs *regs) +void timer(void) { - unsigned long long ticks = 0; - -#ifdef CONFIG_UML_REAL_TIME_CLOCK - if(prev_nsecs){ - /* We've had 1 tick */ - unsigned long long nsecs = os_nsecs(); - - delta += nsecs - prev_nsecs; - prev_nsecs = nsecs; - - /* Protect against the host clock being set backwards */ - if(delta < 0) - delta = 0; - - ticks += (delta * HZ) / BILLION; - delta -= (ticks * BILLION) / HZ; - } - else prev_nsecs = os_nsecs(); -#else - ticks = 1; -#endif - while(ticks > 0){ - do_IRQ(TIMER_IRQ, regs); - ticks--; - } + gettimeofday(&xtime, NULL); + timeradd(&xtime, &local_offset, &xtime); } -static DEFINE_SPINLOCK(timer_spinlock); - -static unsigned long long local_offset = 0; - -static inline unsigned long long get_time(void) +static void set_interval(int timer_type) { - unsigned long long nsecs; - unsigned long flags; + int usec = 1000000/hz(); + struct itimerval interval = ((struct itimerval) { { 0, usec }, + { 0, usec } }); - spin_lock_irqsave(&timer_spinlock, flags); - nsecs = os_nsecs(); - nsecs += local_offset; - spin_unlock_irqrestore(&timer_spinlock, flags); - - return nsecs; + if(setitimer(timer_type, &interval, NULL) == -1) + panic("setitimer failed - errno = %d\n", errno); } -irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) +void enable_timer(void) { - unsigned long long nsecs; - unsigned long flags; - - write_seqlock_irqsave(&xtime_lock, flags); - - do_timer(regs); - - nsecs = get_time() + local_offset; - xtime.tv_sec = nsecs / NSEC_PER_SEC; - xtime.tv_nsec = nsecs - xtime.tv_sec * NSEC_PER_SEC; - - write_sequnlock_irqrestore(&xtime_lock, flags); + set_interval(ITIMER_VIRTUAL); +} - return IRQ_HANDLED; +void prepare_timer(void * ptr) +{ + int usec = 1000000/hz(); + *(struct itimerval *)ptr = ((struct itimerval) { { 0, usec }, + { 0, usec }}); } -static void register_timer(void) +void disable_timer(void) { - int err; + struct itimerval disable = ((struct itimerval) { { 0, 0 }, { 0, 0 }}); + if((setitimer(ITIMER_VIRTUAL, &disable, NULL) < 0) || + (setitimer(ITIMER_REAL, &disable, NULL) < 0)) + printk("disnable_timer - setitimer failed, errno = %d\n", + errno); + /* If there are signals already queued, after unblocking ignore them */ + set_handler(SIGALRM, SIG_IGN, 0, -1); + set_handler(SIGVTALRM, SIG_IGN, 0, -1); +} - err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL); - if(err != 0) - printk(KERN_ERR "timer_init : request_irq failed - " - "errno = %d\n", -err); +void switch_timers(int to_real) +{ + struct itimerval disable = ((struct itimerval) { { 0, 0 }, { 0, 0 }}); + struct itimerval enable = ((struct itimerval) { { 0, 1000000/hz() }, + { 0, 1000000/hz() }}); + int old, new; + + if(to_real){ + old = ITIMER_VIRTUAL; + new = ITIMER_REAL; + } + else { + old = ITIMER_REAL; + new = ITIMER_VIRTUAL; + } - timer_irq_inited = 1; + if((setitimer(old, &disable, NULL) < 0) || + (setitimer(new, &enable, NULL))) + printk("switch_timers - setitimer failed, errno = %d\n", + errno); +} - user_time_init(); +void uml_idle_timer(void) +{ + if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) + panic("Couldn't unset SIGVTALRM handler"); + + set_handler(SIGALRM, (__sighandler_t) alarm_handler, + SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1); + set_interval(ITIMER_REAL); } -extern void (*late_time_init)(void); +extern void ktime_get_ts(struct timespec *ts); +#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) void time_init(void) { - long long nsecs; + struct timespec now; + + if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) + panic("Couldn't set SIGVTALRM handler"); + set_interval(ITIMER_VIRTUAL); - nsecs = os_nsecs(); - set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, - -nsecs % BILLION); - late_time_init = register_timer; + do_posix_clock_monotonic_gettime(&now); + wall_to_monotonic.tv_sec = -now.tv_sec; + wall_to_monotonic.tv_nsec = -now.tv_nsec; } +/* Defined in linux/ktimer.h, which can't be included here */ +#define clock_was_set() do { } while (0) + void do_gettimeofday(struct timeval *tv) { - unsigned long long nsecs = get_time(); - - tv->tv_sec = nsecs / NSEC_PER_SEC; - /* Careful about calculations here - this was originally done as - * (nsecs - tv->tv_sec * NSEC_PER_SEC) / NSEC_PER_USEC - * which gave bogus (> 1000000) values. Dunno why, suspect gcc - * (4.0.0) miscompiled it, or there's a subtle 64/32-bit conversion - * problem that I missed. - */ - nsecs -= tv->tv_sec * NSEC_PER_SEC; - tv->tv_usec = (unsigned long) nsecs / NSEC_PER_USEC; + unsigned long flags; + + flags = time_lock(); + gettimeofday(tv, NULL); + timeradd(tv, &local_offset, tv); + time_unlock(flags); + clock_was_set(); } -static inline void set_time(unsigned long long nsecs) +int do_settimeofday(struct timespec *tv) { - unsigned long long now; + struct timeval now; unsigned long flags; + struct timeval tv_in; - spin_lock_irqsave(&timer_spinlock, flags); - now = os_nsecs(); - local_offset = nsecs - now; - spin_unlock_irqrestore(&timer_spinlock, flags); + if ((unsigned long) tv->tv_nsec >= UM_NSEC_PER_SEC) + return -EINVAL; - clock_was_set(); + tv_in.tv_sec = tv->tv_sec; + tv_in.tv_usec = tv->tv_nsec / 1000; + + flags = time_lock(); + gettimeofday(&now, NULL); + timersub(&tv_in, &now, &local_offset); + time_unlock(flags); + + return(0); } -int do_settimeofday(struct timespec *tv) +void idle_sleep(int secs) { - set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec); + struct timespec ts; - return 0; + ts.tv_sec = secs; + ts.tv_nsec = 0; + nanosleep(&ts, NULL); } -void timer_handler(int sig, union uml_pt_regs *regs) +/* XXX This partly duplicates init_irq_signals */ + +void user_time_init(void) { - local_irq_disable(); - irq_enter(); - update_process_times(CHOOSE_MODE( - (UPT_SC(regs) && user_context(UPT_SP(regs))), - (regs)->skas.is_user)); - irq_exit(); - local_irq_enable(); - if(current_thread->cpu == 0) - timer_irq(regs); + set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, + SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, + SIGALRM, SIGUSR2, -1); + set_handler(SIGALRM, (__sighandler_t) alarm_handler, + SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, + SIGVTALRM, SIGUSR2, -1); + set_interval(ITIMER_VIRTUAL); } diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c new file mode 100644 index 000000000..87cdbc560 --- /dev/null +++ b/arch/um/kernel/time_kern.c @@ -0,0 +1,222 @@ +/* + * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) + * Licensed under the GPL + */ + +#include "linux/kernel.h" +#include "linux/module.h" +#include "linux/unistd.h" +#include "linux/stddef.h" +#include "linux/spinlock.h" +#include "linux/time.h" +#include "linux/sched.h" +#include "linux/interrupt.h" +#include "linux/init.h" +#include "linux/delay.h" +#include "linux/hrtimer.h" +#include "asm/irq.h" +#include "asm/param.h" +#include "asm/current.h" +#include "kern_util.h" +#include "user_util.h" +#include "mode.h" +#include "os.h" + +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; + +static int first_tick; +static unsigned long long prev_nsecs; +#ifdef CONFIG_UML_REAL_TIME_CLOCK +static long long delta; /* Deviation per interval */ +#endif + +void timer_irq(union uml_pt_regs *regs) +{ + unsigned long long ticks = 0; + + if(!timer_irq_inited){ + /* This is to ensure that ticks don't pile up when + * the timer handler is suspended */ + first_tick = 0; + return; + } + + if(first_tick){ +#ifdef CONFIG_UML_REAL_TIME_CLOCK + /* We've had 1 tick */ + unsigned long long nsecs = os_nsecs(); + + delta += nsecs - prev_nsecs; + prev_nsecs = nsecs; + + /* Protect against the host clock being set backwards */ + if(delta < 0) + delta = 0; + + ticks += (delta * HZ) / BILLION; + delta -= (ticks * BILLION) / HZ; +#else + ticks = 1; +#endif + } + else { + prev_nsecs = os_nsecs(); + first_tick = 1; + } + + while(ticks > 0){ + do_IRQ(TIMER_IRQ, regs); + ticks--; + } +} + + +void time_init_kern(void) +{ + long long nsecs; + + nsecs = os_nsecs(); + set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, + -nsecs % BILLION); +} + +void do_boot_timer_handler(struct sigcontext * sc) +{ + struct pt_regs regs; + + CHOOSE_MODE((void) (UPT_SC(®s.regs) = sc), + (void) (regs.regs.skas.is_user = 0)); + do_timer(®s); +} + +static DEFINE_SPINLOCK(timer_spinlock); + +static unsigned long long local_offset = 0; + +static inline unsigned long long get_time(void) +{ + unsigned long long nsecs; + unsigned long flags; + + spin_lock_irqsave(&timer_spinlock, flags); + nsecs = os_nsecs(); + nsecs += local_offset; + spin_unlock_irqrestore(&timer_spinlock, flags); + + return nsecs; +} + +irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) +{ + unsigned long long nsecs; + unsigned long flags; + + do_timer(regs); + + write_seqlock_irqsave(&xtime_lock, flags); + nsecs = get_time() + local_offset; + xtime.tv_sec = nsecs / NSEC_PER_SEC; + xtime.tv_nsec = nsecs - xtime.tv_sec * NSEC_PER_SEC; + write_sequnlock_irqrestore(&xtime_lock, flags); + + return(IRQ_HANDLED); +} + +long um_time(int __user *tloc) +{ + long ret = get_time() / NSEC_PER_SEC; + + if((tloc != NULL) && put_user(ret, tloc)) + return -EFAULT; + + return ret; +} + +void do_gettimeofday(struct timeval *tv) +{ + unsigned long long nsecs = get_time(); + + tv->tv_sec = nsecs / NSEC_PER_SEC; + /* Careful about calculations here - this was originally done as + * (nsecs - tv->tv_sec * NSEC_PER_SEC) / NSEC_PER_USEC + * which gave bogus (> 1000000) values. Dunno why, suspect gcc + * (4.0.0) miscompiled it, or there's a subtle 64/32-bit conversion + * problem that I missed. + */ + nsecs -= tv->tv_sec * NSEC_PER_SEC; + tv->tv_usec = (unsigned long) nsecs / NSEC_PER_USEC; +} + +static inline void set_time(unsigned long long nsecs) +{ + unsigned long long now; + unsigned long flags; + + spin_lock_irqsave(&timer_spinlock, flags); + now = os_nsecs(); + local_offset = nsecs - now; + spin_unlock_irqrestore(&timer_spinlock, flags); + + clock_was_set(); +} + +long um_stime(int __user *tptr) +{ + int value; + + if (get_user(value, tptr)) + return -EFAULT; + + set_time((unsigned long long) value * NSEC_PER_SEC); + + return 0; +} + +int do_settimeofday(struct timespec *tv) +{ + set_time((unsigned long long) tv->tv_sec * NSEC_PER_SEC + tv->tv_nsec); + + return 0; +} + +void timer_handler(int sig, union uml_pt_regs *regs) +{ + local_irq_disable(); + irq_enter(); + update_process_times(CHOOSE_MODE( + (UPT_SC(regs) && user_context(UPT_SP(regs))), + (regs)->skas.is_user)); + irq_exit(); + local_irq_enable(); + if(current_thread->cpu == 0) + timer_irq(regs); +} + +int __init timer_init(void) +{ + int err; + + user_time_init(); + err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); + if(err != 0) + printk(KERN_ERR "timer_init : request_irq failed - " + "errno = %d\n", -err); + timer_irq_inited = 1; + return(0); +} + +arch_initcall(timer_init); diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap_kern.c similarity index 94% rename from arch/um/kernel/trap.c rename to arch/um/kernel/trap_kern.c index 8c90a63d9..02f6d4d8d 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap_kern.c @@ -8,6 +8,7 @@ #include "linux/sched.h" #include "linux/mm.h" #include "linux/spinlock.h" +#include "linux/config.h" #include "linux/init.h" #include "linux/ptrace.h" #include "asm/semaphore.h" @@ -34,7 +35,7 @@ #include "os.h" /* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by segv(). */ -int handle_page_fault(unsigned long address, unsigned long ip, +int handle_page_fault(unsigned long address, unsigned long ip, int is_write, int is_user, int *code_out) { struct mm_struct *mm = current->mm; @@ -54,20 +55,20 @@ int handle_page_fault(unsigned long address, unsigned long ip, down_read(&mm->mmap_sem); vma = find_vma(mm, address); - if(!vma) + if(!vma) goto out; - else if(vma->vm_start <= address) + else if(vma->vm_start <= address) goto good_area; - else if(!(vma->vm_flags & VM_GROWSDOWN)) + else if(!(vma->vm_flags & VM_GROWSDOWN)) goto out; else if(is_user && !ARCH_IS_STACKGROW(address)) goto out; - else if(expand_stack(vma, address)) + else if(expand_stack(vma, address)) goto out; good_area: *code_out = SEGV_ACCERR; - if(is_write && !(vma->vm_flags & VM_WRITE)) + if(is_write && !(vma->vm_flags & VM_WRITE)) goto out; /* Don't require VM_READ|VM_EXEC for write faults! */ @@ -183,14 +184,14 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc) else if(catcher != NULL){ current->thread.fault_addr = (void *) address; do_longjmp(catcher, 1); - } + } else if(current->thread.fault_addr != NULL) panic("fault_addr set but no fault catcher"); else if(!is_user && arch_fixup(ip, sc)) return(0); - if(!is_user) - panic("Kernel mode fault at addr 0x%lx, ip 0x%lx", + if(!is_user) + panic("Kernel mode fault at addr 0x%lx, ip 0x%lx", address, ip); if (err == -EACCES) { diff --git a/arch/um/kernel/tt/exec_kern.c b/arch/um/kernel/tt/exec_kern.c index ad66df17d..5c1e4cc1c 100644 --- a/arch/um/kernel/tt/exec_kern.c +++ b/arch/um/kernel/tt/exec_kern.c @@ -21,7 +21,7 @@ static int exec_tramp(void *sig_stack) { init_new_thread_stack(sig_stack, NULL); - init_new_thread_signals(); + init_new_thread_signals(1); os_stop_process(os_getpid()); return(0); } diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c index 68e1bf63c..26506388a 100644 --- a/arch/um/kernel/tt/gdb_kern.c +++ b/arch/um/kernel/tt/gdb_kern.c @@ -4,6 +4,7 @@ */ #include "linux/init.h" +#include "linux/config.h" #include "mconsole_kern.h" #ifdef CONFIG_MCONSOLE diff --git a/arch/um/kernel/tt/mem.c b/arch/um/kernel/tt/mem.c index 4d1929dfa..bcb8796c3 100644 --- a/arch/um/kernel/tt/mem.c +++ b/arch/um/kernel/tt/mem.c @@ -4,6 +4,7 @@ */ #include "linux/stddef.h" +#include "linux/config.h" #include "linux/mm.h" #include "asm/uaccess.h" #include "mem_user.h" @@ -23,13 +24,22 @@ void before_mem_tt(unsigned long brk_start) #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000) #define START (CONFIG_TOP_ADDR - SIZE) -unsigned long set_task_sizes_tt(unsigned long *task_size_out) +unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, + unsigned long *task_size_out) { - unsigned long host_task_size; - /* Round up to the nearest 4M */ - host_task_size = ROUND_4M((unsigned long) &host_task_size); + *host_size_out = ROUND_4M((unsigned long) &arg); *task_size_out = START; - - return host_task_size; + return(START); } + +/* + * 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/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index 1e86f0bfe..a9c1443fc 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c @@ -119,7 +119,7 @@ void suspend_new_thread(int fd) panic("read failed in suspend_new_thread, err = %d", -err); } -void schedule_tail(struct task_struct *prev); +void schedule_tail(task_t *prev); static void new_thread_handler(int sig) { @@ -142,7 +142,7 @@ static void new_thread_handler(int sig) schedule_tail(current->thread.prev_sched); current->thread.prev_sched = NULL; - init_new_thread_signals(); + init_new_thread_signals(1); enable_timer(); free_page(current->thread.temp_stack); set_cmdline("(kernel thread)"); diff --git a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c index 293caa6d0..3fda9a03c 100644 --- a/arch/um/kernel/tt/syscall_kern.c +++ b/arch/um/kernel/tt/syscall_kern.c @@ -21,11 +21,18 @@ void syscall_handler_tt(int sig, struct pt_regs *regs) void *sc; long result; int syscall; - +#ifdef CONFIG_SYSCALL_DEBUG + int index; +#endif sc = UPT_SC(®s->regs); SC_START_SYSCALL(sc); syscall = UPT_SYSCALL_NR(®s->regs); + +#ifdef CONFIG_SYSCALL_DEBUG + index = record_syscall_start(syscall); +#endif + syscall_trace(®s->regs, 0); current->thread.nsyscalls++; @@ -43,4 +50,7 @@ void syscall_handler_tt(int sig, struct pt_regs *regs) SC_SET_SYSCALL_RETURN(sc, result); syscall_trace(®s->regs, 1); +#ifdef CONFIG_SYSCALL_DEBUG + record_syscall_end(index, result); +#endif } diff --git a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c index 988234220..71daae24e 100644 --- a/arch/um/kernel/tt/tracer.c +++ b/arch/um/kernel/tt/tracer.c @@ -188,7 +188,10 @@ int tracer(int (*init_proc)(void *), void *sp) int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0; int proc_id = 0, n, err, old_tracing = 0, strace = 0; int local_using_sysemu = 0; - +#ifdef UML_CONFIG_SYSCALL_DEBUG + unsigned long eip = 0; + int last_index; +#endif signal(SIGPIPE, SIG_IGN); setup_tracer_winch(); tracing_pid = os_getpid(); @@ -279,6 +282,23 @@ int tracer(int (*init_proc)(void *), void *sp) else if(WIFSTOPPED(status)){ proc_id = pid_to_processor_id(pid); sig = WSTOPSIG(status); +#ifdef UML_CONFIG_SYSCALL_DEBUG + if(signal_index[proc_id] == 1024){ + signal_index[proc_id] = 0; + last_index = 1023; + } + else last_index = signal_index[proc_id] - 1; + if(((sig == SIGPROF) || (sig == SIGVTALRM) || + (sig == SIGALRM)) && + (signal_record[proc_id][last_index].signal == sig)&& + (signal_record[proc_id][last_index].pid == pid)) + signal_index[proc_id] = last_index; + signal_record[proc_id][signal_index[proc_id]].pid = pid; + gettimeofday(&signal_record[proc_id][signal_index[proc_id]].time, NULL); + eip = ptrace(PTRACE_PEEKUSR, pid, PT_IP_OFFSET, 0); + signal_record[proc_id][signal_index[proc_id]].addr = eip; + signal_record[proc_id][signal_index[proc_id]++].signal = sig; +#endif if(proc_id == -1){ sleeping_process_signal(pid, sig); continue; diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index b9a8f4246..7d51dd720 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/sched.h" #include "linux/notifier.h" @@ -329,8 +330,6 @@ EXPORT_SYMBOL(end_iomem); #define MIN_VMALLOC (32 * 1024 * 1024) -extern char __binary_start; - int linux_main(int argc, char **argv) { unsigned long avail, diff; @@ -375,9 +374,8 @@ int linux_main(int argc, char **argv) printf("UML running in %s mode\n", mode); - uml_start = (unsigned long) &__binary_start; - host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt, - set_task_sizes_skas, &task_size); + uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, + &host_task_size, &task_size); /* * Setting up handlers to 'sig_info' struct @@ -397,7 +395,7 @@ int linux_main(int argc, char **argv) physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end); } - uml_physmem = uml_start & PAGE_MASK; + uml_physmem = uml_start; /* Reserve up to 4M after the current brk */ uml_reserved = ROUND_4M(brk_start) + (1 << 22); @@ -497,7 +495,6 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) { } -#ifdef CONFIG_SMP void alternatives_smp_module_add(struct module *mod, char *name, void *locks, void *locks_end, void *text, void *text_end) @@ -507,4 +504,3 @@ void alternatives_smp_module_add(struct module *mod, char *name, void alternatives_smp_module_del(struct module *mod) { } -#endif diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index 8eca47a6f..af11915ce 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S @@ -7,17 +7,14 @@ jiffies = jiffies_64; SECTIONS { - /* This must contain the right address - not quite the default ELF one.*/ + /*This must contain the right address - not quite the default ELF one.*/ PROVIDE (__executable_start = START); - /* Static binaries stick stuff here, like the sigreturn trampoline, - * invisibly to objdump. So, just make __binary_start equal to the very - * beginning of the executable, and if there are unmapped pages after this, - * they are forever unusable. - */ - __binary_start = START; - . = START + SIZEOF_HEADERS; + /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start + * is remapped.*/ + __binary_start = .; + #ifdef MODE_TT .remap_data : { UNMAP_PATH (.data .bss) } .remap : { UNMAP_PATH (.text) } diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S index f8aeb448a..1660a7696 100644 --- a/arch/um/kernel/vmlinux.lds.S +++ b/arch/um/kernel/vmlinux.lds.S @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_LD_SCRIPT_STATIC #include "uml.lds.S" #else diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index 189fa6770..09251338d 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ @@ -18,7 +18,6 @@ #include "os.h" #include "user.h" #include "kern_util.h" -#include "user_util.h" static void copy_stat(struct uml_stat *dst, struct stat64 *src) { @@ -43,13 +42,16 @@ int os_stat_fd(const int fd, struct uml_stat *ubuf) struct stat64 sbuf; int err; - CATCH_EINTR(err = fstat64(fd, &sbuf)); + do { + err = fstat64(fd, &sbuf); + } while((err < 0) && (errno == EINTR)) ; + if(err < 0) - return -errno; + return(-errno); if(ubuf != NULL) copy_stat(ubuf, &sbuf); - return err; + return(err); } int os_stat_file(const char *file_name, struct uml_stat *ubuf) @@ -62,11 +64,11 @@ int os_stat_file(const char *file_name, struct uml_stat *ubuf) } while((err < 0) && (errno == EINTR)) ; if(err < 0) - return -errno; + return(-errno); if(ubuf != NULL) copy_stat(ubuf, &sbuf); - return err; + return(err); } int os_access(const char* file, int mode) @@ -78,9 +80,9 @@ int os_access(const char* file, int mode) err = access(file, amode); if(err < 0) - return -errno; + return(-errno); - return 0; + return(0); } void os_print_error(int error, const char* str) @@ -97,9 +99,9 @@ int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) err = ioctl(fd, cmd, arg); if(err < 0) - return -errno; + return(-errno); - return err; + return(err); } int os_window_size(int fd, int *rows, int *cols) @@ -107,12 +109,12 @@ int os_window_size(int fd, int *rows, int *cols) struct winsize size; if(ioctl(fd, TIOCGWINSZ, &size) < 0) - return -errno; + return(-errno); *rows = size.ws_row; *cols = size.ws_col; - return 0; + return(0); } int os_new_tty_pgrp(int fd, int pid) @@ -123,16 +125,16 @@ int os_new_tty_pgrp(int fd, int pid) if(tcsetpgrp(fd, pid) < 0) return -errno; - return 0; + return(0); } /* FIXME: ensure namebuf in os_get_if_name is big enough */ int os_get_ifname(int fd, char* namebuf) { if(ioctl(fd, SIOCGIFNAME, namebuf) < 0) - return -errno; + return(-errno); - return 0; + return(0); } int os_set_slip(int fd) @@ -147,7 +149,7 @@ int os_set_slip(int fd) if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0) return -errno; - return 0; + return(0); } int os_set_owner(int fd, int pid) @@ -156,10 +158,10 @@ int os_set_owner(int fd, int pid) int save_errno = errno; if(fcntl(fd, F_GETOWN, 0) != pid) - return -save_errno; + return(-save_errno); } - return 0; + return(0); } /* FIXME? moved wholesale from sigio_user.c to get fcntls out of that file */ @@ -190,9 +192,9 @@ int os_mode_fd(int fd, int mode) } while((err < 0) && (errno==EINTR)) ; if(err < 0) - return -errno; + return(-errno); - return 0; + return(0); } int os_file_type(char *file) @@ -202,21 +204,15 @@ int os_file_type(char *file) err = os_stat_file(file, &buf); if(err < 0) - return err; + return(err); - if(S_ISDIR(buf.ust_mode)) - return OS_TYPE_DIR; - else if(S_ISLNK(buf.ust_mode)) - return OS_TYPE_SYMLINK; - else if(S_ISCHR(buf.ust_mode)) - return OS_TYPE_CHARDEV; - else if(S_ISBLK(buf.ust_mode)) - return OS_TYPE_BLOCKDEV; - else if(S_ISFIFO(buf.ust_mode)) - return OS_TYPE_FIFO; - else if(S_ISSOCK(buf.ust_mode)) - return OS_TYPE_SOCK; - else return OS_TYPE_FILE; + if(S_ISDIR(buf.ust_mode)) return(OS_TYPE_DIR); + else if(S_ISLNK(buf.ust_mode)) return(OS_TYPE_SYMLINK); + else if(S_ISCHR(buf.ust_mode)) return(OS_TYPE_CHARDEV); + else if(S_ISBLK(buf.ust_mode)) return(OS_TYPE_BLOCKDEV); + else if(S_ISFIFO(buf.ust_mode)) return(OS_TYPE_FIFO); + else if(S_ISSOCK(buf.ust_mode)) return(OS_TYPE_SOCK); + else return(OS_TYPE_FILE); } int os_file_mode(char *file, struct openflags *mode_out) @@ -306,8 +302,8 @@ int os_seek_file(int fd, __u64 offset) actual = lseek64(fd, offset, SEEK_SET); if(actual != offset) - return -errno; - return 0; + return(-errno); + return(0); } static int fault_buffer(void *start, int len, @@ -318,13 +314,13 @@ static int fault_buffer(void *start, int len, for(i = 0; i < len; i += page){ if((*copy_proc)(start + i, &c, sizeof(c))) - return -EFAULT; + return(-EFAULT); } if((len % page) != 0){ if((*copy_proc)(start + len - 1, &c, sizeof(c))) - return -EFAULT; + return(-EFAULT); } - return 0; + return(0); } static int file_io(int fd, void *buf, int len, @@ -338,26 +334,26 @@ static int file_io(int fd, void *buf, int len, if((n < 0) && (errno == EFAULT)){ err = fault_buffer(buf, len, copy_user_proc); if(err) - return err; + return(err); n = (*io_proc)(fd, buf, len); } } while((n < 0) && (errno == EINTR)); if(n < 0) - return -errno; - return n; + return(-errno); + return(n); } int os_read_file(int fd, void *buf, int len) { - return file_io(fd, buf, len, (int (*)(int, void *, int)) read, - copy_from_user_proc); + return(file_io(fd, buf, len, (int (*)(int, void *, int)) read, + copy_from_user_proc)); } int os_write_file(int fd, const void *buf, int len) { - return file_io(fd, (void *) buf, len, - (int (*)(int, void *, int)) write, copy_to_user_proc); + return(file_io(fd, (void *) buf, len, + (int (*)(int, void *, int)) write, copy_to_user_proc)); } int os_file_size(char *file, unsigned long long *size_out) @@ -402,11 +398,11 @@ int os_file_modtime(char *file, unsigned long *modtime) err = os_stat_file(file, &buf); if(err < 0){ printk("Couldn't stat \"%s\" : err = %d\n", file, -err); - return err; + return(err); } *modtime = buf.ust_mtime; - return 0; + return(0); } int os_get_exec_close(int fd, int* close_on_exec) @@ -459,7 +455,7 @@ int os_pipe(int *fds, int stream, int close_on_exec) if(err < 0) goto error; - return 0; + return(0); error: printk("os_pipe : Setting FD_CLOEXEC failed, err = %d\n", -err); @@ -490,12 +486,12 @@ int os_set_fd_async(int fd, int owner) (fcntl(fd, F_SETOWN, owner) < 0)){ err = -errno; printk("os_set_fd_async : Failed to fcntl F_SETOWN " - "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, + "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, owner, errno); return err; } - return 0; + return(0); } int os_clear_fd_async(int fd) @@ -504,8 +500,8 @@ int os_clear_fd_async(int fd) flags &= ~(O_ASYNC | O_NONBLOCK); if(fcntl(fd, F_SETFL, flags) < 0) - return -errno; - return 0; + return(-errno); + return(0); } int os_set_fd_block(int fd, int blocking) @@ -520,7 +516,7 @@ int os_set_fd_block(int fd, int blocking) if(fcntl(fd, F_SETFL, flags) < 0) return -errno; - return 0; + return(0); } int os_accept_connection(int fd) @@ -528,9 +524,9 @@ int os_accept_connection(int fd) int new; new = accept(fd, NULL, 0); - if(new < 0) - return -errno; - return new; + if(new < 0) + return(-errno); + return(new); } #ifndef SHUT_RD @@ -554,12 +550,12 @@ int os_shutdown_socket(int fd, int r, int w) else if(w) what = SHUT_WR; else { printk("os_shutdown_socket : neither r or w was set\n"); - return -EINVAL; + return(-EINVAL); } err = shutdown(fd, what); if(err < 0) - return -errno; - return 0; + return(-errno); + return(0); } int os_rcv_fd(int fd, int *helper_pid_out) @@ -582,7 +578,7 @@ int os_rcv_fd(int fd, int *helper_pid_out) n = recvmsg(fd, &msg, 0); if(n < 0) - return -errno; + return(-errno); else if(n != sizeof(iov.iov_len)) *helper_pid_out = -1; @@ -590,16 +586,16 @@ int os_rcv_fd(int fd, int *helper_pid_out) cmsg = CMSG_FIRSTHDR(&msg); if(cmsg == NULL){ printk("rcv_fd didn't receive anything, error = %d\n", errno); - return -1; + return(-1); } - if((cmsg->cmsg_level != SOL_SOCKET) || + if((cmsg->cmsg_level != SOL_SOCKET) || (cmsg->cmsg_type != SCM_RIGHTS)){ printk("rcv_fd didn't receive a descriptor\n"); - return -1; + return(-1); } new = ((int *) CMSG_DATA(cmsg))[0]; - return new; + return(new); } int os_create_unix_socket(char *file, int len, int close_on_exec) @@ -627,7 +623,7 @@ int os_create_unix_socket(char *file, int len, int close_on_exec) if(err < 0) return -errno; - return sock; + return(sock); } void os_flush_stdout(void) @@ -658,5 +654,16 @@ int os_lock_file(int fd, int excl) printk("F_SETLK failed, file already locked by pid %d\n", lock.l_pid); err = save; out: - return err; + 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 + * 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/os-Linux/irq.c b/arch/um/os-Linux/irq.c index 7555bf9c3..3788d4568 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c @@ -52,6 +52,11 @@ int os_waiting_for_events(struct irq_fd *active_fds) return n; } +int os_isatty(int fd) +{ + return isatty(fd); +} + int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) { if (pollfds_num == pollfds_size) { @@ -137,14 +142,17 @@ void os_set_ioignore(void) void init_irq_signals(int on_sigstack) { + __sighandler_t h; int flags; flags = on_sigstack ? SA_ONSTACK : 0; + if (timer_irq_inited) + h = (__sighandler_t)alarm_handler; + else + h = boot_timer_handler; - set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, - flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); - set_handler(SIGALRM, (__sighandler_t) alarm_handler, - flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); + set_handler(SIGVTALRM, h, flags | SA_RESTART, + SIGUSR1, SIGIO, SIGWINCH, SIGALRM, -1); set_handler(SIGIO, (__sighandler_t) sig_handler, flags | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); signal(SIGWINCH, SIG_IGN); diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 560c8063c..c6432e729 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c @@ -55,7 +55,7 @@ static void __init find_tempdir(void) */ static int next(int fd, char *buf, int size, char c) { - int n, len; + int n; char *ptr; while((ptr = strchr(buf, c)) == NULL){ @@ -69,17 +69,7 @@ static int next(int fd, char *buf, int size, char c) } ptr++; - len = strlen(ptr); - memmove(buf, ptr, len + 1); - - /* Refill the buffer so that if there's a partial string that we care - * about, it will be completed, and we can recognize it. - */ - n = read(fd, &buf[len], size - len - 1); - if(n < 0) - return -errno; - - buf[len + n] = '\0'; + memmove(buf, ptr, strlen(ptr) + 1); return 1; } @@ -210,11 +200,8 @@ int create_tmp_file(unsigned long long len) exit(1); } - /* Seek to len - 1 because writing a character there will - * increase the file size by one byte, to the desired length. - */ - if (lseek64(fd, len - 1, SEEK_SET) < 0) { - perror("os_seek_file"); + if (lseek64(fd, len, SEEK_SET) < 0) { + perror("os_seek_file"); exit(1); } diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index c8bf77276..233be2f4f 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c @@ -141,9 +141,11 @@ void os_usr1_process(int pid) * syscalls, and also breaks with clone(), which does not unshare the TLS. */ +inline _syscall0(pid_t, getpid) + int os_getpid(void) { - return syscall(__NR_getpid); + return(getpid()); } int os_getpgrp(void) @@ -248,35 +250,36 @@ void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); } -void init_new_thread_signals(void) +void init_new_thread_signals(int altstack) { - set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK, + int flags = altstack ? SA_ONSTACK : 0; + + set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); - set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK, + set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); - set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK, + set_handler(SIGFPE, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); - set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK, + set_handler(SIGILL, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); - set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK, + set_handler(SIGBUS, (__sighandler_t) sig_handler, flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); set_handler(SIGUSR2, (__sighandler_t) sig_handler, - SA_ONSTACK, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, - -1); + flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); signal(SIGHUP, SIG_IGN); - init_irq_signals(1); + init_irq_signals(altstack); } int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) { jmp_buf buf; - int n; + int n, enable; *jmp_ptr = &buf; - n = UML_SETJMP(&buf); + n = UML_SETJMP(&buf, enable); if(n != 0) - return n; + return(n); (*fn)(arg); - return 0; + return(0); } diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c index 0ecac563c..00e9388e9 100644 --- a/arch/um/os-Linux/sigio.c +++ b/arch/um/os-Linux/sigio.c @@ -43,13 +43,13 @@ struct pollfds { /* Protected by sigio_lock(). Used by the sigio thread, but the UML thread * synchronizes with it. */ -static struct pollfds current_poll = { +struct pollfds current_poll = { .poll = NULL, .size = 0, .used = 0 }; -static struct pollfds next_poll = { +struct pollfds next_poll = { .poll = NULL, .size = 0, .used = 0 @@ -156,7 +156,7 @@ static void update_thread(void) set_signals(flags); } -static int add_sigio_fd(int fd, int read) +int add_sigio_fd(int fd, int read) { int err = 0, i, n, events; @@ -191,13 +191,6 @@ int ignore_sigio_fd(int fd) struct pollfd *p; int err = 0, i, n = 0; - /* This is called from exitcalls elsewhere in UML - if - * sigio_cleanup has already run, then update_thread will hang - * or fail because the thread is no longer running. - */ - if(write_sigio_pid == -1) - return -EIO; - sigio_lock(); for(i = 0; i < current_poll.used; i++){ if(current_poll.poll[i].fd == fd) break; @@ -222,7 +215,7 @@ int ignore_sigio_fd(int fd) update_thread(); out: sigio_unlock(); - return err; + return(err); } static struct pollfd *setup_initial_poll(int fd) @@ -240,7 +233,7 @@ static struct pollfd *setup_initial_poll(int fd) return p; } -static void write_sigio_workaround(void) +void write_sigio_workaround(void) { unsigned long stack; struct pollfd *p; @@ -321,24 +314,10 @@ out_close1: close(l_write_sigio_fds[1]); } -void maybe_sigio_broken(int fd, int read) -{ - if(!isatty(fd)) - return; - - if((read || pty_output_sigio) && (!read || pty_close_sigio)) - return; - - write_sigio_workaround(); - add_sigio_fd(fd, read); -} - -static void sigio_cleanup(void) +void sigio_cleanup(void) { if(write_sigio_pid != -1){ os_kill_process(write_sigio_pid, 1); write_sigio_pid = -1; } } - -__uml_exitcall(sigio_cleanup); diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 60e4faedf..f11b3124a 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -106,6 +106,29 @@ void alarm_handler(ARCH_SIGHDLR_PARAM) set_signals(enabled); } +extern void do_boot_timer_handler(struct sigcontext * sc); + +void boot_timer_handler(ARCH_SIGHDLR_PARAM) +{ + struct sigcontext *sc; + int enabled; + + ARCH_GET_SIGCONTEXT(sc, sig); + + enabled = signals_enabled; + if(!enabled){ + if(sig == SIGVTALRM) + pending |= SIGVTALRM_MASK; + else pending |= SIGALRM_MASK; + return; + } + + block_signals(); + + do_boot_timer_handler(sc); + set_signals(enabled); +} + void set_sigstack(void *sig_stack, int size) { stack_t stack = ((stack_t) { .ss_flags = 0, diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 7baf90fda..bd89c6b99 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -159,7 +159,7 @@ static int userspace_tramp(void *stack) ptrace(PTRACE_TRACEME, 0, 0, 0); - init_new_thread_signals(); + init_new_thread_signals(1); enable_timer(); if(!proc_mm){ @@ -435,6 +435,7 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, { unsigned long flags; jmp_buf switch_buf, fork_buf; + int enable; *switch_buf_ptr = &switch_buf; *fork_buf_ptr = &fork_buf; @@ -449,7 +450,7 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, */ flags = get_signals(); block_signals(); - if(UML_SETJMP(&fork_buf) == 0) + if(UML_SETJMP(&fork_buf, enable) == 0) new_thread_proc(stack, handler); remove_sigstack(); @@ -466,19 +467,21 @@ void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, void thread_wait(void *sw, void *fb) { jmp_buf buf, **switch_buf = sw, *fork_buf; + int enable; *switch_buf = &buf; fork_buf = fb; - if(UML_SETJMP(&buf) == 0) + if(UML_SETJMP(&buf, enable) == 0) siglongjmp(*fork_buf, INIT_JMP_REMOVE_SIGSTACK); } void switch_threads(void *me, void *next) { jmp_buf my_buf, **me_ptr = me, *next_buf = next; + int enable; *me_ptr = &my_buf; - if(UML_SETJMP(&my_buf) == 0) + if(UML_SETJMP(&my_buf, enable) == 0) UML_LONGJMP(next_buf, 1); } @@ -492,14 +495,14 @@ static jmp_buf *cb_back; int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr) { jmp_buf **switch_buf = switch_buf_ptr; - int n; + int n, enable; set_handler(SIGWINCH, (__sighandler_t) sig_handler, SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGALRM, SIGVTALRM, -1); *fork_buf_ptr = &initial_jmpbuf; - n = UML_SETJMP(&initial_jmpbuf); + n = UML_SETJMP(&initial_jmpbuf, enable); switch(n){ case INIT_JMP_NEW_THREAD: new_thread_proc((void *) stack, new_thread_handler); @@ -526,13 +529,14 @@ int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr) void initial_thread_cb_skas(void (*proc)(void *), void *arg) { jmp_buf here; + int enable; cb_proc = proc; cb_arg = arg; cb_back = &here; block_signals(); - if(UML_SETJMP(&here) == 0) + if(UML_SETJMP(&here, enable) == 0) UML_LONGJMP(&initial_jmpbuf, INIT_JMP_CALLBACK); unblock_signals(); diff --git a/arch/um/os-Linux/sys-i386/tls.c b/arch/um/os-Linux/sys-i386/tls.c index 8dc6a49cb..120abbe4e 100644 --- a/arch/um/os-Linux/sys-i386/tls.c +++ b/arch/um/os-Linux/sys-i386/tls.c @@ -1,10 +1,10 @@ #include -#include -#include #include #include "sysdep/tls.h" #include "user_util.h" +static _syscall1(int, get_thread_area, user_desc_t *, u_info); + /* Checks whether host supports TLS, and sets *tls_min according to the value * valid on the host. * i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */ @@ -17,7 +17,7 @@ void check_host_supports_tls(int *supports_tls, int *tls_min) { user_desc_t info; info.entry_number = val[i]; - if(syscall(__NR_get_thread_area, &info) == 0){ + if (get_thread_area(&info) == 0) { *tls_min = val[i]; *supports_tls = 1; return; diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index 4ae73c0e5..280c4fb9b 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -17,6 +17,11 @@ #include "kern_constants.h" #include "os.h" +/* XXX This really needs to be declared and initialized in a kernel file since + * it's in + */ +extern struct timespec wall_to_monotonic; + static void set_interval(int timer_type) { int usec = 1000000/hz(); @@ -66,7 +71,6 @@ void switch_timers(int to_real) errno); } -#ifdef UML_CONFIG_MODE_TT void uml_idle_timer(void) { if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR) @@ -76,7 +80,14 @@ void uml_idle_timer(void) SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGVTALRM, -1); set_interval(ITIMER_REAL); } -#endif + +void time_init(void) +{ + if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) + panic("Couldn't set SIGVTALRM handler"); + set_interval(ITIMER_VIRTUAL); + time_init_kern(); +} unsigned long long os_nsecs(void) { @@ -95,7 +106,15 @@ void idle_sleep(int secs) nanosleep(&ts, NULL); } +/* XXX This partly duplicates init_irq_signals */ + void user_time_init(void) { + set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, + SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, + SIGALRM, SIGUSR2, -1); + set_handler(SIGALRM, (__sighandler_t) alarm_handler, + SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, + SIGVTALRM, SIGUSR2, -1); set_interval(ITIMER_VIRTUAL); } diff --git a/arch/um/os-Linux/tls.c b/arch/um/os-Linux/tls.c index 3385784b9..9cb09a455 100644 --- a/arch/um/os-Linux/tls.c +++ b/arch/um/os-Linux/tls.c @@ -1,8 +1,6 @@ #include #include -#include #include -#include #include "sysdep/tls.h" #include "uml-config.h" @@ -50,11 +48,14 @@ int os_get_thread_area(user_desc_t *info, int pid) #ifdef UML_CONFIG_MODE_TT #include "linux/unistd.h" +static _syscall1(int, get_thread_area, user_desc_t *, u_info); +static _syscall1(int, set_thread_area, user_desc_t *, u_info); + int do_set_thread_area_tt(user_desc_t *info) { int ret; - ret = syscall(__NR_set_thread_area, info); + ret = set_thread_area(info); if (ret < 0) { ret = -errno; } @@ -65,7 +66,7 @@ int do_get_thread_area_tt(user_desc_t *info) { int ret; - ret = syscall(__NR_get_thread_area, info); + ret = get_thread_area(info); if (ret < 0) { ret = -errno; } diff --git a/arch/um/os-Linux/uaccess.c b/arch/um/os-Linux/uaccess.c index 865f6a6a2..e52371933 100644 --- a/arch/um/os-Linux/uaccess.c +++ b/arch/um/os-Linux/uaccess.c @@ -14,10 +14,11 @@ unsigned long __do_user_copy(void *to, const void *from, int n, int n), int *faulted_out) { unsigned long *faddrp = (unsigned long *) fault_addr, ret; + int enable; jmp_buf jbuf; *fault_catcher = &jbuf; - if(UML_SETJMP(&jbuf) == 0){ + if(UML_SETJMP(&jbuf, enable) == 0){ (*op)(to, from, n); ret = 0; *faulted_out = 0; diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 48092b95c..362db059f 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c @@ -67,53 +67,32 @@ err: return err; } -/* - * Unlinks the files contained in @dir and then removes @dir. - * Doesn't handle directory trees, so it's not like rm -rf, but almost such. We - * ignore ENOENT errors for anything (they happen, strangely enough - possibly due - * to races between multiple dying UML threads). - */ -static int remove_files_and_dir(char *dir) +static int actually_do_remove(char *dir) { DIR *directory; struct dirent *ent; int len; char file[256]; - int ret; directory = opendir(dir); - if (directory == NULL) { - if (errno != ENOENT) - return -errno; - else - return 0; - } + if(directory == NULL) + return -errno; - while ((ent = readdir(directory)) != NULL) { - if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) + while((ent = readdir(directory)) != NULL){ + if(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) continue; len = strlen(dir) + sizeof("/") + strlen(ent->d_name) + 1; - if (len > sizeof(file)) { - ret = -E2BIG; - goto out; - } + if(len > sizeof(file)) + return -E2BIG; sprintf(file, "%s/%s", dir, ent->d_name); - if (unlink(file) < 0 && errno != ENOENT) { - ret = -errno; - goto out; - } - } - - if (rmdir(dir) < 0 && errno != ENOENT) { - ret = -errno; - goto out; + if(unlink(file) < 0) + return -errno; } + if(rmdir(dir) < 0) + return -errno; - ret = 0; -out: - closedir(directory); - return ret; + return 0; } /* This says that there isn't already a user of the specified directory even if @@ -124,10 +103,9 @@ out: * something other than UML sticking stuff in the directory * this boot racing with a shutdown of the other UML * In any of these cases, the directory isn't useful for anything else. - * - * Boolean return: 1 if in use, 0 otherwise. */ -static inline int is_umdir_used(char *dir) + +static int not_dead_yet(char *dir) { char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; char pid[sizeof("nnnnn\0")], *end; @@ -135,7 +113,7 @@ static inline int is_umdir_used(char *dir) n = snprintf(file, sizeof(file), "%s/pid", dir); if(n >= sizeof(file)){ - printk("is_umdir_used - pid filename too long\n"); + printk("not_dead_yet - pid filename too long\n"); err = -E2BIG; goto out; } @@ -145,7 +123,7 @@ static inline int is_umdir_used(char *dir) if(fd < 0) { fd = -errno; if(fd != -ENOENT){ - printk("is_umdir_used : couldn't open pid file '%s', " + printk("not_dead_yet : couldn't open pid file '%s', " "err = %d\n", file, -fd); } goto out; @@ -154,18 +132,18 @@ static inline int is_umdir_used(char *dir) err = 0; n = read(fd, pid, sizeof(pid)); if(n < 0){ - printk("is_umdir_used : couldn't read pid file '%s', " + printk("not_dead_yet : couldn't read pid file '%s', " "err = %d\n", file, errno); goto out_close; } else if(n == 0){ - printk("is_umdir_used : couldn't read pid file '%s', " + printk("not_dead_yet : couldn't read pid file '%s', " "0-byte read\n", file); goto out_close; } p = strtoul(pid, &end, 0); if(end == pid){ - printk("is_umdir_used : couldn't parse pid file '%s', " + printk("not_dead_yet : couldn't parse pid file '%s', " "errno = %d\n", file, errno); goto out_close; } @@ -175,32 +153,19 @@ static inline int is_umdir_used(char *dir) return 1; } + err = actually_do_remove(dir); + if(err) + printk("not_dead_yet - actually_do_remove failed with " + "err = %d\n", err); + + return err; + out_close: close(fd); out: return 0; } -/* - * Try to remove the directory @dir unless it's in use. - * Precondition: @dir exists. - * Returns 0 for success, < 0 for failure in removal or if the directory is in - * use. - */ -static int umdir_take_if_dead(char *dir) -{ - int ret; - if (is_umdir_used(dir)) - return -EEXIST; - - ret = remove_files_and_dir(dir); - if (ret) { - printk("is_umdir_used - remove_files_and_dir failed with " - "err = %d\n", ret); - } - return ret; -} - static void __init create_pid_file(void) { char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; @@ -279,7 +244,11 @@ int __init make_umid(void) if(err != -EEXIST) goto err; - if (umdir_take_if_dead(tmp) < 0) + /* 1 -> this umid is already in use + * < 0 -> we couldn't remove the umid directory + * In either case, we can't use this umid, so return -EEXIST. + */ + if(not_dead_yet(tmp) != 0) goto err; err = mkdir(tmp, 0777); @@ -375,9 +344,9 @@ static void remove_umid_dir(void) char dir[strlen(uml_dir) + UMID_LEN + 1], err; sprintf(dir, "%s%s", uml_dir, umid); - err = remove_files_and_dir(dir); + err = actually_do_remove(dir); if(err) - printf("remove_umid_dir - remove_files_and_dir failed with " + printf("remove_umid_dir - actually_do_remove failed with " "err = %d\n", err); } diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 813077fb1..1347dc6d5 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules @@ -8,7 +8,7 @@ USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) $(USER_OBJS:.o=.%): \ - c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o) + c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(*F).o) $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ -Dunix -D__unix__ -D__$(SUBARCH)__ @@ -17,7 +17,7 @@ $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) $(UNPROFILE_OBJS:.o=.%): \ - c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) + c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(*F).o) $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ -Dunix -D__unix__ -D__$(SUBARCH)__ diff --git a/arch/um/sys-i386/checksum.S b/arch/um/sys-i386/checksum.S index 62c7e564f..d98b2fff3 100644 --- a/arch/um/sys-i386/checksum.S +++ b/arch/um/sys-i386/checksum.S @@ -25,6 +25,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include /* diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index 662b339d7..fe0877b35 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c @@ -4,6 +4,7 @@ */ #include "linux/stddef.h" +#include "linux/config.h" #include "linux/sched.h" #include "linux/slab.h" #include "linux/types.h" diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c index 28bf01150..6028bc7cc 100644 --- a/arch/um/sys-i386/ptrace.c +++ b/arch/um/sys-i386/ptrace.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include #include #include "linux/sched.h" #include "linux/mm.h" diff --git a/arch/um/sys-i386/sys_call_table.S b/arch/um/sys-i386/sys_call_table.S index 2497554b7..1ff61474b 100644 --- a/arch/um/sys-i386/sys_call_table.S +++ b/arch/um/sys-i386/sys_call_table.S @@ -7,6 +7,8 @@ #define sys_vm86old sys_ni_syscall #define sys_vm86 sys_ni_syscall +#define sys_stime um_stime +#define sys_time um_time #define old_mmap old_mmap_i386 #include "../../i386/kernel/syscall_table.S" diff --git a/arch/um/sys-i386/sysrq.c b/arch/um/sys-i386/sysrq.c index 171b3e9dc..d5244f070 100644 --- a/arch/um/sys-i386/sysrq.c +++ b/arch/um/sys-i386/sysrq.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/smp.h" #include "linux/sched.h" diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index 643dab585..71b979625 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include "linux/config.h" #include "linux/kernel.h" #include "linux/sched.h" #include "linux/slab.h" diff --git a/arch/um/sys-ppc/misc.S b/arch/um/sys-ppc/misc.S index 1364b7da5..11b7bd768 100644 --- a/arch/um/sys-ppc/misc.S +++ b/arch/um/sys-ppc/misc.S @@ -15,6 +15,7 @@ * */ +#include #include #include "ppc_asm.h" @@ -22,10 +23,14 @@ #define CACHE_LINE_SIZE 16 #define LG_CACHE_LINE_SIZE 4 #define MAX_COPY_PREFETCH 1 -#else +#elif !defined(CONFIG_PPC64BRIDGE) #define CACHE_LINE_SIZE 32 #define LG_CACHE_LINE_SIZE 5 #define MAX_COPY_PREFETCH 4 +#else +#define CACHE_LINE_SIZE 128 +#define LG_CACHE_LINE_SIZE 7 +#define MAX_COPY_PREFETCH 1 #endif /* CONFIG_4xx || CONFIG_8xx */ .text diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86_64/stub_segv.c index 652fa34c2..1c967026c 100644 --- a/arch/um/sys-x86_64/stub_segv.c +++ b/arch/um/sys-x86_64/stub_segv.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "uml-config.h" #include "sysdep/sigcontext.h" diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86_64/syscall_table.c index 9e9ad72c2..34b2e8428 100644 --- a/arch/um/sys-x86_64/syscall_table.c +++ b/arch/um/sys-x86_64/syscall_table.c @@ -4,6 +4,7 @@ #include #include #include +#include #define __NO_STUBS @@ -19,6 +20,12 @@ /*#define sys_set_thread_area sys_ni_syscall #define sys_get_thread_area sys_ni_syscall*/ +/* For __NR_time. The x86-64 name hopefully will change from sys_time64 to + * sys_time (since the current situation is bogus). I've sent a patch to cleanup + * this. Remove below the obsoleted line. */ +#define sys_time64 um_time +#define sys_time um_time + /* On UML we call it this way ("old" means it's not mmap2) */ #define sys_mmap old_mmap /* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick. diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c index 40892d3e3..d0502e142 100644 --- a/arch/v850/kernel/anna.c +++ b/arch/v850/kernel/anna.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c index 5352f8a5a..d78c5e4ea 100644 --- a/arch/v850/kernel/as85ep1.c +++ b/arch/v850/kernel/as85ep1.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c index cb04a6954..d8094519a 100644 --- a/arch/v850/kernel/fpga85e2c.c +++ b/arch/v850/kernel/fpga85e2c.c @@ -12,6 +12,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c index 25d636e79..92918b8d8 100644 --- a/arch/v850/kernel/gbus_int.c +++ b/arch/v850/kernel/gbus_int.c @@ -154,7 +154,7 @@ static unsigned gbus_int_startup_irq (unsigned irq) /* First enable the CPU interrupt. */ int rval = request_irq (IRQ_GINT(gint), gbus_int_handle_irq, - IRQF_DISABLED, + SA_INTERRUPT, "gbus_int_handler", &gint_num_active_irqs[gint]); if (rval != 0) diff --git a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c index 858c45819..7a151c26f 100644 --- a/arch/v850/kernel/irq.c +++ b/arch/v850/kernel/irq.c @@ -65,10 +65,10 @@ int show_interrupts(struct seq_file *p, void *v) int j; int count = 0; int num = -1; - const char *type_name = irq_desc[irq].chip->typename; + const char *type_name = irq_desc[irq].handler->typename; for (j = 0; j < NR_IRQS; j++) - if (irq_desc[j].chip->typename == type_name){ + if (irq_desc[j].handler->typename == type_name){ if (irq == j) num = count; count++; @@ -117,7 +117,7 @@ init_irq_handlers (int base_irq, int num, int interval, irq_desc[base_irq].status = IRQ_DISABLED; irq_desc[base_irq].action = NULL; irq_desc[base_irq].depth = 1; - irq_desc[base_irq].chip = irq_type; + irq_desc[base_irq].handler = irq_type; base_irq += interval; } } diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c index 2aa8ab0f7..b3dfbc5d2 100644 --- a/arch/v850/kernel/ma.c +++ b/arch/v850/kernel/ma.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c index 14b0c8858..6527c218f 100644 --- a/arch/v850/kernel/me2.c +++ b/arch/v850/kernel/me2.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c index c4f844c86..57218c769 100644 --- a/arch/v850/kernel/process.c +++ b/arch/v850/kernel/process.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c index 0f7f6cd70..0c794b9e0 100644 --- a/arch/v850/kernel/rte_cb.c +++ b/arch/v850/kernel/rte_cb.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c index f654088b2..b662ad838 100644 --- a/arch/v850/kernel/rte_cb_leds.c +++ b/arch/v850/kernel/rte_cb_leds.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/rte_ma1_cb.c b/arch/v850/kernel/rte_ma1_cb.c index 9a716f946..3873e2763 100644 --- a/arch/v850/kernel/rte_ma1_cb.c +++ b/arch/v850/kernel/rte_ma1_cb.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c index f36b778f1..ffbb6d073 100644 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ b/arch/v850/kernel/rte_mb_a_pci.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include @@ -328,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *b) void pcibios_align_resource (void *data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { } diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c index 3be355a02..faaf3d95e 100644 --- a/arch/v850/kernel/rte_me2_cb.c +++ b/arch/v850/kernel/rte_me2_cb.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include @@ -263,7 +264,7 @@ static unsigned cb_pic_startup_irq (unsigned irq) if (cb_pic_active_irqs == 0) { rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq, - IRQF_DISABLED, "cb_pic_handler", 0); + SA_INTERRUPT, "cb_pic_handler", 0); if (rval != 0) return rval; } diff --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c index b4a045da5..990b20bff 100644 --- a/arch/v850/kernel/rte_nb85e_cb.c +++ b/arch/v850/kernel/rte_nb85e_cb.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c index 1bf672a25..62bdb8d29 100644 --- a/arch/v850/kernel/setup.c +++ b/arch/v850/kernel/setup.c @@ -1,8 +1,8 @@ /* * arch/v850/kernel/setup.c -- Arch-dependent initialization functions * - * Copyright (C) 2001,02,03,05,06 NEC Electronics Corporation - * Copyright (C) 2001,02,03,05,06 Miles Bader + * Copyright (C) 2001,02,03,05 NEC Electronics Corporation + * Copyright (C) 2001,02,03,05 Miles Bader * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this @@ -190,7 +190,7 @@ void free_initmem (void) for (addr = start; addr < end; addr += PAGE_SIZE) { struct page *page = virt_to_page (addr); ClearPageReserved (page); - init_page_count (page); + set_page_count (page, 1); __free_page (page); total_ram_pages++; } diff --git a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c index 17c2d4359..633e4e1b8 100644 --- a/arch/v850/kernel/signal.c +++ b/arch/v850/kernel/signal.c @@ -274,7 +274,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size) /* Default to using normal stack */ unsigned long sp = regs->gpr[GPR_SP]; - if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) + if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) sp = current->sas_ss_sp + current->sas_ss_size; return (void *)((sp - frame_size) & -8UL); diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c index 467b4aa0a..17049aaa8 100644 --- a/arch/v850/kernel/sim.c +++ b/arch/v850/kernel/sim.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c index 566dde5e6..9111613fb 100644 --- a/arch/v850/kernel/sim85e2.c +++ b/arch/v850/kernel/sim85e2.c @@ -12,6 +12,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c index 2ec0700fc..9224cb65f 100644 --- a/arch/v850/kernel/syscalls.c +++ b/arch/v850/kernel/syscalls.c @@ -15,6 +15,7 @@ * and Paul Mackerras (paulus@cs.anu.edu.au). */ +#include #include #include #include diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c index 290d50665..495cf8f37 100644 --- a/arch/v850/kernel/teg.c +++ b/arch/v850/kernel/teg.c @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #include #include #include diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c index 690dbfa36..c1e85c2ae 100644 --- a/arch/v850/kernel/time.c +++ b/arch/v850/kernel/time.c @@ -10,6 +10,7 @@ * "A Kernel Model for Precision Timekeeping" by Dave Mills */ +#include /* CONFIG_HEARTBEAT */ #include #include #include @@ -176,7 +177,7 @@ EXPORT_SYMBOL(do_settimeofday); static int timer_dev_id; static struct irqaction timer_irqaction = { timer_interrupt, - IRQF_DISABLED, + SA_INTERRUPT, CPU_MASK_NONE, "timer", &timer_dev_id, diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c index 67bc48e57..6bcfcfe88 100644 --- a/arch/v850/kernel/v850_ksyms.c +++ b/arch/v850/kernel/v850_ksyms.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -21,6 +22,9 @@ EXPORT_SYMBOL (trap_table); /* platform dependent support */ EXPORT_SYMBOL (kernel_thread); +EXPORT_SYMBOL (enable_irq); +EXPORT_SYMBOL (disable_irq); +EXPORT_SYMBOL (disable_irq_nosync); EXPORT_SYMBOL (__bug); /* Networking helper routines. */ @@ -30,9 +34,22 @@ EXPORT_SYMBOL (ip_compute_csum); EXPORT_SYMBOL (ip_fast_csum); /* string / mem functions */ +EXPORT_SYMBOL (strcpy); +EXPORT_SYMBOL (strncpy); +EXPORT_SYMBOL (strcat); +EXPORT_SYMBOL (strncat); +EXPORT_SYMBOL (strcmp); +EXPORT_SYMBOL (strncmp); +EXPORT_SYMBOL (strchr); +EXPORT_SYMBOL (strlen); +EXPORT_SYMBOL (strnlen); +EXPORT_SYMBOL (strrchr); +EXPORT_SYMBOL (strstr); EXPORT_SYMBOL (memset); EXPORT_SYMBOL (memcpy); EXPORT_SYMBOL (memmove); +EXPORT_SYMBOL (memcmp); +EXPORT_SYMBOL (memscan); /* semaphores */ EXPORT_SYMBOL (__down); diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S index 63399219c..5b2ffcc6e 100644 --- a/arch/v850/kernel/vmlinux.lds.S +++ b/arch/v850/kernel/vmlinux.lds.S @@ -11,6 +11,7 @@ * Written by Miles Bader */ +#include #define VMLINUX_SYMBOL(_sym_) _##_sym_ #include diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 0d916b2ef..0f4ed7159 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -24,15 +24,6 @@ config X86 bool default y -config LOCKDEP_SUPPORT - bool - default y - -config STACKTRACE_SUPPORT - bool - depends on !X86_64_XEN - default y - config SEMAPHORE_SLEEPERS bool default y @@ -86,10 +77,6 @@ config DMI bool default y -config AUDIT_ARCH - bool - default y - source "init/Kconfig" @@ -337,7 +324,6 @@ config X86_64_ACPI_NUMA bool "ACPI NUMA detection" depends on NUMA select ACPI - select PCI select ACPI_NUMA default y help @@ -428,47 +414,27 @@ config HPET_EMULATE_RTC bool "Provide RTC interrupt" depends on HPET_TIMER && RTC=y -# Mark as embedded because too many people got it wrong. -# The code disables itself when not needed. -config IOMMU - bool "IOMMU support" if EMBEDDED +config GART_IOMMU + bool "K8 GART IOMMU support" default y select SWIOTLB - select AGP depends on PCI && !X86_64_XEN help - Support for full DMA access of devices with 32bit memory access only - on systems with more than 3GB. This is usually needed for USB, - sound, many IDE/SATA chipsets and some other devices. - Provides a driver for the AMD Athlon64/Opteron/Turion/Sempron GART - based IOMMU and a software bounce buffer based IOMMU used on Intel - systems and as fallback. - The code is only active when needed (enough memory and limited - device) unless CONFIG_IOMMU_DEBUG or iommu=force is specified - too. - -config CALGARY_IOMMU - bool "IBM Calgary IOMMU support" - default y - select SWIOTLB - depends on PCI && EXPERIMENTAL - help - Support for hardware IOMMUs in IBM's xSeries x366 and x460 - systems. Needed to run systems with more than 3GB of memory - properly with 32-bit PCI devices that do not support DAC - (Double Address Cycle). Calgary also supports bus level - isolation, where all DMAs pass through the IOMMU. This - prevents them from going anywhere except their intended - destination. This catches hard-to-find kernel bugs and - mis-behaving drivers and devices that do not use the DMA-API - properly to set up their DMA buffers. The IOMMU can be - turned off at boot time with the iommu=off parameter. - Normally the kernel will make the right choice by itself. - If unsure, say Y. - -# need this always selected by IOMMU for the VIA workaround + Support for hardware IOMMU in AMD's Opteron/Athlon64 Processors + and for the bounce buffering software IOMMU. + Needed to run systems with more than 3GB of memory properly with + 32-bit PCI devices that do not support DAC (Double Address Cycle). + The IOMMU can be turned off at runtime with the iommu=off parameter. + Normally the kernel will take the right choice by itself. + This option includes a driver for the AMD Opteron/Athlon64 IOMMU + northbridge and a software emulation used on other systems without + hardware IOMMU. If unsure, say Y. + +# need this always enabled with GART_IOMMU for the VIA workaround config SWIOTLB bool + default y + depends on GART_IOMMU config X86_MCE bool "Machine check support" if EMBEDDED @@ -502,10 +468,10 @@ config KEXEC help kexec is a system call that implements the ability to shutdown your current kernel, and to start another kernel. It is like a reboot - but it is independent of the system firmware. And like a reboot + but it is indepedent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. - The name comes from the similarity to the exec system call. + The name comes from the similiarity to the exec system call. It is an ongoing process to be certain the hardware in a machine is properly shutdown, so do not be surprised if this code does not @@ -565,10 +531,6 @@ config REORDER optimal TLB usage. If you have pretty much any version of binutils, this can increase your kernel build time by roughly one minute. -config K8_NB - def_bool y - depends on AGP_AMD64 || IOMMU || (PCI && NUMA) - endmenu # diff --git a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug index 775d211a5..ea31b4c62 100644 --- a/arch/x86_64/Kconfig.debug +++ b/arch/x86_64/Kconfig.debug @@ -1,9 +1,5 @@ menu "Kernel hacking" -config TRACE_IRQFLAGS_SUPPORT - bool - default y - source "lib/Kconfig.debug" config DEBUG_RODATA @@ -17,7 +13,7 @@ config DEBUG_RODATA If in doubt, say "N". config IOMMU_DEBUG - depends on IOMMU && DEBUG_KERNEL + depends on GART_IOMMU && DEBUG_KERNEL bool "Enable IOMMU debugging" help Force the IOMMU to on even when you have less than 4GB of @@ -39,22 +35,6 @@ config IOMMU_LEAK Add a simple leak tracer to the IOMMU code. This is useful when you are debugging a buggy device driver that leaks IOMMU mappings. -config DEBUG_STACKOVERFLOW - bool "Check for stack overflows" - depends on DEBUG_KERNEL - help - This option will cause messages to be printed if free stack space - drops below a certain limit. - -config DEBUG_STACK_USAGE - bool "Stack utilization instrumentation" - depends on DEBUG_KERNEL - help - Enables the display of the minimum amount of free stack which each - task has ever had available in the sysrq-T and sysrq-P debug output. - - This option will slow down process creation somewhat. - #config X86_REMOTE_DEBUG # bool "kgdb debugging stub" diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 055b315ab..4b81d9f4c 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile @@ -27,7 +27,6 @@ LDFLAGS_vmlinux := CHECKFLAGS += -D__x86_64__ -m64 cflags-y := -cflags-kernel-y := cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) @@ -40,7 +39,7 @@ cflags-y += -m64 cflags-y += -mno-red-zone cflags-y += -mcmodel=kernel cflags-y += -pipe -cflags-kernel-$(CONFIG_REORDER) += -ffunction-sections +cflags-$(CONFIG_REORDER) += -ffunction-sections # this makes reading assembly source easier, but produces worse code # actually it makes the kernel smaller too. cflags-y += -fno-reorder-blocks @@ -60,7 +59,6 @@ cflags-y += $(call cc-option,-funit-at-a-time) cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) CFLAGS += $(cflags-y) -CFLAGS_KERNEL += $(cflags-kernel-y) AFLAGS += -m64 head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile index deb063e77..43ee6c50c 100644 --- a/arch/x86_64/boot/Makefile +++ b/arch/x86_64/boot/Makefile @@ -107,13 +107,8 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf isoimage: $(BOOTIMAGE) -rm -rf $(obj)/isoimage mkdir $(obj)/isoimage - for i in lib lib64 share end ; do \ - if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ - cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ - break ; \ - fi ; \ - if [ $$i = end ] ; then exit 1 ; fi ; \ - done + cp `echo /usr/lib*/syslinux/isolinux.bin | awk '{ print $1; }'` \ + $(obj)/isoimage cp $(BOOTIMAGE) $(obj)/isoimage/linux echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg if [ -f '$(FDINITRD)' ] ; then \ diff --git a/arch/x86_64/boot/compressed/misc.c b/arch/x86_64/boot/compressed/misc.c index 3755b2e39..cf4b88c41 100644 --- a/arch/x86_64/boot/compressed/misc.c +++ b/arch/x86_64/boot/compressed/misc.c @@ -77,11 +77,11 @@ static void gzip_release(void **); */ static unsigned char *real_mode; /* Pointer to real-mode data */ -#define RM_EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) +#define EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) #ifndef STANDARD_MEMORY_BIOS_CALL -#define RM_ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) +#define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) #endif -#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0)) +#define SCREEN_INFO (*(struct screen_info *)(real_mode+0)) extern unsigned char input_data[]; extern int input_len; @@ -92,9 +92,9 @@ static unsigned long output_ptr = 0; static void *malloc(int size); static void free(void *where); - -static void *memset(void *s, int c, unsigned n); -static void *memcpy(void *dest, const void *src, unsigned n); + +void* memset(void* s, int c, unsigned n); +void* memcpy(void* dest, const void* src, unsigned n); static void putstr(const char *); @@ -162,8 +162,8 @@ static void putstr(const char *s) int x,y,pos; char c; - x = RM_SCREEN_INFO.orig_x; - y = RM_SCREEN_INFO.orig_y; + x = SCREEN_INFO.orig_x; + y = SCREEN_INFO.orig_y; while ( ( c = *s++ ) != '\0' ) { if ( c == '\n' ) { @@ -184,8 +184,8 @@ static void putstr(const char *s) } } - RM_SCREEN_INFO.orig_x = x; - RM_SCREEN_INFO.orig_y = y; + SCREEN_INFO.orig_x = x; + SCREEN_INFO.orig_y = y; pos = (x + cols * y) * 2; /* Update cursor position */ outb_p(14, vidport); @@ -194,7 +194,7 @@ static void putstr(const char *s) outb_p(0xff & (pos >> 1), vidport+1); } -static void* memset(void* s, int c, unsigned n) +void* memset(void* s, int c, unsigned n) { int i; char *ss = (char*)s; @@ -203,7 +203,7 @@ static void* memset(void* s, int c, unsigned n) return s; } -static void* memcpy(void* dest, const void* src, unsigned n) +void* memcpy(void* dest, const void* src, unsigned n) { int i; char *d = (char *)dest, *s = (char *)src; @@ -278,15 +278,15 @@ static void error(char *x) putstr(x); putstr("\n\n -- System halted"); - while(1); /* Halt */ + while(1); } -static void setup_normal_output_buffer(void) +void setup_normal_output_buffer(void) { #ifdef STANDARD_MEMORY_BIOS_CALL - if (RM_EXT_MEM_K < 1024) error("Less than 2MB of memory"); + if (EXT_MEM_K < 1024) error("Less than 2MB of memory"); #else - if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory"); + if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory"); #endif output_data = (unsigned char *)__PHYSICAL_START; /* Normally Points to 1M */ free_mem_end_ptr = (long)real_mode; @@ -297,13 +297,13 @@ struct moveparams { uch *high_buffer_start; int hcount; }; -static void setup_output_buffer_if_we_run_high(struct moveparams *mv) +void setup_output_buffer_if_we_run_high(struct moveparams *mv) { high_buffer_start = (uch *)(((ulg)&end) + HEAP_SIZE); #ifdef STANDARD_MEMORY_BIOS_CALL - if (RM_EXT_MEM_K < (3*1024)) error("Less than 4MB of memory"); + if (EXT_MEM_K < (3*1024)) error("Less than 4MB of memory"); #else - if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory"); + if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory"); #endif mv->low_buffer_start = output_data = (unsigned char *)LOW_BUFFER_START; low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX @@ -319,7 +319,7 @@ static void setup_output_buffer_if_we_run_high(struct moveparams *mv) mv->high_buffer_start = high_buffer_start; } -static void close_output_buffer_if_we_run_high(struct moveparams *mv) +void close_output_buffer_if_we_run_high(struct moveparams *mv) { if (bytes_out > low_buffer_size) { mv->lcount = low_buffer_size; @@ -335,7 +335,7 @@ int decompress_kernel(struct moveparams *mv, void *rmode) { real_mode = rmode; - if (RM_SCREEN_INFO.orig_video_mode == 7) { + if (SCREEN_INFO.orig_video_mode == 7) { vidmem = (char *) 0xb0000; vidport = 0x3b4; } else { @@ -343,8 +343,8 @@ int decompress_kernel(struct moveparams *mv, void *rmode) vidport = 0x3d4; } - lines = RM_SCREEN_INFO.orig_video_lines; - cols = RM_SCREEN_INFO.orig_video_cols; + lines = SCREEN_INFO.orig_video_lines; + cols = SCREEN_INFO.orig_video_cols; if (free_mem_ptr < 0x100000) setup_normal_output_buffer(); else setup_output_buffer_if_we_run_high(mv); diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S index a50b631f4..12ea0b6c5 100644 --- a/arch/x86_64/boot/setup.S +++ b/arch/x86_64/boot/setup.S @@ -45,8 +45,9 @@ * Added long mode checking and SSE force. March 2003, Andi Kleen. */ +#include #include -#include +#include #include #include #include diff --git a/arch/x86_64/boot/tools/build.c b/arch/x86_64/boot/tools/build.c index eae866917..c44f5e2ec 100644 --- a/arch/x86_64/boot/tools/build.c +++ b/arch/x86_64/boot/tools/build.c @@ -149,8 +149,10 @@ int main(int argc, char ** argv) sz = sb.st_size; fprintf (stderr, "System is %d kB\n", sz/1024); sys_size = (sz + 15) / 16; - if (!is_big_kernel && sys_size > DEF_SYSSIZE) - die("System is too big. Try using bzImage or modules."); + /* 0x40000*16 = 4.0 MB, reasonable estimate for the current maximum */ + if (sys_size > (is_big_kernel ? 0x40000 : DEF_SYSSIZE)) + die("System is too big. Try using %smodules.", + is_big_kernel ? "" : "bzImage or "); while (sz > 0) { int l, n; diff --git a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S index d6ff88f35..32327bb37 100644 --- a/arch/x86_64/boot/video.S +++ b/arch/x86_64/boot/video.S @@ -11,6 +11,8 @@ * */ +#include /* for CONFIG_VIDEO_* */ + /* Enable autodetection of SVGA adapters and modes. */ #undef CONFIG_VIDEO_SVGA @@ -1927,7 +1929,6 @@ skip10: movb %ah, %al ret store_edid: -#ifdef CONFIG_FIRMWARE_EDID pushw %es # just save all registers pushw %ax pushw %bx @@ -1945,22 +1946,6 @@ store_edid: rep stosl - pushw %es # save ES - xorw %di, %di # Report Capability - pushw %di - popw %es # ES:DI must be 0:0 - movw $0x4f15, %ax - xorw %bx, %bx - xorw %cx, %cx - int $0x10 - popw %es # restore ES - - cmpb $0x00, %ah # call successful - jne no_edid - - cmpb $0x4f, %al # function supported - jne no_edid - movw $0x4f15, %ax # do VBE/DDC movw $0x01, %bx movw $0x00, %cx @@ -1968,14 +1953,12 @@ store_edid: movw $0x140, %di int $0x10 -no_edid: popw %di # restore all registers popw %dx popw %cx popw %bx popw %ax popw %es -#endif ret # VIDEO_SELECT-only variables diff --git a/arch/x86_64/crypto/aes-x86_64-asm.S b/arch/x86_64/crypto/aes-x86_64-asm.S index 26b40de4d..483cbb23a 100644 --- a/arch/x86_64/crypto/aes-x86_64-asm.S +++ b/arch/x86_64/crypto/aes-x86_64-asm.S @@ -15,10 +15,6 @@ .text -#include - -#define BASE crypto_tfm_ctx_offset - #define R1 %rax #define R1E %eax #define R1X %ax @@ -50,19 +46,19 @@ #define R10 %r10 #define R11 %r11 -#define prologue(FUNC,KEY,B128,B192,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11) \ +#define prologue(FUNC,BASE,B128,B192,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11) \ .global FUNC; \ .type FUNC,@function; \ .align 8; \ FUNC: movq r1,r2; \ movq r3,r4; \ - leaq BASE+KEY+52(r8),r9; \ + leaq BASE+52(r8),r9; \ movq r10,r11; \ movl (r7),r5 ## E; \ movl 4(r7),r1 ## E; \ movl 8(r7),r6 ## E; \ movl 12(r7),r7 ## E; \ - movl BASE(r8),r10 ## E; \ + movl (r8),r10 ## E; \ xorl -48(r9),r5 ## E; \ xorl -44(r9),r1 ## E; \ xorl -40(r9),r6 ## E; \ @@ -132,8 +128,8 @@ FUNC: movq r1,r2; \ movl r3 ## E,r1 ## E; \ movl r4 ## E,r2 ## E; -#define entry(FUNC,KEY,B128,B192) \ - prologue(FUNC,KEY,B128,B192,R2,R8,R7,R9,R1,R3,R4,R6,R10,R5,R11) +#define entry(FUNC,BASE,B128,B192) \ + prologue(FUNC,BASE,B128,B192,R2,R8,R7,R9,R1,R3,R4,R6,R10,R5,R11) #define return epilogue(R8,R2,R9,R7,R5,R6,R3,R4,R11) @@ -151,9 +147,9 @@ FUNC: movq r1,r2; \ #define decrypt_final(TAB,OFFSET) \ round(TAB,OFFSET,R2,R1,R4,R3,R6,R5,R7,R10,R5,R6,R3,R4) -/* void aes_enc_blk(stuct crypto_tfm *tfm, u8 *out, const u8 *in) */ +/* void aes_encrypt(void *ctx, u8 *out, const u8 *in) */ - entry(aes_enc_blk,0,enc128,enc192) + entry(aes_encrypt,0,enc128,enc192) encrypt_round(aes_ft_tab,-96) encrypt_round(aes_ft_tab,-80) enc192: encrypt_round(aes_ft_tab,-64) @@ -170,9 +166,9 @@ enc128: encrypt_round(aes_ft_tab,-32) encrypt_final(aes_fl_tab,112) return -/* void aes_dec_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in) */ +/* void aes_decrypt(void *ctx, u8 *out, const u8 *in) */ - entry(aes_dec_blk,240,dec128,dec192) + entry(aes_decrypt,240,dec128,dec192) decrypt_round(aes_it_tab,-96) decrypt_round(aes_it_tab,-80) dec192: decrypt_round(aes_it_tab,-64) diff --git a/arch/x86_64/crypto/aes.c b/arch/x86_64/crypto/aes.c index 68866fab3..6f77e7700 100644 --- a/arch/x86_64/crypto/aes.c +++ b/arch/x86_64/crypto/aes.c @@ -227,10 +227,10 @@ static void __init gen_tabs(void) t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \ } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, + u32 *flags) { - struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + struct aes_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; u32 i, j, t, u, v, w; @@ -283,18 +283,8 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, return 0; } -asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in); -asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *out, const u8 *in); - -static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ - aes_enc_blk(tfm, dst, src); -} - -static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ - aes_dec_blk(tfm, dst, src); -} +extern void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in); +extern void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in); static struct crypto_alg aes_alg = { .cra_name = "aes", diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 5fb970715..69db0c072 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig @@ -1,13 +1,11 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18-rc4 -# Thu Aug 24 21:05:55 2006 +# Linux kernel version: 2.6.17-rc1-git11 +# Sun Apr 16 07:22:36 2006 # CONFIG_X86_64=y CONFIG_64BIT=y CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -19,7 +17,6 @@ CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -37,7 +34,6 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y @@ -46,6 +42,7 @@ CONFIG_IKCONFIG_PROC=y # CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -56,12 +53,11 @@ CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -CONFIG_RT_MUTEXES=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y +CONFIG_DOUBLEFAULT=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -142,16 +138,13 @@ CONFIG_NEED_MULTIPLE_NODES=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y CONFIG_NR_CPUS=32 CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -# CONFIG_CALGARY_IOMMU is not set +CONFIG_GART_IOMMU=y CONFIG_SWIOTLB=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y @@ -165,7 +158,6 @@ CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 # CONFIG_REORDER is not set -CONFIG_K8_NB=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_ISA_DMA_API=y @@ -194,14 +186,13 @@ CONFIG_ACPI_BUTTON=y # CONFIG_ACPI_VIDEO is not set # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_NUMA=y # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_IBM is not set -# CONFIG_ACPI_TOSHIBA is not set +CONFIG_ACPI_TOSHIBA=y CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_EC=y @@ -209,14 +200,14 @@ CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y -# CONFIG_ACPI_SBS is not set +CONFIG_ACPI_HOTPLUG_MEMORY=y # # CPU Frequency scaling # CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y +# CONFIG_CPU_FREQ_DEBUG is not set CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y @@ -302,8 +293,6 @@ CONFIG_IP_PNP_DHCP=y # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -316,10 +305,7 @@ CONFIG_IPV6=y # CONFIG_INET6_IPCOMP is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET6_XFRM_MODE_TUNNEL is not set # CONFIG_IPV6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # @@ -358,7 +344,6 @@ CONFIG_IPV6=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -375,7 +360,6 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -414,7 +398,6 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -495,9 +478,8 @@ CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # 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 +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set # CONFIG_CHR_DEV_SCH is not set # @@ -513,7 +495,7 @@ CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_SPI_ATTRS=y CONFIG_SCSI_FC_ATTRS=y # CONFIG_SCSI_ISCSI_ATTRS is not set -CONFIG_SCSI_SAS_ATTRS=y +# CONFIG_SCSI_SAS_ATTRS is not set # # SCSI low-level drivers @@ -539,12 +521,11 @@ CONFIG_MEGARAID_MAILBOX=y CONFIG_MEGARAID_SAS=y CONFIG_SCSI_SATA=y CONFIG_SCSI_SATA_AHCI=y -CONFIG_SCSI_SATA_SVW=y +# CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_MV is not set CONFIG_SCSI_SATA_NV=y # CONFIG_SCSI_PDC_ADMA is not set -# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_SATA_QSTOR is not set # CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_SX4 is not set @@ -590,7 +571,7 @@ CONFIG_BLK_DEV_DM=y CONFIG_FUSION=y CONFIG_FUSION_SPI=y # CONFIG_FUSION_FC is not set -CONFIG_FUSION_SAS=y +# CONFIG_FUSION_SAS is not set CONFIG_FUSION_MAX_SGE=128 # CONFIG_FUSION_CTL is not set @@ -610,7 +591,10 @@ CONFIG_IEEE1394=y # # Device Drivers # -# CONFIG_IEEE1394_PCILYNX is not set + +# +# Texas Instruments PCILynx requires I2C +# CONFIG_IEEE1394_OHCI1394=y # @@ -661,22 +645,13 @@ CONFIG_VORTEX=y # # 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 is not set -# CONFIG_TULIP_NAPI is not set -# CONFIG_DE4X5 is not set -# CONFIG_WINBOND_840 is not set -# CONFIG_DM9102 is not set -# CONFIG_ULI526X is not set +# CONFIG_NET_TULIP is not set # CONFIG_HP100 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_B44=y +# CONFIG_B44 is not set CONFIG_FORCEDETH=y # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set @@ -713,7 +688,7 @@ CONFIG_E1000=y # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y -CONFIG_BNX2=y +# CONFIG_BNX2 is not set # # Ethernet (10000 Mbit) @@ -722,7 +697,6 @@ CONFIG_BNX2=y # CONFIG_IXGB is not set CONFIG_S2IO=m # CONFIG_S2IO_NAPI is not set -# CONFIG_MYRI10GE is not set # # Token Ring devices @@ -812,7 +786,6 @@ CONFIG_SERIO_LIBPS2=y CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -843,11 +816,45 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Watchdog Cards # -# CONFIG_WATCHDOG is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +CONFIG_SOFT_WATCHDOG=y +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_IBMASR is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_I6300ESB_WDT is not set +# CONFIG_I8XX_TCO is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_60XX_WDT is not set +# CONFIG_SBC8360_WDT is not set +# CONFIG_CPU5_WDT is not set +# CONFIG_W83627HF_WDT is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_W83977F_WDT is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_SBC_EPX_C3_WATCHDOG is not set + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=y -CONFIG_HW_RANDOM_AMD=y -# CONFIG_HW_RANDOM_GEODE is not set # CONFIG_NVRAM is not set CONFIG_RTC=y # CONFIG_DTLK is not set @@ -864,7 +871,6 @@ CONFIG_AGP_INTEL=y # CONFIG_AGP_VIA is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set -# CONFIG_PC8736x_GPIO is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 CONFIG_HPET=y @@ -881,56 +887,7 @@ CONFIG_HPET_MMAP=y # # I2C support # -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -# CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_I2C is not set # # SPI support @@ -941,51 +898,14 @@ CONFIG_I2C_ISA=m # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support # CONFIG_HWMON=y # CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_SIS5595 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -CONFIG_SENSORS_SMSC47B397=m -# CONFIG_SENSORS_VIA686A is not set -# CONFIG_SENSORS_VT8231 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_HDAPS is not set # CONFIG_HWMON_DEBUG_CHIP is not set @@ -998,7 +918,6 @@ CONFIG_SENSORS_SMSC47B397=m # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices @@ -1009,8 +928,8 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set +CONFIG_VIDEO_SELECT=y # # Console display driver support @@ -1018,9 +937,7 @@ CONFIG_VIDEO_V4L2=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -1036,17 +953,28 @@ CONFIG_SOUND=y # Open Sound System # CONFIG_SOUND_PRIME=y +CONFIG_OBSOLETE_OSS_DRIVER=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=y +# 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_TVMIXER 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 # # USB support @@ -1072,7 +1000,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_EHCI_TT_NEWSCHED is not set # CONFIG_USB_ISP116X_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -1162,12 +1089,10 @@ CONFIG_USB_MON=y # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_LD is not set # CONFIG_USB_TEST is not set @@ -1215,19 +1140,6 @@ CONFIG_USB_MON=y # # CONFIG_RTC_CLASS is not set -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - # # Firmware Drivers # @@ -1263,10 +1175,9 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS_FS=y CONFIG_AUTOFS4_FS=y # CONFIG_FUSE_FS is not set @@ -1405,37 +1316,26 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=18 CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHEDSTATS is not set # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_INFO is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_VM is not set # CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y +# CONFIG_UNWIND_INFO is not set # CONFIG_FORCED_INLINING is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_DEBUG_RODATA is not set # CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set # # Security options @@ -1459,5 +1359,3 @@ CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_CRC16 is not set CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_PLIST=y diff --git a/arch/x86_64/ia32/Makefile b/arch/x86_64/ia32/Makefile index b3dfcb542..a84151e4c 100644 --- a/arch/x86_64/ia32/Makefile +++ b/arch/x86_64/ia32/Makefile @@ -11,9 +11,6 @@ obj-$(CONFIG_IA32_EMULATION) += $(sysv-y) obj-$(CONFIG_IA32_AOUT) += ia32_aout.o -audit-class-$(CONFIG_AUDIT) := audit.o -obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y) - $(obj)/syscall32_syscall.o: \ $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) @@ -23,7 +20,6 @@ targets := $(foreach F,sysenter syscall,vsyscall-$F.o vsyscall-$F.so) # The DSO images are built using a special linker script quiet_cmd_syscall = SYSCALL $@ cmd_syscall = $(CC) -m32 -nostdlib -shared -s \ - $(call ld-option, -Wl$(comma)--hash-style=sysv) \ -Wl,-soname=linux-gate.so.1 -o $@ \ -Wl,-T,$(filter-out FORCE,$^) diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c deleted file mode 100644 index 92d7d0c8d..000000000 --- a/arch/x86_64/ia32/audit.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -unsigned ia32_dir_class[] = { -#include -~0U -}; - -unsigned ia32_chattr_class[] = { -#include -~0U -}; - -unsigned ia32_write_class[] = { -#include -~0U -}; - -unsigned ia32_read_class[] = { -#include -~0U -}; - -int ia32_classify_syscall(unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_socketcall: - return 4; - case __NR_execve: - return 5; - default: - return 1; - } -} diff --git a/arch/x86_64/ia32/fpu32.c b/arch/x86_64/ia32/fpu32.c index 2c8209a36..1c23095f1 100644 --- a/arch/x86_64/ia32/fpu32.c +++ b/arch/x86_64/ia32/fpu32.c @@ -2,6 +2,7 @@ * Copyright 2002 Andi Kleen, SuSE Labs. * FXSAVE<->i387 conversion support. Based on code by Gareth Hughes. * This is used for ptrace, signals and coredumps in 32bit emulation. + * $Id: fpu32.c,v 1.1 2002/03/21 14:16:32 ak Exp $ */ #include diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 0f5a32896..e5a4cef46 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c @@ -6,6 +6,7 @@ * of ugly preprocessor tricks. Talk about very very poor man's inheritance. */ #include +#include #include #include #include @@ -72,44 +73,39 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; * 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 (find_vma(current->mm, VSYSCALL32_BASE) ? \ - (VSYSCALL32_EHDR->e_phnum) : 0) +#define ELF_CORE_EXTRA_PHDRS (VSYSCALL32_EHDR->e_phnum) #define ELF_CORE_WRITE_EXTRA_PHDRS \ do { \ - if (find_vma(current->mm, VSYSCALL32_BASE)) { \ - const struct elf32_phdr *const vsyscall_phdrs = \ - (const struct elf32_phdr *) (VSYSCALL32_BASE \ - + VSYSCALL32_EHDR->e_phoff);\ - int i; \ - Elf32_Off ofs = 0; \ - for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ - struct elf32_phdr phdr = vsyscall_phdrs[i]; \ - if (phdr.p_type == PT_LOAD) { \ - BUG_ON(ofs != 0); \ - ofs = phdr.p_offset = offset; \ - phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ - phdr.p_filesz = phdr.p_memsz; \ - offset += phdr.p_filesz; \ - } \ - else \ - phdr.p_offset += ofs; \ - phdr.p_paddr = 0; /* match other core phdrs */ \ - DUMP_WRITE(&phdr, sizeof(phdr)); \ + const struct elf32_phdr *const vsyscall_phdrs = \ + (const struct elf32_phdr *) (VSYSCALL32_BASE \ + + VSYSCALL32_EHDR->e_phoff); \ + int i; \ + Elf32_Off ofs = 0; \ + for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ + struct elf32_phdr phdr = vsyscall_phdrs[i]; \ + if (phdr.p_type == PT_LOAD) { \ + BUG_ON(ofs != 0); \ + ofs = phdr.p_offset = offset; \ + phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ + phdr.p_filesz = phdr.p_memsz; \ + 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 { \ - if (find_vma(current->mm, VSYSCALL32_BASE)) { \ - const struct elf32_phdr *const vsyscall_phdrs = \ - (const struct elf32_phdr *) (VSYSCALL32_BASE \ - + VSYSCALL32_EHDR->e_phoff); \ - int i; \ - for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ - if (vsyscall_phdrs[i].p_type == PT_LOAD) \ - DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr,\ - PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ - } \ + const struct elf32_phdr *const vsyscall_phdrs = \ + (const struct elf32_phdr *) (VSYSCALL32_BASE \ + + VSYSCALL32_EHDR->e_phoff); \ + int i; \ + for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ + if (vsyscall_phdrs[i].p_type == PT_LOAD) \ + DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr, \ + PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ } \ } while (0) @@ -186,7 +182,7 @@ struct elf_prpsinfo #define user user32 #define __ASM_X86_64_ELF_H 1 -#define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) +#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) //#include #include diff --git a/arch/x86_64/ia32/ia32_signal.c b/arch/x86_64/ia32/ia32_signal.c index bddaefdb8..e0a92439f 100644 --- a/arch/x86_64/ia32/ia32_signal.c +++ b/arch/x86_64/ia32/ia32_signal.c @@ -6,6 +6,8 @@ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes * 2000-12-* x86-64 compatibility mode signal handling by Andi Kleen + * + * $Id: ia32_signal.c,v 1.22 2002/07/29 10:34:03 ak Exp $ */ #include @@ -113,19 +115,25 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) } asmlinkage long -sys32_sigsuspend(int history0, int history1, old_sigset_t mask) +sys32_sigsuspend(int history0, int history1, old_sigset_t mask, + struct pt_regs *regs) { + sigset_t saveset; + mask &= _BLOCKABLE; spin_lock_irq(¤t->sighand->siglock); - current->saved_sigmask = current->blocked; + saveset = current->blocked; siginitset(¤t->blocked, mask); recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - current->state = TASK_INTERRUPTIBLE; - schedule(); - set_thread_flag(TIF_RESTORE_SIGMASK); - return -ERESTARTNOHAND; + regs->rax = -EINTR; + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(regs, &saveset)) + return -EINTR; + } } asmlinkage long @@ -502,11 +510,11 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, current->comm, current->pid, frame, regs->rip, frame->pretcode); #endif - return 0; + return 1; give_sigsegv: force_sigsegv(sig, current); - return -EFAULT; + return 0; } int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -598,9 +606,9 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, current->comm, current->pid, frame, regs->rip, frame->pretcode); #endif - return 0; + return 1; give_sigsegv: force_sigsegv(sig, current); - return -EFAULT; + return 0; } diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index e1b1a99c5..6595b3599 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S @@ -13,7 +13,6 @@ #include #include #include -#include #include #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) @@ -76,10 +75,6 @@ ENTRY(ia32_sysenter_target) swapgs movq %gs:pda_kernelstack, %rsp addq $(PDA_STACKOFFSET),%rsp - /* - * No need to follow this irqs on/off section: the syscall - * disabled irqs, here we enable it straight after entry: - */ sti movl %ebp,%ebp /* zero extension */ pushq $__USER32_DS @@ -103,7 +98,7 @@ ENTRY(ia32_sysenter_target) pushq %rax CFI_ADJUST_CFA_OFFSET 8 cld - SAVE_ARGS 0,0,0 + SAVE_ARGS 0,0,1 /* no need to do an access_ok check here because rbp has been 32bit zero extended */ 1: movl (%rbp),%r9d @@ -123,7 +118,6 @@ sysenter_do_call: movq %rax,RAX-ARGOFFSET(%rsp) GET_THREAD_INFO(%r10) cli - TRACE_IRQS_OFF testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10) jnz int_ret_from_sys_call andl $~TS_COMPAT,threadinfo_status(%r10) @@ -138,7 +132,6 @@ sysenter_do_call: CFI_REGISTER rsp,rcx movl $VSYSCALL32_SYSEXIT,%edx /* User %eip */ CFI_REGISTER rip,rdx - TRACE_IRQS_ON swapgs sti /* sti only takes effect after the next instruction */ /* sysexit */ @@ -162,7 +155,6 @@ sysenter_tracesys: .previous jmp sysenter_do_call CFI_ENDPROC -ENDPROC(ia32_sysenter_target) /* * 32bit SYSCALL instruction entry. @@ -186,17 +178,13 @@ ENDPROC(ia32_sysenter_target) */ ENTRY(ia32_cstar_target) CFI_STARTPROC32 simple - CFI_DEF_CFA rsp,PDA_STACKOFFSET + CFI_DEF_CFA rsp,0 CFI_REGISTER rip,rcx /*CFI_REGISTER rflags,r11*/ swapgs movl %esp,%r8d CFI_REGISTER rsp,r8 movq %gs:pda_kernelstack,%rsp - /* - * No need to follow this irqs on/off section: the syscall - * disabled irqs and here we enable it straight after entry: - */ sti SAVE_ARGS 8,1,1 movl %eax,%eax /* zero extension */ @@ -231,7 +219,6 @@ cstar_do_call: movq %rax,RAX-ARGOFFSET(%rsp) GET_THREAD_INFO(%r10) cli - TRACE_IRQS_OFF testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10) jnz int_ret_from_sys_call andl $~TS_COMPAT,threadinfo_status(%r10) @@ -240,7 +227,6 @@ cstar_do_call: CFI_REGISTER rip,rcx movl EFLAGS-ARGOFFSET(%rsp),%r11d /*CFI_REGISTER rflags,r11*/ - TRACE_IRQS_ON movl RSP-ARGOFFSET(%rsp),%esp CFI_RESTORE rsp swapgs @@ -263,7 +249,6 @@ cstar_tracesys: .quad 1b,ia32_badarg .previous jmp cstar_do_call -END(ia32_cstar_target) ia32_badarg: movq $-EFAULT,%rax @@ -299,11 +284,7 @@ ENTRY(ia32_syscall) /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/ /*CFI_REL_OFFSET cs,CS-RIP*/ CFI_REL_OFFSET rip,RIP-RIP - swapgs - /* - * No need to follow this irqs on/off section: the syscall - * disabled irqs and here we enable it straight after entry: - */ + swapgs sti movl %eax,%eax pushq %rax @@ -333,13 +314,16 @@ ia32_tracesys: LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ RESTORE_REST jmp ia32_do_syscall -END(ia32_syscall) ia32_badsys: movq $0,ORIG_RAX-ARGOFFSET(%rsp) movq $-ENOSYS,RAX-ARGOFFSET(%rsp) jmp int_ret_from_sys_call +ni_syscall: + movq %rax,%rdi + jmp sys32_ni_syscall + quiet_ni_syscall: movq $-ENOSYS,%rax ret @@ -386,10 +370,10 @@ ENTRY(ia32_ptregs_common) RESTORE_REST jmp ia32_sysret /* misbalances the return cache */ CFI_ENDPROC -END(ia32_ptregs_common) .section .rodata,"a" .align 8 + .globl ia32_sys_call_table ia32_sys_call_table: .quad sys_restart_syscall .quad sys_exit @@ -711,8 +695,8 @@ ia32_sys_call_table: .quad sys_readlinkat /* 305 */ .quad sys_fchmodat .quad sys_faccessat - .quad compat_sys_pselect6 - .quad compat_sys_ppoll + .quad quiet_ni_syscall /* pselect6 for now */ + .quad quiet_ni_syscall /* ppoll for now */ .quad sys_unshare /* 310 */ .quad compat_sys_set_robust_list .quad compat_sys_get_robust_list @@ -720,5 +704,4 @@ ia32_sys_call_table: .quad sys_sync_file_range .quad sys_tee .quad compat_sys_vmsplice - .quad compat_sys_move_pages ia32_syscall_end: diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c index 659c0722f..23a4515a7 100644 --- a/arch/x86_64/ia32/ptrace32.c +++ b/arch/x86_64/ia32/ptrace32.c @@ -7,6 +7,8 @@ * * This allows to access 64bit processes too; but there is no way to see the extended * register contents. + * + * $Id: ptrace32.c,v 1.16 2003/03/14 16:06:35 ak Exp $ */ #include @@ -25,7 +27,6 @@ #include #include #include -#include /* * Determines which flags the user has access to [1 = access, 0 = no access]. @@ -198,31 +199,6 @@ static int getreg32(struct task_struct *child, unsigned regno, u32 *val) #undef R32 -static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data) -{ - int ret; - compat_siginfo_t *si32 = (compat_siginfo_t *)compat_ptr(data); - siginfo_t ssi; - siginfo_t *si = compat_alloc_user_space(sizeof(siginfo_t)); - if (request == PTRACE_SETSIGINFO) { - memset(&ssi, 0, sizeof(siginfo_t)); - ret = copy_siginfo_from_user32(&ssi, si32); - if (ret) - return ret; - if (copy_to_user(si, &ssi, sizeof(siginfo_t))) - return -EFAULT; - } - ret = sys_ptrace(request, pid, addr, (unsigned long)si); - if (ret) - return ret; - if (request == PTRACE_GETSIGINFO) { - if (copy_from_user(&ssi, si, sizeof(siginfo_t))) - return -EFAULT; - ret = copy_siginfo_to_user32(si32, &ssi); - } - return ret; -} - asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) { struct task_struct *child; @@ -232,18 +208,8 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) __u32 val; switch (request) { - case PTRACE_TRACEME: - case PTRACE_ATTACH: - case PTRACE_KILL: - case PTRACE_CONT: - case PTRACE_SINGLESTEP: - case PTRACE_DETACH: - case PTRACE_SYSCALL: - case PTRACE_SETOPTIONS: - return sys_ptrace(request, pid, addr, data); - default: - return -EINVAL; + return sys_ptrace(request, pid, addr, data); case PTRACE_PEEKTEXT: case PTRACE_PEEKDATA: @@ -259,11 +225,10 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) case PTRACE_GETFPXREGS: case PTRACE_GETEVENTMSG: break; + } - case PTRACE_SETSIGINFO: - case PTRACE_GETSIGINFO: - return ptrace32_siginfo(request, pid, addr, data); - } + if (request == PTRACE_TRACEME) + return ptrace_traceme(); child = ptrace_get_task_struct(pid); if (IS_ERR(child)) @@ -384,7 +349,8 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) break; default: - BUG(); + ret = -EINVAL; + break; } out: diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 49bfe957c..0a8fb7d4f 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -20,6 +20,7 @@ * This should be fixed. */ +#include #include #include #include @@ -76,8 +77,6 @@ int cp_compat_stat(struct kstat *kbuf, struct compat_stat __user *ubuf) { - compat_ino_t ino; - typeof(ubuf->st_uid) uid = 0; typeof(ubuf->st_gid) gid = 0; SET_UID(uid, kbuf->uid); @@ -86,12 +85,9 @@ int cp_compat_stat(struct kstat *kbuf, struct compat_stat __user *ubuf) return -EOVERFLOW; if (kbuf->size >= 0x7fffffff) return -EOVERFLOW; - ino = kbuf->ino; - if (sizeof(ino) < sizeof(kbuf->ino) && ino != kbuf->ino) - return -EOVERFLOW; if (!access_ok(VERIFY_WRITE, ubuf, sizeof(struct compat_stat)) || __put_user (old_encode_dev(kbuf->dev), &ubuf->st_dev) || - __put_user (ino, &ubuf->st_ino) || + __put_user (kbuf->ino, &ubuf->st_ino) || __put_user (kbuf->mode, &ubuf->st_mode) || __put_user (kbuf->nlink, &ubuf->st_nlink) || __put_user (uid, &ubuf->st_uid) || @@ -513,6 +509,11 @@ sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options) return compat_sys_wait4(pid, stat_addr, options, NULL); } +int sys32_ni_syscall(int call) +{ + return -ENOSYS; +} + /* 32-bit timeval and related flotsam. */ asmlinkage long @@ -910,7 +911,7 @@ long sys32_vm86_warning(void) struct task_struct *me = current; static char lastcomm[sizeof(me->comm)]; if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) { - compat_printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n", + printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n", me->comm); strncpy(lastcomm, me->comm, sizeof(lastcomm)); } @@ -923,3 +924,12 @@ long sys32_lookup_dcookie(u32 addr_low, u32 addr_high, return sys_lookup_dcookie(((u64)addr_high << 32) | addr_low, buf, len); } +static int __init ia32_init (void) +{ + printk("IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $\n"); + return 0; +} + +__initcall(ia32_init); + +extern unsigned long ia32_sys_call_table[]; diff --git a/arch/x86_64/ia32/vsyscall.lds b/arch/x86_64/ia32/vsyscall.lds index 1dc86ff5b..f2e75ed4c 100644 --- a/arch/x86_64/ia32/vsyscall.lds +++ b/arch/x86_64/ia32/vsyscall.lds @@ -11,7 +11,6 @@ SECTIONS . = VSYSCALL_BASE + SIZEOF_HEADERS; .hash : { *(.hash) } :text - .gnu.hash : { *(.gnu.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } .gnu.version : { *(.gnu.version) } diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index b175c6c3c..b0913f3ef 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile @@ -8,9 +8,8 @@ obj-y := process.o signal.o entry.o traps.o irq.o \ ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \ x8664_ksyms.o i387.o syscall.o vsyscall.o \ setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \ - pci-dma.o pci-nommu.o alternative.o + pci-dma.o pci-nommu.o -obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-$(CONFIG_X86_MCE) += mce.o obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o @@ -31,14 +30,11 @@ obj-$(CONFIG_ACPI_SLEEP) += suspend.o obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o -obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary.o tce.o +obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o obj-$(CONFIG_KPROBES) += kprobes.o obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o obj-$(CONFIG_X86_VSMP) += vsmp.o -obj-$(CONFIG_K8_NB) += k8.o -obj-$(CONFIG_AUDIT) += audit.o obj-$(CONFIG_MODULES) += module.o @@ -55,10 +51,8 @@ intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o quirks-y += ../../i386/kernel/quirks.o i8237-y += ../../i386/kernel/i8237.o msr-$(subst m,y,$(CONFIG_X86_MSR)) += ../../i386/kernel/msr.o -alternative-y += ../../i386/kernel/alternative.o ifdef CONFIG_XEN -obj-y += irqflags.o time-y += ../../i386/kernel/time-xen.o pci-dma-y += ../../i386/kernel/pci-dma-xen.o microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o diff --git a/arch/x86_64/kernel/acpi/Makefile b/arch/x86_64/kernel/acpi/Makefile index 57b7fe1c1..aa84f6eb9 100644 --- a/arch/x86_64/kernel/acpi/Makefile +++ b/arch/x86_64/kernel/acpi/Makefile @@ -4,7 +4,6 @@ obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o ifneq ($(CONFIG_ACPI_PROCESSOR),) obj-y += processor.o -processor-y := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o endif boot-$(CONFIG_XEN) := ../../../i386/kernel/acpi/boot-xen.o diff --git a/arch/x86_64/kernel/acpi/processor.c b/arch/x86_64/kernel/acpi/processor.c new file mode 100644 index 000000000..3bdc2baa5 --- /dev/null +++ b/arch/x86_64/kernel/acpi/processor.c @@ -0,0 +1,72 @@ +/* + * arch/x86_64/kernel/acpi/processor.c + * + * Copyright (C) 2005 Intel Corporation + * Venkatesh Pallipadi + * - Added _PDC for platforms with Intel CPUs + */ + +#include +#include +#include +#include + +#include +#include + +static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) +{ + struct acpi_object_list *obj_list; + union acpi_object *obj; + u32 *buf; + + /* allocate and initialize pdc. It will be used later. */ + obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); + if (!obj_list) { + printk(KERN_ERR "Memory allocation error\n"); + return; + } + + obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); + if (!obj) { + printk(KERN_ERR "Memory allocation error\n"); + kfree(obj_list); + return; + } + + buf = kmalloc(12, GFP_KERNEL); + if (!buf) { + printk(KERN_ERR "Memory allocation error\n"); + kfree(obj); + kfree(obj_list); + return; + } + + buf[0] = ACPI_PDC_REVISION_ID; + buf[1] = 1; + buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; + + obj->type = ACPI_TYPE_BUFFER; + obj->buffer.length = 12; + obj->buffer.pointer = (u8 *) buf; + obj_list->count = 1; + obj_list->pointer = obj; + pr->pdc = obj_list; + + return; +} + +/* Initialize _PDC data based on the CPU vendor */ +void arch_acpi_processor_init_pdc(struct acpi_processor *pr) +{ + unsigned int cpu = pr->id; + struct cpuinfo_x86 *c = cpu_data + cpu; + + pr->pdc = NULL; + if (c->x86_vendor == X86_VENDOR_INTEL && cpu_has(c, X86_FEATURE_EST)) + init_intel_pdc(pr, c); + + return; +} + +EXPORT_SYMBOL(arch_acpi_processor_init_pdc); diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c index 5ebf62c7a..867a0ebee 100644 --- a/arch/x86_64/kernel/acpi/sleep.c +++ b/arch/x86_64/kernel/acpi/sleep.c @@ -26,6 +26,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include #include #include #include @@ -34,8 +35,6 @@ #include #include #include -#include - #include #include #include @@ -67,8 +66,7 @@ static void init_low_mapping(void) pgd_t *slot0 = pgd_offset(current->mm, 0UL); low_ptr = *slot0; set_pgd(slot0, *pgd_offset(current->mm, PAGE_OFFSET)); - WARN_ON(num_online_cpus() != 1); - local_flush_tlb(); + flush_tlb_all(); } /** @@ -94,7 +92,7 @@ int acpi_save_state_mem(void) void acpi_restore_state_mem(void) { set_pgd(pgd_offset(current->mm, 0UL), low_ptr); - local_flush_tlb(); + flush_tlb_all(); } /** diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index 58af8e737..70b9d21ed 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c @@ -8,7 +8,9 @@ * because only the bootmem allocator can allocate 32+MB. * * Copyright 2002 Andi Kleen, SuSE Labs. + * $Id: aperture.c,v 1.7 2003/08/01 03:36:18 ak Exp $ */ +#include #include #include #include @@ -22,7 +24,6 @@ #include #include #include -#include int iommu_aperture; int iommu_aperture_disabled __initdata = 0; @@ -36,6 +37,8 @@ int fix_aperture __initdata = 1; /* This code runs before the PCI subsystem is initialized, so just access the northbridge directly. */ +#define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16)) + static u32 __init allocate_aperture(void) { pg_data_t *nd0 = NODE_DATA(0); @@ -65,20 +68,20 @@ static u32 __init allocate_aperture(void) return (u32)__pa(p); } -static int __init aperture_valid(u64 aper_base, u32 aper_size) +static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size) { if (!aper_base) return 0; if (aper_size < 64*1024*1024) { - printk("Aperture too small (%d MB)\n", aper_size>>20); + printk("Aperture from %s too small (%d MB)\n", name, aper_size>>20); return 0; } if (aper_base + aper_size >= 0xffffffff) { - printk("Aperture beyond 4GB. Ignoring.\n"); + printk("Aperture from %s beyond 4GB. Ignoring.\n",name); return 0; } if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { - printk("Aperture pointing to e820 RAM. Ignoring.\n"); + printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); return 0; } return 1; @@ -137,7 +140,7 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order) printk("Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", aper, 32 << *order, apsizereg); - if (!aperture_valid(aper, (32*1024*1024) << *order)) + if (!aperture_valid("AGP bridge", aper, (32*1024*1024) << *order)) return 0; return (u32)aper; } @@ -205,10 +208,10 @@ void __init iommu_hole_init(void) fix = 0; for (num = 24; num < 32; num++) { - if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) - continue; + char name[30]; + if (read_pci_config(0, num, 3, 0x00) != NB_ID_3) + continue; - iommu_detected = 1; iommu_aperture = 1; aper_order = (read_pci_config(0, num, 3, 0x90) >> 1) & 7; @@ -219,7 +222,9 @@ void __init iommu_hole_init(void) printk("CPU %d: aperture @ %Lx size %u MB\n", num-24, aper_base, aper_size>>20); - if (!aperture_valid(aper_base, aper_size)) { + sprintf(name, "northbridge cpu %d", num-24); + + if (!aperture_valid(name, aper_base, aper_size)) { fix = 1; break; } @@ -268,7 +273,7 @@ void __init iommu_hole_init(void) /* Fix up the north bridges */ for (num = 24; num < 32; num++) { - if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) + if (read_pci_config(0, num, 3, 0x00) != NB_ID_3) continue; /* Don't enable translation yet. That is done later. diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c index 36e2e4b31..357c8fd2f 100644 --- a/arch/x86_64/kernel/apic.c +++ b/arch/x86_64/kernel/apic.c @@ -14,6 +14,7 @@ * Mikael Pettersson : PM converted to driver model. */ +#include #include #include @@ -50,7 +51,7 @@ int disable_apic_timer __initdata; static cpumask_t timer_interrupt_broadcast_ipi_mask; /* Using APIC to generate smp_local_timer_interrupt? */ -int using_apic_timer __read_mostly = 0; +int using_apic_timer = 0; static void apic_pm_activate(void); @@ -99,7 +100,7 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); /* - * Masking an LVT entry can trigger a local APIC error + * Masking an LVT entry on a P6 can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. */ if (maxlvt >= 3) { @@ -850,18 +851,7 @@ void disable_APIC_timer(void) unsigned long v; v = apic_read(APIC_LVTT); - /* - * When an illegal vector value (0-15) is written to an LVT - * entry and delivery mode is Fixed, the APIC may signal an - * illegal vector error, with out regard to whether the mask - * bit is set or whether an interrupt is actually seen on input. - * - * Boot sequence might call this function when the LVTT has - * '0' vector value. So make sure vector field is set to - * valid value. - */ - v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); - apic_write(APIC_LVTT, v); + apic_write(APIC_LVTT, v | APIC_LVT_MASKED); } } @@ -919,13 +909,15 @@ int setup_profiling_timer(unsigned int multiplier) return -EINVAL; } -void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector, - unsigned char msg_type, unsigned char mask) +#ifdef CONFIG_X86_MCE_AMD +void setup_threshold_lvt(unsigned long lvt_off) { - unsigned long reg = (lvt_off << 4) + K8_APIC_EXT_LVT_BASE; - unsigned int v = (mask << 16) | (msg_type << 8) | vector; + unsigned int v = 0; + unsigned long reg = (lvt_off << 4) + 0x500; + v |= THRESHOLD_APIC_VECTOR; apic_write(reg, v); } +#endif /* CONFIG_X86_MCE_AMD */ #undef APIC_DIVISOR @@ -991,7 +983,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs) } /* - * apic_is_clustered_box() -- Check if we can expect good TSC + * oem_force_hpet_timer -- force HPET mode for some boxes. * * Thus far, the major user of this is IBM's Summit2 series: * @@ -999,7 +991,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs) * multi-chassis. Use available data to take a good guess. * If in doubt, go HPET. */ -__cpuinit int apic_is_clustered_box(void) +__cpuinit int oem_force_hpet_timer(void) { int i, clusters, zeros; unsigned id; @@ -1030,7 +1022,8 @@ __cpuinit int apic_is_clustered_box(void) } /* - * If clusters > 2, then should be multi-chassis. + * If clusters > 2, then should be multi-chassis. Return 1 for HPET. + * Else return 0 to use TSC. * May have to revisit this when multi-core + hyperthreaded CPUs come * out, but AFAIK this will work even for them. */ diff --git a/arch/x86_64/kernel/asm-offsets.c b/arch/x86_64/kernel/asm-offsets.c index 85f73c1f0..06cf05867 100644 --- a/arch/x86_64/kernel/asm-offsets.c +++ b/arch/x86_64/kernel/asm-offsets.c @@ -4,7 +4,6 @@ * and format the required data. */ -#include #include #include #include @@ -71,7 +70,5 @@ int main(void) BLANK(); DEFINE(TSS_ist, offsetof(struct tss_struct, ist)); #endif - BLANK(); - DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx)); return 0; } diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c deleted file mode 100644 index 21f33387b..000000000 --- a/arch/x86_64/kernel/audit.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ -#ifdef CONFIG_IA32_EMULATION - extern int ia32_classify_syscall(unsigned); - if (abi == AUDIT_ARCH_I386) - return ia32_classify_syscall(syscall); -#endif - switch(syscall) { - case __NR_open: - return 2; - case __NR_openat: - return 3; - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ -#ifdef CONFIG_IA32_EMULATION - extern __u32 ia32_dir_class[]; - extern __u32 ia32_write_class[]; - extern __u32 ia32_read_class[]; - extern __u32 ia32_chattr_class[]; - audit_register_class(AUDIT_CLASS_WRITE_32, ia32_write_class); - audit_register_class(AUDIT_CLASS_READ_32, ia32_read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); - audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); -#endif - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/arch/x86_64/kernel/crash.c b/arch/x86_64/kernel/crash.c index d8d5750d6..4e6c3b729 100644 --- a/arch/x86_64/kernel/crash.c +++ b/arch/x86_64/kernel/crash.c @@ -111,14 +111,14 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) atomic_dec(&waiting_for_crash_ipi); /* Assume hlt works */ for(;;) - halt(); + asm("hlt"); return 1; } static void smp_send_nmi_allbutself(void) { - send_IPI_allbutself(NMI_VECTOR); + send_IPI_allbutself(APIC_DM_NMI); } /* @@ -161,7 +161,7 @@ void machine_crash_shutdown(struct pt_regs *regs) { /* * This function is only called after the system - * has panicked or is otherwise in a critical state. + * has paniced or is otherwise in a critical state. * The minimum amount of code to allow a kexec'd kernel * to run successfully needs to happen here. * diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 708a3cd9a..1ef6028f7 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c @@ -1,6 +1,7 @@ /* * Handle the memory map. * The functions here do the job until bootmem takes over. + * $Id: e820.c,v 1.4 2002/09/19 19:25:32 ak Exp $ * * Getting sanitize_e820_map() in sync with i386 version by applying change: * - Provisions for empty E820 memory regions (reported by certain BIOSes). @@ -8,6 +9,7 @@ * Venkatesh Pallipadi * */ +#include #include #include #include @@ -16,9 +18,7 @@ #include #include #include -#include -#include #include #include #include @@ -72,11 +72,7 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) #endif /* kernel code + 640k memory hole (later should not be needed, but be paranoid for now) */ - if (last >= 640*1024 && addr < 1024*1024) { - *addrp = 1024*1024; - return 1; - } - if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) { + if (last >= 640*1024 && addr < __pa_symbol(&_end)) { *addrp = __pa_symbol(&_end); return 1; } @@ -298,53 +294,6 @@ void __init e820_reserve_resources(void) } } -/* Mark pages corresponding to given address range as nosave */ -static void __init -e820_mark_nosave_range(unsigned long start, unsigned long end) -{ - unsigned long pfn, max_pfn; - - if (start >= end) - return; - - printk("Nosave address range: %016lx - %016lx\n", start, end); - max_pfn = end >> PAGE_SHIFT; - for (pfn = start >> PAGE_SHIFT; pfn < max_pfn; pfn++) - if (pfn_valid(pfn)) - SetPageNosave(pfn_to_page(pfn)); -} - -/* - * Find the ranges of physical addresses that do not correspond to - * e820 RAM areas and mark the corresponding pages as nosave for software - * suspend and suspend to RAM. - * - * This function requires the e820 map to be sorted and without any - * overlapping entries and assumes the first e820 area to be RAM. - */ -void __init e820_mark_nosave_regions(void) -{ - int i; - unsigned long paddr; - - paddr = round_down(e820.map[0].addr + e820.map[0].size, PAGE_SIZE); - for (i = 1; i < e820.nr_map; i++) { - struct e820entry *ei = &e820.map[i]; - - if (paddr < ei->addr) - e820_mark_nosave_range(paddr, - round_up(ei->addr, PAGE_SIZE)); - - paddr = round_down(ei->addr + ei->size, PAGE_SIZE); - if (ei->type != E820_RAM) - e820_mark_nosave_range(round_up(ei->addr, PAGE_SIZE), - paddr); - - if (paddr >= (end_pfn << PAGE_SHIFT)) - break; - } -} - /* * Add a memory region to the kernel e820 map. */ @@ -672,7 +621,6 @@ void __init parse_memmapopt(char *p, char **from) } unsigned long pci_mem_start = 0xaeedbabe; -EXPORT_SYMBOL(pci_mem_start); /* * Search for the biggest gap in the low 32 bits of the e820 diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 140051e07..b93ef5b51 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 5dce978cb..4c599eea1 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -28,6 +28,7 @@ */ #define ASSEMBLY 1 +#include #include #include #include @@ -41,24 +42,13 @@ #include #include #include -#include .code64 #ifndef CONFIG_PREEMPT #define retint_kernel retint_restore_args #endif - - -.macro TRACE_IRQS_IRETQ offset=ARGOFFSET -#ifdef CONFIG_TRACE_IRQFLAGS - bt $9,EFLAGS-\offset(%rsp) /* interrupts off? */ - jnc 1f - TRACE_IRQS_ON -1: -#endif -.endm - + /* * C code is not supposed to know about undefined top of stack. Every time * a C function with an pt_regs argument is called from the SYSCALL based @@ -164,7 +154,6 @@ rff_trace: GET_THREAD_INFO(%rcx) jmp rff_action CFI_ENDPROC -END(ret_from_fork) /* * System call entry. Upto 6 arguments in registers are supported. @@ -199,16 +188,12 @@ END(ret_from_fork) ENTRY(system_call) CFI_STARTPROC simple - CFI_DEF_CFA rsp,PDA_STACKOFFSET + CFI_DEF_CFA rsp,0 CFI_REGISTER rip,rcx /*CFI_REGISTER rflags,r11*/ swapgs movq %rsp,%gs:pda_oldrsp movq %gs:pda_kernelstack,%rsp - /* - * No need to follow this irqs off/on section - it's straight - * and short: - */ sti SAVE_ARGS 8,1 movq %rax,ORIG_RAX-ARGOFFSET(%rsp) @@ -234,15 +219,10 @@ ret_from_sys_call: sysret_check: GET_THREAD_INFO(%rcx) cli - TRACE_IRQS_OFF movl threadinfo_flags(%rcx),%edx andl %edi,%edx CFI_REMEMBER_STATE jnz sysret_careful - /* - * sysretq will re-enable interrupts: - */ - TRACE_IRQS_ON movq RIP-ARGOFFSET(%rsp),%rcx CFI_REGISTER rip,rcx RESTORE_ARGS 0,-ARG_SKIP,1 @@ -257,7 +237,6 @@ sysret_careful: CFI_RESTORE_STATE bt $TIF_NEED_RESCHED,%edx jnc sysret_signal - TRACE_IRQS_ON sti pushq %rdi CFI_ADJUST_CFA_OFFSET 8 @@ -268,7 +247,6 @@ sysret_careful: /* Handle a signal */ sysret_signal: - TRACE_IRQS_ON sti testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx jz 1f @@ -283,7 +261,6 @@ sysret_signal: /* Use IRET because user could have changed frame. This works because ptregscall_common has called FIXUP_TOP_OF_STACK. */ cli - TRACE_IRQS_OFF jmp int_with_check badsys: @@ -308,7 +285,6 @@ tracesys: /* Use IRET because user could have changed frame */ jmp int_ret_from_sys_call CFI_ENDPROC -END(system_call) /* * Syscall return path ending with IRET. @@ -332,7 +308,6 @@ ENTRY(int_ret_from_sys_call) CFI_REL_OFFSET r10,R10-ARGOFFSET CFI_REL_OFFSET r11,R11-ARGOFFSET cli - TRACE_IRQS_OFF testl $3,CS-ARGOFFSET(%rsp) je retint_restore_args movl $_TIF_ALLWORK_MASK,%edi @@ -351,7 +326,6 @@ int_with_check: int_careful: bt $TIF_NEED_RESCHED,%edx jnc int_very_careful - TRACE_IRQS_ON sti pushq %rdi CFI_ADJUST_CFA_OFFSET 8 @@ -359,12 +333,10 @@ int_careful: popq %rdi CFI_ADJUST_CFA_OFFSET -8 cli - TRACE_IRQS_OFF jmp int_with_check /* handle signals and tracing -- both require a full stack frame */ int_very_careful: - TRACE_IRQS_ON sti SAVE_REST /* Check for syscall exit trace */ @@ -378,7 +350,6 @@ int_very_careful: CFI_ADJUST_CFA_OFFSET -8 andl $~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP),%edi cli - TRACE_IRQS_OFF jmp int_restore_rest int_signal: @@ -391,10 +362,8 @@ int_signal: int_restore_rest: RESTORE_REST cli - TRACE_IRQS_OFF jmp int_with_check CFI_ENDPROC -END(int_ret_from_sys_call) /* * Certain special system calls that need to save a complete full stack frame. @@ -406,7 +375,6 @@ END(int_ret_from_sys_call) leaq \func(%rip),%rax leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */ jmp ptregscall_common -END(\label) .endm CFI_STARTPROC @@ -436,7 +404,6 @@ ENTRY(ptregscall_common) CFI_REL_OFFSET rip, 0 ret CFI_ENDPROC -END(ptregscall_common) ENTRY(stub_execve) CFI_STARTPROC @@ -451,7 +418,6 @@ ENTRY(stub_execve) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC -END(stub_execve) /* * sigreturn is special because it needs to restore all registers on return. @@ -469,7 +435,6 @@ ENTRY(stub_rt_sigreturn) RESTORE_REST jmp int_ret_from_sys_call CFI_ENDPROC -END(stub_rt_sigreturn) /* * initial frame state for interrupts and exceptions @@ -501,23 +466,29 @@ END(stub_rt_sigreturn) /* 0(%rsp): interrupt number */ .macro interrupt func cld - SAVE_ARGS - leaq -ARGOFFSET(%rsp),%rdi # arg1 for handler - pushq %rbp - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET rbp, 0 +#ifdef CONFIG_DEBUG_INFO + SAVE_ALL + movq %rsp,%rdi + /* + * Setup a stack frame pointer. This allows gdb to trace + * back to the original stack. + */ movq %rsp,%rbp CFI_DEF_CFA_REGISTER rbp +#else + SAVE_ARGS + leaq -ARGOFFSET(%rsp),%rdi # arg1 for handler +#endif testl $3,CS(%rdi) je 1f swapgs 1: incl %gs:pda_irqcount # RED-PEN should check preempt count - cmoveq %gs:pda_irqstackptr,%rsp - push %rbp # backlink for old unwinder - /* - * We entered an interrupt context - irqs are off: - */ - TRACE_IRQS_OFF + movq %gs:pda_irqstackptr,%rax + cmoveq %rax,%rsp /*todo This needs CFI annotation! */ + pushq %rdi # save old stack +#ifndef CONFIG_DEBUG_INFO + CFI_ADJUST_CFA_OFFSET 8 +#endif call \func .endm @@ -526,12 +497,17 @@ ENTRY(common_interrupt) interrupt do_IRQ /* 0(%rsp): oldrsp-ARGOFFSET */ ret_from_intr: + popq %rdi +#ifndef CONFIG_DEBUG_INFO + CFI_ADJUST_CFA_OFFSET -8 +#endif cli - TRACE_IRQS_OFF decl %gs:pda_irqcount - leaveq +#ifdef CONFIG_DEBUG_INFO + movq RBP(%rdi),%rbp CFI_DEF_CFA_REGISTER rsp - CFI_ADJUST_CFA_OFFSET -8 +#endif + leaq ARGOFFSET(%rdi),%rsp /*todo This needs CFI annotation! */ exit_intr: GET_THREAD_INFO(%rcx) testl $3,CS-ARGOFFSET(%rsp) @@ -550,21 +526,9 @@ retint_check: CFI_REMEMBER_STATE jnz retint_careful retint_swapgs: - /* - * The iretq could re-enable interrupts: - */ - cli - TRACE_IRQS_IRETQ swapgs - jmp restore_args - retint_restore_args: cli - /* - * The iretq could re-enable interrupts: - */ - TRACE_IRQS_IRETQ -restore_args: RESTORE_ARGS 0,8,0 iret_label: iretq @@ -577,7 +541,6 @@ iret_label: /* running with kernel gs */ bad_iret: movq $11,%rdi /* SIGSEGV */ - TRACE_IRQS_ON sti jmp do_exit .previous @@ -587,7 +550,6 @@ retint_careful: CFI_RESTORE_STATE bt $TIF_NEED_RESCHED,%edx jnc retint_signal - TRACE_IRQS_ON sti pushq %rdi CFI_ADJUST_CFA_OFFSET 8 @@ -596,13 +558,11 @@ retint_careful: CFI_ADJUST_CFA_OFFSET -8 GET_THREAD_INFO(%rcx) cli - TRACE_IRQS_OFF jmp retint_check retint_signal: testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx jz retint_swapgs - TRACE_IRQS_ON sti SAVE_REST movq $-1,ORIG_RAX(%rsp) @@ -611,7 +571,6 @@ retint_signal: call do_notify_resume RESTORE_REST cli - TRACE_IRQS_OFF movl $_TIF_NEED_RESCHED,%edi GET_THREAD_INFO(%rcx) jmp retint_check @@ -630,9 +589,7 @@ retint_kernel: call preempt_schedule_irq jmp exit_intr #endif - CFI_ENDPROC -END(common_interrupt) /* * APIC interrupts. @@ -648,21 +605,17 @@ END(common_interrupt) ENTRY(thermal_interrupt) apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt -END(thermal_interrupt) ENTRY(threshold_interrupt) apicinterrupt THRESHOLD_APIC_VECTOR,mce_threshold_interrupt -END(threshold_interrupt) #ifdef CONFIG_SMP ENTRY(reschedule_interrupt) apicinterrupt RESCHEDULE_VECTOR,smp_reschedule_interrupt -END(reschedule_interrupt) .macro INVALIDATE_ENTRY num ENTRY(invalidate_interrupt\num) apicinterrupt INVALIDATE_TLB_VECTOR_START+\num,smp_invalidate_interrupt -END(invalidate_interrupt\num) .endm INVALIDATE_ENTRY 0 @@ -676,21 +629,17 @@ END(invalidate_interrupt\num) ENTRY(call_function_interrupt) apicinterrupt CALL_FUNCTION_VECTOR,smp_call_function_interrupt -END(call_function_interrupt) #endif #ifdef CONFIG_X86_LOCAL_APIC ENTRY(apic_timer_interrupt) apicinterrupt LOCAL_TIMER_VECTOR,smp_apic_timer_interrupt -END(apic_timer_interrupt) ENTRY(error_interrupt) apicinterrupt ERROR_APIC_VECTOR,smp_error_interrupt -END(error_interrupt) ENTRY(spurious_interrupt) apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt -END(spurious_interrupt) #endif /* @@ -718,7 +667,7 @@ END(spurious_interrupt) /* error code is on the stack already */ /* handle NMI like exceptions that can happen everywhere */ - .macro paranoidentry sym, ist=0, irqtrace=1 + .macro paranoidentry sym, ist=0 SAVE_ALL cld movl $1,%ebx @@ -743,73 +692,8 @@ END(spurious_interrupt) addq $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 8(%rbp) .endif cli - .if \irqtrace - TRACE_IRQS_OFF - .endif .endm - - /* - * "Paranoid" exit path from exception stack. - * Paranoid because this is used by NMIs and cannot take - * any kernel state for granted. - * We don't do kernel preemption checks here, because only - * NMI should be common and it does not enable IRQs and - * cannot get reschedule ticks. - * - * "trace" is 0 for the NMI handler only, because irq-tracing - * is fundamentally NMI-unsafe. (we cannot change the soft and - * hard flags at once, atomically) - */ - .macro paranoidexit trace=1 - /* ebx: no swapgs flag */ -paranoid_exit\trace: - testl %ebx,%ebx /* swapgs needed? */ - jnz paranoid_restore\trace - testl $3,CS(%rsp) - jnz paranoid_userspace\trace -paranoid_swapgs\trace: - TRACE_IRQS_IRETQ 0 - swapgs -paranoid_restore\trace: - RESTORE_ALL 8 - iretq -paranoid_userspace\trace: - GET_THREAD_INFO(%rcx) - movl threadinfo_flags(%rcx),%ebx - andl $_TIF_WORK_MASK,%ebx - jz paranoid_swapgs\trace - movq %rsp,%rdi /* &pt_regs */ - call sync_regs - movq %rax,%rsp /* switch stack for scheduling */ - testl $_TIF_NEED_RESCHED,%ebx - jnz paranoid_schedule\trace - movl %ebx,%edx /* arg3: thread flags */ - .if \trace - TRACE_IRQS_ON - .endif - sti - xorl %esi,%esi /* arg2: oldset */ - movq %rsp,%rdi /* arg1: &pt_regs */ - call do_notify_resume - cli - .if \trace - TRACE_IRQS_OFF - .endif - jmp paranoid_userspace\trace -paranoid_schedule\trace: - .if \trace - TRACE_IRQS_ON - .endif - sti - call schedule - cli - .if \trace - TRACE_IRQS_OFF - .endif - jmp paranoid_userspace\trace - CFI_ENDPROC - .endm - + /* * Exception entry point. This expects an error code/orig_rax on the stack * and the exception handler in %rax. @@ -865,7 +749,6 @@ error_exit: movl %ebx,%eax RESTORE_REST cli - TRACE_IRQS_OFF GET_THREAD_INFO(%rcx) testl %eax,%eax jne retint_kernel @@ -873,10 +756,6 @@ error_exit: movl $_TIF_WORK_MASK,%edi andl %edi,%edx jnz retint_careful - /* - * The iret might restore flags: - */ - TRACE_IRQS_IRETQ swapgs RESTORE_ARGS 0,8,0 jmp iret_label @@ -898,7 +777,6 @@ error_kernelspace: cmpq $gs_change,RIP(%rsp) je error_swapgs jmp error_sti -END(error_entry) /* Reload gs selector with exception handling */ /* edi: new selector */ @@ -916,7 +794,6 @@ gs_change: CFI_ADJUST_CFA_OFFSET -8 ret CFI_ENDPROC -ENDPROC(load_gs_index) .section __ex_table,"a" .align 8 @@ -958,11 +835,6 @@ ENTRY(kernel_thread) call do_fork movq %rax,RAX(%rsp) xorl %edi,%edi - test %rax,%rax - jnz 1f - /* terminate stack in child */ - movq %rdi,RIP(%rsp) -1: /* * It isn't worth to check for reschedule here, @@ -975,11 +847,9 @@ ENTRY(kernel_thread) UNFAKE_STACK_FRAME ret CFI_ENDPROC -ENDPROC(kernel_thread) + child_rip: - pushq $0 # fake return address - CFI_STARTPROC /* * Here we are in the child and the registers are set as they were * at kernel_thread() invocation in the parent. @@ -990,8 +860,6 @@ child_rip: # exit xorl %edi, %edi call do_exit - CFI_ENDPROC -ENDPROC(child_rip) /* * execve(). This function needs to use IRET, not SYSRET, to set up all state properly. @@ -1021,24 +889,19 @@ ENTRY(execve) UNFAKE_STACK_FRAME ret CFI_ENDPROC -ENDPROC(execve) KPROBE_ENTRY(page_fault) errorentry do_page_fault -END(page_fault) .previous .text ENTRY(coprocessor_error) zeroentry do_coprocessor_error -END(coprocessor_error) ENTRY(simd_coprocessor_error) zeroentry do_simd_coprocessor_error -END(simd_coprocessor_error) ENTRY(device_not_available) zeroentry math_state_restore -END(device_not_available) /* runs on exception stack */ KPROBE_ENTRY(debug) @@ -1046,8 +909,8 @@ KPROBE_ENTRY(debug) pushq $0 CFI_ADJUST_CFA_OFFSET 8 paranoidentry do_debug, DEBUG_STACK - paranoidexit -END(debug) + jmp paranoid_exit + CFI_ENDPROC .previous .text /* runs on exception stack */ @@ -1055,14 +918,49 @@ KPROBE_ENTRY(nmi) INTR_FRAME pushq $-1 CFI_ADJUST_CFA_OFFSET 8 - paranoidentry do_nmi, 0, 0 -#ifdef CONFIG_TRACE_IRQFLAGS - paranoidexit 0 -#else - jmp paranoid_exit1 - CFI_ENDPROC -#endif -END(nmi) + paranoidentry do_nmi + /* + * "Paranoid" exit path from exception stack. + * Paranoid because this is used by NMIs and cannot take + * any kernel state for granted. + * We don't do kernel preemption checks here, because only + * NMI should be common and it does not enable IRQs and + * cannot get reschedule ticks. + */ + /* ebx: no swapgs flag */ +paranoid_exit: + testl %ebx,%ebx /* swapgs needed? */ + jnz paranoid_restore + testl $3,CS(%rsp) + jnz paranoid_userspace +paranoid_swapgs: + swapgs +paranoid_restore: + RESTORE_ALL 8 + iretq +paranoid_userspace: + GET_THREAD_INFO(%rcx) + movl threadinfo_flags(%rcx),%ebx + andl $_TIF_WORK_MASK,%ebx + jz paranoid_swapgs + movq %rsp,%rdi /* &pt_regs */ + call sync_regs + movq %rax,%rsp /* switch stack for scheduling */ + testl $_TIF_NEED_RESCHED,%ebx + jnz paranoid_schedule + movl %ebx,%edx /* arg3: thread flags */ + sti + xorl %esi,%esi /* arg2: oldset */ + movq %rsp,%rdi /* arg1: &pt_regs */ + call do_notify_resume + cli + jmp paranoid_userspace +paranoid_schedule: + sti + call schedule + cli + jmp paranoid_userspace + CFI_ENDPROC .previous .text KPROBE_ENTRY(int3) @@ -1070,71 +968,57 @@ KPROBE_ENTRY(int3) pushq $0 CFI_ADJUST_CFA_OFFSET 8 paranoidentry do_int3, DEBUG_STACK - jmp paranoid_exit1 + jmp paranoid_exit CFI_ENDPROC -END(int3) .previous .text ENTRY(overflow) zeroentry do_overflow -END(overflow) ENTRY(bounds) zeroentry do_bounds -END(bounds) ENTRY(invalid_op) zeroentry do_invalid_op -END(invalid_op) ENTRY(coprocessor_segment_overrun) zeroentry do_coprocessor_segment_overrun -END(coprocessor_segment_overrun) ENTRY(reserved) zeroentry do_reserved -END(reserved) /* runs on exception stack */ ENTRY(double_fault) XCPT_FRAME paranoidentry do_double_fault - jmp paranoid_exit1 + jmp paranoid_exit CFI_ENDPROC -END(double_fault) ENTRY(invalid_TSS) errorentry do_invalid_TSS -END(invalid_TSS) ENTRY(segment_not_present) errorentry do_segment_not_present -END(segment_not_present) /* runs on exception stack */ ENTRY(stack_segment) XCPT_FRAME paranoidentry do_stack_segment - jmp paranoid_exit1 + jmp paranoid_exit CFI_ENDPROC -END(stack_segment) KPROBE_ENTRY(general_protection) errorentry do_general_protection -END(general_protection) .previous .text ENTRY(alignment_check) errorentry do_alignment_check -END(alignment_check) ENTRY(divide_error) zeroentry do_divide_error -END(divide_error) ENTRY(spurious_interrupt_bug) zeroentry do_spurious_interrupt_bug -END(spurious_interrupt_bug) #ifdef CONFIG_X86_MCE /* runs on exception stack */ @@ -1143,60 +1027,22 @@ ENTRY(machine_check) pushq $0 CFI_ADJUST_CFA_OFFSET 8 paranoidentry do_machine_check - jmp paranoid_exit1 + jmp paranoid_exit CFI_ENDPROC -END(machine_check) #endif -/* Call softirq on interrupt stack. Interrupts are off. */ ENTRY(call_softirq) CFI_STARTPROC - push %rbp - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET rbp,0 - mov %rsp,%rbp - CFI_DEF_CFA_REGISTER rbp + movq %gs:pda_irqstackptr,%rax + movq %rsp,%rdx + CFI_DEF_CFA_REGISTER rdx incl %gs:pda_irqcount - cmove %gs:pda_irqstackptr,%rsp - push %rbp # backlink for old unwinder + cmove %rax,%rsp + pushq %rdx + /*todo CFI_DEF_CFA_EXPRESSION ...*/ call __do_softirq - leaveq + popq %rsp CFI_DEF_CFA_REGISTER rsp - CFI_ADJUST_CFA_OFFSET -8 decl %gs:pda_irqcount ret CFI_ENDPROC -ENDPROC(call_softirq) - -#ifdef CONFIG_STACK_UNWIND -ENTRY(arch_unwind_init_running) - CFI_STARTPROC - movq %r15, R15(%rdi) - movq %r14, R14(%rdi) - xchgq %rsi, %rdx - movq %r13, R13(%rdi) - movq %r12, R12(%rdi) - xorl %eax, %eax - movq %rbp, RBP(%rdi) - movq %rbx, RBX(%rdi) - movq (%rsp), %rcx - movq %rax, R11(%rdi) - movq %rax, R10(%rdi) - movq %rax, R9(%rdi) - movq %rax, R8(%rdi) - movq %rax, RAX(%rdi) - movq %rax, RCX(%rdi) - movq %rax, RDX(%rdi) - movq %rax, RSI(%rdi) - movq %rax, RDI(%rdi) - movq %rax, ORIG_RAX(%rdi) - movq %rcx, RIP(%rdi) - leaq 8(%rsp), %rcx - movq $__KERNEL_CS, CS(%rdi) - movq %rax, EFLAGS(%rdi) - movq %rcx, RSP(%rdi) - movq $__KERNEL_DS, SS(%rdi) - jmpq *%rdx - CFI_ENDPROC -ENDPROC(arch_unwind_init_running) -#endif diff --git a/arch/x86_64/kernel/functionlist b/arch/x86_64/kernel/functionlist index 01fa23580..2bcebdc3e 100644 --- a/arch/x86_64/kernel/functionlist +++ b/arch/x86_64/kernel/functionlist @@ -384,6 +384,7 @@ *(.text.__end_that_request_first) *(.text.wake_up_bit) *(.text.unuse_mm) +*(.text.skb_release_data) *(.text.shrink_icache_memory) *(.text.sched_balance_self) *(.text.__pmd_alloc) diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c index 8e78a75d1..7a64ea181 100644 --- a/arch/x86_64/kernel/genapic.c +++ b/arch/x86_64/kernel/genapic.c @@ -8,6 +8,7 @@ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and * James Cleverdon. */ +#include #include #include #include diff --git a/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c index 302091754..43fcf62fe 100644 --- a/arch/x86_64/kernel/genapic_cluster.c +++ b/arch/x86_64/kernel/genapic_cluster.c @@ -9,6 +9,7 @@ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and * James Cleverdon. */ +#include #include #include #include diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c index eb86d3748..1a2ab825b 100644 --- a/arch/x86_64/kernel/genapic_flat.c +++ b/arch/x86_64/kernel/genapic_flat.c @@ -8,6 +8,7 @@ * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and * James Cleverdon. */ +#include #include #include #include @@ -77,29 +78,22 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector) static void flat_send_IPI_allbutself(int vector) { -#ifdef CONFIG_HOTPLUG_CPU - int hotplug = 1; +#ifndef CONFIG_HOTPLUG_CPU + if (((num_online_cpus()) - 1) >= 1) + __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); #else - int hotplug = 0; -#endif - if (hotplug || vector == NMI_VECTOR) { - cpumask_t allbutme = cpu_online_map; + cpumask_t allbutme = cpu_online_map; - cpu_clear(smp_processor_id(), allbutme); + cpu_clear(smp_processor_id(), allbutme); - if (!cpus_empty(allbutme)) - flat_send_IPI_mask(allbutme, vector); - } else if (num_online_cpus() > 1) { - __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); - } + if (!cpus_empty(allbutme)) + flat_send_IPI_mask(allbutme, vector); +#endif } static void flat_send_IPI_all(int vector) { - if (vector == NMI_VECTOR) - flat_send_IPI_mask(cpu_online_map, vector); - else - __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); + __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); } static int flat_apic_id_registered(void) @@ -114,7 +108,10 @@ static unsigned int flat_cpu_mask_to_apicid(cpumask_t cpumask) static unsigned int phys_pkg_id(int index_msb) { - return hard_smp_processor_id() >> index_msb; + u32 ebx; + + ebx = cpuid_ebx(1); + return ((ebx >> 24) & 0xFF) >> index_msb; } struct genapic apic_flat = { diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index c9739ca81..6df05e603 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S @@ -191,7 +191,6 @@ startup_64: * jump */ movq initial_code(%rip),%rax - pushq $0 # fake return address jmp *%rax /* SMP bootup changes these two */ diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index 36647ce6a..cea20a66c 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c @@ -2,6 +2,8 @@ * linux/arch/x86_64/kernel/head64.c -- prepare to run common code * * Copyright (C) 2000 Andrea Arcangeli SuSE + * + * $Id: head64.c,v 1.22 2001/07/06 14:28:20 ak Exp $ */ #include @@ -84,11 +86,6 @@ void __init x86_64_start_kernel(char * real_mode_data) asm volatile("lidt %0" :: "m" (idt_descr)); clear_bss(); - /* - * This must be called really, really early: - */ - lockdep_init(); - /* * switch to init_level4_pgt from boot_level4_pgt */ diff --git a/arch/x86_64/kernel/i387.c b/arch/x86_64/kernel/i387.c index 3aa1e9bb7..a5d7e16b9 100644 --- a/arch/x86_64/kernel/i387.c +++ b/arch/x86_64/kernel/i387.c @@ -14,6 +14,7 @@ * the 64bit user space sees a FXSAVE frame directly. */ +#include #include #include #include @@ -23,7 +24,7 @@ #include #include -unsigned int mxcsr_feature_mask __read_mostly = 0xffffffff; +unsigned int mxcsr_feature_mask = 0xffffffff; void mxcsr_feature_mask_init(void) { diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c index 0434b1f8e..5ecd34ab8 100644 --- a/arch/x86_64/kernel/i8259.c +++ b/arch/x86_64/kernel/i8259.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -43,11 +44,11 @@ BI(x,8) BI(x,9) BI(x,a) BI(x,b) \ BI(x,c) BI(x,d) BI(x,e) BI(x,f) -#define BUILD_15_IRQS(x) \ +#define BUILD_14_IRQS(x) \ BI(x,0) BI(x,1) BI(x,2) BI(x,3) \ BI(x,4) BI(x,5) BI(x,6) BI(x,7) \ BI(x,8) BI(x,9) BI(x,a) BI(x,b) \ - BI(x,c) BI(x,d) BI(x,e) + BI(x,c) BI(x,d) /* * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts: @@ -72,13 +73,13 @@ BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb) BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) #ifdef CONFIG_PCI_MSI - BUILD_15_IRQS(0xe) + BUILD_14_IRQS(0xe) #endif #endif #undef BUILD_16_IRQS -#undef BUILD_15_IRQS +#undef BUILD_14_IRQS #undef BI @@ -91,11 +92,11 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \ IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f) -#define IRQLIST_15(x) \ +#define IRQLIST_14(x) \ IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \ IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \ IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \ - IRQ(x,c), IRQ(x,d), IRQ(x,e) + IRQ(x,c), IRQ(x,d) void (*interrupt[NR_IRQS])(void) = { IRQLIST_16(0x0), @@ -107,7 +108,7 @@ void (*interrupt[NR_IRQS])(void) = { IRQLIST_16(0xc), IRQLIST_16(0xd) #ifdef CONFIG_PCI_MSI - , IRQLIST_15(0xe) + , IRQLIST_14(0xe) #endif #endif @@ -234,7 +235,7 @@ void make_8259A_irq(unsigned int irq) { disable_irq_nosync(irq); io_apic_irqs &= ~(1< #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include #define __apicdebuginit __init @@ -56,7 +56,6 @@ int timer_over_8254 __initdata = 0; static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; static DEFINE_SPINLOCK(ioapic_lock); -static DEFINE_SPINLOCK(vector_lock); /* * # of IRQ routing registers @@ -318,7 +317,7 @@ void __init check_ioapic(void) vendor &= 0xffff; switch (vendor) { case PCI_VENDOR_ID_VIA: -#ifdef CONFIG_IOMMU +#ifdef CONFIG_GART_IOMMU if ((end_pfn > MAX_DMA32_PFN || force_iommu) && !iommu_aperture_allowed) { @@ -835,17 +834,10 @@ u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }; int assign_irq_vector(int irq) { static int current_vector = FIRST_DEVICE_VECTOR, offset = 0; - unsigned long flags; - int vector; BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS); - - spin_lock_irqsave(&vector_lock, flags); - - if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) { - spin_unlock_irqrestore(&vector_lock, flags); + if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) return IO_APIC_VECTOR(irq); - } next: current_vector += 8; if (current_vector == IA32_SYSCALL_VECTOR) @@ -857,14 +849,11 @@ next: current_vector = FIRST_DEVICE_VECTOR + offset; } - vector = current_vector; - vector_irq[vector] = irq; + vector_irq[current_vector] = irq; if (irq != AUTO_ASSIGN) - IO_APIC_VECTOR(irq) = vector; + IO_APIC_VECTOR(irq) = current_vector; - spin_unlock_irqrestore(&vector_lock, flags); - - return vector; + return current_vector; } extern void (*interrupt[NR_IRQS])(void); @@ -875,18 +864,23 @@ static struct hw_interrupt_type ioapic_edge_type; #define IOAPIC_EDGE 0 #define IOAPIC_LEVEL 1 -static void ioapic_register_intr(int irq, int vector, unsigned long trigger) +static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger) { - unsigned idx; - - idx = use_pci_vector() && !platform_legacy_irq(irq) ? vector : irq; - - if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || - trigger == IOAPIC_LEVEL) - irq_desc[idx].chip = &ioapic_level_type; - else - irq_desc[idx].chip = &ioapic_edge_type; - set_intr_gate(vector, interrupt[idx]); + 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]); + } } static void __init setup_IO_APIC_irqs(void) @@ -987,7 +981,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in * The timer IRQ doesn't have to know that behind the * scene we have a 8259A-master in AEOI mode ... */ - irq_desc[0].chip = &ioapic_edge_type; + irq_desc[0].handler = &ioapic_edge_type; /* * Add it to the IO-APIC irq-routing table: @@ -1617,13 +1611,6 @@ static void set_ioapic_affinity_vector (unsigned int vector, #endif // CONFIG_SMP #endif // CONFIG_PCI_MSI -static int ioapic_retrigger(unsigned int irq) -{ - send_IPI_self(IO_APIC_VECTOR(irq)); - - return 1; -} - /* * Level and edge triggered IO-APIC interrupts need different handling, * so we use two separate IRQ descriptors. Edge triggered IRQs can be @@ -1644,7 +1631,6 @@ static struct hw_interrupt_type ioapic_edge_type __read_mostly = { #ifdef CONFIG_SMP .set_affinity = set_ioapic_affinity, #endif - .retrigger = ioapic_retrigger, }; static struct hw_interrupt_type ioapic_level_type __read_mostly = { @@ -1658,7 +1644,6 @@ static struct hw_interrupt_type ioapic_level_type __read_mostly = { #ifdef CONFIG_SMP .set_affinity = set_ioapic_affinity, #endif - .retrigger = ioapic_retrigger, }; static inline void init_IO_APIC_traps(void) @@ -1693,7 +1678,7 @@ static inline void init_IO_APIC_traps(void) make_8259A_irq(irq); else /* Strange. Oh, well.. */ - irq_desc[irq].chip = &no_irq_type; + irq_desc[irq].handler = &no_irq_type; } } } @@ -1910,7 +1895,7 @@ static inline void check_timer(void) apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); disable_8259A_irq(0); - irq_desc[0].chip = &lapic_irq_type; + irq_desc[0].handler = &lapic_irq_type; apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ enable_8259A_irq(0); diff --git a/arch/x86_64/kernel/irq-xen.c b/arch/x86_64/kernel/irq-xen.c index 05ddad3c5..3068ce26e 100644 --- a/arch/x86_64/kernel/irq-xen.c +++ b/arch/x86_64/kernel/irq-xen.c @@ -26,30 +26,6 @@ atomic_t irq_mis_count; #endif #endif -#ifdef CONFIG_DEBUG_STACKOVERFLOW -/* - * Probabilistic stack overflow check: - * - * Only check the stack in process context, because everything else - * runs on the big interrupt stacks. Checking reliably is too expensive, - * so we just check from interrupts. - */ -static inline void stack_overflow_check(struct pt_regs *regs) -{ - u64 curbase = (u64) current->thread_info; - static unsigned long warned = -60*HZ; - - if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE && - regs->rsp < curbase + sizeof(struct thread_info) + 128 && - time_after(jiffies, warned + 60*HZ)) { - printk("do_IRQ: %s near stack overflow (cur:%Lx,rsp:%lx)\n", - current->comm, curbase, regs->rsp); - show_stack(NULL,NULL); - warned = jiffies; - } -} -#endif - /* * Generic, controller-independent functions: */ @@ -63,7 +39,7 @@ int show_interrupts(struct seq_file *p, void *v) if (i == 0) { seq_printf(p, " "); for_each_online_cpu(j) - seq_printf(p, "CPU%-8d ",j); + seq_printf(p, "CPU%d ",j); seq_putc(p, '\n'); } @@ -79,7 +55,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -118,18 +94,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs) /* high bit used in ret_from_ code */ unsigned irq = ~regs->orig_rax; - if (unlikely(irq >= NR_IRQS)) { - printk(KERN_EMERG "%s: cannot handle IRQ %d\n", - __FUNCTION__, irq); - BUG(); - } - exit_idle(); irq_enter(); -#ifdef CONFIG_DEBUG_STACKOVERFLOW - stack_overflow_check(regs); -#endif __do_IRQ(irq, regs); irq_exit(); @@ -147,13 +114,13 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_desc[irq].affinity, map); + cpus_and(mask, irq_affinity[irq], map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; } - if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity(irq, mask); + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); else if (irq_desc[irq].action && !(warned++)) printk("Cannot set affinity for irq %i\n", irq); } @@ -178,10 +145,8 @@ asmlinkage void do_softirq(void) local_irq_save(flags); pending = local_softirq_pending(); /* Switch to interrupt stack */ - if (pending) { + if (pending) call_softirq(); - WARN_ON_ONCE(softirq_count()); - } local_irq_restore(flags); } EXPORT_SYMBOL(do_softirq); diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 5221a53e9..c87488532 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c @@ -26,30 +26,6 @@ atomic_t irq_mis_count; #endif #endif -#ifdef CONFIG_DEBUG_STACKOVERFLOW -/* - * Probabilistic stack overflow check: - * - * Only check the stack in process context, because everything else - * runs on the big interrupt stacks. Checking reliably is too expensive, - * so we just check from interrupts. - */ -static inline void stack_overflow_check(struct pt_regs *regs) -{ - u64 curbase = (u64) current->thread_info; - static unsigned long warned = -60*HZ; - - if (regs->rsp >= curbase && regs->rsp <= curbase + THREAD_SIZE && - regs->rsp < curbase + sizeof(struct thread_info) + 128 && - time_after(jiffies, warned + 60*HZ)) { - printk("do_IRQ: %s near stack overflow (cur:%Lx,rsp:%lx)\n", - current->comm, curbase, regs->rsp); - show_stack(NULL,NULL); - warned = jiffies; - } -} -#endif - /* * Generic, controller-independent functions: */ @@ -63,7 +39,7 @@ int show_interrupts(struct seq_file *p, void *v) if (i == 0) { seq_printf(p, " "); for_each_online_cpu(j) - seq_printf(p, "CPU%-8d",j); + seq_printf(p, "CPU%d ",j); seq_putc(p, '\n'); } @@ -79,7 +55,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -118,17 +94,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs) /* high bit used in ret_from_ code */ unsigned irq = ~regs->orig_rax; - if (unlikely(irq >= NR_IRQS)) { - printk(KERN_EMERG "%s: cannot handle IRQ %d\n", - __FUNCTION__, irq); - BUG(); - } - exit_idle(); irq_enter(); -#ifdef CONFIG_DEBUG_STACKOVERFLOW - stack_overflow_check(regs); -#endif + __do_IRQ(irq, regs); irq_exit(); @@ -146,13 +114,13 @@ void fixup_irqs(cpumask_t map) if (irq == 2) continue; - cpus_and(mask, irq_desc[irq].affinity, map); + cpus_and(mask, irq_affinity[irq], map); if (any_online_cpu(mask) == NR_CPUS) { printk("Breaking affinity for irq %i\n", irq); mask = map; } - if (irq_desc[irq].chip->set_affinity) - irq_desc[irq].chip->set_affinity(irq, mask); + if (irq_desc[irq].handler->set_affinity) + irq_desc[irq].handler->set_affinity(irq, mask); else if (irq_desc[irq].action && !(warned++)) printk("Cannot set affinity for irq %i\n", irq); } @@ -177,10 +145,8 @@ asmlinkage void do_softirq(void) local_irq_save(flags); pending = local_softirq_pending(); /* Switch to interrupt stack */ - if (pending) { + if (pending) call_softirq(); - WARN_ON_ONCE(softirq_count()); - } local_irq_restore(flags); } EXPORT_SYMBOL(do_softirq); diff --git a/arch/x86_64/kernel/irqflags-xen.c b/arch/x86_64/kernel/irqflags-xen.c deleted file mode 100644 index e3b7ab5e6..000000000 --- a/arch/x86_64/kernel/irqflags-xen.c +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -#include -#include - -/* - * The use of 'barrier' in the following reflects their use as local-lock - * operations. Reentrancy must be prevented (e.g., __cli()) /before/ following - * critical operations are executed. All critical operations must complete - * /before/ reentrancy is permitted (e.g., __sti()). Alpha architecture also - * includes these barriers, for example. - */ - -unsigned long __raw_local_save_flags(void) -{ - struct vcpu_info *_vcpu; - unsigned long flags; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - flags = _vcpu->evtchn_upcall_mask; - preempt_enable(); - - return flags; -} -EXPORT_SYMBOL(__raw_local_save_flags); - -void raw_local_irq_restore(unsigned long flags) -{ - struct vcpu_info *_vcpu; - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - if ((_vcpu->evtchn_upcall_mask = flags) == 0) { - barrier(); /* unmask then check (avoid races) */ - if ( unlikely(_vcpu->evtchn_upcall_pending) ) - force_evtchn_callback(); - preempt_enable(); - } else - preempt_enable_no_resched(); -} -EXPORT_SYMBOL(raw_local_irq_restore); - -void raw_local_irq_disable(void) -{ - struct vcpu_info *_vcpu; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - _vcpu->evtchn_upcall_mask = 1; - preempt_enable_no_resched(); -} -EXPORT_SYMBOL(raw_local_irq_disable); - -void raw_local_irq_enable(void) -{ - struct vcpu_info *_vcpu; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - _vcpu->evtchn_upcall_mask = 0; - barrier(); /* unmask then check (avoid races) */ - if ( unlikely(_vcpu->evtchn_upcall_pending) ) - force_evtchn_callback(); - preempt_enable(); -} -EXPORT_SYMBOL(raw_local_irq_enable); - -/* - * For spinlocks, etc.: - */ - -unsigned long __raw_local_irq_save(void) -{ - struct vcpu_info *_vcpu; - unsigned long flags; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - flags = _vcpu->evtchn_upcall_mask; - _vcpu->evtchn_upcall_mask = 1; - preempt_enable_no_resched(); - - return flags; -} -EXPORT_SYMBOL(__raw_local_irq_save); - -/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */ -int raw_irqs_disabled(void) -{ - struct vcpu_info *_vcpu; - int disabled; - - preempt_disable(); - _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; - disabled = (_vcpu->evtchn_upcall_mask != 0); - preempt_enable_no_resched(); - - return disabled; -} -EXPORT_SYMBOL(raw_irqs_disabled); diff --git a/arch/x86_64/kernel/k8.c b/arch/x86_64/kernel/k8.c deleted file mode 100644 index 6416682d3..000000000 --- a/arch/x86_64/kernel/k8.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Shared support code for AMD K8 northbridges and derivates. - * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. - */ -#include -#include -#include -#include -#include -#include -#include - -int num_k8_northbridges; -EXPORT_SYMBOL(num_k8_northbridges); - -static u32 *flush_words; - -struct pci_device_id k8_nb_ids[] = { - { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1203) }, - {} -}; -EXPORT_SYMBOL(k8_nb_ids); - -struct pci_dev **k8_northbridges; -EXPORT_SYMBOL(k8_northbridges); - -static struct pci_dev *next_k8_northbridge(struct pci_dev *dev) -{ - do { - dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev); - if (!dev) - break; - } while (!pci_match_id(&k8_nb_ids[0], dev)); - return dev; -} - -int cache_k8_northbridges(void) -{ - int i; - struct pci_dev *dev; - if (num_k8_northbridges) - return 0; - - num_k8_northbridges = 0; - dev = NULL; - while ((dev = next_k8_northbridge(dev)) != NULL) - num_k8_northbridges++; - - k8_northbridges = kmalloc((num_k8_northbridges + 1) * sizeof(void *), - GFP_KERNEL); - if (!k8_northbridges) - return -ENOMEM; - - flush_words = kmalloc(num_k8_northbridges * sizeof(u32), GFP_KERNEL); - if (!flush_words) { - kfree(k8_northbridges); - return -ENOMEM; - } - - dev = NULL; - i = 0; - while ((dev = next_k8_northbridge(dev)) != NULL) { - k8_northbridges[i++] = dev; - pci_read_config_dword(dev, 0x9c, &flush_words[i]); - } - k8_northbridges[i] = NULL; - return 0; -} -EXPORT_SYMBOL_GPL(cache_k8_northbridges); - -/* Ignores subdevice/subvendor but as far as I can figure out - they're useless anyways */ -int __init early_is_k8_nb(u32 device) -{ - struct pci_device_id *id; - u32 vendor = device & 0xffff; - device >>= 16; - for (id = k8_nb_ids; id->vendor; id++) - if (vendor == id->vendor && device == id->device) - return 1; - return 0; -} - -void k8_flush_garts(void) -{ - int flushed, i; - unsigned long flags; - static DEFINE_SPINLOCK(gart_lock); - - /* Avoid races between AGP and IOMMU. In theory it's not needed - but I'm not sure if the hardware won't lose flush requests - when another is pending. This whole thing is so expensive anyways - that it doesn't matter to serialize more. -AK */ - spin_lock_irqsave(&gart_lock, flags); - flushed = 0; - for (i = 0; i < num_k8_northbridges; i++) { - pci_write_config_dword(k8_northbridges[i], 0x9c, - flush_words[i]|1); - flushed++; - } - for (i = 0; i < num_k8_northbridges; i++) { - u32 w; - /* Make sure the hardware actually executed the flush*/ - for (;;) { - pci_read_config_dword(k8_northbridges[i], - 0x9c, &w); - if (!(w & 1)) - break; - cpu_relax(); - } - } - spin_unlock_irqrestore(&gart_lock, flags); - if (!flushed) - printk("nothing to flush?\n"); -} -EXPORT_SYMBOL_GPL(k8_flush_garts); - diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index ffc73ac72..fa1d19ca7 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c @@ -31,6 +31,7 @@ * Added function return probes functionality */ +#include #include #include #include diff --git a/arch/x86_64/kernel/machine_kexec.c b/arch/x86_64/kernel/machine_kexec.c index 106076b37..25ac8a3fa 100644 --- a/arch/x86_64/kernel/machine_kexec.c +++ b/arch/x86_64/kernel/machine_kexec.c @@ -149,8 +149,8 @@ typedef NORET_TYPE void (*relocate_new_kernel_t)(unsigned long indirection_page, unsigned long start_address, unsigned long pgtable) ATTRIB_NORET; -extern const unsigned char relocate_new_kernel[]; -extern const unsigned long relocate_new_kernel_size; +const extern unsigned char relocate_new_kernel[]; +const extern unsigned long relocate_new_kernel_size; int machine_kexec_prepare(struct kimage *image) { @@ -207,11 +207,14 @@ NORET_TYPE void machine_kexec(struct kimage *image) __flush_tlb(); - /* The segment registers are funny things, they have both a - * visible and an invisible part. Whenever the visible part is - * set to a specific selector, the invisible part is loaded - * with from a table in memory. At no other time is the - * descriptor table in memory accessed. + /* The segment registers are funny things, they are + * automatically loaded from a table, in memory wherever you + * set them to a specific selector, but this table is never + * accessed again unless you set the segment to a different selector. + * + * The more common model are caches where the behide + * the scenes work is done, but is also dropped at arbitrary + * times. * * I take advantage of this here by force loading the * segments, before I zap the gdt with an invalid value. diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 4e017fb30..c69fc43ce 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c @@ -562,7 +562,7 @@ static struct sysdev_class mce_sysclass = { set_kset_name("machinecheck"), }; -DEFINE_PER_CPU(struct sys_device, device_mce); +static DEFINE_PER_CPU(struct sys_device, device_mce); /* Why are there no generic functions for this? */ #define ACCESSOR(name, var, start) \ @@ -615,7 +615,7 @@ static __cpuinit int mce_create_device(unsigned int cpu) } #ifdef CONFIG_HOTPLUG_CPU -static void mce_remove_device(unsigned int cpu) +static __cpuinit void mce_remove_device(unsigned int cpu) { int i; @@ -626,6 +626,7 @@ static void mce_remove_device(unsigned int cpu) sysdev_remove_file(&per_cpu(device_mce,cpu), &attr_check_interval); sysdev_unregister(&per_cpu(device_mce,cpu)); } +#endif /* Get notified when a cpu comes on/off. Be hotplug friendly. */ static int @@ -637,9 +638,11 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) case CPU_ONLINE: mce_create_device(cpu); break; +#ifdef CONFIG_HOTPLUG_CPU case CPU_DEAD: mce_remove_device(cpu); break; +#endif } return NOTIFY_OK; } @@ -647,7 +650,6 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) static struct notifier_block mce_cpu_notifier = { .notifier_call = mce_cpu_callback, }; -#endif static __init int mce_init_device(void) { @@ -662,7 +664,7 @@ static __init int mce_init_device(void) mce_create_device(i); } - register_hotcpu_notifier(&mce_cpu_notifier); + register_cpu_notifier(&mce_cpu_notifier); misc_register(&mce_log_device); return err; } diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index 883fe747f..d13b241ad 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c @@ -1,5 +1,5 @@ /* - * (c) 2005, 2006 Advanced Micro Devices, Inc. + * (c) 2005 Advanced Micro Devices, Inc. * Your use of this code is subject to the terms and conditions of the * GNU general public license version 2. See "COPYING" or * http://www.gnu.org/licenses/gpl.html @@ -8,10 +8,9 @@ * * Support : jacob.shin@amd.com * - * April 2006 - * - added support for AMD Family 0x10 processors + * MC4_MISC0 DRAM ECC Error Threshold available under AMD K8 Rev F. + * MC4_MISC0 exists per physical processor. * - * All MC4_MISCi registers are shared between multi-cores */ #include @@ -30,45 +29,32 @@ #include #include -#define PFX "mce_threshold: " -#define VERSION "version 1.1.1" -#define NR_BANKS 6 -#define NR_BLOCKS 9 -#define THRESHOLD_MAX 0xFFF -#define INT_TYPE_APIC 0x00020000 -#define MASK_VALID_HI 0x80000000 -#define MASK_LVTOFF_HI 0x00F00000 -#define MASK_COUNT_EN_HI 0x00080000 -#define MASK_INT_TYPE_HI 0x00060000 -#define MASK_OVERFLOW_HI 0x00010000 +#define PFX "mce_threshold: " +#define VERSION "version 1.00.9" +#define NR_BANKS 5 +#define THRESHOLD_MAX 0xFFF +#define INT_TYPE_APIC 0x00020000 +#define MASK_VALID_HI 0x80000000 +#define MASK_LVTOFF_HI 0x00F00000 +#define MASK_COUNT_EN_HI 0x00080000 +#define MASK_INT_TYPE_HI 0x00060000 +#define MASK_OVERFLOW_HI 0x00010000 #define MASK_ERR_COUNT_HI 0x00000FFF -#define MASK_BLKPTR_LO 0xFF000000 -#define MCG_XBLK_ADDR 0xC0000400 +#define MASK_OVERFLOW 0x0001000000000000L -struct threshold_block { - unsigned int block; - unsigned int bank; +struct threshold_bank { unsigned int cpu; - u32 address; - u16 interrupt_enable; + u8 bank; + u8 interrupt_enable; u16 threshold_limit; struct kobject kobj; - struct list_head miscj; }; -/* defaults used early on boot */ -static struct threshold_block threshold_defaults = { +static struct threshold_bank threshold_defaults = { .interrupt_enable = 0, .threshold_limit = THRESHOLD_MAX, }; -struct threshold_bank { - struct kobject kobj; - struct threshold_block *blocks; - cpumask_t cpus; -}; -static DEFINE_PER_CPU(struct threshold_bank *, threshold_banks[NR_BANKS]); - #ifdef CONFIG_SMP static unsigned char shared_bank[NR_BANKS] = { 0, 0, 0, 0, 1 @@ -82,12 +68,12 @@ static DEFINE_PER_CPU(unsigned char, bank_map); /* see which banks are on */ */ /* must be called with correct cpu affinity */ -static void threshold_restart_bank(struct threshold_block *b, +static void threshold_restart_bank(struct threshold_bank *b, int reset, u16 old_limit) { u32 mci_misc_hi, mci_misc_lo; - rdmsr(b->address, mci_misc_lo, mci_misc_hi); + rdmsr(MSR_IA32_MC0_MISC + b->bank * 4, mci_misc_lo, mci_misc_hi); if (b->threshold_limit < (mci_misc_hi & THRESHOLD_MAX)) reset = 1; /* limit cannot be lower than err count */ @@ -108,57 +94,35 @@ static void threshold_restart_bank(struct threshold_block *b, (mci_misc_hi &= ~MASK_INT_TYPE_HI); mci_misc_hi |= MASK_COUNT_EN_HI; - wrmsr(b->address, mci_misc_lo, mci_misc_hi); + wrmsr(MSR_IA32_MC0_MISC + b->bank * 4, mci_misc_lo, mci_misc_hi); } -/* cpu init entry point, called from mce.c with preempt off */ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c) { - unsigned int bank, block; + int bank; + u32 mci_misc_lo, mci_misc_hi; unsigned int cpu = smp_processor_id(); - u32 low = 0, high = 0, address = 0; for (bank = 0; bank < NR_BANKS; ++bank) { - for (block = 0; block < NR_BLOCKS; ++block) { - if (block == 0) - address = MSR_IA32_MC0_MISC + bank * 4; - else if (block == 1) - address = MCG_XBLK_ADDR - + ((low & MASK_BLKPTR_LO) >> 21); - else - ++address; - - if (rdmsr_safe(address, &low, &high)) - continue; + rdmsr(MSR_IA32_MC0_MISC + bank * 4, mci_misc_lo, mci_misc_hi); - if (!(high & MASK_VALID_HI)) { - if (block) - continue; - else - break; - } + /* !valid, !counter present, bios locked */ + if (!(mci_misc_hi & MASK_VALID_HI) || + !(mci_misc_hi & MASK_VALID_HI >> 1) || + (mci_misc_hi & MASK_VALID_HI >> 2)) + continue; - if (!(high & MASK_VALID_HI >> 1) || - (high & MASK_VALID_HI >> 2)) - continue; + per_cpu(bank_map, cpu) |= (1 << bank); - if (!block) - per_cpu(bank_map, cpu) |= (1 << bank); #ifdef CONFIG_SMP - if (shared_bank[bank] && c->cpu_core_id) - break; + if (shared_bank[bank] && cpu_core_id[cpu]) + continue; #endif - high &= ~MASK_LVTOFF_HI; - high |= K8_APIC_EXT_LVT_ENTRY_THRESHOLD << 20; - wrmsr(address, low, high); - setup_APIC_extened_lvt(K8_APIC_EXT_LVT_ENTRY_THRESHOLD, - THRESHOLD_APIC_VECTOR, - K8_APIC_EXT_INT_MSG_FIX, 0); - - threshold_defaults.address = address; - threshold_restart_bank(&threshold_defaults, 0, 0); - } + setup_threshold_lvt((mci_misc_hi & MASK_LVTOFF_HI) >> 20); + threshold_defaults.cpu = cpu; + threshold_defaults.bank = bank; + threshold_restart_bank(&threshold_defaults, 0, 0); } } @@ -173,9 +137,8 @@ void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c) */ asmlinkage void mce_threshold_interrupt(void) { - unsigned int bank, block; + int bank; struct mce m; - u32 low = 0, high = 0, address = 0; ack_APIC_irq(); exit_idle(); @@ -187,42 +150,15 @@ asmlinkage void mce_threshold_interrupt(void) /* assume first bank caused it */ for (bank = 0; bank < NR_BANKS; ++bank) { - for (block = 0; block < NR_BLOCKS; ++block) { - if (block == 0) - address = MSR_IA32_MC0_MISC + bank * 4; - else if (block == 1) - address = MCG_XBLK_ADDR - + ((low & MASK_BLKPTR_LO) >> 21); - else - ++address; - - if (rdmsr_safe(address, &low, &high)) - continue; + m.bank = MCE_THRESHOLD_BASE + bank; + rdmsrl(MSR_IA32_MC0_MISC + bank * 4, m.misc); - if (!(high & MASK_VALID_HI)) { - if (block) - continue; - else - break; - } - - if (!(high & MASK_VALID_HI >> 1) || - (high & MASK_VALID_HI >> 2)) - continue; - - if (high & MASK_OVERFLOW_HI) { - rdmsrl(address, m.misc); - rdmsrl(MSR_IA32_MC0_STATUS + bank * 4, - m.status); - m.bank = K8_MCE_THRESHOLD_BASE - + bank * NR_BLOCKS - + block; - mce_log(&m); - goto out; - } + if (m.misc & MASK_OVERFLOW) { + mce_log(&m); + goto out; } } -out: + out: irq_exit(); } @@ -230,12 +166,20 @@ out: * Sysfs Interface */ +static struct sysdev_class threshold_sysclass = { + set_kset_name("threshold"), +}; + +static DEFINE_PER_CPU(struct sys_device, device_threshold); + struct threshold_attr { - struct attribute attr; - ssize_t(*show) (struct threshold_block *, char *); - ssize_t(*store) (struct threshold_block *, const char *, size_t count); + struct attribute attr; + ssize_t(*show) (struct threshold_bank *, char *); + ssize_t(*store) (struct threshold_bank *, const char *, size_t count); }; +static DEFINE_PER_CPU(struct threshold_bank *, threshold_banks[NR_BANKS]); + static cpumask_t affinity_set(unsigned int cpu) { cpumask_t oldmask = current->cpus_allowed; @@ -250,15 +194,15 @@ static void affinity_restore(cpumask_t oldmask) set_cpus_allowed(current, oldmask); } -#define SHOW_FIELDS(name) \ -static ssize_t show_ ## name(struct threshold_block * b, char *buf) \ -{ \ - return sprintf(buf, "%lx\n", (unsigned long) b->name); \ -} +#define SHOW_FIELDS(name) \ + static ssize_t show_ ## name(struct threshold_bank * b, char *buf) \ + { \ + return sprintf(buf, "%lx\n", (unsigned long) b->name); \ + } SHOW_FIELDS(interrupt_enable) SHOW_FIELDS(threshold_limit) -static ssize_t store_interrupt_enable(struct threshold_block *b, +static ssize_t store_interrupt_enable(struct threshold_bank *b, const char *buf, size_t count) { char *end; @@ -275,7 +219,7 @@ static ssize_t store_interrupt_enable(struct threshold_block *b, return end - buf; } -static ssize_t store_threshold_limit(struct threshold_block *b, +static ssize_t store_threshold_limit(struct threshold_bank *b, const char *buf, size_t count) { char *end; @@ -298,18 +242,18 @@ static ssize_t store_threshold_limit(struct threshold_block *b, return end - buf; } -static ssize_t show_error_count(struct threshold_block *b, char *buf) +static ssize_t show_error_count(struct threshold_bank *b, char *buf) { u32 high, low; cpumask_t oldmask; oldmask = affinity_set(b->cpu); - rdmsr(b->address, low, high); + rdmsr(MSR_IA32_MC0_MISC + b->bank * 4, low, high); /* ignore low 32 */ affinity_restore(oldmask); return sprintf(buf, "%x\n", (high & 0xFFF) - (THRESHOLD_MAX - b->threshold_limit)); } -static ssize_t store_error_count(struct threshold_block *b, +static ssize_t store_error_count(struct threshold_bank *b, const char *buf, size_t count) { cpumask_t oldmask; @@ -325,13 +269,13 @@ static ssize_t store_error_count(struct threshold_block *b, .store = _store, \ }; -#define RW_ATTR(name) \ -static struct threshold_attr name = \ +#define ATTR_FIELDS(name) \ + static struct threshold_attr name = \ THRESHOLD_ATTR(name, 0644, show_## name, store_## name) -RW_ATTR(interrupt_enable); -RW_ATTR(threshold_limit); -RW_ATTR(error_count); +ATTR_FIELDS(interrupt_enable); +ATTR_FIELDS(threshold_limit); +ATTR_FIELDS(error_count); static struct attribute *default_attrs[] = { &interrupt_enable.attr, @@ -340,12 +284,12 @@ static struct attribute *default_attrs[] = { NULL }; -#define to_block(k) container_of(k, struct threshold_block, kobj) -#define to_attr(a) container_of(a, struct threshold_attr, attr) +#define to_bank(k) container_of(k,struct threshold_bank,kobj) +#define to_attr(a) container_of(a,struct threshold_attr,attr) static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) { - struct threshold_block *b = to_block(kobj); + struct threshold_bank *b = to_bank(kobj); struct threshold_attr *a = to_attr(attr); ssize_t ret; ret = a->show ? a->show(b, buf) : -EIO; @@ -355,7 +299,7 @@ static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) static ssize_t store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) { - struct threshold_block *b = to_block(kobj); + struct threshold_bank *b = to_bank(kobj); struct threshold_attr *a = to_attr(attr); ssize_t ret; ret = a->store ? a->store(b, buf, count) : -EIO; @@ -372,174 +316,69 @@ static struct kobj_type threshold_ktype = { .default_attrs = default_attrs, }; -static __cpuinit int allocate_threshold_blocks(unsigned int cpu, - unsigned int bank, - unsigned int block, - u32 address) -{ - int err; - u32 low, high; - struct threshold_block *b = NULL; - - if ((bank >= NR_BANKS) || (block >= NR_BLOCKS)) - return 0; - - if (rdmsr_safe(address, &low, &high)) - goto recurse; - - if (!(high & MASK_VALID_HI)) { - if (block) - goto recurse; - else - return 0; - } - - if (!(high & MASK_VALID_HI >> 1) || - (high & MASK_VALID_HI >> 2)) - goto recurse; - - b = kzalloc(sizeof(struct threshold_block), GFP_KERNEL); - if (!b) - return -ENOMEM; - memset(b, 0, sizeof(struct threshold_block)); - - b->block = block; - b->bank = bank; - b->cpu = cpu; - b->address = address; - b->interrupt_enable = 0; - b->threshold_limit = THRESHOLD_MAX; - - INIT_LIST_HEAD(&b->miscj); - - if (per_cpu(threshold_banks, cpu)[bank]->blocks) - list_add(&b->miscj, - &per_cpu(threshold_banks, cpu)[bank]->blocks->miscj); - else - per_cpu(threshold_banks, cpu)[bank]->blocks = b; - - kobject_set_name(&b->kobj, "misc%i", block); - b->kobj.parent = &per_cpu(threshold_banks, cpu)[bank]->kobj; - b->kobj.ktype = &threshold_ktype; - err = kobject_register(&b->kobj); - if (err) - goto out_free; -recurse: - if (!block) { - address = (low & MASK_BLKPTR_LO) >> 21; - if (!address) - return 0; - address += MCG_XBLK_ADDR; - } else - ++address; - - err = allocate_threshold_blocks(cpu, bank, ++block, address); - if (err) - goto out_free; - - return err; - -out_free: - if (b) { - kobject_unregister(&b->kobj); - kfree(b); - } - return err; -} - /* symlinks sibling shared banks to first core. first core owns dir/files. */ -static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) +static __cpuinit int threshold_create_bank(unsigned int cpu, int bank) { - int i, err = 0; + int err = 0; struct threshold_bank *b = NULL; - cpumask_t oldmask = CPU_MASK_NONE; - char name[32]; - - sprintf(name, "threshold_bank%i", bank); #ifdef CONFIG_SMP - if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) { /* symlink */ - i = first_cpu(cpu_core_map[cpu]); - - /* first core not up yet */ - if (cpu_data[i].cpu_core_id) - goto out; - - /* already linked */ - if (per_cpu(threshold_banks, cpu)[bank]) - goto out; - - b = per_cpu(threshold_banks, i)[bank]; + if (cpu_core_id[cpu] && shared_bank[bank]) { /* symlink */ + char name[16]; + unsigned lcpu = first_cpu(cpu_core_map[cpu]); + if (cpu_core_id[lcpu]) + goto out; /* first core not up yet */ + b = per_cpu(threshold_banks, lcpu)[bank]; if (!b) goto out; - - err = sysfs_create_link(&per_cpu(device_mce, cpu).kobj, + sprintf(name, "bank%i", bank); + err = sysfs_create_link(&per_cpu(device_threshold, cpu).kobj, &b->kobj, name); if (err) goto out; - - b->cpus = cpu_core_map[cpu]; per_cpu(threshold_banks, cpu)[bank] = b; goto out; } #endif - b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL); + b = kmalloc(sizeof(struct threshold_bank), GFP_KERNEL); if (!b) { err = -ENOMEM; goto out; } memset(b, 0, sizeof(struct threshold_bank)); - kobject_set_name(&b->kobj, "threshold_bank%i", bank); - b->kobj.parent = &per_cpu(device_mce, cpu).kobj; -#ifndef CONFIG_SMP - b->cpus = CPU_MASK_ALL; -#else - b->cpus = cpu_core_map[cpu]; -#endif - err = kobject_register(&b->kobj); - if (err) - goto out_free; - - per_cpu(threshold_banks, cpu)[bank] = b; - - oldmask = affinity_set(cpu); - err = allocate_threshold_blocks(cpu, bank, 0, - MSR_IA32_MC0_MISC + bank * 4); - affinity_restore(oldmask); - - if (err) - goto out_free; - - for_each_cpu_mask(i, b->cpus) { - if (i == cpu) - continue; - - err = sysfs_create_link(&per_cpu(device_mce, i).kobj, - &b->kobj, name); - if (err) - goto out; + b->cpu = cpu; + b->bank = bank; + b->interrupt_enable = 0; + b->threshold_limit = THRESHOLD_MAX; + kobject_set_name(&b->kobj, "bank%i", bank); + b->kobj.parent = &per_cpu(device_threshold, cpu).kobj; + b->kobj.ktype = &threshold_ktype; - per_cpu(threshold_banks, i)[bank] = b; + err = kobject_register(&b->kobj); + if (err) { + kfree(b); + goto out; } - - goto out; - -out_free: - per_cpu(threshold_banks, cpu)[bank] = NULL; - kfree(b); -out: + per_cpu(threshold_banks, cpu)[bank] = b; + out: return err; } /* create dir/files for all valid threshold banks */ static __cpuinit int threshold_create_device(unsigned int cpu) { - unsigned int bank; + int bank; int err = 0; + per_cpu(device_threshold, cpu).id = cpu; + per_cpu(device_threshold, cpu).cls = &threshold_sysclass; + err = sysdev_register(&per_cpu(device_threshold, cpu)); + if (err) + goto out; + for (bank = 0; bank < NR_BANKS; ++bank) { if (!(per_cpu(bank_map, cpu) & 1 << bank)) continue; @@ -547,7 +386,7 @@ static __cpuinit int threshold_create_device(unsigned int cpu) if (err) goto out; } -out: + out: return err; } @@ -558,76 +397,89 @@ out: * of shared sysfs dir/files, and rest of the cores will be symlinked to it. */ -static void deallocate_threshold_block(unsigned int cpu, - unsigned int bank) +/* cpu hotplug call removes all symlinks before first core dies */ +static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank) { - struct threshold_block *pos = NULL; - struct threshold_block *tmp = NULL; - struct threshold_bank *head = per_cpu(threshold_banks, cpu)[bank]; - - if (!head) - return; - - list_for_each_entry_safe(pos, tmp, &head->blocks->miscj, miscj) { - kobject_unregister(&pos->kobj); - list_del(&pos->miscj); - kfree(pos); - } - - kfree(per_cpu(threshold_banks, cpu)[bank]->blocks); - per_cpu(threshold_banks, cpu)[bank]->blocks = NULL; -} - -static void threshold_remove_bank(unsigned int cpu, int bank) -{ - int i = 0; struct threshold_bank *b; - char name[32]; + char name[16]; b = per_cpu(threshold_banks, cpu)[bank]; - if (!b) return; - - if (!b->blocks) - goto free_out; - - sprintf(name, "threshold_bank%i", bank); - - /* sibling symlink */ - if (shared_bank[bank] && b->blocks->cpu != cpu) { - sysfs_remove_link(&per_cpu(device_mce, cpu).kobj, name); + if (shared_bank[bank] && atomic_read(&b->kobj.kref.refcount) > 2) { + sprintf(name, "bank%i", bank); + sysfs_remove_link(&per_cpu(device_threshold, cpu).kobj, name); per_cpu(threshold_banks, cpu)[bank] = NULL; - return; + } else { + kobject_unregister(&b->kobj); + kfree(per_cpu(threshold_banks, cpu)[bank]); } +} - /* remove all sibling symlinks before unregistering */ - for_each_cpu_mask(i, b->cpus) { - if (i == cpu) - continue; +static __cpuinit void threshold_remove_device(unsigned int cpu) +{ + int bank; - sysfs_remove_link(&per_cpu(device_mce, i).kobj, name); - per_cpu(threshold_banks, i)[bank] = NULL; + for (bank = 0; bank < NR_BANKS; ++bank) { + if (!(per_cpu(bank_map, cpu) & 1 << bank)) + continue; + threshold_remove_bank(cpu, bank); } + sysdev_unregister(&per_cpu(device_threshold, cpu)); +} - deallocate_threshold_block(cpu, bank); +/* link all existing siblings when first core comes up */ +static __cpuinit int threshold_create_symlinks(unsigned int cpu) +{ + int bank, err = 0; + unsigned int lcpu = 0; -free_out: - kobject_unregister(&b->kobj); - kfree(b); - per_cpu(threshold_banks, cpu)[bank] = NULL; + if (cpu_core_id[cpu]) + return 0; + for_each_cpu_mask(lcpu, cpu_core_map[cpu]) { + if (lcpu == cpu) + continue; + for (bank = 0; bank < NR_BANKS; ++bank) { + if (!(per_cpu(bank_map, cpu) & 1 << bank)) + continue; + if (!shared_bank[bank]) + continue; + err = threshold_create_bank(lcpu, bank); + } + } + return err; } -static void threshold_remove_device(unsigned int cpu) +/* remove all symlinks before first core dies. */ +static __cpuinit void threshold_remove_symlinks(unsigned int cpu) { - unsigned int bank; - - for (bank = 0; bank < NR_BANKS; ++bank) { - if (!(per_cpu(bank_map, cpu) & 1 << bank)) + int bank; + unsigned int lcpu = 0; + if (cpu_core_id[cpu]) + return; + for_each_cpu_mask(lcpu, cpu_core_map[cpu]) { + if (lcpu == cpu) continue; - threshold_remove_bank(cpu, bank); + for (bank = 0; bank < NR_BANKS; ++bank) { + if (!(per_cpu(bank_map, cpu) & 1 << bank)) + continue; + if (!shared_bank[bank]) + continue; + threshold_remove_bank(lcpu, bank); + } } } +#else /* !CONFIG_HOTPLUG_CPU */ +static __cpuinit void threshold_create_symlinks(unsigned int cpu) +{ +} +static __cpuinit void threshold_remove_symlinks(unsigned int cpu) +{ +} +static void threshold_remove_device(unsigned int cpu) +{ +} +#endif /* get notified when a cpu comes on/off */ static int threshold_cpu_callback(struct notifier_block *nfb, @@ -642,6 +494,13 @@ static int threshold_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_ONLINE: threshold_create_device(cpu); + threshold_create_symlinks(cpu); + break; + case CPU_DOWN_PREPARE: + threshold_remove_symlinks(cpu); + break; + case CPU_DOWN_FAILED: + threshold_create_symlinks(cpu); break; case CPU_DEAD: threshold_remove_device(cpu); @@ -656,20 +515,26 @@ static int threshold_cpu_callback(struct notifier_block *nfb, static struct notifier_block threshold_cpu_notifier = { .notifier_call = threshold_cpu_callback, }; -#endif /* CONFIG_HOTPLUG_CPU */ static __init int threshold_init_device(void) { - unsigned lcpu = 0; + int err; + int lcpu = 0; + + err = sysdev_class_register(&threshold_sysclass); + if (err) + goto out; /* to hit CPUs online before the notifier is up */ for_each_online_cpu(lcpu) { - int err = threshold_create_device(lcpu); + err = threshold_create_device(lcpu); if (err) - return err; + goto out; } - register_hotcpu_notifier(&threshold_cpu_notifier); - return 0; + register_cpu_notifier(&threshold_cpu_notifier); + + out: + return err; } device_initcall(threshold_init_device); diff --git a/arch/x86_64/kernel/module.c b/arch/x86_64/kernel/module.c index 9d0958ff5..bac195c74 100644 --- a/arch/x86_64/kernel/module.c +++ b/arch/x86_64/kernel/module.c @@ -145,38 +145,26 @@ int apply_relocate(Elf_Shdr *sechdrs, return -ENOSYS; } +extern void apply_alternatives(void *start, void *end); + int module_finalize(const Elf_Ehdr *hdr, - const Elf_Shdr *sechdrs, - struct module *me) + const Elf_Shdr *sechdrs, + struct module *me) { - const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL; + const Elf_Shdr *s; char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; - for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { - if (!strcmp(".text", secstrings + s->sh_name)) - text = s; - if (!strcmp(".altinstructions", secstrings + s->sh_name)) - alt = s; - if (!strcmp(".smp_locks", secstrings + s->sh_name)) - locks= s; - } - - if (alt) { - /* patch .altinstructions */ - void *aseg = (void *)alt->sh_addr; - apply_alternatives(aseg, aseg + alt->sh_size); - } - if (locks && text) { - void *lseg = (void *)locks->sh_addr; - void *tseg = (void *)text->sh_addr; - alternatives_smp_module_add(me, me->name, - lseg, lseg + locks->sh_size, - tseg, tseg + text->sh_size); - } + /* look for .altinstructions to patch */ + for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { + void *seg; + if (strcmp(".altinstructions", secstrings + s->sh_name)) + continue; + seg = (void *)s->sh_addr; + apply_alternatives(seg, seg + s->sh_size); + } return 0; } void module_arch_cleanup(struct module *mod) { - alternatives_smp_module_del(mod); } diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index a1ab4197f..083da7e60 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 5baa0c726..4e6357fe0 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c @@ -12,9 +12,14 @@ * Mikael Pettersson : PM converted to driver model. Disable/enable API. */ +#include #include #include +#include +#include #include +#include +#include #include #include #include @@ -22,11 +27,14 @@ #include #include +#include +#include #include +#include #include #include +#include #include -#include /* * lapic_nmi_owner tracks the ownership of the lapic NMI hardware: @@ -66,9 +74,6 @@ static unsigned int nmi_p4_cccr_val; #define K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING 0x76 #define K7_NMI_EVENT K7_EVENT_CYCLES_PROCESSOR_IS_RUNNING -#define ARCH_PERFMON_NMI_EVENT_SEL ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL -#define ARCH_PERFMON_NMI_EVENT_UMASK ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK - #define MSR_P4_MISC_ENABLE 0x1A0 #define MSR_P4_MISC_ENABLE_PERF_AVAIL (1<<7) #define MSR_P4_MISC_ENABLE_PEBS_UNAVAIL (1<<12) @@ -100,10 +105,7 @@ static __cpuinit inline int nmi_known_cpu(void) case X86_VENDOR_AMD: return boot_cpu_data.x86 == 15; case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) - return 1; - else - return (boot_cpu_data.x86 == 15); + return boot_cpu_data.x86 == 15; } return 0; } @@ -127,7 +129,7 @@ void __cpuinit nmi_watchdog_default(void) static __init void nmi_cpu_busy(void *data) { volatile int *endflag = data; - local_irq_enable_in_hardirq(); + local_irq_enable(); /* Intentionally don't use cpu_relax here. This is to make sure that the performance counter really ticks, even if there is a simulator or similar that catches the @@ -209,8 +211,6 @@ int __init setup_nmi_watchdog(char *str) __setup("nmi_watchdog=", setup_nmi_watchdog); -static void disable_intel_arch_watchdog(void); - static void disable_lapic_nmi_watchdog(void) { if (nmi_active <= 0) @@ -223,8 +223,6 @@ static void disable_lapic_nmi_watchdog(void) if (boot_cpu_data.x86 == 15) { wrmsr(MSR_P4_IQ_CCCR0, 0, 0); wrmsr(MSR_P4_CRU_ESCR0, 0, 0); - } else if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - disable_intel_arch_watchdog(); } break; } @@ -377,53 +375,6 @@ static void setup_k7_watchdog(void) wrmsr(MSR_K7_EVNTSEL0, evntsel, 0); } -static void disable_intel_arch_watchdog(void) -{ - unsigned ebx; - - /* - * Check whether the Architectural PerfMon supports - * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. - */ - ebx = cpuid_ebx(10); - if (!(ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, 0, 0); -} - -static int setup_intel_arch_watchdog(void) -{ - unsigned int evntsel; - unsigned ebx; - - /* - * Check whether the Architectural PerfMon supports - * Unhalted Core Cycles Event or not. - * NOTE: Corresponding bit = 0 in ebp indicates event present. - */ - ebx = cpuid_ebx(10); - if ((ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) - return 0; - - nmi_perfctr_msr = MSR_ARCH_PERFMON_PERFCTR0; - - clear_msr_range(MSR_ARCH_PERFMON_EVENTSEL0, 2); - clear_msr_range(MSR_ARCH_PERFMON_PERFCTR0, 2); - - evntsel = ARCH_PERFMON_EVENTSEL_INT - | ARCH_PERFMON_EVENTSEL_OS - | ARCH_PERFMON_EVENTSEL_USR - | ARCH_PERFMON_NMI_EVENT_SEL - | ARCH_PERFMON_NMI_EVENT_UMASK; - - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); - wrmsrl(MSR_ARCH_PERFMON_PERFCTR0, -((u64)cpu_khz * 1000 / nmi_hz)); - apic_write(APIC_LVTPC, APIC_DM_NMI); - evntsel |= ARCH_PERFMON_EVENTSEL0_ENABLE; - wrmsr(MSR_ARCH_PERFMON_EVENTSEL0, evntsel, 0); - return 1; -} - static int setup_p4_watchdog(void) { @@ -477,16 +428,10 @@ void setup_apic_nmi_watchdog(void) setup_k7_watchdog(); break; case X86_VENDOR_INTEL: - if (cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) { - if (!setup_intel_arch_watchdog()) - return; - } else if (boot_cpu_data.x86 == 15) { - if (!setup_p4_watchdog()) - return; - } else { + if (boot_cpu_data.x86 != 15) + return; + if (!setup_p4_watchdog()) return; - } - break; default: @@ -571,14 +516,7 @@ void __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) */ wrmsr(MSR_P4_IQ_CCCR0, nmi_p4_cccr_val, 0); apic_write(APIC_LVTPC, APIC_DM_NMI); - } else if (nmi_perfctr_msr == MSR_ARCH_PERFMON_PERFCTR0) { - /* - * For Intel based architectural perfmon - * - LVTPC is masked on interrupt and must be - * unmasked by the LVTPC handler. - */ - apic_write(APIC_LVTPC, APIC_DM_NMI); - } + } wrmsrl(nmi_perfctr_msr, -((u64)cpu_khz * 1000 / nmi_hz)); } } @@ -606,13 +544,11 @@ void set_nmi_callback(nmi_callback_t callback) vmalloc_sync_all(); rcu_assign_pointer(nmi_callback, callback); } -EXPORT_SYMBOL_GPL(set_nmi_callback); void unset_nmi_callback(void) { nmi_callback = dummy_nmi_callback; } -EXPORT_SYMBOL_GPL(unset_nmi_callback); #ifdef CONFIG_SYSCTL diff --git a/arch/x86_64/kernel/pci-calgary.c b/arch/x86_64/kernel/pci-calgary.c deleted file mode 100644 index 61ffebb79..000000000 --- a/arch/x86_64/kernel/pci-calgary.c +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * Derived from arch/powerpc/kernel/iommu.c - * - * Copyright (C) IBM Corporation, 2006 - * - * Author: Jon Mason - * Author: Muli Ben-Yehuda - - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define PCI_DEVICE_ID_IBM_CALGARY 0x02a1 -#define PCI_VENDOR_DEVICE_ID_CALGARY \ - (PCI_VENDOR_ID_IBM | PCI_DEVICE_ID_IBM_CALGARY << 16) - -/* we need these for register space address calculation */ -#define START_ADDRESS 0xfe000000 -#define CHASSIS_BASE 0 -#define ONE_BASED_CHASSIS_NUM 1 - -/* register offsets inside the host bridge space */ -#define PHB_CSR_OFFSET 0x0110 -#define PHB_PLSSR_OFFSET 0x0120 -#define PHB_CONFIG_RW_OFFSET 0x0160 -#define PHB_IOBASE_BAR_LOW 0x0170 -#define PHB_IOBASE_BAR_HIGH 0x0180 -#define PHB_MEM_1_LOW 0x0190 -#define PHB_MEM_1_HIGH 0x01A0 -#define PHB_IO_ADDR_SIZE 0x01B0 -#define PHB_MEM_1_SIZE 0x01C0 -#define PHB_MEM_ST_OFFSET 0x01D0 -#define PHB_AER_OFFSET 0x0200 -#define PHB_CONFIG_0_HIGH 0x0220 -#define PHB_CONFIG_0_LOW 0x0230 -#define PHB_CONFIG_0_END 0x0240 -#define PHB_MEM_2_LOW 0x02B0 -#define PHB_MEM_2_HIGH 0x02C0 -#define PHB_MEM_2_SIZE_HIGH 0x02D0 -#define PHB_MEM_2_SIZE_LOW 0x02E0 -#define PHB_DOSHOLE_OFFSET 0x08E0 - -/* PHB_CONFIG_RW */ -#define PHB_TCE_ENABLE 0x20000000 -#define PHB_SLOT_DISABLE 0x1C000000 -#define PHB_DAC_DISABLE 0x01000000 -#define PHB_MEM2_ENABLE 0x00400000 -#define PHB_MCSR_ENABLE 0x00100000 -/* TAR (Table Address Register) */ -#define TAR_SW_BITS 0x0000ffffffff800fUL -#define TAR_VALID 0x0000000000000008UL -/* CSR (Channel/DMA Status Register) */ -#define CSR_AGENT_MASK 0xffe0ffff - -#define MAX_NUM_OF_PHBS 8 /* how many PHBs in total? */ -#define MAX_NUM_CHASSIS 8 /* max number of chassis */ -#define MAX_PHB_BUS_NUM (MAX_NUM_OF_PHBS * MAX_NUM_CHASSIS * 2) /* max dev->bus->number */ -#define PHBS_PER_CALGARY 4 - -/* register offsets in Calgary's internal register space */ -static const unsigned long tar_offsets[] = { - 0x0580 /* TAR0 */, - 0x0588 /* TAR1 */, - 0x0590 /* TAR2 */, - 0x0598 /* TAR3 */ -}; - -static const unsigned long split_queue_offsets[] = { - 0x4870 /* SPLIT QUEUE 0 */, - 0x5870 /* SPLIT QUEUE 1 */, - 0x6870 /* SPLIT QUEUE 2 */, - 0x7870 /* SPLIT QUEUE 3 */ -}; - -static const unsigned long phb_offsets[] = { - 0x8000 /* PHB0 */, - 0x9000 /* PHB1 */, - 0xA000 /* PHB2 */, - 0xB000 /* PHB3 */ -}; - -static char bus_to_phb[MAX_PHB_BUS_NUM]; -void* tce_table_kva[MAX_PHB_BUS_NUM]; -unsigned int specified_table_size = TCE_TABLE_SIZE_UNSPECIFIED; -static int translate_empty_slots __read_mostly = 0; -static int calgary_detected __read_mostly = 0; - -/* - * the bitmap of PHBs the user requested that we disable - * translation on. - */ -static DECLARE_BITMAP(translation_disabled, MAX_PHB_BUS_NUM); - -static void tce_cache_blast(struct iommu_table *tbl); - -/* enable this to stress test the chip's TCE cache */ -#ifdef CONFIG_IOMMU_DEBUG -static inline void tce_cache_blast_stress(struct iommu_table *tbl) -{ - tce_cache_blast(tbl); -} -#else -static inline void tce_cache_blast_stress(struct iommu_table *tbl) -{ -} -#endif /* BLAST_TCE_CACHE_ON_UNMAP */ - -static inline unsigned int num_dma_pages(unsigned long dma, unsigned int dmalen) -{ - unsigned int npages; - - npages = PAGE_ALIGN(dma + dmalen) - (dma & PAGE_MASK); - npages >>= PAGE_SHIFT; - - return npages; -} - -static inline int translate_phb(struct pci_dev* dev) -{ - int disabled = test_bit(dev->bus->number, translation_disabled); - return !disabled; -} - -static void iommu_range_reserve(struct iommu_table *tbl, - unsigned long start_addr, unsigned int npages) -{ - unsigned long index; - unsigned long end; - - index = start_addr >> PAGE_SHIFT; - - /* bail out if we're asked to reserve a region we don't cover */ - if (index >= tbl->it_size) - return; - - end = index + npages; - if (end > tbl->it_size) /* don't go off the table */ - end = tbl->it_size; - - while (index < end) { - if (test_bit(index, tbl->it_map)) - printk(KERN_ERR "Calgary: entry already allocated at " - "0x%lx tbl %p dma 0x%lx npages %u\n", - index, tbl, start_addr, npages); - ++index; - } - set_bit_string(tbl->it_map, start_addr >> PAGE_SHIFT, npages); -} - -static unsigned long iommu_range_alloc(struct iommu_table *tbl, - unsigned int npages) -{ - unsigned long offset; - - BUG_ON(npages == 0); - - offset = find_next_zero_string(tbl->it_map, tbl->it_hint, - tbl->it_size, npages); - if (offset == ~0UL) { - tce_cache_blast(tbl); - offset = find_next_zero_string(tbl->it_map, 0, - tbl->it_size, npages); - if (offset == ~0UL) { - printk(KERN_WARNING "Calgary: IOMMU full.\n"); - if (panic_on_overflow) - panic("Calgary: fix the allocator.\n"); - else - return bad_dma_address; - } - } - - set_bit_string(tbl->it_map, offset, npages); - tbl->it_hint = offset + npages; - BUG_ON(tbl->it_hint > tbl->it_size); - - return offset; -} - -static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *vaddr, - unsigned int npages, int direction) -{ - unsigned long entry, flags; - dma_addr_t ret = bad_dma_address; - - spin_lock_irqsave(&tbl->it_lock, flags); - - entry = iommu_range_alloc(tbl, npages); - - if (unlikely(entry == bad_dma_address)) - goto error; - - /* set the return dma address */ - ret = (entry << PAGE_SHIFT) | ((unsigned long)vaddr & ~PAGE_MASK); - - /* put the TCEs in the HW table */ - tce_build(tbl, entry, npages, (unsigned long)vaddr & PAGE_MASK, - direction); - - spin_unlock_irqrestore(&tbl->it_lock, flags); - - return ret; - -error: - spin_unlock_irqrestore(&tbl->it_lock, flags); - printk(KERN_WARNING "Calgary: failed to allocate %u pages in " - "iommu %p\n", npages, tbl); - return bad_dma_address; -} - -static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, - unsigned int npages) -{ - unsigned long entry; - unsigned long i; - - entry = dma_addr >> PAGE_SHIFT; - - BUG_ON(entry + npages > tbl->it_size); - - tce_free(tbl, entry, npages); - - for (i = 0; i < npages; ++i) { - if (!test_bit(entry + i, tbl->it_map)) - printk(KERN_ERR "Calgary: bit is off at 0x%lx " - "tbl %p dma 0x%Lx entry 0x%lx npages %u\n", - entry + i, tbl, dma_addr, entry, npages); - } - - __clear_bit_string(tbl->it_map, entry, npages); - - tce_cache_blast_stress(tbl); -} - -static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, - unsigned int npages) -{ - unsigned long flags; - - spin_lock_irqsave(&tbl->it_lock, flags); - - __iommu_free(tbl, dma_addr, npages); - - spin_unlock_irqrestore(&tbl->it_lock, flags); -} - -static void __calgary_unmap_sg(struct iommu_table *tbl, - struct scatterlist *sglist, int nelems, int direction) -{ - while (nelems--) { - unsigned int npages; - dma_addr_t dma = sglist->dma_address; - unsigned int dmalen = sglist->dma_length; - - if (dmalen == 0) - break; - - npages = num_dma_pages(dma, dmalen); - __iommu_free(tbl, dma, npages); - sglist++; - } -} - -void calgary_unmap_sg(struct device *dev, struct scatterlist *sglist, - int nelems, int direction) -{ - unsigned long flags; - struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; - - if (!translate_phb(to_pci_dev(dev))) - return; - - spin_lock_irqsave(&tbl->it_lock, flags); - - __calgary_unmap_sg(tbl, sglist, nelems, direction); - - spin_unlock_irqrestore(&tbl->it_lock, flags); -} - -static int calgary_nontranslate_map_sg(struct device* dev, - struct scatterlist *sg, int nelems, int direction) -{ - int i; - - for (i = 0; i < nelems; i++ ) { - struct scatterlist *s = &sg[i]; - BUG_ON(!s->page); - s->dma_address = virt_to_bus(page_address(s->page) +s->offset); - s->dma_length = s->length; - } - return nelems; -} - -int calgary_map_sg(struct device *dev, struct scatterlist *sg, - int nelems, int direction) -{ - struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; - unsigned long flags; - unsigned long vaddr; - unsigned int npages; - unsigned long entry; - int i; - - if (!translate_phb(to_pci_dev(dev))) - return calgary_nontranslate_map_sg(dev, sg, nelems, direction); - - spin_lock_irqsave(&tbl->it_lock, flags); - - for (i = 0; i < nelems; i++ ) { - struct scatterlist *s = &sg[i]; - BUG_ON(!s->page); - - vaddr = (unsigned long)page_address(s->page) + s->offset; - npages = num_dma_pages(vaddr, s->length); - - entry = iommu_range_alloc(tbl, npages); - if (entry == bad_dma_address) { - /* makes sure unmap knows to stop */ - s->dma_length = 0; - goto error; - } - - s->dma_address = (entry << PAGE_SHIFT) | s->offset; - - /* insert into HW table */ - tce_build(tbl, entry, npages, vaddr & PAGE_MASK, - direction); - - s->dma_length = s->length; - } - - spin_unlock_irqrestore(&tbl->it_lock, flags); - - return nelems; -error: - __calgary_unmap_sg(tbl, sg, nelems, direction); - for (i = 0; i < nelems; i++) { - sg[i].dma_address = bad_dma_address; - sg[i].dma_length = 0; - } - spin_unlock_irqrestore(&tbl->it_lock, flags); - return 0; -} - -dma_addr_t calgary_map_single(struct device *dev, void *vaddr, - size_t size, int direction) -{ - dma_addr_t dma_handle = bad_dma_address; - unsigned long uaddr; - unsigned int npages; - struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; - - uaddr = (unsigned long)vaddr; - npages = num_dma_pages(uaddr, size); - - if (translate_phb(to_pci_dev(dev))) - dma_handle = iommu_alloc(tbl, vaddr, npages, direction); - else - dma_handle = virt_to_bus(vaddr); - - return dma_handle; -} - -void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle, - size_t size, int direction) -{ - struct iommu_table *tbl = to_pci_dev(dev)->bus->self->sysdata; - unsigned int npages; - - if (!translate_phb(to_pci_dev(dev))) - return; - - npages = num_dma_pages(dma_handle, size); - iommu_free(tbl, dma_handle, npages); -} - -void* calgary_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t flag) -{ - void *ret = NULL; - dma_addr_t mapping; - unsigned int npages, order; - struct iommu_table *tbl; - - tbl = to_pci_dev(dev)->bus->self->sysdata; - - size = PAGE_ALIGN(size); /* size rounded up to full pages */ - npages = size >> PAGE_SHIFT; - order = get_order(size); - - /* alloc enough pages (and possibly more) */ - ret = (void *)__get_free_pages(flag, order); - if (!ret) - goto error; - memset(ret, 0, size); - - if (translate_phb(to_pci_dev(dev))) { - /* set up tces to cover the allocated range */ - mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL); - if (mapping == bad_dma_address) - goto free; - - *dma_handle = mapping; - } else /* non translated slot */ - *dma_handle = virt_to_bus(ret); - - return ret; - -free: - free_pages((unsigned long)ret, get_order(size)); - ret = NULL; -error: - return ret; -} - -static struct dma_mapping_ops calgary_dma_ops = { - .alloc_coherent = calgary_alloc_coherent, - .map_single = calgary_map_single, - .unmap_single = calgary_unmap_single, - .map_sg = calgary_map_sg, - .unmap_sg = calgary_unmap_sg, -}; - -static inline int busno_to_phbid(unsigned char num) -{ - return bus_to_phb[num]; -} - -static inline unsigned long split_queue_offset(unsigned char num) -{ - size_t idx = busno_to_phbid(num); - - return split_queue_offsets[idx]; -} - -static inline unsigned long tar_offset(unsigned char num) -{ - size_t idx = busno_to_phbid(num); - - return tar_offsets[idx]; -} - -static inline unsigned long phb_offset(unsigned char num) -{ - size_t idx = busno_to_phbid(num); - - return phb_offsets[idx]; -} - -static inline void __iomem* calgary_reg(void __iomem *bar, unsigned long offset) -{ - unsigned long target = ((unsigned long)bar) | offset; - return (void __iomem*)target; -} - -static void tce_cache_blast(struct iommu_table *tbl) -{ - u64 val; - u32 aer; - int i = 0; - void __iomem *bbar = tbl->bbar; - void __iomem *target; - - /* disable arbitration on the bus */ - target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_AER_OFFSET); - aer = readl(target); - writel(0, target); - - /* read plssr to ensure it got there */ - target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_PLSSR_OFFSET); - val = readl(target); - - /* poll split queues until all DMA activity is done */ - target = calgary_reg(bbar, split_queue_offset(tbl->it_busno)); - do { - val = readq(target); - i++; - } while ((val & 0xff) != 0xff && i < 100); - if (i == 100) - printk(KERN_WARNING "Calgary: PCI bus not quiesced, " - "continuing anyway\n"); - - /* invalidate TCE cache */ - target = calgary_reg(bbar, tar_offset(tbl->it_busno)); - writeq(tbl->tar_val, target); - - /* enable arbitration */ - target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_AER_OFFSET); - writel(aer, target); - (void)readl(target); /* flush */ -} - -static void __init calgary_reserve_mem_region(struct pci_dev *dev, u64 start, - u64 limit) -{ - unsigned int numpages; - - limit = limit | 0xfffff; - limit++; - - numpages = ((limit - start) >> PAGE_SHIFT); - iommu_range_reserve(dev->sysdata, start, numpages); -} - -static void __init calgary_reserve_peripheral_mem_1(struct pci_dev *dev) -{ - void __iomem *target; - u64 low, high, sizelow; - u64 start, limit; - struct iommu_table *tbl = dev->sysdata; - unsigned char busnum = dev->bus->number; - void __iomem *bbar = tbl->bbar; - - /* peripheral MEM_1 region */ - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_1_LOW); - low = be32_to_cpu(readl(target)); - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_1_HIGH); - high = be32_to_cpu(readl(target)); - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_1_SIZE); - sizelow = be32_to_cpu(readl(target)); - - start = (high << 32) | low; - limit = sizelow; - - calgary_reserve_mem_region(dev, start, limit); -} - -static void __init calgary_reserve_peripheral_mem_2(struct pci_dev *dev) -{ - void __iomem *target; - u32 val32; - u64 low, high, sizelow, sizehigh; - u64 start, limit; - struct iommu_table *tbl = dev->sysdata; - unsigned char busnum = dev->bus->number; - void __iomem *bbar = tbl->bbar; - - /* is it enabled? */ - target = calgary_reg(bbar, phb_offset(busnum) | PHB_CONFIG_RW_OFFSET); - val32 = be32_to_cpu(readl(target)); - if (!(val32 & PHB_MEM2_ENABLE)) - return; - - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_2_LOW); - low = be32_to_cpu(readl(target)); - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_2_HIGH); - high = be32_to_cpu(readl(target)); - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_2_SIZE_LOW); - sizelow = be32_to_cpu(readl(target)); - target = calgary_reg(bbar, phb_offset(busnum) | PHB_MEM_2_SIZE_HIGH); - sizehigh = be32_to_cpu(readl(target)); - - start = (high << 32) | low; - limit = (sizehigh << 32) | sizelow; - - calgary_reserve_mem_region(dev, start, limit); -} - -/* - * some regions of the IO address space do not get translated, so we - * must not give devices IO addresses in those regions. The regions - * are the 640KB-1MB region and the two PCI peripheral memory holes. - * Reserve all of them in the IOMMU bitmap to avoid giving them out - * later. - */ -static void __init calgary_reserve_regions(struct pci_dev *dev) -{ - unsigned int npages; - void __iomem *bbar; - unsigned char busnum; - u64 start; - struct iommu_table *tbl = dev->sysdata; - - bbar = tbl->bbar; - busnum = dev->bus->number; - - /* reserve bad_dma_address in case it's a legal address */ - iommu_range_reserve(tbl, bad_dma_address, 1); - - /* avoid the BIOS/VGA first 640KB-1MB region */ - start = (640 * 1024); - npages = ((1024 - 640) * 1024) >> PAGE_SHIFT; - iommu_range_reserve(tbl, start, npages); - - /* reserve the two PCI peripheral memory regions in IO space */ - calgary_reserve_peripheral_mem_1(dev); - calgary_reserve_peripheral_mem_2(dev); -} - -static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar) -{ - u64 val64; - u64 table_phys; - void __iomem *target; - int ret; - struct iommu_table *tbl; - - /* build TCE tables for each PHB */ - ret = build_tce_table(dev, bbar); - if (ret) - return ret; - - calgary_reserve_regions(dev); - - /* set TARs for each PHB */ - target = calgary_reg(bbar, tar_offset(dev->bus->number)); - val64 = be64_to_cpu(readq(target)); - - /* zero out all TAR bits under sw control */ - val64 &= ~TAR_SW_BITS; - - tbl = dev->sysdata; - table_phys = (u64)__pa(tbl->it_base); - val64 |= table_phys; - - BUG_ON(specified_table_size > TCE_TABLE_SIZE_8M); - val64 |= (u64) specified_table_size; - - tbl->tar_val = cpu_to_be64(val64); - writeq(tbl->tar_val, target); - readq(target); /* flush */ - - return 0; -} - -static void __init calgary_free_tar(struct pci_dev *dev) -{ - u64 val64; - struct iommu_table *tbl = dev->sysdata; - void __iomem *target; - - target = calgary_reg(tbl->bbar, tar_offset(dev->bus->number)); - val64 = be64_to_cpu(readq(target)); - val64 &= ~TAR_SW_BITS; - writeq(cpu_to_be64(val64), target); - readq(target); /* flush */ - - kfree(tbl); - dev->sysdata = NULL; -} - -static void calgary_watchdog(unsigned long data) -{ - struct pci_dev *dev = (struct pci_dev *)data; - struct iommu_table *tbl = dev->sysdata; - void __iomem *bbar = tbl->bbar; - u32 val32; - void __iomem *target; - - target = calgary_reg(bbar, phb_offset(tbl->it_busno) | PHB_CSR_OFFSET); - val32 = be32_to_cpu(readl(target)); - - /* If no error, the agent ID in the CSR is not valid */ - if (val32 & CSR_AGENT_MASK) { - printk(KERN_EMERG "calgary_watchdog: DMA error on bus %d, " - "CSR = %#x\n", dev->bus->number, val32); - writel(0, target); - - /* Disable bus that caused the error */ - target = calgary_reg(bbar, phb_offset(tbl->it_busno) | - PHB_CONFIG_RW_OFFSET); - val32 = be32_to_cpu(readl(target)); - val32 |= PHB_SLOT_DISABLE; - writel(cpu_to_be32(val32), target); - readl(target); /* flush */ - } else { - /* Reset the timer */ - mod_timer(&tbl->watchdog_timer, jiffies + 2 * HZ); - } -} - -static void __init calgary_enable_translation(struct pci_dev *dev) -{ - u32 val32; - unsigned char busnum; - void __iomem *target; - void __iomem *bbar; - struct iommu_table *tbl; - - busnum = dev->bus->number; - tbl = dev->sysdata; - bbar = tbl->bbar; - - /* enable TCE in PHB Config Register */ - target = calgary_reg(bbar, phb_offset(busnum) | PHB_CONFIG_RW_OFFSET); - val32 = be32_to_cpu(readl(target)); - val32 |= PHB_TCE_ENABLE | PHB_DAC_DISABLE | PHB_MCSR_ENABLE; - - printk(KERN_INFO "Calgary: enabling translation on PHB %d\n", busnum); - printk(KERN_INFO "Calgary: errant DMAs will now be prevented on this " - "bus.\n"); - - writel(cpu_to_be32(val32), target); - readl(target); /* flush */ - - init_timer(&tbl->watchdog_timer); - tbl->watchdog_timer.function = &calgary_watchdog; - tbl->watchdog_timer.data = (unsigned long)dev; - mod_timer(&tbl->watchdog_timer, jiffies); -} - -static void __init calgary_disable_translation(struct pci_dev *dev) -{ - u32 val32; - unsigned char busnum; - void __iomem *target; - void __iomem *bbar; - struct iommu_table *tbl; - - busnum = dev->bus->number; - tbl = dev->sysdata; - bbar = tbl->bbar; - - /* disable TCE in PHB Config Register */ - target = calgary_reg(bbar, phb_offset(busnum) | PHB_CONFIG_RW_OFFSET); - val32 = be32_to_cpu(readl(target)); - val32 &= ~(PHB_TCE_ENABLE | PHB_DAC_DISABLE | PHB_MCSR_ENABLE); - - printk(KERN_INFO "Calgary: disabling translation on PHB %d!\n", busnum); - writel(cpu_to_be32(val32), target); - readl(target); /* flush */ - - del_timer_sync(&tbl->watchdog_timer); -} - -static inline unsigned int __init locate_register_space(struct pci_dev *dev) -{ - int rionodeid; - u32 address; - - /* - * Each Calgary has four busses. The first four busses (first Calgary) - * have RIO node ID 2, then the next four (second Calgary) have RIO - * node ID 3, the next four (third Calgary) have node ID 2 again, etc. - * We use a gross hack - relying on the dev->bus->number ordering, - * modulo 14 - to decide which Calgary a given bus is on. Busses 0, 1, - * 2 and 4 are on the first Calgary (id 2), 6, 8, a and c are on the - * second (id 3), and then it repeats modulo 14. - */ - rionodeid = (dev->bus->number % 14 > 4) ? 3 : 2; - /* - * register space address calculation as follows: - * FE0MB-8MB*OneBasedChassisNumber+1MB*(RioNodeId-ChassisBase) - * ChassisBase is always zero for x366/x260/x460 - * RioNodeId is 2 for first Calgary, 3 for second Calgary - */ - address = START_ADDRESS - - (0x800000 * (ONE_BASED_CHASSIS_NUM + dev->bus->number / 14)) + - (0x100000) * (rionodeid - CHASSIS_BASE); - return address; -} - -static int __init calgary_init_one_nontraslated(struct pci_dev *dev) -{ - dev->sysdata = NULL; - dev->bus->self = dev; - - return 0; -} - -static int __init calgary_init_one(struct pci_dev *dev) -{ - u32 address; - void __iomem *bbar; - int ret; - - address = locate_register_space(dev); - /* map entire 1MB of Calgary config space */ - bbar = ioremap_nocache(address, 1024 * 1024); - if (!bbar) { - ret = -ENODATA; - goto done; - } - - ret = calgary_setup_tar(dev, bbar); - if (ret) - goto iounmap; - - dev->bus->self = dev; - calgary_enable_translation(dev); - - return 0; - -iounmap: - iounmap(bbar); -done: - return ret; -} - -static int __init calgary_init(void) -{ - int i, ret = -ENODEV; - struct pci_dev *dev = NULL; - - for (i = 0; i < MAX_PHB_BUS_NUM; i++) { - dev = pci_get_device(PCI_VENDOR_ID_IBM, - PCI_DEVICE_ID_IBM_CALGARY, - dev); - if (!dev) - break; - if (!translate_phb(dev)) { - calgary_init_one_nontraslated(dev); - continue; - } - if (!tce_table_kva[dev->bus->number] && !translate_empty_slots) { - pci_dev_put(dev); - continue; - } - ret = calgary_init_one(dev); - if (ret) - goto error; - } - - return ret; - -error: - for (i--; i >= 0; i--) { - dev = pci_find_device_reverse(PCI_VENDOR_ID_IBM, - PCI_DEVICE_ID_IBM_CALGARY, - dev); - if (!translate_phb(dev)) { - pci_dev_put(dev); - continue; - } - if (!tce_table_kva[dev->bus->number] && !translate_empty_slots) - continue; - calgary_disable_translation(dev); - calgary_free_tar(dev); - pci_dev_put(dev); - } - - return ret; -} - -static inline int __init determine_tce_table_size(u64 ram) -{ - int ret; - - if (specified_table_size != TCE_TABLE_SIZE_UNSPECIFIED) - return specified_table_size; - - /* - * Table sizes are from 0 to 7 (TCE_TABLE_SIZE_64K to - * TCE_TABLE_SIZE_8M). Table size 0 has 8K entries and each - * larger table size has twice as many entries, so shift the - * max ram address by 13 to divide by 8K and then look at the - * order of the result to choose between 0-7. - */ - ret = get_order(ram >> 13); - if (ret > TCE_TABLE_SIZE_8M) - ret = TCE_TABLE_SIZE_8M; - - return ret; -} - -void __init detect_calgary(void) -{ - u32 val; - int bus; - void *tbl; - int calgary_found = 0; - int phb = -1; - - /* - * if the user specified iommu=off or iommu=soft or we found - * another HW IOMMU already, bail out. - */ - if (swiotlb || no_iommu || iommu_detected) - return; - - specified_table_size = determine_tce_table_size(end_pfn * PAGE_SIZE); - - for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { - int dev; - - tce_table_kva[bus] = NULL; - bus_to_phb[bus] = -1; - - if (read_pci_config(bus, 0, 0, 0) != PCI_VENDOR_DEVICE_ID_CALGARY) - continue; - - /* - * There are 4 PHBs per Calgary chip. Set phb to which phb (0-3) - * it is connected to releative to the clagary chip. - */ - phb = (phb + 1) % PHBS_PER_CALGARY; - - if (test_bit(bus, translation_disabled)) { - printk(KERN_INFO "Calgary: translation is disabled for " - "PHB 0x%x\n", bus); - /* skip this phb, don't allocate a tbl for it */ - continue; - } - /* - * Scan the slots of the PCI bus to see if there is a device present. - * The parent bus will be the zero-ith device, so start at 1. - */ - for (dev = 1; dev < 8; dev++) { - val = read_pci_config(bus, dev, 0, 0); - if (val != 0xffffffff || translate_empty_slots) { - tbl = alloc_tce_table(); - if (!tbl) - goto cleanup; - tce_table_kva[bus] = tbl; - bus_to_phb[bus] = phb; - calgary_found = 1; - break; - } - } - } - - if (calgary_found) { - iommu_detected = 1; - calgary_detected = 1; - printk(KERN_INFO "PCI-DMA: Calgary IOMMU detected. " - "TCE table spec is %d.\n", specified_table_size); - } - return; - -cleanup: - for (--bus; bus >= 0; --bus) - if (tce_table_kva[bus]) - free_tce_table(tce_table_kva[bus]); -} - -int __init calgary_iommu_init(void) -{ - int ret; - - if (no_iommu || swiotlb) - return -ENODEV; - - if (!calgary_detected) - return -ENODEV; - - /* ok, we're trying to use Calgary - let's roll */ - printk(KERN_INFO "PCI-DMA: Using Calgary IOMMU\n"); - - ret = calgary_init(); - if (ret) { - printk(KERN_ERR "PCI-DMA: Calgary init failed %d, " - "falling back to no_iommu\n", ret); - if (end_pfn > MAX_DMA32_PFN) - printk(KERN_ERR "WARNING more than 4GB of memory, " - "32bit PCI may malfunction.\n"); - return ret; - } - - force_iommu = 1; - dma_ops = &calgary_dma_ops; - - return 0; -} - -static int __init calgary_parse_options(char *p) -{ - unsigned int bridge; - size_t len; - char* endp; - - while (*p) { - if (!strncmp(p, "64k", 3)) - specified_table_size = TCE_TABLE_SIZE_64K; - else if (!strncmp(p, "128k", 4)) - specified_table_size = TCE_TABLE_SIZE_128K; - else if (!strncmp(p, "256k", 4)) - specified_table_size = TCE_TABLE_SIZE_256K; - else if (!strncmp(p, "512k", 4)) - specified_table_size = TCE_TABLE_SIZE_512K; - else if (!strncmp(p, "1M", 2)) - specified_table_size = TCE_TABLE_SIZE_1M; - else if (!strncmp(p, "2M", 2)) - specified_table_size = TCE_TABLE_SIZE_2M; - else if (!strncmp(p, "4M", 2)) - specified_table_size = TCE_TABLE_SIZE_4M; - else if (!strncmp(p, "8M", 2)) - specified_table_size = TCE_TABLE_SIZE_8M; - - len = strlen("translate_empty_slots"); - if (!strncmp(p, "translate_empty_slots", len)) - translate_empty_slots = 1; - - len = strlen("disable"); - if (!strncmp(p, "disable", len)) { - p += len; - if (*p == '=') - ++p; - if (*p == '\0') - break; - bridge = simple_strtol(p, &endp, 0); - if (p == endp) - break; - - if (bridge < MAX_PHB_BUS_NUM) { - printk(KERN_INFO "Calgary: disabling " - "translation for PHB 0x%x\n", bridge); - set_bit(bridge, translation_disabled); - } - } - - p = strpbrk(p, ","); - if (!p) - break; - - p++; /* skip ',' */ - } - return 1; -} -__setup("calgary=", calgary_parse_options); diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 9c44f4f24..a9275c955 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c @@ -9,7 +9,6 @@ #include #include #include -#include int iommu_merge __read_mostly = 0; EXPORT_SYMBOL(iommu_merge); @@ -34,15 +33,12 @@ int panic_on_overflow __read_mostly = 0; int force_iommu __read_mostly= 0; #endif -/* Set this to 1 if there is a HW IOMMU in the system */ -int iommu_detected __read_mostly = 0; - /* Dummy device used for NULL arguments (normally ISA). Better would be probably a smaller DMA mask, but this is bug-to-bug compatible to i386. */ struct device fallback_dev = { .bus_id = "fallback device", - .coherent_dma_mask = DMA_32BIT_MASK, + .coherent_dma_mask = 0xffffffff, .dma_mask = &fallback_dev.coherent_dma_mask, }; @@ -81,7 +77,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, dev = &fallback_dev; dma_mask = dev->coherent_dma_mask; if (dma_mask == 0) - dma_mask = DMA_32BIT_MASK; + dma_mask = 0xffffffff; /* Don't invoke OOM killer */ gfp |= __GFP_NORETRY; @@ -94,7 +90,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, larger than 16MB and in this case we have a chance of finding fitting memory in the next higher zone first. If not retry with true GFP_DMA. -AK */ - if (dma_mask <= DMA_32BIT_MASK) + if (dma_mask <= 0xffffffff) gfp |= GFP_DMA32; again: @@ -115,7 +111,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, /* Don't use the 16MB ZONE_DMA unless absolutely needed. It's better to use remapping first. */ - if (dma_mask < DMA_32BIT_MASK && !(gfp & GFP_DMA)) { + if (dma_mask < 0xffffffff && !(gfp & GFP_DMA)) { gfp = (gfp & ~GFP_DMA32) | GFP_DMA; goto again; } @@ -178,7 +174,7 @@ int dma_supported(struct device *dev, u64 mask) /* Copied from i386. Doesn't make much sense, because it will only work for pci_alloc_coherent. The caller just has to use GFP_DMA in this case. */ - if (mask < DMA_24BIT_MASK) + if (mask < 0x00ffffff) return 0; /* Tell the device to use SAC when IOMMU force is on. This @@ -193,7 +189,7 @@ int dma_supported(struct device *dev, u64 mask) SAC for these. Assume all masks <= 40 bits are of this type. Normally this doesn't make any difference, but gives more gentle handling of IOMMU overflow. */ - if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { + if (iommu_sac_force && (mask >= 0xffffffffffULL)) { printk(KERN_INFO "%s: Force SAC with mask %Lx\n", dev->bus_id,mask); return 0; } @@ -270,7 +266,7 @@ __init int iommu_setup(char *p) swiotlb = 1; #endif -#ifdef CONFIG_IOMMU +#ifdef CONFIG_GART_IOMMU gart_parse_options(p); #endif @@ -280,40 +276,3 @@ __init int iommu_setup(char *p) } return 1; } -__setup("iommu=", iommu_setup); - -void __init pci_iommu_alloc(void) -{ - /* - * The order of these functions is important for - * fall-back/fail-over reasons - */ -#ifdef CONFIG_IOMMU - iommu_hole_init(); -#endif - -#ifdef CONFIG_CALGARY_IOMMU - detect_calgary(); -#endif - -#ifdef CONFIG_SWIOTLB - pci_swiotlb_init(); -#endif -} - -static int __init pci_iommu_init(void) -{ -#ifdef CONFIG_CALGARY_IOMMU - calgary_iommu_init(); -#endif - -#ifdef CONFIG_IOMMU - gart_iommu_init(); -#endif - - no_iommu_init(); - return 0; -} - -/* Must execute after PCI subsystem */ -fs_initcall(pci_iommu_init); diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 6d3e61baf..82a7c9bfd 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c @@ -10,6 +10,7 @@ * Copyright 2002 Andi Kleen, SuSE Labs. */ +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include unsigned long iommu_bus_base; /* GART remapping area (physical) */ static unsigned long iommu_size; /* size of remapping area bytes */ @@ -46,6 +46,8 @@ u32 *iommu_gatt_base; /* Remapping table */ also seen with Qlogic at least). */ int iommu_fullflush = 1; +#define MAX_NB 8 + /* Allocation bitmap for the remapping area */ static DEFINE_SPINLOCK(iommu_bitmap_lock); static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */ @@ -61,6 +63,13 @@ static u32 gart_unmapped_entry; #define to_pages(addr,size) \ (round_up(((addr) & ~PAGE_MASK) + (size), PAGE_SIZE) >> PAGE_SHIFT) +#define for_all_nb(dev) \ + dev = NULL; \ + while ((dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1103, dev))!=NULL) + +static struct pci_dev *northbridges[MAX_NB]; +static u32 northbridge_flush_word[MAX_NB]; + #define EMERGENCY_PAGES 32 /* = 128KB */ #ifdef CONFIG_AGP @@ -84,7 +93,7 @@ static unsigned long alloc_iommu(int size) offset = find_next_zero_string(iommu_gart_bitmap,next_bit,iommu_pages,size); if (offset == -1) { need_flush = 1; - offset = find_next_zero_string(iommu_gart_bitmap,0,iommu_pages,size); + offset = find_next_zero_string(iommu_gart_bitmap,0,next_bit,size); } if (offset != -1) { set_bit_string(iommu_gart_bitmap, offset, size); @@ -111,17 +120,44 @@ static void free_iommu(unsigned long offset, int size) /* * Use global flush state to avoid races with multiple flushers. */ -static void flush_gart(void) +static void flush_gart(struct device *dev) { unsigned long flags; + int flushed = 0; + int i, max; + spin_lock_irqsave(&iommu_bitmap_lock, flags); - if (need_flush) { - k8_flush_garts(); + if (need_flush) { + max = 0; + for (i = 0; i < MAX_NB; i++) { + if (!northbridges[i]) + continue; + pci_write_config_dword(northbridges[i], 0x9c, + northbridge_flush_word[i] | 1); + flushed++; + max = i; + } + for (i = 0; i <= max; i++) { + u32 w; + if (!northbridges[i]) + continue; + /* Make sure the hardware actually executed the flush. */ + for (;;) { + pci_read_config_dword(northbridges[i], 0x9c, &w); + if (!(w & 1)) + break; + cpu_relax(); + } + } + if (!flushed) + printk("nothing to flush?\n"); need_flush = 0; } spin_unlock_irqrestore(&iommu_bitmap_lock, flags); } + + #ifdef CONFIG_IOMMU_LEAK #define SET_LEAK(x) if (iommu_leak_tab) \ @@ -230,7 +266,7 @@ static dma_addr_t gart_map_simple(struct device *dev, char *buf, size_t size, int dir) { dma_addr_t map = dma_map_area(dev, virt_to_bus(buf), size, dir); - flush_gart(); + flush_gart(dev); return map; } @@ -252,28 +288,6 @@ dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir) return bus; } -/* - * Free a DMA mapping. - */ -void gart_unmap_single(struct device *dev, dma_addr_t dma_addr, - size_t size, int direction) -{ - unsigned long iommu_page; - int npages; - int i; - - if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE || - dma_addr >= iommu_bus_base + iommu_size) - return; - iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT; - npages = to_pages(dma_addr, size); - for (i = 0; i < npages; i++) { - iommu_gatt_base[iommu_page + i] = gart_unmapped_entry; - CLEAR_LEAK(iommu_page + i); - } - free_iommu(iommu_page, npages); -} - /* * Wrapper for pci_unmap_single working with scatterlists. */ @@ -285,7 +299,7 @@ void gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int di struct scatterlist *s = &sg[i]; if (!s->dma_length || !s->length) break; - gart_unmap_single(dev, s->dma_address, s->dma_length, dir); + dma_unmap_single(dev, s->dma_address, s->dma_length, dir); } } @@ -315,7 +329,7 @@ static int dma_map_sg_nonforce(struct device *dev, struct scatterlist *sg, s->dma_address = addr; s->dma_length = s->length; } - flush_gart(); + flush_gart(dev); return nents; } @@ -422,13 +436,13 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) if (dma_map_cont(sg, start, i, sg+out, pages, need) < 0) goto error; out++; - flush_gart(); + flush_gart(dev); if (out < nents) sg[out].dma_length = 0; return out; error: - flush_gart(); + flush_gart(NULL); gart_unmap_sg(dev, sg, nents, dir); /* When it was forced or merged try again in a dumb way */ if (force_iommu || iommu_merge) { @@ -444,6 +458,28 @@ error: return 0; } +/* + * Free a DMA mapping. + */ +void gart_unmap_single(struct device *dev, dma_addr_t dma_addr, + size_t size, int direction) +{ + unsigned long iommu_page; + int npages; + int i; + + if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE || + dma_addr >= iommu_bus_base + iommu_size) + return; + iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT; + npages = to_pages(dma_addr, size); + for (i = 0; i < npages; i++) { + iommu_gatt_base[iommu_page + i] = gart_unmapped_entry; + CLEAR_LEAK(iommu_page + i); + } + free_iommu(iommu_page, npages); +} + static int no_agp; static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) @@ -496,13 +532,10 @@ static __init int init_k8_gatt(struct agp_kern_info *info) void *gatt; unsigned aper_base, new_aper_base; unsigned aper_size, gatt_size, new_aper_size; - int i; - + printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); aper_size = aper_base = info->aper_size = 0; - dev = NULL; - for (i = 0; i < num_k8_northbridges; i++) { - dev = k8_northbridges[i]; + for_all_nb(dev) { new_aper_base = read_aperture(dev, &new_aper_size); if (!new_aper_base) goto nommu; @@ -525,12 +558,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info) panic("Cannot allocate GATT table"); memset(gatt, 0, gatt_size); agp_gatt_table = gatt; - - for (i = 0; i < num_k8_northbridges; i++) { + + for_all_nb(dev) { u32 ctl; u32 gatt_reg; - dev = k8_northbridges[i]; gatt_reg = __pa(gatt) >> 12; gatt_reg <<= 4; pci_write_config_dword(dev, 0x98, gatt_reg); @@ -541,7 +573,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info) pci_write_config_dword(dev, 0x90, ctl); } - flush_gart(); + flush_gart(NULL); printk("PCI-DMA: aperture base @ %x size %u KB\n",aper_base, aper_size>>10); return 0; @@ -570,19 +602,15 @@ static struct dma_mapping_ops gart_dma_ops = { .unmap_sg = gart_unmap_sg, }; -void __init gart_iommu_init(void) +static int __init pci_iommu_init(void) { struct agp_kern_info info; unsigned long aper_size; unsigned long iommu_start; + struct pci_dev *dev; unsigned long scratch; long i; - if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) { - printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n"); - return; - } - #ifndef CONFIG_AGP_AMD64 no_agp = 1; #else @@ -594,11 +622,7 @@ void __init gart_iommu_init(void) #endif if (swiotlb) - return; - - /* Did we detect a different HW IOMMU? */ - if (iommu_detected && !iommu_aperture) - return; + return -1; if (no_iommu || (!force_iommu && end_pfn <= MAX_DMA32_PFN) || @@ -610,7 +634,15 @@ void __init gart_iommu_init(void) "but IOMMU not available.\n" KERN_ERR "WARNING 32bit PCI may malfunction.\n"); } - return; + return -1; + } + + i = 0; + for_all_nb(dev) + i++; + if (i > MAX_NB) { + printk(KERN_ERR "PCI-GART: Too many northbridges (%ld). Disabled\n", i); + return -1; } printk(KERN_INFO "PCI-DMA: using GART IOMMU.\n"); @@ -675,10 +707,26 @@ void __init gart_iommu_init(void) for (i = EMERGENCY_PAGES; i < iommu_pages; i++) iommu_gatt_base[i] = gart_unmapped_entry; - flush_gart(); + for_all_nb(dev) { + u32 flag; + int cpu = PCI_SLOT(dev->devfn) - 24; + if (cpu >= MAX_NB) + continue; + northbridges[cpu] = dev; + pci_read_config_dword(dev, 0x9c, &flag); /* cache flush word */ + northbridge_flush_word[cpu] = flag; + } + + flush_gart(NULL); + dma_ops = &gart_dma_ops; + + return 0; } +/* Must execute after PCI subsystem */ +fs_initcall(pci_iommu_init); + void gart_parse_options(char *p) { int arg; diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c index aad7609d8..1f6ecc620 100644 --- a/arch/x86_64/kernel/pci-nommu.c +++ b/arch/x86_64/kernel/pci-nommu.c @@ -4,8 +4,6 @@ #include #include #include -#include - #include #include #include @@ -14,11 +12,10 @@ static int check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) { if (hwdev && bus + size > *hwdev->dma_mask) { - if (*hwdev->dma_mask >= DMA_32BIT_MASK) + if (*hwdev->dma_mask >= 0xffffffffULL) printk(KERN_ERR - "nommu_%s: overflow %Lx+%zu of device mask %Lx\n", - name, (long long)bus, size, - (long long)*hwdev->dma_mask); + "nommu_%s: overflow %Lx+%lu of device mask %Lx\n", + name, (long long)bus, size, (long long)*hwdev->dma_mask); return 0; } return 1; @@ -92,7 +89,5 @@ void __init no_iommu_init(void) { if (dma_ops) return; - - force_iommu = 0; /* no HW IOMMU */ dma_ops = &nommu_dma_ops; } diff --git a/arch/x86_64/kernel/pci-swiotlb.c b/arch/x86_64/kernel/pci-swiotlb.c index 6a55f87ba..990ed6789 100644 --- a/arch/x86_64/kernel/pci-swiotlb.c +++ b/arch/x86_64/kernel/pci-swiotlb.c @@ -31,10 +31,9 @@ struct dma_mapping_ops swiotlb_dma_ops = { void pci_swiotlb_init(void) { /* don't initialize swiotlb if iommu=off (no_iommu=1) */ - if (!iommu_detected && !no_iommu && end_pfn > MAX_DMA32_PFN) + if (!iommu_aperture && !no_iommu && + (end_pfn > MAX_DMA32_PFN || force_iommu)) swiotlb = 1; - if (swiotlb_force) - swiotlb = 1; if (swiotlb) { printk(KERN_INFO "PCI-DMA: Using software bounce buffering for IO (SWIOTLB)\n"); swiotlb_init(); diff --git a/arch/x86_64/kernel/pmtimer.c b/arch/x86_64/kernel/pmtimer.c index 7554458dc..07340aecf 100644 --- a/arch/x86_64/kernel/pmtimer.c +++ b/arch/x86_64/kernel/pmtimer.c @@ -27,7 +27,7 @@ /* The I/O port the PMTMR resides at. * The location is detected during setup_arch(), * in arch/i386/kernel/acpi/boot.c */ -u32 pmtmr_ioport __read_mostly; +u32 pmtmr_ioport; /* value of the Power timer at last timer interrupt */ static u32 offset_delay; @@ -60,7 +60,9 @@ int pmtimer_mark_offset(void) delta = cyc2us((tick - last_pmtmr_tick) & ACPI_PM_MASK); last_pmtmr_tick = tick; +#ifndef CONFIG_XEN monotonic_base += delta * NSEC_PER_USEC; +#endif delta += offset_delay; diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 583d96f22..051ad1117 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c @@ -10,6 +10,7 @@ * Andi Kleen. * * CPU hotplug support - ashok.raj@intel.com + * $Id: process.c,v 1.38 2002/01/15 10:08:03 ak Exp $ */ /* @@ -63,7 +64,6 @@ EXPORT_SYMBOL(boot_option_idle_override); * Powermanagement idle function, if any.. */ void (*pm_idle)(void); -EXPORT_SYMBOL(pm_idle); static DEFINE_PER_CPU(unsigned int, cpu_idle_state); static ATOMIC_NOTIFIER_HEAD(idle_notifier); @@ -111,7 +111,7 @@ static void default_idle(void) { local_irq_enable(); - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); while (!need_resched()) { local_irq_disable(); @@ -120,7 +120,7 @@ static void default_idle(void) else local_irq_enable(); } - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); } /* @@ -203,7 +203,8 @@ static inline void play_dead(void) */ void cpu_idle (void) { - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); + /* endless idle loop with no priority at all */ while (1) { while (!need_resched()) { @@ -296,7 +297,7 @@ void __show_regs(struct pt_regs * regs) system_utsname.version); printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); printk_address(regs->rip); - printk("RSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, + printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); printk("RAX: %016lx RBX: %016lx RCX: %016lx\n", regs->rax, regs->rbx, regs->rcx); @@ -334,7 +335,7 @@ void show_regs(struct pt_regs *regs) { printk("CPU %d:", smp_processor_id()); __show_regs(regs); - show_trace(NULL, regs, (void *)(regs + 1)); + show_trace(®s->rsp); } /* @@ -364,11 +365,8 @@ void flush_thread(void) struct task_struct *tsk = current; struct thread_info *t = current_thread_info(); - if (t->flags & _TIF_ABI_PENDING) { + if (t->flags & _TIF_ABI_PENDING) t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); - if (t->flags & _TIF_IA32) - current_thread_info()->status |= TS_COMPAT; - } tsk->thread.debugreg0 = 0; tsk->thread.debugreg1 = 0; @@ -571,9 +569,6 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) prev->gsindex = gsindex; } - /* Must be after DS reload */ - unlazy_fpu(prev_p); - /* * Switch the PDA and FPU contexts. */ @@ -581,6 +576,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) write_pda(oldrsp, next->userrsp); write_pda(pcurrent, next_p); + /* This must be here to ensure both math_state_restore() and + kernel_fpu_begin() work consistently. + And the AMD workaround requires it to be after DS reload. */ + unlazy_fpu(prev_p); write_pda(kernelstack, task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index 2d6769847..57117b8be 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c @@ -20,7 +20,6 @@ * Power off function, if any */ void (*pm_power_off)(void); -EXPORT_SYMBOL(pm_power_off); static long no_idt[3]; static enum { diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 40a74d489..e8d5f8441 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -5,6 +5,8 @@ * * Nov 2001 Dave Jones * Forked from i386 setup code. + * + * $Id$ */ /* @@ -21,9 +23,10 @@ #include #include #include -#include +#include #include #include +#include #include #include #include @@ -62,7 +65,9 @@ #include #include #include +#include #include +#include #include /* @@ -70,7 +75,6 @@ */ struct cpuinfo_x86 boot_cpu_data __read_mostly; -EXPORT_SYMBOL(boot_cpu_data); unsigned long mmu_cr4_features; @@ -99,14 +103,12 @@ char dmi_alloc_data[DMI_MAX_DATA]; * Setup options */ struct screen_info screen_info; -EXPORT_SYMBOL(screen_info); struct sys_desc_table_struct { unsigned short length; unsigned char table[0]; }; struct edid_info edid_info; -EXPORT_SYMBOL_GPL(edid_info); struct e820map e820; extern int root_mountflags; @@ -471,6 +473,80 @@ contig_initmem_init(unsigned long start_pfn, unsigned long end_pfn) } #endif +/* Use inline assembly to define this because the nops are defined + as inline assembly strings in the include files and we cannot + get them easily into strings. */ +asm("\t.data\nk8nops: " + K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 + K8_NOP7 K8_NOP8); + +extern unsigned char k8nops[]; +static unsigned char *k8_nops[ASM_NOP_MAX+1] = { + NULL, + k8nops, + k8nops + 1, + k8nops + 1 + 2, + k8nops + 1 + 2 + 3, + k8nops + 1 + 2 + 3 + 4, + k8nops + 1 + 2 + 3 + 4 + 5, + k8nops + 1 + 2 + 3 + 4 + 5 + 6, + k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, +}; + +extern char __vsyscall_0; + +/* Replace instructions with better alternatives for this CPU type. + + This runs before SMP is initialized to avoid SMP problems with + self modifying code. This implies that assymetric systems where + APs have less capabilities than the boot processor are not handled. + In this case boot with "noreplacement". */ +void apply_alternatives(void *start, void *end) +{ + struct alt_instr *a; + int diff, i, k; + for (a = start; (void *)a < end; a++) { + u8 *instr; + + if (!boot_cpu_has(a->cpuid)) + continue; + + BUG_ON(a->replacementlen > a->instrlen); + instr = a->instr; + /* vsyscall code is not mapped yet. resolve it manually. */ + if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END) + instr = __va(instr - (u8*)VSYSCALL_START + (u8*)__pa_symbol(&__vsyscall_0)); + __inline_memcpy(instr, a->replacement, a->replacementlen); + diff = a->instrlen - a->replacementlen; + + /* Pad the rest with nops */ + for (i = a->replacementlen; diff > 0; diff -= k, i += k) { + k = diff; + if (k > ASM_NOP_MAX) + k = ASM_NOP_MAX; + __inline_memcpy(instr + i, k8_nops[k], k); + } + } +} + +static int no_replacement __initdata = 0; + +void __init alternative_instructions(void) +{ + extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; + if (no_replacement) + return; + apply_alternatives(__alt_instructions, __alt_instructions_end); +} + +static int __init noreplacement_setup(char *s) +{ + no_replacement = 1; + return 1; +} + +__setup("noreplacement", noreplacement_setup); + #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) struct edd edd; #ifdef CONFIG_EDD_MODULE @@ -521,6 +597,8 @@ static void discover_ebda(void) void __init setup_arch(char **cmdline_p) { + unsigned long kernel_end; + ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); screen_info = SCREEN_INFO; edid_info = EDID_INFO; @@ -594,8 +672,8 @@ void __init setup_arch(char **cmdline_p) (table_end - table_start) << PAGE_SHIFT); /* reserve kernel */ - reserve_bootmem_generic(__pa_symbol(&_text), - __pa_symbol(&_end) - __pa_symbol(&_text)); + kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE); + reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY); /* * reserve physical page 0 - it's a special BIOS page on many boxes, @@ -650,7 +728,7 @@ void __init setup_arch(char **cmdline_p) #endif #ifdef CONFIG_KEXEC if (crashk_res.start != crashk_res.end) { - reserve_bootmem_generic(crashk_res.start, + reserve_bootmem(crashk_res.start, crashk_res.end - crashk_res.start + 1); } #endif @@ -689,7 +767,6 @@ void __init setup_arch(char **cmdline_p) */ probe_roms(); e820_reserve_resources(); - e820_mark_nosave_regions(); request_resource(&iomem_resource, &video_ram_resource); @@ -702,6 +779,10 @@ void __init setup_arch(char **cmdline_p) e820_setup_gap(); +#ifdef CONFIG_GART_IOMMU + iommu_hole_init(); +#endif + #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) conswitchp = &vga_con; @@ -786,32 +867,24 @@ static int nearby_node(int apicid) static void __init amd_detect_cmp(struct cpuinfo_x86 *c) { #ifdef CONFIG_SMP + int cpu = smp_processor_id(); unsigned bits; #ifdef CONFIG_NUMA - int cpu = smp_processor_id(); int node = 0; unsigned apicid = hard_smp_processor_id(); #endif - unsigned ecx = cpuid_ecx(0x80000008); - c->x86_max_cores = (ecx & 0xff) + 1; - - /* CPU telling us the core id bits shift? */ - bits = (ecx >> 12) & 0xF; - - /* Otherwise recompute */ - if (bits == 0) { - while ((1 << bits) < c->x86_max_cores) - bits++; - } + bits = 0; + while ((1 << bits) < c->x86_max_cores) + bits++; /* Low order bits define the core id (index of core in socket) */ - c->cpu_core_id = c->phys_proc_id & ((1 << bits)-1); + cpu_core_id[cpu] = phys_proc_id[cpu] & ((1 << bits)-1); /* Convert the APIC ID into the socket ID */ - c->phys_proc_id = phys_pkg_id(bits); + phys_proc_id[cpu] = phys_pkg_id(bits); #ifdef CONFIG_NUMA - node = c->phys_proc_id; + node = phys_proc_id[cpu]; if (apicid_to_node[apicid] != NUMA_NO_NODE) node = apicid_to_node[apicid]; if (!node_online(node)) { @@ -824,7 +897,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) but in the same order as the HT nodeids. If that doesn't result in a usable node fall back to the path for the previous case. */ - int ht_nodeid = apicid - (cpu_data[0].phys_proc_id << bits); + int ht_nodeid = apicid - (phys_proc_id[0] << bits); if (ht_nodeid >= 0 && apicid_to_node[ht_nodeid] != NUMA_NO_NODE) node = apicid_to_node[ht_nodeid]; @@ -834,13 +907,15 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) } numa_set_node(cpu, node); - printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node); + printk(KERN_INFO "CPU %d/%x(%d) -> Node %d -> Core %d\n", + cpu, apicid, c->x86_max_cores, node, cpu_core_id[cpu]); #endif #endif } -static void __init init_amd(struct cpuinfo_x86 *c) +static int __init init_amd(struct cpuinfo_x86 *c) { + int r; unsigned level; #ifdef CONFIG_SMP @@ -873,8 +948,8 @@ static void __init init_amd(struct cpuinfo_x86 *c) if (c->x86 >= 6) set_bit(X86_FEATURE_FXSAVE_LEAK, &c->x86_capability); - level = get_model_name(c); - if (!level) { + r = get_model_name(c); + if (!r) { switch (c->x86) { case 15: /* Should distinguish Models here, but this is only @@ -889,12 +964,13 @@ static void __init init_amd(struct cpuinfo_x86 *c) if (c->x86_power & (1<<8)) set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); - /* Multi core CPU? */ - if (c->extended_cpuid_level >= 0x80000008) + if (c->extended_cpuid_level >= 0x80000008) { + c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; + amd_detect_cmp(c); + } - /* Fix cpuid4 emulation for more */ - num_cache_leaves = 3; + return r; } static void __cpuinit detect_ht(struct cpuinfo_x86 *c) @@ -902,14 +978,13 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) #ifdef CONFIG_SMP u32 eax, ebx, ecx, edx; int index_msb, core_bits; + int cpu = smp_processor_id(); cpuid(1, &eax, &ebx, &ecx, &edx); - if (!cpu_has(c, X86_FEATURE_HT)) + if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) return; - if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) - goto out; smp_num_siblings = (ebx & 0xff0000) >> 16; @@ -924,7 +999,10 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) } index_msb = get_count_order(smp_num_siblings); - c->phys_proc_id = phys_pkg_id(index_msb); + phys_proc_id[cpu] = phys_pkg_id(index_msb); + + printk(KERN_INFO "CPU: Physical Processor ID: %d\n", + phys_proc_id[cpu]); smp_num_siblings = smp_num_siblings / c->x86_max_cores; @@ -932,15 +1010,13 @@ static void __cpuinit detect_ht(struct cpuinfo_x86 *c) core_bits = get_count_order(c->x86_max_cores); - c->cpu_core_id = phys_pkg_id(index_msb) & + cpu_core_id[cpu] = phys_pkg_id(index_msb) & ((1 << core_bits) - 1); - } -out: - if ((c->x86_max_cores * smp_num_siblings) > 1) { - printk(KERN_INFO "CPU: Physical Processor ID: %d\n", c->phys_proc_id); - printk(KERN_INFO "CPU: Processor Core ID: %d\n", c->cpu_core_id); - } + if (c->x86_max_cores > 1) + printk(KERN_INFO "CPU: Processor Core ID: %d\n", + cpu_core_id[cpu]); + } #endif } @@ -949,12 +1025,15 @@ out: */ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) { - unsigned int eax, t; + unsigned int eax; if (c->cpuid_level < 4) return 1; - cpuid_count(4, 0, &eax, &t, &t, &t); + __asm__("cpuid" + : "=a" (eax) + : "0" (4), "c" (0) + : "bx", "dx"); if (eax & 0x1f) return ((eax >> 26) + 1); @@ -967,17 +1046,16 @@ static void srat_detect_node(void) #ifdef CONFIG_NUMA unsigned node; int cpu = smp_processor_id(); - int apicid = hard_smp_processor_id(); /* Don't do the funky fallback heuristics the AMD version employs for now. */ - node = apicid_to_node[apicid]; + node = apicid_to_node[hard_smp_processor_id()]; if (node == NUMA_NO_NODE) node = first_node(node_online_map); numa_set_node(cpu, node); if (acpi_numa > 0) - printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node); + printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node); #endif } @@ -987,13 +1065,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) unsigned n; init_intel_cacheinfo(c); - if (c->cpuid_level > 9 ) { - unsigned eax = cpuid_eax(10); - /* Check for version and the number of counters */ - if ((eax & 0xff) && (((eax>>8) & 0xff) > 1)) - set_bit(X86_FEATURE_ARCH_PERFMON, &c->x86_capability); - } - n = c->extended_cpuid_level; if (n >= 0x80000008) { unsigned eax = cpuid_eax(0x80000008); @@ -1011,10 +1082,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) if ((c->x86 == 0xf && c->x86_model >= 0x03) || (c->x86 == 0x6 && c->x86_model >= 0x0e)) set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); - if (c->x86 == 15) - set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); - else - clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); + set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); c->x86_max_cores = intel_num_cpu_cores(c); srat_detect_node(); @@ -1088,7 +1156,7 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) } #ifdef CONFIG_SMP - c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; + phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff; #endif } @@ -1215,7 +1283,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL, - NULL, "fxsr_opt", NULL, "rdtscp", NULL, "lm", "3dnowext", "3dnow", + NULL, "fxsr_opt", "rdtscp", NULL, NULL, "lm", "3dnowext", "3dnow", /* Transmeta-defined */ "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, @@ -1226,7 +1294,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) /* Other (Linux-defined) */ "cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL, "constant_tsc", NULL, NULL, - "up", NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -1296,9 +1364,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) #ifdef CONFIG_SMP if (smp_num_siblings * c->x86_max_cores > 1) { int cpu = c - cpu_data; - seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); + seq_printf(m, "physical id\t: %d\n", phys_proc_id[cpu]); seq_printf(m, "siblings\t: %d\n", cpus_weight(cpu_core_map[cpu])); - seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id); + seq_printf(m, "core id\t\t: %d\n", cpu_core_id[cpu]); seq_printf(m, "cpu cores\t: %d\n", c->booted_cores); } #endif diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index f77c6ca86..189a7372e 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c @@ -3,7 +3,9 @@ * Copyright (C) 1995 Linus Torvalds * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen. * See setup.c for older changelog. + * $Id: setup64.c,v 1.12 2002/03/21 10:09:17 ak Exp $ */ +#include #include #include #include @@ -29,7 +31,6 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,}; cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly; -EXPORT_SYMBOL(_cpu_pda); struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned; struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; @@ -37,7 +38,6 @@ struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table }; char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); unsigned long __supported_pte_mask __read_mostly = ~0UL; -EXPORT_SYMBOL(__supported_pte_mask); static int do_not_nx __cpuinitdata = 0; /* noexec=on|off @@ -168,7 +168,6 @@ void __cpuinit cpu_init (void) { int cpu = stack_smp_processor_id(); struct tss_struct *t = &per_cpu(init_tss, cpu); - struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu); unsigned long v; char *estacks = NULL; struct task_struct *me; @@ -236,7 +235,7 @@ void __cpuinit cpu_init (void) estacks += EXCEPTION_STKSZ; break; } - orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks; + t->ist[v] = (unsigned long)estacks; } t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 7f58bc9a0..e5f5ce790 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c @@ -7,6 +7,8 @@ * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes * 2000-2002 x86-64 support by Andi Kleen + * + * $Id: signal.c,v 1.18 2001/10/17 22:30:37 ak Exp $ */ #include @@ -37,6 +39,37 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, int ia32_setup_frame(int sig, struct k_sigaction *ka, sigset_t *set, struct pt_regs * regs); +asmlinkage long +sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, struct pt_regs *regs) +{ + sigset_t saveset, newset; + + /* XXX: Don't preclude handling different sized sigset_t's. */ + if (sigsetsize != sizeof(sigset_t)) + return -EINVAL; + + if (copy_from_user(&newset, unewset, sizeof(newset))) + return -EFAULT; + sigdelsetmask(&newset, ~_BLOCKABLE); + + spin_lock_irq(¤t->sighand->siglock); + saveset = current->blocked; + current->blocked = newset; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); +#ifdef DEBUG_SIG + printk("rt_sigsuspend savset(%lx) newset(%lx) regs(%p) rip(%lx)\n", + saveset, newset, regs, regs->rip); +#endif + regs->rax = -EINTR; + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(regs, &saveset)) + return -EINTR; + } +} + asmlinkage long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, struct pt_regs *regs) @@ -206,6 +239,7 @@ get_stack(struct k_sigaction *ka, struct pt_regs *regs, unsigned long size) rsp = regs->rsp - 128; /* This is the X/Open sanctioned signal stack switching. */ + /* RED-PEN: redzone on that stack? */ if (ka->sa.sa_flags & SA_ONSTACK) { if (sas_ss_flags(rsp) == 0) rsp = current->sas_ss_sp + current->sas_ss_size; @@ -310,11 +344,11 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, current->comm, current->pid, frame, regs->rip, frame->pretcode); #endif - return 0; + return 1; give_sigsegv: force_sigsegv(sig, current); - return -EFAULT; + return 0; } /* @@ -377,7 +411,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, #endif ret = setup_rt_frame(sig, ka, info, oldset, regs); - if (ret == 0) { + if (ret) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); if (!(ka->sa.sa_flags & SA_NODEFER)) @@ -394,12 +428,11 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -static void do_signal(struct pt_regs *regs) +int do_signal(struct pt_regs *regs, sigset_t *oldset) { struct k_sigaction ka; siginfo_t info; int signr; - sigset_t *oldset; /* * We want the common case to go fast, which @@ -408,11 +441,9 @@ static void do_signal(struct pt_regs *regs) * if so. */ if (!user_mode(regs)) - return; + return 1; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else + if (!oldset) oldset = ¤t->blocked; signr = get_signal_to_deliver(&info, &ka, regs, NULL); @@ -426,46 +457,30 @@ static void do_signal(struct pt_regs *regs) set_debugreg(current->thread.debugreg7, 7); /* Whee! Actually deliver the signal. */ - if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { - /* a signal was successfully delivered; the saved - * sigmask will have been stored in the signal frame, - * and will be restored by sigreturn, so we can simply - * clear the TIF_RESTORE_SIGMASK flag */ - clear_thread_flag(TIF_RESTORE_SIGMASK); - } - return; + return handle_signal(signr, &info, &ka, oldset, regs); } /* Did we come from a system call? */ if ((long)regs->orig_rax >= 0) { /* Restart the system call - no handlers present */ long res = regs->rax; - switch (res) { - case -ERESTARTNOHAND: - case -ERESTARTSYS: - case -ERESTARTNOINTR: + if (res == -ERESTARTNOHAND || + res == -ERESTARTSYS || + res == -ERESTARTNOINTR) { regs->rax = regs->orig_rax; regs->rip -= 2; - break; - case -ERESTART_RESTARTBLOCK: + } + if (regs->rax == (unsigned long)-ERESTART_RESTARTBLOCK) { regs->rax = test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall; regs->rip -= 2; - break; } } - - /* if there's no signal to deliver, we just put the saved sigmask - back. */ - if (test_thread_flag(TIF_RESTORE_SIGMASK)) { - clear_thread_flag(TIF_RESTORE_SIGMASK); - sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); - } + return 0; } -void -do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) +void do_notify_resume(struct pt_regs *regs, sigset_t *oldset, __u32 thread_info_flags) { #ifdef DEBUG_SIG printk("do_notify_resume flags:%x rip:%lx rsp:%lx caller:%lx pending:%lx\n", @@ -479,8 +494,8 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) } /* deal with pending signal delivery */ - if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK)) - do_signal(regs); + if (thread_info_flags & _TIF_SIGPENDING) + do_signal(regs,oldset); } void signal_fault(struct pt_regs *regs, void __user *frame, char *where) diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 06af6ca60..e13938d24 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c @@ -203,7 +203,7 @@ int __cpuinit init_smp_flush(void) { int i; for_each_cpu_mask(i, cpu_possible_map) { - spin_lock_init(&per_cpu(flush_state, i).tlbstate_lock); + spin_lock_init(&per_cpu(flush_state.tlbstate_lock, i)); } return 0; } @@ -224,7 +224,6 @@ void flush_tlb_current_task(void) flush_tlb_others(cpu_mask, mm, FLUSH_ALL); preempt_enable(); } -EXPORT_SYMBOL(flush_tlb_current_task); void flush_tlb_mm (struct mm_struct * mm) { @@ -245,7 +244,6 @@ void flush_tlb_mm (struct mm_struct * mm) preempt_enable(); } -EXPORT_SYMBOL(flush_tlb_mm); void flush_tlb_page(struct vm_area_struct * vma, unsigned long va) { @@ -268,7 +266,6 @@ void flush_tlb_page(struct vm_area_struct * vma, unsigned long va) preempt_enable(); } -EXPORT_SYMBOL(flush_tlb_page); static void do_flush_tlb_all(void* info) { @@ -446,7 +443,6 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, spin_unlock(&call_lock); return 0; } -EXPORT_SYMBOL(smp_call_function); void smp_stop_cpu(void) { @@ -464,7 +460,7 @@ static void smp_really_stop_cpu(void *dummy) { smp_stop_cpu(); for (;;) - halt(); + asm("hlt"); } void smp_send_stop(void) @@ -474,7 +470,7 @@ void smp_send_stop(void) return; /* Don't deadlock on the call lock in panic */ if (!spin_trylock(&call_lock)) { - /* ignore locking because we have panicked anyways */ + /* ignore locking because we have paniced anyways */ nolock = 1; } __smp_call_function(smp_really_stop_cpu, NULL, 0, 0); @@ -524,13 +520,13 @@ asmlinkage void smp_call_function_interrupt(void) int safe_smp_processor_id(void) { - unsigned apicid, i; + int apicid, i; if (disable_apic) return 0; apicid = hard_smp_processor_id(); - if (apicid < NR_CPUS && x86_cpu_to_apicid[apicid] == apicid) + if (x86_cpu_to_apicid[apicid] == apicid) return apicid; for (i = 0; i < NR_CPUS; ++i) { diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 975380207..28e351d00 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -38,6 +38,7 @@ */ +#include #include #include @@ -62,11 +63,13 @@ /* Number of siblings per CPU package */ int smp_num_siblings = 1; -EXPORT_SYMBOL(smp_num_siblings); +/* Package ID of each logical CPU */ +u8 phys_proc_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; +/* core ID of each logical CPU */ +u8 cpu_core_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; /* Last level cache ID of each logical CPU */ u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; -EXPORT_SYMBOL(cpu_llc_id); /* Bitmask of currently online CPUs */ cpumask_t cpu_online_map __read_mostly; @@ -79,21 +82,18 @@ EXPORT_SYMBOL(cpu_online_map); */ cpumask_t cpu_callin_map; cpumask_t cpu_callout_map; -EXPORT_SYMBOL(cpu_callout_map); cpumask_t cpu_possible_map; EXPORT_SYMBOL(cpu_possible_map); /* Per CPU bogomips and other parameters */ struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; -EXPORT_SYMBOL(cpu_data); /* Set when the idlers are all forked */ int smp_threads_ready; /* representing HT siblings of each logical CPU */ cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly; -EXPORT_SYMBOL(cpu_sibling_map); /* representing HT and core siblings of each logical CPU */ cpumask_t cpu_core_map[NR_CPUS] __read_mostly; @@ -454,12 +454,10 @@ cpumask_t cpu_coregroup_map(int cpu) struct cpuinfo_x86 *c = cpu_data + cpu; /* * For perf, we return last level cache shared map. - * And for power savings, we return cpu_core_map + * TBD: when power saving sched policy is added, we will return + * cpu_core_map when power saving policy is enabled */ - if (sched_mc_power_savings || sched_smt_power_savings) - return cpu_core_map[cpu]; - else - return c->llc_shared_map; + return c->llc_shared_map; } /* representing cpus for which sibling maps can be computed */ @@ -474,8 +472,8 @@ static inline void set_cpu_sibling_map(int cpu) if (smp_num_siblings > 1) { for_each_cpu_mask(i, cpu_sibling_setup_map) { - if (c[cpu].phys_proc_id == c[i].phys_proc_id && - c[cpu].cpu_core_id == c[i].cpu_core_id) { + if (phys_proc_id[cpu] == phys_proc_id[i] && + cpu_core_id[cpu] == cpu_core_id[i]) { cpu_set(i, cpu_sibling_map[cpu]); cpu_set(cpu, cpu_sibling_map[i]); cpu_set(i, cpu_core_map[cpu]); @@ -502,7 +500,7 @@ static inline void set_cpu_sibling_map(int cpu) cpu_set(i, c[cpu].llc_shared_map); cpu_set(cpu, c[i].llc_shared_map); } - if (c[cpu].phys_proc_id == c[i].phys_proc_id) { + if (phys_proc_id[cpu] == phys_proc_id[i]) { cpu_set(i, cpu_core_map[cpu]); cpu_set(cpu, cpu_core_map[i]); /* @@ -771,7 +769,7 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) unsigned long start_rip; struct create_idle c_idle = { .cpu = cpu, - .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), + .done = COMPLETION_INITIALIZER(c_idle.done), }; DECLARE_WORK(work, do_fork_idle, &c_idle); @@ -799,8 +797,6 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) } - alternatives_smp_switch(1); - c_idle.idle = get_idle_for_cpu(cpu); if (c_idle.idle) { @@ -1003,6 +999,11 @@ __init void prefill_possible_map(void) if (possible > NR_CPUS) possible = NR_CPUS; + if (possible == 0) { /* Could be SMP kernel on UP hw with broken BIOS */ + possible = 1; + printk (KERN_DEBUG "BIOS never enumerated boot CPU, fixing.\n"); + } + printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n", possible, max_t(int, possible - num_processors, 0)); @@ -1203,8 +1204,8 @@ static void remove_siblinginfo(int cpu) cpu_clear(cpu, cpu_sibling_map[sibling]); cpus_clear(cpu_sibling_map[cpu]); cpus_clear(cpu_core_map[cpu]); - c[cpu].phys_proc_id = 0; - c[cpu].cpu_core_id = 0; + phys_proc_id[cpu] = BAD_APICID; + cpu_core_id[cpu] = BAD_APICID; cpu_clear(cpu, cpu_sibling_setup_map); } @@ -1263,8 +1264,6 @@ void __cpu_die(unsigned int cpu) /* They ack this in play_dead by setting CPU_DEAD */ if (per_cpu(cpu_state, cpu) == CPU_DEAD) { printk ("CPU %d is now offline\n", cpu); - if (1 == num_online_cpus()) - alternatives_smp_switch(0); return; } msleep(100); diff --git a/arch/x86_64/kernel/stacktrace.c b/arch/x86_64/kernel/stacktrace.c deleted file mode 100644 index 6026b31d0..000000000 --- a/arch/x86_64/kernel/stacktrace.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * arch/x86_64/kernel/stacktrace.c - * - * Stack trace management functions - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - */ -#include -#include -#include -#include - -static void save_stack_warning(void *data, char *msg) -{ -} - -static void -save_stack_warning_symbol(void *data, char *msg, unsigned long symbol) -{ -} - -static int save_stack_stack(void *data, char *name) -{ - struct stack_trace *trace = (struct stack_trace *)data; - return trace->all_contexts ? 0 : -1; -} - -static void save_stack_address(void *data, unsigned long addr) -{ - struct stack_trace *trace = (struct stack_trace *)data; - if (trace->skip > 0) { - trace->skip--; - return; - } - if (trace->nr_entries < trace->max_entries - 1) - trace->entries[trace->nr_entries++] = addr; -} - -static struct stacktrace_ops save_stack_ops = { - .warning = save_stack_warning, - .warning_symbol = save_stack_warning_symbol, - .stack = save_stack_stack, - .address = save_stack_address, -}; - -/* - * Save stack-backtrace addresses into a stack_trace buffer. - */ -void save_stack_trace(struct stack_trace *trace, struct task_struct *task) -{ - dump_trace(task, NULL, NULL, &save_stack_ops, trace); - trace->entries[trace->nr_entries++] = ULONG_MAX; -} -EXPORT_SYMBOL(save_stack_trace); - diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c index 91f7e678b..ecbd34c10 100644 --- a/arch/x86_64/kernel/suspend.c +++ b/arch/x86_64/kernel/suspend.c @@ -7,6 +7,7 @@ * Copyright (c) 2001 Patrick Mochel */ +#include #include #include #include diff --git a/arch/x86_64/kernel/syscall.c b/arch/x86_64/kernel/syscall.c index 213fd6ab7..7c176b3ed 100644 --- a/arch/x86_64/kernel/syscall.c +++ b/arch/x86_64/kernel/syscall.c @@ -3,6 +3,7 @@ #include #include #include +#include #define __NO_STUBS diff --git a/arch/x86_64/kernel/tce.c b/arch/x86_64/kernel/tce.c deleted file mode 100644 index 1affe8cab..000000000 --- a/arch/x86_64/kernel/tce.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Derived from arch/powerpc/platforms/pseries/iommu.c - * - * Copyright (C) IBM Corporation, 2006 - * - * Author: Jon Mason - * Author: Muli Ben-Yehuda - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* flush a tce at 'tceaddr' to main memory */ -static inline void flush_tce(void* tceaddr) -{ - /* a single tce can't cross a cache line */ - if (cpu_has_clflush) - asm volatile("clflush (%0)" :: "r" (tceaddr)); - else - asm volatile("wbinvd":::"memory"); -} - -void tce_build(struct iommu_table *tbl, unsigned long index, - unsigned int npages, unsigned long uaddr, int direction) -{ - u64* tp; - u64 t; - u64 rpn; - - t = (1 << TCE_READ_SHIFT); - if (direction != DMA_TO_DEVICE) - t |= (1 << TCE_WRITE_SHIFT); - - tp = ((u64*)tbl->it_base) + index; - - while (npages--) { - rpn = (virt_to_bus((void*)uaddr)) >> PAGE_SHIFT; - t &= ~TCE_RPN_MASK; - t |= (rpn << TCE_RPN_SHIFT); - - *tp = cpu_to_be64(t); - flush_tce(tp); - - uaddr += PAGE_SIZE; - tp++; - } -} - -void tce_free(struct iommu_table *tbl, long index, unsigned int npages) -{ - u64* tp; - - tp = ((u64*)tbl->it_base) + index; - - while (npages--) { - *tp = cpu_to_be64(0); - flush_tce(tp); - tp++; - } -} - -static inline unsigned int table_size_to_number_of_entries(unsigned char size) -{ - /* - * size is the order of the table, 0-7 - * smallest table is 8K entries, so shift result by 13 to - * multiply by 8K - */ - return (1 << size) << 13; -} - -static int tce_table_setparms(struct pci_dev *dev, struct iommu_table *tbl) -{ - unsigned int bitmapsz; - unsigned long bmppages; - int ret; - - tbl->it_busno = dev->bus->number; - - /* set the tce table size - measured in entries */ - tbl->it_size = table_size_to_number_of_entries(specified_table_size); - - tbl->it_base = (unsigned long)tce_table_kva[dev->bus->number]; - if (!tbl->it_base) { - printk(KERN_ERR "Calgary: iommu_table_setparms: " - "no table allocated?!\n"); - ret = -ENOMEM; - goto done; - } - - /* - * number of bytes needed for the bitmap size in number of - * entries; we need one bit per entry - */ - bitmapsz = tbl->it_size / BITS_PER_BYTE; - bmppages = __get_free_pages(GFP_KERNEL, get_order(bitmapsz)); - if (!bmppages) { - printk(KERN_ERR "Calgary: cannot allocate bitmap\n"); - ret = -ENOMEM; - goto done; - } - - tbl->it_map = (unsigned long*)bmppages; - - memset(tbl->it_map, 0, bitmapsz); - - tbl->it_hint = 0; - - spin_lock_init(&tbl->it_lock); - - return 0; - -done: - return ret; -} - -int build_tce_table(struct pci_dev *dev, void __iomem *bbar) -{ - struct iommu_table *tbl; - int ret; - - if (dev->sysdata) { - printk(KERN_ERR "Calgary: dev %p has sysdata %p\n", - dev, dev->sysdata); - BUG(); - } - - tbl = kzalloc(sizeof(struct iommu_table), GFP_KERNEL); - if (!tbl) { - printk(KERN_ERR "Calgary: error allocating iommu_table\n"); - ret = -ENOMEM; - goto done; - } - - ret = tce_table_setparms(dev, tbl); - if (ret) - goto free_tbl; - - tce_free(tbl, 0, tbl->it_size); - - tbl->bbar = bbar; - - /* - * NUMA is already using the bus's sysdata pointer, so we use - * the bus's pci_dev's sysdata instead. - */ - dev->sysdata = tbl; - - return 0; - -free_tbl: - kfree(tbl); -done: - return ret; -} - -void* alloc_tce_table(void) -{ - unsigned int size; - - size = table_size_to_number_of_entries(specified_table_size); - size *= TCE_ENTRY_SIZE; - - return __alloc_bootmem_low(size, size, 0); -} - -void free_tce_table(void *tbl) -{ - unsigned int size; - - if (!tbl) - return; - - size = table_size_to_number_of_entries(specified_table_size); - size *= TCE_ENTRY_SIZE; - - free_bootmem(__pa(tbl), size); -} diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index ffd1cb88f..7392570f9 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c @@ -8,7 +8,7 @@ * Copyright (c) 1995 Markus Kuhn * Copyright (c) 1996 Ingo Molnar * Copyright (c) 1998 Andrea Arcangeli - * Copyright (c) 2002,2006 Vojtech Pavlik + * Copyright (c) 2002 Vojtech Pavlik * Copyright (c) 2003 Andi Kleen * RTC support code taken from arch/i386/kernel/timers/time_hpet.c */ @@ -28,7 +28,6 @@ #include #ifdef CONFIG_ACPI #include /* for PM timer frequency */ -#include #endif #include #include @@ -52,21 +51,14 @@ extern int using_apic_timer; static char *time_init_gtod(void); DEFINE_SPINLOCK(rtc_lock); -EXPORT_SYMBOL(rtc_lock); DEFINE_SPINLOCK(i8253_lock); int nohpet __initdata = 0; static int notsc __initdata = 0; -#define USEC_PER_TICK (USEC_PER_SEC / HZ) -#define NSEC_PER_TICK (NSEC_PER_SEC / HZ) -#define FSEC_PER_TICK (FSEC_PER_SEC / HZ) - -#define NS_SCALE 10 /* 2^10, carefully chosen */ -#define US_SCALE 32 /* 2^32, arbitralrily chosen */ +#undef HPET_HACK_ENABLE_DANGEROUS unsigned int cpu_khz; /* TSC clocks / usec, not used here */ -EXPORT_SYMBOL(cpu_khz); static unsigned long hpet_period; /* fsecs / HPET clock */ unsigned long hpet_tick; /* HPET clocks / interrupt */ int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */ @@ -98,7 +90,7 @@ static inline unsigned int do_gettimeoffset_tsc(void) t = get_cycles_sync(); if (t < vxtime.last_tsc) t = vxtime.last_tsc; /* hack */ - x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> US_SCALE; + x = ((t - vxtime.last_tsc) * vxtime.tsc_quot) >> 32; return x; } @@ -106,7 +98,7 @@ static inline unsigned int do_gettimeoffset_hpet(void) { /* cap counter read to one tick to avoid inconsistencies */ unsigned long counter = hpet_readl(HPET_COUNTER) - vxtime.last; - return (min(counter,hpet_tick) * vxtime.quot) >> US_SCALE; + return (min(counter,hpet_tick) * vxtime.quot) >> 32; } unsigned int (*do_gettimeoffset)(void) = do_gettimeoffset_tsc; @@ -126,7 +118,7 @@ void do_gettimeofday(struct timeval *tv) seq = read_seqbegin(&xtime_lock); sec = xtime.tv_sec; - usec = xtime.tv_nsec / NSEC_PER_USEC; + usec = xtime.tv_nsec / 1000; /* i386 does some correction here to keep the clock monotonous even when ntpd is fixing drift. @@ -137,14 +129,14 @@ void do_gettimeofday(struct timeval *tv) in arch/x86_64/kernel/vsyscall.c and export all needed variables in vmlinux.lds. -AK */ - t = (jiffies - wall_jiffies) * USEC_PER_TICK + + t = (jiffies - wall_jiffies) * (1000000L / HZ) + do_gettimeoffset(); usec += t; } while (read_seqretry(&xtime_lock, seq)); - tv->tv_sec = sec + usec / USEC_PER_SEC; - tv->tv_usec = usec % USEC_PER_SEC; + tv->tv_sec = sec + usec / 1000000; + tv->tv_usec = usec % 1000000; } EXPORT_SYMBOL(do_gettimeofday); @@ -165,8 +157,8 @@ int do_settimeofday(struct timespec *tv) write_seqlock_irq(&xtime_lock); - nsec -= do_gettimeoffset() * NSEC_PER_USEC + - (jiffies - wall_jiffies) * NSEC_PER_TICK; + nsec -= do_gettimeoffset() * 1000 + + (jiffies - wall_jiffies) * (NSEC_PER_SEC/HZ); wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); @@ -194,7 +186,7 @@ unsigned long profile_pc(struct pt_regs *regs) is just accounted to the spinlock function. Better would be to write these functions in assembler again and check exactly. */ - if (!user_mode(regs) && in_lock_functions(pc)) { + if (in_lock_functions(pc)) { char *v = *(char **)regs->rsp; if ((v >= _stext && v <= _etext) || (v >= _sinittext && v <= _einittext) || @@ -296,7 +288,7 @@ unsigned long long monotonic_clock(void) this_offset = hpet_readl(HPET_COUNTER); } while (read_seqretry(&xtime_lock, seq)); offset = (this_offset - last_offset); - offset *= NSEC_PER_TICK / hpet_tick; + offset *= (NSEC_PER_SEC/HZ) / hpet_tick; } else { do { seq = read_seqbegin(&xtime_lock); @@ -305,8 +297,7 @@ unsigned long long monotonic_clock(void) base = monotonic_base; } while (read_seqretry(&xtime_lock, seq)); this_offset = get_cycles_sync(); - /* FIXME: 1000 or 1000000? */ - offset = (this_offset - last_offset)*1000 / cpu_khz; + offset = (this_offset - last_offset)*1000 / cpu_khz; } return base + offset; } @@ -391,7 +382,7 @@ void main_timer_handler(struct pt_regs *regs) } monotonic_base += - (offset - vxtime.last) * NSEC_PER_TICK / hpet_tick; + (offset - vxtime.last)*(NSEC_PER_SEC/HZ) / hpet_tick; vxtime.last = offset; #ifdef CONFIG_X86_PM_TIMER @@ -400,25 +391,24 @@ void main_timer_handler(struct pt_regs *regs) #endif } else { offset = (((tsc - vxtime.last_tsc) * - vxtime.tsc_quot) >> US_SCALE) - USEC_PER_TICK; + vxtime.tsc_quot) >> 32) - (USEC_PER_SEC / HZ); if (offset < 0) offset = 0; - if (offset > USEC_PER_TICK) { - lost = offset / USEC_PER_TICK; - offset %= USEC_PER_TICK; + if (offset > (USEC_PER_SEC / HZ)) { + lost = offset / (USEC_PER_SEC / HZ); + offset %= (USEC_PER_SEC / HZ); } - /* FIXME: 1000 or 1000000? */ - monotonic_base += (tsc - vxtime.last_tsc) * 1000000 / cpu_khz; + monotonic_base += (tsc - vxtime.last_tsc)*1000000/cpu_khz ; vxtime.last_tsc = tsc - vxtime.quot * delay / vxtime.tsc_quot; if ((((tsc - vxtime.last_tsc) * - vxtime.tsc_quot) >> US_SCALE) < offset) + vxtime.tsc_quot) >> 32) < offset) vxtime.last_tsc = tsc - - (((long) offset << US_SCALE) / vxtime.tsc_quot) - 1; + (((long) offset << 32) / vxtime.tsc_quot) - 1; } if (lost > 0) { @@ -478,15 +468,16 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) } static unsigned int cyc2ns_scale __read_mostly; +#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ static inline void set_cyc2ns_scale(unsigned long cpu_khz) { - cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / cpu_khz; + cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz; } static inline unsigned long long cycles_2_ns(unsigned long long cyc) { - return (cyc * cyc2ns_scale) >> NS_SCALE; + return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; } unsigned long long sched_clock(void) @@ -499,7 +490,7 @@ unsigned long long sched_clock(void) Disadvantage is a small drift between CPUs in some configurations, but that should be tolerable. */ if (__vxtime.mode == VXTIME_HPET) - return (hpet_readl(HPET_COUNTER) * vxtime.quot) >> US_SCALE; + return (hpet_readl(HPET_COUNTER) * vxtime.quot) >> 32; #endif /* Could do CPU core sync here. Opteron can execute rdtsc speculatively, @@ -642,7 +633,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new); if (!(freq->flags & CPUFREQ_CONST_LOOPS)) - vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz; + vxtime.tsc_quot = (1000L << 32) / cpu_khz; } set_cyc2ns_scale(cpu_khz_ref); @@ -798,8 +789,8 @@ static int hpet_timer_stop_set_go(unsigned long tick) if (hpet_use_timer) { hpet_writel(HPET_TN_ENABLE | HPET_TN_PERIODIC | HPET_TN_SETVAL | HPET_TN_32BIT, HPET_T0_CFG); - hpet_writel(hpet_tick, HPET_T0_CMP); /* next interrupt */ - hpet_writel(hpet_tick, HPET_T0_CMP); /* period */ + hpet_writel(hpet_tick, HPET_T0_CMP); + hpet_writel(hpet_tick, HPET_T0_CMP); /* AK: why twice? */ cfg |= HPET_CFG_LEGACY; } /* @@ -834,7 +825,8 @@ static int hpet_init(void) if (hpet_period < 100000 || hpet_period > 100000000) return -1; - hpet_tick = (FSEC_PER_TICK + hpet_period / 2) / hpet_period; + hpet_tick = (1000000000L * (USEC_PER_SEC / HZ) + hpet_period / 2) / + hpet_period; hpet_use_timer = (id & HPET_ID_LEGSUP); @@ -890,7 +882,7 @@ int __init time_setup(char *str) } static struct irqaction irq0 = { - timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL + timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL }; void __init time_init(void) @@ -898,6 +890,18 @@ void __init time_init(void) char *timename; char *gtod; +#ifdef HPET_HACK_ENABLE_DANGEROUS + if (!vxtime.hpet_address) { + printk(KERN_WARNING "time.c: WARNING: Enabling HPET base " + "manually!\n"); + outl(0x800038a0, 0xcf8); + outl(0xff000001, 0xcfc); + outl(0x800038a0, 0xcf8); + vxtime.hpet_address = inl(0xcfc) & 0xfffffffe; + printk(KERN_WARNING "time.c: WARNING: Enabled HPET " + "at %#lx.\n", vxtime.hpet_address); + } +#endif if (nohpet) vxtime.hpet_address = 0; @@ -908,7 +912,7 @@ void __init time_init(void) -xtime.tv_sec, -xtime.tv_nsec); if (!hpet_init()) - vxtime_hz = (FSEC_PER_SEC + hpet_period / 2) / hpet_period; + vxtime_hz = (1000000000000000L + hpet_period / 2) / hpet_period; else vxtime.hpet_address = 0; @@ -937,8 +941,8 @@ void __init time_init(void) vxtime_hz / 1000000, vxtime_hz % 1000000, timename, gtod); printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n", cpu_khz / 1000, cpu_khz % 1000); - vxtime.quot = (USEC_PER_SEC << US_SCALE) / vxtime_hz; - vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz; + vxtime.quot = (1000000L << 32) / vxtime_hz; + vxtime.tsc_quot = (1000L << 32) / cpu_khz; vxtime.last_tsc = get_cycles_sync(); setup_irq(0, &irq0); @@ -952,20 +956,13 @@ void __init time_init(void) __cpuinit int unsynchronized_tsc(void) { #ifdef CONFIG_SMP - if (apic_is_clustered_box()) + if (oem_force_hpet_timer()) return 1; -#endif - /* Most intel systems have synchronized TSCs except for - multi node systems */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) { -#ifdef CONFIG_ACPI - /* But TSC doesn't tick in C3 so don't use it there */ - if (acpi_fadt.length > 0 && acpi_fadt.plvl3_lat < 1000) - return 1; -#endif + /* Intel systems are normally all synchronized. Exceptions + are handled in the OEM check above. */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) return 0; - } - +#endif /* Assume multi socket systems are not synchronized */ return num_present_cpus() > 1; } diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 6d38a2d58..584f5dd71 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -6,12 +6,15 @@ * * Pentium III FXSR, SSE support * Gareth Hughes , May 2000 + * + * $Id: traps.c,v 1.36 2002/03/24 11:09:10 ak Exp $ */ /* * 'Traps.c' handles hardware traps and faults after we have saved some * state in 'entry.S'. */ +#include #include #include #include @@ -28,7 +31,6 @@ #include #include #include -#include #include #include @@ -39,13 +41,12 @@ #include #include #include -#include + #include #include #include #include #include -#include asmlinkage void divide_error(void); asmlinkage void debug(void); @@ -70,7 +71,6 @@ asmlinkage void machine_check(void); asmlinkage void spurious_interrupt_bug(void); ATOMIC_NOTIFIER_HEAD(die_chain); -EXPORT_SYMBOL(die_chain); extern char last_sysfs_file[]; @@ -79,13 +79,13 @@ int register_die_notifier(struct notifier_block *nb) vmalloc_sync_all(); return atomic_notifier_chain_register(&die_chain, nb); } -EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ +EXPORT_SYMBOL(register_die_notifier); int unregister_die_notifier(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&die_chain, nb); } -EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ +EXPORT_SYMBOL(unregister_die_notifier); static inline void conditional_sti(struct pt_regs *regs) { @@ -109,43 +109,35 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) preempt_enable_no_resched(); } -static int kstack_depth_to_print = 12; -#ifdef CONFIG_STACK_UNWIND -static int call_trace = 1; -#else -#define call_trace (-1) -#endif +static int kstack_depth_to_print = 10; #ifdef CONFIG_KALLSYMS -# include -void printk_address(unsigned long address) -{ +#include +int printk_address(unsigned long address) +{ unsigned long offset = 0, symsize; const char *symname; char *modname; - char *delim = ":"; + char *delim = ":"; char namebuf[128]; - symname = kallsyms_lookup(address, &symsize, &offset, - &modname, namebuf); - if (!symname) { - printk(" [<%016lx>]\n", address); - return; - } - if (!modname) + symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf); + if (!symname) + return printk("[<%016lx>]", address); + if (!modname) modname = delim = ""; - printk(" [<%016lx>] %s%s%s%s+0x%lx/0x%lx\n", - address, delim, modname, delim, symname, offset, symsize); -} + return printk("<%016lx>{%s%s%s%s%+ld}", + address, delim, modname, delim, symname, offset); +} #else -void printk_address(unsigned long address) -{ - printk(" [<%016lx>]\n", address); -} +int printk_address(unsigned long address) +{ + return printk("[<%016lx>]", address); +} #endif static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, - unsigned *usedp, char **idp) + unsigned *usedp, const char **idp) { static char ids[][8] = { [DEBUG_STACK - 1] = "#DB", @@ -159,68 +151,32 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, }; unsigned k; - /* - * Iterate over all exception stacks, and figure out whether - * 'stack' is in one of them: - */ for (k = 0; k < N_EXCEPTION_STACKS; k++) { unsigned long end; - /* - * set 'end' to the end of the exception stack. - */ switch (k + 1) { - /* - * TODO: this block is not needed i think, because - * setup64.c:cpu_init() sets up t->ist[DEBUG_STACK] - * properly too. - */ #if DEBUG_STKSZ > EXCEPTION_STKSZ case DEBUG_STACK: end = cpu_pda(cpu)->debugstack + DEBUG_STKSZ; break; #endif default: - end = per_cpu(orig_ist, cpu).ist[k]; + end = per_cpu(init_tss, cpu).ist[k]; break; } - /* - * Is 'stack' above this exception frame's end? - * If yes then skip to the next frame. - */ if (stack >= end) continue; - /* - * Is 'stack' above this exception frame's start address? - * If yes then we found the right frame. - */ if (stack >= end - EXCEPTION_STKSZ) { - /* - * Make sure we only iterate through an exception - * stack once. If it comes up for the second time - * then there's something wrong going on - just - * break out and return NULL: - */ if (*usedp & (1U << k)) break; *usedp |= 1U << k; *idp = ids[k]; return (unsigned long *)end; } - /* - * If this is a debug stack, and if it has a larger size than - * the usual exception stacks, then 'stack' might still - * be within the lower portion of the debug stack: - */ #if DEBUG_STKSZ > EXCEPTION_STKSZ if (k == DEBUG_STACK - 1 && stack >= end - DEBUG_STKSZ) { unsigned j = N_EXCEPTION_STACKS - 1; - /* - * Black magic. A large debug stack is composed of - * multiple exception stack entries, which we - * iterate through now. Dont look: - */ do { ++j; end -= EXCEPTION_STKSZ; @@ -237,25 +193,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, return NULL; } -struct ops_and_data { - struct stacktrace_ops *ops; - void *data; -}; - -static int dump_trace_unwind(struct unwind_frame_info *info, void *context) -{ - struct ops_and_data *oad = (struct ops_and_data *)context; - int n = 0; - - while (unwind(info) == 0 && UNW_PC(info)) { - n++; - oad->ops->address(oad->data, UNW_PC(info)); - if (arch_unw_user_mode(info)) - break; - } - return n; -} - /* * x86-64 can have upto three kernel stacks: * process stack @@ -263,64 +200,25 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack */ -void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, - struct stacktrace_ops *ops, void *data) +void show_trace(unsigned long *stack) { const unsigned cpu = safe_smp_processor_id(); unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; + int i; unsigned used = 0; - if (!tsk) - tsk = current; - - if (call_trace >= 0) { - int unw_ret = 0; - struct unwind_frame_info info; - struct ops_and_data oad = { .ops = ops, .data = data }; - - if (regs) { - if (unwind_init_frame_info(&info, tsk, regs) == 0) - unw_ret = dump_trace_unwind(&info, &oad); - } else if (tsk == current) - unw_ret = unwind_init_running(&info, dump_trace_unwind, &oad); - else { - if (unwind_init_blocked(&info, tsk) == 0) - unw_ret = dump_trace_unwind(&info, &oad); - } - if (unw_ret > 0) { - if (call_trace == 1 && !arch_unw_user_mode(&info)) { - ops->warning_symbol(data, "DWARF2 unwinder stuck at %s", - UNW_PC(&info)); - if ((long)UNW_SP(&info) < 0) { - ops->warning(data, "Leftover inexact backtrace:"); - stack = (unsigned long *)UNW_SP(&info); - if (!stack) - return; - } else - ops->warning(data, "Full inexact backtrace again:"); - } else if (call_trace >= 1) - return; - else - ops->warning(data, "Full inexact backtrace again:"); - } else - ops->warning(data, "Inexact backtrace:"); - } - if (!stack) { - unsigned long dummy; - stack = &dummy; - if (tsk && tsk != current) - stack = (unsigned long *)tsk->thread.rsp; - } + printk("\nCall Trace:"); - /* - * Print function call entries within a stack. 'cond' is the - * "end of stackframe" condition, that the 'stack++' - * iteration will eventually trigger. - */ #define HANDLE_STACK(cond) \ do while (cond) { \ unsigned long addr = *stack++; \ if (kernel_text_address(addr)) { \ + if (i > 50) { \ + printk("\n "); \ + i = 0; \ + } \ + else \ + i += printk(" "); \ /* \ * If the address is either in the text segment of the \ * kernel, or in the region which contains vmalloc'ed \ @@ -329,31 +227,20 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s * down the cause of the crash will be able to figure \ * out the call path that was taken. \ */ \ - ops->address(data, addr); \ + i += printk_address(addr); \ } \ } while (0) - /* - * Print function call entries in all stacks, starting at the - * current stack address. If the stacks consist of nested - * exceptions - */ - for (;;) { - char *id; + for(i = 11; ; ) { + const char *id; unsigned long *estack_end; estack_end = in_exception_stack(cpu, (unsigned long)stack, &used, &id); if (estack_end) { - if (ops->stack(data, id) < 0) - break; + i += printk(" <%s>", id); HANDLE_STACK (stack < estack_end); - ops->stack(data, ""); - /* - * We link to the next stack via the - * second-to-last pointer (index -2 to end) in the - * exception stack: - */ + i += printk(" "); stack = (unsigned long *) estack_end[-2]; continue; } @@ -363,71 +250,23 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s (IRQSTACKSIZE - 64) / sizeof(*irqstack); if (stack >= irqstack && stack < irqstack_end) { - if (ops->stack(data, "IRQ") < 0) - break; + i += printk(" "); HANDLE_STACK (stack < irqstack_end); - /* - * We link to the next stack (which would be - * the process stack normally) the last - * pointer (index -1 to end) in the IRQ stack: - */ stack = (unsigned long *) (irqstack_end[-1]); irqstack_end = NULL; - ops->stack(data, "EOI"); + i += printk(" "); continue; } } break; } - /* - * This handles the process stack: - */ HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0); #undef HANDLE_STACK -} -EXPORT_SYMBOL(dump_trace); - -static void -print_trace_warning_symbol(void *data, char *msg, unsigned long symbol) -{ - print_symbol(msg, symbol); - printk("\n"); -} - -static void print_trace_warning(void *data, char *msg) -{ - printk("%s\n", msg); -} - -static int print_trace_stack(void *data, char *name) -{ - printk(" <%s> ", name); - return 0; -} - -static void print_trace_address(void *data, unsigned long addr) -{ - printk_address(addr); -} - -static struct stacktrace_ops print_trace_ops = { - .warning = print_trace_warning, - .warning_symbol = print_trace_warning_symbol, - .stack = print_trace_stack, - .address = print_trace_address, -}; - -void -show_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack) -{ - printk("\nCall Trace:\n"); - dump_trace(tsk, regs, stack, &print_trace_ops, NULL); printk("\n"); } -static void -_show_stack(struct task_struct *tsk, struct pt_regs *regs, unsigned long *rsp) +void show_stack(struct task_struct *tsk, unsigned long * rsp) { unsigned long *stack; int i; @@ -457,16 +296,11 @@ _show_stack(struct task_struct *tsk, struct pt_regs *regs, unsigned long *rsp) break; } if (i && ((i % 4) == 0)) - printk("\n"); - printk(" %016lx", *stack++); + printk("\n "); + printk("%016lx ", *stack++); touch_nmi_watchdog(); } - show_trace(tsk, regs, rsp); -} - -void show_stack(struct task_struct *tsk, unsigned long * rsp) -{ - _show_stack(tsk, NULL, rsp); + show_trace((unsigned long *)rsp); } /* @@ -475,7 +309,7 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp) void dump_stack(void) { unsigned long dummy; - show_trace(NULL, NULL, &dummy); + show_trace(&dummy); } EXPORT_SYMBOL(dump_stack); @@ -503,7 +337,7 @@ void show_registers(struct pt_regs *regs) if (in_kernel) { printk("Stack: "); - _show_stack(NULL, regs, (unsigned long*)rsp); + show_stack(NULL, (unsigned long*)rsp); printk("\nCode: "); if (regs->rip < PAGE_OFFSET) @@ -552,7 +386,6 @@ void out_of_line_bug(void) { BUG(); } -EXPORT_SYMBOL(out_of_line_bug); #endif static DEFINE_SPINLOCK(die_lock); @@ -591,7 +424,7 @@ void __kprobes oops_end(unsigned long flags) /* Nest count reaches zero, release the lock. */ spin_unlock_irqrestore(&die_lock, flags); if (panic_on_oops) - panic("Fatal exception"); + panic("Oops"); } void __kprobes __die(const char * str, struct pt_regs * regs, long err) @@ -1185,18 +1018,3 @@ static int __init kstack_setup(char *s) } __setup("kstack=", kstack_setup); -#ifdef CONFIG_STACK_UNWIND -static int __init call_trace_setup(char *s) -{ - if (strcmp(s, "old") == 0) - call_trace = -1; - else if (strcmp(s, "both") == 0) - call_trace = 0; - else if (strcmp(s, "newfallback") == 0) - call_trace = 1; - else if (strcmp(s, "new") == 0) - call_trace = 2; - return 1; -} -__setup("call_trace=", call_trace_setup); -#endif diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 5f222afac..b81f473c4 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S @@ -6,6 +6,7 @@ #include #include +#include #undef i386 /* in case the preprocessor is a 32bit one */ @@ -13,12 +14,6 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") OUTPUT_ARCH(i386:x86-64) ENTRY(phys_startup_64) jiffies_64 = jiffies; -PHDRS { - text PT_LOAD FLAGS(5); /* R_E */ - data PT_LOAD FLAGS(7); /* RWE */ - user PT_LOAD FLAGS(7); /* RWE */ - note PT_NOTE FLAGS(4); /* R__ */ -} SECTIONS { . = __START_KERNEL; @@ -37,7 +32,7 @@ SECTIONS KPROBES_TEXT *(.fixup) *(.gnu.warning) - } :text = 0x9090 + } = 0x9090 /* out-of-line lock text */ .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) } @@ -50,23 +45,21 @@ SECTIONS RODATA -#ifdef CONFIG_STACK_UNWIND - . = ALIGN(8); - .eh_frame : AT(ADDR(.eh_frame) - LOAD_OFFSET) { - __start_unwind = .; - *(.eh_frame) - __end_unwind = .; - } -#endif - /* Data */ .data : AT(ADDR(.data) - LOAD_OFFSET) { *(.data) CONSTRUCTORS - } :data + } _edata = .; /* End of data section */ + __bss_start = .; /* BSS */ + .bss : AT(ADDR(.bss) - LOAD_OFFSET) { + *(.bss.page_aligned) + *(.bss) + } + __bss_stop = .; + . = ALIGN(PAGE_SIZE); . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { @@ -88,7 +81,7 @@ SECTIONS #define VVIRT(x) (ADDR(x) - VVIRT_OFFSET) . = VSYSCALL_ADDR; - .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } :user + .vsyscall_0 : AT(VSYSCALL_PHYS_ADDR) { *(.vsyscall_0) } __vsyscall_0 = VSYSCALL_VIRT_ADDR; . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); @@ -131,33 +124,13 @@ SECTIONS . = ALIGN(8192); /* init_task */ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { *(.data.init_task) - } :data + } . = ALIGN(4096); .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { *(.data.page_aligned) } - /* might get freed after init */ - . = ALIGN(4096); - __smp_alt_begin = .; - __smp_alt_instructions = .; - .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) { - *(.smp_altinstructions) - } - __smp_alt_instructions_end = .; - . = ALIGN(8); - __smp_locks = .; - .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { - *(.smp_locks) - } - __smp_locks_end = .; - .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) { - *(.smp_altinstr_replacement) - } - . = ALIGN(4096); - __smp_alt_end = .; - . = ALIGN(4096); /* Init code and data */ __init_begin = .; .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { @@ -221,14 +194,6 @@ SECTIONS . = ALIGN(4096); __nosave_end = .; - __bss_start = .; /* BSS */ - . = ALIGN(4096); - .bss : AT(ADDR(.bss) - LOAD_OFFSET) { - *(.bss.page_aligned) - *(.bss) - } - __bss_stop = .; - _end = . ; /* Sections to be discarded */ @@ -242,6 +207,4 @@ SECTIONS STABS_DEBUG DWARF_DEBUG - - NOTES } diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index f603037df..9468fb20b 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c @@ -107,7 +107,7 @@ static __always_inline long time_syscall(long *t) int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) { - if (!__sysctl_vsyscall) + if (unlikely(!__sysctl_vsyscall)) return gettimeofday(tv,tz); if (tv) do_vgettimeofday(tv); @@ -120,7 +120,7 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) * unlikely */ time_t __vsyscall(1) vtime(time_t *t) { - if (!__sysctl_vsyscall) + if (unlikely(!__sysctl_vsyscall)) return time_syscall(t); else if (t) *t = __xtime.tv_sec; diff --git a/arch/x86_64/kernel/x8664_ksyms-xen.c b/arch/x86_64/kernel/x8664_ksyms-xen.c new file mode 100644 index 000000000..4d8c3a3e7 --- /dev/null +++ b/arch/x86_64/kernel/x8664_ksyms-xen.c @@ -0,0 +1,155 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_SMP +extern void __write_lock_failed(rwlock_t *rw); +extern void __read_lock_failed(rwlock_t *rw); +#endif + +/* platform dependent support */ +EXPORT_SYMBOL(boot_cpu_data); +//EXPORT_SYMBOL(dump_fpu); +EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(pm_idle); +EXPORT_SYMBOL(pm_power_off); + +EXPORT_SYMBOL(__down_failed); +EXPORT_SYMBOL(__down_failed_interruptible); +EXPORT_SYMBOL(__down_failed_trylock); +EXPORT_SYMBOL(__up_wakeup); +/* Networking helper routines. */ +EXPORT_SYMBOL(csum_partial_copy_nocheck); +EXPORT_SYMBOL(ip_compute_csum); +/* Delay loops */ +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); +EXPORT_SYMBOL(__delay); +EXPORT_SYMBOL(__const_udelay); + +EXPORT_SYMBOL(__get_user_1); +EXPORT_SYMBOL(__get_user_2); +EXPORT_SYMBOL(__get_user_4); +EXPORT_SYMBOL(__get_user_8); +EXPORT_SYMBOL(__put_user_1); +EXPORT_SYMBOL(__put_user_2); +EXPORT_SYMBOL(__put_user_4); +EXPORT_SYMBOL(__put_user_8); + +EXPORT_SYMBOL(strncpy_from_user); +EXPORT_SYMBOL(__strncpy_from_user); +EXPORT_SYMBOL(clear_user); +EXPORT_SYMBOL(__clear_user); +EXPORT_SYMBOL(copy_user_generic); +EXPORT_SYMBOL(copy_from_user); +EXPORT_SYMBOL(copy_to_user); +EXPORT_SYMBOL(copy_in_user); +EXPORT_SYMBOL(strnlen_user); + +#ifdef CONFIG_PCI +EXPORT_SYMBOL(pci_mem_start); +#endif + +EXPORT_SYMBOL(copy_page); +EXPORT_SYMBOL(clear_page); + +EXPORT_SYMBOL(_cpu_pda); +#ifdef CONFIG_SMP +EXPORT_SYMBOL(__write_lock_failed); +EXPORT_SYMBOL(__read_lock_failed); + +EXPORT_SYMBOL(smp_call_function); +#endif + +#ifdef CONFIG_VT +EXPORT_SYMBOL(screen_info); +#endif + +#ifdef CONFIG_X86_LOCAL_APIC +EXPORT_SYMBOL_GPL(set_nmi_callback); +EXPORT_SYMBOL_GPL(unset_nmi_callback); +#endif + +/* Export string functions. We normally rely on gcc builtin for most of these, + but gcc sometimes decides not to inline them. */ +#undef memcpy +#undef memset +#undef memmove + +extern void * memset(void *,int,__kernel_size_t); +extern size_t strlen(const char *); +extern void * memmove(void * dest,const void *src,size_t count); +extern void * memcpy(void *,const void *,__kernel_size_t); +extern void * __memcpy(void *,const void *,__kernel_size_t); + +EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memmove); +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(__memcpy); + +#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM +/* prototypes are wrong, these are assembly with custom calling functions */ +extern void rwsem_down_read_failed_thunk(void); +extern void rwsem_wake_thunk(void); +extern void rwsem_downgrade_thunk(void); +extern void rwsem_down_write_failed_thunk(void); +EXPORT_SYMBOL(rwsem_down_read_failed_thunk); +EXPORT_SYMBOL(rwsem_wake_thunk); +EXPORT_SYMBOL(rwsem_downgrade_thunk); +EXPORT_SYMBOL(rwsem_down_write_failed_thunk); +#endif + +EXPORT_SYMBOL(empty_zero_page); + +EXPORT_SYMBOL(die_chain); + +#ifdef CONFIG_SMP +EXPORT_SYMBOL(cpu_sibling_map); +EXPORT_SYMBOL(smp_num_siblings); +#endif + +#ifdef CONFIG_BUG +EXPORT_SYMBOL(out_of_line_bug); +#endif + +EXPORT_SYMBOL(init_level4_pgt); + +extern unsigned long __supported_pte_mask; +EXPORT_SYMBOL(__supported_pte_mask); + +#ifdef CONFIG_SMP +EXPORT_SYMBOL(flush_tlb_page); +#endif + +EXPORT_SYMBOL(load_gs_index); + diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index f77cdc951..1def21c9f 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c @@ -1,20 +1,66 @@ -/* Exports for assembly files. - All C exports should go in the respective C files. */ - +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include + +extern spinlock_t rtc_lock; +#ifdef CONFIG_SMP +extern void __write_lock_failed(rwlock_t *rw); +extern void __read_lock_failed(rwlock_t *rw); +#endif + +/* platform dependent support */ +EXPORT_SYMBOL(boot_cpu_data); +//EXPORT_SYMBOL(dump_fpu); +EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(ioremap_nocache); +EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(kernel_thread); +EXPORT_SYMBOL(pm_idle); +EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(__down_failed); EXPORT_SYMBOL(__down_failed_interruptible); EXPORT_SYMBOL(__down_failed_trylock); EXPORT_SYMBOL(__up_wakeup); +/* Networking helper routines. */ +EXPORT_SYMBOL(csum_partial_copy_nocheck); +EXPORT_SYMBOL(ip_compute_csum); +/* Delay loops */ +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); +EXPORT_SYMBOL(__delay); +EXPORT_SYMBOL(__const_udelay); EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); @@ -25,20 +71,42 @@ EXPORT_SYMBOL(__put_user_2); EXPORT_SYMBOL(__put_user_4); EXPORT_SYMBOL(__put_user_8); +EXPORT_SYMBOL(strncpy_from_user); +EXPORT_SYMBOL(__strncpy_from_user); +EXPORT_SYMBOL(clear_user); +EXPORT_SYMBOL(__clear_user); EXPORT_SYMBOL(copy_user_generic); EXPORT_SYMBOL(copy_from_user); EXPORT_SYMBOL(copy_to_user); +EXPORT_SYMBOL(copy_in_user); +EXPORT_SYMBOL(strnlen_user); + +#ifdef CONFIG_PCI +EXPORT_SYMBOL(pci_mem_start); +#endif EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(clear_page); +EXPORT_SYMBOL(_cpu_pda); #ifdef CONFIG_SMP -extern void FASTCALL( __write_lock_failed(rwlock_t *rw)); -extern void FASTCALL( __read_lock_failed(rwlock_t *rw)); +EXPORT_SYMBOL(cpu_data); EXPORT_SYMBOL(__write_lock_failed); EXPORT_SYMBOL(__read_lock_failed); + +EXPORT_SYMBOL(smp_call_function); +EXPORT_SYMBOL(cpu_callout_map); +#endif + +#ifdef CONFIG_VT +EXPORT_SYMBOL(screen_info); #endif +EXPORT_SYMBOL(rtc_lock); + +EXPORT_SYMBOL_GPL(set_nmi_callback); +EXPORT_SYMBOL_GPL(unset_nmi_callback); + /* Export string functions. We normally rely on gcc builtin for most of these, but gcc sometimes decides not to inline them. */ #undef memcpy @@ -46,14 +114,51 @@ EXPORT_SYMBOL(__read_lock_failed); #undef memmove extern void * memset(void *,int,__kernel_size_t); +extern size_t strlen(const char *); +extern void * memmove(void * dest,const void *src,size_t count); extern void * memcpy(void *,const void *,__kernel_size_t); extern void * __memcpy(void *,const void *,__kernel_size_t); EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(__memcpy); +#ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM +/* prototypes are wrong, these are assembly with custom calling functions */ +extern void rwsem_down_read_failed_thunk(void); +extern void rwsem_wake_thunk(void); +extern void rwsem_downgrade_thunk(void); +extern void rwsem_down_write_failed_thunk(void); +EXPORT_SYMBOL(rwsem_down_read_failed_thunk); +EXPORT_SYMBOL(rwsem_wake_thunk); +EXPORT_SYMBOL(rwsem_downgrade_thunk); +EXPORT_SYMBOL(rwsem_down_write_failed_thunk); +#endif + EXPORT_SYMBOL(empty_zero_page); + +EXPORT_SYMBOL(die_chain); + +#ifdef CONFIG_SMP +EXPORT_SYMBOL(cpu_sibling_map); +EXPORT_SYMBOL(smp_num_siblings); +#endif + +#ifdef CONFIG_BUG +EXPORT_SYMBOL(out_of_line_bug); +#endif + EXPORT_SYMBOL(init_level4_pgt); + +extern unsigned long __supported_pte_mask; +EXPORT_SYMBOL(__supported_pte_mask); + +#ifdef CONFIG_SMP +EXPORT_SYMBOL(flush_tlb_page); +#endif + +EXPORT_SYMBOL(cpu_khz); + EXPORT_SYMBOL(load_gs_index); diff --git a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile index b78d4170f..ccef6ae74 100644 --- a/arch/x86_64/lib/Makefile +++ b/arch/x86_64/lib/Makefile @@ -9,4 +9,4 @@ obj-y := io.o iomap_copy.o lib-y := csum-partial.o csum-copy.o csum-wrappers.o delay.o \ usercopy.o getuser.o putuser.o \ thunk.o clear_page.o copy_page.o bitstr.o bitops.o -lib-y += memcpy.o memmove.o memset.o copy_user.o rwlock.o +lib-y += memcpy.o memmove.o memset.o copy_user.o diff --git a/arch/x86_64/lib/clear_page.S b/arch/x86_64/lib/clear_page.S index 9a10a78bb..1f81b79b7 100644 --- a/arch/x86_64/lib/clear_page.S +++ b/arch/x86_64/lib/clear_page.S @@ -1,22 +1,10 @@ -#include -#include - /* * Zero a page. * rdi page */ - ALIGN -clear_page_c: - CFI_STARTPROC - movl $4096/8,%ecx - xorl %eax,%eax - rep stosq - ret - CFI_ENDPROC -ENDPROC(clear_page) - -ENTRY(clear_page) - CFI_STARTPROC + .globl clear_page + .p2align 4 +clear_page: xorl %eax,%eax movl $4096/64,%ecx .p2align 4 @@ -35,25 +23,28 @@ ENTRY(clear_page) jnz .Lloop nop ret - CFI_ENDPROC -.Lclear_page_end: -ENDPROC(clear_page) +clear_page_end: /* Some CPUs run faster using the string instructions. It is also a lot simpler. Use this when possible */ #include - .section .altinstr_replacement,"ax" -1: .byte 0xeb /* jmp */ - .byte (clear_page_c - clear_page) - (2f - 1b) /* offset */ -2: - .previous .section .altinstructions,"a" .align 8 - .quad clear_page - .quad 1b - .byte X86_FEATURE_REP_GOOD - .byte .Lclear_page_end - clear_page - .byte 2b - 1b + .quad clear_page + .quad clear_page_c + .byte X86_FEATURE_REP_GOOD + .byte clear_page_end-clear_page + .byte clear_page_c_end-clear_page_c + .previous + + .section .altinstr_replacement,"ax" +clear_page_c: + movl $4096/8,%ecx + xorl %eax,%eax + rep + stosq + ret +clear_page_c_end: .previous diff --git a/arch/x86_64/lib/copy_page.S b/arch/x86_64/lib/copy_page.S index 76288295b..8fa19d96a 100644 --- a/arch/x86_64/lib/copy_page.S +++ b/arch/x86_64/lib/copy_page.S @@ -1,32 +1,17 @@ /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */ -#include -#include - - ALIGN -copy_page_c: - CFI_STARTPROC - movl $4096/8,%ecx - rep movsq - ret - CFI_ENDPROC -ENDPROC(copy_page_c) - /* Don't use streaming store because it's better when the target ends up in cache. */ /* Could vary the prefetch distance based on SMP/UP */ -ENTRY(copy_page) - CFI_STARTPROC + .globl copy_page + .p2align 4 +copy_page: subq $3*8,%rsp - CFI_ADJUST_CFA_OFFSET 3*8 movq %rbx,(%rsp) - CFI_REL_OFFSET rbx, 0 movq %r12,1*8(%rsp) - CFI_REL_OFFSET r12, 1*8 movq %r13,2*8(%rsp) - CFI_REL_OFFSET r13, 2*8 movl $(4096/64)-5,%ecx .p2align 4 @@ -87,33 +72,30 @@ ENTRY(copy_page) jnz .Loop2 movq (%rsp),%rbx - CFI_RESTORE rbx movq 1*8(%rsp),%r12 - CFI_RESTORE r12 movq 2*8(%rsp),%r13 - CFI_RESTORE r13 addq $3*8,%rsp - CFI_ADJUST_CFA_OFFSET -3*8 ret -.Lcopy_page_end: - CFI_ENDPROC -ENDPROC(copy_page) /* Some CPUs run faster using the string copy instructions. It is also a lot simpler. Use this when possible */ #include - .section .altinstr_replacement,"ax" -1: .byte 0xeb /* jmp */ - .byte (copy_page_c - copy_page) - (2f - 1b) /* offset */ -2: - .previous .section .altinstructions,"a" .align 8 - .quad copy_page - .quad 1b - .byte X86_FEATURE_REP_GOOD - .byte .Lcopy_page_end - copy_page - .byte 2b - 1b + .quad copy_page + .quad copy_page_c + .byte X86_FEATURE_REP_GOOD + .byte copy_page_c_end-copy_page_c + .byte copy_page_c_end-copy_page_c + .previous + + .section .altinstr_replacement,"ax" +copy_page_c: + movl $4096/8,%ecx + rep + movsq + ret +copy_page_c_end: .previous diff --git a/arch/x86_64/lib/copy_user.S b/arch/x86_64/lib/copy_user.S index 962f3a693..f64569b83 100644 --- a/arch/x86_64/lib/copy_user.S +++ b/arch/x86_64/lib/copy_user.S @@ -4,9 +4,6 @@ * Functions to copy from and to user space. */ -#include -#include - #define FIX_ALIGNMENT 1 #include @@ -15,8 +12,9 @@ #include /* Standard copy_to_user with segment limit checking */ -ENTRY(copy_to_user) - CFI_STARTPROC + .globl copy_to_user + .p2align 4 +copy_to_user: GET_THREAD_INFO(%rax) movq %rdi,%rcx addq %rdx,%rcx @@ -27,11 +25,9 @@ ENTRY(copy_to_user) .byte 0xe9 /* 32bit jump */ .long .Lcug-1f 1: - CFI_ENDPROC -ENDPROC(copy_to_user) .section .altinstr_replacement,"ax" -3: .byte 0xe9 /* replacement jmp with 32 bit immediate */ +3: .byte 0xe9 /* replacement jmp with 8 bit immediate */ .long copy_user_generic_c-1b /* offset */ .previous .section .altinstructions,"a" @@ -44,8 +40,9 @@ ENDPROC(copy_to_user) .previous /* Standard copy_from_user with segment limit checking */ -ENTRY(copy_from_user) - CFI_STARTPROC + .globl copy_from_user + .p2align 4 +copy_from_user: GET_THREAD_INFO(%rax) movq %rsi,%rcx addq %rdx,%rcx @@ -53,13 +50,10 @@ ENTRY(copy_from_user) cmpq threadinfo_addr_limit(%rax),%rcx jae bad_from_user /* FALL THROUGH to copy_user_generic */ - CFI_ENDPROC -ENDPROC(copy_from_user) .section .fixup,"ax" /* must zero dest */ bad_from_user: - CFI_STARTPROC movl %edx,%ecx xorl %eax,%eax rep @@ -67,8 +61,6 @@ bad_from_user: bad_to_user: movl %edx,%eax ret - CFI_ENDPROC -END(bad_from_user) .previous @@ -83,8 +75,9 @@ END(bad_from_user) * Output: * eax uncopied bytes or 0 if successful. */ -ENTRY(copy_user_generic) - CFI_STARTPROC + .globl copy_user_generic + .p2align 4 +copy_user_generic: .byte 0x66,0x66,0x90 /* 5 byte nop for replacement jump */ .byte 0x66,0x90 1: @@ -102,8 +95,6 @@ ENTRY(copy_user_generic) .previous .Lcug: pushq %rbx - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET rbx, 0 xorl %eax,%eax /*zero for the exception handler */ #ifdef FIX_ALIGNMENT @@ -177,13 +168,9 @@ ENTRY(copy_user_generic) decl %ecx jnz .Lloop_1 - CFI_REMEMBER_STATE .Lende: popq %rbx - CFI_ADJUST_CFA_OFFSET -8 - CFI_RESTORE rbx ret - CFI_RESTORE_STATE #ifdef FIX_ALIGNMENT /* align destination */ @@ -274,9 +261,6 @@ ENTRY(copy_user_generic) .Le_zero: movq %rdx,%rax jmp .Lende - CFI_ENDPROC -ENDPROC(copy_user_generic) - /* Some CPUs run faster using the string copy instructions. This is also a lot simpler. Use them when possible. @@ -298,7 +282,6 @@ ENDPROC(copy_user_generic) * this please consider this. */ copy_user_generic_c: - CFI_STARTPROC movl %edx,%ecx shrl $3,%ecx andl $7,%edx @@ -311,8 +294,6 @@ copy_user_generic_c: ret 3: lea (%rdx,%rcx,8),%rax ret - CFI_ENDPROC -END(copy_user_generic_c) .section __ex_table,"a" .quad 1b,3b diff --git a/arch/x86_64/lib/csum-copy.S b/arch/x86_64/lib/csum-copy.S index f0dba3657..72fd55ee8 100644 --- a/arch/x86_64/lib/csum-copy.S +++ b/arch/x86_64/lib/csum-copy.S @@ -5,9 +5,8 @@ * License. See the file COPYING in the main directory of this archive * for more details. No warranty for anything given at all. */ -#include -#include -#include + #include + #include /* * Checksum copy with exception handling. @@ -54,24 +53,19 @@ .endm -ENTRY(csum_partial_copy_generic) - CFI_STARTPROC + .globl csum_partial_copy_generic + .p2align 4 +csum_partial_copy_generic: cmpl $3*64,%edx jle .Lignore .Lignore: subq $7*8,%rsp - CFI_ADJUST_CFA_OFFSET 7*8 movq %rbx,2*8(%rsp) - CFI_REL_OFFSET rbx, 2*8 movq %r12,3*8(%rsp) - CFI_REL_OFFSET r12, 3*8 movq %r14,4*8(%rsp) - CFI_REL_OFFSET r14, 4*8 movq %r13,5*8(%rsp) - CFI_REL_OFFSET r13, 5*8 movq %rbp,6*8(%rsp) - CFI_REL_OFFSET rbp, 6*8 movq %r8,(%rsp) movq %r9,1*8(%rsp) @@ -214,22 +208,14 @@ ENTRY(csum_partial_copy_generic) addl %ebx,%eax adcl %r9d,%eax /* carry */ - CFI_REMEMBER_STATE .Lende: movq 2*8(%rsp),%rbx - CFI_RESTORE rbx movq 3*8(%rsp),%r12 - CFI_RESTORE r12 movq 4*8(%rsp),%r14 - CFI_RESTORE r14 movq 5*8(%rsp),%r13 - CFI_RESTORE r13 movq 6*8(%rsp),%rbp - CFI_RESTORE rbp addq $7*8,%rsp - CFI_ADJUST_CFA_OFFSET -7*8 ret - CFI_RESTORE_STATE /* Exception handlers. Very simple, zeroing is done in the wrappers */ .Lbad_source: @@ -245,5 +231,3 @@ ENTRY(csum_partial_copy_generic) jz .Lende movl $-EFAULT,(%rax) jmp .Lende - CFI_ENDPROC -ENDPROC(csum_partial_copy_generic) diff --git a/arch/x86_64/lib/csum-partial.c b/arch/x86_64/lib/csum-partial.c index c49373521..5384e227c 100644 --- a/arch/x86_64/lib/csum-partial.c +++ b/arch/x86_64/lib/csum-partial.c @@ -147,5 +147,4 @@ unsigned short ip_compute_csum(unsigned char * buff, int len) { return csum_fold(csum_partial(buff,len,0)); } -EXPORT_SYMBOL(ip_compute_csum); diff --git a/arch/x86_64/lib/csum-wrappers.c b/arch/x86_64/lib/csum-wrappers.c index b1320ec58..94323f208 100644 --- a/arch/x86_64/lib/csum-wrappers.c +++ b/arch/x86_64/lib/csum-wrappers.c @@ -109,7 +109,6 @@ csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len, { return csum_partial_copy_generic(src,dst,len,sum,NULL,NULL); } -EXPORT_SYMBOL(csum_partial_copy_nocheck); unsigned short csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, __u32 len, unsigned short proto, unsigned int sum) diff --git a/arch/x86_64/lib/delay.c b/arch/x86_64/lib/delay.c index 50be90975..03c460cbd 100644 --- a/arch/x86_64/lib/delay.c +++ b/arch/x86_64/lib/delay.c @@ -8,7 +8,7 @@ * depends wildly on alignment on many x86 processors. */ -#include +#include #include #include #include @@ -36,22 +36,18 @@ void __delay(unsigned long loops) } while((now-bclock) < loops); } -EXPORT_SYMBOL(__delay); inline void __const_udelay(unsigned long xloops) { __delay((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32); } -EXPORT_SYMBOL(__const_udelay); void __udelay(unsigned long usecs) { __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ } -EXPORT_SYMBOL(__udelay); void __ndelay(unsigned long nsecs) { __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ } -EXPORT_SYMBOL(__ndelay); diff --git a/arch/x86_64/lib/getuser.S b/arch/x86_64/lib/getuser.S index 544887626..3844d5e88 100644 --- a/arch/x86_64/lib/getuser.S +++ b/arch/x86_64/lib/getuser.S @@ -27,26 +27,25 @@ */ #include -#include #include #include #include #include .text -ENTRY(__get_user_1) - CFI_STARTPROC + .p2align 4 +.globl __get_user_1 +__get_user_1: GET_THREAD_INFO(%r8) cmpq threadinfo_addr_limit(%r8),%rcx jae bad_get_user 1: movzb (%rcx),%edx xorl %eax,%eax ret - CFI_ENDPROC -ENDPROC(__get_user_1) -ENTRY(__get_user_2) - CFI_STARTPROC + .p2align 4 +.globl __get_user_2 +__get_user_2: GET_THREAD_INFO(%r8) addq $1,%rcx jc 20f @@ -58,11 +57,10 @@ ENTRY(__get_user_2) ret 20: decq %rcx jmp bad_get_user - CFI_ENDPROC -ENDPROC(__get_user_2) -ENTRY(__get_user_4) - CFI_STARTPROC + .p2align 4 +.globl __get_user_4 +__get_user_4: GET_THREAD_INFO(%r8) addq $3,%rcx jc 30f @@ -74,11 +72,10 @@ ENTRY(__get_user_4) ret 30: subq $3,%rcx jmp bad_get_user - CFI_ENDPROC -ENDPROC(__get_user_4) -ENTRY(__get_user_8) - CFI_STARTPROC + .p2align 4 +.globl __get_user_8 +__get_user_8: GET_THREAD_INFO(%r8) addq $7,%rcx jc 40f @@ -90,16 +87,11 @@ ENTRY(__get_user_8) ret 40: subq $7,%rcx jmp bad_get_user - CFI_ENDPROC -ENDPROC(__get_user_8) bad_get_user: - CFI_STARTPROC xorl %edx,%edx movq $(-EFAULT),%rax ret - CFI_ENDPROC -END(bad_get_user) .section __ex_table,"a" .quad 1b,bad_get_user diff --git a/arch/x86_64/lib/iomap_copy.S b/arch/x86_64/lib/iomap_copy.S index 05a95e713..8bbade5fe 100644 --- a/arch/x86_64/lib/iomap_copy.S +++ b/arch/x86_64/lib/iomap_copy.S @@ -15,16 +15,12 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include - /* * override generic version in lib/iomap_copy.c */ -ENTRY(__iowrite32_copy) - CFI_STARTPROC + .globl __iowrite32_copy + .p2align 4 +__iowrite32_copy: movl %edx,%ecx rep movsd ret - CFI_ENDPROC -ENDPROC(__iowrite32_copy) diff --git a/arch/x86_64/lib/memcpy.S b/arch/x86_64/lib/memcpy.S index 9b10fb6a9..5554948b5 100644 --- a/arch/x86_64/lib/memcpy.S +++ b/arch/x86_64/lib/memcpy.S @@ -1,9 +1,6 @@ /* Copyright 2002 Andi Kleen */ -#include -#include -#include - + #include /* * memcpy - Copy a memory block. * @@ -16,26 +13,12 @@ * rax original destination */ - ALIGN -memcpy_c: - CFI_STARTPROC - movq %rdi,%rax - movl %edx,%ecx - shrl $3,%ecx - andl $7,%edx - rep movsq - movl %edx,%ecx - rep movsb - ret - CFI_ENDPROC -ENDPROC(memcpy_c) - -ENTRY(__memcpy) -ENTRY(memcpy) - CFI_STARTPROC + .globl __memcpy + .globl memcpy + .p2align 4 +__memcpy: +memcpy: pushq %rbx - CFI_ADJUST_CFA_OFFSET 8 - CFI_REL_OFFSET rbx, 0 movq %rdi,%rax movl %edx,%ecx @@ -103,27 +86,36 @@ ENTRY(memcpy) .Lende: popq %rbx - CFI_ADJUST_CFA_OFFSET -8 - CFI_RESTORE rbx ret .Lfinal: - CFI_ENDPROC -ENDPROC(memcpy) -ENDPROC(__memcpy) /* Some CPUs run faster using the string copy instructions. It is also a lot simpler. Use this when possible */ - .section .altinstr_replacement,"ax" -1: .byte 0xeb /* jmp */ - .byte (memcpy_c - memcpy) - (2f - 1b) /* offset */ -2: - .previous .section .altinstructions,"a" .align 8 - .quad memcpy - .quad 1b - .byte X86_FEATURE_REP_GOOD - .byte .Lfinal - memcpy - .byte 2b - 1b + .quad memcpy + .quad memcpy_c + .byte X86_FEATURE_REP_GOOD + .byte .Lfinal-memcpy + .byte memcpy_c_end-memcpy_c + .previous + + .section .altinstr_replacement,"ax" + /* rdi destination + * rsi source + * rdx count + */ +memcpy_c: + movq %rdi,%rax + movl %edx,%ecx + shrl $3,%ecx + andl $7,%edx + rep + movsq + movl %edx,%ecx + rep + movsb + ret +memcpy_c_end: .previous diff --git a/arch/x86_64/lib/memmove.c b/arch/x86_64/lib/memmove.c index 751ebae8e..e93d5255f 100644 --- a/arch/x86_64/lib/memmove.c +++ b/arch/x86_64/lib/memmove.c @@ -3,13 +3,12 @@ */ #define _STRING_C #include -#include #undef memmove void *memmove(void * dest,const void *src,size_t count) { if (dest < src) { - return memcpy(dest,src,count); + __inline_memcpy(dest,src,count); } else { char *p = (char *) dest + count; char *s = (char *) src + count; @@ -18,4 +17,3 @@ void *memmove(void * dest,const void *src,size_t count) } return dest; } -EXPORT_SYMBOL(memmove); diff --git a/arch/x86_64/lib/memset.S b/arch/x86_64/lib/memset.S index 2c5948116..ad397f2c7 100644 --- a/arch/x86_64/lib/memset.S +++ b/arch/x86_64/lib/memset.S @@ -1,8 +1,4 @@ /* Copyright 2002 Andi Kleen, SuSE Labs */ - -#include -#include - /* * ISO C memset - set a memory block to a byte value. * @@ -12,29 +8,11 @@ * * rax original destination */ - ALIGN -memset_c: - CFI_STARTPROC - movq %rdi,%r9 - movl %edx,%r8d - andl $7,%r8d - movl %edx,%ecx - shrl $3,%ecx - /* expand byte value */ - movzbl %sil,%esi - movabs $0x0101010101010101,%rax - mulq %rsi /* with rax, clobbers rdx */ - rep stosq - movl %r8d,%ecx - rep stosb - movq %r9,%rax - ret - CFI_ENDPROC -ENDPROC(memset_c) - -ENTRY(memset) -ENTRY(__memset) - CFI_STARTPROC + .globl __memset + .globl memset + .p2align 4 +memset: +__memset: movq %rdi,%r10 movq %rdx,%r11 @@ -47,7 +25,6 @@ ENTRY(__memset) movl %edi,%r9d andl $7,%r9d jnz .Lbad_alignment - CFI_REMEMBER_STATE .Lafter_bad_alignment: movl %r11d,%ecx @@ -98,7 +75,6 @@ ENTRY(__memset) movq %r10,%rax ret - CFI_RESTORE_STATE .Lbad_alignment: cmpq $7,%r11 jbe .Lhandle_7 @@ -108,26 +84,42 @@ ENTRY(__memset) addq %r8,%rdi subq %r8,%r11 jmp .Lafter_bad_alignment -.Lfinal: - CFI_ENDPROC -ENDPROC(memset) -ENDPROC(__memset) /* Some CPUs run faster using the string instructions. It is also a lot simpler. Use this when possible */ #include - .section .altinstr_replacement,"ax" -1: .byte 0xeb /* jmp */ - .byte (memset_c - memset) - (2f - 1b) /* offset */ -2: - .previous .section .altinstructions,"a" .align 8 - .quad memset - .quad 1b - .byte X86_FEATURE_REP_GOOD - .byte .Lfinal - memset - .byte 2b - 1b + .quad memset + .quad memset_c + .byte X86_FEATURE_REP_GOOD + .byte memset_c_end-memset_c + .byte memset_c_end-memset_c + .previous + + .section .altinstr_replacement,"ax" + /* rdi destination + * rsi value + * rdx count + */ +memset_c: + movq %rdi,%r9 + movl %edx,%r8d + andl $7,%r8d + movl %edx,%ecx + shrl $3,%ecx + /* expand byte value */ + movzbl %sil,%esi + movabs $0x0101010101010101,%rax + mulq %rsi /* with rax, clobbers rdx */ + rep + stosq + movl %r8d,%ecx + rep + stosb + movq %r9,%rax + ret +memset_c_end: .previous diff --git a/arch/x86_64/lib/putuser.S b/arch/x86_64/lib/putuser.S index 4989f5a8f..7f5593974 100644 --- a/arch/x86_64/lib/putuser.S +++ b/arch/x86_64/lib/putuser.S @@ -25,26 +25,25 @@ */ #include -#include #include #include #include #include .text -ENTRY(__put_user_1) - CFI_STARTPROC + .p2align 4 +.globl __put_user_1 +__put_user_1: GET_THREAD_INFO(%r8) cmpq threadinfo_addr_limit(%r8),%rcx jae bad_put_user 1: movb %dl,(%rcx) xorl %eax,%eax ret - CFI_ENDPROC -ENDPROC(__put_user_1) -ENTRY(__put_user_2) - CFI_STARTPROC + .p2align 4 +.globl __put_user_2 +__put_user_2: GET_THREAD_INFO(%r8) addq $1,%rcx jc 20f @@ -56,11 +55,10 @@ ENTRY(__put_user_2) ret 20: decq %rcx jmp bad_put_user - CFI_ENDPROC -ENDPROC(__put_user_2) -ENTRY(__put_user_4) - CFI_STARTPROC + .p2align 4 +.globl __put_user_4 +__put_user_4: GET_THREAD_INFO(%r8) addq $3,%rcx jc 30f @@ -72,11 +70,10 @@ ENTRY(__put_user_4) ret 30: subq $3,%rcx jmp bad_put_user - CFI_ENDPROC -ENDPROC(__put_user_4) -ENTRY(__put_user_8) - CFI_STARTPROC + .p2align 4 +.globl __put_user_8 +__put_user_8: GET_THREAD_INFO(%r8) addq $7,%rcx jc 40f @@ -88,15 +85,10 @@ ENTRY(__put_user_8) ret 40: subq $7,%rcx jmp bad_put_user - CFI_ENDPROC -ENDPROC(__put_user_8) bad_put_user: - CFI_STARTPROC movq $(-EFAULT),%rax ret - CFI_ENDPROC -END(bad_put_user) .section __ex_table,"a" .quad 1b,bad_put_user diff --git a/arch/x86_64/lib/rwlock.S b/arch/x86_64/lib/rwlock.S deleted file mode 100644 index 0cde1f807..000000000 --- a/arch/x86_64/lib/rwlock.S +++ /dev/null @@ -1,38 +0,0 @@ -/* Slow paths of read/write spinlocks. */ - -#include -#include -#include -#include - -/* rdi: pointer to rwlock_t */ -ENTRY(__write_lock_failed) - CFI_STARTPROC - LOCK_PREFIX - addl $RW_LOCK_BIAS,(%rdi) -1: rep - nop - cmpl $RW_LOCK_BIAS,(%rdi) - jne 1b - LOCK_PREFIX - subl $RW_LOCK_BIAS,(%rdi) - jnz __write_lock_failed - ret - CFI_ENDPROC -END(__write_lock_failed) - -/* rdi: pointer to rwlock_t */ -ENTRY(__read_lock_failed) - CFI_STARTPROC - LOCK_PREFIX - incl (%rdi) -1: rep - nop - cmpl $1,(%rdi) - js 1b - LOCK_PREFIX - decl (%rdi) - js __read_lock_failed - ret - CFI_ENDPROC -END(__read_lock_failed) diff --git a/arch/x86_64/lib/thunk.S b/arch/x86_64/lib/thunk.S index 39523db06..e49af0032 100644 --- a/arch/x86_64/lib/thunk.S +++ b/arch/x86_64/lib/thunk.S @@ -6,6 +6,7 @@ * $Id: thunk.S,v 1.2 2002/03/13 20:06:58 ak Exp $ */ + #include #include #include #include @@ -46,11 +47,6 @@ thunk_retrax __down_failed_interruptible,__down_interruptible thunk_retrax __down_failed_trylock,__down_trylock thunk __up_wakeup,__up - -#ifdef CONFIG_TRACE_IRQFLAGS - thunk trace_hardirqs_on_thunk,trace_hardirqs_on - thunk trace_hardirqs_off_thunk,trace_hardirqs_off -#endif /* SAVE_ARGS below is used only for the .cfi directives it contains. */ CFI_STARTPROC @@ -66,3 +62,33 @@ restore_norax: RESTORE_ARGS 1 ret CFI_ENDPROC + +#ifdef CONFIG_SMP +/* Support for read/write spinlocks. */ + .text +/* rax: pointer to rwlock_t */ +ENTRY(__write_lock_failed) + lock + addl $RW_LOCK_BIAS,(%rax) +1: rep + nop + cmpl $RW_LOCK_BIAS,(%rax) + jne 1b + lock + subl $RW_LOCK_BIAS,(%rax) + jnz __write_lock_failed + ret + +/* rax: pointer to rwlock_t */ +ENTRY(__read_lock_failed) + lock + incl (%rax) +1: rep + nop + cmpl $1,(%rax) + js 1b + lock + decl (%rax) + js __read_lock_failed + ret +#endif diff --git a/arch/x86_64/lib/usercopy.c b/arch/x86_64/lib/usercopy.c index 893d43f83..9bc2c2958 100644 --- a/arch/x86_64/lib/usercopy.c +++ b/arch/x86_64/lib/usercopy.c @@ -5,7 +5,6 @@ * Copyright 1997 Linus Torvalds * Copyright 2002 Andi Kleen */ -#include #include /* @@ -48,17 +47,15 @@ __strncpy_from_user(char *dst, const char __user *src, long count) __do_strncpy_from_user(dst, src, count, res); return res; } -EXPORT_SYMBOL(__strncpy_from_user); long strncpy_from_user(char *dst, const char __user *src, long count) { long res = -EFAULT; if (access_ok(VERIFY_READ, src, 1)) - return __strncpy_from_user(dst, src, count); + __do_strncpy_from_user(dst, src, count, res); return res; } -EXPORT_SYMBOL(strncpy_from_user); /* * Zero Userspace @@ -97,7 +94,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) [zero] "r" (0UL), [eight] "r" (8UL)); return size; } -EXPORT_SYMBOL(__clear_user); + unsigned long clear_user(void __user *to, unsigned long n) { @@ -105,7 +102,6 @@ unsigned long clear_user(void __user *to, unsigned long n) return __clear_user(to, n); return n; } -EXPORT_SYMBOL(clear_user); /* * Return the size of a string (including the ending 0) @@ -129,7 +125,6 @@ long __strnlen_user(const char __user *s, long n) s++; } } -EXPORT_SYMBOL(__strnlen_user); long strnlen_user(const char __user *s, long n) { @@ -137,7 +132,6 @@ long strnlen_user(const char __user *s, long n) return 0; return __strnlen_user(s, n); } -EXPORT_SYMBOL(strnlen_user); long strlen_user(const char __user *s) { @@ -153,7 +147,6 @@ long strlen_user(const char __user *s) s++; } } -EXPORT_SYMBOL(strlen_user); unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) { @@ -162,5 +155,3 @@ unsigned long copy_in_user(void __user *to, const void __user *from, unsigned le } return len; } -EXPORT_SYMBOL(copy_in_user); - diff --git a/arch/x86_64/mm/extable.c b/arch/x86_64/mm/extable.c index 79ac6e710..2d78f9fb4 100644 --- a/arch/x86_64/mm/extable.c +++ b/arch/x86_64/mm/extable.c @@ -2,6 +2,7 @@ * linux/arch/x86_64/mm/extable.c */ +#include #include #include #include diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index a371e1b9d..80bb11c7a 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c @@ -5,6 +5,7 @@ * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs. */ +#include #include #include #include @@ -40,41 +41,6 @@ #define PF_RSVD (1<<3) #define PF_INSTR (1<<4) -#ifdef CONFIG_KPROBES -ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); - -/* Hook to register for page fault notifications */ -int register_page_fault_notifier(struct notifier_block *nb) -{ - vmalloc_sync_all(); - return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); -} - -int unregister_page_fault_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); -} - -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - struct die_args args = { - .regs = regs, - .str = str, - .err = err, - .trapnr = trap, - .signr = sig - }; - return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); -} -#else -static inline int notify_page_fault(enum die_val val, const char *str, - struct pt_regs *regs, long err, int trap, int sig) -{ - return NOTIFY_DONE; -} -#endif - void bust_spinlocks(int yes) { int loglevel_save = console_loglevel; @@ -194,7 +160,7 @@ void dump_pagetable(unsigned long address) printk("PGD %lx ", pgd_val(*pgd)); if (!pgd_present(*pgd)) goto ret; - pud = pud_offset(pgd, address); + pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address); if (bad_address(pud)) goto bad; printk("PUD %lx ", pud_val(*pud)); if (!pud_present(*pud)) goto ret; @@ -382,7 +348,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, if (vmalloc_fault(address) >= 0) return; } - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, SIGSEGV) == NOTIFY_STOP) return; /* @@ -392,7 +358,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, goto bad_area_nosemaphore; } - if (notify_page_fault(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, SIGSEGV) == NOTIFY_STOP) return; @@ -417,7 +383,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, /* When running in the kernel we expect faults to occur only to * addresses in user space. All other faults represent errors in the * kernel and should generate an OOPS. Unfortunatly, in the case of an - * erroneous fault occurring in a code path which already holds mmap_sem + * erroneous fault occuring in a code path which already holds mmap_sem * we will deadlock attempting to validate the fault against the * address space. Luckily the kernel only validly references user * space from well defined areas of code, which are listed in the @@ -444,10 +410,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, if (!(vma->vm_flags & VM_GROWSDOWN)) goto bad_area; if (error_code & 4) { - /* Allow userspace just enough access below the stack pointer - * to let the 'enter' instruction work. - */ - if (address + 65536 + 32 * sizeof(unsigned long) < regs->rsp) + // XXX: align red zone size with ABI + if (address + 128 < regs->rsp) goto bad_area; } if (expand_stack(vma, address)) @@ -570,6 +534,7 @@ no_context: printk(KERN_ALERT "Unable to handle kernel paging request"); printk(" at %016lx RIP: \n" KERN_ALERT,address); printk_address(regs->rip); + printk("\n"); dump_pagetable(address); tsk->thread.cr2 = address; tsk->thread.trap_no = 14; diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 8cc96d090..1d61913d7 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -6,6 +6,7 @@ * Copyright (C) 2002,2003 Andi Kleen */ +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -42,6 +42,8 @@ #include #include #include +#include +#include #ifndef Dprintk #define Dprintk(x...) @@ -89,6 +91,8 @@ void show_mem(void) printk(KERN_INFO "%lu pages swap cached\n",cached); } +/* References to section boundaries */ + int after_bootmem; static __init void *spp_getpage(void) @@ -258,10 +262,9 @@ phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end) for (i = 0; i < PTRS_PER_PMD; pmd++, i++, address += PMD_SIZE) { unsigned long entry; - if (address >= end) { - if (!after_bootmem) - for (; i < PTRS_PER_PMD; i++, pmd++) - set_pmd(pmd, __pmd(0)); + if (address > end) { + for (; i < PTRS_PER_PMD; i++, pmd++) + set_pmd(pmd, __pmd(0)); break; } entry = _PAGE_NX|_PAGE_PSE|_KERNPG_TABLE|_PAGE_GLOBAL|address; @@ -337,6 +340,9 @@ static void __init find_early_table_space(unsigned long end) table_start >>= PAGE_SHIFT; table_end = table_start; + + early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n", + end, table_start << PAGE_SHIFT, table_end << PAGE_SHIFT); } /* Setup the direct mapping of the physical memory at PAGE_OFFSET. @@ -367,7 +373,7 @@ void __meminit init_memory_mapping(unsigned long start, unsigned long end) pud_t *pud; if (after_bootmem) - pud = pud_offset(pgd, start & PGDIR_MASK); + pud = pud_offset_k(pgd, start & PGDIR_MASK); else pud = alloc_low_page(&map, &pud_phys); @@ -525,6 +531,8 @@ static inline int page_is_ram (unsigned long pagenr) /* * Memory hotplug specific functions */ +#if defined(CONFIG_ACPI_HOTPLUG_MEMORY) || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE) + void online_page(struct page *page) { ClearPageReserved(page); @@ -534,17 +542,31 @@ void online_page(struct page *page) num_physpages++; } -#ifdef CONFIG_MEMORY_HOTPLUG +#ifndef CONFIG_MEMORY_HOTPLUG /* - * XXX: memory_add_physaddr_to_nid() is to find node id from physical address - * via probe interface of sysfs. If acpi notifies hot-add event, then it - * can tell node id by searching dsdt. But, probe interface doesn't have - * node id. So, return 0 as node id at this time. + * Memory Hotadd without sparsemem. The mem_maps have been allocated in advance, + * just online the pages. */ -#ifdef CONFIG_NUMA -int memory_add_physaddr_to_nid(u64 start) +int __add_pages(struct zone *z, unsigned long start_pfn, unsigned long nr_pages) { - return 0; + int err = -EIO; + unsigned long pfn; + unsigned long total = 0, mem = 0; + for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) { + if (pfn_valid(pfn)) { + online_page(pfn_to_page(pfn)); + err = 0; + mem++; + } + total++; + } + if (!err) { + z->spanned_pages += total; + z->present_pages += mem; + z->zone_pgdat->node_spanned_pages += total; + z->zone_pgdat->node_present_pages += mem; + } + return err; } #endif @@ -552,9 +574,9 @@ int memory_add_physaddr_to_nid(u64 start) * Memory is added always to NORMAL zone. This means you will never get * additional DMA/DMA32 memory. */ -int arch_add_memory(int nid, u64 start, u64 size) +int add_memory(u64 start, u64 size) { - struct pglist_data *pgdat = NODE_DATA(nid); + struct pglist_data *pgdat = NODE_DATA(0); struct zone *zone = pgdat->node_zones + MAX_NR_ZONES-2; unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long nr_pages = size >> PAGE_SHIFT; @@ -571,7 +593,7 @@ error: printk("%s: Problem encountered in __add_pages!\n", __func__); return ret; } -EXPORT_SYMBOL_GPL(arch_add_memory); +EXPORT_SYMBOL_GPL(add_memory); int remove_memory(u64 start, u64 size) { @@ -579,33 +601,7 @@ int remove_memory(u64 start, u64 size) } EXPORT_SYMBOL_GPL(remove_memory); -#else /* CONFIG_MEMORY_HOTPLUG */ -/* - * Memory Hotadd without sparsemem. The mem_maps have been allocated in advance, - * just online the pages. - */ -int __add_pages(struct zone *z, unsigned long start_pfn, unsigned long nr_pages) -{ - int err = -EIO; - unsigned long pfn; - unsigned long total = 0, mem = 0; - for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) { - if (pfn_valid(pfn)) { - online_page(pfn_to_page(pfn)); - err = 0; - mem++; - } - total++; - } - if (!err) { - z->spanned_pages += total; - z->present_pages += mem; - z->zone_pgdat->node_spanned_pages += total; - z->zone_pgdat->node_present_pages += mem; - } - return err; -} -#endif /* CONFIG_MEMORY_HOTPLUG */ +#endif /* * devmem_is_allowed() checks to see if /dev/mem access to a certain address is @@ -636,7 +632,10 @@ void __init mem_init(void) { long codesize, reservedpages, datasize, initsize; - pci_iommu_alloc(); +#ifdef CONFIG_SWIOTLB + pci_swiotlb_init(); +#endif + no_iommu_init(); /* How many end-of-memory variables you have, grandma! */ max_low_pfn = end_pfn; @@ -690,44 +689,34 @@ void __init mem_init(void) #endif } -void free_init_pages(char *what, unsigned long begin, unsigned long end) +void free_initmem(void) { unsigned long addr; - if (begin >= end) - return; - - printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10); - for (addr = begin; addr < end; addr += PAGE_SIZE) { + addr = (unsigned long)(&__init_begin); + for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { ClearPageReserved(virt_to_page(addr)); init_page_count(virt_to_page(addr)); - memset((void *)(addr & ~(PAGE_SIZE-1)), - POISON_FREE_INITMEM, PAGE_SIZE); + memset((void *)(addr & ~(PAGE_SIZE-1)), 0xcc, PAGE_SIZE); free_page(addr); totalram_pages++; } -} - -void free_initmem(void) -{ - memset(__initdata_begin, POISON_FREE_INITDATA, - __initdata_end - __initdata_begin); - free_init_pages("unused kernel memory", - (unsigned long)(&__init_begin), - (unsigned long)(&__init_end)); + memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin); + printk ("Freeing unused kernel memory: %luk freed\n", (__init_end - __init_begin) >> 10); } #ifdef CONFIG_DEBUG_RODATA +extern char __start_rodata, __end_rodata; void mark_rodata_ro(void) { - unsigned long addr = (unsigned long)__start_rodata; + unsigned long addr = (unsigned long)&__start_rodata; - for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) + for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); printk ("Write protecting the kernel read-only data: %luk\n", - (__end_rodata - __start_rodata) >> 10); + (&__end_rodata - &__start_rodata) >> 10); /* * change_page_attr_addr() requires a global_flush_tlb() call after it. @@ -742,7 +731,15 @@ void mark_rodata_ro(void) #ifdef CONFIG_BLK_DEV_INITRD void free_initrd_mem(unsigned long start, unsigned long end) { - free_init_pages("initrd memory", start, end); + if (start >= end) + return; + printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); + for (; start < end; start += PAGE_SIZE) { + ClearPageReserved(virt_to_page(start)); + init_page_count(virt_to_page(start)); + free_page(start); + totalram_pages++; + } } #endif diff --git a/arch/x86_64/mm/ioremap.c b/arch/x86_64/mm/ioremap.c index 45d7d823c..ae2070642 100644 --- a/arch/x86_64/mm/ioremap.c +++ b/arch/x86_64/mm/ioremap.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -220,7 +219,6 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l } return (__force void __iomem *) (offset + (char *)addr); } -EXPORT_SYMBOL(__ioremap); /** * ioremap_nocache - map bus memory into CPU space @@ -248,7 +246,6 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size) { return __ioremap(phys_addr, size, _PAGE_PCD); } -EXPORT_SYMBOL(ioremap_nocache); /** * iounmap - Free a IO remapping @@ -294,5 +291,3 @@ void iounmap(volatile void __iomem *addr) BUG_ON(p != o || o == NULL); kfree(p); } -EXPORT_SYMBOL(iounmap); - diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c index 2685b1f36..531ad2144 100644 --- a/arch/x86_64/mm/pageattr.c +++ b/arch/x86_64/mm/pageattr.c @@ -3,6 +3,7 @@ * Thanks to Ben LaHaise for precious feedback. */ +#include #include #include #include diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 502fce65e..474df22c6 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c @@ -30,6 +30,7 @@ static struct acpi_table_slit *acpi_slit; static nodemask_t nodes_parsed __initdata; +static nodemask_t nodes_found __initdata; static struct bootnode nodes[MAX_NUMNODES] __initdata; static struct bootnode nodes_add[MAX_NUMNODES] __initdata; static int found_add_area __initdata; @@ -37,14 +38,33 @@ int hotadd_percent __initdata = 0; #ifndef RESERVE_HOTADD #define hotadd_percent 0 /* Ignore all settings */ #endif +static u8 pxm2node[256] = { [0 ... 255] = 0xff }; /* Too small nodes confuse the VM badly. Usually they result from BIOS bugs. */ #define NODE_MIN_SIZE (4*1024*1024) +static int node_to_pxm(int n); + +int pxm_to_node(int pxm) +{ + if ((unsigned)pxm >= 256) + return -1; + /* Extend 0xff to (int)-1 */ + return (signed char)pxm2node[pxm]; +} + static __init int setup_node(int pxm) { - return acpi_map_pxm_to_node(pxm); + unsigned node = pxm2node[pxm]; + if (node == 0xff) { + if (nodes_weight(nodes_found) >= MAX_NUMNODES) + return -1; + node = first_unset_node(nodes_found); + node_set(node, nodes_found); + pxm2node[pxm] = node; + } + return pxm2node[pxm]; } static __init int conflicting_nodes(unsigned long start, unsigned long end) @@ -420,6 +440,17 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) return 0; } +static int node_to_pxm(int n) +{ + int i; + if (pxm2node[n] == n) + return n; + for (i = 0; i < 256; i++) + if (pxm2node[i] == n) + return i; + return 0; +} + void __init srat_reserve_add_area(int nodeid) { if (found_add_area && nodes_add[nodeid].end) { diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index a4056c64c..3c55c76c6 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c @@ -180,9 +180,9 @@ void __init pci_mmcfg_init(void) if (!e820_all_mapped(pci_mmcfg_config[0].base_address, pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, E820_RESERVED)) { - printk(KERN_INFO "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", + printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", pci_mmcfg_config[0].base_address); - printk(KERN_INFO "PCI: Not using MMCONFIG.\n"); + printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); return; } diff --git a/arch/xen/kernel/vmlinux.lds.S b/arch/xen/kernel/vmlinux.lds.S new file mode 100644 index 000000000..e93cddfda --- /dev/null +++ b/arch/xen/kernel/vmlinux.lds.S @@ -0,0 +1,275 @@ +/* ld script to make i386 Linux kernel + * Written by Martin Mares ; + */ + + +#include +#include +#include + + +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +#ifdef ALK_KEXEC +#define LOAD_OFFSET __PAGE_OFFSET +#define KERN_PHYS_OFFSET (CONFIG_KERN_PHYS_OFFSET * 0x100000) +ENTRY(phys_startup_32) +jiffies = jiffies_64; +SECTIONS +{ + . = LOAD_OFFSET + KERN_PHYS_OFFSET; + phys_startup_32 = startup_32 - LOAD_OFFSET; + /* read-only */ + _text = .; /* Text and read-only data */ + .text : AT(ADDR(.text) - LOAD_OFFSET) { + *(.text) + SCHED_TEXT + LOCK_TEXT + *(.fixup) + *(.gnu.warning) + } = 0x9090 + + _etext = .; /* End of text section */ + + . = ALIGN(16); /* Exception table */ + __start___ex_table = .; + __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) } + __stop___ex_table = .; + + RODATA + + /* writeable */ + .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ + *(.data) + CONSTRUCTORS + } + + . = ALIGN(4096); + __nosave_begin = .; + .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) } + . = ALIGN(4096); + __nosave_end = .; + + . = ALIGN(4096); + .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { *(.data.idt) } + + . = ALIGN(32); + .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { + *(.data.cacheline_aligned) + } + + _edata = .; /* End of data section */ + + . = ALIGN(THREAD_SIZE); /* init_task */ + .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { *(.data.init_task) } + + /* will be freed after init */ + . = ALIGN(4096); /* Init code and data */ + __init_begin = .; + .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { + _sinittext = .; + *(.init.text) + _einittext = .; + } + .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { *(.init.data) } + . = ALIGN(16); + __setup_start = .; + .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { *(.init.setup) } + __setup_end = .; + __initcall_start = .; + .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { + *(.initcall1.init) + *(.initcall2.init) + *(.initcall3.init) + *(.initcall4.init) + *(.initcall5.init) + *(.initcall6.init) + *(.initcall7.init) + } + __initcall_end = .; + __con_initcall_start = .; + .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { + *(.con_initcall.init) + } + __con_initcall_end = .; + SECURITY_INIT + . = ALIGN(4); + __alt_instructions = .; + .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { + *(.altinstructions) + } + __alt_instructions_end = .; + .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { + *(.altinstr_replacement) + } + /* .exit.text is discard at runtime, not link time, to deal with references + from .altinstructions and .eh_frame */ + .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) { *(.exit.text) } + .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { *(.exit.data) } + . = ALIGN(4096); + __initramfs_start = .; + .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } + __initramfs_end = .; + . = ALIGN(32); + __per_cpu_start = .; + .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) } + __per_cpu_end = .; + . = ALIGN(4096); + __init_end = .; + /* freed after init ends here */ + + __bss_start = .; /* BSS */ + .bss.page_aligned : AT(ADDR(.bss.page_aligned) - LOAD_OFFSET) { + *(.bss.page_aligned) } + .bss : AT(ADDR(.bss) - LOAD_OFFSET) { + *(.bss) + } + . = ALIGN(4); + __bss_stop = .; + + _end = . ; + + /* This is where the kernel creates the early boot page tables */ + . = ALIGN(4096); + pg0 = .; + + /* Sections to be discarded */ + /DISCARD/ : { + *(.exitcall.exit) + } + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} +#else +ENTRY(startup_32) +jiffies = jiffies_64; +SECTIONS +{ + . = __PAGE_OFFSET + 0x100000; + /* read-only */ + _text = .; /* Text and read-only data */ + .text : { + *(.text) + SCHED_TEXT + LOCK_TEXT + *(.fixup) + *(.gnu.warning) + } = 0x9090 + + _etext = .; /* End of text section */ + + . = ALIGN(16); /* Exception table */ + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + RODATA + + /* writeable */ + .data : { /* Data */ + *(.data) + CONSTRUCTORS + } + + . = ALIGN(4096); + __nosave_begin = .; + .data_nosave : { *(.data.nosave) } + . = ALIGN(4096); + __nosave_end = .; + + . = ALIGN(4096); + .data.page_aligned : { *(.data.idt) } + + . = ALIGN(32); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + + _edata = .; /* End of data section */ + + . = ALIGN(THREAD_SIZE); /* init_task */ + .data.init_task : { *(.data.init_task) } + + /* will be freed after init */ + . = ALIGN(4096); /* Init code and data */ + __init_begin = .; + .init.text : { + _sinittext = .; + *(.init.text) + _einittext = .; + } + .init.data : { *(.init.data) } + . = ALIGN(16); + __setup_start = .; + .init.setup : { *(.init.setup) } + __setup_end = .; + __initcall_start = .; + .initcall.init : { + *(.initcall1.init) + *(.initcall2.init) + *(.initcall3.init) + *(.initcall4.init) + *(.initcall5.init) + *(.initcall6.init) + *(.initcall7.init) + } + __initcall_end = .; + __con_initcall_start = .; + .con_initcall.init : { *(.con_initcall.init) } + __con_initcall_end = .; + SECURITY_INIT + . = 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) } + . = ALIGN(4096); + __initramfs_start = .; + .init.ramfs : { *(.init.ramfs) } + __initramfs_end = .; + . = ALIGN(32); + __per_cpu_start = .; + .data.percpu : { *(.data.percpu) } + __per_cpu_end = .; + . = ALIGN(4096); + __init_end = .; + /* freed after init ends here */ + + __bss_start = .; /* BSS */ + .bss : { + *(.bss.page_aligned) + *(.bss) + } + . = ALIGN(4); + __bss_stop = .; + + _end = . ; + + /* This is where the kernel creates the early boot page tables */ + . = ALIGN(4096); + pg0 = .; + + /* Sections to be discarded */ + /DISCARD/ : { + *(.exitcall.exit) + } + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} +#endif diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 848f173db..dbeb3504c 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -34,6 +34,10 @@ config GENERIC_HARDIRQS bool default y +config RWSEM_GENERIC_SPINLOCK + bool + default y + source "init/Kconfig" menu "Processor type and features" diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a3a4c66e..98fac8489 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -71,7 +71,7 @@ archprepare: $(archinc)/.platform # Update machine cpu and platform symlinks if something which affects # them changed. -$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf +$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/MARKER @echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)' $(Q)mkdir -p $(archinc) $(Q)mkdir -p $(archinc)/xtensa diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S index f857fc760..7cba94abd 100644 --- a/arch/xtensa/boot/boot-elf/bootstrap.S +++ b/arch/xtensa/boot/boot-elf/bootstrap.S @@ -2,6 +2,7 @@ #include #include +#include #include diff --git a/arch/xtensa/boot/lib/Makefile b/arch/xtensa/boot/lib/Makefile index d3d2aa2d8..9e73bb8ae 100644 --- a/arch/xtensa/boot/lib/Makefile +++ b/arch/xtensa/boot/lib/Makefile @@ -2,7 +2,7 @@ # Makefile for some libs needed by zImage. # -zlib := inffast.c inflate.c inftrees.c +zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c lib-y += $(zlib:.c=.o) zmem.o diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index cf5a93fb6..356192a4d 100644 --- a/arch/xtensa/kernel/coprocessor.S +++ b/arch/xtensa/kernel/coprocessor.S @@ -24,6 +24,7 @@ * assigned when the Xtensa processor is generated. */ +#include #include #include diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 89e409e9e..5c018c503 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -1102,7 +1102,7 @@ ENTRY(fast_syscall_sysxtensa) s32i a7, a2, PT_AREG7 movi a7, 4 # sizeof(unsigned int) - access_ok a0, a3, a7, a2, .Leac + verify_area a3, a7, a0, a2, .Leac _beqi a6, SYSXTENSA_ATOMIC_SET, .Lset _beqi a6, SYSXTENSA_ATOMIC_EXG_ADD, .Lexg diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index c07cb2522..6e9b5225b 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S @@ -16,6 +16,7 @@ */ #include +#include #include #include diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 1cf744ee0..51f9bed45 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c @@ -100,7 +100,7 @@ int show_interrupts(struct seq_file *p, void *v) for_each_online_cpu(j) seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); #endif - seq_printf(p, " %14s", irq_desc[i].chip->typename); + seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) @@ -181,7 +181,7 @@ void __init init_IRQ(void) int i; for (i=0; i < XTENSA_NR_IRQS; i++) - irq_desc[i].chip = &xtensa_irq_type; + irq_desc[i].handler = &xtensa_irq_type; cached_irq_mask = 0; diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 8709f8249..de19501aa 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -70,13 +71,13 @@ static int pci_bus_count; * which might have be mirrored at 0x0100-0x03ff.. */ void -pcibios_align_resource(void *data, struct resource *res, resource_size_t size, - resource_size_t align) +pcibios_align_resource(void *data, struct resource *res, unsigned long size, + unsigned long align) { struct pci_dev *dev = data; if (res->flags & IORESOURCE_IO) { - resource_size_t start = res->start; + unsigned long start = res->start; if (size > 0x100) { printk(KERN_ERR "PCI: I/O Region %s/%d too large" @@ -348,6 +349,17 @@ __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, return -EINVAL; } +/* + * Set vm_flags of VMA, as appropriate for this architecture, for a pci device + * mapping. + */ +static __inline__ void +__pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) +{ + vma->vm_flags |= VM_SHM | VM_LOCKED | VM_IO; +} + /* * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci * device mapping. @@ -387,6 +399,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, if (ret < 0) return ret; + __pci_mmap_set_flags(dev, vma, mmap_state); __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine); ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c index 69675f216..a17930747 100644 --- a/arch/xtensa/kernel/platform.c +++ b/arch/xtensa/kernel/platform.c @@ -12,6 +12,7 @@ * Chris Zankel */ +#include #include #include #include diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index a7c4178c2..64a649eb8 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -16,6 +16,7 @@ * Kevin Chea */ +#include #include #include #include diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9aea23cc0..4cc85285a 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -13,6 +13,7 @@ * Marc Gauthier */ +#include #include #include #include @@ -212,7 +213,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) */ case PTRACE_KILL: ret = 0; - if (child->exit_state == EXIT_ZOMBIE) /* already dead */ + if (child->state == EXIT_ZOMBIE) /* already dead */ break; child->exit_code = SIGKILL; child->ptrace &= ~PT_SINGLESTEP; diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 82684d059..513ed8d67 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -14,10 +14,11 @@ * Marc Gauthier */ +#include #include #include #include -#include +#include #include #include diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index c494f0826..e252b61e4 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c @@ -104,7 +104,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, if (act) { old_sigset_t mask; - if (!access_ok(VERIFY_READ, act, sizeof(*act)) || + 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; @@ -116,7 +116,7 @@ sys_sigaction(int sig, const struct old_sigaction *act, ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); if (!ret && oact) { - if (!access_ok(VERIFY_WRITE, oact, sizeof(*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; @@ -236,7 +236,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) err |= __copy_from_user (regs->areg, sc->sc_areg, XCHAL_NUM_AREGS*4); err |= __get_user(buf, &sc->sc_cpstate); if (buf) { - if (!access_ok(VERIFY_READ, buf, sizeof(*buf))) + if (verify_area(VERIFY_READ, buf, sizeof(*buf))) goto badframe; err |= restore_cpextra(buf); } @@ -357,7 +357,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs) if (regs->depc > 64) panic ("Double exception sys_sigreturn\n"); - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) @@ -394,7 +394,7 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) return 0; } - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) + if (verify_area(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) @@ -433,7 +433,7 @@ badframe: static inline void * get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size) { - if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) + if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) sp = current->sas_ss_sp + current->sas_ss_size; return (void *)((sp - frame_size) & -16ul); diff --git a/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c index 3754be322..950550964 100644 --- a/arch/xtensa/kernel/syscalls.c +++ b/arch/xtensa/kernel/syscalls.c @@ -18,6 +18,7 @@ #define DEBUG 0 +#include #include #include #include diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 412ab32de..937d81f62 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -12,6 +12,7 @@ * Chris Zankel */ +#include #include #include #include @@ -28,7 +29,7 @@ extern volatile unsigned long wall_jiffies; -DEFINE_SPINLOCK(rtc_lock); +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; EXPORT_SYMBOL(rtc_lock); @@ -52,7 +53,7 @@ unsigned long long sched_clock(void) static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); static struct irqaction timer_irqaction = { .handler = timer_interrupt, - .flags = IRQF_DISABLED, + .flags = SA_INTERRUPT, .name = "timer", }; diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index ce077d6bf..225d64d73 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -461,7 +461,7 @@ void show_code(unsigned int *pc) } } -DEFINE_SPINLOCK(die_lock); +spinlock_t die_lock = SPIN_LOCK_UNLOCKED; void die(const char * str, struct pt_regs * regs, long err) { @@ -487,9 +487,11 @@ void die(const char * str, struct pt_regs * regs, long err) if (in_interrupt()) panic("Fatal exception in interrupt"); - if (panic_on_oops) + if (panic_on_oops) { + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); panic("Fatal exception"); - + } do_exit(err); } diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index ab6cdbd5e..5ed71dfc8 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -16,6 +16,7 @@ #include +#include #define _NOCLANGUAGE #include #include diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index 0b4cb93db..a15b6e3e7 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c @@ -12,6 +12,7 @@ * Joe Taylor */ +#include #include #include #include diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 660ef058c..e1be4235f 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -15,6 +15,7 @@ * Kevin Chea */ +#include #include #include #include diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 22d3c571a..2a580efb5 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index d96164e60..0dc55cc86 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c @@ -16,6 +16,7 @@ * */ +#include #include #include #include diff --git a/arch/xtensa/platform-iss/setup.c b/arch/xtensa/platform-iss/setup.c index c8a42b60c..23790a561 100644 --- a/arch/xtensa/platform-iss/setup.c +++ b/arch/xtensa/platform-iss/setup.c @@ -15,6 +15,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched index 48d090e26..f3b7753aa 100644 --- a/block/Kconfig.iosched +++ b/block/Kconfig.iosched @@ -40,7 +40,7 @@ config IOSCHED_CFQ choice prompt "Default I/O scheduler" - default DEFAULT_CFQ + default DEFAULT_AS help Select the I/O scheduler which will be used by default for all block devices. diff --git a/block/as-iosched.c b/block/as-iosched.c index c79a1c453..a7caf35ca 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -95,7 +96,7 @@ struct as_data { struct as_rq *next_arq[2]; /* next in sort order */ sector_t last_sector[2]; /* last REQ_SYNC & REQ_ASYNC sectors */ - struct hlist_head *hash; /* request hash */ + struct list_head *hash; /* request hash */ unsigned long exit_prob; /* probability a task will exit while being waited on */ @@ -164,7 +165,8 @@ struct as_rq { /* * request hash, key is the ending offset (for back merge lookup) */ - struct hlist_node hash; + struct list_head hash; + unsigned int on_hash; /* * expire fifo @@ -280,15 +282,17 @@ static const int as_hash_shift = 6; #define AS_HASH_FN(sec) (hash_long(AS_HASH_BLOCK((sec)), as_hash_shift)) #define AS_HASH_ENTRIES (1 << as_hash_shift) #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) +#define list_entry_hash(ptr) list_entry((ptr), struct as_rq, hash) static inline void __as_del_arq_hash(struct as_rq *arq) { - hlist_del_init(&arq->hash); + arq->on_hash = 0; + list_del_init(&arq->hash); } static inline void as_del_arq_hash(struct as_rq *arq) { - if (!hlist_unhashed(&arq->hash)) + if (arq->on_hash) __as_del_arq_hash(arq); } @@ -296,9 +300,10 @@ static void as_add_arq_hash(struct as_data *ad, struct as_rq *arq) { struct request *rq = arq->request; - BUG_ON(!hlist_unhashed(&arq->hash)); + BUG_ON(arq->on_hash); - hlist_add_head(&arq->hash, &ad->hash[AS_HASH_FN(rq_hash_key(rq))]); + arq->on_hash = 1; + list_add(&arq->hash, &ad->hash[AS_HASH_FN(rq_hash_key(rq))]); } /* @@ -307,29 +312,31 @@ static void as_add_arq_hash(struct as_data *ad, struct as_rq *arq) static inline void as_hot_arq_hash(struct as_data *ad, struct as_rq *arq) { struct request *rq = arq->request; - struct hlist_head *head = &ad->hash[AS_HASH_FN(rq_hash_key(rq))]; + struct list_head *head = &ad->hash[AS_HASH_FN(rq_hash_key(rq))]; - if (hlist_unhashed(&arq->hash)) { + if (!arq->on_hash) { WARN_ON(1); return; } - if (&arq->hash != head->first) { - hlist_del(&arq->hash); - hlist_add_head(&arq->hash, head); + if (arq->hash.prev != head) { + list_del(&arq->hash); + list_add(&arq->hash, head); } } static struct request *as_find_arq_hash(struct as_data *ad, sector_t offset) { - struct hlist_head *hash_list = &ad->hash[AS_HASH_FN(offset)]; - struct hlist_node *entry, *next; - struct as_rq *arq; + struct list_head *hash_list = &ad->hash[AS_HASH_FN(offset)]; + struct list_head *entry, *next = hash_list->next; - hlist_for_each_entry_safe(arq, entry, next, hash_list, hash) { + while ((entry = next) != hash_list) { + struct as_rq *arq = list_entry_hash(entry); struct request *__rq = arq->request; - BUG_ON(hlist_unhashed(&arq->hash)); + next = entry->next; + + BUG_ON(!arq->on_hash); if (!rq_mergeable(__rq)) { as_del_arq_hash(arq); @@ -346,6 +353,10 @@ static struct request *as_find_arq_hash(struct as_data *ad, sector_t offset) /* * rb tree support functions */ +#define RB_NONE (2) +#define RB_EMPTY(root) ((root)->rb_node == NULL) +#define ON_RB(node) ((node)->rb_color != RB_NONE) +#define RB_CLEAR(node) ((node)->rb_color = RB_NONE) #define rb_entry_arq(node) rb_entry((node), struct as_rq, rb_node) #define ARQ_RB_ROOT(ad, arq) (&(ad)->sort_list[(arq)->is_sync]) #define rq_rb_key(rq) (rq)->sector @@ -414,13 +425,13 @@ static void as_add_arq_rb(struct as_data *ad, struct as_rq *arq) static inline void as_del_arq_rb(struct as_data *ad, struct as_rq *arq) { - if (!RB_EMPTY_NODE(&arq->rb_node)) { + if (!ON_RB(&arq->rb_node)) { WARN_ON(1); return; } rb_erase(&arq->rb_node, ARQ_RB_ROOT(ad, arq)); - RB_CLEAR_NODE(&arq->rb_node); + RB_CLEAR(&arq->rb_node); } static struct request * @@ -541,7 +552,7 @@ static struct as_rq *as_find_next_arq(struct as_data *ad, struct as_rq *last) struct rb_node *rbprev = rb_prev(&last->rb_node); struct as_rq *arq_next, *arq_prev; - BUG_ON(!RB_EMPTY_NODE(&last->rb_node)); + BUG_ON(!ON_RB(&last->rb_node)); if (rbprev) arq_prev = rb_entry_arq(rbprev); @@ -891,7 +902,7 @@ static int as_can_break_anticipation(struct as_data *ad, struct as_rq *arq) } /* - * as_can_anticipate indicates whether we should either run arq + * as_can_anticipate indicates weather we should either run arq * or keep anticipating a better request. */ static int as_can_anticipate(struct as_data *ad, struct as_rq *arq) @@ -1118,7 +1129,7 @@ static void as_move_to_dispatch(struct as_data *ad, struct as_rq *arq) struct request *rq = arq->request; const int data_dir = arq->is_sync; - BUG_ON(!RB_EMPTY_NODE(&arq->rb_node)); + BUG_ON(!ON_RB(&arq->rb_node)); as_antic_stop(ad); ad->antic_status = ANTIC_OFF; @@ -1243,7 +1254,7 @@ static int as_dispatch_request(request_queue_t *q, int force) */ if (reads) { - BUG_ON(RB_EMPTY_ROOT(&ad->sort_list[REQ_SYNC])); + BUG_ON(RB_EMPTY(&ad->sort_list[REQ_SYNC])); if (writes && ad->batch_data_dir == REQ_SYNC) /* @@ -1267,7 +1278,7 @@ static int as_dispatch_request(request_queue_t *q, int force) if (writes) { dispatch_writes: - BUG_ON(RB_EMPTY_ROOT(&ad->sort_list[REQ_ASYNC])); + BUG_ON(RB_EMPTY(&ad->sort_list[REQ_ASYNC])); if (ad->batch_data_dir == REQ_SYNC) { ad->changed_batch = 1; @@ -1335,7 +1346,7 @@ static void as_add_request(request_queue_t *q, struct request *rq) arq->state = AS_RQ_NEW; if (rq_data_dir(arq->request) == READ - || (arq->request->flags & REQ_RW_SYNC)) + || current->flags&PF_SYNCWRITE) arq->is_sync = 1; else arq->is_sync = 0; @@ -1587,11 +1598,12 @@ static int as_set_request(request_queue_t *q, struct request *rq, if (arq) { memset(arq, 0, sizeof(*arq)); - RB_CLEAR_NODE(&arq->rb_node); + RB_CLEAR(&arq->rb_node); arq->request = rq; arq->state = AS_RQ_PRESCHED; arq->io_context = NULL; - INIT_HLIST_NODE(&arq->hash); + INIT_LIST_HEAD(&arq->hash); + arq->on_hash = 0; INIT_LIST_HEAD(&arq->fifo); rq->elevator_private = arq; return 0; @@ -1651,7 +1663,7 @@ static void *as_init_queue(request_queue_t *q, elevator_t *e) ad->q = q; /* Identify what queue the data belongs to */ - ad->hash = kmalloc_node(sizeof(struct hlist_head)*AS_HASH_ENTRIES, + ad->hash = kmalloc_node(sizeof(struct list_head)*AS_HASH_ENTRIES, GFP_KERNEL, q->node); if (!ad->hash) { kfree(ad); @@ -1673,7 +1685,7 @@ static void *as_init_queue(request_queue_t *q, elevator_t *e) INIT_WORK(&ad->antic_work, as_work_handler, q); for (i = 0; i < AS_HASH_ENTRIES; i++) - INIT_HLIST_HEAD(&ad->hash[i]); + INIT_LIST_HEAD(&ad->hash[i]); INIT_LIST_HEAD(&ad->fifo_list[REQ_SYNC]); INIT_LIST_HEAD(&ad->fifo_list[REQ_ASYNC]); @@ -1828,7 +1840,7 @@ static int __init as_init(void) static void __exit as_exit(void) { - DECLARE_COMPLETION_ONSTACK(all_gone); + DECLARE_COMPLETION(all_gone); elv_unregister(&iosched_as); ioc_gone = &all_gone; /* ioc_gone's update must be visible before reading ioc_count */ diff --git a/block/blktrace.c b/block/blktrace.c index 2b4ef2b89..36f3a1722 100644 --- a/block/blktrace.c +++ b/block/blktrace.c @@ -15,6 +15,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include #include #include #include @@ -69,7 +70,7 @@ static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), BLK_TC_ACT(BLK /* * Bio action bits of interest */ -static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC), 0, BLK_TC_ACT(BLK_TC_AHEAD) }; +static u32 bio_act[3] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_ACT(BLK_TC_SYNC) }; /* * More could be added as needed, taking care to increment the decrementer @@ -79,8 +80,6 @@ static u32 bio_act[5] __read_mostly = { 0, BLK_TC_ACT(BLK_TC_BARRIER), BLK_TC_AC (((rw) & (1 << BIO_RW_BARRIER)) >> (BIO_RW_BARRIER - 0)) #define trace_sync_bit(rw) \ (((rw) & (1 << BIO_RW_SYNC)) >> (BIO_RW_SYNC - 1)) -#define trace_ahead_bit(rw) \ - (((rw) & (1 << BIO_RW_AHEAD)) << (2 - BIO_RW_AHEAD)) /* * The worker for the various blk_add_trace*() types. Fills out a @@ -102,7 +101,6 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, what |= ddir_act[rw & WRITE]; what |= bio_act[trace_barrier_bit(rw)]; what |= bio_act[trace_sync_bit(rw)]; - what |= bio_act[trace_ahead_bit(rw)]; pid = tsk->pid; if (unlikely(act_log_check(bt, what, sector, pid))) @@ -217,7 +215,7 @@ static int blk_trace_remove(request_queue_t *q) static int blk_dropped_open(struct inode *inode, struct file *filp) { - filp->private_data = inode->i_private; + filp->private_data = inode->u.generic_ip; return 0; } diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 3587580bb..052b17487 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -6,6 +6,7 @@ * * Copyright (C) 2003 Jens Axboe */ +#include #include #include #include @@ -25,7 +26,7 @@ static const int cfq_back_penalty = 2; /* penalty of a backwards seek */ static const int cfq_slice_sync = HZ / 10; static int cfq_slice_async = HZ / 25; static const int cfq_slice_async_rq = 2; -static int cfq_slice_idle = HZ / 125; +static int cfq_slice_idle = HZ / 70; #define CFQ_IDLE_GRACE (HZ / 10) #define CFQ_SLICE_SCALE (5) @@ -59,6 +60,16 @@ static DEFINE_SPINLOCK(cfq_exit_lock); /* * rb-tree defines */ +#define RB_NONE (2) +#define RB_EMPTY(node) ((node)->rb_node == NULL) +#define RB_CLEAR_COLOR(node) (node)->rb_color = RB_NONE +#define RB_CLEAR(node) do { \ + (node)->rb_parent = NULL; \ + RB_CLEAR_COLOR((node)); \ + (node)->rb_right = NULL; \ + (node)->rb_left = NULL; \ +} while (0) +#define RB_CLEAR_ROOT(root) ((root)->rb_node = NULL) #define rb_entry_crq(node) rb_entry((node), struct cfq_rq, rb_node) #define rq_rb_key(rq) (rq)->sector @@ -117,6 +128,8 @@ struct cfq_data { */ struct hlist_head *crq_hash; + unsigned int max_queued; + mempool_t *crq_pool; int rq_in_driver; @@ -271,6 +284,8 @@ static struct cfq_queue *cfq_find_cfq_hash(struct cfq_data *, unsigned int, unsi static void cfq_dispatch_insert(request_queue_t *, struct cfq_rq *); static struct cfq_queue *cfq_get_queue(struct cfq_data *cfqd, unsigned int key, struct task_struct *tsk, gfp_t gfp_mask); +#define process_sync(tsk) ((tsk)->flags & PF_SYNCWRITE) + /* * lots of deadline iosched dupes, can be abstracted later... */ @@ -326,9 +341,7 @@ static int cfq_queue_empty(request_queue_t *q) static inline pid_t cfq_queue_pid(struct task_struct *task, int rw) { - if (task->xid) - return task->xid + (1 << 16); - if (rw == READ || rw == WRITE_SYNC) + if (rw == READ || process_sync(task)) return task->pid; return CFQ_KEY_ASYNC; @@ -554,8 +567,9 @@ static inline void cfq_del_crq_rb(struct cfq_rq *crq) cfq_update_next_crq(crq); rb_erase(&crq->rb_node, &cfqq->sort_list); + RB_CLEAR_COLOR(&crq->rb_node); - if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list)) + if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY(&cfqq->sort_list)) cfq_del_cfqq_rr(cfqd, cfqq); } @@ -902,15 +916,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd) return cfqq; } -#define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024)) - static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq) { struct cfq_io_context *cic; unsigned long sl; - WARN_ON(!RB_EMPTY_ROOT(&cfqq->sort_list)); + WARN_ON(!RB_EMPTY(&cfqq->sort_list)); WARN_ON(cfqq != cfqd->active_queue); /* @@ -937,8 +949,8 @@ static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq) * fair distribution of slice time for a process doing back-to-back * seeks. so allow a little bit of time for him to submit a new rq */ - if (sample_valid(cic->seek_samples) && CIC_SEEKY(cic)) - sl = min(sl, msecs_to_jiffies(2)); + if (sample_valid(cic->seek_samples) && cic->seek_mean > 131072) + sl = 2; mod_timer(&cfqd->idle_slice_timer, jiffies + sl); return 1; @@ -948,15 +960,11 @@ static void cfq_dispatch_insert(request_queue_t *q, struct cfq_rq *crq) { struct cfq_data *cfqd = q->elevator->elevator_data; struct cfq_queue *cfqq = crq->cfq_queue; - struct request *rq; cfqq->next_crq = cfq_find_next_crq(cfqd, cfqq, crq); cfq_remove_request(crq->request); cfqq->on_dispatch[cfq_crq_is_sync(crq)]++; elv_dispatch_sort(q, crq->request); - - rq = list_entry(q->queue_head.prev, struct request, queuelist); - cfqd->last_sector = rq->sector + rq->nr_sectors; } /* @@ -1038,12 +1046,10 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd) * if queue has requests, dispatch one. if not, check if * enough slice is left to wait for one */ - if (!RB_EMPTY_ROOT(&cfqq->sort_list)) + if (!RB_EMPTY(&cfqq->sort_list)) goto keep_queue; - else if (cfq_cfqq_dispatched(cfqq)) { - cfqq = NULL; - goto keep_queue; - } else if (cfq_cfqq_class_sync(cfqq)) { + else if (cfq_cfqq_class_sync(cfqq) && + time_before(now, cfqq->slice_end)) { if (cfq_arm_slice_timer(cfqd, cfqq)) return NULL; } @@ -1062,7 +1068,7 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, { int dispatched = 0; - BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list)); + BUG_ON(RB_EMPTY(&cfqq->sort_list)); do { struct cfq_rq *crq; @@ -1086,13 +1092,14 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, cfqd->active_cic = crq->io_context; } - if (RB_EMPTY_ROOT(&cfqq->sort_list)) + if (RB_EMPTY(&cfqq->sort_list)) break; } while (dispatched < max_dispatch); /* - * if slice end isn't set yet, set it. + * if slice end isn't set yet, set it. if at least one request was + * sync, use the sync time slice value */ if (!cfqq->slice_end) cfq_set_prio_slice(cfqd, cfqq); @@ -1103,8 +1110,7 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, */ if ((!cfq_cfqq_sync(cfqq) && cfqd->dispatch_slice >= cfq_prio_to_maxrq(cfqd, cfqq)) || - cfq_class_idle(cfqq) || - !cfq_cfqq_idle_window(cfqq)) + cfq_class_idle(cfqq)) cfq_slice_expired(cfqd, 0); return dispatched; @@ -1113,11 +1119,10 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, static int cfq_forced_dispatch_cfqqs(struct list_head *list) { + int dispatched = 0; struct cfq_queue *cfqq, *next; struct cfq_rq *crq; - int dispatched; - dispatched = 0; list_for_each_entry_safe(cfqq, next, list, cfq_list) { while ((crq = cfqq->next_crq)) { cfq_dispatch_insert(cfqq->cfqd->queue, crq); @@ -1125,7 +1130,6 @@ cfq_forced_dispatch_cfqqs(struct list_head *list) } BUG_ON(!list_empty(&cfqq->fifo)); } - return dispatched; } @@ -1152,8 +1156,7 @@ static int cfq_dispatch_requests(request_queue_t *q, int force) { struct cfq_data *cfqd = q->elevator->elevator_data; - struct cfq_queue *cfqq, *prev_cfqq; - int dispatched; + struct cfq_queue *cfqq; if (!cfqd->busy_queues) return 0; @@ -1161,17 +1164,10 @@ cfq_dispatch_requests(request_queue_t *q, int force) if (unlikely(force)) return cfq_forced_dispatch(cfqd); - dispatched = 0; - prev_cfqq = NULL; - while ((cfqq = cfq_select_queue(cfqd)) != NULL) { + cfqq = cfq_select_queue(cfqd); + if (cfqq) { int max_dispatch; - /* - * Don't repeat dispatch from the previous queue. - */ - if (prev_cfqq == cfqq) - break; - cfq_clear_cfqq_must_dispatch(cfqq); cfq_clear_cfqq_wait_request(cfqq); del_timer(&cfqd->idle_slice_timer); @@ -1180,19 +1176,10 @@ cfq_dispatch_requests(request_queue_t *q, int force) if (cfq_class_idle(cfqq)) max_dispatch = 1; - dispatched += __cfq_dispatch_requests(cfqd, cfqq, max_dispatch); - - /* - * If the dispatch cfqq has idling enabled and is still - * the active queue, break out. - */ - if (cfq_cfqq_idle_window(cfqq) && cfqd->active_queue) - break; - - prev_cfqq = cfqq; + return __cfq_dispatch_requests(cfqd, cfqq, max_dispatch); } - return dispatched; + return 0; } /* @@ -1337,6 +1324,7 @@ cfq_alloc_io_context(struct cfq_data *cfqd, gfp_t gfp_mask) if (cic) { memset(cic, 0, sizeof(*cic)); + RB_CLEAR_COLOR(&cic->rb_node); cic->last_end_request = jiffies; INIT_LIST_HEAD(&cic->queue_list); cic->dtor = cfq_free_io_context; @@ -1398,28 +1386,25 @@ static inline void changed_ioprio(struct cfq_io_context *cic) { struct cfq_data *cfqd = cic->key; struct cfq_queue *cfqq; - - if (unlikely(!cfqd)) - return; - - spin_lock(cfqd->queue->queue_lock); - - cfqq = cic->cfqq[ASYNC]; - if (cfqq) { - struct cfq_queue *new_cfqq; - new_cfqq = cfq_get_queue(cfqd, CFQ_KEY_ASYNC, cic->ioc->task, - GFP_ATOMIC); - if (new_cfqq) { - cic->cfqq[ASYNC] = new_cfqq; - cfq_put_queue(cfqq); + if (cfqd) { + spin_lock(cfqd->queue->queue_lock); + cfqq = cic->cfqq[ASYNC]; + if (cfqq) { + struct cfq_queue *new_cfqq; + new_cfqq = cfq_get_queue(cfqd, CFQ_KEY_ASYNC, + cic->ioc->task, GFP_ATOMIC); + if (new_cfqq) { + cic->cfqq[ASYNC] = new_cfqq; + cfq_put_queue(cfqq); + } + } + cfqq = cic->cfqq[SYNC]; + if (cfqq) { + cfq_mark_cfqq_prio_changed(cfqq); + cfq_init_prio_data(cfqq); } + spin_unlock(cfqd->queue->queue_lock); } - - cfqq = cic->cfqq[SYNC]; - if (cfqq) - cfq_mark_cfqq_prio_changed(cfqq); - - spin_unlock(cfqd->queue->queue_lock); } /* @@ -1476,6 +1461,7 @@ retry: INIT_HLIST_NODE(&cfqq->cfq_hash); INIT_LIST_HEAD(&cfqq->cfq_list); + RB_CLEAR_ROOT(&cfqq->sort_list); INIT_LIST_HEAD(&cfqq->fifo); cfqq->key = key; @@ -1487,7 +1473,8 @@ retry: * set ->slice_left to allow preemption for a new process */ cfqq->slice_left = 2 * cfqd->cfq_slice_idle; - cfq_mark_cfqq_idle_window(cfqq); + if (!cfqd->hw_tag) + cfq_mark_cfqq_idle_window(cfqq); cfq_mark_cfqq_prio_changed(cfqq); cfq_init_prio_data(cfqq); } @@ -1563,7 +1550,7 @@ restart: /* ->key must be copied to avoid race with cfq_exit_queue() */ k = __cic->key; if (unlikely(!k)) { - cfq_drop_dead_cic(ioc, __cic); + cfq_drop_dead_cic(ioc, cic); goto restart; } @@ -1678,8 +1665,7 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq, { int enable_idle = cfq_cfqq_idle_window(cfqq); - if (!cic->ioc->task || !cfqd->cfq_slice_idle || - (cfqd->hw_tag && CIC_SEEKY(cic))) + if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag) enable_idle = 0; else if (sample_valid(cic->ttime_samples)) { if (cic->ttime_mean > cfqd->cfq_slice_idle) @@ -1709,7 +1695,7 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, return 0; if (!cfqq) - return 0; + return 1; if (cfq_class_idle(cfqq)) return 1; @@ -1741,7 +1727,7 @@ static void cfq_preempt_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq) cfqq->slice_left = cfq_prio_to_slice(cfqd, cfqq) / 2; cfqq->slice_end = cfqq->slice_left + jiffies; - cfq_slice_expired(cfqd, 1); + __cfq_slice_expired(cfqd, cfqq, 1); __cfq_set_active_queue(cfqd, cfqq); } @@ -1766,7 +1752,11 @@ static void cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, struct cfq_rq *crq) { - struct cfq_io_context *cic = crq->io_context; + struct cfq_io_context *cic; + + cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); + + cic = crq->io_context; /* * we never wait for an async request and we don't allow preemption @@ -1856,23 +1846,11 @@ static void cfq_completed_request(request_queue_t *q, struct request *rq) cfqq->service_last = now; cfq_resort_rr_list(cfqq, 0); } + cfq_schedule_dispatch(cfqd); } - if (sync) + if (cfq_crq_is_sync(crq)) crq->io_context->last_end_request = now; - - /* - * If this is the active queue, check if it needs to be expired, - * or if we want to idle in case it has no pending requests. - */ - if (cfqd->active_queue == cfqq) { - if (time_after(now, cfqq->slice_end)) - cfq_slice_expired(cfqd, 0); - else if (sync && RB_EMPTY_ROOT(&cfqq->sort_list)) { - if (!cfq_arm_slice_timer(cfqd, cfqq)) - cfq_schedule_dispatch(cfqd); - } - } } static struct request * @@ -1939,6 +1917,7 @@ static inline int __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq, struct task_struct *task, int rw) { +#if 1 if ((cfq_cfqq_wait_request(cfqq) || cfq_cfqq_must_alloc(cfqq)) && !cfq_cfqq_must_alloc_slice(cfqq)) { cfq_mark_cfqq_must_alloc_slice(cfqq); @@ -1946,6 +1925,39 @@ __cfq_may_queue(struct cfq_data *cfqd, struct cfq_queue *cfqq, } return ELV_MQUEUE_MAY; +#else + if (!cfqq || task->flags & PF_MEMALLOC) + return ELV_MQUEUE_MAY; + if (!cfqq->allocated[rw] || cfq_cfqq_must_alloc(cfqq)) { + if (cfq_cfqq_wait_request(cfqq)) + return ELV_MQUEUE_MUST; + + /* + * only allow 1 ELV_MQUEUE_MUST per slice, otherwise we + * can quickly flood the queue with writes from a single task + */ + if (rw == READ || !cfq_cfqq_must_alloc_slice(cfqq)) { + cfq_mark_cfqq_must_alloc_slice(cfqq); + return ELV_MQUEUE_MUST; + } + + return ELV_MQUEUE_MAY; + } + if (cfq_class_idle(cfqq)) + return ELV_MQUEUE_NO; + if (cfqq->allocated[rw] >= cfqd->max_queued) { + struct io_context *ioc = get_io_context(GFP_ATOMIC); + int ret = ELV_MQUEUE_NO; + + if (ioc && ioc->nr_batch_requests) + ret = ELV_MQUEUE_MAY; + + put_io_context(ioc); + return ret; + } + + return ELV_MQUEUE_MAY; +#endif } static int cfq_may_queue(request_queue_t *q, int rw, struct bio *bio) @@ -1974,13 +1986,16 @@ static int cfq_may_queue(request_queue_t *q, int rw, struct bio *bio) static void cfq_check_waiters(request_queue_t *q, struct cfq_queue *cfqq) { struct cfq_data *cfqd = q->elevator->elevator_data; + struct request_list *rl = &q->rq; - if (unlikely(cfqd->rq_starved)) { - struct request_list *rl = &q->rq; - + if (cfqq->allocated[READ] <= cfqd->max_queued || cfqd->rq_starved) { smp_mb(); if (waitqueue_active(&rl->wait[READ])) wake_up(&rl->wait[READ]); + } + + if (cfqq->allocated[WRITE] <= cfqd->max_queued || cfqd->rq_starved) { + smp_mb(); if (waitqueue_active(&rl->wait[WRITE])) wake_up(&rl->wait[WRITE]); } @@ -2054,7 +2069,7 @@ cfq_set_request(request_queue_t *q, struct request *rq, struct bio *bio, crq = mempool_alloc(cfqd->crq_pool, gfp_mask); if (crq) { - RB_CLEAR_NODE(&crq->rb_node); + RB_CLEAR(&crq->rb_node); crq->rb_key = 0; crq->request = rq; INIT_HLIST_NODE(&crq->hash); @@ -2140,13 +2155,16 @@ static void cfq_idle_slice_timer(unsigned long data) * only expire and reinvoke request handler, if there are * other queues with pending requests */ - if (!cfqd->busy_queues) + if (!cfqd->busy_queues) { + cfqd->idle_slice_timer.expires = min(now + cfqd->cfq_slice_idle, cfqq->slice_end); + add_timer(&cfqd->idle_slice_timer); goto out_cont; + } /* * not expired and it has a request pending, let it dispatch */ - if (!RB_EMPTY_ROOT(&cfqq->sort_list)) { + if (!RB_EMPTY(&cfqq->sort_list)) { cfq_mark_cfqq_must_dispatch(cfqq); goto out_kick; } @@ -2267,6 +2285,9 @@ static void *cfq_init_queue(request_queue_t *q, elevator_t *e) cfqd->queue = q; + cfqd->max_queued = q->nr_requests / 4; + q->nr_batching = cfq_queued; + init_timer(&cfqd->idle_slice_timer); cfqd->idle_slice_timer.function = cfq_idle_slice_timer; cfqd->idle_slice_timer.data = (unsigned long) cfqd; @@ -2465,7 +2486,7 @@ static int __init cfq_init(void) static void __exit cfq_exit(void) { - DECLARE_COMPLETION_ONSTACK(all_gone); + DECLARE_COMPLETION(all_gone); elv_unregister(&iosched_cfq); ioc_gone = &all_gone; /* ioc_gone's update must be visible before reading ioc_count */ diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index c7ca9f0b6..3bd0415a9 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,8 @@ static const int deadline_hash_shift = 5; #define DL_HASH_FN(sec) (hash_long(DL_HASH_BLOCK((sec)), deadline_hash_shift)) #define DL_HASH_ENTRIES (1 << deadline_hash_shift) #define rq_hash_key(rq) ((rq)->sector + (rq)->nr_sectors) -#define ON_HASH(drq) (!hlist_unhashed(&(drq)->hash)) +#define list_entry_hash(ptr) list_entry((ptr), struct deadline_rq, hash) +#define ON_HASH(drq) (drq)->on_hash struct deadline_data { /* @@ -46,7 +48,7 @@ struct deadline_data { * next in sort order. read, write or both are NULL */ struct deadline_rq *next_drq[2]; - struct hlist_head *hash; /* request hash */ + struct list_head *hash; /* request hash */ unsigned int batching; /* number of sequential requests made */ sector_t last_sector; /* head position */ unsigned int starved; /* times reads have starved writes */ @@ -77,7 +79,8 @@ struct deadline_rq { /* * request hash, key is the ending offset (for back merge lookup) */ - struct hlist_node hash; + struct list_head hash; + char on_hash; /* * expire fifo @@ -97,7 +100,8 @@ static kmem_cache_t *drq_pool; */ static inline void __deadline_del_drq_hash(struct deadline_rq *drq) { - hlist_del_init(&drq->hash); + drq->on_hash = 0; + list_del_init(&drq->hash); } static inline void deadline_del_drq_hash(struct deadline_rq *drq) @@ -113,7 +117,8 @@ deadline_add_drq_hash(struct deadline_data *dd, struct deadline_rq *drq) BUG_ON(ON_HASH(drq)); - hlist_add_head(&drq->hash, &dd->hash[DL_HASH_FN(rq_hash_key(rq))]); + drq->on_hash = 1; + list_add(&drq->hash, &dd->hash[DL_HASH_FN(rq_hash_key(rq))]); } /* @@ -123,24 +128,26 @@ static inline void deadline_hot_drq_hash(struct deadline_data *dd, struct deadline_rq *drq) { struct request *rq = drq->request; - struct hlist_head *head = &dd->hash[DL_HASH_FN(rq_hash_key(rq))]; + struct list_head *head = &dd->hash[DL_HASH_FN(rq_hash_key(rq))]; - if (ON_HASH(drq) && &drq->hash != head->first) { - hlist_del(&drq->hash); - hlist_add_head(&drq->hash, head); + if (ON_HASH(drq) && drq->hash.prev != head) { + list_del(&drq->hash); + list_add(&drq->hash, head); } } static struct request * deadline_find_drq_hash(struct deadline_data *dd, sector_t offset) { - struct hlist_head *hash_list = &dd->hash[DL_HASH_FN(offset)]; - struct hlist_node *entry, *next; - struct deadline_rq *drq; + struct list_head *hash_list = &dd->hash[DL_HASH_FN(offset)]; + struct list_head *entry, *next = hash_list->next; - hlist_for_each_entry_safe(drq, entry, next, hash_list, hash) { + while ((entry = next) != hash_list) { + struct deadline_rq *drq = list_entry_hash(entry); struct request *__rq = drq->request; + next = entry->next; + BUG_ON(!ON_HASH(drq)); if (!rq_mergeable(__rq)) { @@ -158,6 +165,10 @@ deadline_find_drq_hash(struct deadline_data *dd, sector_t offset) /* * rb tree support functions */ +#define RB_NONE (2) +#define RB_EMPTY(root) ((root)->rb_node == NULL) +#define ON_RB(node) ((node)->rb_color != RB_NONE) +#define RB_CLEAR(node) ((node)->rb_color = RB_NONE) #define rb_entry_drq(node) rb_entry((node), struct deadline_rq, rb_node) #define DRQ_RB_ROOT(dd, drq) (&(dd)->sort_list[rq_data_dir((drq)->request)]) #define rq_rb_key(rq) (rq)->sector @@ -216,9 +227,9 @@ deadline_del_drq_rb(struct deadline_data *dd, struct deadline_rq *drq) dd->next_drq[data_dir] = rb_entry_drq(rbnext); } - BUG_ON(!RB_EMPTY_NODE(&drq->rb_node)); + BUG_ON(!ON_RB(&drq->rb_node)); rb_erase(&drq->rb_node, DRQ_RB_ROOT(dd, drq)); - RB_CLEAR_NODE(&drq->rb_node); + RB_CLEAR(&drq->rb_node); } static struct request * @@ -492,7 +503,7 @@ static int deadline_dispatch_requests(request_queue_t *q, int force) */ if (reads) { - BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[READ])); + BUG_ON(RB_EMPTY(&dd->sort_list[READ])); if (writes && (dd->starved++ >= dd->writes_starved)) goto dispatch_writes; @@ -508,7 +519,7 @@ static int deadline_dispatch_requests(request_queue_t *q, int force) if (writes) { dispatch_writes: - BUG_ON(RB_EMPTY_ROOT(&dd->sort_list[WRITE])); + BUG_ON(RB_EMPTY(&dd->sort_list[WRITE])); dd->starved = 0; @@ -615,7 +626,7 @@ static void *deadline_init_queue(request_queue_t *q, elevator_t *e) return NULL; memset(dd, 0, sizeof(*dd)); - dd->hash = kmalloc_node(sizeof(struct hlist_head)*DL_HASH_ENTRIES, + dd->hash = kmalloc_node(sizeof(struct list_head)*DL_HASH_ENTRIES, GFP_KERNEL, q->node); if (!dd->hash) { kfree(dd); @@ -631,7 +642,7 @@ static void *deadline_init_queue(request_queue_t *q, elevator_t *e) } for (i = 0; i < DL_HASH_ENTRIES; i++) - INIT_HLIST_HEAD(&dd->hash[i]); + INIT_LIST_HEAD(&dd->hash[i]); INIT_LIST_HEAD(&dd->fifo_list[READ]); INIT_LIST_HEAD(&dd->fifo_list[WRITE]); @@ -664,10 +675,11 @@ deadline_set_request(request_queue_t *q, struct request *rq, struct bio *bio, drq = mempool_alloc(dd->drq_pool, gfp_mask); if (drq) { memset(drq, 0, sizeof(*drq)); - RB_CLEAR_NODE(&drq->rb_node); + RB_CLEAR(&drq->rb_node); drq->request = rq; - INIT_HLIST_NODE(&drq->hash); + INIT_LIST_HEAD(&drq->hash); + drq->on_hash = 0; INIT_LIST_HEAD(&drq->fifo); diff --git a/block/elevator.c b/block/elevator.c index 8ed284691..7be96bbe1 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -850,9 +851,12 @@ fail_register: * one again (along with re-adding the sysfs dir) */ elevator_exit(e); + e = NULL; q->elevator = old_elevator; elv_register_queue(q); clear_bit(QUEUE_FLAG_ELVSWITCH, &q->queue_flags); + if (e) + kobject_put(&e->kobj); return 0; } @@ -892,7 +896,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) struct list_head *entry; int len = 0; - spin_lock_irq(&elv_list_lock); + spin_lock_irq(q->queue_lock); list_for_each(entry, &elv_list) { struct elevator_type *__e; @@ -902,7 +906,7 @@ ssize_t elv_iosched_show(request_queue_t *q, char *name) else len += sprintf(name+len, "%s ", __e->elevator_name); } - spin_unlock_irq(&elv_list_lock); + spin_unlock_irq(q->queue_lock); len += sprintf(len+name, "\n"); return len; diff --git a/block/genhd.c b/block/genhd.c index 25d1f4256..5a8d3bf02 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -2,6 +2,7 @@ * gendisk handling */ +#include #include #include #include @@ -16,7 +17,8 @@ #include #include -struct subsystem block_subsys; +static struct subsystem block_subsys; + static DEFINE_MUTEX(block_subsys_lock); /* @@ -509,7 +511,9 @@ static struct kset_uevent_ops block_uevent_ops = { .uevent = block_uevent, }; -decl_subsys(block, &ktype_block, &block_uevent_ops); +/* declare block_subsys. */ +static decl_subsys(block, &ktype_block, &block_uevent_ops); + /* * aggregate disk stat collector. Uses the same stats that the sysfs diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 3ecdb3476..4293143c9 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -10,6 +10,7 @@ /* * This handles all read/write requests to block devices */ +#include #include #include #include @@ -1662,8 +1663,6 @@ static void blk_unplug_timeout(unsigned long data) **/ void blk_start_queue(request_queue_t *q) { - WARN_ON(!irqs_disabled()); - clear_bit(QUEUE_FLAG_STOPPED, &q->queue_flags); /* @@ -1879,8 +1878,7 @@ EXPORT_SYMBOL(blk_alloc_queue_node); * get dealt with eventually. * * The queue spin lock must be held while manipulating the requests on the - * request queue; this lock will be taken also from interrupt context, so irq - * disabling is needed for it. + * request queue. * * Function returns a pointer to the initialized request queue, or NULL if * it didn't succeed. @@ -2516,7 +2514,7 @@ EXPORT_SYMBOL_GPL(blk_execute_rq_nowait); int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk, struct request *rq, int at_head) { - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); char sense[SCSI_SENSE_BUFFERSIZE]; int err = 0; @@ -2744,7 +2742,7 @@ static int attempt_merge(request_queue_t *q, struct request *req, return 0; /* - * not contiguous + * not contigious */ if (req->sector + req->nr_sectors != next->sector) return 0; @@ -2826,9 +2824,6 @@ static void init_request_from_bio(struct request *req, struct bio *bio) if (unlikely(bio_barrier(bio))) req->flags |= (REQ_HARDBARRIER | REQ_NOMERGE); - if (bio_sync(bio)) - req->flags |= REQ_RW_SYNC; - req->errors = 0; req->hard_sector = req->sector = bio->bi_sector; req->hard_nr_sectors = req->nr_sectors = bio_sectors(bio); @@ -3021,7 +3016,6 @@ void generic_make_request(struct bio *bio) { request_queue_t *q; sector_t maxsector; - sector_t old_sector; int ret, nr_sectors = bio_sectors(bio); dev_t old_dev; @@ -3050,7 +3044,7 @@ void generic_make_request(struct bio *bio) * NOTE: we don't repeat the blk_size check for each new device. * Stacking drivers are expected to know what they are doing. */ - old_sector = -1; + maxsector = -1; old_dev = 0; do { char b[BDEVNAME_SIZE]; @@ -3084,30 +3078,15 @@ end_io: */ blk_partition_remap(bio); - if (old_sector != -1) + if (maxsector != -1) blk_add_trace_remap(q, bio, old_dev, bio->bi_sector, - old_sector); + maxsector); blk_add_trace_bio(q, bio, BLK_TA_QUEUE); - old_sector = bio->bi_sector; + maxsector = bio->bi_sector; old_dev = bio->bi_bdev->bd_dev; - maxsector = bio->bi_bdev->bd_inode->i_size >> 9; - if (maxsector) { - sector_t sector = bio->bi_sector; - - if (maxsector < nr_sectors || maxsector - nr_sectors < sector) { - /* - * This may well happen - partitions are not checked - * to make sure they are within the size of the - * whole device. - */ - handle_bad_sector(bio); - goto end_io; - } - } - ret = q->make_request_fn(q, bio); } while (ret); } @@ -3132,9 +3111,9 @@ void submit_bio(int rw, struct bio *bio) BIO_BUG_ON(!bio->bi_io_vec); bio->bi_rw |= rw; if (rw & WRITE) - count_vm_events(PGPGOUT, count); + mod_page_state(pgpgout, count); else - count_vm_events(PGPGIN, count); + mod_page_state(pgpgin, count); if (unlikely(block_dump)) { char b[BDEVNAME_SIZE]; @@ -3380,11 +3359,12 @@ EXPORT_SYMBOL(end_that_request_chunk); */ static void blk_done_softirq(struct softirq_action *h) { - struct list_head *cpu_list, local_list; + struct list_head *cpu_list; + LIST_HEAD(local_list); local_irq_disable(); cpu_list = &__get_cpu_var(blk_cpu_done); - list_replace_init(cpu_list, &local_list); + list_splice_init(cpu_list, &local_list); local_irq_enable(); while (!list_empty(&local_list)) { @@ -3418,7 +3398,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action, } -static struct notifier_block __devinitdata blk_cpu_notifier = { +static struct notifier_block blk_cpu_notifier = { .notifier_call = blk_cpu_notify, }; @@ -3430,7 +3410,7 @@ static struct notifier_block __devinitdata blk_cpu_notifier = { * * Description: * Ends all I/O on a request. It does not handle partial completions, - * unless the driver actually implements this in its completion callback + * unless the driver actually implements this in its completionc callback * through requeueing. Theh actual completion happens out-of-order, * through a softirq handler. The user must have registered a completion * callback through blk_queue_softirq_done(). @@ -3507,8 +3487,8 @@ EXPORT_SYMBOL(end_request); void blk_rq_bio_prep(request_queue_t *q, struct request *rq, struct bio *bio) { - /* first two bits are identical in rq->flags and bio->bi_rw */ - rq->flags |= (bio->bi_rw & 3); + /* first three bits are identical in rq->flags and bio->bi_rw */ + rq->flags |= (bio->bi_rw & 7); rq->nr_phys_segments = bio_phys_segments(q, bio); rq->nr_hw_segments = bio_hw_segments(q, bio); @@ -3556,7 +3536,9 @@ int __init blk_dev_init(void) INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); - register_hotcpu_notifier(&blk_cpu_notifier); +#ifdef CONFIG_HOTPLUG_CPU + register_cpu_notifier(&blk_cpu_notifier); +#endif blk_max_low_pfn = max_low_pfn; blk_max_pfn = max_pfn; @@ -3644,8 +3626,6 @@ struct io_context *current_io_context(gfp_t gfp_flags) ret->nr_batch_requests = 0; /* because this is 0 */ ret->aic = NULL; ret->cic_root.rb_node = NULL; - /* make sure set_task_ioprio() sees the settings above */ - smp_wmb(); tsk->io_context = ret; } diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 848ac4223..b33eda26e 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -246,10 +246,10 @@ static int sg_io(struct file *file, request_queue_t *q, switch (hdr->dxfer_direction) { default: return -EINVAL; + case SG_DXFER_TO_FROM_DEV: case SG_DXFER_TO_DEV: writing = 1; break; - case SG_DXFER_TO_FROM_DEV: case SG_DXFER_FROM_DEV: break; } @@ -286,8 +286,9 @@ static int sg_io(struct file *file, request_queue_t *q, * fill in request structure */ rq->cmd_len = hdr->cmd_len; - memset(rq->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */ memcpy(rq->cmd, cmd, hdr->cmd_len); + if (sizeof(rq->cmd) != hdr->cmd_len) + memset(rq->cmd + hdr->cmd_len, 0, sizeof(rq->cmd) - hdr->cmd_len); memset(sense, 0, sizeof(sense)); rq->sense = sense; diff --git a/configs/kernel-2.6.18-i586-smp.config b/configs/kernel-2.6.17-i586-smp.config similarity index 82% rename from configs/kernel-2.6.18-i586-smp.config rename to configs/kernel-2.6.17-i586-smp.config index 224fc97d5..a0ef2c894 100644 --- a/configs/kernel-2.6.18-i586-smp.config +++ b/configs/kernel-2.6.17-i586-smp.config @@ -1,13 +1,10 @@ # i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:39 2006 +# Linux kernel version: 2.6.17.13 +# Wed Oct 18 17:15:50 2006 # CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -16,7 +13,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -35,18 +31,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -59,8 +54,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -78,12 +71,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -165,12 +152,10 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y # CONFIG_X86_MCE_NONFATAL is not set # CONFIG_X86_MCE_P4THERMAL is not set -CONFIG_VM86=y # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -202,7 +187,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y @@ -219,7 +203,6 @@ CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x400000 CONFIG_HOTPLUG_CPU=y -# CONFIG_COMPAT_VDSO is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # @@ -227,7 +210,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" CONFIG_SUSPEND_SMP=y @@ -245,7 +228,6 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y @@ -259,7 +241,6 @@ CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m # # APM (Advanced Power Management) BIOS Support @@ -303,7 +284,6 @@ CONFIG_X86_ACPI_CPUFREQ=m # CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -410,25 +390,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -472,10 +437,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -492,8 +454,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -509,11 +469,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -523,7 +481,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -534,7 +491,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -565,7 +521,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -661,13 +616,7 @@ CONFIG_SCTP_HMAC_MD5=y CONFIG_TIPC=m # CONFIG_TIPC_ADVANCED is not set # CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set +# CONFIG_ATM is not set CONFIG_BRIDGE=m CONFIG_VLAN_8021Q=m CONFIG_DECNET=m @@ -678,7 +627,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -686,6 +635,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -703,7 +653,6 @@ CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y CONFIG_NET_SCH_CBQ=m CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m @@ -735,14 +684,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -750,7 +693,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -813,7 +755,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -869,122 +810,16 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) # -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set +# CONFIG_MTD is not set # # Parallel port support @@ -997,7 +832,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1063,7 +897,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -1082,7 +915,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1112,7 +945,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1129,7 +962,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1212,7 +1045,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1251,6 +1083,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1284,8 +1122,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1354,7 +1193,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1379,11 +1217,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1425,7 +1258,7 @@ CONFIG_ULI526X=m CONFIG_PCMCIA_XIRCOM=m # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_ISA=y # CONFIG_E2100 is not set CONFIG_EWRK3=m @@ -1449,7 +1282,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1468,7 +1301,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1505,7 +1337,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1546,9 +1377,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1572,7 +1401,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1586,8 +1414,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1608,34 +1434,6 @@ CONFIG_PCMCIA_IBMTR=m # Wan interfaces # # CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_NICSTAR=m -# CONFIG_ATM_NICSTAR_USE_SUNI is not set -# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -# CONFIG_ATM_IA is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set CONFIG_FDDI=y # CONFIG_DEFXX is not set CONFIG_SKFP=m @@ -1650,7 +1448,6 @@ CONFIG_PPP_DEFLATE=m # CONFIG_PPP_BSDCOMP is not set CONFIG_PPP_MPPE=m CONFIG_PPPOE=m -CONFIG_PPPOATM=m CONFIG_SLIP=m CONFIG_SLIP_COMPRESSED=y CONFIG_SLIP_SMART=y @@ -1850,31 +1647,7 @@ CONFIG_MOUSE_SERIAL=m # CONFIG_MOUSE_LOGIBM is not set # CONFIG_MOUSE_PC110PAD is not set CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m +# CONFIG_INPUT_JOYSTICK is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_GUNZE=m CONFIG_TOUCHSCREEN_ELO=m @@ -1896,11 +1669,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m +# CONFIG_GAMEPORT is not set # # Character devices @@ -1908,21 +1677,19 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set +# CONFIG_N_HDLC is not set # CONFIG_SPECIALIX is not set # CONFIG_SX is not set # CONFIG_RIO is not set @@ -1953,7 +1720,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -2016,11 +1783,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y # CONFIG_DTLK is not set @@ -2057,27 +1820,19 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set +# CONFIG_HPET is not set CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -2107,7 +1862,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2153,7 +1907,6 @@ CONFIG_SENSORS_MAX6875=m # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2182,12 +1935,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2206,7 +1957,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2218,7 +1969,6 @@ CONFIG_VIDEO_V4L2=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_VIVI is not set CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y CONFIG_VIDEO_SAA6588=m # CONFIG_VIDEO_PMS is not set CONFIG_VIDEO_BWQCAM=m @@ -2238,31 +1988,23 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y CONFIG_VIDEO_MXB=m CONFIG_VIDEO_DPC=m CONFIG_VIDEO_HEXIUM_ORION=m CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2272,26 +2014,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2310,131 +2046,16 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices # -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m +# CONFIG_DVB is not set CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m CONFIG_VIDEO_TUNER=m CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m CONFIG_VIDEO_BTCX=m CONFIG_VIDEO_IR=m CONFIG_VIDEO_TVEEPROM=m @@ -2443,13 +2064,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2460,11 +2080,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2509,7 +2128,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -2630,18 +2248,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2715,7 +2321,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2755,7 +2360,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2805,6 +2410,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2818,6 +2424,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2856,7 +2463,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2874,12 +2480,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2888,11 +2492,6 @@ CONFIG_USB_TEST=m # # USB DSL modem support # -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m # # USB Gadget Support @@ -2902,17 +2501,12 @@ CONFIG_USB_XUSBATM=m # # MMC/SD Card support # -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m +# CONFIG_MMC is not set # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2921,10 +2515,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2946,7 +2536,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -2962,38 +2551,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -3024,16 +2591,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -3043,11 +2609,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -3057,8 +2618,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -3093,16 +2652,6 @@ CONFIG_BEFS_FS=m # CONFIG_BEFS_DEBUG is not set CONFIG_BFS_FS=m CONFIG_EFS_FS=m -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=m CONFIG_SQUASHFS=m # CONFIG_SQUASHFS_EMBEDDED is not set @@ -3113,8 +2662,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -3123,7 +2670,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3143,10 +2689,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3230,47 +2774,37 @@ CONFIG_NLS_UTF8=m # # Instrumentation Support # -CONFIG_PROFILING=y -CONFIG_OPROFILE=m +# CONFIG_PROFILING is not set CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 # # Page alloc debug is incompatible with Software Suspend on i386 @@ -3288,7 +2822,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3299,8 +2833,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3309,7 +2841,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3348,16 +2880,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y diff --git a/configs/kernel-2.6.18-i586.config b/configs/kernel-2.6.17-i586.config similarity index 86% rename from configs/kernel-2.6.18-i586.config rename to configs/kernel-2.6.17-i586.config index 906c52ba2..1e12169f5 100644 --- a/configs/kernel-2.6.18-i586.config +++ b/configs/kernel-2.6.17-i586.config @@ -1,13 +1,9 @@ -# i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:39 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:11 2006 # CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -16,7 +12,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -35,17 +30,16 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,8 +52,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -76,12 +68,6 @@ CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set CONFIG_KMOD=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -107,7 +93,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" # # CONFIG_SMP is not set CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set @@ -161,14 +146,12 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_X86_UP_APIC is not set CONFIG_X86_MCE=y # CONFIG_X86_MCE_NONFATAL is not set -CONFIG_VM86=y # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set # CONFIG_MICROCODE is not set CONFIG_X86_MSR=m CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set # # Firmware Drivers @@ -177,11 +160,10 @@ CONFIG_EDD=m CONFIG_EFI_VARS=y # CONFIG_DELL_RBU is not set # CONFIG_DCDBAS is not set -# CONFIG_NOHIGHMEM is not set -CONFIG_HIGHMEM4G=y +CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_HIGHMEM=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y @@ -193,8 +175,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y CONFIG_EFI=y @@ -206,17 +186,14 @@ CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 CONFIG_KEXEC=y -# CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x400000 -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options (ACPI, APM) # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" @@ -233,7 +210,6 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set @@ -245,8 +221,7 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_SBS=m +# CONFIG_ACPI_CONTAINER is not set # # APM (Advanced Power Management) BIOS Support @@ -290,7 +265,6 @@ CONFIG_X86_POWERNOW_K6=m # CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -305,7 +279,6 @@ CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y @@ -396,25 +369,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -458,10 +416,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -478,8 +433,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -495,11 +448,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -509,7 +460,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -520,7 +470,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -551,7 +500,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -664,7 +612,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -672,6 +620,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -721,14 +670,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -736,7 +679,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # # CONFIG_NET_PKTGEN is not set -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -801,7 +743,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -857,122 +798,16 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) # -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set +# CONFIG_MTD is not set # # Parallel port support @@ -985,7 +820,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1051,7 +885,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -1070,7 +903,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1100,7 +933,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1117,7 +950,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1200,7 +1033,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1239,6 +1071,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1272,8 +1110,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1342,7 +1181,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1367,11 +1205,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1391,10 +1224,7 @@ CONFIG_EL3=m CONFIG_VORTEX=m CONFIG_TYPHOON=m # CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -CONFIG_ULTRA=m -# CONFIG_SMC9194 is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -1414,7 +1244,7 @@ CONFIG_PCMCIA_XIRCOM=m # CONFIG_PCMCIA_XIRTULIP is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_ISA=y # CONFIG_E2100 is not set CONFIG_EWRK3=m @@ -1438,7 +1268,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1457,7 +1287,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1494,7 +1323,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1535,9 +1363,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1561,7 +1387,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1575,8 +1400,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1887,7 +1710,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1900,20 +1723,18 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -1946,7 +1767,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -1963,57 +1784,8 @@ CONFIG_TIPAR=m # # Watchdog Cards # -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -# CONFIG_PCWATCHDOG is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_WDT is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y # CONFIG_DTLK is not set @@ -2051,27 +1823,19 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set +# CONFIG_HPET is not set CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -2102,7 +1866,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2148,7 +1911,6 @@ CONFIG_SENSORS_MAX6875=m # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2177,12 +1939,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2201,7 +1961,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2233,7 +1993,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m CONFIG_VIDEO_SAA7134_DVB=m @@ -2245,19 +2004,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2267,26 +2024,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2305,7 +2056,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2337,7 +2087,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2410,20 +2159,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2438,13 +2180,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2455,11 +2196,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2504,7 +2244,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -2625,18 +2364,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2644,7 +2371,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2710,7 +2436,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2750,7 +2475,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2800,6 +2525,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2813,6 +2539,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2851,7 +2578,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2869,12 +2595,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2906,8 +2630,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2916,10 +2639,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2941,7 +2660,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -2957,38 +2675,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -3019,16 +2715,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -3038,11 +2733,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -3052,8 +2742,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -3088,16 +2776,6 @@ CONFIG_BEFS_FS=m # CONFIG_BEFS_DEBUG is not set CONFIG_BFS_FS=m CONFIG_EFS_FS=m -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set CONFIG_CRAMFS=m CONFIG_SQUASHFS=m # CONFIG_SQUASHFS_EMBEDDED is not set @@ -3108,8 +2786,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -3118,7 +2794,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3135,13 +2810,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3232,40 +2906,30 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 # # Page alloc debug is incompatible with Software Suspend on i386 @@ -3281,7 +2945,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3292,8 +2956,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3302,7 +2964,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3341,16 +3003,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y diff --git a/configs/kernel-2.6.18-i686-kdump.config b/configs/kernel-2.6.17-i686-kdump.config similarity index 92% rename from configs/kernel-2.6.18-i686-kdump.config rename to configs/kernel-2.6.17-i686-kdump.config index 8e2ca42b6..8f39757c9 100644 --- a/configs/kernel-2.6.18-i686-kdump.config +++ b/configs/kernel-2.6.17-i686-kdump.config @@ -1,13 +1,10 @@ # i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:39 2006 +# Linux kernel version: 2.6.17.13 +# Wed Oct 18 17:15:51 2006 # CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -16,7 +13,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -35,17 +31,16 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,11 +53,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -76,12 +70,6 @@ CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set CONFIG_KMOD=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -162,12 +150,10 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_X86_UP_APIC=y CONFIG_X86_UP_IOAPIC=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y # CONFIG_X86_MCE_NONFATAL is not set CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y CONFIG_TOSHIBA=m CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set @@ -200,7 +186,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y @@ -215,7 +200,6 @@ CONFIG_HZ=250 CONFIG_KEXEC=y CONFIG_CRASH_DUMP=y CONFIG_PHYSICAL_START=0x1000000 -# CONFIG_COMPAT_VDSO is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # @@ -223,7 +207,9 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y +CONFIG_SOFTWARE_SUSPEND=y +CONFIG_PM_STD_PARTITION="" # # ACPI (Advanced Configuration and Power Interface) Support @@ -238,11 +224,11 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=1999 # CONFIG_ACPI_DEBUG is not set @@ -250,8 +236,7 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_SBS=m +# CONFIG_ACPI_CONTAINER is not set # # APM (Advanced Power Management) BIOS Support @@ -299,7 +284,6 @@ CONFIG_X86_SPEEDSTEP_SMI=y CONFIG_X86_P4_CLOCKMOD=m # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -330,7 +314,6 @@ CONFIG_ISA=y # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set -CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -418,25 +401,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -480,10 +448,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -500,8 +465,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -517,11 +480,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -531,7 +492,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -542,7 +502,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -573,7 +532,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -686,7 +644,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -694,6 +652,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -743,14 +702,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -758,7 +711,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -823,7 +775,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -879,13 +830,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -973,22 +922,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -1007,7 +955,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1073,7 +1020,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1094,7 +1040,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1124,7 +1070,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1141,7 +1087,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1224,7 +1170,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1263,6 +1208,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1296,8 +1247,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1367,7 +1319,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1392,11 +1343,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1439,7 +1385,7 @@ CONFIG_PCMCIA_XIRCOM=m # CONFIG_PCMCIA_XIRTULIP is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_ISA=y # CONFIG_E2100 is not set CONFIG_EWRK3=m @@ -1463,7 +1409,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1482,7 +1428,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1519,7 +1464,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1560,9 +1504,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1586,7 +1528,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1600,8 +1541,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1925,12 +1864,10 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set @@ -1938,7 +1875,7 @@ CONFIG_CYCLADES=m # CONFIG_ISI is not set CONFIG_SYNCLINK=m CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -1971,7 +1908,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -2039,11 +1976,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -2081,12 +2014,10 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y @@ -2097,11 +2028,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -2132,7 +2059,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2172,13 +2098,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2187,14 +2113,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2223,12 +2147,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2247,7 +2169,7 @@ CONFIG_IBM_ASM=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2279,7 +2201,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_MEYE=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m @@ -2292,19 +2213,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2314,26 +2233,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2352,7 +2265,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2384,7 +2296,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2457,20 +2368,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2485,13 +2389,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2502,11 +2405,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2551,7 +2453,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -2672,18 +2573,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2757,7 +2646,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2797,7 +2685,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2847,6 +2735,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2860,6 +2749,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2898,7 +2788,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2916,12 +2805,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2953,8 +2840,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2963,10 +2849,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2974,14 +2856,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2998,7 +2878,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -3014,38 +2893,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -3076,16 +2933,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -3095,11 +2951,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -3109,8 +2960,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -3151,7 +3000,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -3166,8 +3014,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -3176,7 +3022,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3196,10 +3041,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3290,40 +3133,35 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 + +# +# Page alloc debug is incompatible with Software Suspend on i386 +# CONFIG_DEBUG_RODATA=y CONFIG_4KSTACKS=y CONFIG_X86_FIND_SMP_CONFIG=y @@ -3337,7 +3175,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3348,8 +3186,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3358,7 +3194,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3397,16 +3233,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y diff --git a/configs/kernel-2.6.17-i686-planetlab.config b/configs/kernel-2.6.17-i686-planetlab.config new file mode 100644 index 000000000..2acdd7a0d --- /dev/null +++ b/configs/kernel-2.6.17-i686-planetlab.config @@ -0,0 +1,1618 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17-1.2142_FC4.3 +# Wed Oct 18 22:35:27 2006 +# +CONFIG_X86_32=y +CONFIG_SEMAPHORE_SLEEPERS=y +CONFIG_X86=y +CONFIG_MMU=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_DMI=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_OOM_PANIC=y +CONFIG_RELAY=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_LBD=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_LSF=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" + +# +# Processor type and features +# +# CONFIG_SMP is not set +CONFIG_X86_PC=y +# CONFIG_X86_XEN is not set +# CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_NUMAQ is not set +# CONFIG_X86_SUMMIT is not set +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_VISWS is not set +# CONFIG_X86_GENERICARCH is not set +# CONFIG_X86_ES7000 is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +CONFIG_M686=y +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +CONFIG_X86_GENERIC=y +CONFIG_X86_CMPXCHG=y +CONFIG_X86_XADD=y +CONFIG_X86_L1_CACHE_SHIFT=7 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_GOOD_APIC=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_HPET_TIMER=y +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_X86_UP_APIC=y +CONFIG_X86_UP_IOAPIC=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_MCE=y +# CONFIG_X86_MCE_NONFATAL is not set +CONFIG_X86_MCE_P4THERMAL=y +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_X86_REBOOTFIXUPS is not set +# CONFIG_MICROCODE is not set +# CONFIG_X86_MSR is not set +# CONFIG_X86_CPUID is not set +# CONFIG_SWIOTLB is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +# CONFIG_EFI_VARS is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +# CONFIG_NOHIGHMEM is not set +CONFIG_HIGHMEM4G=y +# CONFIG_HIGHMEM64G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_SPLIT_PTLOCK_CPUS=4096 +CONFIG_HIGHPTE=y +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_EFI=y +CONFIG_BOOT_IOREMAP=y +CONFIG_REGPARM=y +# CONFIG_SECCOMP is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_1000=y +CONFIG_HZ=1000 +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y +CONFIG_PHYSICAL_START=0x100000 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y + +# +# Power management options (ACPI, APM) +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +# CONFIG_SOFTWARE_SUSPEND is not set + +# +# ACPI (Advanced Configuration and Power Interface) Support +# +CONFIG_ACPI=y +# CONFIG_ACPI_SLEEP is not set +# CONFIG_ACPI_AC is not set +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_BUTTON is not set +# CONFIG_ACPI_VIDEO is not set +# CONFIG_ACPI_HOTKEY is not set +# CONFIG_ACPI_FAN is not set +# CONFIG_ACPI_PROCESSOR is not set +# CONFIG_ACPI_ASUS is not set +# CONFIG_ACPI_IBM is not set +# CONFIG_ACPI_TOSHIBA is not set +CONFIG_ACPI_BLACKLIST_YEAR=2001 +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_EC=y +CONFIG_ACPI_POWER=y +CONFIG_ACPI_SYSTEM=y +CONFIG_X86_PM_TIMER=y +# CONFIG_ACPI_CONTAINER is not set + +# +# APM (Advanced Power Management) BIOS Support +# +# CONFIG_APM is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +# CONFIG_PCI_GOXEN_FE is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_DEBUG is not set +CONFIG_ISA_DMA_API=y +# CONFIG_ISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_MISC=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_FWMARK is not set +# CONFIG_IP_ROUTE_MULTIPATH is not set +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +CONFIG_NET_IPGRE=m +# CONFIG_ARPD 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 +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_ICMP_IPOD=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPPORTHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m +CONFIG_VNET=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +CONFIG_VLAN_8021Q=m +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +CONFIG_NET_SCH_HTB=m +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set +# CONFIG_NET_SCH_INGRESS is not set + +# +# Classification +# +CONFIG_NET_CLS=y +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +# CONFIG_NET_CLS_U32 is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +# CONFIG_NET_CLS_POLICE is not set +# CONFIG_NET_CLS_IND is not set +# CONFIG_NET_ESTIMATOR is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +CONFIG_IEEE80211_SOFTMAC_DEBUG=y +# CONFIG_TUX is not set +CONFIG_WIRELESS_EXT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +CONFIG_BLK_DEV_FD=m +CONFIG_BLK_CPQ_DA=m +CONFIG_BLK_CPQ_CISS_DA=m +CONFIG_CISS_SCSI_TAPE=y +CONFIG_BLK_DEV_DAC960=m +CONFIG_BLK_DEV_UMEM=m +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_VROOT is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_SX8=m +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +CONFIG_ATA_OVER_ETH=m + +# +# 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_IDE_SATA is not set +# CONFIG_BLK_DEV_HD_IDE is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=y +CONFIG_BLK_DEV_IDESCSI=m +CONFIG_IDE_TASK_IOCTL=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y +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_RZ1000=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_BLK_DEV_AEC62XX=y +CONFIG_BLK_DEV_ALI15X3=y +# CONFIG_WDC_ALI15X3 is not set +CONFIG_BLK_DEV_AMD74XX=y +CONFIG_BLK_DEV_ATIIXP=y +CONFIG_BLK_DEV_CMD64X=y +CONFIG_BLK_DEV_TRIFLEX=y +CONFIG_BLK_DEV_CY82C693=y +CONFIG_BLK_DEV_CS5520=y +CONFIG_BLK_DEV_CS5530=y +CONFIG_BLK_DEV_CS5535=y +CONFIG_BLK_DEV_HPT34X=y +# CONFIG_HPT34X_AUTODMA is not set +CONFIG_BLK_DEV_HPT366=y +# CONFIG_BLK_DEV_SC1200 is not set +CONFIG_BLK_DEV_PIIX=y +CONFIG_BLK_DEV_IT821X=y +# CONFIG_BLK_DEV_NS87415 is not set +CONFIG_BLK_DEV_PDC202XX_OLD=y +# CONFIG_PDC202XX_BURST is not set +CONFIG_BLK_DEV_PDC202XX_NEW=y +CONFIG_BLK_DEV_SVWKS=y +CONFIG_BLK_DEV_SIIMAGE=y +CONFIG_BLK_DEV_SIS5513=y +CONFIG_BLK_DEV_SLC90E66=y +# CONFIG_BLK_DEV_TRM290 is not set +CONFIG_BLK_DEV_VIA82CXXX=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=m +CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_ISCSI_ATTRS=m +CONFIG_SCSI_SAS_ATTRS=m + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +CONFIG_BLK_DEV_3W_XXXX_RAID=m +CONFIG_SCSI_3W_9XXX=m +CONFIG_SCSI_ACARD=m +CONFIG_SCSI_AACRAID=m +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set +CONFIG_SCSI_AIC7XXX_OLD=m +CONFIG_SCSI_AIC79XX=m +CONFIG_AIC79XX_CMDS_PER_DEVICE=4 +CONFIG_AIC79XX_RESET_DELAY_MS=15000 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_DPT_I2O is not set +CONFIG_SCSI_ADVANSYS=m +CONFIG_MEGARAID_NEWGEN=y +CONFIG_MEGARAID_MM=m +CONFIG_MEGARAID_MAILBOX=m +CONFIG_MEGARAID_LEGACY=m +CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_SATA=m +CONFIG_SCSI_SATA_AHCI=m +CONFIG_SCSI_SATA_SVW=m +CONFIG_SCSI_ATA_PIIX=m +CONFIG_SCSI_SATA_MV=m +CONFIG_SCSI_SATA_NV=m +CONFIG_SCSI_PDC_ADMA=m +CONFIG_SCSI_SATA_QSTOR=m +CONFIG_SCSI_SATA_PROMISE=m +CONFIG_SCSI_SATA_SX4=m +CONFIG_SCSI_SATA_SIL=m +CONFIG_SCSI_SATA_SIL24=m +CONFIG_SCSI_SATA_SIS=m +CONFIG_SCSI_SATA_ULI=m +CONFIG_SCSI_SATA_VIA=m +CONFIG_SCSI_SATA_VITESSE=m +CONFIG_SCSI_SATA_INTEL_COMBINED=y +CONFIG_SCSI_BUSLOGIC=m +# CONFIG_SCSI_OMIT_FLASHPOINT is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +CONFIG_SCSI_FUTURE_DOMAIN=m +CONFIG_SCSI_GDTH=m +CONFIG_SCSI_IPS=m +CONFIG_SCSI_INITIO=m +CONFIG_SCSI_INIA100=m +CONFIG_SCSI_SYM53C8XX_2=m +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_IPR is not set +CONFIG_SCSI_QLOGIC_1280=m +CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m +CONFIG_SCSI_LPFC=m +CONFIG_SCSI_DC395x=m +CONFIG_SCSI_DC390T=m +# CONFIG_SCSI_NSP32 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 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_RAID6 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +CONFIG_FUSION=y +CONFIG_FUSION_SPI=m +CONFIG_FUSION_FC=m +CONFIG_FUSION_SAS=m +CONFIG_FUSION_MAX_SGE=40 +CONFIG_FUSION_CTL=m + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_HAPPYMEAL=m +CONFIG_SUNGEM=m +CONFIG_CASSINI=m +CONFIG_NET_VENDOR_3COM=y +CONFIG_VORTEX=m +CONFIG_TYPHOON=m + +# +# Tulip family network device support +# +CONFIG_NET_TULIP=y +CONFIG_DE2104X=m +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +CONFIG_TULIP_MMIO=y +# CONFIG_TULIP_NAPI is not set +CONFIG_DE4X5=m +CONFIG_WINBOND_840=m +CONFIG_DM9102=m +CONFIG_ULI526X=m +CONFIG_HP100=m +CONFIG_NET_PCI=y +CONFIG_PCNET32=m +CONFIG_AMD8111_ETH=m +CONFIG_AMD8111E_NAPI=y +CONFIG_ADAPTEC_STARFIRE=m +CONFIG_ADAPTEC_STARFIRE_NAPI=y +CONFIG_B44=m +CONFIG_FORCEDETH=m +CONFIG_DGRS=m +CONFIG_EEPRO100=m +CONFIG_E100=m +CONFIG_FEALNX=m +CONFIG_NATSEMI=m +CONFIG_NE2K_PCI=m +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET is not set +CONFIG_SIS900=m +CONFIG_EPIC100=m +CONFIG_SUNDANCE=m +# CONFIG_SUNDANCE_MMIO is not set +CONFIG_TLAN=m +CONFIG_VIA_RHINE=m +CONFIG_VIA_RHINE_MMIO=y + +# +# Ethernet (1000 Mbit) +# +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_DL2K=m +CONFIG_E1000=m +CONFIG_E1000_NAPI=y +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set +CONFIG_NS83820=m +CONFIG_HAMACHI=m +CONFIG_YELLOWFIN=m +CONFIG_R8169=m +CONFIG_R8169_NAPI=y +# CONFIG_R8169_VLAN is not set +CONFIG_SIS190=m +CONFIG_SKGE=m +CONFIG_SKY2=m +CONFIG_SK98LIN=m +CONFIG_VIA_VELOCITY=m +CONFIG_TIGON3=m +CONFIG_BNX2=m +# CONFIG_BCM5700 is not set + +# +# Ethernet (10000 Mbit) +# +CONFIG_CHELSIO_T1=m +CONFIG_IXGB=m +CONFIG_IXGB_NAPI=y +CONFIG_S2IO=m +CONFIG_S2IO_NAPI=y + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y +# CONFIG_IPW2200_DEBUG is not set +CONFIG_AIRO=m +CONFIG_HERMES=m +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m +CONFIG_ATMEL=m +CONFIG_PCI_ATMEL=m + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +CONFIG_PRISM54=m +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_PIO=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +# CONFIG_BCM43XX_PIO_MODE is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN 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 is not set +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 is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD 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_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA 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_WISTRON_BTNS is not set +# CONFIG_INPUT_UINPUT is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# 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_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_CRASH is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# 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 +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_MWAVE is not set +# CONFIG_CS5535_GPIO is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +CONFIG_HANGCHECK_TIMER=y + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# +# CONFIG_IBM_ASM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +# CONFIG_FB is not set +CONFIG_VIDEO_SELECT=y + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_ISP116X_HCD=m +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_SL811_HCD=m + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_LIBUSUAL=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +CONFIG_USB_NET_RNDIS_HOST=m +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +CONFIG_USB_ZD1201=m +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=m +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=m +CONFIG_MMC_SDHCI=m +CONFIG_MMC_WBSD=m + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# +# CONFIG_EDAC is not set + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_INOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_VMCORE=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_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_SQUASHFS 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# 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_ASCII=y +CONFIG_NLS_ISO8859_1=m +# 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=m + +# +# Instrumentation Support +# +CONFIG_PROFILING=y +CONFIG_OPROFILE=m +CONFIG_KPROBES=y + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHEDSTATS=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_HIGHMEM=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_VM=y +# CONFIG_FRAME_POINTER is not set +CONFIG_UNWIND_INFO=y +# CONFIG_FORCED_INLINING is not set +CONFIG_BOOT_DELAY=y +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_EARLY_PRINTK=y +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_DEBUG_RODATA=y +CONFIG_4KSTACKS=y +CONFIG_X86_FIND_SMP_CONFIG=y +CONFIG_X86_MPPARSE=y +CONFIG_DOUBLEFAULT=y + +# +# Linux VServer +# +CONFIG_VSERVER_FILESHARING=y +CONFIG_VSERVER_LEGACY=y +# CONFIG_VSERVER_LEGACY_VERSION is not set +# CONFIG_VSERVER_NGNET is not set +# CONFIG_VSERVER_PROC_SECURE is not set +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_HARDCPU_IDLE=y +CONFIG_VSERVER_ACB_SCHED=y +# CONFIG_INOXID_NONE is not set +# CONFIG_INOXID_UID16 is not set +# CONFIG_INOXID_GID16 is not set +CONFIG_INOXID_UGID24=y +# CONFIG_INOXID_INTERN is not set +# CONFIG_INOXID_RUNTIME is not set +# CONFIG_XID_TAG_NFSD is not set +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_LEGACYNET=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_SIGNATURE is not set +# CONFIG_CRYPTO_MPILIB is not set + +# +# Hardware crypto devices +# +# CONFIG_CRYPTO_DEV_PADLOCK is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_X86_BIOS_REBOOT=y +CONFIG_KTIME_SCALAR=y diff --git a/configs/kernel-2.6.17-i686-smp-planetlab.config b/configs/kernel-2.6.17-i686-smp-planetlab.config new file mode 100644 index 000000000..3fe7f151a --- /dev/null +++ b/configs/kernel-2.6.17-i686-smp-planetlab.config @@ -0,0 +1,1628 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17-1.2142_FC4.3smp +# Wed Oct 18 22:53:28 2006 +# +CONFIG_X86_32=y +CONFIG_SEMAPHORE_SLEEPERS=y +CONFIG_X86=y +CONFIG_MMU=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_DMI=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_OOM_PANIC=y +CONFIG_CPUSETS=y +CONFIG_RELAY=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y + +# +# Block layer +# +CONFIG_LBD=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_LSF=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" + +# +# Processor type and features +# +CONFIG_SMP=y +# CONFIG_X86_PC is not set +# CONFIG_X86_XEN is not set +# CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_NUMAQ is not set +# CONFIG_X86_SUMMIT is not set +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_VISWS is not set +CONFIG_X86_GENERICARCH=y +# CONFIG_X86_ES7000 is not set +CONFIG_X86_CYCLONE_TIMER=y +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +CONFIG_M686=y +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +CONFIG_X86_GENERIC=y +CONFIG_X86_CMPXCHG=y +CONFIG_X86_XADD=y +CONFIG_X86_L1_CACHE_SHIFT=7 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_GOOD_APIC=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_HPET_TIMER=y +CONFIG_NR_CPUS=32 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_BKL=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_MCE=y +# CONFIG_X86_MCE_NONFATAL is not set +CONFIG_X86_MCE_P4THERMAL=y +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_X86_REBOOTFIXUPS is not set +# CONFIG_MICROCODE is not set +# CONFIG_X86_MSR is not set +# CONFIG_X86_CPUID is not set +# CONFIG_SWIOTLB is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +# CONFIG_EFI_VARS is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +# CONFIG_NOHIGHMEM is not set +# CONFIG_HIGHMEM4G is not set +CONFIG_HIGHMEM64G=y +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_HIGHMEM=y +CONFIG_X86_PAE=y +# CONFIG_NUMA is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +CONFIG_HIGHPTE=y +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_EFI=y +# CONFIG_IRQBALANCE is not set +CONFIG_BOOT_IOREMAP=y +CONFIG_REGPARM=y +# CONFIG_SECCOMP is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_1000=y +CONFIG_HZ=1000 +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y +CONFIG_PHYSICAL_START=0x100000 +CONFIG_HOTPLUG_CPU=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y + +# +# Power management options (ACPI, APM) +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +# CONFIG_SOFTWARE_SUSPEND is not set +CONFIG_SUSPEND_SMP=y + +# +# ACPI (Advanced Configuration and Power Interface) Support +# +CONFIG_ACPI=y +# CONFIG_ACPI_SLEEP is not set +# CONFIG_ACPI_AC is not set +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_BUTTON is not set +# CONFIG_ACPI_VIDEO is not set +# CONFIG_ACPI_HOTKEY is not set +# CONFIG_ACPI_FAN is not set +# CONFIG_ACPI_PROCESSOR is not set +# CONFIG_ACPI_ASUS is not set +# CONFIG_ACPI_IBM is not set +# CONFIG_ACPI_TOSHIBA is not set +CONFIG_ACPI_BLACKLIST_YEAR=2001 +# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_EC=y +CONFIG_ACPI_POWER=y +CONFIG_ACPI_SYSTEM=y +CONFIG_X86_PM_TIMER=y +# CONFIG_ACPI_CONTAINER is not set + +# +# APM (Advanced Power Management) BIOS Support +# +# CONFIG_APM is not set + +# +# CPU Frequency scaling +# +# CONFIG_CPU_FREQ is not set + +# +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +# CONFIG_PCI_GOXEN_FE is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_DEBUG is not set +CONFIG_ISA_DMA_API=y +# CONFIG_ISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PCI Hotplug Support +# +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_MISC=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_FWMARK is not set +# CONFIG_IP_ROUTE_MULTIPATH is not set +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +CONFIG_NET_IPGRE=m +# CONFIG_ARPD 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 +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_ICMP_IPOD=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPPORTHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m +CONFIG_VNET=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +CONFIG_VLAN_8021Q=m +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +CONFIG_NET_SCH_HTB=m +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set +# CONFIG_NET_SCH_INGRESS is not set + +# +# Classification +# +CONFIG_NET_CLS=y +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +# CONFIG_NET_CLS_U32 is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +# CONFIG_NET_CLS_POLICE is not set +# CONFIG_NET_CLS_IND is not set +# CONFIG_NET_ESTIMATOR is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +CONFIG_IEEE80211_SOFTMAC_DEBUG=y +# CONFIG_TUX is not set +CONFIG_WIRELESS_EXT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +CONFIG_BLK_DEV_FD=m +CONFIG_BLK_CPQ_DA=m +CONFIG_BLK_CPQ_CISS_DA=m +CONFIG_CISS_SCSI_TAPE=y +CONFIG_BLK_DEV_DAC960=m +CONFIG_BLK_DEV_UMEM=m +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_VROOT is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_SX8=m +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +CONFIG_ATA_OVER_ETH=m + +# +# 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_IDE_SATA is not set +# CONFIG_BLK_DEV_HD_IDE is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=y +CONFIG_BLK_DEV_IDESCSI=m +CONFIG_IDE_TASK_IOCTL=y + +# +# IDE chipset support/bugfixes +# +CONFIG_IDE_GENERIC=y +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y +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_RZ1000=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_BLK_DEV_AEC62XX=y +CONFIG_BLK_DEV_ALI15X3=y +# CONFIG_WDC_ALI15X3 is not set +CONFIG_BLK_DEV_AMD74XX=y +CONFIG_BLK_DEV_ATIIXP=y +CONFIG_BLK_DEV_CMD64X=y +CONFIG_BLK_DEV_TRIFLEX=y +CONFIG_BLK_DEV_CY82C693=y +CONFIG_BLK_DEV_CS5520=y +CONFIG_BLK_DEV_CS5530=y +CONFIG_BLK_DEV_CS5535=y +CONFIG_BLK_DEV_HPT34X=y +# CONFIG_HPT34X_AUTODMA is not set +CONFIG_BLK_DEV_HPT366=y +# CONFIG_BLK_DEV_SC1200 is not set +CONFIG_BLK_DEV_PIIX=y +CONFIG_BLK_DEV_IT821X=y +# CONFIG_BLK_DEV_NS87415 is not set +CONFIG_BLK_DEV_PDC202XX_OLD=y +# CONFIG_PDC202XX_BURST is not set +CONFIG_BLK_DEV_PDC202XX_NEW=y +CONFIG_BLK_DEV_SVWKS=y +CONFIG_BLK_DEV_SIIMAGE=y +CONFIG_BLK_DEV_SIS5513=y +CONFIG_BLK_DEV_SLC90E66=y +# CONFIG_BLK_DEV_TRM290 is not set +CONFIG_BLK_DEV_VIA82CXXX=y +# CONFIG_IDE_ARM is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +CONFIG_CHR_DEV_ST=m +CONFIG_CHR_DEV_OSST=m +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_MULTI_LUN=y +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y + +# +# SCSI Transport Attributes +# +CONFIG_SCSI_SPI_ATTRS=m +CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_ISCSI_ATTRS=m +CONFIG_SCSI_SAS_ATTRS=m + +# +# SCSI low-level drivers +# +# CONFIG_ISCSI_TCP is not set +CONFIG_BLK_DEV_3W_XXXX_RAID=m +CONFIG_SCSI_3W_9XXX=m +CONFIG_SCSI_ACARD=m +CONFIG_SCSI_AACRAID=m +CONFIG_SCSI_AIC7XXX=m +CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set +CONFIG_SCSI_AIC7XXX_OLD=m +CONFIG_SCSI_AIC79XX=m +CONFIG_AIC79XX_CMDS_PER_DEVICE=4 +CONFIG_AIC79XX_RESET_DELAY_MS=15000 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set +# CONFIG_AIC79XX_DEBUG_ENABLE is not set +CONFIG_AIC79XX_DEBUG_MASK=0 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_DPT_I2O is not set +CONFIG_SCSI_ADVANSYS=m +CONFIG_MEGARAID_NEWGEN=y +CONFIG_MEGARAID_MM=m +CONFIG_MEGARAID_MAILBOX=m +CONFIG_MEGARAID_LEGACY=m +CONFIG_MEGARAID_SAS=m +CONFIG_SCSI_SATA=m +CONFIG_SCSI_SATA_AHCI=m +CONFIG_SCSI_SATA_SVW=m +CONFIG_SCSI_ATA_PIIX=m +CONFIG_SCSI_SATA_MV=m +CONFIG_SCSI_SATA_NV=m +CONFIG_SCSI_PDC_ADMA=m +CONFIG_SCSI_SATA_QSTOR=m +CONFIG_SCSI_SATA_PROMISE=m +CONFIG_SCSI_SATA_SX4=m +CONFIG_SCSI_SATA_SIL=m +CONFIG_SCSI_SATA_SIL24=m +CONFIG_SCSI_SATA_SIS=m +CONFIG_SCSI_SATA_ULI=m +CONFIG_SCSI_SATA_VIA=m +CONFIG_SCSI_SATA_VITESSE=m +CONFIG_SCSI_SATA_INTEL_COMBINED=y +CONFIG_SCSI_BUSLOGIC=m +# CONFIG_SCSI_OMIT_FLASHPOINT is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_EATA is not set +CONFIG_SCSI_FUTURE_DOMAIN=m +CONFIG_SCSI_GDTH=m +CONFIG_SCSI_IPS=m +CONFIG_SCSI_INITIO=m +CONFIG_SCSI_INIA100=m +CONFIG_SCSI_SYM53C8XX_2=m +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 +CONFIG_SCSI_SYM53C8XX_MMIO=y +# CONFIG_SCSI_IPR is not set +CONFIG_SCSI_QLOGIC_1280=m +CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m +CONFIG_SCSI_LPFC=m +CONFIG_SCSI_DC395x=m +CONFIG_SCSI_DC390T=m +# CONFIG_SCSI_NSP32 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 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_RAID6 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set + +# +# Fusion MPT device support +# +CONFIG_FUSION=y +CONFIG_FUSION_SPI=m +CONFIG_FUSION_FC=m +CONFIG_FUSION_SAS=m +CONFIG_FUSION_MAX_SGE=40 +CONFIG_FUSION_CTL=m + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set + +# +# PHY device support +# +CONFIG_PHYLIB=m + +# +# MII PHY device drivers +# +CONFIG_MARVELL_PHY=m +CONFIG_DAVICOM_PHY=m +CONFIG_QSEMI_PHY=m +CONFIG_LXT_PHY=m +CONFIG_CICADA_PHY=m + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=m +CONFIG_HAPPYMEAL=m +CONFIG_SUNGEM=m +CONFIG_CASSINI=m +CONFIG_NET_VENDOR_3COM=y +CONFIG_VORTEX=m +CONFIG_TYPHOON=m + +# +# Tulip family network device support +# +CONFIG_NET_TULIP=y +CONFIG_DE2104X=m +CONFIG_TULIP=m +# CONFIG_TULIP_MWI is not set +CONFIG_TULIP_MMIO=y +# CONFIG_TULIP_NAPI is not set +CONFIG_DE4X5=m +CONFIG_WINBOND_840=m +CONFIG_DM9102=m +CONFIG_ULI526X=m +CONFIG_HP100=m +CONFIG_NET_PCI=y +CONFIG_PCNET32=m +CONFIG_AMD8111_ETH=m +CONFIG_AMD8111E_NAPI=y +CONFIG_ADAPTEC_STARFIRE=m +CONFIG_ADAPTEC_STARFIRE_NAPI=y +CONFIG_B44=m +CONFIG_FORCEDETH=m +CONFIG_DGRS=m +CONFIG_EEPRO100=m +CONFIG_E100=m +CONFIG_FEALNX=m +CONFIG_NATSEMI=m +CONFIG_NE2K_PCI=m +CONFIG_8139CP=m +CONFIG_8139TOO=m +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +CONFIG_8139TOO_8129=y +# CONFIG_8139_OLD_RX_RESET is not set +CONFIG_SIS900=m +CONFIG_EPIC100=m +CONFIG_SUNDANCE=m +# CONFIG_SUNDANCE_MMIO is not set +CONFIG_TLAN=m +CONFIG_VIA_RHINE=m +CONFIG_VIA_RHINE_MMIO=y + +# +# Ethernet (1000 Mbit) +# +CONFIG_ACENIC=m +# CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_DL2K=m +CONFIG_E1000=m +CONFIG_E1000_NAPI=y +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set +CONFIG_NS83820=m +CONFIG_HAMACHI=m +CONFIG_YELLOWFIN=m +CONFIG_R8169=m +CONFIG_R8169_NAPI=y +# CONFIG_R8169_VLAN is not set +CONFIG_SIS190=m +CONFIG_SKGE=m +CONFIG_SKY2=m +CONFIG_SK98LIN=m +CONFIG_VIA_VELOCITY=m +CONFIG_TIGON3=m +CONFIG_BNX2=m +# CONFIG_BCM5700 is not set + +# +# Ethernet (10000 Mbit) +# +CONFIG_CHELSIO_T1=m +CONFIG_IXGB=m +CONFIG_IXGB_NAPI=y +CONFIG_S2IO=m +CONFIG_S2IO_NAPI=y + +# +# Token Ring devices +# +# CONFIG_TR is not set + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set + +# +# Wireless 802.11b ISA/PCI cards support +# +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW_QOS=y +# CONFIG_IPW2200_DEBUG is not set +CONFIG_AIRO=m +CONFIG_HERMES=m +CONFIG_PLX_HERMES=m +CONFIG_TMD_HERMES=m +CONFIG_NORTEL_HERMES=m +CONFIG_PCI_HERMES=m +CONFIG_ATMEL=m +CONFIG_PCI_ATMEL=m + +# +# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support +# +CONFIG_PRISM54=m +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAP_PCI=m +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_PIO=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +# CONFIG_BCM43XX_PIO_MODE is not set +CONFIG_NET_WIRELESS=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN 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 is not set +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 is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD 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_SERIAL is not set +# CONFIG_MOUSE_VSXXXAA 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_WISTRON_BTNS is not set +# CONFIG_INPUT_UINPUT is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# 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_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_CRASH is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_GEN_RTC is not set +# 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 +# +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_MWAVE is not set +# CONFIG_CS5535_GPIO is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +CONFIG_HANGCHECK_TIMER=y + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Misc devices +# +# CONFIG_IBM_ASM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +CONFIG_VIDEO_V4L2=y + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set +# CONFIG_USB_DABUSB is not set + +# +# Graphics support +# +# CONFIG_FB is not set +CONFIG_VIDEO_SELECT=y + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 +CONFIG_DUMMY_CONSOLE=y + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=m +CONFIG_USB_EHCI_SPLIT_ISO=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_ISP116X_HCD=m +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_SL811_HCD=m + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_LIBUSUAL=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +# CONFIG_USB_HIDDEV is not set +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_ACECAD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_YEALINK is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_APPLETOUCH is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +CONFIG_USB_NET_RNDIS_HOST=m +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +CONFIG_USB_ZD1201=m +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGETKIT is not set +# CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TEST is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=m +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=m +CONFIG_MMC_SDHCI=m +CONFIG_MMC_WBSD=m + +# +# LED devices +# +# CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# +# CONFIG_EDAC is not set + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_INOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_VMCORE=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_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_SQUASHFS 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# 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_ASCII=y +CONFIG_NLS_ISO8859_1=m +# 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=m + +# +# Instrumentation Support +# +CONFIG_PROFILING=y +CONFIG_OPROFILE=m +CONFIG_KPROBES=y + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHEDSTATS=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_HIGHMEM=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_VM=y +# CONFIG_FRAME_POINTER is not set +CONFIG_UNWIND_INFO=y +# CONFIG_FORCED_INLINING is not set +CONFIG_BOOT_DELAY=y +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_EARLY_PRINTK=y +CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_DEBUG_RODATA=y +CONFIG_4KSTACKS=y +CONFIG_X86_FIND_SMP_CONFIG=y +CONFIG_X86_MPPARSE=y +CONFIG_DOUBLEFAULT=y + +# +# Linux VServer +# +CONFIG_VSERVER_FILESHARING=y +CONFIG_VSERVER_LEGACY=y +# CONFIG_VSERVER_LEGACY_VERSION is not set +# CONFIG_VSERVER_NGNET is not set +# CONFIG_VSERVER_PROC_SECURE is not set +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_HARDCPU_IDLE=y +CONFIG_VSERVER_ACB_SCHED=y +# CONFIG_INOXID_NONE is not set +# CONFIG_INOXID_UID16 is not set +# CONFIG_INOXID_GID16 is not set +CONFIG_INOXID_UGID24=y +# CONFIG_INOXID_INTERN is not set +# CONFIG_INOXID_RUNTIME is not set +# CONFIG_XID_TAG_NFSD is not set +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_LEGACYNET=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_SIGNATURE is not set +# CONFIG_CRYPTO_MPILIB is not set + +# +# Hardware crypto devices +# +# CONFIG_CRYPTO_DEV_PADLOCK is not set + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_X86_SMP=y +CONFIG_X86_HT=y +CONFIG_X86_BIOS_REBOOT=y +CONFIG_X86_TRAMPOLINE=y +CONFIG_KTIME_SCALAR=y diff --git a/configs/kernel-2.6.18-i686-smp.config b/configs/kernel-2.6.17-i686-smp.config similarity index 91% rename from configs/kernel-2.6.18-i686-smp.config rename to configs/kernel-2.6.17-i686-smp.config index 00cc6b483..1be197713 100644 --- a/configs/kernel-2.6.18-i686-smp.config +++ b/configs/kernel-2.6.17-i686-smp.config @@ -1,13 +1,9 @@ -# i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:40 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:13 2006 # CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -16,7 +12,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -35,18 +30,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -59,11 +53,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -78,12 +71,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -109,7 +96,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_SMP=y # CONFIG_X86_PC is not set -# CONFIG_X86_XEN is not set # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set @@ -167,19 +153,16 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y # CONFIG_X86_MCE_NONFATAL is not set CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y CONFIG_TOSHIBA=m CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set CONFIG_MICROCODE=m CONFIG_X86_MSR=m CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set # # Firmware Drivers @@ -203,7 +186,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y @@ -220,15 +202,15 @@ CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x400000 CONFIG_HOTPLUG_CPU=y -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options (ACPI, APM) # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y +CONFIG_SOFTWARE_SUSPEND=y +CONFIG_PM_STD_PARTITION="" CONFIG_SUSPEND_SMP=y # @@ -244,12 +226,12 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=1999 # CONFIG_ACPI_DEBUG is not set @@ -258,7 +240,6 @@ CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m # # APM (Advanced Power Management) BIOS Support @@ -306,7 +287,6 @@ CONFIG_X86_SPEEDSTEP_SMI=y CONFIG_X86_P4_CLOCKMOD=m # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -322,7 +302,6 @@ CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y @@ -337,7 +316,6 @@ CONFIG_ISA=y # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set -CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -425,25 +403,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -487,10 +450,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -507,8 +467,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -524,11 +482,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -538,7 +494,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -549,7 +504,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -580,7 +534,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -693,7 +646,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -701,6 +654,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -750,14 +704,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -765,7 +713,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -828,7 +775,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -884,13 +830,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -978,22 +922,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -1012,7 +955,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1078,7 +1020,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1099,7 +1040,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1129,7 +1070,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1146,7 +1087,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1229,7 +1170,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1268,6 +1208,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1301,8 +1247,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1372,7 +1319,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1397,11 +1343,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1421,10 +1362,7 @@ CONFIG_EL3=m CONFIG_VORTEX=m CONFIG_TYPHOON=m # CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -CONFIG_ULTRA=m -# CONFIG_SMC9194 is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -1443,7 +1381,7 @@ CONFIG_ULI526X=m CONFIG_PCMCIA_XIRCOM=m # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_ISA=y # CONFIG_E2100 is not set CONFIG_EWRK3=m @@ -1467,7 +1405,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1486,7 +1424,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1523,7 +1460,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1564,9 +1500,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1590,7 +1524,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1604,8 +1537,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1913,7 +1844,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1926,12 +1857,10 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set @@ -1939,7 +1868,7 @@ CONFIG_CYCLADES=m # CONFIG_ISI is not set CONFIG_SYNCLINK=m CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1971,7 +1900,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -2039,11 +1968,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -2080,12 +2005,10 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y @@ -2096,11 +2019,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -2130,7 +2049,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2170,13 +2088,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2185,14 +2103,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2221,12 +2137,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2245,7 +2159,7 @@ CONFIG_IBM_ASM=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2277,7 +2191,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_MEYE=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m @@ -2290,19 +2203,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2312,26 +2223,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2350,7 +2255,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2382,7 +2286,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2455,20 +2358,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2483,13 +2379,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2500,11 +2395,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2549,7 +2443,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -2670,18 +2563,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2689,7 +2570,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2755,7 +2635,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2795,7 +2674,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2845,6 +2724,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2858,6 +2738,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2896,7 +2777,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2914,12 +2794,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2951,8 +2829,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2961,10 +2838,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2972,14 +2845,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2996,7 +2867,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -3012,38 +2882,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -3074,16 +2922,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -3093,11 +2940,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -3107,8 +2949,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -3148,7 +2988,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -3163,8 +3002,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -3173,7 +3010,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3190,13 +3026,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3287,40 +3122,35 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 + +# +# Page alloc debug is incompatible with Software Suspend on i386 +# CONFIG_DEBUG_RODATA=y CONFIG_4KSTACKS=y CONFIG_X86_FIND_SMP_CONFIG=y @@ -3334,7 +3164,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3345,8 +3175,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3355,7 +3183,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3394,16 +3222,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y diff --git a/configs/kernel-2.6.17-i686-uml-planetlab.config b/configs/kernel-2.6.17-i686-uml-planetlab.config new file mode 100644 index 000000000..0063aa478 --- /dev/null +++ b/configs/kernel-2.6.17-i686-uml-planetlab.config @@ -0,0 +1,785 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.17-1.2142_FC4-1.planetlab +# Mon Aug 21 16:42:30 2006 +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_UML=y +CONFIG_MMU=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQ_RELEASE_METHOD=y + +# +# UML-specific options +# +# CONFIG_MODE_TT is not set +# CONFIG_STATIC_LINK is not set +CONFIG_MODE_SKAS=y + +# +# Host processor type and features +# +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +CONFIG_M686=y +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_X86_GENERIC is not set +CONFIG_X86_CMPXCHG=y +CONFIG_X86_XADD=y +CONFIG_X86_L1_CACHE_SHIFT=5 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_GOOD_APIC=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_UML_X86=y +# CONFIG_64BIT is not set +CONFIG_SEMAPHORE_SLEEPERS=y +# CONFIG_HOST_2G_2G is not set +CONFIG_TOP_ADDR=0xc0000000 +CONFIG_3_LEVEL_PGTABLES=y +CONFIG_STUB_CODE=0xbfffe000 +CONFIG_STUB_DATA=0xbffff000 +CONFIG_STUB_START=0xbfffe000 +CONFIG_ARCH_HAS_SC_SIGNALS=y +CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +CONFIG_LD_SCRIPT_DYN=y +CONFIG_NET=y +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=m +CONFIG_HOSTFS=y +# CONFIG_HPPFS is not set +CONFIG_MCONSOLE=y +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_NEST_LEVEL=0 +# CONFIG_HIGHMEM is not set +CONFIG_KERNEL_STACK_ORDER=2 +CONFIG_UML_REAL_TIME_CLOCK=y +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_OOM_PANIC=y +CONFIG_RELAY=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_LBD=y +CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_LSF=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" + +# +# Block devices +# +# CONFIG_BLK_DEV_UBD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_MMAPPER is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_VROOT is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +CONFIG_BLK_DEV_INITRD=y +CONFIG_ATA_OVER_ETH=m + +# +# Character Devices +# +CONFIG_STDERR_CONSOLE=y +CONFIG_STDIO_CONSOLE=y +# CONFIG_SSL is not set +# CONFIG_NULL_CHAN is not set +# CONFIG_PORT_CHAN is not set +# CONFIG_PTY_CHAN is not set +# CONFIG_TTY_CHAN is not set +# CONFIG_XTERM_CHAN is not set +CONFIG_NOCONFIG_CHAN=y +CONFIG_CON_ZERO_CHAN="fd:0,fd:1" +CONFIG_CON_CHAN="xterm" +CONFIG_SSL_CHAN="pty" +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_WATCHDOG is not set +# CONFIG_UML_SOUND is not set +# CONFIG_SOUND is not set +# CONFIG_HOSTAUDIO is not set +# CONFIG_UML_RANDOM is not set + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set + +# +# Networking +# + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_FWMARK is not set +# CONFIG_IP_ROUTE_MULTIPATH is not set +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +CONFIG_NET_IPGRE=m +# CONFIG_ARPD 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 +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_BIC=y + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +CONFIG_ICMP_IPOD=y +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_XTABLES=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=m +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CONNTRACK_EVENTS=y +CONFIG_IP_NF_CONNTRACK_NETLINK=m +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_NETBIOS_NS=m +CONFIG_IP_NF_TFTP=m +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_DSCP=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_NAT_SNMP_BASIC=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_TFTP=m +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_DSCP=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_IPPORTHASH=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_TARGET_SET=m +CONFIG_VNET=m + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +CONFIG_VLAN_8021Q=m +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CLK_JIFFIES=y +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +# CONFIG_NET_SCH_CLK_CPU is not set + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +CONFIG_NET_SCH_HTB=m +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set +# CONFIG_NET_SCH_INGRESS is not set + +# +# Classification +# +CONFIG_NET_CLS=y +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +# CONFIG_NET_CLS_U32 is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +# CONFIG_NET_CLS_POLICE is not set +# CONFIG_NET_CLS_IND is not set +# CONFIG_NET_ESTIMATOR is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +CONFIG_IEEE80211=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_SOFTMAC=m +CONFIG_IEEE80211_SOFTMAC_DEBUG=y +# CONFIG_TUX is not set +CONFIG_WIRELESS_EXT=y + +# +# UML Network Devices +# +# CONFIG_UML_NET is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m + +# +# PHY device support +# + +# +# Wireless LAN (non-hamradio) +# +CONFIG_NET_RADIO=y +CONFIG_NET_WIRELESS_RTNETLINK=y + +# +# Obsolete Wireless cards support (pre-802.11) +# +# CONFIG_STRIP is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y + +# +# Wan interfaces +# +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +CONFIG_CONNECTOR=m + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_INOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_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_SQUASHFS 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=m +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_DIRECTIO=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# 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_ASCII=y +CONFIG_NLS_ISO8859_1=m +# 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=m + +# +# Linux VServer +# +CONFIG_VSERVER_FILESHARING=y +CONFIG_VSERVER_LEGACY=y +# CONFIG_VSERVER_LEGACY_VERSION is not set +# CONFIG_VSERVER_NGNET is not set +# CONFIG_VSERVER_PROC_SECURE is not set +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_HARDCPU_IDLE=y +CONFIG_VSERVER_ACB_SCHED=y +# CONFIG_INOXID_NONE is not set +# CONFIG_INOXID_UID16 is not set +# CONFIG_INOXID_GID16 is not set +CONFIG_INOXID_UGID24=y +# CONFIG_INOXID_INTERN is not set +# CONFIG_INOXID_RUNTIME is not set +# CONFIG_XID_TAG_NFSD is not set +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_LEGACYNET=y + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_SIGNATURE is not set +# CONFIG_CRYPTO_MPILIB is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m + +# +# Multi-device support (RAID and LVM) +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_LINEAR=y +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_RAID6 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_MD_FAULTY is not set +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_INPUT is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHEDSTATS=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_VM=y +# CONFIG_FRAME_POINTER is not set +CONFIG_UNWIND_INFO=y +# CONFIG_FORCED_INLINING is not set +CONFIG_BOOT_DELAY=y +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_GPROF is not set +# CONFIG_GCOV is not set +# CONFIG_SYSCALL_DEBUG is not set diff --git a/configs/kernel-2.6.18-i686-xen.config b/configs/kernel-2.6.17-i686-xen.config similarity index 90% rename from configs/kernel-2.6.18-i686-xen.config rename to configs/kernel-2.6.17-i686-xen.config index b6af8017a..99618a3a2 100644 --- a/configs/kernel-2.6.18-i686-xen.config +++ b/configs/kernel-2.6.17-i686-xen.config @@ -1,12 +1,10 @@ # i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:40 2006 +# Linux kernel version: 2.6.17.13 +# Wed Oct 18 17:15:52 2006 # CONFIG_X86_32=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -15,7 +13,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -34,18 +31,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,11 +54,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -77,12 +72,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -154,15 +143,14 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y CONFIG_NR_CPUS=32 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y -CONFIG_VM86=y CONFIG_TOSHIBA=m CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set @@ -189,9 +177,8 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_MTRR=y -CONFIG_REGPARM=y +# CONFIG_REGPARM is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y @@ -217,12 +204,12 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=1999 # CONFIG_ACPI_DEBUG is not set @@ -230,7 +217,6 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m # # CPU Frequency scaling @@ -253,8 +239,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m # CONFIG_X86_ACPI_CPUFREQ=m # CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y +# CONFIG_X86_POWERNOW_K7 is not set CONFIG_X86_POWERNOW_K8=y CONFIG_X86_POWERNOW_K8_ACPI=y # CONFIG_X86_GX_SUSPMOD is not set @@ -263,10 +248,9 @@ CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m +# CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -289,12 +273,9 @@ CONFIG_PCI_MMCONFIG=y CONFIG_XEN_PCIDEV_FRONTEND=y # CONFIG_XEN_PCIDEV_FE_DEBUG is not set CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set # CONFIG_PCI_DEBUG is not set CONFIG_ISA_DMA_API=y # CONFIG_SCx200 is not set -CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -322,12 +303,7 @@ CONFIG_PCCARD_NONSTATIC=y # # PCI Hotplug Support # -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -376,25 +352,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -438,10 +399,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -458,8 +416,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -475,11 +431,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -489,7 +443,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -500,7 +453,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -531,7 +483,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -644,12 +595,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -699,14 +651,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -714,7 +660,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -772,12 +717,11 @@ CONFIG_USB_IRDA=m CONFIG_SIGMATEL_FIR=m CONFIG_NSC_FIR=m CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m +# CONFIG_TOSHIBA_FIR is not set CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -833,13 +777,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -927,21 +869,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -960,7 +902,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -977,7 +918,7 @@ CONFIG_PNPACPI=y # # Block devices # -CONFIG_BLK_DEV_FD=m +# CONFIG_BLK_DEV_FD is not set CONFIG_PARIDE=m CONFIG_PARIDE_PARPORT=m @@ -1023,7 +964,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1044,7 +984,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1074,7 +1014,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1091,7 +1031,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1169,7 +1109,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1201,6 +1140,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC390T=m @@ -1225,8 +1170,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1296,7 +1242,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1321,11 +1266,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1353,16 +1293,16 @@ CONFIG_WINBOND_840=m CONFIG_DM9102=m CONFIG_ULI526X=m CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_PCI=y CONFIG_PCNET32=m CONFIG_AMD8111_ETH=m CONFIG_AMD8111E_NAPI=y CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m +# CONFIG_B44 is not set CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1381,7 +1321,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1418,7 +1357,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1455,9 +1393,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1481,7 +1417,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1495,8 +1430,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1798,19 +1731,17 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1836,7 +1767,7 @@ CONFIG_SERIAL_8250_RSA=y # Non-8250 serial port support # CONFIG_SERIAL_CORE=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -1853,7 +1784,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m +# CONFIG_IPMI_POWEROFF is not set # # Watchdog Cards @@ -1897,11 +1828,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1938,12 +1865,10 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y @@ -1984,7 +1909,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2024,13 +1948,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2039,14 +1963,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2075,12 +1997,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2099,7 +2019,7 @@ CONFIG_IBM_ASM=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2130,7 +2050,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_MEYE=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m @@ -2143,19 +2062,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2165,26 +2082,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2192,7 +2103,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2224,7 +2134,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2297,20 +2206,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2325,13 +2227,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2342,10 +2243,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2390,7 +2291,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -2474,18 +2374,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2559,7 +2447,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2599,7 +2486,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2649,6 +2536,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2662,6 +2550,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2700,7 +2589,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2718,12 +2606,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2750,13 +2636,12 @@ CONFIG_MMC=m # CONFIG_MMC_DEBUG is not set CONFIG_MMC_BLOCK=m CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m +# CONFIG_MMC_WBSD is not set # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2765,10 +2650,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2776,14 +2657,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2800,7 +2679,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -2816,38 +2694,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2878,16 +2734,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2897,11 +2752,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2911,8 +2761,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2951,7 +2799,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2966,8 +2813,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2976,7 +2821,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2996,10 +2840,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3085,48 +2927,39 @@ CONFIG_NLS_UTF8=m # CONFIG_PROFILING=y CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y +# CONFIG_UNWIND_INFO is not set # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_STACK_BACKTRACE_COLS=2 # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_RODATA=y -CONFIG_4KSTACKS=y +# CONFIG_DEBUG_RODATA is not set +# CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y @@ -3137,7 +2970,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3148,8 +2981,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3158,7 +2989,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3190,7 +3021,7 @@ CONFIG_CRYPTO_MPILIB=y CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK_AES=y CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 +CONFIG_XEN_INTERFACE_VERSION=0x00030202 # # XEN @@ -3201,7 +3032,7 @@ CONFIG_XEN_PRIVCMD=y CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_BACKEND=y CONFIG_XEN_BLKDEV_BACKEND=m -CONFIG_XEN_BLKDEV_TAP=m +# CONFIG_XEN_BLKDEV_TAP is not set CONFIG_XEN_NETDEV_BACKEND=m # CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set CONFIG_XEN_NETDEV_LOOPBACK=m @@ -3213,8 +3044,6 @@ CONFIG_XEN_PCIDEV_BACKEND_VPCI=y # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y CONFIG_XEN_SCRUB_PAGES=y # CONFIG_XEN_DISABLE_SERIAL is not set CONFIG_XEN_SYSFS=y @@ -3239,16 +3068,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y diff --git a/configs/kernel-2.6.18-i686-xen0.config b/configs/kernel-2.6.17-i686-xen0.config similarity index 90% rename from configs/kernel-2.6.18-i686-xen0.config rename to configs/kernel-2.6.17-i686-xen0.config index c6fe1ef9d..22a740c67 100644 --- a/configs/kernel-2.6.18-i686-xen0.config +++ b/configs/kernel-2.6.17-i686-xen0.config @@ -1,12 +1,10 @@ # i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:40 2006 +# Linux kernel version: 2.6.17.13 +# Wed Oct 18 17:15:53 2006 # CONFIG_X86_32=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -15,7 +13,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -34,18 +31,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,11 +54,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -77,12 +72,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -154,15 +143,14 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y CONFIG_NR_CPUS=32 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y -CONFIG_VM86=y CONFIG_TOSHIBA=m CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set @@ -188,9 +176,8 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_MTRR=y -CONFIG_REGPARM=y +# CONFIG_REGPARM is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y @@ -216,12 +203,12 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=1999 # CONFIG_ACPI_DEBUG is not set @@ -229,7 +216,6 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m # # CPU Frequency scaling @@ -252,8 +238,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m # CONFIG_X86_ACPI_CPUFREQ=m # CONFIG_X86_POWERNOW_K6 is not set -CONFIG_X86_POWERNOW_K7=y -CONFIG_X86_POWERNOW_K7_ACPI=y +# CONFIG_X86_POWERNOW_K7 is not set CONFIG_X86_POWERNOW_K8=y CONFIG_X86_POWERNOW_K8_ACPI=y # CONFIG_X86_GX_SUSPMOD is not set @@ -262,10 +247,9 @@ CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y CONFIG_X86_SPEEDSTEP_ICH=y CONFIG_X86_SPEEDSTEP_SMI=y -CONFIG_X86_P4_CLOCKMOD=m +# CONFIG_X86_P4_CLOCKMOD is not set # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -288,12 +272,9 @@ CONFIG_PCI_MMCONFIG=y CONFIG_XEN_PCIDEV_FRONTEND=y # CONFIG_XEN_PCIDEV_FE_DEBUG is not set CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set # CONFIG_PCI_DEBUG is not set CONFIG_ISA_DMA_API=y # CONFIG_SCx200 is not set -CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -321,12 +302,7 @@ CONFIG_PCCARD_NONSTATIC=y # # PCI Hotplug Support # -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -# CONFIG_HOTPLUG_PCI_SHPC is not set +# CONFIG_HOTPLUG_PCI is not set # # Executable file formats @@ -375,25 +351,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -437,10 +398,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -457,8 +415,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -474,11 +430,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -488,7 +442,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -499,7 +452,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -530,7 +482,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -643,12 +594,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -698,14 +650,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -713,7 +659,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -771,12 +716,11 @@ CONFIG_USB_IRDA=m CONFIG_SIGMATEL_FIR=m CONFIG_NSC_FIR=m CONFIG_WINBOND_FIR=m -CONFIG_TOSHIBA_FIR=m +# CONFIG_TOSHIBA_FIR is not set CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -832,13 +776,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -926,21 +868,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -959,7 +901,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -976,7 +917,7 @@ CONFIG_PNPACPI=y # # Block devices # -CONFIG_BLK_DEV_FD=m +# CONFIG_BLK_DEV_FD is not set CONFIG_PARIDE=m CONFIG_PARIDE_PARPORT=m @@ -1022,7 +963,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1043,7 +983,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1073,7 +1013,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1090,7 +1030,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1168,7 +1108,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1200,6 +1139,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC390T=m @@ -1224,8 +1169,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1294,7 +1240,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1319,11 +1264,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1351,16 +1291,16 @@ CONFIG_WINBOND_840=m CONFIG_DM9102=m CONFIG_ULI526X=m CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_PCI=y CONFIG_PCNET32=m CONFIG_AMD8111_ETH=m CONFIG_AMD8111E_NAPI=y CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m +# CONFIG_B44 is not set CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1379,7 +1319,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1416,7 +1355,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1453,9 +1391,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1479,7 +1415,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1493,8 +1428,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1796,19 +1729,17 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1834,7 +1765,7 @@ CONFIG_SERIAL_8250_RSA=y # Non-8250 serial port support # CONFIG_SERIAL_CORE=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -1851,7 +1782,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m +# CONFIG_IPMI_POWEROFF is not set # # Watchdog Cards @@ -1895,11 +1826,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1936,12 +1863,10 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y @@ -1982,7 +1907,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2022,13 +1946,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2037,14 +1961,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2073,12 +1995,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2097,7 +2017,7 @@ CONFIG_IBM_ASM=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2128,7 +2048,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_MEYE=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m @@ -2141,19 +2060,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2163,26 +2080,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2190,7 +2101,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2222,7 +2132,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2295,20 +2204,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2323,13 +2225,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2340,10 +2241,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2388,7 +2289,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -2472,18 +2372,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2557,7 +2445,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2597,7 +2484,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2647,6 +2534,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2660,6 +2548,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2698,7 +2587,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2716,12 +2604,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2748,13 +2634,12 @@ CONFIG_MMC=m # CONFIG_MMC_DEBUG is not set CONFIG_MMC_BLOCK=m CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m +# CONFIG_MMC_WBSD is not set # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2763,10 +2648,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2774,14 +2655,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2798,7 +2677,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -2814,38 +2692,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2876,16 +2732,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2895,11 +2750,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2909,8 +2759,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2949,7 +2797,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2964,8 +2811,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2974,7 +2819,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2994,10 +2838,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3083,48 +2925,39 @@ CONFIG_NLS_UTF8=m # CONFIG_PROFILING=y CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y +# CONFIG_UNWIND_INFO is not set # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_STACK_BACKTRACE_COLS=2 # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_RODATA=y -CONFIG_4KSTACKS=y +# CONFIG_DEBUG_RODATA is not set +# CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y @@ -3135,7 +2968,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3146,8 +2979,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3156,7 +2987,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3188,7 +3019,7 @@ CONFIG_CRYPTO_MPILIB=y CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK_AES=y CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 +CONFIG_XEN_INTERFACE_VERSION=0x00030202 # # XEN @@ -3199,7 +3030,7 @@ CONFIG_XEN_PRIVCMD=y CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_BACKEND=y CONFIG_XEN_BLKDEV_BACKEND=y -CONFIG_XEN_BLKDEV_TAP=m +# CONFIG_XEN_BLKDEV_TAP is not set CONFIG_XEN_NETDEV_BACKEND=y # CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set CONFIG_XEN_NETDEV_LOOPBACK=y @@ -3211,8 +3042,6 @@ CONFIG_XEN_PCIDEV_BACKEND_VPCI=y # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y CONFIG_XEN_SCRUB_PAGES=y # CONFIG_XEN_DISABLE_SERIAL is not set CONFIG_XEN_SYSFS=y @@ -3237,16 +3066,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y diff --git a/configs/kernel-2.6.18-x86_64-xenU.config b/configs/kernel-2.6.17-i686-xenU-planetlab.config similarity index 87% rename from configs/kernel-2.6.18-x86_64-xenU.config rename to configs/kernel-2.6.17-i686-xenU-planetlab.config index 78ffb6490..5b77fd4cb 100644 --- a/configs/kernel-2.6.18-x86_64-xenU.config +++ b/configs/kernel-2.6.17-i686-xenU-planetlab.config @@ -1,26 +1,17 @@ -# x86_64 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:43 2006 +# Linux kernel version: 2.6.17-1.2187_FC5 +# Wed Nov 8 11:14:13 2006 # -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y +CONFIG_X86_32=y CONFIG_SEMAPHORE_SLEEPERS=y +CONFIG_X86=y CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -39,18 +30,18 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set +CONFIG_OOM_PANIC=y CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -63,8 +54,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -82,12 +71,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -111,28 +94,76 @@ CONFIG_DEFAULT_IOSCHED="cfq" # # Processor type and features # -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set +CONFIG_SMP=y +# CONFIG_X86_PC is not set +CONFIG_X86_XEN=y +# CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_NUMAQ is not set +# CONFIG_X86_SUMMIT is not set +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_VISWS is not set +# CONFIG_X86_GENERICARCH is not set +# CONFIG_X86_ES7000 is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +CONFIG_M686=y +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set # CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_64_XEN=y -CONFIG_X86_NO_TSS=y -CONFIG_X86_NO_IDT=y -CONFIG_X86_L1_CACHE_BYTES=128 +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP2 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +CONFIG_X86_GENERIC=y +CONFIG_X86_CMPXCHG=y +CONFIG_X86_XADD=y CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_X86_PPRO_FENCE=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_CMPXCHG64=y CONFIG_X86_GOOD_APIC=y -# CONFIG_MICROCODE is not set -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_XEN_GENAPIC=y -CONFIG_SMP=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_NR_CPUS=32 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y -CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_TOSHIBA is not set +CONFIG_I8K=m +# CONFIG_X86_REBOOTFIXUPS is not set +CONFIG_X86_CPUID=m +CONFIG_SWIOTLB=y + +# +# Firmware Drivers +# +CONFIG_DELL_RBU=m +CONFIG_DCDBAS=m +# CONFIG_NOHIGHMEM is not set +CONFIG_HIGHMEM4G=y +# CONFIG_HIGHMEM64G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_HIGHMEM=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set @@ -141,28 +172,23 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_NR_CPUS=8 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_SWIOTLB=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x200000 +# CONFIG_REGPARM is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 -CONFIG_REORDER=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y +# CONFIG_CRASH_DUMP is not set +CONFIG_PHYSICAL_START=0x400000 +CONFIG_HOTPLUG_CPU=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # -# Bus options (PCI etc.) +# Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set +CONFIG_ISA_DMA_API=y +# CONFIG_SCx200 is not set # # PCCARD (PCMCIA/CardBus) support @@ -180,14 +206,11 @@ CONFIG_PCCARD=y # # -# Executable file formats / Emulations +# Executable file formats # CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y # # Networking @@ -229,25 +252,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -282,6 +290,7 @@ CONFIG_IP_VS_NQ=m # IPVS application helper # CONFIG_IP_VS_FTP=m +# CONFIG_ICMP_IPOD is not set CONFIG_IPV6=m CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y @@ -291,10 +300,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -311,8 +317,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -328,11 +332,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -342,7 +344,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -353,7 +354,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -384,7 +384,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -395,6 +394,7 @@ CONFIG_IP_NF_RAW=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m +# CONFIG_IP_NF_SET is not set # # IPv6: Netfilter Configuration (EXPERIMENTAL) @@ -444,6 +444,7 @@ CONFIG_BRIDGE_EBT_REDIRECT=m CONFIG_BRIDGE_EBT_SNAT=m CONFIG_BRIDGE_EBT_LOG=m CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_VNET=m # # DCCP Configuration (EXPERIMENTAL) @@ -497,12 +498,13 @@ CONFIG_LLC=m CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -552,14 +554,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -567,7 +563,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -638,13 +633,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -663,15 +656,15 @@ CONFIG_PROC_EVENTS=y # # Block devices # -CONFIG_BLK_DEV_FD=m +# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_VROOT is not set CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -691,7 +684,7 @@ CONFIG_BLK_DEV_IDE=y # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -701,7 +694,8 @@ CONFIG_IDE_TASK_IOCTL=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y # CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set # CONFIG_IDEDMA_AUTO is not set @@ -756,11 +750,12 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m +CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_MIRROR=m @@ -785,7 +780,6 @@ CONFIG_DM_MULTIPATH_EMC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -918,6 +912,7 @@ CONFIG_TOUCHSCREEN_MTOUCH=m CONFIG_TOUCHSCREEN_MK712=m CONFIG_INPUT_MISC=y CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_WISTRON_BTNS=m CONFIG_INPUT_UINPUT=m # @@ -939,12 +934,10 @@ CONFIG_GAMEPORT_L4=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set @@ -975,7 +968,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m +# CONFIG_IPMI_POWEROFF is not set # # Watchdog Cards @@ -1003,7 +996,6 @@ CONFIG_W83877F_WDT=m CONFIG_W83977F_WDT=m CONFIG_MACHZ_WDT=m # CONFIG_SBC_EPX_C3_WATCHDOG is not set -CONFIG_HW_RANDOM=y CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1012,9 +1004,9 @@ CONFIG_R3964=m # # Ftape, the floppy tape device driver # +# CONFIG_AGP is not set # CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m +# CONFIG_CS5535_GPIO is not set # CONFIG_RAW_DRIVER is not set CONFIG_HANGCHECK_TIMER=m @@ -1064,18 +1056,18 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set # CONFIG_FB_MODE_HELPERS is not set CONFIG_FB_TILEBLITTING=y # CONFIG_FB_ARC is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set @@ -1086,7 +1078,6 @@ CONFIG_FB_VESA=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -1146,8 +1137,7 @@ CONFIG_SOUND=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -1156,10 +1146,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -1182,36 +1168,12 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# - -# -# Firmware Drivers -# -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m # # File systems @@ -1242,16 +1204,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -1261,11 +1222,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -1275,8 +1231,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -1320,8 +1274,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1330,7 +1282,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -1350,10 +1301,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1439,39 +1388,62 @@ CONFIG_NLS_UTF8=m # CONFIG_PROFILING=y CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_HIGHMEM=y +CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set +# CONFIG_UNWIND_INFO is not set # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -CONFIG_DEBUG_STACKOVERFLOW=y +CONFIG_EARLY_PRINTK=y +# CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_STACK_BACKTRACE_COLS=2 +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_4KSTACKS is not set + +# +# Linux VServer +# +CONFIG_VSERVER_FILESHARING=y +CONFIG_VSERVER_LEGACY=y +# CONFIG_VSERVER_LEGACY_VERSION is not set +# CONFIG_VSERVER_NGNET is not set +# CONFIG_VSERVER_PROC_SECURE is not set +CONFIG_VSERVER_HARDCPU=y +CONFIG_VSERVER_HARDCPU_IDLE=y +CONFIG_VSERVER_ACB_SCHED=y +# CONFIG_INOXID_NONE is not set +# CONFIG_INOXID_UID16 is not set +# CONFIG_INOXID_GID16 is not set +CONFIG_INOXID_UGID24=y +# CONFIG_INOXID_INTERN is not set +# CONFIG_INOXID_RUNTIME is not set +# CONFIG_XID_TAG_NFSD is not set +# CONFIG_VSERVER_DEBUG is not set +CONFIG_VSERVER=y +CONFIG_VSERVER_SECURITY=y +CONFIG_VSERVER_LEGACYNET=y # # Security options @@ -1480,7 +1452,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_SECLVL is not set CONFIG_SECURITY_SELINUX=y @@ -1490,8 +1462,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -1500,7 +1470,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -1511,7 +1481,7 @@ CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m +CONFIG_CRYPTO_AES_586=m CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_TEA=m @@ -1529,8 +1499,9 @@ CONFIG_CRYPTO_MPILIB=y # # Hardware crypto devices # +# CONFIG_CRYPTO_DEV_PADLOCK is not set CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 +CONFIG_XEN_INTERFACE_VERSION=0x00030202 # # XEN @@ -1541,13 +1512,11 @@ CONFIG_XEN_PRIVCMD=y CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_BACKEND=y # CONFIG_XEN_BLKDEV_BACKEND is not set -CONFIG_XEN_BLKDEV_TAP=m +# CONFIG_XEN_BLKDEV_TAP is not set # CONFIG_XEN_NETDEV_BACKEND is not set # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_BLKDEV_FRONTEND=y -CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y +CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DISABLE_SERIAL=y CONFIG_XEN_SYSFS=y @@ -1578,4 +1547,12 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_X86_SMP=y +CONFIG_X86_BIOS_REBOOT=y +CONFIG_X86_TRAMPOLINE=y +CONFIG_X86_NO_TSS=y +CONFIG_X86_NO_IDT=y +CONFIG_KTIME_SCALAR=y diff --git a/configs/kernel-2.6.18-i686-xenU.config b/configs/kernel-2.6.17-i686-xenU.config similarity index 89% rename from configs/kernel-2.6.18-i686-xenU.config rename to configs/kernel-2.6.17-i686-xenU.config index 309644b0c..99ec2fb88 100644 --- a/configs/kernel-2.6.18-i686-xenU.config +++ b/configs/kernel-2.6.17-i686-xenU.config @@ -1,12 +1,10 @@ # i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:40 2006 +# Linux kernel version: 2.6.17.13 +# Wed Oct 18 17:15:54 2006 # CONFIG_X86_32=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -15,7 +13,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -34,18 +31,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,8 +54,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -77,12 +71,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -154,12 +142,12 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y CONFIG_NR_CPUS=32 # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_PREEMPT_BKL=y -CONFIG_VM86=y # CONFIG_TOSHIBA is not set CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set @@ -184,8 +172,7 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_REGPARM=y +# CONFIG_REGPARM is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y @@ -265,25 +252,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -327,10 +299,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -347,8 +316,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -364,11 +331,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -378,7 +343,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -389,7 +353,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -420,7 +383,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -533,12 +495,13 @@ CONFIG_LLC=m CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -588,14 +551,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -603,7 +560,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -674,13 +630,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -699,7 +653,7 @@ CONFIG_PROC_EVENTS=y # # Block devices # -CONFIG_BLK_DEV_FD=m +# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m @@ -707,7 +661,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -727,7 +680,7 @@ CONFIG_BLK_DEV_IDE=y # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -793,8 +746,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -822,7 +776,6 @@ CONFIG_DM_MULTIPATH_EMC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -977,12 +930,10 @@ CONFIG_GAMEPORT_L4=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set @@ -1013,7 +964,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_SI=m CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m +# CONFIG_IPMI_POWEROFF is not set # # Watchdog Cards @@ -1041,8 +992,6 @@ CONFIG_W83877F_WDT=m CONFIG_W83977F_WDT=m CONFIG_MACHZ_WDT=m # CONFIG_SBC_EPX_C3_WATCHDOG is not set -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_VIA=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1051,9 +1000,8 @@ CONFIG_R3964=m # # Ftape, the floppy tape device driver # +# CONFIG_AGP is not set # CONFIG_MWAVE is not set -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m # CONFIG_CS5535_GPIO is not set # CONFIG_RAW_DRIVER is not set CONFIG_HANGCHECK_TIMER=m @@ -1104,18 +1052,18 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set # CONFIG_FB_MODE_HELPERS is not set CONFIG_FB_TILEBLITTING=y # CONFIG_FB_ARC is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set @@ -1126,7 +1074,6 @@ CONFIG_FB_VESA=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -1186,8 +1133,7 @@ CONFIG_SOUND=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -1196,10 +1142,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -1222,30 +1164,12 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# # # File systems @@ -1276,16 +1200,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -1295,11 +1218,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -1309,8 +1227,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -1354,8 +1270,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1364,7 +1278,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -1384,10 +1297,8 @@ CONFIG_RPCSEC_GSS_SPKM3=m # CONFIG_SMB_FS is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1473,48 +1384,39 @@ CONFIG_NLS_UTF8=m # CONFIG_PROFILING=y CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set -CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y +# CONFIG_UNWIND_INFO is not set # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_STACK_BACKTRACE_COLS=2 # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_RODATA=y -CONFIG_4KSTACKS=y +# CONFIG_DEBUG_RODATA is not set +# CONFIG_4KSTACKS is not set # # Security options @@ -1523,7 +1425,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_SECLVL is not set CONFIG_SECURITY_SELINUX=y @@ -1533,8 +1435,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -1543,7 +1443,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -1574,7 +1474,7 @@ CONFIG_CRYPTO_MPILIB=y # # CONFIG_CRYPTO_DEV_PADLOCK is not set CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 +CONFIG_XEN_INTERFACE_VERSION=0x00030202 # # XEN @@ -1585,13 +1485,11 @@ CONFIG_XEN_PRIVCMD=y CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_BACKEND=y # CONFIG_XEN_BLKDEV_BACKEND is not set -CONFIG_XEN_BLKDEV_TAP=m +# CONFIG_XEN_BLKDEV_TAP is not set # CONFIG_XEN_NETDEV_BACKEND is not set # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DISABLE_SERIAL=y CONFIG_XEN_SYSFS=y @@ -1616,14 +1514,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y diff --git a/configs/kernel-2.6.18-i686.config b/configs/kernel-2.6.17-i686.config similarity index 91% rename from configs/kernel-2.6.18-i686.config rename to configs/kernel-2.6.17-i686.config index 96690dc15..97dd34931 100644 --- a/configs/kernel-2.6.18-i686.config +++ b/configs/kernel-2.6.17-i686.config @@ -1,13 +1,9 @@ -# i386 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:41 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:12 2006 # CONFIG_X86_32=y -CONFIG_GENERIC_TIME=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y @@ -16,7 +12,6 @@ CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -35,17 +30,16 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -58,11 +52,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -76,12 +69,6 @@ CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set CONFIG_KMOD=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -107,7 +94,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" # # CONFIG_SMP is not set CONFIG_X86_PC=y -# CONFIG_X86_XEN is not set # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set @@ -162,19 +148,16 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_X86_UP_APIC=y CONFIG_X86_UP_IOAPIC=y CONFIG_X86_LOCAL_APIC=y -CONFIG_X86_APIC_AUTO=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y # CONFIG_X86_MCE_NONFATAL is not set CONFIG_X86_MCE_P4THERMAL=y -CONFIG_VM86=y CONFIG_TOSHIBA=m CONFIG_I8K=m # CONFIG_X86_REBOOTFIXUPS is not set CONFIG_MICROCODE=m CONFIG_X86_MSR=m CONFIG_X86_CPUID=m -# CONFIG_SWIOTLB is not set # # Firmware Drivers @@ -199,7 +182,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y @@ -214,15 +196,13 @@ CONFIG_HZ=250 CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x400000 -# CONFIG_COMPAT_VDSO is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options (ACPI, APM) # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" @@ -239,11 +219,11 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=1999 # CONFIG_ACPI_DEBUG is not set @@ -251,8 +231,7 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_SBS=m +# CONFIG_ACPI_CONTAINER is not set # # APM (Advanced Power Management) BIOS Support @@ -300,7 +279,6 @@ CONFIG_X86_SPEEDSTEP_SMI=y CONFIG_X86_P4_CLOCKMOD=m # CONFIG_X86_CPUFREQ_NFORCE2 is not set CONFIG_X86_LONGRUN=y -# CONFIG_X86_LONGHAUL is not set # # shared options @@ -316,7 +294,6 @@ CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set -# CONFIG_PCI_GOXEN_FE is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y @@ -331,7 +308,6 @@ CONFIG_ISA=y # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set -CONFIG_K8_NB=y # # PCCARD (PCMCIA/CardBus) support @@ -419,25 +395,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -481,10 +442,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -501,8 +459,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -518,11 +474,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -532,7 +486,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -543,7 +496,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -574,7 +526,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -687,7 +638,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -695,6 +646,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -744,14 +696,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -759,7 +705,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -824,7 +769,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -880,13 +824,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -974,22 +916,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_CS553X=m +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -1008,7 +949,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1074,7 +1014,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1095,7 +1034,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1125,7 +1064,7 @@ CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_CS5535=y @@ -1142,7 +1081,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1225,7 +1164,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1264,6 +1202,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1297,8 +1241,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1367,7 +1312,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1392,11 +1336,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1416,10 +1355,7 @@ CONFIG_EL3=m CONFIG_VORTEX=m CONFIG_TYPHOON=m # CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -CONFIG_ULTRA=m -# CONFIG_SMC9194 is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -1439,7 +1375,7 @@ CONFIG_PCMCIA_XIRCOM=m # CONFIG_PCMCIA_XIRTULIP is not set # CONFIG_AT1700 is not set # CONFIG_DEPCA is not set -# CONFIG_HP100 is not set +CONFIG_HP100=m CONFIG_NET_ISA=y # CONFIG_E2100 is not set CONFIG_EWRK3=m @@ -1463,7 +1399,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1482,7 +1418,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1519,7 +1454,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1560,9 +1494,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1586,7 +1518,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1600,8 +1531,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1912,7 +1841,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1925,12 +1854,10 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +CONFIG_ROCKETPORT=m +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set @@ -1938,7 +1865,7 @@ CONFIG_CYCLADES=m # CONFIG_ISI is not set CONFIG_SYNCLINK=m CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -1971,7 +1898,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -2039,11 +1966,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_GEODE=m -CONFIG_HW_RANDOM_VIA=m +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -2081,12 +2004,10 @@ CONFIG_DRM_SAVAGE=m # # PCMCIA character devices # -# CONFIG_SYNCLINK_CS is not set +CONFIG_SYNCLINK_CS=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m CONFIG_CS5535_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y @@ -2097,11 +2018,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -2132,7 +2049,6 @@ CONFIG_I2C_I810=m CONFIG_I2C_PIIX4=m CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -2172,13 +2088,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2187,14 +2103,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2223,12 +2137,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2247,7 +2159,7 @@ CONFIG_IBM_ASM=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2279,7 +2191,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_MEYE=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m @@ -2292,19 +2203,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2314,26 +2223,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2352,7 +2255,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2384,7 +2286,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2457,20 +2358,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2485,13 +2379,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2502,11 +2395,10 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y -# CONFIG_FB_IMAC is not set +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2551,7 +2443,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y # CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y @@ -2672,18 +2563,6 @@ CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y CONFIG_SND_CS5535AUDIO=m -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2691,7 +2570,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2757,7 +2635,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2797,7 +2674,7 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y CONFIG_HID_PID=y CONFIG_LOGITECH_FF=y @@ -2847,6 +2724,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2860,6 +2738,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2898,7 +2777,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2916,12 +2794,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2953,8 +2829,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2963,10 +2838,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2974,14 +2845,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2998,7 +2867,6 @@ CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82860=m -CONFIG_EDAC_K8=m CONFIG_EDAC_R82600=m CONFIG_EDAC_POLL=y @@ -3014,38 +2882,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -3076,16 +2922,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -3095,11 +2940,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -3109,8 +2949,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -3150,7 +2988,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -3165,8 +3002,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -3175,7 +3010,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3192,13 +3026,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3289,40 +3122,31 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y +CONFIG_STACK_BACKTRACE_COLS=2 # # Page alloc debug is incompatible with Software Suspend on i386 @@ -3340,7 +3164,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3351,8 +3175,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3361,7 +3183,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3400,16 +3222,12 @@ CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m -CONFIG_AUDIT_GENERIC=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_X86_BIOS_REBOOT=y diff --git a/configs/kernel-2.6.18-ia64.config b/configs/kernel-2.6.17-ia64.config similarity index 91% rename from configs/kernel-2.6.18-ia64.config rename to configs/kernel-2.6.17-ia64.config index e6c8653c4..945ef3019 100644 --- a/configs/kernel-2.6.18-ia64.config +++ b/configs/kernel-2.6.17-ia64.config @@ -1,10 +1,8 @@ -# ia64 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:41 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:13 2006 # -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -23,8 +21,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -33,7 +30,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -46,8 +42,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -65,12 +59,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -103,11 +91,9 @@ CONFIG_TIME_INTERPOLATION=y CONFIG_DMI=y CONFIG_EFI=y CONFIG_GENERIC_IOMAP=y -# CONFIG_XEN is not set CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_IA64_UNCACHED_ALLOCATOR=y CONFIG_DMA_IS_DMA32=y -CONFIG_AUDIT_ARCH=y CONFIG_IA64_GENERIC=y # CONFIG_IA64_DIG is not set # CONFIG_IA64_HP_ZX1 is not set @@ -134,23 +120,19 @@ CONFIG_FORCE_MAX_ZONEORDER=17 CONFIG_SMP=y CONFIG_NR_CPUS=1024 CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_SCHED_SMT=y # CONFIG_PERMIT_BSP_REMOVE is not set # CONFIG_PREEMPT is not set CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y +CONFIG_DISCONTIGMEM_MANUAL=y +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_DISCONTIGMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ARCH_DISCONTIGMEM_ENABLE=y CONFIG_ARCH_FLATMEM_ENABLE=y @@ -158,8 +140,9 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y CONFIG_NUMA=y CONFIG_NODES_SHIFT=8 +CONFIG_VIRTUAL_MEM_MAP=y +CONFIG_HOLES_IN_ZONE=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y # CONFIG_IA32_SUPPORT is not set CONFIG_IA64_MCA_RECOVERY=m CONFIG_PERFMON=y @@ -169,7 +152,6 @@ CONFIG_SGI_SN=y # # SN Devices # -CONFIG_SGI_IOC4=y CONFIG_SGI_IOC3=m # @@ -193,7 +175,6 @@ CONFIG_PM_LEGACY=y CONFIG_ACPI=y CONFIG_ACPI_BUTTON=m CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y @@ -204,7 +185,6 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_HOTPLUG_MEMORY=y # # CPU Frequency scaling @@ -232,8 +212,6 @@ CONFIG_IA64_ACPI_CPUFREQ=m # CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -# CONFIG_HOTPLUG_PCI_PCIE is not set CONFIG_PCI_MSI=y # CONFIG_PCI_DEBUG is not set @@ -312,25 +290,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -374,10 +337,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -394,8 +354,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -411,11 +369,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -425,7 +381,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -436,7 +391,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -467,7 +421,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -580,12 +533,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -635,14 +589,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -650,7 +598,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -707,7 +654,6 @@ CONFIG_ACT200L_DONGLE=m CONFIG_USB_IRDA=m CONFIG_SIGMATEL_FIR=m CONFIG_VLSI_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -763,13 +709,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -787,7 +731,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -799,7 +742,7 @@ CONFIG_PNP=y # # Protocols # -CONFIG_PNPACPI=y +# CONFIG_PNPACPI is not set # # Block devices @@ -848,7 +791,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -869,7 +811,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -895,7 +837,7 @@ CONFIG_BLK_DEV_ALI15X3=y # CONFIG_BLK_DEV_AMD74XX is not set CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y @@ -909,9 +851,8 @@ CONFIG_BLK_DEV_PDC202XX_OLD=y # CONFIG_PDC202XX_BURST is not set CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SGIIOC4=y CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -987,7 +928,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1015,6 +955,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC390T=m @@ -1036,8 +982,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1084,6 +1031,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1097,7 +1045,6 @@ CONFIG_IEEE1394_RAWIO=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1122,11 +1069,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1163,7 +1105,7 @@ CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1181,7 +1123,6 @@ CONFIG_SUNDANCE=m # CONFIG_SUNDANCE_MMIO is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_DE600=m CONFIG_DE620=m @@ -1217,7 +1158,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1271,7 +1211,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1279,8 +1218,6 @@ CONFIG_HOSTAP_PLX=m CONFIG_HOSTAP_PCI=m CONFIG_HOSTAP_CS=m # CONFIG_BCM43XX is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1555,7 +1492,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1568,18 +1505,16 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1610,8 +1545,7 @@ CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_SGI_L1_CONSOLE=y -CONFIG_SERIAL_JSM=m -CONFIG_SERIAL_SGI_IOC4=m +# CONFIG_SERIAL_JSM is not set CONFIG_SERIAL_SGI_IOC3=m CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set @@ -1687,16 +1621,12 @@ CONFIG_CARDMAN_4040=m # CONFIG_RAW_DRIVER is not set # CONFIG_HPET is not set CONFIG_HANGCHECK_TIMER=m -CONFIG_MMTIMER=y +# CONFIG_MMTIMER is not set # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -# CONFIG_TCG_INFINEON is not set +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1725,7 +1655,6 @@ CONFIG_I2C_ALGOPCA=m # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1764,13 +1693,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -1779,14 +1708,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -1815,12 +1742,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -1837,7 +1762,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -1868,7 +1793,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m CONFIG_VIDEO_SAA7134_DVB=m @@ -1880,19 +1804,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -1902,26 +1824,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -1929,7 +1845,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -1961,7 +1876,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2034,20 +1948,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2062,13 +1969,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=m CONFIG_FB_CFB_COPYAREA=m CONFIG_FB_CFB_IMAGEBLIT=m # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2077,8 +1983,7 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2195,18 +2100,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2214,7 +2107,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2279,7 +2171,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2369,6 +2260,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2382,6 +2274,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2420,7 +2313,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2438,12 +2330,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2474,8 +2364,7 @@ CONFIG_MMC_SDHCI=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2484,10 +2373,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2495,7 +2380,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_IPATH_CORE=m @@ -2504,7 +2388,6 @@ CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2522,38 +2405,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2584,16 +2445,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2603,11 +2463,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2617,8 +2472,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2663,8 +2516,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2673,7 +2524,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2690,13 +2540,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -2791,11 +2640,9 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_IRQ_PER_CPU=y # # HP Simulator drivers @@ -2816,24 +2663,18 @@ CONFIG_KPROBES=y # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set @@ -2851,7 +2692,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -2862,8 +2703,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -2872,7 +2711,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m diff --git a/configs/kernel-2.6.18-ppc-smp.config b/configs/kernel-2.6.17-ppc-smp.config similarity index 91% rename from configs/kernel-2.6.18-ppc-smp.config rename to configs/kernel-2.6.17-ppc-smp.config index 66147ea3d..517179bbd 100644 --- a/configs/kernel-2.6.18-ppc-smp.config +++ b/configs/kernel-2.6.17-ppc-smp.config @@ -1,19 +1,16 @@ -# powerpc # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:41 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:15 2006 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y @@ -22,7 +19,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y CONFIG_PPC_UDBG_16550=y CONFIG_GENERIC_TBSYNC=y -CONFIG_AUDIT_ARCH=y # CONFIG_DEFAULT_UIMAGE is not set # @@ -33,7 +29,6 @@ CONFIG_CLASSIC32=y # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set # CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_8xx is not set @@ -45,7 +40,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU_32=y CONFIG_SMP=y CONFIG_NR_CPUS=4 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -64,8 +58,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -74,7 +67,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -87,11 +79,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -106,12 +97,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -141,10 +126,8 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set CONFIG_PPC_CHRP=y CONFIG_PPC_PMAC=y -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set # CONFIG_MAMBO is not set +CONFIG_MPIC=y CONFIG_PPC_RTAS=y # CONFIG_RTAS_ERROR_LOGGING is not set # CONFIG_RTAS_PROC is not set @@ -169,7 +152,6 @@ CONFIG_TAU=y # CONFIG_TAU_INT is not set CONFIG_TAU_AVERAGE=y # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -186,7 +168,6 @@ CONFIG_PREEMPT_BKL=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y # CONFIG_HOTPLUG_CPU is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_KEXEC is not set CONFIG_IRQ_ALL_CPUS=y CONFIG_ARCH_FLATMEM_ENABLE=y @@ -198,12 +179,11 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y # CONFIG_SECCOMP is not set CONFIG_ISA_DMA_API=y @@ -212,12 +192,10 @@ CONFIG_ISA_DMA_API=y # CONFIG_ISA=y CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set CONFIG_PPC_I8259=y CONFIG_PPC_INDIRECT_PCI=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y # CONFIG_PCI_DEBUG is not set # @@ -305,25 +283,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -367,10 +330,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -387,8 +347,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -404,11 +362,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -418,7 +374,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -429,7 +384,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -460,7 +414,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -573,7 +526,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -581,6 +534,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -630,14 +584,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -707,7 +655,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -763,13 +710,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -846,21 +791,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -879,7 +824,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -944,7 +888,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -964,7 +907,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -991,7 +934,7 @@ CONFIG_BLK_DEV_ALI15X3=y # CONFIG_BLK_DEV_AMD74XX is not set CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y @@ -1006,12 +949,13 @@ CONFIG_BLK_DEV_PDC202XX_OLD=y CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_BLINK=y # CONFIG_IDE_ARM is not set # CONFIG_IDE_CHIPSETS is not set CONFIG_BLK_DEV_IDEDMA=y @@ -1091,7 +1035,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1129,6 +1072,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1165,8 +1114,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1213,6 +1163,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1228,12 +1179,9 @@ CONFIG_IEEE1394_RAWIO=m CONFIG_ADB=y CONFIG_ADB_CUDA=y CONFIG_ADB_PMU=y -CONFIG_ADB_PMU_LED=y -CONFIG_ADB_PMU_LED_IDE=y CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_MEDIABAY=y CONFIG_PMAC_BACKLIGHT=y -# CONFIG_PMAC_BACKLIGHT_LEGACY is not set CONFIG_ADB_MACIO=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y @@ -1246,7 +1194,6 @@ CONFIG_WINDFARM=y # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1271,11 +1218,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1298,10 +1240,7 @@ CONFIG_EL3=m CONFIG_VORTEX=m CONFIG_TYPHOON=m # CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -CONFIG_ULTRA=m -# CONFIG_SMC9194 is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -1344,7 +1283,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1363,7 +1302,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_DE600=m CONFIG_DE620=m @@ -1403,7 +1341,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1464,7 +1401,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1478,8 +1414,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1777,7 +1711,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1790,20 +1724,18 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1836,7 +1768,7 @@ CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_CRASH is not set @@ -1886,7 +1818,6 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y CONFIG_NVRAM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -1921,8 +1852,7 @@ CONFIG_CARDMAN_4040=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_ATMEL=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1954,7 +1884,6 @@ CONFIG_I2C_ISA=m CONFIG_I2C_POWERMAC=y CONFIG_I2C_MPC=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1994,13 +1923,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2009,14 +1938,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2045,12 +1972,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2067,7 +1992,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2105,19 +2030,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2127,26 +2050,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2165,7 +2082,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2197,7 +2113,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2270,20 +2185,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2298,13 +2206,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2319,13 +2226,10 @@ CONFIG_FB_CT65550=y # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_NVIDIA_BACKLIGHT=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -2335,15 +2239,12 @@ CONFIG_FB_MATROX_MAVEN=m CONFIG_FB_MATROX_MULTIHEAD=y CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_BACKLIGHT=y # CONFIG_FB_RADEON_DEBUG is not set CONFIG_FB_ATY128=y -CONFIG_FB_ATY128_BACKLIGHT=y CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y CONFIG_FB_ATY_GENERIC_LCD=y CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_BACKLIGHT=y CONFIG_FB_SAVAGE=m CONFIG_FB_SAVAGE_I2C=y CONFIG_FB_SAVAGE_ACCEL=y @@ -2379,7 +2280,7 @@ CONFIG_LOGO=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_LOGO_LINUX_CLUT224=y CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_BACKLIGHT_DEVICE=y CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_DEVICE=y @@ -2481,18 +2382,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2500,7 +2389,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2531,17 +2419,6 @@ CONFIG_SND_YMFPCI=m CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -2583,7 +2460,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2673,6 +2549,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2686,6 +2563,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2724,7 +2602,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2742,12 +2619,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2779,8 +2654,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2789,10 +2663,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2800,14 +2670,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2825,38 +2693,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2887,16 +2733,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2906,11 +2751,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2920,8 +2760,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2960,7 +2798,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2975,8 +2812,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2985,7 +2820,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3002,13 +2836,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3098,13 +2931,10 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support @@ -3117,25 +2947,19 @@ CONFIG_OPROFILE=m # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set @@ -3144,7 +2968,11 @@ CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_BDI_SWITCH is not set CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options @@ -3153,7 +2981,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3164,8 +2992,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3174,7 +3000,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m diff --git a/configs/kernel-2.6.18-ppc.config b/configs/kernel-2.6.17-ppc.config similarity index 91% rename from configs/kernel-2.6.18-ppc.config rename to configs/kernel-2.6.17-ppc.config index 1db169fcf..df7480e4d 100644 --- a/configs/kernel-2.6.18-ppc.config +++ b/configs/kernel-2.6.17-ppc.config @@ -1,19 +1,16 @@ -# powerpc # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:41 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:15 2006 # # CONFIG_PPC64 is not set CONFIG_PPC32=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_GENERIC_NVRAM=y @@ -22,7 +19,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y CONFIG_PPC_UDBG_16550=y # CONFIG_GENERIC_TBSYNC is not set -CONFIG_AUDIT_ARCH=y # CONFIG_DEFAULT_UIMAGE is not set # @@ -33,7 +29,6 @@ CONFIG_CLASSIC32=y # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set # CONFIG_PPC_85xx is not set -# CONFIG_PPC_86xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_8xx is not set @@ -44,7 +39,6 @@ CONFIG_ALTIVEC=y CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU_32=y # CONFIG_SMP is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -63,8 +57,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -72,7 +65,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -85,11 +77,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -103,12 +94,6 @@ CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set CONFIG_KMOD=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -138,10 +123,8 @@ CONFIG_PPC_MULTIPLATFORM=y # CONFIG_APUS is not set CONFIG_PPC_CHRP=y CONFIG_PPC_PMAC=y -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set # CONFIG_MAMBO is not set +CONFIG_MPIC=y CONFIG_PPC_RTAS=y # CONFIG_RTAS_ERROR_LOGGING is not set # CONFIG_RTAS_PROC is not set @@ -166,7 +149,6 @@ CONFIG_TAU=y # CONFIG_TAU_INT is not set CONFIG_TAU_AVERAGE=y # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Kernel options @@ -181,7 +163,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_KEXEC is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y @@ -192,12 +173,11 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" # CONFIG_SECCOMP is not set @@ -208,12 +188,10 @@ CONFIG_ISA_DMA_API=y # CONFIG_ISA=y CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set CONFIG_PPC_I8259=y CONFIG_PPC_INDIRECT_PCI=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y # CONFIG_PCI_DEBUG is not set # @@ -301,25 +279,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -363,10 +326,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -383,8 +343,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -400,11 +358,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -414,7 +370,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -425,7 +380,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -456,7 +410,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -569,7 +522,7 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y # CONFIG_LTPC is not set # CONFIG_COPS is not set CONFIG_IPDDP=m @@ -577,6 +530,7 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -626,14 +580,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -705,7 +653,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -761,13 +708,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -844,21 +789,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -877,7 +822,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -942,7 +886,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -962,7 +905,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -989,7 +932,7 @@ CONFIG_BLK_DEV_ALI15X3=y # CONFIG_BLK_DEV_AMD74XX is not set CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y @@ -1004,12 +947,13 @@ CONFIG_BLK_DEV_PDC202XX_OLD=y CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_BLINK=y # CONFIG_IDE_ARM is not set # CONFIG_IDE_CHIPSETS is not set CONFIG_BLK_DEV_IDEDMA=y @@ -1089,7 +1033,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1127,6 +1070,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_QLOGIC_FAS is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_SYM53C416 is not set CONFIG_SCSI_DC395x=m @@ -1163,8 +1112,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1211,6 +1161,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1226,12 +1177,9 @@ CONFIG_IEEE1394_RAWIO=m CONFIG_ADB=y CONFIG_ADB_CUDA=y CONFIG_ADB_PMU=y -CONFIG_ADB_PMU_LED=y -CONFIG_ADB_PMU_LED_IDE=y CONFIG_PMAC_APM_EMU=y CONFIG_PMAC_MEDIABAY=y CONFIG_PMAC_BACKLIGHT=y -# CONFIG_PMAC_BACKLIGHT_LEGACY is not set CONFIG_ADB_MACIO=y CONFIG_INPUT_ADBHID=y CONFIG_MAC_EMUMOUSEBTN=y @@ -1244,7 +1192,6 @@ CONFIG_WINDFARM=y # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1269,11 +1216,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1296,10 +1238,7 @@ CONFIG_EL3=m CONFIG_VORTEX=m CONFIG_TYPHOON=m # CONFIG_LANCE is not set -CONFIG_NET_VENDOR_SMC=y -# CONFIG_WD80x3 is not set -CONFIG_ULTRA=m -# CONFIG_SMC9194 is not set +# CONFIG_NET_VENDOR_SMC is not set # CONFIG_NET_VENDOR_RACAL is not set # @@ -1343,7 +1282,7 @@ CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m # CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1362,7 +1301,6 @@ CONFIG_SUNDANCE=m CONFIG_TLAN=m CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_DE600=m CONFIG_DE620=m @@ -1402,7 +1340,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1463,7 +1400,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1477,8 +1413,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1779,7 +1713,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1792,20 +1726,18 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_ESPSERIAL is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -1839,7 +1771,7 @@ CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_CRASH is not set @@ -1889,7 +1821,6 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y CONFIG_NVRAM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set @@ -1924,8 +1855,7 @@ CONFIG_CARDMAN_4040=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_ATMEL=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1958,7 +1888,6 @@ CONFIG_I2C_ISA=m CONFIG_I2C_POWERMAC=y CONFIG_I2C_MPC=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1998,13 +1927,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -2013,14 +1942,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2049,12 +1976,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2071,7 +1996,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2109,19 +2034,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2131,26 +2054,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2169,7 +2086,6 @@ CONFIG_RADIO_MAESTRO=m # CONFIG_RADIO_TRUST is not set # CONFIG_RADIO_TYPHOON is not set # CONFIG_RADIO_ZOLTRIX is not set -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2201,7 +2117,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2274,20 +2189,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2302,13 +2210,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2323,13 +2230,10 @@ CONFIG_FB_CT65550=y # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_NVIDIA_BACKLIGHT=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_RIVA_BACKLIGHT=y CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -2339,15 +2243,12 @@ CONFIG_FB_MATROX_MAVEN=m CONFIG_FB_MATROX_MULTIHEAD=y CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y -CONFIG_FB_RADEON_BACKLIGHT=y # CONFIG_FB_RADEON_DEBUG is not set CONFIG_FB_ATY128=y -CONFIG_FB_ATY128_BACKLIGHT=y CONFIG_FB_ATY=y CONFIG_FB_ATY_CT=y CONFIG_FB_ATY_GENERIC_LCD=y CONFIG_FB_ATY_GX=y -CONFIG_FB_ATY_BACKLIGHT=y CONFIG_FB_SAVAGE=m CONFIG_FB_SAVAGE_I2C=y CONFIG_FB_SAVAGE_ACCEL=y @@ -2383,7 +2284,7 @@ CONFIG_LOGO=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_LOGO_LINUX_CLUT224=y CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_BACKLIGHT_DEVICE=y CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_DEVICE=y @@ -2485,18 +2386,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2504,7 +2393,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2535,17 +2423,6 @@ CONFIG_SND_YMFPCI=m CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -2587,7 +2464,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2677,6 +2553,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2690,6 +2567,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2728,7 +2606,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2746,12 +2623,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2783,8 +2658,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2793,10 +2667,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2804,14 +2674,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2829,38 +2697,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2891,16 +2737,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2910,11 +2755,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2924,8 +2764,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2964,7 +2802,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2979,8 +2816,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2989,7 +2824,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -3006,13 +2840,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3102,13 +2935,10 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support @@ -3121,25 +2951,19 @@ CONFIG_OPROFILE=m # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_HIGHMEM=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set @@ -3148,7 +2972,11 @@ CONFIG_XMON=y CONFIG_XMON_DEFAULT=y # CONFIG_BDI_SWITCH is not set CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options @@ -3157,7 +2985,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3168,8 +2996,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3178,7 +3004,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m diff --git a/configs/kernel-2.6.18-ppc64.config b/configs/kernel-2.6.17-ppc64.config similarity index 90% rename from configs/kernel-2.6.18-ppc64.config rename to configs/kernel-2.6.17-ppc64.config index 7b31ef807..77e4c3de5 100644 --- a/configs/kernel-2.6.18-ppc64.config +++ b/configs/kernel-2.6.17-ppc64.config @@ -1,19 +1,16 @@ -# powerpc # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:14 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -23,7 +20,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y CONFIG_PPC_UDBG_16550=y CONFIG_GENERIC_TBSYNC=y -CONFIG_AUDIT_ARCH=y # CONFIG_DEFAULT_UIMAGE is not set # @@ -38,7 +34,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=128 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -57,8 +52,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -67,7 +61,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -80,11 +73,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -99,12 +91,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -135,20 +121,19 @@ CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC64=y # CONFIG_PPC_MAPLE is not set CONFIG_PPC_CELL=y -CONFIG_PPC_CELL_NATIVE=y -CONFIG_PPC_IBM_CELL_BLADE=y -CONFIG_UDBG_RTAS_CONSOLE=y CONFIG_MAMBO=y CONFIG_MAMBO_DISK=m CONFIG_MAMBO_NET=m CONFIG_XICS=y CONFIG_U3_DART=y +CONFIG_MPIC=y CONFIG_PPC_RTAS=y CONFIG_RTAS_ERROR_LOGGING=y CONFIG_RTAS_PROC=y CONFIG_RTAS_FLASH=y CONFIG_MMIO_NVRAM=y CONFIG_MPIC_BROKEN_U3=y +CONFIG_CELL_IIC=y CONFIG_IBMVIO=y CONFIG_IBMEBUS=y # CONFIG_PPC_MPC106 is not set @@ -167,15 +152,12 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m CONFIG_CPU_FREQ_PMAC64=y # CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y # # Cell Broadband Engine options # CONFIG_SPU_FS=m -CONFIG_SPU_BASE=y CONFIG_SPUFS_MMAP=y -CONFIG_CBE_RAS=y # # Kernel options @@ -190,10 +172,9 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_PREEMPT_BKL=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y -CONFIG_FORCE_MAX_ZONEORDER=9 +CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set CONFIG_IRQ_ALL_CPUS=y @@ -216,19 +197,17 @@ CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y CONFIG_MEMORY_HOTPLUG=y -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_ARCH_MEMORY_PROBE=y -CONFIG_NODES_SPAN_OTHER_NODES=y -CONFIG_PPC_64K_PAGES=y +# CONFIG_PPC_64K_PAGES is not set CONFIG_SCHED_SMT=y CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y # CONFIG_SECCOMP is not set CONFIG_ISA_DMA_API=y @@ -236,13 +215,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set CONFIG_PPC_I8259=y # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_PCI_DEBUG is not set # @@ -276,6 +252,7 @@ CONFIG_HOTPLUG_PCI_FAKE=m # CONFIG_HOTPLUG_PCI_CPCI is not set CONFIG_HOTPLUG_PCI_SHPC=m CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y +# CONFIG_HOTPLUG_PCI_SHPC_PHPRM_LEGACY is not set CONFIG_HOTPLUG_PCI_RPA=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m CONFIG_KERNEL_START=0xc000000000000000 @@ -320,25 +297,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -382,10 +344,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -402,8 +361,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -419,11 +376,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -433,7 +388,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -444,7 +398,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -475,7 +428,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -588,12 +540,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -643,14 +596,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -658,7 +605,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -720,7 +666,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -776,13 +721,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -859,21 +802,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -892,7 +835,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -947,7 +889,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -967,7 +908,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -993,7 +934,7 @@ CONFIG_BLK_DEV_ALI15X3=y CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set +CONFIG_BLK_DEV_CY82C693=y CONFIG_BLK_DEV_CS5520=y CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y @@ -1008,12 +949,13 @@ CONFIG_BLK_DEV_PDC202XX_OLD=y CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y +CONFIG_BLK_DEV_IDE_PMAC_BLINK=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set @@ -1087,7 +1029,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1121,6 +1062,12 @@ CONFIG_SCSI_IPR_TRACE=y CONFIG_SCSI_IPR_DUMP=y CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m # CONFIG_SCSI_DC390T is not set @@ -1142,8 +1089,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1190,6 +1138,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1203,8 +1152,6 @@ CONFIG_IEEE1394_RAWIO=m # Macintosh device drivers # CONFIG_ADB_PMU=y -CONFIG_ADB_PMU_LED=y -CONFIG_ADB_PMU_LED_IDE=y CONFIG_PMAC_SMU=y CONFIG_THERM_PM72=y CONFIG_WINDFARM=y @@ -1216,7 +1163,6 @@ CONFIG_WINDFARM_PM112=y # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1240,11 +1186,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1282,7 +1223,7 @@ CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1300,7 +1241,6 @@ CONFIG_SUNDANCE=m # CONFIG_SUNDANCE_MMIO is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_DE600=m CONFIG_DE620=m @@ -1338,7 +1278,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1394,7 +1333,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1408,8 +1346,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1683,7 +1619,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1696,19 +1632,17 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1737,7 +1671,7 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_PMACZILOG=m CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_CRASH is not set @@ -1783,7 +1717,6 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set CONFIG_DTLK=m @@ -1818,8 +1751,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_ATMEL=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1849,7 +1781,6 @@ CONFIG_I2C_ALGOPCA=m CONFIG_I2C_ISA=m CONFIG_I2C_POWERMAC=y CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1888,13 +1819,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -1903,14 +1834,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -1939,12 +1868,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -1961,7 +1888,7 @@ CONFIG_SENSORS_W83627EHF=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -1996,19 +1923,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2018,26 +1943,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2045,7 +1964,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2077,7 +1995,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2150,20 +2067,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2178,25 +2088,27 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set CONFIG_FB_OF=y +# CONFIG_FB_CONTROL is not set +# CONFIG_FB_PLATINUM is not set +# CONFIG_FB_VALKYRIE is not set +# CONFIG_FB_CT65550 is not set # CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_VGA16 is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set @@ -2311,18 +2223,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2330,7 +2230,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2361,17 +2260,6 @@ CONFIG_SND_YMFPCI=m CONFIG_SND_POWERMAC=m CONFIG_SND_POWERMAC_AUTO_DRC=y -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - # # USB devices # @@ -2413,7 +2301,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2503,6 +2390,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2516,6 +2404,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2554,7 +2443,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2572,12 +2460,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2609,8 +2495,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2619,10 +2504,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2630,14 +2511,12 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2655,38 +2534,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # File systems @@ -2717,16 +2574,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2736,11 +2592,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2750,8 +2601,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2791,7 +2640,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2806,8 +2654,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2816,7 +2662,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2833,13 +2678,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -2929,44 +2773,35 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support # CONFIG_PROFILING=y CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set @@ -2977,7 +2812,11 @@ CONFIG_XMON=y CONFIG_XMON_DEFAULT=y CONFIG_IRQSTACKS=y CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options @@ -2986,7 +2825,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -2997,8 +2836,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set CONFIG_KEYS_COMPAT=y # @@ -3008,7 +2845,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m diff --git a/configs/kernel-2.6.18-ppc64iseries.config b/configs/kernel-2.6.17-ppc64iseries.config similarity index 82% rename from configs/kernel-2.6.18-ppc64iseries.config rename to configs/kernel-2.6.17-ppc64iseries.config index ffeabee01..50e690c23 100644 --- a/configs/kernel-2.6.18-ppc64iseries.config +++ b/configs/kernel-2.6.17-ppc64iseries.config @@ -1,19 +1,16 @@ -# powerpc # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:14 2006 # CONFIG_PPC64=y CONFIG_64BIT=y CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y @@ -23,7 +20,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y # CONFIG_PPC_UDBG_16550 is not set # CONFIG_GENERIC_TBSYNC is not set -CONFIG_AUDIT_ARCH=y # CONFIG_DEFAULT_UIMAGE is not set # @@ -38,7 +34,6 @@ CONFIG_PPC_STD_MMU=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=128 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -57,8 +52,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -67,7 +61,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -80,8 +73,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -99,12 +90,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -130,9 +115,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" CONFIG_PPC_ISERIES=y # CONFIG_EMBEDDED6xx is not set # CONFIG_APUS is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_UDBG_RTAS_CONSOLE is not set # CONFIG_MAMBO is not set # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set @@ -141,7 +123,6 @@ CONFIG_IBMVIO=y # CONFIG_PPC_970_NAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_WANT_EARLY_SERIAL is not set -# CONFIG_MPIC is not set # # Kernel options @@ -156,9 +137,8 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_PREEMPT_BKL=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y -CONFIG_FORCE_MAX_ZONEORDER=9 +CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_IRQ_ALL_CPUS=y CONFIG_LPARCFG=y # CONFIG_NUMA is not set @@ -172,14 +152,13 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_PPC_64K_PAGES=y +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y # CONFIG_SECCOMP is not set CONFIG_ISA_DMA_API=y @@ -187,13 +166,10 @@ CONFIG_ISA_DMA_API=y # Bus options # CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PCI=y CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -# CONFIG_HOTPLUG_PCI_PCIE is not set # CONFIG_PCI_DEBUG is not set # @@ -204,11 +180,7 @@ CONFIG_PCIEPORTBUS=y # # PCI Hotplug Support # -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_FAKE is not set -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y +# CONFIG_HOTPLUG_PCI is not set CONFIG_KERNEL_START=0xc000000000000000 # @@ -251,25 +223,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -313,10 +270,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -333,8 +287,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -350,11 +302,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -364,7 +314,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -375,7 +324,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -406,7 +354,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -514,6 +461,7 @@ CONFIG_LLC=y # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -562,14 +510,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -577,7 +519,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -602,13 +543,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -641,7 +580,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -712,7 +650,6 @@ CONFIG_MEGARAID_MAILBOX=m CONFIG_MEGARAID_LEGACY=m CONFIG_MEGARAID_SAS=m # CONFIG_SCSI_SATA is not set -CONFIG_SCSI_HPTIOP=m # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set @@ -730,6 +667,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m # CONFIG_SCSI_DC390T is not set @@ -744,8 +687,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -786,7 +730,6 @@ CONFIG_FUSION_LAN=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -810,11 +753,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -850,7 +788,7 @@ CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m # CONFIG_FEALNX is not set @@ -864,7 +802,6 @@ CONFIG_SUNDANCE=m # CONFIG_SUNDANCE_MMIO is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y # # Ethernet (1000 Mbit) @@ -895,7 +832,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -953,76 +889,13 @@ CONFIG_NET_POLL_CONTROLLER=y # # Input device support # -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m +# CONFIG_INPUT is not set # # Hardware I/O ports # -CONFIG_SERIO=y -# CONFIG_SERIO_I8042 is not set -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set # # Character devices @@ -1030,15 +903,14 @@ CONFIG_GAMEPORT_FM801=m CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1055,7 +927,7 @@ CONFIG_N_HDLC=m # CONFIG_SERIAL_CORE=m CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_CRASH is not set @@ -1082,7 +954,6 @@ CONFIG_SOFT_WATCHDOG=m CONFIG_PCIPCWATCHDOG=m CONFIG_WDTPCI=m CONFIG_WDT_501_PCI=y -CONFIG_HW_RANDOM=y CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set CONFIG_DTLK=m @@ -1100,8 +971,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_ATMEL=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1144,13 +1014,7 @@ CONFIG_VIDEO_V4L2=y # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y # # Sound @@ -1182,8 +1046,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -1192,9 +1055,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -1217,31 +1077,12 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_DS1742=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -# CONFIG_INTEL_IOATDMA is not set # # File systems @@ -1272,16 +1113,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -1291,11 +1131,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -1305,8 +1140,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -1351,8 +1184,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -1361,7 +1192,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -1378,13 +1208,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1487,38 +1316,29 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y # # Instrumentation Support # -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y +# CONFIG_KPROBES is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set @@ -1526,7 +1346,11 @@ CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUGGER=y CONFIG_IRQSTACKS=y -# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EARLY_DEBUG_LPAR is not set +# CONFIG_PPC_EARLY_DEBUG_G5 is not set +# CONFIG_PPC_EARLY_DEBUG_RTAS is not set +# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set +# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set # # Security options @@ -1535,7 +1359,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_SECLVL is not set CONFIG_SECURITY_SELINUX=y @@ -1545,8 +1369,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set CONFIG_KEYS_COMPAT=y # @@ -1556,7 +1378,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m diff --git a/configs/kernel-2.6.18-s390.config b/configs/kernel-2.6.17-s390.config similarity index 89% rename from configs/kernel-2.6.18-s390.config rename to configs/kernel-2.6.17-s390.config index 971ecd194..86bbd5d09 100644 --- a/configs/kernel-2.6.18-s390.config +++ b/configs/kernel-2.6.17-s390.config @@ -1,17 +1,13 @@ -# s390 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:16 2006 # CONFIG_MMU=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_S390=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -30,18 +26,16 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -54,8 +48,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -73,12 +65,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -106,13 +92,11 @@ CONFIG_DEFAULT_IOSCHED="cfq" # Processor type and features # # CONFIG_64BIT is not set -CONFIG_32BIT=y CONFIG_SMP=y CONFIG_NR_CPUS=32 CONFIG_HOTPLUG_CPU=y CONFIG_DEFAULT_MIGRATION_COST=1000000 CONFIG_MATHEMU=y -CONFIG_AUDIT_ARCH=y # # Code generation options @@ -133,7 +117,6 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y # # I/O subsystem configuration @@ -166,7 +149,6 @@ CONFIG_APPLDATA_OS=m CONFIG_APPLDATA_NET_SUM=m CONFIG_NO_IDLE_HZ=y CONFIG_NO_IDLE_HZ_INIT=y -CONFIG_S390_HYPFS_FS=y CONFIG_KEXEC=y # @@ -209,25 +191,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -271,10 +238,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -291,8 +255,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -308,11 +270,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -322,7 +282,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -333,7 +292,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -364,7 +322,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -477,12 +434,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -532,14 +490,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -568,13 +520,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # SCSI device support @@ -628,7 +578,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set @@ -654,8 +603,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -700,7 +650,7 @@ CONFIG_SCLP_TTY=y CONFIG_SCLP_CONSOLE=y CONFIG_SCLP_VT220_TTY=y CONFIG_SCLP_VT220_CONSOLE=y -CONFIG_SCLP_CPI=m +CONFIG_SCLP_CPI=y CONFIG_S390_TAPE=m # @@ -726,7 +676,6 @@ CONFIG_Z90CRYPT=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -787,6 +736,7 @@ CONFIG_QETH=m # CONFIG_QETH_IPV6=y CONFIG_QETH_VLAN=y +CONFIG_QETH_PERF_STATS=y CONFIG_CCWGROUP=m # CONFIG_PPP is not set # CONFIG_SLIP is not set @@ -826,16 +776,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -845,11 +794,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -859,8 +803,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -904,8 +846,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -914,7 +854,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -931,13 +870,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1028,30 +966,20 @@ CONFIG_OPROFILE=m # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_DETECT_SOFTLOCKUP is not set CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set +CONFIG_DEBUG_VM=y CONFIG_UNWIND_INFO=y # CONFIG_FORCED_INLINING is not set # CONFIG_BOOT_DELAY is not set @@ -1064,7 +992,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_SECLVL is not set CONFIG_SECURITY_SELINUX=y @@ -1074,8 +1002,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -1084,7 +1010,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_S390=m CONFIG_CRYPTO_SHA256=m @@ -1130,4 +1056,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/configs/kernel-2.6.18-s390x.config b/configs/kernel-2.6.17-s390x.config similarity index 89% rename from configs/kernel-2.6.18-s390x.config rename to configs/kernel-2.6.17-s390x.config index 6340b1bce..4dc234d1b 100644 --- a/configs/kernel-2.6.18-s390x.config +++ b/configs/kernel-2.6.17-s390x.config @@ -1,17 +1,13 @@ -# s390 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:16 2006 # CONFIG_MMU=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_S390=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -30,8 +26,7 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set @@ -40,7 +35,6 @@ CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -53,8 +47,6 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set @@ -72,12 +64,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -110,7 +96,7 @@ CONFIG_HOTPLUG_CPU=y CONFIG_DEFAULT_MIGRATION_COST=1000000 CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y -CONFIG_AUDIT_ARCH=y +CONFIG_BINFMT_ELF32=y # # Code generation options @@ -130,8 +116,7 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y +CONFIG_SPLIT_PTLOCK_CPUS=4096 # # I/O subsystem configuration @@ -164,7 +149,6 @@ CONFIG_APPLDATA_OS=m CONFIG_APPLDATA_NET_SUM=m CONFIG_NO_IDLE_HZ=y CONFIG_NO_IDLE_HZ_INIT=y -CONFIG_S390_HYPFS_FS=y CONFIG_KEXEC=y # @@ -207,25 +191,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -269,10 +238,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -289,8 +255,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -306,11 +270,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -320,7 +282,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -331,7 +292,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -362,7 +322,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -475,12 +434,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -530,14 +490,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -566,13 +520,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -CONFIG_SYS_HYPERVISOR=y # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # SCSI device support @@ -626,7 +578,6 @@ CONFIG_BLK_DEV_NBD=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set @@ -652,8 +603,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -698,7 +650,7 @@ CONFIG_SCLP_TTY=y CONFIG_SCLP_CONSOLE=y CONFIG_SCLP_VT220_TTY=y CONFIG_SCLP_VT220_CONSOLE=y -CONFIG_SCLP_CPI=m +CONFIG_SCLP_CPI=y CONFIG_S390_TAPE=m # @@ -724,7 +676,6 @@ CONFIG_Z90CRYPT=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -785,6 +736,7 @@ CONFIG_QETH=m # CONFIG_QETH_IPV6=y CONFIG_QETH_VLAN=y +CONFIG_QETH_PERF_STATS=y CONFIG_CCWGROUP=m # CONFIG_PPP is not set # CONFIG_SLIP is not set @@ -824,16 +776,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -843,11 +794,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -857,8 +803,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -902,8 +846,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -912,7 +854,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -929,13 +870,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -1026,30 +966,20 @@ CONFIG_OPROFILE=m # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_DETECT_SOFTLOCKUP is not set CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set +CONFIG_DEBUG_VM=y CONFIG_UNWIND_INFO=y # CONFIG_FORCED_INLINING is not set # CONFIG_BOOT_DELAY is not set @@ -1062,7 +992,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_SECLVL is not set CONFIG_SECURITY_SELINUX=y @@ -1072,8 +1002,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -1082,7 +1010,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_S390=m CONFIG_CRYPTO_SHA256=m @@ -1128,4 +1056,3 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/configs/kernel-2.6.18-x86_64.config b/configs/kernel-2.6.17-x86_64-smp.config similarity index 90% rename from configs/kernel-2.6.18-x86_64.config rename to configs/kernel-2.6.17-x86_64-smp.config index 16135f6c2..19e3f2627 100644 --- a/configs/kernel-2.6.18-x86_64.config +++ b/configs/kernel-2.6.17-x86_64-smp.config @@ -1,14 +1,11 @@ -# x86_64 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:43 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:17 2006 # CONFIG_X86_64=y CONFIG_64BIT=y CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -20,8 +17,6 @@ CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -40,18 +35,17 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_CPUSETS=y CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -64,11 +58,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -83,12 +76,6 @@ CONFIG_MODULE_SIG=y CONFIG_KMOD=y CONFIG_STOP_MACHINE=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -117,7 +104,6 @@ CONFIG_X86_PC=y # CONFIG_MK8 is not set # CONFIG_MPSC is not set CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set CONFIG_X86_L1_CACHE_BYTES=128 CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_X86_INTERNODE_CACHE_BYTES=128 @@ -147,28 +133,21 @@ CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y +CONFIG_DISCONTIGMEM_MANUAL=y +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_DISCONTIGMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y +CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y CONFIG_NR_CPUS=255 CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y +CONFIG_GART_IOMMU=y CONFIG_SWIOTLB=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y @@ -182,7 +161,6 @@ CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 CONFIG_REORDER=y -CONFIG_K8_NB=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_ISA_DMA_API=y @@ -193,7 +171,7 @@ CONFIG_GENERIC_PENDING_IRQ=y # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" CONFIG_SUSPEND_SMP=y @@ -211,13 +189,13 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_NUMA=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set @@ -226,7 +204,7 @@ CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m +CONFIG_ACPI_HOTPLUG_MEMORY=m # # CPU Frequency scaling @@ -302,8 +280,7 @@ CONFIG_HOTPLUG_PCI_FAKE=m CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI_IBM=m # CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set # # Executable file formats / Emulations @@ -355,25 +332,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -417,10 +379,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -437,8 +396,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -454,11 +411,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -468,7 +423,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -479,7 +433,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -510,7 +463,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -623,12 +575,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -678,14 +631,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -693,7 +640,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -755,7 +701,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -811,13 +756,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -905,21 +848,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -938,7 +881,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -1000,7 +942,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1021,7 +962,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1031,14 +972,15 @@ CONFIG_IDE_TASK_IOCTL=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y CONFIG_BLK_DEV_IDEPNP=y 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_RZ1000 is not set +CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y @@ -1049,10 +991,10 @@ CONFIG_BLK_DEV_ALI15X3=y CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y 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_TRIFLEX=y +CONFIG_BLK_DEV_CY82C693=y +CONFIG_BLK_DEV_CS5520=y +CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y # CONFIG_HPT34X_AUTODMA is not set CONFIG_BLK_DEV_HPT366=y @@ -1066,7 +1008,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1142,7 +1084,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1174,6 +1115,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC390T=m @@ -1195,8 +1142,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1243,6 +1191,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1265,7 +1214,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1290,11 +1238,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1331,7 +1274,7 @@ CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1349,7 +1292,6 @@ CONFIG_SUNDANCE=m # CONFIG_SUNDANCE_MMIO is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1386,7 +1328,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1422,9 +1363,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1448,7 +1387,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1462,8 +1400,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1740,7 +1676,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1753,19 +1689,17 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_SPECIALIX is not set # CONFIG_SX is not set @@ -1793,7 +1727,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -1854,10 +1788,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1891,8 +1822,6 @@ CONFIG_DRM_SAVAGE=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y # CONFIG_HPET_RTC_IRQ is not set @@ -1902,11 +1831,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1936,7 +1861,6 @@ CONFIG_I2C_I801=m # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1975,13 +1899,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -1990,14 +1914,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2026,12 +1948,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2050,7 +1970,7 @@ CONFIG_SENSORS_HDAPS=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2081,7 +2001,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m CONFIG_VIDEO_SAA7134_DVB=m @@ -2093,19 +2012,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2115,26 +2032,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2142,7 +2053,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2174,7 +2084,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2247,20 +2156,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2275,13 +2177,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2292,15 +2193,13 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set CONFIG_FB_MATROX=m CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -2336,7 +2235,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -2419,18 +2317,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2438,7 +2324,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2504,7 +2389,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2594,6 +2478,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2607,6 +2492,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2645,7 +2531,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2663,12 +2548,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2700,8 +2583,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2710,10 +2592,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2721,7 +2599,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_IPATH_CORE=m @@ -2730,7 +2607,6 @@ CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2743,7 +2619,6 @@ CONFIG_EDAC=y # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_MM_EDAC=m CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m CONFIG_EDAC_POLL=y # @@ -2758,38 +2633,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # Firmware Drivers @@ -2827,16 +2680,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2846,11 +2698,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2860,8 +2707,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2901,7 +2746,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2916,8 +2760,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2926,7 +2768,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2943,13 +2784,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3040,39 +2880,27 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_DEBUG_RODATA=y # CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set # # Security options @@ -3081,7 +2909,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3092,8 +2920,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3102,7 +2928,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3141,10 +2967,7 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/configs/kernel-2.6.18-x86_64-kdump.config b/configs/kernel-2.6.17-x86_64.config similarity index 90% rename from configs/kernel-2.6.18-x86_64-kdump.config rename to configs/kernel-2.6.17-x86_64.config index e62073eff..bf619f13b 100644 --- a/configs/kernel-2.6.18-x86_64-kdump.config +++ b/configs/kernel-2.6.17-x86_64.config @@ -1,14 +1,11 @@ -# x86_64 # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 +# Linux kernel version: 2.6.17-prep +# Thu Jul 27 16:52:16 2006 # CONFIG_X86_64=y CONFIG_64BIT=y CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_MMU=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -20,8 +17,6 @@ CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options @@ -40,17 +35,16 @@ CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y +CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y # CONFIG_IKCONFIG is not set CONFIG_RELAY=y CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y +CONFIG_VM86=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y @@ -63,11 +57,10 @@ CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_SHMEM=y CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_SLOB is not set +CONFIG_OBSOLETE_INTERMODULE=m # # Loadable module support @@ -81,12 +74,6 @@ CONFIG_MODULE_SIG=y # CONFIG_MODULE_SIG_FORCE is not set CONFIG_KMOD=y -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - # # Block layer # @@ -115,7 +102,6 @@ CONFIG_X86_PC=y # CONFIG_MK8 is not set # CONFIG_MPSC is not set CONFIG_GENERIC_CPU=y -# CONFIG_X86_64_XEN is not set CONFIG_X86_L1_CACHE_BYTES=128 CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_X86_INTERNODE_CACHE_BYTES=128 @@ -134,38 +120,29 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set +CONFIG_FLATMEM_MANUAL=y # CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y - -# -# Memory hotplug is currently incompatible with Software Suspend -# -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_SPLIT_PTLOCK_CPUS=4096 CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y -CONFIG_IOMMU=y -CONFIG_CALGARY_IOMMU=y +CONFIG_GART_IOMMU=y CONFIG_SWIOTLB=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y CONFIG_X86_MCE_AMD=y CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_CRASH_DUMP is not set +CONFIG_PHYSICAL_START=0x200000 # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_1000 is not set CONFIG_HZ=250 CONFIG_REORDER=y -CONFIG_K8_NB=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_ISA_DMA_API=y @@ -175,7 +152,7 @@ CONFIG_ISA_DMA_API=y # CONFIG_PM=y CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set +CONFIG_PM_DEBUG=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" @@ -192,11 +169,11 @@ CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m # CONFIG_ACPI_HOTKEY is not set CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_ASUS=m CONFIG_ACPI_IBM=m +CONFIG_ACPI_IBM_DOCK=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set @@ -204,8 +181,8 @@ CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y -CONFIG_ACPI_CONTAINER=m -CONFIG_ACPI_SBS=m +# CONFIG_ACPI_CONTAINER is not set +CONFIG_ACPI_HOTPLUG_MEMORY=m # # CPU Frequency scaling @@ -247,7 +224,7 @@ CONFIG_PCI_MMCONFIG=y CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=m # CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_PCI_MSI is not set +CONFIG_PCI_MSI=y # CONFIG_PCI_DEBUG is not set # @@ -281,8 +258,7 @@ CONFIG_HOTPLUG_PCI_FAKE=m CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI_IBM=m # CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set # # Executable file formats / Emulations @@ -334,25 +310,10 @@ CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# +# CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m # # IP: Virtual Server Configuration @@ -396,10 +357,7 @@ CONFIG_INET6_ESP=m CONFIG_INET6_IPCOMP=m CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_BRIDGE_NETFILTER=y @@ -416,8 +374,6 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m @@ -433,11 +389,9 @@ CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_SCTP=m CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m @@ -447,7 +401,6 @@ CONFIG_NETFILTER_XT_MATCH_TCPMSS=m CONFIG_IP_NF_CONNTRACK=m CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y CONFIG_IP_NF_CONNTRACK_EVENTS=y CONFIG_IP_NF_CONNTRACK_NETLINK=m CONFIG_IP_NF_CT_PROTO_SCTP=m @@ -458,7 +411,6 @@ CONFIG_IP_NF_TFTP=m CONFIG_IP_NF_AMANDA=m CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=m CONFIG_IP_NF_MATCH_IPRANGE=m @@ -489,7 +441,6 @@ CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m CONFIG_IP_NF_NAT_PPTP=m CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m CONFIG_IP_NF_MANGLE=m CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m @@ -602,12 +553,13 @@ CONFIG_LLC=y CONFIG_IPX=m # CONFIG_IPX_INTERN is not set CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m +CONFIG_DEV_APPLETALK=y CONFIG_IPDDP=m CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set +CONFIG_NET_DIVERT=y # CONFIG_ECONET is not set CONFIG_WAN_ROUTER=m @@ -657,14 +609,8 @@ CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_POLICE=y CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -672,7 +618,6 @@ CONFIG_NET_ESTIMATOR=y # Network testing # CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set # CONFIG_HAMRADIO is not set CONFIG_IRDA=m @@ -736,7 +681,6 @@ CONFIG_SMC_IRCC_FIR=m CONFIG_ALI_FIR=m CONFIG_VLSI_FIR=m CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m @@ -792,13 +736,11 @@ CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y # CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y +CONFIG_CONNECTOR=m # # Memory Technology Devices (MTD) @@ -886,21 +828,21 @@ CONFIG_MTD_BLOCK2MTD=m # # Disk-On-Chip Device Drivers # -# CONFIG_MTD_DOC2000 is not set +CONFIG_MTD_DOC2000=m # CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_DOC2001PLUS=m +CONFIG_MTD_DOCPROBE=m +CONFIG_MTD_DOCECC=m +# CONFIG_MTD_DOCPROBE_ADVANCED is not set +CONFIG_MTD_DOCPROBE_ADDRESS=0 # # NAND Flash Device Drivers # CONFIG_MTD_NAND=m # CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set CONFIG_MTD_NAND_NANDSIM=m # @@ -919,7 +861,6 @@ CONFIG_PARPORT_SERIAL=m CONFIG_PARPORT_PC_PCMCIA=m CONFIG_PARPORT_NOT_PC=y # CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set CONFIG_PARPORT_1284=y # @@ -981,7 +922,6 @@ CONFIG_BLK_DEV_UB=m CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 @@ -1002,7 +942,7 @@ CONFIG_BLK_DEV_IDE=y CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m +CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y CONFIG_BLK_DEV_IDESCSI=m @@ -1012,14 +952,15 @@ CONFIG_IDE_TASK_IOCTL=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set +CONFIG_BLK_DEV_CMD640=y +CONFIG_BLK_DEV_CMD640_ENHANCED=y CONFIG_BLK_DEV_IDEPNP=y 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_RZ1000 is not set +CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y @@ -1030,10 +971,10 @@ CONFIG_BLK_DEV_ALI15X3=y CONFIG_BLK_DEV_AMD74XX=y CONFIG_BLK_DEV_ATIIXP=y 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_TRIFLEX=y +CONFIG_BLK_DEV_CY82C693=y +CONFIG_BLK_DEV_CS5520=y +CONFIG_BLK_DEV_CS5530=y CONFIG_BLK_DEV_HPT34X=y # CONFIG_HPT34X_AUTODMA is not set CONFIG_BLK_DEV_HPT366=y @@ -1047,7 +988,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y CONFIG_BLK_DEV_SVWKS=y CONFIG_BLK_DEV_SIIMAGE=y CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set +CONFIG_BLK_DEV_SLC90E66=y # CONFIG_BLK_DEV_TRM290 is not set CONFIG_BLK_DEV_VIA82CXXX=y # CONFIG_IDE_ARM is not set @@ -1123,7 +1064,6 @@ CONFIG_SCSI_ATA_PIIX=m CONFIG_SCSI_SATA_MV=m CONFIG_SCSI_SATA_NV=m CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m CONFIG_SCSI_SATA_QSTOR=m CONFIG_SCSI_SATA_PROMISE=m CONFIG_SCSI_SATA_SX4=m @@ -1155,6 +1095,12 @@ CONFIG_SCSI_SYM53C8XX_MMIO=y # CONFIG_SCSI_IPR is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y +CONFIG_SCSI_QLA21XX=m +CONFIG_SCSI_QLA22XX=m +CONFIG_SCSI_QLA2300=m +CONFIG_SCSI_QLA2322=m +CONFIG_SCSI_QLA24XX=m CONFIG_SCSI_LPFC=m CONFIG_SCSI_DC395x=m CONFIG_SCSI_DC390T=m @@ -1176,8 +1122,9 @@ CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m +CONFIG_MD_RAID5=m CONFIG_MD_RAID5_RESHAPE=y +CONFIG_MD_RAID6=m CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m @@ -1224,6 +1171,7 @@ CONFIG_IEEE1394_OHCI1394=m # CONFIG_IEEE1394_VIDEO1394=m CONFIG_IEEE1394_SBP2=m +# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set CONFIG_IEEE1394_ETH1394=m CONFIG_IEEE1394_DV1394=m CONFIG_IEEE1394_RAWIO=m @@ -1246,7 +1194,6 @@ CONFIG_I2O_PROC=m # Network device support # CONFIG_NETDEVICES=y -CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m CONFIG_EQUALIZER=m @@ -1271,11 +1218,6 @@ CONFIG_DAVICOM_PHY=m CONFIG_QSEMI_PHY=m CONFIG_LXT_PHY=m CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y # # Ethernet (10 or 100Mbit) @@ -1313,7 +1255,7 @@ CONFIG_ADAPTEC_STARFIRE=m CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set +CONFIG_DGRS=m # CONFIG_EEPRO100 is not set CONFIG_E100=m CONFIG_FEALNX=m @@ -1331,7 +1273,6 @@ CONFIG_SUNDANCE=m # CONFIG_SUNDANCE_MMIO is not set CONFIG_VIA_RHINE=m CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y CONFIG_NET_POCKET=y CONFIG_ATP=m CONFIG_DE600=m @@ -1368,7 +1309,6 @@ CONFIG_IXGB=m CONFIG_IXGB_NAPI=y CONFIG_S2IO=m CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m # # Token Ring devices @@ -1404,9 +1344,7 @@ CONFIG_IPW2100_MONITOR=y # CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y +CONFIG_IPW_QOS=y # CONFIG_IPW2200_DEBUG is not set CONFIG_AIRO=m CONFIG_HERMES=m @@ -1430,7 +1368,6 @@ CONFIG_PCMCIA_WL3501=m # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support # CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m CONFIG_HOSTAP=m CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y @@ -1444,8 +1381,6 @@ CONFIG_BCM43XX_PIO=y CONFIG_BCM43XX_DMA_AND_PIO_MODE=y # CONFIG_BCM43XX_DMA_MODE is not set # CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set CONFIG_NET_WIRELESS=y # @@ -1725,7 +1660,7 @@ CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m +# CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=m CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m @@ -1738,19 +1673,17 @@ CONFIG_GAMEPORT_FM801=m CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_NONSTANDARD=y # CONFIG_COMPUTONE is not set # CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set +# CONFIG_CYCLADES is not set # CONFIG_DIGIEPCA is not set # CONFIG_MOXA_INTELLIO is not set # CONFIG_MOXA_SMARTIO is not set # CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m +# CONFIG_SYNCLINK is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set CONFIG_N_HDLC=m # CONFIG_RISCOM8 is not set # CONFIG_SPECIALIX is not set @@ -1779,7 +1712,7 @@ CONFIG_SERIAL_8250_RSA=y # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_JSM=m +# CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set CONFIG_CRASH=m @@ -1840,10 +1773,7 @@ CONFIG_WDT_501_PCI=y # USB-based Watchdog Cards # CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set +CONFIG_HW_RANDOM=m CONFIG_NVRAM=y CONFIG_RTC=y CONFIG_DTLK=m @@ -1878,8 +1808,6 @@ CONFIG_DRM_SAVAGE=m CONFIG_CARDMAN_4000=m CONFIG_CARDMAN_4040=m CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m # CONFIG_RAW_DRIVER is not set CONFIG_HPET=y # CONFIG_HPET_RTC_IRQ is not set @@ -1889,11 +1817,7 @@ CONFIG_HANGCHECK_TIMER=m # # TPM devices # -CONFIG_TCG_TPM=m -CONFIG_TCG_TIS=m -CONFIG_TCG_NSC=m -CONFIG_TCG_ATMEL=m -CONFIG_TCG_INFINEON=m +# CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set # @@ -1923,7 +1847,6 @@ CONFIG_I2C_I801=m # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_ISA=m CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set CONFIG_I2C_PARPORT=m CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PROSAVAGE=m @@ -1962,13 +1885,13 @@ CONFIG_SENSORS_MAX6875=m # Dallas's 1-wire bus # CONFIG_W1=m -CONFIG_W1_CON=y # # 1-wire Bus Masters # CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS9490=m +CONFIG_W1_MASTER_DS9490_BRIDGE=m CONFIG_W1_MASTER_DS2482=m # @@ -1977,14 +1900,12 @@ CONFIG_W1_MASTER_DS2482=m CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y # # Hardware Monitoring support # CONFIG_HWMON=m CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2013,12 +1934,10 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_PC87360=m CONFIG_SENSORS_SIS5595=m CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m CONFIG_SENSORS_SMSC47B397=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT8231=m CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83627HF=m @@ -2037,7 +1956,7 @@ CONFIG_SENSORS_HDAPS=m CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L2=m # # Video Capture Adapters @@ -2068,7 +1987,6 @@ CONFIG_VIDEO_ZORAN_DC10=m CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_SAA7134=m CONFIG_VIDEO_SAA7134_ALSA=m CONFIG_VIDEO_SAA7134_DVB=m @@ -2080,19 +1998,17 @@ CONFIG_VIDEO_HEXIUM_GEMINI=m CONFIG_VIDEO_CX88_VP3054=m CONFIG_VIDEO_CX88=m CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m CONFIG_VIDEO_CX88_DVB=m CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y +CONFIG_VIDEO_OVCAMCHIP=m # # Encoders and Decoders # CONFIG_VIDEO_MSP3400=m CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_CX25840=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_SAA7127=m @@ -2102,26 +2018,20 @@ CONFIG_VIDEO_UPD64083=m # # V4L USB devices # -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_EM28XX=m +CONFIG_USB_DSBR=m CONFIG_VIDEO_USBVIDEO=m CONFIG_USB_VICAM=m CONFIG_USB_IBMCAM=m CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m CONFIG_USB_OV511=m CONFIG_USB_SE401=m CONFIG_USB_SN9C102=m CONFIG_USB_STV680=m +CONFIG_USB_W9968CF=m CONFIG_USB_ZC0301=m CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set # # Radio Adapters @@ -2129,7 +2039,6 @@ CONFIG_USB_PWC=m CONFIG_RADIO_GEMTEK_PCI=m CONFIG_RADIO_MAXIRADIO=m CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m # # Digital Video Broadcasting Devices @@ -2161,7 +2070,6 @@ CONFIG_DVB_USB_CXUSB=m CONFIG_DVB_USB_DIGITV=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m CONFIG_DVB_USB_NOVA_T_USB2=m CONFIG_DVB_USB_DTT200U=m CONFIG_DVB_TTUSB_BUDGET=m @@ -2234,20 +2142,13 @@ CONFIG_DVB_TDA10021=m CONFIG_DVB_STV0297=m # -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# ATSC (North American/Korean Terresterial DTV) frontends # CONFIG_DVB_NXT200X=m CONFIG_DVB_OR51211=m CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=m @@ -2262,13 +2163,12 @@ CONFIG_USB_DABUSB=m # # Graphics support # -# CONFIG_FIRMWARE_EDID is not set CONFIG_FB=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_FIRMWARE_EDID is not set CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_CIRRUS=m @@ -2279,15 +2179,13 @@ CONFIG_FB_CIRRUS=m # CONFIG_FB_IMSTT is not set CONFIG_FB_VGA16=m CONFIG_FB_VESA=y +CONFIG_VIDEO_SELECT=y # CONFIG_FB_HGA is not set # CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y +# CONFIG_FB_NVIDIA is not set CONFIG_FB_RIVA=m # CONFIG_FB_RIVA_I2C is not set # CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set CONFIG_FB_MATROX=m CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -2323,7 +2221,6 @@ CONFIG_FB_TRIDENT_ACCEL=y CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y @@ -2406,18 +2303,6 @@ CONFIG_SND_CMIPCI=m CONFIG_SND_CS4281=m CONFIG_SND_CS46XX=m CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m CONFIG_SND_EMU10K1=m CONFIG_SND_EMU10K1X=m CONFIG_SND_ENS1370=m @@ -2425,7 +2310,6 @@ CONFIG_SND_ENS1371=m CONFIG_SND_ES1938=m CONFIG_SND_ES1968=m CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y CONFIG_SND_FM801_TEA575X=m CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDSP=m @@ -2491,7 +2375,6 @@ CONFIG_USB_DEVICEFS=y CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_SPLIT_ISO=y CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y CONFIG_USB_ISP116X_HCD=m CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set @@ -2581,6 +2464,7 @@ CONFIG_USB_BELKIN=y CONFIG_USB_ARMLINUX=y CONFIG_USB_EPSON2888=y CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_ZD1201=m CONFIG_USB_MON=y # @@ -2594,6 +2478,7 @@ CONFIG_USB_USS720=m CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ANYDATA=m CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m @@ -2632,7 +2517,6 @@ CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m @@ -2650,12 +2534,10 @@ CONFIG_USB_RIO500=m CONFIG_USB_LEGOTOWER=m CONFIG_USB_LCD=m CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set CONFIG_USB_PHIDGETKIT=m CONFIG_USB_PHIDGETSERVO=m CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m CONFIG_USB_SISUSBVGA=m CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m @@ -2687,8 +2569,7 @@ CONFIG_MMC_WBSD=m # # LED devices # -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y +# CONFIG_NEW_LEDS is not set # # LED drivers @@ -2697,10 +2578,6 @@ CONFIG_LEDS_CLASS=y # # LED Triggers # -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m # # InfiniBand support @@ -2708,14 +2585,14 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y +CONFIG_IPATH_CORE=m +CONFIG_INFINIBAND_IPATH=m CONFIG_INFINIBAND_IPOIB=m CONFIG_INFINIBAND_IPOIB_DEBUG=y CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) @@ -2728,7 +2605,6 @@ CONFIG_EDAC=y # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_MM_EDAC=m CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m CONFIG_EDAC_POLL=y # @@ -2743,38 +2619,16 @@ CONFIG_RTC_CLASS=m CONFIG_RTC_INTF_SYSFS=m CONFIG_RTC_INTF_PROC=m CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # # RTC drivers # CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m # # Firmware Drivers @@ -2812,16 +2666,15 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m +CONFIG_XFS_EXPORT=y CONFIG_XFS_QUOTA=y CONFIG_XFS_SECURITY=y CONFIG_XFS_POSIX_ACL=y # CONFIG_XFS_RT is not set CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y @@ -2831,11 +2684,6 @@ CONFIG_AUTOFS_FS=m CONFIG_AUTOFS4_FS=m CONFIG_FUSE_FS=m -# -# Caches -# -CONFIG_FSCACHE=m - # # CD-ROM/DVD Filesystems # @@ -2845,8 +2693,6 @@ CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=y CONFIG_UDF_FS=m CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y # # DOS/FAT/NT Filesystems @@ -2863,7 +2709,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="ascii" # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_HUGETLBFS=y @@ -2887,7 +2732,6 @@ CONFIG_JFFS2_FS=m CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y @@ -2902,8 +2746,6 @@ CONFIG_VXFS_FS=m CONFIG_QNX4FS_FS=m CONFIG_SYSV_FS=m CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set # # Network File Systems @@ -2912,7 +2754,6 @@ CONFIG_NFS_FS=m CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y CONFIG_NFS_DIRECTIO=y CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y @@ -2929,13 +2770,12 @@ CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m CONFIG_RPCSEC_GSS_KRB5=m CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y CONFIG_CIFS_XATTR=y CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set # CONFIG_CIFS_EXPERIMENTAL is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y @@ -3026,39 +2866,27 @@ CONFIG_KPROBES=y # # Kernel hacking # -CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_KERNEL=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y +CONFIG_DEBUG_VM=y # CONFIG_FRAME_POINTER is not set CONFIG_UNWIND_INFO=y -CONFIG_STACK_UNWIND=y # CONFIG_FORCED_INLINING is not set CONFIG_BOOT_DELAY=y # CONFIG_RCU_TORTURE_TEST is not set CONFIG_DEBUG_RODATA=y # CONFIG_IOMMU_DEBUG is not set -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set # # Security options @@ -3067,7 +2895,7 @@ CONFIG_KEYS=y CONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY_ROOTPLUG is not set # CONFIG_SECURITY_SECLVL is not set @@ -3078,8 +2906,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set # # Cryptographic options @@ -3088,7 +2914,7 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m +CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m @@ -3127,10 +2953,7 @@ CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/configs/kernel-2.6.18-ia64-xen.config b/configs/kernel-2.6.18-ia64-xen.config deleted file mode 100644 index 7fea409eb..000000000 --- a/configs/kernel-2.6.18-ia64-xen.config +++ /dev/null @@ -1,2883 +0,0 @@ -# ia64 -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:41 2006 -# -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - -# -# Block layer -# -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -CONFIG_IA64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_SWIOTLB=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_TIME_INTERPOLATION=y -CONFIG_DMI=y -CONFIG_EFI=y -CONFIG_GENERIC_IOMAP=y -CONFIG_XEN=y -CONFIG_XEN_IA64_VDSO_PARAVIRT=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_DMA_IS_DMA32=y -CONFIG_AUDIT_ARCH=y -# CONFIG_IA64_GENERIC is not set -CONFIG_IA64_DIG=y -# CONFIG_IA64_HP_ZX1 is not set -# CONFIG_IA64_HP_ZX1_SWIOTLB is not set -# CONFIG_IA64_SGI_SN2 is not set -# CONFIG_IA64_HP_SIM is not set -# CONFIG_ITANIUM is not set -CONFIG_MCKINLEY=y -# CONFIG_IA64_PAGE_SIZE_4KB is not set -# CONFIG_IA64_PAGE_SIZE_8KB is not set -CONFIG_IA64_PAGE_SIZE_16KB=y -# CONFIG_IA64_PAGE_SIZE_64KB is not set -CONFIG_PGTABLE_3=y -# CONFIG_PGTABLE_4 is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_IA64_L1_CACHE_SHIFT=7 -CONFIG_IA64_CYCLONE=y -CONFIG_IOSAPIC=y -CONFIG_FORCE_MAX_ZONEORDER=11 -CONFIG_SMP=y -CONFIG_NR_CPUS=1024 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_SCHED_SMT=y -# CONFIG_PERMIT_BSP_REMOVE is not set -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_DISCONTIGMEM_ENABLE=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -# CONFIG_VIRTUAL_MEM_MAP is not set -# CONFIG_IA32_SUPPORT is not set -CONFIG_IA64_MCA_RECOVERY=m -CONFIG_PERFMON=y -CONFIG_IA64_PALINFO=y - -# -# Firmware Drivers -# -CONFIG_EFI_VARS=y -CONFIG_EFI_PCDP=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y - -# -# Power management and ACPI -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_FAN=y -# CONFIG_ACPI_DOCK is not set -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_CONTAINER=y - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=m -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_IA64_ACPI_CPUFREQ=m - -# -# Bus options (PCI, PCMCIA) -# -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_XEN_PCIDEV_FRONTEND=y -# CONFIG_XEN_PCIDEV_FE_DEBUG is not set -CONFIG_PCIEPORTBUS=y -# CONFIG_HOTPLUG_PCI_PCIE is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -# CONFIG_LLC2 is not set -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_TOIM3232_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_MCS_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -CONFIG_IEEE80211_DEBUG=y -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_IDEPNP=y -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_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -CONFIG_IEEE1394_OUI_DB=y -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -# CONFIG_IEEE1394_EXPORT_FULL_API is not set - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_NET_SB1000=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -# CONFIG_BCM43XX is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -# CONFIG_HIPPI is not set -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON 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 is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_I8XX_TCO=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -# CONFIG_HW_RANDOM is not set -CONFIG_EFI_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_I460=y -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_RAW_DRIVER is not set -# CONFIG_HPET is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -CONFIG_I2C_STUB=m -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_CON=y - -# -# 1-wire Bus Masters -# -CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m -CONFIG_W1_MASTER_DS2482=m - -# -# 1-wire Slaves -# -CONFIG_W1_SLAVE_THERM=m -CONFIG_W1_SLAVE_SMEM=m -CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_CPIA2=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_XFS_RT is not set -CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_GENERIC_PENDING_IRQ=y -CONFIG_IRQ_PER_CPU=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_IA64_GRANULE_16MB is not set -CONFIG_IA64_GRANULE_64MB=y -# CONFIG_IA64_PRINT_HAZARDS is not set -# CONFIG_DISABLE_VHPT is not set -# CONFIG_IA64_DEBUG_CMPXCHG is not set -# CONFIG_IA64_DEBUG_IRQ is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# -# CONFIG_XEN_UTIL is not set -CONFIG_HAVE_ARCH_ALLOC_SKB=y -CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y -CONFIG_XEN_BALLOON=y -CONFIG_XEN_SKBUFF=y -# CONFIG_XEN_DEVMEM is not set -CONFIG_XEN_REBOOT=y -# CONFIG_XEN_SMPBOOT is not set -CONFIG_XEN_INTERFACE_VERSION=0x00030203 - -# -# XEN -# -CONFIG_XEN_PRIVILEGED_GUEST=y -# CONFIG_XEN_UNPRIVILEGED_GUEST is not set -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_XENBUS_DEV=y -CONFIG_XEN_BACKEND=y -CONFIG_XEN_BLKDEV_BACKEND=m -# CONFIG_XEN_BLKDEV_TAP is not set -CONFIG_XEN_NETDEV_BACKEND=m -# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set -CONFIG_XEN_NETDEV_LOOPBACK=m -# CONFIG_XEN_PCIDEV_BACKEND is not set -# CONFIG_XEN_TPMDEV_BACKEND is not set -CONFIG_XEN_BLKDEV_FRONTEND=m -CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y -CONFIG_XEN_SCRUB_PAGES=y -CONFIG_XEN_DISABLE_SERIAL=y -CONFIG_XEN_SYSFS=y -CONFIG_XEN_COMPAT_030002_AND_LATER=y -# CONFIG_XEN_COMPAT_LATEST_ONLY is not set -CONFIG_XEN_COMPAT_030002=y -CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y -CONFIG_NO_IDLE_HZ=y diff --git a/configs/kernel-2.6.18-ppc64-kdump.config b/configs/kernel-2.6.18-ppc64-kdump.config deleted file mode 100644 index aba782700..000000000 --- a/configs/kernel-2.6.18-ppc64-kdump.config +++ /dev/null @@ -1,3039 +0,0 @@ -# powerpc -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:42 2006 -# -CONFIG_PPC64=y -CONFIG_64BIT=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_PPC_UDBG_16550=y -CONFIG_GENERIC_TBSYNC=y -CONFIG_AUDIT_ARCH=y -# CONFIG_DEFAULT_UIMAGE is not set - -# -# Processor support -# -# CONFIG_POWER4_ONLY is not set -CONFIG_POWER3=y -CONFIG_POWER4=y -CONFIG_PPC_FPU=y -CONFIG_ALTIVEC=y -CONFIG_PPC_STD_MMU=y -CONFIG_VIRT_CPU_ACCOUNTING=y -CONFIG_SMP=y -CONFIG_NR_CPUS=128 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - -# -# Block layer -# -CONFIG_BLK_DEV_IO_TRACE=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Platform support -# -CONFIG_PPC_MULTIPLATFORM=y -# CONFIG_PPC_ISERIES is not set -# CONFIG_EMBEDDED6xx is not set -# CONFIG_APUS is not set -CONFIG_PPC_PSERIES=y -CONFIG_PPC_PMAC=y -CONFIG_PPC_PMAC64=y -# CONFIG_PPC_MAPLE is not set -CONFIG_PPC_CELL=y -CONFIG_PPC_CELL_NATIVE=y -CONFIG_PPC_IBM_CELL_BLADE=y -CONFIG_UDBG_RTAS_CONSOLE=y -CONFIG_MAMBO=y -CONFIG_MAMBO_DISK=m -CONFIG_MAMBO_NET=m -CONFIG_XICS=y -CONFIG_U3_DART=y -CONFIG_PPC_RTAS=y -CONFIG_RTAS_ERROR_LOGGING=y -CONFIG_RTAS_PROC=y -CONFIG_RTAS_FLASH=y -CONFIG_MMIO_NVRAM=y -CONFIG_MPIC_BROKEN_U3=y -CONFIG_IBMVIO=y -CONFIG_IBMEBUS=y -# CONFIG_PPC_MPC106 is not set -CONFIG_PPC_970_NAP=y -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m -CONFIG_CPU_FREQ_PMAC64=y -# CONFIG_WANT_EARLY_SERIAL is not set -CONFIG_MPIC=y - -# -# Cell Broadband Engine options -# -CONFIG_SPU_FS=m -CONFIG_SPU_BASE=y -CONFIG_SPUFS_MMAP=y -CONFIG_CBE_RAS=y - -# -# Kernel options -# -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_FORCE_MAX_ZONEORDER=9 -CONFIG_IOMMU_VMERGE=y -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_KEXEC=y -CONFIG_CRASH_DUMP=y -CONFIG_IRQ_ALL_CPUS=y -CONFIG_PPC_SPLPAR=y -CONFIG_EEH=y -CONFIG_SCANLOG=y -CONFIG_LPARCFG=y -CONFIG_NUMA=y -CONFIG_NODES_SHIFT=4 -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -# CONFIG_DISCONTIGMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_MEMORY_HOTPLUG=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MIGRATION=y -CONFIG_RESOURCES_64BIT=y -CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y -CONFIG_ARCH_MEMORY_PROBE=y -CONFIG_NODES_SPAN_OTHER_NODES=y -CONFIG_PPC_64K_PAGES=y -CONFIG_SCHED_SMT=y -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_SECCOMP is not set -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_GENERIC_ISA_DMA=y -# CONFIG_MPIC_WEIRD is not set -CONFIG_PPC_I8259=y -# CONFIG_PPC_INDIRECT_PCI is not set -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCIEPORTBUS=y -# CONFIG_HOTPLUG_PCI_PCIE is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE=y -CONFIG_HOTPLUG_PCI_RPA=m -CONFIG_HOTPLUG_PCI_RPA_DLPAR=m -CONFIG_KERNEL_START=0xc000000000000000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -# CONFIG_LLC2 is not set -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_TOIM3232_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -CONFIG_IEEE80211_DEBUG=y -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -# CONFIG_BLK_CPQ_DA is not set -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# 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_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -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_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_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_TRIFLEX=y -# CONFIG_BLK_DEV_CY82C693 is not set -CONFIG_BLK_DEV_CS5520=y -CONFIG_BLK_DEV_CS5530=y -CONFIG_BLK_DEV_HPT34X=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -CONFIG_BLK_DEV_IDE_PMAC=y -CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y -CONFIG_BLK_DEV_IDEDMA_PMAC=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_IBMVSCSI=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -CONFIG_SCSI_IPR=m -CONFIG_SCSI_IPR_TRACE=y -CONFIG_SCSI_IPR_DUMP=y -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -CONFIG_IEEE1394_OUI_DB=y -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -# CONFIG_IEEE1394_EXPORT_FULL_API is not set - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -CONFIG_ADB_PMU=y -CONFIG_ADB_PMU_LED=y -CONFIG_ADB_PMU_LED_IDE=y -CONFIG_PMAC_SMU=y -CONFIG_THERM_PM72=y -CONFIG_WINDFARM=y -CONFIG_WINDFARM_PM81=y -CONFIG_WINDFARM_PM91=y -CONFIG_WINDFARM_PM112=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_IBMVETH=m -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m -CONFIG_SPIDER_NET=m -# CONFIG_MV643XX_ETH is not set - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_APPLE_AIRPORT=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -# CONFIG_ATM_FIRESTREAM is not set -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -# CONFIG_ATM_AMBASSADOR is not set -# CONFIG_ATM_HORIZON is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -# CONFIG_HIPPI is not set -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -CONFIG_CAPI_EICON=y -CONFIG_ISDN_DIVAS=m -CONFIG_ISDN_DIVAS_BRIPCI=y -CONFIG_ISDN_DIVAS_PRIPCI=y -CONFIG_ISDN_DIVAS_DIVACAPI=m -CONFIG_ISDN_DIVAS_USERIDI=m -CONFIG_ISDN_DIVAS_MAINT=m - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_PCSPKR is not set -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_PARKBD is not set -# CONFIG_SERIO_PCIPS2 is not set -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_SERIAL_PMACZILOG=m -CONFIG_SERIAL_ICOM=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_CRASH is not set -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -CONFIG_TIPAR=m -CONFIG_HVC_DRIVER=y -CONFIG_HVC_CONSOLE=y -CONFIG_HVC_RTAS=y -CONFIG_HVCS=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -CONFIG_WATCHDOG_RTAS=m - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_GEN_RTC=y -# CONFIG_GEN_RTC_X is not set -CONFIG_DTLK=m -CONFIG_R3964=m -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_AGP_UNINORTH=y -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -# CONFIG_RAW_DRIVER is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -CONFIG_TCG_TPM=m -CONFIG_TCG_ATMEL=m -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=y -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -# CONFIG_I2C_AMD756 is not set -# CONFIG_I2C_AMD8111 is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_POWERMAC=y -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -# CONFIG_I2C_SIS96X is not set -CONFIG_I2C_STUB=m -# CONFIG_I2C_VIA is not set -# CONFIG_I2C_VIAPRO is not set -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_CON=y - -# -# 1-wire Bus Masters -# -CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m -CONFIG_W1_MASTER_DS2482=m - -# -# 1-wire Slaves -# -CONFIG_W1_SLAVE_THERM=m -CONFIG_W1_SLAVE_SMEM=m -CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_CPIA2=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -CONFIG_FB_MACMODES=y -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -CONFIG_FB_OF=y -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -# CONFIG_FB_VGA16 is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -CONFIG_FB_RADEON=y -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# ALSA PowerMac devices -# -CONFIG_SND_POWERMAC=m -CONFIG_SND_POWERMAC_AUTO_DRC=y - -# -# Apple Onboard Audio driver -# -CONFIG_SND_AOA=m -CONFIG_SND_AOA_FABRIC_LAYOUT=m -CONFIG_SND_AOA_ONYX=m -CONFIG_SND_AOA_TAS=m -CONFIG_SND_AOA_TOONIE=m -CONFIG_SND_AOA_SOUNDBUS=m -CONFIG_SND_AOA_SOUNDBUS_I2S=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -CONFIG_USB_HIDINPUT_POWERBOOK=y -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_XFS_RT is not set -CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_VMCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_HUGETLBFS=y -CONFIG_HUGETLB_PAGE=y -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_STACKOVERFLOW=y -CONFIG_DEBUG_STACK_USAGE=y -CONFIG_DEBUGGER=y -CONFIG_XMON=y -CONFIG_XMON_DEFAULT=y -CONFIG_IRQSTACKS=y -CONFIG_BOOTX_TEXT=y -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set -CONFIG_KEYS_COMPAT=y - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# diff --git a/configs/kernel-2.6.18-x86_64-xen.config b/configs/kernel-2.6.18-x86_64-xen.config deleted file mode 100644 index b4a0c30c0..000000000 --- a/configs/kernel-2.6.18-x86_64-xen.config +++ /dev/null @@ -1,3144 +0,0 @@ -# x86_64 -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:43 2006 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_64_XEN=y -CONFIG_X86_NO_TSS=y -CONFIG_X86_NO_IDT=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=y -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_XEN_GENAPIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_NR_CPUS=8 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_CALGARY_IOMMU=y -CONFIG_SWIOTLB=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_REORDER=y -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -# CONFIG_PCI_MMCONFIG is not set -CONFIG_XEN_PCIDEV_FRONTEND=y -# CONFIG_XEN_PCIDEV_FE_DEBUG is not set -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -# CONFIG_LLC2 is not set -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_TOIM3232_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# 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_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -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_RZ1000 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_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -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=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -CONFIG_IEEE1394_OUI_DB=y -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -# CONFIG_IEEE1394_EXPORT_FULL_API is not set - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_NET_SB1000=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -# CONFIG_HIPPI is not set -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON 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 is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -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 -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_PCI=m -CONFIG_SERIAL_8250_PNP=m -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -# CONFIG_RAW_DRIVER is not set -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_CON=y - -# -# 1-wire Bus Masters -# -CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m -CONFIG_W1_MASTER_DS2482=m - -# -# 1-wire Slaves -# -CONFIG_W1_SLAVE_THERM=m -CONFIG_W1_SLAVE_SMEM=m -CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_CPIA2=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_XFS_RT is not set -CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# -CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 - -# -# XEN -# -CONFIG_XEN_PRIVILEGED_GUEST=y -# CONFIG_XEN_UNPRIVILEGED_GUEST is not set -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_XENBUS_DEV=y -CONFIG_XEN_BACKEND=y -CONFIG_XEN_BLKDEV_BACKEND=m -CONFIG_XEN_BLKDEV_TAP=m -CONFIG_XEN_NETDEV_BACKEND=m -# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set -CONFIG_XEN_NETDEV_LOOPBACK=m -CONFIG_XEN_PCIDEV_BACKEND=m -CONFIG_XEN_PCIDEV_BACKEND_VPCI=y -# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set -# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set -# CONFIG_XEN_PCIDEV_BE_DEBUG is not set -# CONFIG_XEN_TPMDEV_BACKEND is not set -CONFIG_XEN_BLKDEV_FRONTEND=m -CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y -CONFIG_XEN_SCRUB_PAGES=y -# CONFIG_XEN_DISABLE_SERIAL is not set -CONFIG_XEN_SYSFS=y -CONFIG_XEN_COMPAT_030002_AND_LATER=y -# CONFIG_XEN_COMPAT_LATEST_ONLY is not set -CONFIG_XEN_COMPAT_030002=y -CONFIG_HAVE_ARCH_ALLOC_SKB=y -CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y -CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y -CONFIG_NO_IDLE_HZ=y -CONFIG_XEN_UTIL=y -CONFIG_XEN_BALLOON=y -CONFIG_XEN_DEVMEM=y -CONFIG_XEN_SKBUFF=y -CONFIG_XEN_REBOOT=y -CONFIG_XEN_SMPBOOT=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/configs/kernel-2.6.18-x86_64-xen0.config b/configs/kernel-2.6.18-x86_64-xen0.config deleted file mode 100644 index 25d6f9044..000000000 --- a/configs/kernel-2.6.18-x86_64-xen0.config +++ /dev/null @@ -1,3144 +0,0 @@ -# x86_64 -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.18.2-rc1 -# Mon Nov 13 09:44:43 2006 -# -CONFIG_X86_64=y -CONFIG_64BIT=y -CONFIG_X86=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_MMU=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_CMPXCHG=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y -CONFIG_AUDIT_ARCH=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_LOCK_KERNEL=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -# CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -CONFIG_AUDIT=y -CONFIG_AUDITSYSCALL=y -# CONFIG_IKCONFIG is not set -CONFIG_CPUSETS=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_UID16=y -CONFIG_SYSCTL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -CONFIG_MODULE_SIG=y -# CONFIG_MODULE_SIG_FORCE is not set -CONFIG_KMOD=y -CONFIG_STOP_MACHINE=y - -# -# Process debugging support -# -CONFIG_UTRACE=y -CONFIG_PTRACE=y - -# -# Block layer -# -CONFIG_LBD=y -CONFIG_BLK_DEV_IO_TRACE=y -CONFIG_LSF=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" - -# -# Processor type and features -# -CONFIG_X86_PC=y -# CONFIG_X86_VSMP is not set -# CONFIG_MK8 is not set -# CONFIG_MPSC is not set -CONFIG_GENERIC_CPU=y -CONFIG_X86_64_XEN=y -CONFIG_X86_NO_TSS=y -CONFIG_X86_NO_IDT=y -CONFIG_X86_L1_CACHE_BYTES=128 -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_X86_INTERNODE_CACHE_BYTES=128 -CONFIG_X86_GOOD_APIC=y -CONFIG_MICROCODE=y -CONFIG_X86_MSR=y -CONFIG_X86_CPUID=y -CONFIG_X86_IO_APIC=y -CONFIG_X86_XEN_GENAPIC=y -CONFIG_X86_LOCAL_APIC=y -CONFIG_MTRR=y -CONFIG_SMP=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_PREEMPT_BKL=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4096 -CONFIG_RESOURCES_64BIT=y -CONFIG_NR_CPUS=8 -CONFIG_HOTPLUG_CPU=y -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_CALGARY_IOMMU=y -CONFIG_SWIOTLB=y -# CONFIG_CRASH_DUMP is not set -CONFIG_PHYSICAL_START=0x200000 -# CONFIG_SECCOMP is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_REORDER=y -CONFIG_K8_NB=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_ISA_DMA_API=y -CONFIG_GENERIC_PENDING_IRQ=y - -# -# Power management options -# -CONFIG_PM=y - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -CONFIG_ACPI=y -CONFIG_ACPI_AC=m -CONFIG_ACPI_BATTERY=m -CONFIG_ACPI_BUTTON=m -CONFIG_ACPI_VIDEO=m -# CONFIG_ACPI_HOTKEY is not set -CONFIG_ACPI_FAN=y -CONFIG_ACPI_DOCK=m -CONFIG_ACPI_PROCESSOR=y -CONFIG_ACPI_HOTPLUG_CPU=y -CONFIG_ACPI_THERMAL=y -CONFIG_ACPI_ASUS=m -CONFIG_ACPI_IBM=m -CONFIG_ACPI_TOSHIBA=m -CONFIG_ACPI_BLACKLIST_YEAR=0 -# CONFIG_ACPI_DEBUG is not set -CONFIG_ACPI_EC=y -CONFIG_ACPI_POWER=y -CONFIG_ACPI_SYSTEM=y -CONFIG_ACPI_CONTAINER=y -CONFIG_ACPI_SBS=m - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=m -CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=m -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=m -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m - -# -# CPUFreq processor drivers -# -CONFIG_X86_POWERNOW_K8=y -CONFIG_X86_POWERNOW_K8_ACPI=y -CONFIG_X86_SPEEDSTEP_CENTRINO=y -CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y -CONFIG_X86_ACPI_CPUFREQ=m - -# -# shared options -# -# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI etc.) -# -CONFIG_PCI=y -CONFIG_PCI_DIRECT=y -# CONFIG_PCI_MMCONFIG is not set -CONFIG_XEN_PCIDEV_FRONTEND=y -# CONFIG_XEN_PCIDEV_FE_DEBUG is not set -CONFIG_PCIEPORTBUS=y -CONFIG_HOTPLUG_PCI_PCIE=m -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set -# CONFIG_PCI_DEBUG is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=y -CONFIG_YENTA_O2=y -CONFIG_YENTA_RICOH=y -CONFIG_YENTA_TI=y -CONFIG_YENTA_ENE_TUNE=y -CONFIG_YENTA_TOSHIBA=y -CONFIG_PD6729=m -CONFIG_I82092=m -CONFIG_PCCARD_NONSTATIC=y - -# -# PCI Hotplug Support -# -CONFIG_HOTPLUG_PCI=y -CONFIG_HOTPLUG_PCI_FAKE=m -CONFIG_HOTPLUG_PCI_ACPI=m -CONFIG_HOTPLUG_PCI_ACPI_IBM=m -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_SHPC=m -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set - -# -# Executable file formats / Emulations -# -CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y -CONFIG_IA32_EMULATION=y -# CONFIG_IA32_AOUT is not set -CONFIG_COMPAT=y -CONFIG_SYSVIPC_COMPAT=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=m -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -CONFIG_INET_AH=m -CONFIG_INET_ESP=m -CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m -CONFIG_TCP_CONG_LP=m -CONFIG_TCP_CONG_VENO=m - -# -# IP: Virtual Server Configuration -# -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m -CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NETWORK_SECMARK=y -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -CONFIG_NETFILTER_NETLINK=m -CONFIG_NETFILTER_NETLINK_QUEUE=m -CONFIG_NETFILTER_NETLINK_LOG=m -CONFIG_NETFILTER_XTABLES=m -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_TARGET_SECMARK=m -CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_QUOTA=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=m -CONFIG_NETFILTER_XT_MATCH_STATISTIC=m -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=m - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_CONNTRACK=m -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y -CONFIG_IP_NF_CONNTRACK_SECMARK=y -CONFIG_IP_NF_CONNTRACK_EVENTS=y -CONFIG_IP_NF_CONNTRACK_NETLINK=m -CONFIG_IP_NF_CT_PROTO_SCTP=m -CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -CONFIG_IP_NF_NETBIOS_NS=m -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m -CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_DSCP=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_MATCH_HASHLIMIT=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m -CONFIG_IP_NF_NAT=m -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m -CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m -CONFIG_IP_NF_NAT_H323=m -CONFIG_IP_NF_NAT_SIP=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_DSCP=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_TARGET_CLUSTERIP=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# DECnet: Netfilter Configuration -# -# CONFIG_DECNET_NF_GRABULATOR is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP=m -CONFIG_INET_DCCP_DIAG=m -CONFIG_IP_DCCP_ACKVEC=y - -# -# DCCP CCIDs Configuration (EXPERIMENTAL) -# -CONFIG_IP_DCCP_CCID2=m -CONFIG_IP_DCCP_CCID3=m -CONFIG_IP_DCCP_TFRC_LIB=m - -# -# DCCP Kernel Hacking -# -# CONFIG_IP_DCCP_DEBUG is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y - -# -# TIPC Configuration (EXPERIMENTAL) -# -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -# CONFIG_ATM_CLIP_NO_ICMP is not set -CONFIG_ATM_LANE=m -# CONFIG_ATM_MPOA is not set -CONFIG_ATM_BR2684=m -# CONFIG_ATM_BR2684_IPFILTER is not set -CONFIG_BRIDGE=m -CONFIG_VLAN_8021Q=m -CONFIG_DECNET=m -CONFIG_DECNET_ROUTER=y -CONFIG_DECNET_ROUTE_FWMARK=y -CONFIG_LLC=y -# CONFIG_LLC2 is not set -CONFIG_IPX=m -# CONFIG_IPX_INTERN is not set -CONFIG_ATALK=m -CONFIG_DEV_APPLETALK=m -CONFIG_IPDDP=m -CONFIG_IPDDP_ENCAP=y -CONFIG_IPDDP_DECAP=y -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -CONFIG_WAN_ROUTER=m - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -CONFIG_NET_PKTGEN=m -# CONFIG_NET_TCPPROBE is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_TOIM3232_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m - -# -# Old SIR device drivers -# - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_CMTP=m -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -CONFIG_IEEE80211_SOFTMAC_DEBUG=y -CONFIG_TUX=m - -# -# TUX options -# -CONFIG_TUX_EXTCGI=y -CONFIG_TUX_EXTENDED_LOG=y -# CONFIG_TUX_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=m -# CONFIG_MTD_DEBUG is not set -CONFIG_MTD_CONCAT=m -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_REDBOOT_PARTS=m -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 -# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set -# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set -CONFIG_MTD_CMDLINE_PARTS=y - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=m -CONFIG_MTD_BLOCK=m -CONFIG_MTD_BLOCK_RO=m -CONFIG_FTL=m -CONFIG_NFTL=m -CONFIG_NFTL_RW=y -CONFIG_INFTL=m -CONFIG_RFD_FTL=m - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=m -CONFIG_MTD_JEDECPROBE=m -CONFIG_MTD_GEN_PROBE=m -# CONFIG_MTD_CFI_ADV_OPTIONS is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_CFI_INTELEXT=m -CONFIG_MTD_CFI_AMDSTD=m -CONFIG_MTD_CFI_STAA=m -CONFIG_MTD_CFI_UTIL=m -CONFIG_MTD_RAM=m -CONFIG_MTD_ROM=m -CONFIG_MTD_ABSENT=m -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_PNC2000 is not set -CONFIG_MTD_SC520CDP=m -CONFIG_MTD_NETSC520=m -CONFIG_MTD_TS5500=m -# CONFIG_MTD_SBC_GXX is not set -# CONFIG_MTD_AMD76XROM is not set -# CONFIG_MTD_ICHXROM is not set -CONFIG_MTD_SCB2_FLASH=m -# CONFIG_MTD_NETtel is not set -# CONFIG_MTD_DILNETPC is not set -# CONFIG_MTD_L440GX is not set -CONFIG_MTD_PCI=m -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -CONFIG_MTD_PMC551=m -# CONFIG_MTD_PMC551_BUGFIX is not set -# CONFIG_MTD_PMC551_DEBUG is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -CONFIG_MTD_MTDRAM=m -CONFIG_MTDRAM_TOTAL_SIZE=4096 -CONFIG_MTDRAM_ERASE_SIZE=128 -CONFIG_MTD_BLOCK2MTD=m - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -CONFIG_MTD_NAND=m -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -CONFIG_MTD_NAND_ECC_SMC=y -CONFIG_MTD_NAND_IDS=m -CONFIG_MTD_NAND_DISKONCHIP=m -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set -CONFIG_MTD_NAND_NANDSIM=m - -# -# OneNAND Flash Device Drivers -# -# CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -CONFIG_PARPORT=m -CONFIG_PARPORT_PC=m -CONFIG_PARPORT_SERIAL=m -# CONFIG_PARPORT_PC_FIFO is not set -# CONFIG_PARPORT_PC_SUPERIO is not set -CONFIG_PARPORT_PC_PCMCIA=m -CONFIG_PARPORT_NOT_PC=y -# CONFIG_PARPORT_GSC is not set -# CONFIG_PARPORT_AX88796 is not set -CONFIG_PARPORT_1284=y - -# -# Plug and Play support -# -CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_PNPACPI=y - -# -# Block devices -# -CONFIG_BLK_DEV_FD=m -CONFIG_PARIDE=m -CONFIG_PARIDE_PARPORT=m - -# -# Parallel IDE high-level drivers -# -CONFIG_PARIDE_PD=m -CONFIG_PARIDE_PCD=m -CONFIG_PARIDE_PF=m -CONFIG_PARIDE_PT=m -CONFIG_PARIDE_PG=m - -# -# Parallel IDE protocol modules -# -CONFIG_PARIDE_ATEN=m -CONFIG_PARIDE_BPCK=m -CONFIG_PARIDE_COMM=m -CONFIG_PARIDE_DSTR=m -CONFIG_PARIDE_FIT2=m -CONFIG_PARIDE_FIT3=m -CONFIG_PARIDE_EPAT=m -CONFIG_PARIDE_EPATC8=y -CONFIG_PARIDE_EPIA=m -CONFIG_PARIDE_FRIQ=m -CONFIG_PARIDE_FRPW=m -CONFIG_PARIDE_KBIC=m -CONFIG_PARIDE_KTTI=m -CONFIG_PARIDE_ON20=m -CONFIG_PARIDE_ON26=m -CONFIG_BLK_CPQ_DA=m -CONFIG_BLK_CPQ_CISS_DA=m -CONFIG_CISS_SCSI_TAPE=y -CONFIG_BLK_DEV_DAC960=m -CONFIG_BLK_DEV_UMEM=m -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -CONFIG_BLK_DEV_SX8=m -CONFIG_BLK_DEV_UB=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096 -CONFIG_BLK_DEV_INITRD=y -CONFIG_CDROM_PKTCDVD=m -CONFIG_CDROM_PKTCDVD_BUFFERS=8 -# CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m - -# -# 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_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=m -CONFIG_BLK_DEV_IDECD=m -# CONFIG_BLK_DEV_IDETAPE is not set -CONFIG_BLK_DEV_IDEFLOPPY=y -CONFIG_BLK_DEV_IDESCSI=m -CONFIG_IDE_TASK_IOCTL=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -CONFIG_BLK_DEV_IDEPNP=y -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_RZ1000 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_BLK_DEV_AEC62XX=y -CONFIG_BLK_DEV_ALI15X3=y -# CONFIG_WDC_ALI15X3 is not set -CONFIG_BLK_DEV_AMD74XX=y -CONFIG_BLK_DEV_ATIIXP=y -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=y -# CONFIG_HPT34X_AUTODMA is not set -CONFIG_BLK_DEV_HPT366=y -# CONFIG_BLK_DEV_SC1200 is not set -CONFIG_BLK_DEV_PIIX=y -CONFIG_BLK_DEV_IT821X=y -# CONFIG_BLK_DEV_NS87415 is not set -CONFIG_BLK_DEV_PDC202XX_OLD=y -# CONFIG_PDC202XX_BURST is not set -CONFIG_BLK_DEV_PDC202XX_NEW=y -CONFIG_BLK_DEV_SVWKS=y -CONFIG_BLK_DEV_SIIMAGE=y -CONFIG_BLK_DEV_SIS5513=y -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -CONFIG_RAID_ATTRS=m -CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_CHR_DEV_SG=m -CONFIG_CHR_DEV_SCH=m - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_CONSTANTS=y -CONFIG_SCSI_LOGGING=y - -# -# SCSI Transport Attributes -# -CONFIG_SCSI_SPI_ATTRS=m -CONFIG_SCSI_FC_ATTRS=m -CONFIG_SCSI_ISCSI_ATTRS=m -CONFIG_SCSI_SAS_ATTRS=m - -# -# SCSI low-level drivers -# -CONFIG_ISCSI_TCP=m -CONFIG_BLK_DEV_3W_XXXX_RAID=m -CONFIG_SCSI_3W_9XXX=m -CONFIG_SCSI_ACARD=m -CONFIG_SCSI_AACRAID=m -CONFIG_SCSI_AIC7XXX=m -CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set -CONFIG_AIC7XXX_DEBUG_MASK=0 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set -CONFIG_SCSI_AIC7XXX_OLD=m -CONFIG_SCSI_AIC79XX=m -CONFIG_AIC79XX_CMDS_PER_DEVICE=4 -CONFIG_AIC79XX_RESET_DELAY_MS=15000 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set -# CONFIG_AIC79XX_DEBUG_ENABLE is not set -CONFIG_AIC79XX_DEBUG_MASK=0 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set -CONFIG_MEGARAID_NEWGEN=y -CONFIG_MEGARAID_MM=m -CONFIG_MEGARAID_MAILBOX=m -CONFIG_MEGARAID_LEGACY=m -CONFIG_MEGARAID_SAS=m -CONFIG_SCSI_SATA=m -CONFIG_SCSI_SATA_AHCI=m -CONFIG_SCSI_SATA_SVW=m -CONFIG_SCSI_ATA_PIIX=m -CONFIG_SCSI_SATA_MV=m -CONFIG_SCSI_SATA_NV=m -CONFIG_SCSI_PDC_ADMA=m -CONFIG_SCSI_HPTIOP=m -CONFIG_SCSI_SATA_QSTOR=m -CONFIG_SCSI_SATA_PROMISE=m -CONFIG_SCSI_SATA_SX4=m -CONFIG_SCSI_SATA_SIL=m -CONFIG_SCSI_SATA_SIL24=m -CONFIG_SCSI_SATA_SIS=m -CONFIG_SCSI_SATA_ULI=m -CONFIG_SCSI_SATA_VIA=m -CONFIG_SCSI_SATA_VITESSE=m -CONFIG_SCSI_SATA_INTEL_COMBINED=y -CONFIG_SCSI_BUSLOGIC=m -# CONFIG_SCSI_OMIT_FLASHPOINT is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_GDTH=m -CONFIG_SCSI_IPS=m -CONFIG_SCSI_INITIO=m -CONFIG_SCSI_INIA100=m -CONFIG_SCSI_PPA=m -CONFIG_SCSI_IMM=m -# CONFIG_SCSI_IZIP_EPP16 is not set -# CONFIG_SCSI_IZIP_SLOW_CTR is not set -CONFIG_SCSI_SYM53C8XX_2=m -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 -CONFIG_SCSI_SYM53C8XX_MMIO=y -# CONFIG_SCSI_IPR is not set -CONFIG_SCSI_QLOGIC_1280=m -CONFIG_SCSI_QLA_FC=m -CONFIG_SCSI_LPFC=m -CONFIG_SCSI_DC395x=m -CONFIG_SCSI_DC390T=m -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_FDOMAIN is not set -CONFIG_PCMCIA_QLOGIC=m -CONFIG_PCMCIA_SYM53C500=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=y -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID456=m -CONFIG_MD_RAID5_RESHAPE=y -CONFIG_MD_MULTIPATH=m -CONFIG_MD_FAULTY=m -CONFIG_BLK_DEV_DM=m -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m - -# -# Fusion MPT device support -# -CONFIG_FUSION=y -CONFIG_FUSION_SPI=m -CONFIG_FUSION_FC=m -CONFIG_FUSION_SAS=m -CONFIG_FUSION_MAX_SGE=40 -CONFIG_FUSION_CTL=m -CONFIG_FUSION_LAN=m - -# -# IEEE 1394 (FireWire) support -# -CONFIG_IEEE1394=m - -# -# Subsystem Options -# -# CONFIG_IEEE1394_VERBOSEDEBUG is not set -CONFIG_IEEE1394_OUI_DB=y -CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y -CONFIG_IEEE1394_CONFIG_ROM_IP1394=y -# CONFIG_IEEE1394_EXPORT_FULL_API is not set - -# -# Device Drivers -# -CONFIG_IEEE1394_PCILYNX=m -CONFIG_IEEE1394_OHCI1394=m - -# -# Protocol Drivers -# -CONFIG_IEEE1394_VIDEO1394=m -CONFIG_IEEE1394_SBP2=m -CONFIG_IEEE1394_ETH1394=m -CONFIG_IEEE1394_DV1394=m -CONFIG_IEEE1394_RAWIO=m - -# -# I2O device support -# -CONFIG_I2O=m -# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set -CONFIG_I2O_EXT_ADAPTEC=y -CONFIG_I2O_EXT_ADAPTEC_DMA64=y -CONFIG_I2O_CONFIG=m -CONFIG_I2O_CONFIG_OLD_IOCTL=y -CONFIG_I2O_BUS=m -CONFIG_I2O_BLOCK=m -CONFIG_I2O_SCSI=m -CONFIG_I2O_PROC=m - -# -# Network device support -# -CONFIG_NETDEVICES=y -CONFIG_IFB=m -CONFIG_DUMMY=m -CONFIG_BONDING=m -CONFIG_EQUALIZER=m -CONFIG_TUN=m -CONFIG_NET_SB1000=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m -CONFIG_VITESSE_PHY=m -CONFIG_SMSC_PHY=m -CONFIG_FIXED_PHY=m -CONFIG_FIXED_MII_10_FDX=y -CONFIG_FIXED_MII_100_FDX=y - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_HAPPYMEAL=m -CONFIG_SUNGEM=m -CONFIG_CASSINI=m -CONFIG_NET_VENDOR_3COM=y -CONFIG_VORTEX=m -CONFIG_TYPHOON=m - -# -# Tulip family network device support -# -CONFIG_NET_TULIP=y -CONFIG_DE2104X=m -CONFIG_TULIP=m -# CONFIG_TULIP_MWI is not set -CONFIG_TULIP_MMIO=y -# CONFIG_TULIP_NAPI is not set -CONFIG_DE4X5=m -CONFIG_WINBOND_840=m -CONFIG_DM9102=m -CONFIG_ULI526X=m -CONFIG_PCMCIA_XIRCOM=m -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -CONFIG_PCNET32=m -CONFIG_AMD8111_ETH=m -CONFIG_AMD8111E_NAPI=y -CONFIG_ADAPTEC_STARFIRE=m -CONFIG_ADAPTEC_STARFIRE_NAPI=y -CONFIG_B44=m -CONFIG_FORCEDETH=m -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -CONFIG_FEALNX=m -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -CONFIG_8139CP=m -CONFIG_8139TOO=m -# CONFIG_8139TOO_PIO is not set -# CONFIG_8139TOO_TUNE_TWISTER is not set -CONFIG_8139TOO_8129=y -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -CONFIG_EPIC100=m -CONFIG_SUNDANCE=m -# CONFIG_SUNDANCE_MMIO is not set -CONFIG_VIA_RHINE=m -CONFIG_VIA_RHINE_MMIO=y -CONFIG_VIA_RHINE_NAPI=y -CONFIG_NET_POCKET=y -CONFIG_ATP=m -CONFIG_DE600=m -CONFIG_DE620=m - -# -# Ethernet (1000 Mbit) -# -CONFIG_ACENIC=m -# CONFIG_ACENIC_OMIT_TIGON_I is not set -CONFIG_DL2K=m -CONFIG_E1000=m -CONFIG_E1000_NAPI=y -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -CONFIG_NS83820=m -CONFIG_HAMACHI=m -CONFIG_YELLOWFIN=m -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -CONFIG_R8169_VLAN=y -CONFIG_SIS190=m -CONFIG_SKGE=m -CONFIG_SKY2=m -# CONFIG_SK98LIN is not set -CONFIG_VIA_VELOCITY=m -CONFIG_TIGON3=m -CONFIG_BNX2=m - -# -# Ethernet (10000 Mbit) -# -CONFIG_CHELSIO_T1=m -CONFIG_IXGB=m -CONFIG_IXGB_NAPI=y -CONFIG_S2IO=m -CONFIG_S2IO_NAPI=y -CONFIG_MYRI10GE=m - -# -# Token Ring devices -# -CONFIG_TR=y -CONFIG_IBMOL=m -CONFIG_3C359=m -# CONFIG_TMS380TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -CONFIG_PCMCIA_WAVELAN=m -CONFIG_PCMCIA_NETWAVE=m - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -CONFIG_NORTEL_HERMES=m -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -CONFIG_PCMCIA_WL3501=m - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_USB_ZD1201=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_BCM43XX=m -CONFIG_BCM43XX_DEBUG=y -CONFIG_BCM43XX_DMA=y -CONFIG_BCM43XX_PIO=y -CONFIG_BCM43XX_DMA_AND_PIO_MODE=y -# CONFIG_BCM43XX_DMA_MODE is not set -# CONFIG_BCM43XX_PIO_MODE is not set -CONFIG_ZD1211RW=m -# CONFIG_ZD1211RW_DEBUG is not set -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -CONFIG_PCMCIA_3C589=m -CONFIG_PCMCIA_3C574=m -CONFIG_PCMCIA_FMVJ18X=m -CONFIG_PCMCIA_PCNET=m -CONFIG_PCMCIA_NMCLAN=m -CONFIG_PCMCIA_SMC91C92=m -CONFIG_PCMCIA_XIRC2PS=m -CONFIG_PCMCIA_AXNET=m - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -# CONFIG_ATM_DUMMY is not set -CONFIG_ATM_TCP=m -CONFIG_ATM_LANAI=m -CONFIG_ATM_ENI=m -# CONFIG_ATM_ENI_DEBUG is not set -# CONFIG_ATM_ENI_TUNE_BURST is not set -CONFIG_ATM_FIRESTREAM=m -# CONFIG_ATM_ZATM is not set -CONFIG_ATM_IDT77252=m -# CONFIG_ATM_IDT77252_DEBUG is not set -# CONFIG_ATM_IDT77252_RCV_ALL is not set -CONFIG_ATM_IDT77252_USE_SUNI=y -CONFIG_ATM_AMBASSADOR=m -# CONFIG_ATM_AMBASSADOR_DEBUG is not set -CONFIG_ATM_HORIZON=m -# CONFIG_ATM_HORIZON_DEBUG is not set -CONFIG_ATM_FORE200E_MAYBE=m -# CONFIG_ATM_FORE200E_PCA is not set -CONFIG_ATM_HE=m -# CONFIG_ATM_HE_USE_SUNI is not set -CONFIG_FDDI=y -# CONFIG_DEFXX is not set -CONFIG_SKFP=m -# CONFIG_HIPPI is not set -CONFIG_PLIP=m -CONFIG_PPP=m -CONFIG_PPP_MULTILINK=y -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -# CONFIG_PPP_BSDCOMP is not set -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -CONFIG_SLIP=m -CONFIG_SLIP_COMPRESSED=y -CONFIG_SLIP_SMART=y -# CONFIG_SLIP_MODE_SLIP6 is not set -CONFIG_NET_FC=y -# CONFIG_SHAPER is not set -CONFIG_NETCONSOLE=m -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -CONFIG_NETPOLL_TRAP=y -CONFIG_NET_POLL_CONTROLLER=y - -# -# ISDN subsystem -# -CONFIG_ISDN=m - -# -# Old ISDN4Linux -# -CONFIG_ISDN_I4L=m -CONFIG_ISDN_PPP=y -CONFIG_ISDN_PPP_VJ=y -CONFIG_ISDN_MPP=y -CONFIG_IPPP_FILTER=y -# CONFIG_ISDN_PPP_BSDCOMP is not set -CONFIG_ISDN_AUDIO=y -CONFIG_ISDN_TTY_FAX=y - -# -# ISDN feature submodules -# -CONFIG_ISDN_DIVERSION=m - -# -# ISDN4Linux hardware drivers -# - -# -# Passive cards -# -CONFIG_ISDN_DRV_HISAX=m - -# -# D-channel protocol features -# -CONFIG_HISAX_EURO=y -CONFIG_DE_AOC=y -CONFIG_HISAX_NO_SENDCOMPLETE=y -CONFIG_HISAX_NO_LLC=y -CONFIG_HISAX_NO_KEYPAD=y -CONFIG_HISAX_1TR6=y -CONFIG_HISAX_NI1=y -CONFIG_HISAX_MAX_CARDS=8 - -# -# HiSax supported cards -# -CONFIG_HISAX_16_3=y -CONFIG_HISAX_TELESPCI=y -CONFIG_HISAX_S0BOX=y -CONFIG_HISAX_FRITZPCI=y -CONFIG_HISAX_AVM_A1_PCMCIA=y -CONFIG_HISAX_ELSA=y -CONFIG_HISAX_DIEHLDIVA=y -CONFIG_HISAX_SEDLBAUER=y -CONFIG_HISAX_NETJET=y -CONFIG_HISAX_NETJET_U=y -CONFIG_HISAX_NICCY=y -CONFIG_HISAX_BKM_A4T=y -CONFIG_HISAX_SCT_QUADRO=y -CONFIG_HISAX_GAZEL=y -CONFIG_HISAX_HFC_PCI=y -CONFIG_HISAX_W6692=y -CONFIG_HISAX_HFC_SX=y -CONFIG_HISAX_ENTERNOW_PCI=y -# CONFIG_HISAX_DEBUG is not set - -# -# HiSax PCMCIA card service modules -# -CONFIG_HISAX_SEDLBAUER_CS=m -CONFIG_HISAX_ELSA_CS=m -CONFIG_HISAX_AVM_A1_CS=m -CONFIG_HISAX_TELES_CS=m - -# -# HiSax sub driver modules -# -CONFIG_HISAX_ST5481=m -# CONFIG_HISAX_HFCUSB is not set -CONFIG_HISAX_HFC4S8S=m -CONFIG_HISAX_FRITZ_PCIPNP=m -CONFIG_HISAX_HDLC=y - -# -# Active cards -# - -# -# Siemens Gigaset -# -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -# CONFIG_GIGASET_DEBUG is not set -# CONFIG_GIGASET_UNDOCREQ is not set - -# -# CAPI subsystem -# -CONFIG_ISDN_CAPI=m -CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y -CONFIG_ISDN_CAPI_MIDDLEWARE=y -CONFIG_ISDN_CAPI_CAPI20=m -CONFIG_ISDN_CAPI_CAPIFS_BOOL=y -CONFIG_ISDN_CAPI_CAPIFS=m -CONFIG_ISDN_CAPI_CAPIDRV=m - -# -# CAPI hardware drivers -# - -# -# Active AVM cards -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m - -# -# Active Eicon DIVA Server cards -# -# CONFIG_CAPI_EICON 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 is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -CONFIG_INPUT_JOYDEV=m -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -CONFIG_INPUT_KEYBOARD=y -CONFIG_KEYBOARD_ATKBD=y -# CONFIG_KEYBOARD_SUNKBD is not set -# CONFIG_KEYBOARD_LKKBD 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_SERIAL=m -CONFIG_MOUSE_VSXXXAA=m -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ANALOG=m -CONFIG_JOYSTICK_A3D=m -CONFIG_JOYSTICK_ADI=m -CONFIG_JOYSTICK_COBRA=m -CONFIG_JOYSTICK_GF2K=m -CONFIG_JOYSTICK_GRIP=m -CONFIG_JOYSTICK_GRIP_MP=m -CONFIG_JOYSTICK_GUILLEMOT=m -CONFIG_JOYSTICK_INTERACT=m -CONFIG_JOYSTICK_SIDEWINDER=m -CONFIG_JOYSTICK_TMDC=m -CONFIG_JOYSTICK_IFORCE=m -CONFIG_JOYSTICK_IFORCE_USB=y -CONFIG_JOYSTICK_IFORCE_232=y -CONFIG_JOYSTICK_WARRIOR=m -CONFIG_JOYSTICK_MAGELLAN=m -CONFIG_JOYSTICK_SPACEORB=m -CONFIG_JOYSTICK_SPACEBALL=m -CONFIG_JOYSTICK_STINGER=m -CONFIG_JOYSTICK_TWIDJOY=m -CONFIG_JOYSTICK_DB9=m -CONFIG_JOYSTICK_GAMECON=m -CONFIG_JOYSTICK_TURBOGRAFX=m -CONFIG_JOYSTICK_JOYDUMP=m -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_GUNZE=m -CONFIG_TOUCHSCREEN_ELO=m -CONFIG_TOUCHSCREEN_MTOUCH=m -CONFIG_TOUCHSCREEN_MK712=m -CONFIG_INPUT_MISC=y -CONFIG_INPUT_PCSPKR=m -CONFIG_INPUT_UINPUT=m - -# -# Hardware I/O ports -# -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 -CONFIG_SERIO_LIBPS2=y -CONFIG_SERIO_RAW=m -CONFIG_GAMEPORT=m -CONFIG_GAMEPORT_NS558=m -CONFIG_GAMEPORT_L4=m -CONFIG_GAMEPORT_EMU10K1=m -CONFIG_GAMEPORT_FM801=m - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_NONSTANDARD=y -# CONFIG_COMPUTONE is not set -# CONFIG_ROCKETPORT is not set -CONFIG_CYCLADES=m -# CONFIG_CYZ_INTR is not set -# CONFIG_DIGIEPCA is not set -# CONFIG_MOXA_INTELLIO is not set -# CONFIG_MOXA_SMARTIO is not set -# CONFIG_ISI is not set -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_N_HDLC=m -# CONFIG_SPECIALIX is not set -# CONFIG_SX is not set -# CONFIG_RIO is not set -# CONFIG_STALDRV is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_PCI=m -CONFIG_SERIAL_8250_PNP=m -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=m -CONFIG_SERIAL_JSM=m -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_CRASH=m -CONFIG_PRINTER=m -CONFIG_LP_CONSOLE=y -CONFIG_PPDEV=m -CONFIG_TIPAR=m - -# -# IPMI -# -CONFIG_IPMI_HANDLER=m -# CONFIG_IPMI_PANIC_EVENT is not set -CONFIG_IPMI_DEVICE_INTERFACE=m -CONFIG_IPMI_SI=m -CONFIG_IPMI_WATCHDOG=m -CONFIG_IPMI_POWEROFF=m - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -CONFIG_ALIM1535_WDT=m -CONFIG_ALIM7101_WDT=m -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -CONFIG_IBMASR=m -# CONFIG_WAFER_WDT is not set -CONFIG_I6300ESB_WDT=m -CONFIG_I8XX_TCO=m -# CONFIG_SC1200_WDT is not set -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -CONFIG_W83627HF_WDT=m -CONFIG_W83877F_WDT=m -CONFIG_W83977F_WDT=m -CONFIG_MACHZ_WDT=m -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -CONFIG_PCIPCWATCHDOG=m -CONFIG_WDTPCI=m -CONFIG_WDT_501_PCI=y - -# -# USB-based Watchdog Cards -# -CONFIG_USBPCWATCHDOG=m -CONFIG_HW_RANDOM=y -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -# CONFIG_HW_RANDOM_GEODE is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -CONFIG_DTLK=m -CONFIG_R3964=m -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -CONFIG_AGP=y -CONFIG_AGP_AMD64=y -CONFIG_AGP_INTEL=y -CONFIG_AGP_SIS=y -CONFIG_AGP_VIA=y -CONFIG_DRM=m -CONFIG_DRM_TDFX=m -CONFIG_DRM_R128=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_I810=m -CONFIG_DRM_I830=m -CONFIG_DRM_I915=m -CONFIG_DRM_MGA=m -CONFIG_DRM_SIS=m -CONFIG_DRM_VIA=m -CONFIG_DRM_SAVAGE=m - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -CONFIG_CARDMAN_4000=m -CONFIG_CARDMAN_4040=m -CONFIG_MWAVE=m -CONFIG_PC8736x_GPIO=m -CONFIG_NSC_GPIO=m -# CONFIG_RAW_DRIVER is not set -CONFIG_HPET=y -# CONFIG_HPET_RTC_IRQ is not set -# CONFIG_HPET_MMAP is not set -CONFIG_HANGCHECK_TIMER=m - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -CONFIG_I2C_ALGOPCF=m -CONFIG_I2C_ALGOPCA=m - -# -# I2C Hardware Bus support -# -# CONFIG_I2C_ALI1535 is not set -# CONFIG_I2C_ALI1563 is not set -# CONFIG_I2C_ALI15X3 is not set -CONFIG_I2C_AMD756=m -CONFIG_I2C_AMD756_S4882=m -CONFIG_I2C_AMD8111=m -CONFIG_I2C_I801=m -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_ISA=m -CONFIG_I2C_NFORCE2=m -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m -CONFIG_I2C_PROSAVAGE=m -CONFIG_I2C_SAVAGE4=m -# CONFIG_I2C_SIS5595 is not set -# CONFIG_I2C_SIS630 is not set -CONFIG_I2C_SIS96X=m -CONFIG_I2C_STUB=m -CONFIG_I2C_VIA=m -CONFIG_I2C_VIAPRO=m -CONFIG_I2C_VOODOO3=m -CONFIG_I2C_PCA_ISA=m - -# -# Miscellaneous I2C Chip support -# -CONFIG_SENSORS_DS1337=m -CONFIG_SENSORS_DS1374=m -CONFIG_SENSORS_EEPROM=m -CONFIG_SENSORS_PCF8574=m -CONFIG_SENSORS_PCA9539=m -CONFIG_SENSORS_PCF8591=m -CONFIG_SENSORS_MAX6875=m -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -CONFIG_W1=m -CONFIG_W1_CON=y - -# -# 1-wire Bus Masters -# -CONFIG_W1_MASTER_MATROX=m -CONFIG_W1_MASTER_DS2490=m -CONFIG_W1_MASTER_DS2482=m - -# -# 1-wire Slaves -# -CONFIG_W1_SLAVE_THERM=m -CONFIG_W1_SLAVE_SMEM=m -CONFIG_W1_SLAVE_DS2433=m -CONFIG_W1_SLAVE_DS2433_CRC=y - -# -# Hardware Monitoring support -# -CONFIG_HWMON=m -CONFIG_HWMON_VID=m -CONFIG_SENSORS_ABITUGURU=m -CONFIG_SENSORS_ADM1021=m -CONFIG_SENSORS_ADM1025=m -CONFIG_SENSORS_ADM1026=m -CONFIG_SENSORS_ADM1031=m -CONFIG_SENSORS_ADM9240=m -CONFIG_SENSORS_ASB100=m -CONFIG_SENSORS_ATXP1=m -CONFIG_SENSORS_DS1621=m -CONFIG_SENSORS_F71805F=m -CONFIG_SENSORS_FSCHER=m -CONFIG_SENSORS_FSCPOS=m -CONFIG_SENSORS_GL518SM=m -CONFIG_SENSORS_GL520SM=m -CONFIG_SENSORS_IT87=m -CONFIG_SENSORS_LM63=m -CONFIG_SENSORS_LM75=m -CONFIG_SENSORS_LM77=m -CONFIG_SENSORS_LM78=m -CONFIG_SENSORS_LM80=m -CONFIG_SENSORS_LM83=m -CONFIG_SENSORS_LM85=m -CONFIG_SENSORS_LM87=m -CONFIG_SENSORS_LM90=m -CONFIG_SENSORS_LM92=m -CONFIG_SENSORS_MAX1619=m -CONFIG_SENSORS_PC87360=m -CONFIG_SENSORS_SIS5595=m -CONFIG_SENSORS_SMSC47M1=m -CONFIG_SENSORS_SMSC47M192=m -CONFIG_SENSORS_SMSC47B397=m -CONFIG_SENSORS_VIA686A=m -CONFIG_SENSORS_VT8231=m -CONFIG_SENSORS_W83781D=m -CONFIG_SENSORS_W83791D=m -CONFIG_SENSORS_W83792D=m -CONFIG_SENSORS_W83L785TS=m -CONFIG_SENSORS_W83627HF=m -CONFIG_SENSORS_W83627EHF=m -CONFIG_SENSORS_HDAPS=m -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -CONFIG_VIDEO_BT848=m -CONFIG_VIDEO_BT848_DVB=y -CONFIG_VIDEO_SAA6588=m -CONFIG_VIDEO_BWQCAM=m -CONFIG_VIDEO_CQCAM=m -CONFIG_VIDEO_W9966=m -CONFIG_VIDEO_CPIA=m -CONFIG_VIDEO_CPIA_PP=m -CONFIG_VIDEO_CPIA_USB=m -CONFIG_VIDEO_CPIA2=m -CONFIG_VIDEO_SAA5246A=m -CONFIG_VIDEO_SAA5249=m -CONFIG_TUNER_3036=m -CONFIG_VIDEO_STRADIS=m -CONFIG_VIDEO_ZORAN=m -CONFIG_VIDEO_ZORAN_BUZ=m -CONFIG_VIDEO_ZORAN_DC10=m -CONFIG_VIDEO_ZORAN_DC30=m -CONFIG_VIDEO_ZORAN_LML33=m -CONFIG_VIDEO_ZORAN_LML33R10=m -CONFIG_VIDEO_ZORAN_AVS6EYES=m -CONFIG_VIDEO_SAA7134=m -CONFIG_VIDEO_SAA7134_ALSA=m -CONFIG_VIDEO_SAA7134_DVB=m -CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y -CONFIG_VIDEO_MXB=m -CONFIG_VIDEO_DPC=m -CONFIG_VIDEO_HEXIUM_ORION=m -CONFIG_VIDEO_HEXIUM_GEMINI=m -CONFIG_VIDEO_CX88_VP3054=m -CONFIG_VIDEO_CX88=m -CONFIG_VIDEO_CX88_ALSA=m -CONFIG_VIDEO_CX88_BLACKBIRD=m -CONFIG_VIDEO_CX88_DVB=m -CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y - -# -# Encoders and Decoders -# -CONFIG_VIDEO_MSP3400=m -CONFIG_VIDEO_CS53L32A=m -CONFIG_VIDEO_TLV320AIC23B=m -CONFIG_VIDEO_WM8775=m -CONFIG_VIDEO_WM8739=m -CONFIG_VIDEO_CX2341X=m -CONFIG_VIDEO_CX25840=m -CONFIG_VIDEO_SAA711X=m -CONFIG_VIDEO_SAA7127=m -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# V4L USB devices -# -CONFIG_VIDEO_PVRUSB2=m -CONFIG_VIDEO_PVRUSB2_24XXX=y -CONFIG_VIDEO_PVRUSB2_SYSFS=y -# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -CONFIG_USB_QUICKCAM_MESSENGER=m -CONFIG_USB_ET61X251=m -CONFIG_VIDEO_OVCAMCHIP=m -CONFIG_USB_W9968CF=m -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -CONFIG_USB_ZC0301=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set - -# -# Radio Adapters -# -CONFIG_RADIO_GEMTEK_PCI=m -CONFIG_RADIO_MAXIRADIO=m -CONFIG_RADIO_MAESTRO=m -CONFIG_USB_DSBR=m - -# -# Digital Video Broadcasting Devices -# -CONFIG_DVB=y -CONFIG_DVB_CORE=m - -# -# Supported SAA7146 based PCI Adapters -# -CONFIG_DVB_AV7110=m -CONFIG_DVB_AV7110_OSD=y -CONFIG_DVB_BUDGET=m -CONFIG_DVB_BUDGET_CI=m -CONFIG_DVB_BUDGET_AV=m -CONFIG_DVB_BUDGET_PATCH=m - -# -# Supported USB Adapters -# -CONFIG_DVB_USB=m -# CONFIG_DVB_USB_DEBUG is not set -CONFIG_DVB_USB_A800=m -CONFIG_DVB_USB_DIBUSB_MB=m -# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set -CONFIG_DVB_USB_DIBUSB_MC=m -CONFIG_DVB_USB_UMT_010=m -CONFIG_DVB_USB_CXUSB=m -CONFIG_DVB_USB_DIGITV=m -CONFIG_DVB_USB_VP7045=m -CONFIG_DVB_USB_VP702X=m -CONFIG_DVB_USB_GP8PSK=m -CONFIG_DVB_USB_NOVA_T_USB2=m -CONFIG_DVB_USB_DTT200U=m -CONFIG_DVB_TTUSB_BUDGET=m -CONFIG_DVB_TTUSB_DEC=m -CONFIG_DVB_CINERGYT2=m -CONFIG_DVB_CINERGYT2_TUNING=y -CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 -CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 -CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 -CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y -CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 - -# -# Supported FlexCopII (B2C2) Adapters -# -CONFIG_DVB_B2C2_FLEXCOP=m -CONFIG_DVB_B2C2_FLEXCOP_PCI=m -CONFIG_DVB_B2C2_FLEXCOP_USB=m -# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set - -# -# Supported BT878 Adapters -# -CONFIG_DVB_BT8XX=m - -# -# Supported Pluto2 Adapters -# -CONFIG_DVB_PLUTO2=m - -# -# Supported DVB Frontends -# - -# -# Customise DVB Frontends -# - -# -# DVB-S (satellite) frontends -# -CONFIG_DVB_STV0299=m -CONFIG_DVB_CX24110=m -CONFIG_DVB_CX24123=m -CONFIG_DVB_TDA8083=m -CONFIG_DVB_MT312=m -CONFIG_DVB_VES1X93=m -CONFIG_DVB_S5H1420=m - -# -# DVB-T (terrestrial) frontends -# -CONFIG_DVB_SP8870=m -CONFIG_DVB_SP887X=m -CONFIG_DVB_CX22700=m -CONFIG_DVB_CX22702=m -CONFIG_DVB_L64781=m -CONFIG_DVB_TDA1004X=m -CONFIG_DVB_NXT6000=m -CONFIG_DVB_MT352=m -CONFIG_DVB_ZL10353=m -CONFIG_DVB_DIB3000MB=m -CONFIG_DVB_DIB3000MC=m - -# -# DVB-C (cable) frontends -# -CONFIG_DVB_VES1820=m -CONFIG_DVB_TDA10021=m -CONFIG_DVB_STV0297=m - -# -# ATSC (North American/Korean Terrestrial/Cable DTV) frontends -# -CONFIG_DVB_NXT200X=m -CONFIG_DVB_OR51211=m -CONFIG_DVB_OR51132=m -CONFIG_DVB_BCM3510=m -CONFIG_DVB_LGDT330X=m - -# -# Miscellaneous devices -# -CONFIG_DVB_PLL=m -CONFIG_DVB_LNBP21=m -CONFIG_DVB_ISL6421=m -CONFIG_VIDEO_SAA7146=m -CONFIG_VIDEO_SAA7146_VV=m -CONFIG_VIDEO_VIDEOBUF=m -CONFIG_VIDEO_TUNER=m -CONFIG_VIDEO_BUF=m -CONFIG_VIDEO_BUF_DVB=m -CONFIG_VIDEO_BTCX=m -CONFIG_VIDEO_IR=m -CONFIG_VIDEO_TVEEPROM=m -CONFIG_USB_DABUSB=m - -# -# Graphics support -# -# CONFIG_FIRMWARE_EDID is not set -CONFIG_FB=y -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_CIRRUS=m -# CONFIG_FB_PM2 is not set -# CONFIG_FB_CYBER2000 is not set -# CONFIG_FB_ARC is not set -# CONFIG_FB_ASILIANT is not set -# CONFIG_FB_IMSTT is not set -CONFIG_FB_VGA16=m -CONFIG_FB_VESA=y -# CONFIG_FB_HGA is not set -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_NVIDIA=m -CONFIG_FB_NVIDIA_I2C=y -CONFIG_FB_RIVA=m -# CONFIG_FB_RIVA_I2C is not set -# CONFIG_FB_RIVA_DEBUG is not set -CONFIG_FB_INTEL=m -# CONFIG_FB_INTEL_DEBUG is not set -CONFIG_FB_MATROX=m -CONFIG_FB_MATROX_MILLENIUM=y -CONFIG_FB_MATROX_MYSTIQUE=y -CONFIG_FB_MATROX_G=y -CONFIG_FB_MATROX_I2C=m -CONFIG_FB_MATROX_MAVEN=m -CONFIG_FB_MATROX_MULTIHEAD=y -CONFIG_FB_RADEON=m -CONFIG_FB_RADEON_I2C=y -# CONFIG_FB_RADEON_DEBUG is not set -CONFIG_FB_ATY128=m -CONFIG_FB_ATY=m -CONFIG_FB_ATY_CT=y -CONFIG_FB_ATY_GENERIC_LCD=y -CONFIG_FB_ATY_GX=y -CONFIG_FB_SAVAGE=m -CONFIG_FB_SAVAGE_I2C=y -CONFIG_FB_SAVAGE_ACCEL=y -# CONFIG_FB_SIS is not set -CONFIG_FB_NEOMAGIC=m -CONFIG_FB_KYRO=m -CONFIG_FB_3DFX=m -CONFIG_FB_3DFX_ACCEL=y -CONFIG_FB_VOODOO1=m -CONFIG_FB_TRIDENT=m -CONFIG_FB_TRIDENT_ACCEL=y -# CONFIG_FB_GEODE is not set -# CONFIG_FB_VIRTUAL is not set - -# -# Console display driver support -# -CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -CONFIG_VIDEO_SELECT=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y - -# -# Logo configuration -# -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -CONFIG_LOGO_LINUX_CLUT224=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -CONFIG_SND_SEQ_DUMMY=m -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -CONFIG_SND_SEQUENCER_OSS=y -CONFIG_SND_RTCTIMER=m -CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y -CONFIG_SND_DYNAMIC_MINORS=y -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_MPU401_UART=m -CONFIG_SND_OPL3_LIB=m -CONFIG_SND_VX_LIB=m -CONFIG_SND_AC97_CODEC=m -CONFIG_SND_AC97_BUS=m -CONFIG_SND_DUMMY=m -CONFIG_SND_VIRMIDI=m -CONFIG_SND_MTPAV=m -# CONFIG_SND_SERIAL_U16550 is not set -CONFIG_SND_MPU401=m - -# -# PCI devices -# -CONFIG_SND_AD1889=m -CONFIG_SND_ALS300=m -CONFIG_SND_ALS4000=m -CONFIG_SND_ALI5451=m -CONFIG_SND_ATIIXP=m -CONFIG_SND_ATIIXP_MODEM=m -CONFIG_SND_AU8810=m -CONFIG_SND_AU8820=m -CONFIG_SND_AU8830=m -CONFIG_SND_AZT3328=m -CONFIG_SND_BT87X=m -# CONFIG_SND_BT87X_OVERCLOCK is not set -CONFIG_SND_CA0106=m -CONFIG_SND_CMIPCI=m -CONFIG_SND_CS4281=m -CONFIG_SND_CS46XX=m -CONFIG_SND_CS46XX_NEW_DSP=y -CONFIG_SND_DARLA20=m -CONFIG_SND_GINA20=m -CONFIG_SND_LAYLA20=m -CONFIG_SND_DARLA24=m -CONFIG_SND_GINA24=m -CONFIG_SND_LAYLA24=m -CONFIG_SND_MONA=m -CONFIG_SND_MIA=m -CONFIG_SND_ECHO3G=m -CONFIG_SND_INDIGO=m -CONFIG_SND_INDIGOIO=m -CONFIG_SND_INDIGODJ=m -CONFIG_SND_EMU10K1=m -CONFIG_SND_EMU10K1X=m -CONFIG_SND_ENS1370=m -CONFIG_SND_ENS1371=m -CONFIG_SND_ES1938=m -CONFIG_SND_ES1968=m -CONFIG_SND_FM801=m -CONFIG_SND_FM801_TEA575X_BOOL=y -CONFIG_SND_FM801_TEA575X=m -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDSP=m -CONFIG_SND_HDSPM=m -CONFIG_SND_ICE1712=m -CONFIG_SND_ICE1724=m -CONFIG_SND_INTEL8X0=m -CONFIG_SND_INTEL8X0M=m -CONFIG_SND_KORG1212=m -CONFIG_SND_MAESTRO3=m -CONFIG_SND_MIXART=m -CONFIG_SND_NM256=m -CONFIG_SND_PCXHR=m -CONFIG_SND_RIPTIDE=m -CONFIG_SND_RME32=m -CONFIG_SND_RME96=m -CONFIG_SND_RME9652=m -CONFIG_SND_SONICVIBES=m -CONFIG_SND_TRIDENT=m -CONFIG_SND_VIA82XX=m -CONFIG_SND_VIA82XX_MODEM=m -CONFIG_SND_VX222=m -CONFIG_SND_YMFPCI=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -CONFIG_SND_USB_USX2Y=m - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=m -CONFIG_USB_EHCI_SPLIT_ISO=y -CONFIG_USB_EHCI_ROOT_HUB_TT=y -CONFIG_USB_EHCI_TT_NEWSCHED=y -CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -CONFIG_USB_STORAGE_DATAFAB=y -CONFIG_USB_STORAGE_FREECOM=y -CONFIG_USB_STORAGE_ISD200=y -CONFIG_USB_STORAGE_DPCM=y -CONFIG_USB_STORAGE_USBAT=y -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -CONFIG_USB_STORAGE_JUMPSHOT=y -CONFIG_USB_STORAGE_ALAUDA=y -CONFIG_USB_LIBUSUAL=y - -# -# USB Input Devices -# -CONFIG_USB_HID=y -CONFIG_USB_HIDINPUT=y -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -CONFIG_HID_FF=y -CONFIG_HID_PID=y -CONFIG_LOGITECH_FF=y -CONFIG_THRUSTMASTER_FF=y -CONFIG_USB_HIDDEV=y -CONFIG_USB_AIPTEK=m -CONFIG_USB_WACOM=m -CONFIG_USB_ACECAD=m -CONFIG_USB_KBTAB=m -CONFIG_USB_POWERMATE=m -CONFIG_USB_TOUCHSCREEN=m -CONFIG_USB_TOUCHSCREEN_EGALAX=y -CONFIG_USB_TOUCHSCREEN_PANJIT=y -CONFIG_USB_TOUCHSCREEN_3M=y -CONFIG_USB_TOUCHSCREEN_ITM=y -# CONFIG_USB_YEALINK is not set -CONFIG_USB_XPAD=m -CONFIG_USB_ATI_REMOTE=m -CONFIG_USB_ATI_REMOTE2=m -CONFIG_USB_KEYSPAN_REMOTE=m -CONFIG_USB_APPLETOUCH=m - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -CONFIG_USB_NET_GL620A=m -CONFIG_USB_NET_NET1080=m -CONFIG_USB_NET_PLUSB=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_NET_CDC_SUBSET=m -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_BELKIN=y -CONFIG_USB_ARMLINUX=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_MON=y - -# -# USB port drivers -# -CONFIG_USB_USS720=m - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_SERIAL_AIRPRIME=m -CONFIG_USB_SERIAL_ARK3116=m -CONFIG_USB_SERIAL_BELKIN=m -CONFIG_USB_SERIAL_WHITEHEAT=m -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_SERIAL_FUNSOFT=m -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -CONFIG_USB_SERIAL_KEYSPAN_MPR=y -CONFIG_USB_SERIAL_KEYSPAN_USA28=y -CONFIG_USB_SERIAL_KEYSPAN_USA28X=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y -CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y -CONFIG_USB_SERIAL_KEYSPAN_USA19=y -CONFIG_USB_SERIAL_KEYSPAN_USA18X=y -CONFIG_USB_SERIAL_KEYSPAN_USA19W=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y -CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y -CONFIG_USB_SERIAL_KEYSPAN_USA49W=y -CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -CONFIG_USB_SERIAL_NAVMAN=m -CONFIG_USB_SERIAL_PL2303=m -CONFIG_USB_SERIAL_HP4X=m -CONFIG_USB_SERIAL_SAFE=m -CONFIG_USB_SERIAL_SAFE_PADDED=y -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_OMNINET=m -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_APPLEDISPLAY=m -CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y -CONFIG_USB_LD=m -CONFIG_USB_TEST=m - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m -CONFIG_USB_SPEEDTOUCH=m -CONFIG_USB_CXACRU=m -CONFIG_USB_UEAGLEATM=m -CONFIG_USB_XUSBATM=m - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -CONFIG_MMC=m -# CONFIG_MMC_DEBUG is not set -CONFIG_MMC_BLOCK=m -CONFIG_MMC_SDHCI=m -CONFIG_MMC_WBSD=m - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -CONFIG_LEDS_TRIGGER_IDE_DISK=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=m - -# -# InfiniBand support -# -CONFIG_INFINIBAND=m -CONFIG_INFINIBAND_USER_MAD=m -CONFIG_INFINIBAND_USER_ACCESS=m -CONFIG_INFINIBAND_ADDR_TRANS=y -CONFIG_INFINIBAND_MTHCA=m -CONFIG_INFINIBAND_MTHCA_DEBUG=y -CONFIG_INFINIBAND_IPOIB=m -CONFIG_INFINIBAND_IPOIB_DEBUG=y -CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y -CONFIG_INFINIBAND_SRP=m -CONFIG_INFINIBAND_ISER=m - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -CONFIG_EDAC=y - -# -# Reporting subsystems -# -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_MM_EDAC=m -CONFIG_EDAC_E752X=m -CONFIG_EDAC_K8=m -CONFIG_EDAC_POLL=y - -# -# Real Time Clock -# -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set - -# -# RTC drivers -# -CONFIG_RTC_DRV_X1205=m -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1553=m -CONFIG_RTC_DRV_ISL1208=m -CONFIG_RTC_DRV_DS1672=m -CONFIG_RTC_DRV_DS1742=m -CONFIG_RTC_DRV_PCF8563=m -CONFIG_RTC_DRV_PCF8583=m -CONFIG_RTC_DRV_RS5C372=m -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set -CONFIG_RTC_DRV_V3020=m - -# -# DMA Engine support -# -CONFIG_DMA_ENGINE=y - -# -# DMA Clients -# -CONFIG_NET_DMA=y - -# -# DMA Devices -# -CONFIG_INTEL_IOATDMA=m - -# -# Firmware Drivers -# -CONFIG_DELL_RBU=m -CONFIG_DCDBAS=m - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT2_FS_XIP=y -CONFIG_FS_XIP=y -CONFIG_EXT3_FS=m -CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -CONFIG_REISERFS_FS_XATTR=y -CONFIG_REISERFS_FS_POSIX_ACL=y -CONFIG_REISERFS_FS_SECURITY=y -CONFIG_JFS_FS=m -CONFIG_JFS_POSIX_ACL=y -CONFIG_JFS_SECURITY=y -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_QUOTA=y -CONFIG_XFS_SECURITY=y -CONFIG_XFS_POSIX_ACL=y -# CONFIG_XFS_RT is not set -CONFIG_OCFS2_FS=m -# CONFIG_OCFS2_DEBUG_MASKLOG is not set -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=m -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -CONFIG_FUSE_FS=m - -# -# Caches -# -CONFIG_FSCACHE=m - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=y -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=y -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y -CONFIG_CACHEFILES=m -CONFIG_CACHEFILES_DEBUG=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -CONFIG_CONFIGFS_FS=m - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -CONFIG_AFFS_FS=m -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -CONFIG_BEFS_FS=m -# CONFIG_BEFS_DEBUG is not set -CONFIG_BFS_FS=m -CONFIG_EFS_FS=m -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=m -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -CONFIG_VXFS_FS=m -# CONFIG_HPFS_FS is not set -CONFIG_QNX4FS_FS=m -CONFIG_SYSV_FS=m -CONFIG_UFS_FS=m -# CONFIG_UFS_FS_WRITE is not set -# CONFIG_UFS_DEBUG is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_NFS_FSCACHE=y -CONFIG_NFS_DIRECTIO=y -CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -CONFIG_RPCSEC_GSS_SPKM3=m -# CONFIG_SMB_FS is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -CONFIG_CIFS_WEAK_PW_HASH=y -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -CONFIG_NCP_FS=m -CONFIG_NCPFS_PACKET_SIGNING=y -CONFIG_NCPFS_IOCTL_LOCKING=y -CONFIG_NCPFS_STRONG=y -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -CONFIG_NCPFS_EXTRAS=y -CONFIG_CODA_FS=m -# CONFIG_CODA_FS_OLD_API is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -CONFIG_OSF_PARTITION=y -CONFIG_AMIGA_PARTITION=y -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -CONFIG_BSD_DISKLABEL=y -CONFIG_MINIX_SUBPARTITION=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_UNIXWARE_DISKLABEL=y -# CONFIG_LDM_PARTITION is not set -CONFIG_SGI_PARTITION=y -# CONFIG_ULTRIX_PARTITION is not set -CONFIG_SUN_PARTITION=y -CONFIG_KARMA_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="utf8" -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=m -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -CONFIG_KPROBES=y - -# -# Kernel hacking -# -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -# CONFIG_PRINTK_TIME is not set -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=17 -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -CONFIG_DEBUG_SPINLOCK=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_RWSEMS is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y -# CONFIG_DEBUG_VM is not set -CONFIG_DEBUG_LIST=y -# CONFIG_FRAME_POINTER is not set -# CONFIG_FORCED_INLINING is not set -CONFIG_BOOT_DELAY=y -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_DEBUG_RODATA=y -CONFIG_DEBUG_STACKOVERFLOW=y -# CONFIG_DEBUG_STACK_USAGE is not set - -# -# Security options -# -CONFIG_KEYS=y -CONFIG_KEYS_DEBUG_PROC_KEYS=y -CONFIG_SECURITY=y -CONFIG_SECURITY_NETWORK=y -# CONFIG_SECURITY_NETWORK_XFRM is not set -CONFIG_SECURITY_CAPABILITIES=y -# CONFIG_SECURITY_ROOTPLUG is not set -# CONFIG_SECURITY_SECLVL is not set -CONFIG_SECURITY_SELINUX=y -CONFIG_SECURITY_SELINUX_BOOTPARAM=y -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 -CONFIG_SECURITY_SELINUX_DISABLE=y -CONFIG_SECURITY_SELINUX_DEVELOP=y -CONFIG_SECURITY_SELINUX_AVC_STATS=y -CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 -# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set -# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -CONFIG_CRYPTO_TGR192=m -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_X86_64=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set -CONFIG_CRYPTO_SIGNATURE=y -CONFIG_CRYPTO_SIGNATURE_DSA=y -CONFIG_CRYPTO_MPILIB=y - -# -# Hardware crypto devices -# -CONFIG_XEN=y -CONFIG_XEN_INTERFACE_VERSION=0x00030203 - -# -# XEN -# -CONFIG_XEN_PRIVILEGED_GUEST=y -# CONFIG_XEN_UNPRIVILEGED_GUEST is not set -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_XENBUS_DEV=y -CONFIG_XEN_BACKEND=y -CONFIG_XEN_BLKDEV_BACKEND=y -CONFIG_XEN_BLKDEV_TAP=m -CONFIG_XEN_NETDEV_BACKEND=y -# CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set -CONFIG_XEN_NETDEV_LOOPBACK=y -CONFIG_XEN_PCIDEV_BACKEND=m -CONFIG_XEN_PCIDEV_BACKEND_VPCI=y -# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set -# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set -# CONFIG_XEN_PCIDEV_BE_DEBUG is not set -# CONFIG_XEN_TPMDEV_BACKEND is not set -CONFIG_XEN_BLKDEV_FRONTEND=m -CONFIG_XEN_NETDEV_FRONTEND=m -CONFIG_XEN_FRAMEBUFFER=y -CONFIG_XEN_KEYBOARD=y -CONFIG_XEN_SCRUB_PAGES=y -# CONFIG_XEN_DISABLE_SERIAL is not set -CONFIG_XEN_SYSFS=y -CONFIG_XEN_COMPAT_030002_AND_LATER=y -# CONFIG_XEN_COMPAT_LATEST_ONLY is not set -CONFIG_XEN_COMPAT_030002=y -CONFIG_HAVE_ARCH_ALLOC_SKB=y -CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y -CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y -CONFIG_NO_IDLE_HZ=y -CONFIG_XEN_UTIL=y -CONFIG_XEN_BALLOON=y -CONFIG_XEN_DEVMEM=y -CONFIG_XEN_SKBUFF=y -CONFIG_XEN_REBOOT=y -CONFIG_XEN_SMPBOOT=y - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m -CONFIG_REED_SOLOMON=m -CONFIG_REED_SOLOMON_DEC16=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_PLIST=y diff --git a/crypto/Kconfig b/crypto/Kconfig index f8705b7a0..e4e1efe0e 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -337,7 +337,7 @@ config CRYPTO_CRC32C config CRYPTO_TEST tristate "Testing module" - depends on CRYPTO && m + depends on CRYPTO help Quick & dirty crypto test module. diff --git a/crypto/aes.c b/crypto/aes.c index a03871183..a5017292e 100644 --- a/crypto/aes.c +++ b/crypto/aes.c @@ -248,10 +248,10 @@ gen_tabs (void) t ^= E_KEY[8 * i + 7]; E_KEY[8 * i + 15] = t; \ } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int +aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) { - struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + struct aes_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; u32 i, t, u, v, w; @@ -318,9 +318,9 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, f_rl(bo, bi, 2, k); \ f_rl(bo, bi, 3, k) -static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in) { - const struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + const struct aes_ctx *ctx = ctx_arg; const __le32 *src = (const __le32 *)in; __le32 *dst = (__le32 *)out; u32 b0[4], b1[4]; @@ -373,9 +373,9 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) i_rl(bo, bi, 2, k); \ i_rl(bo, bi, 3, k) -static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in) { - const struct aes_ctx *ctx = crypto_tfm_ctx(tfm); + const struct aes_ctx *ctx = ctx_arg; const __le32 *src = (const __le32 *)in; __le32 *dst = (__le32 *)out; u32 b0[4], b1[4]; diff --git a/crypto/anubis.c b/crypto/anubis.c index 7e2e1a298..2c796bdb9 100644 --- a/crypto/anubis.c +++ b/crypto/anubis.c @@ -460,15 +460,16 @@ static const u32 rc[] = { 0xf726ffedU, 0xe89d6f8eU, 0x19a0f089U, }; -static int anubis_setkey(struct crypto_tfm *tfm, const u8 *in_key, +static int anubis_setkey(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) { - struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); const __be32 *key = (const __be32 *)in_key; int N, R, i, r; u32 kappa[ANUBIS_MAX_N]; u32 inter[ANUBIS_MAX_N]; + struct anubis_ctx *ctx = ctx_arg; + switch (key_len) { case 16: case 20: case 24: case 28: @@ -659,15 +660,15 @@ static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4], dst[i] = cpu_to_be32(inter[i]); } -static void anubis_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void anubis_encrypt(void *ctx_arg, u8 *dst, const u8 *src) { - struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); + struct anubis_ctx *ctx = ctx_arg; anubis_crypt(ctx->E, dst, src, ctx->R); } -static void anubis_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void anubis_decrypt(void *ctx_arg, u8 *dst, const u8 *src) { - struct anubis_ctx *ctx = crypto_tfm_ctx(tfm); + struct anubis_ctx *ctx = ctx_arg; anubis_crypt(ctx->D, dst, src, ctx->R); } diff --git a/crypto/api.c b/crypto/api.c index a1920d501..a5317b2fb 100644 --- a/crypto/api.c +++ b/crypto/api.c @@ -175,10 +175,12 @@ struct crypto_tfm *crypto_alloc_tfm2(const char *name, u32 flags, struct crypto_alg *alg; unsigned int tfm_size; - if (!nomodload) + if (!nomodload) { alg = crypto_alg_mod_lookup(name); - else + } + else { alg = crypto_alg_lookup(name); + } if (alg == NULL) goto out; @@ -193,16 +195,13 @@ struct crypto_tfm *crypto_alloc_tfm2(const char *name, u32 flags, if (crypto_init_flags(tfm, flags)) goto out_free_tfm; - if (crypto_init_ops(tfm)) + if (crypto_init_ops(tfm)) { + crypto_exit_ops(tfm); goto out_free_tfm; - - if (alg->cra_init && alg->cra_init(tfm)) - goto cra_init_failed; + } goto out; -cra_init_failed: - crypto_exit_ops(tfm); out_free_tfm: kfree(tfm); tfm = NULL; @@ -228,8 +227,6 @@ void crypto_free_tfm(struct crypto_tfm *tfm) alg = tfm->__crt_alg; size = sizeof(*tfm) + alg->cra_ctxsize; - if (alg->cra_exit) - alg->cra_exit(tfm); crypto_exit_ops(tfm); crypto_alg_put(alg); memset(tfm, 0, size); @@ -239,7 +236,7 @@ void crypto_free_tfm(struct crypto_tfm *tfm) static inline int crypto_set_driver_name(struct crypto_alg *alg) { static const char suffix[] = "-generic"; - char *driver_name = alg->cra_driver_name; + char *driver_name = (char *)alg->cra_driver_name; int len; if (*driver_name) @@ -277,13 +274,13 @@ int crypto_register_alg(struct crypto_alg *alg) down_write(&crypto_alg_sem); list_for_each_entry(q, &crypto_alg_list, cra_list) { - if (q == alg) { + if (!strcmp(q->cra_driver_name, alg->cra_driver_name)) { ret = -EEXIST; goto out; } } - list_add(&alg->cra_list, &crypto_alg_list); + list_add_tail(&alg->cra_list, &crypto_alg_list); out: up_write(&crypto_alg_sem); return ret; diff --git a/crypto/arc4.c b/crypto/arc4.c index 5edc6a65b..9efbcaae8 100644 --- a/crypto/arc4.c +++ b/crypto/arc4.c @@ -24,10 +24,9 @@ struct arc4_ctx { u8 x, y; }; -static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int arc4_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) { - struct arc4_ctx *ctx = crypto_tfm_ctx(tfm); + struct arc4_ctx *ctx = ctx_arg; int i, j = 0, k = 0; ctx->x = 1; @@ -49,9 +48,9 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, return 0; } -static void arc4_crypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void arc4_crypt(void *ctx_arg, u8 *out, const u8 *in) { - struct arc4_ctx *ctx = crypto_tfm_ctx(tfm); + struct arc4_ctx *ctx = ctx_arg; u8 *const S = ctx->S; u8 x = ctx->x; diff --git a/crypto/blowfish.c b/crypto/blowfish.c index 490265f42..7f710b201 100644 --- a/crypto/blowfish.c +++ b/crypto/blowfish.c @@ -349,7 +349,7 @@ static void encrypt_block(struct bf_ctx *bctx, u32 *dst, u32 *src) dst[1] = yl; } -static void bf_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void bf_encrypt(void *ctx, u8 *dst, const u8 *src) { const __be32 *in_blk = (const __be32 *)src; __be32 *const out_blk = (__be32 *)dst; @@ -357,18 +357,17 @@ static void bf_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in32[0] = be32_to_cpu(in_blk[0]); in32[1] = be32_to_cpu(in_blk[1]); - encrypt_block(crypto_tfm_ctx(tfm), out32, in32); + encrypt_block(ctx, out32, in32); out_blk[0] = cpu_to_be32(out32[0]); out_blk[1] = cpu_to_be32(out32[1]); } -static void bf_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void bf_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct bf_ctx *ctx = crypto_tfm_ctx(tfm); const __be32 *in_blk = (const __be32 *)src; __be32 *const out_blk = (__be32 *)dst; - const u32 *P = ctx->p; - const u32 *S = ctx->s; + const u32 *P = ((struct bf_ctx *)ctx)->p; + const u32 *S = ((struct bf_ctx *)ctx)->s; u32 yl = be32_to_cpu(in_blk[0]); u32 yr = be32_to_cpu(in_blk[1]); @@ -399,14 +398,12 @@ static void bf_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) /* * Calculates the blowfish S and P boxes for encryption and decryption. */ -static int bf_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int bf_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags) { - struct bf_ctx *ctx = crypto_tfm_ctx(tfm); - u32 *P = ctx->p; - u32 *S = ctx->s; short i, j, count; u32 data[2], temp; + u32 *P = ((struct bf_ctx *)ctx)->p; + u32 *S = ((struct bf_ctx *)ctx)->s; /* Copy the initialization s-boxes */ for (i = 0, count = 0; i < 256; i++) diff --git a/crypto/cast5.c b/crypto/cast5.c index 08eef58c1..8834c8580 100644 --- a/crypto/cast5.c +++ b/crypto/cast5.c @@ -577,9 +577,9 @@ static const u32 sb8[256] = { (((s1[I >> 24] + s2[(I>>16)&0xff]) ^ s3[(I>>8)&0xff]) - s4[I&0xff]) ) -static void cast5_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) +static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf) { - struct cast5_ctx *c = crypto_tfm_ctx(tfm); + struct cast5_ctx *c = (struct cast5_ctx *) ctx; const __be32 *src = (const __be32 *)inbuf; __be32 *dst = (__be32 *)outbuf; u32 l, r, t; @@ -642,9 +642,9 @@ static void cast5_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) dst[1] = cpu_to_be32(l); } -static void cast5_decrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) +static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf) { - struct cast5_ctx *c = crypto_tfm_ctx(tfm); + struct cast5_ctx *c = (struct cast5_ctx *) ctx; const __be32 *src = (const __be32 *)inbuf; __be32 *dst = (__be32 *)outbuf; u32 l, r, t; @@ -769,15 +769,15 @@ static void key_schedule(u32 * x, u32 * z, u32 * k) } -static int cast5_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned key_len, u32 *flags) +static int +cast5_setkey(void *ctx, const u8 * key, unsigned key_len, u32 * flags) { - struct cast5_ctx *c = crypto_tfm_ctx(tfm); int i; u32 x[4]; u32 z[4]; u32 k[16]; __be32 p_key[4]; + struct cast5_ctx *c = (struct cast5_ctx *) ctx; if (key_len < 5 || key_len > 16) { *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; diff --git a/crypto/cast6.c b/crypto/cast6.c index 08e33bfc3..9e28740ba 100644 --- a/crypto/cast6.c +++ b/crypto/cast6.c @@ -381,13 +381,13 @@ static inline void W(u32 *key, unsigned int i) { key[7] ^= F2(key[0], Tr[i % 4][7], Tm[i][7]); } -static int cast6_setkey(struct crypto_tfm *tfm, const u8 *in_key, - unsigned key_len, u32 *flags) +static int +cast6_setkey(void *ctx, const u8 * in_key, unsigned key_len, u32 * flags) { int i; u32 key[8]; __be32 p_key[8]; /* padded key */ - struct cast6_ctx *c = crypto_tfm_ctx(tfm); + struct cast6_ctx *c = (struct cast6_ctx *) ctx; if (key_len < 16 || key_len > 32 || key_len % 4 != 0) { *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; @@ -444,9 +444,8 @@ static inline void QBAR (u32 * block, u8 * Kr, u32 * Km) { block[2] ^= F1(block[3], Kr[0], Km[0]); } -static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) -{ - struct cast6_ctx *c = crypto_tfm_ctx(tfm); +static void cast6_encrypt (void * ctx, u8 * outbuf, const u8 * inbuf) { + struct cast6_ctx * c = (struct cast6_ctx *)ctx; const __be32 *src = (const __be32 *)inbuf; __be32 *dst = (__be32 *)outbuf; u32 block[4]; @@ -477,8 +476,8 @@ static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) dst[3] = cpu_to_be32(block[3]); } -static void cast6_decrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf) { - struct cast6_ctx * c = crypto_tfm_ctx(tfm); +static void cast6_decrypt (void * ctx, u8 * outbuf, const u8 * inbuf) { + struct cast6_ctx * c = (struct cast6_ctx *)ctx; const __be32 *src = (const __be32 *)inbuf; __be32 *dst = (__be32 *)outbuf; u32 block[4]; diff --git a/crypto/cipher.c b/crypto/cipher.c index b899eb97a..65bcea0cd 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c @@ -187,7 +187,7 @@ static unsigned int cbc_process_encrypt(const struct cipher_desc *desc, void (*xor)(u8 *, const u8 *) = tfm->crt_u.cipher.cit_xor_block; int bsize = crypto_tfm_alg_blocksize(tfm); - void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = desc->crfn; + void (*fn)(void *, u8 *, const u8 *) = desc->crfn; u8 *iv = desc->info; unsigned int done = 0; @@ -195,7 +195,7 @@ static unsigned int cbc_process_encrypt(const struct cipher_desc *desc, do { xor(iv, src); - fn(tfm, dst, iv); + fn(crypto_tfm_ctx(tfm), dst, iv); memcpy(iv, dst, bsize); src += bsize; @@ -218,7 +218,7 @@ static unsigned int cbc_process_decrypt(const struct cipher_desc *desc, u8 *buf = (u8 *)ALIGN((unsigned long)stack, alignmask + 1); u8 **dst_p = src == dst ? &buf : &dst; - void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = desc->crfn; + void (*fn)(void *, u8 *, const u8 *) = desc->crfn; u8 *iv = desc->info; unsigned int done = 0; @@ -227,7 +227,7 @@ static unsigned int cbc_process_decrypt(const struct cipher_desc *desc, do { u8 *tmp_dst = *dst_p; - fn(tfm, tmp_dst, src); + fn(crypto_tfm_ctx(tfm), tmp_dst, src); xor(tmp_dst, iv); memcpy(iv, src, bsize); if (tmp_dst != dst) @@ -245,13 +245,13 @@ static unsigned int ecb_process(const struct cipher_desc *desc, u8 *dst, { struct crypto_tfm *tfm = desc->tfm; int bsize = crypto_tfm_alg_blocksize(tfm); - void (*fn)(struct crypto_tfm *, u8 *, const u8 *) = desc->crfn; + void (*fn)(void *, u8 *, const u8 *) = desc->crfn; unsigned int done = 0; nbytes -= bsize; do { - fn(tfm, dst, src); + fn(crypto_tfm_ctx(tfm), dst, src); src += bsize; dst += bsize; @@ -268,7 +268,7 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; return -EINVAL; } else - return cia->cia_setkey(tfm, key, keylen, + return cia->cia_setkey(crypto_tfm_ctx(tfm), key, keylen, &tfm->crt_flags); } diff --git a/crypto/compress.c b/crypto/compress.c index eca182aa3..eb36d9364 100644 --- a/crypto/compress.c +++ b/crypto/compress.c @@ -22,7 +22,8 @@ static int crypto_compress(struct crypto_tfm *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen) { - return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst, + return tfm->__crt_alg->cra_compress.coa_compress(crypto_tfm_ctx(tfm), + src, slen, dst, dlen); } @@ -30,7 +31,8 @@ static int crypto_decompress(struct crypto_tfm *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen) { - return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst, + return tfm->__crt_alg->cra_compress.coa_decompress(crypto_tfm_ctx(tfm), + src, slen, dst, dlen); } @@ -41,14 +43,21 @@ int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags) int crypto_init_compress_ops(struct crypto_tfm *tfm) { + int ret = 0; struct compress_tfm *ops = &tfm->crt_compress; + + ret = tfm->__crt_alg->cra_compress.coa_init(crypto_tfm_ctx(tfm)); + if (ret) + goto out; ops->cot_compress = crypto_compress; ops->cot_decompress = crypto_decompress; - return 0; +out: + return ret; } void crypto_exit_compress_ops(struct crypto_tfm *tfm) { + tfm->__crt_alg->cra_compress.coa_exit(crypto_tfm_ctx(tfm)); } diff --git a/crypto/crc32c.c b/crypto/crc32c.c index f2660123a..953362423 100644 --- a/crypto/crc32c.c +++ b/crypto/crc32c.c @@ -31,9 +31,9 @@ struct chksum_ctx { * crc using table. */ -static void chksum_init(struct crypto_tfm *tfm) +static void chksum_init(void *ctx) { - struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); + struct chksum_ctx *mctx = ctx; mctx->crc = ~(u32)0; /* common usage */ } @@ -43,10 +43,10 @@ static void chksum_init(struct crypto_tfm *tfm) * If your algorithm starts with ~0, then XOR with ~0 before you set * the seed. */ -static int chksum_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int chksum_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) { - struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); + struct chksum_ctx *mctx = ctx; if (keylen != sizeof(mctx->crc)) { if (flags) @@ -57,10 +57,9 @@ static int chksum_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void chksum_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int length) +static void chksum_update(void *ctx, const u8 *data, unsigned int length) { - struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); + struct chksum_ctx *mctx = ctx; u32 mcrc; mcrc = crc32c(mctx->crc, data, (size_t)length); @@ -68,9 +67,9 @@ static void chksum_update(struct crypto_tfm *tfm, const u8 *data, mctx->crc = mcrc; } -static void chksum_final(struct crypto_tfm *tfm, u8 *out) +static void chksum_final(void *ctx, u8 *out) { - struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); + struct chksum_ctx *mctx = ctx; u32 mcrc = (mctx->crc ^ ~(u32)0); *(u32 *)out = __le32_to_cpu(mcrc); diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c index a0d956b52..3fcf6e887 100644 --- a/crypto/crypto_null.c +++ b/crypto/crypto_null.c @@ -27,8 +27,8 @@ #define NULL_BLOCK_SIZE 1 #define NULL_DIGEST_SIZE 0 -static int null_compress(struct crypto_tfm *tfm, const u8 *src, - unsigned int slen, u8 *dst, unsigned int *dlen) +static int null_compress(void *ctx, const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen) { if (slen > *dlen) return -EINVAL; @@ -37,21 +37,20 @@ static int null_compress(struct crypto_tfm *tfm, const u8 *src, return 0; } -static void null_init(struct crypto_tfm *tfm) +static void null_init(void *ctx) { } -static void null_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void null_update(void *ctx, const u8 *data, unsigned int len) { } -static void null_final(struct crypto_tfm *tfm, u8 *out) +static void null_final(void *ctx, u8 *out) { } -static int null_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int null_setkey(void *ctx, const u8 *key, + unsigned int keylen, u32 *flags) { return 0; } -static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void null_crypt(void *ctx, u8 *dst, const u8 *src) { memcpy(dst, src, NULL_BLOCK_SIZE); } diff --git a/crypto/deflate.c b/crypto/deflate.c index 6588bbf82..f209368d6 100644 --- a/crypto/deflate.c +++ b/crypto/deflate.c @@ -102,9 +102,8 @@ static void deflate_decomp_exit(struct deflate_ctx *ctx) kfree(ctx->decomp_stream.workspace); } -static int deflate_init(struct crypto_tfm *tfm) +static int deflate_init(void *ctx) { - struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); int ret; ret = deflate_comp_init(ctx); @@ -117,19 +116,17 @@ out: return ret; } -static void deflate_exit(struct crypto_tfm *tfm) +static void deflate_exit(void *ctx) { - struct deflate_ctx *ctx = crypto_tfm_ctx(tfm); - deflate_comp_exit(ctx); deflate_decomp_exit(ctx); } -static int deflate_compress(struct crypto_tfm *tfm, const u8 *src, - unsigned int slen, u8 *dst, unsigned int *dlen) +static int deflate_compress(void *ctx, const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen) { int ret = 0; - struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); + struct deflate_ctx *dctx = ctx; struct z_stream_s *stream = &dctx->comp_stream; ret = zlib_deflateReset(stream); @@ -154,12 +151,12 @@ out: return ret; } -static int deflate_decompress(struct crypto_tfm *tfm, const u8 *src, - unsigned int slen, u8 *dst, unsigned int *dlen) +static int deflate_decompress(void *ctx, const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen) { int ret = 0; - struct deflate_ctx *dctx = crypto_tfm_ctx(tfm); + struct deflate_ctx *dctx = ctx; struct z_stream_s *stream = &dctx->decomp_stream; ret = zlib_inflateReset(stream); @@ -201,9 +198,9 @@ static struct crypto_alg alg = { .cra_ctxsize = sizeof(struct deflate_ctx), .cra_module = THIS_MODULE, .cra_list = LIST_HEAD_INIT(alg.cra_list), - .cra_init = deflate_init, - .cra_exit = deflate_exit, .cra_u = { .compress = { + .coa_init = deflate_init, + .coa_exit = deflate_exit, .coa_compress = deflate_compress, .coa_decompress = deflate_decompress } } }; diff --git a/crypto/des.c b/crypto/des.c index a9d3c235a..2d74cab40 100644 --- a/crypto/des.c +++ b/crypto/des.c @@ -783,10 +783,9 @@ static void dkey(u32 *pe, const u8 *k) } } -static int des_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int des_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags) { - struct des_ctx *dctx = crypto_tfm_ctx(tfm); + struct des_ctx *dctx = ctx; u32 tmp[DES_EXPKEY_WORDS]; int ret; @@ -804,10 +803,9 @@ static int des_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des_encrypt(void *ctx, u8 *dst, const u8 *src) { - struct des_ctx *ctx = crypto_tfm_ctx(tfm); - const u32 *K = ctx->expkey; + const u32 *K = ((struct des_ctx *)ctx)->expkey; const __le32 *s = (const __le32 *)src; __le32 *d = (__le32 *)dst; u32 L, R, A, B; @@ -827,10 +825,9 @@ static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) d[1] = cpu_to_le32(L); } -static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct des_ctx *ctx = crypto_tfm_ctx(tfm); - const u32 *K = ctx->expkey + DES_EXPKEY_WORDS - 2; + const u32 *K = ((struct des_ctx *)ctx)->expkey + DES_EXPKEY_WORDS - 2; const __le32 *s = (const __le32 *)src; __le32 *d = (__le32 *)dst; u32 L, R, A, B; @@ -863,11 +860,11 @@ static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) * property. * */ -static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, +static int des3_ede_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags) { const u32 *K = (const u32 *)key; - struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); + struct des3_ede_ctx *dctx = ctx; u32 *expkey = dctx->expkey; if (unlikely(!((K[0] ^ K[2]) | (K[1] ^ K[3])) || @@ -884,9 +881,9 @@ static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_ede_encrypt(void *ctx, u8 *dst, const u8 *src) { - struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); + struct des3_ede_ctx *dctx = ctx; const u32 *K = dctx->expkey; const __le32 *s = (const __le32 *)src; __le32 *d = (__le32 *)dst; @@ -915,9 +912,9 @@ static void des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) d[1] = cpu_to_le32(L); } -static void des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void des3_ede_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); + struct des3_ede_ctx *dctx = ctx; const u32 *K = dctx->expkey + DES3_EDE_EXPKEY_WORDS - 2; const __le32 *s = (const __le32 *)src; __le32 *d = (__le32 *)dst; diff --git a/crypto/digest.c b/crypto/digest.c index c4dd9f26a..61a767698 100644 --- a/crypto/digest.c +++ b/crypto/digest.c @@ -20,14 +20,13 @@ static void init(struct crypto_tfm *tfm) { - tfm->__crt_alg->cra_digest.dia_init(tfm); + tfm->__crt_alg->cra_digest.dia_init(crypto_tfm_ctx(tfm)); } static void update(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg) { unsigned int i; - unsigned int alignmask = crypto_tfm_alg_alignmask(tfm); for (i = 0; i < nsg; i++) { @@ -39,22 +38,12 @@ static void update(struct crypto_tfm *tfm, unsigned int bytes_from_page = min(l, ((unsigned int) (PAGE_SIZE)) - offset); - char *src = crypto_kmap(pg, 0); - char *p = src + offset; + char *p = crypto_kmap(pg, 0) + offset; - if (unlikely(offset & alignmask)) { - unsigned int bytes = - alignmask + 1 - (offset & alignmask); - bytes = min(bytes, bytes_from_page); - tfm->__crt_alg->cra_digest.dia_update(tfm, p, - bytes); - p += bytes; - bytes_from_page -= bytes; - l -= bytes; - } - tfm->__crt_alg->cra_digest.dia_update(tfm, p, - bytes_from_page); - crypto_kunmap(src, 0); + tfm->__crt_alg->cra_digest.dia_update + (crypto_tfm_ctx(tfm), p, + bytes_from_page); + crypto_kunmap(p, 0); crypto_yield(tfm); offset = 0; pg++; @@ -66,21 +55,13 @@ static void update(struct crypto_tfm *tfm, static void update_kernel(struct crypto_tfm *tfm, const void *data, size_t count) { - tfm->__crt_alg->cra_digest.dia_update(tfm, data, count); + tfm->__crt_alg->cra_digest.dia_update(crypto_tfm_ctx(tfm), data, count); crypto_yield(tfm); } static void final(struct crypto_tfm *tfm, u8 *out) { - unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); - if (unlikely((unsigned long)out & alignmask)) { - unsigned int size = crypto_tfm_alg_digestsize(tfm); - u8 buffer[size + alignmask]; - u8 *dst = (u8 *)ALIGN((unsigned long)buffer, alignmask + 1); - tfm->__crt_alg->cra_digest.dia_final(tfm, dst); - memcpy(out, dst, size); - } else - tfm->__crt_alg->cra_digest.dia_final(tfm, out); + tfm->__crt_alg->cra_digest.dia_final(crypto_tfm_ctx(tfm), out); } static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) @@ -88,15 +69,25 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) u32 flags; if (tfm->__crt_alg->cra_digest.dia_setkey == NULL) return -ENOSYS; - return tfm->__crt_alg->cra_digest.dia_setkey(tfm, key, keylen, &flags); + return tfm->__crt_alg->cra_digest.dia_setkey(crypto_tfm_ctx(tfm), + key, keylen, &flags); } static void digest(struct crypto_tfm *tfm, struct scatterlist *sg, unsigned int nsg, u8 *out) { - init(tfm); - update(tfm, sg, nsg); - final(tfm, out); + unsigned int i; + + tfm->crt_digest.dit_init(tfm); + + for (i = 0; i < nsg; i++) { + char *p = crypto_kmap(sg[i].page, 0) + sg[i].offset; + tfm->__crt_alg->cra_digest.dia_update(crypto_tfm_ctx(tfm), + p, sg[i].length); + crypto_kunmap(p, 0); + crypto_yield(tfm); + } + crypto_digest_final(tfm, out); } int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags) diff --git a/crypto/khazad.c b/crypto/khazad.c index d4c9d3657..807f2bf4e 100644 --- a/crypto/khazad.c +++ b/crypto/khazad.c @@ -754,11 +754,11 @@ static const u64 c[KHAZAD_ROUNDS + 1] = { 0xccc41d14c363da5dULL, 0x5fdc7dcd7f5a6c5cULL, 0xf726ffede89d6f8eULL }; -static int khazad_setkey(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int khazad_setkey(void *ctx_arg, const u8 *in_key, + unsigned int key_len, u32 *flags) { - struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); - const __be32 *key = (const __be32 *)in_key; + struct khazad_ctx *ctx = ctx_arg; + const __be64 *key = (const __be64 *)in_key; int r; const u64 *S = T7; u64 K2, K1; @@ -769,9 +769,8 @@ static int khazad_setkey(struct crypto_tfm *tfm, const u8 *in_key, return -EINVAL; } - /* key is supposed to be 32-bit aligned */ - K2 = ((u64)be32_to_cpu(key[0]) << 32) | be32_to_cpu(key[1]); - K1 = ((u64)be32_to_cpu(key[2]) << 32) | be32_to_cpu(key[3]); + K2 = be64_to_cpu(key[0]); + K1 = be64_to_cpu(key[1]); /* setup the encrypt key */ for (r = 0; r <= KHAZAD_ROUNDS; r++) { @@ -841,15 +840,15 @@ static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1], *dst = cpu_to_be64(state); } -static void khazad_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void khazad_encrypt(void *ctx_arg, u8 *dst, const u8 *src) { - struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); + struct khazad_ctx *ctx = ctx_arg; khazad_crypt(ctx->E, dst, src); } -static void khazad_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void khazad_decrypt(void *ctx_arg, u8 *dst, const u8 *src) { - struct khazad_ctx *ctx = crypto_tfm_ctx(tfm); + struct khazad_ctx *ctx = ctx_arg; khazad_crypt(ctx->D, dst, src); } diff --git a/crypto/md4.c b/crypto/md4.c index c1bc71bdc..a2d6df5c0 100644 --- a/crypto/md4.c +++ b/crypto/md4.c @@ -152,9 +152,9 @@ static inline void md4_transform_helper(struct md4_ctx *ctx) md4_transform(ctx->hash, ctx->block); } -static void md4_init(struct crypto_tfm *tfm) +static void md4_init(void *ctx) { - struct md4_ctx *mctx = crypto_tfm_ctx(tfm); + struct md4_ctx *mctx = ctx; mctx->hash[0] = 0x67452301; mctx->hash[1] = 0xefcdab89; @@ -163,9 +163,9 @@ static void md4_init(struct crypto_tfm *tfm) mctx->byte_count = 0; } -static void md4_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) +static void md4_update(void *ctx, const u8 *data, unsigned int len) { - struct md4_ctx *mctx = crypto_tfm_ctx(tfm); + struct md4_ctx *mctx = ctx; const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); mctx->byte_count += len; @@ -193,9 +193,9 @@ static void md4_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) memcpy(mctx->block, data, len); } -static void md4_final(struct crypto_tfm *tfm, u8 *out) +static void md4_final(void *ctx, u8 *out) { - struct md4_ctx *mctx = crypto_tfm_ctx(tfm); + struct md4_ctx *mctx = ctx; const unsigned int offset = mctx->byte_count & 0x3f; char *p = (char *)mctx->block + offset; int padding = 56 - (offset + 1); diff --git a/crypto/md5.c b/crypto/md5.c index 93d18e8b3..7f041aef5 100644 --- a/crypto/md5.c +++ b/crypto/md5.c @@ -147,9 +147,9 @@ static inline void md5_transform_helper(struct md5_ctx *ctx) md5_transform(ctx->hash, ctx->block); } -static void md5_init(struct crypto_tfm *tfm) +static void md5_init(void *ctx) { - struct md5_ctx *mctx = crypto_tfm_ctx(tfm); + struct md5_ctx *mctx = ctx; mctx->hash[0] = 0x67452301; mctx->hash[1] = 0xefcdab89; @@ -158,9 +158,9 @@ static void md5_init(struct crypto_tfm *tfm) mctx->byte_count = 0; } -static void md5_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) +static void md5_update(void *ctx, const u8 *data, unsigned int len) { - struct md5_ctx *mctx = crypto_tfm_ctx(tfm); + struct md5_ctx *mctx = ctx; const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); mctx->byte_count += len; @@ -188,9 +188,9 @@ static void md5_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) memcpy(mctx->block, data, len); } -static void md5_final(struct crypto_tfm *tfm, u8 *out) +static void md5_final(void *ctx, u8 *out) { - struct md5_ctx *mctx = crypto_tfm_ctx(tfm); + struct md5_ctx *mctx = ctx; const unsigned int offset = mctx->byte_count & 0x3f; char *p = (char *)mctx->block + offset; int padding = 56 - (offset + 1); diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c index d061da21c..4f6ab23e1 100644 --- a/crypto/michael_mic.c +++ b/crypto/michael_mic.c @@ -45,17 +45,16 @@ do { \ } while (0) -static void michael_init(struct crypto_tfm *tfm) +static void michael_init(void *ctx) { - struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); + struct michael_mic_ctx *mctx = ctx; mctx->pending_len = 0; } -static void michael_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void michael_update(void *ctx, const u8 *data, unsigned int len) { - struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); + struct michael_mic_ctx *mctx = ctx; const __le32 *src; if (mctx->pending_len) { @@ -91,9 +90,9 @@ static void michael_update(struct crypto_tfm *tfm, const u8 *data, } -static void michael_final(struct crypto_tfm *tfm, u8 *out) +static void michael_final(void *ctx, u8 *out) { - struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); + struct michael_mic_ctx *mctx = ctx; u8 *data = mctx->pending; __le32 *dst = (__le32 *)out; @@ -122,10 +121,10 @@ static void michael_final(struct crypto_tfm *tfm, u8 *out) } -static int michael_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int michael_setkey(void *ctx, const u8 *key, unsigned int keylen, + u32 *flags) { - struct michael_mic_ctx *mctx = crypto_tfm_ctx(tfm); + struct michael_mic_ctx *mctx = ctx; const __le32 *data = (const __le32 *)key; if (keylen != 8) { @@ -146,7 +145,6 @@ static struct crypto_alg michael_mic_alg = { .cra_blocksize = 8, .cra_ctxsize = sizeof(struct michael_mic_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 3, .cra_list = LIST_HEAD_INIT(michael_mic_alg.cra_list), .cra_u = { .digest = { .dia_digestsize = 8, diff --git a/crypto/serpent.c b/crypto/serpent.c index de60cdddb..e366406ab 100644 --- a/crypto/serpent.c +++ b/crypto/serpent.c @@ -215,11 +215,9 @@ struct serpent_ctx { }; -static int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int serpent_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags) { - struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); - u32 *k = ctx->expkey; + u32 *k = ((struct serpent_ctx *)ctx)->expkey; u8 *k8 = (u8 *)k; u32 r0,r1,r2,r3,r4; int i; @@ -367,11 +365,10 @@ static int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, return 0; } -static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void serpent_encrypt(void *ctx, u8 *dst, const u8 *src) { - struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 - *k = ctx->expkey, + *k = ((struct serpent_ctx *)ctx)->expkey, *s = (const u32 *)src; u32 *d = (u32 *)dst, r0, r1, r2, r3, r4; @@ -426,9 +423,8 @@ static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) d[3] = cpu_to_le32(r3); } -static void serpent_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void serpent_decrypt(void *ctx, u8 *dst, const u8 *src) { - struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 *k = ((struct serpent_ctx *)ctx)->expkey, *s = (const u32 *)src; @@ -496,8 +492,7 @@ static struct crypto_alg serpent_alg = { .cia_decrypt = serpent_decrypt } } }; -static int tnepres_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int keylen, u32 *flags) +static int tnepres_setkey(void *ctx, const u8 *key, unsigned int keylen, u32 *flags) { u8 rev_key[SERPENT_MAX_KEY_SIZE]; int i; @@ -511,10 +506,10 @@ static int tnepres_setkey(struct crypto_tfm *tfm, const u8 *key, for (i = 0; i < keylen; ++i) rev_key[keylen - i - 1] = key[i]; - return serpent_setkey(tfm, rev_key, keylen, flags); + return serpent_setkey(ctx, rev_key, keylen, flags); } -static void tnepres_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void tnepres_encrypt(void *ctx, u8 *dst, const u8 *src) { const u32 * const s = (const u32 * const)src; u32 * const d = (u32 * const)dst; @@ -526,7 +521,7 @@ static void tnepres_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) rs[2] = swab32(s[1]); rs[3] = swab32(s[0]); - serpent_encrypt(tfm, (u8 *)rd, (u8 *)rs); + serpent_encrypt(ctx, (u8 *)rd, (u8 *)rs); d[0] = swab32(rd[3]); d[1] = swab32(rd[2]); @@ -534,7 +529,7 @@ static void tnepres_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) d[3] = swab32(rd[0]); } -static void tnepres_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +static void tnepres_decrypt(void *ctx, u8 *dst, const u8 *src) { const u32 * const s = (const u32 * const)src; u32 * const d = (u32 * const)dst; @@ -546,7 +541,7 @@ static void tnepres_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) rs[2] = swab32(s[1]); rs[3] = swab32(s[0]); - serpent_decrypt(tfm, (u8 *)rd, (u8 *)rs); + serpent_decrypt(ctx, (u8 *)rd, (u8 *)rs); d[0] = swab32(rd[3]); d[1] = swab32(rd[2]); diff --git a/crypto/sha1.c b/crypto/sha1.c index 6c77b689f..21571ed35 100644 --- a/crypto/sha1.c +++ b/crypto/sha1.c @@ -34,9 +34,9 @@ struct sha1_ctx { u8 buffer[64]; }; -static void sha1_init(struct crypto_tfm *tfm) +static void sha1_init(void *ctx) { - struct sha1_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha1_ctx *sctx = ctx; static const struct sha1_ctx initstate = { 0, { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 }, @@ -46,10 +46,9 @@ static void sha1_init(struct crypto_tfm *tfm) *sctx = initstate; } -static void sha1_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void sha1_update(void *ctx, const u8 *data, unsigned int len) { - struct sha1_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha1_ctx *sctx = ctx; unsigned int partial, done; const u8 *src; @@ -81,9 +80,9 @@ static void sha1_update(struct crypto_tfm *tfm, const u8 *data, /* Add padding and return the message digest. */ -static void sha1_final(struct crypto_tfm *tfm, u8 *out) +static void sha1_final(void* ctx, u8 *out) { - struct sha1_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha1_ctx *sctx = ctx; __be32 *dst = (__be32 *)out; u32 i, index, padlen; __be64 bits; @@ -94,10 +93,10 @@ static void sha1_final(struct crypto_tfm *tfm, u8 *out) /* Pad out to 56 mod 64 */ index = sctx->count & 0x3f; padlen = (index < 56) ? (56 - index) : ((64+56) - index); - sha1_update(tfm, padding, padlen); + sha1_update(sctx, padding, padlen); /* Append length */ - sha1_update(tfm, (const u8 *)&bits, sizeof(bits)); + sha1_update(sctx, (const u8 *)&bits, sizeof(bits)); /* Store state in digest */ for (i = 0; i < 5; i++) @@ -113,7 +112,6 @@ static struct crypto_alg alg = { .cra_blocksize = SHA1_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha1_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 3, .cra_list = LIST_HEAD_INIT(alg.cra_list), .cra_u = { .digest = { .dia_digestsize = SHA1_DIGEST_SIZE, diff --git a/crypto/sha256.c b/crypto/sha256.c index bc71d85a7..9d5ef674d 100644 --- a/crypto/sha256.c +++ b/crypto/sha256.c @@ -230,9 +230,9 @@ static void sha256_transform(u32 *state, const u8 *input) memset(W, 0, 64 * sizeof(u32)); } -static void sha256_init(struct crypto_tfm *tfm) +static void sha256_init(void *ctx) { - struct sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha256_ctx *sctx = ctx; sctx->state[0] = H0; sctx->state[1] = H1; sctx->state[2] = H2; @@ -242,12 +242,12 @@ static void sha256_init(struct crypto_tfm *tfm) sctx->state[6] = H6; sctx->state[7] = H7; sctx->count[0] = sctx->count[1] = 0; + memset(sctx->buf, 0, sizeof(sctx->buf)); } -static void sha256_update(struct crypto_tfm *tfm, const u8 *data, - unsigned int len) +static void sha256_update(void *ctx, const u8 *data, unsigned int len) { - struct sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha256_ctx *sctx = ctx; unsigned int i, index, part_len; /* Compute number of bytes mod 128 */ @@ -277,9 +277,9 @@ static void sha256_update(struct crypto_tfm *tfm, const u8 *data, memcpy(&sctx->buf[index], &data[i], len-i); } -static void sha256_final(struct crypto_tfm *tfm, u8 *out) +static void sha256_final(void* ctx, u8 *out) { - struct sha256_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha256_ctx *sctx = ctx; __be32 *dst = (__be32 *)out; __be32 bits[2]; unsigned int index, pad_len; @@ -293,10 +293,10 @@ static void sha256_final(struct crypto_tfm *tfm, u8 *out) /* Pad out to 56 mod 64. */ index = (sctx->count[0] >> 3) & 0x3f; pad_len = (index < 56) ? (56 - index) : ((64+56) - index); - sha256_update(tfm, padding, pad_len); + sha256_update(sctx, padding, pad_len); /* Append length (before padding) */ - sha256_update(tfm, (const u8 *)bits, sizeof(bits)); + sha256_update(sctx, (const u8 *)bits, sizeof(bits)); /* Store state in digest */ for (i = 0; i < 8; i++) @@ -313,7 +313,6 @@ static struct crypto_alg alg = { .cra_blocksize = SHA256_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha256_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 3, .cra_list = LIST_HEAD_INIT(alg.cra_list), .cra_u = { .digest = { .dia_digestsize = SHA256_DIGEST_SIZE, diff --git a/crypto/sha512.c b/crypto/sha512.c index 2dfe7f170..3e6e93923 100644 --- a/crypto/sha512.c +++ b/crypto/sha512.c @@ -161,9 +161,9 @@ sha512_transform(u64 *state, u64 *W, const u8 *input) } static void -sha512_init(struct crypto_tfm *tfm) +sha512_init(void *ctx) { - struct sha512_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha512_ctx *sctx = ctx; sctx->state[0] = H0; sctx->state[1] = H1; sctx->state[2] = H2; @@ -173,12 +173,13 @@ sha512_init(struct crypto_tfm *tfm) sctx->state[6] = H6; sctx->state[7] = H7; sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0; + memset(sctx->buf, 0, sizeof(sctx->buf)); } static void -sha384_init(struct crypto_tfm *tfm) +sha384_init(void *ctx) { - struct sha512_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha512_ctx *sctx = ctx; sctx->state[0] = HP0; sctx->state[1] = HP1; sctx->state[2] = HP2; @@ -188,12 +189,13 @@ sha384_init(struct crypto_tfm *tfm) sctx->state[6] = HP6; sctx->state[7] = HP7; sctx->count[0] = sctx->count[1] = sctx->count[2] = sctx->count[3] = 0; + memset(sctx->buf, 0, sizeof(sctx->buf)); } static void -sha512_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) +sha512_update(void *ctx, const u8 *data, unsigned int len) { - struct sha512_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha512_ctx *sctx = ctx; unsigned int i, index, part_len; @@ -231,9 +233,9 @@ sha512_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len) } static void -sha512_final(struct crypto_tfm *tfm, u8 *hash) +sha512_final(void *ctx, u8 *hash) { - struct sha512_ctx *sctx = crypto_tfm_ctx(tfm); + struct sha512_ctx *sctx = ctx; static u8 padding[128] = { 0x80, }; __be64 *dst = (__be64 *)hash; __be32 bits[4]; @@ -249,10 +251,10 @@ sha512_final(struct crypto_tfm *tfm, u8 *hash) /* Pad out to 112 mod 128. */ index = (sctx->count[0] >> 3) & 0x7f; pad_len = (index < 112) ? (112 - index) : ((128+112) - index); - sha512_update(tfm, padding, pad_len); + sha512_update(sctx, padding, pad_len); /* Append length (before padding) */ - sha512_update(tfm, (const u8 *)bits, sizeof(bits)); + sha512_update(sctx, (const u8 *)bits, sizeof(bits)); /* Store state in digest */ for (i = 0; i < 8; i++) @@ -262,11 +264,12 @@ sha512_final(struct crypto_tfm *tfm, u8 *hash) memset(sctx, 0, sizeof(struct sha512_ctx)); } -static void sha384_final(struct crypto_tfm *tfm, u8 *hash) +static void sha384_final(void *ctx, u8 *hash) { + struct sha512_ctx *sctx = ctx; u8 D[64]; - sha512_final(tfm, D); + sha512_final(sctx, D); memcpy(hash, D, 48); memset(D, 0, 64); @@ -278,7 +281,6 @@ static struct crypto_alg sha512 = { .cra_blocksize = SHA512_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha512_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 3, .cra_list = LIST_HEAD_INIT(sha512.cra_list), .cra_u = { .digest = { .dia_digestsize = SHA512_DIGEST_SIZE, @@ -293,7 +295,6 @@ static struct crypto_alg sha384 = { .cra_flags = CRYPTO_ALG_TYPE_DIGEST, .cra_blocksize = SHA384_HMAC_BLOCK_SIZE, .cra_ctxsize = sizeof(struct sha512_ctx), - .cra_alignmask = 3, .cra_module = THIS_MODULE, .cra_list = LIST_HEAD_INIT(sha384.cra_list), .cra_u = { .digest = { diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index e52f56c5b..49e344f00 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -570,122 +570,6 @@ out: crypto_free_tfm(tfm); } -static void test_digest_jiffies(struct crypto_tfm *tfm, char *p, int blen, - int plen, char *out, int sec) -{ - struct scatterlist sg[1]; - unsigned long start, end; - int bcount, pcount; - - for (start = jiffies, end = start + sec * HZ, bcount = 0; - time_before(jiffies, end); bcount++) { - crypto_digest_init(tfm); - for (pcount = 0; pcount < blen; pcount += plen) { - sg_set_buf(sg, p + pcount, plen); - crypto_digest_update(tfm, sg, 1); - } - /* we assume there is enough space in 'out' for the result */ - crypto_digest_final(tfm, out); - } - - printk("%6u opers/sec, %9lu bytes/sec\n", - bcount / sec, ((long)bcount * blen) / sec); - - return; -} - -static void test_digest_cycles(struct crypto_tfm *tfm, char *p, int blen, - int plen, char *out) -{ - struct scatterlist sg[1]; - unsigned long cycles = 0; - int i, pcount; - - local_bh_disable(); - local_irq_disable(); - - /* Warm-up run. */ - for (i = 0; i < 4; i++) { - crypto_digest_init(tfm); - for (pcount = 0; pcount < blen; pcount += plen) { - sg_set_buf(sg, p + pcount, plen); - crypto_digest_update(tfm, sg, 1); - } - crypto_digest_final(tfm, out); - } - - /* The real thing. */ - for (i = 0; i < 8; i++) { - cycles_t start, end; - - crypto_digest_init(tfm); - - start = get_cycles(); - - for (pcount = 0; pcount < blen; pcount += plen) { - sg_set_buf(sg, p + pcount, plen); - crypto_digest_update(tfm, sg, 1); - } - crypto_digest_final(tfm, out); - - end = get_cycles(); - - cycles += end - start; - } - - local_irq_enable(); - local_bh_enable(); - - printk("%6lu cycles/operation, %4lu cycles/byte\n", - cycles / 8, cycles / (8 * blen)); - - return; -} - -static void test_digest_speed(char *algo, unsigned int sec, - struct digest_speed *speed) -{ - struct crypto_tfm *tfm; - char output[1024]; - int i; - - printk("\ntesting speed of %s\n", algo); - - tfm = crypto_alloc_tfm(algo, 0); - - if (tfm == NULL) { - printk("failed to load transform for %s\n", algo); - return; - } - - if (crypto_tfm_alg_digestsize(tfm) > sizeof(output)) { - printk("digestsize(%u) > outputbuffer(%zu)\n", - crypto_tfm_alg_digestsize(tfm), sizeof(output)); - goto out; - } - - for (i = 0; speed[i].blen != 0; i++) { - if (speed[i].blen > TVMEMSIZE) { - printk("template (%u) too big for tvmem (%u)\n", - speed[i].blen, TVMEMSIZE); - goto out; - } - - printk("test%3u (%5u byte blocks,%5u bytes per update,%4u updates): ", - i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen); - - memset(tvmem, 0xff, speed[i].blen); - - if (sec) - test_digest_jiffies(tfm, tvmem, speed[i].blen, speed[i].plen, output, sec); - else - test_digest_cycles(tfm, tvmem, speed[i].blen, speed[i].plen, output); - } - -out: - crypto_free_tfm(tfm); -} - static void test_deflate(void) { unsigned int i; @@ -1202,60 +1086,6 @@ static void do_test(void) des_speed_template); break; - case 300: - /* fall through */ - - case 301: - test_digest_speed("md4", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 302: - test_digest_speed("md5", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 303: - test_digest_speed("sha1", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 304: - test_digest_speed("sha256", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 305: - test_digest_speed("sha384", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 306: - test_digest_speed("sha512", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 307: - test_digest_speed("wp256", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 308: - test_digest_speed("wp384", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 309: - test_digest_speed("wp512", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 310: - test_digest_speed("tgr128", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 311: - test_digest_speed("tgr160", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 312: - test_digest_speed("tgr192", sec, generic_digest_speed_template); - if (mode > 300 && mode < 400) break; - - case 399: - break; - case 1000: test_available(); break; @@ -1283,14 +1113,7 @@ static int __init init(void) kfree(xbuf); kfree(tvmem); - - /* We intentionaly return -EAGAIN to prevent keeping - * the module. It does all its work from init() - * and doesn't offer any runtime functionality - * => we don't need it in the memory, do we? - * -- mludvig - */ - return -EAGAIN; + return 0; } /* diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 1fac5602f..1f683ba79 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h @@ -65,11 +65,6 @@ struct cipher_speed { unsigned int blen; }; -struct digest_speed { - unsigned int blen; /* buffer length */ - unsigned int plen; /* per-update length */ -}; - /* * MD4 test vectors from RFC1320 */ @@ -2980,35 +2975,4 @@ static struct cipher_speed des_speed_template[] = { { .klen = 0, .blen = 0, } }; -/* - * Digest speed tests - */ -static struct digest_speed generic_digest_speed_template[] = { - { .blen = 16, .plen = 16, }, - { .blen = 64, .plen = 16, }, - { .blen = 64, .plen = 64, }, - { .blen = 256, .plen = 16, }, - { .blen = 256, .plen = 64, }, - { .blen = 256, .plen = 256, }, - { .blen = 1024, .plen = 16, }, - { .blen = 1024, .plen = 256, }, - { .blen = 1024, .plen = 1024, }, - { .blen = 2048, .plen = 16, }, - { .blen = 2048, .plen = 256, }, - { .blen = 2048, .plen = 1024, }, - { .blen = 2048, .plen = 2048, }, - { .blen = 4096, .plen = 16, }, - { .blen = 4096, .plen = 256, }, - { .blen = 4096, .plen = 1024, }, - { .blen = 4096, .plen = 4096, }, - { .blen = 8192, .plen = 16, }, - { .blen = 8192, .plen = 256, }, - { .blen = 8192, .plen = 1024, }, - { .blen = 8192, .plen = 4096, }, - { .blen = 8192, .plen = 8192, }, - - /* End marker */ - { .blen = 0, .plen = 0, } -}; - #endif /* _CRYPTO_TCRYPT_H */ diff --git a/crypto/tea.c b/crypto/tea.c index 5367adc82..a6a02b30e 100644 --- a/crypto/tea.c +++ b/crypto/tea.c @@ -45,10 +45,10 @@ struct xtea_ctx { u32 KEY[4]; }; -static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) -{ - struct tea_ctx *ctx = crypto_tfm_ctx(tfm); +static int tea_setkey(void *ctx_arg, const u8 *in_key, + unsigned int key_len, u32 *flags) +{ + struct tea_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; if (key_len != 16) @@ -66,11 +66,12 @@ static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, } -static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void tea_encrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, n, sum = 0; u32 k0, k1, k2, k3; - struct tea_ctx *ctx = crypto_tfm_ctx(tfm); + + struct tea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; @@ -94,11 +95,11 @@ static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) out[1] = cpu_to_le32(z); } -static void tea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, n, sum; u32 k0, k1, k2, k3; - struct tea_ctx *ctx = crypto_tfm_ctx(tfm); + struct tea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; @@ -124,10 +125,10 @@ static void tea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) out[1] = cpu_to_le32(z); } -static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) -{ - struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); +static int xtea_setkey(void *ctx_arg, const u8 *in_key, + unsigned int key_len, u32 *flags) +{ + struct xtea_ctx *ctx = ctx_arg; const __le32 *key = (const __le32 *)in_key; if (key_len != 16) @@ -145,11 +146,12 @@ static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, } -static void xtea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, sum = 0; u32 limit = XTEA_DELTA * XTEA_ROUNDS; - struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); + + struct xtea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; @@ -166,10 +168,10 @@ static void xtea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) out[1] = cpu_to_le32(z); } -static void xtea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, sum; - struct tea_ctx *ctx = crypto_tfm_ctx(tfm); + struct tea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; @@ -189,11 +191,12 @@ static void xtea_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) } -static void xeta_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, sum = 0; u32 limit = XTEA_DELTA * XTEA_ROUNDS; - struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); + + struct xtea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; @@ -210,10 +213,10 @@ static void xeta_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) out[1] = cpu_to_le32(z); } -static void xeta_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ +static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src) +{ u32 y, z, sum; - struct tea_ctx *ctx = crypto_tfm_ctx(tfm); + struct tea_ctx *ctx = ctx_arg; const __le32 *in = (const __le32 *)src; __le32 *out = (__le32 *)dst; diff --git a/crypto/tgr192.c b/crypto/tgr192.c index a0fadf3dd..2d8e44f6f 100644 --- a/crypto/tgr192.c +++ b/crypto/tgr192.c @@ -496,10 +496,11 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data) tctx->c = c; } -static void tgr192_init(struct crypto_tfm *tfm) +static void tgr192_init(void *ctx) { - struct tgr192_ctx *tctx = crypto_tfm_ctx(tfm); + struct tgr192_ctx *tctx = ctx; + memset (tctx->hash, 0, 64); tctx->a = 0x0123456789abcdefULL; tctx->b = 0xfedcba9876543210ULL; tctx->c = 0xf096a5b4c3b2e187ULL; @@ -510,10 +511,9 @@ static void tgr192_init(struct crypto_tfm *tfm) /* Update the message digest with the contents * of INBUF with length INLEN. */ -static void tgr192_update(struct crypto_tfm *tfm, const u8 *inbuf, - unsigned int len) +static void tgr192_update(void *ctx, const u8 * inbuf, unsigned int len) { - struct tgr192_ctx *tctx = crypto_tfm_ctx(tfm); + struct tgr192_ctx *tctx = ctx; if (tctx->count == 64) { /* flush the buffer */ tgr192_transform(tctx, tctx->hash); @@ -527,7 +527,7 @@ static void tgr192_update(struct crypto_tfm *tfm, const u8 *inbuf, for (; len && tctx->count < 64; len--) { tctx->hash[tctx->count++] = *inbuf++; } - tgr192_update(tfm, NULL, 0); + tgr192_update(tctx, NULL, 0); if (!len) { return; } @@ -549,15 +549,15 @@ static void tgr192_update(struct crypto_tfm *tfm, const u8 *inbuf, /* The routine terminates the computation */ -static void tgr192_final(struct crypto_tfm *tfm, u8 * out) +static void tgr192_final(void *ctx, u8 * out) { - struct tgr192_ctx *tctx = crypto_tfm_ctx(tfm); + struct tgr192_ctx *tctx = ctx; __be64 *dst = (__be64 *)out; __be64 *be64p; __le32 *le32p; u32 t, msb, lsb; - tgr192_update(tfm, NULL, 0); /* flush */ ; + tgr192_update(tctx, NULL, 0); /* flush */ ; msb = 0; t = tctx->nblocks; @@ -585,7 +585,7 @@ static void tgr192_final(struct crypto_tfm *tfm, u8 * out) while (tctx->count < 64) { tctx->hash[tctx->count++] = 0; } - tgr192_update(tfm, NULL, 0); /* flush */ ; + tgr192_update(tctx, NULL, 0); /* flush */ ; memset(tctx->hash, 0, 56); /* fill next block with zeroes */ } /* append the 64 bit count */ @@ -601,20 +601,22 @@ static void tgr192_final(struct crypto_tfm *tfm, u8 * out) dst[2] = be64p[2] = cpu_to_be64(tctx->c); } -static void tgr160_final(struct crypto_tfm *tfm, u8 * out) +static void tgr160_final(void *ctx, u8 * out) { + struct tgr192_ctx *wctx = ctx; u8 D[64]; - tgr192_final(tfm, D); + tgr192_final(wctx, D); memcpy(out, D, TGR160_DIGEST_SIZE); memset(D, 0, TGR192_DIGEST_SIZE); } -static void tgr128_final(struct crypto_tfm *tfm, u8 * out) +static void tgr128_final(void *ctx, u8 * out) { + struct tgr192_ctx *wctx = ctx; u8 D[64]; - tgr192_final(tfm, D); + tgr192_final(wctx, D); memcpy(out, D, TGR128_DIGEST_SIZE); memset(D, 0, TGR192_DIGEST_SIZE); } @@ -625,7 +627,6 @@ static struct crypto_alg tgr192 = { .cra_blocksize = TGR192_BLOCK_SIZE, .cra_ctxsize = sizeof(struct tgr192_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 7, .cra_list = LIST_HEAD_INIT(tgr192.cra_list), .cra_u = {.digest = { .dia_digestsize = TGR192_DIGEST_SIZE, @@ -640,7 +641,6 @@ static struct crypto_alg tgr160 = { .cra_blocksize = TGR192_BLOCK_SIZE, .cra_ctxsize = sizeof(struct tgr192_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 7, .cra_list = LIST_HEAD_INIT(tgr160.cra_list), .cra_u = {.digest = { .dia_digestsize = TGR160_DIGEST_SIZE, @@ -655,7 +655,6 @@ static struct crypto_alg tgr128 = { .cra_blocksize = TGR192_BLOCK_SIZE, .cra_ctxsize = sizeof(struct tgr192_ctx), .cra_module = THIS_MODULE, - .cra_alignmask = 7, .cra_list = LIST_HEAD_INIT(tgr128.cra_list), .cra_u = {.digest = { .dia_digestsize = TGR128_DIGEST_SIZE, diff --git a/crypto/twofish.c b/crypto/twofish.c index ec2488242..ddfd5a3fc 100644 --- a/crypto/twofish.c +++ b/crypto/twofish.c @@ -643,11 +643,11 @@ struct twofish_ctx { }; /* Perform the key setup. */ -static int twofish_setkey(struct crypto_tfm *tfm, const u8 *key, - unsigned int key_len, u32 *flags) +static int twofish_setkey(void *cx, const u8 *key, + unsigned int key_len, u32 *flags) { - struct twofish_ctx *ctx = crypto_tfm_ctx(tfm); + struct twofish_ctx *ctx = cx; int i, j, k; @@ -802,9 +802,9 @@ static int twofish_setkey(struct crypto_tfm *tfm, const u8 *key, } /* Encrypt one block. in and out may be the same. */ -static void twofish_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void twofish_encrypt(void *cx, u8 *out, const u8 *in) { - struct twofish_ctx *ctx = crypto_tfm_ctx(tfm); + struct twofish_ctx *ctx = cx; const __le32 *src = (const __le32 *)in; __le32 *dst = (__le32 *)out; @@ -839,9 +839,9 @@ static void twofish_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) } /* Decrypt one block. in and out may be the same. */ -static void twofish_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void twofish_decrypt(void *cx, u8 *out, const u8 *in) { - struct twofish_ctx *ctx = crypto_tfm_ctx(tfm); + struct twofish_ctx *ctx = cx; const __le32 *src = (const __le32 *)in; __le32 *dst = (__le32 *)out; diff --git a/crypto/wp512.c b/crypto/wp512.c index 727d05a19..b226a126c 100644 --- a/crypto/wp512.c +++ b/crypto/wp512.c @@ -981,9 +981,9 @@ static void wp512_process_buffer(struct wp512_ctx *wctx) { } -static void wp512_init(struct crypto_tfm *tfm) { - struct wp512_ctx *wctx = crypto_tfm_ctx(tfm); +static void wp512_init (void *ctx) { int i; + struct wp512_ctx *wctx = ctx; memset(wctx->bitLength, 0, 32); wctx->bufferBits = wctx->bufferPos = 0; @@ -993,10 +993,10 @@ static void wp512_init(struct crypto_tfm *tfm) { } } -static void wp512_update(struct crypto_tfm *tfm, const u8 *source, - unsigned int len) +static void wp512_update(void *ctx, const u8 *source, unsigned int len) { - struct wp512_ctx *wctx = crypto_tfm_ctx(tfm); + + struct wp512_ctx *wctx = ctx; int sourcePos = 0; unsigned int bits_len = len * 8; // convert to number of bits int sourceGap = (8 - ((int)bits_len & 7)) & 7; @@ -1054,9 +1054,9 @@ static void wp512_update(struct crypto_tfm *tfm, const u8 *source, } -static void wp512_final(struct crypto_tfm *tfm, u8 *out) +static void wp512_final(void *ctx, u8 *out) { - struct wp512_ctx *wctx = crypto_tfm_ctx(tfm); + struct wp512_ctx *wctx = ctx; int i; u8 *buffer = wctx->buffer; u8 *bitLength = wctx->bitLength; @@ -1087,20 +1087,22 @@ static void wp512_final(struct crypto_tfm *tfm, u8 *out) wctx->bufferPos = bufferPos; } -static void wp384_final(struct crypto_tfm *tfm, u8 *out) +static void wp384_final(void *ctx, u8 *out) { + struct wp512_ctx *wctx = ctx; u8 D[64]; - wp512_final(tfm, D); + wp512_final (wctx, D); memcpy (out, D, WP384_DIGEST_SIZE); memset (D, 0, WP512_DIGEST_SIZE); } -static void wp256_final(struct crypto_tfm *tfm, u8 *out) +static void wp256_final(void *ctx, u8 *out) { + struct wp512_ctx *wctx = ctx; u8 D[64]; - wp512_final(tfm, D); + wp512_final (wctx, D); memcpy (out, D, WP256_DIGEST_SIZE); memset (D, 0, WP512_DIGEST_SIZE); } diff --git a/drivers/Kconfig b/drivers/Kconfig index 8b11cebe6..aeb5ab239 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -72,6 +72,4 @@ source "drivers/edac/Kconfig" source "drivers/rtc/Kconfig" -source "drivers/dma/Kconfig" - endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 2a2ef08a2..26b29563d 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -75,5 +75,3 @@ obj-$(CONFIG_SGI_SN) += sn/ obj-y += firmware/ obj-$(CONFIG_CRYPTO) += crypto/ obj-$(CONFIG_SUPERH) += sh/ -obj-$(CONFIG_GENERIC_TIME) += clocksource/ -obj-$(CONFIG_DMA_ENGINE) += dma/ diff --git a/drivers/acorn/block/Kconfig b/drivers/acorn/block/Kconfig index a0ff25ea4..073add35e 100644 --- a/drivers/acorn/block/Kconfig +++ b/drivers/acorn/block/Kconfig @@ -3,7 +3,7 @@ # menu "Acorn-specific block devices" - depends on ARCH_ARC || ARCH_A5K + depends on ARCH_ACORN config BLK_DEV_FD1772 tristate "Old Archimedes floppy (1772) support" diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c index 3dd6b7bb5..ce074f6f3 100644 --- a/drivers/acorn/block/mfmhd.c +++ b/drivers/acorn/block/mfmhd.c @@ -99,6 +99,7 @@ */ #include +#include #include #include #include @@ -1278,7 +1279,7 @@ static int mfm_do_init(unsigned char irqmask) printk("mfm: detected %d hard drive%s\n", mfm_drives, mfm_drives == 1 ? "" : "s"); - ret = request_irq(mfm_irq, mfm_interrupt_handler, IRQF_DISABLED, "MFM harddisk", NULL); + ret = request_irq(mfm_irq, mfm_interrupt_handler, SA_INTERRUPT, "MFM harddisk", NULL); if (ret) { printk("mfm: unable to get IRQ%d\n", mfm_irq); goto out4; diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 212964552..f0c892613 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -10,8 +10,9 @@ menu "ACPI (Advanced Configuration and Power Interface) Support" config ACPI bool "ACPI Support" depends on IA64 || X86 - depends on PCI select PM + select PCI + default y ---help--- Advanced Configuration and Power Interface (ACPI) support for @@ -107,6 +108,7 @@ config ACPI_BUTTON config ACPI_VIDEO tristate "Video" depends on X86 + default y help This driver implement the ACPI Extensions For Display Adapters for integrated graphics devices on motherboard, as specified in @@ -132,12 +134,6 @@ config ACPI_FAN This driver adds support for ACPI fan devices, allowing user-mode applications to perform basic fan control (on, off, status). -config ACPI_DOCK - tristate "Dock" - depends on EXPERIMENTAL - help - This driver adds support for ACPI controlled docking stations - config ACPI_PROCESSOR tristate "Processor" default y @@ -166,7 +162,7 @@ config ACPI_THERMAL config ACPI_NUMA bool "NUMA support" depends on NUMA - depends on (X86 || IA64) + depends on (IA64 || X86_64) default y if IA64_GENERIC || IA64_SGI_SN2 config ACPI_ASUS @@ -212,7 +208,6 @@ config ACPI_IBM config ACPI_IBM_DOCK bool "Legacy Docking Station Support" depends on ACPI_IBM - depends on ACPI_DOCK=n default n ---help--- Allows the ibm_acpi driver to handle docking station events. @@ -335,7 +330,7 @@ config ACPI_CONTAINER config ACPI_HOTPLUG_MEMORY tristate "Memory Hotplug" depends on ACPI - depends on MEMORY_HOTPLUG + depends on MEMORY_HOTPLUG || X86_64 default n help This driver adds supports for ACPI Memory Hotplug. This driver @@ -352,17 +347,6 @@ config ACPI_HOTPLUG_MEMORY If one selects "m," this driver can be loaded using the following command: $>modprobe acpi_memhotplug - -config ACPI_SBS - tristate "Smart Battery System (EXPERIMENTAL)" - depends on X86 && I2C - depends on EXPERIMENTAL - help - This driver adds support for the Smart Battery System. - Depends on I2C (Device Drivers ---> I2C support) - A "Smart Battery" is quite old and quite rare compared - to today's ACPI "Control Method" battery. - endif # ACPI endmenu diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index bce7ca27b..5984b4f67 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -42,7 +42,6 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_EC) += ec.o obj-$(CONFIG_ACPI_FAN) += fan.o -obj-$(CONFIG_ACPI_DOCK) += dock.o obj-$(CONFIG_ACPI_VIDEO) += video.o obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o @@ -58,5 +57,3 @@ obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-y += scan.o motherboard.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o -obj-y += cm_sbs.o -obj-$(CONFIG_ACPI_SBS) += i2c_ec.o sbs.o diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 11abc7bf7..7839b831d 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -50,9 +50,6 @@ ACPI_MODULE_NAME("acpi_ac") MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME); MODULE_LICENSE("GPL"); -extern struct proc_dir_entry *acpi_lock_ac_dir(void); -extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir); - static int acpi_ac_add(struct acpi_device *device); static int acpi_ac_remove(struct acpi_device *device, int type); static int acpi_ac_open_fs(struct inode *inode, struct file *file); @@ -68,11 +65,11 @@ static struct acpi_driver acpi_ac_driver = { }; struct acpi_ac { - struct acpi_device * device; + acpi_handle handle; unsigned long state; }; -static const struct file_operations acpi_ac_fops = { +static struct file_operations acpi_ac_fops = { .open = acpi_ac_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -87,18 +84,20 @@ static int acpi_ac_get_state(struct acpi_ac *ac) { acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_ac_get_state"); if (!ac) - return -EINVAL; + return_VALUE(-EINVAL); - status = acpi_evaluate_integer(ac->device->handle, "_PSR", NULL, &ac->state); + status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error reading AC Adapter state\n")); ac->state = ACPI_AC_STATUS_UNKNOWN; - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -111,13 +110,14 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset) { struct acpi_ac *ac = (struct acpi_ac *)seq->private; + ACPI_FUNCTION_TRACE("acpi_ac_seq_show"); if (!ac) - return 0; + return_VALUE(0); if (acpi_ac_get_state(ac)) { seq_puts(seq, "ERROR: Unable to read AC Adapter state\n"); - return 0; + return_VALUE(0); } seq_puts(seq, "state: "); @@ -133,7 +133,7 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset) break; } - return 0; + return_VALUE(0); } static int acpi_ac_open_fs(struct inode *inode, struct file *file) @@ -145,12 +145,13 @@ static int acpi_ac_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_ac_add_fs"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_ac_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; } @@ -158,18 +159,21 @@ static int acpi_ac_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_AC_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_AC_FILE_STATE)); else { entry->proc_fops = &acpi_ac_fops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_ac_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_ac_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(device)); @@ -178,7 +182,7 @@ static int acpi_ac_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -190,15 +194,16 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) struct acpi_ac *ac = (struct acpi_ac *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_ac_notify"); if (!ac) - return; + return_VOID; + + if (acpi_bus_get_device(ac->handle, &device)) + return_VOID; - device = ac->device; switch (event) { case ACPI_AC_NOTIFY_STATUS: - case ACPI_NOTIFY_BUS_CHECK: - case ACPI_NOTIFY_DEVICE_CHECK: acpi_ac_get_state(ac); acpi_bus_generate_event(device, event, (u32) ac->state); break; @@ -208,7 +213,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static int acpi_ac_add(struct acpi_device *device) @@ -217,16 +222,17 @@ static int acpi_ac_add(struct acpi_device *device) acpi_status status = AE_OK; struct acpi_ac *ac = NULL; + ACPI_FUNCTION_TRACE("acpi_ac_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ac = kmalloc(sizeof(struct acpi_ac), GFP_KERNEL); if (!ac) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(ac, 0, sizeof(struct acpi_ac)); - ac->device = device; + ac->handle = device->handle; strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_AC_CLASS); acpi_driver_data(device) = ac; @@ -239,10 +245,12 @@ static int acpi_ac_add(struct acpi_device *device) if (result) goto end; - status = acpi_install_notify_handler(device->handle, - ACPI_ALL_NOTIFY, acpi_ac_notify, + status = acpi_install_notify_handler(ac->handle, + ACPI_DEVICE_NOTIFY, acpi_ac_notify, ac); if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); result = -ENODEV; goto end; } @@ -257,7 +265,7 @@ static int acpi_ac_add(struct acpi_device *device) kfree(ac); } - return result; + return_VALUE(result); } static int acpi_ac_remove(struct acpi_device *device, int type) @@ -265,50 +273,55 @@ static int acpi_ac_remove(struct acpi_device *device, int type) acpi_status status = AE_OK; struct acpi_ac *ac = NULL; + ACPI_FUNCTION_TRACE("acpi_ac_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); ac = (struct acpi_ac *)acpi_driver_data(device); - status = acpi_remove_notify_handler(device->handle, - ACPI_ALL_NOTIFY, acpi_ac_notify); + status = acpi_remove_notify_handler(ac->handle, + ACPI_DEVICE_NOTIFY, acpi_ac_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); acpi_ac_remove_fs(device); kfree(ac); - return 0; + return_VALUE(0); } static int __init acpi_ac_init(void) { - int result; + int result = 0; - if (acpi_disabled) - return -ENODEV; + ACPI_FUNCTION_TRACE("acpi_ac_init"); - acpi_ac_dir = acpi_lock_ac_dir(); + acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir); if (!acpi_ac_dir) - return -ENODEV; + return_VALUE(-ENODEV); + acpi_ac_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_ac_driver); if (result < 0) { - acpi_unlock_ac_dir(acpi_ac_dir); - return -ENODEV; + remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_ac_exit(void) { + ACPI_FUNCTION_TRACE("acpi_ac_exit"); acpi_bus_unregister_driver(&acpi_ac_driver); - acpi_unlock_ac_dir(acpi_ac_dir); + remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_ac_init); diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 1dda370f4..d882bf87f 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -57,7 +57,6 @@ MODULE_LICENSE("GPL"); static int acpi_memory_device_add(struct acpi_device *device); static int acpi_memory_device_remove(struct acpi_device *device, int type); -static int acpi_memory_device_start(struct acpi_device *device); static struct acpi_driver acpi_memory_device_driver = { .name = ACPI_MEMORY_DEVICE_DRIVER_NAME, @@ -66,82 +65,49 @@ static struct acpi_driver acpi_memory_device_driver = { .ops = { .add = acpi_memory_device_add, .remove = acpi_memory_device_remove, - .start = acpi_memory_device_start, }, }; -struct acpi_memory_info { - struct list_head list; - u64 start_addr; /* Memory Range start physical addr */ - u64 length; /* Memory Range length */ - unsigned short caching; /* memory cache attribute */ - unsigned short write_protect; /* memory read/write attribute */ - unsigned int enabled:1; -}; - struct acpi_memory_device { - struct acpi_device * device; + acpi_handle handle; unsigned int state; /* State of the memory device */ - struct list_head res_list; + unsigned short caching; /* memory cache attribute */ + unsigned short write_protect; /* memory read/write attribute */ + u64 start_addr; /* Memory Range start physical addr */ + u64 end_addr; /* Memory Range end physical addr */ }; -static acpi_status -acpi_memory_get_resource(struct acpi_resource *resource, void *context) -{ - struct acpi_memory_device *mem_device = context; - struct acpi_resource_address64 address64; - struct acpi_memory_info *info, *new; - acpi_status status; - - status = acpi_resource_to_address64(resource, &address64); - if (ACPI_FAILURE(status) || - (address64.resource_type != ACPI_MEMORY_RANGE)) - return AE_OK; - - list_for_each_entry(info, &mem_device->res_list, list) { - /* Can we combine the resource range information? */ - if ((info->caching == address64.info.mem.caching) && - (info->write_protect == address64.info.mem.write_protect) && - (info->start_addr + info->length == address64.minimum)) { - info->length += address64.address_length; - return AE_OK; - } - } - - new = kzalloc(sizeof(struct acpi_memory_info), GFP_KERNEL); - if (!new) - return AE_ERROR; - - INIT_LIST_HEAD(&new->list); - new->caching = address64.info.mem.caching; - new->write_protect = address64.info.mem.write_protect; - new->start_addr = address64.minimum; - new->length = address64.address_length; - list_add_tail(&new->list, &mem_device->res_list); - - return AE_OK; -} - static int acpi_memory_get_device_resources(struct acpi_memory_device *mem_device) { acpi_status status; - struct acpi_memory_info *info, *n; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_resource *resource = NULL; + struct acpi_resource_address64 address64; + ACPI_FUNCTION_TRACE("acpi_memory_get_device_resources"); - if (!list_empty(&mem_device->res_list)) - return 0; + /* Get the range from the _CRS */ + status = acpi_get_current_resources(mem_device->handle, &buffer); + if (ACPI_FAILURE(status)) + return_VALUE(-EINVAL); - status = acpi_walk_resources(mem_device->device->handle, METHOD_NAME__CRS, - acpi_memory_get_resource, mem_device); - if (ACPI_FAILURE(status)) { - list_for_each_entry_safe(info, n, &mem_device->res_list, list) - kfree(info); - INIT_LIST_HEAD(&mem_device->res_list); - return -EINVAL; + resource = (struct acpi_resource *)buffer.pointer; + status = acpi_resource_to_address64(resource, &address64); + if (ACPI_SUCCESS(status)) { + if (address64.resource_type == ACPI_MEMORY_RANGE) { + /* Populate the structure */ + mem_device->caching = + address64.info.mem.caching; + mem_device->write_protect = + address64.info.mem.write_protect; + mem_device->start_addr = address64.minimum; + mem_device->end_addr = address64.maximum; + } } - return 0; + acpi_os_free(buffer.pointer); + return_VALUE(0); } static int @@ -153,21 +119,23 @@ acpi_memory_get_device(acpi_handle handle, struct acpi_device *device = NULL; struct acpi_device *pdevice = NULL; + ACPI_FUNCTION_TRACE("acpi_memory_get_device"); if (!acpi_bus_get_device(handle, &device) && device) goto end; status = acpi_get_parent(handle, &phandle); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent")); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_get_parent\n")); + return_VALUE(-EINVAL); } /* Get the parent device */ status = acpi_bus_get_device(phandle, &pdevice); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device")); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error in acpi_bus_get_device\n")); + return_VALUE(-EINVAL); } /* @@ -176,29 +144,30 @@ acpi_memory_get_device(acpi_handle handle, */ status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus")); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n")); + return_VALUE(-EINVAL); } end: *mem_device = acpi_driver_data(device); if (!(*mem_device)) { printk(KERN_ERR "\n driver data not found"); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static int acpi_memory_check_device(struct acpi_memory_device *mem_device) { unsigned long current_status; + ACPI_FUNCTION_TRACE("acpi_memory_check_device"); /* Get device present/absent information from the _STA */ - if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA", + if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->handle, "_STA", NULL, ¤t_status))) - return -ENODEV; + return_VALUE(-ENODEV); /* * Check for device status. Device should be * present/enabled/functioning. @@ -206,48 +175,36 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device) if (!((current_status & ACPI_MEMORY_STA_PRESENT) && (current_status & ACPI_MEMORY_STA_ENABLED) && (current_status & ACPI_MEMORY_STA_FUNCTIONAL))) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) { - int result, num_enabled = 0; - struct acpi_memory_info *info; - int node; + int result; + ACPI_FUNCTION_TRACE("acpi_memory_enable_device"); /* Get the range from the _CRS */ result = acpi_memory_get_device_resources(mem_device); if (result) { - printk(KERN_ERR PREFIX "get_device_resources failed\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "\nget_device_resources failed\n")); mem_device->state = MEMORY_INVALID_STATE; return result; } - node = acpi_get_node(mem_device->device->handle); /* * Tell the VM there is more memory here... * Note: Assume that this function returns zero on success - * We don't have memory-hot-add rollback function,now. - * (i.e. memory-hot-remove function) */ - list_for_each_entry(info, &mem_device->res_list, list) { - if (info->enabled) { /* just sanity check...*/ - num_enabled++; - continue; - } - result = add_memory(node, info->start_addr, info->length); - if (result) - continue; - info->enabled = 1; - num_enabled++; - } - if (!num_enabled) { - printk(KERN_ERR PREFIX "add_memory failed\n"); + result = add_memory(mem_device->start_addr, + (mem_device->end_addr - mem_device->start_addr) + 1); + if (result) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); mem_device->state = MEMORY_INVALID_STATE; - return -EINVAL; + return result; } return result; @@ -260,55 +217,57 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) union acpi_object arg; unsigned long current_status; + ACPI_FUNCTION_TRACE("acpi_memory_powerdown_device"); /* Issue the _EJ0 command */ arg_list.count = 1; arg_list.pointer = &arg; arg.type = ACPI_TYPE_INTEGER; arg.integer.value = 1; - status = acpi_evaluate_object(mem_device->device->handle, + status = acpi_evaluate_object(mem_device->handle, "_EJ0", &arg_list, NULL); /* Return on _EJ0 failure */ if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_EJ0 failed.\n")); + return_VALUE(-ENODEV); } /* Evalute _STA to check if the device is disabled */ - status = acpi_evaluate_integer(mem_device->device->handle, "_STA", + status = acpi_evaluate_integer(mem_device->handle, "_STA", NULL, ¤t_status); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); /* Check for device status. Device should be disabled */ if (current_status & ACPI_MEMORY_STA_ENABLED) - return -EINVAL; + return_VALUE(-EINVAL); - return 0; + return_VALUE(0); } static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) { int result; - struct acpi_memory_info *info, *n; + u64 start = mem_device->start_addr; + u64 len = mem_device->end_addr - start + 1; + ACPI_FUNCTION_TRACE("acpi_memory_disable_device"); /* * Ask the VM to offline this memory range. * Note: Assume that this function returns zero on success */ - list_for_each_entry_safe(info, n, &mem_device->res_list, list) { - if (info->enabled) { - result = remove_memory(info->start_addr, info->length); - if (result) - return result; - } - kfree(info); + result = remove_memory(start, len); + if (result) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove failed.\n")); + return_VALUE(result); } /* Power-off and eject the device */ result = acpi_memory_powerdown_device(mem_device); if (result) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device Power Down failed.\n")); /* Set the status of the device to invalid */ mem_device->state = MEMORY_INVALID_STATE; return result; @@ -323,6 +282,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) struct acpi_memory_device *mem_device; struct acpi_device *device; + ACPI_FUNCTION_TRACE("acpi_memory_device_notify"); switch (event) { case ACPI_NOTIFY_BUS_CHECK: @@ -334,14 +294,15 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "\nReceived DEVICE CHECK notification for device\n")); if (acpi_memory_get_device(handle, &mem_device)) { - printk(KERN_ERR PREFIX "Cannot find driver data\n"); - return; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error in finding driver data\n")); + return_VOID; } if (!acpi_memory_check_device(mem_device)) { if (acpi_memory_enable_device(mem_device)) - printk(KERN_ERR PREFIX - "Cannot enable memory device\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error in acpi_memory_enable_device\n")); } break; case ACPI_NOTIFY_EJECT_REQUEST: @@ -349,12 +310,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) "\nReceived EJECT REQUEST notification for device\n")); if (acpi_bus_get_device(handle, &device)) { - printk(KERN_ERR PREFIX "Device doesn't exist\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device doesn't exist\n")); break; } mem_device = acpi_driver_data(device); if (!mem_device) { - printk(KERN_ERR PREFIX "Driver Data is NULL\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Driver Data is NULL\n")); break; } @@ -365,8 +328,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) * with generic sysfs driver */ if (acpi_memory_disable_device(mem_device)) - printk(KERN_ERR PREFIX - "Disable memory device\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error in acpi_memory_disable_device\n")); /* * TBD: Invoke acpi_bus_remove to cleanup data structures */ @@ -377,7 +340,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static int acpi_memory_device_add(struct acpi_device *device) @@ -385,17 +348,17 @@ static int acpi_memory_device_add(struct acpi_device *device) int result; struct acpi_memory_device *mem_device = NULL; + ACPI_FUNCTION_TRACE("acpi_memory_device_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); mem_device = kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL); if (!mem_device) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(mem_device, 0, sizeof(struct acpi_memory_device)); - INIT_LIST_HEAD(&mem_device->res_list); - mem_device->device = device; + mem_device->handle = device->handle; sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME); sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS); acpi_driver_data(device) = mem_device; @@ -404,7 +367,7 @@ static int acpi_memory_device_add(struct acpi_device *device) result = acpi_memory_get_device_resources(mem_device); if (result) { kfree(mem_device); - return result; + return_VALUE(result); } /* Set the device state */ @@ -412,38 +375,22 @@ static int acpi_memory_device_add(struct acpi_device *device) printk(KERN_INFO "%s \n", acpi_device_name(device)); - return result; + return_VALUE(result); } static int acpi_memory_device_remove(struct acpi_device *device, int type) { struct acpi_memory_device *mem_device = NULL; + ACPI_FUNCTION_TRACE("acpi_memory_device_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); mem_device = (struct acpi_memory_device *)acpi_driver_data(device); kfree(mem_device); - return 0; -} - -static int acpi_memory_device_start (struct acpi_device *device) -{ - struct acpi_memory_device *mem_device; - int result = 0; - - mem_device = acpi_driver_data(device); - - if (!acpi_memory_check_device(mem_device)) { - /* call add_memory func */ - result = acpi_memory_enable_device(mem_device); - if (result) - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error in acpi_memory_enable_device\n")); - } - return result; + return_VALUE(0); } /* @@ -456,15 +403,16 @@ static acpi_status is_memory_device(acpi_handle handle) struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_device_info *info; + ACPI_FUNCTION_TRACE("is_memory_device"); status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status)) - return status; + return_ACPI_STATUS(AE_ERROR); info = buffer.pointer; if (!(info->valid & ACPI_VALID_HID)) { - kfree(buffer.pointer); - return AE_ERROR; + acpi_os_free(buffer.pointer); + return_ACPI_STATUS(AE_ERROR); } hardware_id = info->hardware_id.value; @@ -472,8 +420,8 @@ static acpi_status is_memory_device(acpi_handle handle) (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) status = AE_ERROR; - kfree(buffer.pointer); - return status; + acpi_os_free(buffer.pointer); + return_ACPI_STATUS(status); } static acpi_status @@ -482,15 +430,21 @@ acpi_memory_register_notify_handler(acpi_handle handle, { acpi_status status; + ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) - return AE_OK; /* continue */ + return_ACPI_STATUS(AE_OK); /* continue */ status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify, NULL); - /* continue */ - return AE_OK; + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); + return_ACPI_STATUS(AE_OK); /* continue */ + } + + return_ACPI_STATUS(status); } static acpi_status @@ -499,16 +453,22 @@ acpi_memory_deregister_notify_handler(acpi_handle handle, { acpi_status status; + ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler"); status = is_memory_device(handle); if (ACPI_FAILURE(status)) - return AE_OK; /* continue */ + return_ACPI_STATUS(AE_OK); /* continue */ status = acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, acpi_memory_device_notify); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); + return_ACPI_STATUS(AE_OK); /* continue */ + } - return AE_OK; /* continue */ + return_ACPI_STATUS(status); } static int __init acpi_memory_device_init(void) @@ -516,11 +476,12 @@ static int __init acpi_memory_device_init(void) int result; acpi_status status; + ACPI_FUNCTION_TRACE("acpi_memory_device_init"); result = acpi_bus_register_driver(&acpi_memory_device_driver); if (result < 0) - return -ENODEV; + return_VALUE(-ENODEV); status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, @@ -528,18 +489,19 @@ static int __init acpi_memory_device_init(void) NULL, NULL); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); acpi_bus_unregister_driver(&acpi_memory_device_driver); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_memory_device_exit(void) { acpi_status status; + ACPI_FUNCTION_TRACE("acpi_memory_device_exit"); /* * Adding this to un-install notification handlers for all the device @@ -551,11 +513,11 @@ static void __exit acpi_memory_device_exit(void) NULL, NULL); if (ACPI_FAILURE(status)) - ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); acpi_bus_unregister_driver(&acpi_memory_device_driver); - return; + return_VOID; } module_init(acpi_memory_device_init); diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index e9ee4c52a..f4c87750d 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@ -2,7 +2,7 @@ * asus_acpi.c - Asus Laptop ACPI Extras * * - * Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor + * Copyright (C) 2002, 2003, 2004 Julien Lerouge, Karol Kozimor * * 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 @@ -26,8 +26,11 @@ * Pontus Fuchs - Helper functions, cleanup * Johann Wiesner - Small compile fixes * John Belmonte - ACPI code for Toshiba laptop was a good starting point. - * Éric Burghard - LED display support for W1N * + * TODO: + * add Fn key status + * Add mode selection on module loading (parameter) -> still necessary? + * Complete display switching -- may require dirty hacks or calling _DOS? */ #include @@ -39,14 +42,12 @@ #include #include -#define ASUS_ACPI_VERSION "0.30" +#define ASUS_ACPI_VERSION "0.29" #define PROC_ASUS "asus" //the directory #define PROC_MLED "mled" #define PROC_WLED "wled" #define PROC_TLED "tled" -#define PROC_BT "bluetooth" -#define PROC_LEDD "ledd" #define PROC_INFO "info" #define PROC_LCD "lcd" #define PROC_BRN "brn" @@ -66,10 +67,9 @@ /* * Flags for hotk status */ -#define MLED_ON 0x01 //mail LED -#define WLED_ON 0x02 //wireless LED -#define TLED_ON 0x04 //touchpad LED -#define BT_ON 0x08 //internal Bluetooth +#define MLED_ON 0x01 //is MLED ON ? +#define WLED_ON 0x02 +#define TLED_ON 0x04 MODULE_AUTHOR("Julien Lerouge, Karol Kozimor"); MODULE_DESCRIPTION(ACPI_HOTK_NAME); @@ -92,10 +92,7 @@ struct model_data { char *wled_status; //node to handle wled reading_______A char *mt_tled; //method to handle tled_____________R char *tled_status; //node to handle tled reading_______A - char *mt_ledd; //method to handle LED display______R - char *mt_bt_switch; //method to switch Bluetooth on/off_R - char *bt_status; //no model currently supports this__? - char *mt_lcd_switch; //method to turn LCD on/off_________A + char *mt_lcd_switch; //method to turn LCD ON/OFF_________A char *lcd_status; //node to read LCD panel state______A char *brightness_up; //method to set brightness up_______A char *brightness_down; //guess what ?______________________A @@ -114,31 +111,27 @@ struct asus_hotk { struct acpi_device *device; //the device we are in acpi_handle handle; //the handle of the hotk device char status; //status of the hotk, for LEDs, ... - u32 ledd_status; //status of the LED display struct model_data *methods; //methods available on the laptop u8 brightness; //brightness level enum { A1x = 0, //A1340D, A1300F A2x, //A2500H - A4G, //A4700G D1x, //D1 L2D, //L2000D L3C, //L3800C L3D, //L3400D - L3H, //L3H, L2000E, L5D + L3H, //L3H, but also L2000E L4R, //L4500R L5x, //L5800C L8L, //L8400L M1A, //M1300A M2E, //M2400E, L4400L - M6N, //M6800N, W3400N - M6R, //M6700R, A3000G + M6N, //M6800N + M6R, //M6700R P30, //Samsung P30 S1x, //S1300A, but also L1400B and M2400A (L84F) S2x, //S200 (J1 reported), Victor MP-XP7210 - W1N, //W1000N - W5A, //W5A - xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N + xxN, //M2400N, M3700N, M5200N, S1300N, S5200N, W1OOON //(Centrino) END_MODEL } model; //Models currently supported @@ -156,8 +149,17 @@ struct asus_hotk { static struct model_data model_conf[END_MODEL] = { /* + * Those pathnames are relative to the HOTK / ATKD device : + * - mt_mled + * - mt_wled + * - brightness_set + * - brightness_get + * - display_set + * - display_get + * * TODO I have seen a SWBX and AIBX method on some models, like L1400B, * it seems to be a kind of switch, but what for ? + * */ { @@ -181,16 +183,6 @@ static struct model_data model_conf[END_MODEL] = { .display_set = "SDSP", .display_get = "\\INFB"}, - { - .name = "A4G", - .mt_mled = "MLED", -/* WLED present, but not controlled by ACPI */ - .mt_lcd_switch = xxN_PREFIX "_Q10", - .brightness_set = "SPLV", - .brightness_get = "GPLV", - .display_set = "SDSP", - .display_get = "\\ADVG"}, - { .name = "D1x", .mt_mled = "MLED", @@ -310,8 +302,7 @@ static struct model_data model_conf[END_MODEL] = { .brightness_set = "SPLV", .brightness_get = "GPLV", .display_set = "SDSP", - .display_get = "\\SSTE"}, - + .display_get = "\\_SB.PCI0.P0P1.VGA.GETD"}, { .name = "M6R", .mt_mled = "MLED", @@ -321,7 +312,7 @@ static struct model_data model_conf[END_MODEL] = { .brightness_set = "SPLV", .brightness_get = "GPLV", .display_set = "SDSP", - .display_get = "\\_SB.PCI0.P0P1.VGA.GETD"}, + .display_get = "\\SSTE"}, { .name = "P30", @@ -353,28 +344,6 @@ static struct model_data model_conf[END_MODEL] = { .brightness_up = S2x_PREFIX "_Q0B", .brightness_down = S2x_PREFIX "_Q0A"}, - { - .name = "W1N", - .mt_mled = "MLED", - .mt_wled = "WLED", - .mt_ledd = "SLCM", - .mt_lcd_switch = xxN_PREFIX "_Q10", - .lcd_status = "\\BKLT", - .brightness_set = "SPLV", - .brightness_get = "GPLV", - .display_set = "SDSP", - .display_get = "\\ADVG"}, - - { - .name = "W5A", - .mt_bt_switch = "BLED", - .mt_wled = "WLED", - .mt_lcd_switch = xxN_PREFIX "_Q10", - .brightness_set = "SPLV", - .brightness_get = "GPLV", - .display_set = "SDSP", - .display_get = "\\ADVG"}, - { .name = "xxN", .mt_mled = "MLED", @@ -593,36 +562,6 @@ proc_write_mled(struct file *file, const char __user * buffer, return write_led(buffer, count, hotk->methods->mt_mled, MLED_ON, 1); } -/* - * Proc handlers for LED display - */ -static int -proc_read_ledd(char *page, char **start, off_t off, int count, int *eof, - void *data) -{ - return sprintf(page, "0x%08x\n", hotk->ledd_status); -} - -static int -proc_write_ledd(struct file *file, const char __user * buffer, - unsigned long count, void *data) -{ - int value; - - count = parse_arg(buffer, count, &value); - if (count > 0) { - if (!write_acpi_int - (hotk->handle, hotk->methods->mt_ledd, value, NULL)) - printk(KERN_WARNING - "Asus ACPI: LED display write failed\n"); - else - hotk->ledd_status = (u32) value; - } else if (count < 0) - printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); - - return count; -} - /* * Proc handlers for WLED */ @@ -641,25 +580,6 @@ proc_write_wled(struct file *file, const char __user * buffer, return write_led(buffer, count, hotk->methods->mt_wled, WLED_ON, 0); } -/* - * Proc handlers for Bluetooth - */ -static int -proc_read_bluetooth(char *page, char **start, off_t off, int count, int *eof, - void *data) -{ - return sprintf(page, "%d\n", read_led(hotk->methods->bt_status, BT_ON)); -} - -static int -proc_write_bluetooth(struct file *file, const char __user * buffer, - unsigned long count, void *data) -{ - /* Note: mt_bt_switch controls both internal Bluetooth adapter's - presence and its LED */ - return write_led(buffer, count, hotk->methods->mt_bt_switch, BT_ON, 0); -} - /* * Proc handlers for TLED */ @@ -897,7 +817,7 @@ typedef int (proc_writefunc) (struct file * file, const char __user * buffer, unsigned long count, void *data); static int -asus_proc_add(char *name, proc_writefunc * writefunc, +__init asus_proc_add(char *name, proc_writefunc * writefunc, proc_readfunc * readfunc, mode_t mode, struct acpi_device *device) { @@ -916,7 +836,7 @@ asus_proc_add(char *name, proc_writefunc * writefunc, return 0; } -static int asus_hotk_add_fs(struct acpi_device *device) +static int __init asus_hotk_add_fs(struct acpi_device *device) { struct proc_dir_entry *proc; mode_t mode; @@ -956,11 +876,6 @@ static int asus_hotk_add_fs(struct acpi_device *device) mode, device); } - if (hotk->methods->mt_ledd) { - asus_proc_add(PROC_LEDD, &proc_write_ledd, &proc_read_ledd, - mode, device); - } - if (hotk->methods->mt_mled) { asus_proc_add(PROC_MLED, &proc_write_mled, &proc_read_mled, mode, device); @@ -971,11 +886,6 @@ static int asus_hotk_add_fs(struct acpi_device *device) mode, device); } - if (hotk->methods->mt_bt_switch) { - asus_proc_add(PROC_BT, &proc_write_bluetooth, - &proc_read_bluetooth, mode, device); - } - /* * We need both read node and write method as LCD switch is also accessible * from keyboard @@ -1009,10 +919,6 @@ static int asus_hotk_remove_fs(struct acpi_device *device) remove_proc_entry(PROC_MLED, acpi_device_dir(device)); if (hotk->methods->mt_tled) remove_proc_entry(PROC_TLED, acpi_device_dir(device)); - if (hotk->methods->mt_ledd) - remove_proc_entry(PROC_LEDD, acpi_device_dir(device)); - if (hotk->methods->mt_bt_switch) - remove_proc_entry(PROC_BT, acpi_device_dir(device)); if (hotk->methods->mt_lcd_switch && hotk->methods->lcd_status) remove_proc_entry(PROC_LCD, acpi_device_dir(device)); if ((hotk->methods->brightness_up @@ -1044,76 +950,16 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) return; } -/* - * Match the model string to the list of supported models. Return END_MODEL if - * no match or model is NULL. - */ -static int asus_model_match(char *model) -{ - if (model == NULL) - return END_MODEL; - - if (strncmp(model, "L3D", 3) == 0) - return L3D; - else if (strncmp(model, "L2E", 3) == 0 || - strncmp(model, "L3H", 3) == 0 || strncmp(model, "L5D", 3) == 0) - return L3H; - else if (strncmp(model, "L3", 2) == 0 || strncmp(model, "L2B", 3) == 0) - return L3C; - else if (strncmp(model, "L8L", 3) == 0) - return L8L; - else if (strncmp(model, "L4R", 3) == 0) - return L4R; - else if (strncmp(model, "M6N", 3) == 0 || strncmp(model, "W3N", 3) == 0) - return M6N; - else if (strncmp(model, "M6R", 3) == 0 || strncmp(model, "A3G", 3) == 0) - return M6R; - else if (strncmp(model, "M2N", 3) == 0 || - strncmp(model, "M3N", 3) == 0 || - strncmp(model, "M5N", 3) == 0 || - strncmp(model, "M6N", 3) == 0 || - strncmp(model, "S1N", 3) == 0 || - strncmp(model, "S5N", 3) == 0 || strncmp(model, "W1N", 3) == 0) - return xxN; - else if (strncmp(model, "M1", 2) == 0) - return M1A; - else if (strncmp(model, "M2", 2) == 0 || strncmp(model, "L4E", 3) == 0) - return M2E; - else if (strncmp(model, "L2", 2) == 0) - return L2D; - else if (strncmp(model, "L8", 2) == 0) - return S1x; - else if (strncmp(model, "D1", 2) == 0) - return D1x; - else if (strncmp(model, "A1", 2) == 0) - return A1x; - else if (strncmp(model, "A2", 2) == 0) - return A2x; - else if (strncmp(model, "J1", 2) == 0) - return S2x; - else if (strncmp(model, "L5", 2) == 0) - return L5x; - else if (strncmp(model, "A4G", 3) == 0) - return A4G; - else if (strncmp(model, "W1N", 3) == 0) - return W1N; - else if (strncmp(model, "W5A", 3) == 0) - return W5A; - else - return END_MODEL; -} - /* * This function is used to initialize the hotk with right values. In this * method, we can make all the detection we want, and modify the hotk struct */ -static int asus_hotk_get_info(void) +static int __init asus_hotk_get_info(void) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *model = NULL; int bsts_result; - char *string = NULL; acpi_status status; /* @@ -1124,7 +970,7 @@ static int asus_hotk_get_info(void) * HID), this bit will be moved. A global variable asus_info contains * the DSDT header. */ - status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); + status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); if (ACPI_FAILURE(status)) printk(KERN_WARNING " Couldn't get the DSDT table header\n"); else @@ -1143,78 +989,119 @@ static int asus_hotk_get_info(void) printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", bsts_result); + /* This is unlikely with implicit return */ + if (buffer.pointer == NULL) + return -EINVAL; + + model = (union acpi_object *) buffer.pointer; /* - * Try to match the object returned by INIT to the specific model. - * Handle every possible object (or the lack of thereof) the DSDT - * writers might throw at us. When in trouble, we pass NULL to - * asus_model_match() and try something completely different. + * Samsung P30 has a device with a valid _HID whose INIT does not + * return anything. It used to be possible to catch this exception, + * but the implicit return code will now happily confuse the + * driver. We assume that every ACPI_TYPE_STRING is a valid model + * identifier but it's still possible to get completely bogus data. */ - if (buffer.pointer) { - model = (union acpi_object *)buffer.pointer; - switch (model->type) { - case ACPI_TYPE_STRING: - string = model->string.pointer; - break; - case ACPI_TYPE_BUFFER: - string = model->buffer.pointer; - break; - default: - kfree(model); - break; - } - } - hotk->model = asus_model_match(string); - if (hotk->model == END_MODEL) { /* match failed */ - if (asus_info && + if (model->type == ACPI_TYPE_STRING) { + printk(KERN_NOTICE " %s model detected, ", model->string.pointer); + } else { + if (asus_info && /* Samsung P30 */ strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) { hotk->model = P30; printk(KERN_NOTICE " Samsung P30 detected, supported\n"); } else { hotk->model = M2E; - printk(KERN_NOTICE " unsupported model %s, trying " - "default values\n", string); - printk(KERN_NOTICE - " send /proc/acpi/dsdt to the developers\n"); + printk(KERN_WARNING " no string returned by INIT\n"); + printk(KERN_WARNING " trying default values, supply " + "the developers with your DSDT\n"); } hotk->methods = &model_conf[hotk->model]; + + acpi_os_free(model); + return AE_OK; } + + hotk->model = END_MODEL; + if (strncmp(model->string.pointer, "L3D", 3) == 0) + hotk->model = L3D; + else if (strncmp(model->string.pointer, "L3H", 3) == 0 || + strncmp(model->string.pointer, "L2E", 3) == 0) + hotk->model = L3H; + else if (strncmp(model->string.pointer, "L3", 2) == 0 || + strncmp(model->string.pointer, "L2B", 3) == 0) + hotk->model = L3C; + else if (strncmp(model->string.pointer, "L8L", 3) == 0) + hotk->model = L8L; + else if (strncmp(model->string.pointer, "L4R", 3) == 0) + hotk->model = L4R; + else if (strncmp(model->string.pointer, "M6N", 3) == 0) + hotk->model = M6N; + else if (strncmp(model->string.pointer, "M6R", 3) == 0) + hotk->model = M6R; + else if (strncmp(model->string.pointer, "M2N", 3) == 0 || + strncmp(model->string.pointer, "M3N", 3) == 0 || + strncmp(model->string.pointer, "M5N", 3) == 0 || + strncmp(model->string.pointer, "M6N", 3) == 0 || + strncmp(model->string.pointer, "S1N", 3) == 0 || + strncmp(model->string.pointer, "S5N", 3) == 0 || + strncmp(model->string.pointer, "W1N", 3) == 0) + hotk->model = xxN; + else if (strncmp(model->string.pointer, "M1", 2) == 0) + hotk->model = M1A; + else if (strncmp(model->string.pointer, "M2", 2) == 0 || + strncmp(model->string.pointer, "L4E", 3) == 0) + hotk->model = M2E; + else if (strncmp(model->string.pointer, "L2", 2) == 0) + hotk->model = L2D; + else if (strncmp(model->string.pointer, "L8", 2) == 0) + hotk->model = S1x; + else if (strncmp(model->string.pointer, "D1", 2) == 0) + hotk->model = D1x; + else if (strncmp(model->string.pointer, "A1", 2) == 0) + hotk->model = A1x; + else if (strncmp(model->string.pointer, "A2", 2) == 0) + hotk->model = A2x; + else if (strncmp(model->string.pointer, "J1", 2) == 0) + hotk->model = S2x; + else if (strncmp(model->string.pointer, "L5", 2) == 0) + hotk->model = L5x; + + if (hotk->model == END_MODEL) { + printk("unsupported, trying default values, supply the " + "developers with your DSDT\n"); + hotk->model = M2E; + } else { + printk("supported\n"); + } + hotk->methods = &model_conf[hotk->model]; - printk(KERN_NOTICE " %s model detected, supported\n", string); /* Sort of per-model blacklist */ - if (strncmp(string, "L2B", 3) == 0) + if (strncmp(model->string.pointer, "L2B", 3) == 0) hotk->methods->lcd_status = NULL; /* L2B is similar enough to L3C to use its settings, with this only exception */ - else if (strncmp(string, "A3G", 3) == 0) - hotk->methods->lcd_status = "\\BLFG"; - /* A3G is like M6R */ - else if (strncmp(string, "S5N", 3) == 0 || - strncmp(string, "M5N", 3) == 0 || - strncmp(string, "W3N", 3) == 0) + else if (strncmp(model->string.pointer, "S5N", 3) == 0 || + strncmp(model->string.pointer, "M5N", 3) == 0) hotk->methods->mt_mled = NULL; - /* S5N, M5N and W3N have no MLED */ - else if (strncmp(string, "L5D", 3) == 0) - hotk->methods->mt_wled = NULL; - /* L5D's WLED is not controlled by ACPI */ - else if (strncmp(string, "M2N", 3) == 0 || - strncmp(string, "S1N", 3) == 0) + /* S5N and M5N have no MLED */ + else if (strncmp(model->string.pointer, "M2N", 3) == 0 || + strncmp(model->string.pointer, "W1N", 3) == 0) hotk->methods->mt_wled = "WLED"; - /* M2N and S1N have a usable WLED */ + /* M2N and W1N have a usable WLED */ else if (asus_info) { if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) hotk->methods->mled_status = NULL; /* S1300A reports L84F, but L1400B too, account for that */ } - kfree(model); + acpi_os_free(model); return AE_OK; } -static int asus_hotk_check(void) +static int __init asus_hotk_check(void) { int result = 0; @@ -1232,9 +1119,7 @@ static int asus_hotk_check(void) return result; } -static int asus_hotk_found; - -static int asus_hotk_add(struct acpi_device *device) +static int __init asus_hotk_add(struct acpi_device *device) { acpi_status status = AE_OK; int result; @@ -1277,7 +1162,8 @@ static int asus_hotk_add(struct acpi_device *device) /* For laptops without GPLV: init the hotk->brightness value */ if ((!hotk->methods->brightness_get) && (!hotk->methods->brightness_status) - && (hotk->methods->brightness_up && hotk->methods->brightness_down)) { + && (hotk->methods->brightness_up + && hotk->methods->brightness_down)) { status = acpi_evaluate_object(NULL, hotk->methods->brightness_down, NULL, NULL); @@ -1294,11 +1180,6 @@ static int asus_hotk_add(struct acpi_device *device) } } - asus_hotk_found = 1; - - /* LED display is off by default */ - hotk->ledd_status = 0xFFF; - end: if (result) { kfree(hotk); @@ -1345,22 +1226,10 @@ static int __init asus_acpi_init(void) asus_proc_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&asus_hotk_driver); - if (result < 0) { - remove_proc_entry(PROC_ASUS, acpi_root_dir); - return result; - } - - /* - * This is a bit of a kludge. We only want this module loaded - * for ASUS systems, but there's currently no way to probe the - * ACPI namespace for ASUS HIDs. So we just return failure if - * we didn't find one, which will cause the module to be - * unloaded. - */ - if (!asus_hotk_found) { + if (result < 1) { acpi_bus_unregister_driver(&asus_hotk_driver); remove_proc_entry(PROC_ASUS, acpi_root_dir); - return result; + return -ENODEV; } return 0; @@ -1371,7 +1240,7 @@ static void __exit asus_acpi_exit(void) acpi_bus_unregister_driver(&asus_hotk_driver); remove_proc_entry(PROC_ASUS, acpi_root_dir); - kfree(asus_info); + acpi_os_free(asus_info); return; } diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 9810e2a55..702e857e9 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -59,9 +59,6 @@ ACPI_MODULE_NAME("acpi_battery") MODULE_DESCRIPTION(ACPI_BATTERY_DRIVER_NAME); MODULE_LICENSE("GPL"); -extern struct proc_dir_entry *acpi_lock_battery_dir(void); -extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir); - static int acpi_battery_add(struct acpi_device *device); static int acpi_battery_remove(struct acpi_device *device, int type); @@ -111,7 +108,7 @@ struct acpi_battery_trips { }; struct acpi_battery { - struct acpi_device * device; + acpi_handle handle; struct acpi_battery_flags flags; struct acpi_battery_trips trips; unsigned long alarm; @@ -135,16 +132,17 @@ acpi_battery_get_info(struct acpi_battery *battery, struct acpi_buffer data = { 0, NULL }; union acpi_object *package = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_get_info"); if (!battery || !bif) - return -EINVAL; + return_VALUE(-EINVAL); /* Evalute _BIF */ - status = acpi_evaluate_object(battery->device->handle, "_BIF", NULL, &buffer); + status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BIF\n")); + return_VALUE(-ENODEV); } package = (union acpi_object *)buffer.pointer; @@ -153,7 +151,7 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { - ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); result = -ENODEV; goto end; } @@ -167,19 +165,19 @@ acpi_battery_get_info(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); kfree(data.pointer); result = -ENODEV; goto end; } end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); if (!result) (*bif) = (struct acpi_battery_info *)data.pointer; - return result; + return_VALUE(result); } static int @@ -195,16 +193,17 @@ acpi_battery_get_status(struct acpi_battery *battery, struct acpi_buffer data = { 0, NULL }; union acpi_object *package = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_get_status"); if (!battery || !bst) - return -EINVAL; + return_VALUE(-EINVAL); /* Evalute _BST */ - status = acpi_evaluate_object(battery->device->handle, "_BST", NULL, &buffer); + status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BST\n")); + return_VALUE(-ENODEV); } package = (union acpi_object *)buffer.pointer; @@ -213,7 +212,7 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (status != AE_BUFFER_OVERFLOW) { - ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); result = -ENODEV; goto end; } @@ -227,19 +226,19 @@ acpi_battery_get_status(struct acpi_battery *battery, status = acpi_extract_package(package, &format, &data); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); kfree(data.pointer); result = -ENODEV; goto end; } end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); if (!result) (*bst) = (struct acpi_battery_status *)data.pointer; - return result; + return_VALUE(result); } static int @@ -249,24 +248,25 @@ acpi_battery_set_alarm(struct acpi_battery *battery, unsigned long alarm) union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list arg_list = { 1, &arg0 }; + ACPI_FUNCTION_TRACE("acpi_battery_set_alarm"); if (!battery) - return -EINVAL; + return_VALUE(-EINVAL); if (!battery->flags.alarm) - return -ENODEV; + return_VALUE(-ENODEV); arg0.integer.value = alarm; - status = acpi_evaluate_object(battery->device->handle, "_BTP", &arg_list, NULL); + status = acpi_evaluate_object(battery->handle, "_BTP", &arg_list, NULL); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Alarm set to %d\n", (u32) alarm)); battery->alarm = alarm; - return 0; + return_VALUE(0); } static int acpi_battery_check(struct acpi_battery *battery) @@ -277,15 +277,18 @@ static int acpi_battery_check(struct acpi_battery *battery) struct acpi_device *device = NULL; struct acpi_battery_info *bif = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_check"); if (!battery) - return -EINVAL; + return_VALUE(-EINVAL); - device = battery->device; + result = acpi_bus_get_device(battery->handle, &device); + if (result) + return_VALUE(result); result = acpi_bus_get_status(device); if (result) - return result; + return_VALUE(result); /* Insertion? */ @@ -297,7 +300,7 @@ static int acpi_battery_check(struct acpi_battery *battery) result = acpi_battery_get_info(battery, &bif); if (result) - return result; + return_VALUE(result); battery->flags.power_unit = bif->power_unit; battery->trips.warning = bif->design_capacity_warning; @@ -306,7 +309,7 @@ static int acpi_battery_check(struct acpi_battery *battery) /* See if alarms are supported, and if so, set default */ - status = acpi_get_handle(battery->device->handle, "_BTP", &handle); + status = acpi_get_handle(battery->handle, "_BTP", &handle); if (ACPI_SUCCESS(status)) { battery->flags.alarm = 1; acpi_battery_set_alarm(battery, battery->trips.warning); @@ -321,7 +324,7 @@ static int acpi_battery_check(struct acpi_battery *battery) battery->flags.present = device->status.battery_present; - return result; + return_VALUE(result); } /* -------------------------------------------------------------------------- @@ -336,6 +339,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) struct acpi_battery_info *bif = NULL; char *units = "?"; + ACPI_FUNCTION_TRACE("acpi_battery_read_info"); if (!battery) goto end; @@ -405,7 +409,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset) end: kfree(bif); - return 0; + return_VALUE(0); } static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) @@ -420,6 +424,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) struct acpi_battery_status *bst = NULL; char *units = "?"; + ACPI_FUNCTION_TRACE("acpi_battery_read_state"); if (!battery) goto end; @@ -453,6 +458,8 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) if ((bst->state & 0x01) && (bst->state & 0x02)) { seq_printf(seq, "charging state: charging/discharging\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Battery Charging and Discharging?\n")); } else if (bst->state & 0x01) seq_printf(seq, "charging state: discharging\n"); else if (bst->state & 0x02) @@ -482,7 +489,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset) end: kfree(bst); - return 0; + return_VALUE(0); } static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) @@ -495,6 +502,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) struct acpi_battery *battery = (struct acpi_battery *)seq->private; char *units = "?"; + ACPI_FUNCTION_TRACE("acpi_battery_read_alarm"); if (!battery) goto end; @@ -519,7 +527,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) seq_printf(seq, "%d %sh\n", (u32) battery->alarm, units); end: - return 0; + return_VALUE(0); } static ssize_t @@ -532,24 +540,25 @@ acpi_battery_write_alarm(struct file *file, struct seq_file *m = (struct seq_file *)file->private_data; struct acpi_battery *battery = (struct acpi_battery *)m->private; + ACPI_FUNCTION_TRACE("acpi_battery_write_alarm"); if (!battery || (count > sizeof(alarm_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); if (!battery->flags.present) - return -ENODEV; + return_VALUE(-ENODEV); if (copy_from_user(alarm_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); alarm_string[count] = '\0'; result = acpi_battery_set_alarm(battery, simple_strtoul(alarm_string, NULL, 0)); if (result) - return result; + return_VALUE(result); - return count; + return_VALUE(count); } static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) @@ -557,7 +566,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); } -static const struct file_operations acpi_battery_info_ops = { +static struct file_operations acpi_battery_info_ops = { .open = acpi_battery_info_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -565,7 +574,7 @@ static const struct file_operations acpi_battery_info_ops = { .owner = THIS_MODULE, }; -static const struct file_operations acpi_battery_state_ops = { +static struct file_operations acpi_battery_state_ops = { .open = acpi_battery_state_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -573,7 +582,7 @@ static const struct file_operations acpi_battery_state_ops = { .owner = THIS_MODULE, }; -static const struct file_operations acpi_battery_alarm_ops = { +static struct file_operations acpi_battery_alarm_ops = { .open = acpi_battery_alarm_open_fs, .read = seq_read, .write = acpi_battery_write_alarm, @@ -586,12 +595,13 @@ static int acpi_battery_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_add_fs"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_battery_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; } @@ -599,7 +609,9 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_BATTERY_FILE_INFO)); else { entry->proc_fops = &acpi_battery_info_ops; entry->data = acpi_driver_data(device); @@ -610,7 +622,9 @@ static int acpi_battery_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_BATTERY_FILE_STATUS)); else { entry->proc_fops = &acpi_battery_state_ops; entry->data = acpi_driver_data(device); @@ -622,18 +636,21 @@ static int acpi_battery_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_BATTERY_FILE_ALARM)); else { entry->proc_fops = &acpi_battery_alarm_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_battery_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_battery_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_BATTERY_FILE_ALARM, @@ -647,7 +664,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -659,17 +676,17 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) struct acpi_battery *battery = (struct acpi_battery *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_notify"); if (!battery) - return; + return_VOID; - device = battery->device; + if (acpi_bus_get_device(handle, &device)) + return_VOID; switch (event) { case ACPI_BATTERY_NOTIFY_STATUS: case ACPI_BATTERY_NOTIFY_INFO: - case ACPI_NOTIFY_BUS_CHECK: - case ACPI_NOTIFY_DEVICE_CHECK: acpi_battery_check(battery); acpi_bus_generate_event(device, event, battery->flags.present); break; @@ -679,7 +696,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static int acpi_battery_add(struct acpi_device *device) @@ -688,16 +705,17 @@ static int acpi_battery_add(struct acpi_device *device) acpi_status status = 0; struct acpi_battery *battery = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); battery = kmalloc(sizeof(struct acpi_battery), GFP_KERNEL); if (!battery) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(battery, 0, sizeof(struct acpi_battery)); - battery->device = device; + battery->handle = device->handle; strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); acpi_driver_data(device) = battery; @@ -710,10 +728,12 @@ static int acpi_battery_add(struct acpi_device *device) if (result) goto end; - status = acpi_install_notify_handler(device->handle, - ACPI_ALL_NOTIFY, + status = acpi_install_notify_handler(battery->handle, + ACPI_DEVICE_NOTIFY, acpi_battery_notify, battery); if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); result = -ENODEV; goto end; } @@ -728,7 +748,7 @@ static int acpi_battery_add(struct acpi_device *device) kfree(battery); } - return result; + return_VALUE(result); } static int acpi_battery_remove(struct acpi_device *device, int type) @@ -736,51 +756,56 @@ static int acpi_battery_remove(struct acpi_device *device, int type) acpi_status status = 0; struct acpi_battery *battery = NULL; + ACPI_FUNCTION_TRACE("acpi_battery_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); battery = (struct acpi_battery *)acpi_driver_data(device); - status = acpi_remove_notify_handler(device->handle, - ACPI_ALL_NOTIFY, + status = acpi_remove_notify_handler(battery->handle, + ACPI_DEVICE_NOTIFY, acpi_battery_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); acpi_battery_remove_fs(device); kfree(battery); - return 0; + return_VALUE(0); } static int __init acpi_battery_init(void) { - int result; + int result = 0; - if (acpi_disabled) - return -ENODEV; + ACPI_FUNCTION_TRACE("acpi_battery_init"); - acpi_battery_dir = acpi_lock_battery_dir(); + acpi_battery_dir = proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir); if (!acpi_battery_dir) - return -ENODEV; + return_VALUE(-ENODEV); + acpi_battery_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_battery_driver); if (result < 0) { - acpi_unlock_battery_dir(acpi_battery_dir); - return -ENODEV; + remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_battery_exit(void) { + ACPI_FUNCTION_TRACE("acpi_battery_exit"); acpi_bus_unregister_driver(&acpi_battery_driver); - acpi_unlock_battery_dir(acpi_battery_dir); + remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_battery_init); diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 279c4bac9..606f8733a 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +43,7 @@ ACPI_MODULE_NAME("acpi_bus") extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); #endif -struct fadt_descriptor acpi_fadt; +FADT_DESCRIPTOR acpi_fadt; EXPORT_SYMBOL(acpi_fadt); struct acpi_device *acpi_root; @@ -61,20 +60,21 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device) { acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_bus_get_device"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); /* TBD: Support fixed-feature devices */ status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); if (ACPI_FAILURE(status) || !*device) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No context for object [%p]\n", + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n", handle)); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_bus_get_device); @@ -84,9 +84,10 @@ int acpi_bus_get_status(struct acpi_device *device) acpi_status status = AE_OK; unsigned long sta = 0; + ACPI_FUNCTION_TRACE("acpi_bus_get_status"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); /* * Evaluate _STA if present. @@ -95,7 +96,7 @@ int acpi_bus_get_status(struct acpi_device *device) status = acpi_evaluate_integer(device->handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); STRUCT_TO_INT(device->status) = (int)sta; } @@ -119,7 +120,7 @@ int acpi_bus_get_status(struct acpi_device *device) device->pnp.bus_id, (u32) STRUCT_TO_INT(device->status))); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_bus_get_status); @@ -135,10 +136,11 @@ int acpi_bus_get_power(acpi_handle handle, int *state) struct acpi_device *device = NULL; unsigned long psc = 0; + ACPI_FUNCTION_TRACE("acpi_bus_get_power"); result = acpi_bus_get_device(handle, &device); if (result) - return result; + return_VALUE(result); *state = ACPI_STATE_UNKNOWN; @@ -157,12 +159,12 @@ int acpi_bus_get_power(acpi_handle handle, int *state) status = acpi_evaluate_integer(device->handle, "_PSC", NULL, &psc); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); device->power.state = (int)psc; } else if (device->power.flags.power_resources) { result = acpi_power_get_inferred_state(device); if (result) - return result; + return_VALUE(result); } *state = device->power.state; @@ -171,7 +173,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] power state is D%d\n", device->pnp.bus_id, device->power.state)); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_bus_get_power); @@ -183,43 +185,42 @@ int acpi_bus_set_power(acpi_handle handle, int state) struct acpi_device *device = NULL; char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' }; + ACPI_FUNCTION_TRACE("acpi_bus_set_power"); result = acpi_bus_get_device(handle, &device); if (result) - return result; + return_VALUE(result); if ((state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) - return -EINVAL; + return_VALUE(-EINVAL); /* Make sure this is a valid target state */ if (!device->flags.power_manageable) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable\n", - device->kobj.name)); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Device is not power manageable\n")); + return_VALUE(-ENODEV); } /* * Get device's current power state if it's unknown * This means device power state isn't initialized or previous setting failed */ - if (!device->flags.force_power_state) { - if (device->power.state == ACPI_STATE_UNKNOWN) - acpi_bus_get_power(device->handle, &device->power.state); - if (state == device->power.state) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", - state)); - return 0; - } + if (device->power.state == ACPI_STATE_UNKNOWN) + acpi_bus_get_power(device->handle, &device->power.state); + if (state == device->power.state) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", + state)); + return_VALUE(0); } if (!device->power.states[state].flags.valid) { - printk(KERN_WARNING PREFIX "Device does not support D%d\n", state); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", + state)); + return_VALUE(-ENODEV); } if (device->parent && (state < device->parent->power.state)) { - printk(KERN_WARNING PREFIX - "Cannot set device to a higher-powered" - " state than parent\n"); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Cannot set device to a higher-powered state than parent\n")); + return_VALUE(-ENODEV); } /* @@ -261,15 +262,15 @@ int acpi_bus_set_power(acpi_handle handle, int state) end: if (result) - printk(KERN_WARNING PREFIX - "Transitioning device [%s] to D%d\n", - device->pnp.bus_id, state); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Error transitioning device [%s] to D%d\n", + device->pnp.bus_id, state)); else ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] transitioned to D%d\n", device->pnp.bus_id, state)); - return result; + return_VALUE(result); } EXPORT_SYMBOL(acpi_bus_set_power); @@ -290,17 +291,18 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) struct acpi_bus_event *event = NULL; unsigned long flags = 0; + ACPI_FUNCTION_TRACE("acpi_bus_generate_event"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); /* drop event on the floor if no one's listening */ if (!event_is_open) - return 0; + return_VALUE(0); event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); if (!event) - return -ENOMEM; + return_VALUE(-ENOMEM); strcpy(event->device_class, device->pnp.device_class); strcpy(event->bus_id, device->pnp.bus_id); @@ -313,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data) wake_up_interruptible(&acpi_bus_event_queue); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_bus_generate_event); @@ -325,9 +327,10 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) DECLARE_WAITQUEUE(wait, current); + ACPI_FUNCTION_TRACE("acpi_bus_receive_event"); if (!event) - return -EINVAL; + return_VALUE(-EINVAL); if (list_empty(&acpi_bus_event_list)) { @@ -341,7 +344,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) set_current_state(TASK_RUNNING); if (signal_pending(current)) - return -ERESTARTSYS; + return_VALUE(-ERESTARTSYS); } spin_lock_irqsave(&acpi_bus_event_lock, flags); @@ -352,13 +355,13 @@ int acpi_bus_receive_event(struct acpi_bus_event *event) spin_unlock_irqrestore(&acpi_bus_event_lock, flags); if (!entry) - return -ENODEV; + return_VALUE(-ENODEV); memcpy(event, entry, sizeof(struct acpi_bus_event)); kfree(entry); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_bus_receive_event); @@ -373,9 +376,10 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) acpi_status status = 0; struct acpi_device_status old_status; + ACPI_FUNCTION_TRACE("acpi_bus_check_device"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); if (status_changed) *status_changed = 0; @@ -392,15 +396,15 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) if (status_changed) *status_changed = 1; } - return 0; + return_VALUE(0); } status = acpi_bus_get_status(device); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status)) - return 0; + return_VALUE(0); if (status_changed) *status_changed = 1; @@ -416,7 +420,7 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed) /* TBD: Handle device removal */ } - return 0; + return_VALUE(0); } static int acpi_bus_check_scope(struct acpi_device *device) @@ -424,24 +428,25 @@ static int acpi_bus_check_scope(struct acpi_device *device) int result = 0; int status_changed = 0; + ACPI_FUNCTION_TRACE("acpi_bus_check_scope"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); /* Status Change? */ result = acpi_bus_check_device(device, &status_changed); if (result) - return result; + return_VALUE(result); if (!status_changed) - return 0; + return_VALUE(0); /* * TBD: Enumerate child devices within this device's scope and * run acpi_bus_check_device()'s on them. */ - return 0; + return_VALUE(0); } /** @@ -454,9 +459,10 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) int result = 0; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_bus_notify"); if (acpi_bus_get_device(handle, &device)) - return; + return_VOID; switch (type) { @@ -531,7 +537,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) break; } - return; + return_VOID; } /* -------------------------------------------------------------------------- @@ -545,6 +551,7 @@ static int __init acpi_bus_init_irq(void) struct acpi_object_list arg_list = { 1, &arg }; char *message = NULL; + ACPI_FUNCTION_TRACE("acpi_bus_init_irq"); /* * Let the system know what interrupt model we are using by @@ -563,7 +570,7 @@ static int __init acpi_bus_init_irq(void) break; default: printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n"); - return -ENODEV; + return_VALUE(-ENODEV); } printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message); @@ -572,11 +579,11 @@ static int __init acpi_bus_init_irq(void) status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PIC\n")); + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } void __init acpi_early_init(void) @@ -584,11 +591,10 @@ void __init acpi_early_init(void) acpi_status status = AE_OK; struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt }; + ACPI_FUNCTION_TRACE("acpi_early_init"); if (acpi_disabled) - return; - - printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION); + return_VOID; /* enable workarounds, unless strict ACPI spec. compliance */ if (!acpi_strict) @@ -611,7 +617,7 @@ void __init acpi_early_init(void) /* * Get a separate copy of the FADT for use by other drivers. */ - status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &buffer); + status = acpi_get_table(ACPI_TABLE_FADT, 1, &buffer); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "Unable to get the FADT\n"); goto error0; @@ -646,11 +652,11 @@ void __init acpi_early_init(void) goto error0; } - return; + return_VOID; error0: disable_acpi(); - return; + return_VOID; } static int __init acpi_bus_init(void) @@ -659,6 +665,7 @@ static int __init acpi_bus_init(void) acpi_status status = AE_OK; extern acpi_status acpi_os_initialize1(void); + ACPI_FUNCTION_TRACE("acpi_bus_init"); status = acpi_os_initialize1(); @@ -720,12 +727,12 @@ static int __init acpi_bus_init(void) */ acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL); - return 0; + return_VALUE(0); /* Mimic structured exception handling */ error1: acpi_terminate(); - return -ENODEV; + return_VALUE(-ENODEV); } decl_subsys(acpi, NULL, NULL); @@ -734,16 +741,16 @@ static int __init acpi_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_init"); + + printk(KERN_INFO PREFIX "Subsystem revision %08x\n", ACPI_CA_VERSION); if (acpi_disabled) { printk(KERN_INFO PREFIX "Interpreter disabled.\n"); - return -ENODEV; + return_VALUE(-ENODEV); } - result = firmware_register(&acpi_subsys); - if (result < 0) - printk(KERN_WARNING "%s: firmware_register error: %d\n", - __FUNCTION__, result); + firmware_register(&acpi_subsys); result = acpi_bus_init(); @@ -761,7 +768,7 @@ static int __init acpi_init(void) } else disable_acpi(); - return result; + return_VALUE(result); } subsys_initcall(acpi_init); diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 5ef885e82..4b6d9f009 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -82,19 +82,20 @@ static struct acpi_driver acpi_button_driver = { }; struct acpi_button { + acpi_handle handle; struct acpi_device *device; /* Fixed button kludge */ u8 type; unsigned long pushed; }; -static const struct file_operations acpi_button_info_fops = { +static struct file_operations acpi_button_info_fops = { .open = acpi_button_info_open_fs, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static const struct file_operations acpi_button_state_fops = { +static struct file_operations acpi_button_state_fops = { .open = acpi_button_state_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -111,14 +112,15 @@ static int acpi_button_info_seq_show(struct seq_file *seq, void *offset) { struct acpi_button *button = (struct acpi_button *)seq->private; + ACPI_FUNCTION_TRACE("acpi_button_info_seq_show"); if (!button || !button->device) - return 0; + return_VALUE(0); seq_printf(seq, "type: %s\n", acpi_device_name(button->device)); - return 0; + return_VALUE(0); } static int acpi_button_info_open_fs(struct inode *inode, struct file *file) @@ -132,11 +134,12 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) acpi_status status; unsigned long state; + ACPI_FUNCTION_TRACE("acpi_button_state_seq_show"); if (!button || !button->device) - return 0; + return_VALUE(0); - status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, &state); + status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state); if (ACPI_FAILURE(status)) { seq_printf(seq, "state: unsupported\n"); } else { @@ -144,7 +147,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) (state ? "open" : "closed")); } - return 0; + return_VALUE(0); } static int acpi_button_state_open_fs(struct inode *inode, struct file *file) @@ -161,9 +164,10 @@ static int acpi_button_add_fs(struct acpi_device *device) struct proc_dir_entry *entry = NULL; struct acpi_button *button = NULL; + ACPI_FUNCTION_TRACE("acpi_button_add_fs"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); button = acpi_driver_data(device); @@ -191,19 +195,21 @@ static int acpi_button_add_fs(struct acpi_device *device) } if (!entry) - return -ENODEV; + return_VALUE(-ENODEV); entry->owner = THIS_MODULE; acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; /* 'info' [R] */ entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_BUTTON_FILE_INFO)); else { entry->proc_fops = &acpi_button_info_fops; entry->data = acpi_driver_data(device); @@ -215,7 +221,9 @@ static int acpi_button_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_BUTTON_FILE_INFO)); else { entry->proc_fops = &acpi_button_state_fops; entry->data = acpi_driver_data(device); @@ -223,13 +231,14 @@ static int acpi_button_add_fs(struct acpi_device *device) } } - return 0; + return_VALUE(0); } static int acpi_button_remove_fs(struct acpi_device *device) { struct acpi_button *button = NULL; + ACPI_FUNCTION_TRACE("acpi_button_remove_fs"); button = acpi_driver_data(device); if (acpi_device_dir(device)) { @@ -244,7 +253,7 @@ static int acpi_button_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -255,9 +264,10 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) { struct acpi_button *button = (struct acpi_button *)data; + ACPI_FUNCTION_TRACE("acpi_button_notify"); if (!button || !button->device) - return; + return_VOID; switch (event) { case ACPI_BUTTON_NOTIFY_STATUS: @@ -270,20 +280,21 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static acpi_status acpi_button_notify_fixed(void *data) { struct acpi_button *button = (struct acpi_button *)data; + ACPI_FUNCTION_TRACE("acpi_button_notify_fixed"); if (!button) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); - acpi_button_notify(button->device->handle, ACPI_BUTTON_NOTIFY_STATUS, button); + acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button); - return AE_OK; + return_ACPI_STATUS(AE_OK); } static int acpi_button_add(struct acpi_device *device) @@ -292,16 +303,18 @@ static int acpi_button_add(struct acpi_device *device) acpi_status status = AE_OK; struct acpi_button *button = NULL; + ACPI_FUNCTION_TRACE("acpi_button_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); button = kmalloc(sizeof(struct acpi_button), GFP_KERNEL); if (!button) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(button, 0, sizeof(struct acpi_button)); button->device = device; + button->handle = device->handle; acpi_driver_data(device) = button; /* @@ -336,8 +349,8 @@ static int acpi_button_add(struct acpi_device *device) sprintf(acpi_device_class(device), "%s/%s", ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); } else { - printk(KERN_ERR PREFIX "Unsupported hid [%s]\n", - acpi_device_hid(device)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", + acpi_device_hid(device))); result = -ENODEV; goto end; } @@ -360,7 +373,7 @@ static int acpi_button_add(struct acpi_device *device) button); break; default: - status = acpi_install_notify_handler(device->handle, + status = acpi_install_notify_handler(button->handle, ACPI_DEVICE_NOTIFY, acpi_button_notify, button); @@ -368,6 +381,8 @@ static int acpi_button_add(struct acpi_device *device) } if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); result = -ENODEV; goto end; } @@ -391,7 +406,7 @@ static int acpi_button_add(struct acpi_device *device) kfree(button); } - return result; + return_VALUE(result); } static int acpi_button_remove(struct acpi_device *device, int type) @@ -399,9 +414,10 @@ static int acpi_button_remove(struct acpi_device *device, int type) acpi_status status = 0; struct acpi_button *button = NULL; + ACPI_FUNCTION_TRACE("acpi_button_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); button = acpi_driver_data(device); @@ -418,39 +434,45 @@ static int acpi_button_remove(struct acpi_device *device, int type) acpi_button_notify_fixed); break; default: - status = acpi_remove_notify_handler(device->handle, + status = acpi_remove_notify_handler(button->handle, ACPI_DEVICE_NOTIFY, acpi_button_notify); break; } + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); + acpi_button_remove_fs(device); kfree(button); - return 0; + return_VALUE(0); } static int __init acpi_button_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_button_init"); acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir); if (!acpi_button_dir) - return -ENODEV; + return_VALUE(-ENODEV); acpi_button_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_button_driver); if (result < 0) { remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_button_exit(void) { + ACPI_FUNCTION_TRACE("acpi_button_exit"); acpi_bus_unregister_driver(&acpi_button_driver); @@ -462,7 +484,7 @@ static void __exit acpi_button_exit(void) remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID, acpi_button_dir); remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_button_init); diff --git a/drivers/acpi/cm_sbs.c b/drivers/acpi/cm_sbs.c deleted file mode 100644 index a01ce6700..000000000 --- a/drivers/acpi/cm_sbs.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -ACPI_MODULE_NAME("cm_sbs") -#define ACPI_AC_CLASS "ac_adapter" -#define ACPI_BATTERY_CLASS "battery" -#define ACPI_SBS_COMPONENT 0x00080000 -#define _COMPONENT ACPI_SBS_COMPONENT -static struct proc_dir_entry *acpi_ac_dir; -static struct proc_dir_entry *acpi_battery_dir; - -static DEFINE_MUTEX(cm_sbs_mutex); - -static int lock_ac_dir_cnt; -static int lock_battery_dir_cnt; - -struct proc_dir_entry *acpi_lock_ac_dir(void) -{ - mutex_lock(&cm_sbs_mutex); - if (!acpi_ac_dir) - acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir); - if (acpi_ac_dir) { - lock_ac_dir_cnt++; - } else { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Cannot create %s\n", ACPI_AC_CLASS)); - } - mutex_unlock(&cm_sbs_mutex); - return acpi_ac_dir; -} -EXPORT_SYMBOL(acpi_lock_ac_dir); - -void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param) -{ - mutex_lock(&cm_sbs_mutex); - if (acpi_ac_dir_param) - lock_ac_dir_cnt--; - if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) { - remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); - acpi_ac_dir = 0; - } - mutex_unlock(&cm_sbs_mutex); -} -EXPORT_SYMBOL(acpi_unlock_ac_dir); - -struct proc_dir_entry *acpi_lock_battery_dir(void) -{ - mutex_lock(&cm_sbs_mutex); - if (!acpi_battery_dir) { - acpi_battery_dir = - proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir); - } - if (acpi_battery_dir) { - lock_battery_dir_cnt++; - } else { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Cannot create %s\n", ACPI_BATTERY_CLASS)); - } - mutex_unlock(&cm_sbs_mutex); - return acpi_battery_dir; -} -EXPORT_SYMBOL(acpi_lock_battery_dir); - -void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param) -{ - mutex_lock(&cm_sbs_mutex); - if (acpi_battery_dir_param) - lock_battery_dir_cnt--; - if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param - && acpi_battery_dir) { - remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); - acpi_battery_dir = 0; - } - mutex_unlock(&cm_sbs_mutex); - return; -} -EXPORT_SYMBOL(acpi_unlock_battery_dir); - -static int __init acpi_cm_sbs_init(void) -{ - return 0; -} -subsys_initcall(acpi_cm_sbs_init); diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 871aa520e..b69a8cad8 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -73,16 +73,17 @@ static int is_device_present(acpi_handle handle) acpi_status status; unsigned long sta; + ACPI_FUNCTION_TRACE("is_device_present"); status = acpi_get_handle(handle, "_STA", &temp); if (ACPI_FAILURE(status)) - return 1; /* _STA not found, assmue device present */ + return_VALUE(1); /* _STA not found, assmue device present */ status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) - return 0; /* Firmware error */ + return_VALUE(0); /* Firmware error */ - return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); + return_VALUE((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); } /*******************************************************************/ @@ -90,15 +91,16 @@ static int acpi_container_add(struct acpi_device *device) { struct acpi_container *container; + ACPI_FUNCTION_TRACE("acpi_container_add"); if (!device) { - printk(KERN_ERR PREFIX "device is NULL\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n")); + return_VALUE(-EINVAL); } container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); if (!container) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(container, 0, sizeof(struct acpi_container)); container->handle = device->handle; @@ -109,7 +111,7 @@ static int acpi_container_add(struct acpi_device *device) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n", acpi_device_name(device), acpi_device_bid(device))); - return 0; + return_VALUE(0); } static int acpi_container_remove(struct acpi_device *device, int type) @@ -128,22 +130,23 @@ static int container_device_add(struct acpi_device **device, acpi_handle handle) struct acpi_device *pdev; int result; + ACPI_FUNCTION_TRACE("container_device_add"); if (acpi_get_parent(handle, &phandle)) { - return -ENODEV; + return_VALUE(-ENODEV); } if (acpi_bus_get_device(phandle, &pdev)) { - return -ENODEV; + return_VALUE(-ENODEV); } if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) { - return -ENODEV; + return_VALUE(-ENODEV); } result = acpi_bus_start(*device); - return result; + return_VALUE(result); } static void container_notify_cb(acpi_handle handle, u32 type, void *context) @@ -153,6 +156,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context) int present; acpi_status status; + ACPI_FUNCTION_TRACE("container_notify_cb"); present = is_device_present(handle); @@ -188,7 +192,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context) default: break; } - return; + return_VOID; } static acpi_status @@ -201,10 +205,11 @@ container_walk_namespace_cb(acpi_handle handle, acpi_status status; int *action = context; + ACPI_FUNCTION_TRACE("container_walk_namespace_cb"); status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status) || !buffer.pointer) { - return AE_OK; + return_ACPI_STATUS(AE_OK); } info = buffer.pointer; @@ -236,9 +241,9 @@ container_walk_namespace_cb(acpi_handle handle, } end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return AE_OK; + return_ACPI_STATUS(AE_OK); } static int __init acpi_container_init(void) @@ -264,6 +269,7 @@ static void __exit acpi_container_exit(void) { int action = UNINSTALL_NOTIFY_HANDLER; + ACPI_FUNCTION_TRACE("acpi_container_exit"); acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, @@ -272,7 +278,7 @@ static void __exit acpi_container_exit(void) acpi_bus_unregister_driver(&acpi_container_driver); - return; + return_VOID; } module_init(acpi_container_init); diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index 35c6af8a8..263322b7d 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c @@ -155,12 +155,13 @@ acpi_system_write_debug(struct file *file, { char debug_string[12] = { '\0' }; + ACPI_FUNCTION_TRACE("acpi_system_write_debug"); if (count > sizeof(debug_string) - 1) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(debug_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); debug_string[count] = '\0'; @@ -172,10 +173,10 @@ acpi_system_write_debug(struct file *file, acpi_dbg_level = simple_strtoul(debug_string, NULL, 0); break; default: - return -EINVAL; + return_VALUE(-EINVAL); } - return count; + return_VALUE(count); } static int __init acpi_debug_init(void) @@ -184,9 +185,10 @@ static int __init acpi_debug_init(void) int error = 0; char *name; + ACPI_FUNCTION_TRACE("acpi_debug_init"); if (acpi_disabled) - return 0; + return_VALUE(0); /* 'debug_layer' [R/W] */ name = ACPI_SYSTEM_FILE_DEBUG_LAYER; @@ -211,12 +213,15 @@ static int __init acpi_debug_init(void) goto Error; Done: - return error; + return_VALUE(error); Error: + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' proc fs entry\n", name)); + remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir); remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); - error = -ENODEV; + error = -EFAULT; goto Done; } diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index a6d77efb4..76bc0463f 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c @@ -87,7 +87,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, union acpi_operand_object *second_desc = NULL; u32 flags; - ACPI_FUNCTION_TRACE(ds_create_buffer_field); + ACPI_FUNCTION_TRACE("ds_create_buffer_field"); /* Get the name_string argument */ @@ -210,7 +210,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, acpi_status status; acpi_integer position; - ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info); + ACPI_FUNCTION_TRACE_PTR("ds_get_field_names", info); /* First field starts at bit zero */ @@ -342,7 +342,7 @@ acpi_ds_create_field(union acpi_parse_object *op, union acpi_parse_object *arg; struct acpi_create_field_info info; - ACPI_FUNCTION_TRACE_PTR(ds_create_field, op); + ACPI_FUNCTION_TRACE_PTR("ds_create_field", op); /* First arg is the name of the parent op_region (must already exist) */ @@ -399,7 +399,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, struct acpi_namespace_node *node; u8 type = 0; - ACPI_FUNCTION_TRACE_PTR(ds_init_field_objects, op); + ACPI_FUNCTION_TRACE_PTR("ds_init_field_objects", op); switch (walk_state->opcode) { case AML_FIELD_OP: @@ -425,7 +425,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, * Walk the list of entries in the field_list */ while (arg) { - /* Ignore OFFSET and ACCESSAS terms here */ if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) { @@ -482,7 +481,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op, union acpi_parse_object *arg; struct acpi_create_field_info info; - ACPI_FUNCTION_TRACE_PTR(ds_create_bank_field, op); + ACPI_FUNCTION_TRACE_PTR("ds_create_bank_field", op); /* First arg is the name of the parent op_region (must already exist) */ @@ -555,7 +554,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op, union acpi_parse_object *arg; struct acpi_create_field_info info; - ACPI_FUNCTION_TRACE_PTR(ds_create_index_field, op); + ACPI_FUNCTION_TRACE_PTR("ds_create_index_field", op); /* First arg is the name of the Index register (must already exist) */ diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c index 1888c055d..e65a07ad2 100644 --- a/drivers/acpi/dispatcher/dsinit.c +++ b/drivers/acpi/dispatcher/dsinit.c @@ -116,6 +116,46 @@ acpi_ds_init_one_object(acpi_handle obj_handle, case ACPI_TYPE_METHOD: + /* + * Set the execution data width (32 or 64) based upon the + * revision number of the parent ACPI table. + * TBD: This is really for possible future support of integer width + * on a per-table basis. Currently, we just use a global for the width. + */ + if (info->table_desc->pointer->revision == 1) { + node->flags |= ANOBJ_DATA_WIDTH_32; + } +#ifdef ACPI_INIT_PARSE_METHODS + /* + * Note 11/2005: Removed this code to parse all methods during table + * load because it causes problems if there are any errors during the + * parse. Also, it seems like overkill and we probably don't want to + * abort a table load because of an issue with a single method. + */ + + /* + * Print a dot for each method unless we are going to print + * the entire pathname + */ + if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ".")); + } + + /* + * Always parse methods to detect errors, we will delete + * the parse tree below + */ + status = acpi_ds_parse_method(obj_handle); + if (ACPI_FAILURE(status)) { + ACPI_ERROR((AE_INFO, + "Method %p [%4.4s] - parse failure, %s", + obj_handle, + acpi_ut_get_node_name(obj_handle), + acpi_format_exception(status))); + + /* This parse failed, but we will continue parsing more methods */ + } +#endif info->method_count++; break; @@ -144,7 +184,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle, * * RETURN: Status * - * DESCRIPTION: Walk the namespace starting at "StartNode" and perform any + * DESCRIPTION: Walk the namespace starting at "start_node" and perform any * necessary initialization on the objects found therein * ******************************************************************************/ @@ -156,7 +196,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc, acpi_status status; struct acpi_init_walk_info info; - ACPI_FUNCTION_TRACE(ds_initialize_objects); + ACPI_FUNCTION_TRACE("ds_initialize_objects"); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); @@ -173,7 +213,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc, status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, acpi_ds_init_one_object, &info, NULL); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); + ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index cf888add3..c47554653 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c @@ -52,10 +52,6 @@ #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dsmethod") -/* Local prototypes */ -static acpi_status -acpi_ds_create_method_mutex(union acpi_operand_object *method_desc); - /******************************************************************************* * * FUNCTION: acpi_ds_method_error @@ -71,7 +67,6 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc); * Note: Allows the exception handler to change the status code * ******************************************************************************/ - acpi_status acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) { @@ -86,7 +81,6 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) /* Invoke the global exception handler */ if (acpi_gbl_exception_handler) { - /* Exit the interpreter, allow handler to execute methods */ acpi_ex_exit_interpreter(); @@ -106,7 +100,6 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) } #ifdef ACPI_DISASSEMBLER if (ACPI_FAILURE(status)) { - /* Display method locals/args if disassembler is present */ acpi_dm_dump_method_info(status, walk_state, walk_state->op); @@ -116,53 +109,13 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) return (status); } -/******************************************************************************* - * - * FUNCTION: acpi_ds_create_method_mutex - * - * PARAMETERS: obj_desc - The method object - * - * RETURN: Status - * - * DESCRIPTION: Create a mutex object for a serialized control method - * - ******************************************************************************/ - -static acpi_status -acpi_ds_create_method_mutex(union acpi_operand_object *method_desc) -{ - union acpi_operand_object *mutex_desc; - acpi_status status; - - ACPI_FUNCTION_TRACE(ds_create_method_mutex); - - /* Create the new mutex object */ - - mutex_desc = acpi_ut_create_internal_object(ACPI_TYPE_MUTEX); - if (!mutex_desc) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - /* Create the actual OS Mutex */ - - status = acpi_os_create_mutex(&mutex_desc->mutex.os_mutex); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - mutex_desc->mutex.sync_level = method_desc->method.sync_level; - method_desc->method.mutex = mutex_desc; - return_ACPI_STATUS(AE_OK); -} - /******************************************************************************* * * FUNCTION: acpi_ds_begin_method_execution * * PARAMETERS: method_node - Node of the method * obj_desc - The method object - * walk_state - current state, NULL if not yet executing - * a method. + * calling_method_node - Caller of this method (if non-null) * * RETURN: Status * @@ -173,13 +126,13 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc) ******************************************************************************/ acpi_status -acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, - union acpi_operand_object *obj_desc, - struct acpi_walk_state *walk_state) +acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node, + union acpi_operand_object * obj_desc, + struct acpi_namespace_node * calling_method_node) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ds_begin_method_execution, method_node); + ACPI_FUNCTION_TRACE_PTR("ds_begin_method_execution", method_node); if (!method_node) { return_ACPI_STATUS(AE_NULL_ENTRY); @@ -194,80 +147,32 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, } /* - * If this method is serialized, we need to acquire the method mutex. + * If there is a concurrency limit on this method, we need to + * obtain a unit from the method semaphore. */ - if (obj_desc->method.method_flags & AML_METHOD_SERIALIZED) { - /* - * Create a mutex for the method if it is defined to be Serialized - * and a mutex has not already been created. We defer the mutex creation - * until a method is actually executed, to minimize the object count - */ - if (!obj_desc->method.mutex) { - status = acpi_ds_create_method_mutex(obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - } - + if (obj_desc->method.semaphore) { /* - * The current_sync_level (per-thread) must be less than or equal to - * the sync level of the method. This mechanism provides some - * deadlock prevention + * Allow recursive method calls, up to the reentrancy/concurrency + * limit imposed by the SERIALIZED rule and the sync_level method + * parameter. * - * Top-level method invocation has no walk state at this point + * The point of this code is to avoid permanently blocking a + * thread that is making recursive method calls. */ - if (walk_state && - (walk_state->thread->current_sync_level > - obj_desc->method.mutex->mutex.sync_level)) { - ACPI_ERROR((AE_INFO, - "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%d)", - acpi_ut_get_node_name(method_node), - walk_state->thread->current_sync_level)); - - return_ACPI_STATUS(AE_AML_MUTEX_ORDER); + if (method_node == calling_method_node) { + if (obj_desc->method.thread_count >= + obj_desc->method.concurrency) { + return_ACPI_STATUS(AE_AML_METHOD_LIMIT); + } } /* - * Obtain the method mutex if necessary. Do not acquire mutex for a - * recursive call. + * Get a unit from the method semaphore. This releases the + * interpreter if we block */ - if (!walk_state || - !obj_desc->method.mutex->mutex.owner_thread || - (walk_state->thread != - obj_desc->method.mutex->mutex.owner_thread)) { - /* - * Acquire the method mutex. This releases the interpreter if we - * block (and reacquires it before it returns) - */ - status = - acpi_ex_system_wait_mutex(obj_desc->method.mutex-> - mutex.os_mutex, - ACPI_WAIT_FOREVER); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Update the mutex and walk info and save the original sync_level */ - - if (walk_state) { - obj_desc->method.mutex->mutex. - original_sync_level = - walk_state->thread->current_sync_level; - - obj_desc->method.mutex->mutex.owner_thread = - walk_state->thread; - walk_state->thread->current_sync_level = - obj_desc->method.sync_level; - } else { - obj_desc->method.mutex->mutex. - original_sync_level = - obj_desc->method.mutex->mutex.sync_level; - } - } - - /* Always increase acquisition depth */ - - obj_desc->method.mutex->mutex.acquisition_depth++; + status = + acpi_ex_system_wait_semaphore(obj_desc->method.semaphore, + ACPI_WAIT_FOREVER); } /* @@ -278,7 +183,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, if (!obj_desc->method.owner_id) { status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id); if (ACPI_FAILURE(status)) { - goto cleanup; + return_ACPI_STATUS(status); } } @@ -288,14 +193,6 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, */ obj_desc->method.thread_count++; return_ACPI_STATUS(status); - - cleanup: - /* On error, must release the method mutex (if present) */ - - if (obj_desc->method.mutex) { - acpi_os_release_mutex(obj_desc->method.mutex->mutex.os_mutex); - } - return_ACPI_STATUS(status); } /******************************************************************************* @@ -321,10 +218,10 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, struct acpi_namespace_node *method_node; struct acpi_walk_state *next_walk_state = NULL; union acpi_operand_object *obj_desc; - struct acpi_evaluate_info *info; + struct acpi_parameter_info info; u32 i; - ACPI_FUNCTION_TRACE_PTR(ds_call_control_method, this_walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_call_control_method", this_walk_state); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Execute method %p, currentstate=%p\n", @@ -343,31 +240,25 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, return_ACPI_STATUS(AE_NULL_OBJECT); } - /* Init for new method, possibly wait on method mutex */ + /* Init for new method, wait on concurrency semaphore */ status = acpi_ds_begin_method_execution(method_node, obj_desc, - this_walk_state); + this_walk_state->method_node); if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + goto cleanup; } - /* - * 1) Parse the method. All "normal" methods are parsed for each execution. - * Internal methods (_OSI, etc.) do not require parsing. - */ if (!(obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY)) { - - /* Create a new walk state for the parse */ + /* 1) Parse: Create a new walk state for the preempting walk */ next_walk_state = acpi_ds_create_walk_state(obj_desc->method.owner_id, op, obj_desc, NULL); if (!next_walk_state) { - status = AE_NO_MEMORY; - goto cleanup; + return_ACPI_STATUS(AE_NO_MEMORY); } - /* Create and init a parse tree root */ + /* Create and init a Root Node */ op = acpi_ps_create_scope_op(); if (!op) { @@ -380,20 +271,17 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, obj_desc->method.aml_length, NULL, 1); if (ACPI_FAILURE(status)) { - acpi_ps_delete_parse_tree(op); + acpi_ds_delete_walk_state(next_walk_state); goto cleanup; } - /* Begin AML parse (deletes next_walk_state) */ + /* Begin AML parse */ status = acpi_ps_parse_aml(next_walk_state); acpi_ps_delete_parse_tree(op); - if (ACPI_FAILURE(status)) { - goto cleanup; - } } - /* 2) Begin method execution. Create a new walk state */ + /* 2) Execute: Create a new state for the preempting walk */ next_walk_state = acpi_ds_create_walk_state(obj_desc->method.owner_id, NULL, obj_desc, thread); @@ -401,7 +289,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, status = AE_NO_MEMORY; goto cleanup; } - /* * The resolved arguments were put on the previous walk state's operand * stack. Operands on the previous walk state stack always @@ -409,24 +296,12 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, */ this_walk_state->operands[this_walk_state->num_operands] = NULL; - /* - * Allocate and initialize the evaluation information block - * TBD: this is somewhat inefficient, should change interface to - * ds_init_aml_walk. For now, keeps this struct off the CPU stack - */ - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - info->parameters = &this_walk_state->operands[0]; - info->parameter_type = ACPI_PARAM_ARGS; + info.parameters = &this_walk_state->operands[0]; + info.parameter_type = ACPI_PARAM_ARGS; status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node, obj_desc->method.aml_start, - obj_desc->method.aml_length, info, 3); - - ACPI_FREE(info); + obj_desc->method.aml_length, &info, 3); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -448,8 +323,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, "Starting nested execution, newstate=%p\n", next_walk_state)); - /* Invoke an internal method if necessary */ - if (obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) { status = obj_desc->method.implementation(next_walk_state); } @@ -457,14 +330,16 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, return_ACPI_STATUS(status); cleanup: + /* Decrement the thread count on the method parse tree */ - /* On error, we must terminate the method properly */ - - acpi_ds_terminate_control_method(obj_desc, next_walk_state); - if (next_walk_state) { - acpi_ds_delete_walk_state(next_walk_state); + if (next_walk_state && (next_walk_state->method_desc)) { + next_walk_state->method_desc->method.thread_count--; } + /* On error, we must delete the new walk state */ + + acpi_ds_terminate_control_method(next_walk_state); + acpi_ds_delete_walk_state(next_walk_state); return_ACPI_STATUS(status); } @@ -487,33 +362,25 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, union acpi_operand_object *return_desc) { acpi_status status; - int same_as_implicit_return; - ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_restart_control_method", walk_state); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n", - acpi_ut_get_node_name(walk_state->method_node), + "****Restart [%4.4s] Op %p return_value_from_callee %p\n", + (char *)&walk_state->method_node->name, walk_state->method_call_op, return_desc)); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - " ReturnFromThisMethodUsed?=%X ResStack %p Walk %p\n", + " return_from_this_method_used?=%X res_stack %p Walk %p\n", walk_state->return_used, walk_state->results, walk_state)); /* Did the called method return a value? */ if (return_desc) { - - /* Is the implicit return object the same as the return desc? */ - - same_as_implicit_return = - (walk_state->implicit_return_obj == return_desc); - /* Are we actually going to use the return value? */ if (walk_state->return_used) { - /* Save the return value from the previous method */ status = acpi_ds_result_push(return_desc, walk_state); @@ -530,23 +397,18 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, } /* - * The following code is the optional support for the so-called - * "implicit return". Some AML code assumes that the last value of the - * method is "implicitly" returned to the caller, in the absence of an - * explicit return value. - * - * Just save the last result of the method as the return value. - * + * The following code is the + * optional support for a so-called "implicit return". Some AML code + * assumes that the last value of the method is "implicitly" returned + * to the caller. Just save the last result as the return value. * NOTE: this is optional because the ASL language does not actually * support this behavior. */ else if (!acpi_ds_do_implicit_return - (return_desc, walk_state, FALSE) - || same_as_implicit_return) { + (return_desc, walk_state, FALSE)) { /* * Delete the return value if it will not be used by the - * calling method or remove one reference if the explicit return - * is the same as the implicit return value. + * calling method */ acpi_ut_remove_reference(return_desc); } @@ -559,8 +421,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, * * FUNCTION: acpi_ds_terminate_control_method * - * PARAMETERS: method_desc - Method object - * walk_state - State associated with the method + * PARAMETERS: walk_state - State of the method * * RETURN: None * @@ -568,106 +429,262 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, * created, delete all locals and arguments, and delete the parse * tree if requested. * - * MUTEX: Interpreter is locked - * ******************************************************************************/ -void -acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, - struct acpi_walk_state *walk_state) +void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state) { + union acpi_operand_object *obj_desc; struct acpi_namespace_node *method_node; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_terminate_control_method, walk_state); - - /* method_desc is required, walk_state is optional */ + ACPI_FUNCTION_TRACE_PTR("ds_terminate_control_method", walk_state); - if (!method_desc) { + if (!walk_state) { return_VOID; } - if (walk_state) { - - /* Delete all arguments and locals */ + /* The current method object was saved in the walk state */ - acpi_ds_method_data_delete_all(walk_state); + obj_desc = walk_state->method_desc; + if (!obj_desc) { + return_VOID; } + /* Delete all arguments and locals */ + + acpi_ds_method_data_delete_all(walk_state); + /* - * If method is serialized, release the mutex and restore the - * current sync level for this thread + * Lock the parser while we terminate this method. + * If this is the last thread executing the method, + * we have additional cleanup to perform */ - if (method_desc->method.mutex) { + status = acpi_ut_acquire_mutex(ACPI_MTX_PARSER); + if (ACPI_FAILURE(status)) { + return_VOID; + } - /* Acquisition Depth handles recursive calls */ + /* Signal completion of the execution of this method if necessary */ - method_desc->method.mutex->mutex.acquisition_depth--; - if (!method_desc->method.mutex->mutex.acquisition_depth) { - walk_state->thread->current_sync_level = - method_desc->method.mutex->mutex. - original_sync_level; + if (walk_state->method_desc->method.semaphore) { + status = + acpi_os_signal_semaphore(walk_state->method_desc->method. + semaphore, 1); + if (ACPI_FAILURE(status)) { + ACPI_ERROR((AE_INFO, + "Could not signal method semaphore")); - acpi_os_release_mutex(method_desc->method.mutex->mutex. - os_mutex); - method_desc->method.mutex->mutex.owner_thread = NULL; + /* Ignore error and continue cleanup */ } } - if (walk_state) { - /* - * Delete any objects created by this method during execution. - * The method Node is stored in the walk state - */ - method_node = walk_state->method_node; + /* + * There are no more threads executing this method. Perform + * additional cleanup. + * + * The method Node is stored in the walk state + */ + method_node = walk_state->method_node; - /* - * Delete any namespace objects created anywhere within - * the namespace by the execution of this method - */ - acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id); - } + /* Lock namespace for possible update */ - /* Decrement the thread count on the method */ + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { + goto exit; + } - if (method_desc->method.thread_count) { - method_desc->method.thread_count--; - } else { - ACPI_ERROR((AE_INFO, "Invalid zero thread count in method")); + /* + * Delete any namespace entries created immediately underneath + * the method + */ + if (method_node->child) { + acpi_ns_delete_namespace_subtree(method_node); } + /* + * Delete any namespace entries created anywhere else within + * the namespace by the execution of this method + */ + acpi_ns_delete_namespace_by_owner(walk_state->method_desc->method. + owner_id); + status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + /* Are there any other threads currently executing this method? */ - if (method_desc->method.thread_count) { + if (walk_state->method_desc->method.thread_count) { /* * Additional threads. Do not release the owner_id in this case, * we immediately reuse it for the next thread executing this method */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "*** Completed execution of one thread, %d threads remaining\n", - method_desc->method.thread_count)); + walk_state->method_desc->method. + thread_count)); } else { /* This is the only executing thread for this method */ /* * Support to dynamically change a method from not_serialized to * Serialized if it appears that the method is incorrectly written and - * does not support multiple thread execution. The best example of this - * is if such a method creates namespace objects and blocks. A second + * does not support multiple thread execution. The best example of this + * is if such a method creates namespace objects and blocks. A second * thread will fail with an AE_ALREADY_EXISTS exception * * This code is here because we must wait until the last thread exits * before creating the synchronization semaphore. */ - if ((method_desc->method.method_flags & AML_METHOD_SERIALIZED) - && (!method_desc->method.mutex)) { - status = acpi_ds_create_method_mutex(method_desc); + if ((walk_state->method_desc->method.concurrency == 1) && + (!walk_state->method_desc->method.semaphore)) { + status = acpi_os_create_semaphore(1, 1, + &walk_state-> + method_desc->method. + semaphore); } /* No more threads, we can free the owner_id */ - acpi_ut_release_owner_id(&method_desc->method.owner_id); + acpi_ut_release_owner_id(&walk_state->method_desc->method. + owner_id); } + exit: + (void)acpi_ut_release_mutex(ACPI_MTX_PARSER); return_VOID; } + +#ifdef ACPI_INIT_PARSE_METHODS + /* + * Note 11/2005: Removed this code to parse all methods during table + * load because it causes problems if there are any errors during the + * parse. Also, it seems like overkill and we probably don't want to + * abort a table load because of an issue with a single method. + */ + +/******************************************************************************* + * + * FUNCTION: acpi_ds_parse_method + * + * PARAMETERS: Node - Method node + * + * RETURN: Status + * + * DESCRIPTION: Parse the AML that is associated with the method. + * + * MUTEX: Assumes parser is locked + * + ******************************************************************************/ + +acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node) +{ + acpi_status status; + union acpi_operand_object *obj_desc; + union acpi_parse_object *op; + struct acpi_walk_state *walk_state; + + ACPI_FUNCTION_TRACE_PTR("ds_parse_method", node); + + /* Parameter Validation */ + + if (!node) { + return_ACPI_STATUS(AE_NULL_ENTRY); + } + + ACPI_DEBUG_PRINT((ACPI_DB_PARSE, + "**** Parsing [%4.4s] **** named_obj=%p\n", + acpi_ut_get_node_name(node), node)); + + /* Extract the method object from the method Node */ + + obj_desc = acpi_ns_get_attached_object(node); + if (!obj_desc) { + return_ACPI_STATUS(AE_NULL_OBJECT); + } + + /* Create a mutex for the method if there is a concurrency limit */ + + if ((obj_desc->method.concurrency != ACPI_INFINITE_CONCURRENCY) && + (!obj_desc->method.semaphore)) { + status = acpi_os_create_semaphore(obj_desc->method.concurrency, + obj_desc->method.concurrency, + &obj_desc->method.semaphore); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } + + /* + * Allocate a new parser op to be the root of the parsed + * method tree + */ + op = acpi_ps_alloc_op(AML_METHOD_OP); + if (!op) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + /* Init new op with the method name and pointer back to the Node */ + + acpi_ps_set_name(op, node->name.integer); + op->common.node = node; + + /* + * Get a new owner_id for objects created by this method. Namespace + * objects (such as Operation Regions) can be created during the + * first pass parse. + */ + status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id); + if (ACPI_FAILURE(status)) { + goto cleanup; + } + + /* Create and initialize a new walk state */ + + walk_state = + acpi_ds_create_walk_state(obj_desc->method.owner_id, NULL, NULL, + NULL); + if (!walk_state) { + status = AE_NO_MEMORY; + goto cleanup2; + } + + status = acpi_ds_init_aml_walk(walk_state, op, node, + obj_desc->method.aml_start, + obj_desc->method.aml_length, NULL, 1); + if (ACPI_FAILURE(status)) { + acpi_ds_delete_walk_state(walk_state); + goto cleanup2; + } + + /* + * Parse the method, first pass + * + * The first pass load is where newly declared named objects are added into + * the namespace. Actual evaluation of the named objects (what would be + * called a "second pass") happens during the actual execution of the + * method so that operands to the named objects can take on dynamic + * run-time values. + */ + status = acpi_ps_parse_aml(walk_state); + if (ACPI_FAILURE(status)) { + goto cleanup2; + } + + ACPI_DEBUG_PRINT((ACPI_DB_PARSE, + "**** [%4.4s] Parsed **** named_obj=%p Op=%p\n", + acpi_ut_get_node_name(node), node, op)); + + /* + * Delete the parse tree. We simply re-parse the method for every + * execution since there isn't much overhead (compared to keeping lots + * of parse trees around) + */ + acpi_ns_delete_namespace_subtree(node); + acpi_ns_delete_namespace_by_owner(obj_desc->method.owner_id); + + cleanup2: + acpi_ut_release_owner_id(&obj_desc->method.owner_id); + + cleanup: + acpi_ps_delete_parse_tree(op); + return_ACPI_STATUS(status); +} +#endif diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index 459160ff9..c025674f9 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c @@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode, * special data types. * * NOTES: walk_state fields are initialized to zero by the - * ACPI_ALLOCATE_ZEROED(). + * ACPI_MEM_CALLOCATE(). * * A pseudo-Namespace Node is assigned to each argument and local * so that ref_of() can return a pointer to the Node. @@ -92,7 +92,7 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) { u32 i; - ACPI_FUNCTION_TRACE(ds_method_data_init); + ACPI_FUNCTION_TRACE("ds_method_data_init"); /* Init the method arguments */ @@ -100,10 +100,10 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) ACPI_MOVE_32_TO_32(&walk_state->arguments[i].name, NAMEOF_ARG_NTE); walk_state->arguments[i].name.integer |= (i << 24); - walk_state->arguments[i].descriptor_type = ACPI_DESC_TYPE_NAMED; + walk_state->arguments[i].descriptor = ACPI_DESC_TYPE_NAMED; walk_state->arguments[i].type = ACPI_TYPE_ANY; - walk_state->arguments[i].flags = - ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG; + walk_state->arguments[i].flags = ANOBJ_END_OF_PEER_LIST | + ANOBJ_METHOD_ARG; } /* Init the method locals */ @@ -113,11 +113,11 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state) NAMEOF_LOCAL_NTE); walk_state->local_variables[i].name.integer |= (i << 24); - walk_state->local_variables[i].descriptor_type = + walk_state->local_variables[i].descriptor = ACPI_DESC_TYPE_NAMED; walk_state->local_variables[i].type = ACPI_TYPE_ANY; - walk_state->local_variables[i].flags = - ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL; + walk_state->local_variables[i].flags = ANOBJ_END_OF_PEER_LIST | + ANOBJ_METHOD_LOCAL; } return_VOID; @@ -140,7 +140,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state) { u32 index; - ACPI_FUNCTION_TRACE(ds_method_data_delete_all); + ACPI_FUNCTION_TRACE("ds_method_data_delete_all"); /* Detach the locals */ @@ -199,7 +199,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params, acpi_status status; u32 index = 0; - ACPI_FUNCTION_TRACE_PTR(ds_method_data_init_args, params); + ACPI_FUNCTION_TRACE_PTR("ds_method_data_init_args", params); if (!params) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, @@ -251,7 +251,7 @@ acpi_ds_method_data_get_node(u16 opcode, struct acpi_walk_state *walk_state, struct acpi_namespace_node **node) { - ACPI_FUNCTION_TRACE(ds_method_data_get_node); + ACPI_FUNCTION_TRACE("ds_method_data_get_node"); /* * Method Locals and Arguments are supported @@ -318,10 +318,10 @@ acpi_ds_method_data_set_value(u16 opcode, acpi_status status; struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(ds_method_data_set_value); + ACPI_FUNCTION_TRACE("ds_method_data_set_value"); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "NewObj %p Opcode %X, Refs=%d [%s]\n", object, + "new_obj %p Opcode %X, Refs=%d [%s]\n", object, opcode, object->common.reference_count, acpi_ut_get_type_name(object->common.type))); @@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode, * Increment ref count so object can't be deleted while installed. * NOTE: We do not copy the object in order to preserve the call by * reference semantics of ACPI Control Method invocation. - * (See ACPI Specification 2.0_c) + * (See ACPI specification 2.0_c) */ acpi_ut_add_reference(object); @@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode, * FUNCTION: acpi_ds_method_data_get_value * * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP - * Index - Which local_var or argument to get + * Index - which local_var or argument to get * walk_state - Current walk state object * dest_desc - Where Arg or Local value is returned * @@ -372,7 +372,7 @@ acpi_ds_method_data_get_value(u16 opcode, struct acpi_namespace_node *node; union acpi_operand_object *object; - ACPI_FUNCTION_TRACE(ds_method_data_get_value); + ACPI_FUNCTION_TRACE("ds_method_data_get_value"); /* Validate the object descriptor */ @@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode, * FUNCTION: acpi_ds_method_data_delete_value * * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP - * Index - Which local_var or argument to delete + * Index - which local_var or argument to delete * walk_state - Current walk state object * * RETURN: None @@ -477,7 +477,7 @@ acpi_ds_method_data_delete_value(u16 opcode, struct acpi_namespace_node *node; union acpi_operand_object *object; - ACPI_FUNCTION_TRACE(ds_method_data_delete_value); + ACPI_FUNCTION_TRACE("ds_method_data_delete_value"); /* Get the namespace node for the arg/local */ @@ -538,7 +538,7 @@ acpi_ds_store_object_to_local(u16 opcode, union acpi_operand_object *current_obj_desc; union acpi_operand_object *new_obj_desc; - ACPI_FUNCTION_TRACE(ds_store_object_to_local); + ACPI_FUNCTION_TRACE("ds_store_object_to_local"); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n", opcode, index, obj_desc)); @@ -614,7 +614,7 @@ acpi_ds_store_object_to_local(u16 opcode, && (current_obj_desc->reference.opcode == AML_REF_OF_OP)) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Arg (%p) is an ObjRef(Node), storing in node %p\n", + "Arg (%p) is an obj_ref(Node), storing in node %p\n", new_obj_desc, current_obj_desc)); @@ -688,7 +688,7 @@ acpi_ds_method_data_get_type(u16 opcode, struct acpi_namespace_node *node; union acpi_operand_object *object; - ACPI_FUNCTION_TRACE(ds_method_data_get_type); + ACPI_FUNCTION_TRACE("ds_method_data_get_type"); /* Get the namespace node for the arg/local */ @@ -701,7 +701,6 @@ acpi_ds_method_data_get_type(u16 opcode, object = acpi_ns_get_attached_object(node); if (!object) { - /* Uninitialized local/arg, return TYPE_ANY */ return_VALUE(ACPI_TYPE_ANY); diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 72190abb1..8b21f0f9e 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c @@ -81,7 +81,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(ds_build_internal_object); + ACPI_FUNCTION_TRACE("ds_build_internal_object"); *obj_desc_ptr = NULL; if (op->common.aml_opcode == AML_INT_NAMEPATH_OP) { @@ -103,7 +103,6 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, common. node))); if (ACPI_FAILURE(status)) { - /* Check if we are resolving a named reference within a package */ if ((status == AE_NOT_FOUND) @@ -187,7 +186,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, union acpi_parse_object *byte_list; u32 byte_list_length = 0; - ACPI_FUNCTION_TRACE(ds_build_internal_buffer_obj); + ACPI_FUNCTION_TRACE("ds_build_internal_buffer_obj"); /* * If we are evaluating a Named buffer object "Name (xxxx, Buffer)". @@ -196,7 +195,6 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, */ obj_desc = *obj_desc_ptr; if (!obj_desc) { - /* Create a new buffer object */ obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER); @@ -245,7 +243,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state, "Buffer defined with zero length in AML, creating\n")); } else { obj_desc->buffer.pointer = - ACPI_ALLOCATE_ZEROED(obj_desc->buffer.length); + ACPI_MEM_CALLOCATE(obj_desc->buffer.length); if (!obj_desc->buffer.pointer) { acpi_ut_delete_object_desc(obj_desc); return_ACPI_STATUS(AE_NO_MEMORY); @@ -293,7 +291,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, acpi_status status = AE_OK; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ds_build_internal_package_obj); + ACPI_FUNCTION_TRACE("ds_build_internal_package_obj"); /* Find the parent of a possibly nested package */ @@ -341,10 +339,9 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, * individual objects). Add an extra pointer slot so * that the list is always null terminated. */ - obj_desc->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) - obj_desc->package. - count + - 1) * sizeof(void *)); + obj_desc->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) obj_desc-> + package.count + + 1) * sizeof(void *)); if (!obj_desc->package.elements) { acpi_ut_delete_object_desc(obj_desc); @@ -358,7 +355,6 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, arg = arg->common.next; for (i = 0; arg; i++) { if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { - /* Object (package or buffer) is already built */ obj_desc->package.elements[i] = @@ -400,7 +396,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state, acpi_status status; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE_PTR(ds_create_node, op); + ACPI_FUNCTION_TRACE_PTR("ds_create_node", op); /* * Because of the execution pass through the non-control-method @@ -412,7 +408,6 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state, } if (!op->common.value.arg) { - /* No arguments, there is nothing to do */ return_ACPI_STATUS(AE_OK); @@ -469,12 +464,11 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, union acpi_operand_object *obj_desc; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ds_init_object_from_op); + ACPI_FUNCTION_TRACE("ds_init_object_from_op"); obj_desc = *ret_obj_desc; op_info = acpi_ps_get_opcode_info(opcode); if (op_info->class == AML_CLASS_UNKNOWN) { - /* Unknown opcode */ return_ACPI_STATUS(AE_TYPE); @@ -632,7 +626,6 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, default: /* Other literals, etc.. */ if (op->common.aml_opcode == AML_INT_NAMEPATH_OP) { - /* Node was saved in Op */ obj_desc->reference.node = op->common.node; diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c index 5b974a8fe..6229c1067 100644 --- a/drivers/acpi/dispatcher/dsopcode.c +++ b/drivers/acpi/dispatcher/dsopcode.c @@ -91,7 +91,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node, union acpi_parse_object *op; struct acpi_walk_state *walk_state; - ACPI_FUNCTION_TRACE(ds_execute_arguments); + ACPI_FUNCTION_TRACE("ds_execute_arguments"); /* * Allocate a new parser op to be the root of the parsed tree @@ -193,7 +193,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc) struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_get_buffer_field_arguments, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ds_get_buffer_field_arguments", obj_desc); if (obj_desc->common.flags & AOPOBJ_DATA_VALID) { return_ACPI_STATUS(AE_OK); @@ -206,7 +206,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc) ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_BUFFER_FIELD, node, NULL)); - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "[%4.4s] BufferField Arg Init\n", + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "[%4.4s] buffer_field Arg Init\n", acpi_ut_get_node_name(node))); /* Execute the AML code for the term_arg arguments */ @@ -235,7 +235,7 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc) struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_get_buffer_arguments, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ds_get_buffer_arguments", obj_desc); if (obj_desc->common.flags & AOPOBJ_DATA_VALID) { return_ACPI_STATUS(AE_OK); @@ -279,7 +279,7 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc) struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_get_package_arguments, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ds_get_package_arguments", obj_desc); if (obj_desc->common.flags & AOPOBJ_DATA_VALID) { return_ACPI_STATUS(AE_OK); @@ -324,7 +324,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) acpi_status status; union acpi_operand_object *extra_desc; - ACPI_FUNCTION_TRACE_PTR(ds_get_region_arguments, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ds_get_region_arguments", obj_desc); if (obj_desc->region.flags & AOPOBJ_DATA_VALID) { return_ACPI_STATUS(AE_OK); @@ -342,7 +342,8 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL)); - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "[%4.4s] OpRegion Arg Init at AML %p\n", + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "[%4.4s] op_region Arg Init at AML %p\n", acpi_ut_get_node_name(node), extra_desc->extra.aml_start)); @@ -351,28 +352,6 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) status = acpi_ds_execute_arguments(node, acpi_ns_get_parent_node(node), extra_desc->extra.aml_length, extra_desc->extra.aml_start); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Validate the region address/length via the host OS */ - - status = acpi_os_validate_address(obj_desc->region.space_id, - obj_desc->region.address, - (acpi_size) obj_desc->region.length); - if (ACPI_FAILURE(status)) { - /* - * Invalid address/length. We will emit an error message and mark - * the region as invalid, so that it will cause an additional error if - * it is ever used. Then return AE_OK. - */ - ACPI_EXCEPTION((AE_INFO, status, - "During address validation of OpRegion [%4.4s]", - node->name.ascii)); - obj_desc->common.flags |= AOPOBJ_INVALID; - status = AE_OK; - } - return_ACPI_STATUS(status); } @@ -432,7 +411,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode, u8 field_flags; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_init_buffer_field, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ds_init_buffer_field", obj_desc); /* Host object must be a Buffer */ @@ -478,7 +457,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode, if (bit_count == 0) { ACPI_ERROR((AE_INFO, - "Attempt to CreateField of length zero")); + "Attempt to create_field of length zero")); status = AE_AML_OPERAND_VALUE; goto cleanup; } @@ -616,7 +595,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, struct acpi_namespace_node *node; union acpi_parse_object *next_op; - ACPI_FUNCTION_TRACE_PTR(ds_eval_buffer_field_operands, op); + ACPI_FUNCTION_TRACE_PTR("ds_eval_buffer_field_operands", op); /* * This is where we evaluate the address and length fields of the @@ -648,7 +627,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, ACPI_DUMP_OPERANDS(ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE, acpi_ps_get_opcode_name(op->common.aml_opcode), walk_state->num_operands, - "after AcpiExResolveOperands"); + "after acpi_ex_resolve_operands"); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "(%s) bad operand(s) (%X)", @@ -661,7 +640,6 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, /* Initialize the Buffer Field */ if (op->common.aml_opcode == AML_CREATE_FIELD_OP) { - /* NOTE: Slightly different operands for this opcode */ status = @@ -707,7 +685,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, struct acpi_namespace_node *node; union acpi_parse_object *next_op; - ACPI_FUNCTION_TRACE_PTR(ds_eval_region_operands, op); + ACPI_FUNCTION_TRACE_PTR("ds_eval_region_operands", op); /* * This is where we evaluate the address and length fields of the @@ -740,7 +718,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, ACPI_DUMP_OPERANDS(ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE, acpi_ps_get_opcode_name(op->common.aml_opcode), - 1, "after AcpiExResolveOperands"); + 1, "after acpi_ex_resolve_operands"); obj_desc = acpi_ns_get_attached_object(node); if (!obj_desc) { @@ -766,7 +744,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state, operand_desc->integer.value; acpi_ut_remove_reference(operand_desc); - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n", + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "rgn_obj %p Addr %8.8X%8.8X Len %X\n", obj_desc, ACPI_FORMAT_UINT64(obj_desc->region.address), obj_desc->region.length)); @@ -802,7 +780,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state, union acpi_operand_object *arg_desc; u32 length; - ACPI_FUNCTION_TRACE(ds_eval_data_object_operands); + ACPI_FUNCTION_TRACE("ds_eval_data_object_operands"); /* The first operand (for all of these data objects) is the length */ @@ -896,7 +874,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state, acpi_status status = AE_OK; union acpi_generic_state *control_state; - ACPI_FUNCTION_NAME(ds_exec_begin_control_op); + ACPI_FUNCTION_NAME("ds_exec_begin_control_op"); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Op=%p Opcode=%2.2X State=%p\n", op, op->common.aml_opcode, walk_state)); @@ -974,7 +952,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, acpi_status status = AE_OK; union acpi_generic_state *control_state; - ACPI_FUNCTION_NAME(ds_exec_end_control_op); + ACPI_FUNCTION_NAME("ds_exec_end_control_op"); switch (op->common.aml_opcode) { case AML_IF_OP: @@ -1006,7 +984,6 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", op)); if (walk_state->control_state->common.value) { - /* Predicate was true, go back and evaluate it again! */ status = AE_CTRL_PENDING; @@ -1037,7 +1014,6 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, * has been bubbled up the tree */ if (op->common.value.arg) { - /* Since we have a real Return(), delete any implicit return */ acpi_ds_clear_implicit_return(walk_state); @@ -1071,7 +1047,6 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, walk_state->return_desc = walk_state->operands[0]; } else if ((walk_state->results) && (walk_state->results->results.num_results > 0)) { - /* Since we have a real Return(), delete any implicit return */ acpi_ds_clear_implicit_return(walk_state); @@ -1120,7 +1095,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, } ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "Completed RETURN_OP State=%p, RetVal=%p\n", + "Completed RETURN_OP State=%p, ret_val=%p\n", walk_state, walk_state->return_desc)); /* End the control method execution right now */ diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c index 05230baf5..53356a591 100644 --- a/drivers/acpi/dispatcher/dsutils.c +++ b/drivers/acpi/dispatcher/dsutils.c @@ -68,7 +68,7 @@ ACPI_MODULE_NAME("dsutils") ******************************************************************************/ void acpi_ds_clear_implicit_return(struct acpi_walk_state *walk_state) { - ACPI_FUNCTION_NAME(ds_clear_implicit_return); + ACPI_FUNCTION_NAME("ds_clear_implicit_return"); /* * Slack must be enabled for this feature @@ -115,7 +115,7 @@ u8 acpi_ds_do_implicit_return(union acpi_operand_object *return_desc, struct acpi_walk_state *walk_state, u8 add_reference) { - ACPI_FUNCTION_NAME(ds_do_implicit_return); + ACPI_FUNCTION_NAME("ds_do_implicit_return"); /* * Slack must be enabled for this feature, and we must @@ -171,7 +171,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op, { const struct acpi_opcode_info *parent_info; - ACPI_FUNCTION_TRACE_PTR(ds_is_result_used, op); + ACPI_FUNCTION_TRACE_PTR("ds_is_result_used", op); /* Must have both an Op and a Result Object */ @@ -202,7 +202,6 @@ acpi_ds_is_result_used(union acpi_parse_object * op, */ if ((!op->common.parent) || (op->common.parent->common.aml_opcode == AML_SCOPE_OP)) { - /* No parent, the return value cannot possibly be used */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, @@ -341,7 +340,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ds_delete_result_if_not_used, result_obj); + ACPI_FUNCTION_TRACE_PTR("ds_delete_result_if_not_used", result_obj); if (!op) { ACPI_ERROR((AE_INFO, "Null Op")); @@ -353,7 +352,6 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op, } if (!acpi_ds_is_result_used(op, walk_state)) { - /* Must pop the result stack (obj_desc should be equal to result_obj) */ status = acpi_ds_result_pop(&obj_desc, walk_state); @@ -384,7 +382,7 @@ acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state) u32 i; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ds_resolve_operands, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_resolve_operands", walk_state); /* * Attempt to resolve each of the valid operands @@ -419,7 +417,7 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state) { u32 i; - ACPI_FUNCTION_TRACE_PTR(ds_clear_operands, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_clear_operands", walk_state); /* Remove a reference on each operand on the stack */ @@ -467,7 +465,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, acpi_interpreter_mode interpreter_mode; const struct acpi_opcode_info *op_info; - ACPI_FUNCTION_TRACE_PTR(ds_create_operand, arg); + ACPI_FUNCTION_TRACE_PTR("ds_create_operand", arg); /* A valid name must be looked up in the namespace */ @@ -500,9 +498,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, */ if ((walk_state->deferred_node) && (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) - && (arg_index == - (u32) ((walk_state->opcode == - AML_CREATE_FIELD_OP) ? 3 : 2))) { + && (arg_index != 0)) { obj_desc = ACPI_CAST_PTR(union acpi_operand_object, walk_state->deferred_node); @@ -525,7 +521,6 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, && (parent_op->common.aml_opcode != AML_REGION_OP) && (parent_op->common.aml_opcode != AML_INT_NAMEPATH_OP)) { - /* Enter name into namespace if not found */ interpreter_mode = ACPI_IMODE_LOAD_PASS2; @@ -577,7 +572,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state, /* Free the namestring created above */ - ACPI_FREE(name_string); + ACPI_MEM_FREE(name_string); /* Check status from the lookup */ @@ -701,7 +696,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state, union acpi_parse_object *arg; u32 arg_count = 0; - ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg); + ACPI_FUNCTION_TRACE_PTR("ds_create_operands", first_arg); /* For all arguments in the list... */ diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c index d7a616c31..f1af655ff 100644 --- a/drivers/acpi/dispatcher/dswexec.c +++ b/drivers/acpi/dispatcher/dswexec.c @@ -49,6 +49,7 @@ #include #include #include +#include #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME("dswexec") @@ -92,7 +93,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, union acpi_operand_object *obj_desc; union acpi_operand_object *local_obj_desc = NULL; - ACPI_FUNCTION_TRACE_PTR(ds_get_predicate_value, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_get_predicate_value", walk_state); walk_state->control_state->common.state = 0; @@ -122,7 +123,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, if (!obj_desc) { ACPI_ERROR((AE_INFO, - "No predicate ObjDesc=%p State=%p", + "No predicate obj_desc=%p State=%p", obj_desc, walk_state)); return_ACPI_STATUS(AE_AML_NO_OPERAND); @@ -139,7 +140,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, - "Bad predicate (not an integer) ObjDesc=%p State=%p Type=%X", + "Bad predicate (not an integer) obj_desc=%p State=%p Type=%X", obj_desc, walk_state, ACPI_GET_OBJECT_TYPE(obj_desc))); @@ -213,7 +214,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, acpi_status status = AE_OK; u32 opcode_class; - ACPI_FUNCTION_TRACE_PTR(ds_exec_begin_op, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_exec_begin_op", walk_state); op = walk_state->op; if (!op) { @@ -295,7 +296,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, case AML_CLASS_NAMED_OBJECT: - if (walk_state->walk_type & ACPI_WALK_METHOD) { + if (walk_state->walk_type == ACPI_WALK_METHOD) { /* * Found a named object declaration during method execution; * we must enter this object into the namespace. The created @@ -313,10 +314,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state, case AML_CLASS_EXECUTE: case AML_CLASS_CREATE: /* - * Most operators with arguments (except create_xxx_field operators) + * Most operators with arguments. * Start a new result/operand state */ - if (walk_state->op_info->object_type != ACPI_TYPE_BUFFER_FIELD) { + if (walk_state->opcode != AML_CREATE_FIELD_OP) { status = acpi_ds_result_stack_push(walk_state); } break; @@ -353,7 +354,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) union acpi_parse_object *next_op; union acpi_parse_object *first_arg; - ACPI_FUNCTION_TRACE_PTR(ds_exec_end_op, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_exec_end_op", walk_state); op = walk_state->op; op_type = walk_state->op_info->type; @@ -408,7 +409,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) * being the object_type and size_of operators. */ if (!(walk_state->op_info->flags & AML_NO_OPERAND_RESOLVE)) { - /* Resolve all operands */ status = acpi_ex_resolve_operands(walk_state->opcode, @@ -423,7 +423,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) acpi_ps_get_opcode_name (walk_state->opcode), walk_state->num_operands, - "after ExResolveOperands"); + "after ex_resolve_operands"); } } @@ -437,7 +437,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) acpi_gbl_op_type_dispatch[op_type] (walk_state); } else { /* - * Treat constructs of the form "Store(LocalX,LocalX)" as noops when the + * Treat constructs of the form "Store(local_x,local_x)" as noops when the * Local is uninitialized. */ if ((status == AE_AML_UNINITIALIZED_LOCAL) && @@ -472,6 +472,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) acpi_ds_result_push(walk_state->result_obj, walk_state); } + break; default: @@ -509,7 +510,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Method Reference in a Package, Op=%p\n", op)); - op->common.node = (struct acpi_namespace_node *)op->asl.value. arg->asl.node->object; @@ -548,7 +548,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) */ status = acpi_ds_resolve_operands(walk_state); if (ACPI_FAILURE(status)) { - /* On error, clear all resolved operands */ acpi_ds_clear_operands(walk_state); @@ -570,7 +569,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) case AML_TYPE_CREATE_FIELD: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Executing CreateField Buffer/Index Op=%p\n", + "Executing create_field Buffer/Index Op=%p\n", op)); status = acpi_ds_load2_end_op(walk_state); @@ -585,7 +584,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) case AML_TYPE_CREATE_OBJECT: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Executing CreateObject (Buffer/Package) Op=%p\n", + "Executing create_object (Buffer/Package) Op=%p\n", op)); switch (op->common.parent->common.aml_opcode) { @@ -658,7 +657,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) if (op->common.aml_opcode == AML_REGION_OP) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Executing OpRegion Address/Length Op=%p\n", + "Executing op_region Address/Length Op=%p\n", op)); status = @@ -670,6 +669,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) status = acpi_ds_result_stack_pop(walk_state); } + break; case AML_TYPE_UNDEFINED: @@ -707,6 +707,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) * Check if we just completed the evaluation of a * conditional predicate */ + if ((ACPI_SUCCESS(status)) && (walk_state->control_state) && (walk_state->control_state->common.state == @@ -721,7 +722,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) cleanup: if (walk_state->result_obj) { - /* Break to debugger to display result */ ACPI_DEBUGGER_EXEC(acpi_db_display_result_object diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index e3ca7f653..d3d24da31 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c @@ -127,7 +127,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, char *path; u32 flags; - ACPI_FUNCTION_TRACE(ds_load1_begin_op); + ACPI_FUNCTION_TRACE("ds_load1_begin_op"); op = walk_state->op; ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Op=%p State=%p\n", op, @@ -175,15 +175,15 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, if (status == AE_NOT_FOUND) { /* * Table disassembly: - * Target of Scope() not found. Generate an External for it, and + * Target of Scope() not found. Generate an External for it, and * insert the name into the namespace. */ - acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0); + acpi_dm_add_to_external_list(path); status = acpi_ns_lookup(walk_state->scope_info, path, object_type, ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, walk_state, - &node); + &(node)); } #endif if (ACPI_FAILURE(status)) { @@ -210,15 +210,16 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, case ACPI_TYPE_BUFFER: /* - * These types we will allow, but we will change the type. This + * These types we will allow, but we will change the type. This * enables some existing code of the form: * * Name (DEB, 0) * Scope (DEB) { ... } * - * Note: silently change the type here. On the second pass, we will report + * Note: silently change the type here. On the second pass, we will report * a warning */ + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n", path, @@ -241,6 +242,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, break; default: + /* * For all other named opcodes, we will enter the name into * the namespace. @@ -257,8 +259,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, * buffer_field, or Package), the name of the object is already * in the namespace. */ - if (walk_state->deferred_node) { + if (walk_state->deferred_node) { /* This name is already in the namespace, get the node */ node = walk_state->deferred_node; @@ -290,49 +292,18 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, } /* - * Enter the named type into the internal namespace. We enter the name - * as we go downward in the parse tree. Any necessary subobjects that + * Enter the named type into the internal namespace. We enter the name + * as we go downward in the parse tree. Any necessary subobjects that * involve arguments to the opcode must be created as we go back up the * parse tree later. */ status = acpi_ns_lookup(walk_state->scope_info, path, object_type, ACPI_IMODE_LOAD_PASS1, flags, walk_state, - &node); + &(node)); if (ACPI_FAILURE(status)) { - if (status == AE_ALREADY_EXISTS) { - - /* The name already exists in this scope */ - - if (node->flags & ANOBJ_IS_EXTERNAL) { - /* - * Allow one create on an object or segment that was - * previously declared External - */ - node->flags &= ~ANOBJ_IS_EXTERNAL; - node->type = (u8) object_type; - - /* Just retyped a node, probably will need to open a scope */ - - if (acpi_ns_opens_scope(object_type)) { - status = - acpi_ds_scope_stack_push - (node, object_type, - walk_state); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS - (status); - } - } - - status = AE_OK; - } - } - - if (ACPI_FAILURE(status)) { - ACPI_ERROR_NAMESPACE(path, status); - return_ACPI_STATUS(status); - } + ACPI_ERROR_NAMESPACE(path, status); + return_ACPI_STATUS(status); } break; } @@ -340,7 +311,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, /* Common exit */ if (!op) { - /* Create a new op */ op = acpi_ps_alloc_op(walk_state->opcode); @@ -389,7 +359,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) acpi_object_type object_type; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ds_load1_end_op); + ACPI_FUNCTION_TRACE("ds_load1_end_op"); op = walk_state->op; ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Op=%p State=%p\n", op, @@ -431,13 +401,9 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) status = acpi_ex_create_region(op->named.data, op->named.length, - (acpi_adr_space_type) ((op-> - common. - value. - arg)-> - common. - value. - integer), + (acpi_adr_space_type) + ((op->common.value.arg)-> + common.value.integer), walk_state); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -447,7 +413,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) #endif if (op->common.aml_opcode == AML_NAME_OP) { - /* For Name opcode, get the object type from the argument */ if (op->common.value.arg) { @@ -475,12 +440,12 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) * method_op pkg_length name_string method_flags term_list * * Note: We must create the method node/object pair as soon as we - * see the method declaration. This allows later pass1 parsing + * see the method declaration. This allows later pass1 parsing * of invocations of the method (need to know the number of * arguments.) */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "LOADING-Method: State=%p Op=%p NamedObj=%p\n", + "LOADING-Method: State=%p Op=%p named_obj=%p\n", walk_state, op, op->named.node)); if (!acpi_ns_get_attached_object(op->named.node)) { @@ -500,7 +465,6 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) length, walk_state); } - walk_state->operands[0] = NULL; walk_state->num_operands = 0; @@ -547,7 +511,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, acpi_object_type object_type; char *buffer_ptr; - ACPI_FUNCTION_TRACE(ds_load2_begin_op); + ACPI_FUNCTION_TRACE("ds_load2_begin_op"); op = walk_state->op; ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Op=%p State=%p\n", op, @@ -557,7 +521,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, if ((walk_state->control_state) && (walk_state->control_state->common.state == ACPI_CONTROL_CONDITIONAL_EXECUTING)) { - /* We are executing a while loop outside of a method */ status = acpi_ds_exec_begin_op(walk_state, out_op); @@ -572,6 +535,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, #ifdef ACPI_ENABLE_MODULE_LEVEL_CODE if ((walk_state->op_info->class == AML_CLASS_EXECUTE) || (walk_state->op_info->class == AML_CLASS_CONTROL)) { + ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Begin/EXEC: %s (fl %8.8X)\n", walk_state->op_info->name, @@ -590,12 +554,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, /* Get the name we are going to enter or lookup in the namespace */ if (walk_state->opcode == AML_INT_NAMEPATH_OP) { - /* For Namepath op, get the path string */ buffer_ptr = op->common.value.string; if (!buffer_ptr) { - /* No name, just exit */ return_ACPI_STATUS(AE_OK); @@ -603,7 +565,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, } else { /* Get name from the op */ - buffer_ptr = ACPI_CAST_PTR(char, &op->named.name); + buffer_ptr = (char *)&op->named.name; } } else { /* Get the namestring from the raw AML */ @@ -630,6 +592,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, break; case AML_INT_NAMEPATH_OP: + /* * The name_path is an object reference to an existing object. * Don't enter the name into the namespace, but look it up @@ -642,6 +605,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, break; case AML_SCOPE_OP: + /* * The Path is an object reference to an existing object. * Don't enter the name into the namespace, but look it up @@ -663,7 +627,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, #endif return_ACPI_STATUS(status); } - /* * We must check to make sure that the target is * one of the opcodes that actually opens a scope @@ -683,12 +646,13 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, case ACPI_TYPE_BUFFER: /* - * These types we will allow, but we will change the type. This + * These types we will allow, but we will change the type. This * enables some existing code of the form: * * Name (DEB, 0) * Scope (DEB) { ... } */ + ACPI_WARNING((AE_INFO, "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)", buffer_ptr, @@ -716,7 +680,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, /* All other opcodes */ if (op && op->common.node) { - /* This op/node was previously entered into the namespace */ node = op->common.node; @@ -728,21 +691,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - } + } return_ACPI_STATUS(AE_OK); } /* - * Enter the named type into the internal namespace. We enter the name - * as we go downward in the parse tree. Any necessary subobjects that + * Enter the named type into the internal namespace. We enter the name + * as we go downward in the parse tree. Any necessary subobjects that * involve arguments to the opcode must be created as we go back up the * parse tree later. * * Note: Name may already exist if we are executing a deferred opcode. */ if (walk_state->deferred_node) { - /* This name is already in the namespace, get the node */ node = walk_state->deferred_node; @@ -765,7 +727,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, } if (!op) { - /* Create a new op */ op = acpi_ps_alloc_op(walk_state->opcode); @@ -786,6 +747,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, * can get it again quickly when this scope is closed */ op->common.node = node; + return_ACPI_STATUS(status); } @@ -814,7 +776,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) u32 i; #endif - ACPI_FUNCTION_TRACE(ds_load2_end_op); + ACPI_FUNCTION_TRACE("ds_load2_end_op"); op = walk_state->op; ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Opcode [%s] Op %p State %p\n", @@ -908,7 +870,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "Create-Load [%s] State=%p Op=%p NamedObj=%p\n", + "Create-Load [%s] State=%p Op=%p named_obj=%p\n", acpi_ps_get_opcode_name(op->common.aml_opcode), walk_state, op, node)); @@ -920,6 +882,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) #ifndef ACPI_NO_METHOD_EXECUTION case AML_TYPE_CREATE_FIELD: + /* * Create the field object, but the field buffer and index must * be evaluated later during the execution phase @@ -928,6 +891,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) break; case AML_TYPE_NAMED_FIELD: + /* * If we are executing a method, initialize the field */ @@ -1047,7 +1011,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) * argument is the space_id. (We must save the address of the * AML of the address and length operands) */ - /* * If we have a valid region, initialize it * Namespace is NOT locked at this point. @@ -1077,12 +1040,12 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) * method_op pkg_length name_string method_flags term_list * * Note: We must create the method node/object pair as soon as we - * see the method declaration. This allows later pass1 parsing + * see the method declaration. This allows later pass1 parsing * of invocations of the method (need to know the number of * arguments.) */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "LOADING-Method: State=%p Op=%p NamedObj=%p\n", + "LOADING-Method: State=%p Op=%p named_obj=%p\n", walk_state, op, op->named.node)); if (!acpi_ns_get_attached_object(op->named.node)) { @@ -1127,7 +1090,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) case AML_CLASS_METHOD_CALL: ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n", + "RESOLVING-method_call: State=%p Op=%p named_obj=%p\n", walk_state, op, node)); /* @@ -1141,6 +1104,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) ACPI_NS_DONT_OPEN_SCOPE, walk_state, &(new_node)); if (ACPI_SUCCESS(status)) { + /* * Make sure that what we found is indeed a method * We didn't search for a method on purpose, to see if the name diff --git a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c index c9228972f..ada21ef4a 100644 --- a/drivers/acpi/dispatcher/dswscope.c +++ b/drivers/acpi/dispatcher/dswscope.c @@ -63,10 +63,9 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state) { union acpi_generic_state *scope_info; - ACPI_FUNCTION_NAME(ds_scope_stack_clear); + ACPI_FUNCTION_NAME("ds_scope_stack_clear"); while (walk_state->scope_info) { - /* Pop a scope off the stack */ scope_info = walk_state->scope_info; @@ -103,10 +102,9 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node, union acpi_generic_state *scope_info; union acpi_generic_state *old_scope_info; - ACPI_FUNCTION_TRACE(ds_scope_stack_push); + ACPI_FUNCTION_TRACE("ds_scope_stack_push"); if (!node) { - /* Invalid scope */ ACPI_ERROR((AE_INFO, "Null scope parameter")); @@ -128,7 +126,7 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node, /* Init new scope object */ - scope_info->common.descriptor_type = ACPI_DESC_TYPE_STATE_WSCOPE; + scope_info->common.data_type = ACPI_DESC_TYPE_STATE_WSCOPE; scope_info->scope.node = node; scope_info->common.value = (u16) type; @@ -178,7 +176,7 @@ acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state) union acpi_generic_state *scope_info; union acpi_generic_state *new_scope_info; - ACPI_FUNCTION_TRACE(ds_scope_stack_pop); + ACPI_FUNCTION_TRACE("ds_scope_stack_pop"); /* * Pop scope info object off the stack. diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c index 7817e5522..fa78cb74e 100644 --- a/drivers/acpi/dispatcher/dswstate.c +++ b/drivers/acpi/dispatcher/dswstate.c @@ -66,6 +66,7 @@ void *acpi_ds_obj_stack_get_value(u32 index, #endif #ifdef ACPI_FUTURE_USAGE + /******************************************************************************* * * FUNCTION: acpi_ds_result_remove @@ -87,7 +88,7 @@ acpi_ds_result_remove(union acpi_operand_object **object, { union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_remove); + ACPI_FUNCTION_NAME("ds_result_remove"); state = walk_state->results; if (!state) { @@ -127,6 +128,7 @@ acpi_ds_result_remove(union acpi_operand_object **object, return (AE_OK); } + #endif /* ACPI_FUTURE_USAGE */ /******************************************************************************* @@ -150,7 +152,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object, acpi_native_uint index; union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_pop); + ACPI_FUNCTION_NAME("ds_result_pop"); state = walk_state->results; if (!state) { @@ -168,7 +170,6 @@ acpi_ds_result_pop(union acpi_operand_object ** object, state->results.num_results--; for (index = ACPI_OBJ_NUM_OPERANDS; index; index--) { - /* Check for a valid result object */ if (state->results.obj_desc[index - 1]) { @@ -212,7 +213,7 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object, acpi_native_uint index; union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_pop_from_bottom); + ACPI_FUNCTION_NAME("ds_result_pop_from_bottom"); state = walk_state->results; if (!state) { @@ -277,7 +278,7 @@ acpi_ds_result_push(union acpi_operand_object * object, { union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_push); + ACPI_FUNCTION_NAME("ds_result_push"); state = walk_state->results; if (!state) { @@ -330,14 +331,14 @@ acpi_status acpi_ds_result_stack_push(struct acpi_walk_state * walk_state) { union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_stack_push); + ACPI_FUNCTION_NAME("ds_result_stack_push"); state = acpi_ut_create_generic_state(); if (!state) { return (AE_NO_MEMORY); } - state->common.descriptor_type = ACPI_DESC_TYPE_STATE_RESULT; + state->common.data_type = ACPI_DESC_TYPE_STATE_RESULT; acpi_ut_push_generic_state(&walk_state->results, state); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Results=%p State=%p\n", @@ -362,7 +363,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state) { union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_stack_pop); + ACPI_FUNCTION_NAME("ds_result_stack_pop"); /* Check for stack underflow */ @@ -375,7 +376,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state) state = acpi_ut_pop_generic_state(&walk_state->results); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Result=%p RemainingResults=%X State=%p\n", + "Result=%p remaining_results=%X State=%p\n", state, state->results.num_results, walk_state)); acpi_ut_delete_generic_state(state); @@ -399,7 +400,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state) acpi_status acpi_ds_obj_stack_push(void *object, struct acpi_walk_state * walk_state) { - ACPI_FUNCTION_NAME(ds_obj_stack_push); + ACPI_FUNCTION_NAME("ds_obj_stack_push"); /* Check for stack overflow */ @@ -444,10 +445,9 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state) { u32 i; - ACPI_FUNCTION_NAME(ds_obj_stack_pop); + ACPI_FUNCTION_NAME("ds_obj_stack_pop"); for (i = 0; i < pop_count; i++) { - /* Check for stack underflow */ if (walk_state->num_operands == 0) { @@ -491,10 +491,9 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count, u32 i; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_NAME(ds_obj_stack_pop_and_delete); + ACPI_FUNCTION_NAME("ds_obj_stack_pop_and_delete"); for (i = 0; i < pop_count; i++) { - /* Check for stack underflow */ if (walk_state->num_operands == 0) { @@ -539,13 +538,13 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count, struct acpi_walk_state *acpi_ds_get_current_walk_state(struct acpi_thread_state *thread) { - ACPI_FUNCTION_NAME(ds_get_current_walk_state); + ACPI_FUNCTION_NAME("ds_get_current_walk_state"); if (!thread) { return (NULL); } - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "Current WalkState %p\n", + ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "Current walk_state %p\n", thread->walk_state_list)); return (thread->walk_state_list); @@ -568,7 +567,7 @@ void acpi_ds_push_walk_state(struct acpi_walk_state *walk_state, struct acpi_thread_state *thread) { - ACPI_FUNCTION_TRACE(ds_push_walk_state); + ACPI_FUNCTION_TRACE("ds_push_walk_state"); walk_state->next = thread->walk_state_list; thread->walk_state_list = walk_state; @@ -594,12 +593,11 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread) { struct acpi_walk_state *walk_state; - ACPI_FUNCTION_TRACE(ds_pop_walk_state); + ACPI_FUNCTION_TRACE("ds_pop_walk_state"); walk_state = thread->walk_state_list; if (walk_state) { - /* Next walk state becomes the current walk state */ thread->walk_state_list = walk_state->next; @@ -620,7 +618,7 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread) * * PARAMETERS: owner_id - ID for object creation * Origin - Starting point for this walk - * method_desc - Method object + * mth_desc - Method object * Thread - Current thread state * * RETURN: Pointer to the new walk state. @@ -634,24 +632,24 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, union acpi_parse_object *origin, union acpi_operand_object - *method_desc, + *mth_desc, struct acpi_thread_state *thread) { struct acpi_walk_state *walk_state; acpi_status status; - ACPI_FUNCTION_TRACE(ds_create_walk_state); + ACPI_FUNCTION_TRACE("ds_create_walk_state"); - walk_state = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_walk_state)); + walk_state = ACPI_MEM_CALLOCATE(sizeof(struct acpi_walk_state)); if (!walk_state) { return_PTR(NULL); } - walk_state->descriptor_type = ACPI_DESC_TYPE_WALK; - walk_state->method_desc = method_desc; + walk_state->data_type = ACPI_DESC_TYPE_WALK; walk_state->owner_id = owner_id; walk_state->origin = origin; + walk_state->method_desc = mth_desc; walk_state->thread = thread; walk_state->parser_state.start_op = origin; @@ -666,7 +664,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id, status = acpi_ds_result_stack_push(walk_state); if (ACPI_FAILURE(status)) { - ACPI_FREE(walk_state); + ACPI_MEM_FREE(walk_state); return_PTR(NULL); } @@ -703,13 +701,13 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, struct acpi_namespace_node *method_node, u8 * aml_start, u32 aml_length, - struct acpi_evaluate_info *info, u8 pass_number) + struct acpi_parameter_info *info, u8 pass_number) { acpi_status status; struct acpi_parse_state *parser_state = &walk_state->parser_state; union acpi_parse_object *extra_op; - ACPI_FUNCTION_TRACE(ds_init_aml_walk); + ACPI_FUNCTION_TRACE("ds_init_aml_walk"); walk_state->parser_state.aml = walk_state->parser_state.aml_start = aml_start; @@ -780,7 +778,6 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, } if (parser_state->start_node) { - /* Push start scope on scope stack and make it current */ status = @@ -813,24 +810,21 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE_PTR(ds_delete_walk_state, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_delete_walk_state", walk_state); if (!walk_state) { return; } - if (walk_state->descriptor_type != ACPI_DESC_TYPE_WALK) { + if (walk_state->data_type != ACPI_DESC_TYPE_WALK) { ACPI_ERROR((AE_INFO, "%p is not a valid walk state", walk_state)); return; } - /* There should not be any open scopes */ - if (walk_state->parser_state.scope) { ACPI_ERROR((AE_INFO, "%p walk still has a scope list", walk_state)); - acpi_ps_cleanup_scope(&walk_state->parser_state); } /* Always must free any linked control states */ @@ -860,7 +854,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state) acpi_ut_delete_generic_state(state); } - ACPI_FREE(walk_state); + ACPI_MEM_FREE(walk_state); return_VOID; } @@ -885,7 +879,7 @@ acpi_ds_result_insert(void *object, { union acpi_generic_state *state; - ACPI_FUNCTION_NAME(ds_result_insert); + ACPI_FUNCTION_NAME("ds_result_insert"); state = walk_state->results; if (!state) { @@ -943,7 +937,7 @@ acpi_status acpi_ds_obj_stack_delete_all(struct acpi_walk_state * walk_state) { u32 i; - ACPI_FUNCTION_TRACE_PTR(ds_obj_stack_delete_all, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_obj_stack_delete_all", walk_state); /* The stack size is configurable, but fixed */ @@ -975,7 +969,7 @@ acpi_status acpi_ds_obj_stack_pop_object(union acpi_operand_object **object, struct acpi_walk_state *walk_state) { - ACPI_FUNCTION_NAME(ds_obj_stack_pop_object); + ACPI_FUNCTION_NAME("ds_obj_stack_pop_object"); /* Check for stack underflow */ @@ -1031,7 +1025,7 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object, void *acpi_ds_obj_stack_get_value(u32 index, struct acpi_walk_state *walk_state) { - ACPI_FUNCTION_TRACE_PTR(ds_obj_stack_get_value, walk_state); + ACPI_FUNCTION_TRACE_PTR("ds_obj_stack_get_value", walk_state); /* Can't do it if the stack is empty */ diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c deleted file mode 100644 index 578b99b71..000000000 --- a/drivers/acpi/dock.c +++ /dev/null @@ -1,739 +0,0 @@ -/* - * dock.c - ACPI dock station driver - * - * Copyright (C) 2006 Kristen Carlson Accardi - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ - -#include -#include -#include -#include -#include -#include -#include - -#define ACPI_DOCK_DRIVER_NAME "ACPI Dock Station Driver" - -ACPI_MODULE_NAME("dock") -MODULE_AUTHOR("Kristen Carlson Accardi"); -MODULE_DESCRIPTION(ACPI_DOCK_DRIVER_NAME); -MODULE_LICENSE("GPL"); - -static struct atomic_notifier_head dock_notifier_list; - -struct dock_station { - acpi_handle handle; - unsigned long last_dock_time; - u32 flags; - spinlock_t dd_lock; - spinlock_t hp_lock; - struct list_head dependent_devices; - struct list_head hotplug_devices; -}; - -struct dock_dependent_device { - struct list_head list; - struct list_head hotplug_list; - acpi_handle handle; - acpi_notify_handler handler; - void *context; -}; - -#define DOCK_DOCKING 0x00000001 -#define DOCK_EVENT 3 -#define UNDOCK_EVENT 2 - -static struct dock_station *dock_station; - -/***************************************************************************** - * Dock Dependent device functions * - *****************************************************************************/ -/** - * alloc_dock_dependent_device - allocate and init a dependent device - * @handle: the acpi_handle of the dependent device - * - * Allocate memory for a dependent device structure for a device referenced - * by the acpi handle - */ -static struct dock_dependent_device * -alloc_dock_dependent_device(acpi_handle handle) -{ - struct dock_dependent_device *dd; - - dd = kzalloc(sizeof(*dd), GFP_KERNEL); - if (dd) { - dd->handle = handle; - INIT_LIST_HEAD(&dd->list); - INIT_LIST_HEAD(&dd->hotplug_list); - } - return dd; -} - -/** - * add_dock_dependent_device - associate a device with the dock station - * @ds: The dock station - * @dd: The dependent device - * - * Add the dependent device to the dock's dependent device list. - */ -static void -add_dock_dependent_device(struct dock_station *ds, - struct dock_dependent_device *dd) -{ - spin_lock(&ds->dd_lock); - list_add_tail(&dd->list, &ds->dependent_devices); - spin_unlock(&ds->dd_lock); -} - -/** - * dock_add_hotplug_device - associate a hotplug handler with the dock station - * @ds: The dock station - * @dd: The dependent device struct - * - * Add the dependent device to the dock's hotplug device list - */ -static void -dock_add_hotplug_device(struct dock_station *ds, - struct dock_dependent_device *dd) -{ - spin_lock(&ds->hp_lock); - list_add_tail(&dd->hotplug_list, &ds->hotplug_devices); - spin_unlock(&ds->hp_lock); -} - -/** - * dock_del_hotplug_device - remove a hotplug handler from the dock station - * @ds: The dock station - * @dd: the dependent device struct - * - * Delete the dependent device from the dock's hotplug device list - */ -static void -dock_del_hotplug_device(struct dock_station *ds, - struct dock_dependent_device *dd) -{ - spin_lock(&ds->hp_lock); - list_del(&dd->hotplug_list); - spin_unlock(&ds->hp_lock); -} - -/** - * find_dock_dependent_device - get a device dependent on this dock - * @ds: the dock station - * @handle: the acpi_handle of the device we want - * - * iterate over the dependent device list for this dock. If the - * dependent device matches the handle, return. - */ -static struct dock_dependent_device * -find_dock_dependent_device(struct dock_station *ds, acpi_handle handle) -{ - struct dock_dependent_device *dd; - - spin_lock(&ds->dd_lock); - list_for_each_entry(dd, &ds->dependent_devices, list) { - if (handle == dd->handle) { - spin_unlock(&ds->dd_lock); - return dd; - } - } - spin_unlock(&ds->dd_lock); - return NULL; -} - -/***************************************************************************** - * Dock functions * - *****************************************************************************/ -/** - * is_dock - see if a device is a dock station - * @handle: acpi handle of the device - * - * If an acpi object has a _DCK method, then it is by definition a dock - * station, so return true. - */ -static int is_dock(acpi_handle handle) -{ - acpi_status status; - acpi_handle tmp; - - status = acpi_get_handle(handle, "_DCK", &tmp); - if (ACPI_FAILURE(status)) - return 0; - return 1; -} - -/** - * is_dock_device - see if a device is on a dock station - * @handle: acpi handle of the device - * - * If this device is either the dock station itself, - * or is a device dependent on the dock station, then it - * is a dock device - */ -int is_dock_device(acpi_handle handle) -{ - if (!dock_station) - return 0; - - if (is_dock(handle) || find_dock_dependent_device(dock_station, handle)) - return 1; - - return 0; -} - -EXPORT_SYMBOL_GPL(is_dock_device); - -/** - * dock_present - see if the dock station is present. - * @ds: the dock station - * - * execute the _STA method. note that present does not - * imply that we are docked. - */ -static int dock_present(struct dock_station *ds) -{ - unsigned long sta; - acpi_status status; - - if (ds) { - status = acpi_evaluate_integer(ds->handle, "_STA", NULL, &sta); - if (ACPI_SUCCESS(status) && sta) - return 1; - } - return 0; -} - - - -/** - * dock_create_acpi_device - add new devices to acpi - * @handle - handle of the device to add - * - * This function will create a new acpi_device for the given - * handle if one does not exist already. This should cause - * acpi to scan for drivers for the given devices, and call - * matching driver's add routine. - * - * Returns a pointer to the acpi_device corresponding to the handle. - */ -static struct acpi_device * dock_create_acpi_device(acpi_handle handle) -{ - struct acpi_device *device = NULL; - struct acpi_device *parent_device; - acpi_handle parent; - int ret; - - if (acpi_bus_get_device(handle, &device)) { - /* - * no device created for this object, - * so we should create one. - */ - acpi_get_parent(handle, &parent); - if (acpi_bus_get_device(parent, &parent_device)) - parent_device = NULL; - - ret = acpi_bus_add(&device, parent_device, handle, - ACPI_BUS_TYPE_DEVICE); - if (ret) { - pr_debug("error adding bus, %x\n", - -ret); - return NULL; - } - } - return device; -} - -/** - * dock_remove_acpi_device - remove the acpi_device struct from acpi - * @handle - the handle of the device to remove - * - * Tell acpi to remove the acpi_device. This should cause any loaded - * driver to have it's remove routine called. - */ -static void dock_remove_acpi_device(acpi_handle handle) -{ - struct acpi_device *device; - int ret; - - if (!acpi_bus_get_device(handle, &device)) { - ret = acpi_bus_trim(device, 1); - if (ret) - pr_debug("error removing bus, %x\n", -ret); - } -} - - -/** - * hotplug_dock_devices - insert or remove devices on the dock station - * @ds: the dock station - * @event: either bus check or eject request - * - * Some devices on the dock station need to have drivers called - * to perform hotplug operations after a dock event has occurred. - * Traverse the list of dock devices that have registered a - * hotplug handler, and call the handler. - */ -static void hotplug_dock_devices(struct dock_station *ds, u32 event) -{ - struct dock_dependent_device *dd; - - spin_lock(&ds->hp_lock); - - /* - * First call driver specific hotplug functions - */ - list_for_each_entry(dd, &ds->hotplug_devices, hotplug_list) { - if (dd->handler) - dd->handler(dd->handle, event, dd->context); - } - - /* - * Now make sure that an acpi_device is created for each - * dependent device, or removed if this is an eject request. - * This will cause acpi_drivers to be stopped/started if they - * exist - */ - list_for_each_entry(dd, &ds->dependent_devices, list) { - if (event == ACPI_NOTIFY_EJECT_REQUEST) - dock_remove_acpi_device(dd->handle); - else - dock_create_acpi_device(dd->handle); - } - spin_unlock(&ds->hp_lock); -} - -static void dock_event(struct dock_station *ds, u32 event, int num) -{ - /* - * we don't do events until someone tells me that - * they would like to have them. - */ -} - -/** - * eject_dock - respond to a dock eject request - * @ds: the dock station - * - * This is called after _DCK is called, to execute the dock station's - * _EJ0 method. - */ -static void eject_dock(struct dock_station *ds) -{ - struct acpi_object_list arg_list; - union acpi_object arg; - acpi_status status; - acpi_handle tmp; - - /* all dock devices should have _EJ0, but check anyway */ - status = acpi_get_handle(ds->handle, "_EJ0", &tmp); - if (ACPI_FAILURE(status)) { - pr_debug("No _EJ0 support for dock device\n"); - return; - } - - arg_list.count = 1; - arg_list.pointer = &arg; - arg.type = ACPI_TYPE_INTEGER; - arg.integer.value = 1; - - if (ACPI_FAILURE(acpi_evaluate_object(ds->handle, "_EJ0", - &arg_list, NULL))) - pr_debug("Failed to evaluate _EJ0!\n"); -} - -/** - * handle_dock - handle a dock event - * @ds: the dock station - * @dock: to dock, or undock - that is the question - * - * Execute the _DCK method in response to an acpi event - */ -static void handle_dock(struct dock_station *ds, int dock) -{ - acpi_status status; - struct acpi_object_list arg_list; - union acpi_object arg; - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; - struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; - union acpi_object *obj; - - acpi_get_name(ds->handle, ACPI_FULL_PATHNAME, &name_buffer); - obj = name_buffer.pointer; - - printk(KERN_INFO PREFIX "%s\n", dock ? "docking" : "undocking"); - - /* _DCK method has one argument */ - arg_list.count = 1; - arg_list.pointer = &arg; - arg.type = ACPI_TYPE_INTEGER; - arg.integer.value = dock; - status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer); - if (ACPI_FAILURE(status)) - pr_debug("%s: failed to execute _DCK\n", obj->string.pointer); - kfree(buffer.pointer); - kfree(name_buffer.pointer); -} - -static inline void dock(struct dock_station *ds) -{ - handle_dock(ds, 1); -} - -static inline void undock(struct dock_station *ds) -{ - handle_dock(ds, 0); -} - -static inline void begin_dock(struct dock_station *ds) -{ - ds->flags |= DOCK_DOCKING; -} - -static inline void complete_dock(struct dock_station *ds) -{ - ds->flags &= ~(DOCK_DOCKING); - ds->last_dock_time = jiffies; -} - -/** - * dock_in_progress - see if we are in the middle of handling a dock event - * @ds: the dock station - * - * Sometimes while docking, false dock events can be sent to the driver - * because good connections aren't made or some other reason. Ignore these - * if we are in the middle of doing something. - */ -static int dock_in_progress(struct dock_station *ds) -{ - if ((ds->flags & DOCK_DOCKING) || - time_before(jiffies, (ds->last_dock_time + HZ))) - return 1; - return 0; -} - -/** - * register_dock_notifier - add yourself to the dock notifier list - * @nb: the callers notifier block - * - * If a driver wishes to be notified about dock events, they can - * use this function to put a notifier block on the dock notifier list. - * this notifier call chain will be called after a dock event, but - * before hotplugging any new devices. - */ -int register_dock_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_register(&dock_notifier_list, nb); -} - -EXPORT_SYMBOL_GPL(register_dock_notifier); - -/** - * unregister_dock_notifier - remove yourself from the dock notifier list - * @nb: the callers notifier block - */ -void unregister_dock_notifier(struct notifier_block *nb) -{ - atomic_notifier_chain_unregister(&dock_notifier_list, nb); -} - -EXPORT_SYMBOL_GPL(unregister_dock_notifier); - -/** - * register_hotplug_dock_device - register a hotplug function - * @handle: the handle of the device - * @handler: the acpi_notifier_handler to call after docking - * @context: device specific data - * - * If a driver would like to perform a hotplug operation after a dock - * event, they can register an acpi_notifiy_handler to be called by - * the dock driver after _DCK is executed. - */ -int -register_hotplug_dock_device(acpi_handle handle, acpi_notify_handler handler, - void *context) -{ - struct dock_dependent_device *dd; - - if (!dock_station) - return -ENODEV; - - /* - * make sure this handle is for a device dependent on the dock, - * this would include the dock station itself - */ - dd = find_dock_dependent_device(dock_station, handle); - if (dd) { - dd->handler = handler; - dd->context = context; - dock_add_hotplug_device(dock_station, dd); - return 0; - } - - return -EINVAL; -} - -EXPORT_SYMBOL_GPL(register_hotplug_dock_device); - -/** - * unregister_hotplug_dock_device - remove yourself from the hotplug list - * @handle: the acpi handle of the device - */ -void unregister_hotplug_dock_device(acpi_handle handle) -{ - struct dock_dependent_device *dd; - - if (!dock_station) - return; - - dd = find_dock_dependent_device(dock_station, handle); - if (dd) - dock_del_hotplug_device(dock_station, dd); -} - -EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device); - -/** - * dock_notify - act upon an acpi dock notification - * @handle: the dock station handle - * @event: the acpi event - * @data: our driver data struct - * - * If we are notified to dock, then check to see if the dock is - * present and then dock. Notify all drivers of the dock event, - * and then hotplug and devices that may need hotplugging. For undock - * check to make sure the dock device is still present, then undock - * and hotremove all the devices that may need removing. - */ -static void dock_notify(acpi_handle handle, u32 event, void *data) -{ - struct dock_station *ds = (struct dock_station *)data; - - switch (event) { - case ACPI_NOTIFY_BUS_CHECK: - if (!dock_in_progress(ds) && dock_present(ds)) { - begin_dock(ds); - dock(ds); - if (!dock_present(ds)) { - printk(KERN_ERR PREFIX "Unable to dock!\n"); - break; - } - atomic_notifier_call_chain(&dock_notifier_list, - event, NULL); - hotplug_dock_devices(ds, event); - complete_dock(ds); - dock_event(ds, event, DOCK_EVENT); - } - break; - case ACPI_NOTIFY_DEVICE_CHECK: - /* - * According to acpi spec 3.0a, if a DEVICE_CHECK notification - * is sent and _DCK is present, it is assumed to mean an - * undock request. This notify routine will only be called - * for objects defining _DCK, so we will fall through to eject - * request here. However, we will pass an eject request through - * to the driver who wish to hotplug. - */ - case ACPI_NOTIFY_EJECT_REQUEST: - if (!dock_in_progress(ds) && dock_present(ds)) { - /* - * here we need to generate the undock - * event prior to actually doing the undock - * so that the device struct still exists. - */ - dock_event(ds, event, UNDOCK_EVENT); - hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); - undock(ds); - eject_dock(ds); - if (dock_present(ds)) - printk(KERN_ERR PREFIX "Unable to undock!\n"); - } - break; - default: - printk(KERN_ERR PREFIX "Unknown dock event %d\n", event); - } -} - -/** - * find_dock_devices - find devices on the dock station - * @handle: the handle of the device we are examining - * @lvl: unused - * @context: the dock station private data - * @rv: unused - * - * This function is called by acpi_walk_namespace. It will - * check to see if an object has an _EJD method. If it does, then it - * will see if it is dependent on the dock station. - */ -static acpi_status -find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv) -{ - acpi_status status; - acpi_handle tmp; - struct dock_station *ds = (struct dock_station *)context; - struct dock_dependent_device *dd; - - status = acpi_bus_get_ejd(handle, &tmp); - if (ACPI_FAILURE(status)) - return AE_OK; - - if (tmp == ds->handle) { - dd = alloc_dock_dependent_device(handle); - if (dd) - add_dock_dependent_device(ds, dd); - } - - return AE_OK; -} - -/** - * dock_add - add a new dock station - * @handle: the dock station handle - * - * allocated and initialize a new dock station device. Find all devices - * that are on the dock station, and register for dock event notifications. - */ -static int dock_add(acpi_handle handle) -{ - int ret; - acpi_status status; - struct dock_dependent_device *dd; - - /* allocate & initialize the dock_station private data */ - dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL); - if (!dock_station) - return -ENOMEM; - dock_station->handle = handle; - dock_station->last_dock_time = jiffies - HZ; - INIT_LIST_HEAD(&dock_station->dependent_devices); - INIT_LIST_HEAD(&dock_station->hotplug_devices); - spin_lock_init(&dock_station->dd_lock); - spin_lock_init(&dock_station->hp_lock); - ATOMIC_INIT_NOTIFIER_HEAD(&dock_notifier_list); - - /* Find dependent devices */ - acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, find_dock_devices, dock_station, - NULL); - - /* add the dock station as a device dependent on itself */ - dd = alloc_dock_dependent_device(handle); - if (!dd) { - kfree(dock_station); - return -ENOMEM; - } - add_dock_dependent_device(dock_station, dd); - - /* register for dock events */ - status = acpi_install_notify_handler(dock_station->handle, - ACPI_SYSTEM_NOTIFY, - dock_notify, dock_station); - - if (ACPI_FAILURE(status)) { - printk(KERN_ERR PREFIX "Error installing notify handler\n"); - ret = -ENODEV; - goto dock_add_err; - } - - printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME); - - return 0; - -dock_add_err: - kfree(dock_station); - kfree(dd); - return ret; -} - -/** - * dock_remove - free up resources related to the dock station - */ -static int dock_remove(void) -{ - struct dock_dependent_device *dd, *tmp; - acpi_status status; - - if (!dock_station) - return 0; - - /* remove dependent devices */ - list_for_each_entry_safe(dd, tmp, &dock_station->dependent_devices, - list) - kfree(dd); - - /* remove dock notify handler */ - status = acpi_remove_notify_handler(dock_station->handle, - ACPI_SYSTEM_NOTIFY, - dock_notify); - if (ACPI_FAILURE(status)) - printk(KERN_ERR "Error removing notify handler\n"); - - /* free dock station memory */ - kfree(dock_station); - return 0; -} - -/** - * find_dock - look for a dock station - * @handle: acpi handle of a device - * @lvl: unused - * @context: counter of dock stations found - * @rv: unused - * - * This is called by acpi_walk_namespace to look for dock stations. - */ -static acpi_status -find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) -{ - int *count = (int *)context; - acpi_status status = AE_OK; - - if (is_dock(handle)) { - if (dock_add(handle) >= 0) { - (*count)++; - status = AE_CTRL_TERMINATE; - } - } - return status; -} - -static int __init dock_init(void) -{ - int num = 0; - - dock_station = NULL; - - /* look for a dock station */ - acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, find_dock, &num, NULL); - - if (!num) - return -ENODEV; - - return 0; -} - -static void __exit dock_exit(void) -{ - dock_remove(); -} - -postcore_initcall(dock_init); -module_exit(dock_exit); diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e5d796362..a8c6a39d1 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -116,7 +116,7 @@ union acpi_ec { struct acpi_generic_address command_addr; struct acpi_generic_address data_addr; unsigned long global_lock; - struct semaphore sem; + spinlock_t lock; } poll; }; @@ -207,15 +207,16 @@ static int acpi_ec_intr_wait(union acpi_ec *ec, unsigned int event) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_ec_wait"); ec->intr.expect_event = event; smp_mb(); switch (event) { case ACPI_EC_EVENT_IBE: - if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) { + if (~acpi_ec_read_status(ec) & event) { ec->intr.expect_event = 0; - return 0; + return_VALUE(0); } break; default: @@ -237,16 +238,16 @@ static int acpi_ec_intr_wait(union acpi_ec *ec, unsigned int event) switch (event) { case ACPI_EC_EVENT_OBF: if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF) - return 0; + return_VALUE(0); break; case ACPI_EC_EVENT_IBE: if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - return 0; + return_VALUE(0); break; } - return -ETIME; + return_VALUE(-ETIME); } #ifdef ACPI_FUTURE_USAGE @@ -259,6 +260,7 @@ int acpi_ec_enter_burst_mode(union acpi_ec *ec) u32 tmp = 0; int status = 0; + ACPI_FUNCTION_TRACE("acpi_ec_enter_burst_mode"); status = acpi_ec_read_status(ec); if (status != -EINVAL && !(status & ACPI_EC_FLAG_BURST)) { @@ -270,21 +272,22 @@ int acpi_ec_enter_burst_mode(union acpi_ec *ec) status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF); acpi_hw_low_level_read(8, &tmp, &ec->common.data_addr); if (tmp != 0x90) { /* Burst ACK byte */ - return -EINVAL; + return_VALUE(-EINVAL); } } atomic_set(&ec->intr.leaving_burst, 0); - return 0; + return_VALUE(0); end: - ACPI_EXCEPTION ((AE_INFO, status, "EC wait, burst mode"); - return -1; + printk(KERN_WARNING PREFIX "Error in acpi_ec_wait\n"); + return_VALUE(-1); } int acpi_ec_leave_burst_mode(union acpi_ec *ec) { int status = 0; + ACPI_FUNCTION_TRACE("acpi_ec_leave_burst_mode"); status = acpi_ec_read_status(ec); if (status != -EINVAL && (status & ACPI_EC_FLAG_BURST)){ @@ -295,10 +298,10 @@ int acpi_ec_leave_burst_mode(union acpi_ec *ec) acpi_ec_wait(ec, ACPI_EC_FLAG_IBF); } atomic_set(&ec->intr.leaving_burst, 1); - return 0; + return_VALUE(0); end: - ACPI_EXCEPTION((AE_INFO, status, "EC leave burst mode"); - return -1; + printk(KERN_WARNING PREFIX "leave burst_mode:error\n"); + return_VALUE(-1); } #endif /* ACPI_FUTURE_USAGE */ @@ -320,25 +323,24 @@ static int acpi_ec_poll_read(union acpi_ec *ec, u8 address, u32 * data) { acpi_status status = AE_OK; int result = 0; + unsigned long flags = 0; u32 glk = 0; + ACPI_FUNCTION_TRACE("acpi_ec_read"); if (!ec || !data) - return -EINVAL; + return_VALUE(-EINVAL); *data = 0; if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } - if (down_interruptible(&ec->poll.sem)) { - result = -ERESTARTSYS; - goto end_nosem; - } - + spin_lock_irqsave(&ec->poll.lock, flags); + acpi_hw_low_level_write(8, ACPI_EC_COMMAND_READ, &ec->common.command_addr); result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBE); @@ -356,35 +358,34 @@ static int acpi_ec_poll_read(union acpi_ec *ec, u8 address, u32 * data) *data, address)); end: - up(&ec->poll.sem); -end_nosem: + spin_unlock_irqrestore(&ec->poll.lock, flags); + if (ec->common.global_lock) acpi_release_global_lock(glk); - return result; + return_VALUE(result); } static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data) { int result = 0; acpi_status status = AE_OK; + unsigned long flags = 0; u32 glk = 0; + ACPI_FUNCTION_TRACE("acpi_ec_write"); if (!ec) - return -EINVAL; + return_VALUE(-EINVAL); if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } - if (down_interruptible(&ec->poll.sem)) { - result = -ERESTARTSYS; - goto end_nosem; - } - + spin_lock_irqsave(&ec->poll.lock, flags); + acpi_hw_low_level_write(8, ACPI_EC_COMMAND_WRITE, &ec->common.command_addr); result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBE); @@ -405,12 +406,12 @@ static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data) data, address)); end: - up(&ec->poll.sem); -end_nosem: + spin_unlock_irqrestore(&ec->poll.lock, flags); + if (ec->common.global_lock) acpi_release_global_lock(glk); - return result; + return_VALUE(result); } static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data) @@ -418,16 +419,17 @@ static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data) int status = 0; u32 glk; + ACPI_FUNCTION_TRACE("acpi_ec_read"); if (!ec || !data) - return -EINVAL; + return_VALUE(-EINVAL); *data = 0; if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } WARN_ON(in_interrupt()); @@ -461,7 +463,7 @@ static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data) if (ec->common.global_lock) acpi_release_global_lock(glk); - return status; + return_VALUE(status); } static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data) @@ -469,14 +471,15 @@ static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data) int status = 0; u32 glk; + ACPI_FUNCTION_TRACE("acpi_ec_write"); if (!ec) - return -EINVAL; + return_VALUE(-EINVAL); if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } WARN_ON(in_interrupt()); @@ -509,7 +512,7 @@ static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data) if (ec->common.global_lock) acpi_release_global_lock(glk); - return status; + return_VALUE(status); } /* @@ -565,18 +568,20 @@ static int acpi_ec_poll_query(union acpi_ec *ec, u32 * data) { int result = 0; acpi_status status = AE_OK; + unsigned long flags = 0; u32 glk = 0; + ACPI_FUNCTION_TRACE("acpi_ec_query"); if (!ec || !data) - return -EINVAL; + return_VALUE(-EINVAL); *data = 0; if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } /* @@ -584,11 +589,8 @@ static int acpi_ec_poll_query(union acpi_ec *ec, u32 * data) * Note that successful completion of the query causes the ACPI_EC_SCI * bit to be cleared (and thus clearing the interrupt source). */ - if (down_interruptible(&ec->poll.sem)) { - result = -ERESTARTSYS; - goto end_nosem; - } - + spin_lock_irqsave(&ec->poll.lock, flags); + acpi_hw_low_level_write(8, ACPI_EC_COMMAND_QUERY, &ec->common.command_addr); result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF); @@ -600,27 +602,28 @@ static int acpi_ec_poll_query(union acpi_ec *ec, u32 * data) result = -ENODATA; end: - up(&ec->poll.sem); -end_nosem: + spin_unlock_irqrestore(&ec->poll.lock, flags); + if (ec->common.global_lock) acpi_release_global_lock(glk); - return result; + return_VALUE(result); } static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data) { int status = 0; u32 glk; + ACPI_FUNCTION_TRACE("acpi_ec_query"); if (!ec || !data) - return -EINVAL; + return_VALUE(-EINVAL); *data = 0; if (ec->common.global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); } down(&ec->intr.sem); @@ -653,7 +656,7 @@ static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data) if (ec->common.global_lock) acpi_release_global_lock(glk); - return status; + return_VALUE(status); } /* -------------------------------------------------------------------------- @@ -677,20 +680,20 @@ static void acpi_ec_gpe_poll_query(void *ec_cxt) { union acpi_ec *ec = (union acpi_ec *)ec_cxt; u32 value = 0; + unsigned long flags = 0; static char object_name[5] = { '_', 'Q', '0', '0', '\0' }; const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + ACPI_FUNCTION_TRACE("acpi_ec_gpe_query"); if (!ec_cxt) goto end; - if (down_interruptible (&ec->poll.sem)) { - return; - } + spin_lock_irqsave(&ec->poll.lock, flags); acpi_hw_low_level_read(8, &value, &ec->common.command_addr); - up(&ec->poll.sem); + spin_unlock_irqrestore(&ec->poll.lock, flags); /* TBD: Implement asynch events! * NOTE: All we care about are EC-SCI's. Other EC events are @@ -724,6 +727,7 @@ static void acpi_ec_gpe_intr_query(void *ec_cxt) '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + ACPI_FUNCTION_TRACE("acpi_ec_gpe_query"); if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI) result = acpi_ec_query(ec, &value); @@ -759,7 +763,8 @@ static u32 acpi_ec_gpe_poll_handler(void *data) acpi_disable_gpe(NULL, ec->common.gpe_bit, ACPI_ISR); - status = acpi_os_execute(OSL_EC_POLL_HANDLER, acpi_ec_gpe_query, ec); + status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, + acpi_ec_gpe_query, ec); if (status == AE_OK) return ACPI_INTERRUPT_HANDLED; @@ -782,22 +787,19 @@ static u32 acpi_ec_gpe_intr_handler(void *data) case ACPI_EC_EVENT_OBF: if (!(value & ACPI_EC_FLAG_OBF)) break; - ec->intr.expect_event = 0; - wake_up(&ec->intr.wait); - break; case ACPI_EC_EVENT_IBE: if ((value & ACPI_EC_FLAG_IBF)) break; ec->intr.expect_event = 0; wake_up(&ec->intr.wait); - break; + return ACPI_INTERRUPT_HANDLED; default: break; } if (value & ACPI_EC_FLAG_SCI) { atomic_add(1, &ec->intr.pending_gpe); - status = acpi_os_execute(OSL_EC_BURST_HANDLER, + status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, acpi_ec_gpe_query, ec); return status == AE_OK ? ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; @@ -838,14 +840,15 @@ acpi_ec_space_handler(u32 function, acpi_integer f_v = 0; int i = 0; + ACPI_FUNCTION_TRACE("acpi_ec_space_handler"); if ((address > 0xFF) || !value || !handler_context) - return AE_BAD_PARAMETER; + return_VALUE(AE_BAD_PARAMETER); if (bit_width != 8 && acpi_strict) { printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n"); - return AE_BAD_PARAMETER; + return_VALUE(AE_BAD_PARAMETER); } ec = (union acpi_ec *)handler_context; @@ -884,16 +887,16 @@ acpi_ec_space_handler(u32 function, out: switch (result) { case -EINVAL: - return AE_BAD_PARAMETER; + return_VALUE(AE_BAD_PARAMETER); break; case -ENODEV: - return AE_NOT_FOUND; + return_VALUE(AE_NOT_FOUND); break; case -ETIME: - return AE_TIME; + return_VALUE(AE_TIME); break; default: - return AE_OK; + return_VALUE(AE_OK); } } @@ -907,6 +910,7 @@ static int acpi_ec_read_info(struct seq_file *seq, void *offset) { union acpi_ec *ec = (union acpi_ec *)seq->private; + ACPI_FUNCTION_TRACE("acpi_ec_read_info"); if (!ec) goto end; @@ -921,7 +925,7 @@ static int acpi_ec_read_info(struct seq_file *seq, void *offset) acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); end: - return 0; + return_VALUE(0); } static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) @@ -929,7 +933,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) return single_open(file, acpi_ec_read_info, PDE(inode)->data); } -static const struct file_operations acpi_ec_info_ops = { +static struct file_operations acpi_ec_info_ops = { .open = acpi_ec_info_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -941,29 +945,33 @@ static int acpi_ec_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_add_fs"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_ec_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); } entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Unable to create '%s' fs entry\n", + ACPI_EC_FILE_INFO)); else { entry->proc_fops = &acpi_ec_info_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_ec_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_ec_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device)); @@ -971,7 +979,7 @@ static int acpi_ec_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -984,18 +992,19 @@ static int acpi_ec_poll_add(struct acpi_device *device) acpi_status status = AE_OK; union acpi_ec *ec = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); if (!ec) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(ec, 0, sizeof(union acpi_ec)); ec->common.handle = device->handle; ec->common.uid = -1; - init_MUTEX(&ec->poll.sem); + spin_lock_init(&ec->poll.lock); strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_EC_CLASS); acpi_driver_data(device) = ec; @@ -1004,7 +1013,7 @@ static int acpi_ec_poll_add(struct acpi_device *device) acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, &ec->common.global_lock); - /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: + /* XXX we doesn't test uids, because on some boxes ecdt uid = 0, see: http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ if (ec_ecdt) { acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, @@ -1023,7 +1032,8 @@ static int acpi_ec_poll_add(struct acpi_device *device) acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, &ec->common.gpe_bit); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Obtaining GPE bit")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error obtaining GPE bit assignment\n")); result = -ENODEV; goto end; } @@ -1043,7 +1053,7 @@ static int acpi_ec_poll_add(struct acpi_device *device) if (result) kfree(ec); - return result; + return_VALUE(result); } static int acpi_ec_intr_add(struct acpi_device *device) { @@ -1051,13 +1061,14 @@ static int acpi_ec_intr_add(struct acpi_device *device) acpi_status status = AE_OK; union acpi_ec *ec = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); if (!ec) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(ec, 0, sizeof(union acpi_ec)); ec->common.handle = device->handle; @@ -1074,7 +1085,7 @@ static int acpi_ec_intr_add(struct acpi_device *device) acpi_evaluate_integer(ec->common.handle, "_GLK", NULL, &ec->common.global_lock); - /* XXX we don't test uids, because on some boxes ecdt uid = 0, see: + /* XXX we doesn't test uids, because on some boxes ecdt uid = 0, see: http://bugzilla.kernel.org/show_bug.cgi?id=6111 */ if (ec_ecdt) { acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, @@ -1093,7 +1104,8 @@ static int acpi_ec_intr_add(struct acpi_device *device) acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, &ec->common.gpe_bit); if (ACPI_FAILURE(status)) { - printk(KERN_ERR PREFIX "Obtaining GPE bit assignment\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error obtaining GPE bit assignment\n")); result = -ENODEV; goto end; } @@ -1113,16 +1125,17 @@ static int acpi_ec_intr_add(struct acpi_device *device) if (result) kfree(ec); - return result; + return_VALUE(result); } static int acpi_ec_remove(struct acpi_device *device, int type) { union acpi_ec *ec = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_remove"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ec = acpi_driver_data(device); @@ -1130,7 +1143,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type) kfree(ec); - return 0; + return_VALUE(0); } static acpi_status @@ -1169,14 +1182,15 @@ static int acpi_ec_start(struct acpi_device *device) acpi_status status = AE_OK; union acpi_ec *ec = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_start"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ec = acpi_driver_data(device); if (!ec) - return -EINVAL; + return_VALUE(-EINVAL); /* * Get I/O port addresses. Convert to GAS format. @@ -1185,8 +1199,9 @@ static int acpi_ec_start(struct acpi_device *device) acpi_ec_io_ports, ec); if (ACPI_FAILURE(status) || ec->common.command_addr.register_bit_width == 0) { - printk(KERN_ERR PREFIX "Error getting I/O port addresses\n"); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error getting I/O port addresses")); + return_VALUE(-ENODEV); } ec->common.status_addr = ec->common.command_addr; @@ -1203,7 +1218,7 @@ static int acpi_ec_start(struct acpi_device *device) ACPI_GPE_EDGE_TRIGGERED, &acpi_ec_gpe_handler, ec); if (ACPI_FAILURE(status)) { - return -ENODEV; + return_VALUE(-ENODEV); } acpi_set_gpe_type(NULL, ec->common.gpe_bit, ACPI_GPE_TYPE_RUNTIME); acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); @@ -1215,10 +1230,10 @@ static int acpi_ec_start(struct acpi_device *device) if (ACPI_FAILURE(status)) { acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, &acpi_ec_gpe_handler); - return -ENODEV; + return_VALUE(-ENODEV); } - return AE_OK; + return_VALUE(AE_OK); } static int acpi_ec_stop(struct acpi_device *device, int type) @@ -1226,9 +1241,10 @@ static int acpi_ec_stop(struct acpi_device *device, int type) acpi_status status = AE_OK; union acpi_ec *ec = NULL; + ACPI_FUNCTION_TRACE("acpi_ec_stop"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); ec = acpi_driver_data(device); @@ -1236,15 +1252,15 @@ static int acpi_ec_stop(struct acpi_device *device, int type) ACPI_ADR_SPACE_EC, &acpi_ec_space_handler); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); status = acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, &acpi_ec_gpe_handler); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } static acpi_status __init @@ -1280,7 +1296,7 @@ acpi_fake_ecdt_poll_callback(acpi_handle handle, &ec_ecdt->common.gpe_bit); if (ACPI_FAILURE(status)) return status; - init_MUTEX(&ec_ecdt->poll.sem); + spin_lock_init(&ec_ecdt->poll.lock); ec_ecdt->common.global_lock = TRUE; ec_ecdt->common.handle = handle; @@ -1396,7 +1412,7 @@ static int __init acpi_ec_poll_get_real_ecdt(void) ec_ecdt->common.status_addr = ecdt_ptr->ec_control; ec_ecdt->common.data_addr = ecdt_ptr->ec_data; ec_ecdt->common.gpe_bit = ecdt_ptr->gpe_bit; - init_MUTEX(&ec_ecdt->poll.sem); + spin_lock_init(&ec_ecdt->poll.lock); /* use the GL just to be safe */ ec_ecdt->common.global_lock = TRUE; ec_ecdt->common.uid = ecdt_ptr->uid; @@ -1514,22 +1530,23 @@ static int __init acpi_ec_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_ec_init"); if (acpi_disabled) - return 0; + return_VALUE(0); acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); if (!acpi_ec_dir) - return -ENODEV; + return_VALUE(-ENODEV); /* Now register the driver for the EC */ result = acpi_bus_register_driver(&acpi_ec_driver); if (result < 0) { remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return result; + return_VALUE(result); } subsys_initcall(acpi_ec_init); @@ -1538,12 +1555,13 @@ subsys_initcall(acpi_ec_init); #if 0 static void __exit acpi_ec_exit(void) { + ACPI_FUNCTION_TRACE("acpi_ec_exit"); acpi_bus_unregister_driver(&acpi_ec_driver); remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); - return; + return_VOID; } #endif /* 0 */ diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 959a893c8..2dbb1b0f1 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c @@ -48,17 +48,18 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count, static int chars_remaining = 0; static char *ptr; + ACPI_FUNCTION_TRACE("acpi_system_read_event"); if (!chars_remaining) { memset(&event, 0, sizeof(struct acpi_bus_event)); if ((file->f_flags & O_NONBLOCK) && (list_empty(&acpi_bus_event_list))) - return -EAGAIN; + return_VALUE(-EAGAIN); result = acpi_bus_receive_event(&event); if (result) - return result; + return_VALUE(result); chars_remaining = sprintf(str, "%s %s %08x %08x\n", event.device_class ? event. @@ -74,13 +75,13 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count, } if (copy_to_user(buffer, ptr, count)) - return -EFAULT; + return_VALUE(-EFAULT); *ppos += count; chars_remaining -= count; ptr += count; - return count; + return_VALUE(count); } static int acpi_system_close_event(struct inode *inode, struct file *file) @@ -99,7 +100,7 @@ static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait) return 0; } -static const struct file_operations acpi_system_event_ops = { +static struct file_operations acpi_system_event_ops = { .open = acpi_system_open_event, .read = acpi_system_read_event, .release = acpi_system_close_event, @@ -111,18 +112,22 @@ static int __init acpi_event_init(void) struct proc_dir_entry *entry; int error = 0; + ACPI_FUNCTION_TRACE("acpi_event_init"); if (acpi_disabled) - return 0; + return_VALUE(0); /* 'event' [R] */ entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); if (entry) entry->proc_fops = &acpi_system_event_ops; else { - error = -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' proc fs entry\n", + "event")); + error = -EFAULT; } - return error; + return_VALUE(error); } subsys_initcall(acpi_event_init); diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c index 919037d6a..c9ac05c46 100644 --- a/drivers/acpi/events/evevent.c +++ b/drivers/acpi/events/evevent.c @@ -68,7 +68,7 @@ acpi_status acpi_ev_initialize_events(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_initialize_events); + ACPI_FUNCTION_TRACE("ev_initialize_events"); /* Make sure we have ACPI tables */ @@ -118,7 +118,7 @@ acpi_status acpi_ev_install_fadt_gpes(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_install_fadt_gpes); + ACPI_FUNCTION_TRACE("ev_install_fadt_gpes"); /* Namespace must be locked */ @@ -157,7 +157,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_install_xrupt_handlers); + ACPI_FUNCTION_TRACE("ev_install_xrupt_handlers"); /* Install the SCI handler */ @@ -241,7 +241,7 @@ u32 acpi_ev_fixed_event_detect(void) u32 fixed_enable; acpi_native_uint i; - ACPI_FUNCTION_NAME(ev_fixed_event_detect); + ACPI_FUNCTION_NAME("ev_fixed_event_detect"); /* * Read the fixed feature status and enable registers, as all the cases @@ -260,14 +260,12 @@ u32 acpi_ev_fixed_event_detect(void) * Check for all possible Fixed Events and dispatch those that are active */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { - /* Both the status and enable bits must be on for this event */ if ((fixed_status & acpi_gbl_fixed_event_info[i]. status_bit_mask) && (fixed_enable & acpi_gbl_fixed_event_info[i]. enable_bit_mask)) { - /* Found an active (signalled) event */ int_status |= acpi_ev_fixed_event_dispatch((u32) i); diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index c76c0583c..f64f977dd 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c @@ -69,7 +69,7 @@ acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_set_gpe_type); + ACPI_FUNCTION_TRACE("ev_set_gpe_type"); /* Validate type and update register enable masks */ @@ -115,7 +115,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info, struct acpi_gpe_register_info *gpe_register_info; u8 register_bit; - ACPI_FUNCTION_TRACE(ev_update_gpe_enable_masks); + ACPI_FUNCTION_TRACE("ev_update_gpe_enable_masks"); gpe_register_info = gpe_event_info->register_info; if (!gpe_register_info) { @@ -178,7 +178,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info, { acpi_status status; - ACPI_FUNCTION_TRACE(ev_enable_gpe); + ACPI_FUNCTION_TRACE("ev_enable_gpe"); /* Make sure HW enable masks are updated */ @@ -207,7 +207,6 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info, ACPI_SET_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); if (write_to_hardware) { - /* Clear the GPE (of stale events), then enable it */ status = acpi_hw_clear_gpe(gpe_event_info); @@ -244,7 +243,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_disable_gpe); + ACPI_FUNCTION_TRACE("ev_disable_gpe"); if (!(gpe_event_info->flags & ACPI_GPE_ENABLE_MASK)) { return_ACPI_STATUS(AE_OK); @@ -314,7 +313,6 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, /* A NULL gpe_block means use the FADT-defined GPE block(s) */ if (!gpe_device) { - /* Examine GPE Block 0 and 1 (These blocks are permanent) */ for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { @@ -385,7 +383,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) acpi_native_uint i; acpi_native_uint j; - ACPI_FUNCTION_NAME(ev_gpe_detect); + ACPI_FUNCTION_NAME("ev_gpe_detect"); /* Check for the case where there are no GPEs */ @@ -393,15 +391,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) return (int_status); } - /* - * We need to obtain the GPE lock for both the data structs and registers - * Note: Not necessary to obtain the hardware lock, since the GPE registers - * are owned by the gpe_lock. - */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); - /* Examine all GPE blocks attached to this interrupt level */ + flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); gpe_block = gpe_xrupt_list->gpe_block_list_head; while (gpe_block) { /* @@ -410,7 +402,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) * Find all currently active GP events. */ for (i = 0; i < gpe_block->register_count; i++) { - /* Get the next status/enable pair */ gpe_register_info = &gpe_block->register_info[i]; @@ -446,7 +437,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) enabled_status_byte = (u8) (status_reg & enable_reg); if (!enabled_status_byte) { - /* No active GPEs in this register, move on */ continue; @@ -455,7 +445,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) /* Now look at the individual GPEs in this byte register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { - /* Examine one GPE bit */ if (enabled_status_byte & @@ -494,9 +483,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) * * RETURN: None * - * DESCRIPTION: Perform the actual execution of a GPE control method. This - * function is called from an invocation of acpi_os_execute and - * therefore does NOT execute at interrupt level - so that + * DESCRIPTION: Perform the actual execution of a GPE control method. This + * function is called from an invocation of acpi_os_queue_for_execution + * (and therefore does NOT execute at interrupt level) so that * the control method itself is not executed in the context of * an interrupt handler. * @@ -505,11 +494,12 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) { struct acpi_gpe_event_info *gpe_event_info = (void *)context; + u32 gpe_number = 0; acpi_status status; struct acpi_gpe_event_info local_gpe_event_info; - struct acpi_evaluate_info *info; + struct acpi_parameter_info info; - ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method); + ACPI_FUNCTION_TRACE("ev_asynch_execute_gpe_method"); status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); if (ACPI_FAILURE(status)) { @@ -545,35 +535,22 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) */ if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_METHOD) { + /* + * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx + * control method that corresponds to this GPE + */ + info.node = local_gpe_event_info.dispatch.method_node; + info.parameters = + ACPI_CAST_PTR(union acpi_operand_object *, gpe_event_info); + info.parameter_type = ACPI_PARAM_GPE; - /* Allocate the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - status = AE_NO_MEMORY; - } else { - /* - * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx - * control method that corresponds to this GPE - */ - info->prefix_node = - local_gpe_event_info.dispatch.method_node; - info->parameters = - ACPI_CAST_PTR(union acpi_operand_object *, - gpe_event_info); - info->parameter_type = ACPI_PARAM_GPE; - info->flags = ACPI_IGNORE_RETURN_VALUE; - - status = acpi_ns_evaluate(info); - ACPI_FREE(info); - } - + status = acpi_ns_evaluate_by_handle(&info); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, - "While evaluating GPE method [%4.4s]", + "While evaluating method [%4.4s] for GPE[%2X]", acpi_ut_get_node_name (local_gpe_event_info.dispatch. - method_node))); + method_node), gpe_number)); } } @@ -616,7 +593,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_gpe_dispatch); + ACPI_FUNCTION_TRACE("ev_gpe_dispatch"); /* * If edge-triggered, clear the GPE status bit now. Note that @@ -692,9 +669,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * Execute the method associated with the GPE * NOTE: Level-triggered GPEs are cleared after the method completes. */ - status = acpi_os_execute(OSL_GPE_HANDLER, - acpi_ev_asynch_execute_gpe_method, - gpe_event_info); + status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, + acpi_ev_asynch_execute_gpe_method, + gpe_event_info); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Unable to queue handler for GPE[%2X] - event disabled", @@ -739,7 +716,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * * DESCRIPTION: Determine if a a GPE is "wake-only". * - * Called from Notify() code in interpreter when a "DeviceWake" + * Called from Notify() code in interpreter when a "device_wake" * Notify comes in. * ******************************************************************************/ @@ -749,7 +726,7 @@ acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_check_for_wake_only_gpe); + ACPI_FUNCTION_TRACE("ev_check_for_wake_only_gpe"); if ((gpe_event_info) && /* Only >0 for _Lxx/_Exx */ ((gpe_event_info->flags & ACPI_GPE_SYSTEM_MASK) == ACPI_GPE_SYSTEM_RUNNING)) { /* System state at GPE time */ diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c index 95ddeb48b..0fd00b5ad 100644 --- a/drivers/acpi/events/evgpeblk.c +++ b/drivers/acpi/events/evgpeblk.c @@ -131,14 +131,14 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info) * ******************************************************************************/ -acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback) +acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback) { struct acpi_gpe_block_info *gpe_block; struct acpi_gpe_xrupt_info *gpe_xrupt_info; acpi_status status = AE_OK; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(ev_walk_gpe_list); + ACPI_FUNCTION_TRACE("ev_walk_gpe_list"); flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); @@ -146,12 +146,10 @@ acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback) gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; while (gpe_xrupt_info) { - /* Walk all Gpe Blocks attached to this interrupt level */ gpe_block = gpe_xrupt_info->gpe_block_list_head; while (gpe_block) { - /* One callback per GPE block */ status = gpe_walk_callback(gpe_xrupt_info, gpe_block); @@ -192,12 +190,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, acpi_native_uint i; acpi_native_uint j; - ACPI_FUNCTION_TRACE(ev_delete_gpe_handlers); + ACPI_FUNCTION_TRACE("ev_delete_gpe_handlers"); /* Examine each GPE Register within the block */ for (i = 0; i < gpe_block->register_count; i++) { - /* Now look at the individual GPEs in this byte register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { @@ -207,7 +204,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) { - ACPI_FREE(gpe_event_info->dispatch.handler); + ACPI_MEM_FREE(gpe_event_info->dispatch.handler); gpe_event_info->dispatch.handler = NULL; gpe_event_info->flags &= ~ACPI_GPE_DISPATCH_MASK; @@ -251,7 +248,7 @@ acpi_ev_save_method_info(acpi_handle obj_handle, u8 type; acpi_status status; - ACPI_FUNCTION_TRACE(ev_save_method_info); + ACPI_FUNCTION_TRACE("ev_save_method_info"); /* * _Lxx and _Exx GPE method support @@ -282,9 +279,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle, default: /* Unknown method type, just ignore it! */ - ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "Ignoring unknown GPE method type: %s (name not of form _Lxx or _Exx)", - name)); + ACPI_ERROR((AE_INFO, + "Unknown GPE method type: %s (name not of form _Lxx or _Exx)", + name)); return_ACPI_STATUS(AE_OK); } @@ -292,12 +289,11 @@ acpi_ev_save_method_info(acpi_handle obj_handle, gpe_number = ACPI_STRTOUL(&name[2], NULL, 16); if (gpe_number == ACPI_UINT32_MAX) { - /* Conversion failed; invalid method, just ignore it */ - ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)", - name)); + ACPI_ERROR((AE_INFO, + "Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)", + name)); return_ACPI_STATUS(AE_OK); } @@ -368,14 +364,13 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, u32 gpe_number; acpi_status status; - ACPI_FUNCTION_TRACE(ev_match_prw_and_gpe); + ACPI_FUNCTION_TRACE("ev_match_prw_and_gpe"); /* Check for a _PRW method under this device */ status = acpi_ut_evaluate_object(obj_handle, METHOD_NAME__PRW, ACPI_BTYPE_PACKAGE, &pkg_desc); if (ACPI_FAILURE(status)) { - /* Ignore all errors from _PRW, we don't want to abort the subsystem */ return_ACPI_STATUS(AE_OK); @@ -399,7 +394,6 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, obj_desc = pkg_desc->package.elements[0]; if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { - /* Use FADT-defined GPE device (from definition of _PRW) */ target_gpe_device = acpi_gbl_fadt_gpe_device; @@ -408,7 +402,6 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, gpe_number = (u32) obj_desc->integer.value; } else if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { - /* Package contains a GPE reference and GPE number within a GPE block */ if ((obj_desc->package.count < 2) || @@ -489,7 +482,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(ev_get_gpe_xrupt_block); + ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block"); /* No need for lock since we are not changing any list elements here */ @@ -504,7 +497,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 /* Not found, must allocate a new xrupt descriptor */ - gpe_xrupt = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_xrupt_info)); + gpe_xrupt = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_xrupt_info)); if (!gpe_xrupt) { return_PTR(NULL); } @@ -563,7 +556,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(ev_delete_gpe_xrupt); + ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt"); /* We never want to remove the SCI interrupt handler */ @@ -595,7 +588,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) /* Free the block */ - ACPI_FREE(gpe_xrupt); + ACPI_MEM_FREE(gpe_xrupt); return_ACPI_STATUS(AE_OK); } @@ -621,7 +614,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(ev_install_gpe_block); + ACPI_FUNCTION_TRACE("ev_install_gpe_block"); status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); if (ACPI_FAILURE(status)) { @@ -674,7 +667,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(ev_install_gpe_block); + ACPI_FUNCTION_TRACE("ev_install_gpe_block"); status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); if (ACPI_FAILURE(status)) { @@ -686,7 +679,6 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) status = acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block); if (!gpe_block->previous && !gpe_block->next) { - /* This is the last gpe_block on this interrupt */ status = acpi_ev_delete_gpe_xrupt(gpe_block->xrupt_block); @@ -712,9 +704,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) /* Free the gpe_block */ - ACPI_FREE(gpe_block->register_info); - ACPI_FREE(gpe_block->event_info); - ACPI_FREE(gpe_block); + ACPI_MEM_FREE(gpe_block->register_info); + ACPI_MEM_FREE(gpe_block->event_info); + ACPI_MEM_FREE(gpe_block); unlock_and_exit: status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); @@ -744,17 +736,17 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) acpi_native_uint j; acpi_status status; - ACPI_FUNCTION_TRACE(ev_create_gpe_info_blocks); + ACPI_FUNCTION_TRACE("ev_create_gpe_info_blocks"); /* Allocate the GPE register information block */ - gpe_register_info = ACPI_ALLOCATE_ZEROED((acpi_size) gpe_block-> - register_count * - sizeof(struct - acpi_gpe_register_info)); + gpe_register_info = ACPI_MEM_CALLOCATE((acpi_size) gpe_block-> + register_count * + sizeof(struct + acpi_gpe_register_info)); if (!gpe_register_info) { ACPI_ERROR((AE_INFO, - "Could not allocate the GpeRegisterInfo table")); + "Could not allocate the gpe_register_info table")); return_ACPI_STATUS(AE_NO_MEMORY); } @@ -762,14 +754,13 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) * Allocate the GPE event_info block. There are eight distinct GPEs * per register. Initialization to zeros is sufficient. */ - gpe_event_info = ACPI_ALLOCATE_ZEROED(((acpi_size) gpe_block-> - register_count * - ACPI_GPE_REGISTER_WIDTH) * - sizeof(struct - acpi_gpe_event_info)); + gpe_event_info = ACPI_MEM_CALLOCATE(((acpi_size) gpe_block-> + register_count * + ACPI_GPE_REGISTER_WIDTH) * + sizeof(struct acpi_gpe_event_info)); if (!gpe_event_info) { ACPI_ERROR((AE_INFO, - "Could not allocate the GpeEventInfo table")); + "Could not allocate the gpe_event_info table")); status = AE_NO_MEMORY; goto error_exit; } @@ -789,7 +780,6 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) this_event = gpe_event_info; for (i = 0; i < gpe_block->register_count; i++) { - /* Init the register_info for this GPE register (8 GPEs) */ this_register->base_gpe_number = @@ -849,10 +839,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) error_exit: if (gpe_register_info) { - ACPI_FREE(gpe_register_info); + ACPI_MEM_FREE(gpe_register_info); } if (gpe_event_info) { - ACPI_FREE(gpe_event_info); + ACPI_MEM_FREE(gpe_event_info); } return_ACPI_STATUS(status); @@ -888,7 +878,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, acpi_status status; struct acpi_gpe_block_info *gpe_block; - ACPI_FUNCTION_TRACE(ev_create_gpe_block); + ACPI_FUNCTION_TRACE("ev_create_gpe_block"); if (!register_count) { return_ACPI_STATUS(AE_OK); @@ -896,7 +886,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, /* Allocate a new GPE block */ - gpe_block = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_block_info)); + gpe_block = ACPI_MEM_CALLOCATE(sizeof(struct acpi_gpe_block_info)); if (!gpe_block) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -916,7 +906,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, */ status = acpi_ev_create_gpe_info_blocks(gpe_block); if (ACPI_FAILURE(status)) { - ACPI_FREE(gpe_block); + ACPI_MEM_FREE(gpe_block); return_ACPI_STATUS(status); } @@ -924,7 +914,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); if (ACPI_FAILURE(status)) { - ACPI_FREE(gpe_block); + ACPI_MEM_FREE(gpe_block); return_ACPI_STATUS(status); } @@ -981,7 +971,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, acpi_native_uint i; acpi_native_uint j; - ACPI_FUNCTION_TRACE(ev_initialize_gpe_block); + ACPI_FUNCTION_TRACE("ev_initialize_gpe_block"); /* Ignore a null GPE block (e.g., if no GPE block 1 exists) */ @@ -1023,7 +1013,6 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, for (i = 0; i < gpe_block->register_count; i++) { for (j = 0; j < 8; j++) { - /* Get the info block for this particular GPE */ gpe_event_info = @@ -1051,7 +1040,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, status = acpi_hw_enable_runtime_gpe_block(NULL, gpe_block); if (ACPI_FAILURE(status)) { - ACPI_ERROR((AE_INFO, "Could not enable GPEs in GpeBlock %p", + ACPI_ERROR((AE_INFO, "Could not enable GPEs in gpe_block %p", gpe_block)); } @@ -1077,7 +1066,7 @@ acpi_status acpi_ev_gpe_initialize(void) u32 gpe_number_max = 0; acpi_status status; - ACPI_FUNCTION_TRACE(ev_gpe_initialize); + ACPI_FUNCTION_TRACE("ev_gpe_initialize"); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { @@ -1110,7 +1099,6 @@ acpi_status acpi_ev_gpe_initialize(void) * particular block is not supported. */ if (acpi_gbl_FADT->gpe0_blk_len && acpi_gbl_FADT->xgpe0_blk.address) { - /* GPE block 0 exists (has both length and address > 0) */ register_count0 = (u16) (acpi_gbl_FADT->gpe0_blk_len / 2); @@ -1133,7 +1121,6 @@ acpi_status acpi_ev_gpe_initialize(void) } if (acpi_gbl_FADT->gpe1_blk_len && acpi_gbl_FADT->xgpe1_blk.address) { - /* GPE block 1 exists (has both length and address > 0) */ register_count1 = (u16) (acpi_gbl_FADT->gpe1_blk_len / 2); @@ -1181,7 +1168,6 @@ acpi_status acpi_ev_gpe_initialize(void) /* Exit if there are no GPE registers */ if ((register_count0 + register_count1) == 0) { - /* GPEs are not required by ACPI, this is OK */ ACPI_DEBUG_PRINT((ACPI_DB_INIT, diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 6eef4efdd..0909ba695 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c @@ -49,13 +49,12 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evmisc") -/* Names for Notify() values, used for debug output */ #ifdef ACPI_DEBUG_OUTPUT static const char *acpi_notify_value_names[] = { "Bus Check", "Device Check", "Device Wake", - "Eject Request", + "Eject request", "Device Check Light", "Frequency Mismatch", "Bus Mode Mismatch", @@ -125,7 +124,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, union acpi_generic_state *notify_info; acpi_status status = AE_OK; - ACPI_FUNCTION_NAME(ev_queue_notify_request); + ACPI_FUNCTION_NAME("ev_queue_notify_request"); /* * For value 3 (Ejection Request), some device method may need to be run. @@ -151,7 +150,6 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, obj_desc = acpi_ns_get_attached_object(node); if (obj_desc) { - /* We have the notify object, Get the right handler */ switch (node->type) { @@ -186,15 +184,14 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, return (AE_NO_MEMORY); } - notify_info->common.descriptor_type = - ACPI_DESC_TYPE_STATE_NOTIFY; + notify_info->common.data_type = ACPI_DESC_TYPE_STATE_NOTIFY; notify_info->notify.node = node; notify_info->notify.value = (u16) notify_value; notify_info->notify.handler_obj = handler_obj; - status = - acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_notify_dispatch, - notify_info); + status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH, + acpi_ev_notify_dispatch, + notify_info); if (ACPI_FAILURE(status)) { acpi_ut_delete_generic_state(notify_info); } @@ -243,7 +240,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context) * to the device. */ if (notify_info->notify.value <= ACPI_MAX_SYS_NOTIFY) { - /* Global system notification handler */ if (acpi_gbl_system_notify.handler) { @@ -301,7 +297,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_global_lock_thread(void *context) /* Signal threads that are waiting for the lock */ if (acpi_gbl_global_lock_thread_count) { - /* Send sufficient units to the semaphore */ status = @@ -340,16 +335,15 @@ static u32 acpi_ev_global_lock_handler(void *context) */ ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_common_fACS.global_lock, acquired); if (acquired) { - /* Got the lock, now wake all threads waiting for it */ acpi_gbl_global_lock_acquired = TRUE; /* Run the Global Lock thread which will signal all waiting threads */ - status = - acpi_os_execute(OSL_GLOBAL_LOCK_HANDLER, - acpi_ev_global_lock_thread, context); + status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH, + acpi_ev_global_lock_thread, + context); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not queue Global Lock thread")); @@ -377,7 +371,7 @@ acpi_status acpi_ev_init_global_lock_handler(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); + ACPI_FUNCTION_TRACE("ev_init_global_lock_handler"); acpi_gbl_global_lock_present = TRUE; status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, @@ -419,7 +413,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout) acpi_status status = AE_OK; u8 acquired = FALSE; - ACPI_FUNCTION_TRACE(ev_acquire_global_lock); + ACPI_FUNCTION_TRACE("ev_acquire_global_lock"); #ifndef ACPI_APPLICATION /* Make sure that we actually have a global lock */ @@ -445,7 +439,6 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout) ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_common_fACS.global_lock, acquired); if (acquired) { - /* We got the lock */ ACPI_DEBUG_PRINT((ACPI_DB_EXEC, @@ -465,9 +458,8 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout) * Acquire the global lock semaphore first. * Since this wait will block, we must release the interpreter */ - status = - acpi_ex_system_wait_semaphore(acpi_gbl_global_lock_semaphore, - timeout); + status = acpi_ex_system_wait_semaphore(acpi_gbl_global_lock_semaphore, + timeout); return_ACPI_STATUS(status); } @@ -488,7 +480,7 @@ acpi_status acpi_ev_release_global_lock(void) u8 pending = FALSE; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ev_release_global_lock); + ACPI_FUNCTION_TRACE("ev_release_global_lock"); if (!acpi_gbl_global_lock_thread_count) { ACPI_WARNING((AE_INFO, @@ -500,7 +492,6 @@ acpi_status acpi_ev_release_global_lock(void) acpi_gbl_global_lock_thread_count--; if (acpi_gbl_global_lock_thread_count) { - /* There are still some threads holding the lock, cannot release */ return_ACPI_STATUS(AE_OK); @@ -542,7 +533,7 @@ void acpi_ev_terminate(void) acpi_native_uint i; acpi_status status; - ACPI_FUNCTION_TRACE(ev_terminate); + ACPI_FUNCTION_TRACE("ev_terminate"); if (acpi_gbl_events_initialized) { /* @@ -582,7 +573,7 @@ void acpi_ev_terminate(void) if (acpi_gbl_original_mode == ACPI_SYS_MODE_LEGACY) { status = acpi_disable(); if (ACPI_FAILURE(status)) { - ACPI_WARNING((AE_INFO, "AcpiDisable failed")); + ACPI_WARNING((AE_INFO, "acpi_disable failed")); } } return_VOID; diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index 21caae04f..6da58e776 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c @@ -83,7 +83,7 @@ acpi_status acpi_ev_install_region_handlers(void) acpi_status status; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ev_install_region_handlers); + ACPI_FUNCTION_TRACE("ev_install_region_handlers"); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { @@ -153,7 +153,7 @@ acpi_status acpi_ev_initialize_op_regions(void) acpi_status status; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ev_initialize_op_regions); + ACPI_FUNCTION_TRACE("ev_initialize_op_regions"); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { @@ -164,7 +164,6 @@ acpi_status acpi_ev_initialize_op_regions(void) * Run the _REG methods for op_regions in each default address space */ for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { - /* TBD: Make sure handler is the DEFAULT handler, otherwise * _REG will have already been run. */ @@ -193,12 +192,12 @@ acpi_status acpi_ev_initialize_op_regions(void) acpi_status acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) { - struct acpi_evaluate_info *info; - union acpi_operand_object *args[3]; + struct acpi_parameter_info info; + union acpi_operand_object *params[3]; union acpi_operand_object *region_obj2; acpi_status status; - ACPI_FUNCTION_TRACE(ev_execute_reg_method); + ACPI_FUNCTION_TRACE("ev_execute_reg_method"); region_obj2 = acpi_ns_get_secondary_object(region_obj); if (!region_obj2) { @@ -209,60 +208,48 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) return_ACPI_STATUS(AE_OK); } - /* Allocate and initialize the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - info->prefix_node = region_obj2->extra.method_REG; - info->pathname = NULL; - info->parameters = args; - info->parameter_type = ACPI_PARAM_ARGS; - info->flags = ACPI_IGNORE_RETURN_VALUE; - /* * The _REG method has two arguments: * - * Arg0 - Integer: - * Operation region space ID Same value as region_obj->Region.space_id - * - * Arg1 - Integer: - * connection status 1 for connecting the handler, 0 for disconnecting - * the handler (Passed as a parameter) + * Arg0, Integer: Operation region space ID + * Same value as region_obj->Region.space_id + * Arg1, Integer: connection status + * 1 for connecting the handler, + * 0 for disconnecting the handler + * Passed as a parameter */ - args[0] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); - if (!args[0]) { - status = AE_NO_MEMORY; - goto cleanup1; + params[0] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); + if (!params[0]) { + return_ACPI_STATUS(AE_NO_MEMORY); } - args[1] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); - if (!args[1]) { + params[1] = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); + if (!params[1]) { status = AE_NO_MEMORY; - goto cleanup2; + goto cleanup; } /* Setup the parameter objects */ - args[0]->integer.value = region_obj->region.space_id; - args[1]->integer.value = function; - args[2] = NULL; + params[0]->integer.value = region_obj->region.space_id; + params[1]->integer.value = function; + params[2] = NULL; + + info.node = region_obj2->extra.method_REG; + info.parameters = params; + info.parameter_type = ACPI_PARAM_ARGS; /* Execute the method, no return value */ ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname - (ACPI_TYPE_METHOD, info->prefix_node, NULL)); + (ACPI_TYPE_METHOD, info.node, NULL)); + status = acpi_ns_evaluate_by_handle(&info); - status = acpi_ns_evaluate(info); - acpi_ut_remove_reference(args[1]); + acpi_ut_remove_reference(params[1]); - cleanup2: - acpi_ut_remove_reference(args[0]); + cleanup: + acpi_ut_remove_reference(params[0]); - cleanup1: - ACPI_FREE(info); return_ACPI_STATUS(status); } @@ -274,8 +261,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) * Function - Read or Write operation * Address - Where in the space to read or write * bit_width - Field width in bits (8, 16, 32, or 64) - * Value - Pointer to in or out value, must be - * full 64-bit acpi_integer + * Value - Pointer to in or out value * * RETURN: Status * @@ -288,7 +274,7 @@ acpi_status acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, u32 function, acpi_physical_address address, - u32 bit_width, acpi_integer * value) + u32 bit_width, void *value) { acpi_status status; acpi_status status2; @@ -298,7 +284,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, union acpi_operand_object *region_obj2; void *region_context = NULL; - ACPI_FUNCTION_TRACE(ev_address_space_dispatch); + ACPI_FUNCTION_TRACE("ev_address_space_dispatch"); region_obj2 = acpi_ns_get_secondary_object(region_obj); if (!region_obj2) { @@ -329,7 +315,6 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, */ region_setup = handler_desc->address_space.setup; if (!region_setup) { - /* No initialization routine, exit with error */ ACPI_ERROR((AE_INFO, @@ -376,10 +361,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, region_obj->region.flags |= AOPOBJ_SETUP_COMPLETE; if (region_obj2->extra.region_context) { - /* The handler for this region was already installed */ - ACPI_FREE(region_context); + ACPI_MEM_FREE(region_context); } else { /* * Save the returned context for use in all accesses to @@ -402,8 +386,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, acpi_ut_get_region_name(region_obj->region. space_id))); - if (!(handler_desc->address_space.handler_flags & - ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { + if (! + (handler_desc->address_space. + hflags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { /* * For handlers other than the default (supplied) handlers, we must * exit the interpreter because the handler *might* block -- we don't @@ -424,8 +409,9 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, space_id))); } - if (!(handler_desc->address_space.handler_flags & - ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { + if (! + (handler_desc->address_space. + hflags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { /* * We just returned from a non-default handler, we must re-enter the * interpreter @@ -465,7 +451,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, union acpi_operand_object *region_obj2; acpi_status status; - ACPI_FUNCTION_TRACE(ev_detach_region); + ACPI_FUNCTION_TRACE("ev_detach_region"); region_obj2 = acpi_ns_get_secondary_object(region_obj); if (!region_obj2) { @@ -477,7 +463,6 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, handler_obj = region_obj->region.handler; if (!handler_obj) { - /* This region has no handler, all done */ return_VOID; @@ -489,7 +474,6 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, last_obj_ptr = &handler_obj->address_space.region_list; while (obj_desc) { - /* Is this the correct Region? */ if (obj_desc == region_obj) { @@ -528,40 +512,34 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj, } } - /* - * If the region has been activated, call the setup handler - * with the deactivate notification - */ - if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) { - region_setup = handler_obj->address_space.setup; - status = - region_setup(region_obj, - ACPI_REGION_DEACTIVATE, - handler_obj->address_space. - context, region_context); + /* Call the setup handler with the deactivate notification */ - /* Init routine may fail, Just ignore errors */ + region_setup = handler_obj->address_space.setup; + status = + region_setup(region_obj, ACPI_REGION_DEACTIVATE, + handler_obj->address_space.context, + region_context); - if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "from region handler - deactivate, [%s]", - acpi_ut_get_region_name - (region_obj->region. - space_id))); - } + /* Init routine may fail, Just ignore errors */ - region_obj->region.flags &= - ~(AOPOBJ_SETUP_COMPLETE); + if (ACPI_FAILURE(status)) { + ACPI_EXCEPTION((AE_INFO, status, + "from region init, [%s]", + acpi_ut_get_region_name + (region_obj->region.space_id))); } + region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE); + /* * Remove handler reference in the region * - * NOTE: this doesn't mean that the region goes away, the region - * is just inaccessible as indicated to the _REG method + * NOTE: this doesn't mean that the region goes away + * The region is just inaccessible as indicated to + * the _REG method * - * If the region is on the handler's list, this must be the - * region's handler + * If the region is on the handler's list + * this better be the region's handler */ region_obj->region.handler = NULL; acpi_ut_remove_reference(handler_obj); @@ -605,7 +583,7 @@ acpi_ev_attach_region(union acpi_operand_object *handler_obj, u8 acpi_ns_is_locked) { - ACPI_FUNCTION_TRACE(ev_attach_region); + ACPI_FUNCTION_TRACE("ev_attach_region"); ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, "Adding Region [%4.4s] %p to address handler %p [%s]\n", @@ -658,7 +636,7 @@ acpi_ev_install_handler(acpi_handle obj_handle, struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_NAME(ev_install_handler); + ACPI_FUNCTION_NAME("ev_install_handler"); handler_obj = (union acpi_operand_object *)context; @@ -688,7 +666,6 @@ acpi_ev_install_handler(acpi_handle obj_handle, obj_desc = acpi_ns_get_attached_object(node); if (!obj_desc) { - /* No object, just exit */ return (AE_OK); @@ -697,12 +674,10 @@ acpi_ev_install_handler(acpi_handle obj_handle, /* Devices are handled different than regions */ if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_DEVICE) { - /* Check if this Device already has a handler for this address space */ next_handler_obj = obj_desc->device.handler; while (next_handler_obj) { - /* Found a handler, is it for the same address space? */ if (next_handler_obj->address_space.space_id == @@ -789,9 +764,9 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node, union acpi_operand_object *handler_obj; acpi_status status; acpi_object_type type; - u8 flags = 0; + u16 flags = 0; - ACPI_FUNCTION_TRACE(ev_install_space_handler); + ACPI_FUNCTION_TRACE("ev_install_space_handler"); /* * This registration is valid for only the types below @@ -864,7 +839,6 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node, /* Walk the handler list for this device */ while (handler_obj) { - /* Same space_id indicates a handler already installed */ if (handler_obj->address_space.space_id == space_id) { @@ -947,7 +921,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node, /* Init handler obj */ handler_obj->address_space.space_id = (u8) space_id; - handler_obj->address_space.handler_flags = flags; + handler_obj->address_space.hflags = flags; handler_obj->address_space.region_list = NULL; handler_obj->address_space.node = node; handler_obj->address_space.handler = handler; @@ -1005,7 +979,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, { acpi_status status; - ACPI_FUNCTION_TRACE(ev_execute_reg_methods); + ACPI_FUNCTION_TRACE("ev_execute_reg_methods"); /* * Run all _REG methods for all Operation Regions for this @@ -1027,7 +1001,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, * * PARAMETERS: walk_namespace callback * - * DESCRIPTION: Run _REG method for region objects of the requested space_iD + * DESCRIPTION: Run _REg method for region objects of the requested space_iD * ******************************************************************************/ @@ -1061,7 +1035,6 @@ acpi_ev_reg_run(acpi_handle obj_handle, obj_desc = acpi_ns_get_attached_object(node); if (!obj_desc) { - /* No object, just exit */ return (AE_OK); diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c index 5b3c7a85e..baed8c1a1 100644 --- a/drivers/acpi/events/evrgnini.c +++ b/drivers/acpi/events/evrgnini.c @@ -71,22 +71,11 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, (union acpi_operand_object *)handle; struct acpi_mem_space_context *local_region_context; - ACPI_FUNCTION_TRACE(ev_system_memory_region_setup); + ACPI_FUNCTION_TRACE("ev_system_memory_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { if (*region_context) { - local_region_context = - (struct acpi_mem_space_context *)*region_context; - - /* Delete a cached mapping if present */ - - if (local_region_context->mapped_length) { - acpi_os_unmap_memory(local_region_context-> - mapped_logical_address, - local_region_context-> - mapped_length); - } - ACPI_FREE(local_region_context); + ACPI_MEM_FREE(*region_context); *region_context = NULL; } return_ACPI_STATUS(AE_OK); @@ -95,7 +84,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle, /* Create a new context */ local_region_context = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_mem_space_context)); + ACPI_MEM_CALLOCATE(sizeof(struct acpi_mem_space_context)); if (!(local_region_context)) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -129,7 +118,7 @@ acpi_ev_io_space_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_io_space_region_setup); + ACPI_FUNCTION_TRACE("ev_io_space_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { *region_context = NULL; @@ -172,7 +161,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, (union acpi_operand_object *)handle; struct acpi_device_id object_hID; - ACPI_FUNCTION_TRACE(ev_pci_config_region_setup); + ACPI_FUNCTION_TRACE("ev_pci_config_region_setup"); handler_obj = region_obj->region.handler; if (!handler_obj) { @@ -189,7 +178,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, *region_context = NULL; if (function == ACPI_REGION_DEACTIVATE) { if (pci_id) { - ACPI_FREE(pci_id); + ACPI_MEM_FREE(pci_id); } return_ACPI_STATUS(status); } @@ -210,7 +199,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, * handlers with that device. */ if (handler_obj->address_space.node == acpi_gbl_root_node) { - /* Start search from the parent object */ pci_root_node = parent_node; @@ -232,7 +220,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, PCI_EXPRESS_ROOT_HID_STRING, sizeof(PCI_EXPRESS_ROOT_HID_STRING))))) { - /* Install a handler for this PCI root bridge */ status = @@ -248,7 +235,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, } else { ACPI_EXCEPTION((AE_INFO, status, - "Could not install PciConfig handler for Root Bridge %4.4s", + "Could not install pci_config handler for Root Bridge %4.4s", acpi_ut_get_node_name (pci_root_node))); } @@ -275,7 +262,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, /* Region is still not initialized. Create a new context */ - pci_id = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pci_id)); + pci_id = ACPI_MEM_CALLOCATE(sizeof(struct acpi_pci_id)); if (!pci_id) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -350,7 +337,7 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_pci_bar_region_setup); + ACPI_FUNCTION_TRACE("ev_pci_bar_region_setup"); return_ACPI_STATUS(AE_OK); } @@ -377,7 +364,7 @@ acpi_ev_cmos_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_cmos_region_setup); + ACPI_FUNCTION_TRACE("ev_cmos_region_setup"); return_ACPI_STATUS(AE_OK); } @@ -402,7 +389,7 @@ acpi_ev_default_region_setup(acpi_handle handle, u32 function, void *handler_context, void **region_context) { - ACPI_FUNCTION_TRACE(ev_default_region_setup); + ACPI_FUNCTION_TRACE("ev_default_region_setup"); if (function == ACPI_REGION_DEACTIVATE) { *region_context = NULL; @@ -448,7 +435,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG; union acpi_operand_object *region_obj2; - ACPI_FUNCTION_TRACE_U32(ev_initialize_region, acpi_ns_locked); + ACPI_FUNCTION_TRACE_U32("ev_initialize_region", acpi_ns_locked); if (!region_obj) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -475,9 +462,8 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, /* Find any "_REG" method associated with this region definition */ - status = - acpi_ns_search_one_scope(*reg_name_ptr, node, ACPI_TYPE_METHOD, - &method_node); + status = acpi_ns_search_node(*reg_name_ptr, node, + ACPI_TYPE_METHOD, &method_node); if (ACPI_SUCCESS(status)) { /* * The _REG method is optional and there can be only one per region @@ -492,13 +478,11 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, * ie: acpi_gbl_root_node->parent_entry being set to NULL */ while (node) { - /* Check to see if a handler exists */ handler_obj = NULL; obj_desc = acpi_ns_get_attached_object(node); if (obj_desc) { - /* Can only be a handler if the object exists */ switch (node->type) { @@ -523,12 +507,10 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, } while (handler_obj) { - /* Is this handler of the correct type? */ if (handler_obj->address_space.space_id == space_id) { - /* Found correct handler */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, @@ -589,7 +571,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, /* If we get here, there is no handler for this region */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, - "No handler for RegionType %s(%X) (RegionObj %p)\n", + "No handler for region_type %s(%X) (region_obj %p)\n", acpi_ut_get_region_name(space_id), space_id, region_obj)); diff --git a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c index 8106215ad..9a6221690 100644 --- a/drivers/acpi/events/evsci.c +++ b/drivers/acpi/events/evsci.c @@ -69,7 +69,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context) struct acpi_gpe_xrupt_info *gpe_xrupt_list = context; u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED; - ACPI_FUNCTION_TRACE(ev_sci_xrupt_handler); + ACPI_FUNCTION_TRACE("ev_sci_xrupt_handler"); /* * We are guaranteed by the ACPI CA initialization/shutdown code that @@ -108,7 +108,7 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context) struct acpi_gpe_xrupt_info *gpe_xrupt_list = context; u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED; - ACPI_FUNCTION_TRACE(ev_gpe_xrupt_handler); + ACPI_FUNCTION_TRACE("ev_gpe_xrupt_handler"); /* * We are guaranteed by the ACPI CA initialization/shutdown code that @@ -140,7 +140,7 @@ u32 acpi_ev_install_sci_handler(void) { u32 status = AE_OK; - ACPI_FUNCTION_TRACE(ev_install_sci_handler); + ACPI_FUNCTION_TRACE("ev_install_sci_handler"); status = acpi_os_install_interrupt_handler((u32) acpi_gbl_FADT->sci_int, acpi_ev_sci_xrupt_handler, @@ -171,7 +171,7 @@ acpi_status acpi_ev_remove_sci_handler(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ev_remove_sci_handler); + ACPI_FUNCTION_TRACE("ev_remove_sci_handler"); /* Just let the OS remove the handler and disable the level */ diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index 923fd2b46..b38b39dde 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -66,7 +68,7 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_install_exception_handler); + ACPI_FUNCTION_TRACE("acpi_install_exception_handler"); status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); if (ACPI_FAILURE(status)) { @@ -88,8 +90,6 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); return_ACPI_STATUS(status); } - -ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) #endif /* ACPI_FUTURE_USAGE */ /******************************************************************************* @@ -107,13 +107,14 @@ ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) * event. * ******************************************************************************/ + acpi_status acpi_install_fixed_event_handler(u32 event, acpi_event_handler handler, void *context) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_install_fixed_event_handler); + ACPI_FUNCTION_TRACE("acpi_install_fixed_event_handler"); /* Parameter validation */ @@ -160,7 +161,7 @@ acpi_install_fixed_event_handler(u32 event, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) +EXPORT_SYMBOL(acpi_install_fixed_event_handler); /******************************************************************************* * @@ -174,12 +175,13 @@ ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) * DESCRIPTION: Disables the event and unregisters the event handler. * ******************************************************************************/ + acpi_status acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_remove_fixed_event_handler); + ACPI_FUNCTION_TRACE("acpi_remove_fixed_event_handler"); /* Parameter validation */ @@ -214,7 +216,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) +EXPORT_SYMBOL(acpi_remove_fixed_event_handler); /******************************************************************************* * @@ -233,6 +235,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) * DESCRIPTION: Install a handler for notifies on an ACPI device * ******************************************************************************/ + acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, @@ -243,7 +246,7 @@ acpi_install_notify_handler(acpi_handle device, struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_install_notify_handler); + ACPI_FUNCTION_TRACE("acpi_install_notify_handler"); /* Parameter validation */ @@ -272,7 +275,6 @@ acpi_install_notify_handler(acpi_handle device, * only one global handler can be regsitered (per notify type). */ if (device == ACPI_ROOT_OBJECT) { - /* Make sure the handler is not already installed */ if (((handler_type & ACPI_SYSTEM_NOTIFY) && @@ -315,7 +317,6 @@ acpi_install_notify_handler(acpi_handle device, obj_desc = acpi_ns_get_attached_object(node); if (obj_desc) { - /* Object exists - make sure there's no handler */ if (((handler_type & ACPI_SYSTEM_NOTIFY) && @@ -369,7 +370,6 @@ acpi_install_notify_handler(acpi_handle device, } if (handler_type == ACPI_ALL_NOTIFY) { - /* Extra ref if installed in both */ acpi_ut_add_reference(notify_obj); @@ -381,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_install_notify_handler) +EXPORT_SYMBOL(acpi_install_notify_handler); /******************************************************************************* * @@ -399,6 +399,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_notify_handler) * DESCRIPTION: Remove a handler for notifies on an ACPI device * ******************************************************************************/ + acpi_status acpi_remove_notify_handler(acpi_handle device, u32 handler_type, acpi_notify_handler handler) @@ -408,19 +409,18 @@ acpi_remove_notify_handler(acpi_handle device, struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_remove_notify_handler); + ACPI_FUNCTION_TRACE("acpi_remove_notify_handler"); /* Parameter validation */ if ((!device) || (!handler) || (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { - status = AE_BAD_PARAMETER; - goto exit; + return_ACPI_STATUS(AE_BAD_PARAMETER); } status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto exit; + return_ACPI_STATUS(status); } /* Convert and validate the device handle */ @@ -451,7 +451,7 @@ acpi_remove_notify_handler(acpi_handle device, acpi_os_wait_events_complete(NULL); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto exit; + return_ACPI_STATUS(status); } if (handler_type & ACPI_SYSTEM_NOTIFY) { @@ -489,12 +489,8 @@ acpi_remove_notify_handler(acpi_handle device, if (handler_type & ACPI_SYSTEM_NOTIFY) { notify_obj = obj_desc->common_notify.system_notify; - if (!notify_obj) { - status = AE_NOT_EXIST; - goto unlock_and_exit; - } - - if (notify_obj->notify.handler != handler) { + if ((!notify_obj) || + (notify_obj->notify.handler != handler)) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } @@ -504,7 +500,7 @@ acpi_remove_notify_handler(acpi_handle device, acpi_os_wait_events_complete(NULL); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto exit; + return_ACPI_STATUS(status); } /* Remove the handler */ @@ -514,12 +510,8 @@ acpi_remove_notify_handler(acpi_handle device, if (handler_type & ACPI_DEVICE_NOTIFY) { notify_obj = obj_desc->common_notify.device_notify; - if (!notify_obj) { - status = AE_NOT_EXIST; - goto unlock_and_exit; - } - - if (notify_obj->notify.handler != handler) { + if ((!notify_obj) || + (notify_obj->notify.handler != handler)) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } @@ -529,7 +521,7 @@ acpi_remove_notify_handler(acpi_handle device, acpi_os_wait_events_complete(NULL); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto exit; + return_ACPI_STATUS(status); } /* Remove the handler */ @@ -540,13 +532,10 @@ acpi_remove_notify_handler(acpi_handle device, unlock_and_exit: (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); - exit: - if (ACPI_FAILURE(status)) - ACPI_EXCEPTION((AE_INFO, status, "Removing notify handler")); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) +EXPORT_SYMBOL(acpi_remove_notify_handler); /******************************************************************************* * @@ -565,6 +554,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) * DESCRIPTION: Install a handler for a General Purpose Event. * ******************************************************************************/ + acpi_status acpi_install_gpe_handler(acpi_handle gpe_device, u32 gpe_number, @@ -575,18 +565,17 @@ acpi_install_gpe_handler(acpi_handle gpe_device, acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(acpi_install_gpe_handler); + ACPI_FUNCTION_TRACE("acpi_install_gpe_handler"); /* Parameter validation */ if ((!address) || (type > ACPI_GPE_XRUPT_TYPE_MASK)) { - status = AE_BAD_PARAMETER; - goto exit; + return_ACPI_STATUS(AE_BAD_PARAMETER); } status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); if (ACPI_FAILURE(status)) { - goto exit; + return_ACPI_STATUS(status); } /* Ensure that we have a valid GPE number */ @@ -607,7 +596,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, /* Allocate and init handler object */ - handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info)); + handler = ACPI_MEM_CALLOCATE(sizeof(struct acpi_handler_info)); if (!handler) { status = AE_NO_MEMORY; goto unlock_and_exit; @@ -638,14 +627,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device, unlock_and_exit: (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); - exit: - if (ACPI_FAILURE(status)) - ACPI_EXCEPTION((AE_INFO, status, - "Installing notify handler failed")); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) +EXPORT_SYMBOL(acpi_install_gpe_handler); /******************************************************************************* * @@ -661,6 +646,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) * DESCRIPTION: Remove a handler for a General Purpose acpi_event. * ******************************************************************************/ + acpi_status acpi_remove_gpe_handler(acpi_handle gpe_device, u32 gpe_number, acpi_event_handler address) @@ -670,7 +656,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, acpi_status status; acpi_cpu_flags flags; - ACPI_FUNCTION_TRACE(acpi_remove_gpe_handler); + ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler"); /* Parameter validation */ @@ -738,14 +724,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, /* Now we can free the handler object */ - ACPI_FREE(handler); + ACPI_MEM_FREE(handler); unlock_and_exit: (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler) +EXPORT_SYMBOL(acpi_remove_gpe_handler); /******************************************************************************* * @@ -760,6 +746,7 @@ ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler) * DESCRIPTION: Acquire the ACPI Global Lock * ******************************************************************************/ + acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) { acpi_status status; @@ -784,7 +771,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) return (status); } -ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock) +EXPORT_SYMBOL(acpi_acquire_global_lock); /******************************************************************************* * @@ -797,6 +784,7 @@ ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock) * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. * ******************************************************************************/ + acpi_status acpi_release_global_lock(u32 handle) { acpi_status status; @@ -809,4 +797,4 @@ acpi_status acpi_release_global_lock(u32 handle) return (status); } -ACPI_EXPORT_SYMBOL(acpi_release_global_lock) +EXPORT_SYMBOL(acpi_release_global_lock); diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index 7ebc2efac..ec9ce8429 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -63,7 +65,7 @@ acpi_status acpi_enable(void) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_enable); + ACPI_FUNCTION_TRACE("acpi_enable"); /* Make sure we have the FADT */ @@ -92,8 +94,6 @@ acpi_status acpi_enable(void) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_enable) - /******************************************************************************* * * FUNCTION: acpi_disable @@ -105,11 +105,12 @@ ACPI_EXPORT_SYMBOL(acpi_enable) * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode. * ******************************************************************************/ + acpi_status acpi_disable(void) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_disable); + ACPI_FUNCTION_TRACE("acpi_disable"); if (!acpi_gbl_FADT) { ACPI_WARNING((AE_INFO, "No FADT information present!")); @@ -136,8 +137,6 @@ acpi_status acpi_disable(void) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_disable) - /******************************************************************************* * * FUNCTION: acpi_enable_event @@ -150,12 +149,13 @@ ACPI_EXPORT_SYMBOL(acpi_disable) * DESCRIPTION: Enable an ACPI event (fixed) * ******************************************************************************/ + acpi_status acpi_enable_event(u32 event, u32 flags) { acpi_status status = AE_OK; u32 value; - ACPI_FUNCTION_TRACE(acpi_enable_event); + ACPI_FUNCTION_TRACE("acpi_enable_event"); /* Decode the Fixed Event */ @@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_enable_event) +EXPORT_SYMBOL(acpi_enable_event); /******************************************************************************* * @@ -208,12 +208,13 @@ ACPI_EXPORT_SYMBOL(acpi_enable_event) * DESCRIPTION: Set the type of an individual GPE * ******************************************************************************/ + acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) { acpi_status status = AE_OK; struct acpi_gpe_event_info *gpe_event_info; - ACPI_FUNCTION_TRACE(acpi_set_gpe_type); + ACPI_FUNCTION_TRACE("acpi_set_gpe_type"); /* Ensure that we have a valid GPE number */ @@ -235,7 +236,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_set_gpe_type) +EXPORT_SYMBOL(acpi_set_gpe_type); /******************************************************************************* * @@ -251,12 +252,13 @@ ACPI_EXPORT_SYMBOL(acpi_set_gpe_type) * DESCRIPTION: Enable an ACPI event (general purpose) * ******************************************************************************/ + acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) { acpi_status status = AE_OK; struct acpi_gpe_event_info *gpe_event_info; - ACPI_FUNCTION_TRACE(acpi_enable_gpe); + ACPI_FUNCTION_TRACE("acpi_enable_gpe"); /* Use semaphore lock if not executing at interrupt level */ @@ -286,7 +288,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_enable_gpe) +EXPORT_SYMBOL(acpi_enable_gpe); /******************************************************************************* * @@ -302,12 +304,13 @@ ACPI_EXPORT_SYMBOL(acpi_enable_gpe) * DESCRIPTION: Disable an ACPI event (general purpose) * ******************************************************************************/ + acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) { acpi_status status = AE_OK; struct acpi_gpe_event_info *gpe_event_info; - ACPI_FUNCTION_TRACE(acpi_disable_gpe); + ACPI_FUNCTION_TRACE("acpi_disable_gpe"); /* Use semaphore lock if not executing at interrupt level */ @@ -335,8 +338,6 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_disable_gpe) - /******************************************************************************* * * FUNCTION: acpi_disable_event @@ -349,12 +350,13 @@ ACPI_EXPORT_SYMBOL(acpi_disable_gpe) * DESCRIPTION: Disable an ACPI event (fixed) * ******************************************************************************/ + acpi_status acpi_disable_event(u32 event, u32 flags) { acpi_status status = AE_OK; u32 value; - ACPI_FUNCTION_TRACE(acpi_disable_event); + ACPI_FUNCTION_TRACE("acpi_disable_event"); /* Decode the Fixed Event */ @@ -390,7 +392,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_disable_event) +EXPORT_SYMBOL(acpi_disable_event); /******************************************************************************* * @@ -403,11 +405,12 @@ ACPI_EXPORT_SYMBOL(acpi_disable_event) * DESCRIPTION: Clear an ACPI event (fixed) * ******************************************************************************/ + acpi_status acpi_clear_event(u32 event) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_clear_event); + ACPI_FUNCTION_TRACE("acpi_clear_event"); /* Decode the Fixed Event */ @@ -426,7 +429,7 @@ acpi_status acpi_clear_event(u32 event) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_clear_event) +EXPORT_SYMBOL(acpi_clear_event); /******************************************************************************* * @@ -441,12 +444,13 @@ ACPI_EXPORT_SYMBOL(acpi_clear_event) * DESCRIPTION: Clear an ACPI event (general purpose) * ******************************************************************************/ + acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) { acpi_status status = AE_OK; struct acpi_gpe_event_info *gpe_event_info; - ACPI_FUNCTION_TRACE(acpi_clear_gpe); + ACPI_FUNCTION_TRACE("acpi_clear_gpe"); /* Use semaphore lock if not executing at interrupt level */ @@ -474,8 +478,6 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_clear_gpe) - #ifdef ACPI_FUTURE_USAGE /******************************************************************************* * @@ -490,11 +492,12 @@ ACPI_EXPORT_SYMBOL(acpi_clear_gpe) * DESCRIPTION: Obtains and returns the current status of the event * ******************************************************************************/ + acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_get_event_status); + ACPI_FUNCTION_TRACE("acpi_get_event_status"); if (!event_status) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -515,8 +518,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_event_status) - /******************************************************************************* * * FUNCTION: acpi_get_gpe_status @@ -532,6 +533,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_event_status) * DESCRIPTION: Get status of an event (general purpose) * ******************************************************************************/ + acpi_status acpi_get_gpe_status(acpi_handle gpe_device, u32 gpe_number, u32 flags, acpi_event_status * event_status) @@ -539,7 +541,7 @@ acpi_get_gpe_status(acpi_handle gpe_device, acpi_status status = AE_OK; struct acpi_gpe_event_info *gpe_event_info; - ACPI_FUNCTION_TRACE(acpi_get_gpe_status); + ACPI_FUNCTION_TRACE("acpi_get_gpe_status"); /* Use semaphore lock if not executing at interrupt level */ @@ -568,8 +570,6 @@ acpi_get_gpe_status(acpi_handle gpe_device, } return_ACPI_STATUS(status); } - -ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) #endif /* ACPI_FUTURE_USAGE */ /******************************************************************************* @@ -586,6 +586,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) * DESCRIPTION: Create and Install a block of GPE registers * ******************************************************************************/ + acpi_status acpi_install_gpe_block(acpi_handle gpe_device, struct acpi_generic_address *gpe_block_address, @@ -596,7 +597,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, struct acpi_namespace_node *node; struct acpi_gpe_block_info *gpe_block; - ACPI_FUNCTION_TRACE(acpi_install_gpe_block); + ACPI_FUNCTION_TRACE("acpi_install_gpe_block"); if ((!gpe_device) || (!gpe_block_address) || (!register_count)) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -635,7 +636,6 @@ acpi_install_gpe_block(acpi_handle gpe_device, obj_desc = acpi_ns_get_attached_object(node); if (!obj_desc) { - /* No object, create a new one */ obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_DEVICE); @@ -665,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_install_gpe_block) +EXPORT_SYMBOL(acpi_install_gpe_block); /******************************************************************************* * @@ -678,13 +678,14 @@ ACPI_EXPORT_SYMBOL(acpi_install_gpe_block) * DESCRIPTION: Remove a previously installed block of GPE registers * ******************************************************************************/ + acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) { union acpi_operand_object *obj_desc; acpi_status status; struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(acpi_remove_gpe_block); + ACPI_FUNCTION_TRACE("acpi_remove_gpe_block"); if (!gpe_device) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -720,4 +721,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block) +EXPORT_SYMBOL(acpi_remove_gpe_block); diff --git a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c index 83b12a9af..abf5caca9 100644 --- a/drivers/acpi/events/evxfregn.c +++ b/drivers/acpi/events/evxfregn.c @@ -42,6 +42,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -73,7 +75,7 @@ acpi_install_address_space_handler(acpi_handle device, struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_install_address_space_handler); + ACPI_FUNCTION_TRACE("acpi_install_address_space_handler"); /* Parameter validation */ @@ -112,7 +114,7 @@ acpi_install_address_space_handler(acpi_handle device, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler) +EXPORT_SYMBOL(acpi_install_address_space_handler); /******************************************************************************* * @@ -127,6 +129,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler) * DESCRIPTION: Remove a previously installed handler. * ******************************************************************************/ + acpi_status acpi_remove_address_space_handler(acpi_handle device, acpi_adr_space_type space_id, @@ -139,7 +142,7 @@ acpi_remove_address_space_handler(acpi_handle device, struct acpi_namespace_node *node; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_remove_address_space_handler); + ACPI_FUNCTION_TRACE("acpi_remove_address_space_handler"); /* Parameter validation */ @@ -155,11 +158,7 @@ acpi_remove_address_space_handler(acpi_handle device, /* Convert and validate the device handle */ node = acpi_ns_map_handle_to_node(device); - if (!node || - ((node->type != ACPI_TYPE_DEVICE) && - (node->type != ACPI_TYPE_PROCESSOR) && - (node->type != ACPI_TYPE_THERMAL) && - (node != acpi_gbl_root_node))) { + if (!node) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } @@ -177,18 +176,9 @@ acpi_remove_address_space_handler(acpi_handle device, handler_obj = obj_desc->device.handler; last_obj_ptr = &obj_desc->device.handler; while (handler_obj) { - /* We have a handler, see if user requested this one */ if (handler_obj->address_space.space_id == space_id) { - - /* Handler must be the same as the installed handler */ - - if (handler_obj->address_space.handler != handler) { - status = AE_BAD_PARAMETER; - goto unlock_and_exit; - } - /* Matched space_id, first dereference this in the Regions */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, @@ -239,7 +229,7 @@ acpi_remove_address_space_handler(acpi_handle device, /* The handler does not exist */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, - "Unable to remove address handler %p for %s(%X), DevNode %p, obj %p\n", + "Unable to remove address handler %p for %s(%X), dev_node %p, obj %p\n", handler, acpi_ut_get_region_name(space_id), space_id, node, obj_desc)); @@ -250,4 +240,4 @@ acpi_remove_address_space_handler(acpi_handle device, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_remove_address_space_handler) +EXPORT_SYMBOL(acpi_remove_address_space_handler); diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index c8341fa5f..a29782fe3 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c @@ -82,7 +82,7 @@ acpi_ex_add_table(struct acpi_table_header *table, struct acpi_table_desc table_info; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE(ex_add_table); + ACPI_FUNCTION_TRACE("ex_add_table"); /* Create an object to be the table handle */ @@ -100,7 +100,7 @@ acpi_ex_add_table(struct acpi_table_header *table, ACPI_MEMSET(&table_info, 0, sizeof(struct acpi_table_desc)); - table_info.type = ACPI_TABLE_ID_SSDT; + table_info.type = ACPI_TABLE_SSDT; table_info.pointer = table; table_info.length = (acpi_size) table->length; table_info.allocation = ACPI_MEM_ALLOCATED; @@ -110,7 +110,6 @@ acpi_ex_add_table(struct acpi_table_header *table, if (ACPI_FAILURE(status)) { if (status == AE_ALREADY_EXISTS) { - /* Table already exists, just return the handle */ return_ACPI_STATUS(AE_OK); @@ -122,7 +121,6 @@ acpi_ex_add_table(struct acpi_table_header *table, status = acpi_ns_load_table(table_info.installed_desc, parent_node); if (ACPI_FAILURE(status)) { - /* Uninstall table on error */ (void)acpi_tb_uninstall_table(table_info.installed_desc); @@ -162,7 +160,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, struct acpi_namespace_node *parameter_node = NULL; union acpi_operand_object *ddb_handle; - ACPI_FUNCTION_TRACE(ex_load_table_op); + ACPI_FUNCTION_TRACE("ex_load_table_op"); #if 0 /* @@ -171,7 +169,6 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, */ status = acpi_tb_match_signature(operand[0]->string.pointer, NULL); if (status == AE_OK) { - /* Signature matched -- don't allow override */ return_ACPI_STATUS(AE_ALREADY_EXISTS); @@ -214,8 +211,9 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, * location within the namespace where the table will be loaded. */ status = - acpi_ns_get_node(start_node, operand[3]->string.pointer, - ACPI_NS_SEARCH_PARENT, &parent_node); + acpi_ns_get_node_by_path(operand[3]->string.pointer, + start_node, ACPI_NS_SEARCH_PARENT, + &parent_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -236,8 +234,9 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, /* Find the node referenced by the parameter_path_string */ status = - acpi_ns_get_node(start_node, operand[4]->string.pointer, - ACPI_NS_SEARCH_PARENT, ¶meter_node); + acpi_ns_get_node_by_path(operand[4]->string.pointer, + start_node, ACPI_NS_SEARCH_PARENT, + ¶meter_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -253,7 +252,6 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, /* Parameter Data (optional) */ if (parameter_node) { - /* Store the parameter data into the optional parameter object */ status = acpi_ex_store(operand[5], @@ -266,10 +264,6 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, } } - ACPI_INFO((AE_INFO, - "Dynamic OEM Table Load - [%4.4s] OemId [%6.6s] OemTableId [%8.8s]", - table->signature, table->oem_id, table->oem_table_id)); - *return_desc = ddb_handle; return_ACPI_STATUS(status); } @@ -300,10 +294,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, struct acpi_table_header *table_ptr = NULL; acpi_physical_address address; struct acpi_table_header table_header; - acpi_integer temp; u32 i; - ACPI_FUNCTION_TRACE(ex_load_op); + ACPI_FUNCTION_TRACE("ex_load_op"); /* Object can be either an op_region or a Field */ @@ -329,7 +322,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, address = obj_desc->region.address; - /* Get part of the table header to get the table length */ + /* Get the table length from the table header */ table_header.length = 0; for (i = 0; i < 8; i++) { @@ -337,14 +330,11 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, (acpi_physical_address) (i + address), 8, - &temp); + ((u8 *) & + table_header) + i); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - - /* Get the one valid byte of the returned 64-bit value */ - - ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp; } /* Sanity check the table length */ @@ -355,7 +345,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, /* Allocate a buffer for the entire table */ - table_ptr = ACPI_ALLOCATE(table_header.length); + table_ptr = ACPI_MEM_ALLOCATE(table_header.length); if (!table_ptr) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -367,14 +357,11 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, (acpi_physical_address) (i + address), 8, - &temp); + ((u8 *) table_ptr + + i)); if (ACPI_FAILURE(status)) { goto cleanup; } - - /* Get the one valid byte of the returned 64-bit value */ - - ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp; } break; @@ -420,8 +407,12 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, /* The table must be either an SSDT or a PSDT */ - if ((!ACPI_COMPARE_NAME(table_ptr->signature, PSDT_SIG)) && - (!ACPI_COMPARE_NAME(table_ptr->signature, SSDT_SIG))) { + if ((!ACPI_STRNCMP(table_ptr->signature, + acpi_gbl_table_data[ACPI_TABLE_PSDT].signature, + acpi_gbl_table_data[ACPI_TABLE_PSDT].sig_length)) && + (!ACPI_STRNCMP(table_ptr->signature, + acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, + acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { ACPI_ERROR((AE_INFO, "Table has invalid signature [%4.4s], must be SSDT or PSDT", table_ptr->signature)); @@ -433,7 +424,6 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, status = acpi_ex_add_table(table_ptr, acpi_gbl_root_node, &ddb_handle); if (ACPI_FAILURE(status)) { - /* On error, table_ptr was deallocated above */ return_ACPI_STATUS(status); @@ -450,13 +440,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, return_ACPI_STATUS(status); } - ACPI_INFO((AE_INFO, - "Dynamic SSDT Load - OemId [%6.6s] OemTableId [%8.8s]", - table_ptr->oem_id, table_ptr->oem_table_id)); - cleanup: if (ACPI_FAILURE(status)) { - ACPI_FREE(table_ptr); + ACPI_MEM_FREE(table_ptr); } return_ACPI_STATUS(status); } @@ -479,7 +465,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) union acpi_operand_object *table_desc = ddb_handle; struct acpi_table_desc *table_info; - ACPI_FUNCTION_TRACE(ex_unload_table); + ACPI_FUNCTION_TRACE("ex_unload_table"); /* * Validate the handle @@ -502,6 +488,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) * (Offset contains the table_id) */ acpi_ns_delete_namespace_by_owner(table_info->owner_id); + acpi_ut_release_owner_id(&table_info->owner_id); /* Delete the table itself */ diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c index 544e81a6a..e6d52e12d 100644 --- a/drivers/acpi/executer/exconvrt.c +++ b/drivers/acpi/executer/exconvrt.c @@ -79,7 +79,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, u32 count; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ex_convert_to_integer, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_convert_to_integer", obj_desc); switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: @@ -170,9 +170,6 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, return_ACPI_STATUS(AE_NO_MEMORY); } - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n", - ACPI_FORMAT_UINT64(result))); - /* Save the Result */ return_desc->integer.value = result; @@ -202,7 +199,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc, union acpi_operand_object *return_desc; u8 *new_buf; - ACPI_FUNCTION_TRACE_PTR(ex_convert_to_buffer, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_convert_to_buffer", obj_desc); switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_BUFFER: @@ -322,7 +319,6 @@ acpi_ex_convert_to_ascii(acpi_integer integer, remainder = 0; for (i = decimal_length; i > 0; i--) { - /* Divide by nth factor of 10 */ digit = integer; @@ -350,7 +346,6 @@ acpi_ex_convert_to_ascii(acpi_integer integer, hex_length = (acpi_native_uint) ACPI_MUL_2(data_width); for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) { - /* Get one hex digit, most significant digits first */ string[k] = @@ -405,7 +400,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, u16 base = 16; u8 separator = ','; - ACPI_FUNCTION_TRACE_PTR(ex_convert_to_string, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_convert_to_string", obj_desc); switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_STRING: @@ -572,7 +567,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_convert_to_target_type); + ACPI_FUNCTION_TRACE("ex_convert_to_target_type"); /* Default behavior */ @@ -662,7 +657,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, default: ACPI_ERROR((AE_INFO, - "Unknown Target type ID 0x%X AmlOpcode %X DestType %s", + "Unknown Target type ID 0x%X aml_opcode %X dest_type %s", GET_CURRENT_ARG_TYPE(walk_state->op_info-> runtime_args), walk_state->opcode, diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 34eec82c1..680575402 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c @@ -69,7 +69,7 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state) struct acpi_namespace_node *alias_node; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_create_alias); + ACPI_FUNCTION_TRACE("ex_create_alias"); /* Get the source/alias operands (both namespace nodes) */ @@ -164,7 +164,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state) acpi_status status; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE(ex_create_event); + ACPI_FUNCTION_TRACE("ex_create_event"); obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_EVENT); if (!obj_desc) { @@ -177,7 +177,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state) * that the event is created in an unsignalled state */ status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, - &obj_desc->event.os_semaphore); + &obj_desc->event.semaphore); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -216,7 +216,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) acpi_status status = AE_OK; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE_PTR(ex_create_mutex, ACPI_WALK_OPERANDS); + ACPI_FUNCTION_TRACE_PTR("ex_create_mutex", ACPI_WALK_OPERANDS); /* Create the new mutex object */ @@ -226,9 +226,12 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) goto cleanup; } - /* Create the actual OS Mutex */ - - status = acpi_os_create_mutex(&obj_desc->mutex.os_mutex); + /* + * Create the actual OS semaphore. + * One unit max to make it a mutex, with one initial unit to allow + * the mutex to be acquired. + */ + status = acpi_os_create_semaphore(1, 1, &obj_desc->mutex.semaphore); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -240,9 +243,8 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) obj_desc->mutex.node = (struct acpi_namespace_node *)walk_state->operands[0]; - status = - acpi_ns_attach_object(obj_desc->mutex.node, obj_desc, - ACPI_TYPE_MUTEX); + status = acpi_ns_attach_object(obj_desc->mutex.node, + obj_desc, ACPI_TYPE_MUTEX); cleanup: /* @@ -278,7 +280,7 @@ acpi_ex_create_region(u8 * aml_start, struct acpi_namespace_node *node; union acpi_operand_object *region_obj2; - ACPI_FUNCTION_TRACE(ex_create_region); + ACPI_FUNCTION_TRACE("ex_create_region"); /* Get the Namespace Node */ @@ -298,7 +300,7 @@ acpi_ex_create_region(u8 * aml_start, */ if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && (region_space < ACPI_USER_REGION_BEGIN)) { - ACPI_ERROR((AE_INFO, "Invalid AddressSpace type %X", + ACPI_ERROR((AE_INFO, "Invalid address_space type %X", region_space)); return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); } @@ -362,7 +364,7 @@ acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state) struct acpi_table_header *table; union acpi_operand_object *region_obj2; - ACPI_FUNCTION_TRACE(ex_create_table_region); + ACPI_FUNCTION_TRACE("ex_create_table_region"); /* Get the Node from the object stack */ @@ -450,7 +452,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state) union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ex_create_processor, walk_state); + ACPI_FUNCTION_TRACE_PTR("ex_create_processor", walk_state); /* Create the processor object */ @@ -462,9 +464,9 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state) /* Initialize the processor object from the operands */ obj_desc->processor.proc_id = (u8) operand[1]->integer.value; - obj_desc->processor.length = (u8) operand[3]->integer.value; obj_desc->processor.address = (acpi_io_address) operand[2]->integer.value; + obj_desc->processor.length = (u8) operand[3]->integer.value; /* Install the processor object in the parent Node */ @@ -497,7 +499,7 @@ acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state) acpi_status status; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE_PTR(ex_create_power_resource, walk_state); + ACPI_FUNCTION_TRACE_PTR("ex_create_power_resource", walk_state); /* Create the power resource object */ @@ -547,7 +549,7 @@ acpi_ex_create_method(u8 * aml_start, acpi_status status; u8 method_flags; - ACPI_FUNCTION_TRACE_PTR(ex_create_method, walk_state); + ACPI_FUNCTION_TRACE_PTR("ex_create_method", walk_state); /* Create a new method object */ @@ -562,7 +564,7 @@ acpi_ex_create_method(u8 * aml_start, obj_desc->method.aml_length = aml_length; /* - * Disassemble the method flags. Split off the Arg Count + * Disassemble the method flags. Split off the Arg Count * for efficiency */ method_flags = (u8) operand[1]->integer.value; @@ -573,19 +575,21 @@ acpi_ex_create_method(u8 * aml_start, (u8) (method_flags & AML_METHOD_ARG_COUNT); /* - * Get the sync_level. If method is serialized, a mutex will be + * Get the concurrency count. If required, a semaphore will be * created for this method when it is parsed. */ if (acpi_gbl_all_methods_serialized) { - obj_desc->method.sync_level = 0; + obj_desc->method.concurrency = 1; obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; } else if (method_flags & AML_METHOD_SERIALIZED) { /* - * ACPI 1.0: sync_level = 0 - * ACPI 2.0: sync_level = sync_level in method declaration + * ACPI 1.0: Concurrency = 1 + * ACPI 2.0: Concurrency = (sync_level (in method declaration) + 1) */ - obj_desc->method.sync_level = (u8) - ((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4); + obj_desc->method.concurrency = (u8) + (((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1); + } else { + obj_desc->method.concurrency = ACPI_INFINITE_CONCURRENCY; } /* Attach the new object to the method Node */ diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 2450943ad..a7cca8d4f 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c @@ -61,10 +61,6 @@ static void acpi_ex_out_pointer(char *title, void *value); static void acpi_ex_out_address(char *title, acpi_physical_address value); -static void -acpi_ex_dump_object(union acpi_operand_object *obj_desc, - struct acpi_exdump_info *info); - static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); static void @@ -118,14 +114,14 @@ static struct acpi_exdump_info acpi_ex_dump_device[4] = { static struct acpi_exdump_info acpi_ex_dump_event[2] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.os_semaphore), "OsSemaphore"} + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"} }; static struct acpi_exdump_info acpi_ex_dump_method[8] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "ParamCount"}, - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.sync_level), "Sync Level"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.mutex), "Mutex"}, + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"}, + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, @@ -138,7 +134,7 @@ static struct acpi_exdump_info acpi_ex_dump_mutex[5] = { {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"}, {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth), "Acquire Depth"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"} + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"} }; static struct acpi_exdump_info acpi_ex_dump_region[7] = { @@ -267,10 +263,12 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} }; -static struct acpi_exdump_info acpi_ex_dump_node[5] = { +static struct acpi_exdump_info acpi_ex_dump_node[6] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, + {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count), + "Reference Count"}, {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} }; @@ -332,7 +330,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, if (!info) { acpi_os_printf - ("ExDumpObject: Display not implemented for object type %s\n", + ("ex_dump_object: Display not implemented for object type %s\n", acpi_ut_get_object_type_name(obj_desc)); return; } @@ -456,7 +454,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) u32 length; u32 index; - ACPI_FUNCTION_NAME(ex_dump_operand) + ACPI_FUNCTION_NAME("ex_dump_operand") if (! ((ACPI_LV_EXEC & acpi_dbg_level) @@ -465,7 +463,6 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) } if (!obj_desc) { - /* This could be a null element of a package */ ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n")); @@ -525,7 +522,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case AML_REF_OF_OP: - acpi_os_printf("Reference: (RefOf) %p\n", + acpi_os_printf("Reference: (ref_of) %p\n", obj_desc->reference.object); break; @@ -535,7 +532,6 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) obj_desc->reference.offset); if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { - /* Value is an Integer */ acpi_os_printf(" value is [%8.8X%8.8x]", @@ -614,7 +610,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case ACPI_TYPE_PACKAGE: - acpi_os_printf("Package [Len %X] ElementArray %p\n", + acpi_os_printf("Package [Len %X] element_array %p\n", obj_desc->package.count, obj_desc->package.elements); @@ -666,13 +662,13 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case ACPI_TYPE_LOCAL_BANK_FIELD: - acpi_os_printf("BankField\n"); + acpi_os_printf("bank_field\n"); break; case ACPI_TYPE_LOCAL_REGION_FIELD: acpi_os_printf - ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", + ("region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", obj_desc->field.bit_length, obj_desc->field.access_byte_width, obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, @@ -685,12 +681,12 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) case ACPI_TYPE_LOCAL_INDEX_FIELD: - acpi_os_printf("IndexField\n"); + acpi_os_printf("index_field\n"); break; case ACPI_TYPE_BUFFER_FIELD: - acpi_os_printf("BufferField: %X bits at byte %X bit %X of\n", + acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n", obj_desc->buffer_field.bit_length, obj_desc->buffer_field.base_byte_offset, obj_desc->buffer_field.start_field_bit_offset); @@ -781,7 +777,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, { acpi_native_uint i; - ACPI_FUNCTION_NAME(ex_dump_operands); + ACPI_FUNCTION_NAME("ex_dump_operands"); if (!ident) { ident = "?"; @@ -905,7 +901,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) acpi_os_printf("Could not convert name to pathname\n"); } else { acpi_os_printf("%s\n", (char *)ret_buf.pointer); - ACPI_FREE(ret_buf.pointer); + ACPI_MEM_FREE(ret_buf.pointer); } } else if (obj_desc->reference.object) { acpi_os_printf("\nReferenced Object: %p\n", @@ -1021,7 +1017,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, void acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) { - ACPI_FUNCTION_TRACE(ex_dump_object_descriptor); + ACPI_FUNCTION_TRACE("ex_dump_object_descriptor"); if (!obj_desc) { return_VOID; @@ -1050,7 +1046,7 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { acpi_os_printf - ("ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", + ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", obj_desc, acpi_ut_get_descriptor_name(obj_desc)); return_VOID; } diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index 9ea9c3a67..e259201ce 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c @@ -73,7 +73,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, void *buffer; u8 locked; - ACPI_FUNCTION_TRACE_PTR(ex_read_data_from_field, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_read_data_from_field", obj_desc); /* Parameter validation */ @@ -142,7 +142,6 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, length = (acpi_size) ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.bit_length); if (length > acpi_gbl_integer_byte_width) { - /* Field is too large for an Integer, create a Buffer instead */ buffer_desc = acpi_ut_create_buffer_object(length); @@ -164,11 +163,11 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, } ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "FieldRead [TO]: Obj %p, Type %X, Buf %p, ByteLen %X\n", + "field_read [TO]: Obj %p, Type %X, Buf %p, byte_len %X\n", obj_desc, ACPI_GET_OBJECT_TYPE(obj_desc), buffer, (u32) length)); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "FieldRead [FROM]: BitLen %X, BitOff %X, ByteOff %X\n", + "field_read [FROM]: bit_len %X, bit_off %X, byte_off %X\n", obj_desc->common_field.bit_length, obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.base_byte_offset)); @@ -220,7 +219,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, u8 locked; union acpi_operand_object *buffer_desc; - ACPI_FUNCTION_TRACE_PTR(ex_write_data_to_field, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_write_data_to_field", obj_desc); /* Parameter validation */ @@ -330,10 +329,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length); if (length < required_length) { - /* We need to create a new buffer */ - new_buffer = ACPI_ALLOCATE_ZEROED(required_length); + new_buffer = ACPI_MEM_CALLOCATE(required_length); if (!new_buffer) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -349,14 +347,14 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, } ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "FieldWrite [FROM]: Obj %p (%s:%X), Buf %p, ByteLen %X\n", + "field_write [FROM]: Obj %p (%s:%X), Buf %p, byte_len %X\n", source_desc, acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE (source_desc)), ACPI_GET_OBJECT_TYPE(source_desc), buffer, length)); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "FieldWrite [TO]: Obj %p (%s:%X), BitLen %X, BitOff %X, ByteOff %X\n", + "field_write [TO]: Obj %p (%s:%X), bit_len %X, bit_off %X, byte_off %X\n", obj_desc, acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc)), ACPI_GET_OBJECT_TYPE(obj_desc), @@ -377,7 +375,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, /* Free temporary buffer if we used one */ if (new_buffer) { - ACPI_FREE(new_buffer); + ACPI_MEM_FREE(new_buffer); } return_ACPI_STATUS(status); diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index 40f0bee6f..bd1af35f7 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c @@ -87,7 +87,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, acpi_status status = AE_OK; union acpi_operand_object *rgn_desc; - ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset); + ACPI_FUNCTION_TRACE_U32("ex_setup_region", field_datum_byte_offset); rgn_desc = obj_desc->common_field.region_obj; @@ -112,18 +112,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, } } - /* Exit if Address/Length have been disallowed by the host OS */ - - if (rgn_desc->common.flags & AOPOBJ_INVALID) { - return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS); - } - - /* - * Exit now for SMBus address space, it has a non-linear address space - * and the request cannot be directly validated - */ if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS) { - /* SMBus has a non-linear address space */ return_ACPI_STATUS(AE_OK); @@ -145,10 +134,10 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, * length of one field datum (access width) must fit within the region. * (Region length is specified in bytes) */ - if (rgn_desc->region.length < - (obj_desc->common_field.base_byte_offset + - field_datum_byte_offset + - obj_desc->common_field.access_byte_width)) { + if (rgn_desc->region.length < (obj_desc->common_field.base_byte_offset + + field_datum_byte_offset + + obj_desc->common_field. + access_byte_width)) { if (acpi_gbl_enable_interpreter_slack) { /* * Slack mode only: We will go ahead and allow access to this @@ -228,7 +217,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, union acpi_operand_object *rgn_desc; acpi_physical_address address; - ACPI_FUNCTION_TRACE(ex_access_region); + ACPI_FUNCTION_TRACE("ex_access_region"); /* * Ensure that the region operands are fully evaluated and verify @@ -257,7 +246,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, } ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD, - " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n", + " Region [%s:%X], Width %X, byte_base %X, Offset %X at %8.8X%8.8X\n", acpi_ut_get_region_name(rgn_desc->region. space_id), rgn_desc->region.space_id, @@ -363,7 +352,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, acpi_status status; acpi_integer local_value; - ACPI_FUNCTION_TRACE_U32(ex_field_datum_io, field_datum_byte_offset); + ACPI_FUNCTION_TRACE_U32("ex_field_datum_io", field_datum_byte_offset); if (read_write == ACPI_READ) { if (!value) { @@ -498,11 +487,10 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, } ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "I/O to Data Register: ValuePtr %p\n", + "I/O to Data Register: value_ptr %p\n", value)); if (read_write == ACPI_READ) { - /* Read the datum from the data_register */ status = @@ -571,7 +559,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, acpi_integer merged_value; acpi_integer current_value; - ACPI_FUNCTION_TRACE_U32(ex_write_with_update_rule, mask); + ACPI_FUNCTION_TRACE_U32("ex_write_with_update_rule", mask); /* Start with the new bits */ @@ -580,7 +568,6 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, /* If the mask is all ones, we don't need to worry about the update rule */ if (mask != ACPI_INTEGER_MAX) { - /* Decode the update rule */ switch (obj_desc->common_field. @@ -627,7 +614,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, default: ACPI_ERROR((AE_INFO, - "Unknown UpdateRule value: %X", + "Unknown update_rule value: %X", (obj_desc->common_field. field_flags & AML_FIELD_UPDATE_RULE_MASK))); @@ -636,7 +623,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, } ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "Mask %8.8X%8.8X, DatumOffset %X, Width %X, Value %8.8X%8.8X, MergedValue %8.8X%8.8X\n", + "Mask %8.8X%8.8X, datum_offset %X, Width %X, Value %8.8X%8.8X, merged_value %8.8X%8.8X\n", ACPI_FORMAT_UINT64(mask), field_datum_byte_offset, obj_desc->common_field.access_byte_width, @@ -679,7 +666,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, u32 field_datum_count; u32 i; - ACPI_FUNCTION_TRACE(ex_extract_from_field); + ACPI_FUNCTION_TRACE("ex_extract_from_field"); /* Validate target buffer and clear it */ @@ -717,7 +704,6 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, /* Read the rest of the field */ for (i = 1; i < field_datum_count; i++) { - /* Get next input datum from the field */ field_offset += obj_desc->common_field.access_byte_width; @@ -727,23 +713,11 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, return_ACPI_STATUS(status); } - /* - * Merge with previous datum if necessary. - * - * Note: Before the shift, check if the shift value will be larger than - * the integer size. If so, there is no need to perform the operation. - * This avoids the differences in behavior between different compilers - * concerning shift values larger than the target data width. - */ - if ((obj_desc->common_field.access_bit_width - - obj_desc->common_field.start_field_bit_offset) < - ACPI_INTEGER_BIT_SIZE) { - merged_datum |= - raw_datum << (obj_desc->common_field. - access_bit_width - - obj_desc->common_field. - start_field_bit_offset); - } + /* Merge with previous datum if necessary */ + + merged_datum |= raw_datum << + (obj_desc->common_field.access_bit_width - + obj_desc->common_field.start_field_bit_offset); if (i == datum_count) { break; @@ -797,7 +771,6 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, { acpi_status status; acpi_integer mask; - acpi_integer width_mask; acpi_integer merged_datum; acpi_integer raw_datum = 0; u32 field_offset = 0; @@ -807,7 +780,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, u32 field_datum_count; u32 i; - ACPI_FUNCTION_TRACE(ex_insert_into_field); + ACPI_FUNCTION_TRACE("ex_insert_into_field"); /* Validate input buffer */ @@ -820,32 +793,17 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, return_ACPI_STATUS(AE_BUFFER_OVERFLOW); } - /* - * Create the bitmasks used for bit insertion. - * Note: This if/else is used to bypass compiler differences with the - * shift operator - */ - if (obj_desc->common_field.access_bit_width == ACPI_INTEGER_BIT_SIZE) { - width_mask = ACPI_INTEGER_MAX; - } else { - width_mask = - ACPI_MASK_BITS_ABOVE(obj_desc->common_field. - access_bit_width); - } - - mask = width_mask & - ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset); - /* Compute the number of datums (access width data items) */ - datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, - obj_desc->common_field.access_bit_width); - - field_datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length + - obj_desc->common_field. - start_field_bit_offset, - obj_desc->common_field. - access_bit_width); + mask = + ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset); + datum_count = + ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, + obj_desc->common_field.access_bit_width); + field_datum_count = + ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length + + obj_desc->common_field.start_field_bit_offset, + obj_desc->common_field.access_bit_width); /* Get initial Datum from the input buffer */ @@ -859,7 +817,6 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, /* Write the entire field */ for (i = 1; i < field_datum_count; i++) { - /* Write merged datum to the target field */ merged_datum &= mask; @@ -870,30 +827,13 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, return_ACPI_STATUS(status); } - field_offset += obj_desc->common_field.access_byte_width; + /* Start new output datum by merging with previous input datum */ - /* - * Start new output datum by merging with previous input datum - * if necessary. - * - * Note: Before the shift, check if the shift value will be larger than - * the integer size. If so, there is no need to perform the operation. - * This avoids the differences in behavior between different compilers - * concerning shift values larger than the target data width. - */ - if ((obj_desc->common_field.access_bit_width - - obj_desc->common_field.start_field_bit_offset) < - ACPI_INTEGER_BIT_SIZE) { - merged_datum = - raw_datum >> (obj_desc->common_field. - access_bit_width - - obj_desc->common_field. - start_field_bit_offset); - } else { - merged_datum = 0; - } - - mask = width_mask; + field_offset += obj_desc->common_field.access_byte_width; + merged_datum = raw_datum >> + (obj_desc->common_field.access_bit_width - + obj_desc->common_field.start_field_bit_offset); + mask = ACPI_INTEGER_MAX; if (i == datum_count) { break; diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index bd98aab01..48c18d292 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.c @@ -72,7 +72,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, union acpi_operand_object *reference_obj; union acpi_operand_object *referenced_obj; - ACPI_FUNCTION_TRACE_PTR(ex_get_object_reference, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_get_object_reference", obj_desc); *return_desc = NULL; @@ -168,7 +168,7 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, acpi_size length1; acpi_size new_length; - ACPI_FUNCTION_TRACE(ex_concat_template); + ACPI_FUNCTION_TRACE("ex_concat_template"); /* * Find the end_tag descriptor in each resource template. @@ -250,7 +250,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, char *new_buf; acpi_status status; - ACPI_FUNCTION_TRACE(ex_do_concatenate); + ACPI_FUNCTION_TRACE("ex_do_concatenate"); /* * Convert the second operand if necessary. The first operand @@ -445,24 +445,10 @@ acpi_ex_do_math_op(u16 opcode, acpi_integer integer0, acpi_integer integer1) case AML_SHIFT_LEFT_OP: /* shift_left (Operand, shift_count, Result) */ - /* - * We need to check if the shiftcount is larger than the integer bit - * width since the behavior of this is not well-defined in the C language. - */ - if (integer1 >= acpi_gbl_integer_bit_width) { - return (0); - } return (integer0 << integer1); case AML_SHIFT_RIGHT_OP: /* shift_right (Operand, shift_count, Result) */ - /* - * We need to check if the shiftcount is larger than the integer bit - * width since the behavior of this is not well-defined in the C language. - */ - if (integer1 >= acpi_gbl_integer_bit_width) { - return (0); - } return (integer0 >> integer1); case AML_SUBTRACT_OP: /* Subtract (Integer0, Integer1, Result) */ @@ -503,7 +489,7 @@ acpi_ex_do_logical_numeric_op(u16 opcode, acpi_status status = AE_OK; u8 local_result = FALSE; - ACPI_FUNCTION_TRACE(ex_do_logical_numeric_op); + ACPI_FUNCTION_TRACE("ex_do_logical_numeric_op"); switch (opcode) { case AML_LAND_OP: /* LAnd (Integer0, Integer1) */ @@ -571,7 +557,7 @@ acpi_ex_do_logical_op(u16 opcode, u8 local_result = FALSE; int compare; - ACPI_FUNCTION_TRACE(ex_do_logical_op); + ACPI_FUNCTION_TRACE("ex_do_logical_op"); /* * Convert the second operand if necessary. The first operand @@ -663,7 +649,6 @@ acpi_ex_do_logical_op(u16 opcode, /* Length and all bytes must be equal */ if ((length0 == length1) && (compare == 0)) { - /* Length and all bytes match ==> TRUE */ local_result = TRUE; diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index 3a39c2e8e..f843b22e2 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c @@ -61,7 +61,7 @@ acpi_ex_link_mutex(union acpi_operand_object *obj_desc, * * RETURN: None * - * DESCRIPTION: Remove a mutex from the "AcquiredMutex" list + * DESCRIPTION: Remove a mutex from the "acquired_mutex" list * ******************************************************************************/ @@ -95,7 +95,7 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc) * * RETURN: None * - * DESCRIPTION: Add a mutex to the "AcquiredMutex" list for this walk + * DESCRIPTION: Add a mutex to the "acquired_mutex" list for this walk * ******************************************************************************/ @@ -144,7 +144,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, { acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ex_acquire_mutex, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_acquire_mutex", obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -161,25 +161,24 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, /* * Current Sync must be less than or equal to the sync level of the - * mutex. This mechanism provides some deadlock prevention + * mutex. This mechanism provides some deadlock prevention */ if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { ACPI_ERROR((AE_INFO, - "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%d)", - acpi_ut_get_node_name(obj_desc->mutex.node), - walk_state->thread->current_sync_level)); + "Cannot acquire Mutex [%4.4s], incorrect sync_level", + acpi_ut_get_node_name(obj_desc->mutex.node))); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } /* Support for multiple acquires by the owning thread */ if (obj_desc->mutex.owner_thread) { - /* Special case for Global Lock, allow all threads */ if ((obj_desc->mutex.owner_thread->thread_id == walk_state->thread->thread_id) || - (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK)) { + (obj_desc->mutex.semaphore == + acpi_gbl_global_lock_semaphore)) { /* * The mutex is already owned by this thread, * just increment the acquisition depth @@ -193,7 +192,6 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, status = acpi_ex_system_acquire_mutex(time_desc, obj_desc); if (ACPI_FAILURE(status)) { - /* Includes failure from a timeout on time_desc */ return_ACPI_STATUS(status); @@ -234,7 +232,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, { acpi_status status; - ACPI_FUNCTION_TRACE(ex_release_mutex); + ACPI_FUNCTION_TRACE("ex_release_mutex"); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -264,12 +262,12 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, */ if ((obj_desc->mutex.owner_thread->thread_id != walk_state->thread->thread_id) - && (obj_desc->mutex.os_mutex != ACPI_GLOBAL_LOCK)) { + && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { ACPI_ERROR((AE_INFO, "Thread %X cannot release Mutex [%4.4s] acquired by thread %X", - (u32) walk_state->thread->thread_id, + walk_state->thread->thread_id, acpi_ut_get_node_name(obj_desc->mutex.node), - (u32) obj_desc->mutex.owner_thread->thread_id)); + obj_desc->mutex.owner_thread->thread_id)); return_ACPI_STATUS(AE_AML_NOT_OWNER); } @@ -279,7 +277,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, */ if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { ACPI_ERROR((AE_INFO, - "Cannot release Mutex [%4.4s], incorrect SyncLevel", + "Cannot release Mutex [%4.4s], incorrect sync_level", acpi_ut_get_node_name(obj_desc->mutex.node))); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } @@ -288,7 +286,6 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, obj_desc->mutex.acquisition_depth--; if (obj_desc->mutex.acquisition_depth != 0) { - /* Just decrement the depth and return */ return_ACPI_STATUS(AE_OK); diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index d3d703646..054fe5e1a 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.c @@ -77,7 +77,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) char *name_string; u32 size_needed; - ACPI_FUNCTION_TRACE(ex_allocate_name_string); + ACPI_FUNCTION_TRACE("ex_allocate_name_string"); /* * Allow room for all \ and ^ prefixes, all segments and a multi_name_prefix. @@ -85,7 +85,6 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) * This may actually be somewhat longer than needed. */ if (prefix_count == ACPI_UINT32_MAX) { - /* Special case for root */ size_needed = 1 + (ACPI_NAME_SIZE * num_name_segs) + 2 + 1; @@ -98,7 +97,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) * Allocate a buffer for the name. * This buffer must be deleted by the caller! */ - name_string = ACPI_ALLOCATE(size_needed); + name_string = ACPI_MEM_ALLOCATE(size_needed); if (!name_string) { ACPI_ERROR((AE_INFO, "Could not allocate size %d", size_needed)); @@ -120,13 +119,11 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) /* Set up Dual or Multi prefixes if needed */ if (num_name_segs > 2) { - /* Set up multi prefixes */ *temp_ptr++ = AML_MULTI_NAME_PREFIX_OP; *temp_ptr++ = (char)num_name_segs; } else if (2 == num_name_segs) { - /* Set up dual prefixes */ *temp_ptr++ = AML_DUAL_NAME_PREFIX; @@ -162,7 +159,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) u32 index; char char_buf[5]; - ACPI_FUNCTION_TRACE(ex_name_segment); + ACPI_FUNCTION_TRACE("ex_name_segment"); /* * If first character is a digit, then we know that we aren't looking at a @@ -179,7 +176,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) for (index = 0; (index < ACPI_NAME_SIZE) - && (acpi_ut_valid_acpi_char(*aml_address, 0)); index++) { + && (acpi_ut_valid_acpi_character(*aml_address)); index++) { char_buf[index] = *aml_address++; ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "%c\n", char_buf[index])); } @@ -187,7 +184,6 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) /* Valid name segment */ if (index == 4) { - /* Found 4 valid characters */ char_buf[4] = '\0'; @@ -253,12 +249,11 @@ acpi_ex_get_name_string(acpi_object_type data_type, u32 prefix_count = 0; u8 has_prefix = FALSE; - ACPI_FUNCTION_TRACE_PTR(ex_get_name_string, aml_address); + ACPI_FUNCTION_TRACE_PTR("ex_get_name_string", aml_address); if (ACPI_TYPE_LOCAL_REGION_FIELD == data_type || ACPI_TYPE_LOCAL_BANK_FIELD == data_type || ACPI_TYPE_LOCAL_INDEX_FIELD == data_type) { - /* Disallow prefixes for types associated with field_unit names */ name_string = acpi_ex_allocate_name_string(0, 1); @@ -277,7 +272,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, case AML_ROOT_PREFIX: ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "RootPrefix(\\) at %p\n", + "root_prefix(\\) at %p\n", aml_address)); /* @@ -295,7 +290,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, do { ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "ParentPrefix (^) at %p\n", + "parent_prefix (^) at %p\n", aml_address)); aml_address++; @@ -319,7 +314,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, case AML_DUAL_NAME_PREFIX: ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "DualNamePrefix at %p\n", + "dual_name_prefix at %p\n", aml_address)); aml_address++; @@ -346,7 +341,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, case AML_MULTI_NAME_PREFIX_OP: ACPI_DEBUG_PRINT((ACPI_DB_LOAD, - "MultiNamePrefix at %p\n", + "multi_name_prefix at %p\n", aml_address)); /* Fetch count of segments remaining in name path */ @@ -382,7 +377,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, if (prefix_count == ACPI_UINT32_MAX) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "NameSeg is \"\\\" followed by NULL\n")); + "name_seg is \"\\\" followed by NULL\n")); } /* Consume the NULL byte */ @@ -415,7 +410,6 @@ acpi_ex_get_name_string(acpi_object_type data_type, } if (AE_CTRL_PENDING == status && has_prefix) { - /* Ran out of segments after processing a prefix */ ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string)); @@ -424,7 +418,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, if (ACPI_FAILURE(status)) { if (name_string) { - ACPI_FREE(name_string); + ACPI_MEM_FREE(name_string); } return_ACPI_STATUS(status); } diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 6374d8be8..23d0823bc 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c @@ -89,7 +89,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) acpi_status status = AE_OK; union acpi_operand_object *return_desc = NULL; - ACPI_FUNCTION_TRACE_STR(ex_opcode_0A_0T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_0A_0T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ @@ -150,7 +150,7 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) union acpi_operand_object **operand = &walk_state->operands[0]; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_0T_0R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ @@ -216,7 +216,7 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) acpi_status status = AE_OK; union acpi_operand_object **operand = &walk_state->operands[0]; - ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_1T_0R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_1A_1T_0R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ @@ -264,7 +264,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) acpi_integer power_of_ten; acpi_integer digit; - ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_1T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_1A_1T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ @@ -322,9 +322,8 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) /* Since the bit position is one-based, subtract from 33 (65) */ - return_desc->integer.value = - temp32 == - 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - temp32; + return_desc->integer.value = temp32 == 0 ? 0 : + (ACPI_INTEGER_BIT_SIZE + 1) - temp32; break; case AML_FROM_BCD_OP: /* from_bcd (BCDValue, Result) */ @@ -343,7 +342,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) for (i = 0; (i < acpi_gbl_integer_nybble_width) && (digit > 0); i++) { - /* Get the least significant 4-bit BCD digit */ temp32 = ((u32) digit) & 0xF; @@ -489,7 +487,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) status = acpi_ex_convert_to_string(operand[0], &return_desc, ACPI_EXPLICIT_CONVERT_DECIMAL); if (return_desc == operand[0]) { - /* No conversion performed, add ref to handle return value */ acpi_ut_add_reference(return_desc); } @@ -500,7 +497,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) status = acpi_ex_convert_to_string(operand[0], &return_desc, ACPI_EXPLICIT_CONVERT_HEX); if (return_desc == operand[0]) { - /* No conversion performed, add ref to handle return value */ acpi_ut_add_reference(return_desc); } @@ -510,7 +506,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) status = acpi_ex_convert_to_buffer(operand[0], &return_desc); if (return_desc == operand[0]) { - /* No conversion performed, add ref to handle return value */ acpi_ut_add_reference(return_desc); } @@ -521,7 +516,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) status = acpi_ex_convert_to_integer(operand[0], &return_desc, ACPI_ANY_BASE); if (return_desc == operand[0]) { - /* No conversion performed, add ref to handle return value */ acpi_ut_add_reference(return_desc); } @@ -547,7 +541,6 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) } if (ACPI_SUCCESS(status)) { - /* Store the return value computed above into the target object */ status = acpi_ex_store(return_desc, operand[1], walk_state); @@ -555,18 +548,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) cleanup: + if (!walk_state->result_obj) { + walk_state->result_obj = return_desc; + } + /* Delete return object on error */ if (ACPI_FAILURE(status)) { acpi_ut_remove_reference(return_desc); } - /* Save return object on success */ - - else if (!walk_state->result_obj) { - walk_state->result_obj = return_desc; - } - return_ACPI_STATUS(status); } @@ -591,7 +582,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) u32 type; acpi_integer value; - ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_0T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_1A_0T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ @@ -634,7 +625,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) temp_desc = operand[0]; if (ACPI_GET_DESCRIPTOR_TYPE(temp_desc) == ACPI_DESC_TYPE_OPERAND) { - /* Internal reference object - prevent deletion */ acpi_ut_add_reference(temp_desc); @@ -699,7 +689,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) if (ACPI_FAILURE(status)) { goto cleanup; } - /* Allocate a descriptor to hold the type. */ return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); @@ -788,25 +777,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) /* Check for a method local or argument, or standalone String */ - if (ACPI_GET_DESCRIPTOR_TYPE(operand[0]) == + if (ACPI_GET_DESCRIPTOR_TYPE(operand[0]) != ACPI_DESC_TYPE_NAMED) { - temp_desc = - acpi_ns_get_attached_object((struct - acpi_namespace_node *) - operand[0]); - if (temp_desc - && - ((ACPI_GET_OBJECT_TYPE(temp_desc) == - ACPI_TYPE_STRING) - || (ACPI_GET_OBJECT_TYPE(temp_desc) == - ACPI_TYPE_LOCAL_REFERENCE))) { - operand[0] = temp_desc; - acpi_ut_add_reference(temp_desc); - } else { - status = AE_AML_OPERAND_TYPE; - goto cleanup; - } - } else { switch (ACPI_GET_OBJECT_TYPE(operand[0])) { case ACPI_TYPE_LOCAL_REFERENCE: /* @@ -855,35 +827,26 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) break; case ACPI_TYPE_STRING: - break; - default: - status = AE_AML_OPERAND_TYPE; - goto cleanup; - } - } - - if (ACPI_GET_DESCRIPTOR_TYPE(operand[0]) != - ACPI_DESC_TYPE_NAMED) { - if (ACPI_GET_OBJECT_TYPE(operand[0]) == - ACPI_TYPE_STRING) { /* * This is a deref_of (String). The string is a reference * to a named ACPI object. * * 1) Find the owning Node - * 2) Dereference the node to an actual object. Could be a + * 2) Dereference the node to an actual object. Could be a * Field, so we need to resolve the node to a value. */ status = - acpi_ns_get_node(walk_state->scope_info-> - scope.node, - operand[0]->string.pointer, - ACPI_NS_SEARCH_PARENT, - ACPI_CAST_INDIRECT_PTR - (struct - acpi_namespace_node, - &return_desc)); + acpi_ns_get_node_by_path(operand[0]->string. + pointer, + walk_state-> + scope_info->scope. + node, + ACPI_NS_SEARCH_PARENT, + ACPI_CAST_INDIRECT_PTR + (struct + acpi_namespace_node, + &return_desc)); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -894,6 +857,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) (struct acpi_namespace_node, &return_desc), walk_state); goto cleanup; + + default: + + status = AE_AML_OPERAND_TYPE; + goto cleanup; } } @@ -969,12 +937,13 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) acpi_ut_add_reference (return_desc); } + break; default: ACPI_ERROR((AE_INFO, - "Unknown Index TargetType %X in obj %p", + "Unknown Index target_type %X in obj %p", operand[0]->reference. target_type, operand[0])); status = AE_AML_OPERAND_TYPE; @@ -988,6 +957,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) if (ACPI_GET_DESCRIPTOR_TYPE(return_desc) == ACPI_DESC_TYPE_NAMED) { + return_desc = acpi_ns_get_attached_object((struct acpi_namespace_node @@ -1002,7 +972,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: ACPI_ERROR((AE_INFO, - "Unknown opcode in reference(%p) - %X", + "Unknown opcode in ref(%p) - %X", operand[0], operand[0]->reference.opcode)); @@ -1028,11 +998,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) acpi_ut_remove_reference(return_desc); } - /* Save return object on success */ - - else { - walk_state->result_obj = return_desc; - } - + walk_state->result_obj = return_desc; return_ACPI_STATUS(status); } diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index 7d2cbc113..e263a5ddd 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c @@ -92,7 +92,7 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) u32 value; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_0T_0R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_0T_0R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the opcode */ @@ -121,7 +121,7 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) #ifdef ACPI_GPE_NOTIFY_CHECK /* * GPE method wake/notify check. Here, we want to ensure that we - * don't receive any "DeviceWake" Notifies from a GPE _Lxx or _Exx + * don't receive any "device_wake" Notifies from a GPE _Lxx or _Exx * GPE method during system runtime. If we do, the GPE is marked * as "wake-only" and disabled. * @@ -138,7 +138,6 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) acpi_ev_check_for_wake_only_gpe(walk_state-> gpe_event_info); if (ACPI_FAILURE(status)) { - /* AE_WAKE_ONLY_GPE only error, means ignore this notify */ return_ACPI_STATUS(AE_OK) @@ -186,7 +185,7 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state) union acpi_operand_object *return_desc2 = NULL; acpi_status status; - ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_2T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_2T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Execute the opcode */ @@ -253,7 +252,6 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state) acpi_ut_remove_reference(return_desc2); if (ACPI_FAILURE(status)) { - /* Delete the return object */ acpi_ut_remove_reference(return_desc1); @@ -283,13 +281,12 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) acpi_status status = AE_OK; acpi_size length; - ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_1T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_1T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Execute the opcode */ if (walk_state->op_info->flags & AML_MATH) { - /* All simple math opcodes (add, etc.) */ return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); @@ -386,70 +383,54 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) goto cleanup; } - /* Initialize the Index reference object */ - index = operand[1]->integer.value; - return_desc->reference.offset = (u32) index; - return_desc->reference.opcode = AML_INDEX_OP; - /* - * At this point, the Source operand is a String, Buffer, or Package. - * Verify that the index is within range. - */ - switch (ACPI_GET_OBJECT_TYPE(operand[0])) { - case ACPI_TYPE_STRING: + /* At this point, the Source operand is a Package, Buffer, or String */ - if (index >= operand[0]->string.length) { - status = AE_AML_STRING_LIMIT; - } - - return_desc->reference.target_type = - ACPI_TYPE_BUFFER_FIELD; - break; - - case ACPI_TYPE_BUFFER: - - if (index >= operand[0]->buffer.length) { - status = AE_AML_BUFFER_LIMIT; - } - - return_desc->reference.target_type = - ACPI_TYPE_BUFFER_FIELD; - break; - - case ACPI_TYPE_PACKAGE: + if (ACPI_GET_OBJECT_TYPE(operand[0]) == ACPI_TYPE_PACKAGE) { + /* Object to be indexed is a Package */ if (index >= operand[0]->package.count) { + ACPI_ERROR((AE_INFO, + "Index value (%X%8.8X) beyond package end (%X)", + ACPI_FORMAT_UINT64(index), + operand[0]->package.count)); status = AE_AML_PACKAGE_LIMIT; + goto cleanup; } return_desc->reference.target_type = ACPI_TYPE_PACKAGE; + return_desc->reference.object = operand[0]; return_desc->reference.where = &operand[0]->package.elements[index]; - break; - - default: - - status = AE_AML_INTERNAL; - goto cleanup; - } + } else { + /* Object to be indexed is a Buffer/String */ - /* Failure means that the Index was beyond the end of the object */ + if (index >= operand[0]->buffer.length) { + ACPI_ERROR((AE_INFO, + "Index value (%X%8.8X) beyond end of buffer (%X)", + ACPI_FORMAT_UINT64(index), + operand[0]->buffer.length)); + status = AE_AML_BUFFER_LIMIT; + goto cleanup; + } - if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Index (%X%8.8X) is beyond end of object", - ACPI_FORMAT_UINT64(index))); - goto cleanup; + return_desc->reference.target_type = + ACPI_TYPE_BUFFER_FIELD; + return_desc->reference.object = operand[0]; } /* - * Save the target object and add a reference to it for the life - * of the index + * Add a reference to the target package/buffer/string for the life + * of the index. */ - return_desc->reference.object = operand[0]; acpi_ut_add_reference(operand[0]); + /* Complete the Index reference object */ + + return_desc->reference.opcode = AML_INDEX_OP; + return_desc->reference.offset = (u32) index; + /* Store the reference to the Target */ status = acpi_ex_store(return_desc, operand[2], walk_state); @@ -514,7 +495,7 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) acpi_status status = AE_OK; u8 logical_result = FALSE; - ACPI_FUNCTION_TRACE_STR(ex_opcode_2A_0T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_2A_0T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); /* Create the internal return object */ @@ -528,7 +509,6 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) /* Execute the Opcode */ if (walk_state->op_info->flags & AML_LOGICAL_NUMERIC) { - /* logical_op (Operand0, Operand1) */ status = acpi_ex_do_logical_numeric_op(walk_state->opcode, @@ -538,7 +518,6 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) value, &logical_result); goto store_logical_result; } else if (walk_state->op_info->flags & AML_LOGICAL) { - /* logical_op (Operand0, Operand1) */ status = acpi_ex_do_logical_op(walk_state->opcode, operand[0], diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index e2d945dfd..6a3a883cb 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.c @@ -88,19 +88,20 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) struct acpi_signal_fatal_info *fatal; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_STR(ex_opcode_3A_0T_0R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_3A_0T_0R", acpi_ps_get_opcode_name(walk_state->opcode)); switch (walk_state->opcode) { case AML_FATAL_OP: /* Fatal (fatal_type fatal_code fatal_arg) */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "FatalOp: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", + "fatal_op: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", (u32) operand[0]->integer.value, (u32) operand[1]->integer.value, (u32) operand[2]->integer.value)); - fatal = ACPI_ALLOCATE(sizeof(struct acpi_signal_fatal_info)); + fatal = + ACPI_MEM_ALLOCATE(sizeof(struct acpi_signal_fatal_info)); if (fatal) { fatal->type = (u32) operand[0]->integer.value; fatal->code = (u32) operand[1]->integer.value; @@ -113,7 +114,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) /* Might return while OS is shutting down, just continue */ - ACPI_FREE(fatal); + ACPI_MEM_FREE(fatal); break; default: @@ -150,7 +151,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) acpi_integer index; acpi_size length; - ACPI_FUNCTION_TRACE_STR(ex_opcode_3A_1T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_3A_1T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); switch (walk_state->opcode) { @@ -195,7 +196,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) /* Always allocate a new buffer for the String */ - buffer = ACPI_ALLOCATE_ZEROED((acpi_size) length + 1); + buffer = ACPI_MEM_CALLOCATE((acpi_size) length + 1); if (!buffer) { status = AE_NO_MEMORY; goto cleanup; @@ -207,10 +208,9 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) /* If the requested length is zero, don't allocate a buffer */ if (length > 0) { - /* Allocate a new buffer for the Buffer */ - buffer = ACPI_ALLOCATE_ZEROED(length); + buffer = ACPI_MEM_CALLOCATE(length); if (!buffer) { status = AE_NO_MEMORY; goto cleanup; @@ -225,7 +225,6 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) } if (buffer) { - /* We have a buffer, copy the portion requested */ ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c index f0c0ba6eb..e043d9244 100644 --- a/drivers/acpi/executer/exoparg6.c +++ b/drivers/acpi/executer/exoparg6.c @@ -220,7 +220,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) acpi_integer index; union acpi_operand_object *this_element; - ACPI_FUNCTION_TRACE_STR(ex_opcode_6A_0T_1R, + ACPI_FUNCTION_TRACE_STR("ex_opcode_6A_0T_1R", acpi_ps_get_opcode_name(walk_state->opcode)); switch (walk_state->opcode) { @@ -276,7 +276,6 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) * match was found. */ for (; index < operand[0]->package.count; index++) { - /* Get the current package element */ this_element = operand[0]->package.elements[index]; diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c index 44d064f42..7719ae5d4 100644 --- a/drivers/acpi/executer/exprep.c +++ b/drivers/acpi/executer/exprep.c @@ -97,7 +97,7 @@ acpi_ex_generate_access(u32 field_bit_offset, u32 minimum_accesses = 0xFFFFFFFF; u32 accesses; - ACPI_FUNCTION_TRACE(ex_generate_access); + ACPI_FUNCTION_TRACE("ex_generate_access"); /* Round Field start offset and length to "minimal" byte boundaries */ @@ -146,7 +146,7 @@ acpi_ex_generate_access(u32 field_bit_offset, accesses = field_end_offset - field_start_offset; ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "AccessWidth %d end is within region\n", + "access_width %d end is within region\n", access_byte_width)); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, @@ -173,7 +173,7 @@ acpi_ex_generate_access(u32 field_bit_offset, } } else { ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "AccessWidth %d end is NOT within region\n", + "access_width %d end is NOT within region\n", access_byte_width)); if (access_byte_width == 1) { ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, @@ -228,7 +228,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, u32 byte_alignment; u32 bit_length; - ACPI_FUNCTION_TRACE(ex_decode_field_access); + ACPI_FUNCTION_TRACE("ex_decode_field_access"); access = (field_flags & AML_FIELD_ACCESS_TYPE_MASK); @@ -322,7 +322,7 @@ acpi_ex_prep_common_field_object(union acpi_operand_object *obj_desc, u32 byte_alignment; u32 nearest_byte_address; - ACPI_FUNCTION_TRACE(ex_prep_common_field_object); + ACPI_FUNCTION_TRACE("ex_prep_common_field_object"); /* * Note: the structure being initialized is the @@ -415,13 +415,13 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) u32 type; acpi_status status; - ACPI_FUNCTION_TRACE(ex_prep_field_value); + ACPI_FUNCTION_TRACE("ex_prep_field_value"); /* Parameter validation */ if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { if (!info->region_node) { - ACPI_ERROR((AE_INFO, "Null RegionNode")); + ACPI_ERROR((AE_INFO, "Null region_node")); return_ACPI_STATUS(AE_AML_NO_OPERAND); } @@ -467,7 +467,7 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) acpi_ut_add_reference(obj_desc->field.region_obj); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", + "region_field: bit_off %X, Off %X, Gran %X, Region %p\n", obj_desc->field.start_field_bit_offset, obj_desc->field.base_byte_offset, obj_desc->field.access_byte_width, @@ -488,7 +488,7 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) acpi_ut_add_reference(obj_desc->bank_field.bank_obj); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "Bank Field: BitOff %X, Off %X, Gran %X, Region %p, BankReg %p\n", + "Bank Field: bit_off %X, Off %X, Gran %X, Region %p, bank_reg %p\n", obj_desc->bank_field.start_field_bit_offset, obj_desc->bank_field.base_byte_offset, obj_desc->field.access_byte_width, @@ -519,29 +519,16 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) acpi_ut_add_reference(obj_desc->index_field.index_obj); /* - * April 2006: Changed to match MS behavior - * * The value written to the Index register is the byte offset of the - * target field in units of the granularity of the index_field - * - * Previously, the value was calculated as an index in terms of the - * width of the Data register, as below: - * - * obj_desc->index_field.Value = (u32) - * (Info->field_bit_position / ACPI_MUL_8 ( - * obj_desc->Field.access_byte_width)); - * - * February 2006: Tried value as a byte offset: - * obj_desc->index_field.Value = (u32) - * ACPI_DIV_8 (Info->field_bit_position); + * target field + * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) */ - obj_desc->index_field.value = - (u32) ACPI_ROUND_DOWN(ACPI_DIV_8(info->field_bit_position), - obj_desc->index_field. - access_byte_width); + obj_desc->index_field.value = (u32) + (info->field_bit_position / + ACPI_MUL_8(obj_desc->field.access_byte_width)); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "IndexField: BitOff %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", + "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", obj_desc->index_field.start_field_bit_offset, obj_desc->index_field.base_byte_offset, obj_desc->index_field.value, @@ -563,7 +550,7 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) acpi_ns_get_type(info->field_node)); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, - "Set NamedObj %p [%4.4s], ObjDesc %p\n", + "Set named_obj %p [%4.4s], obj_desc %p\n", info->field_node, acpi_ut_get_node_name(info->field_node), obj_desc)); diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 3cc97ba48..6a4cfdff6 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.c @@ -81,7 +81,7 @@ acpi_ex_system_memory_space_handler(u32 function, u32 remainder; #endif - ACPI_FUNCTION_TRACE(ex_system_memory_space_handler); + ACPI_FUNCTION_TRACE("ex_system_memory_space_handler"); /* Validate and translate the bit width */ @@ -103,7 +103,7 @@ acpi_ex_system_memory_space_handler(u32 function, break; default: - ACPI_ERROR((AE_INFO, "Invalid SystemMemory width %d", + ACPI_ERROR((AE_INFO, "Invalid system_memory width %d", bit_width)); return_ACPI_STATUS(AE_AML_OPERAND_VALUE); } @@ -135,7 +135,6 @@ acpi_ex_system_memory_space_handler(u32 function, * Delete the existing mapping and create a new one. */ if (mem_info->mapped_length) { - /* Valid mapping, delete it */ acpi_os_unmap_memory(mem_info->mapped_logical_address, @@ -182,8 +181,8 @@ acpi_ex_system_memory_space_handler(u32 function, (acpi_integer) mem_info->mapped_physical_address); ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n", - bit_width, function, ACPI_FORMAT_UINT64(address))); + "system_memory %d (%d width) Address=%8.8X%8.8X\n", + function, bit_width, ACPI_FORMAT_UINT64(address))); /* * Perform the memory read or write @@ -284,11 +283,11 @@ acpi_ex_system_io_space_handler(u32 function, acpi_status status = AE_OK; u32 value32; - ACPI_FUNCTION_TRACE(ex_system_io_space_handler); + ACPI_FUNCTION_TRACE("ex_system_io_space_handler"); ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "System-IO (width %d) R/W %d Address=%8.8X%8.8X\n", - bit_width, function, ACPI_FORMAT_UINT64(address))); + "system_iO %d (%d width) Address=%8.8X%8.8X\n", + function, bit_width, ACPI_FORMAT_UINT64(address))); /* Decode the function parameter */ @@ -343,7 +342,7 @@ acpi_ex_pci_config_space_handler(u32 function, struct acpi_pci_id *pci_id; u16 pci_register; - ACPI_FUNCTION_TRACE(ex_pci_config_space_handler); + ACPI_FUNCTION_TRACE("ex_pci_config_space_handler"); /* * The arguments to acpi_os(Read|Write)pci_configuration are: @@ -361,7 +360,7 @@ acpi_ex_pci_config_space_handler(u32 function, pci_register = (u16) (u32) address; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Pci-Config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n", + "pci_config %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n", function, bit_width, pci_id->segment, pci_id->bus, pci_id->device, pci_id->function, pci_register)); @@ -415,7 +414,7 @@ acpi_ex_cmos_space_handler(u32 function, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_cmos_space_handler); + ACPI_FUNCTION_TRACE("ex_cmos_space_handler"); return_ACPI_STATUS(status); } @@ -447,7 +446,7 @@ acpi_ex_pci_bar_space_handler(u32 function, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_pci_bar_space_handler); + ACPI_FUNCTION_TRACE("ex_pci_bar_space_handler"); return_ACPI_STATUS(status); } @@ -477,16 +476,23 @@ acpi_ex_data_table_space_handler(u32 function, acpi_integer * value, void *handler_context, void *region_context) { - ACPI_FUNCTION_TRACE(ex_data_table_space_handler); + acpi_status status = AE_OK; + u32 byte_width = ACPI_DIV_8(bit_width); + u32 i; + char *logical_addr_ptr; + + ACPI_FUNCTION_TRACE("ex_data_table_space_handler"); + + logical_addr_ptr = ACPI_PHYSADDR_TO_PTR(address); /* Perform the memory read or write */ switch (function) { case ACPI_READ: - ACPI_MEMCPY(ACPI_CAST_PTR(char, value), - ACPI_PHYSADDR_TO_PTR(address), - ACPI_DIV_8(bit_width)); + for (i = 0; i < byte_width; i++) { + ((char *)value)[i] = logical_addr_ptr[i]; + } break; case ACPI_WRITE: @@ -495,5 +501,5 @@ acpi_ex_data_table_space_handler(u32 function, return_ACPI_STATUS(AE_SUPPORT); } - return_ACPI_STATUS(AE_OK); + return_ACPI_STATUS(status); } diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index 3089b05a1..01b26c80d 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.c @@ -87,7 +87,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, struct acpi_namespace_node *node; acpi_object_type entry_type; - ACPI_FUNCTION_TRACE(ex_resolve_node_to_value); + ACPI_FUNCTION_TRACE("ex_resolve_node_to_value"); /* * The stack pointer points to a struct acpi_namespace_node (Node). Get the @@ -97,13 +97,12 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, source_desc = acpi_ns_get_attached_object(node); entry_type = acpi_ns_get_type((acpi_handle) node); - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p SourceDesc=%p [%s]\n", + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Entry=%p source_desc=%p [%s]\n", node, source_desc, acpi_ut_get_type_name(entry_type))); if ((entry_type == ACPI_TYPE_LOCAL_ALIAS) || (entry_type == ACPI_TYPE_LOCAL_METHOD_ALIAS)) { - /* There is always exactly one level of indirection */ node = ACPI_CAST_PTR(struct acpi_namespace_node, node->object); @@ -114,11 +113,10 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, /* * Several object types require no further processing: - * 1) Device/Thermal objects don't have a "real" subobject, return the Node + * 1) Devices rarely have an attached object, return the Node * 2) Method locals and arguments have a pseudo-Node */ - if ((entry_type == ACPI_TYPE_DEVICE) || - (entry_type == ACPI_TYPE_THERMAL) || + if (entry_type == ACPI_TYPE_DEVICE || (node->flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL))) { return_ACPI_STATUS(AE_OK); } @@ -143,7 +141,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, status = acpi_ds_get_package_arguments(source_desc); if (ACPI_SUCCESS(status)) { - /* Return an additional reference to the object */ obj_desc = source_desc; @@ -161,7 +158,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, status = acpi_ds_get_buffer_arguments(source_desc); if (ACPI_SUCCESS(status)) { - /* Return an additional reference to the object */ obj_desc = source_desc; @@ -203,7 +199,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_LOCAL_INDEX_FIELD: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "FieldRead Node=%p SourceDesc=%p Type=%X\n", + "field_read Node=%p source_desc=%p Type=%X\n", node, source_desc, entry_type)); status = @@ -217,6 +213,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_METHOD: case ACPI_TYPE_POWER: case ACPI_TYPE_PROCESSOR: + case ACPI_TYPE_THERMAL: case ACPI_TYPE_EVENT: case ACPI_TYPE_REGION: @@ -243,8 +240,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, /* This is a ddb_handle */ /* Return an additional reference to the object */ - case AML_REF_OF_OP: - obj_desc = source_desc; acpi_ut_add_reference(obj_desc); break; diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index 6499de878..1deed492f 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.c @@ -78,7 +78,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, { acpi_status status; - ACPI_FUNCTION_TRACE_PTR(ex_resolve_to_value, stack_ptr); + ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); if (!stack_ptr || !*stack_ptr) { ACPI_ERROR((AE_INFO, "Internal - null pointer")); @@ -144,7 +144,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, union acpi_operand_object *obj_desc; u16 opcode; - ACPI_FUNCTION_TRACE(ex_resolve_object_to_value); + ACPI_FUNCTION_TRACE("ex_resolve_object_to_value"); stack_desc = *stack_ptr; @@ -190,7 +190,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, } ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "[Arg/Local %X] ValueObj is %p\n", + "[Arg/Local %X] value_obj is %p\n", stack_desc->reference.offset, obj_desc)); @@ -239,7 +239,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, /* Invalid reference object */ ACPI_ERROR((AE_INFO, - "Unknown TargetType %X in Index/Reference obj %p", + "Unknown target_type %X in Index/Reference obj %p", stack_desc->reference.target_type, stack_desc)); status = AE_AML_INTERNAL; @@ -257,24 +257,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, case AML_INT_NAMEPATH_OP: /* Reference to a named object */ - /* Dereference the name */ - - if ((stack_desc->reference.node->type == - ACPI_TYPE_DEVICE) - || (stack_desc->reference.node->type == - ACPI_TYPE_THERMAL)) { - - /* These node types do not have 'real' subobjects */ - - *stack_ptr = (void *)stack_desc->reference.node; - } else { - /* Get the object pointed to by the namespace node */ - - *stack_ptr = - (stack_desc->reference.node)->object; - acpi_ut_add_reference(*stack_ptr); - } + /* Get the object pointed to by the namespace node */ + *stack_ptr = (stack_desc->reference.node)->object; + acpi_ut_add_reference(*stack_ptr); acpi_ut_remove_reference(stack_desc); break; @@ -307,7 +293,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, case ACPI_TYPE_LOCAL_INDEX_FIELD: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "FieldRead SourceDesc=%p Type=%X\n", + "field_read source_desc=%p Type=%X\n", stack_desc, ACPI_GET_OBJECT_TYPE(stack_desc))); @@ -351,7 +337,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, acpi_object_type type; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_ex_resolve_multiple); + ACPI_FUNCTION_TRACE("acpi_ex_resolve_multiple"); /* Operand can be either a namespace node or an operand descriptor */ @@ -396,16 +382,10 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, while (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REFERENCE) { switch (obj_desc->reference.opcode) { case AML_REF_OF_OP: - case AML_INT_NAMEPATH_OP: /* Dereference the reference pointer */ - if (obj_desc->reference.opcode == AML_REF_OF_OP) { - node = obj_desc->reference.object; - } else { /* AML_INT_NAMEPATH_OP */ - - node = obj_desc->reference.node; - } + node = obj_desc->reference.object; /* All "References" point to a NS node */ @@ -421,7 +401,6 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, obj_desc = acpi_ns_get_attached_object(node); if (!obj_desc) { - /* No object, use the NS node type */ type = acpi_ns_get_type(node); @@ -453,7 +432,6 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, */ obj_desc = *(obj_desc->reference.where); if (!obj_desc) { - /* NULL package elements are allowed */ type = 0; /* Uninitialized */ @@ -461,6 +439,39 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, } break; + case AML_INT_NAMEPATH_OP: + + /* Dereference the reference pointer */ + + node = obj_desc->reference.node; + + /* All "References" point to a NS node */ + + if (ACPI_GET_DESCRIPTOR_TYPE(node) != + ACPI_DESC_TYPE_NAMED) { + ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]", + node, + acpi_ut_get_descriptor_name(node))); + return_ACPI_STATUS(AE_AML_INTERNAL); + } + + /* Get the attached object */ + + obj_desc = acpi_ns_get_attached_object(node); + if (!obj_desc) { + /* No object, use the NS node type */ + + type = acpi_ns_get_type(node); + goto exit; + } + + /* Check for circular references */ + + if (obj_desc == operand) { + return_ACPI_STATUS(AE_AML_CIRCULAR_REFERENCE); + } + break; + case AML_LOCAL_OP: case AML_ARG_OP: @@ -502,7 +513,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, case AML_DEBUG_OP: - /* The Debug Object is of type "DebugObject" */ + /* The Debug Object is of type "debug_object" */ type = ACPI_TYPE_DEBUG_OBJECT; goto exit; diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index 4c93d0972..a1c000f5a 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c @@ -77,7 +77,6 @@ acpi_ex_check_object_type(acpi_object_type type_needed, ACPI_FUNCTION_ENTRY(); if (type_needed == ACPI_TYPE_ANY) { - /* All types OK, so we don't perform any typechecks */ return (AE_OK); @@ -144,7 +143,7 @@ acpi_ex_resolve_operands(u16 opcode, acpi_object_type type_needed; u16 target_op = 0; - ACPI_FUNCTION_TRACE_U32(ex_resolve_operands, opcode); + ACPI_FUNCTION_TRACE_U32("ex_resolve_operands", opcode); op_info = acpi_ps_get_opcode_info(opcode); if (op_info->class == AML_CLASS_UNKNOWN) { @@ -159,7 +158,7 @@ acpi_ex_resolve_operands(u16 opcode, } ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Opcode %X [%s] RequiredOperandTypes=%8.8X\n", + "Opcode %X [%s] required_operand_types=%8.8X\n", opcode, op_info->name, arg_types)); /* @@ -225,7 +224,6 @@ acpi_ex_resolve_operands(u16 opcode, } if (object_type == (u8) ACPI_TYPE_LOCAL_REFERENCE) { - /* Decode the Reference */ op_info = acpi_ps_get_opcode_info(opcode); @@ -249,7 +247,7 @@ acpi_ex_resolve_operands(u16 opcode, ACPI_DEBUG_ONLY_MEMBERS(ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "Operand is a Reference, RefOpcode [%s]\n", + "Operand is a Reference, ref_opcode [%s]\n", (acpi_ps_get_opcode_info (obj_desc-> reference. @@ -334,7 +332,6 @@ acpi_ex_resolve_operands(u16 opcode, } if (obj_desc->reference.opcode == AML_NAME_OP) { - /* Convert a named reference to the actual named object */ temp_node = obj_desc->reference.object; @@ -626,7 +623,7 @@ acpi_ex_resolve_operands(u16 opcode, default: ACPI_ERROR((AE_INFO, - "Needed [Region/RegionField], found [%s] %p", + "Needed [Region/region_field], found [%s] %p", acpi_ut_get_object_type_name (obj_desc), obj_desc)); @@ -665,7 +662,6 @@ acpi_ex_resolve_operands(u16 opcode, } if (target_op == AML_DEBUG_OP) { - /* Allow store of any object to the Debug object */ break; diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 0456405ba..3f020c0e2 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c @@ -82,7 +82,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, { u32 i; - ACPI_FUNCTION_TRACE_PTR(ex_do_debug_object, source_desc); + ACPI_FUNCTION_TRACE_PTR("ex_do_debug_object", source_desc); ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s", level, " ")); @@ -245,7 +245,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, acpi_status status = AE_OK; union acpi_operand_object *ref_desc = dest_desc; - ACPI_FUNCTION_TRACE_PTR(ex_store, dest_desc); + ACPI_FUNCTION_TRACE_PTR("ex_store", dest_desc); /* Validate parameters */ @@ -297,7 +297,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, ACPI_DUMP_STACK_ENTRY(source_desc); ACPI_DUMP_STACK_ENTRY(dest_desc); - ACPI_DUMP_OPERANDS(&dest_desc, ACPI_IMODE_EXECUTE, "ExStore", + ACPI_DUMP_OPERANDS(&dest_desc, ACPI_IMODE_EXECUTE, "ex_store", 2, "Target is not a Reference or Constant object"); @@ -396,7 +396,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, u8 value = 0; u32 i; - ACPI_FUNCTION_TRACE(ex_store_object_to_index); + ACPI_FUNCTION_TRACE("ex_store_object_to_index"); /* * Destination must be a reference pointer, and @@ -423,7 +423,6 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, } if (obj_desc) { - /* Decrement reference count by the ref count of the parent package */ for (i = 0; i < ((union acpi_operand_object *) @@ -503,7 +502,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, break; default: - ACPI_ERROR((AE_INFO, "Target is not a Package or BufferField")); + ACPI_ERROR((AE_INFO, + "Target is not a Package or buffer_field")); status = AE_AML_OPERAND_TYPE; break; } @@ -548,7 +548,7 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, union acpi_operand_object *new_desc; acpi_object_type target_type; - ACPI_FUNCTION_TRACE_PTR(ex_store_object_to_node, source_desc); + ACPI_FUNCTION_TRACE_PTR("ex_store_object_to_node", source_desc); /* Get current type of the node, and object attached to Node */ @@ -572,7 +572,6 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, /* If no implicit conversion, drop into the default case below */ if ((!implicit_conversion) || (walk_state->opcode == AML_COPY_OP)) { - /* Force execution of default (no implicit conversion) */ target_type = ACPI_TYPE_ANY; diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 591aaf0e1..42967baf7 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c @@ -72,7 +72,7 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, union acpi_operand_object *source_desc = *source_desc_ptr; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_resolve_object); + ACPI_FUNCTION_TRACE("ex_resolve_object"); /* Ensure we have a Target that can be stored to */ @@ -97,7 +97,6 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, */ if (ACPI_GET_OBJECT_TYPE(source_desc) == ACPI_TYPE_LOCAL_REFERENCE) { - /* Resolve a reference object first */ status = @@ -122,7 +121,6 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, !((ACPI_GET_OBJECT_TYPE(source_desc) == ACPI_TYPE_LOCAL_REFERENCE) && (source_desc->reference.opcode == AML_LOAD_OP))) { - /* Conversion successful but still not a valid type */ ACPI_ERROR((AE_INFO, @@ -201,7 +199,7 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, union acpi_operand_object *actual_src_desc; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ex_store_object_to_object, source_desc); + ACPI_FUNCTION_TRACE_PTR("ex_store_object_to_object", source_desc); actual_src_desc = source_desc; if (!dest_desc) { @@ -291,7 +289,6 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, } if (actual_src_desc != source_desc) { - /* Delete the intermediate (temporary) source object */ acpi_ut_remove_reference(actual_src_desc); diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index 99ebe5adf..6ab707087 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c @@ -67,7 +67,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, u32 length; u8 *buffer; - ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc); + ACPI_FUNCTION_TRACE_PTR("ex_store_buffer_to_buffer", source_desc); /* We know that source_desc is a buffer by now */ @@ -80,7 +80,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, */ if ((target_desc->buffer.length == 0) || (target_desc->common.flags & AOPOBJ_STATIC_POINTER)) { - target_desc->buffer.pointer = ACPI_ALLOCATE(length); + target_desc->buffer.pointer = ACPI_MEM_ALLOCATE(length); if (!target_desc->buffer.pointer) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -91,7 +91,6 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, /* Copy source buffer to target buffer */ if (length <= target_desc->buffer.length) { - /* Clear existing buffer and copy in the new one */ ACPI_MEMSET(target_desc->buffer.pointer, 0, @@ -103,7 +102,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, * NOTE: ACPI versions up to 3.0 specified that the buffer must be * truncated if the string is smaller than the buffer. However, "other" * implementations of ACPI never did this and thus became the defacto - * standard. ACPI 3.0_a changes this behavior such that the buffer + * standard. ACPi 3.0_a changes this behavior such that the buffer * is no longer truncated. */ @@ -114,7 +113,6 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, * copy must not truncate the original buffer. */ if (original_src_type == ACPI_TYPE_STRING) { - /* Set the new length of the target */ target_desc->buffer.length = length; @@ -158,7 +156,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, u32 length; u8 *buffer; - ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc); + ACPI_FUNCTION_TRACE_PTR("ex_store_string_to_string", source_desc); /* We know that source_desc is a string by now */ @@ -185,14 +183,13 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, */ if (target_desc->string.pointer && (!(target_desc->common.flags & AOPOBJ_STATIC_POINTER))) { - /* Only free if not a pointer into the DSDT */ - ACPI_FREE(target_desc->string.pointer); + ACPI_MEM_FREE(target_desc->string.pointer); } - target_desc->string.pointer = ACPI_ALLOCATE_ZEROED((acpi_size) - length + 1); + target_desc->string.pointer = ACPI_MEM_CALLOCATE((acpi_size) + length + 1); if (!target_desc->string.pointer) { return_ACPI_STATUS(AE_NO_MEMORY); } diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 28aef3e69..ea9144f42 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.c @@ -60,23 +60,22 @@ ACPI_MODULE_NAME("exsystem") * * DESCRIPTION: Implements a semaphore wait with a check to see if the * semaphore is available immediately. If it is not, the - * interpreter is released before waiting. + * interpreter is released. * ******************************************************************************/ -acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) +acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout) { acpi_status status; acpi_status status2; - ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); + ACPI_FUNCTION_TRACE("ex_system_wait_semaphore"); - status = acpi_os_wait_semaphore(semaphore, 1, ACPI_DO_NOT_WAIT); + status = acpi_os_wait_semaphore(semaphore, 1, 0); if (ACPI_SUCCESS(status)) { return_ACPI_STATUS(status); } if (status == AE_TIME) { - /* We must wait, so unlock the interpreter */ acpi_ex_exit_interpreter(); @@ -91,60 +90,6 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { - - /* Report fatal error, could not acquire interpreter */ - - return_ACPI_STATUS(status2); - } - } - - return_ACPI_STATUS(status); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ex_system_wait_mutex - * - * PARAMETERS: Mutex - Mutex to wait on - * Timeout - Max time to wait - * - * RETURN: Status - * - * DESCRIPTION: Implements a mutex wait with a check to see if the - * mutex is available immediately. If it is not, the - * interpreter is released before waiting. - * - ******************************************************************************/ - -acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) -{ - acpi_status status; - acpi_status status2; - - ACPI_FUNCTION_TRACE(ex_system_wait_mutex); - - status = acpi_os_acquire_mutex(mutex, ACPI_DO_NOT_WAIT); - if (ACPI_SUCCESS(status)) { - return_ACPI_STATUS(status); - } - - if (status == AE_TIME) { - - /* We must wait, so unlock the interpreter */ - - acpi_ex_exit_interpreter(); - - status = acpi_os_acquire_mutex(mutex, timeout); - - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "*** Thread awake after blocking, %s\n", - acpi_format_exception(status))); - - /* Reacquire the interpreter */ - - status2 = acpi_ex_enter_interpreter(); - if (ACPI_FAILURE(status2)) { - /* Report fatal error, could not acquire interpreter */ return_ACPI_STATUS(status2); @@ -229,7 +174,7 @@ acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) * * FUNCTION: acpi_ex_system_acquire_mutex * - * PARAMETERS: time_desc - Maximum time to wait for the mutex + * PARAMETERS: time_desc - The 'time to delay' object descriptor * obj_desc - The object descriptor for this op * * RETURN: Status @@ -246,7 +191,7 @@ acpi_ex_system_acquire_mutex(union acpi_operand_object * time_desc, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ex_system_acquire_mutex, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ex_system_acquire_mutex", obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -254,14 +199,14 @@ acpi_ex_system_acquire_mutex(union acpi_operand_object * time_desc, /* Support for the _GL_ Mutex object -- go get the global lock */ - if (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK) { + if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { status = acpi_ev_acquire_global_lock((u16) time_desc->integer.value); return_ACPI_STATUS(status); } - status = acpi_ex_system_wait_mutex(obj_desc->mutex.os_mutex, - (u16) time_desc->integer.value); + status = acpi_ex_system_wait_semaphore(obj_desc->mutex.semaphore, + (u16) time_desc->integer.value); return_ACPI_STATUS(status); } @@ -284,7 +229,7 @@ acpi_status acpi_ex_system_release_mutex(union acpi_operand_object *obj_desc) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_system_release_mutex); + ACPI_FUNCTION_TRACE("ex_system_release_mutex"); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -292,13 +237,13 @@ acpi_status acpi_ex_system_release_mutex(union acpi_operand_object *obj_desc) /* Support for the _GL_ Mutex object -- release the global lock */ - if (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK) { + if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { status = acpi_ev_release_global_lock(); return_ACPI_STATUS(status); } - acpi_os_release_mutex(obj_desc->mutex.os_mutex); - return_ACPI_STATUS(AE_OK); + status = acpi_os_signal_semaphore(obj_desc->mutex.semaphore, 1); + return_ACPI_STATUS(status); } /******************************************************************************* @@ -318,11 +263,10 @@ acpi_status acpi_ex_system_signal_event(union acpi_operand_object *obj_desc) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_system_signal_event); + ACPI_FUNCTION_TRACE("ex_system_signal_event"); if (obj_desc) { - status = - acpi_os_signal_semaphore(obj_desc->event.os_semaphore, 1); + status = acpi_os_signal_semaphore(obj_desc->event.semaphore, 1); } return_ACPI_STATUS(status); @@ -349,11 +293,11 @@ acpi_ex_system_wait_event(union acpi_operand_object *time_desc, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ex_system_wait_event); + ACPI_FUNCTION_TRACE("ex_system_wait_event"); if (obj_desc) { status = - acpi_ex_system_wait_semaphore(obj_desc->event.os_semaphore, + acpi_ex_system_wait_semaphore(obj_desc->event.semaphore, (u16) time_desc->integer. value); } @@ -376,7 +320,7 @@ acpi_ex_system_wait_event(union acpi_operand_object *time_desc, acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc) { acpi_status status = AE_OK; - acpi_semaphore temp_semaphore; + void *temp_semaphore; ACPI_FUNCTION_ENTRY(); @@ -387,8 +331,8 @@ acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc) status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, &temp_semaphore); if (ACPI_SUCCESS(status)) { - (void)acpi_os_delete_semaphore(obj_desc->event.os_semaphore); - obj_desc->event.os_semaphore = temp_semaphore; + (void)acpi_os_delete_semaphore(obj_desc->event.semaphore); + obj_desc->event.semaphore = temp_semaphore; } return (status); diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index 982c8b658..f73a61aeb 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c @@ -87,9 +87,9 @@ acpi_status acpi_ex_enter_interpreter(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ex_enter_interpreter); + ACPI_FUNCTION_TRACE("ex_enter_interpreter"); - status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); + status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); } @@ -123,9 +123,9 @@ void acpi_ex_exit_interpreter(void) { acpi_status status; - ACPI_FUNCTION_TRACE(ex_exit_interpreter); + ACPI_FUNCTION_TRACE("ex_exit_interpreter"); - status = acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); + status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); } @@ -189,12 +189,11 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags) u8 locked = FALSE; acpi_status status; - ACPI_FUNCTION_TRACE(ex_acquire_global_lock); + ACPI_FUNCTION_TRACE("ex_acquire_global_lock"); /* Only attempt lock if the always_lock bit is set */ if (field_flags & AML_FIELD_LOCK_RULE_MASK) { - /* We should attempt to get the lock, wait forever */ status = acpi_ev_acquire_global_lock(ACPI_WAIT_FOREVER); @@ -226,17 +225,15 @@ void acpi_ex_release_global_lock(u8 locked_by_me) { acpi_status status; - ACPI_FUNCTION_TRACE(ex_release_global_lock); + ACPI_FUNCTION_TRACE("ex_release_global_lock"); /* Only attempt unlock if the caller locked it */ if (locked_by_me) { - /* OK, now release the lock */ status = acpi_ev_release_global_lock(); if (ACPI_FAILURE(status)) { - /* Report the error, but there isn't much else we can do */ ACPI_EXCEPTION((AE_INFO, status, @@ -266,7 +263,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) u32 num_digits; acpi_integer current_value; - ACPI_FUNCTION_TRACE(ex_digits_needed); + ACPI_FUNCTION_TRACE("ex_digits_needed"); /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 045c89477..e8165c4f1 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -48,8 +48,6 @@ MODULE_LICENSE("GPL"); static int acpi_fan_add(struct acpi_device *device); static int acpi_fan_remove(struct acpi_device *device, int type); -static int acpi_fan_suspend(struct acpi_device *device, int state); -static int acpi_fan_resume(struct acpi_device *device, int state); static struct acpi_driver acpi_fan_driver = { .name = ACPI_FAN_DRIVER_NAME, @@ -58,13 +56,11 @@ static struct acpi_driver acpi_fan_driver = { .ops = { .add = acpi_fan_add, .remove = acpi_fan_remove, - .suspend = acpi_fan_suspend, - .resume = acpi_fan_resume, }, }; struct acpi_fan { - struct acpi_device * device; + acpi_handle handle; }; /* -------------------------------------------------------------------------- @@ -78,15 +74,16 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset) struct acpi_fan *fan = seq->private; int state = 0; + ACPI_FUNCTION_TRACE("acpi_fan_read_state"); if (fan) { - if (acpi_bus_get_power(fan->device->handle, &state)) + if (acpi_bus_get_power(fan->handle, &state)) seq_printf(seq, "status: ERROR\n"); else seq_printf(seq, "status: %s\n", !state ? "on" : "off"); } - return 0; + return_VALUE(0); } static int acpi_fan_state_open_fs(struct inode *inode, struct file *file) @@ -103,24 +100,25 @@ acpi_fan_write_state(struct file *file, const char __user * buffer, struct acpi_fan *fan = (struct acpi_fan *)m->private; char state_string[12] = { '\0' }; + ACPI_FUNCTION_TRACE("acpi_fan_write_state"); if (!fan || (count > sizeof(state_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(state_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); state_string[count] = '\0'; - result = acpi_bus_set_power(fan->device->handle, + result = acpi_bus_set_power(fan->handle, simple_strtoul(state_string, NULL, 0)); if (result) - return result; + return_VALUE(result); - return count; + return_VALUE(count); } -static const struct file_operations acpi_fan_state_ops = { +static struct file_operations acpi_fan_state_ops = { .open = acpi_fan_state_open_fs, .read = seq_read, .write = acpi_fan_write_state, @@ -133,15 +131,16 @@ static int acpi_fan_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_fan_add_fs"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_fan_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; } @@ -150,18 +149,21 @@ static int acpi_fan_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_FAN_FILE_STATE)); else { entry->proc_fops = &acpi_fan_state_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_fan_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_fan_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_FAN_FILE_STATE, acpi_device_dir(device)); @@ -169,7 +171,7 @@ static int acpi_fan_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -182,30 +184,28 @@ static int acpi_fan_add(struct acpi_device *device) struct acpi_fan *fan = NULL; int state = 0; + ACPI_FUNCTION_TRACE("acpi_fan_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL); if (!fan) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(fan, 0, sizeof(struct acpi_fan)); - fan->device = device; + fan->handle = device->handle; strcpy(acpi_device_name(device), "Fan"); strcpy(acpi_device_class(device), ACPI_FAN_CLASS); acpi_driver_data(device) = fan; - result = acpi_bus_get_power(device->handle, &state); + result = acpi_bus_get_power(fan->handle, &state); if (result) { - printk(KERN_ERR PREFIX "Reading power state\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error reading power state\n")); goto end; } - device->flags.force_power_state = 1; - acpi_bus_set_power(device->handle, state); - device->flags.force_power_state = 0; - result = acpi_fan_add_fs(device); if (result) goto end; @@ -218,16 +218,17 @@ static int acpi_fan_add(struct acpi_device *device) if (result) kfree(fan); - return result; + return_VALUE(result); } static int acpi_fan_remove(struct acpi_device *device, int type) { struct acpi_fan *fan = NULL; + ACPI_FUNCTION_TRACE("acpi_fan_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); fan = (struct acpi_fan *)acpi_driver_data(device); @@ -235,68 +236,38 @@ static int acpi_fan_remove(struct acpi_device *device, int type) kfree(fan); - return 0; -} - -static int acpi_fan_suspend(struct acpi_device *device, int state) -{ - if (!device) - return -EINVAL; - - acpi_bus_set_power(device->handle, ACPI_STATE_D0); - - return AE_OK; -} - -static int acpi_fan_resume(struct acpi_device *device, int state) -{ - int result = 0; - int power_state = 0; - - if (!device) - return -EINVAL; - - result = acpi_bus_get_power(device->handle, &power_state); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error reading fan power state\n")); - return result; - } - - device->flags.force_power_state = 1; - acpi_bus_set_power(device->handle, power_state); - device->flags.force_power_state = 0; - - return result; + return_VALUE(0); } static int __init acpi_fan_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_fan_init"); acpi_fan_dir = proc_mkdir(ACPI_FAN_CLASS, acpi_root_dir); if (!acpi_fan_dir) - return -ENODEV; + return_VALUE(-ENODEV); acpi_fan_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_fan_driver); if (result < 0) { remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_fan_exit(void) { + ACPI_FUNCTION_TRACE("acpi_fan_exit"); acpi_bus_unregister_driver(&acpi_fan_driver); remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_fan_init); diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 10f160dc7..8daef57b9 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -152,7 +152,7 @@ static int get_root_bridge_busnr(acpi_handle handle) bbn = bus; } exit: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return (int)bbn; } @@ -192,7 +192,7 @@ find_pci_rootbridge(acpi_handle handle, u32 lvl, void *context, void **rv) find->handle = handle; status = AE_OK; exit: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return status; } @@ -224,7 +224,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) info = buffer.pointer; if (info->address == find->address) find->handle = handle; - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); } return AE_OK; } @@ -330,7 +330,7 @@ static int acpi_platform_notify(struct device *dev) acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer); DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); } else DBG("Device %s -> No ACPI support\n", dev->bus_id); #endif diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c index de50fab2a..ea2f13271 100644 --- a/drivers/acpi/hardware/hwacpi.c +++ b/drivers/acpi/hardware/hwacpi.c @@ -63,7 +63,7 @@ acpi_status acpi_hw_initialize(void) { acpi_status status; - ACPI_FUNCTION_TRACE(hw_initialize); + ACPI_FUNCTION_TRACE("hw_initialize"); /* We must have the ACPI tables by the time we get here */ @@ -100,7 +100,7 @@ acpi_status acpi_hw_set_mode(u32 mode) acpi_status status; u32 retry; - ACPI_FUNCTION_TRACE(hw_set_mode); + ACPI_FUNCTION_TRACE("hw_set_mode"); /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, @@ -198,7 +198,7 @@ u32 acpi_hw_get_mode(void) acpi_status status; u32 value; - ACPI_FUNCTION_TRACE(hw_get_mode); + ACPI_FUNCTION_TRACE("hw_get_mode"); /* * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index 608a3a60e..d84942d22 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c @@ -214,7 +214,6 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, /* Examine each GPE Register within the block */ for (i = 0; i < gpe_block->register_count; i++) { - /* Disable all GPEs in this register */ status = acpi_hw_low_level_write(8, 0x00, @@ -251,7 +250,6 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, /* Examine each GPE Register within the block */ for (i = 0; i < gpe_block->register_count; i++) { - /* Clear status on all GPEs in this register */ status = acpi_hw_low_level_write(8, 0xFF, @@ -370,7 +368,7 @@ acpi_status acpi_hw_disable_all_gpes(void) { acpi_status status; - ACPI_FUNCTION_TRACE(hw_disable_all_gpes); + ACPI_FUNCTION_TRACE("hw_disable_all_gpes"); status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block); status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); @@ -393,7 +391,7 @@ acpi_status acpi_hw_enable_all_runtime_gpes(void) { acpi_status status; - ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes); + ACPI_FUNCTION_TRACE("hw_enable_all_runtime_gpes"); status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block); return_ACPI_STATUS(status); @@ -415,7 +413,7 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void) { acpi_status status; - ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes); + ACPI_FUNCTION_TRACE("hw_enable_all_wakeup_gpes"); status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block); return_ACPI_STATUS(status); diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c index 3143f36fc..e1fe75498 100644 --- a/drivers/acpi/hardware/hwregs.c +++ b/drivers/acpi/hardware/hwregs.c @@ -43,6 +43,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -61,21 +63,23 @@ ACPI_MODULE_NAME("hwregs") * DESCRIPTION: Clears all fixed and general purpose status bits * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * - * NOTE: TBD: Flags parameter is obsolete, to be removed - * ******************************************************************************/ acpi_status acpi_hw_clear_acpi_status(u32 flags) { acpi_status status; - acpi_cpu_flags lock_flags = 0; - ACPI_FUNCTION_TRACE(hw_clear_acpi_status); + ACPI_FUNCTION_TRACE("hw_clear_acpi_status"); ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n", ACPI_BITMASK_ALL_FIXED_STATUS, (u16) acpi_gbl_FADT->xpm1a_evt_blk.address)); - lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + if (flags & ACPI_MTX_LOCK) { + status = acpi_ut_acquire_mutex(ACPI_MTX_HARDWARE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS, @@ -100,7 +104,9 @@ acpi_status acpi_hw_clear_acpi_status(u32 flags) status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); unlock_and_exit: - acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); + if (flags & ACPI_MTX_LOCK) { + (void)acpi_ut_release_mutex(ACPI_MTX_HARDWARE); + } return_ACPI_STATUS(status); } @@ -123,9 +129,10 @@ acpi_status acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) { acpi_status status = AE_OK; - struct acpi_evaluate_info *info; + struct acpi_parameter_info info; + char *sleep_state_name; - ACPI_FUNCTION_TRACE(acpi_get_sleep_type_data); + ACPI_FUNCTION_TRACE("acpi_get_sleep_type_data"); /* Validate parameters */ @@ -133,52 +140,47 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Allocate the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } + /* Evaluate the namespace object containing the values for this state */ - info->pathname = + info.parameters = NULL; + info.return_object = NULL; + sleep_state_name = ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]); - /* Evaluate the namespace object containing the values for this state */ - - status = acpi_ns_evaluate(info); + status = acpi_ns_evaluate_by_name(sleep_state_name, &info); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "%s while evaluating SleepState [%s]\n", + "%s while evaluating sleep_state [%s]\n", acpi_format_exception(status), - info->pathname)); + sleep_state_name)); - goto cleanup; + return_ACPI_STATUS(status); } /* Must have a return object */ - if (!info->return_object) { + if (!info.return_object) { ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]", - info->pathname)); + sleep_state_name)); status = AE_NOT_EXIST; } /* It must be of type Package */ - else if (ACPI_GET_OBJECT_TYPE(info->return_object) != ACPI_TYPE_PACKAGE) { + else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) { ACPI_ERROR((AE_INFO, "Sleep State return object is not a Package")); status = AE_AML_OPERAND_TYPE; } /* - * The package must have at least two elements. NOTE (March 2005): This + * The package must have at least two elements. NOTE (March 2005): This * goes against the current ACPI spec which defines this object as a - * package with one encoded DWORD element. However, existing practice + * package with one encoded DWORD element. However, existing practice * by BIOS vendors seems to be to have 2 or more elements, at least * one per sleep type (A/B). */ - else if (info->return_object->package.count < 2) { + else if (info.return_object->package.count < 2) { ACPI_ERROR((AE_INFO, "Sleep State return package does not have at least two elements")); status = AE_AML_NO_OPERAND; @@ -186,42 +188,39 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b) /* The first two elements must both be of type Integer */ - else if ((ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[0]) + else if ((ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[0]) != ACPI_TYPE_INTEGER) || - (ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[1]) + (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1]) != ACPI_TYPE_INTEGER)) { ACPI_ERROR((AE_INFO, "Sleep State return package elements are not both Integers (%s, %s)", - acpi_ut_get_object_type_name(info->return_object-> + acpi_ut_get_object_type_name(info.return_object-> package.elements[0]), - acpi_ut_get_object_type_name(info->return_object-> + acpi_ut_get_object_type_name(info.return_object-> package.elements[1]))); status = AE_AML_OPERAND_TYPE; } else { /* Valid _Sx_ package size, type, and value */ *sleep_type_a = (u8) - (info->return_object->package.elements[0])->integer.value; + (info.return_object->package.elements[0])->integer.value; *sleep_type_b = (u8) - (info->return_object->package.elements[1])->integer.value; + (info.return_object->package.elements[1])->integer.value; } if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, - "While evaluating SleepState [%s], bad Sleep object %p type %s", - info->pathname, info->return_object, - acpi_ut_get_object_type_name(info-> + "While evaluating sleep_state [%s], bad Sleep object %p type %s", + sleep_state_name, info.return_object, + acpi_ut_get_object_type_name(info. return_object))); } - acpi_ut_remove_reference(info->return_object); - - cleanup: - ACPI_FREE(info); + acpi_ut_remove_reference(info.return_object); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data) +EXPORT_SYMBOL(acpi_get_sleep_type_data); /******************************************************************************* * @@ -234,12 +233,13 @@ ACPI_EXPORT_SYMBOL(acpi_get_sleep_type_data) * DESCRIPTION: Map register_id into a register bitmask. * ******************************************************************************/ + struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) { ACPI_FUNCTION_ENTRY(); if (register_id > ACPI_BITREG_MAX) { - ACPI_ERROR((AE_INFO, "Invalid BitRegister ID: %X", + ACPI_ERROR((AE_INFO, "Invalid bit_register ID: %X", register_id)); return (NULL); } @@ -255,13 +255,11 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) * return_value - Value that was read from the register * Flags - Lock the hardware or not * - * RETURN: Status and the value read from specified Register. Value + * RETURN: Status and the value read from specified Register. Value * returned is normalized to bit0 (is shifted all the way right) * * DESCRIPTION: ACPI bit_register read function. * - * NOTE: TBD: Flags parameter is obsolete, to be removed - * ******************************************************************************/ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) @@ -270,7 +268,7 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) struct acpi_bit_register_info *bit_reg_info; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_get_register); + ACPI_FUNCTION_TRACE("acpi_get_register"); /* Get the info structure corresponding to the requested ACPI Register */ @@ -279,14 +277,24 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) return_ACPI_STATUS(AE_BAD_PARAMETER); } + if (flags & ACPI_MTX_LOCK) { + status = acpi_ut_acquire_mutex(ACPI_MTX_HARDWARE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } + /* Read from the register */ - status = acpi_hw_register_read(ACPI_MTX_LOCK, + status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, bit_reg_info->parent_register, ®ister_value); - if (ACPI_SUCCESS(status)) { + if (flags & ACPI_MTX_LOCK) { + (void)acpi_ut_release_mutex(ACPI_MTX_HARDWARE); + } + if (ACPI_SUCCESS(status)) { /* Normalize the value that was read */ register_value = @@ -303,7 +311,7 @@ acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_register) +EXPORT_SYMBOL(acpi_get_register); /******************************************************************************* * @@ -318,28 +326,31 @@ ACPI_EXPORT_SYMBOL(acpi_get_register) * * DESCRIPTION: ACPI Bit Register write function. * - * NOTE: TBD: Flags parameter is obsolete, to be removed - * ******************************************************************************/ + acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) { u32 register_value = 0; struct acpi_bit_register_info *bit_reg_info; acpi_status status; - acpi_cpu_flags lock_flags; - ACPI_FUNCTION_TRACE_U32(acpi_set_register, register_id); + ACPI_FUNCTION_TRACE_U32("acpi_set_register", register_id); /* Get the info structure corresponding to the requested ACPI Register */ bit_reg_info = acpi_hw_get_bit_register_info(register_id); if (!bit_reg_info) { - ACPI_ERROR((AE_INFO, "Bad ACPI HW RegisterId: %X", + ACPI_ERROR((AE_INFO, "Bad ACPI HW register_id: %X", register_id)); return_ACPI_STATUS(AE_BAD_PARAMETER); } - lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + if (flags & ACPI_MTX_LOCK) { + status = acpi_ut_acquire_mutex(ACPI_MTX_HARDWARE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + } /* Always do a register read first so we can insert the new bits */ @@ -361,8 +372,8 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) case ACPI_REGISTER_PM1_STATUS: /* - * Status Registers are different from the rest. Clear by - * writing 1, and writing 0 has no effect. So, the only relevant + * Status Registers are different from the rest. Clear by + * writing 1, and writing 0 has no effect. So, the only relevant * information is the single bit we're interested in, all others should * be written as 0 so they will be left unchanged. */ @@ -447,7 +458,9 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) unlock_and_exit: - acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); + if (flags & ACPI_MTX_LOCK) { + (void)acpi_ut_release_mutex(ACPI_MTX_HARDWARE); + } /* Normalize the value that was read */ @@ -461,33 +474,37 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_set_register) +EXPORT_SYMBOL(acpi_set_register); /****************************************************************************** * * FUNCTION: acpi_hw_register_read * - * PARAMETERS: use_lock - Lock hardware? True/False - * register_id - ACPI Register ID + * PARAMETERS: use_lock - Mutex hw access + * register_id - register_iD + Offset * return_value - Where the register value is returned * * RETURN: Status and the value read. * - * DESCRIPTION: Read from the specified ACPI register + * DESCRIPTION: Acpi register read function. Registers are read at the + * given offset. * ******************************************************************************/ + acpi_status acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) { u32 value1 = 0; u32 value2 = 0; acpi_status status; - acpi_cpu_flags lock_flags = 0; - ACPI_FUNCTION_TRACE(hw_register_read); + ACPI_FUNCTION_TRACE("hw_register_read"); if (ACPI_MTX_LOCK == use_lock) { - lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + status = acpi_ut_acquire_mutex(ACPI_MTX_HARDWARE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } } switch (register_id) { @@ -565,7 +582,7 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) unlock_and_exit: if (ACPI_MTX_LOCK == use_lock) { - acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); + (void)acpi_ut_release_mutex(ACPI_MTX_HARDWARE); } if (ACPI_SUCCESS(status)) { @@ -579,60 +596,33 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value) * * FUNCTION: acpi_hw_register_write * - * PARAMETERS: use_lock - Lock hardware? True/False - * register_id - ACPI Register ID + * PARAMETERS: use_lock - Mutex hw access + * register_id - register_iD + Offset * Value - The value to write * * RETURN: Status * - * DESCRIPTION: Write to the specified ACPI register - * - * NOTE: In accordance with the ACPI specification, this function automatically - * preserves the value of the following bits, meaning that these bits cannot be - * changed via this interface: - * - * PM1_CONTROL[0] = SCI_EN - * PM1_CONTROL[9] - * PM1_STATUS[11] - * - * ACPI References: - * 1) Hardware Ignored Bits: When software writes to a register with ignored - * bit fields, it preserves the ignored bit fields - * 2) SCI_EN: OSPM always preserves this bit position + * DESCRIPTION: Acpi register Write function. Registers are written at the + * given offset. * ******************************************************************************/ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value) { acpi_status status; - acpi_cpu_flags lock_flags = 0; - u32 read_value; - ACPI_FUNCTION_TRACE(hw_register_write); + ACPI_FUNCTION_TRACE("hw_register_write"); if (ACPI_MTX_LOCK == use_lock) { - lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + status = acpi_ut_acquire_mutex(ACPI_MTX_HARDWARE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } } switch (register_id) { case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */ - /* Perform a read first to preserve certain bits (per ACPI spec) */ - - status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, - ACPI_REGISTER_PM1_STATUS, - &read_value); - if (ACPI_FAILURE(status)) { - goto unlock_and_exit; - } - - /* Insert the bits to be preserved */ - - ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS, - read_value); - - /* Now we can write the data */ - status = acpi_hw_low_level_write(16, value, &acpi_gbl_FADT->xpm1a_evt_blk); @@ -663,25 +653,6 @@ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value) case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */ - /* - * Perform a read first to preserve certain bits (per ACPI spec) - * - * Note: This includes SCI_EN, we never want to change this bit - */ - status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, - ACPI_REGISTER_PM1_CONTROL, - &read_value); - if (ACPI_FAILURE(status)) { - goto unlock_and_exit; - } - - /* Insert the bits to be preserved */ - - ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS, - read_value); - - /* Now we can write the data */ - status = acpi_hw_low_level_write(16, value, &acpi_gbl_FADT->xpm1a_cnt_blk); @@ -736,7 +707,7 @@ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value) unlock_and_exit: if (ACPI_MTX_LOCK == use_lock) { - acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); + (void)acpi_ut_release_mutex(ACPI_MTX_HARDWARE); } return_ACPI_STATUS(status); @@ -762,7 +733,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg) u64 address; acpi_status status; - ACPI_FUNCTION_NAME(hw_low_level_read); + ACPI_FUNCTION_NAME("hw_low_level_read"); /* * Must have a valid pointer to a GAS structure, and @@ -773,7 +744,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg) return (AE_OK); } - /* Get a local copy of the address. Handles possible alignment issues */ + /* Get a local copy of the address. Handles possible alignment issues */ ACPI_MOVE_64_TO_64(&address, ®->address); if (!address) { @@ -834,7 +805,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg) u64 address; acpi_status status; - ACPI_FUNCTION_NAME(hw_low_level_write); + ACPI_FUNCTION_NAME("hw_low_level_write"); /* * Must have a valid pointer to a GAS structure, and @@ -845,7 +816,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg) return (AE_OK); } - /* Get a local copy of the address. Handles possible alignment issues */ + /* Get a local copy of the address. Handles possible alignment issues */ ACPI_MOVE_64_TO_64(&address, ®->address); if (!address) { diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 8bb43cae6..89269272f 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c @@ -42,6 +42,7 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include #include #define _COMPONENT ACPI_HARDWARE @@ -63,7 +64,7 @@ acpi_status acpi_set_firmware_waking_vector(acpi_physical_address physical_address) { - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector); + ACPI_FUNCTION_TRACE("acpi_set_firmware_waking_vector"); /* Set the vector */ @@ -78,8 +79,6 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) - /******************************************************************************* * * FUNCTION: acpi_get_firmware_waking_vector @@ -93,12 +92,13 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) * DESCRIPTION: Access function for the firmware_waking_vector field in FACS * ******************************************************************************/ + #ifdef ACPI_FUTURE_USAGE acpi_status acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) { - ACPI_FUNCTION_TRACE(acpi_get_firmware_waking_vector); + ACPI_FUNCTION_TRACE("acpi_get_firmware_waking_vector"); if (!physical_address) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -118,8 +118,6 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) return_ACPI_STATUS(AE_OK); } - -ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector) #endif /******************************************************************************* @@ -136,13 +134,14 @@ ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector) * various OS-specific tasks between the two steps. * ******************************************************************************/ + acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) { acpi_status status; struct acpi_object_list arg_list; union acpi_object arg; - ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_prep); + ACPI_FUNCTION_TRACE("acpi_enter_sleep_state_prep"); /* * _PSW methods could be run here to enable wake-on keyboard, LAN, etc. @@ -207,8 +206,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) - /******************************************************************************* * * FUNCTION: acpi_enter_sleep_state @@ -221,6 +218,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * ******************************************************************************/ + acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) { u32 PM1Acontrol; @@ -230,7 +228,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) u32 in_value; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_enter_sleep_state); + ACPI_FUNCTION_TRACE("acpi_enter_sleep_state"); if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { @@ -380,7 +378,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) +EXPORT_SYMBOL(acpi_enter_sleep_state); /******************************************************************************* * @@ -394,12 +392,13 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * ******************************************************************************/ + acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) { u32 in_value; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios); + ACPI_FUNCTION_TRACE("acpi_enter_sleep_state_s4bios"); status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK); @@ -444,7 +443,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) +EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); /******************************************************************************* * @@ -458,6 +457,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) * Called with interrupts ENABLED. * ******************************************************************************/ + acpi_status acpi_leave_sleep_state(u8 sleep_state) { struct acpi_object_list arg_list; @@ -468,7 +468,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) u32 PM1Acontrol; u32 PM1Bcontrol; - ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); + ACPI_FUNCTION_TRACE("acpi_leave_sleep_state"); /* * Set SLP_TYPE and SLP_EN to state S0. @@ -490,7 +490,6 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol); if (ACPI_SUCCESS(status)) { - /* Clear SLP_EN and SLP_TYP fields */ PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask | @@ -584,5 +583,3 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) return_ACPI_STATUS(status); } - -ACPI_EXPORT_SYMBOL(acpi_leave_sleep_state) diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c index c4ec47c93..fc10b7cb4 100644 --- a/drivers/acpi/hardware/hwtimer.c +++ b/drivers/acpi/hardware/hwtimer.c @@ -42,6 +42,7 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include #include #define _COMPONENT ACPI_HARDWARE @@ -60,13 +61,13 @@ ACPI_MODULE_NAME("hwtimer") ******************************************************************************/ acpi_status acpi_get_timer_resolution(u32 * resolution) { - ACPI_FUNCTION_TRACE(acpi_get_timer_resolution); + ACPI_FUNCTION_TRACE("acpi_get_timer_resolution"); if (!resolution) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - if (acpi_gbl_FADT->tmr_val_ext == 0) { + if (0 == acpi_gbl_FADT->tmr_val_ext) { *resolution = 24; } else { *resolution = 32; @@ -75,8 +76,6 @@ acpi_status acpi_get_timer_resolution(u32 * resolution) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution) - /****************************************************************************** * * FUNCTION: acpi_get_timer @@ -88,11 +87,12 @@ ACPI_EXPORT_SYMBOL(acpi_get_timer_resolution) * DESCRIPTION: Obtains current value of ACPI PM Timer (in ticks). * ******************************************************************************/ + acpi_status acpi_get_timer(u32 * ticks) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_get_timer); + ACPI_FUNCTION_TRACE("acpi_get_timer"); if (!ticks) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -103,7 +103,7 @@ acpi_status acpi_get_timer(u32 * ticks) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_timer) +EXPORT_SYMBOL(acpi_get_timer); /****************************************************************************** * @@ -133,6 +133,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_timer) * 2**32 Ticks / 3,600,000 Ticks/Sec = 1193 sec or 19.88 minutes * ******************************************************************************/ + acpi_status acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) { @@ -140,7 +141,7 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) u32 delta_ticks; acpi_integer quotient; - ACPI_FUNCTION_TRACE(acpi_get_timer_duration); + ACPI_FUNCTION_TRACE("acpi_get_timer_duration"); if (!time_elapsed) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -153,8 +154,7 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) if (start_ticks < end_ticks) { delta_ticks = end_ticks - start_ticks; } else if (start_ticks > end_ticks) { - if (acpi_gbl_FADT->tmr_val_ext == 0) { - + if (0 == acpi_gbl_FADT->tmr_val_ext) { /* 24-bit Timer */ delta_ticks = @@ -183,4 +183,4 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_timer_duration) +EXPORT_SYMBOL(acpi_get_timer_duration); diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c index 1ba2db671..2e2e4051d 100644 --- a/drivers/acpi/hotkey.c +++ b/drivers/acpi/hotkey.c @@ -91,14 +91,6 @@ enum { HK_EVENT_ENTERRING_S5, }; -enum conf_entry_enum { - bus_handle = 0, - bus_method = 1, - action_handle = 2, - method = 3, - LAST_CONF_ENTRY -}; - /* procdir we use */ static struct proc_dir_entry *hotkey_proc_dir; static struct proc_dir_entry *hotkey_config; @@ -192,7 +184,7 @@ static union acpi_hotkey *get_hotkey_by_event(struct *hotkey_list, int event); /* event based config */ -static const struct file_operations hotkey_config_fops = { +static struct file_operations hotkey_config_fops = { .open = hotkey_open_config, .read = seq_read, .write = hotkey_write_config, @@ -201,7 +193,7 @@ static const struct file_operations hotkey_config_fops = { }; /* polling based config */ -static const struct file_operations hotkey_poll_config_fops = { +static struct file_operations hotkey_poll_config_fops = { .open = hotkey_poll_open_config, .read = seq_read, .write = hotkey_write_config, @@ -210,7 +202,7 @@ static const struct file_operations hotkey_poll_config_fops = { }; /* hotkey driver info */ -static const struct file_operations hotkey_info_fops = { +static struct file_operations hotkey_info_fops = { .open = hotkey_info_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -218,7 +210,7 @@ static const struct file_operations hotkey_info_fops = { }; /* action */ -static const struct file_operations hotkey_action_fops = { +static struct file_operations hotkey_action_fops = { .open = hotkey_action_open_fs, .read = seq_read, .write = hotkey_execute_aml_method, @@ -227,7 +219,7 @@ static const struct file_operations hotkey_action_fops = { }; /* polling results */ -static const struct file_operations hotkey_polling_fops = { +static struct file_operations hotkey_polling_fops = { .open = hotkey_polling_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -239,10 +231,11 @@ struct list_head hotkey_entries; /* head of the list of hotkey_list */ static int hotkey_info_seq_show(struct seq_file *seq, void *offset) { + ACPI_FUNCTION_TRACE("hotkey_info_seq_show"); seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION); - return 0; + return_VALUE(0); } static int hotkey_info_open_fs(struct inode *inode, struct file *file) @@ -252,15 +245,19 @@ static int hotkey_info_open_fs(struct inode *inode, struct file *file) static char *format_result(union acpi_object *object) { - char *buf; + char *buf = NULL; + + buf = (char *)kmalloc(RESULT_STR_LEN, GFP_KERNEL); + if (buf) + memset(buf, 0, RESULT_STR_LEN); + else + goto do_fail; - buf = kzalloc(RESULT_STR_LEN, GFP_KERNEL); - if (!buf) - return NULL; /* Now, just support integer type */ if (object->type == ACPI_TYPE_INTEGER) sprintf(buf, "%d\n", (u32) object->integer.value); - return buf; + do_fail: + return (buf); } static int hotkey_polling_seq_show(struct seq_file *seq, void *offset) @@ -269,6 +266,7 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset) (struct acpi_polling_hotkey *)seq->private; char *buf; + ACPI_FUNCTION_TRACE("hotkey_polling_seq_show"); if (poll_hotkey->poll_result) { buf = format_result(poll_hotkey->poll_result); @@ -276,7 +274,7 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "%s", buf); kfree(buf); } - return 0; + return_VALUE(0); } static int hotkey_polling_open_fs(struct inode *inode, struct file *file) @@ -295,6 +293,7 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list) struct list_head *entries; int val = -1; + ACPI_FUNCTION_TRACE("hotkey_get_internal_event"); list_for_each(entries, list->entries) { union acpi_hotkey *key = @@ -306,7 +305,7 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list) } } - return val; + return_VALUE(val); } static void @@ -315,14 +314,15 @@ acpi_hotkey_notify_handler(acpi_handle handle, u32 event, void *data) struct acpi_device *device = NULL; u32 internal_event; + ACPI_FUNCTION_TRACE("acpi_hotkey_notify_handler"); if (acpi_bus_get_device(handle, &device)) - return; + return_VOID; internal_event = hotkey_get_internal_event(event, &global_hotkey_list); acpi_bus_generate_event(device, internal_event, 0); - return; + return_VOID; } /* Need to invent automatically hotkey add method */ @@ -346,6 +346,7 @@ static int create_polling_proc(union acpi_hotkey *device) char proc_name[80]; mode_t mode; + ACPI_FUNCTION_TRACE("create_polling_proc"); mode = S_IFREG | S_IRUGO | S_IWUGO; sprintf(proc_name, "%d", device->link.hotkey_standard_num); @@ -355,7 +356,10 @@ static int create_polling_proc(union acpi_hotkey *device) proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); if (!proc) { - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + device->poll_hotkey.poll_method)); + return_VALUE(-ENODEV); } else { proc->proc_fops = &hotkey_polling_fops; proc->owner = THIS_MODULE; @@ -364,7 +368,7 @@ static int create_polling_proc(union acpi_hotkey *device) proc->gid = 0; device->poll_hotkey.proc = proc; } - return 0; + return_VALUE(0); } static int hotkey_add(union acpi_hotkey *device) @@ -372,6 +376,7 @@ static int hotkey_add(union acpi_hotkey *device) int status = 0; struct acpi_device *dev = NULL; + ACPI_FUNCTION_TRACE("hotkey_add"); if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) { acpi_bus_get_device(device->event_hotkey.bus_handle, &dev); @@ -386,13 +391,14 @@ static int hotkey_add(union acpi_hotkey *device) list_add_tail(&device->link.entries, global_hotkey_list.entries); - return status; + return_VALUE(status); } static int hotkey_remove(union acpi_hotkey *device) { struct list_head *entries, *next; + ACPI_FUNCTION_TRACE("hotkey_remove"); list_for_each_safe(entries, next, global_hotkey_list.entries) { union acpi_hotkey *key = @@ -406,13 +412,14 @@ static int hotkey_remove(union acpi_hotkey *device) } } kfree(device); - return 0; + return_VALUE(0); } static int hotkey_update(union acpi_hotkey *key) { struct list_head *entries; + ACPI_FUNCTION_TRACE("hotkey_update"); list_for_each(entries, global_hotkey_list.entries) { union acpi_hotkey *tmp = @@ -454,18 +461,19 @@ static int hotkey_update(union acpi_hotkey *key) */ kfree(key); } - return 0; + return_VALUE(0); break; } } - return -ENODEV; + return_VALUE(-ENODEV); } static void free_hotkey_device(union acpi_hotkey *key) { struct acpi_device *dev; + ACPI_FUNCTION_TRACE("free_hotkey_device"); if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) { acpi_bus_get_device(key->event_hotkey.bus_handle, &dev); @@ -485,119 +493,119 @@ static void free_hotkey_device(union acpi_hotkey *key) free_poll_hotkey_buffer(key); } kfree(key); - return; + return_VOID; } static void free_hotkey_buffer(union acpi_hotkey *key) { - /* key would never be null, action method could be */ kfree(key->event_hotkey.action_method); } static void free_poll_hotkey_buffer(union acpi_hotkey *key) { - /* key would never be null, others could be*/ kfree(key->poll_hotkey.action_method); kfree(key->poll_hotkey.poll_method); kfree(key->poll_hotkey.poll_result); } static int -init_hotkey_device(union acpi_hotkey *key, char **config_entry, - int std_num, int external_num) +init_hotkey_device(union acpi_hotkey *key, char *bus_str, char *action_str, + char *method, int std_num, int external_num) { acpi_handle tmp_handle; acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("init_hotkey_device"); + if (std_num < 0 || IS_POLL(std_num) || !key) goto do_fail; - if (!config_entry[bus_handle] || !config_entry[action_handle] - || !config_entry[method]) + if (!bus_str || !action_str || !method) goto do_fail; key->link.hotkey_type = ACPI_HOTKEY_EVENT; key->link.hotkey_standard_num = std_num; key->event_hotkey.flag = 0; - key->event_hotkey.action_method = config_entry[method]; + key->event_hotkey.action_method = method; - status = acpi_get_handle(NULL, config_entry[bus_handle], - &(key->event_hotkey.bus_handle)); + status = + acpi_get_handle(NULL, bus_str, &(key->event_hotkey.bus_handle)); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; key->event_hotkey.external_hotkey_num = external_num; - status = acpi_get_handle(NULL, config_entry[action_handle], + status = + acpi_get_handle(NULL, action_str, &(key->event_hotkey.action_handle)); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; status = acpi_get_handle(key->event_hotkey.action_handle, - config_entry[method], &tmp_handle); + method, &tmp_handle); if (ACPI_FAILURE(status)) - goto do_fail_zero; - return AE_OK; -do_fail_zero: - key->event_hotkey.action_method = NULL; -do_fail: - return -ENODEV; + goto do_fail; + return_VALUE(AE_OK); + do_fail: + return_VALUE(-ENODEV); } static int -init_poll_hotkey_device(union acpi_hotkey *key, char **config_entry, - int std_num) +init_poll_hotkey_device(union acpi_hotkey *key, + char *poll_str, + char *poll_method, + char *action_str, char *action_method, int std_num) { acpi_status status = AE_OK; acpi_handle tmp_handle; + ACPI_FUNCTION_TRACE("init_poll_hotkey_device"); + if (std_num < 0 || IS_EVENT(std_num) || !key) goto do_fail; - if (!config_entry[bus_handle] ||!config_entry[bus_method] || - !config_entry[action_handle] || !config_entry[method]) + + if (!poll_str || !poll_method || !action_str || !action_method) goto do_fail; key->link.hotkey_type = ACPI_HOTKEY_POLLING; key->link.hotkey_standard_num = std_num; key->poll_hotkey.flag = 0; - key->poll_hotkey.poll_method = config_entry[bus_method]; - key->poll_hotkey.action_method = config_entry[method]; + key->poll_hotkey.poll_method = poll_method; + key->poll_hotkey.action_method = action_method; - status = acpi_get_handle(NULL, config_entry[bus_handle], - &(key->poll_hotkey.poll_handle)); + status = + acpi_get_handle(NULL, poll_str, &(key->poll_hotkey.poll_handle)); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; status = acpi_get_handle(key->poll_hotkey.poll_handle, - config_entry[bus_method], &tmp_handle); + poll_method, &tmp_handle); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; status = - acpi_get_handle(NULL, config_entry[action_handle], + acpi_get_handle(NULL, action_str, &(key->poll_hotkey.action_handle)); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; status = acpi_get_handle(key->poll_hotkey.action_handle, - config_entry[method], &tmp_handle); + action_method, &tmp_handle); if (ACPI_FAILURE(status)) - goto do_fail_zero; + goto do_fail; key->poll_hotkey.poll_result = (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL); if (!key->poll_hotkey.poll_result) - goto do_fail_zero; - return AE_OK; - -do_fail_zero: - key->poll_hotkey.poll_method = NULL; - key->poll_hotkey.action_method = NULL; -do_fail: - return -ENODEV; + goto do_fail; + return_VALUE(AE_OK); + do_fail: + return_VALUE(-ENODEV); } static int hotkey_open_config(struct inode *inode, struct file *file) { - return (single_open + ACPI_FUNCTION_TRACE("hotkey_open_config"); + return_VALUE(single_open (file, hotkey_config_seq_show, PDE(inode)->data)); } static int hotkey_poll_open_config(struct inode *inode, struct file *file) { - return (single_open + ACPI_FUNCTION_TRACE("hotkey_poll_open_config"); + return_VALUE(single_open (file, hotkey_poll_config_seq_show, PDE(inode)->data)); } @@ -610,6 +618,7 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset) struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; + ACPI_FUNCTION_TRACE(("hotkey_config_seq_show")); list_for_each(entries, hotkey_list->entries) { union acpi_hotkey *key = @@ -627,7 +636,7 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset) } } seq_puts(seq, "\n"); - return 0; + return_VALUE(0); } static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) @@ -639,6 +648,7 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; + ACPI_FUNCTION_TRACE(("hotkey_config_seq_show")); list_for_each(entries, hotkey_list->entries) { union acpi_hotkey *key = @@ -656,22 +666,22 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) } } seq_puts(seq, "\n"); - return 0; + return_VALUE(0); } static int -get_parms(char *config_record, int *cmd, char **config_entry, - int *internal_event_num, int *external_event_num) +get_parms(char *config_record, + int *cmd, + char **bus_handle, + char **bus_method, + char **action_handle, + char **method, int *internal_event_num, int *external_event_num) { -/* the format of *config_record = - * "1:\d+:*" : "cmd:internal_event_num" - * "\d+:\w+:\w+:\w+:\w+:\d+:\d+" : - * "cmd:bus_handle:bus_method:action_handle:method:internal_event_num:external_event_num" - */ char *tmp, *tmp1, count; - int i; + ACPI_FUNCTION_TRACE(("get_parms")); sscanf(config_record, "%d", cmd); + if (*cmd == 1) { if (sscanf(config_record, "%d:%d", cmd, internal_event_num) != 2) @@ -683,28 +693,58 @@ get_parms(char *config_record, int *cmd, char **config_entry, if (!tmp) goto do_fail; tmp++; - for (i = 0; i < LAST_CONF_ENTRY; i++) { - tmp1 = strchr(tmp, ':'); - if (!tmp1) { - goto do_fail; - } - count = tmp1 - tmp; - config_entry[i] = kzalloc(count + 1, GFP_KERNEL); - if (!config_entry[i]) - goto handle_failure; - strncpy(config_entry[i], tmp, count); - tmp = tmp1 + 1; - } - if (sscanf(tmp, "%d:%d", internal_event_num, external_event_num) <= 0) - goto handle_failure; - if (!IS_OTHERS(*internal_event_num)) { - return 6; - } -handle_failure: - while (i-- > 0) - kfree(config_entry[i]); -do_fail: - return -1; + tmp1 = strchr(tmp, ':'); + if (!tmp1) + goto do_fail; + + count = tmp1 - tmp; + *bus_handle = (char *)kmalloc(count + 1, GFP_KERNEL); + if (!*bus_handle) + goto do_fail; + strncpy(*bus_handle, tmp, count); + *(*bus_handle + count) = 0; + + tmp = tmp1; + tmp++; + tmp1 = strchr(tmp, ':'); + if (!tmp1) + goto do_fail; + count = tmp1 - tmp; + *bus_method = (char *)kmalloc(count + 1, GFP_KERNEL); + if (!*bus_method) + goto do_fail; + strncpy(*bus_method, tmp, count); + *(*bus_method + count) = 0; + + tmp = tmp1; + tmp++; + tmp1 = strchr(tmp, ':'); + if (!tmp1) + goto do_fail; + count = tmp1 - tmp; + *action_handle = (char *)kmalloc(count + 1, GFP_KERNEL); + strncpy(*action_handle, tmp, count); + *(*action_handle + count) = 0; + + tmp = tmp1; + tmp++; + tmp1 = strchr(tmp, ':'); + if (!tmp1) + goto do_fail; + count = tmp1 - tmp; + *method = (char *)kmalloc(count + 1, GFP_KERNEL); + if (!*method) + goto do_fail; + strncpy(*method, tmp, count); + *(*method + count) = 0; + + if (sscanf(tmp1 + 1, "%d:%d", internal_event_num, external_event_num) <= + 0) + goto do_fail; + + return_VALUE(6); + do_fail: + return_VALUE(-1); } /* count is length for one input record */ @@ -713,58 +753,91 @@ static ssize_t hotkey_write_config(struct file *file, size_t count, loff_t * data) { char *config_record = NULL; - char *config_entry[LAST_CONF_ENTRY]; + char *bus_handle = NULL; + char *bus_method = NULL; + char *action_handle = NULL; + char *method = NULL; int cmd, internal_event_num, external_event_num; int ret = 0; - union acpi_hotkey *key = kzalloc(sizeof(union acpi_hotkey), GFP_KERNEL); + union acpi_hotkey *key = NULL; - if (!key) - return -ENOMEM; + ACPI_FUNCTION_TRACE(("hotkey_write_config")); - config_record = kzalloc(count + 1, GFP_KERNEL); - if (!config_record) { - kfree(key); - return -ENOMEM; - } + config_record = (char *)kmalloc(count + 1, GFP_KERNEL); + if (!config_record) + return_VALUE(-ENOMEM); if (copy_from_user(config_record, buffer, count)) { kfree(config_record); - kfree(key); - printk(KERN_ERR PREFIX "Invalid data\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data \n")); + return_VALUE(-EINVAL); } - ret = get_parms(config_record, &cmd, config_entry, - &internal_event_num, &external_event_num); + config_record[count] = 0; + + ret = get_parms(config_record, + &cmd, + &bus_handle, + &bus_method, + &action_handle, + &method, &internal_event_num, &external_event_num); + kfree(config_record); + if (IS_OTHERS(internal_event_num)) + goto do_fail; if (ret != 6) { - printk(KERN_ERR PREFIX "Invalid data format ret=%d\n", ret); - return -EINVAL; + do_fail: + kfree(bus_handle); + kfree(bus_method); + kfree(action_handle); + kfree(method); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid data format ret=%d\n", ret)); + return_VALUE(-EINVAL); } + key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL); + if (!key) + goto do_fail; + memset(key, 0, sizeof(union acpi_hotkey)); if (cmd == 1) { union acpi_hotkey *tmp = NULL; tmp = get_hotkey_by_event(&global_hotkey_list, internal_event_num); if (!tmp) - printk(KERN_ERR PREFIX "Invalid key\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid key")); else memcpy(key, tmp, sizeof(union acpi_hotkey)); goto cont_cmd; } if (IS_EVENT(internal_event_num)) { - if (init_hotkey_device(key, config_entry, - internal_event_num, external_event_num)) - goto init_hotkey_fail; - } else { - if (init_poll_hotkey_device(key, config_entry, - internal_event_num)) - goto init_poll_hotkey_fail; + kfree(bus_method); + ret = init_hotkey_device(key, bus_handle, action_handle, method, + internal_event_num, + external_event_num); + } else + ret = init_poll_hotkey_device(key, bus_handle, bus_method, + action_handle, method, + internal_event_num); + if (ret) { + kfree(bus_handle); + kfree(action_handle); + if (IS_EVENT(internal_event_num)) + free_hotkey_buffer(key); + else + free_poll_hotkey_buffer(key); + kfree(key); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid hotkey \n")); + return_VALUE(-EINVAL); } -cont_cmd: + + cont_cmd: + kfree(bus_handle); + kfree(action_handle); + switch (cmd) { case 0: - if (get_hotkey_by_event(&global_hotkey_list, - key->link.hotkey_standard_num)) + if (get_hotkey_by_event + (&global_hotkey_list, key->link.hotkey_standard_num)) goto fail_out; else hotkey_add(key); @@ -773,7 +846,6 @@ cont_cmd: hotkey_remove(key); break; case 2: - /* key is kfree()ed if matched*/ if (hotkey_update(key)) goto fail_out; break; @@ -781,26 +853,15 @@ cont_cmd: goto fail_out; break; } - return count; - -init_poll_hotkey_fail: /* failed init_poll_hotkey_device */ - kfree(config_entry[bus_method]); - config_entry[bus_method] = NULL; -init_hotkey_fail: /* failed init_hotkey_device */ - kfree(config_entry[method]); -fail_out: - kfree(config_entry[bus_handle]); - kfree(config_entry[action_handle]); - /* No double free since elements =NULL for error cases */ - if (IS_EVENT(internal_event_num)) { - if (config_entry[bus_method]) - kfree(config_entry[bus_method]); - free_hotkey_buffer(key); /* frees [method] */ - } else - free_poll_hotkey_buffer(key); /* frees [bus_method]+[method] */ + return_VALUE(count); + fail_out: + if (IS_EVENT(internal_event_num)) + free_hotkey_buffer(key); + else + free_poll_hotkey_buffer(key); kfree(key); - printk(KERN_ERR PREFIX "invalid key\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid key\n")); + return_VALUE(-EINVAL); } /* @@ -817,6 +878,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val, union acpi_object in_obj; /* the only param we use */ acpi_status status; + ACPI_FUNCTION_TRACE("write_acpi_int"); params.count = 1; params.pointer = &in_obj; in_obj.type = ACPI_TYPE_INTEGER; @@ -824,7 +886,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val, status = acpi_evaluate_object(handle, (char *)method, ¶ms, output); - return (status == AE_OK); + return_VALUE(status == AE_OK); } static int read_acpi_int(acpi_handle handle, const char *method, @@ -834,6 +896,7 @@ static int read_acpi_int(acpi_handle handle, const char *method, union acpi_object out_obj; acpi_status status; + ACPI_FUNCTION_TRACE("read_acpi_int"); output.length = sizeof(out_obj); output.pointer = &out_obj; @@ -842,8 +905,8 @@ static int read_acpi_int(acpi_handle handle, const char *method, val->integer.value = out_obj.integer.value; val->type = out_obj.type; } else - printk(KERN_ERR PREFIX "null val pointer\n"); - return ((status == AE_OK) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "null val pointer")); + return_VALUE((status == AE_OK) && (out_obj.type == ACPI_TYPE_INTEGER)); } @@ -880,22 +943,24 @@ static ssize_t hotkey_execute_aml_method(struct file *file, int event, method_type, type, value; union acpi_hotkey *key; + ACPI_FUNCTION_TRACE("hotkey_execte_aml_method"); - arg = kzalloc(count + 1, GFP_KERNEL); + arg = (char *)kmalloc(count + 1, GFP_KERNEL); if (!arg) - return -ENOMEM; + return_VALUE(-ENOMEM); + arg[count] = 0; if (copy_from_user(arg, buffer, count)) { kfree(arg); - printk(KERN_ERR PREFIX "Invalid argument 2\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 2")); + return_VALUE(-EINVAL); } if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 4) { kfree(arg); - printk(KERN_ERR PREFIX "Invalid argument 3\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 3")); + return_VALUE(-EINVAL); } kfree(arg); if (type == ACPI_TYPE_INTEGER) { @@ -920,12 +985,12 @@ static ssize_t hotkey_execute_aml_method(struct file *file, } } else { - printk(KERN_WARNING "Not supported\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Not supported")); + return_VALUE(-EINVAL); } - return count; + return_VALUE(count); do_fail: - return -EINVAL; + return_VALUE(-EINVAL); } @@ -934,6 +999,7 @@ static int __init hotkey_init(void) int result; mode_t mode = S_IFREG | S_IRUGO | S_IWUGO; + ACPI_FUNCTION_TRACE("hotkey_init"); if (acpi_disabled) return -ENODEV; @@ -945,6 +1011,9 @@ static int __init hotkey_init(void) hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir); if (!hotkey_proc_dir) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + HOTKEY_PROC)); return (-ENODEV); } hotkey_proc_dir->owner = THIS_MODULE; @@ -952,6 +1021,9 @@ static int __init hotkey_init(void) hotkey_config = create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir); if (!hotkey_config) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + HOTKEY_EV_CONFIG)); goto do_fail1; } else { hotkey_config->proc_fops = &hotkey_config_fops; @@ -964,6 +1036,10 @@ static int __init hotkey_init(void) hotkey_poll_config = create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir); if (!hotkey_poll_config) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + HOTKEY_EV_CONFIG)); + goto do_fail2; } else { hotkey_poll_config->proc_fops = &hotkey_poll_config_fops; @@ -975,6 +1051,9 @@ static int __init hotkey_init(void) hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir); if (!hotkey_action) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + HOTKEY_ACTION)); goto do_fail3; } else { hotkey_action->proc_fops = &hotkey_action_fops; @@ -985,6 +1064,9 @@ static int __init hotkey_init(void) hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir); if (!hotkey_info) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Hotkey: Unable to create %s entry\n", + HOTKEY_INFO)); goto do_fail4; } else { hotkey_info->proc_fops = &hotkey_info_fops; @@ -1020,6 +1102,7 @@ static void __exit hotkey_exit(void) { struct list_head *entries, *next; + ACPI_FUNCTION_TRACE("hotkey_exit"); list_for_each_safe(entries, next, global_hotkey_list.entries) { union acpi_hotkey *key = diff --git a/drivers/acpi/i2c_ec.c b/drivers/acpi/i2c_ec.c deleted file mode 100644 index 6809c283e..000000000 --- a/drivers/acpi/i2c_ec.c +++ /dev/null @@ -1,406 +0,0 @@ -/* - * SMBus driver for ACPI Embedded Controller ($Revision: 1.3 $) - * - * Copyright (c) 2002, 2005 Ducrot Bruno - * Copyright (c) 2005 Rich Townsend (tiny hacks & tweaks) - * - * 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 version 2. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i2c_ec.h" - -#define xudelay(t) udelay(t) -#define xmsleep(t) msleep(t) - -#define ACPI_EC_HC_COMPONENT 0x00080000 -#define ACPI_EC_HC_CLASS "ec_hc_smbus" -#define ACPI_EC_HC_HID "ACPI0001" -#define ACPI_EC_HC_DRIVER_NAME "ACPI EC HC smbus driver" -#define ACPI_EC_HC_DEVICE_NAME "EC HC smbus" - -#define _COMPONENT ACPI_EC_HC_COMPONENT - -ACPI_MODULE_NAME("acpi_smbus") - -static int acpi_ec_hc_add(struct acpi_device *device); -static int acpi_ec_hc_remove(struct acpi_device *device, int type); - -static struct acpi_driver acpi_ec_hc_driver = { - .name = ACPI_EC_HC_DRIVER_NAME, - .class = ACPI_EC_HC_CLASS, - .ids = ACPI_EC_HC_HID, - .ops = { - .add = acpi_ec_hc_add, - .remove = acpi_ec_hc_remove, - }, -}; - -/* Various bit mask for EC_SC (R) */ -#define OBF 0x01 -#define IBF 0x02 -#define CMD 0x08 -#define BURST 0x10 -#define SCI_EVT 0x20 -#define SMI_EVT 0x40 - -/* Commands for EC_SC (W) */ -#define RD_EC 0x80 -#define WR_EC 0x81 -#define BE_EC 0x82 -#define BD_EC 0x83 -#define QR_EC 0x84 - -/* - * ACPI 2.0 chapter 13 SMBus 2.0 EC register model - */ - -#define ACPI_EC_SMB_PRTCL 0x00 /* protocol, PEC */ -#define ACPI_EC_SMB_STS 0x01 /* status */ -#define ACPI_EC_SMB_ADDR 0x02 /* address */ -#define ACPI_EC_SMB_CMD 0x03 /* command */ -#define ACPI_EC_SMB_DATA 0x04 /* 32 data registers */ -#define ACPI_EC_SMB_BCNT 0x24 /* number of data bytes */ -#define ACPI_EC_SMB_ALRM_A 0x25 /* alarm address */ -#define ACPI_EC_SMB_ALRM_D 0x26 /* 2 bytes alarm data */ - -#define ACPI_EC_SMB_STS_DONE 0x80 -#define ACPI_EC_SMB_STS_ALRM 0x40 -#define ACPI_EC_SMB_STS_RES 0x20 -#define ACPI_EC_SMB_STS_STATUS 0x1f - -#define ACPI_EC_SMB_STATUS_OK 0x00 -#define ACPI_EC_SMB_STATUS_FAIL 0x07 -#define ACPI_EC_SMB_STATUS_DNAK 0x10 -#define ACPI_EC_SMB_STATUS_DERR 0x11 -#define ACPI_EC_SMB_STATUS_CMD_DENY 0x12 -#define ACPI_EC_SMB_STATUS_UNKNOWN 0x13 -#define ACPI_EC_SMB_STATUS_ACC_DENY 0x17 -#define ACPI_EC_SMB_STATUS_TIMEOUT 0x18 -#define ACPI_EC_SMB_STATUS_NOTSUP 0x19 -#define ACPI_EC_SMB_STATUS_BUSY 0x1A -#define ACPI_EC_SMB_STATUS_PEC 0x1F - -#define ACPI_EC_SMB_PRTCL_WRITE 0x00 -#define ACPI_EC_SMB_PRTCL_READ 0x01 -#define ACPI_EC_SMB_PRTCL_QUICK 0x02 -#define ACPI_EC_SMB_PRTCL_BYTE 0x04 -#define ACPI_EC_SMB_PRTCL_BYTE_DATA 0x06 -#define ACPI_EC_SMB_PRTCL_WORD_DATA 0x08 -#define ACPI_EC_SMB_PRTCL_BLOCK_DATA 0x0a -#define ACPI_EC_SMB_PRTCL_PROC_CALL 0x0c -#define ACPI_EC_SMB_PRTCL_BLOCK_PROC_CALL 0x0d -#define ACPI_EC_SMB_PRTCL_I2C_BLOCK_DATA 0x4a -#define ACPI_EC_SMB_PRTCL_PEC 0x80 - -/* Length of pre/post transaction sleep (msec) */ -#define ACPI_EC_SMB_TRANSACTION_SLEEP 1 -#define ACPI_EC_SMB_ACCESS_SLEEP1 1 -#define ACPI_EC_SMB_ACCESS_SLEEP2 10 - -static int acpi_ec_smb_read(struct acpi_ec_smbus *smbus, u8 address, u8 * data) -{ - u8 val; - int err; - - err = ec_read(smbus->base + address, &val); - if (!err) { - *data = val; - } - xmsleep(ACPI_EC_SMB_TRANSACTION_SLEEP); - return (err); -} - -static int acpi_ec_smb_write(struct acpi_ec_smbus *smbus, u8 address, u8 data) -{ - int err; - - err = ec_write(smbus->base + address, data); - return (err); -} - -static int -acpi_ec_smb_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, - char read_write, u8 command, int size, - union i2c_smbus_data *data) -{ - struct acpi_ec_smbus *smbus = adap->algo_data; - unsigned char protocol, len = 0, pec, temp[2] = { 0, 0 }; - int i; - - if (read_write == I2C_SMBUS_READ) { - protocol = ACPI_EC_SMB_PRTCL_READ; - } else { - protocol = ACPI_EC_SMB_PRTCL_WRITE; - } - pec = (flags & I2C_CLIENT_PEC) ? ACPI_EC_SMB_PRTCL_PEC : 0; - - switch (size) { - - case I2C_SMBUS_QUICK: - protocol |= ACPI_EC_SMB_PRTCL_QUICK; - read_write = I2C_SMBUS_WRITE; - break; - - case I2C_SMBUS_BYTE: - if (read_write == I2C_SMBUS_WRITE) { - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA, data->byte); - } - protocol |= ACPI_EC_SMB_PRTCL_BYTE; - break; - - case I2C_SMBUS_BYTE_DATA: - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - if (read_write == I2C_SMBUS_WRITE) { - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA, data->byte); - } - protocol |= ACPI_EC_SMB_PRTCL_BYTE_DATA; - break; - - case I2C_SMBUS_WORD_DATA: - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - if (read_write == I2C_SMBUS_WRITE) { - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA, data->word); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA + 1, - data->word >> 8); - } - protocol |= ACPI_EC_SMB_PRTCL_WORD_DATA | pec; - break; - - case I2C_SMBUS_BLOCK_DATA: - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - if (read_write == I2C_SMBUS_WRITE) { - len = min_t(u8, data->block[0], 32); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_BCNT, len); - for (i = 0; i < len; i++) - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA + i, - data->block[i + 1]); - } - protocol |= ACPI_EC_SMB_PRTCL_BLOCK_DATA | pec; - break; - - case I2C_SMBUS_I2C_BLOCK_DATA: - len = min_t(u8, data->block[0], 32); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_BCNT, len); - if (read_write == I2C_SMBUS_WRITE) { - for (i = 0; i < len; i++) { - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA + i, - data->block[i + 1]); - } - } - protocol |= ACPI_EC_SMB_PRTCL_I2C_BLOCK_DATA; - break; - - case I2C_SMBUS_PROC_CALL: - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA, data->word); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA + 1, data->word >> 8); - protocol = ACPI_EC_SMB_PRTCL_PROC_CALL | pec; - read_write = I2C_SMBUS_READ; - break; - - case I2C_SMBUS_BLOCK_PROC_CALL: - protocol |= pec; - len = min_t(u8, data->block[0], 31); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_CMD, command); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_BCNT, len); - for (i = 0; i < len; i++) - acpi_ec_smb_write(smbus, ACPI_EC_SMB_DATA + i, - data->block[i + 1]); - protocol = ACPI_EC_SMB_PRTCL_BLOCK_PROC_CALL | pec; - read_write = I2C_SMBUS_READ; - break; - - default: - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "EC SMBus adapter: " - "Unsupported transaction %d\n", size)); - return (-1); - } - - acpi_ec_smb_write(smbus, ACPI_EC_SMB_ADDR, addr << 1); - acpi_ec_smb_write(smbus, ACPI_EC_SMB_PRTCL, protocol); - - acpi_ec_smb_read(smbus, ACPI_EC_SMB_STS, temp + 0); - - if (~temp[0] & ACPI_EC_SMB_STS_DONE) { - xudelay(500); - acpi_ec_smb_read(smbus, ACPI_EC_SMB_STS, temp + 0); - } - if (~temp[0] & ACPI_EC_SMB_STS_DONE) { - xmsleep(ACPI_EC_SMB_ACCESS_SLEEP2); - acpi_ec_smb_read(smbus, ACPI_EC_SMB_STS, temp + 0); - } - if ((~temp[0] & ACPI_EC_SMB_STS_DONE) - || (temp[0] & ACPI_EC_SMB_STS_STATUS)) { - return (-1); - } - - if (read_write == I2C_SMBUS_WRITE) { - return (0); - } - - switch (size) { - - case I2C_SMBUS_BYTE: - case I2C_SMBUS_BYTE_DATA: - acpi_ec_smb_read(smbus, ACPI_EC_SMB_DATA, &data->byte); - break; - - case I2C_SMBUS_WORD_DATA: - case I2C_SMBUS_PROC_CALL: - acpi_ec_smb_read(smbus, ACPI_EC_SMB_DATA, temp + 0); - acpi_ec_smb_read(smbus, ACPI_EC_SMB_DATA + 1, temp + 1); - data->word = (temp[1] << 8) | temp[0]; - break; - - case I2C_SMBUS_BLOCK_DATA: - case I2C_SMBUS_BLOCK_PROC_CALL: - len = 0; - acpi_ec_smb_read(smbus, ACPI_EC_SMB_BCNT, &len); - len = min_t(u8, len, 32); - case I2C_SMBUS_I2C_BLOCK_DATA: - for (i = 0; i < len; i++) - acpi_ec_smb_read(smbus, ACPI_EC_SMB_DATA + i, - data->block + i + 1); - data->block[0] = len; - break; - } - - return (0); -} - -static u32 acpi_ec_smb_func(struct i2c_adapter *adapter) -{ - - return (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | - I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | - I2C_FUNC_SMBUS_BLOCK_DATA | - I2C_FUNC_SMBUS_PROC_CALL | - I2C_FUNC_SMBUS_BLOCK_PROC_CALL | - I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC); -} - -static struct i2c_algorithm acpi_ec_smbus_algorithm = { - .smbus_xfer = acpi_ec_smb_access, - .functionality = acpi_ec_smb_func, -}; - -static int acpi_ec_hc_add(struct acpi_device *device) -{ - int status; - unsigned long val; - struct acpi_ec_hc *ec_hc; - struct acpi_ec_smbus *smbus; - - if (!device) { - return -EINVAL; - } - - ec_hc = kmalloc(sizeof(struct acpi_ec_hc), GFP_KERNEL); - if (!ec_hc) { - return -ENOMEM; - } - memset(ec_hc, 0, sizeof(struct acpi_ec_hc)); - - smbus = kmalloc(sizeof(struct acpi_ec_smbus), GFP_KERNEL); - if (!smbus) { - kfree(ec_hc); - return -ENOMEM; - } - memset(smbus, 0, sizeof(struct acpi_ec_smbus)); - - ec_hc->handle = device->handle; - strcpy(acpi_device_name(device), ACPI_EC_HC_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_EC_HC_CLASS); - acpi_driver_data(device) = ec_hc; - - status = acpi_evaluate_integer(ec_hc->handle, "_EC", NULL, &val); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n")); - kfree(ec_hc); - kfree(smbus); - return -EIO; - } - - smbus->ec = acpi_driver_data(device->parent); - smbus->base = (val & 0xff00ull) >> 8; - smbus->alert = val & 0xffull; - - smbus->adapter.owner = THIS_MODULE; - smbus->adapter.algo = &acpi_ec_smbus_algorithm; - smbus->adapter.algo_data = smbus; - - if (i2c_add_adapter(&smbus->adapter)) { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "EC SMBus adapter: Failed to register adapter\n")); - kfree(smbus); - kfree(ec_hc); - return -EIO; - } - - ec_hc->smbus = smbus; - - printk(KERN_INFO PREFIX "%s [%s]\n", - acpi_device_name(device), acpi_device_bid(device)); - - return AE_OK; -} - -static int acpi_ec_hc_remove(struct acpi_device *device, int type) -{ - struct acpi_ec_hc *ec_hc; - - if (!device) { - return -EINVAL; - } - ec_hc = acpi_driver_data(device); - - i2c_del_adapter(&ec_hc->smbus->adapter); - kfree(ec_hc->smbus); - kfree(ec_hc); - - return AE_OK; -} - -static int __init acpi_ec_hc_init(void) -{ - int result; - - result = acpi_bus_register_driver(&acpi_ec_hc_driver); - if (result < 0) { - return -ENODEV; - } - return 0; -} - -static void __exit acpi_ec_hc_exit(void) -{ - acpi_bus_unregister_driver(&acpi_ec_hc_driver); -} - -struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) -{ - return ((struct acpi_ec_hc *)acpi_driver_data(device->parent)); -} - -EXPORT_SYMBOL(acpi_get_ec_hc); - -module_init(acpi_ec_hc_init); -module_exit(acpi_ec_hc_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Ducrot Bruno"); -MODULE_DESCRIPTION("ACPI EC SMBus driver"); diff --git a/drivers/acpi/i2c_ec.h b/drivers/acpi/i2c_ec.h deleted file mode 100644 index 7c53fb732..000000000 --- a/drivers/acpi/i2c_ec.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SMBus driver for ACPI Embedded Controller ($Revision: 1.2 $) - * - * Copyright (c) 2002, 2005 Ducrot Bruno - * - * 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 version 2. - */ - -struct acpi_ec_smbus { - struct i2c_adapter adapter; - union acpi_ec *ec; - int base; - int alert; -}; - -struct acpi_ec_hc { - acpi_handle handle; - struct acpi_ec_smbus *smbus; -}; - -struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device); diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 15fc12482..262b1f413 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c @@ -567,69 +567,6 @@ static int bluetooth_write(char *buf) return 0; } -static int wan_supported; - -static int wan_init(void) -{ - wan_supported = hkey_handle && - acpi_evalf(hkey_handle, NULL, "GWAN", "qv"); - - return 0; -} - -static int wan_status(void) -{ - int status; - - if (!wan_supported || - !acpi_evalf(hkey_handle, &status, "GWAN", "d")) - status = 0; - - return status; -} - -static int wan_read(char *p) -{ - int len = 0; - int status = wan_status(); - - if (!wan_supported) - len += sprintf(p + len, "status:\t\tnot supported\n"); - else if (!(status & 1)) - len += sprintf(p + len, "status:\t\tnot installed\n"); - else { - len += sprintf(p + len, "status:\t\t%s\n", enabled(status, 1)); - len += sprintf(p + len, "commands:\tenable, disable\n"); - } - - return len; -} - -static int wan_write(char *buf) -{ - int status = wan_status(); - char *cmd; - int do_cmd = 0; - - if (!wan_supported) - return -ENODEV; - - while ((cmd = next_cmd(&buf))) { - if (strlencmp(cmd, "enable") == 0) { - status |= 2; - } else if (strlencmp(cmd, "disable") == 0) { - status &= ~2; - } else - return -EINVAL; - do_cmd = 1; - } - - if (do_cmd && !acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status)) - return -EIO; - - return 0; -} - static int video_supported; static int video_orig_autosw; @@ -1625,13 +1562,6 @@ static struct ibm_struct ibms[] = { .read = bluetooth_read, .write = bluetooth_write, }, - { - .name = "wan", - .init = wan_init, - .read = wan_read, - .write = wan_write, - .experimental = 1, - }, { .name = "video", .init = video_init, diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c index ec6b7f9ed..468244147 100644 --- a/drivers/acpi/motherboard.c +++ b/drivers/acpi/motherboard.c @@ -37,7 +37,7 @@ ACPI_MODULE_NAME("acpi_motherboard") #define ACPI_MB_HID2 "PNP0C02" /** * Doesn't care about legacy IO ports, only IO ports beyond 0x1000 are reserved - * Doesn't care about the failure of 'request_region', since other may reserve + * Doesn't care about the failure of 'request_region', since other may reserve * the io ports as well */ #define IS_RESERVED_ADDR(base, len) \ @@ -46,18 +46,19 @@ ACPI_MODULE_NAME("acpi_motherboard") /* * Clearing the flag (IORESOURCE_BUSY) allows drivers to use * the io ports if they really know they can use it, while - * still preventing hotplug PCI devices from using it. + * still preventing hotplug PCI devices from using it. */ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data) { struct resource *requested_res = NULL; + ACPI_FUNCTION_TRACE("acpi_reserve_io_ranges"); if (res->type == ACPI_RESOURCE_TYPE_IO) { struct acpi_resource_io *io_res = &res->data.io; if (io_res->minimum != io_res->maximum) - return AE_OK; + return_VALUE(AE_OK); if (IS_RESERVED_ADDR (io_res->minimum, io_res->address_length)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -91,7 +92,7 @@ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data) if (requested_res) requested_res->flags &= ~IORESOURCE_BUSY; - return AE_OK; + return_VALUE(AE_OK); } static int acpi_motherboard_add(struct acpi_device *device) @@ -122,54 +123,49 @@ static struct acpi_driver acpi_motherboard_driver2 = { }, }; -static void __init acpi_request_region (struct acpi_generic_address *addr, - unsigned int length, char *desc) -{ - if (!addr->address || !length) - return; - - if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) - request_region(addr->address, length, desc); - else if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) - request_mem_region(addr->address, length, desc); -} - static void __init acpi_reserve_resources(void) { - acpi_request_region(&acpi_gbl_FADT->xpm1a_evt_blk, - acpi_gbl_FADT->pm1_evt_len, "ACPI PM1a_EVT_BLK"); + if (acpi_gbl_FADT->xpm1a_evt_blk.address && acpi_gbl_FADT->pm1_evt_len) + request_region(acpi_gbl_FADT->xpm1a_evt_blk.address, + acpi_gbl_FADT->pm1_evt_len, "PM1a_EVT_BLK"); - acpi_request_region(&acpi_gbl_FADT->xpm1b_evt_blk, - acpi_gbl_FADT->pm1_evt_len, "ACPI PM1b_EVT_BLK"); + if (acpi_gbl_FADT->xpm1b_evt_blk.address && acpi_gbl_FADT->pm1_evt_len) + request_region(acpi_gbl_FADT->xpm1b_evt_blk.address, + acpi_gbl_FADT->pm1_evt_len, "PM1b_EVT_BLK"); - acpi_request_region(&acpi_gbl_FADT->xpm1a_cnt_blk, - acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1a_CNT_BLK"); + if (acpi_gbl_FADT->xpm1a_cnt_blk.address && acpi_gbl_FADT->pm1_cnt_len) + request_region(acpi_gbl_FADT->xpm1a_cnt_blk.address, + acpi_gbl_FADT->pm1_cnt_len, "PM1a_CNT_BLK"); - acpi_request_region(&acpi_gbl_FADT->xpm1b_cnt_blk, - acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1b_CNT_BLK"); + if (acpi_gbl_FADT->xpm1b_cnt_blk.address && acpi_gbl_FADT->pm1_cnt_len) + request_region(acpi_gbl_FADT->xpm1b_cnt_blk.address, + acpi_gbl_FADT->pm1_cnt_len, "PM1b_CNT_BLK"); - if (acpi_gbl_FADT->pm_tm_len == 4) - acpi_request_region(&acpi_gbl_FADT->xpm_tmr_blk, 4, "ACPI PM_TMR"); + if (acpi_gbl_FADT->xpm_tmr_blk.address && acpi_gbl_FADT->pm_tm_len == 4) + request_region(acpi_gbl_FADT->xpm_tmr_blk.address, 4, "PM_TMR"); - acpi_request_region(&acpi_gbl_FADT->xpm2_cnt_blk, - acpi_gbl_FADT->pm2_cnt_len, "ACPI PM2_CNT_BLK"); + if (acpi_gbl_FADT->xpm2_cnt_blk.address && acpi_gbl_FADT->pm2_cnt_len) + request_region(acpi_gbl_FADT->xpm2_cnt_blk.address, + acpi_gbl_FADT->pm2_cnt_len, "PM2_CNT_BLK"); /* Length of GPE blocks must be a non-negative multiple of 2 */ - if (!(acpi_gbl_FADT->gpe0_blk_len & 0x1)) - acpi_request_region(&acpi_gbl_FADT->xgpe0_blk, - acpi_gbl_FADT->gpe0_blk_len, "ACPI GPE0_BLK"); + if (acpi_gbl_FADT->xgpe0_blk.address && acpi_gbl_FADT->gpe0_blk_len && + !(acpi_gbl_FADT->gpe0_blk_len & 0x1)) + request_region(acpi_gbl_FADT->xgpe0_blk.address, + acpi_gbl_FADT->gpe0_blk_len, "GPE0_BLK"); - if (!(acpi_gbl_FADT->gpe1_blk_len & 0x1)) - acpi_request_region(&acpi_gbl_FADT->xgpe1_blk, - acpi_gbl_FADT->gpe1_blk_len, "ACPI GPE1_BLK"); + if (acpi_gbl_FADT->xgpe1_blk.address && acpi_gbl_FADT->gpe1_blk_len && + !(acpi_gbl_FADT->gpe1_blk_len & 0x1)) + request_region(acpi_gbl_FADT->xgpe1_blk.address, + acpi_gbl_FADT->gpe1_blk_len, "GPE1_BLK"); } static int __init acpi_motherboard_init(void) { acpi_bus_register_driver(&acpi_motherboard_driver1); acpi_bus_register_driver(&acpi_motherboard_driver2); - /* + /* * Guarantee motherboard IO reservation first * This module must run after scan.c */ diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index c1c6c236d..1149bc18f 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c @@ -70,7 +70,7 @@ acpi_status acpi_ns_root_initialize(void) union acpi_operand_object *obj_desc; acpi_string val = NULL; - ACPI_FUNCTION_TRACE(ns_root_initialize); + ACPI_FUNCTION_TRACE("ns_root_initialize"); status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { @@ -98,7 +98,6 @@ acpi_status acpi_ns_root_initialize(void) "Entering predefined entries into namespace\n")); for (init_val = acpi_gbl_pre_defined_names; init_val->name; init_val++) { - /* _OSI is optional for now, will be permanent later */ if (!ACPI_STRCMP(init_val->name, "_OSI") @@ -157,7 +156,7 @@ acpi_status acpi_ns_root_initialize(void) #if defined (ACPI_ASL_COMPILER) - /* Save the parameter count for the i_aSL compiler */ + /* save the parameter count for the i_aSL compiler */ new_node->value = obj_desc->method.param_count; #else @@ -196,30 +195,33 @@ acpi_status acpi_ns_root_initialize(void) (u8) (ACPI_TO_INTEGER(val) - 1); if (ACPI_STRCMP(init_val->name, "_GL_") == 0) { - - /* Create a counting semaphore for the global lock */ - + /* + * Create a counting semaphore for the + * global lock + */ status = acpi_os_create_semaphore (ACPI_NO_UNIT_LIMIT, 1, - &acpi_gbl_global_lock_semaphore); + &obj_desc->mutex.semaphore); if (ACPI_FAILURE(status)) { acpi_ut_remove_reference (obj_desc); goto unlock_and_exit; } - /* Mark this mutex as very special */ - - obj_desc->mutex.os_mutex = - ACPI_GLOBAL_LOCK; + /* + * We just created the mutex for the + * global lock, save it + */ + acpi_gbl_global_lock_semaphore = + obj_desc->mutex.semaphore; } else { /* Create a mutex */ - status = - acpi_os_create_mutex(&obj_desc-> - mutex. - os_mutex); + status = acpi_os_create_semaphore(1, 1, + &obj_desc-> + mutex. + semaphore); if (ACPI_FAILURE(status)) { acpi_ut_remove_reference (obj_desc); @@ -256,8 +258,10 @@ acpi_status acpi_ns_root_initialize(void) /* Save a handle to "_GPE", it is always present */ if (ACPI_SUCCESS(status)) { - status = acpi_ns_get_node(NULL, "\\_GPE", ACPI_NS_NO_UPSEARCH, - &acpi_gbl_fadt_gpe_device); + status = + acpi_ns_get_node_by_path("\\_GPE", NULL, + ACPI_NS_NO_UPSEARCH, + &acpi_gbl_fadt_gpe_device); } return_ACPI_STATUS(status); @@ -306,17 +310,17 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, acpi_object_type type_to_check_for; acpi_object_type this_search_type; u32 search_parent_flag = ACPI_NS_SEARCH_PARENT; - u32 local_flags; + u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | + ACPI_NS_SEARCH_PARENT); - ACPI_FUNCTION_TRACE(ns_lookup); + ACPI_FUNCTION_TRACE("ns_lookup"); if (!return_node) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | ACPI_NS_SEARCH_PARENT); - *return_node = ACPI_ENTRY_NOT_FOUND; acpi_gbl_ns_lookup_count++; + *return_node = ACPI_ENTRY_NOT_FOUND; if (!acpi_gbl_root_node) { return_ACPI_STATUS(AE_NO_NAMESPACE); @@ -342,17 +346,14 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, return_ACPI_STATUS(AE_AML_INTERNAL); } - if (!(flags & ACPI_NS_PREFIX_IS_SCOPE)) { - /* - * This node might not be a actual "scope" node (such as a - * Device/Method, etc.) It could be a Package or other object node. - * Backup up the tree to find the containing scope node. - */ - while (!acpi_ns_opens_scope(prefix_node->type) && - prefix_node->type != ACPI_TYPE_ANY) { - prefix_node = - acpi_ns_get_parent_node(prefix_node); - } + /* + * This node might not be a actual "scope" node (such as a + * Device/Method, etc.) It could be a Package or other object node. + * Backup up the tree to find the containing scope node. + */ + while (!acpi_ns_opens_scope(prefix_node->type) && + prefix_node->type != ACPI_TYPE_ANY) { + prefix_node = acpi_ns_get_parent_node(prefix_node); } } @@ -364,7 +365,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, * Begin examination of the actual pathname */ if (!pathname) { - /* A Null name_path is allowed and refers to the root */ num_segments = 0; @@ -389,7 +389,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, * to the current scope). */ if (*path == (u8) AML_ROOT_PREFIX) { - /* Pathname is fully qualified, start from the root */ this_node = acpi_gbl_root_node; @@ -417,7 +416,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, this_node = prefix_node; num_carats = 0; while (*path == (u8) AML_PARENT_PREFIX) { - /* Name is fully qualified, no search rules apply */ search_parent_flag = ACPI_NS_NO_UPSEARCH; @@ -432,7 +430,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, num_carats++; this_node = acpi_ns_get_parent_node(this_node); if (!this_node) { - /* Current scope has no parent scope */ ACPI_ERROR((AE_INFO, @@ -572,7 +569,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, &this_node); if (ACPI_FAILURE(status)) { if (status == AE_NOT_FOUND) { - /* Name not found in ACPI namespace */ ACPI_DEBUG_PRINT((ACPI_DB_NAMES, @@ -606,11 +602,10 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, (type_to_check_for != ACPI_TYPE_LOCAL_SCOPE) && (this_node->type != ACPI_TYPE_ANY) && (this_node->type != type_to_check_for)) { - /* Complain about a type mismatch */ ACPI_WARNING((AE_INFO, - "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)", + "ns_lookup: Type mismatch on %4.4s (%s), searching for (%s)", ACPI_CAST_PTR(char, &simple_name), acpi_ut_get_type_name(this_node->type), acpi_ut_get_type_name diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index 55b407aae..9b871f38b 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c @@ -47,6 +47,9 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsalloc") +/* Local prototypes */ +static void acpi_ns_remove_reference(struct acpi_namespace_node *node); + /******************************************************************************* * * FUNCTION: acpi_ns_create_node @@ -58,13 +61,14 @@ ACPI_MODULE_NAME("nsalloc") * DESCRIPTION: Create a namespace node * ******************************************************************************/ + struct acpi_namespace_node *acpi_ns_create_node(u32 name) { struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(ns_create_node); + ACPI_FUNCTION_TRACE("ns_create_node"); - node = acpi_os_acquire_object(acpi_gbl_namespace_cache); + node = ACPI_MEM_CALLOCATE(sizeof(struct acpi_namespace_node)); if (!node) { return_PTR(NULL); } @@ -72,7 +76,9 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); node->name.integer = name; + node->reference_count = 1; ACPI_SET_DESCRIPTOR_TYPE(node, ACPI_DESC_TYPE_NAMED); + return_PTR(node); } @@ -94,7 +100,7 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) struct acpi_namespace_node *prev_node; struct acpi_namespace_node *next_node; - ACPI_FUNCTION_TRACE_PTR(ns_delete_node, node); + ACPI_FUNCTION_TRACE_PTR("ns_delete_node", node); parent_node = acpi_ns_get_parent_node(node); @@ -109,7 +115,6 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) } if (prev_node) { - /* Node is not first child, unlink it */ prev_node->peer = next_node->peer; @@ -120,7 +125,6 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) /* Node is first child (has no previous peer) */ if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { - /* No peers at all */ parent_node->child = NULL; @@ -133,10 +137,10 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node) ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); /* - * Detach an object if there is one, then delete the node + * Detach an object if there is one then delete the node */ acpi_ns_detach_object(node); - (void)acpi_os_release_object(acpi_gbl_namespace_cache, node); + ACPI_MEM_FREE(node); return_VOID; } @@ -167,7 +171,7 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp acpi_owner_id owner_id = 0; struct acpi_namespace_node *child_node; - ACPI_FUNCTION_TRACE(ns_install_node); + ACPI_FUNCTION_TRACE("ns_install_node"); /* * Get the owner ID from the Walk state @@ -212,6 +216,14 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp acpi_ut_get_type_name(parent_node->type), parent_node)); + /* + * Increment the reference count(s) of all parents up to + * the root! + */ + while ((node = acpi_ns_get_parent_node(node)) != NULL) { + node->reference_count++; + } + return_VOID; } @@ -232,9 +244,10 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) { struct acpi_namespace_node *child_node; struct acpi_namespace_node *next_node; + struct acpi_namespace_node *node; u8 flags; - ACPI_FUNCTION_TRACE_PTR(ns_delete_children, parent_node); + ACPI_FUNCTION_TRACE_PTR("ns_delete_children", parent_node); if (!parent_node) { return_VOID; @@ -251,7 +264,6 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) * Deallocate all children at this level */ do { - /* Get the things we need */ next_node = child_node->peer; @@ -277,10 +289,26 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) */ acpi_ns_detach_object(child_node); + /* + * Decrement the reference count(s) of all parents up to + * the root! (counts were incremented when the node was created) + */ + node = child_node; + while ((node = acpi_ns_get_parent_node(node)) != NULL) { + node->reference_count--; + } + + /* There should be only one reference remaining on this node */ + + if (child_node->reference_count != 1) { + ACPI_WARNING((AE_INFO, + "Existing references (%d) on node being deleted (%p)", + child_node->reference_count, child_node)); + } + /* Now we can delete the node */ - (void)acpi_os_release_object(acpi_gbl_namespace_cache, - child_node); + ACPI_MEM_FREE(child_node); /* And move on to the next child in the list */ @@ -313,7 +341,7 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) struct acpi_namespace_node *child_node = NULL; u32 level = 1; - ACPI_FUNCTION_TRACE(ns_delete_namespace_subtree); + ACPI_FUNCTION_TRACE("ns_delete_namespace_subtree"); if (!parent_node) { return_VOID; @@ -324,14 +352,11 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) * to where we started. */ while (level > 0) { - /* Get the next node in this scope (NULL if none) */ - child_node = - acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, - child_node); + child_node = acpi_ns_get_next_node(ACPI_TYPE_ANY, parent_node, + child_node); if (child_node) { - /* Found a child node - detach any attached object */ acpi_ns_detach_object(child_node); @@ -374,6 +399,55 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) return_VOID; } +/******************************************************************************* + * + * FUNCTION: acpi_ns_remove_reference + * + * PARAMETERS: Node - Named node whose reference count is to be + * decremented + * + * RETURN: None. + * + * DESCRIPTION: Remove a Node reference. Decrements the reference count + * of all parent Nodes up to the root. Any node along + * the way that reaches zero references is freed. + * + ******************************************************************************/ + +static void acpi_ns_remove_reference(struct acpi_namespace_node *node) +{ + struct acpi_namespace_node *parent_node; + struct acpi_namespace_node *this_node; + + ACPI_FUNCTION_ENTRY(); + + /* + * Decrement the reference count(s) of this node and all + * nodes up to the root, Delete anything with zero remaining references. + */ + this_node = node; + while (this_node) { + /* Prepare to move up to parent */ + + parent_node = acpi_ns_get_parent_node(this_node); + + /* Decrement the reference count on this node */ + + this_node->reference_count--; + + /* Delete the node if no more references */ + + if (!this_node->reference_count) { + /* Delete all children and delete the node */ + + acpi_ns_delete_children(this_node); + acpi_ns_delete_node(this_node); + } + + this_node = parent_node; + } +} + /******************************************************************************* * * FUNCTION: acpi_ns_delete_namespace_by_owner @@ -386,34 +460,24 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) * specific ID. Used to delete entire ACPI tables. All * reference counts are updated. * - * MUTEX: Locks namespace during deletion walk. - * ******************************************************************************/ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) { struct acpi_namespace_node *child_node; struct acpi_namespace_node *deletion_node; - struct acpi_namespace_node *parent_node; u32 level; - acpi_status status; + struct acpi_namespace_node *parent_node; - ACPI_FUNCTION_TRACE_U32(ns_delete_namespace_by_owner, owner_id); + ACPI_FUNCTION_TRACE_U32("ns_delete_namespace_by_owner", owner_id); if (owner_id == 0) { return_VOID; } - /* Lock namespace for possible update */ - - status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE(status)) { - return_VOID; - } - - deletion_node = NULL; parent_node = acpi_gbl_root_node; child_node = NULL; + deletion_node = NULL; level = 1; /* @@ -430,14 +494,12 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) child_node); if (deletion_node) { - acpi_ns_delete_children(deletion_node); - acpi_ns_delete_node(deletion_node); + acpi_ns_remove_reference(deletion_node); deletion_node = NULL; } if (child_node) { if (child_node->owner_id == owner_id) { - /* Found a matching child node - detach any attached object */ acpi_ns_detach_object(child_node); @@ -479,6 +541,5 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) } } - (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); return_VOID; } diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c index d72df66aa..a2807317a 100644 --- a/drivers/acpi/namespace/nsdump.c +++ b/drivers/acpi/namespace/nsdump.c @@ -75,7 +75,7 @@ void acpi_ns_print_pathname(u32 num_segments, char *pathname) { acpi_native_uint i; - ACPI_FUNCTION_NAME(ns_print_pathname); + ACPI_FUNCTION_NAME("ns_print_pathname"); if (!(acpi_dbg_level & ACPI_LV_NAMES) || !(acpi_dbg_layer & ACPI_NAMESPACE)) { @@ -123,7 +123,7 @@ void acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 component) { - ACPI_FUNCTION_TRACE(ns_dump_pathname); + ACPI_FUNCTION_TRACE("ns_dump_pathname"); /* Do this only if the requested debug level and component are enabled */ @@ -167,7 +167,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, u32 dbg_level; u32 i; - ACPI_FUNCTION_NAME(ns_dump_one_object); + ACPI_FUNCTION_NAME("ns_dump_one_object"); /* Is output enabled? */ @@ -191,7 +191,6 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, } if (!(info->display_type & ACPI_DISPLAY_SHORT)) { - /* Indent the object according to the level */ acpi_os_printf("%2d%*s", (u32) level - 1, (int)level * 2, " "); @@ -204,9 +203,6 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, } if (!acpi_ut_valid_acpi_name(this_node->name.integer)) { - this_node->name.integer = - acpi_ut_repair_name(this_node->name.integer); - ACPI_WARNING((AE_INFO, "Invalid ACPI Name %08X", this_node->name.integer)); } @@ -230,7 +226,6 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, case ACPI_DISPLAY_SUMMARY: if (!obj_desc) { - /* No attached object, we are done */ acpi_os_printf("\n"); @@ -424,7 +419,6 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, acpi_os_printf("O:%p", obj_desc); if (!obj_desc) { - /* No attached object, we are done */ acpi_os_printf("\n"); @@ -675,7 +669,7 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth) { acpi_handle search_handle = search_base; - ACPI_FUNCTION_TRACE(ns_dump_tables); + ACPI_FUNCTION_TRACE("ns_dump_tables"); if (!acpi_gbl_root_node) { /* @@ -688,7 +682,6 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth) } if (ACPI_NS_ALL == search_base) { - /* Entire namespace */ search_handle = acpi_gbl_root_node; diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c index c6bf5d30f..aff899a93 100644 --- a/drivers/acpi/namespace/nsdumpdv.c +++ b/drivers/acpi/namespace/nsdumpdv.c @@ -74,7 +74,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, acpi_status status; u32 i; - ACPI_FUNCTION_NAME(ns_dump_one_device); + ACPI_FUNCTION_NAME("ns_dump_one_device"); status = acpi_ns_dump_one_object(obj_handle, level, context, return_value); @@ -92,7 +92,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, info->hardware_id.value, ACPI_FORMAT_UINT64(info->address), info->current_status)); - ACPI_FREE(info); + ACPI_MEM_FREE(info); } return (status); @@ -115,7 +115,7 @@ void acpi_ns_dump_root_devices(void) acpi_handle sys_bus_handle; acpi_status status; - ACPI_FUNCTION_NAME(ns_dump_root_devices); + ACPI_FUNCTION_NAME("ns_dump_root_devices"); /* Only dump the table if tracing is enabled */ diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c index 4b0a4a8c9..19d7b94d4 100644 --- a/drivers/acpi/namespace/nseval.c +++ b/drivers/acpi/namespace/nseval.c @@ -1,6 +1,7 @@ /******************************************************************************* * - * Module Name: nseval - Object evaluation, includes control method execution + * Module Name: nseval - Object evaluation interfaces -- includes control + * method lookup and execution. * ******************************************************************************/ @@ -49,14 +50,196 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nseval") +/* Local prototypes */ +static acpi_status +acpi_ns_execute_control_method(struct acpi_parameter_info *info); + +static acpi_status acpi_ns_get_object_value(struct acpi_parameter_info *info); + +/******************************************************************************* + * + * FUNCTION: acpi_ns_evaluate_relative + * + * PARAMETERS: Pathname - Name of method to execute, If NULL, the + * handle is the object to execute + * Info - Method info block, contains: + * return_object - Where to put method's return value (if + * any). If NULL, no value is returned. + * Params - List of parameters to pass to the method, + * terminated by NULL. Params itself may be + * NULL if no parameters are being passed. + * + * RETURN: Status + * + * DESCRIPTION: Evaluate the object or find and execute the requested method + * + * MUTEX: Locks Namespace + * + ******************************************************************************/ + +acpi_status +acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info) +{ + acpi_status status; + struct acpi_namespace_node *node = NULL; + union acpi_generic_state *scope_info; + char *internal_path = NULL; + + ACPI_FUNCTION_TRACE("ns_evaluate_relative"); + + /* + * Must have a valid object handle + */ + if (!info || !info->node) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } + + /* Build an internal name string for the method */ + + status = acpi_ns_internalize_name(pathname, &internal_path); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + scope_info = acpi_ut_create_generic_state(); + if (!scope_info) { + goto cleanup1; + } + + /* Get the prefix handle and Node */ + + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { + goto cleanup; + } + + info->node = acpi_ns_map_handle_to_node(info->node); + if (!info->node) { + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + status = AE_BAD_PARAMETER; + goto cleanup; + } + + /* Lookup the name in the namespace */ + + scope_info->scope.node = info->node; + status = acpi_ns_lookup(scope_info, internal_path, ACPI_TYPE_ANY, + ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, NULL, + &node); + + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Object [%s] not found [%s]\n", + pathname, acpi_format_exception(status))); + goto cleanup; + } + + /* + * Now that we have a handle to the object, we can attempt to evaluate it. + */ + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "%s [%p] Value %p\n", + pathname, node, acpi_ns_get_attached_object(node))); + + info->node = node; + status = acpi_ns_evaluate_by_handle(info); + + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, + "*** Completed eval of object %s ***\n", pathname)); + + cleanup: + acpi_ut_delete_generic_state(scope_info); + + cleanup1: + ACPI_MEM_FREE(internal_path); + return_ACPI_STATUS(status); +} + /******************************************************************************* * - * FUNCTION: acpi_ns_evaluate + * FUNCTION: acpi_ns_evaluate_by_name * - * PARAMETERS: Info - Evaluation info block, contains: - * prefix_node - Prefix or Method/Object Node to execute - * Pathname - Name of method to execute, If NULL, the - * Node is the object to execute + * PARAMETERS: Pathname - Fully qualified pathname to the object + * Info - Method info block, contains: + * return_object - Where to put method's return value (if + * any). If NULL, no value is returned. + * Params - List of parameters to pass to the method, + * terminated by NULL. Params itself may be + * NULL if no parameters are being passed. + * + * RETURN: Status + * + * DESCRIPTION: Evaluate the object or rind and execute the requested method + * passing the given parameters + * + * MUTEX: Locks Namespace + * + ******************************************************************************/ + +acpi_status +acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info) +{ + acpi_status status; + char *internal_path = NULL; + + ACPI_FUNCTION_TRACE("ns_evaluate_by_name"); + + /* Build an internal name string for the method */ + + status = acpi_ns_internalize_name(pathname, &internal_path); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { + goto cleanup; + } + + /* Lookup the name in the namespace */ + + status = acpi_ns_lookup(NULL, internal_path, ACPI_TYPE_ANY, + ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, NULL, + &info->node); + + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, + "Object at [%s] was not found, status=%.4X\n", + pathname, status)); + goto cleanup; + } + + /* + * Now that we have a handle to the object, we can attempt to evaluate it. + */ + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "%s [%p] Value %p\n", + pathname, info->node, + acpi_ns_get_attached_object(info->node))); + + status = acpi_ns_evaluate_by_handle(info); + + ACPI_DEBUG_PRINT((ACPI_DB_NAMES, + "*** Completed eval of object %s ***\n", pathname)); + + cleanup: + + /* Cleanup */ + + if (internal_path) { + ACPI_MEM_FREE(internal_path); + } + + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ns_evaluate_by_handle + * + * PARAMETERS: Info - Method info block, contains: + * Node - Method/Object Node to execute * Parameters - List of parameters to pass to the method, * terminated by NULL. Params itself may be * NULL if no parameters are being passed. @@ -65,21 +248,29 @@ ACPI_MODULE_NAME("nseval") * parameter_type - Type of Parameter list * return_object - Where to put method's return value (if * any). If NULL, no value is returned. - * Flags - ACPI_IGNORE_RETURN_VALUE to delete return * * RETURN: Status * - * DESCRIPTION: Execute a control method or return the current value of an - * ACPI namespace object. + * DESCRIPTION: Evaluate object or execute the requested method passing the + * given parameters * - * MUTEX: Locks interpreter + * MUTEX: Locks Namespace * ******************************************************************************/ -acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) + +acpi_status acpi_ns_evaluate_by_handle(struct acpi_parameter_info *info) { acpi_status status; - ACPI_FUNCTION_TRACE(ns_evaluate); + ACPI_FUNCTION_TRACE("ns_evaluate_by_handle"); + + /* Check if namespace has been initialized */ + + if (!acpi_gbl_root_node) { + return_ACPI_STATUS(AE_NO_NAMESPACE); + } + + /* Parameter Validation */ if (!info) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -89,120 +280,202 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) info->return_object = NULL; - /* - * Get the actual namespace node for the target object. Handles these cases: - * - * 1) Null node, Pathname (absolute path) - * 2) Node, Pathname (path relative to Node) - * 3) Node, Null Pathname - */ - status = acpi_ns_get_node(info->prefix_node, info->pathname, - ACPI_NS_NO_UPSEARCH, &info->resolved_node); + /* Get the prefix handle and Node */ + + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } + info->node = acpi_ns_map_handle_to_node(info->node); + if (!info->node) { + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + return_ACPI_STATUS(AE_BAD_PARAMETER); + } + /* * For a method alias, we must grab the actual method node so that proper * scoping context will be established before execution. */ - if (acpi_ns_get_type(info->resolved_node) == - ACPI_TYPE_LOCAL_METHOD_ALIAS) { - info->resolved_node = + if (acpi_ns_get_type(info->node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) { + info->node = ACPI_CAST_PTR(struct acpi_namespace_node, - info->resolved_node->object); + info->node->object); } - ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "%s [%p] Value %p\n", info->pathname, - info->resolved_node, - acpi_ns_get_attached_object(info->resolved_node))); - /* * Two major cases here: - * - * 1) The object is a control method -- execute it + * 1) The object is an actual control method -- execute it. * 2) The object is not a method -- just return it's current value + * + * In both cases, the namespace is unlocked by the acpi_ns* procedure */ - if (acpi_ns_get_type(info->resolved_node) == ACPI_TYPE_METHOD) { + if (acpi_ns_get_type(info->node) == ACPI_TYPE_METHOD) { + /* + * Case 1) We have an actual control method to execute + */ + status = acpi_ns_execute_control_method(info); + } else { /* - * 1) Object is a control method - execute it + * Case 2) Object is NOT a method, just return its current value */ + status = acpi_ns_get_object_value(info); + } + + /* + * Check if there is a return value on the stack that must be dealt with + */ + if (status == AE_CTRL_RETURN_VALUE) { + /* Map AE_CTRL_RETURN_VALUE to AE_OK, we are done with it */ - /* Verify that there is a method object associated with this node */ + status = AE_OK; + } - info->obj_desc = - acpi_ns_get_attached_object(info->resolved_node); - if (!info->obj_desc) { - ACPI_ERROR((AE_INFO, - "Control method has no attached sub-object")); - return_ACPI_STATUS(AE_NULL_OBJECT); - } + /* + * Namespace was unlocked by the handling acpi_ns* function, so we + * just return + */ + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ns_execute_control_method + * + * PARAMETERS: Info - Method info block, contains: + * Node - Method Node to execute + * obj_desc - Method object + * Parameters - List of parameters to pass to the method, + * terminated by NULL. Params itself may be + * NULL if no parameters are being passed. + * return_object - Where to put method's return value (if + * any). If NULL, no value is returned. + * parameter_type - Type of Parameter list + * return_object - Where to put method's return value (if + * any). If NULL, no value is returned. + * + * RETURN: Status + * + * DESCRIPTION: Execute the requested method passing the given parameters + * + * MUTEX: Assumes namespace is locked + * + ******************************************************************************/ - ACPI_DUMP_PATHNAME(info->resolved_node, "Execute Method:", - ACPI_LV_INFO, _COMPONENT); +static acpi_status +acpi_ns_execute_control_method(struct acpi_parameter_info *info) +{ + acpi_status status; - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Method at AML address %p Length %X\n", - info->obj_desc->method.aml_start + 1, - info->obj_desc->method.aml_length - 1)); + ACPI_FUNCTION_TRACE("ns_execute_control_method"); - /* - * Any namespace deletion must acquire both the namespace and - * interpreter locks to ensure that no thread is using the portion of - * the namespace that is being deleted. - * - * Execute the method via the interpreter. The interpreter is locked - * here before calling into the AML parser - */ - status = acpi_ex_enter_interpreter(); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } + /* Verify that there is a method associated with this object */ - status = acpi_ps_execute_method(info); - acpi_ex_exit_interpreter(); - } else { - /* - * 2) Object is not a method, return its current value - */ + info->obj_desc = acpi_ns_get_attached_object(info->node); + if (!info->obj_desc) { + ACPI_ERROR((AE_INFO, "No attached method object")); - /* - * Objects require additional resolution steps (e.g., the Node may be - * a field that must be read, etc.) -- we can't just grab the object - * out of the node. - * - * Use resolve_node_to_value() to get the associated value. - * - * NOTE: we can get away with passing in NULL for a walk state because - * resolved_node is guaranteed to not be a reference to either a method - * local or a method argument (because this interface is never called - * from a running method.) - * - * Even though we do not directly invoke the interpreter for object - * resolution, we must lock it because we could access an opregion. - * The opregion access code assumes that the interpreter is locked. - */ - status = acpi_ex_enter_interpreter(); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + return_ACPI_STATUS(AE_NULL_OBJECT); + } - /* Function has a strange interface */ + ACPI_DUMP_PATHNAME(info->node, "Execute Method:", + ACPI_LV_INFO, _COMPONENT); - status = - acpi_ex_resolve_node_to_value(&info->resolved_node, NULL); - acpi_ex_exit_interpreter(); + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Method at AML address %p Length %X\n", + info->obj_desc->method.aml_start + 1, + info->obj_desc->method.aml_length - 1)); + /* + * Unlock the namespace before execution. This allows namespace access + * via the external Acpi* interfaces while a method is being executed. + * However, any namespace deletion must acquire both the namespace and + * interpreter locks to ensure that no thread is using the portion of the + * namespace that is being deleted. + */ + status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* + * Execute the method via the interpreter. The interpreter is locked + * here before calling into the AML parser + */ + status = acpi_ex_enter_interpreter(); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + status = acpi_ps_execute_method(info); + acpi_ex_exit_interpreter(); + + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ns_get_object_value + * + * PARAMETERS: Info - Method info block, contains: + * Node - Object's NS node + * return_object - Where to put object value (if + * any). If NULL, no value is returned. + * + * RETURN: Status + * + * DESCRIPTION: Return the current value of the object + * + * MUTEX: Assumes namespace is locked, leaves namespace unlocked + * + ******************************************************************************/ + +static acpi_status acpi_ns_get_object_value(struct acpi_parameter_info *info) +{ + acpi_status status = AE_OK; + struct acpi_namespace_node *resolved_node = info->node; + + ACPI_FUNCTION_TRACE("ns_get_object_value"); + + /* + * Objects require additional resolution steps (e.g., the Node may be a + * field that must be read, etc.) -- we can't just grab the object out of + * the node. + */ + + /* + * Use resolve_node_to_value() to get the associated value. This call always + * deletes obj_desc (allocated above). + * + * NOTE: we can get away with passing in NULL for a walk state because + * obj_desc is guaranteed to not be a reference to either a method local or + * a method argument (because this interface can only be called from the + * acpi_evaluate external interface, never called from a running method.) + * + * Even though we do not directly invoke the interpreter for this, we must + * enter it because we could access an opregion. The opregion access code + * assumes that the interpreter is locked. + * + * We must release the namespace lock before entering the intepreter. + */ + status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + status = acpi_ex_enter_interpreter(); + if (ACPI_SUCCESS(status)) { + status = acpi_ex_resolve_node_to_value(&resolved_node, NULL); /* * If acpi_ex_resolve_node_to_value() succeeded, the return value was placed * in resolved_node. */ + acpi_ex_exit_interpreter(); + if (ACPI_SUCCESS(status)) { status = AE_CTRL_RETURN_VALUE; - info->return_object = - ACPI_CAST_PTR(union acpi_operand_object, - info->resolved_node); - + info->return_object = ACPI_CAST_PTR + (union acpi_operand_object, resolved_node); ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Returning object %p [%s]\n", info->return_object, @@ -211,30 +484,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) } } - /* - * Check if there is a return value that must be dealt with - */ - if (status == AE_CTRL_RETURN_VALUE) { - - /* If caller does not want the return value, delete it */ + /* Namespace is unlocked */ - if (info->flags & ACPI_IGNORE_RETURN_VALUE) { - acpi_ut_remove_reference(info->return_object); - info->return_object = NULL; - } - - /* Map AE_CTRL_RETURN_VALUE to AE_OK, we are done with it */ - - status = AE_OK; - } - - ACPI_DEBUG_PRINT((ACPI_DB_NAMES, - "*** Completed evaluation of object %s ***\n", - info->pathname)); - - /* - * Namespace was unlocked by the handling acpi_ns* function, so we - * just return - */ return_ACPI_STATUS(status); } diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c index aec8488c0..9f929e479 100644 --- a/drivers/acpi/namespace/nsinit.c +++ b/drivers/acpi/namespace/nsinit.c @@ -58,10 +58,6 @@ static acpi_status acpi_ns_init_one_device(acpi_handle obj_handle, u32 nesting_level, void *context, void **return_value); -static acpi_status -acpi_ns_find_ini_methods(acpi_handle obj_handle, - u32 nesting_level, void *context, void **return_value); - /******************************************************************************* * * FUNCTION: acpi_ns_initialize_objects @@ -80,7 +76,7 @@ acpi_status acpi_ns_initialize_objects(void) acpi_status status; struct acpi_init_walk_info info; - ACPI_FUNCTION_TRACE(ns_initialize_objects); + ACPI_FUNCTION_TRACE("ns_initialize_objects"); ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); @@ -97,7 +93,7 @@ acpi_status acpi_ns_initialize_objects(void) ACPI_UINT32_MAX, acpi_ns_init_one_object, &info, NULL); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace")); + ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, @@ -137,7 +133,7 @@ acpi_status acpi_ns_initialize_devices(void) acpi_status status; struct acpi_device_walk_info info; - ACPI_FUNCTION_TRACE(ns_initialize_devices); + ACPI_FUNCTION_TRACE("ns_initialize_devices"); /* Init counters */ @@ -146,46 +142,30 @@ acpi_status acpi_ns_initialize_devices(void) info.num_INI = 0; ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "Initializing Device/Processor/Thermal objects by executing _INI methods:")); - - /* Tree analysis: find all subtrees that contain _INI methods */ + "Executing all Device _STA and_INI methods:")); - status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, - acpi_ns_find_ini_methods, &info, NULL); + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto error_exit; + return_ACPI_STATUS(status); } - /* Allocate the evaluation information block */ - - info.evaluate_info = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info.evaluate_info) { - status = AE_NO_MEMORY; - goto error_exit; - } - - /* Walk namespace to execute all _INIs on present devices */ + /* Walk namespace for all objects */ status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, FALSE, + ACPI_UINT32_MAX, TRUE, acpi_ns_init_one_device, &info, NULL); - ACPI_FREE(info.evaluate_info); + (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE(status)) { - goto error_exit; + ACPI_EXCEPTION((AE_INFO, status, "During walk_namespace")); } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "\nExecuted %hd _INI methods requiring %hd _STA executions (examined %hd objects)\n", - info.num_INI, info.num_STA, info.device_count)); + "\n%hd Devices found - executed %hd _STA, %hd _INI methods\n", + info.device_count, info.num_STA, info.num_INI)); return_ACPI_STATUS(status); - - error_exit: - ACPI_EXCEPTION((AE_INFO, status, "During device initialization")); - return_ACPI_STATUS(status); } /******************************************************************************* @@ -220,7 +200,7 @@ acpi_ns_init_one_object(acpi_handle obj_handle, (struct acpi_namespace_node *)obj_handle; union acpi_operand_object *obj_desc; - ACPI_FUNCTION_NAME(ns_init_one_object); + ACPI_FUNCTION_NAME("ns_init_one_object"); info->object_count++; @@ -329,72 +309,6 @@ acpi_ns_init_one_object(acpi_handle obj_handle, return (AE_OK); } -/******************************************************************************* - * - * FUNCTION: acpi_ns_find_ini_methods - * - * PARAMETERS: acpi_walk_callback - * - * RETURN: acpi_status - * - * DESCRIPTION: Called during namespace walk. Finds objects named _INI under - * device/processor/thermal objects, and marks the entire subtree - * with a SUBTREE_HAS_INI flag. This flag is used during the - * subsequent device initialization walk to avoid entire subtrees - * that do not contain an _INI. - * - ******************************************************************************/ - -static acpi_status -acpi_ns_find_ini_methods(acpi_handle obj_handle, - u32 nesting_level, void *context, void **return_value) -{ - struct acpi_device_walk_info *info = - ACPI_CAST_PTR(struct acpi_device_walk_info, context); - struct acpi_namespace_node *node; - struct acpi_namespace_node *parent_node; - - /* Keep count of device/processor/thermal objects */ - - node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); - if ((node->type == ACPI_TYPE_DEVICE) || - (node->type == ACPI_TYPE_PROCESSOR) || - (node->type == ACPI_TYPE_THERMAL)) { - info->device_count++; - return (AE_OK); - } - - /* We are only looking for methods named _INI */ - - if (!ACPI_COMPARE_NAME(node->name.ascii, METHOD_NAME__INI)) { - return (AE_OK); - } - - /* - * The only _INI methods that we care about are those that are - * present under Device, Processor, and Thermal objects. - */ - parent_node = acpi_ns_get_parent_node(node); - switch (parent_node->type) { - case ACPI_TYPE_DEVICE: - case ACPI_TYPE_PROCESSOR: - case ACPI_TYPE_THERMAL: - - /* Mark parent and bubble up the INI present flag to the root */ - - while (parent_node) { - parent_node->flags |= ANOBJ_SUBTREE_HAS_INI; - parent_node = acpi_ns_get_parent_node(parent_node); - } - break; - - default: - break; - } - - return (AE_OK); -} - /******************************************************************************* * * FUNCTION: acpi_ns_init_one_device @@ -413,165 +327,119 @@ static acpi_status acpi_ns_init_one_device(acpi_handle obj_handle, u32 nesting_level, void *context, void **return_value) { - struct acpi_device_walk_info *walk_info = - ACPI_CAST_PTR(struct acpi_device_walk_info, context); - struct acpi_evaluate_info *info = walk_info->evaluate_info; + struct acpi_device_walk_info *info = + (struct acpi_device_walk_info *)context; + struct acpi_parameter_info pinfo; u32 flags; acpi_status status; + struct acpi_namespace_node *ini_node; struct acpi_namespace_node *device_node; - ACPI_FUNCTION_TRACE(ns_init_one_device); + ACPI_FUNCTION_TRACE("ns_init_one_device"); - /* We are interested in Devices, Processors and thermal_zones only */ + device_node = acpi_ns_map_handle_to_node(obj_handle); + if (!device_node) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } - device_node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle); + /* + * We will run _STA/_INI on Devices, Processors and thermal_zones only + */ if ((device_node->type != ACPI_TYPE_DEVICE) && (device_node->type != ACPI_TYPE_PROCESSOR) && (device_node->type != ACPI_TYPE_THERMAL)) { return_ACPI_STATUS(AE_OK); } + if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && + (!(acpi_dbg_level & ACPI_LV_INFO))) { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ".")); + } + + info->device_count++; + /* - * Because of an earlier namespace analysis, all subtrees that contain an - * _INI method are tagged. - * - * If this device subtree does not contain any _INI methods, we - * can exit now and stop traversing this entire subtree. + * Check if the _INI method exists for this device - + * if _INI does not exist, there is no need to run _STA + * No _INI means device requires no initialization */ - if (!(device_node->flags & ANOBJ_SUBTREE_HAS_INI)) { - return_ACPI_STATUS(AE_CTRL_DEPTH); + status = acpi_ns_search_node(*ACPI_CAST_PTR(u32, METHOD_NAME__INI), + device_node, ACPI_TYPE_METHOD, &ini_node); + if (ACPI_FAILURE(status)) { + /* No _INI method found - move on to next device */ + + return_ACPI_STATUS(AE_OK); } /* - * Run _STA to determine if this device is present and functioning. We - * must know this information for two important reasons (from ACPI spec): - * - * 1) We can only run _INI if the device is present. - * 2) We must abort the device tree walk on this subtree if the device is - * not present and is not functional (we will not examine the children) - * - * The _STA method is not required to be present under the device, we - * assume the device is present if _STA does not exist. + * Run _STA to determine if we can run _INI on the device - + * the device must be present before _INI can be run. + * However, _STA is not required - assume device present if no _STA */ - ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname - (ACPI_TYPE_METHOD, device_node, METHOD_NAME__STA)); + ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, + device_node, + METHOD_NAME__STA)); - status = acpi_ut_execute_STA(device_node, &flags); - if (ACPI_FAILURE(status)) { + pinfo.node = device_node; + pinfo.parameters = NULL; + pinfo.parameter_type = ACPI_PARAM_ARGS; + status = acpi_ut_execute_STA(pinfo.node, &flags); + if (ACPI_FAILURE(status)) { /* Ignore error and move on to next device */ return_ACPI_STATUS(AE_OK); } - /* - * Flags == -1 means that _STA was not found. In this case, we assume that - * the device is both present and functional. - * - * From the ACPI spec, description of _STA: - * - * "If a device object (including the processor object) does not have an - * _STA object, then OSPM assumes that all of the above bits are set (in - * other words, the device is present, ..., and functioning)" - */ if (flags != ACPI_UINT32_MAX) { - walk_info->num_STA++; + info->num_STA++; } - /* - * Examine the PRESENT and FUNCTIONING status bits - * - * Note: ACPI spec does not seem to specify behavior for the present but - * not functioning case, so we assume functioning if present. - */ if (!(flags & ACPI_STA_DEVICE_PRESENT)) { + /* Don't look at children of a not present device */ - /* Device is not present, we must examine the Functioning bit */ - - if (flags & ACPI_STA_DEVICE_FUNCTIONING) { - /* - * Device is not present but is "functioning". In this case, - * we will not run _INI, but we continue to examine the children - * of this device. - * - * From the ACPI spec, description of _STA: (Note - no mention - * of whether to run _INI or not on the device in question) - * - * "_STA may return bit 0 clear (not present) with bit 3 set - * (device is functional). This case is used to indicate a valid - * device for which no device driver should be loaded (for example, - * a bridge device.) Children of this device may be present and - * valid. OSPM should continue enumeration below a device whose - * _STA returns this bit combination" - */ - return_ACPI_STATUS(AE_OK); - } else { - /* - * Device is not present and is not functioning. We must abort the - * walk of this subtree immediately -- don't look at the children - * of such a device. - * - * From the ACPI spec, description of _INI: - * - * "If the _STA method indicates that the device is not present, - * OSPM will not run the _INI and will not examine the children - * of the device for _INI methods" - */ - return_ACPI_STATUS(AE_CTRL_DEPTH); - } + return_ACPI_STATUS(AE_CTRL_DEPTH); } /* - * The device is present or is assumed present if no _STA exists. - * Run the _INI if it exists (not required to exist) - * - * Note: We know there is an _INI within this subtree, but it may not be - * under this particular device, it may be lower in the branch. + * The device is present and _INI exists. Run the _INI method. + * (We already have the _INI node from above) */ - ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname - (ACPI_TYPE_METHOD, device_node, METHOD_NAME__INI)); - - info->prefix_node = device_node; - info->pathname = METHOD_NAME__INI; - info->parameters = NULL; - info->parameter_type = ACPI_PARAM_ARGS; - info->flags = ACPI_IGNORE_RETURN_VALUE; - - status = acpi_ns_evaluate(info); - if (ACPI_SUCCESS(status)) { - walk_info->num_INI++; - - if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && - (!(acpi_dbg_level & ACPI_LV_INFO))) { - ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, ".")); - } - } -#ifdef ACPI_DEBUG_OUTPUT - else if (status != AE_NOT_FOUND) { + ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_METHOD, + pinfo.node, + METHOD_NAME__INI)); + pinfo.node = ini_node; + status = acpi_ns_evaluate_by_handle(&pinfo); + if (ACPI_FAILURE(status)) { /* Ignore error and move on to next device */ - char *scope_name = - acpi_ns_get_external_pathname(info->resolved_node); +#ifdef ACPI_DEBUG_OUTPUT + char *scope_name = acpi_ns_get_external_pathname(ini_node); + + ACPI_WARNING((AE_INFO, "%s._INI failed: %s", + scope_name, acpi_format_exception(status))); - ACPI_EXCEPTION((AE_INFO, status, "during %s._INI execution", - scope_name)); - ACPI_FREE(scope_name); - } + ACPI_MEM_FREE(scope_name); #endif + } else { + /* Delete any return object (especially if implicit_return is enabled) */ - /* Ignore errors from above */ + if (pinfo.return_object) { + acpi_ut_remove_reference(pinfo.return_object); + } - status = AE_OK; + /* Count of successful INIs */ + + info->num_INI++; + } - /* - * The _INI method has been run if present; call the Global Initialization - * Handler for this device. - */ if (acpi_gbl_init_handler) { + /* External initialization handler is present, call it */ + status = - acpi_gbl_init_handler(device_node, ACPI_INIT_DEVICE_INI); + acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); } - return_ACPI_STATUS(status); + return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c index fe75d888e..4e0b0524c 100644 --- a/drivers/acpi/namespace/nsload.c +++ b/drivers/acpi/namespace/nsload.c @@ -77,14 +77,13 @@ acpi_ns_load_table(struct acpi_table_desc *table_desc, { acpi_status status; - ACPI_FUNCTION_TRACE(ns_load_table); + ACPI_FUNCTION_TRACE("ns_load_table"); /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ if (! (acpi_gbl_table_data[table_desc->type]. flags & ACPI_TABLE_EXECUTABLE)) { - /* Just ignore this table */ return_ACPI_STATUS(AE_OK); @@ -169,7 +168,7 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) acpi_status status; struct acpi_table_desc *table_desc; - ACPI_FUNCTION_TRACE(ns_load_table_by_type); + ACPI_FUNCTION_TRACE("ns_load_table_by_type"); status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); if (ACPI_FAILURE(status)) { @@ -181,11 +180,11 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) * DSDT (one), SSDT/PSDT (multiple) */ switch (table_type) { - case ACPI_TABLE_ID_DSDT: + case ACPI_TABLE_DSDT: ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); - table_desc = acpi_gbl_table_lists[ACPI_TABLE_ID_DSDT].next; + table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next; /* If table already loaded into namespace, just return */ @@ -201,8 +200,8 @@ static acpi_status acpi_ns_load_table_by_type(acpi_table_type table_type) } break; - case ACPI_TABLE_ID_SSDT: - case ACPI_TABLE_ID_PSDT: + case ACPI_TABLE_SSDT: + case ACPI_TABLE_PSDT: ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: %d SSDT or PSDTs\n", @@ -259,7 +258,7 @@ acpi_status acpi_ns_load_namespace(void) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_load_name_space); + ACPI_FUNCTION_TRACE("acpi_load_name_space"); /* There must be at least a DSDT installed */ @@ -272,15 +271,15 @@ acpi_status acpi_ns_load_namespace(void) * Load the namespace. The DSDT is required, * but the SSDT and PSDT tables are optional. */ - status = acpi_ns_load_table_by_type(ACPI_TABLE_ID_DSDT); + status = acpi_ns_load_table_by_type(ACPI_TABLE_DSDT); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Ignore exceptions from these */ - (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_SSDT); - (void)acpi_ns_load_table_by_type(ACPI_TABLE_ID_PSDT); + (void)acpi_ns_load_table_by_type(ACPI_TABLE_SSDT); + (void)acpi_ns_load_table_by_type(ACPI_TABLE_PSDT); ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "ACPI Namespace successfully loaded at root %p\n", @@ -315,7 +314,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) acpi_handle dummy; u32 level; - ACPI_FUNCTION_TRACE(ns_delete_subtree); + ACPI_FUNCTION_TRACE("ns_delete_subtree"); parent_handle = start_handle; child_handle = NULL; @@ -326,7 +325,6 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) * to where we started. */ while (level > 0) { - /* Attempt to get the next object in this scope */ status = acpi_get_next_object(ACPI_TYPE_ANY, parent_handle, @@ -337,7 +335,6 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle) /* Did we get a new object? */ if (ACPI_SUCCESS(status)) { - /* Check if this object has any children */ if (ACPI_SUCCESS @@ -395,7 +392,7 @@ acpi_status acpi_ns_unload_namespace(acpi_handle handle) { acpi_status status; - ACPI_FUNCTION_TRACE(ns_unload_name_space); + ACPI_FUNCTION_TRACE("ns_unload_name_space"); /* Parameter validation */ diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c index 97b8332c9..639f653b4 100644 --- a/drivers/acpi/namespace/nsnames.c +++ b/drivers/acpi/namespace/nsnames.c @@ -48,6 +48,11 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsnames") +/* Local prototypes */ +static void +acpi_ns_build_external_path(struct acpi_namespace_node *node, + acpi_size size, char *name_buffer); + /******************************************************************************* * * FUNCTION: acpi_ns_build_external_path @@ -62,7 +67,8 @@ ACPI_MODULE_NAME("nsnames") * DESCRIPTION: Generate a full pathaname * ******************************************************************************/ -void + +static void acpi_ns_build_external_path(struct acpi_namespace_node *node, acpi_size size, char *name_buffer) { @@ -132,7 +138,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) char *name_buffer; acpi_size size; - ACPI_FUNCTION_TRACE_PTR(ns_get_external_pathname, node); + ACPI_FUNCTION_TRACE_PTR("ns_get_external_pathname", node); /* Calculate required buffer size based on depth below root */ @@ -140,7 +146,7 @@ char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node) /* Allocate a buffer to be returned to caller */ - name_buffer = ACPI_ALLOCATE_ZEROED(size); + name_buffer = ACPI_MEM_CALLOCATE(size); if (!name_buffer) { ACPI_ERROR((AE_INFO, "Allocation failure")); return_PTR(NULL); @@ -213,7 +219,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle, struct acpi_namespace_node *node; acpi_size required_size; - ACPI_FUNCTION_TRACE_PTR(ns_handle_to_pathname, target_handle); + ACPI_FUNCTION_TRACE_PTR("ns_handle_to_pathname", target_handle); node = acpi_ns_map_handle_to_node(target_handle); if (!node) { diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c index aabe8794b..10ae6292b 100644 --- a/drivers/acpi/namespace/nsobject.c +++ b/drivers/acpi/namespace/nsobject.c @@ -76,21 +76,19 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, union acpi_operand_object *last_obj_desc; acpi_object_type object_type = ACPI_TYPE_ANY; - ACPI_FUNCTION_TRACE(ns_attach_object); + ACPI_FUNCTION_TRACE("ns_attach_object"); /* * Parameter validation */ if (!node) { - /* Invalid handle */ - ACPI_ERROR((AE_INFO, "Null NamedObj handle")); + ACPI_ERROR((AE_INFO, "Null named_obj handle")); return_ACPI_STATUS(AE_BAD_PARAMETER); } if (!object && (ACPI_TYPE_ANY != type)) { - /* Null object */ ACPI_ERROR((AE_INFO, @@ -99,7 +97,6 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, } if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { - /* Not a name handle */ ACPI_ERROR((AE_INFO, "Invalid handle %p [%s]", @@ -111,7 +108,7 @@ acpi_ns_attach_object(struct acpi_namespace_node *node, if (node->object == object) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Obj %p already installed in NameObj %p\n", + "Obj %p already installed in name_obj %p\n", object, node)); return_ACPI_STATUS(AE_OK); @@ -204,7 +201,7 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) { union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE(ns_detach_object); + ACPI_FUNCTION_TRACE("ns_detach_object"); obj_desc = node->object; @@ -255,7 +252,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct acpi_namespace_node *node) { - ACPI_FUNCTION_TRACE_PTR(ns_get_attached_object, node); + ACPI_FUNCTION_TRACE_PTR("ns_get_attached_object", node); if (!node) { ACPI_WARNING((AE_INFO, "Null Node ptr")); @@ -290,7 +287,7 @@ union acpi_operand_object *acpi_ns_get_secondary_object(union acpi_operand_object *obj_desc) { - ACPI_FUNCTION_TRACE_PTR(ns_get_secondary_object, obj_desc); + ACPI_FUNCTION_TRACE_PTR("ns_get_secondary_object", obj_desc); if ((!obj_desc) || (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) || diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c index 155505a4e..232be4303 100644 --- a/drivers/acpi/namespace/nsparse.c +++ b/drivers/acpi/namespace/nsparse.c @@ -62,13 +62,13 @@ ACPI_MODULE_NAME("nsparse") * ******************************************************************************/ acpi_status -acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc *table_desc) +acpi_ns_one_complete_parse(u8 pass_number, struct acpi_table_desc * table_desc) { union acpi_parse_object *parse_root; acpi_status status; struct acpi_walk_state *walk_state; - ACPI_FUNCTION_TRACE(ns_one_complete_parse); + ACPI_FUNCTION_TRACE("ns_one_complete_parse"); /* Create and init a Root Node */ @@ -124,7 +124,7 @@ acpi_ns_parse_table(struct acpi_table_desc *table_desc, { acpi_status status; - ACPI_FUNCTION_TRACE(ns_parse_table); + ACPI_FUNCTION_TRACE("ns_parse_table"); /* * AML Parse, pass 1 diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 500e2bbcf..d64b78952 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c @@ -56,16 +56,16 @@ acpi_ns_search_parent_tree(u32 target_name, /******************************************************************************* * - * FUNCTION: acpi_ns_search_one_scope + * FUNCTION: acpi_ns_search_node * * PARAMETERS: target_name - Ascii ACPI name to search for - * parent_node - Starting node where search will begin + * Node - Starting node where search will begin * Type - Object type to match * return_node - Where the matched Named obj is returned * * RETURN: Status * - * DESCRIPTION: Search a single level of the namespace. Performs a + * DESCRIPTION: Search a single level of the namespace. Performs a * simple search of the specified level, and does not add * entries or search parents. * @@ -75,40 +75,35 @@ acpi_ns_search_parent_tree(u32 target_name, * * All namespace searching is linear in this implementation, but * could be easily modified to support any improved search - * algorithm. However, the linear search was chosen for simplicity + * algorithm. However, the linear search was chosen for simplicity * and because the trees are small and the other interpreter * execution overhead is relatively high. * - * Note: CPU execution analysis has shown that the AML interpreter spends - * a very small percentage of its time searching the namespace. Therefore, - * the linear search seems to be sufficient, as there would seem to be - * little value in improving the search. - * ******************************************************************************/ acpi_status -acpi_ns_search_one_scope(u32 target_name, - struct acpi_namespace_node *parent_node, - acpi_object_type type, - struct acpi_namespace_node **return_node) +acpi_ns_search_node(u32 target_name, + struct acpi_namespace_node *node, + acpi_object_type type, + struct acpi_namespace_node **return_node) { - struct acpi_namespace_node *node; + struct acpi_namespace_node *next_node; - ACPI_FUNCTION_TRACE(ns_search_one_scope); + ACPI_FUNCTION_TRACE("ns_search_node"); #ifdef ACPI_DEBUG_OUTPUT if (ACPI_LV_NAMES & acpi_dbg_level) { char *scope_name; - scope_name = acpi_ns_get_external_pathname(parent_node); + scope_name = acpi_ns_get_external_pathname(node); if (scope_name) { ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Searching %s (%p) For [%4.4s] (%s)\n", - scope_name, parent_node, - ACPI_CAST_PTR(char, &target_name), + scope_name, node, ACPI_CAST_PTR(char, + &target_name), acpi_ut_get_type_name(type))); - ACPI_FREE(scope_name); + ACPI_MEM_FREE(scope_name); } } #endif @@ -117,33 +112,32 @@ acpi_ns_search_one_scope(u32 target_name, * Search for name at this namespace level, which is to say that we * must search for the name among the children of this object */ - node = parent_node->child; - while (node) { - + next_node = node->child; + while (next_node) { /* Check for match against the name */ - if (node->name.integer == target_name) { - + if (next_node->name.integer == target_name) { /* Resolve a control method alias if any */ - if (acpi_ns_get_type(node) == + if (acpi_ns_get_type(next_node) == ACPI_TYPE_LOCAL_METHOD_ALIAS) { - node = + next_node = ACPI_CAST_PTR(struct acpi_namespace_node, - node->object); + next_node->object); } - /* Found matching entry */ - + /* + * Found matching entry. + */ ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", ACPI_CAST_PTR(char, &target_name), - acpi_ut_get_type_name(node->type), - node, - acpi_ut_get_node_name(parent_node), - parent_node)); + acpi_ut_get_type_name(next_node-> + type), + next_node, + acpi_ut_get_node_name(node), node)); - *return_node = node; + *return_node = next_node; return_ACPI_STATUS(AE_OK); } @@ -151,8 +145,7 @@ acpi_ns_search_one_scope(u32 target_name, * The last entry in the list points back to the parent, * so a flag is used to indicate the end-of-list */ - if (node->flags & ANOBJ_END_OF_PEER_LIST) { - + if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { /* Searched entire list, we are done */ break; @@ -160,7 +153,7 @@ acpi_ns_search_one_scope(u32 target_name, /* Didn't match name, move on to the next peer object */ - node = node->peer; + next_node = next_node->peer; } /* Searched entire namespace level, not found */ @@ -169,8 +162,7 @@ acpi_ns_search_one_scope(u32 target_name, "Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", ACPI_CAST_PTR(char, &target_name), acpi_ut_get_type_name(type), - acpi_ut_get_node_name(parent_node), parent_node, - parent_node->child)); + acpi_ut_get_node_name(node), node, node->child)); return_ACPI_STATUS(AE_NOT_FOUND); } @@ -187,14 +179,14 @@ acpi_ns_search_one_scope(u32 target_name, * RETURN: Status * * DESCRIPTION: Called when a name has not been found in the current namespace - * level. Before adding it or giving up, ACPI scope rules require + * level. Before adding it or giving up, ACPI scope rules require * searching enclosing scopes in cases identified by acpi_ns_local(). * * "A name is located by finding the matching name in the current * name space, and then in the parent name space. If the parent * name space does not contain the name, the search continues * recursively until either the name is found or the name space - * does not have a parent (the root of the name space). This + * does not have a parent (the root of the name space). This * indicates that the name is not found" (From ACPI Specification, * section 5.3) * @@ -209,7 +201,7 @@ acpi_ns_search_parent_tree(u32 target_name, acpi_status status; struct acpi_namespace_node *parent_node; - ACPI_FUNCTION_TRACE(ns_search_parent_tree); + ACPI_FUNCTION_TRACE("ns_search_parent_tree"); parent_node = acpi_ns_get_parent_node(node); @@ -243,19 +235,20 @@ acpi_ns_search_parent_tree(u32 target_name, */ while (parent_node) { /* - * Search parent scope. Use TYPE_ANY because we don't care about the + * Search parent scope. Use TYPE_ANY because we don't care about the * object type at this point, we only care about the existence of - * the actual name we are searching for. Typechecking comes later. + * the actual name we are searching for. Typechecking comes later. */ - status = - acpi_ns_search_one_scope(target_name, parent_node, + status = acpi_ns_search_node(target_name, parent_node, ACPI_TYPE_ANY, return_node); if (ACPI_SUCCESS(status)) { return_ACPI_STATUS(status); } - /* Not found here, go up another level (until we reach the root) */ - + /* + * Not found here, go up another level + * (until we reach the root) + */ parent_node = acpi_ns_get_parent_node(parent_node); } @@ -280,7 +273,7 @@ acpi_ns_search_parent_tree(u32 target_name, * RETURN: Status * * DESCRIPTION: Search for a name segment in a single namespace level, - * optionally adding it if it is not found. If the passed + * optionally adding it if it is not found. If the passed * Type is not Any and the type previously stored in the * entry was Any (i.e. unknown), update the stored type. * @@ -300,46 +293,29 @@ acpi_ns_search_and_enter(u32 target_name, acpi_status status; struct acpi_namespace_node *new_node; - ACPI_FUNCTION_TRACE(ns_search_and_enter); + ACPI_FUNCTION_TRACE("ns_search_and_enter"); /* Parameter validation */ if (!node || !target_name || !return_node) { ACPI_ERROR((AE_INFO, - "Null parameter: Node %p Name %X ReturnNode %p", + "Null param: Node %p Name %X return_node %p", node, target_name, return_node)); return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* - * Name must consist of valid ACPI characters. We will repair the name if - * necessary because we don't want to abort because of this, but we want - * all namespace names to be printable. A warning message is appropriate. - * - * This issue came up because there are in fact machines that exhibit - * this problem, and we want to be able to enable ACPI support for them, - * even though there are a few bad names. - */ + /* Name must consist of printable characters */ + if (!acpi_ut_valid_acpi_name(target_name)) { - target_name = acpi_ut_repair_name(target_name); - - /* Report warning only if in strict mode or debug mode */ - - if (!acpi_gbl_enable_interpreter_slack) { - ACPI_WARNING((AE_INFO, - "Found bad character(s) in name, repaired: [%4.4s]\n", - ACPI_CAST_PTR(char, &target_name))); - } else { - ACPI_DEBUG_PRINT((ACPI_DB_WARN, - "Found bad character(s) in name, repaired: [%4.4s]\n", - ACPI_CAST_PTR(char, &target_name))); - } + ACPI_ERROR((AE_INFO, "Bad character in ACPI Name: %X", + target_name)); + return_ACPI_STATUS(AE_BAD_CHARACTER); } /* Try to find the name in the namespace level specified by the caller */ *return_node = ACPI_ENTRY_NOT_FOUND; - status = acpi_ns_search_one_scope(target_name, node, type, return_node); + status = acpi_ns_search_node(target_name, node, type, return_node); if (status != AE_NOT_FOUND) { /* * If we found it AND the request specifies that a find is an error, @@ -349,16 +325,18 @@ acpi_ns_search_and_enter(u32 target_name, status = AE_ALREADY_EXISTS; } - /* Either found it or there was an error: finished either way */ - + /* + * Either found it or there was an error + * -- finished either way + */ return_ACPI_STATUS(status); } /* - * The name was not found. If we are NOT performing the first pass + * The name was not found. If we are NOT performing the first pass * (name entry) of loading the namespace, search the parent tree (all the * way to the root if necessary.) We don't want to perform the parent - * search when the namespace is actually being loaded. We want to perform + * search when the namespace is actually being loaded. We want to perform * the search when namespace references are being resolved (load pass 2) * and during the execution phase. */ @@ -376,8 +354,9 @@ acpi_ns_search_and_enter(u32 target_name, } } - /* In execute mode, just search, never add names. Exit now */ - + /* + * In execute mode, just search, never add names. Exit now. + */ if (interpreter_mode == ACPI_IMODE_EXECUTE) { ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "%4.4s Not found in %p [Not adding]\n", @@ -392,18 +371,11 @@ acpi_ns_search_and_enter(u32 target_name, if (!new_node) { return_ACPI_STATUS(AE_NO_MEMORY); } -#ifdef ACPI_ASL_COMPILER - /* - * Node is an object defined by an External() statement - */ - if (flags & ACPI_NS_EXTERNAL) { - new_node->flags |= ANOBJ_IS_EXTERNAL; - } -#endif /* Install the new object into the parent's list of children */ acpi_ns_install_node(walk_state, node, new_node, type); *return_node = new_node; + return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index aa4e799d9..3e7cad549 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c @@ -78,17 +78,15 @@ acpi_ns_report_error(char *module_name, char *internal_name, acpi_status lookup_status) { acpi_status status; - u32 bad_name; char *name = NULL; - acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); + acpi_ut_report_error(module_name, line_number); if (lookup_status == AE_BAD_CHARACTER) { - /* There is a non-ascii character in the name */ - ACPI_MOVE_32_TO_32(&bad_name, internal_name); - acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name); + acpi_os_printf("[0x%4.4X] (NON-ASCII)", + *(ACPI_CAST_PTR(u32, internal_name))); } else { /* Convert path to external format */ @@ -104,7 +102,7 @@ acpi_ns_report_error(char *module_name, } if (name) { - ACPI_FREE(name); + ACPI_MEM_FREE(name); } } @@ -139,12 +137,11 @@ acpi_ns_report_method_error(char *module_name, acpi_status status; struct acpi_namespace_node *node = prefix_node; - acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); + acpi_ut_report_error(module_name, line_number); if (path) { - status = - acpi_ns_get_node(prefix_node, path, ACPI_NS_NO_UPSEARCH, - &node); + status = acpi_ns_get_node_by_path(path, prefix_node, + ACPI_NS_NO_UPSEARCH, &node); if (ACPI_FAILURE(status)) { acpi_os_printf("[Could not get node by pathname]"); } @@ -188,7 +185,7 @@ acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message) } acpi_os_printf("[%s] (Node %p)", (char *)buffer.pointer, node); - ACPI_FREE(buffer.pointer); + ACPI_MEM_FREE(buffer.pointer); } } @@ -242,7 +239,7 @@ static u8 acpi_ns_valid_path_separator(char sep) acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) { - ACPI_FUNCTION_TRACE(ns_get_type); + ACPI_FUNCTION_TRACE("ns_get_type"); if (!node) { ACPI_WARNING((AE_INFO, "Null Node parameter")); @@ -267,10 +264,9 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node * node) u32 acpi_ns_local(acpi_object_type type) { - ACPI_FUNCTION_TRACE(ns_local); + ACPI_FUNCTION_TRACE("ns_local"); if (!acpi_ut_valid_object_type(type)) { - /* Type code out of range */ ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); @@ -367,7 +363,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) char *result = NULL; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ns_build_internal_name); + ACPI_FUNCTION_TRACE("ns_build_internal_name"); /* Setup the correct prefixes, counts, and pointers */ @@ -415,7 +411,6 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) for (i = 0; i < ACPI_NAME_SIZE; i++) { if (acpi_ns_valid_path_separator(*external_name) || (*external_name == 0)) { - /* Pad the segment with underscore(s) if segment is short */ result[i] = '_'; @@ -478,7 +473,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) struct acpi_namestring_info info; acpi_status status; - ACPI_FUNCTION_TRACE(ns_internalize_name); + ACPI_FUNCTION_TRACE("ns_internalize_name"); if ((!external_name) || (*external_name == 0) || (!converted_name)) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -491,7 +486,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) /* We need a segment to store the internal name */ - internal_name = ACPI_ALLOCATE_ZEROED(info.length); + internal_name = ACPI_MEM_CALLOCATE(info.length); if (!internal_name) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -501,7 +496,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) info.internal_name = internal_name; status = acpi_ns_build_internal_name(&info); if (ACPI_FAILURE(status)) { - ACPI_FREE(internal_name); + ACPI_MEM_FREE(internal_name); return_ACPI_STATUS(status); } @@ -538,7 +533,7 @@ acpi_ns_externalize_name(u32 internal_name_length, acpi_native_uint i = 0; acpi_native_uint j = 0; - ACPI_FUNCTION_TRACE(ns_externalize_name); + ACPI_FUNCTION_TRACE("ns_externalize_name"); if (!internal_name_length || !internal_name || !converted_name) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -633,7 +628,7 @@ acpi_ns_externalize_name(u32 internal_name_length, /* * Build converted_name */ - *converted_name = ACPI_ALLOCATE_ZEROED(required_length); + *converted_name = ACPI_MEM_CALLOCATE(required_length); if (!(*converted_name)) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -686,9 +681,13 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) ACPI_FUNCTION_ENTRY(); /* - * Simple implementation + * Simple implementation. */ - if ((!handle) || (handle == ACPI_ROOT_OBJECT)) { + if (!handle) { + return (NULL); + } + + if (handle == ACPI_ROOT_OBJECT) { return (acpi_gbl_root_node); } @@ -698,7 +697,7 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) return (NULL); } - return (ACPI_CAST_PTR(struct acpi_namespace_node, handle)); + return ((struct acpi_namespace_node *)handle); } /******************************************************************************* @@ -753,7 +752,7 @@ void acpi_ns_terminate(void) { union acpi_operand_object *obj_desc; - ACPI_FUNCTION_TRACE(ns_terminate); + ACPI_FUNCTION_TRACE("ns_terminate"); /* * 1) Free the entire namespace -- all nodes and objects @@ -793,10 +792,9 @@ void acpi_ns_terminate(void) u32 acpi_ns_opens_scope(acpi_object_type type) { - ACPI_FUNCTION_TRACE_STR(ns_opens_scope, acpi_ut_get_type_name(type)); + ACPI_FUNCTION_TRACE_STR("ns_opens_scope", acpi_ut_get_type_name(type)); if (!acpi_ut_valid_object_type(type)) { - /* type code out of range */ ACPI_WARNING((AE_INFO, "Invalid Object Type %X", type)); @@ -808,12 +806,12 @@ u32 acpi_ns_opens_scope(acpi_object_type type) /******************************************************************************* * - * FUNCTION: acpi_ns_get_node + * FUNCTION: acpi_ns_get_node_by_path * * PARAMETERS: *Pathname - Name to be found, in external (ASL) format. The * \ (backslash) and ^ (carat) prefixes, and the * . (period) to separate segments are supported. - * prefix_node - Root of subtree to be searched, or NS_ALL for the + * start_node - Root of subtree to be searched, or NS_ALL for the * root of the name space. If Name is fully * qualified (first s8 is '\'), the passed value * of Scope will not be accessed. @@ -829,29 +827,23 @@ u32 acpi_ns_opens_scope(acpi_object_type type) ******************************************************************************/ acpi_status -acpi_ns_get_node(struct acpi_namespace_node *prefix_node, - char *pathname, - u32 flags, struct acpi_namespace_node **return_node) +acpi_ns_get_node_by_path(char *pathname, + struct acpi_namespace_node *start_node, + u32 flags, struct acpi_namespace_node **return_node) { union acpi_generic_state scope_info; acpi_status status; - char *internal_path; - - ACPI_FUNCTION_TRACE_PTR(ns_get_node, pathname); + char *internal_path = NULL; - if (!pathname) { - *return_node = prefix_node; - if (!prefix_node) { - *return_node = acpi_gbl_root_node; - } - return_ACPI_STATUS(AE_OK); - } + ACPI_FUNCTION_TRACE_PTR("ns_get_node_by_path", pathname); - /* Convert path to internal representation */ + if (pathname) { + /* Convert path to internal representation */ - status = acpi_ns_internalize_name(pathname, &internal_path); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + status = acpi_ns_internalize_name(pathname, &internal_path); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } } /* Must lock namespace during lookup */ @@ -863,23 +855,26 @@ acpi_ns_get_node(struct acpi_namespace_node *prefix_node, /* Setup lookup scope (search starting point) */ - scope_info.scope.node = prefix_node; + scope_info.scope.node = start_node; /* Lookup the name in the namespace */ - status = acpi_ns_lookup(&scope_info, internal_path, ACPI_TYPE_ANY, - ACPI_IMODE_EXECUTE, - (flags | ACPI_NS_DONT_OPEN_SCOPE), NULL, - return_node); + status = acpi_ns_lookup(&scope_info, internal_path, + ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, + (flags | ACPI_NS_DONT_OPEN_SCOPE), + NULL, return_node); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s, %s\n", - pathname, acpi_format_exception(status))); + internal_path, + acpi_format_exception(status))); } (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); cleanup: - ACPI_FREE(internal_path); + if (internal_path) { + ACPI_MEM_FREE(internal_path); + } return_ACPI_STATUS(status); } @@ -965,10 +960,9 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node * child_node) { struct acpi_namespace_node *parent_node; - ACPI_FUNCTION_TRACE(ns_find_parent_name); + ACPI_FUNCTION_TRACE("ns_find_parent_name"); if (child_node) { - /* Valid entry. Get the parent Node */ parent_node = acpi_ns_get_parent_node(child_node); diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c index c8f6bef16..fcab1e784 100644 --- a/drivers/acpi/namespace/nswalk.c +++ b/drivers/acpi/namespace/nswalk.c @@ -76,7 +76,6 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, ACPI_FUNCTION_ENTRY(); if (!child_node) { - /* It's really the parent's _scope_ that we want */ if (parent_node->child) { @@ -93,7 +92,6 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, /* If any type is OK, we are done */ if (type == ACPI_TYPE_ANY) { - /* next_node is NULL if we are at the end-of-list */ return (next_node); @@ -102,7 +100,6 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, /* Must search for the node -- but within this scope only */ while (next_node) { - /* If type matches, we are done */ if (next_node->type == type) { @@ -164,7 +161,7 @@ acpi_ns_walk_namespace(acpi_object_type type, acpi_object_type child_type; u32 level; - ACPI_FUNCTION_TRACE(ns_walk_namespace); + ACPI_FUNCTION_TRACE("ns_walk_namespace"); /* Special case for the namespace Root Node */ @@ -185,7 +182,6 @@ acpi_ns_walk_namespace(acpi_object_type type, * bubbled up to (and passed) the original parent handle (start_entry) */ while (level > 0) { - /* Get the next node in this scope. Null if not found */ status = AE_OK; diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c index dca6799ac..d7791fbc7 100644 --- a/drivers/acpi/namespace/nsxfeval.c +++ b/drivers/acpi/namespace/nsxfeval.c @@ -42,6 +42,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -49,7 +51,6 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfeval") -#ifdef ACPI_FUTURE_USAGE /******************************************************************************* * * FUNCTION: acpi_evaluate_object_typed @@ -70,17 +71,18 @@ ACPI_MODULE_NAME("nsxfeval") * be valid (non-null) * ******************************************************************************/ +#ifdef ACPI_FUTURE_USAGE acpi_status acpi_evaluate_object_typed(acpi_handle handle, acpi_string pathname, - struct acpi_object_list * external_params, - struct acpi_buffer * return_buffer, + struct acpi_object_list *external_params, + struct acpi_buffer *return_buffer, acpi_object_type return_type) { acpi_status status; u8 must_free = FALSE; - ACPI_FUNCTION_TRACE(acpi_evaluate_object_typed); + ACPI_FUNCTION_TRACE("acpi_evaluate_object_typed"); /* Return buffer must be valid */ @@ -108,7 +110,6 @@ acpi_evaluate_object_typed(acpi_handle handle, } if (return_buffer->length == 0) { - /* Error because caller specifically asked for a return value */ ACPI_ERROR((AE_INFO, "No return value")); @@ -130,18 +131,15 @@ acpi_evaluate_object_typed(acpi_handle handle, acpi_ut_get_type_name(return_type))); if (must_free) { - /* Caller used ACPI_ALLOCATE_BUFFER, free the return buffer */ - ACPI_FREE(return_buffer->pointer); + acpi_os_free(return_buffer->pointer); return_buffer->pointer = NULL; } return_buffer->length = 0; return_ACPI_STATUS(AE_TYPE); } - -ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed) #endif /* ACPI_FUTURE_USAGE */ /******************************************************************************* @@ -163,6 +161,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object_typed) * be valid (non-null) * ******************************************************************************/ + acpi_status acpi_evaluate_object(acpi_handle handle, acpi_string pathname, @@ -171,61 +170,51 @@ acpi_evaluate_object(acpi_handle handle, { acpi_status status; acpi_status status2; - struct acpi_evaluate_info *info; + struct acpi_parameter_info info; acpi_size buffer_space_needed; u32 i; - ACPI_FUNCTION_TRACE(acpi_evaluate_object); + ACPI_FUNCTION_TRACE("acpi_evaluate_object"); - /* Allocate and initialize the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - info->pathname = pathname; - info->parameter_type = ACPI_PARAM_ARGS; - - /* Convert and validate the device handle */ - - info->prefix_node = acpi_ns_map_handle_to_node(handle); - if (!info->prefix_node) { - status = AE_BAD_PARAMETER; - goto cleanup; - } + info.node = handle; + info.parameters = NULL; + info.return_object = NULL; + info.parameter_type = ACPI_PARAM_ARGS; /* - * If there are parameters to be passed to a control method, the external - * objects must all be converted to internal objects + * If there are parameters to be passed to the object + * (which must be a control method), the external objects + * must be converted to internal objects */ if (external_params && external_params->count) { /* * Allocate a new parameter block for the internal objects * Add 1 to count to allow for null terminated internal list */ - info->parameters = ACPI_ALLOCATE_ZEROED(((acpi_size) - external_params-> - count + - 1) * sizeof(void *)); - if (!info->parameters) { - status = AE_NO_MEMORY; - goto cleanup; + info.parameters = ACPI_MEM_CALLOCATE(((acpi_size) + external_params->count + + 1) * sizeof(void *)); + if (!info.parameters) { + return_ACPI_STATUS(AE_NO_MEMORY); } - /* Convert each external object in the list to an internal object */ - + /* + * Convert each external object in the list to an + * internal object + */ for (i = 0; i < external_params->count; i++) { status = acpi_ut_copy_eobject_to_iobject(&external_params-> pointer[i], - &info-> + &info. parameters[i]); if (ACPI_FAILURE(status)) { - goto cleanup; + acpi_ut_delete_internal_object_list(info. + parameters); + return_ACPI_STATUS(status); } } - info->parameters[external_params->count] = NULL; + info.parameters[external_params->count] = NULL; } /* @@ -235,20 +224,19 @@ acpi_evaluate_object(acpi_handle handle, * 3) Valid handle */ if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) { - - /* The path is fully qualified, just evaluate by name */ - - info->prefix_node = NULL; - status = acpi_ns_evaluate(info); + /* + * The path is fully qualified, just evaluate by name + */ + status = acpi_ns_evaluate_by_name(pathname, &info); } else if (!handle) { /* - * A handle is optional iff a fully qualified pathname is specified. - * Since we've already handled fully qualified names above, this is - * an error + * A handle is optional iff a fully qualified pathname + * is specified. Since we've already handled fully + * qualified names above, this is an error */ if (!pathname) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Both Handle and Pathname are NULL")); + ACPI_ERROR((AE_INFO, + "Both Handle and Pathname are NULL")); } else { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Null Handle with relative pathname [%s]", @@ -257,9 +245,23 @@ acpi_evaluate_object(acpi_handle handle, status = AE_BAD_PARAMETER; } else { - /* We have a namespace a node and a possible relative path */ - - status = acpi_ns_evaluate(info); + /* + * We get here if we have a handle -- and if we have a + * pathname it is relative. The handle will be validated + * in the lower procedures + */ + if (!pathname) { + /* + * The null pathname case means the handle is for + * the actual object to be evaluated + */ + status = acpi_ns_evaluate_by_handle(&info); + } else { + /* + * Both a Handle and a relative Pathname + */ + status = acpi_ns_evaluate_relative(pathname, &info); + } } /* @@ -267,10 +269,10 @@ acpi_evaluate_object(acpi_handle handle, * copy the return value to an external object. */ if (return_buffer) { - if (!info->return_object) { + if (!info.return_object) { return_buffer->length = 0; } else { - if (ACPI_GET_DESCRIPTOR_TYPE(info->return_object) == + if (ACPI_GET_DESCRIPTOR_TYPE(info.return_object) == ACPI_DESC_TYPE_NAMED) { /* * If we received a NS Node as a return object, this means that @@ -281,19 +283,19 @@ acpi_evaluate_object(acpi_handle handle, * support for various types at a later date if necessary. */ status = AE_TYPE; - info->return_object = NULL; /* No need to delete a NS Node */ + info.return_object = NULL; /* No need to delete a NS Node */ return_buffer->length = 0; } if (ACPI_SUCCESS(status)) { - - /* Get the size of the returned object */ - + /* + * Find out how large a buffer is needed + * to contain the returned object + */ status = - acpi_ut_get_object_size(info->return_object, + acpi_ut_get_object_size(info.return_object, &buffer_space_needed); if (ACPI_SUCCESS(status)) { - /* Validate/Allocate/Clear caller buffer */ status = @@ -302,8 +304,7 @@ acpi_evaluate_object(acpi_handle handle, buffer_space_needed); if (ACPI_FAILURE(status)) { /* - * Caller's buffer is too small or a new one can't - * be allocated + * Caller's buffer is too small or a new one can't be allocated */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Needed buffer size %X, %s\n", @@ -312,11 +313,12 @@ acpi_evaluate_object(acpi_handle handle, acpi_format_exception (status))); } else { - /* We have enough space for the object, build it */ - + /* + * We have enough space for the object, build it + */ status = acpi_ut_copy_iobject_to_eobject - (info->return_object, + (info.return_object, return_buffer); } } @@ -324,37 +326,35 @@ acpi_evaluate_object(acpi_handle handle, } } - if (info->return_object) { + if (info.return_object) { /* - * Delete the internal return object. NOTE: Interpreter must be - * locked to avoid race condition. + * Delete the internal return object. NOTE: Interpreter + * must be locked to avoid race condition. */ status2 = acpi_ex_enter_interpreter(); if (ACPI_SUCCESS(status2)) { - - /* Remove one reference on the return object (should delete it) */ - - acpi_ut_remove_reference(info->return_object); + /* + * Delete the internal return object. (Or at least + * decrement the reference count by one) + */ + acpi_ut_remove_reference(info.return_object); acpi_ex_exit_interpreter(); } } - cleanup: - - /* Free the input parameter list (if we created one) */ - - if (info->parameters) { - + /* + * Free the input parameter list (if we created one), + */ + if (info.parameters) { /* Free the allocated parameter block */ - acpi_ut_delete_internal_object_list(info->parameters); + acpi_ut_delete_internal_object_list(info.parameters); } - ACPI_FREE(info); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_evaluate_object) +EXPORT_SYMBOL(acpi_evaluate_object); /******************************************************************************* * @@ -385,6 +385,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object) * function, etc. * ******************************************************************************/ + acpi_status acpi_walk_namespace(acpi_object_type type, acpi_handle start_object, @@ -394,7 +395,7 @@ acpi_walk_namespace(acpi_object_type type, { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_walk_namespace); + ACPI_FUNCTION_TRACE("acpi_walk_namespace"); /* Parameter validation */ @@ -421,7 +422,7 @@ acpi_walk_namespace(acpi_object_type type, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_walk_namespace) +EXPORT_SYMBOL(acpi_walk_namespace); /******************************************************************************* * @@ -436,6 +437,7 @@ ACPI_EXPORT_SYMBOL(acpi_walk_namespace) * on that. * ******************************************************************************/ + static acpi_status acpi_ns_get_device_callback(acpi_handle obj_handle, u32 nesting_level, @@ -472,7 +474,6 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, } if (!(flags & ACPI_STA_DEVICE_PRESENT)) { - /* Don't examine children of the device if not present */ return (AE_CTRL_DEPTH); @@ -489,7 +490,6 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, } if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { - /* Get the list of Compatible IDs */ status = acpi_ut_execute_CID(node, &cid); @@ -506,11 +506,11 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, sizeof(struct acpi_compatible_id)) != 0) { - ACPI_FREE(cid); + ACPI_MEM_FREE(cid); return (AE_OK); } } - ACPI_FREE(cid); + ACPI_MEM_FREE(cid); } } @@ -552,7 +552,7 @@ acpi_get_devices(char *HID, acpi_status status; struct acpi_get_devices_info info; - ACPI_FUNCTION_TRACE(acpi_get_devices); + ACPI_FUNCTION_TRACE("acpi_get_devices"); /* Parameter validation */ @@ -564,9 +564,9 @@ acpi_get_devices(char *HID, * We're going to call their callback from OUR callback, so we need * to know what it is, and their context parameter. */ - info.hid = HID; info.context = context; info.user_function = user_function; + info.hid = HID; /* * Lock the namespace around the walk. @@ -579,8 +579,9 @@ acpi_get_devices(char *HID, return_ACPI_STATUS(status); } - status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK, + status = acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, + ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, + ACPI_NS_WALK_UNLOCK, acpi_ns_get_device_callback, &info, return_value); @@ -588,7 +589,7 @@ acpi_get_devices(char *HID, return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_devices) +EXPORT_SYMBOL(acpi_get_devices); /******************************************************************************* * @@ -603,6 +604,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_devices) * DESCRIPTION: Attach arbitrary data and handler to a namespace node. * ******************************************************************************/ + acpi_status acpi_attach_data(acpi_handle obj_handle, acpi_object_handler handler, void *data) @@ -636,8 +638,6 @@ acpi_attach_data(acpi_handle obj_handle, return (status); } -ACPI_EXPORT_SYMBOL(acpi_attach_data) - /******************************************************************************* * * FUNCTION: acpi_detach_data @@ -650,6 +650,7 @@ ACPI_EXPORT_SYMBOL(acpi_attach_data) * DESCRIPTION: Remove data that was previously attached to a node. * ******************************************************************************/ + acpi_status acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) { @@ -682,8 +683,6 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler) return (status); } -ACPI_EXPORT_SYMBOL(acpi_detach_data) - /******************************************************************************* * * FUNCTION: acpi_get_data @@ -697,6 +696,7 @@ ACPI_EXPORT_SYMBOL(acpi_detach_data) * DESCRIPTION: Retrieve data that was previously attached to a namespace node. * ******************************************************************************/ + acpi_status acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) { @@ -728,5 +728,3 @@ acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data) (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); return (status); } - -ACPI_EXPORT_SYMBOL(acpi_get_data) diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c index 978213a6c..8cd8675a4 100644 --- a/drivers/acpi/namespace/nsxfname.c +++ b/drivers/acpi/namespace/nsxfname.c @@ -42,6 +42,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include @@ -112,8 +114,9 @@ acpi_get_handle(acpi_handle parent, /* * Find the Node and convert to a handle */ - status = acpi_ns_get_node(prefix_node, pathname, ACPI_NS_NO_UPSEARCH, - &node); + status = + acpi_ns_get_node_by_path(pathname, prefix_node, ACPI_NS_NO_UPSEARCH, + &node); *ret_handle = NULL; if (ACPI_SUCCESS(status)) { @@ -123,7 +126,7 @@ acpi_get_handle(acpi_handle parent, return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_handle) +EXPORT_SYMBOL(acpi_get_handle); /****************************************************************************** * @@ -140,6 +143,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_handle) * complementary functions. * ******************************************************************************/ + acpi_status acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) { @@ -158,7 +162,6 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) } if (name_type == ACPI_FULL_PATHNAME) { - /* Get the full pathname (From the namespace root) */ status = acpi_ns_handle_to_pathname(handle, buffer); @@ -200,7 +203,7 @@ acpi_get_name(acpi_handle handle, u32 name_type, struct acpi_buffer * buffer) return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_name) +EXPORT_SYMBOL(acpi_get_name); /****************************************************************************** * @@ -216,6 +219,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_name) * control methods (Such as in the case of a device.) * ******************************************************************************/ + acpi_status acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) { @@ -237,7 +241,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) return (status); } - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info)); + info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_device_info)); if (!info) { return (AE_NO_MEMORY); } @@ -341,11 +345,11 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) } cleanup: - ACPI_FREE(info); + ACPI_MEM_FREE(info); if (cid_list) { - ACPI_FREE(cid_list); + ACPI_MEM_FREE(cid_list); } return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_object_info) +EXPORT_SYMBOL(acpi_get_object_info); diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c index a163e1d37..a03325956 100644 --- a/drivers/acpi/namespace/nsxfobj.c +++ b/drivers/acpi/namespace/nsxfobj.c @@ -42,6 +42,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include @@ -99,7 +101,7 @@ acpi_status acpi_get_type(acpi_handle handle, acpi_object_type * ret_type) return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_type) +EXPORT_SYMBOL(acpi_get_type); /******************************************************************************* * @@ -114,6 +116,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type) * Handle. * ******************************************************************************/ + acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) { struct acpi_namespace_node *node; @@ -159,7 +162,7 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle) return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_parent) +EXPORT_SYMBOL(acpi_get_parent); /******************************************************************************* * @@ -178,6 +181,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_parent) * Scope is returned. * ******************************************************************************/ + acpi_status acpi_get_next_object(acpi_object_type type, acpi_handle parent, @@ -202,7 +206,6 @@ acpi_get_next_object(acpi_object_type type, /* If null handle, use the parent */ if (!child) { - /* Start search at the beginning of the specified scope */ parent_node = acpi_ns_map_handle_to_node(parent); @@ -239,4 +242,4 @@ acpi_get_next_object(acpi_object_type type, return (status); } -ACPI_EXPORT_SYMBOL(acpi_get_next_object) +EXPORT_SYMBOL(acpi_get_next_object); diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index e5e448edc..64b98e82f 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -23,6 +23,7 @@ * */ #include +#include #include #include #include @@ -35,60 +36,12 @@ #define _COMPONENT ACPI_NUMA ACPI_MODULE_NAME("numa") -static nodemask_t nodes_found_map = NODE_MASK_NONE; -#define PXM_INVAL -1 -#define NID_INVAL -1 - -/* maps to convert between proximity domain and logical node ID */ -int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS] - = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; -int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] - = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; - extern int __init acpi_table_parse_madt_family(enum acpi_table_id id, unsigned long madt_size, int entry_id, acpi_madt_entry_handler handler, unsigned int max_entries); -int __cpuinit pxm_to_node(int pxm) -{ - if (pxm < 0) - return NID_INVAL; - return pxm_to_node_map[pxm]; -} - -int __cpuinit node_to_pxm(int node) -{ - if (node < 0) - return PXM_INVAL; - return node_to_pxm_map[node]; -} - -int __cpuinit acpi_map_pxm_to_node(int pxm) -{ - int node = pxm_to_node_map[pxm]; - - if (node < 0){ - if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) - return NID_INVAL; - node = first_unset_node(nodes_found_map); - pxm_to_node_map[pxm] = node; - node_to_pxm_map[node] = pxm; - node_set(node, nodes_found_map); - } - - return node; -} - -void __cpuinit acpi_unmap_pxm_to_node(int node) -{ - int pxm = node_to_pxm_map[node]; - pxm_to_node_map[pxm] = NID_INVAL; - node_to_pxm_map[node] = PXM_INVAL; - node_clear(node, nodes_found_map); -} - void __init acpi_table_print_srat_entry(acpi_table_entry_header * header) { @@ -253,16 +206,5 @@ int acpi_get_pxm(acpi_handle h) } while (ACPI_SUCCESS(status)); return -1; } -EXPORT_SYMBOL(acpi_get_pxm); -int acpi_get_node(acpi_handle *handle) -{ - int pxm, node = -1; - - pxm = acpi_get_pxm(handle); - if (pxm >= 0) - node = acpi_map_pxm_to_node(pxm); - - return node; -} -EXPORT_SYMBOL(acpi_get_node); +EXPORT_SYMBOL(acpi_get_pxm); diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 507f051d1..c0cda607b 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -25,6 +25,7 @@ * */ +#include #include #include #include @@ -135,6 +136,22 @@ void acpi_os_vprintf(const char *fmt, va_list args) #endif } +extern int acpi_in_resume; +void *acpi_os_allocate(acpi_size size) +{ + if (acpi_in_resume) + return kmalloc(size, GFP_ATOMIC); + else + return kmalloc(size, GFP_KERNEL); +} + +void acpi_os_free(void *ptr) +{ + kfree(ptr); +} + +EXPORT_SYMBOL(acpi_os_free); + acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr) { if (efi_enabled) { @@ -262,7 +279,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, acpi_irq_handler = handler; acpi_irq_context = context; - if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) { + if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) { printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq); return AE_NOT_ACQUIRED; } @@ -568,36 +585,23 @@ static void acpi_os_execute_deferred(void *context) { struct acpi_os_dpc *dpc = NULL; + ACPI_FUNCTION_TRACE("os_execute_deferred"); dpc = (struct acpi_os_dpc *)context; if (!dpc) { - printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); - return; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); + return_VOID; } dpc->function(dpc->context); kfree(dpc); - return; + return_VOID; } -/******************************************************************************* - * - * FUNCTION: acpi_os_execute - * - * PARAMETERS: Type - Type of the callback - * Function - Function to be executed - * Context - Function parameters - * - * RETURN: Status - * - * DESCRIPTION: Depending on type, either queues function for deferred execution or - * immediately executes function on a separate thread. - * - ******************************************************************************/ - -acpi_status acpi_os_execute(acpi_execute_type type, +acpi_status +acpi_os_queue_for_execution(u32 priority, acpi_osd_exec_callback function, void *context) { acpi_status status = AE_OK; @@ -646,7 +650,7 @@ acpi_status acpi_os_execute(acpi_execute_type type, return_ACPI_STATUS(status); } -EXPORT_SYMBOL(acpi_os_execute); +EXPORT_SYMBOL(acpi_os_queue_for_execution); void acpi_os_wait_events_complete(void *context) { @@ -658,19 +662,35 @@ EXPORT_SYMBOL(acpi_os_wait_events_complete); /* * Allocate the memory for a spinlock and initialize it. */ -acpi_status acpi_os_create_lock(acpi_spinlock * handle) +acpi_status acpi_os_create_lock(acpi_handle * out_handle) { - spin_lock_init(*handle); + spinlock_t *lock_ptr; - return AE_OK; + ACPI_FUNCTION_TRACE("os_create_lock"); + + lock_ptr = acpi_os_allocate(sizeof(spinlock_t)); + + spin_lock_init(lock_ptr); + + ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr)); + + *out_handle = lock_ptr; + + return_ACPI_STATUS(AE_OK); } /* * Deallocate the memory for a spinlock. */ -void acpi_os_delete_lock(acpi_spinlock handle) +void acpi_os_delete_lock(acpi_handle handle) { - return; + ACPI_FUNCTION_TRACE("os_create_lock"); + + ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle)); + + acpi_os_free(handle); + + return_VOID; } acpi_status @@ -678,10 +698,11 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle) { struct semaphore *sem = NULL; + ACPI_FUNCTION_TRACE("os_create_semaphore"); sem = acpi_os_allocate(sizeof(struct semaphore)); if (!sem) - return AE_NO_MEMORY; + return_ACPI_STATUS(AE_NO_MEMORY); memset(sem, 0, sizeof(struct semaphore)); sema_init(sem, initial_units); @@ -691,7 +712,7 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle) ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n", *handle, initial_units)); - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_os_create_semaphore); @@ -707,16 +728,17 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle) { struct semaphore *sem = (struct semaphore *)handle; + ACPI_FUNCTION_TRACE("os_delete_semaphore"); if (!sem) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle)); - kfree(sem); + acpi_os_free(sem); sem = NULL; - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_os_delete_semaphore); @@ -736,25 +758,19 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout) struct semaphore *sem = (struct semaphore *)handle; int ret = 0; + ACPI_FUNCTION_TRACE("os_wait_semaphore"); if (!sem || (units < 1)) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); if (units > 1) - return AE_SUPPORT; + return_ACPI_STATUS(AE_SUPPORT); ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout)); - /* - * This can be called during resume with interrupts off. - * Like boot-time, we should be single threaded and will - * always get the lock if we try -- timeout or not. - * If this doesn't succeed, then we will oops courtesy of - * might_sleep() in down(). - */ - if (!down_trylock(sem)) - return AE_OK; + if (in_atomic() || acpi_in_resume) + timeout = 0; switch (timeout) { /* @@ -800,17 +816,17 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout) } if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, - "Failed to acquire semaphore[%p|%d|%d], %s", + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Failed to acquire semaphore[%p|%d|%d], %s\n", handle, units, timeout, acpi_format_exception(status))); } else { ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, - "Acquired semaphore[%p|%d|%d]", handle, + "Acquired semaphore[%p|%d|%d]\n", handle, units, timeout)); } - return status; + return_ACPI_STATUS(status); } EXPORT_SYMBOL(acpi_os_wait_semaphore); @@ -822,19 +838,20 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units) { struct semaphore *sem = (struct semaphore *)handle; + ACPI_FUNCTION_TRACE("os_signal_semaphore"); if (!sem || (units < 1)) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); if (units > 1) - return AE_SUPPORT; + return_ACPI_STATUS(AE_SUPPORT); ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle, units)); up(sem); - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_os_signal_semaphore); @@ -879,6 +896,14 @@ u8 acpi_os_writable(void *ptr, acpi_size len) } #endif +u32 acpi_os_get_thread_id(void) +{ + if (!in_atomic() && !acpi_in_resume) + return current->pid; + + return 0; +} + acpi_status acpi_os_signal(u32 function, void *info) { switch (function) { @@ -1003,10 +1028,10 @@ EXPORT_SYMBOL(max_cstate); * handle is a pointer to the spinlock_t. */ -acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) +acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) { acpi_cpu_flags flags; - spin_lock_irqsave(lockp, flags); + spin_lock_irqsave((spinlock_t *) handle, flags); return flags; } @@ -1014,9 +1039,9 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) * Release a spinlock. See above. */ -void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) +void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) { - spin_unlock_irqrestore(lockp, flags); + spin_unlock_irqrestore((spinlock_t *) handle, flags); } #ifndef ACPI_USE_LOCAL_CACHE @@ -1025,12 +1050,12 @@ void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) * * FUNCTION: acpi_os_create_cache * - * PARAMETERS: name - Ascii name for the cache - * size - Size of each cached object - * depth - Maximum depth of the cache (in objects) - * cache - Where the new cache object is returned + * PARAMETERS: CacheName - Ascii name for the cache + * ObjectSize - Size of each cached object + * MaxDepth - Maximum depth of the cache (in objects) + * ReturnCache - Where the new cache object is returned * - * RETURN: status + * RETURN: Status * * DESCRIPTION: Create a cache object * @@ -1040,10 +1065,7 @@ acpi_status acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) { *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL); - if (cache == NULL) - return AE_ERROR; - else - return AE_OK; + return AE_OK; } /******************************************************************************* @@ -1103,52 +1125,30 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) return (AE_OK); } -/****************************************************************************** - * - * FUNCTION: acpi_os_validate_interface - * - * PARAMETERS: interface - Requested interface to be validated - * - * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise - * - * DESCRIPTION: Match an interface string to the interfaces supported by the - * host. Strings originate from an AML call to the _OSI method. - * - *****************************************************************************/ - -acpi_status -acpi_os_validate_interface (char *interface) -{ - - return AE_SUPPORT; -} - - -/****************************************************************************** +/******************************************************************************* * - * FUNCTION: acpi_os_validate_address + * FUNCTION: acpi_os_acquire_object * - * PARAMETERS: space_id - ACPI space ID - * address - Physical address - * length - Address length + * PARAMETERS: Cache - Handle to cache object + * ReturnObject - Where the object is returned * - * RETURN: AE_OK if address/length is valid for the space_id. Otherwise, - * should return AE_AML_ILLEGAL_ADDRESS. + * RETURN: Status * - * DESCRIPTION: Validate a system address via the host OS. Used to validate - * the addresses accessed by AML operation regions. + * DESCRIPTION: Get an object from the specified cache. If cache is empty, + * the object is allocated. * - *****************************************************************************/ + ******************************************************************************/ -acpi_status -acpi_os_validate_address ( - u8 space_id, - acpi_physical_address address, - acpi_size length) +void *acpi_os_acquire_object(acpi_cache_t * cache) { + void *object; - return AE_OK; + if (acpi_in_resume) + object = kmem_cache_alloc(cache, GFP_ATOMIC); + else + object = kmem_cache_alloc(cache, GFP_KERNEL); + WARN_ON(!object); + return object; } - #endif diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index bf88e076c..de573be52 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c @@ -79,7 +79,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state) acpi_native_uint byte_count; u8 byte_zero_mask = 0x3F; /* Default [0:5] */ - ACPI_FUNCTION_TRACE(ps_get_next_package_length); + ACPI_FUNCTION_TRACE("ps_get_next_package_length"); /* * Byte 0 bits [6:7] contain the number of additional bytes @@ -128,7 +128,7 @@ u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state) u8 *start = parser_state->aml; u32 package_length; - ACPI_FUNCTION_TRACE(ps_get_next_package_end); + ACPI_FUNCTION_TRACE("ps_get_next_package_end"); /* Function below updates parser_state->Aml */ @@ -157,7 +157,7 @@ char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state) u8 *start = parser_state->aml; u8 *end = parser_state->aml; - ACPI_FUNCTION_TRACE(ps_get_next_namestring); + ACPI_FUNCTION_TRACE("ps_get_next_namestring"); /* Point past any namestring prefix characters (backslash or carat) */ @@ -237,7 +237,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, struct acpi_namespace_node *node; union acpi_generic_state scope_info; - ACPI_FUNCTION_TRACE(ps_get_next_namepath); + ACPI_FUNCTION_TRACE("ps_get_next_namepath"); path = acpi_ps_get_next_namestring(parser_state); acpi_ps_init_op(arg, AML_INT_NAMEPATH_OP); @@ -275,7 +275,6 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, */ if (ACPI_SUCCESS(status) && possible_method_call && (node->type == ACPI_TYPE_METHOD)) { - /* This name is actually a control method invocation */ method_desc = acpi_ns_get_attached_object(node); @@ -320,7 +319,6 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, * some not_found cases are allowed */ if (status == AE_NOT_FOUND) { - /* 1) not_found is ok during load pass 1/2 (allow forward references) */ if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) != @@ -356,7 +354,6 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) { - /* Report a control method execution error */ status = acpi_ds_method_error(status, walk_state); @@ -391,7 +388,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, u16 opcode; u8 *aml = parser_state->aml; - ACPI_FUNCTION_TRACE_U32(ps_get_next_simple_arg, arg_type); + ACPI_FUNCTION_TRACE_U32("ps_get_next_simple_arg", arg_type); switch (arg_type) { case ARGP_BYTEDATA: @@ -456,7 +453,7 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, default: - ACPI_ERROR((AE_INFO, "Invalid ArgType %X", arg_type)); + ACPI_ERROR((AE_INFO, "Invalid arg_type %X", arg_type)); return_VOID; } @@ -487,7 +484,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state u16 opcode; u32 name; - ACPI_FUNCTION_TRACE(ps_get_next_field); + ACPI_FUNCTION_TRACE("ps_get_next_field"); /* Determine field type */ @@ -593,7 +590,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, u32 subop; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ps_get_next_arg, parser_state); + ACPI_FUNCTION_TRACE_PTR("ps_get_next_arg", parser_state); switch (arg_type) { case ARGP_BYTEDATA: @@ -623,7 +620,6 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, case ARGP_FIELDLIST: if (parser_state->aml < parser_state->pkg_end) { - /* Non-empty list */ while (parser_state->aml < parser_state->pkg_end) { @@ -649,7 +645,6 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, case ARGP_BYTELIST: if (parser_state->aml < parser_state->pkg_end) { - /* Non-empty list */ arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); @@ -678,7 +673,6 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, if (subop == 0 || acpi_ps_is_leading_char(subop) || acpi_ps_is_prefix_char(subop)) { - /* null_name or name_string */ arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); @@ -709,7 +703,6 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, case ARGP_OBJLIST: if (parser_state->aml < parser_state->pkg_end) { - /* Non-empty list of variable arguments, nothing returned */ walk_state->arg_count = ACPI_VAR_ARGS; @@ -718,7 +711,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, default: - ACPI_ERROR((AE_INFO, "Invalid ArgType: %X", arg_type)); + ACPI_ERROR((AE_INFO, "Invalid arg_type: %X", arg_type)); status = AE_AML_OPERAND_TYPE; break; } diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index e1541db37..00b072e15 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c @@ -83,7 +83,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) struct acpi_parse_state *parser_state; u8 *aml_op_start = NULL; - ACPI_FUNCTION_TRACE_PTR(ps_parse_loop, walk_state); + ACPI_FUNCTION_TRACE_PTR("ps_parse_loop", walk_state); if (walk_state->descending_callback == NULL) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -95,7 +95,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) #if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY)) if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { - /* We are restarting a preempted control method */ if (acpi_ps_has_completed_scope(parser_state)) { @@ -129,7 +128,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) } ACPI_EXCEPTION((AE_INFO, status, - "GetPredicate Failed")); + "get_predicate Failed")); return_ACPI_STATUS(status); } @@ -144,7 +143,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "Popped scope, Op=%p\n", op)); } else if (walk_state->prev_op) { - /* We were in the middle of an op */ op = walk_state->prev_op; @@ -158,7 +156,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) while ((parser_state->aml < parser_state->aml_end) || (op)) { aml_op_start = parser_state->aml; if (!op) { - /* Get the next opcode from the AML stream */ walk_state->aml_offset = @@ -216,7 +213,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) /* Create Op structure and append to parent's argument list */ if (walk_state->op_info->flags & AML_NAMED) { - /* Allocate a new pre_op if necessary */ if (!pre_op) { @@ -375,7 +371,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) if (walk_state->op_info) { ACPI_DEBUG_PRINT((ACPI_DB_PARSE, - "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n", + "Opcode %4.4X [%s] Op %p Aml %p aml_offset %5.5X\n", (u32) op->common.aml_opcode, walk_state->op_info->name, op, parser_state->aml, @@ -392,7 +388,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) /* Are there any arguments that must be processed? */ if (walk_state->arg_types) { - /* Get arguments */ switch (op->common.aml_opcode) { @@ -747,19 +742,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } - - status2 = - acpi_ds_result_stack_pop - (walk_state); - if (ACPI_FAILURE(status2)) { - return_ACPI_STATUS(status2); - } - - acpi_ut_delete_generic_state - (acpi_ut_pop_generic_state - (&walk_state->control_state)); } - acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types, &walk_state->arg_count); @@ -779,7 +762,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) return_ACPI_STATUS(status2); } } - acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types, &walk_state->arg_count); @@ -871,7 +853,6 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) } else if (ACPI_FAILURE(status)) { - /* First error is most important */ (void) diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index 4bd25e327..11d6351ab 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c @@ -725,13 +725,12 @@ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = { const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode) { - ACPI_FUNCTION_NAME(ps_get_opcode_info); + ACPI_FUNCTION_NAME("ps_get_opcode_info"); /* * Detect normal 8-bit opcode or extended 16-bit opcode */ if (!(opcode & 0xFF00)) { - /* Simple (8-bit) opcode: 0-255, can't index beyond table */ return (&acpi_gbl_aml_op_info @@ -740,7 +739,6 @@ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode) if (((opcode & 0xFF00) == AML_EXTENDED_OPCODE) && (((u8) opcode) <= MAX_EXTENDED_OPCODE)) { - /* Valid extended (16-bit) opcode */ return (&acpi_gbl_aml_op_info @@ -781,7 +779,7 @@ char *acpi_ps_get_opcode_name(u16 opcode) return (op->name); #else - return ("OpcodeName unavailable"); + return ("AE_NOT_CONFIGURED"); #endif } diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index a02aa62fe..a9f3229f4 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -106,7 +106,6 @@ u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state) opcode = (u16) ACPI_GET8(aml); if (opcode == AML_EXTENDED_OP_PREFIX) { - /* Extended opcode, get the second opcode byte */ aml++; @@ -138,7 +137,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, const struct acpi_opcode_info *parent_info; union acpi_parse_object *replacement_op = NULL; - ACPI_FUNCTION_TRACE_PTR(ps_complete_this_op, op); + ACPI_FUNCTION_TRACE_PTR("ps_complete_this_op", op); /* Check for null Op, can happen if AML code is corrupt */ @@ -159,7 +158,6 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, if (op->common.parent) { prev = op->common.parent->common.value.arg; if (!prev) { - /* Nothing more to do */ goto cleanup; @@ -247,7 +245,6 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, /* We must unlink this op from the parent tree */ if (prev == op) { - /* This op is the first in the list */ if (replacement_op) { @@ -268,7 +265,6 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, else while (prev) { - /* Traverse all siblings in the parent's argument list */ next = prev->common.next; @@ -333,7 +329,7 @@ acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, struct acpi_parse_state *parser_state = &walk_state->parser_state; acpi_status status = AE_CTRL_PENDING; - ACPI_FUNCTION_TRACE_PTR(ps_next_parse_state, op); + ACPI_FUNCTION_TRACE_PTR("ps_next_parse_state", op); switch (callback_status) { case AE_CTRL_TERMINATE: @@ -453,10 +449,10 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list; struct acpi_walk_state *previous_walk_state; - ACPI_FUNCTION_TRACE(ps_parse_aml); + ACPI_FUNCTION_TRACE("ps_parse_aml"); ACPI_DEBUG_PRINT((ACPI_DB_PARSE, - "Entered with WalkState=%p Aml=%p size=%X\n", + "Entered with walk_state=%p Aml=%p size=%X\n", walk_state, walk_state->parser_state.aml, walk_state->parser_state.aml_size)); @@ -464,21 +460,10 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) thread = acpi_ut_create_thread_state(); if (!thread) { - acpi_ds_delete_walk_state(walk_state); return_ACPI_STATUS(AE_NO_MEMORY); } walk_state->thread = thread; - - /* - * If executing a method, the starting sync_level is this method's - * sync_level - */ - if (walk_state->method_desc) { - walk_state->thread->current_sync_level = - walk_state->method_desc->method.sync_level; - } - acpi_ds_push_walk_state(walk_state, thread); /* @@ -515,10 +500,6 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) status = acpi_ds_call_control_method(thread, walk_state, NULL); - if (ACPI_FAILURE(status)) { - status = - acpi_ds_method_error(status, walk_state); - } /* * If the transfer to the new method method call worked, a new walk @@ -529,7 +510,6 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) } else if (status == AE_CTRL_TERMINATE) { status = AE_OK; } else if ((status != AE_OK) && (walk_state->method_desc)) { - /* Either the method parse or actual execution failed */ ACPI_ERROR_METHOD("Method parse/execution failed", @@ -539,7 +519,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) /* Check for possible multi-thread reentrancy problem */ if ((status == AE_ALREADY_EXISTS) && - (!walk_state->method_desc->method.mutex)) { + (!walk_state->method_desc->method.semaphore)) { /* * Method tried to create an object twice. The probable cause is * that the method cannot handle reentrancy. @@ -551,7 +531,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) */ walk_state->method_desc->method.method_flags |= AML_METHOD_SERIALIZED; - walk_state->method_desc->method.sync_level = 0; + walk_state->method_desc->method.concurrency = 1; } } @@ -570,9 +550,20 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) */ if (((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) || (ACPI_FAILURE(status))) { - acpi_ds_terminate_control_method(walk_state-> - method_desc, - walk_state); + if (walk_state->method_desc) { + /* Decrement the thread count on the method parse tree */ + + if (walk_state->method_desc->method. + thread_count) { + walk_state->method_desc->method. + thread_count--; + } else { + ACPI_ERROR((AE_INFO, + "Invalid zero thread count in method")); + } + } + + acpi_ds_terminate_control_method(walk_state); } /* Delete this walk state and all linked control states */ @@ -581,7 +572,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) previous_walk_state = walk_state; ACPI_DEBUG_PRINT((ACPI_DB_PARSE, - "ReturnValue=%p, ImplicitValue=%p State=%p\n", + "return_value=%p, implicit_value=%p State=%p\n", walk_state->return_desc, walk_state->implicit_return_obj, walk_state)); @@ -642,14 +633,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) } } else { if (previous_walk_state->return_desc) { - /* Caller doesn't want it, must delete it */ acpi_ut_remove_reference(previous_walk_state-> return_desc); } if (previous_walk_state->implicit_return_obj) { - /* Caller doesn't want it, must delete it */ acpi_ut_remove_reference(previous_walk_state-> diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c index a3e0314de..bc6047cac 100644 --- a/drivers/acpi/parser/psscope.c +++ b/drivers/acpi/parser/psscope.c @@ -106,14 +106,14 @@ acpi_ps_init_scope(struct acpi_parse_state * parser_state, { union acpi_generic_state *scope; - ACPI_FUNCTION_TRACE_PTR(ps_init_scope, root_op); + ACPI_FUNCTION_TRACE_PTR("ps_init_scope", root_op); scope = acpi_ut_create_generic_state(); if (!scope) { return_ACPI_STATUS(AE_NO_MEMORY); } - scope->common.descriptor_type = ACPI_DESC_TYPE_STATE_RPSCOPE; + scope->common.data_type = ACPI_DESC_TYPE_STATE_RPSCOPE; scope->parse_scope.op = root_op; scope->parse_scope.arg_count = ACPI_VAR_ARGS; scope->parse_scope.arg_end = parser_state->aml_end; @@ -147,14 +147,14 @@ acpi_ps_push_scope(struct acpi_parse_state *parser_state, { union acpi_generic_state *scope; - ACPI_FUNCTION_TRACE_PTR(ps_push_scope, op); + ACPI_FUNCTION_TRACE_PTR("ps_push_scope", op); scope = acpi_ut_create_generic_state(); if (!scope) { return_ACPI_STATUS(AE_NO_MEMORY); } - scope->common.descriptor_type = ACPI_DESC_TYPE_STATE_PSCOPE; + scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; scope->parse_scope.op = op; scope->parse_scope.arg_list = remaining_args; scope->parse_scope.arg_count = arg_count; @@ -165,7 +165,6 @@ acpi_ps_push_scope(struct acpi_parse_state *parser_state, acpi_ut_push_generic_state(&parser_state->scope, scope); if (arg_count == ACPI_VAR_ARGS) { - /* Multiple arguments */ scope->parse_scope.arg_end = parser_state->pkg_end; @@ -200,14 +199,14 @@ acpi_ps_pop_scope(struct acpi_parse_state *parser_state, { union acpi_generic_state *scope = parser_state->scope; - ACPI_FUNCTION_TRACE(ps_pop_scope); + ACPI_FUNCTION_TRACE("ps_pop_scope"); /* Only pop the scope if there is in fact a next scope */ if (scope->common.next) { scope = acpi_ut_pop_generic_state(&parser_state->scope); - /* Return to parsing previous op */ + /* return to parsing previous op */ *op = scope->parse_scope.op; *arg_list = scope->parse_scope.arg_list; @@ -218,7 +217,7 @@ acpi_ps_pop_scope(struct acpi_parse_state *parser_state, acpi_ut_delete_generic_state(scope); } else { - /* Empty parse stack, prepare to fetch next opcode */ + /* empty parse stack, prepare to fetch next opcode */ *op = NULL; *arg_list = 0; @@ -247,7 +246,7 @@ void acpi_ps_cleanup_scope(struct acpi_parse_state *parser_state) { union acpi_generic_state *scope; - ACPI_FUNCTION_TRACE_PTR(ps_cleanup_scope, parser_state); + ACPI_FUNCTION_TRACE_PTR("ps_cleanup_scope", parser_state); if (!parser_state) { return_VOID; diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index 0015717ef..dd6f16726 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c @@ -77,7 +77,6 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); if (op_info->class == AML_CLASS_UNKNOWN) { - /* Invalid opcode or ASCII character */ return (NULL); @@ -86,7 +85,6 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) /* Check if this opcode requires argument sub-objects */ if (!(op_info->flags & AML_HAS_ARGS)) { - /* Has no linked argument objects */ return (NULL); @@ -132,7 +130,6 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); if (op_info->class == AML_CLASS_UNKNOWN) { - /* Invalid opcode */ ACPI_ERROR((AE_INFO, "Invalid AML Opcode: 0x%2.2X", @@ -143,7 +140,6 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) /* Check if this opcode requires argument sub-objects */ if (!(op_info->flags & AML_HAS_ARGS)) { - /* Has no linked argument objects */ return; @@ -152,7 +148,6 @@ acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) /* Append the argument to the linked argument list */ if (op->common.value.arg) { - /* Append to existing argument list */ prev_arg = op->common.value.arg; @@ -227,14 +222,12 @@ union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin, } if (arg == origin) { - /* Reached parent of origin, end search */ return (NULL); } if (parent->common.next) { - /* Found sibling of parent */ return (parent->common.next); @@ -306,4 +299,5 @@ union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op) return (child); } #endif + #endif /* ACPI_FUTURE_USAGE */ diff --git a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c index d405387b7..0d3c56ac3 100644 --- a/drivers/acpi/parser/psutils.c +++ b/drivers/acpi/parser/psutils.c @@ -89,7 +89,7 @@ void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode) { ACPI_FUNCTION_ENTRY(); - op->common.descriptor_type = ACPI_DESC_TYPE_PARSER; + op->common.data_type = ACPI_DESC_TYPE_PARSER; op->common.aml_opcode = opcode; ACPI_DISASM_ONLY_MEMBERS(ACPI_STRNCPY(op->common.aml_op_name, @@ -135,14 +135,19 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode) /* Allocate the minimum required size object */ if (flags == ACPI_PARSEOP_GENERIC) { - /* The generic op (default) is by far the most common (16 to 1) */ op = acpi_os_acquire_object(acpi_gbl_ps_node_cache); + + if (op) + memset(op, 0, sizeof(struct acpi_parse_obj_common)); } else { /* Extended parseop */ op = acpi_os_acquire_object(acpi_gbl_ps_node_ext_cache); + + if (op) + memset(op, 0, sizeof(struct acpi_parse_obj_named)); } /* Initialize the Op */ @@ -170,7 +175,7 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode) void acpi_ps_free_op(union acpi_parse_object *op) { - ACPI_FUNCTION_NAME(ps_free_op); + ACPI_FUNCTION_NAME("ps_free_op"); if (op->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", diff --git a/drivers/acpi/parser/pswalk.c b/drivers/acpi/parser/pswalk.c index a84a547a0..06f05bfd7 100644 --- a/drivers/acpi/parser/pswalk.c +++ b/drivers/acpi/parser/pswalk.c @@ -64,21 +64,18 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) union acpi_parse_object *next = NULL; union acpi_parse_object *parent = NULL; - ACPI_FUNCTION_TRACE_PTR(ps_delete_parse_tree, subtree_root); + ACPI_FUNCTION_TRACE_PTR("ps_delete_parse_tree", subtree_root); /* Visit all nodes in the subtree */ while (op) { - /* Check if we are not ascending */ if (op != parent) { - /* Look for an argument or child of the current op */ next = acpi_ps_get_arg(op, 0); if (next) { - /* Still going downward in tree (Op is not completed yet) */ op = next; diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c index 5d996c114..2dd48cbb7 100644 --- a/drivers/acpi/parser/psxface.c +++ b/drivers/acpi/parser/psxface.c @@ -50,14 +50,14 @@ ACPI_MODULE_NAME("psxface") /* Local Prototypes */ -static void acpi_ps_start_trace(struct acpi_evaluate_info *info); +static void acpi_ps_start_trace(struct acpi_parameter_info *info); -static void acpi_ps_stop_trace(struct acpi_evaluate_info *info); +static void acpi_ps_stop_trace(struct acpi_parameter_info *info); -static acpi_status acpi_ps_execute_pass(struct acpi_evaluate_info *info); +static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info); static void -acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action); +acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action); /******************************************************************************* * @@ -113,7 +113,7 @@ acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags) * ******************************************************************************/ -static void acpi_ps_start_trace(struct acpi_evaluate_info *info) +static void acpi_ps_start_trace(struct acpi_parameter_info *info) { acpi_status status; @@ -125,7 +125,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info) } if ((!acpi_gbl_trace_method_name) || - (acpi_gbl_trace_method_name != info->resolved_node->name.integer)) { + (acpi_gbl_trace_method_name != info->node->name.integer)) { goto exit; } @@ -158,7 +158,7 @@ static void acpi_ps_start_trace(struct acpi_evaluate_info *info) * ******************************************************************************/ -static void acpi_ps_stop_trace(struct acpi_evaluate_info *info) +static void acpi_ps_stop_trace(struct acpi_parameter_info *info) { acpi_status status; @@ -170,7 +170,7 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info) } if ((!acpi_gbl_trace_method_name) || - (acpi_gbl_trace_method_name != info->resolved_node->name.integer)) { + (acpi_gbl_trace_method_name != info->node->name.integer)) { goto exit; } @@ -212,23 +212,22 @@ static void acpi_ps_stop_trace(struct acpi_evaluate_info *info) * ******************************************************************************/ -acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) +acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info) { acpi_status status; - ACPI_FUNCTION_TRACE(ps_execute_method); + ACPI_FUNCTION_TRACE("ps_execute_method"); /* Validate the Info and method Node */ - if (!info || !info->resolved_node) { + if (!info || !info->node) { return_ACPI_STATUS(AE_NULL_ENTRY); } /* Init for new method, wait on concurrency semaphore */ status = - acpi_ds_begin_method_execution(info->resolved_node, info->obj_desc, - NULL); + acpi_ds_begin_method_execution(info->node, info->obj_desc, NULL); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -249,7 +248,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Begin Method Parse **** Entry=%p obj=%p\n", - info->resolved_node, info->obj_desc)); + info->node, info->obj_desc)); info->pass_number = 1; status = acpi_ps_execute_pass(info); @@ -262,7 +261,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Begin Method Execution **** Entry=%p obj=%p\n", - info->resolved_node, info->obj_desc)); + info->node, info->obj_desc)); info->pass_number = 3; status = acpi_ps_execute_pass(info); @@ -287,7 +286,8 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) * a control exception code */ if (info->return_object) { - ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "Method returned ObjDesc=%p\n", + ACPI_DEBUG_PRINT((ACPI_DB_PARSE, + "Method returned obj_desc=%p\n", info->return_object)); ACPI_DUMP_STACK_ENTRY(info->return_object); @@ -301,7 +301,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) * * FUNCTION: acpi_ps_update_parameter_list * - * PARAMETERS: Info - See struct acpi_evaluate_info + * PARAMETERS: Info - See struct acpi_parameter_info * (Used: parameter_type and Parameters) * Action - Add or Remove reference * @@ -312,16 +312,14 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) ******************************************************************************/ static void -acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action) +acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action) { acpi_native_uint i; if ((info->parameter_type == ACPI_PARAM_ARGS) && (info->parameters)) { - /* Update reference count for each parameter */ for (i = 0; info->parameters[i]; i++) { - /* Ignore errors, just do them all */ (void)acpi_ut_update_object_reference(info-> @@ -335,7 +333,7 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action) * * FUNCTION: acpi_ps_execute_pass * - * PARAMETERS: Info - See struct acpi_evaluate_info + * PARAMETERS: Info - See struct acpi_parameter_info * (Used: pass_number, Node, and obj_desc) * * RETURN: Status @@ -344,13 +342,13 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action) * ******************************************************************************/ -static acpi_status acpi_ps_execute_pass(struct acpi_evaluate_info *info) +static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info) { acpi_status status; union acpi_parse_object *op; struct acpi_walk_state *walk_state; - ACPI_FUNCTION_TRACE(ps_execute_pass); + ACPI_FUNCTION_TRACE("ps_execute_pass"); /* Create and init a Root Node */ @@ -369,7 +367,7 @@ static acpi_status acpi_ps_execute_pass(struct acpi_evaluate_info *info) goto cleanup; } - status = acpi_ds_init_aml_walk(walk_state, op, info->resolved_node, + status = acpi_ds_init_aml_walk(walk_state, op, info->node, info->obj_desc->method.aml_start, info->obj_desc->method.aml_length, info->pass_number == 1 ? NULL : info, diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c index 1e2ae6e7a..2a718df76 100644 --- a/drivers/acpi/pci_bind.c +++ b/drivers/acpi/pci_bind.c @@ -47,10 +47,11 @@ struct acpi_pci_data { static void acpi_pci_data_handler(acpi_handle handle, u32 function, void *context) { + ACPI_FUNCTION_TRACE("acpi_pci_data_handler"); /* TBD: Anything we need to do here? */ - return; + return_VOID; } /** @@ -67,24 +68,25 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id) struct acpi_device *device = NULL; struct acpi_pci_data *data = NULL; + ACPI_FUNCTION_TRACE("acpi_get_pci_id"); if (!id) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); result = acpi_bus_get_device(handle, &device); if (result) { - printk(KERN_ERR PREFIX - "Invalid ACPI Bus context for device %s\n", - acpi_device_bid(device)); - return AE_NOT_EXIST; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid ACPI Bus context for device %s\n", + acpi_device_bid(device))); + return_ACPI_STATUS(AE_NOT_EXIST); } status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data); if (ACPI_FAILURE(status) || !data) { - ACPI_EXCEPTION((AE_INFO, status, - "Invalid ACPI-PCI context for device %s", - acpi_device_bid(device))); - return status; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid ACPI-PCI context for device %s\n", + acpi_device_bid(device))); + return_ACPI_STATUS(status); } *id = data->id; @@ -101,7 +103,7 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id) acpi_device_bid(device), id->segment, id->bus, id->device, id->function)); - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_get_pci_id); @@ -118,13 +120,14 @@ int acpi_pci_bind(struct acpi_device *device) struct pci_dev *dev; struct pci_bus *bus; + ACPI_FUNCTION_TRACE("acpi_pci_bind"); if (!device || !device->parent) - return -EINVAL; + return_VALUE(-EINVAL); pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); if (!pathname) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(pathname, 0, ACPI_PATHNAME_MAX); buffer.length = ACPI_PATHNAME_MAX; buffer.pointer = pathname; @@ -132,7 +135,7 @@ int acpi_pci_bind(struct acpi_device *device) data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); if (!data) { kfree(pathname); - return -ENOMEM; + return_VALUE(-ENOMEM); } memset(data, 0, sizeof(struct acpi_pci_data)); @@ -148,9 +151,9 @@ int acpi_pci_bind(struct acpi_device *device) status = acpi_get_data(device->parent->handle, acpi_pci_data_handler, (void **)&pdata); if (ACPI_FAILURE(status) || !pdata || !pdata->bus) { - ACPI_EXCEPTION((AE_INFO, status, - "Invalid ACPI-PCI context for parent device %s", - acpi_device_bid(device->parent))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid ACPI-PCI context for parent device %s\n", + acpi_device_bid(device->parent))); result = -ENODEV; goto end; } @@ -203,10 +206,10 @@ int acpi_pci_bind(struct acpi_device *device) goto end; } if (!data->dev->bus) { - printk(KERN_ERR PREFIX - "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n", - data->id.segment, data->id.bus, - data->id.device, data->id.function); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n", + data->id.segment, data->id.bus, + data->id.device, data->id.function)); result = -ENODEV; goto end; } @@ -234,9 +237,9 @@ int acpi_pci_bind(struct acpi_device *device) */ status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Unable to attach ACPI-PCI context to device %s", - acpi_device_bid(device))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to attach ACPI-PCI context to device %s\n", + acpi_device_bid(device))); result = -ENODEV; goto end; } @@ -266,7 +269,7 @@ int acpi_pci_bind(struct acpi_device *device) if (result) kfree(data); - return result; + return_VALUE(result); } int acpi_pci_unbind(struct acpi_device *device) @@ -277,13 +280,14 @@ int acpi_pci_unbind(struct acpi_device *device) char *pathname = NULL; struct acpi_buffer buffer = { 0, NULL }; + ACPI_FUNCTION_TRACE("acpi_pci_unbind"); if (!device || !device->parent) - return -EINVAL; + return_VALUE(-EINVAL); pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); if (!pathname) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(pathname, 0, ACPI_PATHNAME_MAX); buffer.length = ACPI_PATHNAME_MAX; @@ -297,18 +301,18 @@ int acpi_pci_unbind(struct acpi_device *device) acpi_get_data(device->handle, acpi_pci_data_handler, (void **)&data); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Unable to get data from device %s", - acpi_device_bid(device))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to get data from device %s\n", + acpi_device_bid(device))); result = -ENODEV; goto end; } status = acpi_detach_data(device->handle, acpi_pci_data_handler); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Unable to detach data from device %s", - acpi_device_bid(device))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to detach data from device %s\n", + acpi_device_bid(device))); result = -ENODEV; goto end; } @@ -318,7 +322,7 @@ int acpi_pci_unbind(struct acpi_device *device) kfree(data); end: - return result; + return_VALUE(result); } int @@ -331,10 +335,11 @@ acpi_pci_bind_root(struct acpi_device *device, char *pathname = NULL; struct acpi_buffer buffer = { 0, NULL }; + ACPI_FUNCTION_TRACE("acpi_pci_bind_root"); pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); if (!pathname) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(pathname, 0, ACPI_PATHNAME_MAX); buffer.length = ACPI_PATHNAME_MAX; @@ -342,13 +347,13 @@ acpi_pci_bind_root(struct acpi_device *device, if (!device || !id || !bus) { kfree(pathname); - return -EINVAL; + return_VALUE(-EINVAL); } data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); if (!data) { kfree(pathname); - return -ENOMEM; + return_VALUE(-ENOMEM); } memset(data, 0, sizeof(struct acpi_pci_data)); @@ -364,9 +369,9 @@ acpi_pci_bind_root(struct acpi_device *device, status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Unable to attach ACPI-PCI context to device %s", - pathname)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to attach ACPI-PCI context to device %s\n", + pathname)); result = -ENODEV; goto end; } @@ -376,5 +381,5 @@ acpi_pci_bind_root(struct acpi_device *device, if (result != 0) kfree(data); - return result; + return_VALUE(result); } diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index feda0341f..65aee79b3 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -24,6 +24,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ +#include #include #include @@ -54,9 +55,10 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment, struct list_head *node = NULL; struct acpi_prt_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry"); if (!acpi_prt.count) - return NULL; + return_PTR(NULL); /* * Parse through all PRT entries looking for a match on the specified @@ -71,12 +73,12 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment, && (device == entry->id.device) && (pin == entry->pin)) { spin_unlock(&acpi_prt_lock); - return entry; + return_PTR(entry); } } spin_unlock(&acpi_prt_lock); - return NULL; + return_PTR(NULL); } static int @@ -85,13 +87,14 @@ acpi_pci_irq_add_entry(acpi_handle handle, { struct acpi_prt_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_irq_add_entry"); if (!prt) - return -EINVAL; + return_VALUE(-EINVAL); entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); if (!entry) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(entry, 0, sizeof(struct acpi_prt_entry)); entry->id.segment = segment; @@ -138,7 +141,7 @@ acpi_pci_irq_add_entry(acpi_handle handle, acpi_prt.count++; spin_unlock(&acpi_prt_lock); - return 0; + return_VALUE(0); } static void @@ -160,10 +163,11 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) struct acpi_pci_routing_table *entry = NULL; static int first_time = 1; + ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt"); pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); if (!pathname) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(pathname, 0, ACPI_PATHNAME_MAX); if (first_time) { @@ -193,24 +197,24 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) kfree(pathname); status = acpi_get_irq_routing_table(handle, &buffer); if (status != AE_BUFFER_OVERFLOW) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]", - acpi_format_exception(status))); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", + acpi_format_exception(status))); + return_VALUE(-ENODEV); } prt = kmalloc(buffer.length, GFP_KERNEL); if (!prt) { - return -ENOMEM; + return_VALUE(-ENOMEM); } memset(prt, 0, buffer.length); buffer.pointer = prt; status = acpi_get_irq_routing_table(handle, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]", - acpi_format_exception(status))); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", + acpi_format_exception(status))); kfree(buffer.pointer); - return -ENODEV; + return_VALUE(-ENODEV); } entry = prt; @@ -223,7 +227,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) kfree(prt); - return 0; + return_VALUE(0); } void acpi_pci_irq_del_prt(int segment, int bus) @@ -258,15 +262,16 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry, { int irq; + ACPI_FUNCTION_TRACE("acpi_pci_allocate_irq"); if (entry->link.handle) { irq = acpi_pci_link_allocate_irq(entry->link.handle, entry->link.index, triggering, polarity, link); if (irq < 0) { - printk(KERN_WARNING PREFIX - "Invalid IRQ link routing entry\n"); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid IRQ link routing entry\n")); + return_VALUE(-1); } } else { irq = entry->link.index; @@ -275,7 +280,7 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry, } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq)); - return irq; + return_VALUE(irq); } static int @@ -284,12 +289,13 @@ acpi_pci_free_irq(struct acpi_prt_entry *entry, { int irq; + ACPI_FUNCTION_TRACE("acpi_pci_free_irq"); if (entry->link.handle) { irq = acpi_pci_link_free_irq(entry->link.handle); } else { irq = entry->link.index; } - return irq; + return_VALUE(irq); } /* @@ -309,6 +315,7 @@ acpi_pci_irq_lookup(struct pci_bus *bus, int bus_nr = bus->number; int ret; + ACPI_FUNCTION_TRACE("acpi_pci_irq_lookup"); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Searching for PRT entry for %02x:%02x:%02x[%c]\n", @@ -317,11 +324,11 @@ acpi_pci_irq_lookup(struct pci_bus *bus, entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin); if (!entry) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n")); - return -1; + return_VALUE(-1); } ret = func(entry, triggering, polarity, link); - return ret; + return_VALUE(ret); } /* @@ -339,9 +346,10 @@ acpi_pci_irq_derive(struct pci_dev *dev, int irq = -1; u8 bridge_pin = 0; + ACPI_FUNCTION_TRACE("acpi_pci_irq_derive"); if (!dev) - return -EINVAL; + return_VALUE(-EINVAL); /* * Attempt to derive an IRQ for this device from a parent bridge's @@ -358,7 +366,7 @@ acpi_pci_irq_derive(struct pci_dev *dev, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No interrupt pin configured for device %s\n", pci_name(bridge))); - return -1; + return_VALUE(-1); } /* Pin is from 0 to 3 */ bridge_pin--; @@ -371,15 +379,16 @@ acpi_pci_irq_derive(struct pci_dev *dev, } if (irq < 0) { - printk(KERN_WARNING PREFIX "Unable to derive IRQ for device %s\n", - pci_name(dev)); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Unable to derive IRQ for device %s\n", + pci_name(dev))); + return_VALUE(-1); } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n", irq, pci_name(dev), pci_name(bridge))); - return irq; + return_VALUE(irq); } /* @@ -397,22 +406,24 @@ int acpi_pci_irq_enable(struct pci_dev *dev) char *link = NULL; int rc; + ACPI_FUNCTION_TRACE("acpi_pci_irq_enable"); if (!dev) - return -EINVAL; + return_VALUE(-EINVAL); pin = dev->pin; if (!pin) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No interrupt pin configured for device %s\n", pci_name(dev))); - return 0; + return_VALUE(0); } pin--; if (!dev->bus) { - printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n"); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid (NULL) 'bus' field\n")); + return_VALUE(-ENODEV); } /* @@ -444,10 +455,10 @@ int acpi_pci_irq_enable(struct pci_dev *dev) printk(" - using IRQ %d\n", dev->irq); acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); - return 0; + return_VALUE(0); } else { printk("\n"); - return 0; + return_VALUE(0); } } @@ -455,7 +466,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) if (rc < 0) { printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed " "to register GSI\n", pci_name(dev), ('A' + pin)); - return rc; + return_VALUE(rc); } dev->irq = rc; @@ -469,7 +480,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_pci_irq_enable); @@ -486,13 +497,14 @@ void acpi_pci_irq_disable(struct pci_dev *dev) int triggering = ACPI_LEVEL_SENSITIVE; int polarity = ACPI_ACTIVE_LOW; + ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); if (!dev || !dev->bus) - return; + return_VOID; pin = dev->pin; if (!pin) - return; + return_VOID; pin--; /* @@ -510,7 +522,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev) &triggering, &polarity, NULL, acpi_pci_free_irq); if (gsi < 0) - return; + return_VOID; /* * TBD: It might be worth clearing dev->irq by magic constant @@ -522,5 +534,5 @@ void acpi_pci_irq_disable(struct pci_dev *dev) acpi_unregister_gsi(gsi); - return; + return_VOID; } diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 7f3e7e77e..07bc6dfe6 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -83,6 +82,7 @@ struct acpi_pci_link_irq { struct acpi_pci_link { struct list_head node; struct acpi_device *device; + acpi_handle handle; struct acpi_pci_link_irq irq; int refcnt; }; @@ -91,7 +91,7 @@ static struct { int count; struct list_head entries; } acpi_link; -DEFINE_MUTEX(acpi_link_lock); +DECLARE_MUTEX(acpi_link_lock); /* -------------------------------------------------------------------------- PCI Link Device Management @@ -106,23 +106,26 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) struct acpi_pci_link *link = (struct acpi_pci_link *)context; u32 i = 0; + ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible"); switch (resource->type) { case ACPI_RESOURCE_TYPE_START_DEPENDENT: - return AE_OK; + return_ACPI_STATUS(AE_OK); case ACPI_RESOURCE_TYPE_IRQ: { struct acpi_resource_irq *p = &resource->data.irq; if (!p || !p->interrupt_count) { - printk(KERN_WARNING PREFIX "Blank IRQ resource\n"); - return AE_OK; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Blank IRQ resource\n")); + return_ACPI_STATUS(AE_OK); } for (i = 0; (i < p->interrupt_count && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { if (!p->interrupts[i]) { - printk(KERN_WARNING PREFIX "Invalid IRQ %d\n", - p->interrupts[i]); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid IRQ %d\n", + p->interrupts[i])); continue; } link->irq.possible[i] = p->interrupts[i]; @@ -138,16 +141,17 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) struct acpi_resource_extended_irq *p = &resource->data.extended_irq; if (!p || !p->interrupt_count) { - printk(KERN_WARNING PREFIX - "Blank EXT IRQ resource\n"); - return AE_OK; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Blank EXT IRQ resource\n")); + return_ACPI_STATUS(AE_OK); } for (i = 0; (i < p->interrupt_count && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { if (!p->interrupts[i]) { - printk(KERN_WARNING PREFIX "Invalid IRQ %d\n", - p->interrupts[i]); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid IRQ %d\n", + p->interrupts[i])); continue; } link->irq.possible[i] = p->interrupts[i]; @@ -159,33 +163,35 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) break; } default: - printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n"); - return AE_OK; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Resource is not an IRQ entry\n")); + return_ACPI_STATUS(AE_OK); } - return AE_CTRL_TERMINATE; + return_ACPI_STATUS(AE_CTRL_TERMINATE); } static int acpi_pci_link_get_possible(struct acpi_pci_link *link) { acpi_status status; + ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible"); if (!link) - return -EINVAL; + return_VALUE(-EINVAL); - status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS, + status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, acpi_pci_link_check_possible, link); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRS\n")); + return_VALUE(-ENODEV); } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d possible IRQs\n", link->irq.possible_count)); - return 0; + return_VALUE(0); } static acpi_status @@ -193,6 +199,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) { int *irq = (int *)context; + ACPI_FUNCTION_TRACE("acpi_pci_link_check_current"); switch (resource->type) { case ACPI_RESOURCE_TYPE_IRQ: @@ -205,7 +212,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Blank IRQ resource\n")); - return AE_OK; + return_ACPI_STATUS(AE_OK); } *irq = p->interrupts[0]; break; @@ -219,20 +226,20 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) * extended IRQ descriptors must * return at least 1 IRQ */ - printk(KERN_WARNING PREFIX - "Blank EXT IRQ resource\n"); - return AE_OK; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Blank EXT IRQ resource\n")); + return_ACPI_STATUS(AE_OK); } *irq = p->interrupts[0]; break; } break; default: - printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Resource %d isn't an IRQ\n", resource->type)); case ACPI_RESOURCE_TYPE_END_TAG: - return AE_OK; + return_ACPI_STATUS(AE_OK); } - return AE_CTRL_TERMINATE; + return_ACPI_STATUS(AE_CTRL_TERMINATE); } /* @@ -248,8 +255,10 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) acpi_status status = AE_OK; int irq = 0; - if (!link) - return -EINVAL; + ACPI_FUNCTION_TRACE("acpi_pci_link_get_current"); + + if (!link || !link->handle) + return_VALUE(-EINVAL); link->irq.active = 0; @@ -258,13 +267,14 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) /* Query _STA, set link->device->status */ result = acpi_bus_get_status(link->device); if (result) { - printk(KERN_ERR PREFIX "Unable to read status\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to read status\n")); goto end; } if (!link->device->status.enabled) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link disabled\n")); - return 0; + return_VALUE(0); } } @@ -272,16 +282,16 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) * Query and parse _CRS to get the current IRQ assignment. */ - status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS, + status = acpi_walk_resources(link->handle, METHOD_NAME__CRS, acpi_pci_link_check_current, &irq); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _CRS\n")); result = -ENODEV; goto end; } if (acpi_strict && !irq) { - printk(KERN_ERR PREFIX "_CRS returned 0\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_CRS returned 0\n")); result = -ENODEV; } @@ -290,7 +300,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active)); end: - return result; + return_VALUE(result); } static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) @@ -303,13 +313,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) } *resource; struct acpi_buffer buffer = { 0, NULL }; + ACPI_FUNCTION_TRACE("acpi_pci_link_set"); if (!link || !irq) - return -EINVAL; + return_VALUE(-EINVAL); resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC); if (!resource) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(resource, 0, sizeof(*resource) + 1); buffer.length = sizeof(*resource) + 1; @@ -350,7 +361,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) /* ignore resource_source, it's optional */ break; default: - printk(KERN_ERR PREFIX "Invalid Resource_type %d\n", link->irq.resource_type); + printk("ACPI BUG: resource_type %d\n", link->irq.resource_type); result = -EINVAL; goto end; @@ -358,11 +369,11 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->end.type = ACPI_RESOURCE_TYPE_END_TAG; /* Attempt to set the resource */ - status = acpi_set_current_resources(link->device->handle, &buffer); + status = acpi_set_current_resources(link->handle, &buffer); /* check for total failure */ if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SRS")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n")); result = -ENODEV; goto end; } @@ -370,14 +381,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) /* Query _STA, set device->status */ result = acpi_bus_get_status(link->device); if (result) { - printk(KERN_ERR PREFIX "Unable to read status\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to read status\n")); goto end; } if (!link->device->status.enabled) { printk(KERN_WARNING PREFIX - "%s [%s] disabled and referenced, BIOS bug\n", - acpi_device_name(link->device), - acpi_device_bid(link->device)); + "%s [%s] disabled and referenced, BIOS bug.\n", + acpi_device_name(link->device), + acpi_device_bid(link->device)); } /* Query _CRS, set link->irq.active */ @@ -396,9 +407,9 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) * assume _SRS worked and override _CRS value. */ printk(KERN_WARNING PREFIX - "%s [%s] BIOS reported IRQ %d, using IRQ %d\n", - acpi_device_name(link->device), - acpi_device_bid(link->device), link->irq.active, irq); + "%s [%s] BIOS reported IRQ %d, using IRQ %d\n", + acpi_device_name(link->device), + acpi_device_bid(link->device), link->irq.active, irq); link->irq.active = irq; } @@ -406,7 +417,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) end: kfree(resource); - return result; + return_VALUE(result); } /* -------------------------------------------------------------------------- @@ -480,6 +491,7 @@ int __init acpi_irq_penalty_init(void) struct acpi_pci_link *link = NULL; int i = 0; + ACPI_FUNCTION_TRACE("acpi_irq_penalty_init"); /* * Update penalties to facilitate IRQ balancing. @@ -488,7 +500,8 @@ int __init acpi_irq_penalty_init(void) link = list_entry(node, struct acpi_pci_link, node); if (!link) { - printk(KERN_ERR PREFIX "Invalid link context\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid link context\n")); continue; } @@ -516,7 +529,7 @@ int __init acpi_irq_penalty_init(void) /* Add a penalty for the SCI */ acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING; - return 0; + return_VALUE(0); } static int acpi_irq_balance; /* 0: static, 1: balance */ @@ -526,12 +539,13 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) int irq; int i; + ACPI_FUNCTION_TRACE("acpi_pci_link_allocate"); if (link->irq.initialized) { if (link->refcnt == 0) /* This means the link is disabled but initialized */ acpi_pci_link_set(link, link->irq.active); - return 0; + return_VALUE(0); } /* @@ -547,7 +561,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) if (i == link->irq.possible_count) { if (acpi_strict) printk(KERN_WARNING PREFIX "_CRS %d not found" - " in _PRS\n", link->irq.active); + " in _PRS\n", link->irq.active); link->irq.active = 0; } @@ -574,11 +588,12 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) /* Attempt to enable the link device at this IRQ. */ if (acpi_pci_link_set(link, irq)) { - printk(KERN_ERR PREFIX "Unable to set IRQ for %s [%s]. " - "Try pci=noacpi or acpi=off\n", - acpi_device_name(link->device), - acpi_device_bid(link->device)); - return -ENODEV; + printk(PREFIX + "Unable to set IRQ for %s [%s] (likely buggy ACPI BIOS).\n" + "Try pci=noacpi or acpi=off\n", + acpi_device_name(link->device), + acpi_device_bid(link->device)); + return_VALUE(-ENODEV); } else { acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING; printk(PREFIX "%s [%s] enabled at IRQ %d\n", @@ -588,7 +603,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) link->irq.initialized = 1; - return 0; + return_VALUE(0); } /* @@ -606,38 +621,39 @@ acpi_pci_link_allocate_irq(acpi_handle handle, struct acpi_device *device = NULL; struct acpi_pci_link *link = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_link_allocate_irq"); result = acpi_bus_get_device(handle, &device); if (result) { - printk(KERN_ERR PREFIX "Invalid link device\n"); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); + return_VALUE(-1); } link = (struct acpi_pci_link *)acpi_driver_data(device); if (!link) { - printk(KERN_ERR PREFIX "Invalid link context\n"); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); + return_VALUE(-1); } /* TBD: Support multiple index (IRQ) entries per Link Device */ if (index) { - printk(KERN_ERR PREFIX "Invalid index %d\n", index); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid index %d\n", index)); + return_VALUE(-1); } - mutex_lock(&acpi_link_lock); + down(&acpi_link_lock); if (acpi_pci_link_allocate(link)) { - mutex_unlock(&acpi_link_lock); - return -1; + up(&acpi_link_lock); + return_VALUE(-1); } if (!link->irq.active) { - mutex_unlock(&acpi_link_lock); - printk(KERN_ERR PREFIX "Link active IRQ is 0!\n"); - return -1; + up(&acpi_link_lock); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); + return_VALUE(-1); } link->refcnt++; - mutex_unlock(&acpi_link_lock); + up(&acpi_link_lock); if (triggering) *triggering = link->irq.triggering; @@ -648,7 +664,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link %s is referenced\n", acpi_device_bid(link->device))); - return (link->irq.active); + return_VALUE(link->irq.active); } /* @@ -661,24 +677,25 @@ int acpi_pci_link_free_irq(acpi_handle handle) struct acpi_pci_link *link = NULL; acpi_status result; + ACPI_FUNCTION_TRACE("acpi_pci_link_free_irq"); result = acpi_bus_get_device(handle, &device); if (result) { - printk(KERN_ERR PREFIX "Invalid link device\n"); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); + return_VALUE(-1); } link = (struct acpi_pci_link *)acpi_driver_data(device); if (!link) { - printk(KERN_ERR PREFIX "Invalid link context\n"); - return -1; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); + return_VALUE(-1); } - mutex_lock(&acpi_link_lock); + down(&acpi_link_lock); if (!link->irq.initialized) { - mutex_unlock(&acpi_link_lock); - printk(KERN_ERR PREFIX "Link isn't initialized\n"); - return -1; + up(&acpi_link_lock); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link isn't initialized\n")); + return_VALUE(-1); } #ifdef FUTURE_USE /* @@ -697,10 +714,10 @@ int acpi_pci_link_free_irq(acpi_handle handle) acpi_device_bid(link->device))); if (link->refcnt == 0) { - acpi_ut_evaluate_object(link->device->handle, "_DIS", 0, NULL); + acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); } - mutex_unlock(&acpi_link_lock); - return (link->irq.active); + up(&acpi_link_lock); + return_VALUE(link->irq.active); } /* -------------------------------------------------------------------------- @@ -714,21 +731,23 @@ static int acpi_pci_link_add(struct acpi_device *device) int i = 0; int found = 0; + ACPI_FUNCTION_TRACE("acpi_pci_link_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); link = kmalloc(sizeof(struct acpi_pci_link), GFP_KERNEL); if (!link) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(link, 0, sizeof(struct acpi_pci_link)); link->device = device; + link->handle = device->handle; strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); acpi_driver_data(device) = link; - mutex_lock(&acpi_link_lock); + down(&acpi_link_lock); result = acpi_pci_link_get_possible(link); if (result) goto end; @@ -762,61 +781,69 @@ static int acpi_pci_link_add(struct acpi_device *device) end: /* disable all links -- to be activated on use */ - acpi_ut_evaluate_object(device->handle, "_DIS", 0, NULL); - mutex_unlock(&acpi_link_lock); + acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); + up(&acpi_link_lock); if (result) kfree(link); - return result; + return_VALUE(result); } static int acpi_pci_link_resume(struct acpi_pci_link *link) { + ACPI_FUNCTION_TRACE("acpi_pci_link_resume"); if (link->refcnt && link->irq.active && link->irq.initialized) - return (acpi_pci_link_set(link, link->irq.active)); + return_VALUE(acpi_pci_link_set(link, link->irq.active)); else - return 0; + return_VALUE(0); } +/* + * FIXME: this is a workaround to avoid nasty warning. It will be removed + * after every device calls pci_disable_device in .resume. + */ +int acpi_in_resume; static int irqrouter_resume(struct sys_device *dev) { struct list_head *node = NULL; struct acpi_pci_link *link = NULL; + ACPI_FUNCTION_TRACE("irqrouter_resume"); - /* Make sure SCI is enabled again (Apple firmware bug?) */ - acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK); - + acpi_in_resume = 1; list_for_each(node, &acpi_link.entries) { link = list_entry(node, struct acpi_pci_link, node); if (!link) { - printk(KERN_ERR PREFIX "Invalid link context\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid link context\n")); continue; } acpi_pci_link_resume(link); } - return 0; + acpi_in_resume = 0; + return_VALUE(0); } static int acpi_pci_link_remove(struct acpi_device *device, int type) { struct acpi_pci_link *link = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_link_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); link = (struct acpi_pci_link *)acpi_driver_data(device); - mutex_lock(&acpi_link_lock); + down(&acpi_link_lock); list_del(&link->node); - mutex_unlock(&acpi_link_lock); + up(&acpi_link_lock); kfree(link); - return 0; + return_VALUE(0); } /* @@ -922,32 +949,34 @@ static int __init irqrouter_init_sysfs(void) { int error; + ACPI_FUNCTION_TRACE("irqrouter_init_sysfs"); if (acpi_disabled || acpi_noirq) - return 0; + return_VALUE(0); error = sysdev_class_register(&irqrouter_sysdev_class); if (!error) error = sysdev_register(&device_irqrouter); - return error; + return_VALUE(error); } device_initcall(irqrouter_init_sysfs); static int __init acpi_pci_link_init(void) { + ACPI_FUNCTION_TRACE("acpi_pci_link_init"); if (acpi_noirq) - return 0; + return_VALUE(0); acpi_link.count = 0; INIT_LIST_HEAD(&acpi_link.entries); if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } subsys_initcall(acpi_pci_link_init); diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0984a1ee2..4c313eab6 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -58,7 +58,7 @@ static struct acpi_driver acpi_pci_root_driver = { struct acpi_pci_root { struct list_head node; - struct acpi_device * device; + acpi_handle handle; struct acpi_pci_id id; struct pci_bus *bus; }; @@ -83,7 +83,7 @@ int acpi_pci_register_driver(struct acpi_pci_driver *driver) list_for_each(entry, &acpi_pci_roots) { struct acpi_pci_root *root; root = list_entry(entry, struct acpi_pci_root, node); - driver->add(root->device->handle); + driver->add(root->handle); n++; } @@ -110,7 +110,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver) list_for_each(entry, &acpi_pci_roots) { struct acpi_pci_root *root; root = list_entry(entry, struct acpi_pci_root, node); - driver->remove(root->device->handle); + driver->remove(root->handle); } } @@ -160,17 +160,18 @@ static int acpi_pci_root_add(struct acpi_device *device) unsigned long value = 0; acpi_handle handle = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_root_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); root = kmalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); if (!root) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(root, 0, sizeof(struct acpi_pci_root)); INIT_LIST_HEAD(&root->node); - root->device = device; + root->handle = device->handle; strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS); acpi_driver_data(device) = root; @@ -185,7 +186,7 @@ static int acpi_pci_root_add(struct acpi_device *device) * ------- * Obtained via _SEG, if exists, otherwise assumed to be zero (0). */ - status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL, + status = acpi_evaluate_integer(root->handle, METHOD_NAME__SEG, NULL, &value); switch (status) { case AE_OK: @@ -197,7 +198,7 @@ static int acpi_pci_root_add(struct acpi_device *device) root->id.segment = 0; break; default: - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SEG")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SEG\n")); result = -ENODEV; goto end; } @@ -207,7 +208,7 @@ static int acpi_pci_root_add(struct acpi_device *device) * --- * Obtained via _BBN, if exists, otherwise assumed to be zero (0). */ - status = acpi_evaluate_integer(device->handle, METHOD_NAME__BBN, NULL, + status = acpi_evaluate_integer(root->handle, METHOD_NAME__BBN, NULL, &value); switch (status) { case AE_OK: @@ -218,7 +219,7 @@ static int acpi_pci_root_add(struct acpi_device *device) root->id.bus = 0; break; default: - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BBN")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BBN\n")); result = -ENODEV; goto end; } @@ -230,11 +231,10 @@ static int acpi_pci_root_add(struct acpi_device *device) int bus = 0; acpi_status status; - printk(KERN_ERR PREFIX - "Wrong _BBN value, reboot" - " and use option 'pci=noacpi'\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Wrong _BBN value, please reboot and using option 'pci=noacpi'\n")); - status = try_get_root_bridge_busnr(device->handle, &bus); + status = try_get_root_bridge_busnr(root->handle, &bus); if (ACPI_FAILURE(status)) break; if (bus != root->id.bus) { @@ -273,9 +273,9 @@ static int acpi_pci_root_add(struct acpi_device *device) */ root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus); if (!root->bus) { - printk(KERN_ERR PREFIX - "Bus %04x:%02x not present in PCI namespace\n", - root->id.segment, root->id.bus); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Bus %04x:%02x not present in PCI namespace\n", + root->id.segment, root->id.bus)); result = -ENODEV; goto end; } @@ -294,9 +294,9 @@ static int acpi_pci_root_add(struct acpi_device *device) * ----------------- * Evaluate and parse _PRT, if exists. */ - status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle); + status = acpi_get_handle(root->handle, METHOD_NAME__PRT, &handle); if (ACPI_SUCCESS(status)) - result = acpi_pci_irq_add_prt(device->handle, root->id.segment, + result = acpi_pci_irq_add_prt(root->handle, root->id.segment, root->id.bus); end: @@ -306,43 +306,46 @@ static int acpi_pci_root_add(struct acpi_device *device) kfree(root); } - return result; + return_VALUE(result); } static int acpi_pci_root_start(struct acpi_device *device) { struct acpi_pci_root *root; + ACPI_FUNCTION_TRACE("acpi_pci_root_start"); list_for_each_entry(root, &acpi_pci_roots, node) { - if (root->device == device) { + if (root->handle == device->handle) { pci_bus_add_devices(root->bus); - return 0; + return_VALUE(0); } } - return -ENODEV; + return_VALUE(-ENODEV); } static int acpi_pci_root_remove(struct acpi_device *device, int type) { struct acpi_pci_root *root = NULL; + ACPI_FUNCTION_TRACE("acpi_pci_root_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); root = (struct acpi_pci_root *)acpi_driver_data(device); kfree(root); - return 0; + return_VALUE(0); } static int __init acpi_pci_root_init(void) { + ACPI_FUNCTION_TRACE("acpi_pci_root_init"); if (acpi_pci_disabled) - return 0; + return_VALUE(0); /* DEBUG: acpi_dbg_layer = ACPI_PCI_COMPONENT; @@ -350,9 +353,9 @@ static int __init acpi_pci_root_init(void) */ if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } subsys_initcall(acpi_pci_root_init); diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index fec225d1b..62a5595ed 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -70,7 +70,7 @@ static struct acpi_driver acpi_power_driver = { }; struct acpi_power_resource { - struct acpi_device * device; + acpi_handle handle; acpi_bus_id name; u32 system_level; u32 order; @@ -80,7 +80,7 @@ struct acpi_power_resource { static struct list_head acpi_power_resource_list; -static const struct file_operations acpi_power_fops = { +static struct file_operations acpi_power_fops = { .open = acpi_power_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -98,21 +98,23 @@ acpi_power_get_context(acpi_handle handle, int result = 0; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_power_get_context"); if (!resource) - return -ENODEV; + return_VALUE(-ENODEV); result = acpi_bus_get_device(handle, &device); if (result) { - printk(KERN_WARNING PREFIX "Getting context [%p]\n", handle); - return result; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error getting context [%p]\n", + handle)); + return_VALUE(result); } *resource = (struct acpi_power_resource *)acpi_driver_data(device); if (!resource) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } static int acpi_power_get_state(struct acpi_power_resource *resource) @@ -120,13 +122,14 @@ static int acpi_power_get_state(struct acpi_power_resource *resource) acpi_status status = AE_OK; unsigned long sta = 0; + ACPI_FUNCTION_TRACE("acpi_power_get_state"); if (!resource) - return -EINVAL; + return_VALUE(-EINVAL); - status = acpi_evaluate_integer(resource->device->handle, "_STA", NULL, &sta); + status = acpi_evaluate_integer(resource->handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); if (sta & 0x01) resource->state = ACPI_POWER_RESOURCE_STATE_ON; @@ -136,7 +139,7 @@ static int acpi_power_get_state(struct acpi_power_resource *resource) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n", resource->name, resource->state ? "on" : "off")); - return 0; + return_VALUE(0); } static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) @@ -145,19 +148,20 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) struct acpi_power_resource *resource = NULL; u32 i = 0; + ACPI_FUNCTION_TRACE("acpi_power_get_list_state"); if (!list || !state) - return -EINVAL; + return_VALUE(-EINVAL); /* The state of the list is 'on' IFF all resources are 'on'. */ for (i = 0; i < list->count; i++) { result = acpi_power_get_context(list->handles[i], &resource); if (result) - return result; + return_VALUE(result); result = acpi_power_get_state(resource); if (result) - return result; + return_VALUE(result); *state = resource->state; @@ -168,7 +172,7 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource list is %s\n", *state ? "on" : "off")); - return result; + return_VALUE(result); } static int acpi_power_on(acpi_handle handle) @@ -178,10 +182,11 @@ static int acpi_power_on(acpi_handle handle) struct acpi_device *device = NULL; struct acpi_power_resource *resource = NULL; + ACPI_FUNCTION_TRACE("acpi_power_on"); result = acpi_power_get_context(handle, &resource); if (result) - return result; + return_VALUE(result); resource->references++; @@ -189,27 +194,29 @@ static int acpi_power_on(acpi_handle handle) || (resource->state == ACPI_POWER_RESOURCE_STATE_ON)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already on\n", resource->name)); - return 0; + return_VALUE(0); } - status = acpi_evaluate_object(resource->device->handle, "_ON", NULL, NULL); + status = acpi_evaluate_object(resource->handle, "_ON", NULL, NULL); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); result = acpi_power_get_state(resource); if (result) - return result; + return_VALUE(result); if (resource->state != ACPI_POWER_RESOURCE_STATE_ON) - return -ENOEXEC; + return_VALUE(-ENOEXEC); /* Update the power resource's _device_ power state */ - device = resource->device; - resource->device->power.state = ACPI_STATE_D0; + result = acpi_bus_get_device(resource->handle, &device); + if (result) + return_VALUE(result); + device->power.state = ACPI_STATE_D0; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned on\n", resource->name)); - return 0; + return_VALUE(0); } static int acpi_power_off_device(acpi_handle handle) @@ -219,10 +226,11 @@ static int acpi_power_off_device(acpi_handle handle) struct acpi_device *device = NULL; struct acpi_power_resource *resource = NULL; + ACPI_FUNCTION_TRACE("acpi_power_off_device"); result = acpi_power_get_context(handle, &resource); if (result) - return result; + return_VALUE(result); if (resource->references) resource->references--; @@ -231,33 +239,35 @@ static int acpi_power_off_device(acpi_handle handle) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is still in use, dereferencing\n", device->pnp.bus_id)); - return 0; + return_VALUE(0); } if (resource->state == ACPI_POWER_RESOURCE_STATE_OFF) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already off\n", device->pnp.bus_id)); - return 0; + return_VALUE(0); } - status = acpi_evaluate_object(resource->device->handle, "_OFF", NULL, NULL); + status = acpi_evaluate_object(resource->handle, "_OFF", NULL, NULL); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); result = acpi_power_get_state(resource); if (result) - return result; + return_VALUE(result); if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF) - return -ENOEXEC; + return_VALUE(-ENOEXEC); /* Update the power resource's _device_ power state */ - device = resource->device; + result = acpi_bus_get_device(resource->handle, &device); + if (result) + return_VALUE(result); device->power.state = ACPI_STATE_D3; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned off\n", resource->name)); - return 0; + return_VALUE(0); } /* @@ -273,29 +283,31 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev) int i; int ret = 0; + ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_power"); if (!dev || !dev->wakeup.flags.valid) - return -1; + return_VALUE(-1); arg.integer.value = 1; /* Open power resource */ for (i = 0; i < dev->wakeup.resources.count; i++) { ret = acpi_power_on(dev->wakeup.resources.handles[i]); if (ret) { - printk(KERN_ERR PREFIX "Transition power state\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error transition power state\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } } /* Execute PSW */ status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { - printk(KERN_ERR PREFIX "Evaluate _PSW\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); dev->wakeup.flags.valid = 0; ret = -1; } - return ret; + return_VALUE(ret); } /* @@ -311,30 +323,32 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev) int i; int ret = 0; + ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device_power"); if (!dev || !dev->wakeup.flags.valid) - return -1; + return_VALUE(-1); arg.integer.value = 0; /* Execute PSW */ status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { - printk(KERN_ERR PREFIX "Evaluate _PSW\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } /* Close power resource */ for (i = 0; i < dev->wakeup.resources.count; i++) { ret = acpi_power_off_device(dev->wakeup.resources.handles[i]); if (ret) { - printk(KERN_ERR PREFIX "Transition power state\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error transition power state\n")); dev->wakeup.flags.valid = 0; - return -1; + return_VALUE(-1); } } - return ret; + return_VALUE(ret); } /* -------------------------------------------------------------------------- @@ -348,9 +362,10 @@ int acpi_power_get_inferred_state(struct acpi_device *device) int list_state = 0; int i = 0; + ACPI_FUNCTION_TRACE("acpi_power_get_inferred_state"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); device->power.state = ACPI_STATE_UNKNOWN; @@ -365,17 +380,17 @@ int acpi_power_get_inferred_state(struct acpi_device *device) result = acpi_power_get_list_state(list, &list_state); if (result) - return result; + return_VALUE(result); if (list_state == ACPI_POWER_RESOURCE_STATE_ON) { device->power.state = i; - return 0; + return_VALUE(0); } } device->power.state = ACPI_STATE_D3; - return 0; + return_VALUE(0); } int acpi_power_transition(struct acpi_device *device, int state) @@ -385,13 +400,14 @@ int acpi_power_transition(struct acpi_device *device, int state) struct acpi_handle_list *tl = NULL; /* Target Resources */ int i = 0; + ACPI_FUNCTION_TRACE("acpi_power_transition"); if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) - return -EINVAL; + return_VALUE(-EINVAL); if ((device->power.state < ACPI_STATE_D0) || (device->power.state > ACPI_STATE_D3)) - return -ENODEV; + return_VALUE(-ENODEV); cl = &device->power.states[device->power.state].resources; tl = &device->power.states[state].resources; @@ -428,10 +444,11 @@ int acpi_power_transition(struct acpi_device *device, int state) device->power.state = state; end: if (result) - printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n", - device->pnp.bus_id, state); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Error transitioning device [%s] to D%d\n", + device->pnp.bus_id, state)); - return result; + return_VALUE(result); } /* -------------------------------------------------------------------------- @@ -444,6 +461,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset) { struct acpi_power_resource *resource = NULL; + ACPI_FUNCTION_TRACE("acpi_power_seq_show"); resource = (struct acpi_power_resource *)seq->private; @@ -470,7 +488,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset) resource->order, resource->references); end: - return 0; + return_VALUE(0); } static int acpi_power_open_fs(struct inode *inode, struct file *file) @@ -482,32 +500,36 @@ static int acpi_power_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_power_add_fs"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_power_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); } /* 'status' [R] */ entry = create_proc_entry(ACPI_POWER_FILE_STATUS, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -EIO; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_POWER_FILE_STATUS)); else { entry->proc_fops = &acpi_power_fops; entry->data = acpi_driver_data(device); } - return 0; + return_VALUE(0); } static int acpi_power_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_power_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_POWER_FILE_STATUS, @@ -516,7 +538,7 @@ static int acpi_power_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -531,23 +553,24 @@ static int acpi_power_add(struct acpi_device *device) union acpi_object acpi_object; struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object }; + ACPI_FUNCTION_TRACE("acpi_power_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); resource = kmalloc(sizeof(struct acpi_power_resource), GFP_KERNEL); if (!resource) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(resource, 0, sizeof(struct acpi_power_resource)); - resource->device = device; + resource->handle = device->handle; strcpy(resource->name, device->pnp.bus_id); strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_POWER_CLASS); acpi_driver_data(device) = resource; /* Evalute the object to get the system level and resource order. */ - status = acpi_evaluate_object(device->handle, NULL, NULL, &buffer); + status = acpi_evaluate_object(resource->handle, NULL, NULL, &buffer); if (ACPI_FAILURE(status)) { result = -ENODEV; goto end; @@ -582,16 +605,17 @@ static int acpi_power_add(struct acpi_device *device) if (result) kfree(resource); - return result; + return_VALUE(result); } static int acpi_power_remove(struct acpi_device *device, int type) { struct acpi_power_resource *resource = NULL; + ACPI_FUNCTION_TRACE("acpi_power_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); resource = (struct acpi_power_resource *)acpi_driver_data(device); @@ -599,30 +623,31 @@ static int acpi_power_remove(struct acpi_device *device, int type) kfree(resource); - return 0; + return_VALUE(0); } static int __init acpi_power_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_power_init"); if (acpi_disabled) - return 0; + return_VALUE(0); INIT_LIST_HEAD(&acpi_power_resource_list); acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir); if (!acpi_power_dir) - return -ENODEV; + return_VALUE(-ENODEV); result = acpi_bus_register_driver(&acpi_power_driver); if (result < 0) { remove_proc_entry(ACPI_POWER_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } subsys_initcall(acpi_power_init); diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index b13d64415..e5041c4f3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -102,7 +102,7 @@ static struct acpi_driver acpi_processor_driver = { #define INSTALL_NOTIFY_HANDLER 1 #define UNINSTALL_NOTIFY_HANDLER 2 -static const struct file_operations acpi_processor_info_fops = { +static struct file_operations acpi_processor_info_fops = { .open = acpi_processor_info_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -110,7 +110,7 @@ static const struct file_operations acpi_processor_info_fops = { }; struct acpi_processor *processors[NR_CPUS]; -struct acpi_processor_errata errata __read_mostly; +struct acpi_processor_errata errata; /* -------------------------------------------------------------------------- Errata Handling @@ -122,9 +122,10 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) u8 value1 = 0; u8 value2 = 0; + ACPI_FUNCTION_TRACE("acpi_processor_errata_piix4"); if (!dev) - return -EINVAL; + return_VALUE(-EINVAL); /* * Note that 'dev' references the PIIX4 ACPI Controller. @@ -217,7 +218,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Type-F DMA livelock erratum (C3 disabled)\n")); - return 0; + return_VALUE(0); } static int acpi_processor_errata(struct acpi_processor *pr) @@ -225,9 +226,10 @@ static int acpi_processor_errata(struct acpi_processor *pr) int result = 0; struct pci_dev *dev = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_errata"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); /* * PIIX4 @@ -240,7 +242,7 @@ static int acpi_processor_errata(struct acpi_processor *pr) pci_dev_put(dev); } - return result; + return_VALUE(result); } /* -------------------------------------------------------------------------- @@ -256,9 +258,10 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr) struct acpi_object_list *pdc_in = pr->pdc; acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_processor_set_pdc"); if (!pdc_in) - return status; + return_VALUE(status); status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL); @@ -266,7 +269,7 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Could not evaluate _PDC, using legacy perf. control...\n")); - return status; + return_VALUE(status); } /* -------------------------------------------------------------------------- @@ -279,6 +282,7 @@ static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset) { struct acpi_processor *pr = (struct acpi_processor *)seq->private; + ACPI_FUNCTION_TRACE("acpi_processor_info_seq_show"); if (!pr) goto end; @@ -297,7 +301,7 @@ static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset) pr->flags.limit ? "yes" : "no"); end: - return 0; + return_VALUE(0); } static int acpi_processor_info_open_fs(struct inode *inode, struct file *file) @@ -310,12 +314,13 @@ static int acpi_processor_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_add_fs"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_processor_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); } acpi_device_dir(device)->owner = THIS_MODULE; @@ -323,7 +328,9 @@ static int acpi_processor_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -EIO; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_PROCESSOR_FILE_INFO)); else { entry->proc_fops = &acpi_processor_info_fops; entry->data = acpi_driver_data(device); @@ -335,7 +342,9 @@ static int acpi_processor_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -EIO; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_PROCESSOR_FILE_THROTTLING)); else { entry->proc_fops = &acpi_processor_throttling_fops; entry->data = acpi_driver_data(device); @@ -347,18 +356,21 @@ static int acpi_processor_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -EIO; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_PROCESSOR_FILE_LIMIT)); else { entry->proc_fops = &acpi_processor_limit_fops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_processor_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_processor_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_PROCESSOR_FILE_INFO, @@ -371,7 +383,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* Use the acpiid in MADT to map cpus in case of SMP */ @@ -418,9 +430,10 @@ static int acpi_processor_get_info(struct acpi_processor *pr) int cpu_index; static int cpu0_initialized; + ACPI_FUNCTION_TRACE("acpi_processor_get_info"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (num_online_cpus() > 1) errata.smp = TRUE; @@ -446,8 +459,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr) */ status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); if (ACPI_FAILURE(status)) { - printk(KERN_ERR PREFIX "Evaluating processor object\n"); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error evaluating processor object\n")); + return_VALUE(-ENODEV); } /* @@ -476,10 +490,10 @@ static int acpi_processor_get_info(struct acpi_processor *pr) if (cpu_index == -1) { if (ACPI_FAILURE (acpi_processor_hotadd_init(pr->handle, &pr->id))) { - printk(KERN_ERR PREFIX - "Getting cpuindex for acpiid 0x%x\n", - pr->acpi_id); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error getting cpuindex for acpiid 0x%x\n", + pr->acpi_id)); + return_VALUE(-ENODEV); } } @@ -489,8 +503,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr) if (!object.processor.pblk_address) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); else if (object.processor.pblk_length != 6) - printk(KERN_ERR PREFIX "Invalid PBLK length [%d]\n", - object.processor.pblk_length); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n", + object.processor.pblk_length)); else { pr->throttling.address = object.processor.pblk_address; pr->throttling.duty_offset = acpi_fadt.duty_offset; @@ -514,7 +528,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) acpi_processor_get_throttling_info(pr); acpi_processor_get_limit_info(pr); - return 0; + return_VALUE(0); } static void *processor_device_array[NR_CPUS]; @@ -525,13 +539,14 @@ static int acpi_processor_start(struct acpi_device *device) acpi_status status = AE_OK; struct acpi_processor *pr; + ACPI_FUNCTION_TRACE("acpi_processor_start"); pr = acpi_driver_data(device); result = acpi_processor_get_info(pr); if (result) { /* Processor is physically not present */ - return 0; + return_VALUE(0); } BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); @@ -543,9 +558,9 @@ static int acpi_processor_start(struct acpi_device *device) */ if (processor_device_array[pr->id] != NULL && processor_device_array[pr->id] != (void *)device) { - printk(KERN_WARNING "BIOS reported wrong ACPI id" - "for the processor\n"); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "BIOS reporting wrong ACPI id" + "for the processor\n")); + return_VALUE(-ENODEV); } processor_device_array[pr->id] = (void *)device; @@ -557,6 +572,10 @@ static int acpi_processor_start(struct acpi_device *device) status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, acpi_processor_notify, pr); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing device notify handler\n")); + } /* _PDC call should be done before doing anything else (if reqd.). */ arch_acpi_processor_init_pdc(pr); @@ -573,7 +592,7 @@ static int acpi_processor_start(struct acpi_device *device) end: - return result; + return_VALUE(result); } static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) @@ -581,12 +600,13 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) struct acpi_processor *pr = (struct acpi_processor *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_notify"); if (!pr) - return; + return_VOID; if (acpi_bus_get_device(pr->handle, &device)) - return; + return_VOID; switch (event) { case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: @@ -604,20 +624,21 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static int acpi_processor_add(struct acpi_device *device) { struct acpi_processor *pr = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL); if (!pr) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(pr, 0, sizeof(struct acpi_processor)); pr->handle = device->handle; @@ -625,7 +646,7 @@ static int acpi_processor_add(struct acpi_device *device) strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); acpi_driver_data(device) = pr; - return 0; + return_VALUE(0); } static int acpi_processor_remove(struct acpi_device *device, int type) @@ -633,26 +654,31 @@ static int acpi_processor_remove(struct acpi_device *device, int type) acpi_status status = AE_OK; struct acpi_processor *pr = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); pr = (struct acpi_processor *)acpi_driver_data(device); if (pr->id >= NR_CPUS) { kfree(pr); - return 0; + return_VALUE(0); } if (type == ACPI_BUS_REMOVAL_EJECT) { if (acpi_processor_handle_eject(pr)) - return -EINVAL; + return_VALUE(-EINVAL); } acpi_processor_power_exit(pr, device); status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, acpi_processor_notify); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); + } acpi_processor_remove_fs(device); @@ -660,7 +686,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) kfree(pr); - return 0; + return_VALUE(0); } #ifdef CONFIG_ACPI_HOTPLUG_CPU @@ -675,13 +701,15 @@ static int is_processor_present(acpi_handle handle) acpi_status status; unsigned long sta = 0; + ACPI_FUNCTION_TRACE("is_processor_present"); status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { - ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); - return 0; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Processor Device is not present\n")); + return_VALUE(0); } - return 1; + return_VALUE(1); } static @@ -691,29 +719,30 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) struct acpi_device *pdev; struct acpi_processor *pr; + ACPI_FUNCTION_TRACE("acpi_processor_device_add"); if (acpi_get_parent(handle, &phandle)) { - return -ENODEV; + return_VALUE(-ENODEV); } if (acpi_bus_get_device(phandle, &pdev)) { - return -ENODEV; + return_VALUE(-ENODEV); } if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) { - return -ENODEV; + return_VALUE(-ENODEV); } acpi_bus_start(*device); pr = acpi_driver_data(*device); if (!pr) - return -ENODEV; + return_VALUE(-ENODEV); if ((pr->id >= 0) && (pr->id < NR_CPUS)) { kobject_uevent(&(*device)->kobj, KOBJ_ONLINE); } - return 0; + return_VALUE(0); } static void @@ -723,6 +752,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) struct acpi_device *device = NULL; int result; + ACPI_FUNCTION_TRACE("acpi_processor_hotplug_notify"); switch (event) { case ACPI_NOTIFY_BUS_CHECK: @@ -737,14 +767,15 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) if (acpi_bus_get_device(handle, &device)) { result = acpi_processor_device_add(handle, &device); if (result) - printk(KERN_ERR PREFIX - "Unable to add the device\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to add the device\n")); break; } pr = acpi_driver_data(device); if (!pr) { - printk(KERN_ERR PREFIX "Driver data is NULL\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Driver data is NULL\n")); break; } @@ -757,8 +788,9 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { kobject_uevent(&device->kobj, KOBJ_ONLINE); } else { - printk(KERN_ERR PREFIX "Device [%s] failed to start\n", - acpi_device_bid(device)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device [%s] failed to start\n", + acpi_device_bid(device))); } break; case ACPI_NOTIFY_EJECT_REQUEST: @@ -766,15 +798,15 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) "received ACPI_NOTIFY_EJECT_REQUEST\n")); if (acpi_bus_get_device(handle, &device)) { - printk(KERN_ERR PREFIX - "Device don't exist, dropping EJECT\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device don't exist, dropping EJECT\n")); break; } pr = acpi_driver_data(device); if (!pr) { - printk(KERN_ERR PREFIX - "Driver data is NULL, dropping EJECT\n"); - return; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Driver data is NULL, dropping EJECT\n")); + return_VOID; } if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) @@ -786,7 +818,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static acpi_status @@ -825,20 +857,21 @@ processor_walk_namespace_cb(acpi_handle handle, static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) { + ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init"); if (!is_processor_present(handle)) { - return AE_ERROR; + return_VALUE(AE_ERROR); } if (acpi_map_lsapic(handle, p_cpu)) - return AE_ERROR; + return_VALUE(AE_ERROR); if (arch_register_cpu(*p_cpu)) { acpi_unmap_lsapic(*p_cpu); - return AE_ERROR; + return_VALUE(AE_ERROR); } - return AE_OK; + return_VALUE(AE_OK); } static int acpi_processor_handle_eject(struct acpi_processor *pr) @@ -895,19 +928,20 @@ static int __init acpi_processor_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_processor_init"); memset(&processors, 0, sizeof(processors)); memset(&errata, 0, sizeof(errata)); acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); if (!acpi_processor_dir) - return 0; + return_VALUE(0); acpi_processor_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_processor_driver); if (result < 0) { remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); - return 0; + return_VALUE(0); } acpi_processor_install_hotplug_notify(); @@ -916,11 +950,12 @@ static int __init acpi_processor_init(void) acpi_processor_ppc_init(); - return 0; + return_VALUE(0); } static void __exit acpi_processor_exit(void) { + ACPI_FUNCTION_TRACE("acpi_processor_exit"); acpi_processor_ppc_exit(); @@ -932,7 +967,7 @@ static void __exit acpi_processor_exit(void) remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_processor_init); diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 71066066d..80fa43471 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -3,7 +3,7 @@ * * Copyright (C) 2001, 2002 Andy Grover * Copyright (C) 2001, 2002 Paul Diefenbaugh - * Copyright (C) 2004, 2005 Dominik Brodowski + * Copyright (C) 2004 Dominik Brodowski * Copyright (C) 2004 Anil S Keshavamurthy * - Added processor hotplug support * Copyright (C) 2005 Venkatesh Pallipadi @@ -54,10 +54,10 @@ ACPI_MODULE_NAME("acpi_processor") #define US_TO_PM_TIMER_TICKS(t) ((t * (PM_TIMER_FREQUENCY/1000)) / 1000) #define C2_OVERHEAD 4 /* 1us (3.579 ticks per us) */ #define C3_OVERHEAD 4 /* 1us (3.579 ticks per us) */ -static void (*pm_idle_save) (void) __read_mostly; +static void (*pm_idle_save) (void); module_param(max_cstate, uint, 0644); -static unsigned int nocst __read_mostly; +static unsigned int nocst = 0; module_param(nocst, uint, 0000); /* @@ -67,7 +67,7 @@ module_param(nocst, uint, 0000); * 100 HZ: 0x0000000F: 4 jiffies = 40ms * reduce history for more aggressive entry into C3 */ -static unsigned int bm_history __read_mostly = +static unsigned int bm_history = (HZ >= 800 ? 0xFFFFFFFF : ((1U << (HZ / 25)) - 1)); module_param(bm_history, uint, 0644); /* -------------------------------------------------------------------------- @@ -97,9 +97,6 @@ static int set_max_cstate(struct dmi_system_id *id) /* Actually this shouldn't be __cpuinitdata, would be better to fix the callers to only run once -AK */ static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = { - { set_max_cstate, "IBM ThinkPad R40e", { - DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), - DMI_MATCH(DMI_BIOS_VERSION,"1SET70WW")}, (void *)1}, { set_max_cstate, "IBM ThinkPad R40e", { DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1}, @@ -209,11 +206,11 @@ acpi_processor_power_activate(struct acpi_processor *pr, static void acpi_safe_halt(void) { - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); if (!need_resched()) safe_halt(); - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); } static atomic_t c3_cpu_count; @@ -264,15 +261,21 @@ static void acpi_processor_idle(void) u32 bm_status = 0; unsigned long diff = jiffies - pr->power.bm_check_timestamp; - if (diff > 31) - diff = 31; + if (diff > 32) + diff = 32; - pr->power.bm_activity <<= diff; + while (diff) { + /* if we didn't get called, assume there was busmaster activity */ + diff--; + if (diff) + pr->power.bm_activity |= 0x1; + pr->power.bm_activity <<= 1; + } acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status, ACPI_MTX_DO_NOT_LOCK); if (bm_status) { - pr->power.bm_activity |= 0x1; + pr->power.bm_activity++; acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1, ACPI_MTX_DO_NOT_LOCK); } @@ -284,16 +287,16 @@ static void acpi_processor_idle(void) else if (errata.piix4.bmisx) { if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01) || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01)) - pr->power.bm_activity |= 0x1; + pr->power.bm_activity++; } pr->power.bm_check_timestamp = jiffies; /* - * If bus mastering is or was active this jiffy, demote + * Apply bus mastering demotion policy. Automatically demote * to avoid a faulty transition. Note that the processor * won't enter a low-power state during this call (to this - * function) but should upon the next. + * funciton) but should upon the next. * * TBD: A better policy might be to fallback to the demotion * state (use it for this quantum only) istead of @@ -301,8 +304,7 @@ static void acpi_processor_idle(void) * qualification. This may, however, introduce DMA * issues (e.g. floppy DMA transfer overrun/underrun). */ - if ((pr->power.bm_activity & 0x1) && - cx->demotion.threshold.bm) { + if (pr->power.bm_activity & cx->demotion.threshold.bm) { local_irq_enable(); next_state = cx->demotion.state; goto end; @@ -320,16 +322,18 @@ static void acpi_processor_idle(void) cx = &pr->power.states[ACPI_STATE_C1]; #endif + cx->usage++; + /* * Sleep: * ------ * Invoke the current Cx state to put the processor to sleep. */ if (cx->type == ACPI_STATE_C2 || cx->type == ACPI_STATE_C3) { - current_thread_info()->status &= ~TS_POLLING; + clear_thread_flag(TIF_POLLING_NRFLAG); smp_mb__after_clear_bit(); if (need_resched()) { - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); local_irq_enable(); return; } @@ -361,20 +365,13 @@ static void acpi_processor_idle(void) t1 = inl(acpi_fadt.xpm_tmr_blk.address); /* Invoke C2 */ inb(cx->address); - /* Dummy wait op - must do something useless after P_LVL2 read - because chipsets cannot guarantee that STPCLK# signal - gets asserted in time to freeze execution properly. */ + /* Dummy op - must do something useless after P_LVL2 read */ t2 = inl(acpi_fadt.xpm_tmr_blk.address); /* Get end time (ticks) */ t2 = inl(acpi_fadt.xpm_tmr_blk.address); - -#ifdef CONFIG_GENERIC_TIME - /* TSC halts in C2, so notify users */ - mark_tsc_unstable(); -#endif /* Re-enable interrupts */ local_irq_enable(); - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C2_OVERHEAD; @@ -401,7 +398,7 @@ static void acpi_processor_idle(void) t1 = inl(acpi_fadt.xpm_tmr_blk.address); /* Invoke C3 */ inb(cx->address); - /* Dummy wait op (see above) */ + /* Dummy op - must do something useless after P_LVL3 read */ t2 = inl(acpi_fadt.xpm_tmr_blk.address); /* Get end time (ticks) */ t2 = inl(acpi_fadt.xpm_tmr_blk.address); @@ -412,13 +409,9 @@ static void acpi_processor_idle(void) ACPI_MTX_DO_NOT_LOCK); } -#ifdef CONFIG_GENERIC_TIME - /* TSC halts in C3, so notify users */ - mark_tsc_unstable(); -#endif /* Re-enable interrupts */ local_irq_enable(); - current_thread_info()->status |= TS_POLLING; + set_thread_flag(TIF_POLLING_NRFLAG); /* Compute time (ticks) that we were actually asleep */ sleep_ticks = ticks_elapsed(t1, t2) - cx->latency_ticks - C3_OVERHEAD; @@ -428,9 +421,6 @@ static void acpi_processor_idle(void) local_irq_enable(); return; } - cx->usage++; - if ((cx->type != ACPI_STATE_C1) && (sleep_ticks > 0)) - cx->time += sleep_ticks; next_state = pr->power.state; @@ -518,9 +508,10 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr) struct acpi_processor_cx *higher = NULL; struct acpi_processor_cx *cx; + ACPI_FUNCTION_TRACE("acpi_processor_set_power_policy"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); /* * This function sets the default Cx state policy (OS idle handler). @@ -544,7 +535,7 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr) } if (!state_is_set) - return -ENODEV; + return_VALUE(-ENODEV); /* demotion */ for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { @@ -583,17 +574,18 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr) higher = cx; } - return 0; + return_VALUE(0); } static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) { + ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (!pr->pblk) - return -ENODEV; + return_VALUE(-ENODEV); /* if info is obtained from pblk/fadt, type equals state */ pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2; @@ -605,7 +597,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) * an SMP system. */ if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) - return -ENODEV; + return_VALUE(-ENODEV); #endif /* determine C2 and C3 address from pblk */ @@ -621,11 +613,12 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) pr->power.states[ACPI_STATE_C2].address, pr->power.states[ACPI_STATE_C3].address)); - return 0; + return_VALUE(0); } static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr) { + ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); /* Zero initialize all the C-states info. */ memset(pr->power.states, 0, sizeof(pr->power.states)); @@ -638,7 +631,7 @@ static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr) pr->power.states[ACPI_STATE_C0].valid = 1; pr->power.states[ACPI_STATE_C1].valid = 1; - return 0; + return_VALUE(0); } static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) @@ -650,9 +643,10 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *cst; + ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_cst"); if (nocst) - return -ENODEV; + return_VALUE(-ENODEV); current_count = 1; @@ -664,14 +658,15 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _CST, giving up\n")); - return -ENODEV; + return_VALUE(-ENODEV); } cst = (union acpi_object *)buffer.pointer; /* There must be at least 2 elements */ if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { - printk(KERN_ERR PREFIX "not enough elements in _CST\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "not enough elements in _CST\n")); status = -EFAULT; goto end; } @@ -680,7 +675,8 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) /* Validate number of power states. */ if (count < 1 || count != cst->package.count - 1) { - printk(KERN_ERR PREFIX "count given by _CST is not valid\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "count given by _CST is not valid\n")); status = -EFAULT; goto end; } @@ -768,16 +764,17 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) status = -EFAULT; end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return status; + return_VALUE(status); } static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) { + ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c2"); if (!cx->address) - return; + return_VOID; /* * C2 latency must be less than or equal to 100 @@ -786,7 +783,7 @@ static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "latency too large [%d]\n", cx->latency)); - return; + return_VOID; } /* @@ -796,7 +793,7 @@ static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) cx->valid = 1; cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); - return; + return_VOID; } static void acpi_processor_power_verify_c3(struct acpi_processor *pr, @@ -804,9 +801,10 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, { static int bm_check_flag; + ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c3"); if (!cx->address) - return; + return_VOID; /* * C3 latency must be less than or equal to 1000 @@ -815,7 +813,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "latency too large [%d]\n", cx->latency)); - return; + return_VOID; } /* @@ -828,7 +826,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, else if (errata.piix4.fdma) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C3 not supported on PIIX4 with Type-F DMA\n")); - return; + return_VOID; } /* All the logic here assumes flags.bm_check is same across all CPUs */ @@ -845,7 +843,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, if (!pr->flags.bm_control) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C3 support requires bus mastering control\n")); - return; + return_VOID; } } else { /* @@ -856,7 +854,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cache invalidation should work properly" " for C3 to be enabled on SMP systems\n")); - return; + return_VOID; } acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, ACPI_MTX_DO_NOT_LOCK); @@ -871,7 +869,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, cx->valid = 1; cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); - return; + return_VOID; } static int acpi_processor_power_verify(struct acpi_processor *pr) @@ -930,6 +928,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) unsigned int i; int result; + ACPI_FUNCTION_TRACE("acpi_processor_get_power_info"); /* NOTE: the idle thread may not be running while calling * this function */ @@ -952,7 +951,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) */ result = acpi_processor_set_power_policy(pr); if (result) - return result; + return_VALUE(result); /* * if one state of type C2 or C3 is available, mark this @@ -966,23 +965,24 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) } } - return 0; + return_VALUE(0); } int acpi_processor_cst_has_changed(struct acpi_processor *pr) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_processor_cst_has_changed"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (nocst) { - return -ENODEV; + return_VALUE(-ENODEV); } if (!pr->flags.power_setup_done) - return -ENODEV; + return_VALUE(-ENODEV); /* Fall back to the default idle loop */ pm_idle = pm_idle_save; @@ -993,7 +993,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) if ((pr->flags.power == 1) && (pr->flags.power_setup_done)) pm_idle = acpi_processor_idle; - return result; + return_VALUE(result); } /* proc interface */ @@ -1003,6 +1003,7 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) struct acpi_processor *pr = (struct acpi_processor *)seq->private; unsigned int i; + ACPI_FUNCTION_TRACE("acpi_processor_power_seq_show"); if (!pr) goto end; @@ -1054,14 +1055,13 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) else seq_puts(seq, "demotion[--] "); - seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n", + seq_printf(seq, "latency[%03d] usage[%08d]\n", pr->power.states[i].latency, - pr->power.states[i].usage, - pr->power.states[i].time); + pr->power.states[i].usage); } end: - return 0; + return_VALUE(0); } static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) @@ -1070,7 +1070,7 @@ static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) PDE(inode)->data); } -static const struct file_operations acpi_processor_power_fops = { +static struct file_operations acpi_processor_power_fops = { .open = acpi_processor_power_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -1081,10 +1081,11 @@ int acpi_processor_power_init(struct acpi_processor *pr, struct acpi_device *device) { acpi_status status = 0; - static int first_run; + static int first_run = 0; struct proc_dir_entry *entry = NULL; unsigned int i; + ACPI_FUNCTION_TRACE("acpi_processor_power_init"); if (!first_run) { dmi_check_system(processor_power_dmi_table); @@ -1096,14 +1097,14 @@ int acpi_processor_power_init(struct acpi_processor *pr, } if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (acpi_fadt.cst_cnt && !nocst) { status = acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Notifying BIOS of _CST ability failed")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Notifying BIOS of _CST ability failed\n")); } } @@ -1132,7 +1133,9 @@ int acpi_processor_power_init(struct acpi_processor *pr, entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -EIO; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_PROCESSOR_FILE_POWER)); else { entry->proc_fops = &acpi_processor_power_fops; entry->data = acpi_driver_data(device); @@ -1141,12 +1144,13 @@ int acpi_processor_power_init(struct acpi_processor *pr, pr->flags.power_setup_done = 1; - return 0; + return_VALUE(0); } int acpi_processor_power_exit(struct acpi_processor *pr, struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_processor_power_exit"); pr->flags.power_setup_done = 0; @@ -1166,5 +1170,5 @@ int acpi_processor_power_exit(struct acpi_processor *pr, cpu_idle_wait(); } - return 0; + return_VALUE(0); } diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 7ba5e49ab..f36db22ce 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -34,7 +34,6 @@ #ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF #include #include -#include #include #endif @@ -49,7 +48,7 @@ #define _COMPONENT ACPI_PROCESSOR_COMPONENT ACPI_MODULE_NAME("acpi_processor") -static DEFINE_MUTEX(performance_mutex); +static DECLARE_MUTEX(performance_sem); /* * _PPC support is implemented as a CPUfreq policy notifier: @@ -73,7 +72,7 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, struct acpi_processor *pr; unsigned int ppc = 0; - mutex_lock(&performance_mutex); + down(&performance_sem); if (event != CPUFREQ_INCOMPATIBLE) goto out; @@ -94,7 +93,7 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, core_frequency * 1000); out: - mutex_unlock(&performance_mutex); + up(&performance_sem); return 0; } @@ -108,9 +107,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) acpi_status status = 0; unsigned long ppc = 0; + ACPI_FUNCTION_TRACE("acpi_processor_get_platform_limit"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); /* * _PPC indicates the maximum state currently supported by the platform @@ -122,13 +122,13 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) acpi_processor_ppc_status |= PPC_IN_USE; if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n")); + return_VALUE(-ENODEV); } pr->performance_platform_limit = (int)ppc; - return 0; + return_VALUE(0); } int acpi_processor_ppc_has_changed(struct acpi_processor *pr) @@ -167,17 +167,18 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) union acpi_object *pct = NULL; union acpi_object obj = { 0 }; + ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control"); status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n")); + return_VALUE(-ENODEV); } pct = (union acpi_object *)buffer.pointer; if (!pct || (pct->type != ACPI_TYPE_PACKAGE) || (pct->package.count != 2)) { - printk(KERN_ERR PREFIX "Invalid _PCT data\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n")); result = -EFAULT; goto end; } @@ -191,7 +192,8 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) if ((obj.type != ACPI_TYPE_BUFFER) || (obj.buffer.length < sizeof(struct acpi_pct_register)) || (obj.buffer.pointer == NULL)) { - printk(KERN_ERR PREFIX "Invalid _PCT data (control_register)\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid _PCT data (control_register)\n")); result = -EFAULT; goto end; } @@ -207,7 +209,8 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) if ((obj.type != ACPI_TYPE_BUFFER) || (obj.buffer.length < sizeof(struct acpi_pct_register)) || (obj.buffer.pointer == NULL)) { - printk(KERN_ERR PREFIX "Invalid _PCT data (status_register)\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid _PCT data (status_register)\n")); result = -EFAULT; goto end; } @@ -216,9 +219,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) sizeof(struct acpi_pct_register)); end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return result; + return_VALUE(result); } static int acpi_processor_get_performance_states(struct acpi_processor *pr) @@ -231,16 +234,17 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) union acpi_object *pss = NULL; int i; + ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states"); status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PSS")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n")); + return_VALUE(-ENODEV); } pss = (union acpi_object *)buffer.pointer; if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { - printk(KERN_ERR PREFIX "Invalid _PSS data\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n")); result = -EFAULT; goto end; } @@ -269,7 +273,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) status = acpi_extract_package(&(pss->package.elements[i]), &format, &state); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Invalid _PSS data")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid _PSS data\n")); result = -EFAULT; kfree(pr->performance->states); goto end; @@ -285,8 +290,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) (u32) px->control, (u32) px->status)); if (!px->core_frequency) { - printk(KERN_ERR PREFIX - "Invalid _PSS data: freq is zero\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid _PSS data: freq is zero\n")); result = -EFAULT; kfree(pr->performance->states); goto end; @@ -294,9 +299,9 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) } end: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return result; + return_VALUE(result); } static int acpi_processor_get_performance_info(struct acpi_processor *pr) @@ -305,30 +310,31 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr) acpi_status status = AE_OK; acpi_handle handle = NULL; + ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info"); if (!pr || !pr->performance || !pr->handle) - return -EINVAL; + return_VALUE(-EINVAL); status = acpi_get_handle(pr->handle, "_PCT", &handle); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "ACPI-based processor performance control unavailable\n")); - return -ENODEV; + return_VALUE(-ENODEV); } result = acpi_processor_get_performance_control(pr); if (result) - return result; + return_VALUE(result); result = acpi_processor_get_performance_states(pr); if (result) - return result; + return_VALUE(result); result = acpi_processor_get_platform_limit(pr); if (result) - return result; + return_VALUE(result); - return 0; + return_VALUE(0); } int acpi_processor_notify_smm(struct module *calling_module) @@ -336,12 +342,13 @@ int acpi_processor_notify_smm(struct module *calling_module) acpi_status status; static int is_done = 0; + ACPI_FUNCTION_TRACE("acpi_processor_notify_smm"); if (!(acpi_processor_ppc_status & PPC_REGISTERED)) - return -EBUSY; + return_VALUE(-EBUSY); if (!try_module_get(calling_module)) - return -EINVAL; + return_VALUE(-EINVAL); /* is_done is set to negative if an error occured, * and to postitive if _no_ error occured, but SMM @@ -350,10 +357,10 @@ int acpi_processor_notify_smm(struct module *calling_module) */ if (is_done > 0) { module_put(calling_module); - return 0; + return_VALUE(0); } else if (is_done < 0) { module_put(calling_module); - return is_done; + return_VALUE(is_done); } is_done = -EIO; @@ -362,7 +369,7 @@ int acpi_processor_notify_smm(struct module *calling_module) if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n")); module_put(calling_module); - return 0; + return_VALUE(0); } ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -379,12 +386,12 @@ int acpi_processor_notify_smm(struct module *calling_module) status = acpi_os_write_port(acpi_fadt.smi_cmd, (u32) acpi_fadt.pstate_cnt, 8); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Failed to write pstate_cnt [0x%x] to " - "smi_cmd [0x%x]", acpi_fadt.pstate_cnt, - acpi_fadt.smi_cmd)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Failed to write pstate_cnt [0x%x] to " + "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, + acpi_fadt.smi_cmd)); module_put(calling_module); - return status; + return_VALUE(status); } /* Success. If there's no _PPC, we need to fear nothing, so @@ -394,7 +401,7 @@ int acpi_processor_notify_smm(struct module *calling_module) if (!(acpi_processor_ppc_status & PPC_IN_USE)) module_put(calling_module); - return 0; + return_VALUE(0); } EXPORT_SYMBOL(acpi_processor_notify_smm); @@ -415,6 +422,7 @@ static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset) struct acpi_processor *pr = (struct acpi_processor *)seq->private; int i; + ACPI_FUNCTION_TRACE("acpi_processor_perf_seq_show"); if (!pr) goto end; @@ -438,7 +446,7 @@ static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset) (u32) pr->performance->states[i].transition_latency); end: - return 0; + return_VALUE(0); } static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file) @@ -460,22 +468,23 @@ acpi_processor_write_performance(struct file *file, unsigned int new_state = 0; struct cpufreq_policy policy; + ACPI_FUNCTION_TRACE("acpi_processor_write_performance"); if (!pr || (count > sizeof(state_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); perf = pr->performance; if (!perf) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(state_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); state_string[count] = '\0'; new_state = simple_strtoul(state_string, NULL, 0); if (new_state >= perf->state_count) - return -EINVAL; + return_VALUE(-EINVAL); cpufreq_get_policy(&policy, pr->id); @@ -485,9 +494,9 @@ acpi_processor_write_performance(struct file *file, result = cpufreq_set_policy(&policy); if (result) - return result; + return_VALUE(result); - return count; + return_VALUE(count); } static void acpi_cpufreq_add_file(struct acpi_processor *pr) @@ -495,36 +504,42 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr) struct proc_dir_entry *entry = NULL; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile"); if (acpi_bus_get_device(pr->handle, &device)) - return; + return_VOID; /* add file 'performance' [R/W] */ entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); - if (entry){ + if (!entry) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_PROCESSOR_FILE_PERFORMANCE)); + else { acpi_processor_perf_fops.write = acpi_processor_write_performance; entry->proc_fops = &acpi_processor_perf_fops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return; + return_VOID; } static void acpi_cpufreq_remove_file(struct acpi_processor *pr) { struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile"); if (acpi_bus_get_device(pr->handle, &device)) - return; + return_VOID; /* remove file 'performance' */ remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, acpi_device_dir(device)); - return; + return_VOID; } #else @@ -538,251 +553,28 @@ static void acpi_cpufreq_remove_file(struct acpi_processor *pr) } #endif /* CONFIG_X86_ACPI_CPUFREQ_PROC_INTF */ -static int acpi_processor_get_psd(struct acpi_processor *pr) -{ - int result = 0; - acpi_status status = AE_OK; - struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; - struct acpi_buffer format = {sizeof("NNNNN"), "NNNNN"}; - struct acpi_buffer state = {0, NULL}; - union acpi_object *psd = NULL; - struct acpi_psd_package *pdomain; - - status = acpi_evaluate_object(pr->handle, "_PSD", NULL, &buffer); - if (ACPI_FAILURE(status)) { - return -ENODEV; - } - - psd = (union acpi_object *) buffer.pointer; - if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); - result = -EFAULT; - goto end; - } - - if (psd->package.count != 1) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); - result = -EFAULT; - goto end; - } - - pdomain = &(pr->performance->domain_info); - - state.length = sizeof(struct acpi_psd_package); - state.pointer = pdomain; - - status = acpi_extract_package(&(psd->package.elements[0]), - &format, &state); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); - result = -EFAULT; - goto end; - } - - if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:num_entries\n")); - result = -EFAULT; - goto end; - } - - if (pdomain->revision != ACPI_PSD_REV0_REVISION) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:revision\n")); - result = -EFAULT; - goto end; - } - -end: - kfree(buffer.pointer); - return result; -} - -int acpi_processor_preregister_performance( - struct acpi_processor_performance **performance) -{ - int count, count_target; - int retval = 0; - unsigned int i, j; - cpumask_t covered_cpus; - struct acpi_processor *pr; - struct acpi_psd_package *pdomain; - struct acpi_processor *match_pr; - struct acpi_psd_package *match_pdomain; - - mutex_lock(&performance_mutex); - - retval = 0; - - /* Call _PSD for all CPUs */ - for_each_possible_cpu(i) { - pr = processors[i]; - if (!pr) { - /* Look only at processors in ACPI namespace */ - continue; - } - - if (pr->performance) { - retval = -EBUSY; - continue; - } - - if (!performance || !performance[i]) { - retval = -EINVAL; - continue; - } - - pr->performance = performance[i]; - cpu_set(i, pr->performance->shared_cpu_map); - if (acpi_processor_get_psd(pr)) { - retval = -EINVAL; - continue; - } - } - if (retval) - goto err_ret; - - /* - * Now that we have _PSD data from all CPUs, lets setup P-state - * domain info. - */ - for_each_possible_cpu(i) { - pr = processors[i]; - if (!pr) - continue; - - /* Basic validity check for domain info */ - pdomain = &(pr->performance->domain_info); - if ((pdomain->revision != ACPI_PSD_REV0_REVISION) || - (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES)) { - retval = -EINVAL; - goto err_ret; - } - if (pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ALL && - pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ANY && - pdomain->coord_type != DOMAIN_COORD_TYPE_HW_ALL) { - retval = -EINVAL; - goto err_ret; - } - } - - cpus_clear(covered_cpus); - for_each_possible_cpu(i) { - pr = processors[i]; - if (!pr) - continue; - - if (cpu_isset(i, covered_cpus)) - continue; - - pdomain = &(pr->performance->domain_info); - cpu_set(i, pr->performance->shared_cpu_map); - cpu_set(i, covered_cpus); - if (pdomain->num_processors <= 1) - continue; - - /* Validate the Domain info */ - count_target = pdomain->num_processors; - count = 1; - if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL) - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; - else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL) - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_HW; - else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY; - - for_each_possible_cpu(j) { - if (i == j) - continue; - - match_pr = processors[j]; - if (!match_pr) - continue; - - match_pdomain = &(match_pr->performance->domain_info); - if (match_pdomain->domain != pdomain->domain) - continue; - - /* Here i and j are in the same domain */ - - if (match_pdomain->num_processors != count_target) { - retval = -EINVAL; - goto err_ret; - } - - if (pdomain->coord_type != match_pdomain->coord_type) { - retval = -EINVAL; - goto err_ret; - } - - cpu_set(j, covered_cpus); - cpu_set(j, pr->performance->shared_cpu_map); - count++; - } - - for_each_possible_cpu(j) { - if (i == j) - continue; - - match_pr = processors[j]; - if (!match_pr) - continue; - - match_pdomain = &(match_pr->performance->domain_info); - if (match_pdomain->domain != pdomain->domain) - continue; - - match_pr->performance->shared_type = - pr->performance->shared_type; - match_pr->performance->shared_cpu_map = - pr->performance->shared_cpu_map; - } - } - -err_ret: - if (retval) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error while parsing _PSD domain information. Assuming no coordination\n")); - } - - for_each_possible_cpu(i) { - pr = processors[i]; - if (!pr || !pr->performance) - continue; - - /* Assume no coordination on any error parsing domain info */ - if (retval) { - cpus_clear(pr->performance->shared_cpu_map); - cpu_set(i, pr->performance->shared_cpu_map); - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; - } - pr->performance = NULL; /* Will be set for real in register */ - } - - mutex_unlock(&performance_mutex); - return retval; -} -EXPORT_SYMBOL(acpi_processor_preregister_performance); - - int acpi_processor_register_performance(struct acpi_processor_performance *performance, unsigned int cpu) { struct acpi_processor *pr; + ACPI_FUNCTION_TRACE("acpi_processor_register_performance"); if (!(acpi_processor_ppc_status & PPC_REGISTERED)) - return -EINVAL; + return_VALUE(-EINVAL); - mutex_lock(&performance_mutex); + down(&performance_sem); pr = processors[cpu]; if (!pr) { - mutex_unlock(&performance_mutex); - return -ENODEV; + up(&performance_sem); + return_VALUE(-ENODEV); } if (pr->performance) { - mutex_unlock(&performance_mutex); - return -EBUSY; + up(&performance_sem); + return_VALUE(-EBUSY); } WARN_ON(!performance); @@ -791,14 +583,14 @@ acpi_processor_register_performance(struct acpi_processor_performance if (acpi_processor_get_performance_info(pr)) { pr->performance = NULL; - mutex_unlock(&performance_mutex); - return -EIO; + up(&performance_sem); + return_VALUE(-EIO); } acpi_cpufreq_add_file(pr); - mutex_unlock(&performance_mutex); - return 0; + up(&performance_sem); + return_VALUE(0); } EXPORT_SYMBOL(acpi_processor_register_performance); @@ -809,13 +601,14 @@ acpi_processor_unregister_performance(struct acpi_processor_performance { struct acpi_processor *pr; + ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance"); - mutex_lock(&performance_mutex); + down(&performance_sem); pr = processors[cpu]; if (!pr) { - mutex_unlock(&performance_mutex); - return; + up(&performance_sem); + return_VOID; } if (pr->performance) @@ -824,9 +617,9 @@ acpi_processor_unregister_performance(struct acpi_processor_performance acpi_cpufreq_remove_file(pr); - mutex_unlock(&performance_mutex); + up(&performance_sem); - return; + return_VOID; } EXPORT_SYMBOL(acpi_processor_unregister_performance); diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index ef5e0f6ef..f99ad05cd 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c @@ -54,12 +54,13 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr) u16 px = 0; u16 tx = 0; + ACPI_FUNCTION_TRACE("acpi_processor_apply_limit"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (!pr->flags.limit) - return -ENODEV; + return_VALUE(-ENODEV); if (pr->flags.throttling) { if (pr->limit.user.tx > tx) @@ -81,9 +82,9 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr) end: if (result) - printk(KERN_ERR PREFIX "Unable to set limit\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to set limit\n")); - return result; + return_VALUE(result); } #ifdef CONFIG_CPU_FREQ @@ -199,18 +200,19 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type) struct acpi_device *device = NULL; int tx = 0, max_tx_px = 0; + ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit"); if ((type < ACPI_PROCESSOR_LIMIT_NONE) || (type > ACPI_PROCESSOR_LIMIT_DECREMENT)) - return -EINVAL; + return_VALUE(-EINVAL); result = acpi_bus_get_device(handle, &device); if (result) - return result; + return_VALUE(result); pr = (struct acpi_processor *)acpi_driver_data(device); if (!pr) - return -ENODEV; + return_VALUE(-ENODEV); /* Thermal limits are always relative to the current Px/Tx state. */ if (pr->flags.throttling) @@ -287,28 +289,30 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type) result = acpi_processor_apply_limit(pr); if (result) - printk(KERN_ERR PREFIX "Unable to set thermal limit\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to set thermal limit\n")); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n", pr->limit.thermal.px, pr->limit.thermal.tx)); } else result = 0; if (max_tx_px) - return 1; + return_VALUE(1); else - return result; + return_VALUE(result); } int acpi_processor_get_limit_info(struct acpi_processor *pr) { + ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (pr->flags.throttling) pr->flags.limit = 1; - return 0; + return_VALUE(0); } /* /proc interface */ @@ -317,6 +321,7 @@ static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset) { struct acpi_processor *pr = (struct acpi_processor *)seq->private; + ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show"); if (!pr) goto end; @@ -334,7 +339,7 @@ static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset) pr->limit.thermal.px, pr->limit.thermal.tx); end: - return 0; + return_VALUE(0); } static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file) @@ -354,33 +359,36 @@ static ssize_t acpi_processor_write_limit(struct file * file, int px = 0; int tx = 0; + ACPI_FUNCTION_TRACE("acpi_processor_write_limit"); if (!pr || (count > sizeof(limit_string) - 1)) { - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n")); + return_VALUE(-EINVAL); } if (copy_from_user(limit_string, buffer, count)) { - return -EFAULT; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n")); + return_VALUE(-EFAULT); } limit_string[count] = '\0'; if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) { - printk(KERN_ERR PREFIX "Invalid data format\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n")); + return_VALUE(-EINVAL); } if (pr->flags.throttling) { if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) { - printk(KERN_ERR PREFIX "Invalid tx\n"); - return -EINVAL; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid tx\n")); + return_VALUE(-EINVAL); } pr->limit.user.tx = tx; } result = acpi_processor_apply_limit(pr); - return count; + return_VALUE(count); } struct file_operations acpi_processor_limit_fops = { diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index d044ec519..b966549ec 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -55,12 +55,13 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) u32 duty_mask = 0; u32 duty_value = 0; + ACPI_FUNCTION_TRACE("acpi_processor_get_throttling"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if (!pr->flags.throttling) - return -ENODEV; + return_VALUE(-ENODEV); pr->throttling.state = 0; @@ -92,7 +93,7 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) "Throttling state is T%d (%d%% throttling applied)\n", state, pr->throttling.states[state].performance)); - return 0; + return_VALUE(0); } int acpi_processor_set_throttling(struct acpi_processor *pr, int state) @@ -101,18 +102,19 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) u32 duty_mask = 0; u32 duty_value = 0; + ACPI_FUNCTION_TRACE("acpi_processor_set_throttling"); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); if ((state < 0) || (state > (pr->throttling.state_count - 1))) - return -EINVAL; + return_VALUE(-EINVAL); if (!pr->flags.throttling) - return -ENODEV; + return_VALUE(-ENODEV); if (state == pr->throttling.state) - return 0; + return_VALUE(0); /* * Calculate the duty_value and duty_mask. @@ -163,7 +165,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) (pr->throttling.states[state].performance ? pr-> throttling.states[state].performance / 10 : 0))); - return 0; + return_VALUE(0); } int acpi_processor_get_throttling_info(struct acpi_processor *pr) @@ -172,6 +174,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) int step = 0; int i = 0; + ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info"); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", @@ -180,21 +183,21 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) pr->throttling.duty_width)); if (!pr) - return -EINVAL; + return_VALUE(-EINVAL); /* TBD: Support ACPI 2.0 objects */ if (!pr->throttling.address) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); - return 0; + return_VALUE(0); } else if (!pr->throttling.duty_width) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); - return 0; + return_VALUE(0); } /* TBD: Support duty_cycle values that span bit 4. */ else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { - printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); - return 0; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "duty_cycle spans bit 4\n")); + return_VALUE(0); } /* @@ -205,7 +208,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) if (errata.piix4.throttle) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Throttling not supported on PIIX4 A- or B-step\n")); - return 0; + return_VALUE(0); } pr->throttling.state_count = 1 << acpi_fadt.duty_width; @@ -251,7 +254,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) if (result) pr->flags.throttling = 0; - return result; + return_VALUE(result); } /* proc interface */ @@ -263,6 +266,7 @@ static int acpi_processor_throttling_seq_show(struct seq_file *seq, int i = 0; int result = 0; + ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show"); if (!pr) goto end; @@ -292,7 +296,7 @@ static int acpi_processor_throttling_seq_show(struct seq_file *seq, throttling.states[i].performance / 10 : 0)); end: - return 0; + return_VALUE(0); } static int acpi_processor_throttling_open_fs(struct inode *inode, @@ -311,12 +315,13 @@ static ssize_t acpi_processor_write_throttling(struct file * file, struct acpi_processor *pr = (struct acpi_processor *)m->private; char state_string[12] = { '\0' }; + ACPI_FUNCTION_TRACE("acpi_processor_write_throttling"); if (!pr || (count > sizeof(state_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(state_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); state_string[count] = '\0'; @@ -324,9 +329,9 @@ static ssize_t acpi_processor_write_throttling(struct file * file, simple_strtoul(state_string, NULL, 0)); if (result) - return result; + return_VALUE(result); - return count; + return_VALUE(count); } struct file_operations acpi_processor_throttling_fops = { diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index cf87b0230..4038dbfa6 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c @@ -78,7 +78,6 @@ static u8 acpi_rs_count_set_bits(u16 bit_field) ACPI_FUNCTION_ENTRY(); for (bits_set = 0; bit_field; bits_set++) { - /* Zero the least significant bit that is set */ bit_field &= (bit_field - 1); @@ -155,18 +154,15 @@ acpi_rs_stream_option_length(u32 resource_length, * length, minus one byte for the resource_source_index itself. */ if (resource_length > minimum_aml_resource_length) { - /* Compute the length of the optional string */ string_length = resource_length - minimum_aml_resource_length - 1; } - /* - * Round the length up to a multiple of the native word in order to - * guarantee that the entire resource descriptor is native word aligned - */ - return ((u32) ACPI_ROUND_UP_TO_NATIVE_WORD(string_length)); + /* Round up length to 32 bits for internal structure alignment */ + + return (ACPI_ROUND_UP_to_32_bITS(string_length)); } /******************************************************************************* @@ -190,12 +186,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) acpi_size aml_size_needed = 0; acpi_rs_length total_size; - ACPI_FUNCTION_TRACE(rs_get_aml_length); + ACPI_FUNCTION_TRACE("rs_get_aml_length"); /* Traverse entire list of internal resource descriptors */ while (resource) { - /* Validate the descriptor type */ if (resource->type > ACPI_RESOURCE_TYPE_MAX) { @@ -219,7 +214,6 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) * is a Large Resource data type. */ if (resource->data.vendor.byte_length > 7) { - /* Base size of a Large resource descriptor */ total_size = @@ -338,22 +332,20 @@ acpi_rs_get_list_length(u8 * aml_buffer, acpi_status status; u8 *end_aml; u8 *buffer; - u32 buffer_size; + u32 buffer_size = 0; u16 temp16; u16 resource_length; u32 extra_struct_bytes; u8 resource_index; u8 minimum_aml_resource_length; - ACPI_FUNCTION_TRACE(rs_get_list_length); + ACPI_FUNCTION_TRACE("rs_get_list_length"); - *size_needed = 0; end_aml = aml_buffer + aml_buffer_length; /* Walk the list of AML resource descriptors */ while (aml_buffer < end_aml) { - /* Validate the Resource Type and Resource Length */ status = acpi_ut_validate_resource(aml_buffer, &resource_index); @@ -394,28 +386,35 @@ acpi_rs_get_list_length(u8 * aml_buffer, break; case ACPI_RESOURCE_NAME_VENDOR_SMALL: - case ACPI_RESOURCE_NAME_VENDOR_LARGE: /* * Vendor Resource: - * Get the number of vendor data bytes + * Ensure a 32-bit boundary for the structure */ - extra_struct_bytes = resource_length; + extra_struct_bytes = + ACPI_ROUND_UP_to_32_bITS(resource_length); break; case ACPI_RESOURCE_NAME_END_TAG: /* - * End Tag: - * This is the normal exit, add size of end_tag + * End Tag: This is the normal exit, add size of end_tag */ - *size_needed += ACPI_RS_SIZE_MIN; + *size_needed = buffer_size + ACPI_RS_SIZE_MIN; return_ACPI_STATUS(AE_OK); + case ACPI_RESOURCE_NAME_VENDOR_LARGE: + /* + * Vendor Resource: + * Add vendor data and ensure a 32-bit boundary for the structure + */ + extra_struct_bytes = + ACPI_ROUND_UP_to_32_bITS(resource_length); + break; + case ACPI_RESOURCE_NAME_ADDRESS32: case ACPI_RESOURCE_NAME_ADDRESS16: - case ACPI_RESOURCE_NAME_ADDRESS64: /* - * Address Resource: - * Add the size of the optional resource_source + * 32-Bit or 16-bit Address Resource: + * Add the size of any optional data (resource_source) */ extra_struct_bytes = acpi_rs_stream_option_length(resource_length, @@ -424,46 +423,50 @@ acpi_rs_get_list_length(u8 * aml_buffer, case ACPI_RESOURCE_NAME_EXTENDED_IRQ: /* - * Extended IRQ Resource: - * Using the interrupt_table_length, add 4 bytes for each additional - * interrupt. Note: at least one interrupt is required and is - * included in the minimum descriptor size (reason for the -1) + * Extended IRQ: + * Point past the interrupt_vector_flags to get the + * interrupt_table_length. */ - extra_struct_bytes = (buffer[1] - 1) * sizeof(u32); - - /* Add the size of the optional resource_source */ + buffer++; - extra_struct_bytes += + extra_struct_bytes = + /* + * Add 4 bytes for each additional interrupt. Note: at + * least one interrupt is required and is included in + * the minimum descriptor size + */ + ((*buffer - 1) * sizeof(u32)) + + /* Add the size of any optional data (resource_source) */ acpi_rs_stream_option_length(resource_length - extra_struct_bytes, minimum_aml_resource_length); break; + case ACPI_RESOURCE_NAME_ADDRESS64: + /* + * 64-Bit Address Resource: + * Add the size of any optional data (resource_source) + * Ensure a 64-bit boundary for the structure + */ + extra_struct_bytes = + ACPI_ROUND_UP_to_64_bITS + (acpi_rs_stream_option_length + (resource_length, minimum_aml_resource_length)); + break; + default: break; } - /* - * Update the required buffer size for the internal descriptor structs - * - * Important: Round the size up for the appropriate alignment. This - * is a requirement on IA64. - */ - buffer_size = acpi_gbl_resource_struct_sizes[resource_index] + - extra_struct_bytes; - buffer_size = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); + /* Update the required buffer size for the internal descriptor structs */ - *size_needed += buffer_size; - - ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, - "Type %.2X, AmlLength %.2X InternalLength %.2X\n", - acpi_ut_get_resource_type(aml_buffer), - acpi_ut_get_descriptor_length(aml_buffer), - buffer_size)); + temp16 = (u16) (acpi_gbl_resource_struct_sizes[resource_index] + + extra_struct_bytes); + buffer_size += (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(temp16); /* - * Point to the next resource within the AML stream using the length - * contained in the resource descriptor header + * Point to the next resource within the stream + * using the size of the header plus the length contained in the header */ aml_buffer += acpi_ut_get_descriptor_length(aml_buffer); } @@ -503,7 +506,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, u8 name_found; u32 table_index; - ACPI_FUNCTION_TRACE(rs_get_pci_routing_table_length); + ACPI_FUNCTION_TRACE("rs_get_pci_routing_table_length"); number_of_elements = package_object->package.count; @@ -520,7 +523,6 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, top_object_list = package_object->package.elements; for (index = 0; index < number_of_elements; index++) { - /* Dereference the sub-package */ package_element = *top_object_list; @@ -579,7 +581,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, /* Round up the size since each element must be aligned */ - temp_size_needed = ACPI_ROUND_UP_TO_64BIT(temp_size_needed); + temp_size_needed = ACPI_ROUND_UP_to_64_bITS(temp_size_needed); /* Point to the next union acpi_operand_object */ @@ -587,7 +589,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, } /* - * Add an extra element to the end of the list, essentially a + * Adding an extra element to the end of the list, essentially a * NULL terminator */ *buffer_size_needed = diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c index 008058acd..8c128dea3 100644 --- a/drivers/acpi/resources/rscreate.c +++ b/drivers/acpi/resources/rscreate.c @@ -75,11 +75,10 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, u8 *aml_start; acpi_size list_size_needed = 0; u32 aml_buffer_length; - void *resource; - ACPI_FUNCTION_TRACE(rs_create_resource_list); + ACPI_FUNCTION_TRACE("rs_create_resource_list"); - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "AmlBuffer = %p\n", aml_buffer)); + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "aml_buffer = %p\n", aml_buffer)); /* Params already validated, so we don't re-validate here */ @@ -93,7 +92,7 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, status = acpi_rs_get_list_length(aml_start, aml_buffer_length, &list_size_needed); - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Status=%X ListSizeNeeded=%X\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Status=%X list_size_needed=%X\n", status, (u32) list_size_needed)); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -108,15 +107,13 @@ acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, /* Do the conversion */ - resource = output_buffer->pointer; - status = acpi_ut_walk_aml_resources(aml_start, aml_buffer_length, - acpi_rs_convert_aml_to_resources, - &resource); + status = acpi_rs_convert_aml_to_resources(aml_start, aml_buffer_length, + output_buffer->pointer); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "output_buffer %p Length %X\n", output_buffer->pointer, (u32) output_buffer->length)); return_ACPI_STATUS(AE_OK); } @@ -158,7 +155,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, acpi_status status; struct acpi_buffer path_buffer; - ACPI_FUNCTION_TRACE(rs_create_pci_routing_table); + ACPI_FUNCTION_TRACE("rs_create_pci_routing_table"); /* Params already validated, so we don't re-validate here */ @@ -170,7 +167,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, return_ACPI_STATUS(status); } - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "buffer_size_needed = %X\n", (u32) buffer_size_needed)); /* Validate/Allocate/Clear caller buffer */ @@ -335,7 +332,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* Now align the current length */ user_prt->length = - (u32) ACPI_ROUND_UP_TO_64BIT(user_prt->length); + (u32) ACPI_ROUND_UP_to_64_bITS(user_prt->length); /* 4) Fourth subobject: Dereference the PRT.source_index */ @@ -344,7 +341,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, user_prt->source_index = (u32) obj_desc->integer.value; } else { ACPI_ERROR((AE_INFO, - "(PRT[%X].SourceIndex) Need Integer, found %s", + "(PRT[%X].source_index) Need Integer, found %s", index, acpi_ut_get_object_type_name(obj_desc))); return_ACPI_STATUS(AE_BAD_DATA); @@ -355,7 +352,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, top_object_list++; } - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "output_buffer %p Length %X\n", output_buffer->pointer, (u32) output_buffer->length)); return_ACPI_STATUS(AE_OK); } @@ -385,9 +382,9 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, acpi_status status; acpi_size aml_size_needed = 0; - ACPI_FUNCTION_TRACE(rs_create_aml_resources); + ACPI_FUNCTION_TRACE("rs_create_aml_resources"); - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "LinkedListBuffer = %p\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "linked_list_buffer = %p\n", linked_list_buffer)); /* @@ -398,7 +395,7 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, */ status = acpi_rs_get_aml_length(linked_list_buffer, &aml_size_needed); - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "aml_size_needed=%X, %s\n", (u32) aml_size_needed, acpi_format_exception(status))); if (ACPI_FAILURE(status)) { @@ -422,7 +419,7 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, return_ACPI_STATUS(status); } - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "output_buffer %p Length %X\n", output_buffer->pointer, (u32) output_buffer->length)); return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c index 9c99a723a..e7de061cf 100644 --- a/drivers/acpi/resources/rsdump.c +++ b/drivers/acpi/resources/rsdump.c @@ -91,11 +91,11 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table); struct acpi_rsdump_info acpi_rs_dump_irq[6] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_irq), "IRQ", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.triggering), "Triggering", - acpi_gbl_he_decode}, + acpi_gbl_HEdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity", - acpi_gbl_ll_decode}, + acpi_gbl_LLdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing", - acpi_gbl_shr_decode}, + acpi_gbl_SHRdecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count), "Interrupt Count", NULL}, {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(irq.interrupts[0]), @@ -105,11 +105,11 @@ struct acpi_rsdump_info acpi_rs_dump_irq[6] = { struct acpi_rsdump_info acpi_rs_dump_dma[6] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_dma), "DMA", NULL}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.type), "Speed", - acpi_gbl_typ_decode}, + acpi_gbl_TYPdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(dma.bus_master), "Mastering", - acpi_gbl_bm_decode}, + acpi_gbl_BMdecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.transfer), "Transfer Type", - acpi_gbl_siz_decode}, + acpi_gbl_SIZdecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(dma.channel_count), "Channel Count", NULL}, {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(dma.channels[0]), "Channel List", @@ -158,7 +158,7 @@ struct acpi_rsdump_info acpi_rs_dump_vendor[3] = { }; struct acpi_rsdump_info acpi_rs_dump_end_tag[1] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "EndTag", + {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "end_tag", NULL} }; @@ -166,7 +166,7 @@ struct acpi_rsdump_info acpi_rs_dump_memory24[6] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory24), "24-Bit Memory Range", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory24.write_protect), - "Write Protect", acpi_gbl_rw_decode}, + "Write Protect", acpi_gbl_RWdecode}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.minimum), "Address Minimum", NULL}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.maximum), "Address Maximum", @@ -181,7 +181,7 @@ struct acpi_rsdump_info acpi_rs_dump_memory32[6] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory32), "32-Bit Memory Range", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory32.write_protect), - "Write Protect", acpi_gbl_rw_decode}, + "Write Protect", acpi_gbl_RWdecode}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.minimum), "Address Minimum", NULL}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.maximum), "Address Maximum", @@ -196,7 +196,7 @@ struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[4] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_memory32), "32-Bit Fixed Memory Range", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(fixed_memory32.write_protect), - "Write Protect", acpi_gbl_rw_decode}, + "Write Protect", acpi_gbl_RWdecode}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address), "Address", NULL}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address_length), @@ -278,11 +278,11 @@ struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = { {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer), "Type", acpi_gbl_consume_decode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering), - "Triggering", acpi_gbl_he_decode}, + "Triggering", acpi_gbl_HEdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", - acpi_gbl_ll_decode}, + acpi_gbl_LLdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing", - acpi_gbl_shr_decode}, + acpi_gbl_SHRdecode}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL, NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count), @@ -314,7 +314,7 @@ static struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = { {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), "Consumer/Producer", acpi_gbl_consume_decode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", - acpi_gbl_dec_decode}, + acpi_gbl_DECdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), "Min Relocatability", acpi_gbl_min_decode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), @@ -325,24 +325,24 @@ static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), "Resource Type", (void *)"Memory Range"}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), - "Write Protect", acpi_gbl_rw_decode}, + "Write Protect", acpi_gbl_RWdecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), - "Caching", acpi_gbl_mem_decode}, + "Caching", acpi_gbl_MEMdecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type), - "Range Type", acpi_gbl_mtp_decode}, + "Range Type", acpi_gbl_MTPdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation), - "Translation", acpi_gbl_ttp_decode} + "Translation", acpi_gbl_TTPdecode} }; static struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), "Resource Type", (void *)"I/O Range"}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), - "Range Type", acpi_gbl_rng_decode}, + "Range Type", acpi_gbl_RNGdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), - "Translation", acpi_gbl_ttp_decode}, + "Translation", acpi_gbl_TTPdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type), - "Translation Type", acpi_gbl_trs_decode} + "Translation Type", acpi_gbl_TRSdecode} }; /* diff --git a/drivers/acpi/resources/rsinfo.c b/drivers/acpi/resources/rsinfo.c index 9e7ae2f8a..d9ae64b77 100644 --- a/drivers/acpi/resources/rsinfo.c +++ b/drivers/acpi/resources/rsinfo.c @@ -141,7 +141,6 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ }; #endif - #endif /* ACPI_FUTURE_USAGE */ /* * Base sizes for external AML resource descriptors, indexed by internal type. diff --git a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c index 29423ce03..1434e7864 100644 --- a/drivers/acpi/resources/rslist.c +++ b/drivers/acpi/resources/rslist.c @@ -51,62 +51,76 @@ ACPI_MODULE_NAME("rslist") * * FUNCTION: acpi_rs_convert_aml_to_resources * - * PARAMETERS: acpi_walk_aml_callback - * resource_ptr - Pointer to the buffer that will - * contain the output structures + * PARAMETERS: Aml - Pointer to the resource byte stream + * aml_length - Length of Aml + * output_buffer - Pointer to the buffer that will + * contain the output structures * * RETURN: Status * - * DESCRIPTION: Convert an AML resource to an internal representation of the - * resource that is aligned and easier to access. + * DESCRIPTION: Takes the resource byte stream and parses it, creating a + * linked list of resources in the caller's output buffer * ******************************************************************************/ acpi_status -acpi_rs_convert_aml_to_resources(u8 * aml, - u32 length, - u32 offset, u8 resource_index, void **context) +acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer) { - struct acpi_resource **resource_ptr = - ACPI_CAST_INDIRECT_PTR(struct acpi_resource, context); - struct acpi_resource *resource; + struct acpi_resource *resource = (void *)output_buffer; acpi_status status; + u8 resource_index; + u8 *end_aml; - ACPI_FUNCTION_TRACE(rs_convert_aml_to_resources); + ACPI_FUNCTION_TRACE("rs_convert_aml_to_resources"); - /* - * Check that the input buffer and all subsequent pointers into it - * are aligned on a native word boundary. Most important on IA64 - */ - resource = *resource_ptr; - if (ACPI_IS_MISALIGNED(resource)) { - ACPI_WARNING((AE_INFO, - "Misaligned resource pointer %p", resource)); - } + end_aml = aml + aml_length; - /* Convert the AML byte stream resource to a local resource struct */ - - status = - acpi_rs_convert_aml_to_resource(resource, - ACPI_CAST_PTR(union aml_resource, - aml), - acpi_gbl_get_resource_dispatch - [resource_index]); - if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, - "Could not convert AML resource (Type %X)", - *aml)); - return_ACPI_STATUS(status); - } + /* Loop until end-of-buffer or an end_tag is found */ + + while (aml < end_aml) { + /* Validate the Resource Type and Resource Length */ + + status = acpi_ut_validate_resource(aml, &resource_index); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* Convert the AML byte stream resource to a local resource struct */ - ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, - "Type %.2X, AmlLength %.2X InternalLength %.2X\n", - acpi_ut_get_resource_type(aml), length, - resource->length)); + status = + acpi_rs_convert_aml_to_resource(resource, + ACPI_CAST_PTR(union + aml_resource, + aml), + acpi_gbl_get_resource_dispatch + [resource_index]); + if (ACPI_FAILURE(status)) { + ACPI_EXCEPTION((AE_INFO, status, + "Could not convert AML resource (Type %X)", + *aml)); + return_ACPI_STATUS(status); + } - /* Point to the next structure in the output buffer */ + /* Normal exit on completion of an end_tag resource descriptor */ - *resource_ptr = ACPI_ADD_PTR(void, resource, resource->length); - return_ACPI_STATUS(AE_OK); + if (acpi_ut_get_resource_type(aml) == + ACPI_RESOURCE_NAME_END_TAG) { + return_ACPI_STATUS(AE_OK); + } + + /* Point to the next input AML resource */ + + aml += acpi_ut_get_descriptor_length(aml); + + /* Point to the next structure in the output buffer */ + + resource = + ACPI_ADD_PTR(struct acpi_resource, resource, + resource->length); + } + + /* Did not find an end_tag resource descriptor */ + + return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); } /******************************************************************************* @@ -136,12 +150,11 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, u8 *end_aml = output_buffer + aml_size_needed; acpi_status status; - ACPI_FUNCTION_TRACE(rs_convert_resources_to_aml); + ACPI_FUNCTION_TRACE("rs_convert_resources_to_aml"); /* Walk the resource descriptor list, convert each descriptor */ while (aml < end_aml) { - /* Validate the (internal) Resource Type */ if (resource->type > ACPI_RESOURCE_TYPE_MAX) { @@ -178,7 +191,6 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, /* Check for end-of-list, normal exit */ if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { - /* An End Tag indicates the end of the input Resource Template */ return_ACPI_STATUS(AE_OK); diff --git a/drivers/acpi/resources/rsmisc.c b/drivers/acpi/resources/rsmisc.c index faf6e106b..ed866cf1c 100644 --- a/drivers/acpi/resources/rsmisc.c +++ b/drivers/acpi/resources/rsmisc.c @@ -81,10 +81,9 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, u16 item_count = 0; u16 temp16 = 0; - ACPI_FUNCTION_TRACE(rs_convert_aml_to_resource); + ACPI_FUNCTION_TRACE("rs_get_resource"); if (((acpi_native_uint) resource) & 0x3) { - /* Each internal resource struct is expected to be 32-bit aligned */ ACPI_WARNING((AE_INFO, @@ -296,11 +295,9 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, exit: if (!flags_mode) { + /* Round the resource struct length up to the next 32-bit boundary */ - /* Round the resource struct length up to the next boundary (32 or 64) */ - - resource->length = - (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length); + resource->length = ACPI_ROUND_UP_to_32_bITS(resource->length); } return_ACPI_STATUS(AE_OK); } @@ -332,7 +329,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, u16 temp16 = 0; u16 item_count = 0; - ACPI_FUNCTION_TRACE(rs_convert_resource_to_aml); + ACPI_FUNCTION_TRACE("rs_convert_resource_to_aml"); /* * First table entry must be ACPI_RSC_INITxxx and must contain the @@ -538,7 +535,6 @@ if (((aml->irq.flags & 0x09) == 0x00) || ((aml->irq.flags & 0x09) == 0x09)) { resource->data.extended_irq.interrupt_count = temp8; if (temp8 < 1) { - /* Must have at least one IRQ */ return_ACPI_STATUS(AE_AML_BAD_RESOURCE_LENGTH); diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index a9cbee8e8..25b5aedd6 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c @@ -205,7 +205,6 @@ acpi_rs_set_resource_length(acpi_rsdesc_size total_length, /* Length is stored differently for large and small descriptors */ if (aml->small_header.descriptor_type & ACPI_RESOURCE_NAME_LARGE) { - /* Large descriptor -- bytes 1-2 contain the 16-bit length */ ACPI_MOVE_16_TO_16(&aml->large_header.resource_length, @@ -299,8 +298,7 @@ static u16 acpi_rs_strcpy(char *destination, char *source) * string_ptr - (optional) where to store the actual * resource_source string * - * RETURN: Length of the string plus NULL terminator, rounded up to native - * word boundary + * RETURN: Length of the string plus NULL terminator, rounded up to 32 bit * * DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor * to an internal resource descriptor @@ -330,7 +328,6 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, * we add 1 to the minimum length. */ if (total_length > (acpi_rsdesc_size) (minimum_length + 1)) { - /* Get the resource_source_index */ resource_source->index = aml_resource_source[0]; @@ -347,26 +344,23 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, } /* - * In order for the Resource length to be a multiple of the native - * word, calculate the length of the string (+1 for NULL terminator) - * and expand to the next word multiple. + * In order for the struct_size to fall on a 32-bit boundary, calculate + * the length of the string (+1 for the NULL terminator) and expand the + * struct_size to the next 32-bit boundary. * * Zero the entire area of the buffer. */ total_length = - (u32) - ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + - 1; - total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); - + ACPI_ROUND_UP_to_32_bITS(ACPI_STRLEN + ((char *)&aml_resource_source[1]) + + 1); ACPI_MEMSET(resource_source->string_ptr, 0, total_length); /* Copy the resource_source string to the destination */ resource_source->string_length = acpi_rs_strcpy(resource_source->string_ptr, - ACPI_CAST_PTR(char, - &aml_resource_source[1])); + (char *)&aml_resource_source[1]); return ((acpi_rs_length) total_length); } @@ -411,7 +405,6 @@ acpi_rs_set_resource_source(union aml_resource * aml, /* Non-zero string length indicates presence of a resource_source */ if (resource_source->string_length) { - /* Point to the end of the AML descriptor */ aml_resource_source = ACPI_ADD_PTR(u8, aml, minimum_length); @@ -422,7 +415,7 @@ acpi_rs_set_resource_source(union aml_resource * aml, /* Copy the resource_source string */ - ACPI_STRCPY(ACPI_CAST_PTR(char, &aml_resource_source[1]), + ACPI_STRCPY((char *)&aml_resource_source[1], resource_source->string_ptr); /* @@ -442,9 +435,9 @@ acpi_rs_set_resource_source(union aml_resource * aml, * * FUNCTION: acpi_rs_get_prt_method_data * - * PARAMETERS: Node - Device node - * ret_buffer - Pointer to a buffer structure for the - * results + * PARAMETERS: Handle - a handle to the containing object + * ret_buffer - a pointer to a buffer structure for the + * results * * RETURN: Status * @@ -457,19 +450,18 @@ acpi_rs_set_resource_source(union aml_resource * aml, ******************************************************************************/ acpi_status -acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, - struct acpi_buffer * ret_buffer) +acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer * ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(rs_get_prt_method_data); + ACPI_FUNCTION_TRACE("rs_get_prt_method_data"); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ - status = acpi_ut_evaluate_object(node, METHOD_NAME__PRT, + status = acpi_ut_evaluate_object(handle, METHOD_NAME__PRT, ACPI_BTYPE_PACKAGE, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -491,9 +483,9 @@ acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, * * FUNCTION: acpi_rs_get_crs_method_data * - * PARAMETERS: Node - Device node - * ret_buffer - Pointer to a buffer structure for the - * results + * PARAMETERS: Handle - a handle to the containing object + * ret_buffer - a pointer to a buffer structure for the + * results * * RETURN: Status * @@ -506,19 +498,18 @@ acpi_rs_get_prt_method_data(struct acpi_namespace_node * node, ******************************************************************************/ acpi_status -acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer) +acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(rs_get_crs_method_data); + ACPI_FUNCTION_TRACE("rs_get_crs_method_data"); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ - status = acpi_ut_evaluate_object(node, METHOD_NAME__CRS, + status = acpi_ut_evaluate_object(handle, METHOD_NAME__CRS, ACPI_BTYPE_BUFFER, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -531,7 +522,7 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, */ status = acpi_rs_create_resource_list(obj_desc, ret_buffer); - /* On exit, we must delete the object returned by evaluate_object */ + /* on exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); @@ -541,9 +532,9 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, * * FUNCTION: acpi_rs_get_prs_method_data * - * PARAMETERS: Node - Device node - * ret_buffer - Pointer to a buffer structure for the - * results + * PARAMETERS: Handle - a handle to the containing object + * ret_buffer - a pointer to a buffer structure for the + * results * * RETURN: Status * @@ -557,19 +548,18 @@ acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, #ifdef ACPI_FUTURE_USAGE acpi_status -acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer) +acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) { union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(rs_get_prs_method_data); + ACPI_FUNCTION_TRACE("rs_get_prs_method_data"); /* Parameters guaranteed valid by caller */ /* Execute the method, no parameters */ - status = acpi_ut_evaluate_object(node, METHOD_NAME__PRS, + status = acpi_ut_evaluate_object(handle, METHOD_NAME__PRS, ACPI_BTYPE_BUFFER, &obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -582,7 +572,7 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, */ status = acpi_rs_create_resource_list(obj_desc, ret_buffer); - /* On exit, we must delete the object returned by evaluate_object */ + /* on exit, we must delete the object returned by evaluate_object */ acpi_ut_remove_reference(obj_desc); return_ACPI_STATUS(status); @@ -593,10 +583,10 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, * * FUNCTION: acpi_rs_get_method_data * - * PARAMETERS: Handle - Handle to the containing object + * PARAMETERS: Handle - a handle to the containing object * Path - Path to method, relative to Handle - * ret_buffer - Pointer to a buffer structure for the - * results + * ret_buffer - a pointer to a buffer structure for the + * results * * RETURN: Status * @@ -615,7 +605,7 @@ acpi_rs_get_method_data(acpi_handle handle, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(rs_get_method_data); + ACPI_FUNCTION_TRACE("rs_get_method_data"); /* Parameters guaranteed valid by caller */ @@ -644,9 +634,9 @@ acpi_rs_get_method_data(acpi_handle handle, * * FUNCTION: acpi_rs_set_srs_method_data * - * PARAMETERS: Node - Device node - * in_buffer - Pointer to a buffer structure of the - * parameter + * PARAMETERS: Handle - a handle to the containing object + * in_buffer - a pointer to a buffer structure of the + * parameter * * RETURN: Status * @@ -656,37 +646,23 @@ acpi_rs_get_method_data(acpi_handle handle, * If the function fails an appropriate status will be returned * and the contents of the callers buffer is undefined. * - * Note: Parameters guaranteed valid by caller - * ******************************************************************************/ acpi_status -acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *in_buffer) +acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *in_buffer) { - struct acpi_evaluate_info *info; - union acpi_operand_object *args[2]; + struct acpi_parameter_info info; + union acpi_operand_object *params[2]; acpi_status status; struct acpi_buffer buffer; - ACPI_FUNCTION_TRACE(rs_set_srs_method_data); - - /* Allocate and initialize the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } + ACPI_FUNCTION_TRACE("rs_set_srs_method_data"); - info->prefix_node = node; - info->pathname = METHOD_NAME__SRS; - info->parameters = args; - info->parameter_type = ACPI_PARAM_ARGS; - info->flags = ACPI_IGNORE_RETURN_VALUE; + /* Parameters guaranteed valid by caller */ /* * The in_buffer parameter will point to a linked list of - * resource parameters. It needs to be formatted into a + * resource parameters. It needs to be formatted into a * byte stream to be sent in as an input parameter to _SRS * * Convert the linked list into a byte stream @@ -694,36 +670,41 @@ acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; status = acpi_rs_create_aml_resources(in_buffer->pointer, &buffer); if (ACPI_FAILURE(status)) { - goto cleanup; + return_ACPI_STATUS(status); } - /* Create and initialize the method parameter object */ + /* Init the param object */ - args[0] = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER); - if (!args[0]) { - /* - * Must free the buffer allocated above (otherwise it is freed - * later) - */ - ACPI_FREE(buffer.pointer); - status = AE_NO_MEMORY; - goto cleanup; + params[0] = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER); + if (!params[0]) { + acpi_os_free(buffer.pointer); + return_ACPI_STATUS(AE_NO_MEMORY); } - args[0]->buffer.length = (u32) buffer.length; - args[0]->buffer.pointer = buffer.pointer; - args[0]->common.flags = AOPOBJ_DATA_VALID; - args[1] = NULL; + /* Set up the parameter object */ + + params[0]->buffer.length = (u32) buffer.length; + params[0]->buffer.pointer = buffer.pointer; + params[0]->common.flags = AOPOBJ_DATA_VALID; + params[1] = NULL; + + info.node = handle; + info.parameters = params; + info.parameter_type = ACPI_PARAM_ARGS; - /* Execute the method, no return value is expected */ + /* Execute the method, no return value */ - status = acpi_ns_evaluate(info); + status = acpi_ns_evaluate_relative(METHOD_NAME__SRS, &info); + if (ACPI_SUCCESS(status)) { + /* Delete any return object (especially if implicit_return is enabled) */ - /* Clean up and return the status from acpi_ns_evaluate */ + if (info.return_object) { + acpi_ut_remove_reference(info.return_object); + } + } - acpi_ut_remove_reference(args[0]); + /* Clean up and return the status from acpi_ns_evaluate_relative */ - cleanup: - ACPI_FREE(info); + acpi_ut_remove_reference(params[0]); return_ACPI_STATUS(status); } diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index 1999e2ab7..88b67077a 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c @@ -41,9 +41,10 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include -#include #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rsxface") @@ -67,262 +68,312 @@ ACPI_MODULE_NAME("rsxface") static acpi_status acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context); -static acpi_status -acpi_rs_validate_parameters(acpi_handle device_handle, - struct acpi_buffer *buffer, - struct acpi_namespace_node **return_node); - /******************************************************************************* * - * FUNCTION: acpi_rs_validate_parameters + * FUNCTION: acpi_get_irq_routing_table * - * PARAMETERS: device_handle - Handle to a device - * Buffer - Pointer to a data buffer - * return_node - Pointer to where the device node is returned + * PARAMETERS: device_handle - a handle to the Bus device we are querying + * ret_buffer - a pointer to a buffer to receive the + * current resources for the device * * RETURN: Status * - * DESCRIPTION: Common parameter validation for resource interfaces + * DESCRIPTION: This function is called to get the IRQ routing table for a + * specific bus. The caller must first acquire a handle for the + * desired bus. The routine table is placed in the buffer pointed + * to by the ret_buffer variable parameter. + * + * If the function fails an appropriate status will be returned + * and the value of ret_buffer is undefined. + * + * This function attempts to execute the _PRT method contained in + * the object indicated by the passed device_handle. * ******************************************************************************/ -static acpi_status -acpi_rs_validate_parameters(acpi_handle device_handle, - struct acpi_buffer *buffer, - struct acpi_namespace_node **return_node) +acpi_status +acpi_get_irq_routing_table(acpi_handle device_handle, + struct acpi_buffer *ret_buffer) { acpi_status status; - struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(rs_validate_parameters); + ACPI_FUNCTION_TRACE("acpi_get_irq_routing_table "); /* - * Must have a valid handle to an ACPI device + * Must have a valid handle and buffer, So we have to have a handle + * and a return buffer structure, and if there is a non-zero buffer length + * we also need a valid pointer in the buffer. If it's a zero buffer length, + * we'll be returning the needed buffer size, so keep going. */ if (!device_handle) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - node = acpi_ns_map_handle_to_node(device_handle); - if (!node) { - return_ACPI_STATUS(AE_BAD_PARAMETER); - } - - if (node->type != ACPI_TYPE_DEVICE) { - return_ACPI_STATUS(AE_TYPE); - } - - /* - * Validate the user buffer object - * - * if there is a non-zero buffer length we also need a valid pointer in - * the buffer. If it's a zero buffer length, we'll be returning the - * needed buffer size (later), so keep going. - */ - status = acpi_ut_validate_buffer(buffer); + status = acpi_ut_validate_buffer(ret_buffer); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - *return_node = node; - return_ACPI_STATUS(AE_OK); + status = acpi_rs_get_prt_method_data(device_handle, ret_buffer); + return_ACPI_STATUS(status); } /******************************************************************************* * - * FUNCTION: acpi_get_irq_routing_table + * FUNCTION: acpi_get_current_resources * - * PARAMETERS: device_handle - Handle to the Bus device we are querying - * ret_buffer - Pointer to a buffer to receive the + * PARAMETERS: device_handle - a handle to the device object for the + * device we are querying + * ret_buffer - a pointer to a buffer to receive the * current resources for the device * * RETURN: Status * - * DESCRIPTION: This function is called to get the IRQ routing table for a - * specific bus. The caller must first acquire a handle for the - * desired bus. The routine table is placed in the buffer pointed - * to by the ret_buffer variable parameter. + * DESCRIPTION: This function is called to get the current resources for a + * specific device. The caller must first acquire a handle for + * the desired device. The resource data is placed in the buffer + * pointed to by the ret_buffer variable parameter. * * If the function fails an appropriate status will be returned * and the value of ret_buffer is undefined. * - * This function attempts to execute the _PRT method contained in + * This function attempts to execute the _CRS method contained in * the object indicated by the passed device_handle. * ******************************************************************************/ acpi_status -acpi_get_irq_routing_table(acpi_handle device_handle, +acpi_get_current_resources(acpi_handle device_handle, struct acpi_buffer *ret_buffer) { acpi_status status; - struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(acpi_get_irq_routing_table); + ACPI_FUNCTION_TRACE("acpi_get_current_resources"); - /* Validate parameters then dispatch to internal routine */ + /* + * Must have a valid handle and buffer, So we have to have a handle + * and a return buffer structure, and if there is a non-zero buffer length + * we also need a valid pointer in the buffer. If it's a zero buffer length, + * we'll be returning the needed buffer size, so keep going. + */ + if (!device_handle) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } - status = acpi_rs_validate_parameters(device_handle, ret_buffer, &node); + status = acpi_ut_validate_buffer(ret_buffer); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - status = acpi_rs_get_prt_method_data(node, ret_buffer); + status = acpi_rs_get_crs_method_data(device_handle, ret_buffer); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_irq_routing_table) +EXPORT_SYMBOL(acpi_get_current_resources); /******************************************************************************* * - * FUNCTION: acpi_get_current_resources + * FUNCTION: acpi_get_possible_resources * - * PARAMETERS: device_handle - Handle to the device object for the + * PARAMETERS: device_handle - a handle to the device object for the * device we are querying - * ret_buffer - Pointer to a buffer to receive the - * current resources for the device + * ret_buffer - a pointer to a buffer to receive the + * resources for the device * * RETURN: Status * - * DESCRIPTION: This function is called to get the current resources for a - * specific device. The caller must first acquire a handle for - * the desired device. The resource data is placed in the buffer - * pointed to by the ret_buffer variable parameter. + * DESCRIPTION: This function is called to get a list of the possible resources + * for a specific device. The caller must first acquire a handle + * for the desired device. The resource data is placed in the + * buffer pointed to by the ret_buffer variable. * * If the function fails an appropriate status will be returned * and the value of ret_buffer is undefined. * - * This function attempts to execute the _CRS method contained in - * the object indicated by the passed device_handle. - * ******************************************************************************/ + +#ifdef ACPI_FUTURE_USAGE acpi_status -acpi_get_current_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer) +acpi_get_possible_resources(acpi_handle device_handle, + struct acpi_buffer *ret_buffer) { acpi_status status; - struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(acpi_get_current_resources); + ACPI_FUNCTION_TRACE("acpi_get_possible_resources"); - /* Validate parameters then dispatch to internal routine */ + /* + * Must have a valid handle and buffer, So we have to have a handle + * and a return buffer structure, and if there is a non-zero buffer length + * we also need a valid pointer in the buffer. If it's a zero buffer length, + * we'll be returning the needed buffer size, so keep going. + */ + if (!device_handle) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } - status = acpi_rs_validate_parameters(device_handle, ret_buffer, &node); + status = acpi_ut_validate_buffer(ret_buffer); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - status = acpi_rs_get_crs_method_data(node, ret_buffer); + status = acpi_rs_get_prs_method_data(device_handle, ret_buffer); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_current_resources) +EXPORT_SYMBOL(acpi_get_possible_resources); +#endif /* ACPI_FUTURE_USAGE */ -#ifdef ACPI_FUTURE_USAGE /******************************************************************************* * - * FUNCTION: acpi_get_possible_resources + * FUNCTION: acpi_walk_resources * * PARAMETERS: device_handle - Handle to the device object for the * device we are querying - * ret_buffer - Pointer to a buffer to receive the - * resources for the device + * Name - Method name of the resources we want + * (METHOD_NAME__CRS or METHOD_NAME__PRS) + * user_function - Called for each resource + * Context - Passed to user_function * * RETURN: Status * - * DESCRIPTION: This function is called to get a list of the possible resources - * for a specific device. The caller must first acquire a handle - * for the desired device. The resource data is placed in the - * buffer pointed to by the ret_buffer variable. - * - * If the function fails an appropriate status will be returned - * and the value of ret_buffer is undefined. + * DESCRIPTION: Retrieves the current or possible resource list for the + * specified device. The user_function is called once for + * each resource in the list. * ******************************************************************************/ + acpi_status -acpi_get_possible_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer) +acpi_walk_resources(acpi_handle device_handle, + char *name, + ACPI_WALK_RESOURCE_CALLBACK user_function, void *context) { acpi_status status; - struct acpi_namespace_node *node; + struct acpi_buffer buffer; + struct acpi_resource *resource; + struct acpi_resource *resource_end; + + ACPI_FUNCTION_TRACE("acpi_walk_resources"); + + /* Parameter validation */ - ACPI_FUNCTION_TRACE(acpi_get_possible_resources); + if (!device_handle || !user_function || !name || + (ACPI_STRNCMP(name, METHOD_NAME__CRS, sizeof(METHOD_NAME__CRS)) && + ACPI_STRNCMP(name, METHOD_NAME__PRS, sizeof(METHOD_NAME__PRS)))) { + return_ACPI_STATUS(AE_BAD_PARAMETER); + } - /* Validate parameters then dispatch to internal routine */ + /* Get the _CRS or _PRS resource list */ - status = acpi_rs_validate_parameters(device_handle, ret_buffer, &node); + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; + status = acpi_rs_get_method_data(device_handle, name, &buffer); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - status = acpi_rs_get_prs_method_data(node, ret_buffer); + /* Buffer now contains the resource list */ + + resource = ACPI_CAST_PTR(struct acpi_resource, buffer.pointer); + resource_end = + ACPI_ADD_PTR(struct acpi_resource, buffer.pointer, buffer.length); + + /* Walk the resource list until the end_tag is found (or buffer end) */ + + while (resource < resource_end) { + /* Sanity check the resource */ + + if (resource->type > ACPI_RESOURCE_TYPE_MAX) { + status = AE_AML_INVALID_RESOURCE_TYPE; + break; + } + + /* Invoke the user function, abort on any error returned */ + + status = user_function(resource, context); + if (ACPI_FAILURE(status)) { + if (status == AE_CTRL_TERMINATE) { + /* This is an OK termination by the user function */ + + status = AE_OK; + } + break; + } + + /* end_tag indicates end-of-list */ + + if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { + break; + } + + /* Get the next resource descriptor */ + + resource = + ACPI_ADD_PTR(struct acpi_resource, resource, + resource->length); + } + + ACPI_MEM_FREE(buffer.pointer); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_possible_resources) -#endif /* ACPI_FUTURE_USAGE */ +EXPORT_SYMBOL(acpi_walk_resources); /******************************************************************************* * * FUNCTION: acpi_set_current_resources * - * PARAMETERS: device_handle - Handle to the device object for the - * device we are setting resources - * in_buffer - Pointer to a buffer containing the + * PARAMETERS: device_handle - a handle to the device object for the + * device we are changing the resources of + * in_buffer - a pointer to a buffer containing the * resources to be set for the device * * RETURN: Status * * DESCRIPTION: This function is called to set the current resources for a - * specific device. The caller must first acquire a handle for - * the desired device. The resource data is passed to the routine + * specific device. The caller must first acquire a handle for + * the desired device. The resource data is passed to the routine * the buffer pointed to by the in_buffer variable. * ******************************************************************************/ + acpi_status acpi_set_current_resources(acpi_handle device_handle, struct acpi_buffer *in_buffer) { acpi_status status; - struct acpi_namespace_node *node; - ACPI_FUNCTION_TRACE(acpi_set_current_resources); + ACPI_FUNCTION_TRACE("acpi_set_current_resources"); - /* Validate the buffer, don't allow zero length */ + /* Must have a valid handle and buffer */ - if ((!in_buffer) || (!in_buffer->pointer) || (!in_buffer->length)) { + if ((!device_handle) || + (!in_buffer) || (!in_buffer->pointer) || (!in_buffer->length)) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Validate parameters then dispatch to internal routine */ - - status = acpi_rs_validate_parameters(device_handle, in_buffer, &node); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - status = acpi_rs_set_srs_method_data(node, in_buffer); + status = acpi_rs_set_srs_method_data(device_handle, in_buffer); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_set_current_resources) +EXPORT_SYMBOL(acpi_set_current_resources); /****************************************************************************** * * FUNCTION: acpi_resource_to_address64 * - * PARAMETERS: Resource - Pointer to a resource - * Out - Pointer to the users's return buffer - * (a struct acpi_resource_address64) + * PARAMETERS: Resource - Pointer to a resource + * Out - Pointer to the users's return + * buffer (a struct + * struct acpi_resource_address64) * * RETURN: Status * * DESCRIPTION: If the resource is an address16, address32, or address64, - * copy it to the address64 return buffer. This saves the + * copy it to the address64 return buffer. This saves the * caller from having to duplicate code for different-sized * addresses. * ******************************************************************************/ + acpi_status acpi_resource_to_address64(struct acpi_resource *resource, struct acpi_resource_address64 *out) @@ -364,18 +415,18 @@ acpi_resource_to_address64(struct acpi_resource *resource, return (AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_resource_to_address64) +EXPORT_SYMBOL(acpi_resource_to_address64); /******************************************************************************* * * FUNCTION: acpi_get_vendor_resource * - * PARAMETERS: device_handle - Handle for the parent device object - * Name - Method name for the parent resource - * (METHOD_NAME__CRS or METHOD_NAME__PRS) - * Uuid - Pointer to the UUID to be matched. - * includes both subtype and 16-byte UUID - * ret_buffer - Where the vendor resource is returned + * PARAMETERS: device_handle - Handle for the parent device object + * Name - Method name for the parent resource + * (METHOD_NAME__CRS or METHOD_NAME__PRS) + * Uuid - Pointer to the UUID to be matched. + * includes both subtype and 16-byte UUID + * ret_buffer - Where the vendor resource is returned * * RETURN: Status * @@ -384,6 +435,7 @@ ACPI_EXPORT_SYMBOL(acpi_resource_to_address64) * UUID subtype. Returns a struct acpi_resource of type Vendor. * ******************************************************************************/ + acpi_status acpi_get_vendor_resource(acpi_handle device_handle, char *name, @@ -415,19 +467,18 @@ acpi_get_vendor_resource(acpi_handle device_handle, return (info.status); } -ACPI_EXPORT_SYMBOL(acpi_get_vendor_resource) - /******************************************************************************* * * FUNCTION: acpi_rs_match_vendor_resource * - * PARAMETERS: acpi_walk_resource_callback + * PARAMETERS: ACPI_WALK_RESOURCE_CALLBACK * * RETURN: Status * * DESCRIPTION: Match a vendor resource via the ACPI 3.0 UUID * ******************************************************************************/ + static acpi_status acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) { @@ -475,101 +526,3 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) info->status = AE_OK; return (AE_CTRL_TERMINATE); } - -ACPI_EXPORT_SYMBOL(acpi_rs_match_vendor_resource) - -/******************************************************************************* - * - * FUNCTION: acpi_walk_resources - * - * PARAMETERS: device_handle - Handle to the device object for the - * device we are querying - * Name - Method name of the resources we want - * (METHOD_NAME__CRS or METHOD_NAME__PRS) - * user_function - Called for each resource - * Context - Passed to user_function - * - * RETURN: Status - * - * DESCRIPTION: Retrieves the current or possible resource list for the - * specified device. The user_function is called once for - * each resource in the list. - * - ******************************************************************************/ - -acpi_status -acpi_walk_resources(acpi_handle device_handle, - char *name, - acpi_walk_resource_callback user_function, void *context) -{ - acpi_status status; - struct acpi_buffer buffer; - struct acpi_resource *resource; - struct acpi_resource *resource_end; - - ACPI_FUNCTION_TRACE(acpi_walk_resources); - - /* Parameter validation */ - - if (!device_handle || !user_function || !name || - (!ACPI_COMPARE_NAME(name, METHOD_NAME__CRS) && - !ACPI_COMPARE_NAME(name, METHOD_NAME__PRS))) { - return_ACPI_STATUS(AE_BAD_PARAMETER); - } - - /* Get the _CRS or _PRS resource list */ - - buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; - status = acpi_rs_get_method_data(device_handle, name, &buffer); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Buffer now contains the resource list */ - - resource = ACPI_CAST_PTR(struct acpi_resource, buffer.pointer); - resource_end = - ACPI_ADD_PTR(struct acpi_resource, buffer.pointer, buffer.length); - - /* Walk the resource list until the end_tag is found (or buffer end) */ - - while (resource < resource_end) { - - /* Sanity check the resource */ - - if (resource->type > ACPI_RESOURCE_TYPE_MAX) { - status = AE_AML_INVALID_RESOURCE_TYPE; - break; - } - - /* Invoke the user function, abort on any error returned */ - - status = user_function(resource, context); - if (ACPI_FAILURE(status)) { - if (status == AE_CTRL_TERMINATE) { - - /* This is an OK termination by the user function */ - - status = AE_OK; - } - break; - } - - /* end_tag indicates end-of-list */ - - if (resource->type == ACPI_RESOURCE_TYPE_END_TAG) { - break; - } - - /* Get the next resource descriptor */ - - resource = - ACPI_ADD_PTR(struct acpi_resource, resource, - resource->length); - } - - ACPI_FREE(buffer.pointer); - return_ACPI_STATUS(status); -} - -ACPI_EXPORT_SYMBOL(acpi_walk_resources) diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c deleted file mode 100644 index 62bef0b3b..000000000 --- a/drivers/acpi/sbs.c +++ /dev/null @@ -1,1769 +0,0 @@ -/* - * acpi_sbs.c - ACPI Smart Battery System Driver ($Revision: 1.16 $) - * - * Copyright (c) 2005 Rich Townsend - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "i2c_ec.h" - -#define DEF_CAPACITY_UNIT 3 -#define MAH_CAPACITY_UNIT 1 -#define MWH_CAPACITY_UNIT 2 -#define CAPACITY_UNIT DEF_CAPACITY_UNIT - -#define REQUEST_UPDATE_MODE 1 -#define QUEUE_UPDATE_MODE 2 - -#define DATA_TYPE_COMMON 0 -#define DATA_TYPE_INFO 1 -#define DATA_TYPE_STATE 2 -#define DATA_TYPE_ALARM 3 -#define DATA_TYPE_AC_STATE 4 - -extern struct proc_dir_entry *acpi_lock_ac_dir(void); -extern struct proc_dir_entry *acpi_lock_battery_dir(void); -extern void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir); -extern void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir); - -#define ACPI_SBS_COMPONENT 0x00080000 -#define ACPI_SBS_CLASS "sbs" -#define ACPI_AC_CLASS "ac_adapter" -#define ACPI_BATTERY_CLASS "battery" -#define ACPI_SBS_HID "ACPI0002" -#define ACPI_SBS_DRIVER_NAME "ACPI Smart Battery System Driver" -#define ACPI_SBS_DEVICE_NAME "Smart Battery System" -#define ACPI_SBS_FILE_INFO "info" -#define ACPI_SBS_FILE_STATE "state" -#define ACPI_SBS_FILE_ALARM "alarm" -#define ACPI_BATTERY_DIR_NAME "BAT%i" -#define ACPI_AC_DIR_NAME "AC0" -#define ACPI_SBC_SMBUS_ADDR 0x9 -#define ACPI_SBSM_SMBUS_ADDR 0xa -#define ACPI_SB_SMBUS_ADDR 0xb -#define ACPI_SBS_AC_NOTIFY_STATUS 0x80 -#define ACPI_SBS_BATTERY_NOTIFY_STATUS 0x80 -#define ACPI_SBS_BATTERY_NOTIFY_INFO 0x81 - -#define _COMPONENT ACPI_SBS_COMPONENT - -#define MAX_SBS_BAT 4 -#define MAX_SMBUS_ERR 1 - -ACPI_MODULE_NAME("acpi_sbs"); - -MODULE_AUTHOR("Rich Townsend"); -MODULE_DESCRIPTION("Smart Battery System ACPI interface driver"); -MODULE_LICENSE("GPL"); - -static struct semaphore sbs_sem; - -#define UPDATE_MODE QUEUE_UPDATE_MODE -/* REQUEST_UPDATE_MODE QUEUE_UPDATE_MODE */ -#define UPDATE_INFO_MODE 0 -#define UPDATE_TIME 60 -#define UPDATE_TIME2 0 - -static int capacity_mode = CAPACITY_UNIT; -static int update_mode = UPDATE_MODE; -static int update_info_mode = UPDATE_INFO_MODE; -static int update_time = UPDATE_TIME; -static int update_time2 = UPDATE_TIME2; - -module_param(capacity_mode, int, CAPACITY_UNIT); -module_param(update_mode, int, UPDATE_MODE); -module_param(update_info_mode, int, UPDATE_INFO_MODE); -module_param(update_time, int, UPDATE_TIME); -module_param(update_time2, int, UPDATE_TIME2); - -static int acpi_sbs_add(struct acpi_device *device); -static int acpi_sbs_remove(struct acpi_device *device, int type); -static void acpi_battery_smbus_err_handler(struct acpi_ec_smbus *smbus); -static void acpi_sbs_update_queue(void *data); - -static struct acpi_driver acpi_sbs_driver = { - .name = ACPI_SBS_DRIVER_NAME, - .class = ACPI_SBS_CLASS, - .ids = ACPI_SBS_HID, - .ops = { - .add = acpi_sbs_add, - .remove = acpi_sbs_remove, - }, -}; - -struct acpi_battery_info { - int capacity_mode; - s16 full_charge_capacity; - s16 design_capacity; - s16 design_voltage; - int vscale; - int ipscale; - s16 serial_number; - char manufacturer_name[I2C_SMBUS_BLOCK_MAX + 3]; - char device_name[I2C_SMBUS_BLOCK_MAX + 3]; - char device_chemistry[I2C_SMBUS_BLOCK_MAX + 3]; -}; - -struct acpi_battery_state { - s16 voltage; - s16 amperage; - s16 remaining_capacity; - s16 average_time_to_empty; - s16 average_time_to_full; - s16 battery_status; -}; - -struct acpi_battery_alarm { - s16 remaining_capacity; -}; - -struct acpi_battery { - int alive; - int battery_present; - int id; - int init_state; - struct acpi_sbs *sbs; - struct acpi_battery_info info; - struct acpi_battery_state state; - struct acpi_battery_alarm alarm; - struct proc_dir_entry *battery_entry; -}; - -struct acpi_sbs { - acpi_handle handle; - struct acpi_device *device; - struct acpi_ec_smbus *smbus; - int sbsm_present; - int sbsm_batteries_supported; - int ac_present; - struct proc_dir_entry *ac_entry; - struct acpi_battery battery[MAX_SBS_BAT]; - int update_info_mode; - int zombie; - int update_time; - int update_time2; - struct timer_list update_timer; -}; - -static void acpi_update_delay(struct acpi_sbs *sbs); -static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type); - -/* -------------------------------------------------------------------------- - SMBus Communication - -------------------------------------------------------------------------- */ - -static void acpi_battery_smbus_err_handler(struct acpi_ec_smbus *smbus) -{ - union i2c_smbus_data data; - int result = 0; - char *err_str; - int err_number; - - data.word = 0; - - result = smbus->adapter.algo-> - smbus_xfer(&smbus->adapter, - ACPI_SB_SMBUS_ADDR, - 0, I2C_SMBUS_READ, 0x16, I2C_SMBUS_BLOCK_DATA, &data); - - err_number = (data.word & 0x000f); - - switch (data.word & 0x000f) { - case 0x0000: - err_str = "unexpected bus error"; - break; - case 0x0001: - err_str = "busy"; - break; - case 0x0002: - err_str = "reserved command"; - break; - case 0x0003: - err_str = "unsupported command"; - break; - case 0x0004: - err_str = "access denied"; - break; - case 0x0005: - err_str = "overflow/underflow"; - break; - case 0x0006: - err_str = "bad size"; - break; - case 0x0007: - err_str = "unknown error"; - break; - default: - err_str = "unrecognized error"; - } - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "%s: ret %i, err %i\n", err_str, result, err_number)); -} - -static int -acpi_sbs_smbus_read_word(struct acpi_ec_smbus *smbus, int addr, int func, - u16 * word, - void (*err_handler) (struct acpi_ec_smbus * smbus)) -{ - union i2c_smbus_data data; - int result = 0; - int i; - - if (err_handler == NULL) { - err_handler = acpi_battery_smbus_err_handler; - } - - for (i = 0; i < MAX_SMBUS_ERR; i++) { - result = - smbus->adapter.algo->smbus_xfer(&smbus->adapter, addr, 0, - I2C_SMBUS_READ, func, - I2C_SMBUS_WORD_DATA, &data); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "try %i: smbus->adapter.algo->smbus_xfer() failed\n", - i)); - if (err_handler) { - err_handler(smbus); - } - } else { - *word = data.word; - break; - } - } - - return result; -} - -static int -acpi_sbs_smbus_read_str(struct acpi_ec_smbus *smbus, int addr, int func, - char *str, - void (*err_handler) (struct acpi_ec_smbus * smbus)) -{ - union i2c_smbus_data data; - int result = 0; - int i; - - if (err_handler == NULL) { - err_handler = acpi_battery_smbus_err_handler; - } - - for (i = 0; i < MAX_SMBUS_ERR; i++) { - result = - smbus->adapter.algo->smbus_xfer(&smbus->adapter, addr, 0, - I2C_SMBUS_READ, func, - I2C_SMBUS_BLOCK_DATA, - &data); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "try %i: smbus->adapter.algo->smbus_xfer() failed\n", - i)); - if (err_handler) { - err_handler(smbus); - } - } else { - strncpy(str, (const char *)data.block + 1, - data.block[0]); - str[data.block[0]] = 0; - break; - } - } - - return result; -} - -static int -acpi_sbs_smbus_write_word(struct acpi_ec_smbus *smbus, int addr, int func, - int word, - void (*err_handler) (struct acpi_ec_smbus * smbus)) -{ - union i2c_smbus_data data; - int result = 0; - int i; - - if (err_handler == NULL) { - err_handler = acpi_battery_smbus_err_handler; - } - - data.word = word; - - for (i = 0; i < MAX_SMBUS_ERR; i++) { - result = - smbus->adapter.algo->smbus_xfer(&smbus->adapter, addr, 0, - I2C_SMBUS_WRITE, func, - I2C_SMBUS_WORD_DATA, &data); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "try %i: smbus->adapter.algo" - "->smbus_xfer() failed\n", i)); - if (err_handler) { - err_handler(smbus); - } - } else { - break; - } - } - - return result; -} - -/* -------------------------------------------------------------------------- - Smart Battery System Management - -------------------------------------------------------------------------- */ - -/* Smart Battery */ - -static int acpi_sbs_generate_event(struct acpi_device *device, - int event, int state, char *bid, char *class) -{ - char bid_saved[5]; - char class_saved[20]; - int result = 0; - - strcpy(bid_saved, acpi_device_bid(device)); - strcpy(class_saved, acpi_device_class(device)); - - strcpy(acpi_device_bid(device), bid); - strcpy(acpi_device_class(device), class); - - result = acpi_bus_generate_event(device, event, state); - - strcpy(acpi_device_bid(device), bid_saved); - strcpy(acpi_device_class(device), class_saved); - - return result; -} - -static int acpi_battery_get_present(struct acpi_battery *battery) -{ - s16 state; - int result = 0; - int is_present = 0; - - result = acpi_sbs_smbus_read_word(battery->sbs->smbus, - ACPI_SBSM_SMBUS_ADDR, 0x01, - &state, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed")); - } - if (!result) { - is_present = (state & 0x000f) & (1 << battery->id); - } - battery->battery_present = is_present; - - return result; -} - -static int acpi_battery_is_present(struct acpi_battery *battery) -{ - return (battery->battery_present); -} - -static int acpi_ac_is_present(struct acpi_sbs *sbs) -{ - return (sbs->ac_present); -} - -static int acpi_battery_select(struct acpi_battery *battery) -{ - struct acpi_ec_smbus *smbus = battery->sbs->smbus; - int result = 0; - s16 state; - int foo; - - if (battery->sbs->sbsm_present) { - - /* Take special care not to knobble other nibbles of - * state (aka selector_state), since - * it causes charging to halt on SBSELs */ - - result = - acpi_sbs_smbus_read_word(smbus, ACPI_SBSM_SMBUS_ADDR, 0x01, - &state, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - foo = (state & 0x0fff) | (1 << (battery->id + 12)); - result = - acpi_sbs_smbus_write_word(smbus, ACPI_SBSM_SMBUS_ADDR, 0x01, - foo, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_write_word() failed\n")); - goto end; - } - } - - end: - return result; -} - -static int acpi_sbsm_get_info(struct acpi_sbs *sbs) -{ - struct acpi_ec_smbus *smbus = sbs->smbus; - int result = 0; - s16 battery_system_info; - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SBSM_SMBUS_ADDR, 0x04, - &battery_system_info, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - sbs->sbsm_batteries_supported = battery_system_info & 0x000f; - - end: - - return result; -} - -static int acpi_battery_get_info(struct acpi_battery *battery) -{ - struct acpi_ec_smbus *smbus = battery->sbs->smbus; - int result = 0; - s16 battery_mode; - s16 specification_info; - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x03, - &battery_mode, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - battery->info.capacity_mode = (battery_mode & 0x8000) >> 15; - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x10, - &battery->info.full_charge_capacity, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x18, - &battery->info.design_capacity, - &acpi_battery_smbus_err_handler); - - if (result) { - goto end; - } - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x19, - &battery->info.design_voltage, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x1a, - &specification_info, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - switch ((specification_info & 0x0f00) >> 8) { - case 1: - battery->info.vscale = 10; - break; - case 2: - battery->info.vscale = 100; - break; - case 3: - battery->info.vscale = 1000; - break; - default: - battery->info.vscale = 1; - } - - switch ((specification_info & 0xf000) >> 12) { - case 1: - battery->info.ipscale = 10; - break; - case 2: - battery->info.ipscale = 100; - break; - case 3: - battery->info.ipscale = 1000; - break; - default: - battery->info.ipscale = 1; - } - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x1c, - &battery->info.serial_number, - &acpi_battery_smbus_err_handler); - if (result) { - goto end; - } - - result = acpi_sbs_smbus_read_str(smbus, ACPI_SB_SMBUS_ADDR, 0x20, - battery->info.manufacturer_name, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_str() failed\n")); - goto end; - } - - result = acpi_sbs_smbus_read_str(smbus, ACPI_SB_SMBUS_ADDR, 0x21, - battery->info.device_name, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_str() failed\n")); - goto end; - } - - result = acpi_sbs_smbus_read_str(smbus, ACPI_SB_SMBUS_ADDR, 0x22, - battery->info.device_chemistry, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_str() failed\n")); - goto end; - } - - end: - return result; -} - -static void acpi_update_delay(struct acpi_sbs *sbs) -{ - if (sbs->zombie) { - return; - } - if (sbs->update_time2 > 0) { - msleep(sbs->update_time2 * 1000); - } -} - -static int acpi_battery_get_state(struct acpi_battery *battery) -{ - struct acpi_ec_smbus *smbus = battery->sbs->smbus; - int result = 0; - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x09, - &battery->state.voltage, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x0a, - &battery->state.amperage, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x0f, - &battery->state.remaining_capacity, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x12, - &battery->state.average_time_to_empty, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x13, - &battery->state.average_time_to_full, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x16, - &battery->state.battery_status, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - - end: - return result; -} - -static int acpi_battery_get_alarm(struct acpi_battery *battery) -{ - struct acpi_ec_smbus *smbus = battery->sbs->smbus; - int result = 0; - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x01, - &battery->alarm.remaining_capacity, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - acpi_update_delay(battery->sbs); - - end: - - return result; -} - -static int acpi_battery_set_alarm(struct acpi_battery *battery, - unsigned long alarm) -{ - struct acpi_ec_smbus *smbus = battery->sbs->smbus; - int result = 0; - s16 battery_mode; - int foo; - - result = acpi_battery_select(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_select() failed\n")); - goto end; - } - - /* If necessary, enable the alarm */ - - if (alarm > 0) { - result = - acpi_sbs_smbus_read_word(smbus, ACPI_SB_SMBUS_ADDR, 0x03, - &battery_mode, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - result = - acpi_sbs_smbus_write_word(smbus, ACPI_SB_SMBUS_ADDR, 0x01, - battery_mode & 0xbfff, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_write_word() failed\n")); - goto end; - } - } - - foo = alarm / (battery->info.capacity_mode ? 10 : 1); - result = acpi_sbs_smbus_write_word(smbus, ACPI_SB_SMBUS_ADDR, 0x01, - foo, - &acpi_battery_smbus_err_handler); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_write_word() failed\n")); - goto end; - } - - end: - - return result; -} - -static int acpi_battery_set_mode(struct acpi_battery *battery) -{ - int result = 0; - s16 battery_mode; - - if (capacity_mode == DEF_CAPACITY_UNIT) { - goto end; - } - - result = acpi_sbs_smbus_read_word(battery->sbs->smbus, - ACPI_SB_SMBUS_ADDR, 0x03, - &battery_mode, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - if (capacity_mode == MAH_CAPACITY_UNIT) { - battery_mode &= 0x7fff; - } else { - battery_mode |= 0x8000; - } - result = acpi_sbs_smbus_write_word(battery->sbs->smbus, - ACPI_SB_SMBUS_ADDR, 0x03, - battery_mode, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_write_word() failed\n")); - goto end; - } - - result = acpi_sbs_smbus_read_word(battery->sbs->smbus, - ACPI_SB_SMBUS_ADDR, 0x03, - &battery_mode, NULL); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - end: - return result; -} - -static int acpi_battery_init(struct acpi_battery *battery) -{ - int result = 0; - - result = acpi_battery_select(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_init() failed\n")); - goto end; - } - - result = acpi_battery_set_mode(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_set_mode() failed\n")); - goto end; - } - - result = acpi_battery_get_info(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_info() failed\n")); - goto end; - } - - result = acpi_battery_get_state(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_state() failed\n")); - goto end; - } - - result = acpi_battery_get_alarm(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_alarm() failed\n")); - goto end; - } - - end: - return result; -} - -static int acpi_ac_get_present(struct acpi_sbs *sbs) -{ - struct acpi_ec_smbus *smbus = sbs->smbus; - int result = 0; - s16 charger_status; - - result = acpi_sbs_smbus_read_word(smbus, ACPI_SBC_SMBUS_ADDR, 0x13, - &charger_status, NULL); - - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_smbus_read_word() failed\n")); - goto end; - } - - sbs->ac_present = (charger_status & 0x8000) >> 15; - - end: - - return result; -} - -/* -------------------------------------------------------------------------- - FS Interface (/proc/acpi) - -------------------------------------------------------------------------- */ - -/* Generic Routines */ - -static int -acpi_sbs_generic_add_fs(struct proc_dir_entry **dir, - struct proc_dir_entry *parent_dir, - char *dir_name, - struct file_operations *info_fops, - struct file_operations *state_fops, - struct file_operations *alarm_fops, void *data) -{ - struct proc_dir_entry *entry = NULL; - - if (!*dir) { - *dir = proc_mkdir(dir_name, parent_dir); - if (!*dir) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "proc_mkdir() failed\n")); - return -ENODEV; - } - (*dir)->owner = THIS_MODULE; - } - - /* 'info' [R] */ - if (info_fops) { - entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir); - if (!entry) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "create_proc_entry() failed\n")); - } else { - entry->proc_fops = info_fops; - entry->data = data; - entry->owner = THIS_MODULE; - } - } - - /* 'state' [R] */ - if (state_fops) { - entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir); - if (!entry) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "create_proc_entry() failed\n")); - } else { - entry->proc_fops = state_fops; - entry->data = data; - entry->owner = THIS_MODULE; - } - } - - /* 'alarm' [R/W] */ - if (alarm_fops) { - entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir); - if (!entry) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "create_proc_entry() failed\n")); - } else { - entry->proc_fops = alarm_fops; - entry->data = data; - entry->owner = THIS_MODULE; - } - } - - return 0; -} - -static void -acpi_sbs_generic_remove_fs(struct proc_dir_entry **dir, - struct proc_dir_entry *parent_dir) -{ - - if (*dir) { - remove_proc_entry(ACPI_SBS_FILE_INFO, *dir); - remove_proc_entry(ACPI_SBS_FILE_STATE, *dir); - remove_proc_entry(ACPI_SBS_FILE_ALARM, *dir); - remove_proc_entry((*dir)->name, parent_dir); - *dir = NULL; - } - -} - -/* Smart Battery Interface */ - -static struct proc_dir_entry *acpi_battery_dir = NULL; - -static int acpi_battery_read_info(struct seq_file *seq, void *offset) -{ - struct acpi_battery *battery = (struct acpi_battery *)seq->private; - int cscale; - int result = 0; - - if (battery->sbs->zombie) { - return -ENODEV; - } - - down(&sbs_sem); - - if (update_mode == REQUEST_UPDATE_MODE) { - result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_INFO); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_update_run() failed\n")); - } - } - - if (acpi_battery_is_present(battery)) { - seq_printf(seq, "present: yes\n"); - } else { - seq_printf(seq, "present: no\n"); - goto end; - } - - if (battery->info.capacity_mode) { - cscale = battery->info.vscale * battery->info.ipscale; - } else { - cscale = battery->info.ipscale; - } - seq_printf(seq, "design capacity: %i%s", - battery->info.design_capacity * cscale, - battery->info.capacity_mode ? "0 mWh\n" : " mAh\n"); - - seq_printf(seq, "last full capacity: %i%s", - battery->info.full_charge_capacity * cscale, - battery->info.capacity_mode ? "0 mWh\n" : " mAh\n"); - - seq_printf(seq, "battery technology: rechargeable\n"); - - seq_printf(seq, "design voltage: %i mV\n", - battery->info.design_voltage * battery->info.vscale); - - seq_printf(seq, "design capacity warning: unknown\n"); - seq_printf(seq, "design capacity low: unknown\n"); - seq_printf(seq, "capacity granularity 1: unknown\n"); - seq_printf(seq, "capacity granularity 2: unknown\n"); - - seq_printf(seq, "model number: %s\n", - battery->info.device_name); - - seq_printf(seq, "serial number: %i\n", - battery->info.serial_number); - - seq_printf(seq, "battery type: %s\n", - battery->info.device_chemistry); - - seq_printf(seq, "OEM info: %s\n", - battery->info.manufacturer_name); - - end: - - up(&sbs_sem); - - return result; -} - -static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, acpi_battery_read_info, PDE(inode)->data); -} - -static int acpi_battery_read_state(struct seq_file *seq, void *offset) -{ - struct acpi_battery *battery = (struct acpi_battery *)seq->private; - int result = 0; - int cscale; - int foo; - - if (battery->sbs->zombie) { - return -ENODEV; - } - - down(&sbs_sem); - - if (update_mode == REQUEST_UPDATE_MODE) { - result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_STATE); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_update_run() failed\n")); - } - } - - if (acpi_battery_is_present(battery)) { - seq_printf(seq, "present: yes\n"); - } else { - seq_printf(seq, "present: no\n"); - goto end; - } - - if (battery->info.capacity_mode) { - cscale = battery->info.vscale * battery->info.ipscale; - } else { - cscale = battery->info.ipscale; - } - - if (battery->state.battery_status & 0x0010) { - seq_printf(seq, "capacity state: critical\n"); - } else { - seq_printf(seq, "capacity state: ok\n"); - } - if (battery->state.amperage < 0) { - seq_printf(seq, "charging state: discharging\n"); - foo = battery->state.remaining_capacity * cscale * 60 / - (battery->state.average_time_to_empty == 0 ? 1 : - battery->state.average_time_to_empty); - seq_printf(seq, "present rate: %i%s\n", - foo, battery->info.capacity_mode ? "0 mW" : " mA"); - } else if (battery->state.amperage > 0) { - seq_printf(seq, "charging state: charging\n"); - foo = (battery->info.full_charge_capacity - - battery->state.remaining_capacity) * cscale * 60 / - (battery->state.average_time_to_full == 0 ? 1 : - battery->state.average_time_to_full); - seq_printf(seq, "present rate: %i%s\n", - foo, battery->info.capacity_mode ? "0 mW" : " mA"); - } else { - seq_printf(seq, "charging state: charged\n"); - seq_printf(seq, "present rate: 0 %s\n", - battery->info.capacity_mode ? "mW" : "mA"); - } - - seq_printf(seq, "remaining capacity: %i%s", - battery->state.remaining_capacity * cscale, - battery->info.capacity_mode ? "0 mWh\n" : " mAh\n"); - - seq_printf(seq, "present voltage: %i mV\n", - battery->state.voltage * battery->info.vscale); - - end: - - up(&sbs_sem); - - return result; -} - -static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, acpi_battery_read_state, PDE(inode)->data); -} - -static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) -{ - struct acpi_battery *battery = (struct acpi_battery *)seq->private; - int result = 0; - int cscale; - - if (battery->sbs->zombie) { - return -ENODEV; - } - - down(&sbs_sem); - - if (update_mode == REQUEST_UPDATE_MODE) { - result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_ALARM); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_update_run() failed\n")); - } - } - - if (!acpi_battery_is_present(battery)) { - seq_printf(seq, "present: no\n"); - goto end; - } - - if (battery->info.capacity_mode) { - cscale = battery->info.vscale * battery->info.ipscale; - } else { - cscale = battery->info.ipscale; - } - - seq_printf(seq, "alarm: "); - if (battery->alarm.remaining_capacity) { - seq_printf(seq, "%i%s", - battery->alarm.remaining_capacity * cscale, - battery->info.capacity_mode ? "0 mWh\n" : " mAh\n"); - } else { - seq_printf(seq, "disabled\n"); - } - - end: - - up(&sbs_sem); - - return result; -} - -static ssize_t -acpi_battery_write_alarm(struct file *file, const char __user * buffer, - size_t count, loff_t * ppos) -{ - struct seq_file *seq = (struct seq_file *)file->private_data; - struct acpi_battery *battery = (struct acpi_battery *)seq->private; - char alarm_string[12] = { '\0' }; - int result, old_alarm, new_alarm; - - if (battery->sbs->zombie) { - return -ENODEV; - } - - down(&sbs_sem); - - if (!acpi_battery_is_present(battery)) { - result = -ENODEV; - goto end; - } - - if (count > sizeof(alarm_string) - 1) { - result = -EINVAL; - goto end; - } - - if (copy_from_user(alarm_string, buffer, count)) { - result = -EFAULT; - goto end; - } - - alarm_string[count] = 0; - - old_alarm = battery->alarm.remaining_capacity; - new_alarm = simple_strtoul(alarm_string, NULL, 0); - - result = acpi_battery_set_alarm(battery, new_alarm); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_set_alarm() failed\n")); - (void)acpi_battery_set_alarm(battery, old_alarm); - goto end; - } - result = acpi_battery_get_alarm(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_alarm() failed\n")); - (void)acpi_battery_set_alarm(battery, old_alarm); - goto end; - } - - end: - up(&sbs_sem); - - if (result) { - return result; - } else { - return count; - } -} - -static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); -} - -static struct file_operations acpi_battery_info_fops = { - .open = acpi_battery_info_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; - -static struct file_operations acpi_battery_state_fops = { - .open = acpi_battery_state_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; - -static struct file_operations acpi_battery_alarm_fops = { - .open = acpi_battery_alarm_open_fs, - .read = seq_read, - .write = acpi_battery_write_alarm, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; - -/* Legacy AC Adapter Interface */ - -static struct proc_dir_entry *acpi_ac_dir = NULL; - -static int acpi_ac_read_state(struct seq_file *seq, void *offset) -{ - struct acpi_sbs *sbs = (struct acpi_sbs *)seq->private; - int result; - - if (sbs->zombie) { - return -ENODEV; - } - - down(&sbs_sem); - - if (update_mode == REQUEST_UPDATE_MODE) { - result = acpi_sbs_update_run(sbs, DATA_TYPE_AC_STATE); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_update_run() failed\n")); - } - } - - seq_printf(seq, "state: %s\n", - sbs->ac_present ? "on-line" : "off-line"); - - up(&sbs_sem); - - return 0; -} - -static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) -{ - return single_open(file, acpi_ac_read_state, PDE(inode)->data); -} - -static struct file_operations acpi_ac_state_fops = { - .open = acpi_ac_state_open_fs, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; - -/* -------------------------------------------------------------------------- - Driver Interface - -------------------------------------------------------------------------- */ - -/* Smart Battery */ - -static int acpi_battery_add(struct acpi_sbs *sbs, int id) -{ - int is_present; - int result; - char dir_name[32]; - struct acpi_battery *battery; - - battery = &sbs->battery[id]; - - battery->alive = 0; - - battery->init_state = 0; - battery->id = id; - battery->sbs = sbs; - - result = acpi_battery_select(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_select() failed\n")); - goto end; - } - - result = acpi_battery_get_present(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_present() failed\n")); - goto end; - } - - is_present = acpi_battery_is_present(battery); - - if (is_present) { - result = acpi_battery_init(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_init() failed\n")); - goto end; - } - battery->init_state = 1; - } - - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); - - result = acpi_sbs_generic_add_fs(&battery->battery_entry, - acpi_battery_dir, - dir_name, - &acpi_battery_info_fops, - &acpi_battery_state_fops, - &acpi_battery_alarm_fops, battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_generic_add_fs() failed\n")); - goto end; - } - battery->alive = 1; - - end: - return result; -} - -static void acpi_battery_remove(struct acpi_sbs *sbs, int id) -{ - - if (sbs->battery[id].battery_entry) { - acpi_sbs_generic_remove_fs(&(sbs->battery[id].battery_entry), - acpi_battery_dir); - } -} - -static int acpi_ac_add(struct acpi_sbs *sbs) -{ - int result; - - result = acpi_ac_get_present(sbs); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_ac_get_present() failed\n")); - goto end; - } - - result = acpi_sbs_generic_add_fs(&sbs->ac_entry, - acpi_ac_dir, - ACPI_AC_DIR_NAME, - NULL, &acpi_ac_state_fops, NULL, sbs); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_generic_add_fs() failed\n")); - goto end; - } - - end: - - return result; -} - -static void acpi_ac_remove(struct acpi_sbs *sbs) -{ - - if (sbs->ac_entry) { - acpi_sbs_generic_remove_fs(&sbs->ac_entry, acpi_ac_dir); - } -} - -static void acpi_sbs_update_queue_run(unsigned long data) -{ - acpi_os_execute(OSL_GPE_HANDLER, acpi_sbs_update_queue, (void *)data); -} - -static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type) -{ - struct acpi_battery *battery; - int result = 0; - int old_ac_present; - int old_battery_present; - int new_ac_present; - int new_battery_present; - int id; - char dir_name[32]; - int do_battery_init, do_ac_init; - s16 old_remaining_capacity; - - if (sbs->zombie) { - goto end; - } - - old_ac_present = acpi_ac_is_present(sbs); - - result = acpi_ac_get_present(sbs); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_ac_get_present() failed\n")); - } - - new_ac_present = acpi_ac_is_present(sbs); - - do_ac_init = (old_ac_present != new_ac_present); - - if (data_type == DATA_TYPE_AC_STATE) { - goto end; - } - - for (id = 0; id < MAX_SBS_BAT; id++) { - battery = &sbs->battery[id]; - if (battery->alive == 0) { - continue; - } - - old_remaining_capacity = battery->state.remaining_capacity; - - old_battery_present = acpi_battery_is_present(battery); - - result = acpi_battery_select(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_select() failed\n")); - } - if (sbs->zombie) { - goto end; - } - - result = acpi_battery_get_present(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_present() failed\n")); - } - if (sbs->zombie) { - goto end; - } - - new_battery_present = acpi_battery_is_present(battery); - - do_battery_init = ((old_battery_present != new_battery_present) - && new_battery_present); - - if (sbs->zombie) { - goto end; - } - if (do_ac_init || do_battery_init || - update_info_mode || sbs->update_info_mode) { - if (sbs->update_info_mode) { - sbs->update_info_mode = 0; - } else { - sbs->update_info_mode = 1; - } - result = acpi_battery_init(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_init() " - "failed\n")); - } - } - if (data_type == DATA_TYPE_INFO) { - continue; - } - - if (sbs->zombie) { - goto end; - } - if (new_battery_present) { - result = acpi_battery_get_alarm(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_alarm() " - "failed\n")); - } - if (data_type == DATA_TYPE_ALARM) { - continue; - } - - result = acpi_battery_get_state(battery); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_get_state() " - "failed\n")); - } - } - if (sbs->zombie) { - goto end; - } - if (data_type != DATA_TYPE_COMMON) { - continue; - } - - if (old_battery_present != new_battery_present) { - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); - result = acpi_sbs_generate_event(sbs->device, - ACPI_SBS_BATTERY_NOTIFY_STATUS, - new_battery_present, - dir_name, - ACPI_BATTERY_CLASS); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_generate_event() " - "failed\n")); - } - } - if (old_remaining_capacity != battery->state.remaining_capacity) { - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); - result = acpi_sbs_generate_event(sbs->device, - ACPI_SBS_BATTERY_NOTIFY_STATUS, - new_battery_present, - dir_name, - ACPI_BATTERY_CLASS); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_generate_event() failed\n")); - } - } - - } - if (sbs->zombie) { - goto end; - } - if (data_type != DATA_TYPE_COMMON) { - goto end; - } - - if (old_ac_present != new_ac_present) { - result = acpi_sbs_generate_event(sbs->device, - ACPI_SBS_AC_NOTIFY_STATUS, - new_ac_present, - ACPI_AC_DIR_NAME, - ACPI_AC_CLASS); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_generate_event() failed\n")); - } - } - - end: - return result; -} - -static void acpi_sbs_update_queue(void *data) -{ - struct acpi_sbs *sbs = data; - unsigned long delay = -1; - int result; - - if (sbs->zombie) { - goto end; - } - - result = acpi_sbs_update_run(sbs, DATA_TYPE_COMMON); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_update_run() failed\n")); - } - - if (sbs->zombie) { - goto end; - } - - if (update_mode == REQUEST_UPDATE_MODE) { - goto end; - } - - delay = jiffies + HZ * update_time; - sbs->update_timer.data = (unsigned long)data; - sbs->update_timer.function = acpi_sbs_update_queue_run; - sbs->update_timer.expires = delay; - add_timer(&sbs->update_timer); - end: - ; -} - -static int acpi_sbs_add(struct acpi_device *device) -{ - struct acpi_sbs *sbs = NULL; - struct acpi_ec_hc *ec_hc = NULL; - int result, remove_result = 0; - unsigned long sbs_obj; - int id, cnt; - acpi_status status = AE_OK; - - sbs = kmalloc(sizeof(struct acpi_sbs), GFP_KERNEL); - if (!sbs) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "kmalloc() failed\n")); - return -ENOMEM; - } - memset(sbs, 0, sizeof(struct acpi_sbs)); - - cnt = 0; - while (cnt < 10) { - cnt++; - ec_hc = acpi_get_ec_hc(device); - if (ec_hc) { - break; - } - msleep(1000); - } - - if (!ec_hc) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_get_ec_hc() failed: " - "NO driver found for EC HC SMBus\n")); - result = -ENODEV; - goto end; - } - - sbs->device = device; - sbs->smbus = ec_hc->smbus; - - strcpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME); - strcpy(acpi_device_class(device), ACPI_SBS_CLASS); - acpi_driver_data(device) = sbs; - - sbs->update_time = 0; - sbs->update_time2 = 0; - - result = acpi_ac_add(sbs); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_ac_add() failed\n")); - goto end; - } - result = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj); - if (ACPI_FAILURE(result)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_evaluate_integer() failed\n")); - result = -EIO; - goto end; - } - - if (sbs_obj > 0) { - result = acpi_sbsm_get_info(sbs); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbsm_get_info() failed\n")); - goto end; - } - sbs->sbsm_present = 1; - } - if (sbs->sbsm_present == 0) { - result = acpi_battery_add(sbs, 0); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_add() failed\n")); - goto end; - } - } else { - for (id = 0; id < MAX_SBS_BAT; id++) { - if ((sbs->sbsm_batteries_supported & (1 << id))) { - result = acpi_battery_add(sbs, id); - if (result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_battery_add() " - "failed\n")); - goto end; - } - } - } - } - - sbs->handle = device->handle; - - init_timer(&sbs->update_timer); - if (update_mode == QUEUE_UPDATE_MODE) { - status = acpi_os_execute(OSL_GPE_HANDLER, - acpi_sbs_update_queue, (void *)sbs); - if (status != AE_OK) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_os_execute() failed\n")); - } - } - sbs->update_time = update_time; - sbs->update_time2 = update_time2; - - printk(KERN_INFO PREFIX "%s [%s]\n", - acpi_device_name(device), acpi_device_bid(device)); - - end: - if (result) { - remove_result = acpi_sbs_remove(device, 0); - if (remove_result) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_sbs_remove() failed\n")); - } - } - - return result; -} - -int acpi_sbs_remove(struct acpi_device *device, int type) -{ - struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); - int id; - - if (!device || !sbs) { - return -EINVAL; - } - - sbs->zombie = 1; - sbs->update_time = 0; - sbs->update_time2 = 0; - del_timer_sync(&sbs->update_timer); - acpi_os_wait_events_complete(NULL); - del_timer_sync(&sbs->update_timer); - - for (id = 0; id < MAX_SBS_BAT; id++) { - acpi_battery_remove(sbs, id); - } - - acpi_ac_remove(sbs); - - kfree(sbs); - - return 0; -} - -static int __init acpi_sbs_init(void) -{ - int result = 0; - - if (acpi_disabled) - return -ENODEV; - - init_MUTEX(&sbs_sem); - - if (capacity_mode != DEF_CAPACITY_UNIT - && capacity_mode != MAH_CAPACITY_UNIT - && capacity_mode != MWH_CAPACITY_UNIT) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_sbs_init: " - "invalid capacity_mode = %d\n", - capacity_mode)); - return -EINVAL; - } - - acpi_ac_dir = acpi_lock_ac_dir(); - if (!acpi_ac_dir) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_lock_ac_dir() failed\n")); - return -ENODEV; - } - - acpi_battery_dir = acpi_lock_battery_dir(); - if (!acpi_battery_dir) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_lock_battery_dir() failed\n")); - return -ENODEV; - } - - result = acpi_bus_register_driver(&acpi_sbs_driver); - if (result < 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "acpi_bus_register_driver() failed\n")); - return -ENODEV; - } - - return 0; -} - -static void __exit acpi_sbs_exit(void) -{ - - acpi_bus_unregister_driver(&acpi_sbs_driver); - - acpi_unlock_ac_dir(acpi_ac_dir); - acpi_ac_dir = NULL; - acpi_unlock_battery_dir(acpi_battery_dir); - acpi_battery_dir = NULL; - - return; -} - -module_init(acpi_sbs_init); -module_exit(acpi_sbs_exit); diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 698a1540e..a0ab828b2 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -114,8 +113,6 @@ static struct kset acpi_namespace_kset = { static void acpi_device_register(struct acpi_device *device, struct acpi_device *parent) { - int err; - /* * Linkage * ------- @@ -141,14 +138,11 @@ static void acpi_device_register(struct acpi_device *device, device->kobj.parent = &parent->kobj; device->kobj.ktype = &ktype_acpi_ns; device->kobj.kset = &acpi_namespace_kset; - err = kobject_register(&device->kobj); - if (err < 0) - printk(KERN_WARNING "%s: kobject_register error: %d\n", - __FUNCTION__, err); + kobject_register(&device->kobj); create_sysfs_device_files(device); } -static void acpi_device_unregister(struct acpi_device *device, int type) +static int acpi_device_unregister(struct acpi_device *device, int type) { spin_lock(&acpi_device_lock); if (device->parent) { @@ -164,14 +158,16 @@ static void acpi_device_unregister(struct acpi_device *device, int type) acpi_detach_data(device->handle, acpi_bus_data_handler); remove_sysfs_device_files(device); kobject_unregister(&device->kobj); + return 0; } void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context) { + ACPI_FUNCTION_TRACE("acpi_bus_data_handler"); /* TBD */ - return; + return_VOID; } static int acpi_bus_get_power_flags(struct acpi_device *device) @@ -180,6 +176,7 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) acpi_handle handle = NULL; u32 i = 0; + ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags"); /* * Power Management Flags @@ -232,14 +229,17 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) device->power.state = ACPI_STATE_UNKNOWN; - return 0; + return_VALUE(0); } int acpi_match_ids(struct acpi_device *device, char *ids) { + int error = 0; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + if (device->flags.hardware_id) if (strstr(ids, device->pnp.hardware_id)) - return 0; + goto Done; if (device->flags.compatible_ids) { struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; @@ -248,10 +248,15 @@ int acpi_match_ids(struct acpi_device *device, char *ids) /* compare multiple _CID entries against driver ids */ for (i = 0; i < cid_list->count; i++) { if (strstr(ids, cid_list->id[i].value)) - return 0; + goto Done; } } - return -ENOENT; + error = -ENOENT; + + Done: + if (buffer.pointer) + acpi_os_free(buffer.pointer); + return error; } static acpi_status @@ -310,22 +315,24 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *package = NULL; + ACPI_FUNCTION_TRACE("acpi_bus_get_wakeup_flags"); /* _PRW */ status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRW")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRW\n")); goto end; } package = (union acpi_object *)buffer.pointer; status = acpi_bus_extract_wakeup_device_power_package(device, package); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error extracting _PRW package\n")); goto end; } - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); device->wakeup.flags.valid = 1; /* Power button, Lid switch always enable wakeup */ @@ -335,7 +342,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device) end: if (ACPI_FAILURE(status)) device->flags.wake_capable = 0; - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -434,7 +441,10 @@ acpi_eject_store(struct acpi_device *device, const char *buf, size_t count) islockable = device->flags.lockable; handle = device->handle; - result = acpi_bus_trim(device, 1); + if (type == ACPI_TYPE_PROCESSOR) + result = acpi_bus_trim(device, 0); + else + result = acpi_bus_trim(device, 1); if (!result) result = acpi_eject_operation(handle, islockable); @@ -461,6 +471,7 @@ static int acpi_bus_get_perf_flags(struct acpi_device *device) -------------------------------------------------------------------------- */ static LIST_HEAD(acpi_bus_drivers); +static DECLARE_MUTEX(acpi_bus_drivers_lock); /** * acpi_bus_match - match device IDs to driver's supported IDs @@ -491,18 +502,19 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_bus_driver_init"); if (!device || !driver) - return -EINVAL; + return_VALUE(-EINVAL); if (!driver->ops.add) - return -ENOSYS; + return_VALUE(-ENOSYS); result = driver->ops.add(device); if (result) { device->driver = NULL; acpi_driver_data(device) = NULL; - return result; + return_VALUE(result); } device->driver = driver; @@ -514,7 +526,7 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Driver successfully bound to device\n")); - return 0; + return_VALUE(0); } static int acpi_start_single_object(struct acpi_device *device) @@ -522,9 +534,10 @@ static int acpi_start_single_object(struct acpi_device *device) int result = 0; struct acpi_driver *driver; + ACPI_FUNCTION_TRACE("acpi_start_single_object"); if (!(driver = device->driver)) - return 0; + return_VALUE(0); if (driver->ops.start) { result = driver->ops.start(device); @@ -532,13 +545,15 @@ static int acpi_start_single_object(struct acpi_device *device) driver->ops.remove(device, ACPI_BUS_REMOVAL_NORMAL); } - return result; + return_VALUE(result); } -static void acpi_driver_attach(struct acpi_driver *drv) +static int acpi_driver_attach(struct acpi_driver *drv) { struct list_head *node, *next; + int count = 0; + ACPI_FUNCTION_TRACE("acpi_driver_attach"); spin_lock(&acpi_device_lock); list_for_each_safe(node, next, &acpi_device_list) { @@ -553,6 +568,7 @@ static void acpi_driver_attach(struct acpi_driver *drv) if (!acpi_bus_driver_init(dev, drv)) { acpi_start_single_object(dev); atomic_inc(&drv->references); + count++; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found driver [%s] for device [%s]\n", drv->name, dev->pnp.bus_id)); @@ -561,12 +577,14 @@ static void acpi_driver_attach(struct acpi_driver *drv) spin_lock(&acpi_device_lock); } spin_unlock(&acpi_device_lock); + return_VALUE(count); } -static void acpi_driver_detach(struct acpi_driver *drv) +static int acpi_driver_detach(struct acpi_driver *drv) { struct list_head *node, *next; + ACPI_FUNCTION_TRACE("acpi_driver_detach"); spin_lock(&acpi_device_lock); list_for_each_safe(node, next, &acpi_device_list) { @@ -584,6 +602,7 @@ static void acpi_driver_detach(struct acpi_driver *drv) } } spin_unlock(&acpi_device_lock); + return_VALUE(0); } /** @@ -591,21 +610,28 @@ static void acpi_driver_detach(struct acpi_driver *drv) * @driver: driver being registered * * Registers a driver with the ACPI bus. Searches the namespace for all - * devices that match the driver's criteria and binds. Returns zero for - * success or a negative error status for failure. + * devices that match the driver's criteria and binds. Returns the + * number of devices that were claimed by the driver, or a negative + * error status for failure. */ int acpi_bus_register_driver(struct acpi_driver *driver) { + int count; + + ACPI_FUNCTION_TRACE("acpi_bus_register_driver"); if (acpi_disabled) - return -ENODEV; + return_VALUE(-ENODEV); + + if (!driver) + return_VALUE(-EINVAL); spin_lock(&acpi_device_lock); list_add_tail(&driver->node, &acpi_bus_drivers); spin_unlock(&acpi_device_lock); - acpi_driver_attach(driver); + count = acpi_driver_attach(driver); - return 0; + return_VALUE(count); } EXPORT_SYMBOL(acpi_bus_register_driver); @@ -617,16 +643,23 @@ EXPORT_SYMBOL(acpi_bus_register_driver); * Unregisters a driver with the ACPI bus. Searches the namespace for all * devices that match the driver's criteria and unbinds. */ -void acpi_bus_unregister_driver(struct acpi_driver *driver) +int acpi_bus_unregister_driver(struct acpi_driver *driver) { - acpi_driver_detach(driver); + int error = 0; - if (!atomic_read(&driver->references)) { - spin_lock(&acpi_device_lock); - list_del_init(&driver->node); - spin_unlock(&acpi_device_lock); - } - return; + ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver"); + + if (driver) { + acpi_driver_detach(driver); + + if (!atomic_read(&driver->references)) { + spin_lock(&acpi_device_lock); + list_del_init(&driver->node); + spin_unlock(&acpi_device_lock); + } + } else + error = -EINVAL; + return_VALUE(error); } EXPORT_SYMBOL(acpi_bus_unregister_driver); @@ -643,6 +676,7 @@ static int acpi_bus_find_driver(struct acpi_device *device) int result = 0; struct list_head *node, *next; + ACPI_FUNCTION_TRACE("acpi_bus_find_driver"); spin_lock(&acpi_device_lock); list_for_each_safe(node, next, &acpi_bus_drivers) { @@ -662,41 +696,19 @@ static int acpi_bus_find_driver(struct acpi_device *device) spin_unlock(&acpi_device_lock); Done: - return result; + return_VALUE(result); } /* -------------------------------------------------------------------------- Device Enumeration -------------------------------------------------------------------------- */ -acpi_status -acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) -{ - acpi_status status; - acpi_handle tmp; - struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; - union acpi_object *obj; - - status = acpi_get_handle(handle, "_EJD", &tmp); - if (ACPI_FAILURE(status)) - return status; - - status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); - if (ACPI_SUCCESS(status)) { - obj = buffer.pointer; - status = acpi_get_handle(NULL, obj->string.pointer, ejd); - kfree(buffer.pointer); - } - return status; -} -EXPORT_SYMBOL_GPL(acpi_bus_get_ejd); - - static int acpi_bus_get_flags(struct acpi_device *device) { acpi_status status = AE_OK; acpi_handle temp = NULL; + ACPI_FUNCTION_TRACE("acpi_bus_get_flags"); /* Presence of _STA indicates 'dynamic_status' */ status = acpi_get_handle(device->handle, "_STA", &temp); @@ -742,7 +754,7 @@ static int acpi_bus_get_flags(struct acpi_device *device) /* TBD: Peformance management */ - return 0; + return_VALUE(0); } static void acpi_device_get_busid(struct acpi_device *device, @@ -860,7 +872,7 @@ static void acpi_device_set_id(struct acpi_device *device, printk(KERN_ERR "Memory allocation error\n"); } - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); } static int acpi_device_set_context(struct acpi_device *device, int type) @@ -936,9 +948,10 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) int result = 0; struct acpi_driver *driver; + ACPI_FUNCTION_TRACE("acpi_bus_remove"); if (!dev) - return -EINVAL; + return_VALUE(-EINVAL); driver = dev->driver; @@ -947,12 +960,12 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) if (driver->ops.stop) { result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT); if (result) - return result; + return_VALUE(result); } result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT); if (result) { - return result; + return_VALUE(result); } atomic_dec(&dev->driver->references); @@ -961,7 +974,7 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) } if (!rmdevice) - return 0; + return_VALUE(0); if (dev->flags.bus_address) { if ((dev->parent) && (dev->parent->ops.unbind)) @@ -970,7 +983,7 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice) acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); - return 0; + return_VALUE(0); } static int @@ -980,14 +993,15 @@ acpi_add_single_object(struct acpi_device **child, int result = 0; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_add_single_object"); if (!child) - return -EINVAL; + return_VALUE(-EINVAL); device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); if (!device) { - printk(KERN_ERR PREFIX "Memory allocation error\n"); - return -ENOMEM; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); + return_VALUE(-ENOMEM); } memset(device, 0, sizeof(struct acpi_device)); @@ -1112,7 +1126,7 @@ acpi_add_single_object(struct acpi_device **child, kfree(device); } - return result; + return_VALUE(result); } static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) @@ -1125,9 +1139,10 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) acpi_object_type type = 0; u32 level = 1; + ACPI_FUNCTION_TRACE("acpi_bus_scan"); if (!start) - return -EINVAL; + return_VALUE(-EINVAL); parent = start; phandle = start->handle; @@ -1224,7 +1239,7 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) } } - return 0; + return_VALUE(0); } int @@ -1234,6 +1249,7 @@ acpi_bus_add(struct acpi_device **child, int result; struct acpi_bus_ops ops; + ACPI_FUNCTION_TRACE("acpi_bus_add"); result = acpi_add_single_object(child, parent, handle, type); if (!result) { @@ -1241,7 +1257,7 @@ acpi_bus_add(struct acpi_device **child, ops.acpi_op_add = 1; result = acpi_bus_scan(*child, &ops); } - return result; + return_VALUE(result); } EXPORT_SYMBOL(acpi_bus_add); @@ -1251,9 +1267,10 @@ int acpi_bus_start(struct acpi_device *device) int result; struct acpi_bus_ops ops; + ACPI_FUNCTION_TRACE("acpi_bus_start"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); result = acpi_start_single_object(device); if (!result) { @@ -1261,7 +1278,7 @@ int acpi_bus_start(struct acpi_device *device) ops.acpi_op_start = 1; result = acpi_bus_scan(device, &ops); } - return result; + return_VALUE(result); } EXPORT_SYMBOL(acpi_bus_start); @@ -1327,9 +1344,10 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) int result = 0; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed"); if (!root) - return -ENODEV; + return_VALUE(-ENODEV); /* * Enumerate all fixed-feature devices. @@ -1350,121 +1368,20 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) result = acpi_start_single_object(device); } - return result; -} - - -static inline struct acpi_device * to_acpi_dev(struct device * dev) -{ - return container_of(dev, struct acpi_device, dev); -} - - -static int root_suspend(struct acpi_device * acpi_dev, pm_message_t state) -{ - struct acpi_device * dev, * next; - int result; - - spin_lock(&acpi_device_lock); - list_for_each_entry_safe_reverse(dev, next, &acpi_device_list, g_list) { - if (dev->driver && dev->driver->ops.suspend) { - spin_unlock(&acpi_device_lock); - result = dev->driver->ops.suspend(dev, 0); - if (result) { - printk(KERN_ERR PREFIX "[%s - %s] Suspend failed: %d\n", - acpi_device_name(dev), - acpi_device_bid(dev), result); - } - spin_lock(&acpi_device_lock); - } - } - spin_unlock(&acpi_device_lock); - return 0; -} - - -static int acpi_device_suspend(struct device * dev, pm_message_t state) -{ - struct acpi_device * acpi_dev = to_acpi_dev(dev); - - /* - * For now, we should only register 1 generic device - - * the ACPI root device - and from there, we walk the - * tree of ACPI devices to suspend each one using the - * ACPI driver methods. - */ - if (acpi_dev->handle == ACPI_ROOT_OBJECT) - root_suspend(acpi_dev, state); - return 0; -} - - - -static int root_resume(struct acpi_device * acpi_dev) -{ - struct acpi_device * dev, * next; - int result; - - spin_lock(&acpi_device_lock); - list_for_each_entry_safe(dev, next, &acpi_device_list, g_list) { - if (dev->driver && dev->driver->ops.resume) { - spin_unlock(&acpi_device_lock); - result = dev->driver->ops.resume(dev, 0); - if (result) { - printk(KERN_ERR PREFIX "[%s - %s] resume failed: %d\n", - acpi_device_name(dev), - acpi_device_bid(dev), result); - } - spin_lock(&acpi_device_lock); - } - } - spin_unlock(&acpi_device_lock); - return 0; -} - - -static int acpi_device_resume(struct device * dev) -{ - struct acpi_device * acpi_dev = to_acpi_dev(dev); - - /* - * For now, we should only register 1 generic device - - * the ACPI root device - and from there, we walk the - * tree of ACPI devices to resume each one using the - * ACPI driver methods. - */ - if (acpi_dev->handle == ACPI_ROOT_OBJECT) - root_resume(acpi_dev); - return 0; + return_VALUE(result); } - -static struct bus_type acpi_bus_type = { - .name = "acpi", - .suspend = acpi_device_suspend, - .resume = acpi_device_resume, -}; - - - static int __init acpi_scan_init(void) { int result; struct acpi_bus_ops ops; + ACPI_FUNCTION_TRACE("acpi_scan_init"); if (acpi_disabled) - return 0; - - result = kset_register(&acpi_namespace_kset); - if (result < 0) - printk(KERN_ERR PREFIX "kset_register error: %d\n", result); + return_VALUE(0); - result = bus_register(&acpi_bus_type); - if (result) { - /* We don't want to quit even if we failed to add suspend/resume */ - printk(KERN_ERR PREFIX "Could not register bus type\n"); - } + kset_register(&acpi_namespace_kset); /* * Create the root device in the bus's device tree @@ -1475,16 +1392,6 @@ static int __init acpi_scan_init(void) goto Done; result = acpi_start_single_object(acpi_root); - if (result) - goto Done; - - acpi_root->dev.bus = &acpi_bus_type; - snprintf(acpi_root->dev.bus_id, BUS_ID_SIZE, "%s", acpi_bus_type.name); - result = device_register(&acpi_root->dev); - if (result) { - /* We don't want to quit even if we failed to add suspend/resume */ - printk(KERN_ERR PREFIX "Could not register device\n"); - } /* * Enumerate devices in the ACPI namespace. @@ -1501,7 +1408,7 @@ static int __init acpi_scan_init(void) acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL); Done: - return result; + return_VALUE(result); } subsys_initcall(acpi_scan_init); diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 62ce87d71..930427fc0 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c @@ -105,14 +105,6 @@ static int acpi_pm_enter(suspend_state_t pm_state) default: return -EINVAL; } - - /* ACPI 3.0 specs (P62) says that it's the responsabilty - * of the OSPM to clear the status bit [ implying that the - * POWER_BUTTON event should not reach userspace ] - */ - if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3)) - acpi_clear_event(ACPI_EVENT_POWER_BUTTON); - local_irq_restore(flags); printk(KERN_DEBUG "Back to C!\n"); diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 349625780..4696a85a9 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c @@ -434,7 +434,7 @@ acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file) PDE(inode)->data); } -static const struct file_operations acpi_system_wakeup_device_fops = { +static struct file_operations acpi_system_wakeup_device_fops = { .open = acpi_system_wakeup_device_open_fs, .read = seq_read, .write = acpi_system_write_wakeup_device, @@ -443,7 +443,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = { }; #ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP -static const struct file_operations acpi_system_sleep_fops = { +static struct file_operations acpi_system_sleep_fops = { .open = acpi_system_sleep_open_fs, .read = seq_read, .write = acpi_system_write_sleep, @@ -452,7 +452,7 @@ static const struct file_operations acpi_system_sleep_fops = { }; #endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ -static const struct file_operations acpi_system_alarm_fops = { +static struct file_operations acpi_system_alarm_fops = { .open = acpi_system_alarm_open_fs, .read = seq_read, .write = acpi_system_write_alarm, diff --git a/drivers/acpi/sleep/wakeup.c b/drivers/acpi/sleep/wakeup.c index af1dbabaf..85df0ceda 100644 --- a/drivers/acpi/sleep/wakeup.c +++ b/drivers/acpi/sleep/wakeup.c @@ -155,6 +155,7 @@ static int __init acpi_wakeup_device_init(void) if (acpi_disabled) return 0; + printk("ACPI wakeup devices: \n"); spin_lock(&acpi_device_lock); list_for_each_safe(node, next, &acpi_wakeup_device_list) { @@ -173,8 +174,10 @@ static int __init acpi_wakeup_device_init(void) dev->wakeup.state.enabled = 1; spin_lock(&acpi_device_lock); } + printk("%4s ", dev->pnp.bus_id); } spin_unlock(&acpi_device_lock); + printk("\n"); return 0; } diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index d86dcb3c2..e4308c7a6 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c @@ -39,7 +39,7 @@ ACPI_MODULE_NAME("acpi_system") #define ACPI_SYSTEM_FILE_EVENT "event" #define ACPI_SYSTEM_FILE_DSDT "dsdt" #define ACPI_SYSTEM_FILE_FADT "fadt" -extern struct fadt_descriptor acpi_fadt; +extern FADT_DESCRIPTOR acpi_fadt; /* -------------------------------------------------------------------------- FS Interface (/proc) @@ -47,9 +47,10 @@ extern struct fadt_descriptor acpi_fadt; static int acpi_system_read_info(struct seq_file *seq, void *offset) { + ACPI_FUNCTION_TRACE("acpi_system_read_info"); seq_printf(seq, "version: %x\n", ACPI_CA_VERSION); - return 0; + return_VALUE(0); } static int acpi_system_info_open_fs(struct inode *inode, struct file *file) @@ -57,7 +58,7 @@ static int acpi_system_info_open_fs(struct inode *inode, struct file *file) return single_open(file, acpi_system_read_info, PDE(inode)->data); } -static const struct file_operations acpi_system_info_ops = { +static struct file_operations acpi_system_info_ops = { .open = acpi_system_info_open_fs, .read = seq_read, .llseek = seq_lseek, @@ -67,7 +68,7 @@ static const struct file_operations acpi_system_info_ops = { static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t, loff_t *); -static const struct file_operations acpi_system_dsdt_ops = { +static struct file_operations acpi_system_dsdt_ops = { .read = acpi_system_read_dsdt, }; @@ -79,22 +80,23 @@ acpi_system_read_dsdt(struct file *file, struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; ssize_t res; + ACPI_FUNCTION_TRACE("acpi_system_read_dsdt"); - status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); + status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); res = simple_read_from_buffer(buffer, count, ppos, dsdt.pointer, dsdt.length); - kfree(dsdt.pointer); + acpi_os_free(dsdt.pointer); - return res; + return_VALUE(res); } static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t, loff_t *); -static const struct file_operations acpi_system_fadt_ops = { +static struct file_operations acpi_system_fadt_ops = { .read = acpi_system_read_fadt, }; @@ -106,16 +108,17 @@ acpi_system_read_fadt(struct file *file, struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; ssize_t res; + ACPI_FUNCTION_TRACE("acpi_system_read_fadt"); - status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); + status = acpi_get_table(ACPI_TABLE_FADT, 1, &fadt); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); res = simple_read_from_buffer(buffer, count, ppos, fadt.pointer, fadt.length); - kfree(fadt.pointer); + acpi_os_free(fadt.pointer); - return res; + return_VALUE(res); } static int __init acpi_system_init(void) @@ -124,9 +127,10 @@ static int __init acpi_system_init(void) int error = 0; char *name; + ACPI_FUNCTION_TRACE("acpi_system_init"); if (acpi_disabled) - return 0; + return_VALUE(0); /* 'info' [R] */ name = ACPI_SYSTEM_FILE_INFO; @@ -154,9 +158,12 @@ static int __init acpi_system_init(void) goto Error; Done: - return error; + return_VALUE(error); Error: + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' proc fs entry\n", name)); + remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir); remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir); remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir); diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index bfb3bfcf9..7f37c7cc5 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -281,8 +282,8 @@ acpi_get_table_header_early(enum acpi_table_id id, /* Map the DSDT header via the pointer in the FADT */ if (id == ACPI_DSDT) { - struct fadt_descriptor *fadt = - (struct fadt_descriptor *)*header; + struct fadt_descriptor_rev2 *fadt = + (struct fadt_descriptor_rev2 *)*header; if (fadt->revision == 3 && fadt->Xdsdt) { *header = (void *)__acpi_map_table(fadt->Xdsdt, diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index d697fcb35..03b37d222 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include @@ -54,15 +56,15 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct, acpi_physical_address address); static void -acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt, +acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, struct fadt_descriptor_rev1 *original_fadt); static void -acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt, - struct fadt_descriptor *original_fadt); +acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, + struct fadt_descriptor_rev2 *original_fadt); u8 acpi_fadt_is_v1; -ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) +EXPORT_SYMBOL(acpi_fadt_is_v1); /******************************************************************************* * @@ -120,7 +122,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) { acpi_size table_size; u32 i; - struct xsdt_descriptor *new_table; + XSDT_DESCRIPTOR *new_table; ACPI_FUNCTION_ENTRY(); @@ -131,7 +133,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) /* Allocate an XSDT */ - new_table = ACPI_ALLOCATE_ZEROED(table_size); + new_table = ACPI_MEM_CALLOCATE(table_size); if (!new_table) { return (AE_NO_MEMORY); } @@ -145,18 +147,17 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) /* Copy the table pointers */ for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { - /* RSDT pointers are 32 bits, XSDT pointers are 64 bits */ if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { ACPI_STORE_ADDRESS(new_table->table_offset_entry[i], (ACPI_CAST_PTR - (struct rsdt_descriptor, + (struct rsdt_descriptor_rev1, table_info->pointer))-> table_offset_entry[i]); } else { new_table->table_offset_entry[i] = - (ACPI_CAST_PTR(struct xsdt_descriptor, + (ACPI_CAST_PTR(XSDT_DESCRIPTOR, table_info->pointer))-> table_offset_entry[i]; } @@ -218,7 +219,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct, ******************************************************************************/ static void -acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt, +acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, struct fadt_descriptor_rev1 *original_fadt) { @@ -364,13 +365,14 @@ acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt, ******************************************************************************/ static void -acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt, - struct fadt_descriptor *original_fadt) +acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, + struct fadt_descriptor_rev2 *original_fadt) { /* We have an ACPI 2.0 FADT but we must copy it to our local buffer */ - ACPI_MEMCPY(local_fadt, original_fadt, sizeof(struct fadt_descriptor)); + ACPI_MEMCPY(local_fadt, original_fadt, + sizeof(struct fadt_descriptor_rev2)); /* * "X" fields are optional extensions to the original V1.0 fields, so @@ -489,10 +491,10 @@ acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt, acpi_status acpi_tb_convert_table_fadt(void) { - struct fadt_descriptor *local_fadt; + struct fadt_descriptor_rev2 *local_fadt; struct acpi_table_desc *table_desc; - ACPI_FUNCTION_TRACE(tb_convert_table_fadt); + ACPI_FUNCTION_TRACE("tb_convert_table_fadt"); /* * acpi_gbl_FADT is valid. Validate the FADT length. The table must be @@ -506,14 +508,13 @@ acpi_status acpi_tb_convert_table_fadt(void) /* Allocate buffer for the ACPI 2.0(+) FADT */ - local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor)); + local_fadt = ACPI_MEM_CALLOCATE(sizeof(struct fadt_descriptor_rev2)); if (!local_fadt) { return_ACPI_STATUS(AE_NO_MEMORY); } if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { - if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor)) { - + if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { /* Length is too short to be a V2.0 table */ ACPI_WARNING((AE_INFO, @@ -537,11 +538,11 @@ acpi_status acpi_tb_convert_table_fadt(void) /* Global FADT pointer will point to the new common V2.0 FADT */ acpi_gbl_FADT = local_fadt; - acpi_gbl_FADT->length = sizeof(struct fadt_descriptor); + acpi_gbl_FADT->length = sizeof(FADT_DESCRIPTOR); /* Free the original table */ - table_desc = acpi_gbl_table_lists[ACPI_TABLE_ID_FADT].next; + table_desc = acpi_gbl_table_lists[ACPI_TABLE_FADT].next; acpi_tb_delete_single_table(table_desc); /* Install the new table */ @@ -549,7 +550,7 @@ acpi_status acpi_tb_convert_table_fadt(void) table_desc->pointer = ACPI_CAST_PTR(struct acpi_table_header, acpi_gbl_FADT); table_desc->allocation = ACPI_MEM_ALLOCATED; - table_desc->length = sizeof(struct fadt_descriptor); + table_desc->length = sizeof(struct fadt_descriptor_rev2); /* Dump the entire FADT */ @@ -579,7 +580,7 @@ acpi_status acpi_tb_convert_table_fadt(void) acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info) { - ACPI_FUNCTION_TRACE(tb_build_common_facs); + ACPI_FUNCTION_TRACE("tb_build_common_facs"); /* Absolute minimum length is 24, but the ACPI spec says 64 */ @@ -602,7 +603,6 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info) if ((acpi_gbl_RSDP->revision < 2) || (acpi_gbl_FACS->length < 32) || (!(acpi_gbl_FACS->xfirmware_waking_vector))) { - /* ACPI 1.0 FACS or short table or optional X_ field is zero */ acpi_gbl_common_fACS.firmware_waking_vector = ACPI_CAST_PTR(u64, diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 7856db759..09b4ee6df 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c @@ -78,7 +78,7 @@ acpi_tb_get_table(struct acpi_pointer *address, acpi_status status; struct acpi_table_header header; - ACPI_FUNCTION_TRACE(tb_get_table); + ACPI_FUNCTION_TRACE("tb_get_table"); /* Get the header in order to get signature and table size */ @@ -124,7 +124,7 @@ acpi_tb_get_table_header(struct acpi_pointer *address, acpi_status status = AE_OK; struct acpi_table_header *header = NULL; - ACPI_FUNCTION_TRACE(tb_get_table_header); + ACPI_FUNCTION_TRACE("tb_get_table_header"); /* * Flags contains the current processor mode (Virtual or Physical @@ -148,10 +148,6 @@ acpi_tb_get_table_header(struct acpi_pointer *address, sizeof(struct acpi_table_header), (void *)&header); if (ACPI_FAILURE(status)) { - ACPI_ERROR((AE_INFO, - "Could not map memory at %8.8X%8.8X for table header", - ACPI_FORMAT_UINT64(address->pointer. - physical))); return_ACPI_STATUS(status); } @@ -202,7 +198,7 @@ acpi_tb_get_table_body(struct acpi_pointer *address, { acpi_status status; - ACPI_FUNCTION_TRACE(tb_get_table_body); + ACPI_FUNCTION_TRACE("tb_get_table_body"); if (!table_info || !address) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -212,7 +208,6 @@ acpi_tb_get_table_body(struct acpi_pointer *address, status = acpi_tb_table_override(header, table_info); if (ACPI_SUCCESS(status)) { - /* Table was overridden by the host OS */ return_ACPI_STATUS(status); @@ -246,7 +241,7 @@ acpi_tb_table_override(struct acpi_table_header *header, acpi_status status; struct acpi_pointer address; - ACPI_FUNCTION_TRACE(tb_table_override); + ACPI_FUNCTION_TRACE("tb_table_override"); /* * The OSL will examine the header and decide whether to override this @@ -255,7 +250,6 @@ acpi_tb_table_override(struct acpi_table_header *header, */ status = acpi_os_table_override(header, &new_table); if (ACPI_FAILURE(status)) { - /* Some severe error from the OSL, but we basically ignore it */ ACPI_EXCEPTION((AE_INFO, status, @@ -264,7 +258,6 @@ acpi_tb_table_override(struct acpi_table_header *header, } if (!new_table) { - /* No table override */ return_ACPI_STATUS(AE_NO_ACPI_TABLES); @@ -318,17 +311,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, u8 allocation; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(tb_get_this_table); - - /* Validate minimum length */ - - if (header->length < sizeof(struct acpi_table_header)) { - ACPI_ERROR((AE_INFO, - "Table length (%X) is smaller than minimum (%X)", - header->length, sizeof(struct acpi_table_header))); - - return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); - } + ACPI_FUNCTION_TRACE("tb_get_this_table"); /* * Flags contains the current processor mode (Virtual or Physical @@ -340,7 +323,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, /* Pointer matches processor mode, copy the table to a new buffer */ - full_table = ACPI_ALLOCATE(header->length); + full_table = ACPI_MEM_ALLOCATE(header->length); if (!full_table) { ACPI_ERROR((AE_INFO, "Could not allocate table memory for [%4.4s] length %X", @@ -366,7 +349,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, */ status = acpi_os_map_memory(address->pointer.physical, (acpi_size) header->length, - ACPI_CAST_PTR(void, &full_table)); + (void *)&full_table); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X", @@ -393,12 +376,11 @@ acpi_tb_get_this_table(struct acpi_pointer *address, * Validate checksum for _most_ tables, * even the ones whose signature we don't recognize */ - if (table_info->type != ACPI_TABLE_ID_FACS) { + if (table_info->type != ACPI_TABLE_FACS) { status = acpi_tb_verify_table_checksum(full_table); #if (!ACPI_CHECKSUM_ABORT) if (ACPI_FAILURE(status)) { - /* Ignore the error if configuration says so */ status = AE_OK; @@ -427,7 +409,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, * * PARAMETERS: table_type - one of the defined table types * Instance - Which table of this type - * return_table - pointer to location to place the pointer for + * table_ptr_loc - pointer to location to place the pointer for * return * * RETURN: Status @@ -438,34 +420,57 @@ acpi_tb_get_this_table(struct acpi_pointer *address, acpi_status acpi_tb_get_table_ptr(acpi_table_type table_type, - u32 instance, struct acpi_table_header **return_table) + u32 instance, struct acpi_table_header **table_ptr_loc) { struct acpi_table_desc *table_desc; u32 i; - ACPI_FUNCTION_TRACE(tb_get_table_ptr); + ACPI_FUNCTION_TRACE("tb_get_table_ptr"); - if (table_type > ACPI_TABLE_ID_MAX) { + if (!acpi_gbl_DSDT) { + return_ACPI_STATUS(AE_NO_ACPI_TABLES); + } + + if (table_type > ACPI_TABLE_MAX) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Check for instance out of range of the current table count */ + /* + * For all table types (Single/Multiple), the first + * instance is always in the list head. + */ + if (instance == 1) { + /* Get the first */ + + *table_ptr_loc = NULL; + if (acpi_gbl_table_lists[table_type].next) { + *table_ptr_loc = + acpi_gbl_table_lists[table_type].next->pointer; + } + return_ACPI_STATUS(AE_OK); + } + + /* Check for instance out of range */ if (instance > acpi_gbl_table_lists[table_type].count) { return_ACPI_STATUS(AE_NOT_EXIST); } - /* - * Walk the list to get the desired table - * Note: Instance is one-based + /* Walk the list to get the desired table + * Since the if (Instance == 1) check above checked for the + * first table, setting table_desc equal to the .Next member + * is actually pointing to the second table. Therefore, we + * need to walk from the 2nd table until we reach the Instance + * that the user is looking for and return its table pointer. */ table_desc = acpi_gbl_table_lists[table_type].next; - for (i = 1; i < instance; i++) { + for (i = 2; i < instance; i++) { table_desc = table_desc->next; } /* We are now pointing to the requested table's descriptor */ - *return_table = table_desc->pointer; + *table_ptr_loc = table_desc->pointer; + return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c index ad982112e..134e5dce0 100644 --- a/drivers/acpi/tables/tbgetall.c +++ b/drivers/acpi/tables/tbgetall.c @@ -77,7 +77,7 @@ acpi_tb_get_primary_table(struct acpi_pointer *address, acpi_status status; struct acpi_table_header header; - ACPI_FUNCTION_TRACE(tb_get_primary_table); + ACPI_FUNCTION_TRACE("tb_get_primary_table"); /* Ignore a NULL address in the RSDT */ @@ -140,7 +140,7 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address, acpi_status status; struct acpi_table_header header; - ACPI_FUNCTION_TRACE_STR(tb_get_secondary_table, signature); + ACPI_FUNCTION_TRACE_STR("tb_get_secondary_table", signature); /* Get the header in order to match the signature */ @@ -151,7 +151,7 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address, /* Signature must match request */ - if (!ACPI_COMPARE_NAME(header.signature, signature)) { + if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { ACPI_ERROR((AE_INFO, "Incorrect table signature - wanted [%s] found [%4.4s]", signature, header.signature)); @@ -207,7 +207,7 @@ acpi_status acpi_tb_get_required_tables(void) struct acpi_table_desc table_info; struct acpi_pointer address; - ACPI_FUNCTION_TRACE(tb_get_required_tables); + ACPI_FUNCTION_TRACE("tb_get_required_tables"); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%d ACPI tables in RSDT\n", acpi_gbl_rsdt_table_count)); @@ -223,7 +223,6 @@ acpi_status acpi_tb_get_required_tables(void) * any SSDTs. */ for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { - /* Get the table address from the common internal XSDT */ address.pointer.value = acpi_gbl_XSDT->table_offset_entry[i]; @@ -306,6 +305,6 @@ acpi_status acpi_tb_get_required_tables(void) /* Always delete the RSDP mapping, we are done with it */ - acpi_tb_delete_tables_by_type(ACPI_TABLE_ID_RSDP); + acpi_tb_delete_tables_by_type(ACPI_TABLE_RSDP); return_ACPI_STATUS(status); } diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 1668a232f..7ffd0fddb 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c @@ -73,18 +73,17 @@ acpi_tb_match_signature(char *signature, { acpi_native_uint i; - ACPI_FUNCTION_TRACE(tb_match_signature); + ACPI_FUNCTION_TRACE("tb_match_signature"); /* Search for a signature match among the known table types */ - for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) { + for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { if (!(acpi_gbl_table_data[i].flags & search_type)) { continue; } if (!ACPI_STRNCMP(signature, acpi_gbl_table_data[i].signature, acpi_gbl_table_data[i].sig_length)) { - /* Found a signature match, return index if requested */ if (table_info) { @@ -123,7 +122,7 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info) { acpi_status status; - ACPI_FUNCTION_TRACE(tb_install_table); + ACPI_FUNCTION_TRACE("tb_install_table"); /* Lock tables while installing */ @@ -188,7 +187,7 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type) struct acpi_table_header *table_header; acpi_status status; - ACPI_FUNCTION_TRACE(tb_recognize_table); + ACPI_FUNCTION_TRACE("tb_recognize_table"); /* Ensure that we have a valid table pointer */ @@ -219,6 +218,7 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type) /* Return the table type and length via the info struct */ table_info->length = (acpi_size) table_header->length; + return_ACPI_STATUS(status); } @@ -243,11 +243,11 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, struct acpi_table_desc *table_desc; acpi_status status; - ACPI_FUNCTION_TRACE_U32(tb_init_table_descriptor, table_type); + ACPI_FUNCTION_TRACE_U32("tb_init_table_descriptor", table_type); /* Allocate a descriptor for this table */ - table_desc = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); + table_desc = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); if (!table_desc) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -256,7 +256,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, status = acpi_ut_allocate_owner_id(&table_desc->owner_id); if (ACPI_FAILURE(status)) { - goto error_exit1; + return_ACPI_STATUS(status); } /* Install the table into the global data structure */ @@ -274,8 +274,8 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, * at this location, so return an error. */ if (list_head->next) { - status = AE_ALREADY_EXISTS; - goto error_exit2; + ACPI_MEM_FREE(table_desc); + return_ACPI_STATUS(AE_ALREADY_EXISTS); } table_desc->next = list_head->next; @@ -312,14 +312,15 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, /* Finish initialization of the table descriptor */ - table_desc->loaded_into_namespace = FALSE; table_desc->type = (u8) table_type; table_desc->pointer = table_info->pointer; table_desc->length = table_info->length; table_desc->allocation = table_info->allocation; table_desc->aml_start = (u8 *) (table_desc->pointer + 1), - table_desc->aml_length = (u32) - (table_desc->length - (u32) sizeof(struct acpi_table_header)); + table_desc->aml_length = (u32) (table_desc->length - + (u32) sizeof(struct + acpi_table_header)); + table_desc->loaded_into_namespace = FALSE; /* * Set the appropriate global pointer (if there is one) to point to the @@ -334,18 +335,8 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, table_info->owner_id = table_desc->owner_id; table_info->installed_desc = table_desc; - return_ACPI_STATUS(AE_OK); - - /* Error exit with cleanup */ - error_exit2: - - acpi_ut_release_owner_id(&table_desc->owner_id); - - error_exit1: - - ACPI_FREE(table_desc); - return_ACPI_STATUS(status); + return_ACPI_STATUS(AE_OK); } /******************************************************************************* @@ -368,7 +359,7 @@ void acpi_tb_delete_all_tables(void) * Free memory allocated for ACPI tables * Memory can either be mapped or allocated */ - for (type = 0; type < (ACPI_TABLE_ID_MAX + 1); type++) { + for (type = 0; type < NUM_ACPI_TABLE_TYPES; type++) { acpi_tb_delete_tables_by_type(type); } } @@ -392,9 +383,9 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type) u32 count; u32 i; - ACPI_FUNCTION_TRACE_U32(tb_delete_tables_by_type, type); + ACPI_FUNCTION_TRACE_U32("tb_delete_tables_by_type", type); - if (type > ACPI_TABLE_ID_MAX) { + if (type > ACPI_TABLE_MAX) { return_VOID; } @@ -405,28 +396,28 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type) /* Clear the appropriate "typed" global table pointer */ switch (type) { - case ACPI_TABLE_ID_RSDP: + case ACPI_TABLE_RSDP: acpi_gbl_RSDP = NULL; break; - case ACPI_TABLE_ID_DSDT: + case ACPI_TABLE_DSDT: acpi_gbl_DSDT = NULL; break; - case ACPI_TABLE_ID_FADT: + case ACPI_TABLE_FADT: acpi_gbl_FADT = NULL; break; - case ACPI_TABLE_ID_FACS: + case ACPI_TABLE_FACS: acpi_gbl_FACS = NULL; break; - case ACPI_TABLE_ID_XSDT: + case ACPI_TABLE_XSDT: acpi_gbl_XSDT = NULL; break; - case ACPI_TABLE_ID_SSDT: - case ACPI_TABLE_ID_PSDT: + case ACPI_TABLE_SSDT: + case ACPI_TABLE_PSDT: default: break; } @@ -480,7 +471,7 @@ void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc) case ACPI_MEM_ALLOCATED: - ACPI_FREE(table_desc->pointer); + ACPI_MEM_FREE(table_desc->pointer); break; case ACPI_MEM_MAPPED: @@ -512,7 +503,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc { struct acpi_table_desc *next_desc; - ACPI_FUNCTION_TRACE_PTR(tb_uninstall_table, table_desc); + ACPI_FUNCTION_TRACE_PTR("tb_uninstall_table", table_desc); if (!table_desc) { return_PTR(NULL); @@ -536,14 +527,10 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc acpi_tb_delete_single_table(table_desc); - /* Free the owner ID associated with this table */ - - acpi_ut_release_owner_id(&table_desc->owner_id); - /* Free the table descriptor */ next_desc = table_desc->next; - ACPI_FREE(table_desc); + ACPI_MEM_FREE(table_desc); /* Return pointer to the next descriptor */ diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 0ad3dbb9e..4d3082202 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c @@ -64,7 +64,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address) acpi_status status; struct rsdp_descriptor *rsdp; - ACPI_FUNCTION_TRACE(tb_verify_rsdp); + ACPI_FUNCTION_TRACE("tb_verify_rsdp"); switch (address->pointer_type) { case ACPI_LOGICAL_POINTER: @@ -78,7 +78,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address) */ status = acpi_os_map_memory(address->pointer.physical, sizeof(struct rsdp_descriptor), - ACPI_CAST_PTR(void, &rsdp)); + (void *)&rsdp); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -95,20 +95,15 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address) goto cleanup; } - /* RSDP is ok. Init the table info */ + /* The RSDP supplied is OK */ table_info.pointer = ACPI_CAST_PTR(struct acpi_table_header, rsdp); table_info.length = sizeof(struct rsdp_descriptor); - - if (address->pointer_type == ACPI_PHYSICAL_POINTER) { - table_info.allocation = ACPI_MEM_MAPPED; - } else { - table_info.allocation = ACPI_MEM_NOT_ALLOCATED; - } + table_info.allocation = ACPI_MEM_MAPPED; /* Save the table pointers and allocation info */ - status = acpi_tb_init_table_descriptor(ACPI_TABLE_ID_RSDP, &table_info); + status = acpi_tb_init_table_descriptor(ACPI_TABLE_RSDP, &table_info); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -179,31 +174,22 @@ void acpi_tb_get_rsdt_address(struct acpi_pointer *out_address) acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) { - char *signature; + int no_match; ACPI_FUNCTION_ENTRY(); - /* Validate minimum length */ - - if (table_ptr->length < sizeof(struct acpi_table_header)) { - ACPI_ERROR((AE_INFO, - "RSDT/XSDT length (%X) is smaller than minimum (%X)", - table_ptr->length, - sizeof(struct acpi_table_header))); - - return (AE_INVALID_TABLE_LENGTH); - } - - /* Search for appropriate signature, RSDT or XSDT */ - + /* + * Search for appropriate signature, RSDT or XSDT + */ if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { - signature = RSDT_SIG; + no_match = ACPI_STRNCMP((char *)table_ptr, RSDT_SIG, + sizeof(RSDT_SIG) - 1); } else { - signature = XSDT_SIG; + no_match = ACPI_STRNCMP((char *)table_ptr, XSDT_SIG, + sizeof(XSDT_SIG) - 1); } - if (!ACPI_COMPARE_NAME(table_ptr->signature, signature)) { - + if (no_match) { /* Invalid RSDT or XSDT signature */ ACPI_ERROR((AE_INFO, @@ -212,8 +198,10 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); ACPI_ERROR((AE_INFO, - "RSDT/XSDT signature at %X is invalid", - acpi_gbl_RSDP->rsdt_physical_address)); + "RSDT/XSDT signature at %X (%p) is invalid", + acpi_gbl_RSDP->rsdt_physical_address, + (void *)(acpi_native_uint) acpi_gbl_RSDP-> + rsdt_physical_address)); if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { ACPI_ERROR((AE_INFO, "Looking for RSDT")); @@ -221,7 +209,7 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) ACPI_ERROR((AE_INFO, "Looking for XSDT")); } - ACPI_DUMP_BUFFER(ACPI_CAST_PTR(char, table_ptr), 48); + ACPI_DUMP_BUFFER((char *)table_ptr, 48); return (AE_BAD_SIGNATURE); } @@ -246,13 +234,13 @@ acpi_status acpi_tb_get_table_rsdt(void) acpi_status status; struct acpi_pointer address; - ACPI_FUNCTION_TRACE(tb_get_table_rsdt); + ACPI_FUNCTION_TRACE("tb_get_table_rsdt"); /* Get the RSDT/XSDT via the RSDP */ acpi_tb_get_rsdt_address(&address); - table_info.type = ACPI_TABLE_ID_XSDT; + table_info.type = ACPI_TABLE_XSDT; status = acpi_tb_get_table(&address, &table_info); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, @@ -269,7 +257,7 @@ acpi_status acpi_tb_get_table_rsdt(void) status = acpi_tb_validate_rsdt(table_info.pointer); if (ACPI_FAILURE(status)) { - goto error_cleanup; + return_ACPI_STATUS(status); } /* Get the number of tables defined in the RSDT or XSDT */ @@ -281,27 +269,18 @@ acpi_status acpi_tb_get_table_rsdt(void) status = acpi_tb_convert_to_xsdt(&table_info); if (ACPI_FAILURE(status)) { - goto error_cleanup; + return_ACPI_STATUS(status); } /* Save the table pointers and allocation info */ - status = acpi_tb_init_table_descriptor(ACPI_TABLE_ID_XSDT, &table_info); + status = acpi_tb_init_table_descriptor(ACPI_TABLE_XSDT, &table_info); if (ACPI_FAILURE(status)) { - goto error_cleanup; + return_ACPI_STATUS(status); } - acpi_gbl_XSDT = - ACPI_CAST_PTR(struct xsdt_descriptor, table_info.pointer); + acpi_gbl_XSDT = ACPI_CAST_PTR(XSDT_DESCRIPTOR, table_info.pointer); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "XSDT located at %p\n", acpi_gbl_XSDT)); return_ACPI_STATUS(status); - - error_cleanup: - - /* Free table allocated by acpi_tb_get_table */ - - acpi_tb_delete_single_table(&table_info); - - return_ACPI_STATUS(status); } diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 209a40180..bc571592f 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c @@ -71,7 +71,7 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc) { struct acpi_table_desc *table_desc; - ACPI_FUNCTION_TRACE(tb_is_table_installed); + ACPI_FUNCTION_TRACE("tb_is_table_installed"); /* Get the list descriptor and first table descriptor */ @@ -96,11 +96,10 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc) (!ACPI_MEMCMP (table_desc->pointer, new_table_desc->pointer, new_table_desc->pointer->length))) { - /* Match: this table is already installed */ ACPI_DEBUG_PRINT((ACPI_DB_TABLES, - "Table [%4.4s] already installed: Rev %X OemTableId [%8.8s]\n", + "Table [%4.4s] already installed: Rev %X oem_table_id [%8.8s]\n", new_table_desc->pointer->signature, new_table_desc->pointer->revision, new_table_desc->pointer-> @@ -160,8 +159,12 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) ACPI_MOVE_32_TO_32(&signature, table_header->signature); if (!acpi_ut_valid_acpi_name(signature)) { - ACPI_ERROR((AE_INFO, "Invalid table signature 0x%8.8X", - signature)); + ACPI_ERROR((AE_INFO, + "Table signature at %p [%p] has invalid characters", + table_header, &signature)); + + ACPI_WARNING((AE_INFO, "Invalid table signature found: [%4.4s]", + ACPI_CAST_PTR(char, &signature))); ACPI_DUMP_BUFFER(table_header, sizeof(struct acpi_table_header)); @@ -172,9 +175,12 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) if (table_header->length < sizeof(struct acpi_table_header)) { ACPI_ERROR((AE_INFO, - "Invalid length 0x%X in table with signature %4.4s", - (u32) table_header->length, - ACPI_CAST_PTR(char, &signature))); + "Invalid length in table header %p name %4.4s", + table_header, (char *)&signature)); + + ACPI_WARNING((AE_INFO, + "Invalid table header length (0x%X) found", + (u32) table_header->length)); ACPI_DUMP_BUFFER(table_header, sizeof(struct acpi_table_header)); @@ -186,119 +192,72 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) /******************************************************************************* * - * FUNCTION: acpi_tb_sum_table - * - * PARAMETERS: Buffer - Buffer to sum - * Length - Size of the buffer - * - * RETURN: 8 bit sum of buffer - * - * DESCRIPTION: Computes an 8 bit sum of the buffer(length) and returns it. - * - ******************************************************************************/ - -u8 acpi_tb_sum_table(void *buffer, u32 length) -{ - acpi_native_uint i; - u8 sum = 0; - - if (!buffer || !length) { - return (0); - } - - for (i = 0; i < length; i++) { - sum = (u8) (sum + ((u8 *) buffer)[i]); - } - return (sum); -} - -/******************************************************************************* - * - * FUNCTION: acpi_tb_generate_checksum + * FUNCTION: acpi_tb_verify_table_checksum * - * PARAMETERS: Table - Pointer to a valid ACPI table (with a - * standard ACPI header) + * PARAMETERS: *table_header - ACPI table to verify * - * RETURN: 8 bit checksum of buffer + * RETURN: 8 bit checksum of table * - * DESCRIPTION: Computes an 8 bit checksum of the table. + * DESCRIPTION: Does an 8 bit checksum of table and returns status. A correct + * table should have a checksum of 0. * ******************************************************************************/ -u8 acpi_tb_generate_checksum(struct acpi_table_header * table) +acpi_status +acpi_tb_verify_table_checksum(struct acpi_table_header * table_header) { u8 checksum; + acpi_status status = AE_OK; - /* Sum the entire table as-is */ - - checksum = acpi_tb_sum_table(table, table->length); + ACPI_FUNCTION_TRACE("tb_verify_table_checksum"); - /* Subtract off the existing checksum value in the table */ + /* Compute the checksum on the table */ - checksum = (u8) (checksum - table->checksum); + checksum = + acpi_tb_generate_checksum(table_header, table_header->length); - /* Compute the final checksum */ + /* Return the appropriate exception */ - checksum = (u8) (0 - checksum); - return (checksum); -} + if (checksum) { + ACPI_WARNING((AE_INFO, + "Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)", + table_header->signature, + (u32) table_header->checksum, (u32) checksum)); -/******************************************************************************* - * - * FUNCTION: acpi_tb_set_checksum - * - * PARAMETERS: Table - Pointer to a valid ACPI table (with a - * standard ACPI header) - * - * RETURN: None. Sets the table checksum field - * - * DESCRIPTION: Computes an 8 bit checksum of the table and inserts the - * checksum into the table header. - * - ******************************************************************************/ - -void acpi_tb_set_checksum(struct acpi_table_header *table) -{ - - table->checksum = acpi_tb_generate_checksum(table); + status = AE_BAD_CHECKSUM; + } + return_ACPI_STATUS(status); } /******************************************************************************* * - * FUNCTION: acpi_tb_verify_table_checksum + * FUNCTION: acpi_tb_generate_checksum * - * PARAMETERS: *table_header - ACPI table to verify + * PARAMETERS: Buffer - Buffer to checksum + * Length - Size of the buffer * - * RETURN: 8 bit checksum of table + * RETURN: 8 bit checksum of buffer * - * DESCRIPTION: Generates an 8 bit checksum of table and returns and compares - * it to the existing checksum value. + * DESCRIPTION: Computes an 8 bit checksum of the buffer(length) and returns it. * ******************************************************************************/ -acpi_status -acpi_tb_verify_table_checksum(struct acpi_table_header *table_header) +u8 acpi_tb_generate_checksum(void *buffer, u32 length) { - u8 checksum; - - ACPI_FUNCTION_TRACE(tb_verify_table_checksum); - - /* Compute the checksum on the table */ + u8 *end_buffer; + u8 *rover; + u8 sum = 0; - checksum = acpi_tb_generate_checksum(table_header); + if (buffer && length) { + /* Buffer and Length are valid */ - /* Checksum ok? */ + end_buffer = ACPI_ADD_PTR(u8, buffer, length); - if (checksum == table_header->checksum) { - return_ACPI_STATUS(AE_OK); + for (rover = buffer; rover < end_buffer; rover++) { + sum = (u8) (sum + *rover); + } } - - ACPI_WARNING((AE_INFO, - "Incorrect checksum in table [%4.4s] - is %2.2X, should be %2.2X", - table_header->signature, table_header->checksum, - checksum)); - - return_ACPI_STATUS(AE_BAD_CHECKSUM); + return (sum); } #ifdef ACPI_OBSOLETE_FUNCTIONS @@ -317,12 +276,12 @@ acpi_tb_verify_table_checksum(struct acpi_table_header *table_header) acpi_status acpi_tb_handle_to_object(u16 table_id, - struct acpi_table_desc **return_table_desc) + struct acpi_table_desc ** return_table_desc) { u32 i; struct acpi_table_desc *table_desc; - ACPI_FUNCTION_NAME(tb_handle_to_object); + ACPI_FUNCTION_NAME("tb_handle_to_object"); for (i = 0; i < ACPI_TABLE_MAX; i++) { table_desc = acpi_gbl_table_lists[i].next; @@ -336,7 +295,7 @@ acpi_tb_handle_to_object(u16 table_id, } } - ACPI_ERROR((AE_INFO, "TableId=%X does not exist", table_id)); + ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id)); return (AE_BAD_PARAMETER); } #endif diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 7767987be..9fe53c9d5 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c @@ -42,6 +42,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -66,7 +68,7 @@ acpi_status acpi_load_tables(void) struct acpi_pointer rsdp_address; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_load_tables); + ACPI_FUNCTION_TRACE("acpi_load_tables"); /* Get the RSDP */ @@ -121,8 +123,6 @@ acpi_status acpi_load_tables(void) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_load_tables) - #ifdef ACPI_FUTURE_USAGE /******************************************************************************* * @@ -134,18 +134,19 @@ ACPI_EXPORT_SYMBOL(acpi_load_tables) * RETURN: Status * * DESCRIPTION: This function is called to load a table from the caller's - * buffer. The buffer must contain an entire ACPI Table including - * a valid header. The header fields will be verified, and if it + * buffer. The buffer must contain an entire ACPI Table including + * a valid header. The header fields will be verified, and if it * is determined that the table is invalid, the call will fail. * ******************************************************************************/ + acpi_status acpi_load_table(struct acpi_table_header *table_ptr) { acpi_status status; struct acpi_table_desc table_info; struct acpi_pointer address; - ACPI_FUNCTION_TRACE(acpi_load_table); + ACPI_FUNCTION_TRACE("acpi_load_table"); if (!table_ptr) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -173,7 +174,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) status = acpi_tb_install_table(&table_info); if (ACPI_FAILURE(status)) { if (status == AE_ALREADY_EXISTS) { - /* Table already exists, no error */ status = AE_OK; @@ -188,12 +188,12 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) /* Convert the table to common format if necessary */ switch (table_info.type) { - case ACPI_TABLE_ID_FADT: + case ACPI_TABLE_FADT: status = acpi_tb_convert_table_fadt(); break; - case ACPI_TABLE_ID_FACS: + case ACPI_TABLE_FACS: status = acpi_tb_build_common_facs(&table_info); break; @@ -208,7 +208,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) } if (ACPI_FAILURE(status)) { - /* Uninstall table and free the buffer */ (void)acpi_tb_uninstall_table(table_info.installed_desc); @@ -217,8 +216,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_load_table) - /******************************************************************************* * * FUNCTION: acpi_unload_table @@ -230,33 +227,31 @@ ACPI_EXPORT_SYMBOL(acpi_load_table) * DESCRIPTION: This routine is used to force the unload of a table * ******************************************************************************/ + acpi_status acpi_unload_table(acpi_table_type table_type) { struct acpi_table_desc *table_desc; - ACPI_FUNCTION_TRACE(acpi_unload_table); + ACPI_FUNCTION_TRACE("acpi_unload_table"); /* Parameter validation */ - if (table_type > ACPI_TABLE_ID_MAX) { + if (table_type > ACPI_TABLE_MAX) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Find all tables of the requested type */ table_desc = acpi_gbl_table_lists[table_type].next; - if (!table_desc) { - return_ACPI_STATUS(AE_NOT_EXIST); - } - while (table_desc) { /* - * Delete all namespace objects owned by this table. Note that these - * objects can appear anywhere in the namespace by virtue of the AML - * "Scope" operator. Thus, we need to track ownership by an ID, not + * Delete all namespace entries owned by this table. Note that these + * entries can appear anywhere in the namespace by virtue of the AML + * "Scope" operator. Thus, we need to track ownership by an ID, not * simply a position within the hierarchy */ acpi_ns_delete_namespace_by_owner(table_desc->owner_id); + acpi_ut_release_owner_id(&table_desc->owner_id); table_desc = table_desc->next; } @@ -266,8 +261,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_unload_table) - /******************************************************************************* * * FUNCTION: acpi_get_table_header @@ -278,16 +271,17 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table) * see acpi_gbl_acpi_table_flag * out_table_header - pointer to the struct acpi_table_header if successful * - * DESCRIPTION: This function is called to get an ACPI table header. The caller + * DESCRIPTION: This function is called to get an ACPI table header. The caller * supplies an pointer to a data area sufficient to contain an ACPI * struct acpi_table_header structure. * * The header contains a length field that can be used to determine - * the size of the buffer needed to contain the entire table. This + * the size of the buffer needed to contain the entire table. This * function is not valid for the RSD PTR table since it does not * have a standard header and is fixed length. * ******************************************************************************/ + acpi_status acpi_get_table_header(acpi_table_type table_type, u32 instance, struct acpi_table_header *out_table_header) @@ -295,16 +289,16 @@ acpi_get_table_header(acpi_table_type table_type, struct acpi_table_header *tbl_ptr; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_get_table_header); + ACPI_FUNCTION_TRACE("acpi_get_table_header"); if ((instance == 0) || - (table_type == ACPI_TABLE_ID_RSDP) || (!out_table_header)) { + (table_type == ACPI_TABLE_RSDP) || (!out_table_header)) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Check the table type and instance */ - if ((table_type > ACPI_TABLE_ID_MAX) || + if ((table_type > ACPI_TABLE_MAX) || (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && instance > 1)) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -325,14 +319,12 @@ acpi_get_table_header(acpi_table_type table_type, /* Copy the header to the caller's buffer */ - ACPI_MEMCPY(ACPI_CAST_PTR(void, out_table_header), - ACPI_CAST_PTR(void, tbl_ptr), + ACPI_MEMCPY((void *)out_table_header, (void *)tbl_ptr, sizeof(struct acpi_table_header)); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_table_header) #endif /* ACPI_FUTURE_USAGE */ /******************************************************************************* @@ -348,15 +340,16 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_header) * * RETURN: Status * - * DESCRIPTION: This function is called to get an ACPI table. The caller + * DESCRIPTION: This function is called to get an ACPI table. The caller * supplies an out_buffer large enough to contain the entire ACPI - * table. The caller should call the acpi_get_table_header function - * first to determine the buffer size needed. Upon completion + * table. The caller should call the acpi_get_table_header function + * first to determine the buffer size needed. Upon completion * the out_buffer->Length field will indicate the number of bytes * copied into the out_buffer->buf_ptr buffer. This table will be * a complete table including the header. * ******************************************************************************/ + acpi_status acpi_get_table(acpi_table_type table_type, u32 instance, struct acpi_buffer *ret_buffer) @@ -365,7 +358,7 @@ acpi_get_table(acpi_table_type table_type, acpi_status status; acpi_size table_length; - ACPI_FUNCTION_TRACE(acpi_get_table); + ACPI_FUNCTION_TRACE("acpi_get_table"); /* Parameter validation */ @@ -380,7 +373,7 @@ acpi_get_table(acpi_table_type table_type, /* Check the table type and instance */ - if ((table_type > ACPI_TABLE_ID_MAX) || + if ((table_type > ACPI_TABLE_MAX) || (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && instance > 1)) { return_ACPI_STATUS(AE_BAD_PARAMETER); @@ -403,8 +396,7 @@ acpi_get_table(acpi_table_type table_type, /* Get the table length */ - if (table_type == ACPI_TABLE_ID_RSDP) { - + if (table_type == ACPI_TABLE_RSDP) { /* RSD PTR is the only "table" without a header */ table_length = sizeof(struct rsdp_descriptor); @@ -421,10 +413,8 @@ acpi_get_table(acpi_table_type table_type, /* Copy the table to the buffer */ - ACPI_MEMCPY(ACPI_CAST_PTR(void, ret_buffer->pointer), - ACPI_CAST_PTR(void, tbl_ptr), table_length); - + ACPI_MEMCPY((void *)ret_buffer->pointer, (void *)tbl_ptr, table_length); return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_get_table) +EXPORT_SYMBOL(acpi_get_table); diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index da2648bbd..a62db6af8 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include @@ -73,7 +75,6 @@ acpi_status acpi_tb_validate_rsdp(struct rsdp_descriptor *rsdp) * The signature and checksum must both be correct */ if (ACPI_STRNCMP((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0) { - /* Nope, BAD Signature */ return (AE_BAD_SIGNATURE); @@ -81,14 +82,15 @@ acpi_status acpi_tb_validate_rsdp(struct rsdp_descriptor *rsdp) /* Check the standard checksum */ - if (acpi_tb_sum_table(rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { + if (acpi_tb_generate_checksum(rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { return (AE_BAD_CHECKSUM); } /* Check extended checksum if table version >= 2 */ if ((rsdp->revision >= 2) && - (acpi_tb_sum_table(rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0)) { + (acpi_tb_generate_checksum(rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != + 0)) { return (AE_BAD_CHECKSUM); } @@ -119,7 +121,7 @@ acpi_tb_find_table(char *signature, acpi_status status; struct acpi_table_header *table; - ACPI_FUNCTION_TRACE(tb_find_table); + ACPI_FUNCTION_TRACE("tb_find_table"); /* Validate string lengths */ @@ -129,7 +131,7 @@ acpi_tb_find_table(char *signature, return_ACPI_STATUS(AE_AML_STRING_LIMIT); } - if (ACPI_COMPARE_NAME(signature, DSDT_SIG)) { + if (!ACPI_STRNCMP(signature, DSDT_SIG, ACPI_NAME_SIZE)) { /* * The DSDT pointer is contained in the FADT, not the RSDT. * This code should suffice, because the only code that would perform @@ -154,12 +156,10 @@ acpi_tb_find_table(char *signature, /* Check oem_id and oem_table_id */ - if ((oem_id[0] && - ACPI_STRNCMP(oem_id, table->oem_id, - sizeof(table->oem_id))) || - (oem_table_id[0] && - ACPI_STRNCMP(oem_table_id, table->oem_table_id, - sizeof(table->oem_table_id)))) { + if ((oem_id[0] && ACPI_STRNCMP(oem_id, table->oem_id, + sizeof(table->oem_id))) || + (oem_table_id[0] && ACPI_STRNCMP(oem_table_id, table->oem_table_id, + sizeof(table->oem_table_id)))) { return_ACPI_STATUS(AE_AML_NAME_NOT_FOUND); } @@ -203,7 +203,7 @@ acpi_get_firmware_table(acpi_string signature, u32 i; u32 j; - ACPI_FUNCTION_TRACE(acpi_get_firmware_table); + ACPI_FUNCTION_TRACE("acpi_get_firmware_table"); /* * Ensure that at least the table manager is initialized. We don't @@ -217,7 +217,6 @@ acpi_get_firmware_table(acpi_string signature, /* Ensure that we have a RSDP */ if (!acpi_gbl_RSDP) { - /* Get the RSDP */ status = acpi_os_get_root_pointer(flags, &address); @@ -262,7 +261,7 @@ acpi_get_firmware_table(acpi_string signature, /* Get and validate the RSDT */ - rsdt_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); + rsdt_info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); if (!rsdt_info) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -279,13 +278,13 @@ acpi_get_firmware_table(acpi_string signature, /* Allocate a scratch table header and table descriptor */ - header = ACPI_ALLOCATE(sizeof(struct acpi_table_header)); + header = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_header)); if (!header) { status = AE_NO_MEMORY; goto cleanup; } - table_info = ACPI_ALLOCATE(sizeof(struct acpi_table_desc)); + table_info = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_desc)); if (!table_info) { status = AE_NO_MEMORY; goto cleanup; @@ -309,12 +308,12 @@ acpi_get_firmware_table(acpi_string signature, if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { address.pointer.value = (ACPI_CAST_PTR - (struct rsdt_descriptor, + (RSDT_DESCRIPTOR, rsdt_info->pointer))->table_offset_entry[i]; } else { address.pointer.value = (ACPI_CAST_PTR - (struct xsdt_descriptor, + (XSDT_DESCRIPTOR, rsdt_info->pointer))->table_offset_entry[i]; } @@ -327,13 +326,11 @@ acpi_get_firmware_table(acpi_string signature, /* Compare table signatures and table instance */ - if (ACPI_COMPARE_NAME(header->signature, signature)) { - + if (!ACPI_STRNCMP(header->signature, signature, ACPI_NAME_SIZE)) { /* An instance of the table was found */ j++; if (j >= instance) { - /* Found the correct instance, get the entire table */ status = @@ -358,21 +355,23 @@ acpi_get_firmware_table(acpi_string signature, acpi_os_unmap_memory(rsdt_info->pointer, (acpi_size) rsdt_info->pointer->length); } - ACPI_FREE(rsdt_info); + ACPI_MEM_FREE(rsdt_info); if (header) { - ACPI_FREE(header); + ACPI_MEM_FREE(header); } if (table_info) { - ACPI_FREE(table_info); + ACPI_MEM_FREE(table_info); } return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_get_firmware_table) +EXPORT_SYMBOL(acpi_get_firmware_table); /* TBD: Move to a new file */ + #if ACPI_MACHINE_WIDTH != 16 + /******************************************************************************* * * FUNCTION: acpi_find_root_pointer @@ -385,12 +384,13 @@ ACPI_EXPORT_SYMBOL(acpi_get_firmware_table) * DESCRIPTION: Find the RSDP * ******************************************************************************/ + acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) { struct acpi_table_desc table_info; acpi_status status; - ACPI_FUNCTION_TRACE(acpi_find_root_pointer); + ACPI_FUNCTION_TRACE("acpi_find_root_pointer"); /* Get the RSDP */ @@ -407,8 +407,6 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_find_root_pointer) - /******************************************************************************* * * FUNCTION: acpi_tb_scan_memory_for_rsdp @@ -421,13 +419,14 @@ ACPI_EXPORT_SYMBOL(acpi_find_root_pointer) * DESCRIPTION: Search a block of memory for the RSDP signature * ******************************************************************************/ + static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) { acpi_status status; u8 *mem_rover; u8 *end_address; - ACPI_FUNCTION_TRACE(tb_scan_memory_for_rsdp); + ACPI_FUNCTION_TRACE("tb_scan_memory_for_rsdp"); end_address = start_address + length; @@ -435,14 +434,12 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) for (mem_rover = start_address; mem_rover < end_address; mem_rover += ACPI_RSDP_SCAN_STEP) { - /* The RSDP signature and checksum must both be correct */ status = acpi_tb_validate_rsdp(ACPI_CAST_PTR (struct rsdp_descriptor, mem_rover)); if (ACPI_SUCCESS(status)) { - /* Sig and checksum valid, we have found a real RSDP */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -472,10 +469,10 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) * * RETURN: Status, RSDP physical address * - * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor + * DESCRIPTION: search lower 1_mbyte of memory for the root system descriptor * pointer structure. If it is found, set *RSDP to point to it. * - * NOTE1: The RSDP must be either in the first 1_k of the Extended + * NOTE1: The RSDp must be either in the first 1_k of the Extended * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.) * Only a 32-bit physical address is necessary. * @@ -492,13 +489,12 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) u32 physical_address; acpi_status status; - ACPI_FUNCTION_TRACE(tb_find_rsdp); + ACPI_FUNCTION_TRACE("tb_find_rsdp"); /* * Scan supports either logical addressing or physical addressing */ if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) { - /* 1a) Get the location of the Extended BIOS Data Area (EBDA) */ status = acpi_os_map_memory((acpi_physical_address) @@ -525,7 +521,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) if (physical_address > 0x400) { /* - * 1b) Search EBDA paragraphs (EBDA is required to be a + * 1b) Search EBDA paragraphs (EBDa is required to be a * minimum of 1_k length) */ status = acpi_os_map_memory((acpi_physical_address) @@ -546,11 +542,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) acpi_os_unmap_memory(table_ptr, ACPI_EBDA_WINDOW_SIZE); if (mem_rover) { - /* Return the physical address */ physical_address += - (u32) ACPI_PTR_DIFF(mem_rover, table_ptr); + ACPI_PTR_DIFF(mem_rover, table_ptr); table_info->physical_address = (acpi_physical_address) physical_address; @@ -581,12 +576,11 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) acpi_os_unmap_memory(table_ptr, ACPI_HI_RSDP_WINDOW_SIZE); if (mem_rover) { - /* Return the physical address */ - physical_address = (u32) - (ACPI_HI_RSDP_WINDOW_BASE + - ACPI_PTR_DIFF(mem_rover, table_ptr)); + physical_address = + ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF(mem_rover, + table_ptr); table_info->physical_address = (acpi_physical_address) physical_address; @@ -607,7 +601,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) if (physical_address > 0x400) { /* - * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of + * 1b) Search EBDA paragraphs (EBDa is required to be a minimum of * 1_k length) */ mem_rover = @@ -615,7 +609,6 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) (physical_address), ACPI_EBDA_WINDOW_SIZE); if (mem_rover) { - /* Return the physical address */ table_info->physical_address = @@ -631,7 +624,6 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) (ACPI_HI_RSDP_WINDOW_BASE), ACPI_HI_RSDP_WINDOW_SIZE); if (mem_rover) { - /* Found it, return the physical address */ table_info->physical_address = diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 5753d06b7..19f3ea484 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -82,7 +82,6 @@ MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); static int acpi_thermal_add(struct acpi_device *device); static int acpi_thermal_remove(struct acpi_device *device, int type); -static int acpi_thermal_resume(struct acpi_device *device, int state); static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file); static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file); static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file); @@ -104,7 +103,6 @@ static struct acpi_driver acpi_thermal_driver = { .ops = { .add = acpi_thermal_add, .remove = acpi_thermal_remove, - .resume = acpi_thermal_resume, }, }; @@ -162,7 +160,7 @@ struct acpi_thermal_flags { }; struct acpi_thermal { - struct acpi_device * device; + acpi_handle handle; acpi_bus_id name; unsigned long temperature; unsigned long last_temperature; @@ -176,21 +174,21 @@ struct acpi_thermal { struct timer_list timer; }; -static const struct file_operations acpi_thermal_state_fops = { +static struct file_operations acpi_thermal_state_fops = { .open = acpi_thermal_state_open_fs, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static const struct file_operations acpi_thermal_temp_fops = { +static struct file_operations acpi_thermal_temp_fops = { .open = acpi_thermal_temp_open_fs, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static const struct file_operations acpi_thermal_trip_fops = { +static struct file_operations acpi_thermal_trip_fops = { .open = acpi_thermal_trip_open_fs, .read = seq_read, .write = acpi_thermal_write_trip_points, @@ -198,7 +196,7 @@ static const struct file_operations acpi_thermal_trip_fops = { .release = single_release, }; -static const struct file_operations acpi_thermal_cooling_fops = { +static struct file_operations acpi_thermal_cooling_fops = { .open = acpi_thermal_cooling_open_fs, .read = seq_read, .write = acpi_thermal_write_cooling_mode, @@ -206,7 +204,7 @@ static const struct file_operations acpi_thermal_cooling_fops = { .release = single_release, }; -static const struct file_operations acpi_thermal_polling_fops = { +static struct file_operations acpi_thermal_polling_fops = { .open = acpi_thermal_polling_open_fs, .read = seq_read, .write = acpi_thermal_write_polling, @@ -222,48 +220,51 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz) { acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_thermal_get_temperature"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); tz->last_temperature = tz->temperature; status = - acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tz->temperature); + acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", tz->temperature)); - return 0; + return_VALUE(0); } static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) { acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_thermal_get_polling_frequency"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); status = - acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, + acpi_evaluate_integer(tz->handle, "_TZP", NULL, &tz->polling_frequency); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n", tz->polling_frequency)); - return 0; + return_VALUE(0); } static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) { + ACPI_FUNCTION_TRACE("acpi_thermal_set_polling"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); tz->polling_frequency = seconds * 10; /* Convert value to deci-seconds */ @@ -271,7 +272,7 @@ static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) "Polling frequency set to %lu seconds\n", tz->polling_frequency)); - return 0; + return_VALUE(0); } static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) @@ -281,28 +282,29 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) struct acpi_object_list arg_list = { 1, &arg0 }; acpi_handle handle = NULL; + ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); - status = acpi_get_handle(tz->device->handle, "_SCP", &handle); + status = acpi_get_handle(tz->handle, "_SCP", &handle); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); - return -ENODEV; + return_VALUE(-ENODEV); } arg0.integer.value = mode; status = acpi_evaluate_object(handle, NULL, &arg_list, NULL); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); tz->cooling_mode = mode; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n", mode ? "passive" : "active")); - return 0; + return_VALUE(0); } static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) @@ -310,18 +312,19 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) acpi_status status = AE_OK; int i = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_get_trip_points"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); /* Critical Shutdown (required) */ - status = acpi_evaluate_integer(tz->device->handle, "_CRT", NULL, + status = acpi_evaluate_integer(tz->handle, "_CRT", NULL, &tz->trips.critical.temperature); if (ACPI_FAILURE(status)) { tz->trips.critical.flags.valid = 0; - ACPI_EXCEPTION((AE_INFO, status, "No critical threshold")); - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n")); + return_VALUE(-ENODEV); } else { tz->trips.critical.flags.valid = 1; ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -332,7 +335,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) /* Critical Sleep (optional) */ status = - acpi_evaluate_integer(tz->device->handle, "_HOT", NULL, + acpi_evaluate_integer(tz->handle, "_HOT", NULL, &tz->trips.hot.temperature); if (ACPI_FAILURE(status)) { tz->trips.hot.flags.valid = 0; @@ -346,7 +349,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) /* Passive: Processors (optional) */ status = - acpi_evaluate_integer(tz->device->handle, "_PSV", NULL, + acpi_evaluate_integer(tz->handle, "_PSV", NULL, &tz->trips.passive.temperature); if (ACPI_FAILURE(status)) { tz->trips.passive.flags.valid = 0; @@ -355,31 +358,32 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) tz->trips.passive.flags.valid = 1; status = - acpi_evaluate_integer(tz->device->handle, "_TC1", NULL, + acpi_evaluate_integer(tz->handle, "_TC1", NULL, &tz->trips.passive.tc1); if (ACPI_FAILURE(status)) tz->trips.passive.flags.valid = 0; status = - acpi_evaluate_integer(tz->device->handle, "_TC2", NULL, + acpi_evaluate_integer(tz->handle, "_TC2", NULL, &tz->trips.passive.tc2); if (ACPI_FAILURE(status)) tz->trips.passive.flags.valid = 0; status = - acpi_evaluate_integer(tz->device->handle, "_TSP", NULL, + acpi_evaluate_integer(tz->handle, "_TSP", NULL, &tz->trips.passive.tsp); if (ACPI_FAILURE(status)) tz->trips.passive.flags.valid = 0; status = - acpi_evaluate_reference(tz->device->handle, "_PSL", NULL, + acpi_evaluate_reference(tz->handle, "_PSL", NULL, &tz->trips.passive.devices); if (ACPI_FAILURE(status)) tz->trips.passive.flags.valid = 0; if (!tz->trips.passive.flags.valid) - printk(KERN_WARNING PREFIX "Invalid passive threshold\n"); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid passive threshold\n")); else ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found passive threshold [%lu]\n", @@ -393,14 +397,14 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) char name[5] = { '_', 'A', 'C', ('0' + i), '\0' }; status = - acpi_evaluate_integer(tz->device->handle, name, NULL, + acpi_evaluate_integer(tz->handle, name, NULL, &tz->trips.active[i].temperature); if (ACPI_FAILURE(status)) break; name[2] = 'L'; status = - acpi_evaluate_reference(tz->device->handle, name, NULL, + acpi_evaluate_reference(tz->handle, name, NULL, &tz->trips.active[i].devices); if (ACPI_SUCCESS(status)) { tz->trips.active[i].flags.valid = 1; @@ -408,27 +412,29 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) "Found active threshold [%d]:[%lu]\n", i, tz->trips.active[i].temperature)); } else - ACPI_EXCEPTION((AE_INFO, status, - "Invalid active threshold [%d]", i)); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid active threshold [%d]\n", + i)); } - return 0; + return_VALUE(0); } static int acpi_thermal_get_devices(struct acpi_thermal *tz) { acpi_status status = AE_OK; + ACPI_FUNCTION_TRACE("acpi_thermal_get_devices"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); status = - acpi_evaluate_reference(tz->device->handle, "_TZD", NULL, &tz->devices); + acpi_evaluate_reference(tz->handle, "_TZD", NULL, &tz->devices); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); - return 0; + return_VALUE(0); } static int acpi_thermal_call_usermode(char *path) @@ -436,9 +442,10 @@ static int acpi_thermal_call_usermode(char *path) char *argv[2] = { NULL, NULL }; char *envp[3] = { NULL, NULL, NULL }; + ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode"); if (!path) - return -EINVAL; + return_VALUE(-EINVAL); argv[0] = path; @@ -448,48 +455,66 @@ static int acpi_thermal_call_usermode(char *path) call_usermodehelper(argv[0], argv, envp, 0); - return 0; + return_VALUE(0); } static int acpi_thermal_critical(struct acpi_thermal *tz) { + int result = 0; + struct acpi_device *device = NULL; + + ACPI_FUNCTION_TRACE("acpi_thermal_critical"); + if (!tz || !tz->trips.critical.flags.valid) - return -EINVAL; + return_VALUE(-EINVAL); if (tz->temperature >= tz->trips.critical.temperature) { - printk(KERN_WARNING PREFIX "Critical trip point\n"); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Critical trip point\n")); tz->trips.critical.flags.enabled = 1; } else if (tz->trips.critical.flags.enabled) tz->trips.critical.flags.enabled = 0; + result = acpi_bus_get_device(tz->handle, &device); + if (result) + return_VALUE(result); + printk(KERN_EMERG "Critical temperature reached (%ld C), shutting down.\n", KELVIN_TO_CELSIUS(tz->temperature)); - acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, + acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL, tz->trips.critical.flags.enabled); acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF); - return 0; + return_VALUE(0); } static int acpi_thermal_hot(struct acpi_thermal *tz) { + int result = 0; + struct acpi_device *device = NULL; + + ACPI_FUNCTION_TRACE("acpi_thermal_hot"); + if (!tz || !tz->trips.hot.flags.valid) - return -EINVAL; + return_VALUE(-EINVAL); if (tz->temperature >= tz->trips.hot.temperature) { - printk(KERN_WARNING PREFIX "Hot trip point\n"); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Hot trip point\n")); tz->trips.hot.flags.enabled = 1; } else if (tz->trips.hot.flags.enabled) tz->trips.hot.flags.enabled = 0; - acpi_bus_generate_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, + result = acpi_bus_get_device(tz->handle, &device); + if (result) + return_VALUE(result); + + acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_HOT, tz->trips.hot.flags.enabled); /* TBD: Call user-mode "sleep(S4)" function */ - return 0; + return_VALUE(0); } static void acpi_thermal_passive(struct acpi_thermal *tz) @@ -499,6 +524,7 @@ static void acpi_thermal_passive(struct acpi_thermal *tz) int trend = 0; int i = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_passive"); if (!tz || !tz->trips.passive.flags.valid) return; @@ -587,6 +613,7 @@ static void acpi_thermal_active(struct acpi_thermal *tz) int j = 0; unsigned long maxtemp = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_active"); if (!tz) return; @@ -613,10 +640,10 @@ static void acpi_thermal_active(struct acpi_thermal *tz) handles[j], ACPI_STATE_D0); if (result) { - printk(KERN_WARNING PREFIX - "Unable to turn cooling device [%p] 'on'\n", - active->devices. - handles[j]); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Unable to turn cooling device [%p] 'on'\n", + active->devices. + handles[j])); continue; } active->flags.enabled = 1; @@ -638,9 +665,9 @@ static void acpi_thermal_active(struct acpi_thermal *tz) result = acpi_bus_set_power(active->devices.handles[j], ACPI_STATE_D3); if (result) { - printk(KERN_WARNING PREFIX - "Unable to turn cooling device [%p] 'off'\n", - active->devices.handles[j]); + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Unable to turn cooling device [%p] 'off'\n", + active->devices.handles[j])); continue; } active->flags.enabled = 0; @@ -657,7 +684,8 @@ static void acpi_thermal_run(unsigned long data) { struct acpi_thermal *tz = (struct acpi_thermal *)data; if (!tz->zombie) - acpi_os_execute(OSL_GPE_HANDLER, acpi_thermal_check, (void *)data); + acpi_os_queue_for_execution(OSD_PRIORITY_GPE, + acpi_thermal_check, (void *)data); } static void acpi_thermal_check(void *data) @@ -668,17 +696,18 @@ static void acpi_thermal_check(void *data) int i = 0; struct acpi_thermal_state state; + ACPI_FUNCTION_TRACE("acpi_thermal_check"); if (!tz) { - printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); - return; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); + return_VOID; } state = tz->state; result = acpi_thermal_get_temperature(tz); if (result) - return; + return_VOID; memset(&tz->state, 0, sizeof(tz->state)); @@ -767,7 +796,7 @@ static void acpi_thermal_check(void *data) } } - return; + return_VOID; } /* -------------------------------------------------------------------------- @@ -780,6 +809,7 @@ static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset) { struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; + ACPI_FUNCTION_TRACE("acpi_thermal_state_seq_show"); if (!tz) goto end; @@ -802,7 +832,7 @@ static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset) } end: - return 0; + return_VALUE(0); } static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file) @@ -815,6 +845,7 @@ static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset) int result = 0; struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; + ACPI_FUNCTION_TRACE("acpi_thermal_temp_seq_show"); if (!tz) goto end; @@ -827,7 +858,7 @@ static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset) KELVIN_TO_CELSIUS(tz->temperature)); end: - return 0; + return_VALUE(0); } static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) @@ -841,6 +872,7 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) int i = 0; int j = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_trip_seq_show"); if (!tz) goto end; @@ -880,7 +912,7 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) } end: - return 0; + return_VALUE(0); } static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file) @@ -901,25 +933,26 @@ acpi_thermal_write_trip_points(struct file *file, int *active; int i = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_write_trip_points"); limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); if (!limit_string) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); - if (!active) { - kfree(limit_string); - return -ENOMEM; - } + if (!active) + return_VALUE(-ENOMEM); if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n")); count = -EINVAL; goto end; } if (copy_from_user(limit_string, buffer, count)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n")); count = -EFAULT; goto end; } @@ -932,6 +965,7 @@ acpi_thermal_write_trip_points(struct file *file, &active[5], &active[6], &active[7], &active[8], &active[9]); if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n")); count = -EINVAL; goto end; } @@ -948,13 +982,14 @@ acpi_thermal_write_trip_points(struct file *file, end: kfree(active); kfree(limit_string); - return count; + return_VALUE(count); } static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) { struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; + ACPI_FUNCTION_TRACE("acpi_thermal_cooling_seq_show"); if (!tz) goto end; @@ -970,7 +1005,7 @@ static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) tz->cooling_mode ? "passive" : "active"); end: - return 0; + return_VALUE(0); } static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file) @@ -989,15 +1024,16 @@ acpi_thermal_write_cooling_mode(struct file *file, int result = 0; char mode_string[12] = { '\0' }; + ACPI_FUNCTION_TRACE("acpi_thermal_write_cooling_mode"); if (!tz || (count > sizeof(mode_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); if (!tz->flags.cooling_mode) - return -ENODEV; + return_VALUE(-ENODEV); if (copy_from_user(mode_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); mode_string[count] = '\0'; @@ -1005,17 +1041,18 @@ acpi_thermal_write_cooling_mode(struct file *file, simple_strtoul(mode_string, NULL, 0)); if (result) - return result; + return_VALUE(result); acpi_thermal_check(tz); - return count; + return_VALUE(count); } static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) { struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; + ACPI_FUNCTION_TRACE("acpi_thermal_polling_seq_show"); if (!tz) goto end; @@ -1029,7 +1066,7 @@ static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) (tz->polling_frequency / 10)); end: - return 0; + return_VALUE(0); } static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file) @@ -1049,12 +1086,13 @@ acpi_thermal_write_polling(struct file *file, char polling_string[12] = { '\0' }; int seconds = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_write_polling"); if (!tz || (count > sizeof(polling_string) - 1)) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(polling_string, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); polling_string[count] = '\0'; @@ -1062,23 +1100,24 @@ acpi_thermal_write_polling(struct file *file, result = acpi_thermal_set_polling(tz, seconds); if (result) - return result; + return_VALUE(result); acpi_thermal_check(tz); - return count; + return_VALUE(count); } static int acpi_thermal_add_fs(struct acpi_device *device) { struct proc_dir_entry *entry = NULL; + ACPI_FUNCTION_TRACE("acpi_thermal_add_fs"); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_thermal_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; } @@ -1086,7 +1125,9 @@ static int acpi_thermal_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_THERMAL_FILE_STATE, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_THERMAL_FILE_STATE)); else { entry->proc_fops = &acpi_thermal_state_fops; entry->data = acpi_driver_data(device); @@ -1097,7 +1138,9 @@ static int acpi_thermal_add_fs(struct acpi_device *device) entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE, S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_THERMAL_FILE_TEMPERATURE)); else { entry->proc_fops = &acpi_thermal_temp_fops; entry->data = acpi_driver_data(device); @@ -1109,7 +1152,9 @@ static int acpi_thermal_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_THERMAL_FILE_TRIP_POINTS)); else { entry->proc_fops = &acpi_thermal_trip_fops; entry->data = acpi_driver_data(device); @@ -1121,7 +1166,9 @@ static int acpi_thermal_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_THERMAL_FILE_COOLING_MODE)); else { entry->proc_fops = &acpi_thermal_cooling_fops; entry->data = acpi_driver_data(device); @@ -1133,18 +1180,21 @@ static int acpi_thermal_add_fs(struct acpi_device *device) S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create '%s' fs entry\n", + ACPI_THERMAL_FILE_POLLING_FREQ)); else { entry->proc_fops = &acpi_thermal_polling_fops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_thermal_remove_fs(struct acpi_device *device) { + ACPI_FUNCTION_TRACE("acpi_thermal_remove_fs"); if (acpi_device_dir(device)) { remove_proc_entry(ACPI_THERMAL_FILE_POLLING_FREQ, @@ -1161,7 +1211,7 @@ static int acpi_thermal_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -1173,11 +1223,13 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) struct acpi_thermal *tz = (struct acpi_thermal *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_thermal_notify"); if (!tz) - return; + return_VOID; - device = tz->device; + if (acpi_bus_get_device(tz->handle, &device)) + return_VOID; switch (event) { case ACPI_THERMAL_NOTIFY_TEMPERATURE: @@ -1199,26 +1251,27 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static int acpi_thermal_get_info(struct acpi_thermal *tz) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_get_info"); if (!tz) - return -EINVAL; + return_VALUE(-EINVAL); /* Get temperature [_TMP] (required) */ result = acpi_thermal_get_temperature(tz); if (result) - return result; + return_VALUE(result); /* Get trip points [_CRT, _PSV, etc.] (required) */ result = acpi_thermal_get_trip_points(tz); if (result) - return result; + return_VALUE(result); /* Set the cooling mode [_SCP] to active cooling (default) */ result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE); @@ -1258,7 +1311,7 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz) if (!result) tz->flags.devices = 1; - return 0; + return_VALUE(0); } static int acpi_thermal_add(struct acpi_device *device) @@ -1267,16 +1320,17 @@ static int acpi_thermal_add(struct acpi_device *device) acpi_status status = AE_OK; struct acpi_thermal *tz = NULL; + ACPI_FUNCTION_TRACE("acpi_thermal_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL); if (!tz) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(tz, 0, sizeof(struct acpi_thermal)); - tz->device = device; + tz->handle = device->handle; strcpy(tz->name, device->pnp.bus_id); strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS); @@ -1288,16 +1342,18 @@ static int acpi_thermal_add(struct acpi_device *device) result = acpi_thermal_add_fs(device); if (result) - goto end; + return_VALUE(result); init_timer(&tz->timer); acpi_thermal_check(tz); - status = acpi_install_notify_handler(device->handle, + status = acpi_install_notify_handler(tz->handle, ACPI_DEVICE_NOTIFY, acpi_thermal_notify, tz); if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing notify handler\n")); result = -ENODEV; goto end; } @@ -1312,7 +1368,7 @@ static int acpi_thermal_add(struct acpi_device *device) kfree(tz); } - return result; + return_VALUE(result); } static int acpi_thermal_remove(struct acpi_device *device, int type) @@ -1320,9 +1376,10 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) acpi_status status = AE_OK; struct acpi_thermal *tz = NULL; + ACPI_FUNCTION_TRACE("acpi_thermal_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); tz = (struct acpi_thermal *)acpi_driver_data(device); @@ -1335,9 +1392,12 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) /* deferred task may reinsert timer */ del_timer_sync(&(tz->timer)); - status = acpi_remove_notify_handler(device->handle, + status = acpi_remove_notify_handler(tz->handle, ACPI_DEVICE_NOTIFY, acpi_thermal_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); /* Terminate policy */ if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) { @@ -1353,65 +1413,38 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) acpi_thermal_remove_fs(device); kfree(tz); - return 0; -} - -static int acpi_thermal_resume(struct acpi_device *device, int state) -{ - struct acpi_thermal *tz = NULL; - int i; - - if (!device || !acpi_driver_data(device)) - return -EINVAL; - - tz = (struct acpi_thermal *)acpi_driver_data(device); - - acpi_thermal_get_temperature(tz); - - for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { - if (tz->trips.active[i].flags.valid) { - tz->temperature = tz->trips.active[i].temperature; - tz->trips.active[i].flags.enabled = 0; - - acpi_thermal_active(tz); - - tz->state.active |= tz->trips.active[i].flags.enabled; - tz->state.active_index = i; - } - } - - acpi_thermal_check(tz); - - return AE_OK; + return_VALUE(0); } static int __init acpi_thermal_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_thermal_init"); acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir); if (!acpi_thermal_dir) - return -ENODEV; + return_VALUE(-ENODEV); acpi_thermal_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_thermal_driver); if (result < 0) { remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_thermal_exit(void) { + ACPI_FUNCTION_TRACE("acpi_thermal_exit"); acpi_bus_unregister_driver(&acpi_thermal_driver); remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_thermal_init); diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index f6cbc0b1b..03b004497 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c @@ -46,6 +46,24 @@ #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utalloc") +/* Local prototypes */ +#ifdef ACPI_DBG_TRACK_ALLOCATIONS +static struct acpi_debug_mem_block *acpi_ut_find_allocation(void *allocation); + +static acpi_status +acpi_ut_track_allocation(struct acpi_debug_mem_block *address, + acpi_size size, + u8 alloc_type, u32 component, char *module, u32 line); + +static acpi_status +acpi_ut_remove_allocation(struct acpi_debug_mem_block *address, + u32 component, char *module, u32 line); + +static acpi_status +acpi_ut_create_list(char *list_name, + u16 object_size, struct acpi_memory_list **return_cache); +#endif + /******************************************************************************* * * FUNCTION: acpi_ut_create_caches @@ -57,23 +75,33 @@ ACPI_MODULE_NAME("utalloc") * DESCRIPTION: Create all local caches * ******************************************************************************/ + acpi_status acpi_ut_create_caches(void) { acpi_status status; - /* Object Caches, for frequently used objects */ +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + + /* Memory allocation lists */ + + status = acpi_ut_create_list("Acpi-Global", 0, &acpi_gbl_global_list); + if (ACPI_FAILURE(status)) { + return (status); + } status = - acpi_os_create_cache("Acpi-Namespace", - sizeof(struct acpi_namespace_node), - ACPI_MAX_NAMESPACE_CACHE_DEPTH, - &acpi_gbl_namespace_cache); + acpi_ut_create_list("Acpi-Namespace", + sizeof(struct acpi_namespace_node), + &acpi_gbl_ns_node_list); if (ACPI_FAILURE(status)) { return (status); } +#endif + + /* Object Caches, for frequently used objects */ status = - acpi_os_create_cache("Acpi-State", sizeof(union acpi_generic_state), + acpi_os_create_cache("acpi_state", sizeof(union acpi_generic_state), ACPI_MAX_STATE_CACHE_DEPTH, &acpi_gbl_state_cache); if (ACPI_FAILURE(status)) { @@ -81,7 +109,7 @@ acpi_status acpi_ut_create_caches(void) } status = - acpi_os_create_cache("Acpi-Parse", + acpi_os_create_cache("acpi_parse", sizeof(struct acpi_parse_obj_common), ACPI_MAX_PARSE_CACHE_DEPTH, &acpi_gbl_ps_node_cache); @@ -90,7 +118,7 @@ acpi_status acpi_ut_create_caches(void) } status = - acpi_os_create_cache("Acpi-ParseExt", + acpi_os_create_cache("acpi_parse_ext", sizeof(struct acpi_parse_obj_named), ACPI_MAX_EXTPARSE_CACHE_DEPTH, &acpi_gbl_ps_node_ext_cache); @@ -99,7 +127,7 @@ acpi_status acpi_ut_create_caches(void) } status = - acpi_os_create_cache("Acpi-Operand", + acpi_os_create_cache("acpi_operand", sizeof(union acpi_operand_object), ACPI_MAX_OBJECT_CACHE_DEPTH, &acpi_gbl_operand_cache); @@ -107,24 +135,6 @@ acpi_status acpi_ut_create_caches(void) return (status); } -#ifdef ACPI_DBG_TRACK_ALLOCATIONS - - /* Memory allocation lists */ - - status = acpi_ut_create_list("Acpi-Global", 0, &acpi_gbl_global_list); - if (ACPI_FAILURE(status)) { - return (status); - } - - status = - acpi_ut_create_list("Acpi-Namespace", - sizeof(struct acpi_namespace_node), - &acpi_gbl_ns_node_list); - if (ACPI_FAILURE(status)) { - return (status); - } -#endif - return (AE_OK); } @@ -143,9 +153,6 @@ acpi_status acpi_ut_create_caches(void) acpi_status acpi_ut_delete_caches(void) { - (void)acpi_os_delete_cache(acpi_gbl_namespace_cache); - acpi_gbl_namespace_cache = NULL; - (void)acpi_os_delete_cache(acpi_gbl_state_cache); acpi_gbl_state_cache = NULL; @@ -158,21 +165,6 @@ acpi_status acpi_ut_delete_caches(void) (void)acpi_os_delete_cache(acpi_gbl_ps_node_ext_cache); acpi_gbl_ps_node_ext_cache = NULL; -#ifdef ACPI_DBG_TRACK_ALLOCATIONS - - /* Debug only - display leftover memory allocation, if any */ - - acpi_ut_dump_allocations(ACPI_UINT32_MAX, NULL); - - /* Free memory lists */ - - ACPI_FREE(acpi_gbl_global_list); - acpi_gbl_global_list = NULL; - - ACPI_FREE(acpi_gbl_ns_node_list); - acpi_gbl_ns_node_list = NULL; -#endif - return (AE_OK); } @@ -260,7 +252,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, /* Allocate a new buffer with local interface to allow tracking */ - buffer->pointer = ACPI_ALLOCATE_ZEROED(required_length); + buffer->pointer = ACPI_MEM_CALLOCATE(required_length); if (!buffer->pointer) { return (AE_NO_MEMORY); } @@ -285,7 +277,6 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, return (status); } -#ifdef NOT_USED_BY_LINUX /******************************************************************************* * * FUNCTION: acpi_ut_allocate @@ -297,7 +288,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, * * RETURN: Address of the allocated memory on success, NULL on failure. * - * DESCRIPTION: Subsystem equivalent of malloc. + * DESCRIPTION: The subsystem's equivalent of malloc. * ******************************************************************************/ @@ -305,23 +296,23 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) { void *allocation; - ACPI_FUNCTION_TRACE_U32(ut_allocate, size); + ACPI_FUNCTION_TRACE_U32("ut_allocate", size); /* Check for an inadvertent size of zero bytes */ if (!size) { - ACPI_WARNING((module, line, - "Attempt to allocate zero bytes, allocating 1 byte")); + ACPI_ERROR((module, line, + "ut_allocate: Attempt to allocate zero bytes, allocating 1 byte")); size = 1; } allocation = acpi_os_allocate(size); if (!allocation) { - /* Report allocation error */ - ACPI_WARNING((module, line, - "Could not allocate size %X", (u32) size)); + ACPI_ERROR((module, line, + "ut_allocate: Could not allocate size %X", + (u32) size)); return_PTR(NULL); } @@ -331,7 +322,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) /******************************************************************************* * - * FUNCTION: acpi_ut_allocate_zeroed + * FUNCTION: acpi_ut_callocate * * PARAMETERS: Size - Size of the allocation * Component - Component type of caller @@ -340,25 +331,542 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) * * RETURN: Address of the allocated memory on success, NULL on failure. * - * DESCRIPTION: Subsystem equivalent of calloc. Allocate and zero memory. + * DESCRIPTION: Subsystem equivalent of calloc. * ******************************************************************************/ -void *acpi_ut_allocate_zeroed(acpi_size size, - u32 component, char *module, u32 line) +void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line) { void *allocation; + ACPI_FUNCTION_TRACE_U32("ut_callocate", size); + + /* Check for an inadvertent size of zero bytes */ + + if (!size) { + ACPI_ERROR((module, line, + "Attempt to allocate zero bytes, allocating 1 byte")); + size = 1; + } + + allocation = acpi_os_allocate(size); + if (!allocation) { + /* Report allocation error */ + + ACPI_ERROR((module, line, + "Could not allocate size %X", (u32) size)); + return_PTR(NULL); + } + + /* Clear the memory block */ + + ACPI_MEMSET(allocation, 0, size); + return_PTR(allocation); +} + +#ifdef ACPI_DBG_TRACK_ALLOCATIONS +/* + * These procedures are used for tracking memory leaks in the subsystem, and + * they get compiled out when the ACPI_DBG_TRACK_ALLOCATIONS is not set. + * + * Each memory allocation is tracked via a doubly linked list. Each + * element contains the caller's component, module name, function name, and + * line number. acpi_ut_allocate and acpi_ut_callocate call + * acpi_ut_track_allocation to add an element to the list; deletion + * occurs in the body of acpi_ut_free. + */ + +/******************************************************************************* + * + * FUNCTION: acpi_ut_create_list + * + * PARAMETERS: cache_name - Ascii name for the cache + * object_size - Size of each cached object + * return_cache - Where the new cache object is returned + * + * RETURN: Status + * + * DESCRIPTION: Create a local memory list for tracking purposed + * + ******************************************************************************/ + +static acpi_status +acpi_ut_create_list(char *list_name, + u16 object_size, struct acpi_memory_list **return_cache) +{ + struct acpi_memory_list *cache; + + cache = acpi_os_allocate(sizeof(struct acpi_memory_list)); + if (!cache) { + return (AE_NO_MEMORY); + } + + ACPI_MEMSET(cache, 0, sizeof(struct acpi_memory_list)); + + cache->list_name = list_name; + cache->object_size = object_size; + + *return_cache = cache; + return (AE_OK); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_allocate_and_track + * + * PARAMETERS: Size - Size of the allocation + * Component - Component type of caller + * Module - Source file name of caller + * Line - Line number of caller + * + * RETURN: Address of the allocated memory on success, NULL on failure. + * + * DESCRIPTION: The subsystem's equivalent of malloc. + * + ******************************************************************************/ + +void *acpi_ut_allocate_and_track(acpi_size size, + u32 component, char *module, u32 line) +{ + struct acpi_debug_mem_block *allocation; + acpi_status status; + + allocation = + acpi_ut_allocate(size + sizeof(struct acpi_debug_mem_header), + component, module, line); + if (!allocation) { + return (NULL); + } + + status = acpi_ut_track_allocation(allocation, size, + ACPI_MEM_MALLOC, component, module, + line); + if (ACPI_FAILURE(status)) { + acpi_os_free(allocation); + return (NULL); + } + + acpi_gbl_global_list->total_allocated++; + acpi_gbl_global_list->current_total_size += (u32) size; + + return ((void *)&allocation->user_space); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_callocate_and_track + * + * PARAMETERS: Size - Size of the allocation + * Component - Component type of caller + * Module - Source file name of caller + * Line - Line number of caller + * + * RETURN: Address of the allocated memory on success, NULL on failure. + * + * DESCRIPTION: Subsystem equivalent of calloc. + * + ******************************************************************************/ + +void *acpi_ut_callocate_and_track(acpi_size size, + u32 component, char *module, u32 line) +{ + struct acpi_debug_mem_block *allocation; + acpi_status status; + + allocation = + acpi_ut_callocate(size + sizeof(struct acpi_debug_mem_header), + component, module, line); + if (!allocation) { + /* Report allocation error */ + + ACPI_ERROR((module, line, + "Could not allocate size %X", (u32) size)); + return (NULL); + } + + status = acpi_ut_track_allocation(allocation, size, + ACPI_MEM_CALLOC, component, module, + line); + if (ACPI_FAILURE(status)) { + acpi_os_free(allocation); + return (NULL); + } + + acpi_gbl_global_list->total_allocated++; + acpi_gbl_global_list->current_total_size += (u32) size; + + return ((void *)&allocation->user_space); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_free_and_track + * + * PARAMETERS: Allocation - Address of the memory to deallocate + * Component - Component type of caller + * Module - Source file name of caller + * Line - Line number of caller + * + * RETURN: None + * + * DESCRIPTION: Frees the memory at Allocation + * + ******************************************************************************/ + +void +acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line) +{ + struct acpi_debug_mem_block *debug_block; + acpi_status status; + + ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); + + if (NULL == allocation) { + ACPI_ERROR((module, line, "Attempt to delete a NULL address")); + + return_VOID; + } + + debug_block = ACPI_CAST_PTR(struct acpi_debug_mem_block, + (((char *)allocation) - + sizeof(struct acpi_debug_mem_header))); + + acpi_gbl_global_list->total_freed++; + acpi_gbl_global_list->current_total_size -= debug_block->size; + + status = acpi_ut_remove_allocation(debug_block, + component, module, line); + if (ACPI_FAILURE(status)) { + ACPI_EXCEPTION((AE_INFO, status, "Could not free memory")); + } + + acpi_os_free(debug_block); + ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation)); + return_VOID; +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_find_allocation + * + * PARAMETERS: Allocation - Address of allocated memory + * + * RETURN: A list element if found; NULL otherwise. + * + * DESCRIPTION: Searches for an element in the global allocation tracking list. + * + ******************************************************************************/ + +static struct acpi_debug_mem_block *acpi_ut_find_allocation(void *allocation) +{ + struct acpi_debug_mem_block *element; + ACPI_FUNCTION_ENTRY(); - allocation = acpi_ut_allocate(size, component, module, line); - if (allocation) { + element = acpi_gbl_global_list->list_head; - /* Clear the memory block */ + /* Search for the address. */ - ACPI_MEMSET(allocation, 0, size); + while (element) { + if (element == allocation) { + return (element); + } + + element = element->next; } - return (allocation); + return (NULL); } -#endif + +/******************************************************************************* + * + * FUNCTION: acpi_ut_track_allocation + * + * PARAMETERS: Allocation - Address of allocated memory + * Size - Size of the allocation + * alloc_type - MEM_MALLOC or MEM_CALLOC + * Component - Component type of caller + * Module - Source file name of caller + * Line - Line number of caller + * + * RETURN: None. + * + * DESCRIPTION: Inserts an element into the global allocation tracking list. + * + ******************************************************************************/ + +static acpi_status +acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation, + acpi_size size, + u8 alloc_type, u32 component, char *module, u32 line) +{ + struct acpi_memory_list *mem_list; + struct acpi_debug_mem_block *element; + acpi_status status = AE_OK; + + ACPI_FUNCTION_TRACE_PTR("ut_track_allocation", allocation); + + mem_list = acpi_gbl_global_list; + status = acpi_ut_acquire_mutex(ACPI_MTX_MEMORY); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* + * Search list for this address to make sure it is not already on the list. + * This will catch several kinds of problems. + */ + element = acpi_ut_find_allocation(allocation); + if (element) { + ACPI_ERROR((AE_INFO, + "ut_track_allocation: Allocation already present in list! (%p)", + allocation)); + + ACPI_ERROR((AE_INFO, "Element %p Address %p", + element, allocation)); + + goto unlock_and_exit; + } + + /* Fill in the instance data. */ + + allocation->size = (u32) size; + allocation->alloc_type = alloc_type; + allocation->component = component; + allocation->line = line; + + ACPI_STRNCPY(allocation->module, module, ACPI_MAX_MODULE_NAME); + allocation->module[ACPI_MAX_MODULE_NAME - 1] = 0; + + /* Insert at list head */ + + if (mem_list->list_head) { + ((struct acpi_debug_mem_block *)(mem_list->list_head))-> + previous = allocation; + } + + allocation->next = mem_list->list_head; + allocation->previous = NULL; + + mem_list->list_head = allocation; + + unlock_and_exit: + status = acpi_ut_release_mutex(ACPI_MTX_MEMORY); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_remove_allocation + * + * PARAMETERS: Allocation - Address of allocated memory + * Component - Component type of caller + * Module - Source file name of caller + * Line - Line number of caller + * + * RETURN: + * + * DESCRIPTION: Deletes an element from the global allocation tracking list. + * + ******************************************************************************/ + +static acpi_status +acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation, + u32 component, char *module, u32 line) +{ + struct acpi_memory_list *mem_list; + acpi_status status; + + ACPI_FUNCTION_TRACE("ut_remove_allocation"); + + mem_list = acpi_gbl_global_list; + if (NULL == mem_list->list_head) { + /* No allocations! */ + + ACPI_ERROR((module, line, + "Empty allocation list, nothing to free!")); + + return_ACPI_STATUS(AE_OK); + } + + status = acpi_ut_acquire_mutex(ACPI_MTX_MEMORY); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* Unlink */ + + if (allocation->previous) { + (allocation->previous)->next = allocation->next; + } else { + mem_list->list_head = allocation->next; + } + + if (allocation->next) { + (allocation->next)->previous = allocation->previous; + } + + /* Mark the segment as deleted */ + + ACPI_MEMSET(&allocation->user_space, 0xEA, allocation->size); + + ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n", + allocation->size)); + + status = acpi_ut_release_mutex(ACPI_MTX_MEMORY); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_dump_allocation_info + * + * PARAMETERS: + * + * RETURN: None + * + * DESCRIPTION: Print some info about the outstanding allocations. + * + ******************************************************************************/ + +#ifdef ACPI_FUTURE_USAGE +void acpi_ut_dump_allocation_info(void) +{ +/* + struct acpi_memory_list *mem_list; +*/ + + ACPI_FUNCTION_TRACE("ut_dump_allocation_info"); + +/* + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Current allocations", + mem_list->current_count, + ROUND_UP_TO_1K (mem_list->current_size))); + + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Max concurrent allocations", + mem_list->max_concurrent_count, + ROUND_UP_TO_1K (mem_list->max_concurrent_size))); + + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Total (all) internal objects", + running_object_count, + ROUND_UP_TO_1K (running_object_size))); + + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Total (all) allocations", + running_alloc_count, + ROUND_UP_TO_1K (running_alloc_size))); + + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Current Nodes", + acpi_gbl_current_node_count, + ROUND_UP_TO_1K (acpi_gbl_current_node_size))); + + ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, + ("%30s: %4d (%3d Kb)\n", "Max Nodes", + acpi_gbl_max_concurrent_node_count, + ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * + sizeof (struct acpi_namespace_node))))); +*/ + return_VOID; +} +#endif /* ACPI_FUTURE_USAGE */ + +/******************************************************************************* + * + * FUNCTION: acpi_ut_dump_allocations + * + * PARAMETERS: Component - Component(s) to dump info for. + * Module - Module to dump info for. NULL means all. + * + * RETURN: None + * + * DESCRIPTION: Print a list of all outstanding allocations. + * + ******************************************************************************/ + +void acpi_ut_dump_allocations(u32 component, char *module) +{ + struct acpi_debug_mem_block *element; + union acpi_descriptor *descriptor; + u32 num_outstanding = 0; + + ACPI_FUNCTION_TRACE("ut_dump_allocations"); + + /* + * Walk the allocation list. + */ + if (ACPI_FAILURE(acpi_ut_acquire_mutex(ACPI_MTX_MEMORY))) { + return; + } + + element = acpi_gbl_global_list->list_head; + while (element) { + if ((element->component & component) && + ((module == NULL) + || (0 == ACPI_STRCMP(module, element->module)))) { + /* Ignore allocated objects that are in a cache */ + + descriptor = + ACPI_CAST_PTR(union acpi_descriptor, + &element->user_space); + if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) { + acpi_os_printf("%p Len %04X %9.9s-%d [%s] ", + descriptor, element->size, + element->module, element->line, + acpi_ut_get_descriptor_name + (descriptor)); + + /* Most of the elements will be Operand objects. */ + + switch (ACPI_GET_DESCRIPTOR_TYPE(descriptor)) { + case ACPI_DESC_TYPE_OPERAND: + acpi_os_printf("%12.12s R%hd", + acpi_ut_get_type_name + (descriptor->object. + common.type), + descriptor->object. + common.reference_count); + break; + + case ACPI_DESC_TYPE_PARSER: + acpi_os_printf("aml_opcode %04hX", + descriptor->op.asl. + aml_opcode); + break; + + case ACPI_DESC_TYPE_NAMED: + acpi_os_printf("%4.4s", + acpi_ut_get_node_name + (&descriptor->node)); + break; + + default: + break; + } + + acpi_os_printf("\n"); + num_outstanding++; + } + } + element = element->next; + } + + (void)acpi_ut_release_mutex(ACPI_MTX_MEMORY); + + /* Print summary */ + + if (!num_outstanding) { + ACPI_INFO((AE_INFO, "No outstanding allocations")); + } else { + ACPI_ERROR((AE_INFO, + "%d(%X) Outstanding allocations", + num_outstanding, num_outstanding)); + } + + return_VOID; +} + +#endif /* #ifdef ACPI_DBG_TRACK_ALLOCATIONS */ diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c index 1a1f81091..2177cb1ef 100644 --- a/drivers/acpi/utilities/utcache.c +++ b/drivers/acpi/utilities/utcache.c @@ -118,14 +118,13 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache) /* Walk the list of objects in this cache */ while (cache->list_head) { - /* Delete and unlink one cached state object */ next = *(ACPI_CAST_INDIRECT_PTR(char, &(((char *)cache-> list_head)[cache-> link_offset]))); - ACPI_FREE(cache->list_head); + ACPI_MEM_FREE(cache->list_head); cache->list_head = next; cache->current_depth--; @@ -162,7 +161,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache) /* Now we can delete the cache object */ - ACPI_FREE(cache); + acpi_os_free(cache); return (AE_OK); } @@ -194,7 +193,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object) /* If cache is full, just free this object */ if (cache->current_depth >= cache->max_depth) { - ACPI_FREE(object); + ACPI_MEM_FREE(object); ACPI_MEM_TRACKING(cache->total_freed++); } @@ -244,7 +243,7 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) acpi_status status; void *object; - ACPI_FUNCTION_NAME(os_acquire_object); + ACPI_FUNCTION_NAME("os_acquire_object"); if (!cache) { return (NULL); @@ -260,7 +259,6 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) /* Check the cache first */ if (cache->list_head) { - /* There is an object available, use it */ object = cache->list_head; @@ -272,9 +270,9 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) cache->current_depth--; ACPI_MEM_TRACKING(cache->hits++); - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Object %p from %s cache\n", object, - cache->list_name)); + ACPI_MEM_TRACKING(ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "Object %p from %s cache\n", + object, cache->list_name))); status = acpi_ut_release_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { @@ -289,14 +287,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) ACPI_MEM_TRACKING(cache->total_allocated++); - /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ + /* Avoid deadlock with ACPI_MEM_CALLOCATE */ status = acpi_ut_release_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return (NULL); } - object = ACPI_ALLOCATE_ZEROED(cache->object_size); + object = ACPI_MEM_CALLOCATE(cache->object_size); if (!object) { return (NULL); } diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 5e1a80d1b..df2d32096 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -109,7 +109,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ut_copy_isimple_to_esimple); + ACPI_FUNCTION_TRACE("ut_copy_isimple_to_esimple"); *buffer_space_used = 0; @@ -325,7 +325,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object, acpi_status status; struct acpi_pkg_info info; - ACPI_FUNCTION_TRACE(ut_copy_ipackage_to_epackage); + ACPI_FUNCTION_TRACE("ut_copy_ipackage_to_epackage"); /* * First package at head of the buffer @@ -383,7 +383,7 @@ acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *internal_object, { acpi_status status; - ACPI_FUNCTION_TRACE(ut_copy_iobject_to_eobject); + ACPI_FUNCTION_TRACE("ut_copy_iobject_to_eobject"); if (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE) { /* @@ -442,7 +442,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, { union acpi_operand_object *internal_object; - ACPI_FUNCTION_TRACE(ut_copy_esimple_to_isimple); + ACPI_FUNCTION_TRACE("ut_copy_esimple_to_isimple"); /* * Simple types supported are: String, Buffer, Integer @@ -472,8 +472,8 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, case ACPI_TYPE_STRING: internal_object->string.pointer = - ACPI_ALLOCATE_ZEROED((acpi_size) external_object->string. - length + 1); + ACPI_MEM_CALLOCATE((acpi_size) external_object->string. + length + 1); if (!internal_object->string.pointer) { goto error_exit; } @@ -488,7 +488,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, case ACPI_TYPE_BUFFER: internal_object->buffer.pointer = - ACPI_ALLOCATE_ZEROED(external_object->buffer.length); + ACPI_MEM_CALLOCATE(external_object->buffer.length); if (!internal_object->buffer.pointer) { goto error_exit; } @@ -552,7 +552,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object, union acpi_operand_object *this_internal_obj; union acpi_object *this_external_obj; - ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage); + ACPI_FUNCTION_TRACE("ut_copy_epackage_to_ipackage"); /* * First package at head of the buffer @@ -600,7 +600,7 @@ acpi_ut_copy_eobject_to_iobject(union acpi_object *external_object, { acpi_status status; - ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject); + ACPI_FUNCTION_TRACE("ut_copy_eobject_to_iobject"); if (external_object->type == ACPI_TYPE_PACKAGE) { /* @@ -676,7 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, if ((source_desc->buffer.pointer) && (source_desc->buffer.length)) { dest_desc->buffer.pointer = - ACPI_ALLOCATE(source_desc->buffer.length); + ACPI_MEM_ALLOCATE(source_desc->buffer.length); if (!dest_desc->buffer.pointer) { return (AE_NO_MEMORY); } @@ -697,8 +697,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, */ if (source_desc->string.pointer) { dest_desc->string.pointer = - ACPI_ALLOCATE((acpi_size) source_desc->string. - length + 1); + ACPI_MEM_ALLOCATE((acpi_size) source_desc->string. + length + 1); if (!dest_desc->string.pointer) { return (AE_NO_MEMORY); } @@ -805,7 +805,9 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, /* * Create the object array */ - target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.count + 1) * sizeof(void *)); + target_object->package.elements = + ACPI_MEM_CALLOCATE(((acpi_size) source_object->package. + count + 1) * sizeof(void *)); if (!target_object->package.elements) { status = AE_NO_MEMORY; goto error_exit; @@ -854,7 +856,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ut_copy_ipackage_to_ipackage); + ACPI_FUNCTION_TRACE("ut_copy_ipackage_to_ipackage"); dest_obj->common.type = ACPI_GET_OBJECT_TYPE(source_obj); dest_obj->common.flags = source_obj->common.flags; @@ -863,10 +865,10 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, /* * Create the object array and walk the source package tree */ - dest_obj->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) - source_obj->package. - count + - 1) * sizeof(void *)); + dest_obj->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) + source_obj->package. + count + + 1) * sizeof(void *)); if (!dest_obj->package.elements) { ACPI_ERROR((AE_INFO, "Package allocation failure")); return_ACPI_STATUS(AE_NO_MEMORY); @@ -880,7 +882,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, acpi_ut_copy_ielement_to_ielement, walk_state); if (ACPI_FAILURE(status)) { - /* On failure, delete the destination package object */ acpi_ut_remove_reference(dest_obj); @@ -910,7 +911,7 @@ acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc, { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(ut_copy_iobject_to_iobject); + ACPI_FUNCTION_TRACE("ut_copy_iobject_to_iobject"); /* Create the top level object */ diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index bb1eaf9aa..35f3d581e 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c @@ -41,13 +41,15 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utdebug") #ifdef ACPI_DEBUG_OUTPUT -static acpi_thread_id acpi_gbl_prev_thread_id; +static u32 acpi_gbl_prev_thread_id = 0xFFFFFFFF; static char *acpi_gbl_fn_entry_str = "----Entry"; static char *acpi_gbl_fn_exit_str = "----Exit-"; @@ -121,14 +123,12 @@ static const char *acpi_ut_trim_function_name(const char *function_name) /* All Function names are longer than 4 chars, check is safe */ if (*(ACPI_CAST_PTR(u32, function_name)) == ACPI_PREFIX_MIXED) { - /* This is the case where the original source has not been modified */ return (function_name + 4); } if (*(ACPI_CAST_PTR(u32, function_name)) == ACPI_PREFIX_LOWER) { - /* This is the case where the source has been 'linuxized' */ return (function_name + 5); @@ -162,7 +162,7 @@ acpi_ut_debug_print(u32 requested_debug_level, const char *function_name, char *module_name, u32 component_id, char *format, ...) { - acpi_thread_id thread_id; + u32 thread_id; va_list args; /* @@ -177,11 +177,12 @@ acpi_ut_debug_print(u32 requested_debug_level, * Thread tracking and context switch notification */ thread_id = acpi_os_get_thread_id(); + if (thread_id != acpi_gbl_prev_thread_id) { if (ACPI_LV_THREADS & acpi_dbg_level) { acpi_os_printf ("\n**** Context Switch from TID %X to TID %X ****\n\n", - (u32) acpi_gbl_prev_thread_id, (u32) thread_id); + acpi_gbl_prev_thread_id, thread_id); } acpi_gbl_prev_thread_id = thread_id; @@ -205,7 +206,7 @@ acpi_ut_debug_print(u32 requested_debug_level, acpi_os_vprintf(format, args); } -ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) +EXPORT_SYMBOL(acpi_ut_debug_print); /******************************************************************************* * @@ -225,6 +226,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) * debug_print so that the same macros can be used. * ******************************************************************************/ + void ACPI_INTERNAL_VAR_XFACE acpi_ut_debug_print_raw(u32 requested_debug_level, u32 line_number, @@ -242,7 +244,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, acpi_os_vprintf(format, args); } -ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) +EXPORT_SYMBOL(acpi_ut_debug_print_raw); /******************************************************************************* * @@ -259,6 +261,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) * set in debug_level * ******************************************************************************/ + void acpi_ut_trace(u32 line_number, const char *function_name, char *module_name, u32 component_id) @@ -272,7 +275,7 @@ acpi_ut_trace(u32 line_number, component_id, "%s\n", acpi_gbl_fn_entry_str); } -ACPI_EXPORT_SYMBOL(acpi_ut_trace) +EXPORT_SYMBOL(acpi_ut_trace); /******************************************************************************* * @@ -290,6 +293,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace) * set in debug_level * ******************************************************************************/ + void acpi_ut_trace_ptr(u32 line_number, const char *function_name, @@ -396,7 +400,7 @@ acpi_ut_exit(u32 line_number, acpi_gbl_nesting_level--; } -ACPI_EXPORT_SYMBOL(acpi_ut_exit) +EXPORT_SYMBOL(acpi_ut_exit); /******************************************************************************* * @@ -414,6 +418,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit) * set in debug_level. Prints exit status also. * ******************************************************************************/ + void acpi_ut_status_exit(u32 line_number, const char *function_name, @@ -437,7 +442,7 @@ acpi_ut_status_exit(u32 line_number, acpi_gbl_nesting_level--; } -ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) +EXPORT_SYMBOL(acpi_ut_status_exit); /******************************************************************************* * @@ -455,6 +460,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) * set in debug_level. Prints exit value also. * ******************************************************************************/ + void acpi_ut_value_exit(u32 line_number, const char *function_name, @@ -469,7 +475,7 @@ acpi_ut_value_exit(u32 line_number, acpi_gbl_nesting_level--; } -ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) +EXPORT_SYMBOL(acpi_ut_value_exit); /******************************************************************************* * @@ -487,6 +493,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) * set in debug_level. Prints exit value also. * ******************************************************************************/ + void acpi_ut_ptr_exit(u32 line_number, const char *function_name, @@ -517,13 +524,20 @@ acpi_ut_ptr_exit(u32 line_number, * ******************************************************************************/ -void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) +void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id) { acpi_native_uint i = 0; acpi_native_uint j; u32 temp32; u8 buf_char; + /* Only dump the buffer if tracing is enabled */ + + if (!((ACPI_LV_TABLES & acpi_dbg_level) && + (component_id & acpi_dbg_layer))) { + return; + } + if ((count < 4) || (count & 0x01)) { display = DB_BYTE_DISPLAY; } @@ -531,7 +545,6 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) /* Nasty little dump buffer routine! */ while (i < count) { - /* Print current offset */ acpi_os_printf("%6.4X: ", (u32) i); @@ -540,7 +553,6 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) for (j = 0; j < 16;) { if (i + j >= count) { - /* Dump fill spaces */ acpi_os_printf("%*s", ((display * 2) + 1), " "); @@ -549,7 +561,6 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) } switch (display) { - case DB_BYTE_DISPLAY: default: /* Default is BYTE display */ acpi_os_printf("%02X ", buffer[i + j]); @@ -607,31 +618,3 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) return; } - -/******************************************************************************* - * - * FUNCTION: acpi_ut_dump_buffer - * - * PARAMETERS: Buffer - Buffer to dump - * Count - Amount to dump, in bytes - * Display - BYTE, WORD, DWORD, or QWORD display - * component_iD - Caller's component ID - * - * RETURN: None - * - * DESCRIPTION: Generic dump buffer in both hex and ascii. - * - ******************************************************************************/ - -void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id) -{ - - /* Only dump the buffer if tracing is enabled */ - - if (!((ACPI_LV_TABLES & acpi_dbg_level) && - (component_id & acpi_dbg_layer))) { - return; - } - - acpi_ut_dump_buffer2(buffer, count, display); -} diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index 9d3f1149b..1db9695b0 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c @@ -76,7 +76,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) union acpi_operand_object *second_desc; union acpi_operand_object *next_desc; - ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object); + ACPI_FUNCTION_TRACE_PTR("ut_delete_internal_obj", object); if (!object) { return_VOID; @@ -96,7 +96,6 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) /* Free the actual string buffer */ if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) { - /* But only if it is NOT a pointer into an ACPI table */ obj_pointer = object->string.pointer; @@ -112,7 +111,6 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) /* Free the actual buffer */ if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) { - /* But only if it is NOT a pointer into an ACPI table */ obj_pointer = object->buffer.pointer; @@ -155,30 +153,21 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) case ACPI_TYPE_MUTEX: ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, - "***** Mutex %p, OS Mutex %p\n", - object, object->mutex.os_mutex)); - - if (object->mutex.os_mutex != ACPI_GLOBAL_LOCK) { - acpi_ex_unlink_mutex(object); - acpi_os_delete_mutex(object->mutex.os_mutex); - } else { - /* Global Lock "mutex" is actually a counting semaphore */ + "***** Mutex %p, Semaphore %p\n", + object, object->mutex.semaphore)); - (void) - acpi_os_delete_semaphore - (acpi_gbl_global_lock_semaphore); - acpi_gbl_global_lock_semaphore = NULL; - } + acpi_ex_unlink_mutex(object); + (void)acpi_os_delete_semaphore(object->mutex.semaphore); break; case ACPI_TYPE_EVENT: ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, - "***** Event %p, OS Semaphore %p\n", - object, object->event.os_semaphore)); + "***** Event %p, Semaphore %p\n", + object, object->event.semaphore)); - (void)acpi_os_delete_semaphore(object->event.os_semaphore); - object->event.os_semaphore = NULL; + (void)acpi_os_delete_semaphore(object->event.semaphore); + object->event.semaphore = NULL; break; case ACPI_TYPE_METHOD: @@ -186,13 +175,12 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "***** Method %p\n", object)); - /* Delete the method mutex if it exists */ + /* Delete the method semaphore if it exists */ - if (object->method.mutex) { - acpi_os_delete_mutex(object->method.mutex->mutex. - os_mutex); - acpi_ut_delete_object_desc(object->method.mutex); - object->method.mutex = NULL; + if (object->method.semaphore) { + (void)acpi_os_delete_semaphore(object->method. + semaphore); + object->method.semaphore = NULL; } break; @@ -210,22 +198,11 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) */ handler_desc = object->region.handler; if (handler_desc) { - if (handler_desc->address_space.handler_flags & + if (handler_desc->address_space. + hflags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) { - - /* Deactivate region and free region context */ - - if (handler_desc->address_space.setup) { - (void)handler_desc-> - address_space.setup(object, - ACPI_REGION_DEACTIVATE, - handler_desc-> - address_space. - context, - &second_desc-> - extra. - region_context); - } + obj_pointer = + second_desc->extra.region_context; } acpi_ut_remove_reference(handler_desc); @@ -257,7 +234,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) if (obj_pointer) { ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Deleting Object Subptr %p\n", obj_pointer)); - ACPI_FREE(obj_pointer); + ACPI_MEM_FREE(obj_pointer); } /* Now the object can be safely deleted */ @@ -286,7 +263,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) { union acpi_operand_object **internal_obj; - ACPI_FUNCTION_TRACE(ut_delete_internal_object_list); + ACPI_FUNCTION_TRACE("ut_delete_internal_object_list"); /* Walk the null-terminated internal list */ @@ -296,7 +273,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) /* Free the combined parameter pointer list and object array */ - ACPI_FREE(obj_list); + ACPI_MEM_FREE(obj_list); return_VOID; } @@ -319,7 +296,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) u16 count; u16 new_count; - ACPI_FUNCTION_NAME(ut_update_ref_count); + ACPI_FUNCTION_NAME("ut_update_ref_count"); if (!object) { return; @@ -329,9 +306,11 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) new_count = count; /* - * Perform the reference count action (increment, decrement, force delete) + * Perform the reference count action + * (increment, decrement, or force delete) */ switch (action) { + case REF_INCREMENT: new_count++; @@ -368,6 +347,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) if (new_count == 0) { acpi_ut_delete_internal_obj(object); } + break; case REF_FORCE_DELETE: @@ -392,10 +372,13 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) * (A deleted object will have a huge reference count) */ if (count > ACPI_MAX_REFERENCE_COUNT) { + ACPI_WARNING((AE_INFO, - "Large Reference Count (%X) in object %p", count, - object)); + "Large Reference Count (%X) in object %p", + count, object)); } + + return; } /******************************************************************************* @@ -421,7 +404,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) ******************************************************************************/ acpi_status -acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) +acpi_ut_update_object_reference(union acpi_operand_object * object, u16 action) { acpi_status status = AE_OK; union acpi_generic_state *state_list = NULL; @@ -429,10 +412,9 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) union acpi_generic_state *state; acpi_native_uint i; - ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object); + ACPI_FUNCTION_TRACE_PTR("ut_update_object_reference", object); while (object) { - /* Make sure that this isn't a namespace handle */ if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) { @@ -447,16 +429,11 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) */ switch (ACPI_GET_OBJECT_TYPE(object)) { case ACPI_TYPE_DEVICE: - case ACPI_TYPE_PROCESSOR: - case ACPI_TYPE_POWER: - case ACPI_TYPE_THERMAL: - - /* Update the notify objects for these types (if present) */ - acpi_ut_update_ref_count(object->common_notify. - system_notify, action); - acpi_ut_update_ref_count(object->common_notify. - device_notify, action); + acpi_ut_update_ref_count(object->device.system_notify, + action); + acpi_ut_update_ref_count(object->device.device_notify, + action); break; case ACPI_TYPE_PACKAGE: @@ -530,11 +507,11 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) case ACPI_TYPE_REGION: default: - break; /* No subobjects for all other types */ + break; /* No subobjects */ } /* - * Now we can update the count in the main object. This can only + * Now we can update the count in the main object. This can only * happen after we update the sub-objects in case this causes the * main object to be deleted. */ @@ -579,7 +556,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) void acpi_ut_add_reference(union acpi_operand_object *object) { - ACPI_FUNCTION_TRACE_PTR(ut_add_reference, object); + ACPI_FUNCTION_TRACE_PTR("ut_add_reference", object); /* Ensure that we have a valid object */ @@ -612,11 +589,11 @@ void acpi_ut_add_reference(union acpi_operand_object *object) void acpi_ut_remove_reference(union acpi_operand_object *object) { - ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object); + ACPI_FUNCTION_TRACE_PTR("ut_remove_reference", object); /* - * Allow a NULL pointer to be passed in, just ignore it. This saves - * each caller from having to check. Also, ignore NS nodes. + * Allow a NULL pointer to be passed in, just ignore it. This saves + * each caller from having to check. Also, ignore NS nodes. * */ if (!object || @@ -636,7 +613,7 @@ void acpi_ut_remove_reference(union acpi_operand_object *object) /* * Decrement the reference count, and only actually delete the object - * if the reference count becomes 0. (Must also decrement the ref count + * if the reference count becomes 0. (Must also decrement the ref count * of all subobjects!) */ (void)acpi_ut_update_object_reference(object, REF_DECREMENT); diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index d6d712158..106cc97cb 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c @@ -56,34 +56,6 @@ static acpi_status acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, struct acpi_compatible_id *one_cid); -/* - * Strings supported by the _OSI predefined (internal) method. - */ -static const char *acpi_interfaces_supported[] = { - /* Operating System Vendor Strings */ - - "Linux", - "Windows 2000", - "Windows 2001", - "Windows 2001 SP0", - "Windows 2001 SP1", - "Windows 2001 SP2", - "Windows 2001 SP3", - "Windows 2001 SP4", - "Windows 2001.1", - "Windows 2001.1 SP1", /* Added 03/2006 */ - "Windows 2006", /* Added 03/2006 */ - - /* Feature Group Strings */ - - "Extended Address Space Descriptor" - /* - * All "optional" feature group strings (features that are implemented - * by the host) should be implemented in the host version of - * acpi_os_validate_interface and should not be added here. - */ -}; - /******************************************************************************* * * FUNCTION: acpi_ut_osi_implementation @@ -92,18 +64,18 @@ static const char *acpi_interfaces_supported[] = { * * RETURN: Status * - * DESCRIPTION: Implementation of the _OSI predefined control method + * DESCRIPTION: Implementation of _OSI predefined control method + * Supported = _OSI (String) * ******************************************************************************/ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) { - acpi_status status; union acpi_operand_object *string_desc; union acpi_operand_object *return_desc; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ut_osi_implementation); + ACPI_FUNCTION_TRACE("ut_osi_implementation"); /* Validate the string input argument */ @@ -112,47 +84,28 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) return_ACPI_STATUS(AE_TYPE); } - /* Create a return object */ + /* Create a return object (Default value = 0) */ return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); if (!return_desc) { return_ACPI_STATUS(AE_NO_MEMORY); } - /* Default return value is SUPPORTED */ - - return_desc->integer.value = ACPI_UINT32_MAX; - walk_state->return_desc = return_desc; - - /* Compare input string to static table of supported interfaces */ + /* Compare input string to table of supported strings */ - for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) { - if (!ACPI_STRCMP - (string_desc->string.pointer, - acpi_interfaces_supported[i])) { + for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { + if (!ACPI_STRCMP(string_desc->string.pointer, + ACPI_CAST_PTR(char, + acpi_gbl_valid_osi_strings[i]))) + { + /* This string is supported */ - /* The interface is supported */ - - return_ACPI_STATUS(AE_CTRL_TERMINATE); + return_desc->integer.value = 0xFFFFFFFF; + break; } } - /* - * Did not match the string in the static table, call the host OSL to - * check for a match with one of the optional strings (such as - * "Module Device", "3.0 Thermal Model", etc.) - */ - status = acpi_os_validate_interface(string_desc->string.pointer); - if (ACPI_SUCCESS(status)) { - - /* The interface is supported */ - - return_ACPI_STATUS(AE_CTRL_TERMINATE); - } - - /* The interface is not supported */ - - return_desc->integer.value = 0; + walk_state->return_desc = return_desc; return_ACPI_STATUS(AE_CTRL_TERMINATE); } @@ -181,26 +134,19 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, u32 expected_return_btypes, union acpi_operand_object **return_desc) { - struct acpi_evaluate_info *info; + struct acpi_parameter_info info; acpi_status status; u32 return_btype; - ACPI_FUNCTION_TRACE(ut_evaluate_object); + ACPI_FUNCTION_TRACE("ut_evaluate_object"); - /* Allocate the evaluation information block */ - - info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info)); - if (!info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - info->prefix_node = prefix_node; - info->pathname = path; - info->parameter_type = ACPI_PARAM_ARGS; + info.node = prefix_node; + info.parameters = NULL; + info.parameter_type = ACPI_PARAM_ARGS; /* Evaluate the object/method */ - status = acpi_ns_evaluate(info); + status = acpi_ns_evaluate_relative(path, &info); if (ACPI_FAILURE(status)) { if (status == AE_NOT_FOUND) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, @@ -212,25 +158,25 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, prefix_node, path, status); } - goto cleanup; + return_ACPI_STATUS(status); } /* Did we get a return object? */ - if (!info->return_object) { + if (!info.return_object) { if (expected_return_btypes) { ACPI_ERROR_METHOD("No object was returned from", prefix_node, path, AE_NOT_EXIST); - status = AE_NOT_EXIST; + return_ACPI_STATUS(AE_NOT_EXIST); } - goto cleanup; + return_ACPI_STATUS(AE_OK); } /* Map the return object type to the bitmapped type */ - switch (ACPI_GET_OBJECT_TYPE(info->return_object)) { + switch (ACPI_GET_OBJECT_TYPE(info.return_object)) { case ACPI_TYPE_INTEGER: return_btype = ACPI_BTYPE_INTEGER; break; @@ -258,8 +204,8 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, * happen frequently if the "implicit return" feature is enabled. * Just delete the return object and return AE_OK. */ - acpi_ut_remove_reference(info->return_object); - goto cleanup; + acpi_ut_remove_reference(info.return_object); + return_ACPI_STATUS(AE_OK); } /* Is the return object one of the expected types? */ @@ -271,23 +217,19 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, ACPI_ERROR((AE_INFO, "Type returned from %s was incorrect: %s, expected Btypes: %X", path, - acpi_ut_get_object_type_name(info->return_object), + acpi_ut_get_object_type_name(info.return_object), expected_return_btypes)); /* On error exit, we must delete the return object */ - acpi_ut_remove_reference(info->return_object); - status = AE_TYPE; - goto cleanup; + acpi_ut_remove_reference(info.return_object); + return_ACPI_STATUS(AE_TYPE); } /* Object type is OK, return it */ - *return_desc = info->return_object; - - cleanup: - ACPI_FREE(info); - return_ACPI_STATUS(status); + *return_desc = info.return_object; + return_ACPI_STATUS(AE_OK); } /******************************************************************************* @@ -315,7 +257,7 @@ acpi_ut_evaluate_numeric_object(char *object_name, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(ut_evaluate_numeric_object); + ACPI_FUNCTION_TRACE("ut_evaluate_numeric_object"); status = acpi_ut_evaluate_object(device_node, object_name, ACPI_BTYPE_INTEGER, &obj_desc); @@ -391,7 +333,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(ut_execute_HID); + ACPI_FUNCTION_TRACE("ut_execute_HID"); status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, @@ -401,7 +343,6 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, } if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { - /* Convert the Numeric HID to string */ acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, @@ -495,7 +436,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, struct acpi_compatible_id_list *cid_list; acpi_native_uint i; - ACPI_FUNCTION_TRACE(ut_execute_CID); + ACPI_FUNCTION_TRACE("ut_execute_CID"); /* Evaluate the _CID method for this device */ @@ -518,7 +459,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, size = (((count - 1) * sizeof(struct acpi_compatible_id)) + sizeof(struct acpi_compatible_id_list)); - cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); + cid_list = ACPI_MEM_CALLOCATE((acpi_size) size); if (!cid_list) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -538,7 +479,6 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, /* The _CID object can be either a single CID or a package (list) of CIDs */ if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { - /* Translate each package element */ for (i = 0; i < count; i++) { @@ -559,7 +499,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, /* Cleanup on error */ if (ACPI_FAILURE(status)) { - ACPI_FREE(cid_list); + ACPI_MEM_FREE(cid_list); } else { *return_cid_list = cid_list; } @@ -593,7 +533,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(ut_execute_UID); + ACPI_FUNCTION_TRACE("ut_execute_UID"); status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, @@ -603,7 +543,6 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, } if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { - /* Convert the Numeric UID to string */ acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, @@ -643,7 +582,7 @@ acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 * flags) union acpi_operand_object *obj_desc; acpi_status status; - ACPI_FUNCTION_TRACE(ut_execute_STA); + ACPI_FUNCTION_TRACE("ut_execute_STA"); status = acpi_ut_evaluate_object(device_node, METHOD_NAME__STA, ACPI_BTYPE_INTEGER, &obj_desc); @@ -693,7 +632,7 @@ acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest) acpi_status status; u32 i; - ACPI_FUNCTION_TRACE(ut_execute_sxds); + ACPI_FUNCTION_TRACE("ut_execute_Sxds"); for (i = 0; i < 4; i++) { highest[i] = 0xFF; diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 014030af8..ffd13383a 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c @@ -43,6 +43,7 @@ #define DEFINE_ACPI_GLOBALS +#include #include #include @@ -118,7 +119,6 @@ const char *acpi_format_exception(acpi_status status) } if (!exception) { - /* Exception code was not recognized */ ACPI_ERROR((AE_INFO, @@ -143,10 +143,12 @@ const char *acpi_format_exception(acpi_status status) /* Debug switch - level and trace mask */ u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; +EXPORT_SYMBOL(acpi_dbg_level); /* Debug switch - layer (component) mask */ u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; +EXPORT_SYMBOL(acpi_dbg_layer); u32 acpi_gbl_nesting_level = 0; /* Debugger globals */ @@ -181,6 +183,28 @@ const char *acpi_gbl_highest_dstate_names[4] = { "_S4D" }; +/* + * Strings supported by the _OSI predefined (internal) method. + * When adding strings, be sure to update ACPI_NUM_OSI_STRINGS. + */ +const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS] = { + /* Operating System Vendor Strings */ + + "Linux", + "Windows 2000", + "Windows 2001", + "Windows 2001.1", + "Windows 2001 SP0", + "Windows 2001 SP1", + "Windows 2001 SP2", + "Windows 2001 SP3", + "Windows 2001 SP4", + + /* Feature Group Strings */ + + "Extended Address Space Descriptor" +}; + /******************************************************************************* * * Namespace globals @@ -293,9 +317,9 @@ char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position) * ******************************************************************************/ -struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; +struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES]; -struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1] = { +struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES] = { /*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */ /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof(RSDP_SIG) - 1, @@ -443,6 +467,7 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = /* Region type decoding */ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { +/*! [Begin] no source code translation (keep these ASL Keywords as-is) */ "SystemMemory", "SystemIO", "PCI_Config", @@ -451,15 +476,16 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { "CMOS", "PCIBARTarget", "DataTable" +/*! [End] no source code translation !*/ }; char *acpi_ut_get_region_name(u8 space_id) { if (space_id >= ACPI_USER_REGION_BEGIN) { - return ("UserDefinedRegion"); + return ("user_defined_region"); } else if (space_id >= ACPI_NUM_PREDEFINED_REGIONS) { - return ("InvalidSpaceId"); + return ("invalid_space_id"); } return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id])); @@ -480,18 +506,20 @@ char *acpi_ut_get_region_name(u8 space_id) /* Event type decoding */ static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = { +/*! [Begin] no source code translation (keep these strings as-is) */ "PM_Timer", "GlobalLock", "PowerButton", "SleepButton", "RealTimeClock", +/*! [End] no source code translation !*/ }; char *acpi_ut_get_event_name(u32 event_id) { if (event_id > ACPI_EVENT_MAX) { - return ("InvalidEventID"); + return ("invalid_event_iD"); } return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id])); @@ -522,6 +550,7 @@ static const char acpi_gbl_bad_type[] = "UNDEFINED"; /* Printable names of the ACPI object types */ static const char *acpi_gbl_ns_type_names[] = { +/*! [Begin] no source code translation (keep these strings as-is) */ /* 00 */ "Untyped", /* 01 */ "Integer", /* 02 */ "String", @@ -553,6 +582,7 @@ static const char *acpi_gbl_ns_type_names[] = { /* 28 */ "Extra", /* 29 */ "Data", /* 30 */ "Invalid" +/*! [End] no source code translation !*/ }; char *acpi_ut_get_type_name(acpi_object_type type) @@ -605,14 +635,14 @@ char *acpi_ut_get_node_name(void *object) /* Descriptor must be a namespace node */ - if (ACPI_GET_DESCRIPTOR_TYPE(node) != ACPI_DESC_TYPE_NAMED) { + if (node->descriptor != ACPI_DESC_TYPE_NAMED) { return ("####"); } /* Name must be a valid ACPI name */ if (!acpi_ut_valid_acpi_name(node->name.integer)) { - node->name.integer = acpi_ut_repair_name(node->name.integer); + return ("????"); } /* Return the name */ @@ -635,6 +665,7 @@ char *acpi_ut_get_node_name(void *object) /* Printable names of object descriptor types */ static const char *acpi_gbl_desc_type_names[] = { +/*! [Begin] no source code translation (keep these ASL Keywords as-is) */ /* 00 */ "Invalid", /* 01 */ "Cached", /* 02 */ "State-Generic", @@ -651,6 +682,7 @@ static const char *acpi_gbl_desc_type_names[] = { /* 13 */ "Parser", /* 14 */ "Operand", /* 15 */ "Node" +/*! [End] no source code translation !*/ }; char *acpi_ut_get_descriptor_name(void *object) @@ -691,7 +723,7 @@ char *acpi_ut_get_descriptor_name(void *object) char *acpi_ut_get_mutex_name(u32 mutex_id) { - if (mutex_id > ACPI_MAX_MUTEX) { + if (mutex_id > MAX_MUTEX) { return ("Invalid Mutex ID"); } @@ -715,7 +747,6 @@ u8 acpi_ut_valid_object_type(acpi_object_type type) { if (type > ACPI_TYPE_LOCAL_MAX) { - /* Note: Assumes all TYPEs are contiguous (external/local) */ return (FALSE); @@ -742,7 +773,7 @@ void acpi_ut_init_globals(void) acpi_status status; u32 i; - ACPI_FUNCTION_TRACE(ut_init_globals); + ACPI_FUNCTION_TRACE("ut_init_globals"); /* Create all memory caches */ @@ -753,14 +784,14 @@ void acpi_ut_init_globals(void) /* ACPI table structure */ - for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) { + for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { acpi_gbl_table_lists[i].next = NULL; acpi_gbl_table_lists[i].count = 0; } /* Mutex locked flags */ - for (i = 0; i < ACPI_NUM_MUTEX; i++) { + for (i = 0; i < NUM_MUTEX; i++) { acpi_gbl_mutex_info[i].mutex = NULL; acpi_gbl_mutex_info[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED; acpi_gbl_mutex_info[i].use_count = 0; @@ -794,7 +825,6 @@ void acpi_ut_init_globals(void) /* Global Lock support */ - acpi_gbl_global_lock_semaphore = NULL; acpi_gbl_global_lock_acquired = FALSE; acpi_gbl_global_lock_thread_count = 0; acpi_gbl_global_lock_handle = 0; @@ -826,7 +856,7 @@ void acpi_ut_init_globals(void) acpi_gbl_root_node = NULL; acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME; - acpi_gbl_root_node_struct.descriptor_type = ACPI_DESC_TYPE_NAMED; + acpi_gbl_root_node_struct.descriptor = ACPI_DESC_TYPE_NAMED; acpi_gbl_root_node_struct.type = ACPI_TYPE_DEVICE; acpi_gbl_root_node_struct.child = NULL; acpi_gbl_root_node_struct.peer = NULL; @@ -839,6 +869,3 @@ void acpi_ut_init_globals(void) return_VOID; } - -ACPI_EXPORT_SYMBOL(acpi_dbg_level) -ACPI_EXPORT_SYMBOL(acpi_dbg_layer) diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index ff76055eb..ba771b4f3 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c @@ -50,7 +50,7 @@ ACPI_MODULE_NAME("utinit") /* Local prototypes */ static void -acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset); +acpi_ut_fadt_register_error(char *register_name, u32 value, acpi_size offset); static void acpi_ut_terminate(void); @@ -69,12 +69,12 @@ static void acpi_ut_terminate(void); ******************************************************************************/ static void -acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset) +acpi_ut_fadt_register_error(char *register_name, u32 value, acpi_size offset) { ACPI_WARNING((AE_INFO, "Invalid FADT value %s=%X at offset %X FADT=%p", - register_name, value, offset, acpi_gbl_FADT)); + register_name, value, (u32) offset, acpi_gbl_FADT)); } /****************************************************************************** @@ -176,7 +176,7 @@ static void acpi_ut_terminate(void) struct acpi_gpe_xrupt_info *gpe_xrupt_info; struct acpi_gpe_xrupt_info *next_gpe_xrupt_info; - ACPI_FUNCTION_TRACE(ut_terminate); + ACPI_FUNCTION_TRACE("ut_terminate"); /* Free global tables, etc. */ /* Free global GPE blocks and related info structures */ @@ -186,14 +186,14 @@ static void acpi_ut_terminate(void) gpe_block = gpe_xrupt_info->gpe_block_list_head; while (gpe_block) { next_gpe_block = gpe_block->next; - ACPI_FREE(gpe_block->event_info); - ACPI_FREE(gpe_block->register_info); - ACPI_FREE(gpe_block); + ACPI_MEM_FREE(gpe_block->event_info); + ACPI_MEM_FREE(gpe_block->register_info); + ACPI_MEM_FREE(gpe_block); gpe_block = next_gpe_block; } next_gpe_xrupt_info = gpe_xrupt_info->next; - ACPI_FREE(gpe_xrupt_info); + ACPI_MEM_FREE(gpe_xrupt_info); gpe_xrupt_info = next_gpe_xrupt_info; } @@ -216,7 +216,7 @@ static void acpi_ut_terminate(void) void acpi_ut_subsystem_shutdown(void) { - ACPI_FUNCTION_TRACE(ut_subsystem_shutdown); + ACPI_FUNCTION_TRACE("ut_subsystem_shutdown"); /* Just exit if subsystem is already shutdown */ @@ -228,7 +228,6 @@ void acpi_ut_subsystem_shutdown(void) /* Subsystem appears active, go ahead and shut it down */ acpi_gbl_shutdown = TRUE; - acpi_gbl_startup_flags = 0; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n")); /* Close the acpi_event Handling */ @@ -246,5 +245,12 @@ void acpi_ut_subsystem_shutdown(void) /* Purge the local caches */ (void)acpi_ut_delete_caches(); + + /* Debug only - display leftover memory allocation, if any */ + +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + acpi_ut_dump_allocations(ACPI_UINT32_MAX, NULL); +#endif + return_VOID; } diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c index 19d74bedc..4a3360484 100644 --- a/drivers/acpi/utilities/utmath.c +++ b/drivers/acpi/utilities/utmath.c @@ -77,7 +77,7 @@ acpi_ut_short_divide(acpi_integer dividend, union uint64_overlay quotient; u32 remainder32; - ACPI_FUNCTION_TRACE(ut_short_divide); + ACPI_FUNCTION_TRACE("ut_short_divide"); /* Always check for a zero divisor */ @@ -139,7 +139,7 @@ acpi_ut_divide(acpi_integer in_dividend, union uint64_overlay partial2; union uint64_overlay partial3; - ACPI_FUNCTION_TRACE(ut_divide); + ACPI_FUNCTION_TRACE("ut_divide"); /* Always check for a zero divisor */ @@ -261,7 +261,7 @@ acpi_ut_short_divide(acpi_integer in_dividend, acpi_integer * out_quotient, u32 * out_remainder) { - ACPI_FUNCTION_TRACE(ut_short_divide); + ACPI_FUNCTION_TRACE("ut_short_divide"); /* Always check for a zero divisor */ @@ -287,7 +287,7 @@ acpi_ut_divide(acpi_integer in_dividend, acpi_integer in_divisor, acpi_integer * out_quotient, acpi_integer * out_remainder) { - ACPI_FUNCTION_TRACE(ut_divide); + ACPI_FUNCTION_TRACE("ut_divide"); /* Always check for a zero divisor */ diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 6d8a8211b..7364f5f8c 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -41,41 +41,12 @@ * POSSIBILITY OF SUCH DAMAGES. */ -#include - #include #include #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utmisc") -/******************************************************************************* - * - * FUNCTION: acpi_ut_is_aml_table - * - * PARAMETERS: Table - An ACPI table - * - * RETURN: TRUE if table contains executable AML; FALSE otherwise - * - * DESCRIPTION: Check ACPI Signature for a table that contains AML code. - * Currently, these are DSDT,SSDT,PSDT. All other table types are - * data tables that do not contain AML code. - * - ******************************************************************************/ -u8 acpi_ut_is_aml_table(struct acpi_table_header *table) -{ - - /* These are the only tables that contain executable AML */ - - if (ACPI_COMPARE_NAME(table->signature, DSDT_SIG) || - ACPI_COMPARE_NAME(table->signature, PSDT_SIG) || - ACPI_COMPARE_NAME(table->signature, SSDT_SIG)) { - return (TRUE); - } - - return (FALSE); -} - /******************************************************************************* * * FUNCTION: acpi_ut_allocate_owner_id @@ -89,7 +60,6 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table) * when the method exits or the table is unloaded. * ******************************************************************************/ - acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) { acpi_native_uint i; @@ -97,7 +67,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) acpi_native_uint k; acpi_status status; - ACPI_FUNCTION_TRACE(ut_allocate_owner_id); + ACPI_FUNCTION_TRACE("ut_allocate_owner_id"); /* Guard against multiple allocations of ID to the same location */ @@ -127,7 +97,6 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) for (k = acpi_gbl_next_owner_id_offset; k < 32; k++) { if (acpi_gbl_owner_id_mask[j] == ACPI_UINT32_MAX) { - /* There are no free IDs in this mask */ break; @@ -154,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) (acpi_owner_id) ((k + 1) + ACPI_MUL_32(j)); ACPI_DEBUG_PRINT((ACPI_DB_VALUES, - "Allocated OwnerId: %2.2X\n", + "Allocated owner_id: %2.2X\n", (unsigned int)*owner_id)); goto exit; } @@ -175,7 +144,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) */ status = AE_OWNER_ID_LIMIT; ACPI_ERROR((AE_INFO, - "Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT")); + "Could not allocate new owner_id (255 max), AE_OWNER_ID_LIMIT")); exit: (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); @@ -203,7 +172,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) acpi_native_uint index; u32 bit; - ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id); + ACPI_FUNCTION_TRACE_U32("ut_release_owner_id", owner_id); /* Always clear the input owner_id (zero is an invalid ID) */ @@ -212,7 +181,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) /* Zero is not a valid owner_iD */ if (owner_id == 0) { - ACPI_ERROR((AE_INFO, "Invalid OwnerId: %2.2X", owner_id)); + ACPI_ERROR((AE_INFO, "Invalid owner_id: %2.2X", owner_id)); return_VOID; } @@ -238,7 +207,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) acpi_gbl_owner_id_mask[index] ^= bit; } else { ACPI_ERROR((AE_INFO, - "Release of non-allocated OwnerId: %2.2X", + "Release of non-allocated owner_id: %2.2X", owner_id + 1)); } @@ -304,7 +273,6 @@ void acpi_ut_print_string(char *string, u8 max_length) acpi_os_printf("\""); for (i = 0; string[i] && (i < max_length); i++) { - /* Escape sequences */ switch (string[i]) { @@ -419,15 +387,10 @@ void acpi_ut_set_integer_width(u8 revision) { if (revision <= 1) { - - /* 32-bit case */ - acpi_gbl_integer_bit_width = 32; acpi_gbl_integer_nybble_width = 8; acpi_gbl_integer_byte_width = 4; } else { - /* 64-bit case (ACPI 2.0+) */ - acpi_gbl_integer_bit_width = 64; acpi_gbl_integer_nybble_width = 16; acpi_gbl_integer_byte_width = 8; @@ -498,46 +461,10 @@ acpi_ut_display_init_pathname(u8 type, } acpi_os_printf("\n"); - ACPI_FREE(buffer.pointer); + ACPI_MEM_FREE(buffer.pointer); } #endif -/******************************************************************************* - * - * FUNCTION: acpi_ut_valid_acpi_char - * - * PARAMETERS: Char - The character to be examined - * Position - Byte position (0-3) - * - * RETURN: TRUE if the character is valid, FALSE otherwise - * - * DESCRIPTION: Check for a valid ACPI character. Must be one of: - * 1) Upper case alpha - * 2) numeric - * 3) underscore - * - * We allow a '!' as the last character because of the ASF! table - * - ******************************************************************************/ - -u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position) -{ - - if (!((character >= 'A' && character <= 'Z') || - (character >= '0' && character <= '9') || (character == '_'))) { - - /* Allow a '!' in the last position */ - - if (character == '!' && position == 3) { - return (TRUE); - } - - return (FALSE); - } - - return (TRUE); -} - /******************************************************************************* * * FUNCTION: acpi_ut_valid_acpi_name @@ -555,13 +482,19 @@ u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position) u8 acpi_ut_valid_acpi_name(u32 name) { + char *name_ptr = (char *)&name; + char character; acpi_native_uint i; ACPI_FUNCTION_ENTRY(); for (i = 0; i < ACPI_NAME_SIZE; i++) { - if (!acpi_ut_valid_acpi_char - ((ACPI_CAST_PTR(char, &name))[i], i)) { + character = *name_ptr; + name_ptr++; + + if (!((character == '_') || + (character >= 'A' && character <= 'Z') || + (character >= '0' && character <= '9'))) { return (FALSE); } } @@ -571,37 +504,24 @@ u8 acpi_ut_valid_acpi_name(u32 name) /******************************************************************************* * - * FUNCTION: acpi_ut_repair_name + * FUNCTION: acpi_ut_valid_acpi_character * - * PARAMETERS: Name - The ACPI name to be repaired + * PARAMETERS: Character - The character to be examined * - * RETURN: Repaired version of the name + * RETURN: 1 if Character may appear in a name, else 0 * - * DESCRIPTION: Repair an ACPI name: Change invalid characters to '*' and - * return the new name. + * DESCRIPTION: Check for a printable character * ******************************************************************************/ -acpi_name acpi_ut_repair_name(acpi_name name) +u8 acpi_ut_valid_acpi_character(char character) { - char *name_ptr = ACPI_CAST_PTR(char, &name); - char new_name[ACPI_NAME_SIZE]; - acpi_native_uint i; - for (i = 0; i < ACPI_NAME_SIZE; i++) { - new_name[i] = name_ptr[i]; - - /* - * Replace a bad character with something printable, yet technically - * still invalid. This prevents any collisions with existing "good" - * names in the namespace. - */ - if (!acpi_ut_valid_acpi_char(name_ptr[i], i)) { - new_name[i] = '*'; - } - } + ACPI_FUNCTION_ENTRY(); - return (*ACPI_CAST_PTR(u32, new_name)); + return ((u8) ((character == '_') || + (character >= 'A' && character <= 'Z') || + (character >= '0' && character <= '9'))); } /******************************************************************************* @@ -609,15 +529,12 @@ acpi_name acpi_ut_repair_name(acpi_name name) * FUNCTION: acpi_ut_strtoul64 * * PARAMETERS: String - Null terminated string - * Base - Radix of the string: 16 or ACPI_ANY_BASE; - * ACPI_ANY_BASE means 'in behalf of to_integer' + * Base - Radix of the string: 10, 16, or ACPI_ANY_BASE * ret_integer - Where the converted integer is returned * * RETURN: Status and Converted value * - * DESCRIPTION: Convert a string into an unsigned value. Performs either a - * 32-bit or 64-bit conversion, depending on the current mode - * of the interpreter. + * DESCRIPTION: Convert a string into an unsigned value. * NOTE: Does not support Octal strings, not needed. * ******************************************************************************/ @@ -628,17 +545,16 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer) u32 this_digit = 0; acpi_integer return_value = 0; acpi_integer quotient; - acpi_integer dividend; - u32 to_integer_op = (base == ACPI_ANY_BASE); - u32 mode32 = (acpi_gbl_integer_byte_width == 4); - u8 valid_digits = 0; - u8 sign_of0x = 0; - u8 term = 0; - ACPI_FUNCTION_TRACE_STR(ut_stroul64, string); + ACPI_FUNCTION_TRACE("ut_stroul64"); + + if ((!string) || !(*string)) { + goto error_exit; + } switch (base) { case ACPI_ANY_BASE: + case 10: case 16: break; @@ -647,112 +563,76 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer) return_ACPI_STATUS(AE_BAD_PARAMETER); } - if (!string) { - goto error_exit; - } - /* Skip over any white space in the buffer */ - while ((*string) && (ACPI_IS_SPACE(*string) || *string == '\t')) { + while (ACPI_IS_SPACE(*string) || *string == '\t') { string++; } - if (to_integer_op) { - /* - * Base equal to ACPI_ANY_BASE means 'to_integer operation case'. - * We need to determine if it is decimal or hexadecimal. - */ + /* + * If the input parameter Base is zero, then we need to + * determine if it is decimal or hexadecimal: + */ + if (base == 0) { if ((*string == '0') && (ACPI_TOLOWER(*(string + 1)) == 'x')) { - sign_of0x = 1; base = 16; - - /* Skip over the leading '0x' */ string += 2; } else { base = 10; } } - /* Any string left? Check that '0x' is not followed by white space. */ - - if (!(*string) || ACPI_IS_SPACE(*string) || *string == '\t') { - if (to_integer_op) { - goto error_exit; - } else { - goto all_done; - } - } - /* - * Perform a 32-bit or 64-bit conversion, depending upon the current - * execution mode of the interpreter + * For hexadecimal base, skip over the leading + * 0 or 0x, if they are present. */ - dividend = (mode32) ? ACPI_UINT32_MAX : ACPI_UINT64_MAX; + if ((base == 16) && + (*string == '0') && (ACPI_TOLOWER(*(string + 1)) == 'x')) { + string += 2; + } - /* Main loop: convert the string to a 32- or 64-bit integer */ + /* Any string left? */ + + if (!(*string)) { + goto error_exit; + } + + /* Main loop: convert the string to a 64-bit integer */ while (*string) { if (ACPI_IS_DIGIT(*string)) { - /* Convert ASCII 0-9 to Decimal value */ this_digit = ((u8) * string) - '0'; - } else if (base == 10) { + } else { + if (base == 10) { + /* Digit is out of range */ - /* Digit is out of range; possible in to_integer case only */ + goto error_exit; + } - term = 1; - } else { this_digit = (u8) ACPI_TOUPPER(*string); if (ACPI_IS_XDIGIT((char)this_digit)) { - /* Convert ASCII Hex char to value */ this_digit = this_digit - 'A' + 10; } else { - term = 1; - } - } - - if (term) { - if (to_integer_op) { - goto error_exit; - } else { + /* + * We allow non-hex chars, just stop now, same as end-of-string. + * See ACPI spec, string-to-integer conversion. + */ break; } - } else if ((valid_digits == 0) && (this_digit == 0) - && !sign_of0x) { - - /* Skip zeros */ - string++; - continue; - } - - valid_digits++; - - if (sign_of0x - && ((valid_digits > 16) - || ((valid_digits > 8) && mode32))) { - /* - * This is to_integer operation case. - * No any restrictions for string-to-integer conversion, - * see ACPI spec. - */ - goto error_exit; } /* Divide the digit into the correct position */ (void) - acpi_ut_short_divide((dividend - (acpi_integer) this_digit), - base, "ient, NULL); - + acpi_ut_short_divide((ACPI_INTEGER_MAX - + (acpi_integer) this_digit), base, + "ient, NULL); if (return_value > quotient) { - if (to_integer_op) { - goto error_exit; - } else { - break; - } + goto error_exit; } return_value *= base; @@ -762,11 +642,6 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer) /* All done, normal exit */ - all_done: - - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Converted value: %8.8X%8.8X\n", - ACPI_FORMAT_UINT64(return_value))); - *ret_integer = return_value; return_ACPI_STATUS(AE_OK); @@ -844,7 +719,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, u32 this_index; union acpi_operand_object *this_source_obj; - ACPI_FUNCTION_TRACE(ut_walk_package_tree); + ACPI_FUNCTION_TRACE("ut_walk_package_tree"); state = acpi_ut_create_pkg_state(source_object, target_object, 0); if (!state) { @@ -852,7 +727,6 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, } while (state) { - /* Get one element of the package */ this_index = state->pkg.index; @@ -938,6 +812,31 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, return_ACPI_STATUS(AE_AML_INTERNAL); } +/******************************************************************************* + * + * FUNCTION: acpi_ut_generate_checksum + * + * PARAMETERS: Buffer - Buffer to be scanned + * Length - number of bytes to examine + * + * RETURN: The generated checksum + * + * DESCRIPTION: Generate a checksum on a raw buffer + * + ******************************************************************************/ + +u8 acpi_ut_generate_checksum(u8 * buffer, u32 length) +{ + u32 i; + signed char sum = 0; + + for (i = 0; i < length; i++) { + sum = (signed char)(sum + buffer[i]); + } + + return ((u8) (0 - sum)); +} + /******************************************************************************* * * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info @@ -977,7 +876,6 @@ acpi_ut_exception(char *module_name, acpi_os_vprintf(format, args); acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); } -EXPORT_SYMBOL(acpi_ut_exception); void ACPI_INTERNAL_VAR_XFACE acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) @@ -1002,3 +900,36 @@ acpi_ut_info(char *module_name, u32 line_number, char *format, ...) acpi_os_vprintf(format, args); acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); } + +/******************************************************************************* + * + * FUNCTION: acpi_ut_report_error, Warning, Info + * + * PARAMETERS: module_name - Caller's module name (for error output) + * line_number - Caller's line number (for error output) + * + * RETURN: None + * + * DESCRIPTION: Print error message + * + * Note: Legacy only, should be removed when no longer used by drivers. + * + ******************************************************************************/ + +void acpi_ut_report_error(char *module_name, u32 line_number) +{ + + acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number); +} + +void acpi_ut_report_warning(char *module_name, u32 line_number) +{ + + acpi_os_printf("ACPI Warning (%s-%04d): ", module_name, line_number); +} + +void acpi_ut_report_info(char *module_name, u32 line_number) +{ + + acpi_os_printf("ACPI (%s-%04d): ", module_name, line_number); +} diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c index c39062a04..45a7244df 100644 --- a/drivers/acpi/utilities/utmutex.c +++ b/drivers/acpi/utilities/utmutex.c @@ -68,23 +68,19 @@ acpi_status acpi_ut_mutex_initialize(void) u32 i; acpi_status status; - ACPI_FUNCTION_TRACE(ut_mutex_initialize); + ACPI_FUNCTION_TRACE("ut_mutex_initialize"); /* * Create each of the predefined mutex objects */ - for (i = 0; i < ACPI_NUM_MUTEX; i++) { + for (i = 0; i < NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } - /* Create the spinlocks for use at interrupt level */ - - spin_lock_init(acpi_gbl_gpe_lock); - spin_lock_init(acpi_gbl_hardware_lock); - + status = acpi_os_create_lock(&acpi_gbl_gpe_lock); return_ACPI_STATUS(status); } @@ -104,19 +100,16 @@ void acpi_ut_mutex_terminate(void) { u32 i; - ACPI_FUNCTION_TRACE(ut_mutex_terminate); + ACPI_FUNCTION_TRACE("ut_mutex_terminate"); /* * Delete each predefined mutex object */ - for (i = 0; i < ACPI_NUM_MUTEX; i++) { + for (i = 0; i < NUM_MUTEX; i++) { (void)acpi_ut_delete_mutex(i); } - /* Delete the spinlocks */ - acpi_os_delete_lock(acpi_gbl_gpe_lock); - acpi_os_delete_lock(acpi_gbl_hardware_lock); return_VOID; } @@ -136,15 +129,16 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id); + ACPI_FUNCTION_TRACE_U32("ut_create_mutex", mutex_id); - if (mutex_id > ACPI_MAX_MUTEX) { + if (mutex_id > MAX_MUTEX) { return_ACPI_STATUS(AE_BAD_PARAMETER); } if (!acpi_gbl_mutex_info[mutex_id].mutex) { - status = - acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex); + status = acpi_os_create_semaphore(1, 1, + &acpi_gbl_mutex_info + [mutex_id].mutex); acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; acpi_gbl_mutex_info[mutex_id].use_count = 0; @@ -167,19 +161,20 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id) static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) { + acpi_status status; - ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id); + ACPI_FUNCTION_TRACE_U32("ut_delete_mutex", mutex_id); - if (mutex_id > ACPI_MAX_MUTEX) { + if (mutex_id > MAX_MUTEX) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex); + status = acpi_os_delete_semaphore(acpi_gbl_mutex_info[mutex_id].mutex); acpi_gbl_mutex_info[mutex_id].mutex = NULL; acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; - return_ACPI_STATUS(AE_OK); + return_ACPI_STATUS(status); } /******************************************************************************* @@ -197,11 +192,11 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) { acpi_status status; - acpi_thread_id this_thread_id; + u32 this_thread_id; - ACPI_FUNCTION_NAME(ut_acquire_mutex); + ACPI_FUNCTION_NAME("ut_acquire_mutex"); - if (mutex_id > ACPI_MAX_MUTEX) { + if (mutex_id > MAX_MUTEX) { return (AE_BAD_PARAMETER); } @@ -218,7 +213,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) * the mutex ordering rule. This indicates a coding error somewhere in * the ACPI subsystem code. */ - for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) { + for (i = mutex_id; i < MAX_MUTEX; i++) { if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { if (i == mutex_id) { ACPI_ERROR((AE_INFO, @@ -244,14 +239,14 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Thread %X attempting to acquire Mutex [%s]\n", - (u32) this_thread_id, acpi_ut_get_mutex_name(mutex_id))); + this_thread_id, acpi_ut_get_mutex_name(mutex_id))); - status = acpi_os_acquire_mutex(acpi_gbl_mutex_info[mutex_id].mutex, - ACPI_WAIT_FOREVER); + status = acpi_os_wait_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, + 1, ACPI_WAIT_FOREVER); if (ACPI_SUCCESS(status)) { ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Thread %X acquired Mutex [%s]\n", - (u32) this_thread_id, + this_thread_id, acpi_ut_get_mutex_name(mutex_id))); acpi_gbl_mutex_info[mutex_id].use_count++; @@ -259,7 +254,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) } else { ACPI_EXCEPTION((AE_INFO, status, "Thread %X could not acquire Mutex [%X]", - (u32) this_thread_id, mutex_id)); + this_thread_id, mutex_id)); } return (status); @@ -279,16 +274,17 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) { - acpi_thread_id this_thread_id; + acpi_status status; + u32 this_thread_id; - ACPI_FUNCTION_NAME(ut_release_mutex); + ACPI_FUNCTION_NAME("ut_release_mutex"); this_thread_id = acpi_os_get_thread_id(); ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, - "Thread %X releasing Mutex [%s]\n", (u32) this_thread_id, + "Thread %X releasing Mutex [%s]\n", this_thread_id, acpi_ut_get_mutex_name(mutex_id))); - if (mutex_id > ACPI_MAX_MUTEX) { + if (mutex_id > MAX_MUTEX) { return (AE_BAD_PARAMETER); } @@ -313,7 +309,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) * ordering rule. This indicates a coding error somewhere in * the ACPI subsystem code. */ - for (i = mutex_id; i < ACPI_MAX_MUTEX; i++) { + for (i = mutex_id; i < MAX_MUTEX; i++) { if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { if (i == mutex_id) { continue; @@ -334,6 +330,19 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; - acpi_os_release_mutex(acpi_gbl_mutex_info[mutex_id].mutex); - return (AE_OK); + status = + acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); + + if (ACPI_FAILURE(status)) { + ACPI_EXCEPTION((AE_INFO, status, + "Thread %X could not release Mutex [%X]", + this_thread_id, mutex_id)); + } else { + ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, + "Thread %X released Mutex [%s]\n", + this_thread_id, + acpi_ut_get_mutex_name(mutex_id))); + } + + return (status); } diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index ba7d8ac70..7ee2d1d98 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c @@ -92,7 +92,7 @@ union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, union acpi_operand_object *object; union acpi_operand_object *second_object; - ACPI_FUNCTION_TRACE_STR(ut_create_internal_object_dbg, + ACPI_FUNCTION_TRACE_STR("ut_create_internal_object_dbg", acpi_ut_get_type_name(type)); /* Allocate the raw object descriptor */ @@ -161,7 +161,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) union acpi_operand_object *buffer_desc; u8 *buffer = NULL; - ACPI_FUNCTION_TRACE_U32(ut_create_buffer_object, buffer_size); + ACPI_FUNCTION_TRACE_U32("ut_create_buffer_object", buffer_size); /* Create a new Buffer object */ @@ -173,10 +173,9 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) /* Create an actual buffer only if size > 0 */ if (buffer_size > 0) { - /* Allocate the actual buffer */ - buffer = ACPI_ALLOCATE_ZEROED(buffer_size); + buffer = ACPI_MEM_CALLOCATE(buffer_size); if (!buffer) { ACPI_ERROR((AE_INFO, "Could not allocate size %X", (u32) buffer_size)); @@ -215,7 +214,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) union acpi_operand_object *string_desc; char *string; - ACPI_FUNCTION_TRACE_U32(ut_create_string_object, string_size); + ACPI_FUNCTION_TRACE_U32("ut_create_string_object", string_size); /* Create a new String object */ @@ -228,7 +227,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) * Allocate the actual string buffer -- (Size + 1) for NULL terminator. * NOTE: Zero-length strings are NULL terminated */ - string = ACPI_ALLOCATE_ZEROED(string_size + 1); + string = ACPI_MEM_CALLOCATE(string_size + 1); if (!string) { ACPI_ERROR((AE_INFO, "Could not allocate size %X", (u32) string_size)); @@ -261,7 +260,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) u8 acpi_ut_valid_internal_object(void *object) { - ACPI_FUNCTION_NAME(ut_valid_internal_object); + ACPI_FUNCTION_NAME("ut_valid_internal_object"); /* Check for a null pointer */ @@ -309,7 +308,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, { union acpi_operand_object *object; - ACPI_FUNCTION_TRACE(ut_allocate_object_desc_dbg); + ACPI_FUNCTION_TRACE("ut_allocate_object_desc_dbg"); object = acpi_os_acquire_object(acpi_gbl_operand_cache); if (!object) { @@ -320,7 +319,6 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, } /* Mark the descriptor type */ - memset(object, 0, sizeof(union acpi_operand_object)); ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); @@ -344,7 +342,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, void acpi_ut_delete_object_desc(union acpi_operand_object *object) { - ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); + ACPI_FUNCTION_TRACE_PTR("ut_delete_object_desc", object); /* Object must be an union acpi_operand_object */ @@ -383,7 +381,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, acpi_size length; acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_PTR(ut_get_simple_object_size, internal_object); + ACPI_FUNCTION_TRACE_PTR("ut_get_simple_object_size", internal_object); /* * Handle a null object (Could be a uninitialized package @@ -399,7 +397,6 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, length = sizeof(union acpi_object); if (ACPI_GET_DESCRIPTOR_TYPE(internal_object) == ACPI_DESC_TYPE_NAMED) { - /* Object is a named object (reference), just return the length */ *obj_length = ACPI_ROUND_UP_TO_NATIVE_WORD(length); @@ -562,7 +559,7 @@ acpi_ut_get_package_object_size(union acpi_operand_object *internal_object, acpi_status status; struct acpi_pkg_info info; - ACPI_FUNCTION_TRACE_PTR(ut_get_package_object_size, internal_object); + ACPI_FUNCTION_TRACE_PTR("ut_get_package_object_size", internal_object); info.length = 0; info.object_space = 0; diff --git a/drivers/acpi/utilities/utresrc.c b/drivers/acpi/utilities/utresrc.c index 5a2de9283..164613171 100644 --- a/drivers/acpi/utilities/utresrc.c +++ b/drivers/acpi/utilities/utresrc.c @@ -45,113 +45,113 @@ #include #define _COMPONENT ACPI_UTILITIES -ACPI_MODULE_NAME("utresrc") +ACPI_MODULE_NAME("utmisc") #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) /* * Strings used to decode resource descriptors. * Used by both the disasssembler and the debugger resource dump routines */ -const char *acpi_gbl_bm_decode[] = { - "NotBusMaster", - "BusMaster" +const char *acpi_gbl_BMdecode[2] = { + "not_bus_master", + "bus_master" }; -const char *acpi_gbl_config_decode[] = { +const char *acpi_gbl_config_decode[4] = { "0 - Good Configuration", "1 - Acceptable Configuration", "2 - Suboptimal Configuration", "3 - ***Invalid Configuration***", }; -const char *acpi_gbl_consume_decode[] = { - "ResourceProducer", - "ResourceConsumer" +const char *acpi_gbl_consume_decode[2] = { + "resource_producer", + "resource_consumer" }; -const char *acpi_gbl_dec_decode[] = { - "PosDecode", - "SubDecode" +const char *acpi_gbl_DECdecode[2] = { + "pos_decode", + "sub_decode" }; -const char *acpi_gbl_he_decode[] = { +const char *acpi_gbl_HEdecode[2] = { "Level", "Edge" }; -const char *acpi_gbl_io_decode[] = { +const char *acpi_gbl_io_decode[2] = { "Decode10", "Decode16" }; -const char *acpi_gbl_ll_decode[] = { - "ActiveHigh", - "ActiveLow" +const char *acpi_gbl_LLdecode[2] = { + "active_high", + "active_low" }; -const char *acpi_gbl_max_decode[] = { - "MaxNotFixed", - "MaxFixed" +const char *acpi_gbl_max_decode[2] = { + "max_not_fixed", + "max_fixed" }; -const char *acpi_gbl_mem_decode[] = { - "NonCacheable", +const char *acpi_gbl_MEMdecode[4] = { + "non_cacheable", "Cacheable", - "WriteCombining", + "write_combining", "Prefetchable" }; -const char *acpi_gbl_min_decode[] = { - "MinNotFixed", - "MinFixed" +const char *acpi_gbl_min_decode[2] = { + "min_not_fixed", + "min_fixed" }; -const char *acpi_gbl_mtp_decode[] = { - "AddressRangeMemory", - "AddressRangeReserved", - "AddressRangeACPI", - "AddressRangeNVS" +const char *acpi_gbl_MTPdecode[4] = { + "address_range_memory", + "address_range_reserved", + "address_range_aCPI", + "address_range_nVS" }; -const char *acpi_gbl_rng_decode[] = { - "InvalidRanges", - "NonISAOnlyRanges", - "ISAOnlyRanges", - "EntireRange" +const char *acpi_gbl_RNGdecode[4] = { + "invalid_ranges", + "non_iSAonly_ranges", + "ISAonly_ranges", + "entire_range" }; -const char *acpi_gbl_rw_decode[] = { - "ReadOnly", - "ReadWrite" +const char *acpi_gbl_RWdecode[2] = { + "read_only", + "read_write" }; -const char *acpi_gbl_shr_decode[] = { +const char *acpi_gbl_SHRdecode[2] = { "Exclusive", "Shared" }; -const char *acpi_gbl_siz_decode[] = { +const char *acpi_gbl_SIZdecode[4] = { "Transfer8", "Transfer8_16", "Transfer16", - "InvalidSize" + "invalid_size" }; -const char *acpi_gbl_trs_decode[] = { - "DenseTranslation", - "SparseTranslation" +const char *acpi_gbl_TRSdecode[2] = { + "dense_translation", + "sparse_translation" }; -const char *acpi_gbl_ttp_decode[] = { - "TypeStatic", - "TypeTranslation" +const char *acpi_gbl_TTPdecode[2] = { + "type_static", + "type_translation" }; -const char *acpi_gbl_typ_decode[] = { +const char *acpi_gbl_TYPdecode[4] = { "Compatibility", - "TypeA", - "TypeB", - "TypeF" + "type_a", + "type_b", + "type_f" }; #endif @@ -238,104 +238,6 @@ static const u8 acpi_gbl_resource_types[] = { ACPI_FIXED_LENGTH }; -/******************************************************************************* - * - * FUNCTION: acpi_ut_walk_aml_resources - * - * PARAMETERS: Aml - Pointer to the raw AML resource template - * aml_length - Length of the entire template - * user_function - Called once for each descriptor found. If - * NULL, a pointer to the end_tag is returned - * Context - Passed to user_function - * - * RETURN: Status - * - * DESCRIPTION: Walk a raw AML resource list(buffer). User function called - * once for each resource found. - * - ******************************************************************************/ - -acpi_status -acpi_ut_walk_aml_resources(u8 * aml, - acpi_size aml_length, - acpi_walk_aml_callback user_function, void **context) -{ - acpi_status status; - u8 *end_aml; - u8 resource_index; - u32 length; - u32 offset = 0; - - ACPI_FUNCTION_TRACE(ut_walk_aml_resources); - - /* The absolute minimum resource template is one end_tag descriptor */ - - if (aml_length < sizeof(struct aml_resource_end_tag)) { - return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); - } - - /* Point to the end of the resource template buffer */ - - end_aml = aml + aml_length; - - /* Walk the byte list, abort on any invalid descriptor type or length */ - - while (aml < end_aml) { - - /* Validate the Resource Type and Resource Length */ - - status = acpi_ut_validate_resource(aml, &resource_index); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Get the length of this descriptor */ - - length = acpi_ut_get_descriptor_length(aml); - - /* Invoke the user function */ - - if (user_function) { - status = - user_function(aml, length, offset, resource_index, - context); - if (ACPI_FAILURE(status)) { - return (status); - } - } - - /* An end_tag descriptor terminates this resource template */ - - if (acpi_ut_get_resource_type(aml) == - ACPI_RESOURCE_NAME_END_TAG) { - /* - * There must be at least one more byte in the buffer for - * the 2nd byte of the end_tag - */ - if ((aml + 1) >= end_aml) { - return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); - } - - /* Return the pointer to the end_tag if requested */ - - if (!user_function) { - *context = aml; - } - - /* Normal exit */ - - return_ACPI_STATUS(AE_OK); - } - - aml += length; - offset += length; - } - - /* Did not find an end_tag descriptor */ - - return (AE_AML_NO_RESOURCE_END_TAG); -} - /******************************************************************************* * * FUNCTION: acpi_ut_validate_resource @@ -371,7 +273,6 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) * Examine the large/small bit in the resource header */ if (resource_type & ACPI_RESOURCE_NAME_LARGE) { - /* Verify the large resource type (name) against the max */ if (resource_type > ACPI_RESOURCE_NAME_LARGE_MAX) { @@ -475,7 +376,6 @@ u8 acpi_ut_get_resource_type(void *aml) * Examine the large/small bit in the resource header */ if (ACPI_GET8(aml) & ACPI_RESOURCE_NAME_LARGE) { - /* Large Resource Type -- bits 6:0 contain the name */ return (ACPI_GET8(aml)); @@ -511,7 +411,6 @@ u16 acpi_ut_get_resource_length(void *aml) * Examine the large/small bit in the resource header */ if (ACPI_GET8(aml) & ACPI_RESOURCE_NAME_LARGE) { - /* Large Resource type -- bytes 1-2 contain the 16-bit length */ ACPI_MOVE_16_TO_16(&resource_length, ACPI_ADD_PTR(u8, aml, 1)); @@ -596,21 +495,60 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc, u8 ** end_tag) { acpi_status status; + u8 *aml; + u8 *end_aml; + + ACPI_FUNCTION_TRACE("ut_get_resource_end_tag"); - ACPI_FUNCTION_TRACE(ut_get_resource_end_tag); + /* Get start and end pointers */ + + aml = obj_desc->buffer.pointer; + end_aml = aml + obj_desc->buffer.length; /* Allow a buffer length of zero */ if (!obj_desc->buffer.length) { - *end_tag = obj_desc->buffer.pointer; + *end_tag = aml; return_ACPI_STATUS(AE_OK); } - /* Validate the template and get a pointer to the end_tag */ + /* Walk the resource template, one descriptor per iteration */ + + while (aml < end_aml) { + /* Validate the Resource Type and Resource Length */ + + status = acpi_ut_validate_resource(aml, NULL); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* end_tag resource indicates the end of the resource template */ + + if (acpi_ut_get_resource_type(aml) == + ACPI_RESOURCE_NAME_END_TAG) { + /* + * There must be at least one more byte in the buffer for + * the 2nd byte of the end_tag + */ + if ((aml + 1) >= end_aml) { + return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); + } + + /* Return the pointer to the end_tag */ + + *end_tag = aml; + return_ACPI_STATUS(AE_OK); + } + + /* + * Point to the next resource descriptor in the AML buffer. The + * descriptor length is guaranteed to be non-zero by resource + * validation above. + */ + aml += acpi_ut_get_descriptor_length(aml); + } - status = acpi_ut_walk_aml_resources(obj_desc->buffer.pointer, - obj_desc->buffer.length, NULL, - (void **)end_tag); + /* Did not find an end_tag resource descriptor */ - return_ACPI_STATUS(status); + return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); } diff --git a/drivers/acpi/utilities/utstate.c b/drivers/acpi/utilities/utstate.c index eaa13d05c..4b134a722 100644 --- a/drivers/acpi/utilities/utstate.c +++ b/drivers/acpi/utilities/utstate.c @@ -96,7 +96,7 @@ void acpi_ut_push_generic_state(union acpi_generic_state **list_head, union acpi_generic_state *state) { - ACPI_FUNCTION_TRACE(ut_push_generic_state); + ACPI_FUNCTION_TRACE("ut_push_generic_state"); /* Push the state object onto the front of the list (stack) */ @@ -123,13 +123,12 @@ union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE(ut_pop_generic_state); + ACPI_FUNCTION_TRACE("ut_pop_generic_state"); /* Remove the state object at the head of the list (stack) */ state = *list_head; if (state) { - /* Update the list head */ *list_head = state->common.next; @@ -159,10 +158,9 @@ union acpi_generic_state *acpi_ut_create_generic_state(void) state = acpi_os_acquire_object(acpi_gbl_state_cache); if (state) { - /* Initialize */ memset(state, 0, sizeof(union acpi_generic_state)); - state->common.descriptor_type = ACPI_DESC_TYPE_STATE; + state->common.data_type = ACPI_DESC_TYPE_STATE; } return (state); @@ -185,7 +183,7 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void) { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE(ut_create_thread_state); + ACPI_FUNCTION_TRACE("ut_create_thread_state"); /* Create the generic state object */ @@ -196,16 +194,9 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void) /* Init fields specific to the update struct */ - state->common.descriptor_type = ACPI_DESC_TYPE_STATE_THREAD; + state->common.data_type = ACPI_DESC_TYPE_STATE_THREAD; state->thread.thread_id = acpi_os_get_thread_id(); - /* Check for invalid thread ID - zero is very bad, it will break things */ - - if (!state->thread.thread_id) { - ACPI_ERROR((AE_INFO, "Invalid zero ID from AcpiOsGetThreadId")); - state->thread.thread_id = (acpi_thread_id) 1; - } - return_PTR((struct acpi_thread_state *)state); } @@ -229,7 +220,7 @@ union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE_PTR(ut_create_update_state, object); + ACPI_FUNCTION_TRACE_PTR("ut_create_update_state", object); /* Create the generic state object */ @@ -240,7 +231,7 @@ union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object /* Init fields specific to the update struct */ - state->common.descriptor_type = ACPI_DESC_TYPE_STATE_UPDATE; + state->common.data_type = ACPI_DESC_TYPE_STATE_UPDATE; state->update.object = object; state->update.value = action; @@ -266,7 +257,7 @@ union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object, { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE_PTR(ut_create_pkg_state, internal_object); + ACPI_FUNCTION_TRACE_PTR("ut_create_pkg_state", internal_object); /* Create the generic state object */ @@ -277,7 +268,7 @@ union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object, /* Init fields specific to the update struct */ - state->common.descriptor_type = ACPI_DESC_TYPE_STATE_PACKAGE; + state->common.data_type = ACPI_DESC_TYPE_STATE_PACKAGE; state->pkg.source_object = (union acpi_operand_object *)internal_object; state->pkg.dest_object = external_object; state->pkg.index = index; @@ -303,7 +294,7 @@ union acpi_generic_state *acpi_ut_create_control_state(void) { union acpi_generic_state *state; - ACPI_FUNCTION_TRACE(ut_create_control_state); + ACPI_FUNCTION_TRACE("ut_create_control_state"); /* Create the generic state object */ @@ -314,7 +305,7 @@ union acpi_generic_state *acpi_ut_create_control_state(void) /* Init fields specific to the control struct */ - state->common.descriptor_type = ACPI_DESC_TYPE_STATE_CONTROL; + state->common.data_type = ACPI_DESC_TYPE_STATE_CONTROL; state->common.state = ACPI_CONTROL_CONDITIONAL_EXECUTING; return_PTR(state); @@ -328,19 +319,15 @@ union acpi_generic_state *acpi_ut_create_control_state(void) * * RETURN: None * - * DESCRIPTION: Release a state object to the state cache. NULL state objects - * are ignored. + * DESCRIPTION: Put a state object back into the global state cache. The object + * is not actually freed at this time. * ******************************************************************************/ void acpi_ut_delete_generic_state(union acpi_generic_state *state) { - ACPI_FUNCTION_TRACE(ut_delete_generic_state); - - /* Ignore null state */ + ACPI_FUNCTION_TRACE("ut_delete_generic_state"); - if (state) { - (void)acpi_os_release_object(acpi_gbl_state_cache, state); - } + (void)acpi_os_release_object(acpi_gbl_state_cache, state); return_VOID; } diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index 3538f69c8..308a96087 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#include + #include #include #include @@ -65,7 +67,7 @@ acpi_status acpi_initialize_subsystem(void) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_initialize_subsystem); + ACPI_FUNCTION_TRACE("acpi_initialize_subsystem"); ACPI_DEBUG_EXEC(acpi_ut_init_stack_ptr_trace()); @@ -107,8 +109,6 @@ acpi_status acpi_initialize_subsystem(void) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem) - /******************************************************************************* * * FUNCTION: acpi_enable_subsystem @@ -121,11 +121,12 @@ ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem) * Puts system into ACPI mode if it isn't already. * ******************************************************************************/ + acpi_status acpi_enable_subsystem(u32 flags) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_enable_subsystem); + ACPI_FUNCTION_TRACE("acpi_enable_subsystem"); /* * We must initialize the hardware before we can enable ACPI. @@ -151,7 +152,7 @@ acpi_status acpi_enable_subsystem(u32 flags) status = acpi_enable(); if (ACPI_FAILURE(status)) { - ACPI_WARNING((AE_INFO, "AcpiEnable failed")); + ACPI_WARNING((AE_INFO, "acpi_enable failed")); return_ACPI_STATUS(status); } } @@ -228,8 +229,6 @@ acpi_status acpi_enable_subsystem(u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) - /******************************************************************************* * * FUNCTION: acpi_initialize_objects @@ -242,11 +241,12 @@ ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) * objects and executing AML code for Regions, buffers, etc. * ******************************************************************************/ + acpi_status acpi_initialize_objects(u32 flags) { acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE(acpi_initialize_objects); + ACPI_FUNCTION_TRACE("acpi_initialize_objects"); /* * Run all _REG methods @@ -257,7 +257,7 @@ acpi_status acpi_initialize_objects(u32 flags) */ if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "[Init] Executing _REG OpRegion methods\n")); + "[Init] Executing _REG op_region methods\n")); status = acpi_ev_initialize_op_regions(); if (ACPI_FAILURE(status)) { @@ -305,8 +305,6 @@ acpi_status acpi_initialize_objects(u32 flags) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_initialize_objects) - /******************************************************************************* * * FUNCTION: acpi_terminate @@ -318,11 +316,12 @@ ACPI_EXPORT_SYMBOL(acpi_initialize_objects) * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. * ******************************************************************************/ + acpi_status acpi_terminate(void) { acpi_status status; - ACPI_FUNCTION_TRACE(acpi_terminate); + ACPI_FUNCTION_TRACE("acpi_terminate"); /* Terminate the AML Debugger if present */ @@ -349,8 +348,6 @@ acpi_status acpi_terminate(void) return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_terminate) - #ifdef ACPI_FUTURE_USAGE /******************************************************************************* * @@ -365,6 +362,7 @@ ACPI_EXPORT_SYMBOL(acpi_terminate) * initialized successfully. * ******************************************************************************/ + acpi_status acpi_subsystem_status(void) { @@ -375,8 +373,6 @@ acpi_status acpi_subsystem_status(void) } } -ACPI_EXPORT_SYMBOL(acpi_subsystem_status) - /******************************************************************************* * * FUNCTION: acpi_get_system_info @@ -394,13 +390,14 @@ ACPI_EXPORT_SYMBOL(acpi_subsystem_status) * and the value of out_buffer is undefined. * ******************************************************************************/ + acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) { struct acpi_system_info *info_ptr; acpi_status status; u32 i; - ACPI_FUNCTION_TRACE(acpi_get_system_info); + ACPI_FUNCTION_TRACE("acpi_get_system_info"); /* Parameter validation */ @@ -451,15 +448,15 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) /* Current status of the ACPI tables, per table type */ - info_ptr->num_table_types = ACPI_TABLE_ID_MAX + 1; - for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) { + info_ptr->num_table_types = NUM_ACPI_TABLE_TYPES; + for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { info_ptr->table_info[i].count = acpi_gbl_table_lists[i].count; } return_ACPI_STATUS(AE_OK); } -ACPI_EXPORT_SYMBOL(acpi_get_system_info) +EXPORT_SYMBOL(acpi_get_system_info); /***************************************************************************** * @@ -475,6 +472,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_system_info) * TBD: When a second function is added, must save the Function also. * ****************************************************************************/ + acpi_status acpi_install_initialization_handler(acpi_init_handler handler, u32 function) { @@ -491,7 +489,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) return AE_OK; } -ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler) #endif /* ACPI_FUTURE_USAGE */ /***************************************************************************** @@ -505,9 +502,10 @@ ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler) * DESCRIPTION: Empty all caches (delete the cached objects) * ****************************************************************************/ + acpi_status acpi_purge_cached_objects(void) { - ACPI_FUNCTION_TRACE(acpi_purge_cached_objects); + ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); (void)acpi_os_purge_cache(acpi_gbl_state_cache); (void)acpi_os_purge_cache(acpi_gbl_operand_cache); @@ -515,5 +513,3 @@ acpi_status acpi_purge_cached_objects(void) (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); return_ACPI_STATUS(AE_OK); } - -ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index d0d84c43a..c08fb741e 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -58,29 +58,31 @@ acpi_extract_package(union acpi_object *package, u8 *head = NULL; u8 *tail = NULL; + ACPI_FUNCTION_TRACE("acpi_extract_package"); if (!package || (package->type != ACPI_TYPE_PACKAGE) || (package->package.count < 1)) { - printk(KERN_WARNING PREFIX "Invalid package argument\n"); - return AE_BAD_PARAMETER; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid 'package' argument\n")); + return_ACPI_STATUS(AE_BAD_PARAMETER); } if (!format || !format->pointer || (format->length < 1)) { - printk(KERN_WARNING PREFIX "Invalid format argument\n"); - return AE_BAD_PARAMETER; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'format' argument\n")); + return_ACPI_STATUS(AE_BAD_PARAMETER); } if (!buffer) { - printk(KERN_WARNING PREFIX "Invalid buffer argument\n"); - return AE_BAD_PARAMETER; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'buffer' argument\n")); + return_ACPI_STATUS(AE_BAD_PARAMETER); } format_count = (format->length / sizeof(char)) - 1; if (format_count > package->package.count) { - printk(KERN_WARNING PREFIX "Format specifies more objects [%d]" - " than exist in package [%d].\n", - format_count, package->package.count); - return AE_BAD_DATA; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Format specifies more objects [%d] than exist in package [%d].", + format_count, package->package.count)); + return_ACPI_STATUS(AE_BAD_DATA); } format_string = (char *)format->pointer; @@ -93,7 +95,7 @@ acpi_extract_package(union acpi_object *package, union acpi_object *element = &(package->package.elements[i]); if (!element) { - return AE_BAD_DATA; + return_ACPI_STATUS(AE_BAD_DATA); } switch (element->type) { @@ -111,11 +113,10 @@ acpi_extract_package(union acpi_object *package, tail_offset += sizeof(char *); break; default: - printk(KERN_WARNING PREFIX "Invalid package element" - " [%d]: got number, expecing" - " [%c]\n", - i, format_string[i]); - return AE_BAD_DATA; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid package element [%d]: got number, expecing [%c].\n", + i, format_string[i])); + return_ACPI_STATUS(AE_BAD_DATA); break; } break; @@ -137,11 +138,10 @@ acpi_extract_package(union acpi_object *package, tail_offset += sizeof(u8 *); break; default: - printk(KERN_WARNING PREFIX "Invalid package element" - " [%d] got string/buffer," - " expecing [%c]\n", - i, format_string[i]); - return AE_BAD_DATA; + ACPI_DEBUG_PRINT((ACPI_DB_WARN, + "Invalid package element [%d] got string/buffer, expecing [%c].\n", + i, format_string[i])); + return_ACPI_STATUS(AE_BAD_DATA); break; } break; @@ -152,7 +152,7 @@ acpi_extract_package(union acpi_object *package, "Found unsupported element at index=%d\n", i)); /* TBD: handle nested packages... */ - return AE_SUPPORT; + return_ACPI_STATUS(AE_SUPPORT); break; } } @@ -162,9 +162,9 @@ acpi_extract_package(union acpi_object *package, */ if (buffer->length < size_required) { buffer->length = size_required; - return AE_BUFFER_OVERFLOW; + return_ACPI_STATUS(AE_BUFFER_OVERFLOW); } else if (buffer->length != size_required || !buffer->pointer) { - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); } head = buffer->pointer; @@ -179,7 +179,7 @@ acpi_extract_package(union acpi_object *package, union acpi_object *element = &(package->package.elements[i]); if (!element) { - return AE_BAD_DATA; + return_ACPI_STATUS(AE_BAD_DATA); } switch (element->type) { @@ -244,11 +244,12 @@ acpi_extract_package(union acpi_object *package, } } - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_extract_package); +extern int acpi_in_resume; acpi_status acpi_evaluate_integer(acpi_handle handle, acpi_string pathname, @@ -258,13 +259,17 @@ acpi_evaluate_integer(acpi_handle handle, union acpi_object *element; struct acpi_buffer buffer = { 0, NULL }; + ACPI_FUNCTION_TRACE("acpi_evaluate_integer"); if (!data) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); - element = kmalloc(sizeof(union acpi_object), irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL); + if (acpi_in_resume) + element = kmalloc(sizeof(union acpi_object), GFP_ATOMIC); + else + element = kmalloc(sizeof(union acpi_object), GFP_KERNEL); if (!element) - return AE_NO_MEMORY; + return_ACPI_STATUS(AE_NO_MEMORY); memset(element, 0, sizeof(union acpi_object)); buffer.length = sizeof(union acpi_object); @@ -272,14 +277,12 @@ acpi_evaluate_integer(acpi_handle handle, status = acpi_evaluate_object(handle, pathname, arguments, &buffer); if (ACPI_FAILURE(status)) { acpi_util_eval_error(handle, pathname, status); - kfree(element); - return status; + return_ACPI_STATUS(status); } if (element->type != ACPI_TYPE_INTEGER) { acpi_util_eval_error(handle, pathname, AE_BAD_DATA); - kfree(element); - return AE_BAD_DATA; + return_ACPI_STATUS(AE_BAD_DATA); } *data = element->integer.value; @@ -287,7 +290,7 @@ acpi_evaluate_integer(acpi_handle handle, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); - return AE_OK; + return_ACPI_STATUS(AE_OK); } EXPORT_SYMBOL(acpi_evaluate_integer); @@ -302,14 +305,15 @@ acpi_evaluate_string(acpi_handle handle, acpi_object *element = NULL; acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + ACPI_FUNCTION_TRACE("acpi_evaluate_string"); if (!data) - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); status = acpi_evaluate_object(handle, pathname, arguments, &buffer); if (ACPI_FAILURE(status)) { acpi_util_eval_error(handle, pathname, status); - return status; + return_ACPI_STATUS(status); } element = (acpi_object *) buffer.pointer; @@ -318,13 +322,13 @@ acpi_evaluate_string(acpi_handle handle, || (element->type != ACPI_TYPE_BUFFER) || !element->string.length) { acpi_util_eval_error(handle, pathname, AE_BAD_DATA); - return AE_BAD_DATA; + return_ACPI_STATUS(AE_BAD_DATA); } *data = kmalloc(element->string.length + 1, GFP_KERNEL); if (!data) { - printk(KERN_ERR PREFIX "Memory allocation\n"); - return -ENOMEM; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); + return_VALUE(-ENOMEM); } memset(*data, 0, element->string.length + 1); @@ -332,9 +336,9 @@ acpi_evaluate_string(acpi_handle handle, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%s]\n", *data)); - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return AE_OK; + return_ACPI_STATUS(AE_OK); } #endif @@ -350,9 +354,10 @@ acpi_evaluate_reference(acpi_handle handle, struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; u32 i = 0; + ACPI_FUNCTION_TRACE("acpi_evaluate_reference"); if (!list) { - return AE_BAD_PARAMETER; + return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Evaluate object. */ @@ -364,29 +369,32 @@ acpi_evaluate_reference(acpi_handle handle, package = (union acpi_object *)buffer.pointer; if ((buffer.length == 0) || !package) { - printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n", - (unsigned)buffer.length, package); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "No return object (len %X ptr %p)\n", + (unsigned)buffer.length, package)); status = AE_BAD_DATA; acpi_util_eval_error(handle, pathname, status); goto end; } if (package->type != ACPI_TYPE_PACKAGE) { - printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n", - package->type); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Expecting a [Package], found type %X\n", + package->type)); status = AE_BAD_DATA; acpi_util_eval_error(handle, pathname, status); goto end; } if (!package->package.count) { - printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n", - package); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "[Package] has zero elements (%p)\n", + package)); status = AE_BAD_DATA; acpi_util_eval_error(handle, pathname, status); goto end; } if (package->package.count > ACPI_MAX_HANDLES) { - return AE_NO_MEMORY; + return_ACPI_STATUS(AE_NO_MEMORY); } list->count = package->package.count; @@ -398,9 +406,9 @@ acpi_evaluate_reference(acpi_handle handle, if (element->type != ACPI_TYPE_ANY) { status = AE_BAD_DATA; - printk(KERN_ERR PREFIX - "Expecting a [Reference] package element, found type %X\n", - element->type); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Expecting a [Reference] package element, found type %X\n", + element->type)); acpi_util_eval_error(handle, pathname, status); break; } @@ -418,9 +426,9 @@ acpi_evaluate_reference(acpi_handle handle, //kfree(list->handles); } - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); - return status; + return_ACPI_STATUS(status); } EXPORT_SYMBOL(acpi_evaluate_reference); diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 56666a982..bd4887518 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -117,7 +117,7 @@ struct acpi_video_enumerated_device { }; struct acpi_video_bus { - struct acpi_device *device; + acpi_handle handle; u8 dos_setting; struct acpi_video_enumerated_device *attached_array; u8 attached_count; @@ -155,6 +155,7 @@ struct acpi_video_device_brightness { }; struct acpi_video_device { + acpi_handle handle; unsigned long device_id; struct acpi_video_device_flags flags; struct acpi_video_device_cap cap; @@ -271,10 +272,10 @@ static int acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) { int status; + ACPI_FUNCTION_TRACE("acpi_video_device_query"); + status = acpi_evaluate_integer(device->handle, "_DGS", NULL, state); - status = acpi_evaluate_integer(device->dev->handle, "_DGS", NULL, state); - - return status; + return_VALUE(status); } static int @@ -283,9 +284,11 @@ acpi_video_device_get_state(struct acpi_video_device *device, { int status; - status = acpi_evaluate_integer(device->dev->handle, "_DCS", NULL, state); + ACPI_FUNCTION_TRACE("acpi_video_device_get_state"); + + status = acpi_evaluate_integer(device->handle, "_DCS", NULL, state); - return status; + return_VALUE(status); } static int @@ -296,11 +299,12 @@ acpi_video_device_set_state(struct acpi_video_device *device, int state) struct acpi_object_list args = { 1, &arg0 }; unsigned long ret; + ACPI_FUNCTION_TRACE("acpi_video_device_set_state"); arg0.integer.value = state; - status = acpi_evaluate_integer(device->dev->handle, "_DSS", &args, &ret); + status = acpi_evaluate_integer(device->handle, "_DSS", &args, &ret); - return status; + return_VALUE(status); } static int @@ -311,27 +315,28 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *obj; + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_query_levels"); *levels = NULL; - status = acpi_evaluate_object(device->dev->handle, "_BCL", NULL, &buffer); + status = acpi_evaluate_object(device->handle, "_BCL", NULL, &buffer); if (!ACPI_SUCCESS(status)) - return status; + return_VALUE(status); obj = (union acpi_object *)buffer.pointer; - if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { - printk(KERN_ERR PREFIX "Invalid _BCL data\n"); + if (!obj && (obj->type != ACPI_TYPE_PACKAGE)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); status = -EFAULT; goto err; } *levels = obj; - return 0; + return_VALUE(0); err: kfree(buffer.pointer); - return status; + return_VALUE(status); } static int @@ -341,12 +346,13 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, &arg0 }; + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_set_level"); arg0.integer.value = level; - status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); + status = acpi_evaluate_object(device->handle, "_BCM", &args, NULL); printk(KERN_DEBUG "set_level status: %x\n", status); - return status; + return_VALUE(status); } static int @@ -354,10 +360,11 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, unsigned long *level) { int status; + ACPI_FUNCTION_TRACE("acpi_video_device_lcd_get_level_current"); - status = acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, level); + status = acpi_evaluate_integer(device->handle, "_BQC", NULL, level); - return status; + return_VALUE(status); } static int @@ -370,33 +377,34 @@ acpi_video_device_EDID(struct acpi_video_device *device, union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, &arg0 }; + ACPI_FUNCTION_TRACE("acpi_video_device_get_EDID"); *edid = NULL; if (!device) - return -ENODEV; + return_VALUE(-ENODEV); if (length == 128) arg0.integer.value = 1; else if (length == 256) arg0.integer.value = 2; else - return -EINVAL; + return_VALUE(-EINVAL); - status = acpi_evaluate_object(device->dev->handle, "_DDC", &args, &buffer); + status = acpi_evaluate_object(device->handle, "_DDC", &args, &buffer); if (ACPI_FAILURE(status)) - return -ENODEV; + return_VALUE(-ENODEV); obj = (union acpi_object *)buffer.pointer; if (obj && obj->type == ACPI_TYPE_BUFFER) *edid = obj; else { - printk(KERN_ERR PREFIX "Invalid _DDC data\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DDC data\n")); status = -EFAULT; kfree(obj); } - return status; + return_VALUE(status); } /* bus */ @@ -409,14 +417,15 @@ acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option) union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, &arg0 }; + ACPI_FUNCTION_TRACE("acpi_video_bus_set_POST"); arg0.integer.value = option; - status = acpi_evaluate_integer(video->device->handle, "_SPD", &args, &tmp); + status = acpi_evaluate_integer(video->handle, "_SPD", &args, &tmp); if (ACPI_SUCCESS(status)) status = tmp ? (-EINVAL) : (AE_OK); - return status; + return_VALUE(status); } static int @@ -424,9 +433,11 @@ acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id) { int status; - status = acpi_evaluate_integer(video->device->handle, "_GPD", NULL, id); + ACPI_FUNCTION_TRACE("acpi_video_bus_get_POST"); - return status; + status = acpi_evaluate_integer(video->handle, "_GPD", NULL, id); + + return_VALUE(status); } static int @@ -434,11 +445,12 @@ acpi_video_bus_POST_options(struct acpi_video_bus *video, unsigned long *options) { int status; + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_options"); - status = acpi_evaluate_integer(video->device->handle, "_VPO", NULL, options); + status = acpi_evaluate_integer(video->handle, "_VPO", NULL, options); *options &= 3; - return status; + return_VALUE(status); } /* @@ -469,6 +481,7 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, &arg0 }; + ACPI_FUNCTION_TRACE("acpi_video_bus_DOS"); if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) { status = -1; @@ -476,10 +489,10 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) } arg0.integer.value = (lcd_flag << 2) | bios_flag; video->dos_setting = arg0.integer.value; - acpi_evaluate_object(video->device->handle, "_DOS", &args, NULL); + acpi_evaluate_object(video->handle, "_DOS", &args, NULL); Failed: - return status; + return_VALUE(status); } /* @@ -501,28 +514,29 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) union acpi_object *obj = NULL; struct acpi_video_device_brightness *br = NULL; + ACPI_FUNCTION_TRACE("acpi_video_device_find_cap"); memset(&device->cap, 0, 4); - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ADR", &h_dummy1))) { device->cap._ADR = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCL", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCL", &h_dummy1))) { device->cap._BCL = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCM", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCM", &h_dummy1))) { device->cap._BCM = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DDC", &h_dummy1))) { device->cap._DDC = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DCS", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DCS", &h_dummy1))) { device->cap._DCS = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DGS", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DGS", &h_dummy1))) { device->cap._DGS = 1; } - if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DSS", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DSS", &h_dummy1))) { device->cap._DSS = 1; } @@ -546,7 +560,8 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) o = (union acpi_object *)&obj->package. elements[i]; if (o->type != ACPI_TYPE_INTEGER) { - printk(KERN_ERR PREFIX "Invalid data\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid data\n")); continue; } br->levels[count] = (u32) o->integer.value; @@ -568,7 +583,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) kfree(obj); - return; + return_VOID; } /* @@ -586,22 +601,22 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video) acpi_handle h_dummy1; memset(&video->cap, 0, 4); - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_DOS", &h_dummy1))) { video->cap._DOS = 1; } - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOD", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_DOD", &h_dummy1))) { video->cap._DOD = 1; } - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_ROM", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_ROM", &h_dummy1))) { video->cap._ROM = 1; } - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_GPD", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_GPD", &h_dummy1))) { video->cap._GPD = 1; } - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_SPD", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_SPD", &h_dummy1))) { video->cap._SPD = 1; } - if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_VPO", &h_dummy1))) { + if (ACPI_SUCCESS(acpi_get_handle(video->handle, "_VPO", &h_dummy1))) { video->cap._VPO = 1; } } @@ -615,9 +630,10 @@ static int acpi_video_bus_check(struct acpi_video_bus *video) { acpi_status status = -ENOENT; + ACPI_FUNCTION_TRACE("acpi_video_bus_check"); if (!video) - return -EINVAL; + return_VALUE(-EINVAL); /* Since there is no HID, CID and so on for VGA driver, we have * to check well known required nodes. @@ -641,7 +657,7 @@ static int acpi_video_bus_check(struct acpi_video_bus *video) status = 0; } - return status; + return_VALUE(status); } /* -------------------------------------------------------------------------- @@ -657,6 +673,7 @@ static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset) struct acpi_video_device *dev = (struct acpi_video_device *)seq->private; + ACPI_FUNCTION_TRACE("acpi_video_device_info_seq_show"); if (!dev) goto end; @@ -675,7 +692,7 @@ static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "known by bios: %s\n", dev->flags.bios ? "yes" : "no"); end: - return 0; + return_VALUE(0); } static int @@ -692,6 +709,7 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) (struct acpi_video_device *)seq->private; unsigned long state; + ACPI_FUNCTION_TRACE("acpi_video_device_state_seq_show"); if (!dev) goto end; @@ -711,7 +729,7 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "\n"); end: - return 0; + return_VALUE(0); } static int @@ -732,12 +750,13 @@ acpi_video_device_write_state(struct file *file, char str[12] = { 0 }; u32 state = 0; + ACPI_FUNCTION_TRACE("acpi_video_device_write_state"); if (!dev || count + 1 > sizeof str) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(str, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); str[count] = 0; state = simple_strtoul(str, NULL, 0); @@ -746,9 +765,9 @@ acpi_video_device_write_state(struct file *file, status = acpi_video_device_set_state(dev, state); if (status) - return -EFAULT; + return_VALUE(-EFAULT); - return count; + return_VALUE(count); } static int @@ -758,10 +777,11 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) (struct acpi_video_device *)seq->private; int i; + ACPI_FUNCTION_TRACE("acpi_video_device_brightness_seq_show"); if (!dev || !dev->brightness) { seq_printf(seq, "\n"); - return 0; + return_VALUE(0); } seq_printf(seq, "levels: "); @@ -769,7 +789,7 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, " %d", dev->brightness->levels[i]); seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); - return 0; + return_VALUE(0); } static int @@ -790,18 +810,19 @@ acpi_video_device_write_brightness(struct file *file, unsigned int level = 0; int i; + ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); if (!dev || !dev->brightness || count + 1 > sizeof str) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(str, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); str[count] = 0; level = simple_strtoul(str, NULL, 0); if (level > 100) - return -EFAULT; + return_VALUE(-EFAULT); /* validate though the list of available levels */ for (i = 0; i < dev->brightness->count; i++) @@ -812,7 +833,7 @@ acpi_video_device_write_brightness(struct file *file, break; } - return count; + return_VALUE(count); } static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) @@ -823,6 +844,7 @@ static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) int i; union acpi_object *edid = NULL; + ACPI_FUNCTION_TRACE("acpi_video_device_EDID_seq_show"); if (!dev) goto out; @@ -847,7 +869,7 @@ static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) else kfree(edid); - return 0; + return_VALUE(0); } static int @@ -862,26 +884,28 @@ static int acpi_video_device_add_fs(struct acpi_device *device) struct proc_dir_entry *entry = NULL; struct acpi_video_device *vid_dev; + ACPI_FUNCTION_TRACE("acpi_video_device_add_fs"); if (!device) - return -ENODEV; + return_VALUE(-ENODEV); vid_dev = (struct acpi_video_device *)acpi_driver_data(device); if (!vid_dev) - return -ENODEV; + return_VALUE(-ENODEV); if (!acpi_device_dir(device)) { acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), vid_dev->video->dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); acpi_device_dir(device)->owner = THIS_MODULE; } /* 'info' [R] */ entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'info' fs entry\n")); else { entry->proc_fops = &acpi_video_device_info_fops; entry->data = acpi_driver_data(device); @@ -893,7 +917,8 @@ static int acpi_video_device_add_fs(struct acpi_device *device) create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'state' fs entry\n")); else { acpi_video_device_state_fops.write = acpi_video_device_write_state; entry->proc_fops = &acpi_video_device_state_fops; @@ -906,7 +931,8 @@ static int acpi_video_device_add_fs(struct acpi_device *device) create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'brightness' fs entry\n")); else { acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; entry->proc_fops = &acpi_video_device_brightness_fops; @@ -917,23 +943,25 @@ static int acpi_video_device_add_fs(struct acpi_device *device) /* 'EDID' [R] */ entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'brightness' fs entry\n")); else { entry->proc_fops = &acpi_video_device_EDID_fops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_video_device_remove_fs(struct acpi_device *device) { struct acpi_video_device *vid_dev; + ACPI_FUNCTION_TRACE("acpi_video_device_remove_fs"); vid_dev = (struct acpi_video_device *)acpi_driver_data(device); if (!vid_dev || !vid_dev->video || !vid_dev->video->dir) - return -ENODEV; + return_VALUE(-ENODEV); if (acpi_device_dir(device)) { remove_proc_entry("info", acpi_device_dir(device)); @@ -944,7 +972,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* video bus */ @@ -952,6 +980,7 @@ static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset) { struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; + ACPI_FUNCTION_TRACE("acpi_video_bus_info_seq_show"); if (!video) goto end; @@ -964,7 +993,7 @@ static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset) video->flags.post ? "yes" : "no"); end: - return 0; + return_VALUE(0); } static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file) @@ -977,6 +1006,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) { struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; + ACPI_FUNCTION_TRACE("acpi_video_bus_ROM_seq_show"); if (!video) goto end; @@ -985,7 +1015,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "\n"); end: - return 0; + return_VALUE(0); } static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file) @@ -999,6 +1029,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) unsigned long options; int status; + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_info_seq_show"); if (!video) goto end; @@ -1021,7 +1052,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) } else seq_printf(seq, "\n"); end: - return 0; + return_VALUE(0); } static int @@ -1037,6 +1068,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset) int status; unsigned long id; + ACPI_FUNCTION_TRACE("acpi_video_bus_POST_seq_show"); if (!video) goto end; @@ -1049,17 +1081,18 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset) seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]); end: - return 0; + return_VALUE(0); } static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset) { struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; + ACPI_FUNCTION_TRACE("acpi_video_bus_DOS_seq_show"); seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting); - return 0; + return_VALUE(0); } static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file) @@ -1084,21 +1117,22 @@ acpi_video_bus_write_POST(struct file *file, char str[12] = { 0 }; unsigned long opt, options; + ACPI_FUNCTION_TRACE("acpi_video_bus_write_POST"); if (!video || count + 1 > sizeof str) - return -EINVAL; + return_VALUE(-EINVAL); status = acpi_video_bus_POST_options(video, &options); if (!ACPI_SUCCESS(status)) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(str, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); str[count] = 0; opt = strtoul(str, NULL, 0); if (opt > 3) - return -EFAULT; + return_VALUE(-EFAULT); /* just in case an OEM 'forget' the motherboard... */ options |= 1; @@ -1106,11 +1140,11 @@ acpi_video_bus_write_POST(struct file *file, if (options & (1ul << opt)) { status = acpi_video_bus_set_POST(video, opt); if (!ACPI_SUCCESS(status)) - return -EFAULT; + return_VALUE(-EFAULT); } - return count; + return_VALUE(count); } static ssize_t @@ -1124,24 +1158,25 @@ acpi_video_bus_write_DOS(struct file *file, char str[12] = { 0 }; unsigned long opt; + ACPI_FUNCTION_TRACE("acpi_video_bus_write_DOS"); if (!video || count + 1 > sizeof str) - return -EINVAL; + return_VALUE(-EINVAL); if (copy_from_user(str, buffer, count)) - return -EFAULT; + return_VALUE(-EFAULT); str[count] = 0; opt = strtoul(str, NULL, 0); if (opt > 7) - return -EFAULT; + return_VALUE(-EFAULT); status = acpi_video_bus_DOS(video, opt & 0x3, (opt & 0x4) >> 2); if (!ACPI_SUCCESS(status)) - return -EFAULT; + return_VALUE(-EFAULT); - return count; + return_VALUE(count); } static int acpi_video_bus_add_fs(struct acpi_device *device) @@ -1149,6 +1184,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) struct proc_dir_entry *entry = NULL; struct acpi_video_bus *video; + ACPI_FUNCTION_TRACE("acpi_video_bus_add_fs"); video = (struct acpi_video_bus *)acpi_driver_data(device); @@ -1156,7 +1192,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), acpi_video_dir); if (!acpi_device_dir(device)) - return -ENODEV; + return_VALUE(-ENODEV); video->dir = acpi_device_dir(device); acpi_device_dir(device)->owner = THIS_MODULE; } @@ -1164,7 +1200,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) /* 'info' [R] */ entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'info' fs entry\n")); else { entry->proc_fops = &acpi_video_bus_info_fops; entry->data = acpi_driver_data(device); @@ -1174,7 +1211,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) /* 'ROM' [R] */ entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'ROM' fs entry\n")); else { entry->proc_fops = &acpi_video_bus_ROM_fops; entry->data = acpi_driver_data(device); @@ -1185,7 +1223,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) entry = create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'POST_info' fs entry\n")); else { entry->proc_fops = &acpi_video_bus_POST_info_fops; entry->data = acpi_driver_data(device); @@ -1197,7 +1236,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'POST' fs entry\n")); else { acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; entry->proc_fops = &acpi_video_bus_POST_fops; @@ -1210,7 +1250,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, acpi_device_dir(device)); if (!entry) - return -ENODEV; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to create 'DOS' fs entry\n")); else { acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; entry->proc_fops = &acpi_video_bus_DOS_fops; @@ -1218,13 +1259,14 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) entry->owner = THIS_MODULE; } - return 0; + return_VALUE(0); } static int acpi_video_bus_remove_fs(struct acpi_device *device) { struct acpi_video_bus *video; + ACPI_FUNCTION_TRACE("acpi_video_bus_remove_fs"); video = (struct acpi_video_bus *)acpi_driver_data(device); @@ -1238,7 +1280,7 @@ static int acpi_video_bus_remove_fs(struct acpi_device *device) acpi_device_dir(device) = NULL; } - return 0; + return_VALUE(0); } /* -------------------------------------------------------------------------- @@ -1252,12 +1294,13 @@ acpi_video_bus_get_one_device(struct acpi_device *device, struct acpi_video_bus *video) { unsigned long device_id; - int status; + int status, result; struct acpi_video_device *data; + ACPI_FUNCTION_TRACE("acpi_video_bus_get_one_device"); if (!device || !video) - return -EINVAL; + return_VALUE(-EINVAL); status = acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id); @@ -1265,10 +1308,11 @@ acpi_video_bus_get_one_device(struct acpi_device *device, data = kmalloc(sizeof(struct acpi_video_device), GFP_KERNEL); if (!data) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(data, 0, sizeof(struct acpi_video_device)); + data->handle = device->handle; strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); acpi_driver_data(device) = data; @@ -1295,18 +1339,15 @@ acpi_video_bus_get_one_device(struct acpi_device *device, acpi_video_device_bind(video, data); acpi_video_device_find_cap(data); - status = acpi_install_notify_handler(device->handle, + status = acpi_install_notify_handler(data->handle, ACPI_DEVICE_NOTIFY, acpi_video_device_notify, data); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); - if(data->brightness) - kfree(data->brightness->levels); - kfree(data->brightness); - kfree(data); - return -ENODEV; + result = -ENODEV; + goto end; } down(&video->sem); @@ -1315,10 +1356,11 @@ acpi_video_bus_get_one_device(struct acpi_device *device, acpi_video_device_add_fs(device); - return 0; + return_VALUE(0); } - return -ENOENT; + end: + return_VALUE(-ENOENT); } /* @@ -1361,6 +1403,7 @@ acpi_video_device_bind(struct acpi_video_bus *video, struct acpi_video_device *device) { int i; + ACPI_FUNCTION_TRACE("acpi_video_device_bind"); #define IDS_VAL(i) video->attached_array[i].value.int_val #define IDS_BIND(i) video->attached_array[i].bind_info @@ -1397,15 +1440,17 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) union acpi_object *dod = NULL; union acpi_object *obj; - status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer); + ACPI_FUNCTION_TRACE("acpi_video_device_enumerate"); + + status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); if (!ACPI_SUCCESS(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD")); - return status; + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n")); + return_VALUE(status); } dod = (union acpi_object *)buffer.pointer; if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { - ACPI_EXCEPTION((AE_INFO, status, "Invalid _DOD data")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); status = -EFAULT; goto out; } @@ -1429,7 +1474,8 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) obj = (union acpi_object *)&dod->package.elements[i]; if (obj->type != ACPI_TYPE_INTEGER) { - printk(KERN_ERR PREFIX "Invalid _DOD data\n"); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Invalid _DOD data\n")); active_device_list[i].value.int_val = ACPI_VIDEO_HEAD_INVALID; } @@ -1446,8 +1492,8 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) video->attached_array = active_device_list; video->attached_count = count; out: - kfree(buffer.pointer); - return status; + acpi_os_free(buffer.pointer); + return_VALUE(status); } /* @@ -1472,6 +1518,7 @@ static int acpi_video_switch_output(struct acpi_video_bus *video, int event) unsigned long state; int status = 0; + ACPI_FUNCTION_TRACE("acpi_video_switch_output"); list_for_each_safe(node, next, &video->video_device_list) { dev = container_of(node, struct acpi_video_device, entry); @@ -1502,7 +1549,7 @@ static int acpi_video_switch_output(struct acpi_video_bus *video, int event) break; } - return status; + return_VALUE(status); } static int @@ -1529,6 +1576,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, int status = 0; struct list_head *node, *next; + ACPI_FUNCTION_TRACE("acpi_video_get_devices"); acpi_video_device_enumerate(video); @@ -1541,12 +1589,13 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, status = acpi_video_bus_get_one_device(dev, video); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Cant attach device\n")); continue; } } - return status; + return_VALUE(status); } static int acpi_video_bus_put_one_device(struct acpi_video_device *device) @@ -1554,9 +1603,10 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) acpi_status status; struct acpi_video_bus *video; + ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); if (!device || !device->video) - return -ENOENT; + return_VALUE(-ENOENT); video = device->video; @@ -1565,11 +1615,14 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) up(&video->sem); acpi_video_device_remove_fs(device->dev); - status = acpi_remove_notify_handler(device->dev->handle, + status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, acpi_video_device_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); - return 0; + return_VALUE(0); } static int acpi_video_bus_put_devices(struct acpi_video_bus *video) @@ -1577,6 +1630,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) int status; struct list_head *node, *next; + ACPI_FUNCTION_TRACE("acpi_video_bus_put_devices"); list_for_each_safe(node, next, &video->video_device_list) { struct acpi_video_device *data = @@ -1589,13 +1643,12 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) printk(KERN_WARNING PREFIX "hhuuhhuu bug in acpi video driver.\n"); - if (data->brightness) - kfree(data->brightness->levels); kfree(data->brightness); + kfree(data); } - return 0; + return_VALUE(0); } /* acpi_video interface */ @@ -1615,12 +1668,14 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) struct acpi_video_bus *video = (struct acpi_video_bus *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_video_bus_notify"); printk("video bus notify\n"); if (!video) - return; + return_VOID; - device = video->device; + if (acpi_bus_get_device(handle, &device)) + return_VOID; switch (event) { case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, @@ -1649,7 +1704,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) break; } - return; + return_VOID; } static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) @@ -1658,12 +1713,14 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) (struct acpi_video_device *)data; struct acpi_device *device = NULL; + ACPI_FUNCTION_TRACE("acpi_video_device_notify"); printk("video device notify\n"); if (!video_device) - return; + return_VOID; - device = video_device->dev; + if (acpi_bus_get_device(handle, &device)) + return_VOID; switch (event) { case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ @@ -1683,7 +1740,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) "Unsupported event [0x%x]\n", event)); break; } - return; + return_VOID; } static int acpi_video_bus_add(struct acpi_device *device) @@ -1692,16 +1749,17 @@ static int acpi_video_bus_add(struct acpi_device *device) acpi_status status = 0; struct acpi_video_bus *video = NULL; + ACPI_FUNCTION_TRACE("acpi_video_bus_add"); if (!device) - return -EINVAL; + return_VALUE(-EINVAL); video = kmalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); if (!video) - return -ENOMEM; + return_VALUE(-ENOMEM); memset(video, 0, sizeof(struct acpi_video_bus)); - video->device = device; + video->handle = device->handle; strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); acpi_driver_data(device) = video; @@ -1721,16 +1779,12 @@ static int acpi_video_bus_add(struct acpi_device *device) acpi_video_bus_get_devices(video, device); acpi_video_bus_start_devices(video); - status = acpi_install_notify_handler(device->handle, + status = acpi_install_notify_handler(video->handle, ACPI_DEVICE_NOTIFY, acpi_video_bus_notify, video); if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); - acpi_video_bus_stop_devices(video); - acpi_video_bus_put_devices(video); - kfree(video->attached_array); - acpi_video_bus_remove_fs(device); result = -ENODEV; goto end; } @@ -1742,10 +1796,12 @@ static int acpi_video_bus_add(struct acpi_device *device) video->flags.post ? "yes" : "no"); end: - if (result) + if (result) { + acpi_video_bus_remove_fs(device); kfree(video); + } - return result; + return_VALUE(result); } static int acpi_video_bus_remove(struct acpi_device *device, int type) @@ -1753,17 +1809,21 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) acpi_status status = 0; struct acpi_video_bus *video = NULL; + ACPI_FUNCTION_TRACE("acpi_video_bus_remove"); if (!device || !acpi_driver_data(device)) - return -EINVAL; + return_VALUE(-EINVAL); video = (struct acpi_video_bus *)acpi_driver_data(device); acpi_video_bus_stop_devices(video); - status = acpi_remove_notify_handler(video->device->handle, + status = acpi_remove_notify_handler(video->handle, ACPI_DEVICE_NOTIFY, acpi_video_bus_notify); + if (ACPI_FAILURE(status)) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error removing notify handler\n")); acpi_video_bus_put_devices(video); acpi_video_bus_remove_fs(device); @@ -1771,7 +1831,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) kfree(video->attached_array); kfree(video); - return 0; + return_VALUE(0); } static int @@ -1781,9 +1841,10 @@ acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver) acpi_handle h_dummy2; acpi_handle h_dummy3; + ACPI_FUNCTION_TRACE("acpi_video_bus_match"); if (!device || !driver) - return -EINVAL; + return_VALUE(-EINVAL); /* Since there is no HID, CID for ACPI Video drivers, we have * to check well known required nodes for each feature we support. @@ -1792,25 +1853,26 @@ acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver) /* Does this device able to support video switching ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2))) - return 0; + return_VALUE(0); /* Does this device able to retrieve a video ROM ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1))) - return 0; + return_VALUE(0); /* Does this device able to configure which video head to be POSTed ? */ if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) && ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3))) - return 0; + return_VALUE(0); - return -ENODEV; + return_VALUE(-ENODEV); } static int __init acpi_video_init(void) { int result = 0; + ACPI_FUNCTION_TRACE("acpi_video_init"); /* acpi_dbg_level = 0xFFFFFFFF; @@ -1819,26 +1881,27 @@ static int __init acpi_video_init(void) acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir); if (!acpi_video_dir) - return -ENODEV; + return_VALUE(-ENODEV); acpi_video_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&acpi_video_bus); if (result < 0) { remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); - return -ENODEV; + return_VALUE(-ENODEV); } - return 0; + return_VALUE(0); } static void __exit acpi_video_exit(void) { + ACPI_FUNCTION_TRACE("acpi_video_exit"); acpi_bus_unregister_driver(&acpi_video_bus); remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); - return; + return_VOID; } module_init(acpi_video_init); diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 9e3e2a69c..889855d8d 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -180,9 +180,8 @@ static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL) amba_attr(id, "%08x\n", dev->periphid); amba_attr(irq0, "%u\n", dev->irq[0]); amba_attr(irq1, "%u\n", dev->irq[1]); -amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n", - (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, - dev->res.flags); +amba_attr(resource, "\t%08lx\t%08lx\t%08lx\n", + dev->res.start, dev->res.end, dev->res.flags); /** * amba_device_register - register an AMBA device diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig index cfa5af883..01a9f1cb7 100644 --- a/drivers/atm/Kconfig +++ b/drivers/atm/Kconfig @@ -398,7 +398,7 @@ config ATM_FORE200E_USE_TASKLET default n help This defers work to be done by the interrupt handler to a - tasklet instead of handling everything at interrupt time. This + tasklet instead of hanlding everything at interrupt time. This may improve the responsive of the host. config ATM_FORE200E_TX_RETRY diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c index 6cc93de0b..d1387cfe2 100644 --- a/drivers/atm/adummy.c +++ b/drivers/atm/adummy.c @@ -2,6 +2,7 @@ * adummy.c: a dummy ATM driver */ +#include #include #include #include diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 4521a249d..4b6bf19c3 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -1996,7 +1995,7 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) { } i += 1; } - if (*pointer == ATM_POISON) { + if (*pointer == 0xdeadbeef) { return loader_start (lb, dev, ucode_start); } else { // cast needed as there is no %? for pointer differnces @@ -2258,8 +2257,7 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_ } PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at" - " IO %llx, IRQ %u, MEM %p", - (unsigned long long)pci_resource_start(pci_dev, 1), + " IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1), irq, bus_to_virt(pci_resource_start(pci_dev, 0))); // check IO region @@ -2287,7 +2285,7 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_ setup_pci_dev(pci_dev); // grab (but share) IRQ and install handler - err = request_irq(irq, interrupt_handler, IRQF_SHARED, DEV_LABEL, dev); + err = request_irq(irq, interrupt_handler, SA_SHIRQ, DEV_LABEL, dev); if (err < 0) { PRINTK (KERN_ERR, "request IRQ failed!"); goto out_reset; diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h index 8296420ce..84a93063c 100644 --- a/drivers/atm/ambassador.h +++ b/drivers/atm/ambassador.h @@ -23,6 +23,7 @@ #ifndef AMBASSADOR_H #define AMBASSADOR_H +#include #ifdef CONFIG_ATM_AMBASSADOR_DEBUG #define DEBUG_AMBASSADOR diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index df359a6c1..c13c4d736 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c @@ -4,6 +4,7 @@ #include +#include #include #include #include @@ -1797,7 +1798,7 @@ static int __devinit eni_start(struct atm_dev *dev) DPRINTK(">eni_start\n"); eni_dev = ENI_DEV(dev); - if (request_irq(eni_dev->irq,&eni_int,IRQF_SHARED,DEV_LABEL,dev)) { + if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) { printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", dev->number,eni_dev->irq); error = -EAGAIN; diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 38fc054bd..7f7ec2888 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -755,7 +754,7 @@ static void process_txdone_queue (struct fs_dev *dev, struct queue *q) fs_kfree_skb (skb); fs_dprintk (FS_DEBUG_ALLOC, "Free trans-d: %p\n", td); - memset (td, ATM_POISON_FREE, sizeof(struct FS_BPENTRY)); + memset (td, 0x12, sizeof (struct FS_BPENTRY)); kfree (td); break; default: @@ -952,7 +951,7 @@ static int fs_open(struct atm_vcc *atm_vcc) it most likely that the chip will notice it. It also prevents us from having to wait for completion. On the other hand, we may need to wait for completion anyway, to see if it completed - successfully. */ + succesfully. */ switch (atm_vcc->qos.aal) { case ATM_AAL2: @@ -1658,10 +1657,9 @@ static int __devinit fs_init (struct fs_dev *dev) func_enter (); pci_dev = dev->pci_dev; - printk (KERN_INFO "found a FireStream %d card, base %16llx, irq%d.\n", + printk (KERN_INFO "found a FireStream %d card, base %08lx, irq%d.\n", IS_FS50(dev)?50:155, - (unsigned long long)pci_resource_start(pci_dev, 0), - dev->pci_dev->irq); + pci_resource_start(pci_dev, 0), dev->pci_dev->irq); if (fs_debug & FS_DEBUG_INIT) my_hd ((unsigned char *) dev, sizeof (*dev)); @@ -1829,7 +1827,7 @@ static int __devinit fs_init (struct fs_dev *dev) init_q (dev, &dev->rx_rq[i], RXB_RQ(i), RXRQ_NENTRIES, 1); dev->irq = pci_dev->irq; - if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) { + if (request_irq (dev->irq, fs_irq, SA_SHIRQ, "firestream", dev)) { printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); /* XXX undo all previous stuff... */ return 1; diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 98622130d..05983a312 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -25,6 +25,7 @@ */ +#include #include #include #include @@ -166,9 +167,13 @@ fore200e_atm2fore_aal(int aal) static char* fore200e_irq_itoa(int irq) { +#if defined(__sparc_v9__) + return __irq_itoa(irq); +#else static char str[8]; sprintf(str, "%d", irq); return str; +#endif } @@ -2123,7 +2128,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) static int __devinit fore200e_irq_request(struct fore200e* fore200e) { - if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) { + if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { printk(FORE200E "unable to reserve IRQ %s for device %s\n", fore200e_irq_itoa(fore200e->irq), fore200e->name); diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h index f9abfdac3..2558eb853 100644 --- a/drivers/atm/fore200e.h +++ b/drivers/atm/fore200e.h @@ -3,6 +3,7 @@ #define _FORE200E_H #ifdef __KERNEL__ +#include /* rx buffer sizes */ diff --git a/drivers/atm/he.c b/drivers/atm/he.c index ffcb9fd31..fde933405 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -55,6 +55,7 @@ */ +#include #include #include #include @@ -1007,7 +1008,7 @@ he_init_irq(struct he_dev *he_dev) he_writel(he_dev, 0x0, GRP_54_MAP); he_writel(he_dev, 0x0, GRP_76_MAP); - if (request_irq(he_dev->pci_dev->irq, he_irq_handler, IRQF_DISABLED|IRQF_SHARED, DEV_LABEL, he_dev)) { + if (request_irq(he_dev->pci_dev->irq, he_irq_handler, SA_INTERRUPT|SA_SHIRQ, DEV_LABEL, he_dev)) { hprintk("irq %d already in use\n", he_dev->pci_dev->irq); return -EINVAL; } @@ -1017,7 +1018,7 @@ he_init_irq(struct he_dev *he_dev) return 0; } -static int __devinit +static int __init he_start(struct atm_dev *dev) { struct he_dev *he_dev; @@ -1928,9 +1929,7 @@ he_service_rbrq(struct he_dev *he_dev, int group) #ifdef notdef ATM_SKB(skb)->vcc = vcc; #endif - spin_unlock(&he_dev->global_lock); vcc->push(vcc, skb); - spin_lock(&he_dev->global_lock); atomic_inc(&vcc->stats->rx); @@ -2284,8 +2283,6 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid) TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H))); if (new_tail == he_dev->tpdrq_head) { - int slot; - hprintk("tpdrq full (cid 0x%x)\n", cid); /* * FIXME @@ -2293,13 +2290,6 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid) * after service_tbrq, service the backlog * for now, we just drop the pdu */ - for (slot = 0; slot < TPD_MAXIOV; ++slot) { - if (tpd->iovec[slot].addr) - pci_unmap_single(he_dev->pci_dev, - tpd->iovec[slot].addr, - tpd->iovec[slot].len & TPD_LEN_MASK, - PCI_DMA_TODEVICE); - } if (tpd->skb) { if (tpd->vcc->pop) tpd->vcc->pop(tpd->vcc, tpd->skb); diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index d1113e845..821c81e8c 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c @@ -2735,7 +2735,7 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_ irq = pci_dev->irq; if (request_irq(irq, interrupt_handler, - IRQF_SHARED, /* irqflags guess */ + SA_SHIRQ, /* irqflags guess */ DEV_LABEL, /* name guess */ dev)) { PRINTD(DBG_WARN, "request IRQ failed!"); diff --git a/drivers/atm/horizon.h b/drivers/atm/horizon.h index 4461229f5..e2cc7020f 100644 --- a/drivers/atm/horizon.h +++ b/drivers/atm/horizon.h @@ -30,6 +30,7 @@ #ifndef DRIVER_ATM_HORIZON_H #define DRIVER_ATM_HORIZON_H +#include #ifdef CONFIG_ATM_HORIZON_DEBUG #define DEBUG_HORIZON diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 325325afa..0aabfc2a5 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c @@ -358,7 +358,7 @@ static const struct atmphy_ops idt77105_ops = { }; -int __devinit idt77105_init(struct atm_dev *dev) +int idt77105_init(struct atm_dev *dev) { dev->phy = &idt77105_ops; return 0; diff --git a/drivers/atm/idt77105.h b/drivers/atm/idt77105.h index 3fd2bc899..8ba8218aa 100644 --- a/drivers/atm/idt77105.h +++ b/drivers/atm/idt77105.h @@ -76,7 +76,7 @@ #define IDT77105_CTRSEL_RHEC 0x01 /* W, Rx HEC Error Counter */ #ifdef __KERNEL__ -int idt77105_init(struct atm_dev *dev); +int idt77105_init(struct atm_dev *dev) __init; #endif /* diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b0369bb20..b4a76cade 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c @@ -34,8 +34,8 @@ static char const rcsid[] = #include +#include #include -#include #include #include #include @@ -3387,7 +3387,7 @@ init_card(struct atm_dev *dev) writel(SAR_STAT_TMROF, SAR_REG_STAT); } IPRINTK("%s: Request IRQ ... ", card->name); - if (request_irq(pcidev->irq, idt77252_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pcidev->irq, idt77252_interrupt, SA_INTERRUPT|SA_SHIRQ, card->name, card) != 0) { printk("%s: can't allocate IRQ.\n", card->name); deinit_card(card); @@ -3658,7 +3658,7 @@ probe_sram(struct idt77252_dev *card) writel(SAR_CMD_WRITE_SRAM | (0 << 2), SAR_REG_CMD); for (addr = 0x4000; addr < 0x80000; addr += 0x4000) { - writel(ATM_POISON, SAR_REG_DR0); + writel(0xdeadbeef, SAR_REG_DR0); writel(SAR_CMD_WRITE_SRAM | (addr << 2), SAR_REG_CMD); writel(SAR_CMD_READ_SRAM | (0 << 2), SAR_REG_CMD); diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index f20b0b2c0..2e2e50e11 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -2284,7 +2284,7 @@ static int reset_sar(struct atm_dev *dev) } -static int __devinit ia_init(struct atm_dev *dev) +static int __init ia_init(struct atm_dev *dev) { IADEV *iadev; unsigned long real_base; @@ -2480,7 +2480,7 @@ static void ia_free_rx(IADEV *iadev) iadev->rx_dle_dma); } -static int __devinit ia_start(struct atm_dev *dev) +static int __init ia_start(struct atm_dev *dev) { IADEV *iadev; int error; @@ -2488,7 +2488,7 @@ static int __devinit ia_start(struct atm_dev *dev) u32 ctrl_reg; IF_EVENT(printk(">ia_start\n");) iadev = INPH_IA_DEV(dev); - if (request_irq(iadev->irq, &ia_int, IRQF_SHARED, DEV_LABEL, dev)) { + if (request_irq(iadev->irq, &ia_int, SA_SHIRQ, DEV_LABEL, dev)) { printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", dev->number, iadev->irq); error = -EAGAIN; diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index 133eefcc0..b8d0bd4d6 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h @@ -43,6 +43,7 @@ #ifndef IPHASE_H #define IPHASE_H +#include /************************ IADBG DEFINE *********************************/ /* IADebugFlag Bit Map */ diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index fe60a59b7..cac09e353 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c @@ -2240,7 +2240,7 @@ static int __devinit lanai_dev_open(struct atm_dev *atmdev) conf2_write(lanai); reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg); reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */ - if ((result = request_irq(lanai->pci->irq, lanai_int, IRQF_SHARED, + if ((result = request_irq(lanai->pci->irq, lanai_int, SA_SHIRQ, DEV_LABEL, lanai)) != 0) { printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); goto error_vcctable; diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index b8036899e..074abc81e 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c @@ -36,6 +36,7 @@ /* Header files ***************************************************************/ #include +#include #include #include #include @@ -625,7 +626,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) if (mac[i] == NULL) nicstar_init_eprom(card->membase); - if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0) + if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) { printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); error = 9; diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c index f04f39c00..b1d063cc4 100644 --- a/drivers/atm/suni.c +++ b/drivers/atm/suni.c @@ -289,7 +289,7 @@ static const struct atmphy_ops suni_ops = { }; -int __devinit suni_init(struct atm_dev *dev) +int suni_init(struct atm_dev *dev) { unsigned char mri; diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 2c65e82f0..f484747f2 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c @@ -3,6 +3,7 @@ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ +#include #include #include #include @@ -1270,7 +1271,7 @@ static int __init zatm_start(struct atm_dev *dev) zatm_dev->rx_map = zatm_dev->tx_map = NULL; for (i = 0; i < NR_MBX; i++) zatm_dev->mbx_start[i] = 0; - error = request_irq(zatm_dev->irq, zatm_int, IRQF_SHARED, DEV_LABEL, dev); + error = request_irq(zatm_dev->irq, zatm_int, SA_SHIRQ, DEV_LABEL, dev); if (error < 0) { printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", dev->number,zatm_dev->irq); diff --git a/drivers/atm/zatm.h b/drivers/atm/zatm.h index ae9165ce1..416fe0fda 100644 --- a/drivers/atm/zatm.h +++ b/drivers/atm/zatm.h @@ -6,6 +6,7 @@ #ifndef DRIVER_ATM_ZATM_H #define DRIVER_ATM_ZATM_H +#include #include #include #include diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 0b4e22436..f0eff3dac 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -20,7 +20,7 @@ config PREVENT_FIRMWARE_BUILD config FW_LOADER tristate "Userspace firmware loading support" - depends on HOTPLUG + select HOTPLUG ---help--- This option is provided for the case where no in-kernel-tree modules require userspace firmware loading support, but a module built outside @@ -38,7 +38,3 @@ config DEBUG_DRIVER If you are unsure about this, say N here. endmenu - -config SYS_HYPERVISOR - bool - default n diff --git a/drivers/base/Makefile b/drivers/base/Makefile index b539e5e75..e99471d32 100644 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@ -5,12 +5,10 @@ obj-y := core.o sys.o bus.o dd.o \ cpu.o firmware.o init.o map.o dmapool.o \ attribute_container.o transport_class.o obj-y += power/ -obj-$(CONFIG_ISA) += isa.o obj-$(CONFIG_FW_LOADER) += firmware_class.o obj-$(CONFIG_NUMA) += node.o obj-$(CONFIG_MEMORY_HOTPLUG) += memory.o obj-$(CONFIG_SMP) += topology.o -obj-$(CONFIG_SYS_HYPERVISOR) += hypervisor.o ifeq ($(CONFIG_DEBUG_DRIVER),y) EXTRA_CFLAGS += -DDEBUG diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 22220733f..2a7d7ae83 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c @@ -236,6 +236,7 @@ attribute_container_remove_device(struct device *dev, } up(&attribute_container_mutex); } +EXPORT_SYMBOL_GPL(attribute_container_remove_device); /** * attribute_container_device_trigger - execute a trigger for each matching classdev @@ -275,6 +276,7 @@ attribute_container_device_trigger(struct device *dev, } up(&attribute_container_mutex); } +EXPORT_SYMBOL_GPL(attribute_container_device_trigger); /** * attribute_container_trigger - trigger a function for each matching container @@ -302,6 +304,7 @@ attribute_container_trigger(struct device *dev, } up(&attribute_container_mutex); } +EXPORT_SYMBOL_GPL(attribute_container_trigger); /** * attribute_container_add_attrs - add attributes @@ -330,6 +333,7 @@ attribute_container_add_attrs(struct class_device *classdev) return 0; } +EXPORT_SYMBOL_GPL(attribute_container_add_attrs); /** * attribute_container_add_class_device - same function as class_device_add @@ -348,6 +352,7 @@ attribute_container_add_class_device(struct class_device *classdev) return error; return attribute_container_add_attrs(classdev); } +EXPORT_SYMBOL_GPL(attribute_container_add_class_device); /** * attribute_container_add_class_device_adapter - simple adapter for triggers @@ -362,6 +367,7 @@ attribute_container_add_class_device_adapter(struct attribute_container *cont, { return attribute_container_add_class_device(classdev); } +EXPORT_SYMBOL_GPL(attribute_container_add_class_device_adapter); /** * attribute_container_remove_attrs - remove any attribute files @@ -383,6 +389,7 @@ attribute_container_remove_attrs(struct class_device *classdev) for (i = 0; attrs[i]; i++) class_device_remove_file(classdev, attrs[i]); } +EXPORT_SYMBOL_GPL(attribute_container_remove_attrs); /** * attribute_container_class_device_del - equivalent of class_device_del @@ -398,6 +405,7 @@ attribute_container_class_device_del(struct class_device *classdev) attribute_container_remove_attrs(classdev); class_device_del(classdev); } +EXPORT_SYMBOL_GPL(attribute_container_class_device_del); /** * attribute_container_find_class_device - find the corresponding class_device diff --git a/drivers/base/base.h b/drivers/base/base.h index c3b8dc98b..5735b3858 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -5,21 +5,13 @@ extern int devices_init(void); extern int buses_init(void); extern int classes_init(void); extern int firmware_init(void); -#ifdef CONFIG_SYS_HYPERVISOR -extern int hypervisor_init(void); -#else -static inline int hypervisor_init(void) { return 0; } -#endif extern int platform_bus_init(void); extern int system_bus_init(void); extern int cpu_dev_init(void); extern int attribute_container_init(void); extern int bus_add_device(struct device * dev); -extern void bus_attach_device(struct device * dev); extern void bus_remove_device(struct device * dev); -extern struct bus_type *get_bus(struct bus_type * bus); -extern void put_bus(struct bus_type * bus); extern int bus_add_driver(struct device_driver *); extern void bus_remove_driver(struct device_driver *); @@ -42,5 +34,4 @@ struct class_device_attribute *to_class_dev_attr(struct attribute *_attr) return container_of(_attr, struct class_device_attribute, attr); } -extern char *make_class_name(const char *name, struct kobject *kobj); diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 2e954d071..76656acd0 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -129,7 +130,7 @@ static struct kobj_type ktype_bus = { }; -static decl_subsys(bus, &ktype_bus, NULL); +decl_subsys(bus, &ktype_bus, NULL); #ifdef CONFIG_HOTPLUG @@ -361,7 +362,8 @@ static void device_remove_attrs(struct bus_type * bus, struct device * dev) * @dev: device being added * * - Add the device to its bus's list of devices. - * - Create link to device's bus. + * - Try to attach to driver. + * - Create link to device's physical location. */ int bus_add_device(struct device * dev) { @@ -370,32 +372,17 @@ int bus_add_device(struct device * dev) if (bus) { pr_debug("bus %s: add device %s\n", bus->name, dev->bus_id); + device_attach(dev); + klist_add_tail(&dev->knode_bus, &bus->klist_devices); error = device_add_attrs(bus, dev); if (!error) { sysfs_create_link(&bus->devices.kobj, &dev->kobj, dev->bus_id); - sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "subsystem"); sysfs_create_link(&dev->kobj, &dev->bus->subsys.kset.kobj, "bus"); } } return error; } -/** - * bus_attach_device - add device to bus - * @dev: device tried to attach to a driver - * - * - Try to attach to driver. - */ -void bus_attach_device(struct device * dev) -{ - struct bus_type * bus = dev->bus; - - if (bus) { - device_attach(dev); - klist_add_tail(&dev->knode_bus, &bus->klist_devices); - } -} - /** * bus_remove_device - remove device from bus * @dev: device to be removed @@ -408,7 +395,6 @@ void bus_attach_device(struct device * dev) void bus_remove_device(struct device * dev) { if (dev->bus) { - sysfs_remove_link(&dev->kobj, "subsystem"); sysfs_remove_link(&dev->kobj, "bus"); sysfs_remove_link(&dev->bus->devices.kobj, dev->bus_id); device_remove_attrs(dev->bus, dev); @@ -598,13 +584,12 @@ void put_bus(struct bus_type * bus) * * Note that kset_find_obj increments bus' reference count. */ -#if 0 + struct bus_type * find_bus(char * name) { struct kobject * k = kset_find_obj(&bus_subsys.kset, name); return k ? to_bus(k) : NULL; } -#endif /* 0 */ /** @@ -747,9 +732,14 @@ EXPORT_SYMBOL_GPL(bus_for_each_dev); EXPORT_SYMBOL_GPL(bus_find_device); EXPORT_SYMBOL_GPL(bus_for_each_drv); +EXPORT_SYMBOL_GPL(bus_add_device); +EXPORT_SYMBOL_GPL(bus_remove_device); EXPORT_SYMBOL_GPL(bus_register); EXPORT_SYMBOL_GPL(bus_unregister); EXPORT_SYMBOL_GPL(bus_rescan_devices); +EXPORT_SYMBOL_GPL(get_bus); +EXPORT_SYMBOL_GPL(put_bus); +EXPORT_SYMBOL_GPL(find_bus); EXPORT_SYMBOL_GPL(bus_create_file); EXPORT_SYMBOL_GPL(bus_remove_file); diff --git a/drivers/base/class.c b/drivers/base/class.c index de8908320..b1ea4df85 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -90,14 +91,14 @@ void class_remove_file(struct class * cls, const struct class_attribute * attr) sysfs_remove_file(&cls->subsys.kset.kobj, &attr->attr); } -static struct class *class_get(struct class *cls) +struct class * class_get(struct class * cls) { if (cls) return container_of(subsys_get(&cls->subsys), struct class, subsys); return NULL; } -static void class_put(struct class * cls) +void class_put(struct class * cls) { if (cls) subsys_put(&cls->subsys); @@ -141,7 +142,6 @@ int class_register(struct class * cls) pr_debug("device class '%s': registering\n", cls->name); INIT_LIST_HEAD(&cls->children); - INIT_LIST_HEAD(&cls->devices); INIT_LIST_HEAD(&cls->interfaces); init_MUTEX(&cls->sem); error = kobject_set_name(&cls->subsys.kset.kobj, "%s", cls->name); @@ -504,21 +504,22 @@ void class_device_initialize(struct class_device *class_dev) INIT_LIST_HEAD(&class_dev->node); } -char *make_class_name(const char *name, struct kobject *kobj) +static char *make_class_name(struct class_device *class_dev) { - char *class_name; + char *name; int size; - size = strlen(name) + strlen(kobject_name(kobj)) + 2; + size = strlen(class_dev->class->name) + + strlen(kobject_name(&class_dev->kobj)) + 2; - class_name = kmalloc(size, GFP_KERNEL); - if (!class_name) + name = kmalloc(size, GFP_KERNEL); + if (!name) return ERR_PTR(-ENOMEM); - strcpy(class_name, name); - strcat(class_name, ":"); - strcat(class_name, kobject_name(kobj)); - return class_name; + strcpy(name, class_dev->class->name); + strcat(name, ":"); + strcat(name, kobject_name(&class_dev->kobj)); + return name; } int class_device_add(struct class_device *class_dev) @@ -534,22 +535,18 @@ int class_device_add(struct class_device *class_dev) return -EINVAL; if (!strlen(class_dev->class_id)) - goto out1; + goto register_done; parent_class = class_get(class_dev->class); if (!parent_class) - goto out1; - + goto register_done; parent_class_dev = class_device_get(class_dev->parent); pr_debug("CLASS: registering class device: ID = '%s'\n", class_dev->class_id); /* first, register with generic layer. */ - error = kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id); - if (error) - goto out2; - + kobject_set_name(&class_dev->kobj, "%s", class_dev->class_id); if (parent_class_dev) class_dev->kobj.parent = &parent_class_dev->kobj; else @@ -557,58 +554,41 @@ int class_device_add(struct class_device *class_dev) error = kobject_add(&class_dev->kobj); if (error) - goto out2; + goto register_done; /* add the needed attributes to this device */ - sysfs_create_link(&class_dev->kobj, &parent_class->subsys.kset.kobj, "subsystem"); class_dev->uevent_attr.attr.name = "uevent"; class_dev->uevent_attr.attr.mode = S_IWUSR; class_dev->uevent_attr.attr.owner = parent_class->owner; class_dev->uevent_attr.store = store_uevent; - error = class_device_create_file(class_dev, &class_dev->uevent_attr); - if (error) - goto out3; + class_device_create_file(class_dev, &class_dev->uevent_attr); if (MAJOR(class_dev->devt)) { struct class_device_attribute *attr; attr = kzalloc(sizeof(*attr), GFP_KERNEL); if (!attr) { error = -ENOMEM; - goto out4; + kobject_del(&class_dev->kobj); + goto register_done; } attr->attr.name = "dev"; attr->attr.mode = S_IRUGO; attr->attr.owner = parent_class->owner; attr->show = show_dev; - error = class_device_create_file(class_dev, attr); - if (error) { - kfree(attr); - goto out4; - } - + class_device_create_file(class_dev, attr); class_dev->devt_attr = attr; } - error = class_device_add_attrs(class_dev); - if (error) - goto out5; - + class_device_add_attrs(class_dev); if (class_dev->dev) { - class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); - error = sysfs_create_link(&class_dev->kobj, - &class_dev->dev->kobj, "device"); - if (error) - goto out6; - error = sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj, - class_name); - if (error) - goto out7; + class_name = make_class_name(class_dev); + sysfs_create_link(&class_dev->kobj, + &class_dev->dev->kobj, "device"); + sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj, + class_name); } - error = class_device_add_groups(class_dev); - if (error) - goto out8; + class_device_add_groups(class_dev); kobject_uevent(&class_dev->kobj, KOBJ_ADD); @@ -621,28 +601,11 @@ int class_device_add(struct class_device *class_dev) } up(&parent_class->sem); - goto out1; - - out8: - if (class_dev->dev) - sysfs_remove_link(&class_dev->kobj, class_name); - out7: - if (class_dev->dev) - sysfs_remove_link(&class_dev->kobj, "device"); - out6: - class_device_remove_attrs(class_dev); - out5: - if (class_dev->devt_attr) - class_device_remove_file(class_dev, class_dev->devt_attr); - out4: - class_device_remove_file(class_dev, &class_dev->uevent_attr); - out3: - kobject_del(&class_dev->kobj); - out2: - if(parent_class_dev) + register_done: + if (error) { + class_put(parent_class); class_device_put(parent_class_dev); - class_put(parent_class); - out1: + } class_device_put(class_dev); kfree(class_name); return error; @@ -732,12 +695,10 @@ void class_device_del(struct class_device *class_dev) } if (class_dev->dev) { - class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); + class_name = make_class_name(class_dev); sysfs_remove_link(&class_dev->kobj, "device"); sysfs_remove_link(&class_dev->dev->kobj, class_name); } - sysfs_remove_link(&class_dev->kobj, "subsystem"); class_device_remove_file(class_dev, &class_dev->uevent_attr); if (class_dev->devt_attr) class_device_remove_file(class_dev, class_dev->devt_attr); @@ -799,16 +760,14 @@ int class_device_rename(struct class_device *class_dev, char *new_name) new_name); if (class_dev->dev) - old_class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); + old_class_name = make_class_name(class_dev); strlcpy(class_dev->class_id, new_name, KOBJ_NAME_LEN); error = kobject_rename(&class_dev->kobj, new_name); if (class_dev->dev) { - new_class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); + new_class_name = make_class_name(class_dev); sysfs_create_link(&class_dev->dev->kobj, &class_dev->kobj, new_class_name); sysfs_remove_link(&class_dev->dev->kobj, old_class_name); @@ -899,6 +858,8 @@ EXPORT_SYMBOL_GPL(class_create_file); EXPORT_SYMBOL_GPL(class_remove_file); EXPORT_SYMBOL_GPL(class_register); EXPORT_SYMBOL_GPL(class_unregister); +EXPORT_SYMBOL_GPL(class_get); +EXPORT_SYMBOL_GPL(class_put); EXPORT_SYMBOL_GPL(class_create); EXPORT_SYMBOL_GPL(class_destroy); diff --git a/drivers/base/core.c b/drivers/base/core.c index be6b5bc06..6b355bd78 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -8,13 +8,13 @@ * */ +#include #include #include #include #include #include #include -#include #include @@ -28,22 +28,6 @@ int (*platform_notify_remove)(struct device * dev) = NULL; * sysfs bindings for devices. */ -/** - * dev_driver_string - Return a device's driver name, if at all possible - * @dev: struct device to get the name of - * - * Will return the device's driver's name if it is bound to a device. If - * the device is not bound to a device, it will return the name of the bus - * it is attached to. If it is not attached to a bus either, an empty - * string will be returned. - */ -const char *dev_driver_string(struct device *dev) -{ - return dev->driver ? dev->driver->name : - (dev->bus ? dev->bus->name : ""); -} -EXPORT_SYMBOL_GPL(dev_driver_string); - #define to_dev(obj) container_of(obj, struct device, kobj) #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr) @@ -114,8 +98,6 @@ static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) struct device *dev = to_dev(kobj); if (dev->bus) return 1; - if (dev->class) - return 1; } return 0; } @@ -124,11 +106,7 @@ static const char *dev_uevent_name(struct kset *kset, struct kobject *kobj) { struct device *dev = to_dev(kobj); - if (dev->bus) - return dev->bus->name; - if (dev->class) - return dev->class->name; - return NULL; + return dev->bus->name; } static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp, @@ -139,16 +117,6 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, char **envp, int length = 0; int retval = 0; - /* add the major/minor if present */ - if (MAJOR(dev->devt)) { - add_uevent_var(envp, num_envp, &i, - buffer, buffer_size, &length, - "MAJOR=%u", MAJOR(dev->devt)); - add_uevent_var(envp, num_envp, &i, - buffer, buffer_size, &length, - "MINOR=%u", MINOR(dev->devt)); - } - /* add bus name of physical device */ if (dev->bus) add_uevent_var(envp, num_envp, &i, @@ -193,12 +161,6 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr, return count; } -static ssize_t show_dev(struct device *dev, struct device_attribute *attr, - char *buf) -{ - return print_dev_t(buf, dev->devt); -} - /* * devices_subsys - structure to be registered with kobject core. */ @@ -269,7 +231,6 @@ void device_initialize(struct device *dev) klist_init(&dev->klist_children, klist_children_get, klist_children_put); INIT_LIST_HEAD(&dev->dma_pools); - INIT_LIST_HEAD(&dev->node); init_MUTEX(&dev->sem); device_init_wakeup(dev, 0); } @@ -288,7 +249,6 @@ void device_initialize(struct device *dev) int device_add(struct device *dev) { struct device *parent = NULL; - char *class_name = NULL; int error = -EINVAL; dev = get_device(dev); @@ -314,69 +274,23 @@ int device_add(struct device *dev) dev->uevent_attr.store = store_uevent; device_create_file(dev, &dev->uevent_attr); - if (MAJOR(dev->devt)) { - struct device_attribute *attr; - attr = kzalloc(sizeof(*attr), GFP_KERNEL); - if (!attr) { - error = -ENOMEM; - goto PMError; - } - attr->attr.name = "dev"; - attr->attr.mode = S_IRUGO; - if (dev->driver) - attr->attr.owner = dev->driver->owner; - attr->show = show_dev; - error = device_create_file(dev, attr); - if (error) { - kfree(attr); - goto attrError; - } - - dev->devt_attr = attr; - } - - if (dev->class) { - sysfs_create_link(&dev->kobj, &dev->class->subsys.kset.kobj, - "subsystem"); - sysfs_create_link(&dev->class->subsys.kset.kobj, &dev->kobj, - dev->bus_id); - - sysfs_create_link(&dev->kobj, &dev->parent->kobj, "device"); - class_name = make_class_name(dev->class->name, &dev->kobj); - sysfs_create_link(&dev->parent->kobj, &dev->kobj, class_name); - } - + kobject_uevent(&dev->kobj, KOBJ_ADD); if ((error = device_pm_add(dev))) goto PMError; if ((error = bus_add_device(dev))) goto BusError; - kobject_uevent(&dev->kobj, KOBJ_ADD); - bus_attach_device(dev); if (parent) klist_add_tail(&dev->knode_parent, &parent->klist_children); - if (dev->class) { - /* tie the class to the device */ - down(&dev->class->sem); - list_add_tail(&dev->node, &dev->class->devices); - up(&dev->class->sem); - } - /* notify platform of device entry */ if (platform_notify) platform_notify(dev); Done: - kfree(class_name); put_device(dev); return error; BusError: device_pm_remove(dev); PMError: - if (dev->devt_attr) { - device_remove_file(dev, dev->devt_attr); - kfree(dev->devt_attr); - } - attrError: kobject_uevent(&dev->kobj, KOBJ_REMOVE); kobject_del(&dev->kobj); Error: @@ -448,23 +362,9 @@ void put_device(struct device * dev) void device_del(struct device * dev) { struct device * parent = dev->parent; - char *class_name = NULL; if (parent) klist_del(&dev->knode_parent); - if (dev->devt_attr) - device_remove_file(dev, dev->devt_attr); - if (dev->class) { - sysfs_remove_link(&dev->kobj, "subsystem"); - sysfs_remove_link(&dev->class->subsys.kset.kobj, dev->bus_id); - class_name = make_class_name(dev->class->name, &dev->kobj); - sysfs_remove_link(&dev->kobj, "device"); - sysfs_remove_link(&dev->parent->kobj, class_name); - kfree(class_name); - down(&dev->class->sem); - list_del_init(&dev->node); - up(&dev->class->sem); - } device_remove_file(dev, &dev->uevent_attr); /* Notify the platform of the removal, in case they @@ -549,98 +449,3 @@ EXPORT_SYMBOL_GPL(put_device); EXPORT_SYMBOL_GPL(device_create_file); EXPORT_SYMBOL_GPL(device_remove_file); - - -static void device_create_release(struct device *dev) -{ - pr_debug("%s called for %s\n", __FUNCTION__, dev->bus_id); - kfree(dev); -} - -/** - * device_create - creates a device and registers it with sysfs - * @class: pointer to the struct class that this device should be registered to - * @parent: pointer to the parent struct device of this new device, if any - * @devt: the dev_t for the char device to be added - * @fmt: string for the device's name - * - * This function can be used by char device classes. A struct device - * will be created in sysfs, registered to the specified class. - * - * A "dev" file will be created, showing the dev_t for the device, if - * the dev_t is not 0,0. - * If a pointer to a parent struct device is passed in, the newly created - * struct device will be a child of that device in sysfs. - * The pointer to the struct device will be returned from the call. - * Any further sysfs files that might be required can be created using this - * pointer. - * - * Note: the struct class passed to this function must have previously - * been created with a call to class_create(). - */ -struct device *device_create(struct class *class, struct device *parent, - dev_t devt, char *fmt, ...) -{ - va_list args; - struct device *dev = NULL; - int retval = -ENODEV; - - if (class == NULL || IS_ERR(class)) - goto error; - if (parent == NULL) { - printk(KERN_WARNING "%s does not work yet for NULL parents\n", __FUNCTION__); - goto error; - } - - dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - retval = -ENOMEM; - goto error; - } - - dev->devt = devt; - dev->class = class; - dev->parent = parent; - dev->release = device_create_release; - - va_start(args, fmt); - vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args); - va_end(args); - retval = device_register(dev); - if (retval) - goto error; - - return dev; - -error: - kfree(dev); - return ERR_PTR(retval); -} -EXPORT_SYMBOL_GPL(device_create); - -/** - * device_destroy - removes a device that was created with device_create() - * @class: pointer to the struct class that this device was registered with - * @devt: the dev_t of the device that was previously registered - * - * This call unregisters and cleans up a device that was created with a - * call to device_create(). - */ -void device_destroy(struct class *class, dev_t devt) -{ - struct device *dev = NULL; - struct device *dev_tmp; - - down(&class->sem); - list_for_each_entry(dev_tmp, &class->devices, node) { - if (dev_tmp->devt == devt) { - dev = dev_tmp; - break; - } - } - up(&class->sem); - - if (dev) - device_unregister(dev); -} -EXPORT_SYMBOL_GPL(device_destroy); diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 4bef76a2f..dd712b24e 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -8,7 +8,6 @@ #include #include #include -#include #include "base.h" @@ -58,12 +57,13 @@ static void __devinit register_cpu_control(struct cpu *cpu) { sysdev_create_file(&cpu->sysdev, &attr_online); } -void unregister_cpu(struct cpu *cpu) +void unregister_cpu(struct cpu *cpu, struct node *root) { int logical_cpu = cpu->sysdev.id; - unregister_cpu_under_node(logical_cpu, cpu_to_node(logical_cpu)); - + if (root) + sysfs_remove_link(&root->sysdev.kobj, + kobject_name(&cpu->sysdev.kobj)); sysdev_remove_file(&cpu->sysdev, &attr_online); sysdev_unregister(&cpu->sysdev); @@ -109,21 +109,23 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL); * * Initialize and register the CPU device. */ -int __devinit register_cpu(struct cpu *cpu, int num) +int __devinit register_cpu(struct cpu *cpu, int num, struct node *root) { int error; + cpu->node_id = cpu_to_node(num); cpu->sysdev.id = num; cpu->sysdev.cls = &cpu_sysdev_class; error = sysdev_register(&cpu->sysdev); - + if (!error && root) + error = sysfs_create_link(&root->sysdev.kobj, + &cpu->sysdev.kobj, + kobject_name(&cpu->sysdev.kobj)); if (!error && !cpu->no_control) register_cpu_control(cpu); if (!error) cpu_sys_devices[num] = &cpu->sysdev; - if (!error) - register_cpu_under_node(num, cpu_to_node(num)); #ifdef CONFIG_KEXEC if (!error) @@ -143,13 +145,5 @@ EXPORT_SYMBOL_GPL(get_cpu_sysdev); int __init cpu_dev_init(void) { - int err; - - err = sysdev_class_register(&cpu_sysdev_class); -#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) - if (!err) - err = sched_create_sysfs_power_savings_entries(&cpu_sysdev_class); -#endif - - return err; + return sysdev_class_register(&cpu_sysdev_class); } diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c index 33c5cce15..e2f64f91e 100644 --- a/drivers/base/dmapool.c +++ b/drivers/base/dmapool.c @@ -7,7 +7,6 @@ #include #include #include -#include /* * Pool allocator ... wraps the dma_alloc_coherent page allocator, so @@ -36,6 +35,8 @@ struct dma_page { /* cacheable header for 'allocation' bytes */ }; #define POOL_TIMEOUT_JIFFIES ((100 /* msec */ * HZ) / 1000) +#define POOL_POISON_FREED 0xa7 /* !inuse */ +#define POOL_POISON_ALLOCATED 0xa9 /* !initted */ static DECLARE_MUTEX (pools_lock); diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 562600dd5..b400314e1 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index f140412ef..e4c716c78 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include "base.h" @@ -36,7 +36,7 @@ static int loading_timeout = 60; /* In seconds */ /* fw_lock could be moved to 'struct firmware_priv' but since it is just * guarding for corner cases a global lock should be OK */ -static DEFINE_MUTEX(fw_lock); +static DECLARE_MUTEX(fw_lock); struct firmware_priv { char fw_id[FIRMWARE_NAME_MAX]; @@ -142,9 +142,9 @@ firmware_loading_store(struct class_device *class_dev, switch (loading) { case 1: - mutex_lock(&fw_lock); + down(&fw_lock); if (!fw_priv->fw) { - mutex_unlock(&fw_lock); + up(&fw_lock); break; } vfree(fw_priv->fw->data); @@ -152,7 +152,7 @@ firmware_loading_store(struct class_device *class_dev, fw_priv->fw->size = 0; fw_priv->alloc_size = 0; set_bit(FW_STATUS_LOADING, &fw_priv->status); - mutex_unlock(&fw_lock); + up(&fw_lock); break; case 0: if (test_bit(FW_STATUS_LOADING, &fw_priv->status)) { @@ -185,7 +185,7 @@ firmware_data_read(struct kobject *kobj, struct firmware *fw; ssize_t ret_count = count; - mutex_lock(&fw_lock); + down(&fw_lock); fw = fw_priv->fw; if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) { ret_count = -ENODEV; @@ -200,7 +200,7 @@ firmware_data_read(struct kobject *kobj, memcpy(buffer, fw->data + offset, ret_count); out: - mutex_unlock(&fw_lock); + up(&fw_lock); return ret_count; } @@ -253,7 +253,7 @@ firmware_data_write(struct kobject *kobj, if (!capable(CAP_SYS_RAWIO)) return -EPERM; - mutex_lock(&fw_lock); + down(&fw_lock); fw = fw_priv->fw; if (!fw || test_bit(FW_STATUS_DONE, &fw_priv->status)) { retval = -ENODEV; @@ -268,7 +268,7 @@ firmware_data_write(struct kobject *kobj, fw->size = max_t(size_t, offset + count, fw->size); retval = count; out: - mutex_unlock(&fw_lock); + up(&fw_lock); return retval; } @@ -436,14 +436,14 @@ _request_firmware(const struct firmware **firmware_p, const char *name, } else wait_for_completion(&fw_priv->completion); - mutex_lock(&fw_lock); + down(&fw_lock); if (!fw_priv->fw->size || test_bit(FW_STATUS_ABORT, &fw_priv->status)) { retval = -ENOENT; release_firmware(fw_priv->fw); *firmware_p = NULL; } fw_priv->fw = NULL; - mutex_unlock(&fw_lock); + up(&fw_lock); class_device_unregister(class_dev); goto out; diff --git a/drivers/base/hypervisor.c b/drivers/base/hypervisor.c deleted file mode 100644 index 0c85e9d6a..000000000 --- a/drivers/base/hypervisor.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * hypervisor.c - /sys/hypervisor subsystem. - * - * This file is released under the GPLv2 - * - */ - -#include -#include - -#include "base.h" - -decl_subsys(hypervisor, NULL, NULL); -EXPORT_SYMBOL_GPL(hypervisor_subsys); - -int __init hypervisor_init(void) -{ - return subsystem_register(&hypervisor_subsys); -} diff --git a/drivers/base/init.c b/drivers/base/init.c index 37138154f..c648914b9 100644 --- a/drivers/base/init.c +++ b/drivers/base/init.c @@ -27,7 +27,6 @@ void __init driver_init(void) buses_init(); classes_init(); firmware_init(); - hypervisor_init(); /* These are also core pieces, but must come after the * core core pieces. diff --git a/drivers/base/isa.c b/drivers/base/isa.c deleted file mode 100644 index d2222397a..000000000 --- a/drivers/base/isa.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * ISA bus. - */ - -#include -#include -#include -#include -#include -#include - -static struct device isa_bus = { - .bus_id = "isa" -}; - -struct isa_dev { - struct device dev; - struct device *next; - unsigned int id; -}; - -#define to_isa_dev(x) container_of((x), struct isa_dev, dev) - -static int isa_bus_match(struct device *dev, struct device_driver *driver) -{ - struct isa_driver *isa_driver = to_isa_driver(driver); - - if (dev->platform_data == isa_driver) { - if (!isa_driver->match || - isa_driver->match(dev, to_isa_dev(dev)->id)) - return 1; - dev->platform_data = NULL; - } - return 0; -} - -static int isa_bus_probe(struct device *dev) -{ - struct isa_driver *isa_driver = dev->platform_data; - - if (isa_driver->probe) - return isa_driver->probe(dev, to_isa_dev(dev)->id); - - return 0; -} - -static int isa_bus_remove(struct device *dev) -{ - struct isa_driver *isa_driver = dev->platform_data; - - if (isa_driver->remove) - return isa_driver->remove(dev, to_isa_dev(dev)->id); - - return 0; -} - -static void isa_bus_shutdown(struct device *dev) -{ - struct isa_driver *isa_driver = dev->platform_data; - - if (isa_driver->shutdown) - isa_driver->shutdown(dev, to_isa_dev(dev)->id); -} - -static int isa_bus_suspend(struct device *dev, pm_message_t state) -{ - struct isa_driver *isa_driver = dev->platform_data; - - if (isa_driver->suspend) - return isa_driver->suspend(dev, to_isa_dev(dev)->id, state); - - return 0; -} - -static int isa_bus_resume(struct device *dev) -{ - struct isa_driver *isa_driver = dev->platform_data; - - if (isa_driver->resume) - return isa_driver->resume(dev, to_isa_dev(dev)->id); - - return 0; -} - -static struct bus_type isa_bus_type = { - .name = "isa", - .match = isa_bus_match, - .probe = isa_bus_probe, - .remove = isa_bus_remove, - .shutdown = isa_bus_shutdown, - .suspend = isa_bus_suspend, - .resume = isa_bus_resume -}; - -static void isa_dev_release(struct device *dev) -{ - kfree(to_isa_dev(dev)); -} - -void isa_unregister_driver(struct isa_driver *isa_driver) -{ - struct device *dev = isa_driver->devices; - - while (dev) { - struct device *tmp = to_isa_dev(dev)->next; - device_unregister(dev); - dev = tmp; - } - driver_unregister(&isa_driver->driver); -} -EXPORT_SYMBOL_GPL(isa_unregister_driver); - -int isa_register_driver(struct isa_driver *isa_driver, unsigned int ndev) -{ - int error; - unsigned int id; - - isa_driver->driver.bus = &isa_bus_type; - isa_driver->devices = NULL; - - error = driver_register(&isa_driver->driver); - if (error) - return error; - - for (id = 0; id < ndev; id++) { - struct isa_dev *isa_dev; - - isa_dev = kzalloc(sizeof *isa_dev, GFP_KERNEL); - if (!isa_dev) { - error = -ENOMEM; - break; - } - - isa_dev->dev.parent = &isa_bus; - isa_dev->dev.bus = &isa_bus_type; - - snprintf(isa_dev->dev.bus_id, BUS_ID_SIZE, "%s.%u", - isa_driver->driver.name, id); - - isa_dev->dev.platform_data = isa_driver; - isa_dev->dev.release = isa_dev_release; - isa_dev->id = id; - - error = device_register(&isa_dev->dev); - if (error) { - put_device(&isa_dev->dev); - break; - } - - if (isa_dev->dev.platform_data) { - isa_dev->next = isa_driver->devices; - isa_driver->devices = &isa_dev->dev; - } else - device_unregister(&isa_dev->dev); - } - - if (!error && !isa_driver->devices) - error = -ENODEV; - - if (error) - isa_unregister_driver(isa_driver); - - return error; -} -EXPORT_SYMBOL_GPL(isa_register_driver); - -static int __init isa_bus_init(void) -{ - int error; - - error = bus_register(&isa_bus_type); - if (!error) { - error = device_register(&isa_bus); - if (error) - bus_unregister(&isa_bus_type); - } - return error; -} - -device_initcall(isa_bus_init); diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c6b7d9c4b..dd547af46 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -306,13 +306,11 @@ static ssize_t memory_probe_store(struct class *class, const char *buf, size_t count) { u64 phys_addr; - int nid; int ret; phys_addr = simple_strtoull(buf, NULL, 0); - nid = memory_add_physaddr_to_nid(phys_addr); - ret = add_memory(nid, phys_addr, PAGES_PER_SECTION << PAGE_SHIFT); + ret = add_memory(phys_addr, PAGES_PER_SECTION << PAGE_SHIFT); if (ret) count = ret; diff --git a/drivers/base/node.c b/drivers/base/node.c index e9b0957f1..c80c3aeed 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -11,7 +11,6 @@ #include #include #include -#include static struct sysdev_class node_class = { set_kset_name("node"), @@ -40,13 +39,24 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) int n; int nid = dev->id; struct sysinfo i; + struct page_state ps; unsigned long inactive; unsigned long active; unsigned long free; si_meminfo_node(&i, nid); + get_page_state_node(&ps, nid); __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); + /* Check for negative values in these approximate counters */ + if ((long)ps.nr_dirty < 0) + ps.nr_dirty = 0; + if ((long)ps.nr_writeback < 0) + ps.nr_writeback = 0; + if ((long)ps.nr_mapped < 0) + ps.nr_mapped = 0; + if ((long)ps.nr_slab < 0) + ps.nr_slab = 0; n = sprintf(buf, "\n" "Node %d MemTotal: %8lu kB\n" @@ -60,12 +70,7 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) "Node %d LowFree: %8lu kB\n" "Node %d Dirty: %8lu kB\n" "Node %d Writeback: %8lu kB\n" - "Node %d FilePages: %8lu kB\n" "Node %d Mapped: %8lu kB\n" - "Node %d AnonPages: %8lu kB\n" - "Node %d PageTables: %8lu kB\n" - "Node %d NFS_Unstable: %8lu kB\n" - "Node %d Bounce: %8lu kB\n" "Node %d Slab: %8lu kB\n", nid, K(i.totalram), nid, K(i.freeram), @@ -76,15 +81,10 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) nid, K(i.freehigh), nid, K(i.totalram - i.totalhigh), nid, K(i.freeram - i.freehigh), - nid, K(node_page_state(nid, NR_FILE_DIRTY)), - nid, K(node_page_state(nid, NR_WRITEBACK)), - nid, K(node_page_state(nid, NR_FILE_PAGES)), - nid, K(node_page_state(nid, NR_FILE_MAPPED)), - nid, K(node_page_state(nid, NR_ANON_PAGES)), - nid, K(node_page_state(nid, NR_PAGETABLE)), - nid, K(node_page_state(nid, NR_UNSTABLE_NFS)), - nid, K(node_page_state(nid, NR_BOUNCE)), - nid, K(node_page_state(nid, NR_SLAB))); + nid, K(ps.nr_dirty), + nid, K(ps.nr_writeback), + nid, K(ps.nr_mapped), + nid, K(ps.nr_slab)); n += hugetlb_report_node_meminfo(nid, buf + n); return n; } @@ -94,6 +94,28 @@ static SYSDEV_ATTR(meminfo, S_IRUGO, node_read_meminfo, NULL); static ssize_t node_read_numastat(struct sys_device * dev, char * buf) { + unsigned long numa_hit, numa_miss, interleave_hit, numa_foreign; + unsigned long local_node, other_node; + int i, cpu; + pg_data_t *pg = NODE_DATA(dev->id); + numa_hit = 0; + numa_miss = 0; + interleave_hit = 0; + numa_foreign = 0; + local_node = 0; + other_node = 0; + for (i = 0; i < MAX_NR_ZONES; i++) { + struct zone *z = &pg->node_zones[i]; + for_each_online_cpu(cpu) { + struct per_cpu_pageset *ps = zone_pcp(z,cpu); + numa_hit += ps->numa_hit; + numa_miss += ps->numa_miss; + numa_foreign += ps->numa_foreign; + interleave_hit += ps->interleave_hit; + local_node += ps->local_node; + other_node += ps->other_node; + } + } return sprintf(buf, "numa_hit %lu\n" "numa_miss %lu\n" @@ -101,12 +123,12 @@ static ssize_t node_read_numastat(struct sys_device * dev, char * buf) "interleave_hit %lu\n" "local_node %lu\n" "other_node %lu\n", - node_page_state(dev->id, NUMA_HIT), - node_page_state(dev->id, NUMA_MISS), - node_page_state(dev->id, NUMA_FOREIGN), - node_page_state(dev->id, NUMA_INTERLEAVE_HIT), - node_page_state(dev->id, NUMA_LOCAL), - node_page_state(dev->id, NUMA_OTHER)); + numa_hit, + numa_miss, + numa_foreign, + interleave_hit, + local_node, + other_node); } static SYSDEV_ATTR(numastat, S_IRUGO, node_read_numastat, NULL); @@ -168,66 +190,6 @@ void unregister_node(struct node *node) sysdev_unregister(&node->sysdev); } -struct node node_devices[MAX_NUMNODES]; - -/* - * register cpu under node - */ -int register_cpu_under_node(unsigned int cpu, unsigned int nid) -{ - if (node_online(nid)) { - struct sys_device *obj = get_cpu_sysdev(cpu); - if (!obj) - return 0; - return sysfs_create_link(&node_devices[nid].sysdev.kobj, - &obj->kobj, - kobject_name(&obj->kobj)); - } - - return 0; -} - -int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) -{ - if (node_online(nid)) { - struct sys_device *obj = get_cpu_sysdev(cpu); - if (obj) - sysfs_remove_link(&node_devices[nid].sysdev.kobj, - kobject_name(&obj->kobj)); - } - return 0; -} - -int register_one_node(int nid) -{ - int error = 0; - int cpu; - - if (node_online(nid)) { - int p_node = parent_node(nid); - struct node *parent = NULL; - - if (p_node != nid) - parent = &node_devices[p_node]; - - error = register_node(&node_devices[nid], nid, parent); - - /* link cpu under this node */ - for_each_present_cpu(cpu) { - if (cpu_to_node(cpu) == nid) - register_cpu_under_node(cpu, nid); - } - } - - return error; - -} - -void unregister_one_node(int nid) -{ - unregister_node(&node_devices[nid]); -} - static int __init register_node_type(void) { return sysdev_class_register(&node_class); diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 2b8755db7..83f5c5984 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -275,7 +275,7 @@ int platform_device_add(struct platform_device *pdev) pr_debug("Registering platform device '%s'. Parent at %s\n", pdev->dev.bus_id, pdev->dev.parent->bus_id); - ret = device_add(&pdev->dev); + ret = device_register(&pdev->dev); if (ret == 0) return ret; @@ -452,37 +452,6 @@ void platform_driver_unregister(struct platform_driver *drv) EXPORT_SYMBOL_GPL(platform_driver_unregister); -/* modalias support enables more hands-off userspace setup: - * (a) environment variable lets new-style hotplug events work once system is - * fully running: "modprobe $MODALIAS" - * (b) sysfs attribute lets new-style coldplug recover from hotplug events - * mishandled before system is fully running: "modprobe $(cat modalias)" - */ -static ssize_t -modalias_show(struct device *dev, struct device_attribute *a, char *buf) -{ - struct platform_device *pdev = to_platform_device(dev); - int len = snprintf(buf, PAGE_SIZE, "%s\n", pdev->name); - - return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; -} - -static struct device_attribute platform_dev_attrs[] = { - __ATTR_RO(modalias), - __ATTR_NULL, -}; - -static int platform_uevent(struct device *dev, char **envp, int num_envp, - char *buffer, int buffer_size) -{ - struct platform_device *pdev = to_platform_device(dev); - - envp[0] = buffer; - snprintf(buffer, buffer_size, "MODALIAS=%s", pdev->name); - return 0; -} - - /** * platform_match - bind platform device to platform driver. * @dev: device. @@ -527,9 +496,7 @@ static int platform_resume(struct device * dev) struct bus_type platform_bus_type = { .name = "platform", - .dev_attrs = platform_dev_attrs, .match = platform_match, - .uevent = platform_uevent, .suspend = platform_suspend, .resume = platform_resume, }; diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile index 91f230939..c0219ad94 100644 --- a/drivers/base/power/Makefile +++ b/drivers/base/power/Makefile @@ -1,10 +1,6 @@ obj-y := shutdown.o obj-$(CONFIG_PM) += main.o suspend.o resume.o runtime.o sysfs.o -obj-$(CONFIG_PM_TRACE) += trace.o ifeq ($(CONFIG_DEBUG_DRIVER),y) EXTRA_CFLAGS += -DDEBUG endif -ifeq ($(CONFIG_PM_DEBUG),y) -EXTRA_CFLAGS += -DDEBUG -endif diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index fdfa3d0cf..0d2e101e4 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -19,6 +19,7 @@ * ancestral dependencies that the subsystem list maintains. */ +#include #include #include "power.h" diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index 826093ef4..317edbf0f 100644 --- a/drivers/base/power/resume.c +++ b/drivers/base/power/resume.c @@ -9,7 +9,6 @@ */ #include -#include #include "../base.h" #include "power.h" @@ -24,8 +23,6 @@ int resume_device(struct device * dev) { int error = 0; - TRACE_DEVICE(dev); - TRACE_RESUME(0); down(&dev->sem); if (dev->power.pm_parent && dev->power.pm_parent->power.power_state.event) { @@ -39,7 +36,6 @@ int resume_device(struct device * dev) error = dev->bus->resume(dev); } up(&dev->sem); - TRACE_RESUME(error); return error; } @@ -53,7 +49,8 @@ void dpm_resume(void) struct device * dev = to_device(entry); get_device(dev); - list_move_tail(entry, &dpm_active); + list_del_init(entry); + list_add_tail(entry, &dpm_active); up(&dpm_list_sem); if (!dev->power.prev_state.event) @@ -100,7 +97,8 @@ void dpm_power_up(void) struct device * dev = to_device(entry); get_device(dev); - list_move_tail(entry, &dpm_active); + list_del_init(entry); + list_add_tail(entry, &dpm_active); resume_device(dev); put_device(dev); } diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c index 3483ae4d5..8826a5b66 100644 --- a/drivers/base/power/shutdown.c +++ b/drivers/base/power/shutdown.c @@ -8,6 +8,7 @@ * */ +#include #include #include diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 69509e02f..2a769cc6f 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c @@ -29,15 +29,6 @@ * lists. This way, the ancestors will be accessed before their descendents. */ -static inline char *suspend_verb(u32 event) -{ - switch (event) { - case PM_EVENT_SUSPEND: return "suspend"; - case PM_EVENT_FREEZE: return "freeze"; - default: return "(unknown suspend event)"; - } -} - /** * suspend_device - Save state of one device. @@ -66,13 +57,7 @@ int suspend_device(struct device * dev, pm_message_t state) dev->power.prev_state = dev->power.power_state; if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) { - dev_dbg(dev, "%s%s\n", - suspend_verb(state.event), - ((state.event == PM_EVENT_SUSPEND) - && device_may_wakeup(dev)) - ? ", may wakeup" - : "" - ); + dev_dbg(dev, "suspending\n"); error = dev->bus->suspend(dev, state); suspend_report_result(dev->bus->suspend, error); } @@ -116,10 +101,12 @@ int device_suspend(pm_message_t state) /* Check if the device got removed */ if (!list_empty(&dev->power.entry)) { /* Move it to the dpm_off or dpm_off_irq list */ - if (!error) - list_move(&dev->power.entry, &dpm_off); - else if (error == -EAGAIN) { - list_move(&dev->power.entry, &dpm_off_irq); + if (!error) { + list_del(&dev->power.entry); + list_add(&dev->power.entry, &dpm_off); + } else if (error == -EAGAIN) { + list_del(&dev->power.entry); + list_add(&dev->power.entry, &dpm_off_irq); error = 0; } } @@ -137,7 +124,8 @@ int device_suspend(pm_message_t state) */ while (!list_empty(&dpm_off_irq)) { struct list_head * entry = dpm_off_irq.next; - list_move(entry, &dpm_off); + list_del(entry); + list_add(entry, &dpm_off); } dpm_resume(); } diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c deleted file mode 100644 index a9ab30fef..000000000 --- a/drivers/base/power/trace.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * drivers/base/power/trace.c - * - * Copyright (C) 2006 Linus Torvalds - * - * Trace facility for suspend/resume problems, when none of the - * devices may be working. - */ - -#include -#include - -#include - -#include "power.h" - -/* - * Horrid, horrid, horrid. - * - * It turns out that the _only_ piece of hardware that actually - * keeps its value across a hard boot (and, more importantly, the - * POST init sequence) is literally the realtime clock. - * - * Never mind that an RTC chip has 114 bytes (and often a whole - * other bank of an additional 128 bytes) of nice SRAM that is - * _designed_ to keep data - the POST will clear it. So we literally - * can just use the few bytes of actual time data, which means that - * we're really limited. - * - * It means, for example, that we can't use the seconds at all - * (since the time between the hang and the boot might be more - * than a minute), and we'd better not depend on the low bits of - * the minutes either. - * - * There are the wday fields etc, but I wouldn't guarantee those - * are dependable either. And if the date isn't valid, either the - * hw or POST will do strange things. - * - * So we're left with: - * - year: 0-99 - * - month: 0-11 - * - day-of-month: 1-28 - * - hour: 0-23 - * - min: (0-30)*2 - * - * Giving us a total range of 0-16128000 (0xf61800), ie less - * than 24 bits of actual data we can save across reboots. - * - * And if your box can't boot in less than three minutes, - * you're screwed. - * - * Now, almost 24 bits of data is pitifully small, so we need - * to be pretty dense if we want to use it for anything nice. - * What we do is that instead of saving off nice readable info, - * we save off _hashes_ of information that we can hopefully - * regenerate after the reboot. - * - * In particular, this means that we might be unlucky, and hit - * a case where we have a hash collision, and we end up not - * being able to tell for certain exactly which case happened. - * But that's hopefully unlikely. - * - * What we do is to take the bits we can fit, and split them - * into three parts (16*997*1009 = 16095568), and use the values - * for: - * - 0-15: user-settable - * - 0-996: file + line number - * - 0-1008: device - */ -#define USERHASH (16) -#define FILEHASH (997) -#define DEVHASH (1009) - -#define DEVSEED (7919) - -static unsigned int dev_hash_value; - -static int set_magic_time(unsigned int user, unsigned int file, unsigned int device) -{ - unsigned int n = user + USERHASH*(file + FILEHASH*device); - - // June 7th, 2006 - static struct rtc_time time = { - .tm_sec = 0, - .tm_min = 0, - .tm_hour = 0, - .tm_mday = 7, - .tm_mon = 5, // June - counting from zero - .tm_year = 106, - .tm_wday = 3, - .tm_yday = 160, - .tm_isdst = 1 - }; - - time.tm_year = (n % 100); - n /= 100; - time.tm_mon = (n % 12); - n /= 12; - time.tm_mday = (n % 28) + 1; - n /= 28; - time.tm_hour = (n % 24); - n /= 24; - time.tm_min = (n % 20) * 3; - n /= 20; - set_rtc_time(&time); - return n ? -1 : 0; -} - -static unsigned int read_magic_time(void) -{ - struct rtc_time time; - unsigned int val; - - get_rtc_time(&time); - printk("Time: %2d:%02d:%02d Date: %02d/%02d/%02d\n", - time.tm_hour, time.tm_min, time.tm_sec, - time.tm_mon, time.tm_mday, time.tm_year); - val = time.tm_year; /* 100 years */ - if (val > 100) - val -= 100; - val += time.tm_mon * 100; /* 12 months */ - val += (time.tm_mday-1) * 100 * 12; /* 28 month-days */ - val += time.tm_hour * 100 * 12 * 28; /* 24 hours */ - val += (time.tm_min / 3) * 100 * 12 * 28 * 24; /* 20 3-minute intervals */ - return val; -} - -/* - * This is just the sdbm hash function with a user-supplied - * seed and final size parameter. - */ -static unsigned int hash_string(unsigned int seed, const char *data, unsigned int mod) -{ - unsigned char c; - while ((c = *data++) != 0) { - seed = (seed << 16) + (seed << 6) - seed + c; - } - return seed % mod; -} - -void set_trace_device(struct device *dev) -{ - dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH); -} - -/* - * We could just take the "tracedata" index into the .tracedata - * section instead. Generating a hash of the data gives us a - * chance to work across kernel versions, and perhaps more - * importantly it also gives us valid/invalid check (ie we will - * likely not give totally bogus reports - if the hash matches, - * it's not any guarantee, but it's a high _likelihood_ that - * the match is valid). - */ -void generate_resume_trace(void *tracedata, unsigned int user) -{ - unsigned short lineno = *(unsigned short *)tracedata; - const char *file = *(const char **)(tracedata + 2); - unsigned int user_hash_value, file_hash_value; - - user_hash_value = user % USERHASH; - file_hash_value = hash_string(lineno, file, FILEHASH); - set_magic_time(user_hash_value, file_hash_value, dev_hash_value); -} - -extern char __tracedata_start, __tracedata_end; -static int show_file_hash(unsigned int value) -{ - int match; - char *tracedata; - - match = 0; - for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; tracedata += 6) { - unsigned short lineno = *(unsigned short *)tracedata; - const char *file = *(const char **)(tracedata + 2); - unsigned int hash = hash_string(lineno, file, FILEHASH); - if (hash != value) - continue; - printk(" hash matches %s:%u\n", file, lineno); - match++; - } - return match; -} - -static int show_dev_hash(unsigned int value) -{ - int match = 0; - struct list_head * entry = dpm_active.prev; - - while (entry != &dpm_active) { - struct device * dev = to_device(entry); - unsigned int hash = hash_string(DEVSEED, dev->bus_id, DEVHASH); - if (hash == value) { - printk(" hash matches device %s\n", dev->bus_id); - match++; - } - entry = entry->prev; - } - return match; -} - -static unsigned int hash_value_early_read; - -static int early_resume_init(void) -{ - hash_value_early_read = read_magic_time(); - return 0; -} - -static int late_resume_init(void) -{ - unsigned int val = hash_value_early_read; - unsigned int user, file, dev; - - user = val % USERHASH; - val = val / USERHASH; - file = val % FILEHASH; - val = val / FILEHASH; - dev = val /* % DEVHASH */; - - printk(" Magic number: %d:%d:%d\n", user, file, dev); - show_file_hash(file); - show_dev_hash(dev); - return 0; -} - -core_initcall(early_resume_init); -late_initcall(late_resume_init); diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 04e5db445..6fc23ab12 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c @@ -12,6 +12,7 @@ * add themselves as children of the system bus. */ +#include #include #include #include @@ -79,59 +80,10 @@ void sysdev_remove_file(struct sys_device * s, struct sysdev_attribute * a) EXPORT_SYMBOL_GPL(sysdev_create_file); EXPORT_SYMBOL_GPL(sysdev_remove_file); -#define to_sysdev_class(k) container_of(k, struct sysdev_class, kset.kobj) -#define to_sysdev_class_attr(a) container_of(a, \ - struct sysdev_class_attribute, attr) - -static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr, - char *buffer) -{ - struct sysdev_class * class = to_sysdev_class(kobj); - struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); - - if (class_attr->show) - return class_attr->show(class, buffer); - return -EIO; -} - -static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr, - const char *buffer, size_t count) -{ - struct sysdev_class * class = to_sysdev_class(kobj); - struct sysdev_class_attribute * class_attr = to_sysdev_class_attr(attr); - - if (class_attr->store) - return class_attr->store(class, buffer, count); - return -EIO; -} - -static struct sysfs_ops sysfs_class_ops = { - .show = sysdev_class_show, - .store = sysdev_class_store, -}; - -static struct kobj_type ktype_sysdev_class = { - .sysfs_ops = &sysfs_class_ops, -}; - -int sysdev_class_create_file(struct sysdev_class *c, - struct sysdev_class_attribute *a) -{ - return sysfs_create_file(&c->kset.kobj, &a->attr); -} -EXPORT_SYMBOL_GPL(sysdev_class_create_file); - -void sysdev_class_remove_file(struct sysdev_class *c, - struct sysdev_class_attribute *a) -{ - sysfs_remove_file(&c->kset.kobj, &a->attr); -} -EXPORT_SYMBOL_GPL(sysdev_class_remove_file); - /* * declare system_subsys */ -static decl_subsys(system, &ktype_sysdev_class, NULL); +static decl_subsys(system, &ktype_sysdev, NULL); int sysdev_class_register(struct sysdev_class * cls) { diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 3ef9d514b..8c52421cb 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c @@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev) return 0; } -static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, +static int topology_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -125,7 +125,7 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata topology_cpu_notifier = +static struct notifier_block topology_cpu_notifier = { .notifier_call = topology_cpu_callback, }; @@ -139,7 +139,7 @@ static int __cpuinit topology_sysfs_init(void) (void *)(long)i); } - register_hotcpu_notifier(&topology_cpu_notifier); + register_cpu_notifier(&topology_cpu_notifier); return 0; } diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 1c5e5c2d8..1419e0693 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -17,8 +17,8 @@ */ -#define DAC960_DriverVersion "2.5.48" -#define DAC960_DriverDate "14 May 2006" +#define DAC960_DriverVersion "2.5.47" +#define DAC960_DriverDate "14 November 2002" #include @@ -770,7 +770,7 @@ static void DAC960_P_QueueCommand(DAC960_Command_T *Command) static void DAC960_ExecuteCommand(DAC960_Command_T *Command) { DAC960_Controller_T *Controller = Command->Controller; - DECLARE_COMPLETION_ONSTACK(Completion); + DECLARE_COMPLETION(Completion); unsigned long flags; Command->Completion = &Completion; @@ -2530,6 +2530,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) 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); disk->major = MajorNumber; disk->first_minor = n << DAC960_MaxPartitionsBits; disk->fops = &DAC960_BlockDeviceOperations; @@ -3014,7 +3015,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device, Acquire shared access to the IRQ Channel. */ IRQ_Channel = PCI_Device->irq; - if (request_irq(IRQ_Channel, InterruptHandler, IRQF_SHARED, + if (request_irq(IRQ_Channel, InterruptHandler, SA_SHIRQ, Controller->FullModelName, Controller) < 0) { DAC960_Error("Unable to acquire IRQ Channel %d for Controller at\n", @@ -4779,16 +4780,15 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) (NewPhysicalDeviceInfo->LogicalUnit != PhysicalDeviceInfo->LogicalUnit)) { - PhysicalDeviceInfo = + PhysicalDeviceInfo = (DAC960_V2_PhysicalDeviceInfo_T *) kmalloc(sizeof(DAC960_V2_PhysicalDeviceInfo_T), GFP_ATOMIC); InquiryUnitSerialNumber = + (DAC960_SCSI_Inquiry_UnitSerialNumber_T *) kmalloc(sizeof(DAC960_SCSI_Inquiry_UnitSerialNumber_T), GFP_ATOMIC); - if (InquiryUnitSerialNumber == NULL || - PhysicalDeviceInfo == NULL) + if (InquiryUnitSerialNumber == NULL && + PhysicalDeviceInfo != NULL) { - kfree(InquiryUnitSerialNumber); - InquiryUnitSerialNumber = NULL; kfree(PhysicalDeviceInfo); PhysicalDeviceInfo = NULL; } @@ -7125,7 +7125,7 @@ static struct pci_device_id DAC960_id_table[] = { { .vendor = PCI_VENDOR_ID_MYLEX, .device = PCI_DEVICE_ID_MYLEX_DAC960_GEM, - .subvendor = PCI_VENDOR_ID_MYLEX, + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = (unsigned long) &DAC960_GEM_privdata, }, diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 74f83148d..2254b38da 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -407,19 +407,8 @@ config BLK_DEV_RAM_SIZE what are you doing. If you are using IBM S/390, then set this to 8192. -config BLK_DEV_RAM_BLOCKSIZE - int "Default RAM disk block size (bytes)" - depends on BLK_DEV_RAM - default "1024" - help - The default value is 1024 kilobytes. PAGE_SIZE is a much more - efficient choice however. The default is kept to ensure initrd - setups function - apparently needed by the rd_load_image routine - that supposes the filesystem in the image uses a 1024 blocksize. - config BLK_DEV_INITRD bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" - depends on BROKEN || !FRV help The initial RAM filesystem is a ramfs which is loaded by the boot loader (loadlin or lilo) and that is mounted as root diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c index 0b80fbb8d..196c0ec9c 100644 --- a/drivers/block/acsi.c +++ b/drivers/block/acsi.c @@ -43,6 +43,7 @@ * */ +#include #include #include #include @@ -1731,10 +1732,13 @@ int acsi_init( void ) struct gendisk *disk = acsi_gendisk[i]; sprintf(disk->disk_name, "ad%c", 'a'+i); aip = &acsi_info[NDevices]; + sprintf(disk->devfs_name, "ad/target%d/lun%d", aip->target, aip->lun); disk->major = ACSI_MAJOR; disk->first_minor = i << 4; - if (acsi_info[i].type != HARDDISK) + if (acsi_info[i].type != HARDDISK) { disk->minors = 1; + strcat(disk->devfs_name, "/disc"); + } disk->fops = &acsi_fops; disk->private_data = &acsi_info[i]; set_capacity(disk, acsi_info[i].size); diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c index 4030a8fd1..4cb9c1336 100644 --- a/drivers/block/acsi_slm.c +++ b/drivers/block/acsi_slm.c @@ -65,6 +65,7 @@ not be guaranteed. There are several ways to assure this: #include #include #include +#include #include #include @@ -1004,6 +1005,11 @@ int slm_init( void ) BufferP = SLMBuffer; SLMState = IDLE; + devfs_mk_dir("slm"); + for (i = 0; i < MAX_SLM; i++) { + devfs_mk_cdev(MKDEV(ACSI_MAJOR, i), + S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i); + } return 0; } @@ -1026,6 +1032,10 @@ int init_module(void) void cleanup_module(void) { + int i; + for (i = 0; i < MAX_SLM; i++) + devfs_remove("slm/%d", i); + devfs_remove("slm"); if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0) printk( KERN_ERR "acsi_slm: cleanup_module failed\n"); atari_stram_free( SLMBuffer ); diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 2641597c6..2a8af6859 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c @@ -64,7 +64,6 @@ #include #include #include -#include #include #include diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c index 1bc1cf960..5327f553b 100644 --- a/drivers/block/aoe/aoechr.c +++ b/drivers/block/aoe/aoechr.c @@ -162,7 +162,7 @@ aoechr_open(struct inode *inode, struct file *filp) { int n, i; - n = iminor(inode); + n = MINOR(inode->i_rdev); filp->private_data = (void *) (unsigned long) n; for (i = 0; i < ARRAY_SIZE(chardevs); ++i) diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 90d98b79a..ff900aa3f 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -20,6 +20,7 @@ * */ +#include /* CONFIG_PROC_FS */ #include #include #include @@ -33,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,14 +48,14 @@ #include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "HP CISS Driver (v 3.6.10)" -#define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,10) +#define DRIVER_NAME "HP CISS Driver (v 2.6.10)" +#define DRIVER_VERSION CCISS_DRIVER_VERSION(2,6,10) /* Embedded module documentation macros - see modules.h */ MODULE_AUTHOR("Hewlett-Packard Company"); -MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.10"); +MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.10"); MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" - " SA6i P600 P800 P400 P400i E200 E200i E500"); + " SA6i P600 P800 P400 P400i E200 E200i"); MODULE_LICENSE("GPL"); MODULE_VERSION("2.6.8"); @@ -64,131 +65,143 @@ MODULE_VERSION("2.6.8"); /* define the PCI info for the cards we can control */ static const struct pci_device_id cciss_pci_device_id[] = { - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS, 0x0E11, 0x4070}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, 0x0E11, 0x4080}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, 0x0E11, 0x4082}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, 0x0E11, 0x4083}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x4091}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x409A}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x409B}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x409C}, - {PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x409D}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSA, 0x103C, 0x3225}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3223}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3234}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3235}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3211}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3212}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3213}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, - {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3233}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISS, + 0x0E11, 0x4070, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, + 0x0E11, 0x4080, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, + 0x0E11, 0x4082, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSB, + 0x0E11, 0x4083, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x409A, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x409B, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x409C, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x409D, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x4091, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSA, + 0x103C, 0x3225, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, + 0x103c, 0x3223, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, + 0x103c, 0x3234, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, + 0x103c, 0x3235, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, + 0x103c, 0x3211, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, + 0x103c, 0x3212, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, + 0x103c, 0x3213, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, + 0x103c, 0x3214, 0, 0, 0}, + { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, + 0x103c, 0x3215, 0, 0, 0}, {0,} }; - MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); +#define NR_PRODUCTS ARRAY_SIZE(products) + /* board_id = Subsystem Device ID & Vendor ID * product = Marketing Name for the board - * access = Address of the struct of function pointers + * access = Address of the struct of function pointers */ static struct board_type products[] = { - {0x40700E11, "Smart Array 5300", &SA5_access}, - {0x40800E11, "Smart Array 5i", &SA5B_access}, - {0x40820E11, "Smart Array 532", &SA5B_access}, - {0x40830E11, "Smart Array 5312", &SA5B_access}, - {0x409A0E11, "Smart Array 641", &SA5_access}, - {0x409B0E11, "Smart Array 642", &SA5_access}, - {0x409C0E11, "Smart Array 6400", &SA5_access}, - {0x409D0E11, "Smart Array 6400 EM", &SA5_access}, - {0x40910E11, "Smart Array 6i", &SA5_access}, - {0x3225103C, "Smart Array P600", &SA5_access}, - {0x3223103C, "Smart Array P800", &SA5_access}, - {0x3234103C, "Smart Array P400", &SA5_access}, - {0x3235103C, "Smart Array P400i", &SA5_access}, - {0x3211103C, "Smart Array E200i", &SA5_access}, - {0x3212103C, "Smart Array E200", &SA5_access}, - {0x3213103C, "Smart Array E200i", &SA5_access}, - {0x3214103C, "Smart Array E200i", &SA5_access}, - {0x3215103C, "Smart Array E200i", &SA5_access}, - {0x3233103C, "Smart Array E500", &SA5_access}, + { 0x40700E11, "Smart Array 5300", &SA5_access }, + { 0x40800E11, "Smart Array 5i", &SA5B_access}, + { 0x40820E11, "Smart Array 532", &SA5B_access}, + { 0x40830E11, "Smart Array 5312", &SA5B_access}, + { 0x409A0E11, "Smart Array 641", &SA5_access}, + { 0x409B0E11, "Smart Array 642", &SA5_access}, + { 0x409C0E11, "Smart Array 6400", &SA5_access}, + { 0x409D0E11, "Smart Array 6400 EM", &SA5_access}, + { 0x40910E11, "Smart Array 6i", &SA5_access}, + { 0x3225103C, "Smart Array P600", &SA5_access}, + { 0x3223103C, "Smart Array P800", &SA5_access}, + { 0x3234103C, "Smart Array P400", &SA5_access}, + { 0x3235103C, "Smart Array P400i", &SA5_access}, + { 0x3211103C, "Smart Array E200i", &SA5_access}, + { 0x3212103C, "Smart Array E200", &SA5_access}, + { 0x3213103C, "Smart Array E200i", &SA5_access}, + { 0x3214103C, "Smart Array E200i", &SA5_access}, + { 0x3215103C, "Smart Array E200i", &SA5_access}, }; -/* How long to wait (in milliseconds) for board to go into simple mode */ -#define MAX_CONFIG_WAIT 30000 +/* How long to wait (in millesconds) for board to go into simple mode */ +#define MAX_CONFIG_WAIT 30000 #define MAX_IOCTL_CONFIG_WAIT 1000 /*define how many times we will try a command because of bus resets */ #define MAX_CMD_RETRIES 3 #define READ_AHEAD 1024 -#define NR_CMDS 384 /* #commands that can be outstanding */ +#define NR_CMDS 384 /* #commands that can be outstanding */ #define MAX_CTLR 32 /* Originally cciss driver only supports 8 major numbers */ #define MAX_CTLR_ORIG 8 + static ctlr_info_t *hba[MAX_CTLR]; static void do_cciss_request(request_queue_t *q); static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs); static int cciss_open(struct inode *inode, struct file *filep); static int cciss_release(struct inode *inode, struct file *filep); -static int cciss_ioctl(struct inode *inode, struct file *filep, - unsigned int cmd, unsigned long arg); +static int cciss_ioctl(struct inode *inode, struct file *filep, + unsigned int cmd, unsigned long arg); static int cciss_getgeo(struct block_device *bdev, struct hd_geometry *geo); static int revalidate_allvol(ctlr_info_t *host); static int cciss_revalidate(struct gendisk *disk); static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk); -static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, - int clear_all); +static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, int clear_all); static void cciss_read_capacity(int ctlr, int logvol, ReadCapdata_struct *buf, - int withirq, unsigned int *total_size, - unsigned int *block_size); -static void cciss_geometry_inquiry(int ctlr, int logvol, int withirq, - unsigned int total_size, - unsigned int block_size, - InquiryData_struct *inq_buff, - drive_info_struct *drv); + int withirq, unsigned int *total_size, unsigned int *block_size); +static void cciss_geometry_inquiry(int ctlr, int logvol, + int withirq, unsigned int total_size, + unsigned int block_size, InquiryData_struct *inq_buff, + drive_info_struct *drv); static void cciss_getgeometry(int cntl_num); -static void __devinit cciss_interrupt_mode(ctlr_info_t *, struct pci_dev *, - __u32); -static void start_io(ctlr_info_t *h); -static int sendcmd(__u8 cmd, int ctlr, void *buff, size_t size, - unsigned int use_unit_num, unsigned int log_unit, - __u8 page_code, unsigned char *scsi3addr, int cmd_type); -static int sendcmd_withirq(__u8 cmd, int ctlr, void *buff, size_t size, - unsigned int use_unit_num, unsigned int log_unit, - __u8 page_code, int cmd_type); +static void __devinit cciss_interrupt_mode(ctlr_info_t *, struct pci_dev *, __u32); +static void start_io( ctlr_info_t *h); +static int sendcmd( __u8 cmd, int ctlr, void *buff, size_t size, + unsigned int use_unit_num, unsigned int log_unit, __u8 page_code, + unsigned char *scsi3addr, int cmd_type); +static int sendcmd_withirq(__u8 cmd, int ctlr, void *buff, size_t size, + unsigned int use_unit_num, unsigned int log_unit, __u8 page_code, + int cmd_type); static void fail_all_cmds(unsigned long ctlr); #ifdef CONFIG_PROC_FS -static int cciss_proc_get_info(char *buffer, char **start, off_t offset, - int length, int *eof, void *data); +static int cciss_proc_get_info(char *buffer, char **start, off_t offset, + int length, int *eof, void *data); static void cciss_procinit(int i); #else -static void cciss_procinit(int i) -{ -} -#endif /* CONFIG_PROC_FS */ +static void cciss_procinit(int i) {} +#endif /* CONFIG_PROC_FS */ #ifdef CONFIG_COMPAT static long cciss_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg); #endif -static struct block_device_operations cciss_fops = { - .owner = THIS_MODULE, - .open = cciss_open, - .release = cciss_release, - .ioctl = cciss_ioctl, - .getgeo = cciss_getgeo, +static struct block_device_operations cciss_fops = { + .owner = THIS_MODULE, + .open = cciss_open, + .release = cciss_release, + .ioctl = cciss_ioctl, + .getgeo = cciss_getgeo, #ifdef CONFIG_COMPAT - .compat_ioctl = cciss_compat_ioctl, + .compat_ioctl = cciss_compat_ioctl, #endif - .revalidate_disk = cciss_revalidate, + .revalidate_disk= cciss_revalidate, }; /* @@ -196,29 +209,28 @@ static struct block_device_operations cciss_fops = { */ static inline void addQ(CommandList_struct **Qptr, CommandList_struct *c) { - if (*Qptr == NULL) { - *Qptr = c; - c->next = c->prev = c; - } else { - c->prev = (*Qptr)->prev; - c->next = (*Qptr); - (*Qptr)->prev->next = c; - (*Qptr)->prev = c; - } + if (*Qptr == NULL) { + *Qptr = c; + c->next = c->prev = c; + } else { + c->prev = (*Qptr)->prev; + c->next = (*Qptr); + (*Qptr)->prev->next = c; + (*Qptr)->prev = c; + } } -static inline CommandList_struct *removeQ(CommandList_struct **Qptr, - CommandList_struct *c) +static inline CommandList_struct *removeQ(CommandList_struct **Qptr, + CommandList_struct *c) { - if (c && c->next != c) { - if (*Qptr == c) - *Qptr = c->next; - c->prev->next = c->next; - c->next->prev = c->prev; - } else { - *Qptr = NULL; - } - return c; + if (c && c->next != c) { + if (*Qptr == c) *Qptr = c->next; + c->prev->next = c->next; + c->next->prev = c->prev; + } else { + *Qptr = NULL; + } + return c; } #include "cciss_scsi.c" /* For SCSI tape support */ @@ -231,24 +243,23 @@ static inline CommandList_struct *removeQ(CommandList_struct **Qptr, #define ENG_GIG 1000000000 #define ENG_GIG_FACTOR (ENG_GIG/512) #define RAID_UNKNOWN 6 -static const char *raid_label[] = { "0", "4", "1(1+0)", "5", "5+1", "ADG", - "UNKNOWN" -}; +static const char *raid_label[] = {"0","4","1(1+0)","5","5+1","ADG", + "UNKNOWN"}; static struct proc_dir_entry *proc_cciss; -static int cciss_proc_get_info(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) +static int cciss_proc_get_info(char *buffer, char **start, off_t offset, + int length, int *eof, void *data) { - off_t pos = 0; - off_t len = 0; - int size, i, ctlr; - ctlr_info_t *h = (ctlr_info_t *) data; - drive_info_struct *drv; + off_t pos = 0; + off_t len = 0; + int size, i, ctlr; + ctlr_info_t *h = (ctlr_info_t*)data; + drive_info_struct *drv; unsigned long flags; - sector_t vol_sz, vol_sz_frac; + sector_t vol_sz, vol_sz_frac; - ctlr = h->ctlr; + ctlr = h->ctlr; /* prevent displaying bogus info during configuration * or deconfiguration of a logical volume @@ -256,35 +267,35 @@ static int cciss_proc_get_info(char *buffer, char **start, off_t offset, spin_lock_irqsave(CCISS_LOCK(ctlr), flags); if (h->busy_configuring) { spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - return -EBUSY; + return -EBUSY; } h->busy_configuring = 1; spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - size = sprintf(buffer, "%s: HP %s Controller\n" - "Board ID: 0x%08lx\n" - "Firmware Version: %c%c%c%c\n" - "IRQ: %d\n" - "Logical drives: %d\n" - "Current Q depth: %d\n" - "Current # commands on controller: %d\n" - "Max Q depth since init: %d\n" - "Max # commands on controller since init: %d\n" - "Max SG entries since init: %d\n\n", - h->devname, - h->product_name, - (unsigned long)h->board_id, - h->firm_ver[0], h->firm_ver[1], h->firm_ver[2], - h->firm_ver[3], (unsigned int)h->intr[SIMPLE_MODE_INT], - h->num_luns, h->Qdepth, h->commands_outstanding, - h->maxQsinceinit, h->max_outstanding, h->maxSG); - - pos += size; - len += size; + size = sprintf(buffer, "%s: HP %s Controller\n" + "Board ID: 0x%08lx\n" + "Firmware Version: %c%c%c%c\n" + "IRQ: %d\n" + "Logical drives: %d\n" + "Current Q depth: %d\n" + "Current # commands on controller: %d\n" + "Max Q depth since init: %d\n" + "Max # commands on controller since init: %d\n" + "Max SG entries since init: %d\n\n", + h->devname, + h->product_name, + (unsigned long)h->board_id, + h->firm_ver[0], h->firm_ver[1], h->firm_ver[2], h->firm_ver[3], + (unsigned int)h->intr[SIMPLE_MODE_INT], + h->num_luns, + h->Qdepth, h->commands_outstanding, + h->maxQsinceinit, h->max_outstanding, h->maxSG); + + pos += size; len += size; cciss_proc_tape_report(ctlr, buffer, &pos, &len); - for (i = 0; i <= h->highest_lun; i++) { + for(i=0; i<=h->highest_lun; i++) { - drv = &h->drv[i]; + drv = &h->drv[i]; if (drv->heads == 0) continue; @@ -295,26 +306,25 @@ static int cciss_proc_get_info(char *buffer, char **start, off_t offset, if (drv->raid_level > 5) drv->raid_level = RAID_UNKNOWN; - size = sprintf(buffer + len, "cciss/c%dd%d:" - "\t%4u.%02uGB\tRAID %s\n", - ctlr, i, (int)vol_sz, (int)vol_sz_frac, - raid_label[drv->raid_level]); - pos += size; - len += size; - } - - *eof = 1; - *start = buffer + offset; - len -= offset; - if (len > length) - len = length; + size = sprintf(buffer+len, "cciss/c%dd%d:" + "\t%4u.%02uGB\tRAID %s\n", + ctlr, i, (int)vol_sz, (int)vol_sz_frac, + raid_label[drv->raid_level]); + pos += size; len += size; + } + + *eof = 1; + *start = buffer+offset; + len -= offset; + if (len>length) + len = length; h->busy_configuring = 0; - return len; + return len; } -static int -cciss_proc_write(struct file *file, const char __user *buffer, - unsigned long count, void *data) +static int +cciss_proc_write(struct file *file, const char __user *buffer, + unsigned long count, void *data) { unsigned char cmd[80]; int len; @@ -323,23 +333,20 @@ cciss_proc_write(struct file *file, const char __user *buffer, int rc; #endif - if (count > sizeof(cmd) - 1) - return -EINVAL; - if (copy_from_user(cmd, buffer, count)) - return -EFAULT; + if (count > sizeof(cmd)-1) return -EINVAL; + if (copy_from_user(cmd, buffer, count)) return -EFAULT; cmd[count] = '\0'; len = strlen(cmd); // above 3 lines ensure safety - if (len && cmd[len - 1] == '\n') + if (len && cmd[len-1] == '\n') cmd[--len] = '\0'; # ifdef CONFIG_CISS_SCSI_TAPE - if (strcmp("engage scsi", cmd) == 0) { - rc = cciss_engage_scsi(h->ctlr); - if (rc != 0) - return -rc; - return count; - } - /* might be nice to have "disengage" too, but it's not - safely possible. (only 1 module use count, lock issues.) */ + if (strcmp("engage scsi", cmd)==0) { + rc = cciss_engage_scsi(h->ctlr); + if (rc != 0) return -rc; + return count; + } + /* might be nice to have "disengage" too, but it's not + safely possible. (only 1 module use count, lock issues.) */ # endif return -EINVAL; } @@ -352,113 +359,116 @@ static void __devinit cciss_procinit(int i) { struct proc_dir_entry *pde; - if (proc_cciss == NULL) { - proc_cciss = proc_mkdir("cciss", proc_root_driver); - if (!proc_cciss) + if (proc_cciss == NULL) { + proc_cciss = proc_mkdir("cciss", proc_root_driver); + if (!proc_cciss) return; - } + } - pde = create_proc_read_entry(hba[i]->devname, - S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH, - proc_cciss, cciss_proc_get_info, hba[i]); + pde = create_proc_read_entry(hba[i]->devname, + S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH, + proc_cciss, cciss_proc_get_info, hba[i]); pde->write_proc = cciss_proc_write; } -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_PROC_FS */ -/* - * For operations that cannot sleep, a command block is allocated at init, +/* + * For operations that cannot sleep, a command block is allocated at init, * and managed by cmd_alloc() and cmd_free() using a simple bitmap to track - * which ones are free or in use. For operations that can wait for kmalloc - * to possible sleep, this routine can be called with get_from_pool set to 0. - * cmd_free() MUST be called with a got_from_pool set to 0 if cmd_alloc was. - */ -static CommandList_struct *cmd_alloc(ctlr_info_t *h, int get_from_pool) + * which ones are free or in use. For operations that can wait for kmalloc + * to possible sleep, this routine can be called with get_from_pool set to 0. + * cmd_free() MUST be called with a got_from_pool set to 0 if cmd_alloc was. + */ +static CommandList_struct * cmd_alloc(ctlr_info_t *h, int get_from_pool) { CommandList_struct *c; - int i; + int i; u64bit temp64; dma_addr_t cmd_dma_handle, err_dma_handle; - if (!get_from_pool) { - c = (CommandList_struct *) pci_alloc_consistent(h->pdev, - sizeof(CommandList_struct), &cmd_dma_handle); - if (c == NULL) - return NULL; + if (!get_from_pool) + { + c = (CommandList_struct *) pci_alloc_consistent( + h->pdev, sizeof(CommandList_struct), &cmd_dma_handle); + if(c==NULL) + return NULL; memset(c, 0, sizeof(CommandList_struct)); c->cmdindex = -1; - c->err_info = (ErrorInfo_struct *) - pci_alloc_consistent(h->pdev, sizeof(ErrorInfo_struct), - &err_dma_handle); - - if (c->err_info == NULL) { - pci_free_consistent(h->pdev, + c->err_info = (ErrorInfo_struct *)pci_alloc_consistent( + h->pdev, sizeof(ErrorInfo_struct), + &err_dma_handle); + + if (c->err_info == NULL) + { + pci_free_consistent(h->pdev, sizeof(CommandList_struct), c, cmd_dma_handle); return NULL; } memset(c->err_info, 0, sizeof(ErrorInfo_struct)); - } else { /* get it out of the controllers pool */ - - do { - i = find_first_zero_bit(h->cmd_pool_bits, NR_CMDS); - if (i == NR_CMDS) - return NULL; - } while (test_and_set_bit - (i & (BITS_PER_LONG - 1), - h->cmd_pool_bits + (i / BITS_PER_LONG)) != 0); + } else /* get it out of the controllers pool */ + { + do { + i = find_first_zero_bit(h->cmd_pool_bits, NR_CMDS); + if (i == NR_CMDS) + return NULL; + } while(test_and_set_bit(i & (BITS_PER_LONG - 1), h->cmd_pool_bits+(i/BITS_PER_LONG)) != 0); #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss: using command buffer %d\n", i); #endif - c = h->cmd_pool + i; + c = h->cmd_pool + i; memset(c, 0, sizeof(CommandList_struct)); - cmd_dma_handle = h->cmd_pool_dhandle - + i * sizeof(CommandList_struct); + cmd_dma_handle = h->cmd_pool_dhandle + + i*sizeof(CommandList_struct); c->err_info = h->errinfo_pool + i; memset(c->err_info, 0, sizeof(ErrorInfo_struct)); - err_dma_handle = h->errinfo_pool_dhandle - + i * sizeof(ErrorInfo_struct); - h->nr_allocs++; + err_dma_handle = h->errinfo_pool_dhandle + + i*sizeof(ErrorInfo_struct); + h->nr_allocs++; c->cmdindex = i; - } + } c->busaddr = (__u32) cmd_dma_handle; - temp64.val = (__u64) err_dma_handle; + temp64.val = (__u64) err_dma_handle; c->ErrDesc.Addr.lower = temp64.val32.lower; c->ErrDesc.Addr.upper = temp64.val32.upper; c->ErrDesc.Len = sizeof(ErrorInfo_struct); - + c->ctlr = h->ctlr; - return c; + return c; + + } -/* - * Frees a command block that was previously allocated with cmd_alloc(). +/* + * Frees a command block that was previously allocated with cmd_alloc(). */ static void cmd_free(ctlr_info_t *h, CommandList_struct *c, int got_from_pool) { int i; u64bit temp64; - if (!got_from_pool) { + if( !got_from_pool) + { temp64.val32.lower = c->ErrDesc.Addr.lower; temp64.val32.upper = c->ErrDesc.Addr.upper; - pci_free_consistent(h->pdev, sizeof(ErrorInfo_struct), - c->err_info, (dma_addr_t) temp64.val); - pci_free_consistent(h->pdev, sizeof(CommandList_struct), - c, (dma_addr_t) c->busaddr); - } else { + pci_free_consistent(h->pdev, sizeof(ErrorInfo_struct), + c->err_info, (dma_addr_t) temp64.val); + pci_free_consistent(h->pdev, sizeof(CommandList_struct), + c, (dma_addr_t) c->busaddr); + } else + { i = c - h->cmd_pool; - clear_bit(i & (BITS_PER_LONG - 1), - h->cmd_pool_bits + (i / BITS_PER_LONG)); - h->nr_frees++; - } + clear_bit(i&(BITS_PER_LONG-1), h->cmd_pool_bits+(i/BITS_PER_LONG)); + h->nr_frees++; + } } static inline ctlr_info_t *get_host(struct gendisk *disk) { - return disk->queue->queuedata; + return disk->queue->queuedata; } static inline drive_info_struct *get_drv(struct gendisk *disk) @@ -476,7 +486,7 @@ static int cciss_open(struct inode *inode, struct file *filep) #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ if (host->busy_initializing || drv->busy_configuring) return -EBUSY; @@ -489,10 +499,10 @@ static int cciss_open(struct inode *inode, struct file *filep) * for "raw controller". */ if (drv->nr_blocks == 0) { - if (iminor(inode) != 0) { /* not node 0? */ + if (iminor(inode) != 0) { /* not node 0? */ /* if not node 0 make sure it is a partition = 0 */ if (iminor(inode) & 0x0f) { - return -ENXIO; + return -ENXIO; /* if it is, make sure we have a LUN ID */ } else if (drv->LunID == 0) { return -ENXIO; @@ -505,7 +515,6 @@ static int cciss_open(struct inode *inode, struct file *filep) host->usage_count++; return 0; } - /* * Close. Sync first. */ @@ -515,9 +524,8 @@ static int cciss_release(struct inode *inode, struct file *filep) drive_info_struct *drv = get_drv(inode->i_bdev->bd_disk); #ifdef CCISS_DEBUG - printk(KERN_DEBUG "cciss_release %s\n", - inode->i_bdev->bd_disk->disk_name); -#endif /* CCISS_DEBUG */ + printk(KERN_DEBUG "cciss_release %s\n", inode->i_bdev->bd_disk->disk_name); +#endif /* CCISS_DEBUG */ drv->usage_count--; host->usage_count--; @@ -535,10 +543,8 @@ static int do_ioctl(struct file *f, unsigned cmd, unsigned long arg) return ret; } -static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, - unsigned long arg); -static int cciss_ioctl32_big_passthru(struct file *f, unsigned cmd, - unsigned long arg); +static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, unsigned long arg); +static int cciss_ioctl32_big_passthru(struct file *f, unsigned cmd, unsigned long arg); static long cciss_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg) { @@ -570,26 +576,19 @@ static long cciss_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg) } } -static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, - unsigned long arg) +static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, unsigned long arg) { IOCTL32_Command_struct __user *arg32 = - (IOCTL32_Command_struct __user *) arg; + (IOCTL32_Command_struct __user *) arg; IOCTL_Command_struct arg64; IOCTL_Command_struct __user *p = compat_alloc_user_space(sizeof(arg64)); int err; u32 cp; err = 0; - err |= - copy_from_user(&arg64.LUN_info, &arg32->LUN_info, - sizeof(arg64.LUN_info)); - err |= - copy_from_user(&arg64.Request, &arg32->Request, - sizeof(arg64.Request)); - err |= - copy_from_user(&arg64.error_info, &arg32->error_info, - sizeof(arg64.error_info)); + err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, sizeof(arg64.LUN_info)); + err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request)); + err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info)); err |= get_user(arg64.buf_size, &arg32->buf_size); err |= get_user(cp, &arg32->buf); arg64.buf = compat_ptr(cp); @@ -598,38 +597,28 @@ static int cciss_ioctl32_passthru(struct file *f, unsigned cmd, if (err) return -EFAULT; - err = do_ioctl(f, CCISS_PASSTHRU, (unsigned long)p); + err = do_ioctl(f, CCISS_PASSTHRU, (unsigned long) p); if (err) return err; - err |= - copy_in_user(&arg32->error_info, &p->error_info, - sizeof(arg32->error_info)); + err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info)); if (err) return -EFAULT; return err; } -static int cciss_ioctl32_big_passthru(struct file *file, unsigned cmd, - unsigned long arg) +static int cciss_ioctl32_big_passthru(struct file *file, unsigned cmd, unsigned long arg) { BIG_IOCTL32_Command_struct __user *arg32 = - (BIG_IOCTL32_Command_struct __user *) arg; + (BIG_IOCTL32_Command_struct __user *) arg; BIG_IOCTL_Command_struct arg64; - BIG_IOCTL_Command_struct __user *p = - compat_alloc_user_space(sizeof(arg64)); + BIG_IOCTL_Command_struct __user *p = compat_alloc_user_space(sizeof(arg64)); int err; u32 cp; err = 0; - err |= - copy_from_user(&arg64.LUN_info, &arg32->LUN_info, - sizeof(arg64.LUN_info)); - err |= - copy_from_user(&arg64.Request, &arg32->Request, - sizeof(arg64.Request)); - err |= - copy_from_user(&arg64.error_info, &arg32->error_info, - sizeof(arg64.error_info)); + err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, sizeof(arg64.LUN_info)); + err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request)); + err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info)); err |= get_user(arg64.buf_size, &arg32->buf_size); err |= get_user(arg64.malloc_size, &arg32->malloc_size); err |= get_user(cp, &arg32->buf); @@ -637,14 +626,12 @@ static int cciss_ioctl32_big_passthru(struct file *file, unsigned cmd, err |= copy_to_user(p, &arg64, sizeof(arg64)); if (err) - return -EFAULT; + return -EFAULT; - err = do_ioctl(file, CCISS_BIG_PASSTHRU, (unsigned long)p); + err = do_ioctl(file, CCISS_BIG_PASSTHRU, (unsigned long) p); if (err) return err; - err |= - copy_in_user(&arg32->error_info, &p->error_info, - sizeof(arg32->error_info)); + err |= copy_in_user(&arg32->error_info, &p->error_info, sizeof(arg32->error_info)); if (err) return -EFAULT; return err; @@ -665,10 +652,10 @@ static int cciss_getgeo(struct block_device *bdev, struct hd_geometry *geo) } /* - * ioctl + * ioctl */ -static int cciss_ioctl(struct inode *inode, struct file *filep, - unsigned int cmd, unsigned long arg) +static int cciss_ioctl(struct inode *inode, struct file *filep, + unsigned int cmd, unsigned long arg) { struct block_device *bdev = inode->i_bdev; struct gendisk *disk = bdev->bd_disk; @@ -679,193 +666,171 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss_ioctl: Called with cmd=%x %lx\n", cmd, arg); -#endif /* CCISS_DEBUG */ - - switch (cmd) { +#endif /* CCISS_DEBUG */ + + switch(cmd) { case CCISS_GETPCIINFO: - { - cciss_pci_info_struct pciinfo; - - if (!arg) - return -EINVAL; - pciinfo.domain = pci_domain_nr(host->pdev->bus); - pciinfo.bus = host->pdev->bus->number; - pciinfo.dev_fn = host->pdev->devfn; - pciinfo.board_id = host->board_id; - if (copy_to_user - (argp, &pciinfo, sizeof(cciss_pci_info_struct))) - return -EFAULT; - return 0; - } + { + cciss_pci_info_struct pciinfo; + + if (!arg) return -EINVAL; + pciinfo.domain = pci_domain_nr(host->pdev->bus); + pciinfo.bus = host->pdev->bus->number; + pciinfo.dev_fn = host->pdev->devfn; + pciinfo.board_id = host->board_id; + if (copy_to_user(argp, &pciinfo, sizeof( cciss_pci_info_struct ))) + return -EFAULT; + return(0); + } case CCISS_GETINTINFO: - { - cciss_coalint_struct intinfo; - if (!arg) - return -EINVAL; - intinfo.delay = - readl(&host->cfgtable->HostWrite.CoalIntDelay); - intinfo.count = - readl(&host->cfgtable->HostWrite.CoalIntCount); - if (copy_to_user - (argp, &intinfo, sizeof(cciss_coalint_struct))) - return -EFAULT; - return 0; - } + { + cciss_coalint_struct intinfo; + if (!arg) return -EINVAL; + intinfo.delay = readl(&host->cfgtable->HostWrite.CoalIntDelay); + intinfo.count = readl(&host->cfgtable->HostWrite.CoalIntCount); + if (copy_to_user(argp, &intinfo, sizeof( cciss_coalint_struct ))) + return -EFAULT; + return(0); + } case CCISS_SETINTINFO: - { - cciss_coalint_struct intinfo; - unsigned long flags; - int i; + { + cciss_coalint_struct intinfo; + unsigned long flags; + int i; - if (!arg) - return -EINVAL; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - if (copy_from_user - (&intinfo, argp, sizeof(cciss_coalint_struct))) - return -EFAULT; - if ((intinfo.delay == 0) && (intinfo.count == 0)) - { -// printk("cciss_ioctl: delay and count cannot be 0\n"); - return -EINVAL; - } - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - /* Update the field, and then ring the doorbell */ - writel(intinfo.delay, - &(host->cfgtable->HostWrite.CoalIntDelay)); - writel(intinfo.count, - &(host->cfgtable->HostWrite.CoalIntCount)); - writel(CFGTBL_ChangeReq, host->vaddr + SA5_DOORBELL); - - for (i = 0; i < MAX_IOCTL_CONFIG_WAIT; i++) { - if (!(readl(host->vaddr + SA5_DOORBELL) - & CFGTBL_ChangeReq)) - break; - /* delay and try again */ - udelay(1000); - } - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - if (i >= MAX_IOCTL_CONFIG_WAIT) - return -EAGAIN; - return 0; - } - case CCISS_GETNODENAME: - { - NodeName_type NodeName; - int i; + if (!arg) return -EINVAL; + if (!capable(CAP_SYS_ADMIN)) return -EPERM; + if (copy_from_user(&intinfo, argp, sizeof( cciss_coalint_struct))) + return -EFAULT; + if ( (intinfo.delay == 0 ) && (intinfo.count == 0)) - if (!arg) - return -EINVAL; - for (i = 0; i < 16; i++) - NodeName[i] = - readb(&host->cfgtable->ServerName[i]); - if (copy_to_user(argp, NodeName, sizeof(NodeName_type))) - return -EFAULT; - return 0; - } - case CCISS_SETNODENAME: { - NodeName_type NodeName; - unsigned long flags; - int i; - - if (!arg) - return -EINVAL; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - - if (copy_from_user - (NodeName, argp, sizeof(NodeName_type))) - return -EFAULT; - - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - - /* Update the field, and then ring the doorbell */ - for (i = 0; i < 16; i++) - writeb(NodeName[i], - &host->cfgtable->ServerName[i]); - - writel(CFGTBL_ChangeReq, host->vaddr + SA5_DOORBELL); - - for (i = 0; i < MAX_IOCTL_CONFIG_WAIT; i++) { - if (!(readl(host->vaddr + SA5_DOORBELL) - & CFGTBL_ChangeReq)) - break; - /* delay and try again */ - udelay(1000); - } - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - if (i >= MAX_IOCTL_CONFIG_WAIT) - return -EAGAIN; - return 0; +// printk("cciss_ioctl: delay and count cannot be 0\n"); + return( -EINVAL); } + spin_lock_irqsave(CCISS_LOCK(ctlr), flags); + /* Update the field, and then ring the doorbell */ + writel( intinfo.delay, + &(host->cfgtable->HostWrite.CoalIntDelay)); + writel( intinfo.count, + &(host->cfgtable->HostWrite.CoalIntCount)); + writel( CFGTBL_ChangeReq, host->vaddr + SA5_DOORBELL); + + for(i=0;ivaddr + SA5_DOORBELL) + & CFGTBL_ChangeReq)) + break; + /* delay and try again */ + udelay(1000); + } + spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); + if (i >= MAX_IOCTL_CONFIG_WAIT) + return -EAGAIN; + return(0); + } + case CCISS_GETNODENAME: + { + NodeName_type NodeName; + int i; + + if (!arg) return -EINVAL; + for(i=0;i<16;i++) + NodeName[i] = readb(&host->cfgtable->ServerName[i]); + if (copy_to_user(argp, NodeName, sizeof( NodeName_type))) + return -EFAULT; + return(0); + } + case CCISS_SETNODENAME: + { + NodeName_type NodeName; + unsigned long flags; + int i; + + if (!arg) return -EINVAL; + if (!capable(CAP_SYS_ADMIN)) return -EPERM; + + if (copy_from_user(NodeName, argp, sizeof( NodeName_type))) + return -EFAULT; + + spin_lock_irqsave(CCISS_LOCK(ctlr), flags); + + /* Update the field, and then ring the doorbell */ + for(i=0;i<16;i++) + writeb( NodeName[i], &host->cfgtable->ServerName[i]); + + writel( CFGTBL_ChangeReq, host->vaddr + SA5_DOORBELL); + + for(i=0;ivaddr + SA5_DOORBELL) + & CFGTBL_ChangeReq)) + break; + /* delay and try again */ + udelay(1000); + } + spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); + if (i >= MAX_IOCTL_CONFIG_WAIT) + return -EAGAIN; + return(0); + } case CCISS_GETHEARTBEAT: - { - Heartbeat_type heartbeat; - - if (!arg) - return -EINVAL; - heartbeat = readl(&host->cfgtable->HeartBeat); - if (copy_to_user - (argp, &heartbeat, sizeof(Heartbeat_type))) - return -EFAULT; - return 0; - } + { + Heartbeat_type heartbeat; + + if (!arg) return -EINVAL; + heartbeat = readl(&host->cfgtable->HeartBeat); + if (copy_to_user(argp, &heartbeat, sizeof( Heartbeat_type))) + return -EFAULT; + return(0); + } case CCISS_GETBUSTYPES: - { - BusTypes_type BusTypes; - - if (!arg) - return -EINVAL; - BusTypes = readl(&host->cfgtable->BusTypes); - if (copy_to_user - (argp, &BusTypes, sizeof(BusTypes_type))) - return -EFAULT; - return 0; - } + { + BusTypes_type BusTypes; + + if (!arg) return -EINVAL; + BusTypes = readl(&host->cfgtable->BusTypes); + if (copy_to_user(argp, &BusTypes, sizeof( BusTypes_type) )) + return -EFAULT; + return(0); + } case CCISS_GETFIRMVER: - { - FirmwareVer_type firmware; + { + FirmwareVer_type firmware; - if (!arg) - return -EINVAL; - memcpy(firmware, host->firm_ver, 4); + if (!arg) return -EINVAL; + memcpy(firmware, host->firm_ver, 4); - if (copy_to_user - (argp, firmware, sizeof(FirmwareVer_type))) - return -EFAULT; - return 0; - } - case CCISS_GETDRIVVER: - { - DriverVer_type DriverVer = DRIVER_VERSION; + if (copy_to_user(argp, firmware, sizeof( FirmwareVer_type))) + return -EFAULT; + return(0); + } + case CCISS_GETDRIVVER: + { + DriverVer_type DriverVer = DRIVER_VERSION; - if (!arg) - return -EINVAL; + if (!arg) return -EINVAL; - if (copy_to_user - (argp, &DriverVer, sizeof(DriverVer_type))) - return -EFAULT; - return 0; - } + if (copy_to_user(argp, &DriverVer, sizeof( DriverVer_type) )) + return -EFAULT; + return(0); + } case CCISS_REVALIDVOLS: if (bdev != bdev->bd_contains || drv != host->drv) return -ENXIO; - return revalidate_allvol(host); - - case CCISS_GETLUNINFO:{ - LogvolInfo_struct luninfo; - - luninfo.LunID = drv->LunID; - luninfo.num_opens = drv->usage_count; - luninfo.num_parts = 0; - if (copy_to_user(argp, &luninfo, - sizeof(LogvolInfo_struct))) - return -EFAULT; - return 0; - } + return revalidate_allvol(host); + + case CCISS_GETLUNINFO: { + LogvolInfo_struct luninfo; + + luninfo.LunID = drv->LunID; + luninfo.num_opens = drv->usage_count; + luninfo.num_parts = 0; + if (copy_to_user(argp, &luninfo, + sizeof(LogvolInfo_struct))) + return -EFAULT; + return(0); + } case CCISS_DEREGDISK: return rebuild_lun_table(host, disk); @@ -873,284 +838,278 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, return rebuild_lun_table(host, NULL); case CCISS_PASSTHRU: + { + IOCTL_Command_struct iocommand; + CommandList_struct *c; + char *buff = NULL; + u64bit temp64; + unsigned long flags; + DECLARE_COMPLETION(wait); + + if (!arg) return -EINVAL; + + if (!capable(CAP_SYS_RAWIO)) return -EPERM; + + if (copy_from_user(&iocommand, argp, sizeof( IOCTL_Command_struct) )) + return -EFAULT; + if((iocommand.buf_size < 1) && + (iocommand.Request.Type.Direction != XFER_NONE)) + { + return -EINVAL; + } +#if 0 /* 'buf_size' member is 16-bits, and always smaller than kmalloc limit */ + /* Check kmalloc limits */ + if(iocommand.buf_size > 128000) + return -EINVAL; +#endif + if(iocommand.buf_size > 0) { - IOCTL_Command_struct iocommand; - CommandList_struct *c; - char *buff = NULL; - u64bit temp64; - unsigned long flags; - DECLARE_COMPLETION_ONSTACK(wait); - - if (!arg) - return -EINVAL; - - if (!capable(CAP_SYS_RAWIO)) - return -EPERM; - - if (copy_from_user - (&iocommand, argp, sizeof(IOCTL_Command_struct))) + buff = kmalloc(iocommand.buf_size, GFP_KERNEL); + if( buff == NULL) return -EFAULT; - if ((iocommand.buf_size < 1) && - (iocommand.Request.Type.Direction != XFER_NONE)) { - return -EINVAL; - } -#if 0 /* 'buf_size' member is 16-bits, and always smaller than kmalloc limit */ - /* Check kmalloc limits */ - if (iocommand.buf_size > 128000) - return -EINVAL; -#endif - if (iocommand.buf_size > 0) { - buff = kmalloc(iocommand.buf_size, GFP_KERNEL); - if (buff == NULL) - return -EFAULT; - } - if (iocommand.Request.Type.Direction == XFER_WRITE) { - /* Copy the data into the buffer we created */ - if (copy_from_user - (buff, iocommand.buf, iocommand.buf_size)) { - kfree(buff); - return -EFAULT; - } - } else { - memset(buff, 0, iocommand.buf_size); - } - if ((c = cmd_alloc(host, 0)) == NULL) { - kfree(buff); - return -ENOMEM; - } - // Fill in the command type - c->cmd_type = CMD_IOCTL_PEND; - // Fill in Command Header - c->Header.ReplyQueue = 0; // unused in simple mode - if (iocommand.buf_size > 0) // buffer to fill - { - c->Header.SGList = 1; - c->Header.SGTotal = 1; - } else // no buffers to fill + } + if (iocommand.Request.Type.Direction == XFER_WRITE) + { + /* Copy the data into the buffer we created */ + if (copy_from_user(buff, iocommand.buf, iocommand.buf_size)) { - c->Header.SGList = 0; - c->Header.SGTotal = 0; - } - c->Header.LUN = iocommand.LUN_info; - c->Header.Tag.lower = c->busaddr; // use the kernel address the cmd block for tag - - // Fill in Request block - c->Request = iocommand.Request; - - // Fill in the scatter gather information - if (iocommand.buf_size > 0) { - temp64.val = pci_map_single(host->pdev, buff, - iocommand.buf_size, - PCI_DMA_BIDIRECTIONAL); - c->SG[0].Addr.lower = temp64.val32.lower; - c->SG[0].Addr.upper = temp64.val32.upper; - c->SG[0].Len = iocommand.buf_size; - c->SG[0].Ext = 0; // we are not chaining - } - c->waiting = &wait; - - /* Put the request on the tail of the request queue */ - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - addQ(&host->reqQ, c); - host->Qdepth++; - start_io(host); - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - - wait_for_completion(&wait); - - /* unlock the buffers from DMA */ - temp64.val32.lower = c->SG[0].Addr.lower; - temp64.val32.upper = c->SG[0].Addr.upper; - pci_unmap_single(host->pdev, (dma_addr_t) temp64.val, - iocommand.buf_size, - PCI_DMA_BIDIRECTIONAL); - - /* Copy the error information out */ - iocommand.error_info = *(c->err_info); - if (copy_to_user - (argp, &iocommand, sizeof(IOCTL_Command_struct))) { kfree(buff); - cmd_free(host, c, 0); return -EFAULT; } + } else { + memset(buff, 0, iocommand.buf_size); + } + if ((c = cmd_alloc(host , 0)) == NULL) + { + kfree(buff); + return -ENOMEM; + } + // Fill in the command type + c->cmd_type = CMD_IOCTL_PEND; + // Fill in Command Header + c->Header.ReplyQueue = 0; // unused in simple mode + if( iocommand.buf_size > 0) // buffer to fill + { + c->Header.SGList = 1; + c->Header.SGTotal= 1; + } else // no buffers to fill + { + c->Header.SGList = 0; + c->Header.SGTotal= 0; + } + c->Header.LUN = iocommand.LUN_info; + c->Header.Tag.lower = c->busaddr; // use the kernel address the cmd block for tag + + // Fill in Request block + c->Request = iocommand.Request; + + // Fill in the scatter gather information + if (iocommand.buf_size > 0 ) + { + temp64.val = pci_map_single( host->pdev, buff, + iocommand.buf_size, + PCI_DMA_BIDIRECTIONAL); + c->SG[0].Addr.lower = temp64.val32.lower; + c->SG[0].Addr.upper = temp64.val32.upper; + c->SG[0].Len = iocommand.buf_size; + c->SG[0].Ext = 0; // we are not chaining + } + c->waiting = &wait; - if (iocommand.Request.Type.Direction == XFER_READ) { - /* Copy the data out of the buffer we created */ - if (copy_to_user - (iocommand.buf, buff, iocommand.buf_size)) { - kfree(buff); - cmd_free(host, c, 0); - return -EFAULT; - } - } + /* Put the request on the tail of the request queue */ + spin_lock_irqsave(CCISS_LOCK(ctlr), flags); + addQ(&host->reqQ, c); + host->Qdepth++; + start_io(host); + spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); + + wait_for_completion(&wait); + + /* unlock the buffers from DMA */ + temp64.val32.lower = c->SG[0].Addr.lower; + temp64.val32.upper = c->SG[0].Addr.upper; + pci_unmap_single( host->pdev, (dma_addr_t) temp64.val, + iocommand.buf_size, PCI_DMA_BIDIRECTIONAL); + + /* Copy the error information out */ + iocommand.error_info = *(c->err_info); + if ( copy_to_user(argp, &iocommand, sizeof( IOCTL_Command_struct) ) ) + { kfree(buff); cmd_free(host, c, 0); - return 0; - } - case CCISS_BIG_PASSTHRU:{ - BIG_IOCTL_Command_struct *ioc; - CommandList_struct *c; - unsigned char **buff = NULL; - int *buff_size = NULL; - u64bit temp64; - unsigned long flags; - BYTE sg_used = 0; - int status = 0; - int i; - DECLARE_COMPLETION_ONSTACK(wait); - __u32 left; - __u32 sz; - BYTE __user *data_ptr; - - if (!arg) - return -EINVAL; - if (!capable(CAP_SYS_RAWIO)) - return -EPERM; - ioc = (BIG_IOCTL_Command_struct *) - kmalloc(sizeof(*ioc), GFP_KERNEL); - if (!ioc) { - status = -ENOMEM; - goto cleanup1; - } - if (copy_from_user(ioc, argp, sizeof(*ioc))) { - status = -EFAULT; - goto cleanup1; - } - if ((ioc->buf_size < 1) && - (ioc->Request.Type.Direction != XFER_NONE)) { - status = -EINVAL; - goto cleanup1; - } - /* Check kmalloc limits using all SGs */ - if (ioc->malloc_size > MAX_KMALLOC_SIZE) { - status = -EINVAL; - goto cleanup1; + return( -EFAULT); + } + + if (iocommand.Request.Type.Direction == XFER_READ) + { + /* Copy the data out of the buffer we created */ + if (copy_to_user(iocommand.buf, buff, iocommand.buf_size)) + { + kfree(buff); + cmd_free(host, c, 0); + return -EFAULT; } - if (ioc->buf_size > ioc->malloc_size * MAXSGENTRIES) { + } + kfree(buff); + cmd_free(host, c, 0); + return(0); + } + case CCISS_BIG_PASSTHRU: { + BIG_IOCTL_Command_struct *ioc; + CommandList_struct *c; + unsigned char **buff = NULL; + int *buff_size = NULL; + u64bit temp64; + unsigned long flags; + BYTE sg_used = 0; + int status = 0; + int i; + DECLARE_COMPLETION(wait); + __u32 left; + __u32 sz; + BYTE __user *data_ptr; + + if (!arg) + return -EINVAL; + if (!capable(CAP_SYS_RAWIO)) + return -EPERM; + ioc = (BIG_IOCTL_Command_struct *) + kmalloc(sizeof(*ioc), GFP_KERNEL); + if (!ioc) { + status = -ENOMEM; + goto cleanup1; + } + if (copy_from_user(ioc, argp, sizeof(*ioc))) { + status = -EFAULT; + goto cleanup1; + } + if ((ioc->buf_size < 1) && + (ioc->Request.Type.Direction != XFER_NONE)) { status = -EINVAL; goto cleanup1; - } - buff = - kzalloc(MAXSGENTRIES * sizeof(char *), GFP_KERNEL); - if (!buff) { - status = -ENOMEM; - goto cleanup1; - } - buff_size = (int *)kmalloc(MAXSGENTRIES * sizeof(int), - GFP_KERNEL); - if (!buff_size) { + } + /* Check kmalloc limits using all SGs */ + if (ioc->malloc_size > MAX_KMALLOC_SIZE) { + status = -EINVAL; + goto cleanup1; + } + if (ioc->buf_size > ioc->malloc_size * MAXSGENTRIES) { + status = -EINVAL; + goto cleanup1; + } + buff = kzalloc(MAXSGENTRIES * sizeof(char *), GFP_KERNEL); + if (!buff) { + status = -ENOMEM; + goto cleanup1; + } + buff_size = (int *) kmalloc(MAXSGENTRIES * sizeof(int), + GFP_KERNEL); + if (!buff_size) { + status = -ENOMEM; + goto cleanup1; + } + left = ioc->buf_size; + data_ptr = ioc->buf; + while (left) { + sz = (left > ioc->malloc_size) ? ioc->malloc_size : left; + buff_size[sg_used] = sz; + buff[sg_used] = kmalloc(sz, GFP_KERNEL); + if (buff[sg_used] == NULL) { status = -ENOMEM; goto cleanup1; } - left = ioc->buf_size; - data_ptr = ioc->buf; - while (left) { - sz = (left > - ioc->malloc_size) ? ioc-> - malloc_size : left; - buff_size[sg_used] = sz; - buff[sg_used] = kmalloc(sz, GFP_KERNEL); - if (buff[sg_used] == NULL) { + if (ioc->Request.Type.Direction == XFER_WRITE) { + if (copy_from_user(buff[sg_used], data_ptr, sz)) { status = -ENOMEM; goto cleanup1; } - if (ioc->Request.Type.Direction == XFER_WRITE) { - if (copy_from_user - (buff[sg_used], data_ptr, sz)) { - status = -ENOMEM; - goto cleanup1; - } - } else { - memset(buff[sg_used], 0, sz); - } - left -= sz; - data_ptr += sz; - sg_used++; - } - if ((c = cmd_alloc(host, 0)) == NULL) { - status = -ENOMEM; - goto cleanup1; - } - c->cmd_type = CMD_IOCTL_PEND; - c->Header.ReplyQueue = 0; - - if (ioc->buf_size > 0) { - c->Header.SGList = sg_used; - c->Header.SGTotal = sg_used; } else { - c->Header.SGList = 0; - c->Header.SGTotal = 0; - } - c->Header.LUN = ioc->LUN_info; - c->Header.Tag.lower = c->busaddr; - - c->Request = ioc->Request; - if (ioc->buf_size > 0) { - int i; - for (i = 0; i < sg_used; i++) { - temp64.val = - pci_map_single(host->pdev, buff[i], - buff_size[i], - PCI_DMA_BIDIRECTIONAL); - c->SG[i].Addr.lower = - temp64.val32.lower; - c->SG[i].Addr.upper = - temp64.val32.upper; - c->SG[i].Len = buff_size[i]; - c->SG[i].Ext = 0; /* we are not chaining */ - } + memset(buff[sg_used], 0, sz); } - c->waiting = &wait; - /* Put the request on the tail of the request queue */ - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - addQ(&host->reqQ, c); - host->Qdepth++; - start_io(host); - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - wait_for_completion(&wait); - /* unlock the buffers from DMA */ - for (i = 0; i < sg_used; i++) { - temp64.val32.lower = c->SG[i].Addr.lower; - temp64.val32.upper = c->SG[i].Addr.upper; - pci_unmap_single(host->pdev, - (dma_addr_t) temp64.val, buff_size[i], + left -= sz; + data_ptr += sz; + sg_used++; + } + if ((c = cmd_alloc(host , 0)) == NULL) { + status = -ENOMEM; + goto cleanup1; + } + c->cmd_type = CMD_IOCTL_PEND; + c->Header.ReplyQueue = 0; + + if( ioc->buf_size > 0) { + c->Header.SGList = sg_used; + c->Header.SGTotal= sg_used; + } else { + c->Header.SGList = 0; + c->Header.SGTotal= 0; + } + c->Header.LUN = ioc->LUN_info; + c->Header.Tag.lower = c->busaddr; + + c->Request = ioc->Request; + if (ioc->buf_size > 0 ) { + int i; + for(i=0; ipdev, buff[i], + buff_size[i], PCI_DMA_BIDIRECTIONAL); + c->SG[i].Addr.lower = temp64.val32.lower; + c->SG[i].Addr.upper = temp64.val32.upper; + c->SG[i].Len = buff_size[i]; + c->SG[i].Ext = 0; /* we are not chaining */ } - /* Copy the error information out */ - ioc->error_info = *(c->err_info); - if (copy_to_user(argp, ioc, sizeof(*ioc))) { - cmd_free(host, c, 0); - status = -EFAULT; - goto cleanup1; - } - if (ioc->Request.Type.Direction == XFER_READ) { - /* Copy the data out of the buffer we created */ - BYTE __user *ptr = ioc->buf; - for (i = 0; i < sg_used; i++) { - if (copy_to_user - (ptr, buff[i], buff_size[i])) { - cmd_free(host, c, 0); - status = -EFAULT; - goto cleanup1; - } - ptr += buff_size[i]; - } - } + } + c->waiting = &wait; + /* Put the request on the tail of the request queue */ + spin_lock_irqsave(CCISS_LOCK(ctlr), flags); + addQ(&host->reqQ, c); + host->Qdepth++; + start_io(host); + spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); + wait_for_completion(&wait); + /* unlock the buffers from DMA */ + for(i=0; iSG[i].Addr.lower; + temp64.val32.upper = c->SG[i].Addr.upper; + pci_unmap_single( host->pdev, (dma_addr_t) temp64.val, + buff_size[i], PCI_DMA_BIDIRECTIONAL); + } + /* Copy the error information out */ + ioc->error_info = *(c->err_info); + if (copy_to_user(argp, ioc, sizeof(*ioc))) { cmd_free(host, c, 0); - status = 0; - cleanup1: - if (buff) { - for (i = 0; i < sg_used; i++) - kfree(buff[i]); - kfree(buff); + status = -EFAULT; + goto cleanup1; + } + if (ioc->Request.Type.Direction == XFER_READ) { + /* Copy the data out of the buffer we created */ + BYTE __user *ptr = ioc->buf; + for(i=0; i< sg_used; i++) { + if (copy_to_user(ptr, buff[i], buff_size[i])) { + cmd_free(host, c, 0); + status = -EFAULT; + goto cleanup1; + } + ptr += buff_size[i]; } - kfree(buff_size); - kfree(ioc); - return status; } + cmd_free(host, c, 0); + status = 0; +cleanup1: + if (buff) { + for(i=0; ictlr, i; unsigned long flags; - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - if (host->usage_count > 1) { - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - printk(KERN_WARNING "cciss: Device busy for volume" - " revalidation (usage=%d)\n", host->usage_count); - return -EBUSY; - } - host->usage_count++; + spin_lock_irqsave(CCISS_LOCK(ctlr), flags); + if (host->usage_count > 1) { + spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); + printk(KERN_WARNING "cciss: Device busy for volume" + " revalidation (usage=%d)\n", host->usage_count); + return -EBUSY; + } + host->usage_count++; spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - for (i = 0; i < NWD; i++) { + for(i=0; i< NWD; i++) { struct gendisk *disk = host->gendisk[i]; if (disk) { request_queue_t *q = disk->queue; @@ -1191,22 +1150,22 @@ static int revalidate_allvol(ctlr_info_t *host) } } - /* - * Set the partition and block size structures for all volumes - * on this controller to zero. We will reread all of this data - */ - memset(host->drv, 0, sizeof(drive_info_struct) - * CISS_MAX_LUN); - /* - * Tell the array controller not to give us any interrupts while - * we check the new geometry. Then turn interrupts back on when - * we're done. - */ - host->access.set_intr_mask(host, CCISS_INTR_OFF); - cciss_getgeometry(ctlr); - host->access.set_intr_mask(host, CCISS_INTR_ON); - - /* Loop through each real device */ + /* + * Set the partition and block size structures for all volumes + * on this controller to zero. We will reread all of this data + */ + memset(host->drv, 0, sizeof(drive_info_struct) + * CISS_MAX_LUN); + /* + * Tell the array controller not to give us any interrupts while + * we check the new geometry. Then turn interrupts back on when + * we're done. + */ + host->access.set_intr_mask(host, CCISS_INTR_OFF); + cciss_getgeometry(ctlr); + host->access.set_intr_mask(host, CCISS_INTR_ON); + + /* Loop through each real device */ for (i = 0; i < NWD; i++) { struct gendisk *disk = host->gendisk[i]; drive_info_struct *drv = &(host->drv[i]); @@ -1218,8 +1177,8 @@ static int revalidate_allvol(ctlr_info_t *host) set_capacity(disk, drv->nr_blocks); add_disk(disk); } - host->usage_count--; - return 0; + host->usage_count--; + return 0; } static inline void complete_buffers(struct bio *bio, int status) @@ -1233,50 +1192,7 @@ static inline void complete_buffers(struct bio *bio, int status) bio_endio(bio, nr_sectors << 9, status ? 0 : -EIO); bio = xbh; } -} - -static void cciss_check_queues(ctlr_info_t *h) -{ - int start_queue = h->next_to_run; - int i; - - /* check to see if we have maxed out the number of commands that can - * be placed on the queue. If so then exit. We do this check here - * in case the interrupt we serviced was from an ioctl and did not - * free any new commands. - */ - if ((find_first_zero_bit(h->cmd_pool_bits, NR_CMDS)) == NR_CMDS) - return; - /* We have room on the queue for more commands. Now we need to queue - * them up. We will also keep track of the next queue to run so - * that every queue gets a chance to be started first. - */ - for (i = 0; i < h->highest_lun + 1; i++) { - int curr_queue = (start_queue + i) % (h->highest_lun + 1); - /* make sure the disk has been added and the drive is real - * because this can be called from the middle of init_one. - */ - if (!(h->drv[curr_queue].queue) || !(h->drv[curr_queue].heads)) - continue; - blk_start_queue(h->gendisk[curr_queue]->queue); - - /* check to see if we have maxed out the number of commands - * that can be placed on the queue. - */ - if ((find_first_zero_bit(h->cmd_pool_bits, NR_CMDS)) == NR_CMDS) { - if (curr_queue == start_queue) { - h->next_to_run = - (start_queue + 1) % (h->highest_lun + 1); - break; - } else { - h->next_to_run = curr_queue; - break; - } - } else { - curr_queue = (curr_queue + 1) % (h->highest_lun + 1); - } - } } static void cciss_softirq_done(struct request *rq) @@ -1294,7 +1210,7 @@ static void cciss_softirq_done(struct request *rq) /* command did not need to be retried */ /* unmap the DMA mapping for all the scatter gather elements */ - for (i = 0; i < cmd->Header.SGList; i++) { + for(i=0; iHeader.SGList; i++) { temp64.val32.lower = cmd->SG[i].Addr.lower; temp64.val32.upper = cmd->SG[i].Addr.upper; pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir); @@ -1302,21 +1218,13 @@ static void cciss_softirq_done(struct request *rq) complete_buffers(rq->bio, rq->errors); - if (blk_fs_request(rq)) { - const int rw = rq_data_dir(rq); - - disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); - } - #ifdef CCISS_DEBUG printk("Done with %p\n", rq); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ - add_disk_randomness(rq->rq_disk); spin_lock_irqsave(&h->lock, flags); end_that_request_last(rq, rq->errors); - cmd_free(h, cmd, 1); - cciss_check_queues(h); + cmd_free(h, cmd,1); spin_unlock_irqrestore(&h->lock, flags); } @@ -1327,9 +1235,9 @@ static void cciss_softirq_done(struct request *rq) * will always be left registered with the kernel since it is also the * controller node. Any changes to disk 0 will show up on the next * reboot. - */ +*/ static void cciss_update_drive_info(int ctlr, int drv_index) -{ + { ctlr_info_t *h = hba[ctlr]; struct gendisk *disk; ReadCapdata_struct *size_buff = NULL; @@ -1339,13 +1247,13 @@ static void cciss_update_drive_info(int ctlr, int drv_index) unsigned long flags = 0; int ret = 0; - /* if the disk already exists then deregister it before proceeding */ - if (h->drv[drv_index].raid_level != -1) { + /* if the disk already exists then deregister it before proceeding*/ + if (h->drv[drv_index].raid_level != -1){ spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); h->drv[drv_index].busy_configuring = 1; spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); ret = deregister_disk(h->gendisk[drv_index], - &h->drv[drv_index], 0); + &h->drv[drv_index], 0); h->drv[drv_index].busy_configuring = 0; } @@ -1353,25 +1261,27 @@ static void cciss_update_drive_info(int ctlr, int drv_index) if (ret) return; - /* Get information about the disk and modify the driver structure */ - size_buff = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL); - if (size_buff == NULL) + + /* Get information about the disk and modify the driver sturcture */ + size_buff = kmalloc(sizeof( ReadCapdata_struct), GFP_KERNEL); + if (size_buff == NULL) goto mem_msg; - inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL); + inq_buff = kmalloc(sizeof( InquiryData_struct), GFP_KERNEL); if (inq_buff == NULL) goto mem_msg; cciss_read_capacity(ctlr, drv_index, size_buff, 1, - &total_size, &block_size); + &total_size, &block_size); cciss_geometry_inquiry(ctlr, drv_index, 1, total_size, block_size, - inq_buff, &h->drv[drv_index]); + inq_buff, &h->drv[drv_index]); ++h->num_luns; disk = h->gendisk[drv_index]; set_capacity(disk, h->drv[drv_index].nr_blocks); + /* if it's the controller it's already added */ - if (drv_index) { + if (drv_index){ disk->queue = blk_init_queue(do_cciss_request, &h->lock); /* Set up queue information */ @@ -1391,17 +1301,17 @@ static void cciss_update_drive_info(int ctlr, int drv_index) disk->queue->queuedata = hba[ctlr]; blk_queue_hardsect_size(disk->queue, - hba[ctlr]->drv[drv_index].block_size); + hba[ctlr]->drv[drv_index].block_size); h->drv[drv_index].queue = disk->queue; add_disk(disk); } - freeret: +freeret: kfree(size_buff); kfree(inq_buff); return; - mem_msg: +mem_msg: printk(KERN_ERR "cciss: out of memory\n"); goto freeret; } @@ -1411,13 +1321,13 @@ static void cciss_update_drive_info(int ctlr, int drv_index) * where new drives will be added. If the index to be returned is greater * than the highest_lun index for the controller then highest_lun is set * to this new index. If there are no available indexes then -1 is returned. - */ +*/ static int cciss_find_free_drive_index(int ctlr) { int i; - for (i = 0; i < CISS_MAX_LUN; i++) { - if (hba[ctlr]->drv[i].raid_level == -1) { + for (i=0; i < CISS_MAX_LUN; i++){ + if (hba[ctlr]->drv[i].raid_level == -1){ if (i > hba[ctlr]->highest_lun) hba[ctlr]->highest_lun = i; return i; @@ -1427,7 +1337,7 @@ static int cciss_find_free_drive_index(int ctlr) } /* This function will add and remove logical drives from the Logical - * drive array of the controller and maintain persistency of ordering + * drive array of the controller and maintain persistancy of ordering * so that mount points are preserved until the next reboot. This allows * for the removal of logical drives in the middle of the drive array * without a re-ordering of those drives. @@ -1435,7 +1345,7 @@ static int cciss_find_free_drive_index(int ctlr) * h = The controller to perform the operations on * del_disk = The disk to remove if specified. If the value given * is NULL then no disk is removed. - */ +*/ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) { int ctlr = h->ctlr; @@ -1452,12 +1362,12 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) /* Set busy_configuring flag for this operation */ spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); - if (h->num_luns >= CISS_MAX_LUN) { + if (h->num_luns >= CISS_MAX_LUN){ spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); return -EINVAL; } - if (h->busy_configuring) { + if (h->busy_configuring){ spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); return -EBUSY; } @@ -1467,7 +1377,7 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) * and update the logical drive table. If it is not NULL then * we will check if the disk is in use or not. */ - if (del_disk != NULL) { + if (del_disk != NULL){ drv = get_drv(del_disk); drv->busy_configuring = 1; spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); @@ -1485,67 +1395,61 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) goto mem_msg; return_code = sendcmd_withirq(CISS_REPORT_LOG, ctlr, ld_buff, - sizeof(ReportLunData_struct), 0, - 0, 0, TYPE_CMD); - - if (return_code == IO_OK) { - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[0])) - << 24; - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[1])) - << 16; - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[2])) - << 8; - listlength |= - 0xff & (unsigned int)(ld_buff->LUNListLength[3]); - } else { /* reading number of logical volumes failed */ + sizeof(ReportLunData_struct), 0, 0, 0, + TYPE_CMD); + + if (return_code == IO_OK){ + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24; + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16; + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8; + listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]); + } else{ /* reading number of logical volumes failed */ printk(KERN_WARNING "cciss: report logical volume" - " command failed\n"); + " command failed\n"); listlength = 0; goto freeret; } num_luns = listlength / 8; /* 8 bytes per entry */ - if (num_luns > CISS_MAX_LUN) { + if (num_luns > CISS_MAX_LUN){ num_luns = CISS_MAX_LUN; printk(KERN_WARNING "cciss: more luns configured" - " on controller than can be handled by" - " this driver.\n"); + " on controller than can be handled by" + " this driver.\n"); } /* Compare controller drive array to drivers drive array. - * Check for updates in the drive information and any new drives - * on the controller. - */ - for (i = 0; i < num_luns; i++) { + * Check for updates in the drive information and any new drives + * on the controller. + */ + for (i=0; i < num_luns; i++){ int j; drv_found = 0; - lunid = (0xff & - (unsigned int)(ld_buff->LUN[i][3])) << 24; - lunid |= (0xff & - (unsigned int)(ld_buff->LUN[i][2])) << 16; - lunid |= (0xff & - (unsigned int)(ld_buff->LUN[i][1])) << 8; - lunid |= 0xff & (unsigned int)(ld_buff->LUN[i][0]); + lunid = (0xff & + (unsigned int)(ld_buff->LUN[i][3])) << 24; + lunid |= (0xff & + (unsigned int)(ld_buff->LUN[i][2])) << 16; + lunid |= (0xff & + (unsigned int)(ld_buff->LUN[i][1])) << 8; + lunid |= 0xff & + (unsigned int)(ld_buff->LUN[i][0]); /* Find if the LUN is already in the drive array * of the controller. If so then update its info * if not is use. If it does not exist then find * the first free index and add it. - */ - for (j = 0; j <= h->highest_lun; j++) { - if (h->drv[j].LunID == lunid) { + */ + for (j=0; j <= h->highest_lun; j++){ + if (h->drv[j].LunID == lunid){ drv_index = j; drv_found = 1; } } /* check if the drive was found already in the array */ - if (!drv_found) { + if (!drv_found){ drv_index = cciss_find_free_drive_index(ctlr); if (drv_index == -1) goto freeret; @@ -1553,18 +1457,18 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) } h->drv[drv_index].LunID = lunid; cciss_update_drive_info(ctlr, drv_index); - } /* end for */ - } /* end else */ + } /* end for */ + } /* end else */ - freeret: +freeret: kfree(ld_buff); h->busy_configuring = 0; /* We return -1 here to tell the ACU that we have registered/updated * all of the drives that we can and to keep it from calling us * additional times. - */ + */ return -1; - mem_msg: +mem_msg: printk(KERN_ERR "cciss: out of memory\n"); goto freeret; } @@ -1580,7 +1484,7 @@ static int rebuild_lun_table(ctlr_info_t *h, struct gendisk *del_disk) * clear_all = This flag determines whether or not the disk information * is going to be completely cleared out and the highest_lun * reset. Sometimes we want to clear out information about - * the disk in preparation for re-adding it. In this case + * the disk in preperation for re-adding it. In this case * the highest_lun should be left unchanged and the LunID * should not be cleared. */ @@ -1593,17 +1497,19 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, return -EPERM; /* make sure logical volume is NOT is use */ - if (clear_all || (h->gendisk[0] == disk)) { - if (drv->usage_count > 1) - return -EBUSY; - } else if (drv->usage_count > 0) - return -EBUSY; + if(clear_all || (h->gendisk[0] == disk)) { + if (drv->usage_count > 1) + return -EBUSY; + } + else + if( drv->usage_count > 0 ) + return -EBUSY; /* invalidate the devices and deregister the disk. If it is disk * zero do not deregister it but just zero out it's values. This * allows us to delete disk zero but keep the controller registered. - */ - if (h->gendisk[0] != disk) { + */ + if (h->gendisk[0] != disk){ if (disk) { request_queue_t *q = disk->queue; if (disk->flags & GENHD_FL_UP) @@ -1625,90 +1531,91 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv, drv->raid_level = -1; /* This can be used as a flag variable to * indicate that this element of the drive * array is free. - */ - - if (clear_all) { - /* check to see if it was the last disk */ - if (drv == h->drv + h->highest_lun) { - /* if so, find the new hightest lun */ - int i, newhighest = -1; - for (i = 0; i < h->highest_lun; i++) { - /* if the disk has size > 0, it is available */ + */ + + if (clear_all){ + /* check to see if it was the last disk */ + if (drv == h->drv + h->highest_lun) { + /* if so, find the new hightest lun */ + int i, newhighest =-1; + for(i=0; ihighest_lun; i++) { + /* if the disk has size > 0, it is available */ if (h->drv[i].heads) - newhighest = i; - } - h->highest_lun = newhighest; + newhighest = i; } + h->highest_lun = newhighest; + } - drv->LunID = 0; + drv->LunID = 0; } - return 0; + return(0); } -static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, size_t size, unsigned int use_unit_num, /* 0: address the controller, - 1: address logical volume log_unit, - 2: periph device address is scsi3addr */ - unsigned int log_unit, __u8 page_code, - unsigned char *scsi3addr, int cmd_type) +static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, + size_t size, + unsigned int use_unit_num, /* 0: address the controller, + 1: address logical volume log_unit, + 2: periph device address is scsi3addr */ + unsigned int log_unit, __u8 page_code, unsigned char *scsi3addr, + int cmd_type) { - ctlr_info_t *h = hba[ctlr]; + ctlr_info_t *h= hba[ctlr]; u64bit buff_dma_handle; int status = IO_OK; c->cmd_type = CMD_IOCTL_PEND; c->Header.ReplyQueue = 0; - if (buff != NULL) { + if( buff != NULL) { c->Header.SGList = 1; - c->Header.SGTotal = 1; + c->Header.SGTotal= 1; } else { c->Header.SGList = 0; - c->Header.SGTotal = 0; + c->Header.SGTotal= 0; } c->Header.Tag.lower = c->busaddr; c->Request.Type.Type = cmd_type; if (cmd_type == TYPE_CMD) { - switch (cmd) { - case CISS_INQUIRY: + switch(cmd) { + case CISS_INQUIRY: /* If the logical unit number is 0 then, this is going - to controller so It's a physical command - mode = 0 target = 0. So we have nothing to write. - otherwise, if use_unit_num == 1, - mode = 1(volume set addressing) target = LUNID - otherwise, if use_unit_num == 2, - mode = 0(periph dev addr) target = scsi3addr */ + to controller so It's a physical command + mode = 0 target = 0. So we have nothing to write. + otherwise, if use_unit_num == 1, + mode = 1(volume set addressing) target = LUNID + otherwise, if use_unit_num == 2, + mode = 0(periph dev addr) target = scsi3addr */ if (use_unit_num == 1) { - c->Header.LUN.LogDev.VolId = - h->drv[log_unit].LunID; - c->Header.LUN.LogDev.Mode = 1; + c->Header.LUN.LogDev.VolId= + h->drv[log_unit].LunID; + c->Header.LUN.LogDev.Mode = 1; } else if (use_unit_num == 2) { - memcpy(c->Header.LUN.LunAddrBytes, scsi3addr, - 8); + memcpy(c->Header.LUN.LunAddrBytes,scsi3addr,8); c->Header.LUN.LogDev.Mode = 0; } /* are we trying to read a vital product page */ - if (page_code != 0) { + if(page_code != 0) { c->Request.CDB[1] = 0x01; c->Request.CDB[2] = page_code; } c->Request.CDBLen = 6; - c->Request.Type.Attribute = ATTR_SIMPLE; + c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_READ; c->Request.Timeout = 0; - c->Request.CDB[0] = CISS_INQUIRY; - c->Request.CDB[4] = size & 0xFF; - break; + c->Request.CDB[0] = CISS_INQUIRY; + c->Request.CDB[4] = size & 0xFF; + break; case CISS_REPORT_LOG: case CISS_REPORT_PHYS: - /* Talking to controller so It's a physical command + /* Talking to controller so It's a physical command mode = 00 target = 0. Nothing to write. - */ + */ c->Request.CDBLen = 12; c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_READ; c->Request.Timeout = 0; c->Request.CDB[0] = cmd; - c->Request.CDB[6] = (size >> 24) & 0xFF; //MSB + c->Request.CDB[6] = (size >> 24) & 0xFF; //MSB c->Request.CDB[7] = (size >> 16) & 0xFF; c->Request.CDB[8] = (size >> 8) & 0xFF; c->Request.CDB[9] = size & 0xFF; @@ -1722,7 +1629,7 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, size_ c->Request.Type.Direction = XFER_READ; c->Request.Timeout = 0; c->Request.CDB[0] = cmd; - break; + break; case CCISS_CACHE_FLUSH: c->Request.CDBLen = 12; c->Request.Type.Attribute = ATTR_SIMPLE; @@ -1730,32 +1637,32 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, size_ c->Request.Timeout = 0; c->Request.CDB[0] = BMIC_WRITE; c->Request.CDB[6] = BMIC_CACHE_FLUSH; - break; + break; default: printk(KERN_WARNING - "cciss%d: Unknown Command 0x%c\n", ctlr, cmd); - return IO_ERROR; + "cciss%d: Unknown Command 0x%c\n", ctlr, cmd); + return(IO_ERROR); } } else if (cmd_type == TYPE_MSG) { switch (cmd) { - case 0: /* ABORT message */ + case 0: /* ABORT message */ c->Request.CDBLen = 12; c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_WRITE; c->Request.Timeout = 0; - c->Request.CDB[0] = cmd; /* abort */ - c->Request.CDB[1] = 0; /* abort a command */ + c->Request.CDB[0] = cmd; /* abort */ + c->Request.CDB[1] = 0; /* abort a command */ /* buff contains the tag of the command to abort */ memcpy(&c->Request.CDB[4], buff, 8); break; - case 1: /* RESET message */ + case 1: /* RESET message */ c->Request.CDBLen = 12; c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_WRITE; c->Request.Timeout = 0; memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB)); - c->Request.CDB[0] = cmd; /* reset */ - c->Request.CDB[1] = 0x04; /* reset a LUN */ + c->Request.CDB[0] = cmd; /* reset */ + c->Request.CDB[1] = 0x04; /* reset a LUN */ case 3: /* No-Op message */ c->Request.CDBLen = 1; c->Request.Type.Attribute = ATTR_SIMPLE; @@ -1765,164 +1672,168 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, size_ break; default: printk(KERN_WARNING - "cciss%d: unknown message type %d\n", ctlr, cmd); + "cciss%d: unknown message type %d\n", + ctlr, cmd); return IO_ERROR; } } else { printk(KERN_WARNING - "cciss%d: unknown command type %d\n", ctlr, cmd_type); + "cciss%d: unknown command type %d\n", ctlr, cmd_type); return IO_ERROR; } /* Fill in the scatter gather information */ if (size > 0) { buff_dma_handle.val = (__u64) pci_map_single(h->pdev, - buff, size, - PCI_DMA_BIDIRECTIONAL); + buff, size, PCI_DMA_BIDIRECTIONAL); c->SG[0].Addr.lower = buff_dma_handle.val32.lower; c->SG[0].Addr.upper = buff_dma_handle.val32.upper; c->SG[0].Len = size; - c->SG[0].Ext = 0; /* we are not chaining */ + c->SG[0].Ext = 0; /* we are not chaining */ } return status; } - -static int sendcmd_withirq(__u8 cmd, - int ctlr, - void *buff, - size_t size, - unsigned int use_unit_num, - unsigned int log_unit, __u8 page_code, int cmd_type) +static int sendcmd_withirq(__u8 cmd, + int ctlr, + void *buff, + size_t size, + unsigned int use_unit_num, + unsigned int log_unit, + __u8 page_code, + int cmd_type) { ctlr_info_t *h = hba[ctlr]; CommandList_struct *c; - u64bit buff_dma_handle; + u64bit buff_dma_handle; unsigned long flags; int return_status; - DECLARE_COMPLETION_ONSTACK(wait); - - if ((c = cmd_alloc(h, 0)) == NULL) + DECLARE_COMPLETION(wait); + + if ((c = cmd_alloc(h , 0)) == NULL) return -ENOMEM; return_status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num, - log_unit, page_code, NULL, cmd_type); + log_unit, page_code, NULL, cmd_type); if (return_status != IO_OK) { cmd_free(h, c, 0); return return_status; } - resend_cmd2: +resend_cmd2: c->waiting = &wait; - + /* Put the request on the tail of the queue and send it */ spin_lock_irqsave(CCISS_LOCK(ctlr), flags); addQ(&h->reqQ, c); h->Qdepth++; start_io(h); spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - + wait_for_completion(&wait); - if (c->err_info->CommandStatus != 0) { /* an error has occurred */ - switch (c->err_info->CommandStatus) { - case CMD_TARGET_STATUS: - printk(KERN_WARNING "cciss: cmd %p has " - " completed with errors\n", c); - if (c->err_info->ScsiStatus) { - printk(KERN_WARNING "cciss: cmd %p " - "has SCSI Status = %x\n", - c, c->err_info->ScsiStatus); - } + if(c->err_info->CommandStatus != 0) + { /* an error has occurred */ + switch(c->err_info->CommandStatus) + { + case CMD_TARGET_STATUS: + printk(KERN_WARNING "cciss: cmd %p has " + " completed with errors\n", c); + if( c->err_info->ScsiStatus) + { + printk(KERN_WARNING "cciss: cmd %p " + "has SCSI Status = %x\n", + c, + c->err_info->ScsiStatus); + } break; - case CMD_DATA_UNDERRUN: - case CMD_DATA_OVERRUN: + case CMD_DATA_UNDERRUN: + case CMD_DATA_OVERRUN: /* expected for inquire and report lun commands */ break; - case CMD_INVALID: - printk(KERN_WARNING "cciss: Cmd %p is " - "reported invalid\n", c); - return_status = IO_ERROR; - break; - case CMD_PROTOCOL_ERR: - printk(KERN_WARNING "cciss: cmd %p has " - "protocol error \n", c); - return_status = IO_ERROR; - break; - case CMD_HARDWARE_ERR: - printk(KERN_WARNING "cciss: cmd %p had " - " hardware error\n", c); - return_status = IO_ERROR; + case CMD_INVALID: + printk(KERN_WARNING "cciss: Cmd %p is " + "reported invalid\n", c); + return_status = IO_ERROR; break; - case CMD_CONNECTION_LOST: - printk(KERN_WARNING "cciss: cmd %p had " - "connection lost\n", c); - return_status = IO_ERROR; + case CMD_PROTOCOL_ERR: + printk(KERN_WARNING "cciss: cmd %p has " + "protocol error \n", c); + return_status = IO_ERROR; + break; +case CMD_HARDWARE_ERR: + printk(KERN_WARNING "cciss: cmd %p had " + " hardware error\n", c); + return_status = IO_ERROR; + break; + case CMD_CONNECTION_LOST: + printk(KERN_WARNING "cciss: cmd %p had " + "connection lost\n", c); + return_status = IO_ERROR; break; - case CMD_ABORTED: - printk(KERN_WARNING "cciss: cmd %p was " - "aborted\n", c); - return_status = IO_ERROR; + case CMD_ABORTED: + printk(KERN_WARNING "cciss: cmd %p was " + "aborted\n", c); + return_status = IO_ERROR; break; - case CMD_ABORT_FAILED: - printk(KERN_WARNING "cciss: cmd %p reports " - "abort failed\n", c); - return_status = IO_ERROR; + case CMD_ABORT_FAILED: + printk(KERN_WARNING "cciss: cmd %p reports " + "abort failed\n", c); + return_status = IO_ERROR; break; - case CMD_UNSOLICITED_ABORT: - printk(KERN_WARNING - "cciss%d: unsolicited abort %p\n", ctlr, c); - if (c->retry_count < MAX_CMD_RETRIES) { - printk(KERN_WARNING - "cciss%d: retrying %p\n", ctlr, c); - c->retry_count++; - /* erase the old error information */ - memset(c->err_info, 0, - sizeof(ErrorInfo_struct)); - return_status = IO_OK; - INIT_COMPLETION(wait); - goto resend_cmd2; - } - return_status = IO_ERROR; + case CMD_UNSOLICITED_ABORT: + printk(KERN_WARNING + "cciss%d: unsolicited abort %p\n", + ctlr, c); + if (c->retry_count < MAX_CMD_RETRIES) { + printk(KERN_WARNING + "cciss%d: retrying %p\n", + ctlr, c); + c->retry_count++; + /* erase the old error information */ + memset(c->err_info, 0, + sizeof(ErrorInfo_struct)); + return_status = IO_OK; + INIT_COMPLETION(wait); + goto resend_cmd2; + } + return_status = IO_ERROR; break; - default: - printk(KERN_WARNING "cciss: cmd %p returned " - "unknown status %x\n", c, - c->err_info->CommandStatus); - return_status = IO_ERROR; + default: + printk(KERN_WARNING "cciss: cmd %p returned " + "unknown status %x\n", c, + c->err_info->CommandStatus); + return_status = IO_ERROR; } - } + } /* unlock the buffers from DMA */ buff_dma_handle.val32.lower = c->SG[0].Addr.lower; buff_dma_handle.val32.upper = c->SG[0].Addr.upper; - pci_unmap_single(h->pdev, (dma_addr_t) buff_dma_handle.val, - c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); + pci_unmap_single( h->pdev, (dma_addr_t) buff_dma_handle.val, + c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); cmd_free(h, c, 0); - return return_status; -} + return(return_status); +} static void cciss_geometry_inquiry(int ctlr, int logvol, - int withirq, unsigned int total_size, - unsigned int block_size, - InquiryData_struct *inq_buff, - drive_info_struct *drv) + int withirq, unsigned int total_size, + unsigned int block_size, InquiryData_struct *inq_buff, + drive_info_struct *drv) { int return_code; memset(inq_buff, 0, sizeof(InquiryData_struct)); if (withirq) return_code = sendcmd_withirq(CISS_INQUIRY, ctlr, - inq_buff, sizeof(*inq_buff), 1, - logvol, 0xC1, TYPE_CMD); + inq_buff, sizeof(*inq_buff), 1, logvol ,0xC1, TYPE_CMD); else return_code = sendcmd(CISS_INQUIRY, ctlr, inq_buff, - sizeof(*inq_buff), 1, logvol, 0xC1, NULL, - TYPE_CMD); + sizeof(*inq_buff), 1, logvol ,0xC1, NULL, TYPE_CMD); if (return_code == IO_OK) { - if (inq_buff->data_byte[8] == 0xFF) { + if(inq_buff->data_byte[8] == 0xFF) { printk(KERN_WARNING - "cciss: reading geometry failed, volume " - "does not support reading geometry\n"); + "cciss: reading geometry failed, volume " + "does not support reading geometry\n"); drv->block_size = block_size; drv->nr_blocks = total_size; drv->heads = 255; - drv->sectors = 32; // Sectors per track + drv->sectors = 32; // Sectors per track drv->cylinders = total_size / 255 / 32; } else { unsigned int t; @@ -1936,42 +1847,37 @@ static void cciss_geometry_inquiry(int ctlr, int logvol, drv->raid_level = inq_buff->data_byte[8]; t = drv->heads * drv->sectors; if (t > 1) { - drv->cylinders = total_size / t; + drv->cylinders = total_size/t; } } - } else { /* Get geometry failed */ + } else { /* Get geometry failed */ printk(KERN_WARNING "cciss: reading geometry failed\n"); } printk(KERN_INFO " heads= %d, sectors= %d, cylinders= %d\n\n", - drv->heads, drv->sectors, drv->cylinders); + drv->heads, drv->sectors, drv->cylinders); } - static void cciss_read_capacity(int ctlr, int logvol, ReadCapdata_struct *buf, - int withirq, unsigned int *total_size, - unsigned int *block_size) + int withirq, unsigned int *total_size, unsigned int *block_size) { int return_code; memset(buf, 0, sizeof(*buf)); if (withirq) return_code = sendcmd_withirq(CCISS_READ_CAPACITY, - ctlr, buf, sizeof(*buf), 1, - logvol, 0, TYPE_CMD); + ctlr, buf, sizeof(*buf), 1, logvol, 0, TYPE_CMD); else return_code = sendcmd(CCISS_READ_CAPACITY, - ctlr, buf, sizeof(*buf), 1, logvol, 0, - NULL, TYPE_CMD); + ctlr, buf, sizeof(*buf), 1, logvol, 0, NULL, TYPE_CMD); if (return_code == IO_OK) { - *total_size = - be32_to_cpu(*((__be32 *) & buf->total_size[0])) + 1; - *block_size = be32_to_cpu(*((__be32 *) & buf->block_size[0])); - } else { /* read capacity command failed */ + *total_size = be32_to_cpu(*((__be32 *) &buf->total_size[0]))+1; + *block_size = be32_to_cpu(*((__be32 *) &buf->block_size[0])); + } else { /* read capacity command failed */ printk(KERN_WARNING "cciss: read capacity failed\n"); *total_size = 0; *block_size = BLOCK_SIZE; } printk(KERN_INFO " blocks= %u block_size= %d\n", - *total_size, *block_size); + *total_size, *block_size); return; } @@ -1980,38 +1886,38 @@ static int cciss_revalidate(struct gendisk *disk) ctlr_info_t *h = get_host(disk); drive_info_struct *drv = get_drv(disk); int logvol; - int FOUND = 0; + int FOUND=0; unsigned int block_size; unsigned int total_size; ReadCapdata_struct *size_buff = NULL; InquiryData_struct *inq_buff = NULL; - for (logvol = 0; logvol < CISS_MAX_LUN; logvol++) { - if (h->drv[logvol].LunID == drv->LunID) { - FOUND = 1; + for(logvol=0; logvol < CISS_MAX_LUN; logvol++) + { + if(h->drv[logvol].LunID == drv->LunID) { + FOUND=1; break; } } - if (!FOUND) - return 1; + if (!FOUND) return 1; - size_buff = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL); - if (size_buff == NULL) { - printk(KERN_WARNING "cciss: out of memory\n"); - return 1; - } - inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL); - if (inq_buff == NULL) { - printk(KERN_WARNING "cciss: out of memory\n"); + size_buff = kmalloc(sizeof( ReadCapdata_struct), GFP_KERNEL); + if (size_buff == NULL) + { + printk(KERN_WARNING "cciss: out of memory\n"); + return 1; + } + inq_buff = kmalloc(sizeof( InquiryData_struct), GFP_KERNEL); + if (inq_buff == NULL) + { + printk(KERN_WARNING "cciss: out of memory\n"); kfree(size_buff); - return 1; - } + return 1; + } - cciss_read_capacity(h->ctlr, logvol, size_buff, 1, &total_size, - &block_size); - cciss_geometry_inquiry(h->ctlr, logvol, 1, total_size, block_size, - inq_buff, drv); + cciss_read_capacity(h->ctlr, logvol, size_buff, 1, &total_size, &block_size); + cciss_geometry_inquiry(h->ctlr, logvol, 1, total_size, block_size, inq_buff, drv); blk_queue_hardsect_size(drv->queue, drv->block_size); set_capacity(disk, drv->nr_blocks); @@ -2038,7 +1944,7 @@ static unsigned long pollcomplete(int ctlr) if (done == FIFO_EMPTY) schedule_timeout_uninterruptible(1); else - return done; + return (done); } /* Invalid address to tell caller we ran out of time */ return 1; @@ -2047,28 +1953,28 @@ static unsigned long pollcomplete(int ctlr) static int add_sendcmd_reject(__u8 cmd, int ctlr, unsigned long complete) { /* We get in here if sendcmd() is polling for completions - and gets some command back that it wasn't expecting -- - something other than that which it just sent down. - Ordinarily, that shouldn't happen, but it can happen when + and gets some command back that it wasn't expecting -- + something other than that which it just sent down. + Ordinarily, that shouldn't happen, but it can happen when the scsi tape stuff gets into error handling mode, and - starts using sendcmd() to try to abort commands and + starts using sendcmd() to try to abort commands and reset tape drives. In that case, sendcmd may pick up completions of commands that were sent to logical drives - through the block i/o system, or cciss ioctls completing, etc. + through the block i/o system, or cciss ioctls completing, etc. In that case, we need to save those completions for later processing by the interrupt handler. - */ + */ #ifdef CONFIG_CISS_SCSI_TAPE - struct sendcmd_reject_list *srl = &hba[ctlr]->scsi_rejects; + struct sendcmd_reject_list *srl = &hba[ctlr]->scsi_rejects; /* If it's not the scsi tape stuff doing error handling, (abort */ /* or reset) then we don't expect anything weird. */ if (cmd != CCISS_RESET_MSG && cmd != CCISS_ABORT_MSG) { #endif - printk(KERN_WARNING "cciss cciss%d: SendCmd " - "Invalid command list address returned! (%lx)\n", - ctlr, complete); + printk( KERN_WARNING "cciss cciss%d: SendCmd " + "Invalid command list address returned! (%lx)\n", + ctlr, complete); /* not much we can do. */ #ifdef CONFIG_CISS_SCSI_TAPE return 1; @@ -2079,7 +1985,7 @@ static int add_sendcmd_reject(__u8 cmd, int ctlr, unsigned long complete) if (srl->ncompletions >= (NR_CMDS + 2)) { /* Uh oh. No room to save it for later... */ printk(KERN_WARNING "cciss%d: Sendcmd: Invalid command addr, " - "reject list overflow, command lost!\n", ctlr); + "reject list overflow, command lost!\n", ctlr); return 1; } /* Save it for later */ @@ -2090,327 +1996,340 @@ static int add_sendcmd_reject(__u8 cmd, int ctlr, unsigned long complete) } /* - * Send a command to the controller, and wait for it to complete. - * Only used at init time. + * Send a command to the controller, and wait for it to complete. + * Only used at init time. */ -static int sendcmd(__u8 cmd, int ctlr, void *buff, size_t size, unsigned int use_unit_num, /* 0: address the controller, - 1: address logical volume log_unit, - 2: periph device address is scsi3addr */ - unsigned int log_unit, - __u8 page_code, unsigned char *scsi3addr, int cmd_type) +static int sendcmd( + __u8 cmd, + int ctlr, + void *buff, + size_t size, + unsigned int use_unit_num, /* 0: address the controller, + 1: address logical volume log_unit, + 2: periph device address is scsi3addr */ + unsigned int log_unit, + __u8 page_code, + unsigned char *scsi3addr, + int cmd_type) { CommandList_struct *c; int i; unsigned long complete; - ctlr_info_t *info_p = hba[ctlr]; + ctlr_info_t *info_p= hba[ctlr]; u64bit buff_dma_handle; int status, done = 0; if ((c = cmd_alloc(info_p, 1)) == NULL) { printk(KERN_WARNING "cciss: unable to get memory"); - return IO_ERROR; + return(IO_ERROR); } status = fill_cmd(c, cmd, ctlr, buff, size, use_unit_num, - log_unit, page_code, scsi3addr, cmd_type); + log_unit, page_code, scsi3addr, cmd_type); if (status != IO_OK) { cmd_free(info_p, c, 1); return status; } - resend_cmd1: +resend_cmd1: /* - * Disable interrupt - */ + * Disable interrupt + */ #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss: turning intr off\n"); -#endif /* CCISS_DEBUG */ - info_p->access.set_intr_mask(info_p, CCISS_INTR_OFF); - +#endif /* CCISS_DEBUG */ + info_p->access.set_intr_mask(info_p, CCISS_INTR_OFF); + /* Make sure there is room in the command FIFO */ - /* Actually it should be completely empty at this time */ + /* Actually it should be completely empty at this time */ /* unless we are in here doing error handling for the scsi */ /* tape side of the driver. */ - for (i = 200000; i > 0; i--) { + for (i = 200000; i > 0; i--) + { /* if fifo isn't full go */ - if (!(info_p->access.fifo_full(info_p))) { - - break; - } - udelay(10); - printk(KERN_WARNING "cciss cciss%d: SendCmd FIFO full," - " waiting!\n", ctlr); - } - /* - * Send the cmd - */ - info_p->access.submit_command(info_p, c); + if (!(info_p->access.fifo_full(info_p))) + { + + break; + } + udelay(10); + printk(KERN_WARNING "cciss cciss%d: SendCmd FIFO full," + " waiting!\n", ctlr); + } + /* + * Send the cmd + */ + info_p->access.submit_command(info_p, c); done = 0; do { complete = pollcomplete(ctlr); #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss: command completed\n"); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ if (complete == 1) { - printk(KERN_WARNING - "cciss cciss%d: SendCmd Timeout out, " - "No command list address returned!\n", ctlr); + printk( KERN_WARNING + "cciss cciss%d: SendCmd Timeout out, " + "No command list address returned!\n", + ctlr); status = IO_ERROR; done = 1; break; } /* This will need to change for direct lookup completions */ - if ((complete & CISS_ERROR_BIT) - && (complete & ~CISS_ERROR_BIT) == c->busaddr) { - /* if data overrun or underun on Report command - ignore it - */ + if ( (complete & CISS_ERROR_BIT) + && (complete & ~CISS_ERROR_BIT) == c->busaddr) + { + /* if data overrun or underun on Report command + ignore it + */ if (((c->Request.CDB[0] == CISS_REPORT_LOG) || (c->Request.CDB[0] == CISS_REPORT_PHYS) || (c->Request.CDB[0] == CISS_INQUIRY)) && - ((c->err_info->CommandStatus == - CMD_DATA_OVERRUN) || - (c->err_info->CommandStatus == CMD_DATA_UNDERRUN) - )) { + ((c->err_info->CommandStatus == + CMD_DATA_OVERRUN) || + (c->err_info->CommandStatus == + CMD_DATA_UNDERRUN) + )) + { complete = c->busaddr; } else { if (c->err_info->CommandStatus == - CMD_UNSOLICITED_ABORT) { + CMD_UNSOLICITED_ABORT) { printk(KERN_WARNING "cciss%d: " - "unsolicited abort %p\n", - ctlr, c); + "unsolicited abort %p\n", + ctlr, c); if (c->retry_count < MAX_CMD_RETRIES) { printk(KERN_WARNING - "cciss%d: retrying %p\n", - ctlr, c); + "cciss%d: retrying %p\n", + ctlr, c); c->retry_count++; /* erase the old error */ /* information */ memset(c->err_info, 0, - sizeof - (ErrorInfo_struct)); + sizeof(ErrorInfo_struct)); goto resend_cmd1; } else { printk(KERN_WARNING - "cciss%d: retried %p too " - "many times\n", ctlr, c); + "cciss%d: retried %p too " + "many times\n", ctlr, c); status = IO_ERROR; goto cleanup1; } - } else if (c->err_info->CommandStatus == - CMD_UNABORTABLE) { - printk(KERN_WARNING - "cciss%d: command could not be aborted.\n", - ctlr); + } else if (c->err_info->CommandStatus == CMD_UNABORTABLE) { + printk(KERN_WARNING "cciss%d: command could not be aborted.\n", ctlr); status = IO_ERROR; goto cleanup1; } printk(KERN_WARNING "ciss ciss%d: sendcmd" - " Error %x \n", ctlr, - c->err_info->CommandStatus); + " Error %x \n", ctlr, + c->err_info->CommandStatus); printk(KERN_WARNING "ciss ciss%d: sendcmd" - " offensive info\n" - " size %x\n num %x value %x\n", - ctlr, - c->err_info->MoreErrInfo.Invalid_Cmd. - offense_size, - c->err_info->MoreErrInfo.Invalid_Cmd. - offense_num, - c->err_info->MoreErrInfo.Invalid_Cmd. - offense_value); + " offensive info\n" + " size %x\n num %x value %x\n", ctlr, + c->err_info->MoreErrInfo.Invalid_Cmd.offense_size, + c->err_info->MoreErrInfo.Invalid_Cmd.offense_num, + c->err_info->MoreErrInfo.Invalid_Cmd.offense_value); status = IO_ERROR; goto cleanup1; } } /* This will need changing for direct lookup completions */ - if (complete != c->busaddr) { + if (complete != c->busaddr) { if (add_sendcmd_reject(cmd, ctlr, complete) != 0) { - BUG(); /* we are pretty much hosed if we get here. */ + BUG(); /* we are pretty much hosed if we get here. */ } continue; - } else + } else done = 1; - } while (!done); - - cleanup1: + } while (!done); + +cleanup1: /* unlock the data buffer from DMA */ buff_dma_handle.val32.lower = c->SG[0].Addr.lower; buff_dma_handle.val32.upper = c->SG[0].Addr.upper; pci_unmap_single(info_p->pdev, (dma_addr_t) buff_dma_handle.val, - c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); + c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); #ifdef CONFIG_CISS_SCSI_TAPE /* if we saved some commands for later, process them now. */ if (info_p->scsi_rejects.ncompletions > 0) do_cciss_intr(0, info_p, NULL); #endif cmd_free(info_p, c, 1); - return status; -} - + return (status); +} /* * Map (physical) PCI mem into (virtual) kernel space */ static void __iomem *remap_pci_mem(ulong base, ulong size) { - ulong page_base = ((ulong) base) & PAGE_MASK; - ulong page_offs = ((ulong) base) - page_base; - void __iomem *page_remapped = ioremap(page_base, page_offs + size); + ulong page_base = ((ulong) base) & PAGE_MASK; + ulong page_offs = ((ulong) base) - page_base; + void __iomem *page_remapped = ioremap(page_base, page_offs+size); - return page_remapped ? (page_remapped + page_offs) : NULL; + return page_remapped ? (page_remapped + page_offs) : NULL; } -/* - * Takes jobs of the Q and sends them to the hardware, then puts it on - * the Q to wait for completion. - */ -static void start_io(ctlr_info_t *h) +/* + * Takes jobs of the Q and sends them to the hardware, then puts it on + * the Q to wait for completion. + */ +static void start_io( ctlr_info_t *h) { CommandList_struct *c; - - while ((c = h->reqQ) != NULL) { + + while(( c = h->reqQ) != NULL ) + { /* can't do anything if fifo is full */ if ((h->access.fifo_full(h))) { printk(KERN_WARNING "cciss: fifo full\n"); break; } - /* Get the first entry from the Request Q */ + /* Get the first entry from the Request Q */ removeQ(&(h->reqQ), c); h->Qdepth--; - - /* Tell the controller execute command */ + + /* Tell the controller execute command */ h->access.submit_command(h, c); - - /* Put job onto the completed Q */ - addQ(&(h->cmpQ), c); + + /* Put job onto the completed Q */ + addQ (&(h->cmpQ), c); } } - /* Assumes that CCISS_LOCK(h->ctlr) is held. */ /* Zeros out the error record and then resends the command back */ /* to the controller */ -static inline void resend_cciss_cmd(ctlr_info_t *h, CommandList_struct *c) +static inline void resend_cciss_cmd( ctlr_info_t *h, CommandList_struct *c) { /* erase the old error information */ memset(c->err_info, 0, sizeof(ErrorInfo_struct)); /* add it to software queue and then send it to the controller */ - addQ(&(h->reqQ), c); + addQ(&(h->reqQ),c); h->Qdepth++; - if (h->Qdepth > h->maxQsinceinit) + if(h->Qdepth > h->maxQsinceinit) h->maxQsinceinit = h->Qdepth; start_io(h); } -/* checks the status of the job and calls complete buffers to mark all +/* checks the status of the job and calls complete buffers to mark all * buffers for the completed job. Note that this function does not need * to hold the hba/queue lock. - */ -static inline void complete_command(ctlr_info_t *h, CommandList_struct *cmd, - int timeout) + */ +static inline void complete_command( ctlr_info_t *h, CommandList_struct *cmd, + int timeout) { int status = 1; int retry_cmd = 0; - + if (timeout) - status = 0; + status = 0; - if (cmd->err_info->CommandStatus != 0) { /* an error has occurred */ - switch (cmd->err_info->CommandStatus) { + if(cmd->err_info->CommandStatus != 0) + { /* an error has occurred */ + switch(cmd->err_info->CommandStatus) + { unsigned char sense_key; - case CMD_TARGET_STATUS: - status = 0; - - if (cmd->err_info->ScsiStatus == 0x02) { - printk(KERN_WARNING "cciss: cmd %p " - "has CHECK CONDITION " - " byte 2 = 0x%x\n", cmd, - cmd->err_info->SenseInfo[2] - ); - /* check the sense key */ - sense_key = 0xf & cmd->err_info->SenseInfo[2]; - /* no status or recovered error */ - if ((sense_key == 0x0) || (sense_key == 0x1)) { - status = 1; + case CMD_TARGET_STATUS: + status = 0; + + if( cmd->err_info->ScsiStatus == 0x02) + { + printk(KERN_WARNING "cciss: cmd %p " + "has CHECK CONDITION " + " byte 2 = 0x%x\n", cmd, + cmd->err_info->SenseInfo[2] + ); + /* check the sense key */ + sense_key = 0xf & + cmd->err_info->SenseInfo[2]; + /* no status or recovered error */ + if((sense_key == 0x0) || + (sense_key == 0x1)) + { + status = 1; + } + } else + { + printk(KERN_WARNING "cciss: cmd %p " + "has SCSI Status 0x%x\n", + cmd, cmd->err_info->ScsiStatus); } - } else { - printk(KERN_WARNING "cciss: cmd %p " - "has SCSI Status 0x%x\n", - cmd, cmd->err_info->ScsiStatus); - } break; - case CMD_DATA_UNDERRUN: - printk(KERN_WARNING "cciss: cmd %p has" - " completed with data underrun " - "reported\n", cmd); + case CMD_DATA_UNDERRUN: + printk(KERN_WARNING "cciss: cmd %p has" + " completed with data underrun " + "reported\n", cmd); break; - case CMD_DATA_OVERRUN: - printk(KERN_WARNING "cciss: cmd %p has" - " completed with data overrun " - "reported\n", cmd); + case CMD_DATA_OVERRUN: + printk(KERN_WARNING "cciss: cmd %p has" + " completed with data overrun " + "reported\n", cmd); break; - case CMD_INVALID: - printk(KERN_WARNING "cciss: cmd %p is " - "reported invalid\n", cmd); - status = 0; + case CMD_INVALID: + printk(KERN_WARNING "cciss: cmd %p is " + "reported invalid\n", cmd); + status = 0; break; - case CMD_PROTOCOL_ERR: - printk(KERN_WARNING "cciss: cmd %p has " - "protocol error \n", cmd); - status = 0; + case CMD_PROTOCOL_ERR: + printk(KERN_WARNING "cciss: cmd %p has " + "protocol error \n", cmd); + status = 0; + break; + case CMD_HARDWARE_ERR: + printk(KERN_WARNING "cciss: cmd %p had " + " hardware error\n", cmd); + status = 0; + break; + case CMD_CONNECTION_LOST: + printk(KERN_WARNING "cciss: cmd %p had " + "connection lost\n", cmd); + status=0; break; - case CMD_HARDWARE_ERR: - printk(KERN_WARNING "cciss: cmd %p had " - " hardware error\n", cmd); - status = 0; + case CMD_ABORTED: + printk(KERN_WARNING "cciss: cmd %p was " + "aborted\n", cmd); + status=0; break; - case CMD_CONNECTION_LOST: - printk(KERN_WARNING "cciss: cmd %p had " - "connection lost\n", cmd); - status = 0; + case CMD_ABORT_FAILED: + printk(KERN_WARNING "cciss: cmd %p reports " + "abort failed\n", cmd); + status=0; break; - case CMD_ABORTED: - printk(KERN_WARNING "cciss: cmd %p was " - "aborted\n", cmd); - status = 0; - break; - case CMD_ABORT_FAILED: - printk(KERN_WARNING "cciss: cmd %p reports " - "abort failed\n", cmd); - status = 0; - break; - case CMD_UNSOLICITED_ABORT: - printk(KERN_WARNING "cciss%d: unsolicited " - "abort %p\n", h->ctlr, cmd); - if (cmd->retry_count < MAX_CMD_RETRIES) { - retry_cmd = 1; - printk(KERN_WARNING - "cciss%d: retrying %p\n", h->ctlr, cmd); - cmd->retry_count++; - } else - printk(KERN_WARNING - "cciss%d: %p retried too " - "many times\n", h->ctlr, cmd); - status = 0; + case CMD_UNSOLICITED_ABORT: + printk(KERN_WARNING "cciss%d: unsolicited " + "abort %p\n", h->ctlr, cmd); + if (cmd->retry_count < MAX_CMD_RETRIES) { + retry_cmd=1; + printk(KERN_WARNING + "cciss%d: retrying %p\n", + h->ctlr, cmd); + cmd->retry_count++; + } else + printk(KERN_WARNING + "cciss%d: %p retried too " + "many times\n", h->ctlr, cmd); + status=0; break; - case CMD_TIMEOUT: - printk(KERN_WARNING "cciss: cmd %p timedout\n", cmd); - status = 0; + case CMD_TIMEOUT: + printk(KERN_WARNING "cciss: cmd %p timedout\n", + cmd); + status=0; break; - default: - printk(KERN_WARNING "cciss: cmd %p returned " - "unknown status %x\n", cmd, - cmd->err_info->CommandStatus); - status = 0; + default: + printk(KERN_WARNING "cciss: cmd %p returned " + "unknown status %x\n", cmd, + cmd->err_info->CommandStatus); + status=0; } } /* We need to return this command */ - if (retry_cmd) { - resend_cciss_cmd(h, cmd); + if(retry_cmd) { + resend_cciss_cmd(h,cmd); return; - } + } cmd->rq->completion_data = cmd; cmd->rq->errors = status; @@ -2418,12 +2337,12 @@ static inline void complete_command(ctlr_info_t *h, CommandList_struct *cmd, blk_complete_request(cmd->rq); } -/* - * Get a request and submit it to the controller. +/* + * Get a request and submit it to the controller. */ static void do_cciss_request(request_queue_t *q) { - ctlr_info_t *h = q->queuedata; + ctlr_info_t *h= q->queuedata; CommandList_struct *c; int start_blk, seg; struct request *creq; @@ -2434,18 +2353,18 @@ static void do_cciss_request(request_queue_t *q) /* We call start_io here in case there is a command waiting on the * queue that has not been sent. - */ + */ if (blk_queue_plugged(q)) goto startio; - queue: +queue: creq = elv_next_request(q); if (!creq) goto startio; BUG_ON(creq->nr_phys_segments > MAXSGENTRIES); - if ((c = cmd_alloc(h, 1)) == NULL) + if (( c = cmd_alloc(h, 1)) == NULL) goto full; blkdev_dequeue_request(creq); @@ -2454,82 +2373,81 @@ static void do_cciss_request(request_queue_t *q) c->cmd_type = CMD_RWREQ; c->rq = creq; - - /* fill in the request */ + + /* fill in the request */ drv = creq->rq_disk->private_data; - c->Header.ReplyQueue = 0; // unused in simple mode + c->Header.ReplyQueue = 0; // unused in simple mode /* got command from pool, so use the command block index instead */ /* for direct lookups. */ /* The first 2 bits are reserved for controller error reporting. */ c->Header.Tag.lower = (c->cmdindex << 3); - c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */ - c->Header.LUN.LogDev.VolId = drv->LunID; + c->Header.Tag.lower |= 0x04; /* flag for direct lookup. */ + c->Header.LUN.LogDev.VolId= drv->LunID; c->Header.LUN.LogDev.Mode = 1; - c->Request.CDBLen = 10; // 12 byte commands not in FW yet; - c->Request.Type.Type = TYPE_CMD; // It is a command. - c->Request.Type.Attribute = ATTR_SIMPLE; - c->Request.Type.Direction = - (rq_data_dir(creq) == READ) ? XFER_READ : XFER_WRITE; - c->Request.Timeout = 0; // Don't time out - c->Request.CDB[0] = - (rq_data_dir(creq) == READ) ? CCISS_READ : CCISS_WRITE; + c->Request.CDBLen = 10; // 12 byte commands not in FW yet; + c->Request.Type.Type = TYPE_CMD; // It is a command. + c->Request.Type.Attribute = ATTR_SIMPLE; + c->Request.Type.Direction = + (rq_data_dir(creq) == READ) ? XFER_READ: XFER_WRITE; + c->Request.Timeout = 0; // Don't time out + c->Request.CDB[0] = (rq_data_dir(creq) == READ) ? CCISS_READ : CCISS_WRITE; start_blk = creq->sector; #ifdef CCISS_DEBUG - printk(KERN_DEBUG "ciss: sector =%d nr_sectors=%d\n", (int)creq->sector, - (int)creq->nr_sectors); -#endif /* CCISS_DEBUG */ + printk(KERN_DEBUG "ciss: sector =%d nr_sectors=%d\n",(int) creq->sector, + (int) creq->nr_sectors); +#endif /* CCISS_DEBUG */ seg = blk_rq_map_sg(q, creq, tmp_sg); - /* get the DMA records for the setup */ + /* get the DMA records for the setup */ if (c->Request.Type.Direction == XFER_READ) dir = PCI_DMA_FROMDEVICE; else dir = PCI_DMA_TODEVICE; - for (i = 0; i < seg; i++) { + for (i=0; iSG[i].Len = tmp_sg[i].length; temp64.val = (__u64) pci_map_page(h->pdev, tmp_sg[i].page, - tmp_sg[i].offset, - tmp_sg[i].length, dir); + tmp_sg[i].offset, tmp_sg[i].length, + dir); c->SG[i].Addr.lower = temp64.val32.lower; - c->SG[i].Addr.upper = temp64.val32.upper; - c->SG[i].Ext = 0; // we are not chaining + c->SG[i].Addr.upper = temp64.val32.upper; + c->SG[i].Ext = 0; // we are not chaining } - /* track how many SG entries we are using */ - if (seg > h->maxSG) - h->maxSG = seg; + /* track how many SG entries we are using */ + if( seg > h->maxSG) + h->maxSG = seg; #ifdef CCISS_DEBUG - printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n", - creq->nr_sectors, seg); -#endif /* CCISS_DEBUG */ + printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n", creq->nr_sectors, seg); +#endif /* CCISS_DEBUG */ c->Header.SGList = c->Header.SGTotal = seg; - c->Request.CDB[1] = 0; - c->Request.CDB[2] = (start_blk >> 24) & 0xff; //MSB - c->Request.CDB[3] = (start_blk >> 16) & 0xff; - c->Request.CDB[4] = (start_blk >> 8) & 0xff; - c->Request.CDB[5] = start_blk & 0xff; - c->Request.CDB[6] = 0; // (sect >> 24) & 0xff; MSB - c->Request.CDB[7] = (creq->nr_sectors >> 8) & 0xff; - c->Request.CDB[8] = creq->nr_sectors & 0xff; + c->Request.CDB[1]= 0; + c->Request.CDB[2]= (start_blk >> 24) & 0xff; //MSB + c->Request.CDB[3]= (start_blk >> 16) & 0xff; + c->Request.CDB[4]= (start_blk >> 8) & 0xff; + c->Request.CDB[5]= start_blk & 0xff; + c->Request.CDB[6]= 0; // (sect >> 24) & 0xff; MSB + c->Request.CDB[7]= (creq->nr_sectors >> 8) & 0xff; + c->Request.CDB[8]= creq->nr_sectors & 0xff; c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0; spin_lock_irq(q->queue_lock); - addQ(&(h->reqQ), c); + addQ(&(h->reqQ),c); h->Qdepth++; - if (h->Qdepth > h->maxQsinceinit) - h->maxQsinceinit = h->Qdepth; + if(h->Qdepth > h->maxQsinceinit) + h->maxQsinceinit = h->Qdepth; goto queue; - full: +full: blk_stop_queue(q); - startio: +startio: /* We will already have the driver lock here so not need * to lock it. - */ + */ start_io(h); } @@ -2556,7 +2474,7 @@ static inline unsigned long get_next_completion(ctlr_info_t *h) static inline int interrupt_pending(ctlr_info_t *h) { #ifdef CONFIG_CISS_SCSI_TAPE - return (h->access.intr_pending(h) + return ( h->access.intr_pending(h) || (h->scsi_rejects.ncompletions > 0)); #else return h->access.intr_pending(h); @@ -2566,11 +2484,11 @@ static inline int interrupt_pending(ctlr_info_t *h) static inline long interrupt_not_for_us(ctlr_info_t *h) { #ifdef CONFIG_CISS_SCSI_TAPE - return (((h->access.intr_pending(h) == 0) || - (h->interrupts_enabled == 0)) - && (h->scsi_rejects.ncompletions == 0)); + return (((h->access.intr_pending(h) == 0) || + (h->interrupts_enabled == 0)) + && (h->scsi_rejects.ncompletions == 0)); #else - return (((h->access.intr_pending(h) == 0) || + return (((h->access.intr_pending(h) == 0) || (h->interrupts_enabled == 0))); #endif } @@ -2581,6 +2499,8 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) CommandList_struct *c; unsigned long flags; __u32 a, a1, a2; + int j; + int start_queue = h->next_to_run; if (interrupt_not_for_us(h)) return IRQ_NONE; @@ -2590,14 +2510,12 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) */ spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags); while (interrupt_pending(h)) { - while ((a = get_next_completion(h)) != FIFO_EMPTY) { + while((a = get_next_completion(h)) != FIFO_EMPTY) { a1 = a; if ((a & 0x04)) { a2 = (a >> 3); if (a2 >= NR_CMDS) { - printk(KERN_WARNING - "cciss: controller cciss%d failed, stopping.\n", - h->ctlr); + printk(KERN_WARNING "cciss: controller cciss%d failed, stopping.\n", h->ctlr); fail_all_cmds(h->ctlr); return IRQ_HANDLED; } @@ -2606,24 +2524,22 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) a = c->busaddr; } else { - a &= ~3; + a &= ~3; if ((c = h->cmpQ) == NULL) { - printk(KERN_WARNING - "cciss: Completion of %08x ignored\n", - a1); - continue; - } - while (c->busaddr != a) { - c = c->next; - if (c == h->cmpQ) - break; - } + printk(KERN_WARNING "cciss: Completion of %08x ignored\n", a1); + continue; + } + while(c->busaddr != a) { + c = c->next; + if (c == h->cmpQ) + break; + } } /* * If we've found the command, take it off the * completion Q and free it */ - if (c->busaddr == a) { + if (c->busaddr == a) { removeQ(&h->cmpQ, c); if (c->cmd_type == CMD_RWREQ) { complete_command(h, c, 0); @@ -2639,79 +2555,130 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs) } } + /* check to see if we have maxed out the number of commands that can + * be placed on the queue. If so then exit. We do this check here + * in case the interrupt we serviced was from an ioctl and did not + * free any new commands. + */ + if ((find_first_zero_bit(h->cmd_pool_bits, NR_CMDS)) == NR_CMDS) + goto cleanup; + + /* We have room on the queue for more commands. Now we need to queue + * them up. We will also keep track of the next queue to run so + * that every queue gets a chance to be started first. + */ + for (j=0; j < h->highest_lun + 1; j++){ + int curr_queue = (start_queue + j) % (h->highest_lun + 1); + /* make sure the disk has been added and the drive is real + * because this can be called from the middle of init_one. + */ + if(!(h->drv[curr_queue].queue) || + !(h->drv[curr_queue].heads)) + continue; + blk_start_queue(h->gendisk[curr_queue]->queue); + + /* check to see if we have maxed out the number of commands + * that can be placed on the queue. + */ + if ((find_first_zero_bit(h->cmd_pool_bits, NR_CMDS)) == NR_CMDS) + { + if (curr_queue == start_queue){ + h->next_to_run = (start_queue + 1) % (h->highest_lun + 1); + goto cleanup; + } else { + h->next_to_run = curr_queue; + goto cleanup; + } + } else { + curr_queue = (curr_queue + 1) % (h->highest_lun + 1); + } + } + +cleanup: spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); return IRQ_HANDLED; } - -/* - * We cannot read the structure directly, for portability we must use +/* + * We cannot read the structure directly, for portablity we must use * the io functions. - * This is for debug only. + * This is for debug only. */ #ifdef CCISS_DEBUG -static void print_cfg_table(CfgTable_struct *tb) +static void print_cfg_table( CfgTable_struct *tb) { int i; char temp_name[17]; printk("Controller Configuration information\n"); printk("------------------------------------\n"); - for (i = 0; i < 4; i++) + for(i=0;i<4;i++) temp_name[i] = readb(&(tb->Signature[i])); - temp_name[4] = '\0'; - printk(" Signature = %s\n", temp_name); + temp_name[4]='\0'; + printk(" Signature = %s\n", temp_name); printk(" Spec Number = %d\n", readl(&(tb->SpecValence))); - printk(" Transport methods supported = 0x%x\n", - readl(&(tb->TransportSupport))); - printk(" Transport methods active = 0x%x\n", - readl(&(tb->TransportActive))); - printk(" Requested transport Method = 0x%x\n", - readl(&(tb->HostWrite.TransportRequest))); - printk(" Coalesce Interrupt Delay = 0x%x\n", - readl(&(tb->HostWrite.CoalIntDelay))); - printk(" Coalesce Interrupt Count = 0x%x\n", - readl(&(tb->HostWrite.CoalIntCount))); - printk(" Max outstanding commands = 0x%d\n", - readl(&(tb->CmdsOutMax))); - printk(" Bus Types = 0x%x\n", readl(&(tb->BusTypes))); - for (i = 0; i < 16; i++) + printk(" Transport methods supported = 0x%x\n", + readl(&(tb-> TransportSupport))); + printk(" Transport methods active = 0x%x\n", + readl(&(tb->TransportActive))); + printk(" Requested transport Method = 0x%x\n", + readl(&(tb->HostWrite.TransportRequest))); + printk(" Coalese Interrupt Delay = 0x%x\n", + readl(&(tb->HostWrite.CoalIntDelay))); + printk(" Coalese Interrupt Count = 0x%x\n", + readl(&(tb->HostWrite.CoalIntCount))); + printk(" Max outstanding commands = 0x%d\n", + readl(&(tb->CmdsOutMax))); + printk(" Bus Types = 0x%x\n", readl(&(tb-> BusTypes))); + for(i=0;i<16;i++) temp_name[i] = readb(&(tb->ServerName[i])); temp_name[16] = '\0'; printk(" Server Name = %s\n", temp_name); - printk(" Heartbeat Counter = 0x%x\n\n\n", readl(&(tb->HeartBeat))); + printk(" Heartbeat Counter = 0x%x\n\n\n", + readl(&(tb->HeartBeat))); } -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ -static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr) +static void release_io_mem(ctlr_info_t *c) +{ + /* if IO mem was not protected do nothing */ + if( c->io_mem_addr == 0) + return; + release_region(c->io_mem_addr, c->io_mem_length); + c->io_mem_addr = 0; + c->io_mem_length = 0; +} + +static int find_PCI_BAR_index(struct pci_dev *pdev, + unsigned long pci_bar_addr) { int i, offset, mem_type, bar_type; - if (pci_bar_addr == PCI_BASE_ADDRESS_0) /* looking for BAR zero? */ + if (pci_bar_addr == PCI_BASE_ADDRESS_0) /* looking for BAR zero? */ return 0; offset = 0; - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { - bar_type = pci_resource_flags(pdev, i) & PCI_BASE_ADDRESS_SPACE; + for (i=0; iintr[0] = cciss_msix_entries[0].vector; - c->intr[1] = cciss_msix_entries[1].vector; - c->intr[2] = cciss_msix_entries[2].vector; - c->intr[3] = cciss_msix_entries[3].vector; - c->msix_vector = 1; - return; - } - if (err > 0) { - printk(KERN_WARNING "cciss: only %d MSI-X vectors " - "available\n", err); - } else { - printk(KERN_WARNING "cciss: MSI-X init failed %d\n", - err); - } - } - if (pci_find_capability(pdev, PCI_CAP_ID_MSI)) { - if (!pci_enable_msi(pdev)) { - c->intr[SIMPLE_MODE_INT] = pdev->irq; - c->msi_vector = 1; - return; - } else { - printk(KERN_WARNING "cciss: MSI init failed\n"); - c->intr[SIMPLE_MODE_INT] = pdev->irq; - return; - } - } - default_int_mode: -#endif /* CONFIG_PCI_MSI */ + if (pci_find_capability(pdev, PCI_CAP_ID_MSIX)) { + err = pci_enable_msix(pdev, cciss_msix_entries, 4); + if (!err) { + c->intr[0] = cciss_msix_entries[0].vector; + c->intr[1] = cciss_msix_entries[1].vector; + c->intr[2] = cciss_msix_entries[2].vector; + c->intr[3] = cciss_msix_entries[3].vector; + c->msix_vector = 1; + return; + } + if (err > 0) { + printk(KERN_WARNING "cciss: only %d MSI-X vectors " + "available\n", err); + } else { + printk(KERN_WARNING "cciss: MSI-X init failed %d\n", + err); + } + } + if (pci_find_capability(pdev, PCI_CAP_ID_MSI)) { + if (!pci_enable_msi(pdev)) { + c->intr[SIMPLE_MODE_INT] = pdev->irq; + c->msi_vector = 1; + return; + } else { + printk(KERN_WARNING "cciss: MSI init failed\n"); + c->intr[SIMPLE_MODE_INT] = pdev->irq; + return; + } + } +default_int_mode: +#endif /* CONFIG_PCI_MSI */ /* if we get here we're going to use the default interrupt mode */ - c->intr[SIMPLE_MODE_INT] = pdev->irq; + c->intr[SIMPLE_MODE_INT] = pdev->irq; return; } @@ -2778,40 +2744,58 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) __u64 cfg_offset; __u32 cfg_base_addr; __u64 cfg_base_addr_index; - int i, err; + int i; /* check to see if controller has been disabled */ /* BEFORE trying to enable it */ - (void)pci_read_config_word(pdev, PCI_COMMAND, &command); - if (!(command & 0x02)) { - printk(KERN_WARNING - "cciss: controller appears to be disabled\n"); - return -ENODEV; + (void) pci_read_config_word(pdev, PCI_COMMAND,&command); + if(!(command & 0x02)) + { + printk(KERN_WARNING "cciss: controller appears to be disabled\n"); + return(-1); } - err = pci_enable_device(pdev); - if (err) { + if (pci_enable_device(pdev)) + { printk(KERN_ERR "cciss: Unable to Enable PCI device\n"); - return err; - } - - err = pci_request_regions(pdev, "cciss"); - if (err) { - printk(KERN_ERR "cciss: Cannot obtain PCI resources, " - "aborting\n"); - goto err_out_disable_pdev; + return( -1); } subsystem_vendor_id = pdev->subsystem_vendor; subsystem_device_id = pdev->subsystem_device; board_id = (((__u32) (subsystem_device_id << 16) & 0xffff0000) | - subsystem_vendor_id); + subsystem_vendor_id); + + /* search for our IO range so we can protect it */ + for(i=0; iio_mem_addr = pci_resource_start(pdev, i); + c->io_mem_length = pci_resource_end(pdev, i) - + pci_resource_start(pdev, i) +1; +#ifdef CCISS_DEBUG + printk("IO value found base_addr[%d] %lx %lx\n", i, + c->io_mem_addr, c->io_mem_length); +#endif /* CCISS_DEBUG */ + /* register the IO range */ + if(!request_region( c->io_mem_addr, + c->io_mem_length, "cciss")) + { + printk(KERN_WARNING "cciss I/O memory range already in use addr=%lx length=%ld\n", + c->io_mem_addr, c->io_mem_length); + c->io_mem_addr= 0; + c->io_mem_length = 0; + } + break; + } + } #ifdef CCISS_DEBUG printk("command = %x\n", command); printk("irq = %x\n", pdev->irq); printk("board_id = %x\n", board_id); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ /* If the kernel supports MSI/MSI-X we will try to enable that functionality, * else we use the IO-APIC interrupt assigned to us by system ROM. @@ -2820,28 +2804,27 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) /* * Memory base addr is first addr , the second points to the config - * table + * table */ - c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */ + c->paddr = pci_resource_start(pdev, 0); /* addressing mode bits already removed */ #ifdef CCISS_DEBUG printk("address 0 = %x\n", c->paddr); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ c->vaddr = remap_pci_mem(c->paddr, 200); /* Wait for the board to become ready. (PCI hotplug needs this.) * We poll for up to 120 secs, once per 100ms. */ - for (i = 0; i < 1200; i++) { + for (i=0; i < 1200; i++) { scratchpad = readl(c->vaddr + SA5_SCRATCHPAD_OFFSET); if (scratchpad == CCISS_FIRMWARE_READY) break; set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 10); /* wait 100ms */ + schedule_timeout(HZ / 10); /* wait 100ms */ } if (scratchpad != CCISS_FIRMWARE_READY) { printk(KERN_WARNING "cciss: Board not ready. Timed out.\n"); - err = -ENODEV; - goto err_out_free_res; + return -1; } /* get the address index number */ @@ -2849,108 +2832,103 @@ static int cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev) cfg_base_addr &= (__u32) 0x0000ffff; #ifdef CCISS_DEBUG printk("cfg base address = %x\n", cfg_base_addr); -#endif /* CCISS_DEBUG */ - cfg_base_addr_index = find_PCI_BAR_index(pdev, cfg_base_addr); +#endif /* CCISS_DEBUG */ + cfg_base_addr_index = + find_PCI_BAR_index(pdev, cfg_base_addr); #ifdef CCISS_DEBUG printk("cfg base address index = %x\n", cfg_base_addr_index); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ if (cfg_base_addr_index == -1) { printk(KERN_WARNING "cciss: Cannot find cfg_base_addr_index\n"); - err = -ENODEV; - goto err_out_free_res; + release_io_mem(c); + return -1; } cfg_offset = readl(c->vaddr + SA5_CTMEM_OFFSET); #ifdef CCISS_DEBUG printk("cfg offset = %x\n", cfg_offset); -#endif /* CCISS_DEBUG */ - c->cfgtable = remap_pci_mem(pci_resource_start(pdev, - cfg_base_addr_index) + - cfg_offset, sizeof(CfgTable_struct)); +#endif /* CCISS_DEBUG */ + c->cfgtable = remap_pci_mem(pci_resource_start(pdev, + cfg_base_addr_index) + cfg_offset, + sizeof(CfgTable_struct)); c->board_id = board_id; #ifdef CCISS_DEBUG print_cfg_table(c->cfgtable); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ - for (i = 0; i < ARRAY_SIZE(products); i++) { + for(i=0; iproduct_name = products[i].product_name; c->access = *(products[i].access); break; } } - if (i == ARRAY_SIZE(products)) { + if (i == NR_PRODUCTS) { printk(KERN_WARNING "cciss: Sorry, I don't know how" - " to access the Smart Array controller %08lx\n", - (unsigned long)board_id); - err = -ENODEV; - goto err_out_free_res; - } - if ((readb(&c->cfgtable->Signature[0]) != 'C') || - (readb(&c->cfgtable->Signature[1]) != 'I') || - (readb(&c->cfgtable->Signature[2]) != 'S') || - (readb(&c->cfgtable->Signature[3]) != 'S')) { - printk("Does not appear to be a valid CISS config table\n"); - err = -ENODEV; - goto err_out_free_res; + " to access the Smart Array controller %08lx\n", + (unsigned long)board_id); + return -1; } -#ifdef CONFIG_X86 + if ( (readb(&c->cfgtable->Signature[0]) != 'C') || + (readb(&c->cfgtable->Signature[1]) != 'I') || + (readb(&c->cfgtable->Signature[2]) != 'S') || + (readb(&c->cfgtable->Signature[3]) != 'S') ) { - /* Need to enable prefetch in the SCSI core for 6400 in x86 */ - __u32 prefetch; - prefetch = readl(&(c->cfgtable->SCSI_Prefetch)); - prefetch |= 0x100; - writel(prefetch, &(c->cfgtable->SCSI_Prefetch)); + printk("Does not appear to be a valid CISS config table\n"); + return -1; } + +#ifdef CONFIG_X86 +{ + /* Need to enable prefetch in the SCSI core for 6400 in x86 */ + __u32 prefetch; + prefetch = readl(&(c->cfgtable->SCSI_Prefetch)); + prefetch |= 0x100; + writel(prefetch, &(c->cfgtable->SCSI_Prefetch)); +} #endif #ifdef CCISS_DEBUG printk("Trying to put board into Simple mode\n"); -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ c->max_commands = readl(&(c->cfgtable->CmdsOutMax)); - /* Update the field, and then ring the doorbell */ - writel(CFGTBL_Trans_Simple, &(c->cfgtable->HostWrite.TransportRequest)); - writel(CFGTBL_ChangeReq, c->vaddr + SA5_DOORBELL); + /* Update the field, and then ring the doorbell */ + writel( CFGTBL_Trans_Simple, + &(c->cfgtable->HostWrite.TransportRequest)); + writel( CFGTBL_ChangeReq, c->vaddr + SA5_DOORBELL); /* under certain very rare conditions, this can take awhile. * (e.g.: hot replace a failed 144GB drive in a RAID 5 set right * as we enter this code.) */ - for (i = 0; i < MAX_CONFIG_WAIT; i++) { + for(i=0;ivaddr + SA5_DOORBELL) & CFGTBL_ChangeReq)) break; /* delay and try again */ set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(10); - } + } #ifdef CCISS_DEBUG - printk(KERN_DEBUG "I counter got to %d %x\n", i, - readl(c->vaddr + SA5_DOORBELL)); -#endif /* CCISS_DEBUG */ + printk(KERN_DEBUG "I counter got to %d %x\n", i, readl(c->vaddr + SA5_DOORBELL)); +#endif /* CCISS_DEBUG */ #ifdef CCISS_DEBUG - print_cfg_table(c->cfgtable); -#endif /* CCISS_DEBUG */ + print_cfg_table(c->cfgtable); +#endif /* CCISS_DEBUG */ - if (!(readl(&(c->cfgtable->TransportActive)) & CFGTBL_Trans_Simple)) { + if (!(readl(&(c->cfgtable->TransportActive)) & CFGTBL_Trans_Simple)) + { printk(KERN_WARNING "cciss: unable to get board into" - " simple mode\n"); - err = -ENODEV; - goto err_out_free_res; + " simple mode\n"); + return -1; } return 0; - err_out_free_res: - pci_release_regions(pdev); - - err_out_disable_pdev: - pci_disable_device(pdev); - return err; } -/* - * Gets information about the local volumes attached to the controller. - */ +/* + * Gets information about the local volumes attached to the controller. + */ static void cciss_getgeometry(int cntl_num) { ReportLunData_struct *ld_buff; @@ -2961,102 +2939,102 @@ static void cciss_getgeometry(int cntl_num) int listlength = 0; __u32 lunid = 0; int block_size; - int total_size; + int total_size; ld_buff = kzalloc(sizeof(ReportLunData_struct), GFP_KERNEL); - if (ld_buff == NULL) { - printk(KERN_ERR "cciss: out of memory\n"); - return; - } - size_buff = kmalloc(sizeof(ReadCapdata_struct), GFP_KERNEL); - if (size_buff == NULL) { + if (ld_buff == NULL) + { printk(KERN_ERR "cciss: out of memory\n"); - kfree(ld_buff); return; } - inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL); - if (inq_buff == NULL) { - printk(KERN_ERR "cciss: out of memory\n"); + size_buff = kmalloc(sizeof( ReadCapdata_struct), GFP_KERNEL); + if (size_buff == NULL) + { + printk(KERN_ERR "cciss: out of memory\n"); kfree(ld_buff); + return; + } + inq_buff = kmalloc(sizeof( InquiryData_struct), GFP_KERNEL); + if (inq_buff == NULL) + { + printk(KERN_ERR "cciss: out of memory\n"); + kfree(ld_buff); kfree(size_buff); - return; - } - /* Get the firmware version */ - return_code = sendcmd(CISS_INQUIRY, cntl_num, inq_buff, - sizeof(InquiryData_struct), 0, 0, 0, NULL, - TYPE_CMD); - if (return_code == IO_OK) { + return; + } + /* Get the firmware version */ + return_code = sendcmd(CISS_INQUIRY, cntl_num, inq_buff, + sizeof(InquiryData_struct), 0, 0 ,0, NULL, TYPE_CMD); + if (return_code == IO_OK) + { hba[cntl_num]->firm_ver[0] = inq_buff->data_byte[32]; hba[cntl_num]->firm_ver[1] = inq_buff->data_byte[33]; hba[cntl_num]->firm_ver[2] = inq_buff->data_byte[34]; hba[cntl_num]->firm_ver[3] = inq_buff->data_byte[35]; - } else { /* send command failed */ - + } else /* send command failed */ + { printk(KERN_WARNING "cciss: unable to determine firmware" - " version of controller\n"); + " version of controller\n"); } - /* Get the number of logical volumes */ - return_code = sendcmd(CISS_REPORT_LOG, cntl_num, ld_buff, - sizeof(ReportLunData_struct), 0, 0, 0, NULL, - TYPE_CMD); + /* Get the number of logical volumes */ + return_code = sendcmd(CISS_REPORT_LOG, cntl_num, ld_buff, + sizeof(ReportLunData_struct), 0, 0, 0, NULL, TYPE_CMD); - if (return_code == IO_OK) { + if( return_code == IO_OK) + { #ifdef CCISS_DEBUG printk("LUN Data\n--------------------------\n"); -#endif /* CCISS_DEBUG */ - - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24; - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16; - listlength |= - (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8; - listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]); - } else { /* reading number of logical volumes failed */ +#endif /* CCISS_DEBUG */ + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24; + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16; + listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8; + listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]); + } else /* reading number of logical volumes failed */ + { printk(KERN_WARNING "cciss: report logical volume" - " command failed\n"); + " command failed\n"); listlength = 0; } - hba[cntl_num]->num_luns = listlength / 8; // 8 bytes pre entry - if (hba[cntl_num]->num_luns > CISS_MAX_LUN) { - printk(KERN_ERR - "ciss: only %d number of logical volumes supported\n", - CISS_MAX_LUN); + hba[cntl_num]->num_luns = listlength / 8; // 8 bytes pre entry + if (hba[cntl_num]->num_luns > CISS_MAX_LUN) + { + printk(KERN_ERR "ciss: only %d number of logical volumes supported\n", + CISS_MAX_LUN); hba[cntl_num]->num_luns = CISS_MAX_LUN; } #ifdef CCISS_DEBUG - printk(KERN_DEBUG "Length = %x %x %x %x = %d\n", - ld_buff->LUNListLength[0], ld_buff->LUNListLength[1], - ld_buff->LUNListLength[2], ld_buff->LUNListLength[3], - hba[cntl_num]->num_luns); -#endif /* CCISS_DEBUG */ - - hba[cntl_num]->highest_lun = hba[cntl_num]->num_luns - 1; -// for(i=0; i< hba[cntl_num]->num_luns; i++) - for (i = 0; i < CISS_MAX_LUN; i++) { - if (i < hba[cntl_num]->num_luns) { - lunid = (0xff & (unsigned int)(ld_buff->LUN[i][3])) - << 24; - lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][2])) - << 16; - lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][1])) - << 8; - lunid |= 0xff & (unsigned int)(ld_buff->LUN[i][0]); - - hba[cntl_num]->drv[i].LunID = lunid; + printk(KERN_DEBUG "Length = %x %x %x %x = %d\n", ld_buff->LUNListLength[0], + ld_buff->LUNListLength[1], ld_buff->LUNListLength[2], + ld_buff->LUNListLength[3], hba[cntl_num]->num_luns); +#endif /* CCISS_DEBUG */ + + hba[cntl_num]->highest_lun = hba[cntl_num]->num_luns-1; +// for(i=0; i< hba[cntl_num]->num_luns; i++) + for(i=0; i < CISS_MAX_LUN; i++) + { + if (i < hba[cntl_num]->num_luns){ + lunid = (0xff & (unsigned int)(ld_buff->LUN[i][3])) + << 24; + lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][2])) + << 16; + lunid |= (0xff & (unsigned int)(ld_buff->LUN[i][1])) + << 8; + lunid |= 0xff & (unsigned int)(ld_buff->LUN[i][0]); + + hba[cntl_num]->drv[i].LunID = lunid; + #ifdef CCISS_DEBUG - printk(KERN_DEBUG "LUN[%d]: %x %x %x %x = %x\n", i, - ld_buff->LUN[i][0], ld_buff->LUN[i][1], - ld_buff->LUN[i][2], ld_buff->LUN[i][3], - hba[cntl_num]->drv[i].LunID); -#endif /* CCISS_DEBUG */ - cciss_read_capacity(cntl_num, i, size_buff, 0, - &total_size, &block_size); + printk(KERN_DEBUG "LUN[%d]: %x %x %x %x = %x\n", i, + ld_buff->LUN[i][0], ld_buff->LUN[i][1], + ld_buff->LUN[i][2], ld_buff->LUN[i][3], + hba[cntl_num]->drv[i].LunID); +#endif /* CCISS_DEBUG */ + cciss_read_capacity(cntl_num, i, size_buff, 0, + &total_size, &block_size); cciss_geometry_inquiry(cntl_num, i, 0, total_size, - block_size, inq_buff, - &hba[cntl_num]->drv[i]); + block_size, inq_buff, &hba[cntl_num]->drv[i]); } else { /* initialize raid_level to indicate a free space */ hba[cntl_num]->drv[i].raid_level = -1; @@ -3065,7 +3043,7 @@ static void cciss_getgeometry(int cntl_num) kfree(ld_buff); kfree(size_buff); kfree(inq_buff); -} +} /* Function to find the first free pointer into our hba[] array */ /* Returns -1 if no free entries are left. */ @@ -3079,7 +3057,7 @@ static int alloc_cciss_hba(void) goto out; } - for (i = 0; i < MAX_CTLR; i++) { + for(i=0; i< MAX_CTLR; i++) { if (!hba[i]) { ctlr_info_t *p; p = kzalloc(sizeof(ctlr_info_t), GFP_KERNEL); @@ -3092,11 +3070,11 @@ static int alloc_cciss_hba(void) } } printk(KERN_WARNING "cciss: This driver supports a maximum" - " of %d controllers.\n", MAX_CTLR); + " of %d controllers.\n", MAX_CTLR); goto out; - Enomem: +Enomem: printk(KERN_ERR "cciss: out of memory.\n"); - out: +out: while (n--) put_disk(disk[n]); return -1; @@ -3119,17 +3097,20 @@ static void free_hba(int i) * returns the number of block devices registered. */ static int __devinit cciss_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) + const struct pci_device_id *ent) { request_queue_t *q; int i; int j; int rc; - int dac; + printk(KERN_DEBUG "cciss: Device 0x%x has been found at" + " bus %d dev %d func %d\n", + pdev->device, pdev->bus->number, PCI_SLOT(pdev->devfn), + PCI_FUNC(pdev->devfn)); i = alloc_cciss_hba(); - if (i < 0) - return -1; + if(i < 0) + return (-1); hba[i]->busy_initializing = 1; @@ -3142,11 +3123,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, /* configure PCI DMA stuff */ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) - dac = 1; + printk("cciss: using DAC cycles\n"); else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) - dac = 0; + printk("cciss: not using DAC cycles\n"); else { - printk(KERN_ERR "cciss: no suitable DMA available\n"); + printk("cciss: no suitable DMA available\n"); goto clean1; } @@ -3158,69 +3139,60 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, if (i < MAX_CTLR_ORIG) hba[i]->major = COMPAQ_CISS_MAJOR + i; rc = register_blkdev(hba[i]->major, hba[i]->devname); - if (rc == -EBUSY || rc == -EINVAL) { + if(rc == -EBUSY || rc == -EINVAL) { printk(KERN_ERR - "cciss: Unable to get major number %d for %s " - "on hba %d\n", hba[i]->major, hba[i]->devname, i); + "cciss: Unable to get major number %d for %s " + "on hba %d\n", hba[i]->major, hba[i]->devname, i); goto clean1; - } else { + } + else { if (i >= MAX_CTLR_ORIG) hba[i]->major = rc; } /* make sure the board interrupts are off */ hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF); - if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr, - IRQF_DISABLED | IRQF_SHARED, hba[i]->devname, hba[i])) { + if( request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr, + SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, + hba[i]->devname, hba[i])) { printk(KERN_ERR "cciss: Unable to get irq %d for %s\n", - hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); + hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); goto clean2; } - - printk(KERN_INFO "%s: <0x%x> at PCI %s IRQ %d%s using DAC\n", - hba[i]->devname, pdev->device, pci_name(pdev), - hba[i]->intr[SIMPLE_MODE_INT], dac ? "" : " not"); - - hba[i]->cmd_pool_bits = - kmalloc(((NR_CMDS + BITS_PER_LONG - - 1) / BITS_PER_LONG) * sizeof(unsigned long), GFP_KERNEL); - hba[i]->cmd_pool = (CommandList_struct *) - pci_alloc_consistent(hba[i]->pdev, - NR_CMDS * sizeof(CommandList_struct), - &(hba[i]->cmd_pool_dhandle)); - hba[i]->errinfo_pool = (ErrorInfo_struct *) - pci_alloc_consistent(hba[i]->pdev, - NR_CMDS * sizeof(ErrorInfo_struct), - &(hba[i]->errinfo_pool_dhandle)); - if ((hba[i]->cmd_pool_bits == NULL) - || (hba[i]->cmd_pool == NULL) - || (hba[i]->errinfo_pool == NULL)) { - printk(KERN_ERR "cciss: out of memory"); + hba[i]->cmd_pool_bits = kmalloc(((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long), GFP_KERNEL); + hba[i]->cmd_pool = (CommandList_struct *)pci_alloc_consistent( + hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct), + &(hba[i]->cmd_pool_dhandle)); + hba[i]->errinfo_pool = (ErrorInfo_struct *)pci_alloc_consistent( + hba[i]->pdev, NR_CMDS * sizeof( ErrorInfo_struct), + &(hba[i]->errinfo_pool_dhandle)); + if((hba[i]->cmd_pool_bits == NULL) + || (hba[i]->cmd_pool == NULL) + || (hba[i]->errinfo_pool == NULL)) { + printk( KERN_ERR "cciss: out of memory"); goto clean4; } #ifdef CONFIG_CISS_SCSI_TAPE - hba[i]->scsi_rejects.complete = - kmalloc(sizeof(hba[i]->scsi_rejects.complete[0]) * - (NR_CMDS + 5), GFP_KERNEL); + hba[i]->scsi_rejects.complete = + kmalloc(sizeof(hba[i]->scsi_rejects.complete[0]) * + (NR_CMDS + 5), GFP_KERNEL); if (hba[i]->scsi_rejects.complete == NULL) { - printk(KERN_ERR "cciss: out of memory"); + printk( KERN_ERR "cciss: out of memory"); goto clean4; } #endif spin_lock_init(&hba[i]->lock); - /* Initialize the pdev driver private data. - have it point to hba[i]. */ + /* Initialize the pdev driver private data. + have it point to hba[i]. */ pci_set_drvdata(pdev, hba[i]); - /* command and error info recs zeroed out before - they are used */ - memset(hba[i]->cmd_pool_bits, 0, - ((NR_CMDS + BITS_PER_LONG - - 1) / BITS_PER_LONG) * sizeof(unsigned long)); + /* command and error info recs zeroed out before + they are used */ + memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long)); -#ifdef CCISS_DEBUG - printk(KERN_DEBUG "Scanning for drives on controller cciss%d\n", i); -#endif /* CCISS_DEBUG */ +#ifdef CCISS_DEBUG + printk(KERN_DEBUG "Scanning for drives on controller cciss%d\n",i); +#endif /* CCISS_DEBUG */ cciss_getgeometry(i); @@ -3232,15 +3204,15 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, cciss_procinit(i); hba[i]->busy_initializing = 0; - for (j = 0; j < NWD; j++) { /* mfm */ + for(j=0; j < NWD; j++) { /* mfm */ drive_info_struct *drv = &(hba[i]->drv[j]); struct gendisk *disk = hba[i]->gendisk[j]; q = blk_init_queue(do_cciss_request, &hba[i]->lock); if (!q) { printk(KERN_ERR - "cciss: unable to allocate queue for disk %d\n", - j); + "cciss: unable to allocate queue for disk %d\n", + j); break; } drv->queue = q; @@ -3260,95 +3232,100 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, q->queuedata = hba[i]; sprintf(disk->disk_name, "cciss/c%dd%d", i, j); + sprintf(disk->devfs_name, "cciss/host%d/target%d", i, j); disk->major = hba[i]->major; disk->first_minor = j << NWD_SHIFT; disk->fops = &cciss_fops; disk->queue = q; disk->private_data = drv; - disk->driverfs_dev = &pdev->dev; /* we must register the controller even if no disks exist */ /* this is for the online array utilities */ - if (!drv->heads && j) + if(!drv->heads && j) continue; blk_queue_hardsect_size(q, drv->block_size); set_capacity(disk, drv->nr_blocks); add_disk(disk); } - return 1; + return(1); - clean4: +clean4: #ifdef CONFIG_CISS_SCSI_TAPE kfree(hba[i]->scsi_rejects.complete); #endif kfree(hba[i]->cmd_pool_bits); - if (hba[i]->cmd_pool) + if(hba[i]->cmd_pool) pci_free_consistent(hba[i]->pdev, - NR_CMDS * sizeof(CommandList_struct), - hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle); - if (hba[i]->errinfo_pool) + NR_CMDS * sizeof(CommandList_struct), + hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle); + if(hba[i]->errinfo_pool) pci_free_consistent(hba[i]->pdev, - NR_CMDS * sizeof(ErrorInfo_struct), - hba[i]->errinfo_pool, - hba[i]->errinfo_pool_dhandle); + NR_CMDS * sizeof( ErrorInfo_struct), + hba[i]->errinfo_pool, + hba[i]->errinfo_pool_dhandle); free_irq(hba[i]->intr[SIMPLE_MODE_INT], hba[i]); - clean2: +clean2: unregister_blkdev(hba[i]->major, hba[i]->devname); - clean1: +clean1: + release_io_mem(hba[i]); hba[i]->busy_initializing = 0; free_hba(i); - return -1; + return(-1); } -static void __devexit cciss_remove_one(struct pci_dev *pdev) +static void __devexit cciss_remove_one (struct pci_dev *pdev) { ctlr_info_t *tmp_ptr; int i, j; char flush_buf[4]; - int return_code; + int return_code; - if (pci_get_drvdata(pdev) == NULL) { - printk(KERN_ERR "cciss: Unable to remove device \n"); + if (pci_get_drvdata(pdev) == NULL) + { + printk( KERN_ERR "cciss: Unable to remove device \n"); return; } tmp_ptr = pci_get_drvdata(pdev); i = tmp_ptr->ctlr; - if (hba[i] == NULL) { + if (hba[i] == NULL) + { printk(KERN_ERR "cciss: device appears to " - "already be removed \n"); + "already be removed \n"); return; } /* Turn board interrupts off and send the flush cache command */ /* sendcmd will turn off interrupt, and send the flush... - * To write all data in the battery backed cache to disks */ + * To write all data in the battery backed cache to disks */ memset(flush_buf, 0, 4); return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4, 0, 0, 0, NULL, - TYPE_CMD); - if (return_code != IO_OK) { - printk(KERN_WARNING "Error Flushing cache on controller %d\n", - i); + TYPE_CMD); + if(return_code != IO_OK) + { + printk(KERN_WARNING "Error Flushing cache on controller %d\n", + i); } free_irq(hba[i]->intr[2], hba[i]); #ifdef CONFIG_PCI_MSI - if (hba[i]->msix_vector) - pci_disable_msix(hba[i]->pdev); - else if (hba[i]->msi_vector) - pci_disable_msi(hba[i]->pdev); -#endif /* CONFIG_PCI_MSI */ + if (hba[i]->msix_vector) + pci_disable_msix(hba[i]->pdev); + else if (hba[i]->msi_vector) + pci_disable_msi(hba[i]->pdev); +#endif /* CONFIG_PCI_MSI */ + pci_set_drvdata(pdev, NULL); iounmap(hba[i]->vaddr); - cciss_unregister_scsi(i); /* unhook from SCSI subsystem */ + cciss_unregister_scsi(i); /* unhook from SCSI subsystem */ unregister_blkdev(hba[i]->major, hba[i]->devname); - remove_proc_entry(hba[i]->devname, proc_cciss); - + remove_proc_entry(hba[i]->devname, proc_cciss); + /* remove it from the disk list */ for (j = 0; j < NWD; j++) { struct gendisk *disk = hba[i]->gendisk[j]; if (disk) { request_queue_t *q = disk->queue; - if (disk->flags & GENHD_FL_UP) + if (disk->flags & GENHD_FL_UP) del_gendisk(disk); if (q) blk_cleanup_queue(q); @@ -3357,28 +3334,26 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev) pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct), hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle); - pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof(ErrorInfo_struct), - hba[i]->errinfo_pool, hba[i]->errinfo_pool_dhandle); + pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof( ErrorInfo_struct), + hba[i]->errinfo_pool, hba[i]->errinfo_pool_dhandle); kfree(hba[i]->cmd_pool_bits); #ifdef CONFIG_CISS_SCSI_TAPE kfree(hba[i]->scsi_rejects.complete); #endif - pci_release_regions(pdev); - pci_disable_device(pdev); - pci_set_drvdata(pdev, NULL); + release_io_mem(hba[i]); free_hba(i); -} +} static struct pci_driver cciss_pci_driver = { - .name = "cciss", - .probe = cciss_init_one, - .remove = __devexit_p(cciss_remove_one), - .id_table = cciss_pci_device_id, /* id_table */ + .name = "cciss", + .probe = cciss_init_one, + .remove = __devexit_p(cciss_remove_one), + .id_table = cciss_pci_device_id, /* id_table */ }; /* * This is it. Register the PCI driver information for the cards we control - * the OS will call our registered routines when it finds one of our cards. + * the OS will call our registered routines when it finds one of our cards. */ static int __init cciss_init(void) { @@ -3394,10 +3369,12 @@ static void __exit cciss_cleanup(void) pci_unregister_driver(&cciss_pci_driver); /* double check that all controller entrys have been removed */ - for (i = 0; i < MAX_CTLR; i++) { - if (hba[i] != NULL) { + for (i=0; i< MAX_CTLR; i++) + { + if (hba[i] != NULL) + { printk(KERN_WARNING "cciss: had to remove" - " controller %d\n", i); + " controller %d\n", i); cciss_remove_one(hba[i]->pdev); } } @@ -3412,21 +3389,21 @@ static void fail_all_cmds(unsigned long ctlr) unsigned long flags; printk(KERN_WARNING "cciss%d: controller not responding.\n", h->ctlr); - h->alive = 0; /* the controller apparently died... */ + h->alive = 0; /* the controller apparently died... */ spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - pci_disable_device(h->pdev); /* Make sure it is really dead. */ + pci_disable_device(h->pdev); /* Make sure it is really dead. */ /* move everything off the request queue onto the completed queue */ - while ((c = h->reqQ) != NULL) { + while( (c = h->reqQ) != NULL ) { removeQ(&(h->reqQ), c); h->Qdepth--; - addQ(&(h->cmpQ), c); + addQ (&(h->cmpQ), c); } /* Now, fail everything on the completed queue with a HW error */ - while ((c = h->cmpQ) != NULL) { + while( (c = h->cmpQ) != NULL ) { removeQ(&h->cmpQ, c); c->err_info->CommandStatus = CMD_HARDWARE_ERR; if (c->cmd_type == CMD_RWREQ) { @@ -3434,8 +3411,8 @@ static void fail_all_cmds(unsigned long ctlr) } else if (c->cmd_type == CMD_IOCTL_PEND) complete(c->waiting); #ifdef CONFIG_CISS_SCSI_TAPE - else if (c->cmd_type == CMD_SCSI) - complete_scsi_command(c, 0, 0); + else if (c->cmd_type == CMD_SCSI) + complete_scsi_command(c, 0, 0); #endif } spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); diff --git a/drivers/block/cciss.h b/drivers/block/cciss.h index 868e0d862..b24fc0553 100644 --- a/drivers/block/cciss.h +++ b/drivers/block/cciss.h @@ -60,6 +60,8 @@ struct ctlr_info __u32 board_id; void __iomem *vaddr; unsigned long paddr; + unsigned long io_mem_addr; + unsigned long io_mem_length; CfgTable_struct __iomem *cfgtable; int interrupts_enabled; int major; diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index ae1a756f7..597c007fe 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -578,7 +578,7 @@ complete_scsi_command( CommandList_struct *cp, int timeout, __u32 tag) if (cmd->use_sg) { pci_unmap_sg(ctlr->pdev, - cmd->request_buffer, cmd->use_sg, + cmd->buffer, cmd->use_sg, cmd->sc_data_direction); } else if (cmd->request_bufflen) { @@ -770,7 +770,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, int direction) { unsigned long flags; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl cp->scsi_cmd = NULL; @@ -1210,7 +1210,7 @@ cciss_scatter_gather(struct pci_dev *pdev, struct scsi_cmnd *cmd) { unsigned int use_sg, nsegs=0, len; - struct scatterlist *scatter = (struct scatterlist *) cmd->request_buffer; + struct scatterlist *scatter = (struct scatterlist *) cmd->buffer; __u64 addr64; /* is it just one virtual address? */ @@ -1232,7 +1232,7 @@ cciss_scatter_gather(struct pci_dev *pdev, } /* else, must be a list of virtual addresses.... */ else if (cmd->use_sg <= MAXSGENTRIES) { /* not too many addrs? */ - use_sg = pci_map_sg(pdev, cmd->request_buffer, cmd->use_sg, + use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, cmd->sc_data_direction); for (nsegs=0; nsegs < use_sg; nsegs++) { diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 2e0b8d571..00efcf085 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -19,6 +19,7 @@ * Questions/Comments/Bugfixes to iss_storagedev@hp.com * */ +#include /* CONFIG_PROC_FS */ #include #include #include @@ -32,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -347,6 +349,7 @@ static void __devexit cpqarray_remove_one(int i) for(j = 0; j < NWD; j++) { if (ida_gendisk[i][j]->flags & GENHD_FL_UP) del_gendisk(ida_gendisk[i][j]); + devfs_remove("ida/c%dd%d",i,j); put_disk(ida_gendisk[i][j]); } blk_cleanup_queue(hba[i]->queue); @@ -390,7 +393,7 @@ static void __devexit cpqarray_remove_one_eisa (int i) } /* pdev is NULL for eisa */ -static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev) +static int cpqarray_register_ctlr( int i, struct pci_dev *pdev) { request_queue_t *q; int j; @@ -408,7 +411,8 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev) } hba[i]->access.set_intr_mask(hba[i], 0); if (request_irq(hba[i]->intr, do_ida_intr, - IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i])) + SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM, + hba[i]->devname, hba[i])) { printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", hba[i]->intr, hba[i]->devname); @@ -614,7 +618,6 @@ static int cpqarray_pci_init(ctlr_info_t *c, struct pci_dev *pdev) int i; c->pci_dev = pdev; - pci_set_master(pdev); if (pci_enable_device(pdev)) { printk(KERN_ERR "cpqarray: Unable to Enable PCI device\n"); return -1; @@ -743,7 +746,7 @@ __setup("smart2=", cpqarray_setup); /* * Find an EISA controller's signature. Set up an hba if we find it. */ -static int __init cpqarray_eisa_detect(void) +static int cpqarray_eisa_detect(void) { int i=0, j; __u32 board_id; @@ -1001,7 +1004,6 @@ static inline void complete_buffers(struct bio *bio, int ok) */ static inline void complete_command(cmdlist_t *cmd, int timeout) { - struct request *rq = cmd->rq; int ok=1; int i, ddir; @@ -1033,18 +1035,10 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, cmd->req.sg[i].size, ddir); - complete_buffers(rq->bio, ok); + complete_buffers(cmd->rq->bio, ok); - if (blk_fs_request(rq)) { - const int rw = rq_data_dir(rq); - - disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); - } - - add_disk_randomness(rq->rq_disk); - - DBGPX(printk("Done with %p\n", rq);); - end_that_request_last(rq, ok ? 1 : -EIO); + DBGPX(printk("Done with %p\n", cmd->rq);); + end_that_request_last(cmd->rq, ok ? 1 : -EIO); } /* @@ -1747,6 +1741,8 @@ static void getgeometry(int ctlr) (log_index < id_ctlr_buf->nr_drvs) && (log_unit < NWD); log_unit++) { + struct gendisk *disk = ida_gendisk[ctlr][log_unit]; + size = sizeof(sense_log_drv_stat_t); /* @@ -1811,6 +1807,8 @@ static void getgeometry(int ctlr) } + sprintf(disk->devfs_name, "ida/c%dd%d", ctlr, log_unit); + info_p->phys_drives = sense_config_buf->ctlr_phys_drv; info_p->drv_assign_map @@ -1846,6 +1844,7 @@ static void __exit cpqarray_exit(void) } } + devfs_remove("ida"); remove_proc_entry("cpqarray", proc_root_driver); } diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index ad1d7065a..dff1e67b1 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -177,6 +177,7 @@ static int print_unex = 1; #include #include #include +#include #include #include /* for invalidate_buffers() */ #include @@ -223,6 +224,7 @@ static struct completion device_release; static unsigned short virtual_dma_port = 0x3f0; irqreturn_t floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int set_dor(int fdc, char mask, char data); +static void register_devfs_entries(int drive) __init; #define K_64 0x10000 /* 64KB */ @@ -249,6 +251,18 @@ static int irqdma_allocated; #include /* for the compatibility eject ioctl */ #include +/* + * Interrupt freeing also means /proc VFS work - dont do it + * from interrupt context. We push this work into keventd: + */ +static void fd_free_irq_fn(void *data) +{ + fd_free_irq(); +} + +static DECLARE_WORK(fd_free_irq_work, fd_free_irq_fn, NULL); + + static struct request *current_req; static struct request_queue *floppy_queue; static void do_fd_request(request_queue_t * q); @@ -814,6 +828,15 @@ static int set_dor(int fdc, char mask, char data) UDRS->select_date = jiffies; } } + /* + * We should propagate failures to grab the resources back + * nicely from here. Actually we ought to rewrite the fd + * driver some day too. + */ + if (newdor & FLOPPY_MOTOR_MASK) + floppy_grab_irq_and_dma(); + if (olddor & FLOPPY_MOTOR_MASK) + floppy_release_irq_and_dma(); return olddor; } @@ -871,6 +894,8 @@ static int _lock_fdc(int drive, int interruptible, int line) line); return -1; } + if (floppy_grab_irq_and_dma() == -1) + return -EBUSY; if (test_and_set_bit(0, &fdc_busy)) { DECLARE_WAITQUEUE(wait, current); @@ -892,8 +917,6 @@ static int _lock_fdc(int drive, int interruptible, int line) set_current_state(TASK_RUNNING); remove_wait_queue(&fdc_wait, &wait); - - flush_scheduled_work(); } command_status = FD_COMMAND_NONE; @@ -927,6 +950,7 @@ static inline void unlock_fdc(void) if (elv_next_request(floppy_queue)) do_fd_request(floppy_queue); spin_unlock_irqrestore(&floppy_lock, flags); + floppy_release_irq_and_dma(); wake_up(&fdc_wait); } @@ -3652,6 +3676,7 @@ static void __init config_types(void) first = 0; } printk("%s fd%d is %s", prepend, drive, name); + register_devfs_entries(drive); } *UDP = *params; } @@ -3672,8 +3697,8 @@ static int floppy_release(struct inode *inode, struct file *filp) } if (!UDRS->fd_ref) opened_bdev[drive] = NULL; + floppy_release_irq_and_dma(); mutex_unlock(&open_lock); - return 0; } @@ -3704,6 +3729,9 @@ static int floppy_open(struct inode *inode, struct file *filp) if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL))) goto out2; + if (floppy_grab_irq_and_dma()) + goto out2; + if (filp->f_flags & O_EXCL) UDRS->fd_ref = -1; else @@ -3780,6 +3808,7 @@ out: UDRS->fd_ref--; if (!UDRS->fd_ref) opened_bdev[drive] = NULL; + floppy_release_irq_and_dma(); out2: mutex_unlock(&open_lock); return res; @@ -3796,9 +3825,14 @@ static int check_floppy_change(struct gendisk *disk) return 1; if (time_after(jiffies, UDRS->last_checked + UDP->checkfreq)) { + if (floppy_grab_irq_and_dma()) { + return 1; + } + lock_fdc(drive, 0); poll_drive(0, 0); process_fd_request(); + floppy_release_irq_and_dma(); } if (UTESTF(FD_DISK_CHANGED) || @@ -3920,6 +3954,37 @@ static struct block_device_operations floppy_fops = { .media_changed = check_floppy_change, .revalidate_disk = floppy_revalidate, }; +static char *table[] = { + "", "d360", "h1200", "u360", "u720", "h360", "h720", + "u1440", "u2880", "CompaQ", "h1440", "u1680", "h410", + "u820", "h1476", "u1722", "h420", "u830", "h1494", "u1743", + "h880", "u1040", "u1120", "h1600", "u1760", "u1920", + "u3200", "u3520", "u3840", "u1840", "u800", "u1600", + NULL +}; +static int t360[] = { 1, 0 }, + t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 }, + t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13, + 17, 21, 22, 30, 0 }; +static int *table_sup[] = + { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in }; + +static void __init register_devfs_entries(int drive) +{ + int base_minor = (drive < 4) ? drive : (124 + drive); + + if (UDP->cmos < ARRAY_SIZE(default_drive_params)) { + int i = 0; + do { + int minor = base_minor + (table_sup[UDP->cmos][i] << 2); + + devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor), + S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | + S_IWGRP, "floppy/%d%s", drive, + table[table_sup[UDP->cmos][i]]); + } while (table_sup[UDP->cmos][i++]); + } +} /* * Floppy Driver initialization @@ -4177,11 +4242,6 @@ static int __init floppy_init(void) int i, unit, drive; int err, dr; -#if defined(CONFIG_PPC_MERGE) - if (check_legacy_ioport(FDC1)) - return -ENODEV; -#endif - raw_cmd = NULL; for (dr = 0; dr < N_DRIVE; dr++) { @@ -4201,9 +4261,11 @@ static int __init floppy_init(void) motor_off_timer[dr].function = motor_off_callback; } + devfs_mk_dir("floppy"); + err = register_blkdev(FLOPPY_MAJOR, "fd"); if (err) - goto out_put_disk; + goto out_devfs_remove; floppy_queue = blk_init_queue(do_fd_request, &floppy_lock); if (!floppy_queue) { @@ -4239,6 +4301,13 @@ static int __init floppy_init(void) } use_virtual_dma = can_use_virtual_dma & 1; +#if defined(CONFIG_PPC_MERGE) + if (check_legacy_ioport(FDC1)) { + del_timer(&fd_timeout); + err = -ENODEV; + goto out_unreg_region; + } +#endif fdc_state[0].address = FDC1; if (fdc_state[0].address == -1) { del_timer(&fd_timeout); @@ -4313,6 +4382,7 @@ static int __init floppy_init(void) fdc = 0; del_timer(&fd_timeout); current_drive = 0; + floppy_release_irq_and_dma(); initialising = 0; if (have_no_fdc) { DPRINT("no floppy controllers found\n"); @@ -4354,6 +4424,8 @@ out_unreg_region: blk_cleanup_queue(floppy_queue); out_unreg_blkdev: unregister_blkdev(FLOPPY_MAJOR, "fd"); +out_devfs_remove: + devfs_remove("floppy"); out_put_disk: while (dr--) { del_timer(&motor_off_timer[dr]); @@ -4470,7 +4542,7 @@ static void floppy_release_irq_and_dma(void) if (irqdma_allocated) { fd_disable_dma(); fd_free_dma(); - fd_free_irq(); + schedule_work(&fd_free_irq_work); irqdma_allocated = 0; } set_dor(0, ~0, 8); @@ -4514,6 +4586,19 @@ static void floppy_release_irq_and_dma(void) static char *floppy; +static void unregister_devfs_entries(int drive) +{ + int i; + + if (UDP->cmos < ARRAY_SIZE(default_drive_params)) { + i = 0; + do { + devfs_remove("floppy/%d%s", drive, + table[table_sup[UDP->cmos][i]]); + } while (table_sup[UDP->cmos][i++]); + } +} + static void __init parse_floppy_cfg_string(char *cfg) { char *ptr; @@ -4550,11 +4635,13 @@ void cleanup_module(void) if ((allowed_drive_mask & (1 << drive)) && fdc_state[FDC(drive)].version != FDC_NONE) { del_gendisk(disks[drive]); + unregister_devfs_entries(drive); device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); platform_device_unregister(&floppy_device[drive]); } put_disk(disks[drive]); } + devfs_remove("floppy"); del_timer_sync(&fd_timeout); del_timer_sync(&fd_timer); @@ -4566,6 +4653,8 @@ void cleanup_module(void) /* eject disk, if any */ fd_eject(0); + flush_scheduled_work(); /* fd_free_irq() might be pending */ + wait_for_completion(&device_release); } diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e775b846e..94317ad9e 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -50,6 +50,7 @@ * */ +#include #include #include #include @@ -62,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -210,7 +212,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, { struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */ struct address_space *mapping = file->f_mapping; - const struct address_space_operations *aops = mapping->a_ops; + struct address_space_operations *aops = mapping->a_ops; pgoff_t index; unsigned offset, bv_offs; int len, ret; @@ -664,8 +666,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p) mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask); lo->lo_backing_file = file; - lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ? - mapping->host->i_bdev->bd_block_size : PAGE_SIZE; + lo->lo_blocksize = mapping->host->i_blksize; lo->old_gfp_mask = mapping_gfp_mask(mapping); mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); complete(&p->wait); @@ -785,7 +786,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file, error = -EINVAL; if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) { - const struct address_space_operations *aops = mapping->a_ops; + struct address_space_operations *aops = mapping->a_ops; /* * If we can't read - sorry. If we only can't write - well, * it's going to be read-only. @@ -797,9 +798,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file, if (!(lo_flags & LO_FLAGS_USE_AOPS) && !file->f_op->write) lo_flags |= LO_FLAGS_READ_ONLY; - lo_blocksize = S_ISBLK(inode->i_mode) ? - inode->i_bdev->bd_block_size : PAGE_SIZE; - + lo_blocksize = inode->i_blksize; error = 0; } else { goto out_putf; @@ -821,7 +820,7 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file, lo->lo_device = bdev; lo->lo_flags = lo_flags; lo->lo_backing_file = file; - lo->transfer = transfer_none; + lo->transfer = NULL; lo->ioctl = NULL; lo->lo_sizelimit = 0; lo->old_gfp_mask = mapping_gfp_mask(mapping); @@ -1280,6 +1279,8 @@ static int __init loop_init(void) goto out_mem3; } + devfs_mk_dir("loop"); + for (i = 0; i < max_loop; i++) { struct loop_device *lo = &loop_dev[i]; struct gendisk *disk = disks[i]; @@ -1297,6 +1298,7 @@ static int __init loop_init(void) disk->first_minor = i; disk->fops = &lo_fops; sprintf(disk->disk_name, "loop%d", i); + sprintf(disk->devfs_name, "loop/%d", i); disk->private_data = lo; disk->queue = lo->lo_queue; } @@ -1310,6 +1312,7 @@ static int __init loop_init(void) out_mem4: while (i--) blk_cleanup_queue(loop_dev[i].lo_queue); + devfs_remove("loop"); i = max_loop; out_mem3: while (i--) @@ -1332,6 +1335,7 @@ static void loop_exit(void) blk_cleanup_queue(loop_dev[i].lo_queue); put_disk(disks[i]); } + devfs_remove("loop"); if (unregister_blkdev(LOOP_MAJOR, "loop")) printk(KERN_WARNING "loop: cannot unregister blkdev\n"); diff --git a/drivers/block/mambo_bd.c b/drivers/block/mambo_bd.c index 1217ae7dc..fdae3e653 100644 --- a/drivers/block/mambo_bd.c +++ b/drivers/block/mambo_bd.c @@ -46,6 +46,8 @@ #include +#include + #include #include @@ -246,6 +248,7 @@ static int __init mbd_init(void) printk("mambo bogus disk: compiled in with kernel\n"); #endif + devfs_mk_dir("mambobd"); for (i = 0; i < MAX_MBD; i++) { /* load defaults */ struct gendisk *disk = mbd_dev[i].disk; mbd_dev[i].initialized = 0; @@ -256,6 +259,7 @@ static int __init mbd_init(void) disk->fops = &mbd_fops; disk->private_data = &mbd_dev[i]; sprintf(disk->disk_name, "mambobd%d", i); + sprintf(disk->devfs_name, "mambobd%d", i); set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */ add_disk(disk); } @@ -272,6 +276,8 @@ static int __init mbd_init(void) static void __exit mbd_cleanup(void) { + devfs_remove("mambobd"); + if (unregister_blkdev(MAJOR_NR, "mbd") != 0) printk("mbd: cleanup_module failed\n"); else diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index bdbade9a5..8bca4905d 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -7,9 +7,39 @@ * Copyright 1997-2000 Pavel Machek * Parts copyright 2001 Steven Whitehouse * - * This file is released under GPLv2 or later. - * * (part of code stolen from loop.c) + * + * 97-3-25 compiled 0-th version, not yet tested it + * (it did not work, BTW) (later that day) HEY! it works! + * (bit later) hmm, not that much... 2:00am next day: + * yes, it works, but it gives something like 50kB/sec + * 97-4-01 complete rewrite to make it possible for many requests at + * once to be processed + * 97-4-11 Making protocol independent of endianity etc. + * 97-9-13 Cosmetic changes + * 98-5-13 Attempt to make 64-bit-clean on 64-bit machines + * 99-1-11 Attempt to make 64-bit-clean on 32-bit machines + * 01-2-27 Fix to store proper blockcount for kernel (calculated using + * BLOCK_SIZE_BITS, not device blocksize) + * 01-3-11 Make nbd work with new Linux block layer code. It now supports + * plugging like all the other block devices. Also added in MSG_MORE to + * reduce number of partial TCP segments sent. + * 01-12-6 Fix deadlock condition by making queue locks independent of + * the transmit lock. + * 02-10-11 Allow hung xmit to be aborted via SIGKILL & various fixes. + * + * 03-06-22 Make nbd work with new linux 2.5 block layer design. This fixes + * memory corruption from module removal and possible memory corruption + * from sending/receiving disk data. + * 03-06-23 Cosmetic changes. + * 03-06-23 Enhance diagnostics support. + * 03-06-24 Remove unneeded blksize_bits field from nbd_device struct. + * + * 03-06-24 Cleanup PARANOIA usage & code. + * 04-02-19 Remove PARANOIA, plus various cleanups (Paul Clements) + * possible FIXME: make set_sock / set_blksize / set_size / do_it one syscall + * why not: would need access_ok and friends, would share yet another + * structure with userland */ #include @@ -29,6 +59,8 @@ #include #include +#include + #include #include #include @@ -50,9 +82,9 @@ #define DBG_RX 0x0200 #define DBG_TX 0x0400 static unsigned int debugflags; +static unsigned int nbds_max = 16; #endif /* NDEBUG */ -static unsigned int nbds_max = 16; static struct nbd_device nbd_dev[MAX_NBD]; /* @@ -300,15 +332,6 @@ static struct request *nbd_read_stat(struct nbd_device *lo) lo->disk->disk_name, result); goto harderror; } - - if (ntohl(reply.magic) != NBD_REPLY_MAGIC) { - printk(KERN_ERR "%s: Wrong magic (0x%lx)\n", - lo->disk->disk_name, - (unsigned long)ntohl(reply.magic)); - result = -EPROTO; - goto harderror; - } - req = nbd_find_request(lo, reply.handle); if (unlikely(IS_ERR(req))) { result = PTR_ERR(req); @@ -321,6 +344,13 @@ static struct request *nbd_read_stat(struct nbd_device *lo) goto harderror; } + if (ntohl(reply.magic) != NBD_REPLY_MAGIC) { + printk(KERN_ERR "%s: Wrong magic (0x%lx)\n", + lo->disk->disk_name, + (unsigned long)ntohl(reply.magic)); + result = -EPROTO; + goto harderror; + } if (ntohl(reply.error)) { printk(KERN_ERR "%s: Other side returned error (%d)\n", lo->disk->disk_name, ntohl(reply.error)); @@ -341,8 +371,7 @@ static struct request *nbd_read_stat(struct nbd_device *lo) printk(KERN_ERR "%s: Receive data failed (result %d)\n", lo->disk->disk_name, result); - req->errors++; - return req; + goto harderror; } dprintk(DBG_RX, "%s: request %p: got %d bytes data\n", lo->disk->disk_name, req, bvec->bv_len); @@ -643,6 +672,7 @@ static int __init nbd_init(void) printk(KERN_INFO "nbd: registered device at major %d\n", NBD_MAJOR); dprintk(DBG_INIT, "nbd: debugflags=0x%x\n", debugflags); + devfs_mk_dir("nbd"); for (i = 0; i < nbds_max; i++) { struct gendisk *disk = nbd_dev[i].disk; nbd_dev[i].file = NULL; @@ -660,6 +690,7 @@ static int __init nbd_init(void) disk->private_data = &nbd_dev[i]; disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; sprintf(disk->disk_name, "nbd%d", i); + sprintf(disk->devfs_name, "nbd/%d", i); set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */ add_disk(disk); } @@ -685,6 +716,7 @@ static void __exit nbd_cleanup(void) put_disk(disk); } } + devfs_remove("nbd"); unregister_blkdev(NBD_MAJOR, "nbd"); printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR); } diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c index 4b258f783..ce94aa11f 100644 --- a/drivers/block/paride/paride.c +++ b/drivers/block/paride/paride.c @@ -21,6 +21,7 @@ #define PI_VERSION "1.06" #include +#include #include #include #include diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 0969f1f64..2403721f9 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c @@ -713,7 +713,7 @@ static void do_pd_request(request_queue_t * q) static int pd_special_command(struct pd_unit *disk, enum action (*func)(struct pd_unit *disk)) { - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); struct request rq; int err = 0; diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 1a9dee19e..852b564e9 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -707,7 +707,7 @@ static int pf_detect(void) if (pi_init(pf->pi, 0, conf[D_PRT], conf[D_MOD], conf[D_UNI], conf[D_PRO], conf[D_DLY], pf_scratch, PI_PF, verbose, pf->name)) { - if (pf->disk && !pf_probe(pf)) { + if (!pf_probe(pf) && pf->disk) { pf->present = 1; k++; } else diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index 13f998aa1..79b868254 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c @@ -156,6 +156,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY}; #include #include #include +#include #include #include #include @@ -673,15 +674,25 @@ static int __init pg_init(void) err = PTR_ERR(pg_class); goto out_chrdev; } + devfs_mk_dir("pg"); for (unit = 0; unit < PG_UNITS; unit++) { struct pg *dev = &devices[unit]; - if (dev->present) + if (dev->present) { class_device_create(pg_class, NULL, MKDEV(major, unit), NULL, "pg%u", unit); + err = devfs_mk_cdev(MKDEV(major, unit), + S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", + unit); + if (err) + goto out_class; + } } err = 0; goto out; +out_class: + class_device_destroy(pg_class, MKDEV(major, unit)); + class_destroy(pg_class); out_chrdev: unregister_chrdev(major, "pg"); out: @@ -694,10 +705,13 @@ static void __exit pg_exit(void) for (unit = 0; unit < PG_UNITS; unit++) { struct pg *dev = &devices[unit]; - if (dev->present) + if (dev->present) { class_device_destroy(pg_class, MKDEV(major, unit)); + devfs_remove("pg/%u", unit); + } } class_destroy(pg_class); + devfs_remove("pg"); unregister_chrdev(major, name); for (unit = 0; unit < PG_UNITS; unit++) { diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 35fb26636..d2013d362 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c @@ -141,6 +141,7 @@ static int (*drives[4])[6] = {&drive0, &drive1, &drive2, &drive3}; #include #include #include +#include #include #include #include @@ -970,15 +971,32 @@ static int __init pt_init(void) goto out_chrdev; } + devfs_mk_dir("pt"); for (unit = 0; unit < PT_UNITS; unit++) if (pt[unit].present) { class_device_create(pt_class, NULL, MKDEV(major, unit), NULL, "pt%d", unit); + err = devfs_mk_cdev(MKDEV(major, unit), + S_IFCHR | S_IRUSR | S_IWUSR, + "pt/%d", unit); + if (err) { + class_device_destroy(pt_class, MKDEV(major, unit)); + goto out_class; + } class_device_create(pt_class, NULL, MKDEV(major, unit + 128), NULL, "pt%dn", unit); + err = devfs_mk_cdev(MKDEV(major, unit + 128), + S_IFCHR | S_IRUSR | S_IWUSR, + "pt/%dn", unit); + if (err) { + class_device_destroy(pt_class, MKDEV(major, unit + 128)); + goto out_class; + } } goto out; +out_class: + class_destroy(pt_class); out_chrdev: unregister_chrdev(major, "pt"); out: @@ -991,9 +1009,12 @@ static void __exit pt_exit(void) for (unit = 0; unit < PT_UNITS; unit++) if (pt[unit].present) { class_device_destroy(pt_class, MKDEV(major, unit)); + devfs_remove("pt/%d", unit); class_device_destroy(pt_class, MKDEV(major, unit + 128)); + devfs_remove("pt/%dn", unit); } class_destroy(pt_class); + devfs_remove("pt"); unregister_chrdev(major, name); for (unit = 0; unit < PT_UNITS; unit++) if (pt[unit].present) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index ed0f636af..a04f60693 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -44,6 +44,7 @@ *************************************************************************/ #include +#include #include #include #include @@ -348,7 +349,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * char sense[SCSI_SENSE_BUFFERSIZE]; request_queue_t *q; struct request *rq; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); int err = 0; q = bdev_get_queue(pd->bdev); @@ -2577,19 +2578,19 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm case PKT_CTRL_CMD_SETUP: if (!capable(CAP_SYS_ADMIN)) return -EPERM; - mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); + mutex_lock(&ctl_mutex); ret = pkt_setup_dev(&ctrl_cmd); mutex_unlock(&ctl_mutex); break; case PKT_CTRL_CMD_TEARDOWN: if (!capable(CAP_SYS_ADMIN)) return -EPERM; - mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); + mutex_lock(&ctl_mutex); ret = pkt_remove_dev(&ctrl_cmd); mutex_unlock(&ctl_mutex); break; case PKT_CTRL_CMD_STATUS: - mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); + mutex_lock(&ctl_mutex); pkt_get_status(&ctrl_cmd); mutex_unlock(&ctl_mutex); break; @@ -2611,6 +2612,7 @@ static struct file_operations pkt_ctl_fops = { static struct miscdevice pkt_misc = { .minor = MISC_DYNAMIC_MINOR, .name = "pktcdvd", + .devfs_name = "pktcdvd/control", .fops = &pkt_ctl_fops }; diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c index 5537974fb..bea75f2cb 100644 --- a/drivers/block/ps2esdi.c +++ b/drivers/block/ps2esdi.c @@ -29,6 +29,7 @@ #define DEVICE_NAME "PS/2 ESDI" +#include #include #include #include @@ -340,9 +341,9 @@ static int __init ps2esdi_geninit(void) /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can share with the SCSI driver */ if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, - IRQF_DISABLED | IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk) + SA_INTERRUPT | SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, - IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk) + SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) ) { printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ); error = -EBUSY; @@ -420,6 +421,7 @@ static int __init ps2esdi_geninit(void) disk->major = PS2ESDI_MAJOR; disk->first_minor = i<<6; sprintf(disk->disk_name, "ed%c", 'a'+i); + sprintf(disk->devfs_name, "ed/target%d", i); disk->fops = &ps2esdi_fops; ps2esdi_gendisk[i] = disk; } diff --git a/drivers/block/rd.c b/drivers/block/rd.c index a3f64bfe6..940bfd795 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c @@ -42,6 +42,7 @@ * and set blk_size for -ENOSPC, Werner Fink , Apr '99 */ +#include #include #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -84,7 +86,7 @@ int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */ * behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that * supposes the filesystem in the image uses a BLOCK_SIZE blocksize). */ -static int rd_blocksize = CONFIG_BLK_DEV_RAM_BLOCKSIZE; +static int rd_blocksize = BLOCK_SIZE; /* blocksize of the RAM disks */ /* * Copyright (C) 2000 Linus Torvalds. @@ -189,7 +191,7 @@ static int ramdisk_set_page_dirty(struct page *page) return 0; } -static const struct address_space_operations ramdisk_aops = { +static struct address_space_operations ramdisk_aops = { .readpage = ramdisk_readpage, .prepare_write = ramdisk_prepare_write, .commit_write = ramdisk_commit_write, @@ -410,6 +412,7 @@ static void __exit rd_cleanup(void) put_disk(rd_disks[i]); blk_cleanup_queue(rd_queue[i]); } + devfs_remove("rd"); unregister_blkdev(RAMDISK_MAJOR, "ramdisk"); } @@ -439,6 +442,8 @@ static int __init rd_init(void) goto out; } + devfs_mk_dir("rd"); + for (i = 0; i < CONFIG_BLK_DEV_RAM_COUNT; i++) { struct gendisk *disk = rd_disks[i]; @@ -456,6 +461,7 @@ static int __init rd_init(void) disk->queue = rd_queue[i]; disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; sprintf(disk->disk_name, "ram%d", i); + sprintf(disk->devfs_name, "rd/%d", i); set_capacity(disk, rd_size * 2); add_disk(rd_disks[i]); } diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index cc42e7623..01f042f6f 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c @@ -16,6 +16,7 @@ * handle GCR disks */ +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -250,6 +252,8 @@ static int floppy_open(struct inode *inode, struct file *filp); static int floppy_release(struct inode *inode, struct file *filp); static int floppy_check_change(struct gendisk *disk); static int floppy_revalidate(struct gendisk *disk); +static int swim3_add_device(struct device_node *swims); +int swim3_init(void); #ifndef CONFIG_PMAC_MEDIABAY #define check_media_bay(which, what) 1 @@ -1009,63 +1013,117 @@ static struct block_device_operations floppy_fops = { .revalidate_disk= floppy_revalidate, }; -static int swim3_add_device(struct macio_dev *mdev, int index) +int swim3_init(void) +{ + struct device_node *swim; + int err = -ENOMEM; + int i; + + devfs_mk_dir("floppy"); + + swim = find_devices("floppy"); + while (swim && (floppy_count < MAX_FLOPPIES)) + { + swim3_add_device(swim); + swim = swim->next; + } + + swim = find_devices("swim3"); + while (swim && (floppy_count < MAX_FLOPPIES)) + { + swim3_add_device(swim); + swim = swim->next; + } + + if (!floppy_count) + return -ENODEV; + + for (i = 0; i < floppy_count; i++) { + disks[i] = alloc_disk(1); + if (!disks[i]) + goto out; + } + + if (register_blkdev(FLOPPY_MAJOR, "fd")) { + err = -EBUSY; + goto out; + } + + swim3_queue = blk_init_queue(do_fd_request, &swim3_lock); + if (!swim3_queue) { + err = -ENOMEM; + goto out_queue; + } + + for (i = 0; i < floppy_count; i++) { + struct gendisk *disk = disks[i]; + disk->major = FLOPPY_MAJOR; + disk->first_minor = i; + disk->fops = &floppy_fops; + disk->private_data = &floppy_states[i]; + disk->queue = swim3_queue; + disk->flags |= GENHD_FL_REMOVABLE; + sprintf(disk->disk_name, "fd%d", i); + sprintf(disk->devfs_name, "floppy/%d", i); + set_capacity(disk, 2880); + add_disk(disk); + } + return 0; + +out_queue: + unregister_blkdev(FLOPPY_MAJOR, "fd"); +out: + while (i--) + put_disk(disks[i]); + /* shouldn't we do something with results of swim_add_device()? */ + return err; +} + +static int swim3_add_device(struct device_node *swim) { - struct device_node *swim = mdev->ofdev.node; struct device_node *mediabay; - struct floppy_state *fs = &floppy_states[index]; - int rc = -EBUSY; + struct floppy_state *fs = &floppy_states[floppy_count]; + struct resource res_reg, res_dma; - /* Check & Request resources */ - if (macio_resource_count(mdev) < 2) { - printk(KERN_WARNING "ifd%d: no address for %s\n", - index, swim->full_name); - return -ENXIO; + if (of_address_to_resource(swim, 0, &res_reg) || + of_address_to_resource(swim, 1, &res_dma)) { + printk(KERN_ERR "swim3: Can't get addresses\n"); + return -EINVAL; } - if (macio_irq_count(mdev) < 2) { - printk(KERN_WARNING "fd%d: no intrs for device %s\n", - index, swim->full_name); + if (request_mem_region(res_reg.start, res_reg.end - res_reg.start + 1, + " (reg)") == NULL) { + printk(KERN_ERR "swim3: Can't request register space\n"); + return -EINVAL; } - if (macio_request_resource(mdev, 0, "swim3 (mmio)")) { - printk(KERN_ERR "fd%d: can't request mmio resource for %s\n", - index, swim->full_name); - return -EBUSY; + if (request_mem_region(res_dma.start, res_dma.end - res_dma.start + 1, + " (dma)") == NULL) { + release_mem_region(res_reg.start, + res_reg.end - res_reg.start + 1); + printk(KERN_ERR "swim3: Can't request DMA space\n"); + return -EINVAL; } - if (macio_request_resource(mdev, 1, "swim3 (dma)")) { - printk(KERN_ERR "fd%d: can't request dma resource for %s\n", - index, swim->full_name); - macio_release_resource(mdev, 0); - return -EBUSY; + + if (swim->n_intrs < 2) { + printk(KERN_INFO "swim3: expecting 2 intrs (n_intrs:%d)\n", + swim->n_intrs); + release_mem_region(res_reg.start, + res_reg.end - res_reg.start + 1); + release_mem_region(res_dma.start, + res_dma.end - res_dma.start + 1); + return -EINVAL; } - dev_set_drvdata(&mdev->ofdev.dev, fs); - mediabay = (strcasecmp(swim->parent->type, "media-bay") == 0) ? - swim->parent : NULL; + mediabay = (strcasecmp(swim->parent->type, "media-bay") == 0) ? swim->parent : NULL; if (mediabay == NULL) pmac_call_feature(PMAC_FTR_SWIM3_ENABLE, swim, 0, 1); memset(fs, 0, sizeof(*fs)); spin_lock_init(&fs->lock); fs->state = idle; - fs->swim3 = (struct swim3 __iomem *) - ioremap(macio_resource_start(mdev, 0), 0x200); - if (fs->swim3 == NULL) { - printk("fd%d: couldn't map registers for %s\n", - index, swim->full_name); - rc = -ENOMEM; - goto out_release; - } - fs->dma = (struct dbdma_regs __iomem *) - ioremap(macio_resource_start(mdev, 1), 0x200); - if (fs->dma == NULL) { - printk("fd%d: couldn't map DMA for %s\n", - index, swim->full_name); - iounmap(fs->swim3); - rc = -ENOMEM; - goto out_release; - } - fs->swim3_intr = macio_irq(mdev, 0); - fs->dma_intr = macio_irq(mdev, 1);; + fs->swim3 = (struct swim3 __iomem *)ioremap(res_reg.start, 0x200); + fs->dma = (struct dbdma_regs __iomem *)ioremap(res_dma.start, 0x200); + fs->swim3_intr = swim->intrs[0].line; + fs->dma_intr = swim->intrs[1].line; fs->cur_cyl = -1; fs->cur_sector = -1; fs->secpercyl = 36; @@ -1079,16 +1137,15 @@ static int swim3_add_device(struct macio_dev *mdev, int index) st_le16(&fs->dma_cmd[1].command, DBDMA_STOP); if (request_irq(fs->swim3_intr, swim3_interrupt, 0, "SWIM3", fs)) { - printk(KERN_ERR "fd%d: couldn't request irq %d for %s\n", - index, fs->swim3_intr, swim->full_name); + printk(KERN_ERR "Couldn't get irq %d for SWIM3\n", fs->swim3_intr); pmac_call_feature(PMAC_FTR_SWIM3_ENABLE, swim, 0, 0); - goto out_unmap; return -EBUSY; } /* if (request_irq(fs->dma_intr, fd_dma_interrupt, 0, "SWIM3-dma", fs)) { printk(KERN_ERR "Couldn't get irq %d for SWIM3 DMA", fs->dma_intr); + pmac_call_feature(PMAC_FTR_SWIM3_ENABLE, swim, 0, 0); return -EBUSY; } */ @@ -1098,90 +1155,8 @@ static int swim3_add_device(struct macio_dev *mdev, int index) printk(KERN_INFO "fd%d: SWIM3 floppy controller %s\n", floppy_count, mediabay ? "in media bay" : ""); - return 0; - - out_unmap: - iounmap(fs->dma); - iounmap(fs->swim3); - - out_release: - macio_release_resource(mdev, 0); - macio_release_resource(mdev, 1); - - return rc; -} - -static int __devinit swim3_attach(struct macio_dev *mdev, const struct of_device_id *match) -{ - int i, rc; - struct gendisk *disk; - - /* Add the drive */ - rc = swim3_add_device(mdev, floppy_count); - if (rc) - return rc; - - /* Now create the queue if not there yet */ - if (swim3_queue == NULL) { - /* If we failed, there isn't much we can do as the driver is still - * too dumb to remove the device, just bail out - */ - if (register_blkdev(FLOPPY_MAJOR, "fd")) - return 0; - swim3_queue = blk_init_queue(do_fd_request, &swim3_lock); - if (swim3_queue == NULL) { - unregister_blkdev(FLOPPY_MAJOR, "fd"); - return 0; - } - } - - /* Now register that disk. Same comment about failure handling */ - i = floppy_count++; - disk = disks[i] = alloc_disk(1); - if (disk == NULL) - return 0; - - disk->major = FLOPPY_MAJOR; - disk->first_minor = i; - disk->fops = &floppy_fops; - disk->private_data = &floppy_states[i]; - disk->queue = swim3_queue; - disk->flags |= GENHD_FL_REMOVABLE; - sprintf(disk->disk_name, "fd%d", i); - set_capacity(disk, 2880); - add_disk(disk); - - return 0; -} - -static struct of_device_id swim3_match[] = -{ - { - .name = "swim3", - }, - { - .compatible = "ohare-swim3" - }, - { - .compatible = "swim3" - }, -}; - -static struct macio_driver swim3_driver = -{ - .name = "swim3", - .match_table = swim3_match, - .probe = swim3_attach, -#if 0 - .suspend = swim3_suspend, - .resume = swim3_resume, -#endif -}; - - -int swim3_init(void) -{ - macio_register_driver(&swim3_driver); + floppy_count++; + return 0; } diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index c6beee18a..2ae08b343 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1509,6 +1510,7 @@ static int carm_init_disks(struct carm_host *host) port->disk = disk; sprintf(disk->disk_name, DRV_NAME "/%u", (unsigned int) (host->id * CARM_MAX_PORTS) + i); + sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i); disk->major = host->major; disk->first_minor = i * CARM_MINORS_PER_MAJOR; disk->fops = &carm_bd_ops; @@ -1670,13 +1672,15 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if (host->flags & FL_DYN_MAJOR) host->major = rc; + devfs_mk_dir(DRV_NAME); + rc = carm_init_disks(host); if (rc) goto err_out_blkdev_disks; pci_set_master(pdev); - rc = request_irq(pdev->irq, carm_interrupt, IRQF_SHARED, DRV_NAME, host); + rc = request_irq(pdev->irq, carm_interrupt, SA_SHIRQ, DRV_NAME, host); if (rc) { printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n", pci_name(pdev)); @@ -1690,10 +1694,9 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) DPRINTK("waiting for probe_comp\n"); wait_for_completion(&host->probe_comp); - printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n", + printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n", host->name, pci_name(pdev), (int) CARM_MAX_PORTS, - (unsigned long long)pci_resource_start(pdev, 0), - pdev->irq, host->major); + pci_resource_start(pdev, 0), pdev->irq, host->major); carm_host_id++; pci_set_drvdata(pdev, host); @@ -1735,6 +1738,7 @@ static void carm_remove_one (struct pci_dev *pdev) free_irq(pdev->irq, host); carm_free_disks(host); + devfs_remove(DRV_NAME); unregister_blkdev(host->major, host->name); if (host->major == 160) clear_bit(0, &carm_major_alloc); diff --git a/drivers/block/ub.c b/drivers/block/ub.c index d62b49fbf..c688c2599 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c @@ -10,13 +10,17 @@ * TODO (sorted by decreasing priority) * -- set readonly flag for CDs, set removable flag for CF readers * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch) + * -- special case some senses, e.g. 3a/0 -> no media present, reduce retries * -- verify the 13 conditions and do bulk resets + * -- kill last_pipe and simply do two-state clearing on both pipes * -- highmem * -- move top_sense and work_bcs into separate allocations (if they survive) * for cache purists and esoteric architectures. * -- Allocate structure for LUN 0 before the first ub_sync_tur, avoid NULL. ? * -- prune comments, they are too volumnous + * -- Exterminate P3 printks * -- Resove XXX's + * -- Redo "benh's retries", perhaps have spin-up code to handle them. V:D=? * -- CLEAR, CLR2STS, CLRRS seem to be ripe for refactoring. */ #include @@ -24,10 +28,12 @@ #include #include #include +#include #include #include #define DRV_NAME "ub" +#define DEVFS_NAME DRV_NAME #define UB_MAJOR 180 @@ -174,6 +180,7 @@ struct ub_dev; #define UB_DIR_ILLEGAL2 2 #define UB_DIR_WRITE 3 +/* P3 */ #define UB_DIR_CHAR(c) (((c)==UB_DIR_WRITE)? 'w': \ (((c)==UB_DIR_READ)? 'r': 'n')) @@ -662,9 +669,8 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) */ n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]); if (n_elem < 0) { - /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */ printk(KERN_INFO "%s: failed request map (%d)\n", - lun->name, n_elem); + lun->name, n_elem); /* P3 */ goto drop; } if (n_elem > UB_MAX_REQ_SG) { /* Paranoia */ @@ -818,9 +824,7 @@ static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, if (urq->current_try >= 3) return -EIO; urq->current_try++; - - /* Remove this if anyone complains of flooding. */ - printk(KERN_DEBUG "%s: dir %c len/act %d/%d " + /* P3 */ printk("%s: dir %c len/act %d/%d " "[sense %x %02x %02x] retry %d\n", sc->name, UB_DIR_CHAR(cmd->dir), cmd->len, cmd->act_len, cmd->key, cmd->asc, cmd->ascq, urq->current_try); @@ -1237,6 +1241,8 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd) * to check. But it's not all right if the device * counts disagree with our counts. */ + /* P3 */ printk("%s: resid %d len %d act %d\n", + sc->name, len, cmd->len, cmd->act_len); goto Bad_End; } @@ -1247,6 +1253,7 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd) ub_state_sense(sc, cmd); return; case US_BULK_STAT_PHASE: + /* P3 */ printk("%s: status PHASE\n", sc->name); goto Bad_End; default: printk(KERN_INFO "%s: unknown CSW status 0x%x\n", @@ -1561,14 +1568,16 @@ static void ub_reset_task(void *arg) } if (atomic_read(&sc->poison)) { - ; + printk(KERN_NOTICE "%s: Not resetting disconnected device\n", + sc->name); /* P3 This floods. Remove soon. XXX */ } else if ((sc->reset & 1) == 0) { ub_sync_reset(sc); msleep(700); /* usb-storage sleeps 6s (!) */ ub_probe_clear_stall(sc, sc->recv_bulk_pipe); ub_probe_clear_stall(sc, sc->send_bulk_pipe); } else if (sc->dev->actconfig->desc.bNumInterfaces != 1) { - ; + printk(KERN_NOTICE "%s: Not resetting multi-interface device\n", + sc->name); /* P3 This floods. Remove soon. XXX */ } else { if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) { printk(KERN_NOTICE @@ -1642,11 +1651,15 @@ static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) static int ub_bd_open(struct inode *inode, struct file *filp) { struct gendisk *disk = inode->i_bdev->bd_disk; - struct ub_lun *lun = disk->private_data; - struct ub_dev *sc = lun->udev; + struct ub_lun *lun; + struct ub_dev *sc; unsigned long flags; int rc; + if ((lun = disk->private_data) == NULL) + return -ENXIO; + sc = lun->udev; + spin_lock_irqsave(&ub_lock, flags); if (atomic_read(&sc->poison)) { spin_unlock_irqrestore(&ub_lock, flags); @@ -1810,8 +1823,10 @@ static int ub_sync_tur(struct ub_dev *sc, struct ub_lun *lun) rc = ub_submit_scsi(sc, cmd); spin_unlock_irqrestore(sc->lock, flags); - if (rc != 0) + if (rc != 0) { + printk("ub: testing ready: submit error (%d)\n", rc); /* P3 */ goto err_submit; + } wait_for_completion(&compl); @@ -1869,16 +1884,20 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun, rc = ub_submit_scsi(sc, cmd); spin_unlock_irqrestore(sc->lock, flags); - if (rc != 0) + if (rc != 0) { + printk("ub: reading capacity: submit error (%d)\n", rc); /* P3 */ goto err_submit; + } wait_for_completion(&compl); if (cmd->error != 0) { + printk("ub: reading capacity: error %d\n", cmd->error); /* P3 */ rc = -EIO; goto err_read; } if (cmd->act_len != 8) { + printk("ub: reading capacity: size %d\n", cmd->act_len); /* P3 */ rc = -EIO; goto err_read; } @@ -1892,6 +1911,7 @@ static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun, case 2048: shift = 2; break; case 4096: shift = 3; break; default: + printk("ub: Bad sector size %u\n", bsize); /* P3 */ rc = -EDOM; goto err_inv_bsize; } @@ -2003,8 +2023,17 @@ static int ub_sync_getmaxlun(struct ub_dev *sc) sc->work_urb.error_count = 0; sc->work_urb.status = 0; - if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) + if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) { + if (rc == -EPIPE) { + printk("%s: Stall submitting GetMaxLUN, using 1 LUN\n", + sc->name); /* P3 */ + } else { + printk(KERN_NOTICE + "%s: Unable to submit GetMaxLUN (%d)\n", + sc->name, rc); + } goto err_submit; + } init_timer(&timer); timer.function = ub_probe_timeout; @@ -2017,10 +2046,21 @@ static int ub_sync_getmaxlun(struct ub_dev *sc) del_timer_sync(&timer); usb_kill_urb(&sc->work_urb); - if ((rc = sc->work_urb.status) < 0) + if ((rc = sc->work_urb.status) < 0) { + if (rc == -EPIPE) { + printk("%s: Stall at GetMaxLUN, using 1 LUN\n", + sc->name); /* P3 */ + } else { + printk(KERN_NOTICE + "%s: Error at GetMaxLUN (%d)\n", + sc->name, rc); + } goto err_io; + } if (sc->work_urb.actual_length != 1) { + printk("%s: GetMaxLUN returned %d bytes\n", sc->name, + sc->work_urb.actual_length); /* P3 */ nluns = 0; } else { if ((nluns = *p) == 55) { @@ -2031,6 +2071,8 @@ static int ub_sync_getmaxlun(struct ub_dev *sc) if (nluns > UB_MAX_LUNS) nluns = UB_MAX_LUNS; } + printk("%s: GetMaxLUN returned %d, using %d LUNs\n", sc->name, + *p, nluns); /* P3 */ } kfree(p); @@ -2228,7 +2270,7 @@ static int ub_probe(struct usb_interface *intf, * has to succeed, so we clear checks with an additional one here. * In any case it's not our business how revaliadation is implemented. */ - for (i = 0; i < 3; i++) { /* Retries for the schwag key from KS'04 */ + for (i = 0; i < 3; i++) { /* Retries for benh's key */ if ((rc = ub_sync_tur(sc, NULL)) <= 0) break; if (rc != 0x6) break; msleep(10); @@ -2276,6 +2318,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum) goto err_id; lun->udev = sc; + list_add(&lun->link, &sc->luns); snprintf(lun->name, 16, DRV_NAME "%c(%d.%d.%d)", lun->id + 'a', sc->dev->bus->busnum, sc->dev->devnum, lun->num); @@ -2288,7 +2331,9 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum) if ((disk = alloc_disk(UB_PARTS_PER_LUN)) == NULL) goto err_diskalloc; + lun->disk = disk; sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a'); + sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a'); disk->major = UB_MAJOR; disk->first_minor = lun->id * UB_PARTS_PER_LUN; disk->fops = &ub_bd_fops; @@ -2308,9 +2353,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum) blk_queue_max_sectors(q, UB_MAX_SECTORS); blk_queue_hardsect_size(q, lun->capacity.bsize); - lun->disk = disk; q->queuedata = lun; - list_add(&lun->link, &sc->luns); set_capacity(disk, lun->capacity.nsec); if (lun->removable) @@ -2323,6 +2366,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum) err_blkqinit: put_disk(disk); err_diskalloc: + list_del(&lun->link); ub_id_put(lun->id); err_id: kfree(lun); @@ -2335,6 +2379,7 @@ static void ub_disconnect(struct usb_interface *intf) struct ub_dev *sc = usb_get_intfdata(intf); struct list_head *p; struct ub_lun *lun; + struct gendisk *disk; unsigned long flags; /* @@ -2390,7 +2435,9 @@ static void ub_disconnect(struct usb_interface *intf) */ list_for_each (p, &sc->luns) { lun = list_entry(p, struct ub_lun, link); - del_gendisk(lun->disk); + disk = lun->disk; + if (disk->flags & GENHD_FL_UP) + del_gendisk(disk); /* * I wish I could do: * set_bit(QUEUE_FLAG_DEAD, &q->queue_flags); @@ -2442,6 +2489,7 @@ static int __init ub_init(void) if ((rc = register_blkdev(UB_MAJOR, DRV_NAME)) != 0) goto err_regblkdev; + devfs_mk_dir(DEVFS_NAME); if ((rc = usb_register(&ub_driver)) != 0) goto err_register; @@ -2450,6 +2498,7 @@ static int __init ub_init(void) return 0; err_register: + devfs_remove(DEVFS_NAME); unregister_blkdev(UB_MAJOR, DRV_NAME); err_regblkdev: return rc; @@ -2459,6 +2508,7 @@ static void __exit ub_exit(void) { usb_deregister(&ub_driver); + devfs_remove(DEVFS_NAME); unregister_blkdev(UB_MAJOR, DRV_NAME); usb_usual_clear_present(USB_US_TYPE_UB); } diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 5d8925bd9..f7d4c65a7 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -35,6 +35,7 @@ */ //#define DEBUG /* uncomment if you want debugging info (pr_debug) */ +#include #include #include #include @@ -1040,7 +1041,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i card->win_size = data; - if (request_irq(dev->irq, mm_interrupt, IRQF_SHARED, "pci-umem", card)) { + if (request_irq(dev->irq, mm_interrupt, SA_SHIRQ, "pci-umem", card)) { printk(KERN_ERR "MM%d: Unable to allocate IRQ\n", card->card_number); ret = -ENODEV; @@ -1191,6 +1192,7 @@ static int __init mm_init(void) for (i = 0; i < num_cards; i++) { struct gendisk *disk = mm_gendisk[i]; sprintf(disk->disk_name, "umem%c", 'a'+i); + sprintf(disk->devfs_name, "umem/card%d", i); spin_lock_init(&cards[i].lock); disk->major = major_nr; disk->first_minor = i << MM_SHIFT; diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index ec5a1b90a..f63e07bd9 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c @@ -59,6 +59,7 @@ MODULE_LICENSE("GPL"); * numbers 0-255 we get a maximum of 32 disks. */ #define VIOD_GENHD_NAME "iseries/vd" +#define VIOD_GENHD_DEVFS_NAME "iseries/disc" #define VIOD_VERS "1.64" @@ -522,6 +523,8 @@ retry: else snprintf(g->disk_name, sizeof(g->disk_name), VIOD_GENHD_NAME "%c", 'a' + (dev_no % 26)); + snprintf(g->devfs_name, sizeof(g->devfs_name), + "%s%d", VIOD_GENHD_DEVFS_NAME, dev_no); g->fops = &viodasd_fops; g->queue = q; g->private_data = d; @@ -744,7 +747,7 @@ static int viodasd_remove(struct vio_dev *vdev) * support. */ static struct vio_device_id viodasd_device_table[] __devinitdata = { - { "block", "IBM,iSeries-viodasd" }, + { "viodasd", "" }, { "", "" } }; MODULE_DEVICE_TABLE(vio, viodasd_device_table); diff --git a/drivers/block/vroot.c b/drivers/block/vroot.c index 4587cbf9a..9ef8302c9 100644 --- a/drivers/block/vroot.c +++ b/drivers/block/vroot.c @@ -12,7 +12,6 @@ * */ -#include #include #include #include @@ -21,6 +20,7 @@ #include #include +#include static int max_vroot = 8; @@ -60,9 +60,9 @@ static int vroot_set_dev( } else goto out_fput; - printk(KERN_INFO "vroot[%d]_set_dev: dev=%p[%d,%d]\n", - vr->vr_number, real_bdev, - imajor(real_bdev->bd_inode), iminor(real_bdev->bd_inode)); + vxdprintk(VXD_CBIT(misc, 0), + "vroot[%d]_set_dev: dev=" VXF_DEV, + vr->vr_number, VXD_DEV(real_bdev)); vr->vr_state = Vr_bound; error = 0; @@ -87,9 +87,9 @@ static int vroot_clr_dev( real_bdev = vr->vr_device; - printk(KERN_INFO "vroot[%d]_clr_dev: dev=%p[%d,%d]\n", - vr->vr_number, real_bdev, - imajor(real_bdev->bd_inode), iminor(real_bdev->bd_inode)); + vxdprintk(VXD_CBIT(misc, 0), + "vroot[%d]_clr_dev: dev=" VXF_DEV, + vr->vr_number, VXD_DEV(real_bdev)); bdput(real_bdev); vr->vr_state = Vr_unbound; @@ -147,7 +147,7 @@ static struct block_device_operations vr_fops = { .ioctl = vr_ioctl, }; -struct block_device *vroot_get_real_bdev(struct block_device *bdev) +struct block_device *__vroot_get_real_bdev(struct block_device *bdev) { struct inode *inode = bdev->bd_inode; struct vroot_device *vr; @@ -157,9 +157,9 @@ struct block_device *vroot_get_real_bdev(struct block_device *bdev) vr = &vroot_dev[minor]; real_bdev = vr->vr_device; - printk(KERN_INFO "vroot[%d]_get_real_bdev: dev=%p[%p,%d,%d]\n", - vr->vr_number, real_bdev, real_bdev->bd_inode, - imajor(real_bdev->bd_inode), iminor(real_bdev->bd_inode)); + vxdprintk(VXD_CBIT(misc, 0), + "vroot[%d]_get_real_bdev: dev=" VXF_DEV, + vr->vr_number, VXD_DEV(real_bdev)); if (vr->vr_state != Vr_bound) return ERR_PTR(-ENXIO); @@ -184,7 +184,7 @@ MODULE_DESCRIPTION ("Virtual Root Device Mapper"); int __init vroot_init(void) { - int i; + int err, i; if (max_vroot < 1 || max_vroot > 256) { max_vroot = MAX_VROOT_DEFAULT; @@ -196,6 +196,7 @@ int __init vroot_init(void) if (register_blkdev(VROOT_MAJOR, "vroot")) return -EIO; + err = -ENOMEM; vroot_dev = kmalloc(max_vroot * sizeof(struct vroot_device), GFP_KERNEL); if (!vroot_dev) goto out_mem1; @@ -228,11 +229,17 @@ int __init vroot_init(void) disk->private_data = vr; } + err = register_vroot_grb(&__vroot_get_real_bdev); + if (err) + goto out_reg; + for (i = 0; i < max_vroot; i++) add_disk(disks[i]); printk(KERN_INFO "vroot: loaded (max %d devices)\n", max_vroot); return 0; +out_reg: + devfs_remove("vroot"); out_mem3: while (i--) put_disk(disks[i]); @@ -242,13 +249,16 @@ out_mem2: out_mem1: unregister_blkdev(VROOT_MAJOR, "vroot"); printk(KERN_ERR "vroot: ran out of memory\n"); - return -ENOMEM; + return err; } void vroot_exit(void) { int i; + if (unregister_vroot_grb(&__vroot_get_real_bdev)) + printk(KERN_WARNING "vroot: cannot unregister grb\n"); + for (i = 0; i < max_vroot; i++) { del_gendisk(disks[i]); put_disk(disks[i]); @@ -264,3 +274,15 @@ void vroot_exit(void) module_init(vroot_init); module_exit(vroot_exit); +#ifndef MODULE + +static int __init max_vroot_setup(char *str) +{ + max_vroot = simple_strtol(str, NULL, 0); + return 1; +} + +__setup("max_vroot=", max_vroot_setup); + +#endif + diff --git a/drivers/block/xd.c b/drivers/block/xd.c index e828e4cbd..cbce7c5e9 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c @@ -215,6 +215,7 @@ static int __init xd_init(void) disk->major = XT_DISK_MAJOR; disk->first_minor = i<<6; sprintf(disk->disk_name, "xd%c", i+'a'); + sprintf(disk->devfs_name, "xd/target%d", i); disk->fops = &xd_fops; disk->private_data = p; disk->queue = xd_queue; diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 82ddbdd7b..bb5e8d665 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c @@ -354,6 +354,7 @@ z2_init(void) z2ram_gendisk->first_minor = 0; z2ram_gendisk->fops = &z2_fops; sprintf(z2ram_gendisk->disk_name, "z2ram"); + strcpy(z2ram_gendisk->devfs_name, z2ram_gendisk->disk_name); z2ram_gendisk->queue = z2_queue; add_disk(z2ram_gendisk); diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c index 13ba729cd..3e7a067cc 100644 --- a/drivers/bluetooth/bcm203x.c +++ b/drivers/bluetooth/bcm203x.c @@ -22,6 +22,7 @@ * */ +#include #include #include @@ -234,7 +235,6 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id data->fw_data = kmalloc(firmware->size, GFP_KERNEL); if (!data->fw_data) { BT_ERR("Can't allocate memory for firmware image"); - release_firmware(firmware); usb_free_urb(data->urb); kfree(data->buffer); kfree(data); diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index 23f96213f..8947c8837 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c @@ -21,6 +21,7 @@ * */ +#include #include #include diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 8eebf9ca3..473a13b22 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c @@ -20,6 +20,7 @@ * */ +#include #include #include @@ -739,7 +740,6 @@ static int bluecard_open(bluecard_info_t *info) hdev->type = HCI_PCCARD; hdev->driver_data = info; - SET_HCIDEV_DEV(hdev, &info->p_dev->dev); hdev->open = bluecard_hci_open; hdev->close = bluecard_hci_close; diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index e0231dc2c..9446960ac 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c @@ -21,6 +21,7 @@ * */ +#include #include #include diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index df7bb016d..b94ac2f9f 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c @@ -21,6 +21,7 @@ * */ +#include #include #include @@ -582,7 +583,6 @@ static int bt3c_open(bt3c_info_t *info) hdev->type = HCI_PCCARD; hdev->driver_data = info; - SET_HCIDEV_DEV(hdev, &info->p_dev->dev); hdev->open = bt3c_hci_open; hdev->close = bt3c_hci_close; diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 746ccca97..9ce4c9346 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c @@ -20,6 +20,7 @@ * */ +#include #include #include @@ -502,7 +503,6 @@ static int btuart_open(btuart_info_t *info) hdev->type = HCI_PCCARD; hdev->driver_data = info; - SET_HCIDEV_DEV(hdev, &info->p_dev->dev); hdev->open = btuart_hci_open; hdev->close = btuart_hci_close; diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 0e99def8a..a71a24061 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c @@ -20,6 +20,7 @@ * */ +#include #include #include @@ -422,9 +423,6 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) nsh.len = skb->len; s = bt_skb_alloc(NSHL + skb->len + 1, GFP_ATOMIC); - if (!s) - return -ENOMEM; - skb_reserve(s, NSHL); memcpy(skb_put(s, skb->len), skb->data, skb->len); if (skb->len & 0x0001) @@ -484,7 +482,6 @@ static int dtl1_open(dtl1_info_t *info) hdev->type = HCI_PCCARD; hdev->driver_data = info; - SET_HCIDEV_DEV(hdev, &info->p_dev->dev); hdev->open = dtl1_hci_open; hdev->close = dtl1_hci_close; diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c index d0cface53..7bd4ef904 100644 --- a/drivers/bluetooth/hci_bcsp.c +++ b/drivers/bluetooth/hci_bcsp.c @@ -22,6 +22,7 @@ * */ +#include #include #include diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index ad62abbbb..4804d474d 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c @@ -23,6 +23,7 @@ * */ +#include #include #include diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 93ba25b7e..613673b12 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -23,6 +23,7 @@ * */ +#include #include #include @@ -191,7 +192,7 @@ static int hci_uart_flush(struct hci_dev *hdev) /* Flush any pending characters in the driver and discipline. */ tty_ldisc_flush(tty); - if (tty->driver && tty->driver->flush_buffer) + if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); if (test_bit(HCI_UART_PROTO_SET, &hu->flags)) @@ -290,7 +291,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); - if (tty->driver && tty->driver->flush_buffer) + if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); return 0; diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index e2d4beac7..92382e823 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c @@ -31,6 +31,7 @@ * */ +#include #include #include @@ -67,8 +68,6 @@ static int ignore = 0; static int ignore_dga = 0; static int ignore_csr = 0; static int ignore_sniffer = 0; -static int disable_scofix = 0; -static int force_scofix = 0; static int reset = 0; #ifdef CONFIG_BT_HCIUSB_SCO @@ -109,12 +108,9 @@ static struct usb_device_id blacklist_ids[] = { { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, /* Broadcom BCM2035 */ - { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, + { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_BROKEN_ISOC }, { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, - /* IBM/Lenovo ThinkPad with Broadcom chip */ - { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, - /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, @@ -124,13 +120,8 @@ static struct usb_device_id blacklist_ids[] = { /* ISSC Bluetooth Adapter v3.1 */ { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, - /* RTX Telecom based adapters with buggy SCO support */ + /* RTX Telecom based adapter with buggy SCO support */ { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, - { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC }, - - /* Belkin F8T012 and F8T013 devices */ - { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_WRONG_SCO_MTU }, - { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_WRONG_SCO_MTU }, /* Digianswer devices */ { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER }, @@ -139,9 +130,6 @@ static struct usb_device_id blacklist_ids[] = { /* CSR BlueCore Bluetooth Sniffer */ { USB_DEVICE(0x0a12, 0x0002), .driver_info = HCI_SNIFFER }, - /* Frontline ComProbe Bluetooth Sniffer */ - { USB_DEVICE(0x16d3, 0x0002), .driver_info = HCI_SNIFFER }, - { } /* Terminating entry */ }; @@ -997,11 +985,6 @@ static int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id if (reset || id->driver_info & HCI_RESET) set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); - if (force_scofix || id->driver_info & HCI_WRONG_SCO_MTU) { - if (!disable_scofix) - set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); - } - if (id->driver_info & HCI_SNIFFER) { if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); @@ -1060,81 +1043,10 @@ static void hci_usb_disconnect(struct usb_interface *intf) hci_free_dev(hdev); } -static int hci_usb_suspend(struct usb_interface *intf, pm_message_t message) -{ - struct hci_usb *husb = usb_get_intfdata(intf); - struct list_head killed; - unsigned long flags; - int i; - - if (!husb || intf == husb->isoc_iface) - return 0; - - hci_suspend_dev(husb->hdev); - - INIT_LIST_HEAD(&killed); - - for (i = 0; i < 4; i++) { - struct _urb_queue *q = &husb->pending_q[i]; - struct _urb *_urb, *_tmp; - - while ((_urb = _urb_dequeue(q))) { - /* reset queue since _urb_dequeue sets it to NULL */ - _urb->queue = q; - usb_kill_urb(&_urb->urb); - list_add(&_urb->list, &killed); - } - - spin_lock_irqsave(&q->lock, flags); - - list_for_each_entry_safe(_urb, _tmp, &killed, list) { - list_move_tail(&_urb->list, &q->head); - } - - spin_unlock_irqrestore(&q->lock, flags); - } - - return 0; -} - -static int hci_usb_resume(struct usb_interface *intf) -{ - struct hci_usb *husb = usb_get_intfdata(intf); - unsigned long flags; - int i, err = 0; - - if (!husb || intf == husb->isoc_iface) - return 0; - - for (i = 0; i < 4; i++) { - struct _urb_queue *q = &husb->pending_q[i]; - struct _urb *_urb; - - spin_lock_irqsave(&q->lock, flags); - - list_for_each_entry(_urb, &q->head, list) { - err = usb_submit_urb(&_urb->urb, GFP_ATOMIC); - if (err) - break; - } - - spin_unlock_irqrestore(&q->lock, flags); - - if (err) - return -EIO; - } - - hci_resume_dev(husb->hdev); - - return 0; -} - static struct usb_driver hci_usb_driver = { .name = "hci_usb", .probe = hci_usb_probe, .disconnect = hci_usb_disconnect, - .suspend = hci_usb_suspend, - .resume = hci_usb_resume, .id_table = bluetooth_ids, }; @@ -1170,12 +1082,6 @@ MODULE_PARM_DESC(ignore_csr, "Ignore devices with id 0a12:0001"); module_param(ignore_sniffer, bool, 0644); MODULE_PARM_DESC(ignore_sniffer, "Ignore devices with id 0a12:0002"); -module_param(disable_scofix, bool, 0644); -MODULE_PARM_DESC(disable_scofix, "Disable fixup of wrong SCO buffer size"); - -module_param(force_scofix, bool, 0644); -MODULE_PARM_DESC(force_scofix, "Force fixup of wrong SCO buffers size"); - module_param(reset, bool, 0644); MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); diff --git a/drivers/bluetooth/hci_usb.h b/drivers/bluetooth/hci_usb.h index 963fc55cd..37100a6ea 100644 --- a/drivers/bluetooth/hci_usb.h +++ b/drivers/bluetooth/hci_usb.h @@ -35,7 +35,6 @@ #define HCI_SNIFFER 0x10 #define HCI_BCM92035 0x20 #define HCI_BROKEN_ISOC 0x40 -#define HCI_WRONG_SCO_MTU 0x80 #define HCI_MAX_IFACE_NUM 3 diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index aac67a3a6..85738223f 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -23,6 +23,7 @@ * */ +#include #include #include @@ -277,6 +278,7 @@ static int vhci_open(struct inode *inode, struct file *file) hdev->type = HCI_VHCI; hdev->driver_data = vhci; + SET_HCIDEV_DEV(hdev, vhci_miscdev.dev); hdev->open = vhci_open_dev; hdev->close = vhci_close_dev; diff --git a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c index ec469497c..ec004897b 100644 --- a/drivers/cdrom/aztcd.c +++ b/drivers/cdrom/aztcd.c @@ -1918,6 +1918,7 @@ static int __init aztcd_init(void) azt_disk->first_minor = 0; azt_disk->fops = &azt_fops; sprintf(azt_disk->disk_name, "aztcd"); + sprintf(azt_disk->devfs_name, "aztcd"); azt_disk->queue = azt_queue; add_disk(azt_disk); azt_invalidate_buffers(); diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index d239cf8b2..fdd37e407 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -263,6 +263,7 @@ /* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */ +#include #include #include #include diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 37bdb0163..72ffd64e8 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c @@ -161,6 +161,7 @@ #include #include #include +#include #include #include #include @@ -3141,7 +3142,7 @@ int __init cdu31a_init(void) if (cdu31a_irq > 0) { if (request_irq - (cdu31a_irq, cdu31a_interrupt, IRQF_DISABLED, + (cdu31a_irq, cdu31a_interrupt, SA_INTERRUPT, "cdu31a", NULL)) { printk(KERN_WARNING PFX "Unable to grab IRQ%d for " "the CDU31A driver\n", cdu31a_irq); diff --git a/drivers/cdrom/cm206.c b/drivers/cdrom/cm206.c index 9b05ddd23..f43a988dd 100644 --- a/drivers/cdrom/cm206.c +++ b/drivers/cdrom/cm206.c @@ -187,6 +187,7 @@ History: #include #include #include +#include #include #include #include @@ -914,7 +915,7 @@ static void seek(int lba) cd->dsb = wait_dsb(); } -static uch bcdbin(unsigned char bcd) +uch bcdbin(unsigned char bcd) { /* stolen from mcd.c! */ return (bcd >> 4) * 10 + (bcd & 0xf); } @@ -1532,7 +1533,7 @@ static void __init parse_options(void) } } -static int __init __cm206_init(void) +static int __cm206_init(void) { parse_options(); #if !defined(AUTO_PROBE_MODULE) @@ -1593,3 +1594,8 @@ __setup("cm206=", cm206_setup); #endif /* !MODULE */ MODULE_ALIAS_BLOCKDEV_MAJOR(CM206_CDROM_MAJOR); +/* + * Local variables: + * compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o cm206.o cm206.c" + * End: + */ diff --git a/drivers/cdrom/gscd.c b/drivers/cdrom/gscd.c index fa7082489..ad5464ab9 100644 --- a/drivers/cdrom/gscd.c +++ b/drivers/cdrom/gscd.c @@ -266,7 +266,7 @@ repeat: goto out; if (req->cmd != READ) { - printk("GSCD: bad cmd %u\n", rq_data_dir(req)); + printk("GSCD: bad cmd %lu\n", rq_data_dir(req)); end_request(req, 0); goto repeat; } @@ -955,6 +955,7 @@ static int __init gscd_init(void) gscd_disk->first_minor = 0; gscd_disk->fops = &gscd_fops; sprintf(gscd_disk->disk_name, "gscd"); + sprintf(gscd_disk->devfs_name, "gscd"); if (register_blkdev(MAJOR_NR, "gscd")) { ret = -EIO; diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index dcd1ab684..a0b580c22 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c @@ -74,6 +74,7 @@ static const char *mcdx_c_version #include #define MAJOR_NR MITSUMI_X_CDROM_MAJOR #include +#include #include "mcdx.h" @@ -1005,7 +1006,7 @@ static int mcdx_talk(struct s_drive_stuff *stuffp, /* MODULE STUFF ***********************************************************/ -static int __init __mcdx_init(void) +int __mcdx_init(void) { int i; int drives = 0; @@ -1193,7 +1194,7 @@ static int __init mcdx_init_drive(int drive) } xtrace(INIT, "init() subscribe irq and i/o\n"); - if (request_irq(stuffp->irq, mcdx_intr, IRQF_DISABLED, "mcdx", stuffp)) { + if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", stuffp)) { release_region(stuffp->wreg_data, MCDX_IO_SIZE); xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n", MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq); diff --git a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c index 25032d7ed..0b0eab4f4 100644 --- a/drivers/cdrom/optcd.c +++ b/drivers/cdrom/optcd.c @@ -2033,6 +2033,7 @@ static int __init optcd_init(void) optcd_disk->first_minor = 0; optcd_disk->fops = &opt_fops; sprintf(optcd_disk->disk_name, "optcd"); + sprintf(optcd_disk->devfs_name, "optcd"); if (!request_region(optcd_port, 4, "optcd")) { printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n", diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index ba50e5a71..05c9e865e 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c @@ -371,6 +371,7 @@ #include #include #include +#include #include #include #include @@ -381,6 +382,7 @@ #include #include #include +#include #include "sbpcd.h" #define MAJOR_NR MATSUSHITA_CDROM_MAJOR @@ -5806,6 +5808,8 @@ int __init sbpcd_init(void) return -ENOMEM; } + devfs_mk_dir("sbp"); + for (j=0;jfops = &sbpcd_bdops; strcpy(disk->disk_name, sbpcd_infop->name); disk->flags = GENHD_FL_CD; + sprintf(disk->devfs_name, "sbp/c0t%d", p->drv_id); p->disk = disk; if (register_cdrom(sbpcd_infop)) { @@ -5901,6 +5906,7 @@ static void sbpcd_exit(void) if (D_S[j].drv_id==-1) continue; del_gendisk(D_S[j].disk); put_disk(D_S[j].disk); + devfs_remove("sbp/c0t%d", j); vfree(D_S[j].sbp_buf); if (D_S[j].sbp_audsiz>0) vfree(D_S[j].aud_buf); @@ -5911,6 +5917,7 @@ static void sbpcd_exit(void) } vfree(D_S[j].sbpcd_infop); } + devfs_remove("sbp"); msg(DBG_INF, "%s module released.\n", major_name); } diff --git a/drivers/cdrom/sjcd.c b/drivers/cdrom/sjcd.c index bf5aef4e5..74b1cadbf 100644 --- a/drivers/cdrom/sjcd.c +++ b/drivers/cdrom/sjcd.c @@ -1695,6 +1695,7 @@ static int __init sjcd_init(void) sjcd_disk->first_minor = 0, sjcd_disk->fops = &sjcd_fops, sprintf(sjcd_disk->disk_name, "sjcd"); + sprintf(sjcd_disk->devfs_name, "sjcd"); if (!request_region(sjcd_base, 4,"sjcd")) { printk diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 30ab56258..e65659926 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c @@ -1527,7 +1527,7 @@ static int __init sony535_init(void) } if (sony535_irq_used > 0) { if (request_irq(sony535_irq_used, cdu535_interrupt, - IRQF_DISABLED, CDU535_HANDLE, NULL)) { + SA_INTERRUPT, CDU535_HANDLE, NULL)) { printk("Unable to grab IRQ%d for the " CDU535_MESSAGE_NAME " driver; polling instead.\n", sony535_irq_used); sony535_irq_used = 0; @@ -1589,6 +1589,7 @@ static int __init sony535_init(void) cdu_disk->first_minor = 0; cdu_disk->fops = &cdu_fops; sprintf(cdu_disk->disk_name, "cdu"); + sprintf(cdu_disk->devfs_name, "cdu535"); if (!request_region(sony535_cd_base_io, 4, CDU535_HANDLE)) { printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n", diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 54ca931e1..c0f817ba7 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -49,6 +49,7 @@ #include #define VIOCD_DEVICE "iseries/vcd" +#define VIOCD_DEVICE_DEVFS "iseries/vcd" #define VIOCD_VERS "1.06" @@ -687,6 +688,8 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) gendisk->first_minor = deviceno; strncpy(gendisk->disk_name, c->name, sizeof(gendisk->disk_name)); + snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name), + VIOCD_DEVICE_DEVFS "%d", deviceno); blk_queue_max_hw_segments(q, 1); blk_queue_max_phys_segments(q, 1); blk_queue_max_sectors(q, 4096 / 512); @@ -728,7 +731,7 @@ static int viocd_remove(struct vio_dev *vdev) * support. */ static struct vio_device_id viocd_device_table[] __devinitdata = { - { "block", "IBM,iSeries-viocd" }, + { "viocd", "" }, { "", "" } }; MODULE_DEVICE_TABLE(vio, viocd_device_table); diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 6561e49d5..c736273a3 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -62,23 +62,6 @@ config HW_CONSOLE depends on VT && !S390 && !UML default y -config VT_HW_CONSOLE_BINDING - bool "Support for binding and unbinding console drivers" - depends on HW_CONSOLE - default n - ---help--- - The virtual terminal is the device that interacts with the physical - terminal through console drivers. On these systems, at least one - console driver is loaded. In other configurations, additional console - drivers may be enabled, such as the framebuffer console. If more than - 1 console driver is enabled, setting this to 'y' will allow you to - select the console driver that will serve as the backend for the - virtual terminals. - - See for more - information. For framebuffer console users, please refer to - . - config SERIAL_NONSTANDARD bool "Non-standard serial port support" ---help--- @@ -689,7 +672,20 @@ config NWFLASH If you're not sure, say N. -source "drivers/char/hw_random/Kconfig" +config HW_RANDOM + tristate "Intel/AMD/VIA HW Random Number Generator support" + depends on (X86 || IA64) && PCI + ---help--- + This driver provides kernel-side support for the Random Number + Generator hardware found on Intel i8xx-based motherboards, + AMD 76x-based motherboards, and Via Nehemiah CPUs. + + Provides a character driver, used to read() entropy data. + + To compile this driver as a module, choose M here: the + module will be called hw_random. + + If unsure, say N. config NVRAM tristate "/dev/nvram support" @@ -871,7 +867,6 @@ config SONYPI config TANBAC_TB0219 tristate "TANBAC TB0219 base board support" depends TANBAC_TB022X - select GPIO_VR41XX menu "Ftape, the floppy tape device driver" @@ -941,36 +936,12 @@ config MWAVE config SCx200_GPIO tristate "NatSemi SCx200 GPIO Support" depends on SCx200 - select NSC_GPIO help Give userspace access to the GPIO pins on the National Semiconductor SCx200 processors. If compiled as a module, it will be called scx200_gpio. -config PC8736x_GPIO - tristate "NatSemi PC8736x GPIO Support" - depends on X86 - default SCx200_GPIO # mostly N - select NSC_GPIO # needed for support routines - help - Give userspace access to the GPIO pins on the National - Semiconductor PC-8736x (x=[03456]) SuperIO chip. The chip - has multiple functional units, inc several managed by - hwmon/pc87360 driver. Tested with PC-87366 - - If compiled as a module, it will be called pc8736x_gpio. - -config NSC_GPIO - tristate "NatSemi Base GPIO Support" - depends on X86_32 - # selected by SCx200_GPIO and PC8736x_GPIO - # what about 2 selectors differing: m != y - help - Common support used (and needed) by scx200_gpio and - pc8736x_gpio drivers. If those drivers are built as - modules, this one will be too, named nsc_gpio - config CS5535_GPIO tristate "AMD CS5535/CS5536 GPIO (Geode Companion Device)" depends on X86_32 diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 15c349d06..40fc97f8a 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -75,15 +75,13 @@ endif obj-$(CONFIG_TOSHIBA) += toshiba.o obj-$(CONFIG_I8K) += i8k.o obj-$(CONFIG_DS1620) += ds1620.o -obj-$(CONFIG_HW_RANDOM) += hw_random/ +obj-$(CONFIG_HW_RANDOM) += hw_random.o obj-$(CONFIG_FTAPE) += ftape/ obj-$(CONFIG_COBALT_LCD) += lcd.o obj-$(CONFIG_PPDEV) += ppdev.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o -obj-$(CONFIG_PC8736x_GPIO) += pc8736x_gpio.o -obj-$(CONFIG_NSC_GPIO) += nsc_gpio.o obj-$(CONFIG_CS5535_GPIO) += cs5535_gpio.o obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o obj-$(CONFIG_TANBAC_TB0219) += tb0219.o diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig index 22f8cf218..7c88c060a 100644 --- a/drivers/char/agp/Kconfig +++ b/drivers/char/agp/Kconfig @@ -1,7 +1,7 @@ config AGP - tristate "/dev/agpgart (AGP Support)" + tristate "/dev/agpgart (AGP Support)" if !GART_IOMMU depends on ALPHA || IA64 || PPC || X86 - depends on PCI + default y if GART_IOMMU ---help--- AGP (Accelerated Graphics Port) is a bus system mainly used to connect graphics cards to the rest of the system. @@ -56,9 +56,9 @@ config AGP_AMD X on AMD Irongate, 761, and 762 chipsets. config AGP_AMD64 - tristate "AMD Opteron/Athlon64 on-CPU GART support" if !IOMMU + tristate "AMD Opteron/Athlon64 on-CPU GART support" if !GART_IOMMU depends on AGP && X86 - default y if IOMMU + default y if GART_IOMMU help This option gives you AGP support for the GLX component of X using the on-CPU northbridge of the AMD Athlon64/Opteron CPUs. diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 8b3317fd4..3c623b67e 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h @@ -117,7 +117,7 @@ struct agp_bridge_driver { }; struct agp_bridge_data { - const struct agp_version *version; + struct agp_version *version; struct agp_bridge_driver *driver; struct vm_operations_struct *vm_ops; void *previous_size; diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c index b4e00a343..2b5838e64 100644 --- a/drivers/char/agp/alpha-agp.c +++ b/drivers/char/agp/alpha-agp.c @@ -46,6 +46,12 @@ struct vm_operations_struct alpha_core_agp_vm_ops = { }; +static int alpha_core_agp_nop(void) +{ + /* just return success */ + return 0; +} + static int alpha_core_agp_fetch_size(void) { return alpha_core_agp_sizes[0].size; @@ -114,11 +120,6 @@ static int alpha_core_agp_remove_memory(struct agp_memory *mem, off_t pg_start, return status; } -static int alpha_core_agp_create_free_gatt_table(struct agp_bridge_data *a) -{ - return 0; -} - struct agp_bridge_driver alpha_core_agp_driver = { .owner = THIS_MODULE, .aperture_sizes = alpha_core_agp_sizes, @@ -134,8 +135,8 @@ struct agp_bridge_driver alpha_core_agp_driver = { .tlb_flush = alpha_core_agp_tlbflush, .mask_memory = agp_generic_mask_memory, .cache_flush = global_cache_flush, - .create_gatt_table = alpha_core_agp_create_free_gatt_table, - .free_gatt_table = alpha_core_agp_create_free_gatt_table, + .create_gatt_table = alpha_core_agp_nop, + .free_gatt_table = alpha_core_agp_nop, .insert_memory = alpha_core_agp_insert_memory, .remove_memory = alpha_core_agp_remove_memory, .alloc_by_type = agp_generic_alloc_by_type, diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 51d0d562d..1f776651a 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c @@ -118,7 +118,7 @@ static int amd_create_gatt_pages(int nr_tables) return retval; } -/* Since we don't need contiguous memory we just try +/* Since we don't need contigious memory we just try * to get the gatt table once */ diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 8cd52984c..ac3c33a2e 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -8,15 +8,18 @@ * work is done in the northbridge(s). */ +#include #include #include #include #include #include #include /* PAGE_SIZE */ -#include #include "agp.h" +/* Will need to be increased if AMD64 ever goes >8-way. */ +#define MAX_HAMMER_GARTS 8 + /* PTE bits. */ #define GPTE_VALID 1 #define GPTE_COHERENT 2 @@ -50,12 +53,28 @@ #define ULI_X86_64_HTT_FEA_REG 0x50 #define ULI_X86_64_ENU_SCR_REG 0x54 +static int nr_garts; +static struct pci_dev * hammers[MAX_HAMMER_GARTS]; + static struct resource *aperture_resource; static int __initdata agp_try_unsupported = 1; +#define for_each_nb() for(gart_iterator=0;gart_iteratorgatt_table_real); - int i; + int gart_iterator; /* Configure AGP regs in each x86-64 host bridge. */ - for (i = 0; i < num_k8_northbridges; i++) { + for_each_nb() { agp_bridge->gart_bus_addr = - amd64_configure(k8_northbridges[i], gatt_bus); + amd64_configure(hammers[gart_iterator],gatt_bus); } - k8_flush_garts(); return 0; } @@ -215,13 +236,12 @@ static int amd_8151_configure(void) static void amd64_cleanup(void) { u32 tmp; - int i; - for (i = 0; i < num_k8_northbridges; i++) { - struct pci_dev *dev = k8_northbridges[i]; + int gart_iterator; + for_each_nb() { /* disable gart translation */ - pci_read_config_dword (dev, AMD64_GARTAPERTURECTL, &tmp); + pci_read_config_dword (hammers[gart_iterator], AMD64_GARTAPERTURECTL, &tmp); tmp &= ~AMD64_GARTEN; - pci_write_config_dword (dev, AMD64_GARTAPERTURECTL, tmp); + pci_write_config_dword (hammers[gart_iterator], AMD64_GARTAPERTURECTL, tmp); } } @@ -291,7 +311,7 @@ static int __devinit aperture_valid(u64 aper, u32 size) /* * W*s centric BIOS sometimes only set up the aperture in the AGP * bridge, not the northbridge. On AMD64 this is handled early - * in aperture.c, but when IOMMU is not enabled or we run + * in aperture.c, but when GART_IOMMU is not enabled or we run * on a 32bit kernel this needs to be redone. * Unfortunately it is impossible to fix the aperture here because it's too late * to allocate that much memory. But at least error out cleanly instead of @@ -341,15 +361,17 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr) { - int i; - - if (cache_k8_northbridges() < 0) - return -ENODEV; - - i = 0; - for (i = 0; i < num_k8_northbridges; i++) { - struct pci_dev *dev = k8_northbridges[i]; - if (fix_northbridge(dev, pdev, cap_ptr) < 0) { + struct pci_dev *loop_dev = NULL; + int i = 0; + + /* cache pci_devs of northbridges. */ + while ((loop_dev = pci_get_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"); #ifdef __x86_64__ /* should port this to i386 */ @@ -357,8 +379,10 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr) #endif return -1; } + hammers[i++] = loop_dev; } - return 0; + nr_garts = i; + return i == 0 ? -1 : 0; } /* Handle AMD 8151 quirks */ @@ -426,7 +450,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev) } /* shadow x86-64 registers into ULi registers */ - pci_read_config_dword (k8_northbridges[0], AMD64_GARTAPERTUREBASE, &httfea); + pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &httfea); /* if x86-64 aperture base is beyond 4G, exit here */ if ((httfea & 0x7fff) >> (32 - 25)) @@ -489,7 +513,7 @@ static int __devinit nforce3_agp_init(struct pci_dev *pdev) pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp); /* shadow x86-64 registers into NVIDIA registers */ - pci_read_config_dword (k8_northbridges[0], AMD64_GARTAPERTUREBASE, &apbase); + pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase); /* if x86-64 aperture base is beyond 4G, exit here */ if ( (apbase & 0x7fff) >> (32 - 25) ) { @@ -730,10 +754,14 @@ static struct pci_driver agp_amd64_pci_driver = { int __init agp_amd64_init(void) { int err = 0; + static struct pci_device_id amd64nb[] = { + { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x1103) }, + { }, + }; if (agp_off) return -EINVAL; - if (pci_register_driver(&agp_amd64_pci_driver) < 0) { + if (pci_register_driver(&agp_amd64_pci_driver) > 0) { struct pci_dev *dev; if (!agp_try_unsupported && !agp_try_unsupported_boot) { printk(KERN_INFO PFX "No supported AGP bridge found.\n"); @@ -746,7 +774,7 @@ int __init agp_amd64_init(void) } /* First check that we have at least one AMD64 NB */ - if (!pci_dev_present(k8_nb_ids)) + if (!pci_dev_present(amd64nb)) return -ENODEV; /* Look for any AGP bridge */ @@ -774,7 +802,7 @@ static void __exit agp_amd64_cleanup(void) /* On AMD64 the PCI driver needs to initialize this driver early for the IOMMU, so it has to be called via a backdoor. */ -#ifndef CONFIG_IOMMU +#ifndef CONFIG_GART_IOMMU module_init(agp_amd64_init); module_exit(agp_amd64_cleanup); #endif diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index f244c6682..06fd10ba0 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c @@ -41,6 +41,7 @@ static struct gatt_mask ati_generic_masks[] = }; + typedef struct _ati_page_map { unsigned long *real; unsigned long __iomem *remapped; @@ -140,8 +141,7 @@ static int ati_create_gatt_pages(int nr_tables) ati_generic_private.num_tables = nr_tables; ati_generic_private.gatt_pages = tables; - if (retval != 0) - ati_free_gatt_pages(); + if (retval != 0) ati_free_gatt_pages(); return retval; } @@ -219,16 +219,16 @@ static int ati_configure(void) ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); if (is_r200()) - pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000); + pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000); else pci_write_config_dword(agp_bridge->dev, ATI_RS300_IG_AGPMODE, 0x20000); /* address to map too */ - /* + /* pci_read_config_dword(agp_bridge.dev, AGP_APBASE, &temp); agp_bridge.gart_bus_addr = (temp & PCI_BASE_ADDRESS_MEM_MASK); printk(KERN_INFO PFX "IGP320 gart_bus_addr: %x\n", agp_bridge.gart_bus_addr); - */ + */ writel(0x60000, ati_generic_private.registers+ATI_GART_FEATURE_ID); readl(ati_generic_private.registers+ATI_GART_FEATURE_ID); /* PCI Posting.*/ @@ -245,25 +245,23 @@ static int ati_configure(void) #ifdef CONFIG_PM -static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state) +static int agp_ati_resume(struct pci_dev *dev) { - pci_save_state(dev); - pci_set_power_state(dev, 3); + pci_restore_state(dev); - return 0; + return ati_configure(); } -static int agp_ati_resume(struct pci_dev *dev) +static int agp_ati_suspend(struct pci_dev *dev, pm_message_t state) { - pci_set_power_state(dev, 0); - pci_restore_state(dev); + pci_save_state(dev); - return ati_configure(); + return 0; } #endif /* - *Since we don't need contiguous memory we just try + *Since we don't need contigious memory we just try * to get the gatt table once */ @@ -323,9 +321,9 @@ static int ati_remove_memory(struct agp_memory * mem, off_t pg_start, unsigned long __iomem *cur_gatt; unsigned long addr; - if (type != 0 || mem->type != 0) + if (type != 0 || mem->type != 0) { return -EINVAL; - + } for (i = pg_start; i < (mem->page_count + pg_start); i++) { addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr; cur_gatt = GET_GATT(addr); @@ -504,9 +502,10 @@ found: bridge->dev = pdev; bridge->capndx = cap_ptr; - + bridge->driver = &ati_generic_bridge; + printk(KERN_INFO PFX "Detected Ati %s chipset\n", devs[j].chipset_name); @@ -547,8 +546,8 @@ static struct pci_driver agp_ati_pci_driver = { .probe = agp_ati_probe, .remove = agp_ati_remove, #ifdef CONFIG_PM - .suspend = agp_ati_suspend, .resume = agp_ati_resume, + .suspend = agp_ati_suspend, #endif }; diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index d59e037dd..509adc403 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c @@ -44,7 +44,7 @@ * past 0.99 at all due to some boolean logic error. */ #define AGPGART_VERSION_MAJOR 0 #define AGPGART_VERSION_MINOR 101 -static const struct agp_version agp_current_version = +static struct agp_version agp_current_version = { .major = AGPGART_VERSION_MAJOR, .minor = AGPGART_VERSION_MINOR, diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 30f730ff8..86a966b65 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -177,7 +177,7 @@ static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) /* - * Since we don't need contiguous memory we just try + * Since we don't need contigious memory we just try * to get the gatt table once */ @@ -337,6 +337,13 @@ static struct agp_bridge_driver efficeon_driver = { .agp_destroy_page = agp_generic_destroy_page, }; + +static int agp_efficeon_resume(struct pci_dev *pdev) +{ + printk(KERN_DEBUG PFX "agp_efficeon_resume()\n"); + return efficeon_configure(); +} + static int __devinit agp_efficeon_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -407,18 +414,11 @@ static void __devexit agp_efficeon_remove(struct pci_dev *pdev) agp_put_bridge(bridge); } -#ifdef CONFIG_PM static int agp_efficeon_suspend(struct pci_dev *dev, pm_message_t state) { return 0; } -static int agp_efficeon_resume(struct pci_dev *pdev) -{ - printk(KERN_DEBUG PFX "agp_efficeon_resume()\n"); - return efficeon_configure(); -} -#endif static struct pci_device_id agp_efficeon_pci_table[] = { { @@ -439,10 +439,8 @@ static struct pci_driver agp_efficeon_pci_driver = { .id_table = agp_efficeon_pci_table, .probe = agp_efficeon_probe, .remove = agp_efficeon_remove, -#ifdef CONFIG_PM .suspend = agp_efficeon_suspend, .resume = agp_efficeon_resume, -#endif }; static int __init agp_efficeon_init(void) diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 0f2ed2aa2..ffcf15c30 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -151,12 +151,35 @@ static void agp_add_seg_to_client(struct agp_client *client, client->segments = seg; } +/* Originally taken from linux/mm/mmap.c from the array + * protection_map. + * The original really should be exported to modules, or + * some routine which does the conversion for you + */ + +static const pgprot_t my_protect_map[16] = +{ + __P000, __P001, __P010, __P011, __P100, __P101, __P110, __P111, + __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111 +}; + static pgprot_t agp_convert_mmap_flags(int prot) { +#define _trans(x,bit1,bit2) \ +((bit1==bit2)?(x&bit1):(x&bit1)?bit2:0) + unsigned long prot_bits; + pgprot_t temp; + + prot_bits = _trans(prot, PROT_READ, VM_READ) | + _trans(prot, PROT_WRITE, VM_WRITE) | + _trans(prot, PROT_EXEC, VM_EXEC); + + prot_bits |= VM_SHARED; - prot_bits = calc_vm_prot_bits(prot) | VM_SHARED; - return vm_get_page_prot(prot_bits); + temp = my_protect_map[prot_bits & 0x0000000f]; + + return temp; } static int agp_create_segment(struct agp_client *client, struct agp_region *region) @@ -1036,7 +1059,7 @@ ioctl_out: return ret_val; } -static const struct file_operations agp_fops = +static struct file_operations agp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 8824632d7..4e1891e2c 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c @@ -27,6 +27,7 @@ * TODO: * - Allocate more than order 0 pages to avoid too much linear map splitting. */ +#include #include #include #include @@ -568,34 +569,25 @@ static void agp_v3_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_ *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); goto done; - } else if (*requested_mode & AGPSTAT3_4X) { - *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *bridge_agpstat |= AGPSTAT3_4X; - goto done; - } else { /* - * If we didn't specify an AGP mode, we see if both - * the graphics card, and the bridge can do x8, and use if so. - * If not, we fall back to x4 mode. + * If we didn't specify AGPx8, we can only do x4. + * If the hardware can't do x4, we're up shit creek, and never + * should have got this far. */ - if ((*bridge_agpstat & AGPSTAT3_8X) && (*vga_agpstat & AGPSTAT3_8X)) { - printk(KERN_INFO PFX "No AGP mode specified. Setting to highest mode supported by bridge & card (x8).\n"); - *bridge_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); - *vga_agpstat &= ~(AGPSTAT3_4X | AGPSTAT3_RSVD); - } else { - printk(KERN_INFO PFX "Fell back to AGPx4 mode because"); - if (!(*bridge_agpstat & AGPSTAT3_8X)) { - printk(KERN_INFO PFX "bridge couldn't do x8. bridge_agpstat:%x (orig=%x)\n", *bridge_agpstat, origbridge); - *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *bridge_agpstat |= AGPSTAT3_4X; - } - if (!(*vga_agpstat & AGPSTAT3_8X)) { - printk(KERN_INFO PFX "graphics card couldn't do x8. vga_agpstat:%x (orig=%x)\n", *vga_agpstat, origvga); - *vga_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); - *vga_agpstat |= AGPSTAT3_4X; - } + *bridge_agpstat &= ~(AGPSTAT3_8X | AGPSTAT3_RSVD); + if ((*bridge_agpstat & AGPSTAT3_4X) && (*vga_agpstat & AGPSTAT3_4X)) + *bridge_agpstat |= AGPSTAT3_4X; + else { + printk(KERN_INFO PFX "Badness. Don't know which AGP mode to set. " + "[bridge_agpstat:%x vga_agpstat:%x fell back to:- bridge_agpstat:%x vga_agpstat:%x]\n", + origbridge, origvga, *bridge_agpstat, *vga_agpstat); + if (!(*bridge_agpstat & AGPSTAT3_4X)) + printk(KERN_INFO PFX "Bridge couldn't do AGP x4.\n"); + if (!(*vga_agpstat & AGPSTAT3_4X)) + printk(KERN_INFO PFX "Graphic card couldn't do AGP x4.\n"); + return; } } @@ -817,10 +809,12 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge) case U32_APER_SIZE: bridge->current_size = A_IDX32(bridge); break; - /* These cases will never really happen. */ + /* This case will never really happen. */ case FIXED_APER_SIZE: case LVL2_APER_SIZE: default: + bridge->current_size = + bridge->current_size; break; } temp = bridge->current_size; @@ -1051,7 +1045,7 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge) { struct page * page; - page = alloc_page(GFP_KERNEL | GFP_DMA32); + page = alloc_page(GFP_KERNEL); if (page == NULL) return NULL; diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 907fb66ec..8c4c6ef74 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c @@ -497,7 +497,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) info = buffer.pointer; info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0'; match = (strcmp(info->hardware_id.value, "HWP0001") == 0); - kfree(info); + ACPI_MEM_FREE(info); if (match) { status = hp_acpi_csr_space(handle, &sba_hpa, &length); if (ACPI_SUCCESS(status)) diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 7475eaece..bddcae54b 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -2,6 +2,14 @@ * Intel AGPGART routines. */ +/* + * Intel(R) 855GM/852GM and 865G support added by David Dawes + * . + * + * Intel(R) 915G/915GM support added by Alan Hourihane + * . + */ + #include #include #include @@ -9,21 +17,6 @@ #include #include "agp.h" -#define PCI_DEVICE_ID_INTEL_82946GZ_HB 0x2970 -#define PCI_DEVICE_ID_INTEL_82946GZ_IG 0x2972 -#define PCI_DEVICE_ID_INTEL_82965G_1_HB 0x2980 -#define PCI_DEVICE_ID_INTEL_82965G_1_IG 0x2982 -#define PCI_DEVICE_ID_INTEL_82965Q_HB 0x2990 -#define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992 -#define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0 -#define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2 - -#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_1_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB) - - /* Intel 815 register */ #define INTEL_815_APCONT 0x51 #define INTEL_815_ATTBASE_MASK ~0x1FFFFFFF @@ -47,8 +40,6 @@ #define I915_GMCH_GMS_STOLEN_48M (0x6 << 4) #define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) -/* Intel 965G registers */ -#define I965_MSAC 0x62 /* Intel 7505 registers */ #define INTEL_I7505_APSIZE 0x74 @@ -169,7 +160,7 @@ static void *i8xx_alloc_pages(void) { struct page * page; - page = alloc_pages(GFP_KERNEL | GFP_DMA32, 2); + page = alloc_pages(GFP_KERNEL, 2); if (page == NULL) return NULL; @@ -363,7 +354,6 @@ static struct aper_size_info_fixed intel_i830_sizes[] = /* The 64M mode still requires a 128k gatt */ {64, 16384, 5}, {256, 65536, 6}, - {512, 131072, 7}, }; static struct _intel_i830_private { @@ -387,11 +377,7 @@ static void intel_i830_init_gtt_entries(void) /* We obtain the size of the GTT, which is also stored (for some * reason) at the top of stolen memory. Then we add 4KB to that * for the video BIOS popup, which is also stored in there. */ - - if (IS_I965) - size = 512 + 4; - else - size = agp_bridge->driver->fetch_size() + 4; + size = agp_bridge->driver->fetch_size() + 4; if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB || agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) { @@ -437,7 +423,7 @@ static void intel_i830_init_gtt_entries(void) if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || IS_I965 ) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB) gtt_entries = MB(48) - KB(size); else gtt_entries = 0; @@ -447,7 +433,7 @@ static void intel_i830_init_gtt_entries(void) if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || IS_I965) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB) gtt_entries = MB(64) - KB(size); else gtt_entries = 0; @@ -750,7 +736,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start, static int intel_i915_fetch_size(void) { struct aper_size_info_fixed *values; - u32 temp, offset; + u32 temp, offset = 0; #define I915_256MB_ADDRESS_MASK (1<<27) @@ -805,77 +791,6 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) return 0; } -static int intel_i965_fetch_size(void) -{ - struct aper_size_info_fixed *values; - u32 offset = 0; - u8 temp; - -#define I965_512MB_ADDRESS_MASK (3<<1) - - values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); - - pci_read_config_byte(intel_i830_private.i830_dev, I965_MSAC, &temp); - temp &= I965_512MB_ADDRESS_MASK; - switch (temp) { - case 0x00: - offset = 0; /* 128MB */ - break; - case 0x06: - offset = 3; /* 512MB */ - break; - default: - case 0x02: - offset = 2; /* 256MB */ - break; - } - - agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset); - - return values[offset].size; -} - -/* The intel i965 automatically initializes the agp aperture during POST. -+ * Use the memory already set aside for in the GTT. -+ */ -static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge) -{ - int page_order; - struct aper_size_info_fixed *size; - int num_entries; - u32 temp; - - size = agp_bridge->current_size; - page_order = size->page_order; - num_entries = size->num_entries; - agp_bridge->gatt_table_real = NULL; - - pci_read_config_dword(intel_i830_private.i830_dev, I915_MMADDR, &temp); - - temp &= 0xfff00000; - intel_i830_private.gtt = ioremap((temp + (512 * 1024)) , 512 * 1024); - - if (!intel_i830_private.gtt) - return -ENOMEM; - - - intel_i830_private.registers = ioremap(temp,128 * 4096); - if (!intel_i830_private.registers) - return -ENOMEM; - - temp = readl(intel_i830_private.registers+I810_PGETBL_CTL) & 0xfffff000; - global_cache_flush(); /* FIXME: ? */ - - /* we have to call this as early as possible after the MMIO base address is known */ - intel_i830_init_gtt_entries(); - - agp_bridge->gatt_table = NULL; - - agp_bridge->gatt_bus_addr = temp; - - return 0; -} - static int intel_fetch_size(void) { @@ -1392,7 +1307,7 @@ static struct agp_bridge_driver intel_830_driver = { .owner = THIS_MODULE, .aperture_sizes = intel_i830_sizes, .size_type = FIXED_APER_SIZE, - .num_aperture_sizes = 4, + .num_aperture_sizes = 3, .needs_scratch_page = TRUE, .configure = intel_i830_configure, .fetch_size = intel_i830_fetch_size, @@ -1554,7 +1469,7 @@ static struct agp_bridge_driver intel_915_driver = { .owner = THIS_MODULE, .aperture_sizes = intel_i830_sizes, .size_type = FIXED_APER_SIZE, - .num_aperture_sizes = 4, + .num_aperture_sizes = 3, .needs_scratch_page = TRUE, .configure = intel_i915_configure, .fetch_size = intel_i915_fetch_size, @@ -1574,29 +1489,6 @@ static struct agp_bridge_driver intel_915_driver = { .agp_destroy_page = agp_generic_destroy_page, }; -static struct agp_bridge_driver intel_i965_driver = { - .owner = THIS_MODULE, - .aperture_sizes = intel_i830_sizes, - .size_type = FIXED_APER_SIZE, - .num_aperture_sizes = 4, - .needs_scratch_page = TRUE, - .configure = intel_i915_configure, - .fetch_size = intel_i965_fetch_size, - .cleanup = intel_i915_cleanup, - .tlb_flush = intel_i810_tlbflush, - .mask_memory = intel_i810_mask_memory, - .masks = intel_i810_masks, - .agp_enable = intel_i810_agp_enable, - .cache_flush = global_cache_flush, - .create_gatt_table = intel_i965_create_gatt_table, - .free_gatt_table = intel_i830_free_gatt_table, - .insert_memory = intel_i915_insert_entries, - .remove_memory = intel_i915_remove_entries, - .alloc_by_type = intel_i830_alloc_by_type, - .free_by_type = intel_i810_free_by_type, - .agp_alloc_page = agp_generic_alloc_page, - .agp_destroy_page = agp_generic_destroy_page, -}; static struct agp_bridge_driver intel_7505_driver = { .owner = THIS_MODULE, @@ -1792,35 +1684,6 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, bridge->driver = &intel_845_driver; name = "945GM"; break; - case PCI_DEVICE_ID_INTEL_82946GZ_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82946GZ_IG)) - bridge->driver = &intel_i965_driver; - else - bridge->driver = &intel_845_driver; - name = "946GZ"; - break; - case PCI_DEVICE_ID_INTEL_82965G_1_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82965G_1_IG)) - bridge->driver = &intel_i965_driver; - else - bridge->driver = &intel_845_driver; - name = "965G"; - break; - case PCI_DEVICE_ID_INTEL_82965Q_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82965Q_IG)) - bridge->driver = &intel_i965_driver; - else - bridge->driver = &intel_845_driver; - name = "965Q"; - break; - case PCI_DEVICE_ID_INTEL_82965G_HB: - if (find_i830(PCI_DEVICE_ID_INTEL_82965G_IG)) - bridge->driver = &intel_i965_driver; - else - bridge->driver = &intel_845_driver; - name = "965G"; - break; - case PCI_DEVICE_ID_INTEL_7505_0: bridge->driver = &intel_7505_driver; name = "E7505"; @@ -1903,7 +1766,6 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev) agp_put_bridge(bridge); } -#ifdef CONFIG_PM static int agp_intel_resume(struct pci_dev *pdev) { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); @@ -1924,12 +1786,9 @@ static int agp_intel_resume(struct pci_dev *pdev) intel_i830_configure(); else if (bridge->driver == &intel_810_driver) intel_i810_configure(); - else if (bridge->driver == &intel_i965_driver) - intel_i915_configure(); return 0; } -#endif static struct pci_device_id agp_intel_pci_table[] = { #define ID(x) \ @@ -1966,10 +1825,6 @@ static struct pci_device_id agp_intel_pci_table[] = { ID(PCI_DEVICE_ID_INTEL_82915GM_HB), ID(PCI_DEVICE_ID_INTEL_82945G_HB), ID(PCI_DEVICE_ID_INTEL_82945GM_HB), - ID(PCI_DEVICE_ID_INTEL_82946GZ_HB), - ID(PCI_DEVICE_ID_INTEL_82965G_1_HB), - ID(PCI_DEVICE_ID_INTEL_82965Q_HB), - ID(PCI_DEVICE_ID_INTEL_82965G_HB), { } }; @@ -1980,9 +1835,7 @@ static struct pci_driver agp_intel_pci_driver = { .id_table = agp_intel_pci_table, .probe = agp_intel_probe, .remove = __devexit_p(agp_intel_remove), -#ifdef CONFIG_PM .resume = agp_intel_resume, -#endif }; static int __init agp_intel_init(void) diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index df7f37b27..4c67135c1 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c @@ -376,29 +376,6 @@ static void __devexit agp_nvidia_remove(struct pci_dev *pdev) agp_put_bridge(bridge); } -#ifdef CONFIG_PM -static int agp_nvidia_suspend(struct pci_dev *pdev, pm_message_t state) -{ - pci_save_state (pdev); - pci_set_power_state (pdev, 3); - - return 0; -} - -static int agp_nvidia_resume(struct pci_dev *pdev) -{ - /* set power state 0 and restore PCI space */ - pci_set_power_state (pdev, 0); - pci_restore_state(pdev); - - /* reconfigure AGP hardware again */ - nvidia_configure(); - - return 0; -} -#endif - - static struct pci_device_id agp_nvidia_pci_table[] = { { .class = (PCI_CLASS_BRIDGE_HOST << 8), @@ -426,10 +403,6 @@ static struct pci_driver agp_nvidia_pci_driver = { .id_table = agp_nvidia_pci_table, .probe = agp_nvidia_probe, .remove = agp_nvidia_remove, -#ifdef CONFIG_PM - .suspend = agp_nvidia_suspend, - .resume = agp_nvidia_resume, -#endif }; static int __init agp_nvidia_init(void) diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index d73be4c2d..cfa7922cb 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c @@ -329,8 +329,9 @@ static int __devinit agp_sgi_init(void) static void __devexit agp_sgi_cleanup(void) { - kfree(sgi_tioca_agp_bridges); - sgi_tioca_agp_bridges = NULL; + if (sgi_tioca_agp_bridges) + kfree(sgi_tioca_agp_bridges); + sgi_tioca_agp_bridges=NULL; } module_init(agp_sgi_init); diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 1de1b1204..9846defbd 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -329,7 +329,7 @@ static int agp_uninorth_suspend(struct pci_dev *pdev) /* turn off AGP on the bridge */ agp = pci_find_capability(pdev, PCI_CAP_ID_AGP); pci_read_config_dword(pdev, agp + PCI_AGP_COMMAND, &cmd); - bridge->dev_private_data = (void *)(long)cmd; + bridge->dev_private_data = (void *)cmd; if (cmd & PCI_AGP_COMMAND_AGP) { printk("uninorth-agp: disabling AGP on bridge %s\n", pci_name(pdev)); @@ -351,7 +351,7 @@ static int agp_uninorth_resume(struct pci_dev *pdev) if (bridge == NULL) return -ENODEV; - command = (long)bridge->dev_private_data; + command = (u32)bridge->dev_private_data; bridge->dev_private_data = NULL; if (!(command & PCI_AGP_COMMAND_AGP)) return 0; diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index c149ac9ce..b8ec25d17 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c @@ -9,7 +9,7 @@ #include #include "agp.h" -static const struct pci_device_id agp_via_pci_table[]; +static struct pci_device_id agp_via_pci_table[]; #define VIA_GARTCTRL 0x80 #define VIA_APSIZE 0x84 @@ -485,7 +485,7 @@ static int agp_via_resume(struct pci_dev *pdev) #endif /* CONFIG_PM */ /* must be the same order as name table above */ -static const struct pci_device_id agp_via_pci_table[] = { +static struct pci_device_id agp_via_pci_table[] = { #define ID(x) \ { \ .class = (PCI_CLASS_BRIDGE_HOST << 8), \ diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 9d6713a93..6602b3156 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c @@ -31,6 +31,7 @@ * ever possible. */ +#include #include #undef SERIAL_PARANOIA_CHECK @@ -2051,7 +2052,7 @@ static int __init rs_init(void) /* set ISRs, and then disable the rx interrupts */ request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); - request_irq(IRQ_AMIGA_RBF, ser_rx_int, IRQF_DISABLED, "serial RX", state); + request_irq(IRQ_AMIGA_RBF, ser_rx_int, SA_INTERRUPT, "serial RX", state); /* turn off Rx and Tx interrupts */ custom.intena = IF_RBF | IF_TBE; diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index 10a389daf..a370e7a0b 100644 --- a/drivers/char/applicom.c +++ b/drivers/char/applicom.c @@ -112,7 +112,7 @@ static int ac_ioctl(struct inode *, struct file *, unsigned int, unsigned long); static irqreturn_t ac_interrupt(int, void *, struct pt_regs *); -static const struct file_operations ac_fops = { +static struct file_operations ac_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = ac_read, @@ -166,7 +166,11 @@ static int ac_register_board(unsigned long physloc, void __iomem *loc, return boardno + 1; } -static void __exit applicom_exit(void) +#ifdef MODULE + +#define applicom_init init_module + +void cleanup_module(void) { unsigned int i; @@ -184,7 +188,9 @@ static void __exit applicom_exit(void) } } -static int __init applicom_init(void) +#endif /* MODULE */ + +int __init applicom_init(void) { int i, numisa = 0; struct pci_dev *dev = NULL; @@ -209,16 +215,13 @@ static int __init applicom_init(void) RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO); if (!RamIO) { - printk(KERN_INFO "ac.o: Failed to ioremap PCI memory " - "space at 0x%llx\n", - (unsigned long long)dev->resource[0].start); + printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start); pci_disable_device(dev); return -EIO; } - printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n", - applicom_pci_devnames[dev->device-1], - (unsigned long long)dev->resource[0].start, + printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n", + applicom_pci_devnames[dev->device-1], dev->resource[0].start, dev->irq); boardno = ac_register_board(dev->resource[0].start, RamIO,0); @@ -229,7 +232,7 @@ static int __init applicom_init(void) continue; } - if (request_irq(dev->irq, &ac_interrupt, IRQF_SHARED, "Applicom PCI", &dummy)) { + if (request_irq(dev->irq, &ac_interrupt, SA_SHIRQ, "Applicom PCI", &dummy)) { printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq); iounmap(RamIO); pci_disable_device(dev); @@ -276,7 +279,7 @@ static int __init applicom_init(void) printk(KERN_NOTICE "Applicom ISA card found at mem 0x%lx, irq %d\n", mem + (LEN_RAM_IO*i), irq); if (!numisa) { - if (request_irq(irq, &ac_interrupt, IRQF_SHARED, "Applicom ISA", &dummy)) { + if (request_irq(irq, &ac_interrupt, SA_SHIRQ, "Applicom ISA", &dummy)) { printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq); iounmap(RamIO); apbs[boardno - 1].RamIO = NULL; @@ -352,9 +355,10 @@ out: return ret; } -module_init(applicom_init); -module_exit(applicom_exit); +#ifndef MODULE +__initcall(applicom_init); +#endif static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos) { @@ -847,3 +851,28 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return 0; } +#ifndef MODULE +static int __init applicom_setup(char *str) +{ + int ints[4]; + + (void) get_options(str, 4, ints); + + if (ints[0] > 2) { + printk(KERN_WARNING "Too many arguments to 'applicom=', expected mem,irq only.\n"); + } + + if (ints[0] < 2) { + printk(KERN_INFO"applicom numargs: %d\n", ints[0]); + return 0; + } + + mem = ints[1]; + irq = ints[2]; + return 1; +} + +__setup("applicom=", applicom_setup); + +#endif /* MODULE */ + diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index 04a12027a..c85a4fa60 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c @@ -11,6 +11,7 @@ * Fix bug in inverse translation. Stanislav Voronyi , Dec 1998 */ +#include #include #include #include diff --git a/drivers/char/crash.c b/drivers/char/crash.c index e5437de38..04de081a3 100644 --- a/drivers/char/crash.c +++ b/drivers/char/crash.c @@ -24,6 +24,7 @@ *****************************************************************************/ #include +#include #include #include #include diff --git a/drivers/char/cs5535_gpio.c b/drivers/char/cs5535_gpio.c index 8ce3f34cf..46d66037b 100644 --- a/drivers/char/cs5535_gpio.c +++ b/drivers/char/cs5535_gpio.c @@ -158,7 +158,7 @@ static int cs5535_gpio_open(struct inode *inode, struct file *file) return nonseekable_open(inode, file); } -static const struct file_operations cs5535_gpio_fops = { +static struct file_operations cs5535_gpio_fops = { .owner = THIS_MODULE, .write = cs5535_gpio_write, .read = cs5535_gpio_read, diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index c1c672817..cc7acf877 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -633,6 +633,7 @@ static char rcsid[] = /* * Include section */ +#include #include #include #include @@ -2832,8 +2833,9 @@ cy_write(struct tty_struct * tty, const unsigned char *buf, int count) return 0; } - if (!info->xmit_buf || !tmp_buf) - return 0; + if (!tty || !info->xmit_buf || !tmp_buf){ + return 0; + } CY_LOCK(info, flags); while (1) { @@ -2882,7 +2884,7 @@ cy_put_char(struct tty_struct *tty, unsigned char ch) if (serial_paranoia_check(info, tty->name, "cy_put_char")) return; - if (!info->xmit_buf) + if (!tty || !info->xmit_buf) return; CY_LOCK(info, flags); @@ -4612,7 +4614,7 @@ cy_detect_isa(void) /* allocate IRQ */ if(request_irq(cy_isa_irq, cyy_interrupt, - IRQF_DISABLED, "Cyclom-Y", &cy_card[j])) + SA_INTERRUPT, "Cyclom-Y", &cy_card[j])) { printk("Cyclom-Y/ISA found at 0x%lx ", (unsigned long) cy_isa_address); @@ -4785,7 +4787,7 @@ cy_detect_pci(void) /* allocate IRQ */ if(request_irq(cy_pci_irq, cyy_interrupt, - IRQF_SHARED, "Cyclom-Y", &cy_card[j])) + SA_SHIRQ, "Cyclom-Y", &cy_card[j])) { printk("Cyclom-Y/PCI found at 0x%lx ", (ulong) cy_pci_phys2); @@ -4965,7 +4967,7 @@ cy_detect_pci(void) /* allocate IRQ only if board has an IRQ */ if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { if(request_irq(cy_pci_irq, cyz_interrupt, - IRQF_SHARED, "Cyclades-Z", &cy_card[j])) + SA_SHIRQ, "Cyclades-Z", &cy_card[j])) { printk("Cyclom-8Zo/PCI found at 0x%lx ", (ulong) cy_pci_phys2); @@ -5059,7 +5061,7 @@ cy_detect_pci(void) /* allocate IRQ only if board has an IRQ */ if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { if(request_irq(cy_pci_irq, cyz_interrupt, - IRQF_SHARED, "Cyclades-Z", &cy_card[j])) + SA_SHIRQ, "Cyclades-Z", &cy_card[j])) { printk("Cyclom-Ze/PCI found at 0x%lx ", (ulong) cy_pci_phys2); @@ -5249,6 +5251,7 @@ cy_init(void) cy_serial_driver->owner = THIS_MODULE; cy_serial_driver->driver_name = "cyclades"; cy_serial_driver->name = "ttyC"; + cy_serial_driver->devfs_name = "tts/C"; cy_serial_driver->major = CYCLADES_MAJOR; cy_serial_driver->minor_start = 0; cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; diff --git a/drivers/char/decserial.c b/drivers/char/decserial.c index 85f404e25..aa1440934 100644 --- a/drivers/char/decserial.c +++ b/drivers/char/decserial.c @@ -16,6 +16,7 @@ * console device I strongly recommend to use only one. */ +#include #include #include diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h index 5642ac43e..9da0ddb89 100644 --- a/drivers/char/drm/drm.h +++ b/drivers/char/drm/drm.h @@ -38,6 +38,7 @@ #if defined(__linux__) #if defined(__KERNEL__) +#include #endif #include /* For _IO* macros */ #define DRM_IOCTL_NR(n) _IOC_NR(n) diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index d2a56182b..cb76e5ca9 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -44,6 +44,7 @@ * can build the DRM (part of PI DRI). 4/21/2000 S + B */ #include #endif /* __alpha__ */ +#include #include #include #include diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c index ebdb7182c..611a11730 100644 --- a/drivers/char/drm/drm_irq.c +++ b/drivers/char/drm/drm_irq.c @@ -130,7 +130,7 @@ static int drm_irq_install(drm_device_t * dev) /* Install handler */ if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) - sh_flags = IRQF_SHARED; + sh_flags = SA_SHIRQ; ret = request_irq(dev->irq, dev->driver->irq_handler, sh_flags, dev->devname, dev); diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c index 5681cae1d..7e3318e1d 100644 --- a/drivers/char/drm/drm_memory.c +++ b/drivers/char/drm/drm_memory.c @@ -33,6 +33,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include #include "drmP.h" diff --git a/drivers/char/drm/drm_memory.h b/drivers/char/drm/drm_memory.h index f1b97aff1..714d9aedc 100644 --- a/drivers/char/drm/drm_memory.h +++ b/drivers/char/drm/drm_memory.h @@ -33,6 +33,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include #include #include "drmP.h" diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h index 74581af80..6543b9a14 100644 --- a/drivers/char/drm/drm_memory_debug.h +++ b/drivers/char/drm/drm_memory_debug.h @@ -31,6 +31,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include "drmP.h" typedef struct drm_mem_stats { @@ -42,7 +43,7 @@ typedef struct drm_mem_stats { unsigned long bytes_freed; } drm_mem_stats_t; -static DEFINE_SPINLOCK(drm_mem_lock); +static spinlock_t drm_mem_lock = SPIN_LOCK_UNLOCKED; static unsigned long drm_ram_available = 0; /* In pages */ static unsigned long drm_ram_used = 0; static drm_mem_stats_t drm_mem_stats[] = diff --git a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c index 06ef7ddbe..ce81bf248 100644 --- a/drivers/char/drm/drm_scatter.c +++ b/drivers/char/drm/drm_scatter.c @@ -31,6 +31,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include #include #include "drmP.h" diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c index 51ad98c68..0b9f98a7e 100644 --- a/drivers/char/drm/drm_sysfs.c +++ b/drivers/char/drm/drm_sysfs.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include diff --git a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c index dd45111a4..c13f9abb4 100644 --- a/drivers/char/drm/ffb_drv.c +++ b/drivers/char/drm/ffb_drv.c @@ -4,6 +4,7 @@ * Copyright (C) 2000 David S. Miller (davem@redhat.com) */ +#include #include "ffb.h" #include "drmP.h" diff --git a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c index fabb9a817..dfe6ad2b6 100644 --- a/drivers/char/drm/i810_drv.c +++ b/drivers/char/drm/i810_drv.c @@ -30,6 +30,7 @@ * Gareth Hughes */ +#include #include "drmP.h" #include "drm.h" #include "i810_drm.h" diff --git a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c index 389597e4a..722658188 100644 --- a/drivers/char/drm/i830_drv.c +++ b/drivers/char/drm/i830_drv.c @@ -32,6 +32,7 @@ * Keith Whitwell */ +#include #include "drmP.h" #include "drm.h" #include "i830_drm.h" diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index a94233bdb..9f4b8ce4c 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c @@ -758,9 +758,7 @@ drm_ioctl_desc_t i915_ioctls[] = { [DRM_IOCTL_NR(DRM_I915_FREE)] = {i915_mem_free, DRM_AUTH}, [DRM_IOCTL_NR(DRM_I915_INIT_HEAP)] = {i915_mem_init_heap, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY}, [DRM_IOCTL_NR(DRM_I915_CMDBUFFER)] = {i915_cmdbuffer, DRM_AUTH}, - [DRM_IOCTL_NR(DRM_I915_DESTROY_HEAP)] = { i915_mem_destroy_heap, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY }, - [DRM_IOCTL_NR(DRM_I915_SET_VBLANK_PIPE)] = { i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY }, - [DRM_IOCTL_NR(DRM_I915_GET_VBLANK_PIPE)] = { i915_vblank_pipe_get, DRM_AUTH }, + [DRM_IOCTL_NR(DRM_I915_DESTROY_HEAP)] = { i915_mem_destroy_heap, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY } }; int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); diff --git a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h index 5aa3e0e3b..4cb3da578 100644 --- a/drivers/char/drm/i915_drm.h +++ b/drivers/char/drm/i915_drm.h @@ -124,8 +124,6 @@ typedef struct _drm_i915_sarea { #define DRM_I915_INIT_HEAP 0x0a #define DRM_I915_CMDBUFFER 0x0b #define DRM_I915_DESTROY_HEAP 0x0c -#define DRM_I915_SET_VBLANK_PIPE 0x0d -#define DRM_I915_GET_VBLANK_PIPE 0x0e #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) @@ -140,8 +138,6 @@ typedef struct _drm_i915_sarea { #define DRM_IOCTL_I915_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t) #define DRM_IOCTL_I915_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t) #define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t) -#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) -#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) /* Allow drivers to submit batchbuffers directly to hardware, relying * on the security mechanisms provided by hardware. @@ -228,13 +224,4 @@ typedef struct drm_i915_mem_destroy_heap { int region; } drm_i915_mem_destroy_heap_t; -/* Allow X server to configure which pipes to monitor for vblank signals - */ -#define DRM_I915_VBLANK_PIPE_A 1 -#define DRM_I915_VBLANK_PIPE_B 2 - -typedef struct drm_i915_vblank_pipe { - int pipe; -} drm_i915_vblank_pipe_t; - #endif /* _I915_DRM_H_ */ diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 2d565031c..7a6566689 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h @@ -45,10 +45,9 @@ * 1.2: Add Power Management * 1.3: Add vblank support * 1.4: Fix cmdbuffer path, add heap destroy - * 1.5: Add vblank pipe configuration */ #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 5 +#define DRIVER_MINOR 4 #define DRIVER_PATCHLEVEL 0 typedef struct _drm_i915_ring_buffer { @@ -97,7 +96,6 @@ typedef struct drm_i915_private { int allow_batchbuffer; struct mem_block *agp_heap; unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; - int vblank_pipe; } drm_i915_private_t; extern drm_ioctl_desc_t i915_ioctls[]; @@ -121,8 +119,6 @@ extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); extern void i915_driver_irq_preinstall(drm_device_t * dev); extern void i915_driver_irq_postinstall(drm_device_t * dev); extern void i915_driver_irq_uninstall(drm_device_t * dev); -extern int i915_vblank_pipe_set(DRM_IOCTL_ARGS); -extern int i915_vblank_pipe_get(DRM_IOCTL_ARGS); /* i915_mem.c */ extern int i915_mem_alloc(DRM_IOCTL_ARGS); diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index cd96cfa43..a752afd86 100644 --- a/drivers/char/drm/i915_irq.c +++ b/drivers/char/drm/i915_irq.c @@ -44,8 +44,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) u16 temp; temp = I915_READ16(I915REG_INT_IDENTITY_R); - - temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG); + temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG); DRM_DEBUG("%s flag=%08x\n", __FUNCTION__, temp); @@ -59,7 +58,7 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) if (temp & USER_INT_FLAG) DRM_WAKEUP(&dev_priv->irq_queue); - if (temp & (VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG)) { + if (temp & VSYNC_PIPEA_FLAG) { atomic_inc(&dev->vbl_received); DRM_WAKEUP(&dev->vbl_queue); drm_vbl_send_signals(dev); @@ -183,68 +182,6 @@ int i915_irq_wait(DRM_IOCTL_ARGS) return i915_wait_irq(dev, irqwait.irq_seq); } -static int i915_enable_interrupt (drm_device_t *dev) -{ - drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - u16 flag; - - flag = 0; - if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_A) - flag |= VSYNC_PIPEA_FLAG; - if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_B) - flag |= VSYNC_PIPEB_FLAG; - if (dev_priv->vblank_pipe & ~(DRM_I915_VBLANK_PIPE_A|DRM_I915_VBLANK_PIPE_B)) { - DRM_ERROR("%s called with invalid pipe 0x%x\n", - __FUNCTION__, dev_priv->vblank_pipe); - return DRM_ERR(EINVAL); - } - I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | flag); - return 0; -} - -/* Set the vblank monitor pipe - */ -int i915_vblank_pipe_set(DRM_IOCTL_ARGS) -{ - DRM_DEVICE; - drm_i915_private_t *dev_priv = dev->dev_private; - drm_i915_vblank_pipe_t pipe; - - if (!dev_priv) { - DRM_ERROR("%s called with no initialization\n", __FUNCTION__); - return DRM_ERR(EINVAL); - } - - DRM_COPY_FROM_USER_IOCTL(pipe, (drm_i915_vblank_pipe_t __user *) data, - sizeof(pipe)); - - dev_priv->vblank_pipe = pipe.pipe; - return i915_enable_interrupt (dev); -} - -int i915_vblank_pipe_get(DRM_IOCTL_ARGS) -{ - DRM_DEVICE; - drm_i915_private_t *dev_priv = dev->dev_private; - drm_i915_vblank_pipe_t pipe; - u16 flag; - - if (!dev_priv) { - DRM_ERROR("%s called with no initialization\n", __FUNCTION__); - return DRM_ERR(EINVAL); - } - - flag = I915_READ(I915REG_INT_ENABLE_R); - pipe.pipe = 0; - if (flag & VSYNC_PIPEA_FLAG) - pipe.pipe |= DRM_I915_VBLANK_PIPE_A; - if (flag & VSYNC_PIPEB_FLAG) - pipe.pipe |= DRM_I915_VBLANK_PIPE_B; - DRM_COPY_TO_USER_IOCTL((drm_i915_vblank_pipe_t __user *) data, pipe, - sizeof(pipe)); - return 0; -} - /* drm_dma.h hooks */ void i915_driver_irq_preinstall(drm_device_t * dev) @@ -260,7 +197,7 @@ void i915_driver_irq_postinstall(drm_device_t * dev) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - i915_enable_interrupt(dev); + I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | VSYNC_PIPEA_FLAG); DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); } diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c index e30f556b7..9f7ed0e03 100644 --- a/drivers/char/drm/mga_drv.c +++ b/drivers/char/drm/mga_drv.c @@ -29,6 +29,7 @@ * Gareth Hughes */ +#include #include "drmP.h" #include "drm.h" #include "mga_drm.h" diff --git a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c index 6108e7587..e20450ae2 100644 --- a/drivers/char/drm/r128_drv.c +++ b/drivers/char/drm/r128_drv.c @@ -29,6 +29,7 @@ * Gareth Hughes */ +#include #include "drmP.h" #include "drm.h" #include "r128_drm.h" diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 5ad43ba7b..7f949c9c9 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -39,7 +39,7 @@ static int radeon_do_cleanup_cp(drm_device_t * dev); /* CP microcode (from ATI) */ -static const u32 R200_cp_microcode[][2] = { +static u32 R200_cp_microcode[][2] = { {0x21007000, 0000000000}, {0x20007000, 0000000000}, {0x000000ab, 0x00000004}, @@ -298,7 +298,7 @@ static const u32 R200_cp_microcode[][2] = { {0000000000, 0000000000}, }; -static const u32 radeon_cp_microcode[][2] = { +static u32 radeon_cp_microcode[][2] = { {0x21007000, 0000000000}, {0x20007000, 0000000000}, {0x000000b4, 0x00000004}, @@ -557,7 +557,7 @@ static const u32 radeon_cp_microcode[][2] = { {0000000000, 0000000000}, }; -static const u32 R300_cp_microcode[][2] = { +static u32 R300_cp_microcode[][2] = { {0x4200e000, 0000000000}, {0x4000e000, 0000000000}, {0x000000af, 0x00000008}, diff --git a/drivers/char/drm/radeon_drm.h b/drivers/char/drm/radeon_drm.h index 8d6350dd5..c8e279e89 100644 --- a/drivers/char/drm/radeon_drm.h +++ b/drivers/char/drm/radeon_drm.h @@ -161,8 +161,7 @@ #define R200_EMIT_PP_TXCTLALL_3 91 #define R200_EMIT_PP_TXCTLALL_4 92 #define R200_EMIT_PP_TXCTLALL_5 93 -#define R200_EMIT_VAP_PVS_CNTL 94 -#define RADEON_MAX_STATE_PACKETS 95 +#define RADEON_MAX_STATE_PACKETS 94 /* Commands understood by cmd_buffer ioctl. More can be added but * obviously these can't be removed or changed: @@ -177,7 +176,6 @@ #define RADEON_CMD_WAIT 8 /* emit hw wait commands -- note: * doesn't make the cpu wait, just * the graphics hardware */ -#define RADEON_CMD_VECLINEAR 9 /* another r200 stopgap */ typedef union { int i; @@ -193,9 +191,6 @@ typedef union { struct { unsigned char cmd_type, offset, stride, count; } vectors; - struct { - unsigned char cmd_type, addr_lo, addr_hi, count; - } veclinear; struct { unsigned char cmd_type, buf_idx, pad0, pad1; } dma; diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c index eb985c2a3..b04ed1b56 100644 --- a/drivers/char/drm/radeon_drv.c +++ b/drivers/char/drm/radeon_drv.c @@ -29,6 +29,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include "drmP.h" #include "drm.h" #include "radeon_drm.h" diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h index e5a256f54..78345cee8 100644 --- a/drivers/char/drm/radeon_drv.h +++ b/drivers/char/drm/radeon_drv.h @@ -38,7 +38,7 @@ #define DRIVER_NAME "radeon" #define DRIVER_DESC "ATI Radeon" -#define DRIVER_DATE "20060524" +#define DRIVER_DATE "20060225" /* Interface history: * @@ -93,11 +93,9 @@ * 1.22- Add support for texture cache flushes (R300_TX_CNTL) * 1.23- Add new radeon memory map work from benh * 1.24- Add general-purpose packet for manipulating scratch registers (r300) - * 1.25- Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL, - * new packet type) */ #define DRIVER_MAJOR 1 -#define DRIVER_MINOR 25 +#define DRIVER_MINOR 24 #define DRIVER_PATCHLEVEL 0 /* @@ -886,8 +884,6 @@ extern int r300_do_cp_cmdbuf(drm_device_t * dev, DRMFILE filp, #define RADEON_PP_CUBIC_OFFSET_T1_0 0x1e00 #define RADEON_PP_CUBIC_OFFSET_T2_0 0x1e14 -#define RADEON_SE_TCL_STATE_FLUSH 0x2284 - #define SE_VAP_CNTL__TCL_ENA_MASK 0x00000001 #define SE_VAP_CNTL__FORCE_W_TO_ONE_MASK 0x00010000 #define SE_VAP_CNTL__VF_MAX_VTX_NUM__SHIFT 0x00000012 @@ -909,8 +905,6 @@ extern int r300_do_cp_cmdbuf(drm_device_t * dev, DRMFILE filp, #define R200_PP_AFS_0 0x2f80 #define R200_PP_AFS_1 0x2f00 /* same as txcblend_0 */ -#define R200_VAP_PVS_CNTL_1 0x22D0 - /* Constants */ #define RADEON_MAX_USEC_TIMEOUT 100000 /* 100 ms */ diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c index 39a7f685e..c5b8f774a 100644 --- a/drivers/char/drm/radeon_state.c +++ b/drivers/char/drm/radeon_state.c @@ -175,14 +175,6 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * } break; - case R200_EMIT_VAP_CTL:{ - RING_LOCALS; - BEGIN_RING(2); - OUT_RING_REG(RADEON_SE_TCL_STATE_FLUSH, 0); - ADVANCE_RING(); - } - break; - case RADEON_EMIT_RB3D_COLORPITCH: case RADEON_EMIT_RE_LINE_PATTERN: case RADEON_EMIT_SE_LINE_WIDTH: @@ -210,6 +202,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * case R200_EMIT_TCL_LIGHT_MODEL_CTL_0: case R200_EMIT_TFACTOR_0: case R200_EMIT_VTX_FMT_0: + case R200_EMIT_VAP_CTL: case R200_EMIT_MATRIX_SELECT_0: case R200_EMIT_TEX_PROC_CTL_2: case R200_EMIT_TCL_UCP_VERT_BLEND_CTL: @@ -256,7 +249,6 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t * case R200_EMIT_PP_TXCTLALL_3: case R200_EMIT_PP_TXCTLALL_4: case R200_EMIT_PP_TXCTLALL_5: - case R200_EMIT_VAP_PVS_CNTL: /* These packets don't contain memory offsets */ break; @@ -634,7 +626,6 @@ static struct { {R200_PP_TXFILTER_3, 8, "R200_PP_TXCTLALL_3"}, {R200_PP_TXFILTER_4, 8, "R200_PP_TXCTLALL_4"}, {R200_PP_TXFILTER_5, 8, "R200_PP_TXCTLALL_5"}, - {R200_VAP_PVS_CNTL_1, 2, "R200_VAP_PVS_CNTL"}, }; /* ================================================================ @@ -2604,8 +2595,7 @@ static __inline__ int radeon_emit_vectors(drm_radeon_private_t *dev_priv, int stride = header.vectors.stride; RING_LOCALS; - BEGIN_RING(5 + sz); - OUT_RING_REG(RADEON_SE_TCL_STATE_FLUSH, 0); + BEGIN_RING(3 + sz); OUT_RING(CP_PACKET0(RADEON_SE_TCL_VECTOR_INDX_REG, 0)); OUT_RING(start | (stride << RADEON_VEC_INDX_OCTWORD_STRIDE_SHIFT)); OUT_RING(CP_PACKET0_TABLE(RADEON_SE_TCL_VECTOR_DATA_REG, (sz - 1))); @@ -2617,32 +2607,6 @@ static __inline__ int radeon_emit_vectors(drm_radeon_private_t *dev_priv, return 0; } -static __inline__ int radeon_emit_veclinear(drm_radeon_private_t *dev_priv, - drm_radeon_cmd_header_t header, - drm_radeon_kcmd_buffer_t *cmdbuf) -{ - int sz = header.veclinear.count * 4; - int start = header.veclinear.addr_lo | (header.veclinear.addr_hi << 8); - RING_LOCALS; - - if (!sz) - return 0; - if (sz * 4 > cmdbuf->bufsz) - return DRM_ERR(EINVAL); - - BEGIN_RING(5 + sz); - OUT_RING_REG(RADEON_SE_TCL_STATE_FLUSH, 0); - OUT_RING(CP_PACKET0(RADEON_SE_TCL_VECTOR_INDX_REG, 0)); - OUT_RING(start | (1 << RADEON_VEC_INDX_OCTWORD_STRIDE_SHIFT)); - OUT_RING(CP_PACKET0_TABLE(RADEON_SE_TCL_VECTOR_DATA_REG, (sz - 1))); - OUT_RING_TABLE(cmdbuf->buf, sz); - ADVANCE_RING(); - - cmdbuf->buf += sz * sizeof(int); - cmdbuf->bufsz -= sz * sizeof(int); - return 0; -} - static int radeon_emit_packet3(drm_device_t * dev, drm_file_t * filp_priv, drm_radeon_kcmd_buffer_t *cmdbuf) @@ -2901,14 +2865,6 @@ static int radeon_cp_cmdbuf(DRM_IOCTL_ARGS) goto err; } break; - case RADEON_CMD_VECLINEAR: - DRM_DEBUG("RADEON_CMD_VECLINEAR\n"); - if (radeon_emit_veclinear(dev_priv, header, &cmdbuf)) { - DRM_ERROR("radeon_emit_veclinear failed\n"); - goto err; - } - break; - default: DRM_ERROR("bad cmd_type %d at %p\n", header.header.cmd_type, diff --git a/drivers/char/drm/savage_drv.c b/drivers/char/drm/savage_drv.c index eee52aa92..aa6c0d1a8 100644 --- a/drivers/char/drm/savage_drv.c +++ b/drivers/char/drm/savage_drv.c @@ -23,6 +23,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include #include "drmP.h" #include "savage_drm.h" #include "savage_drv.h" diff --git a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c index 5e9dc86f2..6f6d7d613 100644 --- a/drivers/char/drm/sis_drv.c +++ b/drivers/char/drm/sis_drv.c @@ -25,6 +25,7 @@ * */ +#include #include "drmP.h" #include "sis_drm.h" #include "sis_drv.h" diff --git a/drivers/char/drm/tdfx_drv.c b/drivers/char/drm/tdfx_drv.c index 012ff2e35..baa441603 100644 --- a/drivers/char/drm/tdfx_drv.c +++ b/drivers/char/drm/tdfx_drv.c @@ -30,6 +30,7 @@ * Gareth Hughes */ +#include #include "drmP.h" #include "tdfx_drv.h" diff --git a/drivers/char/drm/via_dmablit.c b/drivers/char/drm/via_dmablit.c index 78a81a4a9..b7f17457b 100644 --- a/drivers/char/drm/via_dmablit.c +++ b/drivers/char/drm/via_dmablit.c @@ -557,7 +557,7 @@ via_init_dmablit(drm_device_t *dev) blitq->num_outstanding = 0; blitq->is_active = 0; blitq->aborting = 0; - spin_lock_init(&blitq->blit_lock); + blitq->blit_lock = SPIN_LOCK_UNLOCKED; for (j=0; jblit_queue + j); } diff --git a/drivers/char/drm/via_drv.c b/drivers/char/drm/via_drv.c index b3d364d79..3f012255d 100644 --- a/drivers/char/drm/via_drv.c +++ b/drivers/char/drm/via_drv.c @@ -22,6 +22,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include #include "drmP.h" #include "via_drm.h" #include "via_drv.h" diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c index 21c8229f5..d755cac14 100644 --- a/drivers/char/ds1286.c +++ b/drivers/char/ds1286.c @@ -281,7 +281,7 @@ static unsigned int ds1286_poll(struct file *file, poll_table *wait) * The various file operations we support. */ -static const struct file_operations ds1286_fops = { +static struct file_operations ds1286_fops = { .llseek = no_llseek, .read = ds1286_read, .poll = ds1286_poll, diff --git a/drivers/char/ds1302.c b/drivers/char/ds1302.c index bcdb107aa..a75e8609b 100644 --- a/drivers/char/ds1302.c +++ b/drivers/char/ds1302.c @@ -12,6 +12,7 @@ *! *!***************************************************************************/ +#include #include #include @@ -282,7 +283,7 @@ get_rtc_status(char *buf) /* The various file operations we support. */ -static const struct file_operations rtc_fops = { +static struct file_operations rtc_fops = { .owner = THIS_MODULE, .ioctl = rtc_ioctl, }; diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 48cb8f0e8..62cda2572 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c @@ -2,6 +2,7 @@ * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620 * thermometer driver (as used in the Rebel.com NetWinder) */ +#include #include #include #include @@ -336,7 +337,7 @@ proc_therm_ds1620_read(char *buf, char **start, off_t offset, static struct proc_dir_entry *proc_therm_ds1620; #endif -static const struct file_operations ds1620_fops = { +static struct file_operations ds1620_fops = { .owner = THIS_MODULE, .open = nonseekable_open, .read = ds1620_read, diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index 9b1bf60ff..e233cf280 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -483,7 +484,7 @@ static int dsp56k_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations dsp56k_fops = { +static struct file_operations dsp56k_fops = { .owner = THIS_MODULE, .read = dsp56k_read, .write = dsp56k_write, @@ -517,9 +518,17 @@ static int __init dsp56k_init_driver(void) } class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); + err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), + S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); + if(err) + goto out_class; + printk(banner); goto out; +out_class: + class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); + class_destroy(dsp56k_class); out_chrdev: unregister_chrdev(DSP56K_MAJOR, "dsp56k"); out: @@ -532,6 +541,7 @@ static void __exit dsp56k_cleanup_driver(void) class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); class_destroy(dsp56k_class); unregister_chrdev(DSP56K_MAJOR, "dsp56k"); + devfs_remove("dsp56k"); } module_exit(dsp56k_cleanup_driver); diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index 5e82c3bad..87dcaa237 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c @@ -62,6 +62,7 @@ #include /* for __init, module_{init,exit} */ #include /* for POLLIN, etc. */ #include /* local header file for DoubleTalk values */ +#include #include #ifdef TRACING @@ -94,7 +95,7 @@ static int dtlk_release(struct inode *, struct file *); static int dtlk_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); -static const struct file_operations dtlk_fops = +static struct file_operations dtlk_fops = { .owner = THIS_MODULE, .read = dtlk_read, @@ -336,6 +337,9 @@ static int __init dtlk_init(void) if (dtlk_dev_probe() == 0) printk(", MAJOR %d\n", dtlk_major); + devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR), + S_IFCHR | S_IRUSR | S_IWUSR, "dtlk"); + init_timer(&dtlk_timer); dtlk_timer.function = dtlk_timer_tick; init_waitqueue_head(&dtlk_process_list); @@ -353,6 +357,7 @@ static void __exit dtlk_cleanup (void) dtlk_write_tts(DTLK_CLEAR); unregister_chrdev(dtlk_major, "dtlk"); + devfs_remove("dtlk"); release_region(dtlk_port_lpc, DTLK_IO_EXTENT); } diff --git a/drivers/char/ec3104_keyb.c b/drivers/char/ec3104_keyb.c index abac18b18..4aed66968 100644 --- a/drivers/char/ec3104_keyb.c +++ b/drivers/char/ec3104_keyb.c @@ -26,6 +26,7 @@ * (prumpf@tux.org). */ +#include #include #include diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c index 004141d53..0090e7a4f 100644 --- a/drivers/char/efirtc.c +++ b/drivers/char/efirtc.c @@ -285,7 +285,7 @@ efi_rtc_close(struct inode *inode, struct file *file) * The various file operations we support. */ -static const struct file_operations efi_rtc_fops = { +static struct file_operations efi_rtc_fops = { .owner = THIS_MODULE, .ioctl = efi_rtc_ioctl, .open = efi_rtc_open, diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 86d290e9f..9cad8501d 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c @@ -30,6 +30,7 @@ /* See README.epca for change history --DAT*/ +#include #include #include #include @@ -79,7 +80,7 @@ static int invalid_lilo_config; /* The ISA boards do window flipping into the same spaces so its only sane with a single lock. It's still pretty efficient */ -static DEFINE_SPINLOCK(epca_lock); +static spinlock_t epca_lock = SPIN_LOCK_UNLOCKED; /* ----------------------------------------------------------------------- MAXBOARDS is typically 12, but ISA and EISA cards are restricted to @@ -1231,6 +1232,7 @@ static int __init pc_init(void) pc_driver->owner = THIS_MODULE; pc_driver->name = "ttyD"; + pc_driver->devfs_name = "tts/D"; pc_driver->major = DIGI_MAJOR; pc_driver->minor_start = 0; pc_driver->type = TTY_DRIVER_TYPE_SERIAL; diff --git a/drivers/char/esp.c b/drivers/char/esp.c index afcd83d99..09dc4b012 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c @@ -883,7 +883,7 @@ static int startup(struct esp_struct * info) * Allocate the IRQ */ - retval = request_irq(info->irq, rs_interrupt_single, IRQF_SHARED, + retval = request_irq(info->irq, rs_interrupt_single, SA_SHIRQ, "esp serial", info); if (retval) { @@ -1212,7 +1212,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch) if (serial_paranoia_check(info, tty->name, "rs_put_char")) return; - if (!info->xmit_buf) + if (!tty || !info->xmit_buf) return; spin_lock_irqsave(&info->lock, flags); @@ -1256,7 +1256,7 @@ static int rs_write(struct tty_struct * tty, if (serial_paranoia_check(info, tty->name, "rs_write")) return 0; - if (!info->xmit_buf) + if (!tty || !info->xmit_buf) return 0; while (1) { @@ -2449,6 +2449,7 @@ static int __init espserial_init(void) esp_driver->owner = THIS_MODULE; esp_driver->name = "ttyP"; + esp_driver->devfs_name = "tts/P"; esp_driver->major = ESP_IN_MAJOR; esp_driver->minor_start = 0; esp_driver->type = TTY_DRIVER_TYPE_SERIAL; diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c index 216532445..093fdf98b 100644 --- a/drivers/char/ftape/lowlevel/fdc-io.c +++ b/drivers/char/ftape/lowlevel/fdc-io.c @@ -26,6 +26,7 @@ * Linux. */ +#include /* for CONFIG_FT_* */ #include #include #include @@ -1267,7 +1268,7 @@ static int fdc_grab_irq_and_dma(void) /* Get fast interrupt handler. */ if (request_irq(fdc.irq, ftape_interrupt, - IRQF_DISABLED, "ft", ftape_id)) { + SA_INTERRUPT, "ft", ftape_id)) { TRACE_ABORT(-EIO, ft_t_bug, "Unable to grab IRQ%d for ftape driver", fdc.irq); diff --git a/drivers/char/ftape/lowlevel/ftape-calibr.c b/drivers/char/ftape/lowlevel/ftape-calibr.c index 8e50bfd35..956b2586e 100644 --- a/drivers/char/ftape/lowlevel/ftape-calibr.c +++ b/drivers/char/ftape/lowlevel/ftape-calibr.c @@ -24,6 +24,7 @@ * functions. */ +#include #include #include #include diff --git a/drivers/char/ftape/lowlevel/ftape-ctl.c b/drivers/char/ftape/lowlevel/ftape-ctl.c index 5d7c1ce92..32e043911 100644 --- a/drivers/char/ftape/lowlevel/ftape-ctl.c +++ b/drivers/char/ftape/lowlevel/ftape-ctl.c @@ -25,6 +25,7 @@ * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. */ +#include #include #include #include diff --git a/drivers/char/ftape/lowlevel/ftape-init.c b/drivers/char/ftape/lowlevel/ftape-init.c index 4998132a8..b54260d45 100644 --- a/drivers/char/ftape/lowlevel/ftape-init.c +++ b/drivers/char/ftape/lowlevel/ftape-init.c @@ -21,6 +21,7 @@ * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. */ +#include #include #include #include diff --git a/drivers/char/ftape/lowlevel/ftape-proc.c b/drivers/char/ftape/lowlevel/ftape-proc.c index e805b15e0..c66251e99 100644 --- a/drivers/char/ftape/lowlevel/ftape-proc.c +++ b/drivers/char/ftape/lowlevel/ftape-proc.c @@ -26,6 +26,7 @@ * Old code removed, switched to dynamic proc entry. */ +#include #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) diff --git a/drivers/char/ftape/lowlevel/ftape-setup.c b/drivers/char/ftape/lowlevel/ftape-setup.c index 678340acd..280a1a55d 100644 --- a/drivers/char/ftape/lowlevel/ftape-setup.c +++ b/drivers/char/ftape/lowlevel/ftape-setup.c @@ -25,6 +25,7 @@ * "ftape" for Linux. */ +#include #include #include #include diff --git a/drivers/char/ftape/lowlevel/ftape-tracing.h b/drivers/char/ftape/lowlevel/ftape-tracing.h index 2950810c7..fa7cd20ee 100644 --- a/drivers/char/ftape/lowlevel/ftape-tracing.h +++ b/drivers/char/ftape/lowlevel/ftape-tracing.h @@ -28,6 +28,7 @@ * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. */ +#include #include /* diff --git a/drivers/char/ftape/lowlevel/ftape_syms.c b/drivers/char/ftape/lowlevel/ftape_syms.c index 8e0dc4a07..5dc3a380c 100644 --- a/drivers/char/ftape/lowlevel/ftape_syms.c +++ b/drivers/char/ftape/lowlevel/ftape_syms.c @@ -25,6 +25,7 @@ * exports to its high level clients */ +#include #include #include diff --git a/drivers/char/ftape/zftape/zftape-ctl.c b/drivers/char/ftape/zftape/zftape-ctl.c index 22ba0f5d0..6c7874e5c 100644 --- a/drivers/char/ftape/zftape/zftape-ctl.c +++ b/drivers/char/ftape/zftape/zftape-ctl.c @@ -24,6 +24,7 @@ * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. */ +#include #include #include #include diff --git a/drivers/char/ftape/zftape/zftape-ctl.h b/drivers/char/ftape/zftape/zftape-ctl.h index 8e6f2d7ac..414159891 100644 --- a/drivers/char/ftape/zftape/zftape-ctl.h +++ b/drivers/char/ftape/zftape/zftape-ctl.h @@ -27,6 +27,7 @@ * for the QIC-40/80 floppy-tape driver for Linux. */ +#include #include #include diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c index 164a1aa77..821357ce7 100644 --- a/drivers/char/ftape/zftape/zftape-init.c +++ b/drivers/char/ftape/zftape/zftape-init.c @@ -20,6 +20,7 @@ * to the ftape floppy tape driver for Linux */ +#include #include #include #include @@ -32,6 +33,7 @@ #endif #include #include +#include #include #include @@ -86,7 +88,7 @@ static ssize_t zft_read (struct file *fp, char __user *buff, static ssize_t zft_write(struct file *fp, const char __user *buff, size_t req_len, loff_t *ppos); -static const struct file_operations zft_cdev = +static struct file_operations zft_cdev = { .owner = THIS_MODULE, .read = zft_read, @@ -330,11 +332,29 @@ KERN_INFO zft_class = class_create(THIS_MODULE, "zft"); for (i = 0; i < 4; i++) { class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), + S_IFCHR | S_IRUSR | S_IWUSR, + "qft%i", i); class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), + S_IFCHR | S_IRUSR | S_IWUSR, + "nqft%i", i); class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), + S_IFCHR | S_IRUSR | S_IWUSR, + "zqft%i", i); class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), + S_IFCHR | S_IRUSR | S_IWUSR, + "nzqft%i", i); class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), + S_IFCHR | S_IRUSR | S_IWUSR, + "rawqft%i", i); class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); + devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), + S_IFCHR | S_IRUSR | S_IWUSR, + "nrawqft%i", i); } #ifdef CONFIG_ZFT_COMPRESSOR @@ -360,11 +380,17 @@ static void zft_exit(void) TRACE(ft_t_info, "successful"); } for (i = 0; i < 4; i++) { + devfs_remove("qft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); + devfs_remove("nqft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); + devfs_remove("zqft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); + devfs_remove("nzqft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); + devfs_remove("rawqft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); + devfs_remove("nrawqft%i", i); class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); } class_destroy(zft_class); diff --git a/drivers/char/ftape/zftape/zftape-rw.c b/drivers/char/ftape/zftape/zftape-rw.c index dab634686..a61ef50f3 100644 --- a/drivers/char/ftape/zftape/zftape-rw.c +++ b/drivers/char/ftape/zftape/zftape-rw.c @@ -24,6 +24,7 @@ * zftape. */ +#include /* for CONFIG_ZFT_DFLT_BLK_SZ */ #include #include diff --git a/drivers/char/ftape/zftape/zftape-rw.h b/drivers/char/ftape/zftape/zftape-rw.h index 1ceec22b6..14c07f086 100644 --- a/drivers/char/ftape/zftape/zftape-rw.h +++ b/drivers/char/ftape/zftape/zftape-rw.h @@ -28,6 +28,7 @@ * */ +#include /* for CONFIG_ZFT_DFLT_BLK_SZ */ #include "../zftape/zftape-buffers.h" #define SEGMENTS_PER_TAPE (ft_segments_per_track * ft_tracks_per_tape) diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c index 817dc409a..588fca542 100644 --- a/drivers/char/genrtc.c +++ b/drivers/char/genrtc.c @@ -43,6 +43,7 @@ #define RTC_VERSION "1.07" #include +#include #include #include #include @@ -482,7 +483,7 @@ static inline int gen_rtc_proc_init(void) { return 0; } * The various file operations we support. */ -static const struct file_operations gen_rtc_fops = { +static struct file_operations gen_rtc_fops = { .owner = THIS_MODULE, #ifdef CONFIG_GEN_RTC_X .read = gen_rtc_read, diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index 99b13b262..82e5a6d13 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c @@ -117,12 +117,12 @@ __setup("hcheck_reboot", hangcheck_parse_reboot); __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks); #endif /* not MODULE */ -#if defined(CONFIG_X86_64) || defined(CONFIG_S390) || defined(CONFIG_X86_XEN) +#if defined(CONFIG_X86) || defined(CONFIG_S390) # define HAVE_MONOTONIC # define TIMER_FREQ 1000000000ULL #elif defined(CONFIG_IA64) # define TIMER_FREQ ((unsigned long long)local_cpu_data->itc_freq) -#else +#elif defined(CONFIG_PPC64) # define TIMER_FREQ (HZ*loops_per_jiffy) #endif diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 8afba339f..ef140ebde 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -395,7 +396,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); irq_flags = devp->hd_flags & HPET_SHARED_IRQ - ? IRQF_SHARED : IRQF_DISABLED; + ? SA_SHIRQ : SA_INTERRUPT; if (request_irq(irq, hpet_interrupt, irq_flags, devp->hd_name, (void *)devp)) { printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); @@ -553,7 +554,7 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel) return err; } -static const struct file_operations hpet_fops = { +static struct file_operations hpet_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = hpet_read, @@ -924,8 +925,11 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) status = acpi_resource_to_address64(res, &addr); if (ACPI_SUCCESS(status)) { + unsigned long size; + + size = addr.maximum - addr.minimum + 1; hdp->hd_phys_address = addr.minimum; - hdp->hd_address = ioremap(addr.minimum, addr.address_length); + hdp->hd_address = ioremap(addr.minimum, size); if (hpet_is_known(hdp)) { printk(KERN_DEBUG "%s: 0x%lx is busy\n", diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 613d67f1c..2b6a56b2b 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -22,6 +22,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -346,7 +347,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) spin_unlock_irqrestore(&hp->lock, flags); /* check error, fallback to non-irq */ if (irq != NO_IRQ) - rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED, "hvc_console", hp); + rc = request_irq(irq, hvc_handle_interrupt, SA_INTERRUPT, "hvc_console", hp); /* * If the request_irq() fails and we return an error. The tty layer @@ -552,6 +553,7 @@ static int hvc_chars_in_buffer(struct tty_struct *tty) #define HVC_POLL_READ 0x00000001 #define HVC_POLL_WRITE 0x00000002 +#define HVC_POLL_QUICK 0x00000004 static int hvc_poll(struct hvc_struct *hp) { @@ -566,7 +568,6 @@ static int hvc_poll(struct hvc_struct *hp) /* Push pending writes */ if (hp->n_outbuf > 0) hvc_push(hp); - /* Reschedule us if still some write pending */ if (hp->n_outbuf > 0) poll_mask |= HVC_POLL_WRITE; @@ -668,7 +669,6 @@ int khvcd(void *unused) do { poll_mask = 0; hvc_kicked = 0; - try_to_freeze(); wmb(); if (cpus_empty(cpus_in_xmon)) { spin_lock(&hvc_structs_lock); @@ -680,7 +680,7 @@ int khvcd(void *unused) poll_mask |= HVC_POLL_READ; if (hvc_kicked) continue; - if (poll_mask & HVC_POLL_WRITE) { + if (poll_mask & HVC_POLL_QUICK) { yield(); continue; } @@ -820,6 +820,7 @@ int __init hvc_init(void) return -ENOMEM; drv->owner = THIS_MODULE; + drv->devfs_name = "hvc/"; drv->driver_name = "hvc"; drv->name = "hvc"; drv->major = HVC_MAJOR; diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c index 57106e02f..83364ea63 100644 --- a/drivers/char/hvc_rtas.c +++ b/drivers/char/hvc_rtas.c @@ -41,28 +41,37 @@ #define hvc_rtas_cookie 0x67781e15 struct hvc_struct *hvc_rtas_dev; +#define RTASCONS_PUT_ATTEMPTS 16 + static int rtascons_put_char_token = RTAS_UNKNOWN_SERVICE; static int rtascons_get_char_token = RTAS_UNKNOWN_SERVICE; +static int rtascons_put_delay = 100; +module_param_named(put_delay, rtascons_put_delay, int, 0644); -static inline int hvc_rtas_write_console(uint32_t vtermno, const char *buf, - int count) +static inline int hvc_rtas_write_console(uint32_t vtermno, const char *buf, int count) { - int i; + int done; - for (i = 0; i < count; i++) { - if (rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[i])) + /* if there is more than one character to be displayed, wait a bit */ + for (done = 0; done < count; done++) { + int result; + result = rtas_call(rtascons_put_char_token, 1, 1, NULL, buf[done]); + if (result) break; } - - return i; + /* the calling routine expects to receive the number of bytes sent */ + return done; } static int hvc_rtas_read_console(uint32_t vtermno, char *buf, int count) { - int i, c; + int i; for (i = 0; i < count; i++) { - if (rtas_call(rtascons_get_char_token, 0, 2, &c)) + int c, err; + + err = rtas_call(rtascons_get_char_token, 0, 2, &c); + if (err) break; buf[i] = c; @@ -97,9 +106,7 @@ static int hvc_rtas_init(void) hp = hvc_alloc(hvc_rtas_cookie, NO_IRQ, &hvc_rtas_get_put_ops); if (IS_ERR(hp)) return PTR_ERR(hp); - hvc_rtas_dev = hp; - return 0; } module_init(hvc_rtas_init); @@ -107,8 +114,8 @@ module_init(hvc_rtas_init); /* This will tear down the tty portion of the driver */ static void __exit hvc_rtas_exit(void) { - /* Really the fun isn't over until the worker thread breaks down and - * the tty cleans up */ + /* Really the fun isn't over until the worker thread breaks down and the + * tty cleans up */ if (hvc_rtas_dev) hvc_remove(hvc_rtas_dev); } @@ -120,14 +127,12 @@ static int hvc_rtas_console_init(void) rtascons_put_char_token = rtas_token("put-term-char"); if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE) return -EIO; - rtascons_get_char_token = rtas_token("get-term-char"); if (rtascons_get_char_token == RTAS_UNKNOWN_SERVICE) return -EIO; - hvc_instantiate(hvc_rtas_cookie, 0, &hvc_rtas_get_put_ops); + hvc_instantiate(hvc_rtas_cookie, 0, &hvc_rtas_get_put_ops ); add_preferred_console("hvc", 0, NULL); - return 0; } console_initcall(hvc_rtas_console_init); diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 4589ff302..8d97b3911 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c @@ -899,7 +899,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address, * the conn was registered and now. */ if (!(rc = request_irq(irq, &hvcs_handle_interrupt, - IRQF_DISABLED, "ibmhvcs", hvcsd))) { + SA_INTERRUPT, "ibmhvcs", hvcsd))) { /* * It is possible the vty-server was removed after the irq was * requested but before we have time to enable interrupts. @@ -1320,12 +1320,11 @@ static struct tty_operations hvcs_ops = { static int hvcs_alloc_index_list(int n) { int i; - hvcs_index_list = kmalloc(n * sizeof(hvcs_index_count),GFP_KERNEL); if (!hvcs_index_list) return -ENOMEM; hvcs_index_count = n; - for (i = 0; i < hvcs_index_count; i++) + for(i = 0; i < hvcs_index_count; i++) hvcs_index_list[i] = -1; return 0; } @@ -1333,9 +1332,11 @@ static int hvcs_alloc_index_list(int n) static void hvcs_free_index_list(void) { /* Paranoia check to be thorough. */ - kfree(hvcs_index_list); - hvcs_index_list = NULL; - hvcs_index_count = 0; + if (hvcs_index_list) { + kfree(hvcs_index_list); + hvcs_index_list = NULL; + hvcs_index_count = 0; + } } static int __init hvcs_module_init(void) @@ -1363,6 +1364,7 @@ static int __init hvcs_module_init(void) hvcs_tty_driver->driver_name = hvcs_driver_name; hvcs_tty_driver->name = hvcs_device_node; + hvcs_tty_driver->devfs_name = hvcs_device_node; /* * We'll let the system assign us a major number, indicated by leaving diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 017f75563..a9522189f 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c @@ -311,8 +311,7 @@ static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet, /* CD went away; no more connection */ pr_debug("hvsi%i: CD dropped\n", hp->index); hp->mctrl &= TIOCM_CD; - /* If userland hasn't done an open(2) yet, hp->tty is NULL. */ - if (hp->tty && !(hp->tty->flags & CLOCAL)) + if (!(hp->tty->flags & CLOCAL)) *to_hangup = hp->tty; } break; @@ -987,7 +986,10 @@ static void hvsi_write_worker(void *arg) start_j = 0; #endif /* DEBUG */ wake_up_all(&hp->emptyq); - tty_wakeup(hp->tty); + if (test_bit(TTY_DO_WRITE_WAKEUP, &hp->tty->flags) + && hp->tty->ldisc.write_wakeup) + hp->tty->ldisc.write_wakeup(hp->tty); + wake_up_interruptible(&hp->tty->write_wait); } out: @@ -1152,6 +1154,7 @@ static int __init hvsi_init(void) return -ENOMEM; hvsi_driver->owner = THIS_MODULE; + hvsi_driver->devfs_name = "hvsi/"; hvsi_driver->driver_name = "hvsi"; hvsi_driver->name = "hvsi"; hvsi_driver->major = HVSI_MAJOR; @@ -1166,7 +1169,7 @@ static int __init hvsi_init(void) struct hvsi_struct *hp = &hvsi_ports[i]; int ret = 1; - ret = request_irq(hp->virq, hvsi_interrupt, IRQF_DISABLED, "hvsi", hp); + ret = request_irq(hp->virq, hvsi_interrupt, SA_INTERRUPT, "hvsi", hp); if (ret) printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n", hp->virq, ret); @@ -1176,7 +1179,7 @@ static int __init hvsi_init(void) if (tty_register_driver(hvsi_driver)) panic("Couldn't register hvsi console driver\n"); - printk(KERN_DEBUG "HVSI: registered %i devices\n", hvsi_count); + printk(KERN_INFO "HVSI: registered %i devices\n", hvsi_count); return 0; } @@ -1297,12 +1300,13 @@ static int __init hvsi_console_init(void) hp->inbuf_end = hp->inbuf; hp->state = HVSI_CLOSED; hp->vtermno = *vtermno; - hp->virq = irq_create_mapping(NULL, irq[0]); + hp->virq = virt_irq_create_mapping(irq[0]); if (hp->virq == NO_IRQ) { printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", - __FUNCTION__, irq[0]); + __FUNCTION__, hp->virq); continue; - } + } else + hp->virq = irq_offset_up(hp->virq); hvsi_count++; } diff --git a/drivers/char/hw_random.c b/drivers/char/hw_random.c new file mode 100644 index 000000000..29dc87e59 --- /dev/null +++ b/drivers/char/hw_random.c @@ -0,0 +1,698 @@ +/* + Added support for the AMD Geode LX RNG + (c) Copyright 2004-2005 Advanced Micro Devices, Inc. + + derived from + + Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) + (c) Copyright 2003 Red Hat Inc + + derived from + + Hardware driver for the AMD 768 Random Number Generator (RNG) + (c) Copyright 2001 Red Hat Inc + + derived from + + Hardware driver for Intel i810 Random Number Generator (RNG) + Copyright 2000,2001 Jeff Garzik + Copyright 2000,2001 Philipp Rumpf + + Please read Documentation/hw_random.txt for details on use. + + ---------------------------------------------------------- + This software may be used and distributed according to the terms + of the GNU General Public License, incorporated herein by reference. + + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __i386__ +#include +#include +#endif + +#include +#include + + +/* + * core module and version information + */ +#define RNG_VERSION "1.0.0" +#define RNG_MODULE_NAME "hw_random" +#define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION +#define PFX RNG_MODULE_NAME ": " + + +/* + * debugging macros + */ + +/* pr_debug() collapses to a no-op if DEBUG is not defined */ +#define DPRINTK(fmt, args...) pr_debug(PFX "%s: " fmt, __FUNCTION__ , ## args) + + +#undef RNG_NDEBUG /* define to enable lightweight runtime checks */ +#ifdef RNG_NDEBUG +#define assert(expr) \ + if(!(expr)) { \ + printk(KERN_DEBUG PFX "Assertion failed! %s,%s,%s," \ + "line=%d\n", #expr, __FILE__, __FUNCTION__, __LINE__); \ + } +#else +#define assert(expr) +#endif + +#define RNG_MISCDEV_MINOR 183 /* official */ + +static int rng_dev_open (struct inode *inode, struct file *filp); +static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size, + loff_t * offp); + +static int __init intel_init (struct pci_dev *dev); +static void intel_cleanup(void); +static unsigned int intel_data_present (void); +static u32 intel_data_read (void); + +static int __init amd_init (struct pci_dev *dev); +static void amd_cleanup(void); +static unsigned int amd_data_present (void); +static u32 amd_data_read (void); + +#ifdef __i386__ +static int __init via_init(struct pci_dev *dev); +static void via_cleanup(void); +static unsigned int via_data_present (void); +static u32 via_data_read (void); +#endif + +static int __init geode_init(struct pci_dev *dev); +static void geode_cleanup(void); +static unsigned int geode_data_present (void); +static u32 geode_data_read (void); + +struct rng_operations { + int (*init) (struct pci_dev *dev); + void (*cleanup) (void); + unsigned int (*data_present) (void); + u32 (*data_read) (void); + unsigned int n_bytes; /* number of bytes per ->data_read */ +}; +static struct rng_operations *rng_ops; + +static struct file_operations rng_chrdev_ops = { + .owner = THIS_MODULE, + .open = rng_dev_open, + .read = rng_dev_read, +}; + + +static struct miscdevice rng_miscdev = { + RNG_MISCDEV_MINOR, + RNG_MODULE_NAME, + &rng_chrdev_ops, +}; + +enum { + rng_hw_none, + rng_hw_intel, + rng_hw_amd, +#ifdef __i386__ + rng_hw_via, +#endif + rng_hw_geode, +}; + +static struct rng_operations rng_vendor_ops[] = { + /* rng_hw_none */ + { }, + + /* rng_hw_intel */ + { intel_init, intel_cleanup, intel_data_present, + intel_data_read, 1 }, + + /* rng_hw_amd */ + { amd_init, amd_cleanup, amd_data_present, amd_data_read, 4 }, + +#ifdef __i386__ + /* rng_hw_via */ + { via_init, via_cleanup, via_data_present, via_data_read, 1 }, +#endif + + /* rng_hw_geode */ + { geode_init, geode_cleanup, geode_data_present, geode_data_read, 4 } +}; + +/* + * Data for PCI driver interface + * + * This data only exists for exporting the supported + * PCI ids via MODULE_DEVICE_TABLE. We do not actually + * register a pci_driver, because someone else might one day + * want to register another driver on the same PCI id. + */ +static struct pci_device_id rng_pci_tbl[] = { + { 0x1022, 0x7443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_amd }, + { 0x1022, 0x746b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_amd }, + + { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + { 0x8086, 0x2430, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + { 0x8086, 0x2448, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + { 0x8086, 0x244e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + { 0x8086, 0x245e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_intel }, + + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LX_AES, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, rng_hw_geode }, + + { 0, }, /* terminate list */ +}; +MODULE_DEVICE_TABLE (pci, rng_pci_tbl); + + +/*********************************************************************** + * + * Intel RNG operations + * + */ + +/* + * RNG registers (offsets from rng_mem) + */ +#define INTEL_RNG_HW_STATUS 0 +#define INTEL_RNG_PRESENT 0x40 +#define INTEL_RNG_ENABLED 0x01 +#define INTEL_RNG_STATUS 1 +#define INTEL_RNG_DATA_PRESENT 0x01 +#define INTEL_RNG_DATA 2 + +/* + * Magic address at which Intel PCI bridges locate the RNG + */ +#define INTEL_RNG_ADDR 0xFFBC015F +#define INTEL_RNG_ADDR_LEN 3 + +/* token to our ioremap'd RNG register area */ +static void __iomem *rng_mem; + +static inline u8 intel_hwstatus (void) +{ + assert (rng_mem != NULL); + return readb (rng_mem + INTEL_RNG_HW_STATUS); +} + +static inline u8 intel_hwstatus_set (u8 hw_status) +{ + assert (rng_mem != NULL); + writeb (hw_status, rng_mem + INTEL_RNG_HW_STATUS); + return intel_hwstatus (); +} + +static unsigned int intel_data_present(void) +{ + assert (rng_mem != NULL); + + return (readb (rng_mem + INTEL_RNG_STATUS) & INTEL_RNG_DATA_PRESENT) ? + 1 : 0; +} + +static u32 intel_data_read(void) +{ + assert (rng_mem != NULL); + + return readb (rng_mem + INTEL_RNG_DATA); +} + +static int __init intel_init (struct pci_dev *dev) +{ + int rc; + u8 hw_status; + + DPRINTK ("ENTER\n"); + + rng_mem = ioremap (INTEL_RNG_ADDR, INTEL_RNG_ADDR_LEN); + if (rng_mem == NULL) { + printk (KERN_ERR PFX "cannot ioremap RNG Memory\n"); + rc = -EBUSY; + goto err_out; + } + + /* Check for Intel 82802 */ + hw_status = intel_hwstatus (); + if ((hw_status & INTEL_RNG_PRESENT) == 0) { + printk (KERN_ERR PFX "RNG not detected\n"); + rc = -ENODEV; + goto err_out_free_map; + } + + /* turn RNG h/w on, if it's off */ + if ((hw_status & INTEL_RNG_ENABLED) == 0) + hw_status = intel_hwstatus_set (hw_status | INTEL_RNG_ENABLED); + if ((hw_status & INTEL_RNG_ENABLED) == 0) { + printk (KERN_ERR PFX "cannot enable RNG, aborting\n"); + rc = -EIO; + goto err_out_free_map; + } + + DPRINTK ("EXIT, returning 0\n"); + return 0; + +err_out_free_map: + iounmap (rng_mem); + rng_mem = NULL; +err_out: + DPRINTK ("EXIT, returning %d\n", rc); + return rc; +} + +static void intel_cleanup(void) +{ + u8 hw_status; + + hw_status = intel_hwstatus (); + if (hw_status & INTEL_RNG_ENABLED) + intel_hwstatus_set (hw_status & ~INTEL_RNG_ENABLED); + else + printk(KERN_WARNING PFX "unusual: RNG already disabled\n"); + iounmap(rng_mem); + rng_mem = NULL; +} + +/*********************************************************************** + * + * AMD RNG operations + * + */ + +static u32 pmbase; /* PMxx I/O base */ +static struct pci_dev *amd_dev; + +static unsigned int amd_data_present (void) +{ + return inl(pmbase + 0xF4) & 1; +} + + +static u32 amd_data_read (void) +{ + return inl(pmbase + 0xF0); +} + +static int __init amd_init (struct pci_dev *dev) +{ + int rc; + u8 rnen; + + DPRINTK ("ENTER\n"); + + pci_read_config_dword(dev, 0x58, &pmbase); + + pmbase &= 0x0000FF00; + + if (pmbase == 0) + { + printk (KERN_ERR PFX "power management base not set\n"); + rc = -EIO; + goto err_out; + } + + pci_read_config_byte(dev, 0x40, &rnen); + rnen |= (1 << 7); /* RNG on */ + pci_write_config_byte(dev, 0x40, rnen); + + pci_read_config_byte(dev, 0x41, &rnen); + rnen |= (1 << 7); /* PMIO enable */ + pci_write_config_byte(dev, 0x41, rnen); + + pr_info( PFX "AMD768 system management I/O registers at 0x%X.\n", + pmbase); + + amd_dev = dev; + + DPRINTK ("EXIT, returning 0\n"); + return 0; + +err_out: + DPRINTK ("EXIT, returning %d\n", rc); + return rc; +} + +static void amd_cleanup(void) +{ + u8 rnen; + + pci_read_config_byte(amd_dev, 0x40, &rnen); + rnen &= ~(1 << 7); /* RNG off */ + pci_write_config_byte(amd_dev, 0x40, rnen); + + /* FIXME: twiddle pmio, also? */ +} + +#ifdef __i386__ +/*********************************************************************** + * + * VIA RNG operations + * + */ + +enum { + VIA_STRFILT_CNT_SHIFT = 16, + VIA_STRFILT_FAIL = (1 << 15), + VIA_STRFILT_ENABLE = (1 << 14), + VIA_RAWBITS_ENABLE = (1 << 13), + VIA_RNG_ENABLE = (1 << 6), + VIA_XSTORE_CNT_MASK = 0x0F, + + VIA_RNG_CHUNK_8 = 0x00, /* 64 rand bits, 64 stored bits */ + VIA_RNG_CHUNK_4 = 0x01, /* 32 rand bits, 32 stored bits */ + VIA_RNG_CHUNK_4_MASK = 0xFFFFFFFF, + VIA_RNG_CHUNK_2 = 0x02, /* 16 rand bits, 32 stored bits */ + VIA_RNG_CHUNK_2_MASK = 0xFFFF, + VIA_RNG_CHUNK_1 = 0x03, /* 8 rand bits, 32 stored bits */ + VIA_RNG_CHUNK_1_MASK = 0xFF, +}; + +static u32 via_rng_datum; + +/* + * Investigate using the 'rep' prefix to obtain 32 bits of random data + * in one insn. The upside is potentially better performance. The + * downside is that the instruction becomes no longer atomic. Due to + * this, just like familiar issues with /dev/random itself, the worst + * case of a 'rep xstore' could potentially pause a cpu for an + * unreasonably long time. In practice, this condition would likely + * only occur when the hardware is failing. (or so we hope :)) + * + * Another possible performance boost may come from simply buffering + * until we have 4 bytes, thus returning a u32 at a time, + * instead of the current u8-at-a-time. + */ + +static inline u32 xstore(u32 *addr, u32 edx_in) +{ + u32 eax_out; + + asm(".byte 0x0F,0xA7,0xC0 /* xstore %%edi (addr=%0) */" + :"=m"(*addr), "=a"(eax_out) + :"D"(addr), "d"(edx_in)); + + return eax_out; +} + +static unsigned int via_data_present(void) +{ + u32 bytes_out; + + /* We choose the recommended 1-byte-per-instruction RNG rate, + * for greater randomness at the expense of speed. Larger + * values 2, 4, or 8 bytes-per-instruction yield greater + * speed at lesser randomness. + * + * If you change this to another VIA_CHUNK_n, you must also + * change the ->n_bytes values in rng_vendor_ops[] tables. + * VIA_CHUNK_8 requires further code changes. + * + * A copy of MSR_VIA_RNG is placed in eax_out when xstore + * completes. + */ + via_rng_datum = 0; /* paranoia, not really necessary */ + bytes_out = xstore(&via_rng_datum, VIA_RNG_CHUNK_1) & VIA_XSTORE_CNT_MASK; + if (bytes_out == 0) + return 0; + + return 1; +} + +static u32 via_data_read(void) +{ + return via_rng_datum; +} + +static int __init via_init(struct pci_dev *dev) +{ + u32 lo, hi, old_lo; + + /* Control the RNG via MSR. Tread lightly and pay very close + * close attention to values written, as the reserved fields + * are documented to be "undefined and unpredictable"; but it + * does not say to write them as zero, so I make a guess that + * we restore the values we find in the register. + */ + rdmsr(MSR_VIA_RNG, lo, hi); + + old_lo = lo; + lo &= ~(0x7f << VIA_STRFILT_CNT_SHIFT); + lo &= ~VIA_XSTORE_CNT_MASK; + lo &= ~(VIA_STRFILT_ENABLE | VIA_STRFILT_FAIL | VIA_RAWBITS_ENABLE); + lo |= VIA_RNG_ENABLE; + + if (lo != old_lo) + wrmsr(MSR_VIA_RNG, lo, hi); + + /* perhaps-unnecessary sanity check; remove after testing if + unneeded */ + rdmsr(MSR_VIA_RNG, lo, hi); + if ((lo & VIA_RNG_ENABLE) == 0) { + printk(KERN_ERR PFX "cannot enable VIA C3 RNG, aborting\n"); + return -ENODEV; + } + + return 0; +} + +static void via_cleanup(void) +{ + /* do nothing */ +} +#endif + +/*********************************************************************** + * + * AMD Geode RNG operations + * + */ + +static void __iomem *geode_rng_base = NULL; + +#define GEODE_RNG_DATA_REG 0x50 +#define GEODE_RNG_STATUS_REG 0x54 + +static u32 geode_data_read(void) +{ + u32 val; + + assert(geode_rng_base != NULL); + val = readl(geode_rng_base + GEODE_RNG_DATA_REG); + return val; +} + +static unsigned int geode_data_present(void) +{ + u32 val; + + assert(geode_rng_base != NULL); + val = readl(geode_rng_base + GEODE_RNG_STATUS_REG); + return val; +} + +static void geode_cleanup(void) +{ + iounmap(geode_rng_base); + geode_rng_base = NULL; +} + +static int geode_init(struct pci_dev *dev) +{ + unsigned long rng_base = pci_resource_start(dev, 0); + + if (rng_base == 0) + return 1; + + geode_rng_base = ioremap(rng_base, 0x58); + + if (geode_rng_base == NULL) { + printk(KERN_ERR PFX "Cannot ioremap RNG memory\n"); + return -EBUSY; + } + + return 0; +} + +/*********************************************************************** + * + * /dev/hwrandom character device handling (major 10, minor 183) + * + */ + +static int rng_dev_open (struct inode *inode, struct file *filp) +{ + /* enforce read-only access to this chrdev */ + if ((filp->f_mode & FMODE_READ) == 0) + return -EINVAL; + if (filp->f_mode & FMODE_WRITE) + return -EINVAL; + + return 0; +} + + +static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size, + loff_t * offp) +{ + static DEFINE_SPINLOCK(rng_lock); + unsigned int have_data; + u32 data = 0; + ssize_t ret = 0; + + while (size) { + spin_lock(&rng_lock); + + have_data = 0; + if (rng_ops->data_present()) { + data = rng_ops->data_read(); + have_data = rng_ops->n_bytes; + } + + spin_unlock (&rng_lock); + + while (have_data && size) { + if (put_user((u8)data, buf++)) { + ret = ret ? : -EFAULT; + break; + } + size--; + ret++; + have_data--; + data>>=8; + } + + if (filp->f_flags & O_NONBLOCK) + return ret ? : -EAGAIN; + + if(need_resched()) + schedule_timeout_interruptible(1); + else + udelay(200); /* FIXME: We could poll for 250uS ?? */ + + if (signal_pending (current)) + return ret ? : -ERESTARTSYS; + } + return ret; +} + + + +/* + * rng_init_one - look for and attempt to init a single RNG + */ +static int __init rng_init_one (struct pci_dev *dev) +{ + int rc; + + DPRINTK ("ENTER\n"); + + assert(rng_ops != NULL); + + rc = rng_ops->init(dev); + if (rc) + goto err_out; + + rc = misc_register (&rng_miscdev); + if (rc) { + printk (KERN_ERR PFX "misc device register failed\n"); + goto err_out_cleanup_hw; + } + + DPRINTK ("EXIT, returning 0\n"); + return 0; + +err_out_cleanup_hw: + rng_ops->cleanup(); +err_out: + DPRINTK ("EXIT, returning %d\n", rc); + return rc; +} + + + +MODULE_AUTHOR("The Linux Kernel team"); +MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL"); + + +/* + * rng_init - initialize RNG module + */ +static int __init rng_init (void) +{ + int rc; + struct pci_dev *pdev = NULL; + const struct pci_device_id *ent; + + DPRINTK ("ENTER\n"); + + /* Probe for Intel, AMD, Geode RNGs */ + for_each_pci_dev(pdev) { + ent = pci_match_id(rng_pci_tbl, pdev); + if (ent) { + rng_ops = &rng_vendor_ops[ent->driver_data]; + goto match; + } + } + +#ifdef __i386__ + /* Probe for VIA RNG */ + if (cpu_has_xstore) { + rng_ops = &rng_vendor_ops[rng_hw_via]; + pdev = NULL; + goto match; + } +#endif + + DPRINTK ("EXIT, returning -ENODEV\n"); + return -ENODEV; + +match: + rc = rng_init_one (pdev); + if (rc) + return rc; + + pr_info( RNG_DRIVER_NAME " loaded\n"); + + DPRINTK ("EXIT, returning 0\n"); + return 0; +} + + +/* + * rng_init - shutdown RNG module + */ +static void __exit rng_cleanup (void) +{ + DPRINTK ("ENTER\n"); + + misc_deregister (&rng_miscdev); + + if (rng_ops->cleanup) + rng_ops->cleanup(); + + DPRINTK ("EXIT\n"); +} + + +module_init (rng_init); +module_exit (rng_cleanup); diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig deleted file mode 100644 index 9f7635f75..000000000 --- a/drivers/char/hw_random/Kconfig +++ /dev/null @@ -1,90 +0,0 @@ -# -# Hardware Random Number Generator (RNG) configuration -# - -config HW_RANDOM - bool "Hardware Random Number Generator Core support" - default y - ---help--- - Hardware Random Number Generator Core infrastructure. - - If unsure, say Y. - -config HW_RANDOM_INTEL - tristate "Intel HW Random Number Generator support" - depends on HW_RANDOM && (X86 || IA64) && PCI - default y - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on Intel i8xx-based motherboards. - - To compile this driver as a module, choose M here: the - module will be called intel-rng. - - If unsure, say Y. - -config HW_RANDOM_AMD - tristate "AMD HW Random Number Generator support" - depends on HW_RANDOM && X86 && PCI - default y - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on AMD 76x-based motherboards. - - To compile this driver as a module, choose M here: the - module will be called amd-rng. - - If unsure, say Y. - -config HW_RANDOM_GEODE - tristate "AMD Geode HW Random Number Generator support" - depends on HW_RANDOM && X86 && PCI - default y - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on the AMD Geode LX. - - To compile this driver as a module, choose M here: the - module will be called geode-rng. - - If unsure, say Y. - -config HW_RANDOM_VIA - tristate "VIA HW Random Number Generator support" - depends on HW_RANDOM && X86_32 - default y - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on VIA based motherboards. - - To compile this driver as a module, choose M here: the - module will be called via-rng. - - If unsure, say Y. - -config HW_RANDOM_IXP4XX - tristate "Intel IXP4xx NPU HW Random Number Generator support" - depends on HW_RANDOM && ARCH_IXP4XX - default y - ---help--- - This driver provides kernel-side support for the Random - Number Generator hardware found on the Intel IXP4xx NPU. - - To compile this driver as a module, choose M here: the - module will be called ixp4xx-rng. - - If unsure, say Y. - -config HW_RANDOM_OMAP - tristate "OMAP Random Number Generator support" - depends on HW_RANDOM && (ARCH_OMAP16XX || ARCH_OMAP24XX) - default y - ---help--- - This driver provides kernel-side support for the Random Number - Generator hardware found on OMAP16xx and OMAP24xx multimedia - processors. - - To compile this driver as a module, choose M here: the - module will be called omap-rng. - - If unsure, say Y. diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile deleted file mode 100644 index e263ae96f..000000000 --- a/drivers/char/hw_random/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Makefile for HW Random Number Generator (RNG) device drivers. -# - -obj-$(CONFIG_HW_RANDOM) += core.o -obj-$(CONFIG_HW_RANDOM_INTEL) += intel-rng.o -obj-$(CONFIG_HW_RANDOM_AMD) += amd-rng.o -obj-$(CONFIG_HW_RANDOM_GEODE) += geode-rng.o -obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o -obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o -obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o diff --git a/drivers/char/hw_random/amd-rng.c b/drivers/char/hw_random/amd-rng.c deleted file mode 100644 index 71e4e0f3f..000000000 --- a/drivers/char/hw_random/amd-rng.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * RNG driver for AMD RNGs - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * with the majority of the code coming from: - * - * Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) - * (c) Copyright 2003 Red Hat Inc - * - * derived from - * - * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc - * - * derived from - * - * Hardware driver for Intel i810 Random Number Generator (RNG) - * Copyright 2000,2001 Jeff Garzik - * Copyright 2000,2001 Philipp Rumpf - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include - - -#define PFX KBUILD_MODNAME ": " - - -/* - * Data for PCI driver interface - * - * This data only exists for exporting the supported - * PCI ids via MODULE_DEVICE_TABLE. We do not actually - * register a pci_driver, because someone else might one day - * want to register another driver on the same PCI id. - */ -static const struct pci_device_id pci_tbl[] = { - { 0x1022, 0x7443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, - { 0x1022, 0x746b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, - { 0, }, /* terminate list */ -}; -MODULE_DEVICE_TABLE(pci, pci_tbl); - -static struct pci_dev *amd_pdev; - - -static int amd_rng_data_present(struct hwrng *rng) -{ - u32 pmbase = (u32)rng->priv; - - return !!(inl(pmbase + 0xF4) & 1); -} - -static int amd_rng_data_read(struct hwrng *rng, u32 *data) -{ - u32 pmbase = (u32)rng->priv; - - *data = inl(pmbase + 0xF0); - - return 4; -} - -static int amd_rng_init(struct hwrng *rng) -{ - u8 rnen; - - pci_read_config_byte(amd_pdev, 0x40, &rnen); - rnen |= (1 << 7); /* RNG on */ - pci_write_config_byte(amd_pdev, 0x40, rnen); - - pci_read_config_byte(amd_pdev, 0x41, &rnen); - rnen |= (1 << 7); /* PMIO enable */ - pci_write_config_byte(amd_pdev, 0x41, rnen); - - return 0; -} - -static void amd_rng_cleanup(struct hwrng *rng) -{ - u8 rnen; - - pci_read_config_byte(amd_pdev, 0x40, &rnen); - rnen &= ~(1 << 7); /* RNG off */ - pci_write_config_byte(amd_pdev, 0x40, rnen); -} - - -static struct hwrng amd_rng = { - .name = "amd", - .init = amd_rng_init, - .cleanup = amd_rng_cleanup, - .data_present = amd_rng_data_present, - .data_read = amd_rng_data_read, -}; - - -static int __init mod_init(void) -{ - int err = -ENODEV; - struct pci_dev *pdev = NULL; - const struct pci_device_id *ent; - u32 pmbase; - - for_each_pci_dev(pdev) { - ent = pci_match_id(pci_tbl, pdev); - if (ent) - goto found; - } - /* Device not found. */ - goto out; - -found: - err = pci_read_config_dword(pdev, 0x58, &pmbase); - if (err) - goto out; - err = -EIO; - pmbase &= 0x0000FF00; - if (pmbase == 0) - goto out; - amd_rng.priv = (unsigned long)pmbase; - amd_pdev = pdev; - - printk(KERN_INFO "AMD768 RNG detected\n"); - err = hwrng_register(&amd_rng); - if (err) { - printk(KERN_ERR PFX "RNG registering failed (%d)\n", - err); - goto out; - } -out: - return err; -} - -static void __exit mod_exit(void) -{ - hwrng_unregister(&amd_rng); -} - -subsys_initcall(mod_init); -module_exit(mod_exit); - -MODULE_AUTHOR("The Linux Kernel team"); -MODULE_DESCRIPTION("H/W RNG driver for AMD chipsets"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c deleted file mode 100644 index 154a81d32..000000000 --- a/drivers/char/hw_random/core.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - Added support for the AMD Geode LX RNG - (c) Copyright 2004-2005 Advanced Micro Devices, Inc. - - derived from - - Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) - (c) Copyright 2003 Red Hat Inc - - derived from - - Hardware driver for the AMD 768 Random Number Generator (RNG) - (c) Copyright 2001 Red Hat Inc - - derived from - - Hardware driver for Intel i810 Random Number Generator (RNG) - Copyright 2000,2001 Jeff Garzik - Copyright 2000,2001 Philipp Rumpf - - Added generic RNG API - Copyright 2006 Michael Buesch - Copyright 2005 (c) MontaVista Software, Inc. - - Please read Documentation/hw_random.txt for details on use. - - ---------------------------------------------------------- - This software may be used and distributed according to the terms - of the GNU General Public License, incorporated herein by reference. - - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define RNG_MODULE_NAME "hw_random" -#define PFX RNG_MODULE_NAME ": " -#define RNG_MISCDEV_MINOR 183 /* official */ - - -static struct hwrng *current_rng; -static LIST_HEAD(rng_list); -static DEFINE_MUTEX(rng_mutex); - - -static inline int hwrng_init(struct hwrng *rng) -{ - if (!rng->init) - return 0; - return rng->init(rng); -} - -static inline void hwrng_cleanup(struct hwrng *rng) -{ - if (rng && rng->cleanup) - rng->cleanup(rng); -} - -static inline int hwrng_data_present(struct hwrng *rng) -{ - if (!rng->data_present) - return 1; - return rng->data_present(rng); -} - -static inline int hwrng_data_read(struct hwrng *rng, u32 *data) -{ - return rng->data_read(rng, data); -} - - -static int rng_dev_open(struct inode *inode, struct file *filp) -{ - /* enforce read-only access to this chrdev */ - if ((filp->f_mode & FMODE_READ) == 0) - return -EINVAL; - if (filp->f_mode & FMODE_WRITE) - return -EINVAL; - return 0; -} - -static ssize_t rng_dev_read(struct file *filp, char __user *buf, - size_t size, loff_t *offp) -{ - u32 data; - ssize_t ret = 0; - int i, err = 0; - int data_present; - int bytes_read; - - while (size) { - err = -ERESTARTSYS; - if (mutex_lock_interruptible(&rng_mutex)) - goto out; - if (!current_rng) { - mutex_unlock(&rng_mutex); - err = -ENODEV; - goto out; - } - if (filp->f_flags & O_NONBLOCK) { - data_present = hwrng_data_present(current_rng); - } else { - /* Some RNG require some time between data_reads to gather - * new entropy. Poll it. - */ - for (i = 0; i < 20; i++) { - data_present = hwrng_data_present(current_rng); - if (data_present) - break; - udelay(10); - } - } - bytes_read = 0; - if (data_present) - bytes_read = hwrng_data_read(current_rng, &data); - mutex_unlock(&rng_mutex); - - err = -EAGAIN; - if (!bytes_read && (filp->f_flags & O_NONBLOCK)) - goto out; - - err = -EFAULT; - while (bytes_read && size) { - if (put_user((u8)data, buf++)) - goto out; - size--; - ret++; - bytes_read--; - data >>= 8; - } - - if (need_resched()) - schedule_timeout_interruptible(1); - err = -ERESTARTSYS; - if (signal_pending(current)) - goto out; - } -out: - return ret ? : err; -} - - -static const struct file_operations rng_chrdev_ops = { - .owner = THIS_MODULE, - .open = rng_dev_open, - .read = rng_dev_read, -}; - -static struct miscdevice rng_miscdev = { - .minor = RNG_MISCDEV_MINOR, - .name = RNG_MODULE_NAME, - .fops = &rng_chrdev_ops, -}; - - -static ssize_t hwrng_attr_current_store(struct class_device *class, - const char *buf, size_t len) -{ - int err; - struct hwrng *rng; - - err = mutex_lock_interruptible(&rng_mutex); - if (err) - return -ERESTARTSYS; - err = -ENODEV; - list_for_each_entry(rng, &rng_list, list) { - if (strcmp(rng->name, buf) == 0) { - if (rng == current_rng) { - err = 0; - break; - } - err = hwrng_init(rng); - if (err) - break; - hwrng_cleanup(current_rng); - current_rng = rng; - err = 0; - break; - } - } - mutex_unlock(&rng_mutex); - - return err ? : len; -} - -static ssize_t hwrng_attr_current_show(struct class_device *class, - char *buf) -{ - int err; - ssize_t ret; - const char *name = "none"; - - err = mutex_lock_interruptible(&rng_mutex); - if (err) - return -ERESTARTSYS; - if (current_rng) - name = current_rng->name; - ret = snprintf(buf, PAGE_SIZE, "%s\n", name); - mutex_unlock(&rng_mutex); - - return ret; -} - -static ssize_t hwrng_attr_available_show(struct class_device *class, - char *buf) -{ - int err; - ssize_t ret = 0; - struct hwrng *rng; - - err = mutex_lock_interruptible(&rng_mutex); - if (err) - return -ERESTARTSYS; - buf[0] = '\0'; - list_for_each_entry(rng, &rng_list, list) { - strncat(buf, rng->name, PAGE_SIZE - ret - 1); - ret += strlen(rng->name); - strncat(buf, " ", PAGE_SIZE - ret - 1); - ret++; - } - strncat(buf, "\n", PAGE_SIZE - ret - 1); - ret++; - mutex_unlock(&rng_mutex); - - return ret; -} - -static CLASS_DEVICE_ATTR(rng_current, S_IRUGO | S_IWUSR, - hwrng_attr_current_show, - hwrng_attr_current_store); -static CLASS_DEVICE_ATTR(rng_available, S_IRUGO, - hwrng_attr_available_show, - NULL); - - -static void unregister_miscdev(void) -{ - class_device_remove_file(rng_miscdev.class, - &class_device_attr_rng_available); - class_device_remove_file(rng_miscdev.class, - &class_device_attr_rng_current); - misc_deregister(&rng_miscdev); -} - -static int register_miscdev(void) -{ - int err; - - err = misc_register(&rng_miscdev); - if (err) - goto out; - err = class_device_create_file(rng_miscdev.class, - &class_device_attr_rng_current); - if (err) - goto err_misc_dereg; - err = class_device_create_file(rng_miscdev.class, - &class_device_attr_rng_available); - if (err) - goto err_remove_current; -out: - return err; - -err_remove_current: - class_device_remove_file(rng_miscdev.class, - &class_device_attr_rng_current); -err_misc_dereg: - misc_deregister(&rng_miscdev); - goto out; -} - -int hwrng_register(struct hwrng *rng) -{ - int must_register_misc; - int err = -EINVAL; - struct hwrng *old_rng, *tmp; - - if (rng->name == NULL || - rng->data_read == NULL) - goto out; - - mutex_lock(&rng_mutex); - - /* Must not register two RNGs with the same name. */ - err = -EEXIST; - list_for_each_entry(tmp, &rng_list, list) { - if (strcmp(tmp->name, rng->name) == 0) - goto out_unlock; - } - - must_register_misc = (current_rng == NULL); - old_rng = current_rng; - if (!old_rng) { - err = hwrng_init(rng); - if (err) - goto out_unlock; - current_rng = rng; - } - err = 0; - if (must_register_misc) { - err = register_miscdev(); - if (err) { - if (!old_rng) { - hwrng_cleanup(rng); - current_rng = NULL; - } - goto out_unlock; - } - } - INIT_LIST_HEAD(&rng->list); - list_add_tail(&rng->list, &rng_list); -out_unlock: - mutex_unlock(&rng_mutex); -out: - return err; -} -EXPORT_SYMBOL_GPL(hwrng_register); - -void hwrng_unregister(struct hwrng *rng) -{ - int err; - - mutex_lock(&rng_mutex); - - list_del(&rng->list); - if (current_rng == rng) { - hwrng_cleanup(rng); - if (list_empty(&rng_list)) { - current_rng = NULL; - } else { - current_rng = list_entry(rng_list.prev, struct hwrng, list); - err = hwrng_init(current_rng); - if (err) - current_rng = NULL; - } - } - if (list_empty(&rng_list)) - unregister_miscdev(); - - mutex_unlock(&rng_mutex); -} -EXPORT_SYMBOL_GPL(hwrng_unregister); - - -MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/geode-rng.c b/drivers/char/hw_random/geode-rng.c deleted file mode 100644 index d37ced0d1..000000000 --- a/drivers/char/hw_random/geode-rng.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * RNG driver for AMD Geode RNGs - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * with the majority of the code coming from: - * - * Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) - * (c) Copyright 2003 Red Hat Inc - * - * derived from - * - * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc - * - * derived from - * - * Hardware driver for Intel i810 Random Number Generator (RNG) - * Copyright 2000,2001 Jeff Garzik - * Copyright 2000,2001 Philipp Rumpf - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include - - -#define PFX KBUILD_MODNAME ": " - -#define GEODE_RNG_DATA_REG 0x50 -#define GEODE_RNG_STATUS_REG 0x54 - -/* - * Data for PCI driver interface - * - * This data only exists for exporting the supported - * PCI ids via MODULE_DEVICE_TABLE. We do not actually - * register a pci_driver, because someone else might one day - * want to register another driver on the same PCI id. - */ -static const struct pci_device_id pci_tbl[] = { - { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LX_AES, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, - { 0, }, /* terminate list */ -}; -MODULE_DEVICE_TABLE(pci, pci_tbl); - - -static int geode_rng_data_read(struct hwrng *rng, u32 *data) -{ - void __iomem *mem = (void __iomem *)rng->priv; - - *data = readl(mem + GEODE_RNG_DATA_REG); - - return 4; -} - -static int geode_rng_data_present(struct hwrng *rng) -{ - void __iomem *mem = (void __iomem *)rng->priv; - - return !!(readl(mem + GEODE_RNG_STATUS_REG)); -} - - -static struct hwrng geode_rng = { - .name = "geode", - .data_present = geode_rng_data_present, - .data_read = geode_rng_data_read, -}; - - -static int __init mod_init(void) -{ - int err = -ENODEV; - struct pci_dev *pdev = NULL; - const struct pci_device_id *ent; - void __iomem *mem; - unsigned long rng_base; - - for_each_pci_dev(pdev) { - ent = pci_match_id(pci_tbl, pdev); - if (ent) - goto found; - } - /* Device not found. */ - goto out; - -found: - rng_base = pci_resource_start(pdev, 0); - if (rng_base == 0) - goto out; - err = -ENOMEM; - mem = ioremap(rng_base, 0x58); - if (!mem) - goto out; - geode_rng.priv = (unsigned long)mem; - - printk(KERN_INFO "AMD Geode RNG detected\n"); - err = hwrng_register(&geode_rng); - if (err) { - printk(KERN_ERR PFX "RNG registering failed (%d)\n", - err); - goto err_unmap; - } -out: - return err; - -err_unmap: - iounmap(mem); - goto out; -} - -static void __exit mod_exit(void) -{ - void __iomem *mem = (void __iomem *)geode_rng.priv; - - hwrng_unregister(&geode_rng); - iounmap(mem); -} - -subsys_initcall(mod_init); -module_exit(mod_exit); - -MODULE_DESCRIPTION("H/W RNG driver for AMD Geode LX CPUs"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c deleted file mode 100644 index 8efbc9c0e..000000000 --- a/drivers/char/hw_random/intel-rng.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * RNG driver for Intel RNGs - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * with the majority of the code coming from: - * - * Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) - * (c) Copyright 2003 Red Hat Inc - * - * derived from - * - * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc - * - * derived from - * - * Hardware driver for Intel i810 Random Number Generator (RNG) - * Copyright 2000,2001 Jeff Garzik - * Copyright 2000,2001 Philipp Rumpf - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include - - -#define PFX KBUILD_MODNAME ": " - -/* - * RNG registers - */ -#define INTEL_RNG_HW_STATUS 0 -#define INTEL_RNG_PRESENT 0x40 -#define INTEL_RNG_ENABLED 0x01 -#define INTEL_RNG_STATUS 1 -#define INTEL_RNG_DATA_PRESENT 0x01 -#define INTEL_RNG_DATA 2 - -/* - * Magic address at which Intel PCI bridges locate the RNG - */ -#define INTEL_RNG_ADDR 0xFFBC015F -#define INTEL_RNG_ADDR_LEN 3 - -/* - * LPC bridge PCI config space registers - */ -#define FWH_DEC_EN1_REG_OLD 0xe3 -#define FWH_DEC_EN1_REG_NEW 0xd9 /* high byte of 16-bit register */ -#define FWH_F8_EN_MASK 0x80 - -#define BIOS_CNTL_REG_OLD 0x4e -#define BIOS_CNTL_REG_NEW 0xdc -#define BIOS_CNTL_WRITE_ENABLE_MASK 0x01 -#define BIOS_CNTL_LOCK_ENABLE_MASK 0x02 - -/* - * Magic address at which Intel Firmware Hubs get accessed - */ -#define INTEL_FWH_ADDR 0xffff0000 -#define INTEL_FWH_ADDR_LEN 2 - -/* - * Intel Firmware Hub command codes (write to any address inside the device) - */ -#define INTEL_FWH_RESET_CMD 0xff /* aka READ_ARRAY */ -#define INTEL_FWH_READ_ID_CMD 0x90 - -/* - * Intel Firmware Hub Read ID command result addresses - */ -#define INTEL_FWH_MANUFACTURER_CODE_ADDRESS 0x000000 -#define INTEL_FWH_DEVICE_CODE_ADDRESS 0x000001 - -/* - * Intel Firmware Hub Read ID command result values - */ -#define INTEL_FWH_MANUFACTURER_CODE 0x89 -#define INTEL_FWH_DEVICE_CODE_8M 0xac -#define INTEL_FWH_DEVICE_CODE_4M 0xad - -/* - * Data for PCI driver interface - * - * This data only exists for exporting the supported - * PCI ids via MODULE_DEVICE_TABLE. We do not actually - * register a pci_driver, because someone else might one day - * want to register another driver on the same PCI id. - */ -static const struct pci_device_id pci_tbl[] = { -/* AA - { 0x8086, 0x2418, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ - { 0x8086, 0x2410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* AA */ -/* AB - { 0x8086, 0x2428, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ - { 0x8086, 0x2420, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* AB */ -/* ?? - { 0x8086, 0x2430, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ -/* BAM, CAM, DBM, FBM, GxM - { 0x8086, 0x2448, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ - { 0x8086, 0x244c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* BAM */ - { 0x8086, 0x248c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CAM */ - { 0x8086, 0x24cc, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* DBM */ - { 0x8086, 0x2641, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* FBM */ - { 0x8086, 0x27b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* GxM */ - { 0x8086, 0x27bd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* GxM DH */ -/* BA, CA, DB, Ex, 6300, Fx, 631x/632x, Gx - { 0x8086, 0x244e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ - { 0x8086, 0x2440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* BA */ - { 0x8086, 0x2480, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CA */ - { 0x8086, 0x24c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* DB */ - { 0x8086, 0x24d0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Ex */ - { 0x8086, 0x25a1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 6300 */ - { 0x8086, 0x2640, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Fx */ - { 0x8086, 0x2670, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2671, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2672, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2673, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2674, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2675, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2676, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2677, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2678, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x2679, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x267f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* 631x/632x */ - { 0x8086, 0x27b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Gx */ -/* E - { 0x8086, 0x245e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, */ - { 0x8086, 0x2450, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* E */ - { 0, }, /* terminate list */ -}; -MODULE_DEVICE_TABLE(pci, pci_tbl); - - -static inline u8 hwstatus_get(void __iomem *mem) -{ - return readb(mem + INTEL_RNG_HW_STATUS); -} - -static inline u8 hwstatus_set(void __iomem *mem, - u8 hw_status) -{ - writeb(hw_status, mem + INTEL_RNG_HW_STATUS); - return hwstatus_get(mem); -} - -static int intel_rng_data_present(struct hwrng *rng) -{ - void __iomem *mem = (void __iomem *)rng->priv; - - return !!(readb(mem + INTEL_RNG_STATUS) & INTEL_RNG_DATA_PRESENT); -} - -static int intel_rng_data_read(struct hwrng *rng, u32 *data) -{ - void __iomem *mem = (void __iomem *)rng->priv; - - *data = readb(mem + INTEL_RNG_DATA); - - return 1; -} - -static int intel_rng_init(struct hwrng *rng) -{ - void __iomem *mem = (void __iomem *)rng->priv; - u8 hw_status; - int err = -EIO; - - hw_status = hwstatus_get(mem); - /* turn RNG h/w on, if it's off */ - if ((hw_status & INTEL_RNG_ENABLED) == 0) - hw_status = hwstatus_set(mem, hw_status | INTEL_RNG_ENABLED); - if ((hw_status & INTEL_RNG_ENABLED) == 0) { - printk(KERN_ERR PFX "cannot enable RNG, aborting\n"); - goto out; - } - err = 0; -out: - return err; -} - -static void intel_rng_cleanup(struct hwrng *rng) -{ - void __iomem *mem = (void __iomem *)rng->priv; - u8 hw_status; - - hw_status = hwstatus_get(mem); - if (hw_status & INTEL_RNG_ENABLED) - hwstatus_set(mem, hw_status & ~INTEL_RNG_ENABLED); - else - printk(KERN_WARNING PFX "unusual: RNG already disabled\n"); -} - - -static struct hwrng intel_rng = { - .name = "intel", - .init = intel_rng_init, - .cleanup = intel_rng_cleanup, - .data_present = intel_rng_data_present, - .data_read = intel_rng_data_read, -}; - - -#ifdef CONFIG_SMP -static char __initdata waitflag; - -static void __init intel_init_wait(void *unused) -{ - while (waitflag) - cpu_relax(); -} -#endif - -static int __init mod_init(void) -{ - int err = -ENODEV; - unsigned i; - struct pci_dev *dev = NULL; - void __iomem *mem; - unsigned long flags; - u8 bios_cntl_off, fwh_dec_en1_off; - u8 bios_cntl_val = 0xff, fwh_dec_en1_val = 0xff; - u8 hw_status, mfc, dvc; - - for (i = 0; !dev && pci_tbl[i].vendor; ++i) - dev = pci_get_device(pci_tbl[i].vendor, pci_tbl[i].device, NULL); - - if (!dev) - goto out; /* Device not found. */ - - /* Check for Intel 82802 */ - if (dev->device < 0x2640) { - fwh_dec_en1_off = FWH_DEC_EN1_REG_OLD; - bios_cntl_off = BIOS_CNTL_REG_OLD; - } else { - fwh_dec_en1_off = FWH_DEC_EN1_REG_NEW; - bios_cntl_off = BIOS_CNTL_REG_NEW; - } - - pci_read_config_byte(dev, fwh_dec_en1_off, &fwh_dec_en1_val); - pci_read_config_byte(dev, bios_cntl_off, &bios_cntl_val); - - mem = ioremap_nocache(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN); - if (mem == NULL) { - pci_dev_put(dev); - err = -EBUSY; - goto out; - } - - /* - * Since the BIOS code/data is going to disappear from its normal - * location with the Read ID command, all activity on the system - * must be stopped until the state is back to normal. - */ -#ifdef CONFIG_SMP - set_mb(waitflag, 1); - if (smp_call_function(intel_init_wait, NULL, 1, 0) != 0) { - set_mb(waitflag, 0); - pci_dev_put(dev); - printk(KERN_ERR PFX "cannot run on all processors\n"); - err = -EAGAIN; - goto err_unmap; - } -#endif - local_irq_save(flags); - - if (!(fwh_dec_en1_val & FWH_F8_EN_MASK)) - pci_write_config_byte(dev, - fwh_dec_en1_off, - fwh_dec_en1_val | FWH_F8_EN_MASK); - if (!(bios_cntl_val & - (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK))) - pci_write_config_byte(dev, - bios_cntl_off, - bios_cntl_val | BIOS_CNTL_WRITE_ENABLE_MASK); - - writeb(INTEL_FWH_RESET_CMD, mem); - writeb(INTEL_FWH_READ_ID_CMD, mem); - mfc = readb(mem + INTEL_FWH_MANUFACTURER_CODE_ADDRESS); - dvc = readb(mem + INTEL_FWH_DEVICE_CODE_ADDRESS); - writeb(INTEL_FWH_RESET_CMD, mem); - - if (!(bios_cntl_val & - (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK))) - pci_write_config_byte(dev, bios_cntl_off, bios_cntl_val); - if (!(fwh_dec_en1_val & FWH_F8_EN_MASK)) - pci_write_config_byte(dev, fwh_dec_en1_off, fwh_dec_en1_val); - - local_irq_restore(flags); -#ifdef CONFIG_SMP - /* Tell other CPUs to resume. */ - set_mb(waitflag, 0); -#endif - - iounmap(mem); - pci_dev_put(dev); - - if (mfc != INTEL_FWH_MANUFACTURER_CODE || - (dvc != INTEL_FWH_DEVICE_CODE_8M && - dvc != INTEL_FWH_DEVICE_CODE_4M)) { - printk(KERN_ERR PFX "FWH not detected\n"); - err = -ENODEV; - goto out; - } - - err = -ENOMEM; - mem = ioremap(INTEL_RNG_ADDR, INTEL_RNG_ADDR_LEN); - if (!mem) - goto out; - intel_rng.priv = (unsigned long)mem; - - /* Check for Random Number Generator */ - err = -ENODEV; - hw_status = hwstatus_get(mem); - if ((hw_status & INTEL_RNG_PRESENT) == 0) - goto err_unmap; - - printk(KERN_INFO "Intel 82802 RNG detected\n"); - err = hwrng_register(&intel_rng); - if (err) { - printk(KERN_ERR PFX "RNG registering failed (%d)\n", - err); - goto err_unmap; - } -out: - return err; - -err_unmap: - iounmap(mem); - goto out; -} - -static void __exit mod_exit(void) -{ - void __iomem *mem = (void __iomem *)intel_rng.priv; - - hwrng_unregister(&intel_rng); - iounmap(mem); -} - -subsys_initcall(mod_init); -module_exit(mod_exit); - -MODULE_DESCRIPTION("H/W RNG driver for Intel chipsets"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/ixp4xx-rng.c b/drivers/char/hw_random/ixp4xx-rng.c deleted file mode 100644 index 7f7615b11..000000000 --- a/drivers/char/hw_random/ixp4xx-rng.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * drivers/char/rng/ixp4xx-rng.c - * - * RNG driver for Intel IXP4xx family of NPUs - * - * Author: Deepak Saxena - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * Fixes by Michael Buesch - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) -{ - void __iomem * rng_base = (void __iomem *)rng->priv; - - *buffer = __raw_readl(rng_base); - - return 4; -} - -static struct hwrng ixp4xx_rng_ops = { - .name = "ixp4xx", - .data_read = ixp4xx_rng_data_read, -}; - -static int __init ixp4xx_rng_init(void) -{ - void __iomem * rng_base; - int err; - - rng_base = ioremap(0x70002100, 4); - if (!rng_base) - return -ENOMEM; - ixp4xx_rng_ops.priv = (unsigned long)rng_base; - err = hwrng_register(&ixp4xx_rng_ops); - if (err) - iounmap(rng_base); - - return err; -} - -static void __exit ixp4xx_rng_exit(void) -{ - void __iomem * rng_base = (void __iomem *)ixp4xx_rng_ops.priv; - - hwrng_unregister(&ixp4xx_rng_ops); - iounmap(rng_base); -} - -subsys_initcall(ixp4xx_rng_init); -module_exit(ixp4xx_rng_exit); - -MODULE_AUTHOR("Deepak Saxena "); -MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for IXP4xx"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c deleted file mode 100644 index a01d796d1..000000000 --- a/drivers/char/hw_random/omap-rng.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * driver/char/hw_random/omap-rng.c - * - * RNG driver for TI OMAP CPU family - * - * Author: Deepak Saxena - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * Mostly based on original driver: - * - * Copyright (C) 2005 Nokia Corporation - * Author: Juha Yrj�� - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - * - * TODO: - * - * - Make status updated be interrupt driven so we don't poll - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define RNG_OUT_REG 0x00 /* Output register */ -#define RNG_STAT_REG 0x04 /* Status register - [0] = STAT_BUSY */ -#define RNG_ALARM_REG 0x24 /* Alarm register - [7:0] = ALARM_COUNTER */ -#define RNG_CONFIG_REG 0x28 /* Configuration register - [11:6] = RESET_COUNT - [5:3] = RING2_DELAY - [2:0] = RING1_DELAY */ -#define RNG_REV_REG 0x3c /* Revision register - [7:0] = REV_NB */ -#define RNG_MASK_REG 0x40 /* Mask and reset register - [2] = IT_EN - [1] = SOFTRESET - [0] = AUTOIDLE */ -#define RNG_SYSSTATUS 0x44 /* System status - [0] = RESETDONE */ - -static void __iomem *rng_base; -static struct clk *rng_ick; -static struct platform_device *rng_dev; - -static u32 omap_rng_read_reg(int reg) -{ - return __raw_readl(rng_base + reg); -} - -static void omap_rng_write_reg(int reg, u32 val) -{ - __raw_writel(val, rng_base + reg); -} - -/* REVISIT: Does the status bit really work on 16xx? */ -static int omap_rng_data_present(struct hwrng *rng) -{ - return omap_rng_read_reg(RNG_STAT_REG) ? 0 : 1; -} - -static int omap_rng_data_read(struct hwrng *rng, u32 *data) -{ - *data = omap_rng_read_reg(RNG_OUT_REG); - - return 4; -} - -static struct hwrng omap_rng_ops = { - .name = "omap", - .data_present = omap_rng_data_present, - .data_read = omap_rng_data_read, -}; - -static int __init omap_rng_probe(struct platform_device *pdev) -{ - struct resource *res, *mem; - int ret; - - /* - * A bit ugly, and it will never actually happen but there can - * be only one RNG and this catches any bork - */ - BUG_ON(rng_dev); - - if (cpu_is_omap24xx()) { - rng_ick = clk_get(NULL, "rng_ick"); - if (IS_ERR(rng_ick)) { - dev_err(&pdev->dev, "Could not get rng_ick\n"); - ret = PTR_ERR(rng_ick); - return ret; - } else - clk_enable(rng_ick); - } - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - if (!res) - return -ENOENT; - - mem = request_mem_region(res->start, res->end - res->start + 1, - pdev->name); - if (mem == NULL) - return -EBUSY; - - dev_set_drvdata(&pdev->dev, mem); - rng_base = (u32 __iomem *)io_p2v(res->start); - - ret = hwrng_register(&omap_rng_ops); - if (ret) { - release_resource(mem); - rng_base = NULL; - return ret; - } - - dev_info(&pdev->dev, "OMAP Random Number Generator ver. %02x\n", - omap_rng_read_reg(RNG_REV_REG)); - omap_rng_write_reg(RNG_MASK_REG, 0x1); - - rng_dev = pdev; - - return 0; -} - -static int __exit omap_rng_remove(struct platform_device *pdev) -{ - struct resource *mem = dev_get_drvdata(&pdev->dev); - - hwrng_unregister(&omap_rng_ops); - - omap_rng_write_reg(RNG_MASK_REG, 0x0); - - if (cpu_is_omap24xx()) { - clk_disable(rng_ick); - clk_put(rng_ick); - } - - release_resource(mem); - rng_base = NULL; - - return 0; -} - -#ifdef CONFIG_PM - -static int omap_rng_suspend(struct platform_device *pdev, pm_message_t message) -{ - omap_rng_write_reg(RNG_MASK_REG, 0x0); - return 0; -} - -static int omap_rng_resume(struct platform_device *pdev) -{ - omap_rng_write_reg(RNG_MASK_REG, 0x1); - return 0; -} - -#else - -#define omap_rng_suspend NULL -#define omap_rng_resume NULL - -#endif - - -static struct platform_driver omap_rng_driver = { - .driver = { - .name = "omap_rng", - .owner = THIS_MODULE, - }, - .probe = omap_rng_probe, - .remove = __exit_p(omap_rng_remove), - .suspend = omap_rng_suspend, - .resume = omap_rng_resume -}; - -static int __init omap_rng_init(void) -{ - if (!cpu_is_omap16xx() && !cpu_is_omap24xx()) - return -ENODEV; - - return platform_driver_register(&omap_rng_driver); -} - -static void __exit omap_rng_exit(void) -{ - platform_driver_unregister(&omap_rng_driver); -} - -module_init(omap_rng_init); -module_exit(omap_rng_exit); - -MODULE_AUTHOR("Deepak Saxena (and others)"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c deleted file mode 100644 index 0e786b617..000000000 --- a/drivers/char/hw_random/via-rng.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * RNG driver for VIA RNGs - * - * Copyright 2005 (c) MontaVista Software, Inc. - * - * with the majority of the code coming from: - * - * Hardware driver for the Intel/AMD/VIA Random Number Generators (RNG) - * (c) Copyright 2003 Red Hat Inc - * - * derived from - * - * Hardware driver for the AMD 768 Random Number Generator (RNG) - * (c) Copyright 2001 Red Hat Inc - * - * derived from - * - * Hardware driver for Intel i810 Random Number Generator (RNG) - * Copyright 2000,2001 Jeff Garzik - * Copyright 2000,2001 Philipp Rumpf - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include -#include - - -#define PFX KBUILD_MODNAME ": " - - -enum { - VIA_STRFILT_CNT_SHIFT = 16, - VIA_STRFILT_FAIL = (1 << 15), - VIA_STRFILT_ENABLE = (1 << 14), - VIA_RAWBITS_ENABLE = (1 << 13), - VIA_RNG_ENABLE = (1 << 6), - VIA_XSTORE_CNT_MASK = 0x0F, - - VIA_RNG_CHUNK_8 = 0x00, /* 64 rand bits, 64 stored bits */ - VIA_RNG_CHUNK_4 = 0x01, /* 32 rand bits, 32 stored bits */ - VIA_RNG_CHUNK_4_MASK = 0xFFFFFFFF, - VIA_RNG_CHUNK_2 = 0x02, /* 16 rand bits, 32 stored bits */ - VIA_RNG_CHUNK_2_MASK = 0xFFFF, - VIA_RNG_CHUNK_1 = 0x03, /* 8 rand bits, 32 stored bits */ - VIA_RNG_CHUNK_1_MASK = 0xFF, -}; - -/* - * Investigate using the 'rep' prefix to obtain 32 bits of random data - * in one insn. The upside is potentially better performance. The - * downside is that the instruction becomes no longer atomic. Due to - * this, just like familiar issues with /dev/random itself, the worst - * case of a 'rep xstore' could potentially pause a cpu for an - * unreasonably long time. In practice, this condition would likely - * only occur when the hardware is failing. (or so we hope :)) - * - * Another possible performance boost may come from simply buffering - * until we have 4 bytes, thus returning a u32 at a time, - * instead of the current u8-at-a-time. - */ - -static inline u32 xstore(u32 *addr, u32 edx_in) -{ - u32 eax_out; - - asm(".byte 0x0F,0xA7,0xC0 /* xstore %%edi (addr=%0) */" - :"=m"(*addr), "=a"(eax_out) - :"D"(addr), "d"(edx_in)); - - return eax_out; -} - -static int via_rng_data_present(struct hwrng *rng) -{ - u32 bytes_out; - u32 *via_rng_datum = (u32 *)(&rng->priv); - - /* We choose the recommended 1-byte-per-instruction RNG rate, - * for greater randomness at the expense of speed. Larger - * values 2, 4, or 8 bytes-per-instruction yield greater - * speed at lesser randomness. - * - * If you change this to another VIA_CHUNK_n, you must also - * change the ->n_bytes values in rng_vendor_ops[] tables. - * VIA_CHUNK_8 requires further code changes. - * - * A copy of MSR_VIA_RNG is placed in eax_out when xstore - * completes. - */ - - *via_rng_datum = 0; /* paranoia, not really necessary */ - bytes_out = xstore(via_rng_datum, VIA_RNG_CHUNK_1); - bytes_out &= VIA_XSTORE_CNT_MASK; - if (bytes_out == 0) - return 0; - return 1; -} - -static int via_rng_data_read(struct hwrng *rng, u32 *data) -{ - u32 via_rng_datum = (u32)rng->priv; - - *data = via_rng_datum; - - return 1; -} - -static int via_rng_init(struct hwrng *rng) -{ - u32 lo, hi, old_lo; - - /* Control the RNG via MSR. Tread lightly and pay very close - * close attention to values written, as the reserved fields - * are documented to be "undefined and unpredictable"; but it - * does not say to write them as zero, so I make a guess that - * we restore the values we find in the register. - */ - rdmsr(MSR_VIA_RNG, lo, hi); - - old_lo = lo; - lo &= ~(0x7f << VIA_STRFILT_CNT_SHIFT); - lo &= ~VIA_XSTORE_CNT_MASK; - lo &= ~(VIA_STRFILT_ENABLE | VIA_STRFILT_FAIL | VIA_RAWBITS_ENABLE); - lo |= VIA_RNG_ENABLE; - - if (lo != old_lo) - wrmsr(MSR_VIA_RNG, lo, hi); - - /* perhaps-unnecessary sanity check; remove after testing if - unneeded */ - rdmsr(MSR_VIA_RNG, lo, hi); - if ((lo & VIA_RNG_ENABLE) == 0) { - printk(KERN_ERR PFX "cannot enable VIA C3 RNG, aborting\n"); - return -ENODEV; - } - - return 0; -} - - -static struct hwrng via_rng = { - .name = "via", - .init = via_rng_init, - .data_present = via_rng_data_present, - .data_read = via_rng_data_read, -}; - - -static int __init mod_init(void) -{ - int err; - - if (!cpu_has_xstore) - return -ENODEV; - printk(KERN_INFO "VIA RNG detected\n"); - err = hwrng_register(&via_rng); - if (err) { - printk(KERN_ERR PFX "RNG registering failed (%d)\n", - err); - goto out; - } -out: - return err; -} - -static void __exit mod_exit(void) -{ - hwrng_unregister(&via_rng); -} - -subsys_initcall(mod_init); -module_exit(mod_exit); - -MODULE_DESCRIPTION("H/W RNG driver for VIA chipsets"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index 353d9f3cf..f3c3aaf45 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c @@ -80,7 +80,7 @@ static int i8k_open_fs(struct inode *inode, struct file *file); static int i8k_ioctl(struct inode *, struct file *, unsigned int, unsigned long); -static const struct file_operations i8k_fops = { +static struct file_operations i8k_fops = { .open = i8k_open_fs, .read = seq_read, .llseek = seq_lseek, diff --git a/drivers/char/ip2/i2ellis.h b/drivers/char/ip2/i2ellis.h index 5eabe47b0..510b026d7 100644 --- a/drivers/char/ip2/i2ellis.h +++ b/drivers/char/ip2/i2ellis.h @@ -47,6 +47,7 @@ //---------------------- // Mandatory Includes: //---------------------- +#include #include "ip2types.h" #include "i2hw.h" // The hardware definitions diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 7907ae88c..03db1cb3f 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -82,6 +82,7 @@ /************/ /* Includes */ /************/ +#include #include #include @@ -90,6 +91,7 @@ #include #include #include +#include #include #include #include @@ -233,7 +235,7 @@ static void *DevTableMem[IP2_MAX_BOARDS]; /* This is the driver descriptor for the ip2ipl device, which is used to * download the loadware to the boards. */ -static const struct file_operations ip2_ipl = { +static struct file_operations ip2_ipl = { .owner = THIS_MODULE, .read = ip2_ipl_read, .write = ip2_ipl_write, @@ -303,7 +305,7 @@ static struct class *ip2_class; // Some functions to keep track of what irq's we have -static int +static int __init is_valid_irq(int irq) { int *i = Valid_Irqs; @@ -314,14 +316,14 @@ is_valid_irq(int irq) return (*i); } -static void +static void __init mark_requested_irq( char irq ) { rirqs[iindx++] = irq; } #ifdef MODULE -static int +static int __init clear_requested_irq( char irq ) { int i; @@ -335,7 +337,7 @@ clear_requested_irq( char irq ) } #endif -static int +static int __init have_requested_irq( char irq ) { // array init to zeros so 0 irq will not be requested as a side effect @@ -412,7 +414,9 @@ cleanup_module(void) /* free io addresses and Tibet */ release_region( ip2config.addr[i], 8 ); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); + devfs_remove("ip2/ipl%d", i); class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); + devfs_remove("ip2/stat%d", i); } /* Disable and remove interrupt handler. */ if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { @@ -421,6 +425,7 @@ cleanup_module(void) } } class_destroy(ip2_class); + devfs_remove("ip2"); if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); } @@ -491,8 +496,8 @@ static struct tty_operations ip2_ops = { /* initialisation of the devices and driver structures, and registers itself */ /* with the relevant kernel modules. */ /******************************************************************************/ -/* IRQF_DISABLED - if set blocks all interrupts else only this line */ -/* IRQF_SHARED - for shared irq PCI or maybe EISA only */ +/* SA_INTERRUPT- if set blocks all interrupts else only this line */ +/* SA_SHIRQ - for shared irq PCI or maybe EISA only */ /* SA_RANDOM - can be source for cert. random number generators */ #define IP2_SA_FLAGS 0 @@ -670,6 +675,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) ip2_tty_driver->owner = THIS_MODULE; ip2_tty_driver->name = "ttyF"; + ip2_tty_driver->devfs_name = "tts/F"; ip2_tty_driver->driver_name = pcDriver_name; ip2_tty_driver->major = IP2_TTY_MAJOR; ip2_tty_driver->minor_start = 0; @@ -677,7 +683,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) ip2_tty_driver->subtype = SERIAL_TYPE_NORMAL; ip2_tty_driver->init_termios = tty_std_termios; ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; - ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + ip2_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; tty_set_operations(ip2_tty_driver, &ip2_ops); ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 ); @@ -718,9 +724,26 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize) class_device_create(ip2_class, NULL, MKDEV(IP2_IPL_MAJOR, 4 * i), NULL, "ipl%d", i); + err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), + S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, + "ip2/ipl%d", i); + if (err) { + class_device_destroy(ip2_class, + MKDEV(IP2_IPL_MAJOR, 4 * i)); + goto out_class; + } + class_device_create(ip2_class, NULL, MKDEV(IP2_IPL_MAJOR, 4 * i + 1), NULL, "stat%d", i); + err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), + S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, + "ip2/stat%d", i); + if (err) { + class_device_destroy(ip2_class, + MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); + goto out_class; + } for ( box = 0; box < ABS_MAX_BOXES; ++box ) { @@ -753,7 +776,7 @@ retry: if (have_requested_irq(ip2config.irq[i])) continue; rc = request_irq( ip2config.irq[i], ip2_interrupt, - IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0), + IP2_SA_FLAGS | (ip2config.type[i] == PCI ? SA_SHIRQ : 0), pcName, (void *)&pcName); if (rc) { printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); @@ -795,7 +818,7 @@ EXPORT_SYMBOL(ip2_loadmain); /* the board, the channel structures are initialized, and the board details */ /* are reported on the console. */ /******************************************************************************/ -static void +static void __init ip2_init_board( int boardnum ) { int i; @@ -938,7 +961,7 @@ err_initialize: /* EISA motherboard, or no valid board ID is selected it returns 0. Otherwise */ /* it returns the base address of the controller. */ /******************************************************************************/ -static unsigned short +static unsigned short __init find_eisa_board( int start_slot ) { int i, j; @@ -3186,10 +3209,3 @@ ip2trace (unsigned short pn, unsigned char cat, unsigned char label, unsigned lo MODULE_LICENSE("GPL"); - -static struct pci_device_id ip2main_pci_tbl[] __devinitdata = { - { PCI_DEVICE(PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_IP2EX) }, - { } -}; - -MODULE_DEVICE_TABLE(pci, ip2main_pci_tbl); diff --git a/drivers/char/ip27-rtc.c b/drivers/char/ip27-rtc.c index a48da02aa..3acdac3c9 100644 --- a/drivers/char/ip27-rtc.c +++ b/drivers/char/ip27-rtc.c @@ -196,7 +196,7 @@ static int rtc_release(struct inode *inode, struct file *file) * The various file operations we support. */ -static const struct file_operations rtc_fops = { +static struct file_operations rtc_fops = { .owner = THIS_MODULE, .ioctl = rtc_ioctl, .open = rtc_open, diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index 68d7c61a8..e1c953749 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c @@ -31,6 +31,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -765,7 +767,7 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd, } #endif -static const struct file_operations ipmi_fops = { +static struct file_operations ipmi_fops = { .owner = THIS_MODULE, .ioctl = ipmi_ioctl, #ifdef CONFIG_COMPAT @@ -802,6 +804,9 @@ static void ipmi_new_smi(int if_num, struct device *device) dev_t dev = MKDEV(ipmi_major, if_num); struct ipmi_reg_list *entry; + devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, + "ipmidev/%d", if_num); + entry = kmalloc(sizeof(*entry), GFP_KERNEL); if (!entry) { printk(KERN_ERR "ipmi_devintf: Unable to create the" @@ -831,6 +836,7 @@ static void ipmi_smi_gone(int if_num) } class_device_destroy(ipmi_class, dev); mutex_unlock(®_list_mutex); + devfs_remove("ipmidev/%d", if_num); } static struct ipmi_smi_watcher smi_watcher = @@ -866,6 +872,8 @@ static __init int init_ipmi_devintf(void) ipmi_major = rv; } + devfs_mk_dir(DEVICE_NAME); + rv = ipmi_smi_watcher_register(&smi_watcher); if (rv) { unregister_chrdev(ipmi_major, DEVICE_NAME); @@ -890,6 +898,7 @@ static __exit void cleanup_ipmi(void) mutex_unlock(®_list_mutex); class_destroy(ipmi_class); ipmi_smi_watcher_unregister(&smi_watcher); + devfs_remove(DEVICE_NAME); unregister_chrdev(ipmi_major, DEVICE_NAME); } module_exit(cleanup_ipmi); diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 843d34c86..9f2f8fdec 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -31,6 +31,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -56,7 +57,8 @@ static int ipmi_init_msghandler(void); static int initialized = 0; #ifdef CONFIG_PROC_FS -static struct proc_dir_entry *proc_ipmi_root = NULL; +struct proc_dir_entry *proc_ipmi_root = NULL; +EXPORT_SYMBOL(proc_ipmi_root); #endif /* CONFIG_PROC_FS */ #define MAX_EVENTS_IN_QUEUE 25 @@ -934,8 +936,11 @@ int ipmi_set_gets_events(ipmi_user_t user, int val) if (val) { /* Deliver any queued events. */ - list_for_each_entry_safe(msg, msg2, &intf->waiting_events, link) - list_move_tail(&msg->link, &msgs); + list_for_each_entry_safe(msg, msg2, &intf->waiting_events, + link) { + list_del(&msg->link); + list_add_tail(&msg->link, &msgs); + } intf->waiting_events_count = 0; } @@ -3428,7 +3433,6 @@ struct ipmi_recv_msg *ipmi_alloc_recv_msg(void) rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC); if (rv) { - rv->user = NULL; rv->done = free_recv_msg; atomic_inc(&recv_msg_inuse_count); } @@ -3673,7 +3677,7 @@ static void send_panic_events(char *str) } #endif /* CONFIG_IPMI_PANIC_EVENT */ -static int has_panicked = 0; +static int has_paniced = 0; static int panic_event(struct notifier_block *this, unsigned long event, @@ -3682,9 +3686,9 @@ static int panic_event(struct notifier_block *this, int i; ipmi_smi_t intf; - if (has_panicked) + if (has_paniced) return NOTIFY_DONE; - has_panicked = 1; + has_paniced = 1; /* For every registered interface, set it to run to completion. */ for (i = 0; i < MAX_IPMI_INTERFACES; i++) { @@ -3738,8 +3742,11 @@ static int ipmi_init_msghandler(void) proc_ipmi_root->owner = THIS_MODULE; #endif /* CONFIG_PROC_FS */ - setup_timer(&ipmi_timer, ipmi_timeout, 0); - mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); + init_timer(&ipmi_timer); + ipmi_timer.data = 0; + ipmi_timer.function = ipmi_timeout; + ipmi_timer.expires = jiffies + IPMI_TIMEOUT_JIFFIES; + add_timer(&ipmi_timer); atomic_notifier_chain_register(&panic_notifier_list, &panic_block); diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index 8d941db83..d0b5c08e7 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -31,6 +31,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 5292258cc..02a7dd7a8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -38,6 +38,7 @@ * and drives the real SMI state machine. */ +#include #include #include #include @@ -54,6 +55,23 @@ #include #include #include +#ifdef CONFIG_HIGH_RES_TIMERS +#include +# if defined(schedule_next_int) +/* Old high-res timer code, do translations. */ +# define get_arch_cycles(a) quick_update_jiffies_sub(a) +# define arch_cycles_per_jiffy cycles_per_jiffies +# endif +static inline void add_usec_to_timer(struct timer_list *t, long v) +{ + t->arch_cycle_expires += nsec_to_arch_cycle(v * 1000); + while (t->arch_cycle_expires >= arch_cycles_per_jiffy) + { + t->expires++; + t->arch_cycle_expires -= arch_cycles_per_jiffy; + } +} +#endif #include #include #include @@ -225,6 +243,8 @@ static int register_xaction_notifier(struct notifier_block * nb) return atomic_notifier_chain_register(&xaction_notifier_list, nb); } +static void si_restart_short_timer(struct smi_info *smi_info); + static void deliver_recv_msg(struct smi_info *smi_info, struct ipmi_smi_msg *msg) { @@ -402,10 +422,10 @@ static void handle_flags(struct smi_info *smi_info) smi_info->curr_msg->data, smi_info->curr_msg->data_size); smi_info->si_state = SI_GETTING_EVENTS; - } else if (smi_info->msg_flags & OEM_DATA_AVAIL && - smi_info->oem_data_avail_handler) { - if (smi_info->oem_data_avail_handler(smi_info)) - goto retry; + } else if (smi_info->msg_flags & OEM_DATA_AVAIL) { + if (smi_info->oem_data_avail_handler) + if (smi_info->oem_data_avail_handler(smi_info)) + goto retry; } else { smi_info->si_state = SI_NORMAL; } @@ -748,6 +768,7 @@ static void sender(void *send_info, && (smi_info->curr_msg == NULL)) { start_next_msg(smi_info); + si_restart_short_timer(smi_info); } spin_unlock_irqrestore(&(smi_info->si_lock), flags); } @@ -788,7 +809,7 @@ static int ipmi_thread(void *data) /* do nothing */ } else if (smi_result == SI_SM_CALL_WITH_DELAY) - schedule(); + udelay(1); else schedule_timeout_interruptible(1); } @@ -812,6 +833,37 @@ static void request_events(void *send_info) static int initialized = 0; +/* Must be called with interrupts off and with the si_lock held. */ +static void si_restart_short_timer(struct smi_info *smi_info) +{ +#if defined(CONFIG_HIGH_RES_TIMERS) + unsigned long flags; + unsigned long jiffies_now; + unsigned long seq; + + if (del_timer(&(smi_info->si_timer))) { + /* If we don't delete the timer, then it will go off + immediately, anyway. So we only process if we + actually delete the timer. */ + + do { + seq = read_seqbegin_irqsave(&xtime_lock, flags); + jiffies_now = jiffies; + smi_info->si_timer.expires = jiffies_now; + smi_info->si_timer.arch_cycle_expires + = get_arch_cycles(jiffies_now); + } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); + + add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC); + + add_timer(&(smi_info->si_timer)); + spin_lock_irqsave(&smi_info->count_lock, flags); + smi_info->timeout_restarts++; + spin_unlock_irqrestore(&smi_info->count_lock, flags); + } +#endif +} + static void smi_timeout(unsigned long data) { struct smi_info *smi_info = (struct smi_info *) data; @@ -852,15 +904,31 @@ static void smi_timeout(unsigned long data) /* If the state machine asks for a short delay, then shorten the timer timeout. */ if (smi_result == SI_SM_CALL_WITH_DELAY) { +#if defined(CONFIG_HIGH_RES_TIMERS) + unsigned long seq; +#endif spin_lock_irqsave(&smi_info->count_lock, flags); smi_info->short_timeouts++; spin_unlock_irqrestore(&smi_info->count_lock, flags); +#if defined(CONFIG_HIGH_RES_TIMERS) + do { + seq = read_seqbegin_irqsave(&xtime_lock, flags); + smi_info->si_timer.expires = jiffies; + smi_info->si_timer.arch_cycle_expires + = get_arch_cycles(smi_info->si_timer.expires); + } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); + add_usec_to_timer(&smi_info->si_timer, SI_SHORT_TIMEOUT_USEC); +#else smi_info->si_timer.expires = jiffies + 1; +#endif } else { spin_lock_irqsave(&smi_info->count_lock, flags); smi_info->long_timeouts++; spin_unlock_irqrestore(&smi_info->count_lock, flags); smi_info->si_timer.expires = jiffies + SI_TIMEOUT_JIFFIES; +#if defined(CONFIG_HIGH_RES_TIMERS) + smi_info->si_timer.arch_cycle_expires = 0; +#endif } do_add_timer: @@ -1041,7 +1109,7 @@ static int std_irq_setup(struct smi_info *info) if (info->si_type == SI_BT) { rv = request_irq(info->irq, si_bt_irq_handler, - IRQF_DISABLED, + SA_INTERRUPT, DEVICE_NAME, info); if (!rv) @@ -1051,7 +1119,7 @@ static int std_irq_setup(struct smi_info *info) } else rv = request_irq(info->irq, si_irq_handler, - IRQF_DISABLED, + SA_INTERRUPT, DEVICE_NAME, info); if (rv) { @@ -1845,7 +1913,7 @@ static int ipmi_pci_resume(struct pci_dev *pdev) static struct pci_device_id ipmi_pci_devices[] = { { PCI_DEVICE(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID) }, - { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE_MASK) } + { PCI_DEVICE_CLASS(PCI_ERMC_CLASSCODE, PCI_ERMC_CLASSCODE) } }; MODULE_DEVICE_TABLE(pci, ipmi_pci_devices); @@ -2481,7 +2549,6 @@ static __devinit int init_ipmi_si(void) #ifdef CONFIG_PCI pci_unregister_driver(&ipmi_pci_driver); #endif - driver_unregister(&ipmi_driver); printk("ipmi_si: Unable to find any System Interface(s)\n"); return -ENODEV; } else { diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index accaaf1a6..2d11ddd99 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -31,6 +31,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -211,16 +212,24 @@ static int set_param_str(const char *val, struct kernel_param *kp) { action_fn fn = (action_fn) kp->arg; int rv = 0; - char *dup, *s; - - dup = kstrdup(val, GFP_KERNEL); - if (!dup) - return -ENOMEM; - - s = strstrip(dup); + const char *end; + char valcp[16]; + int len; + + /* Truncate leading and trailing spaces. */ + while (isspace(*val)) + val++; + end = val + strlen(val) - 1; + while ((end >= val) && isspace(*end)) + end--; + len = end - val + 1; + if (len > sizeof(valcp) - 1) + return -EINVAL; + memcpy(valcp, val, len); + valcp[len] = '\0'; down_read(®ister_sem); - rv = fn(s, NULL); + rv = fn(valcp, NULL); if (rv) goto out_unlock; @@ -230,7 +239,6 @@ static int set_param_str(const char *val, struct kernel_param *kp) out_unlock: up_read(®ister_sem); - kfree(dup); return rv; } @@ -807,7 +815,7 @@ static int ipmi_close(struct inode *ino, struct file *filep) return 0; } -static const struct file_operations ipmi_wdog_fops = { +static struct file_operations ipmi_wdog_fops = { .owner = THIS_MODULE, .read = ipmi_read, .poll = ipmi_poll, @@ -948,10 +956,9 @@ static int wdog_reboot_handler(struct notifier_block *this, /* Disable the WDT if we are shutting down. */ ipmi_watchdog_state = WDOG_TIMEOUT_NONE; panic_halt_ipmi_set_timeout(); - } else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) { + } else { /* Set a long timer to let the reboot happens, but - reboot if it hangs, but only if the watchdog - timer was already running. */ + reboot if it hangs. */ timeout = 120; pretimeout = 0; ipmi_watchdog_state = WDOG_TIMEOUT_RESET; @@ -973,17 +980,16 @@ static int wdog_panic_handler(struct notifier_block *this, { static int panic_event_handled = 0; - /* On a panic, if we have a panic timeout, make sure to extend - the watchdog timer to a reasonable value to complete the - panic, if the watchdog timer is running. Plus the - pretimeout is meaningless at panic time. */ - if (watchdog_user && !panic_event_handled && - ipmi_watchdog_state != WDOG_TIMEOUT_NONE) { - /* Make sure we do this only once. */ + /* On a panic, if we have a panic timeout, make sure that the thing + reboots, even if it hangs during that panic. */ + if (watchdog_user && !panic_event_handled) { + /* Make sure the panic doesn't hang, and make sure we + do this only once. */ panic_event_handled = 1; timeout = 255; pretimeout = 0; + ipmi_watchdog_state = WDOG_TIMEOUT_RESET; panic_halt_ipmi_set_timeout(); } diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index d4f6361a1..e9ebabaf8 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -245,7 +245,7 @@ static int lock_card(struct isi_board *card) printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", card->base); - return 0; /* Failed to acquire the card! */ + return 0; /* Failed to aquire the card! */ } static int lock_card_at_interrupt(struct isi_board *card) @@ -262,7 +262,7 @@ static int lock_card_at_interrupt(struct isi_board *card) spin_unlock_irqrestore(&card->card_lock, card->flags); } /* Failing in interrupt is an acceptable event */ - return 0; /* Failed to acquire the card! */ + return 0; /* Failed to aquire the card! */ } static void unlock_card(struct isi_board *card) @@ -1062,12 +1062,11 @@ static void isicom_shutdown_port(struct isi_port *port) static void isicom_close(struct tty_struct *tty, struct file *filp) { struct isi_port *port = tty->driver_data; - struct isi_board *card; + struct isi_board *card = port->card; unsigned long flags; if (!port) return; - card = port->card; if (isicom_paranoia_check(port, tty->name, "isicom_close")) return; @@ -1146,7 +1145,7 @@ static int isicom_write(struct tty_struct *tty, const unsigned char *buf, if (isicom_paranoia_check(port, tty->name, "isicom_write")) return 0; - if (!port->xmit_buf) + if (!tty || !port->xmit_buf) return 0; spin_lock_irqsave(&card->card_lock, flags); @@ -1181,7 +1180,7 @@ static void isicom_put_char(struct tty_struct *tty, unsigned char ch) if (isicom_paranoia_check(port, tty->name, "isicom_put_char")) return; - if (!port->xmit_buf) + if (!tty || !port->xmit_buf) return; spin_lock_irqsave(&card->card_lock, flags); @@ -1582,6 +1581,7 @@ static int __devinit isicom_register_tty_driver(void) isicom_normal->owner = THIS_MODULE; isicom_normal->name = "ttyM"; + isicom_normal->devfs_name = "isicom/"; isicom_normal->major = ISICOM_NMAJOR; isicom_normal->minor_start = 0; isicom_normal->type = TTY_DRIVER_TYPE_SERIAL; @@ -1615,14 +1615,14 @@ static int __devinit isicom_register_isr(struct pci_dev *pdev, const unsigned int index) { struct isi_board *board = pci_get_drvdata(pdev); - unsigned long irqflags = IRQF_DISABLED; + unsigned long irqflags = SA_INTERRUPT; int retval = -EINVAL; if (!board->base) goto end; if (board->isa == NO) - irqflags |= IRQF_SHARED; + irqflags |= SA_SHIRQ; retval = request_irq(board->irq, isicom_interrupt, irqflags, ISICOM_NAME, board); diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 84dfc4278..ef20c1fc9 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -26,6 +26,7 @@ /*****************************************************************************/ +#include #include #include #include @@ -38,14 +39,16 @@ #include #include #include +#include #include #include -#include #include #include +#ifdef CONFIG_PCI #include +#endif /*****************************************************************************/ @@ -134,10 +137,6 @@ static stlconf_t stli_brdconf[] = { static int stli_nrbrds = ARRAY_SIZE(stli_brdconf); -/* stli_lock must NOT be taken holding brd_lock */ -static spinlock_t stli_lock; /* TTY logic lock */ -static spinlock_t brd_lock; /* Board logic lock */ - /* * There is some experimental EISA board detection code in this driver. * By default it is disabled, but for those that want to try it out, @@ -174,6 +173,14 @@ static char *stli_serialname = "ttyE"; static struct tty_driver *stli_serial; +/* + * We will need to allocate a temporary write buffer for chars that + * come direct from user space. The problem is that a copy from user + * space might cause a page fault (typically on a system that is + * swapping!). All ports will share one buffer - since if the system + * is already swapping a shared buffer won't make things any worse. + */ +static char *stli_tmpwritebuf; #define STLI_TXBUFSIZE 4096 @@ -281,6 +288,7 @@ static char *stli_brdnames[] = { /*****************************************************************************/ +#ifdef MODULE /* * Define some string labels for arguments passed from the module * load line. These allow for easy board definitions, and easy @@ -379,6 +387,8 @@ MODULE_PARM_DESC(board2, "Board 2 config -> name[,ioaddr[,memaddr]"); module_param_array(board3, charp, NULL, 0); MODULE_PARM_DESC(board3, "Board 3 config -> name[,ioaddr[,memaddr]"); +#endif + /* * Set up a default memory address table for EISA board probing. * The default addresses are all bellow 1Mbyte, which has to be the @@ -409,7 +419,7 @@ static int stli_eisamempsize = ARRAY_SIZE(stli_eisamemprobeaddrs); #endif static struct pci_device_id istallion_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECRA), }, + { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECRA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0 } }; MODULE_DEVICE_TABLE(pci, istallion_pci_tbl); @@ -639,8 +649,14 @@ static unsigned int stli_baudrates[] = { * Prototype all functions in this driver! */ +#ifdef MODULE +static void stli_argbrds(void); static int stli_parsebrd(stlconf_t *confp, char **argp); -static int stli_init(void); + +static unsigned long stli_atol(char *str); +#endif + +int stli_init(void); static int stli_open(struct tty_struct *tty, struct file *filp); static void stli_close(struct tty_struct *tty, struct file *filp); static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); @@ -666,7 +682,7 @@ static int stli_startbrd(stlibrd_t *brdp); static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp); static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp); static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); -static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp); +static void stli_brdpoll(stlibrd_t *brdp, volatile cdkhdr_t *hdrp); static void stli_poll(unsigned long arg); static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp); static int stli_initopen(stlibrd_t *brdp, stliport_t *portp); @@ -677,8 +693,7 @@ static void stli_dohangup(void *arg); static int stli_setport(stliport_t *portp); static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); -static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); -static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp); +static void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp); static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp); static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts); static long stli_mktiocm(unsigned long sigvalue); @@ -748,7 +763,7 @@ static int stli_initpcibrd(int brdtype, struct pci_dev *devp); * will give access to the shared memory on the Stallion intelligent * board. This is also a very useful debugging tool. */ -static const struct file_operations stli_fsiomem = { +static struct file_operations stli_fsiomem = { .owner = THIS_MODULE, .read = stli_memread, .write = stli_memwrite, @@ -776,14 +791,26 @@ static int stli_timeron; static struct class *istallion_class; +#ifdef MODULE + /* * Loadable module initialization stuff. */ static int __init istallion_module_init(void) { + unsigned long flags; + +#ifdef DEBUG + printk("init_module()\n"); +#endif + + save_flags(flags); + cli(); stli_init(); - return 0; + restore_flags(flags); + + return(0); } /*****************************************************************************/ @@ -792,43 +819,56 @@ static void __exit istallion_module_exit(void) { stlibrd_t *brdp; stliport_t *portp; + unsigned long flags; int i, j; +#ifdef DEBUG + printk("cleanup_module()\n"); +#endif + printk(KERN_INFO "Unloading %s: version %s\n", stli_drvtitle, stli_drvversion); - /* - * Free up all allocated resources used by the ports. This includes - * memory and interrupts. - */ + save_flags(flags); + cli(); + +/* + * Free up all allocated resources used by the ports. This includes + * memory and interrupts. + */ if (stli_timeron) { stli_timeron = 0; - del_timer_sync(&stli_timerlist); + del_timer(&stli_timerlist); } i = tty_unregister_driver(stli_serial); if (i) { printk("STALLION: failed to un-register tty driver, " "errno=%d\n", -i); + restore_flags(flags); return; } put_tty_driver(stli_serial); - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { + devfs_remove("staliomem/%d", i); class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, i)); + } + devfs_remove("staliomem"); class_destroy(istallion_class); if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) printk("STALLION: failed to un-register serial memory device, " "errno=%d\n", -i); + kfree(stli_tmpwritebuf); kfree(stli_txcookbuf); for (i = 0; (i < stli_nrbrds); i++) { - if ((brdp = stli_brds[i]) == NULL) + if ((brdp = stli_brds[i]) == (stlibrd_t *) NULL) continue; for (j = 0; (j < STL_MAXPORTS); j++) { portp = brdp->ports[j]; - if (portp != NULL) { - if (portp->tty != NULL) + if (portp != (stliport_t *) NULL) { + if (portp->tty != (struct tty_struct *) NULL) tty_hangup(portp->tty); kfree(portp); } @@ -838,8 +878,10 @@ static void __exit istallion_module_exit(void) if (brdp->iosize > 0) release_region(brdp->iobase, brdp->iosize); kfree(brdp); - stli_brds[i] = NULL; + stli_brds[i] = (stlibrd_t *) NULL; } + + restore_flags(flags); } module_init(istallion_module_init); @@ -853,15 +895,19 @@ module_exit(istallion_module_exit); static void stli_argbrds(void) { - stlconf_t conf; - stlibrd_t *brdp; - int i; + stlconf_t conf; + stlibrd_t *brdp; + int i; + +#ifdef DEBUG + printk("stli_argbrds()\n"); +#endif for (i = stli_nrbrds; i < ARRAY_SIZE(stli_brdsp); i++) { memset(&conf, 0, sizeof(conf)); if (stli_parsebrd(&conf, stli_brdsp[i]) == 0) continue; - if ((brdp = stli_allocbrd()) == NULL) + if ((brdp = stli_allocbrd()) == (stlibrd_t *) NULL) continue; stli_nrbrds = i + 1; brdp->brdnr = i; @@ -880,9 +926,9 @@ static void stli_argbrds(void) static unsigned long stli_atol(char *str) { - unsigned long val; - int base, c; - char *sp; + unsigned long val; + int base, c; + char *sp; val = 0; sp = str; @@ -916,11 +962,15 @@ static unsigned long stli_atol(char *str) static int stli_parsebrd(stlconf_t *confp, char **argp) { - char *sp; - int i; + char *sp; + int i; - if (argp[0] == NULL || *argp[0] == 0) - return 0; +#ifdef DEBUG + printk("stli_parsebrd(confp=%x,argp=%x)\n", (int) confp, (int) argp); +#endif + + if ((argp[0] == (char *) NULL) || (*argp[0] == 0)) + return(0); for (sp = argp[0], i = 0; ((*sp != 0) && (i < 25)); sp++, i++) *sp = TOLOWER(*sp); @@ -935,40 +985,47 @@ static int stli_parsebrd(stlconf_t *confp, char **argp) } confp->brdtype = stli_brdstr[i].type; - if (argp[1] != NULL && *argp[1] != 0) + if ((argp[1] != (char *) NULL) && (*argp[1] != 0)) confp->ioaddr1 = stli_atol(argp[1]); - if (argp[2] != NULL && *argp[2] != 0) + if ((argp[2] != (char *) NULL) && (*argp[2] != 0)) confp->memaddr = stli_atol(argp[2]); return(1); } +#endif + /*****************************************************************************/ static int stli_open(struct tty_struct *tty, struct file *filp) { - stlibrd_t *brdp; - stliport_t *portp; - unsigned int minordev; - int brdnr, portnr, rc; + stlibrd_t *brdp; + stliport_t *portp; + unsigned int minordev; + int brdnr, portnr, rc; + +#ifdef DEBUG + printk("stli_open(tty=%x,filp=%x): device=%s\n", (int) tty, + (int) filp, tty->name); +#endif minordev = tty->index; brdnr = MINOR2BRD(minordev); if (brdnr >= stli_nrbrds) - return -ENODEV; + return(-ENODEV); brdp = stli_brds[brdnr]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); if ((brdp->state & BST_STARTED) == 0) - return -ENODEV; + return(-ENODEV); portnr = MINOR2PORT(minordev); if ((portnr < 0) || (portnr > brdp->nrports)) - return -ENODEV; + return(-ENODEV); portp = brdp->ports[portnr]; - if (portp == NULL) - return -ENODEV; + if (portp == (stliport_t *) NULL) + return(-ENODEV); if (portp->devnr < 1) - return -ENODEV; + return(-ENODEV); /* @@ -980,8 +1037,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp) if (portp->flags & ASYNC_CLOSING) { interruptible_sleep_on(&portp->close_wait); if (portp->flags & ASYNC_HUP_NOTIFY) - return -EAGAIN; - return -ERESTARTSYS; + return(-EAGAIN); + return(-ERESTARTSYS); } /* @@ -997,7 +1054,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp) wait_event_interruptible(portp->raw_wait, !test_bit(ST_INITIALIZING, &portp->state)); if (signal_pending(current)) - return -ERESTARTSYS; + return(-ERESTARTSYS); if ((portp->flags & ASYNC_INITIALIZED) == 0) { set_bit(ST_INITIALIZING, &portp->state); @@ -1008,7 +1065,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp) clear_bit(ST_INITIALIZING, &portp->state); wake_up_interruptible(&portp->raw_wait); if (rc < 0) - return rc; + return(rc); } /* @@ -1020,8 +1077,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp) if (portp->flags & ASYNC_CLOSING) { interruptible_sleep_on(&portp->close_wait); if (portp->flags & ASYNC_HUP_NOTIFY) - return -EAGAIN; - return -ERESTARTSYS; + return(-EAGAIN); + return(-ERESTARTSYS); } /* @@ -1031,33 +1088,38 @@ static int stli_open(struct tty_struct *tty, struct file *filp) */ if (!(filp->f_flags & O_NONBLOCK)) { if ((rc = stli_waitcarrier(brdp, portp, filp)) != 0) - return rc; + return(rc); } portp->flags |= ASYNC_NORMAL_ACTIVE; - return 0; + return(0); } /*****************************************************************************/ static void stli_close(struct tty_struct *tty, struct file *filp) { - stlibrd_t *brdp; - stliport_t *portp; - unsigned long flags; + stlibrd_t *brdp; + stliport_t *portp; + unsigned long flags; + +#ifdef DEBUG + printk("stli_close(tty=%x,filp=%x)\n", (int) tty, (int) filp); +#endif portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - spin_lock_irqsave(&stli_lock, flags); + save_flags(flags); + cli(); if (tty_hung_up_p(filp)) { - spin_unlock_irqrestore(&stli_lock, flags); + restore_flags(flags); return; } if ((tty->count == 1) && (portp->refcount != 1)) portp->refcount = 1; if (portp->refcount-- > 1) { - spin_unlock_irqrestore(&stli_lock, flags); + restore_flags(flags); return; } @@ -1072,8 +1134,6 @@ static void stli_close(struct tty_struct *tty, struct file *filp) if (tty == stli_txcooktty) stli_flushchars(tty); tty->closing = 1; - spin_unlock_irqrestore(&stli_lock, flags); - if (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE) tty_wait_until_sent(tty, portp->closing_wait); @@ -1097,7 +1157,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp) stli_flushbuffer(tty); tty->closing = 0; - portp->tty = NULL; + portp->tty = (struct tty_struct *) NULL; if (portp->openwaitcnt) { if (portp->close_delay) @@ -1107,6 +1167,7 @@ static void stli_close(struct tty_struct *tty, struct file *filp) portp->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); wake_up_interruptible(&portp->close_wait); + restore_flags(flags); } /*****************************************************************************/ @@ -1121,41 +1182,45 @@ static void stli_close(struct tty_struct *tty, struct file *filp) static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) { - struct tty_struct *tty; - asynotify_t nt; - asyport_t aport; - int rc; + struct tty_struct *tty; + asynotify_t nt; + asyport_t aport; + int rc; + +#ifdef DEBUG + printk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp); +#endif if ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0) - return rc; + return(rc); memset(&nt, 0, sizeof(asynotify_t)); nt.data = (DT_TXLOW | DT_TXEMPTY | DT_RXBUSY | DT_RXBREAK); nt.signal = SG_DCD; if ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0) - return rc; + return(rc); tty = portp->tty; - if (tty == NULL) - return -ENODEV; + if (tty == (struct tty_struct *) NULL) + return(-ENODEV); stli_mkasyport(portp, &aport, tty->termios); if ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0) - return rc; + return(rc); set_bit(ST_GETSIGS, &portp->state); if ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0) - return rc; + return(rc); if (test_and_clear_bit(ST_GETSIGS, &portp->state)) portp->sigs = stli_mktiocm(portp->asig.sigvalue); stli_mkasysigs(&portp->asig, 1, 1); if ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0) - return rc; + return(rc); - return 0; + return(0); } /*****************************************************************************/ @@ -1169,15 +1234,22 @@ static int stli_initopen(stlibrd_t *brdp, stliport_t *portp) static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) { - cdkhdr_t __iomem *hdrp; - cdkctrl_t __iomem *cp; - unsigned char __iomem *bits; - unsigned long flags; - int rc; + volatile cdkhdr_t *hdrp; + volatile cdkctrl_t *cp; + volatile unsigned char *bits; + unsigned long flags; + int rc; + +#ifdef DEBUG + printk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", + (int) brdp, (int) portp, (int) arg, wait); +#endif /* * Send a message to the slave to open this port. */ + save_flags(flags); + cli(); /* * Slave is already closing this port. This can happen if a hangup @@ -1188,6 +1260,7 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i wait_event_interruptible(portp->raw_wait, !test_bit(ST_CLOSING, &portp->state)); if (signal_pending(current)) { + restore_flags(flags); return -ERESTARTSYS; } @@ -1196,20 +1269,19 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i * memory. Once the message is in set the service bits to say that * this port wants service. */ - spin_lock_irqsave(&brd_lock, flags); EBRDENABLE(brdp); - cp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; - writel(arg, &cp->openarg); - writeb(1, &cp->open); - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - bits = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset + + cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; + cp->openarg = arg; + cp->open = 1; + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; - writeb(readb(bits) | portp->portbit, bits); + *bits |= portp->portbit; EBRDDISABLE(brdp); if (wait == 0) { - spin_unlock_irqrestore(&brd_lock, flags); - return 0; + restore_flags(flags); + return(0); } /* @@ -1218,16 +1290,15 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i */ rc = 0; set_bit(ST_OPENING, &portp->state); - spin_unlock_irqrestore(&brd_lock, flags); - wait_event_interruptible(portp->raw_wait, !test_bit(ST_OPENING, &portp->state)); if (signal_pending(current)) rc = -ERESTARTSYS; + restore_flags(flags); if ((rc == 0) && (portp->rc != 0)) rc = -EIO; - return rc; + return(rc); } /*****************************************************************************/ @@ -1240,11 +1311,19 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait) { - cdkhdr_t __iomem *hdrp; - cdkctrl_t __iomem *cp; - unsigned char __iomem *bits; - unsigned long flags; - int rc; + volatile cdkhdr_t *hdrp; + volatile cdkctrl_t *cp; + volatile unsigned char *bits; + unsigned long flags; + int rc; + +#ifdef DEBUG + printk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", + (int) brdp, (int) portp, (int) arg, wait); +#endif + + save_flags(flags); + cli(); /* * Slave is already closing this port. This can happen if a hangup @@ -1254,6 +1333,7 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, wait_event_interruptible(portp->raw_wait, !test_bit(ST_CLOSING, &portp->state)); if (signal_pending(current)) { + restore_flags(flags); return -ERESTARTSYS; } } @@ -1261,22 +1341,21 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, /* * Write the close command into shared memory. */ - spin_lock_irqsave(&brd_lock, flags); EBRDENABLE(brdp); - cp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; - writel(arg, &cp->closearg); - writeb(1, &cp->close); - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - bits = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset + + cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; + cp->closearg = arg; + cp->close = 1; + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; - writeb(readb(bits) |portp->portbit, bits); + *bits |= portp->portbit; EBRDDISABLE(brdp); set_bit(ST_CLOSING, &portp->state); - spin_unlock_irqrestore(&brd_lock, flags); - - if (wait == 0) - return 0; + if (wait == 0) { + restore_flags(flags); + return(0); + } /* * Slave is in action, so now we must wait for the open acknowledgment @@ -1287,10 +1366,11 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, !test_bit(ST_CLOSING, &portp->state)); if (signal_pending(current)) rc = -ERESTARTSYS; + restore_flags(flags); if ((rc == 0) && (portp->rc != 0)) rc = -EIO; - return rc; + return(rc); } /*****************************************************************************/ @@ -1304,21 +1384,36 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) { + unsigned long flags; + +#ifdef DEBUG + printk("stli_cmdwait(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," + "copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, + (int) arg, size, copyback); +#endif + + save_flags(flags); + cli(); wait_event_interruptible(portp->raw_wait, !test_bit(ST_CMDING, &portp->state)); - if (signal_pending(current)) + if (signal_pending(current)) { + restore_flags(flags); return -ERESTARTSYS; + } stli_sendcmd(brdp, portp, cmd, arg, size, copyback); wait_event_interruptible(portp->raw_wait, !test_bit(ST_CMDING, &portp->state)); - if (signal_pending(current)) + if (signal_pending(current)) { + restore_flags(flags); return -ERESTARTSYS; + } + restore_flags(flags); if (portp->rc != 0) - return -EIO; - return 0; + return(-EIO); + return(0); } /*****************************************************************************/ @@ -1330,18 +1425,22 @@ static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v static int stli_setport(stliport_t *portp) { - stlibrd_t *brdp; - asyport_t aport; + stlibrd_t *brdp; + asyport_t aport; - if (portp == NULL) - return -ENODEV; - if (portp->tty == NULL) - return -ENODEV; - if (portp->brdnr < 0 && portp->brdnr >= stli_nrbrds) - return -ENODEV; +#ifdef DEBUG + printk("stli_setport(portp=%x)\n", (int) portp); +#endif + + if (portp == (stliport_t *) NULL) + return(-ENODEV); + if (portp->tty == (struct tty_struct *) NULL) + return(-ENODEV); + if ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds)) + return(-ENODEV); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); stli_mkasyport(portp, &aport, portp->tty->termios); return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)); @@ -1356,8 +1455,13 @@ static int stli_setport(stliport_t *portp) static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp) { - unsigned long flags; - int rc, doclocal; + unsigned long flags; + int rc, doclocal; + +#ifdef DEBUG + printk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", + (int) brdp, (int) portp, (int) filp); +#endif rc = 0; doclocal = 0; @@ -1365,11 +1469,11 @@ static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *fil if (portp->tty->termios->c_cflag & CLOCAL) doclocal++; - spin_lock_irqsave(&stli_lock, flags); + save_flags(flags); + cli(); portp->openwaitcnt++; if (! tty_hung_up_p(filp)) portp->refcount--; - spin_unlock_irqrestore(&stli_lock, flags); for (;;) { stli_mkasysigs(&portp->asig, 1, 1); @@ -1395,13 +1499,12 @@ static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *fil interruptible_sleep_on(&portp->open_wait); } - spin_lock_irqsave(&stli_lock, flags); if (! tty_hung_up_p(filp)) portp->refcount++; portp->openwaitcnt--; - spin_unlock_irqrestore(&stli_lock, flags); + restore_flags(flags); - return rc; + return(rc); } /*****************************************************************************/ @@ -1414,38 +1517,46 @@ static int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *fil static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count) { - cdkasy_t __iomem *ap; - cdkhdr_t __iomem *hdrp; - unsigned char __iomem *bits; - unsigned char __iomem *shbuf; - unsigned char *chbuf; - stliport_t *portp; - stlibrd_t *brdp; - unsigned int len, stlen, head, tail, size; - unsigned long flags; + volatile cdkasy_t *ap; + volatile cdkhdr_t *hdrp; + volatile unsigned char *bits; + unsigned char *shbuf, *chbuf; + stliport_t *portp; + stlibrd_t *brdp; + unsigned int len, stlen, head, tail, size; + unsigned long flags; +#ifdef DEBUG + printk("stli_write(tty=%x,buf=%x,count=%d)\n", + (int) tty, (int) buf, count); +#endif + + if ((tty == (struct tty_struct *) NULL) || + (stli_tmpwritebuf == (char *) NULL)) + return(0); if (tty == stli_txcooktty) stli_flushchars(tty); portp = tty->driver_data; - if (portp == NULL) - return 0; + if (portp == (stliport_t *) NULL) + return(0); if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) - return 0; + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); chbuf = (unsigned char *) buf; /* * All data is now local, shove as much as possible into shared memory. */ - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); EBRDENABLE(brdp); - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); - head = (unsigned int) readw(&ap->txq.head); - tail = (unsigned int) readw(&ap->txq.tail); - if (tail != ((unsigned int) readw(&ap->txq.tail))) - tail = (unsigned int) readw(&ap->txq.tail); + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); + head = (unsigned int) ap->txq.head; + tail = (unsigned int) ap->txq.tail; + if (tail != ((unsigned int) ap->txq.tail)) + tail = (unsigned int) ap->txq.tail; size = portp->txsize; if (head >= tail) { len = size - (head - tail) - 1; @@ -1457,11 +1568,11 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun len = MIN(len, count); count = 0; - shbuf = (char __iomem *) EBRDGETMEMPTR(brdp, portp->txoffset); + shbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset); while (len > 0) { stlen = MIN(len, stlen); - memcpy_toio(shbuf + head, chbuf, stlen); + memcpy((shbuf + head), chbuf, stlen); chbuf += stlen; len -= stlen; count += stlen; @@ -1472,19 +1583,20 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun } } - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); - writew(head, &ap->txq.head); + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); + ap->txq.head = head; if (test_bit(ST_TXBUSY, &portp->state)) { - if (readl(&ap->changed.data) & DT_TXEMPTY) - writel(readl(&ap->changed.data) & ~DT_TXEMPTY, &ap->changed.data); + if (ap->changed.data & DT_TXEMPTY) + ap->changed.data &= ~DT_TXEMPTY; } - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - bits = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset + + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; - writeb(readb(bits) | portp->portbit, bits); + *bits |= portp->portbit; set_bit(ST_TXBUSY, &portp->state); EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); + + restore_flags(flags); return(count); } @@ -1501,8 +1613,14 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun static void stli_putchar(struct tty_struct *tty, unsigned char ch) { +#ifdef DEBUG + printk("stli_putchar(tty=%x,ch=%x)\n", (int) tty, (int) ch); +#endif + + if (tty == (struct tty_struct *) NULL) + return; if (tty != stli_txcooktty) { - if (stli_txcooktty != NULL) + if (stli_txcooktty != (struct tty_struct *) NULL) stli_flushchars(stli_txcooktty); stli_txcooktty = tty; } @@ -1522,26 +1640,29 @@ static void stli_putchar(struct tty_struct *tty, unsigned char ch) static void stli_flushchars(struct tty_struct *tty) { - cdkhdr_t __iomem *hdrp; - unsigned char __iomem *bits; - cdkasy_t __iomem *ap; - struct tty_struct *cooktty; - stliport_t *portp; - stlibrd_t *brdp; - unsigned int len, stlen, head, tail, size, count, cooksize; - unsigned char *buf; - unsigned char __iomem *shbuf; - unsigned long flags; + volatile cdkhdr_t *hdrp; + volatile unsigned char *bits; + volatile cdkasy_t *ap; + struct tty_struct *cooktty; + stliport_t *portp; + stlibrd_t *brdp; + unsigned int len, stlen, head, tail, size, count, cooksize; + unsigned char *buf, *shbuf; + unsigned long flags; + +#ifdef DEBUG + printk("stli_flushchars(tty=%x)\n", (int) tty); +#endif cooksize = stli_txcooksize; cooktty = stli_txcooktty; stli_txcooksize = 0; stli_txcookrealsize = 0; - stli_txcooktty = NULL; + stli_txcooktty = (struct tty_struct *) NULL; - if (tty == NULL) + if (tty == (struct tty_struct *) NULL) return; - if (cooktty == NULL) + if (cooktty == (struct tty_struct *) NULL) return; if (tty != cooktty) tty = cooktty; @@ -1549,22 +1670,23 @@ static void stli_flushchars(struct tty_struct *tty) return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); EBRDENABLE(brdp); - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); - head = (unsigned int) readw(&ap->txq.head); - tail = (unsigned int) readw(&ap->txq.tail); - if (tail != ((unsigned int) readw(&ap->txq.tail))) - tail = (unsigned int) readw(&ap->txq.tail); + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); + head = (unsigned int) ap->txq.head; + tail = (unsigned int) ap->txq.tail; + if (tail != ((unsigned int) ap->txq.tail)) + tail = (unsigned int) ap->txq.tail; size = portp->txsize; if (head >= tail) { len = size - (head - tail) - 1; @@ -1581,7 +1703,7 @@ static void stli_flushchars(struct tty_struct *tty) while (len > 0) { stlen = MIN(len, stlen); - memcpy_toio(shbuf + head, buf, stlen); + memcpy((shbuf + head), buf, stlen); buf += stlen; len -= stlen; count += stlen; @@ -1592,66 +1714,73 @@ static void stli_flushchars(struct tty_struct *tty) } } - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); - writew(head, &ap->txq.head); + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); + ap->txq.head = head; if (test_bit(ST_TXBUSY, &portp->state)) { - if (readl(&ap->changed.data) & DT_TXEMPTY) - writel(readl(&ap->changed.data) & ~DT_TXEMPTY, &ap->changed.data); + if (ap->changed.data & DT_TXEMPTY) + ap->changed.data &= ~DT_TXEMPTY; } - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - bits = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset + + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; - writeb(readb(bits) | portp->portbit, bits); + *bits |= portp->portbit; set_bit(ST_TXBUSY, &portp->state); EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ static int stli_writeroom(struct tty_struct *tty) { - cdkasyrq_t __iomem *rp; - stliport_t *portp; - stlibrd_t *brdp; - unsigned int head, tail, len; - unsigned long flags; + volatile cdkasyrq_t *rp; + stliport_t *portp; + stlibrd_t *brdp; + unsigned int head, tail, len; + unsigned long flags; + +#ifdef DEBUG + printk("stli_writeroom(tty=%x)\n", (int) tty); +#endif + if (tty == (struct tty_struct *) NULL) + return(0); if (tty == stli_txcooktty) { if (stli_txcookrealsize != 0) { len = stli_txcookrealsize - stli_txcooksize; - return len; + return(len); } } portp = tty->driver_data; - if (portp == NULL) - return 0; + if (portp == (stliport_t *) NULL) + return(0); if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) - return 0; + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); EBRDENABLE(brdp); - rp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->txq; - head = (unsigned int) readw(&rp->head); - tail = (unsigned int) readw(&rp->tail); - if (tail != ((unsigned int) readw(&rp->tail))) - tail = (unsigned int) readw(&rp->tail); + rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq; + head = (unsigned int) rp->head; + tail = (unsigned int) rp->tail; + if (tail != ((unsigned int) rp->tail)) + tail = (unsigned int) rp->tail; len = (head >= tail) ? (portp->txsize - (head - tail)) : (tail - head); len--; EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); if (tty == stli_txcooktty) { stli_txcookrealsize = len; len -= stli_txcooksize; } - return len; + return(len); } /*****************************************************************************/ @@ -1666,37 +1795,44 @@ static int stli_writeroom(struct tty_struct *tty) static int stli_charsinbuffer(struct tty_struct *tty) { - cdkasyrq_t __iomem *rp; - stliport_t *portp; - stlibrd_t *brdp; - unsigned int head, tail, len; - unsigned long flags; + volatile cdkasyrq_t *rp; + stliport_t *portp; + stlibrd_t *brdp; + unsigned int head, tail, len; + unsigned long flags; + +#ifdef DEBUG + printk("stli_charsinbuffer(tty=%x)\n", (int) tty); +#endif + if (tty == (struct tty_struct *) NULL) + return(0); if (tty == stli_txcooktty) stli_flushchars(tty); portp = tty->driver_data; - if (portp == NULL) - return 0; + if (portp == (stliport_t *) NULL) + return(0); if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) - return 0; + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); EBRDENABLE(brdp); - rp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->txq; - head = (unsigned int) readw(&rp->head); - tail = (unsigned int) readw(&rp->tail); - if (tail != ((unsigned int) readw(&rp->tail))) - tail = (unsigned int) readw(&rp->tail); + rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq; + head = (unsigned int) rp->head; + tail = (unsigned int) rp->tail; + if (tail != ((unsigned int) rp->tail)) + tail = (unsigned int) rp->tail; len = (head >= tail) ? (head - tail) : (portp->txsize - (tail - head)); if ((len == 0) && test_bit(ST_TXBUSY, &portp->state)) len = 1; EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); - return len; + return(len); } /*****************************************************************************/ @@ -1707,8 +1843,12 @@ static int stli_charsinbuffer(struct tty_struct *tty) static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) { - struct serial_struct sio; - stlibrd_t *brdp; + struct serial_struct sio; + stlibrd_t *brdp; + +#ifdef DEBUG + printk("stli_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp); +#endif memset(&sio, 0, sizeof(struct serial_struct)); sio.type = PORT_UNKNOWN; @@ -1723,7 +1863,7 @@ static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) sio.hub6 = 0; brdp = stli_brds[portp->brdnr]; - if (brdp != NULL) + if (brdp != (stlibrd_t *) NULL) sio.port = brdp->iobase; return copy_to_user(sp, &sio, sizeof(struct serial_struct)) ? @@ -1740,8 +1880,12 @@ static int stli_getserial(stliport_t *portp, struct serial_struct __user *sp) static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) { - struct serial_struct sio; - int rc; + struct serial_struct sio; + int rc; + +#ifdef DEBUG + printk("stli_setserial(portp=%p,sp=%p)\n", portp, sp); +#endif if (copy_from_user(&sio, sp, sizeof(struct serial_struct))) return -EFAULT; @@ -1750,7 +1894,7 @@ static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) (sio.close_delay != portp->close_delay) || ((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK))) - return -EPERM; + return(-EPERM); } portp->flags = (portp->flags & ~ASYNC_USR_MASK) | @@ -1761,8 +1905,8 @@ static int stli_setserial(stliport_t *portp, struct serial_struct __user *sp) portp->custom_divisor = sio.custom_divisor; if ((rc = stli_setport(portp)) < 0) - return rc; - return 0; + return(rc); + return(0); } /*****************************************************************************/ @@ -1773,19 +1917,19 @@ static int stli_tiocmget(struct tty_struct *tty, struct file *file) stlibrd_t *brdp; int rc; - if (portp == NULL) - return -ENODEV; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) - return 0; + if (portp == (stliport_t *) NULL) + return(-ENODEV); + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; + return(-EIO); if ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0) - return rc; + return(rc); return stli_mktiocm(portp->asig.sigvalue); } @@ -1797,15 +1941,15 @@ static int stli_tiocmset(struct tty_struct *tty, struct file *file, stlibrd_t *brdp; int rts = -1, dtr = -1; - if (portp == NULL) - return -ENODEV; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) - return 0; + if (portp == (stliport_t *) NULL) + return(-ENODEV); + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; + return(-EIO); if (set & TIOCM_RTS) rts = 1; @@ -1824,25 +1968,32 @@ static int stli_tiocmset(struct tty_struct *tty, struct file *file, static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { - stliport_t *portp; - stlibrd_t *brdp; - unsigned int ival; - int rc; + stliport_t *portp; + stlibrd_t *brdp; + unsigned int ival; + int rc; void __user *argp = (void __user *)arg; +#ifdef DEBUG + printk("stli_ioctl(tty=%x,file=%x,cmd=%x,arg=%x)\n", + (int) tty, (int) file, cmd, (int) arg); +#endif + + if (tty == (struct tty_struct *) NULL) + return(-ENODEV); portp = tty->driver_data; - if (portp == NULL) - return -ENODEV; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) - return 0; + if (portp == (stliport_t *) NULL) + return(-ENODEV); + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) + return(0); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return 0; + if (brdp == (stlibrd_t *) NULL) + return(0); if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && (cmd != COM_GETPORTSTATS) && (cmd != COM_CLRPORTSTATS)) { if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; + return(-EIO); } rc = 0; @@ -1889,7 +2040,7 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm break; } - return rc; + return(rc); } /*****************************************************************************/ @@ -1901,20 +2052,24 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm static void stli_settermios(struct tty_struct *tty, struct termios *old) { - stliport_t *portp; - stlibrd_t *brdp; - struct termios *tiosp; - asyport_t aport; + stliport_t *portp; + stlibrd_t *brdp; + struct termios *tiosp; + asyport_t aport; + +#ifdef DEBUG + printk("stli_settermios(tty=%x,old=%x)\n", (int) tty, (int) old); +#endif - if (tty == NULL) + if (tty == (struct tty_struct *) NULL) return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; tiosp = tty->termios; @@ -1947,9 +2102,18 @@ static void stli_settermios(struct tty_struct *tty, struct termios *old) static void stli_throttle(struct tty_struct *tty) { - stliport_t *portp = tty->driver_data; - if (portp == NULL) + stliport_t *portp; + +#ifdef DEBUG + printk("stli_throttle(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; + portp = tty->driver_data; + if (portp == (stliport_t *) NULL) return; + set_bit(ST_RXSTOP, &portp->state); } @@ -1963,30 +2127,88 @@ static void stli_throttle(struct tty_struct *tty) static void stli_unthrottle(struct tty_struct *tty) { - stliport_t *portp = tty->driver_data; - if (portp == NULL) + stliport_t *portp; + +#ifdef DEBUG + printk("stli_unthrottle(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; + portp = tty->driver_data; + if (portp == (stliport_t *) NULL) return; + clear_bit(ST_RXSTOP, &portp->state); } /*****************************************************************************/ /* - * Stop the transmitter. + * Stop the transmitter. Basically to do this we will just turn TX + * interrupts off. */ static void stli_stop(struct tty_struct *tty) { + stlibrd_t *brdp; + stliport_t *portp; + asyctrl_t actrl; + +#ifdef DEBUG + printk("stli_stop(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; + portp = tty->driver_data; + if (portp == (stliport_t *) NULL) + return; + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) + return; + brdp = stli_brds[portp->brdnr]; + if (brdp == (stlibrd_t *) NULL) + return; + + memset(&actrl, 0, sizeof(asyctrl_t)); + actrl.txctrl = CT_STOPFLOW; +#if 0 + stli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t), 0); +#endif } /*****************************************************************************/ /* - * Start the transmitter again. + * Start the transmitter again. Just turn TX interrupts back on. */ static void stli_start(struct tty_struct *tty) { + stliport_t *portp; + stlibrd_t *brdp; + asyctrl_t actrl; + +#ifdef DEBUG + printk("stli_start(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; + portp = tty->driver_data; + if (portp == (stliport_t *) NULL) + return; + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) + return; + brdp = stli_brds[portp->brdnr]; + if (brdp == (stlibrd_t *) NULL) + return; + + memset(&actrl, 0, sizeof(asyctrl_t)); + actrl.txctrl = CT_STARTFLOW; +#if 0 + stli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t), 0); +#endif } /*****************************************************************************/ @@ -2002,9 +2224,22 @@ static void stli_start(struct tty_struct *tty) static void stli_dohangup(void *arg) { - stliport_t *portp = (stliport_t *) arg; - if (portp->tty != NULL) { - tty_hangup(portp->tty); + stliport_t *portp; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_dohangup(portp=%x)\n", (int) arg); +#endif + + /* + * FIXME: There's a module removal race here: tty_hangup + * calls schedule_work which will call into this + * driver later. + */ + portp = (stliport_t *) arg; + if (portp != (stliport_t *) NULL) { + if (portp->tty != (struct tty_struct *) NULL) { + tty_hangup(portp->tty); + } } } @@ -2019,25 +2254,31 @@ static void stli_dohangup(void *arg) static void stli_hangup(struct tty_struct *tty) { - stliport_t *portp; - stlibrd_t *brdp; - unsigned long flags; + stliport_t *portp; + stlibrd_t *brdp; + unsigned long flags; +#ifdef DEBUG + printk(KERN_DEBUG "stli_hangup(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; portp->flags &= ~ASYNC_INITIALIZED; - if (!test_bit(ST_CLOSING, &portp->state)) + save_flags(flags); + cli(); + if (! test_bit(ST_CLOSING, &portp->state)) stli_rawclose(brdp, portp, 0, 0); - - spin_lock_irqsave(&stli_lock, flags); if (tty->termios->c_cflag & HUPCL) { stli_mkasysigs(&portp->asig, 0, 0); if (test_bit(ST_CMDING, &portp->state)) { @@ -2049,15 +2290,14 @@ static void stli_hangup(struct tty_struct *tty) &portp->asig, sizeof(asysigs_t), 0); } } + restore_flags(flags); clear_bit(ST_TXBUSY, &portp->state); clear_bit(ST_RXSTOP, &portp->state); set_bit(TTY_IO_ERROR, &tty->flags); - portp->tty = NULL; + portp->tty = (struct tty_struct *) NULL; portp->flags &= ~ASYNC_NORMAL_ACTIVE; portp->refcount = 0; - spin_unlock_irqrestore(&stli_lock, flags); - wake_up_interruptible(&portp->open_wait); } @@ -2072,22 +2312,29 @@ static void stli_hangup(struct tty_struct *tty) static void stli_flushbuffer(struct tty_struct *tty) { - stliport_t *portp; - stlibrd_t *brdp; - unsigned long ftype, flags; + stliport_t *portp; + stlibrd_t *brdp; + unsigned long ftype, flags; +#ifdef DEBUG + printk(KERN_DEBUG "stli_flushbuffer(tty=%x)\n", (int) tty); +#endif + + if (tty == (struct tty_struct *) NULL) + return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); if (tty == stli_txcooktty) { - stli_txcooktty = NULL; + stli_txcooktty = (struct tty_struct *) NULL; stli_txcooksize = 0; stli_txcookrealsize = 0; } @@ -2099,10 +2346,15 @@ static void stli_flushbuffer(struct tty_struct *tty) ftype |= FLUSHRX; clear_bit(ST_DOFLUSHRX, &portp->state); } - __stli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(u32), 0); + stli_sendcmd(brdp, portp, A_FLUSH, &ftype, + sizeof(unsigned long), 0); } - spin_unlock_irqrestore(&brd_lock, flags); - tty_wakeup(tty); + restore_flags(flags); + + wake_up_interruptible(&tty->write_wait); + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && + tty->ldisc.write_wakeup) + (tty->ldisc.write_wakeup)(tty); } /*****************************************************************************/ @@ -2112,31 +2364,55 @@ static void stli_breakctl(struct tty_struct *tty, int state) stlibrd_t *brdp; stliport_t *portp; long arg; + /* long savestate, savetime; */ +#ifdef DEBUG + printk(KERN_DEBUG "stli_breakctl(tty=%x,state=%d)\n", (int) tty, state); +#endif + + if (tty == (struct tty_struct *) NULL) + return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; +/* + * Due to a bug in the tty send_break() code we need to preserve + * the current process state and timeout... + savetime = current->timeout; + savestate = current->state; + */ + arg = (state == -1) ? BREAKON : BREAKOFF; stli_cmdwait(brdp, portp, A_BREAK, &arg, sizeof(long), 0); + +/* + * + current->timeout = savetime; + current->state = savestate; + */ } /*****************************************************************************/ static void stli_waituntilsent(struct tty_struct *tty, int timeout) { - stliport_t *portp; - unsigned long tend; + stliport_t *portp; + unsigned long tend; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_waituntilsent(tty=%x,timeout=%x)\n", (int) tty, timeout); +#endif - if (tty == NULL) + if (tty == (struct tty_struct *) NULL) return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; if (timeout == 0) @@ -2160,13 +2436,19 @@ static void stli_sendxchar(struct tty_struct *tty, char ch) stliport_t *portp; asyctrl_t actrl; +#ifdef DEBUG + printk(KERN_DEBUG "stli_sendxchar(tty=%x,ch=%x)\n", (int) tty, ch); +#endif + + if (tty == (struct tty_struct *) NULL) + return; portp = tty->driver_data; - if (portp == NULL) + if (portp == (stliport_t *) NULL) return; - if (portp->brdnr < 0 || portp->brdnr >= stli_nrbrds) + if ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds)) return; brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) return; memset(&actrl, 0, sizeof(asyctrl_t)); @@ -2178,6 +2460,7 @@ static void stli_sendxchar(struct tty_struct *tty, char ch) actrl.txctrl = CT_SENDCHR; actrl.tximdch = ch; } + stli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t), 0); } @@ -2193,17 +2476,17 @@ static void stli_sendxchar(struct tty_struct *tty, char ch) static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *pos) { - char *sp, *uart; - int rc, cnt; + char *sp, *uart; + int rc, cnt; rc = stli_portcmdstats(portp); uart = "UNKNOWN"; if (brdp->state & BST_STARTED) { switch (stli_comstats.hwid) { - case 0: uart = "2681"; break; - case 1: uart = "SC26198"; break; - default:uart = "CD1400"; break; + case 0: uart = "2681"; break; + case 1: uart = "SC26198"; break; + default: uart = "CD1400"; break; } } @@ -2254,11 +2537,17 @@ static int stli_portinfo(stlibrd_t *brdp, stliport_t *portp, int portnr, char *p static int stli_readproc(char *page, char **start, off_t off, int count, int *eof, void *data) { - stlibrd_t *brdp; - stliport_t *portp; - int brdnr, portnr, totalport; - int curoff, maxoff; - char *pos; + stlibrd_t *brdp; + stliport_t *portp; + int brdnr, portnr, totalport; + int curoff, maxoff; + char *pos; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_readproc(page=%x,start=%x,off=%x,count=%d,eof=%x," + "data=%x\n", (int) page, (int) start, (int) off, count, + (int) eof, (int) data); +#endif pos = page; totalport = 0; @@ -2279,7 +2568,7 @@ static int stli_readproc(char *page, char **start, off_t off, int count, int *eo */ for (brdnr = 0; (brdnr < stli_nrbrds); brdnr++) { brdp = stli_brds[brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) continue; if (brdp->state == 0) continue; @@ -2294,7 +2583,7 @@ static int stli_readproc(char *page, char **start, off_t off, int count, int *eo for (portnr = 0; (portnr < brdp->nrports); portnr++, totalport++) { portp = brdp->ports[portnr]; - if (portp == NULL) + if (portp == (stliport_t *) NULL) continue; if (off >= (curoff += MAXLINE)) continue; @@ -2321,54 +2610,49 @@ stli_readdone: * a poll routine that does not have user context. Therefore you cannot * copy back directly into user space, or to the kernel stack of a * process. This routine does not sleep, so can be called from anywhere. - * - * The caller must hold the brd_lock (see also stli_sendcmd the usual - * entry point) */ -static void __stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) +static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) { - cdkhdr_t __iomem *hdrp; - cdkctrl_t __iomem *cp; - unsigned char __iomem *bits; - unsigned long flags; + volatile cdkhdr_t *hdrp; + volatile cdkctrl_t *cp; + volatile unsigned char *bits; + unsigned long flags; - spin_lock_irqsave(&brd_lock, flags); +#ifdef DEBUG + printk(KERN_DEBUG "stli_sendcmd(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," + "copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, + (int) arg, size, copyback); +#endif + + save_flags(flags); + cli(); if (test_bit(ST_CMDING, &portp->state)) { printk(KERN_ERR "STALLION: command already busy, cmd=%x!\n", (int) cmd); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); return; } EBRDENABLE(brdp); - cp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; + cp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl; if (size > 0) { - memcpy_toio((void __iomem *) &(cp->args[0]), arg, size); + memcpy((void *) &(cp->args[0]), arg, size); if (copyback) { portp->argp = arg; portp->argsize = size; } } - writel(0, &cp->status); - writel(cmd, &cp->cmd); - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - bits = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset + + cp->status = 0; + cp->cmd = cmd; + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + bits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx; - writeb(readb(bits) | portp->portbit, bits); + *bits |= portp->portbit; set_bit(ST_CMDING, &portp->state); - EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); -} - -static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback) -{ - unsigned long flags; - - spin_lock_irqsave(&brd_lock, flags); - __stli_sendcmd(brdp, portp, cmd, arg, size, copyback); - spin_unlock_irqrestore(&brd_lock, flags); + EBRDDISABLE(brdp); + restore_flags(flags); } /*****************************************************************************/ @@ -2383,23 +2667,28 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, static void stli_read(stlibrd_t *brdp, stliport_t *portp) { - cdkasyrq_t __iomem *rp; - char __iomem *shbuf; + volatile cdkasyrq_t *rp; + volatile char *shbuf; struct tty_struct *tty; - unsigned int head, tail, size; - unsigned int len, stlen; + unsigned int head, tail, size; + unsigned int len, stlen; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_read(brdp=%x,portp=%d)\n", + (int) brdp, (int) portp); +#endif if (test_bit(ST_RXSTOP, &portp->state)) return; tty = portp->tty; - if (tty == NULL) + if (tty == (struct tty_struct *) NULL) return; - rp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; - head = (unsigned int) readw(&rp->head); - if (head != ((unsigned int) readw(&rp->head))) - head = (unsigned int) readw(&rp->head); - tail = (unsigned int) readw(&rp->tail); + rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; + head = (unsigned int) rp->head; + if (head != ((unsigned int) rp->head)) + head = (unsigned int) rp->head; + tail = (unsigned int) rp->tail; size = portp->rxsize; if (head >= tail) { len = head - tail; @@ -2410,15 +2699,12 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp) } len = tty_buffer_request_room(tty, len); - - shbuf = (char __iomem *) EBRDGETMEMPTR(brdp, portp->rxoffset); + /* FIXME : iomap ? */ + shbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset); while (len > 0) { - unsigned char *cptr; - stlen = MIN(len, stlen); - tty_prepare_flip_string(tty, &cptr, stlen); - memcpy_fromio(cptr, shbuf + tail, stlen); + tty_insert_flip_string(tty, (char *)(shbuf + tail), stlen); len -= stlen; tail += stlen; if (tail >= size) { @@ -2426,8 +2712,8 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp) stlen = head; } } - rp = &((cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; - writew(tail, &rp->tail); + rp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq; + rp->tail = tail; if (head != tail) set_bit(ST_RXING, &portp->state); @@ -2443,9 +2729,9 @@ static void stli_read(stlibrd_t *brdp, stliport_t *portp) * difficult to deal with them here. */ -static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) +static void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp) { - int cmd; + int cmd; if (test_bit(ST_DOSIGS, &portp->state)) { if (test_bit(ST_DOFLUSHTX, &portp->state) && @@ -2460,10 +2746,10 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) clear_bit(ST_DOFLUSHTX, &portp->state); clear_bit(ST_DOFLUSHRX, &portp->state); clear_bit(ST_DOSIGS, &portp->state); - memcpy_toio((void __iomem *) &(cp->args[0]), (void *) &portp->asig, + memcpy((void *) &(cp->args[0]), (void *) &portp->asig, sizeof(asysigs_t)); - writel(0, &cp->status); - writel(cmd, &cp->cmd); + cp->status = 0; + cp->cmd = cmd; set_bit(ST_CMDING, &portp->state); } else if (test_bit(ST_DOFLUSHTX, &portp->state) || test_bit(ST_DOFLUSHRX, &portp->state)) { @@ -2471,9 +2757,9 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) cmd |= ((test_bit(ST_DOFLUSHRX, &portp->state)) ? FLUSHRX : 0); clear_bit(ST_DOFLUSHTX, &portp->state); clear_bit(ST_DOFLUSHRX, &portp->state); - memcpy_toio((void __iomem *) &(cp->args[0]), (void *) &cmd, sizeof(int)); - writel(0, &cp->status); - writel(A_FLUSH, &cp->cmd); + memcpy((void *) &(cp->args[0]), (void *) &cmd, sizeof(int)); + cp->status = 0; + cp->cmd = A_FLUSH; set_bit(ST_CMDING, &portp->state); } } @@ -2493,25 +2779,30 @@ static void stli_dodelaycmd(stliport_t *portp, cdkctrl_t __iomem *cp) static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) { - cdkasy_t __iomem *ap; - cdkctrl_t __iomem *cp; - struct tty_struct *tty; - asynotify_t nt; - unsigned long oldsigs; - int rc, donerx; - - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); + volatile cdkasy_t *ap; + volatile cdkctrl_t *cp; + struct tty_struct *tty; + asynotify_t nt; + unsigned long oldsigs; + int rc, donerx; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_hostcmd(brdp=%x,channr=%d)\n", + (int) brdp, channr); +#endif + + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); cp = &ap->ctrl; /* * Check if we are waiting for an open completion message. */ if (test_bit(ST_OPENING, &portp->state)) { - rc = readl(&cp->openarg); - if (readb(&cp->open) == 0 && rc != 0) { + rc = (int) cp->openarg; + if ((cp->open == 0) && (rc != 0)) { if (rc > 0) rc--; - writel(0, &cp->openarg); + cp->openarg = 0; portp->rc = rc; clear_bit(ST_OPENING, &portp->state); wake_up_interruptible(&portp->raw_wait); @@ -2522,11 +2813,11 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) * Check if we are waiting for a close completion message. */ if (test_bit(ST_CLOSING, &portp->state)) { - rc = (int) readl(&cp->closearg); - if (readb(&cp->close) == 0 && rc != 0) { + rc = (int) cp->closearg; + if ((cp->close == 0) && (rc != 0)) { if (rc > 0) rc--; - writel(0, &cp->closearg); + cp->closearg = 0; portp->rc = rc; clear_bit(ST_CLOSING, &portp->state); wake_up_interruptible(&portp->raw_wait); @@ -2538,16 +2829,16 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) * need to copy out the command results associated with this command. */ if (test_bit(ST_CMDING, &portp->state)) { - rc = readl(&cp->status); - if (readl(&cp->cmd) == 0 && rc != 0) { + rc = cp->status; + if ((cp->cmd == 0) && (rc != 0)) { if (rc > 0) rc--; - if (portp->argp != NULL) { - memcpy_fromio(portp->argp, (void __iomem *) &(cp->args[0]), + if (portp->argp != (void *) NULL) { + memcpy(portp->argp, (void *) &(cp->args[0]), portp->argsize); - portp->argp = NULL; + portp->argp = (void *) NULL; } - writel(0, &cp->status); + cp->status = 0; portp->rc = rc; clear_bit(ST_CMDING, &portp->state); stli_dodelaycmd(portp, cp); @@ -2586,15 +2877,18 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) if (nt.data & DT_TXEMPTY) clear_bit(ST_TXBUSY, &portp->state); if (nt.data & (DT_TXEMPTY | DT_TXLOW)) { - if (tty != NULL) { - tty_wakeup(tty); - EBRDENABLE(brdp); + if (tty != (struct tty_struct *) NULL) { + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && + tty->ldisc.write_wakeup) { + (tty->ldisc.write_wakeup)(tty); + EBRDENABLE(brdp); + } wake_up_interruptible(&tty->write_wait); } } if ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) { - if (tty != NULL) { + if (tty != (struct tty_struct *) NULL) { tty_insert_flip_char(tty, 0, TTY_BREAK); if (portp->flags & ASYNC_SAK) { do_SAK(tty); @@ -2638,14 +2932,14 @@ static int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) * at the cdk header structure. */ -static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) +static void stli_brdpoll(stlibrd_t *brdp, volatile cdkhdr_t *hdrp) { - stliport_t *portp; - unsigned char hostbits[(STL_MAXCHANS / 8) + 1]; - unsigned char slavebits[(STL_MAXCHANS / 8) + 1]; - unsigned char __iomem *slavep; - int bitpos, bitat, bitsize; - int channr, nrdevs, slavebitchange; + stliport_t *portp; + unsigned char hostbits[(STL_MAXCHANS / 8) + 1]; + unsigned char slavebits[(STL_MAXCHANS / 8) + 1]; + unsigned char *slavep; + int bitpos, bitat, bitsize; + int channr, nrdevs, slavebitchange; bitsize = brdp->bitsize; nrdevs = brdp->nrdevs; @@ -2657,7 +2951,7 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) * 8 service bits at a time in the inner loop, so we can bypass * the lot if none of them want service. */ - memcpy_fromio(&hostbits[0], (((unsigned char __iomem *) hdrp) + brdp->hostoffset), + memcpy(&hostbits[0], (((unsigned char *) hdrp) + brdp->hostoffset), bitsize); memset(&slavebits[0], 0, bitsize); @@ -2684,11 +2978,11 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) * service may initiate more slave requests. */ if (slavebitchange) { - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - slavep = ((unsigned char __iomem *) hdrp) + brdp->slaveoffset; + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + slavep = ((unsigned char *) hdrp) + brdp->slaveoffset; for (bitpos = 0; (bitpos < bitsize); bitpos++) { - if (readb(slavebits + bitpos)) - writeb(readb(slavep + bitpos) & ~slavebits[bitpos], slavebits + bitpos); + if (slavebits[bitpos]) + slavep[bitpos] &= ~slavebits[bitpos]; } } } @@ -2706,9 +3000,9 @@ static void stli_brdpoll(stlibrd_t *brdp, cdkhdr_t __iomem *hdrp) static void stli_poll(unsigned long arg) { - cdkhdr_t __iomem *hdrp; - stlibrd_t *brdp; - int brdnr; + volatile cdkhdr_t *hdrp; + stlibrd_t *brdp; + int brdnr; stli_timerlist.expires = STLI_TIMEOUT; add_timer(&stli_timerlist); @@ -2718,18 +3012,16 @@ static void stli_poll(unsigned long arg) */ for (brdnr = 0; (brdnr < stli_nrbrds); brdnr++) { brdp = stli_brds[brdnr]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) continue; if ((brdp->state & BST_STARTED) == 0) continue; - spin_lock(&brd_lock); EBRDENABLE(brdp); - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); - if (readb(&hdrp->hostreq)) + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + if (hdrp->hostreq) stli_brdpoll(brdp, hdrp); EBRDDISABLE(brdp); - spin_unlock(&brd_lock); } } @@ -2742,6 +3034,11 @@ static void stli_poll(unsigned long arg) static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", + (int) portp, (int) pp, (int) tiosp); +#endif + memset(pp, 0, sizeof(asyport_t)); /* @@ -2860,6 +3157,11 @@ static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tio static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_mkasysigs(sp=%x,dtr=%d,rts=%d)\n", + (int) sp, dtr, rts); +#endif + memset(sp, 0, sizeof(asysigs_t)); if (dtr >= 0) { sp->signal |= SG_DTR; @@ -2880,7 +3182,13 @@ static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts) static long stli_mktiocm(unsigned long sigvalue) { - long tiocm = 0; + long tiocm; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_mktiocm(sigvalue=%x)\n", (int) sigvalue); +#endif + + tiocm = 0; tiocm |= ((sigvalue & SG_DCD) ? TIOCM_CD : 0); tiocm |= ((sigvalue & SG_CTS) ? TIOCM_CTS : 0); tiocm |= ((sigvalue & SG_RI) ? TIOCM_RI : 0); @@ -2902,6 +3210,10 @@ static int stli_initports(stlibrd_t *brdp) stliport_t *portp; int i, panelnr, panelport; +#ifdef DEBUG + printk(KERN_DEBUG "stli_initports(brdp=%x)\n", (int) brdp); +#endif + for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) { portp = kzalloc(sizeof(stliport_t), GFP_KERNEL); if (!portp) { @@ -2928,7 +3240,7 @@ static int stli_initports(stlibrd_t *brdp) brdp->ports[i] = portp; } - return 0; + return(0); } /*****************************************************************************/ @@ -2941,6 +3253,10 @@ static void stli_ecpinit(stlibrd_t *brdp) { unsigned long memconf; +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpinit(brdp=%d)\n", (int) brdp); +#endif + outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); udelay(10); outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); @@ -2954,6 +3270,9 @@ static void stli_ecpinit(stlibrd_t *brdp) static void stli_ecpenable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpenable(brdp=%x)\n", (int) brdp); +#endif outb(ECP_ATENABLE, (brdp->iobase + ECP_ATCONFR)); } @@ -2961,6 +3280,9 @@ static void stli_ecpenable(stlibrd_t *brdp) static void stli_ecpdisable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpdisable(brdp=%x)\n", (int) brdp); +#endif outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); } @@ -2968,8 +3290,13 @@ static void stli_ecpdisable(stlibrd_t *brdp) static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { - void *ptr; - unsigned char val; + void *ptr; + unsigned char val; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + (int) offset); +#endif if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " @@ -2989,6 +3316,10 @@ static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void stli_ecpreset(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpreset(brdp=%x)\n", (int) brdp); +#endif + outb(ECP_ATSTOP, (brdp->iobase + ECP_ATCONFR)); udelay(10); outb(ECP_ATDISABLE, (brdp->iobase + ECP_ATCONFR)); @@ -2999,6 +3330,9 @@ static void stli_ecpreset(stlibrd_t *brdp) static void stli_ecpintr(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpintr(brdp=%x)\n", (int) brdp); +#endif outb(0x1, brdp->iobase); } @@ -3012,6 +3346,10 @@ static void stli_ecpeiinit(stlibrd_t *brdp) { unsigned long memconf; +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpeiinit(brdp=%x)\n", (int) brdp); +#endif + outb(0x1, (brdp->iobase + ECP_EIBRDENAB)); outb(ECP_EISTOP, (brdp->iobase + ECP_EICONFR)); udelay(10); @@ -3045,6 +3383,11 @@ static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line void *ptr; unsigned char val; +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecpeigetmemptr(brdp=%x,offset=%x,line=%d)\n", + (int) brdp, (int) offset, line); +#endif + if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " "range at line=%d(%d), brd=%d\n", @@ -3094,8 +3437,8 @@ static void stli_ecpmcdisable(stlibrd_t *brdp) static char *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { - void *ptr; - unsigned char val; + void *ptr; + unsigned char val; if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " @@ -3129,6 +3472,10 @@ static void stli_ecpmcreset(stlibrd_t *brdp) static void stli_ecppciinit(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecppciinit(brdp=%x)\n", (int) brdp); +#endif + outb(ECP_PCISTOP, (brdp->iobase + ECP_PCICONFR)); udelay(10); outb(0, (brdp->iobase + ECP_PCICONFR)); @@ -3142,6 +3489,11 @@ static char *stli_ecppcigetmemptr(stlibrd_t *brdp, unsigned long offset, int lin void *ptr; unsigned char val; +#ifdef DEBUG + printk(KERN_DEBUG "stli_ecppcigetmemptr(brdp=%x,offset=%x,line=%d)\n", + (int) brdp, (int) offset, line); +#endif + if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " "range at line=%d(%d), board=%d\n", @@ -3176,6 +3528,10 @@ static void stli_onbinit(stlibrd_t *brdp) { unsigned long memconf; +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbinit(brdp=%d)\n", (int) brdp); +#endif + outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); udelay(10); outb(ONB_ATDISABLE, (brdp->iobase + ONB_ATCONFR)); @@ -3191,6 +3547,9 @@ static void stli_onbinit(stlibrd_t *brdp) static void stli_onbenable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbenable(brdp=%x)\n", (int) brdp); +#endif outb((brdp->enabval | ONB_ATENABLE), (brdp->iobase + ONB_ATCONFR)); } @@ -3198,6 +3557,9 @@ static void stli_onbenable(stlibrd_t *brdp) static void stli_onbdisable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbdisable(brdp=%x)\n", (int) brdp); +#endif outb((brdp->enabval | ONB_ATDISABLE), (brdp->iobase + ONB_ATCONFR)); } @@ -3207,6 +3569,11 @@ static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { void *ptr; +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + (int) offset); +#endif + if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " "range at line=%d(%d), brd=%d\n", @@ -3222,6 +3589,11 @@ static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void stli_onbreset(stlibrd_t *brdp) { + +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbreset(brdp=%x)\n", (int) brdp); +#endif + outb(ONB_ATSTOP, (brdp->iobase + ONB_ATCONFR)); udelay(10); outb(ONB_ATDISABLE, (brdp->iobase + ONB_ATCONFR)); @@ -3238,6 +3610,10 @@ static void stli_onbeinit(stlibrd_t *brdp) { unsigned long memconf; +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbeinit(brdp=%d)\n", (int) brdp); +#endif + outb(0x1, (brdp->iobase + ONB_EIBRDENAB)); outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); udelay(10); @@ -3256,6 +3632,9 @@ static void stli_onbeinit(stlibrd_t *brdp) static void stli_onbeenable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbeenable(brdp=%x)\n", (int) brdp); +#endif outb(ONB_EIENABLE, (brdp->iobase + ONB_EICONFR)); } @@ -3263,6 +3642,9 @@ static void stli_onbeenable(stlibrd_t *brdp) static void stli_onbedisable(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbedisable(brdp=%x)\n", (int) brdp); +#endif outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); } @@ -3270,8 +3652,13 @@ static void stli_onbedisable(stlibrd_t *brdp) static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { - void *ptr; - unsigned char val; + void *ptr; + unsigned char val; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_onbegetmemptr(brdp=%x,offset=%x,line=%d)\n", + (int) brdp, (int) offset, line); +#endif if (offset > brdp->memsize) { printk(KERN_ERR "STALLION: shared memory pointer=%x out of " @@ -3294,6 +3681,11 @@ static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void stli_onbereset(stlibrd_t *brdp) { + +#ifdef DEBUG + printk(KERN_ERR "stli_onbereset(brdp=%x)\n", (int) brdp); +#endif + outb(ONB_EISTOP, (brdp->iobase + ONB_EICONFR)); udelay(10); outb(ONB_EIDISABLE, (brdp->iobase + ONB_EICONFR)); @@ -3308,6 +3700,11 @@ static void stli_onbereset(stlibrd_t *brdp) static void stli_bbyinit(stlibrd_t *brdp) { + +#ifdef DEBUG + printk(KERN_ERR "stli_bbyinit(brdp=%d)\n", (int) brdp); +#endif + outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); udelay(10); outb(0, (brdp->iobase + BBY_ATCONFR)); @@ -3320,13 +3717,24 @@ static void stli_bbyinit(stlibrd_t *brdp) static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { - void *ptr; - unsigned char val; + void *ptr; + unsigned char val; - BUG_ON(offset > brdp->memsize); +#ifdef DEBUG + printk(KERN_ERR "stli_bbygetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + (int) offset); +#endif - ptr = brdp->membase + (offset % BBY_PAGESIZE); - val = (unsigned char) (offset / BBY_PAGESIZE); + if (offset > brdp->memsize) { + printk(KERN_ERR "STALLION: shared memory pointer=%x out of " + "range at line=%d(%d), brd=%d\n", + (int) offset, line, __LINE__, brdp->brdnr); + ptr = NULL; + val = 0; + } else { + ptr = brdp->membase + (offset % BBY_PAGESIZE); + val = (unsigned char) (offset / BBY_PAGESIZE); + } outb(val, (brdp->iobase + BBY_ATCONFR)); return(ptr); } @@ -3335,6 +3743,11 @@ static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void stli_bbyreset(stlibrd_t *brdp) { + +#ifdef DEBUG + printk(KERN_DEBUG "stli_bbyreset(brdp=%x)\n", (int) brdp); +#endif + outb(BBY_ATSTOP, (brdp->iobase + BBY_ATCONFR)); udelay(10); outb(0, (brdp->iobase + BBY_ATCONFR)); @@ -3349,6 +3762,11 @@ static void stli_bbyreset(stlibrd_t *brdp) static void stli_stalinit(stlibrd_t *brdp) { + +#ifdef DEBUG + printk(KERN_DEBUG "stli_stalinit(brdp=%d)\n", (int) brdp); +#endif + outb(0x1, brdp->iobase); mdelay(1000); } @@ -3357,18 +3775,36 @@ static void stli_stalinit(stlibrd_t *brdp) static char *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) { - BUG_ON(offset > brdp->memsize); - return brdp->membase + (offset % STAL_PAGESIZE); + void *ptr; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_stalgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + (int) offset); +#endif + + if (offset > brdp->memsize) { + printk(KERN_ERR "STALLION: shared memory pointer=%x out of " + "range at line=%d(%d), brd=%d\n", + (int) offset, line, __LINE__, brdp->brdnr); + ptr = NULL; + } else { + ptr = brdp->membase + (offset % STAL_PAGESIZE); + } + return(ptr); } /*****************************************************************************/ static void stli_stalreset(stlibrd_t *brdp) { - u32 __iomem *vecp; + volatile unsigned long *vecp; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_stalreset(brdp=%x)\n", (int) brdp); +#endif - vecp = (u32 __iomem *) (brdp->membase + 0x30); - writel(0xffff0000, vecp); + vecp = (volatile unsigned long *) (brdp->membase + 0x30); + *vecp = 0xffff0000; outb(0, brdp->iobase); mdelay(1000); } @@ -3382,11 +3818,15 @@ static void stli_stalreset(stlibrd_t *brdp) static int stli_initecp(stlibrd_t *brdp) { - cdkecpsig_t sig; - cdkecpsig_t __iomem *sigsp; - unsigned int status, nxtid; - char *name; - int panelnr, nrports; + cdkecpsig_t sig; + cdkecpsig_t *sigsp; + unsigned int status, nxtid; + char *name; + int panelnr, nrports; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_initecp(brdp=%x)\n", (int) brdp); +#endif if (!request_region(brdp->iobase, brdp->iosize, "istallion")) return -EIO; @@ -3394,7 +3834,7 @@ static int stli_initecp(stlibrd_t *brdp) if ((brdp->iobase == 0) || (brdp->memaddr == 0)) { release_region(brdp->iobase, brdp->iosize); - return -ENODEV; + return(-ENODEV); } brdp->iosize = ECP_IOSIZE; @@ -3463,7 +3903,7 @@ static int stli_initecp(stlibrd_t *brdp) default: release_region(brdp->iobase, brdp->iosize); - return -EINVAL; + return(-EINVAL); } /* @@ -3475,10 +3915,10 @@ static int stli_initecp(stlibrd_t *brdp) EBRDINIT(brdp); brdp->membase = ioremap(brdp->memaddr, brdp->memsize); - if (brdp->membase == NULL) + if (brdp->membase == (void *) NULL) { release_region(brdp->iobase, brdp->iosize); - return -ENOMEM; + return(-ENOMEM); } /* @@ -3487,14 +3927,23 @@ static int stli_initecp(stlibrd_t *brdp) * this is, and what it is connected to it. */ EBRDENABLE(brdp); - sigsp = (cdkecpsig_t __iomem *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); + sigsp = (cdkecpsig_t *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); memcpy(&sig, sigsp, sizeof(cdkecpsig_t)); EBRDDISABLE(brdp); - if (sig.magic != cpu_to_le32(ECP_MAGIC)) +#if 0 + printk("%s(%d): sig-> magic=%x rom=%x panel=%x,%x,%x,%x,%x,%x,%x,%x\n", + __FILE__, __LINE__, (int) sig.magic, sig.romver, sig.panelid[0], + (int) sig.panelid[1], (int) sig.panelid[2], + (int) sig.panelid[3], (int) sig.panelid[4], + (int) sig.panelid[5], (int) sig.panelid[6], + (int) sig.panelid[7]); +#endif + + if (sig.magic != ECP_MAGIC) { release_region(brdp->iobase, brdp->iosize); - return -ENODEV; + return(-ENODEV); } /* @@ -3518,7 +3967,7 @@ static int stli_initecp(stlibrd_t *brdp) brdp->state |= BST_FOUND; - return 0; + return(0); } /*****************************************************************************/ @@ -3530,16 +3979,20 @@ static int stli_initecp(stlibrd_t *brdp) static int stli_initonb(stlibrd_t *brdp) { - cdkonbsig_t sig; - cdkonbsig_t __iomem *sigsp; - char *name; - int i; + cdkonbsig_t sig; + cdkonbsig_t *sigsp; + char *name; + int i; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_initonb(brdp=%x)\n", (int) brdp); +#endif /* * Do a basic sanity check on the IO and memory addresses. */ - if (brdp->iobase == 0 || brdp->memaddr == 0) - return -ENODEV; + if ((brdp->iobase == 0) || (brdp->memaddr == 0)) + return(-ENODEV); brdp->iosize = ONB_IOSIZE; @@ -3557,6 +4010,7 @@ static int stli_initonb(stlibrd_t *brdp) case BRD_ONBOARD2: case BRD_ONBOARD2_32: case BRD_ONBOARDRS: + brdp->membase = (void *) brdp->memaddr; brdp->memsize = ONB_MEMSIZE; brdp->pagesize = ONB_ATPAGESIZE; brdp->init = stli_onbinit; @@ -3574,6 +4028,7 @@ static int stli_initonb(stlibrd_t *brdp) break; case BRD_ONBOARDE: + brdp->membase = (void *) brdp->memaddr; brdp->memsize = ONB_EIMEMSIZE; brdp->pagesize = ONB_EIPAGESIZE; brdp->init = stli_onbeinit; @@ -3589,6 +4044,7 @@ static int stli_initonb(stlibrd_t *brdp) case BRD_BRUMBY4: case BRD_BRUMBY8: case BRD_BRUMBY16: + brdp->membase = (void *) brdp->memaddr; brdp->memsize = BBY_MEMSIZE; brdp->pagesize = BBY_PAGESIZE; brdp->init = stli_bbyinit; @@ -3602,6 +4058,7 @@ static int stli_initonb(stlibrd_t *brdp) break; case BRD_STALLION: + brdp->membase = (void *) brdp->memaddr; brdp->memsize = STAL_MEMSIZE; brdp->pagesize = STAL_PAGESIZE; brdp->init = stli_stalinit; @@ -3616,7 +4073,7 @@ static int stli_initonb(stlibrd_t *brdp) default: release_region(brdp->iobase, brdp->iosize); - return -EINVAL; + return(-EINVAL); } /* @@ -3628,10 +4085,10 @@ static int stli_initonb(stlibrd_t *brdp) EBRDINIT(brdp); brdp->membase = ioremap(brdp->memaddr, brdp->memsize); - if (brdp->membase == NULL) + if (brdp->membase == (void *) NULL) { release_region(brdp->iobase, brdp->iosize); - return -ENOMEM; + return(-ENOMEM); } /* @@ -3640,17 +4097,21 @@ static int stli_initonb(stlibrd_t *brdp) * this is, and how many ports. */ EBRDENABLE(brdp); - sigsp = (cdkonbsig_t __iomem *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); - memcpy_fromio(&sig, sigsp, sizeof(cdkonbsig_t)); + sigsp = (cdkonbsig_t *) EBRDGETMEMPTR(brdp, CDK_SIGADDR); + memcpy(&sig, sigsp, sizeof(cdkonbsig_t)); EBRDDISABLE(brdp); - if (sig.magic0 != cpu_to_le16(ONB_MAGIC0) || - sig.magic1 != cpu_to_le16(ONB_MAGIC1) || - sig.magic2 != cpu_to_le16(ONB_MAGIC2) || - sig.magic3 != cpu_to_le16(ONB_MAGIC3)) +#if 0 + printk("%s(%d): sig-> magic=%x:%x:%x:%x romver=%x amask=%x:%x:%x\n", + __FILE__, __LINE__, sig.magic0, sig.magic1, sig.magic2, + sig.magic3, sig.romver, sig.amask0, sig.amask1, sig.amask2); +#endif + + if ((sig.magic0 != ONB_MAGIC0) || (sig.magic1 != ONB_MAGIC1) || + (sig.magic2 != ONB_MAGIC2) || (sig.magic3 != ONB_MAGIC3)) { release_region(brdp->iobase, brdp->iosize); - return -ENODEV; + return(-ENODEV); } /* @@ -3671,7 +4132,7 @@ static int stli_initonb(stlibrd_t *brdp) brdp->state |= BST_FOUND; - return 0; + return(0); } /*****************************************************************************/ @@ -3684,25 +4145,31 @@ static int stli_initonb(stlibrd_t *brdp) static int stli_startbrd(stlibrd_t *brdp) { - cdkhdr_t __iomem *hdrp; - cdkmem_t __iomem *memp; - cdkasy_t __iomem *ap; - unsigned long flags; - stliport_t *portp; - int portnr, nrdevs, i, rc = 0; - u32 memoff; - - spin_lock_irqsave(&brd_lock, flags); + volatile cdkhdr_t *hdrp; + volatile cdkmem_t *memp; + volatile cdkasy_t *ap; + unsigned long flags; + stliport_t *portp; + int portnr, nrdevs, i, rc; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_startbrd(brdp=%x)\n", (int) brdp); +#endif + + rc = 0; + + save_flags(flags); + cli(); EBRDENABLE(brdp); - hdrp = (cdkhdr_t __iomem *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); + hdrp = (volatile cdkhdr_t *) EBRDGETMEMPTR(brdp, CDK_CDKADDR); nrdevs = hdrp->nrdevs; #if 0 printk("%s(%d): CDK version %d.%d.%d --> " "nrdevs=%d memp=%x hostp=%x slavep=%x\n", - __FILE__, __LINE__, readb(&hdrp->ver_release), readb(&hdrp->ver_modification), - readb(&hdrp->ver_fix), nrdevs, (int) readl(&hdrp->memp), readl(&hdrp->hostp), - readl(&hdrp->slavep)); + __FILE__, __LINE__, hdrp->ver_release, hdrp->ver_modification, + hdrp->ver_fix, nrdevs, (int) hdrp->memp, (int) hdrp->hostp, + (int) hdrp->slavep); #endif if (nrdevs < (brdp->nrports + 1)) { @@ -3714,14 +4181,14 @@ static int stli_startbrd(stlibrd_t *brdp) brdp->hostoffset = hdrp->hostp - CDK_CDKADDR; brdp->slaveoffset = hdrp->slavep - CDK_CDKADDR; brdp->bitsize = (nrdevs + 7) / 8; - memoff = readl(&hdrp->memp); - if (memoff > brdp->memsize) { + memp = (volatile cdkmem_t *) hdrp->memp; + if (((unsigned long) memp) > brdp->memsize) { printk(KERN_ERR "STALLION: corrupted shared memory region?\n"); rc = -EIO; goto stli_donestartup; } - memp = (cdkmem_t __iomem *) EBRDGETMEMPTR(brdp, memoff); - if (readw(&memp->dtype) != TYP_ASYNCTRL) { + memp = (volatile cdkmem_t *) EBRDGETMEMPTR(brdp, (unsigned long) memp); + if (memp->dtype != TYP_ASYNCTRL) { printk(KERN_ERR "STALLION: no slave control device found\n"); goto stli_donestartup; } @@ -3733,19 +4200,19 @@ static int stli_startbrd(stlibrd_t *brdp) * change pages while reading memory map. */ for (i = 1, portnr = 0; (i < nrdevs); i++, portnr++, memp++) { - if (readw(&memp->dtype) != TYP_ASYNC) + if (memp->dtype != TYP_ASYNC) break; portp = brdp->ports[portnr]; - if (portp == NULL) + if (portp == (stliport_t *) NULL) break; portp->devnr = i; - portp->addr = readl(&memp->offset); + portp->addr = memp->offset; portp->reqbit = (unsigned char) (0x1 << (i * 8 / nrdevs)); portp->portidx = (unsigned char) (i / 8); portp->portbit = (unsigned char) (0x1 << (i % 8)); } - writeb(0xff, &hdrp->slavereq); + hdrp->slavereq = 0xff; /* * For each port setup a local copy of the RX and TX buffer offsets @@ -3754,22 +4221,22 @@ static int stli_startbrd(stlibrd_t *brdp) */ for (i = 1, portnr = 0; (i < nrdevs); i++, portnr++) { portp = brdp->ports[portnr]; - if (portp == NULL) + if (portp == (stliport_t *) NULL) break; if (portp->addr == 0) break; - ap = (cdkasy_t __iomem *) EBRDGETMEMPTR(brdp, portp->addr); - if (ap != NULL) { - portp->rxsize = readw(&ap->rxq.size); - portp->txsize = readw(&ap->txq.size); - portp->rxoffset = readl(&ap->rxq.offset); - portp->txoffset = readl(&ap->txq.offset); + ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); + if (ap != (volatile cdkasy_t *) NULL) { + portp->rxsize = ap->rxq.size; + portp->txsize = ap->txq.size; + portp->rxoffset = ap->rxq.offset; + portp->txoffset = ap->txq.offset; } } stli_donestartup: EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); if (rc == 0) brdp->state |= BST_STARTED; @@ -3780,7 +4247,7 @@ stli_donestartup: add_timer(&stli_timerlist); } - return rc; + return(rc); } /*****************************************************************************/ @@ -3791,6 +4258,10 @@ stli_donestartup: static int __init stli_brdinit(stlibrd_t *brdp) { +#ifdef DEBUG + printk(KERN_DEBUG "stli_brdinit(brdp=%x)\n", (int) brdp); +#endif + stli_brds[brdp->brdnr] = brdp; switch (brdp->brdtype) { @@ -3818,11 +4289,11 @@ static int __init stli_brdinit(stlibrd_t *brdp) case BRD_ECHPCI: printk(KERN_ERR "STALLION: %s board type not supported in " "this driver\n", stli_brdnames[brdp->brdtype]); - return -ENODEV; + return(ENODEV); default: printk(KERN_ERR "STALLION: board=%d is unknown board " "type=%d\n", brdp->brdnr, brdp->brdtype); - return -ENODEV; + return(ENODEV); } if ((brdp->state & BST_FOUND) == 0) { @@ -3830,7 +4301,7 @@ static int __init stli_brdinit(stlibrd_t *brdp) "io=%x mem=%x\n", stli_brdnames[brdp->brdtype], brdp->brdnr, brdp->iobase, (int) brdp->memaddr); - return -ENODEV; + return(ENODEV); } stli_initports(brdp); @@ -3838,7 +4309,7 @@ static int __init stli_brdinit(stlibrd_t *brdp) "nrpanels=%d nrports=%d\n", stli_brdnames[brdp->brdtype], brdp->brdnr, brdp->iobase, (int) brdp->memaddr, brdp->nrpanels, brdp->nrports); - return 0; + return(0); } /*****************************************************************************/ @@ -3850,10 +4321,14 @@ static int __init stli_brdinit(stlibrd_t *brdp) static int stli_eisamemprobe(stlibrd_t *brdp) { - cdkecpsig_t ecpsig, __iomem *ecpsigp; - cdkonbsig_t onbsig, __iomem *onbsigp; + cdkecpsig_t ecpsig, *ecpsigp; + cdkonbsig_t onbsig, *onbsigp; int i, foundit; +#ifdef DEBUG + printk(KERN_DEBUG "stli_eisamemprobe(brdp=%x)\n", (int) brdp); +#endif + /* * First up we reset the board, to get it into a known state. There * is only 2 board types here we need to worry about. Don;t use the @@ -3877,7 +4352,7 @@ static int stli_eisamemprobe(stlibrd_t *brdp) mdelay(1); stli_onbeenable(brdp); } else { - return -ENODEV; + return(-ENODEV); } foundit = 0; @@ -3889,24 +4364,25 @@ static int stli_eisamemprobe(stlibrd_t *brdp) */ for (i = 0; (i < stli_eisamempsize); i++) { brdp->memaddr = stli_eisamemprobeaddrs[i]; + brdp->membase = (void *) brdp->memaddr; brdp->membase = ioremap(brdp->memaddr, brdp->memsize); - if (brdp->membase == NULL) + if (brdp->membase == (void *) NULL) continue; if (brdp->brdtype == BRD_ECPE) { - ecpsigp = (cdkecpsig_t __iomem *) stli_ecpeigetmemptr(brdp, + ecpsigp = (cdkecpsig_t *) stli_ecpeigetmemptr(brdp, CDK_SIGADDR, __LINE__); - memcpy_fromio(&ecpsig, ecpsigp, sizeof(cdkecpsig_t)); - if (ecpsig.magic == cpu_to_le32(ECP_MAGIC)) + memcpy(&ecpsig, ecpsigp, sizeof(cdkecpsig_t)); + if (ecpsig.magic == ECP_MAGIC) foundit = 1; } else { - onbsigp = (cdkonbsig_t __iomem *) stli_onbegetmemptr(brdp, + onbsigp = (cdkonbsig_t *) stli_onbegetmemptr(brdp, CDK_SIGADDR, __LINE__); - memcpy_fromio(&onbsig, onbsigp, sizeof(cdkonbsig_t)); - if ((onbsig.magic0 == cpu_to_le16(ONB_MAGIC0)) && - (onbsig.magic1 == cpu_to_le16(ONB_MAGIC1)) && - (onbsig.magic2 == cpu_to_le16(ONB_MAGIC2)) && - (onbsig.magic3 == cpu_to_le16(ONB_MAGIC3))) + memcpy(&onbsig, onbsigp, sizeof(cdkonbsig_t)); + if ((onbsig.magic0 == ONB_MAGIC0) && + (onbsig.magic1 == ONB_MAGIC1) && + (onbsig.magic2 == ONB_MAGIC2) && + (onbsig.magic3 == ONB_MAGIC3)) foundit = 1; } @@ -3930,9 +4406,9 @@ static int stli_eisamemprobe(stlibrd_t *brdp) printk(KERN_ERR "STALLION: failed to probe shared memory " "region for %s in EISA slot=%d\n", stli_brdnames[brdp->brdtype], (brdp->iobase >> 12)); - return -ENODEV; + return(-ENODEV); } - return 0; + return(0); } static int stli_getbrdnr(void) @@ -3963,16 +4439,22 @@ static int stli_getbrdnr(void) static int stli_findeisabrds(void) { - stlibrd_t *brdp; - unsigned int iobase, eid; - int i; + stlibrd_t *brdp; + unsigned int iobase, eid; + int i; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_findeisabrds()\n"); +#endif /* - * Firstly check if this is an EISA system. If this is not an EISA system then + * Firstly check if this is an EISA system. Do this by probing for + * the system board EISA ID. If this is not an EISA system then * don't bother going any further! */ - if (EISA_bus) - return 0; + outb(0xff, 0xc80); + if (inb(0xc80) == 0xff) + return(0); /* * Looks like an EISA system, so go searching for EISA boards. @@ -3990,7 +4472,7 @@ static int stli_findeisabrds(void) */ for (i = 0; (i < STL_MAXBRDS); i++) { brdp = stli_brds[i]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) continue; if (brdp->iobase == iobase) break; @@ -4002,10 +4484,10 @@ static int stli_findeisabrds(void) * We have found a Stallion board and it is not configured already. * Allocate a board structure and initialize it. */ - if ((brdp = stli_allocbrd()) == NULL) - return -ENOMEM; + if ((brdp = stli_allocbrd()) == (stlibrd_t *) NULL) + return(-ENOMEM); if ((brdp->brdnr = stli_getbrdnr()) < 0) - return -ENOMEM; + return(-ENOMEM); eid = inb(iobase + 0xc82); if (eid == ECP_EISAID) brdp->brdtype = BRD_ECPE; @@ -4020,7 +4502,7 @@ static int stli_findeisabrds(void) stli_brdinit(brdp); } - return 0; + return(0); } /*****************************************************************************/ @@ -4041,18 +4523,32 @@ static int stli_findeisabrds(void) static int stli_initpcibrd(int brdtype, struct pci_dev *devp) { - stlibrd_t *brdp; + stlibrd_t *brdp; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_initpcibrd(brdtype=%d,busnr=%x,devnr=%x)\n", + brdtype, dev->bus->number, dev->devfn); +#endif if (pci_enable_device(devp)) - return -EIO; - if ((brdp = stli_allocbrd()) == NULL) - return -ENOMEM; + return(-EIO); + if ((brdp = stli_allocbrd()) == (stlibrd_t *) NULL) + return(-ENOMEM); if ((brdp->brdnr = stli_getbrdnr()) < 0) { printk(KERN_INFO "STALLION: too many boards found, " "maximum supported %d\n", STL_MAXBRDS); - return 0; + return(0); } brdp->brdtype = brdtype; + +#ifdef DEBUG + printk(KERN_DEBUG "%s(%d): BAR[]=%lx,%lx,%lx,%lx\n", __FILE__, __LINE__, + pci_resource_start(devp, 0), + pci_resource_start(devp, 1), + pci_resource_start(devp, 2), + pci_resource_start(devp, 3)); +#endif + /* * We have all resources from the board, so lets setup the actual * board structure now. @@ -4061,7 +4557,7 @@ static int stli_initpcibrd(int brdtype, struct pci_dev *devp) brdp->memaddr = pci_resource_start(devp, 2); stli_brdinit(brdp); - return 0; + return(0); } /*****************************************************************************/ @@ -4073,12 +4569,20 @@ static int stli_initpcibrd(int brdtype, struct pci_dev *devp) static int stli_findpcibrds(void) { - struct pci_dev *dev = NULL; + struct pci_dev *dev = NULL; + int rc; + +#ifdef DEBUG + printk("stli_findpcibrds()\n"); +#endif - while ((dev = pci_get_device(PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECRA, dev))) { - stli_initpcibrd(BRD_ECPPCI, dev); + while ((dev = pci_find_device(PCI_VENDOR_ID_STALLION, + PCI_DEVICE_ID_ECRA, dev))) { + if ((rc = stli_initpcibrd(BRD_ECPPCI, dev))) + return(rc); } - return 0; + + return(0); } #endif @@ -4091,16 +4595,17 @@ static int stli_findpcibrds(void) static stlibrd_t *stli_allocbrd(void) { - stlibrd_t *brdp; + stlibrd_t *brdp; brdp = kzalloc(sizeof(stlibrd_t), GFP_KERNEL); if (!brdp) { printk(KERN_ERR "STALLION: failed to allocate memory " - "(size=%Zd)\n", sizeof(stlibrd_t)); + "(size=%d)\n", sizeof(stlibrd_t)); return NULL; } + brdp->magic = STLI_BOARDMAGIC; - return brdp; + return(brdp); } /*****************************************************************************/ @@ -4112,9 +4617,13 @@ static stlibrd_t *stli_allocbrd(void) static int stli_initbrds(void) { - stlibrd_t *brdp, *nxtbrdp; - stlconf_t *confp; - int i, j; + stlibrd_t *brdp, *nxtbrdp; + stlconf_t *confp; + int i, j; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_initbrds()\n"); +#endif if (stli_nrbrds > STL_MAXBRDS) { printk(KERN_INFO "STALLION: too many boards in configuration " @@ -4129,9 +4638,11 @@ static int stli_initbrds(void) */ for (i = 0; (i < stli_nrbrds); i++) { confp = &stli_brdconf[i]; +#ifdef MODULE stli_parsebrd(confp, stli_brdsp[i]); - if ((brdp = stli_allocbrd()) == NULL) - return -ENOMEM; +#endif + if ((brdp = stli_allocbrd()) == (stlibrd_t *) NULL) + return(-ENOMEM); brdp->brdnr = i; brdp->brdtype = confp->brdtype; brdp->iobase = confp->ioaddr1; @@ -4143,7 +4654,9 @@ static int stli_initbrds(void) * Static configuration table done, so now use dynamic methods to * see if any more boards should be configured. */ +#ifdef MODULE stli_argbrds(); +#endif if (STLI_EISAPROBE) stli_findeisabrds(); #ifdef CONFIG_PCI @@ -4159,11 +4672,11 @@ static int stli_initbrds(void) if (stli_nrbrds > 1) { for (i = 0; (i < stli_nrbrds); i++) { brdp = stli_brds[i]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) continue; for (j = i + 1; (j < stli_nrbrds); j++) { nxtbrdp = stli_brds[j]; - if (nxtbrdp == NULL) + if (nxtbrdp == (stlibrd_t *) NULL) continue; if ((brdp->membase >= nxtbrdp->membase) && (brdp->membase <= (nxtbrdp->membase + @@ -4178,7 +4691,7 @@ static int stli_initbrds(void) if (stli_shared == 0) { for (i = 0; (i < stli_nrbrds); i++) { brdp = stli_brds[i]; - if (brdp == NULL) + if (brdp == (stlibrd_t *) NULL) continue; if (brdp->state & BST_FOUND) { EBRDENABLE(brdp); @@ -4188,7 +4701,7 @@ static int stli_initbrds(void) } } - return 0; + return(0); } /*****************************************************************************/ @@ -4201,55 +4714,48 @@ static int stli_initbrds(void) static ssize_t stli_memread(struct file *fp, char __user *buf, size_t count, loff_t *offp) { - unsigned long flags; - void *memptr; - stlibrd_t *brdp; - int brdnr, size, n; - void *p; - loff_t off = *offp; + unsigned long flags; + void *memptr; + stlibrd_t *brdp; + int brdnr, size, n; + +#ifdef DEBUG + printk(KERN_DEBUG "stli_memread(fp=%x,buf=%x,count=%x,offp=%x)\n", + (int) fp, (int) buf, count, (int) offp); +#endif brdnr = iminor(fp->f_dentry->d_inode); if (brdnr >= stli_nrbrds) - return -ENODEV; + return(-ENODEV); brdp = stli_brds[brdnr]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); if (brdp->state == 0) - return -ENODEV; - if (off >= brdp->memsize || off + count < off) - return 0; - - size = MIN(count, (brdp->memsize - off)); - - /* - * Copy the data a page at a time - */ + return(-ENODEV); + if (fp->f_pos >= brdp->memsize) + return(0); - p = (void *)__get_free_page(GFP_KERNEL); - if(p == NULL) - return -ENOMEM; + size = MIN(count, (brdp->memsize - fp->f_pos)); + save_flags(flags); + cli(); + EBRDENABLE(brdp); while (size > 0) { - spin_lock_irqsave(&brd_lock, flags); - EBRDENABLE(brdp); - memptr = (void *) EBRDGETMEMPTR(brdp, off); - n = MIN(size, (brdp->pagesize - (((unsigned long) off) % brdp->pagesize))); - n = MIN(n, PAGE_SIZE); - memcpy_fromio(p, memptr, n); - EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); - if (copy_to_user(buf, p, n)) { + memptr = (void *) EBRDGETMEMPTR(brdp, fp->f_pos); + n = MIN(size, (brdp->pagesize - (((unsigned long) fp->f_pos) % brdp->pagesize))); + if (copy_to_user(buf, memptr, n)) { count = -EFAULT; goto out; } - off += n; + fp->f_pos += n; buf += n; size -= n; } out: - *offp = off; - free_page((unsigned long)p); - return count; + EBRDDISABLE(brdp); + restore_flags(flags); + + return(count); } /*****************************************************************************/ @@ -4258,65 +4764,54 @@ out: * Code to handle an "staliomem" write operation. This device is the * contents of the board shared memory. It is used for down loading * the slave image (and debugging :-) - * - * FIXME: copy under lock */ static ssize_t stli_memwrite(struct file *fp, const char __user *buf, size_t count, loff_t *offp) { - unsigned long flags; - void *memptr; - stlibrd_t *brdp; - char __user *chbuf; - int brdnr, size, n; - void *p; - loff_t off = *offp; + unsigned long flags; + void *memptr; + stlibrd_t *brdp; + char __user *chbuf; + int brdnr, size, n; - brdnr = iminor(fp->f_dentry->d_inode); +#ifdef DEBUG + printk(KERN_DEBUG "stli_memwrite(fp=%x,buf=%x,count=%x,offp=%x)\n", + (int) fp, (int) buf, count, (int) offp); +#endif + brdnr = iminor(fp->f_dentry->d_inode); if (brdnr >= stli_nrbrds) - return -ENODEV; + return(-ENODEV); brdp = stli_brds[brdnr]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); if (brdp->state == 0) - return -ENODEV; - if (off >= brdp->memsize || off + count < off) - return 0; + return(-ENODEV); + if (fp->f_pos >= brdp->memsize) + return(0); chbuf = (char __user *) buf; - size = MIN(count, (brdp->memsize - off)); - - /* - * Copy the data a page at a time - */ - - p = (void *)__get_free_page(GFP_KERNEL); - if(p == NULL) - return -ENOMEM; + size = MIN(count, (brdp->memsize - fp->f_pos)); + save_flags(flags); + cli(); + EBRDENABLE(brdp); while (size > 0) { - n = MIN(size, (brdp->pagesize - (((unsigned long) off) % brdp->pagesize))); - n = MIN(n, PAGE_SIZE); - if (copy_from_user(p, chbuf, n)) { - if (count == 0) - count = -EFAULT; + memptr = (void *) EBRDGETMEMPTR(brdp, fp->f_pos); + n = MIN(size, (brdp->pagesize - (((unsigned long) fp->f_pos) % brdp->pagesize))); + if (copy_from_user(memptr, chbuf, n)) { + count = -EFAULT; goto out; } - spin_lock_irqsave(&brd_lock, flags); - EBRDENABLE(brdp); - memptr = (void *) EBRDGETMEMPTR(brdp, off); - memcpy_toio(memptr, p, n); - EBRDDISABLE(brdp); - spin_unlock_irqrestore(&brd_lock, flags); - off += n; + fp->f_pos += n; chbuf += n; size -= n; } out: - free_page((unsigned long) p); - *offp = off; - return count; + EBRDDISABLE(brdp); + restore_flags(flags); + + return(count); } /*****************************************************************************/ @@ -4327,16 +4822,16 @@ out: static int stli_getbrdstats(combrd_t __user *bp) { - stlibrd_t *brdp; - int i; + stlibrd_t *brdp; + int i; if (copy_from_user(&stli_brdstats, bp, sizeof(combrd_t))) return -EFAULT; if (stli_brdstats.brd >= STL_MAXBRDS) - return -ENODEV; + return(-ENODEV); brdp = stli_brds[stli_brdstats.brd]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); memset(&stli_brdstats, 0, sizeof(combrd_t)); stli_brdstats.brd = brdp->brdnr; @@ -4355,7 +4850,7 @@ static int stli_getbrdstats(combrd_t __user *bp) if (copy_to_user(bp, &stli_brdstats, sizeof(combrd_t))) return -EFAULT; - return 0; + return(0); } /*****************************************************************************/ @@ -4366,19 +4861,19 @@ static int stli_getbrdstats(combrd_t __user *bp) static stliport_t *stli_getport(int brdnr, int panelnr, int portnr) { - stlibrd_t *brdp; - int i; + stlibrd_t *brdp; + int i; - if (brdnr < 0 || brdnr >= STL_MAXBRDS) - return NULL; + if ((brdnr < 0) || (brdnr >= STL_MAXBRDS)) + return((stliport_t *) NULL); brdp = stli_brds[brdnr]; - if (brdp == NULL) - return NULL; + if (brdp == (stlibrd_t *) NULL) + return((stliport_t *) NULL); for (i = 0; (i < panelnr); i++) portnr += brdp->panels[i]; if ((portnr < 0) || (portnr >= brdp->nrports)) - return NULL; - return brdp->ports[portnr]; + return((stliport_t *) NULL); + return(brdp->ports[portnr]); } /*****************************************************************************/ @@ -4397,16 +4892,16 @@ static int stli_portcmdstats(stliport_t *portp) memset(&stli_comstats, 0, sizeof(comstats_t)); - if (portp == NULL) - return -ENODEV; + if (portp == (stliport_t *) NULL) + return(-ENODEV); brdp = stli_brds[portp->brdnr]; - if (brdp == NULL) - return -ENODEV; + if (brdp == (stlibrd_t *) NULL) + return(-ENODEV); if (brdp->state & BST_STARTED) { if ((rc = stli_cmdwait(brdp, portp, A_GETSTATS, &stli_cdkstats, sizeof(asystats_t), 1)) < 0) - return rc; + return(rc); } else { memset(&stli_cdkstats, 0, sizeof(asystats_t)); } @@ -4417,12 +4912,13 @@ static int stli_portcmdstats(stliport_t *portp) stli_comstats.state = portp->state; stli_comstats.flags = portp->flags; - spin_lock_irqsave(&brd_lock, flags); - if (portp->tty != NULL) { + save_flags(flags); + cli(); + if (portp->tty != (struct tty_struct *) NULL) { if (portp->tty->driver_data == portp) { stli_comstats.ttystate = portp->tty->flags; - stli_comstats.rxbuffered = -1; - if (portp->tty->termios != NULL) { + stli_comstats.rxbuffered = -1 /*portp->tty->flip.count*/; + if (portp->tty->termios != (struct termios *) NULL) { stli_comstats.cflags = portp->tty->termios->c_cflag; stli_comstats.iflags = portp->tty->termios->c_iflag; stli_comstats.oflags = portp->tty->termios->c_oflag; @@ -4430,7 +4926,7 @@ static int stli_portcmdstats(stliport_t *portp) } } } - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); stli_comstats.txtotal = stli_cdkstats.txchars; stli_comstats.rxtotal = stli_cdkstats.rxchars + stli_cdkstats.ringover; @@ -4452,7 +4948,7 @@ static int stli_portcmdstats(stliport_t *portp) stli_comstats.hwid = stli_cdkstats.hwid; stli_comstats.signals = stli_mktiocm(stli_cdkstats.signals); - return 0; + return(0); } /*****************************************************************************/ @@ -4465,8 +4961,8 @@ static int stli_portcmdstats(stliport_t *portp) static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) { - stlibrd_t *brdp; - int rc; + stlibrd_t *brdp; + int rc; if (!portp) { if (copy_from_user(&stli_comstats, cp, sizeof(comstats_t))) @@ -4496,8 +4992,8 @@ static int stli_getportstats(stliport_t *portp, comstats_t __user *cp) static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) { - stlibrd_t *brdp; - int rc; + stlibrd_t *brdp; + int rc; if (!portp) { if (copy_from_user(&stli_comstats, cp, sizeof(comstats_t))) @@ -4535,7 +5031,7 @@ static int stli_clrportstats(stliport_t *portp, comstats_t __user *cp) static int stli_getportstruct(stliport_t __user *arg) { - stliport_t *portp; + stliport_t *portp; if (copy_from_user(&stli_dummyport, arg, sizeof(stliport_t))) return -EFAULT; @@ -4556,7 +5052,7 @@ static int stli_getportstruct(stliport_t __user *arg) static int stli_getbrdstruct(stlibrd_t __user *arg) { - stlibrd_t *brdp; + stlibrd_t *brdp; if (copy_from_user(&stli_dummybrd, arg, sizeof(stlibrd_t))) return -EFAULT; @@ -4580,10 +5076,15 @@ static int stli_getbrdstruct(stlibrd_t __user *arg) static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) { - stlibrd_t *brdp; - int brdnr, rc, done; + stlibrd_t *brdp; + int brdnr, rc, done; void __user *argp = (void __user *)arg; +#ifdef DEBUG + printk(KERN_DEBUG "stli_memioctl(ip=%x,fp=%x,cmd=%x,arg=%x)\n", + (int) ip, (int) fp, cmd, (int) arg); +#endif + /* * First up handle the board independent ioctls. */ @@ -4614,7 +5115,7 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un } if (done) - return rc; + return(rc); /* * Now handle the board specific ioctls. These all depend on the @@ -4622,12 +5123,12 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un */ brdnr = iminor(ip); if (brdnr >= STL_MAXBRDS) - return -ENODEV; + return(-ENODEV); brdp = stli_brds[brdnr]; if (!brdp) - return -ENODEV; + return(-ENODEV); if (brdp->state == 0) - return -ENODEV; + return(-ENODEV); switch (cmd) { case STL_BINTR: @@ -4651,7 +5152,8 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un rc = -ENOIOCTLCMD; break; } - return rc; + + return(rc); } static struct tty_operations stli_ops = { @@ -4680,14 +5182,11 @@ static struct tty_operations stli_ops = { /*****************************************************************************/ -static int __init stli_init(void) +int __init stli_init(void) { int i; printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion); - spin_lock_init(&stli_lock); - spin_lock_init(&brd_lock); - stli_initbrds(); stli_serial = alloc_tty_driver(STL_MAXBRDS * STL_MAXPORTS); @@ -4697,6 +5196,10 @@ static int __init stli_init(void) /* * Allocate a temporary write buffer. */ + stli_tmpwritebuf = kmalloc(STLI_TXBUFSIZE, GFP_KERNEL); + if (!stli_tmpwritebuf) + printk(KERN_ERR "STALLION: failed to allocate memory " + "(size=%d)\n", STLI_TXBUFSIZE); stli_txcookbuf = kmalloc(STLI_TXBUFSIZE, GFP_KERNEL); if (!stli_txcookbuf) printk(KERN_ERR "STALLION: failed to allocate memory " @@ -4710,11 +5213,16 @@ static int __init stli_init(void) printk(KERN_ERR "STALLION: failed to register serial memory " "device\n"); + devfs_mk_dir("staliomem"); istallion_class = class_create(THIS_MODULE, "staliomem"); - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { + devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), + S_IFCHR | S_IRUSR | S_IWUSR, + "staliomem/%d", i); class_device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); + } /* * Set up the tty driver structure and register us as a driver. @@ -4735,7 +5243,7 @@ static int __init stli_init(void) printk(KERN_ERR "STALLION: failed to register serial driver\n"); return -EBUSY; } - return 0; + return(0); } /*****************************************************************************/ diff --git a/drivers/char/ite_gpio.c b/drivers/char/ite_gpio.c index cde562d70..d1ed6ac95 100644 --- a/drivers/char/ite_gpio.c +++ b/drivers/char/ite_gpio.c @@ -357,7 +357,7 @@ DEB(printk("interrupt 0x%x %d\n",ITE_GPAISR, i)); } } -static const struct file_operations ite_gpio_fops = { +static struct file_operations ite_gpio_fops = { .owner = THIS_MODULE, .ioctl = ite_gpio_ioctl, .open = ite_gpio_open, @@ -397,7 +397,7 @@ int __init ite_gpio_init(void) init_waitqueue_head(&ite_gpio_wait[i]); } - if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, IRQF_SHARED, "gpio", 0) < 0) { + if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, SA_SHIRQ, "gpio", 0) < 0) { misc_deregister(&ite_gpio_miscdev); release_region(ite_gpio_base, 0x1c); return 0; diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 3159db651..3d75591eb 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -24,6 +24,7 @@ * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) */ +#include #include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include static void kbd_disconnect(struct input_handle *handle); extern void ctrl_alt_del(void); @@ -107,6 +107,7 @@ const int NR_TYPES = ARRAY_SIZE(max_vals); struct kbd_struct kbd_table[MAX_NR_CONSOLES]; static struct kbd_struct *kbd = kbd_table; +static struct kbd_struct kbd0; int spawnpid, spawnsig; @@ -149,7 +150,6 @@ unsigned char kbd_sysrq_xlate[KEY_MAX + 1] = "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */ "\r\000/"; /* 0x60 - 0x6f */ static int sysrq_down; -static int sysrq_alt_use; #endif static int sysrq_alt; @@ -222,13 +222,13 @@ static void kd_nosound(unsigned long ignored) { struct list_head *node; - list_for_each(node, &kbd_handler.h_list) { + list_for_each(node,&kbd_handler.h_list) { struct input_handle *handle = to_handle_h(node); if (test_bit(EV_SND, handle->dev->evbit)) { if (test_bit(SND_TONE, handle->dev->sndbit)) - input_inject_event(handle, EV_SND, SND_TONE, 0); + input_event(handle->dev, EV_SND, SND_TONE, 0); if (test_bit(SND_BELL, handle->dev->sndbit)) - input_inject_event(handle, EV_SND, SND_BELL, 0); + input_event(handle->dev, EV_SND, SND_BELL, 0); } } } @@ -246,11 +246,11 @@ void kd_mksound(unsigned int hz, unsigned int ticks) struct input_handle *handle = to_handle_h(node); if (test_bit(EV_SND, handle->dev->evbit)) { if (test_bit(SND_TONE, handle->dev->sndbit)) { - input_inject_event(handle, EV_SND, SND_TONE, hz); + input_event(handle->dev, EV_SND, SND_TONE, hz); break; } if (test_bit(SND_BELL, handle->dev->sndbit)) { - input_inject_event(handle, EV_SND, SND_BELL, 1); + input_event(handle->dev, EV_SND, SND_BELL, 1); break; } } @@ -271,15 +271,15 @@ int kbd_rate(struct kbd_repeat *rep) unsigned int d = 0; unsigned int p = 0; - list_for_each(node, &kbd_handler.h_list) { + list_for_each(node,&kbd_handler.h_list) { struct input_handle *handle = to_handle_h(node); struct input_dev *dev = handle->dev; if (test_bit(EV_REP, dev->evbit)) { if (rep->delay > 0) - input_inject_event(handle, EV_REP, REP_DELAY, rep->delay); + input_event(dev, EV_REP, REP_DELAY, rep->delay); if (rep->period > 0) - input_inject_event(handle, EV_REP, REP_PERIOD, rep->period); + input_event(dev, EV_REP, REP_PERIOD, rep->period); d = dev->rep[REP_DELAY]; p = dev->rep[REP_PERIOD]; } @@ -672,7 +672,7 @@ static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag, struc */ static void k_dead(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) { - static const unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; + static unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' }; value = ret_diacr[value]; k_deadunicode(vc, value, up_flag, regs); } @@ -709,8 +709,8 @@ static void k_cur(struct vc_data *vc, unsigned char value, char up_flag, struct static void k_pad(struct vc_data *vc, unsigned char value, char up_flag, struct pt_regs *regs) { - static const char pad_chars[] = "0123456789+-*/\015,.?()#"; - static const char app_map[] = "pqrstuvwxylSRQMnnmPQS"; + static const char *pad_chars = "0123456789+-*/\015,.?()#"; + static const char *app_map = "pqrstuvwxylSRQMnnmPQS"; if (up_flag) return; /* no action, if this is a key release */ @@ -987,7 +987,7 @@ static inline unsigned char getleds(void) * interrupt routines for this thing allows us to easily mask * this when we don't want any of the above to happen. * This allows for easy and efficient race-condition prevention - * for kbd_start => input_inject_event(dev, EV_LED, ...) => ... + * for kbd_refresh_leds => input_event(dev, EV_LED, ...) => ... */ static void kbd_bh(unsigned long dummy) @@ -997,11 +997,11 @@ static void kbd_bh(unsigned long dummy) if (leds != ledstate) { list_for_each(node, &kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); - input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & 0x01)); - input_inject_event(handle, EV_LED, LED_NUML, !!(leds & 0x02)); - input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & 0x04)); - input_inject_event(handle, EV_SYN, SYN_REPORT, 0); + struct input_handle * handle = to_handle_h(node); + input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); + input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); + input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); + input_sync(handle->dev); } } @@ -1010,6 +1010,23 @@ static void kbd_bh(unsigned long dummy) DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); +/* + * This allows a newly plugged keyboard to pick the LED state. + */ +static void kbd_refresh_leds(struct input_handle *handle) +{ + unsigned char leds = ledstate; + + tasklet_disable(&keyboard_tasklet); + if (leds != 0xff) { + input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); + input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); + input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); + input_sync(handle->dev); + } + tasklet_enable(&keyboard_tasklet); +} + #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ @@ -1018,14 +1035,14 @@ DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ ((dev)->id.bustype == BUS_I8042) && ((dev)->id.vendor == 0x0001) && ((dev)->id.product == 0x0001)) -static const unsigned short x86_keycodes[256] = +static unsigned short x86_keycodes[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 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, 84,118, 86, 87, 88,115,120,119,121,112,123, 92, - 284,285,309, 0,312, 91,327,328,329,331,333,335,336,337,338,339, + 284,285,309,298,312, 91,327,328,329,331,333,335,336,337,338,339, 367,288,302,304,350, 89,334,326,267,126,268,269,125,347,348,349, 360,261,262,263,268,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, @@ -1047,55 +1064,36 @@ extern void sun_do_break(void); static int emulate_raw(struct vc_data *vc, unsigned int keycode, unsigned char up_flag) { - int code; + if (keycode > 255 || !x86_keycodes[keycode]) + return -1; switch (keycode) { case KEY_PAUSE: put_queue(vc, 0xe1); put_queue(vc, 0x1d | up_flag); put_queue(vc, 0x45 | up_flag); - break; - - case KEY_HANGEUL: - if (!up_flag) - put_queue(vc, 0xf2); - break; - + return 0; + case KEY_HANGUEL: + if (!up_flag) put_queue(vc, 0xf1); + return 0; case KEY_HANJA: - if (!up_flag) - put_queue(vc, 0xf1); - break; - - case KEY_SYSRQ: - /* - * Real AT keyboards (that's what we're trying - * to emulate here emit 0xe0 0x2a 0xe0 0x37 when - * pressing PrtSc/SysRq alone, but simply 0x54 - * when pressing Alt+PrtSc/SysRq. - */ - if (sysrq_alt) { - put_queue(vc, 0x54 | up_flag); - } else { - put_queue(vc, 0xe0); - put_queue(vc, 0x2a | up_flag); - put_queue(vc, 0xe0); - put_queue(vc, 0x37 | up_flag); - } - break; + if (!up_flag) put_queue(vc, 0xf2); + return 0; + } - default: - if (keycode > 255) - return -1; + if (keycode == KEY_SYSRQ && sysrq_alt) { + put_queue(vc, 0x54 | up_flag); + return 0; + } - code = x86_keycodes[keycode]; - if (!code) - return -1; + if (x86_keycodes[keycode] & 0x100) + put_queue(vc, 0xe0); - if (code & 0x100) - put_queue(vc, 0xe0); - put_queue(vc, (code & 0x7f) | up_flag); + put_queue(vc, (x86_keycodes[keycode] & 0x7f) | up_flag); - break; + if (keycode == KEY_SYSRQ) { + put_queue(vc, 0xe0); + put_queue(vc, 0x37 | up_flag); } return 0; @@ -1144,7 +1142,7 @@ static void kbd_keycode(unsigned int keycode, int down, kbd = kbd_table + fg_console; if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) - sysrq_alt = down ? keycode : 0; + sysrq_alt = down; #ifdef CONFIG_SPARC if (keycode == KEY_STOP) sparc_l1_a_state = down; @@ -1164,14 +1162,9 @@ static void kbd_keycode(unsigned int keycode, int down, #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */ if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) { - if (!sysrq_down) { - sysrq_down = down; - sysrq_alt_use = sysrq_alt; - } + sysrq_down = down; return; } - if (sysrq_down && !down && keycode == sysrq_alt_use) - sysrq_down = 0; if (sysrq_down && down && !rep) { handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty); return; @@ -1297,15 +1290,16 @@ static struct input_handle *kbd_connect(struct input_handler *handler, if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit)) return NULL; - handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL); - if (!handle) + if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL))) return NULL; + memset(handle, 0, sizeof(struct input_handle)); handle->dev = dev; handle->handler = handler; handle->name = "kbd"; input_open_device(handle); + kbd_refresh_leds(handle); return handle; } @@ -1316,24 +1310,6 @@ static void kbd_disconnect(struct input_handle *handle) kfree(handle); } -/* - * Start keyboard handler on the new keyboard by refreshing LED state to - * match the rest of the system. - */ -static void kbd_start(struct input_handle *handle) -{ - unsigned char leds = ledstate; - - tasklet_disable(&keyboard_tasklet); - if (leds != 0xff) { - input_inject_event(handle, EV_LED, LED_SCROLLL, !!(leds & 0x01)); - input_inject_event(handle, EV_LED, LED_NUML, !!(leds & 0x02)); - input_inject_event(handle, EV_LED, LED_CAPSL, !!(leds & 0x04)); - input_inject_event(handle, EV_SYN, SYN_REPORT, 0); - } - tasklet_enable(&keyboard_tasklet); -} - static struct input_device_id kbd_ids[] = { { .flags = INPUT_DEVICE_ID_MATCH_EVBIT, @@ -1354,7 +1330,6 @@ static struct input_handler kbd_handler = { .event = kbd_event, .connect = kbd_connect, .disconnect = kbd_disconnect, - .start = kbd_start, .name = "kbd", .id_table = kbd_ids, }; @@ -1363,15 +1338,15 @@ int __init kbd_init(void) { int i; - for (i = 0; i < MAX_NR_CONSOLES; i++) { - kbd_table[i].ledflagstate = KBD_DEFLEDS; - kbd_table[i].default_ledflagstate = KBD_DEFLEDS; - kbd_table[i].ledmode = LED_SHOW_FLAGS; - kbd_table[i].lockstate = KBD_DEFLOCK; - kbd_table[i].slockstate = 0; - kbd_table[i].modeflags = KBD_DEFMODE; - kbd_table[i].kbdmode = VC_UNICODE; - } + kbd0.ledflagstate = kbd0.default_ledflagstate = KBD_DEFLEDS; + kbd0.ledmode = LED_SHOW_FLAGS; + kbd0.lockstate = KBD_DEFLOCK; + kbd0.slockstate = 0; + kbd0.modeflags = KBD_DEFMODE; + kbd0.kbdmode = VC_UNICODE; + + for (i = 0 ; i < MAX_NR_CONSOLES ; i++) + kbd_table[i] = kbd0; input_register_handler(&kbd_handler); diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index da601fd6c..29963d8be 100644 --- a/drivers/char/lcd.c +++ b/drivers/char/lcd.c @@ -14,6 +14,7 @@ #define RTC_IO_EXTENT 0x10 /*Only really two ports, but... */ +#include #include #include #include @@ -598,7 +599,7 @@ static ssize_t lcd_read(struct file *file, char *buf, * The various file operations we support. */ -static const struct file_operations lcd_fops = { +static struct file_operations lcd_fops = { .read = lcd_read, .ioctl = lcd_ioctl, .open = lcd_open, diff --git a/drivers/char/lp.c b/drivers/char/lp.c index f875fda3b..e57260525 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -114,11 +114,13 @@ #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -666,7 +668,7 @@ static int lp_ioctl(struct inode *inode, struct file *file, return retval; } -static const struct file_operations lp_fops = { +static struct file_operations lp_fops = { .owner = THIS_MODULE, .write = lp_write, .ioctl = lp_ioctl, @@ -805,6 +807,8 @@ static int lp_register(int nr, struct parport *port) class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, "lp%d", nr); + devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, + "printers/%d", nr); printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); @@ -903,6 +907,7 @@ static int __init lp_init (void) return -EIO; } + devfs_mk_dir("printers"); lp_class = class_create(THIS_MODULE, "printer"); if (IS_ERR(lp_class)) { err = PTR_ERR(lp_class); @@ -928,6 +933,7 @@ static int __init lp_init (void) out_class: class_destroy(lp_class); out_devfs: + devfs_remove("printers"); unregister_chrdev(LP_MAJOR, "lp"); return err; } @@ -975,8 +981,10 @@ static void lp_cleanup_module (void) if (lp_table[offset].dev == NULL) continue; parport_unregister_device(lp_table[offset].dev); + devfs_remove("printers/%d", offset); class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); } + devfs_remove("printers"); class_destroy(lp_class); } diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 0385650f6..c268ee04b 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c @@ -10,6 +10,7 @@ * MOATB Core Services driver. */ +#include #include #include #include @@ -592,7 +593,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) getdma->intrHostDest = sn_irq->irq_xtalkaddr; getdma->intrVector = sn_irq->irq_irq; if (request_irq(sn_irq->irq_irq, - (void *)mbcs_completion_intr_handler, IRQF_SHARED, + (void *)mbcs_completion_intr_handler, SA_SHIRQ, "MBCS get intr", (void *)soft)) { tiocx_irq_free(soft->get_sn_irq); return -EAGAIN; @@ -608,7 +609,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) putdma->intrHostDest = sn_irq->irq_xtalkaddr; putdma->intrVector = sn_irq->irq_irq; if (request_irq(sn_irq->irq_irq, - (void *)mbcs_completion_intr_handler, IRQF_SHARED, + (void *)mbcs_completion_intr_handler, SA_SHIRQ, "MBCS put intr", (void *)soft)) { tiocx_irq_free(soft->put_sn_irq); free_irq(soft->get_sn_irq->irq_irq, soft); @@ -628,7 +629,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) algo->intrHostDest = sn_irq->irq_xtalkaddr; algo->intrVector = sn_irq->irq_irq; if (request_irq(sn_irq->irq_irq, - (void *)mbcs_completion_intr_handler, IRQF_SHARED, + (void *)mbcs_completion_intr_handler, SA_SHIRQ, "MBCS algo intr", (void *)soft)) { tiocx_irq_free(soft->algo_sn_irq); free_irq(soft->put_sn_irq->irq_irq, soft); diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 6f9c6ccc0..418da028c 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -8,6 +8,7 @@ * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar */ +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +113,7 @@ static inline int valid_phys_addr_range(unsigned long addr, size_t count) return 1; } -static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) +static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t size) { return 1; } @@ -264,7 +266,7 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) { size_t size = vma->vm_end - vma->vm_start; - if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) + if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, size)) return -EINVAL; vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, @@ -682,7 +684,7 @@ static int open_port(struct inode * inode, struct file * filp) #define open_oldmem open_mem #ifndef ARCH_HAS_DEV_MEM -static const struct file_operations mem_fops = { +static struct file_operations mem_fops = { .llseek = memory_lseek, .read = read_mem, .write = write_mem, @@ -693,14 +695,14 @@ static const struct file_operations mem_fops = { extern struct file_operations mem_fops; #endif -static const struct file_operations kmem_fops = { +static struct file_operations kmem_fops = { .llseek = memory_lseek, .read = read_kmem, .mmap = mmap_kmem, .open = open_kmem, }; -static const struct file_operations null_fops = { +static struct file_operations null_fops = { .llseek = null_lseek, .read = read_null, .write = write_null, @@ -708,7 +710,7 @@ static const struct file_operations null_fops = { }; #if defined(CONFIG_ISA) || !defined(__mc68000__) -static const struct file_operations port_fops = { +static struct file_operations port_fops = { .llseek = memory_lseek, .read = read_port, .write = write_port, @@ -716,7 +718,7 @@ static const struct file_operations port_fops = { }; #endif -static const struct file_operations zero_fops = { +static struct file_operations zero_fops = { .llseek = zero_lseek, .read = read_zero, .write = write_zero, @@ -727,14 +729,14 @@ static struct backing_dev_info zero_bdi = { .capabilities = BDI_CAP_MAP_COPY, }; -static const struct file_operations full_fops = { +static struct file_operations full_fops = { .llseek = full_lseek, .read = read_full, .write = write_full, }; #ifdef CONFIG_CRASH_DUMP -static const struct file_operations oldmem_fops = { +static struct file_operations oldmem_fops = { .read = read_oldmem, .open = open_oldmem, }; @@ -761,7 +763,7 @@ static ssize_t kmsg_write(struct file * file, const char __user * buf, return ret; } -static const struct file_operations kmsg_fops = { +static struct file_operations kmsg_fops = { .write = kmsg_write, }; @@ -811,7 +813,7 @@ static int memory_open(struct inode * inode, struct file * filp) return 0; } -static const struct file_operations memory_fops = { +static struct file_operations memory_fops = { .open = memory_open, /* just a selector for the real open */ }; @@ -846,10 +848,13 @@ static int __init chr_dev_init(void) printk("unable to get major %d for memory devs\n", MEM_MAJOR); mem_class = class_create(THIS_MODULE, "mem"); - for (i = 0; i < ARRAY_SIZE(devlist); i++) + for (i = 0; i < ARRAY_SIZE(devlist); i++) { class_device_create(mem_class, NULL, MKDEV(MEM_MAJOR, devlist[i].minor), NULL, devlist[i].name); + devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor), + S_IFCHR | devlist[i].mode, devlist[i].name); + } return 0; } diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 62ebe0965..96eb2a709 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -34,6 +34,7 @@ */ #include +#include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -113,7 +115,7 @@ static int misc_seq_open(struct inode *inode, struct file *file) return seq_open(file, &misc_seq_ops); } -static const struct file_operations misc_proc_fops = { +static struct file_operations misc_proc_fops = { .owner = THIS_MODULE, .open = misc_seq_open, .read = seq_read, @@ -176,7 +178,7 @@ fail: */ static struct class *misc_class; -static const struct file_operations misc_fops = { +static struct file_operations misc_fops = { .owner = THIS_MODULE, .open = misc_open, }; @@ -202,7 +204,7 @@ int misc_register(struct miscdevice * misc) { struct miscdevice *c; dev_t dev; - int err = 0; + int err; down(&misc_sem); list_for_each_entry(c, &misc_list, list) { @@ -226,6 +228,10 @@ int misc_register(struct miscdevice * misc) if (misc->minor < DYNAMIC_MINORS) misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); + if (misc->devfs_name[0] == '\0') { + snprintf(misc->devfs_name, sizeof(misc->devfs_name), + "misc/%s", misc->name); + } dev = MKDEV(MISC_MAJOR, misc->minor); misc->class = class_device_create(misc_class, NULL, dev, misc->dev, @@ -235,6 +241,13 @@ int misc_register(struct miscdevice * misc) goto out; } + err = devfs_mk_cdev(dev, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, + misc->devfs_name); + if (err) { + class_device_destroy(misc_class, dev); + goto out; + } + /* * Add it to the front, so that later devices can "override" * earlier defaults @@ -265,6 +278,7 @@ int misc_deregister(struct miscdevice * misc) down(&misc_sem); list_del(&misc->list); class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); + devfs_remove(misc->devfs_name); if (i < DYNAMIC_MINORS && i>0) { misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); } diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index 1f0f2b6da..1b05fa688 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -63,7 +64,7 @@ static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma); */ static unsigned long mmtimer_femtoperiod = 0; -static const struct file_operations mmtimer_fops = { +static struct file_operations mmtimer_fops = { .owner = THIS_MODULE, .mmap = mmtimer_mmap, .ioctl = mmtimer_ioctl, @@ -328,6 +329,7 @@ static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma) if (PAGE_SIZE > (1 << 16)) return -ENOSYS; + vma->vm_flags |= (VM_IO | VM_SHM | VM_LOCKED ); vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); mmtimer_addr = __pa(RTC_COUNTER_ADDR); @@ -687,12 +689,13 @@ static int __init mmtimer_init(void) mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second / 2) / sn_rtc_cycles_per_second; - if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, IRQF_PERCPU, MMTIMER_NAME, NULL)) { + if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) { printk(KERN_WARNING "%s: unable to allocate interrupt.", MMTIMER_NAME); return -1; } + strcpy(mmtimer_miscdev.devfs_name, MMTIMER_NAME); if (misc_register(&mmtimer_miscdev)) { printk(KERN_ERR "%s: failed to register device\n", MMTIMER_NAME); diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index a369dd687..f43c2e04e 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -29,6 +29,7 @@ * version : 5.1 */ +#include #include #include #include @@ -142,7 +143,6 @@ typedef struct _moxa_board_conf { static moxa_board_conf moxa_boards[MAX_BOARDS]; static void __iomem *moxaBaseAddr[MAX_BOARDS]; -static int loadstat[MAX_BOARDS]; struct moxa_str { int type; @@ -301,7 +301,7 @@ static struct tty_operations moxa_ops = { .tiocmset = moxa_tiocmset, }; -static DEFINE_SPINLOCK(moxa_lock); +static spinlock_t moxa_lock = SPIN_LOCK_UNLOCKED; #ifdef CONFIG_PCI static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board) @@ -342,6 +342,7 @@ static int __init moxa_init(void) init_MUTEX(&moxaBuffSem); moxaDriver->owner = THIS_MODULE; moxaDriver->name = "ttyMX"; + moxaDriver->devfs_name = "tts/a"; moxaDriver->major = ttymajor; moxaDriver->minor_start = 0; moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; @@ -1689,8 +1690,6 @@ int MoxaDriverPoll(void) if (moxaCard == 0) return (-1); for (card = 0; card < MAX_BOARDS; card++) { - if (loadstat[card] == 0) - continue; if ((ports = moxa_boards[card].numPorts) == 0) continue; if (readb(moxaIntPend[card]) == 0xff) { @@ -2906,7 +2905,6 @@ static int moxaloadcode(int cardno, unsigned char __user *tmp, int len) } break; } - loadstat[cardno] = 1; return (0); } @@ -2924,7 +2922,7 @@ static int moxaloadc218(int cardno, void __iomem *baseAddr, int len) len1 = len >> 1; ptr = (ushort *) moxaBuff; for (i = 0; i < len1; i++) - usum += le16_to_cpu(*(ptr + i)); + usum += *(ptr + i); retry = 0; do { len1 = len >> 1; @@ -2996,7 +2994,7 @@ static int moxaloadc320(int cardno, void __iomem *baseAddr, int len, int *numPor wlen = len >> 1; uptr = (ushort *) moxaBuff; for (i = 0; i < wlen; i++) - usum += le16_to_cpu(uptr[i]); + usum += uptr[i]; retry = 0; j = 0; do { diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c index 4e4865e90..d1fe05e83 100644 --- a/drivers/char/mwave/3780i.c +++ b/drivers/char/mwave/3780i.c @@ -46,6 +46,7 @@ * First release to the public */ +#include #include #include #include diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index 39a2e661f..d3ba2f860 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c @@ -454,7 +454,7 @@ static int register_serial_portandirq(unsigned int port, int irq) } -static const struct file_operations mwave_fops = { +static struct file_operations mwave_fops = { .owner = THIS_MODULE, .read = mwave_read, .write = mwave_write, diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 556abd3e0..0fb2fb9fb 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -9,7 +9,7 @@ * 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. +* (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 @@ -36,6 +36,7 @@ */ +#include #include #include #include @@ -70,8 +71,8 @@ #define MXSERMAJOR 174 #define MXSERCUMAJOR 175 -#define MXSER_EVENT_TXLOW 1 -#define MXSER_EVENT_HANGUP 2 +#define MXSER_EVENT_TXLOW 1 +#define MXSER_EVENT_HANGUP 2 #define MXSER_BOARDS 4 /* Max. boards */ #define MXSER_PORTS 32 /* Max. ports */ @@ -91,10 +92,9 @@ #define UART_MCR_AFE 0x20 #define UART_LSR_SPECIAL 0x1E -#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\ - IXON|IXOFF)) +#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|IXON|IXOFF)) -#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) +#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) #define C168_ASIC_ID 1 #define C104_ASIC_ID 2 @@ -152,27 +152,27 @@ static char *mxser_brdname[] = { }; static int mxser_numports[] = { - 8, /* C168-ISA */ - 4, /* C104-ISA */ - 4, /* CI104J */ - 8, /* C168-PCI */ - 4, /* C104-PCI */ - 2, /* C102-ISA */ - 2, /* CI132 */ - 4, /* CI134 */ - 2, /* CP132 */ - 4, /* CP114 */ - 4, /* CT114 */ - 2, /* CP102 */ - 4, /* CP104U */ - 8, /* CP168U */ - 2, /* CP132U */ - 4, /* CP134U */ - 4, /* CP104JU */ - 8, /* RC7000 */ - 8, /* CP118U */ - 2, /* CP102UL */ - 2, /* CP102U */ + 8, // C168-ISA + 4, // C104-ISA + 4, // CI104J + 8, // C168-PCI + 4, // C104-PCI + 2, // C102-ISA + 2, // CI132 + 4, // CI134 + 2, // CP132 + 4, // CP114 + 4, // CT114 + 2, // CP102 + 4, // CP104U + 8, // CP168U + 2, // CP132U + 4, // CP134U + 4, // CP104JU + 8, // RC7000 + 8, // CP118U + 2, // CP102UL + 2, // CP102U }; #define UART_TYPE_NUM 2 @@ -182,7 +182,7 @@ static const unsigned int Gmoxa_uart_id[UART_TYPE_NUM] = { MOXA_MUST_MU860_HWID }; -/* This is only for PCI */ +// This is only for PCI #define UART_INFO_NUM 3 struct mxpciuart_info { int type; @@ -231,7 +231,7 @@ MODULE_DEVICE_TABLE(pci, mxser_pcibrds); typedef struct _moxa_pci_info { unsigned short busNum; unsigned short devNum; - struct pci_dev *pdev; /* add by Victor Yu. 06-23-2003 */ + struct pci_dev *pdev; // add by Victor Yu. 06-23-2003 } moxa_pci_info; static int ioaddr[MXSER_BOARDS] = { 0, 0, 0, 0 }; @@ -280,7 +280,6 @@ struct mxser_mon_ext { int fifo[32]; int iftype[32]; }; - struct mxser_hwconf { int board_type; int ports; @@ -291,9 +290,9 @@ struct mxser_hwconf { int ioaddr[MXSER_PORTS_PER_BOARD]; int baud_base[MXSER_PORTS_PER_BOARD]; moxa_pci_info pciInfo; - int IsMoxaMustChipFlag; /* add by Victor Yu. 08-30-2002 */ - int MaxCanSetBaudRate[MXSER_PORTS_PER_BOARD]; /* add by Victor Yu. 09-04-2002 */ - int opmode_ioaddr[MXSER_PORTS_PER_BOARD]; /* add by Victor Yu. 01-05-2004 */ + int IsMoxaMustChipFlag; // add by Victor Yu. 08-30-2002 + int MaxCanSetBaudRate[MXSER_PORTS_PER_BOARD]; // add by Victor Yu. 09-04-2002 + int opmode_ioaddr[MXSER_PORTS_PER_BOARD]; // add by Victor Yu. 01-05-2004 }; struct mxser_struct { @@ -335,9 +334,9 @@ struct mxser_struct { wait_queue_head_t delta_msr_wait; struct async_icount icount; /* kernel counters for the 4 input interrupts */ int timeout; - int IsMoxaMustChipFlag; /* add by Victor Yu. 08-30-2002 */ - int MaxCanSetBaudRate; /* add by Victor Yu. 09-04-2002 */ - int opmode_ioaddr; /* add by Victor Yu. 01-05-2004 */ + int IsMoxaMustChipFlag; // add by Victor Yu. 08-30-2002 + int MaxCanSetBaudRate; // add by Victor Yu. 09-04-2002 + int opmode_ioaddr; // add by Victor Yu. 01-05-2004 unsigned char stop_rx; unsigned char ldisc_stop_rx; long realbaud; @@ -346,6 +345,7 @@ struct mxser_struct { spinlock_t slock; }; + struct mxser_mstatus { tcflag_t cflag; int cts; @@ -358,7 +358,7 @@ static struct mxser_mstatus GMStatus[MXSER_PORTS]; static int mxserBoardCAP[MXSER_BOARDS] = { 0, 0, 0, 0 - /* 0x180, 0x280, 0x200, 0x320 */ + /* 0x180, 0x280, 0x200, 0x320 */ }; static struct tty_driver *mxvar_sdriver; @@ -386,7 +386,7 @@ static struct mxser_hwconf mxsercfg[MXSER_BOARDS]; static void mxser_getcfg(int board, struct mxser_hwconf *hwconf); static int mxser_init(void); -/* static void mxser_poll(unsigned long); */ +//static void mxser_poll(unsigned long); static int mxser_get_ISA_conf(int, struct mxser_hwconf *); static int mxser_get_PCI_conf(int, int, int, struct mxser_hwconf *); static void mxser_do_softint(void *); @@ -440,18 +440,18 @@ static int CheckIsMoxaMust(int io) SET_MOXA_MUST_XON1_VALUE(io, 0x11); if ((hwid = inb(io + UART_MCR)) != 0) { outb(oldmcr, io + UART_MCR); - return MOXA_OTHER_UART; + return (MOXA_OTHER_UART); } GET_MOXA_MUST_HARDWARE_ID(io, &hwid); for (i = 0; i < UART_TYPE_NUM; i++) { if (hwid == Gmoxa_uart_id[i]) - return (int)hwid; + return (int) hwid; } return MOXA_OTHER_UART; } -/* above is modified by Victor Yu. 08-15-2002 */ +// above is modified by Victor Yu. 08-15-2002 static struct tty_operations mxser_ops = { .open = mxser_open, @@ -504,6 +504,7 @@ static void __exit mxser_module_exit(void) else printk(KERN_ERR "Couldn't unregister MOXA Smartio/Industio family serial driver\n"); + for (i = 0; i < MXSER_BOARDS; i++) { struct pci_dev *pdev; @@ -512,7 +513,7 @@ static void __exit mxser_module_exit(void) else { pdev = mxsercfg[i].pciInfo.pdev; free_irq(mxsercfg[i].irq, &mxvar_table[i * MXSER_PORTS_PER_BOARD]); - if (pdev != NULL) { /* PCI */ + if (pdev != NULL) { //PCI release_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2)); release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); } else { @@ -523,6 +524,7 @@ static void __exit mxser_module_exit(void) } if (verbose) printk(KERN_DEBUG "Done.\n"); + } static void process_txrx_fifo(struct mxser_struct *info) @@ -556,10 +558,8 @@ static int mxser_initbrd(int board, struct mxser_hwconf *hwconf) n = board * MXSER_PORTS_PER_BOARD; info = &mxvar_table[n]; /*if (verbose) */ { - printk(KERN_DEBUG " ttyM%d - ttyM%d ", - n, n + hwconf->ports - 1); - printk(" max. baud rate = %d bps.\n", - hwconf->MaxCanSetBaudRate[0]); + printk(KERN_DEBUG " ttyM%d - ttyM%d ", n, n + hwconf->ports - 1); + printk(" max. baud rate = %d bps.\n", hwconf->MaxCanSetBaudRate[0]); } for (i = 0; i < hwconf->ports; i++, n++, info++) { @@ -568,12 +568,12 @@ static int mxser_initbrd(int board, struct mxser_hwconf *hwconf) info->irq = hwconf->irq; info->vector = hwconf->vector; info->vectormask = hwconf->vector_mask; - info->opmode_ioaddr = hwconf->opmode_ioaddr[i]; /* add by Victor Yu. 01-05-2004 */ + info->opmode_ioaddr = hwconf->opmode_ioaddr[i]; // add by Victor Yu. 01-05-2004 info->stop_rx = 0; info->ldisc_stop_rx = 0; info->IsMoxaMustChipFlag = hwconf->IsMoxaMustChipFlag; - /* Enhance mode enabled here */ + //Enhance mode enabled here if (info->IsMoxaMustChipFlag != MOXA_OTHER_UART) { ENABLE_MOXA_MUST_ENCHANCE_MODE(info->base); } @@ -606,25 +606,22 @@ static int mxser_initbrd(int board, struct mxser_hwconf *hwconf) /* before set INT ISR, disable all int */ for (i = 0; i < hwconf->ports; i++) { - outb(inb(hwconf->ioaddr[i] + UART_IER) & 0xf0, - hwconf->ioaddr[i] + UART_IER); + outb(inb(hwconf->ioaddr[i] + UART_IER) & 0xf0, hwconf->ioaddr[i] + UART_IER); } n = board * MXSER_PORTS_PER_BOARD; info = &mxvar_table[n]; - retval = request_irq(hwconf->irq, mxser_interrupt, IRQ_T(info), - "mxser", info); + retval = request_irq(hwconf->irq, mxser_interrupt, IRQ_T(info), "mxser", info); if (retval) { - printk(KERN_ERR "Board %d: %s", - board, mxser_brdname[hwconf->board_type - 1]); - printk(" Request irq failed, IRQ (%d) may conflict with" - " another device.\n", info->irq); + printk(KERN_ERR "Board %d: %s", board, mxser_brdname[hwconf->board_type - 1]); + printk(" Request irq fail,IRQ (%d) may be conflit with another device.\n", info->irq); return retval; } return 0; } + static void mxser_getcfg(int board, struct mxser_hwconf *hwconf) { mxsercfg[board] = *hwconf; @@ -634,27 +631,26 @@ static void mxser_getcfg(int board, struct mxser_hwconf *hwconf) static int mxser_get_PCI_conf(int busnum, int devnum, int board_type, struct mxser_hwconf *hwconf) { int i, j; - /* unsigned int val; */ +// unsigned int val; unsigned int ioaddress; struct pci_dev *pdev = hwconf->pciInfo.pdev; - /* io address */ + //io address hwconf->board_type = board_type; hwconf->ports = mxser_numports[board_type - 1]; ioaddress = pci_resource_start(pdev, 2); - request_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2), - "mxser(IO)"); + request_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2), "mxser(IO)"); - for (i = 0; i < hwconf->ports; i++) + for (i = 0; i < hwconf->ports; i++) { hwconf->ioaddr[i] = ioaddress + 8 * i; + } - /* vector */ + //vector ioaddress = pci_resource_start(pdev, 3); - request_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3), - "mxser(vector)"); + request_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3), "mxser(vector)"); hwconf->vector = ioaddress; - /* irq */ + //irq hwconf->irq = hwconf->pciInfo.pdev->irq; hwconf->IsMoxaMustChipFlag = CheckIsMoxaMust(hwconf->ioaddr[0]); @@ -667,7 +663,7 @@ static int mxser_get_PCI_conf(int busnum, int devnum, int board_type, struct mxs if (Gpci_uart_info[j].type == hwconf->IsMoxaMustChipFlag) { hwconf->MaxCanSetBaudRate[i] = Gpci_uart_info[j].max_baud; - /* exception....CP-102 */ + //exception....CP-102 if (board_type == MXSER_BOARD_CP102) hwconf->MaxCanSetBaudRate[i] = 921600; break; @@ -682,15 +678,15 @@ static int mxser_get_PCI_conf(int busnum, int devnum, int board_type, struct mxs else hwconf->opmode_ioaddr[i] = ioaddress + 0x0c; } - outb(0, ioaddress + 4); /* default set to RS232 mode */ - outb(0, ioaddress + 0x0c); /* default set to RS232 mode */ + outb(0, ioaddress + 4); // default set to RS232 mode + outb(0, ioaddress + 0x0c); //default set to RS232 mode } for (i = 0; i < hwconf->ports; i++) { hwconf->vector_mask |= (1 << i); hwconf->baud_base[i] = 921600; } - return 0; + return (0); } #endif @@ -711,8 +707,7 @@ static int mxser_init(void) mxsercfg[i].board_type = -1; } - printk(KERN_INFO "MOXA Smartio/Industio family driver version %s\n", - MXSER_VERSION); + printk(KERN_INFO "MOXA Smartio/Industio family driver version %s\n", MXSER_VERSION); /* Initialize the tty_driver structure */ memset(mxvar_sdriver, 0, sizeof(struct tty_driver)); @@ -724,7 +719,7 @@ static int mxser_init(void) mxvar_sdriver->type = TTY_DRIVER_TYPE_SERIAL; mxvar_sdriver->subtype = SERIAL_TYPE_NORMAL; mxvar_sdriver->init_termios = tty_std_termios; - mxvar_sdriver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL; + mxvar_sdriver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; mxvar_sdriver->flags = TTY_DRIVER_REAL_RAW; tty_set_operations(mxvar_sdriver, &mxser_ops); mxvar_sdriver->ttys = mxvar_tty; @@ -744,29 +739,23 @@ static int mxser_init(void) /* Start finding ISA boards here */ for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) { int cap; - if (!(cap = mxserBoardCAP[b])) continue; retval = mxser_get_ISA_conf(cap, &hwconf); if (retval != 0) - printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", - mxser_brdname[hwconf.board_type - 1], ioaddr[b]); + printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", mxser_brdname[hwconf.board_type - 1], ioaddr[b]); if (retval <= 0) { if (retval == MXSER_ERR_IRQ) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_IRQ_CONFLIT) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_VECTOR) - printk(KERN_ERR "Invalid interrupt vector, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt vector,board not configured\n"); else if (retval == MXSER_ERR_IOADDR) - printk(KERN_ERR "Invalid I/O address, " - "board not configured\n"); + printk(KERN_ERR "Invalid I/O address,board not configured\n"); continue; } @@ -776,43 +765,35 @@ static int mxser_init(void) hwconf.pciInfo.pdev = NULL; mxser_getcfg(m, &hwconf); - /* - * init mxsercfg first, - * or mxsercfg data is not correct on ISR. - */ - /* mxser_initbrd will hook ISR. */ + //init mxsercfg first, or mxsercfg data is not correct on ISR. + //mxser_initbrd will hook ISR. if (mxser_initbrd(m, &hwconf) < 0) continue; + m++; } /* Start finding ISA boards from module arg */ for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) { int cap; - if (!(cap = ioaddr[b])) continue; retval = mxser_get_ISA_conf(cap, &hwconf); if (retval != 0) - printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", - mxser_brdname[hwconf.board_type - 1], ioaddr[b]); + printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", mxser_brdname[hwconf.board_type - 1], ioaddr[b]); if (retval <= 0) { if (retval == MXSER_ERR_IRQ) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_IRQ_CONFLIT) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_VECTOR) - printk(KERN_ERR "Invalid interrupt vector, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt vector,board not configured\n"); else if (retval == MXSER_ERR_IOADDR) - printk(KERN_ERR "Invalid I/O address, " - "board not configured\n"); + printk(KERN_ERR "Invalid I/O address,board not configured\n"); continue; } @@ -822,11 +803,8 @@ static int mxser_init(void) hwconf.pciInfo.pdev = NULL; mxser_getcfg(m, &hwconf); - /* - * init mxsercfg first, - * or mxsercfg data is not correct on ISR. - */ - /* mxser_initbrd will hook ISR. */ + //init mxsercfg first, or mxsercfg data is not correct on ISR. + //mxser_initbrd will hook ISR. if (mxser_initbrd(m, &hwconf) < 0) continue; @@ -839,8 +817,7 @@ static int mxser_init(void) index = 0; b = 0; while (b < n) { - pdev = pci_find_device(mxser_pcibrds[b].vendor, - mxser_pcibrds[b].device, pdev); + pdev = pci_find_device(mxser_pcibrds[b].vendor, mxser_pcibrds[b].device, pdev); if (pdev == NULL) { b++; continue; @@ -848,48 +825,30 @@ static int mxser_init(void) hwconf.pciInfo.busNum = busnum = pdev->bus->number; hwconf.pciInfo.devNum = devnum = PCI_SLOT(pdev->devfn) << 3; hwconf.pciInfo.pdev = pdev; - printk(KERN_INFO "Found MOXA %s board(BusNo=%d,DevNo=%d)\n", - mxser_brdname[(int) (mxser_pcibrds[b].driver_data) - 1], - busnum, devnum >> 3); + printk(KERN_INFO "Found MOXA %s board(BusNo=%d,DevNo=%d)\n", mxser_brdname[(int) (mxser_pcibrds[b].driver_data) - 1], busnum, devnum >> 3); index++; - if (m >= MXSER_BOARDS) - printk(KERN_ERR - "Too many Smartio/Industio family boards find " - "(maximum %d), board not configured\n", - MXSER_BOARDS); - else { + if (m >= MXSER_BOARDS) { + printk(KERN_ERR "Too many Smartio/Industio family boards find (maximum %d),board not configured\n", MXSER_BOARDS); + } else { if (pci_enable_device(pdev)) { - printk(KERN_ERR "Moxa SmartI/O PCI enable " - "fail !\n"); + printk(KERN_ERR "Moxa SmartI/O PCI enable fail !\n"); continue; } - retval = mxser_get_PCI_conf(busnum, devnum, - (int)mxser_pcibrds[b].driver_data, - &hwconf); + retval = mxser_get_PCI_conf(busnum, devnum, (int) mxser_pcibrds[b].driver_data, &hwconf); if (retval < 0) { if (retval == MXSER_ERR_IRQ) - printk(KERN_ERR - "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_IRQ_CONFLIT) - printk(KERN_ERR - "Invalid interrupt number, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt number,board not configured\n"); else if (retval == MXSER_ERR_VECTOR) - printk(KERN_ERR - "Invalid interrupt vector, " - "board not configured\n"); + printk(KERN_ERR "Invalid interrupt vector,board not configured\n"); else if (retval == MXSER_ERR_IOADDR) - printk(KERN_ERR - "Invalid I/O address, " - "board not configured\n"); + printk(KERN_ERR "Invalid I/O address,board not configured\n"); continue; } mxser_getcfg(m, &hwconf); - /* init mxsercfg first, - * or mxsercfg data is not correct on ISR. - */ - /* mxser_initbrd will hook ISR. */ + //init mxsercfg first, or mxsercfg data is not correct on ISR. + //mxser_initbrd will hook ISR. if (mxser_initbrd(m, &hwconf) < 0) continue; m++; @@ -899,8 +858,7 @@ static int mxser_init(void) retval = tty_register_driver(mxvar_sdriver); if (retval) { - printk(KERN_ERR "Couldn't install MOXA Smartio/Industio family" - " driver !\n"); + printk(KERN_ERR "Couldn't install MOXA Smartio/Industio family driver !\n"); put_tty_driver(mxvar_sdriver); for (i = 0; i < MXSER_BOARDS; i++) { @@ -908,7 +866,7 @@ static int mxser_init(void) continue; else { free_irq(mxsercfg[i].irq, &mxvar_table[i * MXSER_PORTS_PER_BOARD]); - /* todo: release io, vector */ + //todo: release io, vector } } return retval; @@ -919,7 +877,7 @@ static int mxser_init(void) static void mxser_do_softint(void *private_) { - struct mxser_struct *info = private_; + struct mxser_struct *info = (struct mxser_struct *) private_; struct tty_struct *tty; tty = info->tty; @@ -968,7 +926,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) return -ENODEV; info = mxvar_table + line; if (!info->base) - return -ENODEV; + return (-ENODEV); tty->driver_data = info; info->tty = tty; @@ -977,11 +935,11 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) */ retval = mxser_startup(info); if (retval) - return retval; + return (retval); retval = mxser_block_til_ready(tty, filp, info); if (retval) - return retval; + return (retval); info->count++; @@ -995,13 +953,13 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) info->session = current->signal->session; info->pgrp = process_group(current); + clear_bit(TTY_DONT_FLIP, &tty->flags); - /* - status = mxser_get_msr(info->base, 0, info->port); - mxser_check_modem_status(info, status); - */ + //status = mxser_get_msr(info->base, 0, info->port); + //mxser_check_modem_status(info, status); -/* unmark here for very high baud rate (ex. 921600 bps) used */ +/* unmark here for very high baud rate (ex. 921600 bps) used +*/ tty->low_latency = 1; return 0; } @@ -1014,7 +972,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) */ static void mxser_close(struct tty_struct *tty, struct file *filp) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long timeout; unsigned long flags; @@ -1039,13 +997,11 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) * one, we've got real problems, since it means the * serial port won't be shutdown. */ - printk(KERN_ERR "mxser_close: bad serial port count; " - "tty->count is 1, info->count is %d\n", info->count); + printk(KERN_ERR "mxser_close: bad serial port count; tty->count is 1, " "info->count is %d\n", info->count); info->count = 1; } if (--info->count < 0) { - printk(KERN_ERR "mxser_close: bad serial port count for " - "ttys%d: %d\n", info->port, info->count); + printk(KERN_ERR "mxser_close: bad serial port count for ttys%d: %d\n", info->port, info->count); info->count = 0; } if (info->count) { @@ -1100,7 +1056,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) ld = tty_ldisc_ref(tty); if (ld) { - if (ld->flush_buffer) + if(ld->flush_buffer) ld->flush_buffer(tty); tty_ldisc_deref(ld); } @@ -1122,34 +1078,31 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count) { int c, total = 0; - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; - if (!info->xmit_buf) - return 0; + if (!tty || !info->xmit_buf) + return (0); while (1) { - c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); + c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); if (c <= 0) break; memcpy(info->xmit_buf + info->xmit_head, buf, c); spin_lock_irqsave(&info->slock, flags); - info->xmit_head = (info->xmit_head + c) & - (SERIAL_XMIT_SIZE - 1); + info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE - 1); info->xmit_cnt += c; spin_unlock_irqrestore(&info->slock, flags); buf += c; count -= c; total += c; + } if (info->xmit_cnt && !tty->stopped && !(info->IER & UART_IER_THRI)) { - if (!tty->hw_stopped || - (info->type == PORT_16550A) || - (info->IsMoxaMustChipFlag)) { + if (!tty->hw_stopped || (info->type == PORT_16550A) || (info->IsMoxaMustChipFlag)) { spin_lock_irqsave(&info->slock, flags); info->IER |= UART_IER_THRI; outb(info->IER, info->base + UART_IER); @@ -1161,10 +1114,10 @@ static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int cou static void mxser_put_char(struct tty_struct *tty, unsigned char ch) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; - if (!info->xmit_buf) + if (!tty || !info->xmit_buf) return; if (info->xmit_cnt >= SERIAL_XMIT_SIZE - 1) @@ -1176,9 +1129,7 @@ static void mxser_put_char(struct tty_struct *tty, unsigned char ch) info->xmit_cnt++; spin_unlock_irqrestore(&info->slock, flags); if (!tty->stopped && !(info->IER & UART_IER_THRI)) { - if (!tty->hw_stopped || - (info->type == PORT_16550A) || - info->IsMoxaMustChipFlag) { + if (!tty->hw_stopped || (info->type == PORT_16550A) || info->IsMoxaMustChipFlag) { spin_lock_irqsave(&info->slock, flags); info->IER |= UART_IER_THRI; outb(info->IER, info->base + UART_IER); @@ -1190,16 +1141,10 @@ static void mxser_put_char(struct tty_struct *tty, unsigned char ch) static void mxser_flush_chars(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; - if (info->xmit_cnt <= 0 || - tty->stopped || - !info->xmit_buf || - (tty->hw_stopped && - (info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag) - )) + if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf || (tty->hw_stopped && (info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag))) return; spin_lock_irqsave(&info->slock, flags); @@ -1212,24 +1157,24 @@ static void mxser_flush_chars(struct tty_struct *tty) static int mxser_write_room(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; int ret; ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1; if (ret < 0) ret = 0; - return ret; + return (ret); } static int mxser_chars_in_buffer(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; return info->xmit_cnt; } static void mxser_flush_buffer(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; char fcr; unsigned long flags; @@ -1239,8 +1184,7 @@ static void mxser_flush_buffer(struct tty_struct *tty) /* below added by shinhay */ fcr = inb(info->base + UART_FCR); - outb((fcr | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), - info->base + UART_FCR); + outb((fcr | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), info->base + UART_FCR); outb(fcr, info->base + UART_FCR); spin_unlock_irqrestore(&info->slock, flags); @@ -1253,7 +1197,7 @@ static void mxser_flush_buffer(struct tty_struct *tty) static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; int retval; struct async_icount cprev, cnow; /* kernel counter temps */ struct serial_icounter_struct __user *p_cuser; @@ -1262,9 +1206,9 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c void __user *argp = (void __user *)arg; if (tty->index == MXSER_PORTS) - return mxser_ioctl_special(cmd, argp); + return (mxser_ioctl_special(cmd, argp)); - /* following add by Victor Yu. 01-05-2004 */ + // following add by Victor Yu. 01-05-2004 if (cmd == MOXA_SET_OP_MODE || cmd == MOXA_GET_OP_MODE) { int opmode, p; static unsigned char ModeMask[] = { 0xfc, 0xf3, 0xcf, 0x3f }; @@ -1275,10 +1219,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c if (cmd == MOXA_SET_OP_MODE) { if (get_user(opmode, (int __user *) argp)) return -EFAULT; - if (opmode != RS232_MODE && - opmode != RS485_2WIRE_MODE && - opmode != RS422_MODE && - opmode != RS485_4WIRE_MODE) + if (opmode != RS232_MODE && opmode != RS485_2WIRE_MODE && opmode != RS422_MODE && opmode != RS485_4WIRE_MODE) return -EFAULT; mask = ModeMask[p]; shiftbit = p * 2; @@ -1295,36 +1236,36 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c } return 0; } - /* above add by Victor Yu. 01-05-2004 */ + // above add by Victor Yu. 01-05-2004 if ((cmd != TIOCGSERIAL) && (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; + return (-EIO); } switch (cmd) { case TCSBRK: /* SVID version: non-zero arg --> no break */ retval = tty_check_change(tty); if (retval) - return retval; + return (retval); tty_wait_until_sent(tty, 0); if (!arg) mxser_send_break(info, HZ / 4); /* 1/4 second */ - return 0; + return (0); case TCSBRKP: /* support for POSIX tcsendbreak() */ retval = tty_check_change(tty); if (retval) - return retval; + return (retval); tty_wait_until_sent(tty, 0); mxser_send_break(info, arg ? arg * (HZ / 10) : HZ / 4); - return 0; + return (0); case TIOCGSOFTCAR: - return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *)argp); + return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long __user *) argp); case TIOCSSOFTCAR: if (get_user(templ, (unsigned long __user *) argp)) return -EFAULT; arg = templ; tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); - return 0; + return (0); case TIOCGSERIAL: return mxser_get_serial_info(info, argp); case TIOCSSERIAL: @@ -1337,7 +1278,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) * Caller should use TIOCGICOUNT to see which one it was */ - case TIOCMIWAIT: { + case TIOCMIWAIT:{ DECLARE_WAITQUEUE(wait, current); int ret; spin_lock_irqsave(&info->slock, flags); @@ -1351,14 +1292,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c spin_unlock_irqrestore(&info->slock, flags); set_current_state(TASK_INTERRUPTIBLE); - if (((arg & TIOCM_RNG) && - (cnow.rng != cprev.rng)) || - ((arg & TIOCM_DSR) && - (cnow.dsr != cprev.dsr)) || - ((arg & TIOCM_CD) && - (cnow.dcd != cprev.dcd)) || - ((arg & TIOCM_CTS) && - (cnow.cts != cprev.cts))) { + if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts))) { ret = 0; break; } @@ -1404,18 +1338,21 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c put_user(cnow.dsr, &p_cuser->dsr); put_user(cnow.rng, &p_cuser->rng); put_user(cnow.dcd, &p_cuser->dcd); + +/* */ return 0; case MOXA_HighSpeedOn: - return put_user(info->baud_base != 115200 ? 1 : 0, (int __user *)argp); - case MOXA_SDS_RSTICOUNTER: { + return put_user(info->baud_base != 115200 ? 1 : 0, (int __user *) argp); + + case MOXA_SDS_RSTICOUNTER:{ info->mon_data.rxcnt = 0; info->mon_data.txcnt = 0; return 0; } -/* (above) added by James. */ +// (above) added by James. case MOXA_ASPP_SETBAUD:{ long baud; - if (get_user(baud, (long __user *)argp)) + if (get_user(baud, (long __user *) argp)) return -EFAULT; mxser_set_baud(info, baud); return 0; @@ -1440,10 +1377,9 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c return 0; } - case MOXA_ASPP_MON: { + case MOXA_ASPP_MON:{ int mcr, status; - - /* info->mon_data.ser_param = tty->termios->c_cflag; */ +// info->mon_data.ser_param = tty->termios->c_cflag; status = mxser_get_msr(info->base, 1, info->port, info); mxser_check_modem_status(info, status); @@ -1464,25 +1400,25 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int c else info->mon_data.hold_reason &= ~NPPI_NOTIFY_CTSHOLD; - if (copy_to_user(argp, &info->mon_data, - sizeof(struct mxser_mon))) + + if (copy_to_user(argp, &info->mon_data, sizeof(struct mxser_mon))) return -EFAULT; return 0; + } - case MOXA_ASPP_LSTATUS: { - if (copy_to_user(argp, &info->err_shadow, - sizeof(unsigned char))) + case MOXA_ASPP_LSTATUS:{ + if (copy_to_user(argp, &info->err_shadow, sizeof(unsigned char))) return -EFAULT; info->err_shadow = 0; return 0; + } - case MOXA_SET_BAUD_METHOD: { + case MOXA_SET_BAUD_METHOD:{ int method; - - if (get_user(method, (int __user *)argp)) + if (get_user(method, (int __user *) argp)) return -EFAULT; mxser_set_baud_method[info->port] = method; if (copy_to_user(argp, &method, sizeof(int))) @@ -1506,8 +1442,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) switch (cmd) { case MOXA_GET_CONF: - if (copy_to_user(argp, mxsercfg, - sizeof(struct mxser_hwconf) * 4)) + if (copy_to_user(argp, mxsercfg, sizeof(struct mxser_hwconf) * 4)) return -EFAULT; return 0; case MOXA_GET_MAJOR: @@ -1526,11 +1461,11 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) if (mxvar_table[i].base) result |= (1 << i); } - return put_user(result, (unsigned long __user *)argp); + return put_user(result, (unsigned long __user *) argp); case MOXA_GETDATACOUNT: if (copy_to_user(argp, &mxvar_log, sizeof(mxvar_log))) return -EFAULT; - return 0; + return (0); case MOXA_GETMSTATUS: for (i = 0; i < MXSER_PORTS; i++) { GMStatus[i].ri = 0; @@ -1563,26 +1498,22 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) else GMStatus[i].cts = 0; } - if (copy_to_user(argp, GMStatus, - sizeof(struct mxser_mstatus) * MXSER_PORTS)) + if (copy_to_user(argp, GMStatus, sizeof(struct mxser_mstatus) * MXSER_PORTS)) return -EFAULT; return 0; - case MOXA_ASPP_MON_EXT: { + case MOXA_ASPP_MON_EXT:{ int status; int opmode, p; int shiftbit; unsigned cflag, iflag; for (i = 0; i < MXSER_PORTS; i++) { + if (!mxvar_table[i].base) continue; - status = mxser_get_msr(mxvar_table[i].base, 0, - i, &(mxvar_table[i])); - /* - mxser_check_modem_status(&mxvar_table[i], - status); - */ + status = mxser_get_msr(mxvar_table[i].base, 0, i, &(mxvar_table[i])); +// mxser_check_modem_status(&mxvar_table[i], status); if (status & UART_MSR_TERI) mxvar_table[i].icount.rng++; if (status & UART_MSR_DDSR) @@ -1647,76 +1578,75 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) return 0; } + static void mxser_stoprx(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; - /* unsigned long flags; */ + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; + //unsigned long flags; + info->ldisc_stop_rx = 1; if (I_IXOFF(tty)) { - /* MX_LOCK(&info->slock); */ - /* following add by Victor Yu. 09-02-2002 */ + + //MX_LOCK(&info->slock); + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag) { info->IER &= ~MOXA_MUST_RECV_ISR; outb(info->IER, info->base + UART_IER); } else { - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 + info->x_char = STOP_CHAR(tty); - /* mask by Victor Yu. 09-02-2002 */ - /* outb(info->IER, 0); */ + // outb(info->IER, 0); // mask by Victor Yu. 09-02-2002 outb(0, info->base + UART_IER); info->IER |= UART_IER_THRI; - /* force Tx interrupt */ - outb(info->IER, info->base + UART_IER); - } /* add by Victor Yu. 09-02-2002 */ - /* MX_UNLOCK(&info->slock); */ + outb(info->IER, info->base + UART_IER); /* force Tx interrupt */ + } // add by Victor Yu. 09-02-2002 + //MX_UNLOCK(&info->slock); } if (info->tty->termios->c_cflag & CRTSCTS) { - /* MX_LOCK(&info->slock); */ + //MX_LOCK(&info->slock); info->MCR &= ~UART_MCR_RTS; outb(info->MCR, info->base + UART_MCR); - /* MX_UNLOCK(&info->slock); */ + //MX_UNLOCK(&info->slock); } } static void mxser_startrx(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; - /* unsigned long flags; */ + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; + //unsigned long flags; info->ldisc_stop_rx = 0; if (I_IXOFF(tty)) { if (info->x_char) info->x_char = 0; else { - /* MX_LOCK(&info->slock); */ + //MX_LOCK(&info->slock); - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag) { info->IER |= MOXA_MUST_RECV_ISR; outb(info->IER, info->base + UART_IER); } else { - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 info->x_char = START_CHAR(tty); - /* mask by Victor Yu. 09-02-2002 */ - /* outb(info->IER, 0); */ - /* add by Victor Yu. 09-02-2002 */ - outb(0, info->base + UART_IER); - /* force Tx interrupt */ - info->IER |= UART_IER_THRI; + // outb(info->IER, 0); // mask by Victor Yu. 09-02-2002 + outb(0, info->base + UART_IER); // add by Victor Yu. 09-02-2002 + info->IER |= UART_IER_THRI; /* force Tx interrupt */ outb(info->IER, info->base + UART_IER); - } /* add by Victor Yu. 09-02-2002 */ - /* MX_UNLOCK(&info->slock); */ + } // add by Victor Yu. 09-02-2002 + //MX_UNLOCK(&info->slock); } } if (info->tty->termios->c_cflag & CRTSCTS) { - /* MX_LOCK(&info->slock); */ + //MX_LOCK(&info->slock); info->MCR |= UART_MCR_RTS; outb(info->MCR, info->base + UART_MCR); - /* MX_UNLOCK(&info->slock); */ + //MX_UNLOCK(&info->slock); } } @@ -1726,53 +1656,48 @@ static void mxser_startrx(struct tty_struct *tty) */ static void mxser_throttle(struct tty_struct *tty) { - /* struct mxser_struct *info = tty->driver_data; */ - /* unsigned long flags; */ - - /* MX_LOCK(&info->slock); */ + //struct mxser_struct *info = (struct mxser_struct *)tty->driver_data; + //unsigned long flags; + //MX_LOCK(&info->slock); mxser_stoprx(tty); - /* MX_UNLOCK(&info->slock); */ + //MX_UNLOCK(&info->slock); } static void mxser_unthrottle(struct tty_struct *tty) { - /* struct mxser_struct *info = tty->driver_data; */ - /* unsigned long flags; */ - - /* MX_LOCK(&info->slock); */ + //struct mxser_struct *info = (struct mxser_struct *)tty->driver_data; + //unsigned long flags; + //MX_LOCK(&info->slock); mxser_startrx(tty); - /* MX_UNLOCK(&info->slock); */ + //MX_UNLOCK(&info->slock); } static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; - if ((tty->termios->c_cflag != old_termios->c_cflag) || - (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { + if ((tty->termios->c_cflag != old_termios->c_cflag) || (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) { mxser_change_speed(info, old_termios); - if ((old_termios->c_cflag & CRTSCTS) && - !(tty->termios->c_cflag & CRTSCTS)) { + if ((old_termios->c_cflag & CRTSCTS) && !(tty->termios->c_cflag & CRTSCTS)) { tty->hw_stopped = 0; mxser_start(tty); } } /* Handle sw stopped */ - if ((old_termios->c_iflag & IXON) && - !(tty->termios->c_iflag & IXON)) { + if ((old_termios->c_iflag & IXON) && !(tty->termios->c_iflag & IXON)) { tty->stopped = 0; - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag) { spin_lock_irqsave(&info->slock, flags); DISABLE_MOXA_MUST_RX_SOFTWARE_FLOW_CONTROL(info->base); spin_unlock_irqrestore(&info->slock, flags); } - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 mxser_start(tty); } @@ -1786,7 +1711,7 @@ static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termio */ static void mxser_stop(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; spin_lock_irqsave(&info->slock, flags); @@ -1799,7 +1724,7 @@ static void mxser_stop(struct tty_struct *tty) static void mxser_start(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; spin_lock_irqsave(&info->slock, flags); @@ -1815,7 +1740,7 @@ static void mxser_start(struct tty_struct *tty) */ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long orig_jiffies, char_time; int lsr; @@ -1852,8 +1777,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) if (!timeout || timeout > 2 * info->timeout) timeout = 2 * info->timeout; #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT - printk(KERN_DEBUG "In rs_wait_until_sent(%d) check=%lu...", - timeout, char_time); + printk(KERN_DEBUG "In rs_wait_until_sent(%d) check=%lu...", timeout, char_time); printk("jiff=%lu...", jiffies); #endif while (!((lsr = inb(info->base + UART_LSR)) & UART_LSR_TEMT)) { @@ -1879,7 +1803,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout) */ void mxser_hangup(struct tty_struct *tty) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; mxser_flush_buffer(tty); mxser_shutdown(info); @@ -1891,26 +1815,24 @@ void mxser_hangup(struct tty_struct *tty) } -/* added by James 03-12-2004. */ +// added by James 03-12-2004. /* * mxser_rs_break() --- routine which turns the break handling on or off */ static void mxser_rs_break(struct tty_struct *tty, int break_state) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; spin_lock_irqsave(&info->slock, flags); if (break_state == -1) - outb(inb(info->base + UART_LCR) | UART_LCR_SBC, - info->base + UART_LCR); + outb(inb(info->base + UART_LCR) | UART_LCR_SBC, info->base + UART_LCR); else - outb(inb(info->base + UART_LCR) & ~UART_LCR_SBC, - info->base + UART_LCR); + outb(inb(info->base + UART_LCR) & ~UART_LCR_SBC, info->base + UART_LCR); spin_unlock_irqrestore(&info->slock, flags); } -/* (above) added by James. */ +// (above) added by James. /* @@ -1926,7 +1848,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) int handled = IRQ_NONE; port = NULL; - /* spin_lock(&gm_lock); */ + //spin_lock(&gm_lock); for (i = 0; i < MXSER_BOARDS; i++) { if (dev_id == &(mxvar_table[i * MXSER_PORTS_PER_BOARD])) { @@ -1935,25 +1857,29 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) } } - if (i == MXSER_BOARDS) + if (i == MXSER_BOARDS) { goto irq_stop; - if (port == 0) + } + if (port == 0) { goto irq_stop; + } max = mxser_numports[mxsercfg[i].board_type - 1]; while (1) { irqbits = inb(port->vector) & port->vectormask; - if (irqbits == port->vectormask) + if (irqbits == port->vectormask) { break; + } handled = IRQ_HANDLED; for (i = 0, bits = 1; i < max; i++, irqbits |= bits, bits <<= 1) { - if (irqbits == port->vectormask) + if (irqbits == port->vectormask) { break; + } if (bits & irqbits) continue; info = port + i; - /* following add by Victor Yu. 09-13-2002 */ + // following add by Victor Yu. 09-13-2002 iir = inb(info->base + UART_IIR); if (iir & UART_IIR_NO_INT) continue; @@ -1964,9 +1890,9 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) inb(info->base + UART_MSR); continue; } - /* above add by Victor Yu. 09-13-2002 */ + // above add by Victor Yu. 09-13-2002 /* - if (info->tty->flip.count < TTY_FLIPBUF_SIZE / 4) { + if ( info->tty->flip.count < TTY_FLIPBUF_SIZE/4 ){ info->IER |= MOXA_MUST_RECV_ISR; outb(info->IER, info->base + UART_IER); } @@ -1982,15 +1908,18 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) status = inb(info->base + UART_LSR) & info->read_status_mask; */ - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 status = inb(info->base + UART_LSR); - if (status & UART_LSR_PE) + if (status & UART_LSR_PE) { info->err_shadow |= NPPI_NOTIFY_PARITY; - if (status & UART_LSR_FE) + } + if (status & UART_LSR_FE) { info->err_shadow |= NPPI_NOTIFY_FRAMING; - if (status & UART_LSR_OE) + } + if (status & UART_LSR_OE) { info->err_shadow |= NPPI_NOTIFY_HW_OVERRUN; + } if (status & UART_LSR_BI) info->err_shadow |= NPPI_NOTIFY_BREAK; @@ -2001,14 +1930,11 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) continue; } */ - if (iir == MOXA_MUST_IIR_GDA || - iir == MOXA_MUST_IIR_RDA || - iir == MOXA_MUST_IIR_RTO || - iir == MOXA_MUST_IIR_LSR) + if (iir == MOXA_MUST_IIR_GDA || iir == MOXA_MUST_IIR_RDA || iir == MOXA_MUST_IIR_RTO || iir == MOXA_MUST_IIR_LSR) mxser_receive_chars(info, &status); } else { - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 status &= info->read_status_mask; if (status & UART_LSR_DR) @@ -2018,13 +1944,13 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) if (msr & UART_MSR_ANY_DELTA) { mxser_check_modem_status(info, msr); } - /* following add by Victor Yu. 09-13-2002 */ + // following add by Victor Yu. 09-13-2002 if (info->IsMoxaMustChipFlag) { if ((iir == 0x02) && (status & UART_LSR_THRE)) { mxser_transmit_chars(info); } } else { - /* above add by Victor Yu. 09-13-2002 */ + // above add by Victor Yu. 09-13-2002 if (status & UART_LSR_THRE) { /* 8-2-99 by William @@ -2040,7 +1966,7 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id, struct pt_regs *regs) } irq_stop: - /* spin_unlock(&gm_lock); */ + //spin_unlock(&gm_lock); return handled; } @@ -2058,58 +1984,56 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status) recv_room = tty->receive_room; if ((recv_room == 0) && (!info->ldisc_stop_rx)) { - /* mxser_throttle(tty); */ + //mxser_throttle(tty); mxser_stoprx(tty); - /* return; */ + //return; } - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag != MOXA_OTHER_UART) { if (*status & UART_LSR_SPECIAL) { goto intr_old; } - /* following add by Victor Yu. 02-11-2004 */ - if (info->IsMoxaMustChipFlag == MOXA_MUST_MU860_HWID && - (*status & MOXA_MUST_LSR_RERR)) + // following add by Victor Yu. 02-11-2004 + if (info->IsMoxaMustChipFlag == MOXA_MUST_MU860_HWID && (*status & MOXA_MUST_LSR_RERR)) goto intr_old; - /* above add by Victor Yu. 02-14-2004 */ + // above add by Victor Yu. 02-14-2004 if (*status & MOXA_MUST_LSR_RERR) goto intr_old; gdl = inb(info->base + MOXA_MUST_GDL_REGISTER); - /* add by Victor Yu. 02-11-2004 */ - if (info->IsMoxaMustChipFlag == MOXA_MUST_MU150_HWID) + if (info->IsMoxaMustChipFlag == MOXA_MUST_MU150_HWID) // add by Victor Yu. 02-11-2004 gdl &= MOXA_MUST_GDL_MASK; if (gdl >= recv_room) { if (!info->ldisc_stop_rx) { - /* mxser_throttle(tty); */ + //mxser_throttle(tty); mxser_stoprx(tty); } - /* return; */ + //return; } while (gdl--) { ch = inb(info->base + UART_RX); tty_insert_flip_char(tty, ch, 0); cnt++; /* - if ((cnt >= HI_WATER) && (info->stop_rx == 0)) { + if((cnt>=HI_WATER) && (info->stop_rx==0)){ mxser_stoprx(tty); - info->stop_rx = 1; + info->stop_rx=1; break; } */ } goto end_intr; } - intr_old: - /* above add by Victor Yu. 09-02-2002 */ +intr_old: + // above add by Victor Yu. 09-02-2002 do { if (max-- < 0) break; /* - if ((cnt >= HI_WATER) && (info->stop_rx == 0)) { + if((cnt>=HI_WATER) && (info->stop_rx==0)){ mxser_stoprx(tty); info->stop_rx=1; break; @@ -2117,11 +2041,11 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status) */ ch = inb(info->base + UART_RX); - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag && (*status & UART_LSR_OE) /*&& !(*status&UART_LSR_DR) */ ) outb(0x23, info->base + UART_FCR); *status &= info->read_status_mask; - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 if (*status & info->ignore_status_mask) { if (++ignored > 100) break; @@ -2156,7 +2080,7 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status) cnt++; if (cnt >= recv_room) { if (!info->ldisc_stop_rx) { - /* mxser_throttle(tty); */ + //mxser_throttle(tty); mxser_stoprx(tty); } break; @@ -2164,20 +2088,21 @@ static void mxser_receive_chars(struct mxser_struct *info, int *status) } - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag) break; - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 /* mask by Victor Yu. 09-02-2002 *status = inb(info->base + UART_LSR) & info->read_status_mask; */ - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 *status = inb(info->base + UART_LSR); - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 } while (*status & UART_LSR_DR); -end_intr: /* add by Victor Yu. 09-02-2002 */ +end_intr: // add by Victor Yu. 09-02-2002 + mxvar_log.rxcnt[info->port] += cnt; info->mon_data.rxcnt += cnt; info->mon_data.up_rxcnt += cnt; @@ -2212,10 +2137,7 @@ static void mxser_transmit_chars(struct mxser_struct *info) return; } - if ((info->xmit_cnt <= 0) || info->tty->stopped || - (info->tty->hw_stopped && - (info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag))) { + if ((info->xmit_cnt <= 0) || info->tty->stopped || (info->tty->hw_stopped && (info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag))) { info->IER &= ~UART_IER_THRI; outb(info->IER, info->base + UART_IER); spin_unlock_irqrestore(&info->slock, flags); @@ -2225,18 +2147,17 @@ static void mxser_transmit_chars(struct mxser_struct *info) cnt = info->xmit_cnt; count = info->xmit_fifo_size; do { - outb(info->xmit_buf[info->xmit_tail++], - info->base + UART_TX); + outb(info->xmit_buf[info->xmit_tail++], info->base + UART_TX); info->xmit_tail = info->xmit_tail & (SERIAL_XMIT_SIZE - 1); if (--info->xmit_cnt <= 0) break; } while (--count > 0); mxvar_log.txcnt[info->port] += (cnt - info->xmit_cnt); -/* added by James 03-12-2004. */ +// added by James 03-12-2004. info->mon_data.txcnt += (cnt - info->xmit_cnt); info->mon_data.up_txcnt += (cnt - info->xmit_cnt); -/* (above) added by James. */ +// (above) added by James. /* added by casper 1/11/2000 */ info->icount.tx += (cnt - info->xmit_cnt); @@ -2267,6 +2188,7 @@ static void mxser_check_modem_status(struct mxser_struct *info, int status) info->mon_data.modem_status = status; wake_up_interruptible(&info->delta_msr_wait); + if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) { if (status & UART_MSR_DCD) wake_up_interruptible(&info->open_wait); @@ -2278,8 +2200,7 @@ static void mxser_check_modem_status(struct mxser_struct *info, int status) if (status & UART_MSR_CTS) { info->tty->hw_stopped = 0; - if ((info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag)) { + if ((info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag)) { info->IER |= UART_IER_THRI; outb(info->IER, info->base + UART_IER); } @@ -2288,8 +2209,7 @@ static void mxser_check_modem_status(struct mxser_struct *info, int status) } else { if (!(status & UART_MSR_CTS)) { info->tty->hw_stopped = 1; - if ((info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag)) { + if ((info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag)) { info->IER &= ~UART_IER_THRI; outb(info->IER, info->base + UART_IER); } @@ -2311,7 +2231,7 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp, stru */ if ((filp->f_flags & O_NONBLOCK) || (tty->flags & (1 << TTY_IO_ERROR))) { info->flags |= ASYNC_NORMAL_ACTIVE; - return 0; + return (0); } if (tty->termios->c_cflag & CLOCAL) @@ -2334,8 +2254,7 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp, stru info->blocked_open++; while (1) { spin_lock_irqsave(&info->slock, flags); - outb(inb(info->base + UART_MCR) | - UART_MCR_DTR | UART_MCR_RTS, info->base + UART_MCR); + outb(inb(info->base + UART_MCR) | UART_MCR_DTR | UART_MCR_RTS, info->base + UART_MCR); spin_unlock_irqrestore(&info->slock, flags); set_current_state(TASK_INTERRUPTIBLE); if (tty_hung_up_p(filp) || !(info->flags & ASYNC_INITIALIZED)) { @@ -2345,9 +2264,7 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp, stru retval = -ERESTARTSYS; break; } - if (!(info->flags & ASYNC_CLOSING) && - (do_clocal || - (inb(info->base + UART_MSR) & UART_MSR_DCD))) + if (!(info->flags & ASYNC_CLOSING) && (do_clocal || (inb(info->base + UART_MSR) & UART_MSR_DCD))) break; if (signal_pending(current)) { retval = -ERESTARTSYS; @@ -2361,26 +2278,27 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp, stru info->count++; info->blocked_open--; if (retval) - return retval; + return (retval); info->flags |= ASYNC_NORMAL_ACTIVE; - return 0; + return (0); } static int mxser_startup(struct mxser_struct *info) { + unsigned long page; unsigned long flags; page = __get_free_page(GFP_KERNEL); if (!page) - return -ENOMEM; + return (-ENOMEM); spin_lock_irqsave(&info->slock, flags); if (info->flags & ASYNC_INITIALIZED) { free_page(page); spin_unlock_irqrestore(&info->slock, flags); - return 0; + return (0); } if (!info->base || !info->type) { @@ -2388,7 +2306,7 @@ static int mxser_startup(struct mxser_struct *info) set_bit(TTY_IO_ERROR, &info->tty->flags); free_page(page); spin_unlock_irqrestore(&info->slock, flags); - return 0; + return (0); } if (info->xmit_buf) free_page(page); @@ -2400,12 +2318,9 @@ static int mxser_startup(struct mxser_struct *info) * (they will be reenabled in mxser_change_speed()) */ if (info->IsMoxaMustChipFlag) - outb((UART_FCR_CLEAR_RCVR | - UART_FCR_CLEAR_XMIT | - MOXA_MUST_FCR_GDA_MODE_ENABLE), info->base + UART_FCR); + outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | MOXA_MUST_FCR_GDA_MODE_ENABLE), info->base + UART_FCR); else - outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), - info->base + UART_FCR); + outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), info->base + UART_FCR); /* * At this point there's no way the LSR could still be 0xFF; @@ -2417,9 +2332,9 @@ static int mxser_startup(struct mxser_struct *info) if (capable(CAP_SYS_ADMIN)) { if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags); - return 0; + return (0); } else - return -ENODEV; + return (-ENODEV); } /* @@ -2441,12 +2356,12 @@ static int mxser_startup(struct mxser_struct *info) * Finally, enable interrupts */ info->IER = UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI; - /* info->IER = UART_IER_RLSI | UART_IER_RDI; */ +// info->IER = UART_IER_RLSI | UART_IER_RDI; - /* following add by Victor Yu. 08-30-2002 */ + // following add by Victor Yu. 08-30-2002 if (info->IsMoxaMustChipFlag) info->IER |= MOXA_MUST_IER_EGDAI; - /* above add by Victor Yu. 08-30-2002 */ + // above add by Victor Yu. 08-30-2002 outb(info->IER, info->base + UART_IER); /* enable interrupts */ /* @@ -2468,7 +2383,7 @@ static int mxser_startup(struct mxser_struct *info) mxser_change_speed(info, NULL); info->flags |= ASYNC_INITIALIZED; - return 0; + return (0); } /* @@ -2506,15 +2421,12 @@ static void mxser_shutdown(struct mxser_struct *info) outb(info->MCR, info->base + UART_MCR); /* clear Rx/Tx FIFO's */ - /* following add by Victor Yu. 08-30-2002 */ + // following add by Victor Yu. 08-30-2002 if (info->IsMoxaMustChipFlag) - outb((UART_FCR_CLEAR_RCVR | - UART_FCR_CLEAR_XMIT | - MOXA_MUST_FCR_GDA_MODE_ENABLE), info->base + UART_FCR); + outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | MOXA_MUST_FCR_GDA_MODE_ENABLE), info->base + UART_FCR); else - /* above add by Victor Yu. 08-30-2002 */ - outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), - info->base + UART_FCR); + // above add by Victor Yu. 08-30-2002 + outb((UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT), info->base + UART_FCR); /* read data port to reset things */ (void) inb(info->base + UART_RX); @@ -2524,10 +2436,11 @@ static void mxser_shutdown(struct mxser_struct *info) info->flags &= ~ASYNC_INITIALIZED; - /* following add by Victor Yu. 09-23-2002 */ - if (info->IsMoxaMustChipFlag) + // following add by Victor Yu. 09-23-2002 + if (info->IsMoxaMustChipFlag) { SET_MOXA_MUST_NO_SOFTWARE_FLOW_CONTROL(info->base); - /* above add by Victor Yu. 09-23-2002 */ + } + // above add by Victor Yu. 09-23-2002 spin_unlock_irqrestore(&info->slock, flags); } @@ -2544,12 +2457,14 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter long baud; unsigned long flags; + if (!info->tty || !info->tty->termios) return ret; cflag = info->tty->termios->c_cflag; if (!(info->base)) return ret; + #ifndef B921600 #define B921600 (B460800 +1) #endif @@ -2644,8 +2559,9 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter cval |= 0x04; if (cflag & PARENB) cval |= UART_LCR_PARITY; - if (!(cflag & PARODD)) + if (!(cflag & PARODD)) { cval |= UART_LCR_EPAR; + } if (cflag & CMSPAR) cval |= UART_LCR_SPAR; @@ -2658,12 +2574,13 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter fcr = 0; } else { fcr = UART_FCR_ENABLE_FIFO; - /* following add by Victor Yu. 08-30-2002 */ + // following add by Victor Yu. 08-30-2002 if (info->IsMoxaMustChipFlag) { fcr |= MOXA_MUST_FCR_GDA_MODE_ENABLE; SET_MOXA_MUST_FIFO_VALUE(info); } else { - /* above add by Victor Yu. 08-30-2002 */ + // above add by Victor Yu. 08-30-2002 + switch (info->rx_trigger) { case 1: fcr |= UART_FCR_TRIGGER_1; @@ -2689,24 +2606,22 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter info->IER |= UART_IER_MSI; if ((info->type == PORT_16550A) || (info->IsMoxaMustChipFlag)) { info->MCR |= UART_MCR_AFE; - /* status = mxser_get_msr(info->base, 0, info->port); */ -/* - save_flags(flags); + //status = mxser_get_msr(info->base, 0, info->port); +/* save_flags(flags); cli(); status = inb(baseaddr + UART_MSR); - restore_flags(flags); -*/ - /* mxser_check_modem_status(info, status); */ + restore_flags(flags);*/ + //mxser_check_modem_status(info, status); } else { - /* status = mxser_get_msr(info->base, 0, info->port); */ - /* MX_LOCK(&info->slock); */ + //status = mxser_get_msr(info->base, 0, info->port); + + //MX_LOCK(&info->slock); status = inb(info->base + UART_MSR); - /* MX_UNLOCK(&info->slock); */ + //MX_UNLOCK(&info->slock); if (info->tty->hw_stopped) { if (status & UART_MSR_CTS) { info->tty->hw_stopped = 0; - if ((info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag)) { + if ((info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag)) { info->IER |= UART_IER_THRI; outb(info->IER, info->base + UART_IER); } @@ -2715,8 +2630,7 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter } else { if (!(status & UART_MSR_CTS)) { info->tty->hw_stopped = 1; - if ((info->type != PORT_16550A) && - (!info->IsMoxaMustChipFlag)) { + if ((info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag)) { info->IER &= ~UART_IER_THRI; outb(info->IER, info->base + UART_IER); } @@ -2754,17 +2668,11 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter * overruns too. (For real raw support). */ if (I_IGNPAR(info->tty)) { - info->ignore_status_mask |= - UART_LSR_OE | - UART_LSR_PE | - UART_LSR_FE; - info->read_status_mask |= - UART_LSR_OE | - UART_LSR_PE | - UART_LSR_FE; + info->ignore_status_mask |= UART_LSR_OE | UART_LSR_PE | UART_LSR_FE; + info->read_status_mask |= UART_LSR_OE | UART_LSR_PE | UART_LSR_FE; } } - /* following add by Victor Yu. 09-02-2002 */ + // following add by Victor Yu. 09-02-2002 if (info->IsMoxaMustChipFlag) { spin_lock_irqsave(&info->slock, flags); SET_MOXA_MUST_XON1_VALUE(info->base, START_CHAR(info->tty)); @@ -2790,7 +2698,7 @@ static int mxser_change_speed(struct mxser_struct *info, struct termios *old_ter */ spin_unlock_irqrestore(&info->slock, flags); } - /* above add by Victor Yu. 09-02-2002 */ + // above add by Victor Yu. 09-02-2002 outb(fcr, info->base + UART_FCR); /* set fcr */ @@ -2821,8 +2729,10 @@ static int mxser_set_baud(struct mxser_struct *info, long newspd) quot = (2 * info->baud_base / 269); } else if (newspd) { quot = info->baud_base / newspd; + if (quot == 0) quot = 1; + } else { quot = 0; } @@ -2855,6 +2765,8 @@ static int mxser_set_baud(struct mxser_struct *info, long newspd) return ret; } + + /* * ------------------------------------------------------------ * friends of mxser_ioctl() @@ -2865,7 +2777,7 @@ static int mxser_get_serial_info(struct mxser_struct *info, struct serial_struct struct serial_struct tmp; if (!retinfo) - return -EFAULT; + return (-EFAULT); memset(&tmp, 0, sizeof(tmp)); tmp.type = info->type; tmp.line = info->port; @@ -2879,7 +2791,7 @@ static int mxser_get_serial_info(struct mxser_struct *info, struct serial_struct tmp.hub6 = 0; if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) return -EFAULT; - return 0; + return (0); } static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct __user *new_info) @@ -2889,37 +2801,29 @@ static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct int retval = 0; if (!new_info || !info->base) - return -EFAULT; + return (-EFAULT); if (copy_from_user(&new_serial, new_info, sizeof(new_serial))) return -EFAULT; - if ((new_serial.irq != info->irq) || - (new_serial.port != info->base) || - (new_serial.custom_divisor != info->custom_divisor) || - (new_serial.baud_base != info->baud_base)) - return -EPERM; + if ((new_serial.irq != info->irq) || (new_serial.port != info->base) || (new_serial.custom_divisor != info->custom_divisor) || (new_serial.baud_base != info->baud_base)) + return (-EPERM); flags = info->flags & ASYNC_SPD_MASK; if (!capable(CAP_SYS_ADMIN)) { - if ((new_serial.baud_base != info->baud_base) || - (new_serial.close_delay != info->close_delay) || - ((new_serial.flags & ~ASYNC_USR_MASK) != (info->flags & ~ASYNC_USR_MASK))) - return -EPERM; - info->flags = ((info->flags & ~ASYNC_USR_MASK) | - (new_serial.flags & ASYNC_USR_MASK)); + if ((new_serial.baud_base != info->baud_base) || (new_serial.close_delay != info->close_delay) || ((new_serial.flags & ~ASYNC_USR_MASK) != (info->flags & ~ASYNC_USR_MASK))) + return (-EPERM); + info->flags = ((info->flags & ~ASYNC_USR_MASK) | (new_serial.flags & ASYNC_USR_MASK)); } else { /* * OK, past this point, all the error checking has been done. * At this point, we start making changes..... */ - info->flags = ((info->flags & ~ASYNC_FLAGS) | - (new_serial.flags & ASYNC_FLAGS)); + info->flags = ((info->flags & ~ASYNC_FLAGS) | (new_serial.flags & ASYNC_FLAGS)); info->close_delay = new_serial.close_delay * HZ / 100; info->closing_wait = new_serial.closing_wait * HZ / 100; - info->tty->low_latency = - (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; - info->tty->low_latency = 0; /* (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; */ + info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; + info->tty->low_latency = 0; //(info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; } /* added by casper, 3/17/2000, for mouse */ @@ -2927,6 +2831,7 @@ static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct process_txrx_fifo(info); + /* */ if (info->flags & ASYNC_INITIALIZED) { if (flags != (info->flags & ASYNC_SPD_MASK)) { mxser_change_speed(info, NULL); @@ -2934,7 +2839,7 @@ static int mxser_set_serial_info(struct mxser_struct *info, struct serial_struct } else { retval = mxser_startup(info); } - return retval; + return (retval); } /* @@ -2971,27 +2876,25 @@ static void mxser_send_break(struct mxser_struct *info, int duration) return; set_current_state(TASK_INTERRUPTIBLE); spin_lock_irqsave(&info->slock, flags); - outb(inb(info->base + UART_LCR) | UART_LCR_SBC, - info->base + UART_LCR); + outb(inb(info->base + UART_LCR) | UART_LCR_SBC, info->base + UART_LCR); spin_unlock_irqrestore(&info->slock, flags); schedule_timeout(duration); spin_lock_irqsave(&info->slock, flags); - outb(inb(info->base + UART_LCR) & ~UART_LCR_SBC, - info->base + UART_LCR); + outb(inb(info->base + UART_LCR) & ~UART_LCR_SBC, info->base + UART_LCR); spin_unlock_irqrestore(&info->slock, flags); } static int mxser_tiocmget(struct tty_struct *tty, struct file *file) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned char control, status; unsigned long flags; if (tty->index == MXSER_PORTS) - return -ENOIOCTLCMD; + return (-ENOIOCTLCMD); if (tty->flags & (1 << TTY_IO_ERROR)) - return -EIO; + return (-EIO); control = info->MCR; @@ -3001,16 +2904,12 @@ static int mxser_tiocmget(struct tty_struct *tty, struct file *file) mxser_check_modem_status(info, status); spin_unlock_irqrestore(&info->slock, flags); return ((control & UART_MCR_RTS) ? TIOCM_RTS : 0) | - ((control & UART_MCR_DTR) ? TIOCM_DTR : 0) | - ((status & UART_MSR_DCD) ? TIOCM_CAR : 0) | - ((status & UART_MSR_RI) ? TIOCM_RNG : 0) | - ((status & UART_MSR_DSR) ? TIOCM_DSR : 0) | - ((status & UART_MSR_CTS) ? TIOCM_CTS : 0); + ((control & UART_MCR_DTR) ? TIOCM_DTR : 0) | ((status & UART_MSR_DCD) ? TIOCM_CAR : 0) | ((status & UART_MSR_RI) ? TIOCM_RNG : 0) | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0) | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0); } static int mxser_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear) { - struct mxser_struct *info = tty->driver_data; + struct mxser_struct *info = (struct mxser_struct *) tty->driver_data; unsigned long flags; @@ -3069,36 +2968,38 @@ static int mxser_get_ISA_conf(int cap, struct mxser_hwconf *hwconf) hwconf->board_type = MXSER_BOARD_CI104J; hwconf->ports = 4; } else - return 0; + return (0); irq = 0; if (hwconf->ports == 2) { irq = regs[9] & 0xF000; irq = irq | (irq >> 4); if (irq != (regs[9] & 0xFF00)) - return MXSER_ERR_IRQ_CONFLIT; + return (MXSER_ERR_IRQ_CONFLIT); } else if (hwconf->ports == 4) { irq = regs[9] & 0xF000; irq = irq | (irq >> 4); irq = irq | (irq >> 8); if (irq != regs[9]) - return MXSER_ERR_IRQ_CONFLIT; + return (MXSER_ERR_IRQ_CONFLIT); } else if (hwconf->ports == 8) { irq = regs[9] & 0xF000; irq = irq | (irq >> 4); irq = irq | (irq >> 8); if ((irq != regs[9]) || (irq != regs[10])) - return MXSER_ERR_IRQ_CONFLIT; + return (MXSER_ERR_IRQ_CONFLIT); } - if (!irq) - return MXSER_ERR_IRQ; - hwconf->irq = ((int)(irq & 0xF000) >> 12); + if (!irq) { + return (MXSER_ERR_IRQ); + } + hwconf->irq = ((int) (irq & 0xF000) >> 12); for (i = 0; i < 8; i++) hwconf->ioaddr[i] = (int) regs[i + 1] & 0xFFF8; - if ((regs[12] & 0x80) == 0) - return MXSER_ERR_VECTOR; - hwconf->vector = (int)regs[11]; /* interrupt vector */ + if ((regs[12] & 0x80) == 0) { + return (MXSER_ERR_VECTOR); + } + hwconf->vector = (int) regs[11]; /* interrupt vector */ if (id == 1) hwconf->vector_mask = 0x00FF; else @@ -3106,10 +3007,10 @@ static int mxser_get_ISA_conf(int cap, struct mxser_hwconf *hwconf) for (i = 7, bits = 0x0100; i >= 0; i--, bits <<= 1) { if (regs[12] & bits) { hwconf->baud_base[i] = 921600; - hwconf->MaxCanSetBaudRate[i] = 921600; /* add by Victor Yu. 09-04-2002 */ + hwconf->MaxCanSetBaudRate[i] = 921600; // add by Victor Yu. 09-04-2002 } else { hwconf->baud_base[i] = 115200; - hwconf->MaxCanSetBaudRate[i] = 115200; /* add by Victor Yu. 09-04-2002 */ + hwconf->MaxCanSetBaudRate[i] = 115200; // add by Victor Yu. 09-04-2002 } } scratch2 = inb(cap + UART_LCR) & (~UART_LCR_DLAB); @@ -3129,7 +3030,7 @@ static int mxser_get_ISA_conf(int cap, struct mxser_hwconf *hwconf) hwconf->ports = 4; request_region(hwconf->ioaddr[0], 8 * hwconf->ports, "mxser(IO)"); request_region(hwconf->vector, 1, "mxser(vector)"); - return hwconf->ports; + return (hwconf->ports); } #define CHIP_SK 0x01 /* Serial Data Clock in Eprom */ @@ -3152,7 +3053,7 @@ static int mxser_read_register(int port, unsigned short *regs) id = mxser_program_mode(port); if (id < 0) - return id; + return (id); for (i = 0; i < 14; i++) { k = (i & 0x3F) | 0x180; for (j = 0x100; j > 0; j >>= 1) { @@ -3165,7 +3066,7 @@ static int mxser_read_register(int port, unsigned short *regs) outb(CHIP_CS | CHIP_SK, port); /* A? bit of read */ } } - (void)inb(port); + (void) inb(port); value = 0; for (k = 0, j = 0x8000; k < 16; k++, j >>= 1) { outb(CHIP_CS, port); @@ -3177,33 +3078,28 @@ static int mxser_read_register(int port, unsigned short *regs) outb(0, port); } mxser_normal_mode(port); - return id; + return (id); } static int mxser_program_mode(int port) { int id, i, j, n; - /* unsigned long flags; */ + //unsigned long flags; spin_lock(&gm_lock); outb(0, port); outb(0, port); outb(0, port); - (void)inb(port); - (void)inb(port); + (void) inb(port); + (void) inb(port); outb(0, port); - (void)inb(port); - /* restore_flags(flags); */ + (void) inb(port); + //restore_flags(flags); spin_unlock(&gm_lock); id = inb(port + 1) & 0x1F; - if ((id != C168_ASIC_ID) && - (id != C104_ASIC_ID) && - (id != C102_ASIC_ID) && - (id != CI132_ASIC_ID) && - (id != CI134_ASIC_ID) && - (id != CI104J_ASIC_ID)) - return -1; + if ((id != C168_ASIC_ID) && (id != C104_ASIC_ID) && (id != C102_ASIC_ID) && (id != CI132_ASIC_ID) && (id != CI134_ASIC_ID) && (id != CI104J_ASIC_ID)) + return (-1); for (i = 0, j = 0; i < 4; i++) { n = inb(port + 2); if (n == 'M') { @@ -3216,7 +3112,7 @@ static int mxser_program_mode(int port) } if (j != 2) id = -2; - return id; + return (id); } static void mxser_normal_mode(int port) @@ -3234,7 +3130,7 @@ static void mxser_normal_mode(int port) if ((n & 0x61) == 0x60) break; if ((n & 1) == 1) - (void)inb(port); + (void) inb(port); } outb(0x00, port + 4); } diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index 337a87f86..9f54733f1 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -81,6 +81,7 @@ #define HDLC_MAGIC 0x239e #define HDLC_VERSION "$Revision: 4.8 $" +#include #include #include #include diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index 203dc2b66..c48de09d6 100644 --- a/drivers/char/n_r3964.c +++ b/drivers/char/n_r3964.c @@ -951,8 +951,7 @@ static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, { queue_the_message: - pMsg = kmalloc(sizeof(struct r3964_message), - error_code?GFP_ATOMIC:GFP_KERNEL); + pMsg = kmalloc(sizeof(struct r3964_message), GFP_KERNEL); TRACE_M("add_msg - kmalloc %p",pMsg); if(pMsg==NULL) { return; diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 603b9ade5..b9371d5bf 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c @@ -1132,7 +1132,7 @@ static inline int input_available_p(struct tty_struct *tty, int amt) * buffer, and once to drain the space from the (physical) beginning of * the buffer to head pointer. * - * Called under the tty->atomic_read_lock sem + * Called under the tty->atomic_read_lock sem and with TTY_DONT_FLIP set * */ @@ -1271,6 +1271,7 @@ do_it_again: } add_wait_queue(&tty->read_wait, &wait); + set_bit(TTY_DONT_FLIP, &tty->flags); while (nr) { /* First test for status change. */ if (tty->packet && tty->link->ctrl_status) { @@ -1314,7 +1315,9 @@ do_it_again: break; } n_tty_set_room(tty); + clear_bit(TTY_DONT_FLIP, &tty->flags); timeout = schedule_timeout(timeout); + set_bit(TTY_DONT_FLIP, &tty->flags); continue; } __set_current_state(TASK_RUNNING); @@ -1391,6 +1394,7 @@ do_it_again: if (time) timeout = time; } + clear_bit(TTY_DONT_FLIP, &tty->flags); mutex_unlock(&tty->atomic_read_lock); remove_wait_queue(&tty->read_wait, &wait); diff --git a/drivers/char/nsc_gpio.c b/drivers/char/nsc_gpio.c deleted file mode 100644 index 4d47d79bc..000000000 --- a/drivers/char/nsc_gpio.c +++ /dev/null @@ -1,139 +0,0 @@ -/* linux/drivers/char/nsc_gpio.c - - National Semiconductor common GPIO device-file/VFS methods. - Allows a user space process to control the GPIO pins. - - Copyright (c) 2001,2002 Christer Weinigel - Copyright (c) 2005 Jim Cromie -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define NAME "nsc_gpio" - -void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index) -{ - /* retrieve current config w/o changing it */ - u32 config = amp->gpio_config(index, ~0, 0); - - /* user requested via 'v' command, so its INFO */ - dev_info(amp->dev, "io%02u: 0x%04x %s %s %s %s %s %s %s\tio:%d/%d\n", - index, config, - (config & 1) ? "OE" : "TS", /* output-enabled/tristate */ - (config & 2) ? "PP" : "OD", /* push pull / open drain */ - (config & 4) ? "PUE" : "PUD", /* pull up enabled/disabled */ - (config & 8) ? "LOCKED" : "", /* locked / unlocked */ - (config & 16) ? "LEVEL" : "EDGE",/* level/edge input */ - (config & 32) ? "HI" : "LO", /* trigger on rise/fall edge */ - (config & 64) ? "DEBOUNCE" : "", /* debounce */ - - amp->gpio_get(index), amp->gpio_current(index)); -} - -ssize_t nsc_gpio_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) -{ - unsigned m = iminor(file->f_dentry->d_inode); - struct nsc_gpio_ops *amp = file->private_data; - struct device *dev = amp->dev; - size_t i; - int err = 0; - - for (i = 0; i < len; ++i) { - char c; - if (get_user(c, data + i)) - return -EFAULT; - switch (c) { - case '0': - amp->gpio_set(m, 0); - break; - case '1': - amp->gpio_set(m, 1); - break; - case 'O': - dev_dbg(dev, "GPIO%d output enabled\n", m); - amp->gpio_config(m, ~1, 1); - break; - case 'o': - dev_dbg(dev, "GPIO%d output disabled\n", m); - amp->gpio_config(m, ~1, 0); - break; - case 'T': - dev_dbg(dev, "GPIO%d output is push pull\n", m); - amp->gpio_config(m, ~2, 2); - break; - case 't': - dev_dbg(dev, "GPIO%d output is open drain\n", m); - amp->gpio_config(m, ~2, 0); - break; - case 'P': - dev_dbg(dev, "GPIO%d pull up enabled\n", m); - amp->gpio_config(m, ~4, 4); - break; - case 'p': - dev_dbg(dev, "GPIO%d pull up disabled\n", m); - amp->gpio_config(m, ~4, 0); - break; - case 'v': - /* View Current pin settings */ - amp->gpio_dump(amp, m); - break; - case '\n': - /* end of settings string, do nothing */ - break; - default: - dev_err(dev, "io%2d bad setting: chr<0x%2x>\n", - m, (int)c); - err++; - } - } - if (err) - return -EINVAL; /* full string handled, report error */ - - return len; -} - -ssize_t nsc_gpio_read(struct file *file, char __user * buf, - size_t len, loff_t * ppos) -{ - unsigned m = iminor(file->f_dentry->d_inode); - int value; - struct nsc_gpio_ops *amp = file->private_data; - - value = amp->gpio_get(m); - if (put_user(value ? '1' : '0', buf)) - return -EFAULT; - - return 1; -} - -/* common file-ops routines for both scx200_gpio and pc87360_gpio */ -EXPORT_SYMBOL(nsc_gpio_write); -EXPORT_SYMBOL(nsc_gpio_read); -EXPORT_SYMBOL(nsc_gpio_dump); - -static int __init nsc_gpio_init(void) -{ - printk(KERN_DEBUG NAME " initializing\n"); - return 0; -} - -static void __exit nsc_gpio_cleanup(void) -{ - printk(KERN_DEBUG NAME " cleanup\n"); -} - -module_init(nsc_gpio_init); -module_exit(nsc_gpio_cleanup); - -MODULE_AUTHOR("Jim Cromie "); -MODULE_DESCRIPTION("NatSemi GPIO Common Methods"); -MODULE_LICENSE("GPL"); diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index a39f19c35..3556ccd77 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -37,6 +37,7 @@ #define NVRAM_VERSION "1.2" #include +#include #include #include #include @@ -437,7 +438,7 @@ nvram_read_proc(char *buffer, char **start, off_t offset, #endif /* CONFIG_PROC_FS */ -static const struct file_operations nvram_fops = { +static struct file_operations nvram_fops = { .owner = THIS_MODULE, .llseek = nvram_llseek, .read = nvram_read, diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 7c57ebfa8..4083b781a 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c @@ -4,6 +4,7 @@ * */ +#include #include #include #include @@ -183,7 +184,7 @@ static int button_read (struct file *filp, char __user *buffer, * attempts to perform these operations on the device. */ -static const struct file_operations button_fops = { +static struct file_operations button_fops = { .owner = THIS_MODULE, .read = button_read, }; @@ -223,7 +224,7 @@ static int __init nwbutton_init(void) return -EBUSY; } - if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, IRQF_DISABLED, + if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, SA_INTERRUPT, "nwbutton", NULL)) { printk (KERN_WARNING "nwbutton: IRQ %d is not free.\n", IRQ_NETWINDER_BUTTON); diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index 206cf6f50..8865387d3 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c @@ -642,7 +642,7 @@ static void kick_open(void) udelay(25); } -static const struct file_operations flash_fops = +static struct file_operations flash_fops = { .owner = THIS_MODULE, .llseek = flash_llseek, diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c deleted file mode 100644 index 84e5a6863..000000000 --- a/drivers/char/pc8736x_gpio.c +++ /dev/null @@ -1,357 +0,0 @@ -/* linux/drivers/char/pc8736x_gpio.c - - National Semiconductor PC8736x GPIO driver. Allows a user space - process to play with the GPIO pins. - - Copyright (c) 2005,2006 Jim Cromie - - adapted from linux/drivers/char/scx200_gpio.c - Copyright (c) 2001,2002 Christer Weinigel , -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DEVNAME "pc8736x_gpio" - -MODULE_AUTHOR("Jim Cromie "); -MODULE_DESCRIPTION("NatSemi/Winbond PC-8736x GPIO Pin Driver"); -MODULE_LICENSE("GPL"); - -static int major; /* default to dynamic major */ -module_param(major, int, 0); -MODULE_PARM_DESC(major, "Major device number"); - -static DEFINE_MUTEX(pc8736x_gpio_config_lock); -static unsigned pc8736x_gpio_base; -static u8 pc8736x_gpio_shadow[4]; - -#define SIO_BASE1 0x2E /* 1st command-reg to check */ -#define SIO_BASE2 0x4E /* alt command-reg to check */ - -#define SIO_SID 0x20 /* SuperI/O ID Register */ -#define SIO_SID_VALUE 0xe9 /* Expected value in SuperI/O ID Register */ - -#define SIO_CF1 0x21 /* chip config, bit0 is chip enable */ - -#define PC8736X_GPIO_RANGE 16 /* ioaddr range */ -#define PC8736X_GPIO_CT 32 /* minors matching 4 8 bit ports */ - -#define SIO_UNIT_SEL 0x7 /* unit select reg */ -#define SIO_UNIT_ACT 0x30 /* unit enable */ -#define SIO_GPIO_UNIT 0x7 /* unit number of GPIO */ -#define SIO_VLM_UNIT 0x0D -#define SIO_TMS_UNIT 0x0E - -/* config-space addrs to read/write each unit's runtime addr */ -#define SIO_BASE_HADDR 0x60 -#define SIO_BASE_LADDR 0x61 - -/* GPIO config-space pin-control addresses */ -#define SIO_GPIO_PIN_SELECT 0xF0 -#define SIO_GPIO_PIN_CONFIG 0xF1 -#define SIO_GPIO_PIN_EVENT 0xF2 - -static unsigned char superio_cmd = 0; -static unsigned char selected_device = 0xFF; /* bogus start val */ - -/* GPIO port runtime access, functionality */ -static int port_offset[] = { 0, 4, 8, 10 }; /* non-uniform offsets ! */ -/* static int event_capable[] = { 1, 1, 0, 0 }; ports 2,3 are hobbled */ - -#define PORT_OUT 0 -#define PORT_IN 1 -#define PORT_EVT_EN 2 -#define PORT_EVT_STST 3 - -static struct platform_device *pdev; /* use in dev_*() */ - -static inline void superio_outb(int addr, int val) -{ - outb_p(addr, superio_cmd); - outb_p(val, superio_cmd + 1); -} - -static inline int superio_inb(int addr) -{ - outb_p(addr, superio_cmd); - return inb_p(superio_cmd + 1); -} - -static int pc8736x_superio_present(void) -{ - /* try the 2 possible values, read a hardware reg to verify */ - superio_cmd = SIO_BASE1; - if (superio_inb(SIO_SID) == SIO_SID_VALUE) - return superio_cmd; - - superio_cmd = SIO_BASE2; - if (superio_inb(SIO_SID) == SIO_SID_VALUE) - return superio_cmd; - - return 0; -} - -static void device_select(unsigned devldn) -{ - superio_outb(SIO_UNIT_SEL, devldn); - selected_device = devldn; -} - -static void select_pin(unsigned iminor) -{ - /* select GPIO port/pin from device minor number */ - device_select(SIO_GPIO_UNIT); - superio_outb(SIO_GPIO_PIN_SELECT, - ((iminor << 1) & 0xF0) | (iminor & 0x7)); -} - -static inline u32 pc8736x_gpio_configure_fn(unsigned index, u32 mask, u32 bits, - u32 func_slct) -{ - u32 config, new_config; - - mutex_lock(&pc8736x_gpio_config_lock); - - device_select(SIO_GPIO_UNIT); - select_pin(index); - - /* read current config value */ - config = superio_inb(func_slct); - - /* set new config */ - new_config = (config & mask) | bits; - superio_outb(func_slct, new_config); - - mutex_unlock(&pc8736x_gpio_config_lock); - - return config; -} - -static u32 pc8736x_gpio_configure(unsigned index, u32 mask, u32 bits) -{ - return pc8736x_gpio_configure_fn(index, mask, bits, - SIO_GPIO_PIN_CONFIG); -} - -static int pc8736x_gpio_get(unsigned minor) -{ - int port, bit, val; - - port = minor >> 3; - bit = minor & 7; - val = inb_p(pc8736x_gpio_base + port_offset[port] + PORT_IN); - val >>= bit; - val &= 1; - - dev_dbg(&pdev->dev, "_gpio_get(%d from %x bit %d) == val %d\n", - minor, pc8736x_gpio_base + port_offset[port] + PORT_IN, bit, - val); - - return val; -} - -static void pc8736x_gpio_set(unsigned minor, int val) -{ - int port, bit, curval; - - minor &= 0x1f; - port = minor >> 3; - bit = minor & 7; - curval = inb_p(pc8736x_gpio_base + port_offset[port] + PORT_OUT); - - dev_dbg(&pdev->dev, "addr:%x cur:%x bit-pos:%d cur-bit:%x + new:%d -> bit-new:%d\n", - pc8736x_gpio_base + port_offset[port] + PORT_OUT, - curval, bit, (curval & ~(1 << bit)), val, (val << bit)); - - val = (curval & ~(1 << bit)) | (val << bit); - - dev_dbg(&pdev->dev, "gpio_set(minor:%d port:%d bit:%d)" - " %2x -> %2x\n", minor, port, bit, curval, val); - - outb_p(val, pc8736x_gpio_base + port_offset[port] + PORT_OUT); - - curval = inb_p(pc8736x_gpio_base + port_offset[port] + PORT_OUT); - val = inb_p(pc8736x_gpio_base + port_offset[port] + PORT_IN); - - dev_dbg(&pdev->dev, "wrote %x, read: %x\n", curval, val); - pc8736x_gpio_shadow[port] = val; -} - -static void pc8736x_gpio_set_high(unsigned index) -{ - pc8736x_gpio_set(index, 1); -} - -static void pc8736x_gpio_set_low(unsigned index) -{ - pc8736x_gpio_set(index, 0); -} - -static int pc8736x_gpio_current(unsigned minor) -{ - int port, bit; - minor &= 0x1f; - port = minor >> 3; - bit = minor & 7; - return ((pc8736x_gpio_shadow[port] >> bit) & 0x01); -} - -static void pc8736x_gpio_change(unsigned index) -{ - pc8736x_gpio_set(index, !pc8736x_gpio_current(index)); -} - -static struct nsc_gpio_ops pc8736x_gpio_ops = { - .owner = THIS_MODULE, - .gpio_config = pc8736x_gpio_configure, - .gpio_dump = nsc_gpio_dump, - .gpio_get = pc8736x_gpio_get, - .gpio_set = pc8736x_gpio_set, - .gpio_change = pc8736x_gpio_change, - .gpio_current = pc8736x_gpio_current -}; - -static int pc8736x_gpio_open(struct inode *inode, struct file *file) -{ - unsigned m = iminor(inode); - file->private_data = &pc8736x_gpio_ops; - - dev_dbg(&pdev->dev, "open %d\n", m); - - if (m >= PC8736X_GPIO_CT) - return -EINVAL; - return nonseekable_open(inode, file); -} - -static const struct file_operations pc8736x_gpio_fileops = { - .owner = THIS_MODULE, - .open = pc8736x_gpio_open, - .write = nsc_gpio_write, - .read = nsc_gpio_read, -}; - -static void __init pc8736x_init_shadow(void) -{ - int port; - - /* read the current values driven on the GPIO signals */ - for (port = 0; port < 4; ++port) - pc8736x_gpio_shadow[port] - = inb_p(pc8736x_gpio_base + port_offset[port] - + PORT_OUT); - -} - -static struct cdev pc8736x_gpio_cdev; - -static int __init pc8736x_gpio_init(void) -{ - int rc; - dev_t devid; - - pdev = platform_device_alloc(DEVNAME, 0); - if (!pdev) - return -ENOMEM; - - rc = platform_device_add(pdev); - if (rc) { - rc = -ENODEV; - goto undo_platform_dev_alloc; - } - dev_info(&pdev->dev, "NatSemi pc8736x GPIO Driver Initializing\n"); - - if (!pc8736x_superio_present()) { - rc = -ENODEV; - dev_err(&pdev->dev, "no device found\n"); - goto undo_platform_dev_add; - } - pc8736x_gpio_ops.dev = &pdev->dev; - - /* Verify that chip and it's GPIO unit are both enabled. - My BIOS does this, so I take minimum action here - */ - rc = superio_inb(SIO_CF1); - if (!(rc & 0x01)) { - rc = -ENODEV; - dev_err(&pdev->dev, "device not enabled\n"); - goto undo_platform_dev_add; - } - device_select(SIO_GPIO_UNIT); - if (!superio_inb(SIO_UNIT_ACT)) { - rc = -ENODEV; - dev_err(&pdev->dev, "GPIO unit not enabled\n"); - goto undo_platform_dev_add; - } - - /* read the GPIO unit base addr that chip responds to */ - pc8736x_gpio_base = (superio_inb(SIO_BASE_HADDR) << 8 - | superio_inb(SIO_BASE_LADDR)); - - if (!request_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE, DEVNAME)) { - rc = -ENODEV; - dev_err(&pdev->dev, "GPIO ioport %x busy\n", - pc8736x_gpio_base); - goto undo_platform_dev_add; - } - dev_info(&pdev->dev, "GPIO ioport %x reserved\n", pc8736x_gpio_base); - - if (major) { - devid = MKDEV(major, 0); - rc = register_chrdev_region(devid, PC8736X_GPIO_CT, DEVNAME); - } else { - rc = alloc_chrdev_region(&devid, 0, PC8736X_GPIO_CT, DEVNAME); - major = MAJOR(devid); - } - - if (rc < 0) { - dev_err(&pdev->dev, "register-chrdev failed: %d\n", rc); - goto undo_request_region; - } - if (!major) { - major = rc; - dev_dbg(&pdev->dev, "got dynamic major %d\n", major); - } - - pc8736x_init_shadow(); - - /* ignore minor errs, and succeed */ - cdev_init(&pc8736x_gpio_cdev, &pc8736x_gpio_fileops); - cdev_add(&pc8736x_gpio_cdev, devid, PC8736X_GPIO_CT); - - return 0; - -undo_request_region: - release_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE); -undo_platform_dev_add: - platform_device_del(pdev); -undo_platform_dev_alloc: - platform_device_put(pdev); - - return rc; -} - -static void __exit pc8736x_gpio_cleanup(void) -{ - dev_dbg(&pdev->dev, "cleanup\n"); - - cdev_del(&pc8736x_gpio_cdev); - unregister_chrdev_region(MKDEV(major,0), PC8736X_GPIO_CT); - release_region(pc8736x_gpio_base, PC8736X_GPIO_RANGE); - - platform_device_del(pdev); - platform_device_put(pdev); -} - -module_init(pc8736x_gpio_init); -module_exit(pc8736x_gpio_cleanup); diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 50d20aafe..eab5394da 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -149,7 +149,12 @@ struct cm4000_dev { #define ZERO_DEV(dev) \ memset(&dev->atr_csum,0, \ sizeof(struct cm4000_dev) - \ - offsetof(struct cm4000_dev, atr_csum)) + /*link*/ sizeof(struct pcmcia_device *) - \ + /*node*/ sizeof(dev_node_t) - \ + /*atr*/ MAX_ATR*sizeof(char) - \ + /*rbuf*/ 512*sizeof(char) - \ + /*sbuf*/ 512*sizeof(char) - \ + /*queue*/ 4*sizeof(wait_queue_head_t)) static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; static struct class *cmm_class; @@ -1938,7 +1943,7 @@ static void cm4000_detach(struct pcmcia_device *link) return; } -static const struct file_operations cm4000_fops = { +static struct file_operations cm4000_fops = { .owner = THIS_MODULE, .read = cmm_read, .write = cmm_write, diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 55cf4be42..47a8465bf 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -688,7 +688,7 @@ static void reader_detach(struct pcmcia_device *link) return; } -static const struct file_operations reader_fops = { +static struct file_operations reader_fops = { .owner = THIS_MODULE, .read = cm4040_read, .write = cm4040_write, diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 97bcd6e5a..07213454c 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -35,6 +35,7 @@ #define MAX_DEVICE_COUNT 4 +#include #include #include #include @@ -843,7 +844,7 @@ static int bh_action(MGSLPC_INFO *info) return rc; } -static void bh_handler(void* Context) +void bh_handler(void* Context) { MGSLPC_INFO *info = (MGSLPC_INFO*)Context; int action; @@ -887,7 +888,7 @@ static void bh_handler(void* Context) __FILE__,__LINE__,info->device_name); } -static void bh_transmit(MGSLPC_INFO *info) +void bh_transmit(MGSLPC_INFO *info) { struct tty_struct *tty = info->tty; if (debug_level >= DEBUG_LEVEL_BH) @@ -899,7 +900,7 @@ static void bh_transmit(MGSLPC_INFO *info) } } -static void bh_status(MGSLPC_INFO *info) +void bh_status(MGSLPC_INFO *info) { info->ri_chkcount = 0; info->dsr_chkcount = 0; @@ -1173,12 +1174,8 @@ static void dcd_change(MGSLPC_INFO *info) else info->input_signal_events.dcd_down++; #ifdef CONFIG_HDLC - if (info->netcount) { - if (info->serial_signals & SerialSignal_DCD) - netif_carrier_on(info->netdev); - else - netif_carrier_off(info->netdev); - } + if (info->netcount) + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, info->netdev); #endif wake_up_interruptible(&info->status_event_wait_q); wake_up_interruptible(&info->event_wait_q); @@ -1585,7 +1582,7 @@ static void mgslpc_put_char(struct tty_struct *tty, unsigned char ch) if (mgslpc_paranoia_check(info, tty->name, "mgslpc_put_char")) return; - if (!info->tx_buf) + if (!tty || !info->tx_buf) return; spin_lock_irqsave(&info->lock,flags); @@ -1652,7 +1649,7 @@ static int mgslpc_write(struct tty_struct * tty, __FILE__,__LINE__,info->device_name,count); if (mgslpc_paranoia_check(info, tty->name, "mgslpc_write") || - !info->tx_buf) + !tty || !info->tx_buf) goto cleanup; if (info->params.mode == MGSL_MODE_HDLC) { @@ -2308,7 +2305,7 @@ static int mgslpc_ioctl(struct tty_struct *tty, struct file * file, return ioctl_common(info, cmd, arg); } -static int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg) +int ioctl_common(MGSLPC_INFO *info, unsigned int cmd, unsigned long arg) { int error; struct mgsl_icount cnow; /* kernel counter temps */ @@ -2880,7 +2877,7 @@ done: return ((count < begin+len-off) ? count : begin+len-off); } -static int rx_alloc_buffers(MGSLPC_INFO *info) +int rx_alloc_buffers(MGSLPC_INFO *info) { /* each buffer has header and data */ info->rx_buf_size = sizeof(RXBUF) + info->max_frame_size; @@ -2903,13 +2900,13 @@ static int rx_alloc_buffers(MGSLPC_INFO *info) return 0; } -static void rx_free_buffers(MGSLPC_INFO *info) +void rx_free_buffers(MGSLPC_INFO *info) { kfree(info->rx_buf); info->rx_buf = NULL; } -static int claim_resources(MGSLPC_INFO *info) +int claim_resources(MGSLPC_INFO *info) { if (rx_alloc_buffers(info) < 0 ) { printk( "Cant allocate rx buffer %s\n", info->device_name); @@ -2919,7 +2916,7 @@ static int claim_resources(MGSLPC_INFO *info) return 0; } -static void release_resources(MGSLPC_INFO *info) +void release_resources(MGSLPC_INFO *info) { if (debug_level >= DEBUG_LEVEL_INFO) printk("release_resources(%s)\n", info->device_name); @@ -2931,7 +2928,7 @@ static void release_resources(MGSLPC_INFO *info) * * Arguments: info pointer to device instance data */ -static void mgslpc_add_device(MGSLPC_INFO *info) +void mgslpc_add_device(MGSLPC_INFO *info) { info->next_device = NULL; info->line = mgslpc_device_count; @@ -2967,7 +2964,7 @@ static void mgslpc_add_device(MGSLPC_INFO *info) #endif } -static void mgslpc_remove_device(MGSLPC_INFO *remove_info) +void mgslpc_remove_device(MGSLPC_INFO *remove_info) { MGSLPC_INFO *info = mgslpc_device_list; MGSLPC_INFO *last = NULL; @@ -3260,7 +3257,7 @@ static void loopback_enable(MGSLPC_INFO *info) write_reg(info, CHA + MODE, val); } -static void hdlc_mode(MGSLPC_INFO *info) +void hdlc_mode(MGSLPC_INFO *info) { unsigned char val; unsigned char clkmode, clksubmode; @@ -3500,7 +3497,7 @@ static void hdlc_mode(MGSLPC_INFO *info) rx_stop(info); } -static void rx_stop(MGSLPC_INFO *info) +void rx_stop(MGSLPC_INFO *info) { if (debug_level >= DEBUG_LEVEL_ISR) printk("%s(%d):rx_stop(%s)\n", @@ -3513,7 +3510,7 @@ static void rx_stop(MGSLPC_INFO *info) info->rx_overflow = 0; } -static void rx_start(MGSLPC_INFO *info) +void rx_start(MGSLPC_INFO *info) { if (debug_level >= DEBUG_LEVEL_ISR) printk("%s(%d):rx_start(%s)\n", @@ -3529,7 +3526,7 @@ static void rx_start(MGSLPC_INFO *info) info->rx_enabled = 1; } -static void tx_start(MGSLPC_INFO *info) +void tx_start(MGSLPC_INFO *info) { if (debug_level >= DEBUG_LEVEL_ISR) printk("%s(%d):tx_start(%s)\n", @@ -3567,7 +3564,7 @@ static void tx_start(MGSLPC_INFO *info) info->tx_enabled = 1; } -static void tx_stop(MGSLPC_INFO *info) +void tx_stop(MGSLPC_INFO *info) { if (debug_level >= DEBUG_LEVEL_ISR) printk("%s(%d):tx_stop(%s)\n", @@ -3581,7 +3578,7 @@ static void tx_stop(MGSLPC_INFO *info) /* Reset the adapter to a known state and prepare it for further use. */ -static void reset_device(MGSLPC_INFO *info) +void reset_device(MGSLPC_INFO *info) { /* power up both channels (set BIT7) */ write_reg(info, CHA + CCR0, 0x80); @@ -3631,7 +3628,7 @@ static void reset_device(MGSLPC_INFO *info) write_reg(info, IPC, 0x05); } -static void async_mode(MGSLPC_INFO *info) +void async_mode(MGSLPC_INFO *info) { unsigned char val; @@ -3802,7 +3799,7 @@ static void async_mode(MGSLPC_INFO *info) /* Set the HDLC idle mode for the transmitter. */ -static void tx_set_idle(MGSLPC_INFO *info) +void tx_set_idle(MGSLPC_INFO *info) { /* Note: ESCC2 only supports flags and one idle modes */ if (info->idle_mode == HDLC_TXIDLE_FLAGS) @@ -3813,7 +3810,7 @@ static void tx_set_idle(MGSLPC_INFO *info) /* get state of the V24 status (input) signals. */ -static void get_signals(MGSLPC_INFO *info) +void get_signals(MGSLPC_INFO *info) { unsigned char status = 0; @@ -3835,7 +3832,7 @@ static void get_signals(MGSLPC_INFO *info) /* Set the state of DTR and RTS based on contents of * serial_signals member of device extension. */ -static void set_signals(MGSLPC_INFO *info) +void set_signals(MGSLPC_INFO *info) { unsigned char val; @@ -3859,7 +3856,7 @@ static void set_signals(MGSLPC_INFO *info) set_reg_bits(info, CHA + PVR, PVR_DTR); } -static void rx_reset_buffers(MGSLPC_INFO *info) +void rx_reset_buffers(MGSLPC_INFO *info) { RXBUF *buf; int i; @@ -3878,7 +3875,7 @@ static void rx_reset_buffers(MGSLPC_INFO *info) * * Returns 1 if frame returned, otherwise 0 */ -static int rx_get_frame(MGSLPC_INFO *info) +int rx_get_frame(MGSLPC_INFO *info) { unsigned short status; RXBUF *buf; @@ -3964,7 +3961,7 @@ static int rx_get_frame(MGSLPC_INFO *info) return 1; } -static BOOLEAN register_test(MGSLPC_INFO *info) +BOOLEAN register_test(MGSLPC_INFO *info) { static unsigned char patterns[] = { 0x00, 0xff, 0xaa, 0x55, 0x69, 0x96, 0x0f }; @@ -3990,7 +3987,7 @@ static BOOLEAN register_test(MGSLPC_INFO *info) return rc; } -static BOOLEAN irq_test(MGSLPC_INFO *info) +BOOLEAN irq_test(MGSLPC_INFO *info) { unsigned long end_time; unsigned long flags; @@ -4025,7 +4022,7 @@ static BOOLEAN irq_test(MGSLPC_INFO *info) return info->irq_occurred ? TRUE : FALSE; } -static int adapter_test(MGSLPC_INFO *info) +int adapter_test(MGSLPC_INFO *info) { if (!register_test(info)) { info->init_error = DiagStatus_AddressFailure; @@ -4047,7 +4044,7 @@ static int adapter_test(MGSLPC_INFO *info) return 0; } -static void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) +void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) { int i; int linecount; @@ -4082,7 +4079,7 @@ static void trace_block(MGSLPC_INFO *info,const char* data, int count, int xmit) /* HDLC frame time out * update stats and do tx completion processing */ -static void tx_timeout(unsigned long context) +void tx_timeout(unsigned long context) { MGSLPC_INFO *info = (MGSLPC_INFO*)context; unsigned long flags; @@ -4254,10 +4251,8 @@ static int hdlcdev_open(struct net_device *dev) spin_lock_irqsave(&info->lock, flags); get_signals(info); spin_unlock_irqrestore(&info->lock, flags); - if (info->serial_signals & SerialSignal_DCD) - netif_carrier_on(dev); - else - netif_carrier_off(dev); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + return 0; } diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index 520d2cf82..bee6c47b4 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -739,7 +740,7 @@ static unsigned int pp_poll (struct file * file, poll_table * wait) static struct class *ppdev_class; -static const struct file_operations pp_fops = { +static struct file_operations pp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = pp_read, @@ -769,7 +770,7 @@ static struct parport_driver pp_driver = { static int __init ppdev_init (void) { - int err = 0; + int i, err = 0; if (register_chrdev (PP_MAJOR, CHRDEV, &pp_fops)) { printk (KERN_WARNING CHRDEV ": unable to get major %d\n", @@ -781,6 +782,11 @@ static int __init ppdev_init (void) err = PTR_ERR(ppdev_class); goto out_chrdev; } + devfs_mk_dir("parports"); + for (i = 0; i < PARPORT_MAX; i++) { + devfs_mk_cdev(MKDEV(PP_MAJOR, i), + S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i); + } if (parport_register_driver(&pp_driver)) { printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); goto out_class; @@ -790,6 +796,9 @@ static int __init ppdev_init (void) goto out; out_class: + for (i = 0; i < PARPORT_MAX; i++) + devfs_remove("parports/%d", i); + devfs_remove("parports"); class_destroy(ppdev_class); out_chrdev: unregister_chrdev(PP_MAJOR, CHRDEV); @@ -799,8 +808,12 @@ out: static void __exit ppdev_cleanup (void) { + int i; /* Clean up all parport stuff */ + for (i = 0; i < PARPORT_MAX; i++) + devfs_remove("parports/%d", i); parport_unregister_driver(&pp_driver); + devfs_remove("parports"); class_destroy(ppdev_class); unregister_chrdev (PP_MAJOR, CHRDEV); } diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 34dd4c381..9b5a2c0e7 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -11,6 +11,7 @@ * */ +#include #include /* For EXPORT_SYMBOL */ #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include @@ -99,7 +101,7 @@ static void pty_unthrottle(struct tty_struct * tty) * * FIXME: Our pty_write method is called with our ldisc lock held but * not our partners. We can't just take the other one blindly without - * risking deadlocks. + * risking deadlocks. There is also the small matter of TTY_DONT_FLIP */ static int pty_write(struct tty_struct * tty, const unsigned char *buf, int count) { @@ -263,6 +265,7 @@ static void __init legacy_pty_init(void) pty_driver->owner = THIS_MODULE; pty_driver->driver_name = "pty_master"; pty_driver->name = "pty"; + pty_driver->devfs_name = "pty/m"; pty_driver->major = PTY_MASTER_MAJOR; pty_driver->minor_start = 0; pty_driver->type = TTY_DRIVER_TYPE_PTY; @@ -280,6 +283,7 @@ static void __init legacy_pty_init(void) pty_slave_driver->owner = THIS_MODULE; pty_slave_driver->driver_name = "pty_slave"; pty_slave_driver->name = "ttyp"; + pty_slave_driver->devfs_name = "pty/s"; pty_slave_driver->major = PTY_SLAVE_MAJOR; pty_slave_driver->minor_start = 0; pty_slave_driver->type = TTY_DRIVER_TYPE_PTY; @@ -347,6 +351,7 @@ static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, static void __init unix98_pty_init(void) { + devfs_mk_dir("pts"); ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); if (!ptm_driver) panic("Couldn't allocate Unix98 ptm driver"); @@ -367,7 +372,7 @@ static void __init unix98_pty_init(void) ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; ptm_driver->init_termios.c_lflag = 0; ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | - TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; + TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; ptm_driver->other = pts_driver; tty_set_operations(ptm_driver, &pty_ops); ptm_driver->ioctl = pty_unix98_ioctl; @@ -382,7 +387,7 @@ static void __init unix98_pty_init(void) pts_driver->init_termios = tty_std_termios; pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | - TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; + TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; pts_driver->other = ptm_driver; tty_set_operations(pts_driver, &pty_ops); diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c index 9d134e98d..601d09baf 100644 --- a/drivers/char/qtronix.c +++ b/drivers/char/qtronix.c @@ -33,6 +33,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include /* * NOTE: @@ -144,7 +145,7 @@ void __init init_qtronix_990P_kbd(void) cir_port_init(cir); retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler, - (unsigned long )(IRQF_DISABLED|IRQF_SHARED), + (unsigned long )(SA_INTERRUPT|SA_SHIRQ), (const char *)"Qtronix IR Keyboard", (void *)cir); if (retval) { diff --git a/drivers/char/random.c b/drivers/char/random.c index 2726a4151..074bf22f3 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -224,6 +224,7 @@ */ #include +#include #include #include #include @@ -416,7 +417,7 @@ static struct entropy_store input_pool = { .poolinfo = &poolinfo_table[0], .name = "input", .limit = 1, - .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = input_pool_data }; @@ -425,7 +426,7 @@ static struct entropy_store blocking_pool = { .name = "blocking", .limit = 1, .pull = &input_pool, - .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = blocking_pool_data }; @@ -433,7 +434,7 @@ static struct entropy_store nonblocking_pool = { .poolinfo = &poolinfo_table[1], .name = "nonblocking", .pull = &input_pool, - .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock), + .lock = SPIN_LOCK_UNLOCKED, .pool = nonblocking_pool_data }; diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 579868af4..15a7b4086 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,7 @@ struct raw_device_data { static struct class *raw_class; static struct raw_device_data raw_devices[MAX_RAW_MINORS]; static DEFINE_MUTEX(raw_mutex); -static const struct file_operations raw_ctl_fops; /* forward declaration */ +static struct file_operations raw_ctl_fops; /* forward declaration */ /* * Open/close code for raw IO. @@ -261,7 +262,7 @@ static ssize_t raw_file_aio_write(struct kiocb *iocb, const char __user *buf, } -static const struct file_operations raw_fops = { +static struct file_operations raw_fops = { .read = generic_file_read, .aio_read = generic_file_aio_read, .write = raw_file_write, @@ -274,7 +275,7 @@ static const struct file_operations raw_fops = { .owner = THIS_MODULE, }; -static const struct file_operations raw_ctl_fops = { +static struct file_operations raw_ctl_fops = { .ioctl = raw_ctl_ioctl, .open = raw_open, .owner = THIS_MODULE, @@ -287,6 +288,7 @@ static struct cdev raw_cdev = { static int __init raw_init(void) { + int i; dev_t dev = MKDEV(RAW_MAJOR, 0); if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw")) @@ -308,6 +310,13 @@ static int __init raw_init(void) } class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); + devfs_mk_cdev(MKDEV(RAW_MAJOR, 0), + S_IFCHR | S_IRUGO | S_IWUGO, + "raw/rawctl"); + for (i = 1; i < MAX_RAW_MINORS; i++) + devfs_mk_cdev(MKDEV(RAW_MAJOR, i), + S_IFCHR | S_IRUGO | S_IWUGO, + "raw/raw%d", i); return 0; error: @@ -317,6 +326,12 @@ error: static void __exit raw_exit(void) { + int i; + + for (i = 1; i < MAX_RAW_MINORS; i++) + devfs_remove("raw/raw%d", i); + devfs_remove("raw/rawctl"); + devfs_remove("raw"); class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); class_destroy(raw_class); cdev_del(&raw_cdev); diff --git a/drivers/char/rio/daemon.h b/drivers/char/rio/daemon.h index 6e63f8b2c..5818a8aa4 100644 --- a/drivers/char/rio/daemon.h +++ b/drivers/char/rio/daemon.h @@ -51,7 +51,7 @@ struct Error { }; struct DownLoad { - char __user *DataP; + char *DataP; unsigned int Count; unsigned int ProductCode; }; @@ -83,18 +83,18 @@ struct PortSetup { struct LpbReq { unsigned int Host; unsigned int Link; - struct LPB __user *LpbP; + struct LPB *LpbP; }; struct RupReq { unsigned int HostNum; unsigned int RupNum; - struct RUP __user *RupP; + struct RUP *RupP; }; struct PortReq { unsigned int SysPort; - struct Port __user *PortP; + struct Port *PortP; }; struct StreamInfo { @@ -105,12 +105,12 @@ struct StreamInfo { struct HostReq { unsigned int HostNum; - struct Host __user *HostP; + struct Host *HostP; }; struct HostDpRam { unsigned int HostNum; - struct DpRam __user *DpRamP; + struct DpRam *DpRamP; }; struct DebugCtrl { diff --git a/drivers/char/rio/func.h b/drivers/char/rio/func.h index 6b0391868..e64fe9912 100644 --- a/drivers/char/rio/func.h +++ b/drivers/char/rio/func.h @@ -46,7 +46,7 @@ int RIOBootCodeRTA(struct rio_info *, struct DownLoad *); int RIOBootCodeHOST(struct rio_info *, struct DownLoad *); int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *); void msec_timeout(struct Host *); -int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *); +int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); int RIOBootOk(struct rio_info *, struct Host *, unsigned long); int RIORtaBound(struct rio_info *, unsigned int); void rio_fill_host_slot(int, int, unsigned int, struct Host *); @@ -55,8 +55,8 @@ void rio_fill_host_slot(int, int, unsigned int, struct Host *); int RIOFoadRta(struct Host *, struct Map *); int RIOZombieRta(struct Host *, struct Map *); int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *)); -int RIOIdentifyRta(struct rio_info *, void __user *); -int RIOKillNeighbour(struct rio_info *, void __user *); +int RIOIdentifyRta(struct rio_info *, void *); +int RIOKillNeighbour(struct rio_info *, void *); int RIOSuspendBootRta(struct Host *, int, int); int RIOFoadWakeup(struct rio_info *); struct CmdBlk *RIOGetCmdBlk(void); @@ -68,8 +68,7 @@ int RIORFlushEnable(unsigned long, struct CmdBlk *); int RIOUnUse(unsigned long, struct CmdBlk *); /* rioctrl.c */ -int riocontrol(struct rio_info *, dev_t, int, unsigned long, int); - +int riocontrol(struct rio_info *, dev_t, int, caddr_t, int); int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char); /* rioinit.c */ @@ -78,13 +77,13 @@ void RIOInitHosts(struct rio_info *, struct RioHostInfo *); void RIOISAinit(struct rio_info *, int); int RIODoAT(struct rio_info *, int, int); caddr_t RIOCheckForATCard(int); -int RIOAssignAT(struct rio_info *, int, void __iomem *, int); -int RIOBoardTest(unsigned long, void __iomem *, unsigned char, int); +int RIOAssignAT(struct rio_info *, int, caddr_t, int); +int RIOBoardTest(unsigned long, caddr_t, unsigned char, int); void RIOAllocDataStructs(struct rio_info *); void RIOSetupDataStructs(struct rio_info *); int RIODefaultName(struct rio_info *, struct Host *, unsigned int); struct rioVersion *RIOVersid(void); -void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int); +void RIOHostReset(unsigned int, struct DpRam *, unsigned int); /* riointr.c */ void RIOTxEnable(char *); @@ -96,14 +95,14 @@ int RIOParam(struct Port *, int, int, int); int RIODelay(struct Port *PortP, int); int RIODelay_ni(struct Port *PortP, int); void ms_timeout(struct Port *); -int can_add_transmit(struct PKT __iomem **, struct Port *); +int can_add_transmit(struct PKT **, struct Port *); void add_transmit(struct Port *); -void put_free_end(struct Host *, struct PKT __iomem *); -int can_remove_receive(struct PKT __iomem **, struct Port *); +void put_free_end(struct Host *, struct PKT *); +int can_remove_receive(struct PKT **, struct Port *); void remove_receive(struct Port *); /* rioroute.c */ -int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *); +int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int); unsigned int GetUnitType(unsigned int); int RIOSetChange(struct rio_info *); @@ -140,7 +139,7 @@ int rio_isr_thread(char *); struct rio_info *rio_info_store(int cmd, struct rio_info *p); #endif -extern void rio_copy_to_card(void *from, void __iomem *to, int len); +extern void rio_copy_to_card(void *to, void *from, int len); extern int rio_minor(struct tty_struct *tty); extern int rio_ismodem(struct tty_struct *tty); diff --git a/drivers/char/rio/host.h b/drivers/char/rio/host.h index ee2ddea7a..179cdbea7 100644 --- a/drivers/char/rio/host.h +++ b/drivers/char/rio/host.h @@ -48,8 +48,8 @@ struct Host { unsigned char Ivec; /* POLLED or ivec number */ unsigned char Mode; /* Control stuff */ unsigned char Slot; /* Slot */ - void __iomem *Caddr; /* KV address of DPRAM */ - struct DpRam __iomem *CardP; /* KV address of DPRAM, with overlay */ + caddr_t Caddr; /* KV address of DPRAM */ + struct DpRam *CardP; /* KV address of DPRAM, with overlay */ unsigned long PaddrP; /* Phys. address of DPRAM */ char Name[MAX_NAME_LEN]; /* The name of the host */ unsigned int UniqueNum; /* host unique number */ @@ -57,7 +57,7 @@ struct Host { unsigned int WorkToBeDone; /* set to true each interrupt */ unsigned int InIntr; /* Being serviced? */ unsigned int IntSrvDone; /* host's interrupt has been serviced */ - void (*Copy) (void *, void __iomem *, int); /* copy func */ + void (*Copy) (void *, void *, int); /* copy func */ struct timer_list timer; /* ** I M P O R T A N T ! @@ -83,11 +83,11 @@ struct Host { struct Top Topology[LINKS_PER_UNIT]; /* one per link */ struct Map Mapping[MAX_RUP]; /* Mappings for host */ - struct PHB __iomem *PhbP; /* Pointer to the PHB array */ - unsigned short __iomem *PhbNumP; /* Ptr to Number of PHB's */ - struct LPB __iomem *LinkStrP; /* Link Structure Array */ - struct RUP __iomem *RupP; /* Sixteen real rups here */ - struct PARM_MAP __iomem *ParmMapP; /* points to the parmmap */ + struct PHB *PhbP; /* Pointer to the PHB array */ + unsigned short *PhbNumP; /* Ptr to Number of PHB's */ + struct LPB *LinkStrP; /* Link Structure Array */ + struct RUP *RupP; /* Sixteen real rups here */ + struct PARM_MAP *ParmMapP; /* points to the parmmap */ unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */ unsigned int NumExtraBooted; /* how many of the above */ /* diff --git a/drivers/char/rio/port.h b/drivers/char/rio/port.h index 49cf6d15e..9b5fa3eb0 100644 --- a/drivers/char/rio/port.h +++ b/drivers/char/rio/port.h @@ -40,7 +40,7 @@ struct Port { struct gs_port gs; int PortNum; /* RIO port no., 0-511 */ struct Host *HostP; - void __iomem *Caddr; + caddr_t Caddr; unsigned short HostPort; /* Port number on host card */ unsigned char RupNum; /* Number of RUP for port */ unsigned char ID2; /* Second ID of RTA for port */ @@ -92,13 +92,13 @@ struct Port { #define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */ - struct PHB __iomem *PhbP; /* pointer to PHB for port */ - u16 __iomem *TxAdd; /* Add packets here */ - u16 __iomem *TxStart; /* Start of add array */ - u16 __iomem *TxEnd; /* End of add array */ - u16 __iomem *RxRemove; /* Remove packets here */ - u16 __iomem *RxStart; /* Start of remove array */ - u16 __iomem *RxEnd; /* End of remove array */ + struct PHB *PhbP; /* pointer to PHB for port */ + u16 *TxAdd; /* Add packets here */ + u16 *TxStart; /* Start of add array */ + u16 *TxEnd; /* End of add array */ + u16 *RxRemove; /* Remove packets here */ + u16 *RxStart; /* Start of remove array */ + u16 *RxEnd; /* End of remove array */ unsigned int RtaUniqueNum; /* Unique number of RTA */ unsigned short PortState; /* status of port */ unsigned short ModemState; /* status of modem lines */ diff --git a/drivers/char/rio/rio.h b/drivers/char/rio/rio.h index 1bf36223a..b4c91871b 100644 --- a/drivers/char/rio/rio.h +++ b/drivers/char/rio/rio.h @@ -129,8 +129,8 @@ ** RIO_OBJ takes hostp->Caddr and a UNIX pointer to an object and ** returns the offset into the DP RAM area. */ -#define RIO_PTR(C,O) (((unsigned char __iomem *)(C))+(0xFFFF&(O))) -#define RIO_OFF(C,O) ((unsigned char __iomem *)(O)-(unsigned char __iomem *)(C)) +#define RIO_PTR(C,O) (((unsigned char *)(C))+(0xFFFF&(O))) +#define RIO_OFF(C,O) ((long)(O)-(long)(C)) /* ** How to convert from various different device number formats: diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 3fa80aaf4..78dd85653 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c @@ -33,6 +33,7 @@ * */ #include +#include #include #include #include @@ -243,7 +244,7 @@ static struct real_driver rio_real_driver = { * */ -static const struct file_operations rio_fw_fops = { +static struct file_operations rio_fw_fops = { .owner = THIS_MODULE, .ioctl = rio_fw_ioctl, }; @@ -332,9 +333,9 @@ int RIODelay_ni(struct Port *PortP, int njiffies) return !RIO_FAIL; } -void rio_copy_to_card(void *from, void __iomem *to, int len) +void rio_copy_to_card(void *to, void *from, int len) { - rio_copy_toio(to, from, len); + rio_memcpy_toio(NULL, to, from, len); } int rio_minor(struct tty_struct *tty) @@ -572,7 +573,7 @@ static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd func_enter(); /* The "dev" argument isn't used. */ - rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN)); + rc = riocontrol(p, 0, cmd, (void *) arg, capable(CAP_SYS_ADMIN)); func_exit(); return rc; @@ -582,7 +583,6 @@ extern int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) { - void __user *argp = (void __user *)arg; int rc; struct Port *PortP; int ival; @@ -594,14 +594,14 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd rc = 0; switch (cmd) { case TIOCSSOFTCAR: - if ((rc = get_user(ival, (unsigned __user *) argp)) == 0) { + if ((rc = get_user(ival, (unsigned int *) arg)) == 0) { tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0); } break; case TIOCGSERIAL: rc = -EFAULT; - if (access_ok(VERIFY_WRITE, argp, sizeof(struct serial_struct))) - rc = gs_getserial(&PortP->gs, argp); + if (access_ok(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) + rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg); break; case TCSBRK: if (PortP->State & RIO_DELETED) { @@ -631,8 +631,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd break; case TIOCSSERIAL: rc = -EFAULT; - if (access_ok(VERIFY_READ, argp, sizeof(struct serial_struct))) - rc = gs_setserial(&PortP->gs, argp); + if (access_ok(VERIFY_READ, (void *) arg, sizeof(struct serial_struct))) + rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg); break; default: rc = -ENOIOCTLCMD; @@ -919,7 +919,7 @@ static void __exit rio_release_drivers(void) static void fix_rio_pci(struct pci_dev *pdev) { unsigned long hwbase; - unsigned char __iomem *rebase; + unsigned char *rebase; unsigned int t; #define CNTRL_REG_OFFSET 0x50 @@ -999,7 +999,7 @@ static int __init rio_init(void) if (((1 << hp->Ivec) & rio_irqmask) == 0) hp->Ivec = 0; hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); - hp->CardP = (struct DpRam __iomem *) hp->Caddr; + hp->CardP = (struct DpRam *) hp->Caddr; hp->Type = RIO_PCI; hp->Copy = rio_copy_to_card; hp->Mode = RIO_PCI_BOOT_FROM_RAM; @@ -1021,7 +1021,7 @@ static int __init rio_init(void) p->RIONumHosts++; found++; } else { - iounmap(p->RIOHosts[p->RIONumHosts].Caddr); + iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); } } @@ -1047,7 +1047,7 @@ static int __init rio_init(void) hp->Ivec = 0; hp->Ivec |= 0x8000; /* Mark as non-sharable */ hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); - hp->CardP = (struct DpRam __iomem *) hp->Caddr; + hp->CardP = (struct DpRam *) hp->Caddr; hp->Type = RIO_PCI; hp->Copy = rio_copy_to_card; hp->Mode = RIO_PCI_BOOT_FROM_RAM; @@ -1070,7 +1070,7 @@ static int __init rio_init(void) p->RIONumHosts++; found++; } else { - iounmap(p->RIOHosts[p->RIONumHosts].Caddr); + iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); } #else printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); @@ -1085,7 +1085,7 @@ static int __init rio_init(void) /* There was something about the IRQs of these cards. 'Forget what.--REW */ hp->Ivec = 0; hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); - hp->CardP = (struct DpRam __iomem *) hp->Caddr; + hp->CardP = (struct DpRam *) hp->Caddr; hp->Type = RIO_AT; hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL * -- YES! this is now a normal copy. Only the @@ -1111,7 +1111,7 @@ static int __init rio_init(void) } if (!okboard) - iounmap(hp->Caddr); + iounmap((char *) (hp->Caddr)); } } @@ -1119,7 +1119,7 @@ static int __init rio_init(void) for (i = 0; i < p->RIONumHosts; i++) { hp = &p->RIOHosts[i]; if (hp->Ivec) { - int mode = IRQF_SHARED; + int mode = SA_SHIRQ; if (hp->Ivec & 0x8000) { mode = 0; hp->Ivec &= 0x7fff; diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h index dc3f00561..4ce77fb1f 100644 --- a/drivers/char/rio/rio_linux.h +++ b/drivers/char/rio/rio_linux.h @@ -23,6 +23,7 @@ * Version 1.0 -- July, 1999. * */ +#include #define RIO_NBOARDS 4 #define RIO_PORTSPERBOARD 128 @@ -130,9 +131,9 @@ struct vpd_prom { #ifdef CONFIG_RIO_OLDPCI -static inline void __iomem *rio_memcpy_toio(void __iomem *dummy, void __iomem *dest, void *source, int n) +static inline void *rio_memcpy_toio(void *dummy, void *dest, void *source, int n) { - char __iomem *dst = dest; + char *dst = dest; char *src = source; while (n--) { @@ -143,22 +144,11 @@ static inline void __iomem *rio_memcpy_toio(void __iomem *dummy, void __iomem *d return dest; } -static inline void __iomem *rio_copy_toio(void __iomem *dest, void *source, int n) -{ - char __iomem *dst = dest; - char *src = source; - - while (n--) - writeb(*src++, dst++); - return dest; -} - - -static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n) +static inline void *rio_memcpy_fromio(void *dest, void *source, int n) { char *dst = dest; - char __iomem *src = source; + char *src = source; while (n--) *dst++ = readb(src++); @@ -168,7 +158,6 @@ static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n) #else #define rio_memcpy_toio(dummy,dest,source,n) memcpy_toio(dest, source, n) -#define rio_copy_toio memcpy_toio #define rio_memcpy_fromio memcpy_fromio #endif diff --git a/drivers/char/rio/rioboot.c b/drivers/char/rio/rioboot.c index eca2b9534..290143add 100644 --- a/drivers/char/rio/rioboot.c +++ b/drivers/char/rio/rioboot.c @@ -71,7 +71,7 @@ #include "cmdblk.h" #include "route.h" -static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP); +static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd *PktCmdP); static const unsigned char RIOAtVec2Ctrl[] = { /* 0 */ INTERRUPT_DISABLE, @@ -204,13 +204,13 @@ void rio_start_card_running(struct Host *HostP) int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) { struct Host *HostP; - u8 __iomem *Cad; - PARM_MAP __iomem *ParmMapP; + u8 *Cad; + PARM_MAP *ParmMapP; int RupN; int PortN; unsigned int host; - u8 __iomem *StartP; - u8 __iomem *DestP; + u8 *StartP; + u8 *DestP; int wait_count; u16 OldParmMap; u16 offset; /* It is very important that this is a u16 */ @@ -262,7 +262,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ** Ensure that the host really is stopped. ** Disable it's external bus & twang its reset line. */ - RIOHostReset(HostP->Type, HostP->CardP, HostP->Slot); + RIOHostReset(HostP->Type, (struct DpRam *) HostP->CardP, HostP->Slot); /* ** Copy the data directly from user space to the SRAM. @@ -280,7 +280,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) func_exit(); return -ENOMEM; } - if (copy_from_user(DownCode, rbp->DataP, rbp->Count)) { + if (copy_from_user(rbp->DataP, DownCode, rbp->Count)) { kfree(DownCode); p->RIOError.Error = COPYIN_FAILED; func_exit(); @@ -366,7 +366,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ** a short branch to 0x7FF8, where a long branch is coded. */ - DestP = &Cad[0x7FF8]; /* <<<---- READ THE ABOVE COMMENTS */ + DestP = (u8 *) &Cad[0x7FF8]; /* <<<---- READ THE ABOVE COMMENTS */ #define NFIX(N) (0x60 | (N)) /* .O = (~(.O + N))<<4 */ #define PFIX(N) (0x20 | (N)) /* .O = (.O + N)<<4 */ @@ -438,7 +438,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n"); HostP->Flags &= ~RUN_STATE; HostP->Flags |= RC_STUFFED; - RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot ); + RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); continue; } @@ -453,9 +453,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) /* ** Grab a 32 bit pointer to the parmmap structure */ - ParmMapP = (PARM_MAP __iomem *) RIO_PTR(Cad, readw(&HostP->__ParmMapR)); + ParmMapP = (PARM_MAP *) RIO_PTR(Cad, readw(&HostP->__ParmMapR)); rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP); - ParmMapP = (PARM_MAP __iomem *)(Cad + readw(&HostP->__ParmMapR)); + ParmMapP = (PARM_MAP *) ((unsigned long) Cad + readw(&HostP->__ParmMapR)); rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP); /* @@ -468,7 +468,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) rio_dprintk(RIO_DEBUG_BOOT, "Links = 0x%x\n", readw(&ParmMapP->links)); HostP->Flags &= ~RUN_STATE; HostP->Flags |= RC_STUFFED; - RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot ); + RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); continue; } @@ -491,7 +491,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) rio_dprintk(RIO_DEBUG_BOOT, "Timedout waiting for init_done\n"); HostP->Flags &= ~RUN_STATE; HostP->Flags |= RC_STUFFED; - RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot ); + RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); continue; } @@ -512,10 +512,10 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ** 32 bit pointers for the driver in ioremap space. */ HostP->ParmMapP = ParmMapP; - HostP->PhbP = (struct PHB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_ptr)); - HostP->RupP = (struct RUP __iomem *) RIO_PTR(Cad, readw(&ParmMapP->rups)); - HostP->PhbNumP = (unsigned short __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_num_ptr)); - HostP->LinkStrP = (struct LPB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->link_str_ptr)); + HostP->PhbP = (struct PHB *) RIO_PTR(Cad, readw(&ParmMapP->phb_ptr)); + HostP->RupP = (struct RUP *) RIO_PTR(Cad, readw(&ParmMapP->rups)); + HostP->PhbNumP = (unsigned short *) RIO_PTR(Cad, readw(&ParmMapP->phb_num_ptr)); + HostP->LinkStrP = (struct LPB *) RIO_PTR(Cad, readw(&ParmMapP->link_str_ptr)); /* ** point the UnixRups at the real Rups @@ -540,7 +540,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) for (PortN = p->RIOFirstPortsMapped; PortN < p->RIOLastPortsMapped + PORTS_PER_RTA; PortN++) { if (p->RIOPortp[PortN]->HostP == HostP) { struct Port *PortP = p->RIOPortp[PortN]; - struct PHB __iomem *PhbP; + struct PHB *PhbP; /* int oldspl; */ if (!PortP->Mapped) @@ -551,12 +551,12 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) PortP->PhbP = PhbP; - PortP->TxAdd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_add)); - PortP->TxStart = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_start)); - PortP->TxEnd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_end)); - PortP->RxRemove = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_remove)); - PortP->RxStart = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_start)); - PortP->RxEnd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_end)); + PortP->TxAdd = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_add)); + PortP->TxStart = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_start)); + PortP->TxEnd = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_end)); + PortP->RxRemove = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_remove)); + PortP->RxStart = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_start)); + PortP->RxEnd = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_end)); rio_spin_unlock_irqrestore(&PortP->portSem, flags); /* @@ -601,9 +601,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) * return 1. If we havent, then return 0. */ -int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT __iomem *PacketP) +int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT *PacketP) { - struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *) PacketP->data; + struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct PktCmd_M *PktReplyP; struct CmdBlk *CmdBlkP; unsigned int sequence; @@ -722,7 +722,7 @@ int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct * RtaUniq is the booted RTA. */ -static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP) +static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd *PktCmdP) { struct Map *MapP = NULL; struct Map *MapP2 = NULL; diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index 4df6ab220..e6d2b14b5 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c @@ -180,7 +180,7 @@ int RIOCommandRta(struct rio_info *p, unsigned long RtaUnique, int (*func) (stru } -int RIOIdentifyRta(struct rio_info *p, void __user * arg) +int RIOIdentifyRta(struct rio_info *p, void * arg) { unsigned int Host; @@ -245,7 +245,7 @@ int RIOIdentifyRta(struct rio_info *p, void __user * arg) } -int RIOKillNeighbour(struct rio_info *p, void __user * arg) +int RIOKillNeighbour(struct rio_info *p, void * arg) { uint Host; uint ID; @@ -370,9 +370,9 @@ int RIOFoadWakeup(struct rio_info *p) /* ** Incoming command on the COMMAND_RUP to be processed. */ -static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT __iomem *PacketP) +static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT * PacketP) { - struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *)PacketP->data; + struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct Port *PortP; struct UnixRup *UnixRupP; unsigned short SysPort; @@ -407,12 +407,12 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc } else rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n", ('A' + Rup - MAX_RUP), HostP->Name); - rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Destination 0x%x:0x%x\n", readb(&PacketP->dest_unit), readb(&PacketP->dest_port)); - rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Source 0x%x:0x%x\n", readb(&PacketP->src_unit), readb(&PacketP->src_port)); - rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", readb(&PacketP->len), readb(&PacketP->len)); - rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", readb(&PacketP->control), readb(&PacketP->control)); - rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", readw(&PacketP->csum), readw(&PacketP->csum)); - rio_dprintk(RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, " "Command Code 0x%x\n", readb(&PktCmdP->PhbNum), readb(&PktCmdP->Command)); + rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Destination 0x%x:0x%x\n", PacketP->dest_unit, PacketP->dest_port); + rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Source 0x%x:0x%x\n", PacketP->src_unit, PacketP->src_port); + rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", PacketP->len, PacketP->len); + rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", PacketP->control, PacketP->control); + rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", PacketP->csum, PacketP->csum); + rio_dprintk(RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, " "Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command); return 1; } PortP = p->RIOPortp[SysPort]; @@ -601,7 +601,7 @@ int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP) /* ** Whammy! blat that pack! */ - HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT)); + HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); /* ** place command packet on the pending position. @@ -655,7 +655,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) { struct CmdBlk *CmdBlkP; struct UnixRup *UnixRupP; - struct PKT __iomem *PacketP; + struct PKT *PacketP; unsigned short Rup; unsigned long flags; @@ -676,7 +676,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) if (readw(&UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE) { int FreeMe; - PacketP = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt)); + PacketP = (struct PKT *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt)); switch (readb(&PacketP->dest_port)) { case BOOT_RUP: @@ -694,9 +694,9 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) */ rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); - if (readb(&PacketP->data[5]) == MEMDUMP) { - rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6]))); - rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32); + if (PacketP->data[5] == MEMDUMP) { + rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", *(unsigned short *) & (PacketP->data[6])); + HostP->Copy((caddr_t) & (PacketP->data[8]), (caddr_t) p->RIOMemDump, 32); } rio_spin_lock_irqsave(&UnixRupP->RupLock, flags); break; @@ -782,7 +782,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) /* ** Whammy! blat that pack! */ - HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT)); + HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); /* ** remove the command from the rup command queue... @@ -824,7 +824,7 @@ int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP) int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP) { struct Port *PortP = (struct Port *) iPortP; - struct PKT __iomem *PacketP; + struct PKT *PacketP; unsigned long flags; rio_spin_lock_irqsave(&PortP->portSem, flags); diff --git a/drivers/char/rio/rioctrl.c b/drivers/char/rio/rioctrl.c index 052e8120a..75b2557c3 100644 --- a/drivers/char/rio/rioctrl.c +++ b/drivers/char/rio/rioctrl.c @@ -80,7 +80,7 @@ static char *_rioctrl_c_sccs_ = "@(#)rioctrl.c 1.3"; static struct LpbReq LpbReq; static struct RupReq RupReq; static struct PortReq PortReq; -static struct HostReq HostReq; /* oh really? global? and no locking? */ +static struct HostReq HostReq; static struct HostDpRam HostDpRam; static struct DebugCtrl DebugCtrl; static struct Map MapEnt; @@ -126,19 +126,12 @@ static int #define drv_makedev(maj, min) ((((uint) maj & 0xff) << 8) | ((uint) min & 0xff)) -static int copy_from_io(void __user *to, void __iomem *from, size_t size) -{ - void *buf = kmalloc(size, GFP_KERNEL); - int res = -ENOMEM; - if (buf) { - rio_memcpy_fromio(buf, from, size); - res = copy_to_user(to, buf, size); - kfree(buf); - } - return res; -} - -int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su) +int riocontrol(p, dev, cmd, arg, su) +struct rio_info *p; +dev_t dev; +int cmd; +caddr_t arg; +int su; { uint Host; /* leave me unsigned! */ uint port; /* and me! */ @@ -146,10 +139,9 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ushort loop; int Entry; struct Port *PortP; - struct PKT __iomem *PacketP; + struct PKT *PacketP; int retval = 0; unsigned long flags; - void __user *argp = (void __user *)arg; func_enter(); @@ -157,7 +149,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su Host = 0; PortP = NULL; - rio_dprintk(RIO_DEBUG_CTRL, "control ioctl cmd: 0x%x arg: %p\n", cmd, argp); + rio_dprintk(RIO_DEBUG_CTRL, "control ioctl cmd: 0x%x arg: %p\n", cmd, arg); switch (cmd) { /* @@ -168,11 +160,11 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** otherwise just the specified host card will be changed. */ case RIO_SET_TIMER: - rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET_TIMER to %ldms\n", arg); + rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET_TIMER to %ldms\n", (unsigned long)arg); { int host, value; - host = (arg >> 16) & 0x0000FFFF; - value = arg & 0x0000ffff; + host = ((unsigned long) arg >> 16) & 0x0000FFFF; + value = (unsigned long) arg & 0x0000ffff; if (host == -1) { for (host = 0; host < p->RIONumHosts; host++) { if (p->RIOHosts[host].Flags == RC_RUNNING) { @@ -191,26 +183,26 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_FOAD_RTA: rio_dprintk(RIO_DEBUG_CTRL, "RIO_FOAD_RTA\n"); - return RIOCommandRta(p, arg, RIOFoadRta); + return RIOCommandRta(p, (unsigned long)arg, RIOFoadRta); case RIO_ZOMBIE_RTA: rio_dprintk(RIO_DEBUG_CTRL, "RIO_ZOMBIE_RTA\n"); - return RIOCommandRta(p, arg, RIOZombieRta); + return RIOCommandRta(p, (unsigned long)arg, RIOZombieRta); case RIO_IDENTIFY_RTA: rio_dprintk(RIO_DEBUG_CTRL, "RIO_IDENTIFY_RTA\n"); - return RIOIdentifyRta(p, argp); + return RIOIdentifyRta(p, arg); case RIO_KILL_NEIGHBOUR: rio_dprintk(RIO_DEBUG_CTRL, "RIO_KILL_NEIGHBOUR\n"); - return RIOKillNeighbour(p, argp); + return RIOKillNeighbour(p, arg); case SPECIAL_RUP_CMD: { struct CmdBlk *CmdBlkP; rio_dprintk(RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD\n"); - if (copy_from_user(&SpecialRupCmd, argp, sizeof(SpecialRupCmd))) { + if (copy_from_user(&SpecialRupCmd, arg, sizeof(SpecialRupCmd))) { rio_dprintk(RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD copy failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -247,7 +239,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su if ((retval = RIOApel(p)) != 0) return retval; - if (copy_to_user(argp, p->RIOConnectTable, TOTAL_MAP_ENTRIES * sizeof(struct Map))) { + if (copy_to_user(arg, p->RIOConnectTable, TOTAL_MAP_ENTRIES * sizeof(struct Map))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_GET_TABLE copy failed\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -292,7 +284,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&p->RIOConnectTable[0], argp, TOTAL_MAP_ENTRIES * sizeof(struct Map))) { + if (copy_from_user(&p->RIOConnectTable[0], arg, TOTAL_MAP_ENTRIES * sizeof(struct Map))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_PUT_TABLE copy failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -338,7 +330,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_to_user(argp, p->RIOBindTab, (sizeof(ulong) * MAX_RTA_BINDINGS))) { + if (copy_to_user(arg, p->RIOBindTab, (sizeof(ulong) * MAX_RTA_BINDINGS))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_GET_BINDINGS copy failed\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -357,7 +349,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&p->RIOBindTab[0], argp, (sizeof(ulong) * MAX_RTA_BINDINGS))) { + if (copy_from_user(&p->RIOBindTab[0], arg, (sizeof(ulong) * MAX_RTA_BINDINGS))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS copy failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -381,12 +373,12 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su for (Entry = 0; Entry < MAX_RTA_BINDINGS; Entry++) { if ((EmptySlot == -1) && (p->RIOBindTab[Entry] == 0L)) EmptySlot = Entry; - else if (p->RIOBindTab[Entry] == arg) { + else if (p->RIOBindTab[Entry] == (long)arg) { /* ** Already exists - delete */ p->RIOBindTab[Entry] = 0L; - rio_dprintk(RIO_DEBUG_CTRL, "Removing Rta %ld from p->RIOBindTab\n", arg); + rio_dprintk(RIO_DEBUG_CTRL, "Removing Rta %ld from p->RIOBindTab\n", (unsigned long)arg); return 0; } } @@ -394,10 +386,10 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** Dosen't exist - add */ if (EmptySlot != -1) { - p->RIOBindTab[EmptySlot] = arg; - rio_dprintk(RIO_DEBUG_CTRL, "Adding Rta %lx to p->RIOBindTab\n", arg); + p->RIOBindTab[EmptySlot] = (unsigned long)arg; + rio_dprintk(RIO_DEBUG_CTRL, "Adding Rta %lx to p->RIOBindTab\n", (unsigned long) arg); } else { - rio_dprintk(RIO_DEBUG_CTRL, "p->RIOBindTab full! - Rta %lx not added\n", arg); + rio_dprintk(RIO_DEBUG_CTRL, "p->RIOBindTab full! - Rta %lx not added\n", (unsigned long) arg); return -ENOMEM; } return 0; @@ -405,7 +397,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_RESUME: rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME\n"); - port = arg; + port = (unsigned long) arg; if ((port < 0) || (port > 511)) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME: Bad port number %d\n", port); p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE; @@ -441,7 +433,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&MapEnt, argp, sizeof(MapEnt))) { + if (copy_from_user(&MapEnt, arg, sizeof(MapEnt))) { rio_dprintk(RIO_DEBUG_CTRL, "Copy from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -455,7 +447,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&MapEnt, argp, sizeof(MapEnt))) { + if (copy_from_user(&MapEnt, arg, sizeof(MapEnt))) { rio_dprintk(RIO_DEBUG_CTRL, "Copy from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -469,7 +461,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&MapEnt, argp, sizeof(MapEnt))) { + if (copy_from_user(&MapEnt, arg, sizeof(MapEnt))) { rio_dprintk(RIO_DEBUG_CTRL, "Copy from data space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -477,14 +469,14 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su return RIODeleteRta(p, &MapEnt); case RIO_QUICK_CHECK: - if (copy_to_user(argp, &p->RIORtaDisCons, sizeof(unsigned int))) { + if (copy_to_user(arg, &p->RIORtaDisCons, sizeof(unsigned int))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } return 0; case RIO_LAST_ERROR: - if (copy_to_user(argp, &p->RIOError, sizeof(struct Error))) + if (copy_to_user(arg, &p->RIOError, sizeof(struct Error))) return -EFAULT; return 0; @@ -493,7 +485,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su return -EINVAL; case RIO_GET_MODTYPE: - if (copy_from_user(&port, argp, sizeof(unsigned int))) { + if (copy_from_user(&port, arg, sizeof(unsigned int))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -513,7 +505,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** Return module type of port */ port = PortP->HostP->UnixRups[PortP->RupNum].ModTypes; - if (copy_to_user(argp, &port, sizeof(unsigned int))) { + if (copy_to_user(arg, &port, sizeof(unsigned int))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } @@ -529,7 +521,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_SETUP_PORTS: rio_dprintk(RIO_DEBUG_CTRL, "Setup ports\n"); - if (copy_from_user(&PortSetup, argp, sizeof(PortSetup))) { + if (copy_from_user(&PortSetup, arg, sizeof(PortSetup))) { p->RIOError.Error = COPYIN_FAILED; rio_dprintk(RIO_DEBUG_CTRL, "EFAULT"); return -EFAULT; @@ -559,7 +551,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_GET_PORT_SETUP: rio_dprintk(RIO_DEBUG_CTRL, "Get port setup\n"); - if (copy_from_user(&PortSetup, argp, sizeof(PortSetup))) { + if (copy_from_user(&PortSetup, arg, sizeof(PortSetup))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -580,7 +572,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su PortSetup.XpOn[MAX_XP_CTRL_LEN - 1] = '\0'; PortSetup.XpOff[MAX_XP_CTRL_LEN - 1] = '\0'; - if (copy_to_user(argp, &PortSetup, sizeof(PortSetup))) { + if (copy_to_user(arg, &PortSetup, sizeof(PortSetup))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } @@ -588,7 +580,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_GET_PORT_PARAMS: rio_dprintk(RIO_DEBUG_CTRL, "Get port params\n"); - if (copy_from_user(&PortParams, argp, sizeof(struct PortParams))) { + if (copy_from_user(&PortParams, arg, sizeof(struct PortParams))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -601,7 +593,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su PortParams.State = PortP->State; rio_dprintk(RIO_DEBUG_CTRL, "Port %d\n", PortParams.Port); - if (copy_to_user(argp, &PortParams, sizeof(struct PortParams))) { + if (copy_to_user(arg, &PortParams, sizeof(struct PortParams))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } @@ -609,7 +601,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_GET_PORT_TTY: rio_dprintk(RIO_DEBUG_CTRL, "Get port tty\n"); - if (copy_from_user(&PortTty, argp, sizeof(struct PortTty))) { + if (copy_from_user(&PortTty, arg, sizeof(struct PortTty))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -620,14 +612,14 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su rio_dprintk(RIO_DEBUG_CTRL, "Port %d\n", PortTty.port); PortP = (p->RIOPortp[PortTty.port]); - if (copy_to_user(argp, &PortTty, sizeof(struct PortTty))) { + if (copy_to_user(arg, &PortTty, sizeof(struct PortTty))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } return retval; case RIO_SET_PORT_TTY: - if (copy_from_user(&PortTty, argp, sizeof(struct PortTty))) { + if (copy_from_user(&PortTty, arg, sizeof(struct PortTty))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -642,7 +634,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_SET_PORT_PARAMS: rio_dprintk(RIO_DEBUG_CTRL, "Set port params\n"); - if (copy_from_user(&PortParams, argp, sizeof(PortParams))) { + if (copy_from_user(&PortParams, arg, sizeof(PortParams))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -658,7 +650,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_GET_PORT_STATS: rio_dprintk(RIO_DEBUG_CTRL, "RIO_GET_PORT_STATS\n"); - if (copy_from_user(&portStats, argp, sizeof(struct portStats))) { + if (copy_from_user(&portStats, arg, sizeof(struct portStats))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -673,14 +665,14 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su portStats.opens = PortP->opens; portStats.closes = PortP->closes; portStats.ioctls = PortP->ioctls; - if (copy_to_user(argp, &portStats, sizeof(struct portStats))) { + if (copy_to_user(arg, &portStats, sizeof(struct portStats))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } return retval; case RIO_RESET_PORT_STATS: - port = arg; + port = (unsigned long) arg; rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESET_PORT_STATS\n"); if (port >= RIO_PORTS) { p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE; @@ -698,7 +690,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_GATHER_PORT_STATS: rio_dprintk(RIO_DEBUG_CTRL, "RIO_GATHER_PORT_STATS\n"); - if (copy_from_user(&portStats, argp, sizeof(struct portStats))) { + if (copy_from_user(&portStats, arg, sizeof(struct portStats))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -714,7 +706,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_READ_CONFIG: rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_CONFIG\n"); - if (copy_to_user(argp, &p->RIOConf, sizeof(struct Conf))) { + if (copy_to_user(arg, &p->RIOConf, sizeof(struct Conf))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } @@ -726,7 +718,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&p->RIOConf, argp, sizeof(struct Conf))) { + if (copy_from_user(&p->RIOConf, arg, sizeof(struct Conf))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -754,7 +746,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_SETDEBUG: case RIO_GETDEBUG: rio_dprintk(RIO_DEBUG_CTRL, "RIO_SETDEBUG/RIO_GETDEBUG\n"); - if (copy_from_user(&DebugCtrl, argp, sizeof(DebugCtrl))) { + if (copy_from_user(&DebugCtrl, arg, sizeof(DebugCtrl))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -771,7 +763,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su rio_dprintk(RIO_DEBUG_CTRL, "Get global debug 0x%x wait 0x%x\n", p->rio_debug, p->RIODebugWait); DebugCtrl.Debug = p->rio_debug; DebugCtrl.Wait = p->RIODebugWait; - if (copy_to_user(argp, &DebugCtrl, sizeof(DebugCtrl))) { + if (copy_to_user(arg, &DebugCtrl, sizeof(DebugCtrl))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET/GET DEBUG: bad port number %d\n", DebugCtrl.SysPort); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -793,7 +785,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su } else { rio_dprintk(RIO_DEBUG_CTRL, "RIO_GETDEBUG 0x%x\n", p->RIOPortp[DebugCtrl.SysPort]->Debug); DebugCtrl.Debug = p->RIOPortp[DebugCtrl.SysPort]->Debug; - if (copy_to_user(argp, &DebugCtrl, sizeof(DebugCtrl))) { + if (copy_to_user(arg, &DebugCtrl, sizeof(DebugCtrl))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_GETDEBUG: Bad copy to user space\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -808,7 +800,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** textual null terminated string. */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_VERSID\n"); - if (copy_to_user(argp, RIOVersid(), sizeof(struct rioVersion))) { + if (copy_to_user(arg, RIOVersid(), sizeof(struct rioVersion))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_VERSID: Bad copy to user space (host=%d)\n", Host); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -821,7 +813,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** at init time. */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_NUM_HOSTS\n"); - if (copy_to_user(argp, &p->RIONumHosts, sizeof(p->RIONumHosts))) { + if (copy_to_user(arg, &p->RIONumHosts, sizeof(p->RIONumHosts))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_NUM_HOSTS: Bad copy to user space\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -832,7 +824,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su /* ** Kill host. This may not be in the final version... */ - rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_FOAD %ld\n", arg); + rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_FOAD %ld\n", (unsigned long) arg); if (!su) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_FOAD: Not super user\n"); p->RIOError.Error = NOT_SUPER_USER; @@ -866,7 +858,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su p->RIOError.Error = NOT_SUPER_USER; return -EPERM; } - if (copy_from_user(&DownLoad, argp, sizeof(DownLoad))) { + if (copy_from_user(&DownLoad, arg, sizeof(DownLoad))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_DOWNLOAD: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -896,7 +888,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su { unsigned int host; - if (copy_from_user(&host, argp, sizeof(host))) { + if (copy_from_user(&host, arg, sizeof(host))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_REQ: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -905,7 +897,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** Fetch the parmmap */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_PARMS\n"); - if (copy_from_io(argp, p->RIOHosts[host].ParmMapP, sizeof(PARM_MAP))) { + if (copy_to_user(arg, p->RIOHosts[host].ParmMapP, sizeof(PARM_MAP))) { p->RIOError.Error = COPYOUT_FAILED; rio_dprintk(RIO_DEBUG_CTRL, "RIO_PARMS: Copy out to user space failed\n"); return -EFAULT; @@ -915,7 +907,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_HOST_REQ: rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_REQ\n"); - if (copy_from_user(&HostReq, argp, sizeof(HostReq))) { + if (copy_from_user(&HostReq, arg, sizeof(HostReq))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_REQ: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -936,7 +928,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_HOST_DPRAM: rio_dprintk(RIO_DEBUG_CTRL, "Request for DPRAM\n"); - if (copy_from_user(&HostDpRam, argp, sizeof(HostDpRam))) { + if (copy_from_user(&HostDpRam, arg, sizeof(HostDpRam))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -953,13 +945,13 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su /* It's hardware like this that really gets on my tits. */ static unsigned char copy[sizeof(struct DpRam)]; for (off = 0; off < sizeof(struct DpRam); off++) - copy[off] = readb(p->RIOHosts[HostDpRam.HostNum].Caddr + off); + copy[off] = readb(&p->RIOHosts[HostDpRam.HostNum].Caddr[off]); if (copy_to_user(HostDpRam.DpRamP, copy, sizeof(struct DpRam))) { p->RIOError.Error = COPYOUT_FAILED; rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Bad copy to user space\n"); return -EFAULT; } - } else if (copy_from_io(HostDpRam.DpRamP, p->RIOHosts[HostDpRam.HostNum].Caddr, sizeof(struct DpRam))) { + } else if (copy_to_user(HostDpRam.DpRamP, p->RIOHosts[HostDpRam.HostNum].Caddr, sizeof(struct DpRam))) { p->RIOError.Error = COPYOUT_FAILED; rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Bad copy to user space\n"); return -EFAULT; @@ -968,13 +960,13 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_SET_BUSY: rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET_BUSY\n"); - if (arg > 511) { - rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET_BUSY: Bad port number %ld\n", arg); + if ((unsigned long) arg > 511) { + rio_dprintk(RIO_DEBUG_CTRL, "RIO_SET_BUSY: Bad port number %ld\n", (unsigned long) arg); p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE; return -EINVAL; } rio_spin_lock_irqsave(&PortP->portSem, flags); - p->RIOPortp[arg]->State |= RIO_BUSY; + p->RIOPortp[(unsigned long) arg]->State |= RIO_BUSY; rio_spin_unlock_irqrestore(&PortP->portSem, flags); return retval; @@ -984,7 +976,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** (probably for debug reasons) */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_PORT\n"); - if (copy_from_user(&PortReq, argp, sizeof(PortReq))) { + if (copy_from_user(&PortReq, arg, sizeof(PortReq))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_PORT: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -1009,7 +1001,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** (probably for debug reasons) */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_RUP\n"); - if (copy_from_user(&RupReq, argp, sizeof(RupReq))) { + if (copy_from_user(&RupReq, arg, sizeof(RupReq))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_RUP: Copy in from user space failed\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -1033,7 +1025,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su } rio_dprintk(RIO_DEBUG_CTRL, "Request for rup %d from host %d\n", RupReq.RupNum, RupReq.HostNum); - if (copy_from_io(RupReq.RupP, HostP->UnixRups[RupReq.RupNum].RupP, sizeof(struct RUP))) { + if (copy_to_user(HostP->UnixRups[RupReq.RupNum].RupP, RupReq.RupP, sizeof(struct RUP))) { p->RIOError.Error = COPYOUT_FAILED; rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_RUP: Bad copy to user space\n"); return -EFAULT; @@ -1046,7 +1038,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ** (probably for debug reasons) */ rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_LPB\n"); - if (copy_from_user(&LpbReq, argp, sizeof(LpbReq))) { + if (copy_from_user(&LpbReq, arg, sizeof(LpbReq))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_LPB: Bad copy from user space\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -1070,7 +1062,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su } rio_dprintk(RIO_DEBUG_CTRL, "Request for lpb %d from host %d\n", LpbReq.Link, LpbReq.Host); - if (copy_from_io(LpbReq.LpbP, &HostP->LinkStrP[LpbReq.Link], sizeof(struct LPB))) { + if (copy_to_user(LpbReq.LpbP, &HostP->LinkStrP[LpbReq.Link], sizeof(struct LPB))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_HOST_LPB: Bad copy to user space\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -1144,7 +1136,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_MAP_B110_TO_110: case RIO_MAP_B110_TO_115200: rio_dprintk(RIO_DEBUG_CTRL, "Baud rate mapping\n"); - port = arg; + port = (unsigned long) arg; if (port < 0 || port > 511) { rio_dprintk(RIO_DEBUG_CTRL, "Baud rate mapping: Bad port number %d\n", port); p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE; @@ -1174,7 +1166,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su case RIO_SEND_PACKET: rio_dprintk(RIO_DEBUG_CTRL, "RIO_SEND_PACKET\n"); - if (copy_from_user(&SendPack, argp, sizeof(SendPack))) { + if (copy_from_user(&SendPack, arg, sizeof(SendPack))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_SEND_PACKET: Bad copy from user space\n"); p->RIOError.Error = COPYIN_FAILED; return -EFAULT; @@ -1218,7 +1210,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su return su ? 0 : -EPERM; case RIO_WHAT_MESG: - if (copy_to_user(argp, &p->RIONoMessage, sizeof(p->RIONoMessage))) { + if (copy_to_user(arg, &p->RIONoMessage, sizeof(p->RIONoMessage))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_WHAT_MESG: Bad copy to user space\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -1226,7 +1218,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su return 0; case RIO_MEM_DUMP: - if (copy_from_user(&SubCmd, argp, sizeof(struct SubCmdStruct))) { + if (copy_from_user(&SubCmd, arg, sizeof(struct SubCmdStruct))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -1256,7 +1248,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su PortP->State |= RIO_BUSY; rio_spin_unlock_irqrestore(&PortP->portSem, flags); - if (copy_to_user(argp, p->RIOMemDump, MEMDUMP_SIZE)) { + if (copy_to_user(arg, p->RIOMemDump, MEMDUMP_SIZE)) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_MEM_DUMP copy failed\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -1264,30 +1256,30 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su return 0; case RIO_TICK: - if (arg >= p->RIONumHosts) + if ((unsigned long) arg >= p->RIONumHosts) return -EINVAL; - rio_dprintk(RIO_DEBUG_CTRL, "Set interrupt for host %ld\n", arg); - writeb(0xFF, &p->RIOHosts[arg].SetInt); + rio_dprintk(RIO_DEBUG_CTRL, "Set interrupt for host %ld\n", (unsigned long) arg); + writeb(0xFF, &p->RIOHosts[(unsigned long) arg].SetInt); return 0; case RIO_TOCK: - if (arg >= p->RIONumHosts) + if ((unsigned long) arg >= p->RIONumHosts) return -EINVAL; - rio_dprintk(RIO_DEBUG_CTRL, "Clear interrupt for host %ld\n", arg); - writeb(0xFF, &p->RIOHosts[arg].ResetInt); + rio_dprintk(RIO_DEBUG_CTRL, "Clear interrupt for host %ld\n", (unsigned long) arg); + writeb(0xFF, &p->RIOHosts[(unsigned long) arg].ResetInt); return 0; case RIO_READ_CHECK: /* Check reads for pkts with data[0] the same */ p->RIOReadCheck = !p->RIOReadCheck; - if (copy_to_user(argp, &p->RIOReadCheck, sizeof(unsigned int))) { + if (copy_to_user(arg, &p->RIOReadCheck, sizeof(unsigned int))) { p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; } return 0; case RIO_READ_REGISTER: - if (copy_from_user(&SubCmd, argp, sizeof(struct SubCmdStruct))) { + if (copy_from_user(&SubCmd, arg, sizeof(struct SubCmdStruct))) { p->RIOError.Error = COPYIN_FAILED; return -EFAULT; } @@ -1322,7 +1314,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su PortP->State |= RIO_BUSY; rio_spin_unlock_irqrestore(&PortP->portSem, flags); - if (copy_to_user(argp, &p->CdRegister, sizeof(unsigned int))) { + if (copy_to_user(arg, &p->CdRegister, sizeof(unsigned int))) { rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_REGISTER copy failed\n"); p->RIOError.Error = COPYOUT_FAILED; return -EFAULT; @@ -1335,10 +1327,10 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su */ case RIO_MAKE_DEV: { - unsigned int port = arg & RIO_MODEM_MASK; + unsigned int port = (unsigned long) arg & RIO_MODEM_MASK; unsigned int ret; - switch (arg & RIO_DEV_MASK) { + switch ((unsigned long) arg & RIO_DEV_MASK) { case RIO_DEV_DIRECT: ret = drv_makedev(MAJOR(dev), port); rio_dprintk(RIO_DEBUG_CTRL, "Makedev direct 0x%x is 0x%x\n", port, ret); @@ -1366,7 +1358,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su int mino; unsigned long ret; - dv = (dev_t) (arg); + dv = (dev_t) ((unsigned long) arg); mino = RIO_UNMODEM(dv); if (RIO_ISMODEM(dv)) { diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c index 99f3df02b..24d299215 100644 --- a/drivers/char/rio/rioinit.c +++ b/drivers/char/rio/rioinit.c @@ -33,6 +33,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; #endif +#include #include #include #include @@ -78,7 +79,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; int RIOPCIinit(struct rio_info *p, int Mode); -static int RIOScrub(int, u8 __iomem *, int); +static int RIOScrub(int, u8 *, int); /** @@ -91,10 +92,10 @@ static int RIOScrub(int, u8 __iomem *, int); ** bits > 0 indicates 16 bit operation. */ -int RIOAssignAT(struct rio_info *p, int Base, void __iomem *virtAddr, int mode) +int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode) { int bits; - struct DpRam __iomem *cardp = (struct DpRam __iomem *)virtAddr; + struct DpRam *cardp = (struct DpRam *)virtAddr; if ((Base < ONE_MEG) || (mode & BYTE_ACCESS_MODE)) bits = BYTE_OPERATION; @@ -106,7 +107,7 @@ int RIOAssignAT(struct rio_info *p, int Base, void __iomem *virtAddr, int mode) ** transient stuff. */ p->RIOHosts[p->RIONumHosts].Caddr = virtAddr; - p->RIOHosts[p->RIONumHosts].CardP = virtAddr; + p->RIOHosts[p->RIONumHosts].CardP = (struct DpRam *)virtAddr; /* ** Revision 01 AT host cards don't support WORD operations, @@ -150,10 +151,10 @@ static u8 val[] = { ** RAM test a board. ** Nothing too complicated, just enough to check it out. */ -int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, int slot) +int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slot) { - struct DpRam __iomem *DpRam = caddr; - void __iomem *ram[4]; + struct DpRam *DpRam = (struct DpRam *)caddr; + char *ram[4]; int size[4]; int op, bank; int nbanks; @@ -178,12 +179,12 @@ int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, i size[2] = DP_SRAM3_SIZE; size[3] = DP_SCRATCH_SIZE; - ram[0] = DpRam->DpSram1; - ram[1] = DpRam->DpSram2; - ram[2] = DpRam->DpSram3; + ram[0] = (char *)&DpRam->DpSram1[0]; + ram[1] = (char *)&DpRam->DpSram2[0]; + ram[2] = (char *)&DpRam->DpSram3[0]; nbanks = (type == RIO_PCI) ? 3 : 4; if (nbanks == 4) - ram[3] = DpRam->DpScratch; + ram[3] = (char *)&DpRam->DpScratch[0]; if (nbanks == 3) { @@ -201,7 +202,7 @@ int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, i */ for (op=0; opHostP->Caddr, PacketP->data, PortP->gs.xmit_buf + PortP->gs.xmit_tail, c); + rio_memcpy_toio(PortP->HostP->Caddr, (caddr_t) PacketP->data, PortP->gs.xmit_buf + PortP->gs.xmit_tail, c); /* udelay (1); */ writeb(c, &(PacketP->len)); @@ -219,7 +219,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) { struct Port *PortP = p->RIOPortp[port]; struct tty_struct *ttyP; - struct PKT __iomem *PacketP; + struct PKT *PacketP; /* ** not mapped in - most of the RIOPortp[] information @@ -298,7 +298,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) { struct Port *PortP = p->RIOPortp[port]; struct tty_struct *ttyP; - struct PKT __iomem *PacketP; + struct PKT *PacketP; /* ** not mapped in - most of the RIOPortp[] information @@ -427,13 +427,13 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) while (PortP->WflushFlag && can_add_transmit(&PacketP, PortP) && (PortP->InUse == NOT_INUSE)) { int p; - struct PktCmd __iomem *PktCmdP; + struct PktCmd *PktCmdP; rio_dprintk(RIO_DEBUG_INTR, "Add WFLUSH marker to data queue\n"); /* ** make it look just like a WFLUSH command */ - PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0]; + PktCmdP = (struct PktCmd *) &PacketP->data[0]; writeb(WFLUSH, &PktCmdP->Command); @@ -525,9 +525,9 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) { struct tty_struct *TtyP; unsigned short transCount; - struct PKT __iomem *PacketP; + struct PKT *PacketP; register unsigned int DataCnt; - unsigned char __iomem *ptr; + unsigned char *ptr; unsigned char *buf; int copied = 0; @@ -546,7 +546,7 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) ** run out of space it will be set to the offset of the ** next byte to copy from the packet data area. The packet ** length field is decremented by the number of bytes that - ** we successfully removed from the packet. When this reaches + ** we succesfully removed from the packet. When this reaches ** zero, we reset the offset pointer to be zero, and free ** the packet from the front of the queue. */ @@ -585,19 +585,19 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) /* ** check that it is not a command! */ - if (readb(&PacketP->len) & PKT_CMD_BIT) { + if (PacketP->len & PKT_CMD_BIT) { rio_dprintk(RIO_DEBUG_INTR, "RIO: unexpected command packet received on PHB\n"); /* rio_dprint(RIO_DEBUG_INTR, (" sysport = %d\n", p->RIOPortp->PortNum)); */ - rio_dprintk(RIO_DEBUG_INTR, " dest_unit = %d\n", readb(&PacketP->dest_unit)); - rio_dprintk(RIO_DEBUG_INTR, " dest_port = %d\n", readb(&PacketP->dest_port)); - rio_dprintk(RIO_DEBUG_INTR, " src_unit = %d\n", readb(&PacketP->src_unit)); - rio_dprintk(RIO_DEBUG_INTR, " src_port = %d\n", readb(&PacketP->src_port)); - rio_dprintk(RIO_DEBUG_INTR, " len = %d\n", readb(&PacketP->len)); - rio_dprintk(RIO_DEBUG_INTR, " control = %d\n", readb(&PacketP->control)); - rio_dprintk(RIO_DEBUG_INTR, " csum = %d\n", readw(&PacketP->csum)); + rio_dprintk(RIO_DEBUG_INTR, " dest_unit = %d\n", PacketP->dest_unit); + rio_dprintk(RIO_DEBUG_INTR, " dest_port = %d\n", PacketP->dest_port); + rio_dprintk(RIO_DEBUG_INTR, " src_unit = %d\n", PacketP->src_unit); + rio_dprintk(RIO_DEBUG_INTR, " src_port = %d\n", PacketP->src_port); + rio_dprintk(RIO_DEBUG_INTR, " len = %d\n", PacketP->len); + rio_dprintk(RIO_DEBUG_INTR, " control = %d\n", PacketP->control); + rio_dprintk(RIO_DEBUG_INTR, " csum = %d\n", PacketP->csum); rio_dprintk(RIO_DEBUG_INTR, " data bytes: "); for (DataCnt = 0; DataCnt < PKT_MAX_DATA_LEN; DataCnt++) - rio_dprintk(RIO_DEBUG_INTR, "%d\n", readb(&PacketP->data[DataCnt])); + rio_dprintk(RIO_DEBUG_INTR, "%d\n", PacketP->data[DataCnt]); remove_receive(PortP); put_free_end(PortP->HostP, PacketP); continue; /* with next packet */ @@ -618,24 +618,24 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) ** and available space. */ - transCount = tty_buffer_request_room(TtyP, readb(&PacketP->len) & PKT_LEN_MASK); + transCount = tty_buffer_request_room(TtyP, PacketP->len & PKT_LEN_MASK); rio_dprintk(RIO_DEBUG_REC, "port %d: Copy %d bytes\n", PortP->PortNum, transCount); /* ** To use the following 'kkprintfs' for debugging - change the '#undef' ** to '#define', (this is the only place ___DEBUG_IT___ occurs in the ** driver). */ - ptr = (unsigned char __iomem *) PacketP->data + PortP->RxDataStart; + ptr = (unsigned char *) PacketP->data + PortP->RxDataStart; tty_prepare_flip_string(TtyP, &buf, transCount); rio_memcpy_fromio(buf, ptr, transCount); PortP->RxDataStart += transCount; - writeb(readb(&PacketP->len)-transCount, &PacketP->len); + PacketP->len -= transCount; copied += transCount; - if (readb(&PacketP->len) == 0) { + if (PacketP->len == 0) { /* ** If we have emptied the packet, then we can ** free it, and reset the start pointer for diff --git a/drivers/char/rio/rioparam.c b/drivers/char/rio/rioparam.c index 1066d9760..d2e8092cd 100644 --- a/drivers/char/rio/rioparam.c +++ b/drivers/char/rio/rioparam.c @@ -154,8 +154,8 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) { struct tty_struct *TtyP; int retval; - struct phb_param __iomem *phb_param_ptr; - struct PKT __iomem *PacketP; + struct phb_param *phb_param_ptr; + struct PKT *PacketP; int res; u8 Cor1 = 0, Cor2 = 0, Cor4 = 0, Cor5 = 0; u8 TxXon = 0, TxXoff = 0, RxXon = 0, RxXoff = 0; @@ -235,7 +235,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) rio_dprintk(RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n", res); rio_dprintk(RIO_DEBUG_PARAM, "Packet is %p\n", PacketP); - phb_param_ptr = (struct phb_param __iomem *) PacketP->data; + phb_param_ptr = (struct phb_param *) PacketP->data; switch (TtyP->termios->c_cflag & CSIZE) { @@ -580,11 +580,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ** We can add another packet to a transmit queue if the packet pointer pointed ** to by the TxAdd pointer has PKT_IN_USE clear in its address. */ -int can_add_transmit(struct PKT __iomem **PktP, struct Port *PortP) +int can_add_transmit(struct PKT **PktP, struct Port *PortP) { - struct PKT __iomem *tp; + struct PKT *tp; - *PktP = tp = (struct PKT __iomem *) RIO_PTR(PortP->Caddr, readw(PortP->TxAdd)); + *PktP = tp = (struct PKT *) RIO_PTR(PortP->Caddr, readw(PortP->TxAdd)); return !((unsigned long) tp & PKT_IN_USE); } @@ -608,9 +608,9 @@ void add_transmit(struct Port *PortP) * Put a packet onto the end of the * free list ****************************************/ -void put_free_end(struct Host *HostP, struct PKT __iomem *PktP) +void put_free_end(struct Host *HostP, struct PKT *PktP) { - struct rio_free_list __iomem *tmp_pointer; + struct rio_free_list *tmp_pointer; unsigned short old_end, new_end; unsigned long flags; @@ -625,15 +625,15 @@ void put_free_end(struct Host *HostP, struct PKT __iomem *PktP) if ((old_end = readw(&HostP->ParmMapP->free_list_end)) != TPNULL) { new_end = RIO_OFF(HostP->Caddr, PktP); - tmp_pointer = (struct rio_free_list __iomem *) RIO_PTR(HostP->Caddr, old_end); + tmp_pointer = (struct rio_free_list *) RIO_PTR(HostP->Caddr, old_end); writew(new_end, &tmp_pointer->next); - writew(old_end, &((struct rio_free_list __iomem *) PktP)->prev); - writew(TPNULL, &((struct rio_free_list __iomem *) PktP)->next); + writew(old_end, &((struct rio_free_list *) PktP)->prev); + writew(TPNULL, &((struct rio_free_list *) PktP)->next); writew(new_end, &HostP->ParmMapP->free_list_end); } else { /* First packet on the free list this should never happen! */ rio_dprintk(RIO_DEBUG_PFE, "put_free_end(): This should never happen\n"); writew(RIO_OFF(HostP->Caddr, PktP), &HostP->ParmMapP->free_list_end); - tmp_pointer = (struct rio_free_list __iomem *) PktP; + tmp_pointer = (struct rio_free_list *) PktP; writew(TPNULL, &tmp_pointer->prev); writew(TPNULL, &tmp_pointer->next); } @@ -647,10 +647,10 @@ void put_free_end(struct Host *HostP, struct PKT __iomem *PktP) ** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear, ** then can_remove_receive() returns 0. */ -int can_remove_receive(struct PKT __iomem **PktP, struct Port *PortP) +int can_remove_receive(struct PKT **PktP, struct Port *PortP) { if (readw(PortP->RxRemove) & PKT_IN_USE) { - *PktP = (struct PKT __iomem *) RIO_PTR(PortP->Caddr, readw(PortP->RxRemove) & ~PKT_IN_USE); + *PktP = (struct PKT *) RIO_PTR(PortP->Caddr, readw(PortP->RxRemove) & ~PKT_IN_USE); return 1; } return 0; diff --git a/drivers/char/rio/rioroute.c b/drivers/char/rio/rioroute.c index a99f3d9d7..357085337 100644 --- a/drivers/char/rio/rioroute.c +++ b/drivers/char/rio/rioroute.c @@ -86,9 +86,9 @@ static void RIOConCon(struct rio_info *, struct Host *, unsigned int, unsigned i ** Incoming on the ROUTE_RUP ** I wrote this while I was tired. Forgive me. */ -int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT __iomem * PacketP) +int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT * PacketP) { - struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *) PacketP->data; + struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct PktCmd_M *PktReplyP; struct CmdBlk *CmdBlkP; struct Port *PortP; @@ -307,7 +307,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct if (!RIOBootOk(p, HostP, RtaUniq)) { rio_dprintk(RIO_DEBUG_ROUTE, "RTA %x tried to get an ID, but does not belong - FOAD it!\n", RtaUniq); PktReplyP->Command = ROUTE_FOAD; - memcpy(PktReplyP->CommandText, "RT_FOAD", 7); + HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); RIOQueueCmdBlk(HostP, Rup, CmdBlkP); return 1; } @@ -341,7 +341,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct HostP->Mapping[ThisUnit].Flags |= MSG_DONE; } PktReplyP->Command = ROUTE_FOAD; - memcpy(PktReplyP->CommandText, "RT_FOAD", 7); + HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); RIOQueueCmdBlk(HostP, Rup, CmdBlkP); return 1; } @@ -367,7 +367,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PktReplyP->IDNum2 = ROUTE_NO_ID; rio_dprintk(RIO_DEBUG_ROUTE, "RTA '%s' has been allocated ID %d\n", HostP->Mapping[ThisUnit].Name, PktReplyP->IDNum); } - memcpy(PktReplyP->CommandText, "RT_ALLOCAT", 10); + HostP->Copy("RT_ALLOCAT", PktReplyP->CommandText, 10); RIOQueueCmdBlk(HostP, Rup, CmdBlkP); @@ -469,7 +469,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct } PktReplyP->Command = ROUTE_FOAD; - memcpy(PktReplyP->CommandText, "RT_FOAD", 7); + HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); } else { /* ** we did boot it (as an extra), and there may now be a table @@ -489,7 +489,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct } } PktReplyP->Command = ROUTE_USED; - memcpy(PktReplyP->CommandText, "RT_USED", 7); + HostP->Copy("RT_USED", PktReplyP->CommandText, 7); } RIOQueueCmdBlk(HostP, Rup, CmdBlkP); return 1; @@ -517,8 +517,8 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit) for (port = 0; port < PORTS_PER_RTA; port++, PortN++) { unsigned short dest_port = port + 8; - u16 __iomem *TxPktP; - struct PKT __iomem *Pkt; + u16 *TxPktP; + struct PKT *Pkt; PortP = p->RIOPortp[PortN]; @@ -555,12 +555,12 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit) ** card. This needs to be translated into a 32 bit pointer ** so it can be accessed from the driver. */ - Pkt = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(TxPktP)); + Pkt = (struct PKT *) RIO_PTR(HostP->Caddr, readw(TxPktP)); /* ** If the packet is used, reset it. */ - Pkt = (struct PKT __iomem *) ((unsigned long) Pkt & ~PKT_IN_USE); + Pkt = (struct PKT *) ((unsigned long) Pkt & ~PKT_IN_USE); writeb(dest_unit, &Pkt->dest_unit); writeb(dest_port, &Pkt->dest_port); } diff --git a/drivers/char/rio/riotable.c b/drivers/char/rio/riotable.c index 7e9883573..d3abe0d37 100644 --- a/drivers/char/rio/riotable.c +++ b/drivers/char/rio/riotable.c @@ -534,8 +534,8 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP) if (PortP->SecondBlock) { u16 dest_unit = HostMapP->ID; u16 dest_port = port - SysPort; - u16 __iomem *TxPktP; - struct PKT __iomem *Pkt; + u16 *TxPktP; + struct PKT *Pkt; for (TxPktP = PortP->TxStart; TxPktP <= PortP->TxEnd; TxPktP++) { /* @@ -545,12 +545,12 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP) ** a 32 bit pointer so it can be ** accessed from the driver. */ - Pkt = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&*TxPktP)); - rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", readw(TxPktP), readb(&Pkt->dest_unit), readb(&Pkt->dest_port), dest_unit, dest_port); + Pkt = (struct PKT *) RIO_PTR(HostP->Caddr, readw(&*TxPktP)); + rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", *TxPktP, Pkt->dest_unit, Pkt->dest_port, dest_unit, dest_port); writew(dest_unit, &Pkt->dest_unit); writew(dest_port, &Pkt->dest_port); } - rio_dprintk(RIO_DEBUG_TABLE, "Port %d phb destination: Old %x:%x New %x:%x\n", port, readb(&PortP->PhbP->destination) & 0xff, (readb(&PortP->PhbP->destination) >> 8) & 0xff, dest_unit, dest_port); + rio_dprintk(RIO_DEBUG_TABLE, "Port %d phb destination: Old %x:%x New %x:%x\n", port, PortP->PhbP->destination & 0xff, (PortP->PhbP->destination >> 8) & 0xff, dest_unit, dest_port); writew(dest_unit + (dest_port << 8), &PortP->PhbP->destination); } rio_spin_unlock_irqrestore(&PortP->portSem, sem_flags); @@ -781,13 +781,13 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP) ** unless the host has been booted */ if ((HostP->Flags & RUN_STATE) == RC_RUNNING) { - struct PHB __iomem *PhbP = PortP->PhbP = &HostP->PhbP[HostPort]; - PortP->TxAdd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_add)); - PortP->TxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_start)); - PortP->TxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_end)); - PortP->RxRemove = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_remove)); - PortP->RxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_start)); - PortP->RxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_end)); + struct PHB *PhbP = PortP->PhbP = &HostP->PhbP[HostPort]; + PortP->TxAdd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_add)); + PortP->TxStart = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_start)); + PortP->TxEnd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_end)); + PortP->RxRemove = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_remove)); + PortP->RxStart = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_start)); + PortP->RxEnd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_end)); } else PortP->PhbP = NULL; diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c index a4f0b1e3e..204267613 100644 --- a/drivers/char/rio/riotty.c +++ b/drivers/char/rio/riotty.c @@ -576,7 +576,7 @@ static void RIOClearUp(struct Port *PortP) */ int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg) { - struct PKT __iomem *PacketP; + struct PKT *PacketP; int retries = 20; /* at 10 per second -> 2 seconds */ unsigned long flags; diff --git a/drivers/char/rio/unixrup.h b/drivers/char/rio/unixrup.h index 46bd532f7..4306e01db 100644 --- a/drivers/char/rio/unixrup.h +++ b/drivers/char/rio/unixrup.h @@ -44,7 +44,7 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2"; struct UnixRup { struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */ struct CmdBlk *CmdPendingP; /* The command currently being sent */ - struct RUP __iomem *RupP; /* the Rup to send it to */ + struct RUP *RupP; /* the Rup to send it to */ unsigned int Id; /* Id number */ unsigned int BaseSysPort; /* SysPort of first tty on this RTA */ unsigned int ModTypes; /* Modules on this RTA */ diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index f1c94f771..657c0d88f 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c @@ -625,7 +625,7 @@ static inline int rc_setup_board(struct riscom_board * bp) if (bp->flags & RC_BOARD_ACTIVE) return 0; - error = request_irq(bp->irq, rc_interrupt, IRQF_DISABLED, + error = request_irq(bp->irq, rc_interrupt, SA_INTERRUPT, "RISCom/8", NULL); if (error) return error; @@ -1634,6 +1634,7 @@ static inline int rc_init_drivers(void) memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); riscom_driver->owner = THIS_MODULE; riscom_driver->name = "ttyL"; + riscom_driver->devfs_name = "tts/L"; riscom_driver->major = RISCOM8_NORMAL_MAJOR; riscom_driver->type = TTY_DRIVER_TYPE_SERIAL; riscom_driver->subtype = SERIAL_TYPE_NORMAL; diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 0ac131881..7edc6a4db 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -324,15 +324,35 @@ static void rp_do_receive(struct r_port *info, CHANNEL_t * cp, unsigned int ChanStatus) { unsigned int CharNStat; - int ToRecv, wRecv, space; - unsigned char *cbuf; + int ToRecv, wRecv, space = 0, count; + unsigned char *cbuf, *chead; + char *fbuf, *fhead; + struct tty_ldisc *ld; + + ld = tty_ldisc_ref(tty); ToRecv = sGetRxCnt(cp); + space = tty->receive_room; + if (space > 2 * TTY_FLIPBUF_SIZE) + space = 2 * TTY_FLIPBUF_SIZE; + count = 0; #ifdef ROCKET_DEBUG_INTR - printk(KERN_INFO "rp_do_receive(%d)...", ToRecv); + printk(KERN_INFO "rp_do_receive(%d, %d)...", ToRecv, space); #endif - if (ToRecv == 0) - return; + + /* + * determine how many we can actually read in. If we can't + * read any in then we have a software overrun condition. + */ + if (ToRecv > space) + ToRecv = space; + + ToRecv = tty_prepare_flip_string_flags(tty, &chead, &fhead, ToRecv); + if (ToRecv <= 0) + goto done; + + cbuf = chead; + fbuf = fhead; /* * if status indicates there are errored characters in the @@ -360,8 +380,6 @@ static void rp_do_receive(struct r_port *info, info->read_status_mask); #endif while (ToRecv) { - char flag; - CharNStat = sInW(sGetTxRxDataIO(cp)); #ifdef ROCKET_DEBUG_RECEIVE printk(KERN_INFO "%x...", CharNStat); @@ -374,16 +392,17 @@ static void rp_do_receive(struct r_port *info, } CharNStat &= info->read_status_mask; if (CharNStat & STMBREAKH) - flag = TTY_BREAK; + *fbuf++ = TTY_BREAK; else if (CharNStat & STMPARITYH) - flag = TTY_PARITY; + *fbuf++ = TTY_PARITY; else if (CharNStat & STMFRAMEH) - flag = TTY_FRAME; + *fbuf++ = TTY_FRAME; else if (CharNStat & STMRCVROVRH) - flag = TTY_OVERRUN; + *fbuf++ = TTY_OVERRUN; else - flag = TTY_NORMAL; - tty_insert_flip_char(tty, CharNStat & 0xff, flag); + *fbuf++ = TTY_NORMAL; + *cbuf++ = CharNStat & 0xff; + count++; ToRecv--; } @@ -403,23 +422,20 @@ static void rp_do_receive(struct r_port *info, * characters at time by doing repeated word IO * transfer. */ - space = tty_prepare_flip_string(tty, &cbuf, ToRecv); - if (space < ToRecv) { -#ifdef ROCKET_DEBUG_RECEIVE - printk(KERN_INFO "rp_do_receive:insufficient space ToRecv=%d space=%d\n", ToRecv, space); -#endif - if (space <= 0) - return; - ToRecv = space; - } wRecv = ToRecv >> 1; if (wRecv) sInStrW(sGetTxRxDataIO(cp), (unsigned short *) cbuf, wRecv); if (ToRecv & 1) cbuf[ToRecv - 1] = sInB(sGetTxRxDataIO(cp)); + memset(fbuf, TTY_NORMAL, ToRecv); + cbuf += ToRecv; + fbuf += ToRecv; + count += ToRecv; } /* Push the data up to the tty layer */ - tty_flip_buffer_push(tty); + ld->receive_buf(tty, chead, fhead, count); +done: + tty_ldisc_deref(ld); } /* @@ -2426,7 +2442,8 @@ static int __init rp_init(void) */ rocket_driver->owner = THIS_MODULE; - rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV; + rocket_driver->flags = TTY_DRIVER_NO_DEVFS; + rocket_driver->devfs_name = "tts/R"; rocket_driver->name = "ttyR"; rocket_driver->driver_name = "Comtrol RocketPort"; rocket_driver->major = TTY_ROCKET_MAJOR; @@ -2437,7 +2454,7 @@ static int __init rp_init(void) rocket_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; #ifdef ROCKET_SOFT_FLOW - rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; #endif tty_set_operations(rocket_driver, &rocket_ops); diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index ab6429b4a..7cac6d05d 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -46,12 +46,13 @@ * 1.11a Daniele Bellucci: Audit create_proc_read_entry in rtc_init * 1.12 Venkatesh Pallipadi: Hooks for emulating rtc on HPET base-timer * CONFIG_HPET_EMULATE_RTC - * 1.12a Maciej W. Rozycki: Handle memory-mapped chips properly. * 1.12ac Alan Cox: Allow read access to the day of week register */ #define RTC_VERSION "1.12ac" +#define RTC_IO_EXTENT 0x8 + /* * Note that *all* calls to CMOS_READ and CMOS_WRITE are done with * interrupts disabled. Due to the index-port/data-port (0x70/0x71) @@ -60,6 +61,7 @@ * this driver.) */ +#include #include #include #include @@ -209,18 +211,17 @@ static const unsigned char days_in_mo[] = */ static inline unsigned char rtc_is_updating(void) { - unsigned long flags; unsigned char uip; - spin_lock_irqsave(&rtc_lock, flags); + spin_lock_irq(&rtc_lock); uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock_irq(&rtc_lock); return uip; } #ifdef RTC_IRQ /* - * A very tiny interrupt handler. It runs with IRQF_DISABLED set, + * A very tiny interrupt handler. It runs with SA_INTERRUPT set, * but there is possibility of conflicting with the set_rtc_mmss() * call (the rtc irq and the timer irq can easily run at the same * time in two different CPUs). So we need to serialize @@ -337,15 +338,7 @@ static ssize_t rtc_read(struct file *file, char __user *buf, if (rtc_has_irq == 0) return -EIO; - /* - * Historically this function used to assume that sizeof(unsigned long) - * is the same in userspace and kernelspace. This lead to problems - * for configurations with multiple ABIs such a the MIPS o32 and 64 - * ABIs supported on the same kernel. So now we support read of both - * 4 and 8 bytes and assume that's the sizeof(unsigned long) in the - * userspace ABI. - */ - if (count != sizeof(unsigned int) && count != sizeof(unsigned long)) + if (count < sizeof(unsigned)) return -EINVAL; add_wait_queue(&rtc_wait, &wait); @@ -376,12 +369,10 @@ static ssize_t rtc_read(struct file *file, char __user *buf, schedule(); } while (1); - if (count == sizeof(unsigned int)) - retval = put_user(data, (unsigned int __user *)buf) ?: sizeof(int); + if (count < sizeof(unsigned long)) + retval = put_user(data, (unsigned int __user *)buf) ?: sizeof(int); else retval = put_user(data, (unsigned long __user *)buf) ?: sizeof(long); - if (!retval) - retval = count; out: current->state = TASK_RUNNING; remove_wait_queue(&rtc_wait, &wait); @@ -887,7 +878,7 @@ int rtc_control(rtc_task_t *task, unsigned int cmd, unsigned long arg) * The various file operations we support. */ -static const struct file_operations rtc_fops = { +static struct file_operations rtc_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = rtc_read, @@ -906,7 +897,7 @@ static struct miscdevice rtc_dev = { .fops = &rtc_fops, }; -static const struct file_operations rtc_proc_fops = { +static struct file_operations rtc_proc_fops = { .owner = THIS_MODULE, .open = rtc_proc_open, .read = seq_read, @@ -933,14 +924,11 @@ static int __init rtc_init(void) struct sparc_isa_device *isa_dev; #endif #endif -#ifndef __sparc__ - void *r; -#endif #ifdef __sparc__ for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if(strcmp(edev->prom_node->name, "rtc") == 0) { + if(strcmp(edev->prom_name, "rtc") == 0) { rtc_port = edev->resource[0].start; rtc_irq = edev->irqs[0]; goto found; @@ -950,7 +938,7 @@ static int __init rtc_init(void) #ifdef __sparc_v9__ for_each_isa(isa_br) { for_each_isadev(isa_dev, isa_br) { - if (strcmp(isa_dev->prom_node->name, "rtc") == 0) { + if (strcmp(isa_dev->prom_name, "rtc") == 0) { rtc_port = isa_dev->resource.start; rtc_irq = isa_dev->irq; goto found; @@ -971,19 +959,18 @@ found: * XXX Interrupt pin #7 in Espresso is shared between RTC and * PCI Slot 2 INTA# (and some INTx# in Slot 1). */ - if (request_irq(rtc_irq, rtc_interrupt, IRQF_SHARED, "rtc", (void *)&rtc_port)) { + if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) { + /* + * Standard way for sparc to print irq's is to use + * __irq_itoa(). I think for EBus it's ok to use %d. + */ printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); return -EIO; } no_irq: #else - if (RTC_IOMAPPED) - r = request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc"); - else - r = request_mem_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc"); - if (!r) { - printk(KERN_ERR "rtc: I/O resource %lx is not free.\n", - (long)(RTC_PORT(0))); + if (!request_region(RTC_PORT(0), RTC_IO_EXTENT, "rtc")) { + printk(KERN_ERR "rtc: I/O port %d is not free.\n", RTC_PORT (0)); return -EIO; } @@ -994,13 +981,10 @@ no_irq: rtc_int_handler_ptr = rtc_interrupt; } - if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, "rtc", NULL)) { + if(request_irq(RTC_IRQ, rtc_int_handler_ptr, SA_INTERRUPT, "rtc", NULL)) { /* Yeah right, seeing as irq 8 doesn't even hit the bus. */ printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ); - if (RTC_IOMAPPED) - release_region(RTC_PORT(0), RTC_IO_EXTENT); - else - release_mem_region(RTC_PORT(0), RTC_IO_EXTENT); + release_region(RTC_PORT(0), RTC_IO_EXTENT); return -EIO; } hpet_rtc_timer_init(); @@ -1100,10 +1084,7 @@ static void __exit rtc_exit (void) if (rtc_has_irq) free_irq (rtc_irq, &rtc_port); #else - if (RTC_IOMAPPED) - release_region(RTC_PORT(0), RTC_IO_EXTENT); - else - release_mem_region(RTC_PORT(0), RTC_IO_EXTENT); + release_region (RTC_PORT (0), RTC_IO_EXTENT); #ifdef RTC_IRQ if (rtc_has_irq) free_irq (RTC_IRQ, NULL); @@ -1246,7 +1227,7 @@ static int rtc_proc_open(struct inode *inode, struct file *file) void rtc_get_rtc_time(struct rtc_time *rtc_tm) { - unsigned long uip_watchdog = jiffies, flags; + unsigned long uip_watchdog = jiffies; unsigned char ctrl; #ifdef CONFIG_MACH_DECSTATION unsigned int real_year; @@ -1273,7 +1254,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) * RTC has RTC_DAY_OF_WEEK, we should usually ignore it, as it is * only updated by the RTC when initially set to a non-zero value. */ - spin_lock_irqsave(&rtc_lock, flags); + spin_lock_irq(&rtc_lock); rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); @@ -1287,7 +1268,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) real_year = CMOS_READ(RTC_DEC_YEAR); #endif ctrl = CMOS_READ(RTC_CONTROL); - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock_irq(&rtc_lock); if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c index 5458ef163..b0038b19b 100644 --- a/drivers/char/s3c2410-rtc.c +++ b/drivers/char/s3c2410-rtc.c @@ -341,13 +341,13 @@ static int s3c2410_rtc_open(void) int ret; ret = request_irq(s3c2410_rtc_alarmno, s3c2410_rtc_alarmirq, - IRQF_DISABLED, "s3c2410-rtc alarm", NULL); + SA_INTERRUPT, "s3c2410-rtc alarm", NULL); if (ret) printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_alarmno); ret = request_irq(s3c2410_rtc_tickno, s3c2410_rtc_tickirq, - IRQF_DISABLED, "s3c2410-rtc tick", NULL); + SA_INTERRUPT, "s3c2410-rtc tick", NULL); if (ret) { printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_tickno); diff --git a/drivers/char/scx200_gpio.c b/drivers/char/scx200_gpio.c index b956c7bab..664a6e97e 100644 --- a/drivers/char/scx200_gpio.c +++ b/drivers/char/scx200_gpio.c @@ -1,57 +1,96 @@ -/* linux/drivers/char/scx200_gpio.c +/* linux/drivers/char/scx200_gpio.c National Semiconductor SCx200 GPIO driver. Allows a user space process to play with the GPIO pins. Copyright (c) 2001,2002 Christer Weinigel */ -#include +#include #include #include #include #include #include -#include #include #include -#include -#include - #include -#include - -#define DRVNAME "scx200_gpio" -static struct platform_device *pdev; +#define NAME "scx200_gpio" MODULE_AUTHOR("Christer Weinigel "); -MODULE_DESCRIPTION("NatSemi/AMD SCx200 GPIO Pin Driver"); +MODULE_DESCRIPTION("NatSemi SCx200 GPIO Pin Driver"); MODULE_LICENSE("GPL"); static int major = 0; /* default to dynamic major */ module_param(major, int, 0); MODULE_PARM_DESC(major, "Major device number"); -#define MAX_PINS 32 /* 64 later, when known ok */ +static ssize_t scx200_gpio_write(struct file *file, const char __user *data, + size_t len, loff_t *ppos) +{ + unsigned m = iminor(file->f_dentry->d_inode); + size_t i; + + for (i = 0; i < len; ++i) { + char c; + if (get_user(c, data+i)) + return -EFAULT; + switch (c) + { + case '0': + scx200_gpio_set(m, 0); + break; + case '1': + scx200_gpio_set(m, 1); + break; + case 'O': + printk(KERN_INFO NAME ": GPIO%d output enabled\n", m); + scx200_gpio_configure(m, ~1, 1); + break; + case 'o': + printk(KERN_INFO NAME ": GPIO%d output disabled\n", m); + scx200_gpio_configure(m, ~1, 0); + break; + case 'T': + printk(KERN_INFO NAME ": GPIO%d output is push pull\n", m); + scx200_gpio_configure(m, ~2, 2); + break; + case 't': + printk(KERN_INFO NAME ": GPIO%d output is open drain\n", m); + scx200_gpio_configure(m, ~2, 0); + break; + case 'P': + printk(KERN_INFO NAME ": GPIO%d pull up enabled\n", m); + scx200_gpio_configure(m, ~4, 4); + break; + case 'p': + printk(KERN_INFO NAME ": GPIO%d pull up disabled\n", m); + scx200_gpio_configure(m, ~4, 0); + break; + } + } -struct nsc_gpio_ops scx200_gpio_ops = { - .owner = THIS_MODULE, - .gpio_config = scx200_gpio_configure, - .gpio_dump = nsc_gpio_dump, - .gpio_get = scx200_gpio_get, - .gpio_set = scx200_gpio_set, - .gpio_change = scx200_gpio_change, - .gpio_current = scx200_gpio_current -}; -EXPORT_SYMBOL(scx200_gpio_ops); + return len; +} + +static ssize_t scx200_gpio_read(struct file *file, char __user *buf, + size_t len, loff_t *ppos) +{ + unsigned m = iminor(file->f_dentry->d_inode); + int value; + + value = scx200_gpio_get(m); + if (put_user(value ? '1' : '0', buf)) + return -EFAULT; + + return 1; +} static int scx200_gpio_open(struct inode *inode, struct file *file) { unsigned m = iminor(inode); - file->private_data = &scx200_gpio_ops; - - if (m >= MAX_PINS) + if (m > 63) return -EINVAL; return nonseekable_open(inode, file); } @@ -61,71 +100,50 @@ static int scx200_gpio_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations scx200_gpio_fileops = { + +static struct file_operations scx200_gpio_fops = { .owner = THIS_MODULE, - .write = nsc_gpio_write, - .read = nsc_gpio_read, + .write = scx200_gpio_write, + .read = scx200_gpio_read, .open = scx200_gpio_open, .release = scx200_gpio_release, }; -struct cdev scx200_gpio_cdev; /* use 1 cdev for all pins */ - static int __init scx200_gpio_init(void) { - int rc; - dev_t devid; + int r; + + printk(KERN_DEBUG NAME ": NatSemi SCx200 GPIO Driver\n"); if (!scx200_gpio_present()) { - printk(KERN_ERR DRVNAME ": no SCx200 gpio present\n"); + printk(KERN_ERR NAME ": no SCx200 gpio pins available\n"); return -ENODEV; } - /* support dev_dbg() with pdev->dev */ - pdev = platform_device_alloc(DRVNAME, 0); - if (!pdev) - return -ENOMEM; - - rc = platform_device_add(pdev); - if (rc) - goto undo_malloc; - - /* nsc_gpio uses dev_dbg(), so needs this */ - scx200_gpio_ops.dev = &pdev->dev; - - if (major) { - devid = MKDEV(major, 0); - rc = register_chrdev_region(devid, MAX_PINS, "scx200_gpio"); - } else { - rc = alloc_chrdev_region(&devid, 0, MAX_PINS, "scx200_gpio"); - major = MAJOR(devid); + r = register_chrdev(major, NAME, &scx200_gpio_fops); + if (r < 0) { + printk(KERN_ERR NAME ": unable to register character device\n"); + return r; } - if (rc < 0) { - dev_err(&pdev->dev, "SCx200 chrdev_region err: %d\n", rc); - goto undo_platform_device_add; + if (!major) { + major = r; + printk(KERN_DEBUG NAME ": got dynamic major %d\n", major); } - cdev_init(&scx200_gpio_cdev, &scx200_gpio_fileops); - cdev_add(&scx200_gpio_cdev, devid, MAX_PINS); - - return 0; /* succeed */ - -undo_platform_device_add: - platform_device_del(pdev); -undo_malloc: - platform_device_put(pdev); - - return rc; + return 0; } static void __exit scx200_gpio_cleanup(void) { - cdev_del(&scx200_gpio_cdev); - /* cdev_put(&scx200_gpio_cdev); */ - - unregister_chrdev_region(MKDEV(major, 0), MAX_PINS); - platform_device_unregister(pdev); + unregister_chrdev(major, NAME); } module_init(scx200_gpio_init); module_exit(scx200_gpio_cleanup); + +/* + Local variables: + compile-command: "make -k -C ../.. SUBDIRS=drivers/char modules" + c-basic-offset: 8 + End: +*/ diff --git a/drivers/char/selection.c b/drivers/char/selection.c index 74cff839c..71093a9fc 100644 --- a/drivers/char/selection.c +++ b/drivers/char/selection.c @@ -33,7 +33,7 @@ extern void poke_blanked_console(void); /* Variables for selection control. */ /* Use a dynamic buffer, instead of static (Dec 1994) */ -struct vc_data *sel_cons; /* must not be deallocated */ +struct vc_data *sel_cons; /* must not be disallocated */ static volatile int sel_start = -1; /* cleared by clear_selection */ static int sel_end; static int sel_buffer_lth; diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 21a710cb4..037c940ac 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c @@ -44,6 +44,7 @@ * - replace bottom half handler with task queue handler */ +#include #include #include #include @@ -2234,6 +2235,7 @@ scrn[1] = '\0'; /* Initialize the tty_driver structure */ cy_serial_driver->owner = THIS_MODULE; + cy_serial_driver->devfs_name = "tts/"; cy_serial_driver->name = "ttyS"; cy_serial_driver->major = TTY_MAJOR; cy_serial_driver->minor_start = 64; diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c index 07e0b75f2..56c8243cd 100644 --- a/drivers/char/snsc.c +++ b/drivers/char/snsc.c @@ -105,7 +105,7 @@ scdrv_open(struct inode *inode, struct file *file) /* hook this subchannel up to the system controller interrupt */ rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt, - IRQF_SHARED | IRQF_DISABLED, + SA_SHIRQ | SA_INTERRUPT, SYSCTL_BASENAME, sd); if (rv) { ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); @@ -347,7 +347,7 @@ scdrv_poll(struct file *file, struct poll_table_struct *wait) return mask; } -static const struct file_operations scdrv_fops = { +static struct file_operations scdrv_fops = { .owner = THIS_MODULE, .read = scdrv_read, .write = scdrv_write, @@ -374,12 +374,7 @@ scdrv_init(void) struct sysctl_data_s *scd; void *salbuf; dev_t first_dev, dev; - nasid_t event_nasid; - - if (!ia64_platform_is("sn2")) - return -ENODEV; - - event_nasid = ia64_sn_get_console_nasid(); + nasid_t event_nasid = ia64_sn_get_console_nasid(); if (alloc_chrdev_region(&first_dev, 0, num_cnodes, SYSCTL_BASENAME) < 0) { diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index d12d4f629..e234d50e1 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c @@ -220,7 +220,20 @@ scdrv_dispatch_event(char *event, int len) " Sending SIGPWR to init...\n"); /* give a SIGPWR signal to init proc */ - kill_proc(1, SIGPWR, 0); + + /* first find init's task */ + read_lock(&tasklist_lock); + for_each_process(p) { + if (p->pid == 1) + break; + } + if (p) { + force_sig(SIGPWR, p); + } else { + printk(KERN_ERR "Failed to signal init!\n"); + snsc_shutting_down = 0; /* so can try again (?) */ + } + read_unlock(&tasklist_lock); } else { /* print to system log */ printk("%s|$(0x%x)%s\n", severity, esp_code, desc); @@ -297,7 +310,7 @@ scdrv_event_init(struct sysctl_data_s *scd) /* hook event subchannel up to the system controller interrupt */ rv = request_irq(SGI_UART_VECTOR, scdrv_event_interrupt, - IRQF_SHARED | IRQF_DISABLED, + SA_SHIRQ | SA_INTERRUPT, "system controller events", event_sd); if (rv) { printk(KERN_WARNING "%s: irq request failed (%d)\n", diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index d4e434d69..a90f5d97d 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -33,6 +33,7 @@ * */ +#include #include #include #include @@ -511,7 +512,7 @@ static struct sonypi_device { #ifdef CONFIG_ACPI static struct acpi_device *sonypi_acpi_device; -static int acpi_driver_registered; +static int acpi_enabled; #endif static int sonypi_ec_write(u8 addr, u8 value) @@ -868,7 +869,7 @@ found: sonypi_report_input_event(event); #ifdef CONFIG_ACPI - if (sonypi_acpi_device) + if (acpi_enabled) acpi_bus_generate_event(sonypi_acpi_device, 1, event); #endif @@ -1106,7 +1107,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, return ret; } -static const struct file_operations sonypi_misc_fops = { +static struct file_operations sonypi_misc_fops = { .owner = THIS_MODULE, .read = sonypi_misc_read, .poll = sonypi_misc_poll, @@ -1282,7 +1283,7 @@ static int __devinit sonypi_setup_irq(struct sonypi_device *dev, while (irq_list->irq) { if (!request_irq(irq_list->irq, sonypi_irq, - IRQF_SHARED, "sonypi", sonypi_irq)) { + SA_SHIRQ, "sonypi", sonypi_irq)) { dev->irq = irq_list->irq; dev->bits = irq_list->bits; return 0; @@ -1550,8 +1551,8 @@ static int __init sonypi_init(void) goto err_free_device; #ifdef CONFIG_ACPI - if (acpi_bus_register_driver(&sonypi_acpi_driver) >= 0) - acpi_driver_registered = 1; + if (acpi_bus_register_driver(&sonypi_acpi_driver) > 0) + acpi_enabled = 1; #endif return 0; @@ -1566,7 +1567,7 @@ static int __init sonypi_init(void) static void __exit sonypi_exit(void) { #ifdef CONFIG_ACPI - if (acpi_driver_registered) + if (acpi_enabled) acpi_bus_unregister_driver(&sonypi_acpi_driver); #endif platform_device_unregister(sonypi_platform_device); diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index a1d303f9a..5343e9fc6 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c @@ -75,6 +75,7 @@ * Documentation/specialix.txt */ +#include #include #include @@ -1015,9 +1016,9 @@ static inline int sx_setup_board(struct specialix_board * bp) return 0; if (bp->flags & SX_BOARD_IS_PCI) - error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED | IRQF_SHARED, "specialix IO8+", bp); + error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT | SA_SHIRQ, "specialix IO8+", bp); else - error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED, "specialix IO8+", bp); + error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT, "specialix IO8+", bp); if (error) return error; @@ -1682,7 +1683,7 @@ static int sx_write(struct tty_struct * tty, bp = port_Board(port); - if (!port->xmit_buf || !tmp_buf) { + if (!tty || !port->xmit_buf || !tmp_buf) { func_exit(); return 0; } @@ -1732,7 +1733,7 @@ static void sx_put_char(struct tty_struct * tty, unsigned char ch) return; } dprintk (SX_DEBUG_TX, "check tty: %p %p\n", tty, port->xmit_buf); - if (!port->xmit_buf) { + if (!tty || !port->xmit_buf) { func_exit(); return; } @@ -2476,7 +2477,7 @@ static int __init specialix_init(void) #endif for (i = 0; i < SX_NBOARD; i++) - spin_lock_init(&sx_board[i].lock); + sx_board[i].lock = SPIN_LOCK_UNLOCKED; if (sx_init_drivers()) { func_exit(); @@ -2584,12 +2585,6 @@ static void __exit specialix_exit_module(void) func_exit(); } -static struct pci_device_id specialx_pci_tbl[] __devinitdata = { - { PCI_DEVICE(PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_IO8) }, - { } -}; -MODULE_DEVICE_TABLE(pci, specialx_pci_tbl); - module_init(specialix_init_module); module_exit(specialix_exit_module); diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 3beb2203d..a9c5a7230 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c @@ -26,6 +26,7 @@ /*****************************************************************************/ +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -138,6 +140,15 @@ static char *stl_drvversion = "5.6.0"; static struct tty_driver *stl_serial; +/* + * We will need to allocate a temporary write buffer for chars that + * come direct from user space. The problem is that a copy from user + * space might cause a page fault (typically on a system that is + * swapping!). All ports will share one buffer - since if the system + * is already swapping a shared buffer won't make things any worse. + */ +static char *stl_tmpwritebuf; + /* * Define a local default termios struct. All ports will be created * with this termios initially. Basically all it defines is a raw port @@ -351,14 +362,6 @@ static unsigned char stl_vecmap[] = { 0xff, 0xff, 0x00, 0x02, 0x01, 0xff, 0xff, 0x03 }; -/* - * Lock ordering is that you may not take stallion_lock holding - * brd_lock. - */ - -static spinlock_t brd_lock; /* Guard the board mapping */ -static spinlock_t stallion_lock; /* Guard the tty driver */ - /* * Set up enable and disable macros for the ECH boards. They require * the secondary io address space to be activated and deactivated. @@ -707,7 +710,7 @@ static unsigned int sc26198_baudtable[] = { * Define the driver info for a user level control device. Used mainly * to get at port stats - only not using the port device itself. */ -static const struct file_operations stl_fsiomem = { +static struct file_operations stl_fsiomem = { .owner = THIS_MODULE, .ioctl = stl_memioctl, }; @@ -722,7 +725,17 @@ static struct class *stallion_class; static int __init stallion_module_init(void) { + unsigned long flags; + +#ifdef DEBUG + printk("init_module()\n"); +#endif + + save_flags(flags); + cli(); stl_init(); + restore_flags(flags); + return 0; } @@ -733,6 +746,7 @@ static void __exit stallion_module_exit(void) stlbrd_t *brdp; stlpanel_t *panelp; stlport_t *portp; + unsigned long flags; int i, j, k; #ifdef DEBUG @@ -742,6 +756,9 @@ static void __exit stallion_module_exit(void) printk(KERN_INFO "Unloading %s: version %s\n", stl_drvtitle, stl_drvversion); + save_flags(flags); + cli(); + /* * Free up all allocated resources used by the ports. This includes * memory and interrupts. As part of this process we will also do @@ -753,15 +770,21 @@ static void __exit stallion_module_exit(void) if (i) { printk("STALLION: failed to un-register tty driver, " "errno=%d\n", -i); + restore_flags(flags); return; } - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { + devfs_remove("staliomem/%d", i); class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); + } + devfs_remove("staliomem"); if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) printk("STALLION: failed to un-register serial memory device, " "errno=%d\n", -i); class_destroy(stallion_class); + kfree(stl_tmpwritebuf); + for (i = 0; (i < stl_nrbrds); i++) { if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) continue; @@ -791,6 +814,8 @@ static void __exit stallion_module_exit(void) kfree(brdp); stl_brds[i] = (stlbrd_t *) NULL; } + + restore_flags(flags); } module_init(stallion_module_init); @@ -923,7 +948,7 @@ static stlbrd_t *stl_allocbrd(void) brdp = kzalloc(sizeof(stlbrd_t), GFP_KERNEL); if (!brdp) { - printk("STALLION: failed to allocate memory (size=%Zd)\n", + printk("STALLION: failed to allocate memory (size=%d)\n", sizeof(stlbrd_t)); return NULL; } @@ -1041,17 +1066,16 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp) rc = 0; doclocal = 0; - spin_lock_irqsave(&stallion_lock, flags); - if (portp->tty->termios->c_cflag & CLOCAL) doclocal++; + save_flags(flags); + cli(); portp->openwaitcnt++; if (! tty_hung_up_p(filp)) portp->refcount--; for (;;) { - /* Takes brd_lock internally */ stl_setsignals(portp, 1, 1); if (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) { @@ -1069,14 +1093,13 @@ static int stl_waitcarrier(stlport_t *portp, struct file *filp) rc = -ERESTARTSYS; break; } - /* FIXME */ interruptible_sleep_on(&portp->open_wait); } if (! tty_hung_up_p(filp)) portp->refcount++; portp->openwaitcnt--; - spin_unlock_irqrestore(&stallion_lock, flags); + restore_flags(flags); return rc; } @@ -1096,15 +1119,16 @@ static void stl_close(struct tty_struct *tty, struct file *filp) if (portp == (stlport_t *) NULL) return; - spin_lock_irqsave(&stallion_lock, flags); + save_flags(flags); + cli(); if (tty_hung_up_p(filp)) { - spin_unlock_irqrestore(&stallion_lock, flags); + restore_flags(flags); return; } if ((tty->count == 1) && (portp->refcount != 1)) portp->refcount = 1; if (portp->refcount-- > 1) { - spin_unlock_irqrestore(&stallion_lock, flags); + restore_flags(flags); return; } @@ -1118,18 +1142,11 @@ static void stl_close(struct tty_struct *tty, struct file *filp) * (The sc26198 has no "end-of-data" interrupt only empty FIFO) */ tty->closing = 1; - - spin_unlock_irqrestore(&stallion_lock, flags); - if (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE) tty_wait_until_sent(tty, portp->closing_wait); stl_waituntilsent(tty, (HZ / 2)); - - spin_lock_irqsave(&stallion_lock, flags); portp->flags &= ~ASYNC_INITIALIZED; - spin_unlock_irqrestore(&stallion_lock, flags); - stl_disableintrs(portp); if (tty->termios->c_cflag & HUPCL) stl_setsignals(portp, 0, 0); @@ -1156,6 +1173,7 @@ static void stl_close(struct tty_struct *tty, struct file *filp) portp->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); wake_up_interruptible(&portp->close_wait); + restore_flags(flags); } /*****************************************************************************/ @@ -1177,6 +1195,9 @@ static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count (int) tty, (int) buf, count); #endif + if ((tty == (struct tty_struct *) NULL) || + (stl_tmpwritebuf == (char *) NULL)) + return 0; portp = tty->driver_data; if (portp == (stlport_t *) NULL) return 0; @@ -1281,6 +1302,11 @@ static void stl_flushchars(struct tty_struct *tty) if (portp->tx.buf == (char *) NULL) return; +#if 0 + if (tty->stopped || tty->hw_stopped || + (portp->tx.head == portp->tx.tail)) + return; +#endif stl_startrxtx(portp, -1, 1); } @@ -1951,14 +1977,12 @@ static int stl_eiointr(stlbrd_t *brdp) unsigned int iobase; int handled = 0; - spin_lock(&brd_lock); panelp = brdp->panels[0]; iobase = panelp->iobase; while (inb(brdp->iostatus) & EIO_INTRPEND) { handled = 1; (* panelp->isr)(panelp, iobase); } - spin_unlock(&brd_lock); return handled; } @@ -2144,7 +2168,7 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) portp = kzalloc(sizeof(stlport_t), GFP_KERNEL); if (!portp) { printk("STALLION: failed to allocate memory " - "(size=%Zd)\n", sizeof(stlport_t)); + "(size=%d)\n", sizeof(stlport_t)); break; } @@ -2280,7 +2304,7 @@ static inline int stl_initeio(stlbrd_t *brdp) panelp = kzalloc(sizeof(stlpanel_t), GFP_KERNEL); if (!panelp) { printk(KERN_WARNING "STALLION: failed to allocate memory " - "(size=%Zd)\n", sizeof(stlpanel_t)); + "(size=%d)\n", sizeof(stlpanel_t)); return -ENOMEM; } @@ -2302,7 +2326,7 @@ static inline int stl_initeio(stlbrd_t *brdp) brdp->nrpanels = 1; brdp->state |= BRD_FOUND; brdp->hwid = status; - if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { printk("STALLION: failed to register interrupt " "routine for %s irq=%d\n", name, brdp->irq); rc = -ENODEV; @@ -2454,7 +2478,7 @@ static inline int stl_initech(stlbrd_t *brdp) panelp = kzalloc(sizeof(stlpanel_t), GFP_KERNEL); if (!panelp) { printk("STALLION: failed to allocate memory " - "(size=%Zd)\n", sizeof(stlpanel_t)); + "(size=%d)\n", sizeof(stlpanel_t)); break; } panelp->magic = STL_PANELMAGIC; @@ -2512,7 +2536,7 @@ static inline int stl_initech(stlbrd_t *brdp) outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); brdp->state |= BRD_FOUND; - if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { + if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { printk("STALLION: failed to register interrupt " "routine for %s irq=%d\n", name, brdp->irq); i = -ENODEV; @@ -2855,7 +2879,8 @@ static int stl_getportstats(stlport_t *portp, comstats_t __user *cp) portp->stats.lflags = 0; portp->stats.rxbuffered = 0; - spin_lock_irqsave(&stallion_lock, flags); + save_flags(flags); + cli(); if (portp->tty != (struct tty_struct *) NULL) { if (portp->tty->driver_data == portp) { portp->stats.ttystate = portp->tty->flags; @@ -2869,7 +2894,7 @@ static int stl_getportstats(stlport_t *portp, comstats_t __user *cp) } } } - spin_unlock_irqrestore(&stallion_lock, flags); + restore_flags(flags); head = portp->tx.head; tail = portp->tx.tail; @@ -3024,31 +3049,42 @@ static int __init stl_init(void) int i; printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion); - spin_lock_init(&stallion_lock); - spin_lock_init(&brd_lock); - stl_initbrds(); stl_serial = alloc_tty_driver(STL_MAXBRDS * STL_MAXPORTS); if (!stl_serial) return -1; +/* + * Allocate a temporary write buffer. + */ + stl_tmpwritebuf = kmalloc(STL_TXBUFSIZE, GFP_KERNEL); + if (!stl_tmpwritebuf) + printk("STALLION: failed to allocate memory (size=%d)\n", + STL_TXBUFSIZE); + /* * Set up a character driver for per board stuff. This is mainly used * to do stats ioctls on the ports. */ if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stl_fsiomem)) printk("STALLION: failed to register serial board device\n"); + devfs_mk_dir("staliomem"); stallion_class = class_create(THIS_MODULE, "staliomem"); - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { + devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), + S_IFCHR|S_IRUSR|S_IWUSR, + "staliomem/%d", i); class_device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); + } stl_serial->owner = THIS_MODULE; stl_serial->driver_name = stl_drvname; stl_serial->name = "ttyE"; + stl_serial->devfs_name = "tts/E"; stl_serial->major = STL_SERIALMAJOR; stl_serial->minor_start = 0; stl_serial->type = TTY_DRIVER_TYPE_SERIAL; @@ -3111,13 +3147,11 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) unsigned int gfrcr; int chipmask, i, j; int nrchips, uartaddr, ioaddr; - unsigned long flags; #ifdef DEBUG printk("stl_panelinit(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp); #endif - spin_lock_irqsave(&brd_lock, flags); BRDENABLE(panelp->brdnr, panelp->pagenr); /* @@ -3155,7 +3189,6 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) } BRDDISABLE(panelp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); return chipmask; } @@ -3167,7 +3200,6 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) { - unsigned long flags; #ifdef DEBUG printk("stl_cd1400portinit(brdp=%x,panelp=%x,portp=%x)\n", (int) brdp, (int) panelp, (int) portp); @@ -3177,7 +3209,6 @@ static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *po (portp == (stlport_t *) NULL)) return; - spin_lock_irqsave(&brd_lock, flags); portp->ioaddr = panelp->iobase + (((brdp->brdtype == BRD_ECHPCI) || (portp->portnr < 8)) ? 0 : EREG_BANKSIZE); portp->uartaddr = (portp->portnr & 0x04) << 5; @@ -3188,7 +3219,6 @@ static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *po stl_cd1400setreg(portp, LIVR, (portp->portnr << 3)); portp->hwid = stl_cd1400getreg(portp, GFRCR); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); } /*****************************************************************************/ @@ -3398,7 +3428,8 @@ static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp) tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP]); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x3)); srer = stl_cd1400getreg(portp, SRER); @@ -3435,7 +3466,7 @@ static void stl_cd1400setport(stlport_t *portp, struct termios *tiosp) portp->sigs &= ~TIOCM_CD; stl_cd1400setreg(portp, SRER, ((srer & ~sreroff) | sreron)); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3461,7 +3492,8 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts) if (rts > 0) msvr2 = MSVR2_RTS; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); if (rts >= 0) @@ -3469,7 +3501,7 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts) if (dtr >= 0) stl_cd1400setreg(portp, MSVR1, msvr1); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3488,13 +3520,14 @@ static int stl_cd1400getsignals(stlport_t *portp) printk("stl_cd1400getsignals(portp=%x)\n", (int) portp); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); msvr1 = stl_cd1400getreg(portp, MSVR1); msvr2 = stl_cd1400getreg(portp, MSVR2); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); sigs = 0; sigs |= (msvr1 & MSVR1_DCD) ? TIOCM_CD : 0; @@ -3536,14 +3569,15 @@ static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx) else if (rx > 0) ccr |= CCR_RXENABLE; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); stl_cd1400ccrwait(portp); stl_cd1400setreg(portp, CCR, ccr); stl_cd1400ccrwait(portp); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3575,7 +3609,8 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx) else if (rx > 0) sreron |= SRER_RXDATA; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); stl_cd1400setreg(portp, SRER, @@ -3583,7 +3618,7 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx) BRDDISABLE(portp->brdnr); if (tx > 0) set_bit(ASYI_TXBUSY, &portp->istate); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3599,12 +3634,13 @@ static void stl_cd1400disableintrs(stlport_t *portp) #ifdef DEBUG printk("stl_cd1400disableintrs(portp=%x)\n", (int) portp); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); stl_cd1400setreg(portp, SRER, 0); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3617,7 +3653,8 @@ static void stl_cd1400sendbreak(stlport_t *portp, int len) printk("stl_cd1400sendbreak(portp=%x,len=%d)\n", (int) portp, len); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); stl_cd1400setreg(portp, SRER, @@ -3627,7 +3664,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, int len) portp->brklen = len; if (len == 1) portp->stats.txbreaks++; - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3651,7 +3688,8 @@ static void stl_cd1400flowctrl(stlport_t *portp, int state) if (tty == (struct tty_struct *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); @@ -3691,7 +3729,7 @@ static void stl_cd1400flowctrl(stlport_t *portp, int state) } BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3715,7 +3753,8 @@ static void stl_cd1400sendflow(stlport_t *portp, int state) if (tty == (struct tty_struct *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); if (state) { @@ -3730,7 +3769,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int state) stl_cd1400ccrwait(portp); } BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3746,7 +3785,8 @@ static void stl_cd1400flush(stlport_t *portp) if (portp == (stlport_t *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_cd1400setreg(portp, CAR, (portp->portnr & 0x03)); stl_cd1400ccrwait(portp); @@ -3754,7 +3794,7 @@ static void stl_cd1400flush(stlport_t *portp) stl_cd1400ccrwait(portp); portp->tx.tail = portp->tx.head; BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -3793,7 +3833,6 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) (int) panelp, iobase); #endif - spin_lock(&brd_lock); outb(SVRR, iobase); svrtype = inb(iobase + EREG_DATA); if (panelp->nrports > 4) { @@ -3807,8 +3846,6 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) stl_cd1400txisr(panelp, iobase); else if (svrtype & SVRR_MDM) stl_cd1400mdmisr(panelp, iobase); - - spin_unlock(&brd_lock); } /*****************************************************************************/ @@ -4396,7 +4433,8 @@ static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp) tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP]); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_sc26198setreg(portp, IMR, 0); stl_sc26198updatereg(portp, MR0, mr0); @@ -4423,7 +4461,7 @@ static void stl_sc26198setport(stlport_t *portp, struct termios *tiosp) portp->imr = (portp->imr & ~imroff) | imron; stl_sc26198setreg(portp, IMR, portp->imr); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4453,12 +4491,13 @@ static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts) else if (rts > 0) iopioron |= IPR_RTS; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_sc26198setreg(portp, IOPIOR, ((stl_sc26198getreg(portp, IOPIOR) & ~iopioroff) | iopioron)); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4477,11 +4516,12 @@ static int stl_sc26198getsignals(stlport_t *portp) printk("stl_sc26198getsignals(portp=%x)\n", (int) portp); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); ipr = stl_sc26198getreg(portp, IPR); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); sigs = 0; sigs |= (ipr & IPR_DCD) ? 0 : TIOCM_CD; @@ -4518,12 +4558,13 @@ static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx) else if (rx > 0) ccr |= CR_RXENABLE; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_sc26198setreg(portp, SCCR, ccr); BRDDISABLE(portp->brdnr); portp->crenable = ccr; - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4552,14 +4593,15 @@ static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx) else if (rx > 0) imr |= IR_RXRDY | IR_RXBREAK | IR_RXWATCHDOG; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_sc26198setreg(portp, IMR, imr); BRDDISABLE(portp->brdnr); portp->imr = imr; if (tx > 0) set_bit(ASYI_TXBUSY, &portp->istate); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4576,12 +4618,13 @@ static void stl_sc26198disableintrs(stlport_t *portp) printk("stl_sc26198disableintrs(portp=%x)\n", (int) portp); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); portp->imr = 0; stl_sc26198setreg(portp, IMR, 0); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4594,7 +4637,8 @@ static void stl_sc26198sendbreak(stlport_t *portp, int len) printk("stl_sc26198sendbreak(portp=%x,len=%d)\n", (int) portp, len); #endif - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); if (len == 1) { stl_sc26198setreg(portp, SCCR, CR_TXSTARTBREAK); @@ -4603,7 +4647,7 @@ static void stl_sc26198sendbreak(stlport_t *portp, int len) stl_sc26198setreg(portp, SCCR, CR_TXSTOPBREAK); } BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4628,7 +4672,8 @@ static void stl_sc26198flowctrl(stlport_t *portp, int state) if (tty == (struct tty_struct *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); if (state) { @@ -4674,7 +4719,7 @@ static void stl_sc26198flowctrl(stlport_t *portp, int state) } BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4699,7 +4744,8 @@ static void stl_sc26198sendflow(stlport_t *portp, int state) if (tty == (struct tty_struct *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); if (state) { mr0 = stl_sc26198getreg(portp, MR0); @@ -4719,7 +4765,7 @@ static void stl_sc26198sendflow(stlport_t *portp, int state) stl_sc26198setreg(portp, MR0, mr0); } BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4735,13 +4781,14 @@ static void stl_sc26198flush(stlport_t *portp) if (portp == (stlport_t *) NULL) return; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); stl_sc26198setreg(portp, SCCR, CR_TXRESET); stl_sc26198setreg(portp, SCCR, portp->crenable); BRDDISABLE(portp->brdnr); portp->tx.tail = portp->tx.head; - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); } /*****************************************************************************/ @@ -4768,11 +4815,12 @@ static int stl_sc26198datastate(stlport_t *portp) if (test_bit(ASYI_TXBUSY, &portp->istate)) return 1; - spin_lock_irqsave(&brd_lock, flags); + save_flags(flags); + cli(); BRDENABLE(portp->brdnr, portp->pagenr); sr = stl_sc26198getreg(portp, SR); BRDDISABLE(portp->brdnr); - spin_unlock_irqrestore(&brd_lock, flags); + restore_flags(flags); return (sr & SR_TXEMPTY) ? 0 : 1; } @@ -4830,8 +4878,6 @@ static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase) stlport_t *portp; unsigned int iack; - spin_lock(&brd_lock); - /* * Work around bug in sc26198 chip... Cannot have A6 address * line of UART high, else iack will be returned as 0. @@ -4847,8 +4893,6 @@ static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase) stl_sc26198txisr(portp); else stl_sc26198otherisr(portp, iack); - - spin_unlock(&brd_lock); } /*****************************************************************************/ diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 8cc148795..3b4747230 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c @@ -203,7 +203,9 @@ #define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $" #define RCS_REV "$Revision: 1.33 $" + #include +#include #include #include #include @@ -408,7 +410,7 @@ static struct real_driver sx_real_driver = { * */ -static const struct file_operations sx_fw_fops = { +static struct file_operations sx_fw_fops = { .owner = THIS_MODULE, .ioctl = sx_fw_ioctl, }; @@ -1991,7 +1993,7 @@ static int sx_init_board (struct sx_board *board) if(board->irq > 0) { /* fixed irq, probably PCI */ if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */ - if(request_irq(board->irq, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) { + if(request_irq(board->irq, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) { printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq); board->irq = 0; } @@ -2003,7 +2005,7 @@ static int sx_init_board (struct sx_board *board) int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK); for(irqnr = 15; irqnr > 0; irqnr--) if(irqmask & (1 << irqnr)) - if(! request_irq(irqnr, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) + if(! request_irq(irqnr, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) break; if(! irqnr) printk(KERN_ERR "sx: Cannot allocate IRQ.\n"); @@ -2318,7 +2320,7 @@ static int sx_init_portstructs (int nboards, int nports) #ifdef NEW_WRITE_LOCKING port->gs.port_write_mutex = MUTEX; #endif - spin_lock_init(&port->gs.driver_lock); + port->gs.driver_lock = SPIN_LOCK_UNLOCKED; /* * Initializing wait queue */ diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index dc8126096..fee2aca3f 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -63,6 +63,7 @@ #define MAX_PCI_DEVICES 10 #define MAX_TOTAL_DEVICES 20 +#include #include #include #include @@ -1343,12 +1344,8 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info ) } else info->input_signal_events.dcd_down++; #ifdef CONFIG_HDLC - if (info->netcount) { - if (status & MISCSTATUS_DCD) - netif_carrier_on(info->netdev); - else - netif_carrier_off(info->netdev); - } + if (info->netcount) + hdlc_set_carrier(status & MISCSTATUS_DCD, info->netdev); #endif } if (status & MISCSTATUS_CTS_LATCHED) @@ -7847,10 +7844,8 @@ static int hdlcdev_open(struct net_device *dev) spin_lock_irqsave(&info->irq_spinlock, flags); usc_get_serial_signals(info); spin_unlock_irqrestore(&info->irq_spinlock, flags); - if (info->serial_signals & SerialSignal_DCD) - netif_carrier_on(dev); - else - netif_carrier_off(dev); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + return 0; } @@ -8155,7 +8150,7 @@ static int __devinit synclink_init_one (struct pci_dev *dev, info->bus_type = MGSL_BUS_TYPE_PCI; info->io_addr_size = 8; - info->irq_flags = IRQF_SHARED; + info->irq_flags = SA_SHIRQ; if (dev->device == 0x0210) { /* Version 1 PCI9030 based universal PCI adapter */ diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 2f07b0855..b4d1f4eea 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -46,6 +46,7 @@ //#define DBGRBUF(info) dump_rbufs(info) +#include #include #include #include @@ -100,7 +101,6 @@ MODULE_LICENSE("GPL"); static struct pci_device_id pci_table[] = { {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, - {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT2_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_MICROGATE, SYNCLINK_GT4_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {PCI_VENDOR_ID_MICROGATE, SYNCLINK_AC_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, {0,}, /* terminate list */ @@ -391,8 +391,8 @@ static MGSL_PARAMS default_params = { #define DESC_LIST_SIZE 4096 #define MASK_PARITY BIT1 -#define MASK_FRAMING BIT0 -#define MASK_BREAK BIT14 +#define MASK_FRAMING BIT2 +#define MASK_BREAK BIT3 #define MASK_OVERRUN BIT4 #define GSR 0x00 /* global status */ @@ -870,7 +870,7 @@ static int write(struct tty_struct *tty, goto cleanup; DBGINFO(("%s write count=%d\n", info->device_name, count)); - if (!info->tx_buf) + if (!tty || !info->tx_buf) goto cleanup; if (count > info->max_frame_size) { @@ -924,7 +924,7 @@ static void put_char(struct tty_struct *tty, unsigned char ch) if (sanity_check(info, tty->name, "put_char")) return; DBGINFO(("%s put_char(%d)\n", info->device_name, ch)); - if (!info->tx_buf) + if (!tty || !info->tx_buf) return; spin_lock_irqsave(&info->lock,flags); if (!info->tx_active && (info->tx_count < info->max_frame_size)) @@ -1497,10 +1497,8 @@ static int hdlcdev_open(struct net_device *dev) spin_lock_irqsave(&info->lock, flags); get_signals(info); spin_unlock_irqrestore(&info->lock, flags); - if (info->signals & SerialSignal_DCD) - netif_carrier_on(dev); - else - netif_carrier_off(dev); + hdlc_set_carrier(info->signals & SerialSignal_DCD, dev); + return 0; } @@ -1800,17 +1798,17 @@ static void rx_async(struct slgt_info *info) stat = 0; - if ((status = *(p+1) & (BIT1 + BIT0))) { - if (status & BIT1) + if ((status = *(p+1) & (BIT9 + BIT8))) { + if (status & BIT9) icount->parity++; - else if (status & BIT0) + else if (status & BIT8) icount->frame++; /* discard char if tty control flags say so */ if (status & info->ignore_status_mask) continue; - if (status & BIT1) + if (status & BIT9) stat = TTY_PARITY; - else if (status & BIT0) + else if (status & BIT8) stat = TTY_FRAME; } if (tty) { @@ -1999,12 +1997,8 @@ static void dcd_change(struct slgt_info *info) info->input_signal_events.dcd_down++; } #ifdef CONFIG_HDLC - if (info->netcount) { - if (info->signals & SerialSignal_DCD) - netif_carrier_on(info->netdev); - else - netif_carrier_off(info->netdev); - } + if (info->netcount) + hdlc_set_carrier(info->signals & SerialSignal_DCD, info->netdev); #endif wake_up_interruptible(&info->status_event_wait_q); wake_up_interruptible(&info->event_wait_q); @@ -2521,8 +2515,7 @@ static int set_txidle(struct slgt_info *info, int idle_mode) DBGINFO(("%s set_txidle(%d)\n", info->device_name, idle_mode)); spin_lock_irqsave(&info->lock,flags); info->idle_mode = idle_mode; - if (info->params.mode != MGSL_MODE_ASYNC) - tx_set_idle(info); + tx_set_idle(info); spin_unlock_irqrestore(&info->lock,flags); return 0; } @@ -3083,7 +3076,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp, static int alloc_tmp_rbuf(struct slgt_info *info) { - info->tmp_rbuf = kmalloc(info->max_frame_size + 5, GFP_KERNEL); + info->tmp_rbuf = kmalloc(info->max_frame_size, GFP_KERNEL); if (info->tmp_rbuf == NULL) return -ENOMEM; return 0; @@ -3283,9 +3276,6 @@ static void add_device(struct slgt_info *info) case SYNCLINK_GT_DEVICE_ID: devstr = "GT"; break; - case SYNCLINK_GT2_DEVICE_ID: - devstr = "GT2"; - break; case SYNCLINK_GT4_DEVICE_ID: devstr = "GT4"; break; @@ -3349,7 +3339,7 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev info->phys_reg_addr = pci_resource_start(pdev,0); info->bus_type = MGSL_BUS_TYPE_PCI; - info->irq_flags = IRQF_SHARED; + info->irq_flags = SA_SHIRQ; info->init_error = -1; /* assume error, set to 0 on successful init */ } @@ -3363,9 +3353,7 @@ static void device_init(int adapter_num, struct pci_dev *pdev) int i; int port_count = 1; - if (pdev->device == SYNCLINK_GT2_DEVICE_ID) - port_count = 2; - else if (pdev->device == SYNCLINK_GT4_DEVICE_ID) + if (pdev->device == SYNCLINK_GT4_DEVICE_ID) port_count = 4; /* allocate device instances for all ports */ @@ -3952,6 +3940,8 @@ static void async_mode(struct slgt_info *info) msc_set_vcr(info); + tx_set_idle(info); + /* SCR (serial control) * * 15 1=tx req on FIFO half empty @@ -4022,7 +4012,7 @@ static void hdlc_mode(struct slgt_info *info) case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: val |= BIT12 + BIT11 + BIT10; break; } - switch (info->params.crc_type & HDLC_CRC_MASK) + switch (info->params.crc_type) { case HDLC_CRC_16_CCITT: val |= BIT9; break; case HDLC_CRC_32_CCITT: val |= BIT9 + BIT8; break; @@ -4083,7 +4073,7 @@ static void hdlc_mode(struct slgt_info *info) case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: val |= BIT12 + BIT11 + BIT10; break; } - switch (info->params.crc_type & HDLC_CRC_MASK) + switch (info->params.crc_type) { case HDLC_CRC_16_CCITT: val |= BIT9; break; case HDLC_CRC_32_CCITT: val |= BIT9 + BIT8; break; @@ -4185,38 +4175,17 @@ static void hdlc_mode(struct slgt_info *info) */ static void tx_set_idle(struct slgt_info *info) { - unsigned char val; - unsigned short tcr; + unsigned char val = 0xff; - /* if preamble enabled (tcr[6] == 1) then tx idle size = 8 bits - * else tcr[5:4] = tx idle size: 00 = 8 bits, 01 = 16 bits - */ - tcr = rd_reg16(info, TCR); - if (info->idle_mode & HDLC_TXIDLE_CUSTOM_16) { - /* disable preamble, set idle size to 16 bits */ - tcr = (tcr & ~(BIT6 + BIT5)) | BIT4; - /* MSB of 16 bit idle specified in tx preamble register (TPR) */ - wr_reg8(info, TPR, (unsigned char)((info->idle_mode >> 8) & 0xff)); - } else if (!(tcr & BIT6)) { - /* preamble is disabled, set idle size to 8 bits */ - tcr &= ~(BIT5 + BIT4); - } - wr_reg16(info, TCR, tcr); - - if (info->idle_mode & (HDLC_TXIDLE_CUSTOM_8 | HDLC_TXIDLE_CUSTOM_16)) { - /* LSB of custom tx idle specified in tx idle register */ - val = (unsigned char)(info->idle_mode & 0xff); - } else { - /* standard 8 bit idle patterns */ - switch(info->idle_mode) - { - case HDLC_TXIDLE_FLAGS: val = 0x7e; break; - case HDLC_TXIDLE_ALT_ZEROS_ONES: - case HDLC_TXIDLE_ALT_MARK_SPACE: val = 0xaa; break; - case HDLC_TXIDLE_ZEROS: - case HDLC_TXIDLE_SPACE: val = 0x00; break; - default: val = 0xff; - } + switch(info->idle_mode) + { + case HDLC_TXIDLE_FLAGS: val = 0x7e; break; + case HDLC_TXIDLE_ALT_ZEROS_ONES: val = 0xaa; break; + case HDLC_TXIDLE_ZEROS: val = 0x00; break; + case HDLC_TXIDLE_ONES: val = 0xff; break; + case HDLC_TXIDLE_ALT_MARK_SPACE: val = 0xaa; break; + case HDLC_TXIDLE_SPACE: val = 0x00; break; + case HDLC_TXIDLE_MARK: val = 0xff; break; } wr_reg8(info, TIR, val); @@ -4344,12 +4313,6 @@ static int rx_get_frame(struct slgt_info *info) unsigned long flags; struct tty_struct *tty = info->tty; unsigned char addr_field = 0xff; - unsigned int crc_size = 0; - - switch (info->params.crc_type & HDLC_CRC_MASK) { - case HDLC_CRC_16_CCITT: crc_size = 2; break; - case HDLC_CRC_32_CCITT: crc_size = 4; break; - } check_again: @@ -4394,7 +4357,7 @@ check_again: status = desc_status(info->rbufs[end]); /* ignore CRC bit if not using CRC (bit is undefined) */ - if ((info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_NONE) + if (info->params.crc_type == HDLC_CRC_NONE) status &= ~BIT1; if (framesize == 0 || @@ -4403,34 +4366,34 @@ check_again: goto check_again; } - if (framesize < (2 + crc_size) || status & BIT0) { - info->icount.rxshort++; + if (framesize < 2 || status & (BIT1+BIT0)) { + if (framesize < 2 || (status & BIT0)) + info->icount.rxshort++; + else + info->icount.rxcrc++; framesize = 0; - } else if (status & BIT1) { - info->icount.rxcrc++; - if (!(info->params.crc_type & HDLC_CRC_RETURN_EX)) - framesize = 0; - } #ifdef CONFIG_HDLC - if (framesize == 0) { - struct net_device_stats *stats = hdlc_stats(info->netdev); - stats->rx_errors++; - stats->rx_frame_errors++; - } + { + struct net_device_stats *stats = hdlc_stats(info->netdev); + stats->rx_errors++; + stats->rx_frame_errors++; + } #endif + } else { + /* adjust frame size for CRC, if any */ + if (info->params.crc_type == HDLC_CRC_16_CCITT) + framesize -= 2; + else if (info->params.crc_type == HDLC_CRC_32_CCITT) + framesize -= 4; + } DBGBH(("%s rx frame status=%04X size=%d\n", info->device_name, status, framesize)); DBGDATA(info, info->rbufs[start].buf, min_t(int, framesize, DMABUFSIZE), "rx"); if (framesize) { - if (!(info->params.crc_type & HDLC_CRC_RETURN_EX)) { - framesize -= crc_size; - crc_size = 0; - } - - if (framesize > info->max_frame_size + crc_size) + if (framesize > info->max_frame_size) info->icount.rxlong++; else { /* copy dma buffer(s) to contiguous temp buffer */ @@ -4450,11 +4413,6 @@ check_again: i = 0; } - if (info->params.crc_type & HDLC_CRC_RETURN_EX) { - *p = (status & BIT1) ? RX_CRC_ERROR : RX_OK; - framesize++; - } - #ifdef CONFIG_HDLC if (info->netcount) hdlcdev_rx(info,info->tmp_rbuf, framesize); @@ -4713,13 +4671,13 @@ static int loopback_test(struct slgt_info *info) static int adapter_test(struct slgt_info *info) { DBGINFO(("testing %s\n", info->device_name)); - if (register_test(info) < 0) { + if ((info->init_error = register_test(info)) < 0) { printk("register test failure %s addr=%08X\n", info->device_name, info->phys_reg_addr); - } else if (irq_test(info) < 0) { + } else if ((info->init_error = irq_test(info)) < 0) { printk("IRQ test failure %s IRQ=%d\n", info->device_name, info->irq_level); - } else if (loopback_test(info) < 0) { + } else if ((info->init_error = loopback_test(info)) < 0) { printk("loopback test failure %s\n", info->device_name); } return info->init_error; diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 66f3754fb..858740131 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -34,6 +34,7 @@ #define MAX_DEVICES 12 +#include #include #include #include @@ -987,7 +988,7 @@ static int write(struct tty_struct *tty, if (sanity_check(info, tty->name, "write")) goto cleanup; - if (!info->tx_buf) + if (!tty || !info->tx_buf) goto cleanup; if (info->params.mode == MGSL_MODE_HDLC) { @@ -1066,7 +1067,7 @@ static void put_char(struct tty_struct *tty, unsigned char ch) if (sanity_check(info, tty->name, "put_char")) return; - if (!info->tx_buf) + if (!tty || !info->tx_buf) return; spin_lock_irqsave(&info->lock,flags); @@ -1752,10 +1753,8 @@ static int hdlcdev_open(struct net_device *dev) spin_lock_irqsave(&info->lock, flags); get_signals(info); spin_unlock_irqrestore(&info->lock, flags); - if (info->serial_signals & SerialSignal_DCD) - netif_carrier_on(dev); - else - netif_carrier_off(dev); + hdlc_set_carrier(info->serial_signals & SerialSignal_DCD, dev); + return 0; } @@ -2524,12 +2523,8 @@ void isr_io_pin( SLMP_INFO *info, u16 status ) } else info->input_signal_events.dcd_down++; #ifdef CONFIG_HDLC - if (info->netcount) { - if (status & SerialSignal_DCD) - netif_carrier_on(info->netdev); - else - netif_carrier_off(info->netdev); - } + if (info->netcount) + hdlc_set_carrier(status & SerialSignal_DCD, info->netdev); #endif } if (status & MISCSTATUS_CTS_LATCHED) @@ -3841,7 +3836,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) info->phys_statctrl_base &= ~(PAGE_SIZE-1); info->bus_type = MGSL_BUS_TYPE_PCI; - info->irq_flags = IRQF_SHARED; + info->irq_flags = SA_SHIRQ; init_timer(&info->tx_timer); info->tx_timer.data = (unsigned long)info; diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index ac22e98da..35082dc12 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -12,6 +12,7 @@ * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ +#include #include #include #include @@ -94,16 +95,11 @@ static struct sysrq_key_op sysrq_unraw_op = { #define sysrq_unraw_op (*(struct sysrq_key_op *)0) #endif /* CONFIG_VT */ +#ifdef CONFIG_KEXEC static void sysrq_handle_crashdump(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { -#ifdef CONFIG_KEXEC crash_kexec(pt_regs); - /* can't get here if crash image is loaded */ - printk("Kexec: Warning: crash image not loaded\n"); -#endif - if(panic_on_oops) - panic("SysRq-triggered panic!\n"); } static struct sysrq_key_op sysrq_crashdump_op = { .handler = sysrq_handle_crashdump, @@ -111,11 +107,13 @@ static struct sysrq_key_op sysrq_crashdump_op = { .action_msg = "Trigger a crashdump", .enable_mask = SYSRQ_ENABLE_DUMP, }; +#else +#define sysrq_crashdump_op (*(struct sysrq_key_op *)0) +#endif static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { - lockdep_off(); local_irq_enable(); emergency_restart(); } @@ -150,13 +148,12 @@ static struct sysrq_key_op sysrq_mountro_op = { .enable_mask = SYSRQ_ENABLE_REMOUNT, }; -#ifdef CONFIG_LOCKDEP +#ifdef CONFIG_DEBUG_MUTEXES static void sysrq_handle_showlocks(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { - debug_show_all_locks(); + mutex_debug_show_all_locks(); } - static struct sysrq_key_op sysrq_showlocks_op = { .handler = sysrq_handle_showlocks, .help_msg = "show-all-locks(D)", diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c index bb1bad4c1..a80c83210 100644 --- a/drivers/char/tb0219.c +++ b/drivers/char/tb0219.c @@ -255,7 +255,7 @@ static int tanbac_tb0219_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations tb0219_fops = { +static struct file_operations tb0219_fops = { .owner = THIS_MODULE, .read = tanbac_tb0219_read, .write = tanbac_tb0219_write, diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index d30dc09db..079db5a93 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c @@ -42,6 +42,7 @@ */ #undef DEBUG /* change to #define to get debugging * output - for pr_debug() */ +#include #include #include #include @@ -55,6 +56,7 @@ #include #include #include +#include /* DevFs support */ #include /* Our code depend on parport */ #include @@ -381,7 +383,7 @@ tipar_ioctl(struct inode *inode, struct file *file, /* ----- kernel module registering ------------------------------------ */ -static const struct file_operations tipar_fops = { +static struct file_operations tipar_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = tipar_read, @@ -441,6 +443,12 @@ tipar_register(int nr, struct parport *port) class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), NULL, "par%d", nr); + /* Use devfs, tree: /dev/ticables/par/[0..2] */ + err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), + S_IFCHR | S_IRUGO | S_IWUGO, + "ticables/par/%d", nr); + if (err) + goto out_class; /* Display informations */ pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == @@ -452,7 +460,11 @@ tipar_register(int nr, struct parport *port) pr_info("tipar%d: link cable not found\n", nr); err = 0; + goto out; +out_class: + class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr)); + class_destroy(tipar_class); out: return err; } @@ -495,6 +507,9 @@ tipar_init_module(void) goto out; } + /* Use devfs with tree: /dev/ticables/par/[0..2] */ + devfs_mk_dir("ticables/par"); + tipar_class = class_create(THIS_MODULE, "ticables"); if (IS_ERR(tipar_class)) { err = PTR_ERR(tipar_class); @@ -513,6 +528,7 @@ out_class: class_destroy(tipar_class); out_chrdev: + devfs_remove("ticables/par"); unregister_chrdev(TIPAR_MAJOR, "tipar"); out: return err; @@ -533,8 +549,10 @@ tipar_cleanup_module(void) continue; parport_unregister_device(table[i].dev); class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); + devfs_remove("ticables/par/%d", i); } class_destroy(tipar_class); + devfs_remove("ticables/par"); pr_info("tipar: module unloaded\n"); } diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index d2c5ba4e8..f58ad7f68 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c @@ -27,6 +27,7 @@ * MPCBL0010 ATCA computer. */ +#include #include #include #include @@ -208,7 +209,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) /* This device is wired through the FPGA IO space of the ATCA blade * we can't share this IRQ */ result = request_irq(telclk_interrupt, &tlclk_interrupt, - IRQF_DISABLED, "telco_clock", tlclk_interrupt); + SA_INTERRUPT, "telco_clock", tlclk_interrupt); if (result == -EBUSY) { printk(KERN_ERR "tlclk: Interrupt can't be reserved.\n"); return -EBUSY; @@ -247,7 +248,7 @@ static ssize_t tlclk_write(struct file *filp, const char __user *buf, size_t cou return 0; } -static const struct file_operations tlclk_fops = { +static struct file_operations tlclk_fops = { .read = tlclk_read, .write = tlclk_write, .open = tlclk_open, @@ -342,7 +343,7 @@ static ssize_t store_received_ref_clk3b(struct device *d, val = (unsigned char)tmp; spin_lock_irqsave(&event_lock, flags); - SET_PORT_BITS(TLCLK_REG1, 0xdf, val << 1); + SET_PORT_BITS(TLCLK_REG1, 0xef, val << 1); spin_unlock_irqrestore(&event_lock, flags); return strnlen(buf, count); diff --git a/drivers/char/toshiba.c b/drivers/char/toshiba.c index dd36fd04a..e2fb234de 100644 --- a/drivers/char/toshiba.c +++ b/drivers/char/toshiba.c @@ -92,7 +92,7 @@ static int tosh_ioctl(struct inode *, struct file *, unsigned int, unsigned long); -static const struct file_operations tosh_fops = { +static struct file_operations tosh_fops = { .owner = THIS_MODULE, .ioctl = tosh_ioctl, }; diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index a082a2e34..6889e7db3 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -1141,7 +1141,6 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend put_device(dev); clear_bit(chip->dev_num, dev_mask); kfree(chip); - kfree(devname); return NULL; } diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c index ad8ffe492..58a258cec 100644 --- a/drivers/char/tpm/tpm_atmel.c +++ b/drivers/char/tpm/tpm_atmel.c @@ -116,7 +116,7 @@ static u8 tpm_atml_status(struct tpm_chip *chip) return ioread8(chip->vendor.iobase + 1); } -static const struct file_operations atmel_ops = { +static struct file_operations atmel_ops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = tpm_open, diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index 1353b5a6b..adfff21be 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c @@ -338,7 +338,7 @@ static struct attribute *inf_attrs[] = { static struct attribute_group inf_attr_grp = {.attrs = inf_attrs }; -static const struct file_operations inf_ops = { +static struct file_operations inf_ops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = tpm_open, diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 26287aace..4c8bc06c7 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c @@ -226,7 +226,7 @@ static u8 tpm_nsc_status(struct tpm_chip *chip) return inb(chip->vendor.base + NSC_STATUS); } -static const struct file_operations nsc_ops = { +static struct file_operations nsc_ops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = tpm_open, diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index ee7ac6f43..2678034be 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -330,7 +330,7 @@ out_err: return rc; } -static const struct file_operations tis_ops = { +static struct file_operations tis_ops = { .owner = THIS_MODULE, .llseek = no_llseek, .open = tpm_open, @@ -432,19 +432,23 @@ static int interrupts = 1; module_param(interrupts, bool, 0444); MODULE_PARM_DESC(interrupts, "Enable interrupts"); -static int tpm_tis_init(struct device *dev, resource_size_t start, - resource_size_t len) +static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, + const struct pnp_device_id *pnp_id) { u32 vendor, intfcaps, intmask; int rc, i; + unsigned long start, len; struct tpm_chip *chip; + start = pnp_mem_start(pnp_dev, 0); + len = pnp_mem_len(pnp_dev, 0); + if (!start) start = TIS_MEM_BASE; if (!len) len = TIS_MEM_LEN; - if (!(chip = tpm_register_hardware(dev, &tpm_tis))) + if (!(chip = tpm_register_hardware(&pnp_dev->dev, &tpm_tis))) return -ENODEV; chip->vendor.iobase = ioremap(start, len); @@ -461,7 +465,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT); chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT); - dev_info(dev, + dev_info(&pnp_dev->dev, "1.2 TPM (device-id 0x%X, rev-id %d)\n", vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); @@ -469,26 +473,26 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, intfcaps = ioread32(chip->vendor.iobase + TPM_INTF_CAPS(chip->vendor.locality)); - dev_dbg(dev, "TPM interface capabilities (0x%x):\n", + dev_dbg(&pnp_dev->dev, "TPM interface capabilities (0x%x):\n", intfcaps); if (intfcaps & TPM_INTF_BURST_COUNT_STATIC) - dev_dbg(dev, "\tBurst Count Static\n"); + dev_dbg(&pnp_dev->dev, "\tBurst Count Static\n"); if (intfcaps & TPM_INTF_CMD_READY_INT) - dev_dbg(dev, "\tCommand Ready Int Support\n"); + dev_dbg(&pnp_dev->dev, "\tCommand Ready Int Support\n"); if (intfcaps & TPM_INTF_INT_EDGE_FALLING) - dev_dbg(dev, "\tInterrupt Edge Falling\n"); + dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Falling\n"); if (intfcaps & TPM_INTF_INT_EDGE_RISING) - dev_dbg(dev, "\tInterrupt Edge Rising\n"); + dev_dbg(&pnp_dev->dev, "\tInterrupt Edge Rising\n"); if (intfcaps & TPM_INTF_INT_LEVEL_LOW) - dev_dbg(dev, "\tInterrupt Level Low\n"); + dev_dbg(&pnp_dev->dev, "\tInterrupt Level Low\n"); if (intfcaps & TPM_INTF_INT_LEVEL_HIGH) - dev_dbg(dev, "\tInterrupt Level High\n"); + dev_dbg(&pnp_dev->dev, "\tInterrupt Level High\n"); if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT) - dev_dbg(dev, "\tLocality Change Int Support\n"); + dev_dbg(&pnp_dev->dev, "\tLocality Change Int Support\n"); if (intfcaps & TPM_INTF_STS_VALID_INT) - dev_dbg(dev, "\tSts Valid Int Support\n"); + dev_dbg(&pnp_dev->dev, "\tSts Valid Int Support\n"); if (intfcaps & TPM_INTF_DATA_AVAIL_INT) - dev_dbg(dev, "\tData Avail Int Support\n"); + dev_dbg(&pnp_dev->dev, "\tData Avail Int Support\n"); if (request_locality(chip, 0) != 0) { rc = -ENODEV; @@ -519,7 +523,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, iowrite8(i, chip->vendor.iobase + TPM_INT_VECTOR(chip->vendor.locality)); if (request_irq - (i, tis_int_probe, IRQF_SHARED, + (i, tis_int_probe, SA_SHIRQ, chip->vendor.miscdev.name, chip) != 0) { dev_info(chip->dev, "Unable to request irq: %d for probe\n", @@ -554,7 +558,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, chip->vendor.iobase + TPM_INT_VECTOR(chip->vendor.locality)); if (request_irq - (chip->vendor.irq, tis_int_handler, IRQF_SHARED, + (chip->vendor.irq, tis_int_handler, SA_SHIRQ, chip->vendor.miscdev.name, chip) != 0) { dev_info(chip->dev, "Unable to request irq: %d for use\n", @@ -591,16 +595,6 @@ out_err: return rc; } -static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, - const struct pnp_device_id *pnp_id) -{ - resource_size_t start, len; - start = pnp_mem_start(pnp_dev, 0); - len = pnp_mem_len(pnp_dev, 0); - - return tpm_tis_init(&pnp_dev->dev, start, len); -} - static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg) { return tpm_pm_suspend(&dev->dev, msg); @@ -635,36 +629,8 @@ module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444); MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); -static struct device_driver tis_drv = { - .name = "tpm_tis", - .bus = &platform_bus_type, - .owner = THIS_MODULE, - .suspend = tpm_pm_suspend, - .resume = tpm_pm_resume, -}; - -static struct platform_device *pdev; - -static int force; -module_param(force, bool, 0444); -MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry"); static int __init init_tis(void) { - int rc; - - if (force) { - rc = driver_register(&tis_drv); - if (rc < 0) - return rc; - if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0))) - return PTR_ERR(pdev); - if((rc=tpm_tis_init(&pdev->dev, 0, 0)) != 0) { - platform_device_unregister(pdev); - driver_unregister(&tis_drv); - } - return rc; - } - return pnp_register_driver(&tis_pnp_driver); } @@ -689,11 +655,7 @@ static void __exit cleanup_tis(void) tpm_remove_hardware(chip->dev); } spin_unlock(&tis_lock); - if (force) { - platform_device_unregister(pdev); - driver_unregister(&tis_drv); - } else - pnp_unregister_driver(&tis_pnp_driver); + pnp_unregister_driver(&tis_pnp_driver); } module_init(init_tis); diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 855abeab6..12c15826a 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -65,6 +65,7 @@ * alloc_tty_struct() always uses kmalloc() -- Andrew Morton 17Mar01 */ +#include #include #include #include @@ -101,10 +102,10 @@ #include #include #include +#include +#include #include -#include -#include #undef TTY_DEBUG_HANGUP @@ -128,10 +129,11 @@ EXPORT_SYMBOL(tty_std_termios); LIST_HEAD(tty_drivers); /* linked list of tty drivers */ -/* Mutex to protect creating and releasing a tty. This is shared with +/* Semaphore to protect creating and releasing a tty. This is shared with vt.c for deeply disgusting hack reasons */ DEFINE_MUTEX(tty_mutex); -EXPORT_SYMBOL(tty_mutex); + +int console_use_vt = 1; #ifdef CONFIG_UNIX98_PTYS extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */ @@ -156,31 +158,19 @@ int tty_ioctl(struct inode * inode, struct file * file, static int tty_fasync(int fd, struct file * filp, int on); static void release_mem(struct tty_struct *tty, int idx); -/** - * alloc_tty_struct - allocate a tty object - * - * Return a new empty tty structure. The data fields have not - * been initialized in any way but has been zeroed - * - * Locking: none - */ static struct tty_struct *alloc_tty_struct(void) { - return kzalloc(sizeof(struct tty_struct), GFP_KERNEL); + struct tty_struct *tty; + + tty = kmalloc(sizeof(struct tty_struct), GFP_KERNEL); + if (tty) + memset(tty, 0, sizeof(struct tty_struct)); + return tty; } static void tty_buffer_free_all(struct tty_struct *); -/** - * free_tty_struct - free a disused tty - * @tty: tty struct to free - * - * Free the write buffers, tty queue and tty memory itself. - * - * Locking: none. Must be called after tty is definitely unused - */ - static inline void free_tty_struct(struct tty_struct *tty) { kfree(tty->write_buf); @@ -190,17 +180,6 @@ static inline void free_tty_struct(struct tty_struct *tty) #define TTY_NUMBER(tty) ((tty)->index + (tty)->driver->name_base) -/** - * tty_name - return tty naming - * @tty: tty structure - * @buf: buffer for output - * - * Convert a tty structure into a name. The name reflects the kernel - * naming policy and if udev is in use may not reflect user space - * - * Locking: none - */ - char *tty_name(struct tty_struct *tty, char *buf) { if (!tty) /* Hmm. NULL pointer. That's fun. */ @@ -252,7 +231,7 @@ static int check_tty_count(struct tty_struct *tty, const char *routine) "!= #fd's(%d) in %s\n", tty->name, tty->count, count, routine); return count; - } + } #endif return 0; } @@ -261,16 +240,6 @@ static int check_tty_count(struct tty_struct *tty, const char *routine) * Tty buffer allocation management */ -/** - * tty_buffer_free_all - free buffers used by a tty - * @tty: tty to free from - * - * Remove all the buffers pending on a tty whether queued with data - * or in the free ring. Must be called when the tty is no longer in use - * - * Locking: none - */ - static void tty_buffer_free_all(struct tty_struct *tty) { struct tty_buffer *thead; @@ -283,77 +252,40 @@ static void tty_buffer_free_all(struct tty_struct *tty) kfree(thead); } tty->buf.tail = NULL; - tty->buf.memory_used = 0; } -/** - * tty_buffer_init - prepare a tty buffer structure - * @tty: tty to initialise - * - * Set up the initial state of the buffer management for a tty device. - * Must be called before the other tty buffer functions are used. - * - * Locking: none - */ - static void tty_buffer_init(struct tty_struct *tty) { spin_lock_init(&tty->buf.lock); tty->buf.head = NULL; tty->buf.tail = NULL; tty->buf.free = NULL; - tty->buf.memory_used = 0; } -/** - * tty_buffer_alloc - allocate a tty buffer - * @tty: tty device - * @size: desired size (characters) - * - * Allocate a new tty buffer to hold the desired number of characters. - * Return NULL if out of memory or the allocation would exceed the - * per device queue - * - * Locking: Caller must hold tty->buf.lock - */ - -static struct tty_buffer *tty_buffer_alloc(struct tty_struct *tty, size_t size) +static struct tty_buffer *tty_buffer_alloc(size_t size) { - struct tty_buffer *p; - - if (tty->buf.memory_used + size > 65536) - return NULL; - p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC); + struct tty_buffer *p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC); if(p == NULL) return NULL; p->used = 0; p->size = size; p->next = NULL; + p->active = 0; p->commit = 0; p->read = 0; p->char_buf_ptr = (char *)(p->data); p->flag_buf_ptr = (unsigned char *)p->char_buf_ptr + size; - tty->buf.memory_used += size; +/* printk("Flip create %p\n", p); */ return p; } -/** - * tty_buffer_free - free a tty buffer - * @tty: tty owning the buffer - * @b: the buffer to free - * - * Free a tty buffer, or add it to the free list according to our - * internal strategy - * - * Locking: Caller must hold tty->buf.lock - */ +/* Must be called with the tty_read lock held. This needs to acquire strategy + code to decide if we should kfree or relink a given expired buffer */ static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b) { /* Dumb strategy for now - should keep some stats */ - tty->buf.memory_used -= b->size; - WARN_ON(tty->buf.memory_used < 0); - +/* printk("Flip dispose %p\n", b); */ if(b->size >= 512) kfree(b); else { @@ -362,18 +294,6 @@ static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b) } } -/** - * tty_buffer_find - find a free tty buffer - * @tty: tty owning the buffer - * @size: characters wanted - * - * Locate an existing suitable tty buffer or if we are lacking one then - * allocate a new one. We round our buffers off in 256 character chunks - * to get better allocation behaviour. - * - * Locking: Caller must hold tty->buf.lock - */ - static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size) { struct tty_buffer **tbh = &tty->buf.free; @@ -385,28 +305,20 @@ static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size) t->used = 0; t->commit = 0; t->read = 0; - tty->buf.memory_used += t->size; + /* DEBUG ONLY */ +/* memset(t->data, '*', size); */ +/* printk("Flip recycle %p\n", t); */ return t; } tbh = &((*tbh)->next); } /* Round the buffer size out */ size = (size + 0xFF) & ~ 0xFF; - return tty_buffer_alloc(tty, size); + return tty_buffer_alloc(size); /* Should possibly check if this fails for the largest buffer we have queued and recycle that ? */ } -/** - * tty_buffer_request_room - grow tty buffer if needed - * @tty: tty structure - * @size: size desired - * - * Make at least size bytes of linear space available for the tty - * buffer. If we fail return the size we managed to find. - * - * Locking: Takes tty->buf.lock - */ int tty_buffer_request_room(struct tty_struct *tty, size_t size) { struct tty_buffer *b, *n; @@ -418,9 +330,10 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size) /* OPTIMISATION: We could keep a per tty "zero" sized buffer to remove this conditional if its worth it. This would be invisible to the callers */ - if ((b = tty->buf.tail) != NULL) + if ((b = tty->buf.tail) != NULL) { left = b->size - b->used; - else + b->active = 1; + } else left = 0; if (left < size) { @@ -428,10 +341,12 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size) if ((n = tty_buffer_find(tty, size)) != NULL) { if (b != NULL) { b->next = n; + b->active = 0; b->commit = b->used; } else tty->buf.head = n; tty->buf.tail = n; + n->active = 1; } else size = left; } @@ -441,18 +356,6 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size) } EXPORT_SYMBOL_GPL(tty_buffer_request_room); -/** - * tty_insert_flip_string - Add characters to the tty buffer - * @tty: tty structure - * @chars: characters - * @size: size - * - * Queue a series of bytes to the tty buffering. All the characters - * passed are marked as without error. Returns the number added. - * - * Locking: Called functions may take tty->buf.lock - */ - int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size) { @@ -468,27 +371,14 @@ int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, tb->used += space; copied += space; chars += space; - /* There is a small chance that we need to split the data over - several buffers. If this is the case we must loop */ - } while (unlikely(size > copied)); + } + /* There is a small chance that we need to split the data over + several buffers. If this is the case we must loop */ + while (unlikely(size > copied)); return copied; } EXPORT_SYMBOL(tty_insert_flip_string); -/** - * tty_insert_flip_string_flags - Add characters to the tty buffer - * @tty: tty structure - * @chars: characters - * @flags: flag bytes - * @size: size - * - * Queue a series of bytes to the tty buffering. For each character - * the flags array indicates the status of the character. Returns the - * number added. - * - * Locking: Called functions may take tty->buf.lock - */ - int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size) { @@ -505,48 +395,33 @@ int tty_insert_flip_string_flags(struct tty_struct *tty, copied += space; chars += space; flags += space; - /* There is a small chance that we need to split the data over - several buffers. If this is the case we must loop */ - } while (unlikely(size > copied)); + } + /* There is a small chance that we need to split the data over + several buffers. If this is the case we must loop */ + while (unlikely(size > copied)); return copied; } EXPORT_SYMBOL(tty_insert_flip_string_flags); -/** - * tty_schedule_flip - push characters to ldisc - * @tty: tty to push from - * - * Takes any pending buffers and transfers their ownership to the - * ldisc side of the queue. It then schedules those characters for - * processing by the line discipline. - * - * Locking: Takes tty->buf.lock - */ - void tty_schedule_flip(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->buf.lock, flags); - if (tty->buf.tail != NULL) + if (tty->buf.tail != NULL) { + tty->buf.tail->active = 0; tty->buf.tail->commit = tty->buf.tail->used; + } spin_unlock_irqrestore(&tty->buf.lock, flags); schedule_delayed_work(&tty->buf.work, 1); } EXPORT_SYMBOL(tty_schedule_flip); -/** - * tty_prepare_flip_string - make room for characters - * @tty: tty - * @chars: return pointer for character write area - * @size: desired size - * +/* * Prepare a block of space in the buffer for data. Returns the length * available and buffer pointer to the space which is now allocated and * accounted for as ready for normal characters. This is used for drivers * that need their own block copy routines into the buffer. There is no * guarantee the buffer is a DMA target! - * - * Locking: May call functions taking tty->buf.lock */ int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size) @@ -563,20 +438,12 @@ int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_ EXPORT_SYMBOL_GPL(tty_prepare_flip_string); -/** - * tty_prepare_flip_string_flags - make room for characters - * @tty: tty - * @chars: return pointer for character write area - * @flags: return pointer for status flag write area - * @size: desired size - * +/* * Prepare a block of space in the buffer for data. Returns the length * available and buffer pointer to the space which is now allocated and * accounted for as ready for characters. This is used for drivers * that need their own block copy routines into the buffer. There is no * guarantee the buffer is a DMA target! - * - * Locking: May call functions taking tty->buf.lock */ int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size) @@ -595,23 +462,17 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string_flags); -/** - * tty_set_termios_ldisc - set ldisc field - * @tty: tty structure - * @num: line discipline number - * +/* * This is probably overkill for real world processors but * they are not on hot paths so a little discipline won't do * any harm. - * - * Locking: takes termios_mutex */ static void tty_set_termios_ldisc(struct tty_struct *tty, int num) { - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); tty->termios->c_line = num; - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); } /* @@ -624,19 +485,6 @@ static DEFINE_SPINLOCK(tty_ldisc_lock); static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait); static struct tty_ldisc tty_ldiscs[NR_LDISCS]; /* line disc dispatch table */ -/** - * tty_register_ldisc - install a line discipline - * @disc: ldisc number - * @new_ldisc: pointer to the ldisc object - * - * Installs a new line discipline into the kernel. The discipline - * is set up as unreferenced and then made available to the kernel - * from this point onwards. - * - * Locking: - * takes tty_ldisc_lock to guard against ldisc races - */ - int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc) { unsigned long flags; @@ -656,18 +504,6 @@ int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc) } EXPORT_SYMBOL(tty_register_ldisc); -/** - * tty_unregister_ldisc - unload a line discipline - * @disc: ldisc number - * @new_ldisc: pointer to the ldisc object - * - * Remove a line discipline from the kernel providing it is not - * currently in use. - * - * Locking: - * takes tty_ldisc_lock to guard against ldisc races - */ - int tty_unregister_ldisc(int disc) { unsigned long flags; @@ -687,19 +523,6 @@ int tty_unregister_ldisc(int disc) } EXPORT_SYMBOL(tty_unregister_ldisc); -/** - * tty_ldisc_get - take a reference to an ldisc - * @disc: ldisc number - * - * Takes a reference to a line discipline. Deals with refcounts and - * module locking counts. Returns NULL if the discipline is not available. - * Returns a pointer to the discipline and bumps the ref count if it is - * available - * - * Locking: - * takes tty_ldisc_lock to guard against ldisc races - */ - struct tty_ldisc *tty_ldisc_get(int disc) { unsigned long flags; @@ -728,17 +551,6 @@ struct tty_ldisc *tty_ldisc_get(int disc) EXPORT_SYMBOL_GPL(tty_ldisc_get); -/** - * tty_ldisc_put - drop ldisc reference - * @disc: ldisc number - * - * Drop a reference to a line discipline. Manage refcounts and - * module usage counts - * - * Locking: - * takes tty_ldisc_lock to guard against ldisc races - */ - void tty_ldisc_put(int disc) { struct tty_ldisc *ld; @@ -756,19 +568,6 @@ void tty_ldisc_put(int disc) EXPORT_SYMBOL_GPL(tty_ldisc_put); -/** - * tty_ldisc_assign - set ldisc on a tty - * @tty: tty to assign - * @ld: line discipline - * - * Install an instance of a line discipline into a tty structure. The - * ldisc must have a reference count above zero to ensure it remains/ - * The tty instance refcount starts at zero. - * - * Locking: - * Caller must hold references - */ - static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld) { tty->ldisc = *ld; @@ -783,8 +582,6 @@ static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld) * the tty ldisc. Return 0 on failure or 1 on success. This is * used to implement both the waiting and non waiting versions * of tty_ldisc_ref - * - * Locking: takes tty_ldisc_lock */ static int tty_ldisc_try(struct tty_struct *tty) @@ -816,8 +613,6 @@ static int tty_ldisc_try(struct tty_struct *tty) * must also be careful not to hold other locks that will deadlock * against a discipline change, such as an existing ldisc reference * (which we check for) - * - * Locking: call functions take tty_ldisc_lock */ struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) @@ -838,8 +633,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait); * Dereference the line discipline for the terminal and take a * reference to it. If the line discipline is in flux then * return NULL. Can be called from IRQ and timer functions. - * - * Locking: called functions take tty_ldisc_lock */ struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) @@ -857,8 +650,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref); * * Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May * be called in IRQ context. - * - * Locking: takes tty_ldisc_lock */ void tty_ldisc_deref(struct tty_ldisc *ld) @@ -903,9 +694,6 @@ static void tty_ldisc_enable(struct tty_struct *tty) * * Set the discipline of a tty line. Must be called from a process * context. - * - * Locking: takes tty_ldisc_lock. - * called functions take termios_mutex */ static int tty_set_ldisc(struct tty_struct *tty, int ldisc) @@ -999,8 +787,11 @@ restart: } clear_bit(TTY_LDISC, &tty->flags); - if (o_tty) + clear_bit(TTY_DONT_FLIP, &tty->flags); + if (o_tty) { clear_bit(TTY_LDISC, &o_tty->flags); + clear_bit(TTY_DONT_FLIP, &o_tty->flags); + } spin_unlock_irqrestore(&tty_ldisc_lock, flags); /* @@ -1069,17 +860,9 @@ restart: return retval; } -/** - * get_tty_driver - find device of a tty - * @dev_t: device identifier - * @index: returns the index of the tty - * - * This routine returns a tty driver structure, given a device number - * and also passes back the index number. - * - * Locking: caller must hold tty_mutex +/* + * This routine returns a tty driver structure, given a device number */ - static struct tty_driver *get_tty_driver(dev_t device, int *index) { struct tty_driver *p; @@ -1094,17 +877,11 @@ static struct tty_driver *get_tty_driver(dev_t device, int *index) return NULL; } -/** - * tty_check_change - check for POSIX terminal changes - * @tty: tty to check - * - * If we try to write to, or set the state of, a terminal and we're - * not in the foreground, send a SIGTTOU. If the signal is blocked or - * ignored, go ahead and perform the operation. (POSIX 7.2) - * - * Locking: none +/* + * If we try to write to, or set the state of, a terminal and we're + * not in the foreground, send a SIGTTOU. If the signal is blocked or + * ignored, go ahead and perform the operation. (POSIX 7.2) */ - int tty_check_change(struct tty_struct * tty) { if (current->signal->tty != tty) @@ -1149,7 +926,7 @@ static int hung_up_tty_ioctl(struct inode * inode, struct file * file, return cmd == TIOCSPGRP ? -ENOTTY : -EIO; } -static const struct file_operations tty_fops = { +static struct file_operations tty_fops = { .llseek = no_llseek, .read = tty_read, .write = tty_write, @@ -1161,7 +938,7 @@ static const struct file_operations tty_fops = { }; #ifdef CONFIG_UNIX98_PTYS -static const struct file_operations ptmx_fops = { +static struct file_operations ptmx_fops = { .llseek = no_llseek, .read = tty_read, .write = tty_write, @@ -1173,7 +950,7 @@ static const struct file_operations ptmx_fops = { }; #endif -static const struct file_operations console_fops = { +static struct file_operations console_fops = { .llseek = no_llseek, .read = tty_read, .write = redirected_tty_write, @@ -1184,7 +961,7 @@ static const struct file_operations console_fops = { .fasync = tty_fasync, }; -static const struct file_operations hung_up_tty_fops = { +static struct file_operations hung_up_tty_fops = { .llseek = no_llseek, .read = hung_up_tty_read, .write = hung_up_tty_write, @@ -1242,27 +1019,10 @@ void tty_ldisc_flush(struct tty_struct *tty) EXPORT_SYMBOL_GPL(tty_ldisc_flush); -/** - * do_tty_hangup - actual handler for hangup events - * @data: tty device - * - * This can be called by the "eventd" kernel thread. That is process - * synchronous but doesn't hold any locks, so we need to make sure we - * have the appropriate locks for what we're doing. - * - * The hangup event clears any pending redirections onto the hung up - * device. It ensures future writes will error and it does the needed - * line discipline hangup and signal delivery. The tty object itself - * remains intact. - * - * Locking: - * BKL - * redirect lock for undoing redirection - * file list lock for manipulating list of ttys - * tty_ldisc_lock from called functions - * termios_mutex resetting termios data - * tasklist_lock to walk task list for hangup event - * ->siglock to protect ->signal/->sighand +/* + * This can be called by the "eventd" kernel thread. That is process synchronous, + * but doesn't hold any locks, so we need to make sure we have the appropriate + * locks for what we're doing.. */ static void do_tty_hangup(void *data) { @@ -1329,9 +1089,9 @@ static void do_tty_hangup(void *data) */ if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); *tty->termios = tty->driver->init_termios; - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); } /* Defer ldisc switch */ @@ -1343,18 +1103,14 @@ static void do_tty_hangup(void *data) read_lock(&tasklist_lock); if (tty->session > 0) { do_each_task_pid(tty->session, PIDTYPE_SID, p) { - spin_lock_irq(&p->sighand->siglock); if (p->signal->tty == tty) p->signal->tty = NULL; - if (!p->signal->leader) { - spin_unlock_irq(&p->sighand->siglock); + if (!p->signal->leader) continue; - } - __group_send_sig_info(SIGHUP, SEND_SIG_PRIV, p); - __group_send_sig_info(SIGCONT, SEND_SIG_PRIV, p); + group_send_sig_info(SIGHUP, SEND_SIG_PRIV, p); + group_send_sig_info(SIGCONT, SEND_SIG_PRIV, p); if (tty->pgrp > 0) p->signal->tty_old_pgrp = tty->pgrp; - spin_unlock_irq(&p->sighand->siglock); } while_each_task_pid(tty->session, PIDTYPE_SID, p); } read_unlock(&tasklist_lock); @@ -1391,14 +1147,6 @@ static void do_tty_hangup(void *data) fput(f); } -/** - * tty_hangup - trigger a hangup event - * @tty: tty to hangup - * - * A carrier loss (virtual or otherwise) has occurred on this like - * schedule a hangup sequence to run after this event. - */ - void tty_hangup(struct tty_struct * tty) { #ifdef TTY_DEBUG_HANGUP @@ -1411,15 +1159,6 @@ void tty_hangup(struct tty_struct * tty) EXPORT_SYMBOL(tty_hangup); -/** - * tty_vhangup - process vhangup - * @tty: tty to hangup - * - * The user has asked via system call for the terminal to be hung up. - * We do this synchronously so that when the syscall returns the process - * is complete. That guarantee is neccessary for security reasons. - */ - void tty_vhangup(struct tty_struct * tty) { #ifdef TTY_DEBUG_HANGUP @@ -1431,14 +1170,6 @@ void tty_vhangup(struct tty_struct * tty) } EXPORT_SYMBOL(tty_vhangup); -/** - * tty_hung_up_p - was tty hung up - * @filp: file pointer of tty - * - * Return true if the tty has been subject to a vhangup or a carrier - * loss - */ - int tty_hung_up_p(struct file * filp) { return (filp->f_op == &hung_up_tty_fops); @@ -1446,59 +1177,38 @@ int tty_hung_up_p(struct file * filp) EXPORT_SYMBOL(tty_hung_up_p); -static void session_clear_tty(pid_t session) -{ - struct task_struct *p; - do_each_task_pid(session, PIDTYPE_SID, p) { - proc_clear_tty(p); - } while_each_task_pid(session, PIDTYPE_SID, p); -} - -/** - * disassociate_ctty - disconnect controlling tty - * @on_exit: true if exiting so need to "hang up" the session - * - * This function is typically called only by the session leader, when - * it wants to disassociate itself from its controlling tty. +/* + * This function is typically called only by the session leader, when + * it wants to disassociate itself from its controlling tty. * - * It performs the following functions: + * It performs the following functions: * (1) Sends a SIGHUP and SIGCONT to the foreground process group * (2) Clears the tty from being controlling the session * (3) Clears the controlling tty for all processes in the * session group. * - * The argument on_exit is set to 1 if called when a process is - * exiting; it is 0 if called by the ioctl TIOCNOTTY. - * - * Locking: - * BKL is taken for hysterical raisins - * tty_mutex is taken to protect tty - * ->siglock is taken to protect ->signal/->sighand - * tasklist_lock is taken to walk process list for sessions - * ->siglock is taken to protect ->signal/->sighand + * The argument on_exit is set to 1 if called when a process is + * exiting; it is 0 if called by the ioctl TIOCNOTTY. */ - void disassociate_ctty(int on_exit) { struct tty_struct *tty; + struct task_struct *p; int tty_pgrp = -1; - int session; lock_kernel(); mutex_lock(&tty_mutex); - tty = get_current_tty(); + tty = current->signal->tty; if (tty) { tty_pgrp = tty->pgrp; mutex_unlock(&tty_mutex); - /* XXX: here we race, there is nothing protecting tty */ if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY) tty_vhangup(tty); } else { - pid_t old_pgrp = current->signal->tty_old_pgrp; - if (old_pgrp) { - kill_pg(old_pgrp, SIGHUP, on_exit); - kill_pg(old_pgrp, SIGCONT, on_exit); + if (current->signal->tty_old_pgrp) { + kill_pg(current->signal->tty_old_pgrp, SIGHUP, on_exit); + kill_pg(current->signal->tty_old_pgrp, SIGCONT, on_exit); } mutex_unlock(&tty_mutex); unlock_kernel(); @@ -1510,51 +1220,22 @@ void disassociate_ctty(int on_exit) kill_pg(tty_pgrp, SIGCONT, on_exit); } - spin_lock_irq(¤t->sighand->siglock); - current->signal->tty_old_pgrp = 0; - session = current->signal->session; - spin_unlock_irq(¤t->sighand->siglock); - + /* Must lock changes to tty_old_pgrp */ mutex_lock(&tty_mutex); - /* It is possible that do_tty_hangup has free'd this tty */ - tty = get_current_tty(); - if (tty) { - tty->session = 0; - tty->pgrp = 0; - } else { -#ifdef TTY_DEBUG_HANGUP - printk(KERN_DEBUG "error attempted to write to tty [0x%p]" - " = NULL", tty); -#endif - } - mutex_unlock(&tty_mutex); + current->signal->tty_old_pgrp = 0; + tty->session = 0; + tty->pgrp = -1; /* Now clear signal->tty under the lock */ read_lock(&tasklist_lock); - session_clear_tty(session); + do_each_task_pid(current->signal->session, PIDTYPE_SID, p) { + p->signal->tty = NULL; + } while_each_task_pid(current->signal->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); + mutex_unlock(&tty_mutex); unlock_kernel(); } - -/** - * stop_tty - propogate flow control - * @tty: tty to stop - * - * Perform flow control to the driver. For PTY/TTY pairs we - * must also propogate the TIOCKPKT status. May be called - * on an already stopped device and will not re-call the driver - * method. - * - * This functionality is used by both the line disciplines for - * halting incoming flow and by the driver. It may therefore be - * called from any context, may be under the tty atomic_write_lock - * but not always. - * - * Locking: - * Broken. Relies on BKL which is unsafe here. - */ - void stop_tty(struct tty_struct *tty) { if (tty->stopped) @@ -1571,19 +1252,6 @@ void stop_tty(struct tty_struct *tty) EXPORT_SYMBOL(stop_tty); -/** - * start_tty - propogate flow control - * @tty: tty to start - * - * Start a tty that has been stopped if at all possible. Perform - * any neccessary wakeups and propogate the TIOCPKT status. If this - * is the tty was previous stopped and is being started then the - * driver start method is invoked and the line discipline woken. - * - * Locking: - * Broken. Relies on BKL which is unsafe here. - */ - void start_tty(struct tty_struct *tty) { if (!tty->stopped || tty->flow_stopped) @@ -1604,23 +1272,6 @@ void start_tty(struct tty_struct *tty) EXPORT_SYMBOL(start_tty); -/** - * tty_read - read method for tty device files - * @file: pointer to tty file - * @buf: user buffer - * @count: size of user buffer - * @ppos: unused - * - * Perform the read system call function on this terminal device. Checks - * for hung up devices before calling the line discipline method. - * - * Locking: - * Locks the line discipline internally while needed - * For historical reasons the line discipline read method is - * invoked under the BKL. This will go away in time so do not rely on it - * in new code. Multiple read calls may be outstanding in parallel. - */ - static ssize_t tty_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { @@ -1665,7 +1316,6 @@ static inline ssize_t do_tty_write( ssize_t ret = 0, written = 0; unsigned int chunk; - /* FIXME: O_NDELAY ... */ if (mutex_lock_interruptible(&tty->atomic_write_lock)) { return -ERESTARTSYS; } @@ -1682,9 +1332,6 @@ static inline ssize_t do_tty_write( * layer has problems with bigger chunks. It will * claim to be able to handle more characters than * it actually does. - * - * FIXME: This can probably go away now except that 64K chunks - * are too likely to fail unless switched to vmalloc... */ chunk = 2048; if (test_bit(TTY_NO_WRITE_SPLIT, &tty->flags)) @@ -1742,24 +1389,6 @@ static inline ssize_t do_tty_write( } -/** - * tty_write - write method for tty device file - * @file: tty file pointer - * @buf: user data to write - * @count: bytes to write - * @ppos: unused - * - * Write data to a tty device via the line discipline. - * - * Locking: - * Locks the line discipline as required - * Writes to the tty driver are serialized by the atomic_write_lock - * and are then processed in chunks to the device. The line discipline - * write method will not be involked in parallel for each device - * The line discipline write method is called under the big - * kernel lock for historical reasons. New code should not rely on this. - */ - static ssize_t tty_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { @@ -1807,18 +1436,7 @@ ssize_t redirected_tty_write(struct file * file, const char __user * buf, size_t static char ptychar[] = "pqrstuvwxyzabcde"; -/** - * pty_line_name - generate name for a pty - * @driver: the tty driver in use - * @index: the minor number - * @p: output buffer of at least 6 bytes - * - * Generate a name from a driver reference and write it to the output - * buffer. - * - * Locking: None - */ -static void pty_line_name(struct tty_driver *driver, int index, char *p) +static inline void pty_line_name(struct tty_driver *driver, int index, char *p) { int i = index + driver->name_base; /* ->name is initialized to "ttyp", but "tty" is expected */ @@ -1827,53 +1445,24 @@ static void pty_line_name(struct tty_driver *driver, int index, char *p) ptychar[i >> 4 & 0xf], i & 0xf); } -/** - * pty_line_name - generate name for a tty - * @driver: the tty driver in use - * @index: the minor number - * @p: output buffer of at least 7 bytes - * - * Generate a name from a driver reference and write it to the output - * buffer. - * - * Locking: None - */ -static void tty_line_name(struct tty_driver *driver, int index, char *p) +static inline void tty_line_name(struct tty_driver *driver, int index, char *p) { sprintf(p, "%s%d", driver->name, index + driver->name_base); } -/** - * init_dev - initialise a tty device - * @driver: tty driver we are opening a device on - * @idx: device index - * @tty: returned tty structure - * - * Prepare a tty device. This may not be a "new" clean device but - * could also be an active device. The pty drivers require special - * handling because of this. - * - * Locking: - * The function is called under the tty_mutex, which - * protects us from the tty struct or driver itself going away. - * - * On exit the tty device has the line discipline attached and - * a reference count of 1. If a pair was created for pty/tty use - * and the other was a pty master then it too has a reference count of 1. - * +/* * WSH 06/09/97: Rewritten to remove races and properly clean up after a * failed open. The new code protects the open with a mutex, so it's * really quite straightforward. The mutex locking can probably be * relaxed for the (most common) case of reopening a tty. */ - static int init_dev(struct tty_driver *driver, int idx, struct tty_struct **ret_tty) { struct tty_struct *tty, *o_tty; struct termios *tp, **tp_loc, *o_tp, **o_tp_loc; struct termios *ltp, **ltp_loc, *o_ltp, **o_ltp_loc; - int retval = 0; + int retval=0; /* check whether we're reopening an existing tty */ if (driver->flags & TTY_DRIVER_DEVPTS_MEM) { @@ -2087,20 +1676,10 @@ release_mem_out: goto end_init; } -/** - * release_mem - release tty structure memory - * - * Releases memory associated with a tty structure, and clears out the - * driver table slots. This function is called when a device is no longer - * in use. It also gets called when setup of a device fails. - * - * Locking: - * tty_mutex - sometimes only - * takes the file list lock internally when working on the list - * of ttys that the driver keeps. - * FIXME: should we require tty_mutex is held here ?? +/* + * Releases memory associated with a tty structure, and clears out the + * driver table slots. */ - static void release_mem(struct tty_struct *tty, int idx) { struct tty_struct *o_tty; @@ -2351,10 +1930,16 @@ static void release_dev(struct file * filp) * tty. */ if (tty_closing || o_tty_closing) { + struct task_struct *p; + read_lock(&tasklist_lock); - session_clear_tty(tty->session); + do_each_task_pid(tty->session, PIDTYPE_SID, p) { + p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); if (o_tty) - session_clear_tty(o_tty->session); + do_each_task_pid(o_tty->session, PIDTYPE_SID, p) { + p->signal->tty = NULL; + } while_each_task_pid(o_tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); } @@ -2373,6 +1958,7 @@ static void release_dev(struct file * filp) * race with the set_ldisc code path. */ clear_bit(TTY_LDISC, &tty->flags); + clear_bit(TTY_DONT_FLIP, &tty->flags); cancel_delayed_work(&tty->buf.work); /* @@ -2435,27 +2021,18 @@ static void release_dev(struct file * filp) } -/** - * tty_open - open a tty device - * @inode: inode of device file - * @filp: file pointer to tty - * - * tty_open and tty_release keep up the tty count that contains the - * number of opens done on a tty. We cannot use the inode-count, as - * different inodes might point to the same tty. - * - * Open-counting is needed for pty masters, as well as for keeping - * track of serial lines: DTR is dropped when the last close happens. - * (This is not done solely through tty->count, now. - Ted 1/27/92) +/* + * tty_open and tty_release keep up the tty count that contains the + * number of opens done on a tty. We cannot use the inode-count, as + * different inodes might point to the same tty. * - * The termios state of a pty is reset on first open so that - * settings don't persist across reuse. + * Open-counting is needed for pty masters, as well as for keeping + * track of serial lines: DTR is dropped when the last close happens. + * (This is not done solely through tty->count, now. - Ted 1/27/92) * - * Locking: tty_mutex protects tty, get_tty_driver and init_dev work. - * tty->count should protect the rest. - * ->siglock protects ->signal/->sighand + * The termios state of a pty is reset on first open so that + * settings don't persist across reuse. */ - static int tty_open(struct inode * inode, struct file * filp) { struct tty_struct *tty; @@ -2475,19 +2052,18 @@ retry_open: mutex_lock(&tty_mutex); if (device == MKDEV(TTYAUX_MAJOR,0)) { - tty = get_current_tty(); - if (!tty) { + if (!current->signal->tty) { mutex_unlock(&tty_mutex); return -ENXIO; } - driver = tty->driver; - index = tty->index; + driver = current->signal->tty->driver; + index = current->signal->tty->index; filp->f_flags |= O_NONBLOCK; /* Don't let /dev/tty block */ /* noctty = 1; */ goto got_driver; } #ifdef CONFIG_VT - if (device == MKDEV(TTY_MAJOR,0)) { + if (console_use_vt && (device == MKDEV(TTY_MAJOR,0))) { extern struct tty_driver *console_driver; driver = console_driver; index = fg_console; @@ -2556,32 +2132,21 @@ got_driver: filp->f_op = &tty_fops; goto retry_open; } - - mutex_lock(&tty_mutex); - spin_lock_irq(¤t->sighand->siglock); if (!noctty && current->signal->leader && !current->signal->tty && - tty->session == 0) - __proc_set_tty(current, tty); - spin_unlock_irq(¤t->sighand->siglock); - mutex_unlock(&tty_mutex); + tty->session == 0) { + task_lock(current); + current->signal->tty = tty; + task_unlock(current); + current->signal->tty_old_pgrp = 0; + tty->session = current->signal->session; + tty->pgrp = process_group(current); + } return 0; } #ifdef CONFIG_UNIX98_PTYS -/** - * ptmx_open - open a unix 98 pty master - * @inode: inode of device file - * @filp: file pointer to tty - * - * Allocate a unix98 pty master device from the ptmx driver. - * - * Locking: tty_mutex protects theinit_dev work. tty->count should - protect the rest. - * allocated_ptys_lock handles the list of free pty numbers - */ - static int ptmx_open(struct inode * inode, struct file * filp) { struct tty_struct *tty; @@ -2641,18 +2206,6 @@ out: } #endif -/** - * tty_release - vfs callback for close - * @inode: inode of tty - * @filp: file pointer for handle to tty - * - * Called the last time each file handle is closed that references - * this tty. There may however be several such references. - * - * Locking: - * Takes bkl. See release_dev - */ - static int tty_release(struct inode * inode, struct file * filp) { lock_kernel(); @@ -2661,18 +2214,7 @@ static int tty_release(struct inode * inode, struct file * filp) return 0; } -/** - * tty_poll - check tty status - * @filp: file being polled - * @wait: poll wait structures to update - * - * Call the line discipline polling method to obtain the poll - * status of the device. - * - * Locking: locks called line discipline but ldisc poll method - * may be re-entered freely by other callers. - */ - +/* No kernel lock held - fine */ static unsigned int tty_poll(struct file * filp, poll_table * wait) { struct tty_struct * tty; @@ -2716,23 +2258,6 @@ static int tty_fasync(int fd, struct file * filp, int on) return 0; } -/** - * tiocsti - fake input character - * @tty: tty to fake input into - * @p: pointer to character - * - * Fake input to a tty device. Does the neccessary locking and - * input management. - * - * FIXME: does not honour flow control ?? - * - * Locking: - * Called functions take tty_ldisc_lock - * current->signal->tty check is safe without locks - * - * FIXME: may race normal receive processing - */ - static int tiocsti(struct tty_struct *tty, char __user *p) { char ch, mbz = 0; @@ -2748,45 +2273,13 @@ static int tiocsti(struct tty_struct *tty, char __user *p) return 0; } -/** - * tiocgwinsz - implement window query ioctl - * @tty; tty - * @arg: user buffer for result - * - * Copies the kernel idea of the window size into the user buffer. - * - * Locking: tty->termios_mutex is taken to ensure the winsize data - * is consistent. - */ - static int tiocgwinsz(struct tty_struct *tty, struct winsize __user * arg) { - int err; - - mutex_lock(&tty->termios_mutex); - err = copy_to_user(arg, &tty->winsize, sizeof(*arg)); - mutex_unlock(&tty->termios_mutex); - - return err ? -EFAULT: 0; + if (copy_to_user(arg, &tty->winsize, sizeof(*arg))) + return -EFAULT; + return 0; } -/** - * tiocswinsz - implement window size set ioctl - * @tty; tty - * @arg: user buffer for result - * - * Copies the user idea of the window size to the kernel. Traditionally - * this is just advisory information but for the Linux console it - * actually has driver level meaning and triggers a VC resize. - * - * Locking: - * Called function use the console_sem is used to ensure we do - * not try and resize the console twice at once. - * The tty->termios_mutex is used to ensure we don't double - * resize and get confused. Lock order - tty->termios_mutex before - * console sem - */ - static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty, struct winsize __user * arg) { @@ -2794,18 +2287,17 @@ static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty, if (copy_from_user(&tmp_ws, arg, sizeof(*arg))) return -EFAULT; - - mutex_lock(&tty->termios_mutex); if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg))) - goto done; - + return 0; #ifdef CONFIG_VT if (tty->driver->type == TTY_DRIVER_TYPE_CONSOLE) { - if (vc_lock_resize(tty->driver_data, tmp_ws.ws_col, - tmp_ws.ws_row)) { - mutex_unlock(&tty->termios_mutex); - return -ENXIO; - } + int rc; + + acquire_console_sem(); + rc = vc_resize(tty->driver_data, tmp_ws.ws_col, tmp_ws.ws_row); + release_console_sem(); + if (rc) + return -ENXIO; } #endif if (tty->pgrp > 0) @@ -2814,20 +2306,9 @@ static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty, kill_pg(real_tty->pgrp, SIGWINCH, 1); tty->winsize = tmp_ws; real_tty->winsize = tmp_ws; -done: - mutex_unlock(&tty->termios_mutex); return 0; } -/** - * tioccons - allow admin to move logical console - * @file: the file to become console - * - * Allow the adminstrator to move the redirected console device - * - * Locking: uses redirect_lock to guard the redirect information - */ - static int tioccons(struct file *file) { if (!capable(CAP_SYS_ADMIN)) @@ -2853,17 +2334,6 @@ static int tioccons(struct file *file) return 0; } -/** - * fionbio - non blocking ioctl - * @file: file to set blocking value - * @p: user parameter - * - * Historical tty interfaces had a blocking control ioctl before - * the generic functionality existed. This piece of history is preserved - * in the expected tty API of posix OS's. - * - * Locking: none, the open fle handle ensures it won't go away. - */ static int fionbio(struct file *file, int __user *p) { @@ -2879,37 +2349,19 @@ static int fionbio(struct file *file, int __user *p) return 0; } -/** - * tiocsctty - set controlling tty - * @tty: tty structure - * @arg: user argument - * - * This ioctl is used to manage job control. It permits a session - * leader to set this tty as the controlling tty for the session. - * - * Locking: - * Takes tty_mutex() to protect tty instance - * Takes tasklist_lock internally to walk sessions - * Takes ->siglock() when updating signal->tty - */ - static int tiocsctty(struct tty_struct *tty, int arg) { - int ret = 0; + task_t *p; + if (current->signal->leader && (current->signal->session == tty->session)) - return ret; - - mutex_lock(&tty_mutex); + return 0; /* * The process must be a session leader and * not have a controlling tty already. */ - if (!current->signal->leader || current->signal->tty) { - ret = -EPERM; - goto unlock; - } - + if (!current->signal->leader || current->signal->tty) + return -EPERM; if (tty->session > 0) { /* * This tty is already the controlling @@ -2919,32 +2371,24 @@ static int tiocsctty(struct tty_struct *tty, int arg) /* * Steal it away */ + read_lock(&tasklist_lock); - session_clear_tty(tty->session); + do_each_task_pid(tty->session, PIDTYPE_SID, p) { + p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); - } else { - ret = -EPERM; - goto unlock; - } + } else + return -EPERM; } - proc_set_tty(current, tty); -unlock: - mutex_unlock(&tty_mutex); - return ret; + task_lock(current); + current->signal->tty = tty; + task_unlock(current); + current->signal->tty_old_pgrp = 0; + tty->session = current->signal->session; + tty->pgrp = process_group(current); + return 0; } -/** - * tiocgpgrp - get process group - * @tty: tty passed by user - * @real_tty: tty side of the tty pased by the user if a pty else the tty - * @p: returned pid - * - * Obtain the process group of the tty. If there is no process group - * return an error. - * - * Locking: none. Reference to current->signal->tty is safe. - */ - static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { pid_t pgrp; @@ -2959,18 +2403,6 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t return put_user(pgrp, p); } -/** - * tiocspgrp - attempt to set process group - * @tty: tty passed by user - * @real_tty: tty side device matching tty passed by user - * @p: pid pointer - * - * Set the process group of the tty to the session passed. Only - * permitted where the tty session is our session. - * - * Locking: None - */ - static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { pid_t pgrp; @@ -2996,18 +2428,6 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t return 0; } -/** - * tiocgsid - get session id - * @tty: tty passed by user - * @real_tty: tty side of the tty pased by the user if a pty else the tty - * @p: pointer to returned session id - * - * Obtain the session id of the tty. If there is no session - * return an error. - * - * Locking: none. Reference to current->signal->tty is safe. - */ - static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { /* @@ -3021,16 +2441,6 @@ static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t _ return put_user(real_tty->session, p); } -/** - * tiocsetd - set line discipline - * @tty: tty device - * @p: pointer to user data - * - * Set the line discipline according to user request. - * - * Locking: see tty_set_ldisc, this function is just a helper - */ - static int tiocsetd(struct tty_struct *tty, int __user *p) { int ldisc; @@ -3040,47 +2450,20 @@ static int tiocsetd(struct tty_struct *tty, int __user *p) return tty_set_ldisc(tty, ldisc); } -/** - * send_break - performed time break - * @tty: device to break on - * @duration: timeout in mS - * - * Perform a timed break on hardware that lacks its own driver level - * timed break functionality. - * - * Locking: - * atomic_write_lock serializes - * - */ - static int send_break(struct tty_struct *tty, unsigned int duration) { - if (mutex_lock_interruptible(&tty->atomic_write_lock)) - return -EINTR; tty->driver->break_ctl(tty, -1); if (!signal_pending(current)) { msleep_interruptible(duration); } tty->driver->break_ctl(tty, 0); - mutex_unlock(&tty->atomic_write_lock); if (signal_pending(current)) return -EINTR; return 0; } -/** - * tiocmget - get modem status - * @tty: tty device - * @file: user file pointer - * @p: pointer to result - * - * Obtain the modem status bits from the tty driver if the feature - * is supported. Return -EINVAL if it is not available. - * - * Locking: none (up to the driver) - */ - -static int tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p) +static int +tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p) { int retval = -EINVAL; @@ -3093,20 +2476,8 @@ static int tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p return retval; } -/** - * tiocmset - set modem status - * @tty: tty device - * @file: user file pointer - * @cmd: command - clear bits, set bits or set all - * @p: pointer to desired bits - * - * Set the modem status bits from the tty driver if the feature - * is supported. Return -EINVAL if it is not available. - * - * Locking: none (up to the driver) - */ - -static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, +static int +tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned __user *p) { int retval = -EINVAL; @@ -3155,8 +2526,6 @@ int tty_ioctl(struct inode * inode, struct file * file, if (tty_paranoia_check(tty, inode, "tty_ioctl")) return -EINVAL; - /* CHECKME: is this safe as one end closes ? */ - real_tty = tty; if (tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtype == PTY_TYPE_MASTER) @@ -3228,7 +2597,9 @@ int tty_ioctl(struct inode * inode, struct file * file, return -ENOTTY; if (current->signal->leader) disassociate_ctty(0); - proc_clear_tty(current); + task_lock(current); + current->signal->tty = NULL; + task_unlock(current); return 0; case TIOCSCTTY: return tiocsctty(tty, arg); @@ -3258,9 +2629,10 @@ int tty_ioctl(struct inode * inode, struct file * file, tty->driver->break_ctl(tty, 0); return 0; case TCSBRK: /* SVID version: non-zero arg --> no break */ - /* non-zero arg means wait for all output data - * to be sent (performed above) but don't send break. - * This is used by the tcdrain() termios function. + /* + * XXX is the above comment correct, or the + * code below correct? Is this ioctl used at + * all by anyone? */ if (!arg) return send_break(tty, 250); @@ -3327,7 +2699,7 @@ static void __do_SAK(void *arg) if (!tty) return; - session = tty->session; + session = tty->session; /* We don't want an ldisc switch during this */ disc = tty_ldisc_ref(tty); @@ -3402,16 +2774,9 @@ void do_SAK(struct tty_struct *tty) EXPORT_SYMBOL(do_SAK); -/** - * flush_to_ldisc - * @private_: tty structure passed from work queue. - * - * This routine is called out of the software interrupt to flush data - * from the buffer chain to the line discipline. - * - * Locking: holds tty->buf.lock to guard buffer list. Drops the lock - * while invoking the line discipline receive_buf method. The - * receive_buf method is single threaded for each tty instance. +/* + * This routine is called out of the software interrupt to flush data + * from the buffer chain to the line discipline. */ static void flush_to_ldisc(void *private_) @@ -3420,6 +2785,7 @@ static void flush_to_ldisc(void *private_) unsigned long flags; struct tty_ldisc *disc; struct tty_buffer *tbuf, *head; + int count; char *char_buf; unsigned char *flag_buf; @@ -3427,37 +2793,36 @@ static void flush_to_ldisc(void *private_) if (disc == NULL) /* !TTY_LDISC */ return; + if (test_bit(TTY_DONT_FLIP, &tty->flags)) { + /* + * Do it after the next timer tick: + */ + schedule_delayed_work(&tty->buf.work, 1); + goto out; + } spin_lock_irqsave(&tty->buf.lock, flags); head = tty->buf.head; - if (head != NULL) { - tty->buf.head = NULL; - for (;;) { - int count = head->commit - head->read; - if (!count) { - if (head->next == NULL) - break; - tbuf = head; - head = head->next; - tty_buffer_free(tty, tbuf); - continue; - } - if (!tty->receive_room) { - schedule_delayed_work(&tty->buf.work, 1); - break; - } - if (count > tty->receive_room) - count = tty->receive_room; - char_buf = head->char_buf_ptr + head->read; - flag_buf = head->flag_buf_ptr + head->read; - head->read += count; + tty->buf.head = NULL; + while((tbuf = head) != NULL) { + while ((count = tbuf->commit - tbuf->read) != 0) { + char_buf = tbuf->char_buf_ptr + tbuf->read; + flag_buf = tbuf->flag_buf_ptr + tbuf->read; + tbuf->read += count; spin_unlock_irqrestore(&tty->buf.lock, flags); disc->receive_buf(tty, char_buf, flag_buf, count); spin_lock_irqsave(&tty->buf.lock, flags); } - tty->buf.head = head; + if (tbuf->active) { + tty->buf.head = head; + break; + } + head = tbuf->next; + if (head == NULL) + tty->buf.tail = NULL; + tty_buffer_free(tty, tbuf); } spin_unlock_irqrestore(&tty->buf.lock, flags); - +out: tty_ldisc_deref(disc); } @@ -3487,8 +2852,6 @@ static int n_baud_table = ARRAY_SIZE(baud_table); * Convert termios baud rate data into a speed. This should be called * with the termios lock held if this termios is a terminal termios * structure. May change the termios data. - * - * Locking: none */ int tty_termios_baud_rate(struct termios *termios) @@ -3517,8 +2880,6 @@ EXPORT_SYMBOL(tty_termios_baud_rate); * Returns the baud rate as an integer for this terminal. The * termios lock must be held by the caller and the terminal bit * flags may be updated. - * - * Locking: none */ int tty_get_baud_rate(struct tty_struct *tty) @@ -3548,16 +2909,16 @@ EXPORT_SYMBOL(tty_get_baud_rate); * * In the event of the queue being busy for flipping the work will be * held off and retried later. - * - * Locking: tty buffer lock. Driver locks in low latency mode. */ void tty_flip_buffer_push(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->buf.lock, flags); - if (tty->buf.tail != NULL) + if (tty->buf.tail != NULL) { + tty->buf.tail->active = 0; tty->buf.tail->commit = tty->buf.tail->used; + } spin_unlock_irqrestore(&tty->buf.lock, flags); if (tty->low_latency) @@ -3569,16 +2930,9 @@ void tty_flip_buffer_push(struct tty_struct *tty) EXPORT_SYMBOL(tty_flip_buffer_push); -/** - * initialize_tty_struct - * @tty: tty to initialize - * - * This subroutine initializes a tty structure that has been newly - * allocated. - * - * Locking: none - tty in question must not be exposed at this point +/* + * This subroutine initializes a tty structure. */ - static void initialize_tty_struct(struct tty_struct *tty) { memset(tty, 0, sizeof(struct tty_struct)); @@ -3590,7 +2944,7 @@ static void initialize_tty_struct(struct tty_struct *tty) tty_buffer_init(tty); INIT_WORK(&tty->buf.work, flush_to_ldisc, tty); init_MUTEX(&tty->buf.pty_sem); - mutex_init(&tty->termios_mutex); + init_MUTEX(&tty->termios_sem); init_waitqueue_head(&tty->write_wait); init_waitqueue_head(&tty->read_wait); INIT_WORK(&tty->hangup_work, do_tty_hangup, tty); @@ -3604,7 +2958,6 @@ static void initialize_tty_struct(struct tty_struct *tty) /* * The default put_char routine if the driver did not define one. */ - static void tty_default_put_char(struct tty_struct *tty, unsigned char ch) { tty->driver->write(tty, &ch, 1); @@ -3613,25 +2966,19 @@ static void tty_default_put_char(struct tty_struct *tty, unsigned char ch) static struct class *tty_class; /** - * tty_register_device - register a tty device - * @driver: the tty driver that describes the tty device - * @index: the index in the tty driver for this tty device - * @device: a struct device that is associated with this tty device. - * This field is optional, if there is no known struct device - * for this tty device it can be set to NULL safely. + * tty_register_device - register a tty device + * @driver: the tty driver that describes the tty device + * @index: the index in the tty driver for this tty device + * @device: a struct device that is associated with this tty device. + * This field is optional, if there is no known struct device for this + * tty device it can be set to NULL safely. * - * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error). - * - * This call is required to be made to register an individual tty device - * if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set. If - * that bit is not set, this function should not be called by a tty - * driver. - * - * Locking: ?? + * This call is required to be made to register an individual tty device if + * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that + * bit is not set, this function should not be called. */ - -struct class_device *tty_register_device(struct tty_driver *driver, - unsigned index, struct device *device) +void tty_register_device(struct tty_driver *driver, unsigned index, + struct device *device) { char name[64]; dev_t dev = MKDEV(driver->major, driver->minor_start) + index; @@ -3639,30 +2986,30 @@ struct class_device *tty_register_device(struct tty_driver *driver, if (index >= driver->num) { printk(KERN_ERR "Attempt to register invalid tty line number " " (%d).\n", index); - return ERR_PTR(-EINVAL); + return; } + devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, + "%s%d", driver->devfs_name, index + driver->name_base); + if (driver->type == TTY_DRIVER_TYPE_PTY) pty_line_name(driver, index, name); else tty_line_name(driver, index, name); - - return class_device_create(tty_class, NULL, dev, device, "%s", name); + class_device_create(tty_class, NULL, dev, device, "%s", name); } /** - * tty_unregister_device - unregister a tty device - * @driver: the tty driver that describes the tty device - * @index: the index in the tty driver for this tty device + * tty_unregister_device - unregister a tty device + * @driver: the tty driver that describes the tty device + * @index: the index in the tty driver for this tty device * - * If a tty device is registered with a call to tty_register_device() then - * this function must be called when the tty device is gone. - * - * Locking: ?? + * If a tty device is registered with a call to tty_register_device() then + * this function must be made when the tty device is gone. */ - void tty_unregister_device(struct tty_driver *driver, unsigned index) { + devfs_remove("%s%d", driver->devfs_name, index + driver->name_base); class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index); } @@ -3771,6 +3118,7 @@ int tty_register_driver(struct tty_driver *driver) driver->cdev.owner = driver->owner; error = cdev_add(&driver->cdev, dev, driver->num); if (error) { + cdev_del(&driver->cdev); unregister_chrdev_region(dev, driver->num); driver->ttys = NULL; driver->termios = driver->termios_locked = NULL; @@ -3783,7 +3131,7 @@ int tty_register_driver(struct tty_driver *driver) list_add(&driver->tty_drivers, &tty_drivers); - if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) { + if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { for(i = 0; i < driver->num; i++) tty_register_device(driver, i, NULL); } @@ -3826,7 +3174,7 @@ int tty_unregister_driver(struct tty_driver *driver) driver->termios_locked[i] = NULL; kfree(tp); } - if (!(driver->flags & TTY_DRIVER_DYNAMIC_DEV)) + if (!(driver->flags & TTY_DRIVER_NO_DEVFS)) tty_unregister_device(driver, i); } p = driver->ttys; @@ -3902,12 +3250,14 @@ static int __init tty_init(void) if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) panic("Couldn't register /dev/tty driver\n"); + devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); cdev_init(&console_cdev, &console_fops); if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) panic("Couldn't register /dev/console driver\n"); + devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); #ifdef CONFIG_UNIX98_PTYS @@ -3915,14 +3265,18 @@ static int __init tty_init(void) if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) panic("Couldn't register /dev/ptmx driver\n"); + devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); #endif #ifdef CONFIG_VT + if (!console_use_vt) + goto out_vt; cdev_init(&vc0_cdev, &console_fops); if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) panic("Couldn't register /dev/tty0 driver\n"); + devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); vty_init(); diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index 3b6fa7b0b..f19cf9d77 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -37,18 +36,6 @@ #define TERMIOS_WAIT 2 #define TERMIOS_TERMIO 4 - -/** - * tty_wait_until_sent - wait for I/O to finish - * @tty: tty we are waiting for - * @timeout: how long we will wait - * - * Wait for characters pending in a tty driver to hit the wire, or - * for a timeout to occur (eg due to flow control) - * - * Locking: none - */ - void tty_wait_until_sent(struct tty_struct * tty, long timeout) { DECLARE_WAITQUEUE(wait, current); @@ -107,18 +94,6 @@ static void unset_locked_termios(struct termios *termios, old->c_cc[i] : termios->c_cc[i]; } -/** - * change_termios - update termios values - * @tty: tty to update - * @new_termios: desired new value - * - * Perform updates to the termios values set on this terminal. There - * is a bit of layering violation here with n_tty in terms of the - * internal knowledge of this function. - * - * Locking: termios_sem - */ - static void change_termios(struct tty_struct * tty, struct termios * new_termios) { int canon_change; @@ -132,7 +107,7 @@ static void change_termios(struct tty_struct * tty, struct termios * new_termios /* FIXME: we need to decide on some locking/ordering semantics for the set_termios notification eventually */ - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); *tty->termios = *new_termios; unset_locked_termios(tty->termios, &old_termios, tty->termios_locked); @@ -177,22 +152,9 @@ static void change_termios(struct tty_struct * tty, struct termios * new_termios (ld->set_termios)(tty, &old_termios); tty_ldisc_deref(ld); } - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); } -/** - * set_termios - set termios values for a tty - * @tty: terminal device - * @arg: user data - * @opt: option information - * - * Helper function to prepare termios data and run neccessary other - * functions before using change_termios to do the actual changes. - * - * Locking: - * Called functions take ldisc and termios_sem locks - */ - static int set_termios(struct tty_struct * tty, void __user *arg, int opt) { struct termios tmp_termios; @@ -285,13 +247,13 @@ static int get_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb) { struct sgttyb tmp; - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); tmp.sg_ispeed = 0; tmp.sg_ospeed = 0; tmp.sg_erase = tty->termios->c_cc[VERASE]; tmp.sg_kill = tty->termios->c_cc[VKILL]; tmp.sg_flags = get_sgflags(tty); - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); return copy_to_user(sgttyb, &tmp, sizeof(tmp)) ? -EFAULT : 0; } @@ -322,17 +284,6 @@ static void set_sgflags(struct termios * termios, int flags) } } -/** - * set_sgttyb - set legacy terminal values - * @tty: tty structure - * @sgttyb: pointer to old style terminal structure - * - * Updates a terminal from the legacy BSD style terminal information - * structure. - * - * Locking: termios_sem - */ - static int set_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb) { int retval; @@ -346,12 +297,12 @@ static int set_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb) if (copy_from_user(&tmp, sgttyb, sizeof(tmp))) return -EFAULT; - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); termios = *tty->termios; termios.c_cc[VERASE] = tmp.sg_erase; termios.c_cc[VKILL] = tmp.sg_kill; set_sgflags(&termios, tmp.sg_flags); - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); change_termios(tty, &termios); return 0; } @@ -418,33 +369,22 @@ static int set_ltchars(struct tty_struct * tty, struct ltchars __user * ltchars) } #endif -/** - * send_prio_char - send priority character - * - * Send a high priority character to the tty even if stopped - * - * Locking: none for xchar method, write ordering for write method. +/* + * Send a high priority character to the tty. */ - -static int send_prio_char(struct tty_struct *tty, char ch) +static void send_prio_char(struct tty_struct *tty, char ch) { int was_stopped = tty->stopped; if (tty->driver->send_xchar) { tty->driver->send_xchar(tty, ch); - return 0; + return; } - - if (mutex_lock_interruptible(&tty->atomic_write_lock)) - return -ERESTARTSYS; - if (was_stopped) start_tty(tty); tty->driver->write(tty, &ch, 1); if (was_stopped) stop_tty(tty); - mutex_unlock(&tty->atomic_write_lock); - return 0; } int n_tty_ioctl(struct tty_struct * tty, struct file * file, @@ -518,11 +458,11 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, break; case TCIOFF: if (STOP_CHAR(tty) != __DISABLED_CHAR) - return send_prio_char(tty, STOP_CHAR(tty)); + send_prio_char(tty, STOP_CHAR(tty)); break; case TCION: if (START_CHAR(tty) != __DISABLED_CHAR) - return send_prio_char(tty, START_CHAR(tty)); + send_prio_char(tty, START_CHAR(tty)); break; default: return -EINVAL; @@ -597,11 +537,11 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, case TIOCSSOFTCAR: if (get_user(arg, (unsigned int __user *) arg)) return -EFAULT; - mutex_lock(&tty->termios_mutex); + down(&tty->termios_sem); tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0)); - mutex_unlock(&tty->termios_mutex); + up(&tty->termios_sem); return 0; default: return -ENOIOCTLCMD; diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index a9247b521..3c1dafaa3 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -21,10 +21,12 @@ * - making it shorter - scr_readw are macros which expand in PRETTY long code */ +#include #include #include #include #include +#include #include #include #include @@ -465,7 +467,7 @@ vcs_open(struct inode *inode, struct file *filp) return 0; } -static const struct file_operations vcs_fops = { +static struct file_operations vcs_fops = { .llseek = vcs_lseek, .read = vcs_read, .write = vcs_write, @@ -476,6 +478,12 @@ static struct class *vc_class; void vcs_make_devfs(struct tty_struct *tty) { + devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1), + S_IFCHR|S_IRUSR|S_IWUSR, + "vcc/%u", tty->index + 1); + devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129), + S_IFCHR|S_IRUSR|S_IWUSR, + "vcc/a%u", tty->index + 1); class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), NULL, "vcs%u", tty->index + 1); class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), @@ -483,6 +491,8 @@ void vcs_make_devfs(struct tty_struct *tty) } void vcs_remove_devfs(struct tty_struct *tty) { + devfs_remove("vcc/%u", tty->index + 1); + devfs_remove("vcc/a%u", tty->index + 1); class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); } @@ -493,6 +503,8 @@ int __init vcs_init(void) panic("unable to get major %d for vcs device", VCS_MAJOR); vc_class = class_create(THIS_MODULE, "vc"); + 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"); class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); return 0; diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 766f7864c..4e5360388 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -25,6 +25,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -1151,6 +1152,7 @@ static int __init viocons_init2(void) 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->name_base = 1; viotty_driver->major = TTY_MAJOR; diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index b72b2049a..60aabdb4a 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -31,6 +31,7 @@ * the OS/400 partition. The format of the messages is defined in * iseries/vio.h */ +#include #include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -244,6 +246,7 @@ static struct device *tape_device[VIOTAPE_MAX_TAPE]; */ static struct { unsigned char cur_part; + int dev_handle; unsigned char part_stat_rwi[MAX_PARTITIONS]; } state[VIOTAPE_MAX_TAPE]; @@ -292,7 +295,7 @@ static int proc_viotape_open(struct inode *inode, struct file *file) return single_open(file, proc_viotape_show, NULL); } -static const struct file_operations proc_viotape_operations = { +static struct file_operations proc_viotape_operations = { .open = proc_viotape_open, .read = seq_read, .llseek = seq_lseek, @@ -956,7 +959,12 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) "iseries!vt%d", i); class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), NULL, "iseries!nvt%d", i); + devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, + "iseries/vt%d", i); + devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80), + S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i); sprintf(tapename, "iseries/vt%d", i); + state[i].dev_handle = devfs_register_tape(tapename); printk(VIOTAPE_KERN_INFO "tape %s is iSeries " "resource %10.10s type %4.4s, model %3.3s\n", tapename, viotape_unitinfo[i].rsrcname, @@ -968,6 +976,9 @@ static int viotape_remove(struct vio_dev *vdev) { int i = vdev->unit_address; + devfs_remove("iseries/nvt%d", i); + devfs_remove("iseries/vt%d", i); + devfs_unregister_tape(state[i].dev_handle); class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); return 0; @@ -978,7 +989,7 @@ static int viotape_remove(struct vio_dev *vdev) * support. */ static struct vio_device_id viotape_device_table[] __devinitdata = { - { "byte", "IBM,iSeries-viotape" }, + { "viotape", "" }, { "", "" } }; MODULE_DEVICE_TABLE(vio, viotape_device_table); diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index bfe5ea948..fd00822ac 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -146,6 +147,7 @@ static int scc_init_drivers(void) scc_driver->owner = THIS_MODULE; scc_driver->driver_name = "scc"; scc_driver->name = "ttyS"; + scc_driver->devfs_name = "tts/"; scc_driver->major = TTY_MAJOR; scc_driver->minor_start = SCC_MINOR_BASE; scc_driver->type = TTY_DRIVER_TYPE_SERIAL; @@ -203,13 +205,13 @@ static int mvme147_scc_init(void) port->datap = port->ctrlp + 1; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, "SCC-A TX", port); - request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, "SCC-A status", port); - request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, "SCC-A RX", port); - request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-A special cond", port); { SCC_ACCESS_INIT(port); @@ -230,13 +232,13 @@ static int mvme147_scc_init(void) port->datap = port->ctrlp + 1; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, "SCC-B TX", port); - request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, "SCC-B status", port); - request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, "SCC-B RX", port); - request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-B special cond", port); { SCC_ACCESS_INIT(port); @@ -273,13 +275,13 @@ static int mvme162_scc_init(void) port->datap = port->ctrlp + 2; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, "SCC-A TX", port); - request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, "SCC-A status", port); - request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, "SCC-A RX", port); - request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-A special cond", port); { SCC_ACCESS_INIT(port); @@ -300,13 +302,13 @@ static int mvme162_scc_init(void) port->datap = port->ctrlp + 2; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, "SCC-B TX", port); - request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, "SCC-B status", port); - request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, "SCC-B RX", port); - request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-B special cond", port); { @@ -341,13 +343,13 @@ static int bvme6000_scc_init(void) port->datap = port->ctrlp + 4; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, "SCC-A TX", port); - request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, "SCC-A status", port); - request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, "SCC-A RX", port); - request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-A special cond", port); { SCC_ACCESS_INIT(port); @@ -368,13 +370,13 @@ static int bvme6000_scc_init(void) port->datap = port->ctrlp + 4; port->port_a = &scc_ports[0]; port->port_b = &scc_ports[1]; - request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, "SCC-B TX", port); - request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, "SCC-B status", port); - request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, "SCC-B RX", port); - request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, + request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, "SCC-B special cond", port); { diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 8116a47b8..05e6e814d 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c @@ -33,7 +33,6 @@ #include #include #include -#include #include MODULE_AUTHOR("Yoichi Yuasa "); @@ -606,7 +605,7 @@ static int gpio_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations gpio_fops = { +static struct file_operations gpio_fops = { .owner = THIS_MODULE, .read = gpio_read, .write = gpio_write, @@ -690,9 +689,9 @@ static int __devinit giu_probe(struct platform_device *dev) for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) { if (i < GIU_IRQ(GIUINT_HIGH_OFFSET)) - irq_desc[i].chip = &giuint_low_irq_type; + irq_desc[i].handler = &giuint_low_irq_type; else - irq_desc[i].chip = &giuint_high_irq_type; + irq_desc[i].handler = &giuint_high_irq_type; } return cascade_irq(GIUINT_IRQ, giu_get_irq); diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 4941c9535..3c77b8e74 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,7 @@ #include #include #include +#include #include #include #include @@ -96,22 +98,7 @@ #include #include -#define MAX_NR_CON_DRIVER 16 -#define CON_DRIVER_FLAG_MODULE 1 -#define CON_DRIVER_FLAG_INIT 2 - -struct con_driver { - const struct consw *con; - const char *desc; - struct class_device *class_dev; - int node; - int first; - int last; - int flag; -}; - -static struct con_driver registered_con_driver[MAX_NR_CON_DRIVER]; const struct consw *conswitchp; /* A bitmap for codes <32. A bit of 1 indicates that the code @@ -878,24 +865,14 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) return err; } -int vc_lock_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) -{ - int rc; - acquire_console_sem(); - rc = vc_resize(vc, cols, lines); - release_console_sem(); - return rc; -} - -void vc_deallocate(unsigned int currcons) +void vc_disallocate(unsigned int currcons) { WARN_CONSOLE_UNLOCKED(); if (vc_cons_allocated(currcons)) { struct vc_data *vc = vc_cons[currcons].d; vc->vc_sw->con_deinit(vc); - module_put(vc->vc_sw->owner); if (vc->vc_kmalloced) kfree(vc->vc_screenbuf); if (currcons >= MIN_NR_CONSOLES) @@ -2580,7 +2557,7 @@ static int __init con_init(void) { const char *display_desc = NULL; struct vc_data *vc; - unsigned int currcons = 0, i; + unsigned int currcons = 0; acquire_console_sem(); @@ -2592,22 +2569,6 @@ static int __init con_init(void) return 0; } - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - struct con_driver *con_driver = ®istered_con_driver[i]; - - if (con_driver->con == NULL) { - con_driver->con = conswitchp; - con_driver->desc = display_desc; - con_driver->flag = CON_DRIVER_FLAG_INIT; - con_driver->first = 0; - con_driver->last = MAX_NR_CONSOLES - 1; - break; - } - } - - for (i = 0; i < MAX_NR_CONSOLES; i++) - con_driver_map[i] = conswitchp; - init_timer(&console_timer); console_timer.function = blank_screen_t; if (blankinterval) { @@ -2671,6 +2632,7 @@ int __init vty_init(void) if (!console_driver) panic("Couldn't allocate console driver\n"); console_driver->owner = THIS_MODULE; + console_driver->devfs_name = "vc/"; console_driver->name = "tty"; console_driver->name_base = 1; console_driver->major = TTY_MAJOR; @@ -2694,53 +2656,38 @@ int __init vty_init(void) } #ifndef VT_SINGLE_DRIVER -#include -static struct class *vtconsole_class; +/* + * If we support more console drivers, this function is used + * when a driver wants to take over some existing consoles + * and become default driver for newly opened ones. + */ -static int bind_con_driver(const struct consw *csw, int first, int last, - int deflt) +int take_over_console(const struct consw *csw, int first, int last, int deflt) { - struct module *owner = csw->owner; - const char *desc = NULL; - struct con_driver *con_driver; - int i, j = -1, k = -1, retval = -ENODEV; + int i, j = -1; + const char *desc; + struct module *owner; + owner = csw->owner; if (!try_module_get(owner)) return -ENODEV; acquire_console_sem(); - /* check if driver is registered */ - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - con_driver = ®istered_con_driver[i]; - - if (con_driver->con == csw) { - desc = con_driver->desc; - retval = 0; - break; - } - } - - if (retval) - goto err; - - if (!(con_driver->flag & CON_DRIVER_FLAG_INIT)) { - csw->con_startup(); - con_driver->flag |= CON_DRIVER_FLAG_INIT; + desc = csw->con_startup(); + if (!desc) { + release_console_sem(); + module_put(owner); + return -ENODEV; } - if (deflt) { if (conswitchp) module_put(conswitchp->owner); - __module_get(owner); conswitchp = csw; } - first = max(first, con_driver->first); - last = min(last, con_driver->last); - for (i = first; i <= last; i++) { int old_was_color; struct vc_data *vc = vc_cons[i].d; @@ -2754,17 +2701,15 @@ static int bind_con_driver(const struct consw *csw, int first, int last, continue; j = i; - - if (CON_IS_VISIBLE(vc)) { - k = i; + if (CON_IS_VISIBLE(vc)) save_screen(vc); - } - old_was_color = vc->vc_can_do_color; vc->vc_sw->con_deinit(vc); vc->vc_origin = (unsigned long)vc->vc_screenbuf; + vc->vc_visible_origin = vc->vc_origin; + vc->vc_scr_end = vc->vc_origin + vc->vc_screenbuf_size; + vc->vc_pos = vc->vc_origin + vc->vc_size_row * vc->vc_y + 2 * vc->vc_x; visual_init(vc, i, 0); - set_origin(vc); update_attr(vc); /* If the console changed between mono <-> color, then @@ -2773,506 +2718,36 @@ static int bind_con_driver(const struct consw *csw, int first, int last, */ if (old_was_color != vc->vc_can_do_color) clear_buffer_attributes(vc); - } + if (CON_IS_VISIBLE(vc)) + update_screen(vc); + } printk("Console: switching "); if (!deflt) printk("consoles %d-%d ", first+1, last+1); - if (j >= 0) { - struct vc_data *vc = vc_cons[j].d; - + if (j >= 0) printk("to %s %s %dx%d\n", - vc->vc_can_do_color ? "colour" : "mono", - desc, vc->vc_cols, vc->vc_rows); - - if (k >= 0) { - vc = vc_cons[k].d; - update_screen(vc); - } - } else + vc_cons[j].d->vc_can_do_color ? "colour" : "mono", + desc, vc_cons[j].d->vc_cols, vc_cons[j].d->vc_rows); + else printk("to %s\n", desc); - retval = 0; -err: release_console_sem(); - module_put(owner); - return retval; -}; - -#ifdef CONFIG_VT_HW_CONSOLE_BINDING -static int con_is_graphics(const struct consw *csw, int first, int last) -{ - int i, retval = 0; - - for (i = first; i <= last; i++) { - struct vc_data *vc = vc_cons[i].d; - - if (vc && vc->vc_mode == KD_GRAPHICS) { - retval = 1; - break; - } - } - - return retval; -} -static int unbind_con_driver(const struct consw *csw, int first, int last, - int deflt) -{ - struct module *owner = csw->owner; - const struct consw *defcsw = NULL; - struct con_driver *con_driver = NULL, *con_back = NULL; - int i, retval = -ENODEV; - - if (!try_module_get(owner)) - return -ENODEV; - - acquire_console_sem(); - - /* check if driver is registered and if it is unbindable */ - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - con_driver = ®istered_con_driver[i]; - - if (con_driver->con == csw && - con_driver->flag & CON_DRIVER_FLAG_MODULE) { - retval = 0; - break; - } - } - - if (retval) { - release_console_sem(); - goto err; - } - - retval = -ENODEV; - - /* check if backup driver exists */ - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - con_back = ®istered_con_driver[i]; - - if (con_back->con && - !(con_back->flag & CON_DRIVER_FLAG_MODULE)) { - defcsw = con_back->con; - retval = 0; - break; - } - } - - if (retval) { - release_console_sem(); - goto err; - } - - if (!con_is_bound(csw)) { - release_console_sem(); - goto err; - } - - first = max(first, con_driver->first); - last = min(last, con_driver->last); - - for (i = first; i <= last; i++) { - if (con_driver_map[i] == csw) { - module_put(csw->owner); - con_driver_map[i] = NULL; - } - } - - if (!con_is_bound(defcsw)) { - const struct consw *defconsw = conswitchp; - - defcsw->con_startup(); - con_back->flag |= CON_DRIVER_FLAG_INIT; - /* - * vgacon may change the default driver to point - * to dummycon, we restore it here... - */ - conswitchp = defconsw; - } - - if (!con_is_bound(csw)) - con_driver->flag &= ~CON_DRIVER_FLAG_INIT; - - release_console_sem(); - /* ignore return value, binding should not fail */ - bind_con_driver(defcsw, first, last, deflt); -err: module_put(owner); - return retval; - -} - -static int vt_bind(struct con_driver *con) -{ - const struct consw *defcsw = NULL, *csw = NULL; - int i, more = 1, first = -1, last = -1, deflt = 0; - - if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE) || - con_is_graphics(con->con, con->first, con->last)) - goto err; - - csw = con->con; - - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - struct con_driver *con = ®istered_con_driver[i]; - - if (con->con && !(con->flag & CON_DRIVER_FLAG_MODULE)) { - defcsw = con->con; - break; - } - } - - if (!defcsw) - goto err; - - while (more) { - more = 0; - - for (i = con->first; i <= con->last; i++) { - if (con_driver_map[i] == defcsw) { - if (first == -1) - first = i; - last = i; - more = 1; - } else if (first != -1) - break; - } - - if (first == 0 && last == MAX_NR_CONSOLES -1) - deflt = 1; - - if (first != -1) - bind_con_driver(csw, first, last, deflt); - - first = -1; - last = -1; - deflt = 0; - } - -err: - return 0; -} - -static int vt_unbind(struct con_driver *con) -{ - const struct consw *csw = NULL; - int i, more = 1, first = -1, last = -1, deflt = 0; - - if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE) || - con_is_graphics(con->con, con->first, con->last)) - goto err; - - csw = con->con; - - while (more) { - more = 0; - - for (i = con->first; i <= con->last; i++) { - if (con_driver_map[i] == csw) { - if (first == -1) - first = i; - last = i; - more = 1; - } else if (first != -1) - break; - } - - if (first == 0 && last == MAX_NR_CONSOLES -1) - deflt = 1; - - if (first != -1) - unbind_con_driver(csw, first, last, deflt); - - first = -1; - last = -1; - deflt = 0; - } - -err: - return 0; -} -#else -static inline int vt_bind(struct con_driver *con) -{ - return 0; -} -static inline int vt_unbind(struct con_driver *con) -{ - return 0; -} -#endif /* CONFIG_VT_HW_CONSOLE_BINDING */ - -static ssize_t store_bind(struct class_device *class_device, - const char *buf, size_t count) -{ - struct con_driver *con = class_get_devdata(class_device); - int bind = simple_strtoul(buf, NULL, 0); - - if (bind) - vt_bind(con); - else - vt_unbind(con); - - return count; -} - -static ssize_t show_bind(struct class_device *class_device, char *buf) -{ - struct con_driver *con = class_get_devdata(class_device); - int bind = con_is_bound(con->con); - - return snprintf(buf, PAGE_SIZE, "%i\n", bind); -} - -static ssize_t show_name(struct class_device *class_device, char *buf) -{ - struct con_driver *con = class_get_devdata(class_device); - - return snprintf(buf, PAGE_SIZE, "%s %s\n", - (con->flag & CON_DRIVER_FLAG_MODULE) ? "(M)" : "(S)", - con->desc); - -} - -static struct class_device_attribute class_device_attrs[] = { - __ATTR(bind, S_IRUGO|S_IWUSR, show_bind, store_bind), - __ATTR(name, S_IRUGO, show_name, NULL), -}; - -static int vtconsole_init_class_device(struct con_driver *con) -{ - int i; - - class_set_devdata(con->class_dev, con); - for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) - class_device_create_file(con->class_dev, - &class_device_attrs[i]); - return 0; } -static void vtconsole_deinit_class_device(struct con_driver *con) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) - class_device_remove_file(con->class_dev, - &class_device_attrs[i]); -} - -/** - * con_is_bound - checks if driver is bound to the console - * @csw: console driver - * - * RETURNS: zero if unbound, nonzero if bound - * - * Drivers can call this and if zero, they should release - * all resources allocated on con_startup() - */ -int con_is_bound(const struct consw *csw) -{ - int i, bound = 0; - - for (i = 0; i < MAX_NR_CONSOLES; i++) { - if (con_driver_map[i] == csw) { - bound = 1; - break; - } - } - - return bound; -} -EXPORT_SYMBOL(con_is_bound); - -/** - * register_con_driver - register console driver to console layer - * @csw: console driver - * @first: the first console to take over, minimum value is 0 - * @last: the last console to take over, maximum value is MAX_NR_CONSOLES -1 - * - * DESCRIPTION: This function registers a console driver which can later - * bind to a range of consoles specified by @first and @last. It will - * also initialize the console driver by calling con_startup(). - */ -int register_con_driver(const struct consw *csw, int first, int last) -{ - struct module *owner = csw->owner; - struct con_driver *con_driver; - const char *desc; - int i, retval = 0; - - if (!try_module_get(owner)) - return -ENODEV; - - acquire_console_sem(); - - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - con_driver = ®istered_con_driver[i]; - - /* already registered */ - if (con_driver->con == csw) - retval = -EINVAL; - } - - if (retval) - goto err; - - desc = csw->con_startup(); - - if (!desc) - goto err; - - retval = -EINVAL; - - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - con_driver = ®istered_con_driver[i]; - - if (con_driver->con == NULL) { - con_driver->con = csw; - con_driver->desc = desc; - con_driver->node = i; - con_driver->flag = CON_DRIVER_FLAG_MODULE | - CON_DRIVER_FLAG_INIT; - con_driver->first = first; - con_driver->last = last; - retval = 0; - break; - } - } - - if (retval) - goto err; - - con_driver->class_dev = class_device_create(vtconsole_class, NULL, - MKDEV(0, con_driver->node), - NULL, "vtcon%i", - con_driver->node); - - if (IS_ERR(con_driver->class_dev)) { - printk(KERN_WARNING "Unable to create class_device for %s; " - "errno = %ld\n", con_driver->desc, - PTR_ERR(con_driver->class_dev)); - con_driver->class_dev = NULL; - } else { - vtconsole_init_class_device(con_driver); - } -err: - release_console_sem(); - module_put(owner); - return retval; -} -EXPORT_SYMBOL(register_con_driver); - -/** - * unregister_con_driver - unregister console driver from console layer - * @csw: console driver - * - * DESCRIPTION: All drivers that registers to the console layer must - * call this function upon exit, or if the console driver is in a state - * where it won't be able to handle console services, such as the - * framebuffer console without loaded framebuffer drivers. - * - * The driver must unbind first prior to unregistration. - */ -int unregister_con_driver(const struct consw *csw) -{ - int i, retval = -ENODEV; - - acquire_console_sem(); - - /* cannot unregister a bound driver */ - if (con_is_bound(csw)) - goto err; - - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - struct con_driver *con_driver = ®istered_con_driver[i]; - - if (con_driver->con == csw && - con_driver->flag & CON_DRIVER_FLAG_MODULE) { - vtconsole_deinit_class_device(con_driver); - class_device_destroy(vtconsole_class, - MKDEV(0, con_driver->node)); - con_driver->con = NULL; - con_driver->desc = NULL; - con_driver->class_dev = NULL; - con_driver->node = 0; - con_driver->flag = 0; - con_driver->first = 0; - con_driver->last = 0; - retval = 0; - break; - } - } -err: - release_console_sem(); - return retval; -} -EXPORT_SYMBOL(unregister_con_driver); - -/* - * If we support more console drivers, this function is used - * when a driver wants to take over some existing consoles - * and become default driver for newly opened ones. - * - * take_over_console is basically a register followed by unbind - */ -int take_over_console(const struct consw *csw, int first, int last, int deflt) -{ - int err; - - err = register_con_driver(csw, first, last); - - if (!err) - bind_con_driver(csw, first, last, deflt); - - return err; -} - -/* - * give_up_console is a wrapper to unregister_con_driver. It will only - * work if driver is fully unbound. - */ void give_up_console(const struct consw *csw) -{ - unregister_con_driver(csw); -} - -static int __init vtconsole_class_init(void) { int i; - vtconsole_class = class_create(THIS_MODULE, "vtconsole"); - if (IS_ERR(vtconsole_class)) { - printk(KERN_WARNING "Unable to create vt console class; " - "errno = %ld\n", PTR_ERR(vtconsole_class)); - vtconsole_class = NULL; - } - - /* Add system drivers to sysfs */ - for (i = 0; i < MAX_NR_CON_DRIVER; i++) { - struct con_driver *con = ®istered_con_driver[i]; - - if (con->con && !con->class_dev) { - con->class_dev = - class_device_create(vtconsole_class, NULL, - MKDEV(0, con->node), NULL, - "vtcon%i", con->node); - - if (IS_ERR(con->class_dev)) { - printk(KERN_WARNING "Unable to create " - "class_device for %s; errno = %ld\n", - con->desc, PTR_ERR(con->class_dev)); - con->class_dev = NULL; - } else { - vtconsole_init_class_device(con); - } + for(i = 0; i < MAX_NR_CONSOLES; i++) + if (con_driver_map[i] == csw) { + module_put(csw->owner); + con_driver_map[i] = NULL; } - } - - return 0; } -postcore_initcall(vtconsole_class_init); #endif @@ -3774,7 +3249,6 @@ EXPORT_SYMBOL(default_blu); EXPORT_SYMBOL(update_region); EXPORT_SYMBOL(redraw_screen); EXPORT_SYMBOL(vc_resize); -EXPORT_SYMBOL(vc_lock_resize); EXPORT_SYMBOL(fg_console); EXPORT_SYMBOL(console_blank_hook); EXPORT_SYMBOL(console_blanked); diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index a53e382cc..24011e7c8 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -10,6 +10,7 @@ * Check put/get_user, cleanups - acme@conectiva.com.br - Jun 2001 */ +#include #include #include #include @@ -96,7 +97,7 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str if (!perm) return -EPERM; if (!i && v == K_NOSUCHMAP) { - /* deallocate map */ + /* disallocate map */ key_map = key_maps[s]; if (s && key_map) { key_maps[s] = NULL; @@ -819,20 +820,20 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, if (arg > MAX_NR_CONSOLES) return -ENXIO; if (arg == 0) { - /* deallocate all unused consoles, but leave 0 */ + /* disallocate all unused consoles, but leave 0 */ acquire_console_sem(); for (i=1; iv_rows) || get_user(cc, &vtsizes->v_cols)) return -EFAULT; - for (i = 0; i < MAX_NR_CONSOLES; i++) - vc_lock_resize(vc_cons[i].d, cc, ll); + for (i = 0; i < MAX_NR_CONSOLES; i++) { + acquire_console_sem(); + vc_resize(vc_cons[i].d, cc, ll); + release_console_sem(); + } return 0; } @@ -1008,8 +1012,6 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, return -EPERM; vt_dont_switch = 0; return 0; - case VT_GETHIFONTMASK: - return put_user(vc->vc_hi_font_mask, (unsigned short __user *)arg); default: return -ENOIOCTLCMD; } diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig index fff89c2d8..d53f664a4 100644 --- a/drivers/char/watchdog/Kconfig +++ b/drivers/char/watchdog/Kconfig @@ -45,7 +45,7 @@ config WATCHDOG_NOWAYOUT comment "Watchdog Device Drivers" depends on WATCHDOG -# Architecture Independent +# Architecture Independant config SOFT_WATCHDOG tristate "Software watchdog" @@ -127,7 +127,7 @@ config S3C2410_WATCHDOG enabled. The driver is limited by the speed of the system's PCLK - signal, so with reasonably fast systems (PCLK around 50-66MHz) + signal, so with reasonbaly fast systems (PCLK around 50-66MHz) then watchdog intervals of over approximately 20seconds are unavailable. @@ -423,7 +423,7 @@ config SBC_EPX_C3_WATCHDOG is no way to know if writing to its IO address will corrupt your system or have any real effect. The only way to be sure that this driver does what you want is to make sure you - are running it on an EPX-C3 from Winsystems with the watchdog + are runnning it on an EPX-C3 from Winsystems with the watchdog timer at IO address 0x1ee and 0x1ef. It will write to both those IO ports. Basically, the assumption is made that if you compile this driver into your kernel and/or load it as a module, that you @@ -472,7 +472,7 @@ config INDYDOG tristate "Indy/I2 Hardware Watchdog" depends on WATCHDOG && SGI_IP22 help - Hardware driver for the Indy's/I2's watchdog. This is a + Hardwaredriver for the Indy's/I2's watchdog. This is a watchdog timer that will reboot the machine after a 60 second timer expired and no process has written to /dev/watchdog during that time. diff --git a/drivers/char/watchdog/acquirewdt.c b/drivers/char/watchdog/acquirewdt.c index c77fe3cf2..7289f4af9 100644 --- a/drivers/char/watchdog/acquirewdt.c +++ b/drivers/char/watchdog/acquirewdt.c @@ -231,7 +231,7 @@ static int acq_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations acq_fops = { +static struct file_operations acq_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = acq_write, diff --git a/drivers/char/watchdog/advantechwdt.c b/drivers/char/watchdog/advantechwdt.c index 8069be445..194a3fd36 100644 --- a/drivers/char/watchdog/advantechwdt.c +++ b/drivers/char/watchdog/advantechwdt.c @@ -227,7 +227,7 @@ advwdt_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations advwdt_fops = { +static struct file_operations advwdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = advwdt_write, diff --git a/drivers/char/watchdog/alim1535_wdt.c b/drivers/char/watchdog/alim1535_wdt.c index c5c94e4c9..8338ca300 100644 --- a/drivers/char/watchdog/alim1535_wdt.c +++ b/drivers/char/watchdog/alim1535_wdt.c @@ -362,7 +362,7 @@ static int __init ali_find_watchdog(void) * Kernel Interfaces */ -static const struct file_operations ali_fops = { +static struct file_operations ali_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = ali_write, diff --git a/drivers/char/watchdog/alim7101_wdt.c b/drivers/char/watchdog/alim7101_wdt.c index ffd7684f9..c05ac188a 100644 --- a/drivers/char/watchdog/alim7101_wdt.c +++ b/drivers/char/watchdog/alim7101_wdt.c @@ -281,7 +281,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u } } -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner= THIS_MODULE, .llseek= no_llseek, .write= fop_write, diff --git a/drivers/char/watchdog/at91_wdt.c b/drivers/char/watchdog/at91_wdt.c index cc266715e..ac83bc4b0 100644 --- a/drivers/char/watchdog/at91_wdt.c +++ b/drivers/char/watchdog/at91_wdt.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -16,15 +17,14 @@ #include #include #include -#include #include #include #include #include -#define WDT_DEFAULT_TIME 5 /* seconds */ -#define WDT_MAX_TIME 256 /* seconds */ +#define WDT_DEFAULT_TIME 5 /* 5 seconds */ +#define WDT_MAX_TIME 256 /* 256 seconds */ static int wdt_time = WDT_DEFAULT_TIME; static int nowayout = WATCHDOG_NOWAYOUT; @@ -32,10 +32,8 @@ static int nowayout = WATCHDOG_NOWAYOUT; module_param(wdt_time, int, 0); MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="__MODULE_STRING(WDT_DEFAULT_TIME) ")"); -#ifdef CONFIG_WATCHDOG_NOWAYOUT module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); -#endif static unsigned long at91wdt_busy; @@ -140,7 +138,7 @@ static int at91_wdt_ioctl(struct inode *inode, struct file *file, case WDIOC_SETTIMEOUT: if (get_user(new_value, p)) return -EFAULT; - + if (at91_wdt_settimeout(new_value)) return -EINVAL; @@ -183,7 +181,7 @@ static ssize_t at91_wdt_write(struct file *file, const char *data, size_t len, l /* ......................................................................... */ -static const struct file_operations at91wdt_fops = { +static struct file_operations at91wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = at91_wdt_ioctl, @@ -198,84 +196,27 @@ static struct miscdevice at91wdt_miscdev = { .fops = &at91wdt_fops, }; -static int __init at91wdt_probe(struct platform_device *pdev) +static int __init at91_wdt_init(void) { int res; - if (at91wdt_miscdev.dev) - return -EBUSY; - at91wdt_miscdev.dev = &pdev->dev; + /* Check that the heartbeat value is within range; if not reset to the default */ + if (at91_wdt_settimeout(wdt_time)) { + at91_wdt_settimeout(WDT_DEFAULT_TIME); + printk(KERN_INFO "at91_wdt: wdt_time value must be 1 <= wdt_time <= 256, using %d\n", wdt_time); + } res = misc_register(&at91wdt_miscdev); if (res) return res; - printk("AT91 Watchdog Timer enabled (%d seconds%s)\n", wdt_time, nowayout ? ", nowayout" : ""); + printk("AT91 Watchdog Timer enabled (%d seconds, nowayout=%d)\n", wdt_time, nowayout); return 0; } -static int __exit at91wdt_remove(struct platform_device *pdev) -{ - int res; - - res = misc_deregister(&at91wdt_miscdev); - if (!res) - at91wdt_miscdev.dev = NULL; - - return res; -} - -static void at91wdt_shutdown(struct platform_device *pdev) -{ - at91_wdt_stop(); -} - -#ifdef CONFIG_PM - -static int at91wdt_suspend(struct platform_device *pdev, pm_message_t message) -{ - at91_wdt_stop(); - return 0; -} - -static int at91wdt_resume(struct platform_device *pdev) -{ - if (at91wdt_busy) - at91_wdt_start(); - return 0; -} - -#else -#define at91wdt_suspend NULL -#define at91wdt_resume NULL -#endif - -static struct platform_driver at91wdt_driver = { - .probe = at91wdt_probe, - .remove = __exit_p(at91wdt_remove), - .shutdown = at91wdt_shutdown, - .suspend = at91wdt_suspend, - .resume = at91wdt_resume, - .driver = { - .name = "at91_wdt", - .owner = THIS_MODULE, - }, -}; - -static int __init at91_wdt_init(void) -{ - /* Check that the heartbeat value is within range; if not reset to the default */ - if (at91_wdt_settimeout(wdt_time)) { - at91_wdt_settimeout(WDT_DEFAULT_TIME); - pr_info("at91_wdt: wdt_time value must be 1 <= wdt_time <= 256, using %d\n", wdt_time); - } - - return platform_driver_register(&at91wdt_driver); -} - static void __exit at91_wdt_exit(void) { - platform_driver_unregister(&at91wdt_driver); + misc_deregister(&at91wdt_miscdev); } module_init(at91_wdt_init); diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c index e3cefc538..b6640606b 100644 --- a/drivers/char/watchdog/booke_wdt.c +++ b/drivers/char/watchdog/booke_wdt.c @@ -14,6 +14,7 @@ * option) any later version. */ +#include #include #include #include @@ -145,7 +146,7 @@ static int booke_wdt_open (struct inode *inode, struct file *file) return 0; } -static const struct file_operations booke_wdt_fops = { +static struct file_operations booke_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = booke_wdt_write, diff --git a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c index 04c7e4991..3e8410b5a 100644 --- a/drivers/char/watchdog/cpu5wdt.c +++ b/drivers/char/watchdog/cpu5wdt.c @@ -198,7 +198,7 @@ static ssize_t cpu5wdt_write(struct file *file, const char __user *buf, size_t c return count; } -static const struct file_operations cpu5wdt_fops = { +static struct file_operations cpu5wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = cpu5wdt_ioctl, diff --git a/drivers/char/watchdog/ep93xx_wdt.c b/drivers/char/watchdog/ep93xx_wdt.c index 77c8a955a..9021dbb78 100644 --- a/drivers/char/watchdog/ep93xx_wdt.c +++ b/drivers/char/watchdog/ep93xx_wdt.c @@ -187,7 +187,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations ep93xx_wdt_fops = { +static struct file_operations ep93xx_wdt_fops = { .owner = THIS_MODULE, .write = ep93xx_wdt_write, .ioctl = ep93xx_wdt_ioctl, diff --git a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c index 62dbccb2f..25c2f2575 100644 --- a/drivers/char/watchdog/eurotechwdt.c +++ b/drivers/char/watchdog/eurotechwdt.c @@ -40,6 +40,7 @@ * Added Matt Domsch's nowayout module option. */ +#include #include #include #include @@ -356,7 +357,7 @@ static int eurwdt_notify_sys(struct notifier_block *this, unsigned long code, */ -static const struct file_operations eurwdt_fops = { +static struct file_operations eurwdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = eurwdt_write, @@ -420,7 +421,7 @@ static int __init eurwdt_init(void) goto out; } - ret = request_irq(irq, eurwdt_interrupt, IRQF_DISABLED, "eurwdt", NULL); + ret = request_irq(irq, eurwdt_interrupt, SA_INTERRUPT, "eurwdt", NULL); if(ret) { printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq); goto outmisc; diff --git a/drivers/char/watchdog/i6300esb.c b/drivers/char/watchdog/i6300esb.c index 870539eab..93785f132 100644 --- a/drivers/char/watchdog/i6300esb.c +++ b/drivers/char/watchdog/i6300esb.c @@ -337,7 +337,7 @@ static int esb_notify_sys (struct notifier_block *this, unsigned long code, void * Kernel Interfaces */ -static const struct file_operations esb_fops = { +static struct file_operations esb_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = esb_write, diff --git a/drivers/char/watchdog/i8xx_tco.c b/drivers/char/watchdog/i8xx_tco.c index 8385dd36e..fa2ba9ebe 100644 --- a/drivers/char/watchdog/i8xx_tco.c +++ b/drivers/char/watchdog/i8xx_tco.c @@ -205,23 +205,6 @@ static int tco_timer_set_heartbeat (int t) return 0; } -static int tco_timer_get_timeleft (int *time_left) -{ - unsigned char val; - - spin_lock(&tco_lock); - - /* read the TCO Timer */ - val = inb (TCO1_RLD); - val &= 0x3f; - - spin_unlock(&tco_lock); - - *time_left = (int)((val * 6) / 10); - - return 0; -} - /* * /dev/watchdog handling */ @@ -289,7 +272,6 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file, { int new_options, retval = -EINVAL; int new_heartbeat; - int time_left; void __user *argp = (void __user *)arg; int __user *p = argp; static struct watchdog_info ident = { @@ -338,7 +320,7 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file, return -EFAULT; if (tco_timer_set_heartbeat(new_heartbeat)) - return -EINVAL; + return -EINVAL; tco_timer_keepalive (); /* Fall */ @@ -347,14 +329,6 @@ static int i8xx_tco_ioctl (struct inode *inode, struct file *file, case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - { - if (tco_timer_get_timeleft(&time_left)) - return -EINVAL; - - return put_user(time_left, p); - } - default: return -ENOIOCTLCMD; } @@ -378,7 +352,7 @@ static int i8xx_tco_notify_sys (struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations i8xx_tco_fops = { +static struct file_operations i8xx_tco_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = i8xx_tco_write, diff --git a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c index fd95f7327..cf60329ee 100644 --- a/drivers/char/watchdog/ib700wdt.c +++ b/drivers/char/watchdog/ib700wdt.c @@ -31,6 +31,7 @@ * */ +#include #include #include #include @@ -255,7 +256,7 @@ ibwdt_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations ibwdt_fops = { +static struct file_operations ibwdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = ibwdt_write, diff --git a/drivers/char/watchdog/ibmasr.c b/drivers/char/watchdog/ibmasr.c index 26ceee7a4..294c474ae 100644 --- a/drivers/char/watchdog/ibmasr.c +++ b/drivers/char/watchdog/ibmasr.c @@ -10,6 +10,7 @@ * of the GNU Public License, incorporated herein by reference. */ +#include #include #include #include @@ -322,7 +323,7 @@ static int asr_release(struct inode *inode, struct file *file) return 0; } -static const struct file_operations asr_fops = { +static struct file_operations asr_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = asr_write, diff --git a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c index dacc1c20a..b4b94daba 100644 --- a/drivers/char/watchdog/indydog.c +++ b/drivers/char/watchdog/indydog.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -154,7 +155,7 @@ static int indydog_notify_sys(struct notifier_block *this, unsigned long code, v return NOTIFY_DONE; } -static const struct file_operations indydog_fops = { +static struct file_operations indydog_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = indydog_write, diff --git a/drivers/char/watchdog/ixp2000_wdt.c b/drivers/char/watchdog/ixp2000_wdt.c index 692908819..0cfb9b9c4 100644 --- a/drivers/char/watchdog/ixp2000_wdt.c +++ b/drivers/char/watchdog/ixp2000_wdt.c @@ -16,6 +16,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -168,7 +169,7 @@ ixp2000_wdt_release(struct inode *inode, struct file *file) } -static const struct file_operations ixp2000_wdt_fops = +static struct file_operations ixp2000_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c index 9db5cf2c3..3800835ca 100644 --- a/drivers/char/watchdog/ixp4xx_wdt.c +++ b/drivers/char/watchdog/ixp4xx_wdt.c @@ -13,6 +13,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -162,7 +163,7 @@ ixp4xx_wdt_release(struct inode *inode, struct file *file) } -static const struct file_operations ixp4xx_wdt_fops = +static struct file_operations ixp4xx_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c index 23734e07f..da053b5a5 100644 --- a/drivers/char/watchdog/machzwd.c +++ b/drivers/char/watchdog/machzwd.c @@ -28,6 +28,7 @@ * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT */ +#include #include #include #include @@ -388,7 +389,7 @@ static int zf_notify_sys(struct notifier_block *this, unsigned long code, -static const struct file_operations zf_fops = { +static struct file_operations zf_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = zf_write, @@ -426,8 +427,7 @@ static int __init zf_init(void) printk(KERN_INFO PFX ": MachZ ZF-Logic Watchdog driver initializing.\n"); ret = zf_get_ZFL_version(); - printk("%#x\n", ret); - if((!ret) || (ret != 0xffff)){ + if ((!ret) || (ret == 0xffff)) { printk(KERN_WARNING PFX ": no ZF-Logic found\n"); return -ENODEV; } diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c index ae943324d..d8dede575 100644 --- a/drivers/char/watchdog/mixcomwd.c +++ b/drivers/char/watchdog/mixcomwd.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -190,7 +191,7 @@ static int mixcomwd_ioctl(struct inode *inode, struct file *file, return 0; } -static const struct file_operations mixcomwd_fops= +static struct file_operations mixcomwd_fops= { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/mpc83xx_wdt.c b/drivers/char/watchdog/mpc83xx_wdt.c index a480903ee..5d6f50616 100644 --- a/drivers/char/watchdog/mpc83xx_wdt.c +++ b/drivers/char/watchdog/mpc83xx_wdt.c @@ -15,6 +15,7 @@ * option) any later version. */ +#include #include #include #include @@ -129,7 +130,7 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file, } } -static const struct file_operations mpc83xx_wdt_fops = { +static struct file_operations mpc83xx_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = mpc83xx_wdt_write, diff --git a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c index 35dd9e6e1..b2fc71e20 100644 --- a/drivers/char/watchdog/mpc8xx_wdt.c +++ b/drivers/char/watchdog/mpc8xx_wdt.c @@ -9,6 +9,7 @@ * or implied. */ +#include #include #include #include @@ -132,7 +133,7 @@ static int mpc8xx_wdt_ioctl(struct inode *inode, struct file *file, return 0; } -static const struct file_operations mpc8xx_wdt_fops = { +static struct file_operations mpc8xx_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = mpc8xx_wdt_write, diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 54b3c56ea..2c2c51773 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c @@ -21,6 +21,7 @@ */ #include #include +#include #include #include #include @@ -297,7 +298,7 @@ static void mpcore_wdt_shutdown(struct platform_device *dev) /* * Kernel Interfaces */ -static const struct file_operations mpcore_wdt_fops = { +static struct file_operations mpcore_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = mpcore_wdt_write, @@ -355,7 +356,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) goto err_misc; } - ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, "mpcore_wdt", wdt); + ret = request_irq(wdt->irq, mpcore_wdt_fire, SA_INTERRUPT, "mpcore_wdt", wdt); if (ret) { dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq); goto err_irq; diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c index 5c8fab345..f1b9cf89f 100644 --- a/drivers/char/watchdog/mv64x60_wdt.c +++ b/drivers/char/watchdog/mv64x60_wdt.c @@ -15,6 +15,7 @@ * or implied. */ +#include #include #include #include @@ -166,7 +167,7 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file, return 0; } -static const struct file_operations mv64x60_wdt_fops = { +static struct file_operations mv64x60_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = mv64x60_wdt_write, diff --git a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c index 9718717c4..6d44ca683 100644 --- a/drivers/char/watchdog/pcwd.c +++ b/drivers/char/watchdog/pcwd.c @@ -49,6 +49,7 @@ * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ */ +#include /* For CONFIG_WATCHDOG_NOWAYOUT/... */ #include /* For module specific items */ #include /* For new moduleparam's */ #include /* For standard types (like size_t) */ @@ -739,7 +740,7 @@ static int pcwd_notify_sys(struct notifier_block *this, unsigned long code, void * Kernel Interfaces */ -static const struct file_operations pcwd_fops = { +static struct file_operations pcwd_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pcwd_write, @@ -754,7 +755,7 @@ static struct miscdevice pcwd_miscdev = { .fops = &pcwd_fops, }; -static const struct file_operations pcwd_temp_fops = { +static struct file_operations pcwd_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = pcwd_temp_read, diff --git a/drivers/char/watchdog/pcwd_pci.c b/drivers/char/watchdog/pcwd_pci.c index 21ed0c5e1..2451edbef 100644 --- a/drivers/char/watchdog/pcwd_pci.c +++ b/drivers/char/watchdog/pcwd_pci.c @@ -21,7 +21,7 @@ */ /* - * A bells and whistles driver is available from: + * A bells and whistles driver is available from: * http://www.kernel.org/pub/linux/kernel/people/wim/pcwd/pcwd_pci/ * * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/ @@ -31,6 +31,7 @@ * Includes, defines, variables, module parameters, ... */ +#include /* For CONFIG_WATCHDOG_NOWAYOUT/... */ #include /* For module specific items */ #include /* For new moduleparam's */ #include /* For standard types (like size_t) */ @@ -389,24 +390,6 @@ static int pcipcwd_get_temperature(int *temperature) return 0; } -static int pcipcwd_get_timeleft(int *time_left) -{ - int msb; - int lsb; - - /* Read the time that's left before rebooting */ - /* Note: if the board is not yet armed then we will read 0xFFFF */ - send_command(CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb); - - *time_left = (msb << 8) + lsb; - - if (debug >= VERBOSE) - printk(KERN_DEBUG PFX "Time left before next reboot: %d\n", - *time_left); - - return 0; -} - /* * /dev/watchdog handling */ @@ -529,16 +512,6 @@ static int pcipcwd_ioctl(struct inode *inode, struct file *file, case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - { - int time_left; - - if (pcipcwd_get_timeleft(&time_left)) - return -EFAULT; - - return put_user(time_left, p); - } - default: return -ENOIOCTLCMD; } @@ -624,7 +597,7 @@ static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, v * Kernel Interfaces */ -static const struct file_operations pcipcwd_fops = { +static struct file_operations pcipcwd_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pcipcwd_write, @@ -639,7 +612,7 @@ static struct miscdevice pcipcwd_miscdev = { .fops = &pcipcwd_fops, }; -static const struct file_operations pcipcwd_temp_fops = { +static struct file_operations pcipcwd_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = pcipcwd_temp_read, diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index b7ae73dcd..3fdfda932 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c @@ -24,6 +24,7 @@ * http://www.berkprod.com/ or http://www.pcwatchdog.com/ */ +#include #include #include #include @@ -316,19 +317,6 @@ static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temp return 0; } -static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd, int *time_left) -{ - unsigned char msb, lsb; - - /* Read the time that's left before rebooting */ - /* Note: if the board is not yet armed then we will read 0xFFFF */ - usb_pcwd_send_command(usb_pcwd, CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb); - - *time_left = (msb << 8) + lsb; - - return 0; -} - /* * /dev/watchdog handling */ @@ -434,16 +422,6 @@ static int usb_pcwd_ioctl(struct inode *inode, struct file *file, case WDIOC_GETTIMEOUT: return put_user(heartbeat, p); - case WDIOC_GETTIMELEFT: - { - int time_left; - - if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left)) - return -EFAULT; - - return put_user(time_left, p); - } - default: return -ENOIOCTLCMD; } @@ -523,7 +501,7 @@ static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations usb_pcwd_fops = { +static struct file_operations usb_pcwd_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = usb_pcwd_write, @@ -538,7 +516,7 @@ static struct miscdevice usb_pcwd_miscdev = { .fops = &usb_pcwd_fops, }; -static const struct file_operations usb_pcwd_temperature_fops = { +static struct file_operations usb_pcwd_temperature_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = usb_pcwd_temperature_read, diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c index be978e8ed..1ea04e9b2 100644 --- a/drivers/char/watchdog/s3c2410_wdt.c +++ b/drivers/char/watchdog/s3c2410_wdt.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -319,7 +320,7 @@ static int s3c2410wdt_ioctl(struct inode *inode, struct file *file, /* kernel interface */ -static const struct file_operations s3c2410wdt_fops = { +static struct file_operations s3c2410wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = s3c2410wdt_write, diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c index 1fc16d995..522a9370d 100644 --- a/drivers/char/watchdog/sa1100_wdt.c +++ b/drivers/char/watchdog/sa1100_wdt.c @@ -17,6 +17,7 @@ * * 27/11/2000 Initial release */ +#include #include #include #include @@ -135,7 +136,7 @@ static int sa1100dog_ioctl(struct inode *inode, struct file *file, return ret; } -static const struct file_operations sa1100dog_fops = +static struct file_operations sa1100dog_fops = { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/sbc60xxwdt.c b/drivers/char/watchdog/sbc60xxwdt.c index 4663c2fd5..ed0bd55fb 100644 --- a/drivers/char/watchdog/sbc60xxwdt.c +++ b/drivers/char/watchdog/sbc60xxwdt.c @@ -282,7 +282,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } } -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = fop_write, diff --git a/drivers/char/watchdog/sbc8360.c b/drivers/char/watchdog/sbc8360.c index 41fc6f80c..c6cbf808d 100644 --- a/drivers/char/watchdog/sbc8360.c +++ b/drivers/char/watchdog/sbc8360.c @@ -36,6 +36,7 @@ * */ +#include #include #include #include @@ -200,7 +201,7 @@ static int wd_margin = 0xB; static int wd_multiplier = 2; static int nowayout = WATCHDOG_NOWAYOUT; -module_param(timeout, int, 0); +module_param(timeout, int, 27); MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))"); module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, @@ -305,7 +306,7 @@ static int sbc8360_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations sbc8360_fops = { +static struct file_operations sbc8360_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = sbc8360_write, @@ -407,7 +408,7 @@ module_exit(sbc8360_exit); MODULE_AUTHOR("Ian E. Morgan "); MODULE_DESCRIPTION("SBC8360 watchdog driver"); MODULE_LICENSE("GPL"); -MODULE_VERSION("1.01"); +MODULE_VERSION("1.0"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); /* end of sbc8360.c */ diff --git a/drivers/char/watchdog/sbc_epx_c3.c b/drivers/char/watchdog/sbc_epx_c3.c index bfc475dab..837b1ec3f 100644 --- a/drivers/char/watchdog/sbc_epx_c3.c +++ b/drivers/char/watchdog/sbc_epx_c3.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -154,7 +155,7 @@ static int epx_c3_notify_sys(struct notifier_block *this, unsigned long code, return NOTIFY_DONE; } -static const struct file_operations epx_c3_fops = { +static struct file_operations epx_c3_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = epx_c3_write, diff --git a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c index cb92a1bf6..20b88f9b7 100644 --- a/drivers/char/watchdog/sc1200wdt.c +++ b/drivers/char/watchdog/sc1200wdt.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include @@ -292,7 +293,7 @@ static struct notifier_block sc1200wdt_notifier = .notifier_call = sc1200wdt_notify_sys, }; -static const struct file_operations sc1200wdt_fops = +static struct file_operations sc1200wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, @@ -392,7 +393,7 @@ static int __init sc1200wdt_init(void) if (io == -1) { printk(KERN_ERR PFX "io parameter must be specified\n"); ret = -EINVAL; - goto out_pnp; + goto out_clean; } #if defined CONFIG_PNP @@ -405,7 +406,7 @@ static int __init sc1200wdt_init(void) if (!request_region(io, io_len, SC1200_MODULE_NAME)) { printk(KERN_ERR PFX "Unable to register IO port %#x\n", io); ret = -EBUSY; - goto out_pnp; + goto out_clean; } ret = sc1200wdt_probe(); @@ -435,11 +436,6 @@ out_rbt: out_io: release_region(io, io_len); -out_pnp: -#if defined CONFIG_PNP - if (isapnp) - pnp_unregister_driver(&scl200wdt_pnp_driver); -#endif goto out_clean; } diff --git a/drivers/char/watchdog/sc520_wdt.c b/drivers/char/watchdog/sc520_wdt.c index 2c7c9db71..4ee9974ad 100644 --- a/drivers/char/watchdog/sc520_wdt.c +++ b/drivers/char/watchdog/sc520_wdt.c @@ -336,7 +336,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } } -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = fop_write, diff --git a/drivers/char/watchdog/scx200_wdt.c b/drivers/char/watchdog/scx200_wdt.c index c561299a5..b4a102a2d 100644 --- a/drivers/char/watchdog/scx200_wdt.c +++ b/drivers/char/watchdog/scx200_wdt.c @@ -17,6 +17,7 @@ of any nature resulting due to the use of this software. This software is provided AS-IS with no warranties. */ +#include #include #include #include @@ -194,7 +195,7 @@ static int scx200_wdt_ioctl(struct inode *inode, struct file *file, } } -static const struct file_operations scx200_wdt_fops = { +static struct file_operations scx200_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = scx200_wdt_write, diff --git a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c index 1355038f1..1f4cab55b 100644 --- a/drivers/char/watchdog/shwdt.c +++ b/drivers/char/watchdog/shwdt.c @@ -17,6 +17,7 @@ * Added expect close support, made emulated timeout runtime changeable * general cleanups, add some ioctls */ +#include #include #include #include @@ -344,7 +345,7 @@ static int sh_wdt_notify_sys(struct notifier_block *this, return NOTIFY_DONE; } -static const struct file_operations sh_wdt_fops = { +static struct file_operations sh_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = sh_wdt_write, diff --git a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c index ef8da5175..a91edaf3a 100644 --- a/drivers/char/watchdog/softdog.c +++ b/drivers/char/watchdog/softdog.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -243,7 +244,7 @@ static int softdog_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations softdog_fops = { +static struct file_operations softdog_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = softdog_write, diff --git a/drivers/char/watchdog/w83627hf_wdt.c b/drivers/char/watchdog/w83627hf_wdt.c index 13f16d41c..d15ca9a39 100644 --- a/drivers/char/watchdog/w83627hf_wdt.c +++ b/drivers/char/watchdog/w83627hf_wdt.c @@ -274,7 +274,7 @@ wdt_notify_sys(struct notifier_block *this, unsigned long code, * Kernel Interfaces */ -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdt_write, diff --git a/drivers/char/watchdog/w83877f_wdt.c b/drivers/char/watchdog/w83877f_wdt.c index ccf6c0915..52a8bd0a5 100644 --- a/drivers/char/watchdog/w83877f_wdt.c +++ b/drivers/char/watchdog/w83877f_wdt.c @@ -299,7 +299,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } } -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = fop_write, diff --git a/drivers/char/watchdog/w83977f_wdt.c b/drivers/char/watchdog/w83977f_wdt.c index 98f4e17db..a7ff64c89 100644 --- a/drivers/char/watchdog/w83977f_wdt.c +++ b/drivers/char/watchdog/w83977f_wdt.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -449,7 +450,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, return NOTIFY_DONE; } -static const struct file_operations wdt_fops= +static struct file_operations wdt_fops= { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/wafer5823wdt.c b/drivers/char/watchdog/wafer5823wdt.c index 2bb6a9d6a..7cf6c9bbf 100644 --- a/drivers/char/watchdog/wafer5823wdt.c +++ b/drivers/char/watchdog/wafer5823wdt.c @@ -222,7 +222,7 @@ static int wafwdt_notify_sys(struct notifier_block *this, unsigned long code, vo * Kernel Interfaces */ -static const struct file_operations wafwdt_fops = { +static struct file_operations wafwdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wafwdt_write, diff --git a/drivers/char/watchdog/wd501p.h b/drivers/char/watchdog/wd501p.h index a4504f403..84e60eb74 100644 --- a/drivers/char/watchdog/wd501p.h +++ b/drivers/char/watchdog/wd501p.h @@ -19,6 +19,7 @@ * */ +#include #define WDT_COUNT0 (io+0) #define WDT_COUNT1 (io+1) diff --git a/drivers/char/watchdog/wdrtas.c b/drivers/char/watchdog/wdrtas.c index 5c38cdf41..dacfe31ca 100644 --- a/drivers/char/watchdog/wdrtas.c +++ b/drivers/char/watchdog/wdrtas.c @@ -26,6 +26,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -520,7 +521,7 @@ wdrtas_reboot(struct notifier_block *this, unsigned long code, void *ptr) /*** initialization stuff */ -static const struct file_operations wdrtas_fops = { +static struct file_operations wdrtas_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdrtas_write, @@ -535,7 +536,7 @@ static struct miscdevice wdrtas_miscdev = { .fops = &wdrtas_fops, }; -static const struct file_operations wdrtas_temp_fops = { +static struct file_operations wdrtas_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = wdrtas_temp_read, diff --git a/drivers/char/watchdog/wdt.c b/drivers/char/watchdog/wdt.c index 70be81e39..ec7e40122 100644 --- a/drivers/char/watchdog/wdt.c +++ b/drivers/char/watchdog/wdt.c @@ -31,6 +31,7 @@ * Matt Domsch : Added nowayout module option */ +#include #include #include #include @@ -494,7 +495,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, */ -static const struct file_operations wdt_fops = { +static struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdt_write, @@ -510,7 +511,7 @@ static struct miscdevice wdt_miscdev = { }; #ifdef CONFIG_WDT_501 -static const struct file_operations wdt_temp_fops = { +static struct file_operations wdt_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = wdt_temp_read, @@ -580,7 +581,7 @@ static int __init wdt_init(void) goto out; } - ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL); + ret = request_irq(irq, wdt_interrupt, SA_INTERRUPT, "wdt501p", NULL); if(ret) { printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); goto outreg; diff --git a/drivers/char/watchdog/wdt285.c b/drivers/char/watchdog/wdt285.c index 6555fb844..52825a1f1 100644 --- a/drivers/char/watchdog/wdt285.c +++ b/drivers/char/watchdog/wdt285.c @@ -178,7 +178,7 @@ watchdog_ioctl(struct inode *inode, struct file *file, unsigned int cmd, return ret; } -static const struct file_operations watchdog_fops = { +static struct file_operations watchdog_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = watchdog_write, diff --git a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c index a0935bc77..3843900e9 100644 --- a/drivers/char/watchdog/wdt977.c +++ b/drivers/char/watchdog/wdt977.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -418,7 +419,7 @@ static int wdt977_notify_sys(struct notifier_block *this, unsigned long code, return NOTIFY_DONE; } -static const struct file_operations wdt977_fops= +static struct file_operations wdt977_fops= { .owner = THIS_MODULE, .llseek = no_llseek, diff --git a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c index 5918ca2c9..4b3311993 100644 --- a/drivers/char/watchdog/wdt_pci.c +++ b/drivers/char/watchdog/wdt_pci.c @@ -35,6 +35,7 @@ * Matt Domsch : nowayout module option */ +#include #include #include #include @@ -543,7 +544,7 @@ static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code, */ -static const struct file_operations wdtpci_fops = { +static struct file_operations wdtpci_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdtpci_write, @@ -559,7 +560,7 @@ static struct miscdevice wdtpci_miscdev = { }; #ifdef CONFIG_WDT_501_PCI -static const struct file_operations wdtpci_temp_fops = { +static struct file_operations wdtpci_temp_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = wdtpci_temp_read, @@ -617,7 +618,7 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev, goto out_pci; } - if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq (irq, wdtpci_interrupt, SA_INTERRUPT | SA_SHIRQ, "wdt_pci", &wdtpci_miscdev)) { printk (KERN_ERR PFX "IRQ %d is not free\n", irq); goto out_reg; diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile deleted file mode 100644 index a52225470..000000000 --- a/drivers/clocksource/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-$(CONFIG_X86_CYCLONE_TIMER) += cyclone.o -obj-$(CONFIG_X86_PM_TIMER) += acpi_pm.o -obj-$(CONFIG_SCx200HR_TIMER) += scx200_hrt.o diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c deleted file mode 100644 index 7ad3be8c0..000000000 --- a/drivers/clocksource/acpi_pm.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * linux/drivers/clocksource/acpi_pm.c - * - * This file contains the ACPI PM based clocksource. - * - * This code was largely moved from the i386 timer_pm.c file - * which was (C) Dominik Brodowski 2003 - * and contained the following comments: - * - * Driver to use the Power Management Timer (PMTMR) available in some - * southbridges as primary timing source for the Linux kernel. - * - * Based on parts of linux/drivers/acpi/hardware/hwtimer.c, timer_pit.c, - * timer_hpet.c, and on Arjan van de Ven's implementation for 2.4. - * - * This file is licensed under the GPL v2. - */ - -#include -#include -#include -#include -#include - -/* Number of PMTMR ticks expected during calibration run */ -#define PMTMR_TICKS_PER_SEC 3579545 - -/* - * The I/O port the PMTMR resides at. - * The location is detected during setup_arch(), - * in arch/i386/acpi/boot.c - */ -u32 pmtmr_ioport __read_mostly; - -#define ACPI_PM_MASK CLOCKSOURCE_MASK(24) /* limit it to 24 bits */ - -static inline u32 read_pmtmr(void) -{ - /* mask the output to 24 bits */ - return inl(pmtmr_ioport) & ACPI_PM_MASK; -} - -static cycle_t acpi_pm_read_verified(void) -{ - u32 v1 = 0, v2 = 0, v3 = 0; - - /* - * It has been reported that because of various broken - * chipsets (ICH4, PIIX4 and PIIX4E) where the ACPI PM clock - * source is not latched, you must read it multiple - * times to ensure a safe value is read: - */ - do { - v1 = read_pmtmr(); - v2 = read_pmtmr(); - v3 = read_pmtmr(); - } while ((v1 > v2 && v1 < v3) || (v2 > v3 && v2 < v1) - || (v3 > v1 && v3 < v2)); - - return (cycle_t)v2; -} - -static cycle_t acpi_pm_read(void) -{ - return (cycle_t)read_pmtmr(); -} - -static struct clocksource clocksource_acpi_pm = { - .name = "acpi_pm", - .rating = 200, - .read = acpi_pm_read, - .mask = (cycle_t)ACPI_PM_MASK, - .mult = 0, /*to be caluclated*/ - .shift = 22, - .is_continuous = 1, -}; - - -#ifdef CONFIG_PCI -static int acpi_pm_good; -static int __init acpi_pm_good_setup(char *__str) -{ - acpi_pm_good = 1; - return 1; -} -__setup("acpi_pm_good", acpi_pm_good_setup); - -static inline void acpi_pm_need_workaround(void) -{ - clocksource_acpi_pm.read = acpi_pm_read_verified; - clocksource_acpi_pm.rating = 110; -} - -/* - * PIIX4 Errata: - * - * The power management timer may return improper results when read. - * Although the timer value settles properly after incrementing, - * while incrementing there is a 3 ns window every 69.8 ns where the - * timer value is indeterminate (a 4.2% chance that the data will be - * incorrect when read). As a result, the ACPI free running count up - * timer specification is violated due to erroneous reads. - */ -static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev) -{ - u8 rev; - - if (acpi_pm_good) - return; - - pci_read_config_byte(dev, PCI_REVISION_ID, &rev); - /* the bug has been fixed in PIIX4M */ - if (rev < 3) { - printk(KERN_WARNING "* Found PM-Timer Bug on the chipset." - " Due to workarounds for a bug,\n" - "* this clock source is slow. Consider trying" - " other clock sources\n"); - - acpi_pm_need_workaround(); - } -} -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, - acpi_pm_check_blacklist); - -static void __devinit acpi_pm_check_graylist(struct pci_dev *dev) -{ - if (acpi_pm_good) - return; - - printk(KERN_WARNING "* The chipset may have PM-Timer Bug. Due to" - " workarounds for a bug,\n" - "* this clock source is slow. If you are sure your timer" - " does not have\n" - "* this bug, please use \"acpi_pm_good\" to disable the" - " workaround\n"); - - acpi_pm_need_workaround(); -} -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, - acpi_pm_check_graylist); -#endif - - -static int __init init_acpi_pm_clocksource(void) -{ - u32 value1, value2; - unsigned int i; - - if (!pmtmr_ioport) - return -ENODEV; - - clocksource_acpi_pm.mult = clocksource_hz2mult(PMTMR_TICKS_PER_SEC, - clocksource_acpi_pm.shift); - - /* "verify" this timing source: */ - value1 = read_pmtmr(); - for (i = 0; i < 10000; i++) { - value2 = read_pmtmr(); - if (value2 == value1) - continue; - if (value2 > value1) - goto pm_good; - if ((value2 < value1) && ((value2) < 0xFFF)) - goto pm_good; - printk(KERN_INFO "PM-Timer had inconsistent results:" - " 0x%#x, 0x%#x - aborting.\n", value1, value2); - return -EINVAL; - } - printk(KERN_INFO "PM-Timer had no reasonable result:" - " 0x%#x - aborting.\n", value1); - return -ENODEV; - -pm_good: - return clocksource_register(&clocksource_acpi_pm); -} - -module_init(init_acpi_pm_clocksource); diff --git a/drivers/clocksource/cyclone.c b/drivers/clocksource/cyclone.c deleted file mode 100644 index bf4d3d50d..000000000 --- a/drivers/clocksource/cyclone.c +++ /dev/null @@ -1,119 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include - -#include "mach_timer.h" - -#define CYCLONE_CBAR_ADDR 0xFEB00CD0 /* base address ptr */ -#define CYCLONE_PMCC_OFFSET 0x51A0 /* offset to control register */ -#define CYCLONE_MPCS_OFFSET 0x51A8 /* offset to select register */ -#define CYCLONE_MPMC_OFFSET 0x51D0 /* offset to count register */ -#define CYCLONE_TIMER_FREQ 99780000 /* 100Mhz, but not really */ -#define CYCLONE_TIMER_MASK CLOCKSOURCE_MASK(32) /* 32 bit mask */ - -int use_cyclone = 0; -static void __iomem *cyclone_ptr; - -static cycle_t read_cyclone(void) -{ - return (cycle_t)readl(cyclone_ptr); -} - -static struct clocksource clocksource_cyclone = { - .name = "cyclone", - .rating = 250, - .read = read_cyclone, - .mask = CYCLONE_TIMER_MASK, - .mult = 10, - .shift = 0, - .is_continuous = 1, -}; - -static int __init init_cyclone_clocksource(void) -{ - unsigned long base; /* saved value from CBAR */ - unsigned long offset; - u32 __iomem* volatile cyclone_timer; /* Cyclone MPMC0 register */ - u32 __iomem* reg; - int i; - - /* make sure we're on a summit box: */ - if (!use_cyclone) - return -ENODEV; - - printk(KERN_INFO "Summit chipset: Starting Cyclone Counter.\n"); - - /* find base address: */ - offset = CYCLONE_CBAR_ADDR; - reg = ioremap_nocache(offset, sizeof(reg)); - if (!reg) { - printk(KERN_ERR "Summit chipset: Could not find valid CBAR register.\n"); - return -ENODEV; - } - /* even on 64bit systems, this is only 32bits: */ - base = readl(reg); - if (!base) { - printk(KERN_ERR "Summit chipset: Could not find valid CBAR value.\n"); - return -ENODEV; - } - iounmap(reg); - - /* setup PMCC: */ - offset = base + CYCLONE_PMCC_OFFSET; - reg = ioremap_nocache(offset, sizeof(reg)); - if (!reg) { - printk(KERN_ERR "Summit chipset: Could not find valid PMCC register.\n"); - return -ENODEV; - } - writel(0x00000001,reg); - iounmap(reg); - - /* setup MPCS: */ - offset = base + CYCLONE_MPCS_OFFSET; - reg = ioremap_nocache(offset, sizeof(reg)); - if (!reg) { - printk(KERN_ERR "Summit chipset: Could not find valid MPCS register.\n"); - return -ENODEV; - } - writel(0x00000001,reg); - iounmap(reg); - - /* map in cyclone_timer: */ - offset = base + CYCLONE_MPMC_OFFSET; - cyclone_timer = ioremap_nocache(offset, sizeof(u64)); - if (!cyclone_timer) { - printk(KERN_ERR "Summit chipset: Could not find valid MPMC register.\n"); - return -ENODEV; - } - - /* quick test to make sure its ticking: */ - for (i = 0; i < 3; i++){ - u32 old = readl(cyclone_timer); - int stall = 100; - - while (stall--) - barrier(); - - if (readl(cyclone_timer) == old) { - printk(KERN_ERR "Summit chipset: Counter not counting! DISABLED\n"); - iounmap(cyclone_timer); - cyclone_timer = NULL; - return -ENODEV; - } - } - cyclone_ptr = cyclone_timer; - - /* sort out mult/shift values: */ - clocksource_cyclone.shift = 22; - clocksource_cyclone.mult = clocksource_hz2mult(CYCLONE_TIMER_FREQ, - clocksource_cyclone.shift); - - return clocksource_register(&clocksource_cyclone); -} - -module_init(init_cyclone_clocksource); diff --git a/drivers/clocksource/scx200_hrt.c b/drivers/clocksource/scx200_hrt.c deleted file mode 100644 index 22915cc46..000000000 --- a/drivers/clocksource/scx200_hrt.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2006 Jim Cromie - * - * This is a clocksource driver for the Geode SCx200's 1 or 27 MHz - * high-resolution timer. The Geode SC-1100 (at least) has a buggy - * time stamp counter (TSC), which loses time unless 'idle=poll' is - * given as a boot-arg. In its absence, the Generic Timekeeping code - * will detect and de-rate the bad TSC, allowing this timer to take - * over timekeeping duties. - * - * Based on work by John Stultz, and Ted Phelps (in a 2.6.12-rc6 patch) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - */ - -#include -#include -#include -#include -#include - -#define NAME "scx200_hrt" - -static int mhz27; -module_param(mhz27, int, 0); /* load time only */ -MODULE_PARM_DESC(mhz27, "count at 27.0 MHz (default is 1.0 MHz)"); - -static int ppm; -module_param(ppm, int, 0); /* load time only */ -MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)"); - -/* HiRes Timer configuration register address */ -#define SCx200_TMCNFG_OFFSET (SCx200_TIMER_OFFSET + 5) - -/* and config settings */ -#define HR_TMEN (1 << 0) /* timer interrupt enable */ -#define HR_TMCLKSEL (1 << 1) /* 1|0 counts at 27|1 MHz */ -#define HR_TM27MPD (1 << 2) /* 1 turns off input clock (power-down) */ - -/* The base timer frequency, * 27 if selected */ -#define HRT_FREQ 1000000 - -static cycle_t read_hrt(void) -{ - /* Read the timer value */ - return (cycle_t) inl(scx200_cb_base + SCx200_TIMER_OFFSET); -} - -#define HRT_SHIFT_1 22 -#define HRT_SHIFT_27 26 - -static struct clocksource cs_hrt = { - .name = "scx200_hrt", - .rating = 250, - .read = read_hrt, - .mask = CLOCKSOURCE_MASK(32), - .is_continuous = 1, - /* mult, shift are set based on mhz27 flag */ -}; - -static int __init init_hrt_clocksource(void) -{ - /* Make sure scx200 has initialized the configuration block */ - if (!scx200_cb_present()) - return -ENODEV; - - /* Reserve the timer's ISA io-region for ourselves */ - if (!request_region(scx200_cb_base + SCx200_TIMER_OFFSET, - SCx200_TIMER_SIZE, - "NatSemi SCx200 High-Resolution Timer")) { - printk(KERN_WARNING NAME ": unable to lock timer region\n"); - return -ENODEV; - } - - /* write timer config */ - outb(HR_TMEN | (mhz27 ? HR_TMCLKSEL : 0), - scx200_cb_base + SCx200_TMCNFG_OFFSET); - - if (mhz27) { - cs_hrt.shift = HRT_SHIFT_27; - cs_hrt.mult = clocksource_hz2mult((HRT_FREQ + ppm) * 27, - cs_hrt.shift); - } else { - cs_hrt.shift = HRT_SHIFT_1; - cs_hrt.mult = clocksource_hz2mult(HRT_FREQ + ppm, - cs_hrt.shift); - } - printk(KERN_INFO "enabling scx200 high-res timer (%s MHz +%d ppm)\n", - mhz27 ? "27":"1", ppm); - - return clocksource_register(&cs_hrt); -} - -module_init(init_hrt_clocksource); - -MODULE_AUTHOR("Jim Cromie "); -MODULE_DESCRIPTION("clocksource on SCx200 HiRes Timer"); -MODULE_LICENSE("GPL"); diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 3ece69231..4b4d7db1f 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -51,7 +50,6 @@ void proc_fork_connector(struct task_struct *task) struct cn_msg *msg; struct proc_event *ev; __u8 buffer[CN_PROC_MSG_SIZE]; - struct timespec ts; if (atomic_read(&proc_event_num_listeners) < 1) return; @@ -59,8 +57,7 @@ void proc_fork_connector(struct task_struct *task) msg = (struct cn_msg*)buffer; ev = (struct proc_event*)msg->data; get_seq(&msg->seq, &ev->cpu); - ktime_get_ts(&ts); /* get high res monotonic timestamp */ - ev->timestamp_ns = timespec_to_ns(&ts); + ktime_get_ts(&ev->timestamp); /* get high res monotonic timestamp */ ev->what = PROC_EVENT_FORK; ev->event_data.fork.parent_pid = task->real_parent->pid; ev->event_data.fork.parent_tgid = task->real_parent->tgid; @@ -78,7 +75,6 @@ void proc_exec_connector(struct task_struct *task) { struct cn_msg *msg; struct proc_event *ev; - struct timespec ts; __u8 buffer[CN_PROC_MSG_SIZE]; if (atomic_read(&proc_event_num_listeners) < 1) @@ -87,8 +83,7 @@ void proc_exec_connector(struct task_struct *task) msg = (struct cn_msg*)buffer; ev = (struct proc_event*)msg->data; get_seq(&msg->seq, &ev->cpu); - ktime_get_ts(&ts); /* get high res monotonic timestamp */ - ev->timestamp_ns = timespec_to_ns(&ts); + ktime_get_ts(&ev->timestamp); ev->what = PROC_EVENT_EXEC; ev->event_data.exec.process_pid = task->pid; ev->event_data.exec.process_tgid = task->tgid; @@ -104,7 +99,6 @@ void proc_id_connector(struct task_struct *task, int which_id) struct cn_msg *msg; struct proc_event *ev; __u8 buffer[CN_PROC_MSG_SIZE]; - struct timespec ts; if (atomic_read(&proc_event_num_listeners) < 1) return; @@ -123,8 +117,7 @@ void proc_id_connector(struct task_struct *task, int which_id) } else return; get_seq(&msg->seq, &ev->cpu); - ktime_get_ts(&ts); /* get high res monotonic timestamp */ - ev->timestamp_ns = timespec_to_ns(&ts); + ktime_get_ts(&ev->timestamp); memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); msg->ack = 0; /* not used */ @@ -137,7 +130,6 @@ void proc_exit_connector(struct task_struct *task) struct cn_msg *msg; struct proc_event *ev; __u8 buffer[CN_PROC_MSG_SIZE]; - struct timespec ts; if (atomic_read(&proc_event_num_listeners) < 1) return; @@ -145,8 +137,7 @@ void proc_exit_connector(struct task_struct *task) msg = (struct cn_msg*)buffer; ev = (struct proc_event*)msg->data; get_seq(&msg->seq, &ev->cpu); - ktime_get_ts(&ts); /* get high res monotonic timestamp */ - ev->timestamp_ns = timespec_to_ns(&ts); + ktime_get_ts(&ev->timestamp); ev->what = PROC_EVENT_EXIT; ev->event_data.exit.process_pid = task->pid; ev->event_data.exit.process_tgid = task->tgid; @@ -172,7 +163,6 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) struct cn_msg *msg; struct proc_event *ev; __u8 buffer[CN_PROC_MSG_SIZE]; - struct timespec ts; if (atomic_read(&proc_event_num_listeners) < 1) return; @@ -180,8 +170,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) msg = (struct cn_msg*)buffer; ev = (struct proc_event*)msg->data; msg->seq = rcvd_seq; - ktime_get_ts(&ts); /* get high res monotonic timestamp */ - ev->timestamp_ns = timespec_to_ns(&ts); + ktime_get_ts(&ev->timestamp); ev->cpu = -1; ev->what = PROC_EVENT_NONE; ev->event_data.ack.err = err; diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 05f8ce2cf..9f2f00d82 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c @@ -127,7 +127,7 @@ void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id) if (found) { cn_queue_free_callback(cbq); - atomic_dec(&dev->refcnt); + atomic_dec_and_test(&dev->refcnt); } } diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index b49bacfd8..35897079a 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -121,7 +121,6 @@ nlmsg_failure: kfree_skb(skb); return -EINVAL; } -EXPORT_SYMBOL_GPL(cn_netlink_send); /* * Callback helper - queues work and setup destructor for given data. @@ -309,9 +308,6 @@ int cn_add_callback(struct cb_id *id, char *name, void (*callback)(void *)) int err; struct cn_dev *dev = &cdev; - if (!cn_already_initialized) - return -EAGAIN; - err = cn_queue_add_callback(dev->cbdev, name, id, callback); if (err) return err; @@ -320,7 +316,6 @@ int cn_add_callback(struct cb_id *id, char *name, void (*callback)(void *)) return 0; } -EXPORT_SYMBOL_GPL(cn_add_callback); /* * Callback remove routing - removes callback @@ -337,7 +332,6 @@ void cn_del_callback(struct cb_id *id) cn_queue_del_callback(dev->cbdev, id); cn_notify(id, 1); } -EXPORT_SYMBOL_GPL(cn_del_callback); /* * Checks two connector's control messages to be the same. @@ -441,7 +435,7 @@ static void cn_callback(void *data) mutex_unlock(¬ify_lock); } -static int __devinit cn_init(void) +static int __init cn_init(void) { struct cn_dev *dev = &cdev; int err; @@ -462,22 +456,21 @@ static int __devinit cn_init(void) sock_release(dev->nls->sk_socket); return -EINVAL; } - - cn_already_initialized = 1; err = cn_add_callback(&dev->id, "connector", &cn_callback); if (err) { - cn_already_initialized = 0; cn_queue_free_dev(dev->cbdev); if (dev->nls->sk_socket) sock_release(dev->nls->sk_socket); return -EINVAL; } + cn_already_initialized = 1; + return 0; } -static void __devexit cn_fini(void) +static void __exit cn_fini(void) { struct cn_dev *dev = &cdev; @@ -489,5 +482,9 @@ static void __devexit cn_fini(void) sock_release(dev->nls->sk_socket); } -subsys_initcall(cn_init); +module_init(cn_init); module_exit(cn_fini); + +EXPORT_SYMBOL_GPL(cn_add_callback); +EXPORT_SYMBOL_GPL(cn_del_callback); +EXPORT_SYMBOL_GPL(cn_netlink_send); diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index b3df613ae..29b2fa553 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -15,6 +15,7 @@ * */ +#include #include #include #include @@ -256,7 +257,7 @@ void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state) if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) { if ((policy) && (policy->cpu == freqs->cpu) && (policy->cur) && (policy->cur != freqs->old)) { - dprintk("Warning: CPU frequency is" + dprintk(KERN_WARNING "Warning: CPU frequency is" " %u, cpufreq assumed %u kHz.\n", freqs->old, policy->cur); freqs->old = policy->cur; @@ -284,69 +285,39 @@ EXPORT_SYMBOL_GPL(cpufreq_notify_transition); * SYSFS INTERFACE * *********************************************************************/ -static struct cpufreq_governor *__find_governor(const char *str_governor) -{ - struct cpufreq_governor *t; - - list_for_each_entry(t, &cpufreq_governor_list, governor_list) - if (!strnicmp(str_governor,t->name,CPUFREQ_NAME_LEN)) - return t; - - return NULL; -} - /** * cpufreq_parse_governor - parse a governor string */ static int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor) { - int err = -EINVAL; - if (!cpufreq_driver) - goto out; - + return -EINVAL; if (cpufreq_driver->setpolicy) { if (!strnicmp(str_governor, "performance", CPUFREQ_NAME_LEN)) { *policy = CPUFREQ_POLICY_PERFORMANCE; - err = 0; + return 0; } else if (!strnicmp(str_governor, "powersave", CPUFREQ_NAME_LEN)) { *policy = CPUFREQ_POLICY_POWERSAVE; - err = 0; + return 0; } - } else if (cpufreq_driver->target) { + return -EINVAL; + } else { struct cpufreq_governor *t; - mutex_lock(&cpufreq_governor_mutex); - - t = __find_governor(str_governor); - - if (t == NULL) { - char *name = kasprintf(GFP_KERNEL, "cpufreq_%s", str_governor); - - if (name) { - int ret; - + if (!cpufreq_driver || !cpufreq_driver->target) + goto out; + list_for_each_entry(t, &cpufreq_governor_list, governor_list) { + if (!strnicmp(str_governor,t->name,CPUFREQ_NAME_LEN)) { + *governor = t; mutex_unlock(&cpufreq_governor_mutex); - ret = request_module(name); - mutex_lock(&cpufreq_governor_mutex); - - if (ret == 0) - t = __find_governor(str_governor); + return 0; } - - kfree(name); - } - - if (t != NULL) { - *governor = t; - err = 0; } - +out: mutex_unlock(&cpufreq_governor_mutex); } - out: - return err; + return -EINVAL; } @@ -394,12 +365,10 @@ static ssize_t store_##file_name \ if (ret != 1) \ return -EINVAL; \ \ - lock_cpu_hotplug(); \ mutex_lock(&policy->lock); \ ret = __cpufreq_set_policy(policy, &new_policy); \ policy->user_policy.object = policy->object; \ mutex_unlock(&policy->lock); \ - unlock_cpu_hotplug(); \ \ return ret ? ret : count; \ } @@ -455,8 +424,6 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy, if (cpufreq_parse_governor(str_governor, &new_policy.policy, &new_policy.governor)) return -EINVAL; - lock_cpu_hotplug(); - /* Do not use cpufreq_set_policy here or the user_policy.max will be wrongly overridden */ mutex_lock(&policy->lock); @@ -466,8 +433,6 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy, policy->user_policy.governor = policy->governor; mutex_unlock(&policy->lock); - unlock_cpu_hotplug(); - return ret ? ret : count; } @@ -909,7 +874,7 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq, unsigne { struct cpufreq_freqs freqs; - dprintk("Warning: CPU frequency out of sync: cpufreq and timing " + dprintk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing " "core thinks of %u, is %u kHz.\n", old_freq, new_freq); freqs.cpu = cpu; @@ -1041,7 +1006,7 @@ static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg) struct cpufreq_freqs freqs; if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN)) - dprintk("Warning: CPU frequency is %u, " + dprintk(KERN_DEBUG "Warning: CPU frequency is %u, " "cpufreq assumed %u kHz.\n", cur_freq, cpu_policy->cur); @@ -1122,7 +1087,7 @@ static int cpufreq_resume(struct sys_device * sysdev) struct cpufreq_freqs freqs; if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN)) - dprintk("Warning: CPU frequency" + dprintk(KERN_WARNING "Warning: CPU frequency" "is %u, cpufreq assumed %u kHz.\n", cur_freq, cpu_policy->cur); @@ -1229,18 +1194,20 @@ EXPORT_SYMBOL(cpufreq_unregister_notifier); *********************************************************************/ -/* Must be called with lock_cpu_hotplug held */ int __cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { int retval = -EINVAL; + lock_cpu_hotplug(); dprintk("target for CPU %u: %u kHz, relation %u\n", policy->cpu, target_freq, relation); if (cpu_online(policy->cpu) && cpufreq_driver->target) retval = cpufreq_driver->target(policy, target_freq, relation); + unlock_cpu_hotplug(); + return retval; } EXPORT_SYMBOL_GPL(__cpufreq_driver_target); @@ -1255,23 +1222,17 @@ int cpufreq_driver_target(struct cpufreq_policy *policy, if (!policy) return -EINVAL; - lock_cpu_hotplug(); mutex_lock(&policy->lock); ret = __cpufreq_driver_target(policy, target_freq, relation); mutex_unlock(&policy->lock); - unlock_cpu_hotplug(); cpufreq_cpu_put(policy); return ret; } EXPORT_SYMBOL_GPL(cpufreq_driver_target); -/* - * Locking: Must be called with the lock_cpu_hotplug() lock held - * when "event" is CPUFREQ_GOV_LIMITS - */ static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event) { @@ -1293,23 +1254,43 @@ static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event) } +int cpufreq_governor(unsigned int cpu, unsigned int event) +{ + int ret = 0; + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); + + if (!policy) + return -EINVAL; + + mutex_lock(&policy->lock); + ret = __cpufreq_governor(policy, event); + mutex_unlock(&policy->lock); + + cpufreq_cpu_put(policy); + return ret; +} +EXPORT_SYMBOL_GPL(cpufreq_governor); + + int cpufreq_register_governor(struct cpufreq_governor *governor) { - int err; + struct cpufreq_governor *t; if (!governor) return -EINVAL; mutex_lock(&cpufreq_governor_mutex); - err = -EBUSY; - if (__find_governor(governor->name) == NULL) { - err = 0; - list_add(&governor->governor_list, &cpufreq_governor_list); + list_for_each_entry(t, &cpufreq_governor_list, governor_list) { + if (!strnicmp(governor->name,t->name,CPUFREQ_NAME_LEN)) { + mutex_unlock(&cpufreq_governor_mutex); + return -EBUSY; + } } + list_add(&governor->governor_list, &cpufreq_governor_list); mutex_unlock(&cpufreq_governor_mutex); - return err; + return 0; } EXPORT_SYMBOL_GPL(cpufreq_register_governor); @@ -1358,9 +1339,6 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu) EXPORT_SYMBOL(cpufreq_get_policy); -/* - * Locking: Must be called with the lock_cpu_hotplug() lock held - */ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_policy *policy) { int ret = 0; @@ -1371,11 +1349,6 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli memcpy(&policy->cpuinfo, &data->cpuinfo, sizeof(struct cpufreq_cpuinfo)); - if (policy->min > data->min && policy->min > policy->max) { - ret = -EINVAL; - goto error_out; - } - /* verify the cpu speed can be set within this limit */ ret = cpufreq_driver->verify(policy); if (ret) @@ -1460,8 +1433,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy) if (!data) return -EINVAL; - lock_cpu_hotplug(); - /* lock this CPU */ mutex_lock(&data->lock); @@ -1472,8 +1443,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy) data->user_policy.governor = data->governor; mutex_unlock(&data->lock); - - unlock_cpu_hotplug(); cpufreq_cpu_put(data); return ret; @@ -1497,7 +1466,6 @@ int cpufreq_update_policy(unsigned int cpu) if (!data) return -ENODEV; - lock_cpu_hotplug(); mutex_lock(&data->lock); dprintk("updating policy for CPU %u\n", cpu); @@ -1523,13 +1491,12 @@ int cpufreq_update_policy(unsigned int cpu) ret = __cpufreq_set_policy(data, &policy); mutex_unlock(&data->lock); - unlock_cpu_hotplug(); + cpufreq_cpu_put(data); return ret; } EXPORT_SYMBOL(cpufreq_update_policy); -#ifdef CONFIG_HOTPLUG_CPU static int cpufreq_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -1565,11 +1532,10 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cpufreq_cpu_notifier = +static struct notifier_block cpufreq_cpu_notifier = { .notifier_call = cpufreq_cpu_callback, }; -#endif /* CONFIG_HOTPLUG_CPU */ /********************************************************************* * REGISTER / UNREGISTER CPUFREQ DRIVER * @@ -1630,7 +1596,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) } if (!ret) { - register_hotcpu_notifier(&cpufreq_cpu_notifier); + register_cpu_notifier(&cpufreq_cpu_notifier); dprintk("driver %s up and running\n", driver_data->name); cpufreq_debug_enable_ratelimit(); } @@ -1662,7 +1628,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver) dprintk("unregistering driver %s\n", driver->name); sysdev_driver_unregister(&cpu_sysdev_class, &cpufreq_sysdev_driver); - unregister_hotcpu_notifier(&cpufreq_cpu_notifier); + unregister_cpu_notifier(&cpufreq_cpu_notifier); spin_lock_irqsave(&cpufreq_driver_lock, flags); cpufreq_driver = NULL; diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index c4c578def..e07a35487 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -73,14 +72,6 @@ static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); static unsigned int dbs_enable; /* number of CPUs using this policy */ -/* - * DEADLOCK ALERT! There is a ordering requirement between cpu_hotplug - * lock and dbs_mutex. cpu_hotplug lock should always be held before - * dbs_mutex. If any function that can potentially take cpu_hotplug lock - * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then - * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock - * is recursive for the same process. -Venki - */ static DEFINE_MUTEX (dbs_mutex); static DECLARE_WORK (dbs_work, do_dbs_timer, NULL); @@ -423,14 +414,12 @@ static void dbs_check_cpu(int cpu) static void do_dbs_timer(void *data) { int i; - lock_cpu_hotplug(); mutex_lock(&dbs_mutex); for_each_online_cpu(i) dbs_check_cpu(i); schedule_delayed_work(&dbs_work, usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); mutex_unlock(&dbs_mutex); - unlock_cpu_hotplug(); } static inline void dbs_timer_init(void) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 52cf1f021..3e6ffcaa5 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -12,11 +12,21 @@ #include #include +#include #include +#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include /* @@ -45,55 +55,47 @@ static unsigned int def_sampling_rate; #define MIN_SAMPLING_RATE (def_sampling_rate / MIN_SAMPLING_RATE_RATIO) #define MAX_SAMPLING_RATE (500 * def_sampling_rate) #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000) +#define DEF_SAMPLING_DOWN_FACTOR (1) +#define MAX_SAMPLING_DOWN_FACTOR (10) #define TRANSITION_LATENCY_LIMIT (10 * 1000) static void do_dbs_timer(void *data); struct cpu_dbs_info_s { - cputime64_t prev_cpu_idle; - cputime64_t prev_cpu_wall; struct cpufreq_policy *cur_policy; - struct work_struct work; + unsigned int prev_cpu_idle_up; + unsigned int prev_cpu_idle_down; unsigned int enable; }; static DEFINE_PER_CPU(struct cpu_dbs_info_s, cpu_dbs_info); static unsigned int dbs_enable; /* number of CPUs using this policy */ -/* - * DEADLOCK ALERT! There is a ordering requirement between cpu_hotplug - * lock and dbs_mutex. cpu_hotplug lock should always be held before - * dbs_mutex. If any function that can potentially take cpu_hotplug lock - * (like __cpufreq_driver_target()) is being called with dbs_mutex taken, then - * cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock - * is recursive for the same process. -Venki - */ -static DEFINE_MUTEX(dbs_mutex); +static DEFINE_MUTEX (dbs_mutex); +static DECLARE_WORK (dbs_work, do_dbs_timer, NULL); -static struct workqueue_struct *kondemand_wq; +static struct workqueue_struct *dbs_workq; struct dbs_tuners { unsigned int sampling_rate; + unsigned int sampling_down_factor; unsigned int up_threshold; unsigned int ignore_nice; }; static struct dbs_tuners dbs_tuners_ins = { .up_threshold = DEF_FREQUENCY_UP_THRESHOLD, + .sampling_down_factor = DEF_SAMPLING_DOWN_FACTOR, .ignore_nice = 0, }; -static inline cputime64_t get_cpu_idle_time(unsigned int cpu) +static inline unsigned int get_cpu_idle_time(unsigned int cpu) { - cputime64_t retval; - - retval = cputime64_add(kstat_cpu(cpu).cpustat.idle, - kstat_cpu(cpu).cpustat.iowait); - - if (dbs_tuners_ins.ignore_nice) - retval = cputime64_add(retval, kstat_cpu(cpu).cpustat.nice); - - return retval; + return kstat_cpu(cpu).cpustat.idle + + kstat_cpu(cpu).cpustat.iowait + + ( dbs_tuners_ins.ignore_nice ? + kstat_cpu(cpu).cpustat.nice : + 0); } /************************** sysfs interface ************************/ @@ -122,15 +124,35 @@ static ssize_t show_##file_name \ return sprintf(buf, "%u\n", dbs_tuners_ins.object); \ } show_one(sampling_rate, sampling_rate); +show_one(sampling_down_factor, sampling_down_factor); show_one(up_threshold, up_threshold); show_one(ignore_nice_load, ignore_nice); +static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, + const char *buf, size_t count) +{ + unsigned int input; + int ret; + ret = sscanf (buf, "%u", &input); + if (ret != 1 ) + return -EINVAL; + + if (input > MAX_SAMPLING_DOWN_FACTOR || input < 1) + return -EINVAL; + + mutex_lock(&dbs_mutex); + dbs_tuners_ins.sampling_down_factor = input; + mutex_unlock(&dbs_mutex); + + return count; +} + static ssize_t store_sampling_rate(struct cpufreq_policy *unused, const char *buf, size_t count) { unsigned int input; int ret; - ret = sscanf(buf, "%u", &input); + ret = sscanf (buf, "%u", &input); mutex_lock(&dbs_mutex); if (ret != 1 || input > MAX_SAMPLING_RATE || input < MIN_SAMPLING_RATE) { @@ -149,7 +171,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused, { unsigned int input; int ret; - ret = sscanf(buf, "%u", &input); + ret = sscanf (buf, "%u", &input); mutex_lock(&dbs_mutex); if (ret != 1 || input > MAX_FREQUENCY_UP_THRESHOLD || @@ -172,7 +194,7 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, unsigned int j; - ret = sscanf(buf, "%u", &input); + ret = sscanf (buf, "%u", &input); if ( ret != 1 ) return -EINVAL; @@ -186,12 +208,12 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, } dbs_tuners_ins.ignore_nice = input; - /* we need to re-evaluate prev_cpu_idle */ + /* we need to re-evaluate prev_cpu_idle_up and prev_cpu_idle_down */ for_each_online_cpu(j) { - struct cpu_dbs_info_s *dbs_info; - dbs_info = &per_cpu(cpu_dbs_info, j); - dbs_info->prev_cpu_idle = get_cpu_idle_time(j); - dbs_info->prev_cpu_wall = get_jiffies_64(); + struct cpu_dbs_info_s *j_dbs_info; + j_dbs_info = &per_cpu(cpu_dbs_info, j); + j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(j); + j_dbs_info->prev_cpu_idle_down = j_dbs_info->prev_cpu_idle_up; } mutex_unlock(&dbs_mutex); @@ -203,6 +225,7 @@ static struct freq_attr _name = \ __ATTR(_name, 0644, show_##_name, store_##_name) define_one_rw(sampling_rate); +define_one_rw(sampling_down_factor); define_one_rw(up_threshold); define_one_rw(ignore_nice_load); @@ -210,6 +233,7 @@ static struct attribute * dbs_attributes[] = { &sampling_rate_max.attr, &sampling_rate_min.attr, &sampling_rate.attr, + &sampling_down_factor.attr, &up_threshold.attr, &ignore_nice_load.attr, NULL @@ -222,29 +246,26 @@ static struct attribute_group dbs_attr_group = { /************************** sysfs end ************************/ -static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) +static void dbs_check_cpu(int cpu) { - unsigned int idle_ticks, total_ticks; - unsigned int load; - cputime64_t cur_jiffies; + unsigned int idle_ticks, up_idle_ticks, total_ticks; + unsigned int freq_next; + unsigned int freq_down_sampling_rate; + static int down_skip[NR_CPUS]; + struct cpu_dbs_info_s *this_dbs_info; struct cpufreq_policy *policy; unsigned int j; + this_dbs_info = &per_cpu(cpu_dbs_info, cpu); if (!this_dbs_info->enable) return; policy = this_dbs_info->cur_policy; - cur_jiffies = jiffies64_to_cputime64(get_jiffies_64()); - total_ticks = (unsigned int) cputime64_sub(cur_jiffies, - this_dbs_info->prev_cpu_wall); - this_dbs_info->prev_cpu_wall = cur_jiffies; - if (!total_ticks) - return; /* * Every sampling_rate, we check, if current idle time is less * than 20% (default), then we try to increase frequency - * Every sampling_rate, we look for a the lowest + * Every sampling_rate*sampling_down_factor, we look for a the lowest * frequency which can sustain the load while keeping idle time over * 30%. If such a frequency exist, we try to decrease to this frequency. * @@ -253,26 +274,36 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) * 5% (default) of current frequency */ - /* Get Idle Time */ + /* Check for frequency increase */ idle_ticks = UINT_MAX; for_each_cpu_mask(j, policy->cpus) { - cputime64_t total_idle_ticks; - unsigned int tmp_idle_ticks; + unsigned int tmp_idle_ticks, total_idle_ticks; struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu(cpu_dbs_info, j); total_idle_ticks = get_cpu_idle_time(j); - tmp_idle_ticks = (unsigned int) cputime64_sub(total_idle_ticks, - j_dbs_info->prev_cpu_idle); - j_dbs_info->prev_cpu_idle = total_idle_ticks; + tmp_idle_ticks = total_idle_ticks - + j_dbs_info->prev_cpu_idle_up; + j_dbs_info->prev_cpu_idle_up = total_idle_ticks; if (tmp_idle_ticks < idle_ticks) idle_ticks = tmp_idle_ticks; } - load = (100 * (total_ticks - idle_ticks)) / total_ticks; - /* Check for frequency increase */ - if (load > dbs_tuners_ins.up_threshold) { + /* Scale idle ticks by 100 and compare with up and down ticks */ + idle_ticks *= 100; + up_idle_ticks = (100 - dbs_tuners_ins.up_threshold) * + usecs_to_jiffies(dbs_tuners_ins.sampling_rate); + + if (idle_ticks < up_idle_ticks) { + down_skip[cpu] = 0; + for_each_cpu_mask(j, policy->cpus) { + struct cpu_dbs_info_s *j_dbs_info; + + j_dbs_info = &per_cpu(cpu_dbs_info, j); + j_dbs_info->prev_cpu_idle_down = + j_dbs_info->prev_cpu_idle_up; + } /* if we are already at full speed then break out early */ if (policy->cur == policy->max) return; @@ -283,54 +314,81 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) } /* Check for frequency decrease */ + down_skip[cpu]++; + if (down_skip[cpu] < dbs_tuners_ins.sampling_down_factor) + return; + + idle_ticks = UINT_MAX; + for_each_cpu_mask(j, policy->cpus) { + unsigned int tmp_idle_ticks, total_idle_ticks; + struct cpu_dbs_info_s *j_dbs_info; + + j_dbs_info = &per_cpu(cpu_dbs_info, j); + /* Check for frequency decrease */ + total_idle_ticks = j_dbs_info->prev_cpu_idle_up; + tmp_idle_ticks = total_idle_ticks - + j_dbs_info->prev_cpu_idle_down; + j_dbs_info->prev_cpu_idle_down = total_idle_ticks; + + if (tmp_idle_ticks < idle_ticks) + idle_ticks = tmp_idle_ticks; + } + + down_skip[cpu] = 0; /* if we cannot reduce the frequency anymore, break out early */ if (policy->cur == policy->min) return; + /* Compute how many ticks there are between two measurements */ + freq_down_sampling_rate = dbs_tuners_ins.sampling_rate * + dbs_tuners_ins.sampling_down_factor; + total_ticks = usecs_to_jiffies(freq_down_sampling_rate); + /* * The optimal frequency is the frequency that is the lowest that * can support the current CPU usage without triggering the up * policy. To be safe, we focus 10 points under the threshold. */ - if (load < (dbs_tuners_ins.up_threshold - 10)) { - unsigned int freq_next; - freq_next = (policy->cur * load) / + freq_next = ((total_ticks - idle_ticks) * 100) / total_ticks; + freq_next = (freq_next * policy->cur) / (dbs_tuners_ins.up_threshold - 10); + if (freq_next < policy->min) + freq_next = policy->min; + + if (freq_next <= ((policy->cur * 95) / 100)) __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L); - } } static void do_dbs_timer(void *data) { - unsigned int cpu = smp_processor_id(); - struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu); - - if (!dbs_info->enable) - return; - - lock_cpu_hotplug(); - dbs_check_cpu(dbs_info); - unlock_cpu_hotplug(); - queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, - usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); + int i; + mutex_lock(&dbs_mutex); + for_each_online_cpu(i) + dbs_check_cpu(i); + queue_delayed_work(dbs_workq, &dbs_work, + usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); + mutex_unlock(&dbs_mutex); } -static inline void dbs_timer_init(unsigned int cpu) +static inline void dbs_timer_init(void) { - struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu); - - INIT_WORK(&dbs_info->work, do_dbs_timer, 0); - queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, - usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); + INIT_WORK(&dbs_work, do_dbs_timer, NULL); + if (!dbs_workq) + dbs_workq = create_singlethread_workqueue("ondemand"); + if (!dbs_workq) { + printk(KERN_ERR "ondemand: Cannot initialize kernel thread\n"); + return; + } + queue_delayed_work(dbs_workq, &dbs_work, + usecs_to_jiffies(dbs_tuners_ins.sampling_rate)); return; } -static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) +static inline void dbs_timer_exit(void) { - dbs_info->enable = 0; - cancel_delayed_work(&dbs_info->work); - flush_workqueue(kondemand_wq); + if (dbs_workq) + cancel_rearming_delayed_workqueue(dbs_workq, &dbs_work); } static int cpufreq_governor_dbs(struct cpufreq_policy *policy, @@ -344,7 +402,8 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, switch (event) { case CPUFREQ_GOV_START: - if ((!cpu_online(cpu)) || (!policy->cur)) + if ((!cpu_online(cpu)) || + (!policy->cur)) return -EINVAL; if (policy->cpuinfo.transition_latency > @@ -357,26 +416,18 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, break; mutex_lock(&dbs_mutex); - dbs_enable++; - if (dbs_enable == 1) { - kondemand_wq = create_workqueue("kondemand"); - if (!kondemand_wq) { - printk(KERN_ERR "Creation of kondemand failed\n"); - dbs_enable--; - mutex_unlock(&dbs_mutex); - return -ENOSPC; - } - } for_each_cpu_mask(j, policy->cpus) { struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu(cpu_dbs_info, j); j_dbs_info->cur_policy = policy; - j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j); - j_dbs_info->prev_cpu_wall = get_jiffies_64(); + j_dbs_info->prev_cpu_idle_up = get_cpu_idle_time(j); + j_dbs_info->prev_cpu_idle_down + = j_dbs_info->prev_cpu_idle_up; } this_dbs_info->enable = 1; sysfs_create_group(&policy->kobj, &dbs_attr_group); + dbs_enable++; /* * Start the timerschedule work, when this governor * is used for first time @@ -395,19 +446,23 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, def_sampling_rate = MIN_STAT_SAMPLING_RATE; dbs_tuners_ins.sampling_rate = def_sampling_rate; + dbs_timer_init(); } - dbs_timer_init(policy->cpu); mutex_unlock(&dbs_mutex); break; case CPUFREQ_GOV_STOP: mutex_lock(&dbs_mutex); - dbs_timer_exit(this_dbs_info); + this_dbs_info->enable = 0; sysfs_remove_group(&policy->kobj, &dbs_attr_group); dbs_enable--; + /* + * Stop the timerschedule work, when this governor + * is used for first time + */ if (dbs_enable == 0) - destroy_workqueue(kondemand_wq); + dbs_timer_exit(); mutex_unlock(&dbs_mutex); @@ -416,13 +471,13 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, case CPUFREQ_GOV_LIMITS: mutex_lock(&dbs_mutex); if (policy->max < this_dbs_info->cur_policy->cur) - __cpufreq_driver_target(this_dbs_info->cur_policy, - policy->max, - CPUFREQ_RELATION_H); + __cpufreq_driver_target( + this_dbs_info->cur_policy, + policy->max, CPUFREQ_RELATION_H); else if (policy->min > this_dbs_info->cur_policy->cur) - __cpufreq_driver_target(this_dbs_info->cur_policy, - policy->min, - CPUFREQ_RELATION_L); + __cpufreq_driver_target( + this_dbs_info->cur_policy, + policy->min, CPUFREQ_RELATION_L); mutex_unlock(&dbs_mutex); break; } @@ -430,9 +485,9 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, } static struct cpufreq_governor cpufreq_gov_dbs = { - .name = "ondemand", - .governor = cpufreq_governor_dbs, - .owner = THIS_MODULE, + .name = "ondemand", + .governor = cpufreq_governor_dbs, + .owner = THIS_MODULE, }; static int __init cpufreq_gov_dbs_init(void) @@ -442,15 +497,21 @@ static int __init cpufreq_gov_dbs_init(void) static void __exit cpufreq_gov_dbs_exit(void) { + /* Make sure that the scheduled work is indeed not running. + Assumes the timer has been cancelled first. */ + if (dbs_workq) { + flush_workqueue(dbs_workq); + destroy_workqueue(dbs_workq); + } + cpufreq_unregister_governor(&cpufreq_gov_dbs); } -MODULE_AUTHOR("Venkatesh Pallipadi "); -MODULE_AUTHOR("Alexey Starikovskiy "); -MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for " - "Low Latency Frequency Transition capable processors"); -MODULE_LICENSE("GPL"); +MODULE_AUTHOR ("Venkatesh Pallipadi "); +MODULE_DESCRIPTION ("'cpufreq_ondemand' - A dynamic cpufreq governor for " + "Low Latency Frequency Transition capable processors"); +MODULE_LICENSE ("GPL"); module_init(cpufreq_gov_dbs_init); module_exit(cpufreq_gov_dbs_exit); diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index c2ecc599d..9694b6ed3 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -73,7 +74,7 @@ static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) { struct cpufreq_stats *stat = cpufreq_stats_table[policy->cpu]; - if (!stat) + if(!stat) return 0; return sprintf(buf, "%d\n", cpufreq_stats_table[stat->cpu]->total_trans); @@ -85,7 +86,7 @@ show_time_in_state(struct cpufreq_policy *policy, char *buf) ssize_t len = 0; int i; struct cpufreq_stats *stat = cpufreq_stats_table[policy->cpu]; - if (!stat) + if(!stat) return 0; cpufreq_stats_update(stat->cpu); for (i = 0; i < stat->state_num; i++) { @@ -103,7 +104,7 @@ show_trans_table(struct cpufreq_policy *policy, char *buf) int i, j; struct cpufreq_stats *stat = cpufreq_stats_table[policy->cpu]; - if (!stat) + if(!stat) return 0; cpufreq_stats_update(stat->cpu); len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); @@ -349,11 +350,13 @@ __init cpufreq_stats_init(void) return ret; } - register_hotcpu_notifier(&cpufreq_stat_cpu_notifier); + register_cpu_notifier(&cpufreq_stat_cpu_notifier); + lock_cpu_hotplug(); for_each_online_cpu(cpu) { cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_ONLINE, (void *)(long)cpu); } + unlock_cpu_hotplug(); return 0; } static void @@ -365,7 +368,7 @@ __exit cpufreq_stats_exit(void) CPUFREQ_POLICY_NOTIFIER); cpufreq_unregister_notifier(¬ifier_trans_block, CPUFREQ_TRANSITION_NOTIFIER); - unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier); + unregister_cpu_notifier(&cpufreq_stat_cpu_notifier); lock_cpu_hotplug(); for_each_online_cpu(cpu) { cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_DEAD, diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c index a06c20458..071ee4f1b 100644 --- a/drivers/cpufreq/cpufreq_userspace.c +++ b/drivers/cpufreq/cpufreq_userspace.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +71,6 @@ static int cpufreq_set(unsigned int freq, struct cpufreq_policy *policy) dprintk("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); - lock_cpu_hotplug(); mutex_lock(&userspace_mutex); if (!cpu_is_managed[policy->cpu]) goto err; @@ -94,7 +93,6 @@ static int cpufreq_set(unsigned int freq, struct cpufreq_policy *policy) err: mutex_unlock(&userspace_mutex); - unlock_cpu_hotplug(); return ret; } diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index 551f4ccf8..a4818ce88 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -20,7 +20,7 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, { unsigned int min_freq = ~0; unsigned int max_freq = 0; - unsigned int i; + unsigned int i = 0; for (i=0; (table[i].frequency != CPUFREQ_TABLE_END); i++) { unsigned int freq = table[i].frequency; @@ -51,7 +51,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table) { unsigned int next_larger = ~0; - unsigned int i; + unsigned int i = 0; unsigned int count = 0; dprintk("request for verification of policy (%u - %u kHz) for cpu %u\n", policy->min, policy->max, policy->cpu); @@ -91,24 +91,20 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, unsigned int relation, unsigned int *index) { - struct cpufreq_frequency_table optimal = { - .index = ~0, - .frequency = 0, - }; - struct cpufreq_frequency_table suboptimal = { - .index = ~0, - .frequency = 0, - }; + struct cpufreq_frequency_table optimal = { .index = ~0, }; + struct cpufreq_frequency_table suboptimal = { .index = ~0, }; unsigned int i; dprintk("request for target %u kHz (relation: %u) for cpu %u\n", target_freq, relation, policy->cpu); switch (relation) { case CPUFREQ_RELATION_H: + optimal.frequency = 0; suboptimal.frequency = ~0; break; case CPUFREQ_RELATION_L: optimal.frequency = ~0; + suboptimal.frequency = 0; break; } diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index b643d7129..5158a9db4 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c @@ -59,20 +59,16 @@ #define AES_EXTENDED_KEY_SIZE 64 /* in uint32_t units */ #define AES_EXTENDED_KEY_SIZE_B (AES_EXTENDED_KEY_SIZE * sizeof(uint32_t)) -/* Whenever making any changes to the following - * structure *make sure* you keep E, d_data - * and cword aligned on 16 Bytes boundaries!!! */ struct aes_ctx { + uint32_t e_data[AES_EXTENDED_KEY_SIZE]; + uint32_t d_data[AES_EXTENDED_KEY_SIZE]; struct { struct cword encrypt; struct cword decrypt; } cword; - u32 *D; + uint32_t *E; + uint32_t *D; int key_length; - u32 E[AES_EXTENDED_KEY_SIZE] - __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); - u32 d_data[AES_EXTENDED_KEY_SIZE] - __attribute__ ((__aligned__(PADLOCK_ALIGNMENT))); }; /* ====== Key management routines ====== */ @@ -286,20 +282,19 @@ aes_hw_extkey_available(uint8_t key_len) return 0; } -static inline struct aes_ctx *aes_ctx(struct crypto_tfm *tfm) +static inline struct aes_ctx *aes_ctx(void *ctx) { - unsigned long addr = (unsigned long)crypto_tfm_ctx(tfm); unsigned long align = PADLOCK_ALIGNMENT; if (align <= crypto_tfm_ctx_alignment()) align = 1; - return (struct aes_ctx *)ALIGN(addr, align); + return (struct aes_ctx *)ALIGN((unsigned long)ctx, align); } -static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, - unsigned int key_len, u32 *flags) +static int +aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t *flags) { - struct aes_ctx *ctx = aes_ctx(tfm); + struct aes_ctx *ctx = aes_ctx(ctx_arg); const __le32 *key = (const __le32 *)in_key; uint32_t i, t, u, v, w; uint32_t P[AES_EXTENDED_KEY_SIZE]; @@ -317,7 +312,8 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, * itself we must supply the plain key for both encryption * and decryption. */ - ctx->D = ctx->E; + ctx->E = ctx->e_data; + ctx->D = ctx->e_data; E_KEY[0] = le32_to_cpu(key[0]); E_KEY[1] = le32_to_cpu(key[1]); @@ -418,22 +414,24 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key, return iv; } -static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void +aes_encrypt(void *ctx_arg, uint8_t *out, const uint8_t *in) { - struct aes_ctx *ctx = aes_ctx(tfm); + struct aes_ctx *ctx = aes_ctx(ctx_arg); padlock_xcrypt_ecb(in, out, ctx->E, &ctx->cword.encrypt, 1); } -static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) +static void +aes_decrypt(void *ctx_arg, uint8_t *out, const uint8_t *in) { - struct aes_ctx *ctx = aes_ctx(tfm); + struct aes_ctx *ctx = aes_ctx(ctx_arg); padlock_xcrypt_ecb(in, out, ctx->D, &ctx->cword.decrypt, 1); } static unsigned int aes_encrypt_ecb(const struct cipher_desc *desc, u8 *out, const u8 *in, unsigned int nbytes) { - struct aes_ctx *ctx = aes_ctx(desc->tfm); + struct aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(desc->tfm)); padlock_xcrypt_ecb(in, out, ctx->E, &ctx->cword.encrypt, nbytes / AES_BLOCK_SIZE); return nbytes & ~(AES_BLOCK_SIZE - 1); @@ -442,7 +440,7 @@ static unsigned int aes_encrypt_ecb(const struct cipher_desc *desc, u8 *out, static unsigned int aes_decrypt_ecb(const struct cipher_desc *desc, u8 *out, const u8 *in, unsigned int nbytes) { - struct aes_ctx *ctx = aes_ctx(desc->tfm); + struct aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(desc->tfm)); padlock_xcrypt_ecb(in, out, ctx->D, &ctx->cword.decrypt, nbytes / AES_BLOCK_SIZE); return nbytes & ~(AES_BLOCK_SIZE - 1); @@ -451,7 +449,7 @@ static unsigned int aes_decrypt_ecb(const struct cipher_desc *desc, u8 *out, static unsigned int aes_encrypt_cbc(const struct cipher_desc *desc, u8 *out, const u8 *in, unsigned int nbytes) { - struct aes_ctx *ctx = aes_ctx(desc->tfm); + struct aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(desc->tfm)); u8 *iv; iv = padlock_xcrypt_cbc(in, out, ctx->E, desc->info, @@ -464,7 +462,7 @@ static unsigned int aes_encrypt_cbc(const struct cipher_desc *desc, u8 *out, static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out, const u8 *in, unsigned int nbytes) { - struct aes_ctx *ctx = aes_ctx(desc->tfm); + struct aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(desc->tfm)); padlock_xcrypt_cbc(in, out, ctx->D, desc->info, &ctx->cword.decrypt, nbytes / AES_BLOCK_SIZE); return nbytes & ~(AES_BLOCK_SIZE - 1); diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig deleted file mode 100644 index 30d021d1a..000000000 --- a/drivers/dma/Kconfig +++ /dev/null @@ -1,34 +0,0 @@ -# -# DMA engine configuration -# - -menu "DMA Engine support" - -config DMA_ENGINE - bool "Support for DMA engines" - ---help--- - DMA engines offload copy operations from the CPU to dedicated - hardware, allowing the copies to happen asynchronously. - -comment "DMA Clients" - -config NET_DMA - bool "Network: TCP receive copy offload" - depends on DMA_ENGINE && NET - default y - ---help--- - This enables the use of DMA engines in the network stack to - offload receive copy-to-user operations, freeing CPU cycles. - Since this is the main user of the DMA engine, it should be enabled; - say Y here. - -comment "DMA Devices" - -config INTEL_IOATDMA - tristate "Intel I/OAT DMA support" - depends on DMA_ENGINE && PCI - default m - ---help--- - Enable support for the Intel(R) I/OAT DMA engine. - -endmenu diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile deleted file mode 100644 index bdcfdbdb1..000000000 --- a/drivers/dma/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-$(CONFIG_DMA_ENGINE) += dmaengine.o -obj-$(CONFIG_NET_DMA) += iovlock.o -obj-$(CONFIG_INTEL_IOATDMA) += ioatdma.o diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c deleted file mode 100644 index 152780442..000000000 --- a/drivers/dma/dmaengine.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ - -/* - * This code implements the DMA subsystem. It provides a HW-neutral interface - * for other kernel code to use asynchronous memory copy capabilities, - * if present, and allows different HW DMA drivers to register as providing - * this capability. - * - * Due to the fact we are accelerating what is already a relatively fast - * operation, the code goes to great lengths to avoid additional overhead, - * such as locking. - * - * LOCKING: - * - * The subsystem keeps two global lists, dma_device_list and dma_client_list. - * Both of these are protected by a mutex, dma_list_mutex. - * - * Each device has a channels list, which runs unlocked but is never modified - * once the device is registered, it's just setup by the driver. - * - * Each client has a channels list, it's only modified under the client->lock - * and in an RCU callback, so it's safe to read under rcu_read_lock(). - * - * Each device has a kref, which is initialized to 1 when the device is - * registered. A kref_put is done for each class_device registered. When the - * class_device is released, the coresponding kref_put is done in the release - * method. Every time one of the device's channels is allocated to a client, - * a kref_get occurs. When the channel is freed, the coresponding kref_put - * happens. The device's release function does a completion, so - * unregister_device does a remove event, class_device_unregister, a kref_put - * for the first reference, then waits on the completion for all other - * references to finish. - * - * Each channel has an open-coded implementation of Rusty Russell's "bigref," - * with a kref and a per_cpu local_t. A single reference is set when on an - * ADDED event, and removed with a REMOVE event. Net DMA client takes an - * extra reference per outstanding transaction. The relase function does a - * kref_put on the device. -ChrisL - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static DEFINE_MUTEX(dma_list_mutex); -static LIST_HEAD(dma_device_list); -static LIST_HEAD(dma_client_list); - -/* --- sysfs implementation --- */ - -static ssize_t show_memcpy_count(struct class_device *cd, char *buf) -{ - struct dma_chan *chan = container_of(cd, struct dma_chan, class_dev); - unsigned long count = 0; - int i; - - for_each_possible_cpu(i) - count += per_cpu_ptr(chan->local, i)->memcpy_count; - - return sprintf(buf, "%lu\n", count); -} - -static ssize_t show_bytes_transferred(struct class_device *cd, char *buf) -{ - struct dma_chan *chan = container_of(cd, struct dma_chan, class_dev); - unsigned long count = 0; - int i; - - for_each_possible_cpu(i) - count += per_cpu_ptr(chan->local, i)->bytes_transferred; - - return sprintf(buf, "%lu\n", count); -} - -static ssize_t show_in_use(struct class_device *cd, char *buf) -{ - struct dma_chan *chan = container_of(cd, struct dma_chan, class_dev); - - return sprintf(buf, "%d\n", (chan->client ? 1 : 0)); -} - -static struct class_device_attribute dma_class_attrs[] = { - __ATTR(memcpy_count, S_IRUGO, show_memcpy_count, NULL), - __ATTR(bytes_transferred, S_IRUGO, show_bytes_transferred, NULL), - __ATTR(in_use, S_IRUGO, show_in_use, NULL), - __ATTR_NULL -}; - -static void dma_async_device_cleanup(struct kref *kref); - -static void dma_class_dev_release(struct class_device *cd) -{ - struct dma_chan *chan = container_of(cd, struct dma_chan, class_dev); - kref_put(&chan->device->refcount, dma_async_device_cleanup); -} - -static struct class dma_devclass = { - .name = "dma", - .class_dev_attrs = dma_class_attrs, - .release = dma_class_dev_release, -}; - -/* --- client and device registration --- */ - -/** - * dma_client_chan_alloc - try to allocate a channel to a client - * @client: &dma_client - * - * Called with dma_list_mutex held. - */ -static struct dma_chan *dma_client_chan_alloc(struct dma_client *client) -{ - struct dma_device *device; - struct dma_chan *chan; - unsigned long flags; - int desc; /* allocated descriptor count */ - - /* Find a channel, any DMA engine will do */ - list_for_each_entry(device, &dma_device_list, global_node) { - list_for_each_entry(chan, &device->channels, device_node) { - if (chan->client) - continue; - - desc = chan->device->device_alloc_chan_resources(chan); - if (desc >= 0) { - kref_get(&device->refcount); - kref_init(&chan->refcount); - chan->slow_ref = 0; - INIT_RCU_HEAD(&chan->rcu); - chan->client = client; - spin_lock_irqsave(&client->lock, flags); - list_add_tail_rcu(&chan->client_node, - &client->channels); - spin_unlock_irqrestore(&client->lock, flags); - return chan; - } - } - } - - return NULL; -} - -/** - * dma_chan_cleanup - release a DMA channel's resources - * @kref: kernel reference structure that contains the DMA channel device - */ -void dma_chan_cleanup(struct kref *kref) -{ - struct dma_chan *chan = container_of(kref, struct dma_chan, refcount); - chan->device->device_free_chan_resources(chan); - chan->client = NULL; - kref_put(&chan->device->refcount, dma_async_device_cleanup); -} - -static void dma_chan_free_rcu(struct rcu_head *rcu) -{ - struct dma_chan *chan = container_of(rcu, struct dma_chan, rcu); - int bias = 0x7FFFFFFF; - int i; - for_each_possible_cpu(i) - bias -= local_read(&per_cpu_ptr(chan->local, i)->refcount); - atomic_sub(bias, &chan->refcount.refcount); - kref_put(&chan->refcount, dma_chan_cleanup); -} - -static void dma_client_chan_free(struct dma_chan *chan) -{ - atomic_add(0x7FFFFFFF, &chan->refcount.refcount); - chan->slow_ref = 1; - call_rcu(&chan->rcu, dma_chan_free_rcu); -} - -/** - * dma_chans_rebalance - reallocate channels to clients - * - * When the number of DMA channel in the system changes, - * channels need to be rebalanced among clients. - */ -static void dma_chans_rebalance(void) -{ - struct dma_client *client; - struct dma_chan *chan; - unsigned long flags; - - mutex_lock(&dma_list_mutex); - - list_for_each_entry(client, &dma_client_list, global_node) { - while (client->chans_desired > client->chan_count) { - chan = dma_client_chan_alloc(client); - if (!chan) - break; - client->chan_count++; - client->event_callback(client, - chan, - DMA_RESOURCE_ADDED); - } - while (client->chans_desired < client->chan_count) { - spin_lock_irqsave(&client->lock, flags); - chan = list_entry(client->channels.next, - struct dma_chan, - client_node); - list_del_rcu(&chan->client_node); - spin_unlock_irqrestore(&client->lock, flags); - client->chan_count--; - client->event_callback(client, - chan, - DMA_RESOURCE_REMOVED); - dma_client_chan_free(chan); - } - } - - mutex_unlock(&dma_list_mutex); -} - -/** - * dma_async_client_register - allocate and register a &dma_client - * @event_callback: callback for notification of channel addition/removal - */ -struct dma_client *dma_async_client_register(dma_event_callback event_callback) -{ - struct dma_client *client; - - client = kzalloc(sizeof(*client), GFP_KERNEL); - if (!client) - return NULL; - - INIT_LIST_HEAD(&client->channels); - spin_lock_init(&client->lock); - client->chans_desired = 0; - client->chan_count = 0; - client->event_callback = event_callback; - - mutex_lock(&dma_list_mutex); - list_add_tail(&client->global_node, &dma_client_list); - mutex_unlock(&dma_list_mutex); - - return client; -} - -/** - * dma_async_client_unregister - unregister a client and free the &dma_client - * @client: &dma_client to free - * - * Force frees any allocated DMA channels, frees the &dma_client memory - */ -void dma_async_client_unregister(struct dma_client *client) -{ - struct dma_chan *chan; - - if (!client) - return; - - rcu_read_lock(); - list_for_each_entry_rcu(chan, &client->channels, client_node) - dma_client_chan_free(chan); - rcu_read_unlock(); - - mutex_lock(&dma_list_mutex); - list_del(&client->global_node); - mutex_unlock(&dma_list_mutex); - - kfree(client); - dma_chans_rebalance(); -} - -/** - * dma_async_client_chan_request - request DMA channels - * @client: &dma_client - * @number: count of DMA channels requested - * - * Clients call dma_async_client_chan_request() to specify how many - * DMA channels they need, 0 to free all currently allocated. - * The resulting allocations/frees are indicated to the client via the - * event callback. - */ -void dma_async_client_chan_request(struct dma_client *client, - unsigned int number) -{ - client->chans_desired = number; - dma_chans_rebalance(); -} - -/** - * dma_async_device_register - registers DMA devices found - * @device: &dma_device - */ -int dma_async_device_register(struct dma_device *device) -{ - static int id; - int chancnt = 0; - struct dma_chan* chan; - - if (!device) - return -ENODEV; - - init_completion(&device->done); - kref_init(&device->refcount); - device->dev_id = id++; - - /* represent channels in sysfs. Probably want devs too */ - list_for_each_entry(chan, &device->channels, device_node) { - chan->local = alloc_percpu(typeof(*chan->local)); - if (chan->local == NULL) - continue; - - chan->chan_id = chancnt++; - chan->class_dev.class = &dma_devclass; - chan->class_dev.dev = NULL; - snprintf(chan->class_dev.class_id, BUS_ID_SIZE, "dma%dchan%d", - device->dev_id, chan->chan_id); - - kref_get(&device->refcount); - class_device_register(&chan->class_dev); - } - - mutex_lock(&dma_list_mutex); - list_add_tail(&device->global_node, &dma_device_list); - mutex_unlock(&dma_list_mutex); - - dma_chans_rebalance(); - - return 0; -} - -/** - * dma_async_device_cleanup - function called when all references are released - * @kref: kernel reference object - */ -static void dma_async_device_cleanup(struct kref *kref) -{ - struct dma_device *device; - - device = container_of(kref, struct dma_device, refcount); - complete(&device->done); -} - -/** - * dma_async_device_unregister - unregisters DMA devices - * @device: &dma_device - */ -void dma_async_device_unregister(struct dma_device *device) -{ - struct dma_chan *chan; - unsigned long flags; - - mutex_lock(&dma_list_mutex); - list_del(&device->global_node); - mutex_unlock(&dma_list_mutex); - - list_for_each_entry(chan, &device->channels, device_node) { - if (chan->client) { - spin_lock_irqsave(&chan->client->lock, flags); - list_del(&chan->client_node); - chan->client->chan_count--; - spin_unlock_irqrestore(&chan->client->lock, flags); - chan->client->event_callback(chan->client, - chan, - DMA_RESOURCE_REMOVED); - dma_client_chan_free(chan); - } - class_device_unregister(&chan->class_dev); - } - dma_chans_rebalance(); - - kref_put(&device->refcount, dma_async_device_cleanup); - wait_for_completion(&device->done); -} - -static int __init dma_bus_init(void) -{ - mutex_init(&dma_list_mutex); - return class_register(&dma_devclass); -} - -subsys_initcall(dma_bus_init); - -EXPORT_SYMBOL(dma_async_client_register); -EXPORT_SYMBOL(dma_async_client_unregister); -EXPORT_SYMBOL(dma_async_client_chan_request); -EXPORT_SYMBOL(dma_async_memcpy_buf_to_buf); -EXPORT_SYMBOL(dma_async_memcpy_buf_to_pg); -EXPORT_SYMBOL(dma_async_memcpy_pg_to_pg); -EXPORT_SYMBOL(dma_async_memcpy_complete); -EXPORT_SYMBOL(dma_async_memcpy_issue_pending); -EXPORT_SYMBOL(dma_async_device_register); -EXPORT_SYMBOL(dma_async_device_unregister); -EXPORT_SYMBOL(dma_chan_cleanup); diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c deleted file mode 100644 index dbd4d6c36..000000000 --- a/drivers/dma/ioatdma.c +++ /dev/null @@ -1,841 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ - -/* - * This driver supports an Intel I/OAT DMA engine, which does asynchronous - * copy operations. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "ioatdma.h" -#include "ioatdma_io.h" -#include "ioatdma_registers.h" -#include "ioatdma_hw.h" - -#define to_ioat_chan(chan) container_of(chan, struct ioat_dma_chan, common) -#define to_ioat_device(dev) container_of(dev, struct ioat_device, common) -#define to_ioat_desc(lh) container_of(lh, struct ioat_desc_sw, node) - -/* internal functions */ -static int __devinit ioat_probe(struct pci_dev *pdev, const struct pci_device_id *ent); -static void __devexit ioat_remove(struct pci_dev *pdev); - -static int enumerate_dma_channels(struct ioat_device *device) -{ - u8 xfercap_scale; - u32 xfercap; - int i; - struct ioat_dma_chan *ioat_chan; - - device->common.chancnt = ioatdma_read8(device, IOAT_CHANCNT_OFFSET); - xfercap_scale = ioatdma_read8(device, IOAT_XFERCAP_OFFSET); - xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale)); - - for (i = 0; i < device->common.chancnt; i++) { - ioat_chan = kzalloc(sizeof(*ioat_chan), GFP_KERNEL); - if (!ioat_chan) { - device->common.chancnt = i; - break; - } - - ioat_chan->device = device; - ioat_chan->reg_base = device->reg_base + (0x80 * (i + 1)); - ioat_chan->xfercap = xfercap; - spin_lock_init(&ioat_chan->cleanup_lock); - spin_lock_init(&ioat_chan->desc_lock); - INIT_LIST_HEAD(&ioat_chan->free_desc); - INIT_LIST_HEAD(&ioat_chan->used_desc); - /* This should be made common somewhere in dmaengine.c */ - ioat_chan->common.device = &device->common; - ioat_chan->common.client = NULL; - list_add_tail(&ioat_chan->common.device_node, - &device->common.channels); - } - return device->common.chancnt; -} - -static struct ioat_desc_sw *ioat_dma_alloc_descriptor( - struct ioat_dma_chan *ioat_chan, - int flags) -{ - struct ioat_dma_descriptor *desc; - struct ioat_desc_sw *desc_sw; - struct ioat_device *ioat_device; - dma_addr_t phys; - - ioat_device = to_ioat_device(ioat_chan->common.device); - desc = pci_pool_alloc(ioat_device->dma_pool, flags, &phys); - if (unlikely(!desc)) - return NULL; - - desc_sw = kzalloc(sizeof(*desc_sw), flags); - if (unlikely(!desc_sw)) { - pci_pool_free(ioat_device->dma_pool, desc, phys); - return NULL; - } - - memset(desc, 0, sizeof(*desc)); - desc_sw->hw = desc; - desc_sw->phys = phys; - - return desc_sw; -} - -#define INITIAL_IOAT_DESC_COUNT 128 - -static void ioat_start_null_desc(struct ioat_dma_chan *ioat_chan); - -/* returns the actual number of allocated descriptors */ -static int ioat_dma_alloc_chan_resources(struct dma_chan *chan) -{ - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - struct ioat_desc_sw *desc = NULL; - u16 chanctrl; - u32 chanerr; - int i; - LIST_HEAD(tmp_list); - - /* - * In-use bit automatically set by reading chanctrl - * If 0, we got it, if 1, someone else did - */ - chanctrl = ioatdma_chan_read16(ioat_chan, IOAT_CHANCTRL_OFFSET); - if (chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE) - return -EBUSY; - - /* Setup register to interrupt and write completion status on error */ - chanctrl = IOAT_CHANCTRL_CHANNEL_IN_USE | - IOAT_CHANCTRL_ERR_INT_EN | - IOAT_CHANCTRL_ANY_ERR_ABORT_EN | - IOAT_CHANCTRL_ERR_COMPLETION_EN; - ioatdma_chan_write16(ioat_chan, IOAT_CHANCTRL_OFFSET, chanctrl); - - chanerr = ioatdma_chan_read32(ioat_chan, IOAT_CHANERR_OFFSET); - if (chanerr) { - printk("IOAT: CHANERR = %x, clearing\n", chanerr); - ioatdma_chan_write32(ioat_chan, IOAT_CHANERR_OFFSET, chanerr); - } - - /* Allocate descriptors */ - for (i = 0; i < INITIAL_IOAT_DESC_COUNT; i++) { - desc = ioat_dma_alloc_descriptor(ioat_chan, GFP_KERNEL); - if (!desc) { - printk(KERN_ERR "IOAT: Only %d initial descriptors\n", i); - break; - } - list_add_tail(&desc->node, &tmp_list); - } - spin_lock_bh(&ioat_chan->desc_lock); - list_splice(&tmp_list, &ioat_chan->free_desc); - spin_unlock_bh(&ioat_chan->desc_lock); - - /* allocate a completion writeback area */ - /* doing 2 32bit writes to mmio since 1 64b write doesn't work */ - ioat_chan->completion_virt = - pci_pool_alloc(ioat_chan->device->completion_pool, - GFP_KERNEL, - &ioat_chan->completion_addr); - memset(ioat_chan->completion_virt, 0, - sizeof(*ioat_chan->completion_virt)); - ioatdma_chan_write32(ioat_chan, IOAT_CHANCMP_OFFSET_LOW, - ((u64) ioat_chan->completion_addr) & 0x00000000FFFFFFFF); - ioatdma_chan_write32(ioat_chan, IOAT_CHANCMP_OFFSET_HIGH, - ((u64) ioat_chan->completion_addr) >> 32); - - ioat_start_null_desc(ioat_chan); - return i; -} - -static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *ioat_chan); - -static void ioat_dma_free_chan_resources(struct dma_chan *chan) -{ - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - struct ioat_device *ioat_device = to_ioat_device(chan->device); - struct ioat_desc_sw *desc, *_desc; - u16 chanctrl; - int in_use_descs = 0; - - ioat_dma_memcpy_cleanup(ioat_chan); - - ioatdma_chan_write8(ioat_chan, IOAT_CHANCMD_OFFSET, IOAT_CHANCMD_RESET); - - spin_lock_bh(&ioat_chan->desc_lock); - list_for_each_entry_safe(desc, _desc, &ioat_chan->used_desc, node) { - in_use_descs++; - list_del(&desc->node); - pci_pool_free(ioat_device->dma_pool, desc->hw, desc->phys); - kfree(desc); - } - list_for_each_entry_safe(desc, _desc, &ioat_chan->free_desc, node) { - list_del(&desc->node); - pci_pool_free(ioat_device->dma_pool, desc->hw, desc->phys); - kfree(desc); - } - spin_unlock_bh(&ioat_chan->desc_lock); - - pci_pool_free(ioat_device->completion_pool, - ioat_chan->completion_virt, - ioat_chan->completion_addr); - - /* one is ok since we left it on there on purpose */ - if (in_use_descs > 1) - printk(KERN_ERR "IOAT: Freeing %d in use descriptors!\n", - in_use_descs - 1); - - ioat_chan->last_completion = ioat_chan->completion_addr = 0; - - /* Tell hw the chan is free */ - chanctrl = ioatdma_chan_read16(ioat_chan, IOAT_CHANCTRL_OFFSET); - chanctrl &= ~IOAT_CHANCTRL_CHANNEL_IN_USE; - ioatdma_chan_write16(ioat_chan, IOAT_CHANCTRL_OFFSET, chanctrl); -} - -/** - * do_ioat_dma_memcpy - actual function that initiates a IOAT DMA transaction - * @ioat_chan: IOAT DMA channel handle - * @dest: DMA destination address - * @src: DMA source address - * @len: transaction length in bytes - */ - -static dma_cookie_t do_ioat_dma_memcpy(struct ioat_dma_chan *ioat_chan, - dma_addr_t dest, - dma_addr_t src, - size_t len) -{ - struct ioat_desc_sw *first; - struct ioat_desc_sw *prev; - struct ioat_desc_sw *new; - dma_cookie_t cookie; - LIST_HEAD(new_chain); - u32 copy; - size_t orig_len; - dma_addr_t orig_src, orig_dst; - unsigned int desc_count = 0; - unsigned int append = 0; - - if (!ioat_chan || !dest || !src) - return -EFAULT; - - if (!len) - return ioat_chan->common.cookie; - - orig_len = len; - orig_src = src; - orig_dst = dest; - - first = NULL; - prev = NULL; - - spin_lock_bh(&ioat_chan->desc_lock); - - while (len) { - if (!list_empty(&ioat_chan->free_desc)) { - new = to_ioat_desc(ioat_chan->free_desc.next); - list_del(&new->node); - } else { - /* try to get another desc */ - new = ioat_dma_alloc_descriptor(ioat_chan, GFP_ATOMIC); - /* will this ever happen? */ - /* TODO add upper limit on these */ - BUG_ON(!new); - } - - copy = min((u32) len, ioat_chan->xfercap); - - new->hw->size = copy; - new->hw->ctl = 0; - new->hw->src_addr = src; - new->hw->dst_addr = dest; - new->cookie = 0; - - /* chain together the physical address list for the HW */ - if (!first) - first = new; - else - prev->hw->next = (u64) new->phys; - - prev = new; - - len -= copy; - dest += copy; - src += copy; - - list_add_tail(&new->node, &new_chain); - desc_count++; - } - new->hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS; - new->hw->next = 0; - - /* cookie incr and addition to used_list must be atomic */ - - cookie = ioat_chan->common.cookie; - cookie++; - if (cookie < 0) - cookie = 1; - ioat_chan->common.cookie = new->cookie = cookie; - - pci_unmap_addr_set(new, src, orig_src); - pci_unmap_addr_set(new, dst, orig_dst); - pci_unmap_len_set(new, src_len, orig_len); - pci_unmap_len_set(new, dst_len, orig_len); - - /* write address into NextDescriptor field of last desc in chain */ - to_ioat_desc(ioat_chan->used_desc.prev)->hw->next = first->phys; - list_splice_init(&new_chain, ioat_chan->used_desc.prev); - - ioat_chan->pending += desc_count; - if (ioat_chan->pending >= 20) { - append = 1; - ioat_chan->pending = 0; - } - - spin_unlock_bh(&ioat_chan->desc_lock); - - if (append) - ioatdma_chan_write8(ioat_chan, - IOAT_CHANCMD_OFFSET, - IOAT_CHANCMD_APPEND); - return cookie; -} - -/** - * ioat_dma_memcpy_buf_to_buf - wrapper that takes src & dest bufs - * @chan: IOAT DMA channel handle - * @dest: DMA destination address - * @src: DMA source address - * @len: transaction length in bytes - */ - -static dma_cookie_t ioat_dma_memcpy_buf_to_buf(struct dma_chan *chan, - void *dest, - void *src, - size_t len) -{ - dma_addr_t dest_addr; - dma_addr_t src_addr; - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - - dest_addr = pci_map_single(ioat_chan->device->pdev, - dest, len, PCI_DMA_FROMDEVICE); - src_addr = pci_map_single(ioat_chan->device->pdev, - src, len, PCI_DMA_TODEVICE); - - return do_ioat_dma_memcpy(ioat_chan, dest_addr, src_addr, len); -} - -/** - * ioat_dma_memcpy_buf_to_pg - wrapper, copying from a buf to a page - * @chan: IOAT DMA channel handle - * @page: pointer to the page to copy to - * @offset: offset into that page - * @src: DMA source address - * @len: transaction length in bytes - */ - -static dma_cookie_t ioat_dma_memcpy_buf_to_pg(struct dma_chan *chan, - struct page *page, - unsigned int offset, - void *src, - size_t len) -{ - dma_addr_t dest_addr; - dma_addr_t src_addr; - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - - dest_addr = pci_map_page(ioat_chan->device->pdev, - page, offset, len, PCI_DMA_FROMDEVICE); - src_addr = pci_map_single(ioat_chan->device->pdev, - src, len, PCI_DMA_TODEVICE); - - return do_ioat_dma_memcpy(ioat_chan, dest_addr, src_addr, len); -} - -/** - * ioat_dma_memcpy_pg_to_pg - wrapper, copying between two pages - * @chan: IOAT DMA channel handle - * @dest_pg: pointer to the page to copy to - * @dest_off: offset into that page - * @src_pg: pointer to the page to copy from - * @src_off: offset into that page - * @len: transaction length in bytes. This is guaranteed not to make a copy - * across a page boundary. - */ - -static dma_cookie_t ioat_dma_memcpy_pg_to_pg(struct dma_chan *chan, - struct page *dest_pg, - unsigned int dest_off, - struct page *src_pg, - unsigned int src_off, - size_t len) -{ - dma_addr_t dest_addr; - dma_addr_t src_addr; - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - - dest_addr = pci_map_page(ioat_chan->device->pdev, - dest_pg, dest_off, len, PCI_DMA_FROMDEVICE); - src_addr = pci_map_page(ioat_chan->device->pdev, - src_pg, src_off, len, PCI_DMA_TODEVICE); - - return do_ioat_dma_memcpy(ioat_chan, dest_addr, src_addr, len); -} - -/** - * ioat_dma_memcpy_issue_pending - push potentially unrecognized appended descriptors to hw - * @chan: DMA channel handle - */ - -static void ioat_dma_memcpy_issue_pending(struct dma_chan *chan) -{ - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - - if (ioat_chan->pending != 0) { - ioat_chan->pending = 0; - ioatdma_chan_write8(ioat_chan, - IOAT_CHANCMD_OFFSET, - IOAT_CHANCMD_APPEND); - } -} - -static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan) -{ - unsigned long phys_complete; - struct ioat_desc_sw *desc, *_desc; - dma_cookie_t cookie = 0; - - prefetch(chan->completion_virt); - - if (!spin_trylock(&chan->cleanup_lock)) - return; - - /* The completion writeback can happen at any time, - so reads by the driver need to be atomic operations - The descriptor physical addresses are limited to 32-bits - when the CPU can only do a 32-bit mov */ - -#if (BITS_PER_LONG == 64) - phys_complete = - chan->completion_virt->full & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR; -#else - phys_complete = chan->completion_virt->low & IOAT_LOW_COMPLETION_MASK; -#endif - - if ((chan->completion_virt->full & IOAT_CHANSTS_DMA_TRANSFER_STATUS) == - IOAT_CHANSTS_DMA_TRANSFER_STATUS_HALTED) { - printk("IOAT: Channel halted, chanerr = %x\n", - ioatdma_chan_read32(chan, IOAT_CHANERR_OFFSET)); - - /* TODO do something to salvage the situation */ - } - - if (phys_complete == chan->last_completion) { - spin_unlock(&chan->cleanup_lock); - return; - } - - spin_lock_bh(&chan->desc_lock); - list_for_each_entry_safe(desc, _desc, &chan->used_desc, node) { - - /* - * Incoming DMA requests may use multiple descriptors, due to - * exceeding xfercap, perhaps. If so, only the last one will - * have a cookie, and require unmapping. - */ - if (desc->cookie) { - cookie = desc->cookie; - - /* yes we are unmapping both _page and _single alloc'd - regions with unmap_page. Is this *really* that bad? - */ - pci_unmap_page(chan->device->pdev, - pci_unmap_addr(desc, dst), - pci_unmap_len(desc, dst_len), - PCI_DMA_FROMDEVICE); - pci_unmap_page(chan->device->pdev, - pci_unmap_addr(desc, src), - pci_unmap_len(desc, src_len), - PCI_DMA_TODEVICE); - } - - if (desc->phys != phys_complete) { - /* a completed entry, but not the last, so cleanup */ - list_del(&desc->node); - list_add_tail(&desc->node, &chan->free_desc); - } else { - /* last used desc. Do not remove, so we can append from - it, but don't look at it next time, either */ - desc->cookie = 0; - - /* TODO check status bits? */ - break; - } - } - - spin_unlock_bh(&chan->desc_lock); - - chan->last_completion = phys_complete; - if (cookie != 0) - chan->completed_cookie = cookie; - - spin_unlock(&chan->cleanup_lock); -} - -/** - * ioat_dma_is_complete - poll the status of a IOAT DMA transaction - * @chan: IOAT DMA channel handle - * @cookie: DMA transaction identifier - * @done: if not %NULL, updated with last completed transaction - * @used: if not %NULL, updated with last used transaction - */ - -static enum dma_status ioat_dma_is_complete(struct dma_chan *chan, - dma_cookie_t cookie, - dma_cookie_t *done, - dma_cookie_t *used) -{ - struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan); - dma_cookie_t last_used; - dma_cookie_t last_complete; - enum dma_status ret; - - last_used = chan->cookie; - last_complete = ioat_chan->completed_cookie; - - if (done) - *done= last_complete; - if (used) - *used = last_used; - - ret = dma_async_is_complete(cookie, last_complete, last_used); - if (ret == DMA_SUCCESS) - return ret; - - ioat_dma_memcpy_cleanup(ioat_chan); - - last_used = chan->cookie; - last_complete = ioat_chan->completed_cookie; - - if (done) - *done= last_complete; - if (used) - *used = last_used; - - return dma_async_is_complete(cookie, last_complete, last_used); -} - -/* PCI API */ - -static struct pci_device_id ioat_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT) }, - { 0, } -}; - -static struct pci_driver ioat_pci_drv = { - .name = "ioatdma", - .id_table = ioat_pci_tbl, - .probe = ioat_probe, - .remove = __devexit_p(ioat_remove), -}; - -static irqreturn_t ioat_do_interrupt(int irq, void *data, struct pt_regs *regs) -{ - struct ioat_device *instance = data; - unsigned long attnstatus; - u8 intrctrl; - - intrctrl = ioatdma_read8(instance, IOAT_INTRCTRL_OFFSET); - - if (!(intrctrl & IOAT_INTRCTRL_MASTER_INT_EN)) - return IRQ_NONE; - - if (!(intrctrl & IOAT_INTRCTRL_INT_STATUS)) { - ioatdma_write8(instance, IOAT_INTRCTRL_OFFSET, intrctrl); - return IRQ_NONE; - } - - attnstatus = ioatdma_read32(instance, IOAT_ATTNSTATUS_OFFSET); - - printk(KERN_ERR "ioatdma error: interrupt! status %lx\n", attnstatus); - - ioatdma_write8(instance, IOAT_INTRCTRL_OFFSET, intrctrl); - return IRQ_HANDLED; -} - -static void ioat_start_null_desc(struct ioat_dma_chan *ioat_chan) -{ - struct ioat_desc_sw *desc; - - spin_lock_bh(&ioat_chan->desc_lock); - - if (!list_empty(&ioat_chan->free_desc)) { - desc = to_ioat_desc(ioat_chan->free_desc.next); - list_del(&desc->node); - } else { - /* try to get another desc */ - spin_unlock_bh(&ioat_chan->desc_lock); - desc = ioat_dma_alloc_descriptor(ioat_chan, GFP_KERNEL); - spin_lock_bh(&ioat_chan->desc_lock); - /* will this ever happen? */ - BUG_ON(!desc); - } - - desc->hw->ctl = IOAT_DMA_DESCRIPTOR_NUL; - desc->hw->next = 0; - - list_add_tail(&desc->node, &ioat_chan->used_desc); - spin_unlock_bh(&ioat_chan->desc_lock); - -#if (BITS_PER_LONG == 64) - ioatdma_chan_write64(ioat_chan, IOAT_CHAINADDR_OFFSET, desc->phys); -#else - ioatdma_chan_write32(ioat_chan, - IOAT_CHAINADDR_OFFSET_LOW, - (u32) desc->phys); - ioatdma_chan_write32(ioat_chan, IOAT_CHAINADDR_OFFSET_HIGH, 0); -#endif - ioatdma_chan_write8(ioat_chan, IOAT_CHANCMD_OFFSET, IOAT_CHANCMD_START); -} - -/* - * Perform a IOAT transaction to verify the HW works. - */ -#define IOAT_TEST_SIZE 2000 - -static int ioat_self_test(struct ioat_device *device) -{ - int i; - u8 *src; - u8 *dest; - struct dma_chan *dma_chan; - dma_cookie_t cookie; - int err = 0; - - src = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, SLAB_KERNEL); - if (!src) - return -ENOMEM; - dest = kzalloc(sizeof(u8) * IOAT_TEST_SIZE, SLAB_KERNEL); - if (!dest) { - kfree(src); - return -ENOMEM; - } - - /* Fill in src buffer */ - for (i = 0; i < IOAT_TEST_SIZE; i++) - src[i] = (u8)i; - - /* Start copy, using first DMA channel */ - dma_chan = container_of(device->common.channels.next, - struct dma_chan, - device_node); - if (ioat_dma_alloc_chan_resources(dma_chan) < 1) { - err = -ENODEV; - goto out; - } - - cookie = ioat_dma_memcpy_buf_to_buf(dma_chan, dest, src, IOAT_TEST_SIZE); - ioat_dma_memcpy_issue_pending(dma_chan); - msleep(1); - - if (ioat_dma_is_complete(dma_chan, cookie, NULL, NULL) != DMA_SUCCESS) { - printk(KERN_ERR "ioatdma: Self-test copy timed out, disabling\n"); - err = -ENODEV; - goto free_resources; - } - if (memcmp(src, dest, IOAT_TEST_SIZE)) { - printk(KERN_ERR "ioatdma: Self-test copy failed compare, disabling\n"); - err = -ENODEV; - goto free_resources; - } - -free_resources: - ioat_dma_free_chan_resources(dma_chan); -out: - kfree(src); - kfree(dest); - return err; -} - -static int __devinit ioat_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - int err; - unsigned long mmio_start, mmio_len; - void *reg_base; - struct ioat_device *device; - - err = pci_enable_device(pdev); - if (err) - goto err_enable_device; - - err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); - if (err) - err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); - if (err) - goto err_set_dma_mask; - - err = pci_request_regions(pdev, ioat_pci_drv.name); - if (err) - goto err_request_regions; - - mmio_start = pci_resource_start(pdev, 0); - mmio_len = pci_resource_len(pdev, 0); - - reg_base = ioremap(mmio_start, mmio_len); - if (!reg_base) { - err = -ENOMEM; - goto err_ioremap; - } - - device = kzalloc(sizeof(*device), GFP_KERNEL); - if (!device) { - err = -ENOMEM; - goto err_kzalloc; - } - - /* DMA coherent memory pool for DMA descriptor allocations */ - device->dma_pool = pci_pool_create("dma_desc_pool", pdev, - sizeof(struct ioat_dma_descriptor), 64, 0); - if (!device->dma_pool) { - err = -ENOMEM; - goto err_dma_pool; - } - - device->completion_pool = pci_pool_create("completion_pool", pdev, sizeof(u64), SMP_CACHE_BYTES, SMP_CACHE_BYTES); - if (!device->completion_pool) { - err = -ENOMEM; - goto err_completion_pool; - } - - device->pdev = pdev; - pci_set_drvdata(pdev, device); -#ifdef CONFIG_PCI_MSI - if (pci_enable_msi(pdev) == 0) { - device->msi = 1; - } else { - device->msi = 0; - } -#endif - err = request_irq(pdev->irq, &ioat_do_interrupt, IRQF_SHARED, "ioat", - device); - if (err) - goto err_irq; - - device->reg_base = reg_base; - - ioatdma_write8(device, IOAT_INTRCTRL_OFFSET, IOAT_INTRCTRL_MASTER_INT_EN); - pci_set_master(pdev); - - INIT_LIST_HEAD(&device->common.channels); - enumerate_dma_channels(device); - - device->common.device_alloc_chan_resources = ioat_dma_alloc_chan_resources; - device->common.device_free_chan_resources = ioat_dma_free_chan_resources; - device->common.device_memcpy_buf_to_buf = ioat_dma_memcpy_buf_to_buf; - device->common.device_memcpy_buf_to_pg = ioat_dma_memcpy_buf_to_pg; - device->common.device_memcpy_pg_to_pg = ioat_dma_memcpy_pg_to_pg; - device->common.device_memcpy_complete = ioat_dma_is_complete; - device->common.device_memcpy_issue_pending = ioat_dma_memcpy_issue_pending; - printk(KERN_INFO "Intel(R) I/OAT DMA Engine found, %d channels\n", - device->common.chancnt); - - err = ioat_self_test(device); - if (err) - goto err_self_test; - - dma_async_device_register(&device->common); - - return 0; - -err_self_test: -err_irq: - pci_pool_destroy(device->completion_pool); -err_completion_pool: - pci_pool_destroy(device->dma_pool); -err_dma_pool: - kfree(device); -err_kzalloc: - iounmap(reg_base); -err_ioremap: - pci_release_regions(pdev); -err_request_regions: -err_set_dma_mask: - pci_disable_device(pdev); -err_enable_device: - return err; -} - -static void __devexit ioat_remove(struct pci_dev *pdev) -{ - struct ioat_device *device; - struct dma_chan *chan, *_chan; - struct ioat_dma_chan *ioat_chan; - - device = pci_get_drvdata(pdev); - dma_async_device_unregister(&device->common); - - free_irq(device->pdev->irq, device); -#ifdef CONFIG_PCI_MSI - if (device->msi) - pci_disable_msi(device->pdev); -#endif - pci_pool_destroy(device->dma_pool); - pci_pool_destroy(device->completion_pool); - iounmap(device->reg_base); - pci_release_regions(pdev); - pci_disable_device(pdev); - list_for_each_entry_safe(chan, _chan, &device->common.channels, device_node) { - ioat_chan = to_ioat_chan(chan); - list_del(&chan->device_node); - kfree(ioat_chan); - } - kfree(device); -} - -/* MODULE API */ -MODULE_VERSION("1.7"); -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Intel Corporation"); - -static int __init ioat_init_module(void) -{ - /* it's currently unsafe to unload this module */ - /* if forced, worst case is that rmmod hangs */ - __unsafe(THIS_MODULE); - - return pci_register_driver(&ioat_pci_drv); -} - -module_init(ioat_init_module); - -static void __exit ioat_exit_module(void) -{ - pci_unregister_driver(&ioat_pci_drv); -} - -module_exit(ioat_exit_module); diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h deleted file mode 100644 index a5d3b3644..000000000 --- a/drivers/dma/ioatdma.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef IOATDMA_H -#define IOATDMA_H - -#include -#include "ioatdma_hw.h" -#include -#include -#include -#include - -#define IOAT_LOW_COMPLETION_MASK 0xffffffc0 - -extern struct list_head dma_device_list; -extern struct list_head dma_client_list; - -/** - * struct ioat_device - internal representation of a IOAT device - * @pdev: PCI-Express device - * @reg_base: MMIO register space base address - * @dma_pool: for allocating DMA descriptors - * @common: embedded struct dma_device - * @msi: Message Signaled Interrupt number - */ - -struct ioat_device { - struct pci_dev *pdev; - void *reg_base; - struct pci_pool *dma_pool; - struct pci_pool *completion_pool; - - struct dma_device common; - u8 msi; -}; - -/** - * struct ioat_dma_chan - internal representation of a DMA channel - * @device: - * @reg_base: - * @sw_in_use: - * @completion: - * @completion_low: - * @completion_high: - * @completed_cookie: last cookie seen completed on cleanup - * @cookie: value of last cookie given to client - * @last_completion: - * @xfercap: - * @desc_lock: - * @free_desc: - * @used_desc: - * @resource: - * @device_node: - */ - -struct ioat_dma_chan { - - void *reg_base; - - dma_cookie_t completed_cookie; - unsigned long last_completion; - - u32 xfercap; /* XFERCAP register value expanded out */ - - spinlock_t cleanup_lock; - spinlock_t desc_lock; - struct list_head free_desc; - struct list_head used_desc; - - int pending; - - struct ioat_device *device; - struct dma_chan common; - - dma_addr_t completion_addr; - union { - u64 full; /* HW completion writeback */ - struct { - u32 low; - u32 high; - }; - } *completion_virt; -}; - -/* wrapper around hardware descriptor format + additional software fields */ - -/** - * struct ioat_desc_sw - wrapper around hardware descriptor - * @hw: hardware DMA descriptor - * @node: - * @cookie: - * @phys: - */ - -struct ioat_desc_sw { - struct ioat_dma_descriptor *hw; - struct list_head node; - dma_cookie_t cookie; - dma_addr_t phys; - DECLARE_PCI_UNMAP_ADDR(src) - DECLARE_PCI_UNMAP_LEN(src_len) - DECLARE_PCI_UNMAP_ADDR(dst) - DECLARE_PCI_UNMAP_LEN(dst_len) -}; - -#endif /* IOATDMA_H */ - diff --git a/drivers/dma/ioatdma_hw.h b/drivers/dma/ioatdma_hw.h deleted file mode 100644 index 4d7a12880..000000000 --- a/drivers/dma/ioatdma_hw.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef _IOAT_HW_H_ -#define _IOAT_HW_H_ - -/* PCI Configuration Space Values */ -#define IOAT_PCI_VID 0x8086 -#define IOAT_PCI_DID 0x1A38 -#define IOAT_PCI_RID 0x00 -#define IOAT_PCI_SVID 0x8086 -#define IOAT_PCI_SID 0x8086 -#define IOAT_VER 0x12 /* Version 1.2 */ - -struct ioat_dma_descriptor { - uint32_t size; - uint32_t ctl; - uint64_t src_addr; - uint64_t dst_addr; - uint64_t next; - uint64_t rsv1; - uint64_t rsv2; - uint64_t user1; - uint64_t user2; -}; - -#define IOAT_DMA_DESCRIPTOR_CTL_INT_GN 0x00000001 -#define IOAT_DMA_DESCRIPTOR_CTL_SRC_SN 0x00000002 -#define IOAT_DMA_DESCRIPTOR_CTL_DST_SN 0x00000004 -#define IOAT_DMA_DESCRIPTOR_CTL_CP_STS 0x00000008 -#define IOAT_DMA_DESCRIPTOR_CTL_FRAME 0x00000010 -#define IOAT_DMA_DESCRIPTOR_NUL 0x00000020 -#define IOAT_DMA_DESCRIPTOR_OPCODE 0xFF000000 - -#endif diff --git a/drivers/dma/ioatdma_io.h b/drivers/dma/ioatdma_io.h deleted file mode 100644 index c0b4bf66c..000000000 --- a/drivers/dma/ioatdma_io.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef IOATDMA_IO_H -#define IOATDMA_IO_H - -#include - -/* - * device and per-channel MMIO register read and write functions - * this is a lot of anoying inline functions, but it's typesafe - */ - -static inline u8 ioatdma_read8(struct ioat_device *device, - unsigned int offset) -{ - return readb(device->reg_base + offset); -} - -static inline u16 ioatdma_read16(struct ioat_device *device, - unsigned int offset) -{ - return readw(device->reg_base + offset); -} - -static inline u32 ioatdma_read32(struct ioat_device *device, - unsigned int offset) -{ - return readl(device->reg_base + offset); -} - -static inline void ioatdma_write8(struct ioat_device *device, - unsigned int offset, u8 value) -{ - writeb(value, device->reg_base + offset); -} - -static inline void ioatdma_write16(struct ioat_device *device, - unsigned int offset, u16 value) -{ - writew(value, device->reg_base + offset); -} - -static inline void ioatdma_write32(struct ioat_device *device, - unsigned int offset, u32 value) -{ - writel(value, device->reg_base + offset); -} - -static inline u8 ioatdma_chan_read8(struct ioat_dma_chan *chan, - unsigned int offset) -{ - return readb(chan->reg_base + offset); -} - -static inline u16 ioatdma_chan_read16(struct ioat_dma_chan *chan, - unsigned int offset) -{ - return readw(chan->reg_base + offset); -} - -static inline u32 ioatdma_chan_read32(struct ioat_dma_chan *chan, - unsigned int offset) -{ - return readl(chan->reg_base + offset); -} - -static inline void ioatdma_chan_write8(struct ioat_dma_chan *chan, - unsigned int offset, u8 value) -{ - writeb(value, chan->reg_base + offset); -} - -static inline void ioatdma_chan_write16(struct ioat_dma_chan *chan, - unsigned int offset, u16 value) -{ - writew(value, chan->reg_base + offset); -} - -static inline void ioatdma_chan_write32(struct ioat_dma_chan *chan, - unsigned int offset, u32 value) -{ - writel(value, chan->reg_base + offset); -} - -#if (BITS_PER_LONG == 64) -static inline u64 ioatdma_chan_read64(struct ioat_dma_chan *chan, - unsigned int offset) -{ - return readq(chan->reg_base + offset); -} - -static inline void ioatdma_chan_write64(struct ioat_dma_chan *chan, - unsigned int offset, u64 value) -{ - writeq(value, chan->reg_base + offset); -} -#endif - -#endif /* IOATDMA_IO_H */ - diff --git a/drivers/dma/ioatdma_registers.h b/drivers/dma/ioatdma_registers.h deleted file mode 100644 index a30c73490..000000000 --- a/drivers/dma/ioatdma_registers.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef _IOAT_REGISTERS_H_ -#define _IOAT_REGISTERS_H_ - - -/* MMIO Device Registers */ -#define IOAT_CHANCNT_OFFSET 0x00 /* 8-bit */ - -#define IOAT_XFERCAP_OFFSET 0x01 /* 8-bit */ -#define IOAT_XFERCAP_4KB 12 -#define IOAT_XFERCAP_8KB 13 -#define IOAT_XFERCAP_16KB 14 -#define IOAT_XFERCAP_32KB 15 -#define IOAT_XFERCAP_32GB 0 - -#define IOAT_GENCTRL_OFFSET 0x02 /* 8-bit */ -#define IOAT_GENCTRL_DEBUG_EN 0x01 - -#define IOAT_INTRCTRL_OFFSET 0x03 /* 8-bit */ -#define IOAT_INTRCTRL_MASTER_INT_EN 0x01 /* Master Interrupt Enable */ -#define IOAT_INTRCTRL_INT_STATUS 0x02 /* ATTNSTATUS -or- Channel Int */ -#define IOAT_INTRCTRL_INT 0x04 /* INT_STATUS -and- MASTER_INT_EN */ - -#define IOAT_ATTNSTATUS_OFFSET 0x04 /* Each bit is a channel */ - -#define IOAT_VER_OFFSET 0x08 /* 8-bit */ -#define IOAT_VER_MAJOR_MASK 0xF0 -#define IOAT_VER_MINOR_MASK 0x0F -#define GET_IOAT_VER_MAJOR(x) ((x) & IOAT_VER_MAJOR_MASK) -#define GET_IOAT_VER_MINOR(x) ((x) & IOAT_VER_MINOR_MASK) - -#define IOAT_PERPORTOFFSET_OFFSET 0x0A /* 16-bit */ - -#define IOAT_INTRDELAY_OFFSET 0x0C /* 16-bit */ -#define IOAT_INTRDELAY_INT_DELAY_MASK 0x3FFF /* Interrupt Delay Time */ -#define IOAT_INTRDELAY_COALESE_SUPPORT 0x8000 /* Interrupt Coalesing Supported */ - -#define IOAT_DEVICE_STATUS_OFFSET 0x0E /* 16-bit */ -#define IOAT_DEVICE_STATUS_DEGRADED_MODE 0x0001 - - -#define IOAT_CHANNEL_MMIO_SIZE 0x80 /* Each Channel MMIO space is this size */ - -/* DMA Channel Registers */ -#define IOAT_CHANCTRL_OFFSET 0x00 /* 16-bit Channel Control Register */ -#define IOAT_CHANCTRL_CHANNEL_PRIORITY_MASK 0xF000 -#define IOAT_CHANCTRL_CHANNEL_IN_USE 0x0100 -#define IOAT_CHANCTRL_DESCRIPTOR_ADDR_SNOOP_CONTROL 0x0020 -#define IOAT_CHANCTRL_ERR_INT_EN 0x0010 -#define IOAT_CHANCTRL_ANY_ERR_ABORT_EN 0x0008 -#define IOAT_CHANCTRL_ERR_COMPLETION_EN 0x0004 -#define IOAT_CHANCTRL_INT_DISABLE 0x0001 - -#define IOAT_DMA_COMP_OFFSET 0x02 /* 16-bit DMA channel compatability */ -#define IOAT_DMA_COMP_V1 0x0001 /* Compatability with DMA version 1 */ - -#define IOAT_CHANSTS_OFFSET 0x04 /* 64-bit Channel Status Register */ -#define IOAT_CHANSTS_OFFSET_LOW 0x04 -#define IOAT_CHANSTS_OFFSET_HIGH 0x08 -#define IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR 0xFFFFFFFFFFFFFFC0UL -#define IOAT_CHANSTS_SOFT_ERR 0x0000000000000010 -#define IOAT_CHANSTS_DMA_TRANSFER_STATUS 0x0000000000000007 -#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_ACTIVE 0x0 -#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_DONE 0x1 -#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_SUSPENDED 0x2 -#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_HALTED 0x3 - -#define IOAT_CHAINADDR_OFFSET 0x0C /* 64-bit Descriptor Chain Address Register */ -#define IOAT_CHAINADDR_OFFSET_LOW 0x0C -#define IOAT_CHAINADDR_OFFSET_HIGH 0x10 - -#define IOAT_CHANCMD_OFFSET 0x14 /* 8-bit DMA Channel Command Register */ -#define IOAT_CHANCMD_RESET 0x20 -#define IOAT_CHANCMD_RESUME 0x10 -#define IOAT_CHANCMD_ABORT 0x08 -#define IOAT_CHANCMD_SUSPEND 0x04 -#define IOAT_CHANCMD_APPEND 0x02 -#define IOAT_CHANCMD_START 0x01 - -#define IOAT_CHANCMP_OFFSET 0x18 /* 64-bit Channel Completion Address Register */ -#define IOAT_CHANCMP_OFFSET_LOW 0x18 -#define IOAT_CHANCMP_OFFSET_HIGH 0x1C - -#define IOAT_CDAR_OFFSET 0x20 /* 64-bit Current Descriptor Address Register */ -#define IOAT_CDAR_OFFSET_LOW 0x20 -#define IOAT_CDAR_OFFSET_HIGH 0x24 - -#define IOAT_CHANERR_OFFSET 0x28 /* 32-bit Channel Error Register */ -#define IOAT_CHANERR_DMA_TRANSFER_SRC_ADDR_ERR 0x0001 -#define IOAT_CHANERR_DMA_TRANSFER_DEST_ADDR_ERR 0x0002 -#define IOAT_CHANERR_NEXT_DESCRIPTOR_ADDR_ERR 0x0004 -#define IOAT_CHANERR_NEXT_DESCRIPTOR_ALIGNMENT_ERR 0x0008 -#define IOAT_CHANERR_CHAIN_ADDR_VALUE_ERR 0x0010 -#define IOAT_CHANERR_CHANCMD_ERR 0x0020 -#define IOAT_CHANERR_CHIPSET_UNCORRECTABLE_DATA_INTEGRITY_ERR 0x0040 -#define IOAT_CHANERR_DMA_UNCORRECTABLE_DATA_INTEGRITY_ERR 0x0080 -#define IOAT_CHANERR_READ_DATA_ERR 0x0100 -#define IOAT_CHANERR_WRITE_DATA_ERR 0x0200 -#define IOAT_CHANERR_DESCRIPTOR_CONTROL_ERR 0x0400 -#define IOAT_CHANERR_DESCRIPTOR_LENGTH_ERR 0x0800 -#define IOAT_CHANERR_COMPLETION_ADDR_ERR 0x1000 -#define IOAT_CHANERR_INT_CONFIGURATION_ERR 0x2000 -#define IOAT_CHANERR_SOFT_ERR 0x4000 - -#define IOAT_CHANERR_MASK_OFFSET 0x2C /* 32-bit Channel Error Register */ - -#endif /* _IOAT_REGISTERS_H_ */ diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c deleted file mode 100644 index d637555a8..000000000 --- a/drivers/dma/iovlock.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. All rights reserved. - * Portions based on net/core/datagram.c and copyrighted by their authors. - * - * 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ - -/* - * This code allows the net stack to make use of a DMA engine for - * skb to iovec copies. - */ - -#include -#include -#include /* for memcpy_toiovec */ -#include -#include - -static int num_pages_spanned(struct iovec *iov) -{ - return - ((PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) - - ((unsigned long)iov->iov_base & PAGE_MASK)) >> PAGE_SHIFT); -} - -/* - * Pin down all the iovec pages needed for len bytes. - * Return a struct dma_pinned_list to keep track of pages pinned down. - * - * We are allocating a single chunk of memory, and then carving it up into - * 3 sections, the latter 2 whose size depends on the number of iovecs and the - * total number of pages, respectively. - */ -struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) -{ - struct dma_pinned_list *local_list; - struct page **pages; - int i; - int ret; - int nr_iovecs = 0; - int iovec_len_used = 0; - int iovec_pages_used = 0; - long err; - - /* don't pin down non-user-based iovecs */ - if (segment_eq(get_fs(), KERNEL_DS)) - return NULL; - - /* determine how many iovecs/pages there are, up front */ - do { - iovec_len_used += iov[nr_iovecs].iov_len; - iovec_pages_used += num_pages_spanned(&iov[nr_iovecs]); - nr_iovecs++; - } while (iovec_len_used < len); - - /* single kmalloc for pinned list, page_list[], and the page arrays */ - local_list = kmalloc(sizeof(*local_list) - + (nr_iovecs * sizeof (struct dma_page_list)) - + (iovec_pages_used * sizeof (struct page*)), GFP_KERNEL); - if (!local_list) { - err = -ENOMEM; - goto out; - } - - /* list of pages starts right after the page list array */ - pages = (struct page **) &local_list->page_list[nr_iovecs]; - - for (i = 0; i < nr_iovecs; i++) { - struct dma_page_list *page_list = &local_list->page_list[i]; - - len -= iov[i].iov_len; - - if (!access_ok(VERIFY_WRITE, iov[i].iov_base, iov[i].iov_len)) { - err = -EFAULT; - goto unpin; - } - - page_list->nr_pages = num_pages_spanned(&iov[i]); - page_list->base_address = iov[i].iov_base; - - page_list->pages = pages; - pages += page_list->nr_pages; - - /* pin pages down */ - down_read(¤t->mm->mmap_sem); - ret = get_user_pages( - current, - current->mm, - (unsigned long) iov[i].iov_base, - page_list->nr_pages, - 1, /* write */ - 0, /* force */ - page_list->pages, - NULL); - up_read(¤t->mm->mmap_sem); - - if (ret != page_list->nr_pages) { - err = -ENOMEM; - goto unpin; - } - - local_list->nr_iovecs = i + 1; - } - - return local_list; - -unpin: - dma_unpin_iovec_pages(local_list); -out: - return ERR_PTR(err); -} - -void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list) -{ - int i, j; - - if (!pinned_list) - return; - - for (i = 0; i < pinned_list->nr_iovecs; i++) { - struct dma_page_list *page_list = &pinned_list->page_list[i]; - for (j = 0; j < page_list->nr_pages; j++) { - set_page_dirty_lock(page_list->pages[j]); - page_cache_release(page_list->pages[j]); - } - } - - kfree(pinned_list); -} - -static dma_cookie_t dma_memcpy_to_kernel_iovec(struct dma_chan *chan, struct - iovec *iov, unsigned char *kdata, size_t len) -{ - dma_cookie_t dma_cookie = 0; - - while (len > 0) { - if (iov->iov_len) { - int copy = min_t(unsigned int, iov->iov_len, len); - dma_cookie = dma_async_memcpy_buf_to_buf( - chan, - iov->iov_base, - kdata, - copy); - kdata += copy; - len -= copy; - iov->iov_len -= copy; - iov->iov_base += copy; - } - iov++; - } - - return dma_cookie; -} - -/* - * We have already pinned down the pages we will be using in the iovecs. - * Each entry in iov array has corresponding entry in pinned_list->page_list. - * Using array indexing to keep iov[] and page_list[] in sync. - * Initial elements in iov array's iov->iov_len will be 0 if already copied into - * by another call. - * iov array length remaining guaranteed to be bigger than len. - */ -dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov, - struct dma_pinned_list *pinned_list, unsigned char *kdata, size_t len) -{ - int iov_byte_offset; - int copy; - dma_cookie_t dma_cookie = 0; - int iovec_idx; - int page_idx; - - if (!chan) - return memcpy_toiovec(iov, kdata, len); - - /* -> kernel copies (e.g. smbfs) */ - if (!pinned_list) - return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len); - - iovec_idx = 0; - while (iovec_idx < pinned_list->nr_iovecs) { - struct dma_page_list *page_list; - - /* skip already used-up iovecs */ - while (!iov[iovec_idx].iov_len) - iovec_idx++; - - page_list = &pinned_list->page_list[iovec_idx]; - - iov_byte_offset = ((unsigned long)iov[iovec_idx].iov_base & ~PAGE_MASK); - page_idx = (((unsigned long)iov[iovec_idx].iov_base & PAGE_MASK) - - ((unsigned long)page_list->base_address & PAGE_MASK)) >> PAGE_SHIFT; - - /* break up copies to not cross page boundary */ - while (iov[iovec_idx].iov_len) { - copy = min_t(int, PAGE_SIZE - iov_byte_offset, len); - copy = min_t(int, copy, iov[iovec_idx].iov_len); - - dma_cookie = dma_async_memcpy_buf_to_pg(chan, - page_list->pages[page_idx], - iov_byte_offset, - kdata, - copy); - - len -= copy; - iov[iovec_idx].iov_len -= copy; - iov[iovec_idx].iov_base += copy; - - if (!len) - return dma_cookie; - - kdata += copy; - iov_byte_offset = 0; - page_idx++; - } - iovec_idx++; - } - - /* really bad if we ever run out of iovecs */ - BUG(); - return -EFAULT; -} - -dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov, - struct dma_pinned_list *pinned_list, struct page *page, - unsigned int offset, size_t len) -{ - int iov_byte_offset; - int copy; - dma_cookie_t dma_cookie = 0; - int iovec_idx; - int page_idx; - int err; - - /* this needs as-yet-unimplemented buf-to-buff, so punt. */ - /* TODO: use dma for this */ - if (!chan || !pinned_list) { - u8 *vaddr = kmap(page); - err = memcpy_toiovec(iov, vaddr + offset, len); - kunmap(page); - return err; - } - - iovec_idx = 0; - while (iovec_idx < pinned_list->nr_iovecs) { - struct dma_page_list *page_list; - - /* skip already used-up iovecs */ - while (!iov[iovec_idx].iov_len) - iovec_idx++; - - page_list = &pinned_list->page_list[iovec_idx]; - - iov_byte_offset = ((unsigned long)iov[iovec_idx].iov_base & ~PAGE_MASK); - page_idx = (((unsigned long)iov[iovec_idx].iov_base & PAGE_MASK) - - ((unsigned long)page_list->base_address & PAGE_MASK)) >> PAGE_SHIFT; - - /* break up copies to not cross page boundary */ - while (iov[iovec_idx].iov_len) { - copy = min_t(int, PAGE_SIZE - iov_byte_offset, len); - copy = min_t(int, copy, iov[iovec_idx].iov_len); - - dma_cookie = dma_async_memcpy_pg_to_pg(chan, - page_list->pages[page_idx], - iov_byte_offset, - page, - offset, - copy); - - len -= copy; - iov[iovec_idx].iov_len -= copy; - iov[iovec_idx].iov_base += copy; - - if (!len) - return dma_cookie; - - offset += copy; - iov_byte_offset = 0; - page_idx++; - } - iovec_idx++; - } - - /* really bad if we ever run out of iovecs */ - BUG(); - return -EFAULT; -} diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 5ad60aa61..4f0898400 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -90,13 +90,6 @@ config EDAC_I82860 Support for error detection and correction on the Intel 82860 chipset. -config EDAC_K8 - tristate "AMD K8 (Opteron, Athlon64)" - depends on EDAC_MM_EDAC && X86 && PCI - help - Support for error detection and correction on the AMD - K8 Memory Controller - config EDAC_R82600 tristate "Radisys 82600 embedded chipset" depends on EDAC_MM_EDAC && PCI && X86_32 diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile index 512d3d9b8..93137fdab 100644 --- a/drivers/edac/Makefile +++ b/drivers/edac/Makefile @@ -14,6 +14,5 @@ obj-$(CONFIG_EDAC_E7XXX) += e7xxx_edac.o obj-$(CONFIG_EDAC_E752X) += e752x_edac.o obj-$(CONFIG_EDAC_I82875P) += i82875p_edac.o obj-$(CONFIG_EDAC_I82860) += i82860_edac.o -obj-$(CONFIG_EDAC_K8) += k8_edac.o obj-$(CONFIG_EDAC_R82600) += r82600_edac.o diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index f79f6b587..53423ad6d 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include @@ -19,9 +20,6 @@ #include #include "edac_mc.h" -#define AMD76X_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "amd76x_edac" - #define amd76x_printk(level, fmt, arg...) \ edac_printk(level, "amd76x", fmt, ##arg) @@ -104,18 +102,15 @@ static const struct amd76x_dev_info amd76x_devs[] = { static void amd76x_get_error_info(struct mem_ctl_info *mci, struct amd76x_error_info *info) { - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS, + pci_read_config_dword(mci->pdev, AMD76X_ECC_MODE_STATUS, &info->ecc_mode_status); if (info->ecc_mode_status & BIT(8)) - pci_write_bits32(pdev, AMD76X_ECC_MODE_STATUS, + pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, (u32) BIT(8), (u32) BIT(8)); if (info->ecc_mode_status & BIT(9)) - pci_write_bits32(pdev, AMD76X_ECC_MODE_STATUS, + pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, (u32) BIT(9), (u32) BIT(9)); } @@ -181,38 +176,6 @@ static void amd76x_check(struct mem_ctl_info *mci) amd76x_process_error_info(mci, &info, 1); } -static void amd76x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, - enum edac_type edac_mode) -{ - struct csrow_info *csrow; - u32 mba, mba_base, mba_mask, dms; - int index; - - for (index = 0; index < mci->nr_csrows; index++) { - csrow = &mci->csrows[index]; - - /* find the DRAM Chip Select Base address and mask */ - pci_read_config_dword(pdev, - AMD76X_MEM_BASE_ADDR + (index * 4), - &mba); - - if (!(mba & BIT(0))) - continue; - - mba_base = mba & 0xff800000UL; - mba_mask = ((mba & 0xff80) << 16) | 0x7fffffUL; - pci_read_config_dword(pdev, AMD76X_DRAM_MODE_STATUS, &dms); - csrow->first_page = mba_base >> PAGE_SHIFT; - csrow->nr_pages = (mba_mask + 1) >> PAGE_SHIFT; - csrow->last_page = csrow->first_page + csrow->nr_pages - 1; - csrow->page_mask = mba_mask >> PAGE_SHIFT; - csrow->grain = csrow->nr_pages << PAGE_SHIFT; - csrow->mtype = MEM_RDDR; - csrow->dtype = ((dms >> index) & 0x1) ? DEV_X4 : DEV_UNKNOWN; - csrow->edac_mode = edac_mode; - } -} - /** * amd76x_probe1 - Perform set up for detected device * @pdev; PCI device detected @@ -224,13 +187,15 @@ static void amd76x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, */ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) { - static const enum edac_type ems_modes[] = { + int rc = -ENODEV; + int index; + struct mem_ctl_info *mci = NULL; + enum edac_type ems_modes[] = { EDAC_NONE, EDAC_EC, EDAC_SECDED, EDAC_SECDED }; - struct mem_ctl_info *mci = NULL; u32 ems; u32 ems_mode; struct amd76x_error_info discard; @@ -241,28 +206,53 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) mci = edac_mc_alloc(0, AMD76X_NR_CSROWS, AMD76X_NR_CHANS); if (mci == NULL) { - return -ENOMEM; + rc = -ENOMEM; + goto fail; } debugf0("%s(): mci = %p\n", __func__, mci); - mci->dev = &pdev->dev; + mci->pdev = pdev; mci->mtype_cap = MEM_FLAG_RDDR; mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; mci->edac_cap = ems_mode ? (EDAC_FLAG_EC | EDAC_FLAG_SECDED) : EDAC_FLAG_NONE; mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = AMD76X_REVISION; + mci->mod_ver = "$Revision: 1.4.2.5 $"; mci->ctl_name = amd76x_devs[dev_idx].ctl_name; mci->edac_check = amd76x_check; mci->ctl_page_to_phys = NULL; - amd76x_init_csrows(mci, pdev, ems_modes[ems_mode]); + for (index = 0; index < mci->nr_csrows; index++) { + struct csrow_info *csrow = &mci->csrows[index]; + u32 mba; + u32 mba_base; + u32 mba_mask; + u32 dms; + + /* find the DRAM Chip Select Base address and mask */ + pci_read_config_dword(mci->pdev, + AMD76X_MEM_BASE_ADDR + (index * 4), &mba); + + if (!(mba & BIT(0))) + continue; + + mba_base = mba & 0xff800000UL; + mba_mask = ((mba & 0xff80) << 16) | 0x7fffffUL; + pci_read_config_dword(mci->pdev, AMD76X_DRAM_MODE_STATUS, + &dms); + csrow->first_page = mba_base >> PAGE_SHIFT; + csrow->nr_pages = (mba_mask + 1) >> PAGE_SHIFT; + csrow->last_page = csrow->first_page + csrow->nr_pages - 1; + csrow->page_mask = mba_mask >> PAGE_SHIFT; + csrow->grain = csrow->nr_pages << PAGE_SHIFT; + csrow->mtype = MEM_RDDR; + csrow->dtype = ((dms >> index) & 0x1) ? DEV_X4 : DEV_UNKNOWN; + csrow->edac_mode = ems_modes[ems_mode]; + } + amd76x_get_error_info(mci, &discard); /* clear counters */ - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. - */ - if (edac_mc_add_mc(mci,0)) { + if (edac_mc_add_mc(mci)) { debugf3("%s(): failed edac_mc_add_mc()\n", __func__); goto fail; } @@ -272,8 +262,9 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) return 0; fail: - edac_mc_free(mci); - return -ENODEV; + if (mci != NULL) + edac_mc_free(mci); + return rc; } /* returns count (>= 0), or negative on error */ @@ -300,7 +291,7 @@ static void __devexit amd76x_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; edac_mc_free(mci); diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index c82bc0ed7..fce31936e 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -24,9 +25,6 @@ #include #include "edac_mc.h" -#define E752X_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "e752x_edac" - static int force_function_unhide; #define e752x_printk(level, fmt, arg...) \ @@ -765,174 +763,22 @@ static void e752x_check(struct mem_ctl_info *mci) e752x_process_error_info(mci, &info, 1); } -/* Return 1 if dual channel mode is active. Else return 0. */ -static inline int dual_channel_active(u16 ddrcsr) -{ - return (((ddrcsr >> 12) & 3) == 3); -} - -static void e752x_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, - u16 ddrcsr) -{ - struct csrow_info *csrow; - unsigned long last_cumul_size; - int index, mem_dev, drc_chan; - int drc_drbg; /* DRB granularity 0=64mb, 1=128mb */ - int drc_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */ - u8 value; - u32 dra, drc, cumul_size; - - pci_read_config_dword(pdev, E752X_DRA, &dra); - pci_read_config_dword(pdev, E752X_DRC, &drc); - drc_chan = dual_channel_active(ddrcsr); - drc_drbg = drc_chan + 1; /* 128 in dual mode, 64 in single */ - drc_ddim = (drc >> 20) & 0x3; - - /* The dram row boundary (DRB) reg values are boundary address for - * each DRAM row with a granularity of 64 or 128MB (single/dual - * channel operation). DRB regs are cumulative; therefore DRB7 will - * contain the total memory contained in all eight rows. - */ - for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { - /* mem_dev 0=x8, 1=x4 */ - mem_dev = (dra >> (index * 4 + 2)) & 0x3; - csrow = &mci->csrows[index]; - - mem_dev = (mem_dev == 2); - pci_read_config_byte(pdev, E752X_DRB + index, &value); - /* convert a 128 or 64 MiB DRB to a page size. */ - cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); - debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, - cumul_size); - if (cumul_size == last_cumul_size) - continue; /* not populated */ - - csrow->first_page = last_cumul_size; - csrow->last_page = cumul_size - 1; - csrow->nr_pages = cumul_size - last_cumul_size; - last_cumul_size = cumul_size; - csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ - csrow->mtype = MEM_RDDR; /* only one type supported */ - csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; - - /* - * if single channel or x8 devices then SECDED - * if dual channel and x4 then S4ECD4ED - */ - if (drc_ddim) { - if (drc_chan && mem_dev) { - csrow->edac_mode = EDAC_S4ECD4ED; - mci->edac_cap |= EDAC_FLAG_S4ECD4ED; - } else { - csrow->edac_mode = EDAC_SECDED; - mci->edac_cap |= EDAC_FLAG_SECDED; - } - } else - csrow->edac_mode = EDAC_NONE; - } -} - -static void e752x_init_mem_map_table(struct pci_dev *pdev, - struct e752x_pvt *pvt) -{ - int index; - u8 value, last, row, stat8; - - last = 0; - row = 0; - - for (index = 0; index < 8; index += 2) { - pci_read_config_byte(pdev, E752X_DRB + index, &value); - /* test if there is a dimm in this slot */ - if (value == last) { - /* no dimm in the slot, so flag it as empty */ - pvt->map[index] = 0xff; - pvt->map[index + 1] = 0xff; - } else { /* there is a dimm in the slot */ - pvt->map[index] = row; - row++; - last = value; - /* test the next value to see if the dimm is double - * sided - */ - pci_read_config_byte(pdev, E752X_DRB + index + 1, - &value); - pvt->map[index + 1] = (value == last) ? - 0xff : /* the dimm is single sided, - so flag as empty */ - row; /* this is a double sided dimm - to save the next row # */ - row++; - last = value; - } - } - - /* set the map type. 1 = normal, 0 = reversed */ - pci_read_config_byte(pdev, E752X_DRM, &stat8); - pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f)); -} - -/* Return 0 on success or 1 on failure. */ -static int e752x_get_devs(struct pci_dev *pdev, int dev_idx, - struct e752x_pvt *pvt) -{ - struct pci_dev *dev; - - pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, - pvt->dev_info->err_dev, - pvt->bridge_ck); - - if (pvt->bridge_ck == NULL) - pvt->bridge_ck = pci_scan_single_device(pdev->bus, - PCI_DEVFN(0, 1)); - - if (pvt->bridge_ck == NULL) { - e752x_printk(KERN_ERR, "error reporting device not found:" - "vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev); - return 1; - } - - dev = pci_get_device(PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].ctl_dev, - NULL); - - if (dev == NULL) - goto fail; - - pvt->dev_d0f0 = dev; - pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck); - - return 0; - -fail: - pci_dev_put(pvt->bridge_ck); - return 1; -} - -static void e752x_init_error_reporting_regs(struct e752x_pvt *pvt) -{ - struct pci_dev *dev; - - dev = pvt->dev_d0f1; - /* Turn off error disable & SMI in case the BIOS turned it on */ - pci_write_config_byte(dev, E752X_HI_ERRMASK, 0x00); - pci_write_config_byte(dev, E752X_HI_SMICMD, 0x00); - pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x00); - pci_write_config_word(dev, E752X_SYSBUS_SMICMD, 0x00); - pci_write_config_byte(dev, E752X_BUF_ERRMASK, 0x00); - pci_write_config_byte(dev, E752X_BUF_SMICMD, 0x00); - pci_write_config_byte(dev, E752X_DRAM_ERRMASK, 0x00); - pci_write_config_byte(dev, E752X_DRAM_SMICMD, 0x00); -} - static int e752x_probe1(struct pci_dev *pdev, int dev_idx) { + int rc = -ENODEV; + int index; u16 pci_data; u8 stat8; - struct mem_ctl_info *mci; - struct e752x_pvt *pvt; + struct mem_ctl_info *mci = NULL; + struct e752x_pvt *pvt = NULL; u16 ddrcsr; + u32 drc; int drc_chan; /* Number of channels 0=1chan,1=2chan */ + int drc_drbg; /* DRB granularity 0=64mb, 1=128mb */ + int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ + u32 dra; + unsigned long last_cumul_size; + struct pci_dev *dev = NULL; struct e752x_error_info discard; debugf0("%s(): mci\n", __func__); @@ -946,20 +792,25 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) if (!force_function_unhide && !(stat8 & (1 << 5))) { printk(KERN_INFO "Contact your BIOS vendor to see if the " "E752x error registers can be safely un-hidden\n"); - return -ENOMEM; + goto fail; } stat8 |= (1 << 5); pci_write_config_byte(pdev, E752X_DEVPRES1, stat8); + /* need to find out the number of channels */ + pci_read_config_dword(pdev, E752X_DRC, &drc); pci_read_config_word(pdev, E752X_DDRCSR, &ddrcsr); /* FIXME: should check >>12 or 0xf, true for all? */ /* Dual channel = 1, Single channel = 0 */ - drc_chan = dual_channel_active(ddrcsr); + drc_chan = (((ddrcsr >> 12) & 3) == 3); + drc_drbg = drc_chan + 1; /* 128 in dual mode, 64 in single */ + drc_ddim = (drc >> 20) & 0x3; mci = edac_mc_alloc(sizeof(*pvt), E752X_NR_CSROWS, drc_chan + 1); if (mci == NULL) { - return -ENOMEM; + rc = -ENOMEM; + goto fail; } debugf3("%s(): init mci\n", __func__); @@ -968,54 +819,159 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) EDAC_FLAG_S4ECD4ED; /* FIXME - what if different memory types are in different csrows? */ mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = E752X_REVISION; - mci->dev = &pdev->dev; + mci->mod_ver = "$Revision: 1.5.2.11 $"; + mci->pdev = pdev; debugf3("%s(): init pvt\n", __func__); pvt = (struct e752x_pvt *) mci->pvt_info; pvt->dev_info = &e752x_devs[dev_idx]; - pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); + pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, + pvt->dev_info->err_dev, + pvt->bridge_ck); - if (e752x_get_devs(pdev, dev_idx, pvt)) { - edac_mc_free(mci); - return -ENODEV; + if (pvt->bridge_ck == NULL) + pvt->bridge_ck = pci_scan_single_device(pdev->bus, + PCI_DEVFN(0, 1)); + + if (pvt->bridge_ck == NULL) { + e752x_printk(KERN_ERR, "error reporting device not found:" + "vendor %x device 0x%x (broken BIOS?)\n", + PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev); + goto fail; } + pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); debugf3("%s(): more mci init\n", __func__); mci->ctl_name = pvt->dev_info->ctl_name; mci->edac_check = e752x_check; mci->ctl_page_to_phys = ctl_page_to_phys; - e752x_init_csrows(mci, pdev, ddrcsr); - e752x_init_mem_map_table(pdev, pvt); + /* find out the device types */ + pci_read_config_dword(pdev, E752X_DRA, &dra); + + /* + * The dram row boundary (DRB) reg values are boundary address for + * each DRAM row with a granularity of 64 or 128MB (single/dual + * channel operation). DRB regs are cumulative; therefore DRB7 will + * contain the total memory contained in all eight rows. + */ + for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { + u8 value; + u32 cumul_size; + + /* mem_dev 0=x8, 1=x4 */ + int mem_dev = (dra >> (index * 4 + 2)) & 0x3; + struct csrow_info *csrow = &mci->csrows[index]; + + mem_dev = (mem_dev == 2); + pci_read_config_byte(mci->pdev, E752X_DRB + index, &value); + /* convert a 128 or 64 MiB DRB to a page size. */ + cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); + debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, + cumul_size); + + if (cumul_size == last_cumul_size) + continue; /* not populated */ + + csrow->first_page = last_cumul_size; + csrow->last_page = cumul_size - 1; + csrow->nr_pages = cumul_size - last_cumul_size; + last_cumul_size = cumul_size; + csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ + csrow->mtype = MEM_RDDR; /* only one type supported */ + csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; + + /* + * if single channel or x8 devices then SECDED + * if dual channel and x4 then S4ECD4ED + */ + if (drc_ddim) { + if (drc_chan && mem_dev) { + csrow->edac_mode = EDAC_S4ECD4ED; + mci->edac_cap |= EDAC_FLAG_S4ECD4ED; + } else { + csrow->edac_mode = EDAC_SECDED; + mci->edac_cap |= EDAC_FLAG_SECDED; + } + } else + csrow->edac_mode = EDAC_NONE; + } + + /* Fill in the memory map table */ + { + u8 value; + u8 last = 0; + u8 row = 0; + + for (index = 0; index < 8; index += 2) { + pci_read_config_byte(mci->pdev, E752X_DRB + index, + &value); + + /* test if there is a dimm in this slot */ + if (value == last) { + /* no dimm in the slot, so flag it as empty */ + pvt->map[index] = 0xff; + pvt->map[index + 1] = 0xff; + } else { /* there is a dimm in the slot */ + pvt->map[index] = row; + row++; + last = value; + /* test the next value to see if the dimm is + double sided */ + pci_read_config_byte(mci->pdev, + E752X_DRB + index + 1, + &value); + pvt->map[index + 1] = (value == last) ? + 0xff : /* the dimm is single sided, + * so flag as empty + */ + row; /* this is a double sided dimm + * to save the next row # + */ + row++; + last = value; + } + } + } /* set the map type. 1 = normal, 0 = reversed */ - pci_read_config_byte(pdev, E752X_DRM, &stat8); + pci_read_config_byte(mci->pdev, E752X_DRM, &stat8); pvt->map_type = ((stat8 & 0x0f) > ((stat8 >> 4) & 0x0f)); mci->edac_cap |= EDAC_FLAG_NONE; debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); /* load the top of low memory, remap base, and remap limit vars */ - pci_read_config_word(pdev, E752X_TOLM, &pci_data); + pci_read_config_word(mci->pdev, E752X_TOLM, &pci_data); pvt->tolm = ((u32) pci_data) << 4; - pci_read_config_word(pdev, E752X_REMAPBASE, &pci_data); + pci_read_config_word(mci->pdev, E752X_REMAPBASE, &pci_data); pvt->remapbase = ((u32) pci_data) << 14; - pci_read_config_word(pdev, E752X_REMAPLIMIT, &pci_data); + pci_read_config_word(mci->pdev, E752X_REMAPLIMIT, &pci_data); pvt->remaplimit = ((u32) pci_data) << 14; e752x_printk(KERN_INFO, "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, pvt->remapbase, pvt->remaplimit); - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. - */ - if (edac_mc_add_mc(mci,0)) { + if (edac_mc_add_mc(mci)) { debugf3("%s(): failed edac_mc_add_mc()\n", __func__); goto fail; } - e752x_init_error_reporting_regs(pvt); + dev = pci_get_device(PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].ctl_dev, + NULL); + pvt->dev_d0f0 = dev; + /* find the error reporting device and clear errors */ + dev = pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck); + /* Turn off error disable & SMI in case the BIOS turned it on */ + pci_write_config_byte(dev, E752X_HI_ERRMASK, 0x00); + pci_write_config_byte(dev, E752X_HI_SMICMD, 0x00); + pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x00); + pci_write_config_word(dev, E752X_SYSBUS_SMICMD, 0x00); + pci_write_config_byte(dev, E752X_BUF_ERRMASK, 0x00); + pci_write_config_byte(dev, E752X_BUF_SMICMD, 0x00); + pci_write_config_byte(dev, E752X_DRAM_ERRMASK, 0x00); + pci_write_config_byte(dev, E752X_DRAM_SMICMD, 0x00); + e752x_get_error_info(mci, &discard); /* clear other MCH errors */ /* get this far and it's successful */ @@ -1023,12 +979,20 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx) return 0; fail: - pci_dev_put(pvt->dev_d0f0); - pci_dev_put(pvt->dev_d0f1); - pci_dev_put(pvt->bridge_ck); - edac_mc_free(mci); + if (mci) { + if (pvt->dev_d0f0) + pci_dev_put(pvt->dev_d0f0); + + if (pvt->dev_d0f1) + pci_dev_put(pvt->dev_d0f1); + + if (pvt->bridge_ck) + pci_dev_put(pvt->bridge_ck); + + edac_mc_free(mci); + } - return -ENODEV; + return rc; } /* returns count (>= 0), or negative on error */ @@ -1051,7 +1015,7 @@ static void __devexit e752x_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; pvt = (struct e752x_pvt *) mci->pvt_info; diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 310d91b41..a9518d3e4 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c @@ -22,6 +22,7 @@ * */ +#include #include #include #include @@ -29,9 +30,6 @@ #include #include "edac_mc.h" -#define E7XXX_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "e7xxx_edac" - #define e7xxx_printk(level, fmt, arg...) \ edac_printk(level, "e7xxx", fmt, ##arg) @@ -335,61 +333,99 @@ static void e7xxx_check(struct mem_ctl_info *mci) e7xxx_process_error_info(mci, &info, 1); } -/* Return 1 if dual channel mode is active. Else return 0. */ -static inline int dual_channel_active(u32 drc, int dev_idx) +static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) { - return (dev_idx == E7501) ? ((drc >> 22) & 0x1) : 1; -} + int rc = -ENODEV; + int index; + u16 pci_data; + struct mem_ctl_info *mci = NULL; + struct e7xxx_pvt *pvt = NULL; + u32 drc; + int drc_chan = 1; /* Number of channels 0=1chan,1=2chan */ + int drc_drbg = 1; /* DRB granularity 0=32mb,1=64mb */ + int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ + u32 dra; + unsigned long last_cumul_size; + struct e7xxx_error_info discard; + debugf0("%s(): mci\n", __func__); + + /* need to find out the number of channels */ + pci_read_config_dword(pdev, E7XXX_DRC, &drc); -/* Return DRB granularity (0=32mb, 1=64mb). */ -static inline int drb_granularity(u32 drc, int dev_idx) -{ /* only e7501 can be single channel */ - return (dev_idx == E7501) ? ((drc >> 18) & 0x3) : 1; -} + if (dev_idx == E7501) { + drc_chan = ((drc >> 22) & 0x1); + drc_drbg = (drc >> 18) & 0x3; + } + + drc_ddim = (drc >> 20) & 0x3; + mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); + if (mci == NULL) { + rc = -ENOMEM; + goto fail; + } -static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, - int dev_idx, u32 drc) -{ - unsigned long last_cumul_size; - int index; - u8 value; - u32 dra, cumul_size; - int drc_chan, drc_drbg, drc_ddim, mem_dev; - struct csrow_info *csrow; + debugf3("%s(): init mci\n", __func__); + mci->mtype_cap = MEM_FLAG_RDDR; + mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | + EDAC_FLAG_S4ECD4ED; + /* FIXME - what if different memory types are in different csrows? */ + mci->mod_name = EDAC_MOD_STR; + mci->mod_ver = "$Revision: 1.5.2.9 $"; + mci->pdev = pdev; + + debugf3("%s(): init pvt\n", __func__); + pvt = (struct e7xxx_pvt *) mci->pvt_info; + pvt->dev_info = &e7xxx_devs[dev_idx]; + pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, + pvt->dev_info->err_dev, + pvt->bridge_ck); + + if (!pvt->bridge_ck) { + e7xxx_printk(KERN_ERR, "error reporting device not found:" + "vendor %x device 0x%x (broken BIOS?)\n", + PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev); + goto fail; + } + + debugf3("%s(): more mci init\n", __func__); + mci->ctl_name = pvt->dev_info->ctl_name; + mci->edac_check = e7xxx_check; + mci->ctl_page_to_phys = ctl_page_to_phys; + /* find out the device types */ pci_read_config_dword(pdev, E7XXX_DRA, &dra); - drc_chan = dual_channel_active(drc, dev_idx); - drc_drbg = drb_granularity(drc, dev_idx); - drc_ddim = (drc >> 20) & 0x3; - last_cumul_size = 0; - /* The dram row boundary (DRB) reg values are boundary address + /* + * The dram row boundary (DRB) reg values are boundary address * for each DRAM row with a granularity of 32 or 64MB (single/dual * channel operation). DRB regs are cumulative; therefore DRB7 will * contain the total memory contained in all eight rows. */ - for (index = 0; index < mci->nr_csrows; index++) { + for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { + u8 value; + u32 cumul_size; /* mem_dev 0=x8, 1=x4 */ - mem_dev = (dra >> (index * 4 + 3)) & 0x1; - csrow = &mci->csrows[index]; + int mem_dev = (dra >> (index * 4 + 3)) & 0x1; + struct csrow_info *csrow = &mci->csrows[index]; - pci_read_config_byte(pdev, E7XXX_DRB + index, &value); + pci_read_config_byte(mci->pdev, E7XXX_DRB + index, &value); /* convert a 64 or 32 MiB DRB to a page size. */ cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, cumul_size); + if (cumul_size == last_cumul_size) - continue; /* not populated */ + continue; /* not populated */ csrow->first_page = last_cumul_size; csrow->last_page = cumul_size - 1; csrow->nr_pages = cumul_size - last_cumul_size; last_cumul_size = cumul_size; - csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ - csrow->mtype = MEM_RDDR; /* only one type supported */ + csrow->grain = 1 << 12; /* 4KiB - resolution of CELOG */ + csrow->mtype = MEM_RDDR; /* only one type supported */ csrow->dtype = mem_dev ? DEV_X4 : DEV_X8; /* @@ -407,61 +443,16 @@ static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, } else csrow->edac_mode = EDAC_NONE; } -} - -static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) -{ - u16 pci_data; - struct mem_ctl_info *mci = NULL; - struct e7xxx_pvt *pvt = NULL; - u32 drc; - int drc_chan; - struct e7xxx_error_info discard; - - debugf0("%s(): mci\n", __func__); - pci_read_config_dword(pdev, E7XXX_DRC, &drc); - - drc_chan = dual_channel_active(drc, dev_idx); - mci = edac_mc_alloc(sizeof(*pvt), E7XXX_NR_CSROWS, drc_chan + 1); - - if (mci == NULL) - return -ENOMEM; - - debugf3("%s(): init mci\n", __func__); - mci->mtype_cap = MEM_FLAG_RDDR; - mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | - EDAC_FLAG_S4ECD4ED; - /* FIXME - what if different memory types are in different csrows? */ - mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = E7XXX_REVISION; - mci->dev = &pdev->dev; - debugf3("%s(): init pvt\n", __func__); - pvt = (struct e7xxx_pvt *) mci->pvt_info; - pvt->dev_info = &e7xxx_devs[dev_idx]; - pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, - pvt->dev_info->err_dev, - pvt->bridge_ck); - - if (!pvt->bridge_ck) { - e7xxx_printk(KERN_ERR, "error reporting device not found:" - "vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_INTEL, e7xxx_devs[dev_idx].err_dev); - goto fail0; - } - debugf3("%s(): more mci init\n", __func__); - mci->ctl_name = pvt->dev_info->ctl_name; - mci->edac_check = e7xxx_check; - mci->ctl_page_to_phys = ctl_page_to_phys; - e7xxx_init_csrows(mci, pdev, dev_idx, drc); mci->edac_cap |= EDAC_FLAG_NONE; + debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); /* load the top of low memory, remap base, and remap limit vars */ - pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); + pci_read_config_word(mci->pdev, E7XXX_TOLM, &pci_data); pvt->tolm = ((u32) pci_data) << 4; - pci_read_config_word(pdev, E7XXX_REMAPBASE, &pci_data); + pci_read_config_word(mci->pdev, E7XXX_REMAPBASE, &pci_data); pvt->remapbase = ((u32) pci_data) << 14; - pci_read_config_word(pdev, E7XXX_REMAPLIMIT, &pci_data); + pci_read_config_word(mci->pdev, E7XXX_REMAPLIMIT, &pci_data); pvt->remaplimit = ((u32) pci_data) << 14; e7xxx_printk(KERN_INFO, "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, @@ -470,25 +461,23 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) /* clear any pending errors, or initial state bits */ e7xxx_get_error_info(mci, &discard); - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. - */ - if (edac_mc_add_mc(mci,0)) { + if (edac_mc_add_mc(mci) != 0) { debugf3("%s(): failed edac_mc_add_mc()\n", __func__); - goto fail1; + goto fail; } /* get this far and it's successful */ debugf3("%s(): success\n", __func__); return 0; -fail1: - pci_dev_put(pvt->bridge_ck); - -fail0: - edac_mc_free(mci); +fail: + if (mci != NULL) { + if(pvt != NULL && pvt->bridge_ck) + pci_dev_put(pvt->bridge_ck); + edac_mc_free(mci); + } - return -ENODEV; + return rc; } /* returns count (>= 0), or negative on error */ @@ -509,7 +498,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; pvt = (struct e7xxx_pvt *) mci->pvt_info; diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 98742e28c..ea06e3a4d 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c @@ -1,6 +1,6 @@ /* * edac_mc kernel module - * (C) 2005, 2006 Linux Networx (http://lnxi.com) + * (C) 2005 Linux Networx (http://lnxi.com) * This file may be distributed under the terms of the * GNU General Public License. * @@ -12,6 +12,7 @@ * */ +#include #include #include #include @@ -33,8 +34,13 @@ #include #include "edac_mc.h" -#define EDAC_MC_VERSION "Ver: 2.0.1 " __DATE__ +#define EDAC_MC_VERSION "Ver: 2.0.0 " __DATE__ +/* For now, disable the EDAC sysfs code. The sysfs interface that EDAC + * presents to user space needs more thought, and is likely to change + * substantially. + */ +#define DISABLE_EDAC_SYSFS #ifdef CONFIG_EDAC_DEBUG /* Values of 0 to 4 will generate output */ @@ -48,23 +54,35 @@ static int log_ce = 1; static int panic_on_ue; static int poll_msec = 1000; +static int check_pci_parity = 0; /* default YES check PCI parity */ +static int panic_on_pci_parity; /* default no panic on PCI Parity */ +static atomic_t pci_parity_count = ATOMIC_INIT(0); + /* lock to memory controller's control array */ static DECLARE_MUTEX(mem_ctls_mutex); static struct list_head mc_devices = LIST_HEAD_INIT(mc_devices); static struct task_struct *edac_thread; -#ifdef CONFIG_PCI -static int check_pci_parity = 0; /* default YES check PCI parity */ -static int panic_on_pci_parity; /* default no panic on PCI Parity */ -static atomic_t pci_parity_count = ATOMIC_INIT(0); +/* Structure of the whitelist and blacklist arrays */ +struct edac_pci_device_list { + unsigned int vendor; /* Vendor ID */ + unsigned int device; /* Deviice ID */ +}; -static struct kobject edac_pci_kobj; /* /sys/devices/system/edac/pci */ -static struct completion edac_pci_kobj_complete; -#endif /* CONFIG_PCI */ +#define MAX_LISTED_PCI_DEVICES 32 + +/* List of PCI devices (vendor-id:device-id) that should be skipped */ +static struct edac_pci_device_list pci_blacklist[MAX_LISTED_PCI_DEVICES]; +static int pci_blacklist_count; + +/* List of PCI devices (vendor-id:device-id) that should be scanned */ +static struct edac_pci_device_list pci_whitelist[MAX_LISTED_PCI_DEVICES]; +static int pci_whitelist_count ; /* START sysfs data and methods */ +#ifndef DISABLE_EDAC_SYSFS static const char *mem_types[] = { [MEM_EMPTY] = "Empty", @@ -109,24 +127,35 @@ static struct sysdev_class edac_class = { set_kset_name("edac"), }; -/* sysfs object: +/* sysfs objects: * /sys/devices/system/edac/mc + * /sys/devices/system/edac/pci */ static struct kobject edac_memctrl_kobj; +static struct kobject edac_pci_kobj; /* We use these to wait for the reference counts on edac_memctrl_kobj and * edac_pci_kobj to reach 0. */ static struct completion edac_memctrl_kobj_complete; +static struct completion edac_pci_kobj_complete; /* * /sys/devices/system/edac/mc; * data structures and methods */ +#if 0 +static ssize_t memctrl_string_show(void *ptr, char *buffer) +{ + char *value = (char*) ptr; + return sprintf(buffer, "%s\n", value); +} +#endif + static ssize_t memctrl_int_show(void *ptr, char *buffer) { int *value = (int*) ptr; - return sprintf(buffer, "%u\n", *value); + return sprintf(buffer, "%d\n", *value); } static ssize_t memctrl_int_store(void *ptr, const char *buffer, size_t count) @@ -192,6 +221,11 @@ struct memctrl_dev_attribute attr_##_name = { \ .store = _store, \ }; +/* cwrow attribute f*/ +#if 0 +MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL); +#endif + /* csrow control files */ MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); MEMCTRL_ATTR(log_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); @@ -220,6 +254,8 @@ static struct kobj_type ktype_memctrl = { .default_attrs = (struct attribute **) memctrl_attr, }; +#endif /* DISABLE_EDAC_SYSFS */ + /* Initialize the main sysfs entries for edac: * /sys/devices/system/edac * @@ -229,6 +265,11 @@ static struct kobj_type ktype_memctrl = { * !0 FAILURE */ static int edac_sysfs_memctrl_setup(void) +#ifdef DISABLE_EDAC_SYSFS +{ + return 0; +} +#else { int err=0; @@ -260,6 +301,7 @@ static int edac_sysfs_memctrl_setup(void) return err; } +#endif /* DISABLE_EDAC_SYSFS */ /* * MC teardown: @@ -267,6 +309,7 @@ static int edac_sysfs_memctrl_setup(void) */ static void edac_sysfs_memctrl_teardown(void) { +#ifndef DISABLE_EDAC_SYSFS debugf0("MC: " __FILE__ ": %s()\n", __func__); /* Unregister the MC's kobject and wait for reference count to reach @@ -278,9 +321,142 @@ static void edac_sysfs_memctrl_teardown(void) /* Unregister the 'edac' object */ sysdev_class_unregister(&edac_class); +#endif /* DISABLE_EDAC_SYSFS */ } -#ifdef CONFIG_PCI +#ifndef DISABLE_EDAC_SYSFS + +/* + * /sys/devices/system/edac/pci; + * data structures and methods + */ + +struct list_control { + struct edac_pci_device_list *list; + int *count; +}; + +#if 0 +/* Output the list as: vendor_id:device:id<,vendor_id:device_id> */ +static ssize_t edac_pci_list_string_show(void *ptr, char *buffer) +{ + struct list_control *listctl; + struct edac_pci_device_list *list; + char *p = buffer; + int len=0; + int i; + + listctl = ptr; + list = listctl->list; + + for (i = 0; i < *(listctl->count); i++, list++ ) { + if (len > 0) + len += snprintf(p + len, (PAGE_SIZE-len), ","); + + len += snprintf(p + len, + (PAGE_SIZE-len), + "%x:%x", + list->vendor,list->device); + } + + len += snprintf(p + len,(PAGE_SIZE-len), "\n"); + return (ssize_t) len; +} + +/** + * + * Scan string from **s to **e looking for one 'vendor:device' tuple + * where each field is a hex value + * + * return 0 if an entry is NOT found + * return 1 if an entry is found + * fill in *vendor_id and *device_id with values found + * + * In both cases, make sure *s has been moved forward toward *e + */ +static int parse_one_device(const char **s,const char **e, + unsigned int *vendor_id, unsigned int *device_id) +{ + const char *runner, *p; + + /* if null byte, we are done */ + if (!**s) { + (*s)++; /* keep *s moving */ + return 0; + } + + /* skip over newlines & whitespace */ + if ((**s == '\n') || isspace(**s)) { + (*s)++; + return 0; + } + + if (!isxdigit(**s)) { + (*s)++; + return 0; + } + + /* parse vendor_id */ + runner = *s; + + while (runner < *e) { + /* scan for vendor:device delimiter */ + if (*runner == ':') { + *vendor_id = simple_strtol((char*) *s, (char**) &p, 16); + runner = p + 1; + break; + } + + runner++; + } + + if (!isxdigit(*runner)) { + *s = ++runner; + return 0; + } + + /* parse device_id */ + if (runner < *e) { + *device_id = simple_strtol((char*)runner, (char**)&p, 16); + runner = p; + } + + *s = runner; + return 1; +} + +static ssize_t edac_pci_list_string_store(void *ptr, const char *buffer, + size_t count) +{ + struct list_control *listctl; + struct edac_pci_device_list *list; + unsigned int vendor_id, device_id; + const char *s, *e; + int *index; + + s = (char*)buffer; + e = s + count; + listctl = ptr; + list = listctl->list; + index = listctl->count; + *index = 0; + + while (*index < MAX_LISTED_PCI_DEVICES) { + if (parse_one_device(&s,&e,&vendor_id,&device_id)) { + list[ *index ].vendor = vendor_id; + list[ *index ].device = device_id; + (*index)++; + } + + /* check for all data consume */ + if (s >= e) + break; + } + + return count; +} + +#endif static ssize_t edac_pci_int_show(void *ptr, char *buffer) { int *value = ptr; @@ -348,6 +524,31 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \ .store = _store, \ }; +#if 0 +static struct list_control pci_whitelist_control = { + .list = pci_whitelist, + .count = &pci_whitelist_count +}; + +static struct list_control pci_blacklist_control = { + .list = pci_blacklist, + .count = &pci_blacklist_count +}; + +/* whitelist attribute */ +EDAC_PCI_STRING_ATTR(pci_parity_whitelist, + &pci_whitelist_control, + S_IRUGO|S_IWUSR, + edac_pci_list_string_show, + edac_pci_list_string_store); + +EDAC_PCI_STRING_ATTR(pci_parity_blacklist, + &pci_blacklist_control, + S_IRUGO|S_IWUSR, + edac_pci_list_string_show, + edac_pci_list_string_store); +#endif + /* PCI Parity control files */ EDAC_PCI_ATTR(check_pci_parity, S_IRUGO|S_IWUSR, edac_pci_int_show, edac_pci_int_store); @@ -376,11 +577,18 @@ static struct kobj_type ktype_edac_pci = { .default_attrs = (struct attribute **) edac_pci_attr, }; +#endif /* DISABLE_EDAC_SYSFS */ + /** * edac_sysfs_pci_setup() * */ static int edac_sysfs_pci_setup(void) +#ifdef DISABLE_EDAC_SYSFS +{ + return 0; +} +#else { int err; @@ -404,291 +612,146 @@ static int edac_sysfs_pci_setup(void) return err; } +#endif /* DISABLE_EDAC_SYSFS */ static void edac_sysfs_pci_teardown(void) { +#ifndef DISABLE_EDAC_SYSFS debugf0("%s()\n", __func__); init_completion(&edac_pci_kobj_complete); kobject_unregister(&edac_pci_kobj); wait_for_completion(&edac_pci_kobj_complete); +#endif } +#ifndef DISABLE_EDAC_SYSFS -static u16 get_pci_parity_status(struct pci_dev *dev, int secondary) -{ - int where; - u16 status; +/* EDAC sysfs CSROW data structures and methods */ - where = secondary ? PCI_SEC_STATUS : PCI_STATUS; - pci_read_config_word(dev, where, &status); - - /* If we get back 0xFFFF then we must suspect that the card has been - * pulled but the Linux PCI layer has not yet finished cleaning up. - * We don't want to report on such devices - */ - - if (status == 0xFFFF) { - u32 sanity; - - pci_read_config_dword(dev, 0, &sanity); +/* Set of more detailed csrow attribute show/store functions */ +static ssize_t csrow_ch0_dimm_label_show(struct csrow_info *csrow, char *data) +{ + ssize_t size = 0; - if (sanity == 0xFFFFFFFF) - return 0; + if (csrow->nr_channels > 0) { + size = snprintf(data, EDAC_MC_LABEL_LEN,"%s\n", + csrow->channels[0].label); } - status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR | - PCI_STATUS_PARITY; - - if (status) - /* reset only the bits we are interested in */ - pci_write_config_word(dev, where, status); - - return status; + return size; } -typedef void (*pci_parity_check_fn_t) (struct pci_dev *dev); - -/* Clear any PCI parity errors logged by this device. */ -static void edac_pci_dev_parity_clear(struct pci_dev *dev) +static ssize_t csrow_ch1_dimm_label_show(struct csrow_info *csrow, char *data) { - u8 header_type; + ssize_t size = 0; - get_pci_parity_status(dev, 0); - - /* read the device TYPE, looking for bridges */ - pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); + if (csrow->nr_channels > 0) { + size = snprintf(data, EDAC_MC_LABEL_LEN, "%s\n", + csrow->channels[1].label); + } - if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) - get_pci_parity_status(dev, 1); + return size; } -/* - * PCI Parity polling - * - */ -static void edac_pci_dev_parity_test(struct pci_dev *dev) +static ssize_t csrow_ch0_dimm_label_store(struct csrow_info *csrow, + const char *data, size_t size) { - u16 status; - u8 header_type; - - /* read the STATUS register on this device - */ - status = get_pci_parity_status(dev, 0); - - debugf2("PCI STATUS= 0x%04x %s\n", status, dev->dev.bus_id ); - - /* check the status reg for errors */ - if (status) { - if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) - edac_printk(KERN_CRIT, EDAC_PCI, - "Signaled System Error on %s\n", - pci_name(dev)); - - if (status & (PCI_STATUS_PARITY)) { - edac_printk(KERN_CRIT, EDAC_PCI, - "Master Data Parity Error on %s\n", - pci_name(dev)); - - atomic_inc(&pci_parity_count); - } - - if (status & (PCI_STATUS_DETECTED_PARITY)) { - edac_printk(KERN_CRIT, EDAC_PCI, - "Detected Parity Error on %s\n", - pci_name(dev)); + ssize_t max_size = 0; - atomic_inc(&pci_parity_count); - } + if (csrow->nr_channels > 0) { + max_size = min((ssize_t)size,(ssize_t)EDAC_MC_LABEL_LEN-1); + strncpy(csrow->channels[0].label, data, max_size); + csrow->channels[0].label[max_size] = '\0'; } - /* read the device TYPE, looking for bridges */ - pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); - - debugf2("PCI HEADER TYPE= 0x%02x %s\n", header_type, dev->dev.bus_id ); - - if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { - /* On bridges, need to examine secondary status register */ - status = get_pci_parity_status(dev, 1); - - debugf2("PCI SEC_STATUS= 0x%04x %s\n", - status, dev->dev.bus_id ); - - /* check the secondary status reg for errors */ - if (status) { - if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) - edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " - "Signaled System Error on %s\n", - pci_name(dev)); - - if (status & (PCI_STATUS_PARITY)) { - edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " - "Master Data Parity Error on " - "%s\n", pci_name(dev)); - - atomic_inc(&pci_parity_count); - } - - if (status & (PCI_STATUS_DETECTED_PARITY)) { - edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " - "Detected Parity Error on %s\n", - pci_name(dev)); - - atomic_inc(&pci_parity_count); - } - } - } + return size; } -/* - * pci_dev parity list iterator - * Scan the PCI device list for one iteration, looking for SERRORs - * Master Parity ERRORS or Parity ERRORs on primary or secondary devices - */ -static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn) +static ssize_t csrow_ch1_dimm_label_store(struct csrow_info *csrow, + const char *data, size_t size) { - struct pci_dev *dev = NULL; + ssize_t max_size = 0; - /* request for kernel access to the next PCI device, if any, - * and while we are looking at it have its reference count - * bumped until we are done with it - */ - while((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { - fn(dev); + if (csrow->nr_channels > 1) { + max_size = min((ssize_t)size,(ssize_t)EDAC_MC_LABEL_LEN-1); + strncpy(csrow->channels[1].label, data, max_size); + csrow->channels[1].label[max_size] = '\0'; } + + return max_size; } -static void do_pci_parity_check(void) +static ssize_t csrow_ue_count_show(struct csrow_info *csrow, char *data) { - unsigned long flags; - int before_count; - - debugf3("%s()\n", __func__); - - if (!check_pci_parity) - return; - - before_count = atomic_read(&pci_parity_count); - - /* scan all PCI devices looking for a Parity Error on devices and - * bridges - */ - local_irq_save(flags); - edac_pci_dev_parity_iterator(edac_pci_dev_parity_test); - local_irq_restore(flags); - - /* Only if operator has selected panic on PCI Error */ - if (panic_on_pci_parity) { - /* If the count is different 'after' from 'before' */ - if (before_count != atomic_read(&pci_parity_count)) - panic("EDAC: PCI Parity Error"); - } + return sprintf(data,"%u\n", csrow->ue_count); } -static inline void clear_pci_parity_errors(void) +static ssize_t csrow_ce_count_show(struct csrow_info *csrow, char *data) { - /* Clear any PCI bus parity errors that devices initially have logged - * in their registers. - */ - edac_pci_dev_parity_iterator(edac_pci_dev_parity_clear); + return sprintf(data,"%u\n", csrow->ce_count); } -#else /* CONFIG_PCI */ - -/* pre-process these away */ -#define do_pci_parity_check() -#define clear_pci_parity_errors() -#define edac_sysfs_pci_teardown() -#define edac_sysfs_pci_setup() (0) - -#endif /* CONFIG_PCI */ +static ssize_t csrow_ch0_ce_count_show(struct csrow_info *csrow, char *data) +{ + ssize_t size = 0; -/* EDAC sysfs CSROW data structures and methods - */ + if (csrow->nr_channels > 0) { + size = sprintf(data,"%u\n", csrow->channels[0].ce_count); + } -/* Set of more default csrow attribute show/store functions */ -static ssize_t csrow_ue_count_show(struct csrow_info *csrow, char *data, int private) -{ - return sprintf(data,"%u\n", csrow->ue_count); + return size; } -static ssize_t csrow_ce_count_show(struct csrow_info *csrow, char *data, int private) +static ssize_t csrow_ch1_ce_count_show(struct csrow_info *csrow, char *data) { - return sprintf(data,"%u\n", csrow->ce_count); + ssize_t size = 0; + + if (csrow->nr_channels > 1) { + size = sprintf(data,"%u\n", csrow->channels[1].ce_count); + } + + return size; } -static ssize_t csrow_size_show(struct csrow_info *csrow, char *data, int private) +static ssize_t csrow_size_show(struct csrow_info *csrow, char *data) { return sprintf(data,"%u\n", PAGES_TO_MiB(csrow->nr_pages)); } -static ssize_t csrow_mem_type_show(struct csrow_info *csrow, char *data, int private) +static ssize_t csrow_mem_type_show(struct csrow_info *csrow, char *data) { return sprintf(data,"%s\n", mem_types[csrow->mtype]); } -static ssize_t csrow_dev_type_show(struct csrow_info *csrow, char *data, int private) +static ssize_t csrow_dev_type_show(struct csrow_info *csrow, char *data) { return sprintf(data,"%s\n", dev_types[csrow->dtype]); } -static ssize_t csrow_edac_mode_show(struct csrow_info *csrow, char *data, int private) +static ssize_t csrow_edac_mode_show(struct csrow_info *csrow, char *data) { return sprintf(data,"%s\n", edac_caps[csrow->edac_mode]); } -/* show/store functions for DIMM Label attributes */ -static ssize_t channel_dimm_label_show(struct csrow_info *csrow, - char *data, int channel) -{ - return snprintf(data, EDAC_MC_LABEL_LEN,"%s", - csrow->channels[channel].label); -} - -static ssize_t channel_dimm_label_store(struct csrow_info *csrow, - const char *data, - size_t count, - int channel) -{ - ssize_t max_size = 0; - - max_size = min((ssize_t)count,(ssize_t)EDAC_MC_LABEL_LEN-1); - strncpy(csrow->channels[channel].label, data, max_size); - csrow->channels[channel].label[max_size] = '\0'; - - return max_size; -} - -/* show function for dynamic chX_ce_count attribute */ -static ssize_t channel_ce_count_show(struct csrow_info *csrow, - char *data, - int channel) -{ - return sprintf(data, "%u\n", csrow->channels[channel].ce_count); -} - -/* csrow specific attribute structure */ struct csrowdev_attribute { struct attribute attr; - ssize_t (*show)(struct csrow_info *,char *,int); - ssize_t (*store)(struct csrow_info *, const char *,size_t,int); - int private; + ssize_t (*show)(struct csrow_info *,char *); + ssize_t (*store)(struct csrow_info *, const char *,size_t); }; #define to_csrow(k) container_of(k, struct csrow_info, kobj) #define to_csrowdev_attr(a) container_of(a, struct csrowdev_attribute, attr) -/* Set of show/store higher level functions for default csrow attributes */ -static ssize_t csrowdev_show(struct kobject *kobj, - struct attribute *attr, - char *buffer) +/* Set of show/store higher level functions for csrow objects */ +static ssize_t csrowdev_show(struct kobject *kobj, struct attribute *attr, + char *buffer) { struct csrow_info *csrow = to_csrow(kobj); struct csrowdev_attribute *csrowdev_attr = to_csrowdev_attr(attr); if (csrowdev_attr->show) - return csrowdev_attr->show(csrow, - buffer, - csrowdev_attr->private); + return csrowdev_attr->show(csrow, buffer); + return -EIO; } @@ -699,10 +762,8 @@ static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr, struct csrowdev_attribute * csrowdev_attr = to_csrowdev_attr(attr); if (csrowdev_attr->store) - return csrowdev_attr->store(csrow, - buffer, - count, - csrowdev_attr->private); + return csrowdev_attr->store(csrow, buffer, count); + return -EIO; } @@ -711,157 +772,69 @@ static struct sysfs_ops csrowfs_ops = { .store = csrowdev_store }; -#define CSROWDEV_ATTR(_name,_mode,_show,_store,_private) \ +#define CSROWDEV_ATTR(_name,_mode,_show,_store) \ struct csrowdev_attribute attr_##_name = { \ .attr = {.name = __stringify(_name), .mode = _mode }, \ .show = _show, \ .store = _store, \ - .private = _private, \ }; -/* default cwrow/attribute files */ -CSROWDEV_ATTR(size_mb,S_IRUGO,csrow_size_show,NULL,0); -CSROWDEV_ATTR(dev_type,S_IRUGO,csrow_dev_type_show,NULL,0); -CSROWDEV_ATTR(mem_type,S_IRUGO,csrow_mem_type_show,NULL,0); -CSROWDEV_ATTR(edac_mode,S_IRUGO,csrow_edac_mode_show,NULL,0); -CSROWDEV_ATTR(ue_count,S_IRUGO,csrow_ue_count_show,NULL,0); -CSROWDEV_ATTR(ce_count,S_IRUGO,csrow_ce_count_show,NULL,0); +/* cwrow/attribute files */ +CSROWDEV_ATTR(size_mb,S_IRUGO,csrow_size_show,NULL); +CSROWDEV_ATTR(dev_type,S_IRUGO,csrow_dev_type_show,NULL); +CSROWDEV_ATTR(mem_type,S_IRUGO,csrow_mem_type_show,NULL); +CSROWDEV_ATTR(edac_mode,S_IRUGO,csrow_edac_mode_show,NULL); +CSROWDEV_ATTR(ue_count,S_IRUGO,csrow_ue_count_show,NULL); +CSROWDEV_ATTR(ce_count,S_IRUGO,csrow_ce_count_show,NULL); +CSROWDEV_ATTR(ch0_ce_count,S_IRUGO,csrow_ch0_ce_count_show,NULL); +CSROWDEV_ATTR(ch1_ce_count,S_IRUGO,csrow_ch1_ce_count_show,NULL); + +/* control/attribute files */ +CSROWDEV_ATTR(ch0_dimm_label,S_IRUGO|S_IWUSR, + csrow_ch0_dimm_label_show, + csrow_ch0_dimm_label_store); +CSROWDEV_ATTR(ch1_dimm_label,S_IRUGO|S_IWUSR, + csrow_ch1_dimm_label_show, + csrow_ch1_dimm_label_store); -/* default attributes of the CSROW object */ -static struct csrowdev_attribute *default_csrow_attr[] = { +/* Attributes of the CSROW object */ +static struct csrowdev_attribute *csrow_attr[] = { &attr_dev_type, &attr_mem_type, &attr_edac_mode, &attr_size_mb, &attr_ue_count, &attr_ce_count, + &attr_ch0_ce_count, + &attr_ch1_ce_count, + &attr_ch0_dimm_label, + &attr_ch1_dimm_label, NULL, }; - -/* possible dynamic channel DIMM Label attribute files */ -CSROWDEV_ATTR(ch0_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 0 ); -CSROWDEV_ATTR(ch1_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 1 ); -CSROWDEV_ATTR(ch2_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 2 ); -CSROWDEV_ATTR(ch3_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 3 ); -CSROWDEV_ATTR(ch4_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 4 ); -CSROWDEV_ATTR(ch5_dimm_label,S_IRUGO|S_IWUSR, - channel_dimm_label_show, - channel_dimm_label_store, - 5 ); - -/* Total possible dynamic DIMM Label attribute file table */ -static struct csrowdev_attribute *dynamic_csrow_dimm_attr[] = { - &attr_ch0_dimm_label, - &attr_ch1_dimm_label, - &attr_ch2_dimm_label, - &attr_ch3_dimm_label, - &attr_ch4_dimm_label, - &attr_ch5_dimm_label -}; - -/* possible dynamic channel ce_count attribute files */ -CSROWDEV_ATTR(ch0_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 0 ); -CSROWDEV_ATTR(ch1_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 1 ); -CSROWDEV_ATTR(ch2_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 2 ); -CSROWDEV_ATTR(ch3_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 3 ); -CSROWDEV_ATTR(ch4_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 4 ); -CSROWDEV_ATTR(ch5_ce_count,S_IRUGO|S_IWUSR, - channel_ce_count_show, - NULL, - 5 ); - -/* Total possible dynamic ce_count attribute file table */ -static struct csrowdev_attribute *dynamic_csrow_ce_count_attr[] = { - &attr_ch0_ce_count, - &attr_ch1_ce_count, - &attr_ch2_ce_count, - &attr_ch3_ce_count, - &attr_ch4_ce_count, - &attr_ch5_ce_count -}; - - -#define EDAC_NR_CHANNELS 6 - -/* Create dynamic CHANNEL files, indexed by 'chan', under specifed CSROW */ -static int edac_create_channel_files(struct kobject *kobj, int chan) -{ - int err=-ENODEV; - - if (chan >= EDAC_NR_CHANNELS) - return err; - - /* create the DIMM label attribute file */ - err = sysfs_create_file(kobj, - (struct attribute *) dynamic_csrow_dimm_attr[chan]); - - if (!err) { - /* create the CE Count attribute file */ - err = sysfs_create_file(kobj, - (struct attribute *) dynamic_csrow_ce_count_attr[chan]); - } else { - debugf1("%s() dimm labels and ce_count files created", __func__); - } - - return err; -} - -/* No memory to release for this kobj */ +/* No memory to release */ static void edac_csrow_instance_release(struct kobject *kobj) { struct csrow_info *cs; + debugf1("%s()\n", __func__); cs = container_of(kobj, struct csrow_info, kobj); complete(&cs->kobj_complete); } -/* the kobj_type instance for a CSROW */ static struct kobj_type ktype_csrow = { .release = edac_csrow_instance_release, .sysfs_ops = &csrowfs_ops, - .default_attrs = (struct attribute **) default_csrow_attr, + .default_attrs = (struct attribute **) csrow_attr, }; /* Create a CSROW object under specifed edac_mc_device */ -static int edac_create_csrow_object( - struct kobject *edac_mci_kobj, - struct csrow_info *csrow, - int index) +static int edac_create_csrow_object(struct kobject *edac_mci_kobj, + struct csrow_info *csrow, int index) { int err = 0; - int chan; + debugf0("%s()\n", __func__); memset(&csrow->kobj, 0, sizeof(csrow->kobj)); /* generate ..../edac/mc/mc/csrow */ @@ -871,27 +844,21 @@ static int edac_create_csrow_object( /* name this instance of csrow */ err = kobject_set_name(&csrow->kobj,"csrow%d",index); - if (err) - goto error_exit; - /* Instanstiate the csrow object */ - err = kobject_register(&csrow->kobj); if (!err) { - /* Create the dyanmic attribute files on this csrow, - * namely, the DIMM labels and the channel ce_count - */ - for (chan = 0; chan < csrow->nr_channels; chan++) { - err = edac_create_channel_files(&csrow->kobj,chan); - if (err) - break; - } + /* Instanstiate the csrow object */ + err = kobject_register(&csrow->kobj); + + if (err) + debugf0("Failed to register CSROW%d\n",index); + else + debugf0("Registered CSROW%d\n",index); } -error_exit: return err; } -/* default sysfs methods and data structures for the main MCI kobject */ +/* sysfs data structures and methods for the MCI kobjects */ static ssize_t mci_reset_counters_store(struct mem_ctl_info *mci, const char *data, size_t count) @@ -917,7 +884,6 @@ static ssize_t mci_reset_counters_store(struct mem_ctl_info *mci, return count; } -/* default attribute files for the MCI object */ static ssize_t mci_ue_count_show(struct mem_ctl_info *mci, char *data) { return sprintf(data,"%d\n", mci->ue_count); @@ -938,14 +904,74 @@ static ssize_t mci_ue_noinfo_show(struct mem_ctl_info *mci, char *data) return sprintf(data,"%d\n", mci->ue_noinfo_count); } -static ssize_t mci_seconds_show(struct mem_ctl_info *mci, char *data) +static ssize_t mci_seconds_show(struct mem_ctl_info *mci, char *data) +{ + return sprintf(data,"%ld\n", (jiffies - mci->start_time) / HZ); +} + +static ssize_t mci_mod_name_show(struct mem_ctl_info *mci, char *data) +{ + return sprintf(data,"%s %s\n", mci->mod_name, mci->mod_ver); +} + +static ssize_t mci_ctl_name_show(struct mem_ctl_info *mci, char *data) +{ + return sprintf(data,"%s\n", mci->ctl_name); +} + +static int mci_output_edac_cap(char *buf, unsigned long edac_cap) +{ + char *p = buf; + int bit_idx; + + for (bit_idx = 0; bit_idx < 8 * sizeof(edac_cap); bit_idx++) { + if ((edac_cap >> bit_idx) & 0x1) + p += sprintf(p, "%s ", edac_caps[bit_idx]); + } + + return p - buf; +} + +static ssize_t mci_edac_capability_show(struct mem_ctl_info *mci, char *data) +{ + char *p = data; + + p += mci_output_edac_cap(p,mci->edac_ctl_cap); + p += sprintf(p, "\n"); + return p - data; +} + +static ssize_t mci_edac_current_capability_show(struct mem_ctl_info *mci, + char *data) +{ + char *p = data; + + p += mci_output_edac_cap(p,mci->edac_cap); + p += sprintf(p, "\n"); + return p - data; +} + +static int mci_output_mtype_cap(char *buf, unsigned long mtype_cap) { - return sprintf(data,"%ld\n", (jiffies - mci->start_time) / HZ); + char *p = buf; + int bit_idx; + + for (bit_idx = 0; bit_idx < 8 * sizeof(mtype_cap); bit_idx++) { + if ((mtype_cap >> bit_idx) & 0x1) + p += sprintf(p, "%s ", mem_types[bit_idx]); + } + + return p - buf; } -static ssize_t mci_ctl_name_show(struct mem_ctl_info *mci, char *data) +static ssize_t mci_supported_mem_type_show(struct mem_ctl_info *mci, + char *data) { - return sprintf(data,"%s\n", mci->ctl_name); + char *p = data; + + p += mci_output_mtype_cap(p,mci->mtype_cap); + p += sprintf(p, "\n"); + return p - data; } static ssize_t mci_size_mb_show(struct mem_ctl_info *mci, char *data) @@ -974,7 +1000,6 @@ struct mcidev_attribute { #define to_mci(k) container_of(k, struct mem_ctl_info, edac_mci_kobj) #define to_mcidev_attr(a) container_of(a, struct mcidev_attribute, attr) -/* MCI show/store functions for top most object */ static ssize_t mcidev_show(struct kobject *kobj, struct attribute *attr, char *buffer) { @@ -1011,21 +1036,31 @@ struct mcidev_attribute mci_attr_##_name = { \ .store = _store, \ }; -/* default Control file */ +/* Control file */ MCIDEV_ATTR(reset_counters,S_IWUSR,NULL,mci_reset_counters_store); -/* default Attribute files */ +/* Attribute files */ MCIDEV_ATTR(mc_name,S_IRUGO,mci_ctl_name_show,NULL); +MCIDEV_ATTR(module_name,S_IRUGO,mci_mod_name_show,NULL); +MCIDEV_ATTR(edac_capability,S_IRUGO,mci_edac_capability_show,NULL); MCIDEV_ATTR(size_mb,S_IRUGO,mci_size_mb_show,NULL); MCIDEV_ATTR(seconds_since_reset,S_IRUGO,mci_seconds_show,NULL); MCIDEV_ATTR(ue_noinfo_count,S_IRUGO,mci_ue_noinfo_show,NULL); MCIDEV_ATTR(ce_noinfo_count,S_IRUGO,mci_ce_noinfo_show,NULL); MCIDEV_ATTR(ue_count,S_IRUGO,mci_ue_count_show,NULL); MCIDEV_ATTR(ce_count,S_IRUGO,mci_ce_count_show,NULL); +MCIDEV_ATTR(edac_current_capability,S_IRUGO, + mci_edac_current_capability_show,NULL); +MCIDEV_ATTR(supported_mem_type,S_IRUGO, + mci_supported_mem_type_show,NULL); static struct mcidev_attribute *mci_attr[] = { &mci_attr_reset_counters, + &mci_attr_module_name, &mci_attr_mc_name, + &mci_attr_edac_capability, + &mci_attr_edac_current_capability, + &mci_attr_supported_mem_type, &mci_attr_size_mb, &mci_attr_seconds_since_reset, &mci_attr_ue_noinfo_count, @@ -1053,6 +1088,7 @@ static struct kobj_type ktype_mci = { .default_attrs = (struct attribute **) mci_attr, }; +#endif /* DISABLE_EDAC_SYSFS */ #define EDAC_DEVICE_SYMLINK "device" @@ -1065,6 +1101,11 @@ static struct kobj_type ktype_mci = { * !0 Failure */ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) +#ifdef DISABLE_EDAC_SYSFS +{ + return 0; +} +#else { int i; int err; @@ -1076,6 +1117,7 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) /* set the name of the mc object */ err = kobject_set_name(edac_mci_kobj,"mc%d",mci->mc_idx); + if (err) return err; @@ -1085,12 +1127,14 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) /* register the mc kobject */ err = kobject_register(edac_mci_kobj); + if (err) return err; /* create a symlink for the device */ - err = sysfs_create_link(edac_mci_kobj, &mci->dev->kobj, + err = sysfs_create_link(edac_mci_kobj, &mci->pdev->dev.kobj, EDAC_DEVICE_SYMLINK); + if (err) goto fail0; @@ -1103,6 +1147,7 @@ static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) /* Only expose populated CSROWs */ if (csrow->nr_pages > 0) { err = edac_create_csrow_object(edac_mci_kobj,csrow,i); + if (err) goto fail1; } @@ -1126,12 +1171,14 @@ fail0: wait_for_completion(&mci->kobj_complete); return err; } +#endif /* DISABLE_EDAC_SYSFS */ /* * remove a Memory Controller instance */ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) { +#ifndef DISABLE_EDAC_SYSFS int i; debugf0("%s()\n", __func__); @@ -1149,6 +1196,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) init_completion(&mci->kobj_complete); kobject_unregister(&mci->edac_mci_kobj); wait_for_completion(&mci->kobj_complete); +#endif /* DISABLE_EDAC_SYSFS */ } /* END OF sysfs data and methods */ @@ -1190,7 +1238,7 @@ void edac_mc_dump_mci(struct mem_ctl_info *mci) debugf4("\tmci->edac_check = %p\n", mci->edac_check); debugf3("\tmci->nr_csrows = %d, csrows = %p\n", mci->nr_csrows, mci->csrows); - debugf3("\tdev = %p\n", mci->dev); + debugf3("\tpdev = %p\n", mci->pdev); debugf3("\tmod_name:ctl_name = %s:%s\n", mci->mod_name, mci->ctl_name); debugf3("\tpvt_info = %p\n\n", mci->pvt_info); @@ -1315,7 +1363,7 @@ void edac_mc_free(struct mem_ctl_info *mci) } EXPORT_SYMBOL_GPL(edac_mc_free); -static struct mem_ctl_info *find_mci_by_dev(struct device *dev) +static struct mem_ctl_info *find_mci_by_pdev(struct pci_dev *pdev) { struct mem_ctl_info *mci; struct list_head *item; @@ -1325,53 +1373,54 @@ static struct mem_ctl_info *find_mci_by_dev(struct device *dev) list_for_each(item, &mc_devices) { mci = list_entry(item, struct mem_ctl_info, link); - if (mci->dev == dev) + if (mci->pdev == pdev) return mci; } return NULL; } -/* Return 0 on success, 1 on failure. - * Before calling this function, caller must - * assign a unique value to mci->mc_idx. - */ -static int add_mc_to_global_list (struct mem_ctl_info *mci) +static int add_mc_to_global_list(struct mem_ctl_info *mci) { struct list_head *item, *insert_before; struct mem_ctl_info *p; + int i; - insert_before = &mc_devices; + if (list_empty(&mc_devices)) { + mci->mc_idx = 0; + insert_before = &mc_devices; + } else { + if (find_mci_by_pdev(mci->pdev)) { + edac_printk(KERN_WARNING, EDAC_MC, + "%s (%s) %s %s already assigned %d\n", + mci->pdev->dev.bus_id, + pci_name(mci->pdev), mci->mod_name, + mci->ctl_name, mci->mc_idx); + return 1; + } - if (unlikely((p = find_mci_by_dev(mci->dev)) != NULL)) - goto fail0; + insert_before = NULL; + i = 0; - list_for_each(item, &mc_devices) { - p = list_entry(item, struct mem_ctl_info, link); + list_for_each(item, &mc_devices) { + p = list_entry(item, struct mem_ctl_info, link); - if (p->mc_idx >= mci->mc_idx) { - if (unlikely(p->mc_idx == mci->mc_idx)) - goto fail1; + if (p->mc_idx != i) { + insert_before = item; + break; + } - insert_before = item; - break; + i++; } + + mci->mc_idx = i; + + if (insert_before == NULL) + insert_before = &mc_devices; } list_add_tail_rcu(&mci->link, insert_before); return 0; - -fail0: - edac_printk(KERN_WARNING, EDAC_MC, - "%s (%s) %s %s already assigned %d\n", p->dev->bus_id, - dev_name(p->dev), p->mod_name, p->ctl_name, p->mc_idx); - return 1; - -fail1: - edac_printk(KERN_WARNING, EDAC_MC, - "bug in low-level driver: attempt to assign\n" - " duplicate mc_idx %d in %s()\n", p->mc_idx, __func__); - return 1; } static void complete_mc_list_del(struct rcu_head *head) @@ -1391,39 +1440,10 @@ static void del_mc_from_global_list(struct mem_ctl_info *mci) wait_for_completion(&mci->complete); } -/** - * edac_mc_find: Search for a mem_ctl_info structure whose index is 'idx'. - * - * If found, return a pointer to the structure. - * Else return NULL. - * - * Caller must hold mem_ctls_mutex. - */ -struct mem_ctl_info * edac_mc_find(int idx) -{ - struct list_head *item; - struct mem_ctl_info *mci; - - list_for_each(item, &mc_devices) { - mci = list_entry(item, struct mem_ctl_info, link); - - if (mci->mc_idx >= idx) { - if (mci->mc_idx == idx) - return mci; - - break; - } - } - - return NULL; -} -EXPORT_SYMBOL(edac_mc_find); - /** * edac_mc_add_mc: Insert the 'mci' structure into the mci global list and * create sysfs entries associated with mci structure * @mci: pointer to the mci structure to be added to the list - * @mc_idx: A unique numeric identifier to be assigned to the 'mci' structure. * * Return: * 0 Success @@ -1431,10 +1451,9 @@ EXPORT_SYMBOL(edac_mc_find); */ /* FIXME - should a warning be printed if no error detection? correction? */ -int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx) +int edac_mc_add_mc(struct mem_ctl_info *mci) { debugf0("%s()\n", __func__); - mci->mc_idx = mc_idx; #ifdef CONFIG_EDAC_DEBUG if (edac_debug_level >= 3) edac_mc_dump_mci(mci); @@ -1467,8 +1486,8 @@ int edac_mc_add_mc(struct mem_ctl_info *mci, int mc_idx) } /* Report action taken */ - edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: DEV %s\n", - mci->mod_name, mci->ctl_name, dev_name(mci->dev)); + edac_mc_printk(mci, KERN_INFO, "Giving out device to %s %s: PCI %s\n", + mci->mod_name, mci->ctl_name, pci_name(mci->pdev)); up(&mem_ctls_mutex); return 0; @@ -1485,18 +1504,18 @@ EXPORT_SYMBOL_GPL(edac_mc_add_mc); /** * edac_mc_del_mc: Remove sysfs entries for specified mci structure and * remove mci structure from global list - * @pdev: Pointer to 'struct device' representing mci structure to remove. + * @pdev: Pointer to 'struct pci_dev' representing mci structure to remove. * * Return pointer to removed mci structure, or NULL if device not found. */ -struct mem_ctl_info * edac_mc_del_mc(struct device *dev) +struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev) { struct mem_ctl_info *mci; debugf0("MC: %s()\n", __func__); down(&mem_ctls_mutex); - if ((mci = find_mci_by_dev(dev)) == NULL) { + if ((mci = find_mci_by_pdev(pdev)) == NULL) { up(&mem_ctls_mutex); return NULL; } @@ -1505,8 +1524,8 @@ struct mem_ctl_info * edac_mc_del_mc(struct device *dev) del_mc_from_global_list(mci); up(&mem_ctls_mutex); edac_printk(KERN_INFO, EDAC_MC, - "Removed device %d for %s %s: DEV %s\n", mci->mc_idx, - mci->mod_name, mci->ctl_name, dev_name(mci->dev)); + "Removed device %d for %s %s: PCI %s\n", mci->mc_idx, + mci->mod_name, mci->ctl_name, pci_name(mci->pdev)); return mci; } EXPORT_SYMBOL_GPL(edac_mc_del_mc); @@ -1720,6 +1739,244 @@ void edac_mc_handle_ue_no_info(struct mem_ctl_info *mci, const char *msg) } EXPORT_SYMBOL_GPL(edac_mc_handle_ue_no_info); +#ifdef CONFIG_PCI + +static u16 get_pci_parity_status(struct pci_dev *dev, int secondary) +{ + int where; + u16 status; + + where = secondary ? PCI_SEC_STATUS : PCI_STATUS; + pci_read_config_word(dev, where, &status); + + /* If we get back 0xFFFF then we must suspect that the card has been + * pulled but the Linux PCI layer has not yet finished cleaning up. + * We don't want to report on such devices + */ + + if (status == 0xFFFF) { + u32 sanity; + + pci_read_config_dword(dev, 0, &sanity); + + if (sanity == 0xFFFFFFFF) + return 0; + } + + status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR | + PCI_STATUS_PARITY; + + if (status) + /* reset only the bits we are interested in */ + pci_write_config_word(dev, where, status); + + return status; +} + +typedef void (*pci_parity_check_fn_t) (struct pci_dev *dev); + +/* Clear any PCI parity errors logged by this device. */ +static void edac_pci_dev_parity_clear(struct pci_dev *dev) +{ + u8 header_type; + + get_pci_parity_status(dev, 0); + + /* read the device TYPE, looking for bridges */ + pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); + + if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) + get_pci_parity_status(dev, 1); +} + +/* + * PCI Parity polling + * + */ +static void edac_pci_dev_parity_test(struct pci_dev *dev) +{ + u16 status; + u8 header_type; + + /* read the STATUS register on this device + */ + status = get_pci_parity_status(dev, 0); + + debugf2("PCI STATUS= 0x%04x %s\n", status, dev->dev.bus_id ); + + /* check the status reg for errors */ + if (status) { + if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) + edac_printk(KERN_CRIT, EDAC_PCI, + "Signaled System Error on %s\n", + pci_name(dev)); + + if (status & (PCI_STATUS_PARITY)) { + edac_printk(KERN_CRIT, EDAC_PCI, + "Master Data Parity Error on %s\n", + pci_name(dev)); + + atomic_inc(&pci_parity_count); + } + + if (status & (PCI_STATUS_DETECTED_PARITY)) { + edac_printk(KERN_CRIT, EDAC_PCI, + "Detected Parity Error on %s\n", + pci_name(dev)); + + atomic_inc(&pci_parity_count); + } + } + + /* read the device TYPE, looking for bridges */ + pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); + + debugf2("PCI HEADER TYPE= 0x%02x %s\n", header_type, dev->dev.bus_id ); + + if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { + /* On bridges, need to examine secondary status register */ + status = get_pci_parity_status(dev, 1); + + debugf2("PCI SEC_STATUS= 0x%04x %s\n", + status, dev->dev.bus_id ); + + /* check the secondary status reg for errors */ + if (status) { + if (status & (PCI_STATUS_SIG_SYSTEM_ERROR)) + edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " + "Signaled System Error on %s\n", + pci_name(dev)); + + if (status & (PCI_STATUS_PARITY)) { + edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " + "Master Data Parity Error on " + "%s\n", pci_name(dev)); + + atomic_inc(&pci_parity_count); + } + + if (status & (PCI_STATUS_DETECTED_PARITY)) { + edac_printk(KERN_CRIT, EDAC_PCI, "Bridge " + "Detected Parity Error on %s\n", + pci_name(dev)); + + atomic_inc(&pci_parity_count); + } + } + } +} + +/* + * check_dev_on_list: Scan for a PCI device on a white/black list + * @list: an EDAC &edac_pci_device_list white/black list pointer + * @free_index: index of next free entry on the list + * @pci_dev: PCI Device pointer + * + * see if list contains the device. + * + * Returns: 0 not found + * 1 found on list + */ +static int check_dev_on_list(struct edac_pci_device_list *list, + int free_index, struct pci_dev *dev) +{ + int i; + int rc = 0; /* Assume not found */ + unsigned short vendor=dev->vendor; + unsigned short device=dev->device; + + /* Scan the list, looking for a vendor/device match */ + for (i = 0; i < free_index; i++, list++ ) { + if ((list->vendor == vendor ) && (list->device == device )) { + rc = 1; + break; + } + } + + return rc; +} + +/* + * pci_dev parity list iterator + * Scan the PCI device list for one iteration, looking for SERRORs + * Master Parity ERRORS or Parity ERRORs on primary or secondary devices + */ +static inline void edac_pci_dev_parity_iterator(pci_parity_check_fn_t fn) +{ + struct pci_dev *dev = NULL; + + /* request for kernel access to the next PCI device, if any, + * and while we are looking at it have its reference count + * bumped until we are done with it + */ + while((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + /* if whitelist exists then it has priority, so only scan + * those devices on the whitelist + */ + if (pci_whitelist_count > 0 ) { + if (check_dev_on_list(pci_whitelist, + pci_whitelist_count, dev)) + fn(dev); + } else { + /* + * if no whitelist, then check if this devices is + * blacklisted + */ + if (!check_dev_on_list(pci_blacklist, + pci_blacklist_count, dev)) + fn(dev); + } + } +} + +static void do_pci_parity_check(void) +{ + unsigned long flags; + int before_count; + + debugf3("%s()\n", __func__); + + if (!check_pci_parity) + return; + + before_count = atomic_read(&pci_parity_count); + + /* scan all PCI devices looking for a Parity Error on devices and + * bridges + */ + local_irq_save(flags); + edac_pci_dev_parity_iterator(edac_pci_dev_parity_test); + local_irq_restore(flags); + + /* Only if operator has selected panic on PCI Error */ + if (panic_on_pci_parity) { + /* If the count is different 'after' from 'before' */ + if (before_count != atomic_read(&pci_parity_count)) + panic("EDAC: PCI Parity Error"); + } +} + +static inline void clear_pci_parity_errors(void) +{ + /* Clear any PCI bus parity errors that devices initially have logged + * in their registers. + */ + edac_pci_dev_parity_iterator(edac_pci_dev_parity_clear); +} + +#else /* CONFIG_PCI */ + +static inline void do_pci_parity_check(void) +{ + /* no-op */ +} + +static inline void clear_pci_parity_errors(void) +{ + /* no-op */ +} + +#endif /* CONFIG_PCI */ /* * Iterate over all MC instances and check for ECC, et al, errors @@ -1839,12 +2096,10 @@ MODULE_DESCRIPTION("Core library routines for MC reporting"); module_param(panic_on_ue, int, 0644); MODULE_PARM_DESC(panic_on_ue, "Panic on uncorrected error: 0=off 1=on"); -#ifdef CONFIG_PCI module_param(check_pci_parity, int, 0644); MODULE_PARM_DESC(check_pci_parity, "Check for PCI bus parity errors: 0=off 1=on"); module_param(panic_on_pci_parity, int, 0644); MODULE_PARM_DESC(panic_on_pci_parity, "Panic on PCI Bus Parity error: 0=off 1=on"); -#endif module_param(log_ue, int, 0644); MODULE_PARM_DESC(log_ue, "Log uncorrectable error to console: 0=off 1=on"); module_param(log_ce, int, 0644); diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index f8e601088..8d9e83909 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h @@ -18,6 +18,7 @@ #ifndef _EDAC_MC_H_ #define _EDAC_MC_H_ +#include #include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include #define EDAC_MC_LABEL_LEN 31 #define MC_PROC_NAME_MAX_LEN 7 @@ -79,17 +79,15 @@ extern int edac_debug_level; #endif /* !CONFIG_EDAC_DEBUG */ +#define edac_xstr(s) edac_str(s) +#define edac_str(s) #s +#define EDAC_MOD_STR edac_xstr(KBUILD_BASENAME) + #define BIT(x) (1 << (x)) #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ PCI_DEVICE_ID_ ## vend ## _ ## dev -#if defined(CONFIG_X86) && defined(CONFIG_PCI) -#define dev_name(dev) pci_name(to_pci_dev(dev)) -#else -#define dev_name(dev) to_platform_device(dev)->name -#endif - /* memory devices */ enum dev_type { DEV_UNKNOWN = 0, @@ -329,10 +327,10 @@ struct mem_ctl_info { struct csrow_info *csrows; /* * FIXME - what about controllers on other busses? - IDs must be - * unique. dev pointer should be sufficiently unique, but + * unique. pdev pointer should be sufficiently unique, but * BUS:SLOT.FUNC numbers may not be unique. */ - struct device *dev; + struct pci_dev *pdev; const char *mod_name; const char *mod_ver; const char *ctl_name; @@ -355,8 +353,6 @@ struct mem_ctl_info { struct completion kobj_complete; }; -#ifdef CONFIG_PCI - /* write all or some bits in a byte-register*/ static inline void pci_write_bits8(struct pci_dev *pdev, int offset, u8 value, u8 mask) @@ -405,17 +401,14 @@ static inline void pci_write_bits32(struct pci_dev *pdev, int offset, pci_write_config_dword(pdev, offset, value); } -#endif /* CONFIG_PCI */ - #ifdef CONFIG_EDAC_DEBUG void edac_mc_dump_channel(struct channel_info *chan); void edac_mc_dump_mci(struct mem_ctl_info *mci); void edac_mc_dump_csrow(struct csrow_info *csrow); #endif /* CONFIG_EDAC_DEBUG */ -extern struct mem_ctl_info * edac_mc_find(int idx); -extern int edac_mc_add_mc(struct mem_ctl_info *mci,int mc_idx); -extern struct mem_ctl_info * edac_mc_del_mc(struct device *dev); +extern int edac_mc_add_mc(struct mem_ctl_info *mci); +extern struct mem_ctl_info * edac_mc_del_mc(struct pci_dev *pdev); extern int edac_mc_find_csrow_by_page(struct mem_ctl_info *mci, unsigned long page); extern void edac_mc_scrub_block(unsigned long page, unsigned long offset, diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index e4bb298e6..fd342163c 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c @@ -9,6 +9,7 @@ * by Thayne Harbaugh of Linux Networx. (http://lnxi.com) */ +#include #include #include #include @@ -16,9 +17,6 @@ #include #include "edac_mc.h" -#define I82860_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "i82860_edac" - #define i82860_printk(level, fmt, arg...) \ edac_printk(level, "i82860", fmt, ##arg) @@ -65,21 +63,17 @@ static struct pci_dev *mci_pdev = NULL; /* init dev: in case that AGP code static void i82860_get_error_info(struct mem_ctl_info *mci, struct i82860_error_info *info) { - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - /* * This is a mess because there is no atomic way to read all the * registers at once and the registers can transition from CE being * overwritten by UE. */ - pci_read_config_word(pdev, I82860_ERRSTS, &info->errsts); - pci_read_config_dword(pdev, I82860_EAP, &info->eap); - pci_read_config_word(pdev, I82860_DERRCTL_STS, &info->derrsyn); - pci_read_config_word(pdev, I82860_ERRSTS, &info->errsts2); + pci_read_config_word(mci->pdev, I82860_ERRSTS, &info->errsts); + pci_read_config_dword(mci->pdev, I82860_EAP, &info->eap); + pci_read_config_word(mci->pdev, I82860_DERRCTL_STS, &info->derrsyn); + pci_read_config_word(mci->pdev, I82860_ERRSTS, &info->errsts2); - pci_write_bits16(pdev, I82860_ERRSTS, 0x0003, 0x0003); + pci_write_bits16(mci->pdev, I82860_ERRSTS, 0x0003, 0x0003); /* * If the error is the same for both reads then the first set of reads @@ -90,8 +84,8 @@ static void i82860_get_error_info(struct mem_ctl_info *mci, return; if ((info->errsts ^ info->errsts2) & 0x0003) { - pci_read_config_dword(pdev, I82860_EAP, &info->eap); - pci_read_config_word(pdev, I82860_DERRCTL_STS, + pci_read_config_dword(mci->pdev, I82860_EAP, &info->eap); + pci_read_config_word(mci->pdev, I82860_DERRCTL_STS, &info->derrsyn); } } @@ -133,51 +127,16 @@ static void i82860_check(struct mem_ctl_info *mci) i82860_process_error_info(mci, &info, 1); } -static void i82860_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev) -{ - unsigned long last_cumul_size; - u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none, 2=edac */ - u16 value; - u32 cumul_size; - struct csrow_info *csrow; - int index; - - pci_read_config_word(pdev, I82860_MCHCFG, &mchcfg_ddim); - mchcfg_ddim = mchcfg_ddim & 0x180; - last_cumul_size = 0; - - /* The group row boundary (GRA) reg values are boundary address - * for each DRAM row with a granularity of 16MB. GRA regs are - * cumulative; therefore GRA15 will contain the total memory contained - * in all eight rows. - */ - for (index = 0; index < mci->nr_csrows; index++) { - csrow = &mci->csrows[index]; - pci_read_config_word(pdev, I82860_GBA + index * 2, &value); - cumul_size = (value & I82860_GBA_MASK) << - (I82860_GBA_SHIFT - PAGE_SHIFT); - debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, - cumul_size); - - if (cumul_size == last_cumul_size) - continue; /* not populated */ - - csrow->first_page = last_cumul_size; - csrow->last_page = cumul_size - 1; - csrow->nr_pages = cumul_size - last_cumul_size; - last_cumul_size = cumul_size; - csrow->grain = 1 << 12; /* I82860_EAP has 4KiB reolution */ - csrow->mtype = MEM_RMBS; - csrow->dtype = DEV_UNKNOWN; - csrow->edac_mode = mchcfg_ddim ? EDAC_SECDED : EDAC_NONE; - } -} - static int i82860_probe1(struct pci_dev *pdev, int dev_idx) { - struct mem_ctl_info *mci; + int rc = -ENODEV; + int index; + struct mem_ctl_info *mci = NULL; + unsigned long last_cumul_size; struct i82860_error_info discard; + u16 mchcfg_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ + /* RDRAM has channels but these don't map onto the abstractions that edac uses. The device groups from the GRA registers seem to map reasonably @@ -192,35 +151,67 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx) return -ENOMEM; debugf3("%s(): init mci\n", __func__); - mci->dev = &pdev->dev; + mci->pdev = pdev; mci->mtype_cap = MEM_FLAG_DDR; + mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; /* I"m not sure about this but I think that all RDRAM is SECDED */ mci->edac_cap = EDAC_FLAG_SECDED; + /* adjust FLAGS */ + mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = I82860_REVISION; + mci->mod_ver = "$Revision: 1.1.2.6 $"; mci->ctl_name = i82860_devs[dev_idx].ctl_name; mci->edac_check = i82860_check; mci->ctl_page_to_phys = NULL; - i82860_init_csrows(mci, pdev); - i82860_get_error_info(mci, &discard); /* clear counters */ - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. + pci_read_config_word(mci->pdev, I82860_MCHCFG, &mchcfg_ddim); + mchcfg_ddim = mchcfg_ddim & 0x180; + + /* + * The group row boundary (GRA) reg values are boundary address + * for each DRAM row with a granularity of 16MB. GRA regs are + * cumulative; therefore GRA15 will contain the total memory contained + * in all eight rows. */ - if (edac_mc_add_mc(mci,0)) { - debugf3("%s(): failed edac_mc_add_mc()\n", __func__); - goto fail; + for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { + u16 value; + u32 cumul_size; + struct csrow_info *csrow = &mci->csrows[index]; + + pci_read_config_word(mci->pdev, I82860_GBA + index * 2, + &value); + + cumul_size = (value & I82860_GBA_MASK) << + (I82860_GBA_SHIFT - PAGE_SHIFT); + debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, + cumul_size); + + if (cumul_size == last_cumul_size) + continue; /* not populated */ + + csrow->first_page = last_cumul_size; + csrow->last_page = cumul_size - 1; + csrow->nr_pages = cumul_size - last_cumul_size; + last_cumul_size = cumul_size; + csrow->grain = 1 << 12; /* I82860_EAP has 4KiB reolution */ + csrow->mtype = MEM_RMBS; + csrow->dtype = DEV_UNKNOWN; + csrow->edac_mode = mchcfg_ddim ? EDAC_SECDED : EDAC_NONE; } - /* get this far and it's successful */ - debugf3("%s(): success\n", __func__); + i82860_get_error_info(mci, &discard); /* clear counters */ - return 0; + if (edac_mc_add_mc(mci)) { + debugf3("%s(): failed edac_mc_add_mc()\n", __func__); + edac_mc_free(mci); + } else { + /* get this far and it's successful */ + debugf3("%s(): success\n", __func__); + rc = 0; + } -fail: - edac_mc_free(mci); - return -ENODEV; + return rc; } /* returns count (>= 0), or negative on error */ @@ -249,7 +240,7 @@ static void __devexit i82860_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; edac_mc_free(mci); diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 161fe09a6..0aec92698 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c @@ -13,6 +13,7 @@ * Note: E7210 appears same as D82875P - zhenyu.z.wang at intel.com */ +#include #include #include #include @@ -20,9 +21,6 @@ #include #include "edac_mc.h" -#define I82875P_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "i82875p_edac" - #define i82875p_printk(level, fmt, arg...) \ edac_printk(level, "i82875p", fmt, ##arg) @@ -187,22 +185,18 @@ static int i82875p_registered = 1; static void i82875p_get_error_info(struct mem_ctl_info *mci, struct i82875p_error_info *info) { - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - /* * This is a mess because there is no atomic way to read all the * registers at once and the registers can transition from CE being * overwritten by UE. */ - pci_read_config_word(pdev, I82875P_ERRSTS, &info->errsts); - pci_read_config_dword(pdev, I82875P_EAP, &info->eap); - pci_read_config_byte(pdev, I82875P_DES, &info->des); - pci_read_config_byte(pdev, I82875P_DERRSYN, &info->derrsyn); - pci_read_config_word(pdev, I82875P_ERRSTS, &info->errsts2); + pci_read_config_word(mci->pdev, I82875P_ERRSTS, &info->errsts); + pci_read_config_dword(mci->pdev, I82875P_EAP, &info->eap); + pci_read_config_byte(mci->pdev, I82875P_DES, &info->des); + pci_read_config_byte(mci->pdev, I82875P_DERRSYN, &info->derrsyn); + pci_read_config_word(mci->pdev, I82875P_ERRSTS, &info->errsts2); - pci_write_bits16(pdev, I82875P_ERRSTS, 0x0081, 0x0081); + pci_write_bits16(mci->pdev, I82875P_ERRSTS, 0x0081, 0x0081); /* * If the error is the same then we can for both reads then @@ -214,9 +208,9 @@ static void i82875p_get_error_info(struct mem_ctl_info *mci, return; if ((info->errsts ^ info->errsts2) & 0x0081) { - pci_read_config_dword(pdev, I82875P_EAP, &info->eap); - pci_read_config_byte(pdev, I82875P_DES, &info->des); - pci_read_config_byte(pdev, I82875P_DERRSYN, + pci_read_config_dword(mci->pdev, I82875P_EAP, &info->eap); + pci_read_config_byte(mci->pdev, I82875P_DES, &info->des); + pci_read_config_byte(mci->pdev, I82875P_DERRSYN, &info->derrsyn); } } @@ -265,109 +259,116 @@ static void i82875p_check(struct mem_ctl_info *mci) extern int pci_proc_attach_device(struct pci_dev *); #endif -/* Return 0 on success or 1 on failure. */ -static int i82875p_setup_overfl_dev(struct pci_dev *pdev, - struct pci_dev **ovrfl_pdev, void __iomem **ovrfl_window) +static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) { - struct pci_dev *dev; - void __iomem *window; + int rc = -ENODEV; + int index; + struct mem_ctl_info *mci = NULL; + struct i82875p_pvt *pvt = NULL; + unsigned long last_cumul_size; + struct pci_dev *ovrfl_pdev; + void __iomem *ovrfl_window = NULL; + u32 drc; + u32 drc_chan; /* Number of channels 0=1chan,1=2chan */ + u32 nr_chans; + u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ + struct i82875p_error_info discard; - *ovrfl_pdev = NULL; - *ovrfl_window = NULL; - dev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); + debugf0("%s()\n", __func__); + ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); - if (dev == NULL) { - /* Intel tells BIOS developers to hide device 6 which + if (!ovrfl_pdev) { + /* + * Intel tells BIOS developers to hide device 6 which * configures the overflow device access containing * the DRBs - this is where we expose device 6. * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm */ pci_write_bits8(pdev, 0xf4, 0x2, 0x2); - dev = pci_scan_single_device(pdev->bus, PCI_DEVFN(6, 0)); + ovrfl_pdev = + pci_scan_single_device(pdev->bus, PCI_DEVFN(6, 0)); - if (dev == NULL) - return 1; + if (!ovrfl_pdev) + return -ENODEV; } - *ovrfl_pdev = dev; - #ifdef CONFIG_PROC_FS - if ((dev->procent == NULL) && pci_proc_attach_device(dev)) { - i82875p_printk(KERN_ERR, "%s(): Failed to attach overflow " - "device\n", __func__); - return 1; + if (!ovrfl_pdev->procent && pci_proc_attach_device(ovrfl_pdev)) { + i82875p_printk(KERN_ERR, + "%s(): Failed to attach overflow device\n", __func__); + return -ENODEV; } -#endif /* CONFIG_PROC_FS */ - if (pci_enable_device(dev)) { - i82875p_printk(KERN_ERR, "%s(): Failed to enable overflow " - "device\n", __func__); - return 1; +#endif + /* CONFIG_PROC_FS */ + if (pci_enable_device(ovrfl_pdev)) { + i82875p_printk(KERN_ERR, + "%s(): Failed to enable overflow device\n", __func__); + return -ENODEV; } - if (pci_request_regions(dev, pci_name(dev))) { + if (pci_request_regions(ovrfl_pdev, pci_name(ovrfl_pdev))) { #ifdef CORRECT_BIOS goto fail0; #endif } /* cache is irrelevant for PCI bus reads/writes */ - window = ioremap_nocache(pci_resource_start(dev, 0), - pci_resource_len(dev, 0)); + ovrfl_window = ioremap_nocache(pci_resource_start(ovrfl_pdev, 0), + pci_resource_len(ovrfl_pdev, 0)); - if (window == NULL) { + if (!ovrfl_window) { i82875p_printk(KERN_ERR, "%s(): Failed to ioremap bar6\n", - __func__); + __func__); goto fail1; } - *ovrfl_window = window; - return 0; - -fail1: - pci_release_regions(dev); - -#ifdef CORRECT_BIOS -fail0: - pci_disable_device(dev); -#endif - /* NOTE: the ovrfl proc entry and pci_dev are intentionally left */ - return 1; -} - + /* need to find out the number of channels */ + drc = readl(ovrfl_window + I82875P_DRC); + drc_chan = ((drc >> 21) & 0x1); + nr_chans = drc_chan + 1; -/* Return 1 if dual channel mode is active. Else return 0. */ -static inline int dual_channel_active(u32 drc) -{ - return (drc >> 21) & 0x1; -} + drc_ddim = (drc >> 18) & 0x1; + mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans), + nr_chans); + if (!mci) { + rc = -ENOMEM; + goto fail2; + } -static void i82875p_init_csrows(struct mem_ctl_info *mci, - struct pci_dev *pdev, void __iomem *ovrfl_window, u32 drc) -{ - struct csrow_info *csrow; - unsigned long last_cumul_size; - u8 value; - u32 drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ - u32 cumul_size; - int index; + debugf3("%s(): init mci\n", __func__); + mci->pdev = pdev; + mci->mtype_cap = MEM_FLAG_DDR; + mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; + mci->edac_cap = EDAC_FLAG_UNKNOWN; + /* adjust FLAGS */ - drc_ddim = (drc >> 18) & 0x1; - last_cumul_size = 0; + mci->mod_name = EDAC_MOD_STR; + mci->mod_ver = "$Revision: 1.5.2.11 $"; + mci->ctl_name = i82875p_devs[dev_idx].ctl_name; + mci->edac_check = i82875p_check; + mci->ctl_page_to_phys = NULL; + debugf3("%s(): init pvt\n", __func__); + pvt = (struct i82875p_pvt *) mci->pvt_info; + pvt->ovrfl_pdev = ovrfl_pdev; + pvt->ovrfl_window = ovrfl_window; - /* The dram row boundary (DRB) reg values are boundary address + /* + * The dram row boundary (DRB) reg values are boundary address * for each DRAM row with a granularity of 32 or 64MB (single/dual * channel operation). DRB regs are cumulative; therefore DRB7 will * contain the total memory contained in all eight rows. */ - - for (index = 0; index < mci->nr_csrows; index++) { - csrow = &mci->csrows[index]; + for (last_cumul_size = index = 0; index < mci->nr_csrows; index++) { + u8 value; + u32 cumul_size; + struct csrow_info *csrow = &mci->csrows[index]; value = readb(ovrfl_window + I82875P_DRB + index); cumul_size = value << (I82875P_DRB_SHIFT - PAGE_SHIFT); debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, cumul_size); + if (cumul_size == last_cumul_size) continue; /* not populated */ @@ -375,75 +376,35 @@ static void i82875p_init_csrows(struct mem_ctl_info *mci, csrow->last_page = cumul_size - 1; csrow->nr_pages = cumul_size - last_cumul_size; last_cumul_size = cumul_size; - csrow->grain = 1 << 12; /* I82875P_EAP has 4KiB reolution */ + csrow->grain = 1 << 12; /* I82875P_EAP has 4KiB reolution */ csrow->mtype = MEM_DDR; csrow->dtype = DEV_UNKNOWN; csrow->edac_mode = drc_ddim ? EDAC_SECDED : EDAC_NONE; } -} - -static int i82875p_probe1(struct pci_dev *pdev, int dev_idx) -{ - int rc = -ENODEV; - struct mem_ctl_info *mci; - struct i82875p_pvt *pvt; - struct pci_dev *ovrfl_pdev; - void __iomem *ovrfl_window; - u32 drc; - u32 nr_chans; - struct i82875p_error_info discard; - - debugf0("%s()\n", __func__); - ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); - - if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window)) - return -ENODEV; - drc = readl(ovrfl_window + I82875P_DRC); - nr_chans = dual_channel_active(drc) + 1; - mci = edac_mc_alloc(sizeof(*pvt), I82875P_NR_CSROWS(nr_chans), - nr_chans); - - if (!mci) { - rc = -ENOMEM; - goto fail0; - } - debugf3("%s(): init mci\n", __func__); - mci->dev = &pdev->dev; - mci->mtype_cap = MEM_FLAG_DDR; - mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; - mci->edac_cap = EDAC_FLAG_UNKNOWN; - mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = I82875P_REVISION; - mci->ctl_name = i82875p_devs[dev_idx].ctl_name; - mci->edac_check = i82875p_check; - mci->ctl_page_to_phys = NULL; - debugf3("%s(): init pvt\n", __func__); - pvt = (struct i82875p_pvt *) mci->pvt_info; - pvt->ovrfl_pdev = ovrfl_pdev; - pvt->ovrfl_window = ovrfl_window; - i82875p_init_csrows(mci, pdev, ovrfl_window, drc); i82875p_get_error_info(mci, &discard); /* clear counters */ - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. - */ - if (edac_mc_add_mc(mci,0)) { + if (edac_mc_add_mc(mci)) { debugf3("%s(): failed edac_mc_add_mc()\n", __func__); - goto fail1; + goto fail3; } /* get this far and it's successful */ debugf3("%s(): success\n", __func__); return 0; -fail1: +fail3: edac_mc_free(mci); -fail0: +fail2: iounmap(ovrfl_window); + +fail1: pci_release_regions(ovrfl_pdev); +#ifdef CORRECT_BIOS +fail0: +#endif pci_disable_device(ovrfl_pdev); /* NOTE: the ovrfl proc entry and pci_dev are intentionally left */ return rc; @@ -476,7 +437,7 @@ static void __devexit i82875p_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; pvt = (struct i82875p_pvt *) mci->pvt_info; diff --git a/drivers/edac/k8_edac.c b/drivers/edac/k8_edac.c deleted file mode 100644 index d55f112cc..000000000 --- a/drivers/edac/k8_edac.c +++ /dev/null @@ -1,1881 +0,0 @@ -/* - * AMD K8 class Memory Controller kernel module - * - * This file may be distributed under the terms of the - * GNU General Public License. - * - * Written by Thayne Harbaugh Linux Networx (http://lnxi.com) - * - * Changes by Douglas "norsk" Thompson : - * - K8 CPU Revision D and greater support - * - * Changes by Dave Peterson : - * - Module largely rewritten, with new (and hopefully correct) - * code for dealing with node and chip select interleaving, various - * code cleanup, and bug fixes - * - Added support for memory hoisting using DRAM hole address - * register - * - * This module is based on the following document (available from - * http://www.amd.com/): - * - * Title: BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD - * Opteron Processors - * AMD publication #: 26094 - * Revision: 3.26 - * - * Unless otherwise stated, section numbers mentioned in the comments below - * refer to this document. - */ - -#include -#include -#include -#include -#include -#include -#include "edac_mc.h" - -#define k8_printk(level, fmt, arg...) \ - edac_printk(level, "k8", fmt, ##arg) - -#define k8_mc_printk(mci, level, fmt, arg...) \ - edac_mc_chipset_printk(mci, level, "k8", fmt, ##arg) - -/* Throughout the comments in this code, the terms SysAddr, DramAddr, and - * InputAddr are used. These terms come directly from the k8 documentation - * (AMD publication #26094). They are defined as follows: - * - * SysAddr: - * This is a physical address generated by a CPU core or a device - * doing DMA. If generated by a CPU core, a SysAddr is the result of - * a virtual to physical address translation by the CPU core's address - * translation mechanism (MMU). - * - * DramAddr: - * A DramAddr is derived from a SysAddr by subtracting an offset that - * depends on which node the SysAddr maps to and whether the SysAddr - * is within a range affected by memory hoisting. The DRAM Base - * (section 3.4.4.1) and DRAM Limit (section 3.4.4.2) registers - * determine which node a SysAddr maps to. - * - * If the DRAM Hole Address Register (DHAR) is enabled and the SysAddr - * is within the range of addresses specified by this register, then - * a value x from the DHAR is subtracted from the SysAddr to produce a - * DramAddr. Here, x represents the base address for the node that - * the SysAddr maps to plus an offset due to memory hoisting. See - * section 3.4.8 and the comments in get_dram_hole_info() and - * sys_addr_to_dram_addr() below for more information. - * - * If the SysAddr is not affected by the DHAR then a value y is - * subtracted from the SysAddr to produce a DramAddr. Here, y is the - * base address for the node that the SysAddr maps to. See section - * 3.4.4 and the comments in sys_addr_to_dram_addr() below for more - * information. - * - * InputAddr: - * A DramAddr is translated to an InputAddr before being passed to the - * memory controller for the node that the DramAddr is associated - * with. The memory controller then maps the InputAddr to a csrow. - * If node interleaving is not in use, then the InputAddr has the same - * value as the DramAddr. Otherwise, the InputAddr is produced by - * discarding the bits used for node interleaving from the DramAddr. - * See section 3.4.4 for more information. - * - * The memory controller for a given node uses its DRAM CS Base and - * DRAM CS Mask registers to map an InputAddr to a csrow. See - * sections 3.5.4 and 3.5.5 for more information. - */ - -/* - * Alter this version for the K8 module when modifications are made - */ -#define EDAC_K8_VERSION " Ver: 2.0.0 " __DATE__ -#define EDAC_MOD_STR "k8_edac" - -#ifndef PCI_DEVICE_ID_AMD_OPT_0_HT -#define PCI_DEVICE_ID_AMD_OPT_0_HT 0x1100 -#endif /* PCI_DEVICE_ID_AMD_OPT_0_HT */ - -#ifndef PCI_DEVICE_ID_AMD_OPT_1_ADDRMAP -#define PCI_DEVICE_ID_AMD_OPT_1_ADDRMAP 0x1101 -#endif /* PCI_DEVICE_ID_AMD_OPT_1_ADDRMAP */ - -#ifndef PCI_DEVICE_ID_AMD_OPT_2_MEMCTL -#define PCI_DEVICE_ID_AMD_OPT_2_MEMCTL 0x1102 -#endif /* PCI_DEVICE_ID_AMD_OPT_2_MEMCTL */ - -#ifndef PCI_DEVICE_ID_AMD_OPT_3_MISCCTL -#define PCI_DEVICE_ID_AMD_OPT_3_MISCCTL 0x1103 -#endif /* PCI_DEVICE_ID_AMD_OPT_3_MISCCTL */ - -/* Extended Model from CPUID, for CPU Revision numbers */ -#define OPTERON_CPU_LE_REV_C 0 -#define OPTERON_CPU_REV_D 1 -#define OPTERON_CPU_REV_E 2 - -#define K8_NR_CSROWS 8 -#define MAX_K8_NODES 8 - -/* K8 register addresses - device 0 function 1 - Address Map */ -#define K8_DBR 0x40 /* DRAM Base Register (8 x 32b - * interlaced with K8_DLR) - * - * 31:16 DRAM Base addr 39:24 - * 15:11 reserved - * 10:8 interleave enable - * 7:2 reserved - * 1 write enable - * 0 read enable - */ - -#define K8_DLR 0x44 /* DRAM Limit Register (8 x 32b - * interlaced with K8_DBR) - * - * 31:16 DRAM Limit addr 32:24 - * 15:11 reserved - * 10:8 interleave select - * 7:3 reserved - * 2:0 destination node ID - */ - -#define K8_DHAR 0xf0 /* DRAM Hole Address Register - * - * 31:24 DramHoleBase - * 23:16 reserved - * 15:8 DramHoleOffset - * 7:1 reserved - * 0 DramHoleValid - */ - -/* K8 register addresses - device 0 function 2 - DRAM controller */ -#define K8_DCSB 0x40 /* DRAM Chip-Select Base (8 x 32b) - * - * 31:21 Base addr high 35:25 - * 20:16 reserved - * 15:9 Base addr low 19:13 (interlvd) - * 8:1 reserved - * 0 chip-select bank enable - */ - -#define K8_DCSM 0x60 /* DRAM Chip-Select Mask (8 x 32b) - * - * 31:30 reserved - * 29:21 addr mask high 33:25 - * 20:16 reserved - * 15:9 addr mask low 19:13 - * 8:0 reserved - */ - -/* selects bits 29-21 and 15-9 from DCSM */ -#define DCSM_MASK_BITS 0x3fe0fe00 - -#define K8_DBAM 0x80 /* DRAM Base Addr Mapping (32b) */ - -#define K8_DCL 0x90 /* DRAM configuration low reg (32b) - * - * 31:28 reserved - * 27:25 Bypass Max: 000b=respect - * 24 Dissable receivers - no sockets - * 23:20 x4 DIMMS - * 19 32byte chunks - * 18 Unbuffered - * 17 ECC enabled - * 16 128/64 bit (dual/single chan) - * 15:14 R/W Queue bypass count - * 13 Self refresh - * 12 exit self refresh - * 11 mem clear status - * 10 DRAM enable - * 9 reserved - * 8 DRAM init - * 7:4 reserved - * 3 dis DQS hysteresis - * 2 QFC enabled - * 1 DRAM drive strength - * 0 Digital Locked Loop disable - */ - -/* K8 register addresses - device 0 function 3 - Misc Control */ -#define K8_NBCTL 0x40 /* MCA NB Control (32b) - * - * 1 MCA UE Reporting - * 0 MCA CE Reporting - */ - -#define K8_NBCFG 0x44 /* MCA NB Config (32b) - * - * 23 Chip-kill x4 ECC enable - * 22 ECC enable - * 1 CPU ECC enable - */ - -#define K8_NBSL 0x48 /* MCA NB Status Low (32b) - * - * 31:24 Syndrome 15:8 chip-kill x4 - * 23:20 reserved - * 19:16 Extended err code - * 15:0 Err code - */ - -#define K8_NBSH 0x4C /* MCA NB Status High (32b) - * - * 31 Err valid - * 30 Err overflow - * 29 Uncorrected err - * 28 Err enable - * 27 Misc err reg valid - * 26 Err addr valid - * 25 proc context corrupt - * 24:23 reserved - * 22:15 Syndrome 7:0 - * 14 CE - * 13 UE - * 12:9 reserved - * 8 err found by scrubber - * 7 reserved - * 6:4 Hyper-transport link number - * 3:2 reserved - * 1 Err CPU 1 - * 0 Err CPU 0 - */ - -#define K8_NBSH_VALID_BIT BIT(31) - -#define K8_NBEAL 0x50 /* MCA NB err addr low (32b) - * - * 31:3 Err addr low 31:3 - * 2:0 reserved - */ - -#define K8_NBEAH 0x54 /* MCA NB err addr high (32b) - * - * 31:8 reserved - * 7:0 Err addr high 39:32 - */ - -#define K8_NBCAP 0xE8 /* MCA NB capabilities (32b) - * - * 31:9 reserved - * 4 S4ECD4ED capable - * 3 SECDED capable - */ - - /* MSR's */ - - /* - * K8_MSR_MCxCTL (64b) - * (0x400,404,408,40C,410) - * 63 Enable reporting source 63 - * . - * . - * . - * 2 Enable error source 2 - * 1 Enable error source 1 - * 0 Enable error source 0 - */ - - /* - * K8_MSR_MCxSTAT (64b) - * (0x401,405,409,40D,411) - * 63 Error valid - * 62 Status overflow - * 61 UE - * 60 Enabled error condition - * 59 Misc register valid (not used) - * 58 Err addr register valid - * 57 Processor context corrupt - * 56:32 Other information - * 31:16 Model specific error code - * 15:0 MCA err code - */ - - /* - * K8_MSR_MCxADDR (64b) - * (0x402,406,40A,40E,412) - * 63:48 reserved - * 47:0 Address - */ - - /* - * K8_MSR_MCxMISC (64b) - * (0x403,407,40B,40F,413) - * Unused on Athlon64 and K8 - */ - -#define K8_MSR_MCGCTL 0x017b /* Machine Chk Global report ctl (64b) - * - * 31:5 reserved - * 4 North Bridge - * 3 Load/Store - * 2 Bus Unit - * 1 Instruction Cache - * 0 Data Cache - */ - -#define K8_MSR_MC4CTL 0x0410 /* North Bridge Check report ctl (64b) */ -#define K8_MSR_MC4STAT 0x0411 /* North Bridge status (64b) */ -#define K8_MSR_MC4ADDR 0x0412 /* North Bridge Address (64b) */ - -static inline int MCI_TO_NODE_ID(struct mem_ctl_info *mci) -{ - return PCI_SLOT(to_pci_dev(mci->dev)->devfn) - 0x18; -} - -/* Ugly hack that allows module to compile when built as part of a 32-bit - * kernel. Just in case anyone wants to run a 32-bit kernel on their Opteron. - */ -#ifndef MAXNODE -#define MAXNODE 8 -#endif - -/* Each entry holds the CPU revision of all CPU cores for the given node. */ -static int k8_node_revision_table[MAXNODE] = { 0 }; - -static inline int node_rev(int node_id) -{ - return k8_node_revision_table[node_id]; -} - -static void store_node_revision(void *param) -{ - int node_id, revision; - - /* Multiple CPU cores on the same node will all write their revision - * number to the same array entry. This is ok. For a given node, all - * CPU cores are on the same piece of silicon and share the same - * revision number. - */ - node_id = (cpuid_ebx(1) >> 24) & 0x07; - revision = (cpuid_eax(1) >> 16) & 0x0f; - k8_node_revision_table[node_id] = revision; -} - -/* Initialize k8_node_revision_table. */ -static void build_node_revision_table(void) -{ - static int initialized = 0; - - if (initialized) - return; - - on_each_cpu(store_node_revision, NULL, 1, 1); - initialized = 1; -} - -enum k8_chips { - OPTERON = 0, -}; - -struct k8_pvt { - struct pci_dev *addr_map; - struct pci_dev *misc_ctl; - - int node_id; /* ID of this node */ - - /* The values of these registers will remain constant so we might as - * well cache them here. - */ - u32 dcl; - u32 dbr[MAX_K8_NODES]; - u32 dlr[MAX_K8_NODES]; - u32 nbcap; - u32 dcsb[K8_NR_CSROWS]; - u32 dcsm[K8_NR_CSROWS]; - u32 dhar; - u32 dbam; -}; - -struct k8_error_info_regs { - u32 nbsh; - u32 nbsl; - u32 nbeah; - u32 nbeal; -}; - -struct k8_error_info { - struct k8_error_info_regs error_info; - u32 nbcfg; - int race_condition_detected; -}; - -struct k8_dev_info { - const char *ctl_name; - u16 addr_map; - u16 misc_ctl; -}; - -static const struct k8_dev_info k8_devs[] = { - [OPTERON] = { - .ctl_name = "Athlon64/Opteron", - .addr_map = PCI_DEVICE_ID_AMD_OPT_1_ADDRMAP, - .misc_ctl = PCI_DEVICE_ID_AMD_OPT_3_MISCCTL}, -}; - -static struct pci_dev * pci_get_related_function(unsigned int vendor, - unsigned int device, struct pci_dev *related) -{ - struct pci_dev *dev; - - dev = NULL; - - while ((dev = pci_get_device(vendor, device, dev)) != NULL) { - if ((dev->bus->number == related->bus->number) && - (PCI_SLOT(dev->devfn) == PCI_SLOT(related->devfn))) - break; - } - - return dev; -} - -/* FIXME - stolen from msr.c - the calls in msr.c could be exported */ -struct msr_command { - int cpu; - int err; - u32 reg; - u32 data[2]; -}; - -static void smp_wrmsr(void *cmd_block) -{ - struct msr_command *cmd = cmd_block; - wrmsr(cmd->reg, cmd->data[0], cmd->data[1]); -} - -static void smp_rdmsr(void *cmd_block) -{ - struct msr_command *cmd = cmd_block; - rdmsr(cmd->reg, cmd->data[0], cmd->data[1]); -} - -static void do_wrmsr(int cpu, u32 reg, u32 eax, u32 edx) -{ - struct msr_command cmd; - - cmd.cpu = raw_smp_processor_id(); - cmd.reg = reg; - cmd.data[0] = eax; - cmd.data[1] = edx; - on_each_cpu(smp_wrmsr, &cmd, 1, 1); -} - -static void do_rdmsr(int cpu, u32 reg, u32 *eax, u32 *edx) -{ - struct msr_command cmd; - - cmd.cpu = raw_smp_processor_id(); - cmd.reg = reg; - on_each_cpu(smp_rdmsr, &cmd, 1, 1); - *eax = cmd.data[0]; - *edx = cmd.data[1]; -} - -/* - * FIXME - This is a large chunk of memory to suck up just to decode the - * syndrome. It would be nice to discover a pattern in the syndromes that - * could be used to quickly identify the channel. The big problems with - * this table is memory usage, lookup speed (could sort and binary search), - * correctness (there could be a transcription error). A zero in any nibble - * for a syndrom is always channel 0, but that only decodes some of the - * syndromes. Can anyone find any other patterns? - * - * The comment in the left column is the nibble that is in error. The least - * significant nibble of the syndrome is the mask for the bits that are - * in error (need to be toggled) for the particular nibble. - */ -#define SYNDROME_TABLE_SIZE 270 -static const unsigned long syndromes_chan0[SYNDROME_TABLE_SIZE] = { - /*0 */ 0xe821, 0x7c32, 0x9413, 0xbb44, 0x5365, 0xc776, 0x2f57, - 0xdd88, 0x35a9, 0xa1ba, 0x499b, 0x66cc, 0x8eed, 0x1afe, 0xf2df, - /*1 */ 0x5d31, 0xa612, 0xfb23, 0x9584, 0xc8b5, 0x3396, 0x6ea7, - 0xeac8, 0xb7f9, 0x4cda, 0x11eb, 0x7f4c, 0x227d, 0xd95e, 0x846f, - /*2 */ 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, - 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, - /*3 */ 0x2021, 0x3032, 0x1013, 0x4044, 0x6065, 0x7076, 0x5057, - 0x8088, 0xa0a9, 0xb0ba, 0x909b, 0xc0cc, 0xe0ed, 0xf0fe, 0xd0df, - /*4 */ 0x5041, 0xa082, 0xf0c3, 0x9054, 0xc015, 0x30d6, 0x6097, - 0xe0a8, 0xb0e9, 0x402a, 0x106b, 0x70fc, 0x20bd, 0xd07e, 0x803f, - /*5 */ 0xbe21, 0xd732, 0x6913, 0x2144, 0x9f65, 0xf676, 0x4857, - 0x3288, 0x8ca9, 0xe5ba, 0x5b9b, 0x13cc, 0xaded, 0xc4fe, 0x7adf, - /*6 */ 0x4951, 0x8ea2, 0xc7f3, 0x5394, 0x1ac5, 0xdd36, 0x9467, - 0xa1e8, 0xe8b9, 0x2f4a, 0x661b, 0xf27c, 0xbb2d, 0x7cde, 0x358f, - /*7 */ 0x74e1, 0x9872, 0xec93, 0xd6b4, 0xa255, 0x4ec6, 0x3a27, - 0x6bd8, 0x1f39, 0xf3aa, 0x874b, 0xbd6c, 0xc98d, 0x251e, 0x51ff, - /*8 */ 0x15c1, 0x2a42, 0x3f83, 0xcef4, 0xdb35, 0xe4b6, 0xf177, - 0x4758, 0x5299, 0x6d1a, 0x78db, 0x89ac, 0x9c6d, 0xa3ee, 0xb62f, - /*9 */ 0x3d01, 0x1602, 0x2b03, 0x8504, 0xb805, 0x9306, 0xae07, - 0xca08, 0xf709, 0xdc0a, 0xe10b, 0x4f0c, 0x720d, 0x590e, 0x640f, - /*a */ 0x9801, 0xec02, 0x7403, 0x6b04, 0xf305, 0x8706, 0x1f07, - 0xbd08, 0x2509, 0x510a, 0xc90b, 0xd60c, 0x4e0d, 0x3a0e, 0xa20f, - /*b */ 0xd131, 0x6212, 0xb323, 0x3884, 0xe9b5, 0x5a96, 0x8ba7, - 0x1cc8, 0xcdf9, 0x7eda, 0xafeb, 0x244c, 0xf57d, 0x465e, 0x976f, - /*c */ 0xe1d1, 0x7262, 0x93b3, 0xb834, 0x59e5, 0xca56, 0x2b87, - 0xdc18, 0x3dc9, 0xae7a, 0x4fab, 0x542c, 0x85fd, 0x164e, 0xf79f, - /*d */ 0x6051, 0xb0a2, 0xd0f3, 0x1094, 0x70c5, 0xa036, 0xc067, - 0x20e8, 0x40b9, 0x904a, 0x601b, 0x307c, 0x502d, 0x80de, 0xe08f, - /*e */ 0xa4c1, 0xf842, 0x5c83, 0xe6f4, 0x4235, 0x1eb6, 0xba77, - 0x7b58, 0xdf99, 0x831a, 0x27db, 0x9dac, 0x396d, 0x65ee, 0xc12f, - /*f */ 0x11c1, 0x2242, 0x3383, 0xc8f4, 0xd935, 0xeab6, 0xfb77, - 0x4c58, 0x5d99, 0x6e1a, 0x7fdb, 0x84ac, 0x9562, 0xa6ee, 0xb72f, - - /*20 */ 0xbe01, 0xd702, 0x6903, 0x2104, 0x9f05, 0xf606, 0x4807, - 0x3208, 0x8c09, 0xe50a, 0x5b0b, 0x130c, 0xad0d, 0xc40e, 0x7a0f, - /*21 */ 0x4101, 0x8202, 0xc303, 0x5804, 0x1905, 0xda06, 0x9b07, - 0xac08, 0xed09, 0x2e0a, 0x6f0b, 0x640c, 0xb50d, 0x760e, 0x370f -}; - -static const unsigned long syndromes_chan1[SYNDROME_TABLE_SIZE] = { - /*10 */ 0x45d1, 0x8a62, 0xcfb3, 0x5e34, 0x1be5, 0xd456, 0x9187, - 0xa718, 0xe2c9, 0x2d7a, 0x68ab, 0xf92c, 0xbcfd, 0x734e, 0x369f, - /*11 */ 0x63e1, 0xb172, 0xd293, 0x14b4, 0x7755, 0xa5c6, 0xc627, - 0x28d8, 0x4b39, 0x99aa, 0xfa4b, 0x3c6c, 0x5f8d, 0x8d1e, 0xeeff, - /*12 */ 0xb741, 0xd982, 0x6ec3, 0x2254, 0x9515, 0xfbd6, 0x4c97, - 0x33a8, 0x84e9, 0xea2a, 0x5d6b, 0x11fc, 0xa6bd, 0xc87e, 0x7f3f, - /*13 */ 0xdd41, 0x6682, 0xbbc3, 0x3554, 0xe815, 0x53d6, 0xce97, - 0x1aa8, 0xc7e9, 0x7c2a, 0xa1fb, 0x2ffc, 0xf2bd, 0x497e, 0x943f, - /*14 */ 0x2bd1, 0x3d62, 0x16b3, 0x4f34, 0x64e5, 0x7256, 0x5987, - 0x8518, 0xaec9, 0xb87a, 0x93ab, 0xca2c, 0xe1fd, 0xf74e, 0xdc9f, - /*15 */ 0x83c1, 0xc142, 0x4283, 0xa4f4, 0x2735, 0x65b6, 0xe677, - 0xf858, 0x7b99, 0x391a, 0xbadb, 0x5cac, 0xdf6d, 0x9dee, 0x1e2f, - /*16 */ 0x8fd1, 0xc562, 0x4ab3, 0xa934, 0x26e5, 0x6c56, 0xe387, - 0xfe18, 0x71c9, 0x3b7a, 0xb4ab, 0x572c, 0xd8fd, 0x924e, 0x1d9f, - /*17 */ 0x4791, 0x89e2, 0xce73, 0x5264, 0x15f5, 0xdb86, 0x9c17, - 0xa3b8, 0xe429, 0x2a5a, 0x6dcb, 0xf1dc, 0xb64d, 0x783e, 0x3faf, - /*18 */ 0x5781, 0xa9c2, 0xfe43, 0x92a4, 0xc525, 0x3b66, 0x6ce7, - 0xe3f8, 0xb479, 0x4a3a, 0x1dbb, 0x715c, 0x26dd, 0xd89e, 0x8f1f, - /*19 */ 0xbf41, 0xd582, 0x6ac3, 0x2954, 0x9615, 0xfcd6, 0x4397, - 0x3ea8, 0x81e9, 0xeb2a, 0x546b, 0x17fc, 0xa8bd, 0xc27e, 0x7d3f, - /*1a */ 0x9891, 0xe1e2, 0x7273, 0x6464, 0xf7f5, 0x8586, 0x1617, - 0xb8b8, 0x2b29, 0x595a, 0xcacb, 0xdcdc, 0x4f4d, 0x3d3e, 0xaeaf, - /*1b */ 0xcce1, 0x4472, 0x8893, 0xfdb4, 0x3f55, 0xb9c6, 0x7527, - 0x56d8, 0x9a39, 0x12aa, 0xde4b, 0xab6c, 0x678d, 0xef1e, 0x23ff, - /*1c */ 0xa761, 0xf9b2, 0x5ed3, 0xe214, 0x4575, 0x1ba6, 0xbcc7, - 0x7328, 0xd449, 0x8a9a, 0x2dfb, 0x913c, 0x365d, 0x688e, 0xcfef, - /*1d */ 0xff61, 0x55b2, 0xaad3, 0x7914, 0x8675, 0x2ca6, 0xd3c7, - 0x9e28, 0x6149, 0xcb9a, 0x34fb, 0xe73c, 0x185d, 0xb28e, 0x4def, - /*1e */ 0x5451, 0xa8a2, 0xfcf3, 0x9694, 0xc2c5, 0x3e36, 0x6a67, - 0xebe8, 0xbfb9, 0x434a, 0x171b, 0x7d7c, 0x292d, 0xd5de, 0x818f, - /*1f */ 0x6fc1, 0xb542, 0xda83, 0x19f4, 0x7635, 0xacb6, 0xc377, - 0x2e58, 0x4199, 0x9b1a, 0xf4db, 0x37ac, 0x586d, 0x82ee, 0xed2f, - - /*22 */ 0xc441, 0x4882, 0x8cc3, 0xf654, 0x3215, 0xbed6, 0x7a97, - 0x5ba8, 0x9fe9, 0x132a, 0xd76b, 0xadfc, 0x69bd, 0xe57e, 0x213f, - /*23 */ 0x7621, 0x9b32, 0xed13, 0xda44, 0xac65, 0x4176, 0x3757, - 0x6f88, 0x19a9, 0xf4ba, 0x829b, 0xb5cc, 0xc3ed, 0x2efe, 0x58df -}; - -static int chan_from_chipkill_syndrome(unsigned long syndrome) -{ - int i; - - debugf0("%s()\n", __func__); - - for (i = 0; i < SYNDROME_TABLE_SIZE; i++) { - if (syndromes_chan0[i] == syndrome) - return 0; - if (syndromes_chan1[i] == syndrome) - return 1; - } - - debugf0("%s(): syndrome(%lx) not found\n", __func__, syndrome); - return -1; -} - -static const char *tt_msgs[] = { /* transaction type */ - "inst", - "data", - "generic", - "reserved" -}; - -static const char *ll_msgs[] = { /* cache level */ - "0", - "1", - "2", - "generic" -}; - -static const char *memtt_msgs[] = { - "generic", - "generic read", - "generic write", - "data read", - "data write", - "inst fetch", - "prefetch", - "evict", - "snoop", - "unknown error 9", - "unknown error 10", - "unknown error 11", - "unknown error 12", - "unknown error 13", - "unknown error 14", - "unknown error 15" -}; - -static const char *pp_msgs[] = { /* participating processor */ - "local node origin", - "local node response", - "local node observed", - "generic" -}; - -static const char *to_msgs[] = { - "no timeout", - "timed out" -}; - -static const char *ii_msgs[] = { /* memory or i/o */ - "mem access", - "reserved", - "i/o access", - "generic" -}; - -static const char *ext_msgs[] = { /* extended error */ - "ECC error", - "CRC error", - "sync error", - "mst abort", - "tgt abort", - "GART error", - "RMW error", - "watchdog error", - "ECC chipkill x4 error", - "unknown error 9", - "unknown error 10", - "unknown error 11", - "unknown error 12", - "unknown error 13", - "unknown error 14", - "unknown error 15" -}; - -static const char *htlink_msgs[] = { - "none", - "1", - "2", - "1 2", - "3", - "1 3", - "2 3", - "1 2 3" -}; - -static inline u64 base_from_dcsb(u32 dcsb) -{ - /* 0xffe0fe00 selects bits 31-21 and 15-9 of a DRAM CS Base Address - * Register (section 3.5.4). Shifting the bits left 4 puts them in - * their proper bit positions of 35-25 and 19-13. - */ - return ((u64) (dcsb & 0xffe0fe00)) << 4; -} - -static u64 mask_from_dcsm(u32 dcsm) -{ - u64 dcsm_bits, other_bits; - - /* Extract bits bits 29-21 and 15-9 from DCSM (section 3.5.5). */ - dcsm_bits = dcsm & DCSM_MASK_BITS; - - /* Set all bits except bits 33-25 and 19-13. */ - other_bits = DCSM_MASK_BITS; - other_bits = ~(other_bits << 4); - - /* The extracted bits from DCSM belong in the spaces represented by - * the cleared bits in other_bits. - */ - return (dcsm_bits << 4) | other_bits; -} - -/* In *base and *limit, pass back the full 40-bit base and limit physical - * addresses for the node given by node_id. This information is obtained from - * DRAM Base (section 3.4.4.1) and DRAM Limit (section 3.4.4.2) registers. The - * base and limit addresses are of type SysAddr, as defined at the start of - * section 3.4.4 (p. 70). They are the lowest and highest physical addresses - * in the address range they represent. - */ -static void get_base_and_limit(struct k8_pvt *pvt, int node_id, - u64 *base, u64 *limit) -{ - *base = ((u64) (pvt->dbr[node_id] & 0xffff0000)) << 8; - - /* Since the limit represents the highest address in the range, we - * must set its lowest 24 bits to 1. - */ - *limit = (((u64) (pvt->dlr[node_id] & 0xffff0000)) << 8) | 0xffffff; -} - -/* Return 1 if the SysAddr given by sys_addr matches the base/limit associated - * with node_id - */ -static int base_limit_match(struct k8_pvt *pvt, u64 sys_addr, int node_id) -{ - u64 base, limit, addr; - - get_base_and_limit(pvt, node_id, &base, &limit); - - /* The k8 treats this as a 40-bit value. However, bits 63-40 will be - * all ones if the most significant implemented address bit is 1. - * Here we discard bits 63-40. See section 3.4.2 of AMD publication - * 24592: AMD x86-64 Architecture Programmer's Manual Volume 1 - * Application Programming. - */ - addr = sys_addr & 0x000000ffffffffffull; - - return (addr >= base) && (addr <= limit); -} - -/* Attempt to map a SysAddr to a node. On success, return a pointer to the - * mem_ctl_info structure for the node that the SysAddr maps to. On failure, - * return NULL. - */ -static struct mem_ctl_info * find_mc_by_sys_addr(struct mem_ctl_info *mci, - u64 sys_addr) -{ - struct k8_pvt *pvt; - int node_id; - u32 intlv_en, bits; - - /* Here we use the DRAM Base (section 3.4.4.1) and DRAM Limit (section - * 3.4.4.2) registers to map the SysAddr to a node ID. - */ - - pvt = mci->pvt_info; - - /* The value of this field should be the same for all DRAM Base - * registers. Therefore we arbitrarily choose to read it from the - * register for node 0. - */ - intlv_en = pvt->dbr[0] & (0x07 << 8); - - if (intlv_en == 0) { /* node interleaving is disabled */ - debugf2("%s(): node interleaving disabled\n", __func__); - for (node_id = 0; ; ) { - if (base_limit_match(pvt, sys_addr, node_id)) - break; - - if (++node_id == MAX_K8_NODES) { - debugf2("%s(): sys_addr 0x%lx " - "does not match any node\n", __func__, - (unsigned long) sys_addr); - return NULL; - } - } - - goto found; - } - - if (unlikely((intlv_en != (0x01 << 8)) && - (intlv_en != (0x03 << 8)) && - (intlv_en != (0x07 << 8)))) { - k8_printk(KERN_WARNING, - "%s(): junk value of 0x%x extracted from IntlvEn " - "field of DRAM Base Register for node 0: This " - "probably indicates a BIOS bug.\n", __func__, - intlv_en); - return NULL; - } - - /* If we get this far, node interleaving is enabled. */ - debugf2("%s(): node interleaving enabled\n", __func__); - bits = (((u32) sys_addr) >> 12) & intlv_en; - - for (node_id = 0; ; ) { - if ((pvt->dlr[node_id] & intlv_en) == bits) - break; /* intlv_sel field matches */ - - if (++node_id == MAX_K8_NODES) { - debugf2("%s(): sys_addr 0x%lx does not match any " - "node\n", __func__, (unsigned long) sys_addr); - return NULL; - } - } - - /* sanity test for sys_addr */ - if (unlikely(!base_limit_match(pvt, sys_addr, node_id))) { - k8_printk(KERN_WARNING, - "%s(): sys_addr 0x%lx falls outside base/limit " - "address range for node %d with node interleaving " - "enabled.\n", __func__, (unsigned long) sys_addr, - node_id); - return NULL; - } - -found: - debugf2("%s(): sys_addr 0x%lx matches node %d\n", __func__, - (unsigned long) sys_addr, node_id); - return edac_mc_find(node_id); -} - -/* Return the base value defined by the DRAM Base register for the node - * represented by mci. This function returns the full 40-bit value despite - * the fact that the register only stores bits 39-24 of the value. See - * section 3.4.4.1. - */ -static inline u64 get_dram_base(struct mem_ctl_info *mci) -{ - struct k8_pvt *pvt; - - pvt = mci->pvt_info; - return ((u64) (pvt->dbr[pvt->node_id] & 0xffff0000)) << 8; -} - -/* Obtain info from the DRAM Hole Address Register (section 3.4.8) for the - * node represented by mci. Info is passed back in *hole_base, *hole_offset, - * and *hole_size. Function returns 0 if info is valid or 1 if info is - * invalid. Info may be invalid for either of the following reasons: - * - * - The revision of the node is not E or greater. In this case, the DRAM - * Hole Address Register does not exist. - * - The DramHoleValid bit is cleared in the DRAM Hole Address Register, - * indicating that its contents are not valid. - * - * The values passed back in *hole_base, *hole_offset, and *hole_size are - * complete 32-bit values despite the fact that the bitfields in the DHAR - * only represent bits 31-24 of the base and offset values. - */ -static int get_dram_hole_info(struct mem_ctl_info *mci, u64 *hole_base, - u64 *hole_offset, u64 *hole_size) -{ - struct k8_pvt *pvt; - u64 base; - - pvt = mci->pvt_info; - - if (node_rev(pvt->node_id) < OPTERON_CPU_REV_E) { - debugf2("revision %d for node %d does not support DHAR\n", - node_rev(pvt->node_id), pvt->node_id); - return 1; - } - - if ((pvt->dhar & 0x01) == 0) { - debugf2("DramHoleValid bit cleared in DHAR for node %d\n", - pvt->node_id); - return 1; /* DramHoleValid bit is cleared */ - } - - /* +------------------+--------------------+--------------------+----- - * | memory | DRAM hole | relocated | - * | [0, (x - 1)] | [x, 0xffffffff] | addresses from | - * | | | DRAM hole | - * | | | [0x100000000, | - * | | | (0x100000000+ | - * | | | (0xffffffff-x))] | - * +------------------+--------------------+--------------------+----- - * - * Above is a diagram of physical memory showing the DRAM hole and the - * relocated addresses from the DRAM hole. As shown, the DRAM hole - * starts at address x (the base address) and extends through address - * 0xffffffff. The DRAM Hole Address Register (DHAR) relocates the - * addresses in the hole so that they start at 0x100000000. - */ - - base = pvt->dhar & 0xff000000; - *hole_base = base; - *hole_offset = (pvt->dhar & 0x0000ff00) << 16; - *hole_size = (0x1ull << 32) - base; - debugf2("DHAR info for node %d: base 0x%lx offset 0x%lx size 0x%lx\n", - pvt->node_id, (unsigned long) *hole_base, - (unsigned long) *hole_offset, (unsigned long) *hole_size); - return 0; -} - -/* Return the DramAddr that the SysAddr given by sys_addr maps to. It is - * assumed that sys_addr maps to the node given by mci. - */ -static u64 sys_addr_to_dram_addr(struct mem_ctl_info *mci, u64 sys_addr) -{ - u64 dram_base, hole_base, hole_offset, hole_size, dram_addr; - - /* The first part of section 3.4.4 (p. 70) shows how the DRAM Base - * (section 3.4.4.1) and DRAM Limit (section 3.4.4.2) registers are - * used to translate a SysAddr to a DramAddr. If the DRAM Hole - * Address Register (DHAR) is enabled, then it is also involved in - * translating a SysAddr to a DramAddr. Sections 3.4.8 and 3.5.8.2 - * describe the DHAR and how it is used for memory hoisting. These - * parts of the documentation are unclear. I interpret them as - * follows: - * - * When node n receives a SysAddr, it processes the SysAddr as - * follows: - * - * 1. It extracts the DRAMBase and DRAMLimit values from the - * DRAM Base and DRAM Limit registers for node n. If the - * SysAddr is not within the range specified by the base - * and limit values, then node n ignores the Sysaddr - * (since it does not map to node n). Otherwise continue - * to step 2 below. - * - * 2. If the DramHoleValid bit of the DHAR for node n is - * clear, the DHAR is disabled so skip to step 3 below. - * Otherwise see if the SysAddr is within the range of - * relocated addresses (starting at 0x100000000) from the - * DRAM hole. If not, skip to step 3 below. Else get the - * value of the DramHoleOffset field from the DHAR. To - * obtain the DramAddr, subtract the offset defined by - * this value from the SysAddr. - * - * 3. Obtain the base address for node n from the DRAMBase - * field of the DRAM Base register for node n. To obtain - * the DramAddr, subtract the base address from the - * SysAddr, as shown near the start of section 3.4.4 - * (p. 70). - */ - - dram_base = get_dram_base(mci); - - if (!get_dram_hole_info(mci, &hole_base, &hole_offset, &hole_size)) { - if ((sys_addr >= (1ull << 32)) && - (sys_addr < ((1ull << 32) + hole_size))) { - /* use DHAR to translate SysAddr to DramAddr */ - dram_addr = sys_addr - hole_offset; - debugf2("using DHAR to translate SysAddr 0x%lx to " - "DramAddr 0x%lx\n", - (unsigned long) sys_addr, - (unsigned long) dram_addr); - return dram_addr; - } - } - - /* Translate the SysAddr to a DramAddr as shown near the start of - * section 3.4.4 (p. 70). Although sys_addr is a 64-bit value, the k8 - * only deals with 40-bit values. Therefore we discard bits 63-40 of - * sys_addr below. If bit 39 of sys_addr is 1 then the bits we - * discard are all 1s. Otherwise the bits we discard are all 0s. See - * section 3.4.2 of AMD publication 24592: AMD x86-64 Architecture - * Programmer's Manual Volume 1 Application Programming. - */ - dram_addr = (sys_addr & 0xffffffffffull) - dram_base; - - debugf2("using DRAM Base register to translate SysAddr 0x%lx to " - "DramAddr 0x%lx\n", (unsigned long) sys_addr, - (unsigned long) dram_addr); - return dram_addr; -} - -/* Parameter intlv_en is the value of the IntlvEn field from a DRAM Base - * register (section 3.4.4.1). Return the number of bits from a SysAddr that - * are used for node interleaving. - */ -static int num_node_interleave_bits(unsigned intlv_en) -{ - static const int intlv_shift_table[] = { 0, 1, 0, 2, 0, 0, 0, 3 }; - int n; - - BUG_ON(intlv_en > 7); - n = intlv_shift_table[intlv_en]; - debugf2("using %d bits for node interleave\n", n); - return n; -} - -/* Translate the DramAddr given by dram_addr to an InputAddr and return the - * result. - */ -static u64 dram_addr_to_input_addr(struct mem_ctl_info *mci, u64 dram_addr) -{ - struct k8_pvt *pvt; - int intlv_shift; - u64 input_addr; - - pvt = mci->pvt_info; - - /* Near the start of section 3.4.4 (p. 70), the k8 documentation gives - * instructions for translating a DramAddr to an InputAddr. Here we - * are following these instructions. - */ - intlv_shift = num_node_interleave_bits((pvt->dbr[0] >> 8) & 0x07); - input_addr = ((dram_addr >> intlv_shift) & 0xffffff000ull) + - (dram_addr & 0xfff); - - debugf2("DramAddr 0x%lx translates to InputAddr 0x%lx\n", - (unsigned long) dram_addr, (unsigned long) input_addr); - return input_addr; -} - -/* Translate the SysAddr represented by sys_addr to an InputAddr and return - * the result. It is assumed that sys_addr maps to the node given by mci. - */ -static u64 sys_addr_to_input_addr(struct mem_ctl_info *mci, u64 sys_addr) -{ - u64 input_addr; - - input_addr = dram_addr_to_input_addr( - mci, sys_addr_to_dram_addr(mci, sys_addr)); - debugf2("%s(): SysAdddr 0x%lx translates to InputAddr 0x%lx\n", - __func__, (unsigned long) sys_addr, - (unsigned long) input_addr); - return input_addr; -} - -/* input_addr is an InputAddr associated with the node given by mci. Return - * the csrow that input_addr maps to, or -1 on failure (no csrow claims - * input_addr). - */ -static int input_addr_to_csrow(struct mem_ctl_info *mci, u64 input_addr) -{ - struct k8_pvt *pvt; - int i; - u32 dcsb, dcsm; - u64 base, mask; - - pvt = mci->pvt_info; - - /* Here we use the DRAM CS Base (section 3.5.4) and DRAM CS Mask - * (section 3.5.5) registers. For each CS base/mask register pair, - * test the condition shown near the start of section 3.5.4 (p. 84). - */ - - for (i = 0; i < K8_NR_CSROWS; i++) { - dcsb = pvt->dcsb[i]; - dcsm = pvt->dcsm[i]; - - if ((dcsb & 0x01) == 0) { - debugf2("input_addr_to_csrow: CSBE bit is cleared " - "for csrow %d (node %d)\n", i, - pvt->node_id); - continue; /* CSBE bit is cleared */ - } - - base = base_from_dcsb(dcsb); - mask = ~mask_from_dcsm(dcsm); - - if ((input_addr & mask) == (base & mask)) { - debugf2("InputAddr 0x%lx matches csrow %d " - "(node %d)\n", (unsigned long) input_addr, i, - pvt->node_id); - return i; /* success: csrow i matches */ - } - } - - debugf2("no matching csrow for InputAddr 0x%lx (node %d)\n", - (unsigned long) input_addr, pvt->node_id); - return -1; /* failed to find matching csrow */ -} - -/* input_addr is an InputAddr associated with the node represented by mci. - * Translate input_addr to a DramAddr and return the result. - */ -static u64 input_addr_to_dram_addr(struct mem_ctl_info *mci, u64 input_addr) -{ - struct k8_pvt *pvt; - int node_id, intlv_shift; - u64 bits, dram_addr; - u32 intlv_sel; - - /* Near the start of section 3.4.4 (p. 70), the k8 documentation shows - * how to translate a DramAddr to an InputAddr. Here we reverse this - * procedure. When translating from a DramAddr to an InputAddr, the - * bits used for node interleaving are discarded. Here we recover - * these bits from the IntlvSel field of the DRAM Limit register - * (section 3.4.4.2) for the node that input_addr is associated with. - */ - - pvt = mci->pvt_info; - node_id = pvt->node_id; - BUG_ON((node_id < 0) || (node_id > 7)); - intlv_shift = num_node_interleave_bits((pvt->dbr[0] >> 8) & 0x07); - - if (intlv_shift == 0) { - debugf1("node interleaving disabled: InputAddr 0x%lx " - "translates to DramAddr of same value\n", - (unsigned long) input_addr); - return input_addr; - } - - bits = ((input_addr & 0xffffff000ull) << intlv_shift) + - (input_addr & 0xfff); - intlv_sel = pvt->dlr[node_id] & (((1 << intlv_shift) - 1) << 8); - dram_addr = bits + (intlv_sel << 4); - debugf1("InputAddr 0x%lx translates to DramAddr 0x%lx " - "(%d node interleave bits)\n", (unsigned long) input_addr, - (unsigned long) dram_addr, intlv_shift); - return dram_addr; -} - -/* dram_addr is a DramAddr that maps to the node represented by mci. Convert - * dram_addr to a SysAddr and return the result. - */ -static u64 dram_addr_to_sys_addr(struct mem_ctl_info *mci, u64 dram_addr) -{ - struct k8_pvt *pvt; - u64 hole_base, hole_offset, hole_size, base, limit, sys_addr; - - pvt = mci->pvt_info; - - if (!get_dram_hole_info(mci, &hole_base, &hole_offset, &hole_size)) { - if ((dram_addr >= hole_base) && - (dram_addr < (hole_base + hole_size))) { - /* use DHAR to translate DramAddr to SysAddr */ - sys_addr = dram_addr + hole_offset; - debugf1("using DHAR to translate DramAddr 0x%lx to " - "SysAddr 0x%lx\n", (unsigned long) dram_addr, - (unsigned long) sys_addr); - return sys_addr; - } - } - - get_base_and_limit(pvt, pvt->node_id, &base, &limit); - sys_addr = dram_addr + base; - - /* The sys_addr we have computed up to this point is a 40-bit value - * because the k8 deals with 40-bit values. However, the value we are - * supposed to return is a full 64-bit physical address. The AMD - * x86-64 architecture specifies that the most significant implemented - * address bit through bit 63 of a physical address must be either all - * 0s or all 1s. Therefore we sign-extend the 40-bit sys_addr to a - * 64-bit value below. See section 3.4.2 of AMD publication 24592: - * AMD x86-64 Architecture Programmer's Manual Volume 1 Application - * Programming. - */ - sys_addr |= ~((sys_addr & (1ull << 39)) - 1); - - debugf1("Using DRAM Base register for node %d to translate " - "DramAddr 0x%lx to SysAddr 0x%lx\n", pvt->node_id, - (unsigned long) dram_addr, (unsigned long) sys_addr); - return sys_addr; -} - -/* input_addr is an InputAddr associated with the node given by mci. - * Translate input_addr to a SysAddr and return the result. - */ -static inline u64 input_addr_to_sys_addr(struct mem_ctl_info *mci, - u64 input_addr) -{ - return dram_addr_to_sys_addr( - mci, input_addr_to_dram_addr(mci, input_addr)); -} - -/* Find the minimum and maximum InputAddr values that map to the given csrow. - * Pass back these values in *input_addr_min and *input_addr_max. - */ -static void find_csrow_limits(struct mem_ctl_info *mci, int csrow, - u64 *input_addr_min, u64 *input_addr_max) -{ - struct k8_pvt *pvt; - u64 base, mask; - - pvt = mci->pvt_info; - BUG_ON((csrow < 0) || (csrow >= K8_NR_CSROWS)); - base = base_from_dcsb(pvt->dcsb[csrow]); - mask = mask_from_dcsm(pvt->dcsm[csrow]); - *input_addr_min = base & ~mask; - - /* To find the max InputAddr for the csrow, start with the base - * address and set all bits that are "don't care" bits in the test at - * the start of section 3.5.4 (p. 84). The "don't care" bits are all - * set bits in the mask and all bits in the gaps between bit ranges - * [35-25] and [19-13]. The value 0x1f01fff represents bits [24-20] - * and [12-0], which are all bits in the above-mentioned gaps. - */ - *input_addr_max = base | mask | 0x1f01fff; -} - -/* Extract error address from MCA NB Address Low (section 3.6.4.5) and - * MCA NB Address High (section 3.6.4.6) register values and return the - * result. - */ -static inline u64 error_address_from_k8_error_info( - struct k8_error_info *info) -{ - return (((u64) (info->error_info.nbeah & 0xff)) << 32) + - (info->error_info.nbeal & ~0x03); -} - -static inline void error_address_to_page_and_offset(u64 error_address, - u32 *page, u32 *offset) -{ - *page = (u32) (error_address >> PAGE_SHIFT); - *offset = ((u32) error_address) & ~PAGE_MASK; -} - -/* Return 1 if registers contain valid error information. Else return 0. */ -static inline int k8_error_info_valid(struct k8_error_info_regs *regs) -{ - return ((regs->nbsh & K8_NBSH_VALID_BIT) != 0); -} - -/* return 0 if regs contains valid error info; else return 1 */ -static int k8_get_error_info_regs(struct mem_ctl_info *mci, - struct k8_error_info_regs *regs) -{ - struct k8_pvt *pvt; - - pvt = mci->pvt_info; - pci_read_config_dword(pvt->misc_ctl, K8_NBSH, ®s->nbsh); - - if (!k8_error_info_valid(regs)) - return 1; - - pci_read_config_dword(pvt->misc_ctl, K8_NBSL, ®s->nbsl); - pci_read_config_dword(pvt->misc_ctl, K8_NBEAH, ®s->nbeah); - pci_read_config_dword(pvt->misc_ctl, K8_NBEAL, ®s->nbeal); - return 0; -} - -static void k8_get_error_info(struct mem_ctl_info *mci, - struct k8_error_info *info) -{ - struct k8_pvt *pvt; - struct k8_error_info_regs regs; - - pvt = mci->pvt_info; - info->race_condition_detected = 0; - - if (k8_get_error_info_regs(mci, &info->error_info)) - return; - - /* - * Here's the problem with the K8's EDAC reporting: - * There are four registers which report pieces of error - * information. These four registers are shared between - * CEs and UEs. Furthermore, contrary to what is stated in - * the OBKG, the overflow bit is never used! Every error - * always updates the reporting registers. - * - * Can you see the race condition? All four error reporting - * registers must be read before a new error updates them! - * There is no way to read all four registers atomically. The - * best than can be done is to detect that a race has occured - * and then report the error without any kind of precision. - * - * What is still positive is that errors are - * still reported and thus problems can still be detected - - * just not localized because the syndrome and address are - * spread out across registers. - * - * Grrrrr!!!!! Here's hoping that AMD fixes this in some - * future K8 rev. UEs and CEs should have separate - * register sets with proper overflow bits that are used! - * At very least the problem can be fixed by honoring the - * ErrValid bit in nbsh and not updating registers - just - * set the overflow bit - unless the current error is CE - * and the new error is UE which would be the only situation - * for overwriting the current values. - */ - - regs = info->error_info; - - /* Use info from the second read - most current */ - if (unlikely(k8_get_error_info_regs(mci, &info->error_info))) - return; - - /* clear the error */ - pci_write_bits32(pvt->misc_ctl, K8_NBSH, 0, K8_NBSH_VALID_BIT); - - pci_read_config_dword(pvt->misc_ctl, K8_NBCFG, &info->nbcfg); - info->race_condition_detected = - ((regs.nbsh != info->error_info.nbsh) || - (regs.nbsl != info->error_info.nbsl) || - (regs.nbeah != info->error_info.nbeah) || - (regs.nbeal != info->error_info.nbeal)); -} - -static inline void decode_gart_tlb_error(struct mem_ctl_info *mci, - struct k8_error_info *info) -{ - u32 err_code; - u32 ec_tt; /* error code transaction type (2b) */ - u32 ec_ll; /* error code cache level (2b) */ - - err_code = info->error_info.nbsl & 0xffffUL; - ec_tt = (err_code >> 2) & 0x03UL; - ec_ll = (err_code >> 0) & 0x03UL; - k8_mc_printk(mci, KERN_ERR, - "GART TLB errorr: transaction type(%s), " - "cache level(%s)\n", tt_msgs[ec_tt], ll_msgs[ec_ll]); -} - -static inline void decode_cache_error(struct mem_ctl_info *mci, - struct k8_error_info *info) -{ - u32 err_code; - u32 ec_rrrr; /* error code memory transaction (4b) */ - u32 ec_tt; /* error code transaction type (2b) */ - u32 ec_ll; /* error code cache level (2b) */ - - err_code = info->error_info.nbsl & 0xffffUL; - ec_rrrr = (err_code >> 4) & 0x0fUL; - ec_tt = (err_code >> 2) & 0x03UL; - ec_ll = (err_code >> 0) & 0x03UL; - k8_mc_printk(mci, KERN_ERR, - "cache heirarchy error: memory transaction type(%s), " - "transaction type(%s), cache level(%s)\n", - memtt_msgs[ec_rrrr], tt_msgs[ec_tt], ll_msgs[ec_ll]); -} - -/* sys_addr is an error address (a SysAddr) extracted from the MCA NB Address - * Low (section 3.6.4.5) and MCA NB Address High (section 3.6.4.6) registers - * of a node that detected an ECC memory error. mci represents the node that - * the error address maps to (possibly different from the node that detected - * the error). Return the number of the csrow that sys_addr maps to, or -1 on - * error. - */ -static int sys_addr_to_csrow(struct mem_ctl_info *mci, u64 sys_addr) -{ - int csrow; - - csrow = input_addr_to_csrow(mci, - sys_addr_to_input_addr(mci, sys_addr)); - - if (csrow == -1) - k8_mc_printk(mci, KERN_ERR, - "Failed to translate InputAddr to csrow for " - "address 0x%lx\n", (unsigned long) sys_addr); - - return csrow; -} - -static void k8_handle_ce(struct mem_ctl_info *mci, struct k8_error_info *info) -{ - struct k8_pvt *pvt; - unsigned syndrome; - u64 error_address; - u32 page, offset; - int channel, csrow; - struct mem_ctl_info *log_mci, *src_mci; - - log_mci = mci; - pvt = mci->pvt_info; - - if ((info->error_info.nbsh & BIT(26)) == 0) - goto no_info; /* error address not valid */ - - error_address = error_address_from_k8_error_info(info); - syndrome = ((info->error_info.nbsh >> 15) & 0xff); - - if (info->nbcfg & BIT(23)) { - /* chipkill ecc mode */ - syndrome += (info->error_info.nbsl >> 16) & 0xff00; - channel = chan_from_chipkill_syndrome(syndrome); - - if (channel < 0) { - /* If the syndrome couldn't be found then the race - * condition for error reporting registers likely - * occurred. There's alot more in doubt than just the - * channel. Might as well just log the error without - * any info. - */ - k8_mc_printk(mci, KERN_WARNING, - "unknown syndrome 0x%x - possible error " - "reporting race\n", syndrome); - goto no_info; - } - } else - /* non-chipkill ecc mode - * - * The k8 documentation is unclear about how to determine the - * channel number when using non-chipkill memory. This method - * was obtained from email communication with someone at AMD. - */ - channel = ((error_address & BIT(3)) != 0); - - /* Find out which node the error address belongs to. This may be - * different from the node that detected the error. - */ - if ((src_mci = find_mc_by_sys_addr(mci, error_address)) == NULL) { - k8_mc_printk(mci, KERN_ERR, - "failed to map error address 0x%lx to a node\n", - (unsigned long) error_address); - goto no_info; - } - - log_mci = src_mci; - - if ((csrow = sys_addr_to_csrow(log_mci, error_address)) < 0) - goto no_info; - - error_address_to_page_and_offset(error_address, &page, &offset); - edac_mc_handle_ce(log_mci, page, offset, syndrome, csrow, channel, - EDAC_MOD_STR); - return; - -no_info: - edac_mc_handle_ce_no_info(log_mci,EDAC_MOD_STR); -} - -static void k8_handle_ue(struct mem_ctl_info *mci, struct k8_error_info *info) -{ - int csrow; - u64 error_address; - u32 page, offset; - struct mem_ctl_info *log_mci, *src_mci; - - log_mci = mci; - - if ((info->error_info.nbsh & BIT(26)) == 0) - goto no_info; /* error address not valid */ - - error_address = error_address_from_k8_error_info(info); - - /* Find out which node the error address belongs to. This may be - * different from the node that detected the error. - */ - if ((src_mci = find_mc_by_sys_addr(mci, error_address)) == NULL) { - k8_mc_printk(mci, KERN_ERR, - "failed to map error address 0x%lx to a node\n", - (unsigned long) error_address); - goto no_info; - } - - log_mci = src_mci; - - if ((csrow = sys_addr_to_csrow(log_mci, error_address)) < 0) - goto no_info; - - error_address_to_page_and_offset(error_address, &page, &offset); - edac_mc_handle_ue(log_mci, page, offset, csrow, EDAC_MOD_STR); - return; - -no_info: - edac_mc_handle_ue_no_info(log_mci, EDAC_MOD_STR); -} - -static void decode_bus_error(struct mem_ctl_info *mci, - struct k8_error_info *info) -{ - u32 err_code, ext_ec; - u32 ec_pp; /* error code participating processor (2p) */ - u32 ec_to; /* error code timed out (1b) */ - u32 ec_rrrr; /* error code memory transaction (4b) */ - u32 ec_ii; /* error code memory or I/O (2b) */ - u32 ec_ll; /* error code cache level (2b) */ - - debugf0("MC%d: %s()\n", mci->mc_idx, __func__); - err_code = info->error_info.nbsl & 0xffffUL; - ec_pp = (err_code >> 9) & 0x03UL; - ec_to = (err_code >> 8) & 0x01UL; - ec_rrrr = (err_code >> 4) & 0x0fUL; - ec_ii = (err_code >> 2) & 0x03UL; - ec_ll = (err_code >> 0) & 0x03UL; - ext_ec = (info->error_info.nbsl >> 16) & 0xfUL; - - /* FIXME - these should report through EDAC channels */ - k8_mc_printk(mci, KERN_ERR, "general bus error: participating " - "processor(%s), time-out(%s) memory transaction " - "type(%s), mem or i/o(%s), cache level(%s)\n", - pp_msgs[ec_pp], to_msgs[ec_to], memtt_msgs[ec_rrrr], - ii_msgs[ec_ii], ll_msgs[ec_ll]); - - if (ec_pp & 0x02) - return; /* We aren't the node involved */ - - /* FIXME - other errors should have other error handling mechanisms */ - if (ext_ec && (ext_ec != 0x8)) { - k8_mc_printk(mci, KERN_ERR, - "no special error handling for this error\n"); - return; - } - - if (info->error_info.nbsh & BIT(14)) - k8_handle_ce(mci, info); - else if (info->error_info.nbsh & BIT(13)) - k8_handle_ue(mci, info); - - /* If main error is CE then overflow must be CE. If main error is UE - * then overflow is unknown. We'll call the overflow a CE - if - * panic_on_ue is set then we're already panic'ed and won't arrive - * here. If panic_on_ue is not set then apparently someone doesn't - * think that UE's are catastrophic. - */ - if (info->error_info.nbsh & BIT(30)) - edac_mc_handle_ce_no_info(mci, - EDAC_MOD_STR " Error Overflow set"); -} - -/* return 1 if error found or 0 if error not found */ -static int k8_process_error_info(struct mem_ctl_info *mci, - struct k8_error_info *info, int handle_errors) -{ - struct k8_pvt *pvt; - struct k8_error_info_regs *regs; - u32 err_code, ext_ec; - int gart_tlb_error; - - pvt = mci->pvt_info; - - /* check for an error */ - if (!k8_error_info_valid(&info->error_info)) - return 0; - - if (!handle_errors) - return 1; - - if (info->race_condition_detected) - k8_mc_printk(mci, KERN_WARNING, "race condition detected!\n"); - - gart_tlb_error = 0; - regs = &info->error_info; - err_code = info->error_info.nbsl & 0xffffUL; - ext_ec = (info->error_info.nbsl >> 16) & 0x0fUL; - debugf1("NorthBridge ERROR: mci(0x%p) node(%d) ErrAddr(0x%.8x-%.8x) " - "nbsh(0x%.8x) nbsl(0x%.8x)\n", mci, pvt->node_id, regs->nbeah, - regs->nbeal, regs->nbsh, regs->nbsl); - - if ((err_code & 0xfff0UL) == 0x0010UL) { - debugf1("GART TLB error\n"); - gart_tlb_error = 1; - decode_gart_tlb_error(mci, info); - } else if ((err_code & 0xff00UL) == 0x0100UL) { - debugf1("Cache error\n"); - decode_cache_error(mci, info); - } else if ((err_code & 0xf800UL) == 0x0800UL) { - debugf1("Bus error\n"); - decode_bus_error(mci, info); - } else - /* shouldn't reach here! */ - k8_mc_printk(mci, KERN_WARNING, - "%s(): unknown MCE error 0x%x\n", __func__, - err_code); - - k8_mc_printk(mci, KERN_ERR, "extended error code: %s\n", - ext_msgs[ext_ec]); - - if (((ext_ec >= 1 && ext_ec <= 4) || (ext_ec == 6)) && - ((info->error_info.nbsh >> 4) & 0x07UL)) - k8_mc_printk(mci, KERN_ERR, - "Error on hypertransport link: %s\n", - htlink_msgs[(info->error_info.nbsh >> 4) & 0x07UL]); - - /* GART errors are benign as per AMD, do not panic on them */ - if (!gart_tlb_error && (regs->nbsh & BIT(29))) { - k8_mc_printk(mci, KERN_CRIT, "uncorrected error\n"); - edac_mc_handle_ue_no_info(mci, "UE bit is set\n"); - } - - if (regs->nbsh & BIT(25)) - panic("MC%d: processor context corrupt", mci->mc_idx); - - return 1; -} - -static void k8_check(struct mem_ctl_info *mci) -{ - struct k8_error_info info; - - debugf3("%s()\n", __func__); - k8_get_error_info(mci, &info); - k8_process_error_info(mci, &info, 1); -} - -static int k8_get_devs(struct mem_ctl_info *mci, int dev_idx) -{ - const struct k8_dev_info *k8_dev = &k8_devs[dev_idx]; - struct k8_pvt *pvt; - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - pvt = mci->pvt_info; - - /* The address mapping device provides a table that indicates which - * physical address ranges are owned by which node. Each node's - * memory controller has memory controller addresses that begin at - * 0x0. - */ - pvt->addr_map = pci_get_related_function(PCI_VENDOR_ID_AMD, - k8_dev->addr_map, pdev); - - if (pvt->addr_map == NULL) { - k8_printk(KERN_ERR, "error address map device not found: " - "vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, k8_dev->addr_map); - return 1; - } - - debugf1("Addr Map device PCI Bus ID:\t%s\n", - pci_name(pvt->addr_map)); - - pvt->misc_ctl = pci_get_related_function(PCI_VENDOR_ID_AMD, - k8_dev->misc_ctl, pdev); - - if (pvt->misc_ctl == NULL) { - pci_dev_put(pvt->addr_map); - pvt->addr_map = NULL; - k8_printk(KERN_ERR, "error miscellaneous device not found: " - "vendor %x device 0x%x (broken BIOS?)\n", - PCI_VENDOR_ID_AMD, k8_dev->misc_ctl); - return 1; - } - - debugf1("Misc device PCI Bus ID:\t\t%s\n", - pci_name(pvt->misc_ctl)); - - return 0; -} - -static void k8_get_mc_regs(struct mem_ctl_info *mci) -{ - struct k8_pvt *pvt; - struct pci_dev *pdev; - int i; - - pdev = to_pci_dev(mci->dev); - pvt = mci->pvt_info; - debugf1("k8 regs:\n"); - - for (i = 0; i < MAX_K8_NODES; i++) { - pci_read_config_dword(pvt->addr_map, K8_DBR + (i * 8), - &pvt->dbr[i]); - pci_read_config_dword(pvt->addr_map, K8_DLR + (i * 8), - &pvt->dlr[i]); - debugf1(" dbr[%d]: 0x%x\n", i, pvt->dbr[i]); - debugf1(" dlr[%d]: 0x%x\n", i, pvt->dlr[i]); - } - - pci_read_config_dword(pvt->misc_ctl, K8_NBCAP, &pvt->nbcap); - debugf1(" nbcap: %u\n", pvt->nbcap); - - for (i = 0; i < K8_NR_CSROWS; i++) { - pci_read_config_dword(pdev, K8_DCSB + (i * 4), &pvt->dcsb[i]); - pci_read_config_dword(pdev, K8_DCSM + (i * 4), &pvt->dcsm[i]); - debugf1(" dcsb[%d]: 0x%x\n", i, pvt->dcsb[i]); - debugf1(" dcsm[%d]: 0x%x\n", i, pvt->dcsm[i]); - } - - pci_read_config_dword(pvt->addr_map, K8_DHAR, &pvt->dhar); - pci_read_config_dword(pdev, K8_DBAM, &pvt->dbam); - debugf1(" dhar: 0x%x\n", pvt->dhar); - debugf1(" dbam: 0x%x\n", pvt->dbam); -} - -/* Return 1 if dual channel mode is active. Else return 0. */ -static inline int dual_channel_active(u32 dcl) -{ - return (dcl >> 16) & 0x1; -} - -static u32 csrow_nr_pages(int csrow_nr, struct k8_pvt *pvt) -{ - u32 cs; - - /* The math on this doesn't look right on the surface because x/2*4 - * can be simplified to x*2 but this expression makes use of the fact - * that it is integral math where 1/2=0 - */ - cs = (pvt->dbam >> ((csrow_nr / 2) * 4)) & 0xF; /* PG88 */ - - /* This line is tricky. It collapses the table used by revision D and - * later to one that matches revision CG and earlier - */ - cs -= (node_rev(pvt->node_id) >= OPTERON_CPU_REV_D) ? - (cs > 8 ? 4 : (cs > 5 ? 3 : (cs > 2 ? 1 : 0))) : 0; - - /* 25 is 32MiB minimum DIMM size */ - return 1 << (cs + 25 - PAGE_SHIFT + dual_channel_active(pvt->dcl)); -} - -static int k8_init_csrows(struct mem_ctl_info *mci) -{ - struct csrow_info *csrow; - struct k8_pvt *pvt; - int i, empty; - u64 input_addr_min, input_addr_max, sys_addr; - u32 nbcfg; - - pvt = mci->pvt_info; - pci_read_config_dword(pvt->misc_ctl, K8_NBCFG, &nbcfg); - empty = 1; - - for (i = 0; i < K8_NR_CSROWS; i++) { - csrow = &mci->csrows[i]; - - if ((pvt->dcsb[i] & 0x01) == 0) { - debugf1("csrow %d empty for node %d\n", i, - pvt->node_id); - continue; /* empty */ - } - - debugf1("revision for this node (%d) is %d\n", - pvt->node_id, node_rev(pvt->node_id)); - empty = 0; - csrow->nr_pages = csrow_nr_pages(i, pvt); - find_csrow_limits(mci, i, &input_addr_min, &input_addr_max); - sys_addr = input_addr_to_sys_addr(mci, input_addr_min); - csrow->first_page = (u32) (sys_addr >> PAGE_SHIFT); - sys_addr = input_addr_to_sys_addr(mci, input_addr_max); - csrow->last_page = (u32) (sys_addr >> PAGE_SHIFT); - csrow->page_mask = ~mask_from_dcsm(pvt->dcsm[i]); - csrow->grain = 8; /* 8 bytes of resolution */ - csrow->mtype = ((pvt->dcl >> 18) & 0x1) ? MEM_DDR : MEM_RDDR; - csrow->dtype = ((pvt->dcl >> (20 + (i / 2))) & 0x01) ? - DEV_X4 : DEV_UNKNOWN; - debugf1("for node %d csrow %d:\n nr_pages: %u " - "input_addr_min: 0x%lx input_addr_max: 0x%lx " - "sys_addr: 0x%lx first_page: 0x%lx last_page: 0x%lx " - "page_mask: 0x%lx\n", pvt->node_id, i, - (unsigned) csrow->nr_pages, - (unsigned long) input_addr_min, - (unsigned long) input_addr_max, - (unsigned long) sys_addr, - csrow->first_page, csrow->last_page, - csrow->page_mask); - - if (nbcfg & BIT(22)) - csrow->edac_mode = (nbcfg & BIT(23)) ? - EDAC_S4ECD4ED : EDAC_SECDED; - else - csrow->edac_mode = EDAC_NONE; - } - - return empty; -} - -static void k8_enable_error_reporting(struct mem_ctl_info *mci) -{ - struct k8_pvt *pvt; - u32 mc4ctl_l=0, mc4ctl_h=0, mcgctl_l=0, mcgctl_h=0; - - pvt = mci->pvt_info; - pci_write_bits32(pvt->misc_ctl, K8_NBCTL, 0x3UL, 0x3UL); - do_rdmsr(pvt->node_id, K8_MSR_MC4CTL, &mc4ctl_l, &mc4ctl_h); - mc4ctl_l |= BIT(0) | BIT(1); - do_wrmsr(pvt->node_id, K8_MSR_MC4CTL, mc4ctl_l, mc4ctl_h); - do_rdmsr(pvt->node_id, K8_MSR_MC4CTL, &mc4ctl_l, &mc4ctl_h); - do_rdmsr(pvt->node_id, K8_MSR_MCGCTL, &mcgctl_l, &mcgctl_h); - mcgctl_l |= BIT(4); - do_wrmsr(pvt->node_id, K8_MSR_MCGCTL, mcgctl_l, mcgctl_h); - do_rdmsr(pvt->node_id, K8_MSR_MCGCTL, &mcgctl_l, &mcgctl_h); -} - -static int k8_probe1(struct pci_dev *pdev, int dev_idx) -{ - struct mem_ctl_info *mci; - struct k8_pvt *pvt; - u32 dcl, dual_channel; - - debugf0("%s()\n", __func__); - build_node_revision_table(); - debugf1("pdev bus %u devfn %u\n", pdev->bus->number, pdev->devfn); - pci_read_config_dword(pdev, K8_DCL, &dcl); - dual_channel = dual_channel_active(dcl); - debugf1("dual_channel is %u (dcl is 0x%x)\n", dual_channel, dcl); - mci = edac_mc_alloc(sizeof(*pvt), K8_NR_CSROWS, dual_channel + 1); - - if (mci == NULL) - return -ENOMEM; - - debugf0("%s(): mci = %p\n", __func__, mci); - pvt = mci->pvt_info; - pvt->dcl = dcl; - mci->dev = &pdev->dev; - pvt->node_id = MCI_TO_NODE_ID(mci); - - if (k8_get_devs(mci, dev_idx)) - goto fail0; - - k8_get_mc_regs(mci); - mci->mtype_cap = MEM_FLAG_DDR | MEM_FLAG_RDDR; - mci->edac_ctl_cap = EDAC_FLAG_NONE; - debugf1("Initializing mci->edac_cap to EDAC_FLAG_NONE\n"); - mci->edac_cap = EDAC_FLAG_NONE; - - if ((pvt->nbcap >> 3) & 0x1) - mci->edac_ctl_cap |= EDAC_FLAG_SECDED; - - if ((pvt->nbcap >> 4) & 0x1) - mci->edac_ctl_cap |= EDAC_FLAG_S4ECD4ED; - - if ((pvt->dcl >> 17) & 0x1) { - debugf1("setting EDAC_FLAG_SECDED in mci->edac_cap\n"); - mci->edac_cap |= EDAC_FLAG_SECDED; - - if (dual_channel) { - debugf1("setting EDAC_FLAG_S4ECD4ED in " - "mci->edac_cap\n"); - mci->edac_cap |= EDAC_FLAG_S4ECD4ED; - } - } - - mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = EDAC_K8_VERSION; - mci->ctl_name = k8_devs[dev_idx].ctl_name; - mci->edac_check = k8_check; - mci->ctl_page_to_phys = NULL; - - if (k8_init_csrows(mci)) { - debugf1("Setting mci->edac_cap to EDAC_FLAG_NONE " - "because k8_init_csrows() returned nonzero " - "value\n"); - mci->edac_cap = EDAC_FLAG_NONE; /* no csrows found */ - } else - k8_enable_error_reporting(mci); - - if (edac_mc_add_mc(mci, pvt->node_id)) { - debugf1("%s(): failed edac_mc_add_mc()\n", __func__); - /* FIXME: perhaps some code should go here that disables error - * reporting if we just enabled it - */ - goto fail1; - } - - debugf1("%s(): success\n", __func__); - return 0; - -fail1: - pci_dev_put(pvt->addr_map); - pci_dev_put(pvt->misc_ctl); - -fail0: - edac_mc_free(mci); - return -ENODEV; -} - -/* returns count (>= 0), or negative on error */ -static int __devinit k8_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) -{ - debugf0("%s()\n", __func__); - - /* wake up and enable device */ - return pci_enable_device(pdev) ? - -EIO : k8_probe1(pdev, ent->driver_data); -} - -static void __devexit k8_remove_one(struct pci_dev *pdev) -{ - struct mem_ctl_info *mci; - struct k8_pvt *pvt; - - debugf0("%s()\n", __func__); - - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) - return; - - pvt = mci->pvt_info; - pci_dev_put(pvt->addr_map); - pci_dev_put(pvt->misc_ctl); - edac_mc_free(mci); -} - -static const struct pci_device_id k8_pci_tbl[] __devinitdata = { - {PCI_VEND_DEV(AMD, OPT_2_MEMCTL), PCI_ANY_ID, PCI_ANY_ID, 0, 0, - OPTERON}, - {0,} /* 0 terminated list. */ -}; - -MODULE_DEVICE_TABLE(pci, k8_pci_tbl); - -static struct pci_driver k8_driver = { - .name = EDAC_MOD_STR, - .probe = k8_init_one, - .remove = __devexit_p(k8_remove_one), - .id_table = k8_pci_tbl, -}; - -int __init k8_init(void) -{ - return pci_module_init(&k8_driver); -} - -static void __exit k8_exit(void) -{ - pci_unregister_driver(&k8_driver); -} - -module_init(k8_init); -module_exit(k8_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh"); -MODULE_DESCRIPTION("MC support for AMD K8 memory controllers - " EDAC_K8_VERSION ); diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index a49cf0a39..2c29fafe6 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c @@ -15,6 +15,7 @@ * references to this document given in [] */ +#include #include #include #include @@ -22,9 +23,6 @@ #include #include "edac_mc.h" -#define R82600_REVISION " Ver: 2.0.1 " __DATE__ -#define EDAC_MOD_STR "r82600_edac" - #define r82600_printk(level, fmt, arg...) \ edac_printk(level, "r82600", fmt, ##arg) @@ -136,20 +134,17 @@ static unsigned int disable_hardware_scrub = 0; static void r82600_get_error_info (struct mem_ctl_info *mci, struct r82600_error_info *info) { - struct pci_dev *pdev; - - pdev = to_pci_dev(mci->dev); - pci_read_config_dword(pdev, R82600_EAP, &info->eapr); + pci_read_config_dword(mci->pdev, R82600_EAP, &info->eapr); if (info->eapr & BIT(0)) /* Clear error to allow next error to be reported [p.62] */ - pci_write_bits32(pdev, R82600_EAP, + pci_write_bits32(mci->pdev, R82600_EAP, ((u32) BIT(0) & (u32) BIT(1)), ((u32) BIT(0) & (u32) BIT(1))); if (info->eapr & BIT(1)) /* Clear error to allow next error to be reported [p.62] */ - pci_write_bits32(pdev, R82600_EAP, + pci_write_bits32(mci->pdev, R82600_EAP, ((u32) BIT(0) & (u32) BIT(1)), ((u32) BIT(0) & (u32) BIT(1))); } @@ -205,72 +200,25 @@ static void r82600_check(struct mem_ctl_info *mci) r82600_process_error_info(mci, &info, 1); } -static inline int ecc_enabled(u8 dramcr) -{ - return dramcr & BIT(5); -} - -static void r82600_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, - u8 dramcr) -{ - struct csrow_info *csrow; - int index; - u8 drbar; /* SDRAM Row Boundry Address Register */ - u32 row_high_limit, row_high_limit_last; - u32 reg_sdram, ecc_on, row_base; - - ecc_on = ecc_enabled(dramcr); - reg_sdram = dramcr & BIT(4); - row_high_limit_last = 0; - - for (index = 0; index < mci->nr_csrows; index++) { - csrow = &mci->csrows[index]; - - /* find the DRAM Chip Select Base address and mask */ - pci_read_config_byte(pdev, R82600_DRBA + index, &drbar); - - debugf1("%s() Row=%d DRBA = %#0x\n", __func__, index, drbar); - - row_high_limit = ((u32) drbar << 24); -/* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ - - debugf1("%s() Row=%d, Boundry Address=%#0x, Last = %#0x\n", - __func__, index, row_high_limit, row_high_limit_last); - - /* Empty row [p.57] */ - if (row_high_limit == row_high_limit_last) - continue; - - row_base = row_high_limit_last; - - csrow->first_page = row_base >> PAGE_SHIFT; - csrow->last_page = (row_high_limit >> PAGE_SHIFT) - 1; - csrow->nr_pages = csrow->last_page - csrow->first_page + 1; - /* Error address is top 19 bits - so granularity is * - * 14 bits */ - csrow->grain = 1 << 14; - csrow->mtype = reg_sdram ? MEM_RDDR : MEM_DDR; - /* FIXME - check that this is unknowable with this chipset */ - csrow->dtype = DEV_UNKNOWN; - - /* Mode is global on 82600 */ - csrow->edac_mode = ecc_on ? EDAC_SECDED : EDAC_NONE; - row_high_limit_last = row_high_limit; - } -} - static int r82600_probe1(struct pci_dev *pdev, int dev_idx) { - struct mem_ctl_info *mci; + int rc = -ENODEV; + int index; + struct mem_ctl_info *mci = NULL; u8 dramcr; + u32 ecc_on; + u32 reg_sdram; u32 eapr; u32 scrub_disabled; u32 sdram_refresh_rate; + u32 row_high_limit_last = 0; struct r82600_error_info discard; debugf0("%s()\n", __func__); pci_read_config_byte(pdev, R82600_DRAMC, &dramcr); pci_read_config_dword(pdev, R82600_EAP, &eapr); + ecc_on = dramcr & BIT(5); + reg_sdram = dramcr & BIT(4); scrub_disabled = eapr & BIT(31); sdram_refresh_rate = dramcr & (BIT(0) | BIT(1)); debugf2("%s(): sdram refresh rate = %#0x\n", __func__, @@ -278,11 +226,13 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) debugf2("%s(): DRAMC register = %#0x\n", __func__, dramcr); mci = edac_mc_alloc(0, R82600_NR_CSROWS, R82600_NR_CHANS); - if (mci == NULL) - return -ENOMEM; + if (mci == NULL) { + rc = -ENOMEM; + goto fail; + } debugf0("%s(): mci = %p\n", __func__, mci); - mci->dev = &pdev->dev; + mci->pdev = pdev; mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR; mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; /* FIXME try to work out if the chip leads have been used for COM2 @@ -295,7 +245,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) * is possible. */ mci->edac_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; - if (ecc_enabled(dramcr)) { + if (ecc_on) { if (scrub_disabled) debugf3("%s(): mci = %p - Scrubbing disabled! EAP: " "%#0x\n", __func__, mci, eapr); @@ -303,17 +253,53 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) mci->edac_cap = EDAC_FLAG_NONE; mci->mod_name = EDAC_MOD_STR; - mci->mod_ver = R82600_REVISION; + mci->mod_ver = "$Revision: 1.1.2.6 $"; mci->ctl_name = "R82600"; mci->edac_check = r82600_check; mci->ctl_page_to_phys = NULL; - r82600_init_csrows(mci, pdev, dramcr); + + for (index = 0; index < mci->nr_csrows; index++) { + struct csrow_info *csrow = &mci->csrows[index]; + u8 drbar; /* sDram Row Boundry Address Register */ + u32 row_high_limit; + u32 row_base; + + /* find the DRAM Chip Select Base address and mask */ + pci_read_config_byte(mci->pdev, R82600_DRBA + index, &drbar); + + debugf1("MC%d: %s() Row=%d DRBA = %#0x\n", mci->mc_idx, + __func__, index, drbar); + + row_high_limit = ((u32) drbar << 24); +/* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ + + debugf1("MC%d: %s() Row=%d, Boundry Address=%#0x, Last = " + "%#0x \n", mci->mc_idx, __func__, index, + row_high_limit, row_high_limit_last); + + /* Empty row [p.57] */ + if (row_high_limit == row_high_limit_last) + continue; + + row_base = row_high_limit_last; + csrow->first_page = row_base >> PAGE_SHIFT; + csrow->last_page = (row_high_limit >> PAGE_SHIFT) - 1; + csrow->nr_pages = csrow->last_page - csrow->first_page + 1; + /* Error address is top 19 bits - so granularity is * + * 14 bits */ + csrow->grain = 1 << 14; + csrow->mtype = reg_sdram ? MEM_RDDR : MEM_DDR; + /* FIXME - check that this is unknowable with this chipset */ + csrow->dtype = DEV_UNKNOWN; + + /* Mode is global on 82600 */ + csrow->edac_mode = ecc_on ? EDAC_SECDED : EDAC_NONE; + row_high_limit_last = row_high_limit; + } + r82600_get_error_info(mci, &discard); /* clear counters */ - /* Here we assume that we will never see multiple instances of this - * type of memory controller. The ID is therefore hardcoded to 0. - */ - if (edac_mc_add_mc(mci,0)) { + if (edac_mc_add_mc(mci)) { debugf3("%s(): failed edac_mc_add_mc()\n", __func__); goto fail; } @@ -323,15 +309,17 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx) if (disable_hardware_scrub) { debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n", __func__); - pci_write_bits32(pdev, R82600_EAP, BIT(31), BIT(31)); + pci_write_bits32(mci->pdev, R82600_EAP, BIT(31), BIT(31)); } debugf3("%s(): success\n", __func__); return 0; fail: - edac_mc_free(mci); - return -ENODEV; + if (mci) + edac_mc_free(mci); + + return rc; } /* returns count (>= 0), or negative on error */ @@ -350,7 +338,7 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev) debugf0("%s()\n", __func__); - if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) + if ((mci = edac_mc_del_mc(pdev)) == NULL) return; edac_mc_free(mci); diff --git a/drivers/eisa/virtual_root.c b/drivers/eisa/virtual_root.c index 9b4fcac03..0f97a0cb0 100644 --- a/drivers/eisa/virtual_root.c +++ b/drivers/eisa/virtual_root.c @@ -7,6 +7,7 @@ * This code is released under the GPL version 2. */ +#include #include #include #include diff --git a/drivers/fc4/fc.c b/drivers/fc4/fc.c index 1a159e884..66d03f242 100644 --- a/drivers/fc4/fc.c +++ b/drivers/fc4/fc.c @@ -429,7 +429,7 @@ static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hd if (fcmd->data) { if (SCpnt->use_sg) - dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->request_buffer, + dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->buffer, SCpnt->use_sg, SCpnt->sc_data_direction); else @@ -810,7 +810,7 @@ static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i SCpnt->request_bufflen, SCpnt->sc_data_direction); } else { - struct scatterlist *sg = (struct scatterlist *)SCpnt->request_buffer; + struct scatterlist *sg = (struct scatterlist *)SCpnt->buffer; int nents; FCD(("XXX: Use_sg %d %d\n", SCpnt->use_sg, sg->length)) diff --git a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c index 8700a8076..ed85dfcef 100644 --- a/drivers/fc4/fc_syms.c +++ b/drivers/fc4/fc_syms.c @@ -2,6 +2,7 @@ * We should not even be trying to compile this if we are not doing * a module. */ +#include #include #ifdef CONFIG_MODULES diff --git a/drivers/fc4/soc.c b/drivers/fc4/soc.c index 3b07e0ca8..ec1f94738 100644 --- a/drivers/fc4/soc.c +++ b/drivers/fc4/soc.c @@ -637,13 +637,13 @@ static inline void soc_init(struct sbus_dev *sdev, int no) irq = sdev->irqs[0]; - if (request_irq (irq, soc_intr, IRQF_SHARED, "SOC", (void *)s)) { + if (request_irq (irq, soc_intr, SA_SHIRQ, "SOC", (void *)s)) { soc_printk ("Cannot order irq %d to go\n", irq); socs = s->next; return; } - SOD(("SOC uses IRQ %d\n", irq)) + SOD(("SOC uses IRQ%s\n", __irq_itoa(irq))) s->port[0].fc.irq = irq; s->port[1].fc.irq = irq; diff --git a/drivers/fc4/socal.c b/drivers/fc4/socal.c index 2b75edc58..922e9613b 100644 --- a/drivers/fc4/socal.c +++ b/drivers/fc4/socal.c @@ -761,13 +761,13 @@ static inline void socal_init(struct sbus_dev *sdev, int no) irq = sdev->irqs[0]; - if (request_irq (irq, socal_intr, IRQF_SHARED, "SOCAL", (void *)s)) { + if (request_irq (irq, socal_intr, SA_SHIRQ, "SOCAL", (void *)s)) { socal_printk ("Cannot order irq %d to go\n", irq); socals = s->next; return; } - SOD(("SOCAL uses IRQ %d\n", irq)) + SOD(("SOCAL uses IRQ %s\n", __irq_itoa(irq))) s->port[0].fc.irq = irq; s->port[1].fc.irq = irq; diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index b88035efd..f0dff5ac1 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -6,7 +6,8 @@ menu "Firmware Drivers" config EDD - tristate "BIOS Enhanced Disk Drive calls determine boot disk" + tristate "BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)" + depends on EXPERIMENTAL depends on !IA64 && !XEN help Say Y or M here if you want to enable BIOS Enhanced Disk Drive diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index 23b086685..fdb8b042e 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c @@ -34,6 +34,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#include #include #include #include diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index b9e3886d9..948bd7e14 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -255,15 +255,10 @@ void __init dmi_scan_machine(void) /** * dmi_check_system - check system DMI data * @list: array of dmi_system_id structures to match against - * All non-null elements of the list must match - * their slot's (field index's) data (i.e., each - * list string must be a substring of the specified - * DMI slot's string data) to be considered a - * successful match. * * Walk the blacklist table running matching functions until someone * returns non zero or we hit the end. Callback function is called for - * each successful match. Returns the number of matches. + * each successfull match. Returns the number of matches. */ int dmi_check_system(struct dmi_system_id *list) { @@ -292,7 +287,7 @@ EXPORT_SYMBOL(dmi_check_system); /** * dmi_get_system_info - return DMI data value - * @field: data index (see enum dmi_field) + * @field: data index (see enum dmi_filed) * * Returns one DMI data value, can be used to perform * complex DMI data checks. @@ -306,13 +301,13 @@ EXPORT_SYMBOL(dmi_get_system_info); /** * dmi_find_device - find onboard device by type/name * @type: device type or %DMI_DEV_TYPE_ANY to match all device types - * @name: device name string or %NULL to match all + * @desc: device name string or %NULL to match all * @from: previous device found in search, or %NULL for new search. * * Iterates through the list of known onboard devices. If a device is * found with a matching @vendor and @device, a pointer to its device * structure is returned. Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL as the @from argument. + * A new search is initiated by passing %NULL to the @from argument. * If @from is not %NULL, searches continue from next device. */ struct dmi_device * dmi_find_device(int type, const char *name, diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 8ebce1c03..9b7e4d52f 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -66,6 +66,7 @@ */ #include +#include #include #include #include diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index c2ad72fef..c37baf944 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 0e31a0c49..99cdc612d 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1,5 +1,5 @@ # -# Hardware monitoring chip drivers configuration +# I2C Sensor chip drivers configuration # menu "Hardware Monitoring support" @@ -16,10 +16,6 @@ config HWMON should say Y here and also to the specific driver(s) for your sensors chip(s) below. - To find out which specific driver(s) you need, use the - sensors-detect script from the lm_sensors package. Read - for details. - This support can also be built as a module. If so, the module will be called hwmon. @@ -27,18 +23,6 @@ config HWMON_VID tristate default n -config SENSORS_ABITUGURU - tristate "Abit uGuru" - depends on HWMON && EXPERIMENTAL - help - If you say yes here you get support for the Abit uGuru chips - sensor part. The voltage and frequency control parts of the Abit - uGuru are not supported. The Abit uGuru chip can be found on Abit - uGuru featuring motherboards (most modern Abit motherboards). - - This driver can also be built as a module. If so, the module - will be called abituguru. - config SENSORS_ADM1021 tristate "Analog Devices ADM1021 and compatibles" depends on HWMON && I2C @@ -204,16 +188,6 @@ config SENSORS_LM63 This driver can also be built as a module. If so, the module will be called lm63. -config SENSORS_LM70 - tristate "National Semiconductor LM70" - depends on HWMON && SPI_MASTER && EXPERIMENTAL - help - If you say yes here you get support for the National Semiconductor - LM70 digital temperature sensor chip. - - This driver can also be built as a module. If so, the module - will be called lm70. - config SENSORS_LM75 tristate "National Semiconductor LM75 and compatibles" depends on HWMON && I2C @@ -262,11 +236,11 @@ config SENSORS_LM80 will be called lm80. config SENSORS_LM83 - tristate "National Semiconductor LM83 and compatibles" + tristate "National Semiconductor LM83" depends on HWMON && I2C help If you say yes here you get support for National Semiconductor - LM82 and LM83 sensor chips. + LM83 sensor chips. This driver can also be built as a module. If so, the module will be called lm83. @@ -359,32 +333,11 @@ config SENSORS_SMSC47M1 help If you say yes here you get support for the integrated fan monitoring and control capabilities of the SMSC LPC47B27x, - LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x, LPC47M192 and - LPC47M997 chips. - - The temperature and voltage sensor features of the LPC47M192 - and LPC47M997 are supported by another driver, select also - "SMSC LPC47M192 and compatibles" below for those. + LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x and LPC47M192 chips. This driver can also be built as a module. If so, the module will be called smsc47m1. -config SENSORS_SMSC47M192 - tristate "SMSC LPC47M192 and compatibles" - depends on HWMON && I2C && EXPERIMENTAL - select HWMON_VID - help - If you say yes here you get support for the temperature and - voltage sensors of the SMSC LPC47M192 and LPC47M997 chips. - - The fan monitoring and control capabilities of these chips - are supported by another driver, select - "SMSC LPC47M10x and compatibles" above. You need both drivers - if you want fan control and voltage/temperature sensor support. - - This driver can also be built as a module. If so, the module - will be called smsc47m192. - config SENSORS_SMSC47B397 tristate "SMSC LPC47B397-NC" depends on HWMON && I2C && EXPERIMENTAL @@ -432,16 +385,6 @@ config SENSORS_W83781D This driver can also be built as a module. If so, the module will be called w83781d. -config SENSORS_W83791D - tristate "Winbond W83791D" - depends on HWMON && I2C && EXPERIMENTAL - select HWMON_VID - help - If you say yes here you get support for the Winbond W83791D chip. - - This driver can also be built as a module. If so, the module - will be called w83791d. - config SENSORS_W83792D tristate "Winbond W83792D" depends on HWMON && I2C && EXPERIMENTAL diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 31415843a..fbdb8d911 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -10,9 +10,7 @@ obj-$(CONFIG_SENSORS_ASB100) += asb100.o obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o obj-$(CONFIG_SENSORS_W83792D) += w83792d.o obj-$(CONFIG_SENSORS_W83781D) += w83781d.o -obj-$(CONFIG_SENSORS_W83791D) += w83791d.o -obj-$(CONFIG_SENSORS_ABITUGURU) += abituguru.o obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o obj-$(CONFIG_SENSORS_ADM1025) += adm1025.o obj-$(CONFIG_SENSORS_ADM1026) += adm1026.o @@ -28,7 +26,6 @@ obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o obj-$(CONFIG_SENSORS_IT87) += it87.o obj-$(CONFIG_SENSORS_LM63) += lm63.o -obj-$(CONFIG_SENSORS_LM70) += lm70.o obj-$(CONFIG_SENSORS_LM75) += lm75.o obj-$(CONFIG_SENSORS_LM77) += lm77.o obj-$(CONFIG_SENSORS_LM78) += lm78.o @@ -43,7 +40,6 @@ obj-$(CONFIG_SENSORS_PC87360) += pc87360.o obj-$(CONFIG_SENSORS_SIS5595) += sis5595.o obj-$(CONFIG_SENSORS_SMSC47B397)+= smsc47b397.o obj-$(CONFIG_SENSORS_SMSC47M1) += smsc47m1.o -obj-$(CONFIG_SENSORS_SMSC47M192)+= smsc47m192.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o obj-$(CONFIG_SENSORS_VT8231) += vt8231.o obj-$(CONFIG_SENSORS_W83627EHF) += w83627ehf.o diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c deleted file mode 100644 index 35ad1b032..000000000 --- a/drivers/hwmon/abituguru.c +++ /dev/null @@ -1,1455 +0,0 @@ -/* - abituguru.c Copyright (c) 2005-2006 Hans de Goede - - 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 driver supports the sensor part of the custom Abit uGuru chip found - on Abit uGuru motherboards. Note: because of lack of specs the CPU / RAM / - etc voltage & frequency control is not supported! -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Banks */ -#define ABIT_UGURU_ALARM_BANK 0x20 /* 1x 3 bytes */ -#define ABIT_UGURU_SENSOR_BANK1 0x21 /* 16x volt and temp */ -#define ABIT_UGURU_FAN_PWM 0x24 /* 3x 5 bytes */ -#define ABIT_UGURU_SENSOR_BANK2 0x26 /* fans */ -/* max nr of sensors in bank1, a bank1 sensor can be in, temp or nc */ -#define ABIT_UGURU_MAX_BANK1_SENSORS 16 -/* Warning if you increase one of the 2 MAX defines below to 10 or higher you - should adjust the belonging _NAMES_LENGTH macro for the 2 digit number! */ -/* max nr of sensors in bank2, currently mb's with max 6 fans are known */ -#define ABIT_UGURU_MAX_BANK2_SENSORS 6 -/* max nr of pwm outputs, currently mb's with max 5 pwm outputs are known */ -#define ABIT_UGURU_MAX_PWMS 5 -/* uGuru sensor bank 1 flags */ /* Alarm if: */ -#define ABIT_UGURU_TEMP_HIGH_ALARM_ENABLE 0x01 /* temp over warn */ -#define ABIT_UGURU_VOLT_HIGH_ALARM_ENABLE 0x02 /* volt over max */ -#define ABIT_UGURU_VOLT_LOW_ALARM_ENABLE 0x04 /* volt under min */ -#define ABIT_UGURU_TEMP_HIGH_ALARM_FLAG 0x10 /* temp is over warn */ -#define ABIT_UGURU_VOLT_HIGH_ALARM_FLAG 0x20 /* volt is over max */ -#define ABIT_UGURU_VOLT_LOW_ALARM_FLAG 0x40 /* volt is under min */ -/* uGuru sensor bank 2 flags */ /* Alarm if: */ -#define ABIT_UGURU_FAN_LOW_ALARM_ENABLE 0x01 /* fan under min */ -/* uGuru sensor bank common flags */ -#define ABIT_UGURU_BEEP_ENABLE 0x08 /* beep if alarm */ -#define ABIT_UGURU_SHUTDOWN_ENABLE 0x80 /* shutdown if alarm */ -/* uGuru fan PWM (speed control) flags */ -#define ABIT_UGURU_FAN_PWM_ENABLE 0x80 /* enable speed control */ -/* Values used for conversion */ -#define ABIT_UGURU_FAN_MAX 15300 /* RPM */ -/* Bank1 sensor types */ -#define ABIT_UGURU_IN_SENSOR 0 -#define ABIT_UGURU_TEMP_SENSOR 1 -#define ABIT_UGURU_NC 2 -/* In many cases we need to wait for the uGuru to reach a certain status, most - of the time it will reach this status within 30 - 90 ISA reads, and thus we - can best busy wait. This define gives the total amount of reads to try. */ -#define ABIT_UGURU_WAIT_TIMEOUT 125 -/* However sometimes older versions of the uGuru seem to be distracted and they - do not respond for a long time. To handle this we sleep before each of the - last ABIT_UGURU_WAIT_TIMEOUT_SLEEP tries. */ -#define ABIT_UGURU_WAIT_TIMEOUT_SLEEP 5 -/* Normally all expected status in abituguru_ready, are reported after the - first read, but sometimes not and we need to poll. */ -#define ABIT_UGURU_READY_TIMEOUT 5 -/* Maximum 3 retries on timedout reads/writes, delay 200 ms before retrying */ -#define ABIT_UGURU_MAX_RETRIES 3 -#define ABIT_UGURU_RETRY_DELAY (HZ/5) -/* Maximum 2 timeouts in abituguru_update_device, iow 3 in a row is an error */ -#define ABIT_UGURU_MAX_TIMEOUTS 2 -/* utility macros */ -#define ABIT_UGURU_NAME "abituguru" -#define ABIT_UGURU_DEBUG(level, format, arg...) \ - if (level <= verbose) \ - printk(KERN_DEBUG ABIT_UGURU_NAME ": " format , ## arg) -/* Macros to help calculate the sysfs_names array length */ -/* sum of strlen of: in??_input\0, in??_{min,max}\0, in??_{min,max}_alarm\0, - in??_{min,max}_alarm_enable\0, in??_beep\0, in??_shutdown\0 */ -#define ABITUGURU_IN_NAMES_LENGTH (11 + 2 * 9 + 2 * 15 + 2 * 22 + 10 + 14) -/* sum of strlen of: temp??_input\0, temp??_max\0, temp??_crit\0, - temp??_alarm\0, temp??_alarm_enable\0, temp??_beep\0, temp??_shutdown\0 */ -#define ABITUGURU_TEMP_NAMES_LENGTH (13 + 11 + 12 + 13 + 20 + 12 + 16) -/* sum of strlen of: fan?_input\0, fan?_min\0, fan?_alarm\0, - fan?_alarm_enable\0, fan?_beep\0, fan?_shutdown\0 */ -#define ABITUGURU_FAN_NAMES_LENGTH (11 + 9 + 11 + 18 + 10 + 14) -/* sum of strlen of: pwm?_enable\0, pwm?_auto_channels_temp\0, - pwm?_auto_point{1,2}_pwm\0, pwm?_auto_point{1,2}_temp\0 */ -#define ABITUGURU_PWM_NAMES_LENGTH (12 + 24 + 2 * 21 + 2 * 22) -/* IN_NAMES_LENGTH > TEMP_NAMES_LENGTH so assume all bank1 sensors are in */ -#define ABITUGURU_SYSFS_NAMES_LENGTH ( \ - ABIT_UGURU_MAX_BANK1_SENSORS * ABITUGURU_IN_NAMES_LENGTH + \ - ABIT_UGURU_MAX_BANK2_SENSORS * ABITUGURU_FAN_NAMES_LENGTH + \ - ABIT_UGURU_MAX_PWMS * ABITUGURU_PWM_NAMES_LENGTH) - -/* All the macros below are named identical to the oguru and oguru2 programs - reverse engineered by Olle Sandberg, hence the names might not be 100% - logical. I could come up with better names, but I prefer keeping the names - identical so that this driver can be compared with his work more easily. */ -/* Two i/o-ports are used by uGuru */ -#define ABIT_UGURU_BASE 0x00E0 -/* Used to tell uGuru what to read and to read the actual data */ -#define ABIT_UGURU_CMD 0x00 -/* Mostly used to check if uGuru is busy */ -#define ABIT_UGURU_DATA 0x04 -#define ABIT_UGURU_REGION_LENGTH 5 -/* uGuru status' */ -#define ABIT_UGURU_STATUS_WRITE 0x00 /* Ready to be written */ -#define ABIT_UGURU_STATUS_READ 0x01 /* Ready to be read */ -#define ABIT_UGURU_STATUS_INPUT 0x08 /* More input */ -#define ABIT_UGURU_STATUS_READY 0x09 /* Ready to be written */ - -/* Constants */ -/* in (Volt) sensors go up to 3494 mV, temp to 255000 millidegrees Celsius */ -static const int abituguru_bank1_max_value[2] = { 3494, 255000 }; -/* Min / Max allowed values for sensor2 (fan) alarm threshold, these values - correspond to 300-3000 RPM */ -static const u8 abituguru_bank2_min_threshold = 5; -static const u8 abituguru_bank2_max_threshold = 50; -/* Register 0 is a bitfield, 1 and 2 are pwm settings (255 = 100%), 3 and 4 - are temperature trip points. */ -static const int abituguru_pwm_settings_multiplier[5] = { 0, 1, 1, 1000, 1000 }; -/* Min / Max allowed values for pwm_settings. Note: pwm1 (CPU fan) is a - special case the minium allowed pwm% setting for this is 30% (77) on - some MB's this special case is handled in the code! */ -static const u8 abituguru_pwm_min[5] = { 0, 170, 170, 25, 25 }; -static const u8 abituguru_pwm_max[5] = { 0, 255, 255, 75, 75 }; - - -/* Insmod parameters */ -static int force; -module_param(force, bool, 0); -MODULE_PARM_DESC(force, "Set to one to force detection."); -static int bank1_types[ABIT_UGURU_MAX_BANK1_SENSORS] = { -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -module_param_array(bank1_types, int, NULL, 0); -MODULE_PARM_DESC(bank1_types, "Bank1 sensortype autodetection override:\n" - " -1 autodetect\n" - " 0 volt sensor\n" - " 1 temp sensor\n" - " 2 not connected"); -static int fan_sensors; -module_param(fan_sensors, int, 0); -MODULE_PARM_DESC(fan_sensors, "Number of fan sensors on the uGuru " - "(0 = autodetect)"); -static int pwms; -module_param(pwms, int, 0); -MODULE_PARM_DESC(pwms, "Number of PWMs on the uGuru " - "(0 = autodetect)"); - -/* Default verbose is 2, since this driver is still in the testing phase */ -static int verbose = 2; -module_param(verbose, int, 0644); -MODULE_PARM_DESC(verbose, "How verbose should the driver be? (0-3):\n" - " 0 normal output\n" - " 1 + verbose error reporting\n" - " 2 + sensors type probing info\n" - " 3 + retryable error reporting"); - - -/* For the Abit uGuru, we need to keep some data in memory. - The structure is dynamically allocated, at the same time when a new - abituguru device is allocated. */ -struct abituguru_data { - struct class_device *class_dev; /* hwmon registered device */ - struct mutex update_lock; /* protect access to data and uGuru */ - unsigned long last_updated; /* In jiffies */ - unsigned short addr; /* uguru base address */ - char uguru_ready; /* is the uguru in ready state? */ - unsigned char update_timeouts; /* number of update timeouts since last - successful update */ - - /* The sysfs attr and their names are generated automatically, for bank1 - we cannot use a predefined array because we don't know beforehand - of a sensor is a volt or a temp sensor, for bank2 and the pwms its - easier todo things the same way. For in sensors we have 9 (temp 7) - sysfs entries per sensor, for bank2 and pwms 6. */ - struct sensor_device_attribute_2 sysfs_attr[ - ABIT_UGURU_MAX_BANK1_SENSORS * 9 + - ABIT_UGURU_MAX_BANK2_SENSORS * 6 + ABIT_UGURU_MAX_PWMS * 6]; - /* Buffer to store the dynamically generated sysfs names */ - char sysfs_names[ABITUGURU_SYSFS_NAMES_LENGTH]; - - /* Bank 1 data */ - /* number of and addresses of [0] in, [1] temp sensors */ - u8 bank1_sensors[2]; - u8 bank1_address[2][ABIT_UGURU_MAX_BANK1_SENSORS]; - u8 bank1_value[ABIT_UGURU_MAX_BANK1_SENSORS]; - /* This array holds 3 entries per sensor for the bank 1 sensor settings - (flags, min, max for voltage / flags, warn, shutdown for temp). */ - u8 bank1_settings[ABIT_UGURU_MAX_BANK1_SENSORS][3]; - /* Maximum value for each sensor used for scaling in mV/millidegrees - Celsius. */ - int bank1_max_value[ABIT_UGURU_MAX_BANK1_SENSORS]; - - /* Bank 2 data, ABIT_UGURU_MAX_BANK2_SENSORS entries for bank2 */ - u8 bank2_sensors; /* actual number of bank2 sensors found */ - u8 bank2_value[ABIT_UGURU_MAX_BANK2_SENSORS]; - u8 bank2_settings[ABIT_UGURU_MAX_BANK2_SENSORS][2]; /* flags, min */ - - /* Alarms 2 bytes for bank1, 1 byte for bank2 */ - u8 alarms[3]; - - /* Fan PWM (speed control) 5 bytes per PWM */ - u8 pwms; /* actual number of pwms found */ - u8 pwm_settings[ABIT_UGURU_MAX_PWMS][5]; -}; - -/* wait till the uguru is in the specified state */ -static int abituguru_wait(struct abituguru_data *data, u8 state) -{ - int timeout = ABIT_UGURU_WAIT_TIMEOUT; - - while (inb_p(data->addr + ABIT_UGURU_DATA) != state) { - timeout--; - if (timeout == 0) - return -EBUSY; - /* sleep a bit before our last few tries, see the comment on - this where ABIT_UGURU_WAIT_TIMEOUT_SLEEP is defined. */ - if (timeout <= ABIT_UGURU_WAIT_TIMEOUT_SLEEP) - msleep(0); - } - return 0; -} - -/* Put the uguru in ready for input state */ -static int abituguru_ready(struct abituguru_data *data) -{ - int timeout = ABIT_UGURU_READY_TIMEOUT; - - if (data->uguru_ready) - return 0; - - /* Reset? / Prepare for next read/write cycle */ - outb(0x00, data->addr + ABIT_UGURU_DATA); - - /* Wait till the uguru is ready */ - if (abituguru_wait(data, ABIT_UGURU_STATUS_READY)) { - ABIT_UGURU_DEBUG(1, - "timeout exceeded waiting for ready state\n"); - return -EIO; - } - - /* Cmd port MUST be read now and should contain 0xAC */ - while (inb_p(data->addr + ABIT_UGURU_CMD) != 0xAC) { - timeout--; - if (timeout == 0) { - ABIT_UGURU_DEBUG(1, - "CMD reg does not hold 0xAC after ready command\n"); - return -EIO; - } - msleep(0); - } - - /* After this the ABIT_UGURU_DATA port should contain - ABIT_UGURU_STATUS_INPUT */ - timeout = ABIT_UGURU_READY_TIMEOUT; - while (inb_p(data->addr + ABIT_UGURU_DATA) != ABIT_UGURU_STATUS_INPUT) { - timeout--; - if (timeout == 0) { - ABIT_UGURU_DEBUG(1, - "state != more input after ready command\n"); - return -EIO; - } - msleep(0); - } - - data->uguru_ready = 1; - return 0; -} - -/* Send the bank and then sensor address to the uGuru for the next read/write - cycle. This function gets called as the first part of a read/write by - abituguru_read and abituguru_write. This function should never be - called by any other function. */ -static int abituguru_send_address(struct abituguru_data *data, - u8 bank_addr, u8 sensor_addr, int retries) -{ - /* assume the caller does error handling itself if it has not requested - any retries, and thus be quiet. */ - int report_errors = retries; - - for (;;) { - /* Make sure the uguru is ready and then send the bank address, - after this the uguru is no longer "ready". */ - if (abituguru_ready(data) != 0) - return -EIO; - outb(bank_addr, data->addr + ABIT_UGURU_DATA); - data->uguru_ready = 0; - - /* Wait till the uguru is ABIT_UGURU_STATUS_INPUT state again - and send the sensor addr */ - if (abituguru_wait(data, ABIT_UGURU_STATUS_INPUT)) { - if (retries) { - ABIT_UGURU_DEBUG(3, "timeout exceeded " - "waiting for more input state, %d " - "tries remaining\n", retries); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(ABIT_UGURU_RETRY_DELAY); - retries--; - continue; - } - if (report_errors) - ABIT_UGURU_DEBUG(1, "timeout exceeded " - "waiting for more input state " - "(bank: %d)\n", (int)bank_addr); - return -EBUSY; - } - outb(sensor_addr, data->addr + ABIT_UGURU_CMD); - return 0; - } -} - -/* Read count bytes from sensor sensor_addr in bank bank_addr and store the - result in buf, retry the send address part of the read retries times. */ -static int abituguru_read(struct abituguru_data *data, - u8 bank_addr, u8 sensor_addr, u8 *buf, int count, int retries) -{ - int i; - - /* Send the address */ - i = abituguru_send_address(data, bank_addr, sensor_addr, retries); - if (i) - return i; - - /* And read the data */ - for (i = 0; i < count; i++) { - if (abituguru_wait(data, ABIT_UGURU_STATUS_READ)) { - ABIT_UGURU_DEBUG(retries ? 1 : 3, - "timeout exceeded waiting for " - "read state (bank: %d, sensor: %d)\n", - (int)bank_addr, (int)sensor_addr); - break; - } - buf[i] = inb(data->addr + ABIT_UGURU_CMD); - } - - /* Last put the chip back in ready state */ - abituguru_ready(data); - - return i; -} - -/* Write count bytes from buf to sensor sensor_addr in bank bank_addr, the send - address part of the write is always retried ABIT_UGURU_MAX_RETRIES times. */ -static int abituguru_write(struct abituguru_data *data, - u8 bank_addr, u8 sensor_addr, u8 *buf, int count) -{ - /* We use the ready timeout as we have to wait for 0xAC just like the - ready function */ - int i, timeout = ABIT_UGURU_READY_TIMEOUT; - - /* Send the address */ - i = abituguru_send_address(data, bank_addr, sensor_addr, - ABIT_UGURU_MAX_RETRIES); - if (i) - return i; - - /* And write the data */ - for (i = 0; i < count; i++) { - if (abituguru_wait(data, ABIT_UGURU_STATUS_WRITE)) { - ABIT_UGURU_DEBUG(1, "timeout exceeded waiting for " - "write state (bank: %d, sensor: %d)\n", - (int)bank_addr, (int)sensor_addr); - break; - } - outb(buf[i], data->addr + ABIT_UGURU_CMD); - } - - /* Now we need to wait till the chip is ready to be read again, - so that we can read 0xAC as confirmation that our write has - succeeded. */ - if (abituguru_wait(data, ABIT_UGURU_STATUS_READ)) { - ABIT_UGURU_DEBUG(1, "timeout exceeded waiting for read state " - "after write (bank: %d, sensor: %d)\n", (int)bank_addr, - (int)sensor_addr); - return -EIO; - } - - /* Cmd port MUST be read now and should contain 0xAC */ - while (inb_p(data->addr + ABIT_UGURU_CMD) != 0xAC) { - timeout--; - if (timeout == 0) { - ABIT_UGURU_DEBUG(1, "CMD reg does not hold 0xAC after " - "write (bank: %d, sensor: %d)\n", - (int)bank_addr, (int)sensor_addr); - return -EIO; - } - msleep(0); - } - - /* Last put the chip back in ready state */ - abituguru_ready(data); - - return i; -} - -/* Detect sensor type. Temp and Volt sensors are enabled with - different masks and will ignore enable masks not meant for them. - This enables us to test what kind of sensor we're dealing with. - By setting the alarm thresholds so that we will always get an - alarm for sensor type X and then enabling the sensor as sensor type - X, if we then get an alarm it is a sensor of type X. */ -static int __devinit -abituguru_detect_bank1_sensor_type(struct abituguru_data *data, - u8 sensor_addr) -{ - u8 val, buf[3]; - int i, ret = -ENODEV; /* error is the most common used retval :| */ - - /* If overriden by the user return the user selected type */ - if (bank1_types[sensor_addr] >= ABIT_UGURU_IN_SENSOR && - bank1_types[sensor_addr] <= ABIT_UGURU_NC) { - ABIT_UGURU_DEBUG(2, "assuming sensor type %d for bank1 sensor " - "%d because of \"bank1_types\" module param\n", - bank1_types[sensor_addr], (int)sensor_addr); - return bank1_types[sensor_addr]; - } - - /* First read the sensor and the current settings */ - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1, sensor_addr, &val, - 1, ABIT_UGURU_MAX_RETRIES) != 1) - return -ENODEV; - - /* Test val is sane / usable for sensor type detection. */ - if ((val < 10u) || (val > 240u)) { - printk(KERN_WARNING ABIT_UGURU_NAME - ": bank1-sensor: %d reading (%d) too close to limits, " - "unable to determine sensor type, skipping sensor\n", - (int)sensor_addr, (int)val); - /* assume no sensor is there for sensors for which we can't - determine the sensor type because their reading is too close - to their limits, this usually means no sensor is there. */ - return ABIT_UGURU_NC; - } - - ABIT_UGURU_DEBUG(2, "testing bank1 sensor %d\n", (int)sensor_addr); - /* Volt sensor test, enable volt low alarm, set min value ridicously - high. If its a volt sensor this should always give us an alarm. */ - buf[0] = ABIT_UGURU_VOLT_LOW_ALARM_ENABLE; - buf[1] = 245; - buf[2] = 250; - if (abituguru_write(data, ABIT_UGURU_SENSOR_BANK1 + 2, sensor_addr, - buf, 3) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - /* Now we need 20 ms to give the uguru time to read the sensors - and raise a voltage alarm */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/50); - /* Check for alarm and check the alarm is a volt low alarm. */ - if (abituguru_read(data, ABIT_UGURU_ALARM_BANK, 0, buf, 3, - ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - if (buf[sensor_addr/8] & (0x01 << (sensor_addr % 8))) { - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1 + 1, - sensor_addr, buf, 3, - ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - if (buf[0] & ABIT_UGURU_VOLT_LOW_ALARM_FLAG) { - ABIT_UGURU_DEBUG(2, " found volt sensor\n"); - ret = ABIT_UGURU_IN_SENSOR; - goto abituguru_detect_bank1_sensor_type_exit; - } else - ABIT_UGURU_DEBUG(2, " alarm raised during volt " - "sensor test, but volt low flag not set\n"); - } else - ABIT_UGURU_DEBUG(2, " alarm not raised during volt sensor " - "test\n"); - - /* Temp sensor test, enable sensor as a temp sensor, set beep value - ridicously low (but not too low, otherwise uguru ignores it). - If its a temp sensor this should always give us an alarm. */ - buf[0] = ABIT_UGURU_TEMP_HIGH_ALARM_ENABLE; - buf[1] = 5; - buf[2] = 10; - if (abituguru_write(data, ABIT_UGURU_SENSOR_BANK1 + 2, sensor_addr, - buf, 3) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - /* Now we need 50 ms to give the uguru time to read the sensors - and raise a temp alarm */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/20); - /* Check for alarm and check the alarm is a temp high alarm. */ - if (abituguru_read(data, ABIT_UGURU_ALARM_BANK, 0, buf, 3, - ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - if (buf[sensor_addr/8] & (0x01 << (sensor_addr % 8))) { - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1 + 1, - sensor_addr, buf, 3, - ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_detect_bank1_sensor_type_exit; - if (buf[0] & ABIT_UGURU_TEMP_HIGH_ALARM_FLAG) { - ABIT_UGURU_DEBUG(2, " found temp sensor\n"); - ret = ABIT_UGURU_TEMP_SENSOR; - goto abituguru_detect_bank1_sensor_type_exit; - } else - ABIT_UGURU_DEBUG(2, " alarm raised during temp " - "sensor test, but temp high flag not set\n"); - } else - ABIT_UGURU_DEBUG(2, " alarm not raised during temp sensor " - "test\n"); - - ret = ABIT_UGURU_NC; -abituguru_detect_bank1_sensor_type_exit: - /* Restore original settings, failing here is really BAD, it has been - reported that some BIOS-es hang when entering the uGuru menu with - invalid settings present in the uGuru, so we try this 3 times. */ - for (i = 0; i < 3; i++) - if (abituguru_write(data, ABIT_UGURU_SENSOR_BANK1 + 2, - sensor_addr, data->bank1_settings[sensor_addr], - 3) == 3) - break; - if (i == 3) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Fatal error could not restore original settings. " - "This should never happen please report this to the " - "abituguru maintainer (see MAINTAINERS)\n"); - return -ENODEV; - } - return ret; -} - -/* These functions try to find out how many sensors there are in bank2 and how - many pwms there are. The purpose of this is to make sure that we don't give - the user the possibility to change settings for non-existent sensors / pwm. - The uGuru will happily read / write whatever memory happens to be after the - memory storing the PWM settings when reading/writing to a PWM which is not - there. Notice even if we detect a PWM which doesn't exist we normally won't - write to it, unless the user tries to change the settings. - - Although the uGuru allows reading (settings) from non existing bank2 - sensors, my version of the uGuru does seem to stop writing to them, the - write function above aborts in this case with: - "CMD reg does not hold 0xAC after write" - - Notice these 2 tests are non destructive iow read-only tests, otherwise - they would defeat their purpose. Although for the bank2_sensors detection a - read/write test would be feasible because of the reaction above, I've - however opted to stay on the safe side. */ -static void __devinit -abituguru_detect_no_bank2_sensors(struct abituguru_data *data) -{ - int i; - - if (fan_sensors > 0 && fan_sensors <= ABIT_UGURU_MAX_BANK2_SENSORS) { - data->bank2_sensors = fan_sensors; - ABIT_UGURU_DEBUG(2, "assuming %d fan sensors because of " - "\"fan_sensors\" module param\n", - (int)data->bank2_sensors); - return; - } - - ABIT_UGURU_DEBUG(2, "detecting number of fan sensors\n"); - for (i = 0; i < ABIT_UGURU_MAX_BANK2_SENSORS; i++) { - /* 0x89 are the known used bits: - -0x80 enable shutdown - -0x08 enable beep - -0x01 enable alarm - All other bits should be 0, but on some motherboards - 0x40 (bit 6) is also high for some of the fans?? */ - if (data->bank2_settings[i][0] & ~0xC9) { - ABIT_UGURU_DEBUG(2, " bank2 sensor %d does not seem " - "to be a fan sensor: settings[0] = %02X\n", - i, (unsigned int)data->bank2_settings[i][0]); - break; - } - - /* check if the threshold is within the allowed range */ - if (data->bank2_settings[i][1] < - abituguru_bank2_min_threshold) { - ABIT_UGURU_DEBUG(2, " bank2 sensor %d does not seem " - "to be a fan sensor: the threshold (%d) is " - "below the minimum (%d)\n", i, - (int)data->bank2_settings[i][1], - (int)abituguru_bank2_min_threshold); - break; - } - if (data->bank2_settings[i][1] > - abituguru_bank2_max_threshold) { - ABIT_UGURU_DEBUG(2, " bank2 sensor %d does not seem " - "to be a fan sensor: the threshold (%d) is " - "above the maximum (%d)\n", i, - (int)data->bank2_settings[i][1], - (int)abituguru_bank2_max_threshold); - break; - } - } - - data->bank2_sensors = i; - ABIT_UGURU_DEBUG(2, " found: %d fan sensors\n", - (int)data->bank2_sensors); -} - -static void __devinit -abituguru_detect_no_pwms(struct abituguru_data *data) -{ - int i, j; - - if (pwms > 0 && pwms <= ABIT_UGURU_MAX_PWMS) { - data->pwms = pwms; - ABIT_UGURU_DEBUG(2, "assuming %d PWM outputs because of " - "\"pwms\" module param\n", (int)data->pwms); - return; - } - - ABIT_UGURU_DEBUG(2, "detecting number of PWM outputs\n"); - for (i = 0; i < ABIT_UGURU_MAX_PWMS; i++) { - /* 0x80 is the enable bit and the low - nibble is which temp sensor to use, - the other bits should be 0 */ - if (data->pwm_settings[i][0] & ~0x8F) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does not seem " - "to be a pwm channel: settings[0] = %02X\n", - i, (unsigned int)data->pwm_settings[i][0]); - break; - } - - /* the low nibble must correspond to one of the temp sensors - we've found */ - for (j = 0; j < data->bank1_sensors[ABIT_UGURU_TEMP_SENSOR]; - j++) { - if (data->bank1_address[ABIT_UGURU_TEMP_SENSOR][j] == - (data->pwm_settings[i][0] & 0x0F)) - break; - } - if (j == data->bank1_sensors[ABIT_UGURU_TEMP_SENSOR]) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does not seem " - "to be a pwm channel: %d is not a valid temp " - "sensor address\n", i, - data->pwm_settings[i][0] & 0x0F); - break; - } - - /* check if all other settings are within the allowed range */ - for (j = 1; j < 5; j++) { - u8 min; - /* special case pwm1 min pwm% */ - if ((i == 0) && ((j == 1) || (j == 2))) - min = 77; - else - min = abituguru_pwm_min[j]; - if (data->pwm_settings[i][j] < min) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does " - "not seem to be a pwm channel: " - "setting %d (%d) is below the minimum " - "value (%d)\n", i, j, - (int)data->pwm_settings[i][j], - (int)min); - goto abituguru_detect_no_pwms_exit; - } - if (data->pwm_settings[i][j] > abituguru_pwm_max[j]) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does " - "not seem to be a pwm channel: " - "setting %d (%d) is above the maximum " - "value (%d)\n", i, j, - (int)data->pwm_settings[i][j], - (int)abituguru_pwm_max[j]); - goto abituguru_detect_no_pwms_exit; - } - } - - /* check that min temp < max temp and min pwm < max pwm */ - if (data->pwm_settings[i][1] >= data->pwm_settings[i][2]) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does not seem " - "to be a pwm channel: min pwm (%d) >= " - "max pwm (%d)\n", i, - (int)data->pwm_settings[i][1], - (int)data->pwm_settings[i][2]); - break; - } - if (data->pwm_settings[i][3] >= data->pwm_settings[i][4]) { - ABIT_UGURU_DEBUG(2, " pwm channel %d does not seem " - "to be a pwm channel: min temp (%d) >= " - "max temp (%d)\n", i, - (int)data->pwm_settings[i][3], - (int)data->pwm_settings[i][4]); - break; - } - } - -abituguru_detect_no_pwms_exit: - data->pwms = i; - ABIT_UGURU_DEBUG(2, " found: %d PWM outputs\n", (int)data->pwms); -} - -/* Following are the sysfs callback functions. These functions expect: - sensor_device_attribute_2->index: sensor address/offset in the bank - sensor_device_attribute_2->nr: register offset, bitmask or NA. */ -static struct abituguru_data *abituguru_update_device(struct device *dev); - -static ssize_t show_bank1_value(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = abituguru_update_device(dev); - if (!data) - return -EIO; - return sprintf(buf, "%d\n", (data->bank1_value[attr->index] * - data->bank1_max_value[attr->index] + 128) / 255); -} - -static ssize_t show_bank1_setting(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", - (data->bank1_settings[attr->index][attr->nr] * - data->bank1_max_value[attr->index] + 128) / 255); -} - -static ssize_t show_bank2_value(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = abituguru_update_device(dev); - if (!data) - return -EIO; - return sprintf(buf, "%d\n", (data->bank2_value[attr->index] * - ABIT_UGURU_FAN_MAX + 128) / 255); -} - -static ssize_t show_bank2_setting(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", - (data->bank2_settings[attr->index][attr->nr] * - ABIT_UGURU_FAN_MAX + 128) / 255); -} - -static ssize_t store_bank1_setting(struct device *dev, struct device_attribute - *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - u8 val = (simple_strtoul(buf, NULL, 10) * 255 + - data->bank1_max_value[attr->index]/2) / - data->bank1_max_value[attr->index]; - ssize_t ret = count; - - mutex_lock(&data->update_lock); - if (data->bank1_settings[attr->index][attr->nr] != val) { - u8 orig_val = data->bank1_settings[attr->index][attr->nr]; - data->bank1_settings[attr->index][attr->nr] = val; - if (abituguru_write(data, ABIT_UGURU_SENSOR_BANK1 + 2, - attr->index, data->bank1_settings[attr->index], - 3) <= attr->nr) { - data->bank1_settings[attr->index][attr->nr] = orig_val; - ret = -EIO; - } - } - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t store_bank2_setting(struct device *dev, struct device_attribute - *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - u8 val = (simple_strtoul(buf, NULL, 10)*255 + ABIT_UGURU_FAN_MAX/2) / - ABIT_UGURU_FAN_MAX; - ssize_t ret = count; - - /* this check can be done before taking the lock */ - if ((val < abituguru_bank2_min_threshold) || - (val > abituguru_bank2_max_threshold)) - return -EINVAL; - - mutex_lock(&data->update_lock); - if (data->bank2_settings[attr->index][attr->nr] != val) { - u8 orig_val = data->bank2_settings[attr->index][attr->nr]; - data->bank2_settings[attr->index][attr->nr] = val; - if (abituguru_write(data, ABIT_UGURU_SENSOR_BANK2 + 2, - attr->index, data->bank2_settings[attr->index], - 2) <= attr->nr) { - data->bank2_settings[attr->index][attr->nr] = orig_val; - ret = -EIO; - } - } - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t show_bank1_alarm(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = abituguru_update_device(dev); - if (!data) - return -EIO; - /* See if the alarm bit for this sensor is set, and if the - alarm matches the type of alarm we're looking for (for volt - it can be either low or high). The type is stored in a few - readonly bits in the settings part of the relevant sensor. - The bitmask of the type is passed to us in attr->nr. */ - if ((data->alarms[attr->index / 8] & (0x01 << (attr->index % 8))) && - (data->bank1_settings[attr->index][0] & attr->nr)) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static ssize_t show_bank2_alarm(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = abituguru_update_device(dev); - if (!data) - return -EIO; - if (data->alarms[2] & (0x01 << attr->index)) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static ssize_t show_bank1_mask(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - if (data->bank1_settings[attr->index][0] & attr->nr) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static ssize_t show_bank2_mask(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - if (data->bank2_settings[attr->index][0] & attr->nr) - return sprintf(buf, "1\n"); - else - return sprintf(buf, "0\n"); -} - -static ssize_t store_bank1_mask(struct device *dev, - struct device_attribute *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - int mask = simple_strtoul(buf, NULL, 10); - ssize_t ret = count; - u8 orig_val; - - mutex_lock(&data->update_lock); - orig_val = data->bank1_settings[attr->index][0]; - - if (mask) - data->bank1_settings[attr->index][0] |= attr->nr; - else - data->bank1_settings[attr->index][0] &= ~attr->nr; - - if ((data->bank1_settings[attr->index][0] != orig_val) && - (abituguru_write(data, - ABIT_UGURU_SENSOR_BANK1 + 2, attr->index, - data->bank1_settings[attr->index], 3) < 1)) { - data->bank1_settings[attr->index][0] = orig_val; - ret = -EIO; - } - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t store_bank2_mask(struct device *dev, - struct device_attribute *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - int mask = simple_strtoul(buf, NULL, 10); - ssize_t ret = count; - u8 orig_val; - - mutex_lock(&data->update_lock); - orig_val = data->bank2_settings[attr->index][0]; - - if (mask) - data->bank2_settings[attr->index][0] |= attr->nr; - else - data->bank2_settings[attr->index][0] &= ~attr->nr; - - if ((data->bank2_settings[attr->index][0] != orig_val) && - (abituguru_write(data, - ABIT_UGURU_SENSOR_BANK2 + 2, attr->index, - data->bank2_settings[attr->index], 2) < 1)) { - data->bank2_settings[attr->index][0] = orig_val; - ret = -EIO; - } - mutex_unlock(&data->update_lock); - return ret; -} - -/* Fan PWM (speed control) */ -static ssize_t show_pwm_setting(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", data->pwm_settings[attr->index][attr->nr] * - abituguru_pwm_settings_multiplier[attr->nr]); -} - -static ssize_t store_pwm_setting(struct device *dev, struct device_attribute - *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - u8 min, val = (simple_strtoul(buf, NULL, 10) + - abituguru_pwm_settings_multiplier[attr->nr]/2) / - abituguru_pwm_settings_multiplier[attr->nr]; - ssize_t ret = count; - - /* special case pwm1 min pwm% */ - if ((attr->index == 0) && ((attr->nr == 1) || (attr->nr == 2))) - min = 77; - else - min = abituguru_pwm_min[attr->nr]; - - /* this check can be done before taking the lock */ - if ((val < min) || (val > abituguru_pwm_max[attr->nr])) - return -EINVAL; - - mutex_lock(&data->update_lock); - /* this check needs to be done after taking the lock */ - if ((attr->nr & 1) && - (val >= data->pwm_settings[attr->index][attr->nr + 1])) - ret = -EINVAL; - else if (!(attr->nr & 1) && - (val <= data->pwm_settings[attr->index][attr->nr - 1])) - ret = -EINVAL; - else if (data->pwm_settings[attr->index][attr->nr] != val) { - u8 orig_val = data->pwm_settings[attr->index][attr->nr]; - data->pwm_settings[attr->index][attr->nr] = val; - if (abituguru_write(data, ABIT_UGURU_FAN_PWM + 1, - attr->index, data->pwm_settings[attr->index], - 5) <= attr->nr) { - data->pwm_settings[attr->index][attr->nr] = - orig_val; - ret = -EIO; - } - } - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t show_pwm_sensor(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - int i; - /* We need to walk to the temp sensor addresses to find what - the userspace id of the configured temp sensor is. */ - for (i = 0; i < data->bank1_sensors[ABIT_UGURU_TEMP_SENSOR]; i++) - if (data->bank1_address[ABIT_UGURU_TEMP_SENSOR][i] == - (data->pwm_settings[attr->index][0] & 0x0F)) - return sprintf(buf, "%d\n", i+1); - - return -ENXIO; -} - -static ssize_t store_pwm_sensor(struct device *dev, struct device_attribute - *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - unsigned long val = simple_strtoul(buf, NULL, 10) - 1; - ssize_t ret = count; - - mutex_lock(&data->update_lock); - if (val < data->bank1_sensors[ABIT_UGURU_TEMP_SENSOR]) { - u8 orig_val = data->pwm_settings[attr->index][0]; - u8 address = data->bank1_address[ABIT_UGURU_TEMP_SENSOR][val]; - data->pwm_settings[attr->index][0] &= 0xF0; - data->pwm_settings[attr->index][0] |= address; - if (data->pwm_settings[attr->index][0] != orig_val) { - if (abituguru_write(data, ABIT_UGURU_FAN_PWM + 1, - attr->index, - data->pwm_settings[attr->index], - 5) < 1) { - data->pwm_settings[attr->index][0] = orig_val; - ret = -EIO; - } - } - } - else - ret = -EINVAL; - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t show_pwm_enable(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - int res = 0; - if (data->pwm_settings[attr->index][0] & ABIT_UGURU_FAN_PWM_ENABLE) - res = 2; - return sprintf(buf, "%d\n", res); -} - -static ssize_t store_pwm_enable(struct device *dev, struct device_attribute - *devattr, const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct abituguru_data *data = dev_get_drvdata(dev); - u8 orig_val, user_val = simple_strtoul(buf, NULL, 10); - ssize_t ret = count; - - mutex_lock(&data->update_lock); - orig_val = data->pwm_settings[attr->index][0]; - switch (user_val) { - case 0: - data->pwm_settings[attr->index][0] &= - ~ABIT_UGURU_FAN_PWM_ENABLE; - break; - case 2: - data->pwm_settings[attr->index][0] |= - ABIT_UGURU_FAN_PWM_ENABLE; - break; - default: - ret = -EINVAL; - } - if ((data->pwm_settings[attr->index][0] != orig_val) && - (abituguru_write(data, ABIT_UGURU_FAN_PWM + 1, - attr->index, data->pwm_settings[attr->index], - 5) < 1)) { - data->pwm_settings[attr->index][0] = orig_val; - ret = -EIO; - } - mutex_unlock(&data->update_lock); - return ret; -} - -static ssize_t show_name(struct device *dev, - struct device_attribute *devattr, char *buf) -{ - return sprintf(buf, "%s\n", ABIT_UGURU_NAME); -} - -/* Sysfs attr templates, the real entries are generated automatically. */ -static const -struct sensor_device_attribute_2 abituguru_sysfs_bank1_templ[2][9] = { - { - SENSOR_ATTR_2(in%d_input, 0444, show_bank1_value, NULL, 0, 0), - SENSOR_ATTR_2(in%d_min, 0644, show_bank1_setting, - store_bank1_setting, 1, 0), - SENSOR_ATTR_2(in%d_min_alarm, 0444, show_bank1_alarm, NULL, - ABIT_UGURU_VOLT_LOW_ALARM_FLAG, 0), - SENSOR_ATTR_2(in%d_max, 0644, show_bank1_setting, - store_bank1_setting, 2, 0), - SENSOR_ATTR_2(in%d_max_alarm, 0444, show_bank1_alarm, NULL, - ABIT_UGURU_VOLT_HIGH_ALARM_FLAG, 0), - SENSOR_ATTR_2(in%d_beep, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_BEEP_ENABLE, 0), - SENSOR_ATTR_2(in%d_shutdown, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_SHUTDOWN_ENABLE, 0), - SENSOR_ATTR_2(in%d_min_alarm_enable, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_VOLT_LOW_ALARM_ENABLE, 0), - SENSOR_ATTR_2(in%d_max_alarm_enable, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_VOLT_HIGH_ALARM_ENABLE, 0), - }, { - SENSOR_ATTR_2(temp%d_input, 0444, show_bank1_value, NULL, 0, 0), - SENSOR_ATTR_2(temp%d_alarm, 0444, show_bank1_alarm, NULL, - ABIT_UGURU_TEMP_HIGH_ALARM_FLAG, 0), - SENSOR_ATTR_2(temp%d_max, 0644, show_bank1_setting, - store_bank1_setting, 1, 0), - SENSOR_ATTR_2(temp%d_crit, 0644, show_bank1_setting, - store_bank1_setting, 2, 0), - SENSOR_ATTR_2(temp%d_beep, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_BEEP_ENABLE, 0), - SENSOR_ATTR_2(temp%d_shutdown, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_SHUTDOWN_ENABLE, 0), - SENSOR_ATTR_2(temp%d_alarm_enable, 0644, show_bank1_mask, - store_bank1_mask, ABIT_UGURU_TEMP_HIGH_ALARM_ENABLE, 0), - } -}; - -static const struct sensor_device_attribute_2 abituguru_sysfs_fan_templ[6] = { - SENSOR_ATTR_2(fan%d_input, 0444, show_bank2_value, NULL, 0, 0), - SENSOR_ATTR_2(fan%d_alarm, 0444, show_bank2_alarm, NULL, 0, 0), - SENSOR_ATTR_2(fan%d_min, 0644, show_bank2_setting, - store_bank2_setting, 1, 0), - SENSOR_ATTR_2(fan%d_beep, 0644, show_bank2_mask, - store_bank2_mask, ABIT_UGURU_BEEP_ENABLE, 0), - SENSOR_ATTR_2(fan%d_shutdown, 0644, show_bank2_mask, - store_bank2_mask, ABIT_UGURU_SHUTDOWN_ENABLE, 0), - SENSOR_ATTR_2(fan%d_alarm_enable, 0644, show_bank2_mask, - store_bank2_mask, ABIT_UGURU_FAN_LOW_ALARM_ENABLE, 0), -}; - -static const struct sensor_device_attribute_2 abituguru_sysfs_pwm_templ[6] = { - SENSOR_ATTR_2(pwm%d_enable, 0644, show_pwm_enable, - store_pwm_enable, 0, 0), - SENSOR_ATTR_2(pwm%d_auto_channels_temp, 0644, show_pwm_sensor, - store_pwm_sensor, 0, 0), - SENSOR_ATTR_2(pwm%d_auto_point1_pwm, 0644, show_pwm_setting, - store_pwm_setting, 1, 0), - SENSOR_ATTR_2(pwm%d_auto_point2_pwm, 0644, show_pwm_setting, - store_pwm_setting, 2, 0), - SENSOR_ATTR_2(pwm%d_auto_point1_temp, 0644, show_pwm_setting, - store_pwm_setting, 3, 0), - SENSOR_ATTR_2(pwm%d_auto_point2_temp, 0644, show_pwm_setting, - store_pwm_setting, 4, 0), -}; - -static struct sensor_device_attribute_2 abituguru_sysfs_attr[] = { - SENSOR_ATTR_2(name, 0444, show_name, NULL, 0, 0), -}; - -static int __devinit abituguru_probe(struct platform_device *pdev) -{ - struct abituguru_data *data; - int i, j, used, sysfs_names_free, sysfs_attr_i, res = -ENODEV; - char *sysfs_filename; - - /* El weirdo probe order, to keep the sysfs order identical to the - BIOS and window-appliction listing order. */ - const u8 probe_order[ABIT_UGURU_MAX_BANK1_SENSORS] = { - 0x00, 0x01, 0x03, 0x04, 0x0A, 0x08, 0x0E, 0x02, - 0x09, 0x06, 0x05, 0x0B, 0x0F, 0x0D, 0x07, 0x0C }; - - if (!(data = kzalloc(sizeof(struct abituguru_data), GFP_KERNEL))) - return -ENOMEM; - - data->addr = platform_get_resource(pdev, IORESOURCE_IO, 0)->start; - mutex_init(&data->update_lock); - platform_set_drvdata(pdev, data); - - /* See if the uGuru is ready */ - if (inb_p(data->addr + ABIT_UGURU_DATA) == ABIT_UGURU_STATUS_INPUT) - data->uguru_ready = 1; - - /* Completely read the uGuru this has 2 purposes: - - testread / see if one really is there. - - make an in memory copy of all the uguru settings for future use. */ - if (abituguru_read(data, ABIT_UGURU_ALARM_BANK, 0, - data->alarms, 3, ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_probe_error; - - for (i = 0; i < ABIT_UGURU_MAX_BANK1_SENSORS; i++) { - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1, i, - &data->bank1_value[i], 1, - ABIT_UGURU_MAX_RETRIES) != 1) - goto abituguru_probe_error; - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK1+1, i, - data->bank1_settings[i], 3, - ABIT_UGURU_MAX_RETRIES) != 3) - goto abituguru_probe_error; - } - /* Note: We don't know how many bank2 sensors / pwms there really are, - but in order to "detect" this we need to read the maximum amount - anyways. If we read sensors/pwms not there we'll just read crap - this can't hurt. We need the detection because we don't want - unwanted writes, which will hurt! */ - for (i = 0; i < ABIT_UGURU_MAX_BANK2_SENSORS; i++) { - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK2, i, - &data->bank2_value[i], 1, - ABIT_UGURU_MAX_RETRIES) != 1) - goto abituguru_probe_error; - if (abituguru_read(data, ABIT_UGURU_SENSOR_BANK2+1, i, - data->bank2_settings[i], 2, - ABIT_UGURU_MAX_RETRIES) != 2) - goto abituguru_probe_error; - } - for (i = 0; i < ABIT_UGURU_MAX_PWMS; i++) { - if (abituguru_read(data, ABIT_UGURU_FAN_PWM, i, - data->pwm_settings[i], 5, - ABIT_UGURU_MAX_RETRIES) != 5) - goto abituguru_probe_error; - } - data->last_updated = jiffies; - - /* Detect sensor types and fill the sysfs attr for bank1 */ - sysfs_attr_i = 0; - sysfs_filename = data->sysfs_names; - sysfs_names_free = ABITUGURU_SYSFS_NAMES_LENGTH; - for (i = 0; i < ABIT_UGURU_MAX_BANK1_SENSORS; i++) { - res = abituguru_detect_bank1_sensor_type(data, probe_order[i]); - if (res < 0) - goto abituguru_probe_error; - if (res == ABIT_UGURU_NC) - continue; - - /* res 1 (temp) sensors have 7 sysfs entries, 0 (in) 9 */ - for (j = 0; j < (res ? 7 : 9); j++) { - used = snprintf(sysfs_filename, sysfs_names_free, - abituguru_sysfs_bank1_templ[res][j].dev_attr. - attr.name, data->bank1_sensors[res] + res) - + 1; - data->sysfs_attr[sysfs_attr_i] = - abituguru_sysfs_bank1_templ[res][j]; - data->sysfs_attr[sysfs_attr_i].dev_attr.attr.name = - sysfs_filename; - data->sysfs_attr[sysfs_attr_i].index = probe_order[i]; - sysfs_filename += used; - sysfs_names_free -= used; - sysfs_attr_i++; - } - data->bank1_max_value[probe_order[i]] = - abituguru_bank1_max_value[res]; - data->bank1_address[res][data->bank1_sensors[res]] = - probe_order[i]; - data->bank1_sensors[res]++; - } - /* Detect number of sensors and fill the sysfs attr for bank2 (fans) */ - abituguru_detect_no_bank2_sensors(data); - for (i = 0; i < data->bank2_sensors; i++) { - for (j = 0; j < ARRAY_SIZE(abituguru_sysfs_fan_templ); j++) { - used = snprintf(sysfs_filename, sysfs_names_free, - abituguru_sysfs_fan_templ[j].dev_attr.attr.name, - i + 1) + 1; - data->sysfs_attr[sysfs_attr_i] = - abituguru_sysfs_fan_templ[j]; - data->sysfs_attr[sysfs_attr_i].dev_attr.attr.name = - sysfs_filename; - data->sysfs_attr[sysfs_attr_i].index = i; - sysfs_filename += used; - sysfs_names_free -= used; - sysfs_attr_i++; - } - } - /* Detect number of sensors and fill the sysfs attr for pwms */ - abituguru_detect_no_pwms(data); - for (i = 0; i < data->pwms; i++) { - for (j = 0; j < ARRAY_SIZE(abituguru_sysfs_pwm_templ); j++) { - used = snprintf(sysfs_filename, sysfs_names_free, - abituguru_sysfs_pwm_templ[j].dev_attr.attr.name, - i + 1) + 1; - data->sysfs_attr[sysfs_attr_i] = - abituguru_sysfs_pwm_templ[j]; - data->sysfs_attr[sysfs_attr_i].dev_attr.attr.name = - sysfs_filename; - data->sysfs_attr[sysfs_attr_i].index = i; - sysfs_filename += used; - sysfs_names_free -= used; - sysfs_attr_i++; - } - } - /* Fail safe check, this should never happen! */ - if (sysfs_names_free < 0) { - printk(KERN_ERR ABIT_UGURU_NAME ": Fatal error ran out of " - "space for sysfs attr names. This should never " - "happen please report to the abituguru maintainer " - "(see MAINTAINERS)\n"); - res = -ENAMETOOLONG; - goto abituguru_probe_error; - } - printk(KERN_INFO ABIT_UGURU_NAME ": found Abit uGuru\n"); - - /* Register sysfs hooks */ - data->class_dev = hwmon_device_register(&pdev->dev); - if (IS_ERR(data->class_dev)) { - res = PTR_ERR(data->class_dev); - goto abituguru_probe_error; - } - for (i = 0; i < sysfs_attr_i; i++) - device_create_file(&pdev->dev, &data->sysfs_attr[i].dev_attr); - for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) - device_create_file(&pdev->dev, - &abituguru_sysfs_attr[i].dev_attr); - - return 0; - -abituguru_probe_error: - kfree(data); - return res; -} - -static int __devexit abituguru_remove(struct platform_device *pdev) -{ - struct abituguru_data *data = platform_get_drvdata(pdev); - - platform_set_drvdata(pdev, NULL); - hwmon_device_unregister(data->class_dev); - kfree(data); - - return 0; -} - -static struct abituguru_data *abituguru_update_device(struct device *dev) -{ - int i, err; - struct abituguru_data *data = dev_get_drvdata(dev); - /* fake a complete successful read if no update necessary. */ - char success = 1; - - mutex_lock(&data->update_lock); - if (time_after(jiffies, data->last_updated + HZ)) { - success = 0; - if ((err = abituguru_read(data, ABIT_UGURU_ALARM_BANK, 0, - data->alarms, 3, 0)) != 3) - goto LEAVE_UPDATE; - for (i = 0; i < ABIT_UGURU_MAX_BANK1_SENSORS; i++) { - if ((err = abituguru_read(data, - ABIT_UGURU_SENSOR_BANK1, i, - &data->bank1_value[i], 1, 0)) != 1) - goto LEAVE_UPDATE; - if ((err = abituguru_read(data, - ABIT_UGURU_SENSOR_BANK1 + 1, i, - data->bank1_settings[i], 3, 0)) != 3) - goto LEAVE_UPDATE; - } - for (i = 0; i < data->bank2_sensors; i++) - if ((err = abituguru_read(data, - ABIT_UGURU_SENSOR_BANK2, i, - &data->bank2_value[i], 1, 0)) != 1) - goto LEAVE_UPDATE; - /* success! */ - success = 1; - data->update_timeouts = 0; -LEAVE_UPDATE: - /* handle timeout condition */ - if (!success && (err == -EBUSY || err >= 0)) { - /* No overflow please */ - if (data->update_timeouts < 255u) - data->update_timeouts++; - if (data->update_timeouts <= ABIT_UGURU_MAX_TIMEOUTS) { - ABIT_UGURU_DEBUG(3, "timeout exceeded, will " - "try again next update\n"); - /* Just a timeout, fake a successful read */ - success = 1; - } else - ABIT_UGURU_DEBUG(1, "timeout exceeded %d " - "times waiting for more input state\n", - (int)data->update_timeouts); - } - /* On success set last_updated */ - if (success) - data->last_updated = jiffies; - } - mutex_unlock(&data->update_lock); - - if (success) - return data; - else - return NULL; -} - -static struct platform_driver abituguru_driver = { - .driver = { - .owner = THIS_MODULE, - .name = ABIT_UGURU_NAME, - }, - .probe = abituguru_probe, - .remove = __devexit_p(abituguru_remove), -}; - -static int __init abituguru_detect(void) -{ - /* See if there is an uguru there. After a reboot uGuru will hold 0x00 - at DATA and 0xAC, when this driver has already been loaded once - DATA will hold 0x08. For most uGuru's CMD will hold 0xAC in either - scenario but some will hold 0x00. - Some uGuru's initally hold 0x09 at DATA and will only hold 0x08 - after reading CMD first, so CMD must be read first! */ - u8 cmd_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_CMD); - u8 data_val = inb_p(ABIT_UGURU_BASE + ABIT_UGURU_DATA); - if (((data_val == 0x00) || (data_val == 0x08)) && - ((cmd_val == 0x00) || (cmd_val == 0xAC))) - return ABIT_UGURU_BASE; - - ABIT_UGURU_DEBUG(2, "no Abit uGuru found, data = 0x%02X, cmd = " - "0x%02X\n", (unsigned int)data_val, (unsigned int)cmd_val); - - if (force) { - printk(KERN_INFO ABIT_UGURU_NAME ": Assuming Abit uGuru is " - "present because of \"force\" parameter\n"); - return ABIT_UGURU_BASE; - } - - /* No uGuru found */ - return -ENODEV; -} - -static struct platform_device *abituguru_pdev; - -static int __init abituguru_init(void) -{ - int address, err; - struct resource res = { .flags = IORESOURCE_IO }; - - address = abituguru_detect(); - if (address < 0) - return address; - - err = platform_driver_register(&abituguru_driver); - if (err) - goto exit; - - abituguru_pdev = platform_device_alloc(ABIT_UGURU_NAME, address); - if (!abituguru_pdev) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device allocation failed\n"); - err = -ENOMEM; - goto exit_driver_unregister; - } - - res.start = address; - res.end = address + ABIT_UGURU_REGION_LENGTH - 1; - res.name = ABIT_UGURU_NAME; - - err = platform_device_add_resources(abituguru_pdev, &res, 1); - if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device resource addition failed (%d)\n", err); - goto exit_device_put; - } - - err = platform_device_add(abituguru_pdev); - if (err) { - printk(KERN_ERR ABIT_UGURU_NAME - ": Device addition failed (%d)\n", err); - goto exit_device_put; - } - - return 0; - -exit_device_put: - platform_device_put(abituguru_pdev); -exit_driver_unregister: - platform_driver_unregister(&abituguru_driver); -exit: - return err; -} - -static void __exit abituguru_exit(void) -{ - platform_device_unregister(abituguru_pdev); - platform_driver_unregister(&abituguru_driver); -} - -MODULE_AUTHOR("Hans de Goede "); -MODULE_DESCRIPTION("Abit uGuru Sensor device"); -MODULE_LICENSE("GPL"); - -module_init(abituguru_init); -module_exit(abituguru_exit); diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c index facc1ccb8..65b2709f7 100644 --- a/drivers/hwmon/asb100.c +++ b/drivers/hwmon/asb100.c @@ -341,7 +341,7 @@ static ssize_t set_fan_min(struct device *dev, const char *buf, /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index fd72440fa..885465df6 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c @@ -99,6 +99,10 @@ superio_exit(int base) #define ADDR_REG_OFFSET 0 #define DATA_REG_OFFSET 1 +static struct resource f71805f_resource __initdata = { + .flags = IORESOURCE_IO, +}; + /* * Registers */ @@ -778,11 +782,6 @@ static struct platform_driver f71805f_driver = { static int __init f71805f_device_add(unsigned short address) { - struct resource res = { - .start = address, - .end = address + REGION_LENGTH - 1, - .flags = IORESOURCE_IO, - }; int err; pdev = platform_device_alloc(DRVNAME, address); @@ -792,8 +791,10 @@ static int __init f71805f_device_add(unsigned short address) goto exit; } - res.name = pdev->name; - err = platform_device_add_resources(pdev, &res, 1); + f71805f_resource.start = address; + f71805f_resource.end = address + REGION_LENGTH - 1; + f71805f_resource.name = pdev->name; + err = platform_device_add_resources(pdev, &f71805f_resource, 1); if (err) { printk(KERN_ERR DRVNAME ": Device resource addition failed " "(%d)\n", err); diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index 42b632889..1659f6c41 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c @@ -41,7 +41,7 @@ #define HDAPS_PORT_STATE 0x1611 /* device state */ #define HDAPS_PORT_YPOS 0x1612 /* y-axis position */ #define HDAPS_PORT_XPOS 0x1614 /* x-axis position */ -#define HDAPS_PORT_TEMP1 0x1616 /* device temperature, in Celsius */ +#define HDAPS_PORT_TEMP1 0x1616 /* device temperature, in celcius */ #define HDAPS_PORT_YVAR 0x1617 /* y-axis variance (what is this?) */ #define HDAPS_PORT_XVAR 0x1619 /* x-axis variance (what is this?) */ #define HDAPS_PORT_TEMP2 0x161b /* device temperature (again?) */ @@ -522,15 +522,13 @@ static int __init hdaps_init(void) { int ret; - /* Note that HDAPS_DMI_MATCH_NORMAL("ThinkPad T42") would match - "ThinkPad T42p", so the order of the entries matters */ + /* Note that DMI_MATCH(...,"ThinkPad T42") will match "ThinkPad T42p" */ struct dmi_system_id hdaps_whitelist[] = { HDAPS_DMI_MATCH_NORMAL("ThinkPad H"), HDAPS_DMI_MATCH_INVERT("ThinkPad R50p"), HDAPS_DMI_MATCH_NORMAL("ThinkPad R50"), HDAPS_DMI_MATCH_NORMAL("ThinkPad R51"), HDAPS_DMI_MATCH_NORMAL("ThinkPad R52"), - HDAPS_DMI_MATCH_NORMAL("ThinkPad H"), /* R52 (1846AQG) */ HDAPS_DMI_MATCH_INVERT("ThinkPad T41p"), HDAPS_DMI_MATCH_NORMAL("ThinkPad T41"), HDAPS_DMI_MATCH_INVERT("ThinkPad T42p"), @@ -538,9 +536,9 @@ static int __init hdaps_init(void) HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), HDAPS_DMI_MATCH_LENOVO("ThinkPad T60p"), HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), + HDAPS_DMI_MATCH_NORMAL("ThinkPad X41 Tablet"), HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"), HDAPS_DMI_MATCH_LENOVO("ThinkPad X60"), - HDAPS_DMI_MATCH_NORMAL("ThinkPad Z60m"), { .ident = NULL } }; diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index 9d67320e6..a74a44f16 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c @@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -57,20 +58,11 @@ doesn't seem to be any named specification for these. The conversion tables are detailed directly in the various Pentium M datasheets: http://www.intel.com/design/intarch/pentiumm/docs_pentiumm.htm - - The 14 specification corresponds to Intel Core series. There - doesn't seem to be any named specification for these. The conversion - tables are detailed directly in the various Pentium Core datasheets: - http://www.intel.com/design/mobile/datashts/309221.htm - - The 110 (VRM 11) specification corresponds to Intel Conroe based series. - http://www.intel.com/design/processor/applnots/313214.htm */ /* vrm is the VRM/VRD document version multiplied by 10. - val is the 4-bit or more VID code. - Returned value is in mV to avoid floating point in the kernel. - Some VID have some bits in uV scale, this is rounded to mV */ + val is the 4-, 5- or 6-bit VID code. + Returned value is in mV to avoid floating point in the kernel. */ int vid_from_reg(int val, u8 vrm) { int vid; @@ -78,36 +70,26 @@ int vid_from_reg(int val, u8 vrm) switch(vrm) { case 100: /* VRD 10.0 */ - /* compute in uV, round to mV */ - val &= 0x3f; if((val & 0x1f) == 0x1f) return 0; if((val & 0x1f) <= 0x09 || val == 0x0a) - vid = 1087500 - (val & 0x1f) * 25000; + vid = 10875 - (val & 0x1f) * 250; else - vid = 1862500 - (val & 0x1f) * 25000; + vid = 18625 - (val & 0x1f) * 250; if(val & 0x20) - vid -= 12500; - return((vid + 500) / 1000); + vid -= 125; + vid /= 10; /* only return 3 dec. places for now */ + return vid; - case 110: /* Intel Conroe */ - /* compute in uV, round to mV */ - val &= 0xff; - if(((val & 0x7e) == 0xfe) || (!(val & 0x7e))) - return 0; - return((1600000 - (val - 2) * 6250 + 500) / 1000); case 24: /* Opteron processor */ - val &= 0x1f; return(val == 0x1f ? 0 : 1550 - val * 25); case 91: /* VRM 9.1 */ case 90: /* VRM 9.0 */ - val &= 0x1f; return(val == 0x1f ? 0 : 1850 - val * 25); case 85: /* VRM 8.5 */ - val &= 0x1f; return((val & 0x10 ? 25 : 0) + ((val & 0x0f) > 0x04 ? 2050 : 1250) - ((val & 0x0f) * 50)); @@ -116,21 +98,14 @@ int vid_from_reg(int val, u8 vrm) val &= 0x0f; /* fall through */ case 82: /* VRM 8.2 */ - val &= 0x1f; return(val == 0x1f ? 0 : val & 0x10 ? 5100 - (val) * 100 : 2050 - (val) * 50); case 17: /* Intel IMVP-II */ - val &= 0x1f; return(val & 0x10 ? 975 - (val & 0xF) * 25 : 1750 - val * 50); case 13: - val &= 0x3f; - return(1708 - val * 16); - case 14: /* Intel Core */ - /* compute in uV, round to mV */ - val &= 0x7f; - return(val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000); + return(1708 - (val & 0x3f) * 16); default: /* report 0 for unknown */ printk(KERN_INFO "hwmon-vid: requested unknown VRM version\n"); return 0; @@ -163,8 +138,6 @@ static struct vrm_model vrm_models[] = { {X86_VENDOR_INTEL, 0x6, 0x9, ANY, 13}, /* Pentium M (130 nm) */ {X86_VENDOR_INTEL, 0x6, 0xB, ANY, 85}, /* Tualatin */ {X86_VENDOR_INTEL, 0x6, 0xD, ANY, 13}, /* Pentium M (90 nm) */ - {X86_VENDOR_INTEL, 0x6, 0xE, ANY, 14}, /* Intel Core (65 nm) */ - {X86_VENDOR_INTEL, 0x6, 0xF, ANY, 110}, /* Intel Conroe */ {X86_VENDOR_INTEL, 0x6, ANY, ANY, 82}, /* any P6 */ {X86_VENDOR_INTEL, 0x7, ANY, ANY, 0}, /* Itanium */ {X86_VENDOR_INTEL, 0xF, 0x0, ANY, 90}, /* P4 */ diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c deleted file mode 100644 index 6ba84731b..000000000 --- a/drivers/hwmon/lm70.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * lm70.c - * - * The LM70 is a temperature sensor chip from National Semiconductor (NS). - * Copyright (C) 2006 Kaiwan N Billimoria - * - * The LM70 communicates with a host processor via an SPI/Microwire Bus - * interface. The complete datasheet is available at National's website - * here: - * http://www.national.com/pf/LM/LM70.html - * - * 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 -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRVNAME "lm70" - -struct lm70 { - struct class_device *cdev; - struct semaphore sem; -}; - -/* sysfs hook function */ -static ssize_t lm70_sense_temp(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct spi_device *spi = to_spi_device(dev); - int status, val; - u8 rxbuf[2]; - s16 raw=0; - struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev); - - if (down_interruptible(&p_lm70->sem)) - return -ERESTARTSYS; - - /* - * spi_read() requires a DMA-safe buffer; so we use - * spi_write_then_read(), transmitting 0 bytes. - */ - status = spi_write_then_read(spi, NULL, 0, &rxbuf[0], 2); - if (status < 0) { - printk(KERN_WARNING - "spi_write_then_read failed with status %d\n", status); - goto out; - } - dev_dbg(dev, "rxbuf[1] : 0x%x rxbuf[0] : 0x%x\n", rxbuf[1], rxbuf[0]); - - raw = (rxbuf[1] << 8) + rxbuf[0]; - dev_dbg(dev, "raw=0x%x\n", raw); - - /* - * The "raw" temperature read into rxbuf[] is a 16-bit signed 2's - * complement value. Only the MSB 11 bits (1 sign + 10 temperature - * bits) are meaningful; the LSB 5 bits are to be discarded. - * See the datasheet. - * - * Further, each bit represents 0.25 degrees Celsius; so, multiply - * by 0.25. Also multiply by 1000 to represent in millidegrees - * Celsius. - * So it's equivalent to multiplying by 0.25 * 1000 = 250. - */ - val = ((int)raw/32) * 250; - status = sprintf(buf, "%+d\n", val); /* millidegrees Celsius */ -out: - up(&p_lm70->sem); - return status; -} - -static DEVICE_ATTR(temp1_input, S_IRUGO, lm70_sense_temp, NULL); - -/*----------------------------------------------------------------------*/ - -static int __devinit lm70_probe(struct spi_device *spi) -{ - struct lm70 *p_lm70; - int status; - - p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL); - if (!p_lm70) - return -ENOMEM; - - init_MUTEX(&p_lm70->sem); - - /* sysfs hook */ - p_lm70->cdev = hwmon_device_register(&spi->dev); - if (IS_ERR(p_lm70->cdev)) { - dev_dbg(&spi->dev, "hwmon_device_register failed.\n"); - status = PTR_ERR(p_lm70->cdev); - goto out_dev_reg_failed; - } - dev_set_drvdata(&spi->dev, p_lm70); - - if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input))) { - dev_dbg(&spi->dev, "device_create_file failure.\n"); - goto out_dev_create_file_failed; - } - - return 0; - -out_dev_create_file_failed: - hwmon_device_unregister(p_lm70->cdev); -out_dev_reg_failed: - dev_set_drvdata(&spi->dev, NULL); - kfree(p_lm70); - return status; -} - -static int __exit lm70_remove(struct spi_device *spi) -{ - struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev); - - device_remove_file(&spi->dev, &dev_attr_temp1_input); - hwmon_device_unregister(p_lm70->cdev); - dev_set_drvdata(&spi->dev, NULL); - kfree(p_lm70); - - return 0; -} - -static struct spi_driver lm70_driver = { - .driver = { - .name = "lm70", - .owner = THIS_MODULE, - }, - .probe = lm70_probe, - .remove = __devexit_p(lm70_remove), -}; - -static int __init init_lm70(void) -{ - return spi_register_driver(&lm70_driver); -} - -static void __exit cleanup_lm70(void) -{ - spi_unregister_driver(&lm70_driver); -} - -module_init(init_lm70); -module_exit(cleanup_lm70); - -MODULE_AUTHOR("Kaiwan N Billimoria"); -MODULE_DESCRIPTION("National Semiconductor LM70 Linux driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index a6ce7abf8..94be3d797 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c @@ -358,7 +358,7 @@ static ssize_t show_fan_div(struct device *dev, char *buf, int nr) /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index b4ccdfc01..f72120d08 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -253,7 +253,7 @@ set_fan(min2, fan_min[1], LM80_REG_FAN_MIN(2), fan_div[1]); /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 2137d7879..aac4ec2bf 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c @@ -12,10 +12,6 @@ * Since the datasheet omits to give the chip stepping code, I give it * here: 0x03 (at register 0xff). * - * Also supports the LM82 temp sensor, which is basically a stripped down - * model of the LM83. Datasheet is here: - * http://www.national.com/pf/LM/LM82.html - * * 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 @@ -56,7 +52,7 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a, * Insmod parameters */ -I2C_CLIENT_INSMOD_2(lm83, lm82); +I2C_CLIENT_INSMOD_1(lm83); /* * The LM83 registers @@ -287,9 +283,6 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind) if (man_id == 0x01) { /* National Semiconductor */ if (chip_id == 0x03) { kind = lm83; - } else - if (chip_id == 0x01) { - kind = lm82; } } @@ -303,9 +296,6 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind) if (kind == lm83) { name = "lm83"; - } else - if (kind == lm82) { - name = "lm82"; } /* We can fill in the remaining client fields */ @@ -329,46 +319,32 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, int kind) goto exit_detach; } - /* - * The LM82 can only monitor one external diode which is - * at the same register as the LM83 temp3 entry - so we - * declare 1 and 3 common, and then 2 and 4 only for the LM83. - */ - device_create_file(&new_client->dev, &sensor_dev_attr_temp1_input.dev_attr); + device_create_file(&new_client->dev, + &sensor_dev_attr_temp2_input.dev_attr); device_create_file(&new_client->dev, &sensor_dev_attr_temp3_input.dev_attr); - + device_create_file(&new_client->dev, + &sensor_dev_attr_temp4_input.dev_attr); device_create_file(&new_client->dev, &sensor_dev_attr_temp1_max.dev_attr); + device_create_file(&new_client->dev, + &sensor_dev_attr_temp2_max.dev_attr); device_create_file(&new_client->dev, &sensor_dev_attr_temp3_max.dev_attr); - + device_create_file(&new_client->dev, + &sensor_dev_attr_temp4_max.dev_attr); device_create_file(&new_client->dev, &sensor_dev_attr_temp1_crit.dev_attr); + device_create_file(&new_client->dev, + &sensor_dev_attr_temp2_crit.dev_attr); device_create_file(&new_client->dev, &sensor_dev_attr_temp3_crit.dev_attr); - + device_create_file(&new_client->dev, + &sensor_dev_attr_temp4_crit.dev_attr); device_create_file(&new_client->dev, &dev_attr_alarms); - if (kind == lm83) { - device_create_file(&new_client->dev, - &sensor_dev_attr_temp2_input.dev_attr); - device_create_file(&new_client->dev, - &sensor_dev_attr_temp4_input.dev_attr); - - device_create_file(&new_client->dev, - &sensor_dev_attr_temp2_max.dev_attr); - device_create_file(&new_client->dev, - &sensor_dev_attr_temp4_max.dev_attr); - - device_create_file(&new_client->dev, - &sensor_dev_attr_temp2_crit.dev_attr); - device_create_file(&new_client->dev, - &sensor_dev_attr_temp4_crit.dev_attr); - } - return 0; exit_detach: diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c index e6c1b638c..e229daf66 100644 --- a/drivers/hwmon/lm87.c +++ b/drivers/hwmon/lm87.c @@ -421,7 +421,7 @@ static void set_fan_min(struct device *dev, const char *buf, int nr) /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan clock divider. This follows the principle - of least surprise; the user doesn't expect the fan minimum to change just + of least suprise; the user doesn't expect the fan minimum to change just because the divider changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c index 063f71c5f..6f3fda73f 100644 --- a/drivers/hwmon/sis5595.c +++ b/drivers/hwmon/sis5595.c @@ -380,7 +380,7 @@ static ssize_t show_fan_div(struct device *dev, char *buf, int nr) /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 825e8f726..7732aec54 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c @@ -207,7 +207,7 @@ static ssize_t set_fan_min(struct device *dev, const char *buf, /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan clock divider. This follows the principle - of least surprise; the user doesn't expect the fan minimum to change just + of least suprise; the user doesn't expect the fan minimum to change just because the divider changed. */ static ssize_t set_fan_div(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c deleted file mode 100644 index bdc4570ac..000000000 --- a/drivers/hwmon/smsc47m192.c +++ /dev/null @@ -1,648 +0,0 @@ -/* - smsc47m192.c - Support for hardware monitoring block of - SMSC LPC47M192 and LPC47M997 Super I/O chips - - Copyright (C) 2006 Hartmut Rick - - Derived from lm78.c and other chip drivers. - - 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 -#include -#include -#include -#include -#include -#include -#include -#include - -/* Addresses to scan */ -static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; - -/* Insmod parameters */ -I2C_CLIENT_INSMOD_1(smsc47m192); - -/* SMSC47M192 registers */ -#define SMSC47M192_REG_IN(nr) ((nr)<6 ? (0x20 + (nr)) : \ - (0x50 + (nr) - 6)) -#define SMSC47M192_REG_IN_MAX(nr) ((nr)<6 ? (0x2b + (nr) * 2) : \ - (0x54 + (((nr) - 6) * 2))) -#define SMSC47M192_REG_IN_MIN(nr) ((nr)<6 ? (0x2c + (nr) * 2) : \ - (0x55 + (((nr) - 6) * 2))) -static u8 SMSC47M192_REG_TEMP[3] = { 0x27, 0x26, 0x52 }; -static u8 SMSC47M192_REG_TEMP_MAX[3] = { 0x39, 0x37, 0x58 }; -static u8 SMSC47M192_REG_TEMP_MIN[3] = { 0x3A, 0x38, 0x59 }; -#define SMSC47M192_REG_TEMP_OFFSET(nr) ((nr)==2 ? 0x1e : 0x1f) -#define SMSC47M192_REG_ALARM1 0x41 -#define SMSC47M192_REG_ALARM2 0x42 -#define SMSC47M192_REG_VID 0x47 -#define SMSC47M192_REG_VID4 0x49 -#define SMSC47M192_REG_CONFIG 0x40 -#define SMSC47M192_REG_SFR 0x4f -#define SMSC47M192_REG_COMPANY_ID 0x3e -#define SMSC47M192_REG_VERSION 0x3f - -/* generalised scaling with integer rounding */ -static inline int SCALE(long val, int mul, int div) -{ - if (val < 0) - return (val * mul - div / 2) / div; - else - return (val * mul + div / 2) / div; -} - -/* Conversions */ - -/* smsc47m192 internally scales voltage measurements */ -static const u16 nom_mv[] = { 2500, 2250, 3300, 5000, 12000, 3300, 1500, 1800 }; - -static inline unsigned int IN_FROM_REG(u8 reg, int n) -{ - return SCALE(reg, nom_mv[n], 192); -} - -static inline u8 IN_TO_REG(unsigned long val, int n) -{ - return SENSORS_LIMIT(SCALE(val, 192, nom_mv[n]), 0, 255); -} - -/* TEMP: 0.001 degC units (-128C to +127C) - REG: 1C/bit, two's complement */ -static inline s8 TEMP_TO_REG(int val) -{ - return SENSORS_LIMIT(SCALE(val, 1, 1000), -128000, 127000); -} - -static inline int TEMP_FROM_REG(s8 val) -{ - return val * 1000; -} - -struct smsc47m192_data { - struct i2c_client client; - struct class_device *class_dev; - struct semaphore update_lock; - char valid; /* !=0 if following fields are valid */ - unsigned long last_updated; /* In jiffies */ - - u8 in[8]; /* Register value */ - u8 in_max[8]; /* Register value */ - u8 in_min[8]; /* Register value */ - s8 temp[3]; /* Register value */ - s8 temp_max[3]; /* Register value */ - s8 temp_min[3]; /* Register value */ - s8 temp_offset[3]; /* Register value */ - u16 alarms; /* Register encoding, combined */ - u8 vid; /* Register encoding, combined */ - u8 vrm; -}; - -static int smsc47m192_attach_adapter(struct i2c_adapter *adapter); -static int smsc47m192_detect(struct i2c_adapter *adapter, int address, - int kind); -static int smsc47m192_detach_client(struct i2c_client *client); -static struct smsc47m192_data *smsc47m192_update_device(struct device *dev); - -static struct i2c_driver smsc47m192_driver = { - .driver = { - .name = "smsc47m192", - }, - .attach_adapter = smsc47m192_attach_adapter, - .detach_client = smsc47m192_detach_client, -}; - -/* Voltages */ -static ssize_t show_in(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr], nr)); -} - -static ssize_t show_in_min(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr], nr)); -} - -static ssize_t show_in_max(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[nr], nr)); -} - -static ssize_t set_in_min(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - unsigned long val = simple_strtoul(buf, NULL, 10); - - down(&data->update_lock); - data->in_min[nr] = IN_TO_REG(val, nr); - i2c_smbus_write_byte_data(client, SMSC47M192_REG_IN_MIN(nr), - data->in_min[nr]); - up(&data->update_lock); - return count; -} - -static ssize_t set_in_max(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - unsigned long val = simple_strtoul(buf, NULL, 10); - - down(&data->update_lock); - data->in_max[nr] = IN_TO_REG(val, nr); - i2c_smbus_write_byte_data(client, SMSC47M192_REG_IN_MAX(nr), - data->in_max[nr]); - up(&data->update_lock); - return count; -} - -#define show_in_offset(offset) \ -static SENSOR_DEVICE_ATTR(in##offset##_input, S_IRUGO, \ - show_in, NULL, offset); \ -static SENSOR_DEVICE_ATTR(in##offset##_min, S_IRUGO | S_IWUSR, \ - show_in_min, set_in_min, offset); \ -static SENSOR_DEVICE_ATTR(in##offset##_max, S_IRUGO | S_IWUSR, \ - show_in_max, set_in_max, offset); - -show_in_offset(0) -show_in_offset(1) -show_in_offset(2) -show_in_offset(3) -show_in_offset(4) -show_in_offset(5) -show_in_offset(6) -show_in_offset(7) - -/* Temperatures */ -static ssize_t show_temp(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp[nr])); -} - -static ssize_t show_temp_min(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_min[nr])); -} - -static ssize_t show_temp_max(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_max[nr])); -} - -static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - - down(&data->update_lock); - data->temp_min[nr] = TEMP_TO_REG(val); - i2c_smbus_write_byte_data(client, SMSC47M192_REG_TEMP_MIN[nr], - data->temp_min[nr]); - up(&data->update_lock); - return count; -} - -static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - - down(&data->update_lock); - data->temp_max[nr] = TEMP_TO_REG(val); - i2c_smbus_write_byte_data(client, SMSC47M192_REG_TEMP_MAX[nr], - data->temp_max[nr]); - up(&data->update_lock); - return count; -} - -static ssize_t show_temp_offset(struct device *dev, struct device_attribute - *attr, char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_offset[nr])); -} - -static ssize_t set_temp_offset(struct device *dev, struct device_attribute - *attr, const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - u8 sfr = i2c_smbus_read_byte_data(client, SMSC47M192_REG_SFR); - long val = simple_strtol(buf, NULL, 10); - - down(&data->update_lock); - data->temp_offset[nr] = TEMP_TO_REG(val); - if (nr>1) - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_TEMP_OFFSET(nr), data->temp_offset[nr]); - else if (data->temp_offset[nr] != 0) { - /* offset[0] and offset[1] share the same register, - SFR bit 4 activates offset[0] */ - i2c_smbus_write_byte_data(client, SMSC47M192_REG_SFR, - (sfr & 0xef) | (nr==0 ? 0x10 : 0)); - data->temp_offset[1-nr] = 0; - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_TEMP_OFFSET(nr), data->temp_offset[nr]); - } else if ((sfr & 0x10) == (nr==0 ? 0x10 : 0)) - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_TEMP_OFFSET(nr), 0); - up(&data->update_lock); - return count; -} - -#define show_temp_index(index) \ -static SENSOR_DEVICE_ATTR(temp##index##_input, S_IRUGO, \ - show_temp, NULL, index-1); \ -static SENSOR_DEVICE_ATTR(temp##index##_min, S_IRUGO | S_IWUSR, \ - show_temp_min, set_temp_min, index-1); \ -static SENSOR_DEVICE_ATTR(temp##index##_max, S_IRUGO | S_IWUSR, \ - show_temp_max, set_temp_max, index-1); \ -static SENSOR_DEVICE_ATTR(temp##index##_offset, S_IRUGO | S_IWUSR, \ - show_temp_offset, set_temp_offset, index-1); - -show_temp_index(1) -show_temp_index(2) -show_temp_index(3) - -/* VID */ -static ssize_t show_vid(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); -} -static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); - -static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%d\n", data->vrm); -} - -static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - data->vrm = simple_strtoul(buf, NULL, 10); - return count; -} -static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm); - -/* Alarms */ -static ssize_t show_alarm(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct smsc47m192_data *data = smsc47m192_update_device(dev); - return sprintf(buf, "%u\n", (data->alarms & nr) ? 1 : 0); -} - -static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL, 0x0010); -static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL, 0x0020); -static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL, 0x0040); -static SENSOR_DEVICE_ATTR(temp2_input_fault, S_IRUGO, show_alarm, NULL, 0x4000); -static SENSOR_DEVICE_ATTR(temp3_input_fault, S_IRUGO, show_alarm, NULL, 0x8000); -static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 0x0001); -static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 0x0002); -static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL, 0x0004); -static SENSOR_DEVICE_ATTR(in3_alarm, S_IRUGO, show_alarm, NULL, 0x0008); -static SENSOR_DEVICE_ATTR(in4_alarm, S_IRUGO, show_alarm, NULL, 0x0100); -static SENSOR_DEVICE_ATTR(in5_alarm, S_IRUGO, show_alarm, NULL, 0x0200); -static SENSOR_DEVICE_ATTR(in6_alarm, S_IRUGO, show_alarm, NULL, 0x0400); -static SENSOR_DEVICE_ATTR(in7_alarm, S_IRUGO, show_alarm, NULL, 0x0800); - -/* This function is called when: - * smsc47m192_driver is inserted (when this module is loaded), for each - available adapter - * when a new adapter is inserted (and smsc47m192_driver is still present) */ -static int smsc47m192_attach_adapter(struct i2c_adapter *adapter) -{ - if (!(adapter->class & I2C_CLASS_HWMON)) - return 0; - return i2c_probe(adapter, &addr_data, smsc47m192_detect); -} - -static void smsc47m192_init_client(struct i2c_client *client) -{ - int i; - u8 config = i2c_smbus_read_byte_data(client, SMSC47M192_REG_CONFIG); - u8 sfr = i2c_smbus_read_byte_data(client, SMSC47M192_REG_SFR); - - /* select cycle mode (pause 1 sec between updates) */ - i2c_smbus_write_byte_data(client, SMSC47M192_REG_SFR, - (sfr & 0xfd) | 0x02); - if (!(config & 0x01)) { - /* initialize alarm limits */ - for (i=0; i<8; i++) { - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_IN_MIN(i), 0); - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_IN_MAX(i), 0xff); - } - for (i=0; i<3; i++) { - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_TEMP_MIN[i], 0x80); - i2c_smbus_write_byte_data(client, - SMSC47M192_REG_TEMP_MAX[i], 0x7f); - } - - /* start monitoring */ - i2c_smbus_write_byte_data(client, SMSC47M192_REG_CONFIG, - (config & 0xf7) | 0x01); - } -} - -/* This function is called by i2c_probe */ -static int smsc47m192_detect(struct i2c_adapter *adapter, int address, - int kind) -{ - struct i2c_client *client; - struct smsc47m192_data *data; - int err = 0; - int version, config; - - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) - goto exit; - - if (!(data = kzalloc(sizeof(struct smsc47m192_data), GFP_KERNEL))) { - err = -ENOMEM; - goto exit; - } - - client = &data->client; - i2c_set_clientdata(client, data); - client->addr = address; - client->adapter = adapter; - client->driver = &smsc47m192_driver; - - if (kind == 0) - kind = smsc47m192; - - /* Detection criteria from sensors_detect script */ - if (kind < 0) { - if (i2c_smbus_read_byte_data(client, - SMSC47M192_REG_COMPANY_ID) == 0x55 - && ((version = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_VERSION)) & 0xf0) == 0x20 - && (i2c_smbus_read_byte_data(client, - SMSC47M192_REG_VID) & 0x70) == 0x00 - && (i2c_smbus_read_byte_data(client, - SMSC47M192_REG_VID4) & 0xfe) == 0x80) { - dev_info(&adapter->dev, - "found SMSC47M192 or SMSC47M997, " - "version 2, stepping A%d\n", version & 0x0f); - } else { - dev_dbg(&adapter->dev, - "SMSC47M192 detection failed at 0x%02x\n", - address); - goto exit_free; - } - } - - /* Fill in the remaining client fields and put into the global list */ - strlcpy(client->name, "smsc47m192", I2C_NAME_SIZE); - data->vrm = vid_which_vrm(); - init_MUTEX(&data->update_lock); - - /* Tell the I2C layer a new client has arrived */ - if ((err = i2c_attach_client(client))) - goto exit_free; - - /* Initialize the SMSC47M192 chip */ - smsc47m192_init_client(client); - - /* Register sysfs hooks */ - data->class_dev = hwmon_device_register(&client->dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); - goto exit_detach; - } - - device_create_file(&client->dev, &sensor_dev_attr_in0_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in0_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in0_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in0_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in1_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in1_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in1_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in1_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in2_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in2_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in2_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in2_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in3_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in3_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in3_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in3_alarm.dev_attr); - - /* Pin 110 is either in4 (+12V) or VID4 */ - config = i2c_smbus_read_byte_data(client, SMSC47M192_REG_CONFIG); - if (!(config & 0x20)) { - device_create_file(&client->dev, - &sensor_dev_attr_in4_input.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_in4_min.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_in4_max.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_in4_alarm.dev_attr); - } - device_create_file(&client->dev, &sensor_dev_attr_in5_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in5_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in5_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in5_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in6_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in6_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in6_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in6_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in7_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in7_min.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in7_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_in7_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp1_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp1_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp1_min.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_temp1_offset.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp1_alarm.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp2_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp2_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp2_min.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_temp2_offset.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp2_alarm.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_temp2_input_fault.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp3_input.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp3_max.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp3_min.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_temp3_offset.dev_attr); - device_create_file(&client->dev, &sensor_dev_attr_temp3_alarm.dev_attr); - device_create_file(&client->dev, - &sensor_dev_attr_temp3_input_fault.dev_attr); - device_create_file(&client->dev, &dev_attr_cpu0_vid); - device_create_file(&client->dev, &dev_attr_vrm); - - return 0; - -exit_detach: - i2c_detach_client(client); -exit_free: - kfree(data); -exit: - return err; -} - -static int smsc47m192_detach_client(struct i2c_client *client) -{ - struct smsc47m192_data *data = i2c_get_clientdata(client); - int err; - - hwmon_device_unregister(data->class_dev); - - if ((err = i2c_detach_client(client))) - return err; - - kfree(data); - - return 0; -} - -static struct smsc47m192_data *smsc47m192_update_device(struct device *dev) -{ - struct i2c_client *client = to_i2c_client(dev); - struct smsc47m192_data *data = i2c_get_clientdata(client); - int i, config; - - down(&data->update_lock); - - if (time_after(jiffies, data->last_updated + HZ + HZ / 2) - || !data->valid) { - u8 sfr = i2c_smbus_read_byte_data(client, SMSC47M192_REG_SFR); - - dev_dbg(&client->dev, "Starting smsc47m192 update\n"); - - for (i = 0; i <= 7; i++) { - data->in[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_IN(i)); - data->in_min[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_IN_MIN(i)); - data->in_max[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_IN_MAX(i)); - } - for (i = 0; i < 3; i++) { - data->temp[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_TEMP[i]); - data->temp_max[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_TEMP_MAX[i]); - data->temp_min[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_TEMP_MIN[i]); - } - for (i = 1; i < 3; i++) - data->temp_offset[i] = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_TEMP_OFFSET(i)); - /* first offset is temp_offset[0] if SFR bit 4 is set, - temp_offset[1] otherwise */ - if (sfr & 0x10) { - data->temp_offset[0] = data->temp_offset[1]; - data->temp_offset[1] = 0; - } else - data->temp_offset[0] = 0; - - data->vid = i2c_smbus_read_byte_data(client, SMSC47M192_REG_VID) - & 0x0f; - config = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_CONFIG); - if (config & 0x20) - data->vid |= (i2c_smbus_read_byte_data(client, - SMSC47M192_REG_VID4) & 0x01) << 4; - data->alarms = i2c_smbus_read_byte_data(client, - SMSC47M192_REG_ALARM1) | - (i2c_smbus_read_byte_data(client, - SMSC47M192_REG_ALARM2) << 8); - - data->last_updated = jiffies; - data->valid = 1; - } - - up(&data->update_lock); - - return data; -} - -static int __init smsc47m192_init(void) -{ - return i2c_add_driver(&smsc47m192_driver); -} - -static void __exit smsc47m192_exit(void) -{ - i2c_del_driver(&smsc47m192_driver); -} - -MODULE_AUTHOR("Hartmut Rick "); -MODULE_DESCRIPTION("SMSC47M192 driver"); -MODULE_LICENSE("GPL"); - -module_init(smsc47m192_init); -module_exit(smsc47m192_exit); diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 40301bc6c..b6bd5685f 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -30,7 +30,10 @@ Supports the following chips: Chip #vin #fan #pwm #temp chip_id man_id - w83627ehf 10 5 - 3 0x88 0x5ca3 + w83627ehf - 5 - 3 0x88 0x5ca3 + + This is a preliminary version of the driver, only supporting the + fan and temperature inputs. The chip does much more than that. */ #include @@ -118,14 +121,6 @@ superio_exit(void) static const u16 W83627EHF_REG_FAN[] = { 0x28, 0x29, 0x2a, 0x3f, 0x553 }; static const u16 W83627EHF_REG_FAN_MIN[] = { 0x3b, 0x3c, 0x3d, 0x3e, 0x55c }; -/* The W83627EHF registers for nr=7,8,9 are in bank 5 */ -#define W83627EHF_REG_IN_MAX(nr) ((nr < 7) ? (0x2b + (nr) * 2) : \ - (0x554 + (((nr) - 7) * 2))) -#define W83627EHF_REG_IN_MIN(nr) ((nr < 7) ? (0x2c + (nr) * 2) : \ - (0x555 + (((nr) - 7) * 2))) -#define W83627EHF_REG_IN(nr) ((nr < 7) ? (0x20 + (nr)) : \ - (0x550 + (nr) - 7)) - #define W83627EHF_REG_TEMP1 0x27 #define W83627EHF_REG_TEMP1_HYST 0x3a #define W83627EHF_REG_TEMP1_OVER 0x39 @@ -141,10 +136,6 @@ static const u16 W83627EHF_REG_TEMP_CONFIG[] = { 0x152, 0x252 }; #define W83627EHF_REG_DIODE 0x59 #define W83627EHF_REG_SMI_OVT 0x4C -#define W83627EHF_REG_ALARM1 0x459 -#define W83627EHF_REG_ALARM2 0x45A -#define W83627EHF_REG_ALARM3 0x45B - /* * Conversions */ @@ -181,20 +172,6 @@ temp1_to_reg(int temp) return (temp + 500) / 1000; } -/* Some of analog inputs have internal scaling (2x), 8mV is ADC LSB */ - -static u8 scale_in[10] = { 8, 8, 16, 16, 8, 8, 8, 16, 16, 8 }; - -static inline long in_from_reg(u8 reg, u8 nr) -{ - return reg * scale_in[nr]; -} - -static inline u8 in_to_reg(u32 val, u8 nr) -{ - return SENSORS_LIMIT(((val + (scale_in[nr] / 2)) / scale_in[nr]), 0, 255); -} - /* * Data structures and manipulation thereof */ @@ -209,9 +186,6 @@ struct w83627ehf_data { unsigned long last_updated; /* In jiffies */ /* Register values */ - u8 in[10]; /* Register value */ - u8 in_max[10]; /* Register value */ - u8 in_min[10]; /* Register value */ u8 fan[5]; u8 fan_min[5]; u8 fan_div[5]; @@ -222,7 +196,6 @@ struct w83627ehf_data { s16 temp[2]; s16 temp_max[2]; s16 temp_max_hyst[2]; - u32 alarms; }; static inline int is_word_sized(u16 reg) @@ -376,16 +349,6 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) data->fan_div[3] |= (i >> 5) & 0x04; } - /* Measured voltages and limits */ - for (i = 0; i < 10; i++) { - data->in[i] = w83627ehf_read_value(client, - W83627EHF_REG_IN(i)); - data->in_min[i] = w83627ehf_read_value(client, - W83627EHF_REG_IN_MIN(i)); - data->in_max[i] = w83627ehf_read_value(client, - W83627EHF_REG_IN_MAX(i)); - } - /* Measured fan speeds and limits */ for (i = 0; i < 5; i++) { if (!(data->has_fan & (1 << i))) @@ -432,13 +395,6 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) W83627EHF_REG_TEMP_HYST[i]); } - data->alarms = w83627ehf_read_value(client, - W83627EHF_REG_ALARM1) | - (w83627ehf_read_value(client, - W83627EHF_REG_ALARM2) << 8) | - (w83627ehf_read_value(client, - W83627EHF_REG_ALARM3) << 16); - data->last_updated = jiffies; data->valid = 1; } @@ -450,109 +406,6 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) /* * Sysfs callback functions */ -#define show_in_reg(reg) \ -static ssize_t \ -show_##reg(struct device *dev, struct device_attribute *attr, \ - char *buf) \ -{ \ - struct w83627ehf_data *data = w83627ehf_update_device(dev); \ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); \ - int nr = sensor_attr->index; \ - return sprintf(buf, "%ld\n", in_from_reg(data->reg[nr], nr)); \ -} -show_in_reg(in) -show_in_reg(in_min) -show_in_reg(in_max) - -#define store_in_reg(REG, reg) \ -static ssize_t \ -store_in_##reg (struct device *dev, struct device_attribute *attr, \ - const char *buf, size_t count) \ -{ \ - struct i2c_client *client = to_i2c_client(dev); \ - struct w83627ehf_data *data = i2c_get_clientdata(client); \ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); \ - int nr = sensor_attr->index; \ - u32 val = simple_strtoul(buf, NULL, 10); \ - \ - mutex_lock(&data->update_lock); \ - data->in_##reg[nr] = in_to_reg(val, nr); \ - w83627ehf_write_value(client, W83627EHF_REG_IN_##REG(nr), \ - data->in_##reg[nr]); \ - mutex_unlock(&data->update_lock); \ - return count; \ -} - -store_in_reg(MIN, min) -store_in_reg(MAX, max) - -static ssize_t show_alarm(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct w83627ehf_data *data = w83627ehf_update_device(dev); - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - return sprintf(buf, "%u\n", (data->alarms >> nr) & 0x01); -} - -static struct sensor_device_attribute sda_in_input[] = { - SENSOR_ATTR(in0_input, S_IRUGO, show_in, NULL, 0), - SENSOR_ATTR(in1_input, S_IRUGO, show_in, NULL, 1), - SENSOR_ATTR(in2_input, S_IRUGO, show_in, NULL, 2), - SENSOR_ATTR(in3_input, S_IRUGO, show_in, NULL, 3), - SENSOR_ATTR(in4_input, S_IRUGO, show_in, NULL, 4), - SENSOR_ATTR(in5_input, S_IRUGO, show_in, NULL, 5), - SENSOR_ATTR(in6_input, S_IRUGO, show_in, NULL, 6), - SENSOR_ATTR(in7_input, S_IRUGO, show_in, NULL, 7), - SENSOR_ATTR(in8_input, S_IRUGO, show_in, NULL, 8), - SENSOR_ATTR(in9_input, S_IRUGO, show_in, NULL, 9), -}; - -static struct sensor_device_attribute sda_in_alarm[] = { - SENSOR_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 0), - SENSOR_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 1), - SENSOR_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL, 2), - SENSOR_ATTR(in3_alarm, S_IRUGO, show_alarm, NULL, 3), - SENSOR_ATTR(in4_alarm, S_IRUGO, show_alarm, NULL, 8), - SENSOR_ATTR(in5_alarm, S_IRUGO, show_alarm, NULL, 21), - SENSOR_ATTR(in6_alarm, S_IRUGO, show_alarm, NULL, 20), - SENSOR_ATTR(in7_alarm, S_IRUGO, show_alarm, NULL, 16), - SENSOR_ATTR(in8_alarm, S_IRUGO, show_alarm, NULL, 17), - SENSOR_ATTR(in9_alarm, S_IRUGO, show_alarm, NULL, 19), -}; - -static struct sensor_device_attribute sda_in_min[] = { - SENSOR_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 0), - SENSOR_ATTR(in1_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 1), - SENSOR_ATTR(in2_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 2), - SENSOR_ATTR(in3_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 3), - SENSOR_ATTR(in4_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 4), - SENSOR_ATTR(in5_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 5), - SENSOR_ATTR(in6_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 6), - SENSOR_ATTR(in7_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 7), - SENSOR_ATTR(in8_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 8), - SENSOR_ATTR(in9_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 9), -}; - -static struct sensor_device_attribute sda_in_max[] = { - SENSOR_ATTR(in0_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 0), - SENSOR_ATTR(in1_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 1), - SENSOR_ATTR(in2_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 2), - SENSOR_ATTR(in3_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 3), - SENSOR_ATTR(in4_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 4), - SENSOR_ATTR(in5_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 5), - SENSOR_ATTR(in6_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 6), - SENSOR_ATTR(in7_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 7), - SENSOR_ATTR(in8_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 8), - SENSOR_ATTR(in9_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 9), -}; - -static void device_create_file_in(struct device *dev, int i) -{ - device_create_file(dev, &sda_in_input[i].dev_attr); - device_create_file(dev, &sda_in_alarm[i].dev_attr); - device_create_file(dev, &sda_in_min[i].dev_attr); - device_create_file(dev, &sda_in_max[i].dev_attr); -} #define show_fan_reg(reg) \ static ssize_t \ @@ -652,14 +505,6 @@ static struct sensor_device_attribute sda_fan_input[] = { SENSOR_ATTR(fan5_input, S_IRUGO, show_fan, NULL, 4), }; -static struct sensor_device_attribute sda_fan_alarm[] = { - SENSOR_ATTR(fan1_alarm, S_IRUGO, show_alarm, NULL, 6), - SENSOR_ATTR(fan2_alarm, S_IRUGO, show_alarm, NULL, 7), - SENSOR_ATTR(fan3_alarm, S_IRUGO, show_alarm, NULL, 11), - SENSOR_ATTR(fan4_alarm, S_IRUGO, show_alarm, NULL, 10), - SENSOR_ATTR(fan5_alarm, S_IRUGO, show_alarm, NULL, 23), -}; - static struct sensor_device_attribute sda_fan_min[] = { SENSOR_ATTR(fan1_min, S_IWUSR | S_IRUGO, show_fan_min, store_fan_min, 0), @@ -684,7 +529,6 @@ static struct sensor_device_attribute sda_fan_div[] = { static void device_create_file_fan(struct device *dev, int i) { device_create_file(dev, &sda_fan_input[i].dev_attr); - device_create_file(dev, &sda_fan_alarm[i].dev_attr); device_create_file(dev, &sda_fan_div[i].dev_attr); device_create_file(dev, &sda_fan_min[i].dev_attr); } @@ -772,9 +616,6 @@ static struct sensor_device_attribute sda_temp[] = { store_temp_max_hyst, 0), SENSOR_ATTR(temp3_max_hyst, S_IRUGO | S_IWUSR, show_temp_max_hyst, store_temp_max_hyst, 1), - SENSOR_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL, 4), - SENSOR_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL, 5), - SENSOR_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL, 13), }; /* @@ -864,9 +705,6 @@ static int w83627ehf_detect(struct i2c_adapter *adapter) goto exit_detach; } - for (i = 0; i < 10; i++) - device_create_file_in(dev, i); - for (i = 0; i < 5; i++) { if (data->has_fan & (1 << i)) device_create_file_fan(dev, i); diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 79368d53c..71fb7f1af 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -781,7 +781,7 @@ show_fan_div_reg(struct device *dev, char *buf, int nr) /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t store_fan_div_reg(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index 7be469ed0..e4c700356 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -630,7 +630,7 @@ show_fan_div_reg(struct device *dev, char *buf, int nr) /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t store_fan_div_reg(struct device *dev, const char *buf, size_t count, int nr) diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c deleted file mode 100644 index 87f7312cc..000000000 --- a/drivers/hwmon/w83791d.c +++ /dev/null @@ -1,1254 +0,0 @@ -/* - w83791d.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring - - Copyright (C) 2006 Charles Spirakis - - 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. -*/ - -/* - Supports following chips: - - Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA - w83791d 10 5 3 3 0x71 0x5ca3 yes no - - The w83791d chip appears to be part way between the 83781d and the - 83792d. Thus, this file is derived from both the w83792d.c and - w83781d.c files, but its output is more along the lines of the - 83781d (which means there are no changes to the user-mode sensors - program which treats the 83791d as an 83781d). -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define NUMBER_OF_VIN 10 -#define NUMBER_OF_FANIN 5 -#define NUMBER_OF_TEMPIN 3 - -/* Addresses to scan */ -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; - -/* Insmod parameters */ -I2C_CLIENT_INSMOD_1(w83791d); -I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " - "{bus, clientaddr, subclientaddr1, subclientaddr2}"); - -static int reset; -module_param(reset, bool, 0); -MODULE_PARM_DESC(reset, "Set to one to force a hardware chip reset"); - -static int init; -module_param(init, bool, 0); -MODULE_PARM_DESC(init, "Set to one to force extra software initialization"); - -/* The W83791D registers */ -static const u8 W83791D_REG_IN[NUMBER_OF_VIN] = { - 0x20, /* VCOREA in DataSheet */ - 0x21, /* VINR0 in DataSheet */ - 0x22, /* +3.3VIN in DataSheet */ - 0x23, /* VDD5V in DataSheet */ - 0x24, /* +12VIN in DataSheet */ - 0x25, /* -12VIN in DataSheet */ - 0x26, /* -5VIN in DataSheet */ - 0xB0, /* 5VSB in DataSheet */ - 0xB1, /* VBAT in DataSheet */ - 0xB2 /* VINR1 in DataSheet */ -}; - -static const u8 W83791D_REG_IN_MAX[NUMBER_OF_VIN] = { - 0x2B, /* VCOREA High Limit in DataSheet */ - 0x2D, /* VINR0 High Limit in DataSheet */ - 0x2F, /* +3.3VIN High Limit in DataSheet */ - 0x31, /* VDD5V High Limit in DataSheet */ - 0x33, /* +12VIN High Limit in DataSheet */ - 0x35, /* -12VIN High Limit in DataSheet */ - 0x37, /* -5VIN High Limit in DataSheet */ - 0xB4, /* 5VSB High Limit in DataSheet */ - 0xB6, /* VBAT High Limit in DataSheet */ - 0xB8 /* VINR1 High Limit in DataSheet */ -}; -static const u8 W83791D_REG_IN_MIN[NUMBER_OF_VIN] = { - 0x2C, /* VCOREA Low Limit in DataSheet */ - 0x2E, /* VINR0 Low Limit in DataSheet */ - 0x30, /* +3.3VIN Low Limit in DataSheet */ - 0x32, /* VDD5V Low Limit in DataSheet */ - 0x34, /* +12VIN Low Limit in DataSheet */ - 0x36, /* -12VIN Low Limit in DataSheet */ - 0x38, /* -5VIN Low Limit in DataSheet */ - 0xB5, /* 5VSB Low Limit in DataSheet */ - 0xB7, /* VBAT Low Limit in DataSheet */ - 0xB9 /* VINR1 Low Limit in DataSheet */ -}; -static const u8 W83791D_REG_FAN[NUMBER_OF_FANIN] = { - 0x28, /* FAN 1 Count in DataSheet */ - 0x29, /* FAN 2 Count in DataSheet */ - 0x2A, /* FAN 3 Count in DataSheet */ - 0xBA, /* FAN 4 Count in DataSheet */ - 0xBB, /* FAN 5 Count in DataSheet */ -}; -static const u8 W83791D_REG_FAN_MIN[NUMBER_OF_FANIN] = { - 0x3B, /* FAN 1 Count Low Limit in DataSheet */ - 0x3C, /* FAN 2 Count Low Limit in DataSheet */ - 0x3D, /* FAN 3 Count Low Limit in DataSheet */ - 0xBC, /* FAN 4 Count Low Limit in DataSheet */ - 0xBD, /* FAN 5 Count Low Limit in DataSheet */ -}; - -static const u8 W83791D_REG_FAN_CFG[2] = { - 0x84, /* FAN 1/2 configuration */ - 0x95, /* FAN 3 configuration */ -}; - -static const u8 W83791D_REG_FAN_DIV[3] = { - 0x47, /* contains FAN1 and FAN2 Divisor */ - 0x4b, /* contains FAN3 Divisor */ - 0x5C, /* contains FAN4 and FAN5 Divisor */ -}; - -#define W83791D_REG_BANK 0x4E -#define W83791D_REG_TEMP2_CONFIG 0xC2 -#define W83791D_REG_TEMP3_CONFIG 0xCA - -static const u8 W83791D_REG_TEMP1[3] = { - 0x27, /* TEMP 1 in DataSheet */ - 0x39, /* TEMP 1 Over in DataSheet */ - 0x3A, /* TEMP 1 Hyst in DataSheet */ -}; - -static const u8 W83791D_REG_TEMP_ADD[2][6] = { - {0xC0, /* TEMP 2 in DataSheet */ - 0xC1, /* TEMP 2(0.5 deg) in DataSheet */ - 0xC5, /* TEMP 2 Over High part in DataSheet */ - 0xC6, /* TEMP 2 Over Low part in DataSheet */ - 0xC3, /* TEMP 2 Thyst High part in DataSheet */ - 0xC4}, /* TEMP 2 Thyst Low part in DataSheet */ - {0xC8, /* TEMP 3 in DataSheet */ - 0xC9, /* TEMP 3(0.5 deg) in DataSheet */ - 0xCD, /* TEMP 3 Over High part in DataSheet */ - 0xCE, /* TEMP 3 Over Low part in DataSheet */ - 0xCB, /* TEMP 3 Thyst High part in DataSheet */ - 0xCC} /* TEMP 3 Thyst Low part in DataSheet */ -}; - -#define W83791D_REG_BEEP_CONFIG 0x4D - -static const u8 W83791D_REG_BEEP_CTRL[3] = { - 0x56, /* BEEP Control Register 1 */ - 0x57, /* BEEP Control Register 2 */ - 0xA3, /* BEEP Control Register 3 */ -}; - -#define W83791D_REG_CONFIG 0x40 -#define W83791D_REG_VID_FANDIV 0x47 -#define W83791D_REG_DID_VID4 0x49 -#define W83791D_REG_WCHIPID 0x58 -#define W83791D_REG_CHIPMAN 0x4F -#define W83791D_REG_PIN 0x4B -#define W83791D_REG_I2C_SUBADDR 0x4A - -#define W83791D_REG_ALARM1 0xA9 /* realtime status register1 */ -#define W83791D_REG_ALARM2 0xAA /* realtime status register2 */ -#define W83791D_REG_ALARM3 0xAB /* realtime status register3 */ - -#define W83791D_REG_VBAT 0x5D -#define W83791D_REG_I2C_ADDR 0x48 - -/* The SMBus locks itself. The Winbond W83791D has a bank select register - (index 0x4e), but the driver only accesses registers in bank 0. Since - we don't switch banks, we don't need any special code to handle - locking access between bank switches */ -static inline int w83791d_read(struct i2c_client *client, u8 reg) -{ - return i2c_smbus_read_byte_data(client, reg); -} - -static inline int w83791d_write(struct i2c_client *client, u8 reg, u8 value) -{ - return i2c_smbus_write_byte_data(client, reg, value); -} - -/* The analog voltage inputs have 16mV LSB. Since the sysfs output is - in mV as would be measured on the chip input pin, need to just - multiply/divide by 16 to translate from/to register values. */ -#define IN_TO_REG(val) (SENSORS_LIMIT((((val) + 8) / 16), 0, 255)) -#define IN_FROM_REG(val) ((val) * 16) - -static u8 fan_to_reg(long rpm, int div) -{ - if (rpm == 0) - return 255; - rpm = SENSORS_LIMIT(rpm, 1, 1000000); - return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254); -} - -#define FAN_FROM_REG(val,div) ((val) == 0 ? -1 : \ - ((val) == 255 ? 0 : \ - 1350000 / ((val) * (div)))) - -/* for temp1 which is 8-bit resolution, LSB = 1 degree Celsius */ -#define TEMP1_FROM_REG(val) ((val) * 1000) -#define TEMP1_TO_REG(val) ((val) <= -128000 ? -128 : \ - (val) >= 127000 ? 127 : \ - (val) < 0 ? ((val) - 500) / 1000 : \ - ((val) + 500) / 1000) - -/* for temp2 and temp3 which are 9-bit resolution, LSB = 0.5 degree Celsius - Assumes the top 8 bits are the integral amount and the bottom 8 bits - are the fractional amount. Since we only have 0.5 degree resolution, - the bottom 7 bits will always be zero */ -#define TEMP23_FROM_REG(val) ((val) / 128 * 500) -#define TEMP23_TO_REG(val) ((val) <= -128000 ? 0x8000 : \ - (val) >= 127500 ? 0x7F80 : \ - (val) < 0 ? ((val) - 250) / 500 * 128 : \ - ((val) + 250) / 500 * 128) - - -#define BEEP_MASK_TO_REG(val) ((val) & 0xffffff) -#define BEEP_MASK_FROM_REG(val) ((val) & 0xffffff) - -#define DIV_FROM_REG(val) (1 << (val)) - -static u8 div_to_reg(int nr, long val) -{ - int i; - int max; - - /* first three fan's divisor max out at 8, rest max out at 128 */ - max = (nr < 3) ? 8 : 128; - val = SENSORS_LIMIT(val, 1, max) >> 1; - for (i = 0; i < 7; i++) { - if (val == 0) - break; - val >>= 1; - } - return (u8) i; -} - -struct w83791d_data { - struct i2c_client client; - struct class_device *class_dev; - struct mutex update_lock; - - char valid; /* !=0 if following fields are valid */ - unsigned long last_updated; /* In jiffies */ - - /* array of 2 pointers to subclients */ - struct i2c_client *lm75[2]; - - /* volts */ - u8 in[NUMBER_OF_VIN]; /* Register value */ - u8 in_max[NUMBER_OF_VIN]; /* Register value */ - u8 in_min[NUMBER_OF_VIN]; /* Register value */ - - /* fans */ - u8 fan[NUMBER_OF_FANIN]; /* Register value */ - u8 fan_min[NUMBER_OF_FANIN]; /* Register value */ - u8 fan_div[NUMBER_OF_FANIN]; /* Register encoding, shifted right */ - - /* Temperature sensors */ - - s8 temp1[3]; /* current, over, thyst */ - s16 temp_add[2][3]; /* fixed point value. Top 8 bits are the - integral part, bottom 8 bits are the - fractional part. We only use the top - 9 bits as the resolution is only - to the 0.5 degree C... - two sensors with three values - (cur, over, hyst) */ - - /* Misc */ - u32 alarms; /* realtime status register encoding,combined */ - u8 beep_enable; /* Global beep enable */ - u32 beep_mask; /* Mask off specific beeps */ - u8 vid; /* Register encoding, combined */ - u8 vrm; /* hwmon-vid */ -}; - -static int w83791d_attach_adapter(struct i2c_adapter *adapter); -static int w83791d_detect(struct i2c_adapter *adapter, int address, int kind); -static int w83791d_detach_client(struct i2c_client *client); - -static int w83791d_read(struct i2c_client *client, u8 register); -static int w83791d_write(struct i2c_client *client, u8 register, u8 value); -static struct w83791d_data *w83791d_update_device(struct device *dev); - -#ifdef DEBUG -static void w83791d_print_debug(struct w83791d_data *data, struct device *dev); -#endif - -static void w83791d_init_client(struct i2c_client *client); - -static struct i2c_driver w83791d_driver = { - .driver = { - .name = "w83791d", - }, - .attach_adapter = w83791d_attach_adapter, - .detach_client = w83791d_detach_client, -}; - -/* following are the sysfs callback functions */ -#define show_in_reg(reg) \ -static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \ - char *buf) \ -{ \ - struct sensor_device_attribute *sensor_attr = \ - to_sensor_dev_attr(attr); \ - struct w83791d_data *data = w83791d_update_device(dev); \ - int nr = sensor_attr->index; \ - return sprintf(buf,"%d\n", IN_FROM_REG(data->reg[nr])); \ -} - -show_in_reg(in); -show_in_reg(in_min); -show_in_reg(in_max); - -#define store_in_reg(REG, reg) \ -static ssize_t store_in_##reg(struct device *dev, \ - struct device_attribute *attr, \ - const char *buf, size_t count) \ -{ \ - struct sensor_device_attribute *sensor_attr = \ - to_sensor_dev_attr(attr); \ - struct i2c_client *client = to_i2c_client(dev); \ - struct w83791d_data *data = i2c_get_clientdata(client); \ - unsigned long val = simple_strtoul(buf, NULL, 10); \ - int nr = sensor_attr->index; \ - \ - mutex_lock(&data->update_lock); \ - data->in_##reg[nr] = IN_TO_REG(val); \ - w83791d_write(client, W83791D_REG_IN_##REG[nr], data->in_##reg[nr]); \ - mutex_unlock(&data->update_lock); \ - \ - return count; \ -} -store_in_reg(MIN, min); -store_in_reg(MAX, max); - -static struct sensor_device_attribute sda_in_input[] = { - SENSOR_ATTR(in0_input, S_IRUGO, show_in, NULL, 0), - SENSOR_ATTR(in1_input, S_IRUGO, show_in, NULL, 1), - SENSOR_ATTR(in2_input, S_IRUGO, show_in, NULL, 2), - SENSOR_ATTR(in3_input, S_IRUGO, show_in, NULL, 3), - SENSOR_ATTR(in4_input, S_IRUGO, show_in, NULL, 4), - SENSOR_ATTR(in5_input, S_IRUGO, show_in, NULL, 5), - SENSOR_ATTR(in6_input, S_IRUGO, show_in, NULL, 6), - SENSOR_ATTR(in7_input, S_IRUGO, show_in, NULL, 7), - SENSOR_ATTR(in8_input, S_IRUGO, show_in, NULL, 8), - SENSOR_ATTR(in9_input, S_IRUGO, show_in, NULL, 9), -}; - -static struct sensor_device_attribute sda_in_min[] = { - SENSOR_ATTR(in0_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 0), - SENSOR_ATTR(in1_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 1), - SENSOR_ATTR(in2_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 2), - SENSOR_ATTR(in3_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 3), - SENSOR_ATTR(in4_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 4), - SENSOR_ATTR(in5_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 5), - SENSOR_ATTR(in6_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 6), - SENSOR_ATTR(in7_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 7), - SENSOR_ATTR(in8_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 8), - SENSOR_ATTR(in9_min, S_IWUSR | S_IRUGO, show_in_min, store_in_min, 9), -}; - -static struct sensor_device_attribute sda_in_max[] = { - SENSOR_ATTR(in0_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 0), - SENSOR_ATTR(in1_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 1), - SENSOR_ATTR(in2_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 2), - SENSOR_ATTR(in3_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 3), - SENSOR_ATTR(in4_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 4), - SENSOR_ATTR(in5_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 5), - SENSOR_ATTR(in6_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 6), - SENSOR_ATTR(in7_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 7), - SENSOR_ATTR(in8_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 8), - SENSOR_ATTR(in9_max, S_IWUSR | S_IRUGO, show_in_max, store_in_max, 9), -}; - -#define show_fan_reg(reg) \ -static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \ - char *buf) \ -{ \ - struct sensor_device_attribute *sensor_attr = \ - to_sensor_dev_attr(attr); \ - struct w83791d_data *data = w83791d_update_device(dev); \ - int nr = sensor_attr->index; \ - return sprintf(buf,"%d\n", \ - FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \ -} - -show_fan_reg(fan); -show_fan_reg(fan_min); - -static ssize_t store_fan_min(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - unsigned long val = simple_strtoul(buf, NULL, 10); - int nr = sensor_attr->index; - - mutex_lock(&data->update_lock); - data->fan_min[nr] = fan_to_reg(val, DIV_FROM_REG(data->fan_div[nr])); - w83791d_write(client, W83791D_REG_FAN_MIN[nr], data->fan_min[nr]); - mutex_unlock(&data->update_lock); - - return count; -} - -static ssize_t show_fan_div(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%u\n", DIV_FROM_REG(data->fan_div[nr])); -} - -/* Note: we save and restore the fan minimum here, because its value is - determined in part by the fan divisor. This follows the principle of - least suprise; the user doesn't expect the fan minimum to change just - because the divisor changed. */ -static ssize_t store_fan_div(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - int nr = sensor_attr->index; - unsigned long min; - u8 tmp_fan_div; - u8 fan_div_reg; - int indx = 0; - u8 keep_mask = 0; - u8 new_shift = 0; - - /* Save fan_min */ - min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); - - mutex_lock(&data->update_lock); - data->fan_div[nr] = div_to_reg(nr, simple_strtoul(buf, NULL, 10)); - - switch (nr) { - case 0: - indx = 0; - keep_mask = 0xcf; - new_shift = 4; - break; - case 1: - indx = 0; - keep_mask = 0x3f; - new_shift = 6; - break; - case 2: - indx = 1; - keep_mask = 0x3f; - new_shift = 6; - break; - case 3: - indx = 2; - keep_mask = 0xf8; - new_shift = 0; - break; - case 4: - indx = 2; - keep_mask = 0x8f; - new_shift = 4; - break; -#ifdef DEBUG - default: - dev_warn(dev, "store_fan_div: Unexpected nr seen: %d\n", nr); - count = -EINVAL; - goto err_exit; -#endif - } - - fan_div_reg = w83791d_read(client, W83791D_REG_FAN_DIV[indx]) - & keep_mask; - tmp_fan_div = (data->fan_div[nr] << new_shift) & ~keep_mask; - - w83791d_write(client, W83791D_REG_FAN_DIV[indx], - fan_div_reg | tmp_fan_div); - - /* Restore fan_min */ - data->fan_min[nr] = fan_to_reg(min, DIV_FROM_REG(data->fan_div[nr])); - w83791d_write(client, W83791D_REG_FAN_MIN[nr], data->fan_min[nr]); - -#ifdef DEBUG -err_exit: -#endif - mutex_unlock(&data->update_lock); - - return count; -} - -static struct sensor_device_attribute sda_fan_input[] = { - SENSOR_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0), - SENSOR_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1), - SENSOR_ATTR(fan3_input, S_IRUGO, show_fan, NULL, 2), - SENSOR_ATTR(fan4_input, S_IRUGO, show_fan, NULL, 3), - SENSOR_ATTR(fan5_input, S_IRUGO, show_fan, NULL, 4), -}; - -static struct sensor_device_attribute sda_fan_min[] = { - SENSOR_ATTR(fan1_min, S_IWUSR | S_IRUGO, - show_fan_min, store_fan_min, 0), - SENSOR_ATTR(fan2_min, S_IWUSR | S_IRUGO, - show_fan_min, store_fan_min, 1), - SENSOR_ATTR(fan3_min, S_IWUSR | S_IRUGO, - show_fan_min, store_fan_min, 2), - SENSOR_ATTR(fan4_min, S_IWUSR | S_IRUGO, - show_fan_min, store_fan_min, 3), - SENSOR_ATTR(fan5_min, S_IWUSR | S_IRUGO, - show_fan_min, store_fan_min, 4), -}; - -static struct sensor_device_attribute sda_fan_div[] = { - SENSOR_ATTR(fan1_div, S_IWUSR | S_IRUGO, - show_fan_div, store_fan_div, 0), - SENSOR_ATTR(fan2_div, S_IWUSR | S_IRUGO, - show_fan_div, store_fan_div, 1), - SENSOR_ATTR(fan3_div, S_IWUSR | S_IRUGO, - show_fan_div, store_fan_div, 2), - SENSOR_ATTR(fan4_div, S_IWUSR | S_IRUGO, - show_fan_div, store_fan_div, 3), - SENSOR_ATTR(fan5_div, S_IWUSR | S_IRUGO, - show_fan_div, store_fan_div, 4), -}; - -/* read/write the temperature1, includes measured value and limits */ -static ssize_t show_temp1(struct device *dev, struct device_attribute *devattr, - char *buf) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%d\n", TEMP1_FROM_REG(data->temp1[attr->index])); -} - -static ssize_t store_temp1(struct device *dev, struct device_attribute *devattr, - const char *buf, size_t count) -{ - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - int nr = attr->index; - - mutex_lock(&data->update_lock); - data->temp1[nr] = TEMP1_TO_REG(val); - w83791d_write(client, W83791D_REG_TEMP1[nr], data->temp1[nr]); - mutex_unlock(&data->update_lock); - return count; -} - -/* read/write temperature2-3, includes measured value and limits */ -static ssize_t show_temp23(struct device *dev, struct device_attribute *devattr, - char *buf) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct w83791d_data *data = w83791d_update_device(dev); - int nr = attr->nr; - int index = attr->index; - return sprintf(buf, "%d\n", TEMP23_FROM_REG(data->temp_add[nr][index])); -} - -static ssize_t store_temp23(struct device *dev, - struct device_attribute *devattr, - const char *buf, size_t count) -{ - struct sensor_device_attribute_2 *attr = to_sensor_dev_attr_2(devattr); - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - int nr = attr->nr; - int index = attr->index; - - mutex_lock(&data->update_lock); - data->temp_add[nr][index] = TEMP23_TO_REG(val); - w83791d_write(client, W83791D_REG_TEMP_ADD[nr][index * 2], - data->temp_add[nr][index] >> 8); - w83791d_write(client, W83791D_REG_TEMP_ADD[nr][index * 2 + 1], - data->temp_add[nr][index] & 0x80); - mutex_unlock(&data->update_lock); - - return count; -} - -static struct sensor_device_attribute_2 sda_temp_input[] = { - SENSOR_ATTR_2(temp1_input, S_IRUGO, show_temp1, NULL, 0, 0), - SENSOR_ATTR_2(temp2_input, S_IRUGO, show_temp23, NULL, 0, 0), - SENSOR_ATTR_2(temp3_input, S_IRUGO, show_temp23, NULL, 1, 0), -}; - -static struct sensor_device_attribute_2 sda_temp_max[] = { - SENSOR_ATTR_2(temp1_max, S_IRUGO | S_IWUSR, - show_temp1, store_temp1, 0, 1), - SENSOR_ATTR_2(temp2_max, S_IRUGO | S_IWUSR, - show_temp23, store_temp23, 0, 1), - SENSOR_ATTR_2(temp3_max, S_IRUGO | S_IWUSR, - show_temp23, store_temp23, 1, 1), -}; - -static struct sensor_device_attribute_2 sda_temp_max_hyst[] = { - SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO | S_IWUSR, - show_temp1, store_temp1, 0, 2), - SENSOR_ATTR_2(temp2_max_hyst, S_IRUGO | S_IWUSR, - show_temp23, store_temp23, 0, 2), - SENSOR_ATTR_2(temp3_max_hyst, S_IRUGO | S_IWUSR, - show_temp23, store_temp23, 1, 2), -}; - - -/* get reatime status of all sensors items: voltage, temp, fan */ -static ssize_t show_alarms_reg(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%u\n", data->alarms); -} - -static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL); - -/* Beep control */ - -#define GLOBAL_BEEP_ENABLE_SHIFT 15 -#define GLOBAL_BEEP_ENABLE_MASK (1 << GLOBAL_BEEP_ENABLE_SHIFT) - -static ssize_t show_beep_enable(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%d\n", data->beep_enable); -} - -static ssize_t show_beep_mask(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%d\n", BEEP_MASK_FROM_REG(data->beep_mask)); -} - - -static ssize_t store_beep_mask(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - int i; - - mutex_lock(&data->update_lock); - - /* The beep_enable state overrides any enabling request from - the masks */ - data->beep_mask = BEEP_MASK_TO_REG(val) & ~GLOBAL_BEEP_ENABLE_MASK; - data->beep_mask |= (data->beep_enable << GLOBAL_BEEP_ENABLE_SHIFT); - - val = data->beep_mask; - - for (i = 0; i < 3; i++) { - w83791d_write(client, W83791D_REG_BEEP_CTRL[i], (val & 0xff)); - val >>= 8; - } - - mutex_unlock(&data->update_lock); - - return count; -} - -static ssize_t store_beep_enable(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - long val = simple_strtol(buf, NULL, 10); - - mutex_lock(&data->update_lock); - - data->beep_enable = val ? 1 : 0; - - /* Keep the full mask value in sync with the current enable */ - data->beep_mask &= ~GLOBAL_BEEP_ENABLE_MASK; - data->beep_mask |= (data->beep_enable << GLOBAL_BEEP_ENABLE_SHIFT); - - /* The global control is in the second beep control register - so only need to update that register */ - val = (data->beep_mask >> 8) & 0xff; - - w83791d_write(client, W83791D_REG_BEEP_CTRL[1], val); - - mutex_unlock(&data->update_lock); - - return count; -} - -static struct sensor_device_attribute sda_beep_ctrl[] = { - SENSOR_ATTR(beep_enable, S_IRUGO | S_IWUSR, - show_beep_enable, store_beep_enable, 0), - SENSOR_ATTR(beep_mask, S_IRUGO | S_IWUSR, - show_beep_mask, store_beep_mask, 1) -}; - -/* cpu voltage regulation information */ -static ssize_t show_vid_reg(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm)); -} - -static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); - -static ssize_t show_vrm_reg(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct w83791d_data *data = w83791d_update_device(dev); - return sprintf(buf, "%d\n", data->vrm); -} - -static ssize_t store_vrm_reg(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - unsigned long val = simple_strtoul(buf, NULL, 10); - - /* No lock needed as vrm is internal to the driver - (not read from a chip register) and so is not - updated in w83791d_update_device() */ - data->vrm = val; - - return count; -} - -static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg); - -/* This function is called when: - * w83791d_driver is inserted (when this module is loaded), for each - available adapter - * when a new adapter is inserted (and w83791d_driver is still present) */ -static int w83791d_attach_adapter(struct i2c_adapter *adapter) -{ - if (!(adapter->class & I2C_CLASS_HWMON)) - return 0; - return i2c_probe(adapter, &addr_data, w83791d_detect); -} - - -static int w83791d_create_subclient(struct i2c_adapter *adapter, - struct i2c_client *client, int addr, - struct i2c_client **sub_cli) -{ - int err; - struct i2c_client *sub_client; - - (*sub_cli) = sub_client = - kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (!(sub_client)) { - return -ENOMEM; - } - sub_client->addr = 0x48 + addr; - i2c_set_clientdata(sub_client, NULL); - sub_client->adapter = adapter; - sub_client->driver = &w83791d_driver; - strlcpy(sub_client->name, "w83791d subclient", I2C_NAME_SIZE); - if ((err = i2c_attach_client(sub_client))) { - dev_err(&client->dev, "subclient registration " - "at address 0x%x failed\n", sub_client->addr); - kfree(sub_client); - return err; - } - return 0; -} - - -static int w83791d_detect_subclients(struct i2c_adapter *adapter, int address, - int kind, struct i2c_client *client) -{ - struct w83791d_data *data = i2c_get_clientdata(client); - int i, id, err; - u8 val; - - id = i2c_adapter_id(adapter); - if (force_subclients[0] == id && force_subclients[1] == address) { - for (i = 2; i <= 3; i++) { - if (force_subclients[i] < 0x48 || - force_subclients[i] > 0x4f) { - dev_err(&client->dev, - "invalid subclient " - "address %d; must be 0x48-0x4f\n", - force_subclients[i]); - err = -ENODEV; - goto error_sc_0; - } - } - w83791d_write(client, W83791D_REG_I2C_SUBADDR, - (force_subclients[2] & 0x07) | - ((force_subclients[3] & 0x07) << 4)); - } - - val = w83791d_read(client, W83791D_REG_I2C_SUBADDR); - if (!(val & 0x08)) { - err = w83791d_create_subclient(adapter, client, - val & 0x7, &data->lm75[0]); - if (err < 0) - goto error_sc_0; - } - if (!(val & 0x80)) { - if ((data->lm75[0] != NULL) && - ((val & 0x7) == ((val >> 4) & 0x7))) { - dev_err(&client->dev, - "duplicate addresses 0x%x, " - "use force_subclient\n", - data->lm75[0]->addr); - err = -ENODEV; - goto error_sc_1; - } - err = w83791d_create_subclient(adapter, client, - (val >> 4) & 0x7, &data->lm75[1]); - if (err < 0) - goto error_sc_1; - } - - return 0; - -/* Undo inits in case of errors */ - -error_sc_1: - if (data->lm75[0] != NULL) { - i2c_detach_client(data->lm75[0]); - kfree(data->lm75[0]); - } -error_sc_0: - return err; -} - - -static int w83791d_detect(struct i2c_adapter *adapter, int address, int kind) -{ - struct i2c_client *client; - struct device *dev; - struct w83791d_data *data; - int i, val1, val2; - int err = 0; - const char *client_name = ""; - - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { - goto error0; - } - - /* OK. For now, we presume we have a valid client. We now create the - client structure, even though we cannot fill it completely yet. - But it allows us to access w83791d_{read,write}_value. */ - if (!(data = kzalloc(sizeof(struct w83791d_data), GFP_KERNEL))) { - err = -ENOMEM; - goto error0; - } - - client = &data->client; - dev = &client->dev; - i2c_set_clientdata(client, data); - client->addr = address; - client->adapter = adapter; - client->driver = &w83791d_driver; - mutex_init(&data->update_lock); - - /* Now, we do the remaining detection. */ - - /* The w83791d may be stuck in some other bank than bank 0. This may - make reading other information impossible. Specify a force=... - parameter, and the Winbond will be reset to the right bank. */ - if (kind < 0) { - if (w83791d_read(client, W83791D_REG_CONFIG) & 0x80) { - dev_dbg(dev, "Detection failed at step 1\n"); - goto error1; - } - val1 = w83791d_read(client, W83791D_REG_BANK); - val2 = w83791d_read(client, W83791D_REG_CHIPMAN); - /* Check for Winbond ID if in bank 0 */ - if (!(val1 & 0x07)) { - /* yes it is Bank0 */ - if (((!(val1 & 0x80)) && (val2 != 0xa3)) || - ((val1 & 0x80) && (val2 != 0x5c))) { - dev_dbg(dev, "Detection failed at step 2\n"); - goto error1; - } - } - /* If Winbond chip, address of chip and W83791D_REG_I2C_ADDR - should match */ - if (w83791d_read(client, W83791D_REG_I2C_ADDR) != address) { - dev_dbg(dev, "Detection failed at step 3\n"); - goto error1; - } - } - - /* We either have a force parameter or we have reason to - believe it is a Winbond chip. Either way, we want bank 0 and - Vendor ID high byte */ - val1 = w83791d_read(client, W83791D_REG_BANK) & 0x78; - w83791d_write(client, W83791D_REG_BANK, val1 | 0x80); - - /* Verify it is a Winbond w83791d */ - if (kind <= 0) { - /* get vendor ID */ - val2 = w83791d_read(client, W83791D_REG_CHIPMAN); - if (val2 != 0x5c) { /* the vendor is NOT Winbond */ - dev_dbg(dev, "Detection failed at step 4\n"); - goto error1; - } - val1 = w83791d_read(client, W83791D_REG_WCHIPID); - if (val1 == 0x71) { - kind = w83791d; - } else { - if (kind == 0) - dev_warn(dev, - "w83791d: Ignoring 'force' parameter " - "for unknown chip at adapter %d, " - "address 0x%02x\n", - i2c_adapter_id(adapter), address); - goto error1; - } - } - - if (kind == w83791d) { - client_name = "w83791d"; - } else { - dev_err(dev, "w83791d: Internal error: unknown kind (%d)?!?", - kind); - goto error1; - } - -#ifdef DEBUG - val1 = w83791d_read(client, W83791D_REG_DID_VID4); - dev_dbg(dev, "Device ID version: %d.%d (0x%02x)\n", - (val1 >> 5) & 0x07, (val1 >> 1) & 0x0f, val1); -#endif - - /* Fill in the remaining client fields and put into the global list */ - strlcpy(client->name, client_name, I2C_NAME_SIZE); - - /* Tell the I2C layer a new client has arrived */ - if ((err = i2c_attach_client(client))) - goto error1; - - if ((err = w83791d_detect_subclients(adapter, address, kind, client))) - goto error2; - - /* Initialize the chip */ - w83791d_init_client(client); - - /* If the fan_div is changed, make sure there is a rational - fan_min in place */ - for (i = 0; i < NUMBER_OF_FANIN; i++) { - data->fan_min[i] = w83791d_read(client, W83791D_REG_FAN_MIN[i]); - } - - /* Register sysfs hooks */ - data->class_dev = hwmon_device_register(dev); - if (IS_ERR(data->class_dev)) { - err = PTR_ERR(data->class_dev); - goto error3; - } - - for (i = 0; i < NUMBER_OF_VIN; i++) { - device_create_file(dev, &sda_in_input[i].dev_attr); - device_create_file(dev, &sda_in_min[i].dev_attr); - device_create_file(dev, &sda_in_max[i].dev_attr); - } - - for (i = 0; i < NUMBER_OF_FANIN; i++) { - device_create_file(dev, &sda_fan_input[i].dev_attr); - device_create_file(dev, &sda_fan_div[i].dev_attr); - device_create_file(dev, &sda_fan_min[i].dev_attr); - } - - for (i = 0; i < NUMBER_OF_TEMPIN; i++) { - device_create_file(dev, &sda_temp_input[i].dev_attr); - device_create_file(dev, &sda_temp_max[i].dev_attr); - device_create_file(dev, &sda_temp_max_hyst[i].dev_attr); - } - - device_create_file(dev, &dev_attr_alarms); - - for (i = 0; i < ARRAY_SIZE(sda_beep_ctrl); i++) { - device_create_file(dev, &sda_beep_ctrl[i].dev_attr); - } - - device_create_file(dev, &dev_attr_cpu0_vid); - device_create_file(dev, &dev_attr_vrm); - - return 0; - -error3: - if (data->lm75[0] != NULL) { - i2c_detach_client(data->lm75[0]); - kfree(data->lm75[0]); - } - if (data->lm75[1] != NULL) { - i2c_detach_client(data->lm75[1]); - kfree(data->lm75[1]); - } -error2: - i2c_detach_client(client); -error1: - kfree(data); -error0: - return err; -} - -static int w83791d_detach_client(struct i2c_client *client) -{ - struct w83791d_data *data = i2c_get_clientdata(client); - int err; - - /* main client */ - if (data) - hwmon_device_unregister(data->class_dev); - - if ((err = i2c_detach_client(client))) - return err; - - /* main client */ - if (data) - kfree(data); - /* subclient */ - else - kfree(client); - - return 0; -} - -static void w83791d_init_client(struct i2c_client *client) -{ - struct w83791d_data *data = i2c_get_clientdata(client); - u8 tmp; - u8 old_beep; - - /* The difference between reset and init is that reset - does a hard reset of the chip via index 0x40, bit 7, - but init simply forces certain registers to have "sane" - values. The hope is that the BIOS has done the right - thing (which is why the default is reset=0, init=0), - but if not, reset is the hard hammer and init - is the soft mallet both of which are trying to whack - things into place... - NOTE: The data sheet makes a distinction between - "power on defaults" and "reset by MR". As far as I can tell, - the hard reset puts everything into a power-on state so I'm - not sure what "reset by MR" means or how it can happen. - */ - if (reset || init) { - /* keep some BIOS settings when we... */ - old_beep = w83791d_read(client, W83791D_REG_BEEP_CONFIG); - - if (reset) { - /* ... reset the chip and ... */ - w83791d_write(client, W83791D_REG_CONFIG, 0x80); - } - - /* ... disable power-on abnormal beep */ - w83791d_write(client, W83791D_REG_BEEP_CONFIG, old_beep | 0x80); - - /* disable the global beep (not done by hard reset) */ - tmp = w83791d_read(client, W83791D_REG_BEEP_CTRL[1]); - w83791d_write(client, W83791D_REG_BEEP_CTRL[1], tmp & 0xef); - - if (init) { - /* Make sure monitoring is turned on for add-ons */ - tmp = w83791d_read(client, W83791D_REG_TEMP2_CONFIG); - if (tmp & 1) { - w83791d_write(client, W83791D_REG_TEMP2_CONFIG, - tmp & 0xfe); - } - - tmp = w83791d_read(client, W83791D_REG_TEMP3_CONFIG); - if (tmp & 1) { - w83791d_write(client, W83791D_REG_TEMP3_CONFIG, - tmp & 0xfe); - } - - /* Start monitoring */ - tmp = w83791d_read(client, W83791D_REG_CONFIG) & 0xf7; - w83791d_write(client, W83791D_REG_CONFIG, tmp | 0x01); - } - } - - data->vrm = vid_which_vrm(); -} - -static struct w83791d_data *w83791d_update_device(struct device *dev) -{ - struct i2c_client *client = to_i2c_client(dev); - struct w83791d_data *data = i2c_get_clientdata(client); - int i, j; - u8 reg_array_tmp[3]; - - mutex_lock(&data->update_lock); - - if (time_after(jiffies, data->last_updated + (HZ * 3)) - || !data->valid) { - dev_dbg(dev, "Starting w83791d device update\n"); - - /* Update the voltages measured value and limits */ - for (i = 0; i < NUMBER_OF_VIN; i++) { - data->in[i] = w83791d_read(client, - W83791D_REG_IN[i]); - data->in_max[i] = w83791d_read(client, - W83791D_REG_IN_MAX[i]); - data->in_min[i] = w83791d_read(client, - W83791D_REG_IN_MIN[i]); - } - - /* Update the fan counts and limits */ - for (i = 0; i < NUMBER_OF_FANIN; i++) { - /* Update the Fan measured value and limits */ - data->fan[i] = w83791d_read(client, - W83791D_REG_FAN[i]); - data->fan_min[i] = w83791d_read(client, - W83791D_REG_FAN_MIN[i]); - } - - /* Update the fan divisor */ - for (i = 0; i < 3; i++) { - reg_array_tmp[i] = w83791d_read(client, - W83791D_REG_FAN_DIV[i]); - } - data->fan_div[0] = (reg_array_tmp[0] >> 4) & 0x03; - data->fan_div[1] = (reg_array_tmp[0] >> 6) & 0x03; - data->fan_div[2] = (reg_array_tmp[1] >> 6) & 0x03; - data->fan_div[3] = reg_array_tmp[2] & 0x07; - data->fan_div[4] = (reg_array_tmp[2] >> 4) & 0x07; - - /* Update the first temperature sensor */ - for (i = 0; i < 3; i++) { - data->temp1[i] = w83791d_read(client, - W83791D_REG_TEMP1[i]); - } - - /* Update the rest of the temperature sensors */ - for (i = 0; i < 2; i++) { - for (j = 0; j < 3; j++) { - data->temp_add[i][j] = - (w83791d_read(client, - W83791D_REG_TEMP_ADD[i][j * 2]) << 8) | - w83791d_read(client, - W83791D_REG_TEMP_ADD[i][j * 2 + 1]); - } - } - - /* Update the realtime status */ - data->alarms = - w83791d_read(client, W83791D_REG_ALARM1) + - (w83791d_read(client, W83791D_REG_ALARM2) << 8) + - (w83791d_read(client, W83791D_REG_ALARM3) << 16); - - /* Update the beep configuration information */ - data->beep_mask = - w83791d_read(client, W83791D_REG_BEEP_CTRL[0]) + - (w83791d_read(client, W83791D_REG_BEEP_CTRL[1]) << 8) + - (w83791d_read(client, W83791D_REG_BEEP_CTRL[2]) << 16); - - data->beep_enable = - (data->beep_mask >> GLOBAL_BEEP_ENABLE_SHIFT) & 0x01; - - /* Update the cpu voltage information */ - i = w83791d_read(client, W83791D_REG_VID_FANDIV); - data->vid = i & 0x0f; - data->vid |= (w83791d_read(client, W83791D_REG_DID_VID4) & 0x01) - << 4; - - data->last_updated = jiffies; - data->valid = 1; - } - - mutex_unlock(&data->update_lock); - -#ifdef DEBUG - w83791d_print_debug(data, dev); -#endif - - return data; -} - -#ifdef DEBUG -static void w83791d_print_debug(struct w83791d_data *data, struct device *dev) -{ - int i = 0, j = 0; - - dev_dbg(dev, "======Start of w83791d debug values======\n"); - dev_dbg(dev, "%d set of Voltages: ===>\n", NUMBER_OF_VIN); - for (i = 0; i < NUMBER_OF_VIN; i++) { - dev_dbg(dev, "vin[%d] is: 0x%02x\n", i, data->in[i]); - dev_dbg(dev, "vin[%d] min is: 0x%02x\n", i, data->in_min[i]); - dev_dbg(dev, "vin[%d] max is: 0x%02x\n", i, data->in_max[i]); - } - dev_dbg(dev, "%d set of Fan Counts/Divisors: ===>\n", NUMBER_OF_FANIN); - for (i = 0; i < NUMBER_OF_FANIN; i++) { - dev_dbg(dev, "fan[%d] is: 0x%02x\n", i, data->fan[i]); - dev_dbg(dev, "fan[%d] min is: 0x%02x\n", i, data->fan_min[i]); - dev_dbg(dev, "fan_div[%d] is: 0x%02x\n", i, data->fan_div[i]); - } - - /* temperature math is signed, but only print out the - bits that matter */ - dev_dbg(dev, "%d set of Temperatures: ===>\n", NUMBER_OF_TEMPIN); - for (i = 0; i < 3; i++) { - dev_dbg(dev, "temp1[%d] is: 0x%02x\n", i, (u8) data->temp1[i]); - } - for (i = 0; i < 2; i++) { - for (j = 0; j < 3; j++) { - dev_dbg(dev, "temp_add[%d][%d] is: 0x%04x\n", i, j, - (u16) data->temp_add[i][j]); - } - } - - dev_dbg(dev, "Misc Information: ===>\n"); - dev_dbg(dev, "alarm is: 0x%08x\n", data->alarms); - dev_dbg(dev, "beep_mask is: 0x%08x\n", data->beep_mask); - dev_dbg(dev, "beep_enable is: %d\n", data->beep_enable); - dev_dbg(dev, "vid is: 0x%02x\n", data->vid); - dev_dbg(dev, "vrm is: 0x%02x\n", data->vrm); - dev_dbg(dev, "=======End of w83791d debug values========\n"); - dev_dbg(dev, "\n"); -} -#endif - -static int __init sensors_w83791d_init(void) -{ - return i2c_add_driver(&w83791d_driver); -} - -static void __exit sensors_w83791d_exit(void) -{ - i2c_del_driver(&w83791d_driver); -} - -MODULE_AUTHOR("Charles Spirakis "); -MODULE_DESCRIPTION("W83791D driver"); -MODULE_LICENSE("GPL"); - -module_init(sensors_w83791d_init); -module_exit(sensors_w83791d_exit); diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c index 7576ec942..958602e28 100644 --- a/drivers/hwmon/w83792d.c +++ b/drivers/hwmon/w83792d.c @@ -35,6 +35,7 @@ w83792d 9 7 7 3 0x7a 0x5ca3 yes no */ +#include #include #include #include @@ -249,6 +250,8 @@ FAN_TO_REG(long rpm, int div) : (val)) / 1000, 0, 0xff)) #define TEMP_ADD_TO_REG_LOW(val) ((val%1000) ? 0x80 : 0x00) +#define PWM_FROM_REG(val) (val) +#define PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255)) #define DIV_FROM_REG(val) (1 << (val)) static inline u8 @@ -288,6 +291,7 @@ struct w83792d_data { u8 pwm[7]; /* We only consider the first 3 set of pwm, although 792 chip has 7 set of pwm. */ u8 pwmenable[3]; + u8 pwm_mode[7]; /* indicates PWM or DC mode: 1->PWM; 0->DC */ u32 alarms; /* realtime status register encoding,combined */ u8 chassis; /* Chassis status */ u8 chassis_clear; /* CLR_CHS, clear chassis intrusion detection */ @@ -371,10 +375,8 @@ static ssize_t store_in_##reg (struct device *dev, \ u32 val; \ \ val = simple_strtoul(buf, NULL, 10); \ - mutex_lock(&data->update_lock); \ data->in_##reg[nr] = SENSORS_LIMIT(IN_TO_REG(nr, val)/4, 0, 255); \ w83792d_write_value(client, W83792D_REG_IN_##REG[nr], data->in_##reg[nr]); \ - mutex_unlock(&data->update_lock); \ \ return count; \ } @@ -441,11 +443,9 @@ store_fan_min(struct device *dev, struct device_attribute *attr, u32 val; val = simple_strtoul(buf, NULL, 10); - mutex_lock(&data->update_lock); data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); w83792d_write_value(client, W83792D_REG_FAN_MIN[nr], data->fan_min[nr]); - mutex_unlock(&data->update_lock); return count; } @@ -462,7 +462,7 @@ show_fan_div(struct device *dev, struct device_attribute *attr, /* Note: we save and restore the fan minimum here, because its value is determined in part by the fan divisor. This follows the principle of - least surprise; the user doesn't expect the fan minimum to change just + least suprise; the user doesn't expect the fan minimum to change just because the divisor changed. */ static ssize_t store_fan_div(struct device *dev, struct device_attribute *attr, @@ -478,7 +478,6 @@ store_fan_div(struct device *dev, struct device_attribute *attr, u8 tmp_fan_div; /* Save fan_min */ - mutex_lock(&data->update_lock); min = FAN_FROM_REG(data->fan_min[nr], DIV_FROM_REG(data->fan_div[nr])); @@ -494,7 +493,6 @@ store_fan_div(struct device *dev, struct device_attribute *attr, /* Restore fan_min */ data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); w83792d_write_value(client, W83792D_REG_FAN_MIN[nr], data->fan_min[nr]); - mutex_unlock(&data->update_lock); return count; } @@ -549,11 +547,10 @@ static ssize_t store_temp1(struct device *dev, struct device_attribute *attr, s32 val; val = simple_strtol(buf, NULL, 10); - mutex_lock(&data->update_lock); + data->temp1[nr] = TEMP1_TO_REG(val); w83792d_write_value(client, W83792D_REG_TEMP1[nr], data->temp1[nr]); - mutex_unlock(&data->update_lock); return count; } @@ -583,14 +580,13 @@ static ssize_t store_temp23(struct device *dev, struct device_attribute *attr, s32 val; val = simple_strtol(buf, NULL, 10); - mutex_lock(&data->update_lock); + data->temp_add[nr][index] = TEMP_ADD_TO_REG_HIGH(val); data->temp_add[nr][index+1] = TEMP_ADD_TO_REG_LOW(val); w83792d_write_value(client, W83792D_REG_TEMP_ADD[nr][index], data->temp_add[nr][index]); w83792d_write_value(client, W83792D_REG_TEMP_ADD[nr][index+1], data->temp_add[nr][index+1]); - mutex_unlock(&data->update_lock); return count; } @@ -631,7 +627,7 @@ show_pwm(struct device *dev, struct device_attribute *attr, struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); int nr = sensor_attr->index; struct w83792d_data *data = w83792d_update_device(dev); - return sprintf(buf, "%d\n", (data->pwm[nr] & 0x0f) << 4); + return sprintf(buf, "%ld\n", (long) PWM_FROM_REG(data->pwm[nr-1])); } static ssize_t @@ -663,16 +659,14 @@ store_pwm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; + int nr = sensor_attr->index - 1; struct i2c_client *client = to_i2c_client(dev); struct w83792d_data *data = i2c_get_clientdata(client); - u8 val = SENSORS_LIMIT(simple_strtoul(buf, NULL, 10), 0, 255) >> 4; + u32 val; - mutex_lock(&data->update_lock); - val |= w83792d_read_value(client, W83792D_REG_PWM[nr]) & 0xf0; - data->pwm[nr] = val; + val = simple_strtoul(buf, NULL, 10); + data->pwm[nr] = PWM_TO_REG(val); w83792d_write_value(client, W83792D_REG_PWM[nr], data->pwm[nr]); - mutex_unlock(&data->update_lock); return count; } @@ -689,10 +683,6 @@ store_pwmenable(struct device *dev, struct device_attribute *attr, u8 fan_cfg_tmp, cfg1_tmp, cfg2_tmp, cfg3_tmp, cfg4_tmp; val = simple_strtoul(buf, NULL, 10); - if (val < 1 || val > 3) - return -EINVAL; - - mutex_lock(&data->update_lock); switch (val) { case 1: data->pwmenable[nr] = 0; /* manual mode */ @@ -703,6 +693,8 @@ store_pwmenable(struct device *dev, struct device_attribute *attr, case 3: data->pwmenable[nr] = 1; /* thermal cruise/Smart Fan I */ break; + default: + return -EINVAL; } cfg1_tmp = data->pwmenable[0]; cfg2_tmp = (data->pwmenable[1]) << 2; @@ -710,15 +702,14 @@ store_pwmenable(struct device *dev, struct device_attribute *attr, cfg4_tmp = w83792d_read_value(client,W83792D_REG_FAN_CFG) & 0xc0; fan_cfg_tmp = ((cfg4_tmp | cfg3_tmp) | cfg2_tmp) | cfg1_tmp; w83792d_write_value(client, W83792D_REG_FAN_CFG, fan_cfg_tmp); - mutex_unlock(&data->update_lock); return count; } static struct sensor_device_attribute sda_pwm[] = { - SENSOR_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 0), - SENSOR_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 1), - SENSOR_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 2), + SENSOR_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 1), + SENSOR_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 2), + SENSOR_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 3), }; static struct sensor_device_attribute sda_pwm_enable[] = { SENSOR_ATTR(pwm1_enable, S_IWUSR | S_IRUGO, @@ -737,7 +728,7 @@ show_pwm_mode(struct device *dev, struct device_attribute *attr, struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); int nr = sensor_attr->index; struct w83792d_data *data = w83792d_update_device(dev); - return sprintf(buf, "%d\n", data->pwm[nr] >> 7); + return sprintf(buf, "%d\n", data->pwm_mode[nr-1]); } static ssize_t @@ -745,35 +736,29 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); - int nr = sensor_attr->index; + int nr = sensor_attr->index - 1; struct i2c_client *client = to_i2c_client(dev); struct w83792d_data *data = i2c_get_clientdata(client); u32 val; + u8 pwm_mode_mask = 0; val = simple_strtoul(buf, NULL, 10); - if (val != 0 && val != 1) - return -EINVAL; - - mutex_lock(&data->update_lock); - data->pwm[nr] = w83792d_read_value(client, W83792D_REG_PWM[nr]); - if (val) { /* PWM mode */ - data->pwm[nr] |= 0x80; - } else { /* DC mode */ - data->pwm[nr] &= 0x7f; - } - w83792d_write_value(client, W83792D_REG_PWM[nr], data->pwm[nr]); - mutex_unlock(&data->update_lock); + data->pwm_mode[nr] = SENSORS_LIMIT(val, 0, 1); + pwm_mode_mask = w83792d_read_value(client, + W83792D_REG_PWM[nr]) & 0x7f; + w83792d_write_value(client, W83792D_REG_PWM[nr], + ((data->pwm_mode[nr]) << 7) | pwm_mode_mask); return count; } static struct sensor_device_attribute sda_pwm_mode[] = { SENSOR_ATTR(pwm1_mode, S_IWUSR | S_IRUGO, - show_pwm_mode, store_pwm_mode, 0), - SENSOR_ATTR(pwm2_mode, S_IWUSR | S_IRUGO, show_pwm_mode, store_pwm_mode, 1), - SENSOR_ATTR(pwm3_mode, S_IWUSR | S_IRUGO, + SENSOR_ATTR(pwm2_mode, S_IWUSR | S_IRUGO, show_pwm_mode, store_pwm_mode, 2), + SENSOR_ATTR(pwm3_mode, S_IWUSR | S_IRUGO, + show_pwm_mode, store_pwm_mode, 3), }; @@ -804,13 +789,12 @@ store_chassis_clear(struct device *dev, struct device_attribute *attr, u8 temp1 = 0, temp2 = 0; val = simple_strtoul(buf, NULL, 10); - mutex_lock(&data->update_lock); + data->chassis_clear = SENSORS_LIMIT(val, 0 ,1); temp1 = ((data->chassis_clear) << 7) & 0x80; temp2 = w83792d_read_value(client, W83792D_REG_CHASSIS_CLR) & 0x7f; w83792d_write_value(client, W83792D_REG_CHASSIS_CLR, temp1 | temp2); - mutex_unlock(&data->update_lock); return count; } @@ -843,12 +827,10 @@ store_thermal_cruise(struct device *dev, struct device_attribute *attr, val = simple_strtoul(buf, NULL, 10); target_tmp = val; target_tmp = target_tmp & 0x7f; - mutex_lock(&data->update_lock); target_mask = w83792d_read_value(client, W83792D_REG_THERMAL[nr]) & 0x80; data->thermal_cruise[nr] = SENSORS_LIMIT(target_tmp, 0, 255); w83792d_write_value(client, W83792D_REG_THERMAL[nr], (data->thermal_cruise[nr]) | target_mask); - mutex_unlock(&data->update_lock); return count; } @@ -885,7 +867,6 @@ store_tolerance(struct device *dev, struct device_attribute *attr, u8 tol_tmp, tol_mask; val = simple_strtoul(buf, NULL, 10); - mutex_lock(&data->update_lock); tol_mask = w83792d_read_value(client, W83792D_REG_TOLERANCE[nr]) & ((nr == 1) ? 0x0f : 0xf0); tol_tmp = SENSORS_LIMIT(val, 0, 15); @@ -896,7 +877,6 @@ store_tolerance(struct device *dev, struct device_attribute *attr, } w83792d_write_value(client, W83792D_REG_TOLERANCE[nr], tol_mask | tol_tmp); - mutex_unlock(&data->update_lock); return count; } @@ -935,13 +915,11 @@ store_sf2_point(struct device *dev, struct device_attribute *attr, u8 mask_tmp = 0; val = simple_strtoul(buf, NULL, 10); - mutex_lock(&data->update_lock); data->sf2_points[index][nr] = SENSORS_LIMIT(val, 0, 127); mask_tmp = w83792d_read_value(client, W83792D_REG_POINTS[index][nr]) & 0x80; w83792d_write_value(client, W83792D_REG_POINTS[index][nr], mask_tmp|data->sf2_points[index][nr]); - mutex_unlock(&data->update_lock); return count; } @@ -1001,7 +979,6 @@ store_sf2_level(struct device *dev, struct device_attribute *attr, u8 mask_tmp=0, level_tmp=0; val = simple_strtoul(buf, NULL, 10); - mutex_lock(&data->update_lock); data->sf2_levels[index][nr] = SENSORS_LIMIT((val * 15) / 100, 0, 15); mask_tmp = w83792d_read_value(client, W83792D_REG_LEVELS[index][nr]) & ((nr==3) ? 0xf0 : 0x0f); @@ -1011,7 +988,6 @@ store_sf2_level(struct device *dev, struct device_attribute *attr, level_tmp = data->sf2_levels[index][nr] << 4; } w83792d_write_value(client, W83792D_REG_LEVELS[index][nr], level_tmp | mask_tmp); - mutex_unlock(&data->update_lock); return count; } @@ -1397,7 +1373,7 @@ static struct w83792d_data *w83792d_update_device(struct device *dev) struct i2c_client *client = to_i2c_client(dev); struct w83792d_data *data = i2c_get_clientdata(client); int i, j; - u8 reg_array_tmp[4], reg_tmp; + u8 reg_array_tmp[4], pwm_array_tmp[7], reg_tmp; mutex_lock(&data->update_lock); @@ -1426,8 +1402,10 @@ static struct w83792d_data *w83792d_update_device(struct device *dev) data->fan_min[i] = w83792d_read_value(client, W83792D_REG_FAN_MIN[i]); /* Update the PWM/DC Value and PWM/DC flag */ - data->pwm[i] = w83792d_read_value(client, + pwm_array_tmp[i] = w83792d_read_value(client, W83792D_REG_PWM[i]); + data->pwm[i] = pwm_array_tmp[i] & 0x0f; + data->pwm_mode[i] = pwm_array_tmp[i] >> 7; } reg_tmp = w83792d_read_value(client, W83792D_REG_FAN_CFG); @@ -1535,6 +1513,7 @@ static void w83792d_print_debug(struct w83792d_data *data, struct device *dev) dev_dbg(dev, "fan[%d] is: 0x%x\n", i, data->fan[i]); dev_dbg(dev, "fan[%d] min is: 0x%x\n", i, data->fan_min[i]); dev_dbg(dev, "pwm[%d] is: 0x%x\n", i, data->pwm[i]); + dev_dbg(dev, "pwm_mode[%d] is: 0x%x\n", i, data->pwm_mode[i]); } dev_dbg(dev, "3 set of Temperatures: =====>\n"); for (i=0; i<3; i++) { diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index ab230c033..df05df1a0 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -372,6 +372,7 @@ static inline int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) while (count > 0) { inval = i2c_inb(i2c_adap); +/*printk("%#02x ",inval); if ( ! (count % 16) ) printk("\n"); */ if (inval>=0) { *temp = inval; rdcount++; @@ -543,7 +544,8 @@ int i2c_bit_add_bus(struct i2c_adapter *adap) adap->timeout = 100; /* default values, should */ adap->retries = 3; /* be replaced by defines */ - return i2c_add_adapter(adap); + i2c_add_adapter(adap); + return 0; } diff --git a/drivers/i2c/algos/i2c-algo-ite.c b/drivers/i2c/algos/i2c-algo-ite.c index 70d8eefb5..2db7bfc85 100644 --- a/drivers/i2c/algos/i2c-algo-ite.c +++ b/drivers/i2c/algos/i2c-algo-ite.c @@ -742,8 +742,10 @@ int i2c_iic_add_bus(struct i2c_adapter *adap) adap->retries = 3; /* be replaced by defines */ adap->flags = 0; + i2c_add_adapter(adap); iic_init(iic_adap); - return i2c_add_adapter(adap); + + return 0; } diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index b88a6fcf7..82946acab 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c @@ -374,10 +374,10 @@ int i2c_pca_add_bus(struct i2c_adapter *adap) adap->timeout = 100; /* default values, should */ adap->retries = 3; /* be replaced by defines */ - if ((rval = pca_init(pca_adap))) - return rval; + rval = pca_init(pca_adap); - rval = i2c_add_adapter(adap); + if (!rval) + i2c_add_adapter(adap); return rval; } diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index 5b24930ad..6e498df1f 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c @@ -479,11 +479,9 @@ int i2c_pcf_add_bus(struct i2c_adapter *adap) adap->timeout = 100; /* default values, should */ adap->retries = 3; /* be replaced by defines */ - if ((rval = pcf_init_8584(pcf_adap))) - return rval; - - rval = i2c_add_adapter(adap); - + rval = pcf_init_8584(pcf_adap); + if (!rval) + i2c_add_adapter(adap); return rval; } diff --git a/drivers/i2c/algos/i2c-algo-sibyte.c b/drivers/i2c/algos/i2c-algo-sibyte.c index 32d41c6fa..3df3f0999 100644 --- a/drivers/i2c/algos/i2c-algo-sibyte.c +++ b/drivers/i2c/algos/i2c-algo-sibyte.c @@ -173,7 +173,9 @@ int i2c_sibyte_add_bus(struct i2c_adapter *i2c_adap, int speed) printk("\n"); } - return i2c_add_adapter(i2c_adap); + i2c_add_adapter(i2c_adap); + + return 0; } diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 884320e70..d6d44946a 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -163,7 +163,7 @@ config I2C_PXA_SLAVE I2C bus. config I2C_PIIX4 - tristate "Intel PIIX4 and compatible (ATI/Serverworks/Broadcom/SMSC)" + tristate "Intel PIIX4" depends on I2C && PCI help If you say yes to this option, support will be included for the Intel @@ -172,9 +172,6 @@ config I2C_PIIX4 of Broadcom): Intel PIIX4 Intel 440MX - ATI IXP200 - ATI IXP300 - ATI IXP400 Serverworks OSB4 Serverworks CSB5 Serverworks CSB6 @@ -255,12 +252,12 @@ config I2C_POWERMAC will be called i2c-powermac. config I2C_MPC - tristate "MPC107/824x/85xx/52xx/86xx" + tristate "MPC107/824x/85xx/52xx" depends on I2C && PPC32 help If you say yes to this option, support will be included for the built-in I2C interface on the MPC107/Tsi107/MPC8240/MPC8245 and - MPC85xx/MPC8641 family processors. The driver may also work on 52xx + MPC85xx family processors. The driver may also work on 52xx family processors, though interrupts are known not to work. This driver can also be built as a module. If so, the module @@ -276,17 +273,6 @@ config I2C_NFORCE2 This driver can also be built as a module. If so, the module will be called i2c-nforce2. -config I2C_OCORES - tristate "OpenCores I2C Controller" - depends on I2C && EXPERIMENTAL - help - If you say yes to this option, support will be included for the - OpenCores I2C controller. For details see - http://www.opencores.org/projects.cgi/web/i2c/overview - - This driver can also be built as a module. If so, the module - will be called i2c-ocores. - config I2C_PARPORT tristate "Parallel port adapter" depends on I2C && PARPORT @@ -514,7 +500,6 @@ config I2C_PCA_ISA tristate "PCA9564 on an ISA bus" depends on I2C select I2C_ALGOPCA - default n help This driver supports ISA boards using the Philips PCA 9564 Parallel bus to I2C bus controller @@ -522,11 +507,6 @@ config I2C_PCA_ISA This driver can also be built as a module. If so, the module will be called i2c-pca-isa. - This device is almost undetectable and using this driver on a - system which doesn't have this device will result in long - delays when I2C/SMBus chip drivers are loaded (e.g. at boot - time). If unsure, say N. - config I2C_MV64XXX tristate "Marvell mv64xxx I2C Controller" depends on I2C && MV64X60 && EXPERIMENTAL diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index ac56df531..b44831dff 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -23,7 +23,6 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o obj-$(CONFIG_I2C_MPC) += i2c-mpc.o obj-$(CONFIG_I2C_MV64XXX) += i2c-mv64xxx.o obj-$(CONFIG_I2C_NFORCE2) += i2c-nforce2.o -obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 7be1d0a3e..dfca74933 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1,5 +1,5 @@ /* - i2c-i801.c - Part of lm_sensors, Linux kernel modules for hardware + i801.c - Part of lm_sensors, Linux kernel modules for hardware monitoring Copyright (c) 1998 - 2002 Frodo Looijaard , Philip Edelbrock , and Mark D. Studebaker @@ -36,7 +36,7 @@ This driver supports several versions of Intel's I/O Controller Hubs (ICH). For SMBus support, they are similar to the PIIX4 and are part of Intel's '810' and other chipsets. - See the file Documentation/i2c/busses/i2c-i801 for details. + See the doc/busses/i2c-i801 file for details. I2C Block Read and Process Call are not supported. */ @@ -66,8 +66,9 @@ #define SMBAUXCTL (13 + i801_smba) /* ICH4 only */ /* PCI Address Constants */ -#define SMBBAR 4 +#define SMBBA 0x020 #define SMBHSTCFG 0x040 +#define SMBREV 0x008 /* Host configuration bits for SMBHSTCFG */ #define SMBHSTCFG_HST_EN 1 @@ -91,16 +92,92 @@ #define I801_START 0x40 #define I801_PEC_EN 0x80 /* ICH4 only */ +/* insmod parameters */ + +/* If force_addr is set to anything different from 0, we forcibly enable + the I801 at the given address. VERY DANGEROUS! */ +static u16 force_addr; +module_param(force_addr, ushort, 0); +MODULE_PARM_DESC(force_addr, + "Forcibly enable the I801 at the given address. " + "EXTREMELY DANGEROUS!"); static int i801_transaction(void); static int i801_block_transaction(union i2c_smbus_data *data, char read_write, int command, int hwpec); -static unsigned long i801_smba; +static unsigned short i801_smba; static struct pci_driver i801_driver; static struct pci_dev *I801_dev; static int isich4; +static int i801_setup(struct pci_dev *dev) +{ + int error_return = 0; + unsigned char temp; + + /* Note: we keep on searching until we have found 'function 3' */ + if(PCI_FUNC(dev->devfn) != 3) + return -ENODEV; + + I801_dev = dev; + if ((dev->device == PCI_DEVICE_ID_INTEL_82801DB_3) || + (dev->device == PCI_DEVICE_ID_INTEL_82801EB_3) || + (dev->device == PCI_DEVICE_ID_INTEL_ESB_4)) + isich4 = 1; + else + isich4 = 0; + + /* Determine the address of the SMBus areas */ + if (force_addr) { + i801_smba = force_addr & 0xfff0; + } else { + pci_read_config_word(I801_dev, SMBBA, &i801_smba); + i801_smba &= 0xfff0; + if(i801_smba == 0) { + dev_err(&dev->dev, "SMB base address uninitialized " + "- upgrade BIOS or use force_addr=0xaddr\n"); + return -ENODEV; + } + } + + if (!request_region(i801_smba, (isich4 ? 16 : 8), i801_driver.name)) { + dev_err(&dev->dev, "I801_smb region 0x%x already in use!\n", + i801_smba); + error_return = -EBUSY; + goto END; + } + + pci_read_config_byte(I801_dev, SMBHSTCFG, &temp); + temp &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */ + pci_write_config_byte(I801_dev, SMBHSTCFG, temp); + + /* If force_addr is set, we program the new address here. Just to make + sure, we disable the device first. */ + if (force_addr) { + pci_write_config_byte(I801_dev, SMBHSTCFG, temp & 0xfe); + pci_write_config_word(I801_dev, SMBBA, i801_smba); + pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 0x01); + dev_warn(&dev->dev, "WARNING: I801 SMBus interface set to " + "new address %04x!\n", i801_smba); + } else if ((temp & 1) == 0) { + pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1); + dev_warn(&dev->dev, "enabling SMBus device\n"); + } + + if (temp & 0x02) + dev_dbg(&dev->dev, "I801 using Interrupt SMI# for SMBus.\n"); + else + dev_dbg(&dev->dev, "I801 using PCI Interrupt for SMBus.\n"); + + pci_read_config_byte(I801_dev, SMBREV, &temp); + dev_dbg(&dev->dev, "SMBREV = 0x%X\n", temp); + dev_dbg(&dev->dev, "I801_smba = 0x%X\n", i801_smba); + +END: + return error_return; +} + static int i801_transaction(void) { int temp; @@ -257,8 +334,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, /* We will always wait for a fraction of a second! */ timeout = 0; do { - msleep(1); temp = inb_p(SMBHSTSTS); + msleep(1); } while ((!(temp & 0x80)) && (timeout++ < MAX_TIMEOUT)); @@ -316,8 +393,8 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, /* wait for INTR bit as advised by Intel */ timeout = 0; do { - msleep(1); temp = inb_p(SMBHSTSTS); + msleep(1); } while ((!(temp & 0x02)) && (timeout++ < MAX_TIMEOUT)); @@ -464,80 +541,25 @@ MODULE_DEVICE_TABLE (pci, i801_ids); static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id *id) { - unsigned char temp; - int err; - - I801_dev = dev; - if ((dev->device == PCI_DEVICE_ID_INTEL_82801DB_3) || - (dev->device == PCI_DEVICE_ID_INTEL_82801EB_3) || - (dev->device == PCI_DEVICE_ID_INTEL_ESB_4)) - isich4 = 1; - else - isich4 = 0; - err = pci_enable_device(dev); - if (err) { - dev_err(&dev->dev, "Failed to enable SMBus PCI device (%d)\n", - err); - goto exit; + if (i801_setup(dev)) { + dev_warn(&dev->dev, + "I801 not detected, module not inserted.\n"); + return -ENODEV; } - /* Determine the address of the SMBus area */ - i801_smba = pci_resource_start(dev, SMBBAR); - if (!i801_smba) { - dev_err(&dev->dev, "SMBus base address uninitialized, " - "upgrade BIOS\n"); - err = -ENODEV; - goto exit; - } - - err = pci_request_region(dev, SMBBAR, i801_driver.name); - if (err) { - dev_err(&dev->dev, "Failed to request SMBus region " - "0x%lx-0x%Lx\n", i801_smba, - (unsigned long long)pci_resource_end(dev, SMBBAR)); - goto exit; - } - - pci_read_config_byte(I801_dev, SMBHSTCFG, &temp); - temp &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */ - if (!(temp & SMBHSTCFG_HST_EN)) { - dev_info(&dev->dev, "Enabling SMBus device\n"); - temp |= SMBHSTCFG_HST_EN; - } - pci_write_config_byte(I801_dev, SMBHSTCFG, temp); - - if (temp & SMBHSTCFG_SMB_SMI_EN) - dev_dbg(&dev->dev, "SMBus using interrupt SMI#\n"); - else - dev_dbg(&dev->dev, "SMBus using PCI Interrupt\n"); - /* set up the driverfs linkage to our parent device */ i801_adapter.dev.parent = &dev->dev; snprintf(i801_adapter.name, I2C_NAME_SIZE, - "SMBus I801 adapter at %04lx", i801_smba); - err = i2c_add_adapter(&i801_adapter); - if (err) { - dev_err(&dev->dev, "Failed to add SMBus adapter\n"); - goto exit_release; - } - return 0; - -exit_release: - pci_release_region(dev, SMBBAR); -exit: - return err; + "SMBus I801 adapter at %04x", i801_smba); + return i2c_add_adapter(&i801_adapter); } static void __devexit i801_remove(struct pci_dev *dev) { i2c_del_adapter(&i801_adapter); - pci_release_region(dev, SMBBAR); - /* - * do not call pci_disable_device(dev) since it can cause hard hangs on - * some systems during power-off (eg. Fujitsu-Siemens Lifebook E8010) - */ + release_region(i801_smba, (isich4 ? 16 : 8)); } static struct pci_driver i801_driver = { diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 0599bbd65..87fae937e 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -28,6 +28,7 @@ * */ +#include #include #include #include diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 48c56939c..d00a02fc2 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c @@ -21,14 +21,12 @@ * - Make it work with IXP46x chips * - Cleanup function names, coding style, etc * - * - writing to slave address causes latchup on iop331. - * fix: driver refuses to address self. - * * 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, version 2. */ +#include #include #include #include @@ -75,6 +73,12 @@ iop3xx_i2c_reset(struct i2c_algo_iop3xx_data *iop3xx_adap) __raw_writel(0, iop3xx_adap->ioaddr + CR_OFFSET); } +static void +iop3xx_i2c_set_slave_addr(struct i2c_algo_iop3xx_data *iop3xx_adap) +{ + __raw_writel(MYSAR, iop3xx_adap->ioaddr + SAR_OFFSET); +} + static void iop3xx_i2c_enable(struct i2c_algo_iop3xx_data *iop3xx_adap) { @@ -245,13 +249,6 @@ iop3xx_i2c_send_target_addr(struct i2c_algo_iop3xx_data *iop3xx_adap, int status; int rc; - /* avoid writing to my slave address (hangs on 80331), - * forbidden in Intel developer manual - */ - if (msg->addr == MYSAR) { - return -EBUSY; - } - __raw_writel(iic_cook_addr(msg), iop3xx_adap->ioaddr + DBR_OFFSET); cr &= ~(IOP3XX_ICR_MSTOP | IOP3XX_ICR_NACK); @@ -502,6 +499,7 @@ iop3xx_i2c_probe(struct platform_device *pdev) spin_lock_init(&adapter_data->lock); iop3xx_i2c_reset(adapter_data); + iop3xx_i2c_set_slave_addr(adapter_data); iop3xx_i2c_enable(adapter_data); platform_set_drvdata(pdev, new_adapter); diff --git a/drivers/i2c/busses/i2c-iop3xx.h b/drivers/i2c/busses/i2c-iop3xx.h index 8485861f6..e46ebaea7 100644 --- a/drivers/i2c/busses/i2c-iop3xx.h +++ b/drivers/i2c/busses/i2c-iop3xx.h @@ -80,7 +80,7 @@ #define IOP3XX_GPOD_I2C0 0x00c0 /* clear these bits to enable ch0 */ #define IOP3XX_GPOD_I2C1 0x0030 /* clear these bits to enable ch1 */ -#define MYSAR 0 /* default slave address */ +#define MYSAR 0x02 /* SWAG a suitable slave address */ #define I2C_ERR 321 #define I2C_ERR_BERR (I2C_ERR+0) diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 377ab4094..2721e4c81 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c @@ -13,6 +13,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -318,7 +319,7 @@ static int fsl_i2c_probe(struct platform_device *pdev) if (i2c->irq != 0) if ((result = request_irq(i2c->irq, mpc_i2c_isr, - IRQF_SHARED, "i2c-mpc", i2c)) < 0) { + SA_SHIRQ, "i2c-mpc", i2c)) < 0) { printk(KERN_ERR "i2c-mpc - failed to attach interrupt\n"); goto fail_irq; diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 604b49e22..2d80eb26f 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c @@ -31,8 +31,6 @@ nForce3 250Gb MCP 00E4 nForce4 MCP 0052 nForce4 MCP-04 0034 - nForce4 MCP51 0264 - nForce4 MCP55 0368 This driver supports the 2 SMBuses that are included in the MCP of the nForce2/3/4 chipsets. @@ -66,7 +64,6 @@ struct nforce2_smbus { /* * nVidia nForce2 SMBus control register definitions - * (Newer incarnations use standard BARs 4 and 5 instead) */ #define NFORCE_PCI_SMB1 0x50 #define NFORCE_PCI_SMB2 0x54 @@ -262,8 +259,6 @@ static struct pci_device_id nforce2_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS) }, - { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS) }, - { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS) }, { 0 } }; @@ -271,29 +266,19 @@ static struct pci_device_id nforce2_ids[] = { MODULE_DEVICE_TABLE (pci, nforce2_ids); -static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar, - int alt_reg, struct nforce2_smbus *smbus, const char *name) +static int __devinit nforce2_probe_smb (struct pci_dev *dev, int reg, + struct nforce2_smbus *smbus, char *name) { + u16 iobase; int error; - smbus->base = pci_resource_start(dev, bar); - if (smbus->base) { - smbus->size = pci_resource_len(dev, bar); - } else { - /* Older incarnations of the device used non-standard BARs */ - u16 iobase; - - if (pci_read_config_word(dev, alt_reg, &iobase) - != PCIBIOS_SUCCESSFUL) { - dev_err(&dev->dev, "Error reading PCI config for %s\n", - name); - return -1; - } - - smbus->base = iobase & PCI_BASE_ADDRESS_IO_MASK; - smbus->size = 8; + if (pci_read_config_word(dev, reg, &iobase) != PCIBIOS_SUCCESSFUL) { + dev_err(&smbus->adapter.dev, "Error reading PCI config for %s\n", name); + return -1; } - smbus->dev = dev; + smbus->dev = dev; + smbus->base = iobase & 0xfffc; + smbus->size = 8; if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", @@ -328,13 +313,12 @@ static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_ pci_set_drvdata(dev, smbuses); /* SMBus adapter 1 */ - res1 = nforce2_probe_smb(dev, 4, NFORCE_PCI_SMB1, &smbuses[0], "SMB1"); + res1 = nforce2_probe_smb (dev, NFORCE_PCI_SMB1, &smbuses[0], "SMB1"); if (res1 < 0) { dev_err(&dev->dev, "Error probing SMB1.\n"); smbuses[0].base = 0; /* to have a check value */ } - /* SMBus adapter 2 */ - res2 = nforce2_probe_smb(dev, 5, NFORCE_PCI_SMB2, &smbuses[1], "SMB2"); + res2 = nforce2_probe_smb (dev, NFORCE_PCI_SMB2, &smbuses[1], "SMB2"); if (res2 < 0) { dev_err(&dev->dev, "Error probing SMB2.\n"); smbuses[1].base = 0; /* to have a check value */ diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c deleted file mode 100644 index 820a75232..000000000 --- a/drivers/i2c/busses/i2c-ocores.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * i2c-ocores.c: I2C bus driver for OpenCores I2C controller - * (http://www.opencores.org/projects.cgi/web/i2c/overview). - * - * Peter Korsgaard - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct ocores_i2c { - void __iomem *base; - int regstep; - wait_queue_head_t wait; - struct i2c_adapter adap; - struct i2c_msg *msg; - int pos; - int nmsgs; - int state; /* see STATE_ */ -}; - -/* registers */ -#define OCI2C_PRELOW 0 -#define OCI2C_PREHIGH 1 -#define OCI2C_CONTROL 2 -#define OCI2C_DATA 3 -#define OCI2C_CMD 4 /* write only */ -#define OCI2C_STATUS 4 /* read only, same address as OCI2C_CMD */ - -#define OCI2C_CTRL_IEN 0x40 -#define OCI2C_CTRL_EN 0x80 - -#define OCI2C_CMD_START 0x91 -#define OCI2C_CMD_STOP 0x41 -#define OCI2C_CMD_READ 0x21 -#define OCI2C_CMD_WRITE 0x11 -#define OCI2C_CMD_READ_ACK 0x21 -#define OCI2C_CMD_READ_NACK 0x29 -#define OCI2C_CMD_IACK 0x01 - -#define OCI2C_STAT_IF 0x01 -#define OCI2C_STAT_TIP 0x02 -#define OCI2C_STAT_ARBLOST 0x20 -#define OCI2C_STAT_BUSY 0x40 -#define OCI2C_STAT_NACK 0x80 - -#define STATE_DONE 0 -#define STATE_START 1 -#define STATE_WRITE 2 -#define STATE_READ 3 -#define STATE_ERROR 4 - -static inline void oc_setreg(struct ocores_i2c *i2c, int reg, u8 value) -{ - iowrite8(value, i2c->base + reg * i2c->regstep); -} - -static inline u8 oc_getreg(struct ocores_i2c *i2c, int reg) -{ - return ioread8(i2c->base + reg * i2c->regstep); -} - -static void ocores_process(struct ocores_i2c *i2c) -{ - struct i2c_msg *msg = i2c->msg; - u8 stat = oc_getreg(i2c, OCI2C_STATUS); - - if ((i2c->state == STATE_DONE) || (i2c->state == STATE_ERROR)) { - /* stop has been sent */ - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); - wake_up(&i2c->wait); - return; - } - - /* error? */ - if (stat & OCI2C_STAT_ARBLOST) { - i2c->state = STATE_ERROR; - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); - return; - } - - if ((i2c->state == STATE_START) || (i2c->state == STATE_WRITE)) { - i2c->state = - (msg->flags & I2C_M_RD) ? STATE_READ : STATE_WRITE; - - if (stat & OCI2C_STAT_NACK) { - i2c->state = STATE_ERROR; - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); - return; - } - } else - msg->buf[i2c->pos++] = oc_getreg(i2c, OCI2C_DATA); - - /* end of msg? */ - if (i2c->pos == msg->len) { - i2c->nmsgs--; - i2c->msg++; - i2c->pos = 0; - msg = i2c->msg; - - if (i2c->nmsgs) { /* end? */ - /* send start? */ - if (!(msg->flags & I2C_M_NOSTART)) { - u8 addr = (msg->addr << 1); - - if (msg->flags & I2C_M_RD) - addr |= 1; - - i2c->state = STATE_START; - - oc_setreg(i2c, OCI2C_DATA, addr); - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START); - return; - } else - i2c->state = (msg->flags & I2C_M_RD) - ? STATE_READ : STATE_WRITE; - } else { - i2c->state = STATE_DONE; - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_STOP); - return; - } - } - - if (i2c->state == STATE_READ) { - oc_setreg(i2c, OCI2C_CMD, i2c->pos == (msg->len-1) ? - OCI2C_CMD_READ_NACK : OCI2C_CMD_READ_ACK); - } else { - oc_setreg(i2c, OCI2C_DATA, msg->buf[i2c->pos++]); - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_WRITE); - } -} - -static irqreturn_t ocores_isr(int irq, void *dev_id, struct pt_regs *regs) -{ - struct ocores_i2c *i2c = dev_id; - - ocores_process(i2c); - - return IRQ_HANDLED; -} - -static int ocores_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) -{ - struct ocores_i2c *i2c = i2c_get_adapdata(adap); - - i2c->msg = msgs; - i2c->pos = 0; - i2c->nmsgs = num; - i2c->state = STATE_START; - - oc_setreg(i2c, OCI2C_DATA, - (i2c->msg->addr << 1) | - ((i2c->msg->flags & I2C_M_RD) ? 1:0)); - - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START); - - if (wait_event_timeout(i2c->wait, (i2c->state == STATE_ERROR) || - (i2c->state == STATE_DONE), HZ)) - return (i2c->state == STATE_DONE) ? num : -EIO; - else - return -ETIMEDOUT; -} - -static void ocores_init(struct ocores_i2c *i2c, - struct ocores_i2c_platform_data *pdata) -{ - int prescale; - u8 ctrl = oc_getreg(i2c, OCI2C_CONTROL); - - /* make sure the device is disabled */ - oc_setreg(i2c, OCI2C_CONTROL, ctrl & ~(OCI2C_CTRL_EN|OCI2C_CTRL_IEN)); - - prescale = (pdata->clock_khz / (5*100)) - 1; - oc_setreg(i2c, OCI2C_PRELOW, prescale & 0xff); - oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8); - - /* Init the device */ - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK); - oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_IEN | OCI2C_CTRL_EN); -} - - -static u32 ocores_func(struct i2c_adapter *adap) -{ - return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; -} - -static struct i2c_algorithm ocores_algorithm = { - .master_xfer = ocores_xfer, - .functionality = ocores_func, -}; - -static struct i2c_adapter ocores_adapter = { - .owner = THIS_MODULE, - .name = "i2c-ocores", - .class = I2C_CLASS_HWMON, - .algo = &ocores_algorithm, -}; - - -static int __devinit ocores_i2c_probe(struct platform_device *pdev) -{ - struct ocores_i2c *i2c; - struct ocores_i2c_platform_data *pdata; - struct resource *res, *res2; - int ret; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res2) - return -ENODEV; - - pdata = (struct ocores_i2c_platform_data*) pdev->dev.platform_data; - if (!pdata) - return -ENODEV; - - i2c = kzalloc(sizeof(*i2c), GFP_KERNEL); - if (!i2c) - return -ENOMEM; - - if (!request_mem_region(res->start, res->end - res->start + 1, - pdev->name)) { - dev_err(&pdev->dev, "Memory region busy\n"); - ret = -EBUSY; - goto request_mem_failed; - } - - i2c->base = ioremap(res->start, res->end - res->start + 1); - if (!i2c->base) { - dev_err(&pdev->dev, "Unable to map registers\n"); - ret = -EIO; - goto map_failed; - } - - i2c->regstep = pdata->regstep; - ocores_init(i2c, pdata); - - init_waitqueue_head(&i2c->wait); - ret = request_irq(res2->start, ocores_isr, 0, pdev->name, i2c); - if (ret) { - dev_err(&pdev->dev, "Cannot claim IRQ\n"); - goto request_irq_failed; - } - - /* hook up driver to tree */ - platform_set_drvdata(pdev, i2c); - i2c->adap = ocores_adapter; - i2c_set_adapdata(&i2c->adap, i2c); - i2c->adap.dev.parent = &pdev->dev; - - /* add i2c adapter to i2c tree */ - ret = i2c_add_adapter(&i2c->adap); - if (ret) { - dev_err(&pdev->dev, "Failed to add adapter\n"); - goto add_adapter_failed; - } - - return 0; - -add_adapter_failed: - free_irq(res2->start, i2c); -request_irq_failed: - iounmap(i2c->base); -map_failed: - release_mem_region(res->start, res->end - res->start + 1); -request_mem_failed: - kfree(i2c); - - return ret; -} - -static int __devexit ocores_i2c_remove(struct platform_device* pdev) -{ - struct ocores_i2c *i2c = platform_get_drvdata(pdev); - struct resource *res; - - /* disable i2c logic */ - oc_setreg(i2c, OCI2C_CONTROL, oc_getreg(i2c, OCI2C_CONTROL) - & ~(OCI2C_CTRL_EN|OCI2C_CTRL_IEN)); - - /* remove adapter & data */ - i2c_del_adapter(&i2c->adap); - platform_set_drvdata(pdev, NULL); - - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (res) - free_irq(res->start, i2c); - - iounmap(i2c->base); - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res) - release_mem_region(res->start, res->end - res->start + 1); - - kfree(i2c); - - return 0; -} - -static struct platform_driver ocores_i2c_driver = { - .probe = ocores_i2c_probe, - .remove = __devexit_p(ocores_i2c_remove), - .driver = { - .owner = THIS_MODULE, - .name = "ocores-i2c", - }, -}; - -static int __init ocores_i2c_init(void) -{ - return platform_driver_register(&ocores_i2c_driver); -} - -static void __exit ocores_i2c_exit(void) -{ - platform_driver_unregister(&ocores_i2c_driver); -} - -module_init(ocores_i2c_init); -module_exit(ocores_i2c_exit); - -MODULE_AUTHOR("Peter Korsgaard "); -MODULE_DESCRIPTION("OpenCores I2C bus driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 8f2f65b79..d9c7c00e7 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -102,6 +102,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; +module_param (fix_hstcfg, int, 0); +MODULE_PARM_DESC(fix_hstcfg, + "Fix config register. Needed on some boards (Force CPCI735)."); + static int piix4_transaction(void); static unsigned short piix4_smba; @@ -130,7 +137,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, /* Don't access SMBus on IBM systems which get corrupted eeproms */ if (dmi_check_system(piix4_dmi_table) && PIIX4_dev->vendor == PCI_VENDOR_ID_INTEL) { - dev_err(&PIIX4_dev->dev, "IBM system detected; this module " + dev_err(&PIIX4_dev->dev, "IBM Laptop detected; this module " "may corrupt your serial eeprom! Refusing to load " "module!\n"); return -EPERM; @@ -159,6 +166,22 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, 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) { @@ -191,7 +214,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, } } - if (((temp & 0x0E) == 8) || ((temp & 0x0E) == 2)) + if ((temp & 0x0E) == 8) dev_dbg(&PIIX4_dev->dev, "Using Interrupt 9 for SMBus.\n"); else if ((temp & 0x0E) == 0) dev_dbg(&PIIX4_dev->dev, "Using Interrupt SMI# for SMBus.\n"); @@ -390,12 +413,6 @@ static struct i2c_adapter piix4_adapter = { static struct pci_device_id piix4_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3), .driver_data = 3 }, - { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_SMBUS), - .driver_data = 0 }, - { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_SMBUS), - .driver_data = 0 }, - { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS), - .driver_data = 0 }, { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4), .driver_data = 0 }, { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5), diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 53bb43593..df786eb55 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -20,6 +20,7 @@ */ +#include #include #include #include @@ -148,6 +149,8 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, int read; int addrdir; + if (num != 1) + return -EINVAL; if (msgs->flags & I2C_M_TEN) return -EINVAL; read = (msgs->flags & I2C_M_RD) != 0; @@ -164,7 +167,7 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len); bail: pmac_i2c_close(bus); - return rc < 0 ? rc : 1; + return rc < 0 ? rc : msgs->len; } static u32 i2c_powermac_func(struct i2c_adapter * adapter) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index ee114b48f..5155010b4 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct platform_device *dev) #endif pxa_set_cken(CKEN14_I2C, 1); - ret = request_irq(IRQ_I2C, i2c_pxa_handler, IRQF_DISABLED, + ret = request_irq(IRQ_I2C, i2c_pxa_handler, SA_INTERRUPT, "pxa2xx-i2c", i2c); if (ret) goto out; diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 5d2950e91..f7d40f8e5 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include @@ -828,7 +829,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) goto out; } - ret = request_irq(res->start, s3c24xx_i2c_irq, IRQF_DISABLED, + ret = request_irq(res->start, s3c24xx_i2c_irq, SA_INTERRUPT, pdev->name, i2c); if (ret != 0) { diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index eae9e81be..9b4f4ee4f 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -33,6 +33,7 @@ #include #include #include +#include #include @@ -84,10 +85,6 @@ struct scx200_acb_iface { u8 *ptr; char needs_reset; unsigned len; - - /* PCI device info */ - struct pci_dev *pdev; - int bar; }; /* Register Definitions */ @@ -232,7 +229,7 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface) unsigned long timeout; timeout = jiffies + POLL_TIMEOUT; - while (1) { + while (time_before(jiffies, timeout)) { status = inb(ACBST); /* Reset the status register to avoid the hang */ @@ -242,10 +239,7 @@ static void scx200_acb_poll(struct scx200_acb_iface *iface) scx200_acb_machine(iface, status); return; } - if (time_after(jiffies, timeout)) - break; - cpu_relax(); - cond_resched(); + yield(); } dev_err(&iface->adapter.dev, "timeout in state %s\n", @@ -391,7 +385,7 @@ static struct i2c_algorithm scx200_acb_algorithm = { static struct scx200_acb_iface *scx200_acb_list; static DECLARE_MUTEX(scx200_acb_list_mutex); -static __init int scx200_acb_probe(struct scx200_acb_iface *iface) +static int scx200_acb_probe(struct scx200_acb_iface *iface) { u8 val; @@ -427,16 +421,17 @@ static __init int scx200_acb_probe(struct scx200_acb_iface *iface) return 0; } -static __init struct scx200_acb_iface *scx200_create_iface(const char *text, - int index) +static int __init scx200_acb_create(const char *text, int base, int index) { struct scx200_acb_iface *iface; struct i2c_adapter *adapter; + int rc; iface = kzalloc(sizeof(*iface), GFP_KERNEL); if (!iface) { printk(KERN_ERR NAME ": can't allocate memory\n"); - return NULL; + rc = -ENOMEM; + goto errout; } adapter = &iface->adapter; @@ -449,27 +444,26 @@ static __init struct scx200_acb_iface *scx200_create_iface(const char *text, mutex_init(&iface->mutex); - return iface; -} - -static int __init scx200_acb_create(struct scx200_acb_iface *iface) -{ - struct i2c_adapter *adapter; - int rc; - - adapter = &iface->adapter; + if (!request_region(base, 8, adapter->name)) { + printk(KERN_ERR NAME ": can't allocate io 0x%x-0x%x\n", + base, base + 8-1); + rc = -EBUSY; + goto errout_free; + } + iface->base = base; rc = scx200_acb_probe(iface); if (rc) { printk(KERN_WARNING NAME ": probe failed\n"); - return rc; + goto errout_release; } scx200_acb_reset(iface); if (i2c_add_adapter(adapter) < 0) { printk(KERN_ERR NAME ": failed to register\n"); - return -ENODEV; + rc = -ENODEV; + goto errout_release; } down(&scx200_acb_list_mutex); @@ -478,148 +472,64 @@ static int __init scx200_acb_create(struct scx200_acb_iface *iface) up(&scx200_acb_list_mutex); return 0; -} -static __init int scx200_create_pci(const char *text, struct pci_dev *pdev, - int bar) -{ - struct scx200_acb_iface *iface; - int rc; - - iface = scx200_create_iface(text, 0); - - if (iface == NULL) - return -ENOMEM; - - iface->pdev = pdev; - iface->bar = bar; - - pci_enable_device_bars(iface->pdev, 1 << iface->bar); - - rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name); - - if (rc != 0) { - printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n", - iface->bar); - goto errout_free; - } - - iface->base = pci_resource_start(iface->pdev, iface->bar); - rc = scx200_acb_create(iface); - - if (rc == 0) - return 0; - - pci_release_region(iface->pdev, iface->bar); - pci_dev_put(iface->pdev); + errout_release: + release_region(iface->base, 8); errout_free: kfree(iface); + errout: return rc; } -static int __init scx200_create_isa(const char *text, unsigned long base, - int index) -{ - struct scx200_acb_iface *iface; - int rc; - - iface = scx200_create_iface(text, index); - - if (iface == NULL) - return -ENOMEM; - - if (request_region(base, 8, iface->adapter.name) == 0) { - printk(KERN_ERR NAME ": can't allocate io 0x%lx-0x%lx\n", - base, base + 8 - 1); - rc = -EBUSY; - goto errout_free; - } - - iface->base = base; - rc = scx200_acb_create(iface); - - if (rc == 0) - return 0; - - release_region(base, 8); - errout_free: - kfree(iface); - return rc; -} - -/* Driver data is an index into the scx200_data array that indicates - * the name and the BAR where the I/O address resource is located. ISA - * devices are flagged with a bar value of -1 */ - -static struct pci_device_id scx200_pci[] = { - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE), - .driver_data = 0 }, - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE), - .driver_data = 0 }, - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_ISA), - .driver_data = 1 }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA), - .driver_data = 2 } +static struct pci_device_id scx200[] = { + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) }, + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) }, + { }, }; -static struct { - const char *name; - int bar; -} scx200_data[] = { - { "SCx200", -1 }, - { "CS5535", 0 }, - { "CS5536", 0 } +static struct pci_device_id divil_pci[] = { + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_ISA) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA) }, + { } /* NULL entry */ }; -static __init int scx200_scan_pci(void) +#define MSR_LBAR_SMB 0x5140000B + +static __init int scx200_add_cs553x(void) { - int data, dev; - int rc = -ENODEV; - struct pci_dev *pdev; - - for(dev = 0; dev < ARRAY_SIZE(scx200_pci); dev++) { - pdev = pci_get_device(scx200_pci[dev].vendor, - scx200_pci[dev].device, NULL); - - if (pdev == NULL) - continue; - - data = scx200_pci[dev].driver_data; - - /* if .bar is greater or equal to zero, this is a - * PCI device - otherwise, we assume - that the ports are ISA based - */ - - if (scx200_data[data].bar >= 0) - rc = scx200_create_pci(scx200_data[data].name, pdev, - scx200_data[data].bar); - else { - int i; - - for (i = 0; i < MAX_DEVICES; ++i) { - if (base[i] == 0) - continue; - - rc = scx200_create_isa(scx200_data[data].name, - base[i], - i); - } - } + u32 low, hi; + u32 smb_base; - break; + /* Grab & reserve the SMB I/O range */ + rdmsr(MSR_LBAR_SMB, low, hi); + + /* Check the IO mask and whether SMB is enabled */ + if (hi != 0x0000F001) { + printk(KERN_WARNING NAME ": SMBus not enabled\n"); + return -ENODEV; } - return rc; + /* SMBus IO size is 8 bytes */ + smb_base = low & 0x0000FFF8; + + return scx200_acb_create("CS5535", smb_base, 0); } static int __init scx200_acb_init(void) { - int rc; + int i; + int rc = -ENODEV; pr_debug(NAME ": NatSemi SCx200 ACCESS.bus Driver\n"); - rc = scx200_scan_pci(); + /* Verify that this really is a SCx200 processor */ + if (pci_dev_present(scx200)) { + for (i = 0; i < MAX_DEVICES; ++i) { + if (base[i] > 0) + rc = scx200_acb_create("SCx200", base[i], i); + } + } else if (pci_dev_present(divil_pci)) + rc = scx200_add_cs553x(); /* If at least one bus was created, init must succeed */ if (scx200_acb_list) @@ -637,14 +547,7 @@ static void __exit scx200_acb_cleanup(void) up(&scx200_acb_list_mutex); i2c_del_adapter(&iface->adapter); - - if (iface->pdev) { - pci_release_region(iface->pdev, iface->bar); - pci_dev_put(iface->pdev); - } - else - release_region(iface->base, 8); - + release_region(iface->base, 8); kfree(iface); down(&scx200_acb_list_mutex); } diff --git a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c index cb3ef5ac9..27fbfecc4 100644 --- a/drivers/i2c/busses/scx200_i2c.c +++ b/drivers/i2c/busses/scx200_i2c.c @@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig index 87ee3ce58..7aa5c38f0 100644 --- a/drivers/i2c/chips/Kconfig +++ b/drivers/i2c/chips/Kconfig @@ -39,7 +39,6 @@ config SENSORS_EEPROM config SENSORS_PCF8574 tristate "Philips PCF8574 and PCF8574A" depends on I2C && EXPERIMENTAL - default n help If you say yes here you get support for Philips PCF8574 and PCF8574A chips. @@ -47,9 +46,6 @@ config SENSORS_PCF8574 This driver can also be built as a module. If so, the module will be called pcf8574. - These devices are hard to detect and rarely found on mainstream - hardware. If unsure, say N. - config SENSORS_PCA9539 tristate "Philips PCA9539 16-bit I/O port" depends on I2C && EXPERIMENTAL @@ -63,16 +59,12 @@ config SENSORS_PCA9539 config SENSORS_PCF8591 tristate "Philips PCF8591" depends on I2C && EXPERIMENTAL - default n help If you say yes here you get support for Philips PCF8591 chips. This driver can also be built as a module. If so, the module will be called pcf8591. - These devices are hard to detect and rarely found on mainstream - hardware. If unsure, say N. - config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index f92505b94..e6f1ab7b9 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c @@ -21,6 +21,7 @@ #undef DEBUG #undef VERBOSE +#include #include #include #include @@ -908,7 +909,7 @@ static int otg_bind(struct isp1301 *isp) if (otg_dev) status = request_irq(otg_dev->resource[1].start, omap_otg_irq, - IRQF_DISABLED, DRIVER_NAME, isp); + SA_INTERRUPT, DRIVER_NAME, isp); else status = -ENODEV; @@ -1578,7 +1579,7 @@ fail1: } status = request_irq(isp->irq, isp1301_irq, - IRQF_SAMPLE_RANDOM, DRIVER_NAME, isp); + SA_SAMPLE_RANDOM, DRIVER_NAME, isp); if (status < 0) { dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", isp->irq, status); diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c index 2dd0a34d9..99ab4ec34 100644 --- a/drivers/i2c/chips/m41t00.c +++ b/drivers/i2c/chips/m41t00.c @@ -1,9 +1,11 @@ /* - * I2C client/driver for the ST M41T00 family of i2c rtc chips. + * drivers/i2c/chips/m41t00.c + * + * I2C client/driver for the ST M41T00 Real-Time Clock chip. * * Author: Mark A. Greer * - * 2005, 2006 (c) MontaVista Software, Inc. This file is licensed under + * 2005 (c) MontaVista Software, Inc. This file is licensed under * the terms of the GNU General Public License version 2. This program * is licensed "as is" without any warranty of any kind, whether express * or implied. @@ -11,6 +13,9 @@ /* * This i2c client/driver wedges between the drivers/char/genrtc.c RTC * interface and the SMBus interface of the i2c subsystem. + * It would be more efficient to use i2c msgs/i2c_transfer directly but, as + * recommened in .../Documentation/i2c/writing-clients section + * "Sending and receiving", using SMBus level communication is preferred. */ #include @@ -19,110 +24,56 @@ #include #include #include +#include #include -#include -#include + #include #include +#define M41T00_DRV_NAME "m41t00" + +static DEFINE_MUTEX(m41t00_mutex); + static struct i2c_driver m41t00_driver; static struct i2c_client *save_client; static unsigned short ignore[] = { I2C_CLIENT_END }; -static unsigned short normal_addr[] = { I2C_CLIENT_END, I2C_CLIENT_END }; +static unsigned short normal_addr[] = { 0x68, I2C_CLIENT_END }; static struct i2c_client_address_data addr_data = { - .normal_i2c = normal_addr, - .probe = ignore, - .ignore = ignore, -}; - -struct m41t00_chip_info { - u8 type; - char *name; - u8 read_limit; - u8 sec; /* Offsets for chip regs */ - u8 min; - u8 hour; - u8 day; - u8 mon; - u8 year; - u8 alarm_mon; - u8 alarm_hour; - u8 sqw; - u8 sqw_freq; + .normal_i2c = normal_addr, + .probe = ignore, + .ignore = ignore, }; -static struct m41t00_chip_info m41t00_chip_info_tbl[] = { - { - .type = M41T00_TYPE_M41T00, - .name = "m41t00", - .read_limit = 5, - .sec = 0, - .min = 1, - .hour = 2, - .day = 4, - .mon = 5, - .year = 6, - }, - { - .type = M41T00_TYPE_M41T81, - .name = "m41t81", - .read_limit = 1, - .sec = 1, - .min = 2, - .hour = 3, - .day = 5, - .mon = 6, - .year = 7, - .alarm_mon = 0xa, - .alarm_hour = 0xc, - .sqw = 0x13, - }, - { - .type = M41T00_TYPE_M41T85, - .name = "m41t85", - .read_limit = 1, - .sec = 1, - .min = 2, - .hour = 3, - .day = 5, - .mon = 6, - .year = 7, - .alarm_mon = 0xa, - .alarm_hour = 0xc, - .sqw = 0x13, - }, -}; -static struct m41t00_chip_info *m41t00_chip; - ulong m41t00_get_rtc_time(void) { - s32 sec, min, hour, day, mon, year; - s32 sec1, min1, hour1, day1, mon1, year1; - u8 reads = 0; - u8 buf[8], msgbuf[1] = { 0 }; /* offset into rtc's regs */ - struct i2c_msg msgs[] = { - { - .addr = save_client->addr, - .flags = 0, - .len = 1, - .buf = msgbuf, - }, - { - .addr = save_client->addr, - .flags = I2C_M_RD, - .len = 8, - .buf = buf, - }, - }; + s32 sec, min, hour, day, mon, year; + s32 sec1, min1, hour1, day1, mon1, year1; + ulong limit = 10; sec = min = hour = day = mon = year = 0; + sec1 = min1 = hour1 = day1 = mon1 = year1 = 0; + mutex_lock(&m41t00_mutex); do { - if (i2c_transfer(save_client->adapter, msgs, 2) < 0) - goto read_err; + if (((sec = i2c_smbus_read_byte_data(save_client, 0)) >= 0) + && ((min = i2c_smbus_read_byte_data(save_client, 1)) + >= 0) + && ((hour = i2c_smbus_read_byte_data(save_client, 2)) + >= 0) + && ((day = i2c_smbus_read_byte_data(save_client, 4)) + >= 0) + && ((mon = i2c_smbus_read_byte_data(save_client, 5)) + >= 0) + && ((year = i2c_smbus_read_byte_data(save_client, 6)) + >= 0) + && ((sec == sec1) && (min == min1) && (hour == hour1) + && (day == day1) && (mon == mon1) + && (year == year1))) + + break; sec1 = sec; min1 = min; @@ -130,88 +81,69 @@ m41t00_get_rtc_time(void) day1 = day; mon1 = mon; year1 = year; + } while (--limit > 0); + mutex_unlock(&m41t00_mutex); + + if (limit == 0) { + dev_warn(&save_client->dev, + "m41t00: can't read rtc chip\n"); + sec = min = hour = day = mon = year = 0; + } + + sec &= 0x7f; + min &= 0x7f; + hour &= 0x3f; + day &= 0x3f; + mon &= 0x1f; + year &= 0xff; - sec = buf[m41t00_chip->sec] & 0x7f; - min = buf[m41t00_chip->min] & 0x7f; - hour = buf[m41t00_chip->hour] & 0x3f; - day = buf[m41t00_chip->day] & 0x3f; - mon = buf[m41t00_chip->mon] & 0x1f; - year = buf[m41t00_chip->year]; - } while ((++reads < m41t00_chip->read_limit) && ((sec != sec1) - || (min != min1) || (hour != hour1) || (day != day1) - || (mon != mon1) || (year != year1))); - - if ((m41t00_chip->read_limit > 1) && ((sec != sec1) || (min != min1) - || (hour != hour1) || (day != day1) || (mon != mon1) - || (year != year1))) - goto read_err; - - sec = BCD2BIN(sec); - min = BCD2BIN(min); - hour = BCD2BIN(hour); - day = BCD2BIN(day); - mon = BCD2BIN(mon); - year = BCD2BIN(year); + BCD_TO_BIN(sec); + BCD_TO_BIN(min); + BCD_TO_BIN(hour); + BCD_TO_BIN(day); + BCD_TO_BIN(mon); + BCD_TO_BIN(year); year += 1900; if (year < 1970) year += 100; return mktime(year, mon, day, hour, min, sec); - -read_err: - dev_err(&save_client->dev, "m41t00_get_rtc_time: Read error\n"); - return 0; } -EXPORT_SYMBOL_GPL(m41t00_get_rtc_time); static void m41t00_set(void *arg) { struct rtc_time tm; - int nowtime = *(int *)arg; - s32 sec, min, hour, day, mon, year; - u8 wbuf[9], *buf = &wbuf[1], msgbuf[1] = { 0 }; - struct i2c_msg msgs[] = { - { - .addr = save_client->addr, - .flags = 0, - .len = 1, - .buf = msgbuf, - }, - { - .addr = save_client->addr, - .flags = I2C_M_RD, - .len = 8, - .buf = buf, - }, - }; + ulong nowtime = *(ulong *)arg; to_tm(nowtime, &tm); tm.tm_year = (tm.tm_year - 1900) % 100; - sec = BIN2BCD(tm.tm_sec); - min = BIN2BCD(tm.tm_min); - hour = BIN2BCD(tm.tm_hour); - day = BIN2BCD(tm.tm_mday); - mon = BIN2BCD(tm.tm_mon); - year = BIN2BCD(tm.tm_year); - - /* Read reg values into buf[0..7]/wbuf[1..8] */ - if (i2c_transfer(save_client->adapter, msgs, 2) < 0) { - dev_err(&save_client->dev, "m41t00_set: Read error\n"); - return; - } - - wbuf[0] = 0; /* offset into rtc's regs */ - buf[m41t00_chip->sec] = (buf[m41t00_chip->sec] & ~0x7f) | (sec & 0x7f); - buf[m41t00_chip->min] = (buf[m41t00_chip->min] & ~0x7f) | (min & 0x7f); - buf[m41t00_chip->hour] = (buf[m41t00_chip->hour] & ~0x3f) | (hour& 0x3f); - buf[m41t00_chip->day] = (buf[m41t00_chip->day] & ~0x3f) | (day & 0x3f); - buf[m41t00_chip->mon] = (buf[m41t00_chip->mon] & ~0x1f) | (mon & 0x1f); - - if (i2c_master_send(save_client, wbuf, 9) < 0) - dev_err(&save_client->dev, "m41t00_set: Write error\n"); + BIN_TO_BCD(tm.tm_sec); + BIN_TO_BCD(tm.tm_min); + BIN_TO_BCD(tm.tm_hour); + BIN_TO_BCD(tm.tm_mon); + BIN_TO_BCD(tm.tm_mday); + BIN_TO_BCD(tm.tm_year); + + mutex_lock(&m41t00_mutex); + if ((i2c_smbus_write_byte_data(save_client, 0, tm.tm_sec & 0x7f) < 0) + || (i2c_smbus_write_byte_data(save_client, 1, tm.tm_min & 0x7f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 2, tm.tm_hour & 0x3f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 4, tm.tm_mday & 0x3f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 5, tm.tm_mon & 0x1f) + < 0) + || (i2c_smbus_write_byte_data(save_client, 6, tm.tm_year & 0xff) + < 0)) + + dev_warn(&save_client->dev,"m41t00: can't write to rtc chip\n"); + + mutex_unlock(&m41t00_mutex); + return; } static ulong new_time; @@ -230,48 +162,6 @@ m41t00_set_rtc_time(ulong nowtime) return 0; } -EXPORT_SYMBOL_GPL(m41t00_set_rtc_time); - -/* - ***************************************************************************** - * - * platform_data Driver Interface - * - ***************************************************************************** - */ -static int __init -m41t00_platform_probe(struct platform_device *pdev) -{ - struct m41t00_platform_data *pdata; - int i; - - if (pdev && (pdata = pdev->dev.platform_data)) { - normal_addr[0] = pdata->i2c_addr; - - for (i=0; itype) { - m41t00_chip = &m41t00_chip_info_tbl[i]; - m41t00_chip->sqw_freq = pdata->sqw_freq; - return 0; - } - } - return -ENODEV; -} - -static int __exit -m41t00_platform_remove(struct platform_device *pdev) -{ - return 0; -} - -static struct platform_driver m41t00_platform_driver = { - .probe = m41t00_platform_probe, - .remove = m41t00_platform_remove, - .driver = { - .owner = THIS_MODULE, - .name = M41T00_DRV_NAME, - }, -}; /* ***************************************************************************** @@ -286,71 +176,23 @@ m41t00_probe(struct i2c_adapter *adap, int addr, int kind) struct i2c_client *client; int rc; - if (!i2c_check_functionality(adap, I2C_FUNC_I2C - | I2C_FUNC_SMBUS_BYTE_DATA)) - return 0; - client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (!client) return -ENOMEM; - strlcpy(client->name, m41t00_chip->name, I2C_NAME_SIZE); + strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE); client->addr = addr; client->adapter = adap; client->driver = &m41t00_driver; - if ((rc = i2c_attach_client(client))) - goto attach_err; - - if (m41t00_chip->type != M41T00_TYPE_M41T00) { - /* If asked, disable SQW, set SQW frequency & re-enable */ - if (m41t00_chip->sqw_freq) - if (((rc = i2c_smbus_read_byte_data(client, - m41t00_chip->alarm_mon)) < 0) - || ((rc = i2c_smbus_write_byte_data(client, - m41t00_chip->alarm_mon, rc & ~0x40)) <0) - || ((rc = i2c_smbus_write_byte_data(client, - m41t00_chip->sqw, - m41t00_chip->sqw_freq)) < 0) - || ((rc = i2c_smbus_write_byte_data(client, - m41t00_chip->alarm_mon, rc | 0x40)) <0)) - goto sqw_err; - - /* Make sure HT (Halt Update) bit is cleared */ - if ((rc = i2c_smbus_read_byte_data(client, - m41t00_chip->alarm_hour)) < 0) - goto ht_err; - - if (rc & 0x40) - if ((rc = i2c_smbus_write_byte_data(client, - m41t00_chip->alarm_hour, rc & ~0x40))<0) - goto ht_err; + if ((rc = i2c_attach_client(client)) != 0) { + kfree(client); + return rc; } - /* Make sure ST (stop) bit is cleared */ - if ((rc = i2c_smbus_read_byte_data(client, m41t00_chip->sec)) < 0) - goto st_err; - - if (rc & 0x80) - if ((rc = i2c_smbus_write_byte_data(client, m41t00_chip->sec, - rc & ~0x80)) < 0) - goto st_err; - - m41t00_wq = create_singlethread_workqueue(m41t00_chip->name); + m41t00_wq = create_singlethread_workqueue("m41t00"); save_client = client; return 0; - -st_err: - dev_err(&client->dev, "m41t00_probe: Can't clear ST bit\n"); - goto attach_err; -ht_err: - dev_err(&client->dev, "m41t00_probe: Can't clear HT bit\n"); - goto attach_err; -sqw_err: - dev_err(&client->dev, "m41t00_probe: Can't set SQW Frequency\n"); -attach_err: - kfree(client); - return rc; } static int @@ -362,7 +204,7 @@ m41t00_attach(struct i2c_adapter *adap) static int m41t00_detach(struct i2c_client *client) { - int rc; + int rc; if ((rc = i2c_detach_client(client)) == 0) { kfree(client); @@ -383,18 +225,14 @@ static struct i2c_driver m41t00_driver = { static int __init m41t00_init(void) { - int rc; - - if (!(rc = platform_driver_register(&m41t00_platform_driver))) - rc = i2c_add_driver(&m41t00_driver); - return rc; + return i2c_add_driver(&m41t00_driver); } static void __exit m41t00_exit(void) { i2c_del_driver(&m41t00_driver); - platform_driver_unregister(&m41t00_platform_driver); + return; } module_init(m41t00_init); diff --git a/drivers/i2c/chips/pca9539.c b/drivers/i2c/chips/pca9539.c index cb22280cd..54b6e6a4b 100644 --- a/drivers/i2c/chips/pca9539.c +++ b/drivers/i2c/chips/pca9539.c @@ -134,13 +134,11 @@ static int pca9539_detect(struct i2c_adapter *adapter, int address, int kind) new_client->driver = &pca9539_driver; new_client->flags = 0; - if (kind < 0) { - /* Detection: the pca9539 only has 8 registers (0-7). - A read of 7 should succeed, but a read of 8 should fail. */ - if ((i2c_smbus_read_byte_data(new_client, 7) < 0) || - (i2c_smbus_read_byte_data(new_client, 8) >= 0)) - goto exit_kfree; - } + /* Detection: the pca9539 only has 8 registers (0-7). + A read of 7 should succeed, but a read of 8 should fail. */ + if ((i2c_smbus_read_byte_data(new_client, 7) < 0) || + (i2c_smbus_read_byte_data(new_client, 8) >= 0)) + goto exit_kfree; strlcpy(new_client->name, "pca9539", I2C_NAME_SIZE); diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index 6a7578217..179b1e022 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c @@ -19,6 +19,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -43,12 +44,13 @@ /*-------------------------------------------------------------------------*/ #define DRIVER_VERSION "2 May 2005" -#define DRIVER_NAME (tps65010_driver.driver.name) +#define DRIVER_NAME (tps65010_driver.name) MODULE_DESCRIPTION("TPS6501x Power Management Driver"); MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x48, /* 0x49, */ I2C_CLIENT_END }; +static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -99,7 +101,7 @@ struct tps65010 { /* not currently tracking GPIO state */ }; -#define POWER_POLL_DELAY msecs_to_jiffies(5000) +#define POWER_POLL_DELAY msecs_to_jiffies(800) /*-------------------------------------------------------------------------*/ @@ -305,7 +307,7 @@ static int dbg_show(struct seq_file *s, void *_) static int dbg_tps_open(struct inode *inode, struct file *file) { - return single_open(file, dbg_show, inode->i_private); + return single_open(file, dbg_show, inode->u.generic_ip); } static struct file_operations debug_fops = { @@ -519,18 +521,15 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind) goto fail1; } - /* the IRQ is active low, but many gpio lines can't support that - * so this driver can use falling-edge triggers instead. - */ - irqflags = IRQF_SAMPLE_RANDOM; #ifdef CONFIG_ARM + irqflags = SA_SAMPLE_RANDOM | SA_TRIGGER_LOW; if (machine_is_omap_h2()) { tps->model = TPS65010; omap_cfg_reg(W4_GPIO58); tps->irq = OMAP_GPIO_IRQ(58); omap_request_gpio(58); omap_set_gpio_direction(58, 1); - irqflags |= IRQF_TRIGGER_FALLING; + irqflags |= SA_TRIGGER_FALLING; } if (machine_is_omap_osk()) { tps->model = TPS65010; @@ -538,13 +537,15 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind) tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)); omap_request_gpio(OMAP_MPUIO(1)); omap_set_gpio_direction(OMAP_MPUIO(1), 1); - irqflags |= IRQF_TRIGGER_FALLING; + irqflags |= SA_TRIGGER_FALLING; } if (machine_is_omap_h3()) { tps->model = TPS65013; // FIXME set up this board's IRQ ... } +#else + irqflags = SA_SAMPLE_RANDOM; #endif if (tps->irq > 0) { diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 9cb277d6a..2e79137dc 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -916,7 +916,7 @@ s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value) } s32 i2c_smbus_write_block_data(struct i2c_client *client, u8 command, - u8 length, const u8 *values) + u8 length, u8 *values) { union i2c_smbus_data data; @@ -944,7 +944,7 @@ s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *val } s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, u8 command, - u8 length, const u8 *values) + u8 length, u8 *values) { union i2c_smbus_data data; diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 58ccddd5c..ed7eed388 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -426,7 +426,10 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap) /* register this i2c device with the driver core */ i2c_dev->adap = adap; - dev = &adap->dev; + if (adap->dev.parent == &platform_bus) + dev = &adap->dev; + else + dev = adap->dev.parent; i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL, MKDEV(I2C_MAJOR, i2c_dev->minor), dev, "i2c-%d", i2c_dev->minor); diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index b6fb167e2..d633081fa 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -682,7 +682,6 @@ config BLK_DEV_SVWKS config BLK_DEV_SGIIOC4 tristate "Silicon Graphics IOC4 chipset ATA/ATAPI support" depends on (IA64_SGI_SN2 || IA64_GENERIC) && SGI_IOC4 - select IDEPCI_SHARE_IRQ help This driver adds PIO & MultiMode DMA-2 support for the SGI IOC4 chipset, which has one channel and can support two devices. @@ -774,6 +773,13 @@ config BLK_DEV_IDEDMA_PMAC to transfer data to and from memory. Saying Y is safe and improves performance. +config BLK_DEV_IDE_PMAC_BLINK + bool "Blink laptop LED on drive activity" + depends on BLK_DEV_IDE_PMAC && ADB_PMU + help + This option enables the use of the sleep LED as a hard drive + activity LED. + config BLK_DEV_IDE_SWARM tristate "IDE for Sibyte evaluation boards" depends on SIBYTE_SB1xxx_SOC diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 8a1c27f28..308897e57 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c @@ -6,6 +6,7 @@ * Please note that this platform does not support 32-bit IDE IO. */ +#include #include #include #include diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 5797e0b5a..cd15e6260 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c @@ -19,6 +19,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ +#include #include #include #include diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index 15955996a..fb91cb8bf 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 654d4cd09..b4a41d6d0 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -301,6 +301,7 @@ #define IDECD_VERSION "4.61" +#include #include #include #include @@ -394,8 +395,7 @@ static int cdrom_log_sense(ide_drive_t *drive, struct request *rq, * we cannot reliably check if drive can auto-close */ if (rq->cmd[0] == GPCMD_START_STOP_UNIT && sense->asc == 0x24) - break; - log = 1; + log = 0; break; case UNIT_ATTENTION: /* @@ -417,11 +417,6 @@ void cdrom_analyze_sense_data(ide_drive_t *drive, struct request *failed_command, struct request_sense *sense) { - unsigned long sector; - unsigned long bio_sectors; - unsigned long valid; - struct cdrom_info *info = drive->driver_data; - if (!cdrom_log_sense(drive, failed_command, sense)) return; @@ -434,37 +429,6 @@ void cdrom_analyze_sense_data(ide_drive_t *drive, if (sense->sense_key == 0x05 && sense->asc == 0x24) return; - if (sense->error_code == 0x70) { /* Current Error */ - switch(sense->sense_key) { - case MEDIUM_ERROR: - case VOLUME_OVERFLOW: - case ILLEGAL_REQUEST: - if (!sense->valid) - break; - if (failed_command == NULL || - !blk_fs_request(failed_command)) - break; - sector = (sense->information[0] << 24) | - (sense->information[1] << 16) | - (sense->information[2] << 8) | - (sense->information[3]); - - bio_sectors = bio_sectors(failed_command->bio); - if (bio_sectors < 4) - bio_sectors = 4; - if (drive->queue->hardsect_size == 2048) - sector <<= 2; /* Device sector size is 2K */ - sector &= ~(bio_sectors -1); - valid = (sector - failed_command->sector) << 9; - - if (valid < 0) - valid = 0; - if (sector < get_capacity(info->disk) && - drive->probed_capacity - sector < 4 * 75) { - set_capacity(info->disk, sector); - } - } - } #if VERBOSE_IDE_CD_ERRORS { int i; @@ -645,23 +609,17 @@ static void cdrom_end_request (ide_drive_t *drive, int uptodate) sense = failed->sense; failed->sense_len = rq->sense_len; } - cdrom_analyze_sense_data(drive, failed, sense); + /* * now end failed request */ - if (blk_fs_request(failed)) { - if (ide_end_dequeued_request(drive, failed, 0, - failed->hard_nr_sectors)) - BUG(); - } else { - spin_lock_irqsave(&ide_lock, flags); - end_that_request_chunk(failed, 0, - failed->data_len); - end_that_request_last(failed, 0); - spin_unlock_irqrestore(&ide_lock, flags); - } - } else - cdrom_analyze_sense_data(drive, NULL, sense); + spin_lock_irqsave(&ide_lock, flags); + end_that_request_chunk(failed, 0, failed->data_len); + end_that_request_last(failed, 0); + spin_unlock_irqrestore(&ide_lock, flags); + } + + cdrom_analyze_sense_data(drive, failed, sense); } if (!rq->current_nr_sectors && blk_fs_request(rq)) @@ -675,13 +633,6 @@ static void cdrom_end_request (ide_drive_t *drive, int uptodate) ide_end_request(drive, uptodate, nsectors); } -static void ide_dump_status_no_sense(ide_drive_t *drive, const char *msg, u8 stat) -{ - if (stat & 0x80) - return; - ide_dump_status(drive, msg, stat); -} - /* Returns 0 if the request should be continued. Returns 1 if the request was ended. */ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) @@ -810,16 +761,16 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) sense_key == DATA_PROTECT) { /* No point in retrying after an illegal request or data protect error.*/ - ide_dump_status_no_sense (drive, "command error", stat); + ide_dump_status (drive, "command error", stat); do_end_request = 1; } else if (sense_key == MEDIUM_ERROR) { /* No point in re-trying a zillion times on a bad * sector... If we got here the error is not correctable */ - ide_dump_status_no_sense (drive, "media error (bad sector)", stat); + ide_dump_status (drive, "media error (bad sector)", stat); do_end_request = 1; } else if (sense_key == BLANK_CHECK) { /* Disk appears blank ?? */ - ide_dump_status_no_sense (drive, "media error (blank)", stat); + ide_dump_status (drive, "media error (blank)", stat); do_end_request = 1; } else if ((err & ~ABRT_ERR) != 0) { /* Go to the default handler @@ -831,27 +782,13 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) do_end_request = 1; } - /* End a request through request sense analysis when we have - sense data. We need this in order to perform end of media - processing */ - - if (do_end_request) { - if (stat & ERR_STAT) { - unsigned long flags; - spin_lock_irqsave(&ide_lock, flags); - blkdev_dequeue_request(rq); - HWGROUP(drive)->rq = NULL; - spin_unlock_irqrestore(&ide_lock, flags); - - cdrom_queue_request_sense(drive, rq->sense, rq); - } else - cdrom_end_request(drive, 0); - } else { - /* If we got a CHECK_CONDITION status, - queue a request sense command. */ - if (stat & ERR_STAT) - cdrom_queue_request_sense(drive, NULL, NULL); - } + if (do_end_request) + cdrom_end_request(drive, 0); + + /* If we got a CHECK_CONDITION status, + queue a request sense command. */ + if ((stat & ERR_STAT) != 0) + cdrom_queue_request_sense(drive, NULL, NULL); } else { blk_dump_rq_flags(rq, "ide-cd: bad rq"); cdrom_end_request(drive, 0); @@ -1514,12 +1451,9 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive) } else { confused: printk (KERN_ERR "%s: cdrom_pc_intr: The drive " - "appears confused (ireason = 0x%02x). " - "Trying to recover by ending request.\n", + "appears confused (ireason = 0x%02x)\n", drive->name, ireason); rq->flags |= REQ_FAILED; - cdrom_end_request(drive, 0); - return ide_stopped; } /* Now we wait for another interrupt. */ @@ -1554,7 +1488,8 @@ static ide_startstop_t cdrom_do_packet_command (ide_drive_t *drive) } -static int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq) +static +int cdrom_queue_packet_command(ide_drive_t *drive, struct request *rq) { struct request_sense sense; int retries = 10; @@ -1787,7 +1722,8 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) } } - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, cdrom_newpc_intr, rq->timeout, NULL); return ide_started; @@ -2282,9 +2218,6 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense) toc->capacity = 0x1fffff; set_capacity(info->disk, toc->capacity * sectors_per_frame); - /* Save a private copy of te TOC capacity for error handling */ - drive->probed_capacity = toc->capacity * sectors_per_frame; - blk_queue_hardsect_size(drive->queue, sectors_per_frame << SECTOR_BITS); @@ -2407,7 +2340,6 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense) if (!stat && (last_written > toc->capacity)) { toc->capacity = last_written; set_capacity(info->disk, toc->capacity * sectors_per_frame); - drive->probed_capacity = toc->capacity * sectors_per_frame; } /* Remember that we've read this stuff. */ @@ -2764,11 +2696,14 @@ int ide_cdrom_drive_status (struct cdrom_device_info *cdi, int slot_nr) * any other way to detect this... */ if (sense.sense_key == NOT_READY) { - if (sense.asc == 0x3a && sense.ascq == 1) - return CDS_NO_DISC; - else - return CDS_TRAY_OPEN; + if (sense.asc == 0x3a) { + if (sense.ascq == 1) + return CDS_NO_DISC; + else if (sense.ascq == 0 || sense.ascq == 2) + return CDS_TRAY_OPEN; + } } + return CDS_DRIVE_NOT_READY; } @@ -3526,6 +3461,8 @@ static int ide_cd_probe(ide_drive_t *drive) drive->driver_data = info; g->minors = 1; + snprintf(g->devfs_name, sizeof(g->devfs_name), + "%s/cd", drive->devfs_name); g->driverfs_dev = &drive->gendev; g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE; if (ide_cdrom_setup(drive)) { diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 7cf3eb023..a5017de72 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -37,7 +37,7 @@ * Version 1.15 convert all calls to ide_raw_taskfile * since args will return register content. * Version 1.16 added suspend-resume-checkpower - * Version 1.17 do flush on standby, do flush on ATA < ATA6 + * Version 1.17 do flush on standy, do flush on ATA < ATA6 * fix wcache setup. */ @@ -47,6 +47,7 @@ //#define DEBUG +#include #include #include #include @@ -776,7 +777,7 @@ static void update_ordered(ide_drive_t *drive) * not available so we don't need to recheck that. */ capacity = idedisk_capacity(drive); - barrier = ide_id_has_flush_cache(id) && !drive->noflush && + barrier = ide_id_has_flush_cache(id) && (drive->addressing == 0 || capacity <= (1ULL << 28) || ide_id_has_flush_cache_ext(id)); @@ -1017,6 +1018,7 @@ static void ide_disk_release(struct kref *kref) struct gendisk *g = idkp->disk; drive->driver_data = NULL; + drive->devfs_name[0] = '\0'; g->private_data = NULL; put_disk(g); kfree(idkp); @@ -1220,6 +1222,7 @@ static int ide_disk_probe(ide_drive_t *drive) drive->attach = 1; g->minors = 1 << PARTN_BITS; + strcpy(g->devfs_name, drive->devfs_name); g->driverfs_dev = &drive->gendev; g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; set_capacity(g, idedisk_capacity(drive)); diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 7c3a13e1c..c481be8b8 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -74,6 +74,7 @@ * */ +#include #include #include #include @@ -205,7 +206,8 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq) ide_hwif_t *hwif = HWIF(drive); struct scatterlist *sg = hwif->sg_table; - BUG_ON((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256); + if ((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256) + BUG(); ide_map_sg(drive, rq); @@ -750,7 +752,7 @@ void ide_dma_verbose(ide_drive_t *drive) goto bug_dma_off; printk(", DMA"); } else if (id->field_valid & 1) { - goto bug_dma_off; + printk(", BUG"); } return; bug_dma_off: @@ -945,7 +947,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p } printk("\n"); - BUG_ON(!hwif->dma_master); + if (!(hwif->dma_master)) + BUG(); } EXPORT_SYMBOL_GPL(ide_setup_dma); diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index adbe9f76a..a53e3ce4a 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -82,6 +82,7 @@ #define IDEFLOPPY_VERSION "0.99.newide" +#include #include #include #include @@ -838,7 +839,7 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) "transferred\n", pc->actually_transferred); clear_bit(PC_DMA_IN_PROGRESS, &pc->flags); - local_irq_enable_in_hardirq(); + local_irq_enable(); if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { /* Error detected */ @@ -897,7 +898,8 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) "to send us more data than expected " "- discarding data\n"); idefloppy_discard_data(drive,bcount.all); - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, @@ -930,7 +932,8 @@ static ide_startstop_t idefloppy_pc_intr (ide_drive_t *drive) pc->actually_transferred += bcount.all; pc->current_position += bcount.all; - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* And set the interrupt handler again */ return ide_started; } @@ -957,7 +960,8 @@ static ide_startstop_t idefloppy_transfer_pc (ide_drive_t *drive) "issuing a packet command\n"); return ide_do_reset(drive); } - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); /* Set the interrupt routine */ ide_set_handler(drive, &idefloppy_pc_intr, IDEFLOPPY_WAIT_CMD, NULL); /* Send the actual packet */ @@ -1013,7 +1017,8 @@ static ide_startstop_t idefloppy_transfer_pc1 (ide_drive_t *drive) * 40 and 50msec work well. idefloppy_pc_intr will not be actually * used until after the packet is moved in about 50 msec. */ - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &idefloppy_pc_intr, /* service routine for packet command */ floppy->ticks, /* wait this long before "failing" */ @@ -1283,7 +1288,7 @@ static ide_startstop_t idefloppy_do_request (ide_drive_t *drive, struct request debug_log(KERN_INFO "rq_status: %d, dev: %s, flags: %lx, errors: %d\n", rq->rq_status, - rq->rq_disk ? rq->rq_disk->disk_name : "?", + rq->rq_disk ? rq->rq_disk->disk_name ? "?", rq->flags, rq->errors); debug_log(KERN_INFO "sector: %ld, nr_sectors: %ld, " "current_nr_sectors: %d\n", (long)rq->sector, @@ -2175,6 +2180,7 @@ static int ide_floppy_probe(ide_drive_t *drive) g->minors = 1 << PARTN_BITS; g->driverfs_dev = &drive->gendev; + strcpy(g->devfs_name, drive->devfs_name); g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; g->fops = &idefloppy_ops; drive->attach = 1; diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index fb6795236..574855456 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -24,6 +24,7 @@ */ +#include #include #include #include @@ -141,41 +142,38 @@ enum { static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error) { - struct request_pm_state *pm = rq->end_io_data; - if (drive->media != ide_disk) return; - switch (pm->pm_step) { + switch (rq->pm->pm_step) { case ide_pm_flush_cache: /* Suspend step 1 (flush cache) complete */ - if (pm->pm_state == PM_EVENT_FREEZE) - pm->pm_step = ide_pm_state_completed; + if (rq->pm->pm_state == PM_EVENT_FREEZE) + rq->pm->pm_step = ide_pm_state_completed; else - pm->pm_step = idedisk_pm_standby; + rq->pm->pm_step = idedisk_pm_standby; break; case idedisk_pm_standby: /* Suspend step 2 (standby) complete */ - pm->pm_step = ide_pm_state_completed; + rq->pm->pm_step = ide_pm_state_completed; break; case idedisk_pm_idle: /* Resume step 1 (idle) complete */ - pm->pm_step = ide_pm_restore_dma; + rq->pm->pm_step = ide_pm_restore_dma; break; } } static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) { - struct request_pm_state *pm = rq->end_io_data; ide_task_t *args = rq->special; memset(args, 0, sizeof(*args)); if (drive->media != ide_disk) { /* skip idedisk_pm_idle for ATAPI devices */ - if (pm->pm_step == idedisk_pm_idle) - pm->pm_step = ide_pm_restore_dma; + if (rq->pm->pm_step == idedisk_pm_idle) + rq->pm->pm_step = ide_pm_restore_dma; } - switch (pm->pm_step) { + switch (rq->pm->pm_step) { case ide_pm_flush_cache: /* Suspend step 1 (flush cache) */ if (drive->media != ide_disk) break; @@ -217,67 +215,10 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * drive->hwif->ide_dma_check(drive); break; } - pm->pm_step = ide_pm_state_completed; + rq->pm->pm_step = ide_pm_state_completed; return ide_stopped; } -/** - * ide_end_dequeued_request - complete an IDE I/O - * @drive: IDE device for the I/O - * @uptodate: - * @nr_sectors: number of sectors completed - * - * Complete an I/O that is no longer on the request queue. This - * typically occurs when we pull the request and issue a REQUEST_SENSE. - * We must still finish the old request but we must not tamper with the - * queue in the meantime. - * - * NOTE: This path does not handle barrier, but barrier is not supported - * on ide-cd anyway. - */ - -int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, - int uptodate, int nr_sectors) -{ - unsigned long flags; - int ret = 1; - - spin_lock_irqsave(&ide_lock, flags); - - BUG_ON(!(rq->flags & REQ_STARTED)); - - /* - * if failfast is set on a request, override number of sectors and - * complete the whole request right now - */ - if (blk_noretry_request(rq) && end_io_error(uptodate)) - nr_sectors = rq->hard_nr_sectors; - - if (!blk_fs_request(rq) && end_io_error(uptodate) && !rq->errors) - rq->errors = -EIO; - - /* - * decide whether to reenable DMA -- 3 is a random magic for now, - * if we DMA timeout more than 3 times, just stay in PIO - */ - if (drive->state == DMA_PIO_RETRY && drive->retry_pio <= 3) { - drive->state = 0; - HWGROUP(drive)->hwif->ide_dma_on(drive); - } - - if (!end_that_request_first(rq, uptodate, nr_sectors)) { - add_disk_randomness(rq->rq_disk); - if (blk_rq_tagged(rq)) - blk_queue_end_tag(drive->queue, rq); - end_that_request_last(rq, uptodate); - ret = 0; - } - spin_unlock_irqrestore(&ide_lock, flags); - return ret; -} -EXPORT_SYMBOL_GPL(ide_end_dequeued_request); - - /** * ide_complete_pm_request - end the current Power Management request * @drive: target drive @@ -421,13 +362,12 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) } } } else if (blk_pm_request(rq)) { - struct request_pm_state *pm = rq->end_io_data; #ifdef DEBUG_PM printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n", drive->name, rq->pm->pm_step, stat, err); #endif ide_complete_power_step(drive, rq, stat, err); - if (pm->pm_step == ide_pm_state_completed) + if (rq->pm->pm_step == ide_pm_state_completed) ide_complete_pm_request(drive, rq); return; } @@ -504,7 +444,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8 } } - if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ && hwif->err_stops_fifo == 0) + if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ) try_to_flush_leftover_data(drive); if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) @@ -693,7 +633,7 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) u8 stat = hwif->INB(IDE_STATUS_REG); int retries = 10; - local_irq_enable_in_hardirq(); + local_irq_enable(); if ((stat & DRQ_STAT) && args && args[3]) { u8 io_32bit = drive->io_32bit; drive->io_32bit = 0; @@ -931,39 +871,6 @@ done: return ide_stopped; } -static void ide_check_pm_state(ide_drive_t *drive, struct request *rq) -{ - struct request_pm_state *pm = rq->end_io_data; - - if (blk_pm_suspend_request(rq) && - pm->pm_step == ide_pm_state_start_suspend) - /* Mark drive blocked when starting the suspend sequence. */ - drive->blocked = 1; - else if (blk_pm_resume_request(rq) && - pm->pm_step == ide_pm_state_start_resume) { - /* - * The first thing we do on wakeup is to wait for BSY bit to - * go away (with a looong timeout) as a drive on this hwif may - * just be POSTing itself. - * We do that before even selecting as the "other" device on - * the bus may be broken enough to walk on our toes at this - * point. - */ - int rc; -#ifdef DEBUG_PM - printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); -#endif - rc = ide_wait_not_busy(HWIF(drive), 35000); - if (rc) - printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); - SELECT_DRIVE(drive); - HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); - rc = ide_wait_not_busy(HWIF(drive), 100000); - if (rc) - printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); - } -} - /** * start_request - start of I/O and command issuing for IDE * @@ -1002,8 +909,33 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) if (block == 0 && drive->remap_0_to_1 == 1) block = 1; /* redirect MBR access to EZ-Drive partn table */ - if (blk_pm_request(rq)) - ide_check_pm_state(drive, rq); + if (blk_pm_suspend_request(rq) && + rq->pm->pm_step == ide_pm_state_start_suspend) + /* Mark drive blocked when starting the suspend sequence. */ + drive->blocked = 1; + else if (blk_pm_resume_request(rq) && + rq->pm->pm_step == ide_pm_state_start_resume) { + /* + * The first thing we do on wakeup is to wait for BSY bit to + * go away (with a looong timeout) as a drive on this hwif may + * just be POSTing itself. + * We do that before even selecting as the "other" device on + * the bus may be broken enough to walk on our toes at this + * point. + */ + int rc; +#ifdef DEBUG_PM + printk("%s: Wakeup request inited, waiting for !BSY...\n", drive->name); +#endif + rc = ide_wait_not_busy(HWIF(drive), 35000); + if (rc) + printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); + SELECT_DRIVE(drive); + HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); + rc = ide_wait_not_busy(HWIF(drive), 100000); + if (rc) + printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); + } SELECT_DRIVE(drive); if (ide_wait_stat(&startstop, drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) { @@ -1018,14 +950,13 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) else if (rq->flags & REQ_DRIVE_TASKFILE) return execute_drive_cmd(drive, rq); else if (blk_pm_request(rq)) { - struct request_pm_state *pm = rq->end_io_data; #ifdef DEBUG_PM printk("%s: start_power_step(step: %d)\n", drive->name, rq->pm->pm_step); #endif startstop = ide_start_power_step(drive, rq); if (startstop == ide_stopped && - pm->pm_step == ide_pm_state_completed) + rq->pm->pm_step == ide_pm_state_completed) ide_complete_pm_request(drive, rq); return startstop; } @@ -1286,7 +1217,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) if (masked_irq != IDE_NO_IRQ && hwif->irq != masked_irq) disable_irq_nosync(hwif->irq); spin_unlock(&ide_lock); - local_irq_enable_in_hardirq(); + local_irq_enable(); /* allow other IRQs while we start this request */ startstop = start_request(drive, rq); spin_lock_irq(&ide_lock); @@ -1631,7 +1562,7 @@ irqreturn_t ide_intr (int irq, void *dev_id, struct pt_regs *regs) spin_unlock(&ide_lock); if (drive->unmask) - local_irq_enable_in_hardirq(); + local_irq_enable(); /* service this interrupt, may set handler for next interrupt */ startstop = handler(drive); spin_lock_irq(&ide_lock); @@ -1664,7 +1595,7 @@ irqreturn_t ide_intr (int irq, void *dev_id, struct pt_regs *regs) * Initialize a request before we fill it in and send it down to * ide_do_drive_cmd. Commands must be set up by this function. Right * now it doesn't do a lot, but if that changes abusers will have a - * nasty surprise. + * nasty suprise. */ void ide_init_drive_cmd (struct request *rq) @@ -1705,7 +1636,7 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio { unsigned long flags; ide_hwgroup_t *hwgroup = HWGROUP(drive); - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); int where = ELEVATOR_INSERT_BACK, err; int must_wait = (action == ide_wait || action == ide_head_wait); diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 77703acae..b72dde708 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include @@ -597,10 +597,6 @@ u8 eighty_ninty_three (ide_drive_t *drive) { if(HWIF(drive)->udma_four == 0) return 0; - - /* Check for SATA but only if we are ATA5 or higher */ - if (drive->id->hw_config == 0 && (drive->id->major_rev_num & 0x7FE0)) - return 1; if (!(drive->id->hw_config & 0x6000)) return 0; #ifndef CONFIG_IDEDMA_IVB @@ -943,7 +939,8 @@ void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *ha spin_lock_irqsave(&ide_lock, flags); - BUG_ON(hwgroup->handler); + if(hwgroup->handler) + BUG(); hwgroup->handler = handler; hwgroup->expiry = expiry; hwgroup->timer.expires = jiffies + timeout; @@ -984,7 +981,8 @@ static ide_startstop_t atapi_reset_pollfunc (ide_drive_t *drive) printk("%s: ATAPI reset complete\n", drive->name); } else { if (time_before(jiffies, hwgroup->poll_timeout)) { - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL); /* continue polling */ return ide_started; @@ -1023,7 +1021,8 @@ static ide_startstop_t reset_pollfunc (ide_drive_t *drive) if (!OK_STAT(tmp = hwif->INB(IDE_STATUS_REG), 0, BUSY_STAT)) { if (time_before(jiffies, hwgroup->poll_timeout)) { - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &reset_pollfunc, HZ/20, NULL); /* continue polling */ return ide_started; @@ -1139,7 +1138,8 @@ static ide_startstop_t do_reset1 (ide_drive_t *drive, int do_not_try_atapi) hwgroup = HWGROUP(drive); /* We must not reset with running handlers */ - BUG_ON(hwgroup->handler != NULL); + if(hwgroup->handler != NULL) + BUG(); /* For an ATAPI device, first try an ATAPI SRST. */ if (drive->media != ide_disk && !do_not_try_atapi) { @@ -1244,7 +1244,6 @@ int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout) if (stat == 0xff) return -ENODEV; touch_softlockup_watchdog(); - touch_nmi_watchdog(); } return -EBUSY; } diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index c1fd20cde..b09a6537c 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -163,7 +164,8 @@ u8 ide_rate_filter (u8 mode, u8 speed) // printk("%s: mode 0x%02x, speed 0x%02x\n", __FUNCTION__, mode, speed); /* So that we remember to update this if new modes appear */ - BUG_ON(mode > 4); + if (mode > 4) + BUG(); return min(speed, speed_max[mode]); #else /* !CONFIG_BLK_DEV_IDEDMA */ return min(speed, (u8)XFER_PIO_4); @@ -484,7 +486,7 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) unsigned long flags; u8 err = 0; - local_irq_save(flags); + local_irq_set(flags); printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); if (stat & BUSY_STAT) printk("Busy "); @@ -566,7 +568,7 @@ static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat) status.all = stat; error.all = 0; - local_irq_save(flags); + local_irq_set(flags); printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); if (status.b.bsy) printk("Busy "); diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 9cadf0106..1b7b4c531 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -33,6 +33,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ +#include #include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -1004,7 +1006,7 @@ static int ide_init_queue(ide_drive_t *drive) * and irq serialization situations. This is somewhat complex because * it handles static as well as dynamic (PCMCIA) IDE interfaces. * - * The IRQF_DISABLED in sa_flags means ide_intr() is always entered with + * The SA_INTERRUPT in sa_flags means ide_intr() is always entered with * interrupts completely disabled. This can be bad for interrupt latency, * but anything else has led to problems on some machines. We re-enable * interrupts as much as we can safely do in most places. @@ -1090,15 +1092,15 @@ static int init_irq (ide_hwif_t *hwif) * Allocate the irq, if not already obtained for another hwif */ if (!match || match->irq != hwif->irq) { - int sa = IRQF_DISABLED; + int sa = SA_INTERRUPT; #if defined(__mc68000__) || defined(CONFIG_APUS) - sa = IRQF_SHARED; + sa = SA_SHIRQ; #endif /* __mc68000__ || CONFIG_APUS */ if (IDE_CHIPSET_IS_PCI(hwif->chipset)) { - sa = IRQF_SHARED; + sa = SA_SHIRQ; #ifndef CONFIG_IDEPCI_SHARE_IRQ - sa |= IRQF_DISABLED; + sa |= SA_INTERRUPT; #endif /* CONFIG_IDEPCI_SHARE_IRQ */ } @@ -1136,11 +1138,16 @@ static int init_irq (ide_hwif_t *hwif) spin_unlock_irq(&ide_lock); } -#if !defined(__mc68000__) && !defined(CONFIG_APUS) +#if !defined(__mc68000__) && !defined(CONFIG_APUS) && !defined(__sparc__) printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name, hwif->io_ports[IDE_DATA_OFFSET], hwif->io_ports[IDE_DATA_OFFSET]+7, hwif->io_ports[IDE_CONTROL_OFFSET], hwif->irq); +#elif defined(__sparc__) + printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %s", hwif->name, + hwif->io_ports[IDE_DATA_OFFSET], + hwif->io_ports[IDE_DATA_OFFSET]+7, + hwif->io_ports[IDE_CONTROL_OFFSET], __irq_itoa(hwif->irq)); #else printk("%s at 0x%08lx on irq %d", hwif->name, hwif->io_ports[IDE_DATA_OFFSET], hwif->irq); @@ -1277,6 +1284,10 @@ static void drive_release_dev (struct device *dev) ide_drive_t *drive = container_of(dev, ide_drive_t, gendev); spin_lock_irq(&ide_lock); + if (drive->devfs_name[0] != '\0') { + devfs_remove(drive->devfs_name); + drive->devfs_name[0] = '\0'; + } ide_remove_drive_from_hwgroup(drive); kfree(drive->id); drive->id = NULL; @@ -1310,6 +1321,12 @@ static void init_gendisk (ide_hwif_t *hwif) drive->gendev.bus = &ide_bus_type; drive->gendev.driver_data = drive; drive->gendev.release = drive_release_dev; + if (drive->present) { + sprintf(drive->devfs_name, "ide/host%d/bus%d/target%d/lun%d", + (hwif->channel && hwif->mate) ? + hwif->mate->index : hwif->index, + hwif->channel, unit, drive->lun); + } } blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS, THIS_MODULE, ata_probe, ata_lock, hwif); diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 41b74b13a..84665e2ba 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -22,6 +22,7 @@ * */ +#include #include #include @@ -376,8 +377,6 @@ static int proc_ide_read_media break; case ide_floppy:media = "floppy\n"; break; - case ide_optical:media = "optical\n"; - break; default: media = "UNKNOWN\n"; break; } diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 9cfc2d7ce..f04791a58 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -424,6 +424,7 @@ #define IDETAPE_VERSION "1.19" +#include #include #include #include @@ -434,6 +435,7 @@ #include #include #include +#include #include #include #include @@ -2644,23 +2646,21 @@ static idetape_stage_t *idetape_kmalloc_stage (idetape_tape_t *tape) return __idetape_kmalloc_stage(tape, 0, 0); } -static int idetape_copy_stage_from_user (idetape_tape_t *tape, idetape_stage_t *stage, const char __user *buf, int n) +static void idetape_copy_stage_from_user (idetape_tape_t *tape, idetape_stage_t *stage, const char __user *buf, int n) { struct idetape_bh *bh = tape->bh; int count; - int ret = 0; while (n) { #if IDETAPE_DEBUG_BUGS if (bh == NULL) { printk(KERN_ERR "ide-tape: bh == NULL in " "idetape_copy_stage_from_user\n"); - return 1; + return; } #endif /* IDETAPE_DEBUG_BUGS */ count = min((unsigned int)(bh->b_size - atomic_read(&bh->b_count)), (unsigned int)n); - if (copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count)) - ret = 1; + copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count); n -= count; atomic_add(count, &bh->b_count); buf += count; @@ -2671,26 +2671,23 @@ static int idetape_copy_stage_from_user (idetape_tape_t *tape, idetape_stage_t * } } tape->bh = bh; - return ret; } -static int idetape_copy_stage_to_user (idetape_tape_t *tape, char __user *buf, idetape_stage_t *stage, int n) +static void idetape_copy_stage_to_user (idetape_tape_t *tape, char __user *buf, idetape_stage_t *stage, int n) { struct idetape_bh *bh = tape->bh; int count; - int ret = 0; while (n) { #if IDETAPE_DEBUG_BUGS if (bh == NULL) { printk(KERN_ERR "ide-tape: bh == NULL in " "idetape_copy_stage_to_user\n"); - return 1; + return; } #endif /* IDETAPE_DEBUG_BUGS */ count = min(tape->b_count, n); - if (copy_to_user(buf, tape->b_data, count)) - ret = 1; + copy_to_user(buf, tape->b_data, count); n -= count; tape->b_data += count; tape->b_count -= count; @@ -2703,7 +2700,6 @@ static int idetape_copy_stage_to_user (idetape_tape_t *tape, char __user *buf, i } } } - return ret; } static void idetape_init_merge_stage (idetape_tape_t *tape) @@ -2764,7 +2760,7 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage) */ static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq) { - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); idetape_tape_t *tape = drive->driver_data; #if IDETAPE_DEBUG_BUGS @@ -3723,7 +3719,6 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf, struct ide_tape_obj *tape = ide_tape_f(file); ide_drive_t *drive = tape->drive; ssize_t bytes_read,temp, actually_read = 0, rc; - ssize_t ret = 0; #if IDETAPE_DEBUG_LOG if (tape->debug_level >= 3) @@ -3742,8 +3737,7 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf, return (0); if (tape->merge_stage_size) { actually_read = min((unsigned int)(tape->merge_stage_size), (unsigned int)count); - if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, actually_read)) - ret = -EFAULT; + idetape_copy_stage_to_user(tape, buf, tape->merge_stage, actually_read); buf += actually_read; tape->merge_stage_size -= actually_read; count -= actually_read; @@ -3752,8 +3746,7 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf, bytes_read = idetape_add_chrdev_read_request(drive, tape->capabilities.ctl); if (bytes_read <= 0) goto finish; - if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, bytes_read)) - ret = -EFAULT; + idetape_copy_stage_to_user(tape, buf, tape->merge_stage, bytes_read); buf += bytes_read; count -= bytes_read; actually_read += bytes_read; @@ -3763,8 +3756,7 @@ static ssize_t idetape_chrdev_read (struct file *file, char __user *buf, if (bytes_read <= 0) goto finish; temp = min((unsigned long)count, (unsigned long)bytes_read); - if (idetape_copy_stage_to_user(tape, buf, tape->merge_stage, temp)) - ret = -EFAULT; + idetape_copy_stage_to_user(tape, buf, tape->merge_stage, temp); actually_read += temp; tape->merge_stage_size = bytes_read-temp; } @@ -3777,8 +3769,7 @@ finish: idetape_space_over_filemarks(drive, MTFSF, 1); return 0; } - - return (ret) ? ret : actually_read; + return actually_read; } static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, @@ -3786,8 +3777,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, { struct ide_tape_obj *tape = ide_tape_f(file); ide_drive_t *drive = tape->drive; - ssize_t actually_written = 0; - ssize_t ret = 0; + ssize_t retval, actually_written = 0; /* The drive is write protected. */ if (tape->write_prot) @@ -3823,7 +3813,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, * some drives (Seagate STT3401A) will return an error. */ if (drive->dsc_overlap) { - ssize_t retval = idetape_queue_rw_tail(drive, REQ_IDETAPE_WRITE, 0, tape->merge_stage->bh); + 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; @@ -3844,14 +3834,12 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, } #endif /* IDETAPE_DEBUG_BUGS */ actually_written = min((unsigned int)(tape->stage_size - tape->merge_stage_size), (unsigned int)count); - if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, actually_written)) - ret = -EFAULT; + idetape_copy_stage_from_user(tape, tape->merge_stage, buf, actually_written); buf += actually_written; tape->merge_stage_size += actually_written; count -= actually_written; if (tape->merge_stage_size == tape->stage_size) { - ssize_t retval; tape->merge_stage_size = 0; retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl); if (retval <= 0) @@ -3859,9 +3847,7 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, } } while (count >= tape->stage_size) { - ssize_t retval; - if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, tape->stage_size)) - ret = -EFAULT; + idetape_copy_stage_from_user(tape, tape->merge_stage, buf, tape->stage_size); buf += tape->stage_size; count -= tape->stage_size; retval = idetape_add_chrdev_write_request(drive, tape->capabilities.ctl); @@ -3871,11 +3857,10 @@ static ssize_t idetape_chrdev_write (struct file *file, const char __user *buf, } if (count) { actually_written += count; - if (idetape_copy_stage_from_user(tape, tape->merge_stage, buf, count)) - ret = -EFAULT; + idetape_copy_stage_from_user(tape, tape->merge_stage, buf, count); tape->merge_stage_size += count; } - return (ret) ? ret : actually_written; + return (actually_written); } static int idetape_write_filemark (ide_drive_t *drive) @@ -4724,6 +4709,9 @@ static void ide_tape_release(struct kref *kref) MKDEV(IDETAPE_MAJOR, tape->minor)); class_device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor + 128)); + devfs_remove("%s/mt", drive->devfs_name); + devfs_remove("%s/mtn", drive->devfs_name); + devfs_unregister_tape(g->number); idetape_devs[tape->minor] = NULL; g->private_data = NULL; put_disk(g); @@ -4897,6 +4885,14 @@ static int ide_tape_probe(ide_drive_t *drive) class_device_create(idetape_sysfs_class, NULL, MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); + devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), + S_IFCHR | S_IRUGO | S_IWUGO, + "%s/mt", drive->devfs_name); + devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor + 128), + S_IFCHR | S_IRUGO | S_IWUGO, + "%s/mtn", drive->devfs_name); + + g->number = devfs_register_tape(drive->devfs_name); g->fops = &idetape_block_ops; ide_register_region(g); diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 97a924431..9233b8109 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -27,6 +27,7 @@ * request. */ +#include #include #include #include @@ -195,7 +196,8 @@ ide_startstop_t set_geometry_intr (ide_drive_t *drive) if (stat & (ERR_STAT|DRQ_STAT)) return ide_error(drive, "set_geometry_intr", stat); - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &set_geometry_intr, WAIT_WORSTCASE, NULL); return ide_started; } @@ -222,7 +224,7 @@ ide_startstop_t task_no_data_intr (ide_drive_t *drive) ide_hwif_t *hwif = HWIF(drive); u8 stat; - local_irq_enable_in_hardirq(); + local_irq_enable(); if (!OK_STAT(stat = hwif->INB(IDE_STATUS_REG),READY_STAT,BAD_STAT)) { return ide_error(drive, "task_no_data_intr", stat); /* calls ide_end_drive_cmd */ diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h index c0864b1e9..2fcfac6e9 100644 --- a/drivers/ide/ide-timing.h +++ b/drivers/ide/ide-timing.h @@ -219,12 +219,6 @@ static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing if (!(s = ide_timing_find_mode(speed))) return -EINVAL; -/* - * Copy the timing from the table. - */ - - *t = *s; - /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MWDMA cycle timing. @@ -253,7 +247,7 @@ static int ide_timing_compute(ide_drive_t *drive, short speed, struct ide_timing * Convert the timing to bus clock counts. */ - ide_timing_quantize(t, t, T, UT); + ide_timing_quantize(s, t, T, UT); /* * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index defd4b4bd..3fdab563f 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -130,6 +130,7 @@ #define _IDE_C /* Tell ide.h it's really us */ +#include #include #include #include @@ -146,6 +147,7 @@ #include #include #include +#include #include #include #include @@ -590,8 +592,13 @@ void ide_unregister(unsigned int index) goto abort; for (unit = 0; unit < MAX_DRIVES; ++unit) { drive = &hwif->drives[unit]; - if (!drive->present) + if (!drive->present) { + if (drive->devfs_name[0] != '\0') { + devfs_remove(drive->devfs_name); + drive->devfs_name[0] = '\0'; + } continue; + } spin_unlock_irq(&ide_lock); device_unregister(&drive->gendev); wait_for_completion(&drive->gendev_rel_comp); @@ -719,7 +726,6 @@ void ide_setup_ports ( hw_regs_t *hw, { int i; - memset(hw, 0, sizeof(hw_regs_t)); for (i = 0; i < IDE_NR_PORTS; i++) { if (offsets[i] == -1) { switch(i) { @@ -1219,7 +1225,7 @@ static int generic_ide_suspend(struct device *dev, pm_message_t state) memset(&args, 0, sizeof(args)); rq.flags = REQ_PM_SUSPEND; rq.special = &args; - rq.end_io_data = &rqpm; + rq.pm = &rqpm; rqpm.pm_step = ide_pm_state_start_suspend; rqpm.pm_state = state.event; @@ -1238,7 +1244,7 @@ static int generic_ide_resume(struct device *dev) memset(&args, 0, sizeof(args)); rq.flags = REQ_PM_RESUME; rq.special = &args; - rq.end_io_data = &rqpm; + rq.pm = &rqpm; rqpm.pm_step = ide_pm_state_start_resume; rqpm.pm_state = PM_EVENT_ON; @@ -1360,7 +1366,8 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device ide_abort(drive, "drive reset"); - BUG_ON(HWGROUP(drive)->handler); + if(HWGROUP(drive)->handler) + BUG(); /* Ensure nothing gets queued after we drop the lock. Reset will clear the busy */ @@ -1539,7 +1546,7 @@ static int __init ide_setup(char *s) const char *hd_words[] = { "none", "noprobe", "nowerr", "cdrom", "serialize", "autotune", "noautotune", "minus8", "swapdata", "bswap", - "noflush", "remap", "remap63", "scsi", NULL }; + "minus11", "remap", "remap63", "scsi", NULL }; unit = s[2] - 'a'; hw = unit / MAX_DRIVES; unit = unit % MAX_DRIVES; @@ -1578,9 +1585,6 @@ static int __init ide_setup(char *s) case -10: /* "bswap" */ drive->bswap = 1; goto done; - case -11: /* noflush */ - drive->noflush = 1; - goto done; case -12: /* "remap" */ drive->remap_0_to_1 = 1; goto done; @@ -1992,6 +1996,7 @@ EXPORT_SYMBOL_GPL(ide_bus_type); static int __init ide_init(void) { printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); + devfs_mk_dir("ide"); system_bus_speed = ide_system_bus_speed(); bus_register(&ide_bus_type); @@ -2069,6 +2074,7 @@ void cleanup_module (void) #ifdef CONFIG_PROC_FS proc_ide_destroy(); #endif + devfs_remove("ide"); bus_unregister(&ide_bus_type); } diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index 9c544467c..fb8871181 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c @@ -40,6 +40,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ #include +#include #include #include #include diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index 3b1d33baa..20eb5b872 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c @@ -7,6 +7,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ #include +#include #include #include #include diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index 64d42619a..3fac3e9ec 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index aebecd8f5..6439dec66 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -691,7 +691,7 @@ static struct block_device_operations hd_fops = { }; /* - * This is the hard disk IRQ description. The IRQF_DISABLED in sa_flags + * This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags * means we run the IRQ-handler with interrupts disabled: this is bad for * interrupt latency, but anything else has led to problems on some * machines. @@ -806,7 +806,7 @@ static int __init hd_init(void) p->cyl, p->head, p->sect); } - if (request_irq(HD_IRQ, hd_interrupt, IRQF_DISABLED, "hd", NULL)) { + if (request_irq(HD_IRQ, hd_interrupt, SA_INTERRUPT, "hd", NULL)) { printk("hd: unable to get IRQ%d for the hard disk driver\n", HD_IRQ); goto out1; diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index c48e87e51..a77fb249d 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c @@ -39,6 +39,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ #include +#include #include #include #include diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index d655da749..90cac609d 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c @@ -11,6 +11,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index 434a94faa..2a78b792f 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c @@ -80,7 +80,6 @@ void q40_ide_setup_ports ( hw_regs_t *hw, { int i; - memset(hw, 0, sizeof(hw_regs_t)); for (i = 0; i < IDE_NR_PORTS; i++) { /* BIG FAT WARNING: assumption: only DATA port is ever used in 16 bit mode */ diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index d3c3bc264..563fab009 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c @@ -28,6 +28,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ #include +#include #include #include #include diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index 6e2c58c5f..cdbdb2ff9 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c @@ -40,6 +40,7 @@ #define REALLY_SLOW_IO /* some systems can safely undef this */ #include +#include #include #include #include diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index f286079d2..c743e68c3 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -21,7 +22,7 @@ struct chipset_bus_clock_list_entry { u8 ultra_settings; }; -static const struct chipset_bus_clock_list_entry aec6xxx_33_base [] = { +static struct chipset_bus_clock_list_entry aec6xxx_33_base [] = { { XFER_UDMA_6, 0x31, 0x07 }, { XFER_UDMA_5, 0x31, 0x06 }, { XFER_UDMA_4, 0x31, 0x05 }, @@ -41,7 +42,7 @@ static const struct chipset_bus_clock_list_entry aec6xxx_33_base [] = { { 0, 0x00, 0x00 } }; -static const struct chipset_bus_clock_list_entry aec6xxx_34_base [] = { +static struct chipset_bus_clock_list_entry aec6xxx_34_base [] = { { XFER_UDMA_6, 0x41, 0x06 }, { XFER_UDMA_5, 0x41, 0x05 }, { XFER_UDMA_4, 0x41, 0x04 }, @@ -253,8 +254,7 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const ch if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, - (unsigned long)dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); } if (bus_speed <= 33) diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index d419e4bb5..8b24b4f2a 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include @@ -730,7 +731,7 @@ static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif) if(m5229_revision <= 0x20) tmpbyte = (tmpbyte & (~0x02)) | 0x01; - else if (m5229_revision == 0xc7 || m5229_revision == 0xc8) + else if (m5229_revision == 0xc7) tmpbyte |= 0x03; else tmpbyte |= 0x01; diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 2b0ea8b66..b22ee5462 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c @@ -16,6 +16,7 @@ * the Free Software Foundation. */ +#include #include #include #include @@ -73,8 +74,6 @@ static struct amd_ide_chip { { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 }, - { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, 0x50, AMD_UDMA_133 }, - { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_AMD_CS5536_IDE, 0x40, AMD_UDMA_100 }, { 0 } }; @@ -489,9 +488,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"), /* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"), /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"), - /* 17 */ DECLARE_NV_DEV("NFORCE-MCP61"), - /* 18 */ DECLARE_NV_DEV("NFORCE-MCP65"), - /* 19 */ DECLARE_AMD_DEV("AMD5536"), + /* 17 */ DECLARE_AMD_DEV("AMD5536"), }; static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) @@ -528,9 +525,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = { { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 }, - { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 }, - { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18 }, - { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19 }, + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 }, { 0, }, }; MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index a574de5f0..900efd1da 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 61b5f9c0b..11d035f19 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -103,6 +103,7 @@ //#define CMD640_DUMP_REGS +#include #include #include #include diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 20c32716b..3d9c7afc8 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c @@ -14,6 +14,7 @@ * Copyright (C) 1999-2002 Andre Hedrick */ +#include #include #include #include @@ -188,6 +189,14 @@ static int cmd64x_get_info (char *buffer, char **addr, off_t offset, int count) #endif /* defined(DISPLAY_CMD64X_TIMINGS) && defined(CONFIG_PROC_FS) */ +/* + * Registers and masks for easy access by drive index: + */ +#if 0 +static u8 prefetch_regs[4] = {CNTRL, CNTRL, ARTTIM23, ARTTIM23}; +static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3}; +#endif + /* * This routine writes the prepared setup/active/recovery counts * for a drive into the cmd646 chipset registers to active them. @@ -597,6 +606,13 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); class_rev &= 0xff; +#ifdef __i386__ + if (dev->resource[PCI_ROM_RESOURCE].start) { + pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); + printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start); + } +#endif + switch(dev->device) { case PCI_DEVICE_ID_CMD_643: break; diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 079f7c867..ea3c52cc8 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c @@ -32,6 +32,7 @@ * */ +#include #include #include #include diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index 380bb28c7..09269e574 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c @@ -14,6 +14,7 @@ * CS5530 documentation available from National Semiconductor. */ +#include #include #include #include diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 5c5aec28e..6eb305197 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c @@ -23,6 +23,7 @@ * CS5535 documentation available from AMD */ +#include #include #include #include diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 120929fbe..9f41ecd56 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c @@ -44,6 +44,7 @@ * */ +#include #include #include #include diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 2942220a7..f82e82109 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c @@ -23,6 +23,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ +#include /* for CONFIG_BLK_DEV_IDEPCI */ #include #include #include @@ -179,36 +180,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { .channels = 2, .autodma = AUTODMA, .bootable = OFF_BOARD, - },{ /* 15 */ - .name = "JMB361", - .init_hwif = init_hwif_generic, - .channels = 2, - .autodma = AUTODMA, - .bootable = OFF_BOARD, - },{ /* 16 */ - .name = "JMB363", - .init_hwif = init_hwif_generic, - .channels = 2, - .autodma = AUTODMA, - .bootable = OFF_BOARD, - },{ /* 17 */ - .name = "JMB365", - .init_hwif = init_hwif_generic, - .channels = 2, - .autodma = AUTODMA, - .bootable = OFF_BOARD, - },{ /* 18 */ - .name = "JMB366", - .init_hwif = init_hwif_generic, - .channels = 2, - .autodma = AUTODMA, - .bootable = OFF_BOARD, - },{ /* 19 */ - .name = "JMB368", - .init_hwif = init_hwif_generic, - .channels = 2, - .autodma = AUTODMA, - .bootable = OFF_BOARD, } }; @@ -241,17 +212,10 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi (!(PCI_FUNC(dev->devfn) & 1))) goto out; - if (dev->vendor == PCI_VENDOR_ID_JMICRON) { - if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1) - goto out; - } - - if (dev->vendor != PCI_VENDOR_ID_JMICRON) { - pci_read_config_word(dev, PCI_COMMAND, &command); - if (!(command & PCI_COMMAND_IO)) { - printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); - goto out; - } + pci_read_config_word(dev, PCI_COMMAND, &command); + if (!(command & PCI_COMMAND_IO)) { + printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); + goto out; } ret = ide_setup_pci_device(dev, d); out: @@ -275,11 +239,6 @@ static struct pci_device_id generic_pci_tbl[] = { { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, - { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15}, - { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16}, - { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17}, - { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18}, - { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19}, /* Must come last. If you add entries adjust this table appropriately and the init_one code */ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, { 0, }, diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index b46cb0422..be334da7a 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c @@ -24,6 +24,7 @@ * Non-bootable card or HPT343 :: pcicmd == 0x05 */ +#include #include #include #include @@ -175,7 +176,7 @@ static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const cha pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n", - (unsigned long)dev->resource[PCI_ROM_RESOURCE].start); + dev->resource[PCI_ROM_RESOURCE].start); } pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0xF0); } else { diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index e993a51f2..940bdd4c5 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -55,6 +55,7 @@ */ +#include #include #include #include diff --git a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c index 0fc89fafa..93462926b 100644 --- a/drivers/ide/pci/it8172.c +++ b/drivers/ide/pci/it8172.c @@ -28,6 +28,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index e9bad1859..38f41b377 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c @@ -62,6 +62,7 @@ * - Move to libata once it grows up */ +#include #include #include #include @@ -498,14 +499,9 @@ static int config_chipset_for_dma (ide_drive_t *drive) { u8 speed = ide_dma_speed(drive, it821x_ratemask(drive)); - if (speed) { - config_it821x_chipset_for_pio(drive, 0); - it821x_tune_chipset(drive, speed); - - return ide_dma_enable(drive); - } - - return 0; + config_it821x_chipset_for_pio(drive, !speed); + it821x_tune_chipset(drive, speed); + return ide_dma_enable(drive); } /** @@ -655,8 +651,6 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) } ide_set_hwifdata(hwif, idev); - hwif->atapi_dma = 1; - pci_read_config_byte(hwif->pci_dev, 0x50, &conf); if(conf & 1) { idev->smart = 1; diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index d95714bce..fcd5142f5 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c @@ -9,6 +9,7 @@ * Inspired by an earlier effort from David S. Miller */ +#include #include #include #include diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 6c097e80b..acd631731 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c @@ -14,6 +14,7 @@ * Released under terms of General Public License */ +#include #include #include #include @@ -312,8 +313,8 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, - (unsigned long)dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", + name, dev->resource[PCI_ROM_RESOURCE].start); } #ifdef CONFIG_PPC_PMAC @@ -337,8 +338,6 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) hwif->ultra_mask = 0x7f; hwif->mwdma_mask = 0x07; - hwif->err_stops_fifo = 1; - hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate; hwif->ide_dma_lostirq = &pdcnew_ide_dma_lostirq; hwif->ide_dma_timeout = &pdcnew_ide_dma_timeout; diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index b46022a11..7ce5bf783 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c @@ -28,6 +28,7 @@ * Released under terms of General Public License */ +#include #include #include #include @@ -100,6 +101,31 @@ static const char *pdc_quirk_drives[] = { #define MC1 0x02 /* DMA"C" timing */ #define MC0 0x01 /* DMA"C" timing */ +#if 0 + unsigned long bibma = pci_resource_start(dev, 4); + u8 hi = 0, lo = 0; + + u8 sc1c = inb_p((u16)bibma + 0x1c); + u8 sc1e = inb_p((u16)bibma + 0x1e); + u8 sc1f = inb_p((u16)bibma + 0x1f); + + p += sprintf(p, "Host Mode : %s\n", + (sc1f & 0x08) ? "Tri-Stated" : "Normal"); + p += sprintf(p, "Bus Clocking : %s\n", + ((sc1f & 0xC0) == 0xC0) ? "100 External" : + ((sc1f & 0x80) == 0x80) ? "66 External" : + ((sc1f & 0x40) == 0x40) ? "33 External" : "33 PCI Internal"); + p += sprintf(p, "IO pad select : %s mA\n", + ((sc1c & 0x03) == 0x03) ? "10" : + ((sc1c & 0x02) == 0x02) ? "8" : + ((sc1c & 0x01) == 0x01) ? "6" : + ((sc1c & 0x00) == 0x00) ? "4" : "??"); + hi = sc1e >> 4; + lo = sc1e & 0xf; + p += sprintf(p, "Status Polling Period : %d\n", hi); + p += sprintf(p, "Interrupt Check Status Polling Delay : %d\n", lo); +#endif + static u8 pdc202xx_ratemask (ide_drive_t *drive) { u8 mode; @@ -344,6 +370,7 @@ chipset_is_set: if (!(speed)) { /* restore original pci-config space */ pci_write_config_dword(dev, drive_pci, drive_conf); + hwif->tuneproc(drive, 5); return 0; } @@ -388,6 +415,8 @@ static void pdc202xx_old_ide_dma_start(ide_drive_t *drive) if (drive->addressing == 1) { struct request *rq = HWGROUP(drive)->rq; ide_hwif_t *hwif = HWIF(drive); +// struct pci_dev *dev = hwif->pci_dev; +// unsgned long high_16 = pci_resource_start(dev, 4); unsigned long high_16 = hwif->dma_master; unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); u32 word_count = 0; @@ -407,6 +436,7 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive) { if (drive->addressing == 1) { ide_hwif_t *hwif = HWIF(drive); +// unsigned long high_16 = pci_resource_start(hwif->pci_dev, 4); unsigned long high_16 = hwif->dma_master; unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); u8 clock = 0; @@ -423,6 +453,8 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive) static int pdc202xx_old_ide_dma_test_irq(ide_drive_t *drive) { ide_hwif_t *hwif = HWIF(drive); +// struct pci_dev *dev = hwif->pci_dev; +// unsigned long high_16 = pci_resource_start(dev, 4); unsigned long high_16 = hwif->dma_master; u8 dma_stat = hwif->INB(hwif->dma_status); u8 sc1d = hwif->INB((high_16 + 0x001d)); @@ -460,7 +492,12 @@ static int pdc202xx_ide_dma_timeout(ide_drive_t *drive) static void pdc202xx_reset_host (ide_hwif_t *hwif) { +#ifdef CONFIG_BLK_DEV_IDEDMA +// unsigned long high_16 = hwif->dma_base - (8*(hwif->channel)); unsigned long high_16 = hwif->dma_master; +#else /* !CONFIG_BLK_DEV_IDEDMA */ + unsigned long high_16 = pci_resource_start(hwif->pci_dev, 4); +#endif /* CONFIG_BLK_DEV_IDEDMA */ u8 udma_speed_flag = hwif->INB(high_16|0x001f); hwif->OUTB((udma_speed_flag | 0x10), (high_16|0x001f)); @@ -479,20 +516,98 @@ static void pdc202xx_reset (ide_drive_t *drive) pdc202xx_reset_host(hwif); pdc202xx_reset_host(mate); +#if 0 + /* + * FIXME: Have to kick all the drives again :-/ + * What a pain in the ACE! + */ + if (hwif->present) { + u16 hunit = 0; + for (hunit = 0; hunit < MAX_DRIVES; ++hunit) { + ide_drive_t *hdrive = &hwif->drives[hunit]; + if (hdrive->present) { + if (hwif->ide_dma_check) + hwif->ide_dma_check(hdrive); + else + hwif->tuneproc(hdrive, 5); + } + } + } + if (mate->present) { + u16 munit = 0; + for (munit = 0; munit < MAX_DRIVES; ++munit) { + ide_drive_t *mdrive = &mate->drives[munit]; + if (mdrive->present) { + if (mate->ide_dma_check) + mate->ide_dma_check(mdrive); + else + mate->tuneproc(mdrive, 5); + } + } + } +#else hwif->tuneproc(drive, 5); +#endif +} + +/* + * Since SUN Cobalt is attempting to do this operation, I should disclose + * this has been a long time ago Thu Jul 27 16:40:57 2000 was the patch date + * HOTSWAP ATA Infrastructure. + */ +static int pdc202xx_tristate (ide_drive_t * drive, int state) +{ + ide_hwif_t *hwif = HWIF(drive); +// unsigned long high_16 = hwif->dma_base - (8*(hwif->channel)); + unsigned long high_16 = hwif->dma_master; + u8 sc1f = hwif->INB(high_16|0x001f); + + if (!hwif) + return -EINVAL; + +// hwif->bus_state = state; + + if (state) { + hwif->OUTB(sc1f | 0x08, (high_16|0x001f)); + } else { + hwif->OUTB(sc1f & ~0x08, (high_16|0x001f)); + } + return 0; } -static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, - const char *name) +static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const char *name) { - /* This doesn't appear needed */ if (dev->resource[PCI_ROM_RESOURCE].start) { pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); - printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, - (unsigned long)dev->resource[PCI_ROM_RESOURCE].start); + printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", + name, dev->resource[PCI_ROM_RESOURCE].start); } + /* + * software reset - this is required because the bios + * will set UDMA timing on if the hdd supports it. The + * user may want to turn udma off. A bug in the pdc20262 + * is that it cannot handle a downgrade in timing from + * UDMA to DMA. Disk accesses after issuing a set + * feature command will result in errors. A software + * reset leaves the timing registers intact, + * but resets the drives. + */ +#if 0 + if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) || + (dev->device == PCI_DEVICE_ID_PROMISE_20265) || + (dev->device == PCI_DEVICE_ID_PROMISE_20263) || + (dev->device == PCI_DEVICE_ID_PROMISE_20262)) { + unsigned long high_16 = pci_resource_start(dev, 4); + byte udma_speed_flag = inb(high_16 + 0x001f); + outb(udma_speed_flag | 0x10, high_16 + 0x001f); + mdelay(100); + outb(udma_speed_flag & ~0x10, high_16 + 0x001f); + mdelay(2000); /* 2 seconds ?! */ + } + +#endif return dev->irq; } @@ -509,8 +624,10 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) hwif->tuneproc = &config_chipset_for_pio; hwif->quirkproc = &pdc202xx_quirkproc; - if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) + if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) { + hwif->busproc = &pdc202xx_tristate; hwif->resetproc = &pdc202xx_reset; + } hwif->speedproc = &pdc202xx_tune_chipset; @@ -520,8 +637,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) hwif->mwdma_mask = 0x07; hwif->swdma_mask = 0x07; - hwif->err_stops_fifo = 1; - hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate; hwif->ide_dma_lostirq = &pdc202xx_ide_dma_lostirq; hwif->ide_dma_timeout = &pdc202xx_ide_dma_timeout; @@ -610,6 +725,19 @@ static int __devinit init_setup_pdc202ata4(struct pci_dev *dev, "mirror fixed.\n", d->name); } } + +#if 0 + if (dev->device == PCI_DEVICE_ID_PROMISE_20262) + if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || + (tmp & e->mask) != e->val)) + + if (d->enablebits[0].reg != d->enablebits[1].reg) { + d->enablebits[0].reg = d->enablebits[1].reg; + d->enablebits[0].mask = d->enablebits[1].mask; + d->enablebits[0].val = d->enablebits[1].val; + } +#endif + return ide_setup_pci_device(dev, d); } @@ -624,6 +752,22 @@ static int __devinit init_setup_pdc20265(struct pci_dev *dev, "attached to I2O RAID controller.\n"); return -ENODEV; } + +#if 0 + { + u8 pri = 0, sec = 0; + + if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || + (tmp & e->mask) != e->val)) + + if (d->enablebits[0].reg != d->enablebits[1].reg) { + d->enablebits[0].reg = d->enablebits[1].reg; + d->enablebits[0].mask = d->enablebits[1].mask; + d->enablebits[0].val = d->enablebits[1].val; + } + } +#endif + return ide_setup_pci_device(dev, d); } diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 50332ddd5..4d6ef9587 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c @@ -90,6 +90,7 @@ * ICH3 errata #18 - Don't use native mode */ +#include #include #include #include @@ -203,6 +204,8 @@ static u8 piix_dma_2_pio (u8 xfer_rate) { } } +static spinlock_t tune_lock = SPIN_LOCK_UNLOCKED; + /** * piix_tune_drive - tune a drive attached to a PIIX * @drive: drive to tune @@ -221,8 +224,6 @@ static void piix_tune_drive (ide_drive_t *drive, u8 pio) unsigned long flags; u16 master_data; u8 slave_data; - static DEFINE_SPINLOCK(tune_lock); - /* ISP RTC */ u8 timings[][2] = { { 0, 0 }, { 0, 0 }, @@ -231,12 +232,11 @@ static void piix_tune_drive (ide_drive_t *drive, u8 pio) { 2, 3 }, }; pio = ide_get_best_pio_mode(drive, pio, 5, NULL); - - /* - * Master vs slave is synchronized above us but the slave register is - * shared by the two hwifs so the corner case of two slave timeouts in - * parallel must be locked. - */ + + /* Master v slave is synchronized above us but the slave register is + shared by the two hwifs so the corner case of two slave timeouts in + parallel must be locked */ + spin_lock_irqsave(&tune_lock, flags); pci_read_config_word(dev, master_port, &master_data); if (is_slave) { diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c index 5f6950c2d..608cd7609 100644 --- a/drivers/ide/pci/rz1000.c +++ b/drivers/ide/pci/rz1000.c @@ -17,6 +17,7 @@ #undef REALLY_SLOW_IO /* most systems can safely undef this */ +#include /* for CONFIG_BLK_DEV_IDEPCI */ #include #include #include diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index fc2b5496b..24e21b283 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c @@ -11,6 +11,7 @@ * Available from National Semiconductor */ +#include #include #include #include @@ -394,6 +395,7 @@ static int sc1200_resume (struct pci_dev *dev) { ide_hwif_t *hwif = NULL; +printk("SC1200: resume\n"); pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state dev->current_state = PM_EVENT_ON; pci_enable_device(dev); @@ -403,6 +405,7 @@ static int sc1200_resume (struct pci_dev *dev) while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { unsigned int basereg, r, d, format; sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data; +printk("%s: SC1200: resume\n", hwif->name); // // Restore timing registers: this may be unnecessary if BIOS also does it @@ -490,7 +493,7 @@ static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_devic } static struct pci_device_id sc1200_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE), 0}, + { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, sc1200_pci_tbl); diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index f063d9542..0d3073f4e 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -29,6 +29,7 @@ * */ +#include #include #include #include @@ -122,11 +123,11 @@ static u8 svwks_csb_check (struct pci_dev *dev) } static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed) { - static const u8 udma_modes[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }; - static const u8 dma_modes[] = { 0x77, 0x21, 0x20 }; - static const u8 pio_modes[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 }; - static const u8 drive_pci[] = { 0x41, 0x40, 0x43, 0x42 }; - static const u8 drive_pci2[] = { 0x45, 0x44, 0x47, 0x46 }; + u8 udma_modes[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 }; + u8 dma_modes[] = { 0x77, 0x21, 0x20 }; + u8 pio_modes[] = { 0x5d, 0x47, 0x34, 0x22, 0x20 }; + u8 drive_pci[] = { 0x41, 0x40, 0x43, 0x42 }; + u8 drive_pci2[] = { 0x45, 0x44, 0x47, 0x46 }; ide_hwif_t *hwif = HWIF(drive); struct pci_dev *dev = hwif->pci_dev; @@ -391,6 +392,16 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha } outb_p(0x06, 0x0c00); dev->irq = inb_p(0x0c01); +#if 0 + printk("%s: device class (0x%04x)\n", + name, dev->class); + if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) { + dev->class &= ~0x000F0F00; + // dev->class |= ~0x00000400; + dev->class |= ~0x00010100; + /**/ + } +#endif } else { struct pci_dev * findev = NULL; u8 reg41 = 0; @@ -441,7 +452,7 @@ static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const cha pci_write_config_byte(dev, 0x5A, btr); } - return dev->irq; + return (dev->irq) ? dev->irq : 0; } static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif) @@ -489,6 +500,11 @@ static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif) { struct pci_dev *dev = hwif->pci_dev; + /* Per Specified Design by OEM, and ASIC Architect */ + if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || + (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) + return 1; + /* Server Works */ if (dev->subsystem_vendor == PCI_VENDOR_ID_SERVERWORKS) return ata66_svwks_svwks (hwif); @@ -501,14 +517,10 @@ static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif) if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN) return ata66_svwks_cobalt (hwif); - /* Per Specified Design by OEM, and ASIC Architect */ - if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || - (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) - return 1; - return 0; } +#undef CAN_SW_DMA static void __devinit init_hwif_svwks (ide_hwif_t *hwif) { u8 dma_stat = 0; @@ -525,6 +537,9 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) hwif->ultra_mask = 0x3f; hwif->mwdma_mask = 0x07; +#ifdef CAN_SW_DMA + hwif->swdma_mask = 0x07; +#endif /* CAN_SW_DMA */ hwif->autodma = 0; @@ -547,6 +562,8 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) hwif->drives[1].autodma = (dma_stat & 0x40); hwif->drives[0].autotune = (!(dma_stat & 0x20)); hwif->drives[1].autotune = (!(dma_stat & 0x40)); +// hwif->drives[0].autodma = hwif->autodma; +// hwif->drives[1].autodma = hwif->autodma; } /* @@ -576,6 +593,11 @@ static int __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d) if (dev->resource[0].start == 0x01f1) d->bootable = ON_BOARD; } +#if 0 + if ((IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB6) && + (!(PCI_FUNC(dev->devfn) & 1))) + d->autodma = AUTODMA; +#endif d->channels = ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE || dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2) && diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index d8a0d87df..27c9eb989 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -367,13 +367,12 @@ sgiioc4_INB(unsigned long port) static void __devinit ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base) { - void __iomem *virt_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_mem_region(dma_base, num_ports, hwif->name)) { + 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", @@ -382,21 +381,13 @@ ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base) goto dma_alloc_failure; } - virt_dma_base = ioremap(dma_base, num_ports); - if (virt_dma_base == NULL) { - printk(KERN_ERR - "%s(%s) -- ERROR, Unable to map addresses 0x%lx to 0x%lx\n", - __FUNCTION__, hwif->name, dma_base, dma_base + num_ports - 1); - goto dma_remap_failure; - } - hwif->dma_base = (unsigned long) virt_dma_base; - + 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_pci_alloc_failure; + goto dma_alloc_failure; hwif->sg_max_nents = IOC4_PRD_ENTRIES; @@ -420,12 +411,6 @@ dma_base2alloc_failure: printk(KERN_INFO "Changing from DMA to PIO mode for Drive %s\n", hwif->name); -dma_pci_alloc_failure: - iounmap(virt_dma_base); - -dma_remap_failure: - release_mem_region(dma_base, num_ports); - dma_alloc_failure: /* Disable DMA because we couldnot allocate any DMA maps */ hwif->autodma = 0; @@ -622,15 +607,18 @@ ide_init_sgiioc4(ide_hwif_t * hwif) hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_timeout = &__ide_dma_timeout; + /* + * The IOC4 uses MMIO rather than Port IO. + * It also needs special workarounds for INB. + */ + default_hwif_mmiops(hwif); hwif->INB = &sgiioc4_INB; } static int __devinit sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) { - unsigned long cmd_base, dma_base, irqport; - unsigned long bar0, cmd_phys_base, ctl; - void __iomem *virt_base; + unsigned long base, ctl, dma_base, irqport; ide_hwif_t *hwif; int h; @@ -648,32 +636,23 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) } /* Get the CmdBlk and CtrlBlk Base Registers */ - bar0 = pci_resource_start(dev, 0); - virt_base = ioremap(bar0, pci_resource_len(dev, 0)); - if (virt_base == NULL) { - printk(KERN_ERR "%s: Unable to remap BAR 0 address: 0x%lx\n", - d->name, bar0); - return -ENOMEM; - } - cmd_base = (unsigned long) virt_base + IOC4_CMD_OFFSET; - ctl = (unsigned long) virt_base + IOC4_CTRL_OFFSET; - irqport = (unsigned long) virt_base + IOC4_INTR_OFFSET; + 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; - cmd_phys_base = bar0 + IOC4_CMD_OFFSET; - if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE, - hwif->name)) { + if (!request_region(base, IOC4_CMD_CTL_BLK_SIZE, hwif->name)) { printk(KERN_ERR - "%s : %s -- ERROR, Addresses " + "%s : %s -- ERROR, Port Addresses " "0x%p to 0x%p ALREADY in use\n", - __FUNCTION__, hwif->name, (void *) cmd_phys_base, - (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE); + __FUNCTION__, hwif->name, (void *) base, + (void *) base + IOC4_CMD_CTL_BLK_SIZE); return -ENOMEM; } - if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { + if (hwif->io_ports[IDE_DATA_OFFSET] != base) { /* Initialize the IO registers */ - sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport); + 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]; @@ -686,9 +665,6 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) hwif->cds = (struct ide_pci_device_s *) d; hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */ - /* The IOC4 uses MMIO rather than Port IO. */ - default_hwif_mmiops(hwif); - /* Initializing chipset IRQ Registers */ hwif->OUTL(0x03, irqport + IOC4_INTR_SET * 4); @@ -747,12 +723,6 @@ static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = { int ioc4_ide_attach_one(struct ioc4_driver_data *idd) { - /* PCI-RT does not bring out IDE connection. - * Do not attach to this particular IOC4. - */ - if (idd->idd_variant == IOC4_VARIANT_PCI_RT) - return 0; - return pci_init_sgiioc4(idd->idd_pdev, &sgiioc4_chipsets[idd->idd_pci_id->driver_data]); } diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 20b392948..f1ca154dd 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c @@ -27,6 +27,7 @@ * if neccessary */ +#include #include #include #include @@ -37,6 +38,9 @@ #include +#undef SIIMAGE_VIRTUAL_DMAPIO +#undef SIIMAGE_LARGE_DMA + /** * pdev_is_sata - check if device is SATA * @pdev: PCI device to check @@ -457,6 +461,36 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive) return 0; } +#if 0 +/** + * siimage_mmio_ide_dma_count - DMA bytes done + * @drive + * + * If we are doing VDMA the CMD680 requires a little bit + * of more careful handling and we have to read the counts + * off ourselves. For non VDMA life is normal. + */ + +static int siimage_mmio_ide_dma_count (ide_drive_t *drive) +{ +#ifdef SIIMAGE_VIRTUAL_DMAPIO + struct request *rq = HWGROUP(drive)->rq; + ide_hwif_t *hwif = HWIF(drive); + u32 count = (rq->nr_sectors * SECTOR_SIZE); + u32 rcount = 0; + unsigned long addr = siimage_selreg(hwif, 0x1C); + + hwif->OUTL(count, addr); + rcount = hwif->INL(addr); + + printk("\n%s: count = %d, rcount = %d, nr_sectors = %lu\n", + drive->name, count, rcount, rq->nr_sectors); + +#endif /* SIIMAGE_VIRTUAL_DMAPIO */ + return __ide_dma_count(drive); +} +#endif + /** * siimage_mmio_ide_dma_test_irq - check we caused an IRQ * @drive: drive we are testing @@ -478,10 +512,12 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) u32 sata_error = hwif->INL(SATA_ERROR_REG); hwif->OUTL(sata_error, SATA_ERROR_REG); watchdog = (sata_error & 0x00680000) ? 1 : 0; +#if 1 printk(KERN_WARNING "%s: sata_error = 0x%08x, " "watchdog = %d, %s\n", drive->name, sata_error, watchdog, __FUNCTION__); +#endif } else { watchdog = (ext_stat & 0x8000) ? 1 : 0; @@ -827,7 +863,7 @@ static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const ch * time. * * The hardware supports buffered taskfiles and also some rather nice - * extended PRD tables. For better SI3112 support use the libata driver + * extended PRD tables. Unfortunately right now we don't. */ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) @@ -864,6 +900,9 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) * so we can't currently use it sanely since we want to * use LBA48 mode. */ +// base += 0x10; +// hwif->no_lba48 = 1; + hw.io_ports[IDE_DATA_OFFSET] = base; hw.io_ports[IDE_ERROR_OFFSET] = base + 1; hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; @@ -897,8 +936,15 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) base = (unsigned long) addr; +#ifdef SIIMAGE_LARGE_DMA +/* Watch the brackets - even Ken and Dennis get some language design wrong */ + hwif->dma_base = base + (ch ? 0x18 : 0x10); + hwif->dma_base2 = base + (ch ? 0x08 : 0x00); + hwif->dma_prdtable = hwif->dma_base2 + 4; +#else /* ! SIIMAGE_LARGE_DMA */ hwif->dma_base = base + (ch ? 0x08 : 0x00); hwif->dma_base2 = base + (ch ? 0x18 : 0x10); +#endif /* SIIMAGE_LARGE_DMA */ hwif->mmio = 2; } @@ -1006,16 +1052,9 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) hwif->reset_poll = &siimage_reset_poll; hwif->pre_reset = &siimage_pre_reset; - if(is_sata(hwif)) { - static int first = 1; - + if(is_sata(hwif)) hwif->busproc = &siimage_busproc; - if (first) { - printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n"); - first = 0; - } - } if (!hwif->dma_base) { hwif->drives[0].autotune = 1; hwif->drives[1].autotune = 1; diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index f03196c5d..8e9d87701 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -44,6 +44,7 @@ * 962/963. */ +#include #include #include #include @@ -86,8 +87,6 @@ static const struct { u8 chipset_family; u8 flags; } SiSHostChipInfo[] = { - { "SiS968", PCI_DEVICE_ID_SI_968, ATA_133 }, - { "SiS966", PCI_DEVICE_ID_SI_966, ATA_133 }, { "SiS965", PCI_DEVICE_ID_SI_965, ATA_133 }, { "SiS745", PCI_DEVICE_ID_SI_745, ATA_100 }, { "SiS735", PCI_DEVICE_ID_SI_735, ATA_100 }, diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 0b4b60498..8a5c7b286 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c @@ -13,6 +13,7 @@ * -- Benjamin Herrenschmidt (01/11/03) benh@kernel.crashing.org */ +#include #include #include #include @@ -446,6 +447,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) printk(" %s: Winbond 553 bridge revision %d, BM-DMA disabled\n", hwif->name, rev); } else { +#ifdef CONFIG_BLK_DEV_IDEDMA dma_state |= 0x60; hwif->atapi_dma = 1; @@ -466,6 +468,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) if (hwif->mate) hwif->serialized = hwif->mate->serialized = 1; +#endif /* CONFIG_BLK_DEV_IDEDMA */ } hwif->OUTB(dma_state, hwif->dma_base + 2); } @@ -486,7 +489,7 @@ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_dev } static struct pci_device_id sl82c105_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105), 0}, + { PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, sl82c105_pci_tbl); diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 4a1853af3..5112c7266 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -71,8 +72,7 @@ static void slc90e66_tune_drive (ide_drive_t *drive, u8 pio) u16 master_data; u8 slave_data; /* ISP RTC */ - static const u8 timings[][2]= { - { 0, 0 }, + u8 timings[][2] = { { 0, 0 }, { 0, 0 }, { 1, 0 }, { 2, 1 }, @@ -119,6 +119,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) pci_read_config_word(dev, 0x4a, ®4a); switch(speed) { +#ifdef CONFIG_BLK_DEV_IDEDMA case XFER_UDMA_4: u_speed = 4 << (drive->dn * 4); break; case XFER_UDMA_3: u_speed = 3 << (drive->dn * 4); break; case XFER_UDMA_2: u_speed = 2 << (drive->dn * 4); break; @@ -127,6 +128,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) case XFER_MW_DMA_2: case XFER_MW_DMA_1: case XFER_SW_DMA_2: break; +#endif /* CONFIG_BLK_DEV_IDEDMA */ case XFER_PIO_4: case XFER_PIO_3: case XFER_PIO_2: @@ -154,6 +156,7 @@ static int slc90e66_tune_chipset (ide_drive_t *drive, u8 xferspeed) return (ide_config_drive_speed(drive, speed)); } +#ifdef CONFIG_BLK_DEV_IDEDMA static int slc90e66_config_drive_for_dma (ide_drive_t *drive) { u8 speed = ide_dma_speed(drive, slc90e66_ratemask(drive)); @@ -191,6 +194,7 @@ fast_ata_pio: /* IORDY not supported */ return 0; } +#endif /* CONFIG_BLK_DEV_IDEDMA */ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) { @@ -218,6 +222,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) hwif->mwdma_mask = 0x07; hwif->swdma_mask = 0x07; +#ifdef CONFIG_BLK_DEV_IDEDMA if (!(hwif->udma_four)) /* bit[0(1)]: 0:80, 1:40 */ hwif->udma_four = (reg47 & mask) ? 0 : 1; @@ -227,6 +232,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) hwif->autodma = 1; hwif->drives[0].autodma = hwif->autodma; hwif->drives[1].autodma = hwif->autodma; +#endif /* !CONFIG_BLK_DEV_IDEDMA */ } static ide_pci_device_t slc90e66_chipset __devinitdata = { @@ -244,7 +250,7 @@ static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_dev } static struct pci_device_id slc90e66_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1), 0}, + { PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, { 0, }, }; MODULE_DEVICE_TABLE(pci, slc90e66_pci_tbl); diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 56d84931d..f96b56838 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c @@ -27,6 +27,7 @@ * Not publically available. */ +#include #include #include #include diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 2a282529b..c26c8ca90 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c @@ -128,6 +128,7 @@ * */ +#include #include #include #include @@ -182,7 +183,8 @@ static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) { ide_hwif_t *hwif = HWIF(drive); - BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */ + if (HWGROUP(drive)->handler != NULL) /* paranoia check */ + BUG(); ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL); /* issue cmd to drive */ hwif->OUTB(command, IDE_COMMAND_REG); diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 9b7589e8e..9914a78a5 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c @@ -26,6 +26,7 @@ * the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index 0ac9da3a7..b80c6135a 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c @@ -11,6 +11,7 @@ * by Mathew Locke */ +#include #include #include #include diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 15b89e8a1..ffca8b63e 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -22,6 +22,7 @@ * big table * */ +#include #include #include #include @@ -419,6 +420,107 @@ static void pmac_ide_kauai_selectproc(ide_drive_t *drive); #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ +/* + * Below is the code for blinking the laptop LED along with hard + * disk activity. + */ + +#ifdef CONFIG_BLK_DEV_IDE_PMAC_BLINK + +/* Set to 50ms minimum led-on time (also used to limit frequency + * of requests sent to the PMU + */ +#define PMU_HD_BLINK_TIME (HZ/50) + +static struct adb_request pmu_blink_on, pmu_blink_off; +static spinlock_t pmu_blink_lock; +static unsigned long pmu_blink_stoptime; +static int pmu_blink_ledstate; +static struct timer_list pmu_blink_timer; +static int pmu_ide_blink_enabled; + + +static void +pmu_hd_blink_timeout(unsigned long data) +{ + unsigned long flags; + + spin_lock_irqsave(&pmu_blink_lock, flags); + + /* We may have been triggered again in a racy way, check + * that we really want to switch it off + */ + if (time_after(pmu_blink_stoptime, jiffies)) + goto done; + + /* Previous req. not complete, try 100ms more */ + if (pmu_blink_off.complete == 0) + mod_timer(&pmu_blink_timer, jiffies + PMU_HD_BLINK_TIME); + else if (pmu_blink_ledstate) { + pmu_request(&pmu_blink_off, NULL, 4, 0xee, 4, 0, 0); + pmu_blink_ledstate = 0; + } +done: + spin_unlock_irqrestore(&pmu_blink_lock, flags); +} + +static void +pmu_hd_kick_blink(void *data, int rw) +{ + unsigned long flags; + + pmu_blink_stoptime = jiffies + PMU_HD_BLINK_TIME; + wmb(); + mod_timer(&pmu_blink_timer, pmu_blink_stoptime); + /* Fast path when LED is already ON */ + if (pmu_blink_ledstate == 1) + return; + spin_lock_irqsave(&pmu_blink_lock, flags); + if (pmu_blink_on.complete && !pmu_blink_ledstate) { + pmu_request(&pmu_blink_on, NULL, 4, 0xee, 4, 0, 1); + pmu_blink_ledstate = 1; + } + spin_unlock_irqrestore(&pmu_blink_lock, flags); +} + +static int +pmu_hd_blink_init(void) +{ + struct device_node *dt; + const char *model; + + /* Currently, I only enable this feature on KeyLargo based laptops, + * older laptops may support it (at least heathrow/paddington) but + * I don't feel like loading those venerable old machines with so + * much additional interrupt & PMU activity... + */ + if (pmu_get_model() != PMU_KEYLARGO_BASED) + return 0; + + dt = of_find_node_by_path("/"); + if (dt == NULL) + return 0; + model = (const char *)get_property(dt, "model", NULL); + if (model == NULL) + return 0; + if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && + strncmp(model, "iBook", strlen("iBook")) != 0) { + of_node_put(dt); + return 0; + } + of_node_put(dt); + + pmu_blink_on.complete = 1; + pmu_blink_off.complete = 1; + spin_lock_init(&pmu_blink_lock); + init_timer(&pmu_blink_timer); + pmu_blink_timer.function = pmu_hd_blink_timeout; + + return 1; +} + +#endif /* CONFIG_BLK_DEV_IDE_PMAC_BLINK */ + /* * N.B. this can't be an initfunc, because the media-bay task can * call ide_[un]register at any time. @@ -1090,6 +1192,23 @@ pmac_ide_do_suspend(ide_hwif_t *hwif) pmif->timings[0] = 0; pmif->timings[1] = 0; +#ifdef CONFIG_BLK_DEV_IDE_PMAC_BLINK + /* Note: This code will be called for every hwif, thus we'll + * try several time to stop the LED blinker timer, but that + * should be harmless + */ + if (pmu_ide_blink_enabled) { + unsigned long flags; + + /* Make sure we don't hit the PMU blink */ + spin_lock_irqsave(&pmu_blink_lock, flags); + if (pmu_blink_ledstate) + del_timer(&pmu_blink_timer); + pmu_blink_ledstate = 0; + spin_unlock_irqrestore(&pmu_blink_lock, flags); + } +#endif /* CONFIG_BLK_DEV_IDE_PMAC_BLINK */ + disable_irq(pmif->irq); /* The media bay will handle itself just fine */ @@ -1257,6 +1376,13 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) hwif->selectproc = pmac_ide_selectproc; hwif->speedproc = pmac_ide_tune_chipset; +#ifdef CONFIG_BLK_DEV_IDE_PMAC_BLINK + pmu_ide_blink_enabled = pmu_hd_blink_init(); + + if (pmu_ide_blink_enabled) + hwif->led_act = pmu_hd_kick_blink; +#endif + printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, pmif->mediabay ? " (mediabay)" : "", hwif->irq); @@ -1326,7 +1452,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) if (macio_irq_count(mdev) == 0) { printk(KERN_WARNING "ide%d: no intrs for device %s, using 13\n", i, mdev->ofdev.node->full_name); - irq = irq_create_mapping(NULL, 13); + irq = 13; } else irq = macio_irq(mdev, 0); diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index eb0945284..462ed3006 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -18,6 +18,7 @@ * configuration of all PCI IDE interfaces present in a system. */ +#include #include #include #include @@ -693,8 +694,13 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d, goto out; } if (noisy) +#ifdef __sparc__ + printk(KERN_INFO "%s: 100%% native mode on irq %s\n", + d->name, __irq_itoa(pciirq)); +#else printk(KERN_INFO "%s: 100%% native mode on irq %d\n", d->name, pciirq); +#endif } /* FIXME: silent failure can happen */ diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig index 186737539..39142e2f8 100644 --- a/drivers/ieee1394/Kconfig +++ b/drivers/ieee1394/Kconfig @@ -128,17 +128,8 @@ config IEEE1394_SBP2 1394 bus. SBP-2 devices include harddrives and DVD devices. config IEEE1394_SBP2_PHYS_DMA - bool "Enable replacement for physical DMA in SBP2" - depends on IEEE1394 && IEEE1394_SBP2 && EXPERIMENTAL && (X86_32 || PPC_32) - help - This builds sbp2 for use with non-OHCI host adapters which do not - support physical DMA or for when ohci1394 is run with phys_dma=0. - Physical DMA is data movement without assistence of the drivers' - interrupt handlers. This option includes the interrupt handlers - that are required in absence of this hardware feature. - - This option is buggy and currently broken on some architectures. - If unsure, say N. + bool "Enable Phys DMA support for SBP2 (Debug)" + depends on IEEE1394 && IEEE1394_SBP2 config IEEE1394_ETH1394 tristate "Ethernet over 1394" diff --git a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c index e2de6fa0c..1017fd717 100644 --- a/drivers/ieee1394/config_roms.c +++ b/drivers/ieee1394/config_roms.c @@ -9,6 +9,7 @@ * directory of the kernel sources for details. */ +#include #include #include "csr1212.h" diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c index 586f71e73..157735442 100644 --- a/drivers/ieee1394/csr1212.c +++ b/drivers/ieee1394/csr1212.c @@ -779,7 +779,7 @@ static int csr1212_append_new_cache(struct csr1212_csr *csr, size_t romsize) romsize = (romsize + (csr->max_rom - 1)) & ~(csr->max_rom - 1); csr_addr = csr->ops->allocate_addr_range(romsize, csr->max_rom, csr->private); - if (csr_addr == CSR1212_INVALID_ADDR_SPACE) { + if (csr_addr == ~0ULL) { return CSR1212_ENOMEM; } if (csr_addr < CSR1212_REGISTER_SPACE_BASE) { diff --git a/drivers/ieee1394/csr1212.h b/drivers/ieee1394/csr1212.h index 17ddd72de..cecd5871f 100644 --- a/drivers/ieee1394/csr1212.h +++ b/drivers/ieee1394/csr1212.h @@ -192,7 +192,6 @@ #define CSR1212_EXTENDED_ROM_SIZE (0x10000 * sizeof(u_int32_t)) -#define CSR1212_INVALID_ADDR_SPACE -1 /* Config ROM image structures */ struct csr1212_bus_info_block_img { diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index ca5167de7..9fb2769d9 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c @@ -145,12 +145,12 @@ void dma_region_free(struct dma_region *dma) /* find the scatterlist index and remaining offset corresponding to a given offset from the beginning of the buffer */ static inline int dma_region_find(struct dma_region *dma, unsigned long offset, - unsigned int start, unsigned long *rem) + unsigned long *rem) { int i; unsigned long off = offset; - for (i = start; i < dma->n_dma_pages; i++) { + for (i = 0; i < dma->n_dma_pages; i++) { if (off < sg_dma_len(&dma->sglist[i])) { *rem = off; break; @@ -170,7 +170,7 @@ dma_addr_t dma_region_offset_to_bus(struct dma_region * dma, unsigned long rem = 0; struct scatterlist *sg = - &dma->sglist[dma_region_find(dma, offset, 0, &rem)]; + &dma->sglist[dma_region_find(dma, offset, &rem)]; return sg_dma_address(sg) + rem; } @@ -178,13 +178,13 @@ void dma_region_sync_for_cpu(struct dma_region *dma, unsigned long offset, unsigned long len) { int first, last; - unsigned long rem = 0; + unsigned long rem; if (!len) len = 1; - first = dma_region_find(dma, offset, 0, &rem); - last = dma_region_find(dma, rem + len - 1, first, &rem); + first = dma_region_find(dma, offset, &rem); + last = dma_region_find(dma, offset + len - 1, &rem); pci_dma_sync_sg_for_cpu(dma->dev, &dma->sglist[first], last - first + 1, dma->direction); @@ -194,13 +194,13 @@ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset, unsigned long len) { int first, last; - unsigned long rem = 0; + unsigned long rem; if (!len) len = 1; - first = dma_region_find(dma, offset, 0, &rem); - last = dma_region_find(dma, rem + len - 1, first, &rem); + first = dma_region_find(dma, offset, &rem); + last = dma_region_find(dma, offset + len - 1, &rem); pci_dma_sync_sg_for_device(dma->dev, &dma->sglist[first], last - first + 1, dma->direction); diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 87532dd43..85c2d4ca0 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c @@ -83,6 +83,7 @@ */ +#include #include #include #include diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 2d5b57be9..30fa0d43a 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c @@ -367,7 +367,7 @@ static int eth1394_probe(struct device *dev) spin_lock_init(&node_info->pdg.lock); INIT_LIST_HEAD(&node_info->pdg.list); node_info->pdg.sz = 0; - node_info->fifo = CSR1212_INVALID_ADDR_SPACE; + node_info->fifo = ETHER1394_INVALID_ADDR; ud->device.driver_data = node_info; new_node->ud = ud; @@ -502,8 +502,10 @@ static void ether1394_reset_priv (struct net_device *dev, int set_mtu) /* Determine speed limit */ for (i = 0; i < host->node_count; i++) - if (max_speed > host->speed[i]) - max_speed = host->speed[i]; + if (max_speed > host->speed_map[NODEID_TO_NODE(host->node_id) * + 64 + i]) + max_speed = host->speed_map[NODEID_TO_NODE(host->node_id) * + 64 + i]; priv->bc_sspd = max_speed; /* We'll use our maxpayload as the default mtu */ @@ -566,11 +568,13 @@ static void ether1394_add_host (struct hpsb_host *host) if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) return; - fifo_addr = hpsb_allocate_and_register_addrspace( - ð1394_highlevel, host, &addr_ops, - ETHER1394_REGION_ADDR_LEN, ETHER1394_REGION_ADDR_LEN, - CSR1212_INVALID_ADDR_SPACE, CSR1212_INVALID_ADDR_SPACE); - if (fifo_addr == CSR1212_INVALID_ADDR_SPACE) + fifo_addr = hpsb_allocate_and_register_addrspace(ð1394_highlevel, + host, + &addr_ops, + ETHER1394_REGION_ADDR_LEN, + ETHER1394_REGION_ADDR_LEN, + -1, -1); + if (fifo_addr == ~0ULL) goto out; /* We should really have our own alloc_hpsbdev() function in @@ -770,7 +774,7 @@ static int ether1394_rebuild_header(struct sk_buff *skb) default: ETH1394_PRINT(KERN_DEBUG, dev->name, "unable to resolve type %04x addresses.\n", - ntohs(eth->h_proto)); + eth->h_proto); break; } @@ -792,8 +796,9 @@ static int ether1394_header_cache(struct neighbour *neigh, struct hh_cache *hh) (16 - ETH1394_HLEN)); struct net_device *dev = neigh->dev; - if (type == htons(ETH_P_802_3)) + if (type == __constant_htons(ETH_P_802_3)) { return -1; + } eth->h_proto = type; memcpy(eth->h_dest, neigh->ha, dev->addr_len); @@ -882,7 +887,7 @@ static inline u16 ether1394_parse_encap(struct sk_buff *skb, /* If this is an ARP packet, convert it. First, we want to make * use of some of the fields, since they tell us a little bit * about the sending machine. */ - if (ether_type == htons(ETH_P_ARP)) { + if (ether_type == __constant_htons (ETH_P_ARP)) { struct eth1394_arp *arp1394 = (struct eth1394_arp*)skb->data; struct arphdr *arp = (struct arphdr *)skb->data; unsigned char *arp_ptr = (unsigned char *)(arp + 1); @@ -930,7 +935,7 @@ static inline u16 ether1394_parse_encap(struct sk_buff *skb, *(u32*)arp_ptr = arp1394->sip; /* move sender IP addr */ arp_ptr += arp->ar_pln; /* skip over sender IP addr */ - if (arp->ar_op == htons(ARPOP_REQUEST)) + if (arp->ar_op == 1) /* just set ARP req target unique ID to 0 */ *((u64*)arp_ptr) = 0; else @@ -938,8 +943,8 @@ static inline u16 ether1394_parse_encap(struct sk_buff *skb, } /* Now add the ethernet header. */ - if (dev->hard_header(skb, dev, ntohs(ether_type), &dest_hw, NULL, - skb->len) >= 0) + if (dev->hard_header (skb, dev, __constant_ntohs (ether_type), + &dest_hw, NULL, skb->len) >= 0) ret = ether1394_type_trans(skb, dev); return ret; @@ -1074,7 +1079,8 @@ static inline int update_partial_datagram(struct list_head *pdgl, struct list_he /* Move list entry to beginnig of list so that oldest partial * datagrams percolate to the end of the list */ - list_move(lh, pdgl); + list_del(lh); + list_add(lh, pdgl); return 0; } @@ -1389,7 +1395,7 @@ static inline void ether1394_arp_to_1394arp(struct sk_buff *skb, /* We need to encapsulate the standard header with our own. We use the * ethernet header's proto for our own. */ static inline unsigned int ether1394_encapsulate_prep(unsigned int max_payload, - __be16 proto, + int proto, union eth1394_hdr *hdr, u16 dg_size, u16 dgl) { @@ -1508,8 +1514,8 @@ static inline void ether1394_prep_gasp_packet(struct hpsb_packet *p, p->data = ((quadlet_t*)skb->data) - 2; p->data[0] = cpu_to_be32((priv->host->node_id << 16) | ETHER1394_GASP_SPECIFIER_ID_HI); - p->data[1] = cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) | - ETHER1394_GASP_VERSION); + p->data[1] = __constant_cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) | + ETHER1394_GASP_VERSION); /* Setting the node id to ALL_NODES (not LOCAL_BUS | ALL_NODES) * prevents hpsb_send_packet() from setting the speed to an arbitrary @@ -1620,7 +1626,7 @@ static int ether1394_tx (struct sk_buff *skb, struct net_device *dev) gfp_t kmflags = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; struct eth1394hdr *eth; struct eth1394_priv *priv = netdev_priv(dev); - __be16 proto; + int proto; unsigned long flags; nodeid_t dest_node; eth1394_tx_type tx_type; @@ -1664,9 +1670,9 @@ static int ether1394_tx (struct sk_buff *skb, struct net_device *dev) /* Set the transmission type for the packet. ARP packets and IP * broadcast packets are sent via GASP. */ if (memcmp(eth->h_dest, dev->broadcast, ETH1394_ALEN) == 0 || - proto == htons(ETH_P_ARP) || - (proto == htons(ETH_P_IP) && - IN_MULTICAST(ntohl(skb->nh.iph->daddr)))) { + proto == __constant_htons(ETH_P_ARP) || + (proto == __constant_htons(ETH_P_IP) && + IN_MULTICAST(__constant_ntohl(skb->nh.iph->daddr)))) { tx_type = ETH1394_GASP; dest_node = LOCAL_BUS | ALL_NODES; max_payload = priv->bc_maxpayload - ETHER1394_GASP_OVERHEAD; @@ -1682,7 +1688,7 @@ static int ether1394_tx (struct sk_buff *skb, struct net_device *dev) goto fail; } node_info = (struct eth1394_node_info*)node->ud->device.driver_data; - if (node_info->fifo == CSR1212_INVALID_ADDR_SPACE) { + if (node_info->fifo == ETHER1394_INVALID_ADDR) { ret = -EAGAIN; goto fail; } @@ -1698,7 +1704,7 @@ static int ether1394_tx (struct sk_buff *skb, struct net_device *dev) } /* If this is an ARP packet, convert it */ - if (proto == htons(ETH_P_ARP)) + if (proto == __constant_htons (ETH_P_ARP)) ether1394_arp_to_1394arp (skb, dev); ptask->hdr.words.word1 = 0; diff --git a/drivers/ieee1394/eth1394.h b/drivers/ieee1394/eth1394.h index c45cbff91..a77213cfc 100644 --- a/drivers/ieee1394/eth1394.h +++ b/drivers/ieee1394/eth1394.h @@ -32,6 +32,8 @@ * S3200 (per Table 16-3 of IEEE 1394b-2002). */ #define ETHER1394_REGION_ADDR_LEN 4096 +#define ETHER1394_INVALID_ADDR ~0ULL + /* GASP identifier numbers for IPv4 over IEEE 1394 */ #define ETHER1394_GASP_SPECIFIER_ID 0x00005E #define ETHER1394_GASP_SPECIFIER_ID_HI ((ETHER1394_GASP_SPECIFIER_ID >> 8) & 0xffff) diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c index 694da82d8..491e6032b 100644 --- a/drivers/ieee1394/highlevel.c +++ b/drivers/ieee1394/highlevel.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -52,7 +53,7 @@ static struct hpsb_address_serve dummy_zero_addr, dummy_max_addr; static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, - struct hpsb_host *host) + struct hpsb_host *host) { struct hl_host_info *hi = NULL; @@ -67,18 +68,24 @@ static struct hl_host_info *hl_get_hostinfo(struct hpsb_highlevel *hl, } } read_unlock(&hl->host_info_lock); + return NULL; } + /* Returns a per host/driver data structure that was previously stored by * hpsb_create_hostinfo. */ void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host) { struct hl_host_info *hi = hl_get_hostinfo(hl, host); - return hi ? hi->data : NULL; + if (hi) + return hi->data; + + return NULL; } + /* If size is zero, then the return here is only valid for error checking */ void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, size_t data_size) @@ -89,8 +96,8 @@ void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, hi = hl_get_hostinfo(hl, host); if (hi) { - HPSB_ERR("%s called hpsb_create_hostinfo when hostinfo already" - " exists", hl->name); + HPSB_ERR("%s called hpsb_create_hostinfo when hostinfo already exists", + hl->name); return NULL; } @@ -113,6 +120,7 @@ void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, return data; } + int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *data) { @@ -124,14 +132,16 @@ int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, hi->data = data; return 0; } else - HPSB_ERR("%s called hpsb_set_hostinfo when hostinfo " - "already has data", hl->name); + HPSB_ERR("%s called hpsb_set_hostinfo when hostinfo already has data", + hl->name); } else HPSB_ERR("%s called hpsb_set_hostinfo when no hostinfo exists", hl->name); + return -EINVAL; } + void hpsb_destroy_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host) { struct hl_host_info *hi; @@ -144,20 +154,23 @@ void hpsb_destroy_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host) write_unlock_irqrestore(&hl->host_info_lock, flags); kfree(hi); } + return; } -void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host, - unsigned long key) + +void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host, unsigned long key) { struct hl_host_info *hi; hi = hl_get_hostinfo(hl, host); if (hi) hi->key = key; + return; } + void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key) { struct hl_host_info *hi; @@ -174,41 +187,46 @@ void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key) } } read_unlock(&hl->host_info_lock); + return data; } + static int highlevel_for_each_host_reg(struct hpsb_host *host, void *__data) { struct hpsb_highlevel *hl = __data; hl->add_host(host); - if (host->update_config_rom && hpsb_update_config_rom_image(host) < 0) - HPSB_ERR("Failed to generate Configuration ROM image for host " - "%s-%d", hl->name, host->id); + if (host->update_config_rom) { + if (hpsb_update_config_rom_image(host) < 0) { + HPSB_ERR("Failed to generate Configuration ROM image for host " + "%s-%d", hl->name, host->id); + } + } + return 0; } void hpsb_register_highlevel(struct hpsb_highlevel *hl) { - unsigned long flags; - - INIT_LIST_HEAD(&hl->addr_list); + INIT_LIST_HEAD(&hl->addr_list); INIT_LIST_HEAD(&hl->host_info_list); rwlock_init(&hl->host_info_lock); down_write(&hl_drivers_sem); - list_add_tail(&hl->hl_list, &hl_drivers); + list_add_tail(&hl->hl_list, &hl_drivers); up_write(&hl_drivers_sem); - write_lock_irqsave(&hl_irqs_lock, flags); + write_lock(&hl_irqs_lock); list_add_tail(&hl->irq_list, &hl_irqs); - write_unlock_irqrestore(&hl_irqs_lock, flags); + write_unlock(&hl_irqs_lock); if (hl->add_host) nodemgr_for_each_host(hl, highlevel_for_each_host_reg); - return; + + return; } static void __delete_addr(struct hpsb_address_serve *as) @@ -218,8 +236,7 @@ static void __delete_addr(struct hpsb_address_serve *as) kfree(as); } -static void __unregister_host(struct hpsb_highlevel *hl, struct hpsb_host *host, - int update_cr) +static void __unregister_host(struct hpsb_highlevel *hl, struct hpsb_host *host, int update_cr) { unsigned long flags; struct list_head *lh, *next; @@ -234,6 +251,7 @@ static void __unregister_host(struct hpsb_highlevel *hl, struct hpsb_host *host, write_lock_irqsave(&addr_space_lock, flags); list_for_each_safe (lh, next, &hl->addr_list) { as = list_entry(lh, struct hpsb_address_serve, hl_list); + if (as->host == host) __delete_addr(as); } @@ -241,12 +259,15 @@ static void __unregister_host(struct hpsb_highlevel *hl, struct hpsb_host *host, /* Now update the config-rom to reflect anything removed by the * highlevel driver. */ - if (update_cr && host->update_config_rom && - hpsb_update_config_rom_image(host) < 0) - HPSB_ERR("Failed to generate Configuration ROM image for host " - "%s-%d", hl->name, host->id); + if (update_cr && host->update_config_rom) { + if (hpsb_update_config_rom_image(host) < 0) { + HPSB_ERR("Failed to generate Configuration ROM image for host " + "%s-%d", hl->name, host->id); + } + } - /* Finally remove all the host info associated between these two. */ + /* And finally, remove all the host info associated between these + * two. */ hpsb_destroy_hostinfo(hl, host); } @@ -255,19 +276,18 @@ static int highlevel_for_each_host_unreg(struct hpsb_host *host, void *__data) struct hpsb_highlevel *hl = __data; __unregister_host(hl, host, 1); + return 0; } void hpsb_unregister_highlevel(struct hpsb_highlevel *hl) { - unsigned long flags; - - write_lock_irqsave(&hl_irqs_lock, flags); + write_lock(&hl_irqs_lock); list_del(&hl->irq_list); - write_unlock_irqrestore(&hl_irqs_lock, flags); + write_unlock(&hl_irqs_lock); down_write(&hl_drivers_sem); - list_del(&hl->hl_list); + list_del(&hl->hl_list); up_write(&hl_drivers_sem); nodemgr_for_each_host(hl, highlevel_for_each_host_unreg); @@ -281,7 +301,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, { struct hpsb_address_serve *as, *a1, *a2; struct list_head *entry; - u64 retval = CSR1212_INVALID_ADDR_SPACE; + u64 retval = ~0ULL; unsigned long flags; u64 align_mask = ~(alignment - 1); @@ -292,19 +312,14 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, return retval; } - /* default range, - * avoids controller's posted write area (see OHCI 1.1 clause 1.5) */ - if (start == CSR1212_INVALID_ADDR_SPACE && - end == CSR1212_INVALID_ADDR_SPACE) { - start = host->middle_addr_space; - end = CSR1212_ALL_SPACE_END; + if (start == ~0ULL && end == ~0ULL) { + start = CSR1212_ALL_SPACE_BASE + 0xffff00000000ULL; /* ohci1394.c limit */ + end = CSR1212_ALL_SPACE_END; } - if (((start|end) & ~align_mask) || (start >= end) || - (end > CSR1212_ALL_SPACE_END)) { - HPSB_ERR("%s called with invalid addresses " - "(start = %012Lx end = %012Lx)", __FUNCTION__, - (unsigned long long)start,(unsigned long long)end); + if (((start|end) & ~align_mask) || (start >= end) || (end > 0x1000000000000ULL)) { + HPSB_ERR("%s called with invalid addresses (start = %012Lx end = %012Lx)", + __FUNCTION__, (unsigned long long)start, (unsigned long long)end); return retval; } @@ -318,21 +333,20 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, as->host = host; write_lock_irqsave(&addr_space_lock, flags); + list_for_each(entry, &host->addr_space) { u64 a1sa, a1ea; u64 a2sa, a2ea; a1 = list_entry(entry, struct hpsb_address_serve, host_list); - a2 = list_entry(entry->next, struct hpsb_address_serve, - host_list); + a2 = list_entry(entry->next, struct hpsb_address_serve, host_list); a1sa = a1->start & align_mask; a1ea = (a1->end + alignment -1) & align_mask; a2sa = a2->start & align_mask; a2ea = (a2->end + alignment -1) & align_mask; - if ((a2sa - a1ea >= size) && (a2sa - start >= size) && - (a2sa > start)) { + if ((a2sa - a1ea >= size) && (a2sa - start >= size) && (a2sa > start)) { as->start = max(start, a1ea); as->end = as->start + size; list_add(&as->host_list, entry); @@ -341,45 +355,47 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl, break; } } + write_unlock_irqrestore(&addr_space_lock, flags); - if (retval == CSR1212_INVALID_ADDR_SPACE) + if (retval == ~0ULL) { kfree(as); + } + return retval; } int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, - struct hpsb_address_ops *ops, u64 start, u64 end) + struct hpsb_address_ops *ops, u64 start, u64 end) { - struct hpsb_address_serve *as; + struct hpsb_address_serve *as; struct list_head *lh; - int retval = 0; - unsigned long flags; + int retval = 0; + unsigned long flags; - if (((start|end) & 3) || (start >= end) || - (end > CSR1212_ALL_SPACE_END)) { - HPSB_ERR("%s called with invalid addresses", __FUNCTION__); - return 0; - } + if (((start|end) & 3) || (start >= end) || (end > 0x1000000000000ULL)) { + HPSB_ERR("%s called with invalid addresses", __FUNCTION__); + return 0; + } as = kmalloc(sizeof(*as), GFP_ATOMIC); if (!as) return 0; - INIT_LIST_HEAD(&as->host_list); - INIT_LIST_HEAD(&as->hl_list); - as->op = ops; - as->start = start; - as->end = end; + INIT_LIST_HEAD(&as->host_list); + INIT_LIST_HEAD(&as->hl_list); + as->op = ops; + as->start = start; + as->end = end; as->host = host; write_lock_irqsave(&addr_space_lock, flags); + list_for_each(lh, &host->addr_space) { struct hpsb_address_serve *as_this = list_entry(lh, struct hpsb_address_serve, host_list); struct hpsb_address_serve *as_next = - list_entry(lh->next, struct hpsb_address_serve, - host_list); + list_entry(lh->next, struct hpsb_address_serve, host_list); if (as_this->end > as->start) break; @@ -395,51 +411,60 @@ int hpsb_register_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, if (retval == 0) kfree(as); - return retval; + + return retval; } int hpsb_unregister_addrspace(struct hpsb_highlevel *hl, struct hpsb_host *host, - u64 start) + u64 start) { - int retval = 0; - struct hpsb_address_serve *as; - struct list_head *lh, *next; - unsigned long flags; + int retval = 0; + struct hpsb_address_serve *as; + struct list_head *lh, *next; + unsigned long flags; + + write_lock_irqsave(&addr_space_lock, flags); - write_lock_irqsave(&addr_space_lock, flags); list_for_each_safe (lh, next, &hl->addr_list) { - as = list_entry(lh, struct hpsb_address_serve, hl_list); - if (as->start == start && as->host == host) { + as = list_entry(lh, struct hpsb_address_serve, hl_list); + if (as->start == start && as->host == host) { __delete_addr(as); - retval = 1; - break; - } - } - write_unlock_irqrestore(&addr_space_lock, flags); - return retval; + retval = 1; + break; + } + } + + write_unlock_irqrestore(&addr_space_lock, flags); + + return retval; } int hpsb_listen_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, - unsigned int channel) + unsigned int channel) { - if (channel > 63) { - HPSB_ERR("%s called with invalid channel", __FUNCTION__); - return -EINVAL; - } - if (host->iso_listen_count[channel]++ == 0) - return host->driver->devctl(host, ISO_LISTEN_CHANNEL, channel); + if (channel > 63) { + HPSB_ERR("%s called with invalid channel", __FUNCTION__); + return -EINVAL; + } + + if (host->iso_listen_count[channel]++ == 0) { + return host->driver->devctl(host, ISO_LISTEN_CHANNEL, channel); + } + return 0; } void hpsb_unlisten_channel(struct hpsb_highlevel *hl, struct hpsb_host *host, - unsigned int channel) + unsigned int channel) { - if (channel > 63) { - HPSB_ERR("%s called with invalid channel", __FUNCTION__); - return; - } - if (--host->iso_listen_count[channel] == 0) - host->driver->devctl(host, ISO_UNLISTEN_CHANNEL, channel); + if (channel > 63) { + HPSB_ERR("%s called with invalid channel", __FUNCTION__); + return; + } + + if (--host->iso_listen_count[channel] == 0) { + host->driver->devctl(host, ISO_UNLISTEN_CHANNEL, channel); + } } static void init_hpsb_highlevel(struct hpsb_host *host) @@ -460,24 +485,26 @@ static void init_hpsb_highlevel(struct hpsb_host *host) void highlevel_add_host(struct hpsb_host *host) { - struct hpsb_highlevel *hl; + struct hpsb_highlevel *hl; init_hpsb_highlevel(host); down_read(&hl_drivers_sem); - list_for_each_entry(hl, &hl_drivers, hl_list) { + list_for_each_entry(hl, &hl_drivers, hl_list) { if (hl->add_host) hl->add_host(host); - } + } up_read(&hl_drivers_sem); - if (host->update_config_rom && hpsb_update_config_rom_image(host) < 0) - HPSB_ERR("Failed to generate Configuration ROM image for host " - "%s-%d", hl->name, host->id); + if (host->update_config_rom) { + if (hpsb_update_config_rom_image(host) < 0) + HPSB_ERR("Failed to generate Configuration ROM image for " + "host %s-%d", hl->name, host->id); + } } void highlevel_remove_host(struct hpsb_host *host) { - struct hpsb_highlevel *hl; + struct hpsb_highlevel *hl; down_read(&hl_drivers_sem); list_for_each_entry(hl, &hl_drivers, hl_list) @@ -487,169 +514,184 @@ void highlevel_remove_host(struct hpsb_host *host) void highlevel_host_reset(struct hpsb_host *host) { - unsigned long flags; - struct hpsb_highlevel *hl; + struct hpsb_highlevel *hl; - read_lock_irqsave(&hl_irqs_lock, flags); + read_lock(&hl_irqs_lock); list_for_each_entry(hl, &hl_irqs, irq_list) { - if (hl->host_reset) - hl->host_reset(host); - } - read_unlock_irqrestore(&hl_irqs_lock, flags); + if (hl->host_reset) + hl->host_reset(host); + } + read_unlock(&hl_irqs_lock); } void highlevel_iso_receive(struct hpsb_host *host, void *data, size_t length) { - unsigned long flags; - struct hpsb_highlevel *hl; - int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f; + struct hpsb_highlevel *hl; + int channel = (((quadlet_t *)data)[0] >> 8) & 0x3f; - read_lock_irqsave(&hl_irqs_lock, flags); + read_lock(&hl_irqs_lock); list_for_each_entry(hl, &hl_irqs, irq_list) { - if (hl->iso_receive) - hl->iso_receive(host, channel, data, length); - } - read_unlock_irqrestore(&hl_irqs_lock, flags); + if (hl->iso_receive) + hl->iso_receive(host, channel, data, length); + } + read_unlock(&hl_irqs_lock); } void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction, void *data, size_t length) { - unsigned long flags; - struct hpsb_highlevel *hl; - int cts = ((quadlet_t *)data)[0] >> 4; + struct hpsb_highlevel *hl; + int cts = ((quadlet_t *)data)[0] >> 4; - read_lock_irqsave(&hl_irqs_lock, flags); + read_lock(&hl_irqs_lock); list_for_each_entry(hl, &hl_irqs, irq_list) { - if (hl->fcp_request) - hl->fcp_request(host, nodeid, direction, cts, data, + if (hl->fcp_request) + hl->fcp_request(host, nodeid, direction, cts, data, length); - } - read_unlock_irqrestore(&hl_irqs_lock, flags); + } + read_unlock(&hl_irqs_lock); } -int highlevel_read(struct hpsb_host *host, int nodeid, void *data, u64 addr, - unsigned int length, u16 flags) +int highlevel_read(struct hpsb_host *host, int nodeid, void *data, + u64 addr, unsigned int length, u16 flags) { - struct hpsb_address_serve *as; - unsigned int partlength; - int rcode = RCODE_ADDRESS_ERROR; + struct hpsb_address_serve *as; + unsigned int partlength; + int rcode = RCODE_ADDRESS_ERROR; + + read_lock(&addr_space_lock); - read_lock(&addr_space_lock); list_for_each_entry(as, &host->addr_space, host_list) { if (as->start > addr) break; - if (as->end > addr) { - partlength = min(as->end - addr, (u64) length); + if (as->end > addr) { + partlength = min(as->end - addr, (u64) length); - if (as->op->read) - rcode = as->op->read(host, nodeid, data, + if (as->op->read) { + rcode = as->op->read(host, nodeid, data, addr, partlength, flags); - else - rcode = RCODE_TYPE_ERROR; + } else { + rcode = RCODE_TYPE_ERROR; + } data += partlength; - length -= partlength; - addr += partlength; + length -= partlength; + addr += partlength; - if ((rcode != RCODE_COMPLETE) || !length) - break; - } - } - read_unlock(&addr_space_lock); + if ((rcode != RCODE_COMPLETE) || !length) { + break; + } + } + } - if (length && (rcode == RCODE_COMPLETE)) - rcode = RCODE_ADDRESS_ERROR; - return rcode; + read_unlock(&addr_space_lock); + + if (length && (rcode == RCODE_COMPLETE)) { + rcode = RCODE_ADDRESS_ERROR; + } + + return rcode; } -int highlevel_write(struct hpsb_host *host, int nodeid, int destid, void *data, - u64 addr, unsigned int length, u16 flags) +int highlevel_write(struct hpsb_host *host, int nodeid, int destid, + void *data, u64 addr, unsigned int length, u16 flags) { - struct hpsb_address_serve *as; - unsigned int partlength; - int rcode = RCODE_ADDRESS_ERROR; + struct hpsb_address_serve *as; + unsigned int partlength; + int rcode = RCODE_ADDRESS_ERROR; + + read_lock(&addr_space_lock); - read_lock(&addr_space_lock); list_for_each_entry(as, &host->addr_space, host_list) { if (as->start > addr) break; - if (as->end > addr) { - partlength = min(as->end - addr, (u64) length); + if (as->end > addr) { + partlength = min(as->end - addr, (u64) length); - if (as->op->write) - rcode = as->op->write(host, nodeid, destid, - data, addr, partlength, - flags); - else - rcode = RCODE_TYPE_ERROR; + if (as->op->write) { + rcode = as->op->write(host, nodeid, destid, + data, addr, partlength, flags); + } else { + rcode = RCODE_TYPE_ERROR; + } data += partlength; - length -= partlength; - addr += partlength; + length -= partlength; + addr += partlength; - if ((rcode != RCODE_COMPLETE) || !length) - break; - } - } - read_unlock(&addr_space_lock); + if ((rcode != RCODE_COMPLETE) || !length) { + break; + } + } + } - if (length && (rcode == RCODE_COMPLETE)) - rcode = RCODE_ADDRESS_ERROR; - return rcode; + read_unlock(&addr_space_lock); + + if (length && (rcode == RCODE_COMPLETE)) { + rcode = RCODE_ADDRESS_ERROR; + } + + return rcode; } + int highlevel_lock(struct hpsb_host *host, int nodeid, quadlet_t *store, - u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, - u16 flags) + u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, u16 flags) { - struct hpsb_address_serve *as; - int rcode = RCODE_ADDRESS_ERROR; + struct hpsb_address_serve *as; + int rcode = RCODE_ADDRESS_ERROR; + + read_lock(&addr_space_lock); - read_lock(&addr_space_lock); list_for_each_entry(as, &host->addr_space, host_list) { if (as->start > addr) break; - if (as->end > addr) { - if (as->op->lock) - rcode = as->op->lock(host, nodeid, store, addr, - data, arg, ext_tcode, - flags); - else - rcode = RCODE_TYPE_ERROR; - break; - } - } - read_unlock(&addr_space_lock); - return rcode; + if (as->end > addr) { + if (as->op->lock) { + rcode = as->op->lock(host, nodeid, store, addr, + data, arg, ext_tcode, flags); + } else { + rcode = RCODE_TYPE_ERROR; + } + + break; + } + } + + read_unlock(&addr_space_lock); + + return rcode; } int highlevel_lock64(struct hpsb_host *host, int nodeid, octlet_t *store, - u64 addr, octlet_t data, octlet_t arg, int ext_tcode, - u16 flags) + u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags) { - struct hpsb_address_serve *as; - int rcode = RCODE_ADDRESS_ERROR; + struct hpsb_address_serve *as; + int rcode = RCODE_ADDRESS_ERROR; - read_lock(&addr_space_lock); + read_lock(&addr_space_lock); list_for_each_entry(as, &host->addr_space, host_list) { if (as->start > addr) break; - if (as->end > addr) { - if (as->op->lock64) - rcode = as->op->lock64(host, nodeid, store, - addr, data, arg, - ext_tcode, flags); - else - rcode = RCODE_TYPE_ERROR; - break; - } - } - read_unlock(&addr_space_lock); - return rcode; + if (as->end > addr) { + if (as->op->lock64) { + rcode = as->op->lock64(host, nodeid, store, + addr, data, arg, + ext_tcode, flags); + } else { + rcode = RCODE_TYPE_ERROR; + } + + break; + } + } + + read_unlock(&addr_space_lock); + + return rcode; } diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c index 4feead4a3..ba09741fc 100644 --- a/drivers/ieee1394/hosts.c +++ b/drivers/ieee1394/hosts.c @@ -10,6 +10,7 @@ * directory of the kernel sources for details. */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include "csr1212.h" #include "ieee1394.h" @@ -102,18 +102,10 @@ static int alloc_hostnum_cb(struct hpsb_host *host, void *__data) * driver specific parts, enable the controller and make it available * to the general subsystem using hpsb_add_host(). * - * Return Value: a pointer to the &hpsb_host if successful, %NULL if + * Return Value: a pointer to the &hpsb_host if succesful, %NULL if * no memory was available. */ -static DEFINE_MUTEX(host_num_alloc); - -/* - * The pending_packet_queue is special in that it's processed - * from hardirq context too (such as hpsb_bus_reset()). Hence - * split the lock class from the usual networking skb-head - * lock class by using a separate key for it: - */ -static struct lock_class_key pending_packet_queue_key; +static DECLARE_MUTEX(host_num_alloc); struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, struct device *dev) @@ -136,8 +128,6 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, h->driver = drv; skb_queue_head_init(&h->pending_packet_queue); - lockdep_set_class(&h->pending_packet_queue.lock, - &pending_packet_queue_key); INIT_LIST_HEAD(&h->addr_space); for (i = 2; i < 16; i++) @@ -158,7 +148,7 @@ 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); - mutex_lock(&host_num_alloc); + down(&host_num_alloc); while (nodemgr_for_each_host(&hostnum, alloc_hostnum_cb)) hostnum++; @@ -177,7 +167,7 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, class_device_register(&h->class_dev); get_device(&h->device); - mutex_unlock(&host_num_alloc); + up(&host_num_alloc); return h; } diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index 9ad4b2463..07d188ca8 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h @@ -30,14 +30,13 @@ struct hpsb_host { unsigned char iso_listen_count[64]; - int node_count; /* number of identified nodes on this bus */ - int selfid_count; /* total number of SelfIDs received */ - int nodes_active; /* number of nodes with active link layer */ - u8 speed[ALL_NODES]; /* speed between each node and local node */ + int node_count; /* number of identified nodes on this bus */ + int selfid_count; /* total number of SelfIDs received */ + int nodes_active; /* number of nodes that are actually active */ - nodeid_t node_id; /* node ID of this host */ - nodeid_t irm_id; /* ID of this bus' isochronous resource manager */ - nodeid_t busmgr_id; /* ID of this bus' bus manager */ + nodeid_t node_id; /* node ID of this host */ + nodeid_t irm_id; /* ID of this bus' isochronous resource manager */ + nodeid_t busmgr_id; /* ID of this bus' bus manager */ /* this nodes state */ unsigned in_bus_reset:1; @@ -56,7 +55,7 @@ struct hpsb_host { struct csr_control csr; /* Per node tlabel pool allocation */ - struct hpsb_tlabel_pool tpool[ALL_NODES]; + struct hpsb_tlabel_pool tpool[64]; struct hpsb_host_driver *driver; @@ -73,8 +72,6 @@ struct hpsb_host { unsigned int config_roms; struct list_head addr_space; - u64 low_addr_space; /* upper bound of physical DMA area */ - u64 middle_addr_space; /* upper bound of posted write area */ }; diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index f43739c5c..be6854e25 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -32,7 +33,6 @@ #include #include #include -#include #include #include @@ -285,9 +285,9 @@ static int check_selfids(struct hpsb_host *host) static void build_speed_map(struct hpsb_host *host, int nodecount) { + u8 speedcap[nodecount]; u8 cldcnt[nodecount]; u8 *map = host->speed_map; - u8 *speedcap = host->speed; struct selfid *sid; struct ext_selfid *esid; int i, j, n; @@ -354,11 +354,6 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) } } } - - /* assume maximum speed for 1394b PHYs, nodemgr will correct it */ - for (n = 0; n < nodecount; n++) - if (speedcap[n] == 3) - speedcap[n] = IEEE1394_SPEED_MAX; } @@ -559,10 +554,11 @@ int hpsb_send_packet(struct hpsb_packet *packet) return 0; } - if (packet->type == hpsb_async && - NODEID_TO_NODE(packet->node_id) != ALL_NODES) + if (packet->type == hpsb_async && packet->node_id != ALL_NODES) { packet->speed_code = - host->speed[NODEID_TO_NODE(packet->node_id)]; + host->speed_map[NODEID_TO_NODE(host->node_id) * 64 + + NODEID_TO_NODE(packet->node_id)]; + } dump_packet("send packet", packet->header, packet->header_size, packet->speed_code); @@ -1001,8 +997,11 @@ void abort_timedouts(unsigned long __opaque) * packets that have a "complete" function are sent here. This way, the * completion is run out of kernel context, and doesn't block the rest of * the stack. */ -static struct task_struct *khpsbpkt_thread; +static int khpsbpkt_pid = -1, khpsbpkt_kill; +static DECLARE_COMPLETION(khpsbpkt_complete); static struct sk_buff_head hpsbpkt_queue; +static DECLARE_MUTEX_LOCKED(khpsbpkt_sig); + static void queue_packet_complete(struct hpsb_packet *packet) { @@ -1012,7 +1011,9 @@ static void queue_packet_complete(struct hpsb_packet *packet) } if (packet->complete_routine != NULL) { skb_queue_tail(&hpsbpkt_queue, packet->skb); - wake_up_process(khpsbpkt_thread); + + /* Signal the kernel thread to handle this */ + up(&khpsbpkt_sig); } return; } @@ -1024,9 +1025,19 @@ static int hpsbpkt_thread(void *__hi) void (*complete_routine)(void*); void *complete_data; + daemonize("khpsbpkt"); + current->flags |= PF_NOFREEZE; - while (!kthread_should_stop()) { + while (1) { + if (down_interruptible(&khpsbpkt_sig)) { + printk("khpsbpkt: received unexpected signal?!\n" ); + break; + } + + if (khpsbpkt_kill) + break; + while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) { packet = (struct hpsb_packet *)skb->data; @@ -1037,13 +1048,9 @@ static int hpsbpkt_thread(void *__hi) complete_routine(complete_data); } - - set_current_state(TASK_INTERRUPTIBLE); - if (!skb_peek(&hpsbpkt_queue)) - schedule(); - __set_current_state(TASK_RUNNING); } - return 0; + + complete_and_exit(&khpsbpkt_complete, 0); } static int __init ieee1394_init(void) @@ -1058,10 +1065,10 @@ static int __init ieee1394_init(void) HPSB_ERR("Some features may not be available\n"); } - khpsbpkt_thread = kthread_run(hpsbpkt_thread, NULL, "khpsbpkt"); - if (IS_ERR(khpsbpkt_thread)) { + khpsbpkt_pid = kernel_thread(hpsbpkt_thread, NULL, CLONE_KERNEL); + if (khpsbpkt_pid < 0) { HPSB_ERR("Failed to start hpsbpkt thread!\n"); - ret = PTR_ERR(khpsbpkt_thread); + ret = -ENOMEM; goto exit_cleanup_config_roms; } @@ -1141,7 +1148,10 @@ release_all_bus: release_chrdev: unregister_chrdev_region(IEEE1394_CORE_DEV, 256); exit_release_kernel_thread: - kthread_stop(khpsbpkt_thread); + if (khpsbpkt_pid >= 0) { + kill_proc(khpsbpkt_pid, SIGTERM, 1); + wait_for_completion(&khpsbpkt_complete); + } exit_cleanup_config_roms: hpsb_cleanup_config_roms(); return ret; @@ -1162,7 +1172,12 @@ static void __exit ieee1394_cleanup(void) bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]); bus_unregister(&ieee1394_bus_type); - kthread_stop(khpsbpkt_thread); + if (khpsbpkt_pid >= 0) { + khpsbpkt_kill = 1; + mb(); + up(&khpsbpkt_sig); + wait_for_completion(&khpsbpkt_complete); + } hpsb_cleanup_config_roms(); diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index 0ecbf335c..e7b55e895 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h @@ -139,7 +139,7 @@ int hpsb_bus_reset(struct hpsb_host *host); /* * Hand over received selfid packet to the core. Complement check (second - * quadlet is complement of first) is expected to be done and successful. + * quadlet is complement of first) is expected to be done and succesful. */ void hpsb_selfid_received(struct hpsb_host *host, quadlet_t sid); diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c index a114b91d6..3fe2f6c4a 100644 --- a/drivers/ieee1394/ieee1394_transactions.c +++ b/drivers/ieee1394/ieee1394_transactions.c @@ -136,11 +136,8 @@ int hpsb_get_tlabel(struct hpsb_packet *packet) { unsigned long flags; struct hpsb_tlabel_pool *tp; - int n = NODEID_TO_NODE(packet->node_id); - if (unlikely(n == ALL_NODES)) - return 0; - tp = &packet->host->tpool[n]; + tp = &packet->host->tpool[packet->node_id & NODE_MASK]; if (irqs_disabled() || in_atomic()) { if (down_trylock(&tp->count)) @@ -178,11 +175,8 @@ void hpsb_free_tlabel(struct hpsb_packet *packet) { unsigned long flags; struct hpsb_tlabel_pool *tp; - int n = NODEID_TO_NODE(packet->node_id); - if (unlikely(n == ALL_NODES)) - return; - tp = &packet->host->tpool[n]; + tp = &packet->host->tpool[packet->node_id & NODE_MASK]; BUG_ON(packet->tlabel > 63 || packet->tlabel < 0); diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 8b12e668b..082c7fd23 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -8,8 +8,8 @@ * directory of the kernel sources for details. */ -#include #include +#include #include #include #include @@ -38,7 +38,6 @@ struct nodemgr_csr_info { struct hpsb_host *host; nodeid_t nodeid; unsigned int generation; - unsigned int speed_unverified:1; }; @@ -58,75 +57,23 @@ static char *nodemgr_find_oui_name(int oui) return NULL; } -/* - * Correct the speed map entry. This is necessary - * - for nodes with link speed < phy speed, - * - for 1394b nodes with negotiated phy port speed < IEEE1394_SPEED_MAX. - * A possible speed is determined by trial and error, using quadlet reads. - */ -static int nodemgr_check_speed(struct nodemgr_csr_info *ci, u64 addr, - quadlet_t *buffer) -{ - quadlet_t q; - u8 i, *speed, old_speed, good_speed; - int ret; - - speed = ci->host->speed + NODEID_TO_NODE(ci->nodeid); - old_speed = *speed; - good_speed = IEEE1394_SPEED_MAX + 1; - - /* Try every speed from S100 to old_speed. - * If we did it the other way around, a too low speed could be caught - * if the retry succeeded for some other reason, e.g. because the link - * just finished its initialization. */ - for (i = IEEE1394_SPEED_100; i <= old_speed; i++) { - *speed = i; - ret = hpsb_read(ci->host, ci->nodeid, ci->generation, addr, - &q, sizeof(quadlet_t)); - if (ret) - break; - *buffer = q; - good_speed = i; - } - if (good_speed <= IEEE1394_SPEED_MAX) { - HPSB_DEBUG("Speed probe of node " NODE_BUS_FMT " yields %s", - NODE_BUS_ARGS(ci->host, ci->nodeid), - hpsb_speedto_str[good_speed]); - *speed = good_speed; - ci->speed_unverified = 0; - return 0; - } - *speed = old_speed; - return ret; -} static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length, void *buffer, void *__ci) { struct nodemgr_csr_info *ci = (struct nodemgr_csr_info*)__ci; - int i, ret; + int i, ret = 0; for (i = 1; ; i++) { ret = hpsb_read(ci->host, ci->nodeid, ci->generation, addr, buffer, length); - if (!ret) { - ci->speed_unverified = 0; - break; - } - /* Give up after 3rd failure. */ - if (i == 3) + if (!ret || i == 3) break; - /* The ieee1394_core guessed the node's speed capability from - * the self ID. Check whether a lower speed works. */ - if (ci->speed_unverified && length == sizeof(quadlet_t)) { - ret = nodemgr_check_speed(ci, addr, buffer); - if (!ret) - break; - } if (msleep_interruptible(334)) return -EINTR; } + return ret; } @@ -334,12 +281,10 @@ static ssize_t fw_show_ne_bus_options(struct device *dev, struct device_attribut static DEVICE_ATTR(bus_options,S_IRUGO,fw_show_ne_bus_options,NULL); -/* tlabels_free, tlabels_allocations, tlabels_mask are read non-atomically - * here, therefore displayed values may be occasionally wrong. */ static ssize_t fw_show_ne_tlabels_free(struct device *dev, struct device_attribute *attr, char *buf) { struct node_entry *ne = container_of(dev, struct node_entry, device); - return sprintf(buf, "%d\n", 64 - bitmap_weight(ne->tpool->pool, 64)); + return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1); } static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL); @@ -1259,8 +1204,6 @@ static void nodemgr_node_scan_one(struct host_info *hi, ci->host = host; ci->nodeid = nodeid; ci->generation = generation; - ci->speed_unverified = - host->speed[NODEID_TO_NODE(nodeid)] > IEEE1394_SPEED_100; /* We need to detect when the ConfigROM's generation has changed, * so we only update the node's info when it needs to be. */ @@ -1326,7 +1269,6 @@ static void nodemgr_node_scan(struct host_info *hi, int generation) } -/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader. */ static void nodemgr_suspend_ne(struct node_entry *ne) { struct class_device *cdev; @@ -1379,14 +1321,15 @@ static void nodemgr_resume_ne(struct node_entry *ne) } -/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader. */ static void nodemgr_update_pdrv(struct node_entry *ne) { struct unit_directory *ud; struct hpsb_protocol_driver *pdrv; + struct class *class = &nodemgr_ud_class; struct class_device *cdev; - list_for_each_entry(cdev, &nodemgr_ud_class.children, node) { + down_read(&class->subsys.rwsem); + list_for_each_entry(cdev, &class->children, node) { ud = container_of(cdev, struct unit_directory, class_dev); if (ud->ne != ne || !ud->device.driver) continue; @@ -1399,6 +1342,7 @@ static void nodemgr_update_pdrv(struct node_entry *ne) up_write(&ud->device.bus->subsys.rwsem); } } + up_read(&class->subsys.rwsem); } @@ -1429,8 +1373,6 @@ static void nodemgr_irm_write_bc(struct node_entry *ne, int generation) } -/* Caller needs to hold nodemgr_ud_class.subsys.rwsem as reader because the - * calls to nodemgr_update_pdrv() and nodemgr_suspend_ne() here require it. */ static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation) { struct device *dev; diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index ab5a6b526..d1788cdf0 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c @@ -82,6 +82,7 @@ * */ +#include #include #include #include @@ -162,7 +163,7 @@ printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , /* Module Parameters */ static int phys_dma = 1; -module_param(phys_dma, int, 0444); +module_param(phys_dma, int, 0644); MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1)."); static void dma_trm_tasklet(unsigned long data); @@ -552,8 +553,7 @@ static void ohci_initialize(struct ti_ohci *ohci) * register content. * To actually enable physical responses is the job of our interrupt * handler which programs the physical request filter. */ - reg_write(ohci, OHCI1394_PhyUpperBound, - OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED >> 16); + reg_write(ohci, OHCI1394_PhyUpperBound, 0x01000000); DBGMSG("physUpperBoundOffset=%08x", reg_read(ohci, OHCI1394_PhyUpperBound)); @@ -580,20 +580,23 @@ static void ohci_initialize(struct ti_ohci *ohci) OHCI1394_isochRx | OHCI1394_isochTx | OHCI1394_postedWriteErr | - OHCI1394_cycleTooLong | OHCI1394_cycleInconsistent); /* Enable link */ reg_write(ohci, OHCI1394_HCControlSet, OHCI1394_HCControl_linkEnable); buf = reg_read(ohci, OHCI1394_Version); +#ifndef __sparc__ sprintf (irq_buf, "%d", ohci->dev->irq); +#else + sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq)); +#endif PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] " - "MMIO=[%llx-%llx] Max Packet=[%d] IR/IT contexts=[%d/%d]", + "MMIO=[%lx-%lx] Max Packet=[%d] IR/IT contexts=[%d/%d]", ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10), ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf, - (unsigned long long)pci_resource_start(ohci->dev, 0), - (unsigned long long)pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1, + pci_resource_start(ohci->dev, 0), + pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1, ohci->max_packet_size, ohci->nb_iso_rcv_ctx, ohci->nb_iso_xmit_ctx); @@ -2383,15 +2386,6 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, PRINT(KERN_ERR, "physical posted write error"); /* no recovery strategy yet, had to involve protocol drivers */ } - if (event & OHCI1394_cycleTooLong) { - if(printk_ratelimit()) - PRINT(KERN_WARNING, "isochronous cycle too long"); - else - DBGMSG("OHCI1394_cycleTooLong"); - reg_write(ohci, OHCI1394_LinkControlSet, - OHCI1394_LinkControl_CycleMaster); - event &= ~OHCI1394_cycleTooLong; - } if (event & OHCI1394_cycleInconsistent) { /* We subscribe to the cycleInconsistent event only to * clear the corresponding event bit... otherwise, @@ -3216,20 +3210,7 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, { struct hpsb_host *host; struct ti_ohci *ohci; /* shortcut to currently handled device */ - resource_size_t ohci_base; - -#ifdef CONFIG_PPC_PMAC - /* Necessary on some machines if ohci1394 was loaded/ unloaded before */ - if (machine_is(powermac)) { - struct device_node *of_node = pci_device_to_OF_node(dev); - - if (of_node) { - pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node, - 0, 1); - pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1); - } - } -#endif /* CONFIG_PPC_PMAC */ + unsigned long ohci_base; if (pci_enable_device(dev)) FAIL(-ENXIO, "Failed to enable OHCI hardware"); @@ -3282,16 +3263,15 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, * clearly says it's 2kb, so this shouldn't be a problem. */ ohci_base = pci_resource_start(dev, 0); if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE) - PRINT(KERN_WARNING, "PCI resource length of 0x%llx too small!", - (unsigned long long)pci_resource_len(dev, 0)); + PRINT(KERN_WARNING, "PCI resource length of %lx too small!", + pci_resource_len(dev, 0)); /* Seems PCMCIA handles this internally. Not sure why. Seems * pretty bogus to force a driver to special case this. */ #ifndef PCMCIA if (!request_mem_region (ohci_base, OHCI1394_REGISTER_SIZE, OHCI1394_DRIVER_NAME)) - FAIL(-ENOMEM, "MMIO resource (0x%llx - 0x%llx) unavailable", - (unsigned long long)ohci_base, - (unsigned long long)ohci_base + OHCI1394_REGISTER_SIZE); + FAIL(-ENOMEM, "MMIO resource (0x%lx - 0x%lx) unavailable", + ohci_base, ohci_base + OHCI1394_REGISTER_SIZE); #endif ohci->init_state = OHCI_INIT_HAVE_MEM_REGION; @@ -3405,12 +3385,12 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, spin_lock_init(&ohci->event_lock); /* - * interrupts are disabled, all right, but... due to IRQF_SHARED we + * interrupts are disabled, all right, but... due to SA_SHIRQ we * might get called anyway. We'll see no event, of course, but * we need to get to that "no event", so enough should be initialized * by that point. */ - if (request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, + if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, OHCI1394_DRIVER_NAME, ohci)) FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); @@ -3424,14 +3404,6 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, host->csr.max_rec = (reg_read(ohci, OHCI1394_BusOptions) >> 12) & 0xf; host->csr.lnk_spd = reg_read(ohci, OHCI1394_BusOptions) & 0x7; - if (phys_dma) { - host->low_addr_space = - (u64) reg_read(ohci, OHCI1394_PhyUpperBound) << 16; - if (!host->low_addr_space) - host->low_addr_space = OHCI1394_PHYS_UPPER_BOUND_FIXED; - } - host->middle_addr_space = OHCI1394_MIDDLE_ADDRESS_SPACE; - /* Tell the highlevel this host is ready */ if (hpsb_add_host(host)) FAIL(-ENOMEM, "Failed to register host with highlevel"); @@ -3490,13 +3462,24 @@ static void ohci1394_pci_remove(struct pci_dev *pdev) case OHCI_INIT_HAVE_TXRX_BUFFERS__MAYBE: /* The ohci_soft_reset() stops all DMA contexts, so we * dont need to do this. */ + /* Free AR dma */ free_dma_rcv_ctx(&ohci->ar_req_context); free_dma_rcv_ctx(&ohci->ar_resp_context); + + /* Free AT dma */ free_dma_trm_ctx(&ohci->at_req_context); free_dma_trm_ctx(&ohci->at_resp_context); + + /* Free IR dma */ free_dma_rcv_ctx(&ohci->ir_legacy_context); + + /* Free IT dma */ free_dma_trm_ctx(&ohci->it_legacy_context); + /* Free IR legacy dma */ + free_dma_rcv_ctx(&ohci->ir_legacy_context); + + case OHCI_INIT_HAVE_SELFID_BUFFER: pci_free_consistent(ohci->dev, OHCI1394_SI_DMA_BUF_SIZE, ohci->selfid_buf_cpu, @@ -3519,9 +3502,11 @@ static void ohci1394_pci_remove(struct pci_dev *pdev) #endif #ifdef CONFIG_PPC_PMAC - /* On UniNorth, power down the cable and turn off the chip clock - * to save power on laptops */ - if (machine_is(powermac)) { + /* On UniNorth, power down the cable and turn off the chip + * clock when the module is removed to save power on + * laptops. Turning it back ON is done by the arch code when + * pci_enable_device() is called */ + { struct device_node* of_node; of_node = pci_device_to_OF_node(ohci->dev); diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h index fa05f113f..7df096214 100644 --- a/drivers/ieee1394/ohci1394.h +++ b/drivers/ieee1394/ohci1394.h @@ -443,16 +443,6 @@ static inline u32 reg_read(const struct ti_ohci *ohci, int offset) #define OHCI1394_TCODE_PHY 0xE -/* Node offset map (phys DMA area, posted write area). - * The value of OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED may be modified but must - * be lower than OHCI1394_MIDDLE_ADDRESS_SPACE. - * OHCI1394_PHYS_UPPER_BOUND_FIXED and OHCI1394_MIDDLE_ADDRESS_SPACE are - * constants given by the OHCI spec. - */ -#define OHCI1394_PHYS_UPPER_BOUND_FIXED 0x000100000000ULL /* 4 GB */ -#define OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED 0x010000000000ULL /* 1 TB */ -#define OHCI1394_MIDDLE_ADDRESS_SPACE 0xffff00000000ULL - void ohci1394_init_iso_tasklet(struct ohci1394_iso_tasklet *tasklet, int type, void (*func)(unsigned long), diff --git a/drivers/ieee1394/oui2c.sh b/drivers/ieee1394/oui2c.sh index b9d0e8f10..d50dc7a2d 100644 --- a/drivers/ieee1394/oui2c.sh +++ b/drivers/ieee1394/oui2c.sh @@ -3,6 +3,7 @@ cat < #ifdef CONFIG_IEEE1394_OUI_DB struct oui_list_struct { diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c index e6f41238f..e2edc41e1 100644 --- a/drivers/ieee1394/pcilynx.c +++ b/drivers/ieee1394/pcilynx.c @@ -30,6 +30,7 @@ * Enhancements in async and iso send code */ +#include #include #include #include @@ -1251,9 +1252,13 @@ static int __devinit add_card(struct pci_dev *dev, /* Fix buggy cards with autoboot pin not tied low: */ reg_write(lynx, DMA0_CHAN_CTRL, 0); +#ifndef __sparc__ sprintf (irq_buf, "%d", dev->irq); +#else + sprintf (irq_buf, "%s", __irq_itoa(dev->irq)); +#endif - if (!request_irq(dev->irq, lynx_irq_handler, IRQF_SHARED, + if (!request_irq(dev->irq, lynx_irq_handler, SA_SHIRQ, PCILYNX_DRIVER_NAME, lynx)) { PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf); lynx->state = have_intr; diff --git a/drivers/ieee1394/pcilynx.h b/drivers/ieee1394/pcilynx.h index ec27321f6..d631aa838 100644 --- a/drivers/ieee1394/pcilynx.h +++ b/drivers/ieee1394/pcilynx.h @@ -1,6 +1,7 @@ #ifndef __PCILYNX_H__ #define __PCILYNX_H__ +#include #define PCILYNX_DRIVER_NAME "pcilynx" #define PCILYNX_MAJOR 177 diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c index 571ea68c0..f7de546f2 100644 --- a/drivers/ieee1394/raw1394.c +++ b/drivers/ieee1394/raw1394.c @@ -132,7 +132,8 @@ static void free_pending_request(struct pending_request *req) static void __queue_complete_req(struct pending_request *req) { struct file_info *fi = req->file_info; - list_move_tail(&req->list, &fi->req_complete); + list_del(&req->list); + list_add_tail(&req->list, &fi->req_complete); up(&fi->complete_sem); wake_up_interruptible(&fi->poll_wait_complete); @@ -407,34 +408,34 @@ static void fcp_request(struct hpsb_host *host, int nodeid, int direction, #ifdef CONFIG_COMPAT struct compat_raw1394_req { - __u32 type; - __s32 error; - __u32 misc; + __u32 type; + __s32 error; + __u32 misc; - __u32 generation; - __u32 length; + __u32 generation; + __u32 length; - __u64 address; + __u64 address; - __u64 tag; + __u64 tag; - __u64 sendb; - __u64 recvb; -} __attribute__((packed)); + __u64 sendb; + __u64 recvb; +} __attribute__((packed)); static const char __user *raw1394_compat_write(const char __user *buf) { - struct compat_raw1394_req __user *cr = (typeof(cr)) buf; + struct compat_raw1394_req __user *cr = (typeof(cr)) buf; struct raw1394_request __user *r; r = compat_alloc_user_space(sizeof(struct raw1394_request)); #define C(x) __copy_in_user(&r->x, &cr->x, sizeof(r->x)) if (copy_in_user(r, cr, sizeof(struct compat_raw1394_req)) || - C(address) || - C(tag) || - C(sendb) || - C(recvb)) + C(address) || + C(tag) || + C(sendb) || + C(recvb)) return ERR_PTR(-EFAULT); return (const char __user *)r; } @@ -442,11 +443,11 @@ static const char __user *raw1394_compat_write(const char __user *buf) #define P(x) __put_user(r->x, &cr->x) -static int +static int raw1394_compat_read(const char __user *buf, struct raw1394_request *r) { - struct compat_raw1394_req __user *cr = (typeof(cr)) r; - if (!access_ok(VERIFY_WRITE, cr, sizeof(struct compat_raw1394_req)) || + struct compat_raw1394_req __user *cr = (typeof(cr)) r; + if (!access_ok(VERIFY_WRITE,cr,sizeof(struct compat_raw1394_req)) || P(type) || P(error) || P(misc) || @@ -511,17 +512,18 @@ static ssize_t raw1394_read(struct file *file, char __user * buffer, } #ifdef CONFIG_COMPAT - if (count == sizeof(struct compat_raw1394_req) && - sizeof(struct compat_raw1394_req) != - sizeof(struct raw1394_request)) { + if (count == sizeof(struct compat_raw1394_req) && + sizeof(struct compat_raw1394_req) != + sizeof(struct raw1394_request)) { ret = raw1394_compat_read(buffer, &req->req); - } else + + } else #endif { if (copy_to_user(buffer, &req->req, sizeof(req->req))) { ret = -EFAULT; goto out; - } + } ret = (ssize_t) sizeof(struct raw1394_request); } out: @@ -2346,6 +2348,7 @@ static int state_connected(struct file_info *fi, struct pending_request *req) return handle_async_request(fi, req, node); } + static ssize_t raw1394_write(struct file *file, const char __user * buffer, size_t count, loff_t * offset_is_ignored) { @@ -2354,9 +2357,9 @@ static ssize_t raw1394_write(struct file *file, const char __user * buffer, ssize_t retval = 0; #ifdef CONFIG_COMPAT - if (count == sizeof(struct compat_raw1394_req) && - sizeof(struct compat_raw1394_req) != - sizeof(struct raw1394_request)) { + if (count == sizeof(struct compat_raw1394_req) && + sizeof(struct compat_raw1394_req) != + sizeof(struct raw1394_request)) { buffer = raw1394_compat_write(buffer); if (IS_ERR(buffer)) return PTR_ERR(buffer); diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index b08755e2e..e084dbf76 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -38,6 +38,7 @@ * but the code needs additional debugging. */ +#include #include #include #include @@ -126,12 +127,10 @@ MODULE_PARM_DESC(max_sectors, "Change max sectors per I/O supported (default = " * talking to a single sbp2 device at the same time (filesystem coherency, * etc.). If you're running an sbp2 device that supports multiple logins, * and you're either running read-only filesystems or some sort of special - * filesystem supporting multiple hosts, e.g. OpenGFS, Oracle Cluster - * File System, or Lustre, then set exclusive_login to zero. - * - * So far only bridges from Oxford Semiconductor are known to support - * concurrent logins. Depending on firmware, four or two concurrent logins - * are possible on OXFW911 and newer Oxsemi bridges. + * filesystem supporting multiple hosts (one such filesystem is OpenGFS, + * see opengfs.sourceforge.net for more info), then set exclusive_login + * to zero. Note: The Oxsemi OXFW911 sbp2 chipset supports up to four + * concurrent logins. */ static int exclusive_login = 1; module_param(exclusive_login, int, 0644); @@ -307,9 +306,8 @@ static const struct { u32 model_id; unsigned workarounds; } sbp2_workarounds_table[] = { - /* DViCO Momobay CX-1 with TSB42AA9 bridge */ { + /* TSB42AA9 */ { .firmware_revision = 0x002800, - .model_id = 0x001010, .workarounds = SBP2_WORKAROUND_INQUIRY_36 | SBP2_WORKAROUND_MODE_SENSE_8, }, @@ -793,12 +791,12 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud scsi_id->ud = ud; scsi_id->speed_code = IEEE1394_SPEED_100; scsi_id->max_payload_size = sbp2_speedto_max_payload[IEEE1394_SPEED_100]; - scsi_id->status_fifo_addr = CSR1212_INVALID_ADDR_SPACE; atomic_set(&scsi_id->sbp2_login_complete, 0); INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse); INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed); INIT_LIST_HEAD(&scsi_id->scsi_list); spin_lock_init(&scsi_id->sbp2_command_orb_lock); + scsi_id->sbp2_lun = 0; ud->device.driver_data = scsi_id; @@ -846,8 +844,8 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud scsi_id->status_fifo_addr = hpsb_allocate_and_register_addrspace( &sbp2_highlevel, ud->ne->host, &sbp2_ops, sizeof(struct sbp2_status_block), sizeof(quadlet_t), - ud->ne->host->low_addr_space, CSR1212_ALL_SPACE_END); - if (scsi_id->status_fifo_addr == CSR1212_INVALID_ADDR_SPACE) { + 0x010000000000ULL, CSR1212_ALL_SPACE_END); + if (scsi_id->status_fifo_addr == ~0ULL) { SBP2_ERR("failed to allocate status FIFO address range"); goto failed_alloc; } @@ -1089,9 +1087,9 @@ static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id) SBP2_DMA_FREE("single query logins data"); } - if (scsi_id->status_fifo_addr != CSR1212_INVALID_ADDR_SPACE) + if (scsi_id->status_fifo_addr) hpsb_unregister_addrspace(&sbp2_highlevel, hi->host, - scsi_id->status_fifo_addr); + scsi_id->status_fifo_addr); scsi_id->ud->device.driver_data = NULL; @@ -1215,11 +1213,13 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id) SBP2_DEBUG("length_max_logins = %x", (unsigned int)scsi_id->query_logins_response->length_max_logins); + SBP2_DEBUG("Query logins to SBP-2 device successful"); + max_logins = RESPONSE_GET_MAX_LOGINS(scsi_id->query_logins_response->length_max_logins); - SBP2_INFO("Maximum concurrent logins supported: %d", max_logins); + SBP2_DEBUG("Maximum concurrent logins supported: %d", max_logins); active_logins = RESPONSE_GET_ACTIVE_LOGINS(scsi_id->query_logins_response->length_max_logins); - SBP2_INFO("Number of active logins: %d", active_logins); + SBP2_DEBUG("Number of active logins: %d", active_logins); if (active_logins >= max_logins) { return -EIO; @@ -1648,8 +1648,6 @@ static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, } } -#define SBP2_PAYLOAD_TO_BYTES(p) (1 << ((p) + 2)) - /* * This function is called in order to determine the max speed and packet * size we can use in our ORBs. Note, that we (the driver and host) only @@ -1662,12 +1660,13 @@ static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, static int sbp2_max_speed_and_size(struct scsi_id_instance_data *scsi_id) { struct sbp2scsi_host_info *hi = scsi_id->hi; - u8 payload; SBP2_DEBUG_ENTER(); + /* Initial setting comes from the hosts speed map */ scsi_id->speed_code = - hi->host->speed[NODEID_TO_NODE(scsi_id->ne->nodeid)]; + hi->host->speed_map[NODEID_TO_NODE(hi->host->node_id) * 64 + + NODEID_TO_NODE(scsi_id->ne->nodeid)]; /* Bump down our speed if the user requested it */ if (scsi_id->speed_code > max_speed) { @@ -1678,22 +1677,15 @@ static int sbp2_max_speed_and_size(struct scsi_id_instance_data *scsi_id) /* Payload size is the lesser of what our speed supports and what * our host supports. */ - payload = min(sbp2_speedto_max_payload[scsi_id->speed_code], - (u8) (hi->host->csr.max_rec - 1)); - - /* If physical DMA is off, work around limitation in ohci1394: - * packet size must not exceed PAGE_SIZE */ - if (scsi_id->ne->host->low_addr_space < (1ULL << 32)) - while (SBP2_PAYLOAD_TO_BYTES(payload) + 24 > PAGE_SIZE && - payload) - payload--; + scsi_id->max_payload_size = + min(sbp2_speedto_max_payload[scsi_id->speed_code], + (u8) (hi->host->csr.max_rec - 1)); HPSB_DEBUG("Node " NODE_BUS_FMT ": Max speed [%s] - Max payload [%u]", NODE_BUS_ARGS(hi->host, scsi_id->ne->nodeid), hpsb_speedto_str[scsi_id->speed_code], - SBP2_PAYLOAD_TO_BYTES(payload)); + 1 << ((u32) scsi_id->max_payload_size + 2)); - scsi_id->max_payload_size = payload; return 0; } @@ -2120,6 +2112,33 @@ static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense return sbp2_status[8] & 0x3f; /* return scsi status */ } +/* + * This function is called after a command is completed, in order to do any necessary SBP-2 + * response data translations for the SCSI stack + */ +static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, + struct scsi_cmnd *SCpnt) +{ + u8 *scsi_buf = SCpnt->request_buffer; + + SBP2_DEBUG_ENTER(); + + if (SCpnt->cmnd[0] == INQUIRY && (SCpnt->cmnd[1] & 3) == 0) { + /* + * Make sure data length is ok. Minimum length is 36 bytes + */ + if (scsi_buf[4] == 0) { + scsi_buf[4] = 36 - 5; + } + + /* + * Fix ansi revision and response data format + */ + scsi_buf[2] |= 2; + scsi_buf[3] = (scsi_buf[3] & 0xf0) | 2; + } +} + /* * This function deals with status writes from the SBP-2 device */ @@ -2458,6 +2477,13 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, SCpnt->result = DID_ERROR << 16; } + /* + * Take care of any sbp2 response data mucking here (RBC stuff, etc.) + */ + if (SCpnt->result == DID_OK << 16) { + sbp2_check_sbp2_response(scsi_id, SCpnt); + } + /* * If a bus reset is in progress and there was an error, complete * the command as busy so that it will get retried. diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h index b22ce1aa8..f4ccc9d0f 100644 --- a/drivers/ieee1394/sbp2.h +++ b/drivers/ieee1394/sbp2.h @@ -52,7 +52,7 @@ struct sbp2_command_orb { u32 data_descriptor_lo; u32 misc; u8 cdb[12]; -} __attribute__((packed)); +}; #define SBP2_LOGIN_REQUEST 0x0 #define SBP2_QUERY_LOGINS_REQUEST 0x1 @@ -80,7 +80,7 @@ struct sbp2_login_orb { u32 passwd_resp_lengths; u32 status_fifo_hi; u32 status_fifo_lo; -} __attribute__((packed)); +}; #define RESPONSE_GET_LOGIN_ID(value) (value & 0xffff) #define RESPONSE_GET_LENGTH(value) ((value >> 16) & 0xffff) @@ -91,7 +91,7 @@ struct sbp2_login_response { u32 command_block_agent_hi; u32 command_block_agent_lo; u32 reconnect_hold; -} __attribute__((packed)); +}; #define ORB_SET_LOGIN_ID(value) (value & 0xffff) @@ -106,7 +106,7 @@ struct sbp2_query_logins_orb { u32 reserved_resp_length; u32 status_fifo_hi; u32 status_fifo_lo; -} __attribute__((packed)); +}; #define RESPONSE_GET_MAX_LOGINS(value) (value & 0xffff) #define RESPONSE_GET_ACTIVE_LOGINS(value) ((RESPONSE_GET_LENGTH(value) - 4) / 12) @@ -116,7 +116,7 @@ struct sbp2_query_logins_response { u32 misc_IDs; u32 initiator_misc_hi; u32 initiator_misc_lo; -} __attribute__((packed)); +}; struct sbp2_reconnect_orb { u32 reserved1; @@ -127,7 +127,7 @@ struct sbp2_reconnect_orb { u32 reserved5; u32 status_fifo_hi; u32 status_fifo_lo; -} __attribute__((packed)); +}; struct sbp2_logout_orb { u32 reserved1; @@ -138,7 +138,7 @@ struct sbp2_logout_orb { u32 reserved5; u32 status_fifo_hi; u32 status_fifo_lo; -} __attribute__((packed)); +}; #define PAGE_TABLE_SET_SEGMENT_BASE_HI(value) (value & 0xffff) #define PAGE_TABLE_SET_SEGMENT_LENGTH(value) ((value & 0xffff) << 16) @@ -146,7 +146,7 @@ struct sbp2_logout_orb { struct sbp2_unrestricted_page_table { u32 length_segment_base_hi; u32 segment_base_lo; -} __attribute__((packed)); +}; #define RESP_STATUS_REQUEST_COMPLETE 0x0 #define RESP_STATUS_TRANSPORT_FAILURE 0x1 @@ -191,7 +191,7 @@ struct sbp2_status_block { u32 ORB_offset_hi_misc; u32 ORB_offset_lo; u8 command_set_dependent[24]; -} __attribute__((packed)); +}; /* * Miscellaneous SBP2 related config rom defines @@ -395,8 +395,9 @@ static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id, static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)); -static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, - unchar *sense_data); +static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense_data); +static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, + struct scsi_cmnd *SCpnt); static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, struct unit_directory *ud); static int sbp2_set_busy_timeout(struct scsi_id_instance_data *scsi_id); diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index c6e3f02bc..4e3bd62c4 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c @@ -28,6 +28,7 @@ * ENOTTY for unsupported ioctl request * */ +#include #include #include #include @@ -330,7 +331,7 @@ alloc_dma_iso_ctx(struct ti_ohci *ohci, int type, int num_desc, spin_lock_init(&d->lock); - DBGMSG(ohci->host->id, "Iso %s DMA: %d buffers " + PRINT(KERN_INFO, ohci->host->id, "Iso %s DMA: %d buffers " "of size %d allocated for a frame size %d, each with %d prgs", (type == OHCI_ISO_RECEIVE) ? "receive" : "transmit", d->num_desc - 1, d->buf_size, d->frame_size, d->nb_cmd); @@ -758,7 +759,7 @@ static int __video1394_ioctl(struct file *file, } else { mask = (u64)0x1<host->id, "mask: %08X%08X usage: %08X%08X\n", + PRINT(KERN_INFO, ohci->host->id, "mask: %08X%08X usage: %08X%08X\n", (u32)(mask>>32),(u32)(mask&0xffffffff), (u32)(ohci->ISO_channel_usage>>32), (u32)(ohci->ISO_channel_usage&0xffffffff)); @@ -804,7 +805,7 @@ static int __video1394_ioctl(struct file *file, v.buf_size = d->buf_size; list_add_tail(&d->link, &ctx->context_list); - DBGMSG(ohci->host->id, + PRINT(KERN_INFO, ohci->host->id, "iso context %d listen on channel %d", d->ctx, v.channel); } @@ -827,7 +828,7 @@ static int __video1394_ioctl(struct file *file, list_add_tail(&d->link, &ctx->context_list); - DBGMSG(ohci->host->id, + PRINT(KERN_INFO, ohci->host->id, "Iso context %d talk on channel %d", d->ctx, v.channel); } @@ -872,7 +873,7 @@ static int __video1394_ioctl(struct file *file, d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, channel); if (d == NULL) return -ESRCH; - DBGMSG(ohci->host->id, "Iso context %d " + PRINT(KERN_INFO, ohci->host->id, "Iso context %d " "stop talking on channel %d", d->ctx, channel); free_dma_iso_ctx(d); @@ -934,7 +935,7 @@ static int __video1394_ioctl(struct file *file, else { /* Wake up dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - DBGMSG(ohci->host->id, + PRINT(KERN_INFO, ohci->host->id, "Waking up iso dma ctx=%d", d->ctx); reg_write(ohci, d->ctrlSet, 0x1000); } @@ -1105,7 +1106,7 @@ static int __video1394_ioctl(struct file *file, else { /* Wake up dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - DBGMSG(ohci->host->id, + PRINT(KERN_INFO, ohci->host->id, "Waking up iso transmit dma ctx=%d", d->ctx); put_timestamp(ohci, d, d->last_buffer); @@ -1231,7 +1232,7 @@ static int video1394_release(struct inode *inode, struct file *file) "is not being used", d->channel); else ohci->ISO_channel_usage &= ~mask; - DBGMSG(ohci->host->id, "On release: Iso %s context " + PRINT(KERN_INFO, ohci->host->id, "On release: Iso %s context " "%d stop listening on channel %d", d->type == OHCI_ISO_RECEIVE ? "receive" : "transmit", d->ctx, d->channel); diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 69a53d476..afc612b85 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -29,11 +29,6 @@ config INFINIBAND_USER_ACCESS libibverbs, libibcm and a hardware driver library from . -config INFINIBAND_ADDR_TRANS - bool - depends on INFINIBAND && INET - default y - source "drivers/infiniband/hw/mthca/Kconfig" source "drivers/infiniband/hw/ipath/Kconfig" @@ -41,6 +36,4 @@ source "drivers/infiniband/ulp/ipoib/Kconfig" source "drivers/infiniband/ulp/srp/Kconfig" -source "drivers/infiniband/ulp/iser/Kconfig" - endmenu diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile index c7ff58c1d..eea27322a 100644 --- a/drivers/infiniband/Makefile +++ b/drivers/infiniband/Makefile @@ -3,4 +3,3 @@ obj-$(CONFIG_INFINIBAND_MTHCA) += hw/mthca/ obj-$(CONFIG_IPATH_CORE) += hw/ipath/ obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/ obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/ -obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/ diff --git a/drivers/infiniband/core/Makefile b/drivers/infiniband/core/Makefile index 68e73ec2d..ec3353f24 100644 --- a/drivers/infiniband/core/Makefile +++ b/drivers/infiniband/core/Makefile @@ -1,7 +1,5 @@ -infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS) := ib_addr.o rdma_cm.o - obj-$(CONFIG_INFINIBAND) += ib_core.o ib_mad.o ib_sa.o \ - ib_cm.o $(infiniband-y) + ib_cm.o obj-$(CONFIG_INFINIBAND_USER_MAD) += ib_umad.o obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o ib_ucm.o @@ -14,13 +12,8 @@ ib_sa-y := sa_query.o ib_cm-y := cm.o -rdma_cm-y := cma.o - -ib_addr-y := addr.o - ib_umad-y := user_mad.o ib_ucm-y := ucm.o -ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_mem.o \ - uverbs_marshall.o +ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_mem.o diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c deleted file mode 100644 index 1205e8027..000000000 --- a/drivers/infiniband/core/addr.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2005 Voltaire Inc. All rights reserved. - * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. - * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This Software is licensed under one of the following licenses: - * - * 1) under the terms of the "Common Public License 1.0" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/cpl.php. - * - * 2) under the terms of the "The BSD License" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/bsd-license.php. - * - * 3) under the terms of the "GNU General Public License (GPL) Version 2" a - * copy of which is available from the Open Source Initiative, see - * http://www.opensource.org/licenses/gpl-license.php. - * - * Licensee has the right to choose one of the above licenses. - * - * Redistributions of source code must retain the above copyright - * notice and one of the license notices. - * - * Redistributions in binary form must reproduce both the above copyright - * notice, one of the license notices in the documentation - * and/or other materials provided with the distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -MODULE_AUTHOR("Sean Hefty"); -MODULE_DESCRIPTION("IB Address Translation"); -MODULE_LICENSE("Dual BSD/GPL"); - -struct addr_req { - struct list_head list; - struct sockaddr src_addr; - struct sockaddr dst_addr; - struct rdma_dev_addr *addr; - void *context; - void (*callback)(int status, struct sockaddr *src_addr, - struct rdma_dev_addr *addr, void *context); - unsigned long timeout; - int status; -}; - -static void process_req(void *data); - -static DEFINE_MUTEX(lock); -static LIST_HEAD(req_list); -static DECLARE_WORK(work, process_req, NULL); -static struct workqueue_struct *addr_wq; - -static int copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev, - unsigned char *dst_dev_addr) -{ - switch (dev->type) { - case ARPHRD_INFINIBAND: - dev_addr->dev_type = IB_NODE_CA; - break; - default: - return -EADDRNOTAVAIL; - } - - memcpy(dev_addr->src_dev_addr, dev->dev_addr, MAX_ADDR_LEN); - memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN); - if (dst_dev_addr) - memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN); - return 0; -} - -int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr) -{ - struct net_device *dev; - u32 ip = ((struct sockaddr_in *) addr)->sin_addr.s_addr; - int ret; - - dev = ip_dev_find(ip); - if (!dev) - return -EADDRNOTAVAIL; - - ret = copy_addr(dev_addr, dev, NULL); - dev_put(dev); - return ret; -} -EXPORT_SYMBOL(rdma_translate_ip); - -static void set_timeout(unsigned long time) -{ - unsigned long delay; - - cancel_delayed_work(&work); - - delay = time - jiffies; - if ((long)delay <= 0) - delay = 1; - - queue_delayed_work(addr_wq, &work, delay); -} - -static void queue_req(struct addr_req *req) -{ - struct addr_req *temp_req; - - mutex_lock(&lock); - list_for_each_entry_reverse(temp_req, &req_list, list) { - if (time_after(req->timeout, temp_req->timeout)) - break; - } - - list_add(&req->list, &temp_req->list); - - if (req_list.next == &req->list) - set_timeout(req->timeout); - mutex_unlock(&lock); -} - -static void addr_send_arp(struct sockaddr_in *dst_in) -{ - struct rtable *rt; - struct flowi fl; - u32 dst_ip = dst_in->sin_addr.s_addr; - - memset(&fl, 0, sizeof fl); - fl.nl_u.ip4_u.daddr = dst_ip; - if (ip_route_output_key(&rt, &fl)) - return; - - arp_send(ARPOP_REQUEST, ETH_P_ARP, rt->rt_gateway, rt->idev->dev, - rt->rt_src, NULL, rt->idev->dev->dev_addr, NULL); - ip_rt_put(rt); -} - -static int addr_resolve_remote(struct sockaddr_in *src_in, - struct sockaddr_in *dst_in, - struct rdma_dev_addr *addr) -{ - u32 src_ip = src_in->sin_addr.s_addr; - u32 dst_ip = dst_in->sin_addr.s_addr; - struct flowi fl; - struct rtable *rt; - struct neighbour *neigh; - int ret; - - memset(&fl, 0, sizeof fl); - fl.nl_u.ip4_u.daddr = dst_ip; - fl.nl_u.ip4_u.saddr = src_ip; - ret = ip_route_output_key(&rt, &fl); - if (ret) - goto out; - - /* If the device does ARP internally, return 'done' */ - if (rt->idev->dev->flags & IFF_NOARP) { - copy_addr(addr, rt->idev->dev, NULL); - goto put; - } - - neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->idev->dev); - if (!neigh) { - ret = -ENODATA; - goto put; - } - - if (!(neigh->nud_state & NUD_VALID)) { - ret = -ENODATA; - goto release; - } - - if (!src_ip) { - src_in->sin_family = dst_in->sin_family; - src_in->sin_addr.s_addr = rt->rt_src; - } - - ret = copy_addr(addr, neigh->dev, neigh->ha); -release: - neigh_release(neigh); -put: - ip_rt_put(rt); -out: - return ret; -} - -static void process_req(void *data) -{ - struct addr_req *req, *temp_req; - struct sockaddr_in *src_in, *dst_in; - struct list_head done_list; - - INIT_LIST_HEAD(&done_list); - - mutex_lock(&lock); - list_for_each_entry_safe(req, temp_req, &req_list, list) { - if (req->status) { - src_in = (struct sockaddr_in *) &req->src_addr; - dst_in = (struct sockaddr_in *) &req->dst_addr; - req->status = addr_resolve_remote(src_in, dst_in, - req->addr); - } - if (req->status && time_after(jiffies, req->timeout)) - req->status = -ETIMEDOUT; - else if (req->status == -ENODATA) - continue; - - list_del(&req->list); - list_add_tail(&req->list, &done_list); - } - - if (!list_empty(&req_list)) { - req = list_entry(req_list.next, struct addr_req, list); - set_timeout(req->timeout); - } - mutex_unlock(&lock); - - list_for_each_entry_safe(req, temp_req, &done_list, list) { - list_del(&req->list); - req->callback(req->status, &req->src_addr, req->addr, - req->context); - kfree(req); - } -} - -static int addr_resolve_local(struct sockaddr_in *src_in, - struct sockaddr_in *dst_in, - struct rdma_dev_addr *addr) -{ - struct net_device *dev; - u32 src_ip = src_in->sin_addr.s_addr; - u32 dst_ip = dst_in->sin_addr.s_addr; - int ret; - - dev = ip_dev_find(dst_ip); - if (!dev) - return -EADDRNOTAVAIL; - - if (ZERONET(src_ip)) { - src_in->sin_family = dst_in->sin_family; - src_in->sin_addr.s_addr = dst_ip; - ret = copy_addr(addr, dev, dev->dev_addr); - } else if (LOOPBACK(src_ip)) { - ret = rdma_translate_ip((struct sockaddr *)dst_in, addr); - if (!ret) - memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN); - } else { - ret = rdma_translate_ip((struct sockaddr *)src_in, addr); - if (!ret) - memcpy(addr->dst_dev_addr, dev->dev_addr, MAX_ADDR_LEN); - } - - dev_put(dev); - return ret; -} - -int rdma_resolve_ip(struct sockaddr *src_addr, struct sockaddr *dst_addr, - struct rdma_dev_addr *addr, int timeout_ms, - void (*callback)(int status, struct sockaddr *src_addr, - struct rdma_dev_addr *addr, void *context), - void *context) -{ - struct sockaddr_in *src_in, *dst_in; - struct addr_req *req; - int ret = 0; - - req = kmalloc(sizeof *req, GFP_KERNEL); - if (!req) - return -ENOMEM; - memset(req, 0, sizeof *req); - - if (src_addr) - memcpy(&req->src_addr, src_addr, ip_addr_size(src_addr)); - memcpy(&req->dst_addr, dst_addr, ip_addr_size(dst_addr)); - req->addr = addr; - req->callback = callback; - req->context = context; - - src_in = (struct sockaddr_in *) &req->src_addr; - dst_in = (struct sockaddr_in *) &req->dst_addr; - - req->status = addr_resolve_local(src_in, dst_in, addr); - if (req->status == -EADDRNOTAVAIL) - req->status = addr_resolve_remote(src_in, dst_in, addr); - - switch (req->status) { - case 0: - req->timeout = jiffies; - queue_req(req); - break; - case -ENODATA: - req->timeout = msecs_to_jiffies(timeout_ms) + jiffies; - queue_req(req); - addr_send_arp(dst_in); - break; - default: - ret = req->status; - kfree(req); - break; - } - return ret; -} -EXPORT_SYMBOL(rdma_resolve_ip); - -void rdma_addr_cancel(struct rdma_dev_addr *addr) -{ - struct addr_req *req, *temp_req; - - mutex_lock(&lock); - list_for_each_entry_safe(req, temp_req, &req_list, list) { - if (req->addr == addr) { - req->status = -ECANCELED; - req->timeout = jiffies; - list_del(&req->list); - list_add(&req->list, &req_list); - set_timeout(req->timeout); - break; - } - } - mutex_unlock(&lock); -} -EXPORT_SYMBOL(rdma_addr_cancel); - -static int netevent_callback(struct notifier_block *self, unsigned long event, - void *ctx) -{ - if (event == NETEVENT_NEIGH_UPDATE) { - struct neighbour *neigh = ctx; - - if (neigh->dev->type == ARPHRD_INFINIBAND && - (neigh->nud_state & NUD_VALID)) { - set_timeout(jiffies); - } - } - return 0; -} - -static struct notifier_block nb = { - .notifier_call = netevent_callback -}; - -static int addr_init(void) -{ - addr_wq = create_singlethread_workqueue("ib_addr_wq"); - if (!addr_wq) - return -ENOMEM; - - register_netevent_notifier(&nb); - return 0; -} - -static void addr_cleanup(void) -{ - unregister_netevent_notifier(&nb); - destroy_workqueue(addr_wq); -} - -module_init(addr_init); -module_exit(addr_cleanup); diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 75313ade2..50364c0b0 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -191,24 +191,6 @@ int ib_find_cached_pkey(struct ib_device *device, } EXPORT_SYMBOL(ib_find_cached_pkey); -int ib_get_cached_lmc(struct ib_device *device, - u8 port_num, - u8 *lmc) -{ - unsigned long flags; - int ret = 0; - - if (port_num < start_port(device) || port_num > end_port(device)) - return -EINVAL; - - read_lock_irqsave(&device->cache.lock, flags); - *lmc = device->cache.lmc_cache[port_num - start_port(device)]; - read_unlock_irqrestore(&device->cache.lock, flags); - - return ret; -} -EXPORT_SYMBOL(ib_get_cached_lmc); - static void ib_cache_update(struct ib_device *device, u8 port) { @@ -269,8 +251,6 @@ static void ib_cache_update(struct ib_device *device, device->cache.pkey_cache[port - start_port(device)] = pkey_cache; device->cache.gid_cache [port - start_port(device)] = gid_cache; - device->cache.lmc_cache[port - start_port(device)] = tprops->lmc; - write_unlock_irq(&device->cache.lock); kfree(old_pkey_cache); @@ -301,8 +281,7 @@ static void ib_cache_event(struct ib_event_handler *handler, event->event == IB_EVENT_PORT_ACTIVE || event->event == IB_EVENT_LID_CHANGE || event->event == IB_EVENT_PKEY_CHANGE || - event->event == IB_EVENT_SM_CHANGE || - event->event == IB_EVENT_CLIENT_REREGISTER) { + event->event == IB_EVENT_SM_CHANGE) { work = kmalloc(sizeof *work, GFP_ATOMIC); if (work) { INIT_WORK(&work->work, ib_cache_task, work); @@ -326,13 +305,7 @@ static void ib_cache_setup_one(struct ib_device *device) kmalloc(sizeof *device->cache.gid_cache * (end_port(device) - start_port(device) + 1), GFP_KERNEL); - device->cache.lmc_cache = kmalloc(sizeof *device->cache.lmc_cache * - (end_port(device) - - start_port(device) + 1), - GFP_KERNEL); - - if (!device->cache.pkey_cache || !device->cache.gid_cache || - !device->cache.lmc_cache) { + if (!device->cache.pkey_cache || !device->cache.gid_cache) { printk(KERN_WARNING "Couldn't allocate cache " "for %s\n", device->name); goto err; @@ -360,7 +333,6 @@ err_cache: err: kfree(device->cache.pkey_cache); kfree(device->cache.gid_cache); - kfree(device->cache.lmc_cache); } static void ib_cache_cleanup_one(struct ib_device *device) @@ -377,7 +349,6 @@ static void ib_cache_cleanup_one(struct ib_device *device) kfree(device->cache.pkey_cache); kfree(device->cache.gid_cache); - kfree(device->cache.lmc_cache); } static struct ib_client cache_client = { diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 0de335b7b..86fee4350 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -32,7 +32,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * - * $Id: cm.c 4311 2005-12-05 18:42:01Z sean.hefty $ + * $Id: cm.c 2821 2005-07-08 17:07:28Z sean.hefty $ */ #include @@ -132,7 +132,6 @@ struct cm_id_private { /* todo: use alternate port on send failure */ struct cm_av av; struct cm_av alt_av; - struct ib_cm_compare_data *compare_data; void *private_data; __be64 tid; @@ -254,13 +253,23 @@ static void cm_set_private_data(struct cm_id_private *cm_id_priv, cm_id_priv->private_data_len = private_data_len; } -static void cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc, - struct ib_grh *grh, struct cm_av *av) +static void cm_set_ah_attr(struct ib_ah_attr *ah_attr, u8 port_num, + u16 dlid, u8 sl, u16 src_path_bits) +{ + memset(ah_attr, 0, sizeof ah_attr); + ah_attr->dlid = dlid; + ah_attr->sl = sl; + ah_attr->src_path_bits = src_path_bits; + ah_attr->port_num = port_num; +} + +static void cm_init_av_for_response(struct cm_port *port, + struct ib_wc *wc, struct cm_av *av) { av->port = port; av->pkey_index = wc->pkey_index; - ib_init_ah_from_wc(port->cm_dev->device, port->port_num, wc, - grh, &av->ah_attr); + cm_set_ah_attr(&av->ah_attr, port->port_num, wc->slid, + wc->sl, wc->dlid_path_bits); } static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av) @@ -290,8 +299,9 @@ static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av) return ret; av->port = port; - ib_init_ah_from_path(cm_dev->device, port->port_num, path, - &av->ah_attr); + cm_set_ah_attr(&av->ah_attr, av->port->port_num, + be16_to_cpu(path->dlid), path->sl, + be16_to_cpu(path->slid) & 0x7F); av->packet_life_time = path->packet_life_time; return 0; } @@ -347,41 +357,6 @@ static struct cm_id_private * cm_acquire_id(__be32 local_id, __be32 remote_id) return cm_id_priv; } -static void cm_mask_copy(u8 *dst, u8 *src, u8 *mask) -{ - int i; - - for (i = 0; i < IB_CM_COMPARE_SIZE / sizeof(unsigned long); i++) - ((unsigned long *) dst)[i] = ((unsigned long *) src)[i] & - ((unsigned long *) mask)[i]; -} - -static int cm_compare_data(struct ib_cm_compare_data *src_data, - struct ib_cm_compare_data *dst_data) -{ - u8 src[IB_CM_COMPARE_SIZE]; - u8 dst[IB_CM_COMPARE_SIZE]; - - if (!src_data || !dst_data) - return 0; - - cm_mask_copy(src, src_data->data, dst_data->mask); - cm_mask_copy(dst, dst_data->data, src_data->mask); - return memcmp(src, dst, IB_CM_COMPARE_SIZE); -} - -static int cm_compare_private_data(u8 *private_data, - struct ib_cm_compare_data *dst_data) -{ - u8 src[IB_CM_COMPARE_SIZE]; - - if (!dst_data) - return 0; - - cm_mask_copy(src, private_data, dst_data->mask); - return memcmp(src, dst_data->data, IB_CM_COMPARE_SIZE); -} - static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv) { struct rb_node **link = &cm.listen_service_table.rb_node; @@ -389,18 +364,14 @@ static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv) struct cm_id_private *cur_cm_id_priv; __be64 service_id = cm_id_priv->id.service_id; __be64 service_mask = cm_id_priv->id.service_mask; - int data_cmp; while (*link) { parent = *link; cur_cm_id_priv = rb_entry(parent, struct cm_id_private, service_node); - data_cmp = cm_compare_data(cm_id_priv->compare_data, - cur_cm_id_priv->compare_data); if ((cur_cm_id_priv->id.service_mask & service_id) == (service_mask & cur_cm_id_priv->id.service_id) && - (cm_id_priv->id.device == cur_cm_id_priv->id.device) && - !data_cmp) + (cm_id_priv->id.device == cur_cm_id_priv->id.device)) return cur_cm_id_priv; if (cm_id_priv->id.device < cur_cm_id_priv->id.device) @@ -409,10 +380,6 @@ static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv) link = &(*link)->rb_right; else if (service_id < cur_cm_id_priv->id.service_id) link = &(*link)->rb_left; - else if (service_id > cur_cm_id_priv->id.service_id) - link = &(*link)->rb_right; - else if (data_cmp < 0) - link = &(*link)->rb_left; else link = &(*link)->rb_right; } @@ -422,20 +389,16 @@ static struct cm_id_private * cm_insert_listen(struct cm_id_private *cm_id_priv) } static struct cm_id_private * cm_find_listen(struct ib_device *device, - __be64 service_id, - u8 *private_data) + __be64 service_id) { struct rb_node *node = cm.listen_service_table.rb_node; struct cm_id_private *cm_id_priv; - int data_cmp; while (node) { cm_id_priv = rb_entry(node, struct cm_id_private, service_node); - data_cmp = cm_compare_private_data(private_data, - cm_id_priv->compare_data); if ((cm_id_priv->id.service_mask & service_id) == cm_id_priv->id.service_id && - (cm_id_priv->id.device == device) && !data_cmp) + (cm_id_priv->id.device == device)) return cm_id_priv; if (device < cm_id_priv->id.device) @@ -444,10 +407,6 @@ static struct cm_id_private * cm_find_listen(struct ib_device *device, node = node->rb_right; else if (service_id < cm_id_priv->id.service_id) node = node->rb_left; - else if (service_id > cm_id_priv->id.service_id) - node = node->rb_right; - else if (data_cmp < 0) - node = node->rb_left; else node = node->rb_right; } @@ -701,7 +660,7 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv) } } -static void cm_destroy_id(struct ib_cm_id *cm_id, int err) +void ib_destroy_cm_id(struct ib_cm_id *cm_id) { struct cm_id_private *cm_id_priv; struct cm_work *work; @@ -735,22 +694,12 @@ retest: sizeof cm_id_priv->av.port->cm_dev->ca_guid, NULL, 0); break; - case IB_CM_REQ_RCVD: - if (err == -ENOMEM) { - /* Do not reject to allow future retries. */ - cm_reset_to_idle(cm_id_priv); - spin_unlock_irqrestore(&cm_id_priv->lock, flags); - } else { - spin_unlock_irqrestore(&cm_id_priv->lock, flags); - ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED, - NULL, 0, NULL, 0); - } - break; case IB_CM_MRA_REQ_RCVD: case IB_CM_REP_SENT: case IB_CM_MRA_REP_RCVD: ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); /* Fall through */ + case IB_CM_REQ_RCVD: case IB_CM_MRA_REQ_SENT: case IB_CM_REP_RCVD: case IB_CM_MRA_REP_SENT: @@ -781,19 +730,15 @@ retest: wait_for_completion(&cm_id_priv->comp); while ((work = cm_dequeue_work(cm_id_priv)) != NULL) cm_free_work(work); - kfree(cm_id_priv->compare_data); - kfree(cm_id_priv->private_data); + if (cm_id_priv->private_data && cm_id_priv->private_data_len) + kfree(cm_id_priv->private_data); kfree(cm_id_priv); } - -void ib_destroy_cm_id(struct ib_cm_id *cm_id) -{ - cm_destroy_id(cm_id, 0); -} EXPORT_SYMBOL(ib_destroy_cm_id); -int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask, - struct ib_cm_compare_data *compare_data) +int ib_cm_listen(struct ib_cm_id *cm_id, + __be64 service_id, + __be64 service_mask) { struct cm_id_private *cm_id_priv, *cur_cm_id_priv; unsigned long flags; @@ -807,19 +752,7 @@ int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask, return -EINVAL; cm_id_priv = container_of(cm_id, struct cm_id_private, id); - if (cm_id->state != IB_CM_IDLE) - return -EINVAL; - - if (compare_data) { - cm_id_priv->compare_data = kzalloc(sizeof *compare_data, - GFP_KERNEL); - if (!cm_id_priv->compare_data) - return -ENOMEM; - cm_mask_copy(cm_id_priv->compare_data->data, - compare_data->data, compare_data->mask); - memcpy(cm_id_priv->compare_data->mask, compare_data->mask, - IB_CM_COMPARE_SIZE); - } + BUG_ON(cm_id->state != IB_CM_IDLE); cm_id->state = IB_CM_LISTEN; @@ -836,8 +769,6 @@ int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask, if (cur_cm_id_priv) { cm_id->state = IB_CM_IDLE; - kfree(cm_id_priv->compare_data); - cm_id_priv->compare_data = NULL; ret = -EBUSY; } return ret; @@ -975,10 +906,8 @@ int ib_send_cm_req(struct ib_cm_id *cm_id, cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> id.local_id); - if (IS_ERR(cm_id_priv->timewait_info)) { - ret = PTR_ERR(cm_id_priv->timewait_info); + if (IS_ERR(cm_id_priv->timewait_info)) goto out; - } ret = cm_init_av_by_path(param->primary_path, &cm_id_priv->av); if (ret) @@ -1180,7 +1109,7 @@ static void cm_process_work(struct cm_id_private *cm_id_priv, } cm_deref_id(cm_id_priv); if (ret) - cm_destroy_id(&cm_id_priv->id, ret); + ib_destroy_cm_id(&cm_id_priv->id); } static void cm_format_mra(struct cm_mra_msg *mra_msg, @@ -1312,8 +1241,7 @@ static struct cm_id_private * cm_match_req(struct cm_work *work, /* Find matching listen request. */ listen_cm_id_priv = cm_find_listen(cm_id_priv->id.device, - req_msg->service_id, - req_msg->private_data); + req_msg->service_id); if (!listen_cm_id_priv) { spin_unlock_irqrestore(&cm.lock, flags); cm_issue_rej(work->port, work->mad_recv_wc, @@ -1348,7 +1276,6 @@ static int cm_req_handler(struct cm_work *work) cm_id_priv = container_of(cm_id, struct cm_id_private, id); cm_id_priv->id.remote_id = req_msg->local_comm_id; cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, &cm_id_priv->av); cm_id_priv->timewait_info = cm_create_timewait_info(cm_id_priv-> id.local_id); @@ -2622,7 +2549,7 @@ static void cm_format_sidr_req(struct cm_sidr_req_msg *sidr_req_msg, cm_format_mad_hdr(&sidr_req_msg->hdr, CM_SIDR_REQ_ATTR_ID, cm_form_tid(cm_id_priv, CM_MSG_SEQUENCE_SIDR)); sidr_req_msg->request_id = cm_id_priv->id.local_id; - sidr_req_msg->pkey = cpu_to_be16(param->path->pkey); + sidr_req_msg->pkey = cpu_to_be16(param->pkey); sidr_req_msg->service_id = param->service_id; if (param->private_data && param->private_data_len) @@ -2714,7 +2641,6 @@ static int cm_sidr_req_handler(struct cm_work *work) cm_id_priv->av.dgid.global.subnet_prefix = cpu_to_be64(wc->slid); cm_id_priv->av.dgid.global.interface_id = 0; cm_init_av_for_response(work->port, work->mad_recv_wc->wc, - work->mad_recv_wc->recv_buf.grh, &cm_id_priv->av); cm_id_priv->id.remote_id = sidr_req_msg->request_id; cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD; @@ -2728,8 +2654,7 @@ static int cm_sidr_req_handler(struct cm_work *work) goto out; /* Duplicate message. */ } cur_cm_id_priv = cm_find_listen(cm_id->device, - sidr_req_msg->service_id, - sidr_req_msg->private_data); + sidr_req_msg->service_id); if (!cur_cm_id_priv) { rb_erase(&cm_id_priv->sidr_id_node, &cm.remote_sidr_table); spin_unlock_irqrestore(&cm.lock, flags); @@ -3169,7 +3094,6 @@ static int cm_init_qp_rtr_attr(struct cm_id_private *cm_id_priv, } if (cm_id_priv->alt_av.ah_attr.dlid) { *qp_attr_mask |= IB_QP_ALT_PATH; - qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num; qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr; } ret = 0; @@ -3367,6 +3291,7 @@ error: static void __exit ib_cm_cleanup(void) { + flush_workqueue(cm.wq); destroy_workqueue(cm.wq); ib_unregister_client(&cm_client); idr_destroy(&cm.local_id_table); diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c deleted file mode 100644 index 5d625a811..000000000 --- a/drivers/infiniband/core/cma.c +++ /dev/null @@ -1,1929 +0,0 @@ -/* - * Copyright (c) 2005 Voltaire Inc. All rights reserved. - * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. - * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved. - * Copyright (c) 2005-2006 Intel Corporation. All rights reserved. - * - * This Software is licensed under one of the following licenses: - * - * 1) under the terms of the "Common Public License 1.0" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/cpl.php. - * - * 2) under the terms of the "The BSD License" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/bsd-license.php. - * - * 3) under the terms of the "GNU General Public License (GPL) Version 2" a - * copy of which is available from the Open Source Initiative, see - * http://www.opensource.org/licenses/gpl-license.php. - * - * Licensee has the right to choose one of the above licenses. - * - * Redistributions of source code must retain the above copyright - * notice and one of the license notices. - * - * Redistributions in binary form must reproduce both the above copyright - * notice, one of the license notices in the documentation - * and/or other materials provided with the distribution. - * - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -MODULE_AUTHOR("Sean Hefty"); -MODULE_DESCRIPTION("Generic RDMA CM Agent"); -MODULE_LICENSE("Dual BSD/GPL"); - -#define CMA_CM_RESPONSE_TIMEOUT 20 -#define CMA_MAX_CM_RETRIES 15 - -static void cma_add_one(struct ib_device *device); -static void cma_remove_one(struct ib_device *device); - -static struct ib_client cma_client = { - .name = "cma", - .add = cma_add_one, - .remove = cma_remove_one -}; - -static LIST_HEAD(dev_list); -static LIST_HEAD(listen_any_list); -static DEFINE_MUTEX(lock); -static struct workqueue_struct *cma_wq; -static DEFINE_IDR(sdp_ps); -static DEFINE_IDR(tcp_ps); - -struct cma_device { - struct list_head list; - struct ib_device *device; - __be64 node_guid; - struct completion comp; - atomic_t refcount; - struct list_head id_list; -}; - -enum cma_state { - CMA_IDLE, - CMA_ADDR_QUERY, - CMA_ADDR_RESOLVED, - CMA_ROUTE_QUERY, - CMA_ROUTE_RESOLVED, - CMA_CONNECT, - CMA_DISCONNECT, - CMA_ADDR_BOUND, - CMA_LISTEN, - CMA_DEVICE_REMOVAL, - CMA_DESTROYING -}; - -struct rdma_bind_list { - struct idr *ps; - struct hlist_head owners; - unsigned short port; -}; - -/* - * Device removal can occur at anytime, so we need extra handling to - * serialize notifying the user of device removal with other callbacks. - * We do this by disabling removal notification while a callback is in process, - * and reporting it after the callback completes. - */ -struct rdma_id_private { - struct rdma_cm_id id; - - struct rdma_bind_list *bind_list; - struct hlist_node node; - struct list_head list; - struct list_head listen_list; - struct cma_device *cma_dev; - - enum cma_state state; - spinlock_t lock; - struct completion comp; - atomic_t refcount; - wait_queue_head_t wait_remove; - atomic_t dev_remove; - - int backlog; - int timeout_ms; - struct ib_sa_query *query; - int query_id; - union { - struct ib_cm_id *ib; - } cm_id; - - u32 seq_num; - u32 qp_num; - enum ib_qp_type qp_type; - u8 srq; -}; - -struct cma_work { - struct work_struct work; - struct rdma_id_private *id; - enum cma_state old_state; - enum cma_state new_state; - struct rdma_cm_event event; -}; - -union cma_ip_addr { - struct in6_addr ip6; - struct { - __u32 pad[3]; - __u32 addr; - } ip4; -}; - -struct cma_hdr { - u8 cma_version; - u8 ip_version; /* IP version: 7:4 */ - __u16 port; - union cma_ip_addr src_addr; - union cma_ip_addr dst_addr; -}; - -struct sdp_hh { - u8 bsdh[16]; - u8 sdp_version; /* Major version: 7:4 */ - u8 ip_version; /* IP version: 7:4 */ - u8 sdp_specific1[10]; - __u16 port; - __u16 sdp_specific2; - union cma_ip_addr src_addr; - union cma_ip_addr dst_addr; -}; - -struct sdp_hah { - u8 bsdh[16]; - u8 sdp_version; -}; - -#define CMA_VERSION 0x00 -#define SDP_MAJ_VERSION 0x2 - -static int cma_comp(struct rdma_id_private *id_priv, enum cma_state comp) -{ - unsigned long flags; - int ret; - - spin_lock_irqsave(&id_priv->lock, flags); - ret = (id_priv->state == comp); - spin_unlock_irqrestore(&id_priv->lock, flags); - return ret; -} - -static int cma_comp_exch(struct rdma_id_private *id_priv, - enum cma_state comp, enum cma_state exch) -{ - unsigned long flags; - int ret; - - spin_lock_irqsave(&id_priv->lock, flags); - if ((ret = (id_priv->state == comp))) - id_priv->state = exch; - spin_unlock_irqrestore(&id_priv->lock, flags); - return ret; -} - -static enum cma_state cma_exch(struct rdma_id_private *id_priv, - enum cma_state exch) -{ - unsigned long flags; - enum cma_state old; - - spin_lock_irqsave(&id_priv->lock, flags); - old = id_priv->state; - id_priv->state = exch; - spin_unlock_irqrestore(&id_priv->lock, flags); - return old; -} - -static inline u8 cma_get_ip_ver(struct cma_hdr *hdr) -{ - return hdr->ip_version >> 4; -} - -static inline void cma_set_ip_ver(struct cma_hdr *hdr, u8 ip_ver) -{ - hdr->ip_version = (ip_ver << 4) | (hdr->ip_version & 0xF); -} - -static inline u8 sdp_get_majv(u8 sdp_version) -{ - return sdp_version >> 4; -} - -static inline u8 sdp_get_ip_ver(struct sdp_hh *hh) -{ - return hh->ip_version >> 4; -} - -static inline void sdp_set_ip_ver(struct sdp_hh *hh, u8 ip_ver) -{ - hh->ip_version = (ip_ver << 4) | (hh->ip_version & 0xF); -} - -static void cma_attach_to_dev(struct rdma_id_private *id_priv, - struct cma_device *cma_dev) -{ - atomic_inc(&cma_dev->refcount); - id_priv->cma_dev = cma_dev; - id_priv->id.device = cma_dev->device; - list_add_tail(&id_priv->list, &cma_dev->id_list); -} - -static inline void cma_deref_dev(struct cma_device *cma_dev) -{ - if (atomic_dec_and_test(&cma_dev->refcount)) - complete(&cma_dev->comp); -} - -static void cma_detach_from_dev(struct rdma_id_private *id_priv) -{ - list_del(&id_priv->list); - cma_deref_dev(id_priv->cma_dev); - id_priv->cma_dev = NULL; -} - -static int cma_acquire_ib_dev(struct rdma_id_private *id_priv) -{ - struct cma_device *cma_dev; - union ib_gid gid; - int ret = -ENODEV; - - ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid), - - mutex_lock(&lock); - list_for_each_entry(cma_dev, &dev_list, list) { - ret = ib_find_cached_gid(cma_dev->device, &gid, - &id_priv->id.port_num, NULL); - if (!ret) { - cma_attach_to_dev(id_priv, cma_dev); - break; - } - } - mutex_unlock(&lock); - return ret; -} - -static int cma_acquire_dev(struct rdma_id_private *id_priv) -{ - switch (id_priv->id.route.addr.dev_addr.dev_type) { - case IB_NODE_CA: - return cma_acquire_ib_dev(id_priv); - default: - return -ENODEV; - } -} - -static void cma_deref_id(struct rdma_id_private *id_priv) -{ - if (atomic_dec_and_test(&id_priv->refcount)) - complete(&id_priv->comp); -} - -static void cma_release_remove(struct rdma_id_private *id_priv) -{ - if (atomic_dec_and_test(&id_priv->dev_remove)) - wake_up(&id_priv->wait_remove); -} - -struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler, - void *context, enum rdma_port_space ps) -{ - struct rdma_id_private *id_priv; - - id_priv = kzalloc(sizeof *id_priv, GFP_KERNEL); - if (!id_priv) - return ERR_PTR(-ENOMEM); - - id_priv->state = CMA_IDLE; - id_priv->id.context = context; - id_priv->id.event_handler = event_handler; - id_priv->id.ps = ps; - spin_lock_init(&id_priv->lock); - init_completion(&id_priv->comp); - atomic_set(&id_priv->refcount, 1); - init_waitqueue_head(&id_priv->wait_remove); - atomic_set(&id_priv->dev_remove, 0); - INIT_LIST_HEAD(&id_priv->listen_list); - get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num); - - return &id_priv->id; -} -EXPORT_SYMBOL(rdma_create_id); - -static int cma_init_ib_qp(struct rdma_id_private *id_priv, struct ib_qp *qp) -{ - struct ib_qp_attr qp_attr; - struct rdma_dev_addr *dev_addr; - int ret; - - dev_addr = &id_priv->id.route.addr.dev_addr; - ret = ib_find_cached_pkey(id_priv->id.device, id_priv->id.port_num, - ib_addr_get_pkey(dev_addr), - &qp_attr.pkey_index); - if (ret) - return ret; - - qp_attr.qp_state = IB_QPS_INIT; - qp_attr.qp_access_flags = IB_ACCESS_LOCAL_WRITE; - qp_attr.port_num = id_priv->id.port_num; - return ib_modify_qp(qp, &qp_attr, IB_QP_STATE | IB_QP_ACCESS_FLAGS | - IB_QP_PKEY_INDEX | IB_QP_PORT); -} - -int rdma_create_qp(struct rdma_cm_id *id, struct ib_pd *pd, - struct ib_qp_init_attr *qp_init_attr) -{ - struct rdma_id_private *id_priv; - struct ib_qp *qp; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (id->device != pd->device) - return -EINVAL; - - qp = ib_create_qp(pd, qp_init_attr); - if (IS_ERR(qp)) - return PTR_ERR(qp); - - switch (id->device->node_type) { - case IB_NODE_CA: - ret = cma_init_ib_qp(id_priv, qp); - break; - default: - ret = -ENOSYS; - break; - } - - if (ret) - goto err; - - id->qp = qp; - id_priv->qp_num = qp->qp_num; - id_priv->qp_type = qp->qp_type; - id_priv->srq = (qp->srq != NULL); - return 0; -err: - ib_destroy_qp(qp); - return ret; -} -EXPORT_SYMBOL(rdma_create_qp); - -void rdma_destroy_qp(struct rdma_cm_id *id) -{ - ib_destroy_qp(id->qp); -} -EXPORT_SYMBOL(rdma_destroy_qp); - -static int cma_modify_qp_rtr(struct rdma_cm_id *id) -{ - struct ib_qp_attr qp_attr; - int qp_attr_mask, ret; - - if (!id->qp) - return 0; - - /* Need to update QP attributes from default values. */ - qp_attr.qp_state = IB_QPS_INIT; - ret = rdma_init_qp_attr(id, &qp_attr, &qp_attr_mask); - if (ret) - return ret; - - ret = ib_modify_qp(id->qp, &qp_attr, qp_attr_mask); - if (ret) - return ret; - - qp_attr.qp_state = IB_QPS_RTR; - ret = rdma_init_qp_attr(id, &qp_attr, &qp_attr_mask); - if (ret) - return ret; - - return ib_modify_qp(id->qp, &qp_attr, qp_attr_mask); -} - -static int cma_modify_qp_rts(struct rdma_cm_id *id) -{ - struct ib_qp_attr qp_attr; - int qp_attr_mask, ret; - - if (!id->qp) - return 0; - - qp_attr.qp_state = IB_QPS_RTS; - ret = rdma_init_qp_attr(id, &qp_attr, &qp_attr_mask); - if (ret) - return ret; - - return ib_modify_qp(id->qp, &qp_attr, qp_attr_mask); -} - -static int cma_modify_qp_err(struct rdma_cm_id *id) -{ - struct ib_qp_attr qp_attr; - - if (!id->qp) - return 0; - - qp_attr.qp_state = IB_QPS_ERR; - return ib_modify_qp(id->qp, &qp_attr, IB_QP_STATE); -} - -int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr, - int *qp_attr_mask) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - switch (id_priv->id.device->node_type) { - case IB_NODE_CA: - ret = ib_cm_init_qp_attr(id_priv->cm_id.ib, qp_attr, - qp_attr_mask); - if (qp_attr->qp_state == IB_QPS_RTR) - qp_attr->rq_psn = id_priv->seq_num; - break; - default: - ret = -ENOSYS; - break; - } - - return ret; -} -EXPORT_SYMBOL(rdma_init_qp_attr); - -static inline int cma_zero_addr(struct sockaddr *addr) -{ - struct in6_addr *ip6; - - if (addr->sa_family == AF_INET) - return ZERONET(((struct sockaddr_in *) addr)->sin_addr.s_addr); - else { - ip6 = &((struct sockaddr_in6 *) addr)->sin6_addr; - return (ip6->s6_addr32[0] | ip6->s6_addr32[1] | - ip6->s6_addr32[2] | ip6->s6_addr32[3]) == 0; - } -} - -static inline int cma_loopback_addr(struct sockaddr *addr) -{ - return LOOPBACK(((struct sockaddr_in *) addr)->sin_addr.s_addr); -} - -static inline int cma_any_addr(struct sockaddr *addr) -{ - return cma_zero_addr(addr) || cma_loopback_addr(addr); -} - -static inline int cma_any_port(struct sockaddr *addr) -{ - return !((struct sockaddr_in *) addr)->sin_port; -} - -static int cma_get_net_info(void *hdr, enum rdma_port_space ps, - u8 *ip_ver, __u16 *port, - union cma_ip_addr **src, union cma_ip_addr **dst) -{ - switch (ps) { - case RDMA_PS_SDP: - if (sdp_get_majv(((struct sdp_hh *) hdr)->sdp_version) != - SDP_MAJ_VERSION) - return -EINVAL; - - *ip_ver = sdp_get_ip_ver(hdr); - *port = ((struct sdp_hh *) hdr)->port; - *src = &((struct sdp_hh *) hdr)->src_addr; - *dst = &((struct sdp_hh *) hdr)->dst_addr; - break; - default: - if (((struct cma_hdr *) hdr)->cma_version != CMA_VERSION) - return -EINVAL; - - *ip_ver = cma_get_ip_ver(hdr); - *port = ((struct cma_hdr *) hdr)->port; - *src = &((struct cma_hdr *) hdr)->src_addr; - *dst = &((struct cma_hdr *) hdr)->dst_addr; - break; - } - - if (*ip_ver != 4 && *ip_ver != 6) - return -EINVAL; - return 0; -} - -static void cma_save_net_info(struct rdma_addr *addr, - struct rdma_addr *listen_addr, - u8 ip_ver, __u16 port, - union cma_ip_addr *src, union cma_ip_addr *dst) -{ - struct sockaddr_in *listen4, *ip4; - struct sockaddr_in6 *listen6, *ip6; - - switch (ip_ver) { - case 4: - listen4 = (struct sockaddr_in *) &listen_addr->src_addr; - ip4 = (struct sockaddr_in *) &addr->src_addr; - ip4->sin_family = listen4->sin_family; - ip4->sin_addr.s_addr = dst->ip4.addr; - ip4->sin_port = listen4->sin_port; - - ip4 = (struct sockaddr_in *) &addr->dst_addr; - ip4->sin_family = listen4->sin_family; - ip4->sin_addr.s_addr = src->ip4.addr; - ip4->sin_port = port; - break; - case 6: - listen6 = (struct sockaddr_in6 *) &listen_addr->src_addr; - ip6 = (struct sockaddr_in6 *) &addr->src_addr; - ip6->sin6_family = listen6->sin6_family; - ip6->sin6_addr = dst->ip6; - ip6->sin6_port = listen6->sin6_port; - - ip6 = (struct sockaddr_in6 *) &addr->dst_addr; - ip6->sin6_family = listen6->sin6_family; - ip6->sin6_addr = src->ip6; - ip6->sin6_port = port; - break; - default: - break; - } -} - -static inline int cma_user_data_offset(enum rdma_port_space ps) -{ - switch (ps) { - case RDMA_PS_SDP: - return 0; - default: - return sizeof(struct cma_hdr); - } -} - -static int cma_notify_user(struct rdma_id_private *id_priv, - enum rdma_cm_event_type type, int status, - void *data, u8 data_len) -{ - struct rdma_cm_event event; - - event.event = type; - event.status = status; - event.private_data = data; - event.private_data_len = data_len; - - return id_priv->id.event_handler(&id_priv->id, &event); -} - -static void cma_cancel_route(struct rdma_id_private *id_priv) -{ - switch (id_priv->id.device->node_type) { - case IB_NODE_CA: - if (id_priv->query) - ib_sa_cancel_query(id_priv->query_id, id_priv->query); - break; - default: - break; - } -} - -static inline int cma_internal_listen(struct rdma_id_private *id_priv) -{ - return (id_priv->state == CMA_LISTEN) && id_priv->cma_dev && - cma_any_addr(&id_priv->id.route.addr.src_addr); -} - -static void cma_destroy_listen(struct rdma_id_private *id_priv) -{ - cma_exch(id_priv, CMA_DESTROYING); - - if (id_priv->cma_dev) { - switch (id_priv->id.device->node_type) { - case IB_NODE_CA: - if (id_priv->cm_id.ib && !IS_ERR(id_priv->cm_id.ib)) - ib_destroy_cm_id(id_priv->cm_id.ib); - break; - default: - break; - } - cma_detach_from_dev(id_priv); - } - list_del(&id_priv->listen_list); - - cma_deref_id(id_priv); - wait_for_completion(&id_priv->comp); - - kfree(id_priv); -} - -static void cma_cancel_listens(struct rdma_id_private *id_priv) -{ - struct rdma_id_private *dev_id_priv; - - mutex_lock(&lock); - list_del(&id_priv->list); - - while (!list_empty(&id_priv->listen_list)) { - dev_id_priv = list_entry(id_priv->listen_list.next, - struct rdma_id_private, listen_list); - cma_destroy_listen(dev_id_priv); - } - mutex_unlock(&lock); -} - -static void cma_cancel_operation(struct rdma_id_private *id_priv, - enum cma_state state) -{ - switch (state) { - case CMA_ADDR_QUERY: - rdma_addr_cancel(&id_priv->id.route.addr.dev_addr); - break; - case CMA_ROUTE_QUERY: - cma_cancel_route(id_priv); - break; - case CMA_LISTEN: - if (cma_any_addr(&id_priv->id.route.addr.src_addr) && - !id_priv->cma_dev) - cma_cancel_listens(id_priv); - break; - default: - break; - } -} - -static void cma_release_port(struct rdma_id_private *id_priv) -{ - struct rdma_bind_list *bind_list = id_priv->bind_list; - - if (!bind_list) - return; - - mutex_lock(&lock); - hlist_del(&id_priv->node); - if (hlist_empty(&bind_list->owners)) { - idr_remove(bind_list->ps, bind_list->port); - kfree(bind_list); - } - mutex_unlock(&lock); -} - -void rdma_destroy_id(struct rdma_cm_id *id) -{ - struct rdma_id_private *id_priv; - enum cma_state state; - - id_priv = container_of(id, struct rdma_id_private, id); - state = cma_exch(id_priv, CMA_DESTROYING); - cma_cancel_operation(id_priv, state); - - if (id_priv->cma_dev) { - switch (id->device->node_type) { - case IB_NODE_CA: - if (id_priv->cm_id.ib && !IS_ERR(id_priv->cm_id.ib)) - ib_destroy_cm_id(id_priv->cm_id.ib); - break; - default: - break; - } - mutex_lock(&lock); - cma_detach_from_dev(id_priv); - mutex_unlock(&lock); - } - - cma_release_port(id_priv); - cma_deref_id(id_priv); - wait_for_completion(&id_priv->comp); - - kfree(id_priv->id.route.path_rec); - kfree(id_priv); -} -EXPORT_SYMBOL(rdma_destroy_id); - -static int cma_rep_recv(struct rdma_id_private *id_priv) -{ - int ret; - - ret = cma_modify_qp_rtr(&id_priv->id); - if (ret) - goto reject; - - ret = cma_modify_qp_rts(&id_priv->id); - if (ret) - goto reject; - - ret = ib_send_cm_rtu(id_priv->cm_id.ib, NULL, 0); - if (ret) - goto reject; - - return 0; -reject: - cma_modify_qp_err(&id_priv->id); - ib_send_cm_rej(id_priv->cm_id.ib, IB_CM_REJ_CONSUMER_DEFINED, - NULL, 0, NULL, 0); - return ret; -} - -static int cma_verify_rep(struct rdma_id_private *id_priv, void *data) -{ - if (id_priv->id.ps == RDMA_PS_SDP && - sdp_get_majv(((struct sdp_hah *) data)->sdp_version) != - SDP_MAJ_VERSION) - return -EINVAL; - - return 0; -} - -static int cma_rtu_recv(struct rdma_id_private *id_priv) -{ - int ret; - - ret = cma_modify_qp_rts(&id_priv->id); - if (ret) - goto reject; - - return 0; -reject: - cma_modify_qp_err(&id_priv->id); - ib_send_cm_rej(id_priv->cm_id.ib, IB_CM_REJ_CONSUMER_DEFINED, - NULL, 0, NULL, 0); - return ret; -} - -static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) -{ - struct rdma_id_private *id_priv = cm_id->context; - enum rdma_cm_event_type event; - u8 private_data_len = 0; - int ret = 0, status = 0; - - atomic_inc(&id_priv->dev_remove); - if (!cma_comp(id_priv, CMA_CONNECT)) - goto out; - - switch (ib_event->event) { - case IB_CM_REQ_ERROR: - case IB_CM_REP_ERROR: - event = RDMA_CM_EVENT_UNREACHABLE; - status = -ETIMEDOUT; - break; - case IB_CM_REP_RECEIVED: - status = cma_verify_rep(id_priv, ib_event->private_data); - if (status) - event = RDMA_CM_EVENT_CONNECT_ERROR; - else if (id_priv->id.qp && id_priv->id.ps != RDMA_PS_SDP) { - status = cma_rep_recv(id_priv); - event = status ? RDMA_CM_EVENT_CONNECT_ERROR : - RDMA_CM_EVENT_ESTABLISHED; - } else - event = RDMA_CM_EVENT_CONNECT_RESPONSE; - private_data_len = IB_CM_REP_PRIVATE_DATA_SIZE; - break; - case IB_CM_RTU_RECEIVED: - status = cma_rtu_recv(id_priv); - event = status ? RDMA_CM_EVENT_CONNECT_ERROR : - RDMA_CM_EVENT_ESTABLISHED; - break; - case IB_CM_DREQ_ERROR: - status = -ETIMEDOUT; /* fall through */ - case IB_CM_DREQ_RECEIVED: - case IB_CM_DREP_RECEIVED: - if (!cma_comp_exch(id_priv, CMA_CONNECT, CMA_DISCONNECT)) - goto out; - event = RDMA_CM_EVENT_DISCONNECTED; - break; - case IB_CM_TIMEWAIT_EXIT: - case IB_CM_MRA_RECEIVED: - /* ignore event */ - goto out; - case IB_CM_REJ_RECEIVED: - cma_modify_qp_err(&id_priv->id); - status = ib_event->param.rej_rcvd.reason; - event = RDMA_CM_EVENT_REJECTED; - private_data_len = IB_CM_REJ_PRIVATE_DATA_SIZE; - break; - default: - printk(KERN_ERR "RDMA CMA: unexpected IB CM event: %d", - ib_event->event); - goto out; - } - - ret = cma_notify_user(id_priv, event, status, ib_event->private_data, - private_data_len); - if (ret) { - /* Destroy the CM ID by returning a non-zero value. */ - id_priv->cm_id.ib = NULL; - cma_exch(id_priv, CMA_DESTROYING); - cma_release_remove(id_priv); - rdma_destroy_id(&id_priv->id); - return ret; - } -out: - cma_release_remove(id_priv); - return ret; -} - -static struct rdma_id_private *cma_new_id(struct rdma_cm_id *listen_id, - struct ib_cm_event *ib_event) -{ - struct rdma_id_private *id_priv; - struct rdma_cm_id *id; - struct rdma_route *rt; - union cma_ip_addr *src, *dst; - __u16 port; - u8 ip_ver; - - id = rdma_create_id(listen_id->event_handler, listen_id->context, - listen_id->ps); - if (IS_ERR(id)) - return NULL; - - rt = &id->route; - rt->num_paths = ib_event->param.req_rcvd.alternate_path ? 2 : 1; - rt->path_rec = kmalloc(sizeof *rt->path_rec * rt->num_paths, GFP_KERNEL); - if (!rt->path_rec) - goto err; - - if (cma_get_net_info(ib_event->private_data, listen_id->ps, - &ip_ver, &port, &src, &dst)) - goto err; - - cma_save_net_info(&id->route.addr, &listen_id->route.addr, - ip_ver, port, src, dst); - rt->path_rec[0] = *ib_event->param.req_rcvd.primary_path; - if (rt->num_paths == 2) - rt->path_rec[1] = *ib_event->param.req_rcvd.alternate_path; - - ib_addr_set_sgid(&rt->addr.dev_addr, &rt->path_rec[0].sgid); - ib_addr_set_dgid(&rt->addr.dev_addr, &rt->path_rec[0].dgid); - ib_addr_set_pkey(&rt->addr.dev_addr, be16_to_cpu(rt->path_rec[0].pkey)); - rt->addr.dev_addr.dev_type = IB_NODE_CA; - - id_priv = container_of(id, struct rdma_id_private, id); - id_priv->state = CMA_CONNECT; - return id_priv; -err: - rdma_destroy_id(id); - return NULL; -} - -static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) -{ - struct rdma_id_private *listen_id, *conn_id; - int offset, ret; - - listen_id = cm_id->context; - atomic_inc(&listen_id->dev_remove); - if (!cma_comp(listen_id, CMA_LISTEN)) { - ret = -ECONNABORTED; - goto out; - } - - conn_id = cma_new_id(&listen_id->id, ib_event); - if (!conn_id) { - ret = -ENOMEM; - goto out; - } - - atomic_inc(&conn_id->dev_remove); - ret = cma_acquire_ib_dev(conn_id); - if (ret) { - ret = -ENODEV; - cma_release_remove(conn_id); - rdma_destroy_id(&conn_id->id); - goto out; - } - - conn_id->cm_id.ib = cm_id; - cm_id->context = conn_id; - cm_id->cm_handler = cma_ib_handler; - - offset = cma_user_data_offset(listen_id->id.ps); - ret = cma_notify_user(conn_id, RDMA_CM_EVENT_CONNECT_REQUEST, 0, - ib_event->private_data + offset, - IB_CM_REQ_PRIVATE_DATA_SIZE - offset); - if (ret) { - /* Destroy the CM ID by returning a non-zero value. */ - conn_id->cm_id.ib = NULL; - cma_exch(conn_id, CMA_DESTROYING); - cma_release_remove(conn_id); - rdma_destroy_id(&conn_id->id); - } -out: - cma_release_remove(listen_id); - return ret; -} - -static __be64 cma_get_service_id(enum rdma_port_space ps, struct sockaddr *addr) -{ - return cpu_to_be64(((u64)ps << 16) + - be16_to_cpu(((struct sockaddr_in *) addr)->sin_port)); -} - -static void cma_set_compare_data(enum rdma_port_space ps, struct sockaddr *addr, - struct ib_cm_compare_data *compare) -{ - struct cma_hdr *cma_data, *cma_mask; - struct sdp_hh *sdp_data, *sdp_mask; - __u32 ip4_addr; - struct in6_addr ip6_addr; - - memset(compare, 0, sizeof *compare); - cma_data = (void *) compare->data; - cma_mask = (void *) compare->mask; - sdp_data = (void *) compare->data; - sdp_mask = (void *) compare->mask; - - switch (addr->sa_family) { - case AF_INET: - ip4_addr = ((struct sockaddr_in *) addr)->sin_addr.s_addr; - if (ps == RDMA_PS_SDP) { - sdp_set_ip_ver(sdp_data, 4); - sdp_set_ip_ver(sdp_mask, 0xF); - sdp_data->dst_addr.ip4.addr = ip4_addr; - sdp_mask->dst_addr.ip4.addr = ~0; - } else { - cma_set_ip_ver(cma_data, 4); - cma_set_ip_ver(cma_mask, 0xF); - cma_data->dst_addr.ip4.addr = ip4_addr; - cma_mask->dst_addr.ip4.addr = ~0; - } - break; - case AF_INET6: - ip6_addr = ((struct sockaddr_in6 *) addr)->sin6_addr; - if (ps == RDMA_PS_SDP) { - sdp_set_ip_ver(sdp_data, 6); - sdp_set_ip_ver(sdp_mask, 0xF); - sdp_data->dst_addr.ip6 = ip6_addr; - memset(&sdp_mask->dst_addr.ip6, 0xFF, - sizeof sdp_mask->dst_addr.ip6); - } else { - cma_set_ip_ver(cma_data, 6); - cma_set_ip_ver(cma_mask, 0xF); - cma_data->dst_addr.ip6 = ip6_addr; - memset(&cma_mask->dst_addr.ip6, 0xFF, - sizeof cma_mask->dst_addr.ip6); - } - break; - default: - break; - } -} - -static int cma_ib_listen(struct rdma_id_private *id_priv) -{ - struct ib_cm_compare_data compare_data; - struct sockaddr *addr; - __be64 svc_id; - int ret; - - id_priv->cm_id.ib = ib_create_cm_id(id_priv->id.device, cma_req_handler, - id_priv); - if (IS_ERR(id_priv->cm_id.ib)) - return PTR_ERR(id_priv->cm_id.ib); - - addr = &id_priv->id.route.addr.src_addr; - svc_id = cma_get_service_id(id_priv->id.ps, addr); - if (cma_any_addr(addr)) - ret = ib_cm_listen(id_priv->cm_id.ib, svc_id, 0, NULL); - else { - cma_set_compare_data(id_priv->id.ps, addr, &compare_data); - ret = ib_cm_listen(id_priv->cm_id.ib, svc_id, 0, &compare_data); - } - - if (ret) { - ib_destroy_cm_id(id_priv->cm_id.ib); - id_priv->cm_id.ib = NULL; - } - - return ret; -} - -static int cma_listen_handler(struct rdma_cm_id *id, - struct rdma_cm_event *event) -{ - struct rdma_id_private *id_priv = id->context; - - id->context = id_priv->id.context; - id->event_handler = id_priv->id.event_handler; - return id_priv->id.event_handler(id, event); -} - -static void cma_listen_on_dev(struct rdma_id_private *id_priv, - struct cma_device *cma_dev) -{ - struct rdma_id_private *dev_id_priv; - struct rdma_cm_id *id; - int ret; - - id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps); - if (IS_ERR(id)) - return; - - dev_id_priv = container_of(id, struct rdma_id_private, id); - - dev_id_priv->state = CMA_ADDR_BOUND; - memcpy(&id->route.addr.src_addr, &id_priv->id.route.addr.src_addr, - ip_addr_size(&id_priv->id.route.addr.src_addr)); - - cma_attach_to_dev(dev_id_priv, cma_dev); - list_add_tail(&dev_id_priv->listen_list, &id_priv->listen_list); - - ret = rdma_listen(id, id_priv->backlog); - if (ret) - goto err; - - return; -err: - cma_destroy_listen(dev_id_priv); -} - -static void cma_listen_on_all(struct rdma_id_private *id_priv) -{ - struct cma_device *cma_dev; - - mutex_lock(&lock); - list_add_tail(&id_priv->list, &listen_any_list); - list_for_each_entry(cma_dev, &dev_list, list) - cma_listen_on_dev(id_priv, cma_dev); - mutex_unlock(&lock); -} - -static int cma_bind_any(struct rdma_cm_id *id, sa_family_t af) -{ - struct sockaddr_in addr_in; - - memset(&addr_in, 0, sizeof addr_in); - addr_in.sin_family = af; - return rdma_bind_addr(id, (struct sockaddr *) &addr_in); -} - -int rdma_listen(struct rdma_cm_id *id, int backlog) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (id_priv->state == CMA_IDLE) { - ret = cma_bind_any(id, AF_INET); - if (ret) - return ret; - } - - if (!cma_comp_exch(id_priv, CMA_ADDR_BOUND, CMA_LISTEN)) - return -EINVAL; - - id_priv->backlog = backlog; - if (id->device) { - switch (id->device->node_type) { - case IB_NODE_CA: - ret = cma_ib_listen(id_priv); - if (ret) - goto err; - break; - default: - ret = -ENOSYS; - goto err; - } - } else - cma_listen_on_all(id_priv); - - return 0; -err: - id_priv->backlog = 0; - cma_comp_exch(id_priv, CMA_LISTEN, CMA_ADDR_BOUND); - return ret; -} -EXPORT_SYMBOL(rdma_listen); - -static void cma_query_handler(int status, struct ib_sa_path_rec *path_rec, - void *context) -{ - struct cma_work *work = context; - struct rdma_route *route; - - route = &work->id->id.route; - - if (!status) { - route->num_paths = 1; - *route->path_rec = *path_rec; - } else { - work->old_state = CMA_ROUTE_QUERY; - work->new_state = CMA_ADDR_RESOLVED; - work->event.event = RDMA_CM_EVENT_ROUTE_ERROR; - } - - queue_work(cma_wq, &work->work); -} - -static int cma_query_ib_route(struct rdma_id_private *id_priv, int timeout_ms, - struct cma_work *work) -{ - struct rdma_dev_addr *addr = &id_priv->id.route.addr.dev_addr; - struct ib_sa_path_rec path_rec; - - memset(&path_rec, 0, sizeof path_rec); - ib_addr_get_sgid(addr, &path_rec.sgid); - ib_addr_get_dgid(addr, &path_rec.dgid); - path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(addr)); - path_rec.numb_path = 1; - - id_priv->query_id = ib_sa_path_rec_get(id_priv->id.device, - id_priv->id.port_num, &path_rec, - IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID | - IB_SA_PATH_REC_PKEY | IB_SA_PATH_REC_NUMB_PATH, - timeout_ms, GFP_KERNEL, - cma_query_handler, work, &id_priv->query); - - return (id_priv->query_id < 0) ? id_priv->query_id : 0; -} - -static void cma_work_handler(void *data) -{ - struct cma_work *work = data; - struct rdma_id_private *id_priv = work->id; - int destroy = 0; - - atomic_inc(&id_priv->dev_remove); - if (!cma_comp_exch(id_priv, work->old_state, work->new_state)) - goto out; - - if (id_priv->id.event_handler(&id_priv->id, &work->event)) { - cma_exch(id_priv, CMA_DESTROYING); - destroy = 1; - } -out: - cma_release_remove(id_priv); - cma_deref_id(id_priv); - if (destroy) - rdma_destroy_id(&id_priv->id); - kfree(work); -} - -static int cma_resolve_ib_route(struct rdma_id_private *id_priv, int timeout_ms) -{ - struct rdma_route *route = &id_priv->id.route; - struct cma_work *work; - int ret; - - work = kzalloc(sizeof *work, GFP_KERNEL); - if (!work) - return -ENOMEM; - - work->id = id_priv; - INIT_WORK(&work->work, cma_work_handler, work); - work->old_state = CMA_ROUTE_QUERY; - work->new_state = CMA_ROUTE_RESOLVED; - work->event.event = RDMA_CM_EVENT_ROUTE_RESOLVED; - - route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL); - if (!route->path_rec) { - ret = -ENOMEM; - goto err1; - } - - ret = cma_query_ib_route(id_priv, timeout_ms, work); - if (ret) - goto err2; - - return 0; -err2: - kfree(route->path_rec); - route->path_rec = NULL; -err1: - kfree(work); - return ret; -} - -int rdma_set_ib_paths(struct rdma_cm_id *id, - struct ib_sa_path_rec *path_rec, int num_paths) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp_exch(id_priv, CMA_ADDR_RESOLVED, CMA_ROUTE_RESOLVED)) - return -EINVAL; - - id->route.path_rec = kmalloc(sizeof *path_rec * num_paths, GFP_KERNEL); - if (!id->route.path_rec) { - ret = -ENOMEM; - goto err; - } - - memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths); - return 0; -err: - cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED); - return ret; -} -EXPORT_SYMBOL(rdma_set_ib_paths); - -int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp_exch(id_priv, CMA_ADDR_RESOLVED, CMA_ROUTE_QUERY)) - return -EINVAL; - - atomic_inc(&id_priv->refcount); - switch (id->device->node_type) { - case IB_NODE_CA: - ret = cma_resolve_ib_route(id_priv, timeout_ms); - break; - default: - ret = -ENOSYS; - break; - } - if (ret) - goto err; - - return 0; -err: - cma_comp_exch(id_priv, CMA_ROUTE_QUERY, CMA_ADDR_RESOLVED); - cma_deref_id(id_priv); - return ret; -} -EXPORT_SYMBOL(rdma_resolve_route); - -static int cma_bind_loopback(struct rdma_id_private *id_priv) -{ - struct cma_device *cma_dev; - struct ib_port_attr port_attr; - union ib_gid gid; - u16 pkey; - int ret; - u8 p; - - mutex_lock(&lock); - list_for_each_entry(cma_dev, &dev_list, list) - for (p = 1; p <= cma_dev->device->phys_port_cnt; ++p) - if (!ib_query_port (cma_dev->device, p, &port_attr) && - port_attr.state == IB_PORT_ACTIVE) - goto port_found; - - if (!list_empty(&dev_list)) { - p = 1; - cma_dev = list_entry(dev_list.next, struct cma_device, list); - } else { - ret = -ENODEV; - goto out; - } - -port_found: - ret = ib_get_cached_gid(cma_dev->device, p, 0, &gid); - if (ret) - goto out; - - ret = ib_get_cached_pkey(cma_dev->device, p, 0, &pkey); - if (ret) - goto out; - - ib_addr_set_sgid(&id_priv->id.route.addr.dev_addr, &gid); - ib_addr_set_pkey(&id_priv->id.route.addr.dev_addr, pkey); - id_priv->id.port_num = p; - cma_attach_to_dev(id_priv, cma_dev); -out: - mutex_unlock(&lock); - return ret; -} - -static void addr_handler(int status, struct sockaddr *src_addr, - struct rdma_dev_addr *dev_addr, void *context) -{ - struct rdma_id_private *id_priv = context; - enum rdma_cm_event_type event; - - atomic_inc(&id_priv->dev_remove); - if (!id_priv->cma_dev && !status) - status = cma_acquire_dev(id_priv); - - if (status) { - if (!cma_comp_exch(id_priv, CMA_ADDR_QUERY, CMA_ADDR_BOUND)) - goto out; - event = RDMA_CM_EVENT_ADDR_ERROR; - } else { - if (!cma_comp_exch(id_priv, CMA_ADDR_QUERY, CMA_ADDR_RESOLVED)) - goto out; - memcpy(&id_priv->id.route.addr.src_addr, src_addr, - ip_addr_size(src_addr)); - event = RDMA_CM_EVENT_ADDR_RESOLVED; - } - - if (cma_notify_user(id_priv, event, status, NULL, 0)) { - cma_exch(id_priv, CMA_DESTROYING); - cma_release_remove(id_priv); - cma_deref_id(id_priv); - rdma_destroy_id(&id_priv->id); - return; - } -out: - cma_release_remove(id_priv); - cma_deref_id(id_priv); -} - -static int cma_resolve_loopback(struct rdma_id_private *id_priv) -{ - struct cma_work *work; - struct sockaddr_in *src_in, *dst_in; - union ib_gid gid; - int ret; - - work = kzalloc(sizeof *work, GFP_KERNEL); - if (!work) - return -ENOMEM; - - if (!id_priv->cma_dev) { - ret = cma_bind_loopback(id_priv); - if (ret) - goto err; - } - - ib_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid); - ib_addr_set_dgid(&id_priv->id.route.addr.dev_addr, &gid); - - if (cma_zero_addr(&id_priv->id.route.addr.src_addr)) { - src_in = (struct sockaddr_in *)&id_priv->id.route.addr.src_addr; - dst_in = (struct sockaddr_in *)&id_priv->id.route.addr.dst_addr; - src_in->sin_family = dst_in->sin_family; - src_in->sin_addr.s_addr = dst_in->sin_addr.s_addr; - } - - work->id = id_priv; - INIT_WORK(&work->work, cma_work_handler, work); - work->old_state = CMA_ADDR_QUERY; - work->new_state = CMA_ADDR_RESOLVED; - work->event.event = RDMA_CM_EVENT_ADDR_RESOLVED; - queue_work(cma_wq, &work->work); - return 0; -err: - kfree(work); - return ret; -} - -static int cma_bind_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, - struct sockaddr *dst_addr) -{ - if (src_addr && src_addr->sa_family) - return rdma_bind_addr(id, src_addr); - else - return cma_bind_any(id, dst_addr->sa_family); -} - -int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, - struct sockaddr *dst_addr, int timeout_ms) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (id_priv->state == CMA_IDLE) { - ret = cma_bind_addr(id, src_addr, dst_addr); - if (ret) - return ret; - } - - if (!cma_comp_exch(id_priv, CMA_ADDR_BOUND, CMA_ADDR_QUERY)) - return -EINVAL; - - atomic_inc(&id_priv->refcount); - memcpy(&id->route.addr.dst_addr, dst_addr, ip_addr_size(dst_addr)); - if (cma_any_addr(dst_addr)) - ret = cma_resolve_loopback(id_priv); - else - ret = rdma_resolve_ip(&id->route.addr.src_addr, dst_addr, - &id->route.addr.dev_addr, - timeout_ms, addr_handler, id_priv); - if (ret) - goto err; - - return 0; -err: - cma_comp_exch(id_priv, CMA_ADDR_QUERY, CMA_ADDR_BOUND); - cma_deref_id(id_priv); - return ret; -} -EXPORT_SYMBOL(rdma_resolve_addr); - -static void cma_bind_port(struct rdma_bind_list *bind_list, - struct rdma_id_private *id_priv) -{ - struct sockaddr_in *sin; - - sin = (struct sockaddr_in *) &id_priv->id.route.addr.src_addr; - sin->sin_port = htons(bind_list->port); - id_priv->bind_list = bind_list; - hlist_add_head(&id_priv->node, &bind_list->owners); -} - -static int cma_alloc_port(struct idr *ps, struct rdma_id_private *id_priv, - unsigned short snum) -{ - struct rdma_bind_list *bind_list; - int port, start, ret; - - bind_list = kzalloc(sizeof *bind_list, GFP_KERNEL); - if (!bind_list) - return -ENOMEM; - - start = snum ? snum : sysctl_local_port_range[0]; - - do { - ret = idr_get_new_above(ps, bind_list, start, &port); - } while ((ret == -EAGAIN) && idr_pre_get(ps, GFP_KERNEL)); - - if (ret) - goto err; - - if ((snum && port != snum) || - (!snum && port > sysctl_local_port_range[1])) { - idr_remove(ps, port); - ret = -EADDRNOTAVAIL; - goto err; - } - - bind_list->ps = ps; - bind_list->port = (unsigned short) port; - cma_bind_port(bind_list, id_priv); - return 0; -err: - kfree(bind_list); - return ret; -} - -static int cma_use_port(struct idr *ps, struct rdma_id_private *id_priv) -{ - struct rdma_id_private *cur_id; - struct sockaddr_in *sin, *cur_sin; - struct rdma_bind_list *bind_list; - struct hlist_node *node; - unsigned short snum; - - sin = (struct sockaddr_in *) &id_priv->id.route.addr.src_addr; - snum = ntohs(sin->sin_port); - if (snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) - return -EACCES; - - bind_list = idr_find(ps, snum); - if (!bind_list) - return cma_alloc_port(ps, id_priv, snum); - - /* - * We don't support binding to any address if anyone is bound to - * a specific address on the same port. - */ - if (cma_any_addr(&id_priv->id.route.addr.src_addr)) - return -EADDRNOTAVAIL; - - hlist_for_each_entry(cur_id, node, &bind_list->owners, node) { - if (cma_any_addr(&cur_id->id.route.addr.src_addr)) - return -EADDRNOTAVAIL; - - cur_sin = (struct sockaddr_in *) &cur_id->id.route.addr.src_addr; - if (sin->sin_addr.s_addr == cur_sin->sin_addr.s_addr) - return -EADDRINUSE; - } - - cma_bind_port(bind_list, id_priv); - return 0; -} - -static int cma_get_port(struct rdma_id_private *id_priv) -{ - struct idr *ps; - int ret; - - switch (id_priv->id.ps) { - case RDMA_PS_SDP: - ps = &sdp_ps; - break; - case RDMA_PS_TCP: - ps = &tcp_ps; - break; - default: - return -EPROTONOSUPPORT; - } - - mutex_lock(&lock); - if (cma_any_port(&id_priv->id.route.addr.src_addr)) - ret = cma_alloc_port(ps, id_priv, 0); - else - ret = cma_use_port(ps, id_priv); - mutex_unlock(&lock); - - return ret; -} - -int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr) -{ - struct rdma_id_private *id_priv; - int ret; - - if (addr->sa_family != AF_INET) - return -EAFNOSUPPORT; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp_exch(id_priv, CMA_IDLE, CMA_ADDR_BOUND)) - return -EINVAL; - - if (!cma_any_addr(addr)) { - ret = rdma_translate_ip(addr, &id->route.addr.dev_addr); - if (!ret) - ret = cma_acquire_dev(id_priv); - if (ret) - goto err; - } - - memcpy(&id->route.addr.src_addr, addr, ip_addr_size(addr)); - ret = cma_get_port(id_priv); - if (ret) - goto err; - - return 0; -err: - cma_comp_exch(id_priv, CMA_ADDR_BOUND, CMA_IDLE); - return ret; -} -EXPORT_SYMBOL(rdma_bind_addr); - -static int cma_format_hdr(void *hdr, enum rdma_port_space ps, - struct rdma_route *route) -{ - struct sockaddr_in *src4, *dst4; - struct cma_hdr *cma_hdr; - struct sdp_hh *sdp_hdr; - - src4 = (struct sockaddr_in *) &route->addr.src_addr; - dst4 = (struct sockaddr_in *) &route->addr.dst_addr; - - switch (ps) { - case RDMA_PS_SDP: - sdp_hdr = hdr; - if (sdp_get_majv(sdp_hdr->sdp_version) != SDP_MAJ_VERSION) - return -EINVAL; - sdp_set_ip_ver(sdp_hdr, 4); - sdp_hdr->src_addr.ip4.addr = src4->sin_addr.s_addr; - sdp_hdr->dst_addr.ip4.addr = dst4->sin_addr.s_addr; - sdp_hdr->port = src4->sin_port; - break; - default: - cma_hdr = hdr; - cma_hdr->cma_version = CMA_VERSION; - cma_set_ip_ver(cma_hdr, 4); - cma_hdr->src_addr.ip4.addr = src4->sin_addr.s_addr; - cma_hdr->dst_addr.ip4.addr = dst4->sin_addr.s_addr; - cma_hdr->port = src4->sin_port; - break; - } - return 0; -} - -static int cma_connect_ib(struct rdma_id_private *id_priv, - struct rdma_conn_param *conn_param) -{ - struct ib_cm_req_param req; - struct rdma_route *route; - void *private_data; - int offset, ret; - - memset(&req, 0, sizeof req); - offset = cma_user_data_offset(id_priv->id.ps); - req.private_data_len = offset + conn_param->private_data_len; - private_data = kzalloc(req.private_data_len, GFP_ATOMIC); - if (!private_data) - return -ENOMEM; - - if (conn_param->private_data && conn_param->private_data_len) - memcpy(private_data + offset, conn_param->private_data, - conn_param->private_data_len); - - id_priv->cm_id.ib = ib_create_cm_id(id_priv->id.device, cma_ib_handler, - id_priv); - if (IS_ERR(id_priv->cm_id.ib)) { - ret = PTR_ERR(id_priv->cm_id.ib); - goto out; - } - - route = &id_priv->id.route; - ret = cma_format_hdr(private_data, id_priv->id.ps, route); - if (ret) - goto out; - req.private_data = private_data; - - req.primary_path = &route->path_rec[0]; - if (route->num_paths == 2) - req.alternate_path = &route->path_rec[1]; - - req.service_id = cma_get_service_id(id_priv->id.ps, - &route->addr.dst_addr); - req.qp_num = id_priv->qp_num; - req.qp_type = id_priv->qp_type; - req.starting_psn = id_priv->seq_num; - req.responder_resources = conn_param->responder_resources; - req.initiator_depth = conn_param->initiator_depth; - req.flow_control = conn_param->flow_control; - req.retry_count = conn_param->retry_count; - req.rnr_retry_count = conn_param->rnr_retry_count; - req.remote_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT; - req.local_cm_response_timeout = CMA_CM_RESPONSE_TIMEOUT; - req.max_cm_retries = CMA_MAX_CM_RETRIES; - req.srq = id_priv->srq ? 1 : 0; - - ret = ib_send_cm_req(id_priv->cm_id.ib, &req); -out: - kfree(private_data); - return ret; -} - -int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_CONNECT)) - return -EINVAL; - - if (!id->qp) { - id_priv->qp_num = conn_param->qp_num; - id_priv->qp_type = conn_param->qp_type; - id_priv->srq = conn_param->srq; - } - - switch (id->device->node_type) { - case IB_NODE_CA: - ret = cma_connect_ib(id_priv, conn_param); - break; - default: - ret = -ENOSYS; - break; - } - if (ret) - goto err; - - return 0; -err: - cma_comp_exch(id_priv, CMA_CONNECT, CMA_ROUTE_RESOLVED); - return ret; -} -EXPORT_SYMBOL(rdma_connect); - -static int cma_accept_ib(struct rdma_id_private *id_priv, - struct rdma_conn_param *conn_param) -{ - struct ib_cm_rep_param rep; - int ret; - - ret = cma_modify_qp_rtr(&id_priv->id); - if (ret) - return ret; - - memset(&rep, 0, sizeof rep); - rep.qp_num = id_priv->qp_num; - rep.starting_psn = id_priv->seq_num; - rep.private_data = conn_param->private_data; - rep.private_data_len = conn_param->private_data_len; - rep.responder_resources = conn_param->responder_resources; - rep.initiator_depth = conn_param->initiator_depth; - rep.target_ack_delay = CMA_CM_RESPONSE_TIMEOUT; - rep.failover_accepted = 0; - rep.flow_control = conn_param->flow_control; - rep.rnr_retry_count = conn_param->rnr_retry_count; - rep.srq = id_priv->srq ? 1 : 0; - - return ib_send_cm_rep(id_priv->cm_id.ib, &rep); -} - -int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp(id_priv, CMA_CONNECT)) - return -EINVAL; - - if (!id->qp && conn_param) { - id_priv->qp_num = conn_param->qp_num; - id_priv->qp_type = conn_param->qp_type; - id_priv->srq = conn_param->srq; - } - - switch (id->device->node_type) { - case IB_NODE_CA: - if (conn_param) - ret = cma_accept_ib(id_priv, conn_param); - else - ret = cma_rep_recv(id_priv); - break; - default: - ret = -ENOSYS; - break; - } - - if (ret) - goto reject; - - return 0; -reject: - cma_modify_qp_err(id); - rdma_reject(id, NULL, 0); - return ret; -} -EXPORT_SYMBOL(rdma_accept); - -int rdma_reject(struct rdma_cm_id *id, const void *private_data, - u8 private_data_len) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp(id_priv, CMA_CONNECT)) - return -EINVAL; - - switch (id->device->node_type) { - case IB_NODE_CA: - ret = ib_send_cm_rej(id_priv->cm_id.ib, - IB_CM_REJ_CONSUMER_DEFINED, NULL, 0, - private_data, private_data_len); - break; - default: - ret = -ENOSYS; - break; - } - return ret; -} -EXPORT_SYMBOL(rdma_reject); - -int rdma_disconnect(struct rdma_cm_id *id) -{ - struct rdma_id_private *id_priv; - int ret; - - id_priv = container_of(id, struct rdma_id_private, id); - if (!cma_comp(id_priv, CMA_CONNECT) && - !cma_comp(id_priv, CMA_DISCONNECT)) - return -EINVAL; - - ret = cma_modify_qp_err(id); - if (ret) - goto out; - - switch (id->device->node_type) { - case IB_NODE_CA: - /* Initiate or respond to a disconnect. */ - if (ib_send_cm_dreq(id_priv->cm_id.ib, NULL, 0)) - ib_send_cm_drep(id_priv->cm_id.ib, NULL, 0); - break; - default: - break; - } -out: - return ret; -} -EXPORT_SYMBOL(rdma_disconnect); - -static void cma_add_one(struct ib_device *device) -{ - struct cma_device *cma_dev; - struct rdma_id_private *id_priv; - - cma_dev = kmalloc(sizeof *cma_dev, GFP_KERNEL); - if (!cma_dev) - return; - - cma_dev->device = device; - cma_dev->node_guid = device->node_guid; - if (!cma_dev->node_guid) - goto err; - - init_completion(&cma_dev->comp); - atomic_set(&cma_dev->refcount, 1); - INIT_LIST_HEAD(&cma_dev->id_list); - ib_set_client_data(device, &cma_client, cma_dev); - - mutex_lock(&lock); - list_add_tail(&cma_dev->list, &dev_list); - list_for_each_entry(id_priv, &listen_any_list, list) - cma_listen_on_dev(id_priv, cma_dev); - mutex_unlock(&lock); - return; -err: - kfree(cma_dev); -} - -static int cma_remove_id_dev(struct rdma_id_private *id_priv) -{ - enum cma_state state; - - /* Record that we want to remove the device */ - state = cma_exch(id_priv, CMA_DEVICE_REMOVAL); - if (state == CMA_DESTROYING) - return 0; - - cma_cancel_operation(id_priv, state); - wait_event(id_priv->wait_remove, !atomic_read(&id_priv->dev_remove)); - - /* Check for destruction from another callback. */ - if (!cma_comp(id_priv, CMA_DEVICE_REMOVAL)) - return 0; - - return cma_notify_user(id_priv, RDMA_CM_EVENT_DEVICE_REMOVAL, - 0, NULL, 0); -} - -static void cma_process_remove(struct cma_device *cma_dev) -{ - struct list_head remove_list; - struct rdma_id_private *id_priv; - int ret; - - INIT_LIST_HEAD(&remove_list); - - mutex_lock(&lock); - while (!list_empty(&cma_dev->id_list)) { - id_priv = list_entry(cma_dev->id_list.next, - struct rdma_id_private, list); - - if (cma_internal_listen(id_priv)) { - cma_destroy_listen(id_priv); - continue; - } - - list_del(&id_priv->list); - list_add_tail(&id_priv->list, &remove_list); - atomic_inc(&id_priv->refcount); - mutex_unlock(&lock); - - ret = cma_remove_id_dev(id_priv); - cma_deref_id(id_priv); - if (ret) - rdma_destroy_id(&id_priv->id); - - mutex_lock(&lock); - } - mutex_unlock(&lock); - - cma_deref_dev(cma_dev); - wait_for_completion(&cma_dev->comp); -} - -static void cma_remove_one(struct ib_device *device) -{ - struct cma_device *cma_dev; - - cma_dev = ib_get_client_data(device, &cma_client); - if (!cma_dev) - return; - - mutex_lock(&lock); - list_del(&cma_dev->list); - mutex_unlock(&lock); - - cma_process_remove(cma_dev); - kfree(cma_dev); -} - -static int cma_init(void) -{ - int ret; - - cma_wq = create_singlethread_workqueue("rdma_cm_wq"); - if (!cma_wq) - return -ENOMEM; - - ret = ib_register_client(&cma_client); - if (ret) - goto err; - return 0; - -err: - destroy_workqueue(cma_wq); - return ret; -} - -static void cma_cleanup(void) -{ - ib_unregister_client(&cma_client); - destroy_workqueue(cma_wq); - idr_destroy(&sdp_ps); - idr_destroy(&tcp_ps); -} - -module_init(cma_init); -module_exit(cma_cleanup); diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 86a3b2d40..838bf5445 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c @@ -54,7 +54,7 @@ enum { /* * If an FMR is not in use, then the list member will point to either * its pool's free_list (if the FMR can be mapped again; that is, - * remap_count < pool->max_remaps) or its pool's dirty_list (if the + * remap_count < IB_FMR_MAX_REMAPS) or its pool's dirty_list (if the * FMR needs to be unmapped before being remapped). In either of * these cases it is a bug if the ref_count is not 0. In other words, * if ref_count is > 0, then the list member must not be linked into @@ -84,7 +84,6 @@ struct ib_fmr_pool { int pool_size; int max_pages; - int max_remaps; int dirty_watermark; int dirty_len; struct list_head free_list; @@ -215,10 +214,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, { struct ib_device *device; struct ib_fmr_pool *pool; - struct ib_device_attr *attr; int i; int ret; - int max_remaps; if (!params) return ERR_PTR(-EINVAL); @@ -231,26 +228,6 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, return ERR_PTR(-ENOSYS); } - attr = kmalloc(sizeof *attr, GFP_KERNEL); - if (!attr) { - printk(KERN_WARNING "couldn't allocate device attr struct"); - return ERR_PTR(-ENOMEM); - } - - ret = ib_query_device(device, attr); - if (ret) { - printk(KERN_WARNING "couldn't query device"); - kfree(attr); - return ERR_PTR(ret); - } - - if (!attr->max_map_per_fmr) - max_remaps = IB_FMR_MAX_REMAPS; - else - max_remaps = attr->max_map_per_fmr; - - kfree(attr); - pool = kmalloc(sizeof *pool, GFP_KERNEL); if (!pool) { printk(KERN_WARNING "couldn't allocate pool struct"); @@ -281,7 +258,6 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, pool->pool_size = 0; pool->max_pages = params->max_pages_per_fmr; - pool->max_remaps = max_remaps; pool->dirty_watermark = params->dirty_watermark; pool->dirty_len = 0; spin_lock_init(&pool->pool_lock); @@ -303,7 +279,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, struct ib_pool_fmr *fmr; struct ib_fmr_attr attr = { .max_pages = params->max_pages_per_fmr, - .max_maps = pool->max_remaps, + .max_maps = IB_FMR_MAX_REMAPS, .page_shift = params->page_shift }; @@ -426,7 +402,7 @@ EXPORT_SYMBOL(ib_flush_fmr_pool); struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, u64 *page_list, int list_len, - u64 io_virtual_address) + u64 *io_virtual_address) { struct ib_fmr_pool *pool = pool_handle; struct ib_pool_fmr *fmr; @@ -440,7 +416,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, fmr = ib_fmr_cache_lookup(pool, page_list, list_len, - io_virtual_address); + *io_virtual_address); if (fmr) { /* found in cache */ ++fmr->ref_count; @@ -464,7 +440,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, spin_unlock_irqrestore(&pool->pool_lock, flags); result = ib_map_phys_fmr(fmr->fmr, page_list, list_len, - io_virtual_address); + *io_virtual_address); if (result) { spin_lock_irqsave(&pool->pool_lock, flags); @@ -481,7 +457,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, fmr->ref_count = 1; if (pool->cache_bucket) { - fmr->io_virtual_address = io_virtual_address; + fmr->io_virtual_address = *io_virtual_address; fmr->page_list_len = list_len; memcpy(fmr->page_list, page_list, list_len * sizeof(*page_list)); @@ -513,7 +489,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr) --fmr->ref_count; if (!fmr->ref_count) { - if (fmr->remap_count < pool->max_remaps) { + if (fmr->remap_count < IB_FMR_MAX_REMAPS) { list_add_tail(&fmr->list, &pool->free_list); } else { list_add_tail(&fmr->list, &pool->dirty_list); diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 1c3cfbbe6..5ad41a643 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c @@ -34,7 +34,6 @@ * $Id: mad.c 5596 2006-03-03 01:00:07Z sean.hefty $ */ #include -#include #include "mad_priv.h" #include "mad_rmpp.h" @@ -46,7 +45,8 @@ MODULE_DESCRIPTION("kernel IB MAD API"); MODULE_AUTHOR("Hal Rosenstock"); MODULE_AUTHOR("Sean Hefty"); -static kmem_cache_t *ib_mad_cache; + +kmem_cache_t *ib_mad_cache; static struct list_head ib_mad_port_list; static u32 ib_mad_client_id = 0; @@ -167,15 +167,6 @@ static int is_vendor_method_in_use( return 0; } -int ib_response_mad(struct ib_mad *mad) -{ - return ((mad->mad_hdr.method & IB_MGMT_METHOD_RESP) || - (mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) || - ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_BM) && - (mad->mad_hdr.attr_mod & IB_BM_ATTR_MOD_RESP))); -} -EXPORT_SYMBOL(ib_response_mad); - /* * ib_register_mad_agent - Register to send/receive MADs */ @@ -579,6 +570,13 @@ int ib_unregister_mad_agent(struct ib_mad_agent *mad_agent) } EXPORT_SYMBOL(ib_unregister_mad_agent); +static inline int response_mad(struct ib_mad *mad) +{ + /* Trap represses are responses although response bit is reset */ + return ((mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) || + (mad->mad_hdr.method & IB_MGMT_METHOD_RESP)); +} + static void dequeue_mad(struct ib_mad_list_head *mad_list) { struct ib_mad_queue *mad_queue; @@ -725,7 +723,7 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv, switch (ret) { case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_REPLY: - if (ib_response_mad(&mad_priv->mad.mad) && + if (response_mad(&mad_priv->mad.mad) && mad_agent_priv->agent.recv_handler) { local->mad_priv = mad_priv; local->recv_mad_agent = mad_agent_priv; @@ -1553,7 +1551,7 @@ find_mad_agent(struct ib_mad_port_private *port_priv, unsigned long flags; spin_lock_irqsave(&port_priv->reg_lock, flags); - if (ib_response_mad(mad)) { + if (response_mad(mad)) { u32 hi_tid; struct ib_mad_agent_private *entry; @@ -1675,21 +1673,20 @@ static inline int rcv_has_same_class(struct ib_mad_send_wr_private *wr, rwc->recv_buf.mad->mad_hdr.mgmt_class; } -static inline int rcv_has_same_gid(struct ib_mad_agent_private *mad_agent_priv, - struct ib_mad_send_wr_private *wr, +static inline int rcv_has_same_gid(struct ib_mad_send_wr_private *wr, struct ib_mad_recv_wc *rwc ) { struct ib_ah_attr attr; u8 send_resp, rcv_resp; - union ib_gid sgid; - struct ib_device *device = mad_agent_priv->agent.device; - u8 port_num = mad_agent_priv->agent.port_num; - u8 lmc; send_resp = ((struct ib_mad *)(wr->send_buf.mad))-> mad_hdr.method & IB_MGMT_METHOD_RESP; rcv_resp = rwc->recv_buf.mad->mad_hdr.method & IB_MGMT_METHOD_RESP; + if (!send_resp && rcv_resp) + /* is request/response. GID/LIDs are both local (same). */ + return 1; + if (send_resp == rcv_resp) /* both requests, or both responses. GIDs different */ return 0; @@ -1698,78 +1695,48 @@ static inline int rcv_has_same_gid(struct ib_mad_agent_private *mad_agent_priv, /* Assume not equal, to avoid false positives. */ return 0; - if (!!(attr.ah_flags & IB_AH_GRH) != - !!(rwc->wc->wc_flags & IB_WC_GRH)) - /* one has GID, other does not. Assume different */ - return 0; - - if (!send_resp && rcv_resp) { - /* is request/response. */ - if (!(attr.ah_flags & IB_AH_GRH)) { - if (ib_get_cached_lmc(device, port_num, &lmc)) - return 0; - return (!lmc || !((attr.src_path_bits ^ - rwc->wc->dlid_path_bits) & - ((1 << lmc) - 1))); - } else { - if (ib_get_cached_gid(device, port_num, - attr.grh.sgid_index, &sgid)) - return 0; - return !memcmp(sgid.raw, rwc->recv_buf.grh->dgid.raw, - 16); - } - } - - if (!(attr.ah_flags & IB_AH_GRH)) + if (!(attr.ah_flags & IB_AH_GRH) && !(rwc->wc->wc_flags & IB_WC_GRH)) return attr.dlid == rwc->wc->slid; + else if ((attr.ah_flags & IB_AH_GRH) && + (rwc->wc->wc_flags & IB_WC_GRH)) + return memcmp(attr.grh.dgid.raw, + rwc->recv_buf.grh->sgid.raw, 16) == 0; else - return !memcmp(attr.grh.dgid.raw, rwc->recv_buf.grh->sgid.raw, - 16); -} - -static inline int is_direct(u8 class) -{ - return (class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE); + /* one has GID, other does not. Assume different */ + return 0; } - struct ib_mad_send_wr_private* ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv, - struct ib_mad_recv_wc *wc) + struct ib_mad_recv_wc *mad_recv_wc) { - struct ib_mad_send_wr_private *wr; + struct ib_mad_send_wr_private *mad_send_wr; struct ib_mad *mad; - mad = (struct ib_mad *)wc->recv_buf.mad; + mad = (struct ib_mad *)mad_recv_wc->recv_buf.mad; - list_for_each_entry(wr, &mad_agent_priv->wait_list, agent_list) { - if ((wr->tid == mad->mad_hdr.tid) && - rcv_has_same_class(wr, wc) && - /* - * Don't check GID for direct routed MADs. - * These might have permissive LIDs. - */ - (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || - rcv_has_same_gid(mad_agent_priv, wr, wc))) - return wr; + list_for_each_entry(mad_send_wr, &mad_agent_priv->wait_list, + agent_list) { + if ((mad_send_wr->tid == mad->mad_hdr.tid) && + rcv_has_same_class(mad_send_wr, mad_recv_wc) && + rcv_has_same_gid(mad_send_wr, mad_recv_wc)) + return mad_send_wr; } /* * It's possible to receive the response before we've * been notified that the send has completed */ - list_for_each_entry(wr, &mad_agent_priv->send_list, agent_list) { - if (is_data_mad(mad_agent_priv, wr->send_buf.mad) && - wr->tid == mad->mad_hdr.tid && - wr->timeout && - rcv_has_same_class(wr, wc) && - /* - * Don't check GID for direct routed MADs. - * These might have permissive LIDs. - */ - (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || - rcv_has_same_gid(mad_agent_priv, wr, wc))) + list_for_each_entry(mad_send_wr, &mad_agent_priv->send_list, + agent_list) { + if (is_data_mad(mad_agent_priv, mad_send_wr->send_buf.mad) && + mad_send_wr->tid == mad->mad_hdr.tid && + mad_send_wr->timeout && + rcv_has_same_class(mad_send_wr, mad_recv_wc) && + rcv_has_same_gid(mad_send_wr, mad_recv_wc)) { /* Verify request has not been canceled */ - return (wr->status == IB_WC_SUCCESS) ? wr : NULL; + return (mad_send_wr->status == IB_WC_SUCCESS) ? + mad_send_wr : NULL; + } } return NULL; } @@ -1777,9 +1744,11 @@ ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv, void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr) { mad_send_wr->timeout = 0; - if (mad_send_wr->refcount == 1) - list_move_tail(&mad_send_wr->agent_list, + if (mad_send_wr->refcount == 1) { + list_del(&mad_send_wr->agent_list); + list_add_tail(&mad_send_wr->agent_list, &mad_send_wr->mad_agent_priv->done_list); + } } static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv, @@ -1801,7 +1770,7 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv, } /* Complete corresponding request */ - if (ib_response_mad(mad_recv_wc->recv_buf.mad)) { + if (response_mad(mad_recv_wc->recv_buf.mad)) { spin_lock_irqsave(&mad_agent_priv->lock, flags); mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc); if (!mad_send_wr) { @@ -2098,7 +2067,8 @@ retry: queued_send_wr = container_of(mad_list, struct ib_mad_send_wr_private, mad_list); - list_move_tail(&mad_list->list, &send_queue->list); + list_del(&mad_list->list); + list_add_tail(&mad_list->list, &send_queue->list); } spin_unlock_irqrestore(&send_queue->lock, flags); diff --git a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h index d147f3bad..b4fa28d31 100644 --- a/drivers/infiniband/core/mad_priv.h +++ b/drivers/infiniband/core/mad_priv.h @@ -212,6 +212,8 @@ struct ib_mad_port_private { struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE]; }; +extern kmem_cache_t *ib_mad_cache; + int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr); struct ib_mad_send_wr_private * diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index ebcd5b181..d4704e054 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c @@ -665,7 +665,8 @@ static void process_rmpp_ack(struct ib_mad_agent_private *agent, goto out; mad_send_wr->refcount++; - list_move_tail(&mad_send_wr->agent_list, + list_del(&mad_send_wr->agent_list); + list_add_tail(&mad_send_wr->agent_list, &mad_send_wr->mad_agent_priv->send_list); } out: diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index d6b84226b..501cc054c 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -47,7 +47,6 @@ #include #include -#include MODULE_AUTHOR("Roland Dreier"); MODULE_DESCRIPTION("InfiniBand subnet administration query support"); @@ -405,8 +404,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event event->event == IB_EVENT_PORT_ACTIVE || event->event == IB_EVENT_LID_CHANGE || event->event == IB_EVENT_PKEY_CHANGE || - event->event == IB_EVENT_SM_CHANGE || - event->event == IB_EVENT_CLIENT_REREGISTER) { + event->event == IB_EVENT_SM_CHANGE) { struct ib_sa_device *sa_dev; sa_dev = container_of(handler, typeof(*sa_dev), event_handler); @@ -443,36 +441,6 @@ void ib_sa_cancel_query(int id, struct ib_sa_query *query) } EXPORT_SYMBOL(ib_sa_cancel_query); -int ib_init_ah_from_path(struct ib_device *device, u8 port_num, - struct ib_sa_path_rec *rec, struct ib_ah_attr *ah_attr) -{ - int ret; - u16 gid_index; - - memset(ah_attr, 0, sizeof *ah_attr); - ah_attr->dlid = be16_to_cpu(rec->dlid); - ah_attr->sl = rec->sl; - ah_attr->src_path_bits = be16_to_cpu(rec->slid) & 0x7f; - ah_attr->port_num = port_num; - - if (rec->hop_limit > 1) { - ah_attr->ah_flags = IB_AH_GRH; - ah_attr->grh.dgid = rec->dgid; - - ret = ib_find_cached_gid(device, &rec->sgid, &port_num, - &gid_index); - if (ret) - return ret; - - ah_attr->grh.sgid_index = gid_index; - ah_attr->grh.flow_label = be32_to_cpu(rec->flow_label); - ah_attr->grh.hop_limit = rec->hop_limit; - ah_attr->grh.traffic_class = rec->traffic_class; - } - return 0; -} -EXPORT_SYMBOL(ib_init_ah_from_path); - static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent) { unsigned long flags; @@ -489,13 +457,13 @@ static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent) spin_unlock_irqrestore(&tid_lock, flags); } -static int send_mad(struct ib_sa_query *query, int timeout_ms, gfp_t gfp_mask) +static int send_mad(struct ib_sa_query *query, int timeout_ms) { unsigned long flags; int ret, id; retry: - if (!idr_pre_get(&query_idr, gfp_mask)) + if (!idr_pre_get(&query_idr, GFP_ATOMIC)) return -ENOMEM; spin_lock_irqsave(&idr_lock, flags); ret = idr_get_new(&query_idr, query, &id); @@ -631,7 +599,7 @@ int ib_sa_path_rec_get(struct ib_device *device, u8 port_num, *sa_query = &query->sa_query; - ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); + ret = send_mad(&query->sa_query, timeout_ms); if (ret < 0) goto err2; @@ -753,7 +721,7 @@ int ib_sa_service_rec_query(struct ib_device *device, u8 port_num, u8 method, *sa_query = &query->sa_query; - ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); + ret = send_mad(&query->sa_query, timeout_ms); if (ret < 0) goto err2; @@ -845,7 +813,7 @@ int ib_sa_mcmember_rec_query(struct ib_device *device, u8 port_num, *sa_query = &query->sa_query; - ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); + ret = send_mad(&query->sa_query, timeout_ms); if (ret < 0) goto err2; diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index c1c6fda94..9164a09b6 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c @@ -30,7 +30,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * - * $Id: ucm.c 4311 2005-12-05 18:42:01Z sean.hefty $ + * $Id: ucm.c 2594 2005-06-13 19:46:02Z libor $ */ #include @@ -50,7 +50,6 @@ #include #include -#include MODULE_AUTHOR("Libor Michalek"); MODULE_DESCRIPTION("InfiniBand userspace Connection Manager access"); @@ -64,7 +63,7 @@ struct ib_ucm_device { }; struct ib_ucm_file { - struct mutex file_mutex; + struct semaphore mutex; struct file *filp; struct ib_ucm_device *device; @@ -153,7 +152,7 @@ static void ib_ucm_cleanup_events(struct ib_ucm_context *ctx) { struct ib_ucm_event *uevent; - mutex_lock(&ctx->file->file_mutex); + down(&ctx->file->mutex); list_del(&ctx->file_list); while (!list_empty(&ctx->events)) { @@ -168,7 +167,7 @@ static void ib_ucm_cleanup_events(struct ib_ucm_context *ctx) kfree(uevent); } - mutex_unlock(&ctx->file->file_mutex); + up(&ctx->file->mutex); } static struct ib_ucm_context *ib_ucm_ctx_alloc(struct ib_ucm_file *file) @@ -206,6 +205,36 @@ error: return NULL; } +static void ib_ucm_event_path_get(struct ib_ucm_path_rec *upath, + struct ib_sa_path_rec *kpath) +{ + if (!kpath || !upath) + return; + + memcpy(upath->dgid, kpath->dgid.raw, sizeof *upath->dgid); + memcpy(upath->sgid, kpath->sgid.raw, sizeof *upath->sgid); + + upath->dlid = kpath->dlid; + upath->slid = kpath->slid; + upath->raw_traffic = kpath->raw_traffic; + upath->flow_label = kpath->flow_label; + upath->hop_limit = kpath->hop_limit; + upath->traffic_class = kpath->traffic_class; + upath->reversible = kpath->reversible; + upath->numb_path = kpath->numb_path; + upath->pkey = kpath->pkey; + upath->sl = kpath->sl; + upath->mtu_selector = kpath->mtu_selector; + upath->mtu = kpath->mtu; + upath->rate_selector = kpath->rate_selector; + upath->rate = kpath->rate; + upath->packet_life_time = kpath->packet_life_time; + upath->preference = kpath->preference; + + upath->packet_life_time_selector = + kpath->packet_life_time_selector; +} + static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq, struct ib_cm_req_event_param *kreq) { @@ -224,10 +253,8 @@ static void ib_ucm_event_req_get(struct ib_ucm_req_event_resp *ureq, ureq->srq = kreq->srq; ureq->port = kreq->port; - ib_copy_path_rec_to_user(&ureq->primary_path, kreq->primary_path); - if (kreq->alternate_path) - ib_copy_path_rec_to_user(&ureq->alternate_path, - kreq->alternate_path); + ib_ucm_event_path_get(&ureq->primary_path, kreq->primary_path); + ib_ucm_event_path_get(&ureq->alternate_path, kreq->alternate_path); } static void ib_ucm_event_rep_get(struct ib_ucm_rep_event_resp *urep, @@ -297,8 +324,8 @@ static int ib_ucm_event_process(struct ib_cm_event *evt, info = evt->param.rej_rcvd.ari; break; case IB_CM_LAP_RECEIVED: - ib_copy_path_rec_to_user(&uvt->resp.u.lap_resp.path, - evt->param.lap_rcvd.alternate_path); + ib_ucm_event_path_get(&uvt->resp.u.lap_resp.path, + evt->param.lap_rcvd.alternate_path); uvt->data_len = IB_CM_LAP_PRIVATE_DATA_SIZE; uvt->resp.present = IB_UCM_PRES_ALTERNATE; break; @@ -375,11 +402,11 @@ static int ib_ucm_event_handler(struct ib_cm_id *cm_id, if (result) goto err2; - mutex_lock(&ctx->file->file_mutex); + down(&ctx->file->mutex); list_add_tail(&uevent->file_list, &ctx->file->events); list_add_tail(&uevent->ctx_list, &ctx->events); wake_up_interruptible(&ctx->file->poll_wait); - mutex_unlock(&ctx->file->file_mutex); + up(&ctx->file->mutex); return 0; err2: @@ -405,7 +432,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file, if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - mutex_lock(&file->file_mutex); + down(&file->mutex); while (list_empty(&file->events)) { if (file->filp->f_flags & O_NONBLOCK) { @@ -420,9 +447,9 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file, prepare_to_wait(&file->poll_wait, &wait, TASK_INTERRUPTIBLE); - mutex_unlock(&file->file_mutex); + up(&file->mutex); schedule(); - mutex_lock(&file->file_mutex); + down(&file->mutex); finish_wait(&file->poll_wait, &wait); } @@ -482,7 +509,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file, kfree(uevent->info); kfree(uevent); done: - mutex_unlock(&file->file_mutex); + up(&file->mutex); return result; } @@ -501,9 +528,9 @@ static ssize_t ib_ucm_create_id(struct ib_ucm_file *file, if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; - mutex_lock(&file->file_mutex); + down(&file->mutex); ctx = ib_ucm_ctx_alloc(file); - mutex_unlock(&file->file_mutex); + up(&file->mutex); if (!ctx) return -ENOMEM; @@ -610,11 +637,65 @@ static ssize_t ib_ucm_attr_id(struct ib_ucm_file *file, return result; } +static void ib_ucm_copy_ah_attr(struct ib_ucm_ah_attr *dest_attr, + struct ib_ah_attr *src_attr) +{ + memcpy(dest_attr->grh_dgid, src_attr->grh.dgid.raw, + sizeof src_attr->grh.dgid); + dest_attr->grh_flow_label = src_attr->grh.flow_label; + dest_attr->grh_sgid_index = src_attr->grh.sgid_index; + dest_attr->grh_hop_limit = src_attr->grh.hop_limit; + dest_attr->grh_traffic_class = src_attr->grh.traffic_class; + + dest_attr->dlid = src_attr->dlid; + dest_attr->sl = src_attr->sl; + dest_attr->src_path_bits = src_attr->src_path_bits; + dest_attr->static_rate = src_attr->static_rate; + dest_attr->is_global = (src_attr->ah_flags & IB_AH_GRH); + dest_attr->port_num = src_attr->port_num; +} + +static void ib_ucm_copy_qp_attr(struct ib_ucm_init_qp_attr_resp *dest_attr, + struct ib_qp_attr *src_attr) +{ + dest_attr->cur_qp_state = src_attr->cur_qp_state; + dest_attr->path_mtu = src_attr->path_mtu; + dest_attr->path_mig_state = src_attr->path_mig_state; + dest_attr->qkey = src_attr->qkey; + dest_attr->rq_psn = src_attr->rq_psn; + dest_attr->sq_psn = src_attr->sq_psn; + dest_attr->dest_qp_num = src_attr->dest_qp_num; + dest_attr->qp_access_flags = src_attr->qp_access_flags; + + dest_attr->max_send_wr = src_attr->cap.max_send_wr; + dest_attr->max_recv_wr = src_attr->cap.max_recv_wr; + dest_attr->max_send_sge = src_attr->cap.max_send_sge; + dest_attr->max_recv_sge = src_attr->cap.max_recv_sge; + dest_attr->max_inline_data = src_attr->cap.max_inline_data; + + ib_ucm_copy_ah_attr(&dest_attr->ah_attr, &src_attr->ah_attr); + ib_ucm_copy_ah_attr(&dest_attr->alt_ah_attr, &src_attr->alt_ah_attr); + + dest_attr->pkey_index = src_attr->pkey_index; + dest_attr->alt_pkey_index = src_attr->alt_pkey_index; + dest_attr->en_sqd_async_notify = src_attr->en_sqd_async_notify; + dest_attr->sq_draining = src_attr->sq_draining; + dest_attr->max_rd_atomic = src_attr->max_rd_atomic; + dest_attr->max_dest_rd_atomic = src_attr->max_dest_rd_atomic; + dest_attr->min_rnr_timer = src_attr->min_rnr_timer; + dest_attr->port_num = src_attr->port_num; + dest_attr->timeout = src_attr->timeout; + dest_attr->retry_cnt = src_attr->retry_cnt; + dest_attr->rnr_retry = src_attr->rnr_retry; + dest_attr->alt_port_num = src_attr->alt_port_num; + dest_attr->alt_timeout = src_attr->alt_timeout; +} + static ssize_t ib_ucm_init_qp_attr(struct ib_ucm_file *file, const char __user *inbuf, int in_len, int out_len) { - struct ib_uverbs_qp_attr resp; + struct ib_ucm_init_qp_attr_resp resp; struct ib_ucm_init_qp_attr cmd; struct ib_ucm_context *ctx; struct ib_qp_attr qp_attr; @@ -637,7 +718,7 @@ static ssize_t ib_ucm_init_qp_attr(struct ib_ucm_file *file, if (result) goto out; - ib_copy_qp_attr_to_user(&resp, &qp_attr); + ib_ucm_copy_qp_attr(&resp, &qp_attr); if (copy_to_user((void __user *)(unsigned long)cmd.response, &resp, sizeof(resp))) @@ -648,17 +729,6 @@ out: return result; } -static int ucm_validate_listen(__be64 service_id, __be64 service_mask) -{ - service_id &= service_mask; - - if (((service_id & IB_CMA_SERVICE_ID_MASK) == IB_CMA_SERVICE_ID) || - ((service_id & IB_SDP_SERVICE_ID_MASK) == IB_SDP_SERVICE_ID)) - return -EINVAL; - - return 0; -} - static ssize_t ib_ucm_listen(struct ib_ucm_file *file, const char __user *inbuf, int in_len, int out_len) @@ -674,13 +744,7 @@ static ssize_t ib_ucm_listen(struct ib_ucm_file *file, if (IS_ERR(ctx)) return PTR_ERR(ctx); - result = ucm_validate_listen(cmd.service_id, cmd.service_mask); - if (result) - goto out; - - result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask, - NULL); -out: + result = ib_cm_listen(ctx->cm_id, cmd.service_id, cmd.service_mask); ib_ucm_ctx_put(ctx); return result; } @@ -729,7 +793,7 @@ static int ib_ucm_alloc_data(const void **dest, u64 src, u32 len) static int ib_ucm_path_get(struct ib_sa_path_rec **path, u64 src) { - struct ib_user_path_rec upath; + struct ib_ucm_path_rec ucm_path; struct ib_sa_path_rec *sa_path; *path = NULL; @@ -741,14 +805,36 @@ static int ib_ucm_path_get(struct ib_sa_path_rec **path, u64 src) if (!sa_path) return -ENOMEM; - if (copy_from_user(&upath, (void __user *)(unsigned long)src, - sizeof(upath))) { + if (copy_from_user(&ucm_path, (void __user *)(unsigned long)src, + sizeof(ucm_path))) { kfree(sa_path); return -EFAULT; } - ib_copy_path_rec_from_user(sa_path, &upath); + memcpy(sa_path->dgid.raw, ucm_path.dgid, sizeof sa_path->dgid); + memcpy(sa_path->sgid.raw, ucm_path.sgid, sizeof sa_path->sgid); + + sa_path->dlid = ucm_path.dlid; + sa_path->slid = ucm_path.slid; + sa_path->raw_traffic = ucm_path.raw_traffic; + sa_path->flow_label = ucm_path.flow_label; + sa_path->hop_limit = ucm_path.hop_limit; + sa_path->traffic_class = ucm_path.traffic_class; + sa_path->reversible = ucm_path.reversible; + sa_path->numb_path = ucm_path.numb_path; + sa_path->pkey = ucm_path.pkey; + sa_path->sl = ucm_path.sl; + sa_path->mtu_selector = ucm_path.mtu_selector; + sa_path->mtu = ucm_path.mtu; + sa_path->rate_selector = ucm_path.rate_selector; + sa_path->rate = ucm_path.rate; + sa_path->packet_life_time = ucm_path.packet_life_time; + sa_path->preference = ucm_path.preference; + + sa_path->packet_life_time_selector = + ucm_path.packet_life_time_selector; + *path = sa_path; return 0; } @@ -1044,6 +1130,7 @@ static ssize_t ib_ucm_send_sidr_req(struct ib_ucm_file *file, param.service_id = cmd.sid; param.timeout_ms = cmd.timeout; param.max_cm_retries = cmd.max_cm_retries; + param.pkey = cmd.pkey; ctx = ib_ucm_ctx_get(file, cmd.id); if (!IS_ERR(ctx)) { @@ -1176,7 +1263,7 @@ static int ib_ucm_open(struct inode *inode, struct file *filp) INIT_LIST_HEAD(&file->ctxs); init_waitqueue_head(&file->poll_wait); - mutex_init(&file->file_mutex); + init_MUTEX(&file->mutex); filp->private_data = file; file->filp = filp; @@ -1190,11 +1277,11 @@ static int ib_ucm_close(struct inode *inode, struct file *filp) struct ib_ucm_file *file = filp->private_data; struct ib_ucm_context *ctx; - mutex_lock(&file->file_mutex); + down(&file->mutex); while (!list_empty(&file->ctxs)) { ctx = list_entry(file->ctxs.next, struct ib_ucm_context, file_list); - mutex_unlock(&file->file_mutex); + up(&file->mutex); mutex_lock(&ctx_id_mutex); idr_remove(&ctx_id_table, ctx->id); @@ -1204,9 +1291,9 @@ static int ib_ucm_close(struct inode *inode, struct file *filp) ib_ucm_cleanup_events(ctx); kfree(ctx); - mutex_lock(&file->file_mutex); + down(&file->mutex); } - mutex_unlock(&file->file_mutex); + up(&file->mutex); kfree(file); return 0; } diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 1273f8807..afe70a549 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -112,10 +112,8 @@ struct ib_umad_device { struct ib_umad_file { struct ib_umad_port *port; struct list_head recv_list; - struct list_head send_list; struct list_head port_list; spinlock_t recv_lock; - spinlock_t send_lock; wait_queue_head_t recv_wait; struct ib_mad_agent *agent[IB_UMAD_MAX_AGENTS]; int agents_dead; @@ -179,21 +177,12 @@ static int queue_packet(struct ib_umad_file *file, return ret; } -static void dequeue_send(struct ib_umad_file *file, - struct ib_umad_packet *packet) - { - spin_lock_irq(&file->send_lock); - list_del(&packet->list); - spin_unlock_irq(&file->send_lock); - } - static void send_handler(struct ib_mad_agent *agent, struct ib_mad_send_wc *send_wc) { struct ib_umad_file *file = agent->context; struct ib_umad_packet *packet = send_wc->send_buf->context[0]; - dequeue_send(file, packet); ib_destroy_ah(packet->msg->ah); ib_free_send_mad(packet->msg); @@ -381,51 +370,6 @@ static int copy_rmpp_mad(struct ib_mad_send_buf *msg, const char __user *buf) return 0; } -static int same_destination(struct ib_user_mad_hdr *hdr1, - struct ib_user_mad_hdr *hdr2) -{ - if (!hdr1->grh_present && !hdr2->grh_present) - return (hdr1->lid == hdr2->lid); - - if (hdr1->grh_present && hdr2->grh_present) - return !memcmp(hdr1->gid, hdr2->gid, 16); - - return 0; -} - -static int is_duplicate(struct ib_umad_file *file, - struct ib_umad_packet *packet) -{ - struct ib_umad_packet *sent_packet; - struct ib_mad_hdr *sent_hdr, *hdr; - - hdr = (struct ib_mad_hdr *) packet->mad.data; - list_for_each_entry(sent_packet, &file->send_list, list) { - sent_hdr = (struct ib_mad_hdr *) sent_packet->mad.data; - - if ((hdr->tid != sent_hdr->tid) || - (hdr->mgmt_class != sent_hdr->mgmt_class)) - continue; - - /* - * No need to be overly clever here. If two new operations have - * the same TID, reject the second as a duplicate. This is more - * restrictive than required by the spec. - */ - if (!ib_response_mad((struct ib_mad *) hdr)) { - if (!ib_response_mad((struct ib_mad *) sent_hdr)) - return 1; - continue; - } else if (!ib_response_mad((struct ib_mad *) sent_hdr)) - continue; - - if (same_destination(&packet->mad.hdr, &sent_packet->mad.hdr)) - return 1; - } - - return 0; -} - static ssize_t ib_umad_write(struct file *filp, const char __user *buf, size_t count, loff_t *pos) { @@ -435,6 +379,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, struct ib_ah_attr ah_attr; struct ib_ah *ah; struct ib_rmpp_mad *rmpp_mad; + u8 method; __be64 *tid; int ret, data_len, hdr_len, copy_offset, rmpp_active; @@ -528,36 +473,28 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf, } /* - * Set the high-order part of the transaction ID to make MADs from - * different agents unique, and allow routing responses back to the - * original requestor. + * If userspace is generating a request that will generate a + * response, we need to make sure the high-order part of the + * transaction ID matches the agent being used to send the + * MAD. */ - if (!ib_response_mad(packet->msg->mad)) { + method = ((struct ib_mad_hdr *) packet->msg->mad)->method; + + if (!(method & IB_MGMT_METHOD_RESP) && + method != IB_MGMT_METHOD_TRAP_REPRESS && + method != IB_MGMT_METHOD_SEND) { tid = &((struct ib_mad_hdr *) packet->msg->mad)->tid; *tid = cpu_to_be64(((u64) agent->hi_tid) << 32 | (be64_to_cpup(tid) & 0xffffffff)); - rmpp_mad->mad_hdr.tid = *tid; - } - - spin_lock_irq(&file->send_lock); - ret = is_duplicate(file, packet); - if (!ret) - list_add_tail(&packet->list, &file->send_list); - spin_unlock_irq(&file->send_lock); - if (ret) { - ret = -EINVAL; - goto err_msg; } ret = ib_post_send_mad(packet->msg, NULL); if (ret) - goto err_send; + goto err_msg; up_read(&file->port->mutex); return count; -err_send: - dequeue_send(file, packet); err_msg: ib_free_send_mad(packet->msg); err_ah: @@ -720,9 +657,7 @@ static int ib_umad_open(struct inode *inode, struct file *filp) } spin_lock_init(&file->recv_lock); - spin_lock_init(&file->send_lock); INIT_LIST_HEAD(&file->recv_list); - INIT_LIST_HEAD(&file->send_list); init_waitqueue_head(&file->recv_wait); file->port = port; diff --git a/drivers/infiniband/core/uverbs.h b/drivers/infiniband/core/uverbs.h index 102a59c03..3372d67ff 100644 --- a/drivers/infiniband/core/uverbs.h +++ b/drivers/infiniband/core/uverbs.h @@ -42,7 +42,6 @@ #include #include #include -#include #include #include @@ -70,7 +69,6 @@ struct ib_uverbs_device { struct kref ref; - struct completion comp; int devnum; struct cdev *dev; struct class_device *class_dev; @@ -134,7 +132,7 @@ struct ib_ucq_object { u32 async_events_reported; }; -extern spinlock_t ib_uverbs_idr_lock; +extern struct mutex ib_uverbs_idr_mutex; extern struct idr ib_uverbs_pd_idr; extern struct idr ib_uverbs_mr_idr; extern struct idr ib_uverbs_mw_idr; @@ -143,8 +141,6 @@ extern struct idr ib_uverbs_cq_idr; extern struct idr ib_uverbs_qp_idr; extern struct idr ib_uverbs_srq_idr; -void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj); - struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file, int is_async, int *fd); void ib_uverbs_release_event_file(struct kref *ref); diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 30923eb68..9f69bd48e 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -42,13 +42,6 @@ #include "uverbs.h" -static struct lock_class_key pd_lock_key; -static struct lock_class_key mr_lock_key; -static struct lock_class_key cq_lock_key; -static struct lock_class_key qp_lock_key; -static struct lock_class_key ah_lock_key; -static struct lock_class_key srq_lock_key; - #define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \ do { \ (udata)->inbuf = (void __user *) (ibuf); \ @@ -57,197 +50,6 @@ static struct lock_class_key srq_lock_key; (udata)->outlen = (olen); \ } while (0) -/* - * The ib_uobject locking scheme is as follows: - * - * - ib_uverbs_idr_lock protects the uverbs idrs themselves, so it - * needs to be held during all idr operations. When an object is - * looked up, a reference must be taken on the object's kref before - * dropping this lock. - * - * - Each object also has an rwsem. This rwsem must be held for - * reading while an operation that uses the object is performed. - * For example, while registering an MR, the associated PD's - * uobject.mutex must be held for reading. The rwsem must be held - * for writing while initializing or destroying an object. - * - * - In addition, each object has a "live" flag. If this flag is not - * set, then lookups of the object will fail even if it is found in - * the idr. This handles a reader that blocks and does not acquire - * the rwsem until after the object is destroyed. The destroy - * operation will set the live flag to 0 and then drop the rwsem; - * this will allow the reader to acquire the rwsem, see that the - * live flag is 0, and then drop the rwsem and its reference to - * object. The underlying storage will not be freed until the last - * reference to the object is dropped. - */ - -static void init_uobj(struct ib_uobject *uobj, u64 user_handle, - struct ib_ucontext *context, struct lock_class_key *key) -{ - uobj->user_handle = user_handle; - uobj->context = context; - kref_init(&uobj->ref); - init_rwsem(&uobj->mutex); - lockdep_set_class(&uobj->mutex, key); - uobj->live = 0; -} - -static void release_uobj(struct kref *kref) -{ - kfree(container_of(kref, struct ib_uobject, ref)); -} - -static void put_uobj(struct ib_uobject *uobj) -{ - kref_put(&uobj->ref, release_uobj); -} - -static void put_uobj_read(struct ib_uobject *uobj) -{ - up_read(&uobj->mutex); - put_uobj(uobj); -} - -static void put_uobj_write(struct ib_uobject *uobj) -{ - up_write(&uobj->mutex); - put_uobj(uobj); -} - -static int idr_add_uobj(struct idr *idr, struct ib_uobject *uobj) -{ - int ret; - -retry: - if (!idr_pre_get(idr, GFP_KERNEL)) - return -ENOMEM; - - spin_lock(&ib_uverbs_idr_lock); - ret = idr_get_new(idr, uobj, &uobj->id); - spin_unlock(&ib_uverbs_idr_lock); - - if (ret == -EAGAIN) - goto retry; - - return ret; -} - -void idr_remove_uobj(struct idr *idr, struct ib_uobject *uobj) -{ - spin_lock(&ib_uverbs_idr_lock); - idr_remove(idr, uobj->id); - spin_unlock(&ib_uverbs_idr_lock); -} - -static struct ib_uobject *__idr_get_uobj(struct idr *idr, int id, - struct ib_ucontext *context) -{ - struct ib_uobject *uobj; - - spin_lock(&ib_uverbs_idr_lock); - uobj = idr_find(idr, id); - if (uobj) - kref_get(&uobj->ref); - spin_unlock(&ib_uverbs_idr_lock); - - return uobj; -} - -static struct ib_uobject *idr_read_uobj(struct idr *idr, int id, - struct ib_ucontext *context) -{ - struct ib_uobject *uobj; - - uobj = __idr_get_uobj(idr, id, context); - if (!uobj) - return NULL; - - down_read(&uobj->mutex); - if (!uobj->live) { - put_uobj_read(uobj); - return NULL; - } - - return uobj; -} - -static struct ib_uobject *idr_write_uobj(struct idr *idr, int id, - struct ib_ucontext *context) -{ - struct ib_uobject *uobj; - - uobj = __idr_get_uobj(idr, id, context); - if (!uobj) - return NULL; - - down_write(&uobj->mutex); - if (!uobj->live) { - put_uobj_write(uobj); - return NULL; - } - - return uobj; -} - -static void *idr_read_obj(struct idr *idr, int id, struct ib_ucontext *context) -{ - struct ib_uobject *uobj; - - uobj = idr_read_uobj(idr, id, context); - return uobj ? uobj->object : NULL; -} - -static struct ib_pd *idr_read_pd(int pd_handle, struct ib_ucontext *context) -{ - return idr_read_obj(&ib_uverbs_pd_idr, pd_handle, context); -} - -static void put_pd_read(struct ib_pd *pd) -{ - put_uobj_read(pd->uobject); -} - -static struct ib_cq *idr_read_cq(int cq_handle, struct ib_ucontext *context) -{ - return idr_read_obj(&ib_uverbs_cq_idr, cq_handle, context); -} - -static void put_cq_read(struct ib_cq *cq) -{ - put_uobj_read(cq->uobject); -} - -static struct ib_ah *idr_read_ah(int ah_handle, struct ib_ucontext *context) -{ - return idr_read_obj(&ib_uverbs_ah_idr, ah_handle, context); -} - -static void put_ah_read(struct ib_ah *ah) -{ - put_uobj_read(ah->uobject); -} - -static struct ib_qp *idr_read_qp(int qp_handle, struct ib_ucontext *context) -{ - return idr_read_obj(&ib_uverbs_qp_idr, qp_handle, context); -} - -static void put_qp_read(struct ib_qp *qp) -{ - put_uobj_read(qp->uobject); -} - -static struct ib_srq *idr_read_srq(int srq_handle, struct ib_ucontext *context) -{ - return idr_read_obj(&ib_uverbs_srq_idr, srq_handle, context); -} - -static void put_srq_read(struct ib_srq *srq) -{ - put_uobj_read(srq->uobject); -} - ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file, const char __user *buf, int in_len, int out_len) @@ -278,10 +80,8 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file, in_len - sizeof cmd, out_len - sizeof resp); ucontext = ibdev->alloc_ucontext(ibdev, &udata); - if (IS_ERR(ucontext)) { - ret = PTR_ERR(file->ucontext); - goto err; - } + if (IS_ERR(ucontext)) + return PTR_ERR(file->ucontext); ucontext->device = ibdev; INIT_LIST_HEAD(&ucontext->pd_list); @@ -478,8 +278,7 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, if (!uobj) return -ENOMEM; - init_uobj(uobj, 0, file->ucontext, &pd_lock_key); - down_write(&uobj->mutex); + uobj->context = file->ucontext; pd = file->device->ib_dev->alloc_pd(file->device->ib_dev, file->ucontext, &udata); @@ -492,10 +291,20 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, pd->uobject = uobj; atomic_set(&pd->usecnt, 0); - uobj->object = pd; - ret = idr_add_uobj(&ib_uverbs_pd_idr, uobj); + mutex_lock(&ib_uverbs_idr_mutex); + +retry: + if (!idr_pre_get(&ib_uverbs_pd_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_up; + } + + ret = idr_get_new(&ib_uverbs_pd_idr, pd, &uobj->id); + + if (ret == -EAGAIN) + goto retry; if (ret) - goto err_idr; + goto err_up; memset(&resp, 0, sizeof resp); resp.pd_handle = uobj->id; @@ -503,27 +312,26 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } mutex_lock(&file->mutex); list_add_tail(&uobj->list, &file->ucontext->pd_list); mutex_unlock(&file->mutex); - uobj->live = 1; - - up_write(&uobj->mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_pd_idr, uobj); - err_idr: + idr_remove(&ib_uverbs_pd_idr, uobj->id); + +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); ib_dealloc_pd(pd); err: - put_uobj_write(uobj); + kfree(uobj); return ret; } @@ -532,34 +340,37 @@ ssize_t ib_uverbs_dealloc_pd(struct ib_uverbs_file *file, int in_len, int out_len) { struct ib_uverbs_dealloc_pd cmd; + struct ib_pd *pd; struct ib_uobject *uobj; - int ret; + int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_write_uobj(&ib_uverbs_pd_idr, cmd.pd_handle, file->ucontext); - if (!uobj) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_dealloc_pd(uobj->object); - if (!ret) - uobj->live = 0; + pd = idr_find(&ib_uverbs_pd_idr, cmd.pd_handle); + if (!pd || pd->uobject->context != file->ucontext) + goto out; - put_uobj_write(uobj); + uobj = pd->uobject; + ret = ib_dealloc_pd(pd); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_pd_idr, uobj); + idr_remove(&ib_uverbs_pd_idr, cmd.pd_handle); mutex_lock(&file->mutex); list_del(&uobj->list); mutex_unlock(&file->mutex); - put_uobj(uobj); + kfree(uobj); - return in_len; +out: + mutex_unlock(&ib_uverbs_idr_mutex); + + return ret ? ret : in_len; } ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file, @@ -599,8 +410,7 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file, if (!obj) return -ENOMEM; - init_uobj(&obj->uobject, 0, file->ucontext, &mr_lock_key); - down_write(&obj->uobject.mutex); + obj->uobject.context = file->ucontext; /* * We ask for writable memory if any access flags other than @@ -617,14 +427,23 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file, obj->umem.virt_base = cmd.hca_va; - pd = idr_read_pd(cmd.pd_handle, file->ucontext); - if (!pd) - goto err_release; + mutex_lock(&ib_uverbs_idr_mutex); + + pd = idr_find(&ib_uverbs_pd_idr, cmd.pd_handle); + if (!pd || pd->uobject->context != file->ucontext) { + ret = -EINVAL; + goto err_up; + } + + if (!pd->device->reg_user_mr) { + ret = -ENOSYS; + goto err_up; + } mr = pd->device->reg_user_mr(pd, &obj->umem, cmd.access_flags, &udata); if (IS_ERR(mr)) { ret = PTR_ERR(mr); - goto err_put; + goto err_up; } mr->device = pd->device; @@ -633,48 +452,53 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file, atomic_inc(&pd->usecnt); atomic_set(&mr->usecnt, 0); - obj->uobject.object = mr; - ret = idr_add_uobj(&ib_uverbs_mr_idr, &obj->uobject); + memset(&resp, 0, sizeof resp); + resp.lkey = mr->lkey; + resp.rkey = mr->rkey; + +retry: + if (!idr_pre_get(&ib_uverbs_mr_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_unreg; + } + + ret = idr_get_new(&ib_uverbs_mr_idr, mr, &obj->uobject.id); + + if (ret == -EAGAIN) + goto retry; if (ret) goto err_unreg; - memset(&resp, 0, sizeof resp); - resp.lkey = mr->lkey; - resp.rkey = mr->rkey; resp.mr_handle = obj->uobject.id; if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } - put_pd_read(pd); - mutex_lock(&file->mutex); list_add_tail(&obj->uobject.list, &file->ucontext->mr_list); mutex_unlock(&file->mutex); - obj->uobject.live = 1; - - up_write(&obj->uobject.mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_mr_idr, &obj->uobject); +err_idr: + idr_remove(&ib_uverbs_mr_idr, obj->uobject.id); err_unreg: ib_dereg_mr(mr); + atomic_dec(&pd->usecnt); -err_put: - put_pd_read(pd); +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); -err_release: ib_umem_release(file->device->ib_dev, &obj->umem); err_free: - put_uobj_write(&obj->uobject); + kfree(obj); return ret; } @@ -684,40 +508,37 @@ ssize_t ib_uverbs_dereg_mr(struct ib_uverbs_file *file, { struct ib_uverbs_dereg_mr cmd; struct ib_mr *mr; - struct ib_uobject *uobj; struct ib_umem_object *memobj; int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_write_uobj(&ib_uverbs_mr_idr, cmd.mr_handle, file->ucontext); - if (!uobj) - return -EINVAL; - - memobj = container_of(uobj, struct ib_umem_object, uobject); - mr = uobj->object; + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_dereg_mr(mr); - if (!ret) - uobj->live = 0; + mr = idr_find(&ib_uverbs_mr_idr, cmd.mr_handle); + if (!mr || mr->uobject->context != file->ucontext) + goto out; - put_uobj_write(uobj); + memobj = container_of(mr->uobject, struct ib_umem_object, uobject); + ret = ib_dereg_mr(mr); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_mr_idr, uobj); + idr_remove(&ib_uverbs_mr_idr, cmd.mr_handle); mutex_lock(&file->mutex); - list_del(&uobj->list); + list_del(&memobj->uobject.list); mutex_unlock(&file->mutex); ib_umem_release(file->device->ib_dev, &memobj->umem); + kfree(memobj); - put_uobj(uobj); +out: + mutex_unlock(&ib_uverbs_idr_mutex); - return in_len; + return ret ? ret : in_len; } ssize_t ib_uverbs_create_comp_channel(struct ib_uverbs_file *file, @@ -756,7 +577,7 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, struct ib_uverbs_create_cq cmd; struct ib_uverbs_create_cq_resp resp; struct ib_udata udata; - struct ib_ucq_object *obj; + struct ib_ucq_object *uobj; struct ib_uverbs_event_file *ev_file = NULL; struct ib_cq *cq; int ret; @@ -774,13 +595,10 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, if (cmd.comp_vector >= file->device->num_comp_vectors) return -EINVAL; - obj = kmalloc(sizeof *obj, GFP_KERNEL); - if (!obj) + uobj = kmalloc(sizeof *uobj, GFP_KERNEL); + if (!uobj) return -ENOMEM; - init_uobj(&obj->uobject, cmd.user_handle, file->ucontext, &cq_lock_key); - down_write(&obj->uobject.mutex); - if (cmd.comp_channel >= 0) { ev_file = ib_uverbs_lookup_comp_file(cmd.comp_channel); if (!ev_file) { @@ -789,64 +607,72 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, } } - obj->uverbs_file = file; - obj->comp_events_reported = 0; - obj->async_events_reported = 0; - INIT_LIST_HEAD(&obj->comp_list); - INIT_LIST_HEAD(&obj->async_list); + uobj->uobject.user_handle = cmd.user_handle; + uobj->uobject.context = file->ucontext; + uobj->uverbs_file = file; + uobj->comp_events_reported = 0; + uobj->async_events_reported = 0; + INIT_LIST_HEAD(&uobj->comp_list); + INIT_LIST_HEAD(&uobj->async_list); cq = file->device->ib_dev->create_cq(file->device->ib_dev, cmd.cqe, file->ucontext, &udata); if (IS_ERR(cq)) { ret = PTR_ERR(cq); - goto err_file; + goto err; } cq->device = file->device->ib_dev; - cq->uobject = &obj->uobject; + cq->uobject = &uobj->uobject; cq->comp_handler = ib_uverbs_comp_handler; cq->event_handler = ib_uverbs_cq_event_handler; cq->cq_context = ev_file; atomic_set(&cq->usecnt, 0); - obj->uobject.object = cq; - ret = idr_add_uobj(&ib_uverbs_cq_idr, &obj->uobject); + mutex_lock(&ib_uverbs_idr_mutex); + +retry: + if (!idr_pre_get(&ib_uverbs_cq_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_up; + } + + ret = idr_get_new(&ib_uverbs_cq_idr, cq, &uobj->uobject.id); + + if (ret == -EAGAIN) + goto retry; if (ret) - goto err_free; + goto err_up; memset(&resp, 0, sizeof resp); - resp.cq_handle = obj->uobject.id; + resp.cq_handle = uobj->uobject.id; resp.cqe = cq->cqe; if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } mutex_lock(&file->mutex); - list_add_tail(&obj->uobject.list, &file->ucontext->cq_list); + list_add_tail(&uobj->uobject.list, &file->ucontext->cq_list); mutex_unlock(&file->mutex); - obj->uobject.live = 1; - - up_write(&obj->uobject.mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_cq_idr, &obj->uobject); - +err_idr: + idr_remove(&ib_uverbs_cq_idr, uobj->uobject.id); -err_free: +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); ib_destroy_cq(cq); -err_file: - if (ev_file) - ib_uverbs_release_ucq(file, ev_file, obj); - err: - put_uobj_write(&obj->uobject); + if (ev_file) + ib_uverbs_release_ucq(file, ev_file, uobj); + kfree(uobj); return ret; } @@ -867,9 +693,11 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, (unsigned long) cmd.response + sizeof resp, in_len - sizeof cmd, out_len - sizeof resp); - cq = idr_read_cq(cmd.cq_handle, file->ucontext); - if (!cq) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); + + cq = idr_find(&ib_uverbs_cq_idr, cmd.cq_handle); + if (!cq || cq->uobject->context != file->ucontext || !cq->device->resize_cq) + goto out; ret = cq->device->resize_cq(cq, cmd.cqe, &udata); if (ret) @@ -883,7 +711,7 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, ret = -EFAULT; out: - put_cq_read(cq); + mutex_unlock(&ib_uverbs_idr_mutex); return ret ? ret : in_len; } @@ -894,7 +722,6 @@ ssize_t ib_uverbs_poll_cq(struct ib_uverbs_file *file, { struct ib_uverbs_poll_cq cmd; struct ib_uverbs_poll_cq_resp *resp; - struct ib_uobject *uobj; struct ib_cq *cq; struct ib_wc *wc; int ret = 0; @@ -915,17 +742,15 @@ ssize_t ib_uverbs_poll_cq(struct ib_uverbs_file *file, goto out_wc; } - uobj = idr_read_uobj(&ib_uverbs_cq_idr, cmd.cq_handle, file->ucontext); - if (!uobj) { + mutex_lock(&ib_uverbs_idr_mutex); + cq = idr_find(&ib_uverbs_cq_idr, cmd.cq_handle); + if (!cq || cq->uobject->context != file->ucontext) { ret = -EINVAL; goto out; } - cq = uobj->object; resp->count = ib_poll_cq(cq, cmd.ne, wc); - put_uobj_read(uobj); - for (i = 0; i < resp->count; i++) { resp->wc[i].wr_id = wc[i].wr_id; resp->wc[i].status = wc[i].status; @@ -947,6 +772,7 @@ ssize_t ib_uverbs_poll_cq(struct ib_uverbs_file *file, ret = -EFAULT; out: + mutex_unlock(&ib_uverbs_idr_mutex); kfree(resp); out_wc: @@ -959,23 +785,22 @@ ssize_t ib_uverbs_req_notify_cq(struct ib_uverbs_file *file, int out_len) { struct ib_uverbs_req_notify_cq cmd; - struct ib_uobject *uobj; struct ib_cq *cq; + int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_read_uobj(&ib_uverbs_cq_idr, cmd.cq_handle, file->ucontext); - if (!uobj) - return -EINVAL; - cq = uobj->object; - - ib_req_notify_cq(cq, cmd.solicited_only ? - IB_CQ_SOLICITED : IB_CQ_NEXT_COMP); - - put_uobj_read(uobj); + mutex_lock(&ib_uverbs_idr_mutex); + cq = idr_find(&ib_uverbs_cq_idr, cmd.cq_handle); + if (cq && cq->uobject->context == file->ucontext) { + ib_req_notify_cq(cq, cmd.solicited_only ? + IB_CQ_SOLICITED : IB_CQ_NEXT_COMP); + ret = in_len; + } + mutex_unlock(&ib_uverbs_idr_mutex); - return in_len; + return ret; } ssize_t ib_uverbs_destroy_cq(struct ib_uverbs_file *file, @@ -984,50 +809,52 @@ ssize_t ib_uverbs_destroy_cq(struct ib_uverbs_file *file, { struct ib_uverbs_destroy_cq cmd; struct ib_uverbs_destroy_cq_resp resp; - struct ib_uobject *uobj; struct ib_cq *cq; - struct ib_ucq_object *obj; + struct ib_ucq_object *uobj; struct ib_uverbs_event_file *ev_file; + u64 user_handle; int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_write_uobj(&ib_uverbs_cq_idr, cmd.cq_handle, file->ucontext); - if (!uobj) - return -EINVAL; - cq = uobj->object; - ev_file = cq->cq_context; - obj = container_of(cq->uobject, struct ib_ucq_object, uobject); + memset(&resp, 0, sizeof resp); - ret = ib_destroy_cq(cq); - if (!ret) - uobj->live = 0; + mutex_lock(&ib_uverbs_idr_mutex); + + cq = idr_find(&ib_uverbs_cq_idr, cmd.cq_handle); + if (!cq || cq->uobject->context != file->ucontext) + goto out; - put_uobj_write(uobj); + user_handle = cq->uobject->user_handle; + uobj = container_of(cq->uobject, struct ib_ucq_object, uobject); + ev_file = cq->cq_context; + ret = ib_destroy_cq(cq); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_cq_idr, uobj); + idr_remove(&ib_uverbs_cq_idr, cmd.cq_handle); mutex_lock(&file->mutex); - list_del(&uobj->list); + list_del(&uobj->uobject.list); mutex_unlock(&file->mutex); - ib_uverbs_release_ucq(file, ev_file, obj); + ib_uverbs_release_ucq(file, ev_file, uobj); - memset(&resp, 0, sizeof resp); - resp.comp_events_reported = obj->comp_events_reported; - resp.async_events_reported = obj->async_events_reported; + resp.comp_events_reported = uobj->comp_events_reported; + resp.async_events_reported = uobj->async_events_reported; - put_uobj(uobj); + kfree(uobj); if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) - return -EFAULT; + ret = -EFAULT; - return in_len; +out: + mutex_unlock(&ib_uverbs_idr_mutex); + + return ret ? ret : in_len; } ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, @@ -1037,7 +864,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, struct ib_uverbs_create_qp cmd; struct ib_uverbs_create_qp_resp resp; struct ib_udata udata; - struct ib_uqp_object *obj; + struct ib_uqp_object *uobj; struct ib_pd *pd; struct ib_cq *scq, *rcq; struct ib_srq *srq; @@ -1055,22 +882,23 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, (unsigned long) cmd.response + sizeof resp, in_len - sizeof cmd, out_len - sizeof resp); - obj = kmalloc(sizeof *obj, GFP_KERNEL); - if (!obj) + uobj = kmalloc(sizeof *uobj, GFP_KERNEL); + if (!uobj) return -ENOMEM; - init_uobj(&obj->uevent.uobject, cmd.user_handle, file->ucontext, &qp_lock_key); - down_write(&obj->uevent.uobject.mutex); + mutex_lock(&ib_uverbs_idr_mutex); - srq = cmd.is_srq ? idr_read_srq(cmd.srq_handle, file->ucontext) : NULL; - pd = idr_read_pd(cmd.pd_handle, file->ucontext); - scq = idr_read_cq(cmd.send_cq_handle, file->ucontext); - rcq = cmd.recv_cq_handle == cmd.send_cq_handle ? - scq : idr_read_cq(cmd.recv_cq_handle, file->ucontext); + pd = idr_find(&ib_uverbs_pd_idr, cmd.pd_handle); + scq = idr_find(&ib_uverbs_cq_idr, cmd.send_cq_handle); + rcq = idr_find(&ib_uverbs_cq_idr, cmd.recv_cq_handle); + srq = cmd.is_srq ? idr_find(&ib_uverbs_srq_idr, cmd.srq_handle) : NULL; - if (!pd || !scq || !rcq || (cmd.is_srq && !srq)) { + if (!pd || pd->uobject->context != file->ucontext || + !scq || scq->uobject->context != file->ucontext || + !rcq || rcq->uobject->context != file->ucontext || + (cmd.is_srq && (!srq || srq->uobject->context != file->ucontext))) { ret = -EINVAL; - goto err_put; + goto err_up; } attr.event_handler = ib_uverbs_qp_event_handler; @@ -1087,14 +915,16 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, attr.cap.max_recv_sge = cmd.max_recv_sge; attr.cap.max_inline_data = cmd.max_inline_data; - obj->uevent.events_reported = 0; - INIT_LIST_HEAD(&obj->uevent.event_list); - INIT_LIST_HEAD(&obj->mcast_list); + uobj->uevent.uobject.user_handle = cmd.user_handle; + uobj->uevent.uobject.context = file->ucontext; + uobj->uevent.events_reported = 0; + INIT_LIST_HEAD(&uobj->uevent.event_list); + INIT_LIST_HEAD(&uobj->mcast_list); qp = pd->device->create_qp(pd, &attr, &udata); if (IS_ERR(qp)) { ret = PTR_ERR(qp); - goto err_put; + goto err_up; } qp->device = pd->device; @@ -1102,7 +932,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, qp->send_cq = attr.send_cq; qp->recv_cq = attr.recv_cq; qp->srq = attr.srq; - qp->uobject = &obj->uevent.uobject; + qp->uobject = &uobj->uevent.uobject; qp->event_handler = attr.event_handler; qp->qp_context = attr.qp_context; qp->qp_type = attr.qp_type; @@ -1112,14 +942,23 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, if (attr.srq) atomic_inc(&attr.srq->usecnt); - obj->uevent.uobject.object = qp; - ret = idr_add_uobj(&ib_uverbs_qp_idr, &obj->uevent.uobject); + memset(&resp, 0, sizeof resp); + resp.qpn = qp->qp_num; + +retry: + if (!idr_pre_get(&ib_uverbs_qp_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_destroy; + } + + ret = idr_get_new(&ib_uverbs_qp_idr, qp, &uobj->uevent.uobject.id); + + if (ret == -EAGAIN) + goto retry; if (ret) goto err_destroy; - memset(&resp, 0, sizeof resp); - resp.qpn = qp->qp_num; - resp.qp_handle = obj->uevent.uobject.id; + resp.qp_handle = uobj->uevent.uobject.id; resp.max_recv_sge = attr.cap.max_recv_sge; resp.max_send_sge = attr.cap.max_send_sge; resp.max_recv_wr = attr.cap.max_recv_wr; @@ -1129,43 +968,32 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file, if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } - put_pd_read(pd); - put_cq_read(scq); - if (rcq != scq) - put_cq_read(rcq); - if (srq) - put_srq_read(srq); - mutex_lock(&file->mutex); - list_add_tail(&obj->uevent.uobject.list, &file->ucontext->qp_list); + list_add_tail(&uobj->uevent.uobject.list, &file->ucontext->qp_list); mutex_unlock(&file->mutex); - obj->uevent.uobject.live = 1; - - up_write(&obj->uevent.uobject.mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_qp_idr, &obj->uevent.uobject); +err_idr: + idr_remove(&ib_uverbs_qp_idr, uobj->uevent.uobject.id); err_destroy: ib_destroy_qp(qp); + atomic_dec(&pd->usecnt); + atomic_dec(&attr.send_cq->usecnt); + atomic_dec(&attr.recv_cq->usecnt); + if (attr.srq) + atomic_dec(&attr.srq->usecnt); + +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); -err_put: - if (pd) - put_pd_read(pd); - if (scq) - put_cq_read(scq); - if (rcq && rcq != scq) - put_cq_read(rcq); - if (srq) - put_srq_read(srq); - - put_uobj_write(&obj->uevent.uobject); + kfree(uobj); return ret; } @@ -1190,15 +1018,15 @@ ssize_t ib_uverbs_query_qp(struct ib_uverbs_file *file, goto out; } - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) { - ret = -EINVAL; - goto out; - } + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_query_qp(qp, attr, cmd.attr_mask, init_attr); + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (qp && qp->uobject->context == file->ucontext) + ret = ib_query_qp(qp, attr, cmd.attr_mask, init_attr); + else + ret = -EINVAL; - put_qp_read(qp); + mutex_unlock(&ib_uverbs_idr_mutex); if (ret) goto out; @@ -1285,8 +1113,10 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file, if (!attr) return -ENOMEM; - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) { + mutex_lock(&ib_uverbs_idr_mutex); + + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) { ret = -EINVAL; goto out; } @@ -1338,15 +1168,13 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file, attr->alt_ah_attr.port_num = cmd.alt_dest.port_num; ret = ib_modify_qp(qp, attr, cmd.attr_mask); - - put_qp_read(qp); - if (ret) goto out; ret = in_len; out: + mutex_unlock(&ib_uverbs_idr_mutex); kfree(attr); return ret; @@ -1358,9 +1186,8 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file, { struct ib_uverbs_destroy_qp cmd; struct ib_uverbs_destroy_qp_resp resp; - struct ib_uobject *uobj; struct ib_qp *qp; - struct ib_uqp_object *obj; + struct ib_uqp_object *uobj; int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) @@ -1368,43 +1195,43 @@ ssize_t ib_uverbs_destroy_qp(struct ib_uverbs_file *file, memset(&resp, 0, sizeof resp); - uobj = idr_write_uobj(&ib_uverbs_qp_idr, cmd.qp_handle, file->ucontext); - if (!uobj) - return -EINVAL; - qp = uobj->object; - obj = container_of(uobj, struct ib_uqp_object, uevent.uobject); + mutex_lock(&ib_uverbs_idr_mutex); - if (!list_empty(&obj->mcast_list)) { - put_uobj_write(uobj); - return -EBUSY; - } + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) + goto out; - ret = ib_destroy_qp(qp); - if (!ret) - uobj->live = 0; + uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); - put_uobj_write(uobj); + if (!list_empty(&uobj->mcast_list)) { + ret = -EBUSY; + goto out; + } + ret = ib_destroy_qp(qp); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_qp_idr, uobj); + idr_remove(&ib_uverbs_qp_idr, cmd.qp_handle); mutex_lock(&file->mutex); - list_del(&uobj->list); + list_del(&uobj->uevent.uobject.list); mutex_unlock(&file->mutex); - ib_uverbs_release_uevent(file, &obj->uevent); + ib_uverbs_release_uevent(file, &uobj->uevent); - resp.events_reported = obj->uevent.events_reported; + resp.events_reported = uobj->uevent.events_reported; - put_uobj(uobj); + kfree(uobj); if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) - return -EFAULT; + ret = -EFAULT; - return in_len; +out: + mutex_unlock(&ib_uverbs_idr_mutex); + + return ret ? ret : in_len; } ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, @@ -1417,7 +1244,6 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, struct ib_send_wr *wr = NULL, *last, *next, *bad_wr; struct ib_qp *qp; int i, sg_ind; - int is_ud; ssize_t ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) @@ -1434,11 +1260,12 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, if (!user_wr) return -ENOMEM; - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) + mutex_lock(&ib_uverbs_idr_mutex); + + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) goto out; - is_ud = qp->qp_type == IB_QPT_UD; sg_ind = 0; last = NULL; for (i = 0; i < cmd.wr_count; ++i) { @@ -1446,12 +1273,12 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, buf + sizeof cmd + i * cmd.wqe_size, cmd.wqe_size)) { ret = -EFAULT; - goto out_put; + goto out; } if (user_wr->num_sge + sg_ind > cmd.sge_count) { ret = -EINVAL; - goto out_put; + goto out; } next = kmalloc(ALIGN(sizeof *next, sizeof (struct ib_sge)) + @@ -1459,7 +1286,7 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, GFP_KERNEL); if (!next) { ret = -ENOMEM; - goto out_put; + goto out; } if (!last) @@ -1475,12 +1302,12 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, next->send_flags = user_wr->send_flags; next->imm_data = (__be32 __force) user_wr->imm_data; - if (is_ud) { - next->wr.ud.ah = idr_read_ah(user_wr->wr.ud.ah, - file->ucontext); + if (qp->qp_type == IB_QPT_UD) { + next->wr.ud.ah = idr_find(&ib_uverbs_ah_idr, + user_wr->wr.ud.ah); if (!next->wr.ud.ah) { ret = -EINVAL; - goto out_put; + goto out; } next->wr.ud.remote_qpn = user_wr->wr.ud.remote_qpn; next->wr.ud.remote_qkey = user_wr->wr.ud.remote_qkey; @@ -1517,7 +1344,7 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, sg_ind * sizeof (struct ib_sge), next->num_sge * sizeof (struct ib_sge))) { ret = -EFAULT; - goto out_put; + goto out; } sg_ind += next->num_sge; } else @@ -1537,18 +1364,15 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, &resp, sizeof resp)) ret = -EFAULT; -out_put: - put_qp_read(qp); +out: + mutex_unlock(&ib_uverbs_idr_mutex); while (wr) { - if (is_ud && wr->wr.ud.ah) - put_ah_read(wr->wr.ud.ah); next = wr->next; kfree(wr); wr = next; } -out: kfree(user_wr); return ret ? ret : in_len; @@ -1658,15 +1482,14 @@ ssize_t ib_uverbs_post_recv(struct ib_uverbs_file *file, if (IS_ERR(wr)) return PTR_ERR(wr); - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) + mutex_lock(&ib_uverbs_idr_mutex); + + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) goto out; resp.bad_wr = 0; ret = qp->device->post_recv(qp, wr, &bad_wr); - - put_qp_read(qp); - if (ret) for (next = wr; next; next = next->next) { ++resp.bad_wr; @@ -1680,6 +1503,8 @@ ssize_t ib_uverbs_post_recv(struct ib_uverbs_file *file, ret = -EFAULT; out: + mutex_unlock(&ib_uverbs_idr_mutex); + while (wr) { next = wr->next; kfree(wr); @@ -1708,15 +1533,14 @@ ssize_t ib_uverbs_post_srq_recv(struct ib_uverbs_file *file, if (IS_ERR(wr)) return PTR_ERR(wr); - srq = idr_read_srq(cmd.srq_handle, file->ucontext); - if (!srq) + mutex_lock(&ib_uverbs_idr_mutex); + + srq = idr_find(&ib_uverbs_srq_idr, cmd.srq_handle); + if (!srq || srq->uobject->context != file->ucontext) goto out; resp.bad_wr = 0; ret = srq->device->post_srq_recv(srq, wr, &bad_wr); - - put_srq_read(srq); - if (ret) for (next = wr; next; next = next->next) { ++resp.bad_wr; @@ -1730,6 +1554,8 @@ ssize_t ib_uverbs_post_srq_recv(struct ib_uverbs_file *file, ret = -EFAULT; out: + mutex_unlock(&ib_uverbs_idr_mutex); + while (wr) { next = wr->next; kfree(wr); @@ -1761,15 +1587,17 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, if (!uobj) return -ENOMEM; - init_uobj(uobj, cmd.user_handle, file->ucontext, &ah_lock_key); - down_write(&uobj->mutex); + mutex_lock(&ib_uverbs_idr_mutex); - pd = idr_read_pd(cmd.pd_handle, file->ucontext); - if (!pd) { + pd = idr_find(&ib_uverbs_pd_idr, cmd.pd_handle); + if (!pd || pd->uobject->context != file->ucontext) { ret = -EINVAL; - goto err; + goto err_up; } + uobj->user_handle = cmd.user_handle; + uobj->context = file->ucontext; + attr.dlid = cmd.attr.dlid; attr.sl = cmd.attr.sl; attr.src_path_bits = cmd.attr.src_path_bits; @@ -1785,13 +1613,21 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, ah = ib_create_ah(pd, &attr); if (IS_ERR(ah)) { ret = PTR_ERR(ah); - goto err_put; + goto err_up; } - ah->uobject = uobj; - uobj->object = ah; + ah->uobject = uobj; - ret = idr_add_uobj(&ib_uverbs_ah_idr, uobj); +retry: + if (!idr_pre_get(&ib_uverbs_ah_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_destroy; + } + + ret = idr_get_new(&ib_uverbs_ah_idr, ah, &uobj->id); + + if (ret == -EAGAIN) + goto retry; if (ret) goto err_destroy; @@ -1800,32 +1636,27 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } - put_pd_read(pd); - mutex_lock(&file->mutex); list_add_tail(&uobj->list, &file->ucontext->ah_list); mutex_unlock(&file->mutex); - uobj->live = 1; - - up_write(&uobj->mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_ah_idr, uobj); +err_idr: + idr_remove(&ib_uverbs_ah_idr, uobj->id); err_destroy: ib_destroy_ah(ah); -err_put: - put_pd_read(pd); +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); -err: - put_uobj_write(uobj); + kfree(uobj); return ret; } @@ -1835,34 +1666,35 @@ ssize_t ib_uverbs_destroy_ah(struct ib_uverbs_file *file, struct ib_uverbs_destroy_ah cmd; struct ib_ah *ah; struct ib_uobject *uobj; - int ret; + int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_write_uobj(&ib_uverbs_ah_idr, cmd.ah_handle, file->ucontext); - if (!uobj) - return -EINVAL; - ah = uobj->object; + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_destroy_ah(ah); - if (!ret) - uobj->live = 0; + ah = idr_find(&ib_uverbs_ah_idr, cmd.ah_handle); + if (!ah || ah->uobject->context != file->ucontext) + goto out; - put_uobj_write(uobj); + uobj = ah->uobject; + ret = ib_destroy_ah(ah); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_ah_idr, uobj); + idr_remove(&ib_uverbs_ah_idr, cmd.ah_handle); mutex_lock(&file->mutex); list_del(&uobj->list); mutex_unlock(&file->mutex); - put_uobj(uobj); + kfree(uobj); - return in_len; +out: + mutex_unlock(&ib_uverbs_idr_mutex); + + return ret ? ret : in_len; } ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file, @@ -1871,43 +1703,47 @@ ssize_t ib_uverbs_attach_mcast(struct ib_uverbs_file *file, { struct ib_uverbs_attach_mcast cmd; struct ib_qp *qp; - struct ib_uqp_object *obj; + struct ib_uqp_object *uobj; struct ib_uverbs_mcast_entry *mcast; - int ret; + int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); + + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) + goto out; - obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); + uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); - list_for_each_entry(mcast, &obj->mcast_list, list) + list_for_each_entry(mcast, &uobj->mcast_list, list) if (cmd.mlid == mcast->lid && !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { ret = 0; - goto out_put; + goto out; } mcast = kmalloc(sizeof *mcast, GFP_KERNEL); if (!mcast) { ret = -ENOMEM; - goto out_put; + goto out; } mcast->lid = cmd.mlid; memcpy(mcast->gid.raw, cmd.gid, sizeof mcast->gid.raw); ret = ib_attach_mcast(qp, &mcast->gid, cmd.mlid); - if (!ret) - list_add_tail(&mcast->list, &obj->mcast_list); - else + if (!ret) { + uobj = container_of(qp->uobject, struct ib_uqp_object, + uevent.uobject); + list_add_tail(&mcast->list, &uobj->mcast_list); + } else kfree(mcast); -out_put: - put_qp_read(qp); +out: + mutex_unlock(&ib_uverbs_idr_mutex); return ret ? ret : in_len; } @@ -1917,7 +1753,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, int out_len) { struct ib_uverbs_detach_mcast cmd; - struct ib_uqp_object *obj; + struct ib_uqp_object *uobj; struct ib_qp *qp; struct ib_uverbs_mcast_entry *mcast; int ret = -EINVAL; @@ -1925,17 +1761,19 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - qp = idr_read_qp(cmd.qp_handle, file->ucontext); - if (!qp) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); + + qp = idr_find(&ib_uverbs_qp_idr, cmd.qp_handle); + if (!qp || qp->uobject->context != file->ucontext) + goto out; ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); if (ret) - goto out_put; + goto out; - obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); + uobj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); - list_for_each_entry(mcast, &obj->mcast_list, list) + list_for_each_entry(mcast, &uobj->mcast_list, list) if (cmd.mlid == mcast->lid && !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) { list_del(&mcast->list); @@ -1943,8 +1781,8 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, break; } -out_put: - put_qp_read(qp); +out: + mutex_unlock(&ib_uverbs_idr_mutex); return ret ? ret : in_len; } @@ -1956,7 +1794,7 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file, struct ib_uverbs_create_srq cmd; struct ib_uverbs_create_srq_resp resp; struct ib_udata udata; - struct ib_uevent_object *obj; + struct ib_uevent_object *uobj; struct ib_pd *pd; struct ib_srq *srq; struct ib_srq_init_attr attr; @@ -1972,17 +1810,17 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file, (unsigned long) cmd.response + sizeof resp, in_len - sizeof cmd, out_len - sizeof resp); - obj = kmalloc(sizeof *obj, GFP_KERNEL); - if (!obj) + uobj = kmalloc(sizeof *uobj, GFP_KERNEL); + if (!uobj) return -ENOMEM; - init_uobj(&obj->uobject, cmd.user_handle, file->ucontext, &srq_lock_key); - down_write(&obj->uobject.mutex); + mutex_lock(&ib_uverbs_idr_mutex); + + pd = idr_find(&ib_uverbs_pd_idr, cmd.pd_handle); - pd = idr_read_pd(cmd.pd_handle, file->ucontext); - if (!pd) { + if (!pd || pd->uobject->context != file->ucontext) { ret = -EINVAL; - goto err; + goto err_up; } attr.event_handler = ib_uverbs_srq_event_handler; @@ -1991,62 +1829,69 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file, attr.attr.max_sge = cmd.max_sge; attr.attr.srq_limit = cmd.srq_limit; - obj->events_reported = 0; - INIT_LIST_HEAD(&obj->event_list); + uobj->uobject.user_handle = cmd.user_handle; + uobj->uobject.context = file->ucontext; + uobj->events_reported = 0; + INIT_LIST_HEAD(&uobj->event_list); srq = pd->device->create_srq(pd, &attr, &udata); if (IS_ERR(srq)) { ret = PTR_ERR(srq); - goto err_put; + goto err_up; } srq->device = pd->device; srq->pd = pd; - srq->uobject = &obj->uobject; + srq->uobject = &uobj->uobject; srq->event_handler = attr.event_handler; srq->srq_context = attr.srq_context; atomic_inc(&pd->usecnt); atomic_set(&srq->usecnt, 0); - obj->uobject.object = srq; - ret = idr_add_uobj(&ib_uverbs_srq_idr, &obj->uobject); + memset(&resp, 0, sizeof resp); + +retry: + if (!idr_pre_get(&ib_uverbs_srq_idr, GFP_KERNEL)) { + ret = -ENOMEM; + goto err_destroy; + } + + ret = idr_get_new(&ib_uverbs_srq_idr, srq, &uobj->uobject.id); + + if (ret == -EAGAIN) + goto retry; if (ret) goto err_destroy; - memset(&resp, 0, sizeof resp); - resp.srq_handle = obj->uobject.id; + resp.srq_handle = uobj->uobject.id; resp.max_wr = attr.attr.max_wr; resp.max_sge = attr.attr.max_sge; if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) { ret = -EFAULT; - goto err_copy; + goto err_idr; } - put_pd_read(pd); - mutex_lock(&file->mutex); - list_add_tail(&obj->uobject.list, &file->ucontext->srq_list); + list_add_tail(&uobj->uobject.list, &file->ucontext->srq_list); mutex_unlock(&file->mutex); - obj->uobject.live = 1; - - up_write(&obj->uobject.mutex); + mutex_unlock(&ib_uverbs_idr_mutex); return in_len; -err_copy: - idr_remove_uobj(&ib_uverbs_srq_idr, &obj->uobject); +err_idr: + idr_remove(&ib_uverbs_srq_idr, uobj->uobject.id); err_destroy: ib_destroy_srq(srq); + atomic_dec(&pd->usecnt); -err_put: - put_pd_read(pd); +err_up: + mutex_unlock(&ib_uverbs_idr_mutex); -err: - put_uobj_write(&obj->uobject); + kfree(uobj); return ret; } @@ -2062,16 +1907,21 @@ ssize_t ib_uverbs_modify_srq(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - srq = idr_read_srq(cmd.srq_handle, file->ucontext); - if (!srq) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); + + srq = idr_find(&ib_uverbs_srq_idr, cmd.srq_handle); + if (!srq || srq->uobject->context != file->ucontext) { + ret = -EINVAL; + goto out; + } attr.max_wr = cmd.max_wr; attr.srq_limit = cmd.srq_limit; ret = ib_modify_srq(srq, &attr, cmd.attr_mask); - put_srq_read(srq); +out: + mutex_unlock(&ib_uverbs_idr_mutex); return ret ? ret : in_len; } @@ -2092,16 +1942,18 @@ ssize_t ib_uverbs_query_srq(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - srq = idr_read_srq(cmd.srq_handle, file->ucontext); - if (!srq) - return -EINVAL; + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_query_srq(srq, &attr); + srq = idr_find(&ib_uverbs_srq_idr, cmd.srq_handle); + if (srq && srq->uobject->context == file->ucontext) + ret = ib_query_srq(srq, &attr); + else + ret = -EINVAL; - put_srq_read(srq); + mutex_unlock(&ib_uverbs_idr_mutex); if (ret) - return ret; + goto out; memset(&resp, 0, sizeof resp); @@ -2111,9 +1963,10 @@ ssize_t ib_uverbs_query_srq(struct ib_uverbs_file *file, if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) - return -EFAULT; + ret = -EFAULT; - return in_len; +out: + return ret ? ret : in_len; } ssize_t ib_uverbs_destroy_srq(struct ib_uverbs_file *file, @@ -2122,45 +1975,45 @@ ssize_t ib_uverbs_destroy_srq(struct ib_uverbs_file *file, { struct ib_uverbs_destroy_srq cmd; struct ib_uverbs_destroy_srq_resp resp; - struct ib_uobject *uobj; struct ib_srq *srq; - struct ib_uevent_object *obj; + struct ib_uevent_object *uobj; int ret = -EINVAL; if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - uobj = idr_write_uobj(&ib_uverbs_srq_idr, cmd.srq_handle, file->ucontext); - if (!uobj) - return -EINVAL; - srq = uobj->object; - obj = container_of(uobj, struct ib_uevent_object, uobject); + mutex_lock(&ib_uverbs_idr_mutex); - ret = ib_destroy_srq(srq); - if (!ret) - uobj->live = 0; + memset(&resp, 0, sizeof resp); + + srq = idr_find(&ib_uverbs_srq_idr, cmd.srq_handle); + if (!srq || srq->uobject->context != file->ucontext) + goto out; - put_uobj_write(uobj); + uobj = container_of(srq->uobject, struct ib_uevent_object, uobject); + ret = ib_destroy_srq(srq); if (ret) - return ret; + goto out; - idr_remove_uobj(&ib_uverbs_srq_idr, uobj); + idr_remove(&ib_uverbs_srq_idr, cmd.srq_handle); mutex_lock(&file->mutex); - list_del(&uobj->list); + list_del(&uobj->uobject.list); mutex_unlock(&file->mutex); - ib_uverbs_release_uevent(file, obj); + ib_uverbs_release_uevent(file, uobj); - memset(&resp, 0, sizeof resp); - resp.events_reported = obj->events_reported; + resp.events_reported = uobj->events_reported; - put_uobj(uobj); + kfree(uobj); if (copy_to_user((void __user *) (unsigned long) cmd.response, &resp, sizeof resp)) ret = -EFAULT; +out: + mutex_unlock(&ib_uverbs_idr_mutex); + return ret ? ret : in_len; } diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 4e16314e8..ff092a0a9 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -66,7 +66,7 @@ enum { static struct class *uverbs_class; -DEFINE_SPINLOCK(ib_uverbs_idr_lock); +DEFINE_MUTEX(ib_uverbs_idr_mutex); DEFINE_IDR(ib_uverbs_pd_idr); DEFINE_IDR(ib_uverbs_mr_idr); DEFINE_IDR(ib_uverbs_mw_idr); @@ -122,7 +122,7 @@ static void ib_uverbs_release_dev(struct kref *ref) struct ib_uverbs_device *dev = container_of(ref, struct ib_uverbs_device, ref); - complete(&dev->comp); + kfree(dev); } void ib_uverbs_release_ucq(struct ib_uverbs_file *file, @@ -183,45 +183,47 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, if (!context) return 0; - list_for_each_entry_safe(uobj, tmp, &context->ah_list, list) { - struct ib_ah *ah = uobj->object; + mutex_lock(&ib_uverbs_idr_mutex); - idr_remove_uobj(&ib_uverbs_ah_idr, uobj); + list_for_each_entry_safe(uobj, tmp, &context->ah_list, list) { + struct ib_ah *ah = idr_find(&ib_uverbs_ah_idr, uobj->id); + idr_remove(&ib_uverbs_ah_idr, uobj->id); ib_destroy_ah(ah); + list_del(&uobj->list); kfree(uobj); } list_for_each_entry_safe(uobj, tmp, &context->qp_list, list) { - struct ib_qp *qp = uobj->object; + struct ib_qp *qp = idr_find(&ib_uverbs_qp_idr, uobj->id); struct ib_uqp_object *uqp = container_of(uobj, struct ib_uqp_object, uevent.uobject); - - idr_remove_uobj(&ib_uverbs_qp_idr, uobj); + idr_remove(&ib_uverbs_qp_idr, uobj->id); ib_uverbs_detach_umcast(qp, uqp); ib_destroy_qp(qp); + list_del(&uobj->list); ib_uverbs_release_uevent(file, &uqp->uevent); kfree(uqp); } list_for_each_entry_safe(uobj, tmp, &context->cq_list, list) { - struct ib_cq *cq = uobj->object; + struct ib_cq *cq = idr_find(&ib_uverbs_cq_idr, uobj->id); struct ib_uverbs_event_file *ev_file = cq->cq_context; struct ib_ucq_object *ucq = container_of(uobj, struct ib_ucq_object, uobject); - - idr_remove_uobj(&ib_uverbs_cq_idr, uobj); + idr_remove(&ib_uverbs_cq_idr, uobj->id); ib_destroy_cq(cq); + list_del(&uobj->list); ib_uverbs_release_ucq(file, ev_file, ucq); kfree(ucq); } list_for_each_entry_safe(uobj, tmp, &context->srq_list, list) { - struct ib_srq *srq = uobj->object; + struct ib_srq *srq = idr_find(&ib_uverbs_srq_idr, uobj->id); struct ib_uevent_object *uevent = container_of(uobj, struct ib_uevent_object, uobject); - - idr_remove_uobj(&ib_uverbs_srq_idr, uobj); + idr_remove(&ib_uverbs_srq_idr, uobj->id); ib_destroy_srq(srq); + list_del(&uobj->list); ib_uverbs_release_uevent(file, uevent); kfree(uevent); } @@ -229,27 +231,30 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, /* XXX Free MWs */ list_for_each_entry_safe(uobj, tmp, &context->mr_list, list) { - struct ib_mr *mr = uobj->object; + struct ib_mr *mr = idr_find(&ib_uverbs_mr_idr, uobj->id); struct ib_device *mrdev = mr->device; struct ib_umem_object *memobj; - idr_remove_uobj(&ib_uverbs_mr_idr, uobj); + idr_remove(&ib_uverbs_mr_idr, uobj->id); ib_dereg_mr(mr); memobj = container_of(uobj, struct ib_umem_object, uobject); ib_umem_release_on_close(mrdev, &memobj->umem); + list_del(&uobj->list); kfree(memobj); } list_for_each_entry_safe(uobj, tmp, &context->pd_list, list) { - struct ib_pd *pd = uobj->object; - - idr_remove_uobj(&ib_uverbs_pd_idr, uobj); + struct ib_pd *pd = idr_find(&ib_uverbs_pd_idr, uobj->id); + idr_remove(&ib_uverbs_pd_idr, uobj->id); ib_dealloc_pd(pd); + list_del(&uobj->list); kfree(uobj); } + mutex_unlock(&ib_uverbs_idr_mutex); + return context->device->dealloc_ucontext(context); } @@ -740,7 +745,6 @@ static void ib_uverbs_add_one(struct ib_device *device) return; kref_init(&uverbs_dev->ref); - init_completion(&uverbs_dev->comp); spin_lock(&map_lock); uverbs_dev->devnum = find_first_zero_bit(dev_map, IB_UVERBS_MAX_DEVICES); @@ -794,8 +798,6 @@ err_cdev: err: kref_put(&uverbs_dev->ref, ib_uverbs_release_dev); - wait_for_completion(&uverbs_dev->comp); - kfree(uverbs_dev); return; } @@ -815,18 +817,14 @@ static void ib_uverbs_remove_one(struct ib_device *device) spin_unlock(&map_lock); clear_bit(uverbs_dev->devnum, dev_map); - kref_put(&uverbs_dev->ref, ib_uverbs_release_dev); - wait_for_completion(&uverbs_dev->comp); - kfree(uverbs_dev); } -static int uverbs_event_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block *uverbs_event_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data) { return get_sb_pseudo(fs_type, "infinibandevent:", NULL, - INFINIBANDEVENTFS_MAGIC, mnt); + INFINIBANDEVENTFS_MAGIC); } static struct file_system_type uverbs_event_fs = { diff --git a/drivers/infiniband/core/uverbs_marshall.c b/drivers/infiniband/core/uverbs_marshall.c deleted file mode 100644 index ce46b13ae..000000000 --- a/drivers/infiniband/core/uverbs_marshall.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -static void ib_copy_ah_attr_to_user(struct ib_uverbs_ah_attr *dst, - struct ib_ah_attr *src) -{ - memcpy(dst->grh.dgid, src->grh.dgid.raw, sizeof src->grh.dgid); - dst->grh.flow_label = src->grh.flow_label; - dst->grh.sgid_index = src->grh.sgid_index; - dst->grh.hop_limit = src->grh.hop_limit; - dst->grh.traffic_class = src->grh.traffic_class; - dst->dlid = src->dlid; - dst->sl = src->sl; - dst->src_path_bits = src->src_path_bits; - dst->static_rate = src->static_rate; - dst->is_global = src->ah_flags & IB_AH_GRH ? 1 : 0; - dst->port_num = src->port_num; -} - -void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst, - struct ib_qp_attr *src) -{ - dst->cur_qp_state = src->cur_qp_state; - dst->path_mtu = src->path_mtu; - dst->path_mig_state = src->path_mig_state; - dst->qkey = src->qkey; - dst->rq_psn = src->rq_psn; - dst->sq_psn = src->sq_psn; - dst->dest_qp_num = src->dest_qp_num; - dst->qp_access_flags = src->qp_access_flags; - - dst->max_send_wr = src->cap.max_send_wr; - dst->max_recv_wr = src->cap.max_recv_wr; - dst->max_send_sge = src->cap.max_send_sge; - dst->max_recv_sge = src->cap.max_recv_sge; - dst->max_inline_data = src->cap.max_inline_data; - - ib_copy_ah_attr_to_user(&dst->ah_attr, &src->ah_attr); - ib_copy_ah_attr_to_user(&dst->alt_ah_attr, &src->alt_ah_attr); - - dst->pkey_index = src->pkey_index; - dst->alt_pkey_index = src->alt_pkey_index; - dst->en_sqd_async_notify = src->en_sqd_async_notify; - dst->sq_draining = src->sq_draining; - dst->max_rd_atomic = src->max_rd_atomic; - dst->max_dest_rd_atomic = src->max_dest_rd_atomic; - dst->min_rnr_timer = src->min_rnr_timer; - dst->port_num = src->port_num; - dst->timeout = src->timeout; - dst->retry_cnt = src->retry_cnt; - dst->rnr_retry = src->rnr_retry; - dst->alt_port_num = src->alt_port_num; - dst->alt_timeout = src->alt_timeout; -} -EXPORT_SYMBOL(ib_copy_qp_attr_to_user); - -void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst, - struct ib_sa_path_rec *src) -{ - memcpy(dst->dgid, src->dgid.raw, sizeof src->dgid); - memcpy(dst->sgid, src->sgid.raw, sizeof src->sgid); - - dst->dlid = src->dlid; - dst->slid = src->slid; - dst->raw_traffic = src->raw_traffic; - dst->flow_label = src->flow_label; - dst->hop_limit = src->hop_limit; - dst->traffic_class = src->traffic_class; - dst->reversible = src->reversible; - dst->numb_path = src->numb_path; - dst->pkey = src->pkey; - dst->sl = src->sl; - dst->mtu_selector = src->mtu_selector; - dst->mtu = src->mtu; - dst->rate_selector = src->rate_selector; - dst->rate = src->rate; - dst->packet_life_time = src->packet_life_time; - dst->preference = src->preference; - dst->packet_life_time_selector = src->packet_life_time_selector; -} -EXPORT_SYMBOL(ib_copy_path_rec_to_user); - -void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst, - struct ib_user_path_rec *src) -{ - memcpy(dst->dgid.raw, src->dgid, sizeof dst->dgid); - memcpy(dst->sgid.raw, src->sgid, sizeof dst->sgid); - - dst->dlid = src->dlid; - dst->slid = src->slid; - dst->raw_traffic = src->raw_traffic; - dst->flow_label = src->flow_label; - dst->hop_limit = src->hop_limit; - dst->traffic_class = src->traffic_class; - dst->reversible = src->reversible; - dst->numb_path = src->numb_path; - dst->pkey = src->pkey; - dst->sl = src->sl; - dst->mtu_selector = src->mtu_selector; - dst->mtu = src->mtu; - dst->rate_selector = src->rate_selector; - dst->rate = src->rate; - dst->packet_life_time = src->packet_life_time; - dst->preference = src->preference; - dst->packet_life_time_selector = src->packet_life_time_selector; -} -EXPORT_SYMBOL(ib_copy_path_rec_from_user); diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index 468999c38..b78e7dc69 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -125,47 +125,35 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) } EXPORT_SYMBOL(ib_create_ah); -int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc, - struct ib_grh *grh, struct ib_ah_attr *ah_attr) +struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc, + struct ib_grh *grh, u8 port_num) { + struct ib_ah_attr ah_attr; u32 flow_class; u16 gid_index; int ret; - memset(ah_attr, 0, sizeof *ah_attr); - ah_attr->dlid = wc->slid; - ah_attr->sl = wc->sl; - ah_attr->src_path_bits = wc->dlid_path_bits; - ah_attr->port_num = port_num; + memset(&ah_attr, 0, sizeof ah_attr); + ah_attr.dlid = wc->slid; + ah_attr.sl = wc->sl; + ah_attr.src_path_bits = wc->dlid_path_bits; + ah_attr.port_num = port_num; if (wc->wc_flags & IB_WC_GRH) { - ah_attr->ah_flags = IB_AH_GRH; - ah_attr->grh.dgid = grh->sgid; + ah_attr.ah_flags = IB_AH_GRH; + ah_attr.grh.dgid = grh->sgid; - ret = ib_find_cached_gid(device, &grh->dgid, &port_num, + ret = ib_find_cached_gid(pd->device, &grh->dgid, &port_num, &gid_index); if (ret) - return ret; + return ERR_PTR(ret); - ah_attr->grh.sgid_index = (u8) gid_index; + ah_attr.grh.sgid_index = (u8) gid_index; flow_class = be32_to_cpu(grh->version_tclass_flow); - ah_attr->grh.flow_label = flow_class & 0xFFFFF; - ah_attr->grh.hop_limit = grh->hop_limit; - ah_attr->grh.traffic_class = (flow_class >> 20) & 0xFF; + ah_attr.grh.flow_label = flow_class & 0xFFFFF; + ah_attr.grh.traffic_class = (flow_class >> 20) & 0xFF; + ah_attr.grh.hop_limit = grh->hop_limit; } - return 0; -} -EXPORT_SYMBOL(ib_init_ah_from_wc); - -struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc, - struct ib_grh *grh, u8 port_num) -{ - struct ib_ah_attr ah_attr; - int ret; - - ret = ib_init_ah_from_wc(pd->device, port_num, wc, grh, &ah_attr); - if (ret) - return ERR_PTR(ret); return ib_create_ah(pd, &ah_attr); } diff --git a/drivers/infiniband/hw/ipath/Kconfig b/drivers/infiniband/hw/ipath/Kconfig index 1db9489f1..9ea67c409 100644 --- a/drivers/infiniband/hw/ipath/Kconfig +++ b/drivers/infiniband/hw/ipath/Kconfig @@ -1,16 +1,16 @@ config IPATH_CORE - tristate "QLogic InfiniPath Driver" + tristate "PathScale InfiniPath Driver" depends on 64BIT && PCI_MSI && NET ---help--- - This is a low-level driver for QLogic InfiniPath host channel + This is a low-level driver for PathScale InfiniPath host channel adapters (HCAs) based on the HT-400 and PE-800 chips. config INFINIBAND_IPATH - tristate "QLogic InfiniPath Verbs Driver" + tristate "PathScale InfiniPath Verbs Driver" depends on IPATH_CORE && INFINIBAND ---help--- This is a driver that provides InfiniBand verbs support for - QLogic InfiniPath host channel adapters (HCAs). This + PathScale InfiniPath host channel adapters (HCAs). This allows these devices to be used with both kernel upper level protocols such as IP-over-InfiniBand as well as with userspace applications (in conjunction with InfiniBand userspace access). diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile index b0bf72864..b4d084abf 100644 --- a/drivers/infiniband/hw/ipath/Makefile +++ b/drivers/infiniband/hw/ipath/Makefile @@ -1,4 +1,4 @@ -EXTRA_CFLAGS += -DIPATH_IDSTR='"QLogic kernel.org driver"' \ +EXTRA_CFLAGS += -DIPATH_IDSTR='"PathScale kernel.org driver"' \ -DIPATH_KERN_TYPE=0 obj-$(CONFIG_IPATH_CORE) += ipath_core.o diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index 062bd392e..48a55247b 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -39,8 +38,7 @@ * to communicate between kernel and user code. */ - -/* This is the IEEE-assigned OUI for QLogic Inc. InfiniPath */ +/* This is the IEEE-assigned OUI for PathScale, Inc. */ #define IPATH_SRC_OUI_1 0x00 #define IPATH_SRC_OUI_2 0x11 #define IPATH_SRC_OUI_3 0x75 @@ -98,8 +96,8 @@ struct infinipath_stats { __u64 sps_hwerrs; /* number of times IB link changed state unexpectedly */ __u64 sps_iblink; - /* kernel receive interrupts that didn't read intstat */ - __u64 sps_fastrcvint; + /* no longer used; left for compatibility */ + __u64 sps_unused3; /* number of kernel (port0) packets received */ __u64 sps_port0pkts; /* number of "ethernet" packets sent by driver */ @@ -123,7 +121,8 @@ struct infinipath_stats { __u64 sps_ports; /* list of pkeys (other than default) accepted (0 means not set) */ __u16 sps_pkeys[4]; - __u16 sps_unused16[4]; /* available; maintaining compatible layout */ + /* lids for up to 4 infinipaths, indexed by infinipath # */ + __u16 sps_lid[4]; /* number of user ports per chip (not IB ports) */ __u32 sps_nports; /* not our interrupt, or already handled */ @@ -141,8 +140,10 @@ struct infinipath_stats { * packets if ipath not configured, sma/mad, etc.) */ __u64 sps_krdrops; + /* mlids for up to 4 infinipaths, indexed by infinipath # */ + __u16 sps_mlid[4]; /* pad for future growth */ - __u64 __sps_pad[46]; + __u64 __sps_pad[45]; }; /* @@ -309,9 +310,6 @@ struct ipath_base_info { __u32 spi_rcv_egrchunksize; /* total size of mmap to cover full rcvegrbuffers */ __u32 spi_rcv_egrbuftotlen; - __u32 spi_filler_for_align; - /* address of readonly memory copy of the rcvhdrq tail register. */ - __u64 spi_rcvhdr_tailaddr; } __attribute__ ((aligned(8))); @@ -344,9 +342,9 @@ struct ipath_base_info { /* * Similarly, this is the kernel version going back to the user. It's * slightly different, in that we want to tell if the driver was built as - * part of a QLogic release, or from the driver from openfabrics.org, - * kernel.org, or a standard distribution, for support reasons. - * The high bit is 0 for non-QLogic and 1 for QLogic-built/supplied. + * part of a PathScale release, or from the driver from OpenIB, kernel.org, + * or a standard distribution, for support reasons. The high bit is 0 for + * non-PathScale, and 1 for PathScale-built/supplied. * * It's returned by the driver to the user code during initialization in the * spi_sw_version field of ipath_base_info, so the user code can in turn @@ -381,7 +379,13 @@ struct ipath_user_info { */ __u32 spu_rcvhdrsize; - __u64 spu_unused; /* kept for compatible layout */ + /* + * cache line aligned (64 byte) user address to + * which the rcvhdrtail register will be written by infinipath + * whenever it changes, so that no chip registers are read in + * the performance path. + */ + __u64 spu_rcvhdraddr; /* * address of struct base_info to write to @@ -477,7 +481,7 @@ struct ipath_sma_pkt * Data layout in I2C flash (for GUID, etc.) * All fields are little-endian binary unless otherwise stated */ -#define IPATH_FLASH_VERSION 2 +#define IPATH_FLASH_VERSION 1 struct ipath_flash { /* flash layout version (IPATH_FLASH_VERSION) */ __u8 if_fversion; @@ -485,14 +489,14 @@ struct ipath_flash { __u8 if_csum; /* * valid length (in use, protected by if_csum), including - * if_fversion and if_csum themselves) + * if_fversion and if_sum themselves) */ __u8 if_length; /* the GUID, in network order */ __u8 if_guid[8]; /* number of GUIDs to use, starting from if_guid */ __u8 if_numguid; - /* the (last 10 characters of) board serial number, in ASCII */ + /* the board serial number, in ASCII */ char if_serial[12]; /* board mfg date (YYYYMMDD ASCII) */ char if_mfgdate[8]; @@ -504,10 +508,8 @@ struct ipath_flash { __u8 if_powerhour[2]; /* ASCII free-form comment field */ char if_comment[32]; - /* Backwards compatible prefix for longer QLogic Serial Numbers */ - char if_sprefix[4]; - /* 82 bytes used, min flash size is 128 bytes */ - __u8 if_future[46]; + /* 78 bytes used, min flash size is 128 bytes */ + __u8 if_future[50]; }; /* @@ -601,118 +603,14 @@ struct infinipath_counters { #define INFINIPATH_KPF_INTR 0x1 /* SendPIO per-buffer control */ -#define INFINIPATH_SP_TEST 0x40 -#define INFINIPATH_SP_TESTEBP 0x20 +#define INFINIPATH_SP_LENGTHP1_MASK 0x3FF +#define INFINIPATH_SP_LENGTHP1_SHIFT 0 +#define INFINIPATH_SP_INTR 0x80000000 +#define INFINIPATH_SP_TEST 0x40000000 +#define INFINIPATH_SP_TESTEBP 0x20000000 /* SendPIOAvail bits */ #define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 #define INFINIPATH_SENDPIOAVAIL_CHECK_SHIFT 0 -/* infinipath header format */ -struct ipath_header { - /* - * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - - * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, - * Port 3, TID 11, offset 14. - */ - __le32 ver_port_tid_offset; - __le16 chksum; - __le16 pkt_flags; -}; - -/* infinipath user message header format. - * This structure contains the first 4 fields common to all protocols - * that employ infinipath. - */ -struct ipath_message_header { - __be16 lrh[4]; - __be32 bth[3]; - /* fields below this point are in host byte order */ - struct ipath_header iph; - __u8 sub_opcode; -}; - -/* infinipath ethernet header format */ -struct ether_header { - __be16 lrh[4]; - __be32 bth[3]; - struct ipath_header iph; - __u8 sub_opcode; - __u8 cmd; - __be16 lid; - __u16 mac[3]; - __u8 frag_num; - __u8 seq_num; - __le32 len; - /* MUST be of word size due to PIO write requirements */ - __le32 csum; - __le16 csum_offset; - __le16 flags; - __u16 first_2_bytes; - __u8 unused[2]; /* currently unused */ -}; - - -/* IB - LRH header consts */ -#define IPATH_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */ -#define IPATH_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */ - -/* misc. */ -#define SIZE_OF_CRC 1 - -#define IPATH_DEFAULT_P_KEY 0xFFFF -#define IPATH_PERMISSIVE_LID 0xFFFF -#define IPATH_AETH_CREDIT_SHIFT 24 -#define IPATH_AETH_CREDIT_MASK 0x1F -#define IPATH_AETH_CREDIT_INVAL 0x1F -#define IPATH_PSN_MASK 0xFFFFFF -#define IPATH_MSN_MASK 0xFFFFFF -#define IPATH_QPN_MASK 0xFFFFFF -#define IPATH_MULTICAST_LID_BASE 0xC000 -#define IPATH_MULTICAST_QPN 0xFFFFFF - -/* Receive Header Queue: receive type (from infinipath) */ -#define RCVHQ_RCV_TYPE_EXPECTED 0 -#define RCVHQ_RCV_TYPE_EAGER 1 -#define RCVHQ_RCV_TYPE_NON_KD 2 -#define RCVHQ_RCV_TYPE_ERROR 3 - - -/* sub OpCodes - ith4x */ -#define IPATH_ITH4X_OPCODE_ENCAP 0x81 -#define IPATH_ITH4X_OPCODE_LID_ARP 0x82 - -#define IPATH_HEADER_QUEUE_WORDS 9 - -/* functions for extracting fields from rcvhdrq entries for the driver. - */ -static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf) -{ - return __le32_to_cpu(rbuf[1]); -} - -static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf) -{ - return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT) - & INFINIPATH_RHF_RCVTYPE_MASK; -} - -static inline __u32 ipath_hdrget_length_in_bytes(const __le32 * rbuf) -{ - return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT) - & INFINIPATH_RHF_LENGTH_MASK) << 2; -} - -static inline __u32 ipath_hdrget_index(const __le32 * rbuf) -{ - return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT) - & INFINIPATH_RHF_EGRINDEX_MASK; -} - -static inline __u32 ipath_hdrget_ipath_ver(__le32 hdrword) -{ - return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) - & INFINIPATH_I_VERS_MASK; -} - #endif /* _IPATH_COMMON_H */ diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 3efee341c..7ece1135d 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -158,21 +157,10 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, struct ib_ucontext *context, struct ib_udata *udata) { - struct ipath_ibdev *dev = to_idev(ibdev); struct ipath_cq *cq; struct ib_wc *wc; struct ib_cq *ret; - if (entries > ib_ipath_max_cqes) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - - if (dev->n_cqs_allocated == ib_ipath_max_cqs) { - ret = ERR_PTR(-ENOMEM); - goto bail; - } - /* * Need to use vmalloc() if we want to support large #s of * entries. @@ -208,8 +196,6 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, ret = &cq->ibcq; - dev->n_cqs_allocated++; - bail: return ret; } @@ -224,11 +210,9 @@ bail: */ int ipath_destroy_cq(struct ib_cq *ibcq) { - struct ipath_ibdev *dev = to_idev(ibcq->device); struct ipath_cq *cq = to_icq(ibcq); tasklet_kill(&cq->comptask); - dev->n_cqs_allocated--; vfree(cq->queue); kfree(cq); diff --git a/drivers/infiniband/hw/ipath/ipath_debug.h b/drivers/infiniband/hw/ipath/ipath_debug.h index f415beda0..46762387f 100644 --- a/drivers/infiniband/hw/ipath/ipath_debug.h +++ b/drivers/infiniband/hw/ipath/ipath_debug.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 147dd89e2..28ddceb26 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -44,9 +43,10 @@ #include #include +#include "ipath_common.h" #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" int ipath_diag_inuse; static int diag_set_link; @@ -66,20 +66,18 @@ static struct file_operations diag_file_ops = { .release = ipath_diag_release }; -int ipath_diag_add(struct ipath_devdata *dd) -{ - char name[16]; - - snprintf(name, sizeof(name), "ipath_diag%d", dd->ipath_unit); +static struct cdev *diag_cdev; +static struct class_device *diag_class_dev; - return ipath_cdev_init(IPATH_DIAG_MINOR_BASE + dd->ipath_unit, name, - &diag_file_ops, &dd->diag_cdev, - &dd->diag_class_dev); +int ipath_diag_init(void) +{ + return ipath_cdev_init(IPATH_DIAG_MINOR, "ipath_diag", + &diag_file_ops, &diag_cdev, &diag_class_dev); } -void ipath_diag_remove(struct ipath_devdata *dd) +void ipath_diag_cleanup(void) { - ipath_cdev_cleanup(&dd->diag_cdev, &dd->diag_class_dev); + ipath_cdev_cleanup(&diag_cdev, &diag_class_dev); } /** @@ -103,7 +101,8 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr, int ret; /* not very efficient, but it works for now */ - if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) { + if (reg_addr < dd->ipath_kregbase || + reg_end > dd->ipath_kregend) { ret = -EINVAL; goto bail; } @@ -114,7 +113,7 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr, goto bail; } reg_addr++; - uaddr += sizeof(u64); + uaddr++; } ret = 0; bail: @@ -140,7 +139,8 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr, int ret; /* not very efficient, but it works for now */ - if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) { + if (reg_addr < dd->ipath_kregbase || + reg_end > dd->ipath_kregend) { ret = -EINVAL; goto bail; } @@ -153,7 +153,7 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr, writeq(data, reg_addr); reg_addr++; - uaddr += sizeof(u64); + uaddr++; } ret = 0; bail: @@ -191,8 +191,7 @@ static int ipath_read_umem32(struct ipath_devdata *dd, void __user *uaddr, } reg_addr++; - uaddr += sizeof(u32); - + uaddr++; } ret = 0; bail: @@ -231,7 +230,7 @@ static int ipath_write_umem32(struct ipath_devdata *dd, void __iomem *caddr, writel(data, reg_addr); reg_addr++; - uaddr += sizeof(u32); + uaddr++; } ret = 0; bail: @@ -240,45 +239,59 @@ bail: static int ipath_diag_open(struct inode *in, struct file *fp) { - int unit = iminor(in) - IPATH_DIAG_MINOR_BASE; struct ipath_devdata *dd; + int unit = 0; /* XXX this is bogus */ + unsigned long flags; int ret; + dd = ipath_lookup(unit); + mutex_lock(&ipath_mutex); + spin_lock_irqsave(&ipath_devs_lock, flags); if (ipath_diag_inuse) { ret = -EBUSY; goto bail; } - dd = ipath_lookup(unit); - - if (dd == NULL || !(dd->ipath_flags & IPATH_PRESENT) || - !dd->ipath_kregbase) { - ret = -ENODEV; + list_for_each_entry(dd, &ipath_dev_list, ipath_list) { + /* + * we need at least one infinipath device to be present + * (don't use INITTED, because we want to be able to open + * even if device is in freeze mode, which cleared INITTED). + * There is a small amount of risk to this, which is why we + * also verify kregbase is set. + */ + + if (!(dd->ipath_flags & IPATH_PRESENT) || + !dd->ipath_kregbase) + continue; + + ipath_diag_inuse = 1; + diag_set_link = 0; + ret = 0; goto bail; } - fp->private_data = dd; - ipath_diag_inuse = 1; - diag_set_link = 0; - ret = 0; + ret = -ENODEV; + +bail: + spin_unlock_irqrestore(&ipath_devs_lock, flags); /* Only expose a way to reset the device if we make it into diag mode. */ - ipath_expose_reset(&dd->pcidev->dev); + if (ret == 0) + ipath_expose_reset(&dd->pcidev->dev); -bail: mutex_unlock(&ipath_mutex); return ret; } -static int ipath_diag_release(struct inode *in, struct file *fp) +static int ipath_diag_release(struct inode *i, struct file *f) { mutex_lock(&ipath_mutex); ipath_diag_inuse = 0; - fp->private_data = NULL; mutex_unlock(&ipath_mutex); return 0; } @@ -286,10 +299,17 @@ static int ipath_diag_release(struct inode *in, struct file *fp) static ssize_t ipath_diag_read(struct file *fp, char __user *data, size_t count, loff_t *off) { - struct ipath_devdata *dd = fp->private_data; + int unit = 0; /* XXX provide for reads on other units some day */ + struct ipath_devdata *dd; void __iomem *kreg_base; ssize_t ret; + dd = ipath_lookup(unit); + if (!dd) { + ret = -ENODEV; + goto bail; + } + kreg_base = dd->ipath_kregbase; if (count == 0) @@ -308,16 +328,23 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data, ret = count; } +bail: return ret; } static ssize_t ipath_diag_write(struct file *fp, const char __user *data, size_t count, loff_t *off) { - struct ipath_devdata *dd = fp->private_data; + int unit = 0; /* XXX this is bogus */ + struct ipath_devdata *dd; void __iomem *kreg_base; ssize_t ret; + dd = ipath_lookup(unit); + if (!dd) { + ret = -ENODEV; + goto bail; + } kreg_base = dd->ipath_kregbase; if (count == 0) @@ -336,5 +363,6 @@ static ssize_t ipath_diag_write(struct file *fp, const char __user *data, ret = count; } +bail: return ret; } diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index f98518d91..dddcdae73 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -39,8 +38,8 @@ #include #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" static void ipath_update_pio_bufs(struct ipath_devdata *); @@ -53,7 +52,7 @@ const char *ipath_get_unit_name(int unit) EXPORT_SYMBOL_GPL(ipath_get_unit_name); -#define DRIVER_LOAD_MSG "QLogic " IPATH_DRV_NAME " loaded: " +#define DRIVER_LOAD_MSG "PathScale " IPATH_DRV_NAME " loaded: " #define PFX IPATH_DRV_NAME ": " /* @@ -75,8 +74,8 @@ MODULE_PARM_DESC(debug, "mask for debug prints"); EXPORT_SYMBOL_GPL(ipath_debug); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("QLogic "); -MODULE_DESCRIPTION("QLogic InfiniPath driver"); +MODULE_AUTHOR("PathScale "); +MODULE_DESCRIPTION("Pathscale InfiniPath driver"); const char *ipath_ibcstatus_str[] = { "Disabled", @@ -131,6 +130,14 @@ static struct pci_driver ipath_driver = { .id_table = ipath_pci_tbl, }; +/* + * This is where port 0's rcvhdrtail register is written back; we also + * want nothing else sharing the cache line, so make it a cache line + * in size. Used for all units. + */ +volatile __le64 *ipath_port0_rcvhdrtail; +dma_addr_t ipath_port0_rcvhdrtail_dma; +static int port0_rcvhdrtail_refs; static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev, u32 *bar0, u32 *bar1) @@ -163,13 +170,14 @@ static void ipath_free_devdata(struct pci_dev *pdev, list_del(&dd->ipath_list); spin_unlock_irqrestore(&ipath_devs_lock, flags); } - vfree(dd); + dma_free_coherent(&pdev->dev, sizeof(*dd), dd, dd->ipath_dma_addr); } static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) { unsigned long flags; struct ipath_devdata *dd; + dma_addr_t dma_addr; int ret; if (!idr_pre_get(&unit_table, GFP_KERNEL)) { @@ -177,12 +185,15 @@ static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) goto bail; } - dd = vmalloc(sizeof(*dd)); + dd = dma_alloc_coherent(&pdev->dev, sizeof(*dd), &dma_addr, + GFP_KERNEL); + if (!dd) { dd = ERR_PTR(-ENOMEM); goto bail; } - memset(dd, 0, sizeof(*dd)); + + dd->ipath_dma_addr = dma_addr; dd->ipath_unit = -1; spin_lock_irqsave(&ipath_devs_lock, flags); @@ -260,6 +271,47 @@ int ipath_count_units(int *npresentp, int *nupp, u32 *maxportsp) return nunits; } +static int init_port0_rcvhdrtail(struct pci_dev *pdev) +{ + int ret; + + mutex_lock(&ipath_mutex); + + if (!ipath_port0_rcvhdrtail) { + ipath_port0_rcvhdrtail = + dma_alloc_coherent(&pdev->dev, + IPATH_PORT0_RCVHDRTAIL_SIZE, + &ipath_port0_rcvhdrtail_dma, + GFP_KERNEL); + + if (!ipath_port0_rcvhdrtail) { + ret = -ENOMEM; + goto bail; + } + } + port0_rcvhdrtail_refs++; + ret = 0; + +bail: + mutex_unlock(&ipath_mutex); + + return ret; +} + +static void cleanup_port0_rcvhdrtail(struct pci_dev *pdev) +{ + mutex_lock(&ipath_mutex); + + if (!--port0_rcvhdrtail_refs) { + dma_free_coherent(&pdev->dev, IPATH_PORT0_RCVHDRTAIL_SIZE, + (void *) ipath_port0_rcvhdrtail, + ipath_port0_rcvhdrtail_dma); + ipath_port0_rcvhdrtail = NULL; + } + + mutex_unlock(&ipath_mutex); +} + /* * These next two routines are placeholders in case we don't have per-arch * code for controlling write combining. If explicit control of write @@ -284,12 +336,20 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, u32 bar0 = 0, bar1 = 0; u8 rev; + ret = init_port0_rcvhdrtail(pdev); + if (ret < 0) { + printk(KERN_ERR IPATH_DRV_NAME + ": Could not allocate port0_rcvhdrtail: error %d\n", + -ret); + goto bail; + } + dd = ipath_alloc_devdata(pdev); if (IS_ERR(dd)) { ret = PTR_ERR(dd); printk(KERN_ERR IPATH_DRV_NAME ": Could not allocate devdata: error %d\n", -ret); - goto bail; + goto bail_rcvhdrtail; } ipath_cdbg(VERBOSE, "initializing unit #%u\n", dd->ipath_unit); @@ -364,29 +424,12 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, */ ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (ret) { - dev_info(&pdev->dev, - "Unable to set DMA mask for unit %u: %d\n", - dd->ipath_unit, ret); + dev_info(&pdev->dev, "pci_set_dma_mask unit %u " + "fails: %d\n", dd->ipath_unit, ret); goto bail_regions; } - else { + else ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); - ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); - if (ret) - dev_info(&pdev->dev, - "Unable to set DMA consistent mask " - "for unit %u: %d\n", - dd->ipath_unit, ret); - - } - } - else { - ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); - if (ret) - dev_info(&pdev->dev, - "Unable to set DMA consistent mask " - "for unit %u: %d\n", - dd->ipath_unit, ret); } pci_set_master(pdev); @@ -409,7 +452,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ipath_init_pe800_funcs(dd); break; default: - ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " + ipath_dev_err(dd, "Found unknown PathScale deviceid 0x%x, " "failing\n", ent->device); return -ENODEV; } @@ -417,10 +460,10 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, for (j = 0; j < 6; j++) { if (!pdev->resource[j].start) continue; - ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n", - j, (unsigned long long)pdev->resource[j].start, - (unsigned long long)pdev->resource[j].end, - (unsigned long long)pci_resource_len(pdev, j)); + ipath_cdbg(VERBOSE, "BAR %d start %lx, end %lx, len %lx\n", + j, pdev->resource[j].start, + pdev->resource[j].end, + pci_resource_len(pdev, j)); } if (!addr) { @@ -452,23 +495,23 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ((void __iomem *)dd->ipath_kregbase + len); dd->ipath_physaddr = addr; /* used for io_remap, etc. */ /* for user mmap */ - ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p\n", - addr, dd->ipath_kregbase); + dd->ipath_kregvirt = (u64 __iomem *) phys_to_virt(addr); + ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p " + "kregvirt %p\n", addr, dd->ipath_kregbase, + dd->ipath_kregvirt); /* * clear ipath_flags here instead of in ipath_init_chip as it is set * by ipath_setup_htconfig. */ dd->ipath_flags = 0; - dd->ipath_lli_counter = 0; - dd->ipath_lli_errors = 0; if (dd->ipath_f_bus(dd, pdev)) ipath_dev_err(dd, "Failed to setup config space; " "continuing anyway\n"); /* - * set up our interrupt handler; IRQF_SHARED probably not needed, + * set up our interrupt handler; SA_SHIRQ probably not needed, * since MSI interrupts shouldn't be shared but won't hurt for now. * check 0 irq after we return from chip-specific bus setup, since * that can affect this due to setup @@ -477,7 +520,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't " "work\n"); else { - ret = request_irq(pdev->irq, ipath_intr, IRQF_SHARED, + ret = request_irq(pdev->irq, ipath_intr, SA_SHIRQ, IPATH_DRV_NAME, dd); if (ret) { ipath_dev_err(dd, "Couldn't setup irq handler, " @@ -502,7 +545,6 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ipath_device_create_group(&pdev->dev, dd); ipathfs_add_device(dd); ipath_user_add(dd); - ipath_diag_add(dd); ipath_layer_add(dd); goto bail; @@ -519,6 +561,9 @@ bail_disable: bail_devdata: ipath_free_devdata(pdev, dd); +bail_rcvhdrtail: + cleanup_port0_rcvhdrtail(pdev); + bail: return ret; } @@ -532,9 +577,8 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) return; dd = pci_get_drvdata(pdev); - ipath_layer_remove(dd); - ipath_diag_remove(dd); - ipath_user_remove(dd); + ipath_layer_del(dd); + ipath_user_del(dd); ipathfs_remove_device(dd); ipath_device_remove_group(&pdev->dev, dd); ipath_cdbg(VERBOSE, "Releasing pci memory regions, dd %p, " @@ -550,6 +594,7 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) pci_disable_device(pdev); ipath_free_devdata(pdev, dd); + cleanup_port0_rcvhdrtail(pdev); } /* general driver use */ @@ -823,8 +868,7 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail, u8 pad, *bthbytes; struct sk_buff *skb, *nskb; - if (dd->ipath_port0_skbs && - hdr->sub_opcode == IPATH_ITH4X_OPCODE_ENCAP) { + if (dd->ipath_port0_skbs && hdr->sub_opcode == OPCODE_ENCAP) { /* * Allocate a new sk_buff to replace the one we give * to the network stack. @@ -855,42 +899,10 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail, /* another ether packet received */ ipath_stats.sps_ether_rpkts++; } - else if (hdr->sub_opcode == IPATH_ITH4X_OPCODE_LID_ARP) + else if (hdr->sub_opcode == OPCODE_LID_ARP) __ipath_layer_rcv_lid(dd, hdr); } -static void ipath_rcv_hdrerr(struct ipath_devdata *dd, - u32 eflags, - u32 l, - u32 etail, - u64 *rc) -{ - char emsg[128]; - struct ipath_message_header *hdr; - - get_rhf_errstring(eflags, emsg, sizeof emsg); - hdr = (struct ipath_message_header *)&rc[1]; - ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u " - "tlen=%x opcode=%x egridx=%x: %s\n", - eflags, l, - ipath_hdrget_rcv_type((__le32 *) rc), - ipath_hdrget_length_in_bytes((__le32 *) rc), - be32_to_cpu(hdr->bth[0]) >> 24, - etail, emsg); - - /* Count local link integrity errors. */ - if (eflags & (INFINIPATH_RHF_H_ICRCERR | INFINIPATH_RHF_H_VCRCERR)) { - u8 n = (dd->ipath_ibcctrl >> - INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT) & - INFINIPATH_IBCC_PHYERRTHRESHOLD_MASK; - - if (++dd->ipath_lli_counter > n) { - dd->ipath_lli_counter = 0; - dd->ipath_lli_errors++; - } - } -} - /* * ipath_kreceive - receive a packet * @dd: the infinipath device @@ -904,9 +916,10 @@ void ipath_kreceive(struct ipath_devdata *dd) const u32 rsize = dd->ipath_rcvhdrentsize; /* words */ const u32 maxcnt = dd->ipath_rcvhdrcnt * rsize; /* words */ u32 etail = -1, l, hdrqtail; - struct ipath_message_header *hdr; - u32 eflags, i, etype, tlen, pkttot = 0, updegr=0, reloop=0; + struct ips_message_header *hdr; + u32 eflags, i, etype, tlen, pkttot = 0; static u64 totcalls; /* stats, may eventually remove */ + char emsg[128]; if (!dd->ipath_hdrqtailptr) { ipath_dev_err(dd, @@ -918,18 +931,24 @@ void ipath_kreceive(struct ipath_devdata *dd) if (test_and_set_bit(0, &dd->ipath_rcv_pending)) goto bail; - l = dd->ipath_port0head; - hdrqtail = (u32) le64_to_cpu(*dd->ipath_hdrqtailptr); - if (l == hdrqtail) + if (dd->ipath_port0head == + (u32)le64_to_cpu(*dd->ipath_hdrqtailptr)) goto done; -reloop: - for (i = 0; l != hdrqtail; i++) { +gotmore: + /* + * read only once at start. If in flood situation, this helps + * performance slightly. If more arrive while we are processing, + * we'll come back here and do them + */ + hdrqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); + + for (i = 0, l = dd->ipath_port0head; l != hdrqtail; i++) { u32 qp; u8 *bthbytes; rc = (u64 *) (dd->ipath_pd[0]->port_rcvhdrq + (l << 2)); - hdr = (struct ipath_message_header *)&rc[1]; + hdr = (struct ips_message_header *)&rc[1]; /* * could make a network order version of IPATH_KD_QP, and * do the obvious shift before masking to speed this up. @@ -937,10 +956,10 @@ reloop: qp = ntohl(hdr->bth[1]) & 0xffffff; bthbytes = (u8 *) hdr->bth; - eflags = ipath_hdrget_err_flags((__le32 *) rc); - etype = ipath_hdrget_rcv_type((__le32 *) rc); + eflags = ips_get_hdr_err_flags((__le32 *) rc); + etype = ips_get_rcv_type((__le32 *) rc); /* total length */ - tlen = ipath_hdrget_length_in_bytes((__le32 *) rc); + tlen = ips_get_length_in_bytes((__le32 *) rc); ebuf = NULL; if (etype != RCVHQ_RCV_TYPE_EXPECTED) { /* @@ -950,7 +969,7 @@ reloop: * set ebuf (so we try to copy data) unless the * length requires it. */ - etail = ipath_hdrget_index((__le32 *) rc); + etail = ips_get_index((__le32 *) rc); if (tlen > sizeof(*hdr) || etype == RCVHQ_RCV_TYPE_NON_KD) ebuf = ipath_get_egrbuf(dd, etail, 0); @@ -962,25 +981,27 @@ reloop: */ if (etype != RCVHQ_RCV_TYPE_NON_KD && etype != - RCVHQ_RCV_TYPE_ERROR && ipath_hdrget_ipath_ver( + RCVHQ_RCV_TYPE_ERROR && ips_get_ipath_ver( hdr->iph.ver_port_tid_offset) != IPS_PROTO_VERSION) { ipath_cdbg(PKT, "Bad InfiniPath protocol version " "%x\n", etype); } - if (unlikely(eflags)) - ipath_rcv_hdrerr(dd, eflags, l, etail, rc); - else if (etype == RCVHQ_RCV_TYPE_NON_KD) { + if (eflags & ~(INFINIPATH_RHF_H_TIDERR | + INFINIPATH_RHF_H_IHDRERR)) { + get_rhf_errstring(eflags, emsg, sizeof emsg); + ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u " + "tlen=%x opcode=%x egridx=%x: %s\n", + eflags, l, etype, tlen, bthbytes[0], + ips_get_index((__le32 *) rc), emsg); + } else if (etype == RCVHQ_RCV_TYPE_NON_KD) { int ret = __ipath_verbs_rcv(dd, rc + 1, ebuf, tlen); if (ret == -ENODEV) ipath_cdbg(VERBOSE, "received IB packet, " "not SMA (QP=%x)\n", qp); - if (dd->ipath_lli_counter) - dd->ipath_lli_counter--; - } else if (etype == RCVHQ_RCV_TYPE_EAGER) { if (qp == IPATH_KD_QP && bthbytes[0] == ipath_layer_rcv_opcode && @@ -995,7 +1016,25 @@ reloop: else if (etype == RCVHQ_RCV_TYPE_EXPECTED) ipath_dbg("Bug: Expected TID, opcode %x; ignored\n", be32_to_cpu(hdr->bth[0]) & 0xff); - else { + else if (eflags & (INFINIPATH_RHF_H_TIDERR | + INFINIPATH_RHF_H_IHDRERR)) { + /* + * This is a type 3 packet, only the LRH is in the + * rcvhdrq, the rest of the header is in the eager + * buffer. + */ + u8 opcode; + if (ebuf) { + bthbytes = (u8 *) ebuf; + opcode = *bthbytes; + } + else + opcode = 0; + get_rhf_errstring(eflags, emsg, sizeof emsg); + ipath_dbg("Err %x (%s), opcode %x, egrbuf %x, " + "len %x\n", eflags, emsg, opcode, etail, + tlen); + } else { /* * error packet, type of error unknown. * Probably type 3, but we don't know, so don't @@ -1015,49 +1054,25 @@ reloop: l += rsize; if (l >= maxcnt) l = 0; - if (etype != RCVHQ_RCV_TYPE_EXPECTED) - updegr = 1; /* - * update head regs on last packet, and every 16 packets. - * Reduce bus traffic, while still trying to prevent - * rcvhdrq overflows, for when the queue is nearly full + * update for each packet, to help prevent overflows if we + * have lots of packets. */ - if (l == hdrqtail || (i && !(i&0xf))) { - u64 lval; - if (l == hdrqtail) /* PE-800 interrupt only on last */ - lval = dd->ipath_rhdrhead_intr_off | l; - else - lval = l; - (void)ipath_write_ureg(dd, ur_rcvhdrhead, lval, 0); - if (updegr) { - (void)ipath_write_ureg(dd, ur_rcvegrindexhead, - etail, 0); - updegr = 0; - } - } - } - - if (!dd->ipath_rhdrhead_intr_off && !reloop) { - /* HT-400 workaround; we can have a race clearing chip - * interrupt with another interrupt about to be delivered, - * and can clear it before it is delivered on the GPIO - * workaround. By doing the extra check here for the - * in-memory tail register updating while we were doing - * earlier packets, we "almost" guarantee we have covered - * that case. - */ - u32 hqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); - if (hqtail != hdrqtail) { - hdrqtail = hqtail; - reloop = 1; /* loop 1 extra time at most */ - goto reloop; - } + (void)ipath_write_ureg(dd, ur_rcvhdrhead, + dd->ipath_rhdrhead_intr_off | l, 0); + if (etype != RCVHQ_RCV_TYPE_EXPECTED) + (void)ipath_write_ureg(dd, ur_rcvegrindexhead, + etail, 0); } pkttot += i; dd->ipath_port0head = l; + if (hdrqtail != (u32)le64_to_cpu(*dd->ipath_hdrqtailptr)) + /* more arrived while we handled first batch */ + goto gotmore; + if (pkttot > ipath_stats.sps_maxpkts_call) ipath_stats.sps_maxpkts_call = pkttot; ipath_stats.sps_port0pkts += pkttot; @@ -1354,20 +1369,26 @@ bail: * @dd: the infinipath device * @pd: the port data * - * this must be contiguous memory (from an i/o perspective), and must be - * DMA'able (which means for some systems, it will go through an IOMMU, - * or be forced into a low address range). + * this *must* be physically contiguous memory, and for now, + * that limits it to what kmalloc can do. */ int ipath_create_rcvhdrq(struct ipath_devdata *dd, struct ipath_portdata *pd) { - int ret = 0; + int ret = 0, amt; + amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * + sizeof(u32), PAGE_SIZE); if (!pd->port_rcvhdrq) { - dma_addr_t phys_hdrqtail; + /* + * not using REPEAT isn't viable; at 128KB, we can easily + * fail this. The problem with REPEAT is we can block here + * "forever". There isn't an inbetween, unfortunately. We + * could reduce the risk by never freeing the rcvhdrq except + * at unload, but even then, the first time a port is used, + * we could delay for some time... + */ gfp_t gfp_flags = GFP_USER | __GFP_COMP; - int amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * - sizeof(u32), PAGE_SIZE); pd->port_rcvhdrq = dma_alloc_coherent( &dd->pcidev->dev, amt, &pd->port_rcvhdrq_phys, @@ -1380,16 +1401,6 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, ret = -ENOMEM; goto bail; } - pd->port_rcvhdrtail_kvaddr = dma_alloc_coherent( - &dd->pcidev->dev, PAGE_SIZE, &phys_hdrqtail, GFP_KERNEL); - if (!pd->port_rcvhdrtail_kvaddr) { - ipath_dev_err(dd, "attempt to allocate 1 page " - "for port %u rcvhdrqtailaddr failed\n", - pd->port_port); - ret = -ENOMEM; - goto bail; - } - pd->port_rcvhdrqtailaddr_phys = phys_hdrqtail; pd->port_rcvhdrq_size = amt; @@ -1399,28 +1410,20 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, (unsigned long) pd->port_rcvhdrq_phys, (unsigned long) pd->port_rcvhdrq_size, pd->port_port); - - ipath_cdbg(VERBOSE, "port %d hdrtailaddr, %llx physical\n", - pd->port_port, - (unsigned long long) phys_hdrqtail); + } else { + /* + * clear for security, sanity, and/or debugging, each + * time we reuse + */ + memset(pd->port_rcvhdrq, 0, amt); } - else - ipath_cdbg(VERBOSE, "reuse port %d rcvhdrq @%p %llx phys; " - "hdrtailaddr@%p %llx physical\n", - pd->port_port, pd->port_rcvhdrq, - pd->port_rcvhdrq_phys, pd->port_rcvhdrtail_kvaddr, - (unsigned long long)pd->port_rcvhdrqtailaddr_phys); - - /* clear for security and sanity on each use */ - memset(pd->port_rcvhdrq, 0, pd->port_rcvhdrq_size); - memset((void *)pd->port_rcvhdrtail_kvaddr, 0, PAGE_SIZE); /* * tell chip each time we init it, even if we are re-using previous - * memory (we zero the register at process close) + * memory (we zero it at process close) */ - ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, - pd->port_port, pd->port_rcvhdrqtailaddr_phys); + ipath_cdbg(VERBOSE, "writing port %d rcvhdraddr as %lx\n", + pd->port_port, (unsigned long) pd->port_rcvhdrq_phys); ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, pd->port_port, pd->port_rcvhdrq_phys); @@ -1508,27 +1511,15 @@ void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" }; - int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & - INFINIPATH_IBCC_LINKCMD_MASK; - ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate " "is %s\n", dd->ipath_unit, - what[linkcmd], + what[(which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & + INFINIPATH_IBCC_LINKCMD_MASK], ipath_ibcstatus_str[ (ipath_read_kreg64 (dd, dd->ipath_kregs->kr_ibcstatus) >> INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); - /* flush all queued sends when going to DOWN or INIT, to be sure that - * they don't block SMA and other MAD packets */ - if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) { - ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, - INFINIPATH_S_ABORT); - ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf, - (unsigned)(dd->ipath_piobcnt2k + - dd->ipath_piobcnt4k) - - dd->ipath_lastport_piobuf); - } ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, dd->ipath_ibcctrl | which); @@ -1647,7 +1638,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd) /* disable IBC */ dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; ipath_write_kreg(dd, dd->ipath_kregs->kr_control, - dd->ipath_control | INFINIPATH_C_FREEZEMODE); + dd->ipath_control); /* * clear SerdesEnable and turn the leds off; do this here because @@ -1676,54 +1667,60 @@ void ipath_shutdown_device(struct ipath_devdata *dd) /** * ipath_free_pddata - free a port's allocated data * @dd: the infinipath device - * @pd: the portdata structure + * @port: the port + * @freehdrq: free the port data structure if true * - * free up any allocated data for a port - * This should not touch anything that would affect a simultaneous - * re-allocation of port data, because it is called after ipath_mutex - * is released (and can be called from reinit as well). - * It should never change any chip state, or global driver state. - * (The only exception to global state is freeing the port0 port0_skbs.) + * when closing, free up any allocated data for a port, if the + * reference count goes to zero + * Note: this also optionally frees the portdata itself! + * Any changes here have to be matched up with the reinit case + * of ipath_init_chip(), which calls this routine on reinit after reset. */ -void ipath_free_pddata(struct ipath_devdata *dd, struct ipath_portdata *pd) +void ipath_free_pddata(struct ipath_devdata *dd, u32 port, int freehdrq) { + struct ipath_portdata *pd = dd->ipath_pd[port]; + if (!pd) return; - - if (pd->port_rcvhdrq) { + if (freehdrq) + /* + * only clear and free portdata if we are going to also + * release the hdrq, otherwise we leak the hdrq on each + * open/close cycle + */ + dd->ipath_pd[port] = NULL; + if (freehdrq && pd->port_rcvhdrq) { ipath_cdbg(VERBOSE, "free closed port %d rcvhdrq @ %p " "(size=%lu)\n", pd->port_port, pd->port_rcvhdrq, (unsigned long) pd->port_rcvhdrq_size); dma_free_coherent(&dd->pcidev->dev, pd->port_rcvhdrq_size, pd->port_rcvhdrq, pd->port_rcvhdrq_phys); pd->port_rcvhdrq = NULL; - if (pd->port_rcvhdrtail_kvaddr) { - dma_free_coherent(&dd->pcidev->dev, PAGE_SIZE, - (void *)pd->port_rcvhdrtail_kvaddr, - pd->port_rcvhdrqtailaddr_phys); - pd->port_rcvhdrtail_kvaddr = NULL; - } } - if (pd->port_port && pd->port_rcvegrbuf) { - unsigned e; - - for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { - void *base = pd->port_rcvegrbuf[e]; - size_t size = pd->port_rcvegrbuf_size; - - ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), " - "chunk %u/%u\n", base, - (unsigned long) size, - e, pd->port_rcvegrbuf_chunks); - dma_free_coherent(&dd->pcidev->dev, size, - base, pd->port_rcvegrbuf_phys[e]); + if (port && pd->port_rcvegrbuf) { + /* always free this */ + if (pd->port_rcvegrbuf) { + unsigned e; + + for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { + void *base = pd->port_rcvegrbuf[e]; + size_t size = pd->port_rcvegrbuf_size; + + ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), " + "chunk %u/%u\n", base, + (unsigned long) size, + e, pd->port_rcvegrbuf_chunks); + dma_free_coherent( + &dd->pcidev->dev, size, base, + pd->port_rcvegrbuf_phys[e]); + } + vfree(pd->port_rcvegrbuf); + pd->port_rcvegrbuf = NULL; + vfree(pd->port_rcvegrbuf_phys); + pd->port_rcvegrbuf_phys = NULL; } - vfree(pd->port_rcvegrbuf); - pd->port_rcvegrbuf = NULL; - vfree(pd->port_rcvegrbuf_phys); - pd->port_rcvegrbuf_phys = NULL; pd->port_rcvegrbuf_chunks = 0; - } else if (pd->port_port == 0 && dd->ipath_port0_skbs) { + } else if (port == 0 && dd->ipath_port0_skbs) { unsigned e; struct sk_buff **skbs = dd->ipath_port0_skbs; @@ -1735,8 +1732,10 @@ void ipath_free_pddata(struct ipath_devdata *dd, struct ipath_portdata *pd) dev_kfree_skb(skbs[e]); vfree(skbs); } - kfree(pd->port_tid_pg_list); - kfree(pd); + if (freehdrq) { + kfree(pd->port_tid_pg_list); + kfree(pd); + } } static int __init infinipath_init(void) @@ -1807,6 +1806,7 @@ static void cleanup_device(struct ipath_devdata *dd) * re-init */ dd->ipath_kregbase = NULL; + dd->ipath_kregvirt = NULL; dd->ipath_uregbase = 0; dd->ipath_sregbase = 0; dd->ipath_cregbase = 0; @@ -1821,12 +1821,6 @@ static void cleanup_device(struct ipath_devdata *dd) dd->ipath_pioavailregs_phys); dd->ipath_pioavailregs_dma = NULL; } - if (dd->ipath_dummy_hdrq) { - dma_free_coherent(&dd->pcidev->dev, - dd->ipath_pd[0]->port_rcvhdrq_size, - dd->ipath_dummy_hdrq, dd->ipath_dummy_hdrq_phys); - dd->ipath_dummy_hdrq = NULL; - } if (dd->ipath_pageshadow) { struct page **tmpp = dd->ipath_pageshadow; @@ -1867,14 +1861,10 @@ static void cleanup_device(struct ipath_devdata *dd) /* * free any resources still in use (usually just kernel ports) - * at unload; we do for portcnt, not cfgports, because cfgports - * could have changed while we were loaded. + * at unload */ - for (port = 0; port < dd->ipath_portcnt; port++) { - struct ipath_portdata *pd = dd->ipath_pd[port]; - dd->ipath_pd[port] = NULL; - ipath_free_pddata(dd, pd); - } + for (port = 0; port < dd->ipath_cfgports; port++) + ipath_free_pddata(dd, port, 1); kfree(dd->ipath_pd); /* * debuggability, in case some cleanup path tries to use it diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index 3313356ab..a2f1ceafc 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -601,31 +600,8 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd) guid = *(__be64 *) ifp->if_guid; dd->ipath_guid = guid; dd->ipath_nguid = ifp->if_numguid; - /* - * Things are slightly complicated by the desire to transparently - * support both the Pathscale 10-digit serial number and the QLogic - * 13-character version. - */ - if ((ifp->if_fversion > 1) && ifp->if_sprefix[0] - && ((u8 *)ifp->if_sprefix)[0] != 0xFF) { - /* This board has a Serial-prefix, which is stored - * elsewhere for backward-compatibility. - */ - char *snp = dd->ipath_serial; - int len; - memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix); - snp[sizeof ifp->if_sprefix] = '\0'; - len = strlen(snp); - snp += len; - len = (sizeof dd->ipath_serial) - len; - if (len > sizeof ifp->if_serial) { - len = sizeof ifp->if_serial; - } - memcpy(snp, ifp->if_serial, len); - } else - memcpy(dd->ipath_serial, ifp->if_serial, - sizeof ifp->if_serial); - + memcpy(dd->ipath_serial, ifp->if_serial, + sizeof(ifp->if_serial)); ipath_cdbg(VERBOSE, "Initted GUID to %llx from eeprom\n", (unsigned long long) be64_to_cpu(dd->ipath_guid)); diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index bbaa70e57..ada267e41 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -39,8 +38,8 @@ #include #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" static int ipath_open(struct inode *, struct file *); static int ipath_close(struct inode *, struct file *); @@ -123,7 +122,6 @@ static int ipath_get_base_info(struct ipath_portdata *pd, * on to yet another method of dealing with this */ kinfo->spi_rcvhdr_base = (u64) pd->port_rcvhdrq_phys; - kinfo->spi_rcvhdr_tailaddr = (u64)pd->port_rcvhdrqtailaddr_phys; kinfo->spi_rcv_egrbufs = (u64) pd->port_rcvegr_phys; kinfo->spi_pioavailaddr = (u64) dd->ipath_pioavailregs_phys; kinfo->spi_status = (u64) kinfo->spi_pioavailaddr + @@ -458,7 +456,7 @@ static int ipath_set_part_key(struct ipath_portdata *pd, u16 key) u16 lkey = key & 0x7FFF; int ret; - if (lkey == (IPATH_DEFAULT_P_KEY & 0x7FFF)) { + if (lkey == (IPS_DEFAULT_P_KEY & 0x7FFF)) { /* nothing to do; this key always valid */ ret = 0; goto bail; @@ -706,15 +704,6 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) unsigned e, egrcnt, alloced, egrperchunk, chunk, egrsize, egroff; size_t size; int ret; - gfp_t gfp_flags; - - /* - * GFP_USER, but without GFP_FS, so buffer cache can be - * coalesced (we hope); otherwise, even at order 4, - * heavy filesystem activity makes these fail, and we can - * use compound pages. - */ - gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP; egrcnt = dd->ipath_rcvegrcnt; /* TID number offset for this port */ @@ -731,8 +720,10 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) * memory pressure (creating large files and then copying them over * NFS while doing lots of MPI jobs), we hit some allocation * failures, even though we can sleep... (2.6.10) Still get - * failures at 64K. 32K is the lowest we can go without wasting - * additional memory. + * failures at 64K. 32K is the lowest we can go without waiting + * more memory again. It seems likely that the coalescing in + * free_pages, etc. still has issues (as it has had previously + * during 2.6.x development). */ size = 0x8000; alloced = ALIGN(egrsize * egrcnt, size); @@ -753,6 +744,12 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) goto bail_rcvegrbuf; } for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { + /* + * GFP_USER, but without GFP_FS, so buffer cache can be + * coalesced (we hope); otherwise, even at order 4, + * heavy filesystem activity makes these fail + */ + gfp_t gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP; pd->port_rcvegrbuf[e] = dma_alloc_coherent( &dd->pcidev->dev, size, &pd->port_rcvegrbuf_phys[e], @@ -786,12 +783,11 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) bail_rcvegrbuf_phys: for (e = 0; e < pd->port_rcvegrbuf_chunks && - pd->port_rcvegrbuf[e]; e++) { + pd->port_rcvegrbuf[e]; e++) dma_free_coherent(&dd->pcidev->dev, size, pd->port_rcvegrbuf[e], pd->port_rcvegrbuf_phys[e]); - } vfree(pd->port_rcvegrbuf_phys); pd->port_rcvegrbuf_phys = NULL; bail_rcvegrbuf: @@ -806,7 +802,10 @@ static int ipath_do_user_init(struct ipath_portdata *pd, { int ret = 0; struct ipath_devdata *dd = pd->port_dd; + u64 physaddr, uaddr, off, atmp; + struct page *pagep; u32 head32; + u64 head; /* for now, if major version is different, bail */ if ((uinfo->spu_userversion >> 16) != IPATH_USER_SWMAJOR) { @@ -831,6 +830,54 @@ static int ipath_do_user_init(struct ipath_portdata *pd, /* for now we do nothing with rcvhdrcnt: uinfo->spu_rcvhdrcnt */ + /* set up for the rcvhdr Q tail register writeback to user memory */ + if (!uinfo->spu_rcvhdraddr || + !access_ok(VERIFY_WRITE, (u64 __user *) (unsigned long) + uinfo->spu_rcvhdraddr, sizeof(u64))) { + ipath_dbg("Port %d rcvhdrtail addr %llx not valid\n", + pd->port_port, + (unsigned long long) uinfo->spu_rcvhdraddr); + ret = -EINVAL; + goto done; + } + + off = offset_in_page(uinfo->spu_rcvhdraddr); + uaddr = PAGE_MASK & (unsigned long) uinfo->spu_rcvhdraddr; + ret = ipath_get_user_pages_nocopy(uaddr, &pagep); + if (ret) { + dev_info(&dd->pcidev->dev, "Failed to lookup and lock " + "address %llx for rcvhdrtail: errno %d\n", + (unsigned long long) uinfo->spu_rcvhdraddr, -ret); + goto done; + } + ipath_stats.sps_pagelocks++; + pd->port_rcvhdrtail_uaddr = uaddr; + pd->port_rcvhdrtail_pagep = pagep; + pd->port_rcvhdrtail_kvaddr = + page_address(pagep); + pd->port_rcvhdrtail_kvaddr += off; + physaddr = page_to_phys(pagep) + off; + ipath_cdbg(VERBOSE, "port %d user addr %llx hdrtailaddr, %llx " + "physical (off=%llx)\n", + pd->port_port, + (unsigned long long) uinfo->spu_rcvhdraddr, + (unsigned long long) physaddr, (unsigned long long) off); + ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, + pd->port_port, physaddr); + atmp = ipath_read_kreg64_port(dd, + dd->ipath_kregs->kr_rcvhdrtailaddr, + pd->port_port); + if (physaddr != atmp) { + ipath_dev_err(dd, + "Catastrophic software error, " + "RcvHdrTailAddr%u written as %llx, " + "read back as %llx\n", pd->port_port, + (unsigned long long) physaddr, + (unsigned long long) atmp); + ret = -EINVAL; + goto done; + } + /* for right now, kernel piobufs are at end, so port 1 is at 0 */ pd->port_piobufs = dd->ipath_piobufbase + dd->ipath_pbufsport * (pd->port_port - @@ -849,18 +896,26 @@ static int ipath_do_user_init(struct ipath_portdata *pd, ret = ipath_create_user_egr(pd); if (ret) goto done; + /* enable receives now */ + /* atomically set enable bit for this port */ + set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, + &dd->ipath_rcvctrl); /* - * set the eager head register for this port to the current values + * set the head registers for this port to the current values * of the tail pointers, since we don't know if they were * updated on last use of the port. */ + head32 = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port); + head = (u64) head32; + ipath_write_ureg(dd, ur_rcvhdrhead, head, pd->port_port); head32 = ipath_read_ureg32(dd, ur_rcvegrindextail, pd->port_port); ipath_write_ureg(dd, ur_rcvegrindexhead, head32, pd->port_port); dd->ipath_lastegrheads[pd->port_port] = -1; dd->ipath_lastrcvhdrqtails[pd->port_port] = -1; - ipath_cdbg(VERBOSE, "Wrote port%d egrhead %x from tail regs\n", - pd->port_port, head32); + ipath_cdbg(VERBOSE, "Wrote port%d head %llx, egrhead %x from " + "tail regs\n", pd->port_port, + (unsigned long long) head, head32); pd->port_tidcursor = 0; /* start at beginning after open */ /* * now enable the port; the tail registers will be written to memory @@ -869,62 +924,13 @@ static int ipath_do_user_init(struct ipath_portdata *pd, * transition from 0 to 1, so clear it first, then set it as part of * enabling the port. This will (very briefly) affect any other * open ports, but it shouldn't be long enough to be an issue. - * We explictly set the in-memory copy to 0 beforehand, so we don't - * have to wait to be sure the DMA update has happened. */ - *pd->port_rcvhdrtail_kvaddr = 0ULL; - set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, - &dd->ipath_rcvctrl); ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD); ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, dd->ipath_rcvctrl); -done: - return ret; -} - - -/* common code for the mappings on dma_alloc_coherent mem */ -static int ipath_mmap_mem(struct vm_area_struct *vma, - struct ipath_portdata *pd, unsigned len, - int write_ok, dma_addr_t addr, char *what) -{ - struct ipath_devdata *dd = pd->port_dd; - unsigned pfn = (unsigned long)addr >> PAGE_SHIFT; - int ret; - - if ((vma->vm_end - vma->vm_start) > len) { - dev_info(&dd->pcidev->dev, - "FAIL on %s: len %lx > %x\n", what, - vma->vm_end - vma->vm_start, len); - ret = -EFAULT; - goto bail; - } - - if (!write_ok) { - if (vma->vm_flags & VM_WRITE) { - dev_info(&dd->pcidev->dev, - "%s must be mapped readonly\n", what); - ret = -EPERM; - goto bail; - } - /* don't allow them to later change with mprotect */ - vma->vm_flags &= ~VM_MAYWRITE; - } - - ret = remap_pfn_range(vma, vma->vm_start, pfn, - len, vma->vm_page_prot); - if (ret) - dev_info(&dd->pcidev->dev, - "%s port%u mmap of %lx, %x bytes r%c failed: %d\n", - what, pd->port_port, (unsigned long)addr, len, - write_ok?'w':'o', ret); - else - ipath_cdbg(VERBOSE, "%s port%u mmaped %lx, %x bytes r%c\n", - what, pd->port_port, (unsigned long)addr, len, - write_ok?'w':'o'); -bail: +done: return ret; } @@ -934,11 +940,8 @@ static int mmap_ureg(struct vm_area_struct *vma, struct ipath_devdata *dd, unsigned long phys; int ret; - /* - * This is real hardware, so use io_remap. This is the mechanism - * for the user process to update the head registers for their port - * in the chip. - */ + /* it's the real hardware, so io_remap works */ + if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { dev_info(&dd->pcidev->dev, "FAIL mmap userreg: reqlen " "%lx > PAGE\n", vma->vm_end - vma->vm_start); @@ -964,11 +967,10 @@ static int mmap_piobufs(struct vm_area_struct *vma, int ret; /* - * When we map the PIO buffers in the chip, we want to map them as - * writeonly, no read possible. This prevents access to previous - * process data, and catches users who might try to read the i/o - * space due to a bug. + * When we map the PIO buffers, we want to map them as writeonly, no + * read possible. */ + if ((vma->vm_end - vma->vm_start) > (dd->ipath_pbufsport * dd->ipath_palign)) { dev_info(&dd->pcidev->dev, "FAIL mmap piobufs: " @@ -979,10 +981,11 @@ static int mmap_piobufs(struct vm_area_struct *vma, } phys = dd->ipath_physaddr + pd->port_piobufs; - /* - * Don't mark this as non-cached, or we don't get the + * Do *NOT* mark this as non-cached (PWT bit), or we don't get the * write combining behavior we want on the PIO buffers! + * vma->vm_page_prot = + * pgprot_noncached(vma->vm_page_prot); */ if (vma->vm_flags & VM_READ) { @@ -994,7 +997,8 @@ static int mmap_piobufs(struct vm_area_struct *vma, } /* don't allow them to later change to readable with mprotect */ - vma->vm_flags &= ~VM_MAYREAD; + + vma->vm_flags &= ~VM_MAYWRITE; vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND; ret = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT, @@ -1013,6 +1017,11 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma, dma_addr_t *phys; int ret; + if (!pd->port_rcvegrbuf) { + ret = -EFAULT; + goto bail; + } + size = pd->port_rcvegrbuf_size; total_size = pd->port_rcvegrbuf_chunks * size; if ((vma->vm_end - vma->vm_start) > total_size) { @@ -1030,12 +1039,13 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma, ret = -EPERM; goto bail; } - /* don't allow them to later change to writeable with mprotect */ - vma->vm_flags &= ~VM_MAYWRITE; start = vma->vm_start; phys = pd->port_rcvegrbuf_phys; + /* don't allow them to later change to writeable with mprotect */ + vma->vm_flags &= ~VM_MAYWRITE; + for (i = 0; i < pd->port_rcvegrbuf_chunks; i++, start += size) { ret = remap_pfn_range(vma, start, phys[i] >> PAGE_SHIFT, size, vma->vm_page_prot); @@ -1048,6 +1058,78 @@ bail: return ret; } +static int mmap_rcvhdrq(struct vm_area_struct *vma, + struct ipath_portdata *pd) +{ + struct ipath_devdata *dd = pd->port_dd; + size_t total_size; + int ret; + + /* + * kmalloc'ed memory, physically contiguous; this is from + * spi_rcvhdr_base; we allow user to map read-write so they can + * write hdrq entries to allow protocol code to directly poll + * whether a hdrq entry has been written. + */ + total_size = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * + sizeof(u32), PAGE_SIZE); + if ((vma->vm_end - vma->vm_start) > total_size) { + dev_info(&dd->pcidev->dev, + "FAIL on rcvhdrq: reqlen %lx > actual %lx\n", + vma->vm_end - vma->vm_start, + (unsigned long) total_size); + ret = -EFAULT; + goto bail; + } + + ret = remap_pfn_range(vma, vma->vm_start, + pd->port_rcvhdrq_phys >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); +bail: + return ret; +} + +static int mmap_pioavailregs(struct vm_area_struct *vma, + struct ipath_portdata *pd) +{ + struct ipath_devdata *dd = pd->port_dd; + int ret; + + /* + * when we map the PIO bufferavail registers, we want to map them as + * readonly, no write possible. + * + * kmalloc'ed memory, physically contiguous, one page only, readonly + */ + + if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { + dev_info(&dd->pcidev->dev, "FAIL on pioavailregs_dma: " + "reqlen %lx > actual %lx\n", + vma->vm_end - vma->vm_start, + (unsigned long) PAGE_SIZE); + ret = -EFAULT; + goto bail; + } + + if (vma->vm_flags & VM_WRITE) { + dev_info(&dd->pcidev->dev, + "Can't map pioavailregs as writable (flags=%lx)\n", + vma->vm_flags); + ret = -EPERM; + goto bail; + } + + /* don't allow them to later change with mprotect */ + vma->vm_flags &= ~VM_MAYWRITE; + + ret = remap_pfn_range(vma, vma->vm_start, + dd->ipath_pioavailregs_phys >> PAGE_SHIFT, + PAGE_SIZE, vma->vm_page_prot); +bail: + return ret; +} + /** * ipath_mmap - mmap various structures into user space * @fp: the file pointer @@ -1067,7 +1149,6 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma) pd = port_fp(fp); dd = pd->port_dd; - /* * This is the ipath_do_user_init() code, mapping the shared buffers * into the user process. The address referred to by vm_pgoff is the @@ -1077,59 +1158,28 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma) pgaddr = vma->vm_pgoff << PAGE_SHIFT; /* - * Must fit in 40 bits for our hardware; some checked elsewhere, - * but we'll be paranoid. Check for 0 is mostly in case one of the - * allocations failed, but user called mmap anyway. We want to catch - * that before it can match. + * note that ureg does *NOT* have the kregvirt as part of it, to be + * sure that for 32 bit programs, we don't end up trying to map a > + * 44 address. Has to match ipath_get_base_info() code that sets + * __spi_uregbase */ - if (!pgaddr || pgaddr >= (1ULL<<40)) { - ipath_dev_err(dd, "Bad phys addr %llx, start %lx, end %lx\n", - (unsigned long long)pgaddr, vma->vm_start, vma->vm_end); - return -EINVAL; - } - /* just the offset of the port user registers, not physical addr */ ureg = dd->ipath_uregbase + dd->ipath_palign * pd->port_port; ipath_cdbg(MM, "ushare: pgaddr %llx vm_start=%lx, vmlen %lx\n", (unsigned long long) pgaddr, vma->vm_start, vma->vm_end - vma->vm_start); - if (vma->vm_start & (PAGE_SIZE-1)) { - ipath_dev_err(dd, - "vm_start not aligned: %lx, end=%lx phys %lx\n", - vma->vm_start, vma->vm_end, (unsigned long)pgaddr); - ret = -EINVAL; - } - else if (pgaddr == ureg) + if (pgaddr == ureg) ret = mmap_ureg(vma, dd, ureg); else if (pgaddr == pd->port_piobufs) ret = mmap_piobufs(vma, dd, pd); else if (pgaddr == (u64) pd->port_rcvegr_phys) ret = mmap_rcvegrbufs(vma, pd); - else if (pgaddr == (u64) pd->port_rcvhdrq_phys) { - /* - * The rcvhdrq itself; readonly except on HT-400 (so have - * to allow writable mapping), multiple pages, contiguous - * from an i/o perspective. - */ - unsigned total_size = - ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize - * sizeof(u32), PAGE_SIZE); - ret = ipath_mmap_mem(vma, pd, total_size, 1, - pd->port_rcvhdrq_phys, - "rcvhdrq"); - } - else if (pgaddr == (u64)pd->port_rcvhdrqtailaddr_phys) - /* in-memory copy of rcvhdrq tail register */ - ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0, - pd->port_rcvhdrqtailaddr_phys, - "rcvhdrq tail"); + else if (pgaddr == (u64) pd->port_rcvhdrq_phys) + ret = mmap_rcvhdrq(vma, pd); else if (pgaddr == dd->ipath_pioavailregs_phys) - /* in-memory copy of pioavail registers */ - ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0, - dd->ipath_pioavailregs_phys, - "pioavail registers"); + ret = mmap_pioavailregs(vma, pd); else ret = -EINVAL; @@ -1392,16 +1442,16 @@ done: static int ipath_open(struct inode *in, struct file *fp) { - int ret, user_minor; + int ret, minor; mutex_lock(&ipath_mutex); - user_minor = iminor(in) - IPATH_USER_MINOR_BASE; + minor = iminor(in); ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", - (long)in->i_rdev, user_minor); + (long)in->i_rdev, minor); - if (user_minor) - ret = find_free_port(user_minor - 1, fp); + if (minor) + ret = find_free_port(minor - 1, fp); else ret = find_best_unit(fp); @@ -1486,54 +1536,53 @@ static int ipath_close(struct inode *in, struct file *fp) } if (dd->ipath_kregbase) { - int i; - /* atomically clear receive enable port. */ - clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, - &dd->ipath_rcvctrl); - ipath_write_kreg( dd, dd->ipath_kregs->kr_rcvctrl, - dd->ipath_rcvctrl); - /* and read back from chip to be sure that nothing - * else is in flight when we do the rest */ - (void)ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); + if (pd->port_rcvhdrtail_uaddr) { + pd->port_rcvhdrtail_uaddr = 0; + pd->port_rcvhdrtail_kvaddr = NULL; + ipath_release_user_pages_on_close( + &pd->port_rcvhdrtail_pagep, 1); + pd->port_rcvhdrtail_pagep = NULL; + ipath_stats.sps_pageunlocks++; + } + ipath_write_kreg_port( + dd, dd->ipath_kregs->kr_rcvhdrtailaddr, + port, 0ULL); + ipath_write_kreg_port( + dd, dd->ipath_kregs->kr_rcvhdraddr, + pd->port_port, 0); /* clean up the pkeys for this port user */ ipath_clean_part_key(pd, dd); + if (port < dd->ipath_cfgports) { + int i = dd->ipath_pbufsport * (port - 1); + ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport); - /* - * be paranoid, and never write 0's to these, just use an - * unused part of the port 0 tail page. Of course, - * rcvhdraddr points to a large chunk of memory, so this - * could still trash things, but at least it won't trash - * page 0, and by disabling the port, it should stop "soon", - * even if a packet or two is in already in flight after we - * disabled the port. - */ - ipath_write_kreg_port(dd, - dd->ipath_kregs->kr_rcvhdrtailaddr, port, - dd->ipath_dummy_hdrq_phys); - ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, - pd->port_port, dd->ipath_dummy_hdrq_phys); - - i = dd->ipath_pbufsport * (port - 1); - ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport); - - if (dd->ipath_pageshadow) - unlock_expected_tids(pd); - ipath_stats.sps_ports--; - ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n", - pd->port_comm, pd->port_pid, - dd->ipath_unit, port); - - dd->ipath_f_clear_tids(dd, pd->port_port); + /* atomically clear receive enable port. */ + clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, + &dd->ipath_rcvctrl); + ipath_write_kreg( + dd, + dd->ipath_kregs->kr_rcvctrl, + dd->ipath_rcvctrl); + + if (dd->ipath_pageshadow) + unlock_expected_tids(pd); + ipath_stats.sps_ports--; + ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n", + pd->port_comm, pd->port_pid, + dd->ipath_unit, port); + } } pd->port_cnt = 0; pd->port_pid = 0; - dd->ipath_pd[pd->port_port] = NULL; /* before releasing mutex */ + dd->ipath_f_clear_tids(dd, pd->port_port); + + ipath_free_pddata(dd, pd->port_port, 0); + mutex_unlock(&ipath_mutex); - ipath_free_pddata(dd, pd); /* after releasing the mutex */ return ret; } @@ -1810,12 +1859,19 @@ int ipath_user_add(struct ipath_devdata *dd) "error %d\n", -ret); goto bail; } + ret = ipath_diag_init(); + if (ret < 0) { + ipath_dev_err(dd, "Unable to set up diag support: " + "error %d\n", -ret); + goto bail_sma; + } + ret = init_cdev(0, "ipath", &ipath_file_ops, &wildcard_cdev, &wildcard_class_dev); if (ret < 0) { ipath_dev_err(dd, "Could not create wildcard " "minor: error %d\n", -ret); - goto bail_sma; + goto bail_diag; } atomic_set(&user_setup, 1); @@ -1824,28 +1880,31 @@ int ipath_user_add(struct ipath_devdata *dd) snprintf(name, sizeof(name), "ipath%d", dd->ipath_unit); ret = init_cdev(dd->ipath_unit + 1, name, &ipath_file_ops, - &dd->user_cdev, &dd->user_class_dev); + &dd->cdev, &dd->class_dev); if (ret < 0) ipath_dev_err(dd, "Could not create user minor %d, %s\n", dd->ipath_unit + 1, name); goto bail; +bail_diag: + ipath_diag_cleanup(); bail_sma: user_cleanup(); bail: return ret; } -void ipath_user_remove(struct ipath_devdata *dd) +void ipath_user_del(struct ipath_devdata *dd) { - cleanup_cdev(&dd->user_cdev, &dd->user_class_dev); + cleanup_cdev(&dd->cdev, &dd->class_dev); if (atomic_dec_return(&user_count) == 0) { if (atomic_read(&user_setup) == 0) goto bail; cleanup_cdev(&wildcard_cdev, &wildcard_class_dev); + ipath_diag_cleanup(); user_cleanup(); atomic_set(&user_setup, 0); @@ -1853,4 +1912,3 @@ void ipath_user_remove(struct ipath_devdata *dd) bail: return; } - diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index ebbaf9cfc..e27412056 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -32,6 +31,7 @@ */ #include +#include #include #include #include @@ -61,9 +61,10 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, inode->i_mode = mode; inode->i_uid = 0; inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_private = data; + inode->u.generic_ip = data; if ((mode & S_IFMT) == S_IFDIR) { inode->i_op = &simple_dir_inode_operations; inode->i_nlink++; @@ -118,7 +119,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf, u16 i; struct ipath_devdata *dd; - dd = file->f_dentry->d_inode->i_private; + dd = file->f_dentry->d_inode->u.generic_ip; for (i = 0; i < NUM_COUNTERS; i++) counters[i] = ipath_snap_cntr(dd, i); @@ -138,7 +139,7 @@ static ssize_t atomic_node_info_read(struct file *file, char __user *buf, struct ipath_devdata *dd; u64 guid; - dd = file->f_dentry->d_inode->i_private; + dd = file->f_dentry->d_inode->u.generic_ip; guid = be64_to_cpu(dd->ipath_guid); @@ -177,7 +178,7 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf, u32 tmp, tmp2; struct ipath_devdata *dd; - dd = file->f_dentry->d_inode->i_private; + dd = file->f_dentry->d_inode->u.generic_ip; /* so we only initialize non-zero fields. */ memset(portinfo, 0, sizeof portinfo); @@ -324,7 +325,7 @@ static ssize_t flash_read(struct file *file, char __user *buf, goto bail; } - dd = file->f_dentry->d_inode->i_private; + dd = file->f_dentry->d_inode->u.generic_ip; if (ipath_eeprom_read(dd, pos, tmp, count)) { ipath_dev_err(dd, "failed to read from flash\n"); ret = -ENXIO; @@ -380,7 +381,7 @@ static ssize_t flash_write(struct file *file, const char __user *buf, goto bail_tmp; } - dd = file->f_dentry->d_inode->i_private; + dd = file->f_dentry->d_inode->u.generic_ip; if (ipath_eeprom_write(dd, pos, tmp, count)) { ret = -ENXIO; ipath_dev_err(dd, "failed to write to flash\n"); @@ -541,14 +542,13 @@ bail: return ret; } -static int ipathfs_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ipathfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - int ret = get_sb_single(fs_type, flags, data, - ipathfs_fill_super, mnt); - if (ret >= 0) - ipath_super = mnt->mnt_sb; - return ret; + ipath_super = get_sb_single(fs_type, flags, data, + ipathfs_fill_super); + return ipath_super; } static void ipathfs_kill_super(struct super_block *s) diff --git a/drivers/infiniband/hw/ipath/ipath_ht400.c b/drivers/infiniband/hw/ipath/ipath_ht400.c index 3db015da6..fac0a2b74 100644 --- a/drivers/infiniband/hw/ipath/ipath_ht400.c +++ b/drivers/infiniband/hw/ipath/ipath_ht400.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -1573,6 +1572,7 @@ void ipath_init_ht400_funcs(struct ipath_devdata *dd) dd->ipath_f_reset = ipath_setup_ht_reset; dd->ipath_f_get_boardname = ipath_ht_boardname; dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; + dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; dd->ipath_f_early_init = ipath_ht_early_init; dd->ipath_f_handle_hwerrors = ipath_ht_handle_hwerrors; dd->ipath_f_quiet_serdes = ipath_ht_quiet_serdes; diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 414cdd1d8..dc83250d2 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -36,7 +35,7 @@ #include #include "ipath_kernel.h" -#include "ipath_common.h" +#include "ips_common.h" /* * min buffers we want to have per port, after driver @@ -115,7 +114,6 @@ static int create_port0_egr(struct ipath_devdata *dd) "eager TID %u\n", e); while (e != 0) dev_kfree_skb(skbs[--e]); - vfree(skbs); ret = -ENOMEM; goto bail; } @@ -277,7 +275,7 @@ static int init_chip_first(struct ipath_devdata *dd, pd->port_port = 0; pd->port_cnt = 1; /* The port 0 pkey table is used by the layer interface. */ - pd->port_pkeys[0] = IPATH_DEFAULT_P_KEY; + pd->port_pkeys[0] = IPS_DEFAULT_P_KEY; dd->ipath_rcvtidcnt = ipath_read_kreg32(dd, dd->ipath_kregs->kr_rcvtidcnt); dd->ipath_rcvtidbase = @@ -411,8 +409,17 @@ static int init_pioavailregs(struct ipath_devdata *dd) /* and its length */ dd->ipath_freezelen = L1_CACHE_BYTES - sizeof(dd->ipath_statusp[0]); - ret = 0; + if (dd->ipath_unit * 64 > (IPATH_PORT0_RCVHDRTAIL_SIZE - 64)) { + ipath_dev_err(dd, "unit %u too large for port 0 " + "rcvhdrtail buffer size\n", dd->ipath_unit); + ret = -ENODEV; + } + else + ret = 0; + /* so we can get current tail in ipath_kreceive(), per chip */ + dd->ipath_hdrqtailptr = &ipath_port0_rcvhdrtail[ + dd->ipath_unit * (64 / sizeof(*ipath_port0_rcvhdrtail))]; done: return ret; } @@ -645,9 +652,8 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) { int ret = 0, i; u32 val32, kpiobufs; - u64 val; + u64 val, atmp; struct ipath_portdata *pd = NULL; /* keep gcc4 happy */ - gfp_t gfp_flags = GFP_USER | __GFP_COMP; ret = init_housekeeping(dd, &pd, reinit); if (ret) @@ -769,6 +775,24 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) goto done; } + val = ipath_port0_rcvhdrtail_dma + dd->ipath_unit * 64; + + /* verify that the alignment requirement was met */ + ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, + 0, val); + atmp = ipath_read_kreg64_port( + dd, dd->ipath_kregs->kr_rcvhdrtailaddr, 0); + if (val != atmp) { + ipath_dev_err(dd, "Catastrophic software error, " + "RcvHdrTailAddr0 written as %llx, " + "read back as %llx from %x\n", + (unsigned long long) val, + (unsigned long long) atmp, + dd->ipath_kregs->kr_rcvhdrtailaddr); + ret = -EINVAL; + goto done; + } + ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvbthqp, IPATH_KD_QP); /* @@ -812,45 +836,25 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) /* clear any interrups up to this point (ints still not enabled) */ ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, -1LL); + ipath_stats.sps_lid[dd->ipath_unit] = dd->ipath_lid; + /* * Set up the port 0 (kernel) rcvhdr q and egr TIDs. If doing * re-init, the simplest way to handle this is to free * existing, and re-allocate. */ - if (reinit) { - struct ipath_portdata *pd = dd->ipath_pd[0]; - dd->ipath_pd[0] = NULL; - ipath_free_pddata(dd, pd); - } + if (reinit) + ipath_free_pddata(dd, 0, 0); dd->ipath_f_tidtemplate(dd); ret = ipath_create_rcvhdrq(dd, pd); - if (!ret) { - dd->ipath_hdrqtailptr = - (volatile __le64 *)pd->port_rcvhdrtail_kvaddr; + if (!ret) ret = create_port0_egr(dd); - } if (ret) ipath_dev_err(dd, "failed to allocate port 0 (kernel) " "rcvhdrq and/or egr bufs\n"); else enable_chip(dd, pd, reinit); - - if (!ret && !reinit) { - /* used when we close a port, for DMA already in flight at close */ - dd->ipath_dummy_hdrq = dma_alloc_coherent( - &dd->pcidev->dev, pd->port_rcvhdrq_size, - &dd->ipath_dummy_hdrq_phys, - gfp_flags); - if (!dd->ipath_dummy_hdrq ) { - dev_info(&dd->pcidev->dev, - "Couldn't allocate 0x%lx bytes for dummy hdrq\n", - pd->port_rcvhdrq_size); - /* fallback to just 0'ing */ - dd->ipath_dummy_hdrq_phys = 0UL; - } - } - /* * cause retrigger of pending interrupts ignored during init, * even if we had errors diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 280e73266..3e72a1fe3 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -34,10 +33,9 @@ #include #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" -/* These are all rcv-related errors which we want to count for stats */ #define E_SUM_PKTERRS \ (INFINIPATH_E_RHDRLEN | INFINIPATH_E_RBADTID | \ INFINIPATH_E_RBADVERSION | INFINIPATH_E_RHDR | \ @@ -46,7 +44,6 @@ INFINIPATH_E_RFORMATERR | INFINIPATH_E_RUNSUPVL | \ INFINIPATH_E_RUNEXPCHAR | INFINIPATH_E_REBP) -/* These are all send-related errors which we want to count for stats */ #define E_SUM_ERRS \ (INFINIPATH_E_SPIOARMLAUNCH | INFINIPATH_E_SUNEXPERRPKTNUM | \ INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ @@ -54,18 +51,6 @@ INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ INFINIPATH_E_INVALIDADDR) -/* - * these are errors that can occur when the link changes state while - * a packet is being sent or received. This doesn't cover things - * like EBP or VCRC that can be the result of a sending having the - * link change state, so we receive a "known bad" packet. - */ -#define E_SUM_LINK_PKTERRS \ - (INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ - INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ - INFINIPATH_E_RSHORTPKTLEN | INFINIPATH_E_RMINPKTLEN | \ - INFINIPATH_E_RUNEXPCHAR) - static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) { unsigned long sbuf[4]; @@ -115,7 +100,9 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) if (ipath_debug & __IPATH_PKTDBG) printk("\n"); } - if ((errs & E_SUM_LINK_PKTERRS) && + if ((errs & (INFINIPATH_E_SDROPPEDDATAPKT | + INFINIPATH_E_SDROPPEDSMPPKT | + INFINIPATH_E_SMINPKTLEN)) && !(dd->ipath_flags & IPATH_LINKACTIVE)) { /* * This can happen when SMA is trying to bring the link @@ -124,9 +111,11 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) * valid. We don't want to confuse people, so we just * don't print them, except at debug */ - ipath_dbg("Ignoring packet errors %llx, because link not " - "ACTIVE\n", (unsigned long long) errs); - ignore_this_time = errs & E_SUM_LINK_PKTERRS; + ipath_dbg("Ignoring pktsend errors %llx, because not " + "yet active\n", (unsigned long long) errs); + ignore_this_time = INFINIPATH_E_SDROPPEDDATAPKT | + INFINIPATH_E_SDROPPEDSMPPKT | + INFINIPATH_E_SMINPKTLEN; } return ignore_this_time; @@ -167,29 +156,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, */ val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_ibcstatus); lstate = val & IPATH_IBSTATE_MASK; - - /* - * this is confusing enough when it happens that I want to always put it - * on the console and in the logs. If it was a requested state change, - * we'll have already cleared the flags, so we won't print this warning - */ - if ((lstate != IPATH_IBSTATE_ARM && lstate != IPATH_IBSTATE_ACTIVE) - && (dd->ipath_flags & (IPATH_LINKARMED | IPATH_LINKACTIVE))) { - dev_info(&dd->pcidev->dev, "Link state changed from %s to %s\n", - (dd->ipath_flags & IPATH_LINKARMED) ? "ARM" : "ACTIVE", - ib_linkstate(lstate)); - /* - * Flush all queued sends when link went to DOWN or INIT, - * to be sure that they don't block SMA and other MAD packets - */ - ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, - INFINIPATH_S_ABORT); - ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf, - (unsigned)(dd->ipath_piobcnt2k + - dd->ipath_piobcnt4k) - - dd->ipath_lastport_piobuf); - } - else if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM || + if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM || lstate == IPATH_IBSTATE_ACTIVE) { /* * only print at SMA if there is a change, debug if not @@ -262,7 +229,6 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, | IPATH_LINKACTIVE | IPATH_LINKARMED); *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY; - dd->ipath_lli_counter = 0; if (!noprint) { if (((dd->ipath_lastibcstat >> INFINIPATH_IBCS_LINKSTATE_SHIFT) & @@ -384,7 +350,7 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd, return supp_msgs; } -static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) +static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) { char msg[512]; u64 ignore_this_time = 0; @@ -413,19 +379,6 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) if (errs & E_SUM_ERRS) ignore_this_time = handle_e_sum_errs(dd, errs); - else if ((errs & E_SUM_LINK_PKTERRS) && - !(dd->ipath_flags & IPATH_LINKACTIVE)) { - /* - * This can happen when SMA is trying to bring the link - * up, but the IB link changes state at the "wrong" time. - * The IB logic then complains that the packet isn't - * valid. We don't want to confuse people, so we just - * don't print them, except at debug - */ - ipath_dbg("Ignoring packet errors %llx, because link not " - "ACTIVE\n", (unsigned long long) errs); - ignore_this_time = errs & E_SUM_LINK_PKTERRS; - } if (supp_msgs == 250000) { /* @@ -444,7 +397,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) & ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) ipath_dev_err(dd, "Disabling error(s) %llx because " - "occurring too frequently (%s)\n", + "occuring too frequently (%s)\n", (unsigned long long) (dd->ipath_maskederrs & ~dd->ipath_ignorederrs), msg); @@ -481,7 +434,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) INFINIPATH_E_IBSTATUSCHANGED); } if (!errs) - return 0; + return; if (!noprint) /* @@ -540,10 +493,10 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) continue; if (hd == (tl + 1) || (!hd && tl == dd->ipath_hdrqlast)) { - if (i == 0) - chkerrpkts = 1; dd->ipath_lastrcvhdrqtails[i] = tl; pd->port_hdrqfull++; + if (i == 0) + chkerrpkts = 1; } } } @@ -605,7 +558,9 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) wake_up_interruptible(&ipath_sma_state_wait); } - return chkerrpkts; + if (chkerrpkts) + /* process possible error packets in hdrq */ + ipath_kreceive(dd); } /* this is separate to allow for better optimization of ipath_intr() */ @@ -723,12 +678,7 @@ set: dd->ipath_sendctrl); } -/* - * Handle receive interrupts for user ports; this means a user - * process was waiting for a packet to arrive, and didn't want - * to poll - */ -static void handle_urcv(struct ipath_devdata *dd, u32 istat) +static void handle_rcv(struct ipath_devdata *dd, u32 istat) { u64 portr; int i; @@ -738,17 +688,22 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat) infinipath_i_rcvavail_mask) | ((istat >> INFINIPATH_I_RCVURG_SHIFT) & infinipath_i_rcvurg_mask); - for (i = 1; i < dd->ipath_cfgports; i++) { + for (i = 0; i < dd->ipath_cfgports; i++) { struct ipath_portdata *pd = dd->ipath_pd[i]; - if (portr & (1 << i) && pd && pd->port_cnt && - test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) { - int rcbit; - clear_bit(IPATH_PORT_WAITING_RCV, - &pd->port_flag); - rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT; - clear_bit(1UL << rcbit, &dd->ipath_rcvctrl); - wake_up_interruptible(&pd->port_wait); - rcvdint = 1; + if (portr & (1 << i) && pd && + pd->port_cnt) { + if (i == 0) + ipath_kreceive(dd); + else if (test_bit(IPATH_PORT_WAITING_RCV, + &pd->port_flag)) { + int rcbit; + clear_bit(IPATH_PORT_WAITING_RCV, + &pd->port_flag); + rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT; + clear_bit(1UL << rcbit, &dd->ipath_rcvctrl); + wake_up_interruptible(&pd->port_wait); + rcvdint = 1; + } } } if (rcvdint) { @@ -764,19 +719,16 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat) irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) { struct ipath_devdata *dd = data; - u32 istat, chk0rcv = 0; + u32 istat; ipath_err_t estat = 0; - irqreturn_t ret; - u32 oldhead, curtail; static unsigned unexpected = 0; - static const u32 port0rbits = (1U<ipath_flags & IPATH_PRESENT)) { + if(!(dd->ipath_flags & IPATH_PRESENT)) { + /* this is mostly so we don't try to touch the chip while + * it is being reset */ /* - * This return value is not great, but we do not want the + * This return value is perhaps odd, but we do not want the * interrupt core code to remove our interrupt handler * because we don't appear to be handling an interrupt * during a chip reset. @@ -784,51 +736,7 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) return IRQ_HANDLED; } - /* - * this needs to be flags&initted, not statusp, so we keep - * taking interrupts even after link goes down, etc. - * Also, we *must* clear the interrupt at some point, or we won't - * take it again, which can be real bad for errors, etc... - */ - - if (!(dd->ipath_flags & IPATH_INITTED)) { - ipath_bad_intr(dd, &unexpected); - ret = IRQ_NONE; - goto bail; - } - - /* - * We try to avoid reading the interrupt status register, since - * that's a PIO read, and stalls the processor for up to about - * ~0.25 usec. The idea is that if we processed a port0 packet, - * we blindly clear the port 0 receive interrupt bits, and nothing - * else, then return. If other interrupts are pending, the chip - * will re-interrupt us as soon as we write the intclear register. - * We then won't process any more kernel packets (if not the 2nd - * time, then the 3rd or 4th) and we'll then handle the other - * interrupts. We clear the interrupts first so that we don't - * lose intr for later packets that arrive while we are processing. - */ - oldhead = dd->ipath_port0head; - curtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); - if (oldhead != curtail) { - if (dd->ipath_flags & IPATH_GPIO_INTR) { - ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, - (u64) (1 << 2)); - istat = port0rbits | INFINIPATH_I_GPIO; - } - else - istat = port0rbits; - ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); - ipath_kreceive(dd); - if (oldhead != dd->ipath_port0head) { - ipath_stats.sps_fastrcvint++; - goto done; - } - } - istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); - if (unlikely(!istat)) { ipath_stats.sps_nullintr++; ret = IRQ_NONE; /* not our interrupt, or already handled */ @@ -841,17 +749,31 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) goto bail; } + ipath_stats.sps_ints++; + + /* + * this needs to be flags&initted, not statusp, so we keep + * taking interrupts even after link goes down, etc. + * Also, we *must* clear the interrupt at some point, or we won't + * take it again, which can be real bad for errors, etc... + */ + + if (!(dd->ipath_flags & IPATH_INITTED)) { + ipath_bad_intr(dd, &unexpected); + ret = IRQ_NONE; + goto bail; + } if (unexpected) unexpected = 0; - if (unlikely(istat & ~infinipath_i_bitsextant)) + ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat); + + if (istat & ~infinipath_i_bitsextant) ipath_dev_err(dd, "interrupt with unknown interrupts %x set\n", istat & (u32) ~ infinipath_i_bitsextant); - else - ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat); - if (unlikely(istat & INFINIPATH_I_ERROR)) { + if (istat & INFINIPATH_I_ERROR) { ipath_stats.sps_errints++; estat = ipath_read_kreg64(dd, dd->ipath_kregs->kr_errorstatus); @@ -866,18 +788,10 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) ipath_dev_err(dd, "Read of error status failed " "(all bits set); ignoring\n"); else - if (handle_errors(dd, estat)) - /* force calling ipath_kreceive() */ - chk0rcv = 1; + handle_errors(dd, estat); } if (istat & INFINIPATH_I_GPIO) { - /* - * Packets are available in the port 0 rcv queue. - * Eventually this needs to be generalized to check - * IPATH_GPIO_INTR, and the specific GPIO bit, if - * GPIO interrupts are used for anything else. - */ if (unlikely(!(dd->ipath_flags & IPATH_GPIO_INTR))) { u32 gpiostatus; gpiostatus = ipath_read_kreg32( @@ -890,39 +804,27 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) else { /* Clear GPIO status bit 2 */ ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, - (u64) (1 << 2)); - chk0rcv = 1; + (u64) (1 << 2)); + + /* + * Packets are available in the port 0 rcv queue. + * Eventually this needs to be generalized to check + * IPATH_GPIO_INTR, and the specific GPIO bit, if + * GPIO interrupts are used for anything else. + */ + ipath_kreceive(dd); } } - chk0rcv |= istat & port0rbits; /* - * Clear the interrupt bits we found set, unless they are receive - * related, in which case we already cleared them above, and don't - * want to clear them again, because we might lose an interrupt. - * Clear it early, so we "know" know the chip will have seen this by - * the time we process the queue, and will re-interrupt if necessary. - * The processor itself won't take the interrupt again until we return. + * clear the ones we will deal with on this round + * We clear it early, mostly for receive interrupts, so we + * know the chip will have seen this by the time we process + * the queue, and will re-interrupt if necessary. The processor + * itself won't take the interrupt again until we return. */ ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); - /* - * handle port0 receive before checking for pio buffers available, - * since receives can overflow; piobuf waiters can afford a few - * extra cycles, since they were waiting anyway, and user's waiting - * for receive are at the bottom. - */ - if (chk0rcv) { - ipath_kreceive(dd); - istat &= ~port0rbits; - } - - if (istat & ((infinipath_i_rcvavail_mask << - INFINIPATH_I_RCVAVAIL_SHIFT) - | (infinipath_i_rcvurg_mask << - INFINIPATH_I_RCVURG_SHIFT))) - handle_urcv(dd, istat); - if (istat & INFINIPATH_I_SPIOBUFAVAIL) { clear_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, @@ -934,7 +836,17 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) handle_layer_pioavail(dd); } -done: + /* + * we check for both transition from empty to non-empty, and urgent + * packets (those with the interrupt bit set in the header) + */ + + if (istat & ((infinipath_i_rcvavail_mask << + INFINIPATH_I_RCVAVAIL_SHIFT) + | (infinipath_i_rcvurg_mask << + INFINIPATH_I_RCVURG_SHIFT))) + handle_rcv(dd, istat); + ret = IRQ_HANDLED; bail: diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index e9f374fb6..5d92d57b6 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h @@ -1,7 +1,6 @@ #ifndef _IPATH_KERNEL_H #define _IPATH_KERNEL_H /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -62,7 +61,9 @@ struct ipath_portdata { /* rcvhdrq base, needs mmap before useful */ void *port_rcvhdrq; /* kernel virtual address where hdrqtail is updated */ - volatile __le64 *port_rcvhdrtail_kvaddr; + u64 *port_rcvhdrtail_kvaddr; + /* page * used for uaddr */ + struct page *port_rcvhdrtail_pagep; /* * temp buffer for expected send setup, allocated at open, instead * of each setup call @@ -77,7 +78,11 @@ struct ipath_portdata { dma_addr_t port_rcvegr_phys; /* mmap of hdrq, must fit in 44 bits */ dma_addr_t port_rcvhdrq_phys; - dma_addr_t port_rcvhdrqtailaddr_phys; + /* + * the actual user address that we ipath_mlock'ed, so we can + * ipath_munlock it at close + */ + unsigned long port_rcvhdrtail_uaddr; /* * number of opens on this instance (0 or 1; ignoring forks, dup, * etc. for now) @@ -152,11 +157,17 @@ struct ipath_devdata { unsigned long ipath_physaddr; /* base of memory alloced for ipath_kregbase, for free */ u64 *ipath_kregalloc; + /* + * version of kregbase that doesn't have high bits set (for 32 bit + * programs, so mmap64 44 bit works) + */ + u64 __iomem *ipath_kregvirt; /* * virtual address where port0 rcvhdrqtail updated for this unit. * only written to by the chip, not the driver. */ volatile __le64 *ipath_hdrqtailptr; + dma_addr_t ipath_dma_addr; /* ipath_cfgports pointers */ struct ipath_portdata **ipath_pd; /* sk_buffs used by port 0 eager receive queue */ @@ -343,17 +354,13 @@ struct ipath_devdata { char *ipath_freezemsg; /* pci access data structure */ struct pci_dev *pcidev; - struct cdev *user_cdev; - struct cdev *diag_cdev; - struct class_device *user_class_dev; - struct class_device *diag_class_dev; + struct cdev *cdev; + struct class_device *class_dev; /* timer used to prevent stats overflow, error throttling, etc. */ struct timer_list ipath_stats_timer; /* check for stale messages in rcv queue */ /* only allow one intr at a time. */ unsigned long ipath_rcv_pending; - void *ipath_dummy_hdrq; /* used after port close */ - dma_addr_t ipath_dummy_hdrq_phys; /* * Shadow copies of registers; size indicates read access size. @@ -493,11 +500,8 @@ struct ipath_devdata { u16 ipath_lid; /* list of pkeys programmed; 0 if not set */ u16 ipath_pkeys[4]; - /* - * ASCII serial number, from flash, large enough for original - * all digit strings, and longer QLogic serial number format - */ - u8 ipath_serial[16]; + /* ASCII serial number, from flash */ + u8 ipath_serial[12]; /* human readable board version */ u8 ipath_boardversion[80]; /* chip major rev, from ipath_revision */ @@ -512,13 +516,13 @@ struct ipath_devdata { u8 ipath_pci_cacheline; /* LID mask control */ u8 ipath_lmc; - - /* local link integrity counter */ - u32 ipath_lli_counter; - /* local link integrity errors */ - u32 ipath_lli_errors; }; +extern volatile __le64 *ipath_port0_rcvhdrtail; +extern dma_addr_t ipath_port0_rcvhdrtail_dma; + +#define IPATH_PORT0_RCVHDRTAIL_SIZE PAGE_SIZE + extern struct list_head ipath_dev_list; extern spinlock_t ipath_devs_lock; extern struct ipath_devdata *ipath_lookup(int unit); @@ -533,7 +537,7 @@ extern int __ipath_verbs_piobufavail(struct ipath_devdata *); extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); void ipath_layer_add(struct ipath_devdata *); -void ipath_layer_remove(struct ipath_devdata *); +void ipath_layer_del(struct ipath_devdata *); int ipath_init_chip(struct ipath_devdata *, int); int ipath_enable_wc(struct ipath_devdata *dd); @@ -547,14 +551,14 @@ int ipath_cdev_init(int minor, char *name, struct file_operations *fops, void ipath_cdev_cleanup(struct cdev **cdevp, struct class_device **class_devp); -int ipath_diag_add(struct ipath_devdata *); -void ipath_diag_remove(struct ipath_devdata *); +int ipath_diag_init(void); +void ipath_diag_cleanup(void); void ipath_diag_bringup_link(struct ipath_devdata *); extern wait_queue_head_t ipath_sma_state_wait; int ipath_user_add(struct ipath_devdata *dd); -void ipath_user_remove(struct ipath_devdata *dd); +void ipath_user_del(struct ipath_devdata *dd); struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); @@ -578,7 +582,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *, unsigned first, unsigned cnt); int ipath_create_rcvhdrq(struct ipath_devdata *, struct ipath_portdata *); -void ipath_free_pddata(struct ipath_devdata *, struct ipath_portdata *); +void ipath_free_pddata(struct ipath_devdata *, u32, int); int ipath_parse_ushort(const char *str, unsigned short *valp); @@ -716,8 +720,13 @@ u64 ipath_read_kreg64_port(const struct ipath_devdata *, ipath_kreg, * @port: port number * * Return the contents of a register that is virtualized to be per port. - * Returns -1 on errors (not distinguishable from valid contents at - * runtime; we may add a separate error variable at some point). + * Prints a debug message and returns -1 on errors (not distinguishable from + * valid contents at runtime; we may add a separate error variable at some + * point). + * + * This is normally not used by the kernel, but may be for debugging, and + * has a different implementation than user mode, which is why it's not in + * _common.h. */ static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, ipath_ureg regno, int port) @@ -833,10 +842,9 @@ extern struct mutex ipath_mutex; #define IPATH_DRV_NAME "ipath_core" #define IPATH_MAJOR 233 -#define IPATH_USER_MINOR_BASE 0 #define IPATH_SMA_MINOR 128 -#define IPATH_DIAG_MINOR_BASE 129 -#define IPATH_NMINORS 255 +#define IPATH_DIAG_MINOR 129 +#define IPATH_NMINORS 130 #define ipath_dev_err(dd,fmt,...) \ do { \ diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c index a5ca27937..5ae8761f9 100644 --- a/drivers/infiniband/hw/ipath/ipath_keys.c +++ b/drivers/infiniband/hw/ipath/ipath_keys.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -121,7 +120,6 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge, struct ib_sge *sge, int acc) { struct ipath_mregion *mr; - unsigned n, m; size_t off; int ret; @@ -153,22 +151,20 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge, } off += mr->offset; - m = 0; - n = 0; - while (off >= mr->map[m]->segs[n].length) { - off -= mr->map[m]->segs[n].length; - n++; - if (n >= IPATH_SEGSZ) { - m++; - n = 0; + isge->mr = mr; + isge->m = 0; + isge->n = 0; + while (off >= mr->map[isge->m]->segs[isge->n].length) { + off -= mr->map[isge->m]->segs[isge->n].length; + isge->n++; + if (isge->n >= IPATH_SEGSZ) { + isge->m++; + isge->n = 0; } } - isge->mr = mr; - isge->vaddr = mr->map[m]->segs[n].vaddr + off; - isge->length = mr->map[m]->segs[n].length - off; + isge->vaddr = mr->map[isge->m]->segs[isge->n].vaddr + off; + isge->length = mr->map[isge->m]->segs[isge->n].length - off; isge->sge_length = sge->length; - isge->m = m; - isge->n = n; ret = 1; @@ -193,25 +189,9 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, struct ipath_lkey_table *rkt = &dev->lk_table; struct ipath_sge *sge = &ss->sge; struct ipath_mregion *mr; - unsigned n, m; size_t off; int ret; - /* - * We use RKEY == zero for physical addresses - * (see ipath_get_dma_mr). - */ - if (rkey == 0) { - sge->mr = NULL; - sge->vaddr = phys_to_virt(vaddr); - sge->length = len; - sge->sge_length = len; - ss->sg_list = NULL; - ss->num_sge = 1; - ret = 1; - goto bail; - } - mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))]; if (unlikely(mr == NULL || mr->lkey != rkey)) { ret = 0; @@ -226,22 +206,20 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, } off += mr->offset; - m = 0; - n = 0; - while (off >= mr->map[m]->segs[n].length) { - off -= mr->map[m]->segs[n].length; - n++; - if (n >= IPATH_SEGSZ) { - m++; - n = 0; + sge->mr = mr; + sge->m = 0; + sge->n = 0; + while (off >= mr->map[sge->m]->segs[sge->n].length) { + off -= mr->map[sge->m]->segs[sge->n].length; + sge->n++; + if (sge->n >= IPATH_SEGSZ) { + sge->m++; + sge->n = 0; } } - sge->mr = mr; - sge->vaddr = mr->map[m]->segs[n].vaddr + off; - sge->length = mr->map[m]->segs[n].length - off; + sge->vaddr = mr->map[sge->m]->segs[sge->n].vaddr + off; + sge->length = mr->map[sge->m]->segs[sge->n].length - off; sge->sge_length = len; - sge->m = m; - sge->n = n; ss->sg_list = NULL; ss->num_sge = 1; diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c index b28c6f81c..9ec4ac77b 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.c +++ b/drivers/infiniband/hw/ipath/ipath_layer.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -41,8 +40,8 @@ #include #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" /* Acquire before ipath_devs_lock. */ static DEFINE_MUTEX(ipath_layer_mutex); @@ -300,8 +299,9 @@ bail: EXPORT_SYMBOL_GPL(ipath_layer_set_mtu); -int ipath_set_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) +int ipath_set_sps_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) { + ipath_stats.sps_lid[dd->ipath_unit] = arg; dd->ipath_lid = arg; dd->ipath_lmc = lmc; @@ -315,7 +315,7 @@ int ipath_set_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) return 0; } -EXPORT_SYMBOL_GPL(ipath_set_lid); +EXPORT_SYMBOL_GPL(ipath_set_sps_lid); int ipath_layer_set_guid(struct ipath_devdata *dd, __be64 guid) { @@ -340,26 +340,18 @@ u32 ipath_layer_get_nguid(struct ipath_devdata *dd) EXPORT_SYMBOL_GPL(ipath_layer_get_nguid); -u32 ipath_layer_get_majrev(struct ipath_devdata *dd) +int ipath_layer_query_device(struct ipath_devdata *dd, u32 * vendor, + u32 * boardrev, u32 * majrev, u32 * minrev) { - return dd->ipath_majrev; -} - -EXPORT_SYMBOL_GPL(ipath_layer_get_majrev); + *vendor = dd->ipath_vendorid; + *boardrev = dd->ipath_boardrev; + *majrev = dd->ipath_majrev; + *minrev = dd->ipath_minrev; -u32 ipath_layer_get_minrev(struct ipath_devdata *dd) -{ - return dd->ipath_minrev; -} - -EXPORT_SYMBOL_GPL(ipath_layer_get_minrev); - -u32 ipath_layer_get_pcirev(struct ipath_devdata *dd) -{ - return dd->ipath_pcirev; + return 0; } -EXPORT_SYMBOL_GPL(ipath_layer_get_pcirev); +EXPORT_SYMBOL_GPL(ipath_layer_query_device); u32 ipath_layer_get_flags(struct ipath_devdata *dd) { @@ -382,13 +374,6 @@ u16 ipath_layer_get_deviceid(struct ipath_devdata *dd) EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid); -u32 ipath_layer_get_vendorid(struct ipath_devdata *dd) -{ - return dd->ipath_vendorid; -} - -EXPORT_SYMBOL_GPL(ipath_layer_get_vendorid); - u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd) { return dd->ipath_lastibcstat; @@ -418,7 +403,7 @@ void ipath_layer_add(struct ipath_devdata *dd) mutex_unlock(&ipath_layer_mutex); } -void ipath_layer_remove(struct ipath_devdata *dd) +void ipath_layer_del(struct ipath_devdata *dd) { mutex_lock(&ipath_layer_mutex); @@ -622,7 +607,7 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax) goto bail; } - ret = ipath_setrcvhdrsize(dd, IPATH_HEADER_QUEUE_WORDS); + ret = ipath_setrcvhdrsize(dd, NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE); if (ret < 0) goto bail; @@ -631,9 +616,9 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax) if (*dd->ipath_statusp & IPATH_STATUS_IB_READY) intval |= IPATH_LAYER_INT_IF_UP; - if (dd->ipath_lid) + if (ipath_stats.sps_lid[dd->ipath_unit]) intval |= IPATH_LAYER_INT_LID; - if (dd->ipath_mlid) + if (ipath_stats.sps_mlid[dd->ipath_unit]) intval |= IPATH_LAYER_INT_BCAST; /* * do this on open, in case low level is already up and @@ -899,7 +884,7 @@ static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss, /** * ipath_verbs_send - send a packet from the verbs layer * @dd: the infinipath device - * @hdrwords: the number of words in the header + * @hdrwords: the number of works in the header * @hdr: the packet header * @len: the length of the packet in bytes * @ss: the SGE to send @@ -1031,22 +1016,19 @@ int ipath_layer_get_counters(struct ipath_devdata *dd, ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt); cntrs->link_error_recovery_counter = ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt); - /* - * The link downed counter counts when the other side downs the - * connection. We add in the number of times we downed the link - * due to local link integrity errors to compensate. - */ cntrs->link_downed_counter = ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt); cntrs->port_rcv_errors = ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) + + ipath_snap_cntr(dd, dd->ipath_cregs->cr_errrcvflowctrlcnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) + + ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlinkcnt) + ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt); cntrs->port_rcv_remphys_errors = ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt); @@ -1060,8 +1042,6 @@ int ipath_layer_get_counters(struct ipath_devdata *dd, ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); cntrs->port_rcv_packets = ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); - cntrs->local_link_integrity_errors = dd->ipath_lli_errors; - cntrs->excessive_buffer_overrun_errors = 0; /* XXX */ ret = 0; @@ -1106,10 +1086,10 @@ int ipath_layer_send_hdr(struct ipath_devdata *dd, struct ether_header *hdr) } vlsllnh = *((__be16 *) hdr); - if (vlsllnh != htons(IPATH_LRH_BTH)) { + if (vlsllnh != htons(IPS_LRH_BTH)) { ipath_dbg("Warning: lrh[0] wrong (%x, not %x); " "not sending\n", be16_to_cpu(vlsllnh), - IPATH_LRH_BTH); + IPS_LRH_BTH); ret = -EINVAL; } if (ret) diff --git a/drivers/infiniband/hw/ipath/ipath_layer.h b/drivers/infiniband/hw/ipath/ipath_layer.h index 71485096f..6fefd15bd 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.h +++ b/drivers/infiniband/hw/ipath/ipath_layer.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -55,8 +54,6 @@ struct ipath_layer_counters { u64 port_rcv_data; u64 port_xmit_packets; u64 port_rcv_packets; - u32 local_link_integrity_errors; - u32 excessive_buffer_overrun_errors; }; /* @@ -129,7 +126,7 @@ u16 ipath_layer_get_bcast(struct ipath_devdata *dd); u32 ipath_layer_get_cr_errpkey(struct ipath_devdata *dd); int ipath_layer_set_linkstate(struct ipath_devdata *dd, u8 state); int ipath_layer_set_mtu(struct ipath_devdata *, u16); -int ipath_set_lid(struct ipath_devdata *, u32, u8); +int ipath_set_sps_lid(struct ipath_devdata *, u32, u8); int ipath_layer_send_hdr(struct ipath_devdata *dd, struct ether_header *hdr); int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, @@ -146,13 +143,11 @@ int ipath_layer_want_buffer(struct ipath_devdata *dd); int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid); __be64 ipath_layer_get_guid(struct ipath_devdata *); u32 ipath_layer_get_nguid(struct ipath_devdata *); -u32 ipath_layer_get_majrev(struct ipath_devdata *); -u32 ipath_layer_get_minrev(struct ipath_devdata *); -u32 ipath_layer_get_pcirev(struct ipath_devdata *); +int ipath_layer_query_device(struct ipath_devdata *, u32 * vendor, + u32 * boardrev, u32 * majrev, u32 * minrev); u32 ipath_layer_get_flags(struct ipath_devdata *dd); struct device *ipath_layer_get_device(struct ipath_devdata *dd); u16 ipath_layer_get_deviceid(struct ipath_devdata *dd); -u32 ipath_layer_get_vendorid(struct ipath_devdata *); u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd); u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd); int ipath_layer_enable_timer(struct ipath_devdata *dd); diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index d3402341b..f7f8391fe 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -35,7 +34,7 @@ #include "ipath_kernel.h" #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" #define IB_SMP_UNSUP_VERSION __constant_htons(0x0004) #define IB_SMP_UNSUP_METHOD __constant_htons(0x0008) @@ -85,7 +84,7 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp, { struct nodeinfo *nip = (struct nodeinfo *)&smp->data; struct ipath_devdata *dd = to_idev(ibdev)->dd; - u32 vendor, majrev, minrev; + u32 vendor, boardid, majrev, minrev; if (smp->attr_mod) smp->status |= IB_SMP_INVALID_FIELD; @@ -105,11 +104,9 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp, nip->port_guid = nip->sys_guid; nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd)); nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd)); - majrev = ipath_layer_get_majrev(dd); - minrev = ipath_layer_get_minrev(dd); + ipath_layer_query_device(dd, &vendor, &boardid, &majrev, &minrev); nip->revision = cpu_to_be32((majrev << 16) | minrev); nip->local_port_num = port; - vendor = ipath_layer_get_vendorid(dd); nip->vendor_id[0] = 0; nip->vendor_id[1] = vendor >> 8; nip->vendor_id[2] = vendor; @@ -140,11 +137,47 @@ static int recv_subn_get_guidinfo(struct ib_smp *smp, return reply(smp); } +struct port_info { + __be64 mkey; + __be64 gid_prefix; + __be16 lid; + __be16 sm_lid; + __be32 cap_mask; + __be16 diag_code; + __be16 mkey_lease_period; + u8 local_port_num; + u8 link_width_enabled; + u8 link_width_supported; + u8 link_width_active; + u8 linkspeed_portstate; /* 4 bits, 4 bits */ + u8 portphysstate_linkdown; /* 4 bits, 4 bits */ + u8 mkeyprot_resv_lmc; /* 2 bits, 3, 3 */ + u8 linkspeedactive_enabled; /* 4 bits, 4 bits */ + u8 neighbormtu_mastersmsl; /* 4 bits, 4 bits */ + u8 vlcap_inittype; /* 4 bits, 4 bits */ + u8 vl_high_limit; + u8 vl_arb_high_cap; + u8 vl_arb_low_cap; + u8 inittypereply_mtucap; /* 4 bits, 4 bits */ + u8 vlstallcnt_hoqlife; /* 3 bits, 5 bits */ + u8 operationalvl_pei_peo_fpi_fpo; /* 4 bits, 1, 1, 1, 1 */ + __be16 mkey_violations; + __be16 pkey_violations; + __be16 qkey_violations; + u8 guid_cap; + u8 clientrereg_resv_subnetto; /* 1 bit, 2 bits, 5 */ + u8 resv_resptimevalue; /* 3 bits, 5 bits */ + u8 localphyerrors_overrunerrors; /* 4 bits, 4 bits */ + __be16 max_credit_hint; + u8 resv; + u8 link_roundtrip_latency[3]; +} __attribute__ ((packed)); + static int recv_subn_get_portinfo(struct ib_smp *smp, struct ib_device *ibdev, u8 port) { struct ipath_ibdev *dev; - struct ib_port_info *pip = (struct ib_port_info *)smp->data; + struct port_info *pip = (struct port_info *)smp->data; u16 lid; u8 ibcstat; u8 mtu; @@ -218,7 +251,7 @@ static int recv_subn_get_portinfo(struct ib_smp *smp, /* P_KeyViolations are counted by hardware. */ pip->pkey_violations = cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - - dev->z_pkey_violations) & 0xFFFF); + dev->n_pkey_violations) & 0xFFFF); pip->qkey_violations = cpu_to_be16(dev->qkey_violations); /* Only the hardware GUID is supported for now */ pip->guid_cap = 1; @@ -279,7 +312,7 @@ static int recv_subn_set_guidinfo(struct ib_smp *smp, static int recv_subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev, u8 port) { - struct ib_port_info *pip = (struct ib_port_info *)smp->data; + struct port_info *pip = (struct port_info *)smp->data; struct ib_event event; struct ipath_ibdev *dev; u32 flags; @@ -306,9 +339,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, lid = be16_to_cpu(pip->lid); if (lid != ipath_layer_get_lid(dev->dd)) { /* Must be a valid unicast LID address. */ - if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE) + if (lid == 0 || lid >= IPS_MULTICAST_LID_BASE) goto err; - ipath_set_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7); + ipath_set_sps_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7); event.event = IB_EVENT_LID_CHANGE; ib_dispatch_event(&event); } @@ -316,7 +349,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, smlid = be16_to_cpu(pip->sm_lid); if (smlid != dev->sm_lid) { /* Must be a valid unicast LID address. */ - if (smlid == 0 || smlid >= IPATH_MULTICAST_LID_BASE) + if (smlid == 0 || smlid >= IPS_MULTICAST_LID_BASE) goto err; dev->sm_lid = smlid; event.event = IB_EVENT_SM_CHANGE; @@ -392,7 +425,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, * later. */ if (pip->pkey_violations == 0) - dev->z_pkey_violations = + dev->n_pkey_violations = ipath_layer_get_cr_errpkey(dev->dd); if (pip->qkey_violations == 0) @@ -412,7 +445,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, if (pip->clientrereg_resv_subnetto & 0x80) { clientrereg = 1; - event.event = IB_EVENT_CLIENT_REREGISTER; + event.event = IB_EVENT_LID_CHANGE; ib_dispatch_event(&event); } @@ -613,9 +646,6 @@ struct ib_pma_portcounters { #define IB_PMA_SEL_PORT_RCV_ERRORS __constant_htons(0x0008) #define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS __constant_htons(0x0010) #define IB_PMA_SEL_PORT_XMIT_DISCARDS __constant_htons(0x0040) -#define IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS __constant_htons(0x0200) -#define IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS __constant_htons(0x0400) -#define IB_PMA_SEL_PORT_VL15_DROPPED __constant_htons(0x0800) #define IB_PMA_SEL_PORT_XMIT_DATA __constant_htons(0x1000) #define IB_PMA_SEL_PORT_RCV_DATA __constant_htons(0x2000) #define IB_PMA_SEL_PORT_XMIT_PACKETS __constant_htons(0x4000) @@ -850,22 +880,18 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp, ipath_layer_get_counters(dev->dd, &cntrs); /* Adjust counters for any resets done. */ - cntrs.symbol_error_counter -= dev->z_symbol_error_counter; + cntrs.symbol_error_counter -= dev->n_symbol_error_counter; cntrs.link_error_recovery_counter -= - dev->z_link_error_recovery_counter; - cntrs.link_downed_counter -= dev->z_link_downed_counter; + dev->n_link_error_recovery_counter; + cntrs.link_downed_counter -= dev->n_link_downed_counter; cntrs.port_rcv_errors += dev->rcv_errors; - cntrs.port_rcv_errors -= dev->z_port_rcv_errors; - cntrs.port_rcv_remphys_errors -= dev->z_port_rcv_remphys_errors; - cntrs.port_xmit_discards -= dev->z_port_xmit_discards; - cntrs.port_xmit_data -= dev->z_port_xmit_data; - cntrs.port_rcv_data -= dev->z_port_rcv_data; - cntrs.port_xmit_packets -= dev->z_port_xmit_packets; - cntrs.port_rcv_packets -= dev->z_port_rcv_packets; - cntrs.local_link_integrity_errors -= - dev->z_local_link_integrity_errors; - cntrs.excessive_buffer_overrun_errors -= - dev->z_excessive_buffer_overrun_errors; + cntrs.port_rcv_errors -= dev->n_port_rcv_errors; + cntrs.port_rcv_remphys_errors -= dev->n_port_rcv_remphys_errors; + cntrs.port_xmit_discards -= dev->n_port_xmit_discards; + cntrs.port_xmit_data -= dev->n_port_xmit_data; + cntrs.port_rcv_data -= dev->n_port_rcv_data; + cntrs.port_xmit_packets -= dev->n_port_xmit_packets; + cntrs.port_rcv_packets -= dev->n_port_rcv_packets; memset(pmp->data, 0, sizeof(pmp->data)); @@ -903,16 +929,6 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp, else p->port_xmit_discards = cpu_to_be16((u16)cntrs.port_xmit_discards); - if (cntrs.local_link_integrity_errors > 0xFUL) - cntrs.local_link_integrity_errors = 0xFUL; - if (cntrs.excessive_buffer_overrun_errors > 0xFUL) - cntrs.excessive_buffer_overrun_errors = 0xFUL; - p->lli_ebor_errors = (cntrs.local_link_integrity_errors << 4) | - cntrs.excessive_buffer_overrun_errors; - if (dev->n_vl15_dropped > 0xFFFFUL) - p->vl15_dropped = __constant_cpu_to_be16(0xFFFF); - else - p->vl15_dropped = cpu_to_be16((u16)dev->n_vl15_dropped); if (cntrs.port_xmit_data > 0xFFFFFFFFUL) p->port_xmit_data = __constant_cpu_to_be32(0xFFFFFFFF); else @@ -948,10 +964,10 @@ static int recv_pma_get_portcounters_ext(struct ib_perf *pmp, &rpkts, &xwait); /* Adjust counters for any resets done. */ - swords -= dev->z_port_xmit_data; - rwords -= dev->z_port_rcv_data; - spkts -= dev->z_port_xmit_packets; - rpkts -= dev->z_port_rcv_packets; + swords -= dev->n_port_xmit_data; + rwords -= dev->n_port_rcv_data; + spkts -= dev->n_port_xmit_packets; + rpkts -= dev->n_port_rcv_packets; memset(pmp->data, 0, sizeof(pmp->data)); @@ -987,48 +1003,37 @@ static int recv_pma_set_portcounters(struct ib_perf *pmp, ipath_layer_get_counters(dev->dd, &cntrs); if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) - dev->z_symbol_error_counter = cntrs.symbol_error_counter; + dev->n_symbol_error_counter = cntrs.symbol_error_counter; if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) - dev->z_link_error_recovery_counter = + dev->n_link_error_recovery_counter = cntrs.link_error_recovery_counter; if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) - dev->z_link_downed_counter = cntrs.link_downed_counter; + dev->n_link_downed_counter = cntrs.link_downed_counter; if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) - dev->z_port_rcv_errors = + dev->n_port_rcv_errors = cntrs.port_rcv_errors + dev->rcv_errors; if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) - dev->z_port_rcv_remphys_errors = + dev->n_port_rcv_remphys_errors = cntrs.port_rcv_remphys_errors; if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) - dev->z_port_xmit_discards = cntrs.port_xmit_discards; - - if (p->counter_select & IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS) - dev->z_local_link_integrity_errors = - cntrs.local_link_integrity_errors; - - if (p->counter_select & IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS) - dev->z_excessive_buffer_overrun_errors = - cntrs.excessive_buffer_overrun_errors; - - if (p->counter_select & IB_PMA_SEL_PORT_VL15_DROPPED) - dev->n_vl15_dropped = 0; + dev->n_port_xmit_discards = cntrs.port_xmit_discards; if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) - dev->z_port_xmit_data = cntrs.port_xmit_data; + dev->n_port_xmit_data = cntrs.port_xmit_data; if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) - dev->z_port_rcv_data = cntrs.port_rcv_data; + dev->n_port_rcv_data = cntrs.port_rcv_data; if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) - dev->z_port_xmit_packets = cntrs.port_xmit_packets; + dev->n_port_xmit_packets = cntrs.port_xmit_packets; if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) - dev->z_port_rcv_packets = cntrs.port_rcv_packets; + dev->n_port_rcv_packets = cntrs.port_rcv_packets; return recv_pma_get_portcounters(pmp, ibdev, port); } @@ -1045,16 +1050,16 @@ static int recv_pma_set_portcounters_ext(struct ib_perf *pmp, &rpkts, &xwait); if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) - dev->z_port_xmit_data = swords; + dev->n_port_xmit_data = swords; if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) - dev->z_port_rcv_data = rwords; + dev->n_port_rcv_data = rwords; if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) - dev->z_port_xmit_packets = spkts; + dev->n_port_xmit_packets = spkts; if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) - dev->z_port_rcv_packets = rpkts; + dev->n_port_rcv_packets = rpkts; if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) dev->n_unicast_xmit = 0; @@ -1303,8 +1308,32 @@ int ipath_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, struct ib_wc *in_wc, struct ib_grh *in_grh, struct ib_mad *in_mad, struct ib_mad *out_mad) { + struct ipath_ibdev *dev = to_idev(ibdev); int ret; + /* + * Snapshot current HW counters to "clear" them. + * This should be done when the driver is loaded except that for + * some reason we get a zillion errors when brining up the link. + */ + if (dev->rcv_errors == 0) { + struct ipath_layer_counters cntrs; + + ipath_layer_get_counters(to_idev(ibdev)->dd, &cntrs); + dev->rcv_errors++; + dev->n_symbol_error_counter = cntrs.symbol_error_counter; + dev->n_link_error_recovery_counter = + cntrs.link_error_recovery_counter; + dev->n_link_downed_counter = cntrs.link_downed_counter; + dev->n_port_rcv_errors = cntrs.port_rcv_errors + 1; + dev->n_port_rcv_remphys_errors = + cntrs.port_rcv_remphys_errors; + dev->n_port_xmit_discards = cntrs.port_xmit_discards; + dev->n_port_xmit_data = cntrs.port_xmit_data; + dev->n_port_rcv_data = cntrs.port_rcv_data; + dev->n_port_xmit_packets = cntrs.port_xmit_packets; + dev->n_port_rcv_packets = cntrs.port_rcv_packets; + } switch (in_mad->mad_hdr.mgmt_class) { case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: case IB_MGMT_CLASS_SUBN_LID_ROUTED: diff --git a/drivers/infiniband/hw/ipath/ipath_mr.c b/drivers/infiniband/hw/ipath/ipath_mr.c index 4ac31a5da..69ffec66d 100644 --- a/drivers/infiniband/hw/ipath/ipath_mr.c +++ b/drivers/infiniband/hw/ipath/ipath_mr.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -170,11 +169,6 @@ struct ib_mr *ipath_reg_user_mr(struct ib_pd *pd, struct ib_umem *region, int n, m, i; struct ib_mr *ret; - if (region->length == 0) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - n = 0; list_for_each_entry(chunk, ®ion->chunk_list, list) n += chunk->nents; diff --git a/drivers/infiniband/hw/ipath/ipath_pe800.c b/drivers/infiniband/hw/ipath/ipath_pe800.c index b83f66d82..02e8c75b2 100644 --- a/drivers/infiniband/hw/ipath/ipath_pe800.c +++ b/drivers/infiniband/hw/ipath/ipath_pe800.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -45,7 +44,7 @@ /* * This file contains all the chip-specific register information and - * access functions for the QLogic InfiniPath PE800, the PCI-Express chip. + * access functions for the PathScale PE800, the PCI-Express chip. * * This lists the InfiniPath PE800 registers, in the actual chip layout. * This structure should never be directly accessed. @@ -533,7 +532,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name, if (n) snprintf(name, namelen, "%s", n); - if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) { + if (dd->ipath_majrev != 4 || dd->ipath_minrev != 1) { ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n", dd->ipath_majrev, dd->ipath_minrev); ret = 1; diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 83e557be5..9f8855d97 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -35,7 +34,7 @@ #include #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" #define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE) #define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) @@ -333,11 +332,10 @@ static void ipath_reset_qp(struct ipath_qp *qp) qp->remote_qpn = 0; qp->qkey = 0; qp->qp_access_flags = 0; - clear_bit(IPATH_S_BUSY, &qp->s_flags); qp->s_hdrwords = 0; qp->s_psn = 0; qp->r_psn = 0; - qp->r_msn = 0; + atomic_set(&qp->msn, 0); if (qp->ibqp.qp_type == IB_QPT_RC) { qp->s_state = IB_OPCODE_RC_SEND_LAST; qp->r_state = IB_OPCODE_RC_SEND_LAST; @@ -346,8 +344,7 @@ static void ipath_reset_qp(struct ipath_qp *qp) qp->r_state = IB_OPCODE_UC_SEND_LAST; } qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; - qp->r_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; - qp->r_nak_state = 0; + qp->s_nak_state = 0; qp->s_rnr_timeout = 0; qp->s_head = 0; qp->s_tail = 0; @@ -365,10 +362,10 @@ static void ipath_reset_qp(struct ipath_qp *qp) * @qp: the QP to put into an error state * * Flushes both send and receive work queues. - * QP s_lock should be held and interrupts disabled. + * QP r_rq.lock and s_lock should be held. */ -void ipath_error_qp(struct ipath_qp *qp) +static void ipath_error_qp(struct ipath_qp *qp) { struct ipath_ibdev *dev = to_idev(qp->ibqp.device); struct ib_wc wc; @@ -411,14 +408,12 @@ void ipath_error_qp(struct ipath_qp *qp) qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; wc.opcode = IB_WC_RECV; - spin_lock(&qp->r_rq.lock); while (qp->r_rq.tail != qp->r_rq.head) { wc.wr_id = get_rwqe_ptr(&qp->r_rq, qp->r_rq.tail)->wr_id; if (++qp->r_rq.tail >= qp->r_rq.size) qp->r_rq.tail = 0; ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1); } - spin_unlock(&qp->r_rq.lock); } /** @@ -438,7 +433,8 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, unsigned long flags; int ret; - spin_lock_irqsave(&qp->s_lock, flags); + spin_lock_irqsave(&qp->r_rq.lock, flags); + spin_lock(&qp->s_lock); cur_state = attr_mask & IB_QP_CUR_STATE ? attr->cur_qp_state : qp->state; @@ -450,7 +446,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, if (attr_mask & IB_QP_AV) if (attr->ah_attr.dlid == 0 || - attr->ah_attr.dlid >= IPATH_MULTICAST_LID_BASE) + attr->ah_attr.dlid >= IPS_MULTICAST_LID_BASE) goto inval; if (attr_mask & IB_QP_PKEY_INDEX) @@ -509,19 +505,34 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, } if (attr_mask & IB_QP_MIN_RNR_TIMER) - qp->r_min_rnr_timer = attr->min_rnr_timer; + qp->s_min_rnr_timer = attr->min_rnr_timer; if (attr_mask & IB_QP_QKEY) qp->qkey = attr->qkey; + if (attr_mask & IB_QP_PKEY_INDEX) + qp->s_pkey_index = attr->pkey_index; + qp->state = new_state; - spin_unlock_irqrestore(&qp->s_lock, flags); + spin_unlock(&qp->s_lock); + spin_unlock_irqrestore(&qp->r_rq.lock, flags); + + /* + * If QP1 changed to the RTS state, try to move to the link to INIT + * even if it was ACTIVE so the SM will reinitialize the SMA's + * state. + */ + if (qp->ibqp.qp_num == 1 && new_state == IB_QPS_RTS) { + struct ipath_ibdev *dev = to_idev(ibqp->device); + ipath_layer_set_linkstate(dev->dd, IPATH_IB_LINKDOWN); + } ret = 0; goto bail; inval: - spin_unlock_irqrestore(&qp->s_lock, flags); + spin_unlock(&qp->s_lock); + spin_unlock_irqrestore(&qp->r_rq.lock, flags); ret = -EINVAL; bail: @@ -555,7 +566,7 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, attr->sq_draining = 0; attr->max_rd_atomic = 1; attr->max_dest_rd_atomic = 1; - attr->min_rnr_timer = qp->r_min_rnr_timer; + attr->min_rnr_timer = qp->s_min_rnr_timer; attr->port_num = 1; attr->timeout = 0; attr->retry_cnt = qp->s_retry_cnt; @@ -582,17 +593,21 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, * @qp: the queue pair to compute the AETH for * * Returns the AETH. + * + * The QP s_lock should be held. */ __be32 ipath_compute_aeth(struct ipath_qp *qp) { - u32 aeth = qp->r_msn & IPATH_MSN_MASK; + u32 aeth = atomic_read(&qp->msn) & IPS_MSN_MASK; - if (qp->ibqp.srq) { + if (qp->s_nak_state) { + aeth |= qp->s_nak_state << IPS_AETH_CREDIT_SHIFT; + } else if (qp->ibqp.srq) { /* * Shared receive queues don't generate credits. * Set the credit field to the invalid value. */ - aeth |= IPATH_AETH_CREDIT_INVAL << IPATH_AETH_CREDIT_SHIFT; + aeth |= IPS_AETH_CREDIT_INVAL << IPS_AETH_CREDIT_SHIFT; } else { u32 min, max, x; u32 credits; @@ -622,7 +637,7 @@ __be32 ipath_compute_aeth(struct ipath_qp *qp) else min = x; } - aeth |= x << IPATH_AETH_CREDIT_SHIFT; + aeth |= x << IPS_AETH_CREDIT_SHIFT; } return cpu_to_be32(aeth); } @@ -648,22 +663,12 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, size_t sz; struct ib_qp *ret; - if (init_attr->cap.max_send_sge > ib_ipath_max_sges || - init_attr->cap.max_recv_sge > ib_ipath_max_sges || - init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs || - init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) { + if (init_attr->cap.max_send_sge > 255 || + init_attr->cap.max_recv_sge > 255) { ret = ERR_PTR(-ENOMEM); goto bail; } - if (init_attr->cap.max_send_sge + - init_attr->cap.max_recv_sge + - init_attr->cap.max_send_wr + - init_attr->cap.max_recv_wr == 0) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - switch (init_attr->qp_type) { case IB_QPT_UC: case IB_QPT_RC: @@ -681,26 +686,18 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, case IB_QPT_GSI: qp = kmalloc(sizeof(*qp), GFP_KERNEL); if (!qp) { - vfree(swq); ret = ERR_PTR(-ENOMEM); goto bail; } - if (init_attr->srq) { - qp->r_rq.size = 0; - qp->r_rq.max_sge = 0; - qp->r_rq.wq = NULL; - } else { - qp->r_rq.size = init_attr->cap.max_recv_wr + 1; - qp->r_rq.max_sge = init_attr->cap.max_recv_sge; - sz = (sizeof(struct ipath_sge) * qp->r_rq.max_sge) + - sizeof(struct ipath_rwqe); - qp->r_rq.wq = vmalloc(qp->r_rq.size * sz); - if (!qp->r_rq.wq) { - kfree(qp); - vfree(swq); - ret = ERR_PTR(-ENOMEM); - goto bail; - } + qp->r_rq.size = init_attr->cap.max_recv_wr + 1; + sz = sizeof(struct ipath_sge) * + init_attr->cap.max_recv_sge + + sizeof(struct ipath_rwqe); + qp->r_rq.wq = vmalloc(qp->r_rq.size * sz); + if (!qp->r_rq.wq) { + kfree(qp); + ret = ERR_PTR(-ENOMEM); + goto bail; } /* @@ -711,7 +708,9 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, spin_lock_init(&qp->r_rq.lock); atomic_set(&qp->refcount, 0); init_waitqueue_head(&qp->wait); - tasklet_init(&qp->s_task, ipath_do_ruc_send, + tasklet_init(&qp->s_task, + init_attr->qp_type == IB_QPT_RC ? + ipath_do_rc_send : ipath_do_uc_send, (unsigned long)qp); INIT_LIST_HEAD(&qp->piowait); INIT_LIST_HEAD(&qp->timerwait); @@ -719,6 +718,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, qp->s_wq = swq; qp->s_size = init_attr->cap.max_send_wr + 1; qp->s_max_sge = init_attr->cap.max_send_sge; + qp->r_rq.max_sge = init_attr->cap.max_recv_sge; qp->s_flags = init_attr->sq_sig_type == IB_SIGNAL_REQ_WR ? 1 << IPATH_S_SIGNAL_REQ_WR : 0; dev = to_idev(ibpd->device); @@ -888,18 +888,18 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc) */ void ipath_get_credit(struct ipath_qp *qp, u32 aeth) { - u32 credit = (aeth >> IPATH_AETH_CREDIT_SHIFT) & IPATH_AETH_CREDIT_MASK; + u32 credit = (aeth >> IPS_AETH_CREDIT_SHIFT) & IPS_AETH_CREDIT_MASK; /* * If the credit is invalid, we can send * as many packets as we like. Otherwise, we have to * honor the credit field. */ - if (credit == IPATH_AETH_CREDIT_INVAL) + if (credit == IPS_AETH_CREDIT_INVAL) { qp->s_lsn = (u32) -1; - else if (qp->s_lsn != (u32) -1) { + } else if (qp->s_lsn != (u32) -1) { /* Compute new LSN (i.e., MSN + credit) */ - credit = (aeth + credit_table[credit]) & IPATH_MSN_MASK; + credit = (aeth + credit_table[credit]) & IPS_MSN_MASK; if (ipath_cmp24(credit, qp->s_lsn) > 0) qp->s_lsn = credit; } diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 774d1615c..493b1821a 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -32,7 +31,7 @@ */ #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" /* cut down ridiculously long IB macro names */ #define OP(x) IB_OPCODE_RC_##x @@ -42,14 +41,14 @@ * @qp: the QP who's SGE we're restarting * @wqe: the work queue to initialize the QP's SGE from * - * The QP s_lock should be held and interrupts disabled. + * The QP s_lock should be held. */ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) { struct ipath_ibdev *dev; u32 len; - len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * + len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * ib_mtu_enum_to_int(qp->path_mtu); qp->s_sge.sge = wqe->sg_list[0]; qp->s_sge.sg_list = wqe->sg_list + 1; @@ -73,10 +72,11 @@ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) * Return bth0 if constructed; otherwise, return 0. * Note the QP s_lock must be held. */ -u32 ipath_make_rc_ack(struct ipath_qp *qp, - struct ipath_other_headers *ohdr, - u32 pmtu) +static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, + struct ipath_other_headers *ohdr, + u32 pmtu) { + struct ipath_sge_state *ss; u32 hwords; u32 len; u32 bth0; @@ -90,12 +90,13 @@ u32 ipath_make_rc_ack(struct ipath_qp *qp, */ switch (qp->s_ack_state) { case OP(RDMA_READ_REQUEST): - qp->s_cur_sge = &qp->s_rdma_sge; + ss = &qp->s_rdma_sge; len = qp->s_rdma_len; if (len > pmtu) { len = pmtu; qp->s_ack_state = OP(RDMA_READ_RESPONSE_FIRST); - } else + } + else qp->s_ack_state = OP(RDMA_READ_RESPONSE_ONLY); qp->s_rdma_len -= len; bth0 = qp->s_ack_state << 24; @@ -107,7 +108,7 @@ u32 ipath_make_rc_ack(struct ipath_qp *qp, qp->s_ack_state = OP(RDMA_READ_RESPONSE_MIDDLE); /* FALLTHROUGH */ case OP(RDMA_READ_RESPONSE_MIDDLE): - qp->s_cur_sge = &qp->s_rdma_sge; + ss = &qp->s_rdma_sge; len = qp->s_rdma_len; if (len > pmtu) len = pmtu; @@ -126,50 +127,41 @@ u32 ipath_make_rc_ack(struct ipath_qp *qp, * We have to prevent new requests from changing * the r_sge state while a ipath_verbs_send() * is in progress. + * Changing r_state allows the receiver + * to continue processing new packets. + * We do it here now instead of above so + * that we are sure the packet was sent before + * changing the state. */ + qp->r_state = OP(RDMA_READ_RESPONSE_LAST); qp->s_ack_state = OP(ACKNOWLEDGE); - bth0 = 0; - goto bail; + return 0; case OP(COMPARE_SWAP): case OP(FETCH_ADD): - qp->s_cur_sge = NULL; + ss = NULL; len = 0; - /* - * Set the s_ack_state so the receive interrupt handler - * won't try to send an ACK (out of order) until this one - * is actually sent. - */ - qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST); - bth0 = OP(ATOMIC_ACKNOWLEDGE) << 24; + qp->r_state = OP(SEND_LAST); + qp->s_ack_state = OP(ACKNOWLEDGE); + bth0 = IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; ohdr->u.at.aeth = ipath_compute_aeth(qp); - ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data); + ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); hwords += sizeof(ohdr->u.at) / 4; break; default: /* Send a regular ACK. */ - qp->s_cur_sge = NULL; + ss = NULL; len = 0; - /* - * Set the s_ack_state so the receive interrupt handler - * won't try to send an ACK (out of order) until this one - * is actually sent. - */ - qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST); - bth0 = OP(ACKNOWLEDGE) << 24; - if (qp->s_nak_state) - ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) | - (qp->s_nak_state << - IPATH_AETH_CREDIT_SHIFT)); - else - ohdr->u.aeth = ipath_compute_aeth(qp); + qp->s_ack_state = OP(ACKNOWLEDGE); + bth0 = qp->s_ack_state << 24; + ohdr->u.aeth = ipath_compute_aeth(qp); hwords++; } qp->s_hdrwords = hwords; + qp->s_cur_sge = ss; qp->s_cur_size = len; -bail: return bth0; } @@ -182,11 +174,11 @@ bail: * @bth2p: pointer to the BTH PSN word * * Return 1 if constructed; otherwise, return 0. - * Note the QP s_lock must be held and interrupts disabled. + * Note the QP s_lock must be held. */ -int ipath_make_rc_req(struct ipath_qp *qp, - struct ipath_other_headers *ohdr, - u32 pmtu, u32 *bth0p, u32 *bth2p) +static inline int ipath_make_rc_req(struct ipath_qp *qp, + struct ipath_other_headers *ohdr, + u32 pmtu, u32 *bth0p, u32 *bth2p) { struct ipath_ibdev *dev = to_idev(qp->ibqp.device); struct ipath_sge_state *ss; @@ -265,7 +257,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, break; case IB_WR_RDMA_WRITE: - if (newreq && qp->s_lsn != (u32) -1) + if (newreq) qp->s_lsn++; /* FALLTHROUGH */ case IB_WR_RDMA_WRITE_WITH_IMM: @@ -291,7 +283,8 @@ int ipath_make_rc_req(struct ipath_qp *qp, else { qp->s_state = OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE); - /* Immediate data comes after RETH */ + /* Immediate data comes + * after RETH */ ohdr->u.rc.imm_data = wqe->wr.imm_data; hwords += 1; if (wqe->wr.send_flags & IB_SEND_SOLICITED) @@ -311,8 +304,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, qp->s_state = OP(RDMA_READ_REQUEST); hwords += sizeof(ohdr->u.rc.reth) / 4; if (newreq) { - if (qp->s_lsn != (u32) -1) - qp->s_lsn++; + qp->s_lsn++; /* * Adjust s_next_psn to count the * expected number of responses. @@ -343,8 +335,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, wqe->wr.wr.atomic.compare_add); hwords += sizeof(struct ib_atomic_eth) / 4; if (newreq) { - if (qp->s_lsn != (u32) -1) - qp->s_lsn++; + qp->s_lsn++; wqe->lpsn = wqe->psn; } if (++qp->s_cur == qp->s_size) @@ -361,14 +352,9 @@ int ipath_make_rc_req(struct ipath_qp *qp, if (qp->s_tail >= qp->s_size) qp->s_tail = 0; } - bth2 |= qp->s_psn++ & IPATH_PSN_MASK; + bth2 |= qp->s_psn++ & IPS_PSN_MASK; if ((int)(qp->s_psn - qp->s_next_psn) > 0) qp->s_next_psn = qp->s_psn; - /* - * Put the QP on the pending list so lost ACKs will cause - * a retry. More than one request can be pending so the - * QP may already be on the dev->pending list. - */ spin_lock(&dev->pending_lock); if (list_empty(&qp->timerwait)) list_add_tail(&qp->timerwait, @@ -378,8 +364,8 @@ int ipath_make_rc_req(struct ipath_qp *qp, case OP(RDMA_READ_RESPONSE_FIRST): /* - * This case can only happen if a send is restarted. - * See ipath_restart_rc(). + * This case can only happen if a send is restarted. See + * ipath_restart_rc(). */ ipath_init_restart(qp, wqe); /* FALLTHROUGH */ @@ -387,7 +373,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, qp->s_state = OP(SEND_MIDDLE); /* FALLTHROUGH */ case OP(SEND_MIDDLE): - bth2 = qp->s_psn++ & IPATH_PSN_MASK; + bth2 = qp->s_psn++ & IPS_PSN_MASK; if ((int)(qp->s_psn - qp->s_next_psn) > 0) qp->s_next_psn = qp->s_psn; ss = &qp->s_sge; @@ -429,7 +415,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, qp->s_state = OP(RDMA_WRITE_MIDDLE); /* FALLTHROUGH */ case OP(RDMA_WRITE_MIDDLE): - bth2 = qp->s_psn++ & IPATH_PSN_MASK; + bth2 = qp->s_psn++ & IPS_PSN_MASK; if ((int)(qp->s_psn - qp->s_next_psn) > 0) qp->s_next_psn = qp->s_psn; ss = &qp->s_sge; @@ -466,7 +452,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, * See ipath_restart_rc(). */ ipath_init_restart(qp, wqe); - len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * pmtu; + len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * pmtu; ohdr->u.rc.reth.vaddr = cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len); ohdr->u.rc.reth.rkey = @@ -474,7 +460,7 @@ int ipath_make_rc_req(struct ipath_qp *qp, ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len); qp->s_state = OP(RDMA_READ_REQUEST); hwords += sizeof(ohdr->u.rc.reth) / 4; - bth2 = qp->s_psn++ & IPATH_PSN_MASK; + bth2 = qp->s_psn++ & IPS_PSN_MASK; if ((int)(qp->s_psn - qp->s_next_psn) > 0) qp->s_next_psn = qp->s_psn; ss = NULL; @@ -510,169 +496,189 @@ done: return 0; } +static inline void ipath_make_rc_grh(struct ipath_qp *qp, + struct ib_global_route *grh, + u32 nwords) +{ + struct ipath_ibdev *dev = to_idev(qp->ibqp.device); + + /* GRH header size in 32-bit words. */ + qp->s_hdrwords += 10; + qp->s_hdr.u.l.grh.version_tclass_flow = + cpu_to_be32((6 << 28) | + (grh->traffic_class << 20) | + grh->flow_label); + qp->s_hdr.u.l.grh.paylen = + cpu_to_be16(((qp->s_hdrwords - 12) + nwords + + SIZE_OF_CRC) << 2); + /* next_hdr is defined by C8-7 in ch. 8.4.1 */ + qp->s_hdr.u.l.grh.next_hdr = 0x1B; + qp->s_hdr.u.l.grh.hop_limit = grh->hop_limit; + /* The SGID is 32-bit aligned. */ + qp->s_hdr.u.l.grh.sgid.global.subnet_prefix = dev->gid_prefix; + qp->s_hdr.u.l.grh.sgid.global.interface_id = + ipath_layer_get_guid(dev->dd); + qp->s_hdr.u.l.grh.dgid = grh->dgid; +} + /** - * send_rc_ack - Construct an ACK packet and send it - * @qp: a pointer to the QP + * ipath_do_rc_send - perform a send on an RC QP + * @data: contains a pointer to the QP * - * This is called from ipath_rc_rcv() and only uses the receive - * side QP state. - * Note that RDMA reads are handled in the send side QP state and tasklet. + * Process entries in the send work queue until credit or queue is + * exhausted. Only allow one CPU to send a packet per QP (tasklet). + * Otherwise, after we drop the QP s_lock, two threads could send + * packets out of order. */ -static void send_rc_ack(struct ipath_qp *qp) +void ipath_do_rc_send(unsigned long data) { + struct ipath_qp *qp = (struct ipath_qp *)data; struct ipath_ibdev *dev = to_idev(qp->ibqp.device); + unsigned long flags; u16 lrh0; + u32 nwords; + u32 extra_bytes; u32 bth0; - u32 hwords; - struct ipath_ib_header hdr; + u32 bth2; + u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); struct ipath_other_headers *ohdr; - /* Construct the header. */ - ohdr = &hdr.u.oth; - lrh0 = IPATH_LRH_BTH; - /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ - hwords = 6; - if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { - hwords += ipath_make_grh(dev, &hdr.u.l.grh, - &qp->remote_ah_attr.grh, - hwords, 0); - ohdr = &hdr.u.l.oth; - lrh0 = IPATH_LRH_GRH; - } - /* read pkey_index w/o lock (its atomic) */ - bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); - if (qp->r_nak_state) - ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) | - (qp->r_nak_state << - IPATH_AETH_CREDIT_SHIFT)); - else - ohdr->u.aeth = ipath_compute_aeth(qp); - if (qp->r_ack_state >= OP(COMPARE_SWAP)) { - bth0 |= OP(ATOMIC_ACKNOWLEDGE) << 24; - ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data); - hwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4; - } else - bth0 |= OP(ACKNOWLEDGE) << 24; - lrh0 |= qp->remote_ah_attr.sl << 4; - hdr.lrh[0] = cpu_to_be16(lrh0); - hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); - hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC); - hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); - ohdr->bth[0] = cpu_to_be32(bth0); - ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); - ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK); + if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) + goto bail; + + if (unlikely(qp->remote_ah_attr.dlid == + ipath_layer_get_lid(dev->dd))) { + struct ib_wc wc; - /* - * If we can send the ACK, clear the ACK state. - */ - if (ipath_verbs_send(dev->dd, hwords, (u32 *) &hdr, 0, NULL) == 0) { - qp->r_ack_state = OP(ACKNOWLEDGE); - dev->n_unicast_xmit++; - } else { /* - * We are out of PIO buffers at the moment. - * Pass responsibility for sending the ACK to the - * send tasklet so that when a PIO buffer becomes - * available, the ACK is sent ahead of other outgoing - * packets. + * Pass in an uninitialized ib_wc to be consistent with + * other places where ipath_ruc_loopback() is called. */ - dev->n_rc_qacks++; - spin_lock_irq(&qp->s_lock); - /* Don't coalesce if a RDMA read or atomic is pending. */ - if (qp->s_ack_state == OP(ACKNOWLEDGE) || - qp->s_ack_state < OP(RDMA_READ_REQUEST)) { - qp->s_ack_state = qp->r_ack_state; - qp->s_nak_state = qp->r_nak_state; - qp->s_ack_psn = qp->r_ack_psn; - qp->r_ack_state = OP(ACKNOWLEDGE); - } - spin_unlock_irq(&qp->s_lock); - - /* Call ipath_do_rc_send() in another thread. */ - tasklet_hi_schedule(&qp->s_task); - } -} - -/** - * reset_psn - reset the QP state to send starting from PSN - * @qp: the QP - * @psn: the packet sequence number to restart at - * - * This is called from ipath_rc_rcv() to process an incoming RC ACK - * for the given QP. - * Called at interrupt level with the QP s_lock held. - */ -static void reset_psn(struct ipath_qp *qp, u32 psn) -{ - u32 n = qp->s_last; - struct ipath_swqe *wqe = get_swqe_ptr(qp, n); - u32 opcode; - - qp->s_cur = n; - - /* - * If we are starting the request from the beginning, - * let the normal send code handle initialization. - */ - if (ipath_cmp24(psn, wqe->psn) <= 0) { - qp->s_state = OP(SEND_LAST); - goto done; + ipath_ruc_loopback(qp, &wc); + goto clear; } - /* Find the work request opcode corresponding to the given PSN. */ - opcode = wqe->wr.opcode; - for (;;) { - int diff; + ohdr = &qp->s_hdr.u.oth; + if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) + ohdr = &qp->s_hdr.u.l.oth; - if (++n == qp->s_size) - n = 0; - if (n == qp->s_tail) - break; - wqe = get_swqe_ptr(qp, n); - diff = ipath_cmp24(psn, wqe->psn); - if (diff < 0) - break; - qp->s_cur = n; +again: + /* Check for a constructed packet to be sent. */ + if (qp->s_hdrwords != 0) { /* - * If we are starting the request from the beginning, - * let the normal send code handle initialization. + * If no PIO bufs are available, return. An interrupt will + * call ipath_ib_piobufavail() when one is available. */ - if (diff == 0) { - qp->s_state = OP(SEND_LAST); - goto done; + _VERBS_INFO("h %u %p\n", qp->s_hdrwords, &qp->s_hdr); + _VERBS_INFO("d %u %p %u %p %u %u %u %u\n", qp->s_cur_size, + qp->s_cur_sge->sg_list, + qp->s_cur_sge->num_sge, + qp->s_cur_sge->sge.vaddr, + qp->s_cur_sge->sge.sge_length, + qp->s_cur_sge->sge.length, + qp->s_cur_sge->sge.m, + qp->s_cur_sge->sge.n); + if (ipath_verbs_send(dev->dd, qp->s_hdrwords, + (u32 *) &qp->s_hdr, qp->s_cur_size, + qp->s_cur_sge)) { + ipath_no_bufs_available(qp, dev); + goto bail; } - opcode = wqe->wr.opcode; + dev->n_unicast_xmit++; + /* Record that we sent the packet and s_hdr is empty. */ + qp->s_hdrwords = 0; } /* - * Set the state to restart in the middle of a request. - * Don't change the s_sge, s_cur_sge, or s_cur_size. - * See ipath_do_rc_send(). + * The lock is needed to synchronize between setting + * qp->s_ack_state, resend timer, and post_send(). */ - switch (opcode) { - case IB_WR_SEND: - case IB_WR_SEND_WITH_IMM: - qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); - break; + spin_lock_irqsave(&qp->s_lock, flags); - case IB_WR_RDMA_WRITE: - case IB_WR_RDMA_WRITE_WITH_IMM: - qp->s_state = OP(RDMA_READ_RESPONSE_LAST); - break; + /* Sending responses has higher priority over sending requests. */ + if (qp->s_ack_state != OP(ACKNOWLEDGE) && + (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0) + bth2 = qp->s_ack_psn++ & IPS_PSN_MASK; + else if (!ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2)) + goto done; - case IB_WR_RDMA_READ: - qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE); - break; + spin_unlock_irqrestore(&qp->s_lock, flags); - default: - /* - * This case shouldn't happen since its only - * one PSN per req. - */ - qp->s_state = OP(SEND_LAST); + /* Construct the header. */ + extra_bytes = (4 - qp->s_cur_size) & 3; + nwords = (qp->s_cur_size + extra_bytes) >> 2; + lrh0 = IPS_LRH_BTH; + if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { + ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, nwords); + lrh0 = IPS_LRH_GRH; } + lrh0 |= qp->remote_ah_attr.sl << 4; + qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); + qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); + qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + + SIZE_OF_CRC); + qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); + bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); + bth0 |= extra_bytes << 20; + ohdr->bth[0] = cpu_to_be32(bth0); + ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); + ohdr->bth[2] = cpu_to_be32(bth2); + + /* Check for more work to do. */ + goto again; + done: - qp->s_psn = psn; + spin_unlock_irqrestore(&qp->s_lock, flags); +clear: + clear_bit(IPATH_S_BUSY, &qp->s_flags); +bail: + return; +} + +static void send_rc_ack(struct ipath_qp *qp) +{ + struct ipath_ibdev *dev = to_idev(qp->ibqp.device); + u16 lrh0; + u32 bth0; + struct ipath_other_headers *ohdr; + + /* Construct the header. */ + ohdr = &qp->s_hdr.u.oth; + lrh0 = IPS_LRH_BTH; + /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ + qp->s_hdrwords = 6; + if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { + ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, 0); + ohdr = &qp->s_hdr.u.l.oth; + lrh0 = IPS_LRH_GRH; + } + bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); + ohdr->u.aeth = ipath_compute_aeth(qp); + if (qp->s_ack_state >= OP(COMPARE_SWAP)) { + bth0 |= IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; + ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); + qp->s_hdrwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4; + } + else + bth0 |= OP(ACKNOWLEDGE) << 24; + lrh0 |= qp->remote_ah_attr.sl << 4; + qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); + qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); + qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + SIZE_OF_CRC); + qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); + ohdr->bth[0] = cpu_to_be32(bth0); + ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); + ohdr->bth[2] = cpu_to_be32(qp->s_ack_psn & IPS_PSN_MASK); + + /* + * If we can send the ACK, clear the ACK state. + */ + if (ipath_verbs_send(dev->dd, qp->s_hdrwords, (u32 *) &qp->s_hdr, + 0, NULL) == 0) { + qp->s_ack_state = OP(ACKNOWLEDGE); + dev->n_rc_qacks++; + dev->n_unicast_xmit++; + } } /** @@ -681,12 +687,13 @@ done: * @psn: packet sequence number for the request * @wc: the work completion request * - * The QP s_lock should be held and interrupts disabled. + * The QP s_lock should be held. */ void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) { struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last); struct ipath_ibdev *dev; + u32 n; /* * If there are no requests pending, we are done. @@ -728,7 +735,62 @@ void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) else dev->n_rc_resends += (int)qp->s_psn - (int)psn; - reset_psn(qp, psn); + /* + * If we are starting the request from the beginning, let the normal + * send code handle initialization. + */ + qp->s_cur = qp->s_last; + if (ipath_cmp24(psn, wqe->psn) <= 0) { + qp->s_state = OP(SEND_LAST); + qp->s_psn = wqe->psn; + } else { + n = qp->s_cur; + for (;;) { + if (++n == qp->s_size) + n = 0; + if (n == qp->s_tail) { + if (ipath_cmp24(psn, qp->s_next_psn) >= 0) { + qp->s_cur = n; + wqe = get_swqe_ptr(qp, n); + } + break; + } + wqe = get_swqe_ptr(qp, n); + if (ipath_cmp24(psn, wqe->psn) < 0) + break; + qp->s_cur = n; + } + qp->s_psn = psn; + + /* + * Reset the state to restart in the middle of a request. + * Don't change the s_sge, s_cur_sge, or s_cur_size. + * See ipath_do_rc_send(). + */ + switch (wqe->wr.opcode) { + case IB_WR_SEND: + case IB_WR_SEND_WITH_IMM: + qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); + break; + + case IB_WR_RDMA_WRITE: + case IB_WR_RDMA_WRITE_WITH_IMM: + qp->s_state = OP(RDMA_READ_RESPONSE_LAST); + break; + + case IB_WR_RDMA_READ: + qp->s_state = + OP(RDMA_READ_RESPONSE_MIDDLE); + break; + + default: + /* + * This case shouldn't happen since its only + * one PSN per req. + */ + qp->s_state = OP(SEND_LAST); + } + } done: tasklet_hi_schedule(&qp->s_task); @@ -737,15 +799,77 @@ bail: return; } +/** + * reset_psn - reset the QP state to send starting from PSN + * @qp: the QP + * @psn: the packet sequence number to restart at + * + * This is called from ipath_rc_rcv() to process an incoming RC ACK + * for the given QP. + * Called at interrupt level with the QP s_lock held. + */ +static void reset_psn(struct ipath_qp *qp, u32 psn) +{ + struct ipath_swqe *wqe; + u32 n; + + n = qp->s_cur; + wqe = get_swqe_ptr(qp, n); + for (;;) { + if (++n == qp->s_size) + n = 0; + if (n == qp->s_tail) { + if (ipath_cmp24(psn, qp->s_next_psn) >= 0) { + qp->s_cur = n; + wqe = get_swqe_ptr(qp, n); + } + break; + } + wqe = get_swqe_ptr(qp, n); + if (ipath_cmp24(psn, wqe->psn) < 0) + break; + qp->s_cur = n; + } + qp->s_psn = psn; + + /* + * Set the state to restart in the middle of a + * request. Don't change the s_sge, s_cur_sge, or + * s_cur_size. See ipath_do_rc_send(). + */ + switch (wqe->wr.opcode) { + case IB_WR_SEND: + case IB_WR_SEND_WITH_IMM: + qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); + break; + + case IB_WR_RDMA_WRITE: + case IB_WR_RDMA_WRITE_WITH_IMM: + qp->s_state = OP(RDMA_READ_RESPONSE_LAST); + break; + + case IB_WR_RDMA_READ: + qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE); + break; + + default: + /* + * This case shouldn't happen since its only + * one PSN per req. + */ + qp->s_state = OP(SEND_LAST); + } +} + /** * do_rc_ack - process an incoming RC ACK * @qp: the QP the ACK came in on * @psn: the packet sequence number of the ACK * @opcode: the opcode of the request that resulted in the ACK * - * This is called from ipath_rc_rcv_resp() to process an incoming RC ACK + * This is called from ipath_rc_rcv() to process an incoming RC ACK * for the given QP. - * Called at interrupt level with the QP s_lock held and interrupts disabled. + * Called at interrupt level with the QP s_lock held. * Returns 1 if OK, 0 if current operation should be aborted (NAK). */ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) @@ -882,16 +1006,26 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) if (qp->s_last == qp->s_tail) goto bail; - /* The last valid PSN is the previous PSN. */ - qp->s_last_psn = psn - 1; + /* The last valid PSN seen is the previous request's. */ + qp->s_last_psn = wqe->psn - 1; dev->n_rc_resends += (int)qp->s_psn - (int)psn; - reset_psn(qp, psn); + /* + * If we are starting the request from the beginning, let + * the normal send code handle initialization. + */ + qp->s_cur = qp->s_last; + wqe = get_swqe_ptr(qp, qp->s_cur); + if (ipath_cmp24(psn, wqe->psn) <= 0) { + qp->s_state = OP(SEND_LAST); + qp->s_psn = wqe->psn; + } else + reset_psn(qp, psn); qp->s_rnr_timeout = - ib_ipath_rnr_table[(aeth >> IPATH_AETH_CREDIT_SHIFT) & - IPATH_AETH_CREDIT_MASK]; + ib_ipath_rnr_table[(aeth >> IPS_AETH_CREDIT_SHIFT) & + IPS_AETH_CREDIT_MASK]; ipath_insert_rnr_queue(qp); goto bail; @@ -899,8 +1033,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) /* The last valid PSN seen is the previous request's. */ if (qp->s_last != qp->s_tail) qp->s_last_psn = wqe->psn - 1; - switch ((aeth >> IPATH_AETH_CREDIT_SHIFT) & - IPATH_AETH_CREDIT_MASK) { + switch ((aeth >> IPS_AETH_CREDIT_SHIFT) & + IPS_AETH_CREDIT_MASK) { case 0: /* PSN sequence error */ dev->n_seq_naks++; /* @@ -1048,33 +1182,32 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, goto ack_done; } rdma_read: - if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST))) - goto ack_done; - if (unlikely(tlen != (hdrsize + pmtu + 4))) - goto ack_done; - if (unlikely(pmtu >= qp->s_len)) - goto ack_done; - /* We got a response so update the timeout. */ - if (unlikely(qp->s_last == qp->s_tail || - get_swqe_ptr(qp, qp->s_last)->wr.opcode != - IB_WR_RDMA_READ)) - goto ack_done; - spin_lock(&dev->pending_lock); - if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) - list_move_tail(&qp->timerwait, - &dev->pending[dev->pending_index]); - spin_unlock(&dev->pending_lock); - /* - * Update the RDMA receive state but do the copy w/o - * holding the locks and blocking interrupts. - * XXX Yet another place that affects relaxed RDMA order - * since we don't want s_sge modified. - */ - qp->s_len -= pmtu; - qp->s_last_psn = psn; - spin_unlock_irqrestore(&qp->s_lock, flags); - ipath_copy_sge(&qp->s_sge, data, pmtu); - goto bail; + if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST))) + goto ack_done; + if (unlikely(tlen != (hdrsize + pmtu + 4))) + goto ack_done; + if (unlikely(pmtu >= qp->s_len)) + goto ack_done; + /* We got a response so update the timeout. */ + if (unlikely(qp->s_last == qp->s_tail || + get_swqe_ptr(qp, qp->s_last)->wr.opcode != + IB_WR_RDMA_READ)) + goto ack_done; + spin_lock(&dev->pending_lock); + if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) + list_move_tail(&qp->timerwait, + &dev->pending[dev->pending_index]); + spin_unlock(&dev->pending_lock); + /* + * Update the RDMA receive state but do the copy w/o holding the + * locks and blocking interrupts. XXX Yet another place that + * affects relaxed RDMA order since we don't want s_sge modified. + */ + qp->s_len -= pmtu; + qp->s_last_psn = psn; + spin_unlock_irqrestore(&qp->s_lock, flags); + ipath_copy_sge(&qp->s_sge, data, pmtu); + goto bail; case OP(RDMA_READ_RESPONSE_LAST): /* ACKs READ req. */ @@ -1097,12 +1230,18 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, * ICRC (4). */ if (unlikely(tlen <= (hdrsize + pad + 8))) { - /* XXX Need to generate an error CQ entry. */ + /* + * XXX Need to generate an error CQ + * entry. + */ goto ack_done; } tlen -= hdrsize + pad + 8; if (unlikely(tlen != qp->s_len)) { - /* XXX Need to generate an error CQ entry. */ + /* + * XXX Need to generate an error CQ + * entry. + */ goto ack_done; } if (!header_in_data) @@ -1115,12 +1254,9 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, if (do_rc_ack(qp, aeth, psn, OP(RDMA_READ_RESPONSE_LAST))) { /* * Change the state so we contimue - * processing new requests and wake up the - * tasklet if there are posted sends. + * processing new requests. */ qp->s_state = OP(SEND_LAST); - if (qp->s_tail != qp->s_head) - tasklet_hi_schedule(&qp->s_task); } goto ack_done; } @@ -1166,16 +1302,18 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, * Don't queue the NAK if a RDMA read, atomic, or * NAK is pending though. */ - if (qp->s_ack_state != OP(ACKNOWLEDGE) || - qp->r_nak_state != 0) + spin_lock(&qp->s_lock); + if ((qp->s_ack_state >= OP(RDMA_READ_REQUEST) && + qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) || + qp->s_nak_state != 0) { + spin_unlock(&qp->s_lock); goto done; - if (qp->r_ack_state < OP(COMPARE_SWAP)) { - qp->r_ack_state = OP(SEND_ONLY); - qp->r_nak_state = IB_NAK_PSN_ERROR; - /* Use the expected PSN. */ - qp->r_ack_psn = qp->r_psn; } - goto send_ack; + qp->s_ack_state = OP(SEND_ONLY); + qp->s_nak_state = IB_NAK_PSN_ERROR; + /* Use the expected PSN. */ + qp->s_ack_psn = qp->r_psn; + goto resched; } /* @@ -1189,7 +1327,27 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, * send the earliest so that RDMA reads can be restarted at * the requester's expected PSN. */ - if (opcode == OP(RDMA_READ_REQUEST)) { + spin_lock(&qp->s_lock); + if (qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE && + ipath_cmp24(psn, qp->s_ack_psn) >= 0) { + if (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST) + qp->s_ack_psn = psn; + spin_unlock(&qp->s_lock); + goto done; + } + switch (opcode) { + case OP(RDMA_READ_REQUEST): + /* + * We have to be careful to not change s_rdma_sge + * while ipath_do_rc_send() is using it and not + * holding the s_lock. + */ + if (qp->s_ack_state != OP(ACKNOWLEDGE) && + qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) { + spin_unlock(&qp->s_lock); + dev->n_rdma_dup_busy++; + goto done; + } /* RETH comes after BTH */ if (!header_in_data) reth = &ohdr->u.rc.reth; @@ -1197,22 +1355,6 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, reth = (struct ib_reth *)data; data += sizeof(*reth); } - /* - * If we receive a duplicate RDMA request, it means the - * requester saw a sequence error and needs to restart - * from an earlier point. We can abort the current - * RDMA read send in that case. - */ - spin_lock_irq(&qp->s_lock); - if (qp->s_ack_state != OP(ACKNOWLEDGE) && - (qp->s_hdrwords || ipath_cmp24(psn, qp->s_ack_psn) >= 0)) { - /* - * We are already sending earlier requested data. - * Don't abort it to send later out of sequence data. - */ - spin_unlock_irq(&qp->s_lock); - goto done; - } qp->s_rdma_len = be32_to_cpu(reth->length); if (qp->s_rdma_len != 0) { u32 rkey = be32_to_cpu(reth->rkey); @@ -1226,10 +1368,8 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, ok = ipath_rkey_ok(dev, &qp->s_rdma_sge, qp->s_rdma_len, vaddr, rkey, IB_ACCESS_REMOTE_READ); - if (unlikely(!ok)) { - spin_unlock_irq(&qp->s_lock); + if (unlikely(!ok)) goto done; - } } else { qp->s_rdma_sge.sg_list = NULL; qp->s_rdma_sge.num_sge = 0; @@ -1238,44 +1378,25 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, qp->s_rdma_sge.sge.length = 0; qp->s_rdma_sge.sge.sge_length = 0; } - qp->s_ack_state = opcode; - qp->s_ack_psn = psn; - spin_unlock_irq(&qp->s_lock); - tasklet_hi_schedule(&qp->s_task); - goto send_ack; - } - - /* - * A pending RDMA read will ACK anything before it so - * ignore earlier duplicate requests. - */ - if (qp->s_ack_state != OP(ACKNOWLEDGE)) - goto done; + break; - /* - * If an ACK is pending, don't replace the pending ACK - * with an earlier one since the later one will ACK the earlier. - * Also, if we already have a pending atomic, send it. - */ - if (qp->r_ack_state != OP(ACKNOWLEDGE) && - (ipath_cmp24(psn, qp->r_ack_psn) <= 0 || - qp->r_ack_state >= OP(COMPARE_SWAP))) - goto send_ack; - switch (opcode) { case OP(COMPARE_SWAP): case OP(FETCH_ADD): /* - * Check for the PSN of the last atomic operation + * Check for the PSN of the last atomic operations * performed and resend the result if found. */ - if ((psn & IPATH_PSN_MASK) != qp->r_atomic_psn) + if ((psn & IPS_PSN_MASK) != qp->r_atomic_psn) { + spin_unlock(&qp->s_lock); goto done; + } + qp->s_ack_atomic = qp->r_atomic_data; break; } - qp->r_ack_state = opcode; - qp->r_nak_state = 0; - qp->r_ack_psn = psn; -send_ack: + qp->s_ack_state = opcode; + qp->s_nak_state = 0; + qp->s_ack_psn = psn; +resched: return 0; done: @@ -1303,6 +1424,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, u32 hdrsize; u32 psn; u32 pad; + unsigned long flags; struct ib_wc wc; u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); int diff; @@ -1331,6 +1453,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, } else psn = be32_to_cpu(ohdr->bth[2]); } + /* + * The opcode is in the low byte when its in network order + * (top byte when in host order). + */ + opcode = be32_to_cpu(ohdr->bth[0]) >> 24; /* * Process responses (ACKs) before anything else. Note that the @@ -1338,21 +1465,22 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, * queue rather than the expected receive packet sequence number. * In other words, this QP is the requester. */ - opcode = be32_to_cpu(ohdr->bth[0]) >> 24; if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) && opcode <= OP(ATOMIC_ACKNOWLEDGE)) { ipath_rc_rcv_resp(dev, ohdr, data, tlen, qp, opcode, psn, hdrsize, pmtu, header_in_data); - goto done; + goto bail; } + spin_lock_irqsave(&qp->r_rq.lock, flags); + /* Compute 24 bits worth of difference. */ diff = ipath_cmp24(psn, qp->r_psn); if (unlikely(diff)) { if (ipath_rc_rcv_error(dev, ohdr, data, qp, opcode, psn, diff, header_in_data)) goto done; - goto send_ack; + goto resched; } /* Check for opcode sequence errors. */ @@ -1364,19 +1492,22 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, opcode == OP(SEND_LAST_WITH_IMMEDIATE)) break; nack_inv: - /* - * A NAK will ACK earlier sends and RDMA writes. - * Don't queue the NAK if a RDMA read, atomic, or NAK - * is pending though. - */ - if (qp->r_ack_state >= OP(COMPARE_SWAP)) - goto send_ack; - /* XXX Flush WQEs */ - qp->state = IB_QPS_ERR; - qp->r_ack_state = OP(SEND_ONLY); - qp->r_nak_state = IB_NAK_INVALID_REQUEST; - qp->r_ack_psn = qp->r_psn; - goto send_ack; + /* + * A NAK will ACK earlier sends and RDMA writes. Don't queue the + * NAK if a RDMA read, atomic, or NAK is pending though. + */ + spin_lock(&qp->s_lock); + if (qp->s_ack_state >= OP(RDMA_READ_REQUEST) && + qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { + spin_unlock(&qp->s_lock); + goto done; + } + /* XXX Flush WQEs */ + qp->state = IB_QPS_ERR; + qp->s_ack_state = OP(SEND_ONLY); + qp->s_nak_state = IB_NAK_INVALID_REQUEST; + qp->s_ack_psn = qp->r_psn; + goto resched; case OP(RDMA_WRITE_FIRST): case OP(RDMA_WRITE_MIDDLE): @@ -1386,6 +1517,20 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, break; goto nack_inv; + case OP(RDMA_READ_REQUEST): + case OP(COMPARE_SWAP): + case OP(FETCH_ADD): + /* + * Drop all new requests until a response has been sent. A + * new request then ACKs the RDMA response we sent. Relaxed + * ordering would allow new requests to be processed but we + * would need to keep a queue of rwqe's for all that are in + * progress. Note that we can't RNR NAK this request since + * the RDMA READ or atomic response is already queued to be + * sent (unless we implement a response send queue). + */ + goto done; + default: if (opcode == OP(SEND_MIDDLE) || opcode == OP(SEND_LAST) || @@ -1394,11 +1539,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, opcode == OP(RDMA_WRITE_LAST) || opcode == OP(RDMA_WRITE_LAST_WITH_IMMEDIATE)) goto nack_inv; - /* - * Note that it is up to the requester to not send a new - * RDMA read or atomic operation before receiving an ACK - * for the previous operation. - */ break; } @@ -1415,12 +1555,17 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, * Don't queue the NAK if a RDMA read or atomic * is pending though. */ - if (qp->r_ack_state >= OP(COMPARE_SWAP)) - goto send_ack; - qp->r_ack_state = OP(SEND_ONLY); - qp->r_nak_state = IB_RNR_NAK | qp->r_min_rnr_timer; - qp->r_ack_psn = qp->r_psn; - goto send_ack; + spin_lock(&qp->s_lock); + if (qp->s_ack_state >= + OP(RDMA_READ_REQUEST) && + qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { + spin_unlock(&qp->s_lock); + goto done; + } + qp->s_ack_state = OP(SEND_ONLY); + qp->s_nak_state = IB_RNR_NAK | qp->s_min_rnr_timer; + qp->s_ack_psn = qp->r_psn; + goto resched; } qp->r_rcv_len = 0; /* FALLTHROUGH */ @@ -1477,7 +1622,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, if (unlikely(wc.byte_len > qp->r_len)) goto nack_inv; ipath_copy_sge(&qp->r_sge, data, tlen); - qp->r_msn++; + atomic_inc(&qp->msn); if (opcode == OP(RDMA_WRITE_LAST) || opcode == OP(RDMA_WRITE_ONLY)) break; @@ -1521,8 +1666,29 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, ok = ipath_rkey_ok(dev, &qp->r_sge, qp->r_len, vaddr, rkey, IB_ACCESS_REMOTE_WRITE); - if (unlikely(!ok)) - goto nack_acc; + if (unlikely(!ok)) { + nack_acc: + /* + * A NAK will ACK earlier sends and RDMA + * writes. Don't queue the NAK if a RDMA + * read, atomic, or NAK is pending though. + */ + spin_lock(&qp->s_lock); + if (qp->s_ack_state >= + OP(RDMA_READ_REQUEST) && + qp->s_ack_state != + IB_OPCODE_ACKNOWLEDGE) { + spin_unlock(&qp->s_lock); + goto done; + } + /* XXX Flush WQEs */ + qp->state = IB_QPS_ERR; + qp->s_ack_state = OP(RDMA_WRITE_ONLY); + qp->s_nak_state = + IB_NAK_REMOTE_ACCESS_ERROR; + qp->s_ack_psn = qp->r_psn; + goto resched; + } } else { qp->r_sge.sg_list = NULL; qp->r_sge.sge.mr = NULL; @@ -1549,10 +1715,12 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, reth = (struct ib_reth *)data; data += sizeof(*reth); } - if (unlikely(!(qp->qp_access_flags & - IB_ACCESS_REMOTE_READ))) - goto nack_acc; - spin_lock_irq(&qp->s_lock); + spin_lock(&qp->s_lock); + if (qp->s_ack_state != OP(ACKNOWLEDGE) && + qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) { + spin_unlock(&qp->s_lock); + goto done; + } qp->s_rdma_len = be32_to_cpu(reth->length); if (qp->s_rdma_len != 0) { u32 rkey = be32_to_cpu(reth->rkey); @@ -1564,7 +1732,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, qp->s_rdma_len, vaddr, rkey, IB_ACCESS_REMOTE_READ); if (unlikely(!ok)) { - spin_unlock_irq(&qp->s_lock); + spin_unlock(&qp->s_lock); goto nack_acc; } /* @@ -1581,25 +1749,21 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, qp->s_rdma_sge.sge.length = 0; qp->s_rdma_sge.sge.sge_length = 0; } + if (unlikely(!(qp->qp_access_flags & + IB_ACCESS_REMOTE_READ))) + goto nack_acc; /* * We need to increment the MSN here instead of when we * finish sending the result since a duplicate request would * increment it more than once. */ - qp->r_msn++; - + atomic_inc(&qp->msn); qp->s_ack_state = opcode; + qp->s_nak_state = 0; qp->s_ack_psn = psn; - spin_unlock_irq(&qp->s_lock); - qp->r_psn++; qp->r_state = opcode; - qp->r_nak_state = 0; - - /* Call ipath_do_rc_send() in another thread. */ - tasklet_hi_schedule(&qp->s_task); - - goto done; + goto rdmadone; case OP(COMPARE_SWAP): case OP(FETCH_ADD): { @@ -1628,7 +1792,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, goto nack_acc; /* Perform atomic OP and save result. */ sdata = be64_to_cpu(ateth->swap_data); - spin_lock_irq(&dev->pending_lock); + spin_lock(&dev->pending_lock); qp->r_atomic_data = *(u64 *) qp->r_sge.sge.vaddr; if (opcode == OP(FETCH_ADD)) *(u64 *) qp->r_sge.sge.vaddr = @@ -1636,9 +1800,9 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, else if (qp->r_atomic_data == be64_to_cpu(ateth->compare_data)) *(u64 *) qp->r_sge.sge.vaddr = sdata; - spin_unlock_irq(&dev->pending_lock); - qp->r_msn++; - qp->r_atomic_psn = psn & IPATH_PSN_MASK; + spin_unlock(&dev->pending_lock); + atomic_inc(&qp->msn); + qp->r_atomic_psn = psn & IPS_PSN_MASK; psn |= 1 << 31; break; } @@ -1649,39 +1813,44 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, } qp->r_psn++; qp->r_state = opcode; - qp->r_nak_state = 0; /* Send an ACK if requested or required. */ if (psn & (1 << 31)) { /* * Coalesce ACKs unless there is a RDMA READ or * ATOMIC pending. */ - if (qp->r_ack_state < OP(COMPARE_SWAP)) { - qp->r_ack_state = opcode; - qp->r_ack_psn = psn; + spin_lock(&qp->s_lock); + if (qp->s_ack_state == OP(ACKNOWLEDGE) || + qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST) { + qp->s_ack_state = opcode; + qp->s_nak_state = 0; + qp->s_ack_psn = psn; + qp->s_ack_atomic = qp->r_atomic_data; + goto resched; } - goto send_ack; + spin_unlock(&qp->s_lock); } - goto done; +done: + spin_unlock_irqrestore(&qp->r_rq.lock, flags); + goto bail; -nack_acc: +resched: /* - * A NAK will ACK earlier sends and RDMA writes. - * Don't queue the NAK if a RDMA read, atomic, or NAK - * is pending though. + * Try to send ACK right away but not if ipath_do_rc_send() is + * active. */ - if (qp->r_ack_state < OP(COMPARE_SWAP)) { - /* XXX Flush WQEs */ - qp->state = IB_QPS_ERR; - qp->r_ack_state = OP(RDMA_WRITE_ONLY); - qp->r_nak_state = IB_NAK_REMOTE_ACCESS_ERROR; - qp->r_ack_psn = qp->r_psn; - } -send_ack: - /* Send ACK right away unless the send tasklet has a pending ACK. */ - if (qp->s_ack_state == OP(ACKNOWLEDGE)) + if (qp->s_hdrwords == 0 && + (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST || + qp->s_ack_state >= IB_OPCODE_COMPARE_SWAP)) send_rc_ack(qp); -done: +rdmadone: + spin_unlock(&qp->s_lock); + spin_unlock_irqrestore(&qp->r_rq.lock, flags); + + /* Call ipath_do_rc_send() in another thread. */ + tasklet_hi_schedule(&qp->s_task); + +bail: return; } diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 89df8f5ea..402126eb7 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index 772bc59fb..d38f4f3cf 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -32,7 +31,6 @@ */ #include "ipath_verbs.h" -#include "ipath_common.h" /* * Convert the AETH RNR timeout code into the number of milliseconds. @@ -113,23 +111,20 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp) * * Return 0 if no RWQE is available, otherwise return 1. * - * Can be called from interrupt level. + * Called at interrupt level with the QP r_rq.lock held. */ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) { - unsigned long flags; struct ipath_rq *rq; struct ipath_srq *srq; struct ipath_rwqe *wqe; - int ret = 1; + int ret; if (!qp->ibqp.srq) { rq = &qp->r_rq; - spin_lock_irqsave(&rq->lock, flags); - if (unlikely(rq->tail == rq->head)) { ret = 0; - goto done; + goto bail; } wqe = get_rwqe_ptr(rq, rq->tail); qp->r_wr_id = wqe->wr_id; @@ -141,16 +136,17 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) } if (++rq->tail >= rq->size) rq->tail = 0; - goto done; + ret = 1; + goto bail; } srq = to_isrq(qp->ibqp.srq); rq = &srq->rq; - spin_lock_irqsave(&rq->lock, flags); - + spin_lock(&rq->lock); if (unlikely(rq->tail == rq->head)) { + spin_unlock(&rq->lock); ret = 0; - goto done; + goto bail; } wqe = get_rwqe_ptr(rq, rq->tail); qp->r_wr_id = wqe->wr_id; @@ -172,18 +168,18 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) n = rq->head - rq->tail; if (n < srq->limit) { srq->limit = 0; - spin_unlock_irqrestore(&rq->lock, flags); + spin_unlock(&rq->lock); ev.device = qp->ibqp.device; ev.element.srq = qp->ibqp.srq; ev.event = IB_EVENT_SRQ_LIMIT_REACHED; srq->ibsrq.event_handler(&ev, srq->ibsrq.srq_context); - goto bail; - } - } + } else + spin_unlock(&rq->lock); + } else + spin_unlock(&rq->lock); + ret = 1; -done: - spin_unlock_irqrestore(&rq->lock, flags); bail: return ret; } @@ -191,6 +187,7 @@ bail: /** * ipath_ruc_loopback - handle UC and RC lookback requests * @sqp: the loopback QP + * @wc: the work completion entry * * This is called from ipath_do_uc_send() or ipath_do_rc_send() to * forward a WQE addressed to the same HCA. @@ -199,14 +196,13 @@ bail: * receive interrupts since this is a connected protocol and all packets * will pass through here. */ -static void ipath_ruc_loopback(struct ipath_qp *sqp) +void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc) { struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); struct ipath_qp *qp; struct ipath_swqe *wqe; struct ipath_sge *sge; unsigned long flags; - struct ib_wc wc; u64 sdata; qp = ipath_lookup_qpn(&dev->qp_table, sqp->remote_qpn); @@ -237,8 +233,8 @@ again: wqe = get_swqe_ptr(sqp, sqp->s_last); spin_unlock_irqrestore(&sqp->s_lock, flags); - wc.wc_flags = 0; - wc.imm_data = 0; + wc->wc_flags = 0; + wc->imm_data = 0; sqp->s_sge.sge = wqe->sg_list[0]; sqp->s_sge.sg_list = wqe->sg_list + 1; @@ -246,34 +242,39 @@ again: sqp->s_len = wqe->length; switch (wqe->wr.opcode) { case IB_WR_SEND_WITH_IMM: - wc.wc_flags = IB_WC_WITH_IMM; - wc.imm_data = wqe->wr.imm_data; + wc->wc_flags = IB_WC_WITH_IMM; + wc->imm_data = wqe->wr.imm_data; /* FALLTHROUGH */ case IB_WR_SEND: + spin_lock_irqsave(&qp->r_rq.lock, flags); if (!ipath_get_rwqe(qp, 0)) { rnr_nak: + spin_unlock_irqrestore(&qp->r_rq.lock, flags); /* Handle RNR NAK */ if (qp->ibqp.qp_type == IB_QPT_UC) goto send_comp; if (sqp->s_rnr_retry == 0) { - wc.status = IB_WC_RNR_RETRY_EXC_ERR; + wc->status = IB_WC_RNR_RETRY_EXC_ERR; goto err; } if (sqp->s_rnr_retry_cnt < 7) sqp->s_rnr_retry--; dev->n_rnr_naks++; sqp->s_rnr_timeout = - ib_ipath_rnr_table[sqp->r_min_rnr_timer]; + ib_ipath_rnr_table[sqp->s_min_rnr_timer]; ipath_insert_rnr_queue(sqp); goto done; } + spin_unlock_irqrestore(&qp->r_rq.lock, flags); break; case IB_WR_RDMA_WRITE_WITH_IMM: - wc.wc_flags = IB_WC_WITH_IMM; - wc.imm_data = wqe->wr.imm_data; + wc->wc_flags = IB_WC_WITH_IMM; + wc->imm_data = wqe->wr.imm_data; + spin_lock_irqsave(&qp->r_rq.lock, flags); if (!ipath_get_rwqe(qp, 1)) goto rnr_nak; + spin_unlock_irqrestore(&qp->r_rq.lock, flags); /* FALLTHROUGH */ case IB_WR_RDMA_WRITE: if (wqe->length == 0) @@ -283,20 +284,20 @@ again: wqe->wr.wr.rdma.rkey, IB_ACCESS_REMOTE_WRITE))) { acc_err: - wc.status = IB_WC_REM_ACCESS_ERR; + wc->status = IB_WC_REM_ACCESS_ERR; err: - wc.wr_id = wqe->wr.wr_id; - wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; - wc.vendor_err = 0; - wc.byte_len = 0; - wc.qp_num = sqp->ibqp.qp_num; - wc.src_qp = sqp->remote_qpn; - wc.pkey_index = 0; - wc.slid = sqp->remote_ah_attr.dlid; - wc.sl = sqp->remote_ah_attr.sl; - wc.dlid_path_bits = 0; - wc.port_num = 0; - ipath_sqerror_qp(sqp, &wc); + wc->wr_id = wqe->wr.wr_id; + wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; + wc->vendor_err = 0; + wc->byte_len = 0; + wc->qp_num = sqp->ibqp.qp_num; + wc->src_qp = sqp->remote_qpn; + wc->pkey_index = 0; + wc->slid = sqp->remote_ah_attr.dlid; + wc->sl = sqp->remote_ah_attr.sl; + wc->dlid_path_bits = 0; + wc->port_num = 0; + ipath_sqerror_qp(sqp, wc); goto done; } break; @@ -372,22 +373,22 @@ again: goto send_comp; if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM) - wc.opcode = IB_WC_RECV_RDMA_WITH_IMM; + wc->opcode = IB_WC_RECV_RDMA_WITH_IMM; else - wc.opcode = IB_WC_RECV; - wc.wr_id = qp->r_wr_id; - wc.status = IB_WC_SUCCESS; - wc.vendor_err = 0; - wc.byte_len = wqe->length; - wc.qp_num = qp->ibqp.qp_num; - wc.src_qp = qp->remote_qpn; + wc->opcode = IB_WC_RECV; + wc->wr_id = qp->r_wr_id; + wc->status = IB_WC_SUCCESS; + wc->vendor_err = 0; + wc->byte_len = wqe->length; + wc->qp_num = qp->ibqp.qp_num; + wc->src_qp = qp->remote_qpn; /* XXX do we know which pkey matched? Only needed for GSI. */ - wc.pkey_index = 0; - wc.slid = qp->remote_ah_attr.dlid; - wc.sl = qp->remote_ah_attr.sl; - wc.dlid_path_bits = 0; + wc->pkey_index = 0; + wc->slid = qp->remote_ah_attr.dlid; + wc->sl = qp->remote_ah_attr.sl; + wc->dlid_path_bits = 0; /* Signal completion event if the solicited bit is set. */ - ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, + ipath_cq_enter(to_icq(qp->ibqp.recv_cq), wc, wqe->wr.send_flags & IB_SEND_SOLICITED); send_comp: @@ -395,19 +396,19 @@ send_comp: if (!test_bit(IPATH_S_SIGNAL_REQ_WR, &sqp->s_flags) || (wqe->wr.send_flags & IB_SEND_SIGNALED)) { - wc.wr_id = wqe->wr.wr_id; - wc.status = IB_WC_SUCCESS; - wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; - wc.vendor_err = 0; - wc.byte_len = wqe->length; - wc.qp_num = sqp->ibqp.qp_num; - wc.src_qp = 0; - wc.pkey_index = 0; - wc.slid = 0; - wc.sl = 0; - wc.dlid_path_bits = 0; - wc.port_num = 0; - ipath_cq_enter(to_icq(sqp->ibqp.send_cq), &wc, 0); + wc->wr_id = wqe->wr.wr_id; + wc->status = IB_WC_SUCCESS; + wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; + wc->vendor_err = 0; + wc->byte_len = wqe->length; + wc->qp_num = sqp->ibqp.qp_num; + wc->src_qp = 0; + wc->pkey_index = 0; + wc->slid = 0; + wc->sl = 0; + wc->dlid_path_bits = 0; + wc->port_num = 0; + ipath_cq_enter(to_icq(sqp->ibqp.send_cq), wc, 0); } /* Update s_last now that we are finished with the SWQE */ @@ -453,11 +454,11 @@ void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev) } /** - * ipath_post_ruc_send - post RC and UC sends + * ipath_post_rc_send - post RC and UC sends * @qp: the QP to post on * @wr: the work request to send */ -int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr) +int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr) { struct ipath_swqe *wqe; unsigned long flags; @@ -532,149 +533,13 @@ int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr) qp->s_head = next; spin_unlock_irqrestore(&qp->s_lock, flags); - ipath_do_ruc_send((unsigned long) qp); + if (qp->ibqp.qp_type == IB_QPT_UC) + ipath_do_uc_send((unsigned long) qp); + else + ipath_do_rc_send((unsigned long) qp); ret = 0; bail: return ret; } - -/** - * ipath_make_grh - construct a GRH header - * @dev: a pointer to the ipath device - * @hdr: a pointer to the GRH header being constructed - * @grh: the global route address to send to - * @hwords: the number of 32 bit words of header being sent - * @nwords: the number of 32 bit words of data being sent - * - * Return the size of the header in 32 bit words. - */ -u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr, - struct ib_global_route *grh, u32 hwords, u32 nwords) -{ - hdr->version_tclass_flow = - cpu_to_be32((6 << 28) | - (grh->traffic_class << 20) | - grh->flow_label); - hdr->paylen = cpu_to_be16((hwords - 2 + nwords + SIZE_OF_CRC) << 2); - /* next_hdr is defined by C8-7 in ch. 8.4.1 */ - hdr->next_hdr = 0x1B; - hdr->hop_limit = grh->hop_limit; - /* The SGID is 32-bit aligned. */ - hdr->sgid.global.subnet_prefix = dev->gid_prefix; - hdr->sgid.global.interface_id = ipath_layer_get_guid(dev->dd); - hdr->dgid = grh->dgid; - - /* GRH header size in 32-bit words. */ - return sizeof(struct ib_grh) / sizeof(u32); -} - -/** - * ipath_do_ruc_send - perform a send on an RC or UC QP - * @data: contains a pointer to the QP - * - * Process entries in the send work queue until credit or queue is - * exhausted. Only allow one CPU to send a packet per QP (tasklet). - * Otherwise, after we drop the QP s_lock, two threads could send - * packets out of order. - */ -void ipath_do_ruc_send(unsigned long data) -{ - struct ipath_qp *qp = (struct ipath_qp *)data; - struct ipath_ibdev *dev = to_idev(qp->ibqp.device); - unsigned long flags; - u16 lrh0; - u32 nwords; - u32 extra_bytes; - u32 bth0; - u32 bth2; - u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); - struct ipath_other_headers *ohdr; - - if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) - goto bail; - - if (unlikely(qp->remote_ah_attr.dlid == - ipath_layer_get_lid(dev->dd))) { - ipath_ruc_loopback(qp); - goto clear; - } - - ohdr = &qp->s_hdr.u.oth; - if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) - ohdr = &qp->s_hdr.u.l.oth; - -again: - /* Check for a constructed packet to be sent. */ - if (qp->s_hdrwords != 0) { - /* - * If no PIO bufs are available, return. An interrupt will - * call ipath_ib_piobufavail() when one is available. - */ - if (ipath_verbs_send(dev->dd, qp->s_hdrwords, - (u32 *) &qp->s_hdr, qp->s_cur_size, - qp->s_cur_sge)) { - ipath_no_bufs_available(qp, dev); - goto bail; - } - dev->n_unicast_xmit++; - /* Record that we sent the packet and s_hdr is empty. */ - qp->s_hdrwords = 0; - } - - /* - * The lock is needed to synchronize between setting - * qp->s_ack_state, resend timer, and post_send(). - */ - spin_lock_irqsave(&qp->s_lock, flags); - - /* Sending responses has higher priority over sending requests. */ - if (qp->s_ack_state != IB_OPCODE_RC_ACKNOWLEDGE && - (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0) - bth2 = qp->s_ack_psn++ & IPATH_PSN_MASK; - else if (!((qp->ibqp.qp_type == IB_QPT_RC) ? - ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2) : - ipath_make_uc_req(qp, ohdr, pmtu, &bth0, &bth2))) { - /* - * Clear the busy bit before unlocking to avoid races with - * adding new work queue items and then failing to process - * them. - */ - clear_bit(IPATH_S_BUSY, &qp->s_flags); - spin_unlock_irqrestore(&qp->s_lock, flags); - goto bail; - } - - spin_unlock_irqrestore(&qp->s_lock, flags); - - /* Construct the header. */ - extra_bytes = (4 - qp->s_cur_size) & 3; - nwords = (qp->s_cur_size + extra_bytes) >> 2; - lrh0 = IPATH_LRH_BTH; - if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { - qp->s_hdrwords += ipath_make_grh(dev, &qp->s_hdr.u.l.grh, - &qp->remote_ah_attr.grh, - qp->s_hdrwords, nwords); - lrh0 = IPATH_LRH_GRH; - } - lrh0 |= qp->remote_ah_attr.sl << 4; - qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); - qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); - qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + - SIZE_OF_CRC); - qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); - bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); - bth0 |= extra_bytes << 20; - ohdr->bth[0] = cpu_to_be32(bth0); - ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); - ohdr->bth[2] = cpu_to_be32(bth2); - - /* Check for more work to do. */ - goto again; - -clear: - clear_bit(IPATH_S_BUSY, &qp->s_flags); -bail: - return; -} diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c index f76043466..01c4c6c56 100644 --- a/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/drivers/infiniband/hw/ipath/ipath_srq.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -126,23 +125,11 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd, struct ib_srq_init_attr *srq_init_attr, struct ib_udata *udata) { - struct ipath_ibdev *dev = to_idev(ibpd->device); struct ipath_srq *srq; u32 sz; struct ib_srq *ret; - if (dev->n_srqs_allocated == ib_ipath_max_srqs) { - ret = ERR_PTR(-ENOMEM); - goto bail; - } - - if (srq_init_attr->attr.max_wr == 0) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - - if ((srq_init_attr->attr.max_sge > ib_ipath_max_srq_sges) || - (srq_init_attr->attr.max_wr > ib_ipath_max_srq_wrs)) { + if (srq_init_attr->attr.max_sge < 1) { ret = ERR_PTR(-EINVAL); goto bail; } @@ -177,8 +164,6 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd, ret = &srq->ibsrq; - dev->n_srqs_allocated++; - bail: return ret; } @@ -196,26 +181,24 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, unsigned long flags; int ret; - if (attr_mask & IB_SRQ_MAX_WR) - if ((attr->max_wr > ib_ipath_max_srq_wrs) || - (attr->max_sge > srq->rq.max_sge)) { - ret = -EINVAL; - goto bail; - } + if (attr_mask & IB_SRQ_LIMIT) { + spin_lock_irqsave(&srq->rq.lock, flags); + srq->limit = attr->srq_limit; + spin_unlock_irqrestore(&srq->rq.lock, flags); + } + if (attr_mask & IB_SRQ_MAX_WR) { + u32 size = attr->max_wr + 1; + struct ipath_rwqe *wq, *p; + u32 n; + u32 sz; - if (attr_mask & IB_SRQ_LIMIT) - if (attr->srq_limit >= srq->rq.size) { + if (attr->max_sge < srq->rq.max_sge) { ret = -EINVAL; goto bail; } - if (attr_mask & IB_SRQ_MAX_WR) { - struct ipath_rwqe *wq, *p; - u32 sz, size, n; - sz = sizeof(struct ipath_rwqe) + attr->max_sge * sizeof(struct ipath_sge); - size = attr->max_wr + 1; wq = vmalloc(size * sz); if (!wq) { ret = -ENOMEM; @@ -259,11 +242,6 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, spin_unlock_irqrestore(&srq->rq.lock, flags); } - if (attr_mask & IB_SRQ_LIMIT) { - spin_lock_irqsave(&srq->rq.lock, flags); - srq->limit = attr->srq_limit; - spin_unlock_irqrestore(&srq->rq.lock, flags); - } ret = 0; bail: @@ -287,9 +265,7 @@ int ipath_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr) int ipath_destroy_srq(struct ib_srq *ibsrq) { struct ipath_srq *srq = to_isrq(ibsrq); - struct ipath_ibdev *dev = to_idev(ibsrq->device); - dev->n_srqs_allocated--; vfree(srq->rq.wq); kfree(srq); diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c index 70351b7e3..fe209137e 100644 --- a/drivers/infiniband/hw/ipath/ipath_stats.c +++ b/drivers/infiniband/hw/ipath/ipath_stats.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -186,6 +185,7 @@ static void ipath_qcheck(struct ipath_devdata *dd) dd->ipath_port0head, (unsigned long long) ipath_stats.sps_port0pkts); + ipath_kreceive(dd); } dd->ipath_lastport0rcv_cnt = ipath_stats.sps_port0pkts; } diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index b98821d78..f323791cc 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -35,8 +34,8 @@ #include #include "ipath_kernel.h" +#include "ips_common.h" #include "ipath_layer.h" -#include "ipath_common.h" /** * ipath_parse_ushort - parse an unsigned short value in an arbitrary base @@ -85,6 +84,99 @@ static ssize_t show_num_units(struct device_driver *dev, char *buf) ipath_count_units(NULL, NULL, NULL)); } +#define DRIVER_STAT(name, attr) \ + static ssize_t show_stat_##name(struct device_driver *dev, \ + char *buf) \ + { \ + return scnprintf( \ + buf, PAGE_SIZE, "%llu\n", \ + (unsigned long long) ipath_stats.sps_ ##attr); \ + } \ + static DRIVER_ATTR(name, S_IRUGO, show_stat_##name, NULL) + +DRIVER_STAT(intrs, ints); +DRIVER_STAT(err_intrs, errints); +DRIVER_STAT(errs, errs); +DRIVER_STAT(pkt_errs, pkterrs); +DRIVER_STAT(crc_errs, crcerrs); +DRIVER_STAT(hw_errs, hwerrs); +DRIVER_STAT(ib_link, iblink); +DRIVER_STAT(port0_pkts, port0pkts); +DRIVER_STAT(ether_spkts, ether_spkts); +DRIVER_STAT(ether_rpkts, ether_rpkts); +DRIVER_STAT(sma_spkts, sma_spkts); +DRIVER_STAT(sma_rpkts, sma_rpkts); +DRIVER_STAT(hdrq_full, hdrqfull); +DRIVER_STAT(etid_full, etidfull); +DRIVER_STAT(no_piobufs, nopiobufs); +DRIVER_STAT(ports, ports); +DRIVER_STAT(pkey0, pkeys[0]); +DRIVER_STAT(pkey1, pkeys[1]); +DRIVER_STAT(pkey2, pkeys[2]); +DRIVER_STAT(pkey3, pkeys[3]); +/* XXX fix the following when dynamic table of devices used */ +DRIVER_STAT(lid0, lid[0]); +DRIVER_STAT(lid1, lid[1]); +DRIVER_STAT(lid2, lid[2]); +DRIVER_STAT(lid3, lid[3]); + +DRIVER_STAT(nports, nports); +DRIVER_STAT(null_intr, nullintr); +DRIVER_STAT(max_pkts_call, maxpkts_call); +DRIVER_STAT(avg_pkts_call, avgpkts_call); +DRIVER_STAT(page_locks, pagelocks); +DRIVER_STAT(page_unlocks, pageunlocks); +DRIVER_STAT(krdrops, krdrops); +/* XXX fix the following when dynamic table of devices used */ +DRIVER_STAT(mlid0, mlid[0]); +DRIVER_STAT(mlid1, mlid[1]); +DRIVER_STAT(mlid2, mlid[2]); +DRIVER_STAT(mlid3, mlid[3]); + +static struct attribute *driver_stat_attributes[] = { + &driver_attr_intrs.attr, + &driver_attr_err_intrs.attr, + &driver_attr_errs.attr, + &driver_attr_pkt_errs.attr, + &driver_attr_crc_errs.attr, + &driver_attr_hw_errs.attr, + &driver_attr_ib_link.attr, + &driver_attr_port0_pkts.attr, + &driver_attr_ether_spkts.attr, + &driver_attr_ether_rpkts.attr, + &driver_attr_sma_spkts.attr, + &driver_attr_sma_rpkts.attr, + &driver_attr_hdrq_full.attr, + &driver_attr_etid_full.attr, + &driver_attr_no_piobufs.attr, + &driver_attr_ports.attr, + &driver_attr_pkey0.attr, + &driver_attr_pkey1.attr, + &driver_attr_pkey2.attr, + &driver_attr_pkey3.attr, + &driver_attr_lid0.attr, + &driver_attr_lid1.attr, + &driver_attr_lid2.attr, + &driver_attr_lid3.attr, + &driver_attr_nports.attr, + &driver_attr_null_intr.attr, + &driver_attr_max_pkts_call.attr, + &driver_attr_avg_pkts_call.attr, + &driver_attr_page_locks.attr, + &driver_attr_page_unlocks.attr, + &driver_attr_krdrops.attr, + &driver_attr_mlid0.attr, + &driver_attr_mlid1.attr, + &driver_attr_mlid2.attr, + &driver_attr_mlid3.attr, + NULL +}; + +static struct attribute_group driver_stat_attr_group = { + .name = "stats", + .attrs = driver_stat_attributes +}; + static ssize_t show_status(struct device *dev, struct device_attribute *attr, char *buf) @@ -180,23 +272,23 @@ static ssize_t store_lid(struct device *dev, size_t count) { struct ipath_devdata *dd = dev_get_drvdata(dev); - u16 lid = 0; + u16 lid; int ret; ret = ipath_parse_ushort(buf, &lid); if (ret < 0) goto invalid; - if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE) { + if (lid == 0 || lid >= 0xc000) { ret = -EINVAL; goto invalid; } - ipath_set_lid(dd, lid, 0); + ipath_set_sps_lid(dd, lid, 0); goto bail; invalid: - ipath_dev_err(dd, "attempt to set invalid LID 0x%x\n", lid); + ipath_dev_err(dd, "attempt to set invalid LID\n"); bail: return ret; } @@ -221,12 +313,13 @@ static ssize_t store_mlid(struct device *dev, int ret; ret = ipath_parse_ushort(buf, &mlid); - if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE) + if (ret < 0) goto invalid; unit = dd->ipath_unit; dd->ipath_mlid = mlid; + ipath_stats.sps_mlid[unit] = mlid; ipath_layer_intr(dd, IPATH_LAYER_INT_BCAST); goto bail; @@ -641,12 +734,20 @@ int ipath_driver_create_group(struct device_driver *drv) int ret; ret = sysfs_create_group(&drv->kobj, &driver_attr_group); + if (ret) + goto bail; + ret = sysfs_create_group(&drv->kobj, &driver_stat_attr_group); + if (ret) + sysfs_remove_group(&drv->kobj, &driver_attr_group); + +bail: return ret; } void ipath_driver_remove_group(struct device_driver *drv) { + sysfs_remove_group(&drv->kobj, &driver_stat_attr_group); sysfs_remove_group(&drv->kobj, &driver_attr_group); } diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c index c33abea2d..0d6dbc0a5 100644 --- a/drivers/infiniband/hw/ipath/ipath_uc.c +++ b/drivers/infiniband/hw/ipath/ipath_uc.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -32,7 +31,7 @@ */ #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" /* cut down ridiculously long IB macro names */ #define OP(x) IB_OPCODE_UC_##x @@ -62,40 +61,90 @@ static void complete_last_send(struct ipath_qp *qp, struct ipath_swqe *wqe, } /** - * ipath_make_uc_req - construct a request packet (SEND, RDMA write) - * @qp: a pointer to the QP - * @ohdr: a pointer to the IB header being constructed - * @pmtu: the path MTU - * @bth0p: pointer to the BTH opcode word - * @bth2p: pointer to the BTH PSN word + * ipath_do_uc_send - do a send on a UC queue + * @data: contains a pointer to the QP to send on * - * Return 1 if constructed; otherwise, return 0. - * Note the QP s_lock must be held and interrupts disabled. + * Process entries in the send work queue until the queue is exhausted. + * Only allow one CPU to send a packet per QP (tasklet). + * Otherwise, after we drop the QP lock, two threads could send + * packets out of order. + * This is similar to ipath_do_rc_send() below except we don't have + * timeouts or resends. */ -int ipath_make_uc_req(struct ipath_qp *qp, - struct ipath_other_headers *ohdr, - u32 pmtu, u32 *bth0p, u32 *bth2p) +void ipath_do_uc_send(unsigned long data) { + struct ipath_qp *qp = (struct ipath_qp *)data; + struct ipath_ibdev *dev = to_idev(qp->ibqp.device); struct ipath_swqe *wqe; + unsigned long flags; + u16 lrh0; u32 hwords; + u32 nwords; + u32 extra_bytes; u32 bth0; + u32 bth2; + u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); u32 len; + struct ipath_other_headers *ohdr; struct ib_wc wc; - if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) - goto done; + if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) + goto bail; + + if (unlikely(qp->remote_ah_attr.dlid == + ipath_layer_get_lid(dev->dd))) { + /* Pass in an uninitialized ib_wc to save stack space. */ + ipath_ruc_loopback(qp, &wc); + clear_bit(IPATH_S_BUSY, &qp->s_flags); + goto bail; + } + + ohdr = &qp->s_hdr.u.oth; + if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) + ohdr = &qp->s_hdr.u.l.oth; +again: + /* Check for a constructed packet to be sent. */ + if (qp->s_hdrwords != 0) { + /* + * If no PIO bufs are available, return. + * An interrupt will call ipath_ib_piobufavail() + * when one is available. + */ + if (ipath_verbs_send(dev->dd, qp->s_hdrwords, + (u32 *) &qp->s_hdr, + qp->s_cur_size, + qp->s_cur_sge)) { + ipath_no_bufs_available(qp, dev); + goto bail; + } + dev->n_unicast_xmit++; + /* Record that we sent the packet and s_hdr is empty. */ + qp->s_hdrwords = 0; + } + + lrh0 = IPS_LRH_BTH; /* header size in 32-bit words LRH+BTH = (8+12)/4. */ hwords = 5; - bth0 = 0; - /* Get the next send request. */ + /* + * The lock is needed to synchronize between + * setting qp->s_ack_state and post_send(). + */ + spin_lock_irqsave(&qp->s_lock, flags); + + if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) + goto done; + + bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); + + /* Send a request. */ wqe = get_swqe_ptr(qp, qp->s_last); switch (qp->s_state) { default: /* - * Signal the completion of the last send - * (if there is one). + * Signal the completion of the last send (if there is + * one). */ if (qp->s_last != qp->s_tail) complete_last_send(qp, wqe, &wc); @@ -208,16 +257,61 @@ int ipath_make_uc_req(struct ipath_qp *qp, } break; } + bth2 = qp->s_next_psn++ & IPS_PSN_MASK; qp->s_len -= len; + bth0 |= qp->s_state << 24; + + spin_unlock_irqrestore(&qp->s_lock, flags); + + /* Construct the header. */ + extra_bytes = (4 - len) & 3; + nwords = (len + extra_bytes) >> 2; + if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { + /* Header size in 32-bit words. */ + hwords += 10; + lrh0 = IPS_LRH_GRH; + qp->s_hdr.u.l.grh.version_tclass_flow = + cpu_to_be32((6 << 28) | + (qp->remote_ah_attr.grh.traffic_class + << 20) | + qp->remote_ah_attr.grh.flow_label); + qp->s_hdr.u.l.grh.paylen = + cpu_to_be16(((hwords - 12) + nwords + + SIZE_OF_CRC) << 2); + /* next_hdr is defined by C8-7 in ch. 8.4.1 */ + qp->s_hdr.u.l.grh.next_hdr = 0x1B; + qp->s_hdr.u.l.grh.hop_limit = + qp->remote_ah_attr.grh.hop_limit; + /* The SGID is 32-bit aligned. */ + qp->s_hdr.u.l.grh.sgid.global.subnet_prefix = + dev->gid_prefix; + qp->s_hdr.u.l.grh.sgid.global.interface_id = + ipath_layer_get_guid(dev->dd); + qp->s_hdr.u.l.grh.dgid = qp->remote_ah_attr.grh.dgid; + } qp->s_hdrwords = hwords; qp->s_cur_sge = &qp->s_sge; qp->s_cur_size = len; - *bth0p = bth0 | (qp->s_state << 24); - *bth2p = qp->s_next_psn++ & IPATH_PSN_MASK; - return 1; + lrh0 |= qp->remote_ah_attr.sl << 4; + qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); + /* DEST LID */ + qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); + qp->s_hdr.lrh[2] = cpu_to_be16(hwords + nwords + SIZE_OF_CRC); + qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); + bth0 |= extra_bytes << 20; + ohdr->bth[0] = cpu_to_be32(bth0); + ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); + ohdr->bth[2] = cpu_to_be32(bth2); + + /* Check for more work to do. */ + goto again; done: - return 0; + spin_unlock_irqrestore(&qp->s_lock, flags); + clear_bit(IPATH_S_BUSY, &qp->s_flags); + +bail: + return; } /** @@ -241,6 +335,7 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, u32 hdrsize; u32 psn; u32 pad; + unsigned long flags; struct ib_wc wc; u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); struct ib_reth *reth; @@ -278,6 +373,8 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, wc.imm_data = 0; wc.wc_flags = 0; + spin_lock_irqsave(&qp->r_rq.lock, flags); + /* Compare the PSN verses the expected PSN. */ if (unlikely(ipath_cmp24(psn, qp->r_psn) != 0)) { /* @@ -438,13 +535,12 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, if (qp->r_len != 0) { u32 rkey = be32_to_cpu(reth->rkey); u64 vaddr = be64_to_cpu(reth->vaddr); - int ok; /* Check rkey */ - ok = ipath_rkey_ok(dev, &qp->r_sge, qp->r_len, - vaddr, rkey, - IB_ACCESS_REMOTE_WRITE); - if (unlikely(!ok)) { + if (unlikely(!ipath_rkey_ok( + dev, &qp->r_sge, qp->r_len, + vaddr, rkey, + IB_ACCESS_REMOTE_WRITE))) { dev->n_pkt_drops++; goto done; } @@ -462,7 +558,8 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, } if (opcode == OP(RDMA_WRITE_ONLY)) goto rdma_last; - else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) + else if (opcode == + OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) goto rdma_last_imm; /* FALLTHROUGH */ case OP(RDMA_WRITE_MIDDLE): @@ -495,9 +592,9 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, dev->n_pkt_drops++; goto done; } - if (qp->r_reuse_sge) + if (qp->r_reuse_sge) { qp->r_reuse_sge = 0; - else if (!ipath_get_rwqe(qp, 1)) { + } else if (!ipath_get_rwqe(qp, 1)) { dev->n_pkt_drops++; goto done; } @@ -534,11 +631,15 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, default: /* Drop packet for unknown opcodes. */ + spin_unlock_irqrestore(&qp->r_rq.lock, flags); dev->n_pkt_drops++; - goto done; + goto bail; } qp->r_psn++; qp->r_state = opcode; done: + spin_unlock_irqrestore(&qp->r_rq.lock, flags); + +bail: return; } diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c index 3466129af..e606daf83 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -34,7 +33,7 @@ #include #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" /** * ipath_ud_loopback - handle send on loopback QPs @@ -275,11 +274,6 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) len += wr->sg_list[i].length; ss.num_sge++; } - /* Check for invalid packet size. */ - if (len > ipath_layer_get_ibmtu(dev->dd)) { - ret = -EINVAL; - goto bail; - } extra_bytes = (4 - len) & 3; nwords = (len + extra_bytes) >> 2; @@ -289,8 +283,8 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) ret = -EINVAL; goto bail; } - if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE) { - if (ah_attr->dlid != IPATH_PERMISSIVE_LID) + if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE) { + if (ah_attr->dlid != IPS_PERMISSIVE_LID) dev->n_multicast_xmit++; else dev->n_unicast_xmit++; @@ -310,7 +304,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) if (ah_attr->ah_flags & IB_AH_GRH) { /* Header size in 32-bit words. */ hwords = 17; - lrh0 = IPATH_LRH_GRH; + lrh0 = IPS_LRH_GRH; ohdr = &qp->s_hdr.u.l.oth; qp->s_hdr.u.l.grh.version_tclass_flow = cpu_to_be32((6 << 28) | @@ -336,7 +330,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) } else { /* Header size in 32-bit words. */ hwords = 7; - lrh0 = IPATH_LRH_BTH; + lrh0 = IPS_LRH_BTH; ohdr = &qp->s_hdr.u.oth; } if (wr->opcode == IB_WR_SEND_WITH_IMM) { @@ -367,18 +361,18 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) if (wr->send_flags & IB_SEND_SOLICITED) bth0 |= 1 << 23; bth0 |= extra_bytes << 20; - bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPATH_DEFAULT_P_KEY : + bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPS_DEFAULT_P_KEY : ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); ohdr->bth[0] = cpu_to_be32(bth0); /* * Use the multicast QP if the destination LID is a multicast LID. */ - ohdr->bth[1] = ah_attr->dlid >= IPATH_MULTICAST_LID_BASE && - ah_attr->dlid != IPATH_PERMISSIVE_LID ? - __constant_cpu_to_be32(IPATH_MULTICAST_QPN) : + ohdr->bth[1] = ah_attr->dlid >= IPS_MULTICAST_LID_BASE && + ah_attr->dlid != IPS_PERMISSIVE_LID ? + __constant_cpu_to_be32(IPS_MULTICAST_QPN) : cpu_to_be32(wr->wr.ud.remote_qpn); /* XXX Could lose a PSN count but not worth locking */ - ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPATH_PSN_MASK); + ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPS_PSN_MASK); /* * Qkeys with the high order bit set mean use the * qkey from the QP context instead of the WR (see 10.2.5). @@ -469,7 +463,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, src_qp = be32_to_cpu(ohdr->u.ud.deth[1]); } } - src_qp &= IPATH_QPN_MASK; + src_qp &= IPS_QPN_MASK; /* * Check that the permissive LID is only used on QP0 @@ -560,16 +554,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, spin_lock_irqsave(&rq->lock, flags); if (rq->tail == rq->head) { spin_unlock_irqrestore(&rq->lock, flags); - /* - * Count VL15 packets dropped due to no receive buffer. - * Otherwise, count them as buffer overruns since usually, - * the HW will be able to receive packets even if there are - * no QPs with posted receive buffers. - */ - if (qp->ibqp.qp_num == 0) - dev->n_vl15_dropped++; - else - dev->rcv_errors++; + dev->n_pkt_drops++; goto bail; } /* Silently drop packets which are too big. */ @@ -627,7 +612,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, /* * Save the LMC lower bits if the destination LID is a unicast LID. */ - wc.dlid_path_bits = dlid >= IPATH_MULTICAST_LID_BASE ? 0 : + wc.dlid_path_bits = dlid >= IPS_MULTICAST_LID_BASE ? 0 : dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); /* Signal completion event if the solicited bit is set. */ ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, diff --git a/drivers/infiniband/hw/ipath/ipath_user_pages.c b/drivers/infiniband/hw/ipath/ipath_user_pages.c index f4bf9c7e5..aae24d8d2 100644 --- a/drivers/infiniband/hw/ipath/ipath_user_pages.c +++ b/drivers/infiniband/hw/ipath/ipath_user_pages.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -59,6 +58,17 @@ static int __get_user_pages(unsigned long start_page, size_t num_pages, size_t got; int ret; +#if 0 + /* + * XXX - causes MPI programs to fail, haven't had time to check + * yet + */ + if (!capable(CAP_IPC_LOCK)) { + ret = -EPERM; + goto bail; + } +#endif + lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT; diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index d70a9b6b5..28fdbdaa7 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -37,7 +36,7 @@ #include "ipath_kernel.h" #include "ipath_verbs.h" -#include "ipath_common.h" +#include "ips_common.h" /* Not static, because we don't want the compiler removing it */ const char ipath_verbs_version[] = "ipath_verbs " IPATH_IDSTR; @@ -56,62 +55,9 @@ unsigned int ib_ipath_debug; /* debug mask */ module_param_named(debug, ib_ipath_debug, uint, S_IWUSR | S_IRUGO); MODULE_PARM_DESC(debug, "Verbs debug mask"); -static unsigned int ib_ipath_max_pds = 0xFFFF; -module_param_named(max_pds, ib_ipath_max_pds, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_pds, - "Maximum number of protection domains to support"); - -static unsigned int ib_ipath_max_ahs = 0xFFFF; -module_param_named(max_ahs, ib_ipath_max_ahs, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_ahs, "Maximum number of address handles to support"); - -unsigned int ib_ipath_max_cqes = 0x2FFFF; -module_param_named(max_cqes, ib_ipath_max_cqes, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_cqes, - "Maximum number of completion queue entries to support"); - -unsigned int ib_ipath_max_cqs = 0x1FFFF; -module_param_named(max_cqs, ib_ipath_max_cqs, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_cqs, "Maximum number of completion queues to support"); - -unsigned int ib_ipath_max_qp_wrs = 0x3FFF; -module_param_named(max_qp_wrs, ib_ipath_max_qp_wrs, uint, - S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_qp_wrs, "Maximum number of QP WRs to support"); - -unsigned int ib_ipath_max_sges = 0x60; -module_param_named(max_sges, ib_ipath_max_sges, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_sges, "Maximum number of SGEs to support"); - -unsigned int ib_ipath_max_mcast_grps = 16384; -module_param_named(max_mcast_grps, ib_ipath_max_mcast_grps, uint, - S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_mcast_grps, - "Maximum number of multicast groups to support"); - -unsigned int ib_ipath_max_mcast_qp_attached = 16; -module_param_named(max_mcast_qp_attached, ib_ipath_max_mcast_qp_attached, - uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_mcast_qp_attached, - "Maximum number of attached QPs to support"); - -unsigned int ib_ipath_max_srqs = 1024; -module_param_named(max_srqs, ib_ipath_max_srqs, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_srqs, "Maximum number of SRQs to support"); - -unsigned int ib_ipath_max_srq_sges = 128; -module_param_named(max_srq_sges, ib_ipath_max_srq_sges, - uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_srq_sges, "Maximum number of SRQ SGEs to support"); - -unsigned int ib_ipath_max_srq_wrs = 0x1FFFF; -module_param_named(max_srq_wrs, ib_ipath_max_srq_wrs, - uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(max_srq_wrs, "Maximum number of SRQ WRs support"); - MODULE_LICENSE("GPL"); -MODULE_AUTHOR("QLogic "); -MODULE_DESCRIPTION("QLogic InfiniPath driver"); +MODULE_AUTHOR("PathScale "); +MODULE_DESCRIPTION("Pathscale InfiniPath driver"); const int ib_ipath_state_ops[IB_QPS_ERR + 1] = { [IB_QPS_RESET] = 0, @@ -191,6 +137,10 @@ void ipath_skip_sge(struct ipath_sge_state *ss, u32 length) { struct ipath_sge *sge = &ss->sge; + while (length > sge->sge_length) { + length -= sge->sge_length; + ss->sge = *ss->sg_list++; + } while (length) { u32 len = sge->length; @@ -243,7 +193,7 @@ static int ipath_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, switch (qp->ibqp.qp_type) { case IB_QPT_UC: case IB_QPT_RC: - err = ipath_post_ruc_send(qp, wr); + err = ipath_post_rc_send(qp, wr); break; case IB_QPT_SMI: @@ -425,7 +375,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) /* Check for a valid destination LID (see ch. 7.11.1). */ lid = be16_to_cpu(hdr->lrh[1]); - if (lid < IPATH_MULTICAST_LID_BASE) { + if (lid < IPS_MULTICAST_LID_BASE) { lid &= ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); if (unlikely(lid != ipath_layer_get_lid(dev->dd))) { dev->rcv_errors++; @@ -435,9 +385,9 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) /* Check for GRH */ lnh = be16_to_cpu(hdr->lrh[0]) & 3; - if (lnh == IPATH_LRH_BTH) + if (lnh == IPS_LRH_BTH) ohdr = &hdr->u.oth; - else if (lnh == IPATH_LRH_GRH) + else if (lnh == IPS_LRH_GRH) ohdr = &hdr->u.l.oth; else { dev->rcv_errors++; @@ -449,8 +399,8 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) dev->opstats[opcode].n_packets++; /* Get the destination QP number. */ - qp_num = be32_to_cpu(ohdr->bth[1]) & IPATH_QPN_MASK; - if (qp_num == IPATH_MULTICAST_QPN) { + qp_num = be32_to_cpu(ohdr->bth[1]) & IPS_QPN_MASK; + if (qp_num == IPS_MULTICAST_QPN) { struct ipath_mcast *mcast; struct ipath_mcast_qp *p; @@ -461,7 +411,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) } dev->n_multicast_rcv++; list_for_each_entry_rcu(p, &mcast->qp_list, list) - ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data, + ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, tlen, p->qp); /* * Notify ipath_multicast_detach() if it is waiting for us @@ -473,7 +423,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) qp = ipath_lookup_qpn(&dev->qp_table, qp_num); if (qp) { dev->n_unicast_rcv++; - ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data, + ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, tlen, qp); /* * Notify ipath_destroy_qp() if it is waiting @@ -617,39 +567,40 @@ static int ipath_query_device(struct ib_device *ibdev, struct ib_device_attr *props) { struct ipath_ibdev *dev = to_idev(ibdev); + u32 vendor, boardrev, majrev, minrev; memset(props, 0, sizeof(*props)); props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | IB_DEVICE_SYS_IMAGE_GUID; - props->page_size_cap = PAGE_SIZE; - props->vendor_id = ipath_layer_get_vendorid(dev->dd); - props->vendor_part_id = ipath_layer_get_deviceid(dev->dd); - props->hw_ver = ipath_layer_get_pcirev(dev->dd); + ipath_layer_query_device(dev->dd, &vendor, &boardrev, + &majrev, &minrev); + props->vendor_id = vendor; + props->vendor_part_id = boardrev; + props->hw_ver = boardrev << 16 | majrev << 8 | minrev; props->sys_image_guid = dev->sys_image_guid; props->max_mr_size = ~0ull; - props->max_qp = dev->qp_table.max; - props->max_qp_wr = ib_ipath_max_qp_wrs; - props->max_sge = ib_ipath_max_sges; - props->max_cq = ib_ipath_max_cqs; - props->max_ah = ib_ipath_max_ahs; - props->max_cqe = ib_ipath_max_cqes; - props->max_mr = dev->lk_table.max; - props->max_pd = ib_ipath_max_pds; + props->max_qp = 0xffff; + props->max_qp_wr = 0xffff; + props->max_sge = 255; + props->max_cq = 0xffff; + props->max_cqe = 0xffff; + props->max_mr = 0xffff; + props->max_pd = 0xffff; props->max_qp_rd_atom = 1; props->max_qp_init_rd_atom = 1; /* props->max_res_rd_atom */ - props->max_srq = ib_ipath_max_srqs; - props->max_srq_wr = ib_ipath_max_srq_wrs; - props->max_srq_sge = ib_ipath_max_srq_sges; + props->max_srq = 0xffff; + props->max_srq_wr = 0xffff; + props->max_srq_sge = 255; /* props->local_ca_ack_delay */ props->atomic_cap = IB_ATOMIC_HCA; props->max_pkeys = ipath_layer_get_npkeys(dev->dd); - props->max_mcast_grp = ib_ipath_max_mcast_grps; - props->max_mcast_qp_attach = ib_ipath_max_mcast_qp_attached; + props->max_mcast_grp = 0xffff; + props->max_mcast_qp_attach = 0xffff; props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * props->max_mcast_grp; @@ -692,10 +643,10 @@ static int ipath_query_port(struct ib_device *ibdev, ipath_layer_get_lastibcstat(dev->dd) & 0xf]; props->port_cap_flags = dev->port_cap_flags; props->gid_tbl_len = 1; - props->max_msg_sz = 0x80000000; + props->max_msg_sz = 4096; props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - - dev->z_pkey_violations; + dev->n_pkey_violations; props->qkey_viol_cntr = dev->qkey_violations; props->active_width = IB_WIDTH_4X; /* See rate_show() */ @@ -792,30 +743,15 @@ static struct ib_pd *ipath_alloc_pd(struct ib_device *ibdev, struct ib_ucontext *context, struct ib_udata *udata) { - struct ipath_ibdev *dev = to_idev(ibdev); struct ipath_pd *pd; struct ib_pd *ret; - /* - * This is actually totally arbitrary. Some correctness tests - * assume there's a maximum number of PDs that can be allocated. - * We don't actually have this limit, but we fail the test if - * we allow allocations of more than we report for this value. - */ - - if (dev->n_pds_allocated == ib_ipath_max_pds) { - ret = ERR_PTR(-ENOMEM); - goto bail; - } - pd = kmalloc(sizeof *pd, GFP_KERNEL); if (!pd) { ret = ERR_PTR(-ENOMEM); goto bail; } - dev->n_pds_allocated++; - /* ib_alloc_pd() will initialize pd->ibpd. */ pd->user = udata != NULL; @@ -828,9 +764,6 @@ bail: static int ipath_dealloc_pd(struct ib_pd *ibpd) { struct ipath_pd *pd = to_ipd(ibpd); - struct ipath_ibdev *dev = to_idev(ibpd->device); - - dev->n_pds_allocated--; kfree(pd); @@ -849,40 +782,21 @@ static struct ib_ah *ipath_create_ah(struct ib_pd *pd, { struct ipath_ah *ah; struct ib_ah *ret; - struct ipath_ibdev *dev = to_idev(pd->device); - - if (dev->n_ahs_allocated == ib_ipath_max_ahs) { - ret = ERR_PTR(-ENOMEM); - goto bail; - } /* A multicast address requires a GRH (see ch. 8.4.1). */ - if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE && - ah_attr->dlid != IPATH_PERMISSIVE_LID && + if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE && + ah_attr->dlid != IPS_PERMISSIVE_LID && !(ah_attr->ah_flags & IB_AH_GRH)) { ret = ERR_PTR(-EINVAL); goto bail; } - if (ah_attr->dlid == 0) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - - if (ah_attr->port_num < 1 || - ah_attr->port_num > pd->device->phys_port_cnt) { - ret = ERR_PTR(-EINVAL); - goto bail; - } - ah = kmalloc(sizeof *ah, GFP_ATOMIC); if (!ah) { ret = ERR_PTR(-ENOMEM); goto bail; } - dev->n_ahs_allocated++; - /* ib_create_ah() will initialize ah->ibah. */ ah->attr = *ah_attr; @@ -900,11 +814,8 @@ bail: */ static int ipath_destroy_ah(struct ib_ah *ibah) { - struct ipath_ibdev *dev = to_idev(ibah->device); struct ipath_ah *ah = to_iah(ibah); - dev->n_ahs_allocated--; - kfree(ah); return 0; @@ -978,7 +889,6 @@ static int ipath_verbs_register_sysfs(struct ib_device *dev); */ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) { - struct ipath_layer_counters cntrs; struct ipath_ibdev *idev; struct ib_device *dev; int ret; @@ -1029,25 +939,6 @@ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; idev->link_width_enabled = 3; /* 1x or 4x */ - /* Snapshot current HW counters to "clear" them. */ - ipath_layer_get_counters(dd, &cntrs); - idev->z_symbol_error_counter = cntrs.symbol_error_counter; - idev->z_link_error_recovery_counter = - cntrs.link_error_recovery_counter; - idev->z_link_downed_counter = cntrs.link_downed_counter; - idev->z_port_rcv_errors = cntrs.port_rcv_errors; - idev->z_port_rcv_remphys_errors = - cntrs.port_rcv_remphys_errors; - idev->z_port_xmit_discards = cntrs.port_xmit_discards; - idev->z_port_xmit_data = cntrs.port_xmit_data; - idev->z_port_rcv_data = cntrs.port_rcv_data; - idev->z_port_xmit_packets = cntrs.port_xmit_packets; - idev->z_port_rcv_packets = cntrs.port_rcv_packets; - idev->z_local_link_integrity_errors = - cntrs.local_link_integrity_errors; - idev->z_excessive_buffer_overrun_errors = - cntrs.excessive_buffer_overrun_errors; - /* * The system image GUID is supposed to be the same for all * IB HCAs in a single system but since there can be other @@ -1218,8 +1109,11 @@ static ssize_t show_rev(struct class_device *cdev, char *buf) { struct ipath_ibdev *dev = container_of(cdev, struct ipath_ibdev, ibdev.class_dev); + int vendor, boardrev, majrev, minrev; - return sprintf(buf, "%x\n", ipath_layer_get_pcirev(dev->dd)); + ipath_layer_query_device(dev->dd, &vendor, &boardrev, + &majrev, &minrev); + return sprintf(buf, "%d.%d\n", majrev, minrev); } static ssize_t show_hca(struct class_device *cdev, char *buf) diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h index 2df684727..4f8d59300 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.h +++ b/drivers/infiniband/hw/ipath/ipath_verbs.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -149,7 +148,6 @@ struct ipath_mcast { struct list_head qp_list; wait_queue_head_t wait; atomic_t refcount; - int n_attached; }; /* Memory region */ @@ -307,34 +305,32 @@ struct ipath_qp { u32 s_next_psn; /* PSN for next request */ u32 s_last_psn; /* last response PSN processed */ u32 s_psn; /* current packet sequence number */ - u32 s_ack_psn; /* PSN for RDMA_READ */ u32 s_rnr_timeout; /* number of milliseconds for RNR timeout */ - u32 r_ack_psn; /* PSN for next ACK or atomic ACK */ + u32 s_ack_psn; /* PSN for next ACK or RDMA_READ */ + u64 s_ack_atomic; /* data for atomic ACK */ u64 r_wr_id; /* ID for current receive WQE */ u64 r_atomic_data; /* data for last atomic op */ u32 r_atomic_psn; /* PSN of last atomic op */ u32 r_len; /* total length of r_sge */ u32 r_rcv_len; /* receive data len processed */ u32 r_psn; /* expected rcv packet sequence number */ - u32 r_msn; /* message sequence number */ u8 state; /* QP state */ u8 s_state; /* opcode of last packet sent */ u8 s_ack_state; /* opcode of packet to ACK */ u8 s_nak_state; /* non-zero if NAK is pending */ u8 r_state; /* opcode of last packet received */ - u8 r_ack_state; /* opcode of packet to ACK */ - u8 r_nak_state; /* non-zero if NAK is pending */ - u8 r_min_rnr_timer; /* retry timeout value for RNR NAKs */ u8 r_reuse_sge; /* for UC receive errors */ u8 r_sge_inx; /* current index into sg_list */ - u8 qp_access_flags; u8 s_max_sge; /* size of s_wq->sg_list */ + u8 qp_access_flags; u8 s_retry_cnt; /* number of times to retry */ u8 s_rnr_retry_cnt; + u8 s_min_rnr_timer; u8 s_retry; /* requester retry counter */ u8 s_rnr_retry; /* requester RNR retry counter */ u8 s_pkey_index; /* PKEY index to use */ enum ib_mtu path_mtu; + atomic_t msn; /* message sequence number */ u32 remote_qpn; u32 qkey; /* QKEY for this QP (for UD or RD) */ u32 s_size; /* send work queue size */ @@ -435,11 +431,6 @@ struct ipath_ibdev { __be64 sys_image_guid; /* in network order */ __be64 gid_prefix; /* in network order */ __be64 mkey; - u32 n_pds_allocated; /* number of PDs allocated for device */ - u32 n_ahs_allocated; /* number of AHs allocated for device */ - u32 n_cqs_allocated; /* number of CQs allocated for device */ - u32 n_srqs_allocated; /* number of SRQs allocated for device */ - u32 n_mcast_grps_allocated; /* number of mcast groups allocated */ u64 ipath_sword; /* total dwords sent (sample result) */ u64 ipath_rword; /* total dwords received (sample result) */ u64 ipath_spkts; /* total packets sent (sample result) */ @@ -451,19 +442,17 @@ struct ipath_ibdev { u64 n_unicast_rcv; /* total unicast packets received */ u64 n_multicast_xmit; /* total multicast packets sent */ u64 n_multicast_rcv; /* total multicast packets received */ - u64 z_symbol_error_counter; /* starting count for PMA */ - u64 z_link_error_recovery_counter; /* starting count for PMA */ - u64 z_link_downed_counter; /* starting count for PMA */ - u64 z_port_rcv_errors; /* starting count for PMA */ - u64 z_port_rcv_remphys_errors; /* starting count for PMA */ - u64 z_port_xmit_discards; /* starting count for PMA */ - u64 z_port_xmit_data; /* starting count for PMA */ - u64 z_port_rcv_data; /* starting count for PMA */ - u64 z_port_xmit_packets; /* starting count for PMA */ - u64 z_port_rcv_packets; /* starting count for PMA */ - u32 z_pkey_violations; /* starting count for PMA */ - u32 z_local_link_integrity_errors; /* starting count for PMA */ - u32 z_excessive_buffer_overrun_errors; /* starting count for PMA */ + u64 n_symbol_error_counter; /* starting count for PMA */ + u64 n_link_error_recovery_counter; /* starting count for PMA */ + u64 n_link_downed_counter; /* starting count for PMA */ + u64 n_port_rcv_errors; /* starting count for PMA */ + u64 n_port_rcv_remphys_errors; /* starting count for PMA */ + u64 n_port_xmit_discards; /* starting count for PMA */ + u64 n_port_xmit_data; /* starting count for PMA */ + u64 n_port_rcv_data; /* starting count for PMA */ + u64 n_port_xmit_packets; /* starting count for PMA */ + u64 n_port_rcv_packets; /* starting count for PMA */ + u32 n_pkey_violations; /* starting count for PMA */ u32 n_rc_resends; u32 n_rc_acks; u32 n_rc_qacks; @@ -473,7 +462,6 @@ struct ipath_ibdev { u32 n_other_naks; u32 n_timeouts; u32 n_pkt_drops; - u32 n_vl15_dropped; u32 n_wqe_errs; u32 n_rdma_dup_busy; u32 n_piowait; @@ -592,6 +580,10 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc); void ipath_get_credit(struct ipath_qp *qp, u32 aeth); +void ipath_do_rc_send(unsigned long data); + +void ipath_do_uc_send(unsigned long data); + void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig); int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, @@ -604,7 +596,7 @@ void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length); void ipath_skip_sge(struct ipath_sge_state *ss, u32 length); -int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr); +int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr); void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, int has_grh, void *data, u32 tlen, struct ipath_qp *qp); @@ -686,19 +678,7 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp); int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only); -u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr, - struct ib_global_route *grh, u32 hwords, u32 nwords); - -void ipath_do_ruc_send(unsigned long data); - -u32 ipath_make_rc_ack(struct ipath_qp *qp, struct ipath_other_headers *ohdr, - u32 pmtu); - -int ipath_make_rc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, - u32 pmtu, u32 *bth0p, u32 *bth2p); - -int ipath_make_uc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, - u32 pmtu, u32 *bth0p, u32 *bth2p); +void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc); extern const enum ib_wc_opcode ib_ipath_wc_opcode[]; @@ -708,24 +688,6 @@ extern const int ib_ipath_state_ops[]; extern unsigned int ib_ipath_lkey_table_size; -extern unsigned int ib_ipath_max_cqes; - -extern unsigned int ib_ipath_max_cqs; - -extern unsigned int ib_ipath_max_qp_wrs; - -extern unsigned int ib_ipath_max_sges; - -extern unsigned int ib_ipath_max_mcast_grps; - -extern unsigned int ib_ipath_max_mcast_qp_attached; - -extern unsigned int ib_ipath_max_srqs; - -extern unsigned int ib_ipath_max_srq_sges; - -extern unsigned int ib_ipath_max_srq_wrs; - extern const u32 ib_ipath_rnr_table[]; #endif /* IPATH_VERBS_H */ diff --git a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c index ee0e1d96d..10b31d2c4 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -93,7 +92,6 @@ static struct ipath_mcast *ipath_mcast_alloc(union ib_gid *mgid) INIT_LIST_HEAD(&mcast->qp_list); init_waitqueue_head(&mcast->wait); atomic_set(&mcast->refcount, 0); - mcast->n_attached = 0; bail: return mcast; @@ -159,8 +157,7 @@ bail: * the table but the QP was added. Return ESRCH if the QP was already * attached and neither structure was added. */ -static int ipath_mcast_add(struct ipath_ibdev *dev, - struct ipath_mcast *mcast, +static int ipath_mcast_add(struct ipath_mcast *mcast, struct ipath_mcast_qp *mqp) { struct rb_node **n = &mcast_tree.rb_node; @@ -191,47 +188,34 @@ static int ipath_mcast_add(struct ipath_ibdev *dev, /* Search the QP list to see if this is already there. */ list_for_each_entry_rcu(p, &tmcast->qp_list, list) { if (p->qp == mqp->qp) { + spin_unlock_irqrestore(&mcast_lock, flags); ret = ESRCH; goto bail; } } - if (tmcast->n_attached == ib_ipath_max_mcast_qp_attached) { - ret = ENOMEM; - goto bail; - } - - tmcast->n_attached++; - list_add_tail_rcu(&mqp->list, &tmcast->qp_list); + spin_unlock_irqrestore(&mcast_lock, flags); ret = EEXIST; goto bail; } - if (dev->n_mcast_grps_allocated == ib_ipath_max_mcast_grps) { - ret = ENOMEM; - goto bail; - } - - dev->n_mcast_grps_allocated++; - list_add_tail_rcu(&mqp->list, &mcast->qp_list); atomic_inc(&mcast->refcount); rb_link_node(&mcast->rb_node, pn, n); rb_insert_color(&mcast->rb_node, &mcast_tree); + spin_unlock_irqrestore(&mcast_lock, flags); + ret = 0; bail: - spin_unlock_irqrestore(&mcast_lock, flags); - return ret; } int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) { struct ipath_qp *qp = to_iqp(ibqp); - struct ipath_ibdev *dev = to_idev(ibqp->device); struct ipath_mcast *mcast; struct ipath_mcast_qp *mqp; int ret; @@ -251,7 +235,7 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ret = -ENOMEM; goto bail; } - switch (ipath_mcast_add(dev, mcast, mqp)) { + switch (ipath_mcast_add(mcast, mqp)) { case ESRCH: /* Neither was used: can't attach the same QP twice. */ ipath_mcast_qp_free(mqp); @@ -261,12 +245,6 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) case EEXIST: /* The mcast wasn't used */ ipath_mcast_free(mcast); break; - case ENOMEM: - /* Exceeded the maximum number of mcast groups. */ - ipath_mcast_qp_free(mqp); - ipath_mcast_free(mcast); - ret = -ENOMEM; - goto bail; default: break; } @@ -280,7 +258,6 @@ bail: int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) { struct ipath_qp *qp = to_iqp(ibqp); - struct ipath_ibdev *dev = to_idev(ibqp->device); struct ipath_mcast *mcast = NULL; struct ipath_mcast_qp *p, *tmp; struct rb_node *n; @@ -295,7 +272,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) while (1) { if (n == NULL) { spin_unlock_irqrestore(&mcast_lock, flags); - ret = -EINVAL; + ret = 0; goto bail; } @@ -319,7 +296,6 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) * link until we are sure there are no list walkers. */ list_del_rcu(&p->list); - mcast->n_attached--; /* If this was the last attached QP, remove the GID too. */ if (list_empty(&mcast->qp_list)) { @@ -343,7 +319,6 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) atomic_dec(&mcast->refcount); wait_event(mcast->wait, !atomic_read(&mcast->refcount)); ipath_mcast_free(mcast); - dev->n_mcast_grps_allocated--; } ret = 0; diff --git a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c index f8f9e2e8c..adc5322f1 100644 --- a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c +++ b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two diff --git a/drivers/infiniband/hw/ipath/ips_common.h b/drivers/infiniband/hw/ipath/ips_common.h new file mode 100644 index 000000000..ab7cbbbfd --- /dev/null +++ b/drivers/infiniband/hw/ipath/ips_common.h @@ -0,0 +1,263 @@ +#ifndef IPS_COMMON_H +#define IPS_COMMON_H +/* + * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include "ipath_common.h" + +struct ipath_header { + /* + * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - + * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, + * Port 3, TID 11, offset 14. + */ + __le32 ver_port_tid_offset; + __le16 chksum; + __le16 pkt_flags; +}; + +struct ips_message_header { + __be16 lrh[4]; + __be32 bth[3]; + /* fields below this point are in host byte order */ + struct ipath_header iph; + __u8 sub_opcode; + __u8 flags; + __u16 src_rank; + /* 24 bits. The upper 8 bit is available for other use */ + union { + struct { + unsigned ack_seq_num:24; + unsigned port:4; + unsigned unused:4; + }; + __u32 ack_seq_num_org; + }; + __u8 expected_tid_session_id; + __u8 tinylen; /* to aid MPI */ + union { + __u16 tag; /* to aid MPI */ + __u16 mqhdr; /* for PSM MQ */ + }; + union { + __u32 mpi[4]; /* to aid MPI */ + __u32 data[4]; + __u64 mq[2]; /* for PSM MQ */ + struct { + __u16 mtu; + __u8 major_ver; + __u8 minor_ver; + __u32 not_used; //free + __u32 run_id; + __u32 client_ver; + }; + }; +}; + +struct ether_header { + __be16 lrh[4]; + __be32 bth[3]; + struct ipath_header iph; + __u8 sub_opcode; + __u8 cmd; + __be16 lid; + __u16 mac[3]; + __u8 frag_num; + __u8 seq_num; + __le32 len; + /* MUST be of word size due to PIO write requirements */ + __le32 csum; + __le16 csum_offset; + __le16 flags; + __u16 first_2_bytes; + __u8 unused[2]; /* currently unused */ +}; + +/* + * The PIO buffer used for sending infinipath messages must only be written + * in 32-bit words, all the data must be written, and no writes can occur + * after the last word is written (which transfers "ownership" of the buffer + * to the chip and triggers the message to be sent). + * Since the Linux sk_buff structure can be recursive, non-aligned, and + * any number of bytes in each segment, we use the following structure + * to keep information about the overall state of the copy operation. + * This is used to save the information needed to store the checksum + * in the right place before sending the last word to the hardware and + * to buffer the last 0-3 bytes of non-word sized segments. + */ +struct copy_data_s { + struct ether_header *hdr; + /* addr of PIO buf to write csum to */ + __u32 __iomem *csum_pio; + __u32 __iomem *to; /* addr of PIO buf to write data to */ + __u32 device; /* which device to allocate PIO bufs from */ + __s32 error; /* set if there is an error. */ + __s32 extra; /* amount of data saved in u.buf below */ + __u32 len; /* total length to send in bytes */ + __u32 flen; /* frament length in words */ + __u32 csum; /* partial IP checksum */ + __u32 pos; /* position for partial checksum */ + __u32 offset; /* offset to where data currently starts */ + __s32 checksum_calc; /* set to 1 when csum has been calculated */ + struct sk_buff *skb; + union { + __u32 w; + __u8 buf[4]; + } u; +}; + +/* IB - LRH header consts */ +#define IPS_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */ +#define IPS_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */ + +#define IPS_OFFSET 0 + +/* + * defines the cut-off point between the header queue and eager/expected + * TID queue + */ +#define NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE \ + ((sizeof(struct ips_message_header) - \ + offsetof(struct ips_message_header, iph)) >> 2) + +/* OpCodes */ +#define OPCODE_IPS 0xC0 +#define OPCODE_ITH4X 0xC1 + +/* OpCode 30 is use by stand-alone test programs */ +#define OPCODE_RAW_DATA 0xDE +/* last OpCode (31) is reserved for test */ +#define OPCODE_TEST 0xDF + +/* sub OpCodes - ips */ +#define OPCODE_SEQ_DATA 0x01 +#define OPCODE_SEQ_CTRL 0x02 + +#define OPCODE_SEQ_MQ_DATA 0x03 +#define OPCODE_SEQ_MQ_CTRL 0x04 + +#define OPCODE_ACK 0x10 +#define OPCODE_NAK 0x11 + +#define OPCODE_ERR_CHK 0x20 +#define OPCODE_ERR_CHK_PLS 0x21 + +#define OPCODE_STARTUP 0x30 +#define OPCODE_STARTUP_ACK 0x31 +#define OPCODE_STARTUP_NAK 0x32 + +#define OPCODE_STARTUP_EXT 0x34 +#define OPCODE_STARTUP_ACK_EXT 0x35 +#define OPCODE_STARTUP_NAK_EXT 0x36 + +#define OPCODE_TIDS_RELEASE 0x40 +#define OPCODE_TIDS_RELEASE_CONFIRM 0x41 + +#define OPCODE_CLOSE 0x50 +#define OPCODE_CLOSE_ACK 0x51 +/* + * like OPCODE_CLOSE, but no complaint if other side has already closed. + * Used when doing abort(), MPI_Abort(), etc. + */ +#define OPCODE_ABORT 0x52 + +/* sub OpCodes - ith4x */ +#define OPCODE_ENCAP 0x81 +#define OPCODE_LID_ARP 0x82 + +/* Receive Header Queue: receive type (from infinipath) */ +#define RCVHQ_RCV_TYPE_EXPECTED 0 +#define RCVHQ_RCV_TYPE_EAGER 1 +#define RCVHQ_RCV_TYPE_NON_KD 2 +#define RCVHQ_RCV_TYPE_ERROR 3 + +/* misc. */ +#define SIZE_OF_CRC 1 + +#define EAGER_TID_ID INFINIPATH_I_TID_MASK + +#define IPS_DEFAULT_P_KEY 0xFFFF + +#define IPS_PERMISSIVE_LID 0xFFFF +#define IPS_MULTICAST_LID_BASE 0xC000 + +#define IPS_AETH_CREDIT_SHIFT 24 +#define IPS_AETH_CREDIT_MASK 0x1F +#define IPS_AETH_CREDIT_INVAL 0x1F + +#define IPS_PSN_MASK 0xFFFFFF +#define IPS_MSN_MASK 0xFFFFFF +#define IPS_QPN_MASK 0xFFFFFF +#define IPS_MULTICAST_QPN 0xFFFFFF + +/* functions for extracting fields from rcvhdrq entries */ +static inline __u32 ips_get_hdr_err_flags(const __le32 * rbuf) +{ + return __le32_to_cpu(rbuf[1]); +} + +static inline __u32 ips_get_index(const __le32 * rbuf) +{ + return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT) + & INFINIPATH_RHF_EGRINDEX_MASK; +} + +static inline __u32 ips_get_rcv_type(const __le32 * rbuf) +{ + return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT) + & INFINIPATH_RHF_RCVTYPE_MASK; +} + +static inline __u32 ips_get_length_in_bytes(const __le32 * rbuf) +{ + return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT) + & INFINIPATH_RHF_LENGTH_MASK) << 2; +} + +static inline void *ips_get_first_protocol_header(const __u32 * rbuf) +{ + return (void *)&rbuf[2]; +} + +static inline struct ips_message_header *ips_get_ips_header(const __u32 * + rbuf) +{ + return (struct ips_message_header *)&rbuf[2]; +} + +static inline __u32 ips_get_ipath_ver(__le32 hdrword) +{ + return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) + & INFINIPATH_I_VERS_MASK; +} + +#endif /* IPS_COMMON_H */ diff --git a/drivers/infiniband/hw/ipath/verbs_debug.h b/drivers/infiniband/hw/ipath/verbs_debug.h index 6186676f2..40d693cf3 100644 --- a/drivers/infiniband/hw/ipath/verbs_debug.h +++ b/drivers/infiniband/hw/ipath/verbs_debug.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2006 QLogic, Inc. All rights reserved. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two diff --git a/drivers/infiniband/hw/mthca/mthca_allocator.c b/drivers/infiniband/hw/mthca/mthca_allocator.c index f930e55b5..9ba3211ce 100644 --- a/drivers/infiniband/hw/mthca/mthca_allocator.c +++ b/drivers/infiniband/hw/mthca/mthca_allocator.c @@ -41,11 +41,9 @@ /* Trivial bitmap-based allocator */ u32 mthca_alloc(struct mthca_alloc *alloc) { - unsigned long flags; u32 obj; - spin_lock_irqsave(&alloc->lock, flags); - + spin_lock(&alloc->lock); obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); if (obj >= alloc->max) { alloc->top = (alloc->top + alloc->max) & alloc->mask; @@ -58,24 +56,19 @@ u32 mthca_alloc(struct mthca_alloc *alloc) } else obj = -1; - spin_unlock_irqrestore(&alloc->lock, flags); + spin_unlock(&alloc->lock); return obj; } void mthca_free(struct mthca_alloc *alloc, u32 obj) { - unsigned long flags; - obj &= alloc->max - 1; - - spin_lock_irqsave(&alloc->lock, flags); - + spin_lock(&alloc->lock); clear_bit(obj, alloc->table); alloc->last = min(alloc->last, obj); alloc->top = (alloc->top + alloc->max) & alloc->mask; - - spin_unlock_irqrestore(&alloc->lock, flags); + spin_unlock(&alloc->lock); } int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask, @@ -115,15 +108,14 @@ void mthca_alloc_cleanup(struct mthca_alloc *alloc) * serialize access to the array. */ -#define MTHCA_ARRAY_MASK (PAGE_SIZE / sizeof (void *) - 1) - void *mthca_array_get(struct mthca_array *array, int index) { int p = (index * sizeof (void *)) >> PAGE_SHIFT; - if (array->page_list[p].page) - return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; - else + if (array->page_list[p].page) { + int i = index & (PAGE_SIZE / sizeof (void *) - 1); + return array->page_list[p].page[i]; + } else return NULL; } @@ -138,7 +130,8 @@ int mthca_array_set(struct mthca_array *array, int index, void *value) if (!array->page_list[p].page) return -ENOMEM; - array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; + array->page_list[p].page[index & (PAGE_SIZE / sizeof (void *) - 1)] = + value; ++array->page_list[p].used; return 0; @@ -151,8 +144,7 @@ void mthca_array_clear(struct mthca_array *array, int index) if (--array->page_list[p].used == 0) { free_page((unsigned long) array->page_list[p].page); array->page_list[p].page = NULL; - } else - array->page_list[p].page[index & MTHCA_ARRAY_MASK] = NULL; + } if (array->page_list[p].used < 0) pr_debug("Array %p index %d page %d with ref count %d < 0\n", diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c index e215041b2..b12aa03be 100644 --- a/drivers/infiniband/hw/mthca/mthca_av.c +++ b/drivers/infiniband/hw/mthca/mthca_av.c @@ -303,10 +303,9 @@ int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr) memset(attr, 0, sizeof *attr); attr->dlid = be16_to_cpu(ah->av->dlid); attr->sl = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28; - attr->port_num = be32_to_cpu(ah->av->port_pd) >> 24; - attr->static_rate = mthca_rate_to_ib(dev, ah->av->msg_sr & 0x7, - attr->port_num); + attr->static_rate = ah->av->msg_sr & 0x7; attr->src_path_bits = ah->av->g_slid & 0x7F; + attr->port_num = be32_to_cpu(ah->av->port_pd) >> 24; attr->ah_flags = mthca_ah_grh_present(ah) ? IB_AH_GRH : 0; if (attr->ah_flags) { diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index deabc14b4..798e13e14 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -174,6 +174,7 @@ enum { struct mthca_cmd_context { struct completion done; + struct timer_list timer; int result; int next; u64 out_param; @@ -361,6 +362,15 @@ void mthca_cmd_event(struct mthca_dev *dev, complete(&context->done); } +static void event_timeout(unsigned long context_ptr) +{ + struct mthca_cmd_context *context = + (struct mthca_cmd_context *) context_ptr; + + context->result = -EBUSY; + complete(&context->done); +} + static int mthca_cmd_wait(struct mthca_dev *dev, u64 in_param, u64 *out_param, @@ -391,10 +401,11 @@ static int mthca_cmd_wait(struct mthca_dev *dev, if (err) goto out; - if (!wait_for_completion_timeout(&context->done, timeout)) { - err = -EBUSY; - goto out; - } + context->timer.expires = jiffies + timeout; + add_timer(&context->timer); + + wait_for_completion(&context->done); + del_timer_sync(&context->timer); err = context->result; if (err) @@ -524,6 +535,10 @@ int mthca_cmd_use_events(struct mthca_dev *dev) for (i = 0; i < dev->cmd.max_cmds; ++i) { dev->cmd.context[i].token = i; dev->cmd.context[i].next = i + 1; + init_timer(&dev->cmd.context[i].timer); + dev->cmd.context[i].timer.data = + (unsigned long) &dev->cmd.context[i]; + dev->cmd.context[i].timer.function = event_timeout; } dev->cmd.context[dev->cmd.max_cmds - 1].next = -1; @@ -778,12 +793,11 @@ int mthca_QUERY_FW(struct mthca_dev *dev, u8 *status) ((dev->fw_ver & 0xffff0000ull) >> 16) | ((dev->fw_ver & 0x0000ffffull) << 16); - MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET); - dev->cmd.max_cmds = 1 << lg; - mthca_dbg(dev, "FW version %012llx, max commands %d\n", (unsigned long long) dev->fw_ver, dev->cmd.max_cmds); + MTHCA_GET(lg, outbox, QUERY_FW_MAX_CMD_OFFSET); + dev->cmd.max_cmds = 1 << lg; MTHCA_GET(dev->catas_err.addr, outbox, QUERY_FW_ERR_START_OFFSET); MTHCA_GET(dev->catas_err.size, outbox, QUERY_FW_ERR_SIZE_OFFSET); diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 8030d6ade..205854e9c 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c @@ -39,8 +39,6 @@ #include #include -#include - #include #include "mthca_dev.h" @@ -212,11 +210,6 @@ static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, mthca_write64(doorbell, dev->kar + MTHCA_CQ_DOORBELL, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); - /* - * Make sure doorbells don't leak out of CQ spinlock - * and reach the HCA out of order: - */ - mmiowb(); } } @@ -547,17 +540,8 @@ static inline int mthca_poll_one(struct mthca_dev *dev, entry->wr_id = srq->wrid[wqe_index]; mthca_free_srq_wqe(srq, wqe); } else { - s32 wqe; wq = &(*cur_qp)->rq; - wqe = be32_to_cpu(cqe->wqe); - wqe_index = wqe >> wq->wqe_shift; - /* - * WQE addr == base - 1 might be reported in receive completion - * with error instead of (rq size - 1) by Sinai FW 1.0.800 and - * Arbel FW 5.1.400. This bug should be fixed in later FW revs. - */ - if (unlikely(wqe_index < 0)) - wqe_index = wq->max - 1; + wqe_index = be32_to_cpu(cqe->wqe) >> wq->wqe_shift; entry->wr_id = (*cur_qp)->wrid[wqe_index]; } @@ -829,7 +813,6 @@ int mthca_init_cq(struct mthca_dev *dev, int nent, spin_lock_init(&cq->lock); cq->refcount = 1; init_waitqueue_head(&cq->wait); - mutex_init(&cq->mutex); memset(cq_context, 0, sizeof *cq_context); cq_context->flags = cpu_to_be32(MTHCA_CQ_STATUS_OK | diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index a29b1b6d8..99f109c38 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c @@ -695,6 +695,10 @@ static void mthca_unmap_reg(struct mthca_dev *dev, unsigned long offset, static int __devinit mthca_map_eq_regs(struct mthca_dev *dev) { + unsigned long mthca_base; + + mthca_base = pci_resource_start(dev->pdev, 0); + if (mthca_is_memfree(dev)) { /* * We assume that the EQ arm and EQ set CI registers @@ -900,7 +904,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev) mthca_is_memfree(dev) ? mthca_arbel_interrupt : mthca_tavor_interrupt, - IRQF_SHARED, DRV_NAME, dev); + SA_SHIRQ, DRV_NAME, dev); if (err) goto err_out_cmd; dev->eq_table.have_irq = 1; diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c index 45e106f14..4730863ec 100644 --- a/drivers/infiniband/hw/mthca/mthca_mad.c +++ b/drivers/infiniband/hw/mthca/mthca_mad.c @@ -114,22 +114,14 @@ static void smp_snoop(struct ib_device *ibdev, mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && mad->mad_hdr.method == IB_MGMT_METHOD_SET) { if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) { - struct ib_port_info *pinfo = - (struct ib_port_info *) ((struct ib_smp *) mad)->data; - mthca_update_rate(to_mdev(ibdev), port_num); update_sm_ah(to_mdev(ibdev), port_num, - be16_to_cpu(pinfo->sm_lid), - pinfo->neighbormtu_mastersmsl & 0xf); + be16_to_cpup((__be16 *) (mad->data + 58)), + (*(u8 *) (mad->data + 76)) & 0xf); event.device = ibdev; + event.event = IB_EVENT_LID_CHANGE; event.element.port_num = port_num; - - if(pinfo->clientrereg_resv_subnetto & 0x80) - event.event = IB_EVENT_CLIENT_REREGISTER; - else - event.event = IB_EVENT_LID_CHANGE; - ib_dispatch_event(&event); } diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 7b82c1907..9b9ff7bff 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c @@ -34,6 +34,7 @@ * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $ */ +#include #include #include #include @@ -171,9 +172,8 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) { mthca_err(mdev, "HCA reported UAR size of 0x%x bigger than " - "PCI resource 2 size of 0x%llx, aborting.\n", - dev_lim->uar_size, - (unsigned long long)pci_resource_len(mdev->pdev, 2)); + "PCI resource 2 size of 0x%lx, aborting.\n", + dev_lim->uar_size, pci_resource_len(mdev->pdev, 2)); return -ENODEV; } @@ -967,12 +967,12 @@ static struct { } mthca_hca_table[] = { [TAVOR] = { .latest_fw = MTHCA_FW_VER(3, 4, 0), .flags = 0 }, - [ARBEL_COMPAT] = { .latest_fw = MTHCA_FW_VER(4, 7, 600), + [ARBEL_COMPAT] = { .latest_fw = MTHCA_FW_VER(4, 7, 400), .flags = MTHCA_FLAG_PCIE }, - [ARBEL_NATIVE] = { .latest_fw = MTHCA_FW_VER(5, 1, 400), + [ARBEL_NATIVE] = { .latest_fw = MTHCA_FW_VER(5, 1, 0), .flags = MTHCA_FLAG_MEMFREE | MTHCA_FLAG_PCIE }, - [SINAI] = { .latest_fw = MTHCA_FW_VER(1, 1, 0), + [SINAI] = { .latest_fw = MTHCA_FW_VER(1, 0, 800), .flags = MTHCA_FLAG_MEMFREE | MTHCA_FLAG_PCIE | MTHCA_FLAG_SINAI_OPT } diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 265b1d1c4..a2eae8a30 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c @@ -115,16 +115,6 @@ static int mthca_query_device(struct ib_device *ibdev, props->max_mcast_qp_attach = MTHCA_QP_PER_MGM; props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * props->max_mcast_grp; - /* - * If Sinai memory key optimization is being used, then only - * the 8-bit key portion will change. For other HCAs, the - * unused index bits will also be used for FMR remapping. - */ - if (mdev->mthca_flags & MTHCA_FLAG_SINAI_OPT) - props->max_map_per_fmr = 255; - else - props->max_map_per_fmr = - (1 << (32 - long_log2(mdev->limits.num_mpts))) - 1; err = 0; out: @@ -793,24 +783,18 @@ static int mthca_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *uda if (entries < 1 || entries > dev->limits.max_cqes) return -EINVAL; - mutex_lock(&cq->mutex); - entries = roundup_pow_of_two(entries + 1); - if (entries == ibcq->cqe + 1) { - ret = 0; - goto out; - } + if (entries == ibcq->cqe + 1) + return 0; if (cq->is_kernel) { ret = mthca_alloc_resize_buf(dev, cq, entries); if (ret) - goto out; + return ret; lkey = cq->resize_buf->buf.mr.ibmr.lkey; } else { - if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd)) { - ret = -EFAULT; - goto out; - } + if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd)) + return -EFAULT; lkey = ucmd.lkey; } @@ -827,7 +811,7 @@ static int mthca_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *uda cq->resize_buf = NULL; spin_unlock_irq(&cq->lock); } - goto out; + return ret; } if (cq->is_kernel) { @@ -854,10 +838,7 @@ static int mthca_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *uda } else ibcq->cqe = entries - 1; -out: - mutex_unlock(&cq->mutex); - - return ret; + return 0; } static int mthca_destroy_cq(struct ib_cq *cq) @@ -1287,7 +1268,11 @@ int mthca_register_device(struct mthca_dev *dev) (1ull << IB_USER_VERBS_CMD_MODIFY_QP) | (1ull << IB_USER_VERBS_CMD_DESTROY_QP) | (1ull << IB_USER_VERBS_CMD_ATTACH_MCAST) | - (1ull << IB_USER_VERBS_CMD_DETACH_MCAST); + (1ull << IB_USER_VERBS_CMD_DETACH_MCAST) | + (1ull << IB_USER_VERBS_CMD_CREATE_SRQ) | + (1ull << IB_USER_VERBS_CMD_MODIFY_SRQ) | + (1ull << IB_USER_VERBS_CMD_QUERY_SRQ) | + (1ull << IB_USER_VERBS_CMD_DESTROY_SRQ); dev->ib_dev.node_type = IB_NODE_CA; dev->ib_dev.phys_port_cnt = dev->limits.num_ports; dev->ib_dev.dma_device = &dev->pdev->dev; @@ -1312,11 +1297,6 @@ int mthca_register_device(struct mthca_dev *dev) dev->ib_dev.modify_srq = mthca_modify_srq; dev->ib_dev.query_srq = mthca_query_srq; dev->ib_dev.destroy_srq = mthca_destroy_srq; - dev->ib_dev.uverbs_cmd_mask |= - (1ull << IB_USER_VERBS_CMD_CREATE_SRQ) | - (1ull << IB_USER_VERBS_CMD_MODIFY_SRQ) | - (1ull << IB_USER_VERBS_CMD_QUERY_SRQ) | - (1ull << IB_USER_VERBS_CMD_DESTROY_SRQ); if (mthca_is_memfree(dev)) dev->ib_dev.post_srq_recv = mthca_arbel_post_srq_recv; diff --git a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h index 9a5bece3f..179a8f610 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.h +++ b/drivers/infiniband/hw/mthca/mthca_provider.h @@ -136,8 +136,8 @@ struct mthca_ah { * We have one global lock that protects dev->cq/qp_table. Each * struct mthca_cq/qp also has its own lock. An individual qp lock * may be taken inside of an individual cq lock. Both cqs attached to - * a qp may be locked, with the cq with the lower cqn locked first. - * No other nesting should be done. + * a qp may be locked, with the send cq locked first. No other + * nesting should be done. * * Each struct mthca_cq/qp also has an ref count, protected by the * corresponding table lock. The pointer from the cq/qp_table to the @@ -214,7 +214,6 @@ struct mthca_cq { int arm_sn; wait_queue_head_t wait; - struct mutex mutex; }; struct mthca_srq { @@ -238,7 +237,6 @@ struct mthca_srq { struct mthca_mr mr; wait_queue_head_t wait; - struct mutex mutex; }; struct mthca_wq { @@ -280,7 +278,6 @@ struct mthca_qp { union mthca_buf queue; wait_queue_head_t wait; - struct mutex mutex; }; struct mthca_sqp { diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index b66aa49c8..07c13be07 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -39,8 +39,6 @@ #include #include -#include - #include #include #include @@ -101,10 +99,6 @@ enum { MTHCA_QP_BIT_RSC = 1 << 3 }; -enum { - MTHCA_SEND_DOORBELL_FENCE = 1 << 5 -}; - struct mthca_qp_path { __be32 port_pkey; u8 rnr_retry; @@ -228,8 +222,9 @@ static void *get_send_wqe(struct mthca_qp *qp, int n) (PAGE_SIZE - 1)); } -static void mthca_wq_reset(struct mthca_wq *wq) +static void mthca_wq_init(struct mthca_wq *wq) { + spin_lock_init(&wq->lock); wq->next_ind = 0; wq->last_comp = wq->max - 1; wq->head = 0; @@ -539,9 +534,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) struct mthca_qp_context *qp_context; u32 sqd_event = 0; u8 status; - int err = -EINVAL; - - mutex_lock(&qp->mutex); + int err; if (attr_mask & IB_QP_CUR_STATE) { cur_state = attr->cur_qp_state; @@ -560,41 +553,39 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) "%d->%d with attr 0x%08x\n", qp->transport, cur_state, new_state, attr_mask); - goto out; + return -EINVAL; } if ((attr_mask & IB_QP_PKEY_INDEX) && attr->pkey_index >= dev->limits.pkey_table_len) { mthca_dbg(dev, "P_Key index (%u) too large. max is %d\n", attr->pkey_index, dev->limits.pkey_table_len-1); - goto out; + return -EINVAL; } if ((attr_mask & IB_QP_PORT) && (attr->port_num == 0 || attr->port_num > dev->limits.num_ports)) { mthca_dbg(dev, "Port number (%u) is invalid\n", attr->port_num); - goto out; + return -EINVAL; } if (attr_mask & IB_QP_MAX_QP_RD_ATOMIC && attr->max_rd_atomic > dev->limits.max_qp_init_rdma) { mthca_dbg(dev, "Max rdma_atomic as initiator %u too large (max is %d)\n", attr->max_rd_atomic, dev->limits.max_qp_init_rdma); - goto out; + return -EINVAL; } if (attr_mask & IB_QP_MAX_DEST_RD_ATOMIC && attr->max_dest_rd_atomic > 1 << dev->qp_table.rdb_shift) { mthca_dbg(dev, "Max rdma_atomic as responder %u too large (max %d)\n", attr->max_dest_rd_atomic, 1 << dev->qp_table.rdb_shift); - goto out; + return -EINVAL; } mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); - if (IS_ERR(mailbox)) { - err = PTR_ERR(mailbox); - goto out; - } + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); qp_param = mailbox->buf; qp_context = &qp_param->context; memset(qp_param, 0, sizeof *qp_param); @@ -627,7 +618,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_2048) { mthca_dbg(dev, "path MTU (%u) is invalid\n", attr->path_mtu); - goto out_mailbox; + return -EINVAL; } qp_context->mtu_msgmax = (attr->path_mtu << 5) | 31; } @@ -681,7 +672,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) if (attr_mask & IB_QP_AV) { if (mthca_path_set(dev, &attr->ah_attr, &qp_context->pri_path, attr_mask & IB_QP_PORT ? attr->port_num : qp->port)) - goto out_mailbox; + return -EINVAL; qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH); } @@ -695,18 +686,18 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) if (attr->alt_pkey_index >= dev->limits.pkey_table_len) { mthca_dbg(dev, "Alternate P_Key index (%u) too large. max is %d\n", attr->alt_pkey_index, dev->limits.pkey_table_len-1); - goto out_mailbox; + return -EINVAL; } if (attr->alt_port_num == 0 || attr->alt_port_num > dev->limits.num_ports) { mthca_dbg(dev, "Alternate port number (%u) is invalid\n", attr->alt_port_num); - goto out_mailbox; + return -EINVAL; } if (mthca_path_set(dev, &attr->alt_ah_attr, &qp_context->alt_path, attr->alt_ah_attr.port_num)) - goto out_mailbox; + return -EINVAL; qp_context->alt_path.port_pkey |= cpu_to_be32(attr->alt_pkey_index | attr->alt_port_num << 24); @@ -802,12 +793,12 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) err = mthca_MODIFY_QP(dev, cur_state, new_state, qp->qpn, 0, mailbox, sqd_event, &status); if (err) - goto out_mailbox; + goto out; if (status) { mthca_warn(dev, "modify QP %d->%d returned status %02x.\n", cur_state, new_state, status); err = -EINVAL; - goto out_mailbox; + goto out; } qp->state = new_state; @@ -850,10 +841,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); - mthca_wq_reset(&qp->sq); + mthca_wq_init(&qp->sq); qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); - mthca_wq_reset(&qp->rq); + mthca_wq_init(&qp->rq); qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); if (mthca_is_memfree(dev)) { @@ -862,11 +853,8 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) } } -out_mailbox: - mthca_free_mailbox(dev, mailbox); - out: - mutex_unlock(&qp->mutex); + mthca_free_mailbox(dev, mailbox); return err; } @@ -1112,16 +1100,12 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev, qp->refcount = 1; init_waitqueue_head(&qp->wait); - mutex_init(&qp->mutex); qp->state = IB_QPS_RESET; qp->atomic_rd_en = 0; qp->resp_depth = 0; qp->sq_policy = send_policy; - mthca_wq_reset(&qp->sq); - mthca_wq_reset(&qp->rq); - - spin_lock_init(&qp->sq.lock); - spin_lock_init(&qp->rq.lock); + mthca_wq_init(&qp->sq); + mthca_wq_init(&qp->rq); ret = mthca_map_memfree(dev, qp); if (ret) @@ -1265,32 +1249,6 @@ int mthca_alloc_qp(struct mthca_dev *dev, return 0; } -static void mthca_lock_cqs(struct mthca_cq *send_cq, struct mthca_cq *recv_cq) -{ - if (send_cq == recv_cq) - spin_lock_irq(&send_cq->lock); - else if (send_cq->cqn < recv_cq->cqn) { - spin_lock_irq(&send_cq->lock); - spin_lock_nested(&recv_cq->lock, SINGLE_DEPTH_NESTING); - } else { - spin_lock_irq(&recv_cq->lock); - spin_lock_nested(&send_cq->lock, SINGLE_DEPTH_NESTING); - } -} - -static void mthca_unlock_cqs(struct mthca_cq *send_cq, struct mthca_cq *recv_cq) -{ - if (send_cq == recv_cq) - spin_unlock_irq(&send_cq->lock); - else if (send_cq->cqn < recv_cq->cqn) { - spin_unlock(&recv_cq->lock); - spin_unlock_irq(&send_cq->lock); - } else { - spin_unlock(&send_cq->lock); - spin_unlock_irq(&recv_cq->lock); - } -} - int mthca_alloc_sqp(struct mthca_dev *dev, struct mthca_pd *pd, struct mthca_cq *send_cq, @@ -1343,13 +1301,17 @@ int mthca_alloc_sqp(struct mthca_dev *dev, * Lock CQs here, so that CQ polling code can do QP lookup * without taking a lock. */ - mthca_lock_cqs(send_cq, recv_cq); + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, mqpn); spin_unlock(&dev->qp_table.lock); - mthca_unlock_cqs(send_cq, recv_cq); + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); err_out: dma_free_coherent(&dev->pdev->dev, sqp->header_buf_size, @@ -1383,7 +1345,9 @@ void mthca_free_qp(struct mthca_dev *dev, * Lock CQs here, so that CQ polling code can do QP lookup * without taking a lock. */ - mthca_lock_cqs(send_cq, recv_cq); + spin_lock_irq(&send_cq->lock); + if (send_cq != recv_cq) + spin_lock(&recv_cq->lock); spin_lock(&dev->qp_table.lock); mthca_array_clear(&dev->qp_table.qp, @@ -1391,7 +1355,9 @@ void mthca_free_qp(struct mthca_dev *dev, --qp->refcount; spin_unlock(&dev->qp_table.lock); - mthca_unlock_cqs(send_cq, recv_cq); + if (send_cq != recv_cq) + spin_unlock(&recv_cq->lock); + spin_unlock_irq(&send_cq->lock); wait_event(qp->wait, !get_qp_refcount(dev, qp)); @@ -1526,7 +1492,7 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, int i; int size; int size0 = 0; - u32 f0; + u32 f0 = 0; int ind; u8 op0 = 0; @@ -1710,8 +1676,6 @@ int mthca_tavor_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, if (!size0) { size0 = size; op0 = mthca_opcode[wr->opcode]; - f0 = wr->send_flags & IB_SEND_FENCE ? - MTHCA_SEND_DOORBELL_FENCE : 0; } ++ind; @@ -1732,11 +1696,6 @@ out: mthca_write64(doorbell, dev->kar + MTHCA_SEND_DOORBELL, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); - /* - * Make sure doorbells don't leak out of SQ spinlock - * and reach the HCA out of order: - */ - mmiowb(); } qp->sq.next_ind = ind; @@ -1856,12 +1815,6 @@ out: qp->rq.next_ind = ind; qp->rq.head += nreq; - /* - * Make sure doorbells don't leak out of RQ spinlock and reach - * the HCA out of order: - */ - mmiowb(); - spin_unlock_irqrestore(&qp->rq.lock, flags); return err; } @@ -1880,7 +1833,7 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, int i; int size; int size0 = 0; - u32 f0; + u32 f0 = 0; int ind; u8 op0 = 0; @@ -2088,8 +2041,6 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, if (!size0) { size0 = size; op0 = mthca_opcode[wr->opcode]; - f0 = wr->send_flags & IB_SEND_FENCE ? - MTHCA_SEND_DOORBELL_FENCE : 0; } ++ind; @@ -2123,12 +2074,6 @@ out: MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - /* - * Make sure doorbells don't leak out of SQ spinlock and reach - * the HCA out of order: - */ - mmiowb(); - spin_unlock_irqrestore(&qp->sq.lock, flags); return err; } diff --git a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c index 91934f2d9..f4fddd532 100644 --- a/drivers/infiniband/hw/mthca/mthca_reset.c +++ b/drivers/infiniband/hw/mthca/mthca_reset.c @@ -32,6 +32,7 @@ * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $ */ +#include #include #include #include diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index a01f1a827..b292fefa3 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c @@ -35,8 +35,6 @@ #include #include -#include - #include "mthca_dev.h" #include "mthca_cmd.h" #include "mthca_memfree.h" @@ -245,7 +243,6 @@ int mthca_alloc_srq(struct mthca_dev *dev, struct mthca_pd *pd, spin_lock_init(&srq->lock); srq->refcount = 1; init_waitqueue_head(&srq->wait); - mutex_init(&srq->mutex); if (mthca_is_memfree(dev)) mthca_arbel_init_srq_context(dev, pd, srq, mailbox->buf); @@ -372,14 +369,9 @@ int mthca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, return -EINVAL; if (attr_mask & IB_SRQ_LIMIT) { - u32 max_wr = mthca_is_memfree(dev) ? srq->max - 1 : srq->max; - if (attr->srq_limit > max_wr) + if (attr->srq_limit > srq->max) return -EINVAL; - - mutex_lock(&srq->mutex); ret = mthca_ARM_SRQ(dev, srq->srqn, attr->srq_limit, &status); - mutex_unlock(&srq->mutex); - if (ret) return ret; if (status) @@ -595,12 +587,6 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr, MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); } - /* - * Make sure doorbells don't leak out of SRQ spinlock and - * reach the HCA out of order: - */ - mmiowb(); - spin_unlock_irqrestore(&srq->lock, flags); return err; } diff --git a/drivers/infiniband/ulp/ipoib/Kconfig b/drivers/infiniband/ulp/ipoib/Kconfig index d74653d7d..13d6d01c7 100644 --- a/drivers/infiniband/ulp/ipoib/Kconfig +++ b/drivers/infiniband/ulp/ipoib/Kconfig @@ -6,7 +6,8 @@ config INFINIBAND_IPOIB transports IP packets over InfiniBand so you can use your IB device as a fancy NIC. - See Documentation/infiniband/ipoib.txt for more information + The IPoIB protocol is defined by the IETF ipoib working + group: . config INFINIBAND_IPOIB_DEBUG bool "IP-over-InfiniBand debugging" if EMBEDDED diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 474aa214a..12a1e0572 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -212,7 +213,6 @@ struct ipoib_path { struct ipoib_neigh { struct ipoib_ah *ah; - union ib_gid dgid; struct sk_buff_head queue; struct neighbour *neighbour; @@ -272,7 +272,8 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port); void ipoib_dev_cleanup(struct net_device *dev); void ipoib_mcast_join_task(void *dev_ptr); -void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb); +void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid, + struct sk_buff *skb); void ipoib_mcast_restart_task(void *dev_ptr); int ipoib_mcast_start_thread(struct net_device *dev); @@ -368,26 +369,15 @@ extern int ipoib_debug_level; #endif /* CONFIG_INFINIBAND_IPOIB_DEBUG_DATA */ -#define IPOIB_GID_FMT "%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:" \ - "%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x:%2.2x%2.2x" - -#define IPOIB_GID_RAW_ARG(gid) ((u8 *)(gid))[0], \ - ((u8 *)(gid))[1], \ - ((u8 *)(gid))[2], \ - ((u8 *)(gid))[3], \ - ((u8 *)(gid))[4], \ - ((u8 *)(gid))[5], \ - ((u8 *)(gid))[6], \ - ((u8 *)(gid))[7], \ - ((u8 *)(gid))[8], \ - ((u8 *)(gid))[9], \ - ((u8 *)(gid))[10],\ - ((u8 *)(gid))[11],\ - ((u8 *)(gid))[12],\ - ((u8 *)(gid))[13],\ - ((u8 *)(gid))[14],\ - ((u8 *)(gid))[15] - -#define IPOIB_GID_ARG(gid) IPOIB_GID_RAW_ARG((gid).raw) +#define IPOIB_GID_FMT "%x:%x:%x:%x:%x:%x:%x:%x" + +#define IPOIB_GID_ARG(gid) be16_to_cpup((__be16 *) ((gid).raw + 0)), \ + be16_to_cpup((__be16 *) ((gid).raw + 2)), \ + be16_to_cpup((__be16 *) ((gid).raw + 4)), \ + be16_to_cpup((__be16 *) ((gid).raw + 6)), \ + be16_to_cpup((__be16 *) ((gid).raw + 8)), \ + be16_to_cpup((__be16 *) ((gid).raw + 10)), \ + be16_to_cpup((__be16 *) ((gid).raw + 12)), \ + be16_to_cpup((__be16 *) ((gid).raw + 14)) #endif /* _IPOIB_H */ diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c index f1cb83688..5dde380e8 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c @@ -141,7 +141,7 @@ static int ipoib_mcg_open(struct inode *inode, struct file *file) return ret; seq = file->private_data; - seq->private = inode->i_private; + seq->private = inode->u.generic_ip; return 0; } @@ -247,7 +247,7 @@ static int ipoib_path_open(struct inode *inode, struct file *file) return ret; seq = file->private_data; - seq->private = inode->i_private; + seq->private = inode->u.generic_ip; return 0; } diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index dcd996b3c..8406839b9 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -84,9 +84,15 @@ void ipoib_free_ah(struct kref *kref) unsigned long flags; - spin_lock_irqsave(&priv->lock, flags); - list_add_tail(&ah->list, &priv->dead_ahs); - spin_unlock_irqrestore(&priv->lock, flags); + if ((int) priv->tx_tail - (int) ah->last_send >= 0) { + ipoib_dbg(priv, "Freeing ah %p\n", ah->ah); + ib_destroy_ah(ah->ah); + kfree(ah); + } else { + spin_lock_irqsave(&priv->lock, flags); + list_add_tail(&ah->list, &priv->dead_ahs); + spin_unlock_irqrestore(&priv->lock, flags); + } } static int ipoib_ib_post_receive(struct net_device *dev, int id) @@ -371,16 +377,19 @@ static void __ipoib_reap_ah(struct net_device *dev) struct ipoib_ah *ah, *tah; LIST_HEAD(remove_list); - spin_lock_irq(&priv->tx_lock); - spin_lock(&priv->lock); + spin_lock_irq(&priv->lock); list_for_each_entry_safe(ah, tah, &priv->dead_ahs, list) if ((int) priv->tx_tail - (int) ah->last_send >= 0) { list_del(&ah->list); - ib_destroy_ah(ah->ah); - kfree(ah); + list_add_tail(&ah->list, &remove_list); } - spin_unlock(&priv->lock); - spin_unlock_irq(&priv->tx_lock); + spin_unlock_irq(&priv->lock); + + list_for_each_entry_safe(ah, tah, &remove_list, list) { + ipoib_dbg(priv, "Reaping ah %p\n", ah->ah); + ib_destroy_ah(ah->ah); + kfree(ah); + } } void ipoib_reap_ah(void *dev_ptr) @@ -619,10 +628,8 @@ void ipoib_ib_dev_flush(void *_dev) * The device could have been brought down between the start and when * we get here, don't bring it back up if it's not configured up */ - if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) { + if (test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags)) ipoib_ib_dev_up(dev); - ipoib_mcast_restart_task(dev); - } mutex_lock(&priv->vlan_mutex); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index cf71d2a55..cb078a7d0 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -185,7 +185,8 @@ static int ipoib_change_mtu(struct net_device *dev, int new_mtu) return 0; } -static struct ipoib_path *__path_find(struct net_device *dev, void *gid) +static struct ipoib_path *__path_find(struct net_device *dev, + union ib_gid *gid) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct rb_node *n = priv->path_tree.rb_node; @@ -195,7 +196,7 @@ static struct ipoib_path *__path_find(struct net_device *dev, void *gid) while (n) { path = rb_entry(n, struct ipoib_path, rb_node); - ret = memcmp(gid, path->pathrec.dgid.raw, + ret = memcmp(gid->raw, path->pathrec.dgid.raw, sizeof (union ib_gid)); if (ret < 0) @@ -404,8 +405,6 @@ static void path_rec_completion(int status, list_for_each_entry(neigh, &path->neigh_list, list) { kref_get(&path->ah->ref); neigh->ah = path->ah; - memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw, - sizeof(union ib_gid)); while ((skb = __skb_dequeue(&neigh->queue))) __skb_queue_tail(&skqueue, skb); @@ -425,7 +424,8 @@ static void path_rec_completion(int status, } } -static struct ipoib_path *path_rec_create(struct net_device *dev, void *gid) +static struct ipoib_path *path_rec_create(struct net_device *dev, + union ib_gid *gid) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_path *path; @@ -440,7 +440,7 @@ static struct ipoib_path *path_rec_create(struct net_device *dev, void *gid) INIT_LIST_HEAD(&path->neigh_list); - memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid)); + memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid)); path->pathrec.sgid = priv->local_gid; path->pathrec.pkey = cpu_to_be16(priv->pkey); path->pathrec.numb_path = 1; @@ -498,9 +498,10 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev) */ spin_lock(&priv->lock); - path = __path_find(dev, skb->dst->neighbour->ha + 4); + path = __path_find(dev, (union ib_gid *) (skb->dst->neighbour->ha + 4)); if (!path) { - path = path_rec_create(dev, skb->dst->neighbour->ha + 4); + path = path_rec_create(dev, + (union ib_gid *) (skb->dst->neighbour->ha + 4)); if (!path) goto err_path; @@ -512,8 +513,6 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev) if (path->ah) { kref_get(&path->ah->ref); neigh->ah = path->ah; - memcpy(&neigh->dgid.raw, &path->pathrec.dgid.raw, - sizeof(union ib_gid)); ipoib_send(dev, skb, path->ah, be32_to_cpup((__be32 *) skb->dst->neighbour->ha)); @@ -552,7 +551,7 @@ static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) /* Add in the P_Key for multicasts */ skb->dst->neighbour->ha[8] = (priv->pkey >> 8) & 0xff; skb->dst->neighbour->ha[9] = priv->pkey & 0xff; - ipoib_mcast_send(dev, skb->dst->neighbour->ha + 4, skb); + ipoib_mcast_send(dev, (union ib_gid *) (skb->dst->neighbour->ha + 4), skb); } static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, @@ -567,9 +566,10 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, */ spin_lock(&priv->lock); - path = __path_find(dev, phdr->hwaddr + 4); + path = __path_find(dev, (union ib_gid *) (phdr->hwaddr + 4)); if (!path) { - path = path_rec_create(dev, phdr->hwaddr + 4); + path = path_rec_create(dev, + (union ib_gid *) (phdr->hwaddr + 4)); if (path) { /* put pseudoheader back on for next time */ skb_push(skb, sizeof *phdr); @@ -637,25 +637,6 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) neigh = *to_ipoib_neigh(skb->dst->neighbour); if (likely(neigh->ah)) { - if (unlikely(memcmp(&neigh->dgid.raw, - skb->dst->neighbour->ha + 4, - sizeof(union ib_gid)))) { - spin_lock(&priv->lock); - /* - * It's safe to call ipoib_put_ah() inside - * priv->lock here, because we know that - * path->ah will always hold one more reference, - * so ipoib_put_ah() will never do more than - * decrement the ref count. - */ - ipoib_put_ah(neigh->ah); - list_del(&neigh->list); - ipoib_neigh_free(neigh); - spin_unlock(&priv->lock); - ipoib_path_lookup(skb, dev); - goto out; - } - ipoib_send(dev, skb, neigh->ah, be32_to_cpup((__be32 *) skb->dst->neighbour->ha)); goto out; @@ -679,7 +660,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) phdr->hwaddr[8] = (priv->pkey >> 8) & 0xff; phdr->hwaddr[9] = priv->pkey & 0xff; - ipoib_mcast_send(dev, phdr->hwaddr + 4, skb); + ipoib_mcast_send(dev, (union ib_gid *) (phdr->hwaddr + 4), skb); } else { /* unicast GID -- should be ARP or RARP reply */ @@ -690,7 +671,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) skb->dst ? "neigh" : "dst", be16_to_cpup((__be16 *) skb->data), be32_to_cpup((__be32 *) phdr->hwaddr), - IPOIB_GID_RAW_ARG(phdr->hwaddr + 4)); + IPOIB_GID_ARG(*(union ib_gid *) (phdr->hwaddr + 4))); dev_kfree_skb_any(skb); ++priv->stats.tx_dropped; goto out; @@ -773,7 +754,7 @@ static void ipoib_neigh_destructor(struct neighbour *n) ipoib_dbg(priv, "neigh_destructor for %06x " IPOIB_GID_FMT "\n", be32_to_cpup((__be32 *) n->ha), - IPOIB_GID_RAW_ARG(n->ha + 4)); + IPOIB_GID_ARG(*((union ib_gid *) (n->ha + 4)))); spin_lock_irqsave(&priv->lock, flags); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index ec356ce7c..1d917edcf 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -154,7 +154,7 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev, return mcast; } -static struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, void *mgid) +static struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, union ib_gid *mgid) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct rb_node *n = priv->multicast_tree.rb_node; @@ -165,7 +165,7 @@ static struct ipoib_mcast *__ipoib_mcast_find(struct net_device *dev, void *mgid mcast = rb_entry(n, struct ipoib_mcast, rb_node); - ret = memcmp(mgid, mcast->mcmember.mgid.raw, + ret = memcmp(mgid->raw, mcast->mcmember.mgid.raw, sizeof (union ib_gid)); if (ret < 0) n = n->rb_left; @@ -264,10 +264,6 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, if (!ah) { ipoib_warn(priv, "ib_address_create failed\n"); } else { - spin_lock_irq(&priv->lock); - mcast->ah = ah; - spin_unlock_irq(&priv->lock); - ipoib_dbg_mcast(priv, "MGID " IPOIB_GID_FMT " AV %p, LID 0x%04x, SL %d\n", IPOIB_GID_ARG(mcast->mcmember.mgid), @@ -275,6 +271,10 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, be16_to_cpu(mcast->mcmember.mlid), mcast->mcmember.sl); } + + spin_lock_irq(&priv->lock); + mcast->ah = ah; + spin_unlock_irq(&priv->lock); } /* actually send any queued packets */ @@ -326,7 +326,6 @@ ipoib_mcast_sendonly_join_complete(int status, /* Clear the busy flag so we try again */ clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); - mcast->query = NULL; } complete(&mcast->done); @@ -695,7 +694,8 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast) return 0; } -void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) +void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid, + struct sk_buff *skb) { struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_mcast *mcast; @@ -718,7 +718,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) if (!mcast) { /* Let's create a new send only group now */ ipoib_dbg_mcast(priv, "setting up send only multicast group for " - IPOIB_GID_FMT "\n", IPOIB_GID_RAW_ARG(mgid)); + IPOIB_GID_FMT "\n", IPOIB_GID_ARG(*mgid)); mcast = ipoib_mcast_alloc(dev, 0); if (!mcast) { @@ -730,7 +730,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) } set_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags); - memcpy(mcast->mcmember.mgid.raw, mgid, sizeof (union ib_gid)); + mcast->mcmember.mgid = *mgid; __ipoib_mcast_add(dev, mcast); list_add_tail(&mcast->list, &priv->multicast_list); } @@ -865,7 +865,8 @@ void ipoib_mcast_restart_task(void *dev_ptr) if (mcast) { /* Destroy the send only entry */ - list_move_tail(&mcast->list, &remove_list); + list_del(&mcast->list); + list_add_tail(&mcast->list, &remove_list); rb_replace_node(&mcast->rb_node, &nmcast->rb_node, @@ -890,7 +891,8 @@ void ipoib_mcast_restart_task(void *dev_ptr) rb_erase(&mcast->rb_node, &priv->multicast_tree); /* Move to the remove list */ - list_move_tail(&mcast->list, &remove_list); + list_del(&mcast->list); + list_add_tail(&mcast->list, &remove_list); } } diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 7b717c648..1d49d1643 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c @@ -255,8 +255,7 @@ void ipoib_event(struct ib_event_handler *handler, record->event == IB_EVENT_PKEY_CHANGE || record->event == IB_EVENT_PORT_ACTIVE || record->event == IB_EVENT_LID_CHANGE || - record->event == IB_EVENT_SM_CHANGE || - record->event == IB_EVENT_CLIENT_REREGISTER) { + record->event == IB_EVENT_SM_CHANGE) { ipoib_dbg(priv, "Port state change event\n"); queue_work(ipoib_workqueue, &priv->flush_task); } diff --git a/drivers/infiniband/ulp/iser/Kconfig b/drivers/infiniband/ulp/iser/Kconfig deleted file mode 100644 index fead87d1e..000000000 --- a/drivers/infiniband/ulp/iser/Kconfig +++ /dev/null @@ -1,11 +0,0 @@ -config INFINIBAND_ISER - tristate "ISCSI RDMA Protocol" - depends on INFINIBAND && SCSI - select SCSI_ISCSI_ATTRS - ---help--- - Support for the ISCSI RDMA Protocol over InfiniBand. This - allows you to access storage devices that speak ISER/ISCSI - over InfiniBand. - - The ISER protocol is defined by IETF. - See . diff --git a/drivers/infiniband/ulp/iser/Makefile b/drivers/infiniband/ulp/iser/Makefile deleted file mode 100644 index fe6cd15f2..000000000 --- a/drivers/infiniband/ulp/iser/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -obj-$(CONFIG_INFINIBAND_ISER) += ib_iser.o - -ib_iser-y := iser_verbs.o iser_initiator.o iser_memory.o \ - iscsi_iser.o diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c deleted file mode 100644 index 1437d7ee3..000000000 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - * iSCSI Initiator over iSER Data-Path - * - * Copyright (C) 2004 Dmitry Yusupov - * Copyright (C) 2004 Alex Aizman - * Copyright (C) 2005 Mike Christie - * Copyright (c) 2005, 2006 Voltaire, Inc. All rights reserved. - * maintained by openib-general@openib.org - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Credits: - * Christoph Hellwig - * FUJITA Tomonori - * Arne Redlich - * Zhenyu Wang - * Modified by: - * Erez Zilber - * - * - * $Id: iscsi_iser.c 6965 2006-05-07 11:36:20Z ogerlitz $ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "iscsi_iser.h" - -static unsigned int iscsi_max_lun = 512; -module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO); - -int iser_debug_level = 0; - -MODULE_DESCRIPTION("iSER (iSCSI Extensions for RDMA) Datamover " - "v" DRV_VER " (" DRV_DATE ")"); -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_AUTHOR("Alex Nezhinsky, Dan Bar Dov, Or Gerlitz"); - -module_param_named(debug_level, iser_debug_level, int, 0644); -MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0 (default:disabled)"); - -struct iser_global ig; - -void -iscsi_iser_recv(struct iscsi_conn *conn, - struct iscsi_hdr *hdr, char *rx_data, int rx_data_len) -{ - int rc = 0; - uint32_t ret_itt; - int datalen; - int ahslen; - - /* verify PDU length */ - datalen = ntoh24(hdr->dlength); - if (datalen != rx_data_len) { - printk(KERN_ERR "iscsi_iser: datalen %d (hdr) != %d (IB) \n", - datalen, rx_data_len); - rc = ISCSI_ERR_DATALEN; - goto error; - } - - /* read AHS */ - ahslen = hdr->hlength * 4; - - /* verify itt (itt encoding: age+cid+itt) */ - rc = iscsi_verify_itt(conn, hdr, &ret_itt); - - if (!rc) - rc = iscsi_complete_pdu(conn, hdr, rx_data, rx_data_len); - - if (rc && rc != ISCSI_ERR_NO_SCSI_CMD) - goto error; - - return; -error: - iscsi_conn_failure(conn, rc); -} - - -/** - * iscsi_iser_cmd_init - Initialize iSCSI SCSI_READ or SCSI_WRITE commands - * - **/ -static void -iscsi_iser_cmd_init(struct iscsi_cmd_task *ctask) -{ - struct iscsi_iser_conn *iser_conn = ctask->conn->dd_data; - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - struct scsi_cmnd *sc = ctask->sc; - - iser_ctask->command_sent = 0; - iser_ctask->iser_conn = iser_conn; - - if (sc->sc_data_direction == DMA_TO_DEVICE) { - BUG_ON(ctask->total_length == 0); - /* bytes to be sent via RDMA operations */ - iser_ctask->rdma_data_count = ctask->total_length - - ctask->imm_count - - ctask->unsol_count; - - debug_scsi("cmd [itt %x total %d imm %d unsol_data %d " - "rdma_data %d]\n", - ctask->itt, ctask->total_length, ctask->imm_count, - ctask->unsol_count, iser_ctask->rdma_data_count); - } else - /* bytes to be sent via RDMA operations */ - iser_ctask->rdma_data_count = ctask->total_length; - - iser_ctask_rdma_init(iser_ctask); -} - -/** - * iscsi_mtask_xmit - xmit management(immediate) task - * @conn: iscsi connection - * @mtask: task management task - * - * Notes: - * The function can return -EAGAIN in which case caller must - * call it again later, or recover. '0' return code means successful - * xmit. - * - **/ -static int -iscsi_iser_mtask_xmit(struct iscsi_conn *conn, - struct iscsi_mgmt_task *mtask) -{ - int error = 0; - - debug_scsi("mtask deq [cid %d itt 0x%x]\n", conn->id, mtask->itt); - - error = iser_send_control(conn, mtask); - - /* since iser xmits control with zero copy, mtasks can not be recycled - * right after sending them. - * The recycling scheme is based on whether a response is expected - * - if yes, the mtask is recycled at iscsi_complete_pdu - * - if no, the mtask is recycled at iser_snd_completion - */ - if (error && error != -EAGAIN) - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - - return error; -} - -static int -iscsi_iser_ctask_xmit_unsol_data(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask) -{ - struct iscsi_data hdr; - int error = 0; - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - - /* Send data-out PDUs while there's still unsolicited data to send */ - while (ctask->unsol_count > 0) { - iscsi_prep_unsolicit_data_pdu(ctask, &hdr, - iser_ctask->rdma_data_count); - - debug_scsi("Sending data-out: itt 0x%x, data count %d\n", - hdr.itt, ctask->data_count); - - /* the buffer description has been passed with the command */ - /* Send the command */ - error = iser_send_data_out(conn, ctask, &hdr); - if (error) { - ctask->unsol_datasn--; - goto iscsi_iser_ctask_xmit_unsol_data_exit; - } - ctask->unsol_count -= ctask->data_count; - debug_scsi("Need to send %d more as data-out PDUs\n", - ctask->unsol_count); - } - -iscsi_iser_ctask_xmit_unsol_data_exit: - return error; -} - -static int -iscsi_iser_ctask_xmit(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask) -{ - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - int error = 0; - - debug_scsi("ctask deq [cid %d itt 0x%x]\n", - conn->id, ctask->itt); - - /* - * serialize with TMF AbortTask - */ - if (ctask->mtask) - return error; - - /* Send the cmd PDU */ - if (!iser_ctask->command_sent) { - error = iser_send_command(conn, ctask); - if (error) - goto iscsi_iser_ctask_xmit_exit; - iser_ctask->command_sent = 1; - } - - /* Send unsolicited data-out PDU(s) if necessary */ - if (ctask->unsol_count) - error = iscsi_iser_ctask_xmit_unsol_data(conn, ctask); - - iscsi_iser_ctask_xmit_exit: - if (error && error != -EAGAIN) - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - return error; -} - -static void -iscsi_iser_cleanup_ctask(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) -{ - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - - if (iser_ctask->status == ISER_TASK_STATUS_STARTED) { - iser_ctask->status = ISER_TASK_STATUS_COMPLETED; - iser_ctask_rdma_finalize(iser_ctask); - } -} - -static struct iser_conn * -iscsi_iser_ib_conn_lookup(__u64 ep_handle) -{ - struct iser_conn *ib_conn; - struct iser_conn *uib_conn = (struct iser_conn *)(unsigned long)ep_handle; - - mutex_lock(&ig.connlist_mutex); - list_for_each_entry(ib_conn, &ig.connlist, conn_list) { - if (ib_conn == uib_conn) { - mutex_unlock(&ig.connlist_mutex); - return ib_conn; - } - } - mutex_unlock(&ig.connlist_mutex); - iser_err("no conn exists for eph %llx\n",(unsigned long long)ep_handle); - return NULL; -} - -static struct iscsi_cls_conn * -iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) -{ - struct iscsi_conn *conn; - struct iscsi_cls_conn *cls_conn; - struct iscsi_iser_conn *iser_conn; - - cls_conn = iscsi_conn_setup(cls_session, conn_idx); - if (!cls_conn) - return NULL; - conn = cls_conn->dd_data; - - /* - * due to issues with the login code re iser sematics - * this not set in iscsi_conn_setup - FIXME - */ - conn->max_recv_dlength = 128; - - iser_conn = kzalloc(sizeof(*iser_conn), GFP_KERNEL); - if (!iser_conn) - goto conn_alloc_fail; - - /* currently this is the only field which need to be initiated */ - rwlock_init(&iser_conn->lock); - - conn->dd_data = iser_conn; - iser_conn->iscsi_conn = conn; - - return cls_conn; - -conn_alloc_fail: - iscsi_conn_teardown(cls_conn); - return NULL; -} - -static void -iscsi_iser_conn_destroy(struct iscsi_cls_conn *cls_conn) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_iser_conn *iser_conn = conn->dd_data; - - iscsi_conn_teardown(cls_conn); - kfree(iser_conn); -} - -static int -iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session, - struct iscsi_cls_conn *cls_conn, uint64_t transport_eph, - int is_leading) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_iser_conn *iser_conn; - struct iser_conn *ib_conn; - int error; - - error = iscsi_conn_bind(cls_session, cls_conn, is_leading); - if (error) - return error; - - /* the transport ep handle comes from user space so it must be - * verified against the global ib connections list */ - ib_conn = iscsi_iser_ib_conn_lookup(transport_eph); - if (!ib_conn) { - iser_err("can't bind eph %llx\n", - (unsigned long long)transport_eph); - return -EINVAL; - } - /* binds the iSER connection retrieved from the previously - * connected ep_handle to the iSCSI layer connection. exchanges - * connection pointers */ - iser_err("binding iscsi conn %p to iser_conn %p\n",conn,ib_conn); - iser_conn = conn->dd_data; - ib_conn->iser_conn = iser_conn; - iser_conn->ib_conn = ib_conn; - - conn->recv_lock = &iser_conn->lock; - - return 0; -} - -static int -iscsi_iser_conn_start(struct iscsi_cls_conn *cls_conn) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - int err; - - err = iscsi_conn_start(cls_conn); - if (err) - return err; - - return iser_conn_set_full_featured_mode(conn); -} - -static struct iscsi_transport iscsi_iser_transport; - -static struct iscsi_cls_session * -iscsi_iser_session_create(struct iscsi_transport *iscsit, - struct scsi_transport_template *scsit, - uint32_t initial_cmdsn, uint32_t *hostno) -{ - struct iscsi_cls_session *cls_session; - struct iscsi_session *session; - int i; - uint32_t hn; - struct iscsi_cmd_task *ctask; - struct iscsi_mgmt_task *mtask; - struct iscsi_iser_cmd_task *iser_ctask; - struct iser_desc *desc; - - cls_session = iscsi_session_setup(iscsit, scsit, - sizeof(struct iscsi_iser_cmd_task), - sizeof(struct iser_desc), - initial_cmdsn, &hn); - if (!cls_session) - return NULL; - - *hostno = hn; - session = class_to_transport_session(cls_session); - - /* libiscsi setup itts, data and pool so just set desc fields */ - for (i = 0; i < session->cmds_max; i++) { - ctask = session->cmds[i]; - iser_ctask = ctask->dd_data; - ctask->hdr = (struct iscsi_cmd *)&iser_ctask->desc.iscsi_header; - } - - for (i = 0; i < session->mgmtpool_max; i++) { - mtask = session->mgmt_cmds[i]; - desc = mtask->dd_data; - mtask->hdr = &desc->iscsi_header; - desc->data = mtask->data; - } - - return cls_session; -} - -static int -iscsi_iser_set_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf, int buflen) -{ - int value; - - switch (param) { - case ISCSI_PARAM_MAX_RECV_DLENGTH: - /* TBD */ - break; - case ISCSI_PARAM_HDRDGST_EN: - sscanf(buf, "%d", &value); - if (value) { - printk(KERN_ERR "DataDigest wasn't negotiated to None"); - return -EPROTO; - } - break; - case ISCSI_PARAM_DATADGST_EN: - sscanf(buf, "%d", &value); - if (value) { - printk(KERN_ERR "DataDigest wasn't negotiated to None"); - return -EPROTO; - } - break; - case ISCSI_PARAM_IFMARKER_EN: - sscanf(buf, "%d", &value); - if (value) { - printk(KERN_ERR "IFMarker wasn't negotiated to No"); - return -EPROTO; - } - break; - case ISCSI_PARAM_OFMARKER_EN: - sscanf(buf, "%d", &value); - if (value) { - printk(KERN_ERR "OFMarker wasn't negotiated to No"); - return -EPROTO; - } - break; - default: - return iscsi_set_param(cls_conn, param, buf, buflen); - } - - return 0; -} - -static void -iscsi_iser_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - - stats->txdata_octets = conn->txdata_octets; - stats->rxdata_octets = conn->rxdata_octets; - stats->scsicmd_pdus = conn->scsicmd_pdus_cnt; - stats->dataout_pdus = conn->dataout_pdus_cnt; - stats->scsirsp_pdus = conn->scsirsp_pdus_cnt; - stats->datain_pdus = conn->datain_pdus_cnt; /* always 0 */ - stats->r2t_pdus = conn->r2t_pdus_cnt; /* always 0 */ - stats->tmfcmd_pdus = conn->tmfcmd_pdus_cnt; - stats->tmfrsp_pdus = conn->tmfrsp_pdus_cnt; - stats->custom_length = 3; - strcpy(stats->custom[0].desc, "qp_tx_queue_full"); - stats->custom[0].value = 0; /* TB iser_conn->qp_tx_queue_full; */ - strcpy(stats->custom[1].desc, "fmr_map_not_avail"); - stats->custom[1].value = 0; /* TB iser_conn->fmr_map_not_avail */; - strcpy(stats->custom[2].desc, "eh_abort_cnt"); - stats->custom[2].value = conn->eh_abort_cnt; -} - -static int -iscsi_iser_ep_connect(struct sockaddr *dst_addr, int non_blocking, - __u64 *ep_handle) -{ - int err; - struct iser_conn *ib_conn; - - err = iser_conn_init(&ib_conn); - if (err) - goto out; - - err = iser_connect(ib_conn, NULL, (struct sockaddr_in *)dst_addr, non_blocking); - if (!err) - *ep_handle = (__u64)(unsigned long)ib_conn; - -out: - return err; -} - -static int -iscsi_iser_ep_poll(__u64 ep_handle, int timeout_ms) -{ - struct iser_conn *ib_conn = iscsi_iser_ib_conn_lookup(ep_handle); - int rc; - - if (!ib_conn) - return -EINVAL; - - rc = wait_event_interruptible_timeout(ib_conn->wait, - ib_conn->state == ISER_CONN_UP, - msecs_to_jiffies(timeout_ms)); - - /* if conn establishment failed, return error code to iscsi */ - if (!rc && - (ib_conn->state == ISER_CONN_TERMINATING || - ib_conn->state == ISER_CONN_DOWN)) - rc = -1; - - iser_err("ib conn %p rc = %d\n", ib_conn, rc); - - if (rc > 0) - return 1; /* success, this is the equivalent of POLLOUT */ - else if (!rc) - return 0; /* timeout */ - else - return rc; /* signal */ -} - -static void -iscsi_iser_ep_disconnect(__u64 ep_handle) -{ - struct iser_conn *ib_conn; - - ib_conn = iscsi_iser_ib_conn_lookup(ep_handle); - if (!ib_conn) - return; - - iser_err("ib conn %p state %d\n",ib_conn, ib_conn->state); - iser_conn_terminate(ib_conn); -} - -static struct scsi_host_template iscsi_iser_sht = { - .name = "iSCSI Initiator over iSER, v." DRV_VER, - .queuecommand = iscsi_queuecommand, - .can_queue = ISCSI_XMIT_CMDS_MAX - 1, - .sg_tablesize = ISCSI_ISER_SG_TABLESIZE, - .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, - .eh_abort_handler = iscsi_eh_abort, - .eh_host_reset_handler = iscsi_eh_host_reset, - .use_clustering = DISABLE_CLUSTERING, - .proc_name = "iscsi_iser", - .this_id = -1, -}; - -static struct iscsi_transport iscsi_iser_transport = { - .owner = THIS_MODULE, - .name = "iser", - .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T, - .param_mask = ISCSI_MAX_RECV_DLENGTH | - ISCSI_MAX_XMIT_DLENGTH | - ISCSI_HDRDGST_EN | - ISCSI_DATADGST_EN | - ISCSI_INITIAL_R2T_EN | - ISCSI_MAX_R2T | - ISCSI_IMM_DATA_EN | - ISCSI_FIRST_BURST | - ISCSI_MAX_BURST | - ISCSI_PDU_INORDER_EN | - ISCSI_DATASEQ_INORDER_EN | - ISCSI_EXP_STATSN | - ISCSI_PERSISTENT_PORT | - ISCSI_PERSISTENT_ADDRESS | - ISCSI_TARGET_NAME | - ISCSI_TPGT, - .host_template = &iscsi_iser_sht, - .conndata_size = sizeof(struct iscsi_conn), - .max_lun = ISCSI_ISER_MAX_LUN, - .max_cmd_len = ISCSI_ISER_MAX_CMD_LEN, - /* session management */ - .create_session = iscsi_iser_session_create, - .destroy_session = iscsi_session_teardown, - /* connection management */ - .create_conn = iscsi_iser_conn_create, - .bind_conn = iscsi_iser_conn_bind, - .destroy_conn = iscsi_iser_conn_destroy, - .set_param = iscsi_iser_set_param, - .get_conn_param = iscsi_conn_get_param, - .get_session_param = iscsi_session_get_param, - .start_conn = iscsi_iser_conn_start, - .stop_conn = iscsi_conn_stop, - /* IO */ - .send_pdu = iscsi_conn_send_pdu, - .get_stats = iscsi_iser_conn_get_stats, - .init_cmd_task = iscsi_iser_cmd_init, - .xmit_cmd_task = iscsi_iser_ctask_xmit, - .xmit_mgmt_task = iscsi_iser_mtask_xmit, - .cleanup_cmd_task = iscsi_iser_cleanup_ctask, - /* recovery */ - .session_recovery_timedout = iscsi_session_recovery_timedout, - - .ep_connect = iscsi_iser_ep_connect, - .ep_poll = iscsi_iser_ep_poll, - .ep_disconnect = iscsi_iser_ep_disconnect -}; - -static int __init iser_init(void) -{ - int err; - - iser_dbg("Starting iSER datamover...\n"); - - if (iscsi_max_lun < 1) { - printk(KERN_ERR "Invalid max_lun value of %u\n", iscsi_max_lun); - return -EINVAL; - } - - iscsi_iser_transport.max_lun = iscsi_max_lun; - - memset(&ig, 0, sizeof(struct iser_global)); - - ig.desc_cache = kmem_cache_create("iser_descriptors", - sizeof (struct iser_desc), - 0, SLAB_HWCACHE_ALIGN, - NULL, NULL); - if (ig.desc_cache == NULL) - return -ENOMEM; - - /* device init is called only after the first addr resolution */ - mutex_init(&ig.device_list_mutex); - INIT_LIST_HEAD(&ig.device_list); - mutex_init(&ig.connlist_mutex); - INIT_LIST_HEAD(&ig.connlist); - - if (!iscsi_register_transport(&iscsi_iser_transport)) { - iser_err("iscsi_register_transport failed\n"); - err = -EINVAL; - goto register_transport_failure; - } - - return 0; - -register_transport_failure: - kmem_cache_destroy(ig.desc_cache); - - return err; -} - -static void __exit iser_exit(void) -{ - iser_dbg("Removing iSER datamover...\n"); - iscsi_unregister_transport(&iscsi_iser_transport); - kmem_cache_destroy(ig.desc_cache); -} - -module_init(iser_init); -module_exit(iser_exit); diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h deleted file mode 100644 index 3350ba690..000000000 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ /dev/null @@ -1,354 +0,0 @@ -/* - * iSER transport for the Open iSCSI Initiator & iSER transport internals - * - * Copyright (C) 2004 Dmitry Yusupov - * Copyright (C) 2004 Alex Aizman - * Copyright (C) 2005 Mike Christie - * based on code maintained by open-iscsi@googlegroups.com - * - * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. - * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * $Id: iscsi_iser.h 7051 2006-05-10 12:29:11Z ogerlitz $ - */ -#ifndef __ISCSI_ISER_H__ -#define __ISCSI_ISER_H__ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#define DRV_NAME "iser" -#define PFX DRV_NAME ": " -#define DRV_VER "0.1" -#define DRV_DATE "May 7th, 2006" - -#define iser_dbg(fmt, arg...) \ - do { \ - if (iser_debug_level > 0) \ - printk(KERN_DEBUG PFX "%s:" fmt,\ - __func__ , ## arg); \ - } while (0) - -#define iser_err(fmt, arg...) \ - do { \ - printk(KERN_ERR PFX "%s:" fmt, \ - __func__ , ## arg); \ - } while (0) - - /* support upto 512KB in one RDMA */ -#define ISCSI_ISER_SG_TABLESIZE (0x80000 >> PAGE_SHIFT) -#define ISCSI_ISER_MAX_LUN 256 -#define ISCSI_ISER_MAX_CMD_LEN 16 - -/* QP settings */ -/* Maximal bounds on received asynchronous PDUs */ -#define ISER_MAX_RX_MISC_PDUS 4 /* NOOP_IN(2) , ASYNC_EVENT(2) */ - -#define ISER_MAX_TX_MISC_PDUS 6 /* NOOP_OUT(2), TEXT(1), * - * SCSI_TMFUNC(2), LOGOUT(1) */ - -#define ISER_QP_MAX_RECV_DTOS (ISCSI_XMIT_CMDS_MAX + \ - ISER_MAX_RX_MISC_PDUS + \ - ISER_MAX_TX_MISC_PDUS) - -/* the max TX (send) WR supported by the iSER QP is defined by * - * max_send_wr = T * (1 + D) + C ; D is how many inflight dataouts we expect * - * to have at max for SCSI command. The tx posting & completion handling code * - * supports -EAGAIN scheme where tx is suspended till the QP has room for more * - * send WR. D=8 comes from 64K/8K */ - -#define ISER_INFLIGHT_DATAOUTS 8 - -#define ISER_QP_MAX_REQ_DTOS (ISCSI_XMIT_CMDS_MAX * \ - (1 + ISER_INFLIGHT_DATAOUTS) + \ - ISER_MAX_TX_MISC_PDUS + \ - ISER_MAX_RX_MISC_PDUS) - -#define ISER_VER 0x10 -#define ISER_WSV 0x08 -#define ISER_RSV 0x04 - -struct iser_hdr { - u8 flags; - u8 rsvd[3]; - __be32 write_stag; /* write rkey */ - __be64 write_va; - __be32 read_stag; /* read rkey */ - __be64 read_va; -} __attribute__((packed)); - - -/* Length of an object name string */ -#define ISER_OBJECT_NAME_SIZE 64 - -enum iser_ib_conn_state { - ISER_CONN_INIT, /* descriptor allocd, no conn */ - ISER_CONN_PENDING, /* in the process of being established */ - ISER_CONN_UP, /* up and running */ - ISER_CONN_TERMINATING, /* in the process of being terminated */ - ISER_CONN_DOWN, /* shut down */ - ISER_CONN_STATES_NUM -}; - -enum iser_task_status { - ISER_TASK_STATUS_INIT = 0, - ISER_TASK_STATUS_STARTED, - ISER_TASK_STATUS_COMPLETED -}; - -enum iser_data_dir { - ISER_DIR_IN = 0, /* to initiator */ - ISER_DIR_OUT, /* from initiator */ - ISER_DIRS_NUM -}; - -struct iser_data_buf { - void *buf; /* pointer to the sg list */ - unsigned int size; /* num entries of this sg */ - unsigned long data_len; /* total data len */ - unsigned int dma_nents; /* returned by dma_map_sg */ - char *copy_buf; /* allocated copy buf for SGs unaligned * - * for rdma which are copied */ - struct scatterlist sg_single; /* SG-ified clone of a non SG SC or * - * unaligned SG */ - }; - -/* fwd declarations */ -struct iser_device; -struct iscsi_iser_conn; -struct iscsi_iser_cmd_task; - -struct iser_mem_reg { - u32 lkey; - u32 rkey; - u64 va; - u64 len; - void *mem_h; -}; - -struct iser_regd_buf { - struct iser_mem_reg reg; /* memory registration info */ - void *virt_addr; - struct iser_device *device; /* device->device for dma_unmap */ - dma_addr_t dma_addr; /* if non zero, addr for dma_unmap */ - enum dma_data_direction direction; /* direction for dma_unmap */ - unsigned int data_size; - atomic_t ref_count; /* refcount, freed when dec to 0 */ -}; - -#define MAX_REGD_BUF_VECTOR_LEN 2 - -struct iser_dto { - struct iscsi_iser_cmd_task *ctask; - struct iscsi_iser_conn *conn; - int notify_enable; - - /* vector of registered buffers */ - unsigned int regd_vector_len; - struct iser_regd_buf *regd[MAX_REGD_BUF_VECTOR_LEN]; - - /* offset into the registered buffer may be specified */ - unsigned int offset[MAX_REGD_BUF_VECTOR_LEN]; - - /* a smaller size may be specified, if 0, then full size is used */ - unsigned int used_sz[MAX_REGD_BUF_VECTOR_LEN]; -}; - -enum iser_desc_type { - ISCSI_RX, - ISCSI_TX_CONTROL , - ISCSI_TX_SCSI_COMMAND, - ISCSI_TX_DATAOUT -}; - -struct iser_desc { - struct iser_hdr iser_header; - struct iscsi_hdr iscsi_header; - struct iser_regd_buf hdr_regd_buf; - void *data; /* used by RX & TX_CONTROL */ - struct iser_regd_buf data_regd_buf; /* used by RX & TX_CONTROL */ - enum iser_desc_type type; - struct iser_dto dto; -}; - -struct iser_device { - struct ib_device *ib_device; - struct ib_pd *pd; - struct ib_cq *cq; - struct ib_mr *mr; - struct tasklet_struct cq_tasklet; - struct list_head ig_list; /* entry in ig devices list */ - int refcount; -}; - -struct iser_conn { - struct iscsi_iser_conn *iser_conn; /* iser conn for upcalls */ - enum iser_ib_conn_state state; /* rdma connection state */ - spinlock_t lock; /* used for state changes */ - struct iser_device *device; /* device context */ - struct rdma_cm_id *cma_id; /* CMA ID */ - struct ib_qp *qp; /* QP */ - struct ib_fmr_pool *fmr_pool; /* pool of IB FMRs */ - int disc_evt_flag; /* disconn event delivered */ - wait_queue_head_t wait; /* waitq for conn/disconn */ - atomic_t post_recv_buf_count; /* posted rx count */ - atomic_t post_send_buf_count; /* posted tx count */ - struct work_struct comperror_work; /* conn term sleepable ctx*/ - char name[ISER_OBJECT_NAME_SIZE]; - struct iser_page_vec *page_vec; /* represents SG to fmr maps* - * maps serialized as tx is*/ - struct list_head conn_list; /* entry in ig conn list */ -}; - -struct iscsi_iser_conn { - struct iscsi_conn *iscsi_conn;/* ptr to iscsi conn */ - struct iser_conn *ib_conn; /* iSER IB conn */ - - rwlock_t lock; -}; - -struct iscsi_iser_cmd_task { - struct iser_desc desc; - struct iscsi_iser_conn *iser_conn; - int rdma_data_count;/* RDMA bytes */ - enum iser_task_status status; - int command_sent; /* set if command sent */ - int dir[ISER_DIRS_NUM]; /* set if dir use*/ - struct iser_regd_buf rdma_regd[ISER_DIRS_NUM];/* regd rdma buf */ - struct iser_data_buf data[ISER_DIRS_NUM]; /* orig. data des*/ - struct iser_data_buf data_copy[ISER_DIRS_NUM];/* contig. copy */ -}; - -struct iser_page_vec { - u64 *pages; - int length; - int offset; - int data_size; -}; - -struct iser_global { - struct mutex device_list_mutex;/* */ - struct list_head device_list; /* all iSER devices */ - struct mutex connlist_mutex; - struct list_head connlist; /* all iSER IB connections */ - - kmem_cache_t *desc_cache; -}; - -extern struct iser_global ig; -extern int iser_debug_level; - -/* allocate connection resources needed for rdma functionality */ -int iser_conn_set_full_featured_mode(struct iscsi_conn *conn); - -int iser_send_control(struct iscsi_conn *conn, - struct iscsi_mgmt_task *mtask); - -int iser_send_command(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask); - -int iser_send_data_out(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask, - struct iscsi_data *hdr); - -void iscsi_iser_recv(struct iscsi_conn *conn, - struct iscsi_hdr *hdr, - char *rx_data, - int rx_data_len); - -int iser_conn_init(struct iser_conn **ib_conn); - -void iser_conn_terminate(struct iser_conn *ib_conn); - -void iser_conn_release(struct iser_conn *ib_conn); - -void iser_rcv_completion(struct iser_desc *desc, - unsigned long dto_xfer_len); - -void iser_snd_completion(struct iser_desc *desc); - -void iser_ctask_rdma_init(struct iscsi_iser_cmd_task *ctask); - -void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task *ctask); - -void iser_dto_buffs_release(struct iser_dto *dto); - -int iser_regd_buff_release(struct iser_regd_buf *regd_buf); - -void iser_reg_single(struct iser_device *device, - struct iser_regd_buf *regd_buf, - enum dma_data_direction direction); - -int iser_start_rdma_unaligned_sg(struct iscsi_iser_cmd_task *ctask, - enum iser_data_dir cmd_dir); - -void iser_finalize_rdma_unaligned_sg(struct iscsi_iser_cmd_task *ctask, - enum iser_data_dir cmd_dir); - -int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *ctask, - enum iser_data_dir cmd_dir); - -int iser_connect(struct iser_conn *ib_conn, - struct sockaddr_in *src_addr, - struct sockaddr_in *dst_addr, - int non_blocking); - -int iser_reg_page_vec(struct iser_conn *ib_conn, - struct iser_page_vec *page_vec, - struct iser_mem_reg *mem_reg); - -void iser_unreg_mem(struct iser_mem_reg *mem_reg); - -int iser_post_recv(struct iser_desc *rx_desc); -int iser_post_send(struct iser_desc *tx_desc); - -int iser_conn_state_comp(struct iser_conn *ib_conn, - enum iser_ib_conn_state comp); -#endif diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c deleted file mode 100644 index ccf56f6f7..000000000 --- a/drivers/infiniband/ulp/iser/iser_initiator.c +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * $Id: iser_initiator.c 6964 2006-05-07 11:11:43Z ogerlitz $ - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "iscsi_iser.h" - -/* Constant PDU lengths calculations */ -#define ISER_TOTAL_HEADERS_LEN (sizeof (struct iser_hdr) + \ - sizeof (struct iscsi_hdr)) - -/* iser_dto_add_regd_buff - increments the reference count for * - * the registered buffer & adds it to the DTO object */ -static void iser_dto_add_regd_buff(struct iser_dto *dto, - struct iser_regd_buf *regd_buf, - unsigned long use_offset, - unsigned long use_size) -{ - int add_idx; - - atomic_inc(®d_buf->ref_count); - - add_idx = dto->regd_vector_len; - dto->regd[add_idx] = regd_buf; - dto->used_sz[add_idx] = use_size; - dto->offset[add_idx] = use_offset; - - dto->regd_vector_len++; -} - -static int iser_dma_map_task_data(struct iscsi_iser_cmd_task *iser_ctask, - struct iser_data_buf *data, - enum iser_data_dir iser_dir, - enum dma_data_direction dma_dir) -{ - struct device *dma_device; - - iser_ctask->dir[iser_dir] = 1; - dma_device = iser_ctask->iser_conn->ib_conn->device->ib_device->dma_device; - - data->dma_nents = dma_map_sg(dma_device, data->buf, data->size, dma_dir); - if (data->dma_nents == 0) { - iser_err("dma_map_sg failed!!!\n"); - return -EINVAL; - } - return 0; -} - -static void iser_dma_unmap_task_data(struct iscsi_iser_cmd_task *iser_ctask) -{ - struct device *dma_device; - struct iser_data_buf *data; - - dma_device = iser_ctask->iser_conn->ib_conn->device->ib_device->dma_device; - - if (iser_ctask->dir[ISER_DIR_IN]) { - data = &iser_ctask->data[ISER_DIR_IN]; - dma_unmap_sg(dma_device, data->buf, data->size, DMA_FROM_DEVICE); - } - - if (iser_ctask->dir[ISER_DIR_OUT]) { - data = &iser_ctask->data[ISER_DIR_OUT]; - dma_unmap_sg(dma_device, data->buf, data->size, DMA_TO_DEVICE); - } -} - -/* Register user buffer memory and initialize passive rdma - * dto descriptor. Total data size is stored in - * iser_ctask->data[ISER_DIR_IN].data_len - */ -static int iser_prepare_read_cmd(struct iscsi_cmd_task *ctask, - unsigned int edtl) - -{ - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - struct iser_regd_buf *regd_buf; - int err; - struct iser_hdr *hdr = &iser_ctask->desc.iser_header; - struct iser_data_buf *buf_in = &iser_ctask->data[ISER_DIR_IN]; - - err = iser_dma_map_task_data(iser_ctask, - buf_in, - ISER_DIR_IN, - DMA_FROM_DEVICE); - if (err) - return err; - - if (edtl > iser_ctask->data[ISER_DIR_IN].data_len) { - iser_err("Total data length: %ld, less than EDTL: " - "%d, in READ cmd BHS itt: %d, conn: 0x%p\n", - iser_ctask->data[ISER_DIR_IN].data_len, edtl, - ctask->itt, iser_ctask->iser_conn); - return -EINVAL; - } - - err = iser_reg_rdma_mem(iser_ctask,ISER_DIR_IN); - if (err) { - iser_err("Failed to set up Data-IN RDMA\n"); - return err; - } - regd_buf = &iser_ctask->rdma_regd[ISER_DIR_IN]; - - hdr->flags |= ISER_RSV; - hdr->read_stag = cpu_to_be32(regd_buf->reg.rkey); - hdr->read_va = cpu_to_be64(regd_buf->reg.va); - - iser_dbg("Cmd itt:%d READ tags RKEY:%#.4X VA:%#llX\n", - ctask->itt, regd_buf->reg.rkey, - (unsigned long long)regd_buf->reg.va); - - return 0; -} - -/* Register user buffer memory and initialize passive rdma - * dto descriptor. Total data size is stored in - * ctask->data[ISER_DIR_OUT].data_len - */ -static int -iser_prepare_write_cmd(struct iscsi_cmd_task *ctask, - unsigned int imm_sz, - unsigned int unsol_sz, - unsigned int edtl) -{ - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - struct iser_regd_buf *regd_buf; - int err; - struct iser_dto *send_dto = &iser_ctask->desc.dto; - struct iser_hdr *hdr = &iser_ctask->desc.iser_header; - struct iser_data_buf *buf_out = &iser_ctask->data[ISER_DIR_OUT]; - - err = iser_dma_map_task_data(iser_ctask, - buf_out, - ISER_DIR_OUT, - DMA_TO_DEVICE); - if (err) - return err; - - if (edtl > iser_ctask->data[ISER_DIR_OUT].data_len) { - iser_err("Total data length: %ld, less than EDTL: %d, " - "in WRITE cmd BHS itt: %d, conn: 0x%p\n", - iser_ctask->data[ISER_DIR_OUT].data_len, - edtl, ctask->itt, ctask->conn); - return -EINVAL; - } - - err = iser_reg_rdma_mem(iser_ctask,ISER_DIR_OUT); - if (err != 0) { - iser_err("Failed to register write cmd RDMA mem\n"); - return err; - } - - regd_buf = &iser_ctask->rdma_regd[ISER_DIR_OUT]; - - if (unsol_sz < edtl) { - hdr->flags |= ISER_WSV; - hdr->write_stag = cpu_to_be32(regd_buf->reg.rkey); - hdr->write_va = cpu_to_be64(regd_buf->reg.va + unsol_sz); - - iser_dbg("Cmd itt:%d, WRITE tags, RKEY:%#.4X " - "VA:%#llX + unsol:%d\n", - ctask->itt, regd_buf->reg.rkey, - (unsigned long long)regd_buf->reg.va, unsol_sz); - } - - if (imm_sz > 0) { - iser_dbg("Cmd itt:%d, WRITE, adding imm.data sz: %d\n", - ctask->itt, imm_sz); - iser_dto_add_regd_buff(send_dto, - regd_buf, - 0, - imm_sz); - } - - return 0; -} - -/** - * iser_post_receive_control - allocates, initializes and posts receive DTO. - */ -static int iser_post_receive_control(struct iscsi_conn *conn) -{ - struct iscsi_iser_conn *iser_conn = conn->dd_data; - struct iser_desc *rx_desc; - struct iser_regd_buf *regd_hdr; - struct iser_regd_buf *regd_data; - struct iser_dto *recv_dto = NULL; - struct iser_device *device = iser_conn->ib_conn->device; - int rx_data_size, err = 0; - - rx_desc = kmem_cache_alloc(ig.desc_cache, GFP_NOIO); - if (rx_desc == NULL) { - iser_err("Failed to alloc desc for post recv\n"); - return -ENOMEM; - } - rx_desc->type = ISCSI_RX; - - /* for the login sequence we must support rx of upto 8K; login is done - * after conn create/bind (connect) and conn stop/bind (reconnect), - * what's common for both schemes is that the connection is not started - */ - if (conn->c_stage != ISCSI_CONN_STARTED) - rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; - else /* FIXME till user space sets conn->max_recv_dlength correctly */ - rx_data_size = 128; - - rx_desc->data = kmalloc(rx_data_size, GFP_NOIO); - if (rx_desc->data == NULL) { - iser_err("Failed to alloc data buf for post recv\n"); - err = -ENOMEM; - goto post_rx_kmalloc_failure; - } - - recv_dto = &rx_desc->dto; - recv_dto->conn = iser_conn; - recv_dto->regd_vector_len = 0; - - regd_hdr = &rx_desc->hdr_regd_buf; - memset(regd_hdr, 0, sizeof(struct iser_regd_buf)); - regd_hdr->device = device; - regd_hdr->virt_addr = rx_desc; /* == &rx_desc->iser_header */ - regd_hdr->data_size = ISER_TOTAL_HEADERS_LEN; - - iser_reg_single(device, regd_hdr, DMA_FROM_DEVICE); - - iser_dto_add_regd_buff(recv_dto, regd_hdr, 0, 0); - - regd_data = &rx_desc->data_regd_buf; - memset(regd_data, 0, sizeof(struct iser_regd_buf)); - regd_data->device = device; - regd_data->virt_addr = rx_desc->data; - regd_data->data_size = rx_data_size; - - iser_reg_single(device, regd_data, DMA_FROM_DEVICE); - - iser_dto_add_regd_buff(recv_dto, regd_data, 0, 0); - - err = iser_post_recv(rx_desc); - if (!err) - return 0; - - /* iser_post_recv failed */ - iser_dto_buffs_release(recv_dto); - kfree(rx_desc->data); -post_rx_kmalloc_failure: - kmem_cache_free(ig.desc_cache, rx_desc); - return err; -} - -/* creates a new tx descriptor and adds header regd buffer */ -static void iser_create_send_desc(struct iscsi_iser_conn *iser_conn, - struct iser_desc *tx_desc) -{ - struct iser_regd_buf *regd_hdr = &tx_desc->hdr_regd_buf; - struct iser_dto *send_dto = &tx_desc->dto; - - memset(regd_hdr, 0, sizeof(struct iser_regd_buf)); - regd_hdr->device = iser_conn->ib_conn->device; - regd_hdr->virt_addr = tx_desc; /* == &tx_desc->iser_header */ - regd_hdr->data_size = ISER_TOTAL_HEADERS_LEN; - - send_dto->conn = iser_conn; - send_dto->notify_enable = 1; - send_dto->regd_vector_len = 0; - - memset(&tx_desc->iser_header, 0, sizeof(struct iser_hdr)); - tx_desc->iser_header.flags = ISER_VER; - - iser_dto_add_regd_buff(send_dto, regd_hdr, 0, 0); -} - -/** - * iser_conn_set_full_featured_mode - (iSER API) - */ -int iser_conn_set_full_featured_mode(struct iscsi_conn *conn) -{ - struct iscsi_iser_conn *iser_conn = conn->dd_data; - - int i; - /* no need to keep it in a var, we are after login so if this should - * be negotiated, by now the result should be available here */ - int initial_post_recv_bufs_num = ISER_MAX_RX_MISC_PDUS; - - iser_dbg("Initially post: %d\n", initial_post_recv_bufs_num); - - /* Check that there is no posted recv or send buffers left - */ - /* they must be consumed during the login phase */ - BUG_ON(atomic_read(&iser_conn->ib_conn->post_recv_buf_count) != 0); - BUG_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0); - - /* Initial post receive buffers */ - for (i = 0; i < initial_post_recv_bufs_num; i++) { - if (iser_post_receive_control(conn) != 0) { - iser_err("Failed to post recv bufs at:%d conn:0x%p\n", - i, conn); - return -ENOMEM; - } - } - iser_dbg("Posted %d post recv bufs, conn:0x%p\n", i, conn); - return 0; -} - -static int -iser_check_xmit(struct iscsi_conn *conn, void *task) -{ - int rc = 0; - struct iscsi_iser_conn *iser_conn = conn->dd_data; - - write_lock_bh(conn->recv_lock); - if (atomic_read(&iser_conn->ib_conn->post_send_buf_count) == - ISER_QP_MAX_REQ_DTOS) { - iser_dbg("%ld can't xmit task %p, suspending tx\n",jiffies,task); - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - rc = -EAGAIN; - } - write_unlock_bh(conn->recv_lock); - return rc; -} - - -/** - * iser_send_command - send command PDU - */ -int iser_send_command(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask) -{ - struct iscsi_iser_conn *iser_conn = conn->dd_data; - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - struct iser_dto *send_dto = NULL; - unsigned long edtl; - int err = 0; - struct iser_data_buf *data_buf; - - struct iscsi_cmd *hdr = ctask->hdr; - struct scsi_cmnd *sc = ctask->sc; - - if (!iser_conn_state_comp(iser_conn->ib_conn, ISER_CONN_UP)) { - iser_err("Failed to send, conn: 0x%p is not up\n", iser_conn->ib_conn); - return -EPERM; - } - if (iser_check_xmit(conn, ctask)) - return -EAGAIN; - - edtl = ntohl(hdr->data_length); - - /* build the tx desc regd header and add it to the tx desc dto */ - iser_ctask->desc.type = ISCSI_TX_SCSI_COMMAND; - send_dto = &iser_ctask->desc.dto; - send_dto->ctask = iser_ctask; - iser_create_send_desc(iser_conn, &iser_ctask->desc); - - if (hdr->flags & ISCSI_FLAG_CMD_READ) - data_buf = &iser_ctask->data[ISER_DIR_IN]; - else - data_buf = &iser_ctask->data[ISER_DIR_OUT]; - - if (sc->use_sg) { /* using a scatter list */ - data_buf->buf = sc->request_buffer; - data_buf->size = sc->use_sg; - } else if (sc->request_bufflen) { - /* using a single buffer - convert it into one entry SG */ - sg_init_one(&data_buf->sg_single, - sc->request_buffer, sc->request_bufflen); - data_buf->buf = &data_buf->sg_single; - data_buf->size = 1; - } - - data_buf->data_len = sc->request_bufflen; - - if (hdr->flags & ISCSI_FLAG_CMD_READ) { - err = iser_prepare_read_cmd(ctask, edtl); - if (err) - goto send_command_error; - } - if (hdr->flags & ISCSI_FLAG_CMD_WRITE) { - err = iser_prepare_write_cmd(ctask, - ctask->imm_count, - ctask->imm_count + - ctask->unsol_count, - edtl); - if (err) - goto send_command_error; - } - - iser_reg_single(iser_conn->ib_conn->device, - send_dto->regd[0], DMA_TO_DEVICE); - - if (iser_post_receive_control(conn) != 0) { - iser_err("post_recv failed!\n"); - err = -ENOMEM; - goto send_command_error; - } - - iser_ctask->status = ISER_TASK_STATUS_STARTED; - - err = iser_post_send(&iser_ctask->desc); - if (!err) - return 0; - -send_command_error: - iser_dto_buffs_release(send_dto); - iser_err("conn %p failed ctask->itt %d err %d\n",conn, ctask->itt, err); - return err; -} - -/** - * iser_send_data_out - send data out PDU - */ -int iser_send_data_out(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask, - struct iscsi_data *hdr) -{ - struct iscsi_iser_conn *iser_conn = conn->dd_data; - struct iscsi_iser_cmd_task *iser_ctask = ctask->dd_data; - struct iser_desc *tx_desc = NULL; - struct iser_dto *send_dto = NULL; - unsigned long buf_offset; - unsigned long data_seg_len; - unsigned int itt; - int err = 0; - - if (!iser_conn_state_comp(iser_conn->ib_conn, ISER_CONN_UP)) { - iser_err("Failed to send, conn: 0x%p is not up\n", iser_conn->ib_conn); - return -EPERM; - } - - if (iser_check_xmit(conn, ctask)) - return -EAGAIN; - - itt = ntohl(hdr->itt); - data_seg_len = ntoh24(hdr->dlength); - buf_offset = ntohl(hdr->offset); - - iser_dbg("%s itt %d dseg_len %d offset %d\n", - __func__,(int)itt,(int)data_seg_len,(int)buf_offset); - - tx_desc = kmem_cache_alloc(ig.desc_cache, GFP_NOIO); - if (tx_desc == NULL) { - iser_err("Failed to alloc desc for post dataout\n"); - return -ENOMEM; - } - - tx_desc->type = ISCSI_TX_DATAOUT; - memcpy(&tx_desc->iscsi_header, hdr, sizeof(struct iscsi_hdr)); - - /* build the tx desc regd header and add it to the tx desc dto */ - send_dto = &tx_desc->dto; - send_dto->ctask = iser_ctask; - iser_create_send_desc(iser_conn, tx_desc); - - iser_reg_single(iser_conn->ib_conn->device, - send_dto->regd[0], DMA_TO_DEVICE); - - /* all data was registered for RDMA, we can use the lkey */ - iser_dto_add_regd_buff(send_dto, - &iser_ctask->rdma_regd[ISER_DIR_OUT], - buf_offset, - data_seg_len); - - if (buf_offset + data_seg_len > iser_ctask->data[ISER_DIR_OUT].data_len) { - iser_err("Offset:%ld & DSL:%ld in Data-Out " - "inconsistent with total len:%ld, itt:%d\n", - buf_offset, data_seg_len, - iser_ctask->data[ISER_DIR_OUT].data_len, itt); - err = -EINVAL; - goto send_data_out_error; - } - iser_dbg("data-out itt: %d, offset: %ld, sz: %ld\n", - itt, buf_offset, data_seg_len); - - - err = iser_post_send(tx_desc); - if (!err) - return 0; - -send_data_out_error: - iser_dto_buffs_release(send_dto); - kmem_cache_free(ig.desc_cache, tx_desc); - iser_err("conn %p failed err %d\n",conn, err); - return err; -} - -int iser_send_control(struct iscsi_conn *conn, - struct iscsi_mgmt_task *mtask) -{ - struct iscsi_iser_conn *iser_conn = conn->dd_data; - struct iser_desc *mdesc = mtask->dd_data; - struct iser_dto *send_dto = NULL; - unsigned int itt; - unsigned long data_seg_len; - int err = 0; - unsigned char opcode; - struct iser_regd_buf *regd_buf; - struct iser_device *device; - - if (!iser_conn_state_comp(iser_conn->ib_conn, ISER_CONN_UP)) { - iser_err("Failed to send, conn: 0x%p is not up\n", iser_conn->ib_conn); - return -EPERM; - } - - if (iser_check_xmit(conn,mtask)) - return -EAGAIN; - - /* build the tx desc regd header and add it to the tx desc dto */ - mdesc->type = ISCSI_TX_CONTROL; - send_dto = &mdesc->dto; - send_dto->ctask = NULL; - iser_create_send_desc(iser_conn, mdesc); - - device = iser_conn->ib_conn->device; - - iser_reg_single(device, send_dto->regd[0], DMA_TO_DEVICE); - - itt = ntohl(mtask->hdr->itt); - opcode = mtask->hdr->opcode & ISCSI_OPCODE_MASK; - data_seg_len = ntoh24(mtask->hdr->dlength); - - if (data_seg_len > 0) { - regd_buf = &mdesc->data_regd_buf; - memset(regd_buf, 0, sizeof(struct iser_regd_buf)); - regd_buf->device = device; - regd_buf->virt_addr = mtask->data; - regd_buf->data_size = mtask->data_count; - iser_reg_single(device, regd_buf, - DMA_TO_DEVICE); - iser_dto_add_regd_buff(send_dto, regd_buf, - 0, - data_seg_len); - } - - if (iser_post_receive_control(conn) != 0) { - iser_err("post_rcv_buff failed!\n"); - err = -ENOMEM; - goto send_control_error; - } - - err = iser_post_send(mdesc); - if (!err) - return 0; - -send_control_error: - iser_dto_buffs_release(send_dto); - iser_err("conn %p failed err %d\n",conn, err); - return err; -} - -/** - * iser_rcv_dto_completion - recv DTO completion - */ -void iser_rcv_completion(struct iser_desc *rx_desc, - unsigned long dto_xfer_len) -{ - struct iser_dto *dto = &rx_desc->dto; - struct iscsi_iser_conn *conn = dto->conn; - struct iscsi_session *session = conn->iscsi_conn->session; - struct iscsi_cmd_task *ctask; - struct iscsi_iser_cmd_task *iser_ctask; - struct iscsi_hdr *hdr; - char *rx_data = NULL; - int rx_data_len = 0; - unsigned int itt; - unsigned char opcode; - - hdr = &rx_desc->iscsi_header; - - iser_dbg("op 0x%x itt 0x%x\n", hdr->opcode,hdr->itt); - - if (dto_xfer_len > ISER_TOTAL_HEADERS_LEN) { /* we have data */ - rx_data_len = dto_xfer_len - ISER_TOTAL_HEADERS_LEN; - rx_data = dto->regd[1]->virt_addr; - rx_data += dto->offset[1]; - } - - opcode = hdr->opcode & ISCSI_OPCODE_MASK; - - if (opcode == ISCSI_OP_SCSI_CMD_RSP) { - itt = hdr->itt & ISCSI_ITT_MASK; /* mask out cid and age bits */ - if (!(itt < session->cmds_max)) - iser_err("itt can't be matched to task!!!" - "conn %p opcode %d cmds_max %d itt %d\n", - conn->iscsi_conn,opcode,session->cmds_max,itt); - /* use the mapping given with the cmds array indexed by itt */ - ctask = (struct iscsi_cmd_task *)session->cmds[itt]; - iser_ctask = ctask->dd_data; - iser_dbg("itt %d ctask %p\n",itt,ctask); - iser_ctask->status = ISER_TASK_STATUS_COMPLETED; - iser_ctask_rdma_finalize(iser_ctask); - } - - iser_dto_buffs_release(dto); - - iscsi_iser_recv(conn->iscsi_conn, hdr, rx_data, rx_data_len); - - kfree(rx_desc->data); - kmem_cache_free(ig.desc_cache, rx_desc); - - /* decrementing conn->post_recv_buf_count only --after-- freeing the * - * task eliminates the need to worry on tasks which are completed in * - * parallel to the execution of iser_conn_term. So the code that waits * - * for the posted rx bufs refcount to become zero handles everything */ - atomic_dec(&conn->ib_conn->post_recv_buf_count); -} - -void iser_snd_completion(struct iser_desc *tx_desc) -{ - struct iser_dto *dto = &tx_desc->dto; - struct iscsi_iser_conn *iser_conn = dto->conn; - struct iscsi_conn *conn = iser_conn->iscsi_conn; - struct iscsi_mgmt_task *mtask; - - iser_dbg("Initiator, Data sent dto=0x%p\n", dto); - - iser_dto_buffs_release(dto); - - if (tx_desc->type == ISCSI_TX_DATAOUT) - kmem_cache_free(ig.desc_cache, tx_desc); - - atomic_dec(&iser_conn->ib_conn->post_send_buf_count); - - write_lock(conn->recv_lock); - if (conn->suspend_tx) { - iser_dbg("%ld resuming tx\n",jiffies); - clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - scsi_queue_work(conn->session->host, &conn->xmitwork); - } - write_unlock(conn->recv_lock); - - if (tx_desc->type == ISCSI_TX_CONTROL) { - /* this arithmetic is legal by libiscsi dd_data allocation */ - mtask = (void *) ((long)(void *)tx_desc - - sizeof(struct iscsi_mgmt_task)); - if (mtask->hdr->itt == cpu_to_be32(ISCSI_RESERVED_TAG)) { - struct iscsi_session *session = conn->session; - - spin_lock(&conn->session->lock); - list_del(&mtask->running); - __kfifo_put(session->mgmtpool.queue, (void*)&mtask, - sizeof(void*)); - spin_unlock(&session->lock); - } - } -} - -void iser_ctask_rdma_init(struct iscsi_iser_cmd_task *iser_ctask) - -{ - iser_ctask->status = ISER_TASK_STATUS_INIT; - - iser_ctask->dir[ISER_DIR_IN] = 0; - iser_ctask->dir[ISER_DIR_OUT] = 0; - - iser_ctask->data[ISER_DIR_IN].data_len = 0; - iser_ctask->data[ISER_DIR_OUT].data_len = 0; - - memset(&iser_ctask->rdma_regd[ISER_DIR_IN], 0, - sizeof(struct iser_regd_buf)); - memset(&iser_ctask->rdma_regd[ISER_DIR_OUT], 0, - sizeof(struct iser_regd_buf)); -} - -void iser_ctask_rdma_finalize(struct iscsi_iser_cmd_task *iser_ctask) -{ - int deferred; - - /* if we were reading, copy back to unaligned sglist, - * anyway dma_unmap and free the copy - */ - if (iser_ctask->data_copy[ISER_DIR_IN].copy_buf != NULL) - iser_finalize_rdma_unaligned_sg(iser_ctask, ISER_DIR_IN); - if (iser_ctask->data_copy[ISER_DIR_OUT].copy_buf != NULL) - iser_finalize_rdma_unaligned_sg(iser_ctask, ISER_DIR_OUT); - - if (iser_ctask->dir[ISER_DIR_IN]) { - deferred = iser_regd_buff_release - (&iser_ctask->rdma_regd[ISER_DIR_IN]); - if (deferred) { - iser_err("References remain for BUF-IN rdma reg\n"); - BUG(); - } - } - - if (iser_ctask->dir[ISER_DIR_OUT]) { - deferred = iser_regd_buff_release - (&iser_ctask->rdma_regd[ISER_DIR_OUT]); - if (deferred) { - iser_err("References remain for BUF-OUT rdma reg\n"); - BUG(); - } - } - - iser_dma_unmap_task_data(iser_ctask); -} - -void iser_dto_buffs_release(struct iser_dto *dto) -{ - int i; - - for (i = 0; i < dto->regd_vector_len; i++) - iser_regd_buff_release(dto->regd[i]); -} - diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c deleted file mode 100644 index 31950a522..000000000 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * $Id: iser_memory.c 6964 2006-05-07 11:11:43Z ogerlitz $ - */ -#include -#include -#include -#include -#include -#include -#include - -#include "iscsi_iser.h" - -#define ISER_KMALLOC_THRESHOLD 0x20000 /* 128K - kmalloc limit */ -/** - * Decrements the reference count for the - * registered buffer & releases it - * - * returns 0 if released, 1 if deferred - */ -int iser_regd_buff_release(struct iser_regd_buf *regd_buf) -{ - struct device *dma_device; - - if ((atomic_read(®d_buf->ref_count) == 0) || - atomic_dec_and_test(®d_buf->ref_count)) { - /* if we used the dma mr, unreg is just NOP */ - if (regd_buf->reg.rkey != 0) - iser_unreg_mem(®d_buf->reg); - - if (regd_buf->dma_addr) { - dma_device = regd_buf->device->ib_device->dma_device; - dma_unmap_single(dma_device, - regd_buf->dma_addr, - regd_buf->data_size, - regd_buf->direction); - } - /* else this regd buf is associated with task which we */ - /* dma_unmap_single/sg later */ - return 0; - } else { - iser_dbg("Release deferred, regd.buff: 0x%p\n", regd_buf); - return 1; - } -} - -/** - * iser_reg_single - fills registered buffer descriptor with - * registration information - */ -void iser_reg_single(struct iser_device *device, - struct iser_regd_buf *regd_buf, - enum dma_data_direction direction) -{ - dma_addr_t dma_addr; - - dma_addr = dma_map_single(device->ib_device->dma_device, - regd_buf->virt_addr, - regd_buf->data_size, direction); - BUG_ON(dma_mapping_error(dma_addr)); - - regd_buf->reg.lkey = device->mr->lkey; - regd_buf->reg.rkey = 0; /* indicate there's no need to unreg */ - regd_buf->reg.len = regd_buf->data_size; - regd_buf->reg.va = dma_addr; - - regd_buf->dma_addr = dma_addr; - regd_buf->direction = direction; -} - -/** - * iser_start_rdma_unaligned_sg - */ -int iser_start_rdma_unaligned_sg(struct iscsi_iser_cmd_task *iser_ctask, - enum iser_data_dir cmd_dir) -{ - int dma_nents; - struct device *dma_device; - char *mem = NULL; - struct iser_data_buf *data = &iser_ctask->data[cmd_dir]; - unsigned long cmd_data_len = data->data_len; - - if (cmd_data_len > ISER_KMALLOC_THRESHOLD) - mem = (void *)__get_free_pages(GFP_NOIO, - long_log2(roundup_pow_of_two(cmd_data_len)) - PAGE_SHIFT); - else - mem = kmalloc(cmd_data_len, GFP_NOIO); - - if (mem == NULL) { - iser_err("Failed to allocate mem size %d %d for copying sglist\n", - data->size,(int)cmd_data_len); - return -ENOMEM; - } - - if (cmd_dir == ISER_DIR_OUT) { - /* copy the unaligned sg the buffer which is used for RDMA */ - struct scatterlist *sg = (struct scatterlist *)data->buf; - int i; - char *p, *from; - - for (p = mem, i = 0; i < data->size; i++) { - from = kmap_atomic(sg[i].page, KM_USER0); - memcpy(p, - from + sg[i].offset, - sg[i].length); - kunmap_atomic(from, KM_USER0); - p += sg[i].length; - } - } - - sg_init_one(&iser_ctask->data_copy[cmd_dir].sg_single, mem, cmd_data_len); - iser_ctask->data_copy[cmd_dir].buf = - &iser_ctask->data_copy[cmd_dir].sg_single; - iser_ctask->data_copy[cmd_dir].size = 1; - - iser_ctask->data_copy[cmd_dir].copy_buf = mem; - - dma_device = iser_ctask->iser_conn->ib_conn->device->ib_device->dma_device; - - if (cmd_dir == ISER_DIR_OUT) - dma_nents = dma_map_sg(dma_device, - &iser_ctask->data_copy[cmd_dir].sg_single, - 1, DMA_TO_DEVICE); - else - dma_nents = dma_map_sg(dma_device, - &iser_ctask->data_copy[cmd_dir].sg_single, - 1, DMA_FROM_DEVICE); - - BUG_ON(dma_nents == 0); - - iser_ctask->data_copy[cmd_dir].dma_nents = dma_nents; - return 0; -} - -/** - * iser_finalize_rdma_unaligned_sg - */ -void iser_finalize_rdma_unaligned_sg(struct iscsi_iser_cmd_task *iser_ctask, - enum iser_data_dir cmd_dir) -{ - struct device *dma_device; - struct iser_data_buf *mem_copy; - unsigned long cmd_data_len; - - dma_device = iser_ctask->iser_conn->ib_conn->device->ib_device->dma_device; - mem_copy = &iser_ctask->data_copy[cmd_dir]; - - if (cmd_dir == ISER_DIR_OUT) - dma_unmap_sg(dma_device, &mem_copy->sg_single, 1, - DMA_TO_DEVICE); - else - dma_unmap_sg(dma_device, &mem_copy->sg_single, 1, - DMA_FROM_DEVICE); - - if (cmd_dir == ISER_DIR_IN) { - char *mem; - struct scatterlist *sg; - unsigned char *p, *to; - unsigned int sg_size; - int i; - - /* copy back read RDMA to unaligned sg */ - mem = mem_copy->copy_buf; - - sg = (struct scatterlist *)iser_ctask->data[ISER_DIR_IN].buf; - sg_size = iser_ctask->data[ISER_DIR_IN].size; - - for (p = mem, i = 0; i < sg_size; i++){ - to = kmap_atomic(sg[i].page, KM_SOFTIRQ0); - memcpy(to + sg[i].offset, - p, - sg[i].length); - kunmap_atomic(to, KM_SOFTIRQ0); - p += sg[i].length; - } - } - - cmd_data_len = iser_ctask->data[cmd_dir].data_len; - - if (cmd_data_len > ISER_KMALLOC_THRESHOLD) - free_pages((unsigned long)mem_copy->copy_buf, - long_log2(roundup_pow_of_two(cmd_data_len)) - PAGE_SHIFT); - else - kfree(mem_copy->copy_buf); - - mem_copy->copy_buf = NULL; -} - -/** - * iser_sg_to_page_vec - Translates scatterlist entries to physical addresses - * and returns the length of resulting physical address array (may be less than - * the original due to possible compaction). - * - * we build a "page vec" under the assumption that the SG meets the RDMA - * alignment requirements. Other then the first and last SG elements, all - * the "internal" elements can be compacted into a list whose elements are - * dma addresses of physical pages. The code supports also the weird case - * where --few fragments of the same page-- are present in the SG as - * consecutive elements. Also, it handles one entry SG. - */ -static int iser_sg_to_page_vec(struct iser_data_buf *data, - struct iser_page_vec *page_vec) -{ - struct scatterlist *sg = (struct scatterlist *)data->buf; - dma_addr_t first_addr, last_addr, page; - int start_aligned, end_aligned; - unsigned int cur_page = 0; - unsigned long total_sz = 0; - int i; - - /* compute the offset of first element */ - page_vec->offset = (u64) sg[0].offset; - - for (i = 0; i < data->dma_nents; i++) { - total_sz += sg_dma_len(&sg[i]); - - first_addr = sg_dma_address(&sg[i]); - last_addr = first_addr + sg_dma_len(&sg[i]); - - start_aligned = !(first_addr & ~PAGE_MASK); - end_aligned = !(last_addr & ~PAGE_MASK); - - /* continue to collect page fragments till aligned or SG ends */ - while (!end_aligned && (i + 1 < data->dma_nents)) { - i++; - total_sz += sg_dma_len(&sg[i]); - last_addr = sg_dma_address(&sg[i]) + sg_dma_len(&sg[i]); - end_aligned = !(last_addr & ~PAGE_MASK); - } - - first_addr = first_addr & PAGE_MASK; - - for (page = first_addr; page < last_addr; page += PAGE_SIZE) - page_vec->pages[cur_page++] = page; - - } - page_vec->data_size = total_sz; - iser_dbg("page_vec->data_size:%d cur_page %d\n", page_vec->data_size,cur_page); - return cur_page; -} - -#define MASK_4K ((1UL << 12) - 1) /* 0xFFF */ -#define IS_4K_ALIGNED(addr) ((((unsigned long)addr) & MASK_4K) == 0) - -/** - * iser_data_buf_aligned_len - Tries to determine the maximal correctly aligned - * for RDMA sub-list of a scatter-gather list of memory buffers, and returns - * the number of entries which are aligned correctly. Supports the case where - * consecutive SG elements are actually fragments of the same physcial page. - */ -static unsigned int iser_data_buf_aligned_len(struct iser_data_buf *data) -{ - struct scatterlist *sg; - dma_addr_t end_addr, next_addr; - int i, cnt; - unsigned int ret_len = 0; - - sg = (struct scatterlist *)data->buf; - - for (cnt = 0, i = 0; i < data->dma_nents; i++, cnt++) { - /* iser_dbg("Checking sg iobuf [%d]: phys=0x%08lX " - "offset: %ld sz: %ld\n", i, - (unsigned long)page_to_phys(sg[i].page), - (unsigned long)sg[i].offset, - (unsigned long)sg[i].length); */ - end_addr = sg_dma_address(&sg[i]) + - sg_dma_len(&sg[i]); - /* iser_dbg("Checking sg iobuf end address " - "0x%08lX\n", end_addr); */ - if (i + 1 < data->dma_nents) { - next_addr = sg_dma_address(&sg[i+1]); - /* are i, i+1 fragments of the same page? */ - if (end_addr == next_addr) - continue; - else if (!IS_4K_ALIGNED(end_addr)) { - ret_len = cnt + 1; - break; - } - } - } - if (i == data->dma_nents) - ret_len = cnt; /* loop ended */ - iser_dbg("Found %d aligned entries out of %d in sg:0x%p\n", - ret_len, data->dma_nents, data); - return ret_len; -} - -static void iser_data_buf_dump(struct iser_data_buf *data) -{ - struct scatterlist *sg = (struct scatterlist *)data->buf; - int i; - - for (i = 0; i < data->size; i++) - iser_err("sg[%d] dma_addr:0x%lX page:0x%p " - "off:%d sz:%d dma_len:%d\n", - i, (unsigned long)sg_dma_address(&sg[i]), - sg[i].page, sg[i].offset, - sg[i].length,sg_dma_len(&sg[i])); -} - -static void iser_dump_page_vec(struct iser_page_vec *page_vec) -{ - int i; - - iser_err("page vec length %d data size %d\n", - page_vec->length, page_vec->data_size); - for (i = 0; i < page_vec->length; i++) - iser_err("%d %lx\n",i,(unsigned long)page_vec->pages[i]); -} - -static void iser_page_vec_build(struct iser_data_buf *data, - struct iser_page_vec *page_vec) -{ - int page_vec_len = 0; - - page_vec->length = 0; - page_vec->offset = 0; - - iser_dbg("Translating sg sz: %d\n", data->dma_nents); - page_vec_len = iser_sg_to_page_vec(data,page_vec); - iser_dbg("sg len %d page_vec_len %d\n", data->dma_nents,page_vec_len); - - page_vec->length = page_vec_len; - - if (page_vec_len * PAGE_SIZE < page_vec->data_size) { - iser_err("page_vec too short to hold this SG\n"); - iser_data_buf_dump(data); - iser_dump_page_vec(page_vec); - BUG(); - } -} - -/** - * iser_reg_rdma_mem - Registers memory intended for RDMA, - * obtaining rkey and va - * - * returns 0 on success, errno code on failure - */ -int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask, - enum iser_data_dir cmd_dir) -{ - struct iser_conn *ib_conn = iser_ctask->iser_conn->ib_conn; - struct iser_data_buf *mem = &iser_ctask->data[cmd_dir]; - struct iser_regd_buf *regd_buf; - int aligned_len; - int err; - - regd_buf = &iser_ctask->rdma_regd[cmd_dir]; - - aligned_len = iser_data_buf_aligned_len(mem); - if (aligned_len != mem->size) { - iser_err("rdma alignment violation %d/%d aligned\n", - aligned_len, mem->size); - iser_data_buf_dump(mem); - /* allocate copy buf, if we are writing, copy the */ - /* unaligned scatterlist, dma map the copy */ - if (iser_start_rdma_unaligned_sg(iser_ctask, cmd_dir) != 0) - return -ENOMEM; - mem = &iser_ctask->data_copy[cmd_dir]; - } - - iser_page_vec_build(mem, ib_conn->page_vec); - err = iser_reg_page_vec(ib_conn, ib_conn->page_vec, ®d_buf->reg); - if (err) - return err; - - /* take a reference on this regd buf such that it will not be released * - * (eg in send dto completion) before we get the scsi response */ - atomic_inc(®d_buf->ref_count); - return 0; -} diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c deleted file mode 100644 index 72febf1f8..000000000 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ /dev/null @@ -1,827 +0,0 @@ -/* - * Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved. - * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * $Id: iser_verbs.c 7051 2006-05-10 12:29:11Z ogerlitz $ - */ -#include -#include -#include -#include -#include -#include - -#include "iscsi_iser.h" - -#define ISCSI_ISER_MAX_CONN 8 -#define ISER_MAX_CQ_LEN ((ISER_QP_MAX_RECV_DTOS + \ - ISER_QP_MAX_REQ_DTOS) * \ - ISCSI_ISER_MAX_CONN) - -static void iser_cq_tasklet_fn(unsigned long data); -static void iser_cq_callback(struct ib_cq *cq, void *cq_context); -static void iser_comp_error_worker(void *data); - -static void iser_cq_event_callback(struct ib_event *cause, void *context) -{ - iser_err("got cq event %d \n", cause->event); -} - -static void iser_qp_event_callback(struct ib_event *cause, void *context) -{ - iser_err("got qp event %d\n",cause->event); -} - -/** - * iser_create_device_ib_res - creates Protection Domain (PD), Completion - * Queue (CQ), DMA Memory Region (DMA MR) with the device associated with - * the adapator. - * - * returns 0 on success, -1 on failure - */ -static int iser_create_device_ib_res(struct iser_device *device) -{ - device->pd = ib_alloc_pd(device->ib_device); - if (IS_ERR(device->pd)) - goto pd_err; - - device->cq = ib_create_cq(device->ib_device, - iser_cq_callback, - iser_cq_event_callback, - (void *)device, - ISER_MAX_CQ_LEN); - if (IS_ERR(device->cq)) - goto cq_err; - - if (ib_req_notify_cq(device->cq, IB_CQ_NEXT_COMP)) - goto cq_arm_err; - - tasklet_init(&device->cq_tasklet, - iser_cq_tasklet_fn, - (unsigned long)device); - - device->mr = ib_get_dma_mr(device->pd, - IB_ACCESS_LOCAL_WRITE); - if (IS_ERR(device->mr)) - goto dma_mr_err; - - return 0; - -dma_mr_err: - tasklet_kill(&device->cq_tasklet); -cq_arm_err: - ib_destroy_cq(device->cq); -cq_err: - ib_dealloc_pd(device->pd); -pd_err: - iser_err("failed to allocate an IB resource\n"); - return -1; -} - -/** - * iser_free_device_ib_res - destory/dealloc/dereg the DMA MR, - * CQ and PD created with the device associated with the adapator. - */ -static void iser_free_device_ib_res(struct iser_device *device) -{ - BUG_ON(device->mr == NULL); - - tasklet_kill(&device->cq_tasklet); - - (void)ib_dereg_mr(device->mr); - (void)ib_destroy_cq(device->cq); - (void)ib_dealloc_pd(device->pd); - - device->mr = NULL; - device->cq = NULL; - device->pd = NULL; -} - -/** - * iser_create_ib_conn_res - Creates FMR pool and Queue-Pair (QP) - * - * returns 0 on success, -1 on failure - */ -static int iser_create_ib_conn_res(struct iser_conn *ib_conn) -{ - struct iser_device *device; - struct ib_qp_init_attr init_attr; - int ret; - struct ib_fmr_pool_param params; - - BUG_ON(ib_conn->device == NULL); - - device = ib_conn->device; - - ib_conn->page_vec = kmalloc(sizeof(struct iser_page_vec) + - (sizeof(u64) * (ISCSI_ISER_SG_TABLESIZE +1)), - GFP_KERNEL); - if (!ib_conn->page_vec) { - ret = -ENOMEM; - goto alloc_err; - } - ib_conn->page_vec->pages = (u64 *) (ib_conn->page_vec + 1); - - params.page_shift = PAGE_SHIFT; - /* when the first/last SG element are not start/end * - * page aligned, the map whould be of N+1 pages */ - params.max_pages_per_fmr = ISCSI_ISER_SG_TABLESIZE + 1; - /* make the pool size twice the max number of SCSI commands * - * the ML is expected to queue, watermark for unmap at 50% */ - params.pool_size = ISCSI_XMIT_CMDS_MAX * 2; - params.dirty_watermark = ISCSI_XMIT_CMDS_MAX; - params.cache = 0; - params.flush_function = NULL; - params.access = (IB_ACCESS_LOCAL_WRITE | - IB_ACCESS_REMOTE_WRITE | - IB_ACCESS_REMOTE_READ); - - ib_conn->fmr_pool = ib_create_fmr_pool(device->pd, ¶ms); - if (IS_ERR(ib_conn->fmr_pool)) { - ret = PTR_ERR(ib_conn->fmr_pool); - goto fmr_pool_err; - } - - memset(&init_attr, 0, sizeof init_attr); - - init_attr.event_handler = iser_qp_event_callback; - init_attr.qp_context = (void *)ib_conn; - init_attr.send_cq = device->cq; - init_attr.recv_cq = device->cq; - init_attr.cap.max_send_wr = ISER_QP_MAX_REQ_DTOS; - init_attr.cap.max_recv_wr = ISER_QP_MAX_RECV_DTOS; - init_attr.cap.max_send_sge = MAX_REGD_BUF_VECTOR_LEN; - init_attr.cap.max_recv_sge = 2; - init_attr.sq_sig_type = IB_SIGNAL_REQ_WR; - init_attr.qp_type = IB_QPT_RC; - - ret = rdma_create_qp(ib_conn->cma_id, device->pd, &init_attr); - if (ret) - goto qp_err; - - ib_conn->qp = ib_conn->cma_id->qp; - iser_err("setting conn %p cma_id %p: fmr_pool %p qp %p\n", - ib_conn, ib_conn->cma_id, - ib_conn->fmr_pool, ib_conn->cma_id->qp); - return ret; - -qp_err: - (void)ib_destroy_fmr_pool(ib_conn->fmr_pool); -fmr_pool_err: - kfree(ib_conn->page_vec); -alloc_err: - iser_err("unable to alloc mem or create resource, err %d\n", ret); - return ret; -} - -/** - * releases the FMR pool, QP and CMA ID objects, returns 0 on success, - * -1 on failure - */ -static int iser_free_ib_conn_res(struct iser_conn *ib_conn) -{ - BUG_ON(ib_conn == NULL); - - iser_err("freeing conn %p cma_id %p fmr pool %p qp %p\n", - ib_conn, ib_conn->cma_id, - ib_conn->fmr_pool, ib_conn->qp); - - /* qp is created only once both addr & route are resolved */ - if (ib_conn->fmr_pool != NULL) - ib_destroy_fmr_pool(ib_conn->fmr_pool); - - if (ib_conn->qp != NULL) - rdma_destroy_qp(ib_conn->cma_id); - - if (ib_conn->cma_id != NULL) - rdma_destroy_id(ib_conn->cma_id); - - ib_conn->fmr_pool = NULL; - ib_conn->qp = NULL; - ib_conn->cma_id = NULL; - kfree(ib_conn->page_vec); - - return 0; -} - -/** - * based on the resolved device node GUID see if there already allocated - * device for this device. If there's no such, create one. - */ -static -struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) -{ - struct list_head *p_list; - struct iser_device *device = NULL; - - mutex_lock(&ig.device_list_mutex); - - p_list = ig.device_list.next; - while (p_list != &ig.device_list) { - device = list_entry(p_list, struct iser_device, ig_list); - /* find if there's a match using the node GUID */ - if (device->ib_device->node_guid == cma_id->device->node_guid) - break; - } - - if (device == NULL) { - device = kzalloc(sizeof *device, GFP_KERNEL); - if (device == NULL) - goto out; - /* assign this device to the device */ - device->ib_device = cma_id->device; - /* init the device and link it into ig device list */ - if (iser_create_device_ib_res(device)) { - kfree(device); - device = NULL; - goto out; - } - list_add(&device->ig_list, &ig.device_list); - } -out: - BUG_ON(device == NULL); - device->refcount++; - mutex_unlock(&ig.device_list_mutex); - return device; -} - -/* if there's no demand for this device, release it */ -static void iser_device_try_release(struct iser_device *device) -{ - mutex_lock(&ig.device_list_mutex); - device->refcount--; - iser_err("device %p refcount %d\n",device,device->refcount); - if (!device->refcount) { - iser_free_device_ib_res(device); - list_del(&device->ig_list); - kfree(device); - } - mutex_unlock(&ig.device_list_mutex); -} - -int iser_conn_state_comp(struct iser_conn *ib_conn, - enum iser_ib_conn_state comp) -{ - int ret; - - spin_lock_bh(&ib_conn->lock); - ret = (ib_conn->state == comp); - spin_unlock_bh(&ib_conn->lock); - return ret; -} - -static int iser_conn_state_comp_exch(struct iser_conn *ib_conn, - enum iser_ib_conn_state comp, - enum iser_ib_conn_state exch) -{ - int ret; - - spin_lock_bh(&ib_conn->lock); - if ((ret = (ib_conn->state == comp))) - ib_conn->state = exch; - spin_unlock_bh(&ib_conn->lock); - return ret; -} - -/** - * triggers start of the disconnect procedures and wait for them to be done - */ -void iser_conn_terminate(struct iser_conn *ib_conn) -{ - int err = 0; - - /* change the ib conn state only if the conn is UP, however always call - * rdma_disconnect since this is the only way to cause the CMA to change - * the QP state to ERROR - */ - - iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP, ISER_CONN_TERMINATING); - err = rdma_disconnect(ib_conn->cma_id); - if (err) - iser_err("Failed to disconnect, conn: 0x%p err %d\n", - ib_conn,err); - - wait_event_interruptible(ib_conn->wait, - ib_conn->state == ISER_CONN_DOWN); - - iser_conn_release(ib_conn); -} - -static void iser_connect_error(struct rdma_cm_id *cma_id) -{ - struct iser_conn *ib_conn; - ib_conn = (struct iser_conn *)cma_id->context; - - ib_conn->state = ISER_CONN_DOWN; - wake_up_interruptible(&ib_conn->wait); -} - -static void iser_addr_handler(struct rdma_cm_id *cma_id) -{ - struct iser_device *device; - struct iser_conn *ib_conn; - int ret; - - device = iser_device_find_by_ib_device(cma_id); - ib_conn = (struct iser_conn *)cma_id->context; - ib_conn->device = device; - - ret = rdma_resolve_route(cma_id, 1000); - if (ret) { - iser_err("resolve route failed: %d\n", ret); - iser_connect_error(cma_id); - } - return; -} - -static void iser_route_handler(struct rdma_cm_id *cma_id) -{ - struct rdma_conn_param conn_param; - int ret; - - ret = iser_create_ib_conn_res((struct iser_conn *)cma_id->context); - if (ret) - goto failure; - - iser_dbg("path.mtu is %d setting it to %d\n", - cma_id->route.path_rec->mtu, IB_MTU_1024); - - /* we must set the MTU to 1024 as this is what the target is assuming */ - if (cma_id->route.path_rec->mtu > IB_MTU_1024) - cma_id->route.path_rec->mtu = IB_MTU_1024; - - memset(&conn_param, 0, sizeof conn_param); - conn_param.responder_resources = 4; - conn_param.initiator_depth = 1; - conn_param.retry_count = 7; - conn_param.rnr_retry_count = 6; - - ret = rdma_connect(cma_id, &conn_param); - if (ret) { - iser_err("failure connecting: %d\n", ret); - goto failure; - } - - return; -failure: - iser_connect_error(cma_id); -} - -static void iser_connected_handler(struct rdma_cm_id *cma_id) -{ - struct iser_conn *ib_conn; - - ib_conn = (struct iser_conn *)cma_id->context; - ib_conn->state = ISER_CONN_UP; - wake_up_interruptible(&ib_conn->wait); -} - -static void iser_disconnected_handler(struct rdma_cm_id *cma_id) -{ - struct iser_conn *ib_conn; - - ib_conn = (struct iser_conn *)cma_id->context; - ib_conn->disc_evt_flag = 1; - - /* getting here when the state is UP means that the conn is being * - * terminated asynchronously from the iSCSI layer's perspective. */ - if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP, - ISER_CONN_TERMINATING)) - iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn, - ISCSI_ERR_CONN_FAILED); - - /* Complete the termination process if no posts are pending */ - if ((atomic_read(&ib_conn->post_recv_buf_count) == 0) && - (atomic_read(&ib_conn->post_send_buf_count) == 0)) { - ib_conn->state = ISER_CONN_DOWN; - wake_up_interruptible(&ib_conn->wait); - } -} - -static int iser_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) -{ - int ret = 0; - - iser_err("event %d conn %p id %p\n",event->event,cma_id->context,cma_id); - - switch (event->event) { - case RDMA_CM_EVENT_ADDR_RESOLVED: - iser_addr_handler(cma_id); - break; - case RDMA_CM_EVENT_ROUTE_RESOLVED: - iser_route_handler(cma_id); - break; - case RDMA_CM_EVENT_ESTABLISHED: - iser_connected_handler(cma_id); - break; - case RDMA_CM_EVENT_ADDR_ERROR: - case RDMA_CM_EVENT_ROUTE_ERROR: - case RDMA_CM_EVENT_CONNECT_ERROR: - case RDMA_CM_EVENT_UNREACHABLE: - case RDMA_CM_EVENT_REJECTED: - iser_err("event: %d, error: %d\n", event->event, event->status); - iser_connect_error(cma_id); - break; - case RDMA_CM_EVENT_DISCONNECTED: - iser_disconnected_handler(cma_id); - break; - case RDMA_CM_EVENT_DEVICE_REMOVAL: - BUG(); - break; - case RDMA_CM_EVENT_CONNECT_RESPONSE: - BUG(); - break; - case RDMA_CM_EVENT_CONNECT_REQUEST: - default: - break; - } - return ret; -} - -int iser_conn_init(struct iser_conn **ibconn) -{ - struct iser_conn *ib_conn; - - ib_conn = kzalloc(sizeof *ib_conn, GFP_KERNEL); - if (!ib_conn) { - iser_err("can't alloc memory for struct iser_conn\n"); - return -ENOMEM; - } - ib_conn->state = ISER_CONN_INIT; - init_waitqueue_head(&ib_conn->wait); - atomic_set(&ib_conn->post_recv_buf_count, 0); - atomic_set(&ib_conn->post_send_buf_count, 0); - INIT_WORK(&ib_conn->comperror_work, iser_comp_error_worker, - ib_conn); - INIT_LIST_HEAD(&ib_conn->conn_list); - spin_lock_init(&ib_conn->lock); - - *ibconn = ib_conn; - return 0; -} - - /** - * starts the process of connecting to the target - * sleeps untill the connection is established or rejected - */ -int iser_connect(struct iser_conn *ib_conn, - struct sockaddr_in *src_addr, - struct sockaddr_in *dst_addr, - int non_blocking) -{ - struct sockaddr *src, *dst; - int err = 0; - - sprintf(ib_conn->name,"%d.%d.%d.%d:%d", - NIPQUAD(dst_addr->sin_addr.s_addr), dst_addr->sin_port); - - /* the device is known only --after-- address resolution */ - ib_conn->device = NULL; - - iser_err("connecting to: %d.%d.%d.%d, port 0x%x\n", - NIPQUAD(dst_addr->sin_addr), dst_addr->sin_port); - - ib_conn->state = ISER_CONN_PENDING; - - ib_conn->cma_id = rdma_create_id(iser_cma_handler, - (void *)ib_conn, - RDMA_PS_TCP); - if (IS_ERR(ib_conn->cma_id)) { - err = PTR_ERR(ib_conn->cma_id); - iser_err("rdma_create_id failed: %d\n", err); - goto id_failure; - } - - src = (struct sockaddr *)src_addr; - dst = (struct sockaddr *)dst_addr; - err = rdma_resolve_addr(ib_conn->cma_id, src, dst, 1000); - if (err) { - iser_err("rdma_resolve_addr failed: %d\n", err); - goto addr_failure; - } - - if (!non_blocking) { - wait_event_interruptible(ib_conn->wait, - (ib_conn->state != ISER_CONN_PENDING)); - - if (ib_conn->state != ISER_CONN_UP) { - err = -EIO; - goto connect_failure; - } - } - - mutex_lock(&ig.connlist_mutex); - list_add(&ib_conn->conn_list, &ig.connlist); - mutex_unlock(&ig.connlist_mutex); - return 0; - -id_failure: - ib_conn->cma_id = NULL; -addr_failure: - ib_conn->state = ISER_CONN_DOWN; -connect_failure: - iser_conn_release(ib_conn); - return err; -} - -/** - * Frees all conn objects and deallocs conn descriptor - */ -void iser_conn_release(struct iser_conn *ib_conn) -{ - struct iser_device *device = ib_conn->device; - - BUG_ON(ib_conn->state != ISER_CONN_DOWN); - - mutex_lock(&ig.connlist_mutex); - list_del(&ib_conn->conn_list); - mutex_unlock(&ig.connlist_mutex); - - iser_free_ib_conn_res(ib_conn); - ib_conn->device = NULL; - /* on EVENT_ADDR_ERROR there's no device yet for this conn */ - if (device != NULL) - iser_device_try_release(device); - kfree(ib_conn); -} - - -/** - * iser_reg_page_vec - Register physical memory - * - * returns: 0 on success, errno code on failure - */ -int iser_reg_page_vec(struct iser_conn *ib_conn, - struct iser_page_vec *page_vec, - struct iser_mem_reg *mem_reg) -{ - struct ib_pool_fmr *mem; - u64 io_addr; - u64 *page_list; - int status; - - page_list = page_vec->pages; - io_addr = page_list[0]; - - mem = ib_fmr_pool_map_phys(ib_conn->fmr_pool, - page_list, - page_vec->length, - io_addr); - - if (IS_ERR(mem)) { - status = (int)PTR_ERR(mem); - iser_err("ib_fmr_pool_map_phys failed: %d\n", status); - return status; - } - - mem_reg->lkey = mem->fmr->lkey; - mem_reg->rkey = mem->fmr->rkey; - mem_reg->len = page_vec->length * PAGE_SIZE; - mem_reg->va = io_addr; - mem_reg->mem_h = (void *)mem; - - mem_reg->va += page_vec->offset; - mem_reg->len = page_vec->data_size; - - iser_dbg("PHYSICAL Mem.register, [PHYS p_array: 0x%p, sz: %d, " - "entry[0]: (0x%08lx,%ld)] -> " - "[lkey: 0x%08X mem_h: 0x%p va: 0x%08lX sz: %ld]\n", - page_vec, page_vec->length, - (unsigned long)page_vec->pages[0], - (unsigned long)page_vec->data_size, - (unsigned int)mem_reg->lkey, mem_reg->mem_h, - (unsigned long)mem_reg->va, (unsigned long)mem_reg->len); - return 0; -} - -/** - * Unregister (previosuly registered) memory. - */ -void iser_unreg_mem(struct iser_mem_reg *reg) -{ - int ret; - - iser_dbg("PHYSICAL Mem.Unregister mem_h %p\n",reg->mem_h); - - ret = ib_fmr_pool_unmap((struct ib_pool_fmr *)reg->mem_h); - if (ret) - iser_err("ib_fmr_pool_unmap failed %d\n", ret); - - reg->mem_h = NULL; -} - -/** - * iser_dto_to_iov - builds IOV from a dto descriptor - */ -static void iser_dto_to_iov(struct iser_dto *dto, struct ib_sge *iov, int iov_len) -{ - int i; - struct ib_sge *sge; - struct iser_regd_buf *regd_buf; - - if (dto->regd_vector_len > iov_len) { - iser_err("iov size %d too small for posting dto of len %d\n", - iov_len, dto->regd_vector_len); - BUG(); - } - - for (i = 0; i < dto->regd_vector_len; i++) { - sge = &iov[i]; - regd_buf = dto->regd[i]; - - sge->addr = regd_buf->reg.va; - sge->length = regd_buf->reg.len; - sge->lkey = regd_buf->reg.lkey; - - if (dto->used_sz[i] > 0) /* Adjust size */ - sge->length = dto->used_sz[i]; - - /* offset and length should not exceed the regd buf length */ - if (sge->length + dto->offset[i] > regd_buf->reg.len) { - iser_err("Used len:%ld + offset:%d, exceed reg.buf.len:" - "%ld in dto:0x%p [%d], va:0x%08lX\n", - (unsigned long)sge->length, dto->offset[i], - (unsigned long)regd_buf->reg.len, dto, i, - (unsigned long)sge->addr); - BUG(); - } - - sge->addr += dto->offset[i]; /* Adjust offset */ - } -} - -/** - * iser_post_recv - Posts a receive buffer. - * - * returns 0 on success, -1 on failure - */ -int iser_post_recv(struct iser_desc *rx_desc) -{ - int ib_ret, ret_val = 0; - struct ib_recv_wr recv_wr, *recv_wr_failed; - struct ib_sge iov[2]; - struct iser_conn *ib_conn; - struct iser_dto *recv_dto = &rx_desc->dto; - - /* Retrieve conn */ - ib_conn = recv_dto->conn->ib_conn; - - iser_dto_to_iov(recv_dto, iov, 2); - - recv_wr.next = NULL; - recv_wr.sg_list = iov; - recv_wr.num_sge = recv_dto->regd_vector_len; - recv_wr.wr_id = (unsigned long)rx_desc; - - atomic_inc(&ib_conn->post_recv_buf_count); - ib_ret = ib_post_recv(ib_conn->qp, &recv_wr, &recv_wr_failed); - if (ib_ret) { - iser_err("ib_post_recv failed ret=%d\n", ib_ret); - atomic_dec(&ib_conn->post_recv_buf_count); - ret_val = -1; - } - - return ret_val; -} - -/** - * iser_start_send - Initiate a Send DTO operation - * - * returns 0 on success, -1 on failure - */ -int iser_post_send(struct iser_desc *tx_desc) -{ - int ib_ret, ret_val = 0; - struct ib_send_wr send_wr, *send_wr_failed; - struct ib_sge iov[MAX_REGD_BUF_VECTOR_LEN]; - struct iser_conn *ib_conn; - struct iser_dto *dto = &tx_desc->dto; - - ib_conn = dto->conn->ib_conn; - - iser_dto_to_iov(dto, iov, MAX_REGD_BUF_VECTOR_LEN); - - send_wr.next = NULL; - send_wr.wr_id = (unsigned long)tx_desc; - send_wr.sg_list = iov; - send_wr.num_sge = dto->regd_vector_len; - send_wr.opcode = IB_WR_SEND; - send_wr.send_flags = dto->notify_enable ? IB_SEND_SIGNALED : 0; - - atomic_inc(&ib_conn->post_send_buf_count); - - ib_ret = ib_post_send(ib_conn->qp, &send_wr, &send_wr_failed); - if (ib_ret) { - iser_err("Failed to start SEND DTO, dto: 0x%p, IOV len: %d\n", - dto, dto->regd_vector_len); - iser_err("ib_post_send failed, ret:%d\n", ib_ret); - atomic_dec(&ib_conn->post_send_buf_count); - ret_val = -1; - } - - return ret_val; -} - -static void iser_comp_error_worker(void *data) -{ - struct iser_conn *ib_conn = data; - - /* getting here when the state is UP means that the conn is being * - * terminated asynchronously from the iSCSI layer's perspective. */ - if (iser_conn_state_comp_exch(ib_conn, ISER_CONN_UP, - ISER_CONN_TERMINATING)) - iscsi_conn_failure(ib_conn->iser_conn->iscsi_conn, - ISCSI_ERR_CONN_FAILED); - - /* complete the termination process if disconnect event was delivered * - * note there are no more non completed posts to the QP */ - if (ib_conn->disc_evt_flag) { - ib_conn->state = ISER_CONN_DOWN; - wake_up_interruptible(&ib_conn->wait); - } -} - -static void iser_handle_comp_error(struct iser_desc *desc) -{ - struct iser_dto *dto = &desc->dto; - struct iser_conn *ib_conn = dto->conn->ib_conn; - - iser_dto_buffs_release(dto); - - if (desc->type == ISCSI_RX) { - kfree(desc->data); - kmem_cache_free(ig.desc_cache, desc); - atomic_dec(&ib_conn->post_recv_buf_count); - } else { /* type is TX control/command/dataout */ - if (desc->type == ISCSI_TX_DATAOUT) - kmem_cache_free(ig.desc_cache, desc); - atomic_dec(&ib_conn->post_send_buf_count); - } - - if (atomic_read(&ib_conn->post_recv_buf_count) == 0 && - atomic_read(&ib_conn->post_send_buf_count) == 0) - schedule_work(&ib_conn->comperror_work); -} - -static void iser_cq_tasklet_fn(unsigned long data) -{ - struct iser_device *device = (struct iser_device *)data; - struct ib_cq *cq = device->cq; - struct ib_wc wc; - struct iser_desc *desc; - unsigned long xfer_len; - - while (ib_poll_cq(cq, 1, &wc) == 1) { - desc = (struct iser_desc *) (unsigned long) wc.wr_id; - BUG_ON(desc == NULL); - - if (wc.status == IB_WC_SUCCESS) { - if (desc->type == ISCSI_RX) { - xfer_len = (unsigned long)wc.byte_len; - iser_rcv_completion(desc, xfer_len); - } else /* type == ISCSI_TX_CONTROL/SCSI_CMD/DOUT */ - iser_snd_completion(desc); - } else { - iser_err("comp w. error op %d status %d\n",desc->type,wc.status); - iser_handle_comp_error(desc); - } - } - /* #warning "it is assumed here that arming CQ only once its empty" * - * " would not cause interrupts to be missed" */ - ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); -} - -static void iser_cq_callback(struct ib_cq *cq, void *cq_context) -{ - struct iser_device *device = (struct iser_device *)cq_context; - - tasklet_schedule(&device->cq_tasklet); -} diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index fd8344cdc..9cbdffa08 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -62,13 +62,6 @@ MODULE_DESCRIPTION("InfiniBand SCSI RDMA Protocol initiator " "v" DRV_VERSION " (" DRV_RELDATE ")"); MODULE_LICENSE("Dual BSD/GPL"); -static int srp_sg_tablesize = SRP_DEF_SG_TABLESIZE; -static int srp_max_iu_len; - -module_param(srp_sg_tablesize, int, 0444); -MODULE_PARM_DESC(srp_sg_tablesize, - "Max number of gather/scatter entries per I/O (default is 12)"); - static int topspin_workarounds = 1; module_param(topspin_workarounds, int, 0444); @@ -77,14 +70,6 @@ MODULE_PARM_DESC(topspin_workarounds, static const u8 topspin_oui[3] = { 0x00, 0x05, 0xad }; -static int mellanox_workarounds = 1; - -module_param(mellanox_workarounds, int, 0444); -MODULE_PARM_DESC(mellanox_workarounds, - "Enable workarounds for Mellanox SRP target bugs if != 0"); - -static const u8 mellanox_oui[3] = { 0x00, 0x02, 0xc9 }; - static void srp_add_one(struct ib_device *device); static void srp_remove_one(struct ib_device *device); static void srp_completion(struct ib_cq *cq, void *target_ptr); @@ -120,8 +105,7 @@ static struct srp_iu *srp_alloc_iu(struct srp_host *host, size_t size, if (!iu->buf) goto out_free_iu; - iu->dma = dma_map_single(host->dev->dev->dma_device, - iu->buf, size, direction); + iu->dma = dma_map_single(host->dev->dma_device, iu->buf, size, direction); if (dma_mapping_error(iu->dma)) goto out_free_buf; @@ -143,8 +127,7 @@ static void srp_free_iu(struct srp_host *host, struct srp_iu *iu) if (!iu) return; - dma_unmap_single(host->dev->dev->dma_device, - iu->dma, iu->size, iu->direction); + dma_unmap_single(host->dev->dma_device, iu->dma, iu->size, iu->direction); kfree(iu->buf); kfree(iu); } @@ -164,7 +147,7 @@ static int srp_init_qp(struct srp_target_port *target, if (!attr) return -ENOMEM; - ret = ib_find_cached_pkey(target->srp_host->dev->dev, + ret = ib_find_cached_pkey(target->srp_host->dev, target->srp_host->port, be16_to_cpu(target->path.pkey), &attr->pkey_index); @@ -196,7 +179,7 @@ static int srp_create_target_ib(struct srp_target_port *target) if (!init_attr) return -ENOMEM; - target->cq = ib_create_cq(target->srp_host->dev->dev, srp_completion, + target->cq = ib_create_cq(target->srp_host->dev, srp_completion, NULL, target, SRP_CQ_SIZE); if (IS_ERR(target->cq)) { ret = PTR_ERR(target->cq); @@ -215,7 +198,7 @@ static int srp_create_target_ib(struct srp_target_port *target) init_attr->send_cq = target->cq; init_attr->recv_cq = target->cq; - target->qp = ib_create_qp(target->srp_host->dev->pd, init_attr); + target->qp = ib_create_qp(target->srp_host->pd, init_attr); if (IS_ERR(target->qp)) { ret = PTR_ERR(target->qp); ib_destroy_cq(target->cq); @@ -267,7 +250,7 @@ static int srp_lookup_path(struct srp_target_port *target) init_completion(&target->done); - target->path_query_id = ib_sa_path_rec_get(target->srp_host->dev->dev, + target->path_query_id = ib_sa_path_rec_get(target->srp_host->dev, target->srp_host->port, &target->path, IB_SA_PATH_REC_DGID | @@ -326,32 +309,10 @@ static int srp_send_req(struct srp_target_port *target) req->priv.opcode = SRP_LOGIN_REQ; req->priv.tag = 0; - req->priv.req_it_iu_len = cpu_to_be32(srp_max_iu_len); + req->priv.req_it_iu_len = cpu_to_be32(SRP_MAX_IU_LEN); req->priv.req_buf_fmt = cpu_to_be16(SRP_BUF_FORMAT_DIRECT | SRP_BUF_FORMAT_INDIRECT); - /* - * In the published SRP specification (draft rev. 16a), the - * port identifier format is 8 bytes of ID extension followed - * by 8 bytes of GUID. Older drafts put the two halves in the - * opposite order, so that the GUID comes first. - * - * Targets conforming to these obsolete drafts can be - * recognized by the I/O Class they report. - */ - if (target->io_class == SRP_REV10_IB_IO_CLASS) { - memcpy(req->priv.initiator_port_id, - target->srp_host->initiator_port_id + 8, 8); - memcpy(req->priv.initiator_port_id + 8, - target->srp_host->initiator_port_id, 8); - memcpy(req->priv.target_port_id, &target->ioc_guid, 8); - memcpy(req->priv.target_port_id + 8, &target->id_ext, 8); - } else { - memcpy(req->priv.initiator_port_id, - target->srp_host->initiator_port_id, 16); - memcpy(req->priv.target_port_id, &target->id_ext, 8); - memcpy(req->priv.target_port_id + 8, &target->ioc_guid, 8); - } - + memcpy(req->priv.initiator_port_id, target->srp_host->initiator_port_id, 16); /* * Topspin/Cisco SRP targets will reject our login unless we * zero out the first 8 bytes of our initiator port ID. The @@ -364,6 +325,8 @@ static int srp_send_req(struct srp_target_port *target) (unsigned long long) be64_to_cpu(target->ioc_guid)); memset(req->priv.initiator_port_id, 0, 8); } + memcpy(req->priv.target_port_id, &target->id_ext, 8); + memcpy(req->priv.target_port_id + 8, &target->ioc_guid, 8); status = ib_send_cm_req(target->cm_id, &req->param); @@ -396,9 +359,9 @@ static void srp_remove_work(void *target_ptr) target->state = SRP_TARGET_REMOVED; spin_unlock_irq(target->scsi_host->host_lock); - spin_lock(&target->srp_host->target_lock); + mutex_lock(&target->srp_host->target_mutex); list_del(&target->list); - spin_unlock(&target->srp_host->target_lock); + mutex_unlock(&target->srp_host->target_mutex); scsi_remove_host(target->scsi_host); ib_destroy_cm_id(target->cm_id); @@ -458,11 +421,6 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd, scmnd->sc_data_direction != DMA_FROM_DEVICE)) return; - if (req->fmr) { - ib_fmr_pool_unmap(req->fmr); - req->fmr = NULL; - } - /* * This handling of non-SG commands can be killed when the * SCSI midlayer no longer generates non-SG commands. @@ -475,30 +433,18 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd, scat = &req->fake_sg; } - dma_unmap_sg(target->srp_host->dev->dev->dma_device, scat, nents, + dma_unmap_sg(target->srp_host->dev->dma_device, scat, nents, scmnd->sc_data_direction); } -static void srp_remove_req(struct srp_target_port *target, struct srp_request *req) -{ - srp_unmap_data(req->scmnd, target, req); - list_move_tail(&req->list, &target->free_reqs); -} - -static void srp_reset_req(struct srp_target_port *target, struct srp_request *req) -{ - req->scmnd->result = DID_RESET << 16; - req->scmnd->scsi_done(req->scmnd); - srp_remove_req(target, req); -} - static int srp_reconnect_target(struct srp_target_port *target) { struct ib_cm_id *new_cm_id; struct ib_qp_attr qp_attr; - struct srp_request *req, *tmp; + struct srp_request *req; struct ib_wc wc; int ret; + int i; spin_lock_irq(target->scsi_host->host_lock); if (target->state != SRP_TARGET_LIVE) { @@ -513,7 +459,7 @@ static int srp_reconnect_target(struct srp_target_port *target) * Now get a new local CM ID so that we avoid confusing the * target in case things are really fouled up. */ - new_cm_id = ib_create_cm_id(target->srp_host->dev->dev, + new_cm_id = ib_create_cm_id(target->srp_host->dev, srp_cm_handler, target); if (IS_ERR(new_cm_id)) { ret = PTR_ERR(new_cm_id); @@ -534,14 +480,19 @@ static int srp_reconnect_target(struct srp_target_port *target) while (ib_poll_cq(target->cq, 1, &wc) > 0) ; /* nothing */ - spin_lock_irq(target->scsi_host->host_lock); - list_for_each_entry_safe(req, tmp, &target->req_queue, list) - srp_reset_req(target, req); - spin_unlock_irq(target->scsi_host->host_lock); + list_for_each_entry(req, &target->req_queue, list) { + req->scmnd->result = DID_RESET << 16; + req->scmnd->scsi_done(req->scmnd); + srp_unmap_data(req->scmnd, target, req); + } target->rx_head = 0; target->tx_head = 0; target->tx_tail = 0; + INIT_LIST_HEAD(&target->free_reqs); + INIT_LIST_HEAD(&target->req_queue); + for (i = 0; i < SRP_SQ_SIZE; ++i) + list_add_tail(&target->req_ring[i].list, &target->free_reqs); ret = srp_connect_target(target); if (ret) @@ -577,85 +528,14 @@ err: return ret; } -static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat, - int sg_cnt, struct srp_request *req, - struct srp_direct_buf *buf) -{ - u64 io_addr = 0; - u64 *dma_pages; - u32 len; - int page_cnt; - int i, j; - int ret; - struct srp_device *dev = target->srp_host->dev; - - if (!dev->fmr_pool) - return -ENODEV; - - if ((sg_dma_address(&scat[0]) & ~dev->fmr_page_mask) && - mellanox_workarounds && !memcmp(&target->ioc_guid, mellanox_oui, 3)) - return -EINVAL; - - len = page_cnt = 0; - for (i = 0; i < sg_cnt; ++i) { - if (sg_dma_address(&scat[i]) & ~dev->fmr_page_mask) { - if (i > 0) - return -EINVAL; - else - ++page_cnt; - } - if ((sg_dma_address(&scat[i]) + sg_dma_len(&scat[i])) & - ~dev->fmr_page_mask) { - if (i < sg_cnt - 1) - return -EINVAL; - else - ++page_cnt; - } - - len += sg_dma_len(&scat[i]); - } - - page_cnt += len >> dev->fmr_page_shift; - if (page_cnt > SRP_FMR_SIZE) - return -ENOMEM; - - dma_pages = kmalloc(sizeof (u64) * page_cnt, GFP_ATOMIC); - if (!dma_pages) - return -ENOMEM; - - page_cnt = 0; - for (i = 0; i < sg_cnt; ++i) - for (j = 0; j < sg_dma_len(&scat[i]); j += dev->fmr_page_size) - dma_pages[page_cnt++] = - (sg_dma_address(&scat[i]) & dev->fmr_page_mask) + j; - - req->fmr = ib_fmr_pool_map_phys(dev->fmr_pool, - dma_pages, page_cnt, io_addr); - if (IS_ERR(req->fmr)) { - ret = PTR_ERR(req->fmr); - req->fmr = NULL; - goto out; - } - - buf->va = cpu_to_be64(sg_dma_address(&scat[0]) & ~dev->fmr_page_mask); - buf->key = cpu_to_be32(req->fmr->fmr->rkey); - buf->len = cpu_to_be32(len); - - ret = 0; - -out: - kfree(dma_pages); - - return ret; -} - static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target, struct srp_request *req) { struct scatterlist *scat; struct srp_cmd *cmd = req->cmd->buf; int len, nents, count; - u8 fmt = SRP_DATA_DESC_DIRECT; + int i; + u8 fmt; if (!scmnd->request_buffer || scmnd->sc_data_direction == DMA_NONE) return sizeof (struct srp_cmd); @@ -680,63 +560,53 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target, sg_init_one(scat, scmnd->request_buffer, scmnd->request_bufflen); } - count = dma_map_sg(target->srp_host->dev->dev->dma_device, - scat, nents, scmnd->sc_data_direction); - - fmt = SRP_DATA_DESC_DIRECT; - len = sizeof (struct srp_cmd) + sizeof (struct srp_direct_buf); + count = dma_map_sg(target->srp_host->dev->dma_device, scat, nents, + scmnd->sc_data_direction); if (count == 1) { - /* - * The midlayer only generated a single gather/scatter - * entry, or DMA mapping coalesced everything to a - * single entry. So a direct descriptor along with - * the DMA MR suffices. - */ struct srp_direct_buf *buf = (void *) cmd->add_data; + fmt = SRP_DATA_DESC_DIRECT; + buf->va = cpu_to_be64(sg_dma_address(scat)); - buf->key = cpu_to_be32(target->srp_host->dev->mr->rkey); + buf->key = cpu_to_be32(target->srp_host->mr->rkey); buf->len = cpu_to_be32(sg_dma_len(scat)); - } else if (srp_map_fmr(target, scat, count, req, - (void *) cmd->add_data)) { - /* - * FMR mapping failed, and the scatterlist has more - * than one entry. Generate an indirect memory - * descriptor. - */ + + len = sizeof (struct srp_cmd) + + sizeof (struct srp_direct_buf); + } else { struct srp_indirect_buf *buf = (void *) cmd->add_data; u32 datalen = 0; - int i; fmt = SRP_DATA_DESC_INDIRECT; - len = sizeof (struct srp_cmd) + - sizeof (struct srp_indirect_buf) + - count * sizeof (struct srp_direct_buf); - - for (i = 0; i < count; ++i) { - buf->desc_list[i].va = - cpu_to_be64(sg_dma_address(&scat[i])); - buf->desc_list[i].key = - cpu_to_be32(target->srp_host->dev->mr->rkey); - buf->desc_list[i].len = - cpu_to_be32(sg_dma_len(&scat[i])); - datalen += sg_dma_len(&scat[i]); - } if (scmnd->sc_data_direction == DMA_TO_DEVICE) cmd->data_out_desc_cnt = count; else cmd->data_in_desc_cnt = count; - buf->table_desc.va = - cpu_to_be64(req->cmd->dma + sizeof *cmd + sizeof *buf); + buf->table_desc.va = cpu_to_be64(req->cmd->dma + + sizeof *cmd + + sizeof *buf); buf->table_desc.key = - cpu_to_be32(target->srp_host->dev->mr->rkey); + cpu_to_be32(target->srp_host->mr->rkey); buf->table_desc.len = cpu_to_be32(count * sizeof (struct srp_direct_buf)); + for (i = 0; i < count; ++i) { + buf->desc_list[i].va = cpu_to_be64(sg_dma_address(&scat[i])); + buf->desc_list[i].key = + cpu_to_be32(target->srp_host->mr->rkey); + buf->desc_list[i].len = cpu_to_be32(sg_dma_len(&scat[i])); + + datalen += sg_dma_len(&scat[i]); + } + buf->len = cpu_to_be32(datalen); + + len = sizeof (struct srp_cmd) + + sizeof (struct srp_indirect_buf) + + count * sizeof (struct srp_direct_buf); } if (scmnd->sc_data_direction == DMA_TO_DEVICE) @@ -747,6 +617,12 @@ static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_target_port *target, return len; } +static void srp_remove_req(struct srp_target_port *target, struct srp_request *req) +{ + srp_unmap_data(req->scmnd, target, req); + list_move_tail(&req->list, &target->free_reqs); +} + static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) { struct srp_request *req; @@ -799,6 +675,13 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) spin_unlock_irqrestore(target->scsi_host->host_lock, flags); } +static void srp_reconnect_work(void *target_ptr) +{ + struct srp_target_port *target = target_ptr; + + srp_reconnect_target(target); +} + static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) { struct srp_iu *iu; @@ -806,7 +689,7 @@ static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) iu = target->rx_ring[wc->wr_id & ~SRP_OP_RECV]; - dma_sync_single_for_cpu(target->srp_host->dev->dev->dma_device, iu->dma, + dma_sync_single_for_cpu(target->srp_host->dev->dma_device, iu->dma, target->max_ti_iu_len, DMA_FROM_DEVICE); opcode = *(u8 *) iu->buf; @@ -843,7 +726,7 @@ static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) break; } - dma_sync_single_for_device(target->srp_host->dev->dev->dma_device, iu->dma, + dma_sync_single_for_device(target->srp_host->dev->dma_device, iu->dma, target->max_ti_iu_len, DMA_FROM_DEVICE); } @@ -851,6 +734,7 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr) { struct srp_target_port *target = target_ptr; struct ib_wc wc; + unsigned long flags; ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); while (ib_poll_cq(cq, 1, &wc) > 0) { @@ -858,6 +742,10 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr) printk(KERN_ERR PFX "failed %s status %d\n", wc.wr_id & SRP_OP_RECV ? "receive" : "send", wc.status); + spin_lock_irqsave(target->scsi_host->host_lock, flags); + if (target->state == SRP_TARGET_LIVE) + schedule_work(&target->work); + spin_unlock_irqrestore(target->scsi_host->host_lock, flags); break; } @@ -882,7 +770,7 @@ static int __srp_post_recv(struct srp_target_port *target) list.addr = iu->dma; list.length = iu->size; - list.lkey = target->srp_host->dev->mr->lkey; + list.lkey = target->srp_host->mr->lkey; wr.next = NULL; wr.sg_list = &list; @@ -917,8 +805,12 @@ static struct srp_iu *__srp_get_tx_iu(struct srp_target_port *target) if (target->tx_head - target->tx_tail >= SRP_SQ_SIZE) return NULL; - if (unlikely(target->req_lim < 1)) - ++target->zero_req_lim; + if (unlikely(target->req_lim < 1)) { + if (printk_ratelimit()) + printk(KERN_DEBUG PFX "Target has req_lim %d\n", + target->req_lim); + return NULL; + } return target->tx_ring[target->tx_head & SRP_SQ_SIZE]; } @@ -936,7 +828,7 @@ static int __srp_post_send(struct srp_target_port *target, list.addr = iu->dma; list.length = len; - list.lkey = target->srp_host->dev->mr->lkey; + list.lkey = target->srp_host->mr->lkey; wr.next = NULL; wr.wr_id = target->tx_head & SRP_SQ_SIZE; @@ -978,8 +870,8 @@ static int srp_queuecommand(struct scsi_cmnd *scmnd, if (!iu) goto err; - dma_sync_single_for_cpu(target->srp_host->dev->dev->dma_device, iu->dma, - srp_max_iu_len, DMA_TO_DEVICE); + dma_sync_single_for_cpu(target->srp_host->dev->dma_device, iu->dma, + SRP_MAX_IU_LEN, DMA_TO_DEVICE); req = list_entry(target->free_reqs.next, struct srp_request, list); @@ -1011,8 +903,8 @@ static int srp_queuecommand(struct scsi_cmnd *scmnd, goto err_unmap; } - dma_sync_single_for_device(target->srp_host->dev->dev->dma_device, iu->dma, - srp_max_iu_len, DMA_TO_DEVICE); + dma_sync_single_for_device(target->srp_host->dev->dma_device, iu->dma, + SRP_MAX_IU_LEN, DMA_TO_DEVICE); if (__srp_post_send(target, iu, len)) { printk(KERN_ERR PFX "Send failed\n"); @@ -1044,7 +936,7 @@ static int srp_alloc_iu_bufs(struct srp_target_port *target) for (i = 0; i < SRP_SQ_SIZE + 1; ++i) { target->tx_ring[i] = srp_alloc_iu(target->srp_host, - srp_max_iu_len, + SRP_MAX_IU_LEN, GFP_KERNEL, DMA_TO_DEVICE); if (!target->tx_ring[i]) goto err; @@ -1215,10 +1107,11 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) srp_cm_rej_handler(cm_id, event, target); break; - case IB_CM_DREQ_RECEIVED: - printk(KERN_WARNING PFX "DREQ received - connection closed\n"); - if (ib_send_cm_drep(cm_id, NULL, 0)) - printk(KERN_ERR PFX "Sending CM DREP failed\n"); + case IB_CM_MRA_RECEIVED: + printk(KERN_ERR PFX "MRA received\n"); + break; + + case IB_CM_DREP_RECEIVED: break; case IB_CM_TIMEWAIT_EXIT: @@ -1228,11 +1121,6 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) target->status = 0; break; - case IB_CM_MRA_RECEIVED: - case IB_CM_DREQ_ERROR: - case IB_CM_DREP_RECEIVED: - break; - default: printk(KERN_WARNING PFX "Unhandled CM event %d\n", event->event); break; @@ -1351,8 +1239,11 @@ static int srp_reset_device(struct scsi_cmnd *scmnd) spin_lock_irq(target->scsi_host->host_lock); list_for_each_entry_safe(req, tmp, &target->req_queue, list) - if (req->scmnd->device == scmnd->device) - srp_reset_req(target, req); + if (req->scmnd->device == scmnd->device) { + req->scmnd->result = DID_RESET << 16; + req->scmnd->scsi_done(req->scmnd); + srp_remove_req(target, req); + } spin_unlock_irq(target->scsi_host->host_lock); @@ -1438,23 +1329,11 @@ static ssize_t show_dgid(struct class_device *cdev, char *buf) be16_to_cpu(((__be16 *) target->path.dgid.raw)[7])); } -static ssize_t show_zero_req_lim(struct class_device *cdev, char *buf) -{ - struct srp_target_port *target = host_to_target(class_to_shost(cdev)); - - if (target->state == SRP_TARGET_DEAD || - target->state == SRP_TARGET_REMOVED) - return -ENODEV; - - return sprintf(buf, "%d\n", target->zero_req_lim); -} - static CLASS_DEVICE_ATTR(id_ext, S_IRUGO, show_id_ext, NULL); static CLASS_DEVICE_ATTR(ioc_guid, S_IRUGO, show_ioc_guid, NULL); static CLASS_DEVICE_ATTR(service_id, S_IRUGO, show_service_id, NULL); static CLASS_DEVICE_ATTR(pkey, S_IRUGO, show_pkey, NULL); static CLASS_DEVICE_ATTR(dgid, S_IRUGO, show_dgid, NULL); -static CLASS_DEVICE_ATTR(zero_req_lim, S_IRUGO, show_zero_req_lim, NULL); static struct class_device_attribute *srp_host_attrs[] = { &class_device_attr_id_ext, @@ -1462,7 +1341,6 @@ static struct class_device_attribute *srp_host_attrs[] = { &class_device_attr_service_id, &class_device_attr_pkey, &class_device_attr_dgid, - &class_device_attr_zero_req_lim, NULL }; @@ -1476,6 +1354,7 @@ static struct scsi_host_template srp_template = { .eh_host_reset_handler = srp_reset_host, .can_queue = SRP_SQ_SIZE, .this_id = -1, + .sg_tablesize = SRP_MAX_INDIRECT, .cmd_per_lun = SRP_SQ_SIZE, .use_clustering = ENABLE_CLUSTERING, .shost_attrs = srp_host_attrs @@ -1486,17 +1365,18 @@ static int srp_add_target(struct srp_host *host, struct srp_target_port *target) sprintf(target->target_name, "SRP.T10:%016llX", (unsigned long long) be64_to_cpu(target->id_ext)); - if (scsi_add_host(target->scsi_host, host->dev->dev->dma_device)) + if (scsi_add_host(target->scsi_host, host->dev->dma_device)) return -ENODEV; - spin_lock(&host->target_lock); + mutex_lock(&host->target_mutex); list_add_tail(&target->list, &host->target_list); - spin_unlock(&host->target_lock); + mutex_unlock(&host->target_mutex); target->state = SRP_TARGET_LIVE; + /* XXX: are we supposed to have a definition of SCAN_WILD_CARD ?? */ scsi_scan_target(&target->scsi_host->shost_gendev, - 0, target->scsi_id, SCAN_WILD_CARD, 0); + 0, target->scsi_id, ~0, 0); return 0; } @@ -1530,8 +1410,6 @@ enum { SRP_OPT_PKEY = 1 << 3, SRP_OPT_SERVICE_ID = 1 << 4, SRP_OPT_MAX_SECT = 1 << 5, - SRP_OPT_MAX_CMD_PER_LUN = 1 << 6, - SRP_OPT_IO_CLASS = 1 << 7, SRP_OPT_ALL = (SRP_OPT_ID_EXT | SRP_OPT_IOC_GUID | SRP_OPT_DGID | @@ -1540,15 +1418,13 @@ enum { }; static match_table_t srp_opt_tokens = { - { SRP_OPT_ID_EXT, "id_ext=%s" }, - { SRP_OPT_IOC_GUID, "ioc_guid=%s" }, - { SRP_OPT_DGID, "dgid=%s" }, - { SRP_OPT_PKEY, "pkey=%x" }, - { SRP_OPT_SERVICE_ID, "service_id=%s" }, - { SRP_OPT_MAX_SECT, "max_sect=%d" }, - { SRP_OPT_MAX_CMD_PER_LUN, "max_cmd_per_lun=%d" }, - { SRP_OPT_IO_CLASS, "io_class=%x" }, - { SRP_OPT_ERR, NULL } + { SRP_OPT_ID_EXT, "id_ext=%s" }, + { SRP_OPT_IOC_GUID, "ioc_guid=%s" }, + { SRP_OPT_DGID, "dgid=%s" }, + { SRP_OPT_PKEY, "pkey=%x" }, + { SRP_OPT_SERVICE_ID, "service_id=%s" }, + { SRP_OPT_MAX_SECT, "max_sect=%d" }, + { SRP_OPT_ERR, NULL } }; static int srp_parse_options(const char *buf, struct srp_target_port *target) @@ -1624,29 +1500,6 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) target->scsi_host->max_sectors = token; break; - case SRP_OPT_MAX_CMD_PER_LUN: - if (match_int(args, &token)) { - printk(KERN_WARNING PFX "bad max cmd_per_lun parameter '%s'\n", p); - goto out; - } - target->scsi_host->cmd_per_lun = min(token, SRP_SQ_SIZE); - break; - - case SRP_OPT_IO_CLASS: - if (match_hex(args, &token)) { - printk(KERN_WARNING PFX "bad IO class parameter '%s' \n", p); - goto out; - } - if (token != SRP_REV10_IB_IO_CLASS && - token != SRP_REV16A_IB_IO_CLASS) { - printk(KERN_WARNING PFX "unknown IO class parameter value" - " %x specified (use %x or %x).\n", - token, SRP_REV10_IB_IO_CLASS, SRP_REV16A_IB_IO_CLASS); - goto out; - } - target->io_class = token; - break; - default: printk(KERN_WARNING PFX "unknown parameter or missing value " "'%s' in target creation request\n", p); @@ -1689,10 +1542,11 @@ static ssize_t srp_create_target(struct class_device *class_dev, target = host_to_target(target_host); memset(target, 0, sizeof *target); - target->io_class = SRP_REV16A_IB_IO_CLASS; target->scsi_host = target_host; target->srp_host = host; + INIT_WORK(&target->work, srp_reconnect_work, target); + INIT_LIST_HEAD(&target->free_reqs); INIT_LIST_HEAD(&target->req_queue); for (i = 0; i < SRP_SQ_SIZE; ++i) { @@ -1704,7 +1558,7 @@ static ssize_t srp_create_target(struct class_device *class_dev, if (ret) goto err; - ib_get_cached_gid(host->dev->dev, host->port, 0, &target->path.sgid); + ib_get_cached_gid(host->dev, host->port, 0, &target->path.sgid); printk(KERN_DEBUG PFX "new target: id_ext %016llx ioc_guid %016llx pkey %04x " "service_id %016llx dgid %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", @@ -1725,7 +1579,7 @@ static ssize_t srp_create_target(struct class_device *class_dev, if (ret) goto err; - target->cm_id = ib_create_cm_id(host->dev->dev, srp_cm_handler, target); + target->cm_id = ib_create_cm_id(host->dev, srp_cm_handler, target); if (IS_ERR(target->cm_id)) { ret = PTR_ERR(target->cm_id); goto err_free; @@ -1765,7 +1619,7 @@ static ssize_t show_ibdev(struct class_device *class_dev, char *buf) struct srp_host *host = container_of(class_dev, struct srp_host, class_dev); - return sprintf(buf, "%s\n", host->dev->dev->name); + return sprintf(buf, "%s\n", host->dev->name); } static CLASS_DEVICE_ATTR(ibdev, S_IRUGO, show_ibdev, NULL); @@ -1780,7 +1634,7 @@ static ssize_t show_port(struct class_device *class_dev, char *buf) static CLASS_DEVICE_ATTR(port, S_IRUGO, show_port, NULL); -static struct srp_host *srp_add_port(struct srp_device *device, u8 port) +static struct srp_host *srp_add_port(struct ib_device *device, u8 port) { struct srp_host *host; @@ -1789,21 +1643,32 @@ static struct srp_host *srp_add_port(struct srp_device *device, u8 port) return NULL; INIT_LIST_HEAD(&host->target_list); - spin_lock_init(&host->target_lock); + mutex_init(&host->target_mutex); init_completion(&host->released); host->dev = device; host->port = port; host->initiator_port_id[7] = port; - memcpy(host->initiator_port_id + 8, &device->dev->node_guid, 8); + memcpy(host->initiator_port_id + 8, &device->node_guid, 8); + + host->pd = ib_alloc_pd(device); + if (IS_ERR(host->pd)) + goto err_free; + + host->mr = ib_get_dma_mr(host->pd, + IB_ACCESS_LOCAL_WRITE | + IB_ACCESS_REMOTE_READ | + IB_ACCESS_REMOTE_WRITE); + if (IS_ERR(host->mr)) + goto err_pd; host->class_dev.class = &srp_class; - host->class_dev.dev = device->dev->dma_device; + host->class_dev.dev = device->dma_device; snprintf(host->class_dev.class_id, BUS_ID_SIZE, "srp-%s-%d", - device->dev->name, port); + device->name, port); if (class_device_register(&host->class_dev)) - goto free_host; + goto err_mr; if (class_device_create_file(&host->class_dev, &class_device_attr_add_target)) goto err_class; if (class_device_create_file(&host->class_dev, &class_device_attr_ibdev)) @@ -1816,7 +1681,13 @@ static struct srp_host *srp_add_port(struct srp_device *device, u8 port) err_class: class_device_unregister(&host->class_dev); -free_host: +err_mr: + ib_dereg_mr(host->mr); + +err_pd: + ib_dealloc_pd(host->pd); + +err_free: kfree(host); return NULL; @@ -1824,62 +1695,15 @@ free_host: static void srp_add_one(struct ib_device *device) { - struct srp_device *srp_dev; - struct ib_device_attr *dev_attr; - struct ib_fmr_pool_param fmr_param; + struct list_head *dev_list; struct srp_host *host; int s, e, p; - dev_attr = kmalloc(sizeof *dev_attr, GFP_KERNEL); - if (!dev_attr) + dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL); + if (!dev_list) return; - if (ib_query_device(device, dev_attr)) { - printk(KERN_WARNING PFX "Query device failed for %s\n", - device->name); - goto free_attr; - } - - srp_dev = kmalloc(sizeof *srp_dev, GFP_KERNEL); - if (!srp_dev) - goto free_attr; - - /* - * Use the smallest page size supported by the HCA, down to a - * minimum of 512 bytes (which is the smallest sector that a - * SCSI command will ever carry). - */ - srp_dev->fmr_page_shift = max(9, ffs(dev_attr->page_size_cap) - 1); - srp_dev->fmr_page_size = 1 << srp_dev->fmr_page_shift; - srp_dev->fmr_page_mask = ~((unsigned long) srp_dev->fmr_page_size - 1); - - INIT_LIST_HEAD(&srp_dev->dev_list); - - srp_dev->dev = device; - srp_dev->pd = ib_alloc_pd(device); - if (IS_ERR(srp_dev->pd)) - goto free_dev; - - srp_dev->mr = ib_get_dma_mr(srp_dev->pd, - IB_ACCESS_LOCAL_WRITE | - IB_ACCESS_REMOTE_READ | - IB_ACCESS_REMOTE_WRITE); - if (IS_ERR(srp_dev->mr)) - goto err_pd; - - memset(&fmr_param, 0, sizeof fmr_param); - fmr_param.pool_size = SRP_FMR_POOL_SIZE; - fmr_param.dirty_watermark = SRP_FMR_DIRTY_SIZE; - fmr_param.cache = 1; - fmr_param.max_pages_per_fmr = SRP_FMR_SIZE; - fmr_param.page_shift = srp_dev->fmr_page_shift; - fmr_param.access = (IB_ACCESS_LOCAL_WRITE | - IB_ACCESS_REMOTE_WRITE | - IB_ACCESS_REMOTE_READ); - - srp_dev->fmr_pool = ib_create_fmr_pool(srp_dev->pd, &fmr_param); - if (IS_ERR(srp_dev->fmr_pool)) - srp_dev->fmr_pool = NULL; + INIT_LIST_HEAD(dev_list); if (device->node_type == IB_NODE_SWITCH) { s = 0; @@ -1890,35 +1714,25 @@ static void srp_add_one(struct ib_device *device) } for (p = s; p <= e; ++p) { - host = srp_add_port(srp_dev, p); + host = srp_add_port(device, p); if (host) - list_add_tail(&host->list, &srp_dev->dev_list); + list_add_tail(&host->list, dev_list); } - ib_set_client_data(device, &srp_client, srp_dev); - - goto free_attr; - -err_pd: - ib_dealloc_pd(srp_dev->pd); - -free_dev: - kfree(srp_dev); - -free_attr: - kfree(dev_attr); + ib_set_client_data(device, &srp_client, dev_list); } static void srp_remove_one(struct ib_device *device) { - struct srp_device *srp_dev; + struct list_head *dev_list; struct srp_host *host, *tmp_host; LIST_HEAD(target_list); struct srp_target_port *target, *tmp_target; + unsigned long flags; - srp_dev = ib_get_client_data(device, &srp_client); + dev_list = ib_get_client_data(device, &srp_client); - list_for_each_entry_safe(host, tmp_host, &srp_dev->dev_list, list) { + list_for_each_entry_safe(host, tmp_host, dev_list, list) { class_device_unregister(&host->class_dev); /* * Wait for the sysfs entry to go away, so that no new @@ -1930,13 +1744,15 @@ static void srp_remove_one(struct ib_device *device) * Mark all target ports as removed, so we stop queueing * commands and don't try to reconnect. */ - spin_lock(&host->target_lock); - list_for_each_entry(target, &host->target_list, list) { - spin_lock_irq(target->scsi_host->host_lock); - target->state = SRP_TARGET_REMOVED; - spin_unlock_irq(target->scsi_host->host_lock); + mutex_lock(&host->target_mutex); + list_for_each_entry_safe(target, tmp_target, + &host->target_list, list) { + spin_lock_irqsave(target->scsi_host->host_lock, flags); + if (target->state != SRP_TARGET_REMOVED) + target->state = SRP_TARGET_REMOVED; + spin_unlock_irqrestore(target->scsi_host->host_lock, flags); } - spin_unlock(&host->target_lock); + mutex_unlock(&host->target_mutex); /* * Wait for any reconnection tasks that may have @@ -1954,26 +1770,18 @@ static void srp_remove_one(struct ib_device *device) scsi_host_put(target->scsi_host); } + ib_dereg_mr(host->mr); + ib_dealloc_pd(host->pd); kfree(host); } - if (srp_dev->fmr_pool) - ib_destroy_fmr_pool(srp_dev->fmr_pool); - ib_dereg_mr(srp_dev->mr); - ib_dealloc_pd(srp_dev->pd); - - kfree(srp_dev); + kfree(dev_list); } static int __init srp_init_module(void) { int ret; - srp_template.sg_tablesize = srp_sg_tablesize; - srp_max_iu_len = (sizeof (struct srp_cmd) + - sizeof (struct srp_indirect_buf) + - srp_sg_tablesize * 16); - ret = class_register(&srp_class); if (ret) { printk(KERN_ERR PFX "couldn't register class infiniband_srp\n"); diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 5b581fb8e..c5cd43aae 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -46,7 +46,6 @@ #include #include #include -#include enum { SRP_PATH_REC_TIMEOUT_MS = 1000, @@ -56,21 +55,20 @@ enum { SRP_DLID_REDIRECT = 2, SRP_MAX_LUN = 512, - SRP_DEF_SG_TABLESIZE = 12, + SRP_MAX_IU_LEN = 256, SRP_RQ_SHIFT = 6, SRP_RQ_SIZE = 1 << SRP_RQ_SHIFT, SRP_SQ_SIZE = SRP_RQ_SIZE - 1, SRP_CQ_SIZE = SRP_SQ_SIZE + SRP_RQ_SIZE, - SRP_TAG_TSK_MGMT = 1 << (SRP_RQ_SHIFT + 1), - - SRP_FMR_SIZE = 256, - SRP_FMR_POOL_SIZE = 1024, - SRP_FMR_DIRTY_SIZE = SRP_FMR_POOL_SIZE / 4 + SRP_TAG_TSK_MGMT = 1 << (SRP_RQ_SHIFT + 1) }; #define SRP_OP_RECV (1 << 31) +#define SRP_MAX_INDIRECT ((SRP_MAX_IU_LEN - \ + sizeof (struct srp_cmd) - \ + sizeof (struct srp_indirect_buf)) / 16) enum srp_target_state { SRP_TARGET_LIVE, @@ -79,24 +77,15 @@ enum srp_target_state { SRP_TARGET_REMOVED }; -struct srp_device { - struct list_head dev_list; +struct srp_host { + u8 initiator_port_id[16]; struct ib_device *dev; + u8 port; struct ib_pd *pd; struct ib_mr *mr; - struct ib_fmr_pool *fmr_pool; - int fmr_page_shift; - int fmr_page_size; - unsigned long fmr_page_mask; -}; - -struct srp_host { - u8 initiator_port_id[16]; - struct srp_device *dev; - u8 port; struct class_device class_dev; struct list_head target_list; - spinlock_t target_lock; + struct mutex target_mutex; struct completion released; struct list_head list; }; @@ -106,7 +95,6 @@ struct srp_request { struct scsi_cmnd *scmnd; struct srp_iu *cmd; struct srp_iu *tsk_mgmt; - struct ib_pool_fmr *fmr; /* * Fake scatterlist used when scmnd->use_sg==0. Can be killed * when the SCSI midlayer no longer generates non-SG commands. @@ -122,7 +110,6 @@ struct srp_target_port { __be64 id_ext; __be64 ioc_guid; __be64 service_id; - u16 io_class; struct srp_host *srp_host; struct Scsi_Host *scsi_host; char target_name[32]; @@ -139,8 +126,6 @@ struct srp_target_port { int max_ti_iu_len; s32 req_lim; - int zero_req_lim; - unsigned rx_head; struct srp_iu *rx_ring[SRP_RQ_SIZE]; diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 58223b5d8..cea8e15ae 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -5,7 +5,7 @@ menu "Input device support" config INPUT - tristate "Generic input layer (needed for keyboard, mouse, ...)" if EMBEDDED + tristate "Generic input layer (needed for keyboard, mouse, ...)" default y ---help--- Say Y here if you have any input device (mouse, keyboard, tablet, diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 4bf48188c..ba325f16d 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -78,19 +78,14 @@ static int evdev_fasync(int fd, struct file *file, int on) { int retval; struct evdev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); - return retval < 0 ? retval : 0; } -static int evdev_flush(struct file *file, fl_owner_t id) +static int evdev_flush(struct file * file) { struct evdev_list *list = file->private_data; - - if (!list->evdev->exist) - return -ENODEV; - + if (!list->evdev->exist) return -ENODEV; return input_flush_device(&list->evdev->handle, file); } @@ -127,10 +122,14 @@ static int evdev_open(struct inode * inode, struct file * file) { struct evdev_list *list; int i = iminor(inode) - EVDEV_MINOR_BASE; + int accept_err; if (i >= EVDEV_MINORS || !evdev_table[i] || !evdev_table[i]->exist) return -ENODEV; + if ((accept_err = input_accept_process(&(evdev_table[i]->handle), file))) + return accept_err; + if (!(list = kzalloc(sizeof(struct evdev_list), GFP_KERNEL))) return -ENOMEM; @@ -256,7 +255,7 @@ static ssize_t evdev_write(struct file * file, const char __user * buffer, size_ if (evdev_event_from_user(buffer + retval, &event)) return -EFAULT; - input_inject_event(&list->evdev->handle, event.type, event.code, event.value); + input_event(list->evdev->handle.dev, event.type, event.code, event.value); retval += evdev_event_size(); } @@ -301,7 +300,6 @@ static ssize_t evdev_read(struct file * file, char __user * buffer, size_t count static unsigned int evdev_poll(struct file *file, poll_table *wait) { struct evdev_list *list = file->private_data; - poll_wait(file, &list->evdev->wait, wait); return ((list->head == list->tail) ? 0 : (POLLIN | POLLRDNORM)) | (list->evdev->exist ? 0 : (POLLHUP | POLLERR)); @@ -424,8 +422,8 @@ static long evdev_ioctl_handler(struct file *file, unsigned int cmd, if (get_user(v, ip + 1)) return -EFAULT; - input_inject_event(&evdev->handle, EV_REP, REP_DELAY, u); - input_inject_event(&evdev->handle, EV_REP, REP_PERIOD, v); + input_event(dev, EV_REP, REP_DELAY, u); + input_event(dev, EV_REP, REP_PERIOD, v); return 0; diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c index 9793ac36d..462f8d300 100644 --- a/drivers/input/gameport/emu10k1-gp.c +++ b/drivers/input/gameport/emu10k1-gp.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c index 90de5afe0..47e93daa0 100644 --- a/drivers/input/gameport/fm801-gp.c +++ b/drivers/input/gameport/fm801-gp.c @@ -106,10 +106,10 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device gp->gameport = port; gp->res_port = request_region(port->io, 0x10, "FM801 GP"); if (!gp->res_port) { + kfree(gp); + gameport_free_port(port); printk(KERN_DEBUG "fm801-gp: unable to grab region 0x%x-0x%x\n", port->io, port->io + 0x0f); - gameport_free_port(port); - kfree(gp); return -EBUSY; } diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 3f47ae55c..36644bff3 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c @@ -53,7 +53,6 @@ static LIST_HEAD(gameport_list); static struct bus_type gameport_bus; -static void gameport_add_driver(struct gameport_driver *drv); static void gameport_add_port(struct gameport *gameport); static void gameport_destroy_port(struct gameport *gameport); static void gameport_reconnect_port(struct gameport *gameport); @@ -212,14 +211,8 @@ static void gameport_release_driver(struct gameport *gameport) static void gameport_find_driver(struct gameport *gameport) { - int error; - down_write(&gameport_bus.subsys.rwsem); - error = device_attach(&gameport->dev); - if (error < 0) - printk(KERN_WARNING - "gameport: device_attach() failed for %s (%s), error: %d\n", - gameport->phys, gameport->name, error); + device_attach(&gameport->dev); up_write(&gameport_bus.subsys.rwsem); } @@ -323,6 +316,7 @@ static void gameport_remove_duplicate_events(struct gameport_event *event) spin_unlock_irqrestore(&gameport_event_lock, flags); } + static struct gameport_event *gameport_get_event(void) { struct gameport_event *event; @@ -348,6 +342,7 @@ static struct gameport_event *gameport_get_event(void) static void gameport_handle_event(void) { struct gameport_event *event; + struct gameport_driver *gameport_drv; mutex_lock(&gameport_mutex); @@ -374,7 +369,8 @@ static void gameport_handle_event(void) break; case GAMEPORT_REGISTER_DRIVER: - gameport_add_driver(event->object); + gameport_drv = event->object; + driver_register(&gameport_drv->driver); break; default: @@ -536,7 +532,6 @@ static void gameport_init_port(struct gameport *gameport) if (gameport->parent) gameport->dev.parent = &gameport->parent->dev; - INIT_LIST_HEAD(&gameport->node); spin_lock_init(&gameport->timer_lock); init_timer(&gameport->poll_timer); gameport->poll_timer.function = gameport_run_poll_handler; @@ -549,8 +544,6 @@ static void gameport_init_port(struct gameport *gameport) */ static void gameport_add_port(struct gameport *gameport) { - int error; - if (gameport->parent) gameport->parent->child = gameport; @@ -565,13 +558,8 @@ static void gameport_add_port(struct gameport *gameport) printk(KERN_INFO "gameport: %s is %s, speed %dkHz\n", gameport->name, gameport->phys, gameport->speed); - error = device_add(&gameport->dev); - if (error) - printk(KERN_ERR - "gameport: device_add() failed for %s (%s), error: %d\n", - gameport->phys, gameport->name, error); - else - gameport->registered = 1; + device_add(&gameport->dev); + gameport->registered = 1; } /* @@ -595,11 +583,10 @@ static void gameport_destroy_port(struct gameport *gameport) if (gameport->registered) { device_del(&gameport->dev); + list_del_init(&gameport->node); gameport->registered = 0; } - list_del_init(&gameport->node); - gameport_remove_pending_events(gameport); put_device(&gameport->dev); } @@ -717,22 +704,11 @@ static int gameport_driver_remove(struct device *dev) } static struct bus_type gameport_bus = { - .name = "gameport", - .probe = gameport_driver_probe, - .remove = gameport_driver_remove, + .name = "gameport", + .probe = gameport_driver_probe, + .remove = gameport_driver_remove, }; -static void gameport_add_driver(struct gameport_driver *drv) -{ - int error; - - error = driver_register(&drv->driver); - if (error) - printk(KERN_ERR - "gameport: driver_register() failed for %s, error: %d\n", - drv->driver.name, error); -} - void __gameport_register_driver(struct gameport_driver *drv, struct module *owner) { drv->driver.bus = &gameport_bus; @@ -802,24 +778,16 @@ void gameport_close(struct gameport *gameport) static int __init gameport_init(void) { - int error; + gameport_task = kthread_run(gameport_thread, NULL, "kgameportd"); + if (IS_ERR(gameport_task)) { + printk(KERN_ERR "gameport: Failed to start kgameportd\n"); + return PTR_ERR(gameport_task); + } gameport_bus.dev_attrs = gameport_device_attrs; gameport_bus.drv_attrs = gameport_driver_attrs; gameport_bus.match = gameport_bus_match; - error = bus_register(&gameport_bus); - if (error) { - printk(KERN_ERR "gameport: failed to register gameport bus, error: %d\n", error); - return error; - } - - gameport_task = kthread_run(gameport_thread, NULL, "kgameportd"); - if (IS_ERR(gameport_task)) { - bus_unregister(&gameport_bus); - error = PTR_ERR(gameport_task); - printk(KERN_ERR "gameport: Failed to start kgameportd, error: %d\n", error); - return error; - } + bus_register(&gameport_bus); return 0; } diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c index f68dbe6f7..3e2d28f26 100644 --- a/drivers/input/gameport/ns558.c +++ b/drivers/input/gameport/ns558.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/drivers/input/input.c b/drivers/input/input.c index 9cb4b9a54..b149c9434 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -28,6 +28,20 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("Input core"); MODULE_LICENSE("GPL"); +EXPORT_SYMBOL(input_allocate_device); +EXPORT_SYMBOL(input_register_device); +EXPORT_SYMBOL(input_unregister_device); +EXPORT_SYMBOL(input_register_handler); +EXPORT_SYMBOL(input_unregister_handler); +EXPORT_SYMBOL(input_grab_device); +EXPORT_SYMBOL(input_release_device); +EXPORT_SYMBOL(input_open_device); +EXPORT_SYMBOL(input_close_device); +EXPORT_SYMBOL(input_accept_process); +EXPORT_SYMBOL(input_flush_device); +EXPORT_SYMBOL(input_event); +EXPORT_SYMBOL_GPL(input_class); + #define INPUT_DEVICES 256 static LIST_HEAD(input_dev_list); @@ -35,16 +49,6 @@ static LIST_HEAD(input_handler_list); static struct input_handler *input_table[8]; -/** - * input_event() - report new input event - * @handle: device that generated the event - * @type: type of the event - * @code: event code - * @value: value of the event - * - * This function should be used by drivers implementing various input devices - * See also input_inject_event() - */ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { struct input_handle *handle; @@ -59,13 +63,11 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in case EV_SYN: switch (code) { case SYN_CONFIG: - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; case SYN_REPORT: - if (dev->sync) - return; + if (dev->sync) return; dev->sync = 1; break; } @@ -134,8 +136,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in if (code > MSC_MAX || !test_bit(code, dev->mscbit)) return; - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; @@ -145,9 +146,7 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in return; change_bit(code, dev->led); - - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; @@ -159,25 +158,21 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in if (!!test_bit(code, dev->snd) != !!value) change_bit(code, dev->snd); - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; case EV_REP: - if (code > REP_MAX || value < 0 || dev->rep[code] == value) - return; + if (code > REP_MAX || value < 0 || dev->rep[code] == value) return; dev->rep[code] = value; - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; case EV_FF: - if (dev->event) - dev->event(dev, type, code, value); + if (dev->event) dev->event(dev, type, code, value); break; } @@ -191,24 +186,6 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in if (handle->open) handle->handler->event(handle, type, code, value); } -EXPORT_SYMBOL(input_event); - -/** - * input_inject_event() - send input event from input handler - * @handle: input handle to send event through - * @type: type of the event - * @code: event code - * @value: value of the event - * - * Similar to input_event() but will ignore event if device is "grabbed" and handle - * injecting event is not the one that owns the device. - */ -void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) -{ - if (!handle->dev->grab || handle->dev->grab == handle) - input_event(handle->dev, type, code, value); -} -EXPORT_SYMBOL(input_inject_event); static void input_repeat_key(unsigned long data) { @@ -224,6 +201,14 @@ static void input_repeat_key(unsigned long data) mod_timer(&dev->timer, jiffies + msecs_to_jiffies(dev->rep[REP_PERIOD])); } +int input_accept_process(struct input_handle *handle, struct file *file) +{ + if (handle->dev->accept) + return handle->dev->accept(handle->dev, file); + + return 0; +} + int input_grab_device(struct input_handle *handle) { if (handle->dev->grab) @@ -232,21 +217,12 @@ int input_grab_device(struct input_handle *handle) handle->dev->grab = handle; return 0; } -EXPORT_SYMBOL(input_grab_device); void input_release_device(struct input_handle *handle) { - struct input_dev *dev = handle->dev; - - if (dev->grab == handle) { - dev->grab = NULL; - - list_for_each_entry(handle, &dev->h_list, d_node) - if (handle->handler->start) - handle->handler->start(handle); - } + if (handle->dev->grab == handle) + handle->dev->grab = NULL; } -EXPORT_SYMBOL(input_release_device); int input_open_device(struct input_handle *handle) { @@ -269,7 +245,6 @@ int input_open_device(struct input_handle *handle) return err; } -EXPORT_SYMBOL(input_open_device); int input_flush_device(struct input_handle* handle, struct file* file) { @@ -278,7 +253,6 @@ int input_flush_device(struct input_handle* handle, struct file* file) return 0; } -EXPORT_SYMBOL(input_flush_device); void input_close_device(struct input_handle *handle) { @@ -294,7 +268,6 @@ void input_close_device(struct input_handle *handle) mutex_unlock(&dev->mutex); } -EXPORT_SYMBOL(input_close_device); static void input_link_handle(struct input_handle *handle) { @@ -362,11 +335,9 @@ static inline void input_wakeup_procfs_readers(void) static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) { int state = input_devices_state; - poll_wait(file, &input_devices_poll_wait, wait); if (state != input_devices_state) return POLLIN | POLLRDNORM; - return 0; } @@ -891,7 +862,6 @@ struct class input_class = { .release = input_dev_release, .uevent = input_dev_uevent, }; -EXPORT_SYMBOL_GPL(input_class); struct input_dev *input_allocate_device(void) { @@ -902,27 +872,12 @@ struct input_dev *input_allocate_device(void) dev->dynalloc = 1; dev->cdev.class = &input_class; class_device_initialize(&dev->cdev); - mutex_init(&dev->mutex); INIT_LIST_HEAD(&dev->h_list); INIT_LIST_HEAD(&dev->node); } return dev; } -EXPORT_SYMBOL(input_allocate_device); - -void input_free_device(struct input_dev *dev) -{ - if (dev) { - - mutex_lock(&dev->mutex); - dev->name = dev->phys = dev->uniq = NULL; - mutex_unlock(&dev->mutex); - - input_put_device(dev); - } -} -EXPORT_SYMBOL(input_free_device); int input_register_device(struct input_dev *dev) { @@ -940,6 +895,7 @@ int input_register_device(struct input_dev *dev) return -EINVAL; } + mutex_init(&dev->mutex); set_bit(EV_SYN, dev->evbit); /* @@ -988,11 +944,8 @@ int input_register_device(struct input_dev *dev) list_for_each_entry(handler, &input_handler_list, node) 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))) { + if ((handle = handler->connect(handler, dev, id))) input_link_handle(handle); - if (handler->start) - handler->start(handle); - } input_wakeup_procfs_readers(); @@ -1003,14 +956,12 @@ int input_register_device(struct input_dev *dev) fail1: class_device_del(&dev->cdev); return error; } -EXPORT_SYMBOL(input_register_device); void input_unregister_device(struct input_dev *dev) { - struct list_head *node, *next; + struct list_head * node, * next; - if (!dev) - return; + if (!dev) return; del_timer_sync(&dev->timer); @@ -1026,16 +977,10 @@ void input_unregister_device(struct input_dev *dev) sysfs_remove_group(&dev->cdev.kobj, &input_dev_caps_attr_group); sysfs_remove_group(&dev->cdev.kobj, &input_dev_id_attr_group); sysfs_remove_group(&dev->cdev.kobj, &input_dev_attr_group); - - mutex_lock(&dev->mutex); - dev->name = dev->phys = dev->uniq = NULL; - mutex_unlock(&dev->mutex); - class_device_unregister(&dev->cdev); input_wakeup_procfs_readers(); } -EXPORT_SYMBOL(input_unregister_device); void input_register_handler(struct input_handler *handler) { @@ -1043,8 +988,7 @@ void input_register_handler(struct input_handler *handler) struct input_handle *handle; struct input_device_id *id; - if (!handler) - return; + if (!handler) return; INIT_LIST_HEAD(&handler->h_list); @@ -1056,19 +1000,15 @@ void input_register_handler(struct input_handler *handler) list_for_each_entry(dev, &input_dev_list, node) 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))) { + if ((handle = handler->connect(handler, dev, id))) input_link_handle(handle); - if (handler->start) - handler->start(handle); - } input_wakeup_procfs_readers(); } -EXPORT_SYMBOL(input_register_handler); void input_unregister_handler(struct input_handler *handler) { - struct list_head *node, *next; + struct list_head * node, * next; list_for_each_safe(node, next, &handler->h_list) { struct input_handle * handle = to_handle_h(node); @@ -1084,7 +1024,6 @@ void input_unregister_handler(struct input_handler *handler) input_wakeup_procfs_readers(); } -EXPORT_SYMBOL(input_unregister_handler); static int input_open_file(struct inode *inode, struct file *file) { diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index d67157513..949bdcef8 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -81,7 +81,10 @@ static int joydev_correct(int value, struct js_corr *corr) return 0; } - return value < -32767 ? -32767 : (value > 32767 ? 32767 : value); + if (value < -32767) return -32767; + if (value > 32767) return 32767; + + return value; } static void joydev_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) @@ -93,8 +96,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne switch (type) { case EV_KEY: - if (code < BTN_MISC || value == 2) - return; + if (code < BTN_MISC || value == 2) return; event.type = JS_EVENT_BUTTON; event.number = joydev->keymap[code - BTN_MISC]; event.value = value; @@ -104,8 +106,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne event.type = JS_EVENT_AXIS; event.number = joydev->absmap[code]; event.value = joydev_correct(value, joydev->corr + event.number); - if (event.value == joydev->abs[event.number]) - return; + if (event.value == joydev->abs[event.number]) return; joydev->abs[event.number] = event.value; break; @@ -133,9 +134,7 @@ static int joydev_fasync(int fd, struct file *file, int on) { int retval; struct joydev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); - return retval < 0 ? retval : 0; } @@ -223,12 +222,12 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo return sizeof(struct JS_DATA_TYPE); } - if (list->startup == joydev->nabs + joydev->nkey && - list->head == list->tail && (file->f_flags & O_NONBLOCK)) - return -EAGAIN; + if (list->startup == joydev->nabs + joydev->nkey + && list->head == list->tail && (file->f_flags & O_NONBLOCK)) + return -EAGAIN; retval = wait_event_interruptible(list->joydev->wait, - !list->joydev->exist || + !list->joydev->exist || list->startup < joydev->nabs + joydev->nkey || list->head != list->tail); @@ -277,9 +276,8 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo static unsigned int joydev_poll(struct file *file, poll_table *wait) { struct joydev_list *list = file->private_data; - poll_wait(file, &list->joydev->wait, wait); - return ((list->head != list->tail || list->startup < list->joydev->nabs + list->joydev->nkey) ? + return ((list->head != list->tail || list->startup < list->joydev->nabs + list->joydev->nkey) ? (POLLIN | POLLRDNORM) : 0) | (list->joydev->exist ? 0 : (POLLHUP | POLLERR)); } @@ -293,26 +291,20 @@ static int joydev_ioctl_common(struct joydev *joydev, unsigned int cmd, void __u case JS_SET_CAL: return copy_from_user(&joydev->glue.JS_CORR, argp, sizeof(joydev->glue.JS_CORR)) ? -EFAULT : 0; - case JS_GET_CAL: return copy_to_user(argp, &joydev->glue.JS_CORR, sizeof(joydev->glue.JS_CORR)) ? -EFAULT : 0; - case JS_SET_TIMEOUT: return get_user(joydev->glue.JS_TIMEOUT, (s32 __user *) argp); - case JS_GET_TIMEOUT: return put_user(joydev->glue.JS_TIMEOUT, (s32 __user *) argp); case JSIOCGVERSION: return put_user(JS_VERSION, (__u32 __user *) argp); - case JSIOCGAXES: return put_user(joydev->nabs, (__u8 __user *) argp); - case JSIOCGBUTTONS: return put_user(joydev->nkey, (__u8 __user *) argp); - case JSIOCSCORR: if (copy_from_user(joydev->corr, argp, sizeof(joydev->corr[0]) * joydev->nabs)) @@ -322,49 +314,38 @@ static int joydev_ioctl_common(struct joydev *joydev, unsigned int cmd, void __u joydev->abs[i] = joydev_correct(dev->abs[j], joydev->corr + i); } return 0; - case JSIOCGCORR: return copy_to_user(argp, joydev->corr, sizeof(joydev->corr[0]) * joydev->nabs) ? -EFAULT : 0; - case JSIOCSAXMAP: if (copy_from_user(joydev->abspam, argp, sizeof(__u8) * (ABS_MAX + 1))) return -EFAULT; for (i = 0; i < joydev->nabs; i++) { - if (joydev->abspam[i] > ABS_MAX) - return -EINVAL; + if (joydev->abspam[i] > ABS_MAX) return -EINVAL; joydev->absmap[joydev->abspam[i]] = i; } return 0; - case JSIOCGAXMAP: return copy_to_user(argp, joydev->abspam, sizeof(__u8) * (ABS_MAX + 1)) ? -EFAULT : 0; - case JSIOCSBTNMAP: if (copy_from_user(joydev->keypam, argp, sizeof(__u16) * (KEY_MAX - BTN_MISC + 1))) return -EFAULT; for (i = 0; i < joydev->nkey; i++) { - if (joydev->keypam[i] > KEY_MAX || joydev->keypam[i] < BTN_MISC) - return -EINVAL; + if (joydev->keypam[i] > KEY_MAX || joydev->keypam[i] < BTN_MISC) return -EINVAL; joydev->keymap[joydev->keypam[i] - BTN_MISC] = i; } return 0; - case JSIOCGBTNMAP: return copy_to_user(argp, joydev->keypam, sizeof(__u16) * (KEY_MAX - BTN_MISC + 1)) ? -EFAULT : 0; - default: if ((cmd & ~(_IOC_SIZEMASK << _IOC_SIZESHIFT)) == JSIOCGNAME(0)) { int len; - if (!dev->name) - return 0; + if (!dev->name) return 0; len = strlen(dev->name) + 1; - if (len > _IOC_SIZE(cmd)) - len = _IOC_SIZE(cmd); - if (copy_to_user(argp, dev->name, len)) - return -EFAULT; + if (len > _IOC_SIZE(cmd)) len = _IOC_SIZE(cmd); + if (copy_to_user(argp, dev->name, len)) return -EFAULT; return len; } } @@ -381,9 +362,7 @@ static long joydev_compat_ioctl(struct file *file, unsigned int cmd, unsigned lo struct JS_DATA_SAVE_TYPE_32 ds32; int err; - if (!joydev->exist) - return -ENODEV; - + if (!joydev->exist) return -ENODEV; switch(cmd) { case JS_SET_TIMELIMIT: err = get_user(tmp32, (s32 __user *) arg); @@ -416,7 +395,8 @@ static long joydev_compat_ioctl(struct file *file, unsigned int cmd, unsigned lo ds32.JS_SAVE = joydev->glue.JS_SAVE; ds32.JS_CORR = joydev->glue.JS_CORR; - err = copy_to_user(argp, &ds32, sizeof(ds32)) ? -EFAULT : 0; + err = copy_to_user(argp, &ds32, + sizeof(ds32)) ? -EFAULT : 0; break; default: @@ -432,8 +412,7 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd struct joydev *joydev = list->joydev; void __user *argp = (void __user *)arg; - if (!joydev->exist) - return -ENODEV; + if (!joydev->exist) return -ENODEV; switch(cmd) { case JS_SET_TIMELIMIT: @@ -567,8 +546,8 @@ 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 */ + }, /* Avoid itouchpads, touchscreens and tablets */ + { }, /* Terminating entry */ }; static struct input_device_id joydev_ids[] = { @@ -587,7 +566,7 @@ static struct input_device_id joydev_ids[] = { .evbit = { BIT(EV_ABS) }, .absbit = { BIT(ABS_THROTTLE) }, }, - { } /* Terminating entry */ + { }, /* Terminating entry */ }; MODULE_DEVICE_TABLE(input, joydev_ids); @@ -600,7 +579,7 @@ static struct input_handler joydev_handler = { .minor = JOYDEV_MINOR_BASE, .name = "joydev", .id_table = joydev_ids, - .blacklist = joydev_blacklist, + .blacklist = joydev_blacklist, }; static int __init joydev_init(void) diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index b11a4bbc8..4612d13ea 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c @@ -306,7 +306,7 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv) gameport_set_poll_handler(gameport, a3d_poll); gameport_set_poll_interval(gameport, 20); - snprintf(a3d->phys, sizeof(a3d->phys), "%s/input0", gameport->phys); + sprintf(a3d->phys, "%s/input0", gameport->phys); input_dev->name = a3d_names[a3d->mode]; input_dev->phys = a3d->phys; diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index e9a02db36..3121961e3 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -28,6 +28,7 @@ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic */ +#include #include #include #include @@ -407,23 +408,21 @@ static void analog_calibrate_timer(struct analog_port *port) static void analog_name(struct analog *analog) { - snprintf(analog->name, sizeof(analog->name), "Analog %d-axis %d-button", - hweight8(analog->mask & ANALOG_AXES_STD), - hweight8(analog->mask & ANALOG_BTNS_STD) + !!(analog->mask & ANALOG_BTNS_CHF) * 2 + - hweight16(analog->mask & ANALOG_BTNS_GAMEPAD) + !!(analog->mask & ANALOG_HBTN_CHF) * 4); + sprintf(analog->name, "Analog %d-axis %d-button", + hweight8(analog->mask & ANALOG_AXES_STD), + hweight8(analog->mask & ANALOG_BTNS_STD) + !!(analog->mask & ANALOG_BTNS_CHF) * 2 + + hweight16(analog->mask & ANALOG_BTNS_GAMEPAD) + !!(analog->mask & ANALOG_HBTN_CHF) * 4); if (analog->mask & ANALOG_HATS_ALL) - snprintf(analog->name, sizeof(analog->name), "%s %d-hat", - analog->name, hweight16(analog->mask & ANALOG_HATS_ALL)); + sprintf(analog->name, "%s %d-hat", + analog->name, hweight16(analog->mask & ANALOG_HATS_ALL)); if (analog->mask & ANALOG_HAT_FCS) - strlcat(analog->name, " FCS", sizeof(analog->name)); + strcat(analog->name, " FCS"); if (analog->mask & ANALOG_ANY_CHF) - strlcat(analog->name, (analog->mask & ANALOG_SAITEK) ? " Saitek" : " CHF", - sizeof(analog->name)); + strcat(analog->name, (analog->mask & ANALOG_SAITEK) ? " Saitek" : " CHF"); - strlcat(analog->name, (analog->mask & ANALOG_GAMEPAD) ? " gamepad": " joystick", - sizeof(analog->name)); + strcat(analog->name, (analog->mask & ANALOG_GAMEPAD) ? " gamepad": " joystick"); } /* @@ -436,8 +435,7 @@ static int analog_init_device(struct analog_port *port, struct analog *analog, i int i, j, t, v, w, x, y, z; analog_name(analog); - snprintf(analog->phys, sizeof(analog->phys), - "%s/input%d", port->gameport->phys, index); + sprintf(analog->phys, "%s/input%d", port->gameport->phys, index); analog->buttons = (analog->mask & ANALOG_GAMEPAD) ? analog_pad_btn : analog_joy_btn; analog->dev = input_dev = input_allocate_device(); diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c index d5e42eb88..1909f7ef3 100644 --- a/drivers/input/joystick/cobra.c +++ b/drivers/input/joystick/cobra.c @@ -202,8 +202,7 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv) goto fail3; } - snprintf(cobra->phys[i], sizeof(cobra->phys[i]), - "%s/input%d", gameport->phys, i); + sprintf(cobra->phys[i], "%s/input%d", gameport->phys, i); input_dev->name = "Creative Labs Blaster GamePad Cobra"; input_dev->phys = cobra->phys[i]; diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 5080e15c6..e61894685 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c @@ -584,7 +584,7 @@ static struct db9 __init *db9_probe(int parport, int mode) goto err_out; } - if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) { + if (db9_mode[mode].bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) { printk(KERN_ERR "db9.c: specified parport is not bidirectional\n"); err = -EINVAL; goto err_put_pp; @@ -620,8 +620,7 @@ static struct db9 __init *db9_probe(int parport, int mode) goto err_unreg_devs; } - snprintf(db9->phys[i], sizeof(db9->phys[i]), - "%s/input%d", db9->pd->port->name, i); + sprintf(db9->phys[i], "%s/input%d", db9->pd->port->name, i); input_dev->name = db9_mode->name; input_dev->phys = db9->phys[i]; diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index fe12aa373..ecbdb6b9b 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -761,8 +761,7 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads) if (!pads[i]) continue; - snprintf(gc->phys[i], sizeof(gc->phys[i]), - "%s/input%d", gc->pd->port->name, i); + sprintf(gc->phys[i], "%s/input%d", gc->pd->port->name, i); err = gc_setup_pad(gc, i, pads[i]); if (err) goto err_unreg_devs; diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c index e4a699f6e..8a3ad455e 100644 --- a/drivers/input/joystick/gf2k.c +++ b/drivers/input/joystick/gf2k.c @@ -298,7 +298,7 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv) gameport_set_poll_handler(gameport, gf2k_poll); gameport_set_poll_interval(gameport, 20); - snprintf(gf2k->phys, sizeof(gf2k->phys), "%s/input0", gameport->phys); + sprintf(gf2k->phys, "%s/input0", gameport->phys); gf2k->length = gf2k_lens[gf2k->id]; diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c index 17a90c436..20cb98ac2 100644 --- a/drivers/input/joystick/grip.c +++ b/drivers/input/joystick/grip.c @@ -354,8 +354,7 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv) goto fail3; } - snprintf(grip->phys[i], sizeof(grip->phys[i]), - "%s/input%d", gameport->phys, i); + sprintf(grip->phys[i], "%s/input%d", gameport->phys, i); input_dev->name = grip_name[grip->mode[i]]; input_dev->phys = grip->phys[i]; diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c index 840ed9b51..6e2c721c2 100644 --- a/drivers/input/joystick/guillemot.c +++ b/drivers/input/joystick/guillemot.c @@ -222,7 +222,7 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver * gameport_set_poll_handler(gameport, guillemot_poll); gameport_set_poll_interval(gameport, 20); - snprintf(guillemot->phys, sizeof(guillemot->phys), "%s/input0", gameport->phys); + sprintf(guillemot->phys, "%s/input0", gameport->phys); guillemot->type = guillemot_type + i; input_dev->name = guillemot_type[i].name; diff --git a/drivers/input/joystick/iforce/iforce-ff.c b/drivers/input/joystick/iforce/iforce-ff.c index 50c90765a..2b8e8456c 100644 --- a/drivers/input/joystick/iforce/iforce-ff.c +++ b/drivers/input/joystick/iforce/iforce-ff.c @@ -47,7 +47,7 @@ static int make_magnitude_modifier(struct iforce* iforce, iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOSPC; + return -ENOMEM; } mutex_unlock(&iforce->mem_mutex); } @@ -80,7 +80,7 @@ static int make_period_modifier(struct iforce* iforce, iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOSPC; + return -ENOMEM; } mutex_unlock(&iforce->mem_mutex); } @@ -120,7 +120,7 @@ static int make_envelope_modifier(struct iforce* iforce, iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOSPC; + return -ENOMEM; } mutex_unlock(&iforce->mem_mutex); } @@ -157,7 +157,7 @@ static int make_condition_modifier(struct iforce* iforce, iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOSPC; + return -ENOMEM; } mutex_unlock(&iforce->mem_mutex); } diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index b4914e723..ab0a26b92 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -79,7 +79,6 @@ static struct iforce_device iforce_device[] = { { 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //? { 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //? { 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //? - { 0x06d6, 0x29bc, "Trust Force Feedback Race Master", btn_wheel, abs_wheel, ff_iforce }, { 0x0000, 0x0000, "Unknown I-Force Device [%04x:%04x]", btn_joystick, abs_joystick, ff_iforce } }; @@ -87,7 +86,7 @@ static struct iforce_device iforce_device[] = { static int iforce_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct iforce* iforce = dev->private; + struct iforce* iforce = (struct iforce*)(dev->private); unsigned char data[3]; if (type != EV_FF) @@ -139,7 +138,7 @@ static int iforce_input_event(struct input_dev *dev, unsigned int type, unsigned */ static int iforce_upload_effect(struct input_dev *dev, struct ff_effect *effect) { - struct iforce* iforce = dev->private; + struct iforce* iforce = (struct iforce*)(dev->private); int id; int ret; int is_update; @@ -219,26 +218,26 @@ static int iforce_upload_effect(struct input_dev *dev, struct ff_effect *effect) */ static int iforce_erase_effect(struct input_dev *dev, int effect_id) { - struct iforce* iforce = dev->private; + struct iforce* iforce = (struct iforce*)(dev->private); int err = 0; struct iforce_core_effect* core_effect; - if (effect_id < 0 || effect_id >= FF_EFFECTS_MAX) - return -EINVAL; - - core_effect = &iforce->core_effects[effect_id]; - /* Check who is trying to erase this effect */ - if (core_effect->owner != current->pid) { - printk(KERN_WARNING "iforce-main.c: %d tried to erase an effect belonging to %d\n", current->pid, core_effect->owner); + if (iforce->core_effects[effect_id].owner != current->pid) { + printk(KERN_WARNING "iforce-main.c: %d tried to erase an effect belonging to %d\n", current->pid, iforce->core_effects[effect_id].owner); return -EACCES; } + if (effect_id < 0 || effect_id >= FF_EFFECTS_MAX) + return -EINVAL; + + core_effect = iforce->core_effects + effect_id; + if (test_bit(FF_MOD1_IS_USED, core_effect->flags)) - err = release_resource(&core_effect->mod1_chunk); + err = release_resource(&(iforce->core_effects[effect_id].mod1_chunk)); if (!err && test_bit(FF_MOD2_IS_USED, core_effect->flags)) - err = release_resource(&core_effect->mod2_chunk); + err = release_resource(&(iforce->core_effects[effect_id].mod2_chunk)); /*TODO: remember to change that if more FF_MOD* bits are added */ core_effect->flags[0] = 0; diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index e9924d6f0..668f24535 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c index bbfeb9c59..c4ed01758 100644 --- a/drivers/input/joystick/interact.c +++ b/drivers/input/joystick/interact.c @@ -251,7 +251,7 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d gameport_set_poll_handler(gameport, interact_poll); gameport_set_poll_interval(gameport, 20); - snprintf(interact->phys, sizeof(interact->phys), "%s/input0", gameport->phys); + sprintf(interact->phys, "%s/input0", gameport->phys); interact->type = i; interact->length = interact_type[i].length; diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index 168b1061a..ca3cc2319 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -162,7 +162,7 @@ static int magellan_connect(struct serio *serio, struct serio_driver *drv) goto fail; magellan->dev = input_dev; - snprintf(magellan->phys, sizeof(magellan->phys), "%s/input0", serio->phys); + sprintf(magellan->phys, "%s/input0", serio->phys); input_dev->name = "LogiCad3D Magellan / SpaceMouse"; input_dev->phys = magellan->phys; diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index e58b22c01..95c0de796 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c @@ -541,7 +541,7 @@ static void sw_print_packet(char *name, int length, unsigned char *buf, char bit * Unfortunately I don't know how to do this for the other SW types. */ -static void sw_3dp_id(unsigned char *buf, char *comment, size_t size) +static void sw_3dp_id(unsigned char *buf, char *comment) { int i; char pnp[8], rev[9]; @@ -554,7 +554,7 @@ static void sw_3dp_id(unsigned char *buf, char *comment, size_t size) pnp[7] = rev[8] = 0; - snprintf(comment, size, " [PnP %d.%02d id %s rev %s]", + sprintf(comment, " [PnP %d.%02d id %s rev %s]", (int) ((sw_get_bits(buf, 8, 6, 1) << 6) | /* Two 6-bit values */ sw_get_bits(buf, 16, 6, 1)) / 100, (int) ((sw_get_bits(buf, 8, 6, 1) << 6) | @@ -695,7 +695,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) sw->type = SW_ID_FFP; sprintf(comment, " [AC %s]", sw_get_bits(idbuf,38,1,3) ? "off" : "on"); } else - sw->type = SW_ID_PP; + sw->type = SW_ID_PP; break; case 66: sw->bits = 3; @@ -703,8 +703,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) sw->length = 22; case 64: sw->type = SW_ID_3DP; - if (j == 160) - sw_3dp_id(idbuf, comment, sizeof(comment)); + if (j == 160) sw_3dp_id(idbuf, comment); break; } } @@ -734,10 +733,8 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) for (i = 0; i < sw->number; i++) { int bits, code; - snprintf(sw->name, sizeof(sw->name), - "Microsoft SideWinder %s", sw_name[sw->type]); - snprintf(sw->phys[i], sizeof(sw->phys[i]), - "%s/input%d", gameport->phys, i); + sprintf(sw->name, "Microsoft SideWinder %s", sw_name[sw->type]); + sprintf(sw->phys[i], "%s/input%d", gameport->phys, i); sw->dev[i] = input_dev = input_allocate_device(); if (!input_dev) { diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index 7a19ee052..d6f8db8ec 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -50,7 +50,7 @@ MODULE_LICENSE("GPL"); */ #define SPACEBALL_MAX_LENGTH 128 -#define SPACEBALL_MAX_ID 9 +#define SPACEBALL_MAX_ID 8 #define SPACEBALL_1003 1 #define SPACEBALL_2003B 3 @@ -220,7 +220,7 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv) goto fail; spaceball->dev = input_dev; - snprintf(spaceball->phys, sizeof(spaceball->phys), "%s/input0", serio->phys); + sprintf(spaceball->phys, "%s/input0", serio->phys); input_dev->name = spaceball_names[id]; input_dev->phys = spaceball->phys; diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index 3e2782e79..7c123a01c 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -177,7 +177,7 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv) goto fail; spaceorb->dev = input_dev; - snprintf(spaceorb->phys, sizeof(spaceorb->phys), "%s/input0", serio->phys); + sprintf(spaceorb->phys, "%s/input0", serio->phys); input_dev->name = "SpaceTec SpaceOrb 360 / Avenger"; input_dev->phys = spaceorb->phys; diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index 011ec4858..0a9ed1d30 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -148,7 +148,7 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv) goto fail; stinger->dev = input_dev; - snprintf(stinger->phys, sizeof(stinger->phys), "%s/serio0", serio->phys); + sprintf(stinger->phys, "%s/serio0", serio->phys); input_dev->name = "Gravis Stinger"; input_dev->phys = stinger->phys; diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 076f237d9..7f8b0093c 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -199,7 +199,7 @@ static int twidjoy_connect(struct serio *serio, struct serio_driver *drv) goto fail; twidjoy->dev = input_dev; - snprintf(twidjoy->phys, sizeof(twidjoy->phys), "%s/input0", serio->phys); + sprintf(twidjoy->phys, "%s/input0", serio->phys); input_dev->name = "Handykey Twiddler"; input_dev->phys = twidjoy->phys; diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index f9c1a0321..1849b176c 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -154,7 +154,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) goto fail; warrior->dev = input_dev; - snprintf(warrior->phys, sizeof(warrior->phys), "%s/input0", serio->phys); + sprintf(warrior->phys, "%s/input0", serio->phys); input_dev->name = "Logitech WingMan Warrior"; input_dev->phys = warrior->phys; diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index f1f9db9d2..4c8fb1f86 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -46,7 +45,7 @@ MODULE_AUTHOR("Vojtech Pavlik "); MODULE_DESCRIPTION("Amiga keyboard driver"); MODULE_LICENSE("GPL"); -static unsigned char amikbd_keycode[0x78] __initdata = { +static unsigned char amikbd_keycode[0x78] = { [0] = KEY_GRAVE, [1] = KEY_1, [2] = KEY_2, @@ -171,9 +170,12 @@ static irqreturn_t amikbd_interrupt(int irq, void *dummy, struct pt_regs *fp) scancode >>= 1; if (scancode < 0x78) { /* scancodes < 0x78 are keys */ + + scancode = amikbd_keycode[scancode]; + input_regs(amikbd_dev, fp); - if (scancode == 98) { /* CapsLock is a toggle switch key on Amiga */ + if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */ input_report_key(amikbd_dev, scancode, 1); input_report_key(amikbd_dev, scancode, 0); } else { @@ -189,7 +191,7 @@ static irqreturn_t amikbd_interrupt(int irq, void *dummy, struct pt_regs *fp) static int __init amikbd_init(void) { - int i, j; + int i; if (!AMIGAHW_PRESENT(AMI_KEYBOARD)) return -EIO; @@ -212,26 +214,14 @@ static int __init amikbd_init(void) amikbd_dev->id.version = 0x0100; amikbd_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); + amikbd_dev->keycode = amikbd_keycode; + amikbd_dev->keycodesize = sizeof(unsigned char); + amikbd_dev->keycodemax = ARRAY_SIZE(amikbd_keycode); for (i = 0; i < 0x78; i++) - set_bit(i, amikbd_dev->keybit); - - for (i = 0; i < MAX_NR_KEYMAPS; i++) { - static u_short temp_map[NR_KEYS] __initdata; - if (!key_maps[i]) - continue; - memset(temp_map, 0, sizeof(temp_map)); - for (j = 0; j < 0x78; j++) { - if (!amikbd_keycode[j]) - continue; - temp_map[j] = key_maps[i][amikbd_keycode[j]]; - } - for (j = 0; j < NR_KEYS; j++) { - if (!temp_map[j]) - temp_map[j] = 0xf200; - } - memcpy(key_maps[i], temp_map, sizeof(temp_map)); - } + if (amikbd_keycode[i]) + set_bit(amikbd_keycode[i], amikbd_dev->keybit); + ciaa.cra &= ~0x41; /* serial data in, turn off TA */ request_irq(IRQ_AMIGA_CIAA_SP, amikbd_interrupt, 0, "amikbd", amikbd_interrupt); diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index dd9958876..5550b6d01 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -55,7 +55,7 @@ static int atkbd_softraw = 1; module_param_named(softraw, atkbd_softraw, bool, 0); MODULE_PARM_DESC(softraw, "Use software generated rawmode"); -static int atkbd_scroll; +static int atkbd_scroll = 0; module_param_named(scroll, atkbd_scroll, bool, 0); MODULE_PARM_DESC(scroll, "Enable scroll-wheel on MS Office and similar keyboards"); @@ -150,8 +150,8 @@ static unsigned char atkbd_unxlate_table[128] = { #define ATKBD_RET_EMUL0 0xe0 #define ATKBD_RET_EMUL1 0xe1 #define ATKBD_RET_RELEASE 0xf0 -#define ATKBD_RET_HANJA 0xf1 -#define ATKBD_RET_HANGEUL 0xf2 +#define ATKBD_RET_HANGUEL 0xf1 +#define ATKBD_RET_HANJA 0xf2 #define ATKBD_RET_ERR 0xff #define ATKBD_KEY_UNKNOWN 0 @@ -170,13 +170,6 @@ static unsigned char atkbd_unxlate_table[128] = { #define ATKBD_LED_EVENT_BIT 0 #define ATKBD_REP_EVENT_BIT 1 -#define ATKBD_XL_ERR 0x01 -#define ATKBD_XL_BAT 0x02 -#define ATKBD_XL_ACK 0x04 -#define ATKBD_XL_NAK 0x08 -#define ATKBD_XL_HANGEUL 0x10 -#define ATKBD_XL_HANJA 0x20 - static struct { unsigned char keycode; unsigned char set2; @@ -218,7 +211,8 @@ struct atkbd { unsigned char emul; unsigned char resend; unsigned char release; - unsigned long xl_bit; + unsigned char bat_xl; + unsigned char err_xl; unsigned int last; unsigned long time; @@ -251,65 +245,17 @@ ATKBD_DEFINE_ATTR(set); ATKBD_DEFINE_ATTR(softrepeat); ATKBD_DEFINE_ATTR(softraw); -static const unsigned int xl_table[] = { - ATKBD_RET_BAT, ATKBD_RET_ERR, ATKBD_RET_ACK, - ATKBD_RET_NAK, ATKBD_RET_HANJA, ATKBD_RET_HANGEUL, -}; - -/* - * Checks if we should mangle the scancode to extract 'release' bit - * in translated mode. - */ -static int atkbd_need_xlate(unsigned long xl_bit, unsigned char code) -{ - int i; - - if (code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1) - return 0; - - for (i = 0; i < ARRAY_SIZE(xl_table); i++) - if (code == xl_table[i]) - return test_bit(i, &xl_bit); - - return 1; -} -/* - * Calculates new value of xl_bit so the driver can distinguish - * between make/break pair of scancodes for select keys and PS/2 - * protocol responses. - */ -static void atkbd_calculate_xl_bit(struct atkbd *atkbd, unsigned char code) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(xl_table); i++) { - if (!((code ^ xl_table[i]) & 0x7f)) { - if (code & 0x80) - __clear_bit(i, &atkbd->xl_bit); - else - __set_bit(i, &atkbd->xl_bit); - break; - } - } -} - -/* - * Encode the scancode, 0xe0 prefix, and high bit into a single integer, - * keeping kernel 2.4 compatibility for set 2 - */ -static unsigned int atkbd_compat_scancode(struct atkbd *atkbd, unsigned int code) +static void atkbd_report_key(struct input_dev *dev, struct pt_regs *regs, int code, int value) { - if (atkbd->set == 3) { - if (atkbd->emul == 1) - code |= 0x100; - } else { - code = (code & 0x7f) | ((code & 0x80) << 1); - if (atkbd->emul == 1) - code |= 0x80; - } - - return code; + input_regs(dev, regs); + if (value == 3) { + input_report_key(dev, code, 1); + input_sync(dev); + input_report_key(dev, code, 0); + } else + input_event(dev, EV_KEY, code, value); + input_sync(dev); } /* @@ -321,11 +267,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs) { struct atkbd *atkbd = serio_get_drvdata(serio); - struct input_dev *dev = atkbd->dev; unsigned int code = data; - int scroll = 0, hscroll = 0, click = -1, add_release_event = 0; + int scroll = 0, hscroll = 0, click = -1; int value; - unsigned char keycode; #ifdef ATKBD_DEBUG printk(KERN_DEBUG "atkbd.c: Received %02x flags %02x\n", data, flags); @@ -354,17 +298,25 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, if (!atkbd->enabled) goto out; - input_event(dev, EV_MSC, MSC_RAW, code); + input_event(atkbd->dev, EV_MSC, MSC_RAW, code); if (atkbd->translated) { - if (atkbd->emul || atkbd_need_xlate(atkbd->xl_bit, code)) { + if (atkbd->emul || + (code != ATKBD_RET_EMUL0 && code != ATKBD_RET_EMUL1 && + code != ATKBD_RET_HANGUEL && code != ATKBD_RET_HANJA && + (code != ATKBD_RET_ERR || atkbd->err_xl) && + (code != ATKBD_RET_BAT || atkbd->bat_xl))) { atkbd->release = code >> 7; code &= 0x7f; } - if (!atkbd->emul) - atkbd_calculate_xl_bit(atkbd, data); + if (!atkbd->emul) { + if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) + atkbd->bat_xl = !(data >> 7); + if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f)) + atkbd->err_xl = !(data >> 7); + } } switch (code) { @@ -381,52 +333,51 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, case ATKBD_RET_RELEASE: atkbd->release = 1; goto out; - case ATKBD_RET_ACK: - case ATKBD_RET_NAK: -#if 0 - /* Quite a few key switchers and other tools trigger this and it confuses - people who can do nothing about it */ - printk(KERN_WARNING "atkbd.c: Spurious %s on %s. " - "Some program might be trying access hardware directly.\n", - data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys); -#endif + case ATKBD_RET_HANGUEL: + atkbd_report_key(atkbd->dev, regs, KEY_HANGUEL, 3); goto out; - case ATKBD_RET_HANGEUL: case ATKBD_RET_HANJA: - /* - * These keys do not report release and thus need to be - * flagged properly - */ - add_release_event = 1; - break; + atkbd_report_key(atkbd->dev, regs, KEY_HANJA, 3); + goto out; case ATKBD_RET_ERR: // printk(KERN_DEBUG "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys); goto out; } - code = atkbd_compat_scancode(atkbd, code); - - if (atkbd->emul && --atkbd->emul) - goto out; - - keycode = atkbd->keycode[code]; + if (atkbd->set != 3) + code = (code & 0x7f) | ((code & 0x80) << 1); + if (atkbd->emul) { + if (--atkbd->emul) + goto out; + code |= (atkbd->set != 3) ? 0x80 : 0x100; + } - if (keycode != ATKBD_KEY_NULL) - input_event(dev, EV_MSC, MSC_SCAN, code); + if (atkbd->keycode[code] != ATKBD_KEY_NULL) + input_event(atkbd->dev, EV_MSC, MSC_SCAN, code); - switch (keycode) { + 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 on %s).\n", - atkbd->release ? "released" : "pressed", - atkbd->translated ? "translated" : "raw", - atkbd->set, code, serio->phys); - printk(KERN_WARNING - "atkbd.c: Use 'setkeycodes %s%02x ' to make it known.\n", - code & 0x80 ? "e0" : "", code & 0x7f); - input_sync(dev); + if (data == ATKBD_RET_ACK || data == ATKBD_RET_NAK) { +#if 0 +/* Quite a few key switchers and other tools trigger this and it confuses + people who can do nothing about it */ + printk(KERN_WARNING "atkbd.c: Spurious %s on %s. Some program, " + "like XFree86, might be trying access hardware directly.\n", + data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys); +#endif + } else { + 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, serio->phys); + printk(KERN_WARNING "atkbd.c: Use 'setkeycodes %s%02x ' " + "to make it known.\n", + code & 0x80 ? "e0" : "", code & 0x7f); + } + input_sync(atkbd->dev); break; case ATKBD_SCR_1: scroll = 1 - atkbd->release * 2; @@ -450,35 +401,33 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, hscroll = 1; break; default: - if (atkbd->release) { - value = 0; - atkbd->last = 0; - } else if (!atkbd->softrepeat && test_bit(keycode, dev->key)) { - /* Workaround Toshiba laptop multiple keypress */ - value = time_before(jiffies, atkbd->time) && atkbd->last == code ? 1 : 2; - } else { - value = 1; - atkbd->last = code; - atkbd->time = jiffies + msecs_to_jiffies(dev->rep[REP_DELAY]) / 2; + value = atkbd->release ? 0 : + (1 + (!atkbd->softrepeat && test_bit(atkbd->keycode[code], atkbd->dev->key))); + + switch (value) { /* Workaround Toshiba laptop multiple keypress */ + case 0: + atkbd->last = 0; + break; + case 1: + atkbd->last = code; + atkbd->time = jiffies + msecs_to_jiffies(atkbd->dev->rep[REP_DELAY]) / 2; + break; + case 2: + if (!time_after(jiffies, atkbd->time) && atkbd->last == code) + value = 1; + break; } - input_regs(dev, regs); - input_event(dev, EV_KEY, keycode, value); - input_sync(dev); - - if (value && add_release_event) { - input_report_key(dev, keycode, 0); - input_sync(dev); - } + atkbd_report_key(atkbd->dev, regs, atkbd->keycode[code], value); } if (atkbd->scroll) { - input_regs(dev, regs); + input_regs(atkbd->dev, regs); if (click != -1) - input_report_key(dev, BTN_MIDDLE, click); - input_report_rel(dev, REL_WHEEL, scroll); - input_report_rel(dev, REL_HWHEEL, hscroll); - input_sync(dev); + input_report_key(atkbd->dev, BTN_MIDDLE, click); + input_report_rel(atkbd->dev, REL_WHEEL, scroll); + input_report_rel(atkbd->dev, REL_HWHEEL, hscroll); + input_sync(atkbd->dev); } atkbd->release = 0; @@ -486,55 +435,6 @@ out: return IRQ_HANDLED; } -static int atkbd_set_repeat_rate(struct atkbd *atkbd) -{ - 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 }; - - struct input_dev *dev = atkbd->dev; - unsigned char param; - int i = 0, j = 0; - - while (i < ARRAY_SIZE(period) - 1 && period[i] < dev->rep[REP_PERIOD]) - i++; - dev->rep[REP_PERIOD] = period[i]; - - while (j < ARRAY_SIZE(delay) - 1 && delay[j] < dev->rep[REP_DELAY]) - j++; - dev->rep[REP_DELAY] = delay[j]; - - param = i | (j << 5); - return ps2_command(&atkbd->ps2dev, ¶m, ATKBD_CMD_SETREP); -} - -static int atkbd_set_leds(struct atkbd *atkbd) -{ - struct input_dev *dev = atkbd->dev; - unsigned char param[2]; - - param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0) - | (test_bit(LED_NUML, dev->led) ? 2 : 0) - | (test_bit(LED_CAPSL, dev->led) ? 4 : 0); - if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS)) - return -1; - - if (atkbd->extra) { - param[0] = 0; - param[1] = (test_bit(LED_COMPOSE, dev->led) ? 0x01 : 0) - | (test_bit(LED_SLEEP, dev->led) ? 0x02 : 0) - | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0) - | (test_bit(LED_MISC, dev->led) ? 0x10 : 0) - | (test_bit(LED_MUTE, dev->led) ? 0x20 : 0); - if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_EX_SETLEDS)) - return -1; - } - - return 0; -} - /* * atkbd_event_work() is used to complete processing of events that * can not be processed by input_event() which is often called from @@ -543,15 +443,47 @@ static int atkbd_set_leds(struct atkbd *atkbd) static void atkbd_event_work(void *data) { + 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 }; + struct atkbd *atkbd = data; + struct input_dev *dev = atkbd->dev; + unsigned char param[2]; + int i, j; mutex_lock(&atkbd->event_mutex); - if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) - atkbd_set_leds(atkbd); + if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) { + param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0) + | (test_bit(LED_NUML, dev->led) ? 2 : 0) + | (test_bit(LED_CAPSL, dev->led) ? 4 : 0); + ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS); + + if (atkbd->extra) { + param[0] = 0; + param[1] = (test_bit(LED_COMPOSE, dev->led) ? 0x01 : 0) + | (test_bit(LED_SLEEP, dev->led) ? 0x02 : 0) + | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0) + | (test_bit(LED_MISC, dev->led) ? 0x10 : 0) + | (test_bit(LED_MUTE, dev->led) ? 0x20 : 0); + ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_EX_SETLEDS); + } + } - if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) - atkbd_set_repeat_rate(atkbd); + if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) { + i = j = 0; + while (i < 31 && period[i] < dev->rep[REP_PERIOD]) + i++; + while (j < 3 && delay[j] < dev->rep[REP_DELAY]) + j++; + dev->rep[REP_PERIOD] = period[i]; + dev->rep[REP_DELAY] = delay[j]; + param[0] = i | (j << 5); + ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP); + } mutex_unlock(&atkbd->event_mutex); } @@ -836,9 +768,6 @@ static void atkbd_set_keycode_table(struct atkbd *atkbd) for (i = 0; i < ARRAY_SIZE(atkbd_scroll_keys); i++) atkbd->keycode[atkbd_scroll_keys[i].set2] = atkbd_scroll_keys[i].keycode; } - - atkbd->keycode[atkbd_compat_scancode(atkbd, ATKBD_RET_HANGEUL)] = KEY_HANGUEL; - atkbd->keycode[atkbd_compat_scancode(atkbd, ATKBD_RET_HANJA)] = KEY_HANJA; } /* @@ -851,15 +780,12 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd) int i; if (atkbd->extra) - snprintf(atkbd->name, sizeof(atkbd->name), - "AT Set 2 Extra keyboard"); + sprintf(atkbd->name, "AT Set 2 Extra keyboard"); else - snprintf(atkbd->name, sizeof(atkbd->name), - "AT %s Set %d keyboard", - atkbd->translated ? "Translated" : "Raw", atkbd->set); + sprintf(atkbd->name, "AT %s Set %d keyboard", + atkbd->translated ? "Translated" : "Raw", atkbd->set); - snprintf(atkbd->phys, sizeof(atkbd->phys), - "%s/input0", atkbd->ps2dev.serio->phys); + sprintf(atkbd->phys, "%s/input0", atkbd->ps2dev.serio->phys); input_dev->name = atkbd->name; input_dev->phys = atkbd->phys; @@ -996,6 +922,7 @@ static int atkbd_reconnect(struct serio *serio) { struct atkbd *atkbd = serio_get_drvdata(serio); struct serio_driver *drv = serio->drv; + unsigned char param[1]; if (!atkbd || !drv) { printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n"); @@ -1005,6 +932,10 @@ static int atkbd_reconnect(struct serio *serio) atkbd_disable(atkbd); if (atkbd->write) { + param[0] = (test_bit(LED_SCROLLL, atkbd->dev->led) ? 1 : 0) + | (test_bit(LED_NUML, atkbd->dev->led) ? 2 : 0) + | (test_bit(LED_CAPSL, atkbd->dev->led) ? 4 : 0); + if (atkbd_probe(atkbd)) return -1; if (atkbd->set != atkbd_select_set(atkbd, atkbd->set, atkbd->extra)) @@ -1012,13 +943,8 @@ static int atkbd_reconnect(struct serio *serio) atkbd_activate(atkbd); -/* - * Restore repeat rate and LEDs (that were reset by atkbd_activate) - * to pre-resume state - */ - if (!atkbd->softrepeat) - atkbd_set_repeat_rate(atkbd); - atkbd_set_leds(atkbd); + if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS)) + return -1; } atkbd_enable(atkbd); diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 1e03153b9..1f0e72026 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c @@ -352,7 +352,7 @@ static int __init corgikbd_probe(struct platform_device *pdev) for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) { pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN); if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt, - IRQF_DISABLED | IRQF_TRIGGER_RISING, + SA_INTERRUPT | SA_TRIGGER_RISING, "corgikbd", corgikbd)) printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i); } diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c index d22c7c624..33edd030a 100644 --- a/drivers/input/keyboard/hilkbd.c +++ b/drivers/input/keyboard/hilkbd.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c index 5174224ca..77c4d9669 100644 --- a/drivers/input/keyboard/lkkbd.c +++ b/drivers/input/keyboard/lkkbd.c @@ -384,21 +384,18 @@ lkkbd_detection_done (struct lkkbd *lk) */ switch (lk->id[4]) { case 1: - strlcpy (lk->name, "DEC LK201 keyboard", - sizeof (lk->name)); + sprintf (lk->name, "DEC LK201 keyboard"); if (lk201_compose_is_alt) lk->keycode[0xb1] = KEY_LEFTALT; break; case 2: - strlcpy (lk->name, "DEC LK401 keyboard", - sizeof (lk->name)); + sprintf (lk->name, "DEC LK401 keyboard"); break; default: - strlcpy (lk->name, "Unknown DEC keyboard", - sizeof (lk->name)); + sprintf (lk->name, "Unknown DEC keyboard"); printk (KERN_ERR "lkkbd: keyboard on %s is unknown, " "please report to Jan-Benedict Glaw " "\n", lk->phys); diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index 83906f80b..2c5108818 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -25,6 +25,7 @@ * */ +#include #include #include #include diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c index 40a3f5512..d10983c52 100644 --- a/drivers/input/keyboard/newtonkbd.c +++ b/drivers/input/keyboard/newtonkbd.c @@ -96,7 +96,7 @@ static int nkbd_connect(struct serio *serio, struct serio_driver *drv) nkbd->serio = serio; nkbd->dev = input_dev; - snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys); + sprintf(nkbd->phys, "%s/input0", serio->phys); memcpy(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode)); input_dev->name = "Newton Keyboard"; diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index e38571023..c5d03fb77 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c @@ -410,7 +410,7 @@ static int __init spitzkbd_probe(struct platform_device *dev) for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) { pxa_gpio_mode(spitz_senses[i] | GPIO_IN); if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt, - IRQF_DISABLED|IRQF_TRIGGER_RISING, + SA_INTERRUPT|SA_TRIGGER_RISING, "Spitzkbd Sense", spitzkbd)) printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i); } @@ -425,19 +425,19 @@ static int __init spitzkbd_probe(struct platform_device *dev) pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN); request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "Spitzkbd Sync", spitzkbd); request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "Spitzkbd PwrOn", spitzkbd); request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "Spitzkbd SWA", spitzkbd); request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "Spitzkbd SWB", spitzkbd); request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr, - IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, "Spitzkbd HP", spitzkbd); printk(KERN_INFO "input: Spitz Keyboard Registered\n"); diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 9dbd7b856..b15b6d8d4 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/keyboard/sunkbd.c @@ -263,7 +263,7 @@ static int sunkbd_connect(struct serio *serio, struct serio_driver *drv) goto fail; } - snprintf(sunkbd->name, sizeof(sunkbd->name), "Sun Type %d keyboard", sunkbd->type); + sprintf(sunkbd->name, "Sun Type %d keyboard", sunkbd->type); memcpy(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode)); input_dev->name = sunkbd->name; diff --git a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c index 0821d53cf..4135e3e16 100644 --- a/drivers/input/keyboard/xtkbd.c +++ b/drivers/input/keyboard/xtkbd.c @@ -100,7 +100,7 @@ static int xtkbd_connect(struct serio *serio, struct serio_driver *drv) xtkbd->serio = serio; xtkbd->dev = input_dev; - snprintf(xtkbd->phys, sizeof(xtkbd->phys), "%s/input0", serio->phys); + sprintf(xtkbd->phys, "%s/input0", serio->phys); memcpy(xtkbd->keycode, xtkbd_keycode, sizeof(xtkbd->keycode)); input_dev->name = "XT Keyboard"; diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index a6dfc7455..4bad588d0 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -26,7 +26,7 @@ config INPUT_PCSPKR config INPUT_SPARCSPKR tristate "SPARC Speaker support" - depends on PCI && SPARC64 + depends on PCI && SPARC help Say Y here if you want the standard Speaker on Sparc PCI systems to be used for bells and whistles. diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index 805b636e7..3a6ae85cd 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c @@ -113,7 +113,7 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev) input_dev->event = ixp4xx_spkr_event; err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, - IRQF_DISABLED | IRQF_TIMER, "ixp4xx-beeper", (void *) dev->id); + SA_INTERRUPT | SA_TIMER, "ixp4xx-beeper", (void *) dev->id); if (err) goto err_free_device; diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 106c94f33..f0fd2c474 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c @@ -2,8 +2,9 @@ * Driver for PC-speaker like devices found on various Sparc systems. * * Copyright (c) 2002 Vojtech Pavlik - * Copyright (c) 2002, 2006 David S. Miller (davem@davemloft.net) + * Copyright (c) 2002 David S. Miller (davem@redhat.com) */ +#include #include #include #include @@ -12,23 +13,21 @@ #include #include +#ifdef CONFIG_SPARC64 #include +#endif -MODULE_AUTHOR("David S. Miller "); +MODULE_AUTHOR("David S. Miller "); MODULE_DESCRIPTION("Sparc Speaker beeper driver"); MODULE_LICENSE("GPL"); -struct sparcspkr_state { - const char *name; - unsigned long iobase; - int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); - spinlock_t lock; - struct input_dev *input_dev; -}; +const char *beep_name; +static unsigned long beep_iobase; +static int (*beep_event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); +static DEFINE_SPINLOCK(beep_lock); static int ebus_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct sparcspkr_state *state = dev_get_drvdata(dev->cdev.dev); unsigned int count = 0; unsigned long flags; @@ -44,24 +43,24 @@ static int ebus_spkr_event(struct input_dev *dev, unsigned int type, unsigned in if (value > 20 && value < 32767) count = 1193182 / value; - spin_lock_irqsave(&state->lock, flags); + spin_lock_irqsave(&beep_lock, flags); /* EBUS speaker only has on/off state, the frequency does not * appear to be programmable. */ - if (state->iobase & 0x2UL) - outb(!!count, state->iobase); + if (beep_iobase & 0x2UL) + outb(!!count, beep_iobase); else - outl(!!count, state->iobase); + outl(!!count, beep_iobase); - spin_unlock_irqrestore(&state->lock, flags); + spin_unlock_irqrestore(&beep_lock, flags); return 0; } +#ifdef CONFIG_SPARC64 static int isa_spkr_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct sparcspkr_state *state = dev_get_drvdata(dev->cdev.dev); unsigned int count = 0; unsigned long flags; @@ -77,29 +76,29 @@ static int isa_spkr_event(struct input_dev *dev, unsigned int type, unsigned int if (value > 20 && value < 32767) count = 1193182 / value; - spin_lock_irqsave(&state->lock, flags); + spin_lock_irqsave(&beep_lock, flags); if (count) { /* enable counter 2 */ - outb(inb(state->iobase + 0x61) | 3, state->iobase + 0x61); + outb(inb(beep_iobase + 0x61) | 3, beep_iobase + 0x61); /* set command for counter 2, 2 byte write */ - outb(0xB6, state->iobase + 0x43); + outb(0xB6, beep_iobase + 0x43); /* select desired HZ */ - outb(count & 0xff, state->iobase + 0x42); - outb((count >> 8) & 0xff, state->iobase + 0x42); + outb(count & 0xff, beep_iobase + 0x42); + outb((count >> 8) & 0xff, beep_iobase + 0x42); } else { /* disable counter 2 */ - outb(inb_p(state->iobase + 0x61) & 0xFC, state->iobase + 0x61); + outb(inb_p(beep_iobase + 0x61) & 0xFC, beep_iobase + 0x61); } - spin_unlock_irqrestore(&state->lock, flags); + spin_unlock_irqrestore(&beep_lock, flags); return 0; } +#endif -static int __devinit sparcspkr_probe(struct device *dev) +static int __devinit sparcspkr_probe(struct platform_device *dev) { - struct sparcspkr_state *state = dev_get_drvdata(dev); struct input_dev *input_dev; int error; @@ -107,18 +106,18 @@ static int __devinit sparcspkr_probe(struct device *dev) if (!input_dev) return -ENOMEM; - input_dev->name = state->name; + input_dev->name = beep_name; input_dev->phys = "sparc/input0"; input_dev->id.bustype = BUS_ISA; input_dev->id.vendor = 0x001f; input_dev->id.product = 0x0001; input_dev->id.version = 0x0100; - input_dev->cdev.dev = dev; + input_dev->cdev.dev = &dev->dev; input_dev->evbit[0] = BIT(EV_SND); input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); - input_dev->event = state->event; + input_dev->event = beep_event; error = input_register_device(input_dev); if (error) { @@ -126,137 +125,111 @@ static int __devinit sparcspkr_probe(struct device *dev) return error; } - state->input_dev = input_dev; + platform_set_drvdata(dev, input_dev); return 0; } -static int __devexit sparcspkr_remove(struct of_device *dev) +static int __devexit sparcspkr_remove(struct platform_device *dev) { - struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); - struct input_dev *input_dev = state->input_dev; - - /* turn off the speaker */ - state->event(input_dev, EV_SND, SND_BELL, 0); + struct input_dev *input_dev = platform_get_drvdata(dev); input_unregister_device(input_dev); - - dev_set_drvdata(&dev->dev, NULL); - kfree(state); - - return 0; -} - -static int sparcspkr_shutdown(struct of_device *dev) -{ - struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); - struct input_dev *input_dev = state->input_dev; - + platform_set_drvdata(dev, NULL); /* turn off the speaker */ - state->event(input_dev, EV_SND, SND_BELL, 0); + beep_event(NULL, EV_SND, SND_BELL, 0); return 0; } -static int __devinit ebus_beep_probe(struct of_device *dev, const struct of_device_id *match) +static void sparcspkr_shutdown(struct platform_device *dev) { - struct linux_ebus_device *edev = to_ebus_device(&dev->dev); - struct sparcspkr_state *state; - int err; - - state = kzalloc(sizeof(*state), GFP_KERNEL); - if (!state) - return -ENOMEM; - - state->name = "Sparc EBUS Speaker"; - state->iobase = edev->resource[0].start; - state->event = ebus_spkr_event; - spin_lock_init(&state->lock); - - dev_set_drvdata(&dev->dev, state); - - err = sparcspkr_probe(&dev->dev); - if (err) { - dev_set_drvdata(&dev->dev, NULL); - kfree(state); - } - - return 0; + /* turn off the speaker */ + beep_event(NULL, EV_SND, SND_BELL, 0); } -static struct of_device_id ebus_beep_match[] = { - { - .name = "beep", +static struct platform_driver sparcspkr_platform_driver = { + .driver = { + .name = "sparcspkr", + .owner = THIS_MODULE, }, - {}, -}; - -static struct of_platform_driver ebus_beep_driver = { - .name = "beep", - .match_table = ebus_beep_match, - .probe = ebus_beep_probe, - .remove = sparcspkr_remove, + .probe = sparcspkr_probe, + .remove = __devexit_p(sparcspkr_remove), .shutdown = sparcspkr_shutdown, }; -static int __devinit isa_beep_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct sparc_isa_device *idev = to_isa_device(&dev->dev); - struct sparcspkr_state *state; - int err; +static struct platform_device *sparcspkr_platform_device; - state = kzalloc(sizeof(*state), GFP_KERNEL); - if (!state) - return -ENOMEM; - - state->name = "Sparc ISA Speaker"; - state->iobase = idev->resource.start; - state->event = isa_spkr_event; - spin_lock_init(&state->lock); +static int __init sparcspkr_drv_init(void) +{ + int error; - dev_set_drvdata(&dev->dev, state); + error = platform_driver_register(&sparcspkr_platform_driver); + if (error) + return error; - err = sparcspkr_probe(&dev->dev); - if (err) { - dev_set_drvdata(&dev->dev, NULL); - kfree(state); + sparcspkr_platform_device = platform_device_alloc("sparcspkr", -1); + if (!sparcspkr_platform_device) { + error = -ENOMEM; + goto err_unregister_driver; } + error = platform_device_add(sparcspkr_platform_device); + if (error) + goto err_free_device; + return 0; -} -static struct of_device_id isa_beep_match[] = { - { - .name = "dma", - }, - {}, -}; + err_free_device: + platform_device_put(sparcspkr_platform_device); + err_unregister_driver: + platform_driver_unregister(&sparcspkr_platform_driver); -static struct of_platform_driver isa_beep_driver = { - .name = "beep", - .match_table = isa_beep_match, - .probe = isa_beep_probe, - .remove = sparcspkr_remove, - .shutdown = sparcspkr_shutdown, -}; + return error; +} static int __init sparcspkr_init(void) { - int err = of_register_driver(&ebus_beep_driver, &ebus_bus_type); - - if (!err) { - err = of_register_driver(&isa_beep_driver, &isa_bus_type); - if (err) - of_unregister_driver(&ebus_beep_driver); + struct linux_ebus *ebus; + struct linux_ebus_device *edev; +#ifdef CONFIG_SPARC64 + struct sparc_isa_bridge *isa_br; + struct sparc_isa_device *isa_dev; +#endif + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, "beep")) { + beep_name = "Sparc EBUS Speaker"; + beep_event = ebus_spkr_event; + beep_iobase = edev->resource[0].start; + return sparcspkr_drv_init(); + } + } + } +#ifdef CONFIG_SPARC64 + for_each_isa(isa_br) { + for_each_isadev(isa_dev, isa_br) { + /* A hack, the beep device's base lives in + * the DMA isa node. + */ + if (!strcmp(isa_dev->prom_name, "dma")) { + beep_name = "Sparc ISA Speaker"; + beep_event = isa_spkr_event, + beep_iobase = isa_dev->resource.start; + return sparcspkr_drv_init(); + } + } } +#endif - return err; + return -ENODEV; } static void __exit sparcspkr_exit(void) { - of_unregister_driver(&ebus_beep_driver); - of_unregister_driver(&isa_beep_driver); + platform_device_unregister(sparcspkr_platform_device); + platform_driver_unregister(&sparcspkr_platform_driver); } module_init(sparcspkr_init); diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index de0f46dd9..e4e5be111 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c @@ -94,7 +94,7 @@ static void call_bios(struct regs *regs) static ssize_t __init locate_wistron_bios(void __iomem *base) { - static unsigned char __initdata signature[] = + static const unsigned char __initdata signature[] = { 0x42, 0x21, 0x55, 0x30 }; ssize_t offset; @@ -285,15 +285,6 @@ static struct key_entry keymap_fujitsu_n3510[] = { { KE_END, 0 } }; -static struct key_entry keymap_wistron_ms2111[] = { - { KE_KEY, 0x11, KEY_PROG1 }, - { KE_KEY, 0x12, KEY_PROG2 }, - { KE_KEY, 0x13, KEY_PROG3 }, - { KE_KEY, 0x31, KEY_MAIL }, - { KE_KEY, 0x36, KEY_WWW }, - { KE_END, 0 } -}; - static struct key_entry keymap_wistron_ms2141[] = { { KE_KEY, 0x11, KEY_PROG1 }, { KE_KEY, 0x12, KEY_PROG2 }, @@ -335,7 +326,6 @@ static struct key_entry keymap_aopen_1559as[] = { { KE_WIFI, 0x30, 0 }, { KE_KEY, 0x31, KEY_MAIL }, { KE_KEY, 0x36, KEY_WWW }, - { KE_END, 0 }, }; /* @@ -343,7 +333,7 @@ static struct key_entry keymap_aopen_1559as[] = { * a list of buttons and their key codes (reported when loading this module * with force=1) and the output of dmidecode to $MODULE_AUTHOR. */ -static struct dmi_system_id dmi_ids[] __initdata = { +static struct dmi_system_id dmi_ids[] = { { .callback = dmi_matched, .ident = "Fujitsu-Siemens Amilo Pro V2000", @@ -398,15 +388,6 @@ static struct dmi_system_id dmi_ids[] __initdata = { }, .driver_data = keymap_aopen_1559as }, - { - .callback = dmi_matched, - .ident = "Medion MD 9783", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"), - DMI_MATCH(DMI_PRODUCT_NAME, "MD 9783"), - }, - .driver_data = keymap_wistron_ms2111 - }, { NULL, } }; diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 070d75330..a0e2e797c 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -470,7 +470,7 @@ int alps_init(struct psmouse *psmouse) dev1->keybit[LONG(BTN_BACK)] |= BIT(BTN_BACK); } - snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); + sprintf(priv->phys, "%s/input1", psmouse->ps2dev.serio->phys); dev2->phys = priv->phys; dev2->name = (priv->i->flags & ALPS_DUALPOINT) ? "DualPoint Stick" : "PS/2 Mouse"; dev2->id.bustype = BUS_I8042; diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c index 50f1fed10..afc66f56d 100644 --- a/drivers/input/mouse/inport.c +++ b/drivers/input/mouse/inport.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 54b696cfe..2f0d28840 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c @@ -238,7 +238,8 @@ static struct ps2pp_info *get_model_info(unsigned char model) { 100, PS2PP_KIND_MX, /* MX510 */ PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN }, - { 111, PS2PP_KIND_MX, PS2PP_WHEEL | PS2PP_SIDE_BTN }, /* MX300 reports task button as side */ + { 111, PS2PP_KIND_MX, /* MX300 */ + PS2PP_WHEEL | PS2PP_EXTRA_BTN | PS2PP_TASK_BTN }, { 112, PS2PP_KIND_MX, /* MX500 */ PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN }, diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 07b060438..136321a2c 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -150,20 +150,9 @@ static psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse, struct pt_reg */ if (psmouse->type == PSMOUSE_IMEX) { - switch (packet[3] & 0xC0) { - case 0x80: /* vertical scroll on IntelliMouse Explorer 4.0 */ - input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 32) - (int) (packet[3] & 31)); - break; - case 0x40: /* horizontal scroll on IntelliMouse Explorer 4.0 */ - input_report_rel(dev, REL_HWHEEL, (int) (packet[3] & 32) - (int) (packet[3] & 31)); - break; - case 0x00: - case 0xC0: - input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7)); - input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1); - input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1); - break; - } + input_report_rel(dev, REL_WHEEL, (int) (packet[3] & 8) - (int) (packet[3] & 7)); + input_report_key(dev, BTN_SIDE, (packet[3] >> 4) & 1); + input_report_key(dev, BTN_EXTRA, (packet[3] >> 5) & 1); } /* @@ -477,18 +466,9 @@ static int im_explorer_detect(struct psmouse *psmouse, int set_properties) if (param[0] != 4) return -1; -/* Magic to enable horizontal scrolling on IntelliMouse 4.0 */ - param[0] = 200; - ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE); - param[0] = 80; - ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE); - param[0] = 40; - ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE); - if (set_properties) { set_bit(BTN_MIDDLE, psmouse->dev->keybit); set_bit(REL_WHEEL, psmouse->dev->relbit); - set_bit(REL_HWHEEL, psmouse->dev->relbit); set_bit(BTN_SIDE, psmouse->dev->keybit); set_bit(BTN_EXTRA, psmouse->dev->keybit); @@ -1077,8 +1057,8 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, struct psmouse_proto if (psmouse->resync_time && psmouse->poll(psmouse)) psmouse->resync_time = 0; - snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", - psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name); + sprintf(psmouse->devname, "%s %s %s", + psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name); input_dev->name = psmouse->devname; input_dev->phys = psmouse->phys; @@ -1119,7 +1099,7 @@ static int psmouse_connect(struct serio *serio, struct serio_driver *drv) ps2_init(&psmouse->ps2dev, serio); INIT_WORK(&psmouse->resync_work, psmouse_resync, psmouse); psmouse->dev = input_dev; - snprintf(psmouse->phys, sizeof(psmouse->phys), "%s/input0", serio->phys); + sprintf(psmouse->phys, "%s/input0", serio->phys); psmouse_set_state(psmouse, PSMOUSE_INITIALIZING); @@ -1332,22 +1312,20 @@ ssize_t psmouse_attr_set_helper(struct device *dev, struct device_attribute *dev static ssize_t psmouse_show_int_attr(struct psmouse *psmouse, void *offset, char *buf) { - unsigned int *field = (unsigned int *)((char *)psmouse + (size_t)offset); + unsigned long *field = (unsigned long *)((char *)psmouse + (size_t)offset); - return sprintf(buf, "%u\n", *field); + return sprintf(buf, "%lu\n", *field); } static ssize_t psmouse_set_int_attr(struct psmouse *psmouse, void *offset, const char *buf, size_t count) { - unsigned int *field = (unsigned int *)((char *)psmouse + (size_t)offset); + unsigned long *field = (unsigned long *)((char *)psmouse + (size_t)offset); unsigned long value; char *rest; value = simple_strtoul(buf, &rest, 10); if (*rest) return -EINVAL; - if ((unsigned int)value != value) - return -EINVAL; *field = value; diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c index 872b30bf7..09b6ffdb7 100644 --- a/drivers/input/mouse/rpcmouse.c +++ b/drivers/input/mouse/rpcmouse.c @@ -85,7 +85,7 @@ static int __init rpcmouse_init(void) rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); - if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, IRQF_SHARED, "rpcmouse", rpcmouse_dev)) { + if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, SA_SHIRQ, "rpcmouse", rpcmouse_dev)) { printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n"); input_free_device(rpcmouse_dev); return -EBUSY; diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index 0023501a5..2f9a04ae7 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -253,7 +254,7 @@ static int sermouse_connect(struct serio *serio, struct serio_driver *drv) goto fail; sermouse->dev = input_dev; - snprintf(sermouse->phys, sizeof(sermouse->phys), "%s/input0", serio->phys); + sprintf(sermouse->phys, "%s/input0", serio->phys); sermouse->type = serio->id.proto; input_dev->name = sermouse_protocols[sermouse->type]; diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index ae5871a0e..6d9ec9ab1 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c @@ -183,26 +183,21 @@ static struct attribute_group trackpoint_attr_group = { .attrs = trackpoint_attrs, }; -static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *firmware_id) +static void trackpoint_disconnect(struct psmouse *psmouse) { - unsigned char param[2] = { 0 }; - - if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) - return -1; - - if (param[0] != TP_MAGIC_IDENT) - return -1; - - if (firmware_id) - *firmware_id = param[1]; + sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, &trackpoint_attr_group); - return 0; + kfree(psmouse->private); + psmouse->private = NULL; } static int trackpoint_sync(struct psmouse *psmouse) { - struct trackpoint_data *tp = psmouse->private; unsigned char toggle; + struct trackpoint_data *tp = psmouse->private; + + if (!tp) + return -1; /* Disable features that may make device unusable with this driver */ trackpoint_read(&psmouse->ps2dev, TP_TOGGLE_TWOHAND, &toggle); @@ -268,38 +263,27 @@ static void trackpoint_defaults(struct trackpoint_data *tp) tp->ext_dev = TP_DEF_EXT_DEV; } -static void trackpoint_disconnect(struct psmouse *psmouse) -{ - sysfs_remove_group(&psmouse->ps2dev.serio->dev.kobj, &trackpoint_attr_group); - - kfree(psmouse->private); - psmouse->private = NULL; -} - -static int trackpoint_reconnect(struct psmouse *psmouse) -{ - if (trackpoint_start_protocol(psmouse, NULL)) - return -1; - - if (trackpoint_sync(psmouse)) - return -1; - - return 0; -} - int trackpoint_detect(struct psmouse *psmouse, int set_properties) { struct trackpoint_data *priv; struct ps2dev *ps2dev = &psmouse->ps2dev; unsigned char firmware_id; unsigned char button_info; + unsigned char param[2]; + + param[0] = param[1] = 0; - if (trackpoint_start_protocol(psmouse, &firmware_id)) + if (ps2_command(ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) + return -1; + + if (param[0] != TP_MAGIC_IDENT) return -1; if (!set_properties) return 0; + firmware_id = param[1]; + if (trackpoint_read(&psmouse->ps2dev, TP_EXT_BTN, &button_info)) { printk(KERN_WARNING "trackpoint.c: failed to get extended button data\n"); button_info = 0; @@ -312,7 +296,7 @@ int trackpoint_detect(struct psmouse *psmouse, int set_properties) psmouse->vendor = "IBM"; psmouse->name = "TrackPoint"; - psmouse->reconnect = trackpoint_reconnect; + psmouse->reconnect = trackpoint_sync; psmouse->disconnect = trackpoint_disconnect; trackpoint_defaults(priv); diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index 47edcfd02..36e9442a1 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c @@ -81,6 +81,7 @@ #include #include #include +#include #include #include @@ -152,25 +153,22 @@ vsxxxaa_detection_done (struct vsxxxaa *mouse) { switch (mouse->type) { case 0x02: - strlcpy (mouse->name, "DEC VSXXX-AA/-GA mouse", - sizeof (mouse->name)); + sprintf (mouse->name, "DEC VSXXX-AA/-GA mouse"); break; case 0x04: - strlcpy (mouse->name, "DEC VSXXX-AB digitizer", - sizeof (mouse->name)); + sprintf (mouse->name, "DEC VSXXX-AB digitizer"); break; default: - snprintf (mouse->name, sizeof (mouse->name), - "unknown DEC pointer device (type = 0x%02x)", - mouse->type); + sprintf (mouse->name, "unknown DEC pointer device " + "(type = 0x%02x)", mouse->type); break; } - printk (KERN_INFO - "Found %s version 0x%02x from country 0x%02x on port %s\n", - mouse->name, mouse->version, mouse->country, mouse->phys); + printk (KERN_INFO "Found %s version 0x%02x from country 0x%02x " + "on port %s\n", mouse->name, mouse->version, + mouse->country, mouse->phys); } /* @@ -505,9 +503,8 @@ vsxxxaa_connect (struct serio *serio, struct serio_driver *drv) mouse->dev = input_dev; mouse->serio = serio; - strlcat (mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer", - sizeof (mouse->name)); - snprintf (mouse->phys, sizeof (mouse->phys), "%s/input0", serio->phys); + sprintf (mouse->name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer"); + sprintf (mouse->phys, "%s/input0", serio->phys); input_dev->name = mouse->name; input_dev->phys = mouse->phys; diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 1f851acab..b685a5079 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -122,9 +123,7 @@ static void mousedev_touchpad_event(struct input_dev *dev, struct mousedev *mous if (mousedev->touch) { size = dev->absmax[ABS_X] - dev->absmin[ABS_X]; - if (size == 0) - size = 256 * 2; - + if (size == 0) size = 256 * 2; switch (code) { case ABS_X: fx(0) = value; @@ -156,24 +155,18 @@ static void mousedev_abs_event(struct input_dev *dev, struct mousedev *mousedev, switch (code) { case ABS_X: size = dev->absmax[ABS_X] - dev->absmin[ABS_X]; - if (size == 0) - size = xres ? : 1; - if (value > dev->absmax[ABS_X]) - value = dev->absmax[ABS_X]; - if (value < dev->absmin[ABS_X]) - value = dev->absmin[ABS_X]; + if (size == 0) size = xres ? : 1; + if (value > dev->absmax[ABS_X]) value = dev->absmax[ABS_X]; + if (value < dev->absmin[ABS_X]) value = dev->absmin[ABS_X]; mousedev->packet.x = ((value - dev->absmin[ABS_X]) * xres) / size; mousedev->packet.abs_event = 1; break; case ABS_Y: size = dev->absmax[ABS_Y] - dev->absmin[ABS_Y]; - if (size == 0) - size = yres ? : 1; - if (value > dev->absmax[ABS_Y]) - value = dev->absmax[ABS_Y]; - if (value < dev->absmin[ABS_Y]) - value = dev->absmin[ABS_Y]; + if (size == 0) size = yres ? : 1; + if (value > dev->absmax[ABS_Y]) value = dev->absmax[ABS_Y]; + if (value < dev->absmin[ABS_Y]) value = dev->absmin[ABS_Y]; mousedev->packet.y = yres - ((value - dev->absmin[ABS_Y]) * yres) / size; mousedev->packet.abs_event = 1; break; @@ -209,7 +202,7 @@ static void mousedev_key_event(struct mousedev *mousedev, unsigned int code, int case BTN_SIDE: index = 3; break; case BTN_4: case BTN_EXTRA: index = 4; break; - default: return; + default: return; } if (value) { @@ -292,9 +285,10 @@ static void mousedev_touchpad_touch(struct mousedev *mousedev, int value) mousedev->touch = mousedev->pkt_count = 0; mousedev->frac_dx = 0; mousedev->frac_dy = 0; - - } else if (!mousedev->touch) - mousedev->touch = jiffies; + } + else + if (!mousedev->touch) + mousedev->touch = jiffies; } static void mousedev_event(struct input_handle *handle, unsigned int type, unsigned int code, int value) @@ -333,7 +327,7 @@ static void mousedev_event(struct input_handle *handle, unsigned int type, unsig mousedev->pkt_count++; /* Input system eats duplicate events, but we need all of them * to do correct averaging so apply present one forward - */ + */ fx(0) = fx(1); fy(0) = fy(1); } @@ -352,9 +346,7 @@ static int mousedev_fasync(int fd, struct file *file, int on) { int retval; struct mousedev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); - return retval < 0 ? retval : 0; } @@ -515,16 +507,14 @@ static ssize_t mousedev_write(struct file * file, const char __user * buffer, si list->imexseq = 0; list->mode = MOUSEDEV_EMUL_EXPS; } - } else - list->imexseq = 0; + } else list->imexseq = 0; if (c == mousedev_imps_seq[list->impsseq]) { if (++list->impsseq == MOUSEDEV_SEQ_LEN) { list->impsseq = 0; list->mode = MOUSEDEV_EMUL_IMPS; } - } else - list->impsseq = 0; + } else list->impsseq = 0; list->ps2[0] = 0xfa; @@ -608,7 +598,6 @@ static ssize_t mousedev_read(struct file * file, char __user * buffer, size_t co static unsigned int mousedev_poll(struct file *file, poll_table *wait) { struct mousedev_list *list = file->private_data; - poll_wait(file, &list->mousedev->wait, wait); return ((list->ready || list->buffer) ? (POLLIN | POLLRDNORM) : 0) | (list->mousedev->exist ? 0 : (POLLHUP | POLLERR)); diff --git a/drivers/input/power.c b/drivers/input/power.c index 51a519e24..526e60706 100644 --- a/drivers/input/power.c +++ b/drivers/input/power.c @@ -28,6 +28,7 @@ */ #include +#include #include #include #include diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index bc6e87add..096b6a0b5 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -188,7 +189,7 @@ static int __devinit ct82c710_probe(struct platform_device *dev) strlcpy(ct82c710_port->name, "C&T 82c710 mouse port", sizeof(ct82c710_port->name)); snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys), - "isa%16llx/serio0", (unsigned long long)CT82C710_DATA); + "isa%04lx/serio0", CT82C710_DATA); serio_register_port(ct82c710_port); @@ -240,8 +241,8 @@ static int __init ct82c710_init(void) serio_register_port(ct82c710_port); - printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n", - (unsigned long long)CT82C710_DATA, CT82C710_IRQ); + printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n", + CT82C710_DATA, CT82C710_IRQ); return 0; diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index cde036a92..c0b1e4bec 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -22,6 +22,7 @@ * was usable/enabled ?) */ +#include #include #include #include @@ -370,7 +371,7 @@ static int __init gscps2_probe(struct parisc_device *dev) serio->dev.parent = &dev->dev; ret = -EBUSY; - if (request_irq(dev->irq, gscps2_interrupt, IRQF_SHARED, ps2port->port->name, ps2port)) + if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port)) goto fail_miserably; if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) { diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 54adba2d8..ed9446f6d 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h @@ -1,10 +1,13 @@ #ifndef _I8042_SPARCIO_H #define _I8042_SPARCIO_H +#include #include + +#ifdef CONFIG_PCI #include -#include -#include +#include +#endif static int i8042_kbd_irq = -1; static int i8042_aux_irq = -1; @@ -45,83 +48,54 @@ static inline void i8042_write_command(int val) #define OBP_PS2MS_NAME1 "kdmouse" #define OBP_PS2MS_NAME2 "mouse" -static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) -{ - struct device_node *dp = op->node; - - dp = dp->child; - while (dp) { - if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || - !strcmp(dp->name, OBP_PS2KBD_NAME2)) { - struct of_device *kbd = of_find_device_by_node(dp); - unsigned int irq = kbd->irqs[0]; - if (irq == 0xffffffff) - irq = op->irqs[0]; - i8042_kbd_irq = irq; - kbd_iobase = of_ioremap(&kbd->resource[0], - 0, 8, "kbd"); - } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || - !strcmp(dp->name, OBP_PS2MS_NAME2)) { - struct of_device *ms = of_find_device_by_node(dp); - unsigned int irq = ms->irqs[0]; - if (irq == 0xffffffff) - irq = op->irqs[0]; - i8042_aux_irq = irq; - } - - dp = dp->sibling; - } - - return 0; -} - -static int __devexit sparc_i8042_remove(struct of_device *op) -{ - of_iounmap(kbd_iobase, 8); - - return 0; -} - -static struct of_device_id sparc_i8042_match[] = { - { - .name = "8042", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, sparc_i8042_match); - -static struct of_platform_driver sparc_i8042_driver = { - .name = "i8042", - .match_table = sparc_i8042_match, - .probe = sparc_i8042_probe, - .remove = __devexit_p(sparc_i8042_remove), -}; - static int __init i8042_platform_init(void) { #ifndef CONFIG_PCI return -ENODEV; #else - struct device_node *root = of_find_node_by_path("/"); + char prop[128]; + int len; - if (!strcmp(root->name, "SUNW,JavaStation-1")) { + len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop)); + if (len < 0) { + printk("i8042: Cannot get name property of root OBP node.\n"); + return -ENODEV; + } + if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) { /* Hardcoded values for MrCoffee. */ i8042_kbd_irq = i8042_aux_irq = 13 | 0x20; kbd_iobase = ioremap(0x71300060, 8); if (!kbd_iobase) return -ENODEV; } else { - int err = of_register_driver(&sparc_i8042_driver, - &of_bus_type); - if (err) - return err; - + struct linux_ebus *ebus; + struct linux_ebus_device *edev; + struct linux_ebus_child *child; + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, "8042")) + goto edev_found; + } + } + return -ENODEV; + + edev_found: + for_each_edevchild(edev, child) { + if (!strcmp(child->prom_name, OBP_PS2KBD_NAME1) || + !strcmp(child->prom_name, OBP_PS2KBD_NAME2)) { + i8042_kbd_irq = child->irqs[0]; + kbd_iobase = + ioremap(child->resource[0].start, 8); + } + if (!strcmp(child->prom_name, OBP_PS2MS_NAME1) || + !strcmp(child->prom_name, OBP_PS2MS_NAME2)) + i8042_aux_irq = child->irqs[0]; + } if (i8042_kbd_irq == -1 || i8042_aux_irq == -1) { - if (kbd_iobase) { - of_iounmap(kbd_iobase, 8); - kbd_iobase = (void __iomem *) NULL; - } + printk("i8042: Error, 8042 device lacks both kbd and " + "mouse nodes.\n"); return -ENODEV; } } @@ -135,10 +109,7 @@ static int __init i8042_platform_init(void) static inline void i8042_platform_exit(void) { #ifdef CONFIG_PCI - struct device_node *root = of_find_node_by_path("/"); - - if (strcmp(root->name, "SUNW,JavaStation-1")) - of_unregister_driver(&sparc_i8042_driver); + iounmap(kbd_iobase); #endif } diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 06a3f2565..a7d91d535 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -328,7 +329,7 @@ static int i8042_open(struct serio *serio) return 0; if (request_irq(port->irq, i8042_interrupt, - IRQF_SHARED, "i8042", i8042_request_irq_cookie)) { + SA_SHIRQ, "i8042", i8042_request_irq_cookie)) { printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", port->irq, port->name); goto irq_fail; } @@ -610,7 +611,7 @@ static int __devinit i8042_check_aux(void) */ if (request_irq(i8042_ports[I8042_AUX_PORT_NO].irq, i8042_interrupt, - IRQF_SHARED, "i8042", &i8042_check_aux_cookie)) + SA_SHIRQ, "i8042", &i8042_check_aux_cookie)) return -1; free_irq(i8042_ports[I8042_AUX_PORT_NO].irq, &i8042_check_aux_cookie); diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index af526ab9e..cbbf3842d 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h @@ -1,6 +1,7 @@ #ifndef _I8042_H #define _I8042_H +#include /* * Copyright (c) 1999-2002 Vojtech Pavlik diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index b9f5d99fa..79c97f94b 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c @@ -177,11 +177,6 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command) return -1; } - if (send && !param) { - WARN_ON(1); - return -1; - } - mutex_lock(&ps2dev->cmd_mutex); serio_pause_rx(ps2dev->serio); @@ -280,8 +275,6 @@ int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int comman return 0; } -static struct lock_class_key ps2_mutex_key; - /* * ps2_init() initializes ps2dev structure */ @@ -289,8 +282,6 @@ static struct lock_class_key ps2_mutex_key; void ps2_init(struct ps2dev *ps2dev, struct serio *serio) { mutex_init(&ps2dev->cmd_mutex); - lockdep_set_class_and_subclass(&ps2dev->cmd_mutex, &ps2_mutex_key, - serio->depth); init_waitqueue_head(&ps2dev->wait); ps2dev->serio = serio; } diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index fb727c665..1e139c5e5 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c @@ -107,7 +107,7 @@ static int pcips2_open(struct serio *io) outb(PS2_CTRL_ENABLE, ps2if->base); pcips2_flush_input(ps2if); - ret = request_irq(ps2if->dev->irq, pcips2_interrupt, IRQF_SHARED, + ret = request_irq(ps2if->dev->irq, pcips2_interrupt, SA_SHIRQ, "pcips2", ps2if); if (ret == 0) val = PS2_CTRL_ENABLE | PS2_CTRL_RXIRQ; diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 4a1c3e365..6521034bc 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -62,7 +62,6 @@ static LIST_HEAD(serio_list); static struct bus_type serio_bus; -static void serio_add_driver(struct serio_driver *drv); static void serio_add_port(struct serio *serio); static void serio_destroy_port(struct serio *serio); static void serio_reconnect_port(struct serio *serio); @@ -141,14 +140,8 @@ static void serio_release_driver(struct serio *serio) static void serio_find_driver(struct serio *serio) { - int error; - down_write(&serio_bus.subsys.rwsem); - error = device_attach(&serio->dev); - if (error < 0) - printk(KERN_WARNING - "serio: device_attach() failed for %s (%s), error: %d\n", - serio->phys, serio->name, error); + device_attach(&serio->dev); up_write(&serio_bus.subsys.rwsem); } @@ -279,6 +272,7 @@ static struct serio_event *serio_get_event(void) static void serio_handle_event(void) { struct serio_event *event; + struct serio_driver *serio_drv; mutex_lock(&serio_mutex); @@ -310,7 +304,8 @@ static void serio_handle_event(void) break; case SERIO_REGISTER_DRIVER: - serio_add_driver(event->object); + serio_drv = event->object; + driver_register(&serio_drv->driver); break; default: @@ -521,8 +516,6 @@ static void serio_release_port(struct device *dev) module_put(THIS_MODULE); } -static struct lock_class_key serio_lock_key; - /* * Prepare serio port for registration. */ @@ -532,7 +525,6 @@ static void serio_init_port(struct serio *serio) __module_get(THIS_MODULE); - INIT_LIST_HEAD(&serio->node); spin_lock_init(&serio->lock); mutex_init(&serio->drv_mutex); device_initialize(&serio->dev); @@ -540,13 +532,8 @@ static void serio_init_port(struct serio *serio) "serio%ld", (long)atomic_inc_return(&serio_no) - 1); serio->dev.bus = &serio_bus; serio->dev.release = serio_release_port; - if (serio->parent) { + if (serio->parent) serio->dev.parent = &serio->parent->dev; - serio->depth = serio->parent->depth + 1; - } else - serio->depth = 0; - lockdep_set_class_and_subclass(&serio->lock, &serio_lock_key, - serio->depth); } /* @@ -555,8 +542,6 @@ static void serio_init_port(struct serio *serio) */ static void serio_add_port(struct serio *serio) { - int error; - if (serio->parent) { serio_pause_rx(serio->parent); serio->parent->child = serio; @@ -566,19 +551,9 @@ static void serio_add_port(struct serio *serio) list_add_tail(&serio->node, &serio_list); if (serio->start) serio->start(serio); - error = device_add(&serio->dev); - if (error) - printk(KERN_ERR - "serio: device_add() failed for %s (%s), error: %d\n", - serio->phys, serio->name, error); - else { - serio->registered = 1; - error = sysfs_create_group(&serio->dev.kobj, &serio_id_attr_group); - if (error) - printk(KERN_ERR - "serio: sysfs_create_group() failed for %s (%s), error: %d\n", - serio->phys, serio->name, error); - } + device_add(&serio->dev); + sysfs_create_group(&serio->dev.kobj, &serio_id_attr_group); + serio->registered = 1; } /* @@ -608,10 +583,10 @@ static void serio_destroy_port(struct serio *serio) if (serio->registered) { sysfs_remove_group(&serio->dev.kobj, &serio_id_attr_group); device_del(&serio->dev); + list_del_init(&serio->node); serio->registered = 0; } - list_del_init(&serio->node); serio_remove_pending_events(serio); put_device(&serio->dev); } @@ -781,17 +756,6 @@ static struct bus_type serio_bus = { .remove = serio_driver_remove, }; -static void serio_add_driver(struct serio_driver *drv) -{ - int error; - - error = driver_register(&drv->driver); - if (error) - printk(KERN_ERR - "serio: driver_register() failed for %s, error: %d\n", - drv->driver.name, error); -} - void __serio_register_driver(struct serio_driver *drv, struct module *owner) { drv->driver.bus = &serio_bus; @@ -939,26 +903,18 @@ irqreturn_t serio_interrupt(struct serio *serio, static int __init serio_init(void) { - int error; + serio_task = kthread_run(serio_thread, NULL, "kseriod"); + if (IS_ERR(serio_task)) { + printk(KERN_ERR "serio: Failed to start kseriod\n"); + return PTR_ERR(serio_task); + } serio_bus.dev_attrs = serio_device_attrs; serio_bus.drv_attrs = serio_driver_attrs; serio_bus.match = serio_bus_match; serio_bus.uevent = serio_uevent; serio_bus.resume = serio_resume; - error = bus_register(&serio_bus); - if (error) { - printk(KERN_ERR "serio: failed to register serio bus, error: %d\n", error); - return error; - } - - serio_task = kthread_run(serio_thread, NULL, "kseriod"); - if (IS_ERR(serio_task)) { - bus_unregister(&serio_bus); - error = PTR_ERR(serio_task); - printk(KERN_ERR "serio: Failed to start kseriod, error: %d\n", error); - return error; - } + bus_register(&serio_bus); return 0; } diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 71a8eea81..5a2703b53 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 66e411bad..161afddd0 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -773,7 +773,8 @@ static int __devinit ads7846_probe(struct spi_device *spi) ts->last_msg = m; - if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, + if (request_irq(spi->irq, ads7846_irq, + SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, spi->dev.driver->name, ts)) { dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); err = -EBUSY; diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index 9b66271d3..5013703db 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c @@ -17,7 +17,7 @@ #include #include #include -#include +//#include #include #include @@ -318,7 +318,7 @@ static int __init corgits_probe(struct platform_device *pdev) corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS); mdelay(5); - if (request_irq(corgi_ts->irq_gpio, ts_interrupt, IRQF_DISABLED, "ts", corgi_ts)) { + if (request_irq(corgi_ts->irq_gpio, ts_interrupt, SA_INTERRUPT, "ts", corgi_ts)) { err = -EBUSY; goto fail; } diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c index b769b2197..466da190c 100644 --- a/drivers/input/touchscreen/gunze.c +++ b/drivers/input/touchscreen/gunze.c @@ -129,7 +129,7 @@ static int gunze_connect(struct serio *serio, struct serio_driver *drv) gunze->serio = serio; gunze->dev = input_dev; - snprintf(gunze->phys, sizeof(serio->phys), "%s/input0", serio->phys); + sprintf(gunze->phys, "%s/input0", serio->phys); input_dev->private = gunze; input_dev->name = "Gunze AHL-51S TouchScreen"; diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index e2b910018..a18d56bda 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c @@ -363,7 +363,7 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) ts->serio = serio; ts->dev = input_dev; - snprintf(ts->phys, sizeof(ts->phys), "%s/input0", serio->phys); + sprintf(ts->phys, "%s/input0", serio->phys); input_dev->name = "H3600 TouchScreen"; input_dev->phys = ts->phys; @@ -399,14 +399,16 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE); if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler, - IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { + SA_SHIRQ | SA_INTERRUPT | SA_SAMPLE_RANDOM, + "h3600_action", &ts->dev)) { printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); err = -EBUSY; goto fail2; } if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, - IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { + SA_SHIRQ | SA_INTERRUPT | SA_SAMPLE_RANDOM, + "h3600_suspend", &ts->dev)) { printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); err = -EBUSY; goto fail3; diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index fa97e0f79..957dd5a1b 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c @@ -109,7 +109,7 @@ static int __init hp680_ts_init(void) input_register_device(hp680_ts_dev); if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt, - IRQF_DISABLED, MODNAME, 0) < 0) { + SA_INTERRUPT, MODNAME, 0) < 0) { printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n", HP680_TS_IRQ); input_unregister_device(hp680_ts_dev); diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c index 8647a905d..1d0d37eee 100644 --- a/drivers/input/touchscreen/mtouch.c +++ b/drivers/input/touchscreen/mtouch.c @@ -143,7 +143,7 @@ static int mtouch_connect(struct serio *serio, struct serio_driver *drv) mtouch->serio = serio; mtouch->dev = input_dev; - snprintf(mtouch->phys, sizeof(mtouch->phys), "%s/input0", serio->phys); + sprintf(mtouch->phys, "%s/input0", serio->phys); input_dev->private = mtouch; input_dev->name = "MicroTouch Serial TouchScreen"; diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 00e3929c6..d678d144b 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c @@ -35,7 +35,7 @@ * e-mail - mail your message to . */ -#define TSDEV_MINOR_BASE 128 +#define TSDEV_MINOR_BASE 128 #define TSDEV_MINORS 32 /* First 16 devices are h3600_ts compatible; second 16 are h3600_tsraw */ #define TSDEV_MINOR_MASK 15 @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -229,7 +230,6 @@ static ssize_t tsdev_read(struct file *file, char __user *buffer, size_t count, static unsigned int tsdev_poll(struct file *file, poll_table * wait) { struct tsdev_list *list = file->private_data; - poll_wait(file, &list->tsdev->wait, wait); return ((list->head == list->tail) ? 0 : (POLLIN | POLLRDNORM)) | (list->tsdev->exist ? 0 : (POLLHUP | POLLERR)); @@ -248,13 +248,11 @@ static int tsdev_ioctl(struct inode *inode, struct file *file, sizeof (struct ts_calibration))) retval = -EFAULT; break; - case TS_SET_CAL: if (copy_from_user (&tsdev->cal, (void __user *)arg, sizeof (struct ts_calibration))) retval = -EFAULT; break; - default: retval = -EINVAL; break; @@ -286,11 +284,9 @@ static void tsdev_event(struct input_handle *handle, unsigned int type, case ABS_X: tsdev->x = value; break; - case ABS_Y: tsdev->y = value; break; - case ABS_PRESSURE: if (value > handle->dev->absmax[ABS_PRESSURE]) value = handle->dev->absmax[ABS_PRESSURE]; @@ -311,7 +307,6 @@ static void tsdev_event(struct input_handle *handle, unsigned int type, else if (tsdev->x > xres) tsdev->x = xres; break; - case REL_Y: tsdev->y += value; if (tsdev->y < 0) @@ -328,7 +323,6 @@ static void tsdev_event(struct input_handle *handle, unsigned int type, case 0: tsdev->pressure = 0; break; - case 1: if (!tsdev->pressure) tsdev->pressure = 1; @@ -376,8 +370,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, struct class_device *cdev; int minor, delta; - for (minor = 0; minor < TSDEV_MINORS / 2 && tsdev_table[minor]; minor++); - if (minor >= TSDEV_MINORS / 2) { + for (minor = 0; minor < TSDEV_MINORS/2 && tsdev_table[minor]; + minor++); + if (minor >= TSDEV_MINORS/2) { printk(KERN_ERR "tsdev: You have way too many touchscreens\n"); return NULL; @@ -449,22 +444,22 @@ static struct input_device_id tsdev_ids[] = { .evbit = { BIT(EV_KEY) | BIT(EV_REL) }, .keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) }, .relbit = { BIT(REL_X) | BIT(REL_Y) }, - }, /* A mouse like device, at least one button, two relative axes */ + },/* A mouse like device, at least one button, two relative axes */ { .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_ABSBIT, .evbit = { BIT(EV_KEY) | BIT(EV_ABS) }, .keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) }, .absbit = { BIT(ABS_X) | BIT(ABS_Y) }, - }, /* A tablet like device, at least touch detection, two absolute axes */ + },/* A tablet like device, at least touch detection, two absolute axes */ { .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT, .evbit = { BIT(EV_ABS) }, .absbit = { BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) }, - }, /* A tablet like device with several gradations of pressure */ + },/* A tablet like device with several gradations of pressure */ - {} /* Terminating entry */ + {},/* Terminating entry */ }; MODULE_DEVICE_TABLE(input, tsdev_ids); diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 669f76393..173c899a1 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -38,6 +39,7 @@ #include #include #include +#include #include #include #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) @@ -85,11 +87,6 @@ struct capincci; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE struct capiminor; -struct datahandle_queue { - struct list_head list; - u16 datahandle; -}; - struct capiminor { struct list_head list; struct capincci *nccip; @@ -112,9 +109,12 @@ struct capiminor { int outbytes; /* transmit path */ - struct list_head ackqueue; + struct datahandle_queue { + struct datahandle_queue *next; + u16 datahandle; + } *ackqueue; int nack; - spinlock_t ackqlock; + }; #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ @@ -156,54 +156,48 @@ static LIST_HEAD(capiminor_list); static int capincci_add_ack(struct capiminor *mp, u16 datahandle) { - struct datahandle_queue *n; - unsigned long flags; + struct datahandle_queue *n, **pp; n = kmalloc(sizeof(*n), GFP_ATOMIC); - if (unlikely(!n)) { - printk(KERN_ERR "capi: alloc datahandle failed\n"); - return -1; + if (!n) { + printk(KERN_ERR "capi: alloc datahandle failed\n"); + return -1; } + n->next = NULL; n->datahandle = datahandle; - INIT_LIST_HEAD(&n->list); - spin_lock_irqsave(&mp->ackqlock, flags); - list_add_tail(&n->list, &mp->ackqueue); + for (pp = &mp->ackqueue; *pp; pp = &(*pp)->next) ; + *pp = n; mp->nack++; - spin_unlock_irqrestore(&mp->ackqlock, flags); return 0; } static int capiminor_del_ack(struct capiminor *mp, u16 datahandle) { - struct datahandle_queue *p, *tmp; - unsigned long flags; + struct datahandle_queue **pp, *p; - spin_lock_irqsave(&mp->ackqlock, flags); - list_for_each_entry_safe(p, tmp, &mp->ackqueue, list) { - if (p->datahandle == datahandle) { - list_del(&p->list); + for (pp = &mp->ackqueue; *pp; pp = &(*pp)->next) { + if ((*pp)->datahandle == datahandle) { + p = *pp; + *pp = (*pp)->next; kfree(p); mp->nack--; - spin_unlock_irqrestore(&mp->ackqlock, flags); return 0; } } - spin_unlock_irqrestore(&mp->ackqlock, flags); return -1; } static void capiminor_del_all_ack(struct capiminor *mp) { - struct datahandle_queue *p, *tmp; - unsigned long flags; + struct datahandle_queue **pp, *p; - spin_lock_irqsave(&mp->ackqlock, flags); - list_for_each_entry_safe(p, tmp, &mp->ackqueue, list) { - list_del(&p->list); + pp = &mp->ackqueue; + while (*pp) { + p = *pp; + *pp = (*pp)->next; kfree(p); mp->nack--; } - spin_unlock_irqrestore(&mp->ackqlock, flags); } @@ -226,8 +220,6 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) mp->ncci = ncci; mp->msgid = 0; atomic_set(&mp->ttyopencount,0); - INIT_LIST_HEAD(&mp->ackqueue); - spin_lock_init(&mp->ackqlock); skb_queue_head_init(&mp->inqueue); skb_queue_head_init(&mp->outqueue); @@ -1335,6 +1327,7 @@ static int capinc_tty_init(void) drv->owner = THIS_MODULE; drv->driver_name = "capi_nc"; + drv->devfs_name = "capi/"; drv->name = "capi"; drv->major = capi_ttymajor; drv->minor_start = 0; @@ -1513,6 +1506,8 @@ static int __init capi_init(void) } class_device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi"); + devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, + "isdn/capi20"); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init() < 0) { @@ -1547,6 +1542,7 @@ static void __exit capi_exit(void) class_device_destroy(capi_class, MKDEV(capi_major, 0)); class_destroy(capi_class); unregister_chrdev(capi_major, "capi20"); + devfs_remove("isdn/capi20"); #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE capinc_tty_exit(); diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index b6f9476c0..d10c8b82e 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c @@ -1907,8 +1907,7 @@ static int if_readstat(u8 __user *buf, int len, int id, int channel) } for (p=buf, count=0; count < len; p++, count++) { - if (put_user(*card->q931_read++, p)) - return -EFAULT; + put_user(*card->q931_read++, p); if (card->q931_read > card->q931_end) card->q931_read = card->q931_buf; } diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 2dd1b57b0..0a37aded4 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -104,6 +104,7 @@ capifs_fill_super(struct super_block *s, void *data, int silent) inode->i_ino = 1; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_blocks = 0; + inode->i_blksize = 1024; inode->i_uid = inode->i_gid = 0; inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; inode->i_op = &simple_dir_inode_operations; @@ -120,10 +121,10 @@ fail: return -ENOMEM; } -static int capifs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *capifs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt); + return get_sb_single(fs_type, flags, data, capifs_fill_super); } static struct file_system_type capifs_fs_type = { @@ -148,6 +149,7 @@ void capifs_new_ncci(unsigned int number, dev_t device) if (!inode) return; inode->i_ino = number+2; + inode->i_blksize = 1024; inode->i_uid = config.setuid ? config.uid : current->fsuid; inode->i_gid = config.setgid ? config.gid : current->fsgid; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index c1b21552f..e7cf6bc28 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /* from CAPI2.0 DDK AVM Berlin GmbH */ diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 399b31611..1b37d86d5 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 1f5ebe9ee..f1a1f9a9b 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c @@ -592,7 +592,7 @@ static int put_address(char *st, u_char *p, int len) } /* put_address */ /*************************************/ -/* report a successful interrogation */ +/* report a succesfull interrogation */ /*************************************/ static int interrogate_success(isdn_ctrl *ic, struct call_struc *cs) { char *src = ic->parm.dss1_io.data; diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3845defd4..eb41aba3d 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -41,6 +41,7 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); #define GIGASET_MINORS 1 #define GIGASET_MINOR 16 #define GIGASET_MODULENAME "bas_gigaset" +#define GIGASET_DEVFSNAME "gig/bas/" #define GIGASET_DEVNAME "ttyGB" /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ @@ -64,22 +65,23 @@ static struct usb_device_id gigaset_table [] = { MODULE_DEVICE_TABLE(usb, gigaset_table); -/*======================= local function prototypes ==========================*/ +/*======================= local function prototypes =============================*/ -/* function called if a new device belonging to this driver is connected */ +/* This function is called if a new device is connected to the USB port. It + * checks whether this new device belongs to this driver. + */ static int gigaset_probe(struct usb_interface *interface, const struct usb_device_id *id); /* Function will be called if the device is unplugged */ static void gigaset_disconnect(struct usb_interface *interface); -static int atread_submit(struct cardstate *, int); +static void read_ctrl_callback(struct urb *, struct pt_regs *); static void stopurbs(struct bas_bc_state *); -static int req_submit(struct bc_state *, int, int, int); static int atwrite_submit(struct cardstate *, unsigned char *, int); static int start_cbsend(struct cardstate *); -/*============================================================================*/ +/*==============================================================================*/ struct bas_cardstate { struct usb_device *udev; /* USB device pointer */ @@ -89,7 +91,6 @@ struct bas_cardstate { struct urb *urb_ctrl; /* control pipe default URB */ struct usb_ctrlrequest dr_ctrl; struct timer_list timer_ctrl; /* control request timeout */ - int retry_ctrl; struct timer_list timer_atrdy; /* AT command ready timeout */ struct urb *urb_cmd_out; /* for sending AT commands */ @@ -306,7 +307,6 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) * hang up any existing connection because of an unrecoverable error * This function may be called from any context and takes care of scheduling * the necessary actions for execution outside of interrupt context. - * cs->lock must not be held. * argument: * B channel control structure */ @@ -325,17 +325,14 @@ static inline void error_hangup(struct bc_state *bcs) /* error_reset * reset Gigaset device because of an unrecoverable error - * This function may be called from any context, and takes care of + * This function may be called from any context, and should take care of * scheduling the necessary actions for execution outside of interrupt context. - * cs->lock must not be held. + * Right now, it just generates a kernel message calling for help. * argument: * controller state structure */ static inline void error_reset(struct cardstate *cs) { - /* close AT command channel to recover (ignore errors) */ - req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT); - //FIXME try to recover without bothering the user dev_err(cs->dev, "unrecoverable error - please disconnect Gigaset base to reset\n"); @@ -406,30 +403,14 @@ static void cmd_in_timeout(unsigned long data) { struct cardstate *cs = (struct cardstate *) data; struct bas_cardstate *ucs = cs->hw.bas; - int rc; if (!ucs->rcvbuf_size) { gig_dbg(DEBUG_USBREQ, "%s: no receive in progress", __func__); return; } - if (ucs->retry_cmd_in++ < BAS_RETRY) { - dev_notice(cs->dev, "control read: timeout, retry %d\n", - ucs->retry_cmd_in); - rc = atread_submit(cs, BAS_TIMEOUT); - if (rc >= 0 || rc == -ENODEV) - /* resubmitted or disconnected */ - /* - bypass regular exit block */ - return; - } else { - dev_err(cs->dev, - "control read: timeout, giving up after %d tries\n", - ucs->retry_cmd_in); - } - kfree(ucs->rcvbuf); - ucs->rcvbuf = NULL; - ucs->rcvbuf_size = 0; - error_reset(cs); + dev_err(cs->dev, "timeout reading AT response\n"); + error_reset(cs); //FIXME retry? } /* set/clear bits in base connection state, return previous state @@ -447,96 +428,6 @@ inline static int update_basstate(struct bas_cardstate *ucs, return state; } -/* read_ctrl_callback - * USB completion handler for control pipe input - * called by the USB subsystem in interrupt context - * parameter: - * urb USB request block - * urb->context = inbuf structure for controller state - */ -static void read_ctrl_callback(struct urb *urb, struct pt_regs *regs) -{ - struct inbuf_t *inbuf = urb->context; - struct cardstate *cs = inbuf->cs; - struct bas_cardstate *ucs = cs->hw.bas; - int have_data = 0; - unsigned numbytes; - int rc; - - update_basstate(ucs, 0, BS_ATRDPEND); - - if (!ucs->rcvbuf_size) { - dev_warn(cs->dev, "%s: no receive in progress\n", __func__); - return; - } - - del_timer(&ucs->timer_cmd_in); - - switch (urb->status) { - case 0: /* normal completion */ - numbytes = urb->actual_length; - if (unlikely(numbytes != ucs->rcvbuf_size)) { - dev_warn(cs->dev, - "control read: received %d chars, expected %d\n", - numbytes, ucs->rcvbuf_size); - if (numbytes > ucs->rcvbuf_size) - numbytes = ucs->rcvbuf_size; - } - - /* copy received bytes to inbuf */ - have_data = gigaset_fill_inbuf(inbuf, ucs->rcvbuf, numbytes); - - if (unlikely(numbytes < ucs->rcvbuf_size)) { - /* incomplete - resubmit for remaining bytes */ - ucs->rcvbuf_size -= numbytes; - ucs->retry_cmd_in = 0; - rc = atread_submit(cs, BAS_TIMEOUT); - if (rc >= 0 || rc == -ENODEV) - /* resubmitted or disconnected */ - /* - bypass regular exit block */ - return; - error_reset(cs); - } - break; - - case -ENOENT: /* cancelled */ - case -ECONNRESET: /* cancelled (async) */ - case -EINPROGRESS: /* pending */ - case -ENODEV: /* device removed */ - case -ESHUTDOWN: /* device shut down */ - /* no action necessary */ - gig_dbg(DEBUG_USBREQ, "%s: %s", - __func__, get_usb_statmsg(urb->status)); - break; - - default: /* severe trouble */ - dev_warn(cs->dev, "control read: %s\n", - get_usb_statmsg(urb->status)); - if (ucs->retry_cmd_in++ < BAS_RETRY) { - dev_notice(cs->dev, "control read: retry %d\n", - ucs->retry_cmd_in); - rc = atread_submit(cs, BAS_TIMEOUT); - if (rc >= 0 || rc == -ENODEV) - /* resubmitted or disconnected */ - /* - bypass regular exit block */ - return; - } else { - dev_err(cs->dev, - "control read: giving up after %d tries\n", - ucs->retry_cmd_in); - } - error_reset(cs); - } - - kfree(ucs->rcvbuf); - ucs->rcvbuf = NULL; - ucs->rcvbuf_size = 0; - if (have_data) { - gig_dbg(DEBUG_INTR, "%s-->BH", __func__); - gigaset_schedule_event(cs); - } -} - /* atread_submit * submit an HD_READ_ATMESSAGE command URB and optionally start a timeout * parameters: @@ -575,7 +466,7 @@ static int atread_submit(struct cardstate *cs, int timeout) if ((ret = usb_submit_urb(ucs->urb_cmd_in, SLAB_ATOMIC)) != 0) { update_basstate(ucs, 0, BS_ATRDPEND); dev_err(cs->dev, "could not submit HD_READ_ATMESSAGE: %s\n", - get_usb_rcmsg(ret)); + get_usb_statmsg(ret)); return ret; } @@ -720,12 +611,9 @@ static void read_int_callback(struct urb *urb, struct pt_regs *regs) kfree(ucs->rcvbuf); ucs->rcvbuf = NULL; ucs->rcvbuf_size = 0; - if (rc != -ENODEV) { + if (rc != -ENODEV) //FIXME corrective action? - spin_unlock_irqrestore(&cs->lock, flags); error_reset(cs); - break; - } } spin_unlock_irqrestore(&cs->lock, flags); break; @@ -755,6 +643,97 @@ resubmit: } } +/* read_ctrl_callback + * USB completion handler for control pipe input + * called by the USB subsystem in interrupt context + * parameter: + * urb USB request block + * urb->context = inbuf structure for controller state + */ +static void read_ctrl_callback(struct urb *urb, struct pt_regs *regs) +{ + struct inbuf_t *inbuf = urb->context; + struct cardstate *cs = inbuf->cs; + struct bas_cardstate *ucs = cs->hw.bas; + int have_data = 0; + unsigned numbytes; + int rc; + + update_basstate(ucs, 0, BS_ATRDPEND); + + if (!ucs->rcvbuf_size) { + dev_warn(cs->dev, "%s: no receive in progress\n", __func__); + return; + } + + del_timer(&ucs->timer_cmd_in); + + switch (urb->status) { + case 0: /* normal completion */ + numbytes = urb->actual_length; + if (unlikely(numbytes == 0)) { + dev_warn(cs->dev, + "control read: empty block received\n"); + goto retry; + } + if (unlikely(numbytes != ucs->rcvbuf_size)) { + dev_warn(cs->dev, + "control read: received %d chars, expected %d\n", + numbytes, ucs->rcvbuf_size); + if (numbytes > ucs->rcvbuf_size) + numbytes = ucs->rcvbuf_size; + } + + /* copy received bytes to inbuf */ + have_data = gigaset_fill_inbuf(inbuf, ucs->rcvbuf, numbytes); + + if (unlikely(numbytes < ucs->rcvbuf_size)) { + /* incomplete - resubmit for remaining bytes */ + ucs->rcvbuf_size -= numbytes; + ucs->retry_cmd_in = 0; + goto retry; + } + break; + + case -ENOENT: /* cancelled */ + case -ECONNRESET: /* cancelled (async) */ + case -EINPROGRESS: /* pending */ + case -ENODEV: /* device removed */ + case -ESHUTDOWN: /* device shut down */ + /* no action necessary */ + gig_dbg(DEBUG_USBREQ, "%s: %s", + __func__, get_usb_statmsg(urb->status)); + break; + + default: /* severe trouble */ + dev_warn(cs->dev, "control read: %s\n", + get_usb_statmsg(urb->status)); + retry: + if (ucs->retry_cmd_in++ < BAS_RETRY) { + dev_notice(cs->dev, "control read: retry %d\n", + ucs->retry_cmd_in); + rc = atread_submit(cs, BAS_TIMEOUT); + if (rc >= 0 || rc == -ENODEV) + /* resubmitted or disconnected */ + /* - bypass regular exit block */ + return; + } else { + dev_err(cs->dev, + "control read: giving up after %d tries\n", + ucs->retry_cmd_in); + } + error_reset(cs); + } + + kfree(ucs->rcvbuf); + ucs->rcvbuf = NULL; + ucs->rcvbuf_size = 0; + if (have_data) { + gig_dbg(DEBUG_INTR, "%s-->BH", __func__); + gigaset_schedule_event(cs); + } +} + /* read_iso_callback * USB completion handler for B channel isochronous input * called by the USB subsystem in interrupt context @@ -1399,7 +1378,6 @@ static void req_timeout(unsigned long data) case HD_CLOSE_B1CHANNEL: dev_err(bcs->cs->dev, "timeout closing channel %d\n", bcs->channel + 1); - error_reset(bcs->cs); break; default: @@ -1418,61 +1396,22 @@ static void req_timeout(unsigned long data) static void write_ctrl_callback(struct urb *urb, struct pt_regs *regs) { struct bas_cardstate *ucs = urb->context; - int rc; unsigned long flags; - /* check status */ - switch (urb->status) { - case 0: /* normal completion */ - spin_lock_irqsave(&ucs->lock, flags); - switch (ucs->pending) { - case HD_DEVICE_INIT_ACK: /* no reply expected */ - del_timer(&ucs->timer_ctrl); - ucs->pending = 0; - break; - } - spin_unlock_irqrestore(&ucs->lock, flags); - return; - - case -ENOENT: /* cancelled */ - case -ECONNRESET: /* cancelled (async) */ - case -EINPROGRESS: /* pending */ - case -ENODEV: /* device removed */ - case -ESHUTDOWN: /* device shut down */ - /* ignore silently */ - gig_dbg(DEBUG_USBREQ, "%s: %s", - __func__, get_usb_statmsg(urb->status)); + spin_lock_irqsave(&ucs->lock, flags); + if (urb->status && ucs->pending) { + dev_err(&ucs->interface->dev, + "control request 0x%02x failed: %s\n", + ucs->pending, get_usb_statmsg(urb->status)); + del_timer(&ucs->timer_ctrl); + ucs->pending = 0; + } + /* individual handling of specific request types */ + switch (ucs->pending) { + case HD_DEVICE_INIT_ACK: /* no reply expected */ + ucs->pending = 0; break; - - default: /* any failure */ - if (++ucs->retry_ctrl > BAS_RETRY) { - dev_err(&ucs->interface->dev, - "control request 0x%02x failed: %s\n", - ucs->dr_ctrl.bRequest, - get_usb_statmsg(urb->status)); - break; /* give up */ - } - dev_notice(&ucs->interface->dev, - "control request 0x%02x: %s, retry %d\n", - ucs->dr_ctrl.bRequest, get_usb_statmsg(urb->status), - ucs->retry_ctrl); - /* urb->dev is clobbered by USB subsystem */ - urb->dev = ucs->udev; - rc = usb_submit_urb(urb, SLAB_ATOMIC); - if (unlikely(rc)) { - dev_err(&ucs->interface->dev, - "could not resubmit request 0x%02x: %s\n", - ucs->dr_ctrl.bRequest, get_usb_rcmsg(rc)); - break; - } - /* resubmitted */ - return; } - - /* failed, clear pending request */ - spin_lock_irqsave(&ucs->lock, flags); - del_timer(&ucs->timer_ctrl); - ucs->pending = 0; spin_unlock_irqrestore(&ucs->lock, flags); } @@ -1516,11 +1455,9 @@ static int req_submit(struct bc_state *bcs, int req, int val, int timeout) usb_sndctrlpipe(ucs->udev, 0), (unsigned char*) &ucs->dr_ctrl, NULL, 0, write_ctrl_callback, ucs); - ucs->retry_ctrl = 0; - ret = usb_submit_urb(ucs->urb_ctrl, SLAB_ATOMIC); - if (unlikely(ret)) { + if ((ret = usb_submit_urb(ucs->urb_ctrl, SLAB_ATOMIC)) != 0) { dev_err(bcs->cs->dev, "could not submit request 0x%02x: %s\n", - req, get_usb_rcmsg(ret)); + req, get_usb_statmsg(ret)); spin_unlock_irqrestore(&ucs->lock, flags); return ret; } @@ -2348,7 +2285,8 @@ static int __init bas_gigaset_init(void) /* allocate memory for our driver state and intialize it */ if ((driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, GIGASET_MODULENAME, GIGASET_DEVNAME, - &gigops, THIS_MODULE)) == NULL) + GIGASET_DEVFSNAME, &gigops, + THIS_MODULE)) == NULL) goto error; /* allocate memory for our device state and intialize it */ diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index aca165d43..e55767b2c 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -460,9 +460,6 @@ void gigaset_freecs(struct cardstate *cs) switch (cs->cs_init) { default: - /* clear device sysfs */ - gigaset_free_dev_sysfs(cs); - gigaset_if_free(cs); gig_dbg(DEBUG_INIT, "clearing hw"); @@ -702,7 +699,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, cs->open_count = 0; cs->dev = NULL; cs->tty = NULL; - cs->class = NULL; cs->cidmode = cidmode != 0; //if(onechannel) { //FIXME @@ -764,9 +760,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, gigaset_if_init(cs); - /* set up device sysfs */ - gigaset_init_dev_sysfs(cs); - spin_lock_irqsave(&cs->lock, flags); cs->running = 1; spin_unlock_irqrestore(&cs->lock, flags); @@ -909,6 +902,9 @@ int gigaset_start(struct cardstate *cs) wait_event(cs->waitqueue, !cs->waiting); + /* set up device sysfs */ + gigaset_init_dev_sysfs(cs); + mutex_unlock(&cs->mutex); return 1; @@ -973,6 +969,9 @@ void gigaset_stop(struct cardstate *cs) //FIXME } + /* clear device sysfs */ + gigaset_free_dev_sysfs(cs); + cleanup_cs(cs); exit: @@ -981,7 +980,7 @@ exit: EXPORT_SYMBOL_GPL(gigaset_stop); static LIST_HEAD(drivers); -static DEFINE_SPINLOCK(driver_lock); +static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; struct cardstate *gigaset_get_cs_by_id(int id) { @@ -1092,12 +1091,14 @@ EXPORT_SYMBOL_GPL(gigaset_freedriver); * minors Number of minors this driver can handle * procname Name of the driver * devname Name of the device files (prefix without minor number) + * devfsname Devfs name of the device files without %d * return value: * Pointer to the gigaset_driver structure on success, NULL on failure. */ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, const char *procname, const char *devname, + const char *devfsname, const struct gigaset_ops *ops, struct module *owner) { @@ -1137,7 +1138,7 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, drv->cs[i].minor_index = i; } - gigaset_if_initdriver(drv, procname, devname); + gigaset_if_initdriver(drv, procname, devname, devfsname); spin_lock_irqsave(&driver_lock, flags); list_add(&drv->list, &drivers); diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 44f02dbd1..18e05c09b 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -1262,8 +1262,7 @@ static void do_action(int action, struct cardstate *cs, break; case ACT_HUPMODEM: /* send "+++" (hangup in unimodem mode) */ - if (cs->connected) - cs->ops->write_cmd(cs, "+++", 3, NULL); + cs->ops->write_cmd(cs, "+++", 3, NULL); break; case ACT_RING: /* get fresh AT state structure for new CID */ @@ -1295,6 +1294,7 @@ static void do_action(int action, struct cardstate *cs, break; case ACT_ICALL: handle_icall(cs, bcs, p_at_state); + at_state = *p_at_state; break; case ACT_FAILSDOWN: dev_warn(cs->dev, "Could not shut down the device.\n"); @@ -1334,8 +1334,10 @@ static void do_action(int action, struct cardstate *cs, */ at_state->pending_commands |= PC_DLE0; atomic_set(&cs->commands_pending, 1); - } else + } else { disconnect(p_at_state); + at_state = *p_at_state; + } break; case ACT_FAKEDLE0: at_state->int_var[VAR_ZDLE] = 0; @@ -1352,8 +1354,10 @@ static void do_action(int action, struct cardstate *cs, at_state->cid = -1; if (bcs && cs->onechannel) at_state->pending_commands |= PC_DLE0; - else + else { disconnect(p_at_state); + at_state = *p_at_state; + } schedule_init(cs, MS_RECOVER); break; case ACT_FAILDLE0: @@ -1406,6 +1410,7 @@ static void do_action(int action, struct cardstate *cs, case ACT_ABORTACCEPT: /* hangup/error/timeout during ICALL processing */ disconnect(p_at_state); + at_state = *p_at_state; break; case ACT_ABORTDIAL: /* error/timeout during dial preparation */ diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 884bd72c1..22b9693f7 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h @@ -16,6 +16,7 @@ #ifndef GIGASET_H #define GIGASET_H +#include #include #include #include @@ -444,7 +445,6 @@ struct cardstate { struct gigaset_driver *driver; unsigned minor_index; struct device *dev; - struct class_device *class; const struct gigaset_ops *ops; @@ -768,6 +768,7 @@ void gigaset_block_channels(struct cardstate *cs); struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, const char *procname, const char *devname, + const char *devfsname, const struct gigaset_ops *ops, struct module *owner); @@ -890,7 +891,7 @@ int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src, /* initialize interface */ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, - const char *devname); + const char *devname, const char *devfsname); /* release interface */ void gigaset_if_freedriver(struct gigaset_driver *drv); /* add minor */ diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index bd2e42675..08e4c4eea 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c @@ -625,14 +625,7 @@ void gigaset_if_init(struct cardstate *cs) return; tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); - cs->class = tty_register_device(drv->tty, cs->minor_index, NULL); - - if (!IS_ERR(cs->class)) - class_set_devdata(cs->class, cs); - else { - warn("could not register device to the tty subsystem"); - cs->class = NULL; - } + tty_register_device(drv->tty, cs->minor_index, NULL); } void gigaset_if_free(struct cardstate *cs) @@ -645,7 +638,6 @@ void gigaset_if_free(struct cardstate *cs) tasklet_disable(&cs->if_wake_tasklet); tasklet_kill(&cs->if_wake_tasklet); - cs->class = NULL; tty_unregister_device(drv->tty, cs->minor_index); } @@ -673,9 +665,10 @@ EXPORT_SYMBOL_GPL(gigaset_if_receive); * drv Driver * procname Name of the driver (e.g. for /proc/tty/drivers) * devname Name of the device files (prefix without minor number) + * devfsname Devfs name of the device files without %d */ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, - const char *devname) + const char *devname, const char *devfsname) { unsigned minors = drv->minors; int ret; @@ -691,7 +684,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, tty->major = GIG_MAJOR, tty->type = TTY_DRIVER_TYPE_SERIAL, tty->subtype = SERIAL_TYPE_NORMAL, - tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS, tty->driver_name = procname; tty->name = devname; @@ -699,6 +692,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, tty->num = drv->minors; tty->owner = THIS_MODULE; + tty->devfs_name = devfsname; tty->init_termios = tty_std_termios; //FIXME tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; //FIXME diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index 9ae3a7f3e..d267a636b 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c @@ -16,11 +16,12 @@ #include "gigaset.h" #include -static ssize_t show_cidmode(struct class_device *class, char *buf) +static ssize_t show_cidmode(struct device *dev, struct device_attribute *attr, + char *buf) { int ret; unsigned long flags; - struct cardstate *cs = class_get_devdata(class); + struct cardstate *cs = dev_get_drvdata(dev); spin_lock_irqsave(&cs->lock, flags); ret = sprintf(buf, "%u\n", cs->cidmode); @@ -29,10 +30,10 @@ static ssize_t show_cidmode(struct class_device *class, char *buf) return ret; } -static ssize_t set_cidmode(struct class_device *class, +static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct cardstate *cs = class_get_devdata(class); + struct cardstate *cs = dev_get_drvdata(dev); long int value; char *end; @@ -64,24 +65,18 @@ static ssize_t set_cidmode(struct class_device *class, return count; } -static CLASS_DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode); +static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode); /* free sysfs for device */ void gigaset_free_dev_sysfs(struct cardstate *cs) { - if (!cs->class) - return; - gig_dbg(DEBUG_INIT, "removing sysfs entries"); - class_device_remove_file(cs->class, &class_device_attr_cidmode); + device_remove_file(cs->dev, &dev_attr_cidmode); } /* initialize sysfs for device */ void gigaset_init_dev_sysfs(struct cardstate *cs) { - if (!cs->class) - return; - gig_dbg(DEBUG_INIT, "setting up sysfs"); - class_device_create_file(cs->class, &class_device_attr_cidmode); + device_create_file(cs->dev, &dev_attr_cidmode); } diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 6e05d9d4a..d86ab6811 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -41,6 +41,7 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); #define GIGASET_MINORS 1 #define GIGASET_MINOR 8 #define GIGASET_MODULENAME "usb_gigaset" +#define GIGASET_DEVFSNAME "gig/usb/" #define GIGASET_DEVNAME "ttyGU" #define IF_WRITEBUF 2000 //FIXME // WAKEUP_CHARS: 256 @@ -895,7 +896,8 @@ static int __init usb_gigaset_init(void) /* allocate memory for our driver state and intialize it */ if ((driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, GIGASET_MODULENAME, GIGASET_DEVNAME, - &ops, THIS_MODULE)) == NULL) + GIGASET_DEVFSNAME, &ops, + THIS_MODULE)) == NULL) goto error; /* allocate memory for our device state and intialize it */ diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index a4beeb46c..4d64e5cbc 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index 90e2e6643..5435a6cfb 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -97,7 +98,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev) b1_reset(card->port); b1_getrevision(card); - retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card); + retval = request_irq(card->irq, b1_interrupt, SA_SHIRQ, card->name, card); if (retval) { printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); retval = -EBUSY; @@ -234,7 +235,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev) b1dma_reset(card); b1_getrevision(card); - retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card); + retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); if (retval) { printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c index e479c0aef..9746cc5ff 100644 --- a/drivers/isdn/hardware/avm/b1pcmcia.c +++ b/drivers/isdn/hardware/avm/b1pcmcia.c @@ -82,7 +82,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, card->irq = irq; card->cardtype = cardtype; - retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card); + retval = request_irq(card->irq, b1_interrupt, 0, card->name, card); if (retval) { printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n", card->irq); diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index 6c3d5f5f1..f7253b213 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -1172,7 +1173,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, } c4_reset(card); - retval = request_irq(card->irq, c4_interrupt, IRQF_SHARED, card->name, card); + retval = request_irq(card->irq, c4_interrupt, SA_SHIRQ, card->name, card); if (retval) { printk(KERN_ERR "c4: unable to get IRQ %d.\n",card->irq); retval = -EBUSY; diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index d1e253c94..2ceec8e84 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -103,7 +104,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) } b1dma_reset(card); - retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card); + retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); if (retval) { printk(KERN_ERR "t1pci: unable to get IRQ %d.\n", card->irq); retval = -EBUSY; diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c index 7a74ed35b..8fe4f3f09 100644 --- a/drivers/isdn/hardware/eicon/capimain.c +++ b/drivers/isdn/hardware/eicon/capimain.c @@ -10,6 +10,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c index 14298b8c8..27204f4b1 100644 --- a/drivers/isdn/hardware/eicon/diva_didd.c +++ b/drivers/isdn/hardware/eicon/diva_didd.c @@ -11,6 +11,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c index 77155d9f3..6146f7633 100644 --- a/drivers/isdn/hardware/eicon/divamnt.c +++ b/drivers/isdn/hardware/eicon/divamnt.c @@ -10,12 +10,14 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include #include #include #include +#include #include #include "platform.h" @@ -176,6 +178,7 @@ static struct file_operations divas_maint_fops = { static void divas_maint_unregister_chrdev(void) { + devfs_remove(DEVNAME); unregister_chrdev(major, DEVNAME); } @@ -187,6 +190,7 @@ static int DIVA_INIT_FUNCTION divas_maint_register_chrdev(void) DRIVERLNAME); return (0); } + devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); return (1); } diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index fff0d89c8..df715b47e 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c @@ -10,6 +10,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include #include "platform.h" @@ -143,6 +145,7 @@ static struct file_operations divas_idi_fops = { static void divas_idi_unregister_chrdev(void) { + devfs_remove(DEVNAME); unregister_chrdev(major, DEVNAME); } @@ -154,6 +157,7 @@ static int DIVA_INIT_FUNCTION divas_idi_register_chrdev(void) DRIVERLNAME); return (0); } + devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); return (1); } diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index b7dadba13..c9b26e86d 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c @@ -9,10 +9,12 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include #include +#include #include #include #include @@ -486,7 +488,7 @@ void __inline__ outpp(void __iomem *addr, word p) int diva_os_register_irq(void *context, byte irq, const char *name) { int result = request_irq(irq, diva_os_irq_wrapper, - IRQF_DISABLED | IRQF_SHARED, name, context); + SA_INTERRUPT | SA_SHIRQ, name, context); return (result); } @@ -676,6 +678,7 @@ static struct file_operations divas_fops = { static void divas_unregister_chrdev(void) { + devfs_remove(DEVNAME); unregister_chrdev(major, DEVNAME); } @@ -687,6 +690,7 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void) DRIVERLNAME); return (0); } + devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); return (1); } diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index 6a4373a4f..c12efa6f8 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c @@ -10,6 +10,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include diff --git a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h index af3eb9e79..0a5be7f96 100644 --- a/drivers/isdn/hardware/eicon/divasync.h +++ b/drivers/isdn/hardware/eicon/divasync.h @@ -256,6 +256,7 @@ typedef struct #define NO_ORDER_CHECK_MASK 0x00000010 #define LOW_CHANNEL_MASK 0x00000020 #define NO_HSCX30_MASK 0x00000040 +#define MODE_MASK 0x00000080 #define SET_BOARD 0x00001000 #define SET_CRC4 0x00030000 #define SET_L1_TRISTATE 0x00040000 diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h index a66836cf7..12b8ff29e 100644 --- a/drivers/isdn/hardware/eicon/platform.h +++ b/drivers/isdn/hardware/eicon/platform.h @@ -18,6 +18,7 @@ #define DIVA_BUILD "local" #endif +#include #include #include #include diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c index 93ff941c4..a98c5e38b 100644 --- a/drivers/isdn/hisax/asuscom.c +++ b/drivers/isdn/hisax/asuscom.c @@ -297,7 +297,7 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg) } #ifdef __ISAPNP__ -static struct isapnp_device_id asus_ids[] __devinitdata = { +static struct isapnp_device_id asus_ids[] __initdata = { { ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688), (unsigned long) "Asus1688 PnP" }, @@ -313,11 +313,11 @@ static struct isapnp_device_id asus_ids[] __devinitdata = { { 0, } }; -static struct isapnp_device_id *ipid __devinitdata = &asus_ids[0]; +static struct isapnp_device_id *ipid __initdata = &asus_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit +int __init setup_asuscom(struct IsdnCard *card) { int bytecnt; diff --git a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c index 729e906bd..9a8b02557 100644 --- a/drivers/isdn/hisax/avm_a1.c +++ b/drivers/isdn/hisax/avm_a1.c @@ -178,7 +178,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -int __devinit +int __init setup_avm_a1(struct IsdnCard *card) { u_char val; diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index 574e252df..d643bb32a 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c @@ -255,7 +255,7 @@ setup_avm_a1_pcmcia(struct IsdnCard *card) cs->BC_Write_Reg = &WriteHSCX; cs->BC_Send_Data = &hscx_fill_fifo; cs->cardmsg = &AVM_card_msg; - cs->irq_flags = IRQF_SHARED; + cs->irq_flags = SA_SHIRQ; cs->irq_func = &avm_a1p_interrupt; ISACVersion(cs, "AVM A1 PCMCIA:"); diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 369afd3a3..4abe5ff10 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c @@ -12,6 +12,7 @@ * */ +#include #include #include "hisax.h" #include "isac.h" @@ -639,7 +640,7 @@ clear_pending_hdlc_ints(struct IsdnCardState *cs) } #endif /* 0 */ -static void +static void __init inithdlc(struct IsdnCardState *cs) { cs->bcs[0].BC_SetStack = setstack_hdlc; @@ -727,13 +728,13 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) } #ifdef CONFIG_PCI -static struct pci_dev *dev_avm __devinitdata = NULL; +static struct pci_dev *dev_avm __initdata = NULL; #endif #ifdef __ISAPNP__ -static struct pnp_card *pnp_avm_c __devinitdata = NULL; +static struct pnp_card *pnp_avm_c __initdata = NULL; #endif -int __devinit +int __init setup_avm_pcipnp(struct IsdnCard *card) { u_int val, ver; @@ -808,7 +809,7 @@ setup_avm_pcipnp(struct IsdnCard *card) printk(KERN_WARNING "FritzPCI: No PCI card found\n"); return(0); } - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; #else printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); return (0); diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index 87a630128..dcb308aeb 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c @@ -11,6 +11,7 @@ */ +#include #include #include "hisax.h" #include "isac.h" @@ -255,9 +256,9 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg) return (0); } -static struct pci_dev *dev_a4t __devinitdata = NULL; +static struct pci_dev *dev_a4t __initdata = NULL; -int __devinit +int __init setup_bkm_a4t(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; @@ -335,7 +336,7 @@ setup_bkm_a4t(struct IsdnCard *card) cs->BC_Send_Data = &jade_fill_fifo; cs->cardmsg = &BKM_card_msg; cs->irq_func = &bkm_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; ISACVersion(cs, "Telekom A4T:"); /* Jade version */ JadeVersion(cs, "Telekom A4T:"); diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index dae090a9a..5f21b82c8 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c @@ -11,6 +11,7 @@ */ +#include #include #include "hisax.h" #include "isac.h" @@ -260,7 +261,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg) return (0); } -static int __devinit +static int __init sct_alloc_io(u_int adr, u_int len) { if (!request_region(adr, len, "scitel")) { @@ -272,16 +273,16 @@ sct_alloc_io(u_int adr, u_int len) return(0); } -static struct pci_dev *dev_a8 __devinitdata = NULL; -static u16 sub_vendor_id __devinitdata = 0; -static u16 sub_sys_id __devinitdata = 0; -static u_char pci_bus __devinitdata = 0; -static u_char pci_device_fn __devinitdata = 0; -static u_char pci_irq __devinitdata = 0; +static struct pci_dev *dev_a8 __initdata = NULL; +static u16 sub_vendor_id __initdata = 0; +static u16 sub_sys_id __initdata = 0; +static u_char pci_bus __initdata = 0; +static u_char pci_device_fn __initdata = 0; +static u_char pci_irq __initdata = 0; #endif /* CONFIG_PCI */ -int __devinit +int __init setup_sct_quadro(struct IsdnCard *card) { #ifdef CONFIG_PCI @@ -374,7 +375,7 @@ setup_sct_quadro(struct IsdnCard *card) pci_ioaddr5 &= PCI_BASE_ADDRESS_IO_MASK; /* Take over */ cs->irq = pci_irq; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; /* pci_ioaddr1 is unique to all subdevices */ /* pci_ioaddr2 is for the fourth subdevice only */ /* pci_ioaddr3 is for the third subdevice only */ diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 9280b581f..27332506f 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "hisax.h" #include @@ -631,8 +632,7 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel) count = cs->status_end - cs->status_read + 1; if (count >= len) count = len; - if (copy_to_user(p, cs->status_read, count)) - return -EFAULT; + copy_to_user(p, cs->status_read, count); cs->status_read += count; if (cs->status_read > cs->status_end) cs->status_read = cs->status_buf; @@ -643,8 +643,7 @@ static int HiSax_readstatus(u_char __user *buf, int len, int id, int channel) cnt = HISAX_STATUS_BUFSIZE; else cnt = count; - if (copy_to_user(p, cs->status_read, cnt)) - return -EFAULT; + copy_to_user(p, cs->status_read, cnt); p += cnt; cs->status_read += cnt % HISAX_STATUS_BUFSIZE; count -= cnt; @@ -1877,7 +1876,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if) #ifdef CONFIG_PCI #include -static struct pci_device_id hisax_pci_tbl[] __devinitdata = { +static struct pci_device_id hisax_pci_tbl[] __initdata = { #ifdef CONFIG_HISAX_FRITZPCI {PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID}, #endif diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index e294fa391..b0ff1cc97 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c @@ -16,6 +16,7 @@ */ #include +#include #include "hisax.h" #include "isac.h" #include "hscx.h" @@ -887,13 +888,13 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static struct pci_dev *dev_diva __devinitdata = NULL; -static struct pci_dev *dev_diva_u __devinitdata = NULL; -static struct pci_dev *dev_diva201 __devinitdata = NULL; -static struct pci_dev *dev_diva202 __devinitdata = NULL; +static struct pci_dev *dev_diva __initdata = NULL; +static struct pci_dev *dev_diva_u __initdata = NULL; +static struct pci_dev *dev_diva201 __initdata = NULL; +static struct pci_dev *dev_diva202 __initdata = NULL; #ifdef __ISAPNP__ -static struct isapnp_device_id diva_ids[] __devinitdata = { +static struct isapnp_device_id diva_ids[] __initdata = { { ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), ISAPNP_VENDOR('G', 'D', 'I'), ISAPNP_FUNCTION(0x51), (unsigned long) "Diva picola" }, @@ -915,12 +916,12 @@ static struct isapnp_device_id diva_ids[] __devinitdata = { { 0, } }; -static struct isapnp_device_id *ipid __devinitdata = &diva_ids[0]; +static struct isapnp_device_id *ipid __initdata = &diva_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit +int __init setup_diva(struct IsdnCard *card) { int bytecnt = 8; @@ -1076,7 +1077,7 @@ setup_diva(struct IsdnCard *card) printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); return(0); } - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; #else printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n"); printk(KERN_WARNING "Diva: unable to config DIVA PCI\n"); diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index 3b3e318f6..f8ca4b323 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c @@ -19,6 +19,7 @@ */ #include +#include #include "hisax.h" #include "arcofi.h" #include "isac.h" @@ -85,8 +86,8 @@ static const char *ITACVer[] = *** ***/ /* Config-Register (Read) */ -#define ELIRQF_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */ -#define ELIRQF_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */ +#define ELSA_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */ +#define ELSA_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */ #define ELSA_IRQ_IDX 0x38 /* Bit 3,4,5 des Config-Reg */ #define ELSA_IRQ_IDX_PCC8 0x30 /* Bit 4,5 des Config-Reg */ #define ELSA_IRQ_IDX_PC 0x0c /* Bit 2,3 des Config-Reg */ @@ -102,7 +103,7 @@ static const char *ITACVer[] = #define ELSA_S0_POWER_BAD 0x08 /* Bit 3 S0-Bus Spannung fehlt */ /* Status Flags */ -#define ELIRQF_TIMER_AKTIV 1 +#define ELSA_TIMER_AKTIV 1 #define ELSA_BAD_PWR 2 #define ELSA_ASSIGN 4 @@ -259,10 +260,10 @@ TimerRun(struct IsdnCardState *cs) v = bytein(cs->hw.elsa.cfg); if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000)) - return (0 == (v & ELIRQF_TIMER_RUN)); + return (0 == (v & ELSA_TIMER_RUN)); else if (cs->subtyp == ELSA_PCC8) - return (v & ELIRQF_TIMER_RUN_PCC8); - return (v & ELIRQF_TIMER_RUN); + return (v & ELSA_TIMER_RUN_PCC8); + return (v & ELSA_TIMER_RUN); } /* * fast interrupt HSCX stuff goes here @@ -334,7 +335,7 @@ elsa_interrupt(int intno, void *dev_id, struct pt_regs *regs) writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF); writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF); writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF); - if (cs->hw.elsa.status & ELIRQF_TIMER_AKTIV) { + if (cs->hw.elsa.status & ELSA_TIMER_AKTIV) { if (!TimerRun(cs)) { /* Timer Restart */ byteout(cs->hw.elsa.timer, 0); @@ -685,7 +686,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg) spin_lock_irqsave(&cs->lock, flags); cs->hw.elsa.counter = 0; cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT; - cs->hw.elsa.status |= ELIRQF_TIMER_AKTIV; + cs->hw.elsa.status |= ELSA_TIMER_AKTIV; byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); byteout(cs->hw.elsa.timer, 0); spin_unlock_irqrestore(&cs->lock, flags); @@ -693,7 +694,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg) spin_lock_irqsave(&cs->lock, flags); cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT; byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); - cs->hw.elsa.status &= ~ELIRQF_TIMER_AKTIV; + cs->hw.elsa.status &= ~ELSA_TIMER_AKTIV; spin_unlock_irqrestore(&cs->lock, flags); printk(KERN_INFO "Elsa: %d timer tics in 110 msek\n", cs->hw.elsa.counter); @@ -1012,7 +1013,7 @@ setup_elsa(struct IsdnCard *card) cs->hw.elsa.timer = 0; cs->hw.elsa.trig = 0; cs->hw.elsa.ctrl = 0; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; printk(KERN_INFO "Elsa: %s defined at %#lx IRQ %d\n", Elsa_Types[cs->subtyp], @@ -1061,7 +1062,7 @@ setup_elsa(struct IsdnCard *card) test_and_set_bit(HW_IPAC, &cs->HW_Flags); cs->hw.elsa.timer = 0; cs->hw.elsa.trig = 0; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; printk(KERN_INFO "Elsa: %s defined at %#lx/0x%x IRQ %d\n", Elsa_Types[cs->subtyp], diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c index 0279fb323..898ec0916 100644 --- a/drivers/isdn/hisax/elsa_ser.c +++ b/drivers/isdn/hisax/elsa_ser.c @@ -7,6 +7,7 @@ * */ +#include #include #include diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index 76c7d29d1..3341cf155 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c @@ -60,6 +60,7 @@ */ +#include #include "hisax.h" #include "isac.h" #include "isdnl1.h" @@ -301,10 +302,10 @@ enpci_interrupt(int intno, void *dev_id, struct pt_regs *regs) } -static struct pci_dev *dev_netjet __devinitdata = NULL; +static struct pci_dev *dev_netjet __initdata = NULL; /* called by config.c */ -int __devinit +int __init setup_enternow_pci(struct IsdnCard *card) { int bytecnt; @@ -405,7 +406,7 @@ setup_enternow_pci(struct IsdnCard *card) cs->BC_Send_Data = &netjet_fill_dma; cs->cardmsg = &enpci_card_msg; cs->irq_func = &enpci_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; return (1); } diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index fe2937267..60b04c6d9 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c @@ -11,6 +11,7 @@ * */ +#include #include #include "hisax.h" #include "isac.h" @@ -484,7 +485,7 @@ reserve_regions(struct IsdnCard *card, struct IsdnCardState *cs) return 1; } -static int __devinit +static int __init setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) { printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n"); @@ -532,9 +533,9 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) return (0); } -static struct pci_dev *dev_tel __devinitdata = NULL; +static struct pci_dev *dev_tel __initdata = NULL; -static int __devinit +static int __init setup_gazelpci(struct IsdnCardState *cs) { u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0; @@ -592,7 +593,7 @@ setup_gazelpci(struct IsdnCardState *cs) cs->hw.gazel.hscxfifo[0] = cs->hw.gazel.hscx[0]; cs->hw.gazel.hscxfifo[1] = cs->hw.gazel.hscx[1]; cs->irq = pci_irq; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; switch (seekcard) { case PCI_DEVICE_ID_PLX_R685: @@ -621,7 +622,7 @@ setup_gazelpci(struct IsdnCardState *cs) return (0); } -int __devinit +int __init setup_gazel(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index 3a5ca8a68..e3866b0a9 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -1552,7 +1553,7 @@ setup_instance(hfc4s8s_hw * hw) INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw); if (request_irq - (hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) { + (hw->irq, hfc4s8s_interrupt, SA_SHIRQ, hw->card_name, hw)) { printk(KERN_INFO "HFC-4S/8S: unable to alloc irq %d, card ignored\n", hw->irq); @@ -1703,7 +1704,7 @@ hfc4s8s_module_init(void) /* driver module exit : */ /* release the HFC-4s/8s hardware */ /*************************************/ -static void __exit +static void hfc4s8s_module_exit(void) { pci_unregister_driver(&hfc4s8s_driver); diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c index 6360e8214..637a261c9 100644 --- a/drivers/isdn/hisax/hfc_2bds0.c +++ b/drivers/isdn/hisax/hfc_2bds0.c @@ -1015,7 +1015,7 @@ hfc_dbusy_timer(struct IsdnCardState *cs) { } -static unsigned int +static unsigned int __init *init_send_hfcd(int cnt) { int i, *send; @@ -1030,7 +1030,7 @@ static unsigned int return(send); } -void +void __init init2bds0(struct IsdnCardState *cs) { cs->setstack_d = setstack_hfcd; diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c index d0520ad30..c964539cc 100644 --- a/drivers/isdn/hisax/hfc_2bs0.c +++ b/drivers/isdn/hisax/hfc_2bs0.c @@ -551,7 +551,7 @@ setstack_hfc(struct PStack *st, struct BCState *bcs) return (0); } -static void +static void __init init_send(struct BCState *bcs) { int i; @@ -565,7 +565,7 @@ init_send(struct BCState *bcs) bcs->hw.hfc.send[i] = 0x1fff; } -void +void __init inithfc(struct IsdnCardState *cs) { init_send(&cs->bcs[0]); diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 1df60ca94..91d25acb5 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c @@ -16,6 +16,7 @@ */ #include +#include #include "hisax.h" #include "hfc_pci.h" #include "isdnl1.h" @@ -1581,7 +1582,7 @@ hfcpci_bh(struct IsdnCardState *cs) /********************************/ /* called for card init message */ /********************************/ -static void +static void __init inithfcpci(struct IsdnCardState *cs) { cs->bcs[0].BC_SetStack = setstack_2b; @@ -1638,11 +1639,11 @@ hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg) /* this variable is used as card index when more than one cards are present */ -static struct pci_dev *dev_hfcpci __devinitdata = NULL; +static struct pci_dev *dev_hfcpci __initdata = NULL; #endif /* CONFIG_PCI */ -int __devinit +int __init setup_hfcpci(struct IsdnCard *card) { u_long flags; @@ -1687,7 +1688,7 @@ setup_hfcpci(struct IsdnCard *card) printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); return (0); } - cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start; + cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start; printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name); } else { printk(KERN_WARNING "HFC-PCI: No PCI card found\n"); @@ -1732,7 +1733,7 @@ setup_hfcpci(struct IsdnCard *card) cs->BC_Read_Reg = NULL; cs->BC_Write_Reg = NULL; cs->irq_func = &hfcpci_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer; cs->hw.hfcpci.timer.data = (long) cs; init_timer(&cs->hw.hfcpci.timer); diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index b5e571a52..262c44127 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c index 4e7f47287..86ab1c13f 100644 --- a/drivers/isdn/hisax/hfcscard.c +++ b/drivers/isdn/hisax/hfcscard.c @@ -139,7 +139,7 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg) } #ifdef __ISAPNP__ -static struct isapnp_device_id hfc_ids[] __devinitdata = { +static struct isapnp_device_id hfc_ids[] __initdata = { { ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114), (unsigned long) "Acer P10" }, @@ -164,11 +164,11 @@ static struct isapnp_device_id hfc_ids[] __devinitdata = { { 0, } }; -static struct isapnp_device_id *ipid __devinitdata = &hfc_ids[0]; +static struct isapnp_device_id *ipid __initdata = &hfc_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit +int __init setup_hfcs(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h index 75920aa0a..11fe537e2 100644 --- a/drivers/isdn/hisax/hisax.h +++ b/drivers/isdn/hisax/hisax.h @@ -6,6 +6,7 @@ * of the GNU General Public License, incorporated herein by reference. * */ +#include #include #include #include diff --git a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h index ceafecdb1..ba518a7a7 100644 --- a/drivers/isdn/hisax/hisax_debug.h +++ b/drivers/isdn/hisax/hisax_debug.h @@ -22,6 +22,7 @@ #ifndef __HISAX_DEBUG_H__ #define __HISAX_DEBUG_H__ +#include #ifdef CONFIG_HISAX_DEBUG diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 1d7cf3bd6..dbcca287e 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c @@ -725,11 +725,11 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) switch (adapter->type) { case AVM_FRITZ_PCIV2: - retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED, + retval = request_irq(adapter->irq, fcpci2_irq, SA_SHIRQ, "fcpcipnp", adapter); break; case AVM_FRITZ_PCI: - retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED, + retval = request_irq(adapter->irq, fcpci_irq, SA_SHIRQ, "fcpcipnp", adapter); break; case AVM_FRITZ_PNP: diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c index 2cf7b6656..c615752b9 100644 --- a/drivers/isdn/hisax/icc.c +++ b/drivers/isdn/hisax/icc.c @@ -24,10 +24,10 @@ #define DBUSY_TIMER_VALUE 80 #define ARCOFI_USE 0 -static char *ICCVer[] = +static char *ICCVer[] __initdata = {"2070 A1/A3", "2070 B1", "2070 B2/B3", "2070 V2.4"}; -void +void __init ICCVersion(struct IsdnCardState *cs, char *s) { int val; @@ -613,7 +613,7 @@ dbusy_timer_handler(struct IsdnCardState *cs) } } -void +void __init initicc(struct IsdnCardState *cs) { cs->setstack_d = setstack_icc; @@ -646,7 +646,7 @@ initicc(struct IsdnCardState *cs) ph_command(cs, ICC_CMD_DI); } -void +void __init clear_pending_icc_ints(struct IsdnCardState *cs) { int val, eval; diff --git a/drivers/isdn/hisax/icc.h b/drivers/isdn/hisax/icc.h index e7f593967..b3bb3d5de 100644 --- a/drivers/isdn/hisax/icc.h +++ b/drivers/isdn/hisax/icc.h @@ -65,7 +65,7 @@ #define ICC_IND_AIL 0xE #define ICC_IND_DC 0xF -extern void ICCVersion(struct IsdnCardState *cs, char *s); +extern void __init ICCVersion(struct IsdnCardState *cs, char *s); extern void initicc(struct IsdnCardState *cs); extern void icc_interrupt(struct IsdnCardState *cs, u_char val); extern void clear_pending_icc_ints(struct IsdnCardState *cs); diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c index 00afd5538..2e9afae12 100644 --- a/drivers/isdn/hisax/ipacx.c +++ b/drivers/isdn/hisax/ipacx.c @@ -10,6 +10,7 @@ * */ #include +#include #include #include "hisax_if.h" #include "hisax.h" @@ -38,8 +39,8 @@ static void dbusy_timer_handler(struct IsdnCardState *cs); static void dch_empty_fifo(struct IsdnCardState *cs, int count); static void dch_fill_fifo(struct IsdnCardState *cs); static inline void dch_int(struct IsdnCardState *cs); -static void dch_setstack(struct PStack *st, struct IsdnCardState *cs); -static void dch_init(struct IsdnCardState *cs); +static void __devinit dch_setstack(struct PStack *st, struct IsdnCardState *cs); +static void __devinit dch_init(struct IsdnCardState *cs); static void bch_l2l1(struct PStack *st, int pr, void *arg); static void bch_empty_fifo(struct BCState *bcs, int count); static void bch_fill_fifo(struct BCState *bcs); @@ -48,8 +49,8 @@ static void bch_mode(struct BCState *bcs, int mode, int bc); static void bch_close_state(struct BCState *bcs); static int bch_open_state(struct IsdnCardState *cs, struct BCState *bcs); static int bch_setstack(struct PStack *st, struct BCState *bcs); -static void bch_init(struct IsdnCardState *cs, int hscx); -static void clear_pending_ints(struct IsdnCardState *cs); +static void __devinit bch_init(struct IsdnCardState *cs, int hscx); +static void __init clear_pending_ints(struct IsdnCardState *cs); //---------------------------------------------------------- // Issue Layer 1 command to chip @@ -408,7 +409,7 @@ dch_int(struct IsdnCardState *cs) //---------------------------------------------------------- //---------------------------------------------------------- -static void +static void __devinit dch_setstack(struct PStack *st, struct IsdnCardState *cs) { st->l1.l1hw = dch_l2l1; @@ -416,7 +417,7 @@ dch_setstack(struct PStack *st, struct IsdnCardState *cs) //---------------------------------------------------------- //---------------------------------------------------------- -static void +static void __devinit dch_init(struct IsdnCardState *cs) { printk(KERN_INFO "HiSax: IPACX ISDN driver v0.1.0\n"); @@ -823,7 +824,7 @@ bch_setstack(struct PStack *st, struct BCState *bcs) //---------------------------------------------------------- //---------------------------------------------------------- -static void +static void __devinit bch_init(struct IsdnCardState *cs, int hscx) { cs->bcs[hscx].BC_SetStack = bch_setstack; @@ -861,7 +862,7 @@ interrupt_ipacx(struct IsdnCardState *cs) //---------------------------------------------------------- // Clears chip interrupt status //---------------------------------------------------------- -static void +static void __init clear_pending_ints(struct IsdnCardState *cs) { int ista; @@ -883,7 +884,7 @@ clear_pending_ints(struct IsdnCardState *cs) // Does chip configuration work // Work to do depends on bit mask in part //---------------------------------------------------------- -void +void __init init_ipacx(struct IsdnCardState *cs, int part) { if (part &1) { // initialise chip diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index 281fa27d9..c9917cd21 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c @@ -18,6 +18,7 @@ #include #include "hisax.h" #include "isdnl3.h" +#include const char *l3_revision = "$Revision: 2.22.2.3 $"; diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c index 715a1a8cd..33747afc9 100644 --- a/drivers/isdn/hisax/isurf.c +++ b/drivers/isdn/hisax/isurf.c @@ -196,10 +196,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) { } #ifdef __ISAPNP__ -static struct pnp_card *pnp_c __devinitdata = NULL; +static struct pnp_card *pnp_c __initdata = NULL; #endif -int __devinit +int __init setup_isurf(struct IsdnCard *card) { int ver; diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c index 39717506c..908a7e144 100644 --- a/drivers/isdn/hisax/ix1_micro.c +++ b/drivers/isdn/hisax/ix1_micro.c @@ -210,7 +210,7 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg) } #ifdef __ISAPNP__ -static struct isapnp_device_id itk_ids[] __devinitdata = { +static struct isapnp_device_id itk_ids[] __initdata = { { ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25), (unsigned long) "ITK micro 2" }, @@ -220,12 +220,12 @@ static struct isapnp_device_id itk_ids[] __devinitdata = { { 0, } }; -static struct isapnp_device_id *ipid __devinitdata = &itk_ids[0]; +static struct isapnp_device_id *ipid __initdata = &itk_ids[0]; static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit +int __init setup_ix1micro(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c index 43d61d1bc..2659fecc2 100644 --- a/drivers/isdn/hisax/jade.c +++ b/drivers/isdn/hisax/jade.c @@ -19,7 +19,7 @@ #include -int +int __init JadeVersion(struct IsdnCardState *cs, char *s) { int ver,i; @@ -253,7 +253,7 @@ setstack_jade(struct PStack *st, struct BCState *bcs) return (0); } -void +void __init clear_pending_jade_ints(struct IsdnCardState *cs) { int val; @@ -279,7 +279,7 @@ clear_pending_jade_ints(struct IsdnCardState *cs) cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0xF8); } -void +void __init initjade(struct IsdnCardState *cs) { cs->bcs[0].BC_SetStack = setstack_jade; diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index 99feae8b9..e96845cdd 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c @@ -23,6 +23,7 @@ #include "isdnl3.h" #include "l3dss1.h" #include +#include extern char *HiSax_getrev(const char *revision); static const char *dss1_revision = "$Revision: 2.32.2.3 $"; diff --git a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c index 8c8251959..fe11f226b 100644 --- a/drivers/isdn/hisax/mic.c +++ b/drivers/isdn/hisax/mic.c @@ -189,7 +189,7 @@ mic_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -int __devinit +int __init setup_mic(struct IsdnCard *card) { int bytecnt; diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c index 38f648f9b..47a47ef09 100644 --- a/drivers/isdn/hisax/netjet.c +++ b/drivers/isdn/hisax/netjet.c @@ -909,7 +909,7 @@ setstack_tiger(struct PStack *st, struct BCState *bcs) } -void +void __init inittiger(struct IsdnCardState *cs) { if (!(cs->bcs[0].hw.tiger.send = kmalloc(NETJET_DMA_TXSIZE * sizeof(unsigned int), diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 489022bde..68a2159cb 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c @@ -14,6 +14,7 @@ */ +#include #include #include "hisax.h" #include "isac.h" @@ -232,12 +233,12 @@ niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static struct pci_dev *niccy_dev __devinitdata = NULL; +static struct pci_dev *niccy_dev __initdata = NULL; #ifdef __ISAPNP__ static struct pnp_card *pnp_c __devinitdata = NULL; #endif -int __devinit +int __init setup_niccy(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; @@ -336,7 +337,7 @@ setup_niccy(struct IsdnCard *card) printk(KERN_WARNING "Niccy: No PCI card found\n"); return(0); } - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR; cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA; diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index 80025fd89..a7d3cd3f3 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c @@ -5,6 +5,7 @@ * */ +#include #include #include "hisax.h" #include "isac.h" @@ -148,9 +149,9 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static struct pci_dev *dev_netjet __devinitdata = NULL; +static struct pci_dev *dev_netjet __initdata = NULL; -int __devinit +int __init setup_netjet_s(struct IsdnCard *card) { int bytecnt,cfg; @@ -271,7 +272,7 @@ setup_netjet_s(struct IsdnCard *card) setup_isac(cs); cs->cardmsg = &NETjet_S_card_msg; cs->irq_func = &netjet_s_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; ISACVersion(cs, "NETjet-S:"); return (1); } diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index 37497162d..1ae7cac98 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c @@ -5,6 +5,7 @@ * */ +#include #include #include "hisax.h" #include "icc.h" @@ -128,9 +129,9 @@ NETjet_U_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static struct pci_dev *dev_netjet __devinitdata = NULL; +static struct pci_dev *dev_netjet __initdata = NULL; -int __devinit +int __init setup_netjet_u(struct IsdnCard *card) { int bytecnt; @@ -237,7 +238,7 @@ setup_netjet_u(struct IsdnCard *card) cs->BC_Send_Data = &netjet_fill_dma; cs->cardmsg = &NETjet_U_card_msg; cs->irq_func = &netjet_u_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; ICCVersion(cs, "NETspider-U:"); return (1); } diff --git a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c index aacbf0d14..abecabf8c 100644 --- a/drivers/isdn/hisax/q931.c +++ b/drivers/isdn/hisax/q931.c @@ -1402,12 +1402,12 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir) } /* No, locate it in the table */ if (cset == 0) { - for (i = 0; i < IESIZE_NI1; i++) + for (i = 0; i < IESIZE; i++) if (*buf == ielist_ni1[i].nr) break; /* When not found, give appropriate msg */ - if (i != IESIZE_NI1) { + if (i != IESIZE) { dp += sprintf(dp, " %s\n", ielist_ni1[i].descr); dp += ielist_ni1[i].f(dp, buf); } else diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c index e76042d32..7b63085ea 100644 --- a/drivers/isdn/hisax/s0box.c +++ b/drivers/isdn/hisax/s0box.c @@ -211,7 +211,7 @@ S0Box_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -int __devinit +int __init setup_s0box(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c index d943d3658..821776e15 100644 --- a/drivers/isdn/hisax/saphir.c +++ b/drivers/isdn/hisax/saphir.c @@ -241,7 +241,7 @@ saphir_card_msg(struct IsdnCardState *cs, int mt, void *arg) } -int __devinit +int __init setup_saphir(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 8d8e8a299..8c044a6a7 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c @@ -39,6 +39,7 @@ */ #include +#include #include "hisax.h" #include "isac.h" #include "ipac.h" @@ -632,7 +633,7 @@ setup_sedlbauer(struct IsdnCard *card) printk(KERN_WARNING "Sedlbauer: No PCI card found\n"); return(0); } - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; cs->hw.sedl.bus = SEDL_BUS_PCI; sub_vendor_id = dev_sedl->subsystem_vendor; sub_id = dev_sedl->subsystem_device; @@ -809,7 +810,7 @@ ready: cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX; cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; } else { cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR; cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC; diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index f9c14a297..9bb18f3f7 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c @@ -164,7 +164,7 @@ static int sedlbauer_probe(struct pcmcia_device *link) link->priv = local; /* Interrupt setup */ - link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; + link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; link->irq.IRQInfo1 = IRQ_LEVEL_ID; link->irq.Handler = NULL; diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index a49b694eb..cdf35dc56 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.c @@ -184,7 +184,7 @@ Sportster_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static int __devinit +static int __init get_io_range(struct IsdnCardState *cs) { int i, j, adr; @@ -209,7 +209,7 @@ get_io_range(struct IsdnCardState *cs) } } -int __devinit +int __init setup_sportster(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h index 04416bad6..9ffaae7c6 100644 --- a/drivers/isdn/hisax/st5481.h +++ b/drivers/isdn/hisax/st5481.h @@ -13,6 +13,7 @@ #ifndef _ST5481_H_ #define _ST5481_H_ +#include // USB IDs, the Product Id is in the range 0x4810-0x481F diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 2716aa5c6..99cb0f3d5 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c @@ -24,6 +24,7 @@ * clean up debug */ +#include #include #include #include diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c index e94dc6f5b..a2b1816af 100644 --- a/drivers/isdn/hisax/teleint.c +++ b/drivers/isdn/hisax/teleint.c @@ -261,7 +261,7 @@ TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -int __devinit +int __init setup_TeleInt(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c index f94af0930..2b7df8f98 100644 --- a/drivers/isdn/hisax/teles0.c +++ b/drivers/isdn/hisax/teles0.c @@ -265,7 +265,7 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -int __devinit +int __init setup_teles0(struct IsdnCard *card) { u_char val; diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 5cb712437..a3eaf4d65 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c @@ -369,7 +369,6 @@ setup_teles3(struct IsdnCard *card) cs->hw.teles3.hscx[1] + 96); return (0); } - cs->irq_flags |= IRQF_SHARED; /* cardbus can share */ } else { if (cs->hw.teles3.cfg_reg) { if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) { diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index dca446865..e2bb4fd8e 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c @@ -13,6 +13,7 @@ */ #include +#include #include "hisax.h" #include "isac.h" #include "hscx.h" @@ -284,9 +285,9 @@ TelesPCI_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); } -static struct pci_dev *dev_tel __devinitdata = NULL; +static struct pci_dev *dev_tel __initdata = NULL; -int __devinit +int __init setup_telespci(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; @@ -310,9 +311,8 @@ setup_telespci(struct IsdnCard *card) } cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0), PAGE_SIZE); - printk(KERN_INFO "Found: Zoran, base-address: 0x%llx, irq: 0x%x\n", - (unsigned long long)pci_resource_start(dev_tel, 0), - dev_tel->irq); + printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n", + pci_resource_start(dev_tel, 0), dev_tel->irq); } else { printk(KERN_WARNING "TelesPCI: No PCI card found\n"); return(0); @@ -347,7 +347,7 @@ setup_telespci(struct IsdnCard *card) cs->BC_Send_Data = &hscx_fill_fifo; cs->cardmsg = &TelesPCI_card_msg; cs->irq_func = &telespci_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; ISACVersion(cs, "TelesPCI:"); if (HscxVersion(cs, "TelesPCI:")) { printk(KERN_WARNING diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 0595293b8..0352ee5f7 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c @@ -10,6 +10,7 @@ * */ +#include #include #include "hisax.h" #include "w6692.h" @@ -44,11 +45,11 @@ static const char *w6692_revision = "$Revision: 1.18.2.4 $"; #define DBUSY_TIMER_VALUE 80 -static char *W6692Ver[] = +static char *W6692Ver[] __initdata = {"W6692 V00", "W6692 V01", "W6692 V10", "W6692 V11"}; -static void +static void __init W6692Version(struct IsdnCardState *cs, char *s) { int val; @@ -897,7 +898,7 @@ static void resetW6692(struct IsdnCardState *cs) } } -static void initW6692(struct IsdnCardState *cs, int part) +static void __init initW6692(struct IsdnCardState *cs, int part) { if (part & 1) { cs->setstack_d = setstack_W6692; @@ -992,9 +993,9 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg) static int id_idx ; -static struct pci_dev *dev_w6692 __devinitdata = NULL; +static struct pci_dev *dev_w6692 __initdata = NULL; -int __devinit +int __init setup_w6692(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; @@ -1080,7 +1081,7 @@ setup_w6692(struct IsdnCard *card) cs->BC_Send_Data = &W6692B_fill_fifo; cs->cardmsg = &w6692_card_msg; cs->irq_func = &W6692_interrupt; - cs->irq_flags |= IRQF_SHARED; + cs->irq_flags |= SA_SHIRQ; W6692Version(cs, "W6692:"); printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA)); printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK)); diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c index 73afebdf8..48d134be9 100644 --- a/drivers/isdn/hysdn/boardergo.c +++ b/drivers/isdn/hysdn/boardergo.c @@ -14,6 +14,7 @@ * */ +#include #include #include #include @@ -435,7 +436,7 @@ ergo_inithardware(hysdn_card * card) } ergo_stopcard(card); /* disable interrupts */ - if (request_irq(card->irq, ergo_interrupt, IRQF_SHARED, "HYSDN", card)) { + if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) { ergo_releasehardware(card); /* return the acquired hardware */ return (-1); } diff --git a/drivers/isdn/hysdn/hysdn_defs.h b/drivers/isdn/hysdn/hysdn_defs.h index 461e83159..3a9b29b38 100644 --- a/drivers/isdn/hysdn/hysdn_defs.h +++ b/drivers/isdn/hysdn/hysdn_defs.h @@ -14,6 +14,7 @@ #ifndef HYSDN_DEFS_H #define HYSDN_DEFS_H +#include #include #include #include diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c index b702ed272..b75ac5af2 100644 --- a/drivers/isdn/hysdn/hysdn_init.c +++ b/drivers/isdn/hysdn/hysdn_init.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c index 1c0d54ac1..133032920 100644 --- a/drivers/isdn/hysdn/hysdn_sched.c +++ b/drivers/isdn/hysdn/hysdn_sched.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 69aee2602..22759c017 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -339,16 +340,6 @@ isdn_command(isdn_ctrl *cmd) printk(KERN_WARNING "isdn_command command(%x) driver -1\n", cmd->command); return(1); } - if (!dev->drv[cmd->driver]) { - printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d] NULL\n", - cmd->command, cmd->driver); - return(1); - } - if (!dev->drv[cmd->driver]->interface) { - printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d]->interface NULL\n", - cmd->command, cmd->driver); - return(1); - } if (cmd->command == ISDN_CMD_SETL2) { int idx = isdn_dc2minor(cmd->driver, cmd->arg & 255); unsigned long l2prot = (cmd->arg >> 8) & 255; @@ -942,7 +933,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) count_put = count_pull; if(count_put > 1) tty_insert_flip_string(tty, skb->data, count_put - 1); - last = skb->data[count_put - 1]; + last = skb->data[count_put] - 1; len -= count_put; #ifdef CONFIG_ISDN_AUDIO } @@ -1059,7 +1050,7 @@ isdn_info_update(void) static ssize_t isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) { - uint minor = iminor(file->f_dentry->d_inode); + uint minor = MINOR(file->f_dentry->d_inode->i_rdev); int len = 0; int drvidx; int chidx; @@ -1134,12 +1125,9 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) if (dev->drv[drvidx]->interface->readstat) { if (count > dev->drv[drvidx]->stavail) count = dev->drv[drvidx]->stavail; - len = dev->drv[drvidx]->interface->readstat(buf, count, - drvidx, isdn_minor2chan(minor)); - if (len < 0) { - retval = len; - goto out; - } + len = dev->drv[drvidx]->interface-> + readstat(buf, count, drvidx, + isdn_minor2chan(minor)); } else { len = 0; } @@ -1166,7 +1154,7 @@ isdn_read(struct file *file, char __user *buf, size_t count, loff_t * off) static ssize_t isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off) { - uint minor = iminor(file->f_dentry->d_inode); + uint minor = MINOR(file->f_dentry->d_inode->i_rdev); int drvidx; int chidx; int retval; @@ -1189,8 +1177,9 @@ isdn_write(struct file *file, const char __user *buf, size_t count, loff_t * off goto out; } chidx = isdn_minor2chan(minor); - while ((retval = isdn_writebuf_stub(drvidx, chidx, buf, count)) == 0) + while (isdn_writebuf_stub(drvidx, chidx, buf, count) != count) interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); + retval = count; goto out; } if (minor <= ISDN_MINOR_CTRLMAX) { @@ -1228,7 +1217,7 @@ static unsigned int isdn_poll(struct file *file, poll_table * wait) { unsigned int mask = 0; - unsigned int minor = iminor(file->f_dentry->d_inode); + unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev); int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); lock_kernel(); @@ -1269,7 +1258,7 @@ isdn_poll(struct file *file, poll_table * wait) static int isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) { - uint minor = iminor(inode); + uint minor = MINOR(inode->i_rdev); isdn_ctrl c; int drvidx; int chidx; @@ -1720,7 +1709,7 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) static int isdn_open(struct inode *ino, struct file *filep) { - uint minor = iminor(ino); + uint minor = MINOR(ino->i_rdev); int drvidx; int chidx; int retval = -ENODEV; @@ -1782,7 +1771,7 @@ isdn_open(struct inode *ino, struct file *filep) static int isdn_close(struct inode *ino, struct file *filep) { - uint minor = iminor(ino); + uint minor = MINOR(ino->i_rdev); lock_kernel(); if (minor == ISDN_MINOR_STATUS) { @@ -1915,11 +1904,6 @@ isdn_free_channel(int di, int ch, int usage) { int i; - if ((di < 0) || (ch < 0)) { - printk(KERN_WARNING "%s: called with invalid drv(%d) or channel(%d)\n", - __FUNCTION__, di, ch); - return; - } for (i = 0; i < ISDN_MAX_CHANNELS; i++) if (((!usage) || ((dev->usage[i] & ISDN_USAGE_MASK) == usage)) && (dev->drvmap[i] == di) && @@ -1935,8 +1919,7 @@ isdn_free_channel(int di, int ch, int usage) dev->v110[i] = NULL; // 20.10.99 JIM, try to reinitialize v110 ! isdn_info_update(); - if (dev->drv[di]) - skb_queue_purge(&dev->drv[di]->rpqueue[ch]); + skb_queue_purge(&dev->drv[di]->rpqueue[ch]); } } @@ -1968,10 +1951,9 @@ isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len) struct sk_buff *skb = alloc_skb(hl + len, GFP_ATOMIC); if (!skb) - return -ENOMEM; + return 0; skb_reserve(skb, hl); - if (copy_from_user(skb_put(skb, len), buf, len)) - return -EFAULT; + copy_from_user(skb_put(skb, len), buf, len); ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); if (ret <= 0) dev_kfree_skb(skb); diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 43da8ae1b..96c115e13 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c @@ -22,6 +22,7 @@ * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt */ +#include #include #include #include diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 119412d6b..918742271 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -667,7 +668,7 @@ isdn_ppp_poll(struct file *file, poll_table * wait) if (is->debug & 0x2) printk(KERN_DEBUG "isdn_ppp_poll: minor: %d\n", - iminor(file->f_dentry->d_inode)); + MINOR(file->f_dentry->d_inode->i_rdev)); /* just registers wait_queue hook. This doesn't really wait. */ poll_wait(file, &is->wq, wait); diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 9ab66e896..2ac90242d 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -11,6 +11,7 @@ */ #undef ISDN_TTY_STAT_DEBUG +#include #include #include #include "isdn_common.h" @@ -81,7 +82,7 @@ isdn_tty_try_read(modem_info * info, struct sk_buff *skb) int l = skb->len; unsigned char *dp = skb->data; while (--l) { - if (*dp == DLE) + if (*skb->data == DLE) tty_insert_flip_char(tty, DLE, 0); tty_insert_flip_char(tty, *dp++, 0); } @@ -1889,13 +1890,14 @@ isdn_tty_modem_init(void) if (!m->tty_modem) return -ENOMEM; m->tty_modem->name = "ttyI"; + m->tty_modem->devfs_name = "isdn/ttyI"; m->tty_modem->major = ISDN_TTY_MAJOR; m->tty_modem->minor_start = 0; m->tty_modem->type = TTY_DRIVER_TYPE_SERIAL; m->tty_modem->subtype = SERIAL_TYPE_NORMAL; m->tty_modem->init_termios = tty_std_termios; m->tty_modem->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; - m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; m->tty_modem->driver_name = "isdn_tty"; tty_set_operations(m->tty_modem, &modem_ops); retval = tty_register_driver(m->tty_modem); diff --git a/drivers/isdn/i4l/isdn_tty.h b/drivers/isdn/i4l/isdn_tty.h index 692c74d6b..9f0fa9501 100644 --- a/drivers/isdn/i4l/isdn_tty.h +++ b/drivers/isdn/i4l/isdn_tty.h @@ -10,6 +10,7 @@ * */ +#include #define DLE 0x10 #define ETX 0x03 diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c index 8b3efc243..743ac4077 100644 --- a/drivers/isdn/i4l/isdn_x25iface.c +++ b/drivers/isdn/i4l/isdn_x25iface.c @@ -208,7 +208,7 @@ static int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb */ static int isdn_x25iface_connect_ind(struct concap_proto *cprot) { - struct sk_buff * skb; + struct sk_buff * skb = dev_alloc_skb(1); enum wan_states *state_p = &( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state); IX25DEBUG( "isdn_x25iface_connect_ind %s \n" @@ -220,8 +220,6 @@ static int isdn_x25iface_connect_ind(struct concap_proto *cprot) return -1; } *state_p = WAN_CONNECTED; - - skb = dev_alloc_skb(1); if( skb ){ *( skb_put(skb, 1) ) = 0x01; skb->protocol = x25_type_trans(skb, cprot->net_dev); diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c index 730bbd07e..6649f8bc9 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c @@ -1010,8 +1010,7 @@ icn_readstatus(u_char __user *buf, int len, icn_card * card) for (p = buf, count = 0; count < len; p++, count++) { if (card->msg_buf_read == card->msg_buf_write) return count; - if (put_user(*card->msg_buf_read++, p)) - return -EFAULT; + put_user(*card->msg_buf_read++, p); if (card->msg_buf_read > card->msg_buf_end) card->msg_buf_read = card->msg_buf; } diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index 9a66524f1..a67d31af7 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -451,8 +452,7 @@ isdnloop_readstatus(u_char __user *buf, int len, isdnloop_card * card) for (p = buf, count = 0; count < len; p++, count++) { if (card->msg_buf_read == card->msg_buf_write) return count; - if (put_user(*card->msg_buf_read++, p)) - return -EFAULT; + put_user(*card->msg_buf_read++, p); if (card->msg_buf_read > card->msg_buf_end) card->msg_buf_read = card->msg_buf; } diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c index 6ead5e150..94f21486b 100644 --- a/drivers/isdn/pcbit/drv.c +++ b/drivers/isdn/pcbit/drv.c @@ -725,27 +725,23 @@ static int pcbit_stat(u_char __user *buf, int len, int driver, int channel) if (stat_st < stat_end) { - if (copy_to_user(buf, statbuf + stat_st, len)) - return -EFAULT; + copy_to_user(buf, statbuf + stat_st, len); stat_st += len; } else { if (len > STATBUF_LEN - stat_st) { - if (copy_to_user(buf, statbuf + stat_st, - STATBUF_LEN - stat_st)) - return -EFAULT; - if (copy_to_user(buf, statbuf, - len - (STATBUF_LEN - stat_st))) - return -EFAULT; + copy_to_user(buf, statbuf + stat_st, + STATBUF_LEN - stat_st); + copy_to_user(buf, statbuf, + len - (STATBUF_LEN - stat_st)); stat_st = len - (STATBUF_LEN - stat_st); } else { - if (copy_to_user(buf, statbuf + stat_st, len)) - return -EFAULT; + copy_to_user(buf, statbuf + stat_st, len); stat_st += len; diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index a627e6802..62b7acfad 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c @@ -342,7 +342,7 @@ static int __init sc_init(void) */ sc_adapter[cinst]->interrupt = irq[b]; if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler, - IRQF_DISABLED, interface->id, NULL)) + SA_INTERRUPT, interface->id, NULL)) { kfree(sc_adapter[cinst]->channel); indicate_status(cinst, ISDN_STAT_UNLOAD, 0, NULL); /* Fix me */ diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 57c4ab96d..f4f71226a 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c @@ -97,7 +97,6 @@ int sc_ioctl(int card, scs_ioctl *data) case SCIOCSTART: { - kfree(rcvmsg); pr_debug("%s: SCIOSTART: ioctl received\n", sc_adapter[card]->devicename); if(sc_adapter[card]->EngineUp) { diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 9c39b98d5..626506234 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -63,19 +63,6 @@ config LEDS_S3C24XX This option enables support for LEDs connected to GPIO lines on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440. -config LEDS_AMS_DELTA - tristate "LED Support for the Amstrad Delta (E3)" - depends LEDS_CLASS && MACH_AMS_DELTA - help - This option enables support for the LEDs on Amstrad Delta (E3). - -config LEDS_NET48XX - tristate "LED Support for Soekris net48xx series Error LED" - depends on LEDS_CLASS && SCx200_GPIO - help - This option enables support for the Soekris net4801 and net4826 error - LED. - comment "LED Triggers" config LEDS_TRIGGERS @@ -100,14 +87,5 @@ config LEDS_TRIGGER_IDE_DISK This allows LEDs to be controlled by IDE disk activity. If unsure, say Y. -config LEDS_TRIGGER_HEARTBEAT - tristate "LED Heartbeat Trigger" - depends LEDS_TRIGGERS - help - This allows LEDs to be controlled by a CPU load average. - The flash frequency is a hyperbolic function of the 1-minute - load average. - If unsure, say Y. - endmenu diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 6aa2aed75..40f042633 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -11,10 +11,7 @@ obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o obj-$(CONFIG_LEDS_IXP4XX) += leds-ixp4xx-gpio.o obj-$(CONFIG_LEDS_TOSA) += leds-tosa.o obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o -obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o -obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK) += ledtrig-ide-disk.o -obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT) += ledtrig-heartbeat.o diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index d424b4452..c75d0ef16 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index 9b015f9af..fe6541326 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c @@ -18,7 +18,7 @@ #include #include "leds.h" -DEFINE_RWLOCK(leds_list_lock); +rwlock_t leds_list_lock = RW_LOCK_UNLOCKED; LIST_HEAD(leds_list); EXPORT_SYMBOL_GPL(leds_list); diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index 47f0ff196..5e2cd8be1 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -25,7 +26,7 @@ /* * Nests outside led_cdev->trigger_lock */ -static DEFINE_RWLOCK(triggers_list_lock); +static rwlock_t triggers_list_lock = RW_LOCK_UNLOCKED; static LIST_HEAD(trigger_list); ssize_t led_trigger_store(struct class_device *dev, const char *buf, diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c deleted file mode 100644 index 599878c8e..000000000 --- a/drivers/leds/leds-ams-delta.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * LEDs driver for Amstrad Delta (E3) - * - * Copyright (C) 2006 Jonathan McDowell - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include - -/* - * Our context - */ -struct ams_delta_led { - struct led_classdev cdev; - u8 bitmask; -}; - -static void ams_delta_led_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - struct ams_delta_led *led_dev = - container_of(led_cdev, struct ams_delta_led, cdev); - - if (value) - ams_delta_latch1_write(led_dev->bitmask, led_dev->bitmask); - else - ams_delta_latch1_write(led_dev->bitmask, 0); -} - -static struct ams_delta_led ams_delta_leds[] = { - { - .cdev = { - .name = "ams-delta:camera", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_CAMERA, - }, - { - .cdev = { - .name = "ams-delta:advert", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_ADVERT, - }, - { - .cdev = { - .name = "ams-delta:email", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_EMAIL, - }, - { - .cdev = { - .name = "ams-delta:handsfree", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_HANDSFREE, - }, - { - .cdev = { - .name = "ams-delta:voicemail", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_VOICEMAIL, - }, - { - .cdev = { - .name = "ams-delta:voice", - .brightness_set = ams_delta_led_set, - }, - .bitmask = AMS_DELTA_LATCH1_LED_VOICE, - }, -}; - -#ifdef CONFIG_PM -static int ams_delta_led_suspend(struct platform_device *dev, - pm_message_t state) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) - led_classdev_suspend(&ams_delta_leds[i].cdev); - - return 0; -} - -static int ams_delta_led_resume(struct platform_device *dev) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(ams_delta_leds); i++) - led_classdev_resume(&ams_delta_leds[i].cdev); - - return 0; -} -#else -#define ams_delta_led_suspend NULL -#define ams_delta_led_resume NULL -#endif - -static int ams_delta_led_probe(struct platform_device *pdev) -{ - int i; - int ret; - - for (i = ret = 0; ret >= 0 && i < ARRAY_SIZE(ams_delta_leds); i++) { - ret = led_classdev_register(&pdev->dev, - &ams_delta_leds[i].cdev); - } - - if (ret < 0 && i > 1) { - for (i = i - 2; i >= 0; i--) - led_classdev_unregister(&ams_delta_leds[i].cdev); - } - - return ret; -} - -static int ams_delta_led_remove(struct platform_device *pdev) -{ - int i; - - for (i = ARRAY_SIZE(ams_delta_leds) - 1; i >= 0; i--) - led_classdev_unregister(&ams_delta_leds[i].cdev); - - return 0; -} - -static struct platform_driver ams_delta_led_driver = { - .probe = ams_delta_led_probe, - .remove = ams_delta_led_remove, - .suspend = ams_delta_led_suspend, - .resume = ams_delta_led_resume, - .driver = { - .name = "ams-delta-led", - }, -}; - -static int __init ams_delta_led_init(void) -{ - return platform_driver_register(&ams_delta_led_driver); -} - -static void __exit ams_delta_led_exit(void) -{ - return platform_driver_unregister(&ams_delta_led_driver); -} - -module_init(ams_delta_led_init); -module_exit(ams_delta_led_exit); - -MODULE_AUTHOR("Jonathan McDowell "); -MODULE_DESCRIPTION("Amstrad Delta LED driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c index cf1dcd719..bb7d84df0 100644 --- a/drivers/leds/leds-corgi.c +++ b/drivers/leds/leds-corgi.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/leds/leds-ixp4xx-gpio.c b/drivers/leds/leds-ixp4xx-gpio.c index 7dcf0b92c..30ced150e 100644 --- a/drivers/leds/leds-ixp4xx-gpio.c +++ b/drivers/leds/leds-ixp4xx-gpio.c @@ -31,6 +31,7 @@ * */ +#include #include #include #include diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c index 3b87951aa..749a86c2a 100644 --- a/drivers/leds/leds-locomo.c +++ b/drivers/leds/leds-locomo.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -44,13 +45,11 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev, static struct led_classdev locomo_led0 = { .name = "locomo:amber", - .default_trigger = "sharpsl-charge", .brightness_set = locomoled_brightness_set0, }; static struct led_classdev locomo_led1 = { .name = "locomo:green", - .default_trigger = "nand-disk", .brightness_set = locomoled_brightness_set1, }; diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c deleted file mode 100644 index 713c4a8aa..000000000 --- a/drivers/leds/leds-net48xx.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * LEDs driver for Soekris net48xx - * - * Copyright (C) 2006 Chris Boot - * - * Based on leds-ams-delta.c - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include - -#define DRVNAME "net48xx-led" -#define NET48XX_ERROR_LED_GPIO 20 - -static struct platform_device *pdev; - -static void net48xx_error_led_set(struct led_classdev *led_cdev, - enum led_brightness value) -{ - if (value) - scx200_gpio_set_high(NET48XX_ERROR_LED_GPIO); - else - scx200_gpio_set_low(NET48XX_ERROR_LED_GPIO); -} - -static struct led_classdev net48xx_error_led = { - .name = "net48xx:error", - .brightness_set = net48xx_error_led_set, -}; - -#ifdef CONFIG_PM -static int net48xx_led_suspend(struct platform_device *dev, - pm_message_t state) -{ - led_classdev_suspend(&net48xx_error_led); - return 0; -} - -static int net48xx_led_resume(struct platform_device *dev) -{ - led_classdev_resume(&net48xx_error_led); - return 0; -} -#else -#define net48xx_led_suspend NULL -#define net48xx_led_resume NULL -#endif - -static int net48xx_led_probe(struct platform_device *pdev) -{ - return led_classdev_register(&pdev->dev, &net48xx_error_led); -} - -static int net48xx_led_remove(struct platform_device *pdev) -{ - led_classdev_unregister(&net48xx_error_led); - return 0; -} - -static struct platform_driver net48xx_led_driver = { - .probe = net48xx_led_probe, - .remove = net48xx_led_remove, - .suspend = net48xx_led_suspend, - .resume = net48xx_led_resume, - .driver = { - .name = DRVNAME, - .owner = THIS_MODULE, - }, -}; - -static int __init net48xx_led_init(void) -{ - int ret; - - if (!scx200_gpio_present()) { - ret = -ENODEV; - goto out; - } - - ret = platform_driver_register(&net48xx_led_driver); - if (ret < 0) - goto out; - - pdev = platform_device_register_simple(DRVNAME, -1, NULL, 0); - if (IS_ERR(pdev)) { - ret = PTR_ERR(pdev); - platform_driver_unregister(&net48xx_led_driver); - goto out; - } - -out: - return ret; -} - -static void __exit net48xx_led_exit(void) -{ - platform_device_unregister(pdev); - platform_driver_unregister(&net48xx_led_driver); -} - -module_init(net48xx_led_init); -module_exit(net48xx_led_exit); - -MODULE_AUTHOR("Chris Boot "); -MODULE_DESCRIPTION("Soekris net48xx LED driver"); -MODULE_LICENSE("GPL"); - diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index fb1edc1c9..650cf72dc 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c index 126d09cc9..65bbef4a5 100644 --- a/drivers/leds/leds-spitz.c +++ b/drivers/leds/leds-spitz.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c index fb2416a38..c9e8cc1ec 100644 --- a/drivers/leds/leds-tosa.c +++ b/drivers/leds/leds-tosa.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c deleted file mode 100644 index 4bf8cec8b..000000000 --- a/drivers/leds/ledtrig-heartbeat.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * LED Heartbeat Trigger - * - * Copyright (C) 2006 Atsushi Nemoto - * - * Based on Richard Purdie's ledtrig-timer.c and some arch's - * CONFIG_HEARTBEAT code. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include -#include -#include "leds.h" - -struct heartbeat_trig_data { - unsigned int phase; - unsigned int period; - struct timer_list timer; -}; - -static void led_heartbeat_function(unsigned long data) -{ - struct led_classdev *led_cdev = (struct led_classdev *) data; - struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; - unsigned long brightness = LED_OFF; - unsigned long delay = 0; - - /* acts like an actual heart beat -- ie thump-thump-pause... */ - switch (heartbeat_data->phase) { - case 0: - /* - * The hyperbolic function below modifies the - * heartbeat period length in dependency of the - * current (1min) load. It goes through the points - * f(0)=1260, f(1)=860, f(5)=510, f(inf)->300. - */ - heartbeat_data->period = 300 + - (6720 << FSHIFT) / (5 * avenrun[0] + (7 << FSHIFT)); - heartbeat_data->period = - msecs_to_jiffies(heartbeat_data->period); - delay = msecs_to_jiffies(70); - heartbeat_data->phase++; - brightness = LED_FULL; - break; - case 1: - delay = heartbeat_data->period / 4 - msecs_to_jiffies(70); - heartbeat_data->phase++; - break; - case 2: - delay = msecs_to_jiffies(70); - heartbeat_data->phase++; - brightness = LED_FULL; - break; - default: - delay = heartbeat_data->period - heartbeat_data->period / 4 - - msecs_to_jiffies(70); - heartbeat_data->phase = 0; - break; - } - - led_set_brightness(led_cdev, brightness); - mod_timer(&heartbeat_data->timer, jiffies + delay); -} - -static void heartbeat_trig_activate(struct led_classdev *led_cdev) -{ - struct heartbeat_trig_data *heartbeat_data; - - heartbeat_data = kzalloc(sizeof(*heartbeat_data), GFP_KERNEL); - if (!heartbeat_data) - return; - - led_cdev->trigger_data = heartbeat_data; - setup_timer(&heartbeat_data->timer, - led_heartbeat_function, (unsigned long) led_cdev); - heartbeat_data->phase = 0; - led_heartbeat_function(heartbeat_data->timer.data); -} - -static void heartbeat_trig_deactivate(struct led_classdev *led_cdev) -{ - struct heartbeat_trig_data *heartbeat_data = led_cdev->trigger_data; - - if (heartbeat_data) { - del_timer_sync(&heartbeat_data->timer); - kfree(heartbeat_data); - } -} - -static struct led_trigger heartbeat_led_trigger = { - .name = "heartbeat", - .activate = heartbeat_trig_activate, - .deactivate = heartbeat_trig_deactivate, -}; - -static int __init heartbeat_trig_init(void) -{ - return led_trigger_register(&heartbeat_led_trigger); -} - -static void __exit heartbeat_trig_exit(void) -{ - led_trigger_unregister(&heartbeat_led_trigger); -} - -module_init(heartbeat_trig_init); -module_exit(heartbeat_trig_exit); - -MODULE_AUTHOR("Atsushi Nemoto "); -MODULE_DESCRIPTION("Heartbeat LED trigger"); -MODULE_LICENSE("GPL"); diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c index 179c2876b..fbf141ef4 100644 --- a/drivers/leds/ledtrig-timer.c +++ b/drivers/leds/ledtrig-timer.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index d5d649f5c..12ad46273 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -78,27 +78,6 @@ config ADB_PMU this device; you should do so if your machine is one of those mentioned above. -config ADB_PMU_LED - bool "Support for the Power/iBook front LED" - depends on ADB_PMU - select NEW_LEDS - select LEDS_CLASS - help - Support the front LED on Power/iBooks as a generic LED that can - be triggered by any of the supported triggers. To get the - behaviour of the old CONFIG_BLK_DEV_IDE_PMAC_BLINK, select this - and the ide-disk LED trigger and configure appropriately through - sysfs. - -config ADB_PMU_LED_IDE - bool "Use front LED as IDE LED by default" - depends on ADB_PMU_LED - select LEDS_TRIGGERS - select LEDS_TRIGGER_IDE_DISK - help - This option makes the front LED default to the IDE trigger - so that it blinks on IDE activity. - config PMAC_SMU bool "Support for SMU based PowerMacs" depends on PPC_PMAC64 @@ -109,7 +88,7 @@ config PMAC_SMU config PMAC_APM_EMU tristate "APM emulation" - depends on PPC_PMAC && PPC32 && PM && ADB_PMU + depends on PPC_PMAC && PPC32 && PM config PMAC_MEDIABAY bool "Support PowerBook hotswap media bay" @@ -120,23 +99,17 @@ config PMAC_MEDIABAY devices are not fully supported in the bay as I never had one to try with +# made a separate option since backlight may end up beeing used +# on non-powerbook machines (but only on PMU based ones AFAIK) config PMAC_BACKLIGHT bool "Backlight control for LCD screens" - depends on ADB_PMU && FB = y && (BROKEN || !PPC64) - select FB_BACKLIGHT - help - Say Y here to enable Macintosh specific extensions of the generic - backlight code. With this enabled, the brightness keys on older - PowerBooks will be enabled so you can change the screen brightness. - Newer models should use an userspace daemon like pbbuttonsd. - -config PMAC_BACKLIGHT_LEGACY - bool "Provide legacy ioctl's on /dev/pmu for the backlight" - depends on PMAC_BACKLIGHT && (BROKEN || !PPC64) + depends on ADB_PMU && (BROKEN || !PPC64) help - Say Y if you want to enable legacy ioctl's on /dev/pmu. This is for - programs which use this old interface. New and updated programs - should use the backlight classes in sysfs. + Say Y here to build in code to manage the LCD backlight on a + Macintosh PowerBook. With this code, the backlight will be turned + on and off appropriately on power-management and lid-open/lid-closed + events; also, the PowerBook button device will be enabled so you can + change the screen brightness. config ADB_MACIO bool "Include MacIO (CHRP) ADB driver" @@ -198,7 +171,6 @@ config THERM_PM72 config WINDFARM tristate "New PowerMac thermal control infrastructure" - depends on PPC config WINDFARM_PM81 tristate "Support for thermal management on iMac G5" diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile index b53d45f87..6081acdea 100644 --- a/drivers/macintosh/Makefile +++ b/drivers/macintosh/Makefile @@ -11,9 +11,7 @@ obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_ANSLCD) += ans-lcd.o -obj-$(CONFIG_ADB_PMU) += via-pmu.o via-pmu-event.o -obj-$(CONFIG_ADB_PMU_LED) += via-pmu-led.o -obj-$(CONFIG_PMAC_BACKLIGHT) += via-pmu-backlight.o +obj-$(CONFIG_ADB_PMU) += via-pmu.o obj-$(CONFIG_ADB_CUDA) += via-cuda.o obj-$(CONFIG_PMAC_APM_EMU) += apm_emu.o obj-$(CONFIG_PMAC_SMU) += smu.o diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 360f93f6f..259fd8973 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -16,6 +16,7 @@ * - move bus probe to a kernel thread */ +#include #include #include #include @@ -35,6 +36,7 @@ #include #include #include +#include #include #include @@ -902,6 +904,8 @@ adbdev_init(void) return; } + devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); + adb_dev_class = class_create(THIS_MODULE, "adb"); if (IS_ERR(adb_dev_class)) return; diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index c69d23bb2..394334ec5 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -34,6 +34,7 @@ * Move to syfs */ +#include #include #include #include @@ -45,11 +46,14 @@ #include #include -#include #ifdef CONFIG_PPC_PMAC #include #endif +#ifdef CONFIG_PMAC_BACKLIGHT +#include +#endif + MODULE_AUTHOR("Franz Sirl "); #define KEYB_KEYREG 0 /* register # for key up/down data */ @@ -175,7 +179,7 @@ u8 adb_to_linux_keycodes[128] = { /* 0x65 */ KEY_F9, /* 67 */ /* 0x66 */ KEY_HANJA, /* 123 */ /* 0x67 */ KEY_F11, /* 87 */ - /* 0x68 */ KEY_HANGEUL, /* 122 */ + /* 0x68 */ KEY_HANGUEL, /* 122 */ /* 0x69 */ KEY_SYSRQ, /* 99 */ /* 0x6a */ 0, /* 0x6b */ KEY_SCROLLLOCK, /* 70 */ @@ -234,6 +238,11 @@ static struct adb_ids keyboard_ids; static struct adb_ids mouse_ids; static struct adb_ids buttons_ids; +#ifdef CONFIG_PMAC_BACKLIGHT +/* Exported to via-pmu.c */ +int disable_kernel_backlight = 0; +#endif /* CONFIG_PMAC_BACKLIGHT */ + /* Kind of keyboard, see Apple technote 1152 */ #define ADB_KEYBOARD_UNKNOWN 0 #define ADB_KEYBOARD_ANSI 0x0100 @@ -494,7 +503,9 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto case 0x1f: /* Powerbook button device */ { int down = (data[1] == (data[1] & 0xf)); - +#ifdef CONFIG_PMAC_BACKLIGHT + int backlight = get_backlight_level(); +#endif /* * XXX: Where is the contrast control for the passive? * -- Cort @@ -519,17 +530,29 @@ adbhid_buttons_input(unsigned char *data, int nb, struct pt_regs *regs, int auto case 0xa: /* brightness decrease */ #ifdef CONFIG_PMAC_BACKLIGHT - if (down) - pmac_backlight_key_down(); -#endif + if (!disable_kernel_backlight) { + if (down && backlight >= 0) { + if (backlight > BACKLIGHT_OFF) + set_backlight_level(backlight-1); + else + set_backlight_level(BACKLIGHT_OFF); + } + } +#endif /* CONFIG_PMAC_BACKLIGHT */ input_report_key(adbhid[id]->input, KEY_BRIGHTNESSDOWN, down); break; case 0x9: /* brightness increase */ #ifdef CONFIG_PMAC_BACKLIGHT - if (down) - pmac_backlight_key_up(); -#endif + if (!disable_kernel_backlight) { + if (down && backlight >= 0) { + if (backlight < BACKLIGHT_MAX) + set_backlight_level(backlight+1); + else + set_backlight_level(BACKLIGHT_MAX); + } + } +#endif /* CONFIG_PMAC_BACKLIGHT */ input_report_key(adbhid[id]->input, KEY_BRIGHTNESSUP, down); break; diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index 1293876a2..e5a2bbf99 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -18,6 +18,7 @@ * */ +#include #include #include diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index 6b129eef7..a66636116 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -8,6 +8,7 @@ * This file will soon be removed in favor of an uinput userspace tool. */ +#include #include #include #include diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c index 4b08852c3..314fc0830 100644 --- a/drivers/macintosh/macio-adb.c +++ b/drivers/macintosh/macio-adb.c @@ -90,12 +90,22 @@ int macio_init(void) { struct device_node *adbs; struct resource r; - unsigned int irq; adbs = find_compatible_devices("adb", "chrp,adb0"); if (adbs == 0) return -ENXIO; +#if 0 + { int i = 0; + + printk("macio_adb_init: node = %p, addrs =", adbs->node); + while(!of_address_to_resource(adbs, i, &r)) + printk(" %x(%x)", r.start, r.end - r.start); + printk(", intrs ="); + for (i = 0; i < adbs->n_intrs; ++i) + printk(" %x", adbs->intrs[i].line); + printk("\n"); } +#endif if (of_address_to_resource(adbs, 0, &r)) return -ENXIO; adb = ioremap(r.start, sizeof(struct adb_regs)); @@ -107,9 +117,10 @@ int macio_init(void) out_8(&adb->active_lo.r, 0xff); out_8(&adb->autopoll.r, APE); - irq = irq_of_parse_and_map(adbs, 0); - if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) { - printk(KERN_ERR "ADB: can't get irq %d\n", irq); + if (request_irq(adbs->intrs[0].line, macio_adb_interrupt, + 0, "ADB", (void *)0)) { + printk(KERN_ERR "ADB: can't get irq %d\n", + adbs->intrs[0].line); return -EAGAIN; } out_8(&adb->intr_enb.r, DFB | TAG); diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 82657bc86..431bd3722 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c @@ -17,6 +17,7 @@ * sub-devices. */ +#include #include #include #include @@ -280,128 +281,75 @@ static void macio_release_dev(struct device *dev) static int macio_resource_quirks(struct device_node *np, struct resource *res, int index) { - /* Only quirks for memory resources for now */ - if ((res->flags & IORESOURCE_MEM) == 0) - return 0; - - /* Grand Central has too large resource 0 on some machines */ - if (index == 0 && !strcmp(np->name, "gc")) - res->end = res->start + 0x1ffff; + if (res->flags & IORESOURCE_MEM) { + /* Grand Central has too large resource 0 on some machines */ + if (index == 0 && !strcmp(np->name, "gc")) + res->end = res->start + 0x1ffff; - /* Airport has bogus resource 2 */ - if (index >= 2 && !strcmp(np->name, "radio")) - return 1; + /* Airport has bogus resource 2 */ + if (index >= 2 && !strcmp(np->name, "radio")) + return 1; #ifndef CONFIG_PPC64 - /* DBDMAs may have bogus sizes */ - if ((res->start & 0x0001f000) == 0x00008000) - res->end = res->start + 0xff; + /* DBDMAs may have bogus sizes */ + if ((res->start & 0x0001f000) == 0x00008000) + res->end = res->start + 0xff; #endif /* CONFIG_PPC64 */ - /* ESCC parent eats child resources. We could have added a - * level of hierarchy, but I don't really feel the need - * for it - */ - if (!strcmp(np->name, "escc")) - return 1; - - /* ESCC has bogus resources >= 3 */ - if (index >= 3 && !(strcmp(np->name, "ch-a") && - strcmp(np->name, "ch-b"))) - return 1; - - /* Media bay has too many resources, keep only first one */ - if (index > 0 && !strcmp(np->name, "media-bay")) - return 1; - - /* Some older IDE resources have bogus sizes */ - if (!(strcmp(np->name, "IDE") && strcmp(np->name, "ATA") && - strcmp(np->type, "ide") && strcmp(np->type, "ata"))) { - if (index == 0 && (res->end - res->start) > 0xfff) - res->end = res->start + 0xfff; - if (index == 1 && (res->end - res->start) > 0xff) - res->end = res->start + 0xff; + /* ESCC parent eats child resources. We could have added a + * level of hierarchy, but I don't really feel the need + * for it + */ + if (!strcmp(np->name, "escc")) + return 1; + + /* ESCC has bogus resources >= 3 */ + if (index >= 3 && !(strcmp(np->name, "ch-a") && + strcmp(np->name, "ch-b"))) + return 1; + + /* Media bay has too many resources, keep only first one */ + if (index > 0 && !strcmp(np->name, "media-bay")) + return 1; + + /* Some older IDE resources have bogus sizes */ + if (!(strcmp(np->name, "IDE") && strcmp(np->name, "ATA") && + strcmp(np->type, "ide") && strcmp(np->type, "ata"))) { + if (index == 0 && (res->end - res->start) > 0xfff) + res->end = res->start + 0xfff; + if (index == 1 && (res->end - res->start) > 0xff) + res->end = res->start + 0xff; + } } return 0; } -static void macio_create_fixup_irq(struct macio_dev *dev, int index, - unsigned int line) -{ - unsigned int irq; - - irq = irq_create_mapping(NULL, line); - if (irq != NO_IRQ) { - dev->interrupt[index].start = irq; - dev->interrupt[index].flags = IORESOURCE_IRQ; - dev->interrupt[index].name = dev->ofdev.dev.bus_id; - } - if (dev->n_interrupts <= index) - dev->n_interrupts = index + 1; -} - -static void macio_add_missing_resources(struct macio_dev *dev) -{ - struct device_node *np = dev->ofdev.node; - unsigned int irq_base; - - /* Gatwick has some missing interrupts on child nodes */ - if (dev->bus->chip->type != macio_gatwick) - return; - - /* irq_base is always 64 on gatwick. I have no cleaner way to get - * that value from here at this point - */ - irq_base = 64; - - /* Fix SCC */ - if (strcmp(np->name, "ch-a") == 0) { - macio_create_fixup_irq(dev, 0, 15 + irq_base); - macio_create_fixup_irq(dev, 1, 4 + irq_base); - macio_create_fixup_irq(dev, 2, 5 + irq_base); - printk(KERN_INFO "macio: fixed SCC irqs on gatwick\n"); - } - - /* Fix media-bay */ - if (strcmp(np->name, "media-bay") == 0) { - macio_create_fixup_irq(dev, 0, 29 + irq_base); - printk(KERN_INFO "macio: fixed media-bay irq on gatwick\n"); - } - - /* Fix left media bay childs */ - if (dev->media_bay != NULL && strcmp(np->name, "floppy") == 0) { - macio_create_fixup_irq(dev, 0, 19 + irq_base); - macio_create_fixup_irq(dev, 1, 1 + irq_base); - printk(KERN_INFO "macio: fixed left floppy irqs\n"); - } - if (dev->media_bay != NULL && strcasecmp(np->name, "ata4") == 0) { - macio_create_fixup_irq(dev, 0, 14 + irq_base); - macio_create_fixup_irq(dev, 0, 3 + irq_base); - printk(KERN_INFO "macio: fixed left ide irqs\n"); - } -} static void macio_setup_interrupts(struct macio_dev *dev) { struct device_node *np = dev->ofdev.node; - unsigned int irq; - int i = 0, j = 0; + int i,j; - for (;;) { + /* For now, we use pre-parsed entries in the device-tree for + * interrupt routing and addresses, but we should change that + * to dynamically parsed entries and so get rid of most of the + * clutter in struct device_node + */ + for (i = j = 0; i < np->n_intrs; i++) { struct resource *res = &dev->interrupt[j]; if (j >= MACIO_DEV_COUNT_IRQS) break; - irq = irq_of_parse_and_map(np, i++); - if (irq == NO_IRQ) - break; - res->start = irq; - res->flags = IORESOURCE_IRQ; + res->start = np->intrs[i].line; + res->flags = IORESOURCE_IO; + if (np->intrs[j].sense) + res->flags |= IORESOURCE_IRQ_LOWLEVEL; + else + res->flags |= IORESOURCE_IRQ_HIGHEDGE; res->name = dev->ofdev.dev.bus_id; - if (macio_resource_quirks(np, res, i - 1)) { + if (macio_resource_quirks(np, res, i)) memset(res, 0, sizeof(struct resource)); - continue; - } else + else j++; } dev->n_interrupts = j; @@ -480,10 +428,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, /* MacIO itself has a different reg, we use it's PCI base */ if (np == chip->of_node) { - sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", + sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.*s", chip->lbus.index, #ifdef CONFIG_PCI - (unsigned int)pci_resource_start(chip->lbus.pdev, 0), + pci_resource_start(chip->lbus.pdev, 0), #else 0, /* NuBus may want to do something better here */ #endif @@ -498,7 +446,6 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, /* Setup interrupts & resources */ macio_setup_interrupts(dev); macio_setup_resources(dev, parent_res); - macio_add_missing_resources(dev); /* Register with core */ if (of_device_register(&dev->ofdev) != 0) { diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index cae24a135..7f7d4eaca 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 0acf2f7fd..53c1c7909 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c @@ -10,6 +10,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 4586eb3d4..f4516ca7a 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -19,6 +19,7 @@ * the userland interface */ +#include #include #include #include @@ -75,11 +76,9 @@ struct smu_device { struct of_device *of_dev; int doorbell; /* doorbell gpio */ u32 __iomem *db_buf; /* doorbell buffer */ - struct device_node *db_node; - unsigned int db_irq; + int db_irq; int msg; - struct device_node *msg_node; - unsigned int msg_irq; + int msg_irq; struct smu_cmd_buf *cmd_buf; /* command buffer virtual */ u32 cmd_buf_abs; /* command buffer absolute */ struct list_head cmd_list; @@ -95,7 +94,6 @@ struct smu_device { */ static struct smu_device *smu; static DEFINE_MUTEX(smu_part_access); -static int smu_irq_inited; static void smu_i2c_retry(unsigned long data); @@ -260,10 +258,6 @@ int smu_queue_cmd(struct smu_cmd *cmd) smu_start_cmd(); spin_unlock_irqrestore(&smu->lock, flags); - /* Workaround for early calls when irq isn't available */ - if (!smu_irq_inited || smu->db_irq == NO_IRQ) - smu_spinwait_cmd(cmd); - return 0; } EXPORT_SYMBOL(smu_queue_cmd); @@ -485,15 +479,14 @@ int __init smu_init (void) smu->cmd_buf_abs = (u32)smu_cmdbuf_abs; smu->cmd_buf = (struct smu_cmd_buf *)abs_to_virt(smu_cmdbuf_abs); - smu->db_node = of_find_node_by_name(NULL, "smu-doorbell"); - if (smu->db_node == NULL) { + np = of_find_node_by_name(NULL, "smu-doorbell"); + if (np == NULL) { printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n"); goto fail; } - data = (u32 *)get_property(smu->db_node, "reg", NULL); + data = (u32 *)get_property(np, "reg", NULL); if (data == NULL) { - of_node_put(smu->db_node); - smu->db_node = NULL; + of_node_put(np); printk(KERN_ERR "SMU: Can't find doorbell GPIO address !\n"); goto fail; } @@ -505,21 +498,27 @@ int __init smu_init (void) smu->doorbell = *data; if (smu->doorbell < 0x50) smu->doorbell += 0x50; + if (np->n_intrs > 0) + smu->db_irq = np->intrs[0].line; + + of_node_put(np); /* Now look for the smu-interrupt GPIO */ do { - smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt"); - if (smu->msg_node == NULL) + np = of_find_node_by_name(NULL, "smu-interrupt"); + if (np == NULL) break; - data = (u32 *)get_property(smu->msg_node, "reg", NULL); + data = (u32 *)get_property(np, "reg", NULL); if (data == NULL) { - of_node_put(smu->msg_node); - smu->msg_node = NULL; + of_node_put(np); break; } smu->msg = *data; if (smu->msg < 0x50) smu->msg += 0x50; + if (np->n_intrs > 0) + smu->msg_irq = np->intrs[0].line; + of_node_put(np); } while(0); /* Doorbell buffer is currently hard-coded, I didn't find a proper @@ -551,26 +550,13 @@ static int smu_late_init(void) smu->i2c_timer.function = smu_i2c_retry; smu->i2c_timer.data = (unsigned long)smu; - if (smu->db_node) { - smu->db_irq = irq_of_parse_and_map(smu->db_node, 0); - if (smu->db_irq == NO_IRQ) - printk(KERN_ERR "smu: failed to map irq for node %s\n", - smu->db_node->full_name); - } - if (smu->msg_node) { - smu->msg_irq = irq_of_parse_and_map(smu->msg_node, 0); - if (smu->msg_irq == NO_IRQ) - printk(KERN_ERR "smu: failed to map irq for node %s\n", - smu->msg_node->full_name); - } - /* * Try to request the interrupts */ if (smu->db_irq != NO_IRQ) { if (request_irq(smu->db_irq, smu_db_intr, - IRQF_SHARED, "SMU doorbell", smu) < 0) { + SA_SHIRQ, "SMU doorbell", smu) < 0) { printk(KERN_WARNING "SMU: can't " "request interrupt %d\n", smu->db_irq); @@ -580,7 +566,7 @@ static int smu_late_init(void) if (smu->msg_irq != NO_IRQ) { if (request_irq(smu->msg_irq, smu_msg_intr, - IRQF_SHARED, "SMU message", smu) < 0) { + SA_SHIRQ, "SMU message", smu) < 0) { printk(KERN_WARNING "SMU: can't " "request interrupt %d\n", smu->msg_irq); @@ -588,7 +574,6 @@ static int smu_late_init(void) } } - smu_irq_inited = 1; return 0; } /* This has to be before arch_initcall as the low i2c stuff relies on the @@ -760,11 +745,6 @@ static void smu_i2c_low_completion(struct smu_cmd *scmd, void *misc) if (fail && --cmd->retries > 0) { DPRINTK("SMU: i2c failure, starting timer...\n"); BUG_ON(cmd != smu->cmd_i2c_cur); - if (!smu_irq_inited) { - mdelay(5); - smu_i2c_retry(0); - return; - } mod_timer(&smu->i2c_timer, jiffies + msecs_to_jiffies(5)); return; } @@ -870,7 +850,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd) static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) { - DECLARE_COMPLETION_ONSTACK(comp); + DECLARE_COMPLETION(comp); unsigned int chunk; struct smu_cmd cmd; int rc; @@ -917,7 +897,7 @@ static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) static struct smu_sdbp_header *smu_create_sdb_partition(int id) { - DECLARE_COMPLETION_ONSTACK(comp); + DECLARE_COMPLETION(comp); struct smu_simple_cmd cmd; unsigned int addr, len, tlen; struct smu_sdbp_header *hdr; diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 7f86478bd..5282fec17 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 20bf67244..231146f43 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c @@ -95,19 +95,9 @@ * - Use min/max macros here or there * - Latest darwin updated U3H min fan speed to 20% PWM * - * July. 06, 2006 : 1.3 - * - Fix setting of RPM fans on Xserve G5 (they were going too fast) - * - Add missing slots fan control loop for Xserve G5 - * - Lower fixed slots fan speed from 50% to 40% on desktop G5s. We - * still can't properly implement the control loop for these, so let's - * reduce the noise a little bit, it appears that 40% still gives us - * a pretty good air flow - * - Add code to "tickle" the FCU regulary so it doesn't think that - * we are gone while in fact, the machine just didn't need any fan - * speed change lately - * */ +#include #include #include #include @@ -132,7 +122,7 @@ #include "therm_pm72.h" -#define VERSION "1.3" +#define VERSION "1.2b2" #undef DEBUG @@ -157,7 +147,6 @@ static struct basckside_pid_params backside_params; static struct backside_pid_state backside_state; static struct drives_pid_state drives_state; static struct dimm_pid_state dimms_state; -static struct slots_pid_state slots_state; static int state; static int cpu_count; static int cpu_pid_type; @@ -166,8 +155,7 @@ static struct completion ctrl_complete; static int critical_state; static int rackmac; static s32 dimm_output_clamp; -static int fcu_rpm_shift; -static int fcu_tickle_ticks; + static DECLARE_MUTEX(driver_lock); /* @@ -508,20 +496,13 @@ static int start_fcu(void) rc = fan_write_reg(0x2e, &buf, 1); if (rc < 0) return -EIO; - rc = fan_read_reg(0, &buf, 1); - if (rc < 0) - return -EIO; - fcu_rpm_shift = (buf == 1) ? 2 : 3; - printk(KERN_DEBUG "FCU Initialized, RPM fan shift is %d\n", - fcu_rpm_shift); - return 0; } static int set_rpm_fan(int fan_index, int rpm) { unsigned char buf[2]; - int rc, id, min, max; + int rc, id; if (fcu_fans[fan_index].type != FCU_FAN_RPM) return -EINVAL; @@ -529,15 +510,12 @@ static int set_rpm_fan(int fan_index, int rpm) if (id == FCU_FAN_ABSENT_ID) return -EINVAL; - min = 2400 >> fcu_rpm_shift; - max = 56000 >> fcu_rpm_shift; - - if (rpm < min) - rpm = min; - else if (rpm > max) - rpm = max; - buf[0] = rpm >> (8 - fcu_rpm_shift); - buf[1] = rpm << fcu_rpm_shift; + if (rpm < 300) + rpm = 300; + else if (rpm > 8191) + rpm = 8191; + buf[0] = rpm >> 5; + buf[1] = rpm << 3; rc = fan_write_reg(0x10 + (id * 2), buf, 2); if (rc < 0) return -EIO; @@ -574,7 +552,7 @@ static int get_rpm_fan(int fan_index, int programmed) if (rc != 2) return -EIO; - return (buf[0] << (8 - fcu_rpm_shift)) | buf[1] >> fcu_rpm_shift; + return (buf[0] << 5) | buf[1] >> 3; } static int set_pwm_fan(int fan_index, int pwm) @@ -632,26 +610,6 @@ static int get_pwm_fan(int fan_index) return (buf[0] * 1000) / 2559; } -static void tickle_fcu(void) -{ - int pwm; - - pwm = get_pwm_fan(SLOTS_FAN_PWM_INDEX); - - DBG("FCU Tickle, slots fan is: %d\n", pwm); - if (pwm < 0) - pwm = 100; - - if (!rackmac) { - pwm = SLOTS_FAN_DEFAULT_PWM; - } else if (pwm < SLOTS_PID_OUTPUT_MIN) - pwm = SLOTS_PID_OUTPUT_MIN; - - /* That is hopefully enough to make the FCU happy */ - set_pwm_fan(SLOTS_FAN_PWM_INDEX, pwm); -} - - /* * Utility routine to read the CPU calibration EEPROM data * from the device-tree @@ -758,9 +716,6 @@ BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) BUILD_SHOW_FUNC_FIX(drives_temperature, drives_state.last_temp) BUILD_SHOW_FUNC_INT(drives_fan_rpm, drives_state.rpm) -BUILD_SHOW_FUNC_FIX(slots_temperature, slots_state.last_temp) -BUILD_SHOW_FUNC_INT(slots_fan_pwm, slots_state.pwm) - BUILD_SHOW_FUNC_FIX(dimms_temperature, dimms_state.last_temp) static DEVICE_ATTR(cpu0_temperature,S_IRUGO,show_cpu0_temperature,NULL); @@ -781,9 +736,6 @@ static DEVICE_ATTR(backside_fan_pwm,S_IRUGO,show_backside_fan_pwm,NULL); static DEVICE_ATTR(drives_temperature,S_IRUGO,show_drives_temperature,NULL); static DEVICE_ATTR(drives_fan_rpm,S_IRUGO,show_drives_fan_rpm,NULL); -static DEVICE_ATTR(slots_temperature,S_IRUGO,show_slots_temperature,NULL); -static DEVICE_ATTR(slots_fan_pwm,S_IRUGO,show_slots_fan_pwm,NULL); - static DEVICE_ATTR(dimms_temperature,S_IRUGO,show_dimms_temperature,NULL); /* @@ -1125,9 +1077,6 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) fan_min = dimm_output_clamp; fan_min = max(fan_min, (int)state->mpu.rminn_intake_fan); - DBG(" CPU min mpu = %d, min dimm = %d\n", - state->mpu.rminn_intake_fan, dimm_output_clamp); - state->rpm = max(state->rpm, (int)fan_min); state->rpm = min(state->rpm, (int)state->mpu.rmaxn_intake_fan); state->intake_rpm = state->rpm; @@ -1426,8 +1375,7 @@ static void do_monitor_drives(struct drives_pid_state *state) DBG(" current rpm: %d\n", state->rpm); /* Get some sensor readings */ - temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, - DS1775_TEMP)) << 8; + temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, DS1775_TEMP)) << 8; state->last_temp = temp; DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), FIX32TOPRINT(DRIVES_PID_INPUT_TARGET)); @@ -1628,7 +1576,7 @@ static int init_dimms_state(struct dimm_pid_state *state) } /* - * Dispose of the state data for the DIMM control loop + * Dispose of the state data for the drives control loop */ static void dispose_dimms_state(struct dimm_pid_state *state) { @@ -1641,127 +1589,6 @@ static void dispose_dimms_state(struct dimm_pid_state *state) state->monitor = NULL; } -/* - * Slots fan control loop - */ -static void do_monitor_slots(struct slots_pid_state *state) -{ - s32 temp, integral, derivative; - s64 integ_p, deriv_p, prop_p, sum; - int i, rc; - - if (--state->ticks != 0) - return; - state->ticks = SLOTS_PID_INTERVAL; - - DBG("slots:\n"); - - /* Check fan status */ - rc = get_pwm_fan(SLOTS_FAN_PWM_INDEX); - if (rc < 0) { - printk(KERN_WARNING "Error %d reading slots fan !\n", rc); - /* XXX What do we do now ? */ - } else - state->pwm = rc; - DBG(" current pwm: %d\n", state->pwm); - - /* Get some sensor readings */ - temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, - DS1775_TEMP)) << 8; - state->last_temp = temp; - DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), - FIX32TOPRINT(SLOTS_PID_INPUT_TARGET)); - - /* Store temperature and error in history array */ - state->cur_sample = (state->cur_sample + 1) % SLOTS_PID_HISTORY_SIZE; - state->sample_history[state->cur_sample] = temp; - state->error_history[state->cur_sample] = temp - SLOTS_PID_INPUT_TARGET; - - /* If first loop, fill the history table */ - if (state->first) { - for (i = 0; i < (SLOTS_PID_HISTORY_SIZE - 1); i++) { - state->cur_sample = (state->cur_sample + 1) % - SLOTS_PID_HISTORY_SIZE; - state->sample_history[state->cur_sample] = temp; - state->error_history[state->cur_sample] = - temp - SLOTS_PID_INPUT_TARGET; - } - state->first = 0; - } - - /* Calculate the integral term */ - sum = 0; - integral = 0; - for (i = 0; i < SLOTS_PID_HISTORY_SIZE; i++) - integral += state->error_history[i]; - integral *= SLOTS_PID_INTERVAL; - DBG(" integral: %08x\n", integral); - integ_p = ((s64)SLOTS_PID_G_r) * (s64)integral; - DBG(" integ_p: %d\n", (int)(integ_p >> 36)); - sum += integ_p; - - /* Calculate the derivative term */ - derivative = state->error_history[state->cur_sample] - - state->error_history[(state->cur_sample + SLOTS_PID_HISTORY_SIZE - 1) - % SLOTS_PID_HISTORY_SIZE]; - derivative /= SLOTS_PID_INTERVAL; - deriv_p = ((s64)SLOTS_PID_G_d) * (s64)derivative; - DBG(" deriv_p: %d\n", (int)(deriv_p >> 36)); - sum += deriv_p; - - /* Calculate the proportional term */ - prop_p = ((s64)SLOTS_PID_G_p) * (s64)(state->error_history[state->cur_sample]); - DBG(" prop_p: %d\n", (int)(prop_p >> 36)); - sum += prop_p; - - /* Scale sum */ - sum >>= 36; - - DBG(" sum: %d\n", (int)sum); - state->pwm = (s32)sum; - - state->pwm = max(state->pwm, SLOTS_PID_OUTPUT_MIN); - state->pwm = min(state->pwm, SLOTS_PID_OUTPUT_MAX); - - DBG("** DRIVES PWM: %d\n", (int)state->pwm); - set_pwm_fan(SLOTS_FAN_PWM_INDEX, state->pwm); -} - -/* - * Initialize the state structure for the slots bay fan control loop - */ -static int init_slots_state(struct slots_pid_state *state) -{ - state->ticks = 1; - state->first = 1; - state->pwm = 50; - - state->monitor = attach_i2c_chip(XSERVE_SLOTS_LM75, "slots_temp"); - if (state->monitor == NULL) - return -ENODEV; - - device_create_file(&of_dev->dev, &dev_attr_slots_temperature); - device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm); - - return 0; -} - -/* - * Dispose of the state data for the slots control loop - */ -static void dispose_slots_state(struct slots_pid_state *state) -{ - if (state->monitor == NULL) - return; - - device_remove_file(&of_dev->dev, &dev_attr_slots_temperature); - device_remove_file(&of_dev->dev, &dev_attr_slots_fan_pwm); - - detach_i2c_chip(state->monitor); - state->monitor = NULL; -} - - static int call_critical_overtemp(void) { char *argv[] = { critical_overtemp_path, NULL }; @@ -1791,17 +1618,14 @@ static int main_control_loop(void *x) goto out; } - /* Set the PCI fan once for now on non-RackMac */ - if (!rackmac) - set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); + /* Set the PCI fan once for now */ + set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); /* Initialize ADCs */ initialize_adc(&cpu_state[0]); if (cpu_state[1].monitor != NULL) initialize_adc(&cpu_state[1]); - fcu_tickle_ticks = FCU_TICKLE_TICKS; - up(&driver_lock); while (state == state_attached) { @@ -1811,12 +1635,6 @@ static int main_control_loop(void *x) down(&driver_lock); - /* Tickle the FCU just in case */ - if (--fcu_tickle_ticks < 0) { - fcu_tickle_ticks = FCU_TICKLE_TICKS; - tickle_fcu(); - } - /* First, we always calculate the new DIMMs state on an Xserve */ if (rackmac) do_monitor_dimms(&dimms_state); @@ -1837,9 +1655,7 @@ static int main_control_loop(void *x) } /* Then, the rest */ do_monitor_backside(&backside_state); - if (rackmac) - do_monitor_slots(&slots_state); - else + if (!rackmac) do_monitor_drives(&drives_state); up(&driver_lock); @@ -1881,7 +1697,6 @@ static void dispose_control_loops(void) dispose_cpu_state(&cpu_state[1]); dispose_backside_state(&backside_state); dispose_drives_state(&drives_state); - dispose_slots_state(&slots_state); dispose_dimms_state(&dimms_state); } @@ -1931,8 +1746,6 @@ static int create_control_loops(void) goto fail; if (rackmac && init_dimms_state(&dimms_state)) goto fail; - if (rackmac && init_slots_state(&slots_state)) - goto fail; if (!rackmac && init_drives_state(&drives_state)) goto fail; diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h index 393cc9df9..c17e61f9c 100644 --- a/drivers/macintosh/therm_pm72.h +++ b/drivers/macintosh/therm_pm72.h @@ -93,7 +93,7 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp"; * 0. This appear to be safe enough for this first version * of the driver, though I would accept any clean patch * doing a better use of the device-tree without turning the - * while i2c registration mechanism into a racy mess + * while i2c registration mecanism into a racy mess * * Note: Xserve changed this. We have some bits on the K2 bus, * which I arbitrarily set to 0x200. Ultimately, we really want @@ -105,7 +105,6 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp"; #define DRIVES_DALLAS_ID 0x94 #define BACKSIDE_MAX_ID 0x98 #define XSERVE_DIMMS_LM87 0x25a -#define XSERVE_SLOTS_LM75 0x290 /* * Some MAX6690, DS1775, LM87 register definitions @@ -199,7 +198,7 @@ struct drives_pid_state #define SLOTS_FAN_PWM_DEFAULT_ID 2 #define SLOTS_FAN_PWM_INDEX 2 -#define SLOTS_FAN_DEFAULT_PWM 40 /* Do better here ! */ +#define SLOTS_FAN_DEFAULT_PWM 50 /* Do better here ! */ /* @@ -207,7 +206,7 @@ struct drives_pid_state */ #define DIMM_PID_G_d 0 #define DIMM_PID_G_p 0 -#define DIMM_PID_G_r 0x06553600 +#define DIMM_PID_G_r 0x6553600 #define DIMM_PID_INPUT_TARGET 3276800 #define DIMM_PID_INTERVAL 1 #define DIMM_PID_OUTPUT_MAX 14000 @@ -227,31 +226,6 @@ struct dimm_pid_state }; -/* - * PID factors for the Xserve Slots control loop - */ -#define SLOTS_PID_G_d 0 -#define SLOTS_PID_G_p 0 -#define SLOTS_PID_G_r 0x00100000 -#define SLOTS_PID_INPUT_TARGET 3200000 -#define SLOTS_PID_INTERVAL 1 -#define SLOTS_PID_OUTPUT_MAX 100 -#define SLOTS_PID_OUTPUT_MIN 20 -#define SLOTS_PID_HISTORY_SIZE 20 - -struct slots_pid_state -{ - int ticks; - struct i2c_client * monitor; - s32 sample_history[SLOTS_PID_HISTORY_SIZE]; - s32 error_history[SLOTS_PID_HISTORY_SIZE]; - int cur_sample; - s32 last_temp; - int first; - int pwm; -}; - - /* Desktops */ @@ -309,9 +283,6 @@ struct cpu_pid_state s32 pump_max; }; -/* Tickle FCU every 10 seconds */ -#define FCU_TICKLE_TICKS 10 - /* * Driver state */ diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index c7d1c290c..3d9dd2e16 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index 69d5452fd..2d9d79150 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c @@ -9,6 +9,7 @@ * Copyright (C) 1996 Paul Mackerras. */ #include +#include #include #include #include @@ -34,6 +35,13 @@ static volatile unsigned char __iomem *via; static DEFINE_SPINLOCK(cuda_lock); +#ifdef CONFIG_MAC +#define CUDA_IRQ IRQ_MAC_ADB +#define eieio() +#else +#define CUDA_IRQ vias->intrs[0].line +#endif + /* VIA registers - spaced 0x200 bytes apart */ #define RS 0x200 /* skip between registers */ #define B 0 /* B-side data */ @@ -182,24 +190,11 @@ int __init find_via_cuda(void) static int __init via_cuda_start(void) { - unsigned int irq; - if (via == NULL) return -ENODEV; -#ifdef CONFIG_MAC - irq = IRQ_MAC_ADB; -#else /* CONFIG_MAC */ - irq = irq_of_parse_and_map(vias, 0); - if (irq == NO_IRQ) { - printk(KERN_ERR "via-cuda: can't map interrupts for %s\n", - vias->full_name); - return -ENODEV; - } -#endif /* CONFIG_MAP */ - - if (request_irq(irq, cuda_interrupt, 0, "ADB", cuda_interrupt)) { - printk(KERN_ERR "via-cuda: can't request irq %d\n", irq); + if (request_irq(CUDA_IRQ, cuda_interrupt, 0, "ADB", cuda_interrupt)) { + printk(KERN_ERR "cuda_init: can't get irq %d\n", CUDA_IRQ); return -EAGAIN; } diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c deleted file mode 100644 index 6c29fe727..000000000 --- a/drivers/macintosh/via-pmu-backlight.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Backlight code for via-pmu - * - * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi. - * Copyright (C) 2001-2002 Benjamin Herrenschmidt - * Copyright (C) 2006 Michael Hanselmann - * - */ - -#include -#include -#include -#include -#include - -#define MAX_PMU_LEVEL 0xFF - -static struct backlight_properties pmu_backlight_data; -static DEFINE_SPINLOCK(pmu_backlight_lock); -static int sleeping; -static u8 bl_curve[FB_BACKLIGHT_LEVELS]; - -static void pmu_backlight_init_curve(u8 off, u8 min, u8 max) -{ - unsigned int i, flat, count, range = (max - min); - - bl_curve[0] = off; - - for (flat = 1; flat < (FB_BACKLIGHT_LEVELS / 16); ++flat) - bl_curve[flat] = min; - - count = FB_BACKLIGHT_LEVELS * 15 / 16; - for (i = 0; i < count; ++i) - bl_curve[flat + i] = min + (range * (i + 1) / count); -} - -static int pmu_backlight_curve_lookup(int value) -{ - int level = (FB_BACKLIGHT_LEVELS - 1); - int i, max = 0; - - /* Look for biggest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) - max = max((int)bl_curve[i], max); - - /* Look for nearest value */ - for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) { - int diff = abs(bl_curve[i] - value); - if (diff < max) { - max = diff; - level = i; - } - } - return level; -} - -static int pmu_backlight_get_level_brightness(int level) -{ - int pmulevel; - - /* Get and convert the value */ - pmulevel = bl_curve[level] * FB_BACKLIGHT_MAX / MAX_PMU_LEVEL; - if (pmulevel < 0) - pmulevel = 0; - else if (pmulevel > MAX_PMU_LEVEL) - pmulevel = MAX_PMU_LEVEL; - - return pmulevel; -} - -static int pmu_backlight_update_status(struct backlight_device *bd) -{ - struct adb_request req; - unsigned long flags; - int level = bd->props->brightness; - - spin_lock_irqsave(&pmu_backlight_lock, flags); - - /* Don't update brightness when sleeping */ - if (sleeping) - goto out; - - if (bd->props->power != FB_BLANK_UNBLANK || - bd->props->fb_blank != FB_BLANK_UNBLANK) - level = 0; - - if (level > 0) { - int pmulevel = pmu_backlight_get_level_brightness(level); - - pmu_request(&req, NULL, 2, PMU_BACKLIGHT_BRIGHT, pmulevel); - pmu_wait_complete(&req); - - pmu_request(&req, NULL, 2, PMU_POWER_CTRL, - PMU_POW_BACKLIGHT | PMU_POW_ON); - pmu_wait_complete(&req); - } else { - pmu_request(&req, NULL, 2, PMU_POWER_CTRL, - PMU_POW_BACKLIGHT | PMU_POW_OFF); - pmu_wait_complete(&req); - } - -out: - spin_unlock_irqrestore(&pmu_backlight_lock, flags); - - return 0; -} - -static int pmu_backlight_get_brightness(struct backlight_device *bd) -{ - return bd->props->brightness; -} - -static struct backlight_properties pmu_backlight_data = { - .owner = THIS_MODULE, - .get_brightness = pmu_backlight_get_brightness, - .update_status = pmu_backlight_update_status, - .max_brightness = (FB_BACKLIGHT_LEVELS - 1), -}; - -#ifdef CONFIG_PM -void pmu_backlight_set_sleep(int sleep) -{ - unsigned long flags; - - spin_lock_irqsave(&pmu_backlight_lock, flags); - sleeping = sleep; - spin_unlock_irqrestore(&pmu_backlight_lock, flags); -} -#endif /* CONFIG_PM */ - -void __init pmu_backlight_init() -{ - struct backlight_device *bd; - char name[10]; - int level, autosave; - - /* Special case for the old PowerBook since I can't test on it */ - autosave = - machine_is_compatible("AAPL,3400/2400") || - machine_is_compatible("AAPL,3500"); - - if (!autosave && - !pmac_has_backlight_type("pmu") && - !machine_is_compatible("AAPL,PowerBook1998") && - !machine_is_compatible("PowerBook1,1")) - return; - - snprintf(name, sizeof(name), "pmubl"); - - bd = backlight_device_register(name, NULL, &pmu_backlight_data); - if (IS_ERR(bd)) { - printk("pmubl: Backlight registration failed\n"); - goto error; - } - pmu_backlight_init_curve(0x7F, 0x46, 0x0E); - - level = pmu_backlight_data.max_brightness; - - if (autosave) { - /* read autosaved value if available */ - struct adb_request req; - pmu_request(&req, NULL, 2, 0xd9, 0); - pmu_wait_complete(&req); - - level = pmu_backlight_curve_lookup( - (req.reply[0] >> 4) * - pmu_backlight_data.max_brightness / 15); - } - - down(&bd->sem); - bd->props->brightness = level; - bd->props->power = FB_BLANK_UNBLANK; - bd->props->update_status(bd); - up(&bd->sem); - - mutex_lock(&pmac_backlight_mutex); - if (!pmac_backlight) - pmac_backlight = bd; - mutex_unlock(&pmac_backlight_mutex); - - printk("pmubl: Backlight initialized (%s)\n", name); - - return; - -error: - return; -} diff --git a/drivers/macintosh/via-pmu-event.c b/drivers/macintosh/via-pmu-event.c deleted file mode 100644 index 25cd56542..000000000 --- a/drivers/macintosh/via-pmu-event.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * via-pmu event device for reporting some events that come through the PMU - * - * Copyright 2006 Johannes Berg - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include -#include -#include -#include "via-pmu-event.h" - -static struct input_dev *pmu_input_dev; - -static int __init via_pmu_event_init(void) -{ - int err; - - /* do other models report button/lid status? */ - if (pmu_get_model() != PMU_KEYLARGO_BASED) - return -ENODEV; - - pmu_input_dev = input_allocate_device(); - if (!pmu_input_dev) - return -ENOMEM; - - pmu_input_dev->name = "PMU"; - pmu_input_dev->id.bustype = BUS_HOST; - pmu_input_dev->id.vendor = 0x0001; - pmu_input_dev->id.product = 0x0001; - pmu_input_dev->id.version = 0x0100; - - set_bit(EV_KEY, pmu_input_dev->evbit); - set_bit(EV_SW, pmu_input_dev->evbit); - set_bit(KEY_POWER, pmu_input_dev->keybit); - set_bit(SW_LID, pmu_input_dev->swbit); - - err = input_register_device(pmu_input_dev); - if (err) - input_free_device(pmu_input_dev); - return err; -} - -void via_pmu_event(int key, int down) -{ - - if (unlikely(!pmu_input_dev)) - return; - - switch (key) { - case PMU_EVT_POWER: - input_report_key(pmu_input_dev, KEY_POWER, down); - break; - case PMU_EVT_LID: - input_report_switch(pmu_input_dev, SW_LID, down); - break; - default: - /* no such key handled */ - return; - } - - input_sync(pmu_input_dev); -} - -late_initcall(via_pmu_event_init); diff --git a/drivers/macintosh/via-pmu-event.h b/drivers/macintosh/via-pmu-event.h deleted file mode 100644 index 72c54de40..000000000 --- a/drivers/macintosh/via-pmu-event.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __VIA_PMU_EVENT_H -#define __VIA_PMU_EVENT_H - -#define PMU_EVT_POWER 0 -#define PMU_EVT_LID 1 -extern void via_pmu_event(int key, int down); - -#endif /* __VIA_PMU_EVENT_H */ diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c deleted file mode 100644 index 5189d5454..000000000 --- a/drivers/macintosh/via-pmu-led.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * via-pmu LED class device - * - * Copyright 2006 Johannes Berg - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ -#include -#include -#include -#include -#include -#include -#include - -static spinlock_t pmu_blink_lock; -static struct adb_request pmu_blink_req; -/* -1: no change, 0: request off, 1: request on */ -static int requested_change; -static int sleeping; - -static void pmu_req_done(struct adb_request * req) -{ - unsigned long flags; - - spin_lock_irqsave(&pmu_blink_lock, flags); - /* if someone requested a change in the meantime - * (we only see the last one which is fine) - * then apply it now */ - if (requested_change != -1 && !sleeping) - pmu_request(&pmu_blink_req, NULL, 4, 0xee, 4, 0, requested_change); - /* reset requested change */ - requested_change = -1; - spin_unlock_irqrestore(&pmu_blink_lock, flags); -} - -static void pmu_led_set(struct led_classdev *led_cdev, - enum led_brightness brightness) -{ - unsigned long flags; - - spin_lock_irqsave(&pmu_blink_lock, flags); - switch (brightness) { - case LED_OFF: - requested_change = 0; - break; - case LED_FULL: - requested_change = 1; - break; - default: - goto out; - break; - } - /* if request isn't done, then don't do anything */ - if (pmu_blink_req.complete && !sleeping) - pmu_request(&pmu_blink_req, NULL, 4, 0xee, 4, 0, requested_change); - out: - spin_unlock_irqrestore(&pmu_blink_lock, flags); -} - -static struct led_classdev pmu_led = { - .name = "pmu-front-led", -#ifdef CONFIG_ADB_PMU_LED_IDE - .default_trigger = "ide-disk", -#endif - .brightness_set = pmu_led_set, -}; - -#ifdef CONFIG_PM -static int pmu_led_sleep_call(struct pmu_sleep_notifier *self, int when) -{ - unsigned long flags; - - spin_lock_irqsave(&pmu_blink_lock, flags); - - switch (when) { - case PBOOK_SLEEP_REQUEST: - sleeping = 1; - break; - case PBOOK_WAKE: - sleeping = 0; - break; - default: - /* do nothing */ - break; - } - spin_unlock_irqrestore(&pmu_blink_lock, flags); - - return PBOOK_SLEEP_OK; -} - -static struct pmu_sleep_notifier via_pmu_led_sleep_notif = { - .notifier_call = pmu_led_sleep_call, -}; -#endif - -static int __init via_pmu_led_init(void) -{ - struct device_node *dt; - const char *model; - - /* only do this on keylargo based models */ - if (pmu_get_model() != PMU_KEYLARGO_BASED) - return -ENODEV; - - dt = of_find_node_by_path("/"); - if (dt == NULL) - return -ENODEV; - model = (const char *)get_property(dt, "model", NULL); - if (model == NULL) - return -ENODEV; - if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && - strncmp(model, "iBook", strlen("iBook")) != 0) { - of_node_put(dt); - /* ignore */ - return -ENODEV; - } - of_node_put(dt); - - spin_lock_init(&pmu_blink_lock); - /* no outstanding req */ - pmu_blink_req.complete = 1; - pmu_blink_req.done = pmu_req_done; -#ifdef CONFIG_PM - pmu_register_sleep_notifier(&via_pmu_led_sleep_notif); -#endif - return led_classdev_register(NULL, &pmu_led); -} - -late_initcall(via_pmu_led_init); diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 14610a63f..0b5ff553e 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -16,10 +16,12 @@ * a sleep or a freq. switch * - Move sleep code out of here to pmac_pm, merge into new * common PM infrastructure + * - Move backlight code out as well * - Save/Restore PCI space properly * */ #include +#include #include #include #include @@ -59,9 +61,13 @@ #include #include #include +#ifdef CONFIG_PMAC_BACKLIGHT #include +#endif -#include "via-pmu-event.h" +#ifdef CONFIG_PPC32 +#include +#endif /* Some compile options */ #undef SUSPEND_USES_PMU @@ -138,13 +144,14 @@ static int data_index; static int data_len; static volatile int adb_int_pending; static volatile int disable_poll; +static struct adb_request bright_req_1, bright_req_2; static struct device_node *vias; static int pmu_kind = PMU_UNKNOWN; static int pmu_fully_inited = 0; static int pmu_has_adb; static struct device_node *gpio_node; static unsigned char __iomem *gpio_reg = NULL; -static int gpio_irq = NO_IRQ; +static int gpio_irq = -1; static int gpio_irq_enabled = -1; static volatile int pmu_suspended = 0; static spinlock_t pmu_lock; @@ -154,7 +161,7 @@ static int drop_interrupts; #if defined(CONFIG_PM) && defined(CONFIG_PPC32) static int option_lid_wakeup = 1; #endif /* CONFIG_PM && CONFIG_PPC32 */ -#if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY) +#if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT) static int sleep_in_progress; #endif static unsigned long async_req_locks; @@ -174,6 +181,10 @@ static int query_batt_timer = BATTERY_POLLING_COUNT; static struct adb_request batt_req; static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES]; +#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) +extern int disable_kernel_backlight; +#endif /* defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) */ + int __fake_sleep; int asleep; BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); @@ -197,6 +208,10 @@ static int proc_get_info(char *page, char **start, off_t off, int count, int *eof, void *data); static int proc_get_irqstats(char *page, char **start, off_t off, int count, int *eof, void *data); +#ifdef CONFIG_PMAC_BACKLIGHT +static int pmu_set_backlight_level(int level, void* data); +static int pmu_set_backlight_enable(int on, int level, void* data); +#endif /* CONFIG_PMAC_BACKLIGHT */ static void pmu_pass_intr(unsigned char *data, int len); static int proc_get_batt(char *page, char **start, off_t off, int count, int *eof, void *data); @@ -277,6 +292,13 @@ static char *pbook_type[] = { "Core99" }; +#ifdef CONFIG_PMAC_BACKLIGHT +static struct backlight_controller pmu_backlight_controller = { + pmu_set_backlight_enable, + pmu_set_backlight_level +}; +#endif /* CONFIG_PMAC_BACKLIGHT */ + int __init find_via_pmu(void) { u64 taddr; @@ -392,21 +414,24 @@ static int __init pmu_init(void) */ static int __init via_pmu_start(void) { - unsigned int irq; - if (vias == NULL) return -ENODEV; + bright_req_1.complete = 1; + bright_req_2.complete = 1; batt_req.complete = 1; - irq = irq_of_parse_and_map(vias, 0); - if (irq == NO_IRQ) { - printk(KERN_ERR "via-pmu: can't map interruptn"); - return -ENODEV; - } - if (request_irq(irq, via_pmu_interrupt, 0, "VIA-PMU", (void *)0)) { - printk(KERN_ERR "via-pmu: can't request irq %d\n", irq); - return -ENODEV; +#ifndef CONFIG_PPC_MERGE + if (pmu_kind == PMU_KEYLARGO_BASED) + openpic_set_irq_priority(vias->intrs[0].line, + OPENPIC_PRIORITY_DEFAULT + 1); +#endif + + if (request_irq(vias->intrs[0].line, via_pmu_interrupt, 0, "VIA-PMU", + (void *)0)) { + printk(KERN_ERR "VIA-PMU: can't get irq %d\n", + vias->intrs[0].line); + return -EAGAIN; } if (pmu_kind == PMU_KEYLARGO_BASED) { @@ -414,10 +439,10 @@ static int __init via_pmu_start(void) if (gpio_node == NULL) gpio_node = of_find_node_by_name(NULL, "pmu-interrupt"); - if (gpio_node) - gpio_irq = irq_of_parse_and_map(gpio_node, 0); + if (gpio_node && gpio_node->n_intrs > 0) + gpio_irq = gpio_node->intrs[0].line; - if (gpio_irq != NO_IRQ) { + if (gpio_irq != -1) { if (request_irq(gpio_irq, gpio1_interrupt, 0, "GPIO1 ADB", (void *)0)) printk(KERN_ERR "pmu: can't get irq %d" @@ -458,9 +483,9 @@ static int __init via_pmu_dev_init(void) return -ENODEV; #ifdef CONFIG_PMAC_BACKLIGHT - /* Initialize backlight */ - pmu_backlight_init(); -#endif + /* Enable backlight */ + register_backlight_controller(&pmu_backlight_controller, NULL, "pmu"); +#endif /* CONFIG_PMAC_BACKLIGHT */ #ifdef CONFIG_PPC32 if (machine_is_compatible("AAPL,3400/2400") || @@ -1396,8 +1421,11 @@ next: else if ((1 << pirq) & PMU_INT_SNDBRT) { #ifdef CONFIG_PMAC_BACKLIGHT if (len == 3) - pmac_backlight_set_legacy_brightness_pmu(data[1] >> 4); -#endif +#ifdef CONFIG_INPUT_ADBHID + if (!disable_kernel_backlight) +#endif /* CONFIG_INPUT_ADBHID */ + set_backlight_level(data[1] >> 4); +#endif /* CONFIG_PMAC_BACKLIGHT */ } /* Tick interrupt */ else if ((1 << pirq) & PMU_INT_TICK) { @@ -1413,12 +1441,6 @@ next: if (pmu_battery_count) query_battery_state(); pmu_pass_intr(data, len); - /* len == 6 is probably a bad check. But how do I - * know what PMU versions send what events here? */ - if (len == 6) { - via_pmu_event(PMU_EVT_POWER, !!(data[1]&8)); - via_pmu_event(PMU_EVT_LID, data[1]&1); - } } else { pmu_pass_intr(data, len); } @@ -1652,6 +1674,61 @@ gpio1_interrupt(int irq, void *arg, struct pt_regs *regs) return IRQ_NONE; } +#ifdef CONFIG_PMAC_BACKLIGHT +static int backlight_to_bright[] = { + 0x7f, 0x46, 0x42, 0x3e, 0x3a, 0x36, 0x32, 0x2e, + 0x2a, 0x26, 0x22, 0x1e, 0x1a, 0x16, 0x12, 0x0e +}; + +static int +pmu_set_backlight_enable(int on, int level, void* data) +{ + struct adb_request req; + + if (vias == NULL) + return -ENODEV; + + if (on) { + pmu_request(&req, NULL, 2, PMU_BACKLIGHT_BRIGHT, + backlight_to_bright[level]); + pmu_wait_complete(&req); + } + pmu_request(&req, NULL, 2, PMU_POWER_CTRL, + PMU_POW_BACKLIGHT | (on ? PMU_POW_ON : PMU_POW_OFF)); + pmu_wait_complete(&req); + + return 0; +} + +static void +pmu_bright_complete(struct adb_request *req) +{ + if (req == &bright_req_1) + clear_bit(1, &async_req_locks); + if (req == &bright_req_2) + clear_bit(2, &async_req_locks); +} + +static int +pmu_set_backlight_level(int level, void* data) +{ + if (vias == NULL) + return -ENODEV; + + if (test_and_set_bit(1, &async_req_locks)) + return -EAGAIN; + pmu_request(&bright_req_1, pmu_bright_complete, 2, PMU_BACKLIGHT_BRIGHT, + backlight_to_bright[level]); + if (test_and_set_bit(2, &async_req_locks)) + return -EAGAIN; + pmu_request(&bright_req_2, pmu_bright_complete, 2, PMU_POWER_CTRL, + PMU_POW_BACKLIGHT | (level > BACKLIGHT_OFF ? + PMU_POW_ON : PMU_POW_OFF)); + + return 0; +} +#endif /* CONFIG_PMAC_BACKLIGHT */ + void pmu_enable_irled(int on) { @@ -1995,8 +2072,6 @@ restore_via_state(void) out_8(&via[IER], IER_SET | SR_INT | CB1_INT); } -extern void pmu_backlight_set_sleep(int sleep); - static int pmac_suspend_devices(void) { @@ -2034,11 +2109,6 @@ pmac_suspend_devices(void) return -EBUSY; } -#ifdef CONFIG_PMAC_BACKLIGHT - /* Tell backlight code not to muck around with the chip anymore */ - pmu_backlight_set_sleep(1); -#endif - /* Call platform functions marked "on sleep" */ pmac_pfunc_i2c_suspend(); pmac_pfunc_base_suspend(); @@ -2075,8 +2145,9 @@ pmac_suspend_devices(void) return -EBUSY; } - /* Wait for completion of async requests */ - while (!batt_req.complete) + /* Wait for completion of async backlight requests */ + while (!bright_req_1.complete || !bright_req_2.complete || + !batt_req.complete) pmu_poll(); /* Giveup the lazy FPU & vec so we don't have to back them @@ -2097,11 +2168,6 @@ pmac_wakeup_devices(void) { mdelay(100); -#ifdef CONFIG_PMAC_BACKLIGHT - /* Tell backlight code it can use the chip again */ - pmu_backlight_set_sleep(0); -#endif - /* Power back up system devices (including the PIC) */ device_power_up(); @@ -2202,7 +2268,7 @@ static int powerbook_sleep_grackle(void) _set_L2CR(save_l2cr); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + set_context(current->active_mm->context, current->active_mm->pgd); /* Power things up */ pmu_unlock(); @@ -2300,7 +2366,7 @@ powerbook_sleep_Core99(void) _set_L3CR(save_l3cr); /* Restore userland MMU context */ - set_context(current->active_mm->context.id, current->active_mm->pgd); + set_context(current->active_mm->context, current->active_mm->pgd); /* Tell PMU we are ready */ pmu_unlock(); @@ -2416,7 +2482,7 @@ struct pmu_private { spinlock_t lock; #if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) int backlight_locker; -#endif +#endif /* defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) */ }; static LIST_HEAD(all_pmu_pvt); @@ -2466,7 +2532,7 @@ pmu_open(struct inode *inode, struct file *file) spin_lock_irqsave(&all_pvt_lock, flags); #if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) pp->backlight_locker = 0; -#endif +#endif /* defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) */ list_add(&pp->list, &all_pmu_pvt); spin_unlock_irqrestore(&all_pvt_lock, flags); file->private_data = pp; @@ -2561,12 +2627,13 @@ pmu_release(struct inode *inode, struct file *file) spin_lock_irqsave(&all_pvt_lock, flags); list_del(&pp->list); spin_unlock_irqrestore(&all_pvt_lock, flags); - #if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) - if (pp->backlight_locker) - pmac_backlight_enable(); -#endif - + if (pp->backlight_locker) { + spin_lock_irqsave(&pmu_lock, flags); + disable_kernel_backlight--; + spin_unlock_irqrestore(&pmu_lock, flags); + } +#endif /* defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) */ kfree(pp); } unlock_kernel(); @@ -2611,50 +2678,42 @@ pmu_ioctl(struct inode * inode, struct file *filp, return put_user(1, argp); #endif /* CONFIG_PM && CONFIG_PPC32 */ -#ifdef CONFIG_PMAC_BACKLIGHT_LEGACY - /* Compatibility ioctl's for backlight */ +#ifdef CONFIG_PMAC_BACKLIGHT + /* Backlight should have its own device or go via + * the fbdev + */ case PMU_IOC_GET_BACKLIGHT: - { - int brightness; - if (sleep_in_progress) return -EBUSY; - - brightness = pmac_backlight_get_legacy_brightness(); - if (brightness < 0) - return brightness; - else - return put_user(brightness, argp); - - } + error = get_backlight_level(); + if (error < 0) + return error; + return put_user(error, argp); case PMU_IOC_SET_BACKLIGHT: { - int brightness; - + __u32 value; if (sleep_in_progress) return -EBUSY; - - error = get_user(brightness, argp); - if (error) - return error; - - return pmac_backlight_set_legacy_brightness(brightness); + error = get_user(value, argp); + if (!error) + error = set_backlight_level(value); + break; } #ifdef CONFIG_INPUT_ADBHID case PMU_IOC_GRAB_BACKLIGHT: { struct pmu_private *pp = filp->private_data; + unsigned long flags; if (pp->backlight_locker) return 0; - pp->backlight_locker = 1; - pmac_backlight_disable(); - + spin_lock_irqsave(&pmu_lock, flags); + disable_kernel_backlight++; + spin_unlock_irqrestore(&pmu_lock, flags); return 0; } #endif /* CONFIG_INPUT_ADBHID */ -#endif /* CONFIG_PMAC_BACKLIGHT_LEGACY */ - +#endif /* CONFIG_PMAC_BACKLIGHT */ case PMU_IOC_GET_MODEL: return put_user(pmu_kind, argp); case PMU_IOC_HAS_ADB: diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c index 900aade06..81337cd16 100644 --- a/drivers/macintosh/windfarm_cpufreq_clamp.c +++ b/drivers/macintosh/windfarm_cpufreq_clamp.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index 21719abec..a9e88edc0 100644 --- a/drivers/macintosh/windfarm_smu_controls.c +++ b/drivers/macintosh/windfarm_smu_controls.c @@ -56,7 +56,7 @@ static int smu_set_fan(int pwm, u8 id, u16 value) { struct smu_cmd cmd; u8 buffer[16]; - DECLARE_COMPLETION_ONSTACK(comp); + DECLARE_COMPLETION(comp); int rc; /* Fill SMU command structure */ diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c index 3af5fb4a2..bed25dcf8 100644 --- a/drivers/macintosh/windfarm_smu_sensors.c +++ b/drivers/macintosh/windfarm_smu_sensors.c @@ -67,7 +67,7 @@ static void smu_ads_release(struct wf_sensor *sr) static int smu_read_adc(u8 id, s32 *value) { struct smu_simple_cmd cmd; - DECLARE_COMPLETION_ONSTACK(comp); + DECLARE_COMPLETION(comp); int rc; rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1, diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index bf869ed03..ac25a4836 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig @@ -90,7 +90,7 @@ config MD_RAID10 depends on BLK_DEV_MD && EXPERIMENTAL ---help--- RAID-10 provides a combination of striping (RAID-0) and - mirroring (RAID-1) with easier configuration and more flexible + mirroring (RAID-1) with easier configuration and more flexable layout. Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to be the same size (or at least, only as much as the smallest device @@ -104,8 +104,8 @@ config MD_RAID10 If unsure, say Y. -config MD_RAID456 - tristate "RAID-4/RAID-5/RAID-6 mode" +config MD_RAID5 + tristate "RAID-4/RAID-5 mode" depends on BLK_DEV_MD ---help--- A RAID-5 set of N drives with a capacity of C MB per drive provides @@ -116,28 +116,20 @@ config MD_RAID456 while a RAID-5 set distributes the parity across the drives in one of the available parity distribution methods. - A RAID-6 set of N drives with a capacity of C MB per drive - provides the capacity of C * (N - 2) MB, and protects - against a failure of any two drives. For a given sector - (row) number, (N - 2) drives contain data sectors, and two - drives contains two independent redundancy syndromes. Like - RAID-5, RAID-6 distributes the syndromes across the drives - in one of the available parity distribution methods. - Information about Software RAID on Linux is contained in the Software-RAID mini-HOWTO, available from . There you will also learn where to get the supporting user space utilities raidtools. - If you want to use such a RAID-4/RAID-5/RAID-6 set, say Y. To + If you want to use such a RAID-4/RAID-5 set, say Y. To compile this code as a module, choose M here: the module - will be called raid456. + will be called raid5. If unsure, say Y. config MD_RAID5_RESHAPE bool "Support adding drives to a raid-5 array (experimental)" - depends on MD_RAID456 && EXPERIMENTAL + depends on MD_RAID5 && EXPERIMENTAL ---help--- A RAID-5 set can be expanded by adding extra drives. This requires "restriping" the array which means (almost) every @@ -147,7 +139,7 @@ config MD_RAID5_RESHAPE is online. However it is still EXPERIMENTAL code. It should work, but please be sure that you have backups. - You will need mdadm version 2.4.1 or later to use this + You will need mdadm verion 2.4.1 or later to use this feature safely. During the early stage of reshape there is a critical section where live data is being over-written. A crash during this time needs extra care for recovery. The @@ -162,6 +154,28 @@ config MD_RAID5_RESHAPE There should be enough spares already present to make the new array workable. +config MD_RAID6 + tristate "RAID-6 mode" + depends on BLK_DEV_MD + ---help--- + A RAID-6 set of N drives with a capacity of C MB per drive + provides the capacity of C * (N - 2) MB, and protects + against a failure of any two drives. For a given sector + (row) number, (N - 2) drives contain data sectors, and two + drives contains two independent redundancy syndromes. Like + RAID-5, RAID-6 distributes the syndromes across the drives + in one of the available parity distribution methods. + + RAID-6 requires mdadm-1.5.0 or later, available at: + + ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/ + + If you want to use such a RAID-6 set, say Y. To compile + this code as a module, choose M here: the module will be + called raid6. + + If unsure, say Y. + config MD_MULTIPATH tristate "Multipath I/O support" depends on BLK_DEV_MD @@ -221,7 +235,7 @@ config DM_SNAPSHOT tristate "Snapshot target (EXPERIMENTAL)" depends on BLK_DEV_DM && EXPERIMENTAL ---help--- - Allow volume managers to take writable snapshots of a device. + Allow volume managers to take writeable snapshots of a device. config DM_MIRROR tristate "Mirror target (EXPERIMENTAL)" diff --git a/drivers/md/Makefile b/drivers/md/Makefile index 34957a68d..d3efedf6a 100644 --- a/drivers/md/Makefile +++ b/drivers/md/Makefile @@ -8,7 +8,7 @@ dm-multipath-objs := dm-hw-handler.o dm-path-selector.o dm-mpath.o dm-snapshot-objs := dm-snap.o dm-exception-store.o dm-mirror-objs := dm-log.o dm-raid1.o md-mod-objs := md.o bitmap.o -raid456-objs := raid5.o raid6algos.o raid6recov.o raid6tables.o \ +raid6-objs := raid6main.o raid6algos.o raid6recov.o raid6tables.o \ raid6int1.o raid6int2.o raid6int4.o \ raid6int8.o raid6int16.o raid6int32.o \ raid6altivec1.o raid6altivec2.o raid6altivec4.o \ @@ -25,7 +25,8 @@ obj-$(CONFIG_MD_LINEAR) += linear.o obj-$(CONFIG_MD_RAID0) += raid0.o obj-$(CONFIG_MD_RAID1) += raid1.o obj-$(CONFIG_MD_RAID10) += raid10.o -obj-$(CONFIG_MD_RAID456) += raid456.o xor.o +obj-$(CONFIG_MD_RAID5) += raid5.o xor.o +obj-$(CONFIG_MD_RAID6) += raid6.o xor.o obj-$(CONFIG_MD_MULTIPATH) += multipath.o obj-$(CONFIG_MD_FAULTY) += faulty.o obj-$(CONFIG_BLK_DEV_MD) += md-mod.o diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index ecc56765d..f8ffaee20 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -7,6 +7,7 @@ * additions, Copyright (C) 2003-2004, Paul Clements, SteelEye Technology, Inc.: * - added disk storage for bitmap * - changes to allow various bitmap chunk sizes + * - added bitmap daemon (to asynchronously clear bitmap bits from disk) */ /* @@ -14,12 +15,16 @@ * * flush after percent set rather than just time based. (maybe both). * wait if count gets too high, wake when it drops to half. + * allow bitmap to be mirrored with superblock (before or after...) + * allow hot-add to re-instate a current device. + * allow hot-add of bitmap after quiessing device */ #include #include #include #include +#include #include #include #include @@ -67,6 +72,24 @@ static inline char * bmname(struct bitmap *bitmap) } +/* + * test if the bitmap is active + */ +int bitmap_active(struct bitmap *bitmap) +{ + unsigned long flags; + int res = 0; + + if (!bitmap) + return res; + spin_lock_irqsave(&bitmap->lock, flags); + res = bitmap->flags & BITMAP_ACTIVE; + spin_unlock_irqrestore(&bitmap->lock, flags); + return res; +} + +#define WRITE_POOL_SIZE 256 + /* * just a placeholder - calls kmalloc for bitmap pages */ @@ -246,8 +269,6 @@ static struct page *read_sb_page(mddev_t *mddev, long offset, unsigned long inde if (sync_page_io(rdev->bdev, target, PAGE_SIZE, page, READ)) { page->index = index; - attach_page_buffers(page, NULL); /* so that free_buffer will - * quietly no-op */ return page; } } @@ -279,132 +300,77 @@ static int write_sb_page(mddev_t *mddev, long offset, struct page *page, int wai */ static int write_page(struct bitmap *bitmap, struct page *page, int wait) { - struct buffer_head *bh; + int ret = -ENOMEM; if (bitmap->file == NULL) return write_sb_page(bitmap->mddev, bitmap->offset, page, wait); - bh = page_buffers(page); + flush_dcache_page(page); /* make sure visible to anyone reading the file */ - while (bh && bh->b_blocknr) { - atomic_inc(&bitmap->pending_writes); - set_buffer_locked(bh); - set_buffer_mapped(bh); - submit_bh(WRITE, bh); - bh = bh->b_this_page; + if (wait) + lock_page(page); + else { + if (TestSetPageLocked(page)) + return -EAGAIN; /* already locked */ + if (PageWriteback(page)) { + unlock_page(page); + return -EAGAIN; + } } - if (wait) { - wait_event(bitmap->write_wait, - atomic_read(&bitmap->pending_writes)==0); - return (bitmap->flags & BITMAP_WRITE_ERROR) ? -EIO : 0; + ret = page->mapping->a_ops->prepare_write(bitmap->file, page, 0, PAGE_SIZE); + if (!ret) + ret = page->mapping->a_ops->commit_write(bitmap->file, page, 0, + PAGE_SIZE); + if (ret) { + unlock_page(page); + return ret; } - return 0; -} -static void end_bitmap_write(struct buffer_head *bh, int uptodate) -{ - struct bitmap *bitmap = bh->b_private; - unsigned long flags; - - if (!uptodate) { - spin_lock_irqsave(&bitmap->lock, flags); - bitmap->flags |= BITMAP_WRITE_ERROR; - spin_unlock_irqrestore(&bitmap->lock, flags); - } - if (atomic_dec_and_test(&bitmap->pending_writes)) - wake_up(&bitmap->write_wait); -} - -/* copied from buffer.c */ -static void -__clear_page_buffers(struct page *page) -{ - ClearPagePrivate(page); - set_page_private(page, 0); - page_cache_release(page); -} -static void free_buffers(struct page *page) -{ - struct buffer_head *bh = page_buffers(page); - - while (bh) { - struct buffer_head *next = bh->b_this_page; - free_buffer_head(bh); - bh = next; + set_page_dirty(page); /* force it to be written out */ + + if (!wait) { + /* add to list to be waited for by daemon */ + struct page_list *item = mempool_alloc(bitmap->write_pool, GFP_NOIO); + item->page = page; + get_page(page); + spin_lock(&bitmap->write_lock); + list_add(&item->list, &bitmap->complete_pages); + spin_unlock(&bitmap->write_lock); + md_wakeup_thread(bitmap->writeback_daemon); } - __clear_page_buffers(page); - put_page(page); + return write_one_page(page, wait); } -/* read a page from a file. - * We both read the page, and attach buffers to the page to record the - * address of each block (using bmap). These addresses will be used - * to write the block later, completely bypassing the filesystem. - * This usage is similar to how swap files are handled, and allows us - * to write to a file with no concerns of memory allocation failing. - */ +/* read a page from a file, pinning it into cache, and return bytes_read */ static struct page *read_page(struct file *file, unsigned long index, - struct bitmap *bitmap, - unsigned long count) + unsigned long *bytes_read) { + struct inode *inode = file->f_mapping->host; struct page *page = NULL; - struct inode *inode = file->f_dentry->d_inode; - struct buffer_head *bh; - sector_t block; + loff_t isize = i_size_read(inode); + unsigned long end_index = isize >> PAGE_SHIFT; PRINTK("read bitmap file (%dB @ %Lu)\n", (int)PAGE_SIZE, (unsigned long long)index << PAGE_SHIFT); - page = alloc_page(GFP_KERNEL); - if (!page) - page = ERR_PTR(-ENOMEM); + page = read_cache_page(inode->i_mapping, index, + (filler_t *)inode->i_mapping->a_ops->readpage, file); if (IS_ERR(page)) goto out; - - bh = alloc_page_buffers(page, 1<i_blkbits, 0); - if (!bh) { + wait_on_page_locked(page); + if (!PageUptodate(page) || PageError(page)) { put_page(page); - page = ERR_PTR(-ENOMEM); + page = ERR_PTR(-EIO); goto out; } - attach_page_buffers(page, bh); - block = index << (PAGE_SHIFT - inode->i_blkbits); - while (bh) { - if (count == 0) - bh->b_blocknr = 0; - else { - bh->b_blocknr = bmap(inode, block); - if (bh->b_blocknr == 0) { - /* Cannot use this file! */ - free_buffers(page); - page = ERR_PTR(-EINVAL); - goto out; - } - bh->b_bdev = inode->i_sb->s_bdev; - if (count < (1<i_blkbits)) - count = 0; - else - count -= (1<i_blkbits); - - bh->b_end_io = end_bitmap_write; - bh->b_private = bitmap; - atomic_inc(&bitmap->pending_writes); - set_buffer_locked(bh); - set_buffer_mapped(bh); - submit_bh(READ, bh); - } - block++; - bh = bh->b_this_page; - } - page->index = index; - wait_event(bitmap->write_wait, - atomic_read(&bitmap->pending_writes)==0); - if (bitmap->flags & BITMAP_WRITE_ERROR) { - free_buffers(page); - page = ERR_PTR(-EIO); - } + if (index > end_index) /* we have read beyond EOF */ + *bytes_read = 0; + else if (index == end_index) /* possible short read */ + *bytes_read = isize & ~PAGE_MASK; + else + *bytes_read = PAGE_SIZE; /* got a full page */ out: if (IS_ERR(page)) printk(KERN_ALERT "md: bitmap read error: (%dB @ %Lu): %ld\n", @@ -475,14 +441,16 @@ static int bitmap_read_sb(struct bitmap *bitmap) char *reason = NULL; bitmap_super_t *sb; unsigned long chunksize, daemon_sleep, write_behind; + unsigned long bytes_read; unsigned long long events; int err = -EINVAL; /* page 0 is the superblock, read it... */ if (bitmap->file) - bitmap->sb_page = read_page(bitmap->file, 0, bitmap, PAGE_SIZE); + bitmap->sb_page = read_page(bitmap->file, 0, &bytes_read); else { bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0); + bytes_read = PAGE_SIZE; } if (IS_ERR(bitmap->sb_page)) { err = PTR_ERR(bitmap->sb_page); @@ -492,6 +460,13 @@ static int bitmap_read_sb(struct bitmap *bitmap) sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); + if (bytes_read < sizeof(*sb)) { /* short read */ + printk(KERN_INFO "%s: bitmap file superblock truncated\n", + bmname(bitmap)); + err = -ENOSPC; + goto out; + } + chunksize = le32_to_cpu(sb->chunksize); daemon_sleep = le32_to_cpu(sb->daemon_sleep); write_behind = le32_to_cpu(sb->write_behind); @@ -575,6 +550,7 @@ static void bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits, spin_unlock_irqrestore(&bitmap->lock, flags); return; } + get_page(bitmap->sb_page); spin_unlock_irqrestore(&bitmap->lock, flags); sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); switch (op) { @@ -585,6 +561,7 @@ static void bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits, default: BUG(); } kunmap_atomic(sb, KM_USER0); + put_page(bitmap->sb_page); } /* @@ -637,17 +614,48 @@ static void bitmap_file_unmap(struct bitmap *bitmap) while (pages--) if (map[pages]->index != 0) /* 0 is sb_page, release it below */ - free_buffers(map[pages]); + put_page(map[pages]); kfree(map); kfree(attr); - if (sb_page) - free_buffers(sb_page); + safe_put_page(sb_page); +} + +static void bitmap_stop_daemon(struct bitmap *bitmap); + +/* dequeue the next item in a page list -- don't call from irq context */ +static struct page_list *dequeue_page(struct bitmap *bitmap) +{ + struct page_list *item = NULL; + struct list_head *head = &bitmap->complete_pages; + + spin_lock(&bitmap->write_lock); + if (list_empty(head)) + goto out; + item = list_entry(head->prev, struct page_list, list); + list_del(head->prev); +out: + spin_unlock(&bitmap->write_lock); + return item; +} + +static void drain_write_queues(struct bitmap *bitmap) +{ + struct page_list *item; + + while ((item = dequeue_page(bitmap))) { + /* don't bother to wait */ + put_page(item->page); + mempool_free(item, bitmap->write_pool); + } + + wake_up(&bitmap->write_wait); } static void bitmap_file_put(struct bitmap *bitmap) { struct file *file; + struct inode *inode; unsigned long flags; spin_lock_irqsave(&bitmap->lock, flags); @@ -655,14 +663,17 @@ static void bitmap_file_put(struct bitmap *bitmap) bitmap->file = NULL; spin_unlock_irqrestore(&bitmap->lock, flags); - if (file) - wait_event(bitmap->write_wait, - atomic_read(&bitmap->pending_writes)==0); + bitmap_stop_daemon(bitmap); + + drain_write_queues(bitmap); + bitmap_file_unmap(bitmap); if (file) { - struct inode *inode = file->f_dentry->d_inode; - invalidate_inode_pages(inode->i_mapping); + inode = file->f_mapping->host; + spin_lock(&inode->i_lock); + atomic_set(&inode->i_writecount, 1); /* allow writes again */ + spin_unlock(&inode->i_lock); fput(file); } } @@ -697,27 +708,26 @@ static void bitmap_file_kick(struct bitmap *bitmap) } enum bitmap_page_attr { - BITMAP_PAGE_DIRTY = 0, // there are set bits that need to be synced - BITMAP_PAGE_CLEAN = 1, // there are bits that might need to be cleared - BITMAP_PAGE_NEEDWRITE=2, // there are cleared bits that need to be synced + BITMAP_PAGE_DIRTY = 1, // there are set bits that need to be synced + BITMAP_PAGE_CLEAN = 2, // there are bits that might need to be cleared + BITMAP_PAGE_NEEDWRITE=4, // there are cleared bits that need to be synced }; static inline void set_page_attr(struct bitmap *bitmap, struct page *page, enum bitmap_page_attr attr) { - __set_bit((page->index<<2) + attr, bitmap->filemap_attr); + bitmap->filemap_attr[page->index] |= attr; } static inline void clear_page_attr(struct bitmap *bitmap, struct page *page, enum bitmap_page_attr attr) { - __clear_bit((page->index<<2) + attr, bitmap->filemap_attr); + bitmap->filemap_attr[page->index] &= ~attr; } -static inline unsigned long test_page_attr(struct bitmap *bitmap, struct page *page, - enum bitmap_page_attr attr) +static inline unsigned long get_page_attr(struct bitmap *bitmap, struct page *page) { - return test_bit((page->index<<2) + attr, bitmap->filemap_attr); + return bitmap->filemap_attr[page->index]; } /* @@ -741,6 +751,11 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) page = filemap_get_page(bitmap, chunk); bit = file_page_offset(chunk); + + /* make sure the page stays cached until it gets written out */ + if (! (get_page_attr(bitmap, page) & BITMAP_PAGE_DIRTY)) + get_page(page); + /* set the bit */ kaddr = kmap_atomic(page, KM_USER0); if (bitmap->flags & BITMAP_HOSTENDIAN) @@ -760,8 +775,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) * sync the dirty pages of the bitmap file to disk */ int bitmap_unplug(struct bitmap *bitmap) { - unsigned long i, flags; - int dirty, need_write; + unsigned long i, attr, flags; struct page *page; int wait = 0; int err; @@ -778,26 +792,35 @@ int bitmap_unplug(struct bitmap *bitmap) return 0; } page = bitmap->filemap[i]; - dirty = test_page_attr(bitmap, page, BITMAP_PAGE_DIRTY); - need_write = test_page_attr(bitmap, page, BITMAP_PAGE_NEEDWRITE); + attr = get_page_attr(bitmap, page); clear_page_attr(bitmap, page, BITMAP_PAGE_DIRTY); clear_page_attr(bitmap, page, BITMAP_PAGE_NEEDWRITE); - if (dirty) + if ((attr & BITMAP_PAGE_DIRTY)) wait = 1; spin_unlock_irqrestore(&bitmap->lock, flags); - if (dirty | need_write) + if (attr & (BITMAP_PAGE_DIRTY | BITMAP_PAGE_NEEDWRITE)) { err = write_page(bitmap, page, 0); + if (err == -EAGAIN) { + if (attr & BITMAP_PAGE_DIRTY) + err = write_page(bitmap, page, 1); + else + err = 0; + } + if (err) + return 1; + } } if (wait) { /* if any writes were performed, we need to wait on them */ - if (bitmap->file) - wait_event(bitmap->write_wait, - atomic_read(&bitmap->pending_writes)==0); - else + if (bitmap->file) { + spin_lock_irq(&bitmap->write_lock); + wait_event_lock_irq(bitmap->write_wait, + list_empty(&bitmap->complete_pages), bitmap->write_lock, + wake_up_process(bitmap->writeback_daemon->tsk)); + spin_unlock_irq(&bitmap->write_lock); + } else md_super_wait(bitmap->mddev); } - if (bitmap->flags & BITMAP_WRITE_ERROR) - bitmap_file_kick(bitmap); return 0; } @@ -819,7 +842,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) struct page *page = NULL, *oldpage = NULL; unsigned long num_pages, bit_cnt = 0; struct file *file; - unsigned long bytes, offset; + unsigned long bytes, offset, dummy; int outofdate; int ret = -ENOSPC; void *paddr; @@ -856,12 +879,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) if (!bitmap->filemap) goto out; - /* We need 4 bits per page, rounded up to a multiple of sizeof(unsigned long) */ - bitmap->filemap_attr = kzalloc( - (((num_pages*4/8)+sizeof(unsigned long)-1) - /sizeof(unsigned long)) - *sizeof(unsigned long), - GFP_KERNEL); + bitmap->filemap_attr = kzalloc(sizeof(long) * num_pages, GFP_KERNEL); if (!bitmap->filemap_attr) goto out; @@ -872,12 +890,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) index = file_page_index(i); bit = file_page_offset(i); if (index != oldindex) { /* this is a new page, read it in */ - int count; /* unmap the old page, we're done with it */ - if (index == num_pages-1) - count = bytes - index * PAGE_SIZE; - else - count = PAGE_SIZE; if (index == 0) { /* * if we're here then the superblock page @@ -887,7 +900,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) page = bitmap->sb_page; offset = sizeof(bitmap_super_t); } else if (file) { - page = read_page(file, index, bitmap, count); + page = read_page(file, index, &dummy); offset = 0; } else { page = read_sb_page(bitmap->mddev, bitmap->offset, index); @@ -958,11 +971,12 @@ void bitmap_write_all(struct bitmap *bitmap) /* We don't actually write all bitmap blocks here, * just flag them as needing to be written */ - int i; - for (i=0; i < bitmap->file_pages; i++) - set_page_attr(bitmap, bitmap->filemap[i], - BITMAP_PAGE_NEEDWRITE); + unsigned long chunks = bitmap->chunks; + unsigned long bytes = (chunks+7)/8 + sizeof(bitmap_super_t); + unsigned long num_pages = (bytes + PAGE_SIZE-1) / PAGE_SIZE; + while (num_pages--) + bitmap->filemap_attr[num_pages] |= BITMAP_PAGE_NEEDWRITE; } @@ -993,6 +1007,7 @@ int bitmap_daemon_work(struct bitmap *bitmap) struct page *page = NULL, *lastpage = NULL; int err = 0; int blocks; + int attr; void *paddr; if (bitmap == NULL) @@ -1014,34 +1029,43 @@ int bitmap_daemon_work(struct bitmap *bitmap) if (page != lastpage) { /* skip this page unless it's marked as needing cleaning */ - if (!test_page_attr(bitmap, page, BITMAP_PAGE_CLEAN)) { - int need_write = test_page_attr(bitmap, page, - BITMAP_PAGE_NEEDWRITE); - if (need_write) + if (!((attr=get_page_attr(bitmap, page)) & BITMAP_PAGE_CLEAN)) { + if (attr & BITMAP_PAGE_NEEDWRITE) { + get_page(page); clear_page_attr(bitmap, page, BITMAP_PAGE_NEEDWRITE); - + } spin_unlock_irqrestore(&bitmap->lock, flags); - if (need_write) { + if (attr & BITMAP_PAGE_NEEDWRITE) { switch (write_page(bitmap, page, 0)) { + case -EAGAIN: + set_page_attr(bitmap, page, BITMAP_PAGE_NEEDWRITE); + break; case 0: break; default: bitmap_file_kick(bitmap); } + put_page(page); } continue; } /* grab the new page, sync and release the old */ + get_page(page); if (lastpage != NULL) { - if (test_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE)) { + if (get_page_attr(bitmap, lastpage) & BITMAP_PAGE_NEEDWRITE) { clear_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); spin_unlock_irqrestore(&bitmap->lock, flags); err = write_page(bitmap, lastpage, 0); + if (err == -EAGAIN) { + err = 0; + set_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); + } } else { set_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); spin_unlock_irqrestore(&bitmap->lock, flags); } + put_page(lastpage); if (err) bitmap_file_kick(bitmap); } else @@ -1083,19 +1107,131 @@ int bitmap_daemon_work(struct bitmap *bitmap) /* now sync the final page */ if (lastpage != NULL) { spin_lock_irqsave(&bitmap->lock, flags); - if (test_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE)) { + if (get_page_attr(bitmap, lastpage) &BITMAP_PAGE_NEEDWRITE) { clear_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); spin_unlock_irqrestore(&bitmap->lock, flags); err = write_page(bitmap, lastpage, 0); + if (err == -EAGAIN) { + set_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); + err = 0; + } } else { set_page_attr(bitmap, lastpage, BITMAP_PAGE_NEEDWRITE); spin_unlock_irqrestore(&bitmap->lock, flags); } + + put_page(lastpage); } return err; } +static void daemon_exit(struct bitmap *bitmap, mdk_thread_t **daemon) +{ + mdk_thread_t *dmn; + unsigned long flags; + + /* if no one is waiting on us, we'll free the md thread struct + * and exit, otherwise we let the waiter clean things up */ + spin_lock_irqsave(&bitmap->lock, flags); + if ((dmn = *daemon)) { /* no one is waiting, cleanup and exit */ + *daemon = NULL; + spin_unlock_irqrestore(&bitmap->lock, flags); + kfree(dmn); + complete_and_exit(NULL, 0); /* do_exit not exported */ + } + spin_unlock_irqrestore(&bitmap->lock, flags); +} + +static void bitmap_writeback_daemon(mddev_t *mddev) +{ + struct bitmap *bitmap = mddev->bitmap; + struct page *page; + struct page_list *item; + int err = 0; + + if (signal_pending(current)) { + printk(KERN_INFO + "%s: bitmap writeback daemon got signal, exiting...\n", + bmname(bitmap)); + err = -EINTR; + goto out; + } + if (bitmap == NULL) + /* about to be stopped. */ + return; + + PRINTK("%s: bitmap writeback daemon woke up...\n", bmname(bitmap)); + /* wait on bitmap page writebacks */ + while ((item = dequeue_page(bitmap))) { + page = item->page; + mempool_free(item, bitmap->write_pool); + PRINTK("wait on page writeback: %p\n", page); + wait_on_page_writeback(page); + PRINTK("finished page writeback: %p\n", page); + + err = PageError(page); + put_page(page); + if (err) { + printk(KERN_WARNING "%s: bitmap file writeback " + "failed (page %lu): %d\n", + bmname(bitmap), page->index, err); + bitmap_file_kick(bitmap); + goto out; + } + } + out: + wake_up(&bitmap->write_wait); + if (err) { + printk(KERN_INFO "%s: bitmap writeback daemon exiting (%d)\n", + bmname(bitmap), err); + daemon_exit(bitmap, &bitmap->writeback_daemon); + } +} + +static mdk_thread_t *bitmap_start_daemon(struct bitmap *bitmap, + void (*func)(mddev_t *), char *name) +{ + mdk_thread_t *daemon; + char namebuf[32]; + +#ifdef INJECT_FATAL_FAULT_2 + daemon = NULL; +#else + sprintf(namebuf, "%%s_%s", name); + daemon = md_register_thread(func, bitmap->mddev, namebuf); +#endif + if (!daemon) { + printk(KERN_ERR "%s: failed to start bitmap daemon\n", + bmname(bitmap)); + return ERR_PTR(-ECHILD); + } + + md_wakeup_thread(daemon); /* start it running */ + + PRINTK("%s: %s daemon (pid %d) started...\n", + bmname(bitmap), name, daemon->tsk->pid); + + return daemon; +} + +static void bitmap_stop_daemon(struct bitmap *bitmap) +{ + /* the daemon can't stop itself... it'll just exit instead... */ + if (bitmap->writeback_daemon && ! IS_ERR(bitmap->writeback_daemon) && + current->pid != bitmap->writeback_daemon->tsk->pid) { + mdk_thread_t *daemon; + unsigned long flags; + + spin_lock_irqsave(&bitmap->lock, flags); + daemon = bitmap->writeback_daemon; + bitmap->writeback_daemon = NULL; + spin_unlock_irqrestore(&bitmap->lock, flags); + if (daemon && ! IS_ERR(daemon)) + md_unregister_thread(daemon); /* destroy the thread */ + } +} + static bitmap_counter_t *bitmap_get_counter(struct bitmap *bitmap, sector_t offset, int *blocks, int create) @@ -1364,6 +1500,8 @@ static void bitmap_free(struct bitmap *bitmap) /* free all allocated memory */ + mempool_destroy(bitmap->write_pool); + if (bp) /* deallocate the page memory */ for (k = 0; k < pages; k++) if (bp[k].map && !bp[k].hijacked) @@ -1411,20 +1549,20 @@ int bitmap_create(mddev_t *mddev) return -ENOMEM; spin_lock_init(&bitmap->lock); - atomic_set(&bitmap->pending_writes, 0); - init_waitqueue_head(&bitmap->write_wait); - bitmap->mddev = mddev; + spin_lock_init(&bitmap->write_lock); + INIT_LIST_HEAD(&bitmap->complete_pages); + init_waitqueue_head(&bitmap->write_wait); + bitmap->write_pool = mempool_create_kmalloc_pool(WRITE_POOL_SIZE, + sizeof(struct page_list)); + err = -ENOMEM; + if (!bitmap->write_pool) + goto error; + bitmap->file = file; bitmap->offset = mddev->bitmap_offset; - if (file) { - get_file(file); - do_sync_file_range(file, 0, LLONG_MAX, - SYNC_FILE_RANGE_WAIT_BEFORE | - SYNC_FILE_RANGE_WRITE | - SYNC_FILE_RANGE_WAIT_AFTER); - } + if (file) get_file(file); /* read superblock from bitmap file (this sets bitmap->chunksize) */ err = bitmap_read_sb(bitmap); if (err) @@ -1456,6 +1594,8 @@ int bitmap_create(mddev_t *mddev) if (!bitmap->bp) goto error; + bitmap->flags |= BITMAP_ACTIVE; + /* now that we have some pages available, initialize the in-memory * bitmap from the on-disk bitmap */ start = 0; @@ -1473,6 +1613,15 @@ int bitmap_create(mddev_t *mddev) mddev->bitmap = bitmap; + if (file) + /* kick off the bitmap writeback daemon */ + bitmap->writeback_daemon = + bitmap_start_daemon(bitmap, + bitmap_writeback_daemon, + "bitmap_wb"); + + if (IS_ERR(bitmap->writeback_daemon)) + return PTR_ERR(bitmap->writeback_daemon); mddev->thread->timeout = bitmap->daemon_sleep * HZ; return bitmap_update_sb(bitmap); @@ -1489,3 +1638,4 @@ EXPORT_SYMBOL(bitmap_start_sync); EXPORT_SYMBOL(bitmap_end_sync); EXPORT_SYMBOL(bitmap_unplug); EXPORT_SYMBOL(bitmap_close_sync); +EXPORT_SYMBOL(bitmap_daemon_work); diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 31e498fd8..61a590bb6 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -20,7 +20,7 @@ #include "dm.h" -#define DM_MSG_PREFIX "crypt" +#define PFX "crypt: " /* * per bio private data @@ -125,19 +125,19 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, u8 *salt; if (opts == NULL) { - ti->error = "Digest algorithm missing for ESSIV mode"; + ti->error = PFX "Digest algorithm missing for ESSIV mode"; return -EINVAL; } /* Hash the cipher key with the given hash algorithm */ hash_tfm = crypto_alloc_tfm(opts, CRYPTO_TFM_REQ_MAY_SLEEP); if (hash_tfm == NULL) { - ti->error = "Error initializing ESSIV hash"; + ti->error = PFX "Error initializing ESSIV hash"; return -EINVAL; } if (crypto_tfm_alg_type(hash_tfm) != CRYPTO_ALG_TYPE_DIGEST) { - ti->error = "Expected digest algorithm for ESSIV hash"; + ti->error = PFX "Expected digest algorithm for ESSIV hash"; crypto_free_tfm(hash_tfm); return -EINVAL; } @@ -145,7 +145,7 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, saltsize = crypto_tfm_alg_digestsize(hash_tfm); salt = kmalloc(saltsize, GFP_KERNEL); if (salt == NULL) { - ti->error = "Error kmallocing salt storage in ESSIV"; + ti->error = PFX "Error kmallocing salt storage in ESSIV"; crypto_free_tfm(hash_tfm); return -ENOMEM; } @@ -159,20 +159,20 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, CRYPTO_TFM_MODE_ECB | CRYPTO_TFM_REQ_MAY_SLEEP); if (essiv_tfm == NULL) { - ti->error = "Error allocating crypto tfm for ESSIV"; + ti->error = PFX "Error allocating crypto tfm for ESSIV"; kfree(salt); return -EINVAL; } if (crypto_tfm_alg_blocksize(essiv_tfm) != crypto_tfm_alg_ivsize(cc->tfm)) { - ti->error = "Block size of ESSIV cipher does " + ti->error = PFX "Block size of ESSIV cipher does " "not match IV size of block cipher"; crypto_free_tfm(essiv_tfm); kfree(salt); return -EINVAL; } if (crypto_cipher_setkey(essiv_tfm, salt, saltsize) < 0) { - ti->error = "Failed to set key for ESSIV cipher"; + ti->error = PFX "Failed to set key for ESSIV cipher"; crypto_free_tfm(essiv_tfm); kfree(salt); return -EINVAL; @@ -521,7 +521,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) unsigned long long tmpll; if (argc != 5) { - ti->error = "Not enough arguments"; + ti->error = PFX "Not enough arguments"; return -EINVAL; } @@ -532,21 +532,21 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) ivmode = strsep(&ivopts, ":"); if (tmp) - DMWARN("Unexpected additional cipher options"); + DMWARN(PFX "Unexpected additional cipher options"); key_size = strlen(argv[1]) >> 1; cc = kmalloc(sizeof(*cc) + key_size * sizeof(u8), GFP_KERNEL); if (cc == NULL) { ti->error = - "Cannot allocate transparent encryption context"; + PFX "Cannot allocate transparent encryption context"; return -ENOMEM; } cc->key_size = key_size; if ((!key_size && strcmp(argv[1], "-") != 0) || (key_size && crypt_decode_key(cc->key, argv[1], key_size) < 0)) { - ti->error = "Error decoding key"; + ti->error = PFX "Error decoding key"; goto bad1; } @@ -562,22 +562,22 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) else if (strcmp(chainmode, "ecb") == 0) crypto_flags = CRYPTO_TFM_MODE_ECB; else { - ti->error = "Unknown chaining mode"; + ti->error = PFX "Unknown chaining mode"; goto bad1; } if (crypto_flags != CRYPTO_TFM_MODE_ECB && !ivmode) { - ti->error = "This chaining mode requires an IV mechanism"; + ti->error = PFX "This chaining mode requires an IV mechanism"; goto bad1; } tfm = crypto_alloc_tfm(cipher, crypto_flags | CRYPTO_TFM_REQ_MAY_SLEEP); if (!tfm) { - ti->error = "Error allocating crypto tfm"; + ti->error = PFX "Error allocating crypto tfm"; goto bad1; } if (crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER) { - ti->error = "Expected cipher algorithm"; + ti->error = PFX "Expected cipher algorithm"; goto bad2; } @@ -595,7 +595,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) else if (strcmp(ivmode, "essiv") == 0) cc->iv_gen_ops = &crypt_iv_essiv_ops; else { - ti->error = "Invalid IV mode"; + ti->error = PFX "Invalid IV mode"; goto bad2; } @@ -610,7 +610,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) else { cc->iv_size = 0; if (cc->iv_gen_ops) { - DMWARN("Selected cipher does not support IVs"); + DMWARN(PFX "Selected cipher does not support IVs"); if (cc->iv_gen_ops->dtr) cc->iv_gen_ops->dtr(cc); cc->iv_gen_ops = NULL; @@ -619,36 +619,36 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) cc->io_pool = mempool_create_slab_pool(MIN_IOS, _crypt_io_pool); if (!cc->io_pool) { - ti->error = "Cannot allocate crypt io mempool"; + ti->error = PFX "Cannot allocate crypt io mempool"; goto bad3; } cc->page_pool = mempool_create_page_pool(MIN_POOL_PAGES, 0); if (!cc->page_pool) { - ti->error = "Cannot allocate page mempool"; + ti->error = PFX "Cannot allocate page mempool"; goto bad4; } if (tfm->crt_cipher.cit_setkey(tfm, cc->key, key_size) < 0) { - ti->error = "Error setting key"; + ti->error = PFX "Error setting key"; goto bad5; } if (sscanf(argv[2], "%llu", &tmpll) != 1) { - ti->error = "Invalid iv_offset sector"; + ti->error = PFX "Invalid iv_offset sector"; goto bad5; } cc->iv_offset = tmpll; if (sscanf(argv[4], "%llu", &tmpll) != 1) { - ti->error = "Invalid device sector"; + ti->error = PFX "Invalid device sector"; goto bad5; } cc->start = tmpll; if (dm_get_device(ti, argv[3], cc->start, ti->len, dm_table_get_mode(ti->table), &cc->dev)) { - ti->error = "Device lookup failed"; + ti->error = PFX "Device lookup failed"; goto bad5; } @@ -657,7 +657,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) *(ivopts - 1) = ':'; cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL); if (!cc->iv_mode) { - ti->error = "Error kmallocing iv_mode string"; + ti->error = PFX "Error kmallocing iv_mode string"; goto bad5; } strcpy(cc->iv_mode, ivmode); @@ -717,15 +717,13 @@ static int crypt_endio(struct bio *bio, unsigned int done, int error) if (bio->bi_size) return 1; - if (!bio_flagged(bio, BIO_UPTODATE) && !error) - error = -EIO; - bio_put(bio); /* * successful reads are decrypted by the worker thread */ - if (bio_data_dir(io->bio) == READ && !error) { + if ((bio_data_dir(bio) == READ) + && bio_flagged(bio, BIO_UPTODATE)) { kcryptd_queue_io(io); return 0; } @@ -920,13 +918,13 @@ static int __init dm_crypt_init(void) _kcryptd_workqueue = create_workqueue("kcryptd"); if (!_kcryptd_workqueue) { r = -ENOMEM; - DMERR("couldn't create kcryptd"); + DMERR(PFX "couldn't create kcryptd"); goto bad1; } r = dm_register_target(&crypt_target); if (r < 0) { - DMERR("register failed %d", r); + DMERR(PFX "register failed %d", r); goto bad2; } @@ -944,7 +942,7 @@ static void __exit dm_crypt_exit(void) int r = dm_unregister_target(&crypt_target); if (r < 0) - DMERR("unregister failed %d", r); + DMERR(PFX "unregister failed %d", r); destroy_workqueue(_kcryptd_workqueue); kmem_cache_destroy(_crypt_io_pool); diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c index 2a374ccb3..c7067674d 100644 --- a/drivers/md/dm-emc.c +++ b/drivers/md/dm-emc.c @@ -12,8 +12,6 @@ #include #include -#define DM_MSG_PREFIX "multipath emc" - struct emc_handler { spinlock_t lock; @@ -68,7 +66,7 @@ static struct bio *get_failover_bio(struct path *path, unsigned data_size) bio = bio_alloc(GFP_ATOMIC, 1); if (!bio) { - DMERR("get_failover_bio: bio_alloc() failed."); + DMERR("dm-emc: get_failover_bio: bio_alloc() failed."); return NULL; } @@ -80,13 +78,13 @@ static struct bio *get_failover_bio(struct path *path, unsigned data_size) page = alloc_page(GFP_ATOMIC); if (!page) { - DMERR("get_failover_bio: alloc_page() failed."); + DMERR("dm-emc: get_failover_bio: alloc_page() failed."); bio_put(bio); return NULL; } if (bio_add_page(bio, page, data_size, 0) != data_size) { - DMERR("get_failover_bio: alloc_page() failed."); + DMERR("dm-emc: get_failover_bio: alloc_page() failed."); __free_page(page); bio_put(bio); return NULL; @@ -105,7 +103,7 @@ static struct request *get_failover_req(struct emc_handler *h, /* FIXME: Figure out why it fails with GFP_ATOMIC. */ rq = blk_get_request(q, WRITE, __GFP_WAIT); if (!rq) { - DMERR("get_failover_req: blk_get_request failed"); + DMERR("dm-emc: get_failover_req: blk_get_request failed"); return NULL; } @@ -162,7 +160,7 @@ static struct request *emc_trespass_get(struct emc_handler *h, bio = get_failover_bio(path, data_size); if (!bio) { - DMERR("emc_trespass_get: no bio"); + DMERR("dm-emc: emc_trespass_get: no bio"); return NULL; } @@ -175,7 +173,7 @@ static struct request *emc_trespass_get(struct emc_handler *h, /* get request for block layer packet command */ rq = get_failover_req(h, bio, path); if (!rq) { - DMERR("emc_trespass_get: no rq"); + DMERR("dm-emc: emc_trespass_get: no rq"); free_bio(bio); return NULL; } @@ -202,18 +200,18 @@ static void emc_pg_init(struct hw_handler *hwh, unsigned bypassed, * initial state passed into us and then get an update here. */ if (!q) { - DMINFO("emc_pg_init: no queue"); + DMINFO("dm-emc: emc_pg_init: no queue"); goto fail_path; } /* FIXME: The request should be pre-allocated. */ rq = emc_trespass_get(hwh->context, path); if (!rq) { - DMERR("emc_pg_init: no rq"); + DMERR("dm-emc: emc_pg_init: no rq"); goto fail_path; } - DMINFO("emc_pg_init: sending switch-over command"); + DMINFO("dm-emc: emc_pg_init: sending switch-over command"); elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 1); return; @@ -243,18 +241,18 @@ static int emc_create(struct hw_handler *hwh, unsigned argc, char **argv) hr = 0; short_trespass = 0; } else if (argc != 2) { - DMWARN("incorrect number of arguments"); + DMWARN("dm-emc hwhandler: incorrect number of arguments"); return -EINVAL; } else { if ((sscanf(argv[0], "%u", &short_trespass) != 1) || (short_trespass > 1)) { - DMWARN("invalid trespass mode selected"); + DMWARN("dm-emc: invalid trespass mode selected"); return -EINVAL; } if ((sscanf(argv[1], "%u", &hr) != 1) || (hr > 1)) { - DMWARN("invalid honor reservation flag selected"); + DMWARN("dm-emc: invalid honor reservation flag selected"); return -EINVAL; } } @@ -266,14 +264,14 @@ static int emc_create(struct hw_handler *hwh, unsigned argc, char **argv) hwh->context = h; if ((h->short_trespass = short_trespass)) - DMWARN("short trespass command will be send"); + DMWARN("dm-emc: short trespass command will be send"); else - DMWARN("long trespass command will be send"); + DMWARN("dm-emc: long trespass command will be send"); if ((h->hr = hr)) - DMWARN("honor reservation bit will be set"); + DMWARN("dm-emc: honor reservation bit will be set"); else - DMWARN("honor reservation bit will not be set (default)"); + DMWARN("dm-emc: honor reservation bit will not be set (default)"); return 0; } @@ -338,9 +336,9 @@ static int __init dm_emc_init(void) int r = dm_register_hw_handler(&emc_hwh); if (r < 0) - DMERR("register failed %d", r); + DMERR("emc: register failed %d", r); - DMINFO("version 0.0.3 loaded"); + DMINFO("dm-emc version 0.0.3 loaded"); return r; } @@ -350,7 +348,7 @@ static void __exit dm_emc_exit(void) int r = dm_unregister_hw_handler(&emc_hwh); if (r < 0) - DMERR("unregister failed %d", r); + DMERR("emc: unregister failed %d", r); } module_init(dm_emc_init); diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index d12379b5c..34a75939a 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c @@ -16,8 +16,6 @@ #include #include -#define DM_MSG_PREFIX "snapshots" - /*----------------------------------------------------------------- * Persistent snapshots, by persistent we mean that the snapshot * will survive a reboot. diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index d13bb15a8..f7e743691 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. - * Copyright (C) 2004 - 2006 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004 - 2005 Red Hat, Inc. All rights reserved. * * This file is released under the GPL. */ @@ -13,12 +13,12 @@ #include #include #include +#include #include #include #include -#define DM_MSG_PREFIX "ioctl" #define DM_DRIVER_EMAIL "dm-devel@redhat.com" /*----------------------------------------------------------------- @@ -48,7 +48,7 @@ struct vers_iter { static struct list_head _name_buckets[NUM_BUCKETS]; static struct list_head _uuid_buckets[NUM_BUCKETS]; -static void dm_hash_remove_all(int keep_open_devices); +static void dm_hash_remove_all(void); /* * Guards access to both hash tables. @@ -67,12 +67,14 @@ static int dm_hash_init(void) { init_buckets(_name_buckets); init_buckets(_uuid_buckets); + devfs_mk_dir(DM_DIR); return 0; } static void dm_hash_exit(void) { - dm_hash_remove_all(0); + dm_hash_remove_all(); + devfs_remove(DM_DIR); } /*----------------------------------------------------------------- @@ -168,6 +170,25 @@ static void free_cell(struct hash_cell *hc) } } +/* + * devfs stuff. + */ +static int register_with_devfs(struct hash_cell *hc) +{ + struct gendisk *disk = dm_disk(hc->md); + + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), + S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, + DM_DIR "/%s", hc->name); + return 0; +} + +static int unregister_with_devfs(struct hash_cell *hc) +{ + devfs_remove(DM_DIR"/%s", hc->name); + return 0; +} + /* * The kdev_t and uuid of a device can never change once it is * initially inserted. @@ -204,6 +225,7 @@ static int dm_hash_insert(const char *name, const char *uuid, struct mapped_devi } list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid)); } + register_with_devfs(cell); dm_get(md); dm_set_mdptr(md, cell); up_write(&_hash_lock); @@ -223,6 +245,7 @@ static void __hash_remove(struct hash_cell *hc) /* remove from the dev hash */ list_del(&hc->uuid_list); list_del(&hc->name_list); + unregister_with_devfs(hc); dm_set_mdptr(hc->md, NULL); table = dm_get_table(hc->md); @@ -237,41 +260,19 @@ static void __hash_remove(struct hash_cell *hc) free_cell(hc); } -static void dm_hash_remove_all(int keep_open_devices) +static void dm_hash_remove_all(void) { - int i, dev_skipped, dev_removed; + int i; struct hash_cell *hc; struct list_head *tmp, *n; down_write(&_hash_lock); - -retry: - dev_skipped = dev_removed = 0; for (i = 0; i < NUM_BUCKETS; i++) { list_for_each_safe (tmp, n, _name_buckets + i) { hc = list_entry(tmp, struct hash_cell, name_list); - - if (keep_open_devices && - dm_lock_for_deletion(hc->md)) { - dev_skipped++; - continue; - } __hash_remove(hc); - dev_removed = 1; } } - - /* - * Some mapped devices may be using other mapped devices, so if any - * still exist, repeat until we make no further progress. - */ - if (dev_skipped) { - if (dev_removed) - goto retry; - - DMWARN("remove_all left %d open device(s)", dev_skipped); - } - up_write(&_hash_lock); } @@ -318,11 +319,16 @@ static int dm_hash_rename(const char *old, const char *new) /* * rename and move the name cell. */ + unregister_with_devfs(hc); + list_del(&hc->name_list); old_name = hc->name; hc->name = new_name; list_add(&hc->name_list, _name_buckets + hash_str(new_name)); + /* rename the device node in devfs */ + register_with_devfs(hc); + /* * Wake up any dm event waiters. */ @@ -349,7 +355,7 @@ typedef int (*ioctl_fn)(struct dm_ioctl *param, size_t param_size); static int remove_all(struct dm_ioctl *param, size_t param_size) { - dm_hash_remove_all(1); + dm_hash_remove_all(); param->data_size = 0; return 0; } @@ -529,6 +535,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param) { struct gendisk *disk = dm_disk(md); struct dm_table *table; + struct block_device *bdev; param->flags &= ~(DM_SUSPEND_FLAG | DM_READONLY_FLAG | DM_ACTIVE_PRESENT_FLAG); @@ -538,12 +545,20 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param) param->dev = huge_encode_dev(MKDEV(disk->major, disk->first_minor)); - /* - * Yes, this will be out of date by the time it gets back - * to userland, but it is still very useful for - * debugging. - */ - param->open_count = dm_open_count(md); + if (!(param->flags & DM_SKIP_BDGET_FLAG)) { + bdev = bdget_disk(disk, 0); + if (!bdev) + return -ENXIO; + + /* + * Yes, this will be out of date by the time it gets back + * to userland, but it is still very useful for + * debugging. + */ + param->open_count = bdev->bd_openers; + bdput(bdev); + } else + param->open_count = -1; if (disk->policy) param->flags |= DM_READONLY_FLAG; @@ -563,7 +578,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param) static int dev_create(struct dm_ioctl *param, size_t param_size) { - int r, m = DM_ANY_MINOR; + int r; struct mapped_device *md; r = check_name(param->name); @@ -571,9 +586,10 @@ static int dev_create(struct dm_ioctl *param, size_t param_size) return r; if (param->flags & DM_PERSISTENT_DEV_FLAG) - m = MINOR(huge_decode_dev(param->dev)); + r = dm_create_with_minor(MINOR(huge_decode_dev(param->dev)), &md); + else + r = dm_create(&md); - r = dm_create(m, &md); if (r) return r; @@ -646,7 +662,6 @@ static int dev_remove(struct dm_ioctl *param, size_t param_size) { struct hash_cell *hc; struct mapped_device *md; - int r; down_write(&_hash_lock); hc = __find_device_hash_cell(param); @@ -659,17 +674,6 @@ static int dev_remove(struct dm_ioctl *param, size_t param_size) md = hc->md; - /* - * Ensure the device is not open and nothing further can open it. - */ - r = dm_lock_for_deletion(md); - if (r) { - DMWARN("unable to remove open device %s", hc->name); - up_write(&_hash_lock); - dm_put(md); - return r; - } - __hash_remove(hc); up_write(&_hash_lock); dm_put(md); @@ -1472,6 +1476,7 @@ static struct file_operations _ctl_fops = { static struct miscdevice _dm_misc = { .minor = MISC_DYNAMIC_MINOR, .name = DM_NAME, + .devfs_name = "mapper/control", .fops = &_ctl_fops }; diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 47b3c62bb..daf586c08 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -12,8 +12,6 @@ #include #include -#define DM_MSG_PREFIX "linear" - /* * Linear: maps a linear range of a device. */ @@ -31,7 +29,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) unsigned long long tmp; if (argc != 2) { - ti->error = "Invalid argument count"; + ti->error = "dm-linear: Invalid argument count"; return -EINVAL; } @@ -113,7 +111,7 @@ int __init dm_linear_init(void) int r = dm_register_target(&linear_target); if (r < 0) - DMERR("register failed %d", r); + DMERR("linear: register failed %d", r); return r; } @@ -123,5 +121,5 @@ void dm_linear_exit(void) int r = dm_unregister_target(&linear_target); if (r < 0) - DMERR("unregister failed %d", r); + DMERR("linear: unregister failed %d", r); } diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index 5a110fcc7..d73779a42 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c @@ -12,8 +12,6 @@ #include "dm-log.h" #include "dm-io.h" -#define DM_MSG_PREFIX "mirror log" - static LIST_HEAD(_log_types); static DEFINE_SPINLOCK(_lock); @@ -32,8 +30,7 @@ int dm_unregister_dirty_log_type(struct dirty_log_type *type) spin_lock(&_lock); if (type->use_count) - DMWARN("Unregister failed: log type '%s' still in use", - type->name); + DMWARN("Attempt to unregister a log type that is still in use"); else list_del(&type->list); @@ -139,7 +136,7 @@ struct log_c { unsigned bitset_uint32_count; uint32_t *clean_bits; uint32_t *sync_bits; - uint32_t *recovering_bits; + uint32_t *recovering_bits; /* FIXME: this seems excessive */ int sync_search; @@ -150,17 +147,16 @@ struct log_c { FORCESYNC, /* Force a sync to happen */ } sync; - int failure_response; - /* * Disk log fields */ - int log_dev_failed; struct dm_dev *log_dev; struct log_header header; struct io_region header_location; struct log_header *disk_header; + + struct io_region bits_location; }; /* @@ -244,40 +240,58 @@ static inline int write_header(struct log_c *log) log->disk_header, &ebits); } +/*---------------------------------------------------------------- + * Bits IO + *--------------------------------------------------------------*/ +static int read_bits(struct log_c *log) +{ + int r; + unsigned long ebits; + + r = dm_io_sync_vm(1, &log->bits_location, READ, + log->clean_bits, &ebits); + if (r) + return r; + + return 0; +} + +static int write_bits(struct log_c *log) +{ + unsigned long ebits; + return dm_io_sync_vm(1, &log->bits_location, WRITE, + log->clean_bits, &ebits); +} + /*---------------------------------------------------------------- * core log constructor/destructor * - * argv contains 1 - 3 arguments: - * [[no]sync] [block_on_error] + * argv contains region_size followed optionally by [no]sync *--------------------------------------------------------------*/ #define BYTE_SHIFT 3 -static int create_log_context(struct dirty_log *log, struct dm_target *ti, - unsigned int argc, char **argv, - struct dm_dev *dev) +static int core_ctr(struct dirty_log *log, struct dm_target *ti, + unsigned int argc, char **argv) { - int i; enum sync sync = DEFAULTSYNC; - int failure_response = DMLOG_IOERR_IGNORE; + struct log_c *lc; uint32_t region_size; unsigned int region_count; - size_t bitset_size, buf_size; + size_t bitset_size; - if (argc < 1 || argc > 3) { + if (argc < 1 || argc > 2) { DMWARN("wrong number of arguments to mirror log"); return -EINVAL; } - for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "sync")) + if (argc > 1) { + if (!strcmp(argv[1], "sync")) sync = FORCESYNC; - else if (!strcmp(argv[i], "nosync")) + else if (!strcmp(argv[1], "nosync")) sync = NOSYNC; - else if (!strcmp(argv[i], "block_on_error")) - failure_response = DMLOG_IOERR_BLOCK; else { DMWARN("unrecognised sync argument to mirror log: %s", - argv[i]); + argv[1]); return -EINVAL; } } @@ -300,60 +314,27 @@ static int create_log_context(struct dirty_log *log, struct dm_target *ti, lc->region_size = region_size; lc->region_count = region_count; lc->sync = sync; - lc->failure_response = failure_response; /* * Work out how many "unsigned long"s we need to hold the bitset. */ bitset_size = dm_round_up(region_count, - sizeof(*lc->clean_bits) << BYTE_SHIFT); + sizeof(unsigned long) << BYTE_SHIFT); bitset_size >>= BYTE_SHIFT; - lc->bitset_uint32_count = bitset_size / sizeof(*lc->clean_bits); - - /* - * Disk log? - */ - if (!dev) { - lc->clean_bits = vmalloc(bitset_size); - if (!lc->clean_bits) { - DMWARN("couldn't allocate clean bitset"); - kfree(lc); - return -ENOMEM; - } - lc->disk_header = NULL; - } else { - lc->log_dev = dev; - lc->log_dev_failed = 0; - lc->header_location.bdev = lc->log_dev->bdev; - lc->header_location.sector = 0; - - /* - * Buffer holds both header and bitset. - */ - buf_size = dm_round_up((LOG_OFFSET << SECTOR_SHIFT) + - bitset_size, ti->limits.hardsect_size); - lc->header_location.count = buf_size >> SECTOR_SHIFT; - - lc->disk_header = vmalloc(buf_size); - if (!lc->disk_header) { - DMWARN("couldn't allocate disk log buffer"); - kfree(lc); - return -ENOMEM; - } - - lc->clean_bits = (void *)lc->disk_header + - (LOG_OFFSET << SECTOR_SHIFT); + lc->bitset_uint32_count = bitset_size / 4; + lc->clean_bits = vmalloc(bitset_size); + if (!lc->clean_bits) { + DMWARN("couldn't allocate clean bitset"); + kfree(lc); + return -ENOMEM; } - memset(lc->clean_bits, -1, bitset_size); lc->sync_bits = vmalloc(bitset_size); if (!lc->sync_bits) { DMWARN("couldn't allocate sync bitset"); - if (!dev) - vfree(lc->clean_bits); - vfree(lc->disk_header); + vfree(lc->clean_bits); kfree(lc); return -ENOMEM; } @@ -362,55 +343,41 @@ static int create_log_context(struct dirty_log *log, struct dm_target *ti, lc->recovering_bits = vmalloc(bitset_size); if (!lc->recovering_bits) { - DMWARN("couldn't allocate recovering bitset"); + DMWARN("couldn't allocate sync bitset"); vfree(lc->sync_bits); - if (!dev) - vfree(lc->clean_bits); - vfree(lc->disk_header); + vfree(lc->clean_bits); kfree(lc); return -ENOMEM; } memset(lc->recovering_bits, 0, bitset_size); lc->sync_search = 0; log->context = lc; - return 0; } -static int core_ctr(struct dirty_log *log, struct dm_target *ti, - unsigned int argc, char **argv) -{ - return create_log_context(log, ti, argc, argv, NULL); -} - -static void destroy_log_context(struct log_c *lc) -{ - vfree(lc->sync_bits); - vfree(lc->recovering_bits); - kfree(lc); -} - static void core_dtr(struct dirty_log *log) { struct log_c *lc = (struct log_c *) log->context; - vfree(lc->clean_bits); - destroy_log_context(lc); + vfree(lc->sync_bits); + vfree(lc->recovering_bits); + kfree(lc); } /*---------------------------------------------------------------- * disk log constructor/destructor * - * argv contains 2 - 4 arguments: - * [[no]sync] [block_on_error] + * argv contains log_device region_size followed optionally by [no]sync *--------------------------------------------------------------*/ static int disk_ctr(struct dirty_log *log, struct dm_target *ti, unsigned int argc, char **argv) { int r; + size_t size; + struct log_c *lc; struct dm_dev *dev; - if (argc < 2 || argc > 4) { + if (argc < 2 || argc > 3) { DMWARN("wrong number of arguments to disk mirror log"); return -EINVAL; } @@ -420,22 +387,49 @@ static int disk_ctr(struct dirty_log *log, struct dm_target *ti, if (r) return r; - r = create_log_context(log, ti, argc - 1, argv + 1, dev); + r = core_ctr(log, ti, argc - 1, argv + 1); if (r) { dm_put_device(ti, dev); return r; } + lc = (struct log_c *) log->context; + lc->log_dev = dev; + + /* setup the disk header fields */ + lc->header_location.bdev = lc->log_dev->bdev; + lc->header_location.sector = 0; + lc->header_location.count = 1; + + /* + * We can't read less than this amount, even though we'll + * not be using most of this space. + */ + lc->disk_header = vmalloc(1 << SECTOR_SHIFT); + if (!lc->disk_header) + goto bad; + + /* setup the disk bitset fields */ + lc->bits_location.bdev = lc->log_dev->bdev; + lc->bits_location.sector = LOG_OFFSET; + + size = dm_round_up(lc->bitset_uint32_count * sizeof(uint32_t), + 1 << SECTOR_SHIFT); + lc->bits_location.count = size >> SECTOR_SHIFT; return 0; + + bad: + dm_put_device(ti, lc->log_dev); + core_dtr(log); + return -ENOMEM; } static void disk_dtr(struct dirty_log *log) { struct log_c *lc = (struct log_c *) log->context; - dm_put_device(lc->ti, lc->log_dev); vfree(lc->disk_header); - destroy_log_context(lc); + core_dtr(log); } static int count_bits32(uint32_t *addr, unsigned size) @@ -448,21 +442,6 @@ static int count_bits32(uint32_t *addr, unsigned size) return count; } -static void fail_log_device(struct log_c *lc) -{ - if (lc->log_dev_failed) - return; - - lc->log_dev_failed = 1; - if (lc->failure_response == DMLOG_IOERR_BLOCK) - dm_table_event(lc->ti->table); -} - -static void restore_log_device(struct log_c *lc) -{ - lc->log_dev_failed = 0; -} - static int disk_resume(struct dirty_log *log) { int r; @@ -470,18 +449,17 @@ static int disk_resume(struct dirty_log *log) struct log_c *lc = (struct log_c *) log->context; size_t size = lc->bitset_uint32_count * sizeof(uint32_t); - /* - * Read the disk header, but only if we know it is good. - * Assume the worst in the event of failure. - */ - if (!lc->log_dev_failed && read_header(lc)) { - DMWARN("Failed to read header on mirror log device, %s", - lc->log_dev->name); - fail_log_device(lc); - lc->header.nr_regions = 0; - } + /* read the disk header */ + r = read_header(lc); + if (r) + return r; + + /* read the bits */ + r = read_bits(lc); + if (r) + return r; - /* set or clear any new bits -- device has grown */ + /* set or clear any new bits */ if (lc->sync == NOSYNC) for (i = lc->header.nr_regions; i < lc->region_count; i++) /* FIXME: amazingly inefficient */ @@ -491,28 +469,20 @@ static int disk_resume(struct dirty_log *log) /* FIXME: amazingly inefficient */ log_clear_bit(lc, lc->clean_bits, i); - /* clear any old bits -- device has shrunk */ - for (i = lc->region_count; i % (sizeof(*lc->clean_bits) << BYTE_SHIFT); i++) - log_clear_bit(lc, lc->clean_bits, i); - /* copy clean across to sync */ memcpy(lc->sync_bits, lc->clean_bits, size); lc->sync_count = count_bits32(lc->clean_bits, lc->bitset_uint32_count); - lc->sync_search = 0; + + /* write the bits */ + r = write_bits(lc); + if (r) + return r; /* set the correct number of regions in the header */ lc->header.nr_regions = lc->region_count; /* write the new header */ - r = write_header(lc); - if (r) { - DMWARN("Failed to write header on mirror log device, %s", - lc->log_dev->name); - fail_log_device(lc); - } else - restore_log_device(lc); - - return r; + return write_header(lc); } static uint32_t core_get_region_size(struct dirty_log *log) @@ -521,13 +491,6 @@ static uint32_t core_get_region_size(struct dirty_log *log) return lc->region_size; } -static int core_resume(struct dirty_log *log) -{ - struct log_c *lc = (struct log_c *) log->context; - lc->sync_search = 0; - return 0; -} - static int core_is_clean(struct dirty_log *log, region_t region) { struct log_c *lc = (struct log_c *) log->context; @@ -546,11 +509,6 @@ static int core_flush(struct dirty_log *log) return 0; } -static int disk_presuspend(struct dirty_log *log) -{ - return 0; -} - static int disk_flush(struct dirty_log *log) { int r; @@ -560,13 +518,10 @@ static int disk_flush(struct dirty_log *log) if (!lc->touched) return 0; - r = write_header(lc); - if (r) - fail_log_device(lc); - else { + r = write_bits(lc); + if (!r) lc->touched = 0; - restore_log_device(lc); - } + return r; } @@ -605,19 +560,16 @@ static int core_get_resync_work(struct dirty_log *log, region_t *region) return 1; } -static void core_set_region_sync(struct dirty_log *log, region_t region, - int in_sync) +static void core_complete_resync_work(struct dirty_log *log, region_t region, + int success) { struct log_c *lc = (struct log_c *) log->context; log_clear_bit(lc, lc->recovering_bits, region); - if (in_sync) { + if (success) { log_set_bit(lc, lc->sync_bits, region); lc->sync_count++; - } else if (log_test_bit(lc->sync_bits, region)) { - lc->sync_count--; - log_clear_bit(lc, lc->sync_bits, region); - } + } } static region_t core_get_sync_count(struct dirty_log *log) @@ -635,22 +587,16 @@ static int core_status(struct dirty_log *log, status_type_t status, char *result, unsigned int maxlen) { int sz = 0; - int params; struct log_c *lc = log->context; switch(status) { case STATUSTYPE_INFO: - DMEMIT("1 core"); break; case STATUSTYPE_TABLE: - params = (lc->sync == DEFAULTSYNC) ? 1 : 2; - params += (lc->failure_response == DMLOG_IOERR_BLOCK) ? 1 : 0; - - DMEMIT("%s %d %u ", log->type->name, params, lc->region_size); + DMEMIT("%s %u %u ", log->type->name, + lc->sync == DEFAULTSYNC ? 1 : 2, lc->region_size); DMEMIT_SYNC; - if (lc->failure_response == DMLOG_IOERR_BLOCK) - DMEMIT("block_on_error "); } return sz; @@ -660,44 +606,29 @@ static int disk_status(struct dirty_log *log, status_type_t status, char *result, unsigned int maxlen) { int sz = 0; - int params; + char buffer[16]; struct log_c *lc = log->context; switch(status) { case STATUSTYPE_INFO: - DMEMIT("3 disk %s %c", lc->log_dev->name, - lc->log_dev_failed ? 'D' : 'A'); break; case STATUSTYPE_TABLE: - params = (lc->sync == DEFAULTSYNC) ? 2 : 3; - params += (lc->failure_response == DMLOG_IOERR_BLOCK) ? 1 : 0; - - DMEMIT("%s %d %s %u ", log->type->name, - params, - lc->log_dev->name, + format_dev_t(buffer, lc->log_dev->bdev->bd_dev); + DMEMIT("%s %u %s %u ", log->type->name, + lc->sync == DEFAULTSYNC ? 2 : 3, buffer, lc->region_size); DMEMIT_SYNC; - if (lc->failure_response == DMLOG_IOERR_BLOCK) - DMEMIT("block_on_error "); } return sz; } -static int core_get_failure_response(struct dirty_log *log) -{ - struct log_c *lc = log->context; - - return lc->failure_response; -} - static struct dirty_log_type _core_type = { .name = "core", .module = THIS_MODULE, .ctr = core_ctr, .dtr = core_dtr, - .resume = core_resume, .get_region_size = core_get_region_size, .is_clean = core_is_clean, .in_sync = core_in_sync, @@ -705,10 +636,9 @@ static struct dirty_log_type _core_type = { .mark_region = core_mark_region, .clear_region = core_clear_region, .get_resync_work = core_get_resync_work, - .set_region_sync = core_set_region_sync, + .complete_resync_work = core_complete_resync_work, .get_sync_count = core_get_sync_count, .status = core_status, - .get_failure_response = core_get_failure_response, }; static struct dirty_log_type _disk_type = { @@ -716,8 +646,7 @@ static struct dirty_log_type _disk_type = { .module = THIS_MODULE, .ctr = disk_ctr, .dtr = disk_dtr, - .presuspend = disk_presuspend, - .postsuspend = disk_flush, + .suspend = disk_flush, .resume = disk_resume, .get_region_size = core_get_region_size, .is_clean = core_is_clean, @@ -726,10 +655,9 @@ static struct dirty_log_type _disk_type = { .mark_region = core_mark_region, .clear_region = core_clear_region, .get_resync_work = core_get_resync_work, - .set_region_sync = core_set_region_sync, + .complete_resync_work = core_complete_resync_work, .get_sync_count = core_get_sync_count, .status = disk_status, - .get_failure_response = core_get_failure_response, }; int __init dm_dirty_log_init(void) diff --git a/drivers/md/dm-log.h b/drivers/md/dm-log.h index baeca8e82..5ae5309eb 100644 --- a/drivers/md/dm-log.h +++ b/drivers/md/dm-log.h @@ -9,15 +9,6 @@ #include "dm.h" -/* - * Values returned by get_failure_response() - * DMLOG_IOERR_IGNORE: ignore device failures - * DMLOG_IOERR_BLOCK: issue dm event, and do not complete - * I/O until presuspend is recieved. - */ -#define DMLOG_IOERR_IGNORE 0 -#define DMLOG_IOERR_BLOCK 1 - typedef sector_t region_t; struct dirty_log_type; @@ -32,7 +23,6 @@ struct dirty_log_type { const char *name; struct module *module; unsigned int use_count; - unsigned int flags; int (*ctr)(struct dirty_log *log, struct dm_target *ti, unsigned int argc, char **argv); @@ -42,8 +32,7 @@ struct dirty_log_type { * There are times when we don't want the log to touch * the disk. */ - int (*presuspend)(struct dirty_log *log); - int (*postsuspend)(struct dirty_log *log); + int (*suspend)(struct dirty_log *log); int (*resume)(struct dirty_log *log); /* @@ -101,12 +90,12 @@ struct dirty_log_type { int (*get_resync_work)(struct dirty_log *log, region_t *region); /* - * This notifies the log that the resync status of a region - * has changed. It also clears the region from the recovering - * list (if present). + * This notifies the log that the resync of an area has + * been completed. The log should then mark this region + * as CLEAN. */ - void (*set_region_sync)(struct dirty_log *log, - region_t region, int in_sync); + void (*complete_resync_work)(struct dirty_log *log, + region_t region, int success); /* * Returns the number of regions that are in sync. @@ -118,24 +107,6 @@ struct dirty_log_type { */ int (*status)(struct dirty_log *log, status_type_t status_type, char *result, unsigned int maxlen); - - /* - * Return the code describing what to do in the event - * of a device failure. - */ - int (*get_failure_response)(struct dirty_log *log); - - /* - * Returns: 0, 1 - * - * This is necessary for cluster mirroring. It provides - * a way to detect recovery on another node, so we - * aren't writing concurrently. This function is likely - * to block (when a cluster log is used). - */ - int (*is_remote_recovering)(struct dirty_log *log, region_t region); - - int (*reserved[5])(int a); }; int dm_register_dirty_log_type(struct dirty_log_type *type); diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 93f701ea8..5af5265cf 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -21,7 +21,6 @@ #include #include -#define DM_MSG_PREFIX "multipath" #define MESG_STR(x) x, sizeof(x) /* Path properties */ @@ -447,6 +446,8 @@ struct param { char *error; }; +#define ESTR(s) ("dm-multipath: " s) + static int read_param(struct param *param, char *str, unsigned *v, char **error) { if (!str || @@ -494,12 +495,12 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg, unsigned ps_argc; static struct param _params[] = { - {0, 1024, "invalid number of path selector args"}, + {0, 1024, ESTR("invalid number of path selector args")}, }; pst = dm_get_path_selector(shift(as)); if (!pst) { - ti->error = "unknown path selector type"; + ti->error = ESTR("unknown path selector type"); return -EINVAL; } @@ -510,7 +511,7 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg, r = pst->create(&pg->ps, ps_argc, as->argv); if (r) { dm_put_path_selector(pst); - ti->error = "path selector constructor failed"; + ti->error = ESTR("path selector constructor failed"); return r; } @@ -528,7 +529,7 @@ static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps, /* we need at least a path arg */ if (as->argc < 1) { - ti->error = "no device given"; + ti->error = ESTR("no device given"); return NULL; } @@ -539,7 +540,7 @@ static struct pgpath *parse_path(struct arg_set *as, struct path_selector *ps, r = dm_get_device(ti, shift(as), ti->begin, ti->len, dm_table_get_mode(ti->table), &p->path.dev); if (r) { - ti->error = "error getting device"; + ti->error = ESTR("error getting device"); goto bad; } @@ -561,8 +562,8 @@ static struct priority_group *parse_priority_group(struct arg_set *as, struct dm_target *ti) { static struct param _params[] = { - {1, 1024, "invalid number of paths"}, - {0, 1024, "invalid number of selector args"} + {1, 1024, ESTR("invalid number of paths")}, + {0, 1024, ESTR("invalid number of selector args")} }; int r; @@ -571,13 +572,13 @@ static struct priority_group *parse_priority_group(struct arg_set *as, if (as->argc < 2) { as->argc = 0; - ti->error = "not enough priority group aruments"; + ti->error = ESTR("not enough priority group aruments"); return NULL; } pg = alloc_priority_group(); if (!pg) { - ti->error = "couldn't allocate priority group"; + ti->error = ESTR("couldn't allocate priority group"); return NULL; } pg->m = m; @@ -632,7 +633,7 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m, unsigned hw_argc; static struct param _params[] = { - {0, 1024, "invalid number of hardware handler args"}, + {0, 1024, ESTR("invalid number of hardware handler args")}, }; r = read_param(_params, shift(as), &hw_argc, &ti->error); @@ -644,14 +645,14 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m, hwht = dm_get_hw_handler(shift(as)); if (!hwht) { - ti->error = "unknown hardware handler type"; + ti->error = ESTR("unknown hardware handler type"); return -EINVAL; } r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv); if (r) { dm_put_hw_handler(hwht); - ti->error = "hardware handler constructor failed"; + ti->error = ESTR("hardware handler constructor failed"); return r; } @@ -668,7 +669,7 @@ static int parse_features(struct arg_set *as, struct multipath *m, unsigned argc; static struct param _params[] = { - {0, 1, "invalid number of feature args"}, + {0, 1, ESTR("invalid number of feature args")}, }; r = read_param(_params, shift(as), &argc, &ti->error); @@ -691,8 +692,8 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, { /* target parameters */ static struct param _params[] = { - {1, 1024, "invalid number of priority groups"}, - {1, 1024, "invalid initial priority group number"}, + {1, 1024, ESTR("invalid number of priority groups")}, + {1, 1024, ESTR("invalid initial priority group number")}, }; int r; @@ -706,7 +707,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, m = alloc_multipath(); if (!m) { - ti->error = "can't allocate multipath"; + ti->error = ESTR("can't allocate multipath"); return -EINVAL; } @@ -747,7 +748,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc, } if (pg_count != m->nr_priority_groups) { - ti->error = "priority group count mismatch"; + ti->error = ESTR("priority group count mismatch"); r = -EINVAL; goto bad; } @@ -807,7 +808,7 @@ static int fail_path(struct pgpath *pgpath) if (!pgpath->path.is_active) goto out; - DMWARN("Failing path %s.", pgpath->path.dev->name); + DMWARN("dm-multipath: Failing path %s.", pgpath->path.dev->name); pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path); pgpath->path.is_active = 0; @@ -1250,7 +1251,7 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv) r = dm_get_device(ti, argv[1], ti->begin, ti->len, dm_table_get_mode(ti->table), &dev); if (r) { - DMWARN("message: error getting device %s", + DMWARN("dm-multipath message: error getting device %s", argv[1]); return -EINVAL; } @@ -1309,7 +1310,7 @@ static int __init dm_multipath_init(void) return -ENOMEM; } - DMINFO("version %u.%u.%u loaded", + DMINFO("dm-multipath version %u.%u.%u loaded", multipath_target.version[0], multipath_target.version[1], multipath_target.version[2]); diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 8cfc33b1e..2cab46ed1 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -6,7 +6,6 @@ #include "dm.h" #include "dm-bio-list.h" -#include "dm-bio-record.h" #include "dm-io.h" #include "dm-log.h" #include "kcopyd.h" @@ -21,13 +20,8 @@ #include #include -#define DM_MSG_PREFIX "raid1" - static struct workqueue_struct *_kmirrord_wq; static struct work_struct _kmirrord_work; -DECLARE_WAIT_QUEUE_HEAD(recovery_stopped_event); - -static int dm_mirror_error_on_log_failure = 1; static inline void wake(void) { @@ -87,12 +81,10 @@ struct region_hash { struct list_head *buckets; spinlock_t region_lock; - atomic_t recovery_in_flight; struct semaphore recovery_count; struct list_head clean_regions; struct list_head quiesced_regions; struct list_head recovered_regions; - struct list_head failed_recovered_regions; }; enum { @@ -119,8 +111,7 @@ struct region { * Mirror set structures. *---------------------------------------------------------------*/ struct mirror { - atomic_t error_count; /* Error counter to flag mirror failure */ - struct mirror_set *ms; + atomic_t error_count; struct dm_dev *dev; sector_t offset; }; @@ -131,10 +122,9 @@ struct mirror_set { struct region_hash rh; struct kcopyd_client *kcopyd_client; - spinlock_t lock; /* protects the lists */ + spinlock_t lock; /* protects the next two lists */ struct bio_list reads; struct bio_list writes; - struct bio_list failures; /* recovery */ region_t nr_regions; @@ -143,8 +133,6 @@ struct mirror_set { struct mirror *default_mirror; /* Default mirror */ unsigned int nr_mirrors; - atomic_t read_count; /* Read counter for read balancing */ - struct mirror *read_mirror; /* Last mirror read. */ struct mirror mirror[0]; }; @@ -201,11 +189,9 @@ static int rh_init(struct region_hash *rh, struct mirror_set *ms, spin_lock_init(&rh->region_lock); sema_init(&rh->recovery_count, 0); - atomic_set(&rh->recovery_in_flight, 0); INIT_LIST_HEAD(&rh->clean_regions); INIT_LIST_HEAD(&rh->quiesced_regions); INIT_LIST_HEAD(&rh->recovered_regions); - INIT_LIST_HEAD(&rh->failed_recovered_regions); rh->region_pool = mempool_create_kmalloc_pool(MIN_REGIONS, sizeof(struct region)); @@ -353,24 +339,12 @@ static void dispatch_bios(struct mirror_set *ms, struct bio_list *bio_list) } } -static void complete_resync_work(struct region *reg, int success) -{ - struct region_hash *rh = reg->rh; - - rh->log->type->set_region_sync(rh->log, reg->key, success); - if (atomic_dec_and_test(&rh->recovery_in_flight)) - wake_up_all(&recovery_stopped_event); - dispatch_bios(rh->ms, ®->delayed_bios); - up(&rh->recovery_count); -} - static void rh_update_states(struct region_hash *rh) { struct region *reg, *next; LIST_HEAD(clean); LIST_HEAD(recovered); - LIST_HEAD(failed_recovered); /* * Quickly grab the lists. @@ -394,15 +368,6 @@ static void rh_update_states(struct region_hash *rh) list_for_each_entry (reg, &recovered, list) list_del(®->hash_list); } - - if (!list_empty(&rh->failed_recovered_regions)) { - list_splice(&rh->failed_recovered_regions, &failed_recovered); - INIT_LIST_HEAD(&rh->failed_recovered_regions); - - list_for_each_entry (reg, &failed_recovered, list) - list_del(®->hash_list); - } - spin_unlock(&rh->region_lock); write_unlock_irq(&rh->hash_lock); @@ -413,12 +378,9 @@ static void rh_update_states(struct region_hash *rh) */ list_for_each_entry_safe (reg, next, &recovered, list) { rh->log->type->clear_region(rh->log, reg->key); - complete_resync_work(reg, 1); - mempool_free(reg, rh->region_pool); - } - - list_for_each_entry_safe (reg, next, &failed_recovered, list) { - complete_resync_work(reg, 0); + rh->log->type->complete_resync_work(rh->log, reg->key, 1); + dispatch_bios(rh->ms, ®->delayed_bios); + up(&rh->recovery_count); mempool_free(reg, rh->region_pool); } @@ -528,9 +490,11 @@ static int __rh_recovery_prepare(struct region_hash *rh) /* Already quiesced ? */ if (atomic_read(®->pending)) list_del_init(®->list); - else - list_move(®->list, &rh->quiesced_regions); + else { + list_del_init(®->list); + list_add(®->list, &rh->quiesced_regions); + } spin_unlock_irq(&rh->region_lock); return 1; @@ -538,21 +502,11 @@ static int __rh_recovery_prepare(struct region_hash *rh) static void rh_recovery_prepare(struct region_hash *rh) { - /* Extra reference to avoid race with rh_stop_recovery */ - atomic_inc(&rh->recovery_in_flight); - - while (!down_trylock(&rh->recovery_count)) { - atomic_inc(&rh->recovery_in_flight); + while (!down_trylock(&rh->recovery_count)) if (__rh_recovery_prepare(rh) <= 0) { - atomic_dec(&rh->recovery_in_flight); up(&rh->recovery_count); break; } - } - - /* Drop the extra reference */ - if (atomic_dec_and_test(&rh->recovery_in_flight)) - wake_up_all(&recovery_stopped_event); } /* @@ -573,26 +527,21 @@ static struct region *rh_recovery_start(struct region_hash *rh) return reg; } +/* FIXME: success ignored for now */ static void rh_recovery_end(struct region *reg, int success) { struct region_hash *rh = reg->rh; spin_lock_irq(&rh->region_lock); - if (success || - (rh->log->type->get_failure_response(rh->log) == DMLOG_IOERR_IGNORE)) - list_add(®->list, ®->rh->recovered_regions); - else { - reg->state = RH_NOSYNC; - list_add(®->list, ®->rh->failed_recovered_regions); - } + list_add(®->list, ®->rh->recovered_regions); spin_unlock_irq(&rh->region_lock); wake(); } -static int rh_flush(struct region_hash *rh) +static void rh_flush(struct region_hash *rh) { - return rh->log->type->flush(rh->log); + rh->log->type->flush(rh->log); } static void rh_delay(struct region_hash *rh, struct bio *bio) @@ -624,39 +573,24 @@ static void rh_start_recovery(struct region_hash *rh) wake(); } -struct bio_map_info { - struct mirror *bmi_m; - struct dm_bio_details bmi_bd; -}; - -static mempool_t *bio_map_info_pool = NULL; - -static void *bio_map_info_alloc(unsigned int gfp_mask, void *pool_data){ - return kmalloc(sizeof(struct bio_map_info), gfp_mask); -} - -static void bio_map_info_free(void *element, void *pool_data){ - kfree(element); -} - /* * Every mirror should look like this one. */ #define DEFAULT_MIRROR 0 /* - * This is yucky. We squirrel the mirror struct away inside - * bi_next for read/write buffers. This is safe since the bh + * This is yucky. We squirrel the mirror_set struct away inside + * bi_next for write buffers. This is safe since the bh * doesn't get submitted to the lower levels of block layer. */ -static struct mirror *bio_get_m(struct bio *bio) +static struct mirror_set *bio_get_ms(struct bio *bio) { - return (struct mirror *) bio->bi_next; + return (struct mirror_set *) bio->bi_next; } -static void bio_set_m(struct bio *bio, struct mirror *m) +static void bio_set_ms(struct bio *bio, struct mirror_set *ms) { - bio->bi_next = (struct bio *) m; + bio->bi_next = (struct bio *) ms; } /*----------------------------------------------------------------- @@ -666,38 +600,13 @@ static void bio_set_m(struct bio *bio, struct mirror *m) * are in the no-sync state. We have to recover these by * recopying from the default mirror to all the others. *---------------------------------------------------------------*/ -static void fail_mirror(struct mirror *m); static void recovery_complete(int read_err, unsigned int write_err, void *context) { struct region *reg = (struct region *) context; - struct mirror_set *ms = reg->rh->ms; - unsigned long write_error = write_err; - int m, bit = 0; - - if (read_err) { - /* Read error means the failure of default mirror. */ - DMERR("Unable to read from primary mirror during recovery"); - fail_mirror(ms->default_mirror); - } - if (write_error) { - DMERR("Write error during recovery (error = %#lx)", - write_error); - /* - * Bits correspond to devices (excluding default mirror). - * The default mirror cannot change during recovery. - */ - for (m = 0; m < ms->nr_mirrors; m++) { - if (&ms->mirror[m] == ms->default_mirror) - continue; - if (test_bit(bit, &write_error)) - fail_mirror(ms->mirror + m); - bit++; - } - } - - rh_recovery_end(reg, !(read_err || write_err)); + /* FIXME: better error handling */ + rh_recovery_end(reg, read_err || write_err); } static int recover(struct mirror_set *ms, struct region *reg) @@ -736,9 +645,7 @@ static int recover(struct mirror_set *ms, struct region *reg) } /* hand to kcopyd */ - if (ms->rh.log->type->get_failure_response(ms->rh.log) == DMLOG_IOERR_IGNORE) - set_bit(KCOPYD_IGNORE_ERROR, &flags); - + set_bit(KCOPYD_IGNORE_ERROR, &flags); r = kcopyd_copy(ms->kcopyd_client, &from, ms->nr_mirrors - 1, to, flags, recovery_complete, reg); @@ -766,212 +673,53 @@ static void do_recovery(struct mirror_set *ms) } /* - * Update the in sync flag if necessary. - * Raise an event when the mirror becomes in-sync. - * - * After recovery completes, the mirror becomes in_sync. - * Only an I/O failure can then take it back out-of-sync. + * Update the in sync flag. */ - if (log->type->get_sync_count(log) == ms->nr_regions) { - if (!ms->in_sync) { - dm_table_event(ms->ti->table); - ms->in_sync = 1; - } - } else if (ms->in_sync) - ms->in_sync = 0; + if (!ms->in_sync && + (log->type->get_sync_count(log) == ms->nr_regions)) { + /* the sync is complete */ + dm_table_event(ms->ti->table); + ms->in_sync = 1; + } } /*----------------------------------------------------------------- * Reads *---------------------------------------------------------------*/ -/* Switch to next dev, via round-robin, after MIN_READS reads */ -#define MIN_READS 128 - -/* choose_mirror - * @ms: the mirror set - * - * This function is used for read balancing. - * - * Returns: chosen mirror, or NULL on failure - */ -static struct mirror *choose_mirror(struct mirror_set *ms) -{ - struct mirror *start_mirror = ms->read_mirror; - - /* - * Perform MIN_READS on each working mirror then - * advance to the next one. start_mirror stores - * the first we tried, so we know when we're done. - */ - do { - if (likely(!atomic_read(&ms->read_mirror->error_count)) && - !atomic_dec_and_test(&ms->read_count)) - goto use_mirror; - - atomic_set(&ms->read_count, MIN_READS); - - if (ms->read_mirror-- == ms->mirror) - ms->read_mirror += ms->nr_mirrors; - } while (ms->read_mirror != start_mirror); - - /* - * We've rejected every mirror. - * Confirm the start_mirror can be used. - */ - if (unlikely(atomic_read(&ms->read_mirror->error_count))) - return NULL; - -use_mirror: - return ms->read_mirror; -} - -/* fail_mirror - * @m: mirror device to fail - * - * If the device is valid, mark it invalid. Also, - * if this is the default mirror device (i.e. the primary - * device) and the mirror set is in-sync, choose an - * alternate primary device. - * - * This function cannot block. - */ -static void fail_mirror(struct mirror *m) +static struct mirror *choose_mirror(struct mirror_set *ms, sector_t sector) { - struct mirror_set *ms = m->ms; - struct mirror *new; - - atomic_inc(&m->error_count); - - if (atomic_read(&m->error_count) > 1) - return; - - if (m != ms->default_mirror) - return; - - /* - * If the default mirror fails, change it. - * In the case of cluster mirroring, the default - * is changed in rh_update_states. - */ - if (!ms->in_sync) { - /* - * Can not switch primary. Better to issue requests - * to same failing device than to risk returning - * corrupt data. - */ - DMERR("Primary mirror device has failed while mirror is not in-sync"); - DMERR("Unable to choose alternative primary device"); - return; - } - - for (new = ms->mirror; new < ms->mirror + ms->nr_mirrors; new++) - if (!atomic_read(&new->error_count)) { - ms->default_mirror = new; - break; - } - - if (unlikely(new == ms->mirror + ms->nr_mirrors)) - DMWARN("All sides of mirror have failed."); -} - -static int default_ok(struct mirror *m) -{ - return !atomic_read(&m->ms->default_mirror->error_count); -} - -static int mirror_available(struct mirror_set *ms, struct bio *bio) -{ - region_t region = bio_to_region(&ms->rh, bio); - - if (ms->rh.log->type->in_sync(ms->rh.log, region, 0) > 0) - return choose_mirror(ms) ? 1 : 0; - - return 0; + /* FIXME: add read balancing */ + return ms->default_mirror; } /* * remap a buffer to a particular mirror. */ -static sector_t map_sector(struct mirror *m, struct bio *bio) -{ - return m->offset + (bio->bi_sector - m->ms->ti->begin); -} - -static void map_bio(struct mirror *m, struct bio *bio) +static void map_bio(struct mirror_set *ms, struct mirror *m, struct bio *bio) { bio->bi_bdev = m->dev->bdev; - bio->bi_sector = map_sector(m, bio); -} - -static void map_region(struct io_region *io, struct mirror *m, - struct bio *bio) -{ - io->bdev = m->dev->bdev; - io->sector = map_sector(m, bio); - io->count = bio->bi_size >> 9; -} - -/*----------------------------------------------------------------- - * Reads - *---------------------------------------------------------------*/ -static void read_callback(unsigned long error, void *context) -{ - struct bio *bio = (struct bio *)context; - struct mirror *m; - - m = bio_get_m(bio); - bio_set_m(bio, NULL); - - if (unlikely(error)) { - DMWARN("A read failure occurred on a mirror device."); - fail_mirror(m); - if (likely(default_ok(m)) || mirror_available(m->ms, bio)) { - DMWARN("Trying different device."); - queue_bio(m->ms, bio, bio_rw(bio)); - } else { - DMERR("No other device available, failing I/O."); - bio_endio(bio, bio->bi_size, -EIO); - } - } else - bio_endio(bio, bio->bi_size, 0); -} - -/* Asynchronous read. */ -static void read_async_bio(struct mirror *m, struct bio *bio) -{ - struct io_region io; - - map_region(&io, m, bio); - bio_set_m(bio, m); - dm_io_async_bvec(1, &io, READ, - bio->bi_io_vec + bio->bi_idx, - read_callback, bio); + bio->bi_sector = m->offset + (bio->bi_sector - ms->ti->begin); } static void do_reads(struct mirror_set *ms, struct bio_list *reads) { + region_t region; struct bio *bio; struct mirror *m; while ((bio = bio_list_pop(reads))) { + region = bio_to_region(&ms->rh, bio); + /* * We can only read balance if the region is in sync. */ - if (likely(rh_in_sync(&ms->rh, - bio_to_region(&ms->rh, bio), 0))) - m = choose_mirror(ms); - else { + if (rh_in_sync(&ms->rh, region, 0)) + m = choose_mirror(ms, bio->bi_sector); + else m = ms->default_mirror; - /* If default has failed, we give up. */ - if (unlikely(m && atomic_read(&m->error_count))) - m = NULL; - } - - if (likely(m)) - read_async_bio(m, bio); - else - bio_endio(bio, bio->bi_size, -EIO); + map_bio(ms, m, bio); + generic_make_request(bio); } } @@ -985,70 +733,15 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads) * RECOVERING: delay the io until recovery completes * NOSYNC: increment pending, just write to the default mirror *---------------------------------------------------------------*/ - -/* __bio_mark_nosync - * @ms - * @bio - * @done - * @error - * - * The bio was written on some mirror(s) but failed on other mirror(s). - * We can successfully endio the bio but should avoid the region being - * marked clean by setting the state RH_NOSYNC. - * - * This function is _not_ interrupt safe! - */ -static void __bio_mark_nosync(struct mirror_set *ms, - struct bio *bio, unsigned int done, int error) +static void write_callback(unsigned long error, void *context) { - unsigned long flags; - struct region_hash *rh = &ms->rh; - struct dirty_log *log = ms->rh.log; - struct region *reg; - region_t region = bio_to_region(rh, bio); - int recovering = 0; - - ms->in_sync = 0; - - /* We must inform the log that the sync count has changed. */ - log->type->set_region_sync(log, region, 0); - - read_lock(&rh->hash_lock); - reg = __rh_find(rh, region); - read_unlock(&rh->hash_lock); - - /* region hash entry should exist because write was in-flight */ - BUG_ON(!reg); - BUG_ON(!list_empty(®->list)); - - spin_lock_irqsave(&rh->region_lock, flags); - /* - * Possible cases: - * 1) RH_DIRTY - * 2) RH_NOSYNC: was dirty, other preceeding writes failed - * 3) RH_RECOVERING: flushing pending writes - * Either case, the region should have not been connected to list. - */ - recovering = (reg->state == RH_RECOVERING); - reg->state = RH_NOSYNC; - BUG_ON(!list_empty(®->list)); - spin_unlock_irqrestore(&rh->region_lock, flags); - - bio_endio(bio, done, error); - if (recovering) - complete_resync_work(reg, 0); -} - -static void write_callback(unsigned long error, void *context, int log_failure) -{ - unsigned int i, ret = 0; + unsigned int i; + int uptodate = 1; struct bio *bio = (struct bio *) context; struct mirror_set *ms; - int uptodate = 0; - int should_wake = 0; - ms = (bio_get_m(bio))->ms; - bio_set_m(bio, NULL); + ms = bio_get_ms(bio); + bio_set_ms(bio, NULL); /* * NOTE: We don't decrement the pending count here, @@ -1056,95 +749,47 @@ static void write_callback(unsigned long error, void *context, int log_failure) * This way we handle both writes to SYNC and NOSYNC * regions with the same code. */ - if (unlikely(error)) { - DMERR("Error during write occurred."); + if (error) { /* - * If the log is intact, we can play around with trying - * to handle the failure. Otherwise, we have to report - * the I/O as failed. + * only error the io if all mirrors failed. + * FIXME: bogus */ - if (!log_failure) { - for (i = 0; i < ms->nr_mirrors; i++) { - if (test_bit(i, &error)) - fail_mirror(ms->mirror + i); - else - uptodate = 1; + uptodate = 0; + for (i = 0; i < ms->nr_mirrors; i++) + if (!test_bit(i, &error)) { + uptodate = 1; + break; } - } - - if (likely(uptodate)) { - /* - * Need to raise event. Since raising - * events can block, we need to do it in - * the main thread. - */ - spin_lock(&ms->lock); - if (!ms->failures.head) - should_wake = 1; - bio_list_add(&ms->failures, bio); - spin_unlock(&ms->lock); - if (should_wake) - wake(); - return; - } else { - DMERR("All replicated volumes dead, failing I/O"); - /* None of the writes succeeded, fail the I/O. */ - ret = -EIO; - } } - - bio_endio(bio, bio->bi_size, ret); -} - -static void write_callback_good_log(unsigned long error, void *context) -{ - write_callback(error, context, 0); + bio_endio(bio, bio->bi_size, 0); } -static void write_callback_bad_log(unsigned long error, void *context) -{ - write_callback(error, context, 1); -} - -static void do_write(struct mirror_set *ms, struct bio *bio, int log_failure) +static void do_write(struct mirror_set *ms, struct bio *bio) { unsigned int i; - struct io_region io[ms->nr_mirrors], *dest = io; + struct io_region io[KCOPYD_MAX_REGIONS+1]; struct mirror *m; - if (log_failure && dm_mirror_error_on_log_failure) { - bio_endio(bio, bio->bi_size, -EIO); - return; - } + for (i = 0; i < ms->nr_mirrors; i++) { + m = ms->mirror + i; - for (i = 0, m = ms->mirror; i < ms->nr_mirrors; i++, m++) - map_region(dest++, m, bio); + io[i].bdev = m->dev->bdev; + io[i].sector = m->offset + (bio->bi_sector - ms->ti->begin); + io[i].count = bio->bi_size >> 9; + } - /* - * We can use the default mirror here, because we - * only need it in order to retrieve the reference - * to the mirror set in write_callback(). - */ - bio_set_m(bio, ms->default_mirror); - if (log_failure) - dm_io_async_bvec(ms->nr_mirrors, io, WRITE, - bio->bi_io_vec + bio->bi_idx, - write_callback_bad_log, bio); - else - dm_io_async_bvec(ms->nr_mirrors, io, WRITE, - bio->bi_io_vec + bio->bi_idx, - write_callback_good_log, bio); + bio_set_ms(bio, ms); + dm_io_async_bvec(ms->nr_mirrors, io, WRITE, + bio->bi_io_vec + bio->bi_idx, + write_callback, bio); } static void do_writes(struct mirror_set *ms, struct bio_list *writes) { - int state, r; + int state; struct bio *bio; struct bio_list sync, nosync, recover, *this_list = NULL; - struct bio_list requeue; - struct dirty_log *log = ms->rh.log; - region_t region; if (!writes->head) return; @@ -1155,18 +800,9 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) bio_list_init(&sync); bio_list_init(&nosync); bio_list_init(&recover); - bio_list_init(&requeue); while ((bio = bio_list_pop(writes))) { - region = bio_to_region(&ms->rh, bio); - - if (log->type->is_remote_recovering && - log->type->is_remote_recovering(log, region)) { - bio_list_add(&requeue, bio); - continue; - } - - state = rh_state(&ms->rh, region, 1); + state = rh_state(&ms->rh, bio_to_region(&ms->rh, bio), 1); switch (state) { case RH_CLEAN: case RH_DIRTY: @@ -1185,14 +821,6 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) bio_list_add(this_list, bio); } - /* - * Add bios that are delayed due to remote recovery - * back on to the write queue - */ - spin_lock_irq(&ms->lock); - bio_list_merge(&ms->writes, &requeue); - spin_unlock_irq(&ms->lock); - /* * Increment the pending counts for any regions that will * be written to (writes to recover regions are going to @@ -1200,86 +828,54 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) */ rh_inc_pending(&ms->rh, &sync); rh_inc_pending(&ms->rh, &nosync); - - r = rh_flush(&ms->rh); + rh_flush(&ms->rh); /* * Dispatch io. */ while ((bio = bio_list_pop(&sync))) - do_write(ms, bio, r ? 1 : 0); + do_write(ms, bio); while ((bio = bio_list_pop(&recover))) rh_delay(&ms->rh, bio); while ((bio = bio_list_pop(&nosync))) { - map_bio(ms->default_mirror, bio); + map_bio(ms, ms->default_mirror, bio); generic_make_request(bio); } } -static void do_failures(struct mirror_set *ms, struct bio_list *failures) -{ - struct bio *bio; - struct dirty_log *log = ms->rh.log; - - if (!failures->head) - return; - - if (log->type->get_failure_response(log) == DMLOG_IOERR_BLOCK) - dm_table_event(ms->ti->table); - - while ((bio = bio_list_pop(failures))) - __bio_mark_nosync(ms, bio, bio->bi_size, 0); -} - /*----------------------------------------------------------------- * kmirrord *---------------------------------------------------------------*/ static LIST_HEAD(_mirror_sets); static DECLARE_RWSEM(_mirror_sets_lock); -static int do_mirror(struct mirror_set *ms) +static void do_mirror(struct mirror_set *ms) { - struct bio_list reads, writes, failures; + struct bio_list reads, writes; - spin_lock_irq(&ms->lock); + spin_lock(&ms->lock); reads = ms->reads; writes = ms->writes; - failures = ms->failures; bio_list_init(&ms->reads); bio_list_init(&ms->writes); - bio_list_init(&ms->failures); - spin_unlock_irq(&ms->lock); + spin_unlock(&ms->lock); rh_update_states(&ms->rh); do_recovery(ms); do_reads(ms, &reads); do_writes(ms, &writes); - do_failures(ms, &failures); - - return (ms->writes.head) ? 1 : 0; } -static int _do_work(void) +static void do_work(void *ignored) { - int more_work = 0; struct mirror_set *ms; down_read(&_mirror_sets_lock); list_for_each_entry (ms, &_mirror_sets, list) - more_work += do_mirror(ms); + do_mirror(ms); up_read(&_mirror_sets_lock); - - return more_work; -} - -static void do_work(void *ignored) -{ - while (_do_work()) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/5); - } } /*----------------------------------------------------------------- @@ -1300,7 +896,7 @@ static struct mirror_set *alloc_context(unsigned int nr_mirrors, ms = kmalloc(len, GFP_KERNEL); if (!ms) { - ti->error = "Cannot allocate mirror context"; + ti->error = "dm-mirror: Cannot allocate mirror context"; return NULL; } @@ -1311,19 +907,14 @@ static struct mirror_set *alloc_context(unsigned int nr_mirrors, ms->nr_mirrors = nr_mirrors; ms->nr_regions = dm_sector_div_up(ti->len, region_size); ms->in_sync = 0; - ms->read_mirror = &ms->mirror[DEFAULT_MIRROR]; ms->default_mirror = &ms->mirror[DEFAULT_MIRROR]; if (rh_init(&ms->rh, ms, dl, region_size, ms->nr_regions)) { - ti->error = "Error creating dirty region hash"; + ti->error = "dm-mirror: Error creating dirty region hash"; kfree(ms); return NULL; } - atomic_set(&ms->read_count, MIN_READS); - - bio_list_init(&ms->failures); - return ms; } @@ -1349,20 +940,18 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti, unsigned long long offset; if (sscanf(argv[1], "%llu", &offset) != 1) { - ti->error = "Invalid offset"; + ti->error = "dm-mirror: Invalid offset"; return -EINVAL; } if (dm_get_device(ti, argv[0], offset, ti->len, dm_table_get_mode(ti->table), &ms->mirror[mirror].dev)) { - ti->error = "Device lookup failure"; + ti->error = "dm-mirror: Device lookup failure"; return -ENXIO; } ms->mirror[mirror].offset = offset; - atomic_set(&(ms->mirror[mirror].error_count), 0); - ms->mirror[mirror].ms = ms; return 0; } @@ -1395,30 +984,30 @@ static struct dirty_log *create_dirty_log(struct dm_target *ti, struct dirty_log *dl; if (argc < 2) { - ti->error = "Insufficient mirror log arguments"; + ti->error = "dm-mirror: Insufficient mirror log arguments"; return NULL; } if (sscanf(argv[1], "%u", ¶m_count) != 1) { - ti->error = "Invalid mirror log argument count"; + ti->error = "dm-mirror: Invalid mirror log argument count"; return NULL; } *args_used = 2 + param_count; if (argc < *args_used) { - ti->error = "Insufficient mirror log arguments"; + ti->error = "dm-mirror: Insufficient mirror log arguments"; return NULL; } dl = dm_create_dirty_log(argv[0], ti, param_count, argv + 2); if (!dl) { - ti->error = "Error creating mirror dirty log"; + ti->error = "dm-mirror: Error creating mirror dirty log"; return NULL; } if (!_check_region_size(ti, dl->type->get_region_size(dl))) { - ti->error = "Invalid region size"; + ti->error = "dm-mirror: Invalid region size"; dm_destroy_dirty_log(dl); return NULL; } @@ -1452,7 +1041,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 || nr_mirrors < 2 || nr_mirrors > KCOPYD_MAX_REGIONS + 1) { - ti->error = "Invalid number of mirrors"; + ti->error = "dm-mirror: Invalid number of mirrors"; dm_destroy_dirty_log(dl); return -EINVAL; } @@ -1460,7 +1049,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) argv++, argc--; if (argc != nr_mirrors * 2) { - ti->error = "Wrong number of mirror arguments"; + ti->error = "dm-mirror: Wrong number of mirror arguments"; dm_destroy_dirty_log(dl); return -EINVAL; } @@ -1506,15 +1095,14 @@ static void mirror_dtr(struct dm_target *ti) static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw) { - unsigned long flags; int should_wake = 0; struct bio_list *bl; bl = (rw == WRITE) ? &ms->writes : &ms->reads; - spin_lock_irqsave(&ms->lock, flags); + spin_lock(&ms->lock); should_wake = !(bl->head); bio_list_add(bl, bio); - spin_unlock_irqrestore(&ms->lock, flags); + spin_unlock(&ms->lock); if (should_wake) wake(); @@ -1529,64 +1117,42 @@ static int mirror_map(struct dm_target *ti, struct bio *bio, int r, rw = bio_rw(bio); struct mirror *m; struct mirror_set *ms = ti->private; - struct bio_map_info *bmi = NULL; - struct dm_bio_details *bd = NULL; + + map_context->ll = bio_to_region(&ms->rh, bio); if (rw == WRITE) { - /* Save region for mirror_end_io() handler */ - map_context->ll = bio_to_region(&ms->rh, bio); queue_bio(ms, bio, rw); return 0; } - /* All about the reads now */ - r = ms->rh.log->type->in_sync(ms->rh.log, bio_to_region(&ms->rh, bio), 0); if (r < 0 && r != -EWOULDBLOCK) return r; - if (r == -EWOULDBLOCK) + if (r == -EWOULDBLOCK) /* FIXME: ugly */ r = 0; - if (likely(r)) { - /* - * Optimize reads by avoiding to hand them to daemon. - * - * In case they fail, queue them for another shot - * in the mirror_end_io() function. - */ - m = choose_mirror(ms); - if (likely(m)) { - bmi = mempool_alloc(bio_map_info_pool, GFP_NOIO); - - if (likely(bmi)) { - /* without this, a read is not retryable */ - bd = &bmi->bmi_bd; - dm_bio_record(bd, bio); - map_context->ptr = bmi; - bmi->bmi_m = m; - } else { - /* we could fail now, but we can at least ** - ** give it a shot. The bd is only used to ** - ** retry in the event of a failure anyway. ** - ** If we fail, we can fail the I/O then. */ - map_context->ptr = NULL; - } - - map_bio(m, bio); - return 1; /* Mapped -> queue request. */ - } else - return -EIO; - } else { - /* Either not clean, or -EWOULDBLOCK */ - if (rw == READA) - return -EWOULDBLOCK; + /* + * We don't want to fast track a recovery just for a read + * ahead. So we just let it silently fail. + * FIXME: get rid of this. + */ + if (!r && rw == READA) + return -EIO; + if (!r) { + /* Pass this io over to the daemon */ queue_bio(ms, bio, rw); + return 0; } - return 0; + m = choose_mirror(ms, bio->bi_sector); + if (!m) + return -EIO; + + map_bio(ms, m, bio); + return 1; } static int mirror_end_io(struct dm_target *ti, struct bio *bio, @@ -1594,71 +1160,15 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, { int rw = bio_rw(bio); struct mirror_set *ms = (struct mirror_set *) ti->private; - struct mirror *m = NULL; - struct dm_bio_details *bd = NULL; + region_t region = map_context->ll; /* * We need to dec pending if this was a write. */ - if (rw == WRITE) { - rh_dec(&ms->rh, map_context->ll); - return error; - } + if (rw == WRITE) + rh_dec(&ms->rh, region); - if (error == -EOPNOTSUPP) - goto out; - - if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio)) - goto out; - - if (unlikely(error)) { - DMERR("A read failure occurred on a mirror device."); - if (!map_context->ptr) { - /* - * There wasn't enough memory to record necessary - * information for a retry or there was no other - * mirror in-sync. - */ - DMERR("Unable to retry read."); - return -EIO; - } - m = ((struct bio_map_info *)map_context->ptr)->bmi_m; - fail_mirror(m); /* Flag error on mirror. */ - - /* - * A failed read needs to get queued - * to the daemon for another shot to - * one (if any) intact mirrors. - */ - if (default_ok(m) || mirror_available(ms, bio)) { - bd = &(((struct bio_map_info *)map_context->ptr)->bmi_bd - ); - - DMWARN("Trying different device."); - dm_bio_restore(bd, bio); - mempool_free(map_context->ptr, bio_map_info_pool); - map_context->ptr = NULL; - queue_bio(ms, bio, rw); - return 1; /* We want another shot on the bio. */ - } - DMERR("All replicated volumes dead, failing I/O"); - } - -out: - if (map_context->ptr) - mempool_free(map_context->ptr, bio_map_info_pool); - - return error; -} - -static void mirror_presuspend(struct dm_target *ti) -{ - struct mirror_set *ms = (struct mirror_set *) ti->private; - struct dirty_log *log = ms->rh.log; - - if (log->type->presuspend && log->type->presuspend(log)) - /* FIXME: need better error handling */ - DMWARN("log presuspend failed"); + return 0; } static void mirror_postsuspend(struct dm_target *ti) @@ -1667,14 +1177,9 @@ static void mirror_postsuspend(struct dm_target *ti) struct dirty_log *log = ms->rh.log; rh_stop_recovery(&ms->rh); - - /* Wait for all I/O we generated to complete */ - wait_event(recovery_stopped_event, - !atomic_read(&ms->rh.recovery_in_flight)); - - if (log->type->postsuspend && log->type->postsuspend(log)) + if (log->type->suspend && log->type->suspend(log)) /* FIXME: need better error handling */ - DMWARN("log postsuspend failed"); + DMWARN("log suspend failed"); } static void mirror_resume(struct dm_target *ti) @@ -1690,28 +1195,24 @@ static void mirror_resume(struct dm_target *ti) static int mirror_status(struct dm_target *ti, status_type_t type, char *result, unsigned int maxlen) { - unsigned int m, sz = 0; + unsigned int m, sz; struct mirror_set *ms = (struct mirror_set *) ti->private; - char buffer[ms->nr_mirrors + 1]; + + sz = ms->rh.log->type->status(ms->rh.log, type, result, maxlen); switch (type) { case STATUSTYPE_INFO: DMEMIT("%d ", ms->nr_mirrors); - for (m = 0; m < ms->nr_mirrors; m++) { + for (m = 0; m < ms->nr_mirrors; m++) DMEMIT("%s ", ms->mirror[m].dev->name); - buffer[m] = atomic_read(&(ms->mirror[m].error_count)) ? - 'D' : 'A'; - } - buffer[m] = '\0'; - DMEMIT("%llu/%llu 1 %s ", - ms->rh.log->type->get_sync_count(ms->rh.log), - ms->nr_regions, buffer); - ms->rh.log->type->status(ms->rh.log, type, result+sz, maxlen-sz); + DMEMIT("%llu/%llu", + (unsigned long long)ms->rh.log->type-> + get_sync_count(ms->rh.log), + (unsigned long long)ms->nr_regions); break; case STATUSTYPE_TABLE: - sz = ms->rh.log->type->status(ms->rh.log, type, result, maxlen); DMEMIT("%d ", ms->nr_mirrors); for (m = 0; m < ms->nr_mirrors; m++) DMEMIT("%s %llu ", ms->mirror[m].dev->name, @@ -1723,13 +1224,12 @@ static int mirror_status(struct dm_target *ti, status_type_t type, static struct target_type mirror_target = { .name = "mirror", - .version = {1, 2, 0}, + .version = {1, 0, 1}, .module = THIS_MODULE, .ctr = mirror_ctr, .dtr = mirror_dtr, .map = mirror_map, .end_io = mirror_end_io, - .presuspend = mirror_presuspend, .postsuspend = mirror_postsuspend, .resume = mirror_resume, .status = mirror_status, @@ -1739,11 +1239,6 @@ static int __init dm_mirror_init(void) { int r; - bio_map_info_pool = mempool_create(100, bio_map_info_alloc, - bio_map_info_free, NULL); - if (!bio_map_info_pool) - return -ENOMEM; - r = dm_dirty_log_init(); if (r) return r; @@ -1752,7 +1247,7 @@ static int __init dm_mirror_init(void) if (!_kmirrord_wq) { DMERR("couldn't start kmirrord"); dm_dirty_log_exit(); - return -ENOMEM; + return r; } INIT_WORK(&_kmirrord_work, do_work, NULL); @@ -1762,15 +1257,6 @@ static int __init dm_mirror_init(void) mirror_target.name); dm_dirty_log_exit(); destroy_workqueue(_kmirrord_wq); - } else if (!dm_mirror_error_on_log_failure) { - DMWARN("Warning: dm_mirror_error_on_log_failure = 0"); - DMWARN("In this mode, the following fault sequence could cause corruption:"); - DMWARN(" 1) Log device failure"); - DMWARN(" 2) Write I/O issued"); - DMWARN(" 3) Machine failure"); - DMWARN(" 4) Log device restored"); - DMWARN(" 5) Machine reboots"); - DMWARN("If this happens, you must resync your mirror."); } return r; @@ -1792,8 +1278,6 @@ static void __exit dm_mirror_exit(void) module_init(dm_mirror_init); module_exit(dm_mirror_exit); -module_param(dm_mirror_error_on_log_failure, int, 1); -MODULE_PARM_DESC(dm_mirror_error_on_log_failure, "Set to '0' if you want writes to succeed on log device failure"); MODULE_DESCRIPTION(DM_NAME " mirror target"); MODULE_AUTHOR("Joe Thornber"); MODULE_LICENSE("GPL"); diff --git a/drivers/md/dm-round-robin.c b/drivers/md/dm-round-robin.c index c5a16c550..d0024865a 100644 --- a/drivers/md/dm-round-robin.c +++ b/drivers/md/dm-round-robin.c @@ -14,8 +14,6 @@ #include -#define DM_MSG_PREFIX "multipath round-robin" - /*----------------------------------------------------------------- * Path-handling code, paths are held in lists *---------------------------------------------------------------*/ @@ -193,9 +191,9 @@ static int __init dm_rr_init(void) int r = dm_register_path_selector(&rr_ps); if (r < 0) - DMERR("register failed %d", r); + DMERR("round-robin: register failed %d", r); - DMINFO("version 1.0.0 loaded"); + DMINFO("dm-round-robin version 1.0.0 loaded"); return r; } diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 6578b260f..b84bc1aae 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -22,8 +23,6 @@ #include "dm-bio-list.h" #include "kcopyd.h" -#define DM_MSG_PREFIX "snapshots" - /* * The percentage increment we will wake up users at */ @@ -118,7 +117,7 @@ static int init_origin_hash(void) _origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head), GFP_KERNEL); if (!_origins) { - DMERR("unable to allocate memory"); + DMERR("Device mapper: Snapshot: unable to allocate memory"); return -ENOMEM; } @@ -413,7 +412,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) int blocksize; if (argc < 4) { - ti->error = "requires exactly 4 arguments"; + ti->error = "dm-snapshot: requires exactly 4 arguments"; r = -EINVAL; goto bad1; } @@ -691,7 +690,6 @@ static void pending_complete(struct pending_exception *pe, int success) free_exception(e); - remove_exception(&pe->e); error_snapshot_bios(pe); goto out; } @@ -1129,7 +1127,7 @@ static int origin_ctr(struct dm_target *ti, unsigned int argc, char **argv) struct dm_dev *dev; if (argc != 1) { - ti->error = "origin: incorrect number of arguments"; + ti->error = "dm-origin: incorrect number of arguments"; return -EINVAL; } @@ -1238,7 +1236,7 @@ static int __init dm_snapshot_init(void) r = dm_register_target(&origin_target); if (r < 0) { - DMERR("Origin target register failed %d", r); + DMERR("Device mapper: Origin: register failed %d\n", r); goto bad1; } diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index 6c29fcecd..08328a8f5 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c @@ -12,8 +12,6 @@ #include #include -#define DM_MSG_PREFIX "striped" - struct stripe { struct dm_dev *dev; sector_t physical_start; @@ -80,19 +78,19 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) unsigned int i; if (argc < 2) { - ti->error = "Not enough arguments"; + ti->error = "dm-stripe: Not enough arguments"; return -EINVAL; } stripes = simple_strtoul(argv[0], &end, 10); if (*end) { - ti->error = "Invalid stripe count"; + ti->error = "dm-stripe: Invalid stripe count"; return -EINVAL; } chunk_size = simple_strtoul(argv[1], &end, 10); if (*end) { - ti->error = "Invalid chunk_size"; + ti->error = "dm-stripe: Invalid chunk_size"; return -EINVAL; } @@ -101,19 +99,19 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) */ if (!chunk_size || (chunk_size & (chunk_size - 1)) || (chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) { - ti->error = "Invalid chunk size"; + ti->error = "dm-stripe: Invalid chunk size"; return -EINVAL; } if (ti->len & (chunk_size - 1)) { - ti->error = "Target length not divisible by " + ti->error = "dm-stripe: Target length not divisible by " "chunk size"; return -EINVAL; } width = ti->len; if (sector_div(width, stripes)) { - ti->error = "Target length not divisible by " + ti->error = "dm-stripe: Target length not divisible by " "number of stripes"; return -EINVAL; } @@ -122,14 +120,14 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) * Do we have enough arguments for that many stripes ? */ if (argc != (2 + 2 * stripes)) { - ti->error = "Not enough destinations " + ti->error = "dm-stripe: Not enough destinations " "specified"; return -EINVAL; } sc = alloc_context(stripes); if (!sc) { - ti->error = "Memory allocation for striped context " + ti->error = "dm-stripe: Memory allocation for striped context " "failed"; return -ENOMEM; } @@ -151,7 +149,8 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) r = get_stripe(ti, sc, i, argv); if (r < 0) { - ti->error = "Couldn't parse stripe destination"; + ti->error = "dm-stripe: Couldn't parse stripe " + "destination"; while (i--) dm_put_device(ti, sc->stripe[i].dev); kfree(sc); @@ -228,7 +227,7 @@ int __init dm_stripe_init(void) r = dm_register_target(&stripe_target); if (r < 0) - DMWARN("target registration failed"); + DMWARN("striped target registration failed"); return r; } @@ -236,7 +235,7 @@ int __init dm_stripe_init(void) void dm_stripe_exit(void) { if (dm_unregister_target(&stripe_target)) - DMWARN("target unregistration failed"); + DMWARN("striped target unregistration failed"); return; } diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 75fe9493e..8f56a54cf 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -17,8 +17,6 @@ #include #include -#define DM_MSG_PREFIX "table" - #define MAX_DEPTH 16 #define NODE_SIZE L1_CACHE_BYTES #define KEYS_PER_NODE (NODE_SIZE / sizeof(sector_t)) @@ -239,44 +237,6 @@ int dm_table_create(struct dm_table **result, int mode, return 0; } -int dm_create_error_table(struct dm_table **result, struct mapped_device *md) -{ - struct dm_table *t; - sector_t dev_size = 1; - int r; - - /* - * Find current size of device. - * Default to 1 sector if inactive. - */ - t = dm_get_table(md); - if (t) { - dev_size = dm_table_get_size(t); - dm_table_put(t); - } - - r = dm_table_create(&t, FMODE_READ, 1, md); - if (r) - return r; - - r = dm_table_add_target(t, "error", 0, dev_size, NULL); - if (r) - goto out; - - r = dm_table_complete(t); - if (r) - goto out; - - *result = t; - -out: - if (r) - dm_table_put(t); - - return r; -} -EXPORT_SYMBOL_GPL(dm_create_error_table); - static void free_devices(struct list_head *devices) { struct list_head *tmp, *next; @@ -630,12 +590,6 @@ int dm_split_args(int *argc, char ***argvp, char *input) unsigned array_size = 0; *argc = 0; - - if (!input) { - *argvp = NULL; - return 0; - } - argv = realloc_argv(&array_size, argv); if (!argv) return -ENOMEM; @@ -717,14 +671,15 @@ int dm_table_add_target(struct dm_table *t, const char *type, memset(tgt, 0, sizeof(*tgt)); if (!len) { - DMERR("%s: zero-length target", dm_device_name(t->md)); + tgt->error = "zero-length target"; + DMERR("%s", tgt->error); return -EINVAL; } tgt->type = dm_get_target_type(type); if (!tgt->type) { - DMERR("%s: %s: unknown target type", dm_device_name(t->md), - type); + tgt->error = "unknown target type"; + DMERR("%s", tgt->error); return -EINVAL; } @@ -761,7 +716,7 @@ int dm_table_add_target(struct dm_table *t, const char *type, return 0; bad: - DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error); + DMERR("%s", tgt->error); dm_put_target_type(tgt->type); return r; } @@ -847,7 +802,7 @@ sector_t dm_table_get_size(struct dm_table *t) struct dm_target *dm_table_get_target(struct dm_table *t, unsigned int index) { - if (index >= t->num_targets) + if (index > t->num_targets) return NULL; return t->targets + index; diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c index 477a041a4..64fd8e79e 100644 --- a/drivers/md/dm-target.c +++ b/drivers/md/dm-target.c @@ -12,8 +12,6 @@ #include #include -#define DM_MSG_PREFIX "target" - struct tt_internal { struct target_type tt; diff --git a/drivers/md/dm-zero.c b/drivers/md/dm-zero.c index ea569f734..51c0639b2 100644 --- a/drivers/md/dm-zero.c +++ b/drivers/md/dm-zero.c @@ -10,15 +10,13 @@ #include #include -#define DM_MSG_PREFIX "zero" - /* * Construct a dummy mapping that only returns zeros */ static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv) { if (argc != 0) { - ti->error = "No arguments required"; + ti->error = "dm-zero: No arguments required"; return -EINVAL; } @@ -62,7 +60,7 @@ static int __init dm_zero_init(void) int r = dm_register_target(&zero_target); if (r < 0) - DMERR("register failed %d", r); + DMERR("zero: register failed %d", r); return r; } @@ -72,7 +70,7 @@ static void __exit dm_zero_exit(void) int r = dm_unregister_target(&zero_target); if (r < 0) - DMERR("unregister failed %d", r); + DMERR("zero: unregister failed %d", r); } module_init(dm_zero_init) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index c99bf9f01..dfd037858 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. - * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the GPL. */ @@ -21,8 +21,6 @@ #include #include -#define DM_MSG_PREFIX "core" - static const char *_name = DM_NAME; static unsigned int major = 0; @@ -52,9 +50,9 @@ struct target_io { union map_info *dm_get_mapinfo(struct bio *bio) { - if (bio && bio->bi_private) - return &((struct target_io *)bio->bi_private)->info; - return NULL; + if (bio && bio->bi_private) + return &((struct target_io *)bio->bi_private)->info; + return NULL; } #define MINOR_ALLOCED ((void *)-1) @@ -66,14 +64,12 @@ union map_info *dm_get_mapinfo(struct bio *bio) #define DMF_SUSPENDED 1 #define DMF_FROZEN 2 #define DMF_FREEING 3 -#define DMF_DELETING 4 struct mapped_device { struct rw_semaphore io_lock; struct semaphore suspend_lock; rwlock_t map_lock; atomic_t holders; - atomic_t open_count; unsigned long flags; @@ -167,7 +163,7 @@ static void local_exit(void) bioset_free(dm_set); if (unregister_blkdev(_major, _name) < 0) - DMERR("unregister_blkdev failed"); + DMERR("devfs_unregister_blkdev failed"); _major = 0; @@ -232,14 +228,12 @@ static int dm_blk_open(struct inode *inode, struct file *file) if (!md) goto out; - if (test_bit(DMF_FREEING, &md->flags) || - test_bit(DMF_DELETING, &md->flags)) { + if (test_bit(DMF_FREEING, &md->flags)) { md = NULL; goto out; } dm_get(md); - atomic_inc(&md->open_count); out: spin_unlock(&_minor_lock); @@ -252,35 +246,10 @@ static int dm_blk_close(struct inode *inode, struct file *file) struct mapped_device *md; md = inode->i_bdev->bd_disk->private_data; - atomic_dec(&md->open_count); dm_put(md); return 0; } -int dm_open_count(struct mapped_device *md) -{ - return atomic_read(&md->open_count); -} - -/* - * Guarantees nothing is using the device before it's deleted. - */ -int dm_lock_for_deletion(struct mapped_device *md) -{ - int r = 0; - - spin_lock(&_minor_lock); - - if (dm_open_count(md)) - r = -EBUSY; - else - set_bit(DMF_DELETING, &md->flags); - - spin_unlock(&_minor_lock); - - return r; -} - static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo) { struct mapped_device *md = bdev->bd_disk->private_data; @@ -505,8 +474,8 @@ static void __map_bio(struct dm_target *ti, struct bio *clone, if (r > 0) { /* the bio has been remapped so dispatch it */ - blk_add_trace_remap(bdev_get_queue(clone->bi_bdev), clone, - tio->io->bio->bi_bdev->bd_dev, sector, + blk_add_trace_remap(bdev_get_queue(clone->bi_bdev), clone, + tio->io->bio->bi_bdev->bd_dev, sector, clone->bi_sector); generic_make_request(clone); @@ -795,7 +764,7 @@ static int dm_any_congested(void *congested_data, int bdi_bits) *---------------------------------------------------------------*/ static DEFINE_IDR(_minor_idr); -static void free_minor(int minor) +static void free_minor(unsigned int minor) { spin_lock(&_minor_lock); idr_remove(&_minor_idr, minor); @@ -805,7 +774,7 @@ static void free_minor(int minor) /* * See if the device with a specific minor # is free. */ -static int specific_minor(struct mapped_device *md, int minor) +static int specific_minor(struct mapped_device *md, unsigned int minor) { int r, m; @@ -838,9 +807,10 @@ out: return r; } -static int next_free_minor(struct mapped_device *md, int *minor) +static int next_free_minor(struct mapped_device *md, unsigned int *minor) { - int r, m; + int r; + unsigned int m; r = idr_pre_get(&_minor_idr, GFP_KERNEL); if (!r) @@ -871,7 +841,7 @@ static struct block_device_operations dm_blk_dops; /* * Allocate and initialise a blank device with a given minor. */ -static struct mapped_device *alloc_dev(int minor) +static struct mapped_device *alloc_dev(unsigned int minor, int persistent) { int r; struct mapped_device *md = kmalloc(sizeof(*md), GFP_KERNEL); @@ -886,10 +856,7 @@ static struct mapped_device *alloc_dev(int minor) goto bad0; /* get a minor number for the dev */ - if (minor == DM_ANY_MINOR) - r = next_free_minor(md, &minor); - else - r = specific_minor(md, minor); + r = persistent ? specific_minor(md, minor) : next_free_minor(md, &minor); if (r < 0) goto bad1; @@ -898,7 +865,6 @@ static struct mapped_device *alloc_dev(int minor) init_MUTEX(&md->suspend_lock); rwlock_init(&md->map_lock); atomic_set(&md->holders, 1); - atomic_set(&md->open_count, 0); atomic_set(&md->event_nr, 0); md->queue = blk_alloc_queue(GFP_KERNEL); @@ -963,7 +929,7 @@ static struct mapped_device *alloc_dev(int minor) static void free_dev(struct mapped_device *md) { - int minor = md->disk->first_minor; + unsigned int minor = md->disk->first_minor; if (md->suspended_bdev) { thaw_bdev(md->suspended_bdev, NULL); @@ -1049,11 +1015,12 @@ static void __unbind(struct mapped_device *md) /* * Constructor for a new device. */ -int dm_create(int minor, struct mapped_device **result) +static int create_aux(unsigned int minor, int persistent, + struct mapped_device **result) { struct mapped_device *md; - md = alloc_dev(minor); + md = alloc_dev(minor, persistent); if (!md) return -ENXIO; @@ -1061,6 +1028,16 @@ int dm_create(int minor, struct mapped_device **result) return 0; } +int dm_create(struct mapped_device **result) +{ + return create_aux(0, 0, result); +} + +int dm_create_with_minor(unsigned int minor, struct mapped_device **result) +{ + return create_aux(minor, 1, result); +} + static struct mapped_device *dm_find_md(dev_t dev) { struct mapped_device *md; @@ -1074,7 +1051,7 @@ static struct mapped_device *dm_find_md(dev_t dev) md = idr_find(&_minor_idr, minor); if (md && (md == MINOR_ALLOCED || (dm_disk(md)->first_minor != minor) || - test_bit(DMF_FREEING, &md->flags))) { + test_bit(DMF_FREEING, &md->flags))) { md = NULL; goto out; } @@ -1110,12 +1087,6 @@ void dm_get(struct mapped_device *md) atomic_inc(&md->holders); } -const char *dm_device_name(struct mapped_device *md) -{ - return md->name; -} -EXPORT_SYMBOL_GPL(dm_device_name); - void dm_put(struct mapped_device *md) { struct dm_table *map; diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 3c03c0eca..fd90bc8f9 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -2,7 +2,7 @@ * Internal header file for device mapper * * Copyright (C) 2001, 2002 Sistina Software - * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * * This file is released under the LGPL. */ @@ -17,10 +17,9 @@ #include #define DM_NAME "device-mapper" - -#define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) -#define DMWARN(f, arg...) printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) -#define DMINFO(f, arg...) printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) +#define DMWARN(f, x...) printk(KERN_WARNING DM_NAME ": " f "\n" , ## x) +#define DMERR(f, x...) printk(KERN_ERR DM_NAME ": " f "\n" , ## x) +#define DMINFO(f, x...) printk(KERN_INFO DM_NAME ": " f "\n" , ## x) #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ 0 : scnprintf(result + sz, maxlen - sz, x)) @@ -40,16 +39,83 @@ struct dm_dev { }; struct dm_table; +struct mapped_device; + +/*----------------------------------------------------------------- + * Functions for manipulating a struct mapped_device. + * Drop the reference with dm_put when you finish with the object. + *---------------------------------------------------------------*/ +int dm_create(struct mapped_device **md); +int dm_create_with_minor(unsigned int minor, struct mapped_device **md); +void dm_set_mdptr(struct mapped_device *md, void *ptr); +void *dm_get_mdptr(struct mapped_device *md); +struct mapped_device *dm_get_md(dev_t dev); + +/* + * Reference counting for md. + */ +void dm_get(struct mapped_device *md); +void dm_put(struct mapped_device *md); + +/* + * A device can still be used while suspended, but I/O is deferred. + */ +int dm_suspend(struct mapped_device *md, int with_lockfs); +int dm_resume(struct mapped_device *md); + +/* + * The device must be suspended before calling this method. + */ +int dm_swap_table(struct mapped_device *md, struct dm_table *t); + +/* + * Drop a reference on the table when you've finished with the + * result. + */ +struct dm_table *dm_get_table(struct mapped_device *md); + +/* + * Event functions. + */ +uint32_t dm_get_event_nr(struct mapped_device *md); +int dm_wait_event(struct mapped_device *md, int event_nr); + +/* + * Info functions. + */ +struct gendisk *dm_disk(struct mapped_device *md); +int dm_suspended(struct mapped_device *md); + +/* + * Geometry functions. + */ +int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); +int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); /*----------------------------------------------------------------- - * Internal table functions. + * Functions for manipulating a table. Tables are also reference + * counted. *---------------------------------------------------------------*/ +int dm_table_create(struct dm_table **result, int mode, + unsigned num_targets, struct mapped_device *md); + +void dm_table_get(struct dm_table *t); +void dm_table_put(struct dm_table *t); + +int dm_table_add_target(struct dm_table *t, const char *type, + sector_t start, sector_t len, char *params); +int dm_table_complete(struct dm_table *t); void dm_table_event_callback(struct dm_table *t, void (*fn)(void *), void *context); +void dm_table_event(struct dm_table *t); +sector_t dm_table_get_size(struct dm_table *t); struct dm_target *dm_table_get_target(struct dm_table *t, unsigned int index); struct dm_target *dm_table_find_target(struct dm_table *t, sector_t sector); void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q); +unsigned int dm_table_get_num_targets(struct dm_table *t); struct list_head *dm_table_get_devices(struct dm_table *t); +int dm_table_get_mode(struct dm_table *t); +struct mapped_device *dm_table_get_md(struct dm_table *t); void dm_table_presuspend_targets(struct dm_table *t); void dm_table_postsuspend_targets(struct dm_table *t); void dm_table_resume_targets(struct dm_table *t); @@ -67,6 +133,7 @@ void dm_put_target_type(struct target_type *t); int dm_target_iterate(void (*iter_func)(struct target_type *tt, void *param), void *param); + /*----------------------------------------------------------------- * Useful inlines. *---------------------------------------------------------------*/ @@ -124,7 +191,5 @@ void dm_stripe_exit(void); void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size); union map_info *dm_get_mapinfo(struct bio *bio); -int dm_open_count(struct mapped_device *md); -int dm_lock_for_deletion(struct mapped_device *md); #endif diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index f1db6eff4..72480a48d 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -313,7 +314,7 @@ static void complete_io(unsigned long error, void *context) if (error) { if (job->rw == WRITE) - job->write_err |= error; + job->write_err &= error; else job->read_err = 1; @@ -459,7 +460,7 @@ static void segment_complete(int read_err, job->read_err = 1; if (write_err) - job->write_err |= write_err; + job->write_err &= write_err; /* * Only dispatch more work if there hasn't been an error. diff --git a/drivers/md/linear.c b/drivers/md/linear.c index b99c19c7e..777585458 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -111,7 +111,7 @@ static int linear_issue_flush(request_queue_t *q, struct gendisk *disk, return ret; } -static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) +static int linear_run (mddev_t *mddev) { linear_conf_t *conf; dev_info_t **table; @@ -121,21 +121,20 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) sector_t curr_offset; struct list_head *tmp; - conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t), + conf = kzalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t), GFP_KERNEL); if (!conf) - return NULL; - + goto out; mddev->private = conf; cnt = 0; - conf->array_size = 0; + mddev->array_size = 0; ITERATE_RDEV(mddev,rdev,tmp) { int j = rdev->raid_disk; dev_info_t *disk = conf->disks + j; - if (j < 0 || j > raid_disks || disk->rdev) { + if (j < 0 || j > mddev->raid_disks || disk->rdev) { printk("linear: disk numbering problem. Aborting!\n"); goto out; } @@ -153,16 +152,16 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); disk->size = rdev->size; - conf->array_size += rdev->size; + mddev->array_size += rdev->size; cnt++; } - if (cnt != raid_disks) { + if (cnt != mddev->raid_disks) { printk("linear: not enough drives present. Aborting!\n"); goto out; } - min_spacing = conf->array_size; + min_spacing = mddev->array_size; sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *)); /* min_spacing is the minimum spacing that will fit the hash @@ -171,7 +170,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) * that is larger than min_spacing as use the size of that as * the actual spacing */ - conf->hash_spacing = conf->array_size; + conf->hash_spacing = mddev->array_size; for (i=0; i < cnt-1 ; i++) { sector_t sz = 0; int j; @@ -201,7 +200,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) unsigned round; unsigned long base; - sz = conf->array_size >> conf->preshift; + sz = mddev->array_size >> conf->preshift; sz += 1; /* force round-up */ base = conf->hash_spacing >> conf->preshift; round = sector_div(sz, base); @@ -228,7 +227,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) curr_offset = 0; i = 0; for (curr_offset = 0; - curr_offset < conf->array_size; + curr_offset < mddev->array_size; curr_offset += conf->hash_spacing) { while (i < mddev->raid_disks-1 && @@ -248,56 +247,14 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) BUG_ON(table - conf->hash_table > nb_zone); - return conf; - -out: - kfree(conf); - return NULL; -} - -static int linear_run (mddev_t *mddev) -{ - linear_conf_t *conf; - - conf = linear_conf(mddev, mddev->raid_disks); - - if (!conf) - return 1; - mddev->private = conf; - mddev->array_size = conf->array_size; - blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); mddev->queue->unplug_fn = linear_unplug; mddev->queue->issue_flush_fn = linear_issue_flush; return 0; -} - -static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) -{ - /* Adding a drive to a linear array allows the array to grow. - * It is permitted if the new drive has a matching superblock - * already on it, with raid_disk equal to raid_disks. - * It is achieved by creating a new linear_private_data structure - * and swapping it in in-place of the current one. - * The current one is never freed until the array is stopped. - * This avoids races. - */ - linear_conf_t *newconf; - - if (rdev->raid_disk != mddev->raid_disks) - return -EINVAL; - newconf = linear_conf(mddev,mddev->raid_disks+1); - - if (!newconf) - return -ENOMEM; - - newconf->prev = mddev_to_conf(mddev); - mddev->private = newconf; - mddev->raid_disks++; - mddev->array_size = newconf->array_size; - set_capacity(mddev->gendisk, mddev->array_size << 1); - return 0; +out: + kfree(conf); + return 1; } static int linear_stop (mddev_t *mddev) @@ -305,12 +262,8 @@ static int linear_stop (mddev_t *mddev) linear_conf_t *conf = mddev_to_conf(mddev); blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ - do { - linear_conf_t *t = conf->prev; - kfree(conf->hash_table); - kfree(conf); - conf = t; - } while (conf); + kfree(conf->hash_table); + kfree(conf); return 0; } @@ -407,7 +360,6 @@ static struct mdk_personality linear_personality = .run = linear_run, .stop = linear_stop, .status = linear_status, - .hot_add_disk = linear_add, }; static int __init linear_init (void) diff --git a/drivers/md/md.c b/drivers/md/md.c index 820f2ca20..f19b87475 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -33,16 +33,17 @@ */ #include +#include #include #include #include #include #include +#include #include /* for invalidate_bdev */ #include #include #include -#include #include @@ -71,10 +72,6 @@ static void autostart_arrays (int part); static LIST_HEAD(pers_list); static DEFINE_SPINLOCK(pers_lock); -static void md_print_devices(void); - -#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } - /* * Current RAID-1,4,5 parallel reconstruction 'guaranteed speed limit' * is 1000 KB/sec, so the extra system load does not show up that much. @@ -110,7 +107,7 @@ static ctl_table raid_table[] = { .procname = "speed_limit_min", .data = &sysctl_speed_limit_min, .maxlen = sizeof(int), - .mode = S_IRUGO|S_IWUSR, + .mode = 0644, .proc_handler = &proc_dointvec, }, { @@ -118,7 +115,7 @@ static ctl_table raid_table[] = { .procname = "speed_limit_max", .data = &sysctl_speed_limit_max, .maxlen = sizeof(int), - .mode = S_IRUGO|S_IWUSR, + .mode = 0644, .proc_handler = &proc_dointvec, }, { .ctl_name = 0 } @@ -129,7 +126,7 @@ static ctl_table raid_dir_table[] = { .ctl_name = DEV_RAID, .procname = "raid", .maxlen = 0, - .mode = S_IRUGO|S_IXUGO, + .mode = 0555, .child = raid_table, }, { .ctl_name = 0 } @@ -173,7 +170,7 @@ EXPORT_SYMBOL_GPL(md_new_event); /* Alternate version that can be called from interrupts * when calling sysfs_notify isn't needed. */ -static void md_new_event_inintr(mddev_t *mddev) +void md_new_event_inintr(mddev_t *mddev) { atomic_inc(&md_event_count); wake_up(&md_event_waiters); @@ -735,7 +732,6 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) { mdp_disk_t *desc; mdp_super_t *sb = (mdp_super_t *)page_address(rdev->sb_page); - __u64 ev1 = md_event(sb); rdev->raid_disk = -1; rdev->flags = 0; @@ -752,7 +748,7 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) mddev->layout = sb->layout; mddev->raid_disks = sb->raid_disks; mddev->size = sb->size; - mddev->events = ev1; + mddev->events = md_event(sb); mddev->bitmap_offset = 0; mddev->default_bitmap_offset = MD_SB_BYTES >> 9; @@ -801,6 +797,7 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) } else if (mddev->pers == NULL) { /* Insist on good event counter while assembling */ + __u64 ev1 = md_event(sb); ++ev1; if (ev1 < mddev->events) return -EINVAL; @@ -808,21 +805,19 @@ static int super_90_validate(mddev_t *mddev, mdk_rdev_t *rdev) /* if adding to array with a bitmap, then we can accept an * older device ... but not too old. */ + __u64 ev1 = md_event(sb); if (ev1 < mddev->bitmap->events_cleared) return 0; - } else { - if (ev1 < mddev->events) - /* just a hot-add of a new device, leave raid_disk at -1 */ - return 0; - } + } else /* just a hot-add of a new device, leave raid_disk at -1 */ + return 0; if (mddev->level != LEVEL_MULTIPATH) { desc = sb->disks + rdev->desc_nr; if (desc->state & (1<flags); - else if (desc->state & (1<raid_disk < mddev->raid_disks */) { + else if (desc->state & (1<raid_disk < mddev->raid_disks) { set_bit(In_sync, &rdev->flags); rdev->raid_disk = desc->raid_disk; } @@ -1062,11 +1057,6 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) if (rdev->sb_size & bmask) rdev-> sb_size = (rdev->sb_size | bmask)+1; - if (sb->level == cpu_to_le32(LEVEL_MULTIPATH)) - rdev->desc_nr = -1; - else - rdev->desc_nr = le32_to_cpu(sb->dev_number); - if (refdev == 0) ret = 1; else { @@ -1110,7 +1100,6 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version) static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) { struct mdp_superblock_1 *sb = (struct mdp_superblock_1*)page_address(rdev->sb_page); - __u64 ev1 = le64_to_cpu(sb->events); rdev->raid_disk = -1; rdev->flags = 0; @@ -1126,7 +1115,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) mddev->layout = le32_to_cpu(sb->layout); mddev->raid_disks = le32_to_cpu(sb->raid_disks); mddev->size = le64_to_cpu(sb->size)/2; - mddev->events = ev1; + mddev->events = le64_to_cpu(sb->events); mddev->bitmap_offset = 0; mddev->default_bitmap_offset = 1024 >> 9; @@ -1160,6 +1149,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) } else if (mddev->pers == NULL) { /* Insist of good event counter while assembling */ + __u64 ev1 = le64_to_cpu(sb->events); ++ev1; if (ev1 < mddev->events) return -EINVAL; @@ -1167,15 +1157,15 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) /* If adding to array with a bitmap, then we can accept an * older device, but not too old. */ + __u64 ev1 = le64_to_cpu(sb->events); if (ev1 < mddev->bitmap->events_cleared) return 0; - } else { - if (ev1 < mddev->events) - /* just a hot-add of a new device, leave raid_disk at -1 */ - return 0; - } + } else /* just a hot-add of a new device, leave raid_disk at -1 */ + return 0; + if (mddev->level != LEVEL_MULTIPATH) { int role; + rdev->desc_nr = le32_to_cpu(sb->dev_number); role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); switch(role) { case 0xffff: /* spare */ @@ -1184,11 +1174,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev) set_bit(Faulty, &rdev->flags); break; default: - if ((le32_to_cpu(sb->feature_map) & - MD_FEATURE_RECOVERY_OFFSET)) - rdev->recovery_offset = le64_to_cpu(sb->recovery_offset); - else - set_bit(In_sync, &rdev->flags); + set_bit(In_sync, &rdev->flags); rdev->raid_disk = role; break; } @@ -1212,7 +1198,6 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) sb->feature_map = 0; sb->pad0 = 0; - sb->recovery_offset = cpu_to_le64(0); memset(sb->pad1, 0, sizeof(sb->pad1)); memset(sb->pad2, 0, sizeof(sb->pad2)); memset(sb->pad3, 0, sizeof(sb->pad3)); @@ -1233,14 +1218,6 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET); } - - if (rdev->raid_disk >= 0 && - !test_bit(In_sync, &rdev->flags) && - rdev->recovery_offset > 0) { - sb->feature_map |= cpu_to_le32(MD_FEATURE_RECOVERY_OFFSET); - sb->recovery_offset = cpu_to_le64(rdev->recovery_offset); - } - if (mddev->reshape_position != MaxSector) { sb->feature_map |= cpu_to_le32(MD_FEATURE_RESHAPE_ACTIVE); sb->reshape_position = cpu_to_le64(mddev->reshape_position); @@ -1265,12 +1242,11 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) sb->dev_roles[i] = cpu_to_le16(0xfffe); else if (test_bit(In_sync, &rdev2->flags)) sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); - else if (rdev2->raid_disk >= 0 && rdev2->recovery_offset > 0) - sb->dev_roles[i] = cpu_to_le16(rdev2->raid_disk); else sb->dev_roles[i] = cpu_to_le16(0xffff); } + sb->recovery_offset = cpu_to_le64(0); /* not supported yet */ sb->sb_csum = calc_sb_1_csum(sb); } @@ -1531,7 +1507,7 @@ static void print_rdev(mdk_rdev_t *rdev) printk(KERN_INFO "md: no rdev superblock!\n"); } -static void md_print_devices(void) +void md_print_devices(void) { struct list_head *tmp, *tmp2; mdk_rdev_t *rdev; @@ -1560,30 +1536,15 @@ static void md_print_devices(void) } -static void sync_sbs(mddev_t * mddev, int nospares) +static void sync_sbs(mddev_t * mddev) { - /* Update each superblock (in-memory image), but - * if we are allowed to, skip spares which already - * have the right event counter, or have one earlier - * (which would mean they aren't being marked as dirty - * with the rest of the array) - */ mdk_rdev_t *rdev; struct list_head *tmp; ITERATE_RDEV(mddev,rdev,tmp) { - if (rdev->sb_events == mddev->events || - (nospares && - rdev->raid_disk < 0 && - (rdev->sb_events&1)==0 && - rdev->sb_events+1 == mddev->events)) { - /* Don't update this superblock */ - rdev->sb_loaded = 2; - } else { - super_types[mddev->major_version]. - sync_super(mddev, rdev); - rdev->sb_loaded = 1; - } + super_types[mddev->major_version]. + sync_super(mddev, rdev); + rdev->sb_loaded = 1; } } @@ -1593,55 +1554,12 @@ void md_update_sb(mddev_t * mddev) struct list_head *tmp; mdk_rdev_t *rdev; int sync_req; - int nospares = 0; repeat: spin_lock_irq(&mddev->write_lock); - - if (mddev->degraded && mddev->sb_dirty == 3) - /* If the array is degraded, then skipping spares is both - * dangerous and fairly pointless. - * Dangerous because a device that was removed from the array - * might have a event_count that still looks up-to-date, - * so it can be re-added without a resync. - * Pointless because if there are any spares to skip, - * then a recovery will happen and soon that array won't - * be degraded any more and the spare can go back to sleep then. - */ - mddev->sb_dirty = 1; - sync_req = mddev->in_sync; mddev->utime = get_seconds(); - if (mddev->sb_dirty == 3) - /* just a clean<-> dirty transition, possibly leave spares alone, - * though if events isn't the right even/odd, we will have to do - * spares after all - */ - nospares = 1; - - /* If this is just a dirty<->clean transition, and the array is clean - * and 'events' is odd, we can roll back to the previous clean state */ - if (mddev->sb_dirty == 3 - && (mddev->in_sync && mddev->recovery_cp == MaxSector) - && (mddev->events & 1)) - mddev->events--; - else { - /* otherwise we have to go forward and ... */ - mddev->events ++; - if (!mddev->in_sync || mddev->recovery_cp != MaxSector) { /* not clean */ - /* .. if the array isn't clean, insist on an odd 'events' */ - if ((mddev->events&1)==0) { - mddev->events++; - nospares = 0; - } - } else { - /* otherwise insist on an even 'events' (for clean states) */ - if ((mddev->events&1)) { - mddev->events++; - nospares = 0; - } - } - } + mddev->events ++; if (!mddev->events) { /* @@ -1653,7 +1571,7 @@ repeat: mddev->events --; } mddev->sb_dirty = 2; - sync_sbs(mddev, nospares); + sync_sbs(mddev); /* * do not write anything to disk if using @@ -1675,8 +1593,6 @@ repeat: ITERATE_RDEV(mddev,rdev,tmp) { char b[BDEVNAME_SIZE]; dprintk(KERN_INFO "md: "); - if (rdev->sb_loaded != 1) - continue; /* no noise on spare devices */ if (test_bit(Faulty, &rdev->flags)) dprintk("(skipping faulty "); @@ -1688,7 +1604,6 @@ repeat: dprintk(KERN_INFO "(write) %s's sb offset: %llu\n", bdevname(rdev->bdev,b), (unsigned long long)rdev->sb_offset); - rdev->sb_events = mddev->events; } else dprintk(")\n"); @@ -1752,10 +1667,6 @@ state_show(mdk_rdev_t *rdev, char *page) len += sprintf(page+len, "%sin_sync",sep); sep = ","; } - if (test_bit(WriteMostly, &rdev->flags)) { - len += sprintf(page+len, "%swrite_mostly",sep); - sep = ","; - } if (!test_bit(Faulty, &rdev->flags) && !test_bit(In_sync, &rdev->flags)) { len += sprintf(page+len, "%sspare", sep); @@ -1764,40 +1675,8 @@ state_show(mdk_rdev_t *rdev, char *page) return len+sprintf(page+len, "\n"); } -static ssize_t -state_store(mdk_rdev_t *rdev, const char *buf, size_t len) -{ - /* can write - * faulty - simulates and error - * remove - disconnects the device - * writemostly - sets write_mostly - * -writemostly - clears write_mostly - */ - int err = -EINVAL; - if (cmd_match(buf, "faulty") && rdev->mddev->pers) { - md_error(rdev->mddev, rdev); - err = 0; - } else if (cmd_match(buf, "remove")) { - if (rdev->raid_disk >= 0) - err = -EBUSY; - else { - mddev_t *mddev = rdev->mddev; - kick_rdev_from_array(rdev); - md_update_sb(mddev); - md_new_event(mddev); - err = 0; - } - } else if (cmd_match(buf, "writemostly")) { - set_bit(WriteMostly, &rdev->flags); - err = 0; - } else if (cmd_match(buf, "-writemostly")) { - clear_bit(WriteMostly, &rdev->flags); - err = 0; - } - return err ? err : len; -} -static struct rdev_sysfs_entry rdev_state = -__ATTR(state, S_IRUGO|S_IWUSR, state_show, state_store); +static struct rdev_sysfs_entry +rdev_state = __ATTR_RO(state); static ssize_t super_show(mdk_rdev_t *rdev, char *page) @@ -1828,7 +1707,7 @@ errors_store(mdk_rdev_t *rdev, const char *buf, size_t len) return -EINVAL; } static struct rdev_sysfs_entry rdev_errors = -__ATTR(errors, S_IRUGO|S_IWUSR, errors_show, errors_store); +__ATTR(errors, 0644, errors_show, errors_store); static ssize_t slot_show(mdk_rdev_t *rdev, char *page) @@ -1862,7 +1741,7 @@ slot_store(mdk_rdev_t *rdev, const char *buf, size_t len) static struct rdev_sysfs_entry rdev_slot = -__ATTR(slot, S_IRUGO|S_IWUSR, slot_show, slot_store); +__ATTR(slot, 0644, slot_show, slot_store); static ssize_t offset_show(mdk_rdev_t *rdev, char *page) @@ -1884,7 +1763,7 @@ offset_store(mdk_rdev_t *rdev, const char *buf, size_t len) } static struct rdev_sysfs_entry rdev_offset = -__ATTR(offset, S_IRUGO|S_IWUSR, offset_show, offset_store); +__ATTR(offset, 0644, offset_show, offset_store); static ssize_t rdev_size_show(mdk_rdev_t *rdev, char *page) @@ -1908,7 +1787,7 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len) } static struct rdev_sysfs_entry rdev_size = -__ATTR(size, S_IRUGO|S_IWUSR, rdev_size_show, rdev_size_store); +__ATTR(size, 0644, rdev_size_show, rdev_size_store); static struct attribute *rdev_default_attrs[] = { &rdev_state.attr, @@ -1939,8 +1818,6 @@ rdev_attr_store(struct kobject *kobj, struct attribute *attr, if (!entry->store) return -EIO; - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; return entry->store(rdev, page, length); } @@ -1994,10 +1871,8 @@ static mdk_rdev_t *md_import_device(dev_t newdev, int super_format, int super_mi kobject_init(&rdev->kobj); rdev->desc_nr = -1; - rdev->saved_raid_disk = -1; rdev->flags = 0; rdev->data_offset = 0; - rdev->sb_events = 0; atomic_set(&rdev->nr_pending, 0); atomic_set(&rdev->read_errors, 0); atomic_set(&rdev->corrected_errors, 0); @@ -2102,54 +1977,6 @@ static void analyze_sbs(mddev_t * mddev) } -static ssize_t -safe_delay_show(mddev_t *mddev, char *page) -{ - int msec = (mddev->safemode_delay*1000)/HZ; - return sprintf(page, "%d.%03d\n", msec/1000, msec%1000); -} -static ssize_t -safe_delay_store(mddev_t *mddev, const char *cbuf, size_t len) -{ - int scale=1; - int dot=0; - int i; - unsigned long msec; - char buf[30]; - char *e; - /* remove a period, and count digits after it */ - if (len >= sizeof(buf)) - return -EINVAL; - strlcpy(buf, cbuf, len); - buf[len] = 0; - for (i=0; isafemode_delay = 0; - else { - mddev->safemode_delay = (msec*HZ)/1000; - if (mddev->safemode_delay == 0) - mddev->safemode_delay = 1; - } - return len; -} -static struct md_sysfs_entry md_safe_delay = -__ATTR(safe_mode_delay, S_IRUGO|S_IWUSR,safe_delay_show, safe_delay_store); - static ssize_t level_show(mddev_t *mddev, char *page) { @@ -2183,33 +2010,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len) } static struct md_sysfs_entry md_level = -__ATTR(level, S_IRUGO|S_IWUSR, level_show, level_store); - - -static ssize_t -layout_show(mddev_t *mddev, char *page) -{ - /* just a number, not meaningful for all levels */ - return sprintf(page, "%d\n", mddev->layout); -} - -static ssize_t -layout_store(mddev_t *mddev, const char *buf, size_t len) -{ - char *e; - unsigned long n = simple_strtoul(buf, &e, 10); - if (mddev->pers) - return -EBUSY; - - if (!*buf || (*e && *e != '\n')) - return -EINVAL; - - mddev->layout = n; - return len; -} -static struct md_sysfs_entry md_layout = -__ATTR(layout, S_IRUGO|S_IWUSR, layout_show, layout_store); - +__ATTR(level, 0644, level_show, level_store); static ssize_t raid_disks_show(mddev_t *mddev, char *page) @@ -2239,7 +2040,7 @@ raid_disks_store(mddev_t *mddev, const char *buf, size_t len) return rv ? rv : len; } static struct md_sysfs_entry md_raid_disks = -__ATTR(raid_disks, S_IRUGO|S_IWUSR, raid_disks_show, raid_disks_store); +__ATTR(raid_disks, 0644, raid_disks_show, raid_disks_store); static ssize_t chunk_size_show(mddev_t *mddev, char *page) @@ -2263,202 +2064,7 @@ chunk_size_store(mddev_t *mddev, const char *buf, size_t len) return len; } static struct md_sysfs_entry md_chunk_size = -__ATTR(chunk_size, S_IRUGO|S_IWUSR, chunk_size_show, chunk_size_store); - -static ssize_t -resync_start_show(mddev_t *mddev, char *page) -{ - return sprintf(page, "%llu\n", (unsigned long long)mddev->recovery_cp); -} - -static ssize_t -resync_start_store(mddev_t *mddev, const char *buf, size_t len) -{ - /* can only set chunk_size if array is not yet active */ - char *e; - unsigned long long n = simple_strtoull(buf, &e, 10); - - if (mddev->pers) - return -EBUSY; - if (!*buf || (*e && *e != '\n')) - return -EINVAL; - - mddev->recovery_cp = n; - return len; -} -static struct md_sysfs_entry md_resync_start = -__ATTR(resync_start, S_IRUGO|S_IWUSR, resync_start_show, resync_start_store); - -/* - * The array state can be: - * - * clear - * No devices, no size, no level - * Equivalent to STOP_ARRAY ioctl - * inactive - * May have some settings, but array is not active - * all IO results in error - * When written, doesn't tear down array, but just stops it - * suspended (not supported yet) - * All IO requests will block. The array can be reconfigured. - * Writing this, if accepted, will block until array is quiessent - * readonly - * no resync can happen. no superblocks get written. - * write requests fail - * read-auto - * like readonly, but behaves like 'clean' on a write request. - * - * clean - no pending writes, but otherwise active. - * When written to inactive array, starts without resync - * If a write request arrives then - * if metadata is known, mark 'dirty' and switch to 'active'. - * if not known, block and switch to write-pending - * If written to an active array that has pending writes, then fails. - * active - * fully active: IO and resync can be happening. - * When written to inactive array, starts with resync - * - * write-pending - * clean, but writes are blocked waiting for 'active' to be written. - * - * active-idle - * like active, but no writes have been seen for a while (100msec). - * - */ -enum array_state { clear, inactive, suspended, readonly, read_auto, clean, active, - write_pending, active_idle, bad_word}; -static char *array_states[] = { - "clear", "inactive", "suspended", "readonly", "read-auto", "clean", "active", - "write-pending", "active-idle", NULL }; - -static int match_word(const char *word, char **list) -{ - int n; - for (n=0; list[n]; n++) - if (cmd_match(word, list[n])) - break; - return n; -} - -static ssize_t -array_state_show(mddev_t *mddev, char *page) -{ - enum array_state st = inactive; - - if (mddev->pers) - switch(mddev->ro) { - case 1: - st = readonly; - break; - case 2: - st = read_auto; - break; - case 0: - if (mddev->in_sync) - st = clean; - else if (mddev->safemode) - st = active_idle; - else - st = active; - } - else { - if (list_empty(&mddev->disks) && - mddev->raid_disks == 0 && - mddev->size == 0) - st = clear; - else - st = inactive; - } - return sprintf(page, "%s\n", array_states[st]); -} - -static int do_md_stop(mddev_t * mddev, int ro); -static int do_md_run(mddev_t * mddev); -static int restart_array(mddev_t *mddev); - -static ssize_t -array_state_store(mddev_t *mddev, const char *buf, size_t len) -{ - int err = -EINVAL; - enum array_state st = match_word(buf, array_states); - switch(st) { - case bad_word: - break; - case clear: - /* stopping an active array */ - if (mddev->pers) { - if (atomic_read(&mddev->active) > 1) - return -EBUSY; - err = do_md_stop(mddev, 0); - } - break; - case inactive: - /* stopping an active array */ - if (mddev->pers) { - if (atomic_read(&mddev->active) > 1) - return -EBUSY; - err = do_md_stop(mddev, 2); - } - break; - case suspended: - break; /* not supported yet */ - case readonly: - if (mddev->pers) - err = do_md_stop(mddev, 1); - else { - mddev->ro = 1; - err = do_md_run(mddev); - } - break; - case read_auto: - /* stopping an active array */ - if (mddev->pers) { - err = do_md_stop(mddev, 1); - if (err == 0) - mddev->ro = 2; /* FIXME mark devices writable */ - } else { - mddev->ro = 2; - err = do_md_run(mddev); - } - break; - case clean: - if (mddev->pers) { - restart_array(mddev); - spin_lock_irq(&mddev->write_lock); - if (atomic_read(&mddev->writes_pending) == 0) { - mddev->in_sync = 1; - mddev->sb_dirty = 1; - } - spin_unlock_irq(&mddev->write_lock); - } else { - mddev->ro = 0; - mddev->recovery_cp = MaxSector; - err = do_md_run(mddev); - } - break; - case active: - if (mddev->pers) { - restart_array(mddev); - mddev->sb_dirty = 0; - wake_up(&mddev->sb_wait); - err = 0; - } else { - mddev->ro = 0; - err = do_md_run(mddev); - } - break; - case write_pending: - case active_idle: - /* these cannot be set */ - break; - } - if (err) - return err; - else - return len; -} -static struct md_sysfs_entry md_array_state = -__ATTR(array_state, S_IRUGO|S_IWUSR, array_state_show, array_state_store); +__ATTR(chunk_size, 0644, chunk_size_show, chunk_size_store); static ssize_t null_show(mddev_t *mddev, char *page) @@ -2518,7 +2124,7 @@ new_dev_store(mddev_t *mddev, const char *buf, size_t len) } static struct md_sysfs_entry md_new_device = -__ATTR(new_dev, S_IWUSR, null_show, new_dev_store); +__ATTR(new_dev, 0200, null_show, new_dev_store); static ssize_t size_show(mddev_t *mddev, char *page) @@ -2556,7 +2162,7 @@ size_store(mddev_t *mddev, const char *buf, size_t len) } static struct md_sysfs_entry md_size = -__ATTR(component_size, S_IRUGO|S_IWUSR, size_show, size_store); +__ATTR(component_size, 0644, size_show, size_store); /* Metdata version. @@ -2604,7 +2210,7 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len) } static struct md_sysfs_entry md_metadata = -__ATTR(metadata_version, S_IRUGO|S_IWUSR, metadata_show, metadata_store); +__ATTR(metadata_version, 0644, metadata_show, metadata_store); static ssize_t action_show(mddev_t *mddev, char *page) @@ -2672,11 +2278,12 @@ mismatch_cnt_show(mddev_t *mddev, char *page) (unsigned long long) mddev->resync_mismatches); } -static struct md_sysfs_entry md_scan_mode = -__ATTR(sync_action, S_IRUGO|S_IWUSR, action_show, action_store); +static struct md_sysfs_entry +md_scan_mode = __ATTR(sync_action, S_IRUGO|S_IWUSR, action_show, action_store); -static struct md_sysfs_entry md_mismatches = __ATTR_RO(mismatch_cnt); +static struct md_sysfs_entry +md_mismatches = __ATTR_RO(mismatch_cnt); static ssize_t sync_min_show(mddev_t *mddev, char *page) @@ -2735,14 +2342,15 @@ static ssize_t sync_speed_show(mddev_t *mddev, char *page) { unsigned long resync, dt, db; - resync = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active)); + resync = (mddev->curr_resync - atomic_read(&mddev->recovery_active)); dt = ((jiffies - mddev->resync_mark) / HZ); if (!dt) dt++; db = resync - (mddev->resync_mark_cnt); return sprintf(page, "%ld\n", db/dt/2); /* K/sec */ } -static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed); +static struct md_sysfs_entry +md_sync_speed = __ATTR_RO(sync_speed); static ssize_t sync_completed_show(mddev_t *mddev, char *page) @@ -2758,7 +2366,8 @@ sync_completed_show(mddev_t *mddev, char *page) return sprintf(page, "%lu / %lu\n", resync, max_blocks); } -static struct md_sysfs_entry md_sync_completed = __ATTR_RO(sync_completed); +static struct md_sysfs_entry +md_sync_completed = __ATTR_RO(sync_completed); static ssize_t suspend_lo_show(mddev_t *mddev, char *page) @@ -2819,15 +2428,11 @@ __ATTR(suspend_hi, S_IRUGO|S_IWUSR, suspend_hi_show, suspend_hi_store); static struct attribute *md_default_attrs[] = { &md_level.attr, - &md_layout.attr, &md_raid_disks.attr, &md_chunk_size.attr, &md_size.attr, - &md_resync_start.attr, &md_metadata.attr, &md_new_device.attr, - &md_safe_delay.attr, - &md_array_state.attr, NULL, }; @@ -2875,8 +2480,6 @@ md_attr_store(struct kobject *kobj, struct attribute *attr, if (!entry->store) return -EIO; - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; rv = mddev_lock(mddev); if (!rv) { rv = entry->store(mddev, page, length); @@ -2929,10 +2532,13 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data) } disk->major = MAJOR(dev); disk->first_minor = unit << shift; - if (partitioned) + if (partitioned) { sprintf(disk->disk_name, "md_d%d", unit); - else + sprintf(disk->devfs_name, "md/d%d", unit); + } else { sprintf(disk->disk_name, "md%d", unit); + sprintf(disk->devfs_name, "md/%d", unit); + } disk->fops = &md_fops; disk->private_data = mddev; disk->queue = mddev->queue; @@ -2947,6 +2553,8 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data) return NULL; } +void md_wakeup_thread(mdk_thread_t *thread); + static void md_safemode_timeout(unsigned long data) { mddev_t *mddev = (mddev_t *) data; @@ -3100,7 +2708,7 @@ static int do_md_run(mddev_t * mddev) mddev->safemode = 0; mddev->safemode_timer.function = md_safemode_timeout; mddev->safemode_timer.data = (unsigned long) mddev; - mddev->safemode_delay = (200 * HZ)/1000 +1; /* 200 msec delay */ + mddev->safemode_delay = (20 * HZ)/1000 +1; /* 20 msec delay */ mddev->in_sync = 1; ITERATE_RDEV(mddev,rdev,tmp) @@ -3111,6 +2719,7 @@ static int do_md_run(mddev_t * mddev) } set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); + md_wakeup_thread(mddev->thread); if (mddev->sb_dirty) md_update_sb(mddev); @@ -3127,37 +2736,6 @@ static int do_md_run(mddev_t * mddev) mddev->queue->queuedata = mddev; mddev->queue->make_request_fn = mddev->pers->make_request; - /* If there is a partially-recovered drive we need to - * start recovery here. If we leave it to md_check_recovery, - * it will remove the drives and not do the right thing - */ - if (mddev->degraded && !mddev->sync_thread) { - struct list_head *rtmp; - int spares = 0; - ITERATE_RDEV(mddev,rdev,rtmp) - if (rdev->raid_disk >= 0 && - !test_bit(In_sync, &rdev->flags) && - !test_bit(Faulty, &rdev->flags)) - /* complete an interrupted recovery */ - spares++; - if (spares && mddev->pers->sync_request) { - mddev->recovery = 0; - set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); - mddev->sync_thread = md_register_thread(md_do_sync, - mddev, - "%s_resync"); - if (!mddev->sync_thread) { - printk(KERN_ERR "%s: could not start resync" - " thread...\n", - mdname(mddev)); - /* leave the spares where they are, it shouldn't hurt */ - mddev->recovery = 0; - } - } - } - md_wakeup_thread(mddev->thread); - md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */ - mddev->changed = 1; md_new_event(mddev); return 0; @@ -3191,47 +2769,18 @@ static int restart_array(mddev_t *mddev) */ set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); md_wakeup_thread(mddev->thread); - md_wakeup_thread(mddev->sync_thread); err = 0; - } else + } else { + printk(KERN_ERR "md: %s has no personality assigned.\n", + mdname(mddev)); err = -EINVAL; + } out: return err; } -/* similar to deny_write_access, but accounts for our holding a reference - * to the file ourselves */ -static int deny_bitmap_write_access(struct file * file) -{ - struct inode *inode = file->f_mapping->host; - - spin_lock(&inode->i_lock); - if (atomic_read(&inode->i_writecount) > 1) { - spin_unlock(&inode->i_lock); - return -ETXTBSY; - } - atomic_set(&inode->i_writecount, -1); - spin_unlock(&inode->i_lock); - - return 0; -} - -static void restore_bitmap_write_access(struct file *file) -{ - struct inode *inode = file->f_mapping->host; - - spin_lock(&inode->i_lock); - atomic_set(&inode->i_writecount, 1); - spin_unlock(&inode->i_lock); -} - -/* mode: - * 0 - completely stop and dis-assemble array - * 1 - switch to readonly - * 2 - stop but do not disassemble array - */ -static int do_md_stop(mddev_t * mddev, int mode) +static int do_md_stop(mddev_t * mddev, int ro) { int err = 0; struct gendisk *disk = mddev->gendisk; @@ -3243,7 +2792,6 @@ static int do_md_stop(mddev_t * mddev, int mode) } if (mddev->sync_thread) { - set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); set_bit(MD_RECOVERY_INTR, &mddev->recovery); md_unregister_thread(mddev->sync_thread); mddev->sync_thread = NULL; @@ -3253,15 +2801,12 @@ static int do_md_stop(mddev_t * mddev, int mode) invalidate_partition(disk, 0); - switch(mode) { - case 1: /* readonly */ + if (ro) { err = -ENXIO; if (mddev->ro==1) goto out; mddev->ro = 1; - break; - case 0: /* disassemble */ - case 2: /* stop */ + } else { bitmap_flush(mddev); md_super_wait(mddev); if (mddev->ro) @@ -3276,20 +2821,19 @@ static int do_md_stop(mddev_t * mddev, int mode) if (mddev->ro) mddev->ro = 0; } - if (!mddev->in_sync || mddev->sb_dirty) { + if (!mddev->in_sync) { /* mark array as shutdown cleanly */ mddev->in_sync = 1; md_update_sb(mddev); } - if (mode == 1) + if (ro) set_disk_ro(disk, 1); - clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); } /* * Free resources if final stop */ - if (mode == 0) { + if (!ro) { mdk_rdev_t *rdev; struct list_head *tmp; struct gendisk *disk; @@ -3297,7 +2841,7 @@ static int do_md_stop(mddev_t * mddev, int mode) bitmap_destroy(mddev); if (mddev->bitmap_file) { - restore_bitmap_write_access(mddev->bitmap_file); + atomic_set(&mddev->bitmap_file->f_dentry->d_inode->i_writecount, 1); fput(mddev->bitmap_file); mddev->bitmap_file = NULL; } @@ -3313,15 +2857,11 @@ static int do_md_stop(mddev_t * mddev, int mode) export_array(mddev); mddev->array_size = 0; - mddev->size = 0; - mddev->raid_disks = 0; - mddev->recovery_cp = 0; - disk = mddev->gendisk; if (disk) set_capacity(disk, 0); mddev->changed = 1; - } else if (mddev->pers) + } else printk(KERN_INFO "md: %s switched to read-only mode.\n", mdname(mddev)); err = 0; @@ -3724,17 +3264,6 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info) rdev->raid_disk = -1; err = bind_rdev_to_array(rdev, mddev); - if (!err && !mddev->pers->hot_remove_disk) { - /* If there is hot_add_disk but no hot_remove_disk - * then added disks for geometry changes, - * and should be added immediately. - */ - super_types[mddev->major_version]. - validate_super(mddev, rdev); - err = mddev->pers->hot_add_disk(mddev, rdev); - if (err) - unbind_rdev_from_array(rdev); - } if (err) export_rdev(rdev); @@ -3868,7 +3397,6 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev) } clear_bit(In_sync, &rdev->flags); rdev->desc_nr = -1; - rdev->saved_raid_disk = -1; err = bind_rdev_to_array(rdev, mddev); if (err) goto abort_export; @@ -3906,6 +3434,23 @@ abort_export: return err; } +/* similar to deny_write_access, but accounts for our holding a reference + * to the file ourselves */ +static int deny_bitmap_write_access(struct file * file) +{ + struct inode *inode = file->f_mapping->host; + + spin_lock(&inode->i_lock); + if (atomic_read(&inode->i_writecount) > 1) { + spin_unlock(&inode->i_lock); + return -ETXTBSY; + } + atomic_set(&inode->i_writecount, -1); + spin_unlock(&inode->i_lock); + + return 0; +} + static int set_bitmap_file(mddev_t *mddev, int fd) { int err; @@ -3946,17 +3491,12 @@ static int set_bitmap_file(mddev_t *mddev, int fd) mddev->pers->quiesce(mddev, 1); if (fd >= 0) err = bitmap_create(mddev); - if (fd < 0 || err) { + if (fd < 0 || err) bitmap_destroy(mddev); - fd = -1; /* make sure to put the file */ - } mddev->pers->quiesce(mddev, 0); - } - if (fd < 0) { - if (mddev->bitmap_file) { - restore_bitmap_write_access(mddev->bitmap_file); + } else if (fd < 0) { + if (mddev->bitmap_file) fput(mddev->bitmap_file); - } mddev->bitmap_file = NULL; } @@ -4437,6 +3977,11 @@ static int md_ioctl(struct inode *inode, struct file *file, goto done_unlock; default: + if (_IOC_TYPE(cmd) == MD_MAJOR) + printk(KERN_WARNING "md: %s(pid %d) used" + " obsolete MD ioctl, upgrade your" + " software to use new ictls.\n", + current->comm, current->pid); err = -EINVAL; goto abort_unlock; } @@ -4607,8 +4152,6 @@ void md_error(mddev_t *mddev, mdk_rdev_t *rdev) __builtin_return_address(0),__builtin_return_address(1), __builtin_return_address(2),__builtin_return_address(3)); */ - if (!mddev->pers) - return; if (!mddev->pers->error_handler) return; mddev->pers->error_handler(mddev,rdev); @@ -4706,13 +4249,12 @@ static void status_resync(struct seq_file *seq, mddev_t * mddev) */ dt = ((jiffies - mddev->resync_mark) / HZ); if (!dt) dt++; - db = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active)) - - mddev->resync_mark_cnt; - rt = (dt * ((unsigned long)(max_blocks-resync) / (db/2/100+1)))/100; + db = resync - (mddev->resync_mark_cnt/2); + rt = (dt * ((unsigned long)(max_blocks-resync) / (db/100+1)))/100; seq_printf(seq, " finish=%lu.%lumin", rt / 60, (rt % 60)/6); - seq_printf(seq, " speed=%ldK/sec", db/2/dt); + seq_printf(seq, " speed=%ldK/sec", db/dt); } static void *md_seq_start(struct seq_file *seq, loff_t *pos) @@ -5044,7 +4586,7 @@ void md_write_start(mddev_t *mddev, struct bio *bi) spin_lock_irq(&mddev->write_lock); if (mddev->in_sync) { mddev->in_sync = 0; - mddev->sb_dirty = 3; + mddev->sb_dirty = 1; md_wakeup_thread(mddev->thread); } spin_unlock_irq(&mddev->write_lock); @@ -5057,7 +4599,7 @@ void md_write_end(mddev_t *mddev) if (atomic_dec_and_test(&mddev->writes_pending)) { if (mddev->safemode == 2) md_wakeup_thread(mddev->thread); - else if (mddev->safemode_delay) + else mod_timer(&mddev->safemode_timer, jiffies + mddev->safemode_delay); } } @@ -5078,14 +4620,10 @@ void md_do_sync(mddev_t *mddev) struct list_head *tmp; sector_t last_check; int skipped = 0; - struct list_head *rtmp; - mdk_rdev_t *rdev; /* just incase thread restarts... */ if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) return; - if (mddev->ro) /* never try to sync a read-only array */ - return; /* we overload curr_resync somewhat here. * 0 == not engaged in resync at all @@ -5144,30 +4682,17 @@ void md_do_sync(mddev_t *mddev) } } while (mddev->curr_resync < 2); - j = 0; if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { /* resync follows the size requested by the personality, * which defaults to physical size, but can be virtual size */ max_sectors = mddev->resync_max_sectors; mddev->resync_mismatches = 0; - /* we don't use the checkpoint if there's a bitmap */ - if (!mddev->bitmap && - !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) - j = mddev->recovery_cp; } else if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) max_sectors = mddev->size << 1; - else { + else /* recovery follows the physical size of devices */ max_sectors = mddev->size << 1; - j = MaxSector; - ITERATE_RDEV(mddev,rdev,rtmp) - if (rdev->raid_disk >= 0 && - !test_bit(Faulty, &rdev->flags) && - !test_bit(In_sync, &rdev->flags) && - rdev->recovery_offset < j) - j = rdev->recovery_offset; - } printk(KERN_INFO "md: syncing RAID array %s\n", mdname(mddev)); printk(KERN_INFO "md: minimum _guaranteed_ reconstruction speed:" @@ -5177,7 +4702,12 @@ void md_do_sync(mddev_t *mddev) speed_max(mddev)); is_mddev_idle(mddev); /* this also initializes IO event counters */ - + /* we don't use the checkpoint if there's a bitmap */ + if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) && !mddev->bitmap + && ! test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) + j = mddev->recovery_cp; + else + j = 0; io_sectors = 0; for (m = 0; m < SYNC_MARKS; m++) { mark[m] = jiffies; @@ -5223,7 +4753,6 @@ void md_do_sync(mddev_t *mddev) j += sectors; if (j>1) mddev->curr_resync = j; - mddev->curr_mark_cnt = io_sectors; if (last_check == 0) /* this is the earliers that rebuilt will be * visible in /proc/mdstat @@ -5299,28 +4828,15 @@ void md_do_sync(mddev_t *mddev) if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && test_bit(MD_RECOVERY_SYNC, &mddev->recovery) && !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) && - mddev->curr_resync > 2) { - if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { - if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { - if (mddev->curr_resync >= mddev->recovery_cp) { - printk(KERN_INFO - "md: checkpointing recovery of %s.\n", - mdname(mddev)); - mddev->recovery_cp = mddev->curr_resync; - } - } else - mddev->recovery_cp = MaxSector; - } else { - if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) - mddev->curr_resync = MaxSector; - ITERATE_RDEV(mddev,rdev,rtmp) - if (rdev->raid_disk >= 0 && - !test_bit(Faulty, &rdev->flags) && - !test_bit(In_sync, &rdev->flags) && - rdev->recovery_offset < mddev->curr_resync) - rdev->recovery_offset = mddev->curr_resync; - mddev->sb_dirty = 1; - } + mddev->curr_resync > 2 && + mddev->curr_resync >= mddev->recovery_cp) { + if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { + printk(KERN_INFO + "md: checkpointing recovery of %s.\n", + mdname(mddev)); + mddev->recovery_cp = mddev->curr_resync; + } else + mddev->recovery_cp = MaxSector; } skip: @@ -5392,7 +4908,7 @@ void md_check_recovery(mddev_t *mddev) if (mddev->safemode && !atomic_read(&mddev->writes_pending) && !mddev->in_sync && mddev->recovery_cp == MaxSector) { mddev->in_sync = 1; - mddev->sb_dirty = 3; + mddev->sb_dirty = 1; } if (mddev->safemode == 1) mddev->safemode = 0; @@ -5441,8 +4957,6 @@ void md_check_recovery(mddev_t *mddev) clear_bit(MD_RECOVERY_INTR, &mddev->recovery); clear_bit(MD_RECOVERY_DONE, &mddev->recovery); - if (test_bit(MD_RECOVERY_FROZEN, &mddev->recovery)) - goto unlock; /* no recovery is running. * remove any failed drives, then * add spares if possible. @@ -5465,7 +4979,6 @@ void md_check_recovery(mddev_t *mddev) ITERATE_RDEV(mddev,rdev,rtmp) if (rdev->raid_disk < 0 && !test_bit(Faulty, &rdev->flags)) { - rdev->recovery_offset = 0; if (mddev->pers->hot_add_disk(mddev,rdev)) { char nm[20]; sprintf(nm, "rd%d", rdev->raid_disk); @@ -5558,6 +5071,8 @@ static void md_geninit(void) static int __init md_init(void) { + int minor; + printk(KERN_INFO "md: md driver %d.%d.%d MAX_MD_DEVS=%d," " MD_SB_DISKS=%d\n", MD_MAJOR_VERSION, MD_MINOR_VERSION, @@ -5571,11 +5086,23 @@ static int __init md_init(void) unregister_blkdev(MAJOR_NR, "md"); return -1; } + devfs_mk_dir("md"); blk_register_region(MKDEV(MAJOR_NR, 0), MAX_MD_DEVS, THIS_MODULE, md_probe, NULL, NULL); blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS<degraded = conf->raid_disks - conf->working_disks; + mddev->degraded = conf->raid_disks = conf->working_disks; conf->pool = mempool_create_kzalloc_pool(NR_RESERVED_BUFS, sizeof(struct multipath_bh)); diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 3b4d69c05..5a5449400 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -374,26 +374,26 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int * already. */ if (atomic_dec_and_test(&r1_bio->remaining)) { - if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) + if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { reschedule_retry(r1_bio); - else { - /* it really is the end of this request */ - if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { - /* free extra copy of the data pages */ - int i = bio->bi_vcnt; - while (i--) - safe_put_page(bio->bi_io_vec[i].bv_page); - } - /* clear the bitmap if all writes complete successfully */ - bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, - r1_bio->sectors, - !test_bit(R1BIO_Degraded, &r1_bio->state), - behind); - md_write_end(r1_bio->mddev); - raid_end_bio_io(r1_bio); + goto out; + } + /* it really is the end of this request */ + if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { + /* free extra copy of the data pages */ + int i = bio->bi_vcnt; + while (i--) + safe_put_page(bio->bi_io_vec[i].bv_page); } + /* clear the bitmap if all writes complete successfully */ + bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, + r1_bio->sectors, + !test_bit(R1BIO_Degraded, &r1_bio->state), + behind); + md_write_end(r1_bio->mddev); + raid_end_bio_io(r1_bio); } - + out: if (to_put) bio_put(to_put); @@ -930,13 +930,10 @@ static void status(struct seq_file *seq, mddev_t *mddev) seq_printf(seq, " [%d/%d] [", conf->raid_disks, conf->working_disks); - rcu_read_lock(); - for (i = 0; i < conf->raid_disks; i++) { - mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev); + for (i = 0; i < conf->raid_disks; i++) seq_printf(seq, "%s", - rdev && test_bit(In_sync, &rdev->flags) ? "U" : "_"); - } - rcu_read_unlock(); + conf->mirrors[i].rdev && + test_bit(In_sync, &conf->mirrors[i].rdev->flags) ? "U" : "_"); seq_printf(seq, "]"); } @@ -978,6 +975,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) static void print_conf(conf_t *conf) { int i; + mirror_info_t *tmp; printk("RAID1 conf printout:\n"); if (!conf) { @@ -987,17 +985,14 @@ static void print_conf(conf_t *conf) printk(" --- wd:%d rd:%d\n", conf->working_disks, conf->raid_disks); - rcu_read_lock(); for (i = 0; i < conf->raid_disks; i++) { char b[BDEVNAME_SIZE]; - mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev); - if (rdev) + tmp = conf->mirrors + i; + if (tmp->rdev) printk(" disk %d, wo:%d, o:%d, dev:%s\n", - i, !test_bit(In_sync, &rdev->flags), - !test_bit(Faulty, &rdev->flags), - bdevname(rdev->bdev,b)); + i, !test_bit(In_sync, &tmp->rdev->flags), !test_bit(Faulty, &tmp->rdev->flags), + bdevname(tmp->rdev->bdev,b)); } - rcu_read_unlock(); } static void close_sync(conf_t *conf) @@ -1013,20 +1008,20 @@ static int raid1_spare_active(mddev_t *mddev) { int i; conf_t *conf = mddev->private; + mirror_info_t *tmp; /* * Find all failed disks within the RAID1 configuration - * and mark them readable. - * Called under mddev lock, so rcu protection not needed. + * and mark them readable */ for (i = 0; i < conf->raid_disks; i++) { - mdk_rdev_t *rdev = conf->mirrors[i].rdev; - if (rdev - && !test_bit(Faulty, &rdev->flags) - && !test_bit(In_sync, &rdev->flags)) { + tmp = conf->mirrors + i; + if (tmp->rdev + && !test_bit(Faulty, &tmp->rdev->flags) + && !test_bit(In_sync, &tmp->rdev->flags)) { conf->working_disks++; mddev->degraded--; - set_bit(In_sync, &rdev->flags); + set_bit(In_sync, &tmp->rdev->flags); } } @@ -1150,7 +1145,7 @@ static int end_sync_write(struct bio *bio, unsigned int bytes_done, int error) long sectors_to_go = r1_bio->sectors; /* make sure these bits doesn't get cleared. */ do { - bitmap_end_sync(mddev->bitmap, s, + bitmap_end_sync(mddev->bitmap, r1_bio->sector, &sync_blocks, 1); s += sync_blocks; sectors_to_go -= sync_blocks; @@ -1242,7 +1237,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) /* ouch - failed to read all of that. * Try some synchronous reads of other devices to get * good data, much like with normal read errors. Only - * read into the pages we already have so we don't + * read into the pages we already have so they we don't * need to re-issue the read request. * We don't need to freeze the array, because being in an * active sync request, there is no normal IO, and @@ -1262,10 +1257,6 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) s = PAGE_SIZE >> 9; do { if (r1_bio->bios[d]->bi_end_io == end_sync_read) { - /* No rcu protection needed here devices - * can only be removed when no resync is - * active, and resync is currently active - */ rdev = conf->mirrors[d].rdev; if (sync_page_io(rdev->bdev, sect + rdev->data_offset, @@ -1472,11 +1463,6 @@ static void raid1d(mddev_t *mddev) s = PAGE_SIZE >> 9; do { - /* Note: no rcu protection needed here - * as this is synchronous in the raid1d thread - * which is the thread that might remove - * a device. If raid1d ever becomes multi-threaded.... - */ rdev = conf->mirrors[d].rdev; if (rdev && test_bit(In_sync, &rdev->flags) && @@ -1522,11 +1508,9 @@ static void raid1d(mddev_t *mddev) s<<9, conf->tmppage, READ) == 0) /* Well, this device is dead */ md_error(mddev, rdev); - else { + else atomic_add(s, &rdev->corrected_errors); - printk(KERN_INFO "raid1:%s: read error corrected (%d sectors at %llu on %s)\n", - mdname(mddev), s, (unsigned long long)(sect + rdev->data_offset), bdevname(rdev->bdev, b)); - } + } } } else { @@ -1640,13 +1624,6 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i return 0; } - if (mddev->bitmap == NULL && - mddev->recovery_cp == MaxSector && - !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && - conf->fullsync == 0) { - *skipped = 1; - return max_sector - sector_nr; - } /* before building a request, check if we can skip these blocks.. * This call the bitmap_start_sync doesn't actually record anything */ @@ -1802,17 +1779,19 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i for (i=0; iraid_disks; i++) { bio = r1_bio->bios[i]; if (bio->bi_end_io == end_sync_read) { - md_sync_acct(bio->bi_bdev, nr_sectors); + md_sync_acct(conf->mirrors[i].rdev->bdev, nr_sectors); generic_make_request(bio); } } } else { atomic_set(&r1_bio->remaining, 1); bio = r1_bio->bios[r1_bio->read_disk]; - md_sync_acct(bio->bi_bdev, nr_sectors); + md_sync_acct(conf->mirrors[r1_bio->read_disk].rdev->bdev, + nr_sectors); generic_make_request(bio); } + return nr_sectors; } @@ -1911,8 +1890,7 @@ static int run(mddev_t *mddev) disk = conf->mirrors + i; - if (!disk->rdev || - !test_bit(In_sync, &disk->rdev->flags)) { + if (!disk->rdev) { disk->head_position = 0; mddev->degraded++; } diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 115a6f866..144093541 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -29,7 +29,6 @@ * raid_disks * near_copies (stored in low byte of layout) * far_copies (stored in second byte of layout) - * far_offset (stored in bit 16 of layout ) * * The data to be stored is divided into chunks using chunksize. * Each device is divided into far_copies sections. @@ -37,14 +36,10 @@ * near_copies copies of each chunk is stored (each on a different drive). * The starting device for each section is offset near_copies from the starting * device of the previous section. - * Thus they are (near_copies*far_copies) of each chunk, and each is on a different + * Thus there are (near_copies*far_copies) of each chunk, and each is on a different * drive. * near_copies and far_copies must be at least one, and their product is at most * raid_disks. - * - * If far_offset is true, then the far_copies are handled a bit differently. - * The copies are still in different stripes, but instead of be very far apart - * on disk, there are adjacent stripes. */ /* @@ -362,7 +357,8 @@ static int raid10_end_write_request(struct bio *bio, unsigned int bytes_done, in * With this layout, and block is never stored twice on the one device. * * raid10_find_phys finds the sector offset of a given virtual sector - * on each device that it is on. + * on each device that it is on. If a block isn't on a device, + * that entry in the array is set to MaxSector. * * raid10_find_virt does the reverse mapping, from a device and a * sector offset to a virtual address @@ -385,8 +381,6 @@ static void raid10_find_phys(conf_t *conf, r10bio_t *r10bio) chunk *= conf->near_copies; stripe = chunk; dev = sector_div(stripe, conf->raid_disks); - if (conf->far_offset) - stripe *= conf->far_copies; sector += stripe << conf->chunk_shift; @@ -420,24 +414,16 @@ static sector_t raid10_find_virt(conf_t *conf, sector_t sector, int dev) { sector_t offset, chunk, vchunk; - offset = sector & conf->chunk_mask; - if (conf->far_offset) { - int fc; - chunk = sector >> conf->chunk_shift; - fc = sector_div(chunk, conf->far_copies); - dev -= fc * conf->near_copies; - if (dev < 0) - dev += conf->raid_disks; - } else { - while (sector > conf->stride) { - sector -= conf->stride; - if (dev < conf->near_copies) - dev += conf->raid_disks - conf->near_copies; - else - dev -= conf->near_copies; - } - chunk = sector >> conf->chunk_shift; + while (sector > conf->stride) { + sector -= conf->stride; + if (dev < conf->near_copies) + dev += conf->raid_disks - conf->near_copies; + else + dev -= conf->near_copies; } + + offset = sector & conf->chunk_mask; + chunk = sector >> conf->chunk_shift; vchunk = chunk * conf->raid_disks + dev; sector_div(vchunk, conf->near_copies); return (vchunk << conf->chunk_shift) + offset; @@ -914,12 +900,9 @@ static void status(struct seq_file *seq, mddev_t *mddev) seq_printf(seq, " %dK chunks", mddev->chunk_size/1024); if (conf->near_copies > 1) seq_printf(seq, " %d near-copies", conf->near_copies); - if (conf->far_copies > 1) { - if (conf->far_offset) - seq_printf(seq, " %d offset-copies", conf->far_copies); - else - seq_printf(seq, " %d far-copies", conf->far_copies); - } + if (conf->far_copies > 1) + seq_printf(seq, " %d far-copies", conf->far_copies); + seq_printf(seq, " [%d/%d] [", conf->raid_disks, conf->working_disks); for (i = 0; i < conf->raid_disks; i++) @@ -1492,10 +1475,6 @@ static void raid10d(mddev_t *mddev) s<<9, conf->tmppage, READ) == 0) /* Well, this device is dead */ md_error(mddev, rdev); - else - printk(KERN_INFO "raid10:%s: read error corrected (%d sectors at %llu on %s)\n", - mdname(mddev), s, (unsigned long long)(sect+rdev->data_offset), bdevname(rdev->bdev, b)); - rdev_dec_pending(rdev, mddev); rcu_read_lock(); } @@ -1936,7 +1915,7 @@ static int run(mddev_t *mddev) mirror_info_t *disk; mdk_rdev_t *rdev; struct list_head *tmp; - int nc, fc, fo; + int nc, fc; sector_t stride, size; if (mddev->chunk_size == 0) { @@ -1946,9 +1925,8 @@ static int run(mddev_t *mddev) nc = mddev->layout & 255; fc = (mddev->layout >> 8) & 255; - fo = mddev->layout & (1<<16); if ((nc*fc) <2 || (nc*fc) > mddev->raid_disks || - (mddev->layout >> 17)) { + (mddev->layout >> 16)) { printk(KERN_ERR "raid10: %s: unsupported raid10 layout: 0x%8x\n", mdname(mddev), mddev->layout); goto out; @@ -1980,16 +1958,12 @@ static int run(mddev_t *mddev) conf->near_copies = nc; conf->far_copies = fc; conf->copies = nc*fc; - conf->far_offset = fo; conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1; conf->chunk_shift = ffz(~mddev->chunk_size) - 9; - if (fo) - conf->stride = 1 << conf->chunk_shift; - else { - stride = mddev->size >> (conf->chunk_shift-1); - sector_div(stride, fc); - conf->stride = stride << conf->chunk_shift; - } + stride = mddev->size >> (conf->chunk_shift-1); + sector_div(stride, fc); + conf->stride = stride << conf->chunk_shift; + conf->r10bio_pool = mempool_create(NR_RAID10_BIOS, r10bio_pool_alloc, r10bio_pool_free, conf); if (!conf->r10bio_pool) { @@ -2041,8 +2015,7 @@ static int run(mddev_t *mddev) disk = conf->mirrors + i; - if (!disk->rdev || - !test_bit(In_sync, &disk->rdev->flags)) { + if (!disk->rdev) { disk->head_position = 0; mddev->degraded++; } @@ -2064,13 +2037,7 @@ static int run(mddev_t *mddev) /* * Ok, everything is just fine now */ - if (conf->far_offset) { - size = mddev->size >> (conf->chunk_shift-1); - size *= conf->raid_disks; - size <<= conf->chunk_shift; - sector_div(size, conf->far_copies); - } else - size = conf->stride * conf->raid_disks; + size = conf->stride * conf->raid_disks; sector_div(size, conf->near_copies); mddev->array_size = size/2; mddev->resync_max_sectors = size; @@ -2083,7 +2050,7 @@ static int run(mddev_t *mddev) * maybe... */ { - int stripe = conf->raid_disks * (mddev->chunk_size / PAGE_SIZE); + int stripe = conf->raid_disks * mddev->chunk_size / PAGE_SIZE; stripe /= conf->near_copies; if (mddev->queue->backing_dev_info.ra_pages < 2* stripe) mddev->queue->backing_dev_info.ra_pages = 2* stripe; diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 450066007..318436040 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2,11 +2,8 @@ * raid5.c : Multiple Devices driver for Linux * Copyright (C) 1996, 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman * Copyright (C) 1999, 2000 Ingo Molnar - * Copyright (C) 2002, 2003 H. Peter Anvin * - * RAID-4/5/6 management functions. - * Thanks to Penguin Computing for making the RAID-6 development possible - * by donating a test server! + * RAID-5 management 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 @@ -18,38 +15,15 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * BITMAP UNPLUGGING: - * - * The sequencing for updating the bitmap reliably is a little - * subtle (and I got it wrong the first time) so it deserves some - * explanation. - * - * We group bitmap updates into batches. Each batch has a number. - * We may write out several batches at once, but that isn't very important. - * conf->bm_write is the number of the last batch successfully written. - * conf->bm_flush is the number of the last batch that was closed to - * new additions. - * When we discover that we will need to write to any block in a stripe - * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq - * the number of the batch it will be in. This is bm_flush+1. - * When we are ready to do a write, if that batch hasn't been written yet, - * we plug the array and queue the stripe for later. - * When an unplug happens, we increment bm_flush, thus closing the current - * batch. - * When we notice that bm_flush > bm_write, we write out all pending updates - * to the bitmap, and advance bm_write to where bm_flush was. - * This may occasionally write a bit out twice, but is sure never to - * miss any bits. - */ +#include #include #include +#include #include #include #include #include -#include "raid6.h" #include @@ -94,16 +68,6 @@ #define __inline__ #endif -#if !RAID6_USE_EMPTY_ZERO_PAGE -/* In .bss so it's zeroed */ -const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); -#endif - -static inline int raid6_next_disk(int disk, int raid_disks) -{ - disk++; - return (disk < raid_disks) ? disk : 0; -} static void print_raid5_conf (raid5_conf_t *conf); static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh) @@ -112,14 +76,12 @@ static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh) BUG_ON(!list_empty(&sh->lru)); BUG_ON(atomic_read(&conf->active_stripes)==0); if (test_bit(STRIPE_HANDLE, &sh->state)) { - if (test_bit(STRIPE_DELAYED, &sh->state)) { + if (test_bit(STRIPE_DELAYED, &sh->state)) list_add_tail(&sh->lru, &conf->delayed_list); - blk_plug_device(conf->mddev->queue); - } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && - sh->bm_seq - conf->seq_write > 0) { + else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && + conf->seq_write == sh->bm_seq) list_add_tail(&sh->lru, &conf->bitmap_list); - blk_plug_device(conf->mddev->queue); - } else { + else { clear_bit(STRIPE_BIT_DELAY, &sh->state); list_add_tail(&sh->lru, &conf->handle_list); } @@ -142,7 +104,7 @@ static void release_stripe(struct stripe_head *sh) { raid5_conf_t *conf = sh->raid_conf; unsigned long flags; - + spin_lock_irqsave(&conf->device_lock, flags); __release_stripe(conf, sh); spin_unlock_irqrestore(&conf->device_lock, flags); @@ -155,7 +117,7 @@ static inline void remove_hash(struct stripe_head *sh) hlist_del_init(&sh->hash); } -static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh) +static void insert_hash(raid5_conf_t *conf, struct stripe_head *sh) { struct hlist_head *hp = stripe_hash(conf, sh->sector); @@ -228,7 +190,7 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx, int (unsigned long long)sh->sector); remove_hash(sh); - + sh->sector = sector; sh->pd_idx = pd_idx; sh->state = 0; @@ -296,7 +258,7 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector < (conf->max_nr_stripes *3/4) || !conf->inactive_blocked), conf->device_lock, - raid5_unplug_device(conf->mddev->queue) + unplug_slaves(conf->mddev) ); conf->inactive_blocked = 0; } else @@ -307,10 +269,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector } else { if (!test_bit(STRIPE_HANDLE, &sh->state)) atomic_inc(&conf->active_stripes); - if (list_empty(&sh->lru) && - !test_bit(STRIPE_EXPANDING, &sh->state)) - BUG(); - list_del_init(&sh->lru); + if (!list_empty(&sh->lru)) + list_del_init(&sh->lru); } } } while (sh == NULL); @@ -361,9 +321,10 @@ static int grow_stripes(raid5_conf_t *conf, int num) return 1; conf->slab_cache = sc; conf->pool_size = devs; - while (num--) + while (num--) { if (!grow_one_stripe(conf)) return 1; + } return 0; } @@ -523,8 +484,6 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done, raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks, i; int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); - char b[BDEVNAME_SIZE]; - mdk_rdev_t *rdev; if (bi->bi_size) return 1; @@ -572,39 +531,25 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done, set_bit(R5_UPTODATE, &sh->dev[i].flags); #endif if (test_bit(R5_ReadError, &sh->dev[i].flags)) { - rdev = conf->disks[i].rdev; - printk(KERN_INFO "raid5:%s: read error corrected (%lu sectors at %llu on %s)\n", - mdname(conf->mddev), STRIPE_SECTORS, - (unsigned long long)sh->sector + rdev->data_offset, - bdevname(rdev->bdev, b)); + printk(KERN_INFO "raid5: read error corrected!!\n"); clear_bit(R5_ReadError, &sh->dev[i].flags); clear_bit(R5_ReWrite, &sh->dev[i].flags); } if (atomic_read(&conf->disks[i].rdev->read_errors)) atomic_set(&conf->disks[i].rdev->read_errors, 0); } else { - const char *bdn = bdevname(conf->disks[i].rdev->bdev, b); int retry = 0; - rdev = conf->disks[i].rdev; - clear_bit(R5_UPTODATE, &sh->dev[i].flags); - atomic_inc(&rdev->read_errors); + atomic_inc(&conf->disks[i].rdev->read_errors); if (conf->mddev->degraded) - printk(KERN_WARNING "raid5:%s: read error not correctable (sector %llu on %s).\n", - mdname(conf->mddev), - (unsigned long long)sh->sector + rdev->data_offset, - bdn); + printk(KERN_WARNING "raid5: read error not correctable.\n"); else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) /* Oh, no!!! */ - printk(KERN_WARNING "raid5:%s: read error NOT corrected!! (sector %llu on %s).\n", - mdname(conf->mddev), - (unsigned long long)sh->sector + rdev->data_offset, - bdn); - else if (atomic_read(&rdev->read_errors) + printk(KERN_WARNING "raid5: read error NOT corrected!!\n"); + else if (atomic_read(&conf->disks[i].rdev->read_errors) > conf->max_nr_stripes) printk(KERN_WARNING - "raid5:%s: Too many read errors, failing device %s.\n", - mdname(conf->mddev), bdn); + "raid5: Too many read errors, failing device.\n"); else retry = 1; if (retry) @@ -612,7 +557,7 @@ static int raid5_end_read_request(struct bio * bi, unsigned int bytes_done, else { clear_bit(R5_ReadError, &sh->dev[i].flags); clear_bit(R5_ReWrite, &sh->dev[i].flags); - md_error(conf->mddev, rdev); + md_error(conf->mddev, conf->disks[i].rdev); } } rdev_dec_pending(conf->disks[i].rdev, conf->mddev); @@ -686,7 +631,8 @@ static void raid5_build_block (struct stripe_head *sh, int i) dev->req.bi_private = sh; dev->flags = 0; - dev->sector = compute_blocknr(sh, i); + if (i != sh->pd_idx) + dev->sector = compute_blocknr(sh, i); } static void error(mddev_t *mddev, mdk_rdev_t *rdev) @@ -713,7 +659,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) " Operation continuing on %d devices\n", bdevname(rdev->bdev,b), conf->working_disks); } -} +} /* * Input: a 'big' sector number, @@ -751,12 +697,9 @@ static sector_t raid5_compute_sector(sector_t r_sector, unsigned int raid_disks, /* * Select the parity disk based on the user selected algorithm. */ - switch(conf->level) { - case 4: + if (conf->level == 4) *pd_idx = data_disks; - break; - case 5: - switch (conf->algorithm) { + else switch (conf->algorithm) { case ALGORITHM_LEFT_ASYMMETRIC: *pd_idx = data_disks - stripe % raid_disks; if (*dd_idx >= *pd_idx) @@ -778,39 +721,6 @@ static sector_t raid5_compute_sector(sector_t r_sector, unsigned int raid_disks, default: printk(KERN_ERR "raid5: unsupported algorithm %d\n", conf->algorithm); - } - break; - case 6: - - /**** FIX THIS ****/ - switch (conf->algorithm) { - case ALGORITHM_LEFT_ASYMMETRIC: - *pd_idx = raid_disks - 1 - (stripe % raid_disks); - if (*pd_idx == raid_disks-1) - (*dd_idx)++; /* Q D D D P */ - else if (*dd_idx >= *pd_idx) - (*dd_idx) += 2; /* D D P Q D */ - break; - case ALGORITHM_RIGHT_ASYMMETRIC: - *pd_idx = stripe % raid_disks; - if (*pd_idx == raid_disks-1) - (*dd_idx)++; /* Q D D D P */ - else if (*dd_idx >= *pd_idx) - (*dd_idx) += 2; /* D D P Q D */ - break; - case ALGORITHM_LEFT_SYMMETRIC: - *pd_idx = raid_disks - 1 - (stripe % raid_disks); - *dd_idx = (*pd_idx + 2 + *dd_idx) % raid_disks; - break; - case ALGORITHM_RIGHT_SYMMETRIC: - *pd_idx = stripe % raid_disks; - *dd_idx = (*pd_idx + 2 + *dd_idx) % raid_disks; - break; - default: - printk (KERN_CRIT "raid6: unsupported algorithm %d\n", - conf->algorithm); - } - break; } /* @@ -832,17 +742,12 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i) int chunk_number, dummy1, dummy2, dd_idx = i; sector_t r_sector; - chunk_offset = sector_div(new_sector, sectors_per_chunk); stripe = new_sector; BUG_ON(new_sector != stripe); - if (i == sh->pd_idx) - return 0; - switch(conf->level) { - case 4: break; - case 5: - switch (conf->algorithm) { + + switch (conf->algorithm) { case ALGORITHM_LEFT_ASYMMETRIC: case ALGORITHM_RIGHT_ASYMMETRIC: if (i > sh->pd_idx) @@ -856,37 +761,7 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i) break; default: printk(KERN_ERR "raid5: unsupported algorithm %d\n", - conf->algorithm); - } - break; - case 6: - data_disks = raid_disks - 2; - if (i == raid6_next_disk(sh->pd_idx, raid_disks)) - return 0; /* It is the Q disk */ - switch (conf->algorithm) { - case ALGORITHM_LEFT_ASYMMETRIC: - case ALGORITHM_RIGHT_ASYMMETRIC: - if (sh->pd_idx == raid_disks-1) - i--; /* Q D D D P */ - else if (i > sh->pd_idx) - i -= 2; /* D D P Q D */ - break; - case ALGORITHM_LEFT_SYMMETRIC: - case ALGORITHM_RIGHT_SYMMETRIC: - if (sh->pd_idx == raid_disks-1) - i--; /* Q D D D P */ - else { - /* D D P Q D */ - if (i < sh->pd_idx) - i += raid_disks; - i -= (sh->pd_idx + 2); - } - break; - default: - printk (KERN_CRIT "raid6: unsupported algorithm %d\n", conf->algorithm); - } - break; } chunk_number = stripe * data_disks + i; @@ -903,11 +778,10 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i) /* - * Copy data between a page in the stripe cache, and one or more bion - * The page could align with the middle of the bio, or there could be - * several bion, each with several bio_vecs, which cover part of the page - * Multiple bion are linked together on bi_next. There may be extras - * at the end of this list. We ignore them. + * Copy data between a page in the stripe cache, and a bio. + * There are no alignment or size guarantees between the page or the + * bio except that there is some overlap. + * All iovecs in the bio must be considered. */ static void copy_data(int frombio, struct bio *bio, struct page *page, @@ -936,7 +810,7 @@ static void copy_data(int frombio, struct bio *bio, if (len > 0 && page_offset + len > STRIPE_SIZE) clen = STRIPE_SIZE - page_offset; else clen = len; - + if (clen > 0) { char *ba = __bio_kmap_atomic(bio, i, KM_USER0); if (frombio) @@ -988,14 +862,14 @@ static void compute_block(struct stripe_head *sh, int dd_idx) set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); } -static void compute_parity5(struct stripe_head *sh, int method) +static void compute_parity(struct stripe_head *sh, int method) { raid5_conf_t *conf = sh->raid_conf; int i, pd_idx = sh->pd_idx, disks = sh->disks, count; void *ptr[MAX_XOR_BLOCKS]; struct bio *chosen; - PRINTK("compute_parity5, stripe %llu, method %d\n", + PRINTK("compute_parity, stripe %llu, method %d\n", (unsigned long long)sh->sector, method); count = 1; @@ -1082,195 +956,9 @@ static void compute_parity5(struct stripe_head *sh, int method) clear_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); } -static void compute_parity6(struct stripe_head *sh, int method) -{ - raid6_conf_t *conf = sh->raid_conf; - int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count; - struct bio *chosen; - /**** FIX THIS: This could be very bad if disks is close to 256 ****/ - void *ptrs[disks]; - - qd_idx = raid6_next_disk(pd_idx, disks); - d0_idx = raid6_next_disk(qd_idx, disks); - - PRINTK("compute_parity, stripe %llu, method %d\n", - (unsigned long long)sh->sector, method); - - switch(method) { - case READ_MODIFY_WRITE: - BUG(); /* READ_MODIFY_WRITE N/A for RAID-6 */ - case RECONSTRUCT_WRITE: - for (i= disks; i-- ;) - if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) { - chosen = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; - - if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) - wake_up(&conf->wait_for_overlap); - - if (sh->dev[i].written) BUG(); - sh->dev[i].written = chosen; - } - break; - case CHECK_PARITY: - BUG(); /* Not implemented yet */ - } - - for (i = disks; i--;) - if (sh->dev[i].written) { - sector_t sector = sh->dev[i].sector; - struct bio *wbi = sh->dev[i].written; - while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { - copy_data(1, wbi, sh->dev[i].page, sector); - wbi = r5_next_bio(wbi, sector); - } - - set_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(R5_UPTODATE, &sh->dev[i].flags); - } - -// switch(method) { -// case RECONSTRUCT_WRITE: -// case CHECK_PARITY: -// case UPDATE_PARITY: - /* Note that unlike RAID-5, the ordering of the disks matters greatly. */ - /* FIX: Is this ordering of drives even remotely optimal? */ - count = 0; - i = d0_idx; - do { - ptrs[count++] = page_address(sh->dev[i].page); - if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags)) - printk("block %d/%d not uptodate on parity calc\n", i,count); - i = raid6_next_disk(i, disks); - } while ( i != d0_idx ); -// break; -// } - - raid6_call.gen_syndrome(disks, STRIPE_SIZE, ptrs); - - switch(method) { - case RECONSTRUCT_WRITE: - set_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); - set_bit(R5_UPTODATE, &sh->dev[qd_idx].flags); - set_bit(R5_LOCKED, &sh->dev[pd_idx].flags); - set_bit(R5_LOCKED, &sh->dev[qd_idx].flags); - break; - case UPDATE_PARITY: - set_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); - set_bit(R5_UPTODATE, &sh->dev[qd_idx].flags); - break; - } -} - - -/* Compute one missing block */ -static void compute_block_1(struct stripe_head *sh, int dd_idx, int nozero) -{ - raid6_conf_t *conf = sh->raid_conf; - int i, count, disks = conf->raid_disks; - void *ptr[MAX_XOR_BLOCKS], *p; - int pd_idx = sh->pd_idx; - int qd_idx = raid6_next_disk(pd_idx, disks); - - PRINTK("compute_block_1, stripe %llu, idx %d\n", - (unsigned long long)sh->sector, dd_idx); - - if ( dd_idx == qd_idx ) { - /* We're actually computing the Q drive */ - compute_parity6(sh, UPDATE_PARITY); - } else { - ptr[0] = page_address(sh->dev[dd_idx].page); - if (!nozero) memset(ptr[0], 0, STRIPE_SIZE); - count = 1; - for (i = disks ; i--; ) { - if (i == dd_idx || i == qd_idx) - continue; - p = page_address(sh->dev[i].page); - if (test_bit(R5_UPTODATE, &sh->dev[i].flags)) - ptr[count++] = p; - else - printk("compute_block() %d, stripe %llu, %d" - " not present\n", dd_idx, - (unsigned long long)sh->sector, i); - - check_xor(); - } - if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); - if (!nozero) set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); - else clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); - } -} - -/* Compute two missing blocks */ -static void compute_block_2(struct stripe_head *sh, int dd_idx1, int dd_idx2) -{ - raid6_conf_t *conf = sh->raid_conf; - int i, count, disks = conf->raid_disks; - int pd_idx = sh->pd_idx; - int qd_idx = raid6_next_disk(pd_idx, disks); - int d0_idx = raid6_next_disk(qd_idx, disks); - int faila, failb; - - /* faila and failb are disk numbers relative to d0_idx */ - /* pd_idx become disks-2 and qd_idx become disks-1 */ - faila = (dd_idx1 < d0_idx) ? dd_idx1+(disks-d0_idx) : dd_idx1-d0_idx; - failb = (dd_idx2 < d0_idx) ? dd_idx2+(disks-d0_idx) : dd_idx2-d0_idx; - - BUG_ON(faila == failb); - if ( failb < faila ) { int tmp = faila; faila = failb; failb = tmp; } - - PRINTK("compute_block_2, stripe %llu, idx %d,%d (%d,%d)\n", - (unsigned long long)sh->sector, dd_idx1, dd_idx2, faila, failb); - - if ( failb == disks-1 ) { - /* Q disk is one of the missing disks */ - if ( faila == disks-2 ) { - /* Missing P+Q, just recompute */ - compute_parity6(sh, UPDATE_PARITY); - return; - } else { - /* We're missing D+Q; recompute D from P */ - compute_block_1(sh, (dd_idx1 == qd_idx) ? dd_idx2 : dd_idx1, 0); - compute_parity6(sh, UPDATE_PARITY); /* Is this necessary? */ - return; - } - } - - /* We're missing D+P or D+D; build pointer table */ - { - /**** FIX THIS: This could be very bad if disks is close to 256 ****/ - void *ptrs[disks]; - - count = 0; - i = d0_idx; - do { - ptrs[count++] = page_address(sh->dev[i].page); - i = raid6_next_disk(i, disks); - if (i != dd_idx1 && i != dd_idx2 && - !test_bit(R5_UPTODATE, &sh->dev[i].flags)) - printk("compute_2 with missing block %d/%d\n", count, i); - } while ( i != d0_idx ); - - if ( failb == disks-2 ) { - /* We're missing D+P. */ - raid6_datap_recov(disks, STRIPE_SIZE, faila, ptrs); - } else { - /* We're missing D+D. */ - raid6_2data_recov(disks, STRIPE_SIZE, faila, failb, ptrs); - } - - /* Both the above update both missing blocks */ - set_bit(R5_UPTODATE, &sh->dev[dd_idx1].flags); - set_bit(R5_UPTODATE, &sh->dev[dd_idx2].flags); - } -} - - - /* * Each stripe/dev can have one or more bion attached. - * toread/towrite point to the first in a chain. + * toread/towrite point to the first in a chain. * The bi_next chain must be in order. */ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) @@ -1313,9 +1001,9 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, in (unsigned long long)sh->sector, dd_idx); if (conf->mddev->bitmap && firstwrite) { + sh->bm_seq = conf->seq_write; bitmap_startwrite(conf->mddev->bitmap, sh->sector, STRIPE_SECTORS, 0); - sh->bm_seq = conf->seq_flush+1; set_bit(STRIPE_BIT_DELAY, &sh->state); } @@ -1343,13 +1031,6 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, in static void end_reshape(raid5_conf_t *conf); -static int page_is_zero(struct page *p) -{ - char *a = page_address(p); - return ((*(u32*)a) == 0 && - memcmp(a, a+4, STRIPE_SIZE-4)==0); -} - static int stripe_to_pdidx(sector_t stripe, raid5_conf_t *conf, int disks) { int sectors_per_chunk = conf->chunk_size >> 9; @@ -1381,7 +1062,7 @@ static int stripe_to_pdidx(sector_t stripe, raid5_conf_t *conf, int disks) * */ -static void handle_stripe5(struct stripe_head *sh) +static void handle_stripe(struct stripe_head *sh) { raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks; @@ -1713,7 +1394,7 @@ static void handle_stripe5(struct stripe_head *sh) if (locked == 0 && (rcw == 0 ||rmw == 0) && !test_bit(STRIPE_BIT_DELAY, &sh->state)) { PRINTK("Computing parity...\n"); - compute_parity5(sh, rcw==0 ? RECONSTRUCT_WRITE : READ_MODIFY_WRITE); + compute_parity(sh, rcw==0 ? RECONSTRUCT_WRITE : READ_MODIFY_WRITE); /* now every locked buffer is ready to be written */ for (i=disks; i--;) if (test_bit(R5_LOCKED, &sh->dev[i].flags)) { @@ -1740,10 +1421,13 @@ static void handle_stripe5(struct stripe_head *sh) !test_bit(STRIPE_INSYNC, &sh->state)) { set_bit(STRIPE_HANDLE, &sh->state); if (failed == 0) { + char *pagea; BUG_ON(uptodate != disks); - compute_parity5(sh, CHECK_PARITY); + compute_parity(sh, CHECK_PARITY); uptodate--; - if (page_is_zero(sh->dev[sh->pd_idx].page)) { + pagea = page_address(sh->dev[sh->pd_idx].page); + if ((*(u32*)pagea) == 0 && + !memcmp(pagea, pagea+4, STRIPE_SIZE-4)) { /* parity is correct (on disc, not in buffer any more) */ set_bit(STRIPE_INSYNC, &sh->state); } else { @@ -1803,7 +1487,7 @@ static void handle_stripe5(struct stripe_head *sh) /* Need to write out all blocks after computing parity */ sh->disks = conf->raid_disks; sh->pd_idx = stripe_to_pdidx(sh->sector, conf, conf->raid_disks); - compute_parity5(sh, RECONSTRUCT_WRITE); + compute_parity(sh, RECONSTRUCT_WRITE); for (i= conf->raid_disks; i--;) { set_bit(R5_LOCKED, &sh->dev[i].flags); locked++; @@ -1931,628 +1615,65 @@ static void handle_stripe5(struct stripe_head *sh) } } -static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page) +static void raid5_activate_delayed(raid5_conf_t *conf) { - raid6_conf_t *conf = sh->raid_conf; - int disks = conf->raid_disks; - struct bio *return_bi= NULL; - struct bio *bi; - int i; - int syncing; - int locked=0, uptodate=0, to_read=0, to_write=0, failed=0, written=0; - int non_overwrite = 0; - int failed_num[2] = {0, 0}; - struct r5dev *dev, *pdev, *qdev; - int pd_idx = sh->pd_idx; - int qd_idx = raid6_next_disk(pd_idx, disks); - int p_failed, q_failed; - - PRINTK("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d, qd_idx=%d\n", - (unsigned long long)sh->sector, sh->state, atomic_read(&sh->count), - pd_idx, qd_idx); + if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) { + while (!list_empty(&conf->delayed_list)) { + struct list_head *l = conf->delayed_list.next; + struct stripe_head *sh; + sh = list_entry(l, struct stripe_head, lru); + list_del_init(l); + clear_bit(STRIPE_DELAYED, &sh->state); + if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) + atomic_inc(&conf->preread_active_stripes); + list_add_tail(&sh->lru, &conf->handle_list); + } + } +} - spin_lock(&sh->lock); - clear_bit(STRIPE_HANDLE, &sh->state); - clear_bit(STRIPE_DELAYED, &sh->state); +static void activate_bit_delay(raid5_conf_t *conf) +{ + /* device_lock is held */ + struct list_head head; + list_add(&head, &conf->bitmap_list); + list_del_init(&conf->bitmap_list); + while (!list_empty(&head)) { + struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru); + list_del_init(&sh->lru); + atomic_inc(&sh->count); + __release_stripe(conf, sh); + } +} - syncing = test_bit(STRIPE_SYNCING, &sh->state); - /* Now to look around and see what can be done */ +static void unplug_slaves(mddev_t *mddev) +{ + raid5_conf_t *conf = mddev_to_conf(mddev); + int i; rcu_read_lock(); - for (i=disks; i--; ) { - mdk_rdev_t *rdev; - dev = &sh->dev[i]; - clear_bit(R5_Insync, &dev->flags); - - PRINTK("check %d: state 0x%lx read %p write %p written %p\n", - i, dev->flags, dev->toread, dev->towrite, dev->written); - /* maybe we can reply to a read */ - if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread) { - struct bio *rbi, *rbi2; - PRINTK("Return read for disc %d\n", i); - spin_lock_irq(&conf->device_lock); - rbi = dev->toread; - dev->toread = NULL; - if (test_and_clear_bit(R5_Overlap, &dev->flags)) - wake_up(&conf->wait_for_overlap); - spin_unlock_irq(&conf->device_lock); - while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { - copy_data(0, rbi, dev->page, dev->sector); - rbi2 = r5_next_bio(rbi, dev->sector); - spin_lock_irq(&conf->device_lock); - if (--rbi->bi_phys_segments == 0) { - rbi->bi_next = return_bi; - return_bi = rbi; - } - spin_unlock_irq(&conf->device_lock); - rbi = rbi2; - } - } + for (i=0; iraid_disks; i++) { + mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); + if (rdev && !test_bit(Faulty, &rdev->flags) && atomic_read(&rdev->nr_pending)) { + request_queue_t *r_queue = bdev_get_queue(rdev->bdev); - /* now count some things */ - if (test_bit(R5_LOCKED, &dev->flags)) locked++; - if (test_bit(R5_UPTODATE, &dev->flags)) uptodate++; + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); - if (dev->toread) to_read++; - if (dev->towrite) { - to_write++; - if (!test_bit(R5_OVERWRITE, &dev->flags)) - non_overwrite++; - } - if (dev->written) written++; - rdev = rcu_dereference(conf->disks[i].rdev); - if (!rdev || !test_bit(In_sync, &rdev->flags)) { - /* The ReadError flag will just be confusing now */ - clear_bit(R5_ReadError, &dev->flags); - clear_bit(R5_ReWrite, &dev->flags); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); } - if (!rdev || !test_bit(In_sync, &rdev->flags) - || test_bit(R5_ReadError, &dev->flags)) { - if ( failed < 2 ) - failed_num[failed] = i; - failed++; - } else - set_bit(R5_Insync, &dev->flags); } rcu_read_unlock(); - PRINTK("locked=%d uptodate=%d to_read=%d" - " to_write=%d failed=%d failed_num=%d,%d\n", - locked, uptodate, to_read, to_write, failed, - failed_num[0], failed_num[1]); - /* check if the array has lost >2 devices and, if so, some requests might - * need to be failed - */ - if (failed > 2 && to_read+to_write+written) { - for (i=disks; i--; ) { - int bitmap_end = 0; +} - if (test_bit(R5_ReadError, &sh->dev[i].flags)) { - mdk_rdev_t *rdev; - rcu_read_lock(); - rdev = rcu_dereference(conf->disks[i].rdev); - if (rdev && test_bit(In_sync, &rdev->flags)) - /* multiple read failures in one stripe */ - md_error(conf->mddev, rdev); - rcu_read_unlock(); - } - - spin_lock_irq(&conf->device_lock); - /* fail all writes first */ - bi = sh->dev[i].towrite; - sh->dev[i].towrite = NULL; - if (bi) { to_write--; bitmap_end = 1; } - - if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) - wake_up(&conf->wait_for_overlap); - - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); - if (--bi->bi_phys_segments == 0) { - md_write_end(conf->mddev); - bi->bi_next = return_bi; - return_bi = bi; - } - bi = nextbi; - } - /* and fail all 'written' */ - bi = sh->dev[i].written; - sh->dev[i].written = NULL; - if (bi) bitmap_end = 1; - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) { - struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); - if (--bi->bi_phys_segments == 0) { - md_write_end(conf->mddev); - bi->bi_next = return_bi; - return_bi = bi; - } - bi = bi2; - } - - /* fail any reads if this device is non-operational */ - if (!test_bit(R5_Insync, &sh->dev[i].flags) || - test_bit(R5_ReadError, &sh->dev[i].flags)) { - bi = sh->dev[i].toread; - sh->dev[i].toread = NULL; - if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) - wake_up(&conf->wait_for_overlap); - if (bi) to_read--; - while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ - struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); - clear_bit(BIO_UPTODATE, &bi->bi_flags); - if (--bi->bi_phys_segments == 0) { - bi->bi_next = return_bi; - return_bi = bi; - } - bi = nextbi; - } - } - spin_unlock_irq(&conf->device_lock); - if (bitmap_end) - bitmap_endwrite(conf->mddev->bitmap, sh->sector, - STRIPE_SECTORS, 0, 0); - } - } - if (failed > 2 && syncing) { - md_done_sync(conf->mddev, STRIPE_SECTORS,0); - clear_bit(STRIPE_SYNCING, &sh->state); - syncing = 0; - } - - /* - * might be able to return some write requests if the parity blocks - * are safe, or on a failed drive - */ - pdev = &sh->dev[pd_idx]; - p_failed = (failed >= 1 && failed_num[0] == pd_idx) - || (failed >= 2 && failed_num[1] == pd_idx); - qdev = &sh->dev[qd_idx]; - q_failed = (failed >= 1 && failed_num[0] == qd_idx) - || (failed >= 2 && failed_num[1] == qd_idx); - - if ( written && - ( p_failed || ((test_bit(R5_Insync, &pdev->flags) - && !test_bit(R5_LOCKED, &pdev->flags) - && test_bit(R5_UPTODATE, &pdev->flags))) ) && - ( q_failed || ((test_bit(R5_Insync, &qdev->flags) - && !test_bit(R5_LOCKED, &qdev->flags) - && test_bit(R5_UPTODATE, &qdev->flags))) ) ) { - /* any written block on an uptodate or failed drive can be - * returned. Note that if we 'wrote' to a failed drive, - * it will be UPTODATE, but never LOCKED, so we don't need - * to test 'failed' directly. - */ - for (i=disks; i--; ) - if (sh->dev[i].written) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && - test_bit(R5_UPTODATE, &dev->flags) ) { - /* We can return any write requests */ - int bitmap_end = 0; - struct bio *wbi, *wbi2; - PRINTK("Return write for stripe %llu disc %d\n", - (unsigned long long)sh->sector, i); - spin_lock_irq(&conf->device_lock); - wbi = dev->written; - dev->written = NULL; - while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { - wbi2 = r5_next_bio(wbi, dev->sector); - if (--wbi->bi_phys_segments == 0) { - md_write_end(conf->mddev); - wbi->bi_next = return_bi; - return_bi = wbi; - } - wbi = wbi2; - } - if (dev->towrite == NULL) - bitmap_end = 1; - spin_unlock_irq(&conf->device_lock); - if (bitmap_end) - bitmap_endwrite(conf->mddev->bitmap, sh->sector, - STRIPE_SECTORS, - !test_bit(STRIPE_DEGRADED, &sh->state), 0); - } - } - } - - /* Now we might consider reading some blocks, either to check/generate - * parity, or to satisfy requests - * or to load a block that is being partially written. - */ - if (to_read || non_overwrite || (to_write && failed) || (syncing && (uptodate < disks))) { - for (i=disks; i--;) { - dev = &sh->dev[i]; - if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && - (dev->toread || - (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags)) || - syncing || - (failed >= 1 && (sh->dev[failed_num[0]].toread || to_write)) || - (failed >= 2 && (sh->dev[failed_num[1]].toread || to_write)) - ) - ) { - /* we would like to get this block, possibly - * by computing it, but we might not be able to - */ - if (uptodate == disks-1) { - PRINTK("Computing stripe %llu block %d\n", - (unsigned long long)sh->sector, i); - compute_block_1(sh, i, 0); - uptodate++; - } else if ( uptodate == disks-2 && failed >= 2 ) { - /* Computing 2-failure is *very* expensive; only do it if failed >= 2 */ - int other; - for (other=disks; other--;) { - if ( other == i ) - continue; - if ( !test_bit(R5_UPTODATE, &sh->dev[other].flags) ) - break; - } - BUG_ON(other < 0); - PRINTK("Computing stripe %llu blocks %d,%d\n", - (unsigned long long)sh->sector, i, other); - compute_block_2(sh, i, other); - uptodate += 2; - } else if (test_bit(R5_Insync, &dev->flags)) { - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); -#if 0 - /* if I am just reading this block and we don't have - a failed drive, or any pending writes then sidestep the cache */ - if (sh->bh_read[i] && !sh->bh_read[i]->b_reqnext && - ! syncing && !failed && !to_write) { - sh->bh_cache[i]->b_page = sh->bh_read[i]->b_page; - sh->bh_cache[i]->b_data = sh->bh_read[i]->b_data; - } -#endif - locked++; - PRINTK("Reading block %d (sync=%d)\n", - i, syncing); - } - } - } - set_bit(STRIPE_HANDLE, &sh->state); - } - - /* now to consider writing and what else, if anything should be read */ - if (to_write) { - int rcw=0, must_compute=0; - for (i=disks ; i--;) { - dev = &sh->dev[i]; - /* Would I have to read this buffer for reconstruct_write */ - if (!test_bit(R5_OVERWRITE, &dev->flags) - && i != pd_idx && i != qd_idx - && (!test_bit(R5_LOCKED, &dev->flags) -#if 0 - || sh->bh_page[i] != bh->b_page -#endif - ) && - !test_bit(R5_UPTODATE, &dev->flags)) { - if (test_bit(R5_Insync, &dev->flags)) rcw++; - else { - PRINTK("raid6: must_compute: disk %d flags=%#lx\n", i, dev->flags); - must_compute++; - } - } - } - PRINTK("for sector %llu, rcw=%d, must_compute=%d\n", - (unsigned long long)sh->sector, rcw, must_compute); - set_bit(STRIPE_HANDLE, &sh->state); - - if (rcw > 0) - /* want reconstruct write, but need to get some data */ - for (i=disks; i--;) { - dev = &sh->dev[i]; - if (!test_bit(R5_OVERWRITE, &dev->flags) - && !(failed == 0 && (i == pd_idx || i == qd_idx)) - && !test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && - test_bit(R5_Insync, &dev->flags)) { - if (test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) - { - PRINTK("Read_old stripe %llu block %d for Reconstruct\n", - (unsigned long long)sh->sector, i); - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantread, &dev->flags); - locked++; - } else { - PRINTK("Request delayed stripe %llu block %d for Reconstruct\n", - (unsigned long long)sh->sector, i); - set_bit(STRIPE_DELAYED, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); - } - } - } - /* now if nothing is locked, and if we have enough data, we can start a write request */ - if (locked == 0 && rcw == 0 && - !test_bit(STRIPE_BIT_DELAY, &sh->state)) { - if ( must_compute > 0 ) { - /* We have failed blocks and need to compute them */ - switch ( failed ) { - case 0: BUG(); - case 1: compute_block_1(sh, failed_num[0], 0); break; - case 2: compute_block_2(sh, failed_num[0], failed_num[1]); break; - default: BUG(); /* This request should have been failed? */ - } - } - - PRINTK("Computing parity for stripe %llu\n", (unsigned long long)sh->sector); - compute_parity6(sh, RECONSTRUCT_WRITE); - /* now every locked buffer is ready to be written */ - for (i=disks; i--;) - if (test_bit(R5_LOCKED, &sh->dev[i].flags)) { - PRINTK("Writing stripe %llu block %d\n", - (unsigned long long)sh->sector, i); - locked++; - set_bit(R5_Wantwrite, &sh->dev[i].flags); - } - /* after a RECONSTRUCT_WRITE, the stripe MUST be in-sync */ - set_bit(STRIPE_INSYNC, &sh->state); - - if (test_and_clear_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) { - atomic_dec(&conf->preread_active_stripes); - if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) - md_wakeup_thread(conf->mddev->thread); - } - } - } - - /* maybe we need to check and possibly fix the parity for this stripe - * Any reads will already have been scheduled, so we just see if enough data - * is available - */ - if (syncing && locked == 0 && !test_bit(STRIPE_INSYNC, &sh->state)) { - int update_p = 0, update_q = 0; - struct r5dev *dev; - - set_bit(STRIPE_HANDLE, &sh->state); - - BUG_ON(failed>2); - BUG_ON(uptodate < disks); - /* Want to check and possibly repair P and Q. - * However there could be one 'failed' device, in which - * case we can only check one of them, possibly using the - * other to generate missing data - */ - - /* If !tmp_page, we cannot do the calculations, - * but as we have set STRIPE_HANDLE, we will soon be called - * by stripe_handle with a tmp_page - just wait until then. - */ - if (tmp_page) { - if (failed == q_failed) { - /* The only possible failed device holds 'Q', so it makes - * sense to check P (If anything else were failed, we would - * have used P to recreate it). - */ - compute_block_1(sh, pd_idx, 1); - if (!page_is_zero(sh->dev[pd_idx].page)) { - compute_block_1(sh,pd_idx,0); - update_p = 1; - } - } - if (!q_failed && failed < 2) { - /* q is not failed, and we didn't use it to generate - * anything, so it makes sense to check it - */ - memcpy(page_address(tmp_page), - page_address(sh->dev[qd_idx].page), - STRIPE_SIZE); - compute_parity6(sh, UPDATE_PARITY); - if (memcmp(page_address(tmp_page), - page_address(sh->dev[qd_idx].page), - STRIPE_SIZE)!= 0) { - clear_bit(STRIPE_INSYNC, &sh->state); - update_q = 1; - } - } - if (update_p || update_q) { - conf->mddev->resync_mismatches += STRIPE_SECTORS; - if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) - /* don't try to repair!! */ - update_p = update_q = 0; - } - - /* now write out any block on a failed drive, - * or P or Q if they need it - */ - - if (failed == 2) { - dev = &sh->dev[failed_num[1]]; - locked++; - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantwrite, &dev->flags); - } - if (failed >= 1) { - dev = &sh->dev[failed_num[0]]; - locked++; - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantwrite, &dev->flags); - } - - if (update_p) { - dev = &sh->dev[pd_idx]; - locked ++; - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantwrite, &dev->flags); - } - if (update_q) { - dev = &sh->dev[qd_idx]; - locked++; - set_bit(R5_LOCKED, &dev->flags); - set_bit(R5_Wantwrite, &dev->flags); - } - clear_bit(STRIPE_DEGRADED, &sh->state); - - set_bit(STRIPE_INSYNC, &sh->state); - } - } - - if (syncing && locked == 0 && test_bit(STRIPE_INSYNC, &sh->state)) { - md_done_sync(conf->mddev, STRIPE_SECTORS,1); - clear_bit(STRIPE_SYNCING, &sh->state); - } - - /* If the failed drives are just a ReadError, then we might need - * to progress the repair/check process - */ - if (failed <= 2 && ! conf->mddev->ro) - for (i=0; idev[failed_num[i]]; - if (test_bit(R5_ReadError, &dev->flags) - && !test_bit(R5_LOCKED, &dev->flags) - && test_bit(R5_UPTODATE, &dev->flags) - ) { - if (!test_bit(R5_ReWrite, &dev->flags)) { - set_bit(R5_Wantwrite, &dev->flags); - set_bit(R5_ReWrite, &dev->flags); - set_bit(R5_LOCKED, &dev->flags); - } else { - /* let's read it back */ - set_bit(R5_Wantread, &dev->flags); - set_bit(R5_LOCKED, &dev->flags); - } - } - } - spin_unlock(&sh->lock); - - while ((bi=return_bi)) { - int bytes = bi->bi_size; - - return_bi = bi->bi_next; - bi->bi_next = NULL; - bi->bi_size = 0; - bi->bi_end_io(bi, bytes, 0); - } - for (i=disks; i-- ;) { - int rw; - struct bio *bi; - mdk_rdev_t *rdev; - if (test_and_clear_bit(R5_Wantwrite, &sh->dev[i].flags)) - rw = 1; - else if (test_and_clear_bit(R5_Wantread, &sh->dev[i].flags)) - rw = 0; - else - continue; - - bi = &sh->dev[i].req; - - bi->bi_rw = rw; - if (rw) - bi->bi_end_io = raid5_end_write_request; - else - bi->bi_end_io = raid5_end_read_request; - - rcu_read_lock(); - rdev = rcu_dereference(conf->disks[i].rdev); - if (rdev && test_bit(Faulty, &rdev->flags)) - rdev = NULL; - if (rdev) - atomic_inc(&rdev->nr_pending); - rcu_read_unlock(); - - if (rdev) { - if (syncing) - md_sync_acct(rdev->bdev, STRIPE_SECTORS); - - bi->bi_bdev = rdev->bdev; - PRINTK("for %llu schedule op %ld on disc %d\n", - (unsigned long long)sh->sector, bi->bi_rw, i); - atomic_inc(&sh->count); - bi->bi_sector = sh->sector + rdev->data_offset; - bi->bi_flags = 1 << BIO_UPTODATE; - bi->bi_vcnt = 1; - bi->bi_max_vecs = 1; - bi->bi_idx = 0; - bi->bi_io_vec = &sh->dev[i].vec; - bi->bi_io_vec[0].bv_len = STRIPE_SIZE; - bi->bi_io_vec[0].bv_offset = 0; - bi->bi_size = STRIPE_SIZE; - bi->bi_next = NULL; - if (rw == WRITE && - test_bit(R5_ReWrite, &sh->dev[i].flags)) - atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); - generic_make_request(bi); - } else { - if (rw == 1) - set_bit(STRIPE_DEGRADED, &sh->state); - PRINTK("skip op %ld on disc %d for sector %llu\n", - bi->bi_rw, i, (unsigned long long)sh->sector); - clear_bit(R5_LOCKED, &sh->dev[i].flags); - set_bit(STRIPE_HANDLE, &sh->state); - } - } -} - -static void handle_stripe(struct stripe_head *sh, struct page *tmp_page) -{ - if (sh->raid_conf->level == 6) - handle_stripe6(sh, tmp_page); - else - handle_stripe5(sh); -} - - - -static void raid5_activate_delayed(raid5_conf_t *conf) -{ - if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) { - while (!list_empty(&conf->delayed_list)) { - struct list_head *l = conf->delayed_list.next; - struct stripe_head *sh; - sh = list_entry(l, struct stripe_head, lru); - list_del_init(l); - clear_bit(STRIPE_DELAYED, &sh->state); - if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) - atomic_inc(&conf->preread_active_stripes); - list_add_tail(&sh->lru, &conf->handle_list); - } - } -} - -static void activate_bit_delay(raid5_conf_t *conf) -{ - /* device_lock is held */ - struct list_head head; - list_add(&head, &conf->bitmap_list); - list_del_init(&conf->bitmap_list); - while (!list_empty(&head)) { - struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru); - list_del_init(&sh->lru); - atomic_inc(&sh->count); - __release_stripe(conf, sh); - } -} - -static void unplug_slaves(mddev_t *mddev) -{ - raid5_conf_t *conf = mddev_to_conf(mddev); - int i; - - rcu_read_lock(); - for (i=0; iraid_disks; i++) { - mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); - if (rdev && !test_bit(Faulty, &rdev->flags) && atomic_read(&rdev->nr_pending)) { - request_queue_t *r_queue = bdev_get_queue(rdev->bdev); - - atomic_inc(&rdev->nr_pending); - rcu_read_unlock(); - - if (r_queue->unplug_fn) - r_queue->unplug_fn(r_queue); - - rdev_dec_pending(rdev, mddev); - rcu_read_lock(); - } - } - rcu_read_unlock(); -} - -static void raid5_unplug_device(request_queue_t *q) -{ - mddev_t *mddev = q->queuedata; - raid5_conf_t *conf = mddev_to_conf(mddev); - unsigned long flags; +static void raid5_unplug_device(request_queue_t *q) +{ + mddev_t *mddev = q->queuedata; + raid5_conf_t *conf = mddev_to_conf(mddev); + unsigned long flags; spin_lock_irqsave(&conf->device_lock, flags); @@ -2597,6 +1718,13 @@ static int raid5_issue_flush(request_queue_t *q, struct gendisk *disk, return ret; } +static inline void raid5_plug_device(raid5_conf_t *conf) +{ + spin_lock_irq(&conf->device_lock); + blk_plug_device(conf->mddev->queue); + spin_unlock_irq(&conf->device_lock); +} + static int make_request(request_queue_t *q, struct bio * bi) { mddev_t *mddev = q->queuedata; @@ -2625,7 +1753,7 @@ static int make_request(request_queue_t *q, struct bio * bi) for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { DEFINE_WAIT(w); - int disks, data_disks; + int disks; retry: prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); @@ -2653,9 +1781,7 @@ static int make_request(request_queue_t *q, struct bio * bi) } spin_unlock_irq(&conf->device_lock); } - data_disks = disks - conf->max_degraded; - - new_sector = raid5_compute_sector(logical_sector, disks, data_disks, + new_sector = raid5_compute_sector(logical_sector, disks, disks - 1, &dd_idx, &pd_idx, conf); PRINTK("raid5: make_request, sector %llu logical %llu\n", (unsigned long long)new_sector, @@ -2706,7 +1832,8 @@ static int make_request(request_queue_t *q, struct bio * bi) goto retry; } finish_wait(&conf->wait_for_overlap, &w); - handle_stripe(sh, NULL); + raid5_plug_device(conf); + handle_stripe(sh); release_stripe(sh); } else { /* cannot get stripe for read-ahead, just give-up */ @@ -2722,7 +1849,7 @@ static int make_request(request_queue_t *q, struct bio * bi) if (remaining == 0) { int bytes = bi->bi_size; - if ( rw == WRITE ) + if ( bio_data_dir(bi) == WRITE ) md_write_end(mddev); bi->bi_size = 0; bi->bi_end_io(bi, bytes, 0); @@ -2730,141 +1857,17 @@ static int make_request(request_queue_t *q, struct bio * bi) return 0; } -static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped) -{ - /* reshaping is quite different to recovery/resync so it is - * handled quite separately ... here. - * - * On each call to sync_request, we gather one chunk worth of - * destination stripes and flag them as expanding. - * Then we find all the source stripes and request reads. - * As the reads complete, handle_stripe will copy the data - * into the destination stripe and release that stripe. - */ - raid5_conf_t *conf = (raid5_conf_t *) mddev->private; - struct stripe_head *sh; - int pd_idx; - sector_t first_sector, last_sector; - int raid_disks; - int data_disks; - int i; - int dd_idx; - sector_t writepos, safepos, gap; - - if (sector_nr == 0 && - conf->expand_progress != 0) { - /* restarting in the middle, skip the initial sectors */ - sector_nr = conf->expand_progress; - sector_div(sector_nr, conf->raid_disks-1); - *skipped = 1; - return sector_nr; - } - - /* we update the metadata when there is more than 3Meg - * in the block range (that is rather arbitrary, should - * probably be time based) or when the data about to be - * copied would over-write the source of the data at - * the front of the range. - * i.e. one new_stripe forward from expand_progress new_maps - * to after where expand_lo old_maps to - */ - writepos = conf->expand_progress + - conf->chunk_size/512*(conf->raid_disks-1); - sector_div(writepos, conf->raid_disks-1); - safepos = conf->expand_lo; - sector_div(safepos, conf->previous_raid_disks-1); - gap = conf->expand_progress - conf->expand_lo; - - if (writepos >= safepos || - gap > (conf->raid_disks-1)*3000*2 /*3Meg*/) { - /* Cannot proceed until we've updated the superblock... */ - wait_event(conf->wait_for_overlap, - atomic_read(&conf->reshape_stripes)==0); - mddev->reshape_position = conf->expand_progress; - mddev->sb_dirty = 1; - md_wakeup_thread(mddev->thread); - wait_event(mddev->sb_wait, mddev->sb_dirty == 0 || - kthread_should_stop()); - spin_lock_irq(&conf->device_lock); - conf->expand_lo = mddev->reshape_position; - spin_unlock_irq(&conf->device_lock); - wake_up(&conf->wait_for_overlap); - } - - for (i=0; i < conf->chunk_size/512; i+= STRIPE_SECTORS) { - int j; - int skipped = 0; - pd_idx = stripe_to_pdidx(sector_nr+i, conf, conf->raid_disks); - sh = get_active_stripe(conf, sector_nr+i, - conf->raid_disks, pd_idx, 0); - set_bit(STRIPE_EXPANDING, &sh->state); - atomic_inc(&conf->reshape_stripes); - /* If any of this stripe is beyond the end of the old - * array, then we need to zero those blocks - */ - for (j=sh->disks; j--;) { - sector_t s; - if (j == sh->pd_idx) - continue; - s = compute_blocknr(sh, j); - if (s < (mddev->array_size<<1)) { - skipped = 1; - continue; - } - memset(page_address(sh->dev[j].page), 0, STRIPE_SIZE); - set_bit(R5_Expanded, &sh->dev[j].flags); - set_bit(R5_UPTODATE, &sh->dev[j].flags); - } - if (!skipped) { - set_bit(STRIPE_EXPAND_READY, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); - } - release_stripe(sh); - } - spin_lock_irq(&conf->device_lock); - conf->expand_progress = (sector_nr + i)*(conf->raid_disks-1); - spin_unlock_irq(&conf->device_lock); - /* Ok, those stripe are ready. We can start scheduling - * reads on the source stripes. - * The source stripes are determined by mapping the first and last - * block on the destination stripes. - */ - raid_disks = conf->previous_raid_disks; - data_disks = raid_disks - 1; - first_sector = - raid5_compute_sector(sector_nr*(conf->raid_disks-1), - raid_disks, data_disks, - &dd_idx, &pd_idx, conf); - last_sector = - raid5_compute_sector((sector_nr+conf->chunk_size/512) - *(conf->raid_disks-1) -1, - raid_disks, data_disks, - &dd_idx, &pd_idx, conf); - if (last_sector >= (mddev->size<<1)) - last_sector = (mddev->size<<1)-1; - while (first_sector <= last_sector) { - pd_idx = stripe_to_pdidx(first_sector, conf, conf->previous_raid_disks); - sh = get_active_stripe(conf, first_sector, - conf->previous_raid_disks, pd_idx, 0); - set_bit(STRIPE_EXPAND_SOURCE, &sh->state); - set_bit(STRIPE_HANDLE, &sh->state); - release_stripe(sh); - first_sector += STRIPE_SECTORS; - } - return conf->chunk_size>>9; -} - /* FIXME go_faster isn't used */ -static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) +static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) { raid5_conf_t *conf = (raid5_conf_t *) mddev->private; struct stripe_head *sh; int pd_idx; + sector_t first_sector, last_sector; int raid_disks = conf->raid_disks; + int data_disks = raid_disks-1; sector_t max_sector = mddev->size << 1; int sync_blocks; - int still_degraded = 0; - int i; if (sector_nr >= max_sector) { /* just being told to finish up .. nothing much to do */ @@ -2877,22 +1880,134 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski if (mddev->curr_resync < max_sector) /* aborted */ bitmap_end_sync(mddev->bitmap, mddev->curr_resync, &sync_blocks, 1); - else /* completed sync */ + else /* compelted sync */ conf->fullsync = 0; bitmap_close_sync(mddev->bitmap); return 0; } - if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) - return reshape_request(mddev, sector_nr, skipped); - - /* if there is too many failed drives and we are trying + if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { + /* reshaping is quite different to recovery/resync so it is + * handled quite separately ... here. + * + * On each call to sync_request, we gather one chunk worth of + * destination stripes and flag them as expanding. + * Then we find all the source stripes and request reads. + * As the reads complete, handle_stripe will copy the data + * into the destination stripe and release that stripe. + */ + int i; + int dd_idx; + sector_t writepos, safepos, gap; + + if (sector_nr == 0 && + conf->expand_progress != 0) { + /* restarting in the middle, skip the initial sectors */ + sector_nr = conf->expand_progress; + sector_div(sector_nr, conf->raid_disks-1); + *skipped = 1; + return sector_nr; + } + + /* we update the metadata when there is more than 3Meg + * in the block range (that is rather arbitrary, should + * probably be time based) or when the data about to be + * copied would over-write the source of the data at + * the front of the range. + * i.e. one new_stripe forward from expand_progress new_maps + * to after where expand_lo old_maps to + */ + writepos = conf->expand_progress + + conf->chunk_size/512*(conf->raid_disks-1); + sector_div(writepos, conf->raid_disks-1); + safepos = conf->expand_lo; + sector_div(safepos, conf->previous_raid_disks-1); + gap = conf->expand_progress - conf->expand_lo; + + if (writepos >= safepos || + gap > (conf->raid_disks-1)*3000*2 /*3Meg*/) { + /* Cannot proceed until we've updated the superblock... */ + wait_event(conf->wait_for_overlap, + atomic_read(&conf->reshape_stripes)==0); + mddev->reshape_position = conf->expand_progress; + mddev->sb_dirty = 1; + md_wakeup_thread(mddev->thread); + wait_event(mddev->sb_wait, mddev->sb_dirty == 0 || + kthread_should_stop()); + spin_lock_irq(&conf->device_lock); + conf->expand_lo = mddev->reshape_position; + spin_unlock_irq(&conf->device_lock); + wake_up(&conf->wait_for_overlap); + } + + for (i=0; i < conf->chunk_size/512; i+= STRIPE_SECTORS) { + int j; + int skipped = 0; + pd_idx = stripe_to_pdidx(sector_nr+i, conf, conf->raid_disks); + sh = get_active_stripe(conf, sector_nr+i, + conf->raid_disks, pd_idx, 0); + set_bit(STRIPE_EXPANDING, &sh->state); + atomic_inc(&conf->reshape_stripes); + /* If any of this stripe is beyond the end of the old + * array, then we need to zero those blocks + */ + for (j=sh->disks; j--;) { + sector_t s; + if (j == sh->pd_idx) + continue; + s = compute_blocknr(sh, j); + if (s < (mddev->array_size<<1)) { + skipped = 1; + continue; + } + memset(page_address(sh->dev[j].page), 0, STRIPE_SIZE); + set_bit(R5_Expanded, &sh->dev[j].flags); + set_bit(R5_UPTODATE, &sh->dev[j].flags); + } + if (!skipped) { + set_bit(STRIPE_EXPAND_READY, &sh->state); + set_bit(STRIPE_HANDLE, &sh->state); + } + release_stripe(sh); + } + spin_lock_irq(&conf->device_lock); + conf->expand_progress = (sector_nr + i)*(conf->raid_disks-1); + spin_unlock_irq(&conf->device_lock); + /* Ok, those stripe are ready. We can start scheduling + * reads on the source stripes. + * The source stripes are determined by mapping the first and last + * block on the destination stripes. + */ + raid_disks = conf->previous_raid_disks; + data_disks = raid_disks - 1; + first_sector = + raid5_compute_sector(sector_nr*(conf->raid_disks-1), + raid_disks, data_disks, + &dd_idx, &pd_idx, conf); + last_sector = + raid5_compute_sector((sector_nr+conf->chunk_size/512) + *(conf->raid_disks-1) -1, + raid_disks, data_disks, + &dd_idx, &pd_idx, conf); + if (last_sector >= (mddev->size<<1)) + last_sector = (mddev->size<<1)-1; + while (first_sector <= last_sector) { + pd_idx = stripe_to_pdidx(first_sector, conf, conf->previous_raid_disks); + sh = get_active_stripe(conf, first_sector, + conf->previous_raid_disks, pd_idx, 0); + set_bit(STRIPE_EXPAND_SOURCE, &sh->state); + set_bit(STRIPE_HANDLE, &sh->state); + release_stripe(sh); + first_sector += STRIPE_SECTORS; + } + return conf->chunk_size>>9; + } + /* if there is 1 or more failed drives and we are trying * to resync, then assert that we are finished, because there is * nothing we can do. */ - if (mddev->degraded >= conf->max_degraded && - test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { + if (mddev->degraded >= 1 && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { sector_t rv = (mddev->size << 1) - sector_nr; *skipped = 1; return rv; @@ -2911,26 +2026,17 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski if (sh == NULL) { sh = get_active_stripe(conf, sector_nr, raid_disks, pd_idx, 0); /* make sure we don't swamp the stripe cache if someone else - * is trying to get access + * is trying to get access */ schedule_timeout_uninterruptible(1); } - /* Need to check if array will still be degraded after recovery/resync - * We don't need to check the 'failed' flag as when that gets set, - * recovery aborts. - */ - for (i=0; iraid_disks; i++) - if (conf->disks[i].rdev == NULL) - still_degraded = 1; - - bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded); - - spin_lock(&sh->lock); + bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 0); + spin_lock(&sh->lock); set_bit(STRIPE_SYNCING, &sh->state); clear_bit(STRIPE_INSYNC, &sh->state); spin_unlock(&sh->lock); - handle_stripe(sh, NULL); + handle_stripe(sh); release_stripe(sh); return STRIPE_SECTORS; @@ -2958,7 +2064,7 @@ static void raid5d (mddev_t *mddev) while (1) { struct list_head *first; - if (conf->seq_flush != conf->seq_write) { + if (conf->seq_flush - conf->seq_write > 0) { int seq = conf->seq_flush; spin_unlock_irq(&conf->device_lock); bitmap_unplug(mddev->bitmap); @@ -2985,7 +2091,7 @@ static void raid5d (mddev_t *mddev) spin_unlock_irq(&conf->device_lock); handled++; - handle_stripe(sh, conf->spare_page); + handle_stripe(sh); release_stripe(sh); spin_lock_irq(&conf->device_lock); @@ -3075,8 +2181,8 @@ static int run(mddev_t *mddev) struct disk_info *disk; struct list_head *tmp; - if (mddev->level != 5 && mddev->level != 4 && mddev->level != 6) { - printk(KERN_ERR "raid5: %s: raid level not set to 4/5/6 (%d)\n", + if (mddev->level != 5 && mddev->level != 4) { + printk(KERN_ERR "raid5: %s: raid level not set to 4/5 (%d)\n", mdname(mddev), mddev->level); return -EIO; } @@ -3145,11 +2251,6 @@ static int run(mddev_t *mddev) if ((conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL)) == NULL) goto abort; - if (mddev->level == 6) { - conf->spare_page = alloc_page(GFP_KERNEL); - if (!conf->spare_page) - goto abort; - } spin_lock_init(&conf->device_lock); init_waitqueue_head(&conf->wait_for_stripe); init_waitqueue_head(&conf->wait_for_overlap); @@ -3181,16 +2282,12 @@ static int run(mddev_t *mddev) } /* - * 0 for a fully functional array, 1 or 2 for a degraded array. + * 0 for a fully functional array, 1 for a degraded array. */ mddev->degraded = conf->failed_disks = conf->raid_disks - conf->working_disks; conf->mddev = mddev; conf->chunk_size = mddev->chunk_size; conf->level = mddev->level; - if (conf->level == 6) - conf->max_degraded = 2; - else - conf->max_degraded = 1; conf->algorithm = mddev->layout; conf->max_nr_stripes = NR_STRIPES; conf->expand_progress = mddev->reshape_position; @@ -3199,11 +2296,6 @@ static int run(mddev_t *mddev) mddev->size &= ~(mddev->chunk_size/1024 -1); mddev->resync_max_sectors = mddev->size << 1; - if (conf->level == 6 && conf->raid_disks < 4) { - printk(KERN_ERR "raid6: not enough configured devices for %s (%d, minimum 4)\n", - mdname(mddev), conf->raid_disks); - goto abort; - } if (!conf->chunk_size || conf->chunk_size % 4) { printk(KERN_ERR "raid5: invalid chunk size %d for %s\n", conf->chunk_size, mdname(mddev)); @@ -3215,14 +2307,14 @@ static int run(mddev_t *mddev) conf->algorithm, mdname(mddev)); goto abort; } - if (mddev->degraded > conf->max_degraded) { + if (mddev->degraded > 1) { printk(KERN_ERR "raid5: not enough operational devices for %s" " (%d/%d failed)\n", mdname(mddev), conf->failed_disks, conf->raid_disks); goto abort; } - if (mddev->degraded > 0 && + if (mddev->degraded == 1 && mddev->recovery_cp != MaxSector) { if (mddev->ok_start_degraded) printk(KERN_WARNING @@ -3281,15 +2373,17 @@ static int run(mddev_t *mddev) set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); mddev->sync_thread = md_register_thread(md_do_sync, mddev, "%s_reshape"); + /* FIXME if md_register_thread fails?? */ + md_wakeup_thread(mddev->sync_thread); + } /* read-ahead size must cover two whole stripes, which is - * 2 * (datadisks) * chunksize where 'n' is the number of raid devices + * 2 * (n-1) * chunksize where 'n' is the number of raid devices */ { - int data_disks = conf->previous_raid_disks - conf->max_degraded; - int stripe = data_disks * - (mddev->chunk_size / PAGE_SIZE); + int stripe = (mddev->raid_disks-1) * mddev->chunk_size + / PAGE_SIZE; if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) mddev->queue->backing_dev_info.ra_pages = 2 * stripe; } @@ -3299,14 +2393,12 @@ static int run(mddev_t *mddev) mddev->queue->unplug_fn = raid5_unplug_device; mddev->queue->issue_flush_fn = raid5_issue_flush; - mddev->array_size = mddev->size * (conf->previous_raid_disks - - conf->max_degraded); + mddev->array_size = mddev->size * (conf->previous_raid_disks - 1); return 0; abort: if (conf) { print_raid5_conf(conf); - safe_put_page(conf->spare_page); kfree(conf->disks); kfree(conf->stripe_hashtbl); kfree(conf); @@ -3335,23 +2427,23 @@ static int stop(mddev_t *mddev) } #if RAID5_DEBUG -static void print_sh (struct seq_file *seq, struct stripe_head *sh) +static void print_sh (struct stripe_head *sh) { int i; - seq_printf(seq, "sh %llu, pd_idx %d, state %ld.\n", - (unsigned long long)sh->sector, sh->pd_idx, sh->state); - seq_printf(seq, "sh %llu, count %d.\n", - (unsigned long long)sh->sector, atomic_read(&sh->count)); - seq_printf(seq, "sh %llu, ", (unsigned long long)sh->sector); + printk("sh %llu, pd_idx %d, state %ld.\n", + (unsigned long long)sh->sector, sh->pd_idx, sh->state); + printk("sh %llu, count %d.\n", + (unsigned long long)sh->sector, atomic_read(&sh->count)); + printk("sh %llu, ", (unsigned long long)sh->sector); for (i = 0; i < sh->disks; i++) { - seq_printf(seq, "(cache%d: %p %ld) ", - i, sh->dev[i].page, sh->dev[i].flags); + printk("(cache%d: %p %ld) ", + i, sh->dev[i].page, sh->dev[i].flags); } - seq_printf(seq, "\n"); + printk("\n"); } -static void printall (struct seq_file *seq, raid5_conf_t *conf) +static void printall (raid5_conf_t *conf) { struct stripe_head *sh; struct hlist_node *hn; @@ -3362,7 +2454,7 @@ static void printall (struct seq_file *seq, raid5_conf_t *conf) hlist_for_each_entry(sh, hn, &conf->stripe_hashtbl[i], hash) { if (sh->raid_conf != conf) continue; - print_sh(seq, sh); + print_sh(sh); } } spin_unlock_irq(&conf->device_lock); @@ -3382,8 +2474,9 @@ static void status (struct seq_file *seq, mddev_t *mddev) test_bit(In_sync, &conf->disks[i].rdev->flags) ? "U" : "_"); seq_printf (seq, "]"); #if RAID5_DEBUG - seq_printf (seq, "\n"); - printall(seq, conf); +#define D(x) \ + seq_printf (seq, "<"#x":%d>", atomic_read(&conf->x)) + printall(conf); #endif } @@ -3467,20 +2560,14 @@ static int raid5_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) int disk; struct disk_info *p; - if (mddev->degraded > conf->max_degraded) + if (mddev->degraded > 1) /* no point adding a device */ return 0; /* - * find the disk ... but prefer rdev->saved_raid_disk - * if possible. + * find the disk ... */ - if (rdev->saved_raid_disk >= 0 && - conf->disks[rdev->saved_raid_disk].rdev == NULL) - disk = rdev->saved_raid_disk; - else - disk = 0; - for ( ; disk < conf->raid_disks; disk++) + for (disk=0; disk < conf->raid_disks; disk++) if ((p=conf->disks + disk)->rdev == NULL) { clear_bit(In_sync, &rdev->flags); rdev->raid_disk = disk; @@ -3503,10 +2590,8 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors) * any io in the removed space completes, but it hardly seems * worth it. */ - raid5_conf_t *conf = mddev_to_conf(mddev); - sectors &= ~((sector_t)mddev->chunk_size/512 - 1); - mddev->array_size = (sectors * (mddev->raid_disks-conf->max_degraded))>>1; + mddev->array_size = (sectors * (mddev->raid_disks-1))>>1; set_capacity(mddev->gendisk, mddev->array_size << 1); mddev->changed = 1; if (sectors/2 > mddev->size && mddev->recovery_cp == MaxSector) { @@ -3595,7 +2680,6 @@ static int raid5_start_reshape(mddev_t *mddev) set_bit(In_sync, &rdev->flags); conf->working_disks++; added_devices++; - rdev->recovery_offset = 0; sprintf(nm, "rd%d", rdev->raid_disk); sysfs_create_link(&mddev->kobj, &rdev->kobj, nm); } else @@ -3647,17 +2731,6 @@ static void end_reshape(raid5_conf_t *conf) conf->expand_progress = MaxSector; spin_unlock_irq(&conf->device_lock); conf->mddev->reshape_position = MaxSector; - - /* read-ahead size must cover two whole stripes, which is - * 2 * (datadisks) * chunksize where 'n' is the number of raid devices - */ - { - int data_disks = conf->previous_raid_disks - conf->max_degraded; - int stripe = data_disks * - (conf->mddev->chunk_size / PAGE_SIZE); - if (conf->mddev->queue->backing_dev_info.ra_pages < 2 * stripe) - conf->mddev->queue->backing_dev_info.ra_pages = 2 * stripe; - } } } @@ -3689,23 +2762,6 @@ static void raid5_quiesce(mddev_t *mddev, int state) } } -static struct mdk_personality raid6_personality = -{ - .name = "raid6", - .level = 6, - .owner = THIS_MODULE, - .make_request = make_request, - .run = run, - .stop = stop, - .status = status, - .error_handler = error, - .hot_add_disk = raid5_add_disk, - .hot_remove_disk= raid5_remove_disk, - .spare_active = raid5_spare_active, - .sync_request = sync_request, - .resize = raid5_resize, - .quiesce = raid5_quiesce, -}; static struct mdk_personality raid5_personality = { .name = "raid5", @@ -3748,12 +2804,6 @@ static struct mdk_personality raid4_personality = static int __init raid5_init(void) { - int e; - - e = raid6_select_algo(); - if ( e ) - return e; - register_md_personality(&raid6_personality); register_md_personality(&raid5_personality); register_md_personality(&raid4_personality); return 0; @@ -3761,7 +2811,6 @@ static int __init raid5_init(void) static void raid5_exit(void) { - unregister_md_personality(&raid6_personality); unregister_md_personality(&raid5_personality); unregister_md_personality(&raid4_personality); } @@ -3774,10 +2823,3 @@ MODULE_ALIAS("md-raid5"); MODULE_ALIAS("md-raid4"); MODULE_ALIAS("md-level-5"); MODULE_ALIAS("md-level-4"); -MODULE_ALIAS("md-personality-8"); /* RAID6 */ -MODULE_ALIAS("md-raid6"); -MODULE_ALIAS("md-level-6"); - -/* This used to be two separate modules, they were: */ -MODULE_ALIAS("raid5"); -MODULE_ALIAS("raid6"); diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index 926576156..51c63c0cf 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c @@ -139,14 +139,15 @@ int __init raid6_select_algo(void) } } - if (best) { + if ( best ) printk("raid6: using algorithm %s (%ld MB/s)\n", best->name, (bestperf*HZ) >> (20-16+RAID6_TIME_JIFFIES_LG2)); - raid6_call = *best; - } else + else printk("raid6: Yikes! No algorithm found!\n"); + raid6_call = *best; + free_pages((unsigned long)syndromes, 1); return best ? 0 : -EINVAL; diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c new file mode 100644 index 000000000..bc69355e0 --- /dev/null +++ b/drivers/md/raid6main.c @@ -0,0 +1,2427 @@ +/* + * raid6main.c : Multiple Devices driver for Linux + * Copyright (C) 1996, 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman + * Copyright (C) 1999, 2000 Ingo Molnar + * Copyright (C) 2002, 2003 H. Peter Anvin + * + * RAID-6 management functions. This code is derived from raid5.c. + * Last merge from raid5.c bkcvs version 1.79 (kernel 2.6.1). + * + * Thanks to Penguin Computing for making the RAID-6 development possible + * by donating a test server! + * + * 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, or (at your option) + * any later version. + * + * You should have received a copy of the GNU General Public License + * (for example /usr/src/linux/COPYING); if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#include +#include +#include +#include +#include +#include +#include "raid6.h" + +#include + +/* + * Stripe cache + */ + +#define NR_STRIPES 256 +#define STRIPE_SIZE PAGE_SIZE +#define STRIPE_SHIFT (PAGE_SHIFT - 9) +#define STRIPE_SECTORS (STRIPE_SIZE>>9) +#define IO_THRESHOLD 1 +#define NR_HASH (PAGE_SIZE / sizeof(struct hlist_head)) +#define HASH_MASK (NR_HASH - 1) + +#define stripe_hash(conf, sect) (&((conf)->stripe_hashtbl[((sect) >> STRIPE_SHIFT) & HASH_MASK])) + +/* bio's attached to a stripe+device for I/O are linked together in bi_sector + * order without overlap. There may be several bio's per stripe+device, and + * a bio could span several devices. + * When walking this list for a particular stripe+device, we must never proceed + * beyond a bio that extends past this device, as the next bio might no longer + * be valid. + * This macro is used to determine the 'next' bio in the list, given the sector + * of the current stripe+device + */ +#define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL) +/* + * The following can be used to debug the driver + */ +#define RAID6_DEBUG 0 /* Extremely verbose printk */ +#define RAID6_PARANOIA 1 /* Check spinlocks */ +#define RAID6_DUMPSTATE 0 /* Include stripe cache state in /proc/mdstat */ +#if RAID6_PARANOIA && defined(CONFIG_SMP) +# define CHECK_DEVLOCK() assert_spin_locked(&conf->device_lock) +#else +# define CHECK_DEVLOCK() +#endif + +#define PRINTK(x...) ((void)(RAID6_DEBUG && printk(KERN_DEBUG x))) +#if RAID6_DEBUG +#undef inline +#undef __inline__ +#define inline +#define __inline__ +#endif + +#if !RAID6_USE_EMPTY_ZERO_PAGE +/* In .bss so it's zeroed */ +const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); +#endif + +static inline int raid6_next_disk(int disk, int raid_disks) +{ + disk++; + return (disk < raid_disks) ? disk : 0; +} + +static void print_raid6_conf (raid6_conf_t *conf); + +static void __release_stripe(raid6_conf_t *conf, struct stripe_head *sh) +{ + if (atomic_dec_and_test(&sh->count)) { + BUG_ON(!list_empty(&sh->lru)); + BUG_ON(atomic_read(&conf->active_stripes)==0); + if (test_bit(STRIPE_HANDLE, &sh->state)) { + if (test_bit(STRIPE_DELAYED, &sh->state)) + list_add_tail(&sh->lru, &conf->delayed_list); + else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && + conf->seq_write == sh->bm_seq) + list_add_tail(&sh->lru, &conf->bitmap_list); + else { + clear_bit(STRIPE_BIT_DELAY, &sh->state); + list_add_tail(&sh->lru, &conf->handle_list); + } + md_wakeup_thread(conf->mddev->thread); + } else { + if (test_and_clear_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) { + atomic_dec(&conf->preread_active_stripes); + if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) + md_wakeup_thread(conf->mddev->thread); + } + list_add_tail(&sh->lru, &conf->inactive_list); + atomic_dec(&conf->active_stripes); + if (!conf->inactive_blocked || + atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4)) + wake_up(&conf->wait_for_stripe); + } + } +} +static void release_stripe(struct stripe_head *sh) +{ + raid6_conf_t *conf = sh->raid_conf; + unsigned long flags; + + spin_lock_irqsave(&conf->device_lock, flags); + __release_stripe(conf, sh); + spin_unlock_irqrestore(&conf->device_lock, flags); +} + +static inline void remove_hash(struct stripe_head *sh) +{ + PRINTK("remove_hash(), stripe %llu\n", (unsigned long long)sh->sector); + + hlist_del_init(&sh->hash); +} + +static inline void insert_hash(raid6_conf_t *conf, struct stripe_head *sh) +{ + struct hlist_head *hp = stripe_hash(conf, sh->sector); + + PRINTK("insert_hash(), stripe %llu\n", (unsigned long long)sh->sector); + + CHECK_DEVLOCK(); + hlist_add_head(&sh->hash, hp); +} + + +/* find an idle stripe, make sure it is unhashed, and return it. */ +static struct stripe_head *get_free_stripe(raid6_conf_t *conf) +{ + struct stripe_head *sh = NULL; + struct list_head *first; + + CHECK_DEVLOCK(); + if (list_empty(&conf->inactive_list)) + goto out; + first = conf->inactive_list.next; + sh = list_entry(first, struct stripe_head, lru); + list_del_init(first); + remove_hash(sh); + atomic_inc(&conf->active_stripes); +out: + return sh; +} + +static void shrink_buffers(struct stripe_head *sh, int num) +{ + struct page *p; + int i; + + for (i=0; idev[i].page; + if (!p) + continue; + sh->dev[i].page = NULL; + put_page(p); + } +} + +static int grow_buffers(struct stripe_head *sh, int num) +{ + int i; + + for (i=0; idev[i].page = page; + } + return 0; +} + +static void raid6_build_block (struct stripe_head *sh, int i); + +static void init_stripe(struct stripe_head *sh, sector_t sector, int pd_idx) +{ + raid6_conf_t *conf = sh->raid_conf; + int disks = conf->raid_disks, i; + + BUG_ON(atomic_read(&sh->count) != 0); + BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); + + CHECK_DEVLOCK(); + PRINTK("init_stripe called, stripe %llu\n", + (unsigned long long)sh->sector); + + remove_hash(sh); + + sh->sector = sector; + sh->pd_idx = pd_idx; + sh->state = 0; + + for (i=disks; i--; ) { + struct r5dev *dev = &sh->dev[i]; + + if (dev->toread || dev->towrite || dev->written || + test_bit(R5_LOCKED, &dev->flags)) { + PRINTK("sector=%llx i=%d %p %p %p %d\n", + (unsigned long long)sh->sector, i, dev->toread, + dev->towrite, dev->written, + test_bit(R5_LOCKED, &dev->flags)); + BUG(); + } + dev->flags = 0; + raid6_build_block(sh, i); + } + insert_hash(conf, sh); +} + +static struct stripe_head *__find_stripe(raid6_conf_t *conf, sector_t sector) +{ + struct stripe_head *sh; + struct hlist_node *hn; + + CHECK_DEVLOCK(); + PRINTK("__find_stripe, sector %llu\n", (unsigned long long)sector); + hlist_for_each_entry (sh, hn, stripe_hash(conf, sector), hash) + if (sh->sector == sector) + return sh; + PRINTK("__stripe %llu not in cache\n", (unsigned long long)sector); + return NULL; +} + +static void unplug_slaves(mddev_t *mddev); + +static struct stripe_head *get_active_stripe(raid6_conf_t *conf, sector_t sector, + int pd_idx, int noblock) +{ + struct stripe_head *sh; + + PRINTK("get_stripe, sector %llu\n", (unsigned long long)sector); + + spin_lock_irq(&conf->device_lock); + + do { + wait_event_lock_irq(conf->wait_for_stripe, + conf->quiesce == 0, + conf->device_lock, /* nothing */); + sh = __find_stripe(conf, sector); + if (!sh) { + if (!conf->inactive_blocked) + sh = get_free_stripe(conf); + if (noblock && sh == NULL) + break; + if (!sh) { + conf->inactive_blocked = 1; + wait_event_lock_irq(conf->wait_for_stripe, + !list_empty(&conf->inactive_list) && + (atomic_read(&conf->active_stripes) + < (conf->max_nr_stripes *3/4) + || !conf->inactive_blocked), + conf->device_lock, + unplug_slaves(conf->mddev); + ); + conf->inactive_blocked = 0; + } else + init_stripe(sh, sector, pd_idx); + } else { + if (atomic_read(&sh->count)) { + BUG_ON(!list_empty(&sh->lru)); + } else { + if (!test_bit(STRIPE_HANDLE, &sh->state)) + atomic_inc(&conf->active_stripes); + BUG_ON(list_empty(&sh->lru)); + list_del_init(&sh->lru); + } + } + } while (sh == NULL); + + if (sh) + atomic_inc(&sh->count); + + spin_unlock_irq(&conf->device_lock); + return sh; +} + +static int grow_one_stripe(raid6_conf_t *conf) +{ + struct stripe_head *sh; + sh = kmem_cache_alloc(conf->slab_cache, GFP_KERNEL); + if (!sh) + return 0; + memset(sh, 0, sizeof(*sh) + (conf->raid_disks-1)*sizeof(struct r5dev)); + sh->raid_conf = conf; + spin_lock_init(&sh->lock); + + if (grow_buffers(sh, conf->raid_disks)) { + shrink_buffers(sh, conf->raid_disks); + kmem_cache_free(conf->slab_cache, sh); + return 0; + } + /* we just created an active stripe so... */ + atomic_set(&sh->count, 1); + atomic_inc(&conf->active_stripes); + INIT_LIST_HEAD(&sh->lru); + release_stripe(sh); + return 1; +} + +static int grow_stripes(raid6_conf_t *conf, int num) +{ + kmem_cache_t *sc; + int devs = conf->raid_disks; + + sprintf(conf->cache_name[0], "raid6/%s", mdname(conf->mddev)); + + sc = kmem_cache_create(conf->cache_name[0], + sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), + 0, 0, NULL, NULL); + if (!sc) + return 1; + conf->slab_cache = sc; + while (num--) + if (!grow_one_stripe(conf)) + return 1; + return 0; +} + +static int drop_one_stripe(raid6_conf_t *conf) +{ + struct stripe_head *sh; + spin_lock_irq(&conf->device_lock); + sh = get_free_stripe(conf); + spin_unlock_irq(&conf->device_lock); + if (!sh) + return 0; + BUG_ON(atomic_read(&sh->count)); + shrink_buffers(sh, conf->raid_disks); + kmem_cache_free(conf->slab_cache, sh); + atomic_dec(&conf->active_stripes); + return 1; +} + +static void shrink_stripes(raid6_conf_t *conf) +{ + while (drop_one_stripe(conf)) + ; + + if (conf->slab_cache) + kmem_cache_destroy(conf->slab_cache); + conf->slab_cache = NULL; +} + +static int raid6_end_read_request(struct bio * bi, unsigned int bytes_done, + int error) +{ + struct stripe_head *sh = bi->bi_private; + raid6_conf_t *conf = sh->raid_conf; + int disks = conf->raid_disks, i; + int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); + + if (bi->bi_size) + return 1; + + for (i=0 ; idev[i].req) + break; + + PRINTK("end_read_request %llu/%d, count: %d, uptodate %d.\n", + (unsigned long long)sh->sector, i, atomic_read(&sh->count), + uptodate); + if (i == disks) { + BUG(); + return 0; + } + + if (uptodate) { +#if 0 + struct bio *bio; + unsigned long flags; + spin_lock_irqsave(&conf->device_lock, flags); + /* we can return a buffer if we bypassed the cache or + * if the top buffer is not in highmem. If there are + * multiple buffers, leave the extra work to + * handle_stripe + */ + buffer = sh->bh_read[i]; + if (buffer && + (!PageHighMem(buffer->b_page) + || buffer->b_page == bh->b_page ) + ) { + sh->bh_read[i] = buffer->b_reqnext; + buffer->b_reqnext = NULL; + } else + buffer = NULL; + spin_unlock_irqrestore(&conf->device_lock, flags); + if (sh->bh_page[i]==bh->b_page) + set_buffer_uptodate(bh); + if (buffer) { + if (buffer->b_page != bh->b_page) + memcpy(buffer->b_data, bh->b_data, bh->b_size); + buffer->b_end_io(buffer, 1); + } +#else + set_bit(R5_UPTODATE, &sh->dev[i].flags); +#endif + if (test_bit(R5_ReadError, &sh->dev[i].flags)) { + printk(KERN_INFO "raid6: read error corrected!!\n"); + clear_bit(R5_ReadError, &sh->dev[i].flags); + clear_bit(R5_ReWrite, &sh->dev[i].flags); + } + if (atomic_read(&conf->disks[i].rdev->read_errors)) + atomic_set(&conf->disks[i].rdev->read_errors, 0); + } else { + int retry = 0; + clear_bit(R5_UPTODATE, &sh->dev[i].flags); + atomic_inc(&conf->disks[i].rdev->read_errors); + if (conf->mddev->degraded) + printk(KERN_WARNING "raid6: read error not correctable.\n"); + else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) + /* Oh, no!!! */ + printk(KERN_WARNING "raid6: read error NOT corrected!!\n"); + else if (atomic_read(&conf->disks[i].rdev->read_errors) + > conf->max_nr_stripes) + printk(KERN_WARNING + "raid6: Too many read errors, failing device.\n"); + else + retry = 1; + if (retry) + set_bit(R5_ReadError, &sh->dev[i].flags); + else { + clear_bit(R5_ReadError, &sh->dev[i].flags); + clear_bit(R5_ReWrite, &sh->dev[i].flags); + md_error(conf->mddev, conf->disks[i].rdev); + } + } + rdev_dec_pending(conf->disks[i].rdev, conf->mddev); +#if 0 + /* must restore b_page before unlocking buffer... */ + if (sh->bh_page[i] != bh->b_page) { + bh->b_page = sh->bh_page[i]; + bh->b_data = page_address(bh->b_page); + clear_buffer_uptodate(bh); + } +#endif + clear_bit(R5_LOCKED, &sh->dev[i].flags); + set_bit(STRIPE_HANDLE, &sh->state); + release_stripe(sh); + return 0; +} + +static int raid6_end_write_request (struct bio *bi, unsigned int bytes_done, + int error) +{ + struct stripe_head *sh = bi->bi_private; + raid6_conf_t *conf = sh->raid_conf; + int disks = conf->raid_disks, i; + unsigned long flags; + int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); + + if (bi->bi_size) + return 1; + + for (i=0 ; idev[i].req) + break; + + PRINTK("end_write_request %llu/%d, count %d, uptodate: %d.\n", + (unsigned long long)sh->sector, i, atomic_read(&sh->count), + uptodate); + if (i == disks) { + BUG(); + return 0; + } + + spin_lock_irqsave(&conf->device_lock, flags); + if (!uptodate) + md_error(conf->mddev, conf->disks[i].rdev); + + rdev_dec_pending(conf->disks[i].rdev, conf->mddev); + + clear_bit(R5_LOCKED, &sh->dev[i].flags); + set_bit(STRIPE_HANDLE, &sh->state); + __release_stripe(conf, sh); + spin_unlock_irqrestore(&conf->device_lock, flags); + return 0; +} + + +static sector_t compute_blocknr(struct stripe_head *sh, int i); + +static void raid6_build_block (struct stripe_head *sh, int i) +{ + struct r5dev *dev = &sh->dev[i]; + int pd_idx = sh->pd_idx; + int qd_idx = raid6_next_disk(pd_idx, sh->raid_conf->raid_disks); + + bio_init(&dev->req); + dev->req.bi_io_vec = &dev->vec; + dev->req.bi_vcnt++; + dev->req.bi_max_vecs++; + dev->vec.bv_page = dev->page; + dev->vec.bv_len = STRIPE_SIZE; + dev->vec.bv_offset = 0; + + dev->req.bi_sector = sh->sector; + dev->req.bi_private = sh; + + dev->flags = 0; + if (i != pd_idx && i != qd_idx) + dev->sector = compute_blocknr(sh, i); +} + +static void error(mddev_t *mddev, mdk_rdev_t *rdev) +{ + char b[BDEVNAME_SIZE]; + raid6_conf_t *conf = (raid6_conf_t *) mddev->private; + PRINTK("raid6: error called\n"); + + if (!test_bit(Faulty, &rdev->flags)) { + mddev->sb_dirty = 1; + if (test_bit(In_sync, &rdev->flags)) { + conf->working_disks--; + mddev->degraded++; + conf->failed_disks++; + clear_bit(In_sync, &rdev->flags); + /* + * if recovery was running, make sure it aborts. + */ + set_bit(MD_RECOVERY_ERR, &mddev->recovery); + } + set_bit(Faulty, &rdev->flags); + printk (KERN_ALERT + "raid6: Disk failure on %s, disabling device." + " Operation continuing on %d devices\n", + bdevname(rdev->bdev,b), conf->working_disks); + } +} + +/* + * Input: a 'big' sector number, + * Output: index of the data and parity disk, and the sector # in them. + */ +static sector_t raid6_compute_sector(sector_t r_sector, unsigned int raid_disks, + unsigned int data_disks, unsigned int * dd_idx, + unsigned int * pd_idx, raid6_conf_t *conf) +{ + long stripe; + unsigned long chunk_number; + unsigned int chunk_offset; + sector_t new_sector; + int sectors_per_chunk = conf->chunk_size >> 9; + + /* First compute the information on this sector */ + + /* + * Compute the chunk number and the sector offset inside the chunk + */ + chunk_offset = sector_div(r_sector, sectors_per_chunk); + chunk_number = r_sector; + if ( r_sector != chunk_number ) { + printk(KERN_CRIT "raid6: ERROR: r_sector = %llu, chunk_number = %lu\n", + (unsigned long long)r_sector, (unsigned long)chunk_number); + BUG(); + } + + /* + * Compute the stripe number + */ + stripe = chunk_number / data_disks; + + /* + * Compute the data disk and parity disk indexes inside the stripe + */ + *dd_idx = chunk_number % data_disks; + + /* + * Select the parity disk based on the user selected algorithm. + */ + + /**** FIX THIS ****/ + switch (conf->algorithm) { + case ALGORITHM_LEFT_ASYMMETRIC: + *pd_idx = raid_disks - 1 - (stripe % raid_disks); + if (*pd_idx == raid_disks-1) + (*dd_idx)++; /* Q D D D P */ + else if (*dd_idx >= *pd_idx) + (*dd_idx) += 2; /* D D P Q D */ + break; + case ALGORITHM_RIGHT_ASYMMETRIC: + *pd_idx = stripe % raid_disks; + if (*pd_idx == raid_disks-1) + (*dd_idx)++; /* Q D D D P */ + else if (*dd_idx >= *pd_idx) + (*dd_idx) += 2; /* D D P Q D */ + break; + case ALGORITHM_LEFT_SYMMETRIC: + *pd_idx = raid_disks - 1 - (stripe % raid_disks); + *dd_idx = (*pd_idx + 2 + *dd_idx) % raid_disks; + break; + case ALGORITHM_RIGHT_SYMMETRIC: + *pd_idx = stripe % raid_disks; + *dd_idx = (*pd_idx + 2 + *dd_idx) % raid_disks; + break; + default: + printk (KERN_CRIT "raid6: unsupported algorithm %d\n", + conf->algorithm); + } + + PRINTK("raid6: chunk_number = %lu, pd_idx = %u, dd_idx = %u\n", + chunk_number, *pd_idx, *dd_idx); + + /* + * Finally, compute the new sector number + */ + new_sector = (sector_t) stripe * sectors_per_chunk + chunk_offset; + return new_sector; +} + + +static sector_t compute_blocknr(struct stripe_head *sh, int i) +{ + raid6_conf_t *conf = sh->raid_conf; + int raid_disks = conf->raid_disks, data_disks = raid_disks - 2; + sector_t new_sector = sh->sector, check; + int sectors_per_chunk = conf->chunk_size >> 9; + sector_t stripe; + int chunk_offset; + int chunk_number, dummy1, dummy2, dd_idx = i; + sector_t r_sector; + int i0 = i; + + chunk_offset = sector_div(new_sector, sectors_per_chunk); + stripe = new_sector; + if ( new_sector != stripe ) { + printk(KERN_CRIT "raid6: ERROR: new_sector = %llu, stripe = %lu\n", + (unsigned long long)new_sector, (unsigned long)stripe); + BUG(); + } + + switch (conf->algorithm) { + case ALGORITHM_LEFT_ASYMMETRIC: + case ALGORITHM_RIGHT_ASYMMETRIC: + if (sh->pd_idx == raid_disks-1) + i--; /* Q D D D P */ + else if (i > sh->pd_idx) + i -= 2; /* D D P Q D */ + break; + case ALGORITHM_LEFT_SYMMETRIC: + case ALGORITHM_RIGHT_SYMMETRIC: + if (sh->pd_idx == raid_disks-1) + i--; /* Q D D D P */ + else { + /* D D P Q D */ + if (i < sh->pd_idx) + i += raid_disks; + i -= (sh->pd_idx + 2); + } + break; + default: + printk (KERN_CRIT "raid6: unsupported algorithm %d\n", + conf->algorithm); + } + + PRINTK("raid6: compute_blocknr: pd_idx = %u, i0 = %u, i = %u\n", sh->pd_idx, i0, i); + + chunk_number = stripe * data_disks + i; + r_sector = (sector_t)chunk_number * sectors_per_chunk + chunk_offset; + + check = raid6_compute_sector (r_sector, raid_disks, data_disks, &dummy1, &dummy2, conf); + if (check != sh->sector || dummy1 != dd_idx || dummy2 != sh->pd_idx) { + printk(KERN_CRIT "raid6: compute_blocknr: map not correct\n"); + return 0; + } + return r_sector; +} + + + +/* + * Copy data between a page in the stripe cache, and one or more bion + * The page could align with the middle of the bio, or there could be + * several bion, each with several bio_vecs, which cover part of the page + * Multiple bion are linked together on bi_next. There may be extras + * at the end of this list. We ignore them. + */ +static void copy_data(int frombio, struct bio *bio, + struct page *page, + sector_t sector) +{ + char *pa = page_address(page); + struct bio_vec *bvl; + int i; + int page_offset; + + if (bio->bi_sector >= sector) + page_offset = (signed)(bio->bi_sector - sector) * 512; + else + page_offset = (signed)(sector - bio->bi_sector) * -512; + bio_for_each_segment(bvl, bio, i) { + int len = bio_iovec_idx(bio,i)->bv_len; + int clen; + int b_offset = 0; + + if (page_offset < 0) { + b_offset = -page_offset; + page_offset += b_offset; + len -= b_offset; + } + + if (len > 0 && page_offset + len > STRIPE_SIZE) + clen = STRIPE_SIZE - page_offset; + else clen = len; + + if (clen > 0) { + char *ba = __bio_kmap_atomic(bio, i, KM_USER0); + if (frombio) + memcpy(pa+page_offset, ba+b_offset, clen); + else + memcpy(ba+b_offset, pa+page_offset, clen); + __bio_kunmap_atomic(ba, KM_USER0); + } + if (clen < len) /* hit end of page */ + break; + page_offset += len; + } +} + +#define check_xor() do { \ + if (count == MAX_XOR_BLOCKS) { \ + xor_block(count, STRIPE_SIZE, ptr); \ + count = 1; \ + } \ + } while(0) + +/* Compute P and Q syndromes */ +static void compute_parity(struct stripe_head *sh, int method) +{ + raid6_conf_t *conf = sh->raid_conf; + int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count; + struct bio *chosen; + /**** FIX THIS: This could be very bad if disks is close to 256 ****/ + void *ptrs[disks]; + + qd_idx = raid6_next_disk(pd_idx, disks); + d0_idx = raid6_next_disk(qd_idx, disks); + + PRINTK("compute_parity, stripe %llu, method %d\n", + (unsigned long long)sh->sector, method); + + switch(method) { + case READ_MODIFY_WRITE: + BUG(); /* READ_MODIFY_WRITE N/A for RAID-6 */ + case RECONSTRUCT_WRITE: + for (i= disks; i-- ;) + if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) { + chosen = sh->dev[i].towrite; + sh->dev[i].towrite = NULL; + + if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) + wake_up(&conf->wait_for_overlap); + + BUG_ON(sh->dev[i].written); + sh->dev[i].written = chosen; + } + break; + case CHECK_PARITY: + BUG(); /* Not implemented yet */ + } + + for (i = disks; i--;) + if (sh->dev[i].written) { + sector_t sector = sh->dev[i].sector; + struct bio *wbi = sh->dev[i].written; + while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) { + copy_data(1, wbi, sh->dev[i].page, sector); + wbi = r5_next_bio(wbi, sector); + } + + set_bit(R5_LOCKED, &sh->dev[i].flags); + set_bit(R5_UPTODATE, &sh->dev[i].flags); + } + +// switch(method) { +// case RECONSTRUCT_WRITE: +// case CHECK_PARITY: +// case UPDATE_PARITY: + /* Note that unlike RAID-5, the ordering of the disks matters greatly. */ + /* FIX: Is this ordering of drives even remotely optimal? */ + count = 0; + i = d0_idx; + do { + ptrs[count++] = page_address(sh->dev[i].page); + if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags)) + printk("block %d/%d not uptodate on parity calc\n", i,count); + i = raid6_next_disk(i, disks); + } while ( i != d0_idx ); +// break; +// } + + raid6_call.gen_syndrome(disks, STRIPE_SIZE, ptrs); + + switch(method) { + case RECONSTRUCT_WRITE: + set_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); + set_bit(R5_UPTODATE, &sh->dev[qd_idx].flags); + set_bit(R5_LOCKED, &sh->dev[pd_idx].flags); + set_bit(R5_LOCKED, &sh->dev[qd_idx].flags); + break; + case UPDATE_PARITY: + set_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); + set_bit(R5_UPTODATE, &sh->dev[qd_idx].flags); + break; + } +} + +/* Compute one missing block */ +static void compute_block_1(struct stripe_head *sh, int dd_idx, int nozero) +{ + raid6_conf_t *conf = sh->raid_conf; + int i, count, disks = conf->raid_disks; + void *ptr[MAX_XOR_BLOCKS], *p; + int pd_idx = sh->pd_idx; + int qd_idx = raid6_next_disk(pd_idx, disks); + + PRINTK("compute_block_1, stripe %llu, idx %d\n", + (unsigned long long)sh->sector, dd_idx); + + if ( dd_idx == qd_idx ) { + /* We're actually computing the Q drive */ + compute_parity(sh, UPDATE_PARITY); + } else { + ptr[0] = page_address(sh->dev[dd_idx].page); + if (!nozero) memset(ptr[0], 0, STRIPE_SIZE); + count = 1; + for (i = disks ; i--; ) { + if (i == dd_idx || i == qd_idx) + continue; + p = page_address(sh->dev[i].page); + if (test_bit(R5_UPTODATE, &sh->dev[i].flags)) + ptr[count++] = p; + else + printk("compute_block() %d, stripe %llu, %d" + " not present\n", dd_idx, + (unsigned long long)sh->sector, i); + + check_xor(); + } + if (count != 1) + xor_block(count, STRIPE_SIZE, ptr); + if (!nozero) set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); + else clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); + } +} + +/* Compute two missing blocks */ +static void compute_block_2(struct stripe_head *sh, int dd_idx1, int dd_idx2) +{ + raid6_conf_t *conf = sh->raid_conf; + int i, count, disks = conf->raid_disks; + int pd_idx = sh->pd_idx; + int qd_idx = raid6_next_disk(pd_idx, disks); + int d0_idx = raid6_next_disk(qd_idx, disks); + int faila, failb; + + /* faila and failb are disk numbers relative to d0_idx */ + /* pd_idx become disks-2 and qd_idx become disks-1 */ + faila = (dd_idx1 < d0_idx) ? dd_idx1+(disks-d0_idx) : dd_idx1-d0_idx; + failb = (dd_idx2 < d0_idx) ? dd_idx2+(disks-d0_idx) : dd_idx2-d0_idx; + + BUG_ON(faila == failb); + if ( failb < faila ) { int tmp = faila; faila = failb; failb = tmp; } + + PRINTK("compute_block_2, stripe %llu, idx %d,%d (%d,%d)\n", + (unsigned long long)sh->sector, dd_idx1, dd_idx2, faila, failb); + + if ( failb == disks-1 ) { + /* Q disk is one of the missing disks */ + if ( faila == disks-2 ) { + /* Missing P+Q, just recompute */ + compute_parity(sh, UPDATE_PARITY); + return; + } else { + /* We're missing D+Q; recompute D from P */ + compute_block_1(sh, (dd_idx1 == qd_idx) ? dd_idx2 : dd_idx1, 0); + compute_parity(sh, UPDATE_PARITY); /* Is this necessary? */ + return; + } + } + + /* We're missing D+P or D+D; build pointer table */ + { + /**** FIX THIS: This could be very bad if disks is close to 256 ****/ + void *ptrs[disks]; + + count = 0; + i = d0_idx; + do { + ptrs[count++] = page_address(sh->dev[i].page); + i = raid6_next_disk(i, disks); + if (i != dd_idx1 && i != dd_idx2 && + !test_bit(R5_UPTODATE, &sh->dev[i].flags)) + printk("compute_2 with missing block %d/%d\n", count, i); + } while ( i != d0_idx ); + + if ( failb == disks-2 ) { + /* We're missing D+P. */ + raid6_datap_recov(disks, STRIPE_SIZE, faila, ptrs); + } else { + /* We're missing D+D. */ + raid6_2data_recov(disks, STRIPE_SIZE, faila, failb, ptrs); + } + + /* Both the above update both missing blocks */ + set_bit(R5_UPTODATE, &sh->dev[dd_idx1].flags); + set_bit(R5_UPTODATE, &sh->dev[dd_idx2].flags); + } +} + + +/* + * Each stripe/dev can have one or more bion attached. + * toread/towrite point to the first in a chain. + * The bi_next chain must be in order. + */ +static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) +{ + struct bio **bip; + raid6_conf_t *conf = sh->raid_conf; + int firstwrite=0; + + PRINTK("adding bh b#%llu to stripe s#%llu\n", + (unsigned long long)bi->bi_sector, + (unsigned long long)sh->sector); + + + spin_lock(&sh->lock); + spin_lock_irq(&conf->device_lock); + if (forwrite) { + bip = &sh->dev[dd_idx].towrite; + if (*bip == NULL && sh->dev[dd_idx].written == NULL) + firstwrite = 1; + } else + bip = &sh->dev[dd_idx].toread; + while (*bip && (*bip)->bi_sector < bi->bi_sector) { + if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector) + goto overlap; + bip = &(*bip)->bi_next; + } + if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9)) + goto overlap; + + BUG_ON(*bip && bi->bi_next && (*bip) != bi->bi_next); + if (*bip) + bi->bi_next = *bip; + *bip = bi; + bi->bi_phys_segments ++; + spin_unlock_irq(&conf->device_lock); + spin_unlock(&sh->lock); + + PRINTK("added bi b#%llu to stripe s#%llu, disk %d.\n", + (unsigned long long)bi->bi_sector, + (unsigned long long)sh->sector, dd_idx); + + if (conf->mddev->bitmap && firstwrite) { + sh->bm_seq = conf->seq_write; + bitmap_startwrite(conf->mddev->bitmap, sh->sector, + STRIPE_SECTORS, 0); + set_bit(STRIPE_BIT_DELAY, &sh->state); + } + + if (forwrite) { + /* check if page is covered */ + sector_t sector = sh->dev[dd_idx].sector; + for (bi=sh->dev[dd_idx].towrite; + sector < sh->dev[dd_idx].sector + STRIPE_SECTORS && + bi && bi->bi_sector <= sector; + bi = r5_next_bio(bi, sh->dev[dd_idx].sector)) { + if (bi->bi_sector + (bi->bi_size>>9) >= sector) + sector = bi->bi_sector + (bi->bi_size>>9); + } + if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) + set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); + } + return 1; + + overlap: + set_bit(R5_Overlap, &sh->dev[dd_idx].flags); + spin_unlock_irq(&conf->device_lock); + spin_unlock(&sh->lock); + return 0; +} + + +static int page_is_zero(struct page *p) +{ + char *a = page_address(p); + return ((*(u32*)a) == 0 && + memcmp(a, a+4, STRIPE_SIZE-4)==0); +} +/* + * handle_stripe - do things to a stripe. + * + * We lock the stripe and then examine the state of various bits + * to see what needs to be done. + * Possible results: + * return some read request which now have data + * return some write requests which are safely on disc + * schedule a read on some buffers + * schedule a write of some buffers + * return confirmation of parity correctness + * + * Parity calculations are done inside the stripe lock + * buffers are taken off read_list or write_list, and bh_cache buffers + * get BH_Lock set before the stripe lock is released. + * + */ + +static void handle_stripe(struct stripe_head *sh, struct page *tmp_page) +{ + raid6_conf_t *conf = sh->raid_conf; + int disks = conf->raid_disks; + struct bio *return_bi= NULL; + struct bio *bi; + int i; + int syncing; + int locked=0, uptodate=0, to_read=0, to_write=0, failed=0, written=0; + int non_overwrite = 0; + int failed_num[2] = {0, 0}; + struct r5dev *dev, *pdev, *qdev; + int pd_idx = sh->pd_idx; + int qd_idx = raid6_next_disk(pd_idx, disks); + int p_failed, q_failed; + + PRINTK("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d, qd_idx=%d\n", + (unsigned long long)sh->sector, sh->state, atomic_read(&sh->count), + pd_idx, qd_idx); + + spin_lock(&sh->lock); + clear_bit(STRIPE_HANDLE, &sh->state); + clear_bit(STRIPE_DELAYED, &sh->state); + + syncing = test_bit(STRIPE_SYNCING, &sh->state); + /* Now to look around and see what can be done */ + + rcu_read_lock(); + for (i=disks; i--; ) { + mdk_rdev_t *rdev; + dev = &sh->dev[i]; + clear_bit(R5_Insync, &dev->flags); + + PRINTK("check %d: state 0x%lx read %p write %p written %p\n", + i, dev->flags, dev->toread, dev->towrite, dev->written); + /* maybe we can reply to a read */ + if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread) { + struct bio *rbi, *rbi2; + PRINTK("Return read for disc %d\n", i); + spin_lock_irq(&conf->device_lock); + rbi = dev->toread; + dev->toread = NULL; + if (test_and_clear_bit(R5_Overlap, &dev->flags)) + wake_up(&conf->wait_for_overlap); + spin_unlock_irq(&conf->device_lock); + while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { + copy_data(0, rbi, dev->page, dev->sector); + rbi2 = r5_next_bio(rbi, dev->sector); + spin_lock_irq(&conf->device_lock); + if (--rbi->bi_phys_segments == 0) { + rbi->bi_next = return_bi; + return_bi = rbi; + } + spin_unlock_irq(&conf->device_lock); + rbi = rbi2; + } + } + + /* now count some things */ + if (test_bit(R5_LOCKED, &dev->flags)) locked++; + if (test_bit(R5_UPTODATE, &dev->flags)) uptodate++; + + + if (dev->toread) to_read++; + if (dev->towrite) { + to_write++; + if (!test_bit(R5_OVERWRITE, &dev->flags)) + non_overwrite++; + } + if (dev->written) written++; + rdev = rcu_dereference(conf->disks[i].rdev); + if (!rdev || !test_bit(In_sync, &rdev->flags)) { + /* The ReadError flag will just be confusing now */ + clear_bit(R5_ReadError, &dev->flags); + clear_bit(R5_ReWrite, &dev->flags); + } + if (!rdev || !test_bit(In_sync, &rdev->flags) + || test_bit(R5_ReadError, &dev->flags)) { + if ( failed < 2 ) + failed_num[failed] = i; + failed++; + } else + set_bit(R5_Insync, &dev->flags); + } + rcu_read_unlock(); + PRINTK("locked=%d uptodate=%d to_read=%d" + " to_write=%d failed=%d failed_num=%d,%d\n", + locked, uptodate, to_read, to_write, failed, + failed_num[0], failed_num[1]); + /* check if the array has lost >2 devices and, if so, some requests might + * need to be failed + */ + if (failed > 2 && to_read+to_write+written) { + for (i=disks; i--; ) { + int bitmap_end = 0; + + if (test_bit(R5_ReadError, &sh->dev[i].flags)) { + mdk_rdev_t *rdev; + rcu_read_lock(); + rdev = rcu_dereference(conf->disks[i].rdev); + if (rdev && test_bit(In_sync, &rdev->flags)) + /* multiple read failures in one stripe */ + md_error(conf->mddev, rdev); + rcu_read_unlock(); + } + + spin_lock_irq(&conf->device_lock); + /* fail all writes first */ + bi = sh->dev[i].towrite; + sh->dev[i].towrite = NULL; + if (bi) { to_write--; bitmap_end = 1; } + + if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) + wake_up(&conf->wait_for_overlap); + + while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ + struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); + clear_bit(BIO_UPTODATE, &bi->bi_flags); + if (--bi->bi_phys_segments == 0) { + md_write_end(conf->mddev); + bi->bi_next = return_bi; + return_bi = bi; + } + bi = nextbi; + } + /* and fail all 'written' */ + bi = sh->dev[i].written; + sh->dev[i].written = NULL; + if (bi) bitmap_end = 1; + while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) { + struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); + clear_bit(BIO_UPTODATE, &bi->bi_flags); + if (--bi->bi_phys_segments == 0) { + md_write_end(conf->mddev); + bi->bi_next = return_bi; + return_bi = bi; + } + bi = bi2; + } + + /* fail any reads if this device is non-operational */ + if (!test_bit(R5_Insync, &sh->dev[i].flags) || + test_bit(R5_ReadError, &sh->dev[i].flags)) { + bi = sh->dev[i].toread; + sh->dev[i].toread = NULL; + if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) + wake_up(&conf->wait_for_overlap); + if (bi) to_read--; + while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){ + struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); + clear_bit(BIO_UPTODATE, &bi->bi_flags); + if (--bi->bi_phys_segments == 0) { + bi->bi_next = return_bi; + return_bi = bi; + } + bi = nextbi; + } + } + spin_unlock_irq(&conf->device_lock); + if (bitmap_end) + bitmap_endwrite(conf->mddev->bitmap, sh->sector, + STRIPE_SECTORS, 0, 0); + } + } + if (failed > 2 && syncing) { + md_done_sync(conf->mddev, STRIPE_SECTORS,0); + clear_bit(STRIPE_SYNCING, &sh->state); + syncing = 0; + } + + /* + * might be able to return some write requests if the parity blocks + * are safe, or on a failed drive + */ + pdev = &sh->dev[pd_idx]; + p_failed = (failed >= 1 && failed_num[0] == pd_idx) + || (failed >= 2 && failed_num[1] == pd_idx); + qdev = &sh->dev[qd_idx]; + q_failed = (failed >= 1 && failed_num[0] == qd_idx) + || (failed >= 2 && failed_num[1] == qd_idx); + + if ( written && + ( p_failed || ((test_bit(R5_Insync, &pdev->flags) + && !test_bit(R5_LOCKED, &pdev->flags) + && test_bit(R5_UPTODATE, &pdev->flags))) ) && + ( q_failed || ((test_bit(R5_Insync, &qdev->flags) + && !test_bit(R5_LOCKED, &qdev->flags) + && test_bit(R5_UPTODATE, &qdev->flags))) ) ) { + /* any written block on an uptodate or failed drive can be + * returned. Note that if we 'wrote' to a failed drive, + * it will be UPTODATE, but never LOCKED, so we don't need + * to test 'failed' directly. + */ + for (i=disks; i--; ) + if (sh->dev[i].written) { + dev = &sh->dev[i]; + if (!test_bit(R5_LOCKED, &dev->flags) && + test_bit(R5_UPTODATE, &dev->flags) ) { + /* We can return any write requests */ + int bitmap_end = 0; + struct bio *wbi, *wbi2; + PRINTK("Return write for stripe %llu disc %d\n", + (unsigned long long)sh->sector, i); + spin_lock_irq(&conf->device_lock); + wbi = dev->written; + dev->written = NULL; + while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { + wbi2 = r5_next_bio(wbi, dev->sector); + if (--wbi->bi_phys_segments == 0) { + md_write_end(conf->mddev); + wbi->bi_next = return_bi; + return_bi = wbi; + } + wbi = wbi2; + } + if (dev->towrite == NULL) + bitmap_end = 1; + spin_unlock_irq(&conf->device_lock); + if (bitmap_end) + bitmap_endwrite(conf->mddev->bitmap, sh->sector, + STRIPE_SECTORS, + !test_bit(STRIPE_DEGRADED, &sh->state), 0); + } + } + } + + /* Now we might consider reading some blocks, either to check/generate + * parity, or to satisfy requests + * or to load a block that is being partially written. + */ + if (to_read || non_overwrite || (to_write && failed) || (syncing && (uptodate < disks))) { + for (i=disks; i--;) { + dev = &sh->dev[i]; + if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && + (dev->toread || + (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags)) || + syncing || + (failed >= 1 && (sh->dev[failed_num[0]].toread || to_write)) || + (failed >= 2 && (sh->dev[failed_num[1]].toread || to_write)) + ) + ) { + /* we would like to get this block, possibly + * by computing it, but we might not be able to + */ + if (uptodate == disks-1) { + PRINTK("Computing stripe %llu block %d\n", + (unsigned long long)sh->sector, i); + compute_block_1(sh, i, 0); + uptodate++; + } else if ( uptodate == disks-2 && failed >= 2 ) { + /* Computing 2-failure is *very* expensive; only do it if failed >= 2 */ + int other; + for (other=disks; other--;) { + if ( other == i ) + continue; + if ( !test_bit(R5_UPTODATE, &sh->dev[other].flags) ) + break; + } + BUG_ON(other < 0); + PRINTK("Computing stripe %llu blocks %d,%d\n", + (unsigned long long)sh->sector, i, other); + compute_block_2(sh, i, other); + uptodate += 2; + } else if (test_bit(R5_Insync, &dev->flags)) { + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantread, &dev->flags); +#if 0 + /* if I am just reading this block and we don't have + a failed drive, or any pending writes then sidestep the cache */ + if (sh->bh_read[i] && !sh->bh_read[i]->b_reqnext && + ! syncing && !failed && !to_write) { + sh->bh_cache[i]->b_page = sh->bh_read[i]->b_page; + sh->bh_cache[i]->b_data = sh->bh_read[i]->b_data; + } +#endif + locked++; + PRINTK("Reading block %d (sync=%d)\n", + i, syncing); + } + } + } + set_bit(STRIPE_HANDLE, &sh->state); + } + + /* now to consider writing and what else, if anything should be read */ + if (to_write) { + int rcw=0, must_compute=0; + for (i=disks ; i--;) { + dev = &sh->dev[i]; + /* Would I have to read this buffer for reconstruct_write */ + if (!test_bit(R5_OVERWRITE, &dev->flags) + && i != pd_idx && i != qd_idx + && (!test_bit(R5_LOCKED, &dev->flags) +#if 0 + || sh->bh_page[i] != bh->b_page +#endif + ) && + !test_bit(R5_UPTODATE, &dev->flags)) { + if (test_bit(R5_Insync, &dev->flags)) rcw++; + else { + PRINTK("raid6: must_compute: disk %d flags=%#lx\n", i, dev->flags); + must_compute++; + } + } + } + PRINTK("for sector %llu, rcw=%d, must_compute=%d\n", + (unsigned long long)sh->sector, rcw, must_compute); + set_bit(STRIPE_HANDLE, &sh->state); + + if (rcw > 0) + /* want reconstruct write, but need to get some data */ + for (i=disks; i--;) { + dev = &sh->dev[i]; + if (!test_bit(R5_OVERWRITE, &dev->flags) + && !(failed == 0 && (i == pd_idx || i == qd_idx)) + && !test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && + test_bit(R5_Insync, &dev->flags)) { + if (test_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) + { + PRINTK("Read_old stripe %llu block %d for Reconstruct\n", + (unsigned long long)sh->sector, i); + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantread, &dev->flags); + locked++; + } else { + PRINTK("Request delayed stripe %llu block %d for Reconstruct\n", + (unsigned long long)sh->sector, i); + set_bit(STRIPE_DELAYED, &sh->state); + set_bit(STRIPE_HANDLE, &sh->state); + } + } + } + /* now if nothing is locked, and if we have enough data, we can start a write request */ + if (locked == 0 && rcw == 0 && + !test_bit(STRIPE_BIT_DELAY, &sh->state)) { + if ( must_compute > 0 ) { + /* We have failed blocks and need to compute them */ + switch ( failed ) { + case 0: BUG(); + case 1: compute_block_1(sh, failed_num[0], 0); break; + case 2: compute_block_2(sh, failed_num[0], failed_num[1]); break; + default: BUG(); /* This request should have been failed? */ + } + } + + PRINTK("Computing parity for stripe %llu\n", (unsigned long long)sh->sector); + compute_parity(sh, RECONSTRUCT_WRITE); + /* now every locked buffer is ready to be written */ + for (i=disks; i--;) + if (test_bit(R5_LOCKED, &sh->dev[i].flags)) { + PRINTK("Writing stripe %llu block %d\n", + (unsigned long long)sh->sector, i); + locked++; + set_bit(R5_Wantwrite, &sh->dev[i].flags); + } + /* after a RECONSTRUCT_WRITE, the stripe MUST be in-sync */ + set_bit(STRIPE_INSYNC, &sh->state); + + if (test_and_clear_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) { + atomic_dec(&conf->preread_active_stripes); + if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) + md_wakeup_thread(conf->mddev->thread); + } + } + } + + /* maybe we need to check and possibly fix the parity for this stripe + * Any reads will already have been scheduled, so we just see if enough data + * is available + */ + if (syncing && locked == 0 && !test_bit(STRIPE_INSYNC, &sh->state)) { + int update_p = 0, update_q = 0; + struct r5dev *dev; + + set_bit(STRIPE_HANDLE, &sh->state); + + BUG_ON(failed>2); + BUG_ON(uptodate < disks); + /* Want to check and possibly repair P and Q. + * However there could be one 'failed' device, in which + * case we can only check one of them, possibly using the + * other to generate missing data + */ + + /* If !tmp_page, we cannot do the calculations, + * but as we have set STRIPE_HANDLE, we will soon be called + * by stripe_handle with a tmp_page - just wait until then. + */ + if (tmp_page) { + if (failed == q_failed) { + /* The only possible failed device holds 'Q', so it makes + * sense to check P (If anything else were failed, we would + * have used P to recreate it). + */ + compute_block_1(sh, pd_idx, 1); + if (!page_is_zero(sh->dev[pd_idx].page)) { + compute_block_1(sh,pd_idx,0); + update_p = 1; + } + } + if (!q_failed && failed < 2) { + /* q is not failed, and we didn't use it to generate + * anything, so it makes sense to check it + */ + memcpy(page_address(tmp_page), + page_address(sh->dev[qd_idx].page), + STRIPE_SIZE); + compute_parity(sh, UPDATE_PARITY); + if (memcmp(page_address(tmp_page), + page_address(sh->dev[qd_idx].page), + STRIPE_SIZE)!= 0) { + clear_bit(STRIPE_INSYNC, &sh->state); + update_q = 1; + } + } + if (update_p || update_q) { + conf->mddev->resync_mismatches += STRIPE_SECTORS; + if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) + /* don't try to repair!! */ + update_p = update_q = 0; + } + + /* now write out any block on a failed drive, + * or P or Q if they need it + */ + + if (failed == 2) { + dev = &sh->dev[failed_num[1]]; + locked++; + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantwrite, &dev->flags); + } + if (failed >= 1) { + dev = &sh->dev[failed_num[0]]; + locked++; + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantwrite, &dev->flags); + } + + if (update_p) { + dev = &sh->dev[pd_idx]; + locked ++; + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantwrite, &dev->flags); + } + if (update_q) { + dev = &sh->dev[qd_idx]; + locked++; + set_bit(R5_LOCKED, &dev->flags); + set_bit(R5_Wantwrite, &dev->flags); + } + clear_bit(STRIPE_DEGRADED, &sh->state); + + set_bit(STRIPE_INSYNC, &sh->state); + } + } + + if (syncing && locked == 0 && test_bit(STRIPE_INSYNC, &sh->state)) { + md_done_sync(conf->mddev, STRIPE_SECTORS,1); + clear_bit(STRIPE_SYNCING, &sh->state); + } + + /* If the failed drives are just a ReadError, then we might need + * to progress the repair/check process + */ + if (failed <= 2 && ! conf->mddev->ro) + for (i=0; idev[failed_num[i]]; + if (test_bit(R5_ReadError, &dev->flags) + && !test_bit(R5_LOCKED, &dev->flags) + && test_bit(R5_UPTODATE, &dev->flags) + ) { + if (!test_bit(R5_ReWrite, &dev->flags)) { + set_bit(R5_Wantwrite, &dev->flags); + set_bit(R5_ReWrite, &dev->flags); + set_bit(R5_LOCKED, &dev->flags); + } else { + /* let's read it back */ + set_bit(R5_Wantread, &dev->flags); + set_bit(R5_LOCKED, &dev->flags); + } + } + } + spin_unlock(&sh->lock); + + while ((bi=return_bi)) { + int bytes = bi->bi_size; + + return_bi = bi->bi_next; + bi->bi_next = NULL; + bi->bi_size = 0; + bi->bi_end_io(bi, bytes, 0); + } + for (i=disks; i-- ;) { + int rw; + struct bio *bi; + mdk_rdev_t *rdev; + if (test_and_clear_bit(R5_Wantwrite, &sh->dev[i].flags)) + rw = 1; + else if (test_and_clear_bit(R5_Wantread, &sh->dev[i].flags)) + rw = 0; + else + continue; + + bi = &sh->dev[i].req; + + bi->bi_rw = rw; + if (rw) + bi->bi_end_io = raid6_end_write_request; + else + bi->bi_end_io = raid6_end_read_request; + + rcu_read_lock(); + rdev = rcu_dereference(conf->disks[i].rdev); + if (rdev && test_bit(Faulty, &rdev->flags)) + rdev = NULL; + if (rdev) + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + + if (rdev) { + if (syncing) + md_sync_acct(rdev->bdev, STRIPE_SECTORS); + + bi->bi_bdev = rdev->bdev; + PRINTK("for %llu schedule op %ld on disc %d\n", + (unsigned long long)sh->sector, bi->bi_rw, i); + atomic_inc(&sh->count); + bi->bi_sector = sh->sector + rdev->data_offset; + bi->bi_flags = 1 << BIO_UPTODATE; + bi->bi_vcnt = 1; + bi->bi_max_vecs = 1; + bi->bi_idx = 0; + bi->bi_io_vec = &sh->dev[i].vec; + bi->bi_io_vec[0].bv_len = STRIPE_SIZE; + bi->bi_io_vec[0].bv_offset = 0; + bi->bi_size = STRIPE_SIZE; + bi->bi_next = NULL; + if (rw == WRITE && + test_bit(R5_ReWrite, &sh->dev[i].flags)) + atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); + generic_make_request(bi); + } else { + if (rw == 1) + set_bit(STRIPE_DEGRADED, &sh->state); + PRINTK("skip op %ld on disc %d for sector %llu\n", + bi->bi_rw, i, (unsigned long long)sh->sector); + clear_bit(R5_LOCKED, &sh->dev[i].flags); + set_bit(STRIPE_HANDLE, &sh->state); + } + } +} + +static void raid6_activate_delayed(raid6_conf_t *conf) +{ + if (atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD) { + while (!list_empty(&conf->delayed_list)) { + struct list_head *l = conf->delayed_list.next; + struct stripe_head *sh; + sh = list_entry(l, struct stripe_head, lru); + list_del_init(l); + clear_bit(STRIPE_DELAYED, &sh->state); + if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state)) + atomic_inc(&conf->preread_active_stripes); + list_add_tail(&sh->lru, &conf->handle_list); + } + } +} + +static void activate_bit_delay(raid6_conf_t *conf) +{ + /* device_lock is held */ + struct list_head head; + list_add(&head, &conf->bitmap_list); + list_del_init(&conf->bitmap_list); + while (!list_empty(&head)) { + struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru); + list_del_init(&sh->lru); + atomic_inc(&sh->count); + __release_stripe(conf, sh); + } +} + +static void unplug_slaves(mddev_t *mddev) +{ + raid6_conf_t *conf = mddev_to_conf(mddev); + int i; + + rcu_read_lock(); + for (i=0; iraid_disks; i++) { + mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); + if (rdev && !test_bit(Faulty, &rdev->flags) && atomic_read(&rdev->nr_pending)) { + request_queue_t *r_queue = bdev_get_queue(rdev->bdev); + + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); + + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); + } + } + rcu_read_unlock(); +} + +static void raid6_unplug_device(request_queue_t *q) +{ + mddev_t *mddev = q->queuedata; + raid6_conf_t *conf = mddev_to_conf(mddev); + unsigned long flags; + + spin_lock_irqsave(&conf->device_lock, flags); + + if (blk_remove_plug(q)) { + conf->seq_flush++; + raid6_activate_delayed(conf); + } + md_wakeup_thread(mddev->thread); + + spin_unlock_irqrestore(&conf->device_lock, flags); + + unplug_slaves(mddev); +} + +static int raid6_issue_flush(request_queue_t *q, struct gendisk *disk, + sector_t *error_sector) +{ + mddev_t *mddev = q->queuedata; + raid6_conf_t *conf = mddev_to_conf(mddev); + int i, ret = 0; + + rcu_read_lock(); + for (i=0; iraid_disks && ret == 0; i++) { + mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); + if (rdev && !test_bit(Faulty, &rdev->flags)) { + struct block_device *bdev = rdev->bdev; + request_queue_t *r_queue = bdev_get_queue(bdev); + + if (!r_queue->issue_flush_fn) + ret = -EOPNOTSUPP; + else { + atomic_inc(&rdev->nr_pending); + rcu_read_unlock(); + ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk, + error_sector); + rdev_dec_pending(rdev, mddev); + rcu_read_lock(); + } + } + } + rcu_read_unlock(); + return ret; +} + +static inline void raid6_plug_device(raid6_conf_t *conf) +{ + spin_lock_irq(&conf->device_lock); + blk_plug_device(conf->mddev->queue); + spin_unlock_irq(&conf->device_lock); +} + +static int make_request (request_queue_t *q, struct bio * bi) +{ + mddev_t *mddev = q->queuedata; + raid6_conf_t *conf = mddev_to_conf(mddev); + const unsigned int raid_disks = conf->raid_disks; + const unsigned int data_disks = raid_disks - 2; + unsigned int dd_idx, pd_idx; + sector_t new_sector; + sector_t logical_sector, last_sector; + struct stripe_head *sh; + const int rw = bio_data_dir(bi); + + if (unlikely(bio_barrier(bi))) { + bio_endio(bi, bi->bi_size, -EOPNOTSUPP); + return 0; + } + + md_write_start(mddev, bi); + + disk_stat_inc(mddev->gendisk, ios[rw]); + disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi)); + + logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); + last_sector = bi->bi_sector + (bi->bi_size>>9); + + bi->bi_next = NULL; + bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ + + for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { + DEFINE_WAIT(w); + + new_sector = raid6_compute_sector(logical_sector, + raid_disks, data_disks, &dd_idx, &pd_idx, conf); + + PRINTK("raid6: make_request, sector %llu logical %llu\n", + (unsigned long long)new_sector, + (unsigned long long)logical_sector); + + retry: + prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE); + sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK)); + if (sh) { + if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) { + /* Add failed due to overlap. Flush everything + * and wait a while + */ + raid6_unplug_device(mddev->queue); + release_stripe(sh); + schedule(); + goto retry; + } + finish_wait(&conf->wait_for_overlap, &w); + raid6_plug_device(conf); + handle_stripe(sh, NULL); + release_stripe(sh); + } else { + /* cannot get stripe for read-ahead, just give-up */ + clear_bit(BIO_UPTODATE, &bi->bi_flags); + finish_wait(&conf->wait_for_overlap, &w); + break; + } + + } + spin_lock_irq(&conf->device_lock); + if (--bi->bi_phys_segments == 0) { + int bytes = bi->bi_size; + + if (rw == WRITE ) + md_write_end(mddev); + bi->bi_size = 0; + bi->bi_end_io(bi, bytes, 0); + } + spin_unlock_irq(&conf->device_lock); + return 0; +} + +/* FIXME go_faster isn't used */ +static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) +{ + raid6_conf_t *conf = (raid6_conf_t *) mddev->private; + struct stripe_head *sh; + int sectors_per_chunk = conf->chunk_size >> 9; + sector_t x; + unsigned long stripe; + int chunk_offset; + int dd_idx, pd_idx; + sector_t first_sector; + int raid_disks = conf->raid_disks; + int data_disks = raid_disks - 2; + sector_t max_sector = mddev->size << 1; + int sync_blocks; + int still_degraded = 0; + int i; + + if (sector_nr >= max_sector) { + /* just being told to finish up .. nothing much to do */ + unplug_slaves(mddev); + + if (mddev->curr_resync < max_sector) /* aborted */ + bitmap_end_sync(mddev->bitmap, mddev->curr_resync, + &sync_blocks, 1); + else /* completed sync */ + conf->fullsync = 0; + bitmap_close_sync(mddev->bitmap); + + return 0; + } + /* if there are 2 or more failed drives and we are trying + * to resync, then assert that we are finished, because there is + * nothing we can do. + */ + if (mddev->degraded >= 2 && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { + sector_t rv = (mddev->size << 1) - sector_nr; + *skipped = 1; + return rv; + } + if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && + !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) && + !conf->fullsync && sync_blocks >= STRIPE_SECTORS) { + /* we can skip this block, and probably more */ + sync_blocks /= STRIPE_SECTORS; + *skipped = 1; + return sync_blocks * STRIPE_SECTORS; /* keep things rounded to whole stripes */ + } + + x = sector_nr; + chunk_offset = sector_div(x, sectors_per_chunk); + stripe = x; + BUG_ON(x != stripe); + + first_sector = raid6_compute_sector((sector_t)stripe*data_disks*sectors_per_chunk + + chunk_offset, raid_disks, data_disks, &dd_idx, &pd_idx, conf); + sh = get_active_stripe(conf, sector_nr, pd_idx, 1); + if (sh == NULL) { + sh = get_active_stripe(conf, sector_nr, pd_idx, 0); + /* make sure we don't swamp the stripe cache if someone else + * is trying to get access + */ + schedule_timeout_uninterruptible(1); + } + /* Need to check if array will still be degraded after recovery/resync + * We don't need to check the 'failed' flag as when that gets set, + * recovery aborts. + */ + for (i=0; iraid_disks; i++) + if (conf->disks[i].rdev == NULL) + still_degraded = 1; + + bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded); + + spin_lock(&sh->lock); + set_bit(STRIPE_SYNCING, &sh->state); + clear_bit(STRIPE_INSYNC, &sh->state); + spin_unlock(&sh->lock); + + handle_stripe(sh, NULL); + release_stripe(sh); + + return STRIPE_SECTORS; +} + +/* + * This is our raid6 kernel thread. + * + * We scan the hash table for stripes which can be handled now. + * During the scan, completed stripes are saved for us by the interrupt + * handler, so that they will not have to wait for our next wakeup. + */ +static void raid6d (mddev_t *mddev) +{ + struct stripe_head *sh; + raid6_conf_t *conf = mddev_to_conf(mddev); + int handled; + + PRINTK("+++ raid6d active\n"); + + md_check_recovery(mddev); + + handled = 0; + spin_lock_irq(&conf->device_lock); + while (1) { + struct list_head *first; + + if (conf->seq_flush - conf->seq_write > 0) { + int seq = conf->seq_flush; + spin_unlock_irq(&conf->device_lock); + bitmap_unplug(mddev->bitmap); + spin_lock_irq(&conf->device_lock); + conf->seq_write = seq; + activate_bit_delay(conf); + } + + if (list_empty(&conf->handle_list) && + atomic_read(&conf->preread_active_stripes) < IO_THRESHOLD && + !blk_queue_plugged(mddev->queue) && + !list_empty(&conf->delayed_list)) + raid6_activate_delayed(conf); + + if (list_empty(&conf->handle_list)) + break; + + first = conf->handle_list.next; + sh = list_entry(first, struct stripe_head, lru); + + list_del_init(first); + atomic_inc(&sh->count); + BUG_ON(atomic_read(&sh->count)!= 1); + spin_unlock_irq(&conf->device_lock); + + handled++; + handle_stripe(sh, conf->spare_page); + release_stripe(sh); + + spin_lock_irq(&conf->device_lock); + } + PRINTK("%d stripes handled\n", handled); + + spin_unlock_irq(&conf->device_lock); + + unplug_slaves(mddev); + + PRINTK("--- raid6d inactive\n"); +} + +static ssize_t +raid6_show_stripe_cache_size(mddev_t *mddev, char *page) +{ + raid6_conf_t *conf = mddev_to_conf(mddev); + if (conf) + return sprintf(page, "%d\n", conf->max_nr_stripes); + else + return 0; +} + +static ssize_t +raid6_store_stripe_cache_size(mddev_t *mddev, const char *page, size_t len) +{ + raid6_conf_t *conf = mddev_to_conf(mddev); + char *end; + int new; + if (len >= PAGE_SIZE) + return -EINVAL; + if (!conf) + return -ENODEV; + + new = simple_strtoul(page, &end, 10); + if (!*page || (*end && *end != '\n') ) + return -EINVAL; + if (new <= 16 || new > 32768) + return -EINVAL; + while (new < conf->max_nr_stripes) { + if (drop_one_stripe(conf)) + conf->max_nr_stripes--; + else + break; + } + while (new > conf->max_nr_stripes) { + if (grow_one_stripe(conf)) + conf->max_nr_stripes++; + else break; + } + return len; +} + +static struct md_sysfs_entry +raid6_stripecache_size = __ATTR(stripe_cache_size, S_IRUGO | S_IWUSR, + raid6_show_stripe_cache_size, + raid6_store_stripe_cache_size); + +static ssize_t +stripe_cache_active_show(mddev_t *mddev, char *page) +{ + raid6_conf_t *conf = mddev_to_conf(mddev); + if (conf) + return sprintf(page, "%d\n", atomic_read(&conf->active_stripes)); + else + return 0; +} + +static struct md_sysfs_entry +raid6_stripecache_active = __ATTR_RO(stripe_cache_active); + +static struct attribute *raid6_attrs[] = { + &raid6_stripecache_size.attr, + &raid6_stripecache_active.attr, + NULL, +}; +static struct attribute_group raid6_attrs_group = { + .name = NULL, + .attrs = raid6_attrs, +}; + +static int run(mddev_t *mddev) +{ + raid6_conf_t *conf; + int raid_disk, memory; + mdk_rdev_t *rdev; + struct disk_info *disk; + struct list_head *tmp; + + if (mddev->level != 6) { + PRINTK("raid6: %s: raid level not set to 6 (%d)\n", mdname(mddev), mddev->level); + return -EIO; + } + + mddev->private = kzalloc(sizeof (raid6_conf_t), GFP_KERNEL); + if ((conf = mddev->private) == NULL) + goto abort; + conf->disks = kzalloc(mddev->raid_disks * sizeof(struct disk_info), + GFP_KERNEL); + if (!conf->disks) + goto abort; + + conf->mddev = mddev; + + if ((conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL)) == NULL) + goto abort; + + conf->spare_page = alloc_page(GFP_KERNEL); + if (!conf->spare_page) + goto abort; + + spin_lock_init(&conf->device_lock); + init_waitqueue_head(&conf->wait_for_stripe); + init_waitqueue_head(&conf->wait_for_overlap); + INIT_LIST_HEAD(&conf->handle_list); + INIT_LIST_HEAD(&conf->delayed_list); + INIT_LIST_HEAD(&conf->bitmap_list); + INIT_LIST_HEAD(&conf->inactive_list); + atomic_set(&conf->active_stripes, 0); + atomic_set(&conf->preread_active_stripes, 0); + + PRINTK("raid6: run(%s) called.\n", mdname(mddev)); + + ITERATE_RDEV(mddev,rdev,tmp) { + raid_disk = rdev->raid_disk; + if (raid_disk >= mddev->raid_disks + || raid_disk < 0) + continue; + disk = conf->disks + raid_disk; + + disk->rdev = rdev; + + if (test_bit(In_sync, &rdev->flags)) { + char b[BDEVNAME_SIZE]; + printk(KERN_INFO "raid6: device %s operational as raid" + " disk %d\n", bdevname(rdev->bdev,b), + raid_disk); + conf->working_disks++; + } + } + + conf->raid_disks = mddev->raid_disks; + + /* + * 0 for a fully functional array, 1 or 2 for a degraded array. + */ + mddev->degraded = conf->failed_disks = conf->raid_disks - conf->working_disks; + conf->mddev = mddev; + conf->chunk_size = mddev->chunk_size; + conf->level = mddev->level; + conf->algorithm = mddev->layout; + conf->max_nr_stripes = NR_STRIPES; + + /* device size must be a multiple of chunk size */ + mddev->size &= ~(mddev->chunk_size/1024 -1); + mddev->resync_max_sectors = mddev->size << 1; + + if (conf->raid_disks < 4) { + printk(KERN_ERR "raid6: not enough configured devices for %s (%d, minimum 4)\n", + mdname(mddev), conf->raid_disks); + goto abort; + } + if (!conf->chunk_size || conf->chunk_size % 4) { + printk(KERN_ERR "raid6: invalid chunk size %d for %s\n", + conf->chunk_size, mdname(mddev)); + goto abort; + } + if (conf->algorithm > ALGORITHM_RIGHT_SYMMETRIC) { + printk(KERN_ERR + "raid6: unsupported parity algorithm %d for %s\n", + conf->algorithm, mdname(mddev)); + goto abort; + } + if (mddev->degraded > 2) { + printk(KERN_ERR "raid6: not enough operational devices for %s" + " (%d/%d failed)\n", + mdname(mddev), conf->failed_disks, conf->raid_disks); + goto abort; + } + + if (mddev->degraded > 0 && + mddev->recovery_cp != MaxSector) { + if (mddev->ok_start_degraded) + printk(KERN_WARNING "raid6: starting dirty degraded array:%s" + "- data corruption possible.\n", + mdname(mddev)); + else { + printk(KERN_ERR "raid6: cannot start dirty degraded array" + " for %s\n", mdname(mddev)); + goto abort; + } + } + + { + mddev->thread = md_register_thread(raid6d, mddev, "%s_raid6"); + if (!mddev->thread) { + printk(KERN_ERR + "raid6: couldn't allocate thread for %s\n", + mdname(mddev)); + goto abort; + } + } + + memory = conf->max_nr_stripes * (sizeof(struct stripe_head) + + conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024; + if (grow_stripes(conf, conf->max_nr_stripes)) { + printk(KERN_ERR + "raid6: couldn't allocate %dkB for buffers\n", memory); + shrink_stripes(conf); + md_unregister_thread(mddev->thread); + goto abort; + } else + printk(KERN_INFO "raid6: allocated %dkB for %s\n", + memory, mdname(mddev)); + + if (mddev->degraded == 0) + printk(KERN_INFO "raid6: raid level %d set %s active with %d out of %d" + " devices, algorithm %d\n", conf->level, mdname(mddev), + mddev->raid_disks-mddev->degraded, mddev->raid_disks, + conf->algorithm); + else + printk(KERN_ALERT "raid6: raid level %d set %s active with %d" + " out of %d devices, algorithm %d\n", conf->level, + mdname(mddev), mddev->raid_disks - mddev->degraded, + mddev->raid_disks, conf->algorithm); + + print_raid6_conf(conf); + + /* read-ahead size must cover two whole stripes, which is + * 2 * (n-2) * chunksize where 'n' is the number of raid devices + */ + { + int stripe = (mddev->raid_disks-2) * mddev->chunk_size + / PAGE_SIZE; + if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) + mddev->queue->backing_dev_info.ra_pages = 2 * stripe; + } + + /* Ok, everything is just fine now */ + sysfs_create_group(&mddev->kobj, &raid6_attrs_group); + + mddev->array_size = mddev->size * (mddev->raid_disks - 2); + + mddev->queue->unplug_fn = raid6_unplug_device; + mddev->queue->issue_flush_fn = raid6_issue_flush; + return 0; +abort: + if (conf) { + print_raid6_conf(conf); + safe_put_page(conf->spare_page); + kfree(conf->stripe_hashtbl); + kfree(conf->disks); + kfree(conf); + } + mddev->private = NULL; + printk(KERN_ALERT "raid6: failed to run raid set %s\n", mdname(mddev)); + return -EIO; +} + + + +static int stop (mddev_t *mddev) +{ + raid6_conf_t *conf = (raid6_conf_t *) mddev->private; + + md_unregister_thread(mddev->thread); + mddev->thread = NULL; + shrink_stripes(conf); + kfree(conf->stripe_hashtbl); + blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/ + sysfs_remove_group(&mddev->kobj, &raid6_attrs_group); + kfree(conf); + mddev->private = NULL; + return 0; +} + +#if RAID6_DUMPSTATE +static void print_sh (struct seq_file *seq, struct stripe_head *sh) +{ + int i; + + seq_printf(seq, "sh %llu, pd_idx %d, state %ld.\n", + (unsigned long long)sh->sector, sh->pd_idx, sh->state); + seq_printf(seq, "sh %llu, count %d.\n", + (unsigned long long)sh->sector, atomic_read(&sh->count)); + seq_printf(seq, "sh %llu, ", (unsigned long long)sh->sector); + for (i = 0; i < sh->raid_conf->raid_disks; i++) { + seq_printf(seq, "(cache%d: %p %ld) ", + i, sh->dev[i].page, sh->dev[i].flags); + } + seq_printf(seq, "\n"); +} + +static void printall (struct seq_file *seq, raid6_conf_t *conf) +{ + struct stripe_head *sh; + struct hlist_node *hn; + int i; + + spin_lock_irq(&conf->device_lock); + for (i = 0; i < NR_HASH; i++) { + sh = conf->stripe_hashtbl[i]; + hlist_for_each_entry(sh, hn, &conf->stripe_hashtbl[i], hash) { + if (sh->raid_conf != conf) + continue; + print_sh(seq, sh); + } + } + spin_unlock_irq(&conf->device_lock); +} +#endif + +static void status (struct seq_file *seq, mddev_t *mddev) +{ + raid6_conf_t *conf = (raid6_conf_t *) mddev->private; + int i; + + seq_printf (seq, " level %d, %dk chunk, algorithm %d", mddev->level, mddev->chunk_size >> 10, mddev->layout); + seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->working_disks); + for (i = 0; i < conf->raid_disks; i++) + seq_printf (seq, "%s", + conf->disks[i].rdev && + test_bit(In_sync, &conf->disks[i].rdev->flags) ? "U" : "_"); + seq_printf (seq, "]"); +#if RAID6_DUMPSTATE + seq_printf (seq, "\n"); + printall(seq, conf); +#endif +} + +static void print_raid6_conf (raid6_conf_t *conf) +{ + int i; + struct disk_info *tmp; + + printk("RAID6 conf printout:\n"); + if (!conf) { + printk("(conf==NULL)\n"); + return; + } + printk(" --- rd:%d wd:%d fd:%d\n", conf->raid_disks, + conf->working_disks, conf->failed_disks); + + for (i = 0; i < conf->raid_disks; i++) { + char b[BDEVNAME_SIZE]; + tmp = conf->disks + i; + if (tmp->rdev) + printk(" disk %d, o:%d, dev:%s\n", + i, !test_bit(Faulty, &tmp->rdev->flags), + bdevname(tmp->rdev->bdev,b)); + } +} + +static int raid6_spare_active(mddev_t *mddev) +{ + int i; + raid6_conf_t *conf = mddev->private; + struct disk_info *tmp; + + for (i = 0; i < conf->raid_disks; i++) { + tmp = conf->disks + i; + if (tmp->rdev + && !test_bit(Faulty, &tmp->rdev->flags) + && !test_bit(In_sync, &tmp->rdev->flags)) { + mddev->degraded--; + conf->failed_disks--; + conf->working_disks++; + set_bit(In_sync, &tmp->rdev->flags); + } + } + print_raid6_conf(conf); + return 0; +} + +static int raid6_remove_disk(mddev_t *mddev, int number) +{ + raid6_conf_t *conf = mddev->private; + int err = 0; + mdk_rdev_t *rdev; + struct disk_info *p = conf->disks + number; + + print_raid6_conf(conf); + rdev = p->rdev; + if (rdev) { + if (test_bit(In_sync, &rdev->flags) || + atomic_read(&rdev->nr_pending)) { + err = -EBUSY; + goto abort; + } + p->rdev = NULL; + synchronize_rcu(); + if (atomic_read(&rdev->nr_pending)) { + /* lost the race, try later */ + err = -EBUSY; + p->rdev = rdev; + } + } + +abort: + + print_raid6_conf(conf); + return err; +} + +static int raid6_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) +{ + raid6_conf_t *conf = mddev->private; + int found = 0; + int disk; + struct disk_info *p; + + if (mddev->degraded > 2) + /* no point adding a device */ + return 0; + /* + * find the disk ... but prefer rdev->saved_raid_disk + * if possible. + */ + if (rdev->saved_raid_disk >= 0 && + conf->disks[rdev->saved_raid_disk].rdev == NULL) + disk = rdev->saved_raid_disk; + else + disk = 0; + for ( ; disk < mddev->raid_disks; disk++) + if ((p=conf->disks + disk)->rdev == NULL) { + clear_bit(In_sync, &rdev->flags); + rdev->raid_disk = disk; + found = 1; + if (rdev->saved_raid_disk != disk) + conf->fullsync = 1; + rcu_assign_pointer(p->rdev, rdev); + break; + } + print_raid6_conf(conf); + return found; +} + +static int raid6_resize(mddev_t *mddev, sector_t sectors) +{ + /* no resync is happening, and there is enough space + * on all devices, so we can resize. + * We need to make sure resync covers any new space. + * If the array is shrinking we should possibly wait until + * any io in the removed space completes, but it hardly seems + * worth it. + */ + sectors &= ~((sector_t)mddev->chunk_size/512 - 1); + mddev->array_size = (sectors * (mddev->raid_disks-2))>>1; + set_capacity(mddev->gendisk, mddev->array_size << 1); + mddev->changed = 1; + if (sectors/2 > mddev->size && mddev->recovery_cp == MaxSector) { + mddev->recovery_cp = mddev->size << 1; + set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); + } + mddev->size = sectors /2; + mddev->resync_max_sectors = sectors; + return 0; +} + +static void raid6_quiesce(mddev_t *mddev, int state) +{ + raid6_conf_t *conf = mddev_to_conf(mddev); + + switch(state) { + case 1: /* stop all writes */ + spin_lock_irq(&conf->device_lock); + conf->quiesce = 1; + wait_event_lock_irq(conf->wait_for_stripe, + atomic_read(&conf->active_stripes) == 0, + conf->device_lock, /* nothing */); + spin_unlock_irq(&conf->device_lock); + break; + + case 0: /* re-enable writes */ + spin_lock_irq(&conf->device_lock); + conf->quiesce = 0; + wake_up(&conf->wait_for_stripe); + spin_unlock_irq(&conf->device_lock); + break; + } +} + +static struct mdk_personality raid6_personality = +{ + .name = "raid6", + .level = 6, + .owner = THIS_MODULE, + .make_request = make_request, + .run = run, + .stop = stop, + .status = status, + .error_handler = error, + .hot_add_disk = raid6_add_disk, + .hot_remove_disk= raid6_remove_disk, + .spare_active = raid6_spare_active, + .sync_request = sync_request, + .resize = raid6_resize, + .quiesce = raid6_quiesce, +}; + +static int __init raid6_init(void) +{ + int e; + + e = raid6_select_algo(); + if ( e ) + return e; + + return register_md_personality(&raid6_personality); +} + +static void raid6_exit (void) +{ + unregister_md_personality(&raid6_personality); +} + +module_init(raid6_init); +module_exit(raid6_exit); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("md-personality-8"); /* RAID6 */ +MODULE_ALIAS("md-raid6"); +MODULE_ALIAS("md-level-6"); diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 9f7e1fe8c..344d83aae 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -25,7 +25,7 @@ config VIDEO_DEV module will be called videodev. config VIDEO_V4L1 - bool "Enable Video For Linux API 1 (DEPRECATED)" + boolean "Enable Video For Linux API 1 (DEPRECATED)" depends on VIDEO_DEV select VIDEO_V4L1_COMPAT default y @@ -36,7 +36,7 @@ config VIDEO_V4L1 If you are unsure as to whether this is required, answer Y. config VIDEO_V4L1_COMPAT - bool "Enable Video For Linux API 1 compatible Layer" + boolean "Enable Video For Linux API 1 compatible Layer" depends on VIDEO_DEV default y ---help--- @@ -53,8 +53,7 @@ config VIDEO_V4L1_COMPAT If you are unsure as to whether this is required, answer Y. config VIDEO_V4L2 - bool - depends on VIDEO_DEV + tristate default y source "drivers/media/video/Kconfig" diff --git a/drivers/media/common/Makefile b/drivers/media/common/Makefile index 8e7448230..61b89617a 100644 --- a/drivers/media/common/Makefile +++ b/drivers/media/common/Makefile @@ -1,5 +1,5 @@ saa7146-objs := saa7146_i2c.o saa7146_core.o -saa7146_vv-objs := saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o +saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o ir-common-objs := ir-functions.o ir-keymaps.o obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c index 8eaa88fd8..397cff8b3 100644 --- a/drivers/media/common/ir-functions.c +++ b/drivers/media/common/ir-functions.c @@ -269,3 +269,4 @@ EXPORT_SYMBOL_GPL(ir_decode_pulsedistance); * c-basic-offset: 8 * End: */ + diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index ca98d9478..a294d5c2c 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c @@ -618,7 +618,7 @@ IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE] = { EXPORT_SYMBOL_GPL(ir_codes_em_terratec); -IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE] = { +IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE] = { [ 0x3a ] = KEY_0, [ 0x31 ] = KEY_1, [ 0x32 ] = KEY_2, @@ -670,7 +670,7 @@ IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE] = { [ 0x27 ] = KEY_RECORD, }; -EXPORT_SYMBOL_GPL(ir_codes_pinnacle_grey); +EXPORT_SYMBOL_GPL(ir_codes_em_pinnacle_usb); IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE] = { [ 0x0f ] = KEY_0, @@ -1263,51 +1263,34 @@ IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = { [ 0x0f ] = KEY_9, [ 0x00 ] = KEY_POWER, - [ 0x1b ] = KEY_AUDIO, /* Audio Source */ - [ 0x02 ] = KEY_TUNER, /* TV/FM, not on Y0400052 */ - [ 0x1e ] = KEY_VIDEO, /* Video Source */ - [ 0x16 ] = KEY_INFO, /* Display information */ + [ 0x02 ] = KEY_TUNER, /* TV/FM */ + [ 0x1e ] = KEY_VIDEO, [ 0x04 ] = KEY_VOLUMEUP, [ 0x08 ] = KEY_VOLUMEDOWN, [ 0x0c ] = KEY_CHANNELUP, [ 0x10 ] = KEY_CHANNELDOWN, [ 0x03 ] = KEY_ZOOM, /* fullscreen */ - [ 0x1f ] = KEY_TEXT, /* closed caption/teletext */ + [ 0x1f ] = KEY_SUBTITLE, /* closed caption/teletext */ [ 0x20 ] = KEY_SLEEP, - [ 0x29 ] = KEY_CLEAR, /* boss key */ [ 0x14 ] = KEY_MUTE, [ 0x2b ] = KEY_RED, [ 0x2c ] = KEY_GREEN, [ 0x2d ] = KEY_YELLOW, [ 0x2e ] = KEY_BLUE, - [ 0x18 ] = KEY_KPPLUS, /* fine tune + , not on Y040052 */ - [ 0x19 ] = KEY_KPMINUS, /* fine tune - , not on Y040052 */ - [ 0x2a ] = KEY_MEDIA, /* PIP (Picture in picture */ + [ 0x18 ] = KEY_KPPLUS, /* fine tune + */ + [ 0x19 ] = KEY_KPMINUS, /* fine tune - */ [ 0x21 ] = KEY_DOT, [ 0x13 ] = KEY_ENTER, - [ 0x11 ] = KEY_LAST, /* Recall (last channel */ - [ 0x22 ] = KEY_PREVIOUS, + [ 0x22 ] = KEY_BACK, [ 0x23 ] = KEY_PLAYPAUSE, [ 0x24 ] = KEY_NEXT, - [ 0x25 ] = KEY_ARCHIVE, /* Time Shifting */ [ 0x26 ] = KEY_STOP, - [ 0x27 ] = KEY_RECORD, - [ 0x28 ] = KEY_SAVE, /* Screenshot */ - [ 0x2f ] = KEY_MENU, - [ 0x30 ] = KEY_CANCEL, - [ 0x31 ] = KEY_CHANNEL, /* Channel Surf */ - [ 0x32 ] = KEY_SUBTITLE, - [ 0x33 ] = KEY_LANGUAGE, - [ 0x34 ] = KEY_REWIND, - [ 0x35 ] = KEY_FASTFORWARD, - [ 0x36 ] = KEY_TV, - [ 0x37 ] = KEY_RADIO, /* FM */ - [ 0x38 ] = KEY_DVD + [ 0x27 ] = KEY_RECORD }; EXPORT_SYMBOL_GPL(ir_codes_winfast); -IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE] = { +IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE] = { [ 0x59 ] = KEY_MUTE, [ 0x4a ] = KEY_POWER, @@ -1365,7 +1348,7 @@ IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE] = { [ 0x0a ] = KEY_BACKSPACE, }; -EXPORT_SYMBOL_GPL(ir_codes_pinnacle_color); +EXPORT_SYMBOL_GPL(ir_codes_pinnacle); /* Hauppauge: the newer, gray remotes (seems there are multiple * slightly different versions), shipped with cx88+ivtv cards. @@ -1430,46 +1413,3 @@ IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE] = { EXPORT_SYMBOL_GPL(ir_codes_hauppauge_new); -IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE] = { - [ 0x1d ] = KEY_SWITCHVIDEOMODE, /* switch inputs */ - [ 0x2a ] = KEY_FRONT, - - [ 0x3e ] = KEY_1, - [ 0x02 ] = KEY_2, - [ 0x06 ] = KEY_3, - [ 0x0a ] = KEY_4, - [ 0x0e ] = KEY_5, - [ 0x12 ] = KEY_6, - [ 0x16 ] = KEY_7, - [ 0x1a ] = KEY_8, - [ 0x1e ] = KEY_9, - [ 0x3a ] = KEY_0, - [ 0x22 ] = KEY_NUMLOCK, /* -/-- */ - [ 0x20 ] = KEY_REFRESH, - - [ 0x03 ] = KEY_BRIGHTNESSDOWN, - [ 0x28 ] = KEY_AUDIO, - [ 0x3c ] = KEY_UP, - [ 0x3f ] = KEY_LEFT, - [ 0x2e ] = KEY_MUTE, - [ 0x3b ] = KEY_RIGHT, - [ 0x00 ] = KEY_DOWN, - [ 0x07 ] = KEY_BRIGHTNESSUP, - [ 0x2c ] = KEY_TEXT, - - [ 0x37 ] = KEY_RECORD, - [ 0x17 ] = KEY_PLAY, - [ 0x13 ] = KEY_PAUSE, - [ 0x26 ] = KEY_STOP, - [ 0x18 ] = KEY_FASTFORWARD, - [ 0x14 ] = KEY_REWIND, - [ 0x33 ] = KEY_ZOOM, - [ 0x32 ] = KEY_KEYBOARD, - [ 0x30 ] = KEY_GOTO, /* Pointing arrow */ - [ 0x36 ] = KEY_MACRO, /* Maximize/Minimize (yellow) */ - [ 0x0b ] = KEY_RADIO, - [ 0x10 ] = KEY_POWER, - -}; - -EXPORT_SYMBOL_GPL(ir_codes_npgtech); diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index b88451e33..8cdd4d265 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c @@ -363,7 +363,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent saa7146_write(dev, MC2, 0xf8000000); /* request an interrupt for the saa7146 */ - err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED | IRQF_DISABLED, + err = request_irq(pci->irq, interrupt_hw, SA_SHIRQ | SA_INTERRUPT, dev->name, dev); if (err < 0) { ERR(("request_irq() failed.\n")); diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 0027acc5b..523ab3851 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -501,7 +501,6 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) return 0; } -EXPORT_SYMBOL_GPL(saa7146_vv_init); int saa7146_vv_release(struct saa7146_dev* dev) { @@ -516,7 +515,6 @@ int saa7146_vv_release(struct saa7146_dev* dev) return 0; } -EXPORT_SYMBOL_GPL(saa7146_vv_release); int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, char *name, int type) @@ -555,7 +553,6 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, *vid = vfd; return 0; } -EXPORT_SYMBOL_GPL(saa7146_register_device); int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev) { @@ -574,7 +571,6 @@ int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev return 0; } -EXPORT_SYMBOL_GPL(saa7146_unregister_device); static int __init saa7146_vv_init_module(void) { diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c index d2905720e..33bec8a68 100644 --- a/drivers/media/common/saa7146_hlp.c +++ b/drivers/media/common/saa7146_hlp.c @@ -158,7 +158,7 @@ static int calculate_h_scale_registers(struct saa7146_dev *dev, } /* the horizontal scaling increment controls the UV filter - to reduce the bandwidth to improve the display quality, + to reduce the bandwith to improve the display quality, so set it ... */ if ( xsci == 0x400) pfuv = 0x00; @@ -641,7 +641,6 @@ void saa7146_set_hps_source_and_sync(struct saa7146_dev *dev, int source, int sy vv->current_hps_source = source; vv->current_hps_sync = sync; } -EXPORT_SYMBOL_GPL(saa7146_set_hps_source_and_sync); int saa7146_enable_overlay(struct saa7146_fh *fh) { diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 7e0cedc55..e7079d1bd 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c @@ -318,7 +318,6 @@ int saa7146_start_preview(struct saa7146_fh *fh) return 0; } -EXPORT_SYMBOL_GPL(saa7146_start_preview); int saa7146_stop_preview(struct saa7146_fh *fh) { @@ -353,7 +352,6 @@ int saa7146_stop_preview(struct saa7146_fh *fh) return 0; } -EXPORT_SYMBOL_GPL(saa7146_stop_preview); static int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f) { @@ -1190,7 +1188,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } return err; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGMBUF: { struct video_mbuf *mbuf = arg; @@ -1219,7 +1216,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int mutex_unlock(&q->lock); return 0; } -#endif default: return v4l_compat_translate_ioctl(inode,file,cmd,arg, saa7146_video_do_ioctl); diff --git a/drivers/media/common/saa7146_vv_ksyms.c b/drivers/media/common/saa7146_vv_ksyms.c new file mode 100644 index 000000000..62226eb47 --- /dev/null +++ b/drivers/media/common/saa7146_vv_ksyms.c @@ -0,0 +1,12 @@ +#include +#include + +EXPORT_SYMBOL_GPL(saa7146_start_preview); +EXPORT_SYMBOL_GPL(saa7146_stop_preview); + +EXPORT_SYMBOL_GPL(saa7146_set_hps_source_and_sync); +EXPORT_SYMBOL_GPL(saa7146_register_device); +EXPORT_SYMBOL_GPL(saa7146_unregister_device); + +EXPORT_SYMBOL_GPL(saa7146_vv_init); +EXPORT_SYMBOL_GPL(saa7146_vv_release); diff --git a/drivers/media/dvb/b2c2/Kconfig b/drivers/media/dvb/b2c2/Kconfig index 49a06fc54..d7f1fd5b7 100644 --- a/drivers/media/dvb/b2c2/Kconfig +++ b/drivers/media/dvb/b2c2/Kconfig @@ -1,7 +1,6 @@ config DVB_B2C2_FLEXCOP tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" depends on DVB_CORE && I2C - select DVB_PLL select DVB_STV0299 select DVB_MT352 select DVB_MT312 diff --git a/drivers/media/dvb/b2c2/flexcop-common.h b/drivers/media/dvb/b2c2/flexcop-common.h index 5a6c4fe24..b3dd0603c 100644 --- a/drivers/media/dvb/b2c2/flexcop-common.h +++ b/drivers/media/dvb/b2c2/flexcop-common.h @@ -8,6 +8,7 @@ #ifndef __FLEXCOP_COMMON_H__ #define __FLEXCOP_COMMON_H__ +#include #include #include diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 68bb56e46..9c7f12282 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c @@ -14,7 +14,6 @@ #include "stv0297.h" #include "mt312.h" #include "lgdt330x.h" -#include "lg_h06xf.h" #include "dvb-pll.h" /* lnb control */ @@ -167,12 +166,11 @@ static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend* fe, u32 srate, return 0; } -static int samsung_tbmu24112_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int samsung_tbmu24112_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) { u8 buf[4]; u32 div; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; - struct flexcop_device *fc = fe->dvb->priv; div = params->frequency / 125; @@ -183,11 +181,8 @@ static int samsung_tbmu24112_tuner_set_params(struct dvb_frontend* fe, struct dv if (params->frequency < 1500000) buf[3] |= 0x10; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) { + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; - } return 0; } @@ -246,6 +241,7 @@ static struct stv0299_config samsung_tbmu24112_config = { .volt13_op0_op1 = STV0299_VOLT13_OP1, .min_delay_ms = 100, .set_symbol_rate = samsung_tbmu24112_set_symbol_rate, + .pll_set = samsung_tbmu24112_pll_set, }; /* dvb-t mt352 */ @@ -268,14 +264,11 @@ static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend* fe) return 0; } -static int samsung_tdtc9251dh0_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters *params, u8* pllbuf, int buf_len) +static int samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; unsigned char bs = 0; - if (buf_len < 5) - return -EINVAL; - #define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */ div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; @@ -283,18 +276,19 @@ static int samsung_tdtc9251dh0_calc_regs(struct dvb_frontend* fe, struct dvb_fro if (params->frequency >= 161000000 && params->frequency <= 439000000) bs = 0x0a; if (params->frequency >= 447000000 && params->frequency <= 863000000) bs = 0x08; - pllbuf[0] = 0x61; + pllbuf[0] = 0xc2; /* Note: non-linux standard PLL i2c address */ pllbuf[1] = div >> 8; pllbuf[2] = div & 0xff; pllbuf[3] = 0xcc; pllbuf[4] = bs; - return 5; + return 0; } static struct mt352_config samsung_tdtc9251dh0_config = { .demod_address = 0x0f, .demod_init = samsung_tdtc9251dh0_demod_init, + .pll_set = samsung_tdtc9251dh0_pll_set, }; static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) @@ -303,21 +297,56 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir return request_firmware(fw, name, fc->dev); } -static int lgdt3303_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int lgdt3303_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params) { struct flexcop_device *fc = fe->dvb->priv; - return lg_h06xf_pll_set(fe, &fc->i2c_adap, params); + u8 buf[4]; + struct i2c_msg msg = + { .addr = 0x61, .flags = 0, .buf = buf, .len = 4 }; + int err; + + dvb_pll_configure(&dvb_pll_tdvs_tua6034,buf, params->frequency, 0); + dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", + __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); + if ((err = i2c_transfer(&fc->i2c_adap, &msg, 1)) != 1) { + printk(KERN_WARNING "lgdt3303: %s error " + "(addr %02x <- %02x, err = %i)\n", + __FUNCTION__, buf[0], buf[1], err); + if (err < 0) + return err; + else + return -EREMOTEIO; + } + + buf[0] = 0x86 | 0x18; + buf[1] = 0x50; + msg.len = 2; + if ((err = i2c_transfer(&fc->i2c_adap, &msg, 1)) != 1) { + printk(KERN_WARNING "lgdt3303: %s error " + "(addr %02x <- %02x, err = %i)\n", + __FUNCTION__, buf[0], buf[1], err); + if (err < 0) + return err; + else + return -EREMOTEIO; + } + + return 0; } static struct lgdt330x_config air2pc_atsc_hd5000_config = { .demod_address = 0x59, .demod_chip = LGDT3303, .serial_mpeg = 0x04, + .pll_set = lgdt3303_pll_set, .clock_polarity_flip = 1, }; static struct nxt200x_config samsung_tbmv_config = { .demod_address = 0x0a, + .pll_address = 0xc2, + .pll_desc = &dvb_pll_samsung_tbmv, }; static struct bcm3510_config air2pc_atsc_first_gen_config = { @@ -325,7 +354,7 @@ static struct bcm3510_config air2pc_atsc_first_gen_config = { .request_firmware = flexcop_fe_request_firmware, }; -static int skystar23_samsung_tbdu18132_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int skystar23_samsung_tbdu18132_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { u8 buf[4]; u32 div; @@ -342,8 +371,6 @@ static int skystar23_samsung_tbdu18132_tuner_set_params(struct dvb_frontend* fe, if (params->frequency < 1550000) buf[3] |= 0x02; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -352,52 +379,9 @@ static int skystar23_samsung_tbdu18132_tuner_set_params(struct dvb_frontend* fe, static struct mt312_config skystar23_samsung_tbdu18132_config = { .demod_address = 0x0e, + .pll_set = skystar23_samsung_tbdu18132_pll_set, }; -static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters *fep) -{ - struct flexcop_device *fc = fe->dvb->priv; - u8 buf[4]; - u16 div; - int ret; - -/* 62.5 kHz * 10 */ -#define REF_FREQ 625 -#define FREQ_OFFSET 36125 - - div = ((fep->frequency/1000 + FREQ_OFFSET ) * 10) / REF_FREQ; // 4 MHz = 4000 KHz - - buf[0] = (u8)( div >> 8) & 0x7f; - buf[1] = (u8) div & 0xff; - -/* F(osc) = N * Reference Freq. (62.5 kHz) - * byte 2 : 0 N14 N13 N12 N11 N10 N9 N8 - * byte 3 : N7 N6 N5 N4 N3 N2 N1 N0 - * byte 4 : 1 * * AGD R3 R2 R1 R0 - * byte 5 : C1 * RE RTS BS4 BS3 BS2 BS1 - * AGD = 1, R3 R2 R1 R0 = 0 1 0 1 => byte 4 = 1**10101 = 0x95 */ - buf[2] = 0x95; - -// Range(MHz) C1 * RE RTS BS4 BS3 BS2 BS1 Byte 5 -// 47 - 153 0 * 0 0 0 0 0 1 0x01 -// 153 - 430 0 * 0 0 0 0 1 0 0x02 -// 430 - 822 0 * 0 0 1 0 0 0 0x08 -// 822 - 862 1 * 0 0 1 0 0 0 0x88 - - if (fep->frequency <= 153000000) buf[3] = 0x01; - else if (fep->frequency <= 430000000) buf[3] = 0x02; - else if (fep->frequency <= 822000000) buf[3] = 0x08; - else buf[3] = 0x88; - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - deb_tuner("tuner buffer for %d Hz: %x %x %x %x\n",fep->frequency, buf[0],buf[1],buf[2],buf[3]); - ret = fc->i2c_request(fc,FC_WRITE,FC_I2C_PORT_TUNER,0x61,buf[0],&buf[1],3); - deb_tuner("tuner write returned: %d\n",ret); - - return 0; -} static u8 alps_tdee4_stv0297_inittab[] = { 0x80, 0x01, @@ -506,9 +490,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */ if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) { - ops = &fc->fe->ops; - - ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params; + ops = fc->fe->ops; ops->set_voltage = flexcop_set_voltage; @@ -521,19 +503,16 @@ int flexcop_frontend_init(struct flexcop_device *fc) /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */ if ((fc->fe = mt352_attach(&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) { fc->dev_type = FC_AIR_DVB; - fc->fe->ops.tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs; info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address); } else /* try the air atsc 2nd generation (nxt2002) */ if ((fc->fe = nxt200x_attach(&samsung_tbmv_config, &fc->i2c_adap)) != NULL) { fc->dev_type = FC_AIR_ATSC2; - dvb_pll_attach(fc->fe, 0x61, NULL, &dvb_pll_samsung_tbmv); info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); } else /* try the air atsc 3nd generation (lgdt3303) */ if ((fc->fe = lgdt330x_attach(&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) { fc->dev_type = FC_AIR_ATSC3; - fc->fe->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address); } else /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ @@ -544,14 +523,11 @@ int flexcop_frontend_init(struct flexcop_device *fc) /* try the cable dvb (stv0297) */ if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) { fc->dev_type = FC_CABLE; - fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params; info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); } else /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { - ops = &fc->fe->ops; - - ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params; + ops = fc->fe->ops; ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; ops->diseqc_send_burst = flexcop_diseqc_send_burst; @@ -571,7 +547,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) } else { if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { err("frontend registration failed!"); - ops = &fc->fe->ops; + ops = fc->fe->ops; if (ops->release != NULL) ops->release(fc->fe); fc->fe = NULL; diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index eb2e6432c..9bc40bdcc 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c @@ -242,16 +242,19 @@ static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci) if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[0],FC_DEFAULT_DMA1_BUFSIZE)) != 0) return ret; - if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) { - flexcop_dma_free(&fc_pci->dma[0]); - return ret; - } + if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) + goto dma1_free; flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); fc_pci->init_state |= FC_PCI_DMA_INIT; + goto success; +dma1_free: + flexcop_dma_free(&fc_pci->dma[0]); + +success: return ret; } @@ -294,13 +297,13 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) pci_set_drvdata(fc_pci->pdev, fc_pci); if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, - IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0) + SA_SHIRQ, DRIVER_NAME, fc_pci)) != 0) goto err_pci_iounmap; spin_lock_init(&fc_pci->irq_lock); fc_pci->init_state |= FC_PCI_INIT; - return ret; + goto success; err_pci_iounmap: pci_iounmap(fc_pci->pdev, fc_pci->io_mem); @@ -309,6 +312,8 @@ err_pci_release_regions: pci_release_regions(fc_pci->pdev); err_pci_disable_device: pci_disable_device(fc_pci->pdev); + +success: return ret; } @@ -373,14 +378,14 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e INIT_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work, fc_pci); - return ret; - + goto success; err_fc_exit: flexcop_device_exit(fc); err_pci_exit: flexcop_pci_exit(fc_pci); err_kfree: flexcop_device_kfree(fc); +success: return ret; } diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c index 515954f96..06ec9fff0 100644 --- a/drivers/media/dvb/b2c2/flexcop-usb.c +++ b/drivers/media/dvb/b2c2/flexcop-usb.c @@ -433,10 +433,11 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) flexcop_wan_set_speed(fc_usb->fc_dev,FC_WAN_SPEED_8MBITS); flexcop_sram_ctrl(fc_usb->fc_dev,1,1,1); - return 0; - + ret = 0; + goto success; urb_error: flexcop_usb_transfer_exit(fc_usb); +success: return ret; } @@ -514,14 +515,15 @@ static int flexcop_usb_probe(struct usb_interface *intf, goto err_fc_exit; info("%s successfully initialized and connected.",DRIVER_NAME); - return 0; - + ret = 0; + goto success; err_fc_exit: flexcop_device_exit(fc); err_usb_exit: flexcop_usb_exit(fc_usb); err_kfree: flexcop_device_kfree(fc); +success: return ret; } diff --git a/drivers/media/dvb/b2c2/flexcop.c b/drivers/media/dvb/b2c2/flexcop.c index 29ec41831..56ba52470 100644 --- a/drivers/media/dvb/b2c2/flexcop.c +++ b/drivers/media/dvb/b2c2/flexcop.c @@ -67,7 +67,7 @@ static int flexcop_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) static int flexcop_dvb_init(struct flexcop_device *fc) { int ret; - if ((ret = dvb_register_adapter(&fc->dvb_adapter,"FlexCop Digital TV device",fc->owner,fc->dev)) < 0) { + if ((ret = dvb_register_adapter(&fc->dvb_adapter,"FlexCop Digital TV device",fc->owner)) < 0) { err("error registering DVB adapter"); return ret; } @@ -116,7 +116,7 @@ static int flexcop_dvb_init(struct flexcop_device *fc) dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx); fc->init_state |= FC_STATE_DVB_INIT; - return 0; + goto success; err_connect_frontend: fc->demux.dmx.remove_frontend(&fc->demux.dmx,&fc->mem_frontend); @@ -129,6 +129,9 @@ err_dmx_dev: err_dmx: dvb_unregister_adapter(&fc->dvb_adapter); return ret; + +success: + return 0; } static void flexcop_dvb_exit(struct flexcop_device *fc) @@ -276,10 +279,11 @@ int flexcop_device_initialize(struct flexcop_device *fc) flexcop_device_name(fc,"initialization of","complete"); - return 0; - + ret = 0; + goto success; error: flexcop_device_exit(fc); +success: return ret; } EXPORT_SYMBOL(flexcop_device_initialize); diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig index 7d0ee1ab2..f39400211 100644 --- a/drivers/media/dvb/bt8xx/Kconfig +++ b/drivers/media/dvb/bt8xx/Kconfig @@ -1,7 +1,6 @@ config DVB_BT8XX tristate "BT8xx based PCI cards" depends on DVB_CORE && PCI && I2C && VIDEO_BT848 - select DVB_PLL select DVB_MT352 select DVB_SP887X select DVB_NXT6000 diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 755822ee6..5500f8a0f 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c @@ -63,6 +63,8 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging, default is 0 (off)."); int bt878_num; struct bt878 bt878[BT878_MAX]; +EXPORT_SYMBOL(bt878_debug); +EXPORT_SYMBOL(bt878_verbose); EXPORT_SYMBOL(bt878_num); EXPORT_SYMBOL(bt878); @@ -391,9 +393,7 @@ static struct cards card_list[] __devinitdata = { { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" }, { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" }, { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" }, - { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV" }, - { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini" }, - + { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"}, { 0, -1, NULL } }; @@ -417,11 +417,6 @@ static int __devinit bt878_probe(struct pci_dev *dev, printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", bt878_num); - if (bt878_num >= BT878_MAX) { - printk(KERN_ERR "bt878: Too many devices inserted\n"); - result = -ENOMEM; - goto fail0; - } if (pci_enable_device(dev)) return -EIO; @@ -488,7 +483,7 @@ static int __devinit bt878_probe(struct pci_dev *dev, btwrite(0, BT848_INT_MASK); result = request_irq(bt->irq, bt878_irq, - IRQF_SHARED | IRQF_DISABLED, "bt878", + SA_SHIRQ | SA_INTERRUPT, "bt878", (void *) bt); if (result == -EINVAL) { printk(KERN_ERR "bt878(%d): Bad irq number or handler\n", diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 06ac899a9..1cfa5e503 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c @@ -38,10 +38,6 @@ static unsigned int dst_addons; module_param(dst_addons, int, 0644); MODULE_PARM_DESC(dst_addons, "CA daughterboard, default is 0 (No addons)"); -static unsigned int dst_algo; -module_param(dst_algo, int, 0644); -MODULE_PARM_DESC(dst_algo, "tuning algo: default is 0=(SW), 1=(HW)"); - #define HAS_LOCK 1 #define ATTEMPT_TUNE 2 #define HAS_POWER 4 @@ -51,24 +47,20 @@ MODULE_PARM_DESC(dst_algo, "tuning algo: default is 0=(SW), 1=(HW)"); #define DST_INFO 2 #define DST_DEBUG 3 -#define dprintk(x, y, z, format, arg...) do { \ - if (z) { \ - if ((x > DST_ERROR) && (x > y)) \ - printk(KERN_ERR "dst(%d) %s: " format "\n", \ - state->bt->nr, __func__ , ##arg); \ - else if ((x > DST_NOTICE) && (x > y)) \ - printk(KERN_NOTICE "dst(%d) %s: " format "\n", \ - state->bt->nr, __func__ , ##arg); \ - else if ((x > DST_INFO) && (x > y)) \ - printk(KERN_INFO "dst(%d) %s: " format "\n", \ - state->bt->nr, __func__ , ##arg); \ - else if ((x > DST_DEBUG) && (x > y)) \ - printk(KERN_DEBUG "dst(%d) %s: " format "\n", \ - state->bt->nr, __func__ , ##arg); \ - } else { \ - if (x > y) \ - printk(format, ##arg); \ - } \ +#define dprintk(x, y, z, format, arg...) do { \ + if (z) { \ + if ((x > DST_ERROR) && (x > y)) \ + printk(KERN_ERR "%s: " format "\n", __FUNCTION__ , ##arg); \ + else if ((x > DST_NOTICE) && (x > y)) \ + printk(KERN_NOTICE "%s: " format "\n", __FUNCTION__ , ##arg); \ + else if ((x > DST_INFO) && (x > y)) \ + printk(KERN_INFO "%s: " format "\n", __FUNCTION__ , ##arg); \ + else if ((x > DST_DEBUG) && (x > y)) \ + printk(KERN_DEBUG "%s: " format "\n", __FUNCTION__ , ##arg); \ + } else { \ + if (x > y) \ + printk(format, ##arg); \ + } \ } while(0) @@ -118,7 +110,7 @@ int dst_gpio_inb(struct dst_state *state, u8 *result) *result = 0; if ((err = bt878_device_control(state->bt, DST_IG_READ, &rd_packet)) < 0) { - dprintk(verbose, DST_ERROR, 1, "dst_gpio_inb error (err == %i)", err); + dprintk(verbose, DST_ERROR, 1, "dst_gpio_inb error (err == %i)\n", err); return -EREMOTEIO; } *result = (u8) rd_packet.rd.value; @@ -371,17 +363,6 @@ static int dst_set_freq(struct dst_state *state, u32 freq) state->tx_tuna[2] = (freq >> 16) & 0xff; state->tx_tuna[3] = (freq >> 8) & 0xff; state->tx_tuna[4] = (u8) freq; - } else if (state->dst_type == DST_TYPE_IS_ATSC) { - freq = freq / 1000; - if (freq < 51000 || freq > 858000) - return -EINVAL; - state->tx_tuna[2] = (freq >> 16) & 0xff; - state->tx_tuna[3] = (freq >> 8) & 0xff; - state->tx_tuna[4] = (u8) freq; - state->tx_tuna[5] = 0x00; /* ATSC */ - state->tx_tuna[6] = 0x00; - if (state->dst_hw_cap & DST_TYPE_HAS_ANALOG) - state->tx_tuna[7] = 0x00; /* Digital */ } else return -EINVAL; @@ -393,7 +374,7 @@ static int dst_set_bandwidth(struct dst_state *state, fe_bandwidth_t bandwidth) state->bandwidth = bandwidth; if (state->dst_type != DST_TYPE_IS_TERR) - return -EOPNOTSUPP; + return 0; switch (bandwidth) { case BANDWIDTH_6_MHZ: @@ -462,49 +443,37 @@ static int dst_set_symbolrate(struct dst_state *state, u32 srate) state->symbol_rate = srate; if (state->dst_type == DST_TYPE_IS_TERR) { - return -EOPNOTSUPP; + return 0; } dprintk(verbose, DST_INFO, 1, "set symrate %u", srate); srate /= 1000; - if (state->dst_type == DST_TYPE_IS_SAT) { - if (state->type_flags & DST_TYPE_HAS_SYMDIV) { - sval = srate; - sval <<= 20; - do_div(sval, 88000); - symcalc = (u32) sval; - dprintk(verbose, DST_INFO, 1, "set symcalc %u", symcalc); - state->tx_tuna[5] = (u8) (symcalc >> 12); - state->tx_tuna[6] = (u8) (symcalc >> 4); - state->tx_tuna[7] = (u8) (symcalc << 4); - } else { - state->tx_tuna[5] = (u8) (srate >> 16) & 0x7f; - state->tx_tuna[6] = (u8) (srate >> 8); - state->tx_tuna[7] = (u8) srate; - } - state->tx_tuna[8] &= ~0x20; - if (state->type_flags & DST_TYPE_HAS_OBS_REGS) { - if (srate > 8000) - state->tx_tuna[8] |= 0x20; - } - } else if (state->dst_type == DST_TYPE_IS_CABLE) { - dprintk(verbose, DST_DEBUG, 1, "%s", state->fw_name); - if (!strncmp(state->fw_name, "DCTNEW", 6)) { - state->tx_tuna[5] = (u8) (srate >> 8); - state->tx_tuna[6] = (u8) srate; - state->tx_tuna[7] = 0x00; - } else if (!strncmp(state->fw_name, "DCT-CI", 6)) { - state->tx_tuna[5] = 0x00; - state->tx_tuna[6] = (u8) (srate >> 8); - state->tx_tuna[7] = (u8) srate; - } + if (state->type_flags & DST_TYPE_HAS_SYMDIV) { + sval = srate; + sval <<= 20; + do_div(sval, 88000); + symcalc = (u32) sval; + dprintk(verbose, DST_INFO, 1, "set symcalc %u", symcalc); + state->tx_tuna[5] = (u8) (symcalc >> 12); + state->tx_tuna[6] = (u8) (symcalc >> 4); + state->tx_tuna[7] = (u8) (symcalc << 4); + } else { + state->tx_tuna[5] = (u8) (srate >> 16) & 0x7f; + state->tx_tuna[6] = (u8) (srate >> 8); + state->tx_tuna[7] = (u8) srate; + } + state->tx_tuna[8] &= ~0x20; + if (state->type_flags & DST_TYPE_HAS_OBS_REGS) { + if (srate > 8000) + state->tx_tuna[8] |= 0x20; } return 0; } + static int dst_set_modulation(struct dst_state *state, fe_modulation_t modulation) { if (state->dst_type != DST_TYPE_IS_CABLE) - return -EOPNOTSUPP; + return 0; state->modulation = modulation; switch (modulation) { @@ -521,10 +490,7 @@ static int dst_set_modulation(struct dst_state *state, fe_modulation_t modulatio state->tx_tuna[8] = 0x80; break; case QAM_256: - if (!strncmp(state->fw_name, "DCTNEW", 6)) - state->tx_tuna[8] = 0xff; - else if (!strncmp(state->fw_name, "DCT-CI", 6)) - state->tx_tuna[8] = 0x00; + state->tx_tuna[8] = 0x00; break; case QPSK: case QAM_AUTO: @@ -557,19 +523,13 @@ u8 dst_check_sum(u8 *buf, u32 len) } EXPORT_SYMBOL(dst_check_sum); -static void dst_type_flags_print(struct dst_state *state) +static void dst_type_flags_print(u32 type_flags) { - u32 type_flags = state->type_flags; - dprintk(verbose, DST_ERROR, 0, "DST type flags :"); - if (type_flags & DST_TYPE_HAS_TS188) - dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner", DST_TYPE_HAS_TS188); - if (type_flags & DST_TYPE_HAS_NEWTUNE_2) - dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner 2", DST_TYPE_HAS_NEWTUNE_2); + if (type_flags & DST_TYPE_HAS_NEWTUNE) + dprintk(verbose, DST_ERROR, 0, " 0x%x newtuner", DST_TYPE_HAS_NEWTUNE); if (type_flags & DST_TYPE_HAS_TS204) dprintk(verbose, DST_ERROR, 0, " 0x%x ts204", DST_TYPE_HAS_TS204); - if (type_flags & DST_TYPE_HAS_VLF) - dprintk(verbose, DST_ERROR, 0, " 0x%x VLF", DST_TYPE_HAS_VLF); if (type_flags & DST_TYPE_HAS_SYMDIV) dprintk(verbose, DST_ERROR, 0, " 0x%x symdiv", DST_TYPE_HAS_SYMDIV); if (type_flags & DST_TYPE_HAS_FW_1) @@ -582,7 +542,7 @@ static void dst_type_flags_print(struct dst_state *state) } -static int dst_type_print(struct dst_state *state, u8 type) +static int dst_type_print(u8 type) { char *otype; switch (type) { @@ -598,10 +558,6 @@ static int dst_type_print(struct dst_state *state, u8 type) otype = "cable"; break; - case DST_TYPE_IS_ATSC: - otype = "atsc"; - break; - default: dprintk(verbose, DST_INFO, 1, "invalid dst type %d", type); return -EINVAL; @@ -611,127 +567,6 @@ static int dst_type_print(struct dst_state *state, u8 type) return 0; } -struct tuner_types tuner_list[] = { - { - .tuner_type = TUNER_TYPE_L64724, - .tuner_name = "L 64724", - .board_name = "UNKNOWN", - .fw_name = "UNKNOWN" - }, - - { - .tuner_type = TUNER_TYPE_STV0299, - .tuner_name = "STV 0299", - .board_name = "VP1020", - .fw_name = "DST-MOT" - }, - - { - .tuner_type = TUNER_TYPE_STV0299, - .tuner_name = "STV 0299", - .board_name = "VP1020", - .fw_name = "DST-03T" - }, - - { - .tuner_type = TUNER_TYPE_MB86A15, - .tuner_name = "MB 86A15", - .board_name = "VP1022", - .fw_name = "DST-03T" - }, - - { - .tuner_type = TUNER_TYPE_MB86A15, - .tuner_name = "MB 86A15", - .board_name = "VP1025", - .fw_name = "DST-03T" - }, - - { - .tuner_type = TUNER_TYPE_STV0299, - .tuner_name = "STV 0299", - .board_name = "VP1030", - .fw_name = "DST-CI" - }, - - { - .tuner_type = TUNER_TYPE_STV0299, - .tuner_name = "STV 0299", - .board_name = "VP1030", - .fw_name = "DSTMCI" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP2021", - .fw_name = "DCTNEW" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP2030", - .fw_name = "DCT-CI" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP2031", - .fw_name = "DCT-CI" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP2040", - .fw_name = "DCT-CI" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP3020", - .fw_name = "DTTFTA" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP3021", - .fw_name = "DTTFTA" - }, - - { - .tuner_type = TUNER_TYPE_TDA10046, - .tuner_name = "TDA10046", - .board_name = "VP3040", - .fw_name = "DTT-CI" - }, - - { - .tuner_type = TUNER_TYPE_UNKNOWN, - .tuner_name = "UNKNOWN", - .board_name = "VP3051", - .fw_name = "DTTNXT" - }, - - { - .tuner_type = TUNER_TYPE_NXT200x, - .tuner_name = "NXT200x", - .board_name = "VP3220", - .fw_name = "ATSCDI" - }, - - { - .tuner_type = TUNER_TYPE_NXT200x, - .tuner_name = "NXT200x", - .board_name = "VP3250", - .fw_name = "ATSCAD" - }, -}; - /* Known cards list Satellite @@ -773,8 +608,7 @@ static struct dst_types dst_tlist[] = { .offset = 0, .dst_type = DST_TYPE_IS_SAT, .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_OBS_REGS, - .dst_feature = 0, - .tuner_type = 0 + .dst_feature = 0 }, /* obsolete */ { @@ -782,17 +616,15 @@ static struct dst_types dst_tlist[] = { .offset = 0, .dst_type = DST_TYPE_IS_SAT, .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1, - .dst_feature = 0, - .tuner_type = 0 + .dst_feature = 0 }, /* obsolete */ { .device_id = "DST-030", .offset = 0, .dst_type = DST_TYPE_IS_SAT, - .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_1, - .dst_feature = 0, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1, + .dst_feature = 0 }, /* obsolete */ { @@ -801,8 +633,7 @@ static struct dst_types dst_tlist[] = { .dst_type = DST_TYPE_IS_SAT, .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_2, .dst_feature = DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4 | DST_TYPE_HAS_DISEQC5 - | DST_TYPE_HAS_MAC | DST_TYPE_HAS_MOTO, - .tuner_type = TUNER_TYPE_MULTI + | DST_TYPE_HAS_MAC | DST_TYPE_HAS_MOTO }, { @@ -810,63 +641,57 @@ static struct dst_types dst_tlist[] = { .offset = 0, .dst_type = DST_TYPE_IS_SAT, .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1, - .dst_feature = 0, - .tuner_type = 0 + .dst_feature = 0 }, /* obsolete */ { .device_id = "DST-CI", .offset = 1, .dst_type = DST_TYPE_IS_SAT, - .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_FW_1, - .dst_feature = DST_TYPE_HAS_CA, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1, + .dst_feature = DST_TYPE_HAS_CA }, /* An OEM board */ { .device_id = "DSTMCI", .offset = 1, .dst_type = DST_TYPE_IS_SAT, - .type_flags = DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_INC_COUNT | DST_TYPE_HAS_VLF, + .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_INC_COUNT, .dst_feature = DST_TYPE_HAS_CA | DST_TYPE_HAS_DISEQC3 | DST_TYPE_HAS_DISEQC4 - | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC, - .tuner_type = TUNER_TYPE_MULTI + | DST_TYPE_HAS_MOTO | DST_TYPE_HAS_MAC }, { .device_id = "DSTFCI", .offset = 1, .dst_type = DST_TYPE_IS_SAT, - .type_flags = DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_1, - .dst_feature = 0, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1, + .dst_feature = 0 }, /* unknown to vendor */ { .device_id = "DCT-CI", .offset = 1, .dst_type = DST_TYPE_IS_CABLE, - .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_VLF, - .dst_feature = DST_TYPE_HAS_CA, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_1 + | DST_TYPE_HAS_FW_2, + .dst_feature = DST_TYPE_HAS_CA }, { .device_id = "DCTNEW", .offset = 1, .dst_type = DST_TYPE_IS_CABLE, - .type_flags = DST_TYPE_HAS_TS188 | DST_TYPE_HAS_FW_3 | DST_TYPE_HAS_FW_BUILD | DST_TYPE_HAS_MULTI_FE, - .dst_feature = 0, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_3 | DST_TYPE_HAS_FW_BUILD, + .dst_feature = 0 }, { .device_id = "DTT-CI", .offset = 1, .dst_type = DST_TYPE_IS_TERR, - .type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_VLF, - .dst_feature = DST_TYPE_HAS_CA, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_TS204 | DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_MULTI_FE, + .dst_feature = DST_TYPE_HAS_CA }, { @@ -874,8 +699,7 @@ static struct dst_types dst_tlist[] = { .offset = 1, .dst_type = DST_TYPE_IS_TERR, .type_flags = DST_TYPE_HAS_FW_2, - .dst_feature = 0, - .tuner_type = 0 + .dst_feature = 0 }, { @@ -883,8 +707,7 @@ static struct dst_types dst_tlist[] = { .offset = 1, .dst_type = DST_TYPE_IS_TERR, .type_flags = DST_TYPE_HAS_FW_2, - .dst_feature = DST_TYPE_HAS_ANALOG, - .tuner_type = 0 + .dst_feature = DST_TYPE_HAS_ANALOG }, { @@ -892,17 +715,15 @@ static struct dst_types dst_tlist[] = { .offset = 1, .dst_type = DST_TYPE_IS_ATSC, .type_flags = DST_TYPE_HAS_FW_2, - .dst_feature = 0, - .tuner_type = 0 + .dst_feature = 0 }, { .device_id = "ATSCAD", .offset = 1, .dst_type = DST_TYPE_IS_ATSC, - .type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD, - .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG, - .tuner_type = 0 + .type_flags = DST_TYPE_HAS_FW_2, + .dst_feature = 0 }, { } @@ -947,9 +768,6 @@ static int dst_fw_ver(struct dst_state *state) static int dst_card_type(struct dst_state *state) { - int j; - struct tuner_types *p_tuner_list = NULL; - u8 get_type[] = { 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; get_type[7] = dst_check_sum(get_type, 7); if (dst_command(state, get_type, 8) < 0) { @@ -957,17 +775,9 @@ static int dst_card_type(struct dst_state *state) return -1; } memset(&state->card_info, '\0', 8); - memcpy(&state->card_info, &state->rxbuffer, 7); + memcpy(&state->card_info, &state->rxbuffer, 8); dprintk(verbose, DST_ERROR, 1, "Device Model=[%s]", &state->card_info[0]); - for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { - if (!strcmp(&state->card_info[0], p_tuner_list->board_name)) { - state->tuner_type = p_tuner_list->tuner_type; - dprintk(verbose, DST_ERROR, 1, "DST has [%s] tuner, tuner type=[%d]", - p_tuner_list->tuner_name, p_tuner_list->tuner_type); - } - } - return 0; } @@ -980,64 +790,12 @@ static int dst_get_vendor(struct dst_state *state) return -1; } memset(&state->vendor, '\0', 8); - memcpy(&state->vendor, &state->rxbuffer, 7); + memcpy(&state->vendor, &state->rxbuffer, 8); dprintk(verbose, DST_ERROR, 1, "Vendor=[%s]", &state->vendor[0]); return 0; } -static void debug_dst_buffer(struct dst_state *state) -{ - int i; - - if (verbose > 2) { - printk("%s: [", __func__); - for (i = 0; i < 8; i++) - printk(" %02x", state->rxbuffer[i]); - printk("]\n"); - } -} - -static int dst_check_stv0299(struct dst_state *state) -{ - u8 check_stv0299[] = { 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - check_stv0299[7] = dst_check_sum(check_stv0299, 7); - if (dst_command(state, check_stv0299, 8) < 0) { - dprintk(verbose, DST_ERROR, 1, "Cmd=[0x04] failed"); - return -1; - } - debug_dst_buffer(state); - - if (memcmp(&check_stv0299, &state->rxbuffer, 8)) { - dprintk(verbose, DST_ERROR, 1, "Found a STV0299 NIM"); - state->tuner_type = TUNER_TYPE_STV0299; - return 0; - } - - return -1; -} - -static int dst_check_mb86a15(struct dst_state *state) -{ - u8 check_mb86a15[] = { 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - - check_mb86a15[7] = dst_check_sum(check_mb86a15, 7); - if (dst_command(state, check_mb86a15, 8) < 0) { - dprintk(verbose, DST_ERROR, 1, "Cmd=[0x10], failed"); - return -1; - } - debug_dst_buffer(state); - - if (memcmp(&check_mb86a15, &state->rxbuffer, 8) < 0) { - dprintk(verbose, DST_ERROR, 1, "Found a MB86A15 NIM"); - state->tuner_type = TUNER_TYPE_MB86A15; - return 0; - } - - return -1; -} - static int dst_get_tuner_info(struct dst_state *state) { u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -1045,59 +803,60 @@ static int dst_get_tuner_info(struct dst_state *state) get_tuner_1[7] = dst_check_sum(get_tuner_1, 7); get_tuner_2[7] = dst_check_sum(get_tuner_2, 7); - dprintk(verbose, DST_ERROR, 1, "DST TYpe = MULTI FE"); if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { - if (dst_command(state, get_tuner_1, 8) < 0) { - dprintk(verbose, DST_INFO, 1, "Cmd=[0x13], Unsupported"); - goto force; + if (dst_command(state, get_tuner_2, 8) < 0) { + dprintk(verbose, DST_INFO, 1, "Unsupported Command"); + return -1; } } else { - if (dst_command(state, get_tuner_2, 8) < 0) { - dprintk(verbose, DST_INFO, 1, "Cmd=[0xb], Unsupported"); - goto force; + if (dst_command(state, get_tuner_1, 8) < 0) { + dprintk(verbose, DST_INFO, 1, "Unsupported Command"); + return -1; } } memset(&state->board_info, '\0', 8); memcpy(&state->board_info, &state->rxbuffer, 8); if (state->type_flags & DST_TYPE_HAS_MULTI_FE) { - dprintk(verbose, DST_ERROR, 1, "DST type has TS=188"); - } - if (state->board_info[0] == 0xbc) { - if (state->type_flags != DST_TYPE_IS_ATSC) - state->type_flags |= DST_TYPE_HAS_TS188; - else - state->type_flags |= DST_TYPE_HAS_NEWTUNE_2; - - if (state->board_info[1] == 0x01) { - state->dst_hw_cap |= DST_TYPE_HAS_DBOARD; - dprintk(verbose, DST_ERROR, 1, "DST has Daughterboard"); + if (state->board_info[1] == 0x0b) { + if (state->type_flags & DST_TYPE_HAS_TS204) + state->type_flags &= ~DST_TYPE_HAS_TS204; + state->type_flags |= DST_TYPE_HAS_NEWTUNE; + dprintk(verbose, DST_INFO, 1, "DST type has TS=188"); + } else { + if (state->type_flags & DST_TYPE_HAS_NEWTUNE) + state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; + state->type_flags |= DST_TYPE_HAS_TS204; + dprintk(verbose, DST_INFO, 1, "DST type has TS=204"); + } + } else { + if (state->board_info[0] == 0xbc) { + if (state->type_flags & DST_TYPE_HAS_TS204) + state->type_flags &= ~DST_TYPE_HAS_TS204; + state->type_flags |= DST_TYPE_HAS_NEWTUNE; + dprintk(verbose, DST_INFO, 1, "DST type has TS=188, Daughterboard=[%d]", state->board_info[1]); + + } else if (state->board_info[0] == 0xcc) { + if (state->type_flags & DST_TYPE_HAS_NEWTUNE) + state->type_flags &= ~DST_TYPE_HAS_NEWTUNE; + state->type_flags |= DST_TYPE_HAS_TS204; + dprintk(verbose, DST_INFO, 1, "DST type has TS=204 Daughterboard=[%d]", state->board_info[1]); } } return 0; -force: - if (!strncmp(state->fw_name, "DCT-CI", 6)) { - state->type_flags |= DST_TYPE_HAS_TS204; - dprintk(verbose, DST_ERROR, 1, "Forcing [%s] to TS188", state->fw_name); - } - - return -1; } static int dst_get_device_id(struct dst_state *state) { u8 reply; - int i, j; - struct dst_types *p_dst_type = NULL; - struct tuner_types *p_tuner_list = NULL; - + int i; + struct dst_types *p_dst_type; u8 use_dst_type = 0; u32 use_type_flags = 0; static u8 device_type[8] = {0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff}; - state->tuner_type = 0; device_type[7] = dst_check_sum(device_type, 7); if (write_dst(state, device_type, FIXED_COMM)) @@ -1129,34 +888,8 @@ static int dst_get_device_id(struct dst_state *state) /* Card capabilities */ state->dst_hw_cap = p_dst_type->dst_feature; - dprintk(verbose, DST_ERROR, 1, "Recognise [%s]", p_dst_type->device_id); - strncpy(&state->fw_name[0], p_dst_type->device_id, 6); - /* Multiple tuners */ - if (p_dst_type->tuner_type & TUNER_TYPE_MULTI) { - switch (use_dst_type) { - case DST_TYPE_IS_SAT: - /* STV0299 check */ - if (dst_check_stv0299(state) < 0) { - dprintk(verbose, DST_ERROR, 1, "Unsupported"); - state->tuner_type = TUNER_TYPE_MB86A15; - } - break; - default: - break; - } - if (dst_check_mb86a15(state) < 0) - dprintk(verbose, DST_ERROR, 1, "Unsupported"); - /* Single tuner */ - } else { - state->tuner_type = p_dst_type->tuner_type; - } - for (j = 0, p_tuner_list = tuner_list; j < ARRAY_SIZE(tuner_list); j++, p_tuner_list++) { - if (!(strncmp(p_dst_type->device_id, p_tuner_list->fw_name, 7)) && - p_tuner_list->tuner_type == state->tuner_type) { - dprintk(verbose, DST_ERROR, 1, "[%s] has a [%s]", - p_dst_type->device_id, p_tuner_list->tuner_name); - } - } + dprintk(verbose, DST_ERROR, 1, "Recognise [%s]\n", p_dst_type->device_id); + break; } } @@ -1167,10 +900,10 @@ static int dst_get_device_id(struct dst_state *state) use_dst_type = DST_TYPE_IS_SAT; use_type_flags = DST_TYPE_HAS_SYMDIV; } - dst_type_print(state, use_dst_type); + dst_type_print(use_dst_type); state->type_flags = use_type_flags; state->dst_type = use_dst_type; - dst_type_flags_print(state); + dst_type_flags_print(state->type_flags); return 0; } @@ -1178,15 +911,15 @@ static int dst_get_device_id(struct dst_state *state) static int dst_probe(struct dst_state *state) { mutex_init(&state->dst_mutex); - if (dst_addons & DST_TYPE_HAS_CA) { - if ((rdc_8820_reset(state)) < 0) { - dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed."); - return -1; - } + if ((rdc_8820_reset(state)) < 0) { + dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed."); + return -1; + } + if (dst_addons & DST_TYPE_HAS_CA) msleep(4000); - } else { + else msleep(100); - } + if ((dst_comm_init(state)) < 0) { dprintk(verbose, DST_ERROR, 1, "DST Initialization Failed."); return -1; @@ -1198,6 +931,7 @@ static int dst_probe(struct dst_state *state) } if (dst_get_mac(state) < 0) { dprintk(verbose, DST_INFO, 1, "MAC: Unsupported command"); + return 0; } if ((state->type_flags & DST_TYPE_HAS_MULTI_FE) || (state->type_flags & DST_TYPE_HAS_FW_BUILD)) { if (dst_get_tuner_info(state) < 0) @@ -1234,7 +968,7 @@ int dst_command(struct dst_state *state, u8 *data, u8 len) goto error; } if (write_dst(state, data, len)) { - dprintk(verbose, DST_INFO, 1, "Trying to recover.. "); + dprintk(verbose, DST_INFO, 1, "Tring to recover.. "); if ((dst_error_recovery(state)) < 0) { dprintk(verbose, DST_ERROR, 1, "Recovery Failed."); goto error; @@ -1314,10 +1048,6 @@ static int dst_get_signal(struct dst_state *state) state->decode_lock = (state->rxbuffer[1]) ? 1 : 0; state->decode_strength = state->rxbuffer[4] << 8; state->decode_snr = state->rxbuffer[3] << 8; - } else if (state->dst_type == DST_TYPE_IS_ATSC) { - state->decode_lock = (state->rxbuffer[6] == 0x00) ? 1 : 0; - state->decode_strength = state->rxbuffer[4] << 8; - state->decode_snr = state->rxbuffer[2] << 8 | state->rxbuffer[3]; } state->cur_jiff = jiffies; } @@ -1328,13 +1058,15 @@ static int dst_tone_power_cmd(struct dst_state *state) { u8 paket[8] = { 0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00 }; - if (state->dst_type != DST_TYPE_IS_SAT) - return -EOPNOTSUPP; + if (state->dst_type == DST_TYPE_IS_TERR) + return 0; paket[4] = state->tx_tuna[4]; paket[2] = state->tx_tuna[2]; paket[3] = state->tx_tuna[3]; paket[7] = dst_check_sum (paket, 7); - return dst_command(state, paket, 8); + dst_command(state, paket, 8); + + return 0; } static int dst_get_tuna(struct dst_state *state) @@ -1346,9 +1078,8 @@ static int dst_get_tuna(struct dst_state *state) state->diseq_flags &= ~(HAS_LOCK); if (!dst_wait_dst_ready(state, NO_DELAY)) return -EIO; - if ((state->type_flags & DST_TYPE_HAS_VLF) && - !(state->dst_type == DST_TYPE_IS_ATSC)) - + if (state->type_flags & DST_TYPE_HAS_NEWTUNE) + /* how to get variable length reply ???? */ retval = read_dst(state, state->rx_tuna, 10); else retval = read_dst(state, &state->rx_tuna[2], FIXED_COMM); @@ -1356,10 +1087,7 @@ static int dst_get_tuna(struct dst_state *state) dprintk(verbose, DST_DEBUG, 1, "read not successful"); return retval; } - if ((state->type_flags & DST_TYPE_HAS_VLF) && - !(state->dst_type == DST_TYPE_IS_CABLE) && - !(state->dst_type == DST_TYPE_IS_ATSC)) { - + if (state->type_flags & DST_TYPE_HAS_NEWTUNE) { if (state->rx_tuna[9] != dst_check_sum(&state->rx_tuna[0], 9)) { dprintk(verbose, DST_INFO, 1, "checksum failure ? "); return -EIO; @@ -1405,10 +1133,7 @@ static int dst_write_tuna(struct dvb_frontend *fe) dprintk(verbose, DST_DEBUG, 1, "DST Communication initialization failed."); goto error; } -// if (state->type_flags & DST_TYPE_HAS_NEWTUNE) { - if ((state->type_flags & DST_TYPE_HAS_VLF) && - (!(state->dst_type == DST_TYPE_IS_ATSC))) { - + if (state->type_flags & DST_TYPE_HAS_NEWTUNE) { state->tx_tuna[9] = dst_check_sum(&state->tx_tuna[0], 9); retval = write_dst(state, &state->tx_tuna[0], 10); } else { @@ -1463,25 +1188,23 @@ static int dst_set_diseqc(struct dvb_frontend *fe, struct dvb_diseqc_master_cmd u8 paket[8] = { 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec }; if (state->dst_type != DST_TYPE_IS_SAT) - return -EOPNOTSUPP; - if (cmd->msg_len > 0 && cmd->msg_len < 5) - memcpy(&paket[3], cmd->msg, cmd->msg_len); - else if (cmd->msg_len == 5 && state->dst_hw_cap & DST_TYPE_HAS_DISEQC5) - memcpy(&paket[2], cmd->msg, cmd->msg_len); - else + return 0; + if (cmd->msg_len == 0 || cmd->msg_len > 4) return -EINVAL; + memcpy(&paket[3], cmd->msg, cmd->msg_len); paket[7] = dst_check_sum(&paket[0], 7); - return dst_command(state, paket, 8); + dst_command(state, paket, 8); + return 0; } static int dst_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) { - int need_cmd, retval = 0; + int need_cmd; struct dst_state *state = fe->demodulator_priv; state->voltage = voltage; if (state->dst_type != DST_TYPE_IS_SAT) - return -EOPNOTSUPP; + return 0; need_cmd = 0; @@ -1503,9 +1226,9 @@ static int dst_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) } if (need_cmd) - retval = dst_tone_power_cmd(state); + dst_tone_power_cmd(state); - return retval; + return 0; } static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) @@ -1514,7 +1237,7 @@ static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) state->tone = tone; if (state->dst_type != DST_TYPE_IS_SAT) - return -EOPNOTSUPP; + return 0; switch (tone) { case SEC_TONE_OFF: @@ -1530,7 +1253,9 @@ static int dst_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) default: return -EINVAL; } - return dst_tone_power_cmd(state); + dst_tone_power_cmd(state); + + return 0; } static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) @@ -1538,7 +1263,7 @@ static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) struct dst_state *state = fe->demodulator_priv; if (state->dst_type != DST_TYPE_IS_SAT) - return -EOPNOTSUPP; + return 0; state->minicmd = minicmd; switch (minicmd) { case SEC_MINI_A: @@ -1548,7 +1273,9 @@ static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) state->tx_tuna[3] = 0xff; break; } - return dst_tone_power_cmd(state); + dst_tone_power_cmd(state); + + return 0; } @@ -1560,9 +1287,8 @@ static int dst_init(struct dvb_frontend *fe) static u8 sat_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x55, 0xbd, 0x50, 0x00, 0x00 }; static u8 ter_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; static u8 ter_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; - static u8 cab_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; static u8 cab_tuna_204[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; - static u8 atsc_tuner[] = { 0x00, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; + static u8 cab_tuna_188[] = { 0x09, 0x00, 0x03, 0xb6, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00 }; state->inversion = INVERSION_OFF; state->voltage = SEC_VOLTAGE_13; @@ -1572,13 +1298,11 @@ static int dst_init(struct dvb_frontend *fe) state->bandwidth = BANDWIDTH_7_MHZ; state->cur_jiff = jiffies; if (state->dst_type == DST_TYPE_IS_SAT) - memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? sat_tuna_188 : sat_tuna_204), sizeof (sat_tuna_204)); + memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_NEWTUNE) ? sat_tuna_188 : sat_tuna_204), sizeof (sat_tuna_204)); else if (state->dst_type == DST_TYPE_IS_TERR) - memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? ter_tuna_188 : ter_tuna_204), sizeof (ter_tuna_204)); + memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_NEWTUNE) ? ter_tuna_188 : ter_tuna_204), sizeof (ter_tuna_204)); else if (state->dst_type == DST_TYPE_IS_CABLE) - memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_VLF) ? cab_tuna_188 : cab_tuna_204), sizeof (cab_tuna_204)); - else if (state->dst_type == DST_TYPE_IS_ATSC) - memcpy(state->tx_tuna, atsc_tuner, sizeof (atsc_tuner)); + memcpy(state->tx_tuna, ((state->type_flags & DST_TYPE_HAS_NEWTUNE) ? cab_tuna_188 : cab_tuna_204), sizeof (cab_tuna_204)); return 0; } @@ -1601,55 +1325,23 @@ static int dst_read_signal_strength(struct dvb_frontend *fe, u16 *strength) { struct dst_state *state = fe->demodulator_priv; - int retval = dst_get_signal(state); + dst_get_signal(state); *strength = state->decode_strength; - return retval; + return 0; } static int dst_read_snr(struct dvb_frontend *fe, u16 *snr) { struct dst_state *state = fe->demodulator_priv; - int retval = dst_get_signal(state); + dst_get_signal(state); *snr = state->decode_snr; - return retval; -} - -static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) -{ - int retval = -EINVAL; - struct dst_state *state = fe->demodulator_priv; - - if (p != NULL) { - retval = dst_set_freq(state, p->frequency); - if(retval != 0) - return retval; - dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency); - - if (state->dst_type == DST_TYPE_IS_SAT) { - if (state->type_flags & DST_TYPE_HAS_OBS_REGS) - dst_set_inversion(state, p->inversion); - dst_set_fec(state, p->u.qpsk.fec_inner); - dst_set_symbolrate(state, p->u.qpsk.symbol_rate); - dst_set_polarization(state); - dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate); - - } else if (state->dst_type == DST_TYPE_IS_TERR) - dst_set_bandwidth(state, p->u.ofdm.bandwidth); - else if (state->dst_type == DST_TYPE_IS_CABLE) { - dst_set_fec(state, p->u.qam.fec_inner); - dst_set_symbolrate(state, p->u.qam.symbol_rate); - dst_set_modulation(state, p->u.qam.modulation); - } - retval = dst_write_tuna(fe); - } - - return retval; + return 0; } -static int dst_tune_frontend(struct dvb_frontend* fe, +static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters* p, unsigned int mode_flags, int *delay, @@ -1686,11 +1378,6 @@ static int dst_tune_frontend(struct dvb_frontend* fe, return 0; } -static int dst_get_tuning_algo(struct dvb_frontend *fe) -{ - return dst_algo; -} - static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) { struct dst_state *state = fe->demodulator_priv; @@ -1721,7 +1408,6 @@ static void dst_release(struct dvb_frontend *fe) static struct dvb_frontend_ops dst_dvbt_ops; static struct dvb_frontend_ops dst_dvbs_ops; static struct dvb_frontend_ops dst_dvbc_ops; -static struct dvb_frontend_ops dst_atsc_ops; struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter) { @@ -1731,25 +1417,24 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad return NULL; } /* determine settings based on type */ - /* create dvb_frontend */ switch (state->dst_type) { case DST_TYPE_IS_TERR: - memcpy(&state->frontend.ops, &dst_dvbt_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&state->ops, &dst_dvbt_ops, sizeof(struct dvb_frontend_ops)); break; case DST_TYPE_IS_CABLE: - memcpy(&state->frontend.ops, &dst_dvbc_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&state->ops, &dst_dvbc_ops, sizeof(struct dvb_frontend_ops)); break; case DST_TYPE_IS_SAT: - memcpy(&state->frontend.ops, &dst_dvbs_ops, sizeof(struct dvb_frontend_ops)); - break; - case DST_TYPE_IS_ATSC: - memcpy(&state->frontend.ops, &dst_atsc_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&state->ops, &dst_dvbs_ops, sizeof(struct dvb_frontend_ops)); break; default: dprintk(verbose, DST_ERROR, 1, "unknown DST type. please report to the LinuxTV.org DVB mailinglist."); kfree(state); return NULL; } + + /* create dvb_frontend */ + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return state; /* Manu (DST is a card not a frontend) */ @@ -1770,10 +1455,8 @@ static struct dvb_frontend_ops dst_dvbt_ops = { .release = dst_release, .init = dst_init, - .tune = dst_tune_frontend, - .set_frontend = dst_set_frontend, + .tune = dst_set_frontend, .get_frontend = dst_get_frontend, - .get_frontend_algo = dst_get_tuning_algo, .read_status = dst_read_status, .read_signal_strength = dst_read_signal_strength, .read_snr = dst_read_snr, @@ -1796,10 +1479,8 @@ static struct dvb_frontend_ops dst_dvbs_ops = { .release = dst_release, .init = dst_init, - .tune = dst_tune_frontend, - .set_frontend = dst_set_frontend, + .tune = dst_set_frontend, .get_frontend = dst_get_frontend, - .get_frontend_algo = dst_get_tuning_algo, .read_status = dst_read_status, .read_signal_strength = dst_read_signal_strength, .read_snr = dst_read_snr, @@ -1825,38 +1506,13 @@ static struct dvb_frontend_ops dst_dvbc_ops = { .release = dst_release, .init = dst_init, - .tune = dst_tune_frontend, - .set_frontend = dst_set_frontend, - .get_frontend = dst_get_frontend, - .get_frontend_algo = dst_get_tuning_algo, - .read_status = dst_read_status, - .read_signal_strength = dst_read_signal_strength, - .read_snr = dst_read_snr, -}; - -static struct dvb_frontend_ops dst_atsc_ops = { - .info = { - .name = "DST ATSC", - .type = FE_ATSC, - .frequency_stepsize = 62500, - .frequency_min = 510000000, - .frequency_max = 858000000, - .symbol_rate_min = 1000000, - .symbol_rate_max = 45000000, - .caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO | FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB - }, - - .release = dst_release, - .init = dst_init, - .tune = dst_tune_frontend, - .set_frontend = dst_set_frontend, + .tune = dst_set_frontend, .get_frontend = dst_get_frontend, - .get_frontend_algo = dst_get_tuning_algo, .read_status = dst_read_status, .read_signal_strength = dst_read_signal_strength, .read_snr = dst_read_snr, }; -MODULE_DESCRIPTION("DST DVB-S/T/C/ATSC Combo Frontend driver"); +MODULE_DESCRIPTION("DST DVB-S/T/C Combo Frontend driver"); MODULE_AUTHOR("Jamie Honan, Manu Abraham"); MODULE_LICENSE("GPL"); diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c index fa923b9b3..f6b49a801 100644 --- a/drivers/media/dvb/bt8xx/dst_ca.c +++ b/drivers/media/dvb/bt8xx/dst_ca.c @@ -68,13 +68,6 @@ static int ca_set_pid(void) return -EOPNOTSUPP; } -static void put_command_and_length(u8 *data, int command, int length) -{ - data[0] = (command >> 16) & 0xff; - data[1] = (command >> 8) & 0xff; - data[2] = command & 0xff; - data[3] = length; -} static void put_checksum(u8 *check_string, int length) { @@ -131,18 +124,15 @@ static int dst_put_ci(struct dst_state *state, u8 *data, int len, u8 *ca_string, u8 dst_ca_comm_err = 0; while (dst_ca_comm_err < RETRIES) { + dst_comm_init(state); dprintk(verbose, DST_CA_NOTICE, 1, " Put Command"); if (dst_ci_command(state, data, ca_string, len, read)) { // If error dst_error_recovery(state); dst_ca_comm_err++; // work required here. - } else { - break; } + break; } - if(dst_ca_comm_err == RETRIES) - return -1; - return 0; } @@ -150,7 +140,6 @@ static int dst_put_ci(struct dst_state *state, u8 *data, int len, u8 *ca_string, static int ca_get_app_info(struct dst_state *state) { - int length, str_length; static u8 command[8] = {0x07, 0x40, 0x01, 0x00, 0x01, 0x00, 0x00, 0xff}; put_checksum(&command[0], command[0]); @@ -165,68 +154,6 @@ static int ca_get_app_info(struct dst_state *state) (state->messages[10] << 8) | state->messages[11], __FUNCTION__, (char *)(&state->messages[12])); dprintk(verbose, DST_CA_INFO, 1, " =================================================================================================="); - // Transform dst message to correct application_info message - length = state->messages[5]; - str_length = length - 6; - if (str_length < 0) { - str_length = 0; - dprintk(verbose, DST_CA_ERROR, 1, "Invalid string length returned in ca_get_app_info(). Recovering."); - } - - // First, the command and length fields - put_command_and_length(&state->messages[0], CA_APP_INFO, length); - - // Copy application_type, application_manufacturer and manufacturer_code - memcpy(&state->messages[4], &state->messages[7], 5); - - // Set string length and copy string - state->messages[9] = str_length; - memcpy(&state->messages[10], &state->messages[12], str_length); - - return 0; -} - -static int ca_get_ca_info(struct dst_state *state) -{ - int srcPtr, dstPtr, i, num_ids; - static u8 slot_command[8] = {0x07, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0xff}; - const int in_system_id_pos = 8, out_system_id_pos = 4, in_num_ids_pos = 7; - - put_checksum(&slot_command[0], slot_command[0]); - if ((dst_put_ci(state, slot_command, sizeof (slot_command), state->messages, GET_REPLY)) < 0) { - dprintk(verbose, DST_CA_ERROR, 1, " -->dst_put_ci FAILED !"); - return -1; - } - dprintk(verbose, DST_CA_INFO, 1, " -->dst_put_ci SUCCESS !"); - - // Print raw data - dprintk(verbose, DST_CA_INFO, 0, " DST data = ["); - for (i = 0; i < state->messages[0] + 1; i++) { - dprintk(verbose, DST_CA_INFO, 0, " 0x%02x", state->messages[i]); - } - dprintk(verbose, DST_CA_INFO, 0, "]\n"); - - // Set the command and length of the output - num_ids = state->messages[in_num_ids_pos]; - if (num_ids >= 100) { - num_ids = 100; - dprintk(verbose, DST_CA_ERROR, 1, "Invalid number of ids (>100). Recovering."); - } - put_command_and_length(&state->messages[0], CA_INFO, num_ids * 2); - - dprintk(verbose, DST_CA_INFO, 0, " CA_INFO = ["); - srcPtr = in_system_id_pos; - dstPtr = out_system_id_pos; - for(i = 0; i < num_ids; i++) { - dprintk(verbose, DST_CA_INFO, 0, " 0x%02x%02x", state->messages[srcPtr + 0], state->messages[srcPtr + 1]); - // Append to output - state->messages[dstPtr + 0] = state->messages[srcPtr + 0]; - state->messages[dstPtr + 1] = state->messages[srcPtr + 1]; - srcPtr += 2; - dstPtr += 2; - } - dprintk(verbose, DST_CA_INFO, 0, "]\n"); - return 0; } @@ -247,7 +174,7 @@ static int ca_get_slot_caps(struct dst_state *state, struct ca_caps *p_ca_caps, dprintk(verbose, DST_CA_INFO, 1, " Slot cap = [%d]", slot_cap[7]); dprintk(verbose, DST_CA_INFO, 0, "===================================\n"); - for (i = 0; i < slot_cap[0] + 1; i++) + for (i = 0; i < 8; i++) dprintk(verbose, DST_CA_INFO, 0, " %d", slot_cap[i]); dprintk(verbose, DST_CA_INFO, 0, "\n"); @@ -333,11 +260,6 @@ static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) return -EFAULT; break; - case CA_INFO: - memcpy(p_ca_message->msg, state->messages, 128); - if (copy_to_user(arg, p_ca_message, sizeof (struct ca_msg)) ) - return -EFAULT; - break; } } @@ -380,7 +302,7 @@ static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 l rdc_reset_state(state); return -1; } - dprintk(verbose, DST_CA_NOTICE, 1, " DST-CI Command success."); + dprintk(verbose, DST_CA_NOTICE, 1, " DST-CI Command succes."); return 0; } @@ -418,7 +340,6 @@ static int debug_string(u8 *msg, u32 length, u32 offset) return 0; } - static int ca_set_pmt(struct dst_state *state, struct ca_msg *p_ca_message, struct ca_msg *hw_buffer, u8 reply, u8 query) { u32 length = 0; @@ -534,16 +455,6 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, } dprintk(verbose, DST_CA_INFO, 1, " -->CA_APP_INFO_ENQUIRY Success !"); break; - case CA_INFO_ENQUIRY: - dprintk(verbose, DST_CA_INFO, 1, " Getting CA Information"); - - if ((ca_get_ca_info(state)) < 0) { - dprintk(verbose, DST_CA_ERROR, 1, " -->CA_INFO_ENQUIRY Failed !"); - result = -1; - goto free_mem_and_exit; - } - dprintk(verbose, DST_CA_INFO, 1, " -->CA_INFO_ENQUIRY Success !"); - break; } } free_mem_and_exit: @@ -562,15 +473,18 @@ static int dst_ca_ioctl(struct inode *inode, struct file *file, unsigned int cmd void __user *arg = (void __user *)ioctl_arg; int result = 0; - p_ca_message = kmalloc(sizeof (struct ca_msg), GFP_KERNEL); - p_ca_slot_info = kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL); - p_ca_caps = kmalloc(sizeof (struct ca_caps), GFP_KERNEL); - if (!p_ca_message || !p_ca_slot_info || !p_ca_caps) { + if ((p_ca_message = (struct ca_msg *) kmalloc(sizeof (struct ca_msg), GFP_KERNEL)) == NULL) { dprintk(verbose, DST_CA_ERROR, 1, " Memory allocation failure"); - result = -ENOMEM; - goto free_mem_and_exit; + return -ENOMEM; + } + if ((p_ca_slot_info = (struct ca_slot_info *) kmalloc(sizeof (struct ca_slot_info), GFP_KERNEL)) == NULL) { + dprintk(verbose, DST_CA_ERROR, 1, " Memory allocation failure"); + return -ENOMEM; + } + if ((p_ca_caps = (struct ca_caps *) kmalloc(sizeof (struct ca_caps), GFP_KERNEL)) == NULL) { + dprintk(verbose, DST_CA_ERROR, 1, " Memory allocation failure"); + return -ENOMEM; } - /* We have now only the standard ioctl's, the driver is upposed to handle internals. */ switch (cmd) { case CA_SEND_MSG: @@ -668,7 +582,7 @@ static int dst_ca_release(struct inode *inode, struct file *file) static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) { - ssize_t bytes_read = 0; + int bytes_read = 0; dprintk(verbose, DST_CA_DEBUG, 1, " Device read."); diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h index 0677b047b..51d4e0437 100644 --- a/drivers/media/dvb/bt8xx/dst_common.h +++ b/drivers/media/dvb/bt8xx/dst_common.h @@ -42,7 +42,7 @@ #define DST_TYPE_IS_CABLE 2 #define DST_TYPE_IS_ATSC 3 -#define DST_TYPE_HAS_TS188 1 +#define DST_TYPE_HAS_NEWTUNE 1 #define DST_TYPE_HAS_TS204 2 #define DST_TYPE_HAS_SYMDIV 4 #define DST_TYPE_HAS_FW_1 8 @@ -52,9 +52,6 @@ #define DST_TYPE_HAS_OBS_REGS 128 #define DST_TYPE_HAS_INC_COUNT 256 #define DST_TYPE_HAS_MULTI_FE 512 -#define DST_TYPE_HAS_NEWTUNE_2 1024 -#define DST_TYPE_HAS_DBOARD 2048 -#define DST_TYPE_HAS_VLF 4096 /* Card capability list */ @@ -67,20 +64,6 @@ #define DST_TYPE_HAS_ANALOG 64 /* Analog inputs */ #define DST_TYPE_HAS_SESSION 128 -#define TUNER_TYPE_MULTI 1 -#define TUNER_TYPE_UNKNOWN 2 -/* DVB-S */ -#define TUNER_TYPE_L64724 4 -#define TUNER_TYPE_STV0299 8 -#define TUNER_TYPE_MB86A15 16 - -/* DVB-T */ -#define TUNER_TYPE_TDA10046 32 - -/* ATSC */ -#define TUNER_TYPE_NXT200x 64 - - #define RDC_8820_PIO_0_DISABLE 0 #define RDC_8820_PIO_0_ENABLE 1 #define RDC_8820_INT 2 @@ -101,6 +84,8 @@ struct dst_state { struct bt878* bt; + struct dvb_frontend_ops ops; + /* configuration settings */ const struct dst_config* config; @@ -136,17 +121,8 @@ struct dst_state { u8 card_info[8]; u8 vendor[8]; u8 board_info[8]; - u32 tuner_type; - char *tuner_name; - struct mutex dst_mutex; - u8 fw_name[8]; -}; -struct tuner_types { - u32 tuner_type; - char *tuner_name; - char *board_name; - char *fw_name; + struct mutex dst_mutex; }; struct dst_types { @@ -155,7 +131,6 @@ struct dst_types { u8 dst_type; u32 type_flags; u32 dst_feature; - u32 tuner_type; }; struct dst_config diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index b715b972d..0bcaa358c 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -147,15 +147,12 @@ static int thomson_dtt7579_demod_init(struct dvb_frontend* fe) return 0; } -static int thomson_dtt7579_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) +static int thomson_dtt7579_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; unsigned char bs = 0; unsigned char cp = 0; - if (buf_len < 5) - return -EINVAL; - div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; if (params->frequency < 542000000) @@ -172,25 +169,27 @@ static int thomson_dtt7579_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_f else bs = 0x08; - pllbuf[0] = 0x60; + pllbuf[0] = 0xc0; // Note: non-linux standard PLL i2c address pllbuf[1] = div >> 8; pllbuf[2] = div & 0xff; pllbuf[3] = cp; pllbuf[4] = bs; - return 5; + return 0; } static struct mt352_config thomson_dtt7579_config = { .demod_address = 0x0f, .demod_init = thomson_dtt7579_demod_init, + .pll_set = thomson_dtt7579_pll_set, }; static struct zl10353_config thomson_dtt7579_zl10353_config = { .demod_address = 0x0f, + .pll_set = thomson_dtt7579_pll_set, }; -static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int cx24108_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { u32 freq = params->frequency; @@ -243,7 +242,7 @@ static int cx24108_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend return 0; } -static int pinnsat_tuner_init(struct dvb_frontend* fe) +static int pinnsat_pll_init(struct dvb_frontend* fe) { struct dvb_bt8xx_card *card = fe->dvb->priv; @@ -253,7 +252,7 @@ static int pinnsat_tuner_init(struct dvb_frontend* fe) return 0; } -static int pinnsat_tuner_sleep(struct dvb_frontend* fe) +static int pinnsat_pll_sleep(struct dvb_frontend* fe) { struct dvb_bt8xx_card *card = fe->dvb->priv; @@ -264,9 +263,12 @@ static int pinnsat_tuner_sleep(struct dvb_frontend* fe) static struct cx24110_config pctvsat_config = { .demod_address = 0x55, + .pll_init = pinnsat_pll_init, + .pll_set = cx24108_pll_set, + .pll_sleep = pinnsat_pll_sleep, }; -static int microtune_mt7202dtf_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int microtune_mt7202dtf_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; u8 cfg, cpump, band_select; @@ -300,8 +302,6 @@ static int microtune_mt7202dtf_tuner_set_params(struct dvb_frontend* fe, struct data[2] = ((div >> 10) & 0x60) | cfg; data[3] = (cpump << 6) | band_select; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(card->i2c_adapter, &msg, 1); return (div * 166666 - 36000000); } @@ -315,6 +315,7 @@ static int microtune_mt7202dtf_request_firmware(struct dvb_frontend* fe, const s static struct sp887x_config microtune_mt7202dtf_config = { .demod_address = 0x70, + .pll_set = microtune_mt7202dtf_pll_set, .request_firmware = microtune_mt7202dtf_request_firmware, }; @@ -341,14 +342,12 @@ static int advbt771_samsung_tdtc9251dh0_demod_init(struct dvb_frontend* fe) return 0; } -static int advbt771_samsung_tdtc9251dh0_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) +static int advbt771_samsung_tdtc9251dh0_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; unsigned char bs = 0; unsigned char cp = 0; - if (buf_len < 5) return -EINVAL; - div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; if (params->frequency < 150000000) @@ -389,18 +388,19 @@ static int advbt771_samsung_tdtc9251dh0_tuner_calc_regs(struct dvb_frontend* fe, else bs = 0x08; - pllbuf[0] = 0x61; + pllbuf[0] = 0xc2; // Note: non-linux standard PLL i2c address pllbuf[1] = div >> 8; pllbuf[2] = div & 0xff; pllbuf[3] = cp; pllbuf[4] = bs; - return 5; + return 0; } static struct mt352_config advbt771_samsung_tdtc9251dh0_config = { .demod_address = 0x0f, .demod_init = advbt771_samsung_tdtc9251dh0_demod_init, + .pll_set = advbt771_samsung_tdtc9251dh0_pll_set, }; static struct dst_config dst_config = { @@ -460,7 +460,7 @@ static struct or51211_config or51211_config = { .sleep = or51211_sleep, }; -static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int vp3021_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; u8 buf[4]; @@ -483,8 +483,6 @@ static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend* fe, struct dv else return -EINVAL; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(card->i2c_adapter, &msg, 1); return 0; } @@ -492,6 +490,7 @@ static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend* fe, struct dv static struct nxt6000_config vp3021_alps_tded4_config = { .demod_address = 0x0a, .clock_inversion = 1, + .pll_set = vp3021_alps_tded4_pll_set, }; static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) @@ -512,17 +511,14 @@ static int digitv_alps_tded4_demod_init(struct dvb_frontend* fe) return 0; } -static int digitv_alps_tded4_tuner_calc_regs(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf, int buf_len) +static int digitv_alps_tded4_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf) { u32 div; struct dvb_ofdm_parameters *op = ¶ms->u.ofdm; - if (buf_len < 5) - return -EINVAL; - div = (((params->frequency + 83333) * 3) / 500000) + IF_FREQUENCYx6; - pllbuf[0] = 0x61; + pllbuf[0] = 0xc2; pllbuf[1] = (div >> 8) & 0x7F; pllbuf[2] = div & 0xFF; pllbuf[3] = 0x85; @@ -539,7 +535,7 @@ static int digitv_alps_tded4_tuner_calc_regs(struct dvb_frontend* fe, struct dvb if (op->bandwidth == 8) pllbuf[4] |= 0x04; - return 5; + return 0; } static void digitv_alps_tded4_reset(struct dvb_bt8xx_card *bt) @@ -566,18 +562,43 @@ static void digitv_alps_tded4_reset(struct dvb_bt8xx_card *bt) static struct mt352_config digitv_alps_tded4_config = { .demod_address = 0x0a, .demod_init = digitv_alps_tded4_demod_init, + .pll_set = digitv_alps_tded4_pll_set, }; -static int tdvs_tua6034_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; - return lg_h06xf_pll_set(fe, card->i2c_adapter, params); + u8 buf[4]; + struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; + int err; + + dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0); + dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", + __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); + if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) { + printk(KERN_WARNING "dvb-bt8xx: %s error " + "(addr %02x <- %02x, err = %i)\n", + __FUNCTION__, buf[0], buf[1], err); + if (err < 0) + return err; + else + return -EREMOTEIO; + } + + /* Set the Auxiliary Byte. */ + buf[2] &= ~0x20; + buf[2] |= 0x18; + buf[3] = 0x50; + i2c_transfer(card->i2c_adapter, &msg, 1); + + return 0; } static struct lgdt330x_config tdvs_tua6034_config = { .demod_address = 0x0e, .demod_chip = LGDT3303, .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ + .pll_set = tdvs_tua6034_pll_set, }; static void lgdt330x_reset(struct dvb_bt8xx_card *bt) @@ -607,19 +628,16 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) card->i2c_adapter); if (card->fe != NULL) { - card->fe->ops.tuner_ops.calc_regs = thomson_dtt7579_tuner_calc_regs; - card->fe->ops.info.frequency_min = 174000000; - card->fe->ops.info.frequency_max = 862000000; + card->fe->ops->info.frequency_min = 174000000; + card->fe->ops->info.frequency_max = 862000000; } break; case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE: lgdt330x_reset(card); card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter); - if (card->fe != NULL) { - card->fe->ops.tuner_ops.set_params = tdvs_tua6034_tuner_set_params; + if (card->fe != NULL) dprintk ("dvb_bt8xx: lgdt330x detected\n"); - } break; case BTTV_BOARD_NEBULA_DIGITV: @@ -632,7 +650,6 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) digitv_alps_tded4_reset(card); card->fe = nxt6000_attach(&vp3021_alps_tded4_config, card->i2c_adapter); if (card->fe != NULL) { - card->fe->ops.tuner_ops.set_params = vp3021_alps_tded4_tuner_set_params; dprintk ("dvb_bt8xx: an nxt6000 was detected on your digitv card\n"); break; } @@ -641,25 +658,19 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) digitv_alps_tded4_reset(card); card->fe = mt352_attach(&digitv_alps_tded4_config, card->i2c_adapter); - if (card->fe != NULL) { - card->fe->ops.tuner_ops.calc_regs = digitv_alps_tded4_tuner_calc_regs; + if (card->fe != NULL) dprintk ("dvb_bt8xx: an mt352 was detected on your digitv card\n"); - } break; case BTTV_BOARD_AVDVBT_761: card->fe = sp887x_attach(µtune_mt7202dtf_config, card->i2c_adapter); - if (card->fe) { - card->fe->ops.tuner_ops.set_params = microtune_mt7202dtf_tuner_set_params; - } break; case BTTV_BOARD_AVDVBT_771: card->fe = mt352_attach(&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter); if (card->fe != NULL) { - card->fe->ops.tuner_ops.calc_regs = advbt771_samsung_tdtc9251dh0_tuner_calc_regs; - card->fe->ops.info.frequency_min = 174000000; - card->fe->ops.info.frequency_max = 862000000; + card->fe->ops->info.frequency_min = 174000000; + card->fe->ops->info.frequency_max = 862000000; } break; @@ -686,11 +697,6 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) case BTTV_BOARD_PINNACLESAT: card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter); - if (card->fe) { - card->fe->ops.tuner_ops.init = pinnsat_tuner_init; - card->fe->ops.tuner_ops.sleep = pinnsat_tuner_sleep; - card->fe->ops.tuner_ops.set_params = cx24108_tuner_set_params; - } break; case BTTV_BOARD_PC_HDTV: @@ -707,8 +713,8 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) else if (dvb_register_frontend(&card->dvb_adapter, card->fe)) { printk("dvb-bt8xx: Frontend registration failed!\n"); - if (card->fe->ops.release) - card->fe->ops.release(card->fe); + if (card->fe->ops->release) + card->fe->ops->release(card->fe); card->fe = NULL; } } @@ -717,7 +723,7 @@ static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) { int result; - if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE, &card->bt->dev->dev)) < 0) { + if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name, THIS_MODULE)) < 0) { printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result); return result; } diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/drivers/media/dvb/bt8xx/dvb-bt8xx.h index 4745a9017..e41066ae7 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.h +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.h @@ -37,7 +37,6 @@ #include "cx24110.h" #include "or51211.h" #include "lgdt330x.h" -#include "lg_h06xf.h" #include "zl10353.h" struct dvb_bt8xx_card { diff --git a/drivers/media/dvb/cinergyT2/Kconfig b/drivers/media/dvb/cinergyT2/Kconfig index b5cdd57ec..6018fcdba 100644 --- a/drivers/media/dvb/cinergyT2/Kconfig +++ b/drivers/media/dvb/cinergyT2/Kconfig @@ -64,7 +64,7 @@ config DVB_CINERGYT2_QUERY_INTERVAL config DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE bool "Register the onboard IR Remote Control Receiver as Input Device" depends on DVB_CINERGYT2_TUNING - default y + default "yes" help Enable this option if you want to use the onboard Infrared Remote Control Receiver as Linux-Input device. diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 001c71b6b..9325d039e 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -22,6 +22,7 @@ * */ +#include #include #include #include @@ -543,19 +544,15 @@ static unsigned int cinergyt2_poll (struct file *file, struct poll_table_struct { struct dvb_device *dvbdev = file->private_data; struct cinergyt2 *cinergyt2 = dvbdev->priv; - unsigned int mask = 0; if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) return -ERESTARTSYS; poll_wait(file, &cinergyt2->poll_wq, wait); - if (cinergyt2->pending_fe_events != 0) - mask |= (POLLIN | POLLRDNORM | POLLPRI); - mutex_unlock(&cinergyt2->sem); - return mask; + return (POLLIN | POLLRDNORM | POLLPRI); } @@ -905,7 +902,7 @@ static int cinergyt2_probe (struct usb_interface *intf, return -ENOMEM; } - if ((err = dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE, &cinergyt2->udev->dev)) < 0) { + if ((err = dvb_register_adapter(&cinergyt2->adapter, DRIVER_NAME, THIS_MODULE)) < 0) { kfree(cinergyt2); return err; } diff --git a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile index 0b5182835..7adb50c1e 100644 --- a/drivers/media/dvb/dvb-core/Makefile +++ b/drivers/media/dvb/dvb-core/Makefile @@ -2,8 +2,8 @@ # Makefile for the kernel DVB device drivers. # -dvb-core-objs := dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ - dvb_ca_en50221.o dvb_frontend.o \ - dvb_net.o dvb_ringbuffer.o dvb_math.o +dvb-core-objs = dvbdev.o dmxdev.o dvb_demux.o dvb_filter.o \ + dvb_ca_en50221.o dvb_frontend.o \ + dvb_net.o dvb_ringbuffer.o obj-$(CONFIG_DVB_CORE) += dvb-core.o diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index 988499dfd..04578df3f 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c @@ -872,6 +872,9 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file, mutex_unlock(&dmxdevfilter->mutex); break; + case DMX_GET_EVENT: + break; + case DMX_GET_PES_PIDS: if (!dmxdev->demux->get_pes_pids) { ret = -EINVAL; diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index 2a03bf53c..00347a750 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c @@ -1060,18 +1060,8 @@ static int dvb_ca_en50221_thread(void *data) break; case DVB_CA_SLOTSTATE_VALIDATE: - if (dvb_ca_en50221_parse_attributes(ca, slot) != 0) { - /* we need this extra check for annoying interfaces like the budget-av */ - if ((!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE)) && - (ca->pub->poll_slot_status)) { - int status = ca->pub->poll_slot_status(ca->pub, slot, 0); - if (!(status & DVB_CA_EN50221_POLL_CAM_PRESENT)) { - ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE; - dvb_ca_en50221_thread_update_delay(ca); - break; - } - } - + if (dvb_ca_en50221_parse_attributes(ca, slot) + != 0) { printk("dvb_ca adapter %d: Invalid PC card inserted :(\n", ca->dvbdev->adapter->num); ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; @@ -1118,17 +1108,6 @@ static int dvb_ca_en50221_thread(void *data) case DVB_CA_SLOTSTATE_LINKINIT: if (dvb_ca_en50221_link_init(ca, slot) != 0) { - /* we need this extra check for annoying interfaces like the budget-av */ - if ((!(ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE)) && - (ca->pub->poll_slot_status)) { - int status = ca->pub->poll_slot_status(ca->pub, slot, 0); - if (!(status & DVB_CA_EN50221_POLL_CAM_PRESENT)) { - ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_NONE; - dvb_ca_en50221_thread_update_delay(ca); - break; - } - } - printk("dvb_ca adapter %d: DVB CAM link initialisation failed :(\n", ca->dvbdev->adapter->num); ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; dvb_ca_en50221_thread_update_delay(ca); diff --git a/drivers/media/dvb/dvb-core/dvb_demux.c b/drivers/media/dvb/dvb-core/dvb_demux.c index fcff5eab2..83ec5e06c 100644 --- a/drivers/media/dvb/dvb-core/dvb_demux.c +++ b/drivers/media/dvb/dvb-core/dvb_demux.c @@ -473,7 +473,7 @@ void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count) goto bailout; } memcpy(&demux->tsbuf[i], buf, j); - if ((demux->tsbuf[0] == 0x47) || (demux->tsbuf[0] == 0xB8)) { + if ((demux->tsbuf[0] == 0x47) | (demux->tsbuf[0] == 0xB8)) { memcpy(tmppack, demux->tsbuf, 188); if (tmppack[0] == 0xB8) tmppack[0] = 0x47; @@ -484,7 +484,7 @@ void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count) } while (p < count) { - if ((buf[p] == 0x47) || (buf[p] == 0xB8)) { + if ((buf[p] == 0x47) | (buf[p] == 0xB8)) { if (count - p >= 204) { memcpy(tmppack, &buf[p], 188); if (tmppack[0] == 0xB8) diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 57b34cda9..cb69372fe 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -56,7 +56,7 @@ MODULE_PARM_DESC(dvb_force_auto_inversion, "0: normal (default), 1: INVERSION_AU module_param(dvb_override_tune_delay, int, 0644); MODULE_PARM_DESC(dvb_override_tune_delay, "0: normal (default), >0 => delay in milliseconds to wait for lock after a tune attempt"); module_param(dvb_powerdown_on_sleep, int, 0644); -MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB voltage off on sleep (default)"); +MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volatage off on sleep (default)"); #define dprintk if (dvb_frontend_debug) printk @@ -72,8 +72,6 @@ MODULE_PARM_DESC(dvb_powerdown_on_sleep, "0: do not power down, 1: turn LNB volt #define FESTATE_SEARCHING_FAST (FESTATE_TUNING_FAST | FESTATE_ZIGZAG_FAST) #define FESTATE_SEARCHING_SLOW (FESTATE_TUNING_SLOW | FESTATE_ZIGZAG_SLOW) #define FESTATE_LOSTLOCK (FESTATE_ZIGZAG_FAST | FESTATE_ZIGZAG_SLOW) - -#define FE_ALGO_HW 1 /* * FESTATE_IDLE. No tuning parameters have been supplied and the loop is idling. * FESTATE_RETUNE. Parameters have been supplied, but we have not yet performed the first tune. @@ -153,8 +151,8 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) sizeof (struct dvb_frontend_parameters)); if (status & FE_HAS_LOCK) - if (fe->ops.get_frontend) - fe->ops.get_frontend(fe, &e->parameters); + if (fe->ops->get_frontend) + fe->ops->get_frontend(fe, &e->parameters); events->eventw = wp; @@ -213,15 +211,10 @@ static void dvb_frontend_init(struct dvb_frontend *fe) { dprintk ("DVB: initialising frontend %i (%s)...\n", fe->dvb->num, - fe->ops.info.name); - - if (fe->ops.init) - fe->ops.init(fe); - if (fe->ops.tuner_ops.init) { - fe->ops.tuner_ops.init(fe); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - } + fe->ops->info.name); + + if (fe->ops->init) + fe->ops->init(fe); } void dvb_frontend_reinitialise(struct dvb_frontend *fe) @@ -266,7 +259,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra u32 original_frequency = fepriv->parameters.frequency; /* are we using autoinversion? */ - autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && + autoinversion = ((!(fe->ops->info.caps & FE_CAN_INVERSION_AUTO)) && (fepriv->parameters.inversion == INVERSION_AUTO)); /* setup parameters correctly */ @@ -336,8 +329,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra fepriv->parameters.frequency += fepriv->lnb_drift; if (autoinversion) fepriv->parameters.inversion = fepriv->inversion; - if (fe->ops.set_frontend) - fe->ops.set_frontend(fe, &fepriv->parameters); + if (fe->ops->set_frontend) + fe->ops->set_frontend(fe, &fepriv->parameters); fepriv->parameters.frequency = original_frequency; fepriv->parameters.inversion = original_inversion; @@ -361,8 +354,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) /* in SCAN mode, we just set the frontend when asked and leave it alone */ if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) { if (fepriv->state & FESTATE_RETUNE) { - if (fe->ops.set_frontend) - fe->ops.set_frontend(fe, &fepriv->parameters); + if (fe->ops->set_frontend) + fe->ops->set_frontend(fe, &fepriv->parameters); fepriv->state = FESTATE_TUNED; } fepriv->delay = 3*HZ; @@ -374,8 +367,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) if (fepriv->state & FESTATE_RETUNE) { s = 0; } else { - if (fe->ops.read_status) - fe->ops.read_status(fe, &s); + if (fe->ops->read_status) + fe->ops->read_status(fe, &s); if (s != fepriv->status) { dvb_frontend_add_event(fe, s); fepriv->status = s; @@ -388,7 +381,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) fepriv->state = FESTATE_TUNED; /* if we're tuned, then we have determined the correct inversion */ - if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) && + if ((!(fe->ops->info.caps & FE_CAN_INVERSION_AUTO)) && (fepriv->parameters.inversion == INVERSION_AUTO)) { fepriv->parameters.inversion = fepriv->inversion; } @@ -412,7 +405,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe) /* don't actually do anything if we're in the LOSTLOCK state, * the frontend is set to FE_CAN_RECOVER, and the max_drift is 0 */ if ((fepriv->state & FESTATE_LOSTLOCK) && - (fe->ops.info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) { + (fe->ops->info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) { dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK); return; } @@ -549,46 +542,39 @@ static int dvb_frontend_thread(void *data) if (fepriv->reinitialise) { dvb_frontend_init(fe); if (fepriv->tone != -1) { - fe->ops.set_tone(fe, fepriv->tone); + fe->ops->set_tone(fe, fepriv->tone); } if (fepriv->voltage != -1) { - fe->ops.set_voltage(fe, fepriv->voltage); + fe->ops->set_voltage(fe, fepriv->voltage); } fepriv->reinitialise = 0; } /* do an iteration of the tuning loop */ - if (fe->ops.get_frontend_algo) { - if (fe->ops.get_frontend_algo(fe) == FE_ALGO_HW) { - /* have we been asked to retune? */ - params = NULL; - if (fepriv->state & FESTATE_RETUNE) { - params = &fepriv->parameters; - fepriv->state = FESTATE_TUNED; - } + if (fe->ops->tune) { + /* have we been asked to retune? */ + params = NULL; + if (fepriv->state & FESTATE_RETUNE) { + params = &fepriv->parameters; + fepriv->state = FESTATE_TUNED; + } - fe->ops.tune(fe, params, fepriv->tune_mode_flags, &fepriv->delay, &s); - if (s != fepriv->status) { - dvb_frontend_add_event(fe, s); - fepriv->status = s; - } - } else - dvb_frontend_swzigzag(fe); - } else + fe->ops->tune(fe, params, fepriv->tune_mode_flags, &fepriv->delay, &s); + if (s != fepriv->status) { + dvb_frontend_add_event(fe, s); + fepriv->status = s; + } + } else { dvb_frontend_swzigzag(fe); + } } if (dvb_shutdown_timeout) { if (dvb_powerdown_on_sleep) - if (fe->ops.set_voltage) - fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF); - if (fe->ops.tuner_ops.sleep) { - fe->ops.tuner_ops.sleep(fe); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - } - if (fe->ops.sleep) - fe->ops.sleep(fe); + if (fe->ops->set_voltage) + fe->ops->set_voltage(fe, SEC_VOLTAGE_OFF); + if (fe->ops->sleep) + fe->ops->sleep(fe); } fepriv->thread_pid = 0; @@ -740,7 +726,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, switch (cmd) { case FE_GET_INFO: { struct dvb_frontend_info* info = parg; - memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info)); + memcpy(info, &fe->ops->info, sizeof(struct dvb_frontend_info)); /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't * do it, it is done for it. */ @@ -760,58 +746,58 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, break; } - if (fe->ops.read_status) - err = fe->ops.read_status(fe, status); + if (fe->ops->read_status) + err = fe->ops->read_status(fe, status); break; } case FE_READ_BER: - if (fe->ops.read_ber) - err = fe->ops.read_ber(fe, (__u32*) parg); + if (fe->ops->read_ber) + err = fe->ops->read_ber(fe, (__u32*) parg); break; case FE_READ_SIGNAL_STRENGTH: - if (fe->ops.read_signal_strength) - err = fe->ops.read_signal_strength(fe, (__u16*) parg); + if (fe->ops->read_signal_strength) + err = fe->ops->read_signal_strength(fe, (__u16*) parg); break; case FE_READ_SNR: - if (fe->ops.read_snr) - err = fe->ops.read_snr(fe, (__u16*) parg); + if (fe->ops->read_snr) + err = fe->ops->read_snr(fe, (__u16*) parg); break; case FE_READ_UNCORRECTED_BLOCKS: - if (fe->ops.read_ucblocks) - err = fe->ops.read_ucblocks(fe, (__u32*) parg); + if (fe->ops->read_ucblocks) + err = fe->ops->read_ucblocks(fe, (__u32*) parg); break; case FE_DISEQC_RESET_OVERLOAD: - if (fe->ops.diseqc_reset_overload) { - err = fe->ops.diseqc_reset_overload(fe); + if (fe->ops->diseqc_reset_overload) { + err = fe->ops->diseqc_reset_overload(fe); fepriv->state = FESTATE_DISEQC; fepriv->status = 0; } break; case FE_DISEQC_SEND_MASTER_CMD: - if (fe->ops.diseqc_send_master_cmd) { - err = fe->ops.diseqc_send_master_cmd(fe, (struct dvb_diseqc_master_cmd*) parg); + if (fe->ops->diseqc_send_master_cmd) { + err = fe->ops->diseqc_send_master_cmd(fe, (struct dvb_diseqc_master_cmd*) parg); fepriv->state = FESTATE_DISEQC; fepriv->status = 0; } break; case FE_DISEQC_SEND_BURST: - if (fe->ops.diseqc_send_burst) { - err = fe->ops.diseqc_send_burst(fe, (fe_sec_mini_cmd_t) parg); + if (fe->ops->diseqc_send_burst) { + err = fe->ops->diseqc_send_burst(fe, (fe_sec_mini_cmd_t) parg); fepriv->state = FESTATE_DISEQC; fepriv->status = 0; } break; case FE_SET_TONE: - if (fe->ops.set_tone) { - err = fe->ops.set_tone(fe, (fe_sec_tone_mode_t) parg); + if (fe->ops->set_tone) { + err = fe->ops->set_tone(fe, (fe_sec_tone_mode_t) parg); fepriv->tone = (fe_sec_tone_mode_t) parg; fepriv->state = FESTATE_DISEQC; fepriv->status = 0; @@ -819,8 +805,8 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, break; case FE_SET_VOLTAGE: - if (fe->ops.set_voltage) { - err = fe->ops.set_voltage(fe, (fe_sec_voltage_t) parg); + if (fe->ops->set_voltage) { + err = fe->ops->set_voltage(fe, (fe_sec_voltage_t) parg); fepriv->voltage = (fe_sec_voltage_t) parg; fepriv->state = FESTATE_DISEQC; fepriv->status = 0; @@ -828,11 +814,11 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, break; case FE_DISHNETWORK_SEND_LEGACY_CMD: - if (fe->ops.dishnetwork_send_legacy_command) { - err = fe->ops.dishnetwork_send_legacy_command(fe, (unsigned long) parg); + if (fe->ops->dishnetwork_send_legacy_command) { + err = fe->ops->dishnetwork_send_legacy_command(fe, (unsigned long) parg); fepriv->state = FESTATE_DISEQC; fepriv->status = 0; - } else if (fe->ops.set_voltage) { + } else if (fe->ops->set_voltage) { /* * NOTE: This is a fallback condition. Some frontends * (stv0299 for instance) take longer than 8msec to @@ -862,7 +848,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, /* before sending a command, initialize by sending * a 32ms 18V to the switch */ - fe->ops.set_voltage(fe, SEC_VOLTAGE_18); + fe->ops->set_voltage(fe, SEC_VOLTAGE_18); dvb_frontend_sleep_until(&nexttime, 32000); for (i = 0; i < 9; i++) { @@ -870,7 +856,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, do_gettimeofday(&tv[i + 1]); if ((cmd & 0x01) != last) { /* set voltage to (last ? 13V : 18V) */ - fe->ops.set_voltage(fe, (last) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18); + fe->ops->set_voltage(fe, (last) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18); last = (last) ? 0 : 1; } cmd = cmd >> 1; @@ -890,13 +876,13 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, break; case FE_DISEQC_RECV_SLAVE_REPLY: - if (fe->ops.diseqc_recv_slave_reply) - err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); + if (fe->ops->diseqc_recv_slave_reply) + err = fe->ops->diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); break; case FE_ENABLE_HIGH_LNB_VOLTAGE: - if (fe->ops.enable_high_lnb_voltage) - err = fe->ops.enable_high_lnb_voltage(fe, (long) parg); + if (fe->ops->enable_high_lnb_voltage) + err = fe->ops->enable_high_lnb_voltage(fe, (long) parg); break; case FE_SET_FRONTEND: { @@ -914,7 +900,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, fepriv->parameters.inversion = INVERSION_AUTO; fetunesettings.parameters.inversion = INVERSION_AUTO; } - if (fe->ops.info.type == FE_OFDM) { + if (fe->ops->info.type == FE_OFDM) { /* without hierachical coding code_rate_LP is irrelevant, * so we tolerate the otherwise invalid FEC_NONE setting */ if (fepriv->parameters.u.ofdm.hierarchy_information == HIERARCHY_NONE && @@ -923,13 +909,13 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, } /* get frontend-specific tuning settings */ - if (fe->ops.get_tune_settings && (fe->ops.get_tune_settings(fe, &fetunesettings) == 0)) { + if (fe->ops->get_tune_settings && (fe->ops->get_tune_settings(fe, &fetunesettings) == 0)) { fepriv->min_delay = (fetunesettings.min_delay_ms * HZ) / 1000; fepriv->max_drift = fetunesettings.max_drift; fepriv->step_size = fetunesettings.step_size; } else { /* default values */ - switch(fe->ops.info.type) { + switch(fe->ops->info.type) { case FE_QPSK: fepriv->min_delay = HZ/20; fepriv->step_size = fepriv->parameters.u.qpsk.symbol_rate / 16000; @@ -944,13 +930,11 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, case FE_OFDM: fepriv->min_delay = HZ/20; - fepriv->step_size = fe->ops.info.frequency_stepsize * 2; - fepriv->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1; + fepriv->step_size = fe->ops->info.frequency_stepsize * 2; + fepriv->max_drift = (fe->ops->info.frequency_stepsize * 2) + 1; break; case FE_ATSC: - fepriv->min_delay = HZ/20; - fepriv->step_size = 0; - fepriv->max_drift = 0; + printk("dvb-core: FE_ATSC not handled yet.\n"); break; } } @@ -970,15 +954,14 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file, break; case FE_GET_FRONTEND: - if (fe->ops.get_frontend) { + if (fe->ops->get_frontend) { memcpy (parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters)); - err = fe->ops.get_frontend(fe, (struct dvb_frontend_parameters*) parg); + err = fe->ops->get_frontend(fe, (struct dvb_frontend_parameters*) parg); } break; case FE_SET_FRONTEND_TUNE_MODE: fepriv->tune_mode_flags = (unsigned long) parg; - err = 0; break; }; @@ -1015,7 +998,6 @@ static int dvb_frontend_open(struct inode *inode, struct file *file) return ret; if ((file->f_flags & O_ACCMODE) != O_RDONLY) { - /* normal tune mode when opened R/W */ fepriv->tune_mode_flags &= ~FE_TUNE_MODE_ONESHOT; fepriv->tone = -1; @@ -1087,7 +1069,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb, printk ("DVB: registering frontend %i (%s)...\n", fe->dvb->num, - fe->ops.info.name); + fe->ops->info.name); dvb_register_device (fe->dvb, &fepriv->dvbdev, &dvbdev_template, fe, DVB_DEVICE_FRONTEND); @@ -1105,15 +1087,10 @@ int dvb_unregister_frontend(struct dvb_frontend* fe) mutex_lock(&frontend_mutex); dvb_unregister_device (fepriv->dvbdev); dvb_frontend_stop (fe); - if (fe->ops.tuner_ops.release) { - fe->ops.tuner_ops.release(fe); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - } - if (fe->ops.release) - fe->ops.release(fe); + if (fe->ops->release) + fe->ops->release(fe); else - printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops.info.name); + printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops->info.name); /* fe is invalid now */ kfree(fepriv); mutex_unlock(&frontend_mutex); diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index 2887e2b86..5926a3b74 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h @@ -49,44 +49,6 @@ struct dvb_frontend_tune_settings { struct dvb_frontend; -struct dvb_tuner_info { - char name[128]; - - u32 frequency_min; - u32 frequency_max; - u32 frequency_step; - - u32 bandwidth_min; - u32 bandwidth_max; - u32 bandwidth_step; -}; - -struct dvb_tuner_ops { - - struct dvb_tuner_info info; - - int (*release)(struct dvb_frontend *fe); - int (*init)(struct dvb_frontend *fe); - int (*sleep)(struct dvb_frontend *fe); - - /** This is for simple PLLs - set all parameters in one go. */ - int (*set_params)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p); - - /** This is support for demods like the mt352 - fills out the supplied buffer with what to write. */ - int (*calc_regs)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p, u8 *buf, int buf_len); - - int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency); - int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth); - -#define TUNER_STATUS_LOCKED 1 - int (*get_status)(struct dvb_frontend *fe, u32 *status); - - /** These are provided seperately from set_params in order to facilitate silicon - * tuners which require sophisticated tuning loops, controlling each parameter seperately. */ - int (*set_frequency)(struct dvb_frontend *fe, u32 frequency); - int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth); -}; - struct dvb_frontend_ops { struct dvb_frontend_info info; @@ -102,8 +64,6 @@ struct dvb_frontend_ops { unsigned int mode_flags, int *delay, fe_status_t *status); - /* get frontend tuning algorithm from the module */ - int (*get_frontend_algo)(struct dvb_frontend *fe); /* these two are only used for the swzigzag code */ int (*set_frontend)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); @@ -126,8 +86,6 @@ struct dvb_frontend_ops { int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg); int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd); int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable); - - struct dvb_tuner_ops tuner_ops; }; #define MAX_EVENT 8 @@ -142,10 +100,9 @@ struct dvb_fe_events { }; struct dvb_frontend { - struct dvb_frontend_ops ops; + struct dvb_frontend_ops* ops; struct dvb_adapter *dvb; void* demodulator_priv; - void* tuner_priv; void* frontend_priv; void* misc_priv; }; diff --git a/drivers/media/dvb/dvb-core/dvb_math.c b/drivers/media/dvb/dvb-core/dvb_math.c deleted file mode 100644 index beb7c93aa..000000000 --- a/drivers/media/dvb/dvb-core/dvb_math.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * dvb-math provides some complex fixed-point math - * operations shared between the dvb related stuff - * - * Copyright (C) 2006 Christoph Pfister (christophpfister@gmail.com) - * - * This library is free software; you can redistribute it and/or 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include "dvb_math.h" - -static const unsigned short logtable[256] = { - 0x0000, 0x0171, 0x02e0, 0x044e, 0x05ba, 0x0725, 0x088e, 0x09f7, - 0x0b5d, 0x0cc3, 0x0e27, 0x0f8a, 0x10eb, 0x124b, 0x13aa, 0x1508, - 0x1664, 0x17bf, 0x1919, 0x1a71, 0x1bc8, 0x1d1e, 0x1e73, 0x1fc6, - 0x2119, 0x226a, 0x23ba, 0x2508, 0x2656, 0x27a2, 0x28ed, 0x2a37, - 0x2b80, 0x2cc8, 0x2e0f, 0x2f54, 0x3098, 0x31dc, 0x331e, 0x345f, - 0x359f, 0x36de, 0x381b, 0x3958, 0x3a94, 0x3bce, 0x3d08, 0x3e41, - 0x3f78, 0x40af, 0x41e4, 0x4319, 0x444c, 0x457f, 0x46b0, 0x47e1, - 0x4910, 0x4a3f, 0x4b6c, 0x4c99, 0x4dc5, 0x4eef, 0x5019, 0x5142, - 0x526a, 0x5391, 0x54b7, 0x55dc, 0x5700, 0x5824, 0x5946, 0x5a68, - 0x5b89, 0x5ca8, 0x5dc7, 0x5ee5, 0x6003, 0x611f, 0x623a, 0x6355, - 0x646f, 0x6588, 0x66a0, 0x67b7, 0x68ce, 0x69e4, 0x6af8, 0x6c0c, - 0x6d20, 0x6e32, 0x6f44, 0x7055, 0x7165, 0x7274, 0x7383, 0x7490, - 0x759d, 0x76aa, 0x77b5, 0x78c0, 0x79ca, 0x7ad3, 0x7bdb, 0x7ce3, - 0x7dea, 0x7ef0, 0x7ff6, 0x80fb, 0x81ff, 0x8302, 0x8405, 0x8507, - 0x8608, 0x8709, 0x8809, 0x8908, 0x8a06, 0x8b04, 0x8c01, 0x8cfe, - 0x8dfa, 0x8ef5, 0x8fef, 0x90e9, 0x91e2, 0x92db, 0x93d2, 0x94ca, - 0x95c0, 0x96b6, 0x97ab, 0x98a0, 0x9994, 0x9a87, 0x9b7a, 0x9c6c, - 0x9d5e, 0x9e4f, 0x9f3f, 0xa02e, 0xa11e, 0xa20c, 0xa2fa, 0xa3e7, - 0xa4d4, 0xa5c0, 0xa6ab, 0xa796, 0xa881, 0xa96a, 0xaa53, 0xab3c, - 0xac24, 0xad0c, 0xadf2, 0xaed9, 0xafbe, 0xb0a4, 0xb188, 0xb26c, - 0xb350, 0xb433, 0xb515, 0xb5f7, 0xb6d9, 0xb7ba, 0xb89a, 0xb97a, - 0xba59, 0xbb38, 0xbc16, 0xbcf4, 0xbdd1, 0xbead, 0xbf8a, 0xc065, - 0xc140, 0xc21b, 0xc2f5, 0xc3cf, 0xc4a8, 0xc580, 0xc658, 0xc730, - 0xc807, 0xc8de, 0xc9b4, 0xca8a, 0xcb5f, 0xcc34, 0xcd08, 0xcddc, - 0xceaf, 0xcf82, 0xd054, 0xd126, 0xd1f7, 0xd2c8, 0xd399, 0xd469, - 0xd538, 0xd607, 0xd6d6, 0xd7a4, 0xd872, 0xd93f, 0xda0c, 0xdad9, - 0xdba5, 0xdc70, 0xdd3b, 0xde06, 0xded0, 0xdf9a, 0xe063, 0xe12c, - 0xe1f5, 0xe2bd, 0xe385, 0xe44c, 0xe513, 0xe5d9, 0xe69f, 0xe765, - 0xe82a, 0xe8ef, 0xe9b3, 0xea77, 0xeb3b, 0xebfe, 0xecc1, 0xed83, - 0xee45, 0xef06, 0xefc8, 0xf088, 0xf149, 0xf209, 0xf2c8, 0xf387, - 0xf446, 0xf505, 0xf5c3, 0xf680, 0xf73e, 0xf7fb, 0xf8b7, 0xf973, - 0xfa2f, 0xfaea, 0xfba5, 0xfc60, 0xfd1a, 0xfdd4, 0xfe8e, 0xff47 -}; - -unsigned int intlog2(u32 value) -{ - /** - * returns: log2(value) * 2^24 - * wrong result if value = 0 (log2(0) is undefined) - */ - unsigned int msb; - unsigned int logentry; - unsigned int significand; - unsigned int interpolation; - - if (unlikely(value == 0)) { - WARN_ON(1); - return 0; - } - - /* first detect the msb (count begins at 0) */ - msb = fls(value) - 1; - - /** - * now we use a logtable after the following method: - * - * log2(2^x * y) * 2^24 = x * 2^24 + log2(y) * 2^24 - * where x = msb and therefore 1 <= y < 2 - * first y is determined by shifting the value left - * so that msb is bit 31 - * 0x00231f56 -> 0x8C7D5800 - * the result is y * 2^31 -> "significand" - * then the highest 9 bits are used for a table lookup - * the highest bit is discarded because it's always set - * the highest nine bits in our example are 100011000 - * so we would use the entry 0x18 - */ - significand = value << (31 - msb); - logentry = (significand >> 23) & 0xff; - - /** - * last step we do is interpolation because of the - * limitations of the log table the error is that part of - * the significand which isn't used for lookup then we - * compute the ratio between the error and the next table entry - * and interpolate it between the log table entry used and the - * next one the biggest error possible is 0x7fffff - * (in our example it's 0x7D5800) - * needed value for next table entry is 0x800000 - * so the interpolation is - * (error / 0x800000) * (logtable_next - logtable_current) - * in the implementation the division is moved to the end for - * better accuracy there is also an overflow correction if - * logtable_next is 256 - */ - interpolation = ((significand & 0x7fffff) * - ((logtable[(logentry + 1) & 0xff] - - logtable[logentry]) & 0xffff)) >> 15; - - /* now we return the result */ - return ((msb << 24) + (logtable[logentry] << 8) + interpolation); -} -EXPORT_SYMBOL(intlog2); - -unsigned int intlog10(u32 value) -{ - /** - * returns: log10(value) * 2^24 - * wrong result if value = 0 (log10(0) is undefined) - */ - u64 log; - - if (unlikely(value == 0)) { - WARN_ON(1); - return 0; - } - - log = intlog2(value); - - /** - * we use the following method: - * log10(x) = log2(x) * log10(2) - */ - - return (log * 646456993) >> 31; -} -EXPORT_SYMBOL(intlog10); diff --git a/drivers/media/dvb/dvb-core/dvb_math.h b/drivers/media/dvb/dvb-core/dvb_math.h deleted file mode 100644 index aecc867e9..000000000 --- a/drivers/media/dvb/dvb-core/dvb_math.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * dvb-math provides some complex fixed-point math - * operations shared between the dvb related stuff - * - * Copyright (C) 2006 Christoph Pfister (christophpfister@gmail.com) - * - * This library is free software; you can redistribute it and/or 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __DVB_MATH_H -#define __DVB_MATH_H - -#include - -/** - * computes log2 of a value; the result is shifted left by 24 bits - * - * to use rational values you can use the following method: - * intlog2(value) = intlog2(value * 2^x) - x * 2^24 - * - * example: intlog2(8) will give 3 << 24 = 3 * 2^24 - * example: intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24 - * example: intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24 - * - * @param value The value (must be != 0) - * @return log2(value) * 2^24 - */ -extern unsigned int intlog2(u32 value); - -/** - * computes log10 of a value; the result is shifted left by 24 bits - * - * to use rational values you can use the following method: - * intlog10(value) = intlog10(value * 10^x) - x * 2^24 - * - * example: intlog10(1000) will give 3 << 24 = 3 * 2^24 - * due to the implementation intlog10(1000) might be not exactly 3 * 2^24 - * - * look at intlog2 for similar examples - * - * @param value The value (must be != 0) - * @return log10(value) * 2^24 - */ -extern unsigned int intlog10(u32 value); - -#endif diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 8859ab74f..9fd87521a 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c @@ -12,7 +12,7 @@ * Hilmar Linder * and Wolfram Stering * - * ULE Decaps according to RFC 4326. + * ULE Decaps according to draft-ietf-ipdvb-ule-03.txt. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -42,9 +42,6 @@ * Bugfixes and robustness improvements. * Filtering on dest MAC addresses, if present (D-Bit = 0) * ULE_DEBUG compile-time option. - * Apr 2006: cp v3: Bugfixes and compliency with RFC 4326 (ULE) by - * Christian Praehauser , - * Paris Lodron University of Salzburg. */ /* @@ -52,6 +49,9 @@ * * Unloading does not work for 2.6.9 kernels: a refcount doesn't go to zero. * + * TS_FEED callback is called once for every single TS cell although it is + * registered (in dvb_net_feed_start()) for 100 TS cells (used for dvb_net_ule()). + * */ #include @@ -89,9 +89,6 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt ) #ifdef ULE_DEBUG -#define MAC_ADDR_PRINTFMT "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" -#define MAX_ADDR_PRINTFMT_ARGS(macap) (macap)[0],(macap)[1],(macap)[2],(macap)[3],(macap)[4],(macap)[5] - #define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) static void hexdump( const unsigned char *buf, unsigned short len ) @@ -217,8 +214,6 @@ static unsigned short dvb_net_eth_type_trans(struct sk_buff *skb, #define ULE_TEST 0 #define ULE_BRIDGED 1 -#define ULE_OPTEXTHDR_PADDING 0 - static int ule_test_sndu( struct dvb_net_priv *p ) { return -1; @@ -226,28 +221,14 @@ static int ule_test_sndu( struct dvb_net_priv *p ) static int ule_bridged_sndu( struct dvb_net_priv *p ) { - struct ethhdr *hdr = (struct ethhdr*) p->ule_next_hdr; - if(ntohs(hdr->h_proto) < 1536) { - int framelen = p->ule_sndu_len - ((p->ule_next_hdr+sizeof(struct ethhdr)) - p->ule_skb->data); - /* A frame Type < 1536 for a bridged frame, introduces a LLC Length field. */ - if(framelen != ntohs(hdr->h_proto)) { - return -1; - } - } - /* Note: - * From RFC4326: - * "A bridged SNDU is a Mandatory Extension Header of Type 1. - * It must be the final (or only) extension header specified in the header chain of a SNDU." - * The 'ule_bridged' flag will cause the extension header processing loop to terminate. + /* BRIDGE SNDU handling sucks in draft-ietf-ipdvb-ule-03.txt. + * This has to be the last extension header, otherwise it won't work. + * Blame the authors! */ p->ule_bridged = 1; return 0; } -static int ule_exthdr_padding(struct dvb_net_priv *p) -{ - return 0; -} /** Handle ULE extension headers. * Function is called after a successful CRC32 verification of an ULE SNDU to complete its decoding. @@ -261,8 +242,7 @@ static int handle_one_ule_extension( struct dvb_net_priv *p ) { [0] = ule_test_sndu, [1] = ule_bridged_sndu, [2] = NULL, }; /* Table of optional extension header handlers. The header type is the index. */ - static int (*ule_optional_ext_handlers[255])( struct dvb_net_priv *p ) = - { [0] = ule_exthdr_padding, [1] = NULL, }; + static int (*ule_optional_ext_handlers[255])( struct dvb_net_priv *p ) = { NULL, }; int ext_len = 0; unsigned char hlen = (p->ule_sndu_type & 0x0700) >> 8; @@ -273,31 +253,25 @@ static int handle_one_ule_extension( struct dvb_net_priv *p ) /* Mandatory extension header */ if (ule_mandatory_ext_handlers[htype]) { ext_len = ule_mandatory_ext_handlers[htype]( p ); - if(ext_len >= 0) { - p->ule_next_hdr += ext_len; - if (!p->ule_bridged) { - p->ule_sndu_type = ntohs(*(unsigned short *)p->ule_next_hdr); - p->ule_next_hdr += 2; - } else { - p->ule_sndu_type = ntohs(*(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); - /* This assures the extension handling loop will terminate. */ - } + p->ule_next_hdr += ext_len; + if (! p->ule_bridged) { + p->ule_sndu_type = ntohs( *(unsigned short *)p->ule_next_hdr ); + p->ule_next_hdr += 2; + } else { + p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN)) ); + /* This assures the extension handling loop will terminate. */ } - // else: extension handler failed or SNDU should be discarded } else ext_len = -1; /* SNDU has to be discarded. */ } else { /* Optional extension header. Calculate the length. */ - ext_len = hlen << 1; + ext_len = hlen << 2; /* Process the optional extension header according to its type. */ if (ule_optional_ext_handlers[htype]) (void)ule_optional_ext_handlers[htype]( p ); p->ule_next_hdr += ext_len; - p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr-2) ); - /* - * note: the length of the next header type is included in the - * length of THIS optional extension header - */ + p->ule_sndu_type = ntohs( *(unsigned short *)p->ule_next_hdr ); + p->ule_next_hdr += 2; } return ext_len; @@ -310,14 +284,8 @@ static int handle_ule_extensions( struct dvb_net_priv *p ) p->ule_next_hdr = p->ule_skb->data; do { l = handle_one_ule_extension( p ); - if (l < 0) - return l; /* Stop extension header processing and discard SNDU. */ + if (l == -1) return -1; /* Stop extension header processing and discard SNDU. */ total_ext_len += l; -#ifdef ULE_DEBUG - dprintk("handle_ule_extensions: ule_next_hdr=%p, ule_sndu_type=%i, " - "l=%i, total_ext_len=%i\n", p->ule_next_hdr, - (int) p->ule_sndu_type, l, total_ext_len); -#endif } while (p->ule_sndu_type < 1536); @@ -387,8 +355,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) if (priv->ule_skb) { dev_kfree_skb( priv->ule_skb ); /* Prepare for next SNDU. */ - priv->stats.rx_errors++; - priv->stats.rx_frame_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_frame_errors++; } reset_ule(priv); priv->need_pusi = 1; @@ -428,25 +396,27 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) } } + /* Check continuity counter. */ if (new_ts) { - /* Check continuity counter. */ if ((ts[3] & 0x0F) == priv->tscc) priv->tscc = (priv->tscc + 1) & 0x0F; else { /* TS discontinuity handling: */ printk(KERN_WARNING "%lu: TS discontinuity: got %#x, " - "expected %#x.\n", priv->ts_count, ts[3] & 0x0F, priv->tscc); + "exptected %#x.\n", priv->ts_count, ts[3] & 0x0F, priv->tscc); /* Drop partly decoded SNDU, reset state, resync on PUSI. */ if (priv->ule_skb) { dev_kfree_skb( priv->ule_skb ); /* Prepare for next SNDU. */ // reset_ule(priv); moved to below. - priv->stats.rx_errors++; - priv->stats.rx_frame_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_frame_errors++; } reset_ule(priv); /* skip to next PUSI. */ priv->need_pusi = 1; + ts += TS_SZ; + priv->ts_count++; continue; } /* If we still have an incomplete payload, but PUSI is @@ -455,7 +425,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) * cells (continuity counter wrap). */ if (ts[1] & TS_PUSI) { if (! priv->need_pusi) { - if (!(*from_where < (ts_remain-1)) || *from_where != priv->ule_sndu_remain) { + if (*from_where > 181) { /* Pointer field is invalid. Drop this TS cell and any started ULE SNDU. */ printk(KERN_WARNING "%lu: Invalid pointer " "field: %u.\n", priv->ts_count, *from_where); @@ -468,6 +438,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) } reset_ule(priv); priv->need_pusi = 1; + ts += TS_SZ; + priv->ts_count++; continue; } /* Skip pointer field (we're processing a @@ -480,8 +452,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) if (priv->ule_sndu_remain > 183) { /* Current SNDU lacks more data than there could be available in the * current TS cell. */ - priv->stats.rx_errors++; - priv->stats.rx_length_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_length_errors++; printk(KERN_WARNING "%lu: Expected %d more SNDU bytes, but " "got PUSI (pf %d, ts_remain %d). Flushing incomplete payload.\n", priv->ts_count, priv->ule_sndu_remain, ts[4], ts_remain); @@ -520,11 +492,9 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) } else priv->ule_dbit = 0; - if (priv->ule_sndu_len < 5) { + if (priv->ule_sndu_len > 32763) { printk(KERN_WARNING "%lu: Invalid ULE SNDU length %u. " "Resyncing.\n", priv->ts_count, priv->ule_sndu_len); - priv->stats.rx_errors++; - priv->stats.rx_length_errors++; priv->ule_sndu_len = 0; priv->need_pusi = 1; new_ts = 1; @@ -638,103 +608,58 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) ule_dump = 1; #endif - priv->stats.rx_errors++; - priv->stats.rx_crc_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_errors++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_crc_errors++; dev_kfree_skb(priv->ule_skb); } else { /* CRC32 verified OK. */ - u8 dest_addr[ETH_ALEN]; - static const u8 bc_addr[ETH_ALEN] = - { [ 0 ... ETH_ALEN-1] = 0xff }; - - /* CRC32 was OK. Remove it from skb. */ - priv->ule_skb->tail -= 4; - priv->ule_skb->len -= 4; - - if (!priv->ule_dbit) { - /* - * The destination MAC address is the - * next data in the skb. It comes - * before any extension headers. - * - * Check if the payload of this SNDU - * should be passed up the stack. - */ - register int drop = 0; - if (priv->rx_mode != RX_MODE_PROMISC) { - if (priv->ule_skb->data[0] & 0x01) { - /* multicast or broadcast */ - if (memcmp(priv->ule_skb->data, bc_addr, ETH_ALEN)) { - /* multicast */ - if (priv->rx_mode == RX_MODE_MULTI) { - int i; - for(i = 0; i < priv->multi_num && memcmp(priv->ule_skb->data, priv->multi_macs[i], ETH_ALEN); i++) - ; - if (i == priv->multi_num) - drop = 1; - } else if (priv->rx_mode != RX_MODE_ALL_MULTI) - drop = 1; /* no broadcast; */ - /* else: all multicast mode: accept all multicast packets */ - } - /* else: broadcast */ - } - else if (memcmp(priv->ule_skb->data, dev->dev_addr, ETH_ALEN)) - drop = 1; - /* else: destination address matches the MAC address of our receiver device */ - } - /* else: promiscious mode; pass everything up the stack */ - - if (drop) { -#ifdef ULE_DEBUG - dprintk("Dropping SNDU: MAC destination address does not match: dest addr: "MAC_ADDR_PRINTFMT", dev addr: "MAC_ADDR_PRINTFMT"\n", - MAX_ADDR_PRINTFMT_ARGS(priv->ule_skb->data), MAX_ADDR_PRINTFMT_ARGS(dev->dev_addr)); -#endif - dev_kfree_skb(priv->ule_skb); - goto sndu_done; - } - else - { - memcpy(dest_addr, priv->ule_skb->data, ETH_ALEN); - skb_pull(priv->ule_skb, ETH_ALEN); - } - } - /* Handle ULE Extension Headers. */ if (priv->ule_sndu_type < 1536) { /* There is an extension header. Handle it accordingly. */ - int l = handle_ule_extensions(priv); + int l = handle_ule_extensions( priv ); if (l < 0) { /* Mandatory extension header unknown or TEST SNDU. Drop it. */ // printk( KERN_WARNING "Dropping SNDU, extension headers.\n" ); - dev_kfree_skb(priv->ule_skb); + dev_kfree_skb( priv->ule_skb ); goto sndu_done; } - skb_pull(priv->ule_skb, l); + skb_pull( priv->ule_skb, l ); } - /* - * Construct/assure correct ethernet header. - * Note: in bridged mode (priv->ule_bridged != - * 0) we already have the (original) ethernet - * header at the start of the payload (after - * optional dest. address and any extension - * headers). - */ - - if (!priv->ule_bridged) { - skb_push(priv->ule_skb, ETH_HLEN); - ethh = (struct ethhdr *)priv->ule_skb->data; - if (!priv->ule_dbit) { - /* dest_addr buffer is only valid if priv->ule_dbit == 0 */ - memcpy(ethh->h_dest, dest_addr, ETH_ALEN); - memset(ethh->h_source, 0, ETH_ALEN); - } - else /* zeroize source and dest */ - memset( ethh, 0, ETH_ALEN*2 ); + /* CRC32 was OK. Remove it from skb. */ + priv->ule_skb->tail -= 4; + priv->ule_skb->len -= 4; - ethh->h_proto = htons(priv->ule_sndu_type); + /* Filter on receiver's destination MAC address, if present. */ + if (!priv->ule_dbit) { + /* The destination MAC address is the next data in the skb. */ + if (memcmp( priv->ule_skb->data, dev->dev_addr, ETH_ALEN )) { + /* MAC addresses don't match. Drop SNDU. */ + // printk( KERN_WARNING "Dropping SNDU, MAC address.\n" ); + dev_kfree_skb( priv->ule_skb ); + goto sndu_done; + } + if (! priv->ule_bridged) { + skb_push( priv->ule_skb, ETH_ALEN + 2 ); + ethh = (struct ethhdr *)priv->ule_skb->data; + memcpy( ethh->h_dest, ethh->h_source, ETH_ALEN ); + memset( ethh->h_source, 0, ETH_ALEN ); + ethh->h_proto = htons( priv->ule_sndu_type ); + } else { + /* Skip the Receiver destination MAC address. */ + skb_pull( priv->ule_skb, ETH_ALEN ); + } + } else { + if (! priv->ule_bridged) { + skb_push( priv->ule_skb, ETH_HLEN ); + ethh = (struct ethhdr *)priv->ule_skb->data; + memcpy( ethh->h_dest, dev->dev_addr, ETH_ALEN ); + memset( ethh->h_source, 0, ETH_ALEN ); + ethh->h_proto = htons( priv->ule_sndu_type ); + } else { + /* skb is in correct state; nothing to do. */ + } } - /* else: skb is in correct state; nothing to do. */ priv->ule_bridged = 0; /* Stuff into kernel's protocol stack. */ @@ -743,8 +668,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) * receive the packet anyhow. */ /* if (priv->ule_dbit && skb->pkt_type == PACKET_OTHERHOST) priv->ule_skb->pkt_type = PACKET_HOST; */ - priv->stats.rx_packets++; - priv->stats.rx_bytes += priv->ule_skb->len; + ((struct dvb_net_priv *) dev->priv)->stats.rx_packets++; + ((struct dvb_net_priv *) dev->priv)->stats.rx_bytes += priv->ule_skb->len; netif_rx(priv->ule_skb); } sndu_done: @@ -1019,7 +944,7 @@ static int dvb_net_feed_start(struct net_device *dev) dprintk("%s: start filtering\n", __FUNCTION__); priv->secfeed->start_filtering(priv->secfeed); } else if (priv->feedtype == DVB_NET_FEEDTYPE_ULE) { - struct timespec timeout = { 0, 10000000 }; // 10 msec + struct timespec timeout = { 0, 30000000 }; // 30 msec /* we have payloads encapsulated in TS */ dprintk("%s: alloc tsfeed\n", __FUNCTION__); @@ -1031,13 +956,10 @@ static int dvb_net_feed_start(struct net_device *dev) /* Set netdevice pointer for ts decaps callback. */ priv->tsfeed->priv = (void *)dev; - ret = priv->tsfeed->set(priv->tsfeed, - priv->pid, /* pid */ - TS_PACKET, /* type */ - DMX_TS_PES_OTHER, /* pes type */ + ret = priv->tsfeed->set(priv->tsfeed, priv->pid, + TS_PACKET, DMX_TS_PES_OTHER, 32768, /* circular buffer size */ - timeout /* timeout */ - ); + timeout); if (ret < 0) { printk("%s: could not set ts feed\n", dev->name); diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 40774feb8..3852430d0 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c @@ -231,8 +231,12 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, mutex_unlock(&dvbdev_register_lock); + devfs_mk_cdev(MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), + S_IFCHR | S_IRUSR | S_IWUSR, + "dvb/adapter%d/%s%d", adap->num, dnames[type], id); + class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), - adap->device, "dvb%d.%s%d", adap->num, dnames[type], id); + NULL, "dvb%d.%s%d", adap->num, dnames[type], id); dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", adap->num, dnames[type], id, nums2minor(adap->num, type, id), @@ -248,6 +252,9 @@ void dvb_unregister_device(struct dvb_device *dvbdev) if (!dvbdev) return; + devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, + dnames[dvbdev->type], dvbdev->id); + class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, dvbdev->type, dvbdev->id))); @@ -278,7 +285,7 @@ skip: } -int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct module *module, struct device *device) +int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct module *module) { int num; @@ -295,10 +302,10 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct modu printk ("DVB: registering new adapter (%s).\n", name); + devfs_mk_dir("dvb/adapter%d", num); adap->num = num; adap->name = name; adap->module = module; - adap->device = device; list_add_tail (&adap->list_head, &dvb_adapter_list); @@ -311,6 +318,8 @@ EXPORT_SYMBOL(dvb_register_adapter); int dvb_unregister_adapter(struct dvb_adapter *adap) { + devfs_remove("dvb/adapter%d", adap->num); + if (mutex_lock_interruptible(&dvbdev_register_lock)) return -ERESTARTSYS; list_del (&adap->list_head); @@ -400,6 +409,8 @@ static int __init init_dvbdev(void) goto error; } + devfs_mk_dir("dvb"); + dvb_class = class_create(THIS_MODULE, "dvb"); if (IS_ERR(dvb_class)) { retval = PTR_ERR(dvb_class); @@ -416,6 +427,7 @@ error: static void __exit exit_dvbdev(void) { + devfs_remove("dvb"); class_destroy(dvb_class); cdev_del(&dvb_device_cdev); unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); diff --git a/drivers/media/dvb/dvb-core/dvbdev.h b/drivers/media/dvb/dvb-core/dvbdev.h index 7a7f75fd1..74ed5853f 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.h +++ b/drivers/media/dvb/dvb-core/dvbdev.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #define DVB_MAJOR 212 @@ -50,8 +51,6 @@ struct dvb_adapter { u8 proposed_mac [6]; void* priv; - struct device *device; - struct module *module; }; @@ -77,7 +76,7 @@ struct dvb_device { }; -extern int dvb_register_adapter (struct dvb_adapter *adap, const char *name, struct module *module, struct device *device); +extern int dvb_register_adapter (struct dvb_adapter *adap, const char *name, struct module *module); extern int dvb_unregister_adapter (struct dvb_adapter *adap); extern int dvb_register_device (struct dvb_adapter *adap, diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 75824b771..e388fb156 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -2,7 +2,6 @@ config DVB_USB tristate "Support for various USB DVB devices" depends on DVB_CORE && USB && I2C select FW_LOADER - select DVB_PLL help By enabling this you will be able to choose the various supported USB1.1 and USB2.0 DVB devices. @@ -89,7 +88,6 @@ config DVB_USB_CXUSB select DVB_CX22702 select DVB_LGDT330X select DVB_MT352 - select DVB_ZL10353 help Say Y here to support the Conexant USB2.0 hybrid reference design. Currently, only DVB and ATSC modes are supported, analog mode @@ -132,15 +130,6 @@ config DVB_USB_VP702X DVB-S USB2.0 receivers. -config DVB_USB_GP8PSK - tristate "GENPIX 8PSK->USB module support" - depends on DVB_USB - help - Say Y here to support the - GENPIX 8psk module - - DVB-S USB2.0 receivers. - config DVB_USB_NOVA_T_USB2 tristate "Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 support" depends on DVB_USB diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile index 9643f56c7..2dc9aad96 100644 --- a/drivers/media/dvb/dvb-usb/Makefile +++ b/drivers/media/dvb/dvb-usb/Makefile @@ -7,9 +7,6 @@ obj-$(CONFIG_DVB_USB_VP7045) += dvb-usb-vp7045.o dvb-usb-vp702x-objs = vp702x.o vp702x-fe.o obj-$(CONFIG_DVB_USB_VP702X) += dvb-usb-vp702x.o -dvb-usb-gp8psk-objs = gp8psk.o gp8psk-fe.o -obj-$(CONFIG_DVB_USB_GP8PSK) += dvb-usb-gp8psk.o - dvb-usb-dtt200u-objs = dtt200u.o dtt200u-fe.o obj-$(CONFIG_DVB_USB_DTT200U) += dvb-usb-dtt200u.o diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index ae23bdde4..1f0d3e995 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c @@ -27,10 +27,8 @@ #include "cx22702.h" #include "lgdt330x.h" -#include "lg_h06xf.h" #include "mt352.h" #include "mt352_priv.h" -#include "zl10353.h" /* debug */ int dvb_usb_cxusb_debug; @@ -324,37 +322,32 @@ static int cxusb_mt352_demod_init(struct dvb_frontend* fe) return 0; } -static int cxusb_lgh064f_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *fep) -{ - struct dvb_usb_device *d = fe->dvb->priv; - return lg_h06xf_pll_set(fe, &d->i2c_adap, fep); -} - static struct cx22702_config cxusb_cx22702_config = { .demod_address = 0x63, .output_mode = CX22702_PARALLEL_OUTPUT, + + .pll_init = dvb_usb_pll_init_i2c, + .pll_set = dvb_usb_pll_set_i2c, }; static struct lgdt330x_config cxusb_lgdt3303_config = { .demod_address = 0x0e, .demod_chip = LGDT3303, + .pll_set = dvb_usb_pll_set_i2c, }; static struct mt352_config cxusb_dee1601_config = { .demod_address = 0x0f, .demod_init = cxusb_dee1601_demod_init, + .pll_set = dvb_usb_pll_set, }; -static struct zl10353_config cxusb_zl10353_dee1601_config = { - .demod_address = 0x0f, -}; - -static struct mt352_config cxusb_mt352_config = { +struct mt352_config cxusb_mt352_config = { /* used in both lgz201 and th7579 */ .demod_address = 0x0f, .demod_init = cxusb_mt352_demod_init, + .pll_set = dvb_usb_pll_set, }; /* Callbacks for DVB USB */ @@ -364,10 +357,17 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) d->pll_addr = 0x61; memcpy(d->pll_init, bpll, 4); d->pll_desc = &dvb_pll_fmd1216me; + return 0; +} - d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; - +static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d) +{ + u8 bpll[4] = { 0x00, 0x00, 0x18, 0x50 }; + /* bpll[2] : unset bit 3, set bits 4&5 + bpll[3] : 0x50 - digital, 0x20 - analog */ + d->pll_addr = 0x61; + memcpy(d->pll_init, bpll, 4); + d->pll_desc = &dvb_pll_tdvs_tua6034; return 0; } @@ -375,7 +375,6 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_thomson_dtt7579; - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -383,7 +382,6 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_lg_z201; - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -391,13 +389,6 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x60; d->pll_desc = &dvb_pll_thomson_dtt7579; - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; - return 0; -} - -static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) -{ - d->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; return 0; } @@ -448,8 +439,7 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d) cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); - if (((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) || - ((d->fe = zl10353_attach(&cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL)) + if ((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) return 0; return -EIO; @@ -565,7 +555,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { .streaming_ctrl = cxusb_streaming_ctrl, .power_ctrl = cxusb_bluebird_power_ctrl, .frontend_attach = cxusb_lgdt3303_frontend_attach, - .tuner_attach = cxusb_lgdt3303_tuner_attach, + .tuner_attach = cxusb_lgh064f_tuner_attach, .i2c_algo = &cxusb_i2c_algo, diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index abd75b4a3..2d52b7667 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -173,10 +173,11 @@ int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) struct dib3000_config demod_cfg; struct dibusb_state *st = d->priv; + demod_cfg.pll_set = dvb_usb_pll_set_i2c; + demod_cfg.pll_init = dvb_usb_pll_init_i2c; + for (demod_cfg.demod_address = 0x8; demod_cfg.demod_address < 0xd; demod_cfg.demod_address++) if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL) { - d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; return 0; } @@ -189,10 +190,6 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) { d->pll_addr = 0x60; d->pll_desc = &dvb_pll_env57h1xd5; - - d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; - return 0; } EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index f4c45f386..dd5a13195 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c @@ -20,12 +20,11 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d) struct dibusb_state *st = d->priv; demod_cfg.demod_address = 0x8; + demod_cfg.pll_set = dvb_usb_pll_set_i2c; + demod_cfg.pll_init = dvb_usb_pll_init_i2c; - if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) { - d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; + if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) return -ENODEV; - } d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index c14d9efb4..91136c00c 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c @@ -112,30 +112,27 @@ static int digitv_mt352_demod_init(struct dvb_frontend *fe) static struct mt352_config digitv_mt352_config = { .demod_init = digitv_mt352_demod_init, + .pll_set = dvb_usb_pll_set, }; -static int digitv_nxt6000_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) +static int digitv_nxt6000_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) { struct dvb_usb_device *d = fe->dvb->priv; u8 b[5]; - dvb_usb_tuner_calc_regs(fe,fep,b, 5); + dvb_usb_pll_set(fe,fep,b); return digitv_ctrl_msg(d,USB_WRITE_TUNER,0,&b[1],4,NULL,0); } static struct nxt6000_config digitv_nxt6000_config = { .clock_inversion = 1, + .pll_set = digitv_nxt6000_pll_set, }; static int digitv_frontend_attach(struct dvb_usb_device *d) { - if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL) { - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL || + (d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) return 0; - } - if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) { - d->fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; - return 0; - } return -EIO; } diff --git a/drivers/media/dvb/dvb-usb/dtt200u-fe.c b/drivers/media/dvb/dvb-usb/dtt200u-fe.c index 17413adec..cd21ddbfd 100644 --- a/drivers/media/dvb/dvb-usb/dtt200u-fe.c +++ b/drivers/media/dvb/dvb-usb/dtt200u-fe.c @@ -18,6 +18,7 @@ struct dtt200u_fe_state { struct dvb_frontend_parameters fep; struct dvb_frontend frontend; + struct dvb_frontend_ops ops; }; static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat) @@ -162,13 +163,16 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d) deb_info("attaching frontend dtt200u\n"); state->d = d; + memcpy(&state->ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops)); - memcpy(&state->frontend.ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; - return &state->frontend; + goto success; error: return NULL; +success: + return &state->frontend; } static struct dvb_frontend_ops dtt200u_fe_ops = { diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index ec631708c..6fa921002 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c @@ -82,7 +82,7 @@ int dvb_usb_dvb_init(struct dvb_usb_device *d) int ret; if ((ret = dvb_register_adapter(&d->dvb_adap, d->desc->name, - d->owner, &d->udev->dev)) < 0) { + d->owner)) < 0) { deb_info("dvb_register_adapter failed: error %d", ret); goto err; } @@ -121,15 +121,16 @@ int dvb_usb_dvb_init(struct dvb_usb_device *d) dvb_net_init(&d->dvb_adap, &d->dvb_net, &d->demux.dmx); - d->state |= DVB_USB_STATE_DVB; - return 0; - + goto success; err_dmx_dev: dvb_dmx_release(&d->demux); err_dmx: dvb_unregister_adapter(&d->dvb_adap); err: return ret; +success: + d->state |= DVB_USB_STATE_DVB; + return 0; } int dvb_usb_dvb_exit(struct dvb_usb_device *d) @@ -183,13 +184,13 @@ int dvb_usb_fe_init(struct dvb_usb_device* d) /* re-assign sleep and wakeup functions */ if (d->fe != NULL) { - d->fe_init = d->fe->ops.init; d->fe->ops.init = dvb_usb_fe_wakeup; - d->fe_sleep = d->fe->ops.sleep; d->fe->ops.sleep = dvb_usb_fe_sleep; + d->fe_init = d->fe->ops->init; d->fe->ops->init = dvb_usb_fe_wakeup; + d->fe_sleep = d->fe->ops->sleep; d->fe->ops->sleep = dvb_usb_fe_sleep; if (dvb_register_frontend(&d->dvb_adap, d->fe)) { err("Frontend registration failed."); - if (d->fe->ops.release) - d->fe->ops.release(d->fe); + if (d->fe->ops->release) + d->fe->ops->release(d->fe); d->fe = NULL; return -ENODEV; } diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c index 6b611a725..9b254532a 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c @@ -46,7 +46,7 @@ int dvb_usb_i2c_exit(struct dvb_usb_device *d) return 0; } -int dvb_usb_tuner_init_i2c(struct dvb_frontend *fe) +int dvb_usb_pll_init_i2c(struct dvb_frontend *fe) { struct dvb_usb_device *d = fe->dvb->priv; struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 }; @@ -63,8 +63,6 @@ int dvb_usb_tuner_init_i2c(struct dvb_frontend *fe) deb_pll("pll-buf: %x %x %x %x\n",d->pll_init[0],d->pll_init[1], d->pll_init[2],d->pll_init[3]); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) { err("tuner i2c write failed for pll_init."); ret = -EREMOTEIO; @@ -75,42 +73,38 @@ int dvb_usb_tuner_init_i2c(struct dvb_frontend *fe) d->tuner_pass_ctrl(fe,0,d->pll_addr); return ret; } -EXPORT_SYMBOL(dvb_usb_tuner_init_i2c); +EXPORT_SYMBOL(dvb_usb_pll_init_i2c); -int dvb_usb_tuner_calc_regs(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep, u8 *b, int buf_len) +int dvb_usb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep, u8 b[5]) { struct dvb_usb_device *d = fe->dvb->priv; - if (buf_len != 5) - return -EINVAL; if (d->pll_desc == NULL) return 0; deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc); - b[0] = d->pll_addr; + b[0] = d->pll_addr << 1; dvb_pll_configure(d->pll_desc,&b[1],fep->frequency,fep->u.ofdm.bandwidth); deb_pll("pll-buf: %x %x %x %x %x\n",b[0],b[1],b[2],b[3],b[4]); - return 5; + return 0; } -EXPORT_SYMBOL(dvb_usb_tuner_calc_regs); +EXPORT_SYMBOL(dvb_usb_pll_set); -int dvb_usb_tuner_set_params_i2c(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) +int dvb_usb_pll_set_i2c(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) { struct dvb_usb_device *d = fe->dvb->priv; int ret = 0; u8 b[5]; struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = &b[1], .len = 4 }; - dvb_usb_tuner_calc_regs(fe,fep,b,5); + dvb_usb_pll_set(fe,fep,b); if (d->tuner_pass_ctrl) d->tuner_pass_ctrl(fe,1,d->pll_addr); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) { err("tuner i2c write failed for pll_set."); ret = -EREMOTEIO; @@ -122,4 +116,4 @@ int dvb_usb_tuner_set_params_i2c(struct dvb_frontend *fe, struct dvb_frontend_pa return ret; } -EXPORT_SYMBOL(dvb_usb_tuner_set_params_i2c); +EXPORT_SYMBOL(dvb_usb_pll_set_i2c); diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 95698918b..cb239049b 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h @@ -31,7 +31,6 @@ #define USB_VID_VISIONPLUS 0x13d3 #define USB_VID_TWINHAN 0x1822 #define USB_VID_ULTIMA_ELECTRONIC 0x05d8 -#define USB_VID_GENPIX 0x09c0 /* Product IDs */ #define USB_PID_ADSTECH_USB2_COLD 0xa333 @@ -105,6 +104,5 @@ #define USB_PID_KYE_DVB_T_WARM 0x701f #define USB_PID_PCTV_200E 0x020e #define USB_PID_PCTV_400E 0x020f -#define USB_PID_GENPIX_8PSK_COLD 0x0200 -#define USB_PID_GENPIX_8PSK_WARM 0x0201 + #endif diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 97f8ea962..fead958a5 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -8,6 +8,7 @@ #ifndef __DVB_USB_H__ #define __DVB_USB_H__ +#include #include #include #include @@ -329,9 +330,9 @@ extern int dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16); extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *); /* commonly used pll init and set functions */ -extern int dvb_usb_tuner_init_i2c(struct dvb_frontend *); -extern int dvb_usb_tuner_calc_regs(struct dvb_frontend *, struct dvb_frontend_parameters *, u8 *buf, int buf_len); -extern int dvb_usb_tuner_set_params_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); +extern int dvb_usb_pll_init_i2c(struct dvb_frontend *); +extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]); +extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); /* commonly used firmware download types and function */ struct hexline { diff --git a/drivers/media/dvb/dvb-usb/gp8psk-fe.c b/drivers/media/dvb/dvb-usb/gp8psk-fe.c deleted file mode 100644 index 6ccbdc9cd..000000000 --- a/drivers/media/dvb/dvb-usb/gp8psk-fe.c +++ /dev/null @@ -1,272 +0,0 @@ -/* DVB USB compliant Linux driver for the - * - GENPIX 8pks/qpsk USB2.0 DVB-S module - * - * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) - * - * Thanks to GENPIX for the sample code used to implement this module. - * - * This module is based off the vp7045 and vp702x modules - * - * 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, version 2. - * - * see Documentation/dvb/README.dvb-usb for more information - */ -#include "gp8psk.h" - -struct gp8psk_fe_state { - struct dvb_frontend fe; - - struct dvb_usb_device *d; - - u16 snr; - - unsigned long next_snr_check; -}; - -static int gp8psk_fe_read_status(struct dvb_frontend* fe, fe_status_t *status) -{ - struct gp8psk_fe_state *st = fe->demodulator_priv; - u8 lock; - - if (gp8psk_usb_in_op(st->d, GET_SIGNAL_LOCK, 0, 0, &lock,1)) - return -EINVAL; - - if (lock) - *status = FE_HAS_LOCK | FE_HAS_SYNC | FE_HAS_VITERBI | FE_HAS_SIGNAL | FE_HAS_CARRIER; - else - *status = 0; - - return 0; -} - -/* not supported by this Frontend */ -static int gp8psk_fe_read_ber(struct dvb_frontend* fe, u32 *ber) -{ - (void) fe; - *ber = 0; - return 0; -} - -/* not supported by this Frontend */ -static int gp8psk_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) -{ - (void) fe; - *unc = 0; - return 0; -} - -static int gp8psk_fe_read_snr(struct dvb_frontend* fe, u16 *snr) -{ - struct gp8psk_fe_state *st = fe->demodulator_priv; - u8 buf[2]; - - if (time_after(jiffies,st->next_snr_check)) { - gp8psk_usb_in_op(st->d,GET_SIGNAL_STRENGTH,0,0,buf,2); - *snr = (int)(buf[1]) << 8 | buf[0]; - /* snr is reported in dBu*256 */ - /* snr / 38.4 ~= 100% strength */ - /* snr * 17 returns 100% strength as 65535 */ - if (*snr <= 3855) - *snr = (*snr<<4) + *snr; // snr * 17 - else - *snr = 65535; - st->next_snr_check = jiffies + (10*HZ)/1000; - } else { - *snr = st->snr; - } - return 0; -} - -static int gp8psk_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) -{ - return gp8psk_fe_read_snr(fe, strength); -} - -static int gp8psk_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) -{ - tune->min_delay_ms = 800; - return 0; -} - -static int gp8psk_fe_set_frontend(struct dvb_frontend* fe, - struct dvb_frontend_parameters *fep) -{ - struct gp8psk_fe_state *state = fe->demodulator_priv; - u8 cmd[10]; - u32 freq = fep->frequency * 1000; - - cmd[4] = freq & 0xff; - cmd[5] = (freq >> 8) & 0xff; - cmd[6] = (freq >> 16) & 0xff; - cmd[7] = (freq >> 24) & 0xff; - - switch(fe->ops.info.type) { - case FE_QPSK: - cmd[0] = fep->u.qpsk.symbol_rate & 0xff; - cmd[1] = (fep->u.qpsk.symbol_rate >> 8) & 0xff; - cmd[2] = (fep->u.qpsk.symbol_rate >> 16) & 0xff; - cmd[3] = (fep->u.qpsk.symbol_rate >> 24) & 0xff; - cmd[8] = ADV_MOD_DVB_QPSK; - cmd[9] = 0x03; /*ADV_MOD_FEC_XXX*/ - break; - default: - // other modes are unsuported right now - cmd[0] = 0; - cmd[1] = 0; - cmd[2] = 0; - cmd[3] = 0; - cmd[8] = 0; - cmd[9] = 0; - break; - } - - gp8psk_usb_out_op(state->d,TUNE_8PSK,0,0,cmd,10); - - state->next_snr_check = jiffies; - - return 0; -} - -static int gp8psk_fe_get_frontend(struct dvb_frontend* fe, - struct dvb_frontend_parameters *fep) -{ - return 0; -} - - -static int gp8psk_fe_send_diseqc_msg (struct dvb_frontend* fe, - struct dvb_diseqc_master_cmd *m) -{ - struct gp8psk_fe_state *st = fe->demodulator_priv; - - deb_fe("%s\n",__FUNCTION__); - - if (gp8psk_usb_out_op(st->d,SEND_DISEQC_COMMAND, m->msg[0], 0, - m->msg, m->msg_len)) { - return -EINVAL; - } - return 0; -} - -static int gp8psk_fe_send_diseqc_burst (struct dvb_frontend* fe, - fe_sec_mini_cmd_t burst) -{ - struct gp8psk_fe_state *st = fe->demodulator_priv; - u8 cmd; - - deb_fe("%s\n",__FUNCTION__); - - /* These commands are certainly wrong */ - cmd = (burst == SEC_MINI_A) ? 0x00 : 0x01; - - if (gp8psk_usb_out_op(st->d,SEND_DISEQC_COMMAND, cmd, 0, - &cmd, 0)) { - return -EINVAL; - } - return 0; -} - -static int gp8psk_fe_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone) -{ - struct gp8psk_fe_state* state = fe->demodulator_priv; - - if (gp8psk_usb_out_op(state->d,SET_22KHZ_TONE, - (tone == SEC_TONE_ON), 0, NULL, 0)) { - return -EINVAL; - } - return 0; -} - -static int gp8psk_fe_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t voltage) -{ - struct gp8psk_fe_state* state = fe->demodulator_priv; - - if (gp8psk_usb_out_op(state->d,SET_LNB_VOLTAGE, - voltage == SEC_VOLTAGE_18, 0, NULL, 0)) { - return -EINVAL; - } - return 0; -} - -static int gp8psk_fe_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long sw_cmd) -{ - struct gp8psk_fe_state* state = fe->demodulator_priv; - u8 cmd = sw_cmd & 0x7f; - - if (gp8psk_usb_out_op(state->d,SET_DN_SWITCH, cmd, 0, - NULL, 0)) { - return -EINVAL; - } - if (gp8psk_usb_out_op(state->d,SET_LNB_VOLTAGE, !!(sw_cmd & 0x80), - 0, NULL, 0)) { - return -EINVAL; - } - - return 0; -} - -static void gp8psk_fe_release(struct dvb_frontend* fe) -{ - struct gp8psk_fe_state *state = fe->demodulator_priv; - kfree(state); -} - -static struct dvb_frontend_ops gp8psk_fe_ops; - -struct dvb_frontend * gp8psk_fe_attach(struct dvb_usb_device *d) -{ - struct gp8psk_fe_state *s = kzalloc(sizeof(struct gp8psk_fe_state), GFP_KERNEL); - if (s == NULL) - goto error; - - s->d = d; - memcpy(&s->fe.ops, &gp8psk_fe_ops, sizeof(struct dvb_frontend_ops)); - s->fe.demodulator_priv = s; - - goto success; -error: - return NULL; -success: - return &s->fe; -} - - -static struct dvb_frontend_ops gp8psk_fe_ops = { - .info = { - .name = "Genpix 8psk-USB DVB-S", - .type = FE_QPSK, - .frequency_min = 950000, - .frequency_max = 2150000, - .frequency_stepsize = 100, - .symbol_rate_min = 1000000, - .symbol_rate_max = 45000000, - .symbol_rate_tolerance = 500, /* ppm */ - .caps = FE_CAN_INVERSION_AUTO | - 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 - }, - - .release = gp8psk_fe_release, - - .init = NULL, - .sleep = NULL, - - .set_frontend = gp8psk_fe_set_frontend, - .get_frontend = gp8psk_fe_get_frontend, - .get_tune_settings = gp8psk_fe_get_tune_settings, - - .read_status = gp8psk_fe_read_status, - .read_ber = gp8psk_fe_read_ber, - .read_signal_strength = gp8psk_fe_read_signal_strength, - .read_snr = gp8psk_fe_read_snr, - .read_ucblocks = gp8psk_fe_read_unc_blocks, - - .diseqc_send_master_cmd = gp8psk_fe_send_diseqc_msg, - .diseqc_send_burst = gp8psk_fe_send_diseqc_burst, - .set_tone = gp8psk_fe_set_tone, - .set_voltage = gp8psk_fe_set_voltage, - .dishnetwork_send_legacy_command = gp8psk_fe_send_legacy_dish_cmd, -}; diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c deleted file mode 100644 index 9a98f3fda..000000000 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ /dev/null @@ -1,256 +0,0 @@ -/* DVB USB compliant Linux driver for the - * - GENPIX 8pks/qpsk USB2.0 DVB-S module - * - * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) - * - * Thanks to GENPIX for the sample code used to implement this module. - * - * This module is based off the vp7045 and vp702x modules - * - * 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, version 2. - * - * see Documentation/dvb/README.dvb-usb for more information - */ -#include "gp8psk.h" - -/* debug */ -static char bcm4500_firmware[] = "dvb-usb-gp8psk-02.fw"; -int dvb_usb_gp8psk_debug; -module_param_named(debug,dvb_usb_gp8psk_debug, int, 0644); -MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); - -int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) -{ - int ret = 0,try = 0; - - if ((ret = mutex_lock_interruptible(&d->usb_mutex))) - return ret; - - while (ret >= 0 && ret != blen && try < 3) { - ret = usb_control_msg(d->udev, - usb_rcvctrlpipe(d->udev,0), - req, - USB_TYPE_VENDOR | USB_DIR_IN, - value,index,b,blen, - 2000); - deb_info("reading number %d (ret: %d)\n",try,ret); - try++; - } - - if (ret < 0 || ret != blen) { - warn("usb in operation failed."); - ret = -EIO; - } else - ret = 0; - - deb_xfer("in: req. %x, val: %x, ind: %x, buffer: ",req,value,index); - debug_dump(b,blen,deb_xfer); - - mutex_unlock(&d->usb_mutex); - - return ret; -} - -int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, - u16 index, u8 *b, int blen) -{ - int ret; - - deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index); - debug_dump(b,blen,deb_xfer); - - if ((ret = mutex_lock_interruptible(&d->usb_mutex))) - return ret; - - if (usb_control_msg(d->udev, - usb_sndctrlpipe(d->udev,0), - req, - USB_TYPE_VENDOR | USB_DIR_OUT, - value,index,b,blen, - 2000) != blen) { - warn("usb out operation failed."); - ret = -EIO; - } else - ret = 0; - mutex_unlock(&d->usb_mutex); - - return ret; -} - -static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) -{ - int ret; - const struct firmware *fw = NULL; - u8 *ptr, *buf; - if ((ret = request_firmware(&fw, bcm4500_firmware, - &d->udev->dev)) != 0) { - err("did not find the bcm4500 firmware file. (%s) " - "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", - bcm4500_firmware,ret); - return ret; - } - - ret = -EINVAL; - - if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) - goto out_rel_fw; - - info("downloaidng bcm4500 firmware from file '%s'",bcm4500_firmware); - - ptr = fw->data; - buf = kmalloc(512, GFP_KERNEL | GFP_DMA); - - while (ptr[0] != 0xff) { - u16 buflen = ptr[0] + 4; - if (ptr + buflen >= fw->data + fw->size) { - err("failed to load bcm4500 firmware."); - goto out_free; - } - memcpy(buf, ptr, buflen); - if (dvb_usb_generic_write(d, buf, buflen)) { - err("failed to load bcm4500 firmware."); - goto out_free; - } - ptr += buflen; - } - - ret = 0; - -out_free: - kfree(buf); -out_rel_fw: - release_firmware(fw); - - return ret; -} - -static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) -{ - u8 status, buf; - if (onoff) { - gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); - if (! (status & 0x01)) /* started */ - if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) - return -EINVAL; - - if (! (status & 0x02)) /* BCM4500 firmware loaded */ - if(gp8psk_load_bcm4500fw(d)) - return EINVAL; - - if (! (status & 0x04)) /* LNB Power */ - if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, - &buf, 1)) - return EINVAL; - - /* Set DVB mode */ - if(gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) - return -EINVAL; - gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); - } else { - /* Turn off LNB power */ - if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) - return EINVAL; - /* Turn off 8psk power */ - if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) - return -EINVAL; - - } - return 0; -} - - -static int gp8psk_streaming_ctrl(struct dvb_usb_device *d, int onoff) -{ - return gp8psk_usb_out_op(d, ARM_TRANSFER, onoff, 0 , NULL, 0); -} - -static int gp8psk_frontend_attach(struct dvb_usb_device *d) -{ - d->fe = gp8psk_fe_attach(d); - - return 0; -} - -static struct dvb_usb_properties gp8psk_properties; - -static int gp8psk_usb_probe(struct usb_interface *intf, - const struct usb_device_id *id) -{ - return dvb_usb_device_init(intf,&gp8psk_properties,THIS_MODULE,NULL); -} - -static struct usb_device_id gp8psk_usb_table [] = { - { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_COLD) }, - { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_WARM) }, - { 0 }, -}; -MODULE_DEVICE_TABLE(usb, gp8psk_usb_table); - -static struct dvb_usb_properties gp8psk_properties = { - .caps = 0, - - .usb_ctrl = CYPRESS_FX2, - .firmware = "dvb-usb-gp8psk-01.fw", - - .streaming_ctrl = gp8psk_streaming_ctrl, - .power_ctrl = gp8psk_power_ctrl, - .frontend_attach = gp8psk_frontend_attach, - - .generic_bulk_ctrl_endpoint = 0x01, - /* parameter for the MPEG2-data transfer */ - .urb = { - .type = DVB_USB_BULK, - .count = 7, - .endpoint = 0x82, - .u = { - .bulk = { - .buffersize = 8192, - } - } - }, - - .num_device_descs = 1, - .devices = { - { .name = "Genpix 8PSK-USB DVB-S USB2.0 receiver", - .cold_ids = { &gp8psk_usb_table[0], NULL }, - .warm_ids = { &gp8psk_usb_table[1], NULL }, - }, - { 0 }, - } -}; - -/* usb specific object needed to register this driver with the usb subsystem */ -static struct usb_driver gp8psk_usb_driver = { - .name = "dvb_usb_gp8psk", - .probe = gp8psk_usb_probe, - .disconnect = dvb_usb_device_exit, - .id_table = gp8psk_usb_table, -}; - -/* module stuff */ -static int __init gp8psk_usb_module_init(void) -{ - int result; - if ((result = usb_register(&gp8psk_usb_driver))) { - err("usb_register failed. (%d)",result); - return result; - } - - return 0; -} - -static void __exit gp8psk_usb_module_exit(void) -{ - /* deregister this driver from the USB subsystem */ - usb_deregister(&gp8psk_usb_driver); -} - -module_init(gp8psk_usb_module_init); -module_exit(gp8psk_usb_module_exit); - -MODULE_AUTHOR("Alan Nisota "); -MODULE_DESCRIPTION("Driver for Genpix 8psk-USB DVB-S USB2.0"); -MODULE_VERSION("1.0"); -MODULE_LICENSE("GPL"); diff --git a/drivers/media/dvb/dvb-usb/gp8psk.h b/drivers/media/dvb/dvb-usb/gp8psk.h deleted file mode 100644 index 3eba70610..000000000 --- a/drivers/media/dvb/dvb-usb/gp8psk.h +++ /dev/null @@ -1,79 +0,0 @@ -/* DVB USB compliant Linux driver for the - * - GENPIX 8pks/qpsk USB2.0 DVB-S module - * - * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) - * - * Thanks to GENPIX for the sample code used to implement this module. - * - * This module is based off the vp7045 and vp702x modules - * - * 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, version 2. - * - * see Documentation/dvb/README.dvb-usb for more information - */ -#ifndef _DVB_USB_GP8PSK_H_ -#define _DVB_USB_GP8PSK_H_ - -#define DVB_USB_LOG_PREFIX "gp8psk" -#include "dvb-usb.h" - -extern int dvb_usb_gp8psk_debug; -#define deb_info(args...) dprintk(dvb_usb_gp8psk_debug,0x01,args) -#define deb_xfer(args...) dprintk(dvb_usb_gp8psk_debug,0x02,args) -#define deb_rc(args...) dprintk(dvb_usb_gp8psk_debug,0x04,args) -#define deb_fe(args...) dprintk(dvb_usb_gp8psk_debug,0x08,args) -/* gp8psk commands */ - -/* Twinhan Vendor requests */ -#define TH_COMMAND_IN 0xC0 -#define TH_COMMAND_OUT 0xC1 - -/* command bytes */ -#define GET_8PSK_CONFIG 0x80 -#define SET_8PSK_CONFIG 0x81 -#define ARM_TRANSFER 0x85 -#define TUNE_8PSK 0x86 -#define GET_SIGNAL_STRENGTH 0x87 -#define LOAD_BCM4500 0x88 -#define BOOT_8PSK 0x89 -#define START_INTERSIL 0x8A -#define SET_LNB_VOLTAGE 0x8B -#define SET_22KHZ_TONE 0x8C -#define SEND_DISEQC_COMMAND 0x8D -#define SET_DVB_MODE 0x8E -#define SET_DN_SWITCH 0x8F -#define GET_SIGNAL_LOCK 0x90 - -/* Satellite modulation modes */ -#define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */ -#define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */ -#define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */ -#define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */ - -#define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */ -#define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */ -#define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */ -#define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */ -#define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */ -#define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */ - -#define GET_USB_SPEED 0x07 - #define USB_SPEED_LOW 0 - #define USB_SPEED_FULL 1 - #define USB_SPEED_HIGH 2 - -#define RESET_FX2 0x13 - -#define FW_VERSION_READ 0x0B -#define VENDOR_STRING_READ 0x0C -#define PRODUCT_STRING_READ 0x0D -#define FW_BCD_VERSION_READ 0x14 - -extern struct dvb_frontend * gp8psk_fe_attach(struct dvb_usb_device *d); -extern int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); -extern int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, - u16 index, u8 *b, int blen); - -#endif diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c index 97d74da0d..14f1911c7 100644 --- a/drivers/media/dvb/dvb-usb/umt-010.c +++ b/drivers/media/dvb/dvb-usb/umt-010.c @@ -57,6 +57,7 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d) memset(&umt_config,0,sizeof(struct mt352_config)); umt_config.demod_init = umt_mt352_demod_init; umt_config.demod_address = 0xf; + umt_config.pll_set = dvb_usb_pll_set; d->fe = mt352_attach(&umt_config, &d->i2c_adap); @@ -67,7 +68,6 @@ static int umt_tuner_attach (struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_tua6034; - d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c index d4da49413..2a89f8c5d 100644 --- a/drivers/media/dvb/dvb-usb/vp702x-fe.c +++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c @@ -287,16 +287,17 @@ struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d) goto error; s->d = d; - - memcpy(&s->fe.ops,&vp702x_fe_ops,sizeof(struct dvb_frontend_ops)); + s->fe.ops = &vp702x_fe_ops; s->fe.demodulator_priv = s; s->lnb_buf[1] = SET_LNB_POWER; s->lnb_buf[3] = 0xff; /* 0=tone burst, 2=data burst, ff=off */ - return &s->fe; + goto success; error: return NULL; +success: + return &s->fe; } diff --git a/drivers/media/dvb/dvb-usb/vp7045-fe.c b/drivers/media/dvb/dvb-usb/vp7045-fe.c index 8452eef90..9999336ae 100644 --- a/drivers/media/dvb/dvb-usb/vp7045-fe.c +++ b/drivers/media/dvb/dvb-usb/vp7045-fe.c @@ -23,6 +23,8 @@ struct vp7045_fe_state { struct dvb_frontend fe; + struct dvb_frontend_ops ops; + struct dvb_usb_device *d; }; @@ -149,12 +151,15 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d) goto error; s->d = d; - memcpy(&s->fe.ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&s->ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops)); + s->fe.ops = &s->ops; s->fe.demodulator_priv = s; - return &s->fe; + goto success; error: return NULL; +success: + return &s->fe; } diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index db978555b..37d5e0af1 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig @@ -6,43 +6,43 @@ comment "DVB-S (satellite) frontends" config DVB_STV0299 tristate "ST STV0299 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_CX24110 tristate "Conexant CX24110 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_CX24123 tristate "Conexant CX24123 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_TDA8083 tristate "Philips TDA8083 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_MT312 tristate "Zarlink VP310/MT312 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_VES1X93 tristate "VLSI VES1893 or VES1993 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. config DVB_S5H1420 tristate "Samsung S5H1420 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-S tuner module. Say Y when you want to support this frontend. @@ -51,7 +51,7 @@ comment "DVB-T (terrestrial) frontends" config DVB_SP8870 tristate "Spase sp8870 based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -63,7 +63,7 @@ config DVB_SP8870 config DVB_SP887X tristate "Spase sp887x based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -75,25 +75,25 @@ config DVB_SP887X config DVB_CX22700 tristate "Conexant CX22700 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_CX22702 tristate "Conexant cx22702 demodulator (OFDM)" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_L64781 tristate "LSI L64781" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_TDA1004X tristate "Philips TDA10045H/TDA10046H based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help A DVB-T tuner module. Say Y when you want to support this frontend. @@ -106,32 +106,32 @@ config DVB_TDA1004X config DVB_NXT6000 tristate "NxtWave Communications NXT6000 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_MT352 tristate "Zarlink MT352 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_ZL10353 tristate "Zarlink ZL10353 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Say Y when you want to support this frontend. config DVB_DIB3000MB tristate "DiBcom 3000M-B" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Designed for mobile usage. Say Y when you want to support this frontend. config DVB_DIB3000MC tristate "DiBcom 3000P/M-C" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-T tuner module. Designed for mobile usage. Say Y when you want to support this frontend. @@ -141,28 +141,28 @@ comment "DVB-C (cable) frontends" config DVB_VES1820 tristate "VLSI VES1820 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-C tuner module. Say Y when you want to support this frontend. config DVB_TDA10021 tristate "Philips TDA10021 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-C tuner module. Say Y when you want to support this frontend. config DVB_STV0297 tristate "ST STV0297 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help A DVB-C tuner module. Say Y when you want to support this frontend. -comment "ATSC (North American/Korean Terrestrial/Cable DTV) frontends" +comment "ATSC (North American/Korean Terresterial DTV) frontends" depends on DVB_CORE config DVB_NXT200X tristate "NxtWave Communications NXT2002/NXT2004 based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want @@ -176,7 +176,7 @@ config DVB_NXT200X config DVB_OR51211 tristate "Oren OR51211 based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help An ATSC 8VSB tuner module. Say Y when you want to support this frontend. @@ -188,7 +188,7 @@ config DVB_OR51211 config DVB_OR51132 tristate "Oren OR51132 based" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want @@ -203,7 +203,7 @@ config DVB_OR51132 config DVB_BCM3510 tristate "Broadcom BCM3510" - depends on DVB_CORE && I2C + depends on DVB_CORE select FW_LOADER help An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to @@ -211,29 +211,9 @@ config DVB_BCM3510 config DVB_LGDT330X tristate "LG Electronics LGDT3302/LGDT3303 based" - depends on DVB_CORE && I2C + depends on DVB_CORE help An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want to support this frontend. - -comment "Miscellaneous devices" - depends on DVB_CORE - -config DVB_PLL - tristate - depends on DVB_CORE && I2C - -config DVB_LNBP21 - tristate "LNBP21 SEC controller" - depends on DVB_CORE && I2C - help - An SEC control chip. - -config DVB_ISL6421 - tristate "ISL6421 SEC controller" - depends on DVB_CORE && I2C - help - An SEC control chip. - endmenu diff --git a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile index 0e4880b6d..d09b6071f 100644 --- a/drivers/media/dvb/frontends/Makefile +++ b/drivers/media/dvb/frontends/Makefile @@ -4,7 +4,7 @@ EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -obj-$(CONFIG_DVB_PLL) += dvb-pll.o +obj-$(CONFIG_DVB_CORE) += dvb-pll.o obj-$(CONFIG_DVB_STV0299) += stv0299.o obj-$(CONFIG_DVB_SP8870) += sp8870.o obj-$(CONFIG_DVB_CX22700) += cx22700.o @@ -31,5 +31,3 @@ obj-$(CONFIG_DVB_BCM3510) += bcm3510.o obj-$(CONFIG_DVB_S5H1420) += s5h1420.o obj-$(CONFIG_DVB_LGDT330X) += lgdt330x.o obj-$(CONFIG_DVB_CX24123) += cx24123.o -obj-$(CONFIG_DVB_LNBP21) += lnbp21.o -obj-$(CONFIG_DVB_ISL6421) += isl6421.o diff --git a/drivers/media/dvb/frontends/bcm3510.c b/drivers/media/dvb/frontends/bcm3510.c index baeb311de..1708a1d48 100644 --- a/drivers/media/dvb/frontends/bcm3510.c +++ b/drivers/media/dvb/frontends/bcm3510.c @@ -48,6 +48,7 @@ struct bcm3510_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct bcm3510_config* config; struct dvb_frontend frontend; @@ -790,9 +791,10 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config, state->config = config; state->i2c = i2c; + memcpy(&state->ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops)); /* create dvb_frontend */ - memcpy(&state->frontend.ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; mutex_init(&state->hab_mutex); diff --git a/drivers/media/dvb/frontends/bsbe1.h b/drivers/media/dvb/frontends/bsbe1.h index d8f65738e..78573b22a 100644 --- a/drivers/media/dvb/frontends/bsbe1.h +++ b/drivers/media/dvb/frontends/bsbe1.h @@ -89,13 +89,12 @@ static int alps_bsbe1_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ra return 0; } -static int alps_bsbe1_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters* params) { int ret; u8 data[4]; u32 div; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; - struct i2c_adapter *i2c = fe->tuner_priv; if ((params->frequency < 950000) || (params->frequency > 2150000)) return -EINVAL; @@ -106,8 +105,6 @@ static int alps_bsbe1_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); ret = i2c_transfer(i2c, &msg, 1); return (ret != 1) ? -EIO : 0; } @@ -120,6 +117,7 @@ static struct stv0299_config alps_bsbe1_config = { .skip_reinit = 0, .min_delay_ms = 100, .set_symbol_rate = alps_bsbe1_set_symbol_rate, + .pll_set = alps_bsbe1_pll_set, }; #endif diff --git a/drivers/media/dvb/frontends/bsru6.h b/drivers/media/dvb/frontends/bsru6.h index e231cd84b..2a5366ce7 100644 --- a/drivers/media/dvb/frontends/bsru6.h +++ b/drivers/media/dvb/frontends/bsru6.h @@ -101,12 +101,11 @@ static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ra return 0; } -static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int alps_bsru6_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params) { u8 buf[4]; u32 div; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; - struct i2c_adapter *i2c = fe->tuner_priv; if ((params->frequency < 950000) || (params->frequency > 2150000)) return -EINVAL; @@ -120,8 +119,6 @@ static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe, struct dvb_front if (params->frequency > 1530000) buf[3] = 0xc0; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; return 0; @@ -137,6 +134,7 @@ static struct stv0299_config alps_bsru6_config = { .volt13_op0_op1 = STV0299_VOLT13_OP1, .min_delay_ms = 100, .set_symbol_rate = alps_bsru6_set_symbol_rate, + .pll_set = alps_bsru6_pll_set, }; #endif diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index 13ad1bfae..755f774f6 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c @@ -34,6 +34,8 @@ struct cx22700_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + const struct cx22700_config* config; struct dvb_frontend frontend; @@ -134,7 +136,6 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet return -EINVAL; if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8) - return -EINVAL; if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) return -EINVAL; @@ -246,6 +247,12 @@ static int cx22700_init (struct dvb_frontend* fe) cx22700_writereg (state, 0x00, 0x01); + if (state->config->pll_init) { + cx22700_writereg (state, 0x0a, 0x00); /* open i2c bus switch */ + state->config->pll_init(fe); + cx22700_writereg (state, 0x0a, 0x01); /* close i2c bus switch */ + } + return 0; } @@ -326,11 +333,9 @@ static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ cx22700_writereg (state, 0x00, 0x00); - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - + cx22700_writereg (state, 0x0a, 0x00); /* open i2c bus switch */ + state->config->pll_set(fe, p); + cx22700_writereg (state, 0x0a, 0x01); /* close i2c bus switch */ cx22700_set_inversion (state, p->inversion); cx22700_set_tps (state, &p->u.ofdm); cx22700_writereg (state, 0x37, 0x01); /* PAL loop filter off */ @@ -348,17 +353,6 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par return cx22700_get_tps (state, &p->u.ofdm); } -static int cx22700_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct cx22700_state* state = fe->demodulator_priv; - - if (enable) { - return cx22700_writereg(state, 0x0a, 0x00); - } else { - return cx22700_writereg(state, 0x0a, 0x01); - } -} - static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) { fesettings->min_delay_ms = 150; @@ -387,12 +381,13 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &cx22700_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if (cx22700_readreg(state, 0x07) < 0) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &cx22700_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -418,7 +413,6 @@ static struct dvb_frontend_ops cx22700_ops = { .release = cx22700_release, .init = cx22700_init, - .i2c_gate_ctrl = cx22700_i2c_gate_ctrl, .set_frontend = cx22700_set_frontend, .get_frontend = cx22700_get_frontend, diff --git a/drivers/media/dvb/frontends/cx22700.h b/drivers/media/dvb/frontends/cx22700.h index dcd8979c1..c9145b458 100644 --- a/drivers/media/dvb/frontends/cx22700.h +++ b/drivers/media/dvb/frontends/cx22700.h @@ -29,6 +29,10 @@ struct cx22700_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index 4106d46c9..0fc899f81 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c @@ -40,6 +40,8 @@ struct cx22702_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + /* configuration settings */ const struct cx22702_config* config; @@ -209,10 +211,22 @@ static int cx22702_set_tps (struct dvb_frontend* fe, struct dvb_frontend_paramet u8 val; struct cx22702_state* state = fe->demodulator_priv; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + /* set PLL */ + cx22702_i2c_gate_ctrl(fe, 1); + if (state->config->pll_set) { + state->config->pll_set(fe, p); + } else if (state->config->pll_desc) { + u8 pllbuf[4]; + struct i2c_msg msg = { .addr = state->config->pll_address, + .buf = pllbuf, .len = 4 }; + dvb_pll_configure(state->config->pll_desc, pllbuf, + p->frequency, + p->u.ofdm.bandwidth); + i2c_transfer(state->i2c, &msg, 1); + } else { + BUG(); } + cx22702_i2c_gate_ctrl(fe, 0); /* set inversion */ cx22702_set_inversion (state, p->inversion); @@ -344,6 +358,10 @@ static int cx22702_init (struct dvb_frontend* fe) cx22702_writereg (state, 0xf8, (state->config->output_mode << 1) & 0x02); + /* init PLL */ + if (state->config->pll_init) + state->config->pll_init(fe); + cx22702_i2c_gate_ctrl(fe, 0); return 0; @@ -477,6 +495,7 @@ struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &cx22702_ops, sizeof(struct dvb_frontend_ops)); state->prevUCBlocks = 0; /* check if the demod is there */ @@ -484,7 +503,7 @@ struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &cx22702_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -511,7 +530,6 @@ static struct dvb_frontend_ops cx22702_ops = { .release = cx22702_release, .init = cx22702_init, - .i2c_gate_ctrl = cx22702_i2c_gate_ctrl, .set_frontend = cx22702_set_tps, .get_frontend = cx22702_get_frontend, @@ -522,6 +540,7 @@ static struct dvb_frontend_ops cx22702_ops = { .read_signal_strength = cx22702_read_signal_strength, .read_snr = cx22702_read_snr, .read_ucblocks = cx22702_read_ucblocks, + .i2c_gate_ctrl = cx22702_i2c_gate_ctrl, }; module_param(debug, int, 0644); diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h index 7f2f241e5..5633976a5 100644 --- a/drivers/media/dvb/frontends/cx22702.h +++ b/drivers/media/dvb/frontends/cx22702.h @@ -39,6 +39,13 @@ struct cx22702_config #define CX22702_PARALLEL_OUTPUT 0 #define CX22702_SERIAL_OUTPUT 1 u8 output_mode; + + /* PLL maintenance */ + u8 pll_address; + struct dvb_pll_desc *pll_desc; + + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c index ce3c7398b..f3edf8b51 100644 --- a/drivers/media/dvb/frontends/cx24110.c +++ b/drivers/media/dvb/frontends/cx24110.c @@ -36,6 +36,8 @@ struct cx24110_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + const struct cx24110_config* config; struct dvb_frontend frontend; @@ -248,7 +250,7 @@ static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate) static const u32 bands[]={5000000UL,15000000UL,90999000UL/2}; int i; - dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate); +dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate); if (srate>90999000UL/2) srate=90999000UL/2; if (srate<500000) @@ -364,6 +366,17 @@ static int cx24110_initfe(struct dvb_frontend* fe) cx24110_writereg(state, cx24110_regdata[i].reg, cx24110_regdata[i].data); }; + if (state->config->pll_init) state->config->pll_init(fe); + + return 0; +} + +static int cx24110_sleep(struct dvb_frontend *fe) +{ + struct cx24110_state *state = fe->demodulator_priv; + + if (state->config->pll_sleep) + return state->config->pll_sleep(fe); return 0; } @@ -535,12 +548,7 @@ static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par { struct cx24110_state *state = fe->demodulator_priv; - - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - + state->config->pll_set(fe, p); cx24110_set_inversion (state, p->inversion); cx24110_set_fec (state, p->u.qpsk.fec_inner); cx24110_set_symbolrate (state, p->u.qpsk.symbol_rate); @@ -604,6 +612,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &cx24110_ops, sizeof(struct dvb_frontend_ops)); state->lastber = 0; state->lastbler = 0; state->lastesn0 = 0; @@ -613,7 +622,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, if ((ret != 0x5a) && (ret != 0x69)) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &cx24110_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -642,6 +651,7 @@ static struct dvb_frontend_ops cx24110_ops = { .release = cx24110_release, .init = cx24110_initfe, + .sleep = cx24110_sleep, .set_frontend = cx24110_set_frontend, .get_frontend = cx24110_get_frontend, .read_status = cx24110_read_status, diff --git a/drivers/media/dvb/frontends/cx24110.h b/drivers/media/dvb/frontends/cx24110.h index b354a64e0..609ac642b 100644 --- a/drivers/media/dvb/frontends/cx24110.h +++ b/drivers/media/dvb/frontends/cx24110.h @@ -31,6 +31,11 @@ struct cx24110_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); + int (*pll_sleep)(struct dvb_frontend* fe); }; extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config, diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index 1e7e79037..691dc840d 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c @@ -41,12 +41,14 @@ static int debug; struct cx24123_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct cx24123_config* config; struct dvb_frontend frontend; u32 lastber; u16 snr; + u8 lnbreg; /* Some PLL specifics for tuning */ u32 VCAarg; @@ -247,6 +249,29 @@ static int cx24123_writereg(struct cx24123_state* state, int reg, int data) return 0; } +static int cx24123_writelnbreg(struct cx24123_state* state, int reg, int data) +{ + u8 buf[] = { reg, data }; + /* fixme: put the intersil addr int the config */ + struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = buf, .len = 2 }; + int err; + + if (debug>1) + printk("cx24123: %s: writeln addr=0x08, reg 0x%02x, value 0x%02x\n", + __FUNCTION__,reg, data); + + if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { + printk("%s: writelnbreg error (err == %i, reg == 0x%02x," + " data == 0x%02x)\n", __FUNCTION__, err, reg, data); + return -EREMOTEIO; + } + + /* cache the write, no way to read back */ + state->lnbreg = data; + + return 0; +} + static int cx24123_readreg(struct cx24123_state* state, u8 reg) { int ret; @@ -270,6 +295,11 @@ static int cx24123_readreg(struct cx24123_state* state, u8 reg) return b1[0]; } +static int cx24123_readlnbreg(struct cx24123_state* state, u8 reg) +{ + return state->lnbreg; +} + static int cx24123_set_inversion(struct cx24123_state* state, fe_spectral_inversion_t inversion) { u8 nom_reg = cx24123_readreg(state, 0x0e); @@ -428,8 +458,8 @@ static int cx24123_set_symbolrate(struct cx24123_state* state, u32 srate) u8 pll_mult; /* check if symbol rate is within limits */ - if ((srate > state->frontend.ops.info.symbol_rate_max) || - (srate < state->frontend.ops.info.symbol_rate_min)) + if ((srate > state->ops.info.symbol_rate_max) || + (srate < state->ops.info.symbol_rate_min)) return -EOPNOTSUPP;; /* choose the sampling rate high enough for the required operation, @@ -549,8 +579,8 @@ static int cx24123_pll_calculate(struct dvb_frontend* fe, struct dvb_frontend_pa ndiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) / 32) & 0x1ff; adiv = ( ((p->frequency * vco_div * 10) / (2 * XTAL / 1000)) % 32) & 0x1f; - if (adiv == 0 && ndiv > 0) - ndiv--; + if (adiv == 0) + ndiv++; /* control bits 11, refdiv 11, charge pump polarity 1, charge pump current, ndiv, adiv */ state->pllarg = (3 << 19) | (3 << 17) | (1 << 16) | (pump << 14) | (ndiv << 5) | adiv; @@ -657,6 +687,13 @@ static int cx24123_initfe(struct dvb_frontend* fe) for (i = 0; i < sizeof(cx24123_regdata) / sizeof(cx24123_regdata[0]); i++) cx24123_writereg(state, cx24123_regdata[i].reg, cx24123_regdata[i].data); + if (state->config->pll_init) + state->config->pll_init(fe); + + /* Configure the LNB for 14V */ + if (state->config->use_isl6421) + cx24123_writelnbreg(state, 0x0, 0x2a); + return 0; } @@ -665,18 +702,50 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage struct cx24123_state *state = fe->demodulator_priv; u8 val; - val = cx24123_readreg(state, 0x29) & ~0x40; + switch (state->config->use_isl6421) { - switch (voltage) { - case SEC_VOLTAGE_13: - dprintk("%s: setting voltage 13V\n", __FUNCTION__); - return cx24123_writereg(state, 0x29, val & 0x7f); - case SEC_VOLTAGE_18: - dprintk("%s: setting voltage 18V\n", __FUNCTION__); - return cx24123_writereg(state, 0x29, val | 0x80); - default: - return -EINVAL; - }; + case 1: + + val = cx24123_readlnbreg(state, 0x0); + + switch (voltage) { + case SEC_VOLTAGE_13: + dprintk("%s: isl6421 voltage = 13V\n",__FUNCTION__); + return cx24123_writelnbreg(state, 0x0, val & 0x32); /* V 13v */ + case SEC_VOLTAGE_18: + dprintk("%s: isl6421 voltage = 18V\n",__FUNCTION__); + return cx24123_writelnbreg(state, 0x0, val | 0x04); /* H 18v */ + case SEC_VOLTAGE_OFF: + dprintk("%s: isl5421 voltage off\n",__FUNCTION__); + return cx24123_writelnbreg(state, 0x0, val & 0x30); + default: + return -EINVAL; + }; + + case 0: + + val = cx24123_readreg(state, 0x29); + + switch (voltage) { + case SEC_VOLTAGE_13: + dprintk("%s: setting voltage 13V\n", __FUNCTION__); + if (state->config->enable_lnb_voltage) + state->config->enable_lnb_voltage(fe, 1); + return cx24123_writereg(state, 0x29, val | 0x80); + case SEC_VOLTAGE_18: + dprintk("%s: setting voltage 18V\n", __FUNCTION__); + if (state->config->enable_lnb_voltage) + state->config->enable_lnb_voltage(fe, 1); + return cx24123_writereg(state, 0x29, val & 0x7f); + case SEC_VOLTAGE_OFF: + dprintk("%s: setting voltage off\n", __FUNCTION__); + if (state->config->enable_lnb_voltage) + state->config->enable_lnb_voltage(fe, 0); + return 0; + default: + return -EINVAL; + }; + } return 0; } @@ -697,20 +766,27 @@ static void cx24123_wait_for_diseqc(struct cx24123_state *state) static int cx24123_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd *cmd) { struct cx24123_state *state = fe->demodulator_priv; - int i, val, tone; + int i, val; dprintk("%s:\n",__FUNCTION__); - /* stop continuous tone if enabled */ - tone = cx24123_readreg(state, 0x29); - if (tone & 0x10) - cx24123_writereg(state, 0x29, tone & ~0x50); + /* check if continuous tone has been stopped */ + if (state->config->use_isl6421) + val = cx24123_readlnbreg(state, 0x00) & 0x10; + else + val = cx24123_readreg(state, 0x29) & 0x10; + + + if (val) { + printk("%s: ERROR: attempt to send diseqc command before tone is off\n", __FUNCTION__); + return -ENOTSUPP; + } /* wait for diseqc queue ready */ cx24123_wait_for_diseqc(state); /* select tone mode */ - cx24123_writereg(state, 0x2a, cx24123_readreg(state, 0x2a) & 0xfb); + cx24123_writereg(state, 0x2a, cx24123_readreg(state, 0x2a) & 0xf8); for (i = 0; i < cmd->msg_len; i++) cx24123_writereg(state, 0x2C + i, cmd->msg[i]); @@ -721,33 +797,36 @@ static int cx24123_send_diseqc_msg(struct dvb_frontend* fe, struct dvb_diseqc_ma /* wait for diseqc message to finish sending */ cx24123_wait_for_diseqc(state); - /* restart continuous tone if enabled */ - if (tone & 0x10) { - cx24123_writereg(state, 0x29, tone & ~0x40); - } - return 0; } static int cx24123_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t burst) { struct cx24123_state *state = fe->demodulator_priv; - int val, tone; + int val; dprintk("%s:\n", __FUNCTION__); - /* stop continuous tone if enabled */ - tone = cx24123_readreg(state, 0x29); - if (tone & 0x10) - cx24123_writereg(state, 0x29, tone & ~0x50); + /* check if continuous tone has been stoped */ + if (state->config->use_isl6421) + val = cx24123_readlnbreg(state, 0x00) & 0x10; + else + val = cx24123_readreg(state, 0x29) & 0x10; + + + if (val) { + printk("%s: ERROR: attempt to send diseqc command before tone is off\n", __FUNCTION__); + return -ENOTSUPP; + } - /* wait for diseqc queue ready */ cx24123_wait_for_diseqc(state); /* select tone mode */ - cx24123_writereg(state, 0x2a, cx24123_readreg(state, 0x2a) | 0x4); - msleep(30); + val = cx24123_readreg(state, 0x2a) & 0xf8; + cx24123_writereg(state, 0x2a, val | 0x04); + val = cx24123_readreg(state, 0x29); + if (burst == SEC_MINI_A) cx24123_writereg(state, 0x29, ((val & 0x90) | 0x40 | 0x00)); else if (burst == SEC_MINI_B) @@ -756,12 +835,7 @@ static int cx24123_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t return -EINVAL; cx24123_wait_for_diseqc(state); - cx24123_writereg(state, 0x2a, cx24123_readreg(state, 0x2a) & 0xfb); - /* restart continuous tone if enabled */ - if (tone & 0x10) { - cx24123_writereg(state, 0x29, tone & ~0x40); - } return 0; } @@ -902,21 +976,38 @@ static int cx24123_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) struct cx24123_state *state = fe->demodulator_priv; u8 val; - /* wait for diseqc queue ready */ - cx24123_wait_for_diseqc(state); + switch (state->config->use_isl6421) { + case 1: - val = cx24123_readreg(state, 0x29) & ~0x40; + val = cx24123_readlnbreg(state, 0x0); + + switch (tone) { + case SEC_TONE_ON: + dprintk("%s: isl6421 sec tone on\n",__FUNCTION__); + return cx24123_writelnbreg(state, 0x0, val | 0x10); + case SEC_TONE_OFF: + dprintk("%s: isl6421 sec tone off\n",__FUNCTION__); + return cx24123_writelnbreg(state, 0x0, val & 0x2f); + default: + printk("%s: CASE reached default with tone=%d\n", __FUNCTION__, tone); + return -EINVAL; + } - switch (tone) { - case SEC_TONE_ON: - dprintk("%s: setting tone on\n", __FUNCTION__); - return cx24123_writereg(state, 0x29, val | 0x10); - case SEC_TONE_OFF: - dprintk("%s: setting tone off\n",__FUNCTION__); - return cx24123_writereg(state, 0x29, val & 0xef); - default: - printk("%s: CASE reached default with tone=%d\n", __FUNCTION__, tone); - return -EINVAL; + case 0: + + val = cx24123_readreg(state, 0x29); + + switch (tone) { + case SEC_TONE_ON: + dprintk("%s: setting tone on\n", __FUNCTION__); + return cx24123_writereg(state, 0x29, val | 0x10); + case SEC_TONE_OFF: + dprintk("%s: setting tone off\n",__FUNCTION__); + return cx24123_writereg(state, 0x29, val & 0xef); + default: + printk("%s: CASE reached default with tone=%d\n", __FUNCTION__, tone); + return -EINVAL; + } } return 0; @@ -949,8 +1040,10 @@ struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &cx24123_ops, sizeof(struct dvb_frontend_ops)); state->lastber = 0; state->snr = 0; + state->lnbreg = 0; state->VCAarg = 0; state->VGAarg = 0; state->bandselectarg = 0; @@ -966,7 +1059,7 @@ struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &cx24123_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/cx24123.h b/drivers/media/dvb/frontends/cx24123.h index 9606f8259..0c922b5e9 100644 --- a/drivers/media/dvb/frontends/cx24123.h +++ b/drivers/media/dvb/frontends/cx24123.h @@ -28,8 +28,21 @@ struct cx24123_config /* the demodulator's i2c address */ u8 demod_address; + /* + cards like Hauppauge Nova-S Plus/Nova-SE2 use an Intersil ISL6421 chip + for LNB control, while KWorld DVB-S 100 use the LNBDC and LNBTone bits + from register 0x29 of the CX24123 demodulator + */ + int use_isl6421; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); + /* Need to set device param for start_dma */ int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); + + void (*enable_lnb_voltage)(struct dvb_frontend* fe, int on); }; extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, diff --git a/drivers/media/dvb/frontends/dib3000-common.h b/drivers/media/dvb/frontends/dib3000-common.h index be1c0d3e1..c31d6df15 100644 --- a/drivers/media/dvb/frontends/dib3000-common.h +++ b/drivers/media/dvb/frontends/dib3000-common.h @@ -38,6 +38,8 @@ struct dib3000_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + /* configuration settings */ struct dib3000_config config; diff --git a/drivers/media/dvb/frontends/dib3000.h b/drivers/media/dvb/frontends/dib3000.h index ec927628d..2d5475b5c 100644 --- a/drivers/media/dvb/frontends/dib3000.h +++ b/drivers/media/dvb/frontends/dib3000.h @@ -30,6 +30,10 @@ struct dib3000_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance and the i2c address of the PLL */ + int (*pll_init)(struct dvb_frontend *fe); + int (*pll_set)(struct dvb_frontend *fe, struct dvb_frontend_parameters* params); }; struct dib_fe_xfer_ops diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index 5302e1188..ae589adb1 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include @@ -59,9 +60,8 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, fe_code_rate_t fe_cr = FEC_NONE; int search_state, seq; - if (tuner && fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, fep); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + if (tuner && state->config.pll_set) { + state->config.pll_set(fe, fep); deb_setf("bandwidth: "); switch (ofdm->bandwidth) { @@ -386,6 +386,9 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF); + if (state->config.pll_init) + state->config.pll_init(fe); + return 0; } @@ -704,6 +707,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, /* setup the state */ state->i2c = i2c; memcpy(&state->config,config,sizeof(struct dib3000_config)); + memcpy(&state->ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops)); /* check for the correct demod */ if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) @@ -713,7 +717,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; /* set the xfer operations */ diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index 98673474a..3b303dbb6 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c @@ -20,6 +20,7 @@ * see Documentation/dvb/README.dibusb for more information * */ +#include #include #include #include @@ -461,9 +462,8 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe, int search_state,auto_val; u16 val; - if (tuner && fe->ops.tuner_ops.set_params) { /* initial call from dvb */ - fe->ops.tuner_ops.set_params(fe, fep); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + if (tuner && state->config.pll_set) { /* initial call from dvb */ + state->config.pll_set(fe,fep); state->last_tuned_freq = fep->frequency; // if (!scanboost) { @@ -642,6 +642,9 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode) set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF); + if (state->config.pll_init) + state->config.pll_init(fe); + deb_info("init end\n"); return 0; } @@ -836,6 +839,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config, /* setup the state */ state->i2c = i2c; memcpy(&state->config,config,sizeof(struct dib3000_config)); + memcpy(&state->ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops)); /* check for the correct demod */ if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) @@ -855,7 +859,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; /* set the xfer operations */ @@ -872,7 +876,6 @@ error: kfree(state); return NULL; } -EXPORT_SYMBOL(dib3000mc_attach); static struct dvb_frontend_ops dib3000mc_ops = { @@ -911,3 +914,5 @@ static struct dvb_frontend_ops dib3000mc_ops = { MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); + +EXPORT_SYMBOL(dib3000mc_attach); diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index 887d6f420..40930a358 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c @@ -227,10 +227,10 @@ struct dvb_pll_desc dvb_pll_tua6034 = { EXPORT_SYMBOL(dvb_pll_tua6034); /* Infineon TUA6034 - * used in LG TDVS-H061F, LG TDVS-H062F and LG TDVS-H064F + * used in LG TDVS H061F and LG TDVS H062F */ -struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf = { - .name = "LG TDVS-H06xF", +struct dvb_pll_desc dvb_pll_tdvs_tua6034 = { + .name = "LG/Infineon TUA6034", .min = 54000000, .max = 863000000, .count = 3, @@ -240,7 +240,7 @@ struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf = { { 999999999, 44000000, 62500, 0xce, 0x04 }, }, }; -EXPORT_SYMBOL(dvb_pll_lg_tdvs_h06xf); +EXPORT_SYMBOL(dvb_pll_tdvs_tua6034); /* Philips FMD1216ME * used in Medion Hybrid PCMCIA card and USB Box @@ -419,19 +419,6 @@ struct dvb_pll_desc dvb_pll_thomson_fe6600 = { }; EXPORT_SYMBOL(dvb_pll_thomson_fe6600); -struct dvb_pll_priv { - /* i2c details */ - int pll_i2c_address; - struct i2c_adapter *i2c; - - /* the PLL descriptor */ - struct dvb_pll_desc *pll_desc; - - /* cached frequency/bandwidth */ - u32 frequency; - u32 bandwidth; -}; - /* ----------------------------------------------------------- */ /* code */ @@ -456,8 +443,7 @@ int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, if (debug) printk("pll: %s: freq=%d bw=%d | i=%d/%d\n", desc->name, freq, bandwidth, i, desc->count); - if (i == desc->count) - return -EINVAL; + BUG_ON(i == desc->count); div = (freq + desc->entries[i].offset) / desc->entries[i].stepsize; buf[0] = div >> 8; @@ -476,180 +462,6 @@ int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, } EXPORT_SYMBOL(dvb_pll_configure); -static int dvb_pll_release(struct dvb_frontend *fe) -{ - if (fe->tuner_priv) - kfree(fe->tuner_priv); - fe->tuner_priv = NULL; - return 0; -} - -static int dvb_pll_sleep(struct dvb_frontend *fe) -{ - struct dvb_pll_priv *priv = fe->tuner_priv; - u8 buf[4]; - struct i2c_msg msg = - { .addr = priv->pll_i2c_address, .flags = 0, .buf = buf, .len = sizeof(buf) }; - int i; - int result; - - if (priv->i2c == NULL) - return -EINVAL; - - for (i = 0; i < priv->pll_desc->count; i++) { - if (priv->pll_desc->entries[i].limit == 0) - break; - } - if (i == priv->pll_desc->count) - return 0; - - buf[0] = 0; - buf[1] = 0; - buf[2] = priv->pll_desc->entries[i].config; - buf[3] = priv->pll_desc->entries[i].cb; - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) { - return result; - } - - return 0; -} - -static int dvb_pll_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) -{ - struct dvb_pll_priv *priv = fe->tuner_priv; - u8 buf[4]; - struct i2c_msg msg = - { .addr = priv->pll_i2c_address, .flags = 0, .buf = buf, .len = sizeof(buf) }; - int result; - u32 div; - int i; - u32 bandwidth = 0; - - if (priv->i2c == NULL) - return -EINVAL; - - // DVBT bandwidth only just now - if (fe->ops.info.type == FE_OFDM) { - bandwidth = params->u.ofdm.bandwidth; - } - - if ((result = dvb_pll_configure(priv->pll_desc, buf, params->frequency, bandwidth)) != 0) - return result; - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) { - return result; - } - - // calculate the frequency we set it to - for (i = 0; i < priv->pll_desc->count; i++) { - if (params->frequency > priv->pll_desc->entries[i].limit) - continue; - break; - } - div = (params->frequency + priv->pll_desc->entries[i].offset) / priv->pll_desc->entries[i].stepsize; - priv->frequency = (div * priv->pll_desc->entries[i].stepsize) - priv->pll_desc->entries[i].offset; - priv->bandwidth = bandwidth; - - return 0; -} - -static int dvb_pll_calc_regs(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, u8 *buf, int buf_len) -{ - struct dvb_pll_priv *priv = fe->tuner_priv; - int result; - u32 div; - int i; - u32 bandwidth = 0; - - if (buf_len < 5) - return -EINVAL; - - // DVBT bandwidth only just now - if (fe->ops.info.type == FE_OFDM) { - bandwidth = params->u.ofdm.bandwidth; - } - - if ((result = dvb_pll_configure(priv->pll_desc, buf+1, params->frequency, bandwidth)) != 0) - return result; - buf[0] = priv->pll_i2c_address; - - // calculate the frequency we set it to - for (i = 0; i < priv->pll_desc->count; i++) { - if (params->frequency > priv->pll_desc->entries[i].limit) - continue; - break; - } - div = (params->frequency + priv->pll_desc->entries[i].offset) / priv->pll_desc->entries[i].stepsize; - priv->frequency = (div * priv->pll_desc->entries[i].stepsize) - priv->pll_desc->entries[i].offset; - priv->bandwidth = bandwidth; - - return 5; -} - -static int dvb_pll_get_frequency(struct dvb_frontend *fe, u32 *frequency) -{ - struct dvb_pll_priv *priv = fe->tuner_priv; - *frequency = priv->frequency; - return 0; -} - -static int dvb_pll_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) -{ - struct dvb_pll_priv *priv = fe->tuner_priv; - *bandwidth = priv->bandwidth; - return 0; -} - -static struct dvb_tuner_ops dvb_pll_tuner_ops = { - .release = dvb_pll_release, - .sleep = dvb_pll_sleep, - .set_params = dvb_pll_set_params, - .calc_regs = dvb_pll_calc_regs, - .get_frequency = dvb_pll_get_frequency, - .get_bandwidth = dvb_pll_get_bandwidth, -}; - -int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc) -{ - u8 b1 [] = { 0 }; - struct i2c_msg msg = { .addr = pll_addr, .flags = I2C_M_RD, .buf = b1, .len = 1 }; - struct dvb_pll_priv *priv = NULL; - int ret; - - if (i2c != NULL) { - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - - ret = i2c_transfer (i2c, &msg, 1); - if (ret != 1) - return -1; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - } - - priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL); - if (priv == NULL) - return -ENOMEM; - - priv->pll_i2c_address = pll_addr; - priv->i2c = i2c; - priv->pll_desc = desc; - - memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops, sizeof(struct dvb_tuner_ops)); - strncpy(fe->ops.tuner_ops.info.name, desc->name, 128); - fe->ops.tuner_ops.info.frequency_min = desc->min; - fe->ops.tuner_ops.info.frequency_min = desc->max; - - fe->tuner_priv = priv; - return 0; -} -EXPORT_SYMBOL(dvb_pll_attach); - MODULE_DESCRIPTION("dvb pll library"); MODULE_AUTHOR("Gerd Knorr"); MODULE_LICENSE("GPL"); diff --git a/drivers/media/dvb/frontends/dvb-pll.h b/drivers/media/dvb/frontends/dvb-pll.h index 66361cd18..2b8461784 100644 --- a/drivers/media/dvb/frontends/dvb-pll.h +++ b/drivers/media/dvb/frontends/dvb-pll.h @@ -5,9 +5,6 @@ #ifndef __DVB_PLL_H__ #define __DVB_PLL_H__ -#include -#include "dvb_frontend.h" - struct dvb_pll_desc { char *name; u32 min; @@ -34,7 +31,7 @@ extern struct dvb_pll_desc dvb_pll_unknown_1; extern struct dvb_pll_desc dvb_pll_tua6010xs; extern struct dvb_pll_desc dvb_pll_env57h1xd5; extern struct dvb_pll_desc dvb_pll_tua6034; -extern struct dvb_pll_desc dvb_pll_lg_tdvs_h06xf; +extern struct dvb_pll_desc dvb_pll_tdvs_tua6034; extern struct dvb_pll_desc dvb_pll_tda665x; extern struct dvb_pll_desc dvb_pll_fmd1216me; extern struct dvb_pll_desc dvb_pll_tded4; @@ -47,18 +44,7 @@ extern struct dvb_pll_desc dvb_pll_philips_td1316; extern struct dvb_pll_desc dvb_pll_thomson_fe6600; -extern int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, +int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, u32 freq, int bandwidth); -/** - * Attach a dvb-pll to the supplied frontend structure. - * - * @param fe Frontend to attach to. - * @param pll_addr i2c address of the PLL (if used). - * @param i2c i2c adapter to use (set to NULL if not used). - * @param desc dvb_pll_desc to use. - * @return 0 on success, nonzero on failure. - */ -extern int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc); - #endif diff --git a/drivers/media/dvb/frontends/dvb_dummy_fe.c b/drivers/media/dvb/frontends/dvb_dummy_fe.c index 6271b1e7f..645946a99 100644 --- a/drivers/media/dvb/frontends/dvb_dummy_fe.c +++ b/drivers/media/dvb/frontends/dvb_dummy_fe.c @@ -30,6 +30,7 @@ struct dvb_dummy_fe_state { + struct dvb_frontend_ops ops; struct dvb_frontend frontend; }; @@ -76,11 +77,6 @@ static int dvb_dummy_fe_get_frontend(struct dvb_frontend* fe, struct dvb_fronten static int dvb_dummy_fe_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) { - if (fe->ops->tuner_ops->set_params) { - fe->ops->tuner_ops->set_params(fe, p); - if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); - } - return 0; } @@ -120,8 +116,11 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); if (state == NULL) goto error; + /* setup the state */ + memcpy(&state->ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops)); + /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -140,8 +139,11 @@ struct dvb_frontend* dvb_dummy_fe_qpsk_attach() state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); if (state == NULL) goto error; + /* setup the state */ + memcpy(&state->ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops)); + /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -160,8 +162,11 @@ struct dvb_frontend* dvb_dummy_fe_qam_attach() state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); if (state == NULL) goto error; + /* setup the state */ + memcpy(&state->ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops)); + /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/isl6421.c b/drivers/media/dvb/frontends/isl6421.c deleted file mode 100644 index 58c34db31..000000000 --- a/drivers/media/dvb/frontends/isl6421.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * isl6421.h - driver for lnb supply and control ic ISL6421 - * - * Copyright (C) 2006 Andrew de Quincey - * Copyright (C) 2006 Oliver Endriss - * - * 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 - * - * - * the project's page is at http://www.linuxtv.org - */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dvb_frontend.h" -#include "isl6421.h" - -struct isl6421 { - u8 config; - u8 override_or; - u8 override_and; - struct i2c_adapter *i2c; - u8 i2c_addr; - void (*release_chain)(struct dvb_frontend* fe); -}; - -static int isl6421_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) -{ - struct isl6421 *isl6421 = (struct isl6421 *) fe->misc_priv; - struct i2c_msg msg = { .addr = isl6421->i2c_addr, .flags = 0, - .buf = &isl6421->config, - .len = sizeof(isl6421->config) }; - - isl6421->config &= ~(ISL6421_VSEL1 | ISL6421_EN1); - - switch(voltage) { - case SEC_VOLTAGE_OFF: - break; - case SEC_VOLTAGE_13: - isl6421->config |= ISL6421_EN1; - break; - case SEC_VOLTAGE_18: - isl6421->config |= (ISL6421_EN1 | ISL6421_VSEL1); - break; - default: - return -EINVAL; - }; - - isl6421->config |= isl6421->override_or; - isl6421->config &= isl6421->override_and; - - return (i2c_transfer(isl6421->i2c, &msg, 1) == 1) ? 0 : -EIO; -} - -static int isl6421_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) -{ - struct isl6421 *isl6421 = (struct isl6421 *) fe->misc_priv; - struct i2c_msg msg = { .addr = isl6421->i2c_addr, .flags = 0, - .buf = &isl6421->config, - .len = sizeof(isl6421->config) }; - - if (arg) - isl6421->config |= ISL6421_LLC1; - else - isl6421->config &= ~ISL6421_LLC1; - - isl6421->config |= isl6421->override_or; - isl6421->config &= isl6421->override_and; - - return (i2c_transfer(isl6421->i2c, &msg, 1) == 1) ? 0 : -EIO; -} - -static void isl6421_release(struct dvb_frontend *fe) -{ - struct isl6421 *isl6421 = (struct isl6421 *) fe->misc_priv; - - /* power off */ - isl6421_set_voltage(fe, SEC_VOLTAGE_OFF); - - /* free data & call next release routine */ - fe->ops.release = isl6421->release_chain; - kfree(fe->misc_priv); - fe->misc_priv = NULL; - if (fe->ops.release) - fe->ops.release(fe); -} - -int isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, - u8 override_set, u8 override_clear) -{ - struct isl6421 *isl6421 = kmalloc(sizeof(struct isl6421), GFP_KERNEL); - if (!isl6421) - return -ENOMEM; - - /* default configuration */ - isl6421->config = ISL6421_ISEL1; - isl6421->i2c = i2c; - isl6421->i2c_addr = i2c_addr; - fe->misc_priv = isl6421; - - /* bits which should be forced to '1' */ - isl6421->override_or = override_set; - - /* bits which should be forced to '0' */ - isl6421->override_and = ~override_clear; - - /* detect if it is present or not */ - if (isl6421_set_voltage(fe, SEC_VOLTAGE_OFF)) { - kfree(isl6421); - fe->misc_priv = NULL; - return -EIO; - } - - /* install release callback */ - isl6421->release_chain = fe->ops.release; - fe->ops.release = isl6421_release; - - /* override frontend ops */ - fe->ops.set_voltage = isl6421_set_voltage; - fe->ops.enable_high_lnb_voltage = isl6421_enable_high_lnb_voltage; - - return 0; -} -EXPORT_SYMBOL(isl6421_attach); - -MODULE_DESCRIPTION("Driver for lnb supply and control ic isl6421"); -MODULE_AUTHOR("Andrew de Quincey & Oliver Endriss"); -MODULE_LICENSE("GPL"); diff --git a/drivers/media/dvb/frontends/isl6421.h b/drivers/media/dvb/frontends/isl6421.h deleted file mode 100644 index 675f80a19..000000000 --- a/drivers/media/dvb/frontends/isl6421.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * isl6421.h - driver for lnb supply and control ic ISL6421 - * - * Copyright (C) 2006 Andrew de Quincey - * Copyright (C) 2006 Oliver Endriss - * - * 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 - * - * - * the project's page is at http://www.linuxtv.org - */ - -#ifndef _ISL6421_H -#define _ISL6421_H - -#include - -/* system register bits */ -#define ISL6421_OLF1 0x01 -#define ISL6421_EN1 0x02 -#define ISL6421_VSEL1 0x04 -#define ISL6421_LLC1 0x08 -#define ISL6421_ENT1 0x10 -#define ISL6421_ISEL1 0x20 -#define ISL6421_DCL 0x40 - -/* override_set and override_clear control which system register bits (above) to always set & clear */ -extern int isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, - u8 override_set, u8 override_clear); - -#endif diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c index f3bc82e44..1c7c91224 100644 --- a/drivers/media/dvb/frontends/l64781.c +++ b/drivers/media/dvb/frontends/l64781.c @@ -32,6 +32,7 @@ struct l64781_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct l64781_config* config; struct dvb_frontend frontend; @@ -140,10 +141,7 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa u8 val0x06; int bw = p->bandwidth - BANDWIDTH_8_MHZ; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + state->config->pll_set(fe, param); if (param->inversion != INVERSION_ON && param->inversion != INVERSION_OFF) @@ -465,6 +463,8 @@ static int l64781_init(struct dvb_frontend* fe) /* Everything is two's complement, soft bit and CSI_OUT too */ l64781_writereg (state, 0x1e, 0x09); + if (state->config->pll_init) state->config->pll_init(fe); + /* delay a bit after first init attempt */ if (state->first) { state->first = 0; @@ -508,6 +508,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &l64781_ops, sizeof(struct dvb_frontend_ops)); state->first = 1; /** @@ -553,7 +554,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &l64781_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/l64781.h b/drivers/media/dvb/frontends/l64781.h index 83b8bc210..947f65f87 100644 --- a/drivers/media/dvb/frontends/l64781.h +++ b/drivers/media/dvb/frontends/l64781.h @@ -29,6 +29,10 @@ struct l64781_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; diff --git a/drivers/media/dvb/frontends/lg_h06xf.h b/drivers/media/dvb/frontends/lg_h06xf.h deleted file mode 100644 index 754d51d11..000000000 --- a/drivers/media/dvb/frontends/lg_h06xf.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * lg_h06xf.h - ATSC Tuner support for LG TDVS-H06xF - * - * 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 _LG_H06XF_H_ -#define _LG_H06XF_H_ -#include "dvb-pll.h" - -static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_adap, - struct dvb_frontend_parameters* params) -{ - u8 buf[4]; - struct i2c_msg msg = { .addr = 0x61, .flags = 0, - .buf = buf, .len = sizeof(buf) }; - int err; - - dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { - printk(KERN_WARNING "lg_h06xf: %s error " - "(addr %02x <- %02x, err = %i)\n", - __FUNCTION__, buf[0], buf[1], err); - if (err < 0) - return err; - else - return -EREMOTEIO; - } - - /* Set the Auxiliary Byte. */ - buf[0] = buf[2]; - buf[0] &= ~0x20; - buf[0] |= 0x18; - buf[1] = 0x50; - msg.len = 2; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { - printk(KERN_WARNING "lg_h06xf: %s error " - "(addr %02x <- %02x, err = %i)\n", - __FUNCTION__, buf[0], buf[1], err); - if (err < 0) - return err; - else - return -EREMOTEIO; - } - - return 0; -} -#endif diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index 467f1994f..4691ac54b 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c @@ -29,7 +29,6 @@ * DViCO FusionHDTV 5 Lite * DViCO FusionHDTV 5 USB Gold * Air2PC/AirStar 2 ATSC 3rd generation (HD5000) - * pcHDTV HD5500 * * TODO: * signal strength always returns 0. @@ -60,6 +59,7 @@ if (debug) printk(KERN_DEBUG "lgdt330x: " args); \ struct lgdt330x_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* Configuration settings */ const struct lgdt330x_config* config; @@ -216,7 +216,7 @@ static int lgdt330x_init(struct dvb_frontend* fe) AGC_DELAY0, 0x07, AGC_DELAY2, 0xfe, /* Change the value of IAGCBW[15:8] - of inner AGC loop filter bandwidth */ + of inner AGC loop filter bandwith */ AGC_LOOP_BANDWIDTH0, 0x08, AGC_LOOP_BANDWIDTH1, 0x9a }; @@ -399,10 +399,8 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe, } /* Tune to the specified frequency */ - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + if (state->config->pll_set) + state->config->pll_set(fe, param); /* Keep track of the new frequency */ /* FIXME this is the wrong way to do this... */ @@ -435,6 +433,9 @@ static int lgdt3302_read_status(struct dvb_frontend* fe, fe_status_t* status) /* Test signal does not exist flag */ /* as well as the AGC lock flag. */ *status |= FE_HAS_SIGNAL; + } else { + /* Without a signal all other status bits are meaningless */ + return 0; } /* @@ -497,6 +498,9 @@ static int lgdt3303_read_status(struct dvb_frontend* fe, fe_status_t* status) /* Test input signal does not exist flag */ /* as well as the AGC lock flag. */ *status |= FE_HAS_SIGNAL; + } else { + /* Without a signal all other status bits are meaningless */ + return 0; } /* Carrier Recovery Lock Status Register */ @@ -668,7 +672,6 @@ static int lgdt3303_read_snr(struct dvb_frontend* fe, u16* snr) if (state->current_modulation == VSB_8) { - i2c_read_demod_bytes(state, 0x6e, buf, 5); /* Phase Tracker Mean-Square Error Register for VSB */ noise = ((buf[0] & 7) << 16) | (buf[3] << 8) | buf[4]; } else { @@ -718,19 +721,16 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, /* Setup the state */ state->config = config; state->i2c = i2c; - - /* Create dvb_frontend */ switch (config->demod_chip) { case LGDT3302: - memcpy(&state->frontend.ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); break; case LGDT3303: - memcpy(&state->frontend.ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops)); + memcpy(&state->ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops)); break; default: goto error; } - state->frontend.demodulator_priv = state; /* Verify communication with demod chip */ if (i2c_read_demod_bytes(state, 2, buf, 1)) @@ -739,6 +739,9 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, state->current_frequency = -1; state->current_modulation = -1; + /* Create dvb_frontend */ + state->frontend.ops = &state->ops; + state->frontend.demodulator_priv = state; return &state->frontend; error: diff --git a/drivers/media/dvb/frontends/lgdt330x.h b/drivers/media/dvb/frontends/lgdt330x.h index bad903c6f..2a6529ccc 100644 --- a/drivers/media/dvb/frontends/lgdt330x.h +++ b/drivers/media/dvb/frontends/lgdt330x.h @@ -43,6 +43,7 @@ struct lgdt330x_config /* PLL interface */ int (*pll_rf_set) (struct dvb_frontend* fe, int index); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); /* Need to set device param for start_dma */ int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); diff --git a/drivers/media/dvb/frontends/lnbp21.c b/drivers/media/dvb/frontends/lnbp21.c deleted file mode 100644 index e933edc8d..000000000 --- a/drivers/media/dvb/frontends/lnbp21.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * lnbp21.h - driver for lnb supply and control ic lnbp21 - * - * Copyright (C) 2006 Oliver Endriss - * - * 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 - * - * - * the project's page is at http://www.linuxtv.org - */ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dvb_frontend.h" -#include "lnbp21.h" - -struct lnbp21 { - u8 config; - u8 override_or; - u8 override_and; - struct i2c_adapter *i2c; - void (*release_chain)(struct dvb_frontend* fe); -}; - -static int lnbp21_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) -{ - struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; - struct i2c_msg msg = { .addr = 0x08, .flags = 0, - .buf = &lnbp21->config, - .len = sizeof(lnbp21->config) }; - - lnbp21->config &= ~(LNBP21_VSEL | LNBP21_EN); - - switch(voltage) { - case SEC_VOLTAGE_OFF: - break; - case SEC_VOLTAGE_13: - lnbp21->config |= LNBP21_EN; - break; - case SEC_VOLTAGE_18: - lnbp21->config |= (LNBP21_EN | LNBP21_VSEL); - break; - default: - return -EINVAL; - }; - - lnbp21->config |= lnbp21->override_or; - lnbp21->config &= lnbp21->override_and; - - return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; -} - -static int lnbp21_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) -{ - struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; - struct i2c_msg msg = { .addr = 0x08, .flags = 0, - .buf = &lnbp21->config, - .len = sizeof(lnbp21->config) }; - - if (arg) - lnbp21->config |= LNBP21_LLC; - else - lnbp21->config &= ~LNBP21_LLC; - - lnbp21->config |= lnbp21->override_or; - lnbp21->config &= lnbp21->override_and; - - return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; -} - -static void lnbp21_release(struct dvb_frontend *fe) -{ - struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; - - /* LNBP power off */ - lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF); - - /* free data & call next release routine */ - fe->ops.release = lnbp21->release_chain; - kfree(fe->misc_priv); - fe->misc_priv = NULL; - if (fe->ops.release) - fe->ops.release(fe); -} - -int lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear) -{ - struct lnbp21 *lnbp21 = kmalloc(sizeof(struct lnbp21), GFP_KERNEL); - if (!lnbp21) - return -ENOMEM; - - /* default configuration */ - lnbp21->config = LNBP21_ISEL; - lnbp21->i2c = i2c; - fe->misc_priv = lnbp21; - - /* bits which should be forced to '1' */ - lnbp21->override_or = override_set; - - /* bits which should be forced to '0' */ - lnbp21->override_and = ~override_clear; - - /* detect if it is present or not */ - if (lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF)) { - kfree(lnbp21); - fe->misc_priv = NULL; - return -EIO; - } - - /* install release callback */ - lnbp21->release_chain = fe->ops.release; - fe->ops.release = lnbp21_release; - - /* override frontend ops */ - fe->ops.set_voltage = lnbp21_set_voltage; - fe->ops.enable_high_lnb_voltage = lnbp21_enable_high_lnb_voltage; - - return 0; -} -EXPORT_SYMBOL(lnbp21_attach); - -MODULE_DESCRIPTION("Driver for lnb supply and control ic lnbp21"); -MODULE_AUTHOR("Oliver Endriss"); -MODULE_LICENSE("GPL"); diff --git a/drivers/media/dvb/frontends/lnbp21.h b/drivers/media/dvb/frontends/lnbp21.h index 047a4ab68..0dcbe61b6 100644 --- a/drivers/media/dvb/frontends/lnbp21.h +++ b/drivers/media/dvb/frontends/lnbp21.h @@ -27,7 +27,7 @@ #ifndef _LNBP21_H #define _LNBP21_H -/* system register bits */ +/* system register */ #define LNBP21_OLF 0x01 #define LNBP21_OTF 0x02 #define LNBP21_EN 0x04 @@ -37,9 +37,103 @@ #define LNBP21_ISEL 0x40 #define LNBP21_PCL 0x80 -#include +struct lnbp21 { + u8 config; + u8 override_or; + u8 override_and; + struct i2c_adapter *i2c; + void (*release_chain)(struct dvb_frontend* fe); +}; -/* override_set and override_clear control which system register bits (above) to always set & clear */ -extern int lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear); +static int lnbp21_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) +{ + struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; + struct i2c_msg msg = { .addr = 0x08, .flags = 0, + .buf = &lnbp21->config, + .len = sizeof(lnbp21->config) }; + + lnbp21->config &= ~(LNBP21_VSEL | LNBP21_EN); + + switch(voltage) { + case SEC_VOLTAGE_OFF: + break; + case SEC_VOLTAGE_13: + lnbp21->config |= LNBP21_EN; + break; + case SEC_VOLTAGE_18: + lnbp21->config |= (LNBP21_EN | LNBP21_VSEL); + break; + default: + return -EINVAL; + }; + + lnbp21->config |= lnbp21->override_or; + lnbp21->config &= lnbp21->override_and; + + return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; +} + +static int lnbp21_enable_high_lnb_voltage(struct dvb_frontend *fe, long arg) +{ + struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; + struct i2c_msg msg = { .addr = 0x08, .flags = 0, + .buf = &lnbp21->config, + .len = sizeof(lnbp21->config) }; + + if (arg) + lnbp21->config |= LNBP21_LLC; + else + lnbp21->config &= ~LNBP21_LLC; + + lnbp21->config |= lnbp21->override_or; + lnbp21->config &= lnbp21->override_and; + + return (i2c_transfer(lnbp21->i2c, &msg, 1) == 1) ? 0 : -EIO; +} + +static void lnbp21_exit(struct dvb_frontend *fe) +{ + struct lnbp21 *lnbp21 = (struct lnbp21 *) fe->misc_priv; + + /* LNBP power off */ + lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF); + + /* free data & call next release routine */ + fe->ops->release = lnbp21->release_chain; + kfree(fe->misc_priv); + fe->misc_priv = NULL; + if (fe->ops->release) + fe->ops->release(fe); +} + +static int lnbp21_init(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear) +{ + struct lnbp21 *lnbp21 = kmalloc(sizeof(struct lnbp21), GFP_KERNEL); + + if (!lnbp21) + return -ENOMEM; + + /* default configuration */ + lnbp21->config = LNBP21_ISEL; + + /* bits which should be forced to '1' */ + lnbp21->override_or = override_set; + + /* bits which should be forced to '0' */ + lnbp21->override_and = ~override_clear; + + /* install release callback */ + lnbp21->release_chain = fe->ops->release; + fe->ops->release = lnbp21_exit; + + /* override frontend ops */ + fe->ops->set_voltage = lnbp21_set_voltage; + fe->ops->enable_high_lnb_voltage = lnbp21_enable_high_lnb_voltage; + + lnbp21->i2c = i2c; + fe->misc_priv = lnbp21; + + return lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF); +} #endif diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c index 1ef821825..d3aea83cf 100644 --- a/drivers/media/dvb/frontends/mt312.c +++ b/drivers/media/dvb/frontends/mt312.c @@ -39,6 +39,7 @@ struct mt312_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct mt312_config* config; struct dvb_frontend frontend; @@ -276,6 +277,12 @@ static int mt312_initfe(struct dvb_frontend* fe) if ((ret = mt312_writereg(state, CS_SW_LIM, 0x69)) < 0) return ret; + if (state->config->pll_init) { + mt312_writereg(state, GPP_CTRL, 0x40); + state->config->pll_init(fe); + mt312_writereg(state, GPP_CTRL, 0x00); + } + return 0; } @@ -470,16 +477,16 @@ static int mt312_set_frontend(struct dvb_frontend* fe, dprintk("%s: Freq %d\n", __FUNCTION__, p->frequency); - if ((p->frequency < fe->ops.info.frequency_min) - || (p->frequency > fe->ops.info.frequency_max)) + if ((p->frequency < fe->ops->info.frequency_min) + || (p->frequency > fe->ops->info.frequency_max)) return -EINVAL; if ((p->inversion < INVERSION_OFF) || (p->inversion > INVERSION_ON)) return -EINVAL; - if ((p->u.qpsk.symbol_rate < fe->ops.info.symbol_rate_min) - || (p->u.qpsk.symbol_rate > fe->ops.info.symbol_rate_max)) + if ((p->u.qpsk.symbol_rate < fe->ops->info.symbol_rate_min) + || (p->u.qpsk.symbol_rate > fe->ops->info.symbol_rate_max)) return -EINVAL; if ((p->u.qpsk.fec_inner < FEC_NONE) @@ -522,10 +529,9 @@ static int mt312_set_frontend(struct dvb_frontend* fe, return -EINVAL; } - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + mt312_writereg(state, GPP_CTRL, 0x40); + state->config->pll_set(fe, p); + mt312_writereg(state, GPP_CTRL, 0x00); /* sr = (u16)(sr * 256.0 / 1000000.0) */ sr = mt312_div(p->u.qpsk.symbol_rate * 4, 15625); @@ -572,17 +578,6 @@ static int mt312_get_frontend(struct dvb_frontend* fe, return 0; } -static int mt312_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct mt312_state* state = fe->demodulator_priv; - - if (enable) { - return mt312_writereg(state, GPP_CTRL, 0x40); - } else { - return mt312_writereg(state, GPP_CTRL, 0x00); - } -} - static int mt312_sleep(struct dvb_frontend* fe) { struct mt312_state *state = fe->demodulator_priv; @@ -638,7 +633,6 @@ static struct dvb_frontend_ops vp310_mt312_ops = { .init = mt312_initfe, .sleep = mt312_sleep, - .i2c_gate_ctrl = mt312_i2c_gate_ctrl, .set_frontend = mt312_set_frontend, .get_frontend = mt312_get_frontend, @@ -669,22 +663,19 @@ struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if (mt312_readreg(state, ID, &state->id) < 0) goto error; - /* create dvb_frontend */ - memcpy(&state->frontend.ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); - state->frontend.demodulator_priv = state; - switch (state->id) { case ID_VP310: - strcpy(state->frontend.ops.info.name, "Zarlink VP310 DVB-S"); + strcpy(state->ops.info.name, "Zarlink VP310 DVB-S"); state->frequency = 90; break; case ID_MT312: - strcpy(state->frontend.ops.info.name, "Zarlink MT312 DVB-S"); + strcpy(state->ops.info.name, "Zarlink MT312 DVB-S"); state->frequency = 60; break; default: @@ -692,6 +683,9 @@ struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, goto error; } + /* create dvb_frontend */ + state->frontend.ops = &state->ops; + state->frontend.demodulator_priv = state; return &state->frontend; error: diff --git a/drivers/media/dvb/frontends/mt312.h b/drivers/media/dvb/frontends/mt312.h index 666a1bd1c..074d844f0 100644 --- a/drivers/media/dvb/frontends/mt312.h +++ b/drivers/media/dvb/frontends/mt312.h @@ -32,6 +32,10 @@ struct mt312_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c index 5de7376c9..aaaec909d 100644 --- a/drivers/media/dvb/frontends/mt352.c +++ b/drivers/media/dvb/frontends/mt352.c @@ -45,6 +45,7 @@ struct mt352_state { struct i2c_adapter* i2c; struct dvb_frontend frontend; + struct dvb_frontend_ops ops; /* configuration settings */ struct mt352_config config; @@ -285,25 +286,16 @@ static int mt352_set_parameters(struct dvb_frontend* fe, mt352_calc_nominal_rate(state, op->bandwidth, buf+4); mt352_calc_input_freq(state, buf+6); + state->config.pll_set(fe, param, buf+8); + mt352_write(fe, buf, sizeof(buf)); if (state->config.no_tuner) { - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 0); - } - - mt352_write(fe, buf, 8); + /* start decoding */ mt352_write(fe, fsm_go, 2); } else { - if (fe->ops.tuner_ops.calc_regs) { - fe->ops.tuner_ops.calc_regs(fe, param, buf+8, 5); - buf[8] <<= 1; - mt352_write(fe, buf, sizeof(buf)); - mt352_write(fe, tuner_go, 2); - } + /* start tuning */ + mt352_write(fe, tuner_go, 2); } - return 0; } @@ -549,12 +541,13 @@ struct dvb_frontend* mt352_attach(const struct mt352_config* config, /* setup the state */ state->i2c = i2c; memcpy(&state->config,config,sizeof(struct mt352_config)); + memcpy(&state->ops, &mt352_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if (mt352_read_register(state, CHIP_ID) != ID_MT352) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &mt352_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/mt352.h b/drivers/media/dvb/frontends/mt352.h index 9e7ff4b8f..03040cd59 100644 --- a/drivers/media/dvb/frontends/mt352.h +++ b/drivers/media/dvb/frontends/mt352.h @@ -49,6 +49,12 @@ struct mt352_config /* Initialise the demodulator and PLL. Cannot be NULL */ int (*demod_init)(struct dvb_frontend* fe); + + /* PLL setup - fill out the supplied 5 byte buffer with your PLL settings. + * byte0: Set to pll i2c address (nonlinux; left shifted by 1) + * byte1-4: PLL configuration. + */ + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pllbuf); }; extern struct dvb_frontend* mt352_attach(const struct mt352_config* config, diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index 87c286ee6..9e3535394 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c @@ -55,6 +55,7 @@ struct nxt200x_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct nxt200x_config* config; struct dvb_frontend frontend; @@ -332,17 +333,17 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data) dprintk("%s\n", __FUNCTION__); - dprintk("Tuner Bytes: %02X %02X %02X %02X\n", data[1], data[2], data[3], data[4]); + dprintk("Tuner Bytes: %02X %02X %02X %02X\n", data[0], data[1], data[2], data[3]); /* if NXT2004, write directly to tuner. if NXT2002, write through NXT chip. * direct write is required for Philips TUV1236D and ALPS TDHU2 */ switch (state->demod_chip) { case NXT2004: - if (i2c_writebytes(state, data[0], data+1, 4)) + if (i2c_writebytes(state, state->config->pll_address, data, 4)) printk(KERN_WARNING "nxt200x: error writing to tuner\n"); /* wait until we have a lock */ while (count < 20) { - i2c_readbytes(state, data[0], &buf, 1); + i2c_readbytes(state, state->config->pll_address, &buf, 1); if (buf & 0x40) return 0; msleep(100); @@ -360,10 +361,10 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data) nxt200x_writebytes(state, 0x34, &buf, 1); /* write actual tuner bytes */ - nxt200x_writebytes(state, 0x36, data+1, 4); + nxt200x_writebytes(state, 0x36, data, 4); /* set tuner i2c address */ - buf = data[0] << 1; + buf = state->config->pll_address; nxt200x_writebytes(state, 0x35, &buf, 1); /* write UC Opmode to begin transfer */ @@ -533,7 +534,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, struct dvb_frontend_parameters *p) { struct nxt200x_state* state = fe->demodulator_priv; - u8 buf[5]; + u8 buf[4]; /* stop the micro first */ nxt200x_microcontroller_stop(state); @@ -547,9 +548,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, } /* get tuning information */ - if (fe->ops.tuner_ops.calc_regs) { - fe->ops.tuner_ops.calc_regs(fe, p, buf, 5); - } + dvb_pll_configure(state->config->pll_desc, buf, p->frequency, 0); /* set additional params */ switch (p->u.vsb.modulation) { @@ -896,9 +895,9 @@ static int nxt2002_init(struct dvb_frontend* fe) } ret = nxt2002_load_firmware(fe, fw); - release_firmware(fw); if (ret) { printk("nxt2002: Writing firmware to device failed\n"); + release_firmware(fw); return ret; } printk("nxt2002: Firmware upload complete\n"); @@ -960,9 +959,9 @@ static int nxt2004_init(struct dvb_frontend* fe) } ret = nxt2004_load_firmware(fe, fw); - release_firmware(fw); if (ret) { printk("nxt2004: Writing firmware to device failed\n"); + release_firmware(fw); return ret; } printk("nxt2004: Firmware upload complete\n"); @@ -1160,6 +1159,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &nxt200x_ops, sizeof(struct dvb_frontend_ops)); state->initialised = 0; /* read card id */ @@ -1198,7 +1198,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &nxt200x_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/nxt200x.h b/drivers/media/dvb/frontends/nxt200x.h index 34d617358..1d9d70bc3 100644 --- a/drivers/media/dvb/frontends/nxt200x.h +++ b/drivers/media/dvb/frontends/nxt200x.h @@ -38,6 +38,10 @@ struct nxt200x_config /* the demodulator's i2c address */ u8 demod_address; + /* tuner information */ + u8 pll_address; + struct dvb_pll_desc *pll_desc; + /* used to set pll input */ int (*set_pll_input)(u8* buf, int input); diff --git a/drivers/media/dvb/frontends/nxt6000.c b/drivers/media/dvb/frontends/nxt6000.c index d313d7dcf..a16eeba00 100644 --- a/drivers/media/dvb/frontends/nxt6000.c +++ b/drivers/media/dvb/frontends/nxt6000.c @@ -33,6 +33,7 @@ struct nxt6000_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct nxt6000_config* config; struct dvb_frontend frontend; @@ -206,6 +207,12 @@ static void nxt6000_setup(struct dvb_frontend* fe) nxt6000_writereg(state, SUB_DIAG_MODE_SEL, 0); nxt6000_writereg(state, TS_FORMAT, 0); + + if (state->config->pll_init) { + nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x01); /* open i2c bus switch */ + state->config->pll_init(fe); + nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x00); /* close i2c bus switch */ + } } static void nxt6000_dump_status(struct nxt6000_state *state) @@ -462,10 +469,9 @@ static int nxt6000_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par struct nxt6000_state* state = fe->demodulator_priv; int result; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x01); /* open i2c bus switch */ + state->config->pll_set(fe, param); + nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x00); /* close i2c bus switch */ if ((result = nxt6000_set_bandwidth(state, param->u.ofdm.bandwidth)) < 0) return result; @@ -526,17 +532,6 @@ static int nxt6000_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_fron return 0; } -static int nxt6000_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct nxt6000_state* state = fe->demodulator_priv; - - if (enable) { - return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x01); - } else { - return nxt6000_writereg(state, ENABLE_TUNER_IIC, 0x00); - } -} - static struct dvb_frontend_ops nxt6000_ops; struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, @@ -551,12 +546,13 @@ struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if (nxt6000_readreg(state, OFDM_MSC_REV) != NXT6000ASICDEVICE) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -588,7 +584,6 @@ static struct dvb_frontend_ops nxt6000_ops = { .release = nxt6000_release, .init = nxt6000_init, - .i2c_gate_ctrl = nxt6000_i2c_gate_ctrl, .get_tune_settings = nxt6000_fe_get_tune_settings, diff --git a/drivers/media/dvb/frontends/nxt6000.h b/drivers/media/dvb/frontends/nxt6000.h index 117031d11..b7d9bead3 100644 --- a/drivers/media/dvb/frontends/nxt6000.h +++ b/drivers/media/dvb/frontends/nxt6000.h @@ -31,6 +31,10 @@ struct nxt6000_config /* should clock inversion be used? */ u8 clock_inversion:1; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config, diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c index d20ab30c1..80e0f2812 100644 --- a/drivers/media/dvb/frontends/or51132.c +++ b/drivers/media/dvb/frontends/or51132.c @@ -54,6 +54,7 @@ static int debug; struct or51132_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* Configuration settings */ const struct or51132_config* config; @@ -105,8 +106,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware { struct or51132_state* state = fe->demodulator_priv; static u8 run_buf[] = {0x7F,0x01}; - u8 rec_buf[8]; - u8 cmd_buf[3]; + static u8 get_ver_buf[] = {0x04,0x00,0x30,0x00,0x00}; + u8 rec_buf[14]; + u8 cmd_buf[14]; u32 firmwareAsize, firmwareBsize; int i,ret; @@ -155,6 +157,7 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware cmd_buf[0] = 0x10; cmd_buf[1] = 0x10; cmd_buf[2] = 0x00; + cmd_buf[3] = 0x00; msleep(20); /* 20ms */ if ((ret = i2c_writebytes(state,state->config->demod_address, cmd_buf,3))) { @@ -164,6 +167,8 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware cmd_buf[0] = 0x04; cmd_buf[1] = 0x17; + cmd_buf[2] = 0x00; + cmd_buf[3] = 0x00; msleep(20); /* 20ms */ if ((ret = i2c_writebytes(state,state->config->demod_address, cmd_buf,2))) { @@ -173,6 +178,8 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware cmd_buf[0] = 0x00; cmd_buf[1] = 0x00; + cmd_buf[2] = 0x00; + cmd_buf[3] = 0x00; msleep(20); /* 20ms */ if ((ret = i2c_writebytes(state,state->config->demod_address, cmd_buf,2))) { @@ -182,11 +189,7 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware for(i=0;i<4;i++) { msleep(20); /* 20ms */ - /* Once upon a time, this command might have had something - to do with getting the firmware version, but it's - not used anymore: - {0x04,0x00,0x30,0x00,i+1} */ - /* Read 8 bytes, two bytes at a time */ + get_ver_buf[4] = i+1; if ((ret = i2c_readbytes(state,state->config->demod_address, &rec_buf[i*2],2))) { printk(KERN_WARNING @@ -205,6 +208,7 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware cmd_buf[0] = 0x10; cmd_buf[1] = 0x00; cmd_buf[2] = 0x00; + cmd_buf[3] = 0x00; msleep(20); /* 20ms */ if ((ret = i2c_writebytes(state,state->config->demod_address, cmd_buf,3))) { @@ -239,7 +243,7 @@ static int or51132_sleep(struct dvb_frontend* fe) static int or51132_setmode(struct dvb_frontend* fe) { struct or51132_state* state = fe->demodulator_priv; - unsigned char cmd_buf[3]; + unsigned char cmd_buf[4]; dprintk("setmode %d\n",(int)state->current_modulation); /* set operation mode in Receiver 1 register; */ @@ -259,6 +263,7 @@ static int or51132_setmode(struct dvb_frontend* fe) default: printk("setmode:Modulation set to unsupported value\n"); }; + cmd_buf[3] = 0x00; if (i2c_writebytes(state,state->config->demod_address, cmd_buf,3)) { printk(KERN_WARNING "or51132: set_mode error 1\n"); @@ -296,6 +301,7 @@ static int or51132_setmode(struct dvb_frontend* fe) default: printk("setmode: Modulation set to unsupported value\n"); }; + cmd_buf[3] = 0x00; msleep(20); /* 20ms */ if (i2c_writebytes(state,state->config->demod_address, cmd_buf,3)) { @@ -307,65 +313,52 @@ static int or51132_setmode(struct dvb_frontend* fe) return 0; } -/* Some modulations use the same firmware. This classifies modulations - by the firmware they use. */ -#define MOD_FWCLASS_UNKNOWN 0 -#define MOD_FWCLASS_VSB 1 -#define MOD_FWCLASS_QAM 2 -static int modulation_fw_class(fe_modulation_t modulation) -{ - switch(modulation) { - case VSB_8: - return MOD_FWCLASS_VSB; - case QAM_AUTO: - case QAM_64: - case QAM_256: - return MOD_FWCLASS_QAM; - default: - return MOD_FWCLASS_UNKNOWN; - } -} - static int or51132_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_parameters *param) { int ret; + u8 buf[4]; struct or51132_state* state = fe->demodulator_priv; const struct firmware *fw; - const char *fwname; - int clock_mode; - - /* Upload new firmware only if we need a different one */ - if (modulation_fw_class(state->current_modulation) != - modulation_fw_class(param->u.vsb.modulation)) { - switch(modulation_fw_class(param->u.vsb.modulation)) { - case MOD_FWCLASS_VSB: - dprintk("set_parameters VSB MODE\n"); - fwname = OR51132_VSB_FIRMWARE; + /* Change only if we are actually changing the modulation */ + if (state->current_modulation != param->u.vsb.modulation) { + switch(param->u.vsb.modulation) { + case VSB_8: + dprintk("set_parameters VSB MODE\n"); + printk("or51132: Waiting for firmware upload(%s)...\n", + OR51132_VSB_FIRMWARE); + ret = request_firmware(&fw, OR51132_VSB_FIRMWARE, + &state->i2c->dev); + if (ret){ + printk(KERN_WARNING "or51132: No firmware up" + "loaded(timeout or file not found?)\n"); + return ret; + } /* Set non-punctured clock for VSB */ - clock_mode = 0; + state->config->set_ts_params(fe, 0); break; - case MOD_FWCLASS_QAM: + case QAM_AUTO: + case QAM_64: + case QAM_256: dprintk("set_parameters QAM MODE\n"); - fwname = OR51132_QAM_FIRMWARE; - + printk("or51132: Waiting for firmware upload(%s)...\n", + OR51132_QAM_FIRMWARE); + ret = request_firmware(&fw, OR51132_QAM_FIRMWARE, + &state->i2c->dev); + if (ret){ + printk(KERN_WARNING "or51132: No firmware up" + "loaded(timeout or file not found?)\n"); + return ret; + } /* Set punctured clock for QAM */ - clock_mode = 1; + state->config->set_ts_params(fe, 1); break; default: - printk("or51132: Modulation type(%d) UNSUPPORTED\n", + printk("or51132:Modulation type(%d) UNSUPPORTED\n", param->u.vsb.modulation); return -1; - } - printk("or51132: Waiting for firmware upload(%s)...\n", - fwname); - ret = request_firmware(&fw, fwname, &state->i2c->dev); - if (ret) { - printk(KERN_WARNING "or51132: No firmware up" - "loaded(timeout or file not found?)\n"); - return ret; - } + }; ret = or51132_load_firmware(fe, fw); release_firmware(fw); if (ret) { @@ -374,18 +367,18 @@ static int or51132_set_parameters(struct dvb_frontend* fe, return ret; } printk("or51132: Firmware upload complete.\n"); - state->config->set_ts_params(fe, clock_mode); - } - /* Change only if we are actually changing the modulation */ - if (state->current_modulation != param->u.vsb.modulation) { + state->current_modulation = param->u.vsb.modulation; or51132_setmode(fe); } - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + dvb_pll_configure(state->config->pll_desc, buf, + param->frequency, 0); + dprintk("set_parameters tuner bytes: 0x%02x 0x%02x " + "0x%02x 0x%02x\n",buf[0],buf[1],buf[2],buf[3]); + if (i2c_writebytes(state, state->config->pll_address ,buf, 4)) + printk(KERN_WARNING "or51132: set_parameters error " + "writing to tuner\n"); /* Set to current mode */ or51132_setmode(fe); @@ -395,44 +388,6 @@ static int or51132_set_parameters(struct dvb_frontend* fe, return 0; } -static int or51132_get_parameters(struct dvb_frontend* fe, - struct dvb_frontend_parameters *param) -{ - struct or51132_state* state = fe->demodulator_priv; - u8 buf[2]; - - /* Receiver Status */ - buf[0]=0x04; - buf[1]=0x00; - msleep(30); /* 30ms */ - if (i2c_writebytes(state,state->config->demod_address,buf,2)) { - printk(KERN_WARNING "or51132: get_parameters write error\n"); - return -EREMOTEIO; - } - msleep(30); /* 30ms */ - if (i2c_readbytes(state,state->config->demod_address,buf,2)) { - printk(KERN_WARNING "or51132: get_parameters read error\n"); - return -EREMOTEIO; - } - switch(buf[0]) { - case 0x06: param->u.vsb.modulation = VSB_8; break; - case 0x43: param->u.vsb.modulation = QAM_64; break; - case 0x45: param->u.vsb.modulation = QAM_256; break; - default: - printk(KERN_WARNING "or51132: unknown status 0x%02x\n", - buf[0]); - return -EREMOTEIO; - } - - /* FIXME: Read frequency from frontend, take AFC into account */ - param->frequency = state->current_frequency; - - /* FIXME: How to read inversion setting? Receiver 6 register? */ - param->inversion = INVERSION_AUTO; - - return 0; -} - static int or51132_read_status(struct dvb_frontend* fe, fe_status_t* status) { struct or51132_state* state = fe->demodulator_priv; @@ -617,11 +572,12 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config, /* Setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &or51132_ops, sizeof(struct dvb_frontend_ops)); state->current_frequency = -1; state->current_modulation = -1; /* Create dvb_frontend */ - memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -634,7 +590,7 @@ static struct dvb_frontend_ops or51132_ops = { .info = { .name = "Oren OR51132 VSB/QAM Frontend", - .type = FE_ATSC, + .type = FE_ATSC, .frequency_min = 44000000, .frequency_max = 958000000, .frequency_stepsize = 166666, @@ -650,7 +606,6 @@ static struct dvb_frontend_ops or51132_ops = { .sleep = or51132_sleep, .set_frontend = or51132_set_parameters, - .get_frontend = or51132_get_parameters, .get_tune_settings = or51132_get_tune_settings, .read_status = or51132_read_status, diff --git a/drivers/media/dvb/frontends/or51132.h b/drivers/media/dvb/frontends/or51132.h index 89658883a..622cdd183 100644 --- a/drivers/media/dvb/frontends/or51132.h +++ b/drivers/media/dvb/frontends/or51132.h @@ -29,6 +29,8 @@ struct or51132_config { /* The demodulator's i2c address */ u8 demod_address; + u8 pll_address; + struct dvb_pll_desc *pll_desc; /* Need to set device param for start_dma */ int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c index 2bf124b53..7c3aed1f5 100644 --- a/drivers/media/dvb/frontends/or51211.c +++ b/drivers/media/dvb/frontends/or51211.c @@ -54,6 +54,7 @@ static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC struct or51211_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* Configuration settings */ const struct or51211_config* config; @@ -437,10 +438,10 @@ static int or51211_init(struct dvb_frontend* fe) } ret = or51211_load_firmware(fe, fw); - release_firmware(fw); if (ret) { printk(KERN_WARNING "or51211: Writing firmware to " "device failed!\n"); + release_firmware(fw); return ret; } printk(KERN_INFO "or51211: Firmware upload complete.\n"); @@ -584,11 +585,12 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config, /* Setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); state->initialized = 0; state->current_frequency = 0; /* Create dvb_frontend */ - memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index 2c2c344c4..d69477596 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c @@ -38,6 +38,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. struct s5h1420_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct s5h1420_config* config; struct dvb_frontend frontend; @@ -583,6 +584,7 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe, struct s5h1420_state* state = fe->demodulator_priv; int frequency_delta; struct dvb_frontend_tune_settings fesettings; + u32 tmp; /* check if we should do a fast-tune */ memcpy(&fesettings.parameters, p, sizeof(struct dvb_frontend_parameters)); @@ -594,17 +596,10 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe, (state->fec_inner == p->u.qpsk.fec_inner) && (state->symbol_rate == p->u.qpsk.symbol_rate)) { - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - if (fe->ops.tuner_ops.get_frequency) { - u32 tmp; - fe->ops.tuner_ops.get_frequency(fe, &tmp); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + if (state->config->pll_set) { + s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) | 1); + state->config->pll_set(fe, p, &tmp); s5h1420_setfreqoffset(state, p->frequency - tmp); - } else { - s5h1420_setfreqoffset(state, 0); } return 0; } @@ -651,9 +646,9 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe, s5h1420_writereg(state, 0x05, s5h1420_readreg(state, 0x05) | 1); /* set tuner PLL */ - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + if (state->config->pll_set) { + s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) | 1); + state->config->pll_set(fe, p, &tmp); s5h1420_setfreqoffset(state, 0); } @@ -713,17 +708,6 @@ static int s5h1420_get_tune_settings(struct dvb_frontend* fe, return 0; } -static int s5h1420_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct s5h1420_state* state = fe->demodulator_priv; - - if (enable) { - return s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) | 1); - } else { - return s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) & 0xfe); - } -} - static int s5h1420_init (struct dvb_frontend* fe) { struct s5h1420_state* state = fe->demodulator_priv; @@ -733,6 +717,13 @@ static int s5h1420_init (struct dvb_frontend* fe) msleep(10); s5h1420_reset(state); + /* init PLL */ + if (state->config->pll_init) { + s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) | 1); + state->config->pll_init(fe); + s5h1420_writereg (state, 0x02, s5h1420_readreg(state,0x02) & 0xfe); + } + return 0; } @@ -765,6 +756,7 @@ struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &s5h1420_ops, sizeof(struct dvb_frontend_ops)); state->postlocked = 0; state->fclk = 88000000; state->tunedfreq = 0; @@ -777,7 +769,7 @@ struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &s5h1420_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -808,7 +800,6 @@ static struct dvb_frontend_ops s5h1420_ops = { .init = s5h1420_init, .sleep = s5h1420_sleep, - .i2c_gate_ctrl = s5h1420_i2c_gate_ctrl, .set_frontend = s5h1420_set_frontend, .get_frontend = s5h1420_get_frontend, diff --git a/drivers/media/dvb/frontends/s5h1420.h b/drivers/media/dvb/frontends/s5h1420.h index 4e39015fa..73296f13c 100644 --- a/drivers/media/dvb/frontends/s5h1420.h +++ b/drivers/media/dvb/frontends/s5h1420.h @@ -32,6 +32,10 @@ struct s5h1420_config /* does the inversion require inversion? */ u8 invert:1; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u32* freqout); }; extern struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config, diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index d98fd5c2e..73829e647 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c @@ -44,6 +44,8 @@ struct sp8870_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; + const struct sp8870_config* config; struct dvb_frontend frontend; @@ -260,10 +262,9 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe, sp8870_microcontroller_stop(state); // set tuner parameters - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + sp8870_writereg(state, 0x206, 0x001); + state->config->pll_set(fe, p); + sp8870_writereg(state, 0x206, 0x000); // sample rate correction bit [23..17] sp8870_writereg(state, 0x0319, 0x000A); @@ -318,6 +319,7 @@ static int sp8870_init (struct dvb_frontend* fe) printk("sp8870: waiting for firmware upload (%s)...\n", SP8870_DEFAULT_FIRMWARE); if (state->config->request_firmware(fe, &fw, SP8870_DEFAULT_FIRMWARE)) { printk("sp8870: no firmware upload (timeout or file not found?)\n"); + release_firmware(fw); return -EIO; } @@ -326,7 +328,6 @@ static int sp8870_init (struct dvb_frontend* fe) release_firmware(fw); return -EIO; } - release_firmware(fw); printk("sp8870: firmware upload complete\n"); /* enable TS output and interface pins */ @@ -348,6 +349,13 @@ static int sp8870_init (struct dvb_frontend* fe) sp8870_writereg(state, 0x0D00, 0x010); sp8870_writereg(state, 0x0D01, 0x000); + /* setup PLL */ + if (state->config->pll_init) { + sp8870_writereg(state, 0x206, 0x001); + state->config->pll_init(fe); + sp8870_writereg(state, 0x206, 0x000); + } + return 0; } @@ -533,17 +541,6 @@ static int sp8870_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend return 0; } -static int sp8870_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct sp8870_state* state = fe->demodulator_priv; - - if (enable) { - return sp8870_writereg(state, 0x206, 0x001); - } else { - return sp8870_writereg(state, 0x206, 0x000); - } -} - static void sp8870_release(struct dvb_frontend* fe) { struct sp8870_state* state = fe->demodulator_priv; @@ -564,13 +561,14 @@ struct dvb_frontend* sp8870_attach(const struct sp8870_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &sp8870_ops, sizeof(struct dvb_frontend_ops)); state->initialised = 0; /* check if the demod is there */ if (sp8870_readreg(state, 0x0200) < 0) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &sp8870_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -599,7 +597,6 @@ static struct dvb_frontend_ops sp8870_ops = { .init = sp8870_init, .sleep = sp8870_sleep, - .i2c_gate_ctrl = sp8870_i2c_gate_ctrl, .set_frontend = sp8870_set_frontend, .get_tune_settings = sp8870_get_tune_settings, diff --git a/drivers/media/dvb/frontends/sp8870.h b/drivers/media/dvb/frontends/sp8870.h index 93afbb969..f3b555dbc 100644 --- a/drivers/media/dvb/frontends/sp8870.h +++ b/drivers/media/dvb/frontends/sp8870.h @@ -31,6 +31,10 @@ struct sp8870_config /* the demodulator's i2c address */ u8 demod_address; + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); + /* request firmware for device */ int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); }; diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c index 5c2f8f4e0..eb8a60219 100644 --- a/drivers/media/dvb/frontends/sp887x.c +++ b/drivers/media/dvb/frontends/sp887x.c @@ -24,6 +24,7 @@ struct sp887x_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct sp887x_config* config; struct dvb_frontend frontend; @@ -207,6 +208,15 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware /* bit 0x010: enable data valid signal */ sp887x_writereg(state, 0xd00, 0x010); sp887x_writereg(state, 0x0d1, 0x000); + + /* setup the PLL */ + if (state->config->pll_init) { + sp887x_writereg(state, 0x206, 0x001); + state->config->pll_init(fe); + sp887x_writereg(state, 0x206, 0x000); + } + + printk ("done.\n"); return 0; }; @@ -352,16 +362,9 @@ static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe, sp887x_microcontroller_stop(state); /* setup the PLL */ - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - if (fe->ops.tuner_ops.get_frequency) { - fe->ops.tuner_ops.get_frequency(fe, &actual_freq); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } else { - actual_freq = p->frequency; - } + sp887x_writereg(state, 0x206, 0x001); + actual_freq = state->config->pll_set(fe, p); + sp887x_writereg(state, 0x206, 0x000); /* read status reg in order to clear demodulator_priv; - - if (enable) { - return sp887x_writereg(state, 0x206, 0x001); - } else { - return sp887x_writereg(state, 0x206, 0x000); - } -} - static int sp887x_sleep(struct dvb_frontend* fe) { struct sp887x_state* state = fe->demodulator_priv; @@ -520,9 +512,9 @@ static int sp887x_init(struct dvb_frontend* fe) } ret = sp887x_initial_setup(fe, fw); - release_firmware(fw); if (ret) { printk("sp887x: writing firmware to device failed\n"); + release_firmware(fw); return ret; } printk("sp887x: firmware upload complete\n"); @@ -563,13 +555,14 @@ struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &sp887x_ops, sizeof(struct dvb_frontend_ops)); state->initialised = 0; /* check if the demod is there */ if (sp887x_readreg(state, 0x0200) < 0) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &sp887x_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -596,7 +589,6 @@ static struct dvb_frontend_ops sp887x_ops = { .init = sp887x_init, .sleep = sp887x_sleep, - .i2c_gate_ctrl = sp887x_i2c_gate_ctrl, .set_frontend = sp887x_setup_frontend_parameters, .get_tune_settings = sp887x_get_tune_settings, diff --git a/drivers/media/dvb/frontends/sp887x.h b/drivers/media/dvb/frontends/sp887x.h index c44b0ebdf..6a05d8f8e 100644 --- a/drivers/media/dvb/frontends/sp887x.h +++ b/drivers/media/dvb/frontends/sp887x.h @@ -13,6 +13,12 @@ struct sp887x_config /* the demodulator's i2c address */ u8 demod_address; + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + + /* this should return the actual frequency tuned to */ + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); + /* request firmware for device */ int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); }; diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 1ca642490..eb15676d3 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c @@ -32,6 +32,7 @@ struct stv0297_state { struct i2c_adapter *i2c; + struct dvb_frontend_ops ops; const struct stv0297_config *config; struct dvb_frontend frontend; @@ -67,25 +68,19 @@ static int stv0297_readreg(struct stv0297_state *state, u8 reg) int ret; u8 b0[] = { reg }; u8 b1[] = { 0 }; - struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags = 0,.buf = b0,.len = 1}, - {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1} - }; + struct i2c_msg msg[] = { {.addr = state->config->demod_address,.flags = 0,.buf = b0,.len = + 1}, + {.addr = state->config->demod_address,.flags = I2C_M_RD,.buf = b1,.len = 1} + }; // this device needs a STOP between the register and data - if (state->config->stop_during_read) { - if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } - if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } - } else { - if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); - return -1; - } + if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); + return -1; + } + if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg, ret); + return -1; } return b1[0]; @@ -112,20 +107,13 @@ static int stv0297_readregs(struct stv0297_state *state, u8 reg1, u8 * b, u8 len }; // this device needs a STOP between the register and data - if (state->config->stop_during_read) { - if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } - if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } - } else { - if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) { - dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); - return -1; - } + if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); + return -1; + } + if ((ret = i2c_transfer(state->i2c, &msg[1], 1)) != 1) { + dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n", __FUNCTION__, reg1, ret); + return -1; } return 0; @@ -288,14 +276,12 @@ static int stv0297_set_inversion(struct stv0297_state *state, fe_spectral_invers return 0; } -static int stv0297_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) +int stv0297_enable_plli2c(struct dvb_frontend *fe) { struct stv0297_state *state = fe->demodulator_priv; - if (enable) { - stv0297_writereg(state, 0x87, 0x78); - stv0297_writereg(state, 0x86, 0xc8); - } + stv0297_writereg(state, 0x87, 0x78); + stv0297_writereg(state, 0x86, 0xc8); return 0; } @@ -310,6 +296,9 @@ static int stv0297_init(struct dvb_frontend *fe) stv0297_writereg(state, state->config->inittab[i], state->config->inittab[i+1]); msleep(200); + if (state->config->pll_init) + state->config->pll_init(fe); + return 0; } @@ -400,7 +389,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par case QAM_32: case QAM_64: delay = 100; - sweeprate = 1000; + sweeprate = 1500; break; case QAM_128: @@ -432,10 +421,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par } stv0297_init(fe); - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + state->config->pll_set(fe, p); /* clear software interrupts */ stv0297_writereg(state, 0x82, 0x0); @@ -648,6 +634,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &stv0297_ops, sizeof(struct dvb_frontend_ops)); state->base_freq = 0; /* check if the demod is there */ @@ -655,7 +642,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config, goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &stv0297_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -681,7 +668,6 @@ static struct dvb_frontend_ops stv0297_ops = { .init = stv0297_init, .sleep = stv0297_sleep, - .i2c_gate_ctrl = stv0297_i2c_gate_ctrl, .set_frontend = stv0297_set_frontend, .get_frontend = stv0297_get_frontend, @@ -698,3 +684,4 @@ MODULE_AUTHOR("Dennis Noermann and Andrew de Quincey"); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(stv0297_attach); +EXPORT_SYMBOL(stv0297_enable_plli2c); diff --git a/drivers/media/dvb/frontends/stv0297.h b/drivers/media/dvb/frontends/stv0297.h index 1da5384fb..9e53f019d 100644 --- a/drivers/media/dvb/frontends/stv0297.h +++ b/drivers/media/dvb/frontends/stv0297.h @@ -38,11 +38,13 @@ struct stv0297_config /* does the "inversion" need inverted? */ u8 invert:1; - /* set to 1 if the device requires an i2c STOP during reading */ - u8 stop_during_read:1; + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, struct i2c_adapter* i2c); +extern int stv0297_enable_plli2c(struct dvb_frontend* fe); #endif // STV0297_H diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c index 96648a754..5bcd00f79 100644 --- a/drivers/media/dvb/frontends/stv0299.c +++ b/drivers/media/dvb/frontends/stv0299.c @@ -56,6 +56,7 @@ struct stv0299_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct stv0299_config* config; struct dvb_frontend frontend; @@ -130,6 +131,13 @@ static int stv0299_readregs (struct stv0299_state* state, u8 reg1, u8 *b, u8 len return ret == 2 ? 0 : ret; } +int stv0299_enable_plli2c (struct dvb_frontend* fe) +{ + struct stv0299_state* state = fe->demodulator_priv; + + return stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ +} + static int stv0299_set_FEC (struct stv0299_state* state, fe_code_rate_t fec) { dprintk ("%s\n", __FUNCTION__); @@ -449,6 +457,12 @@ static int stv0299_init (struct dvb_frontend* fe) for (i=0; !(state->config->inittab[i] == 0xff && state->config->inittab[i+1] == 0xff); i+=2) stv0299_writeregI(state, state->config->inittab[i], state->config->inittab[i+1]); + if (state->config->pll_init) { + stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ + state->config->pll_init(fe, state->i2c); + stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */ + } + return 0; } @@ -546,10 +560,9 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par if (state->config->invert) invval = (~invval) & 1; stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval); - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ + state->config->pll_set(fe, state->i2c, p); + stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */ stv0299_set_FEC (state, p->u.qpsk.fec_inner); stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate); @@ -598,19 +611,6 @@ static int stv0299_sleep(struct dvb_frontend* fe) return 0; } -static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct stv0299_state* state = fe->demodulator_priv; - - if (enable) { - stv0299_writeregI(state, 0x05, 0xb5); - } else { - stv0299_writeregI(state, 0x05, 0x35); - } - udelay(1); - return 0; -} - static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) { struct stv0299_state* state = fe->demodulator_priv; @@ -647,6 +647,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &stv0299_ops, sizeof(struct dvb_frontend_ops)); state->initialised = 0; state->tuner_frequency = 0; state->symbol_rate = 0; @@ -663,7 +664,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, if (id != 0xa1 && id != 0x80) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &stv0299_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -694,7 +695,6 @@ static struct dvb_frontend_ops stv0299_ops = { .init = stv0299_init, .sleep = stv0299_sleep, - .i2c_gate_ctrl = stv0299_i2c_gate_ctrl, .set_frontend = stv0299_set_frontend, .get_frontend = stv0299_get_frontend, @@ -721,8 +721,9 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver"); MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, " - "Andreas Oberritter, Andrew de Quincey, Kenneth Aafly"); + "Andreas Oberritter, Andrew de Quincey, Kenneth Aafløy"); MODULE_LICENSE("GPL"); +EXPORT_SYMBOL(stv0299_enable_plli2c); EXPORT_SYMBOL(stv0299_writereg); EXPORT_SYMBOL(stv0299_attach); diff --git a/drivers/media/dvb/frontends/stv0299.h b/drivers/media/dvb/frontends/stv0299.h index 1504828e4..32c87b4c2 100644 --- a/drivers/media/dvb/frontends/stv0299.h +++ b/drivers/media/dvb/frontends/stv0299.h @@ -87,9 +87,14 @@ struct stv0299_config /* Set the symbol rate */ int (*set_symbol_rate)(struct dvb_frontend* fe, u32 srate, u32 ratio); + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend *fe, struct i2c_adapter *i2c); + int (*pll_set)(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params); }; extern int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data); +extern int stv0299_enable_plli2c (struct dvb_frontend* fe); extern struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, struct i2c_adapter* i2c); diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index 9cbd164aa..21255cac9 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c @@ -21,6 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -35,6 +36,7 @@ struct tda10021_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct tda10021_config* config; struct dvb_frontend frontend; @@ -88,14 +90,6 @@ static int tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data) return (ret != 1) ? -EREMOTEIO : 0; } -int tda10021_write_byte(struct dvb_frontend* fe, int reg, int data) -{ - struct tda10021_state* state = fe->demodulator_priv; - - return tda10021_writereg(state, reg, data); -} -EXPORT_SYMBOL(tda10021_write_byte); - static u8 tda10021_readreg (struct tda10021_state* state, u8 reg) { u8 b0 [] = { reg }; @@ -231,6 +225,13 @@ static int tda10021_init (struct dvb_frontend *fe) //Activate PLL tda10021_writereg(state, 0x2a, tda10021_inittab[0x2a] & 0xef); + + if (state->config->pll_init) { + lock_tuner(state); + state->config->pll_init(fe); + unlock_tuner(state); + } + return 0; } @@ -258,10 +259,9 @@ static int tda10021_set_parameters (struct dvb_frontend *fe, //printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate); - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + lock_tuner(state); + state->config->pll_set(fe, p); + unlock_tuner(state); tda10021_set_symbolrate (state, p->u.qam.symbol_rate); tda10021_writereg (state, 0x34, state->pwm); @@ -376,18 +376,6 @@ static int tda10021_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa return 0; } -static int tda10021_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct tda10021_state* state = fe->demodulator_priv; - - if (enable) { - lock_tuner(state); - } else { - unlock_tuner(state); - } - return 0; -} - static int tda10021_sleep(struct dvb_frontend* fe) { struct tda10021_state* state = fe->demodulator_priv; @@ -419,6 +407,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &tda10021_ops, sizeof(struct dvb_frontend_ops)); state->pwm = pwm; state->reg0 = tda10021_inittab[0]; @@ -426,7 +415,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, if ((tda10021_readreg(state, 0x1a) & 0xf0) != 0x70) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &tda10021_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -459,7 +448,6 @@ static struct dvb_frontend_ops tda10021_ops = { .init = tda10021_init, .sleep = tda10021_sleep, - .i2c_gate_ctrl = tda10021_i2c_gate_ctrl, .set_frontend = tda10021_set_parameters, .get_frontend = tda10021_get_frontend, diff --git a/drivers/media/dvb/frontends/tda10021.h b/drivers/media/dvb/frontends/tda10021.h index b1df4259b..53be939e8 100644 --- a/drivers/media/dvb/frontends/tda10021.h +++ b/drivers/media/dvb/frontends/tda10021.h @@ -30,11 +30,13 @@ struct tda10021_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* tda10021_attach(const struct tda10021_config* config, struct i2c_adapter* i2c, u8 pwm); -extern int tda10021_write_byte(struct dvb_frontend* fe, int reg, int data); - #endif // TDA10021_H diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c index 59a2ed614..b83dafa4e 100644 --- a/drivers/media/dvb/frontends/tda1004x.c +++ b/drivers/media/dvb/frontends/tda1004x.c @@ -47,6 +47,7 @@ enum tda1004x_demod { struct tda1004x_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; const struct tda1004x_config* config; struct dvb_frontend frontend; @@ -599,6 +600,13 @@ static int tda10045_init(struct dvb_frontend* fe) tda1004x_write_mask(state, TDA1004X_CONFADC1, 0x10, 0); // wake up the ADC + // Init the PLL + if (state->config->pll_init) { + tda1004x_enable_tuner_i2c(state); + state->config->pll_init(fe); + tda1004x_disable_tuner_i2c(state); + } + // tda setup tda1004x_write_mask(state, TDA1004X_CONFC4, 0x20, 0); // disable DSP watchdog timer tda1004x_write_mask(state, TDA1004X_AUTO, 8, 0); // select HP stream @@ -627,6 +635,16 @@ static int tda10046_init(struct dvb_frontend* fe) return -EIO; } + // Init the tuner PLL + if (state->config->pll_init) { + tda1004x_enable_tuner_i2c(state); + if (state->config->pll_init(fe)) { + printk(KERN_ERR "tda1004x: pll init failed\n"); + return -EIO; + } + tda1004x_disable_tuner_i2c(state); + } + // tda setup tda1004x_write_mask(state, TDA1004X_CONFC4, 0x20, 0); // disable DSP watchdog timer tda1004x_write_byteI(state, TDA1004X_AUTO, 0x87); // 100 ppm crystal, select HP stream @@ -694,10 +712,12 @@ static int tda1004x_set_fe(struct dvb_frontend* fe, } // set frequency - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, fe_params); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + tda1004x_enable_tuner_i2c(state); + if (state->config->pll_set(fe, fe_params)) { + printk(KERN_ERR "tda1004x: pll set failed\n"); + return -EIO; } + tda1004x_disable_tuner_i2c(state); // Hardcoded to use auto as much as possible on the TDA10045 as it // is very unreliable if AUTO mode is _not_ used. @@ -1163,6 +1183,16 @@ static int tda1004x_sleep(struct dvb_frontend* fe) break; case TDA1004X_DEMOD_TDA10046: + if (state->config->pll_sleep != NULL) { + tda1004x_enable_tuner_i2c(state); + state->config->pll_sleep(fe); + if (state->config->if_freq != TDA10046_FREQ_052) { + /* special hack for Philips EUROPA Based boards: + * keep the I2c bridge open for tuner access in analog mode + */ + tda1004x_disable_tuner_i2c(state); + } + } /* set outputs to tristate */ tda1004x_write_byteI(state, TDA10046H_CONF_TRISTATE1, 0xff); tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1); @@ -1172,17 +1202,6 @@ static int tda1004x_sleep(struct dvb_frontend* fe) return 0; } -static int tda1004x_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct tda1004x_state* state = fe->demodulator_priv; - - if (enable) { - return tda1004x_enable_tuner_i2c(state); - } else { - return tda1004x_disable_tuner_i2c(state); - } -} - static int tda1004x_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings) { fesettings->min_delay_ms = 800; @@ -1216,7 +1235,6 @@ static struct dvb_frontend_ops tda10045_ops = { .init = tda10045_init, .sleep = tda1004x_sleep, - .i2c_gate_ctrl = tda1004x_i2c_gate_ctrl, .set_frontend = tda1004x_set_fe, .get_frontend = tda1004x_get_fe, @@ -1242,6 +1260,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops)); state->demod_type = TDA1004X_DEMOD_TDA10045; /* check if the demod is there */ @@ -1251,7 +1270,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &tda10045_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; } @@ -1274,7 +1293,6 @@ static struct dvb_frontend_ops tda10046_ops = { .init = tda10046_init, .sleep = tda1004x_sleep, - .i2c_gate_ctrl = tda1004x_i2c_gate_ctrl, .set_frontend = tda1004x_set_fe, .get_frontend = tda1004x_get_fe, @@ -1300,6 +1318,7 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops)); state->demod_type = TDA1004X_DEMOD_TDA10046; /* check if the demod is there */ @@ -1309,7 +1328,7 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &tda10046_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; } diff --git a/drivers/media/dvb/frontends/tda1004x.h b/drivers/media/dvb/frontends/tda1004x.h index b877b23ed..cc0c4af64 100644 --- a/drivers/media/dvb/frontends/tda1004x.h +++ b/drivers/media/dvb/frontends/tda1004x.h @@ -66,6 +66,11 @@ struct tda1004x_config /* AGC configuration */ enum tda10046_agc agc_config; + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + void (*pll_sleep)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); + /* request firmware for device */ /* set this to NULL if the card has a firmware EEPROM */ int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c index 3aa45ebba..91baa9ced 100644 --- a/drivers/media/dvb/frontends/tda8083.c +++ b/drivers/media/dvb/frontends/tda8083.c @@ -37,6 +37,7 @@ struct tda8083_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct tda8083_config* config; struct dvb_frontend frontend; @@ -292,11 +293,7 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par { struct tda8083_state* state = fe->demodulator_priv; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - + state->config->pll_set(fe, p); tda8083_set_inversion (state, p->inversion); tda8083_set_fec (state, p->u.qpsk.fec_inner); tda8083_set_symbolrate (state, p->u.qpsk.symbol_rate); @@ -337,6 +334,8 @@ static int tda8083_init(struct dvb_frontend* fe) for (i=0; i<44; i++) tda8083_writereg (state, i, tda8083_init_tab[i]); + if (state->config->pll_init) state->config->pll_init(fe); + tda8083_writereg (state, 0x00, 0x3c); tda8083_writereg (state, 0x00, 0x04); @@ -396,12 +395,13 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &tda8083_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if ((tda8083_readreg(state, 0x00)) != 0x05) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &tda8083_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/tda8083.h b/drivers/media/dvb/frontends/tda8083.h index e7a48f61e..466663307 100644 --- a/drivers/media/dvb/frontends/tda8083.h +++ b/drivers/media/dvb/frontends/tda8083.h @@ -33,6 +33,10 @@ struct tda8083_config { /* the demodulator's i2c address */ u8 demod_address; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* tda8083_attach(const struct tda8083_config* config, diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c index 9b57576bf..ad8647a3c 100644 --- a/drivers/media/dvb/frontends/ves1820.c +++ b/drivers/media/dvb/frontends/ves1820.c @@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -34,6 +35,7 @@ struct ves1820_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct ves1820_config* config; struct dvb_frontend frontend; @@ -202,6 +204,9 @@ static int ves1820_init(struct dvb_frontend* fe) ves1820_writereg(state, 0x34, state->pwm); + if (state->config->pll_init) + state->config->pll_init(fe); + return 0; } @@ -218,11 +223,7 @@ static int ves1820_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_p if (real_qam < 0 || real_qam > 4) return -EINVAL; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - + state->config->pll_set(fe, p); ves1820_set_symbolrate(state, p->u.qam.symbol_rate); ves1820_writereg(state, 0x34, state->pwm); @@ -379,6 +380,7 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, goto error; /* setup the state */ + memcpy(&state->ops, &ves1820_ops, sizeof(struct dvb_frontend_ops)); state->reg0 = ves1820_inittab[0]; state->config = config; state->i2c = i2c; @@ -391,12 +393,12 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, if (verbose) printk("ves1820: pwm=0x%02x\n", state->pwm); + state->ops.info.symbol_rate_min = (state->config->xin / 2) / 64; /* SACLK/64 == (XIN/2)/64 */ + state->ops.info.symbol_rate_max = (state->config->xin / 2) / 4; /* SACLK/4 */ + /* create dvb_frontend */ - memcpy(&state->frontend.ops, &ves1820_ops, sizeof(struct dvb_frontend_ops)); - state->frontend.ops.info.symbol_rate_min = (state->config->xin / 2) / 64; /* SACLK/64 == (XIN/2)/64 */ - state->frontend.ops.info.symbol_rate_max = (state->config->xin / 2) / 4; /* SACLK/4 */ + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; - return &state->frontend; error: diff --git a/drivers/media/dvb/frontends/ves1820.h b/drivers/media/dvb/frontends/ves1820.h index 520f09522..355f130b1 100644 --- a/drivers/media/dvb/frontends/ves1820.h +++ b/drivers/media/dvb/frontends/ves1820.h @@ -39,6 +39,10 @@ struct ves1820_config /* SELAGC control */ u8 selagc:1; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* ves1820_attach(const struct ves1820_config* config, diff --git a/drivers/media/dvb/frontends/ves1x93.c b/drivers/media/dvb/frontends/ves1x93.c index 54d7b0757..821df8e83 100644 --- a/drivers/media/dvb/frontends/ves1x93.c +++ b/drivers/media/dvb/frontends/ves1x93.c @@ -36,6 +36,7 @@ struct ves1x93_state { struct i2c_adapter* i2c; + struct dvb_frontend_ops ops; /* configuration settings */ const struct ves1x93_config* config; struct dvb_frontend frontend; @@ -277,6 +278,12 @@ static int ves1x93_init (struct dvb_frontend* fe) } } + if (state->config->pll_init) { + ves1x93_writereg(state, 0x00, 0x11); + state->config->pll_init(fe); + ves1x93_writereg(state, 0x00, 0x01); + } + return 0; } @@ -388,10 +395,9 @@ static int ves1x93_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par { struct ves1x93_state* state = fe->demodulator_priv; - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, p); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } + ves1x93_writereg(state, 0x00, 0x11); + state->config->pll_set(fe, p); + ves1x93_writereg(state, 0x00, 0x01); ves1x93_set_inversion (state, p->inversion); ves1x93_set_fec (state, p->u.qpsk.fec_inner); ves1x93_set_symbolrate (state, p->u.qpsk.symbol_rate); @@ -436,17 +442,6 @@ static void ves1x93_release(struct dvb_frontend* fe) kfree(state); } -static int ves1x93_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) -{ - struct ves1x93_state* state = fe->demodulator_priv; - - if (enable) { - return ves1x93_writereg(state, 0x00, 0x11); - } else { - return ves1x93_writereg(state, 0x00, 0x01); - } -} - static struct dvb_frontend_ops ves1x93_ops; struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, @@ -462,6 +457,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, /* setup the state */ state->config = config; state->i2c = i2c; + memcpy(&state->ops, &ves1x93_ops, sizeof(struct dvb_frontend_ops)); state->inversion = INVERSION_OFF; /* check if the demod is there + identify it */ @@ -496,7 +492,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, } /* create dvb_frontend */ - memcpy(&state->frontend.ops, &ves1x93_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; @@ -527,7 +523,6 @@ static struct dvb_frontend_ops ves1x93_ops = { .init = ves1x93_init, .sleep = ves1x93_sleep, - .i2c_gate_ctrl = ves1x93_i2c_gate_ctrl, .set_frontend = ves1x93_set_frontend, .get_frontend = ves1x93_get_frontend, diff --git a/drivers/media/dvb/frontends/ves1x93.h b/drivers/media/dvb/frontends/ves1x93.h index ba88ae085..1627e37c5 100644 --- a/drivers/media/dvb/frontends/ves1x93.h +++ b/drivers/media/dvb/frontends/ves1x93.h @@ -38,6 +38,10 @@ struct ves1x93_config /* should PWM be inverted? */ u8 invert_pwm:1; + + /* PLL maintenance */ + int (*pll_init)(struct dvb_frontend* fe); + int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); }; extern struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config, diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 2b95e8b6c..d7d9f59d7 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c @@ -34,6 +34,7 @@ struct zl10353_state { struct i2c_adapter *i2c; struct dvb_frontend frontend; + struct dvb_frontend_ops ops; struct zl10353_config config; }; @@ -125,7 +126,6 @@ static int zl10353_set_parameters(struct dvb_frontend *fe, struct dvb_frontend_parameters *param) { struct zl10353_state *state = fe->demodulator_priv; - u8 pllbuf[6] = { 0x67 }; /* These settings set "auto-everything" and start the FSM. */ @@ -142,30 +142,7 @@ static int zl10353_set_parameters(struct dvb_frontend *fe, zl10353_single_write(fe, 0x66, 0xE9); zl10353_single_write(fe, 0x62, 0x0A); - // if there is no attached secondary tuner, we call set_params to program - // a potential tuner attached somewhere else - if (state->config.no_tuner) { - if (fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, param); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); - } - } - - // if pllbuf is defined, retrieve the settings - if (fe->ops.tuner_ops.calc_regs) { - fe->ops.tuner_ops.calc_regs(fe, param, pllbuf+1, 5); - pllbuf[1] <<= 1; - } else { - // fake pllbuf settings - pllbuf[1] = 0x61 << 1; - pllbuf[2] = 0; - pllbuf[3] = 0; - pllbuf[3] = 0; - pllbuf[4] = 0; - } - - // there is no call to _just_ start decoding, so we send the pllbuf anyway - // even if there isn't a PLL attached to the secondary bus + state->config.pll_set(fe, param, pllbuf + 1); zl10353_write(fe, pllbuf, sizeof(pllbuf)); zl10353_single_write(fe, 0x70, 0x01); @@ -277,13 +254,14 @@ struct dvb_frontend *zl10353_attach(const struct zl10353_config *config, /* setup the state */ state->i2c = i2c; memcpy(&state->config, config, sizeof(struct zl10353_config)); + memcpy(&state->ops, &zl10353_ops, sizeof(struct dvb_frontend_ops)); /* check if the demod is there */ if (zl10353_read_register(state, CHIP_ID) != ID_ZL10353) goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &zl10353_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index 9770cb840..5cc4ae718 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h @@ -29,8 +29,10 @@ struct zl10353_config /* demodulator's I2C address */ u8 demod_address; - /* set if no pll is connected to the secondary i2c bus */ - int no_tuner; + /* function which configures the PLL buffer (for secondary I2C + * connected tuner) or tunes the PLL (for direct connected tuner) */ + int (*pll_set)(struct dvb_frontend *fe, + struct dvb_frontend_parameters *params, u8 *pllbuf); }; extern struct dvb_frontend* zl10353_attach(const struct zl10353_config *config, diff --git a/drivers/media/dvb/pluto2/Kconfig b/drivers/media/dvb/pluto2/Kconfig index 9b84b1bdc..7d8e6e87b 100644 --- a/drivers/media/dvb/pluto2/Kconfig +++ b/drivers/media/dvb/pluto2/Kconfig @@ -2,7 +2,6 @@ config DVB_PLUTO2 tristate "Pluto2 cards" depends on DVB_CORE && PCI && I2C select I2C_ALGOBIT - select DVB_PLL select DVB_TDA1004X help Support for PCI cards based on the Pluto2 FPGA like the Satelco diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index 2310b2bfe..1c5316e20 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c @@ -424,8 +424,8 @@ static inline u32 divide(u32 numerator, u32 denominator) } /* LG Innotek TDTE-E001P (Infineon TUA6034) */ -static int lg_tdtpe001p_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *p) +static int lg_tdtpe001p_pll_set(struct dvb_frontend *fe, + struct dvb_frontend_parameters *p) { struct pluto *pluto = frontend_to_pluto(fe); struct i2c_msg msg; @@ -473,8 +473,6 @@ static int lg_tdtpe001p_tuner_set_params(struct dvb_frontend *fe, msg.buf = buf; msg.len = sizeof(buf); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); ret = i2c_transfer(&pluto->i2c_adap, &msg, 1); if (ret < 0) return ret; @@ -499,6 +497,8 @@ static struct tda1004x_config pluto2_fe_config __devinitdata = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_DEFAULT, .if_freq = TDA10046_FREQ_3617, + .pll_set = lg_tdtpe001p_pll_set, + .pll_sleep = NULL, .request_firmware = pluto2_request_firmware, }; @@ -511,12 +511,11 @@ static int __devinit frontend_init(struct pluto *pluto) dev_err(&pluto->pdev->dev, "could not attach frontend\n"); return -ENODEV; } - pluto->fe->ops.tuner_ops.set_params = lg_tdtpe001p_tuner_set_params; ret = dvb_register_frontend(&pluto->dvb_adapter, pluto->fe); if (ret < 0) { - if (pluto->fe->ops.release) - pluto->fe->ops.release(pluto->fe); + if (pluto->fe->ops->release) + pluto->fe->ops->release(pluto->fe); return ret; } @@ -616,7 +615,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, pluto); - ret = request_irq(pdev->irq, pluto_irq, IRQF_SHARED, DRIVER_NAME, pluto); + ret = request_irq(pdev->irq, pluto_irq, SA_SHIRQ, DRIVER_NAME, pluto); if (ret < 0) goto err_pci_iounmap; @@ -648,7 +647,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev, goto err_pluto_hw_exit; /* dvb */ - ret = dvb_register_adapter(&pluto->dvb_adapter, DRIVER_NAME, THIS_MODULE, &pdev->dev); + ret = dvb_register_adapter(&pluto->dvb_adapter, DRIVER_NAME, THIS_MODULE); if (ret < 0) goto err_i2c_bit_del_bus; diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index 5fb097595..b5ac7dfde 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig @@ -3,7 +3,6 @@ config DVB_AV7110 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select FW_LOADER select VIDEO_SAA7146_VV - select DVB_PLL select DVB_VES1820 select DVB_VES1X93 select DVB_STV0299 @@ -11,7 +10,6 @@ config DVB_AV7110 select DVB_SP8870 select DVB_STV0297 select DVB_L64781 - select DVB_LNBP21 help Support for SAA7146 and AV7110 based DVB cards as produced by Fujitsu-Siemens, Technotrend, Hauppauge and others. @@ -62,7 +60,6 @@ config DVB_BUDGET tristate "Budget cards" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 - select DVB_PLL select DVB_STV0299 select DVB_VES1X93 select DVB_VES1820 @@ -70,7 +67,6 @@ config DVB_BUDGET select DVB_TDA8083 select DVB_TDA10021 select DVB_S5H1420 - select DVB_LNBP21 help Support for simple SAA7146 based DVB cards (so called Budget- or Nova-PCI cards) without onboard @@ -85,11 +81,9 @@ config DVB_BUDGET_CI tristate "Budget cards with onboard CI connector" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 - select DVB_PLL select DVB_STV0297 select DVB_STV0299 select DVB_TDA1004X - select DVB_LNBP21 help Support for simple SAA7146 based DVB cards (so called Budget- or Nova-PCI cards) without onboard @@ -107,7 +101,6 @@ config DVB_BUDGET_AV tristate "Budget cards with analog video inputs" depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146_VV - select DVB_PLL select DVB_STV0299 select DVB_TDA1004X select DVB_TDA10021 @@ -126,7 +119,6 @@ config DVB_BUDGET_PATCH tristate "AV7110 cards with Budget Patch" depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 select DVB_AV7110 - select DVB_PLL select DVB_STV0299 select DVB_VES1X93 select DVB_TDA8083 diff --git a/drivers/media/dvb/ttpci/Makefile b/drivers/media/dvb/ttpci/Makefile index aa85ecdc6..a690730ac 100644 --- a/drivers/media/dvb/ttpci/Makefile +++ b/drivers/media/dvb/ttpci/Makefile @@ -15,9 +15,9 @@ EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ hostprogs-y := fdump -ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y) -$(obj)/av7110.o: $(obj)/av7110_firm.h +ifdef CONFIG_DVB_AV7110_FIRMWARE +$(obj)/av7110.o: $(obj)/fdump $(obj)/av7110_firm.h -$(obj)/av7110_firm.h: $(obj)/fdump +$(obj)/av7110_firm.h: $(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@ endif diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 4506165c5..6c8f02de2 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -30,6 +30,7 @@ */ +#include #include #include #include @@ -151,9 +152,13 @@ static void init_av7110_av(struct av7110 *av7110) /* remaining inits according to card and frontend type */ av7110->analog_tuner_flags = 0; av7110->current_input = 0; - if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000a) + if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000a) { + printk("dvb-ttpci: MSP3415 audio DAC @ card %d\n", + av7110->dvb_adapter.num); + av7110->adac_type = DVB_ADAC_MSP34x5; av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 0); // SPDIF on - if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { + } + else if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { printk ("dvb-ttpci: Crystal audio DAC @ card %d detected\n", av7110->dvb_adapter.num); av7110->adac_type = DVB_ADAC_CRYSTAL; @@ -1547,7 +1552,7 @@ static int get_firmware(struct av7110* av7110) #endif -static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct av7110* av7110 = (struct av7110*) fe->dvb->priv; u8 pwr = 0; @@ -1570,8 +1575,6 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front // NOTE: since we're using a prescaler of 2, we set the // divisor frequency to 62.5kHz and divide by 125 above - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -1581,9 +1584,10 @@ static struct ves1x93_config alps_bsrv2_config = { .demod_address = 0x08, .xin = 90100000UL, .invert_pwm = 0, + .pll_set = alps_bsrv2_pll_set, }; -static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct av7110* av7110 = fe->dvb->priv; u32 div; @@ -1597,8 +1601,6 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = 0x85 | ((div >> 10) & 0x60); data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -1609,12 +1611,14 @@ static struct ves1820_config alps_tdbe2_config = { .xin = 57840000UL, .invert = 1, .selagc = VES1820_SELAGC_SIGNAMPERR, + .pll_set = alps_tdbe2_pll_set, }; -static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int grundig_29504_451_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params) { struct av7110* av7110 = fe->dvb->priv; u32 div; @@ -1627,8 +1631,6 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv data[2] = 0x8e; data[3] = 0x00; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -1636,11 +1638,13 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv static struct tda8083_config grundig_29504_451_config = { .demod_address = 0x68, + .pll_set = grundig_29504_451_pll_set, }; -static int philips_cd1516_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int philips_cd1516_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params) { struct av7110* av7110 = fe->dvb->priv; u32 div; @@ -1655,8 +1659,6 @@ static int philips_cd1516_tuner_set_params(struct dvb_frontend* fe, struct dvb_f data[2] = 0x8e; data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -1667,11 +1669,12 @@ static struct ves1820_config philips_cd1516_config = { .xin = 57840000UL, .invert = 1, .selagc = VES1820_SELAGC_SIGNAMPERR, + .pll_set = philips_cd1516_pll_set, }; -static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int alps_tdlb7_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct av7110* av7110 = fe->dvb->priv; u32 div, pwr; @@ -1690,8 +1693,6 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = 0x85; data[3] = pwr << 6; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -1707,6 +1708,7 @@ static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct fir static struct sp8870_config alps_tdlb7_config = { .demod_address = 0x71, + .pll_set = alps_tdlb7_pll_set, .request_firmware = alps_tdlb7_request_firmware, }; @@ -1804,7 +1806,7 @@ static u8 nexusca_stv0297_inittab[] = { 0xff, 0xff, }; -static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct av7110* av7110 = fe->dvb->priv; u32 div; @@ -1830,8 +1832,7 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_ else return -EINVAL; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + stv0297_enable_plli2c(fe); if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { printk("nexusca: pll transfer failed!\n"); return -EIO; @@ -1839,8 +1840,8 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_ // wait for PLL lock for(i = 0; i < 20; i++) { - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + + stv0297_enable_plli2c(fe); if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) if (data[0] & 0x40) break; msleep(10); @@ -1854,12 +1855,12 @@ static struct stv0297_config nexusca_stv0297_config = { .demod_address = 0x1C, .inittab = nexusca_stv0297_inittab, .invert = 1, - .stop_during_read = 1, + .pll_set = nexusca_stv0297_pll_set, }; -static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) +static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct av7110* av7110 = (struct av7110*) fe->dvb->priv; u32 div; @@ -1886,14 +1887,13 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv data[2] = ((div >> 10) & 0x60) | cfg; data[3] = (cpump << 6) | band_select; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } static struct l64781_config grundig_29504_401_config = { .demod_address = 0x55, + .pll_set = grundig_29504_401_pll_set, }; @@ -2079,9 +2079,6 @@ static int frontend_init(struct av7110 *av7110) case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; - } break; } @@ -2094,10 +2091,9 @@ static int frontend_init(struct av7110 *av7110) // try the ALPS BSRV2 first of all av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; - av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; - av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; - av7110->fe->ops.set_tone = av7110_set_tone; + av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; + av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; + av7110->fe->ops->set_tone = av7110_set_tone; av7110->recover = dvb_s_recover; break; } @@ -2105,12 +2101,9 @@ static int frontend_init(struct av7110 *av7110) // try the ALPS BSRU6 now av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; - av7110->fe->tuner_priv = &av7110->i2c_adap; - - av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; - av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; - av7110->fe->ops.set_tone = av7110_set_tone; + av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; + av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; + av7110->fe->ops->set_tone = av7110_set_tone; av7110->recover = dvb_s_recover; break; } @@ -2118,10 +2111,9 @@ static int frontend_init(struct av7110 *av7110) // Try the grundig 29504-451 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; - av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; - av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; - av7110->fe->ops.set_tone = av7110_set_tone; + av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; + av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; + av7110->fe->ops->set_tone = av7110_set_tone; av7110->recover = dvb_s_recover; break; } @@ -2132,17 +2124,11 @@ static int frontend_init(struct av7110 *av7110) /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; - } break; case 0x0003: /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; - } break; } break; @@ -2151,27 +2137,20 @@ static int frontend_init(struct av7110 *av7110) // ALPS TDLB7 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; - } break; case 0x0002: // Hauppauge/TT DVB-C premium rev2.X av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; - } break; case 0x0004: // Galaxis DVB-S rev1.3 /* ALPS BSRV2 */ av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; - av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; - av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; - av7110->fe->ops.set_tone = av7110_set_tone; + av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; + av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; + av7110->fe->ops->set_tone = av7110_set_tone; av7110->recover = dvb_s_recover; } break; @@ -2180,10 +2159,9 @@ static int frontend_init(struct av7110 *av7110) /* Grundig 29504-451 */ av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; - av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; - av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; - av7110->fe->ops.set_tone = av7110_set_tone; + av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; + av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; + av7110->fe->ops->set_tone = av7110_set_tone; av7110->recover = dvb_s_recover; } break; @@ -2191,20 +2169,15 @@ static int frontend_init(struct av7110 *av7110) case 0x0008: // Hauppauge/TT DVB-T av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; - } break; case 0x000A: // Hauppauge/TT Nexus-CA rev1.X av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; - /* set TDA9819 into DVB mode */ - saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) - saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) + saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) + saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) /* tuner on this needs a slower i2c bus speed */ av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; @@ -2216,16 +2189,13 @@ static int frontend_init(struct av7110 *av7110) /* ALPS BSBE1 */ av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; - av7110->fe->tuner_priv = &av7110->i2c_adap; - - if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) { + if (lnbp21_init(av7110->fe, &av7110->i2c_adap, 0, 0)) { printk("dvb-ttpci: LNBP21 not found!\n"); - if (av7110->fe->ops.release) - av7110->fe->ops.release(av7110->fe); + if (av7110->fe->ops->release) + av7110->fe->ops->release(av7110->fe); av7110->fe = NULL; } else { - av7110->fe->ops.dishnetwork_send_legacy_command = NULL; + av7110->fe->ops->dishnetwork_send_legacy_command = NULL; av7110->recover = dvb_s_recover; } } @@ -2242,21 +2212,21 @@ static int frontend_init(struct av7110 *av7110) av7110->dev->pci->subsystem_vendor, av7110->dev->pci->subsystem_device); } else { - FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init); - FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status); - FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); - FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); - FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); - FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone); - FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;) - FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); - FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); + FE_FUNC_OVERRIDE(av7110->fe->ops->init, av7110->fe_init, av7110_fe_init); + FE_FUNC_OVERRIDE(av7110->fe->ops->read_status, av7110->fe_read_status, av7110_fe_read_status); + FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); + FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); + FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); + FE_FUNC_OVERRIDE(av7110->fe->ops->set_tone, av7110->fe_set_tone, av7110_fe_set_tone); + FE_FUNC_OVERRIDE(av7110->fe->ops->set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;) + FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); + FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); if (ret < 0) { printk("av7110: Frontend registration failed!\n"); - if (av7110->fe->ops.release) - av7110->fe->ops.release(av7110->fe); + if (av7110->fe->ops->release) + av7110->fe->ops->release(av7110->fe); av7110->fe = NULL; } } @@ -2443,7 +2413,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, goto err_kfree_0; ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, - THIS_MODULE, &dev->pci->dev); + THIS_MODULE); if (ret < 0) goto err_put_firmware_1; @@ -2823,7 +2793,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension av7110_extension = { - .name = "dvb\0", + .name = "dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, diff --git a/drivers/media/dvb/ttpci/av7110.h b/drivers/media/dvb/ttpci/av7110.h index 9c79696da..3e2e12124 100644 --- a/drivers/media/dvb/ttpci/av7110.h +++ b/drivers/media/dvb/ttpci/av7110.h @@ -6,6 +6,10 @@ #include #include +#ifdef CONFIG_DEVFS_FS +#include +#endif + #include #include #include diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c index 0f3a044ae..2eff09f63 100644 --- a/drivers/media/dvb/ttpci/av7110_av.c +++ b/drivers/media/dvb/ttpci/av7110_av.c @@ -318,17 +318,7 @@ int av7110_set_volume(struct av7110 *av7110, int volleft, int volright) msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ msp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */ return 0; - - case DVB_ADAC_MSP34x5: - vol = (volleft > volright) ? volleft : volright; - val = (vol * 0x73 / 255) << 8; - if (vol > 0) - balance = ((volright - volleft) * 127) / vol; - msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); - msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ - return 0; } - return 0; } @@ -1277,32 +1267,23 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file, switch(av7110->audiostate.channel_select) { case AUDIO_STEREO: ret = audcom(av7110, AUDIO_CMD_STEREO); - if (!ret) { + if (!ret) if (av7110->adac_type == DVB_ADAC_CRYSTAL) i2c_writereg(av7110, 0x20, 0x02, 0x49); - else if (av7110->adac_type == DVB_ADAC_MSP34x5) - msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); - } break; case AUDIO_MONO_LEFT: ret = audcom(av7110, AUDIO_CMD_MONO_L); - if (!ret) { + if (!ret) if (av7110->adac_type == DVB_ADAC_CRYSTAL) i2c_writereg(av7110, 0x20, 0x02, 0x4a); - else if (av7110->adac_type == DVB_ADAC_MSP34x5) - msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0200); - } break; case AUDIO_MONO_RIGHT: ret = audcom(av7110, AUDIO_CMD_MONO_R); - if (!ret) { + if (!ret) if (av7110->adac_type == DVB_ADAC_CRYSTAL) i2c_writereg(av7110, 0x20, 0x02, 0x45); - else if (av7110->adac_type == DVB_ADAC_MSP34x5) - msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0210); - } break; default: diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index 6ffe53fdc..603a22e4b 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c @@ -42,18 +42,7 @@ int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) { u8 msg[5] = { dev, reg >> 8, reg & 0xff, val >> 8 , val & 0xff }; - struct i2c_msg msgs = { .flags = 0, .len = 5, .buf = msg }; - - switch (av7110->adac_type) { - case DVB_ADAC_MSP34x0: - msgs.addr = 0x40; - break; - case DVB_ADAC_MSP34x5: - msgs.addr = 0x42; - break; - default: - return 0; - } + struct i2c_msg msgs = { .flags = 0, .addr = 0x40, .len = 5, .buf = msg }; if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) { dprintk(1, "dvb-ttpci: failed @ card %d, %u = %u\n", @@ -68,23 +57,10 @@ static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val) u8 msg1[3] = { dev, reg >> 8, reg & 0xff }; u8 msg2[2]; struct i2c_msg msgs[2] = { - { .flags = 0 , .len = 3, .buf = msg1 }, - { .flags = I2C_M_RD, .len = 2, .buf = msg2 } + { .flags = 0, .addr = 0x40, .len = 3, .buf = msg1 }, + { .flags = I2C_M_RD, .addr = 0x40, .len = 2, .buf = msg2 } }; - switch (av7110->adac_type) { - case DVB_ADAC_MSP34x0: - msgs[0].addr = 0x40; - msgs[1].addr = 0x40; - break; - case DVB_ADAC_MSP34x5: - msgs[0].addr = 0x42; - msgs[1].addr = 0x42; - break; - default: - return 0; - } - if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { dprintk(1, "dvb-ttpci: failed @ card %d, %u\n", av7110->dvb_adapter.num, reg); @@ -272,8 +248,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) dprintk(1, "setting band in demodulator failed.\n"); } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD) - saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF) + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD) + saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF) } if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); @@ -308,8 +284,8 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) dprintk(1, "setting band in demodulator failed.\n"); } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { - saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) - saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) + saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) + saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) } } @@ -702,23 +678,17 @@ int av7110_init_analog_module(struct av7110 *av7110) { u16 version1, version2; - if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && - i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { - printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", - av7110->dvb_adapter.num); - av7110->adac_type = DVB_ADAC_MSP34x0; - } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && - i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { - printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3415\n", - av7110->dvb_adapter.num); - av7110->adac_type = DVB_ADAC_MSP34x5; - } else + if (i2c_writereg(av7110, 0x80, 0x0, 0x80) != 1 + || i2c_writereg(av7110, 0x80, 0x0, 0) != 1) return -ENODEV; + printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", + av7110->dvb_adapter.num); + av7110->adac_type = DVB_ADAC_MSP34x0; msleep(100); // the probing above resets the msp... msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); - dprintk(1, "dvb-ttpci: @ card %d MSP34xx version 0x%04x 0x%04x\n", + dprintk(1, "dvb-ttpci: @ card %d MSP3400 version 0x%04x 0x%04x\n", av7110->dvb_adapter.num, version1, version2); msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone @@ -727,7 +697,7 @@ int av7110_init_analog_module(struct av7110 *av7110) msp_writereg(av7110, MSP_WR_DSP, 0x0004, 0x7f00); // loudspeaker volume msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume - msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART + msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x4800); // prescale SCART if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { INFO(("saa7113 not accessible.\n")); @@ -750,8 +720,8 @@ int av7110_init_analog_module(struct av7110 *av7110) if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) dprintk(1, "setting band in demodulator failed.\n"); } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { - saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) - saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) + saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) + saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) } /* init the saa7113 */ diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 2d21fec23..3f4aa083f 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c @@ -50,12 +50,6 @@ #define DEBICICAM 0x02420000 -#define SLOTSTATUS_NONE 1 -#define SLOTSTATUS_PRESENT 2 -#define SLOTSTATUS_RESET 4 -#define SLOTSTATUS_READY 8 -#define SLOTSTATUS_OCCUPIED (SLOTSTATUS_PRESENT|SLOTSTATUS_RESET|SLOTSTATUS_READY) - struct budget_av { struct budget budget; struct video_device *vd; @@ -65,14 +59,8 @@ struct budget_av { int slot_status; struct dvb_ca_en50221 ca; u8 reinitialise_demod:1; - u8 tda10021_poclkp:1; - u8 tda10021_ts_enabled; - int (*tda10021_set_frontend)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p); }; -static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot); - - /* GPIO Connections: * 0 - Vcc/Reset (Reset is controlled by capacitor). Resets the frontend *AS WELL*! * 1 - CI memory select 0=>IO memory, 1=>Attribute Memory @@ -142,10 +130,9 @@ static int ciintf_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int ad udelay(1); result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 0xfff, 1, 0, 1); - if (result == -ETIMEDOUT) { - ciintf_slot_shutdown(ca, slot); - printk(KERN_INFO "budget-av: cam ejected 1\n"); - } + + if (result == -ETIMEDOUT) + budget_av->slot_status = 0; return result; } @@ -161,10 +148,9 @@ static int ciintf_write_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int a udelay(1); result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 0xfff, 1, value, 0, 1); - if (result == -ETIMEDOUT) { - ciintf_slot_shutdown(ca, slot); - printk(KERN_INFO "budget-av: cam ejected 2\n"); - } + + if (result == -ETIMEDOUT) + budget_av->slot_status = 0; return result; } @@ -180,11 +166,9 @@ static int ciintf_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 addre udelay(1); result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 3, 1, 0, 0); - if ((result == -ETIMEDOUT) || ((result == 0xff) && ((address & 3) < 2))) { - ciintf_slot_shutdown(ca, slot); - printk(KERN_INFO "budget-av: cam ejected 3\n"); - return -ETIMEDOUT; - } + + if (result == -ETIMEDOUT) + budget_av->slot_status = 0; return result; } @@ -200,10 +184,9 @@ static int ciintf_write_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 addr udelay(1); result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 3, 1, value, 0, 0); - if (result == -ETIMEDOUT) { - ciintf_slot_shutdown(ca, slot); - printk(KERN_INFO "budget-av: cam ejected 5\n"); - } + + if (result == -ETIMEDOUT) + budget_av->slot_status = 0; return result; } @@ -211,12 +194,12 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot) { struct budget_av *budget_av = (struct budget_av *) ca->data; struct saa7146_dev *saa = budget_av->budget.dev; + int timeout = 50; // 5 seconds (4.4.6 Ready) if (slot != 0) return -EINVAL; dprintk(1, "ciintf_slot_reset\n"); - budget_av->slot_status = SLOTSTATUS_RESET; saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTHI); /* disable card */ @@ -226,17 +209,21 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot) msleep(20); /* 20 ms Vcc settling time */ saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTLO); /* enable card */ - ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB); - msleep(20); + + /* This should have been based on pin 16 READY of the pcmcia port, + * but AFAICS it is not routed to the saa7146 */ + while (--timeout > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d) + msleep(100); /* reinitialise the frontend if necessary */ if (budget_av->reinitialise_demod) dvb_frontend_reinitialise(budget_av->budget.dvb_frontend); - /* set tda10021 back to original clock configuration on reset */ - if (budget_av->tda10021_poclkp) { - tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); - budget_av->tda10021_ts_enabled = 0; + if (timeout <= 0) + { + printk(KERN_ERR "budget-av: cam reset failed (timeout).\n"); + saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTHI); /* disable card */ + return -ETIMEDOUT; } return 0; @@ -253,13 +240,7 @@ static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) dprintk(1, "ciintf_slot_shutdown\n"); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTB); - budget_av->slot_status = SLOTSTATUS_NONE; - - /* set tda10021 back to original clock configuration when cam removed */ - if (budget_av->tda10021_poclkp) { - tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); - budget_av->tda10021_ts_enabled = 0; - } + budget_av->slot_status = 0; return 0; } @@ -274,13 +255,6 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) dprintk(1, "ciintf_slot_ts_enable: %d\n", budget_av->slot_status); ttpci_budget_set_video_port(saa, BUDGET_VIDEO_PORTA); - - /* tda10021 seems to need a different TS clock config when data is routed to the CAM */ - if (budget_av->tda10021_poclkp) { - tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa1); - budget_av->tda10021_ts_enabled = 1; - } - return 0; } @@ -288,61 +262,50 @@ static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open { struct budget_av *budget_av = (struct budget_av *) ca->data; struct saa7146_dev *saa = budget_av->budget.dev; - int result; + int cam_present = 0; if (slot != 0) return -EINVAL; - /* test the card detect line - needs to be done carefully - * since it never goes high for some CAMs on this interface (e.g. topuptv) */ - if (budget_av->slot_status == SLOTSTATUS_NONE) { + if (!budget_av->slot_status) + { + // first of all test the card detect line saa7146_setgpio(saa, 3, SAA7146_GPIO_INPUT); udelay(1); - if (saa7146_read(saa, PSR) & MASK_06) { - if (budget_av->slot_status == SLOTSTATUS_NONE) { - budget_av->slot_status = SLOTSTATUS_PRESENT; - printk(KERN_INFO "budget-av: cam inserted A\n"); - } + if (saa7146_read(saa, PSR) & MASK_06) + { + cam_present = 1; } saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO); - } - /* We also try and read from IO memory to work round the above detection bug. If - * there is no CAM, we will get a timeout. Only done if there is no cam - * present, since this test actually breaks some cams :( - * - * if the CI interface is not open, we also do the above test since we - * don't care if the cam has problems - we'll be resetting it on open() anyway */ - if ((budget_av->slot_status == SLOTSTATUS_NONE) || (!open)) { - saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); - result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1); - if ((result >= 0) && (budget_av->slot_status == SLOTSTATUS_NONE)) { - budget_av->slot_status = SLOTSTATUS_PRESENT; - printk(KERN_INFO "budget-av: cam inserted B\n"); - } else if (result < 0) { - if (budget_av->slot_status != SLOTSTATUS_NONE) { - ciintf_slot_shutdown(ca, slot); - printk(KERN_INFO "budget-av: cam ejected 5\n"); - return 0; + // that is unreliable however, so try and read from IO memory + if (!cam_present) + { + saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); + if (ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1) != -ETIMEDOUT) + { + cam_present = 1; } } - } - /* read from attribute memory in reset/ready state to know when the CAM is ready */ - if (budget_av->slot_status == SLOTSTATUS_RESET) { - result = ciintf_read_attribute_mem(ca, slot, 0); - if (result == 0x1d) { - budget_av->slot_status = SLOTSTATUS_READY; + // did we find something? + if (cam_present) { + printk(KERN_INFO "budget-av: cam inserted\n"); + budget_av->slot_status = 1; } - } - - /* work out correct return code */ - if (budget_av->slot_status != SLOTSTATUS_NONE) { - if (budget_av->slot_status & SLOTSTATUS_READY) { - return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; + } else if (!open) { + saa7146_setgpio(budget_av->budget.dev, 1, SAA7146_GPIO_OUTLO); + if (ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1) == -ETIMEDOUT) + { + printk(KERN_INFO "budget-av: cam ejected\n"); + saa7146_setgpio(saa, 2, SAA7146_GPIO_OUTHI); /* disable card */ + budget_av->slot_status = 0; } - return DVB_CA_EN50221_POLL_CAM_PRESENT; } + + if (budget_av->slot_status == 1) + return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; + return 0; } @@ -372,8 +335,6 @@ static int ciintf_init(struct budget_av *budget_av) budget_av->ca.slot_ts_enable = ciintf_slot_ts_enable; budget_av->ca.poll_slot_status = ciintf_poll_slot_status; budget_av->ca.data = budget_av; - budget_av->budget.ci_present = 1; - budget_av->slot_status = SLOTSTATUS_NONE; if ((result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, &budget_av->ca, 0, 1)) != 0) { @@ -382,6 +343,7 @@ static int ciintf_init(struct budget_av *budget_av) } printk(KERN_INFO "budget-av: ci interface initialised.\n"); + budget_av->budget.ci_present = 1; return 0; error: @@ -512,12 +474,12 @@ static int philips_su1278_ty_ci_set_symbol_rate(struct dvb_frontend *fe, u32 sra return 0; } -static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *params) +static int philips_su1278_ty_ci_pll_set(struct dvb_frontend *fe, + struct i2c_adapter *i2c, + struct dvb_frontend_parameters *params) { u32 div; u8 buf[4]; - struct budget *budget = (struct budget *) fe->dvb->priv; struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; if ((params->frequency < 950000) || (params->frequency > 2150000)) @@ -541,9 +503,7 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe, else if (params->frequency < 2150000) buf[3] |= 0xC0; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; return 0; } @@ -551,8 +511,9 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe, #define MIN2(a,b) ((a) < (b) ? (a) : (b)) #define MIN3(a,b,c) MIN2(MIN2(a,b),c) -static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *params) +static int philips_su1278sh2_tua6100_pll_set(struct dvb_frontend *fe, + struct i2c_adapter *i2c, + struct dvb_frontend_parameters *params) { u8 reg0 [2] = { 0x00, 0x00 }; u8 reg1 [4] = { 0x01, 0x00, 0x00, 0x00 }; @@ -562,7 +523,6 @@ static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe, int R, A, N, P, M; struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = NULL,.len = 0 }; int freq = params->frequency; - struct budget *budget = (struct budget *) fe->dvb->priv; first_ZF = (freq) / 1000; @@ -662,25 +622,21 @@ static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe, reg0[1] |= 0x03; /* already enabled - do not reenable i2c repeater or TX fails */ - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); msg.buf = reg0; msg.len = sizeof(reg0); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + stv0299_enable_plli2c(fe); msg.buf = reg1; msg.len = sizeof(reg1); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + stv0299_enable_plli2c(fe); msg.buf = reg2; msg.len = sizeof(reg2); - if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; return 0; @@ -738,6 +694,7 @@ static struct stv0299_config typhoon_config = { .volt13_op0_op1 = STV0299_VOLT13_OP0, .min_delay_ms = 100, .set_symbol_rate = philips_su1278_ty_ci_set_symbol_rate, + .pll_set = philips_su1278_ty_ci_pll_set, }; @@ -751,6 +708,7 @@ static struct stv0299_config cinergy_1200s_config = { .volt13_op0_op1 = STV0299_VOLT13_OP0, .min_delay_ms = 100, .set_symbol_rate = philips_su1278_ty_ci_set_symbol_rate, + .pll_set = philips_su1278_ty_ci_pll_set, }; static struct stv0299_config cinergy_1200s_1894_0010_config = { @@ -763,9 +721,10 @@ static struct stv0299_config cinergy_1200s_1894_0010_config = { .volt13_op0_op1 = STV0299_VOLT13_OP0, .min_delay_ms = 100, .set_symbol_rate = philips_su1278_ty_ci_set_symbol_rate, + .pll_set = philips_su1278sh2_tua6100_pll_set, }; -static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_cu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct budget *budget = (struct budget *) fe->dvb->priv; u8 buf[4]; @@ -781,8 +740,6 @@ static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f buf[3] = (params->frequency < 150000000 ? 0x01 : params->frequency < 445000000 ? 0x02 : 0x04); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; @@ -790,20 +747,19 @@ static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f static struct tda10021_config philips_cu1216_config = { .demod_address = 0x0c, + .pll_set = philips_cu1216_pll_set, }; -static int philips_tu1216_tuner_init(struct dvb_frontend *fe) +static int philips_tu1216_pll_init(struct dvb_frontend *fe) { struct budget *budget = (struct budget *) fe->dvb->priv; static u8 tu1216_init[] = { 0x0b, 0xf5, 0x85, 0xab }; struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; // setup PLL configuration - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -811,7 +767,7 @@ static int philips_tu1216_tuner_init(struct dvb_frontend *fe) return 0; } -static int philips_tu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tu1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct budget *budget = (struct budget *) fe->dvb->priv; u8 tuner_buf[4]; @@ -885,8 +841,6 @@ static int philips_tu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f tuner_buf[2] = 0xca; tuner_buf[3] = (cp << 5) | (filter << 3) | band; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) return -EIO; @@ -910,6 +864,9 @@ static struct tda1004x_config philips_tu1216_config = { .xtal_freq = TDA10046_XTAL_4M, .agc_config = TDA10046_AGC_DEFAULT, .if_freq = TDA10046_FREQ_3617, + .pll_init = philips_tu1216_pll_init, + .pll_set = philips_tu1216_pll_set, + .pll_sleep = NULL, .request_firmware = philips_tu1216_request_firmware, }; @@ -956,13 +913,13 @@ static u8 philips_sd1878_inittab[] = { 0xff, 0xff }; -static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *params) +static int philips_sd1878_tda8261_pll_set(struct dvb_frontend *fe, + struct i2c_adapter *i2c, + struct dvb_frontend_parameters *params) { u8 buf[4]; int rc; struct i2c_msg tuner_msg = {.addr=0x60,.flags=0,.buf=buf,.len=sizeof(buf)}; - struct budget *budget = (struct budget *) fe->dvb->priv; if((params->frequency < 950000) || (params->frequency > 2150000)) return -EINVAL; @@ -971,9 +928,7 @@ static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe, params->frequency, 0); if(rc < 0) return rc; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) + if(i2c_transfer(i2c, &tuner_msg, 1) != 1) return -EIO; return 0; @@ -1016,7 +971,7 @@ static int philips_sd1878_ci_set_symbol_rate(struct dvb_frontend *fe, static struct stv0299_config philips_sd1878_config = { .demod_address = 0x68, - .inittab = philips_sd1878_inittab, + .inittab = philips_sd1878_inittab, .mclk = 88000000UL, .invert = 0, .skip_reinit = 0, @@ -1024,6 +979,7 @@ static struct stv0299_config philips_sd1878_config = { .volt13_op0_op1 = STV0299_VOLT13_OP0, .min_delay_ms = 100, .set_symbol_rate = philips_sd1878_ci_set_symbol_rate, + .pll_set = philips_sd1878_tda8261_pll_set, }; static u8 read_pwm(struct budget_av *budget_av) @@ -1049,7 +1005,6 @@ static u8 read_pwm(struct budget_av *budget_av) #define SUBID_DVBS_TV_STAR 0x0014 #define SUBID_DVBS_TV_STAR_CI 0x0016 -#define SUBID_DVBS_EASYWATCH_1 0x001a #define SUBID_DVBS_EASYWATCH 0x001e #define SUBID_DVBC_KNC1 0x0020 #define SUBID_DVBC_KNC1_PLUS 0x0021 @@ -1059,23 +1014,6 @@ static u8 read_pwm(struct budget_av *budget_av) #define SUBID_DVBT_KNC1 0x0030 #define SUBID_DVBT_CINERGY1200 0x1157 - -static int tda10021_set_frontend(struct dvb_frontend *fe, - struct dvb_frontend_parameters *p) -{ - struct budget_av* budget_av = fe->dvb->priv; - int result; - - result = budget_av->tda10021_set_frontend(fe, p); - if (budget_av->tda10021_ts_enabled) { - tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa1); - } else { - tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); - } - - return result; -} - static void frontend_init(struct budget_av *budget_av) { struct saa7146_dev * saa = budget_av->budget.dev; @@ -1084,7 +1022,6 @@ static void frontend_init(struct budget_av *budget_av) /* Enable / PowerON Frontend */ saa7146_setgpio(saa, 0, SAA7146_GPIO_OUTLO); - /* additional setup necessary for the PLUS cards */ switch (saa->pci->subsystem_device) { case SUBID_DVBS_KNC1_PLUS: case SUBID_DVBC_KNC1_PLUS: @@ -1096,19 +1033,12 @@ static void frontend_init(struct budget_av *budget_av) switch (saa->pci->subsystem_device) { case SUBID_DVBS_KNC1: - case SUBID_DVBS_EASYWATCH_1: if (saa->pci->subsystem_vendor == 0x1894) { fe = stv0299_attach(&cinergy_1200s_1894_0010_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params; - } } else { fe = stv0299_attach(&typhoon_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; - } } break; @@ -1118,26 +1048,17 @@ static void frontend_init(struct budget_av *budget_av) case SUBID_DVBS_EASYWATCH: fe = stv0299_attach(&philips_sd1878_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; - } break; case SUBID_DVBS_KNC1_PLUS: case SUBID_DVBS_TYPHOON: fe = stv0299_attach(&typhoon_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; - } break; case SUBID_DVBS_CINERGY1200: fe = stv0299_attach(&cinergy_1200s_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; - } break; case SUBID_DVBC_KNC1: @@ -1145,35 +1066,30 @@ static void frontend_init(struct budget_av *budget_av) fe = tda10021_attach(&philips_cu1216_config, &budget_av->budget.i2c_adap, read_pwm(budget_av)); - if (fe) { - fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; - } break; case SUBID_DVBC_KNC1_PLUS: - case SUBID_DVBC_CINERGY1200: budget_av->reinitialise_demod = 1; fe = tda10021_attach(&philips_cu1216_config, &budget_av->budget.i2c_adap, read_pwm(budget_av)); - if (fe) { - budget_av->tda10021_poclkp = 1; - budget_av->tda10021_set_frontend = fe->ops.set_frontend; - fe->ops.set_frontend = tda10021_set_frontend; - fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; - } break; case SUBID_DVBT_KNC1: case SUBID_DVBT_KNC1_PLUS: + fe = tda10046_attach(&philips_tu1216_config, + &budget_av->budget.i2c_adap); + break; + + case SUBID_DVBC_CINERGY1200: + fe = tda10021_attach(&philips_cu1216_config, + &budget_av->budget.i2c_adap, + read_pwm(budget_av)); + break; + case SUBID_DVBT_CINERGY1200: - budget_av->reinitialise_demod = 1; fe = tda10046_attach(&philips_tu1216_config, &budget_av->budget.i2c_adap); - if (fe) { - fe->ops.tuner_ops.init = philips_tu1216_tuner_init; - fe->ops.tuner_ops.set_params = philips_tu1216_tuner_set_params; - } break; } @@ -1192,8 +1108,8 @@ static void frontend_init(struct budget_av *budget_av) if (dvb_register_frontend(&budget_av->budget.dvb_adapter, budget_av->budget.dvb_frontend)) { printk(KERN_ERR "budget-av: Frontend registration failed!\n"); - if (budget_av->budget.dvb_frontend->ops.release) - budget_av->budget.dvb_frontend->ops.release(budget_av->budget.dvb_frontend); + if (budget_av->budget.dvb_frontend->ops->release) + budget_av->budget.dvb_frontend->ops->release(budget_av->budget.dvb_frontend); budget_av->budget.dvb_frontend = NULL; } } @@ -1303,9 +1219,6 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio budget_av->budget.dvb_adapter.priv = budget_av; frontend_init(budget_av); ciintf_init(budget_av); - - ttpci_budget_init_hooks(&budget_av->budget); - return 0; } @@ -1386,7 +1299,6 @@ MAKE_BUDGET_INFO(knc1c, "KNC1 DVB-C", BUDGET_KNC1C); MAKE_BUDGET_INFO(knc1t, "KNC1 DVB-T", BUDGET_KNC1T); MAKE_BUDGET_INFO(kncxs, "KNC TV STAR DVB-S", BUDGET_TVSTAR); MAKE_BUDGET_INFO(satewpls, "Satelco EasyWatch DVB-S light", BUDGET_TVSTAR); -MAKE_BUDGET_INFO(satewpls1, "Satelco EasyWatch DVB-S light", BUDGET_KNC1S); MAKE_BUDGET_INFO(knc1sp, "KNC1 DVB-S Plus", BUDGET_KNC1SP); MAKE_BUDGET_INFO(knc1cp, "KNC1 DVB-C Plus", BUDGET_KNC1CP); MAKE_BUDGET_INFO(knc1tp, "KNC1 DVB-T Plus", BUDGET_KNC1TP); @@ -1403,7 +1315,6 @@ static struct pci_device_id pci_tbl[] = { MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0014), MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0016), MAKE_EXTENSION_PCI(satewpls, 0x1894, 0x001e), - MAKE_EXTENSION_PCI(satewpls1, 0x1894, 0x001a), MAKE_EXTENSION_PCI(knc1c, 0x1894, 0x0020), MAKE_EXTENSION_PCI(knc1cp, 0x1894, 0x0021), MAKE_EXTENSION_PCI(knc1t, 0x1894, 0x0030), diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index ffbbb3e34..36e4a8056 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c @@ -620,10 +620,10 @@ static int philips_su1278_tt_set_symbol_rate(struct dvb_frontend *fe, u32 srate, return 0; } -static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *params) +static int philips_su1278_tt_pll_set(struct dvb_frontend *fe, + struct i2c_adapter *i2c, + struct dvb_frontend_parameters *params) { - struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; u32 div; u8 buf[4]; struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = buf,.len = sizeof(buf) }; @@ -649,9 +649,7 @@ static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe, else if (params->frequency < 2150000) buf[3] |= 0xC0; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; return 0; } @@ -667,11 +665,12 @@ static struct stv0299_config philips_su1278_tt_config = { .volt13_op0_op1 = STV0299_VOLT13_OP1, .min_delay_ms = 50, .set_symbol_rate = philips_su1278_tt_set_symbol_rate, + .pll_set = philips_su1278_tt_pll_set, }; -static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe) +static int philips_tdm1316l_pll_init(struct dvb_frontend *fe) { struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab }; @@ -680,8 +679,6 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe) sizeof(td1316_init) }; // setup PLL configuration - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -690,18 +687,14 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe) tuner_msg.addr = 0x65; tuner_msg.buf = disable_mc44BC374c; tuner_msg.len = sizeof(disable_mc44BC374c); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) { - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1); } return 0; } -static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tdm1316l_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; u8 tuner_buf[4]; @@ -777,8 +770,6 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb tuner_buf[2] = 0xca; tuner_buf[3] = (cp << 5) | (filter << 3) | band; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) return -EIO; @@ -802,10 +793,13 @@ static struct tda1004x_config philips_tdm1316l_config = { .xtal_freq = TDA10046_XTAL_4M, .agc_config = TDA10046_AGC_DEFAULT, .if_freq = TDA10046_FREQ_3617, + .pll_init = philips_tdm1316l_pll_init, + .pll_set = philips_tdm1316l_pll_set, + .pll_sleep = NULL, .request_firmware = philips_tdm1316l_request_firmware, }; -static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int dvbc_philips_tdm1316l_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv; u8 tuner_buf[5]; @@ -863,15 +857,13 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc tuner_buf[3] = (cp << 5) | (filter << 3) | band; tuner_buf[4] = 0x80; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + stv0297_enable_plli2c(fe); if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(50); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); + stv0297_enable_plli2c(fe); if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) return -EIO; @@ -977,7 +969,7 @@ static struct stv0297_config dvbc_philips_tdm1316l_config = { .demod_address = 0x1c, .inittab = dvbc_philips_tdm1316l_inittab, .invert = 0, - .stop_during_read = 1, + .pll_set = dvbc_philips_tdm1316l_pll_set, }; @@ -990,8 +982,6 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; - budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; break; } break; @@ -1000,7 +990,6 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_su1278_tt_tuner_set_params; break; } break; @@ -1010,7 +999,6 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; break; } break; @@ -1020,8 +1008,6 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; break; } break; @@ -1031,8 +1017,6 @@ static void frontend_init(struct budget_ci *budget_ci) budget_ci->budget.dvb_frontend = tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; break; } break; @@ -1040,14 +1024,11 @@ static void frontend_init(struct budget_ci *budget_ci) case 0x1017: // TT S-1500 PCI budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap); if (budget_ci->budget.dvb_frontend) { - budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; - budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; - - budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; - if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) { + budget_ci->budget.dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; + if (lnbp21_init(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) { printk("%s: No LNBP21 found!\n", __FUNCTION__); - if (budget_ci->budget.dvb_frontend->ops.release) - budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend); + if (budget_ci->budget.dvb_frontend->ops->release) + budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } } @@ -1065,8 +1046,8 @@ static void frontend_init(struct budget_ci *budget_ci) if (dvb_register_frontend (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { printk("budget-ci: Frontend registration failed!\n"); - if (budget_ci->budget.dvb_frontend->ops.release) - budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend); + if (budget_ci->budget.dvb_frontend->ops->release) + budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); budget_ci->budget.dvb_frontend = NULL; } } @@ -1101,8 +1082,6 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio budget_ci->budget.dvb_adapter.priv = budget_ci; frontend_init(budget_ci); - ttpci_budget_init_hooks(&budget_ci->budget); - return 0; } @@ -1153,7 +1132,7 @@ static struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { - .name = "budget_ci dvb\0", + .name = "budget_ci dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, diff --git a/drivers/media/dvb/ttpci/budget-core.c b/drivers/media/dvb/ttpci/budget-core.c index e15562f81..ea2066d46 100644 --- a/drivers/media/dvb/ttpci/budget-core.c +++ b/drivers/media/dvb/ttpci/budget-core.c @@ -63,6 +63,9 @@ static int stop_ts_capture(struct budget *budget) { dprintk(2, "budget: %p\n", budget); + if (--budget->feeding) + return budget->feeding; + saa7146_write(budget->dev, MC1, MASK_20); // DMA3 off SAA7146_IER_DISABLE(budget->dev, MASK_10); return 0; @@ -74,8 +77,8 @@ static int start_ts_capture(struct budget *budget) dprintk(2, "budget: %p\n", budget); - if (!budget->feeding || !budget->fe_synced) - return 0; + if (budget->feeding) + return ++budget->feeding; saa7146_write(dev, MC1, MASK_20); // DMA3 off @@ -136,33 +139,7 @@ static int start_ts_capture(struct budget *budget) SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */ saa7146_write(dev, MC1, (MASK_04 | MASK_20)); /* DMA3 on */ - return 0; -} - -static int budget_read_fe_status(struct dvb_frontend *fe, fe_status_t *status) -{ - struct budget *budget = (struct budget *) fe->dvb->priv; - int synced; - int ret; - - if (budget->read_fe_status) - ret = budget->read_fe_status(fe, status); - else - ret = -EINVAL; - - if (!ret) { - synced = (*status & FE_HAS_LOCK); - if (synced != budget->fe_synced) { - budget->fe_synced = synced; - spin_lock(&budget->feedlock); - if (synced) - start_ts_capture(budget); - else - stop_ts_capture(budget); - spin_unlock(&budget->feedlock); - } - } - return ret; + return ++budget->feeding; } static void vpeirq(unsigned long data) @@ -290,7 +267,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct budget *budget = (struct budget *) demux->priv; - int status = 0; + int status; dprintk(2, "budget: %p\n", budget); @@ -299,8 +276,7 @@ static int budget_start_feed(struct dvb_demux_feed *feed) spin_lock(&budget->feedlock); feed->pusi_seen = 0; /* have a clean section start */ - if (budget->feeding++ == 0) - status = start_ts_capture(budget); + status = start_ts_capture(budget); spin_unlock(&budget->feedlock); return status; } @@ -309,13 +285,12 @@ static int budget_stop_feed(struct dvb_demux_feed *feed) { struct dvb_demux *demux = feed->demux; struct budget *budget = (struct budget *) demux->priv; - int status = 0; + int status; dprintk(2, "budget: %p\n", budget); spin_lock(&budget->feedlock); - if (--budget->feeding == 0) - status = stop_ts_capture(budget); + status = stop_ts_capture(budget); spin_unlock(&budget->feedlock); return status; } @@ -425,9 +400,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, budget->dev->name, budget->buffer_width, budget->buffer_height); printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); - if ((ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner, &budget->dev->pci->dev)) < 0) { - return ret; - } + dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner); /* set dd1 stream a & b */ saa7146_write(dev, DD1_STREAM_B, 0x00000000); @@ -495,14 +468,6 @@ err: return ret; } -void ttpci_budget_init_hooks(struct budget *budget) -{ - if (budget->dvb_frontend && !budget->read_fe_status) { - budget->read_fe_status = budget->dvb_frontend->ops.read_status; - budget->dvb_frontend->ops.read_status = budget_read_fe_status; - } -} - int ttpci_budget_deinit(struct budget *budget) { struct saa7146_dev *dev = budget->dev; @@ -541,8 +506,11 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port) spin_lock(&budget->feedlock); budget->video_port = video_port; if (budget->feeding) { + int oldfeeding = budget->feeding; + budget->feeding = 1; stop_ts_capture(budget); start_ts_capture(budget); + budget->feeding = oldfeeding; } spin_unlock(&budget->feedlock); } @@ -550,7 +518,6 @@ void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port) EXPORT_SYMBOL_GPL(ttpci_budget_debiread); EXPORT_SYMBOL_GPL(ttpci_budget_debiwrite); EXPORT_SYMBOL_GPL(ttpci_budget_init); -EXPORT_SYMBOL_GPL(ttpci_budget_init_hooks); EXPORT_SYMBOL_GPL(ttpci_budget_deinit); EXPORT_SYMBOL_GPL(ttpci_budget_irq10_handler); EXPORT_SYMBOL_GPL(ttpci_budget_set_video_port); diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 572274418..05d63b6bd 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c @@ -258,7 +258,7 @@ static int budget_patch_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_c return 0; } -static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; u8 pwr = 0; @@ -281,10 +281,7 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front // NOTE: since we're using a prescaler of 2, we set the // divisor frequency to 62.5kHz and divide by 125 above - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) - return -EIO; + if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } @@ -292,9 +289,10 @@ static struct ves1x93_config alps_bsrv2_config = { .demod_address = 0x08, .xin = 90100000UL, .invert_pwm = 0, + .pll_set = alps_bsrv2_pll_set, }; -static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int grundig_29504_451_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget_patch* budget = (struct budget_patch*) fe->dvb->priv; u32 div; @@ -307,15 +305,13 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv data[2] = 0x8e; data[3] = 0x00; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) - return -EIO; + if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } static struct tda8083_config grundig_29504_451_config = { .demod_address = 0x68, + .pll_set = grundig_29504_451_pll_set, }; static void frontend_init(struct budget_patch* budget) @@ -327,32 +323,27 @@ static void frontend_init(struct budget_patch* budget) // try the ALPS BSRV2 first of all budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; - budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; - budget->dvb_frontend->ops.diseqc_send_burst = budget_patch_diseqc_send_burst; - budget->dvb_frontend->ops.set_tone = budget_patch_set_tone; + budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; + budget->dvb_frontend->ops->diseqc_send_burst = budget_patch_diseqc_send_burst; + budget->dvb_frontend->ops->set_tone = budget_patch_set_tone; break; } // try the ALPS BSRU6 now budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; - budget->dvb_frontend->tuner_priv = &budget->i2c_adap; - - budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; - budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; - budget->dvb_frontend->ops.set_tone = budget_set_tone; + budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; + budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; + budget->dvb_frontend->ops->set_tone = budget_set_tone; break; } // Try the grundig 29504-451 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; - budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; - budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; - budget->dvb_frontend->ops.set_tone = budget_set_tone; + budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; + budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; + budget->dvb_frontend->ops->set_tone = budget_set_tone; break; } break; @@ -367,8 +358,8 @@ static void frontend_init(struct budget_patch* budget) } else { if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { printk("budget-av: Frontend registration failed!\n"); - if (budget->dvb_frontend->ops.release) - budget->dvb_frontend->ops.release(budget->dvb_frontend); + if (budget->dvb_frontend->ops->release) + budget->dvb_frontend->ops->release(budget->dvb_frontend); budget->dvb_frontend = NULL; } } @@ -617,8 +608,6 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte budget->dvb_adapter.priv = budget; frontend_init(budget); - ttpci_budget_init_hooks(budget); - return 0; } @@ -647,7 +636,7 @@ static void __exit budget_patch_exit(void) } static struct saa7146_extension budget_extension = { - .name = "budget_patch dvb\0", + .name = "budget_patch dvb", .flags = 0, .module = THIS_MODULE, diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 863dffb4e..d6d37cf02 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c @@ -186,7 +186,7 @@ static int budget_diseqc_send_burst(struct dvb_frontend* fe, fe_sec_mini_cmd_t m return 0; } -static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget* budget = (struct budget*) fe->dvb->priv; u8 pwr = 0; @@ -209,8 +209,6 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front // NOTE: since we're using a prescaler of 2, we set the // divisor frequency to 62.5kHz and divide by 125 above - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } @@ -220,9 +218,10 @@ static struct ves1x93_config alps_bsrv2_config = .demod_address = 0x08, .xin = 90100000UL, .invert_pwm = 0, + .pll_set = alps_bsrv2_pll_set, }; -static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget* budget = (struct budget*) fe->dvb->priv; u32 div; @@ -236,8 +235,6 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = 0x85 | ((div >> 10) & 0x60); data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } @@ -247,9 +244,10 @@ static struct ves1820_config alps_tdbe2_config = { .xin = 57840000UL, .invert = 1, .selagc = VES1820_SELAGC_SIGNAMPERR, + .pll_set = alps_tdbe2_pll_set, }; -static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget* budget = (struct budget*) fe->dvb->priv; u32 div; @@ -276,17 +274,16 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv data[2] = ((div >> 10) & 0x60) | cfg; data[3] = (cpump << 6) | band_select; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } static struct l64781_config grundig_29504_401_config = { .demod_address = 0x55, + .pll_set = grundig_29504_401_pll_set, }; -static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int grundig_29504_451_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct budget* budget = (struct budget*) fe->dvb->priv; u32 div; @@ -299,17 +296,16 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv data[2] = 0x8e; data[3] = 0x00; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } static struct tda8083_config grundig_29504_451_config = { .demod_address = 0x68, + .pll_set = grundig_29504_451_pll_set, }; -static int s5h1420_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int s5h1420_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u32* freqout) { struct budget* budget = (struct budget*) fe->dvb->priv; u32 div; @@ -330,16 +326,16 @@ static int s5h1420_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend else data[3] = 0xc0; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; + *freqout = div * 1000; return 0; } static struct s5h1420_config s5h1420_config = { .demod_address = 0x53, .invert = 1, + .pll_set = s5h1420_pll_set, }; static u8 read_pwm(struct budget* budget) @@ -363,64 +359,48 @@ static void frontend_init(struct budget *budget) // try the ALPS BSRV2 first of all budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; - budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; - budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; - budget->dvb_frontend->ops.set_tone = budget_set_tone; + budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; + budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; + budget->dvb_frontend->ops->set_tone = budget_set_tone; break; } // try the ALPS BSRU6 now budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); - if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; - budget->dvb_frontend->tuner_priv = &budget->i2c_adap; - break; - } break; case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); - if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; - break; - } + if (budget->dvb_frontend) break; break; case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig 29504-401(tsa5060)) budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap); - if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; - break; - } + if (budget->dvb_frontend) break; break; case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; - budget->dvb_frontend->tuner_priv = &budget->i2c_adap; - budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; - budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; + budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; + budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; } break; case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; - budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; - budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; + budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; + budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; } break; case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap); if (budget->dvb_frontend) { - budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params; - if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) { + if (lnbp21_init(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) { printk("%s: No LNBP21 found!\n", __FUNCTION__); goto error_out; } @@ -442,8 +422,8 @@ static void frontend_init(struct budget *budget) error_out: printk("budget: Frontend registration failed!\n"); - if (budget->dvb_frontend->ops.release) - budget->dvb_frontend->ops.release(budget->dvb_frontend); + if (budget->dvb_frontend->ops->release) + budget->dvb_frontend->ops->release(budget->dvb_frontend); budget->dvb_frontend = NULL; return; } @@ -471,8 +451,6 @@ static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_ budget->dvb_adapter.priv = budget; frontend_init(budget); - ttpci_budget_init_hooks(budget); - return 0; } @@ -516,7 +494,7 @@ static struct pci_device_id pci_tbl[] = { MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { - .name = "budget dvb\0", + .name = "budget dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, diff --git a/drivers/media/dvb/ttpci/budget.h b/drivers/media/dvb/ttpci/budget.h index e8a5c7917..ecea3a130 100644 --- a/drivers/media/dvb/ttpci/budget.h +++ b/drivers/media/dvb/ttpci/budget.h @@ -52,6 +52,9 @@ struct budget { struct dmx_frontend hw_frontend; struct dmx_frontend mem_frontend; + int fe_synced; + struct mutex pid_mutex; + int ci_present; int video_port; @@ -71,9 +74,6 @@ struct budget { struct dvb_adapter dvb_adapter; struct dvb_frontend *dvb_frontend; - int (*read_fe_status)(struct dvb_frontend *fe, fe_status_t *status); - int fe_synced; - void *priv; }; @@ -106,7 +106,6 @@ static struct saa7146_pci_extension_data x_var = { \ extern int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev, struct saa7146_pci_extension_data *info, struct module *owner); -extern void ttpci_budget_init_hooks(struct budget *budget); extern int ttpci_budget_deinit(struct budget *budget); extern void ttpci_budget_irq10_handler(struct saa7146_dev *dev, u32 * isr); extern void ttpci_budget_set_video_port(struct saa7146_dev *dev, int video_port); diff --git a/drivers/media/dvb/ttusb-budget/Kconfig b/drivers/media/dvb/ttusb-budget/Kconfig index 46a6a60d2..914587d52 100644 --- a/drivers/media/dvb/ttusb-budget/Kconfig +++ b/drivers/media/dvb/ttusb-budget/Kconfig @@ -1,14 +1,11 @@ config DVB_TTUSB_BUDGET tristate "Technotrend/Hauppauge Nova-USB devices" - depends on DVB_CORE && USB && I2C - select DVB_PLL + depends on DVB_CORE && USB select DVB_CX22700 select DVB_TDA1004X select DVB_VES1820 select DVB_TDA8083 select DVB_STV0299 - select DVB_STV0297 - select DVB_LNBP21 help Support for external USB adapters designed by Technotrend and produced by Hauppauge, shipped under the brand name 'Nova-USB'. diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 04cef3023..6ceae3812 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -30,8 +30,6 @@ #include "tda1004x.h" #include "stv0299.h" #include "tda8083.h" -#include "stv0297.h" -#include "lnbp21.h" #include #include @@ -43,7 +41,7 @@ is a bit braindead (no matching channel masks or no matching filter mask), we won't support this - yet. it doesn't event support negative filters, so the best way is maybe to keep TTUSB_HWSECTIONS undef'd and just - parse TS data. USB bandwidth will be a problem when having large + parse TS data. USB bandwith will be a problem when having large datastreams, especially for dvb-net, but hey, that's not my problem. TTUSB_DISEQC, TTUSB_TONE: @@ -126,6 +124,10 @@ struct ttusb { int revision; +#if 0 + devfs_handle_t stc_devfs_handle; +#endif + struct dvb_frontend* fe; }; @@ -484,6 +486,31 @@ static int ttusb_send_diseqc(struct dvb_frontend* fe, } #endif +static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) +{ + struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; + int ret; + u8 data[1]; + struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; + + switch(voltage) { + case SEC_VOLTAGE_OFF: + data[0] = 0x00; + break; + case SEC_VOLTAGE_13: + data[0] = 0x44; + break; + case SEC_VOLTAGE_18: + data[0] = 0x4c; + break; + default: + return -EINVAL; + }; + + ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1); + return (ret != 1) ? -EIO : 0; +} + static int ttusb_update_lnb(struct ttusb *ttusb) { u8 b[] = { 0xaa, ++ttusb->c, 0x16, 5, /*power: */ 1, @@ -1021,7 +1048,7 @@ static u32 functionality(struct i2c_adapter *adapter) -static int alps_tdmb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int alps_tdmb7_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; u8 data[4]; @@ -1035,21 +1062,20 @@ static int alps_tdmb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = ((div >> 10) & 0x60) | 0x85; data[3] = params->frequency < 592000000 ? 0x40 : 0x80; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; return 0; } static struct cx22700_config alps_tdmb7_config = { .demod_address = 0x43, + .pll_set = alps_tdmb7_pll_set, }; -static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe) +static int philips_tdm1316l_pll_init(struct dvb_frontend* fe) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; static u8 td1316_init[] = { 0x0b, 0xf5, 0x85, 0xab }; @@ -1057,8 +1083,6 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe) struct i2c_msg tuner_msg = { .addr=0x60, .flags=0, .buf=td1316_init, .len=sizeof(td1316_init) }; // setup PLL configuration - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -1066,8 +1090,6 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe) tuner_msg.addr = 0x65; tuner_msg.buf = disable_mc44BC374c; tuner_msg.len = sizeof(disable_mc44BC374c); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1); } @@ -1075,7 +1097,7 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe) return 0; } -static int philips_tdm1316l_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int philips_tdm1316l_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; u8 tuner_buf[4]; @@ -1135,8 +1157,6 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend* fe, struct dvb tuner_buf[2] = 0xca; tuner_buf[3] = (cp << 5) | (filter << 3) | band; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) return -EIO; @@ -1156,6 +1176,8 @@ static struct tda1004x_config philips_tdm1316l_config = { .demod_address = 0x8, .invert = 1, .invert_oclk = 0, + .pll_init = philips_tdm1316l_pll_init, + .pll_set = philips_tdm1316l_pll_set, .request_firmware = philips_tdm1316l_request_firmware, }; @@ -1277,7 +1299,7 @@ static int alps_stv0299_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 return 0; } -static int philips_tsa5059_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tsa5059_pll_set(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; u8 buf[4]; @@ -1300,9 +1322,7 @@ static int philips_tsa5059_tuner_set_params(struct dvb_frontend *fe, struct dvb_ if (ttusb->revision == TTUSB_REV_2_2) buf[3] |= 0x20; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) + if (i2c_transfer(i2c, &msg, 1) != 1) return -EIO; return 0; @@ -1318,9 +1338,10 @@ static struct stv0299_config alps_stv0299_config = { .volt13_op0_op1 = STV0299_VOLT13_OP1, .min_delay_ms = 100, .set_symbol_rate = alps_stv0299_set_symbol_rate, + .pll_set = philips_tsa5059_pll_set, }; -static int ttusb_novas_grundig_29504_491_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int ttusb_novas_grundig_29504_491_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; u8 buf[4]; @@ -1334,8 +1355,6 @@ static int ttusb_novas_grundig_29504_491_tuner_set_params(struct dvb_frontend *f buf[2] = 0x8e; buf[3] = 0x00; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; @@ -1345,9 +1364,10 @@ static int ttusb_novas_grundig_29504_491_tuner_set_params(struct dvb_frontend *f static struct tda8083_config ttusb_novas_grundig_29504_491_config = { .demod_address = 0x68, + .pll_set = ttusb_novas_grundig_29504_491_pll_set, }; -static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) +static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) { struct ttusb* ttusb = fe->dvb->priv; u32 div; @@ -1361,8 +1381,6 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front data[2] = 0x85 | ((div >> 10) & 0x60); data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer (&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; @@ -1375,6 +1393,7 @@ static struct ves1820_config alps_tdbe2_config = { .xin = 57840000UL, .invert = 1, .selagc = VES1820_SELAGC_SIGNAMPERR, + .pll_set = alps_tdbe2_pll_set, }; static u8 read_pwm(struct ttusb* ttusb) @@ -1391,174 +1410,6 @@ static u8 read_pwm(struct ttusb* ttusb) } -static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) -{ - struct ttusb *ttusb = (struct ttusb *) fe->dvb->priv; - u8 tuner_buf[5]; - struct i2c_msg tuner_msg = {.addr = 0x60, - .flags = 0, - .buf = tuner_buf, - .len = sizeof(tuner_buf) }; - int tuner_frequency = 0; - u8 band, cp, filter; - - // determine charge pump - tuner_frequency = params->frequency; - if (tuner_frequency < 87000000) {return -EINVAL;} - else if (tuner_frequency < 130000000) {cp = 3; band = 1;} - else if (tuner_frequency < 160000000) {cp = 5; band = 1;} - else if (tuner_frequency < 200000000) {cp = 6; band = 1;} - else if (tuner_frequency < 290000000) {cp = 3; band = 2;} - else if (tuner_frequency < 420000000) {cp = 5; band = 2;} - else if (tuner_frequency < 480000000) {cp = 6; band = 2;} - else if (tuner_frequency < 620000000) {cp = 3; band = 4;} - else if (tuner_frequency < 830000000) {cp = 5; band = 4;} - else if (tuner_frequency < 895000000) {cp = 7; band = 4;} - else {return -EINVAL;} - - // assume PLL filter should always be 8MHz for the moment. - filter = 1; - - // calculate divisor - // (Finput + Fif)/Fref; Fif = 36125000 Hz, Fref = 62500 Hz - tuner_frequency = ((params->frequency + 36125000) / 62500); - - // setup tuner buffer - tuner_buf[0] = tuner_frequency >> 8; - tuner_buf[1] = tuner_frequency & 0xff; - tuner_buf[2] = 0xc8; - tuner_buf[3] = (cp << 5) | (filter << 3) | band; - tuner_buf[4] = 0x80; - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { - printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 1\n"); - return -EIO; - } - - msleep(50); - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); - if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { - printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 2\n"); - return -EIO; - } - - msleep(1); - - return 0; -} - -static u8 dvbc_philips_tdm1316l_inittab[] = { - 0x80, 0x21, - 0x80, 0x20, - 0x81, 0x01, - 0x81, 0x00, - 0x00, 0x09, - 0x01, 0x69, - 0x03, 0x00, - 0x04, 0x00, - 0x07, 0x00, - 0x08, 0x00, - 0x20, 0x00, - 0x21, 0x40, - 0x22, 0x00, - 0x23, 0x00, - 0x24, 0x40, - 0x25, 0x88, - 0x30, 0xff, - 0x31, 0x00, - 0x32, 0xff, - 0x33, 0x00, - 0x34, 0x50, - 0x35, 0x7f, - 0x36, 0x00, - 0x37, 0x20, - 0x38, 0x00, - 0x40, 0x1c, - 0x41, 0xff, - 0x42, 0x29, - 0x43, 0x20, - 0x44, 0xff, - 0x45, 0x00, - 0x46, 0x00, - 0x49, 0x04, - 0x4a, 0xff, - 0x4b, 0x7f, - 0x52, 0x30, - 0x55, 0xae, - 0x56, 0x47, - 0x57, 0xe1, - 0x58, 0x3a, - 0x5a, 0x1e, - 0x5b, 0x34, - 0x60, 0x00, - 0x63, 0x00, - 0x64, 0x00, - 0x65, 0x00, - 0x66, 0x00, - 0x67, 0x00, - 0x68, 0x00, - 0x69, 0x00, - 0x6a, 0x02, - 0x6b, 0x00, - 0x70, 0xff, - 0x71, 0x00, - 0x72, 0x00, - 0x73, 0x00, - 0x74, 0x0c, - 0x80, 0x00, - 0x81, 0x00, - 0x82, 0x00, - 0x83, 0x00, - 0x84, 0x04, - 0x85, 0x80, - 0x86, 0x24, - 0x87, 0x78, - 0x88, 0x00, - 0x89, 0x00, - 0x90, 0x01, - 0x91, 0x01, - 0xa0, 0x00, - 0xa1, 0x00, - 0xa2, 0x00, - 0xb0, 0x91, - 0xb1, 0x0b, - 0xc0, 0x4b, - 0xc1, 0x00, - 0xc2, 0x00, - 0xd0, 0x00, - 0xd1, 0x00, - 0xd2, 0x00, - 0xd3, 0x00, - 0xd4, 0x00, - 0xd5, 0x00, - 0xde, 0x00, - 0xdf, 0x00, - 0x61, 0x38, - 0x62, 0x0a, - 0x53, 0x13, - 0x59, 0x08, - 0x55, 0x00, - 0x56, 0x40, - 0x57, 0x08, - 0x58, 0x3d, - 0x88, 0x10, - 0xa0, 0x00, - 0xa0, 0x00, - 0xa0, 0x00, - 0xa0, 0x04, - 0xff, 0xff, -}; - -static struct stv0297_config dvbc_philips_tdm1316l_config = { - .demod_address = 0x1c, - .inittab = dvbc_philips_tdm1316l_inittab, - .invert = 0, -}; - static void frontend_init(struct ttusb* ttusb) { switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) { @@ -1566,13 +1417,11 @@ static void frontend_init(struct ttusb* ttusb) // try the stv0299 based first ttusb->fe = stv0299_attach(&alps_stv0299_config, &ttusb->i2c_adap); if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params; - if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1 alps_stv0299_config.inittab = alps_bsbe1_inittab; - lnbp21_attach(ttusb->fe, &ttusb->i2c_adap, 0, 0); + ttusb->fe->ops->set_voltage = lnbp21_set_voltage; } else { // ALPS BSRU6 - ttusb->fe->ops.set_voltage = ttusb_set_voltage; + ttusb->fe->ops->set_voltage = ttusb_set_voltage; } break; } @@ -1580,41 +1429,28 @@ static void frontend_init(struct ttusb* ttusb) // Grundig 29504-491 ttusb->fe = tda8083_attach(&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap); if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params; - ttusb->fe->ops.set_voltage = ttusb_set_voltage; + ttusb->fe->ops->set_voltage = ttusb_set_voltage; break; } + break; case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) ttusb->fe = ves1820_attach(&alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb)); - if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; - break; - } - - ttusb->fe = stv0297_attach(&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; + if (ttusb->fe != NULL) break; - } break; case 0x1005: // Hauppauge/TT Nova-USB-t budget (tda10046/Philips td1316(tda6651tt) OR cx22700/ALPS TDMB7(??)) // try the ALPS TDMB7 first ttusb->fe = cx22700_attach(&alps_tdmb7_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params; + if (ttusb->fe != NULL) break; - } // Philips td1316 ttusb->fe = tda10046_attach(&philips_tdm1316l_config, &ttusb->i2c_adap); - if (ttusb->fe != NULL) { - ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init; - ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; + if (ttusb->fe != NULL) break; - } break; } @@ -1625,8 +1461,8 @@ static void frontend_init(struct ttusb* ttusb) } else { if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) { printk("dvb-ttusb-budget: Frontend registration failed!\n"); - if (ttusb->fe->ops.release) - ttusb->fe->ops.release(ttusb->fe); + if (ttusb->fe->ops->release) + ttusb->fe->ops->release(ttusb->fe); ttusb->fe = NULL; } } @@ -1671,7 +1507,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i mutex_unlock(&ttusb->semi2c); - if ((result = dvb_register_adapter(&ttusb->adapter, "Technotrend/Hauppauge Nova-USB", THIS_MODULE, &udev->dev)) < 0) { + if ((result = dvb_register_adapter(&ttusb->adapter, "Technotrend/Hauppauge Nova-USB", THIS_MODULE)) < 0) { ttusb_free_iso_urbs(ttusb); kfree(ttusb); return result; @@ -1742,6 +1578,13 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i return -ENODEV; } +#if 0 + ttusb->stc_devfs_handle = + devfs_register(ttusb->adapter->devfs_handle, TTUSB_BUDGET_NAME, + DEVFS_FL_DEFAULT, 0, 192, + S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP + | S_IROTH | S_IWOTH, &stc_fops, ttusb); +#endif usb_set_intfdata(intf, (void *) ttusb); frontend_init(ttusb); diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 6c1cb770b..44dea3211 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -1432,7 +1432,7 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec) dprintk("%s\n", __FUNCTION__); if ((result = dvb_register_adapter(&dec->adapter, - dec->model_name, THIS_MODULE, &dec->udev->dev)) < 0) { + dec->model_name, THIS_MODULE)) < 0) { printk("%s: dvb_register_adapter failed: error %d\n", __FUNCTION__, result); @@ -1657,8 +1657,8 @@ static int ttusb_dec_probe(struct usb_interface *intf, } else { if (dvb_register_frontend(&dec->adapter, dec->fe)) { printk("budget-ci: Frontend registration failed!\n"); - if (dec->fe->ops.release) - dec->fe->ops.release(dec->fe); + if (dec->fe->ops->release) + dec->fe->ops->release(dec->fe); dec->fe = NULL; } } diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c index 42f39a89b..a5a46175f 100644 --- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c +++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c @@ -28,6 +28,8 @@ struct ttusbdecfe_state { + struct dvb_frontend_ops ops; + /* configuration settings */ const struct ttusbdecfe_config* config; @@ -201,9 +203,10 @@ struct dvb_frontend* ttusbdecfe_dvbt_attach(const struct ttusbdecfe_config* conf /* setup the state */ state->config = config; + memcpy(&state->ops, &ttusbdecfe_dvbt_ops, sizeof(struct dvb_frontend_ops)); /* create dvb_frontend */ - memcpy(&state->frontend.ops, &ttusbdecfe_dvbt_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; } @@ -223,9 +226,10 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf state->config = config; state->voltage = 0; state->hi_band = 0; + memcpy(&state->ops, &ttusbdecfe_dvbs_ops, sizeof(struct dvb_frontend_ops)); /* create dvb_frontend */ - memcpy(&state->frontend.ops, &ttusbdecfe_dvbs_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; return &state->frontend; } diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 220076b1b..3fff75763 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -136,7 +136,7 @@ config RADIO_GEMTEK_PCI Choose Y here if you have this PCI FM radio card. In order to control your radio card, you will need to use programs - that are compatible with the Video for Linux API. Information on + that are compatible with the Video for Linux API. Information on this API and pointers to "v4l" programs may be found at . @@ -350,15 +350,5 @@ config RADIO_ZOLTRIX_PORT help Enter the I/O port of your Zoltrix radio card. -config USB_DSBR - tristate "D-Link USB FM radio support (EXPERIMENTAL)" - depends on USB && VIDEO_V4L1 && EXPERIMENTAL - ---help--- - Say Y here if you want to connect this type of radio to your - computer's USB port. Note that the audio is not digital, and - you must connect the line out connector to a sound card or a - set of speakers. - - To compile this driver as a module, choose M here: the - module will be called dsbr100. endmenu + diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile index cf55a18e3..8b351945d 100644 --- a/drivers/media/radio/Makefile +++ b/drivers/media/radio/Makefile @@ -20,6 +20,3 @@ obj-$(CONFIG_RADIO_GEMTEK) += radio-gemtek.o obj-$(CONFIG_RADIO_GEMTEK_PCI) += radio-gemtek-pci.o obj-$(CONFIG_RADIO_TRUST) += radio-trust.o obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o -obj-$(CONFIG_USB_DSBR) += dsbr100.o - -EXTRA_CFLAGS += -Isound diff --git a/drivers/media/radio/miropcm20-radio.c b/drivers/media/radio/miropcm20-radio.c index c4312fa0e..dc292da26 100644 --- a/drivers/media/radio/miropcm20-radio.c +++ b/drivers/media/radio/miropcm20-radio.c @@ -16,14 +16,13 @@ /* What ever you think about the ACI, version 0x07 is not very well! * I can't get frequency, 'tuner status', 'tuner flags' or mute/mono - * conditions... Robert + * conditions... Robert */ #include #include #include -#include -#include "oss/aci.h" +#include "../../../sound/oss/aci.h" #include "miropcm20-rds-core.h" static int radio_nr = -1; @@ -124,7 +123,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file, struct video_device *dev = video_devdata(file); struct pcm20_device *pcm20 = dev->priv; int i; - + switch(cmd) { case VIDIOCGCAP: @@ -140,7 +139,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=87*16000; v->rangehigh=108*16000; @@ -173,7 +172,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file, return i; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags=VIDEO_AUDIO_MUTABLE; @@ -184,12 +183,12 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file, v->mode|=VIDEO_SOUND_MONO; /* v->step=2048; */ strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; pcm20_mute(pcm20, !!(v->flags&VIDEO_AUDIO_MUTE)); @@ -238,7 +237,7 @@ static int __init pcm20_init(void) { if(video_register_device(&pcm20_radio, VFL_TYPE_RADIO, radio_nr)==-1) goto video_register_device; - + if(attach_aci_rds()<0) goto attach_aci_rds; diff --git a/drivers/media/radio/miropcm20-rds-core.c b/drivers/media/radio/miropcm20-rds-core.c index 9428d8b26..b602c73e2 100644 --- a/drivers/media/radio/miropcm20-rds-core.c +++ b/drivers/media/radio/miropcm20-rds-core.c @@ -21,7 +21,7 @@ #include #include -#include "oss/aci.h" +#include "../../../sound/oss/aci.h" #include "miropcm20-rds-core.h" #define DEBUG 0 @@ -33,24 +33,24 @@ static struct mutex aci_rds_mutex; #define RDS_BUSYMASK 0x10 /* Bit 4 */ #define RDS_CLOCKMASK 0x08 /* Bit 3 */ -#define RDS_DATA(x) (((x) >> RDS_DATASHIFT) & 1) +#define RDS_DATA(x) (((x) >> RDS_DATASHIFT) & 1) #if DEBUG static void print_matrix(char array[], unsigned int length) { - int i, j; - - for (i=0; i=0; j--) { - printk("%d", (array[i] >> j) & 0x1); - } - if (i%8 == 0) - printk(" byte-border\n"); - else - printk("\n"); - } + int i, j; + + for (i=0; i=0; j--) { + printk("%d", (array[i] >> j) & 0x1); + } + if (i%8 == 0) + printk(" byte-border\n"); + else + printk("\n"); + } } #endif /* DEBUG */ @@ -114,7 +114,7 @@ static int rds_write(unsigned char cmd) { unsigned char sendbuffer[8]; int i; - + if (byte2trans(cmd, sendbuffer, 8) != 0){ return -1; } else { @@ -151,7 +151,7 @@ static int rds_read(unsigned char databuffer[], int datasize) I have to waitread() here */ if (rds_waitread() < 0) return -1; - + memset(databuffer, 0, datasize); for (i=0; i< READSIZE; i++) @@ -194,7 +194,7 @@ int aci_rds_cmd(unsigned char cmd, unsigned char databuffer[], int datasize) ret = 0; mutex_unlock(&aci_rds_mutex); - + return ret; } EXPORT_SYMBOL(aci_rds_cmd); diff --git a/drivers/media/radio/miropcm20-rds.c b/drivers/media/radio/miropcm20-rds.c index c1b1db65e..e09214082 100644 --- a/drivers/media/radio/miropcm20-rds.c +++ b/drivers/media/radio/miropcm20-rds.c @@ -48,7 +48,7 @@ static int rds_f_release(struct inode *in, struct file *fi) static void print_matrix(char *ch, char out[]) { - int j; + int j; for (j=7; j>=0; j--) { out[7-j] = ((*ch >> j) & 0x1) + '0'; @@ -115,6 +115,7 @@ static struct file_operations rds_fops = { static struct miscdevice rds_miscdev = { .minor = MISC_DYNAMIC_MINOR, .name = "radiotext", + .devfs_name = "v4l/rds/radiotext", .fops = &rds_fops, }; diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c index df22a582e..557fb5c4a 100644 --- a/drivers/media/radio/radio-aimslab.c +++ b/drivers/media/radio/radio-aimslab.c @@ -24,7 +24,7 @@ * out(port, start_increasing_volume); * wait(a_wee_while); * out(port, stop_changing_the_volume); - * + * */ #include /* Modules */ @@ -34,7 +34,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_RTRACK_PORT */ #include /* Lock for the I/O */ @@ -42,7 +41,7 @@ #define CONFIG_RADIO_RTRACK_PORT -1 #endif -static int io = CONFIG_RADIO_RTRACK_PORT; +static int io = CONFIG_RADIO_RTRACK_PORT; static int radio_nr = -1; static struct mutex lock; @@ -94,12 +93,12 @@ static int rt_setvol(struct rt_device *dev, int vol) int i; mutex_lock(&lock); - + if(vol == dev->curvol) { /* requested volume = current */ if (dev->muted) { /* user is unmuting the card */ dev->muted = 0; outb (0xd8, io); /* enable card */ - } + } mutex_unlock(&lock); return 0; } @@ -115,10 +114,10 @@ static int rt_setvol(struct rt_device *dev, int vol) dev->muted = 0; if(vol > dev->curvol) - for(i = dev->curvol; i < vol; i++) + for(i = dev->curvol; i < vol; i++) rt_incvol(); else - for(i = dev->curvol; i > vol; i--) + for(i = dev->curvol; i > vol; i--) rt_decvol(); dev->curvol = vol; @@ -126,7 +125,7 @@ static int rt_setvol(struct rt_device *dev, int vol) return 0; } -/* the 128+64 on these outb's is to keep the volume stable while tuning +/* the 128+64 on these outb's is to keep the volume stable while tuning * without them, the volume _will_ creep up with each frequency change * and bit 4 (+16) is to keep the signal strength meter enabled */ @@ -141,7 +140,7 @@ static void send_0_byte(int port, struct rt_device *dev) outb_p(128+64+16+8+ 1, port); /* on + wr-enable + data low */ outb_p(128+64+16+8+2+1, port); /* clock */ } - sleep_delay(1000); + sleep_delay(1000); } static void send_1_byte(int port, struct rt_device *dev) @@ -149,13 +148,13 @@ static void send_1_byte(int port, struct rt_device *dev) if ((dev->curvol == 0) || (dev->muted)) { outb_p(128+64+16+4 +1, port); /* wr-enable+data high */ outb_p(128+64+16+4+2+1, port); /* clock */ - } + } else { outb_p(128+64+16+8+4 +1, port); /* on+wr-enable+data high */ outb_p(128+64+16+8+4+2+1, port); /* clock */ } - sleep_delay(1000); + sleep_delay(1000); } static int rt_setfreq(struct rt_device *dev, unsigned long freq) @@ -168,9 +167,9 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq) freq += 171200; /* Add 10.7 MHz IF */ freq /= 800; /* Convert to 50 kHz units */ - + mutex_lock(&lock); /* Stop other ops interfering */ - + send_0_byte (io, dev); /* 0: LSB of frequency */ for (i = 0; i < 13; i++) /* : frequency bits (1-13) */ @@ -196,7 +195,7 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq) outb (0xd0, io); /* volume steady + sigstr */ else outb (0xd8, io); /* volume steady + sigstr + on */ - + mutex_unlock(&lock); return 0; @@ -214,7 +213,7 @@ static int rt_do_ioctl(struct inode *inode, struct file *file, { struct video_device *dev = video_devdata(file); struct rt_device *rt=dev->priv; - + switch(cmd) { case VIDIOCGCAP: @@ -230,7 +229,7 @@ static int rt_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=(87*16000); v->rangehigh=(108*16000); @@ -262,21 +261,21 @@ static int rt_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME; v->volume=rt->curvol * 6554; v->step=6554; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) rt_mute(rt); else rt_setvol(rt,v->volume/6554); @@ -299,7 +298,7 @@ static struct file_operations rtrack_fops = { .owner = THIS_MODULE, .open = video_exclusive_open, .release = video_exclusive_release, - .ioctl = rt_ioctl, + .ioctl = rt_ioctl, .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; @@ -321,14 +320,14 @@ static int __init rtrack_init(void) return -EINVAL; } - if (!request_region(io, 2, "rtrack")) + if (!request_region(io, 2, "rtrack")) { printk(KERN_ERR "rtrack: port 0x%x already in use\n", io); return -EBUSY; } rtrack_radio.priv=&rtrack_unit; - + if(video_register_device(&rtrack_radio, VFL_TYPE_RADIO, radio_nr)==-1) { release_region(io, 2); @@ -337,10 +336,10 @@ static int __init rtrack_init(void) printk(KERN_INFO "AIMSlab RadioTrack/RadioReveal card driver.\n"); /* Set up the I/O locking */ - + mutex_init(&lock); - - /* mute card - prevents noisy bootups */ + + /* mute card - prevents noisy bootups */ /* this ensures that the volume is all the way down */ outb(0x48, io); /* volume down but still "on" */ diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 95e632213..83bdae234 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c @@ -1,11 +1,11 @@ -/* radio-aztech.c - Aztech radio card driver for Linux 2.2 +/* radio-aztech.c - Aztech radio card driver for Linux 2.2 * - * Adapted to support the Video for Linux API by + * Adapted to support the Video for Linux API by * Russell Kroll . Based on original tuner code by: * * Quay Ly * Donald Song - * Jason Lewis (jlewis@twilight.vtc.vsc.edu) + * Jason Lewis (jlewis@twilight.vtc.vsc.edu) * Scott McGrath (smcgrath@twilight.vtc.vsc.edu) * William McGrath (wmcgrath@twilight.vtc.vsc.edu) * @@ -31,7 +31,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_AZTECH_PORT */ /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */ @@ -40,7 +39,7 @@ #define CONFIG_RADIO_AZTECH_PORT -1 #endif -static int io = CONFIG_RADIO_AZTECH_PORT; +static int io = CONFIG_RADIO_AZTECH_PORT; static int radio_nr = -1; static int radio_wait_time = 1000; static struct mutex lock; @@ -54,15 +53,15 @@ struct az_device static int volconvert(int level) { - level>>=14; /* Map 16bits down to 2 bit */ - level&=3; - + level>>=14; /* Map 16bits down to 2 bit */ + level&=3; + /* convert to card-friendly values */ - switch (level) + switch (level) { - case 0: + case 0: return 0; - case 1: + case 1: return 1; case 2: return 4; @@ -122,9 +121,9 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency) frequency += 171200; /* Add 10.7 MHz IF */ frequency /= 800; /* Convert to 50 kHz units */ - + mutex_lock(&lock); - + send_0_byte (dev); /* 0: LSB of frequency */ for (i = 0; i < 13; i++) /* : frequency bits (1-13) */ @@ -152,7 +151,7 @@ static int az_setfreq(struct az_device *dev, unsigned long frequency) udelay (radio_wait_time); outb_p(128+64+volconvert(dev->curvol), io); - + mutex_unlock(&lock); return 0; @@ -163,7 +162,7 @@ static int az_do_ioctl(struct inode *inode, struct file *file, { struct video_device *dev = video_devdata(file); struct az_device *az = dev->priv; - + switch(cmd) { case VIDIOCGCAP: @@ -179,7 +178,7 @@ static int az_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=(87*16000); v->rangehigh=(108*16000); @@ -212,7 +211,7 @@ static int az_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME; @@ -223,17 +222,17 @@ static int az_do_ioctl(struct inode *inode, struct file *file, v->volume=az->curvol; v->step=16384; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; az->curvol=v->volume; az->stereo=(v->mode&VIDEO_SOUND_STEREO)?1:0; - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) az_setvol(az,0); else az_setvol(az,az->curvol); @@ -278,7 +277,7 @@ static int __init aztech_init(void) return -EINVAL; } - if (!request_region(io, 2, "aztech")) + if (!request_region(io, 2, "aztech")) { printk(KERN_ERR "aztech: port 0x%x already in use\n", io); return -EBUSY; @@ -286,13 +285,13 @@ static int __init aztech_init(void) mutex_init(&lock); aztech_radio.priv=&aztech_unit; - + if(video_register_device(&aztech_radio, VFL_TYPE_RADIO, radio_nr)==-1) { release_region(io,2); return -EINVAL; } - + printk(KERN_INFO "Aztech radio card driver v1.00/19990224 rkroll@exploits.org\n"); /* mute card - prevents noisy bootups */ outb (0, io); diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 8641aec7b..f1b5ac81e 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c @@ -8,7 +8,7 @@ * Russell Kroll (rkroll@exploits.org) * Quay Ly * Donald Song - * Jason Lewis (jlewis@twilight.vtc.vsc.edu) + * Jason Lewis (jlewis@twilight.vtc.vsc.edu) * Scott McGrath (smcgrath@twilight.vtc.vsc.edu) * William McGrath (wmcgrath@twilight.vtc.vsc.edu) * @@ -34,7 +34,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include #include @@ -56,29 +55,29 @@ static int cadet_probe(void); /* * Signal Strength Threshold Values - * The V4L API spec does not define any particular unit for the signal + * The V4L API spec does not define any particular unit for the signal * strength value. These values are in microvolts of RF at the tuner's input. */ static __u16 sigtable[2][4]={{5,10,30,150},{28,40,63,1000}}; static int cadet_getrds(void) { - int rdsstat=0; + int rdsstat=0; spin_lock(&cadet_io_lock); - outb(3,io); /* Select Decoder Control/Status */ + outb(3,io); /* Select Decoder Control/Status */ outb(inb(io+1)&0x7f,io+1); /* Reset RDS detection */ spin_unlock(&cadet_io_lock); - + msleep(100); - spin_lock(&cadet_io_lock); - outb(3,io); /* Select Decoder Control/Status */ + spin_lock(&cadet_io_lock); + outb(3,io); /* Select Decoder Control/Status */ if((inb(io+1)&0x80)!=0) { - rdsstat|=VIDEO_TUNER_RDS_ON; + rdsstat|=VIDEO_TUNER_RDS_ON; } if((inb(io+1)&0x10)!=0) { - rdsstat|=VIDEO_TUNER_MBS_ON; + rdsstat|=VIDEO_TUNER_MBS_ON; } spin_unlock(&cadet_io_lock); return rdsstat; @@ -87,49 +86,49 @@ static int cadet_getrds(void) static int cadet_getstereo(void) { int ret = 0; - if(curtuner != 0) /* Only FM has stereo capability! */ - return 0; + if(curtuner != 0) /* Only FM has stereo capability! */ + return 0; spin_lock(&cadet_io_lock); - outb(7,io); /* Select tuner control */ + outb(7,io); /* Select tuner control */ if( (inb(io+1) & 0x40) == 0) - ret = 1; - spin_unlock(&cadet_io_lock); - return ret; + ret = 1; + spin_unlock(&cadet_io_lock); + return ret; } static unsigned cadet_gettune(void) { - int curvol,i; + int curvol,i; unsigned fifo=0; - /* - * Prepare for read - */ + /* + * Prepare for read + */ spin_lock(&cadet_io_lock); - - outb(7,io); /* Select tuner control */ - curvol=inb(io+1); /* Save current volume/mute setting */ - outb(0x00,io+1); /* Ensure WRITE-ENABLE is LOW */ + + outb(7,io); /* Select tuner control */ + curvol=inb(io+1); /* Save current volume/mute setting */ + outb(0x00,io+1); /* Ensure WRITE-ENABLE is LOW */ tunestat=0xffff; - /* - * Read the shift register - */ - for(i=0;i<25;i++) { - fifo=(fifo<<1)|((inb(io+1)>>7)&0x01); - if(i<24) { - outb(0x01,io+1); + /* + * Read the shift register + */ + for(i=0;i<25;i++) { + fifo=(fifo<<1)|((inb(io+1)>>7)&0x01); + if(i<24) { + outb(0x01,io+1); tunestat&=inb(io+1); - outb(0x00,io+1); - } - } - - /* - * Restore volume/mute setting - */ - outb(curvol,io+1); + outb(0x00,io+1); + } + } + + /* + * Restore volume/mute setting + */ + outb(curvol,io+1); spin_unlock(&cadet_io_lock); return fifo; @@ -137,43 +136,43 @@ static unsigned cadet_gettune(void) static unsigned cadet_getfreq(void) { - int i; - unsigned freq=0,test,fifo=0; + int i; + unsigned freq=0,test,fifo=0; /* * Read current tuning */ fifo=cadet_gettune(); - /* - * Convert to actual frequency - */ + /* + * Convert to actual frequency + */ if(curtuner==0) { /* FM */ - test=12500; - for(i=0;i<14;i++) { - if((fifo&0x01)!=0) { - freq+=test; - } - test=test<<1; - fifo=fifo>>1; - } - freq-=10700000; /* IF frequency is 10.7 MHz */ - freq=(freq*16)/1000000; /* Make it 1/16 MHz */ + test=12500; + for(i=0;i<14;i++) { + if((fifo&0x01)!=0) { + freq+=test; + } + test=test<<1; + fifo=fifo>>1; + } + freq-=10700000; /* IF frequency is 10.7 MHz */ + freq=(freq*16)/1000000; /* Make it 1/16 MHz */ } if(curtuner==1) { /* AM */ - freq=((fifo&0x7fff)-2010)*16; + freq=((fifo&0x7fff)-2010)*16; } - return freq; + return freq; } static void cadet_settune(unsigned fifo) { - int i; - unsigned test; + int i; + unsigned test; spin_lock(&cadet_io_lock); - + outb(7,io); /* Select tuner control */ /* * Write the shift register @@ -184,7 +183,7 @@ static void cadet_settune(unsigned fifo) outb(7,io); /* Select tuner control */ outb(test,io+1); /* Initialize for write */ for(i=0;i<25;i++) { - test|=0x01; /* Toggle SCK High */ + test|=0x01; /* Toggle SCK High */ outb(test,io+1); test&=0xfe; /* Toggle SCK Low */ outb(test,io+1); @@ -197,57 +196,57 @@ static void cadet_settune(unsigned fifo) static void cadet_setfreq(unsigned freq) { - unsigned fifo; - int i,j,test; - int curvol; + unsigned fifo; + int i,j,test; + int curvol; - /* - * Formulate a fifo command - */ + /* + * Formulate a fifo command + */ fifo=0; if(curtuner==0) { /* FM */ - test=102400; - freq=(freq*1000)/16; /* Make it kHz */ - freq+=10700; /* IF is 10700 kHz */ - for(i=0;i<14;i++) { - fifo=fifo<<1; - if(freq>=test) { - fifo|=0x01; - freq-=test; - } - test=test>>1; - } + test=102400; + freq=(freq*1000)/16; /* Make it kHz */ + freq+=10700; /* IF is 10700 kHz */ + for(i=0;i<14;i++) { + fifo=fifo<<1; + if(freq>=test) { + fifo|=0x01; + freq-=test; + } + test=test>>1; + } } if(curtuner==1) { /* AM */ - fifo=(freq/16)+2010; /* Make it kHz */ + fifo=(freq/16)+2010; /* Make it kHz */ fifo|=0x100000; /* Select AM Band */ } - /* - * Save current volume/mute setting - */ + /* + * Save current volume/mute setting + */ spin_lock(&cadet_io_lock); outb(7,io); /* Select tuner control */ - curvol=inb(io+1); - spin_unlock(&cadet_io_lock); + curvol=inb(io+1); + spin_unlock(&cadet_io_lock); /* * Tune the card */ for(j=3;j>-1;j--) { - cadet_settune(fifo|(j<<16)); - - spin_lock(&cadet_io_lock); + cadet_settune(fifo|(j<<16)); + + spin_lock(&cadet_io_lock); outb(7,io); /* Select tuner control */ outb(curvol,io+1); spin_unlock(&cadet_io_lock); - + msleep(100); cadet_gettune(); if((tunestat & 0x40) == 0) { /* Tuned */ - sigstrength=sigtable[curtuner][j]; + sigstrength=sigtable[curtuner][j]; return; } } @@ -258,28 +257,28 @@ static void cadet_setfreq(unsigned freq) static int cadet_getvol(void) { int ret = 0; - + spin_lock(&cadet_io_lock); - - outb(7,io); /* Select tuner control */ - if((inb(io + 1) & 0x20) != 0) - ret = 0xffff; - - spin_unlock(&cadet_io_lock); - return ret; + + outb(7,io); /* Select tuner control */ + if((inb(io + 1) & 0x20) != 0) + ret = 0xffff; + + spin_unlock(&cadet_io_lock); + return ret; } static void cadet_setvol(int vol) { spin_lock(&cadet_io_lock); - outb(7,io); /* Select tuner control */ - if(vol>0) - outb(0x20,io+1); - else - outb(0x00,io+1); + outb(7,io); /* Select tuner control */ + if(vol>0) + outb(0x20,io+1); + else + outb(0x00,io+1); spin_unlock(&cadet_io_lock); -} +} static void cadet_handler(unsigned long data) { @@ -289,15 +288,15 @@ static void cadet_handler(unsigned long data) if(spin_trylock(&cadet_io_lock)) { - outb(0x3,io); /* Select RDS Decoder Control */ + outb(0x3,io); /* Select RDS Decoder Control */ if((inb(io+1)&0x20)!=0) { - printk(KERN_CRIT "cadet: RDS fifo overflow\n"); + printk(KERN_CRIT "cadet: RDS fifo overflow\n"); } outb(0x80,io); /* Select RDS fifo */ while((inb(io)&0x80)!=0) { - rdsbuf[rdsin]=inb(io+1); + rdsbuf[rdsin]=inb(io+1); if(rdsin==rdsout) - printk(KERN_WARNING "cadet: RDS buffer overflow\n"); + printk(KERN_WARNING "cadet: RDS buffer overflow\n"); else rdsin++; } @@ -308,9 +307,9 @@ static void cadet_handler(unsigned long data) * Service pending read */ if( rdsin!=rdsout) - wake_up_interruptible(&read_queue); + wake_up_interruptible(&read_queue); - /* + /* * Clean up and exit */ init_timer(&readtimer); @@ -325,12 +324,12 @@ static void cadet_handler(unsigned long data) static ssize_t cadet_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { - int i=0; + int i=0; unsigned char readbuf[RDS_BUFFER]; - if(rdsstat==0) { + if(rdsstat==0) { spin_lock(&cadet_io_lock); - rdsstat=1; + rdsstat=1; outb(0x80,io); /* Select RDS fifo */ spin_unlock(&cadet_io_lock); init_timer(&readtimer); @@ -340,15 +339,15 @@ static ssize_t cadet_read(struct file *file, char __user *data, add_timer(&readtimer); } if(rdsin==rdsout) { - if (file->f_flags & O_NONBLOCK) - return -EWOULDBLOCK; - interruptible_sleep_on(&read_queue); - } + if (file->f_flags & O_NONBLOCK) + return -EWOULDBLOCK; + interruptible_sleep_on(&read_queue); + } while( ituner) { - case 0: - strcpy(v->name,"FM"); - v->rangelow=1400; /* 87.5 MHz */ - v->rangehigh=1728; /* 108.0 MHz */ - v->flags=0; - v->mode=0; - v->mode|=VIDEO_MODE_AUTO; - v->signal=sigstrength; - if(cadet_getstereo()==1) { - v->flags|=VIDEO_TUNER_STEREO_ON; - } + case 0: + strcpy(v->name,"FM"); + v->rangelow=1400; /* 87.5 MHz */ + v->rangehigh=1728; /* 108.0 MHz */ + v->flags=0; + v->mode=0; + v->mode|=VIDEO_MODE_AUTO; + v->signal=sigstrength; + if(cadet_getstereo()==1) { + v->flags|=VIDEO_TUNER_STEREO_ON; + } v->flags|=cadet_getrds(); - break; - case 1: - strcpy(v->name,"AM"); - v->rangelow=8320; /* 520 kHz */ - v->rangehigh=26400; /* 1650 kHz */ - v->flags=0; - v->flags|=VIDEO_TUNER_LOW; - v->mode=0; - v->mode|=VIDEO_MODE_AUTO; - v->signal=sigstrength; - break; + break; + case 1: + strcpy(v->name,"AM"); + v->rangelow=8320; /* 520 kHz */ + v->rangehigh=26400; /* 1650 kHz */ + v->flags=0; + v->flags|=VIDEO_TUNER_LOW; + v->mode=0; + v->mode|=VIDEO_MODE_AUTO; + v->signal=sigstrength; + break; } return 0; } @@ -408,49 +407,49 @@ static int cadet_do_ioctl(struct inode *inode, struct file *file, if((v->tuner<0)||(v->tuner>1)) { return -EINVAL; } - curtuner=v->tuner; + curtuner=v->tuner; return 0; } case VIDIOCGFREQ: { - unsigned long *freq = arg; + unsigned long *freq = arg; *freq = cadet_getfreq(); return 0; } case VIDIOCSFREQ: { - unsigned long *freq = arg; + unsigned long *freq = arg; if((curtuner==0)&&((*freq<1400)||(*freq>1728))) { - return -EINVAL; + return -EINVAL; } if((curtuner==1)&&((*freq<8320)||(*freq>26400))) { - return -EINVAL; + return -EINVAL; } cadet_setfreq(*freq); return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME; if(cadet_getstereo()==0) { - v->mode=VIDEO_SOUND_MONO; + v->mode=VIDEO_SOUND_MONO; } else { v->mode=VIDEO_SOUND_STEREO; } v->volume=cadet_getvol(); v->step=0xffff; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; cadet_setvol(v->volume); - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) cadet_setvol(0); else cadet_setvol(0xffff); @@ -540,16 +539,16 @@ static struct pnp_driver cadet_pnp_driver = { static int cadet_probe(void) { - static int iovals[8]={0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e}; + static int iovals[8]={0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e}; int i; for(i=0;i<8;i++) { - io=iovals[i]; + io=iovals[i]; if (request_region(io, 2, "cadet-probe")) { - cadet_setfreq(1410); + cadet_setfreq(1410); if(cadet_getfreq()==1410) { release_region(io, 2); - return io; + return io; } release_region(io, 2); } @@ -557,7 +556,7 @@ static int cadet_probe(void) return -1; } -/* +/* * io should only be set if the user has used something like * isapnp (the userspace program) to initialize this card for us */ @@ -565,7 +564,7 @@ static int cadet_probe(void) static int __init cadet_init(void) { spin_lock_init(&cadet_io_lock); - + /* * If a probe was requested then probe ISAPnP first (safest) */ @@ -580,12 +579,12 @@ static int __init cadet_init(void) /* * Else we bail out */ - - if(io < 0) { -#ifdef MODULE + + if(io < 0) { +#ifdef MODULE printk(KERN_ERR "You must set an I/O address with io=0x???\n"); #endif - goto fail; + goto fail; } if (!request_region(io,2,"cadet")) goto fail; diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index 4c8295639..8e499b8f6 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c @@ -1,6 +1,6 @@ /* *************************************************************************** - * + * * radio-gemtek-pci.c - Gemtek PCI Radio driver * (C) 2001 Vladimir Shebordaev * @@ -31,19 +31,19 @@ * radio device driver. * * Please, let me know if this piece of code was useful :) - * + * * TODO: multiple device support and portability were not tested * *************************************************************************** */ +#include #include #include #include #include #include #include -#include #include #include @@ -69,18 +69,18 @@ #define TRUE (1) #endif -#ifndef FALSE +#ifndef FALSE #define FALSE (0) #endif struct gemtek_pci_card { struct video_device *videodev; - + u32 iobase; u32 length; u8 chiprev; u16 model; - + u32 current_frequency; u8 mute; }; @@ -96,7 +96,7 @@ static inline u8 gemtek_pci_out( u16 value, u32 port ) return (u8)value; } -#define _b0( v ) *((u8 *)&v) +#define _b0( v ) *((u8 *)&v) static void __gemtek_pci_cmd( u16 value, u32 port, u8 *last_byte, int keep ) { register u8 byte = *last_byte; @@ -104,7 +104,7 @@ static void __gemtek_pci_cmd( u16 value, u32 port, u8 *last_byte, int keep ) if ( !value ) { if ( !keep ) value = (u16)port; - byte &= 0xfd; + byte &= 0xfd; } else byte |= 2; @@ -116,7 +116,7 @@ static void __gemtek_pci_cmd( u16 value, u32 port, u8 *last_byte, int keep ) byte &= 0xfe; _b0( value ) = byte; outw( value, port ); - + *last_byte = byte; } @@ -193,13 +193,13 @@ static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file, c->audios = 1; strcpy( c->name, "Gemtek PCI Radio" ); return 0; - } + } case VIDIOCGTUNER: { struct video_tuner *t = arg; - if ( t->tuner ) + if ( t->tuner ) return -EINVAL; t->rangelow = GEMTEK_PCI_RANGE_LOW; @@ -228,7 +228,7 @@ static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file, case VIDIOCSFREQ: { unsigned long *freq = arg; - + if ( (*freq < GEMTEK_PCI_RANGE_LOW) || (*freq > GEMTEK_PCI_RANGE_HIGH) ) return -EINVAL; @@ -239,9 +239,9 @@ static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file, return 0; } - + case VIDIOCGAUDIO: - { + { struct video_audio *a = arg; memset( a, 0, sizeof( *a ) ); @@ -249,17 +249,17 @@ static int gemtek_pci_do_ioctl(struct inode *inode, struct file *file, a->volume = 1; a->step = 65535; strcpy( a->name, "Radio" ); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *a = arg; - if ( a->audio ) + if ( a->audio ) return -EINVAL; - if ( a->flags & VIDEO_AUDIO_MUTE ) + if ( a->flags & VIDEO_AUDIO_MUTE ) gemtek_pci_mute( card ); else gemtek_pci_unmute( card ); @@ -323,9 +323,9 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci return -ENOMEM; } - if ( pci_enable_device( pci_dev ) ) + if ( pci_enable_device( pci_dev ) ) goto err_pci; - + card->iobase = pci_resource_start( pci_dev, 0 ); card->length = pci_resource_len( pci_dev, 0 ); @@ -338,7 +338,7 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model ); pci_set_drvdata( pci_dev, card ); - + if ( (devradio = kmalloc( sizeof( struct video_device ), GFP_KERNEL )) == NULL ) { printk( KERN_ERR "gemtek_pci: out of memory\n" ); goto err_video; @@ -354,7 +354,7 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci devradio->priv = card; gemtek_pci_mute( card ); - printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", + printk( KERN_INFO "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n", card->chiprev, card->iobase, card->iobase + card->length - 1 ); return 0; @@ -364,7 +364,7 @@ err_video: err_pci: kfree( card ); - return -ENODEV; + return -ENODEV; } static void __devexit gemtek_pci_remove( struct pci_dev *pci_dev ) @@ -375,12 +375,12 @@ static void __devexit gemtek_pci_remove( struct pci_dev *pci_dev ) kfree( card->videodev ); release_region( card->iobase, card->length ); - + if ( mx ) gemtek_pci_mute( card ); kfree( card ); - + pci_set_drvdata( pci_dev, NULL ); } diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index 162f37d8b..47173be97 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c @@ -6,7 +6,7 @@ * Besides the protocol changes, this is mostly a copy of: * * RadioTrack II driver for Linux radio support (C) 1998 Ben Pfaff - * + * * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood * Converted to new API by Alan Cox * Various bugfixes and enhancements by Russell Kroll @@ -22,7 +22,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_GEMTEK_PORT */ #include @@ -30,7 +29,7 @@ #define CONFIG_RADIO_GEMTEK_PORT -1 #endif -static int io = CONFIG_RADIO_GEMTEK_PORT; +static int io = CONFIG_RADIO_GEMTEK_PORT; static int radio_nr = -1; static spinlock_t lock; @@ -49,7 +48,7 @@ struct gemtek_device */ static void gemtek_mute(struct gemtek_device *dev) { - if(dev->muted) + if(dev->muted) return; spin_lock(&lock); outb(0x10, io); @@ -95,20 +94,20 @@ static int gemtek_setfreq(struct gemtek_device *dev, unsigned long freq) freq /= 100000; spin_lock(&lock); - + /* 2 start bits */ outb_p(0x03, io); udelay(5); outb_p(0x07, io); udelay(5); - /* 28 frequency bits (lsb first) */ + /* 28 frequency bits (lsb first) */ for (i = 0; i < 14; i++) if (freq & (1 << i)) one(); else zero(); - /* 36 unknown bits */ + /* 36 unknown bits */ for (i = 0; i < 11; i++) zero(); one(); @@ -124,7 +123,7 @@ static int gemtek_setfreq(struct gemtek_device *dev, unsigned long freq) udelay(5); spin_unlock(&lock); - + return 0; } @@ -160,7 +159,7 @@ static int gemtek_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=87*16000; v->rangehigh=108*16000; @@ -194,25 +193,25 @@ static int gemtek_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags|=VIDEO_AUDIO_MUTABLE; v->volume=1; v->step=65535; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) gemtek_mute(rt); else - gemtek_unmute(rt); + gemtek_unmute(rt); return 0; } @@ -255,14 +254,14 @@ static int __init gemtek_init(void) return -EINVAL; } - if (!request_region(io, 4, "gemtek")) + if (!request_region(io, 4, "gemtek")) { printk(KERN_ERR "gemtek: port 0x%x already in use\n", io); return -EBUSY; } gemtek_radio.priv=&gemtek_unit; - + if(video_register_device(&gemtek_radio, VFL_TYPE_RADIO, radio_nr)==-1) { release_region(io, 4); @@ -275,7 +274,7 @@ static int __init gemtek_init(void) /* this is _maybe_ unnecessary */ outb(0x01, io); - /* mute card - prevents noisy bootups */ + /* mute card - prevents noisy bootups */ gemtek_unit.muted = 0; gemtek_mute(&gemtek_unit); diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index fcfa6c9fe..39c1d9118 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c @@ -2,7 +2,7 @@ * (c) 2000 A. Tlalka, atlka@pg.gda.pl * Notes on the hardware * - * + Frequency control is done digitally + * + Frequency control is done digitally * + No volume control - only mute/unmute - you have to use Aux line volume * control on Maestro card to set the volume * + Radio status (tuned/not_tuned and stereo/mono) is valid some time after @@ -26,7 +26,7 @@ #include #include #include -#include + #define DRIVER_VERSION "0.05" @@ -103,7 +103,7 @@ static struct video_device maestro_radio = { struct radio_device { u16 io, /* base of Maestro card radio io (GPIO_DATA)*/ muted, /* VIDEO_AUDIO_MUTE */ - stereo, /* VIDEO_TUNER_STEREO_ON */ + stereo, /* VIDEO_TUNER_STEREO_ON */ tuned; /* signal strength (0 or 0xffff) */ struct mutex lock; }; @@ -122,14 +122,14 @@ static u32 radio_bits_get(struct radio_device *dev) for (l=24;l--;) { outw(STR_CLK, io); /* HI state */ udelay(2); - if(!l) + if(!l) dev->tuned = inw(io) & STR_MOST ? 0 : 0xffff; outw(0, io); /* LO state */ udelay(2); data <<= 1; /* shift data */ rdata = inw(io); if(!l) - dev->stereo = rdata & STR_MOST ? + dev->stereo = rdata & STR_MOST ? 0 : VIDEO_TUNER_STEREO_ON; else if(rdata & STR_DATA) diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index f93d7afe7..f0bf47bcb 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -1,15 +1,15 @@ -/* - * Guillemot Maxi Radio FM 2000 PCI radio card driver for Linux +/* + * Guillemot Maxi Radio FM 2000 PCI radio card driver for Linux * (C) 2001 Dimitromanolakis Apostolos * * Based in the radio Maestro PCI driver. Actually it uses the same chip * for radio but different pci controller. * * I didn't have any specs I reversed engineered the protocol from - * the windows driver (radio.dll). + * the windows driver (radio.dll). * * The card uses the TEA5757 chip that includes a search function but it - * is useless as I haven't found any way to read back the frequency. If + * is useless as I haven't found any way to read back the frequency. If * anybody does please mail me. * * For the pdf file see: @@ -24,7 +24,7 @@ * - tiding up * - removed support for multiple devices as it didn't work anyway * - * BUGS: + * BUGS: * - card unmutes if you change frequency * */ @@ -41,7 +41,6 @@ #include #include -#include /* version 0.75 Sun Feb 4 22:51:27 EET 2001 */ #define DRIVER_VERSION "0.75" @@ -81,7 +80,7 @@ static struct file_operations maxiradio_fops = { .owner = THIS_MODULE, .open = video_exclusive_open, .release = video_exclusive_release, - .ioctl = radio_ioctl, + .ioctl = radio_ioctl, .compat_ioctl = v4l_compat_ioctl32, .llseek = no_llseek, }; @@ -98,11 +97,11 @@ static struct radio_device { __u16 io, /* base of radio io */ muted, /* VIDEO_AUDIO_MUTE */ - stereo, /* VIDEO_TUNER_STEREO_ON */ + stereo, /* VIDEO_TUNER_STEREO_ON */ tuned; /* signal strength (0 or 0xffff) */ - + unsigned long freq; - + struct mutex lock; } radio_unit = {0, 0, 0, 0, }; @@ -115,7 +114,7 @@ static void outbit(unsigned long bit, __u16 io) outb( power|wren|data|clk ,io); udelay(4); outb( power|wren|data ,io); udelay(4); } - else + else { outb( power|wren ,io); udelay(4); outb( power|wren|clk ,io); udelay(4); @@ -133,12 +132,12 @@ static void set_freq(__u16 io, __u32 data) { unsigned long int si; int bl; - + /* TEA5757 shift register bits (see pdf) */ - outbit(0,io); // 24 search + outbit(0,io); // 24 search outbit(1,io); // 23 search up/down - + outbit(0,io); // 22 stereo/mono outbit(0,io); // 21 band @@ -146,24 +145,24 @@ static void set_freq(__u16 io, __u32 data) outbit(0,io); // 19 port ? outbit(0,io); // 18 port ? - + outbit(0,io); // 17 search level outbit(0,io); // 16 search level - + si = 0x8000; for(bl = 1; bl <= 16 ; bl++) { outbit(data & si,io); si >>=1; } - + outb(power,io); } static int get_stereo(__u16 io) -{ +{ outb(power,io); udelay(4); return !(inb(io) & mo_st); } static int get_tune(__u16 io) -{ +{ outb(power+clk,io); udelay(4); return !(inb(io) & mo_st); } @@ -178,7 +177,7 @@ static inline int radio_function(struct inode *inode, struct file *file, switch(cmd) { case VIDIOCGCAP: { struct video_capability *v = arg; - + memset(v,0,sizeof(*v)); strcpy(v->name, "Maxi Radio FM2000 radio"); v->type=VID_TYPE_TUNER; @@ -187,22 +186,22 @@ static inline int radio_function(struct inode *inode, struct file *file, } case VIDIOCGTUNER: { struct video_tuner *v = arg; - + if(v->tuner) return -EINVAL; - + card->stereo = 0xffff * get_stereo(card->io); card->tuned = 0xffff * get_tune(card->io); - + v->flags = VIDEO_TUNER_LOW | card->stereo; v->signal = card->tuned; - + strcpy(v->name, "FM"); - + v->rangelow = FREQ_LO; v->rangehigh = FREQ_HI; v->mode = VIDEO_MODE_AUTO; - + return 0; } case VIDIOCSTUNER: { @@ -213,13 +212,13 @@ static inline int radio_function(struct inode *inode, struct file *file, } case VIDIOCGFREQ: { unsigned long *freq = arg; - + *freq = card->freq; return 0; } case VIDIOCSFREQ: { unsigned long *freq = arg; - + if (*freq < FREQ_LO || *freq > FREQ_HI) return -EINVAL; card->freq = *freq; @@ -227,18 +226,18 @@ static inline int radio_function(struct inode *inode, struct file *file, msleep(125); return 0; } - case VIDIOCGAUDIO: { + case VIDIOCGAUDIO: { struct video_audio *v = arg; memset(v,0,sizeof(*v)); strcpy(v->name, "Radio"); v->flags=VIDEO_AUDIO_MUTABLE | card->muted; v->mode=VIDEO_SOUND_STEREO; - return 0; + return 0; } - + case VIDIOCSAUDIO: { struct video_audio *v = arg; - + if(v->audio) return -EINVAL; card->muted = v->flags & VIDEO_AUDIO_MUTE; @@ -250,13 +249,13 @@ static inline int radio_function(struct inode *inode, struct file *file, } case VIDIOCGUNIT: { struct video_unit *v = arg; - + v->video=VIDEO_NO_UNIT; v->vbi=VIDEO_NO_UNIT; v->radio=dev->minor; v->audio=0; v->teletext=VIDEO_NO_UNIT; - return 0; + return 0; } default: return -ENOIOCTLCMD; } @@ -268,7 +267,7 @@ static int radio_ioctl(struct inode *inode, struct file *file, struct video_device *dev = video_devdata(file); struct radio_device *card=dev->priv; int ret; - + mutex_lock(&card->lock); ret = video_usercopy(inode, file, cmd, arg, radio_function); mutex_unlock(&card->lock); @@ -283,21 +282,21 @@ MODULE_LICENSE("GPL"); static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { if(!request_region(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0), "Maxi Radio FM 2000")) { - printk(KERN_ERR "radio-maxiradio: can't reserve I/O ports\n"); - goto err_out; + pci_resource_len(pdev, 0), "Maxi Radio FM 2000")) { + printk(KERN_ERR "radio-maxiradio: can't reserve I/O ports\n"); + goto err_out; } if (pci_enable_device(pdev)) - goto err_out_free_region; + goto err_out_free_region; radio_unit.io = pci_resource_start(pdev, 0); mutex_init(&radio_unit.lock); maxiradio_radio.priv = &radio_unit; if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) { - printk("radio-maxiradio: can't register device!"); - goto err_out_free_region; + printk("radio-maxiradio: can't register device!"); + goto err_out_free_region; } printk(KERN_INFO "radio-maxiradio: version " diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c index 5b68ac4c7..28a47c9e7 100644 --- a/drivers/media/radio/radio-rtrack2.c +++ b/drivers/media/radio/radio-rtrack2.c @@ -1,5 +1,5 @@ /* RadioTrack II driver for Linux radio support (C) 1998 Ben Pfaff - * + * * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood * Converted to new API by Alan Cox * Various bugfixes and enhancements by Russell Kroll @@ -15,7 +15,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_RTRACK2_PORT */ #include @@ -23,7 +22,7 @@ #define CONFIG_RADIO_RTRACK2_PORT -1 #endif -static int io = CONFIG_RADIO_RTRACK2_PORT; +static int io = CONFIG_RADIO_RTRACK2_PORT; static int radio_nr = -1; static spinlock_t lock; @@ -39,7 +38,7 @@ struct rt_device static void rt_mute(struct rt_device *dev) { - if(dev->muted) + if(dev->muted) return; spin_lock(&lock); outb(1, io); @@ -59,14 +58,14 @@ static void rt_unmute(struct rt_device *dev) static void zero(void) { - outb_p(1, io); + outb_p(1, io); outb_p(3, io); outb_p(1, io); } static void one(void) { - outb_p(5, io); + outb_p(5, io); outb_p(7, io); outb_p(5, io); } @@ -76,7 +75,7 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq) int i; freq = freq / 200 + 856; - + spin_lock(&lock); outb_p(0xc8, io); @@ -95,7 +94,7 @@ static int rt_setfreq(struct rt_device *dev, unsigned long freq) outb_p(0xc8, io); if (!dev->muted) outb_p(0, io); - + spin_unlock(&lock); return 0; } @@ -128,7 +127,7 @@ static int rt_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=88*16000; v->rangehigh=108*16000; @@ -160,25 +159,25 @@ static int rt_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags|=VIDEO_AUDIO_MUTABLE; v->volume=1; v->step=65535; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) rt_mute(rt); else - rt_unmute(rt); + rt_unmute(rt); return 0; } @@ -220,7 +219,7 @@ static int __init rtrack2_init(void) printk(KERN_ERR "You must set an I/O address with io=0x20c or io=0x30c\n"); return -EINVAL; } - if (!request_region(io, 4, "rtrack2")) + if (!request_region(io, 4, "rtrack2")) { printk(KERN_ERR "rtrack2: port 0x%x already in use\n", io); return -EBUSY; @@ -228,16 +227,16 @@ static int __init rtrack2_init(void) rtrack2_radio.priv=&rtrack2_unit; - spin_lock_init(&lock); + spin_lock_init(&lock); if(video_register_device(&rtrack2_radio, VFL_TYPE_RADIO, radio_nr)==-1) { release_region(io, 4); return -EINVAL; } - + printk(KERN_INFO "AIMSlab Radiotrack II card driver.\n"); - /* mute card - prevents noisy bootups */ + /* mute card - prevents noisy bootups */ outb(1, io); rtrack2_unit.muted = 1; diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index efee6e339..53073b424 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c @@ -12,7 +12,7 @@ * Frequency control is done digitally -- ie out(port,encodefreq(95.8)); * No volume control - only mute/unmute - you have to use line volume * control on SB-part of SF16FMI - * + * */ #include /* __setup */ @@ -21,7 +21,6 @@ #include /* request_region */ #include /* udelay */ #include /* kernel radio structs */ -#include #include #include /* outb, outb_p */ #include /* copy to/from user */ @@ -30,19 +29,19 @@ struct fmi_device { int port; - int curvol; /* 1 or 0 */ - unsigned long curfreq; /* freq in kHz */ - __u32 flags; + int curvol; /* 1 or 0 */ + unsigned long curfreq; /* freq in kHz */ + __u32 flags; }; -static int io = -1; +static int io = -1; static int radio_nr = -1; static struct pnp_dev *dev = NULL; static struct mutex lock; /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ /* It is only useful to give freq in intervall of 800 (=0.05Mhz), - * other bits will be truncated, e.g 92.7400016 -> 92.7, but + * other bits will be truncated, e.g 92.7400016 -> 92.7, but * 92.7400017 -> 92.75 */ #define RSF16_ENCODE(x) ((x)/800+214) @@ -52,7 +51,7 @@ static struct mutex lock; static void outbits(int bits, unsigned int data, int port) { while(bits--) { - if(data & 1) { + if(data & 1) { outb(5, port); udelay(6); outb(7, port); @@ -102,7 +101,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev) int res; int myport = dev->port; - + mutex_lock(&lock); val = dev->curvol ? 0x08 : 0x00; /* unmute/mute */ outb(val, myport); @@ -110,7 +109,7 @@ static inline int fmi_getsigstr(struct fmi_device *dev) msleep(143); /* was schedule_timeout(HZ/7) */ res = (int)inb(myport+1); outb(val, myport); - + mutex_unlock(&lock); return (res & 2) ? 0 : 0xFFFF; } @@ -120,7 +119,7 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, { struct video_device *dev = video_devdata(file); struct fmi_device *fmi=dev->priv; - + switch(cmd) { case VIDIOCGCAP: @@ -175,18 +174,18 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, return -EINVAL; /*rounding in steps of 800 to match th freq that will be used */ - fmi->curfreq = (*freq/800)*800; + fmi->curfreq = (*freq/800)*800; fmi_setfreq(fmi); return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0,sizeof(*v)); v->flags=( (!fmi->curvol)*VIDEO_AUDIO_MUTE | VIDEO_AUDIO_MUTABLE); strcpy(v->name, "Radio"); v->mode=VIDEO_SOUND_STEREO; - return 0; + return 0; } case VIDIOCSAUDIO: { @@ -194,19 +193,19 @@ static int fmi_do_ioctl(struct inode *inode, struct file *file, if(v->audio) return -EINVAL; fmi->curvol= v->flags&VIDEO_AUDIO_MUTE ? 0 : 1; - fmi->curvol ? + fmi->curvol ? fmi_unmute(fmi->port) : fmi_mute(fmi->port); return 0; } - case VIDIOCGUNIT: + case VIDIOCGUNIT: { - struct video_unit *v = arg; + struct video_unit *v = arg; v->video=VIDEO_NO_UNIT; v->vbi=VIDEO_NO_UNIT; v->radio=dev->minor; v->audio=0; /* How do we find out this??? */ v->teletext=VIDEO_NO_UNIT; - return 0; + return 0; } default: return -ENOIOCTLCMD; @@ -296,14 +295,14 @@ static int __init fmi_init(void) fmi_unit.curfreq = 0; fmi_unit.flags = VIDEO_TUNER_LOW; fmi_radio.priv = &fmi_unit; - + mutex_init(&lock); - + if (video_register_device(&fmi_radio, VFL_TYPE_RADIO, radio_nr) == -1) { release_region(io, 2); return -EINVAL; } - + printk(KERN_INFO "SF16FMx radio card driver at 0x%x\n", io); /* mute card - prevents noisy bootups */ fmi_mute(io); diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 3483b2c7b..bcebd8cb1 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c @@ -19,7 +19,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include static struct mutex lock; @@ -203,7 +202,7 @@ static int fmr2_setvolume(struct fmr2_device *dev) } static int fmr2_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) + unsigned int cmd, void *arg) { struct video_device *dev = video_devdata(file); struct fmr2_device *fmr2 = dev->priv; @@ -345,7 +344,7 @@ static int fmr2_do_ioctl(struct inode *inode, struct file *file, } static int fmr2_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) + unsigned int cmd, unsigned long arg) { return video_usercopy(inode, file, cmd, arg, fmr2_do_ioctl); } diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c index dfba4ae59..fcfde2e4f 100644 --- a/drivers/media/radio/radio-terratec.c +++ b/drivers/media/radio/radio-terratec.c @@ -2,11 +2,11 @@ * (c) 1999 R. Offermanns (rolf@offermanns.de) * based on the aimslab radio driver from M. Kirkwood * many thanks to Michael Becker and Friedhelm Birth (from TerraTec) - * + * * * History: * 1999-05-21 First preview release - * + * * Notes on the hardware: * There are two "main" chips on the card: * - Philips OM5610 (http://www-us.semiconductors.philips.com/acrobat/datasheets/OM5610_2.pdf) @@ -20,7 +20,7 @@ * (as soon i have understand how to get started :) * If you can help me out with that, please contact me!! * - * + * */ #include /* Modules */ @@ -30,7 +30,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_TERRATEC_PORT */ #include @@ -50,7 +49,7 @@ #define WRT_EN 0x10 /*******************************************************************/ -static int io = CONFIG_RADIO_TERRATEC_PORT; +static int io = CONFIG_RADIO_TERRATEC_PORT; static int radio_nr = -1; static spinlock_t lock; @@ -89,15 +88,15 @@ static void tt_mute(struct tt_device *dev) static int tt_setvol(struct tt_device *dev, int vol) { - + // printk(KERN_ERR "setvol called, vol = %d\n", vol); if(vol == dev->curvol) { /* requested volume = current */ if (dev->muted) { /* user is unmuting the card */ dev->muted = 0; cardWriteVol(vol); /* enable card */ - } - + } + return 0; } @@ -108,9 +107,9 @@ static int tt_setvol(struct tt_device *dev, int vol) } dev->muted = 0; - + cardWriteVol(vol); - + dev->curvol = vol; return 0; @@ -122,13 +121,13 @@ static int tt_setvol(struct tt_device *dev, int vol) /* many more or less strange things are going on here, but hey, it works :) */ static int tt_setfreq(struct tt_device *dev, unsigned long freq1) -{ +{ int freq; int i; int p; int temp; long rest; - + unsigned char buffer[25]; /* we have to bit shift 25 registers */ freq = freq1/160; /* convert the freq. to a nice to handle value */ for(i=24;i>-1;i--) @@ -143,9 +142,9 @@ static int tt_setfreq(struct tt_device *dev, unsigned long freq1) { if (rest%temp == rest) buffer[i] = 0; - else + else { - buffer[i] = 1; + buffer[i] = 1; rest = rest-temp; } i--; @@ -154,10 +153,10 @@ static int tt_setfreq(struct tt_device *dev, unsigned long freq1) } spin_lock(&lock); - + for (i=24;i>-1;i--) /* bit shift the values to the radiocard */ { - if (buffer[i]==1) + if (buffer[i]==1) { outb(WRT_EN|DATA, BASEPORT); outb(WRT_EN|DATA|CLK_ON , BASEPORT); @@ -169,11 +168,11 @@ static int tt_setfreq(struct tt_device *dev, unsigned long freq1) outb(WRT_EN|0x00|CLK_ON , BASEPORT); } } - outb(0x00, BASEPORT); - + outb(0x00, BASEPORT); + spin_unlock(&lock); - - return 0; + + return 0; } static int tt_getsigstr(struct tt_device *dev) /* TODO */ @@ -191,7 +190,7 @@ static int tt_do_ioctl(struct inode *inode, struct file *file, { struct video_device *dev = video_devdata(file); struct tt_device *tt=dev->priv; - + switch(cmd) { case VIDIOCGCAP: @@ -207,7 +206,7 @@ static int tt_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow=(87*16000); v->rangehigh=(108*16000); @@ -239,21 +238,21 @@ static int tt_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags|=VIDEO_AUDIO_MUTABLE|VIDEO_AUDIO_VOLUME; v->volume=tt->curvol * 6554; v->step=6554; strcpy(v->name, "Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; - if(v->flags&VIDEO_AUDIO_MUTE) + if(v->flags&VIDEO_AUDIO_MUTE) tt_mute(tt); else tt_setvol(tt,v->volume/6554); @@ -297,25 +296,25 @@ static int __init terratec_init(void) printk(KERN_ERR "You must set an I/O address with io=0x???\n"); return -EINVAL; } - if (!request_region(io, 2, "terratec")) + if (!request_region(io, 2, "terratec")) { printk(KERN_ERR "TerraTec: port 0x%x already in use\n", io); return -EBUSY; } terratec_radio.priv=&terratec_unit; - + spin_lock_init(&lock); - + if(video_register_device(&terratec_radio, VFL_TYPE_RADIO, radio_nr)==-1) { release_region(io,2); return -EINVAL; } - + printk(KERN_INFO "TERRATEC ActivRadio Standalone card driver.\n"); - /* mute card - prevents noisy bootups */ + /* mute card - prevents noisy bootups */ /* this ensures that the volume is all the way down */ cardWriteVol(0); @@ -335,7 +334,7 @@ static void __exit terratec_cleanup_module(void) { video_unregister_device(&terratec_radio); release_region(io,2); - printk(KERN_INFO "TERRATEC ActivRadio Standalone card driver unloaded.\n"); + printk(KERN_INFO "TERRATEC ActivRadio Standalone card driver unloaded.\n"); } module_init(terratec_init); diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index 8da4badc2..5a099a50d 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c @@ -1,14 +1,14 @@ -/* radio-trust.c - Trust FM Radio card driver for Linux 2.2 +/* radio-trust.c - Trust FM Radio card driver for Linux 2.2 * by Eric Lammerts * * Based on radio-aztech.c. Original notes: * - * Adapted to support the Video for Linux API by + * Adapted to support the Video for Linux API by * Russell Kroll . Based on original tuner code by: * * Quay Ly * Donald Song - * Jason Lewis (jlewis@twilight.vtc.vsc.edu) + * Jason Lewis (jlewis@twilight.vtc.vsc.edu) * Scott McGrath (smcgrath@twilight.vtc.vsc.edu) * William McGrath (wmcgrath@twilight.vtc.vsc.edu) * @@ -22,7 +22,6 @@ #include #include #include -#include #include /* CONFIG_RADIO_TRUST_PORT */ /* acceptable ports: 0x350 (JP3 shorted), 0x358 (JP3 open) */ @@ -31,7 +30,7 @@ #define CONFIG_RADIO_TRUST_PORT -1 #endif -static int io = CONFIG_RADIO_TRUST_PORT; +static int io = CONFIG_RADIO_TRUST_PORT; static int radio_nr = -1; static int ioval = 0xf; static __u16 curvol; @@ -136,7 +135,7 @@ static void tr_setmute(int mute) static int tr_getsigstr(void) { int i, v; - + for(i = 0, v = 0; i < 100; i++) v |= inb(io); return (v & 1)? 0 : 0xffff; } @@ -176,7 +175,7 @@ static int tr_do_ioctl(struct inode *inode, struct file *file, { struct video_tuner *v = arg; - if(v->tuner) /* Only 1 tuner */ + if(v->tuner) /* Only 1 tuner */ return -EINVAL; v->rangelow = 87500 * 16; @@ -212,28 +211,28 @@ static int tr_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCGAUDIO: - { + { struct video_audio *v = arg; memset(v,0, sizeof(*v)); v->flags = VIDEO_AUDIO_MUTABLE | VIDEO_AUDIO_VOLUME | - VIDEO_AUDIO_BASS | VIDEO_AUDIO_TREBLE; + VIDEO_AUDIO_BASS | VIDEO_AUDIO_TREBLE; v->mode = curstereo? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; v->volume = curvol * 2048; v->step = 2048; v->bass = curbass * 4370; v->treble = curtreble * 4370; - + strcpy(v->name, "Trust FM Radio"); - return 0; + return 0; } case VIDIOCSAUDIO: { struct video_audio *v = arg; - if(v->audio) + if(v->audio) return -EINVAL; - tr_setvol(v->volume); + tr_setvol(v->volume); tr_setbass(v->bass); tr_settreble(v->treble); tr_setstereo(v->mode & VIDEO_SOUND_STEREO); @@ -293,7 +292,7 @@ static int __init trust_init(void) write_i2c(2, TDA7318_ADDR, 0xe0); /* speaker att. RR = 0 dB */ write_i2c(2, TDA7318_ADDR, 0x40); /* stereo 1 input, gain = 18.75 dB */ - tr_setvol(0x8000); + tr_setvol(0x8000); tr_setbass(0x8000); tr_settreble(0x8000); tr_setstereo(1); diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c index edd012288..e50955836 100644 --- a/drivers/media/radio/radio-typhoon.c +++ b/drivers/media/radio/radio-typhoon.c @@ -36,7 +36,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_TYPHOON_* */ #define BANNER "Typhoon Radio Card driver v0.1\n" @@ -362,8 +361,8 @@ static int __init typhoon_init(void) #ifdef CONFIG_RADIO_TYPHOON_PROC_FS if (!create_proc_info_entry("driver/radio-typhoon", 0, NULL, - typhoon_get_info)) - printk(KERN_ERR "radio-typhoon: registering /proc/driver/radio-typhoon failed\n"); + typhoon_get_info)) + printk(KERN_ERR "radio-typhoon: registering /proc/driver/radio-typhoon failed\n"); #endif return 0; diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c index 59b86a6b4..7bf1a4264 100644 --- a/drivers/media/radio/radio-zoltrix.c +++ b/drivers/media/radio/radio-zoltrix.c @@ -1,7 +1,7 @@ /* zoltrix radio plus driver for Linux radio support * (c) 1998 C. van Schaik * - * BUGS + * BUGS * Due to the inconsistency in reading from the signal flags * it is difficult to get an accurate tuned signal. * @@ -14,7 +14,7 @@ * * 1999-05-06 - (C. van Schaik) * - Make signal strength and stereo scans - * kinder to cpu while in delay + * kinder to cpu while in delay * 1999-01-05 - (C. van Schaik) * - Changed tuning to 1/160Mhz accuracy * - Added stereo support @@ -33,7 +33,6 @@ #include /* outb, outb_p */ #include /* copy to/from user */ #include /* kernel radio structs */ -#include #include /* CONFIG_RADIO_ZOLTRIX_PORT */ #ifndef CONFIG_RADIO_ZOLTRIX_PORT @@ -106,7 +105,7 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) i = 45; mutex_lock(&dev->lock); - + outb(0, io); outb(0, io); inb(io + 3); /* Zoltrix needs to be read to confirm */ @@ -140,8 +139,8 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) udelay(1000); inb(io+2); - udelay(1000); - + udelay(1000); + if (dev->muted) { outb(0, io); @@ -149,12 +148,12 @@ static int zol_setfreq(struct zol_device *dev, unsigned long freq) inb(io + 3); udelay(1000); } - + mutex_unlock(&dev->lock); - + if(!dev->muted) { - zol_setvol(dev, dev->curvol); + zol_setvol(dev, dev->curvol); } return 0; } @@ -175,14 +174,14 @@ static int zol_getsigstr(struct zol_device *dev) b = inb(io); mutex_unlock(&dev->lock); - + if (a != b) return (0); - if ((a == 0xcf) || (a == 0xdf) /* I found this out by playing */ + if ((a == 0xcf) || (a == 0xdf) /* I found this out by playing */ || (a == 0xef)) /* with a binary scanner on the card io */ return (1); - return (0); + return (0); } static int zol_is_stereo (struct zol_device *dev) @@ -190,7 +189,7 @@ static int zol_is_stereo (struct zol_device *dev) int x1, x2; mutex_lock(&dev->lock); - + outb(0x00, io); outb(dev->curvol, io); msleep(20); @@ -200,7 +199,7 @@ static int zol_is_stereo (struct zol_device *dev) x2 = inb(io); mutex_unlock(&dev->lock); - + if ((x1 == x2) && (x1 == 0xcf)) return 1; return 0; @@ -227,7 +226,7 @@ static int zol_do_ioctl(struct inode *inode, struct file *file, case VIDIOCGTUNER: { struct video_tuner *v = arg; - if (v->tuner) + if (v->tuner) return -EINVAL; strcpy(v->name, "FM"); v->rangelow = (int) (88.0 * 16000); @@ -352,7 +351,7 @@ static int __init zoltrix_init(void) printk(KERN_INFO "Zoltrix Radio Plus card driver.\n"); mutex_init(&zoltrix_unit.lock); - + /* mute card - prevents noisy bootups */ /* this ensures that the volume is all the way down */ diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 94d078b77..67d729a84 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -145,7 +145,7 @@ config VIDEO_SAA5246A config VIDEO_SAA5249 tristate "SAA5249 Teletext processor" - depends on VIDEO_DEV && I2C && VIDEO_V4L1 + depends on VIDEO_DEV && I2C help Support for I2C bus based teletext using the SAA5249 chip. At the moment this is only useful on some European WinTV cards. @@ -155,7 +155,7 @@ config VIDEO_SAA5249 config TUNER_3036 tristate "SAB3036 tuner" - depends on VIDEO_DEV && I2C && VIDEO_V4L1 + depends on VIDEO_DEV && I2C help Say Y here to include support for Philips SAB3036 compatible tuners. If in doubt, say N. @@ -224,12 +224,6 @@ config VIDEO_ZORAN_LML33R10 support for the Linux Media Labs LML33R10 MJPEG capture/playback card. -config VIDEO_ZORAN_AVS6EYES - tristate "AverMedia 6 Eyes support (EXPERIMENTAL)" - depends on VIDEO_ZORAN && EXPERIMENTAL && VIDEO_V4L1 - help - Support for the AverMedia 6 Eyes video surveillance card. - config VIDEO_ZR36120 tristate "Zoran ZR36120/36125 Video For Linux" depends on PCI && I2C && VIDEO_V4L1 && BROKEN @@ -260,7 +254,7 @@ source "drivers/media/video/saa7134/Kconfig" config VIDEO_MXB tristate "Siemens-Nixdorf 'Multimedia eXtension Board'" - depends on PCI && VIDEO_V4L1 && I2C + depends on PCI && VIDEO_V4L1 select VIDEO_SAA7146_VV select VIDEO_TUNER ---help--- @@ -272,7 +266,7 @@ config VIDEO_MXB config VIDEO_DPC tristate "Philips-Semiconductors 'dpc7146 demonstration board'" - depends on PCI && VIDEO_V4L1 && I2C + depends on PCI && VIDEO_V4L1 select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- @@ -287,7 +281,7 @@ config VIDEO_DPC config VIDEO_HEXIUM_ORION tristate "Hexium HV-PCI6 and Orion frame grabber" - depends on PCI && VIDEO_V4L1 && I2C + depends on PCI && VIDEO_V4L1 select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- @@ -299,7 +293,7 @@ config VIDEO_HEXIUM_ORION config VIDEO_HEXIUM_GEMINI tristate "Hexium Gemini frame grabber" - depends on PCI && VIDEO_V4L1 && I2C + depends on PCI && VIDEO_V4L1 select VIDEO_SAA7146_VV select VIDEO_V4L2 ---help--- @@ -312,6 +306,17 @@ config VIDEO_HEXIUM_GEMINI source "drivers/media/video/cx88/Kconfig" +config VIDEO_OVCAMCHIP + tristate "OmniVision Camera Chip support" + depends on I2C && VIDEO_V4L1 + ---help--- + Support for the OmniVision OV6xxx and OV7xxx series of camera chips. + This driver is intended to be used with the ov511 and w9968cf USB + camera drivers. + + To compile this driver as a module, choose M here: the + module will be called ovcamchip. + config VIDEO_M32R_AR tristate "AR devices" depends on M32R && VIDEO_V4L1 @@ -352,15 +357,6 @@ config VIDEO_CS53L32A To compile this driver as a module, choose M here: the module will be called cs53l32a. -config VIDEO_TLV320AIC23B - tristate "Texas Instruments TLV320AIC23B audio codec" - depends on VIDEO_DEV && I2C && EXPERIMENTAL - ---help--- - Support for the Texas Instruments TLV320AIC23B audio codec. - - To compile this driver as a module, choose M here: the - module will be called tlv320aic23b. - config VIDEO_WM8775 tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer" depends on VIDEO_DEV && I2C && EXPERIMENTAL @@ -381,18 +377,6 @@ config VIDEO_WM8739 To compile this driver as a module, choose M here: the module will be called wm8739. -config VIDEO_CX2341X - tristate "Conexant CX2341x MPEG encoders" - depends on VIDEO_V4L2 && EXPERIMENTAL - ---help--- - Support for the Conexant CX23416 MPEG encoders - and CX23415 MPEG encoder/decoders. - - This module currently supports the encoding functions only. - - To compile this driver as a module, choose M here: the - module will be called cx2341x. - source "drivers/media/video/cx25840/Kconfig" config VIDEO_SAA711X @@ -445,42 +429,23 @@ endmenu # encoder / decoder chips menu "V4L USB devices" depends on USB && VIDEO_DEV -source "drivers/media/video/pvrusb2/Kconfig" - source "drivers/media/video/em28xx/Kconfig" -source "drivers/media/video/usbvideo/Kconfig" - -source "drivers/media/video/et61x251/Kconfig" - -config VIDEO_OVCAMCHIP - tristate "OmniVision Camera Chip support" - depends on I2C && VIDEO_V4L1 +config USB_DSBR + tristate "D-Link USB FM radio support (EXPERIMENTAL)" + depends on USB && VIDEO_V4L1 && EXPERIMENTAL ---help--- - Support for the OmniVision OV6xxx and OV7xxx series of camera chips. - This driver is intended to be used with the ov511 and w9968cf USB - camera drivers. + Say Y here if you want to connect this type of radio to your + computer's USB port. Note that the audio is not digital, and + you must connect the line out connector to a sound card or a + set of speakers. To compile this driver as a module, choose M here: the - module will be called ovcamchip. + module will be called dsbr100. -config USB_W9968CF - tristate "USB W996[87]CF JPEG Dual Mode Camera support" - depends on USB && VIDEO_V4L1 && I2C - select VIDEO_OVCAMCHIP - ---help--- - Say Y here if you want support for cameras based on OV681 or - Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips. - - This driver has an optional plugin, which is distributed as a - separate module only (released under GPL). It allows to use higher - resolutions and framerates, but cannot be included in the official - Linux kernel for performance purposes. - - See for more info. +source "drivers/media/video/usbvideo/Kconfig" - To compile this driver as a module, choose M here: the - module will be called w9968cf. +source "drivers/media/video/et61x251/Kconfig" config USB_OV511 tristate "USB OV511 Camera support" @@ -518,6 +483,24 @@ config USB_STV680 To compile this driver as a module, choose M here: the module will be called stv680. +config USB_W9968CF + tristate "USB W996[87]CF JPEG Dual Mode Camera support" + depends on USB && VIDEO_V4L1 && I2C + select VIDEO_OVCAMCHIP + ---help--- + Say Y here if you want support for cameras based on OV681 or + Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips. + + This driver has an optional plugin, which is distributed as a + separate module only (released under GPL). It allows to use higher + resolutions and framerates, but cannot be included in the official + Linux kernel for performance purposes. + + See for more info. + + To compile this driver as a module, choose M here: the + module will be called w9968cf. + source "drivers/media/video/zc0301/Kconfig" source "drivers/media/video/pwc/Kconfig" diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index e82e511f2..e5bf2687b 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile @@ -6,7 +6,7 @@ zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o zr36067-objs := zoran_procfs.o zoran_device.o \ zoran_driver.o zoran_card.o tuner-objs := tuner-core.o tuner-types.o tuner-simple.o \ - mt20xx.o tda8290.o tea5767.o tda9887.o + mt20xx.o tda8290.o tea5767.o msp3400-objs := msp3400-driver.o msp3400-kthreads.o @@ -33,7 +33,6 @@ obj-$(CONFIG_VIDEO_ZORAN_DC30) += adv7175.o vpx3220.o zr36050.o \ zr36016.o obj-$(CONFIG_VIDEO_ZORAN_LML33) += bt819.o bt856.o zr36060.o obj-$(CONFIG_VIDEO_ZORAN_LML33R10) += saa7114.o adv7170.o zr36060.o -obj-$(CONFIG_VIDEO_ZORAN_AVS6EYES) += bt866.o ks0127.o zr36060.o obj-$(CONFIG_VIDEO_ZORAN) += zr36067.o videocodec.o obj-$(CONFIG_VIDEO_PMS) += pms.o obj-$(CONFIG_VIDEO_PLANB) += planb.o @@ -47,10 +46,8 @@ obj-$(CONFIG_VIDEO_SAA7134) += ir-kbd-i2c.o saa7134/ obj-$(CONFIG_VIDEO_CX88) += cx88/ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/ obj-$(CONFIG_VIDEO_EM28XX) += tvp5150.o -obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2/ obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o -obj-$(CONFIG_VIDEO_TLV320AIC23B) += tlv320aic23b.o obj-$(CONFIG_VIDEO_WM8775) += wm8775.o obj-$(CONFIG_VIDEO_WM8739) += wm8739.o obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/ @@ -61,7 +58,7 @@ obj-$(CONFIG_VIDEO_HEXIUM_GEMINI) += hexium_gemini.o obj-$(CONFIG_VIDEO_DPC) += saa7111.o dpc7146.o obj-$(CONFIG_TUNER_3036) += tuner-3036.o -obj-$(CONFIG_VIDEO_TUNER) += tuner.o +obj-$(CONFIG_VIDEO_TUNER) += tuner.o tda9887.o obj-$(CONFIG_VIDEO_BUF) += video-buf.o obj-$(CONFIG_VIDEO_BUF_DVB) += video-buf-dvb.o obj-$(CONFIG_VIDEO_BTCX) += btcx-risc.o @@ -74,9 +71,9 @@ obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o -obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o obj-$(CONFIG_USB_DABUSB) += dabusb.o +obj-$(CONFIG_USB_DSBR) += dsbr100.o obj-$(CONFIG_USB_OV511) += ov511.o obj-$(CONFIG_USB_SE401) += se401.o obj-$(CONFIG_USB_STV680) += stv680.o @@ -90,7 +87,6 @@ obj-$(CONFIG_USB_ZC0301) += zc0301/ obj-$(CONFIG_USB_IBMCAM) += usbvideo/ obj-$(CONFIG_USB_KONICAWC) += usbvideo/ obj-$(CONFIG_USB_VICAM) += usbvideo/ -obj-$(CONFIG_USB_QUICKCAM_MESSENGER) += usbvideo/ obj-$(CONFIG_VIDEO_VIVI) += vivi.o diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c index 5c5e682a3..dbe025170 100644 --- a/drivers/media/video/arv.c +++ b/drivers/media/video/arv.c @@ -18,7 +18,9 @@ * 2003-09-01: Support w3cam by Takeo Takahashi */ +#include #include +#include #include #include #include @@ -29,7 +31,6 @@ #include #include #include -#include #include #include @@ -211,7 +212,7 @@ void init_iic(void) ar_outl(0x0300, PLDI2CMOD); /* I2CMOD ACK/8b-data/7b-addr/auto */ ar_outl(0x1, PLDI2CACK); /* I2CACK ACK */ - /* I2C CLK */ + /* I2C CLK */ /* 50MH-100k */ if (freq == 75) { ar_outl(369, PLDI2CFREQ); /* BCLK = 75MHz */ diff --git a/drivers/media/video/bt866.c b/drivers/media/video/bt866.c deleted file mode 100644 index 05e42bbcf..000000000 --- a/drivers/media/video/bt866.c +++ /dev/null @@ -1,377 +0,0 @@ -/* - bt866 - BT866 Digital Video Encoder (Rockwell Part) - - Copyright (C) 1999 Mike Bernson - Copyright (C) 1998 Dave Perks - - Modifications for LML33/DC10plus unified driver - Copyright (C) 2000 Serguei Miridonov - - This code was modify/ported from the saa7111 driver written - by Dave Perks. - - This code was adapted for the bt866 by Christer Weinigel and ported - to 2.6 by Martin Samuelsson. - - 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -MODULE_LICENSE("GPL"); - -#define BT866_DEVNAME "bt866" -#define I2C_BT866 0x88 - -MODULE_LICENSE("GPL"); - -#define DEBUG(x) /* Debug driver */ - -/* ----------------------------------------------------------------------- */ - -struct bt866 { - struct i2c_client *i2c; - int addr; - unsigned char reg[128]; - - int norm; - int enable; - int bright; - int contrast; - int hue; - int sat; -}; - -static int bt866_write(struct bt866 *dev, - unsigned char subaddr, unsigned char data); - -static int bt866_do_command(struct bt866 *encoder, - unsigned int cmd, void *arg) -{ - switch (cmd) { - case ENCODER_GET_CAPABILITIES: - { - struct video_encoder_capability *cap = arg; - - DEBUG(printk - (KERN_INFO "%s: get capabilities\n", - encoder->i2c->name)); - - cap->flags - = VIDEO_ENCODER_PAL - | VIDEO_ENCODER_NTSC - | VIDEO_ENCODER_CCIR; - cap->inputs = 2; - cap->outputs = 1; - } - break; - - case ENCODER_SET_NORM: - { - int *iarg = arg; - - DEBUG(printk(KERN_INFO "%s: set norm %d\n", - encoder->i2c->name, *iarg)); - - switch (*iarg) { - - case VIDEO_MODE_NTSC: - break; - - case VIDEO_MODE_PAL: - break; - - default: - return -EINVAL; - - } - encoder->norm = *iarg; - } - break; - - case ENCODER_SET_INPUT: - { - int *iarg = arg; - static const __u8 init[] = { - 0xc8, 0xcc, /* CRSCALE */ - 0xca, 0x91, /* CBSCALE */ - 0xcc, 0x24, /* YC16 | OSDNUM */ - 0xda, 0x00, /* */ - 0xdc, 0x24, /* SETMODE | PAL */ - 0xde, 0x02, /* EACTIVE */ - - /* overlay colors */ - 0x70, 0xEB, 0x90, 0x80, 0xB0, 0x80, /* white */ - 0x72, 0xA2, 0x92, 0x8E, 0xB2, 0x2C, /* yellow */ - 0x74, 0x83, 0x94, 0x2C, 0xB4, 0x9C, /* cyan */ - 0x76, 0x70, 0x96, 0x3A, 0xB6, 0x48, /* green */ - 0x78, 0x54, 0x98, 0xC6, 0xB8, 0xB8, /* magenta */ - 0x7A, 0x41, 0x9A, 0xD4, 0xBA, 0x64, /* red */ - 0x7C, 0x23, 0x9C, 0x72, 0xBC, 0xD4, /* blue */ - 0x7E, 0x10, 0x9E, 0x80, 0xBE, 0x80, /* black */ - - 0x60, 0xEB, 0x80, 0x80, 0xc0, 0x80, /* white */ - 0x62, 0xA2, 0x82, 0x8E, 0xc2, 0x2C, /* yellow */ - 0x64, 0x83, 0x84, 0x2C, 0xc4, 0x9C, /* cyan */ - 0x66, 0x70, 0x86, 0x3A, 0xc6, 0x48, /* green */ - 0x68, 0x54, 0x88, 0xC6, 0xc8, 0xB8, /* magenta */ - 0x6A, 0x41, 0x8A, 0xD4, 0xcA, 0x64, /* red */ - 0x6C, 0x23, 0x8C, 0x72, 0xcC, 0xD4, /* blue */ - 0x6E, 0x10, 0x8E, 0x80, 0xcE, 0x80, /* black */ - }; - int i; - u8 val; - - for (i = 0; i < ARRAY_SIZE(init) / 2; i += 2) - bt866_write(encoder, init[i], init[i+1]); - - val = encoder->reg[0xdc]; - - if (*iarg == 0) - val |= 0x40; /* CBSWAP */ - else - val &= ~0x40; /* !CBSWAP */ - - bt866_write(encoder, 0xdc, val); - - val = encoder->reg[0xcc]; - if (*iarg == 2) - val |= 0x01; /* OSDBAR */ - else - val &= ~0x01; /* !OSDBAR */ - bt866_write(encoder, 0xcc, val); - - DEBUG(printk(KERN_INFO "%s: set input %d\n", - encoder->i2c->name, *iarg)); - - switch (*iarg) { - case 0: - break; - case 1: - break; - default: - return -EINVAL; - - } - } - break; - - case ENCODER_SET_OUTPUT: - { - int *iarg = arg; - - DEBUG(printk(KERN_INFO "%s: set output %d\n", - encoder->i2c->name, *iarg)); - - /* not much choice of outputs */ - if (*iarg != 0) - return -EINVAL; - } - break; - - case ENCODER_ENABLE_OUTPUT: - { - int *iarg = arg; - encoder->enable = !!*iarg; - - DEBUG(printk - (KERN_INFO "%s: enable output %d\n", - encoder->i2c->name, encoder->enable)); - } - break; - - case 4711: - { - int *iarg = arg; - __u8 val; - - printk("bt866: square = %d\n", *iarg); - - val = encoder->reg[0xdc]; - if (*iarg) - val |= 1; /* SQUARE */ - else - val &= ~1; /* !SQUARE */ - bt866_write(encoder, 0xdc, val); - break; - } - - default: - return -EINVAL; - } - - return 0; -} - -static int bt866_write(struct bt866 *encoder, - unsigned char subaddr, unsigned char data) -{ - unsigned char buffer[2]; - int err; - - buffer[0] = subaddr; - buffer[1] = data; - - encoder->reg[subaddr] = data; - - DEBUG(printk - ("%s: write 0x%02X = 0x%02X\n", - encoder->i2c->name, subaddr, data)); - - for (err = 0; err < 3;) { - if (i2c_master_send(encoder->i2c, buffer, 2) == 2) - break; - err++; - printk(KERN_WARNING "%s: I/O error #%d " - "(write 0x%02x/0x%02x)\n", - encoder->i2c->name, err, encoder->addr, subaddr); - schedule_timeout_interruptible(HZ/10); - } - if (err == 3) { - printk(KERN_WARNING "%s: giving up\n", - encoder->i2c->name); - return -1; - } - - return 0; -} - -static int bt866_attach(struct i2c_adapter *adapter); -static int bt866_detach(struct i2c_client *client); -static int bt866_command(struct i2c_client *client, - unsigned int cmd, void *arg); - - -/* Addresses to scan */ -static unsigned short normal_i2c[] = {I2C_BT866>>1, I2C_CLIENT_END}; -static unsigned short probe[2] = {I2C_CLIENT_END, I2C_CLIENT_END}; -static unsigned short ignore[2] = {I2C_CLIENT_END, I2C_CLIENT_END}; - -static struct i2c_client_address_data addr_data = { - normal_i2c, - probe, - ignore, -}; - -static struct i2c_driver i2c_driver_bt866 = { - .driver.name = BT866_DEVNAME, - .id = I2C_DRIVERID_BT866, - .attach_adapter = bt866_attach, - .detach_client = bt866_detach, - .command = bt866_command -}; - - -static struct i2c_client bt866_client_tmpl = -{ - .name = "(nil)", - .addr = 0, - .adapter = NULL, - .driver = &i2c_driver_bt866, - .usage_count = 0 -}; - -static int bt866_found_proc(struct i2c_adapter *adapter, - int addr, int kind) -{ - struct bt866 *encoder; - struct i2c_client *client; - - client = kzalloc(sizeof(*client), GFP_KERNEL); - if (client == NULL) - return -ENOMEM; - memcpy(client, &bt866_client_tmpl, sizeof(*client)); - - encoder = kzalloc(sizeof(*encoder), GFP_KERNEL); - if (encoder == NULL) { - kfree(client); - return -ENOMEM; - } - - i2c_set_clientdata(client, encoder); - client->adapter = adapter; - client->addr = addr; - sprintf(client->name, "%s-%02x", BT866_DEVNAME, adapter->id); - - encoder->i2c = client; - encoder->addr = addr; - //encoder->encoder_type = ENCODER_TYPE_UNKNOWN; - - /* initialize */ - - i2c_attach_client(client); - - return 0; -} - -static int bt866_attach(struct i2c_adapter *adapter) -{ - if (adapter->id == I2C_HW_B_ZR36067) - return i2c_probe(adapter, &addr_data, bt866_found_proc); - return 0; -} - -static int bt866_detach(struct i2c_client *client) -{ - struct bt866 *encoder = i2c_get_clientdata(client); - - i2c_detach_client(client); - kfree(encoder); - kfree(client); - - return 0; -} - -static int bt866_command(struct i2c_client *client, - unsigned int cmd, void *arg) -{ - struct bt866 *encoder = i2c_get_clientdata(client); - return bt866_do_command(encoder, cmd, arg); -} - -static int __devinit bt866_init(void) -{ - i2c_add_driver(&i2c_driver_bt866); - return 0; -} - -static void __devexit bt866_exit(void) -{ - i2c_del_driver(&i2c_driver_bt866); -} - -module_init(bt866_init); -module_exit(bt866_exit); diff --git a/drivers/media/video/bt8xx/Kconfig b/drivers/media/video/bt8xx/Kconfig index cdcf55650..153f6a4a9 100644 --- a/drivers/media/video/bt8xx/Kconfig +++ b/drivers/media/video/bt8xx/Kconfig @@ -1,6 +1,6 @@ config VIDEO_BT848 tristate "BT848 Video For Linux" - depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L1 + depends on VIDEO_DEV && PCI && I2C && VIDEO_V4L2 select I2C_ALGOBIT select FW_LOADER select VIDEO_BTCX diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index de14818d5..2b64aa835 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c @@ -25,6 +25,7 @@ */ +#include #include #include #include @@ -268,7 +269,7 @@ static struct CARD { { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" }, { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" }, - { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" }, + { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" }, { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" }, { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" }, @@ -308,7 +309,6 @@ static struct CARD { { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" }, { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" }, - { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "}, { 0, -1, NULL } }; @@ -1903,7 +1903,7 @@ struct tvcard bttv_tvcards[] = { .no_tda7432 = 1, }, [BTTV_BOARD_OSPREY2x0] = { - .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */ + .name = "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */ .video_inputs = 2, .audio_inputs = 1, .tuner = -1, @@ -2745,7 +2745,7 @@ struct tvcard bttv_tvcards[] = { /* Michael Krufky */ .name = "DViCO FusionHDTV 5 Lite", .tuner = 0, - .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */ + .tuner_type = TUNER_LG_TDVS_H062F, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, .video_inputs = 3, @@ -2762,7 +2762,7 @@ struct tvcard bttv_tvcards[] = { }, /* ---- card 0x88---------------------------------- */ [BTTV_BOARD_ACORP_Y878F] = { - /* Mauro Carvalho Chehab */ + /* Mauro Carvalho Chehab */ .name = "Acorp Y878F", .video_inputs = 3, .audio_inputs = 1, @@ -3547,6 +3547,11 @@ void __devinit bttv_init_card2(struct bttv *btv) /* Hybrid DVB card, DOES have a tda9887 */ if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE) tda9887 = 1; + if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) || + (btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) || + (btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) || + tda9887) + request_module("tda9887"); if (btv->tuner_type != UNSET) request_module("tuner"); } @@ -3785,7 +3790,6 @@ static void __devinit osprey_eeprom(struct bttv *btv) break; case 0x0060: case 0x0070: - case 0x00A0: btv->c.type = BTTV_BOARD_OSPREY2x0; /* enable output on select control lines */ gpio_inout(0xffffff,0x000303); @@ -4842,7 +4846,7 @@ static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input) * * The IVC120G security card has 4 i2c controlled TDA8540 matrix * swichers to provide 16 channels to MUX0. The TDA8540's have - * 4 independent outputs and as such the IVC120G also has the + * 4 indepedant outputs and as such the IVC120G also has the * optional "Monitor Out" bus. This allows the card to be looking * at one input while the monitor is looking at another. * diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 20dff7c31..423e95494 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -3923,12 +3923,7 @@ static int __devinit bttv_register_video(struct bttv *btv) goto err; printk(KERN_INFO "bttv%d: registered device video%d\n", btv->c.nr,btv->video_dev->minor & 0x1f); - if (class_device_create_file(&btv->video_dev->class_dev, - &class_device_attr_card)<0) { - printk(KERN_ERR "bttv%d: class_device_create_file 'card' " - "failed\n", btv->c.nr); - goto err; - } + video_device_create_file(btv->video_dev, &class_device_attr_card); /* vbi */ btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi"); @@ -4024,9 +4019,8 @@ static int __devinit bttv_probe(struct pci_dev *dev, if (!request_mem_region(pci_resource_start(dev,0), pci_resource_len(dev,0), btv->c.name)) { - printk(KERN_WARNING "bttv%d: can't request iomem (0x%llx).\n", - btv->c.nr, - (unsigned long long)pci_resource_start(dev,0)); + printk(KERN_WARNING "bttv%d: can't request iomem (0x%lx).\n", + btv->c.nr, pci_resource_start(dev,0)); return -EBUSY; } pci_set_master(dev); @@ -4037,9 +4031,8 @@ static int __devinit bttv_probe(struct pci_dev *dev, pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); printk(KERN_INFO "bttv%d: Bt%d (rev %d) at %s, ", bttv_num,btv->id, btv->revision, pci_name(dev)); - printk("irq: %d, latency: %d, mmio: 0x%llx\n", - btv->c.pci->irq, lat, - (unsigned long long)pci_resource_start(dev,0)); + printk("irq: %d, latency: %d, mmio: 0x%lx\n", + btv->c.pci->irq, lat, pci_resource_start(dev,0)); schedule(); btv->bt848_mmio=ioremap(pci_resource_start(dev,0), 0x1000); @@ -4055,7 +4048,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, /* disable irqs, register irq handler */ btwrite(0, BT848_INT_MASK); result = request_irq(btv->c.pci->irq, bttv_irq, - IRQF_SHARED | IRQF_DISABLED,btv->c.name,(void *)btv); + SA_SHIRQ | SA_INTERRUPT,btv->c.name,(void *)btv); if (result < 0) { printk(KERN_ERR "bttv%d: can't get IRQ %d\n", bttv_num,btv->c.pci->irq); @@ -4292,8 +4285,6 @@ static struct pci_driver bttv_pci_driver = { static int bttv_init_module(void) { - int ret; - bttv_num = 0; printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n", @@ -4315,11 +4306,7 @@ static int bttv_init_module(void) bttv_check_chipset(); - ret = bus_register(&bttv_sub_bus_type); - if (ret < 0) { - printk(KERN_WARNING "bttv: bus_register error: %d\n", ret); - return ret; - } + bus_register(&bttv_sub_bus_type); return pci_register_driver(&bttv_pci_driver); } diff --git a/drivers/media/video/bt8xx/bttv-gpio.c b/drivers/media/video/bt8xx/bttv-gpio.c index ba081f6f8..c4d5e2b70 100644 --- a/drivers/media/video/bt8xx/bttv-gpio.c +++ b/drivers/media/video/bt8xx/bttv-gpio.c @@ -118,6 +118,20 @@ int bttv_sub_del_devices(struct bttv_core *core) return 0; } +void bttv_gpio_irq(struct bttv_core *core) +{ + struct bttv_sub_driver *drv; + struct bttv_sub_device *dev; + struct list_head *item; + + list_for_each(item,&core->subs) { + dev = list_entry(item,struct bttv_sub_device,list); + drv = to_bttv_sub_drv(dev->dev.driver); + if (drv && drv->gpio_irq) + drv->gpio_irq(dev); + } +} + /* ----------------------------------------------------------------------- */ /* external: sub-driver register/unregister */ diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index 933d6db09..69efa0e51 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c @@ -303,7 +303,6 @@ int bttv_input_init(struct bttv *btv) ir->mask_keyup = 0x010000; ir->polling = 50; // ms break; - case BTTV_BOARD_PV_M4900: case BTTV_BOARD_PV_BT878P_9B: case BTTV_BOARD_PV_BT878P_PLUS: ir_codes = ir_codes_pixelview; @@ -356,7 +355,7 @@ int bttv_input_init(struct bttv *btv) if (ir->rc5_gpio) { u32 gpio; - /* enable remote irq */ + /* enable remote irq */ bttv_gpio_inout(&btv->c, (1 << 4), 1 << 4); gpio = bttv_gpio_read(&btv->c); bttv_gpio_write(&btv->c, gpio & ~(1 << 4)); diff --git a/drivers/media/video/bt8xx/bttv-vbi.c b/drivers/media/video/bt8xx/bttv-vbi.c index 63676e7bd..8c9f0f7cf 100644 --- a/drivers/media/video/bt8xx/bttv-vbi.c +++ b/drivers/media/video/bt8xx/bttv-vbi.c @@ -31,16 +31,11 @@ #include #include "bttvp.h" -/* Offset from line sync pulse leading edge (0H) to start of VBI capture, - in fCLKx2 pixels. According to the datasheet, VBI capture starts - VBI_HDELAY fCLKx1 pixels from the tailing edgeof /HRESET, and /HRESET - is 64 fCLKx1 pixels wide. VBI_HDELAY is set to 0, so this should be - (64 + 0) * 2 = 128 fCLKx2 pixels. But it's not! The datasheet is - Just Plain Wrong. The real value appears to be different for - different revisions of the bt8x8 chips, and to be affected by the - horizontal scaling factor. Experimentally, the value is measured - to be about 244. */ -#define VBI_OFFSET 244 +/* Offset from line sync pulse leading edge (0H) in 1 / sampling_rate: + bt8x8 /HRESET pulse starts at 0H and has length 64 / fCLKx1 (E|O_VTC + HSFMT = 0). VBI_HDELAY (always 0) is an offset from the trailing edge + of /HRESET in 1 / fCLKx1, and the sampling_rate tvnorm->Fsc is fCLKx2. */ +#define VBI_OFFSET ((64 + 0) * 2) #define VBI_DEFLINES 16 #define VBI_MAXLINES 32 diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h index f9c9e3c4d..3a23265c1 100644 --- a/drivers/media/video/bt8xx/bttv.h +++ b/drivers/media/video/bt8xx/bttv.h @@ -350,6 +350,7 @@ struct bttv_sub_driver { char wanted[BUS_ID_SIZE]; int (*probe)(struct bttv_sub_device *sub); void (*remove)(struct bttv_sub_device *sub); + void (*gpio_irq)(struct bttv_sub_device *sub); }; #define to_bttv_sub_drv(x) container_of((x), struct bttv_sub_driver, drv) diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h index 311c4c541..ee989d2e1 100644 --- a/drivers/media/video/bt8xx/bttvp.h +++ b/drivers/media/video/bt8xx/bttvp.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -215,6 +214,7 @@ extern struct videobuf_queue_ops bttv_vbi_qops; extern struct bus_type bttv_sub_bus_type; int bttv_sub_add_device(struct bttv_core *core, char *name); int bttv_sub_del_devices(struct bttv_core *core); +void bttv_gpio_irq(struct bttv_core *core); /* ---------------------------------------------------------- */ @@ -360,7 +360,7 @@ struct bttv { int mbox_csel; /* risc memory management data - - must acquire s_lock before changing these + - must aquire s_lock before changing these - only the irq handler is supported to touch top + bottom + vcurr */ struct btcx_riscmem main; struct bttv_buffer *screen; /* overlay */ diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c index 7d0b6e59c..cf61c590f 100644 --- a/drivers/media/video/bw-qcam.c +++ b/drivers/media/video/bw-qcam.c @@ -73,7 +73,6 @@ OTHER DEALINGS IN THE SOFTWARE. #include #include #include -#include #include #include @@ -760,7 +759,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, { struct video_picture *p = arg; if(p->palette!=VIDEO_PALETTE_GREY) - return -EINVAL; + return -EINVAL; if(p->depth!=4 && p->depth!=6) return -EINVAL; diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index a3989bd2f..22a7386bb 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c index b69ee1194..840fe0177 100644 --- a/drivers/media/video/compat_ioctl32.c +++ b/drivers/media/video/compat_ioctl32.c @@ -12,6 +12,7 @@ * ioctls. */ +#include #include #include #include @@ -21,7 +22,7 @@ #ifdef CONFIG_COMPAT -#ifdef CONFIG_VIDEO_V4L1_COMPAT + struct video_tuner32 { compat_int_t tuner; char name[32]; @@ -107,7 +108,6 @@ struct video_window32 { compat_caddr_t clips; compat_int_t clipcount; }; -#endif static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { @@ -125,7 +125,6 @@ static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } -#ifdef CONFIG_VIDEO_V4L1_COMPAT /* You get back everything except the clips... */ static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) { @@ -140,7 +139,6 @@ static int put_video_window32(struct video_window *kp, struct video_window32 __u return -EFAULT; return 0; } -#endif struct v4l2_clip32 { @@ -493,24 +491,6 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user return 0; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT -struct video_code32 -{ - char loadwhat[16]; /* name or tag of file being passed */ - compat_int_t datasize; - unsigned char *data; -}; - -static inline int microcode32(struct video_code *kp, struct video_code32 __user *up) -{ - if(!access_ok(VERIFY_READ, up, sizeof(struct video_code32)) || - copy_from_user(kp->loadwhat, up->loadwhat, sizeof (up->loadwhat)) || - get_user(kp->datasize, &up->datasize) || - copy_from_user(kp->data, up->data, up->datasize)) - return -EFAULT; - return 0; -} - #define VIDIOCGTUNER32 _IOWR('v',4, struct video_tuner32) #define VIDIOCSTUNER32 _IOW('v',5, struct video_tuner32) #define VIDIOCGWIN32 _IOR('v',9, struct video_window32) @@ -519,9 +499,6 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user #define VIDIOCSFBUF32 _IOW('v',12, struct video_buffer32) #define VIDIOCGFREQ32 _IOR('v',14, u32) #define VIDIOCSFREQ32 _IOW('v',15, u32) -#define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32) - -#endif /* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */ #define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4) @@ -543,7 +520,6 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user #define VIDIOC_S_INPUT32 _IOWR ('V', 39, compat_int_t) #define VIDIOC_TRY_FMT32 _IOWR ('V', 64, struct v4l2_format32) -#ifdef CONFIG_VIDEO_V4L1_COMPAT enum { MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) }; @@ -608,17 +584,13 @@ static int do_set_window(struct file *file, unsigned int cmd, unsigned long arg) return native_ioctl(file, VIDIOCSWIN, (unsigned long)vw); } -#endif static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { union { -#ifdef CONFIG_VIDEO_V4L1_COMPAT struct video_tuner vt; struct video_buffer vb; struct video_window vw; - struct video_code vc; -#endif struct v4l2_format v2f; struct v4l2_buffer v2b; struct v4l2_framebuffer v2fb; @@ -634,7 +606,6 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg /* First, convert the command. */ switch(cmd) { -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; @@ -642,8 +613,6 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; - case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; -#endif case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; @@ -663,7 +632,6 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg }; switch(cmd) { -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCSTUNER: case VIDIOCGTUNER: err = get_video_tuner32(&karg.vt, up); @@ -677,7 +645,6 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg break; case VIDIOCSFREQ: -#endif case VIDIOC_S_INPUT: case VIDIOC_OVERLAY: case VIDIOC_STREAMON: @@ -731,21 +698,14 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg compatible_arg = 0; break; -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGWIN: case VIDIOCGFBUF: case VIDIOCGFREQ: -#endif case VIDIOC_G_FBUF: case VIDIOC_G_INPUT: compatible_arg = 0; -#ifdef CONFIG_VIDEO_V4L1_COMPAT - case VIDIOCSMICROCODE: - err = microcode32(&karg.vc, up); - compatible_arg = 0; - break; -#endif }; + if(err) goto out; @@ -760,7 +720,6 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg } if(err == 0) { switch(cmd) { -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGTUNER: err = put_video_tuner32(&karg.vt, up); break; @@ -772,7 +731,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg case VIDIOCGFBUF: err = put_video_buffer32(&karg.vb, up); break; -#endif + case VIDIOC_G_FBUF: err = put_v4l2_framebuffer32(&karg.v2fb, up); break; @@ -810,9 +769,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg err = put_v4l2_input32(&karg.v2i, up); break; -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGFREQ: -#endif case VIDIOC_G_INPUT: err = put_user(((u32)karg.vx), (u32 __user *)up); break; @@ -830,7 +787,6 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) return ret; switch (cmd) { -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCSWIN32: ret = do_set_window(file, cmd, arg); break; @@ -841,7 +797,6 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case VIDIOCSFBUF32: case VIDIOCGFREQ32: case VIDIOCSFREQ32: -#endif case VIDIOC_QUERYCAP: case VIDIOC_ENUM_FMT: case VIDIOC_G_FMT32: @@ -873,7 +828,6 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) ret = do_video_ioctl(file, cmd, arg); break; -#ifdef CONFIG_VIDEO_V4L1_COMPAT /* Little v, the video4linux ioctls (conflict?) */ case VIDIOCGCAP: case VIDIOCGCHAN: @@ -902,7 +856,6 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) case _IOR('v' , BASE_VIDIOCPRIVATE+7, int): ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); break; -#endif default: v4l_print_ioctl("compat_ioctl32", cmd); } diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 3b31a0dd2..85d84e89d 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c @@ -26,6 +26,7 @@ /* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ /* #define _CPIA_DEBUG_ 1 */ +#include #include #include @@ -46,6 +47,13 @@ #include "cpia.h" +#ifdef CONFIG_VIDEO_CPIA_PP +extern int cpia_pp_init(void); +#endif +#ifdef CONFIG_VIDEO_CPIA_USB +extern int cpia_usb_init(void); +#endif + static int video_nr = -1; #ifdef MODULE @@ -59,10 +67,10 @@ MODULE_SUPPORTED_DEVICE("video"); static unsigned short colorspace_conv; module_param(colorspace_conv, ushort, 0444); MODULE_PARM_DESC(colorspace_conv, - " Colorspace conversion:" - "\n 0 = disable, 1 = enable" - "\n Default value is 0" - ); + " Colorspace conversion:" + "\n 0 = disable, 1 = enable" + "\n Default value is 0" + ); #define ABOUT "V4L-Driver for Vision CPiA based cameras" @@ -4039,6 +4047,13 @@ static int __init cpia_init(void) proc_cpia_create(); #endif +#ifdef CONFIG_VIDEO_CPIA_PP + cpia_pp_init(); +#endif +#ifdef CONFIG_VIDEO_CPIA_USB + cpia_usb_init(); +#endif + return 0; } diff --git a/drivers/media/video/cpia.h b/drivers/media/video/cpia.h index 6eaa69202..dde27a6a4 100644 --- a/drivers/media/video/cpia.h +++ b/drivers/media/video/cpia.h @@ -45,7 +45,6 @@ #include #include -#include #include #include #include @@ -248,7 +247,7 @@ enum v4l_camstates { struct cam_data { struct list_head cam_data_list; - struct mutex busy_lock; /* guard against SMP multithreading */ + struct mutex busy_lock; /* guard against SMP multithreading */ struct cpia_camera_ops *ops; /* lowlevel driver operations */ void *lowlevel_data; /* private data for lowlevel driver */ u8 *raw_image; /* buffer for raw image data */ diff --git a/drivers/media/video/cpia2/Kconfig b/drivers/media/video/cpia2/Kconfig index e39a96152..513cc0927 100644 --- a/drivers/media/video/cpia2/Kconfig +++ b/drivers/media/video/cpia2/Kconfig @@ -1,6 +1,6 @@ config VIDEO_CPIA2 tristate "CPiA2 Video For Linux" - depends on VIDEO_DEV && USB && VIDEO_V4L1 + depends on VIDEO_DEV && USB ---help--- This is the video4linux driver for cameras based on Vision's CPiA2 (Colour Processor Interface ASIC), such as the Digital Blue QX5 diff --git a/drivers/media/video/cpia2/cpia2.h b/drivers/media/video/cpia2/cpia2.h index c5ecb2be5..1764991b0 100644 --- a/drivers/media/video/cpia2/cpia2.h +++ b/drivers/media/video/cpia2/cpia2.h @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c index d09f49950..481e178ef 100644 --- a/drivers/media/video/cpia2/cpia2_v4l.c +++ b/drivers/media/video/cpia2/cpia2_v4l.c @@ -31,6 +31,7 @@ #include +#include #include #include @@ -342,9 +343,7 @@ static int cpia2_close(struct inode *inode, struct file *file) cpia2_free_buffers(cam); if (!cam->present) { video_unregister_device(dev); - mutex_unlock(&cam->busy_lock); kfree(cam); - return 0; } } @@ -1168,9 +1167,9 @@ static int ioctl_g_ctrl(void *arg,struct camera_data *cam) } else { if(cam->params.flicker_control.cam_register & CPIA2_VP_FLICKER_MODES_50HZ) { - mode = FLICKER_50; + mode = FLICKER_50; } else { - mode = FLICKER_60; + mode = FLICKER_60; } } for(i=0; i #include #include @@ -802,7 +803,7 @@ static struct parport_driver cpia_pp_driver = { .detach = cpia_pp_detach, }; -static int cpia_pp_init(void) +int cpia_pp_init(void) { printk(KERN_INFO "%s v%d.%d.%d\n",ABOUT, CPIA_PP_MAJ_VER,CPIA_PP_MIN_VER,CPIA_PP_PATCH_VER); @@ -859,8 +860,6 @@ void cleanup_module(void) static int __init cpia_pp_setup(char *str) { - int err; - if (!strncmp(str, "parport", 7)) { int n = simple_strtoul(str + 7, NULL, 10); if (parport_ptr < PARPORT_MAX) { @@ -874,10 +873,6 @@ static int __init cpia_pp_setup(char *str) parport_nr[parport_ptr++] = PPCPIA_PARPORT_NONE; } - err=cpia_pp_init(); - if (err) - return err; - return 1; } diff --git a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c index 2ee34a3b9..9c49a4b00 100644 --- a/drivers/media/video/cpia_usb.c +++ b/drivers/media/video/cpia_usb.c @@ -474,6 +474,12 @@ static int cpia_usb_close(void *privdata) return 0; } +int cpia_usb_init(void) +{ + /* return -ENODEV; */ + return 0; +} + /* Probing and initializing */ static int cpia_probe(struct usb_interface *intf, diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c deleted file mode 100644 index 65f00fc08..000000000 --- a/drivers/media/video/cx2341x.c +++ /dev/null @@ -1,932 +0,0 @@ -/* - * cx2341x - generic code for cx23415/6 based devices - * - * Copyright (C) 2006 Hans Verkuil - * - * 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 -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -MODULE_DESCRIPTION("cx23415/6 driver"); -MODULE_AUTHOR("Hans Verkuil"); -MODULE_LICENSE("GPL"); - -static int debug = 0; -module_param(debug, int, 0644); -MODULE_PARM_DESC(debug, "Debug level (0-1)"); - -const u32 cx2341x_mpeg_ctrls[] = { - V4L2_CID_MPEG_CLASS, - V4L2_CID_MPEG_STREAM_TYPE, - V4L2_CID_MPEG_STREAM_VBI_FMT, - V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, - V4L2_CID_MPEG_AUDIO_ENCODING, - V4L2_CID_MPEG_AUDIO_L2_BITRATE, - V4L2_CID_MPEG_AUDIO_MODE, - V4L2_CID_MPEG_AUDIO_MODE_EXTENSION, - V4L2_CID_MPEG_AUDIO_EMPHASIS, - V4L2_CID_MPEG_AUDIO_CRC, - V4L2_CID_MPEG_VIDEO_ENCODING, - V4L2_CID_MPEG_VIDEO_ASPECT, - V4L2_CID_MPEG_VIDEO_B_FRAMES, - V4L2_CID_MPEG_VIDEO_GOP_SIZE, - V4L2_CID_MPEG_VIDEO_GOP_CLOSURE, - V4L2_CID_MPEG_VIDEO_PULLDOWN, - V4L2_CID_MPEG_VIDEO_BITRATE_MODE, - V4L2_CID_MPEG_VIDEO_BITRATE, - V4L2_CID_MPEG_VIDEO_BITRATE_PEAK, - V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION, - V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE, - V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER, - V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE, - V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE, - V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE, - V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER, - V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE, - V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM, - V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP, - V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM, - V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP, - 0 -}; - - -/* Map the control ID to the correct field in the cx2341x_mpeg_params - struct. Return -EINVAL if the ID is unknown, else return 0. */ -static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params, - struct v4l2_ext_control *ctrl) -{ - switch (ctrl->id) { - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - ctrl->value = params->audio_sampling_freq; - break; - case V4L2_CID_MPEG_AUDIO_ENCODING: - ctrl->value = params->audio_encoding; - break; - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - ctrl->value = params->audio_l2_bitrate; - break; - case V4L2_CID_MPEG_AUDIO_MODE: - ctrl->value = params->audio_mode; - break; - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - ctrl->value = params->audio_mode_extension; - break; - case V4L2_CID_MPEG_AUDIO_EMPHASIS: - ctrl->value = params->audio_emphasis; - break; - case V4L2_CID_MPEG_AUDIO_CRC: - ctrl->value = params->audio_crc; - break; - case V4L2_CID_MPEG_VIDEO_ENCODING: - ctrl->value = params->video_encoding; - break; - case V4L2_CID_MPEG_VIDEO_ASPECT: - ctrl->value = params->video_aspect; - break; - case V4L2_CID_MPEG_VIDEO_B_FRAMES: - ctrl->value = params->video_b_frames; - break; - case V4L2_CID_MPEG_VIDEO_GOP_SIZE: - ctrl->value = params->video_gop_size; - break; - case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: - ctrl->value = params->video_gop_closure; - break; - case V4L2_CID_MPEG_VIDEO_PULLDOWN: - ctrl->value = params->video_pulldown; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - ctrl->value = params->video_bitrate_mode; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE: - ctrl->value = params->video_bitrate; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: - ctrl->value = params->video_bitrate_peak; - break; - case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: - ctrl->value = params->video_temporal_decimation; - break; - case V4L2_CID_MPEG_STREAM_TYPE: - ctrl->value = params->stream_type; - break; - case V4L2_CID_MPEG_STREAM_VBI_FMT: - ctrl->value = params->stream_vbi_fmt; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - ctrl->value = params->video_spatial_filter_mode; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: - ctrl->value = params->video_spatial_filter; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - ctrl->value = params->video_luma_spatial_filter_type; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - ctrl->value = params->video_chroma_spatial_filter_type; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - ctrl->value = params->video_temporal_filter_mode; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER: - ctrl->value = params->video_temporal_filter; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - ctrl->value = params->video_median_filter_type; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP: - ctrl->value = params->video_luma_median_filter_top; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM: - ctrl->value = params->video_luma_median_filter_bottom; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP: - ctrl->value = params->video_chroma_median_filter_top; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM: - ctrl->value = params->video_chroma_median_filter_bottom; - break; - default: - return -EINVAL; - } - return 0; -} - -/* Map the control ID to the correct field in the cx2341x_mpeg_params - struct. Return -EINVAL if the ID is unknown, else return 0. */ -static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params, - struct v4l2_ext_control *ctrl) -{ - switch (ctrl->id) { - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - params->audio_sampling_freq = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_ENCODING: - params->audio_encoding = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - params->audio_l2_bitrate = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_MODE: - params->audio_mode = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - params->audio_mode_extension = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_EMPHASIS: - params->audio_emphasis = ctrl->value; - break; - case V4L2_CID_MPEG_AUDIO_CRC: - params->audio_crc = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_ASPECT: - params->video_aspect = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_B_FRAMES: { - int b = ctrl->value + 1; - int gop = params->video_gop_size; - params->video_b_frames = ctrl->value; - params->video_gop_size = b * ((gop + b - 1) / b); - /* Max GOP size = 34 */ - while (params->video_gop_size > 34) - params->video_gop_size -= b; - break; - } - case V4L2_CID_MPEG_VIDEO_GOP_SIZE: { - int b = params->video_b_frames + 1; - int gop = ctrl->value; - params->video_gop_size = b * ((gop + b - 1) / b); - /* Max GOP size = 34 */ - while (params->video_gop_size > 34) - params->video_gop_size -= b; - ctrl->value = params->video_gop_size; - break; - } - case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: - params->video_gop_closure = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_PULLDOWN: - params->video_pulldown = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - /* MPEG-1 only allows CBR */ - if (params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1 && - ctrl->value != V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) - return -EINVAL; - params->video_bitrate_mode = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE: - params->video_bitrate = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: - params->video_bitrate_peak = ctrl->value; - break; - case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: - params->video_temporal_decimation = ctrl->value; - break; - case V4L2_CID_MPEG_STREAM_TYPE: - params->stream_type = ctrl->value; - params->video_encoding = - (params->stream_type == V4L2_MPEG_STREAM_TYPE_MPEG1_SS || - params->stream_type == V4L2_MPEG_STREAM_TYPE_MPEG1_VCD) ? - V4L2_MPEG_VIDEO_ENCODING_MPEG_1 : V4L2_MPEG_VIDEO_ENCODING_MPEG_2; - if (params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) { - /* MPEG-1 implies CBR */ - params->video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; - } - break; - case V4L2_CID_MPEG_STREAM_VBI_FMT: - params->stream_vbi_fmt = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - params->video_spatial_filter_mode = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: - params->video_spatial_filter = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - params->video_luma_spatial_filter_type = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - params->video_chroma_spatial_filter_type = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - params->video_temporal_filter_mode = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER: - params->video_temporal_filter = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - params->video_median_filter_type = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP: - params->video_luma_median_filter_top = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM: - params->video_luma_median_filter_bottom = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP: - params->video_chroma_median_filter_top = ctrl->value; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM: - params->video_chroma_median_filter_bottom = ctrl->value; - break; - default: - return -EINVAL; - } - return 0; -} - -static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def) -{ - const char *name; - - qctrl->flags = 0; - switch (qctrl->id) { - /* MPEG controls */ - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - name = "Spatial Filter Mode"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: - name = "Spatial Filter"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - name = "Spatial Luma Filter Type"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - name = "Spatial Chroma Filter Type"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - name = "Temporal Filter Mode"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER: - name = "Temporal Filter"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - name = "Median Filter Type"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP: - name = "Median Luma Filter Maximum"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM: - name = "Median Luma Filter Minimum"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP: - name = "Median Chroma Filter Maximum"; - break; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM: - name = "Median Chroma Filter Minimum"; - break; - - default: - return v4l2_ctrl_query_fill(qctrl, min, max, step, def); - } - switch (qctrl->id) { - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - qctrl->type = V4L2_CTRL_TYPE_MENU; - min = 0; - step = 1; - break; - default: - qctrl->type = V4L2_CTRL_TYPE_INTEGER; - break; - } - switch (qctrl->id) { - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - qctrl->flags |= V4L2_CTRL_FLAG_UPDATE; - break; - } - qctrl->minimum = min; - qctrl->maximum = max; - qctrl->step = step; - qctrl->default_value = def; - qctrl->reserved[0] = qctrl->reserved[1] = 0; - snprintf(qctrl->name, sizeof(qctrl->name), name); - return 0; -} - -int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl *qctrl) -{ - int err; - - switch (qctrl->id) { - case V4L2_CID_MPEG_AUDIO_ENCODING: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2, 1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2); - - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_L2_BITRATE_192K, - V4L2_MPEG_AUDIO_L2_BITRATE_384K, 1, - V4L2_MPEG_AUDIO_L2_BITRATE_224K); - - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: - return -EINVAL; - - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - err = v4l2_ctrl_query_fill_std(qctrl); - if (err == 0 && params->audio_mode != V4L2_MPEG_AUDIO_MODE_JOINT_STEREO) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return err; - - case V4L2_CID_MPEG_VIDEO_ENCODING: - /* this setting is read-only for the cx2341x since the - V4L2_CID_MPEG_STREAM_TYPE really determines the - MPEG-1/2 setting */ - err = v4l2_ctrl_query_fill_std(qctrl); - if (err == 0) - qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; - return err; - - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - err = v4l2_ctrl_query_fill_std(qctrl); - if (err == 0 && params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return err; - - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: - err = v4l2_ctrl_query_fill_std(qctrl); - if (err == 0 && params->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return err; - - case V4L2_CID_MPEG_STREAM_VBI_FMT: - if (params->capabilities & CX2341X_CAP_HAS_SLICED_VBI) - return v4l2_ctrl_query_fill_std(qctrl); - return cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_STREAM_VBI_FMT_NONE, - V4L2_MPEG_STREAM_VBI_FMT_NONE, 1, - V4L2_MPEG_STREAM_VBI_FMT_NONE); - - /* CX23415/6 specific */ - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - return cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO, 1, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL); - - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: - cx2341x_ctrl_query_fill(qctrl, 0, 15, 1, 0); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE, 1, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF); - if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR, 1, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF); - if (params->video_spatial_filter_mode == V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - return cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO, 1, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL); - - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER: - cx2341x_ctrl_query_fill(qctrl, 0, 31, 1, 0); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_temporal_filter_mode == V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - return cx2341x_ctrl_query_fill(qctrl, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG, 1, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF); - - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 255); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 0); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 255); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM: - cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, 0); - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - if (params->video_median_filter_type == V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF) - qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; - return 0; - - default: - return v4l2_ctrl_query_fill_std(qctrl); - - } -} - -const char **cx2341x_ctrl_get_menu(u32 id) -{ - static const char *mpeg_stream_type[] = { - "MPEG-2 Program Stream", - "", - "MPEG-1 System Stream", - "MPEG-2 DVD-compatible Stream", - "MPEG-1 VCD-compatible Stream", - "MPEG-2 SVCD-compatible Stream", - NULL - }; - - static const char *cx2341x_video_spatial_filter_mode_menu[] = { - "Manual", - "Auto", - NULL - }; - - static const char *cx2341x_video_luma_spatial_filter_type_menu[] = { - "Off", - "1D Horizontal", - "1D Vertical", - "2D H/V Separable", - "2D Symmetric non-separable", - NULL - }; - - static const char *cx2341x_video_chroma_spatial_filter_type_menu[] = { - "Off", - "1D Horizontal", - NULL - }; - - static const char *cx2341x_video_temporal_filter_mode_menu[] = { - "Manual", - "Auto", - NULL - }; - - static const char *cx2341x_video_median_filter_type_menu[] = { - "Off", - "Horizontal", - "Vertical", - "Horizontal/Vertical", - "Diagonal", - NULL - }; - - switch (id) { - case V4L2_CID_MPEG_STREAM_TYPE: - return mpeg_stream_type; - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: - return NULL; - case V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: - return cx2341x_video_spatial_filter_mode_menu; - case V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE: - return cx2341x_video_luma_spatial_filter_type_menu; - case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE: - return cx2341x_video_chroma_spatial_filter_type_menu; - case V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE: - return cx2341x_video_temporal_filter_mode_menu; - case V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE: - return cx2341x_video_median_filter_type_menu; - default: - return v4l2_ctrl_get_menu(id); - } -} - -static void cx2341x_calc_audio_properties(struct cx2341x_mpeg_params *params) -{ - params->audio_properties = (params->audio_sampling_freq << 0) | - ((3 - params->audio_encoding) << 2) | - ((1 + params->audio_l2_bitrate) << 4) | - (params->audio_mode << 8) | - (params->audio_mode_extension << 10) | - (((params->audio_emphasis == V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17) ? - 3 : - params->audio_emphasis) << 12) | - (params->audio_crc << 14); -} - -int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, - struct v4l2_ext_controls *ctrls, unsigned int cmd) -{ - int err = 0; - int i; - - if (cmd == VIDIOC_G_EXT_CTRLS) { - for (i = 0; i < ctrls->count; i++) { - struct v4l2_ext_control *ctrl = ctrls->controls + i; - - err = cx2341x_get_ctrl(params, ctrl); - if (err) { - ctrls->error_idx = i; - break; - } - } - return err; - } - for (i = 0; i < ctrls->count; i++) { - struct v4l2_ext_control *ctrl = ctrls->controls + i; - struct v4l2_queryctrl qctrl; - const char **menu_items = NULL; - - qctrl.id = ctrl->id; - err = cx2341x_ctrl_query(params, &qctrl); - if (err) - break; - if (qctrl.type == V4L2_CTRL_TYPE_MENU) - menu_items = cx2341x_ctrl_get_menu(qctrl.id); - err = v4l2_ctrl_check(ctrl, &qctrl, menu_items); - if (err) - break; - err = cx2341x_set_ctrl(params, ctrl); - if (err) - break; - } - if (err == 0 && params->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR && - params->video_bitrate_peak < params->video_bitrate) { - err = -ERANGE; - ctrls->error_idx = ctrls->count; - } - if (err) { - ctrls->error_idx = i; - } - else { - cx2341x_calc_audio_properties(params); - } - return err; -} - -void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p) -{ - static struct cx2341x_mpeg_params default_params = { - /* misc */ - .capabilities = 0, - .port = CX2341X_PORT_MEMORY, - .width = 720, - .height = 480, - .is_50hz = 0, - - /* stream */ - .stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS, - .stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE, - - /* audio */ - .audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000, - .audio_encoding = V4L2_MPEG_AUDIO_ENCODING_LAYER_2, - .audio_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_224K, - .audio_mode = V4L2_MPEG_AUDIO_MODE_STEREO, - .audio_mode_extension = V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4, - .audio_emphasis = V4L2_MPEG_AUDIO_EMPHASIS_NONE, - .audio_crc = V4L2_MPEG_AUDIO_CRC_NONE, - - /* video */ - .video_encoding = V4L2_MPEG_VIDEO_ENCODING_MPEG_2, - .video_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3, - .video_b_frames = 2, - .video_gop_size = 12, - .video_gop_closure = 1, - .video_pulldown = 0, - .video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, - .video_bitrate = 6000000, - .video_bitrate_peak = 8000000, - .video_temporal_decimation = 0, - - /* encoding filters */ - .video_spatial_filter_mode = V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL, - .video_spatial_filter = 0, - .video_luma_spatial_filter_type = V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR, - .video_chroma_spatial_filter_type = V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR, - .video_temporal_filter_mode = V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL, - .video_temporal_filter = 0, - .video_median_filter_type = V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF, - .video_luma_median_filter_top = 255, - .video_luma_median_filter_bottom = 0, - .video_chroma_median_filter_top = 255, - .video_chroma_median_filter_bottom = 0, - }; - - *p = default_params; - cx2341x_calc_audio_properties(p); -} - -static int cx2341x_api(void *priv, cx2341x_mbox_func func, int cmd, int args, ...) -{ - u32 data[CX2341X_MBOX_MAX_DATA]; - va_list vargs; - int i; - - va_start(vargs, args); - - for (i = 0; i < args; i++) { - data[i] = va_arg(vargs, int); - } - va_end(vargs); - return func(priv, cmd, args, 0, data); -} - -int cx2341x_update(void *priv, cx2341x_mbox_func func, - const struct cx2341x_mpeg_params *old, const struct cx2341x_mpeg_params *new) -{ - static int mpeg_stream_type[] = { - 0, /* MPEG-2 PS */ - 1, /* MPEG-2 TS */ - 2, /* MPEG-1 SS */ - 14, /* DVD */ - 11, /* VCD */ - 12, /* SVCD */ - }; - - int err = 0; - - cx2341x_api(priv, func, CX2341X_ENC_SET_OUTPUT_PORT, 2, new->port, 0); - - if (old == NULL || old->is_50hz != new->is_50hz) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_RATE, 1, new->is_50hz); - if (err) return err; - } - - if (old == NULL || old->width != new->width || old->height != new->height || - old->video_encoding != new->video_encoding) { - u16 w = new->width; - u16 h = new->height; - - if (new->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) { - w /= 2; - h /= 2; - } - err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_SIZE, 2, h, w); - if (err) return err; - } - - if (old == NULL || old->stream_type != new->stream_type) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_STREAM_TYPE, 1, mpeg_stream_type[new->stream_type]); - if (err) return err; - } - if (old == NULL || old->video_aspect != new->video_aspect) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_ASPECT_RATIO, 1, 1 + new->video_aspect); - if (err) return err; - } - if (old == NULL || old->video_b_frames != new->video_b_frames || - old->video_gop_size != new->video_gop_size) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_GOP_PROPERTIES, 2, - new->video_gop_size, new->video_b_frames + 1); - if (err) return err; - } - if (old == NULL || old->video_gop_closure != new->video_gop_closure) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_GOP_CLOSURE, 1, new->video_gop_closure); - if (err) return err; - } - if (old == NULL || old->video_pulldown != new->video_pulldown) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_3_2_PULLDOWN, 1, new->video_pulldown); - if (err) return err; - } - if (old == NULL || old->audio_properties != new->audio_properties) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, new->audio_properties); - if (err) return err; - } - if (old == NULL || old->video_bitrate_mode != new->video_bitrate_mode || - old->video_bitrate != new->video_bitrate || - old->video_bitrate_peak != new->video_bitrate_peak) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_BIT_RATE, 5, - new->video_bitrate_mode, new->video_bitrate, - new->video_bitrate_peak / 400, 0, 0); - if (err) return err; - } - if (old == NULL || old->video_spatial_filter_mode != new->video_spatial_filter_mode || - old->video_temporal_filter_mode != new->video_temporal_filter_mode || - old->video_median_filter_type != new->video_median_filter_type) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_DNR_FILTER_MODE, 2, - new->video_spatial_filter_mode | (new->video_temporal_filter_mode << 1), - new->video_median_filter_type); - if (err) return err; - } - if (old == NULL || - old->video_luma_median_filter_bottom != new->video_luma_median_filter_bottom || - old->video_luma_median_filter_top != new->video_luma_median_filter_top || - old->video_chroma_median_filter_bottom != new->video_chroma_median_filter_bottom || - old->video_chroma_median_filter_top != new->video_chroma_median_filter_top) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_CORING_LEVELS, 4, - new->video_luma_median_filter_bottom, - new->video_luma_median_filter_top, - new->video_chroma_median_filter_bottom, - new->video_chroma_median_filter_top); - if (err) return err; - } - if (old == NULL || - old->video_luma_spatial_filter_type != new->video_luma_spatial_filter_type || - old->video_chroma_spatial_filter_type != new->video_chroma_spatial_filter_type) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_SPATIAL_FILTER_TYPE, 2, - new->video_luma_spatial_filter_type, new->video_chroma_spatial_filter_type); - if (err) return err; - } - if (old == NULL || - old->video_spatial_filter != new->video_spatial_filter || - old->video_temporal_filter != new->video_temporal_filter) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_DNR_FILTER_PROPS, 2, - new->video_spatial_filter, new->video_temporal_filter); - if (err) return err; - } - if (old == NULL || old->video_temporal_decimation != new->video_temporal_decimation) { - err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_DROP_RATE, 1, - new->video_temporal_decimation); - if (err) return err; - } - return 0; -} - -static const char *cx2341x_menu_item(struct cx2341x_mpeg_params *p, u32 id) -{ - const char **menu = cx2341x_ctrl_get_menu(id); - struct v4l2_ext_control ctrl; - - if (menu == NULL) - goto invalid; - ctrl.id = id; - if (cx2341x_get_ctrl(p, &ctrl)) - goto invalid; - while (ctrl.value-- && *menu) menu++; - if (*menu == NULL) - goto invalid; - return *menu; - -invalid: - return ""; -} - -void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix) -{ - int is_mpeg1 = p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; - - /* Stream */ - printk(KERN_INFO "%s: Stream: %s\n", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE)); - - /* Video */ - printk(KERN_INFO "%s: Video: %dx%d, %d fps\n", - prefix, - p->width / (is_mpeg1 ? 2 : 1), p->height / (is_mpeg1 ? 2 : 1), - p->is_50hz ? 25 : 30); - printk(KERN_INFO "%s: Video: %s, %s, %s, %d", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING), - cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ASPECT), - cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_BITRATE_MODE), - p->video_bitrate); - if (p->video_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) { - printk(", Peak %d", p->video_bitrate_peak); - } - printk("\n"); - printk(KERN_INFO "%s: Video: GOP Size %d, %d B-Frames, %sGOP Closure, %s3:2 Pulldown\n", - prefix, - p->video_gop_size, p->video_b_frames, - p->video_gop_closure ? "" : "No ", - p->video_pulldown ? "" : "No "); - if (p->video_temporal_decimation) { - printk(KERN_INFO "%s: Video: Temporal Decimation %d\n", - prefix, p->video_temporal_decimation); - } - - /* Audio */ - printk(KERN_INFO "%s: Audio: %s, %s, %s, %s", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ), - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING), - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE), - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE)); - if (p->audio_mode == V4L2_MPEG_AUDIO_MODE_JOINT_STEREO) { - printk(", %s", - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE_EXTENSION)); - } - printk(", %s, %s\n", - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_EMPHASIS), - cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_CRC)); - - /* Encoding filters */ - printk(KERN_INFO "%s: Spatial Filter: %s, Luma %s, Chroma %s, %d\n", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE), - cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE), - cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE), - p->video_spatial_filter); - printk(KERN_INFO "%s: Temporal Filter: %s, %d\n", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE), - p->video_temporal_filter); - printk(KERN_INFO "%s: Median Filter: %s, Luma [%d, %d], Chroma [%d, %d]\n", - prefix, - cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE), - p->video_luma_median_filter_bottom, - p->video_luma_median_filter_top, - p->video_chroma_median_filter_bottom, - p->video_chroma_median_filter_top); -} - -EXPORT_SYMBOL(cx2341x_fill_defaults); -EXPORT_SYMBOL(cx2341x_ctrl_query); -EXPORT_SYMBOL(cx2341x_ctrl_get_menu); -EXPORT_SYMBOL(cx2341x_ext_ctrls); -EXPORT_SYMBOL(cx2341x_update); -EXPORT_SYMBOL(cx2341x_log_status); -EXPORT_SYMBOL(cx2341x_mpeg_ctrls); - -/* - * Local variables: - * c-basic-offset: 8 - * End: - */ - diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c index f897c1ebd..9a4b81315 100644 --- a/drivers/media/video/cx25840/cx25840-audio.c +++ b/drivers/media/video/cx25840/cx25840-audio.c @@ -30,6 +30,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) if (freq != 32000 && freq != 44100 && freq != 48000) return -EINVAL; + /* assert soft reset */ + cx25840_and_or(client, 0x810, ~0x1, 0x01); + /* common for all inputs and rates */ /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x10 */ cx25840_write(client, 0x127, 0x50); @@ -43,9 +46,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xee39bb01); - if (state->is_cx25836) - break; - /* src3/4/6_ctl = 0x0801f77f */ cx25840_write4(client, 0x900, 0x7ff70108); cx25840_write4(client, 0x904, 0x7ff70108); @@ -59,9 +59,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xd66bec00); - if (state->is_cx25836) - break; - /* src3/4/6_ctl = 0x08016d59 */ cx25840_write4(client, 0x900, 0x596d0108); cx25840_write4(client, 0x904, 0x596d0108); @@ -75,9 +72,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xe5d69800); - if (state->is_cx25836) - break; - /* src3/4/6_ctl = 0x08014faa */ cx25840_write4(client, 0x900, 0xaa4f0108); cx25840_write4(client, 0x904, 0xaa4f0108); @@ -93,9 +87,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0x69082a01); - if (state->is_cx25836) - break; - /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0x00000108); @@ -115,9 +106,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xd66bec00); - if (state->is_cx25836) - break; - /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0xcd600108); @@ -134,9 +122,6 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) /* AUX_PLL_FRAC */ cx25840_write4(client, 0x110, 0xe5d69800); - if (state->is_cx25836) - break; - /* src1_ctl = 0x08010000 */ cx25840_write4(client, 0x8f8, 0x00800108); @@ -148,6 +133,9 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq) } } + /* deassert soft reset */ + cx25840_and_or(client, 0x810, ~0x1, 0x00); + state->audclk_freq = freq; return 0; @@ -160,10 +148,6 @@ void cx25840_audio_set_path(struct i2c_client *client) /* stop microcontroller */ cx25840_and_or(client, 0x803, ~0x10, 0); - /* assert soft reset */ - if (!state->is_cx25836) - cx25840_and_or(client, 0x810, ~0x1, 0x01); - /* Mute everything to prevent the PFFT! */ cx25840_write(client, 0x8d3, 0x1f); @@ -177,19 +161,13 @@ void cx25840_audio_set_path(struct i2c_client *client) } else { /* Set Path1 to Analog Demod Main Channel */ cx25840_write4(client, 0x8d0, 0x7038061f); - } - set_audclk_freq(client, state->audclk_freq); - - /* deassert soft reset */ - if (!state->is_cx25836) - cx25840_and_or(client, 0x810, ~0x1, 0x00); - - if (state->aud_input != CX25840_AUDIO_SERIAL) { /* When the microcontroller detects the * audio format, it will unmute the lines */ cx25840_and_or(client, 0x803, ~0x10, 0x10); } + + set_audclk_freq(client, state->audclk_freq); } static int get_volume(struct i2c_client *client) @@ -313,25 +291,11 @@ static void set_mute(struct i2c_client *client, int mute) int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg) { - struct cx25840_state *state = i2c_get_clientdata(client); struct v4l2_control *ctrl = arg; - int retval; switch (cmd) { case VIDIOC_INT_AUDIO_CLOCK_FREQ: - if (state->aud_input != CX25840_AUDIO_SERIAL) { - cx25840_and_or(client, 0x803, ~0x10, 0); - cx25840_write(client, 0x8d3, 0x1f); - } - if (!state->is_cx25836) - cx25840_and_or(client, 0x810, ~0x1, 1); - retval = set_audclk_freq(client, *(u32 *)arg); - if (!state->is_cx25836) - cx25840_and_or(client, 0x810, ~0x1, 0); - if (state->aud_input != CX25840_AUDIO_SERIAL) { - cx25840_and_or(client, 0x803, ~0x10, 0x10); - } - return retval; + return set_audclk_freq(client, *(u32 *)arg); case VIDIOC_G_CTRL: switch (ctrl->id) { diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 7bb7589a0..a961bb2ab 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -10,9 +10,6 @@ * * VBI support by Hans Verkuil . * - * NTSC sliced VBI support by Christopher Neufeld - * with additional fixes by Hans Verkuil . - * * 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 @@ -46,7 +43,7 @@ MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; -int cx25840_debug; +static int cx25840_debug; module_param_named(debug,cx25840_debug, int, 0644); @@ -104,11 +101,11 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr) if (i2c_master_recv(client, buffer, 4) < 4) return 0; - return (buffer[3] << 24) | (buffer[2] << 16) | - (buffer[1] << 8) | buffer[0]; + return (buffer[0] << 24) | (buffer[1] << 16) | + (buffer[2] << 8) | buffer[3]; } -int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, +int cx25840_and_or(struct i2c_client *client, u16 addr, u8 and_mask, u8 or_value) { return cx25840_write(client, addr, @@ -120,8 +117,7 @@ int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, static int set_input(struct i2c_client *client, enum cx25840_video_input vid_input, enum cx25840_audio_input aud_input); -static void log_audio_status(struct i2c_client *client); -static void log_video_status(struct i2c_client *client); +static void log_status(struct i2c_client *client); /* ----------------------------------------------------------------------- */ @@ -151,33 +147,6 @@ static void init_dll2(struct i2c_client *client) cx25840_write(client, 0x15d, 0xe1); } -static void cx25836_initialize(struct i2c_client *client) -{ - /* reset configuration is described on page 3-77 of the CX25836 datasheet */ - /* 2. */ - cx25840_and_or(client, 0x000, ~0x01, 0x01); - cx25840_and_or(client, 0x000, ~0x01, 0x00); - /* 3a. */ - cx25840_and_or(client, 0x15a, ~0x70, 0x00); - /* 3b. */ - cx25840_and_or(client, 0x15b, ~0x1e, 0x06); - /* 3c. */ - cx25840_and_or(client, 0x159, ~0x02, 0x02); - /* 3d. */ - /* There should be a 10-us delay here, but since the - i2c bus already has a 10-us delay we don't need to do - anything */ - /* 3e. */ - cx25840_and_or(client, 0x159, ~0x02, 0x00); - /* 3f. */ - cx25840_and_or(client, 0x159, ~0xc0, 0xc0); - /* 3g. */ - cx25840_and_or(client, 0x159, ~0x01, 0x00); - cx25840_and_or(client, 0x159, ~0x01, 0x01); - /* 3h. */ - cx25840_and_or(client, 0x15b, ~0x1e, 0x10); -} - static void cx25840_initialize(struct i2c_client *client, int loadfw) { struct cx25840_state *state = i2c_get_clientdata(client); @@ -251,7 +220,17 @@ static void input_change(struct i2c_client *client) cx25840_and_or(client, 0x401, ~0x60, 0); cx25840_and_or(client, 0x401, ~0x60, 0x60); - if (std & V4L2_STD_525_60) { + /* Note: perhaps V4L2_STD_PAL_M should be handled as V4L2_STD_NTSC + instead of V4L2_STD_PAL. Someone needs to test this. */ + if (std & V4L2_STD_PAL) { + /* Follow tuner change procedure for PAL */ + cx25840_write(client, 0x808, 0xff); + cx25840_write(client, 0x80b, 0x10); + } else if (std & V4L2_STD_SECAM) { + /* Select autodetect for SECAM */ + cx25840_write(client, 0x808, 0xff); + cx25840_write(client, 0x80b, 0x10); + } else if (std & V4L2_STD_NTSC) { /* Certain Hauppauge PVR150 models have a hardware bug that causes audio to drop out. For these models the audio standard must be set explicitly. @@ -270,14 +249,6 @@ static void input_change(struct i2c_client *client) cx25840_write(client, 0x808, hw_fix ? 0x1f : 0xf6); } cx25840_write(client, 0x80b, 0x00); - } else if (std & V4L2_STD_PAL) { - /* Follow tuner change procedure for PAL */ - cx25840_write(client, 0x808, 0xff); - cx25840_write(client, 0x80b, 0x10); - } else if (std & V4L2_STD_SECAM) { - /* Select autodetect for SECAM */ - cx25840_write(client, 0x808, 0xff); - cx25840_write(client, 0x80b, 0x10); } if (cx25840_read(client, 0x803) & 0x10) { @@ -348,10 +319,8 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp state->vid_input = vid_input; state->aud_input = aud_input; - if (!state->is_cx25836) { - cx25840_audio_set_path(client); - input_change(client); - } + cx25840_audio_set_path(client); + input_change(client); return 0; } @@ -385,8 +354,6 @@ static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) } } - v4l_dbg(1, cx25840_debug, client, "changing video std to fmt %i\n",fmt); - /* Follow step 9 of section 3.16 in the cx25840 datasheet. Without this PAL may display a vertical ghosting effect. This happens for example with the Yuan MPC622. */ @@ -403,7 +370,6 @@ static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) v4l2_std_id cx25840_get_v4lstd(struct i2c_client * client) { - struct cx25840_state *state = i2c_get_clientdata(client); /* check VID_FMT_SEL first */ u8 fmt = cx25840_read(client, 0x400) & 0xf; @@ -417,7 +383,7 @@ v4l2_std_id cx25840_get_v4lstd(struct i2c_client * client) { /* if the audio std is A2-M, then this is the South Korean NTSC standard */ - if (!state->is_cx25836 && cx25840_read(client, 0x805) == 2) + if (cx25840_read(client, 0x805) == 2) return V4L2_STD_NTSC_M_KR; return V4L2_STD_NTSC_M; } @@ -490,8 +456,6 @@ static int set_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl) case V4L2_CID_AUDIO_TREBLE: case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_MUTE: - if (state->is_cx25836) - return -EINVAL; return cx25840_audio(client, VIDIOC_S_CTRL, ctrl); default: @@ -526,8 +490,6 @@ static int get_v4lctrl(struct i2c_client *client, struct v4l2_control *ctrl) case V4L2_CID_AUDIO_TREBLE: case V4L2_CID_AUDIO_BALANCE: case V4L2_CID_AUDIO_MUTE: - if (state->is_cx25836) - return -EINVAL; return cx25840_audio(client, VIDIOC_G_CTRL, ctrl); default: return -EINVAL; @@ -617,6 +579,91 @@ static int set_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt) /* ----------------------------------------------------------------------- */ +static struct v4l2_queryctrl cx25840_qctrl[] = { + { + .id = V4L2_CID_BRIGHTNESS, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Brightness", + .minimum = 0, + .maximum = 255, + .step = 1, + .default_value = 128, + .flags = 0, + }, { + .id = V4L2_CID_CONTRAST, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Contrast", + .minimum = 0, + .maximum = 127, + .step = 1, + .default_value = 64, + .flags = 0, + }, { + .id = V4L2_CID_SATURATION, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Saturation", + .minimum = 0, + .maximum = 127, + .step = 1, + .default_value = 64, + .flags = 0, + }, { + .id = V4L2_CID_HUE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Hue", + .minimum = -128, + .maximum = 127, + .step = 1, + .default_value = 0, + .flags = 0, + }, { + .id = V4L2_CID_AUDIO_VOLUME, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Volume", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 58880, + .flags = 0, + }, { + .id = V4L2_CID_AUDIO_BALANCE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Balance", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + .flags = 0, + }, { + .id = V4L2_CID_AUDIO_MUTE, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "Mute", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1, + .flags = 0, + }, { + .id = V4L2_CID_AUDIO_BASS, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Bass", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + }, { + .id = V4L2_CID_AUDIO_TREBLE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Treble", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + }, +}; + +/* ----------------------------------------------------------------------- */ + static int cx25840_command(struct i2c_client *client, unsigned int cmd, void *arg) { @@ -659,8 +706,8 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, case VIDIOC_STREAMON: v4l_dbg(1, cx25840_debug, client, "enable output\n"); - cx25840_write(client, 0x115, state->is_cx25836 ? 0x0c : 0x8c); - cx25840_write(client, 0x116, state->is_cx25836 ? 0x04 : 0x07); + cx25840_write(client, 0x115, 0x8c); + cx25840_write(client, 0x116, 0x07); break; case VIDIOC_STREAMOFF: @@ -670,9 +717,7 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, break; case VIDIOC_LOG_STATUS: - log_video_status(client); - if (!state->is_cx25836) - log_audio_status(client); + log_status(client); break; case VIDIOC_G_CTRL: @@ -684,29 +729,13 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, case VIDIOC_QUERYCTRL: { struct v4l2_queryctrl *qc = arg; + int i; - switch (qc->id) { - case V4L2_CID_BRIGHTNESS: - case V4L2_CID_CONTRAST: - case V4L2_CID_SATURATION: - case V4L2_CID_HUE: - return v4l2_ctrl_query_fill_std(qc); - default: - break; - } - if (state->is_cx25836) - return -EINVAL; - - switch (qc->id) { - case V4L2_CID_AUDIO_VOLUME: - case V4L2_CID_AUDIO_MUTE: - case V4L2_CID_AUDIO_BALANCE: - case V4L2_CID_AUDIO_BASS: - case V4L2_CID_AUDIO_TREBLE: - return v4l2_ctrl_query_fill_std(qc); - default: - return -EINVAL; - } + for (i = 0; i < ARRAY_SIZE(cx25840_qctrl); i++) + if (qc->id && qc->id == cx25840_qctrl[i].id) { + memcpy(qc, &cx25840_qctrl[i], sizeof(*qc)); + return 0; + } return -EINVAL; } @@ -731,41 +760,31 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, return set_input(client, route->input, state->aud_input); case VIDIOC_INT_G_AUDIO_ROUTING: - if (state->is_cx25836) - return -EINVAL; route->input = state->aud_input; route->output = 0; break; case VIDIOC_INT_S_AUDIO_ROUTING: - if (state->is_cx25836) - return -EINVAL; return set_input(client, state->vid_input, route->input); case VIDIOC_S_FREQUENCY: - if (!state->is_cx25836) { - input_change(client); - } + input_change(client); break; case VIDIOC_G_TUNER: { - u8 vpres = cx25840_read(client, 0x40e) & 0x20; - u8 mode; + u8 mode = cx25840_read(client, 0x804); + u8 vpres = cx25840_read(client, 0x80a) & 0x10; int val = 0; if (state->radio) break; - vt->signal = vpres ? 0xffff : 0x0; - if (state->is_cx25836) - break; - vt->capability |= V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2 | V4L2_TUNER_CAP_SAP; - mode = cx25840_read(client, 0x804); + vt->signal = vpres ? 0xffff : 0x0; /* get rxsubchans and audmode */ if ((mode & 0xf) == 1) @@ -785,7 +804,7 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, } case VIDIOC_S_TUNER: - if (state->radio || state->is_cx25836) + if (state->radio) break; switch (vt->audmode) { @@ -827,14 +846,12 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, return set_v4lfmt(client, (struct v4l2_format *)arg); case VIDIOC_INT_RESET: - if (state->is_cx25836) - cx25836_initialize(client); - else - cx25840_initialize(client, 0); + cx25840_initialize(client, 0); break; case VIDIOC_INT_G_CHIP_IDENT: - *(enum v4l2_chip_ident *)arg = state->id; + *(enum v4l2_chip_ident *)arg = + V4L2_IDENT_CX25840 + ((cx25840_read(client, 0x100) >> 4) & 0xf); break; default: @@ -853,7 +870,6 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, { struct i2c_client *client; struct cx25840_state *state; - enum v4l2_chip_ident id; u16 device_id; /* Check if the adapter supports the needed features @@ -862,11 +878,10 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) return 0; - state = kzalloc(sizeof(struct cx25840_state), GFP_KERNEL); - if (state == 0) + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); + if (client == 0) return -ENOMEM; - client = &state->c; client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_cx25840; @@ -878,18 +893,10 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, device_id |= cx25840_read(client, 0x100); /* The high byte of the device ID should be - * 0x83 for the cx2583x and 0x84 for the cx2584x */ - if ((device_id & 0xff00) == 0x8300) { - id = V4L2_IDENT_CX25836 + ((device_id >> 4) & 0xf) - 6; - state->is_cx25836 = 1; - } - else if ((device_id & 0xff00) == 0x8400) { - id = V4L2_IDENT_CX25840 + ((device_id >> 4) & 0xf); - state->is_cx25836 = 0; - } - else { + * 0x84 if chip is present */ + if ((device_id & 0xff00) != 0x8400) { v4l_dbg(1, cx25840_debug, client, "cx25840 not found\n"); - kfree(state); + kfree(client); return 0; } @@ -898,19 +905,21 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, (device_id & 0x0f) < 3 ? (device_id & 0x0f) + 1 : 3, address << 1, adapter->name); + state = kmalloc(sizeof(struct cx25840_state), GFP_KERNEL); + if (state == NULL) { + kfree(client); + return -ENOMEM; + } + i2c_set_clientdata(client, state); + memset(state, 0, sizeof(struct cx25840_state)); state->vid_input = CX25840_COMPOSITE7; state->aud_input = CX25840_AUDIO8; state->audclk_freq = 48000; state->pvr150_workaround = 0; state->audmode = V4L2_TUNER_MODE_LANG1; - state->vbi_line_offset = 8; - state->id = id; - if (state->is_cx25836) - cx25836_initialize(client); - else - cx25840_initialize(client, 1); + cx25840_initialize(client, 1); i2c_attach_client(client); @@ -935,6 +944,7 @@ static int cx25840_detach_client(struct i2c_client *client) } kfree(state); + kfree(client); return 0; } @@ -967,7 +977,7 @@ module_exit(m__exit); /* ----------------------------------------------------------------------- */ -static void log_video_status(struct i2c_client *client) +static void log_status(struct i2c_client *client) { static const char *const fmt_strs[] = { "0x0", @@ -979,36 +989,9 @@ static void log_video_status(struct i2c_client *client) }; struct cx25840_state *state = i2c_get_clientdata(client); + u8 microctrl_vidfmt = cx25840_read(client, 0x80a); u8 vidfmt_sel = cx25840_read(client, 0x400) & 0xf; u8 gen_stat1 = cx25840_read(client, 0x40d); - u8 gen_stat2 = cx25840_read(client, 0x40e); - int vid_input = state->vid_input; - - v4l_info(client, "Video signal: %spresent\n", - (gen_stat2 & 0x20) ? "" : "not "); - v4l_info(client, "Detected format: %s\n", - fmt_strs[gen_stat1 & 0xf]); - - v4l_info(client, "Specified standard: %s\n", - vidfmt_sel ? fmt_strs[vidfmt_sel] : "automatic detection"); - - if (vid_input >= CX25840_COMPOSITE1 && - vid_input <= CX25840_COMPOSITE8) { - v4l_info(client, "Specified video input: Composite %d\n", - vid_input - CX25840_COMPOSITE1 + 1); - } else { - v4l_info(client, "Specified video input: S-Video (Luma In%d, Chroma In%d)\n", - (vid_input & 0xf0) >> 4, (vid_input & 0xf00) >> 8); - } - - v4l_info(client, "Specified audioclock freq: %d Hz\n", state->audclk_freq); -} - -/* ----------------------------------------------------------------------- */ - -static void log_audio_status(struct i2c_client *client) -{ - struct cx25840_state *state = i2c_get_clientdata(client); u8 download_ctl = cx25840_read(client, 0x803); u8 mod_det_stat0 = cx25840_read(client, 0x804); u8 mod_det_stat1 = cx25840_read(client, 0x805); @@ -1016,9 +999,15 @@ static void log_audio_status(struct i2c_client *client) u8 pref_mode = cx25840_read(client, 0x809); u8 afc0 = cx25840_read(client, 0x80b); u8 mute_ctl = cx25840_read(client, 0x8d3); + int vid_input = state->vid_input; int aud_input = state->aud_input; char *p; + v4l_info(client, "Video signal: %spresent\n", + (microctrl_vidfmt & 0x10) ? "" : "not "); + v4l_info(client, "Detected format: %s\n", + fmt_strs[gen_stat1 & 0xf]); + switch (mod_det_stat0) { case 0x00: p = "mono"; break; case 0x01: p = "stereo"; break; @@ -1118,12 +1107,25 @@ static void log_audio_status(struct i2c_client *client) v4l_info(client, "Configured audio system: %s\n", p); } + v4l_info(client, "Specified standard: %s\n", + vidfmt_sel ? fmt_strs[vidfmt_sel] : "automatic detection"); + + if (vid_input >= CX25840_COMPOSITE1 && + vid_input <= CX25840_COMPOSITE8) { + v4l_info(client, "Specified video input: Composite %d\n", + vid_input - CX25840_COMPOSITE1 + 1); + } else { + v4l_info(client, "Specified video input: S-Video (Luma In%d, Chroma In%d)\n", + (vid_input & 0xf0) >> 4, (vid_input & 0xf00) >> 8); + } if (aud_input) { v4l_info(client, "Specified audio input: Tuner (In%d)\n", aud_input); } else { v4l_info(client, "Specified audio input: External\n"); } + v4l_info(client, "Specified audioclock freq: %d Hz\n", state->audclk_freq); + switch (pref_mode & 0xf) { case 0: p = "mono/language A"; break; case 1: p = "language B"; break; diff --git a/drivers/media/video/cx25840/cx25840-core.h b/drivers/media/video/cx25840/cx25840-core.h index 28049064d..1736929fc 100644 --- a/drivers/media/video/cx25840/cx25840-core.h +++ b/drivers/media/video/cx25840/cx25840-core.h @@ -24,8 +24,6 @@ #include #include -extern int cx25840_debug; - /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is present in Hauppauge PVR-150 (and possibly PVR-500) cards that have certain NTSC tuners (tveeprom tuner model numbers 85, 99 and 112). The @@ -35,16 +33,12 @@ extern int cx25840_debug; #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) struct cx25840_state { - struct i2c_client c; int pvr150_workaround; int radio; enum cx25840_video_input vid_input; enum cx25840_audio_input aud_input; u32 audclk_freq; int audmode; - int vbi_line_offset; - enum v4l2_chip_ident id; - int is_cx25836; }; /* ----------------------------------------------------------------------- */ @@ -53,7 +47,7 @@ int cx25840_write(struct i2c_client *client, u16 addr, u8 value); int cx25840_write4(struct i2c_client *client, u16 addr, u32 value); u8 cx25840_read(struct i2c_client *client, u16 addr); u32 cx25840_read4(struct i2c_client *client, u16 addr); -int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned mask, u8 value); +int cx25840_and_or(struct i2c_client *client, u16 addr, u8 mask, u8 value); v4l2_std_id cx25840_get_v4lstd(struct i2c_client *client); /* ----------------------------------------------------------------------- */ diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c index 6cc8bf215..57feca288 100644 --- a/drivers/media/video/cx25840/cx25840-vbi.c +++ b/drivers/media/video/cx25840/cx25840-vbi.c @@ -84,140 +84,67 @@ static int decode_vps(u8 * dst, u8 * p) void cx25840_vbi_setup(struct i2c_client *client) { - struct cx25840_state *state = i2c_get_clientdata(client); v4l2_std_id std = cx25840_get_v4lstd(client); - int hblank,hactive,burst,vblank,vactive,sc,vblank656,src_decimation; - int luma_lpf,uv_lpf, comb; - u32 pll_int,pll_frac,pll_post; - /* datasheet startup, step 8d */ if (std & ~V4L2_STD_NTSC) { + /* datasheet startup, step 8d */ cx25840_write(client, 0x49f, 0x11); - } else { - cx25840_write(client, 0x49f, 0x14); - } - if (std & V4L2_STD_625_50) { - hblank=0x084; - hactive=0x2d0; - burst=0x5d; - vblank=0x024; - vactive=0x244; - vblank656=0x28; - src_decimation=0x21f; + cx25840_write(client, 0x470, 0x84); + cx25840_write(client, 0x471, 0x00); + cx25840_write(client, 0x472, 0x2d); + cx25840_write(client, 0x473, 0x5d); + + cx25840_write(client, 0x474, 0x24); + cx25840_write(client, 0x475, 0x40); + cx25840_write(client, 0x476, 0x24); + cx25840_write(client, 0x477, 0x28); + + cx25840_write(client, 0x478, 0x1f); + cx25840_write(client, 0x479, 0x02); - luma_lpf=2; if (std & V4L2_STD_SECAM) { - uv_lpf=0; - comb=0; - sc=0x0a425f; - } else { - uv_lpf=1; - comb=0x20; - sc=0x0a8263; - } - } else { - hactive=720; - hblank=122; - vactive=487; - luma_lpf=1; - uv_lpf=1; - - src_decimation=0x21f; - if (std == V4L2_STD_PAL_M) { - vblank=20; - vblank656=24; - burst=0x61; - comb=0x20; - - sc=555452; + cx25840_write(client, 0x47a, 0x80); + cx25840_write(client, 0x47b, 0x00); + cx25840_write(client, 0x47c, 0x5f); + cx25840_write(client, 0x47d, 0x42); } else { - vblank=26; - vblank656=26; - burst=0x5b; - comb=0x66; - sc=556063; + cx25840_write(client, 0x47a, 0x90); + cx25840_write(client, 0x47b, 0x20); + cx25840_write(client, 0x47c, 0x63); + cx25840_write(client, 0x47d, 0x82); } - } - - /* DEBUG: Displays configured PLL frequency */ - pll_int=cx25840_read(client, 0x108); - pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff; - pll_post=cx25840_read(client, 0x109); - v4l_dbg(1, cx25840_debug, client, - "PLL regs = int: %u, frac: %u, post: %u\n", - pll_int,pll_frac,pll_post); - - if (pll_post) { - int fin, fsc; - int pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L; - - pll/=pll_post; - v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n", - pll/1000000, pll%1000000); - v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n", - pll/8000000, (pll/8)%1000000); - - fin=((u64)src_decimation*pll)>>12; - v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = " - "%d.%06d MHz\n", - fin/1000000,fin%1000000); - - fsc= (((u64)sc)*pll) >> 24L; - v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = " - "%d.%06d MHz\n", - fsc/1000000,fsc%1000000); - - v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, " - "vblank %i , vactive %i, vblank656 %i, src_dec %i," - "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x," - " sc 0x%06x\n", - hblank, hactive, vblank, vactive, vblank656, - src_decimation, burst, luma_lpf, uv_lpf, comb, sc); - } - - /* Sets horizontal blanking delay and active lines */ - cx25840_write(client, 0x470, hblank); - cx25840_write(client, 0x471, 0xff&(((hblank>>8)&0x3)|(hactive <<4))); - cx25840_write(client, 0x472, hactive>>4); - /* Sets burst gate delay */ - cx25840_write(client, 0x473, burst); - - /* Sets vertical blanking delay and active duration */ - cx25840_write(client, 0x474, vblank); - cx25840_write(client, 0x475, 0xff&(((vblank>>8)&0x3)|(vactive <<4))); - cx25840_write(client, 0x476, vactive>>4); - cx25840_write(client, 0x477, vblank656); - - /* Sets src decimation rate */ - cx25840_write(client, 0x478, 0xff&src_decimation); - cx25840_write(client, 0x479, 0xff&(src_decimation>>8)); + cx25840_write(client, 0x47e, 0x0a); + cx25840_write(client, 0x47f, 0x01); + } else { + /* datasheet startup, step 8d */ + cx25840_write(client, 0x49f, 0x14); - /* Sets Luma and UV Low pass filters */ - cx25840_write(client, 0x47a, luma_lpf<<6|((uv_lpf<<4)&0x30)); + cx25840_write(client, 0x470, 0x7a); + cx25840_write(client, 0x471, 0x00); + cx25840_write(client, 0x472, 0x2d); + cx25840_write(client, 0x473, 0x5b); - /* Enables comb filters */ - cx25840_write(client, 0x47b, comb); + cx25840_write(client, 0x474, 0x1a); + cx25840_write(client, 0x475, 0x70); + cx25840_write(client, 0x476, 0x1e); + cx25840_write(client, 0x477, 0x1e); - /* Sets SC Step*/ - cx25840_write(client, 0x47c, sc); - cx25840_write(client, 0x47d, 0xff&sc>>8); - cx25840_write(client, 0x47e, 0xff&sc>>16); + cx25840_write(client, 0x478, 0x1f); + cx25840_write(client, 0x479, 0x02); + cx25840_write(client, 0x47a, 0x50); + cx25840_write(client, 0x47b, 0x66); - /* Sets VBI parameters */ - if (std & V4L2_STD_625_50) { - cx25840_write(client, 0x47f, 0x01); - state->vbi_line_offset = 5; - } else { + cx25840_write(client, 0x47c, 0x1f); + cx25840_write(client, 0x47d, 0x7c); + cx25840_write(client, 0x47e, 0x08); cx25840_write(client, 0x47f, 0x00); - state->vbi_line_offset = 8; } } int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) { - struct cx25840_state *state = i2c_get_clientdata(client); struct v4l2_format *fmt; struct v4l2_sliced_vbi_format *svbi; @@ -255,7 +182,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) case VIDIOC_S_FMT: { - int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60); + int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_NTSC); int vbi_offset = is_pal ? 1 : 0; int i, x; u8 lcr[24]; @@ -284,7 +211,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) cx25840_vbi_setup(client); /* Sliced VBI */ - cx25840_write(client, 0x404, 0x32); /* Ancillary data */ + cx25840_write(client, 0x404, 0x36); /* Ancillery data */ cx25840_write(client, 0x406, 0x13); cx25840_write(client, 0x47f, vbi_offset); @@ -321,18 +248,8 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) } } - if (is_pal) { - for (x = 1, i = 0x424; i <= 0x434; i++, x++) { - cx25840_write(client, i, lcr[6 + x]); - } - } - else { - for (x = 1, i = 0x424; i <= 0x430; i++, x++) { - cx25840_write(client, i, lcr[9 + x]); - } - for (i = 0x431; i <= 0x434; i++) { - cx25840_write(client, i, 0); - } + for (x = 1, i = 0x424; i <= 0x434; i++, x++) { + cx25840_write(client, i, lcr[6 + x]); } cx25840_write(client, 0x43c, 0x16); @@ -340,7 +257,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) if (is_pal) { cx25840_write(client, 0x474, 0x2a); } else { - cx25840_write(client, 0x474, 0x22); + cx25840_write(client, 0x474, 0x1a + 6); } break; } @@ -361,7 +278,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg) id1 = p[-1]; id2 = p[0] & 0xf; l = p[2] & 0x3f; - l += state->vbi_line_offset; + l += 5; p += 4; switch (id2) { diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 7a94e6a11..630273992 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig @@ -35,26 +35,13 @@ config VIDEO_CX88_ALSA To compile this driver as a module, choose M here: the module will be called cx88-alsa. -config VIDEO_CX88_BLACKBIRD - tristate "Blackbird MPEG encoder support (cx2388x + cx23416)" - depends on VIDEO_CX88 - select VIDEO_CX2341X - ---help--- - This adds support for MPEG encoder cards based on the - Blackbird reference design, using the Conexant 2388x - and 23416 chips. - - To compile this driver as a module, choose M here: the - module will be called cx88-blackbird. - config VIDEO_CX88_DVB tristate "DVB/ATSC Support for cx2388x based TV cards" depends on VIDEO_CX88 && DVB_CORE select VIDEO_BUF_DVB - select DVB_PLL ---help--- This adds support for DVB/ATSC cards based on the - Conexant 2388x chip. + Connexant 2388x chip. To compile this driver as a module, choose M here: the module will be called cx88-dvb. @@ -74,7 +61,6 @@ config VIDEO_CX88_DVB_ALL_FRONTENDS select DVB_LGDT330X select DVB_NXT200X select DVB_CX24123 - select DVB_ISL6421 ---help--- This builds cx88-dvb with all currently supported frontend demodulators. If you wish to tweak your configuration, and @@ -153,7 +139,6 @@ config VIDEO_CX88_DVB_CX24123 default y depends on VIDEO_CX88_DVB && !VIDEO_CX88_DVB_ALL_FRONTENDS select DVB_CX24123 - select DVB_ISL6421 ---help--- This adds DVB-S support for cards based on the Connexant 2388x chip and the CX24123 demodulator. diff --git a/drivers/media/video/cx88/Makefile b/drivers/media/video/cx88/Makefile index 352b919f3..0dcd09b9b 100644 --- a/drivers/media/video/cx88/Makefile +++ b/drivers/media/video/cx88/Makefile @@ -3,10 +3,9 @@ cx88xx-objs := cx88-cards.o cx88-core.o cx88-i2c.o cx88-tvaudio.o \ cx8800-objs := cx88-video.o cx88-vbi.o cx8802-objs := cx88-mpeg.o -obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o cx8802.o -obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o -obj-$(CONFIG_VIDEO_CX88_BLACKBIRD) += cx88-blackbird.o +obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o cx8802.o cx88-blackbird.o obj-$(CONFIG_VIDEO_CX88_DVB) += cx88-dvb.o +obj-$(CONFIG_VIDEO_CX88_ALSA) += cx88-alsa.o obj-$(CONFIG_VIDEO_CX88_VP3054) += cx88-vp3054-i2c.o EXTRA_CFLAGS += -Idrivers/media/video diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index f0340662e..320b3d938 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c @@ -4,7 +4,7 @@ * PCI function #1 of the cx2388x. * * (c) 2005,2006 Ricardo Cerqueira - * (c) 2005 Mauro Carvalho Chehab + * (c) 2005 Mauro Carvalho Chehab * Based on a dummy cx88 module by Gerd Knorr * Based on dummy.c by Jaroslav Kysela * @@ -111,7 +111,7 @@ MODULE_PARM_DESC(index, "Index value for cx88x capture interface(s)."); MODULE_DESCRIPTION("ALSA driver module for cx2388x based TV cards"); MODULE_AUTHOR("Ricardo Cerqueira"); -MODULE_AUTHOR("Mauro Carvalho Chehab "); +MODULE_AUTHOR("Mauro Carvalho Chehab "); MODULE_LICENSE("GPL"); MODULE_SUPPORTED_DEVICE("{{Conexant,23881}," "{{Conexant,23882}," @@ -696,11 +696,12 @@ static int __devinit snd_cx88_create(struct snd_card *card, chip->irq = -1; spin_lock_init(&chip->reg_lock); + cx88_reset(core); chip->core = core; /* get irq */ err = request_irq(chip->pci->irq, cx8801_irq, - IRQF_SHARED | IRQF_DISABLED, chip->core->name, chip); + SA_SHIRQ | SA_INTERRUPT, chip->core->name, chip); if (err < 0) { dprintk(0, "%s: can't get IRQ %d\n", chip->core->name, chip->pci->irq); @@ -712,9 +713,9 @@ static int __devinit snd_cx88_create(struct snd_card *card, pci_read_config_byte(pci, PCI_LATENCY_TIMER, &chip->pci_lat); dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " - "latency: %d, mmio: 0x%llx\n", core->name, devno, + "latency: %d, mmio: 0x%lx\n", core->name, devno, pci_name(pci), chip->pci_rev, pci->irq, - chip->pci_lat,(unsigned long long)pci_resource_start(pci,0)); + chip->pci_lat,pci_resource_start(pci,0)); chip->irq = pci->irq; synchronize_irq(chip->irq); @@ -766,8 +767,8 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci, strcpy (card->driver, "CX88x"); sprintf(card->shortname, "Conexant CX%x", pci->device); - sprintf(card->longname, "%s at %#llx", - card->shortname,(unsigned long long)pci_resource_start(pci, 0)); + sprintf(card->longname, "%s at %#lx", + card->shortname, pci_resource_start(pci, 0)); strcpy (card->mixername, "CX88"); dprintk (0, "%s/%i: ALSA support for cx2388x boards\n", diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index b60177f17..e100d8ef3 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -30,10 +30,9 @@ #include #include #include -#include -#include #include "cx88.h" +#include MODULE_DESCRIPTION("driver for cx2388x/cx23416 based mpeg encoder cards"); MODULE_AUTHOR("Jelle Foks , Gerd Knorr [SuSE Labs]"); @@ -54,6 +53,7 @@ static LIST_HEAD(cx8802_devlist); /* ------------------------------------------------------------------ */ +#define BLACKBIRD_FIRM_ENC_FILENAME "blackbird-fw-enc.bin" #define BLACKBIRD_FIRM_IMAGE_SIZE 256*1024 /* defines below are from ivtv-driver.h */ @@ -63,6 +63,8 @@ static LIST_HEAD(cx8802_devlist); /* Firmware API commands */ #define IVTV_API_STD_TIMEOUT 500 +#define BLACKBIRD_API_PING 0x80 +#define BLACKBIRD_API_BEGIN_CAPTURE 0x81 enum blackbird_capture_type { BLACKBIRD_MPEG_CAPTURE, BLACKBIRD_RAW_CAPTURE, @@ -76,29 +78,205 @@ enum blackbird_capture_bits { BLACKBIRD_RAW_BITS_PASSTHRU_CAPTURE = 0x08, BLACKBIRD_RAW_BITS_TO_HOST_CAPTURE = 0x10 }; +#define BLACKBIRD_API_END_CAPTURE 0x82 enum blackbird_capture_end { BLACKBIRD_END_AT_GOP, /* stop at the end of gop, generate irq */ BLACKBIRD_END_NOW, /* stop immediately, no irq */ }; +#define BLACKBIRD_API_SET_AUDIO_ID 0x89 +#define BLACKBIRD_API_SET_VIDEO_ID 0x8B +#define BLACKBIRD_API_SET_PCR_ID 0x8D +#define BLACKBIRD_API_SET_FRAMERATE 0x8F enum blackbird_framerate { BLACKBIRD_FRAMERATE_NTSC_30, /* NTSC: 30fps */ BLACKBIRD_FRAMERATE_PAL_25 /* PAL: 25fps */ }; +#define BLACKBIRD_API_SET_RESOLUTION 0x91 +#define BLACKBIRD_API_SET_VIDEO_BITRATE 0x95 +enum blackbird_video_bitrate_type { + BLACKBIRD_VIDEO_VBR, + BLACKBIRD_VIDEO_CBR +}; +#define BLACKBIRD_PEAK_RATE_DIVISOR 400 +enum blackbird_mux_rate { + BLACKBIRD_MUX_RATE_DEFAULT, + /* dvd mux rate: multiply by 400 to get the actual rate */ + BLACKBIRD_MUX_RATE_DVD = 25200 +}; +#define BLACKBIRD_API_SET_GOP_STRUCTURE 0x97 +#define BLACKBIRD_API_SET_ASPECT_RATIO 0x99 +enum blackbird_aspect_ratio { + BLACKBIRD_ASPECT_RATIO_FORBIDDEN, + BLACKBIRD_ASPECT_RATIO_1_1_SQUARE, + BLACKBIRD_ASPECT_RATIO_4_3, + BLACKBIRD_ASPECT_RATIO_16_9, + BLACKBIRD_ASPECT_RATIO_221_100, + BLACKBIRD_ASPECT_RATIO_RESERVED +}; +#define BLACKBIRD_API_SET_DNR_MODE 0x9B +enum blackbird_dnr_bits { + BLACKBIRD_DNR_BITS_MANUAL, + BLACKBIRD_DNR_BITS_AUTO_SPATIAL, + BLACKBIRD_DNR_BITS_AUTO_TEMPORAL, + BLACKBIRD_DNR_BITS_AUTO +}; +enum blackbird_median_filter { + BLACKBIRD_MEDIAN_FILTER_DISABLED, + BLACKBIRD_MEDIAN_FILTER_HORIZONTAL, + BLACKBIRD_MEDIAN_FILTER_VERTICAL, + BLACKBIRD_MEDIAN_FILTER_HV, + BLACKBIRD_MEDIAN_FILTER_DIAGONAL +}; +#define BLACKBIRD_API_SET_MANUAL_DNR 0x9D +#define BLACKBIRD_API_SET_DNR_MEDIAN 0x9F +#define BLACKBIRD_API_SET_SPATIAL_FILTER 0xA1 +enum blackbird_spatial_filter_luma { + BLACKBIRD_SPATIAL_FILTER_LUMA_DISABLED, + BLACKBIRD_SPATIAL_FILTER_LUMA_1D_HORIZ, + BLACKBIRD_SPATIAL_FILTER_LUMA_1D_VERT, + BLACKBIRD_SPATIAL_FILTER_LUMA_2D_HV, /* separable, default */ + BLACKBIRD_SPATIAL_FILTER_LUMA_2D_SYMM /* symmetric non-separable */ +}; +enum blackbird_spatial_filter_chroma { + BLACKBIRD_SPATIAL_FILTER_CHROMA_DISABLED, + BLACKBIRD_SPATIAL_FILTER_CHROMA_1D_HORIZ /* default */ +}; +#define BLACKBIRD_API_SET_3_2_PULLDOWN 0xB1 +enum blackbird_pulldown { + BLACKBIRD_3_2_PULLDOWN_DISABLED, + BLACKBIRD_3_2_PULLDOWN_ENABLED +}; +#define BLACKBIRD_API_SET_VBI_LINE_NO 0xB7 +enum blackbird_vbi_line_bits { + BLACKBIRD_VBI_LINE_BITS_TOP_FIELD, + BLACKBIRD_VBI_LINE_BITS_BOT_FIELD = (1 << 31), + BLACKBIRD_VBI_LINE_BITS_ALL_LINES = 0xFFFFFFFF +}; +enum blackbird_vbi_line { + BLACKBIRD_VBI_LINE_DISABLED, + BLACKBIRD_VBI_LINE_ENABLED +}; +enum blackbird_vbi_slicing { + BLACKBIRD_VBI_SLICING_NONE, + BLACKBIRD_VBI_SLICING_CLOSED_CAPTION +}; +#define BLACKBIRD_API_SET_STREAM_TYPE 0xB9 +enum blackbird_stream_type { + BLACKBIRD_STREAM_PROGRAM, + BLACKBIRD_STREAM_TRANSPORT, + BLACKBIRD_STREAM_MPEG1, + BLACKBIRD_STREAM_PES_AV, + BLACKBIRD_STREAM_UNKNOWN4, + BLACKBIRD_STREAM_PES_VIDEO, + BLACKBIRD_STREAM_UNKNOWN6, + BLACKBIRD_STREAM_PES_AUDIO, + BLACKBIRD_STREAM_UNKNOWN8, + BLACKBIRD_STREAM_UNKNOWN9, /* audio/pcm ? */ + BLACKBIRD_STREAM_DVD, + BLACKBIRD_STREAM_VCD, + BLACKBIRD_STREAM_UNKNOWN12 /* svcd/xvcd ? */ +}; +#define BLACKBIRD_API_SET_OUTPUT_PORT 0xBB enum blackbird_stream_port { BLACKBIRD_OUTPUT_PORT_MEMORY, BLACKBIRD_OUTPUT_PORT_STREAMING, BLACKBIRD_OUTPUT_PORT_SERIAL }; +#define BLACKBIRD_API_SET_AUDIO_PARAMS 0xBD +enum blackbird_audio_bits_sample_rate { + BLACKBIRD_AUDIO_BITS_44100HZ, + BLACKBIRD_AUDIO_BITS_48000HZ, + BLACKBIRD_AUDIO_BITS_32000HZ, + BLACKBIRD_AUDIO_BITS_RESERVED_HZ, +}; +enum blackbird_audio_bits_encoding { + BLACKBIRD_AUDIO_BITS_LAYER_1 = 0x1 << 2, + BLACKBIRD_AUDIO_BITS_LAYER_2 = 0x2 << 2, +}; +enum blackbird_audio_bits_bitrate_layer_1 { + BLACKBIRD_AUDIO_BITS_LAYER_1_FREE_FORMAT, + BLACKBIRD_AUDIO_BITS_LAYER_1_32 = 0x01 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_64 = 0x02 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_96 = 0x03 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_128 = 0x04 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_160 = 0x05 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_192 = 0x06 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_224 = 0x07 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_256 = 0x08 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_288 = 0x09 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_320 = 0x0A << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_352 = 0x0B << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_384 = 0x0C << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_416 = 0x0D << 4, + BLACKBIRD_AUDIO_BITS_LAYER_1_448 = 0x0E << 4, +}; +enum blackbird_audio_bits_bitrate_layer_2 { + BLACKBIRD_AUDIO_BITS_LAYER_2_FREE_FORMAT, + BLACKBIRD_AUDIO_BITS_LAYER_2_32 = 0x01 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_48 = 0x02 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_56 = 0x03 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_64 = 0x04 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_80 = 0x05 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_96 = 0x06 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_112 = 0x07 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_128 = 0x08 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_160 = 0x09 << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_192 = 0x0A << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_224 = 0x0B << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_256 = 0x0C << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_320 = 0x0D << 4, + BLACKBIRD_AUDIO_BITS_LAYER_2_384 = 0x0E << 4, +}; +enum blackbird_audio_bits_mode { + BLACKBIRD_AUDIO_BITS_STEREO, + BLACKBIRD_AUDIO_BITS_JOINT_STEREO = 0x1 << 8, + BLACKBIRD_AUDIO_BITS_DUAL = 0x2 << 8, + BLACKBIRD_AUDIO_BITS_MONO = 0x3 << 8, +}; +enum blackbird_audio_bits_mode_extension { + BLACKBIRD_AUDIO_BITS_BOUND_4, + BLACKBIRD_AUDIO_BITS_BOUND_8 = 0x1 << 10, + BLACKBIRD_AUDIO_BITS_BOUND_12 = 0x2 << 10, + BLACKBIRD_AUDIO_BITS_BOUND_16 = 0x3 << 10, +}; +enum blackbird_audio_bits_emphasis { + BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE, + BLACKBIRD_AUDIO_BITS_EMPHASIS_50_15 = 0x1 << 12, + BLACKBIRD_AUDIO_BITS_EMPHASIS_RESERVED = 0x2 << 12, + BLACKBIRD_AUDIO_BITS_EMPHASIS_CCITT_J17 = 0x3 << 12, +}; +enum blackbird_audio_bits_crc { + BLACKBIRD_AUDIO_BITS_CRC_OFF, + BLACKBIRD_AUDIO_BITS_CRC_ON = 0x1 << 14, +}; +enum blackbird_audio_bits_copyright { + BLACKBIRD_AUDIO_BITS_COPYRIGHT_OFF, + BLACKBIRD_AUDIO_BITS_COPYRIGHT_ON = 0x1 << 15, +}; +enum blackbird_audio_bits_original { + BLACKBIRD_AUDIO_BITS_COPY, + BLACKBIRD_AUDIO_BITS_ORIGINAL = 0x1 << 16, +}; +#define BLACKBIRD_API_HALT 0xC3 +#define BLACKBIRD_API_GET_VERSION 0xC4 +#define BLACKBIRD_API_SET_GOP_CLOSURE 0xC5 +enum blackbird_gop_closure { + BLACKBIRD_GOP_CLOSURE_OFF, + BLACKBIRD_GOP_CLOSURE_ON, +}; +#define BLACKBIRD_API_DATA_XFER_STATUS 0xC6 enum blackbird_data_xfer_status { BLACKBIRD_MORE_BUFFERS_FOLLOW, BLACKBIRD_LAST_BUFFER, }; +#define BLACKBIRD_API_PROGRAM_INDEX_INFO 0xC7 enum blackbird_picture_mask { BLACKBIRD_PICTURE_MASK_NONE, BLACKBIRD_PICTURE_MASK_I_FRAMES, BLACKBIRD_PICTURE_MASK_I_P_FRAMES = 0x3, BLACKBIRD_PICTURE_MASK_ALL_FRAMES = 0x7, }; +#define BLACKBIRD_API_SET_VBI_PARAMS 0xC8 enum blackbird_vbi_mode_bits { BLACKBIRD_VBI_BITS_SLICED, BLACKBIRD_VBI_BITS_RAW, @@ -110,23 +288,33 @@ enum blackbird_vbi_insertion_bits { BLACKBIRD_VBI_BITS_SEPARATE_STREAM_USR_DATA = 0x4 << 1, BLACKBIRD_VBI_BITS_SEPARATE_STREAM_PRV_DATA = 0x5 << 1, }; +#define BLACKBIRD_API_SET_DMA_BLOCK_SIZE 0xC9 enum blackbird_dma_unit { BLACKBIRD_DMA_BYTES, BLACKBIRD_DMA_FRAMES, }; +#define BLACKBIRD_API_DMA_TRANSFER_INFO 0xCA +#define BLACKBIRD_API_DMA_TRANSFER_STAT 0xCB enum blackbird_dma_transfer_status_bits { BLACKBIRD_DMA_TRANSFER_BITS_DONE = 0x01, BLACKBIRD_DMA_TRANSFER_BITS_ERROR = 0x04, BLACKBIRD_DMA_TRANSFER_BITS_LL_ERROR = 0x10, }; +#define BLACKBIRD_API_SET_DMA2HOST_ADDR 0xCC +#define BLACKBIRD_API_INIT_VIDEO_INPUT 0xCD +#define BLACKBIRD_API_SET_FRAMESKIP 0xD0 +#define BLACKBIRD_API_PAUSE 0xD2 enum blackbird_pause { BLACKBIRD_PAUSE_ENCODING, BLACKBIRD_RESUME_ENCODING, }; +#define BLACKBIRD_API_REFRESH_INPUT 0xD3 +#define BLACKBIRD_API_SET_COPYRIGHT 0xD4 enum blackbird_copyright { BLACKBIRD_COPYRIGHT_OFF, BLACKBIRD_COPYRIGHT_ON, }; +#define BLACKBIRD_API_SET_NOTIFICATION 0xD5 enum blackbird_notification_type { BLACKBIRD_NOTIFICATION_REFRESH, }; @@ -137,6 +325,7 @@ enum blackbird_notification_status { enum blackbird_notification_mailbox { BLACKBIRD_NOTIFICATION_NO_MAILBOX = -1, }; +#define BLACKBIRD_API_SET_CAPTURE_LINES 0xD6 enum blackbird_field1_lines { BLACKBIRD_FIELD1_SAA7114 = 0x00EF, /* 239 */ BLACKBIRD_FIELD1_SAA7115 = 0x00F0, /* 240 */ @@ -147,10 +336,12 @@ enum blackbird_field2_lines { BLACKBIRD_FIELD2_SAA7115 = 0x00F0, /* 240 */ BLACKBIRD_FIELD2_MICRONAS = 0x0106, /* 262 */ }; +#define BLACKBIRD_API_SET_CUSTOM_DATA 0xD7 enum blackbird_custom_data_type { BLACKBIRD_CUSTOM_EXTENSION_USR_DATA, BLACKBIRD_CUSTOM_PRIVATE_PACKET, }; +#define BLACKBIRD_API_MUTE_VIDEO 0xD9 enum blackbird_mute { BLACKBIRD_UNMUTE, BLACKBIRD_MUTE, @@ -165,6 +356,7 @@ enum blackbird_mute_video_shift { BLACKBIRD_MUTE_VIDEO_U_SHIFT = 16, BLACKBIRD_MUTE_VIDEO_Y_SHIFT = 24, }; +#define BLACKBIRD_API_MUTE_AUDIO 0xDA /* Registers */ #define IVTV_REG_ENC_SDRAM_REFRESH (0x07F8 /*| IVTV_REG_OFFSET*/) @@ -306,12 +498,15 @@ static int register_read(struct cx88_core *core, u32 address, u32 *value) /* ------------------------------------------------------------------ */ -static int blackbird_mbox_func(void *priv, int command, int in, int out, u32 data[CX2341X_MBOX_MAX_DATA]) +/* We don't need to call the API often, so using just one mailbox will probably suffice */ +static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command, + u32 inputcnt, u32 outputcnt, ...) { - struct cx8802_dev *dev = priv; unsigned long timeout; u32 value, flag, retval; int i; + va_list args; + va_start(args, outputcnt); dprintk(1,"%s: 0x%X\n", __FUNCTION__, command); @@ -335,11 +530,12 @@ static int blackbird_mbox_func(void *priv, int command, int in, int out, u32 dat /* write command + args + fill remaining with zeros */ memory_write(dev->core, dev->mailbox + 1, command); /* command code */ memory_write(dev->core, dev->mailbox + 3, IVTV_API_STD_TIMEOUT); /* timeout */ - for (i = 0; i < in; i++) { - memory_write(dev->core, dev->mailbox + 4 + i, data[i]); - dprintk(1, "API Input %d = %d\n", i, data[i]); + for (i = 0; i < inputcnt ; i++) { + value = va_arg(args, int); + memory_write(dev->core, dev->mailbox + 4 + i, value); + dprintk(1, "API Input %d = %d\n", i, value); } - for (; i < CX2341X_MBOX_MAX_DATA; i++) + for (; i < 16 ; i++) memory_write(dev->core, dev->mailbox + 4 + i, 0); flag |= 3; /* tell 'em we're done writing */ @@ -359,10 +555,12 @@ static int blackbird_mbox_func(void *priv, int command, int in, int out, u32 dat } /* read output values */ - for (i = 0; i < out; i++) { - memory_read(dev->core, dev->mailbox + 4 + i, data + i); - dprintk(1, "API Output %d = %d\n", i, data[i]); + for (i = 0; i < outputcnt ; i++) { + int *vptr = va_arg(args, int *); + memory_read(dev->core, dev->mailbox + 4 + i, vptr); + dprintk(1, "API Output %d = %d\n", i, *vptr); } + va_end(args); memory_read(dev->core, dev->mailbox + 2, &retval); dprintk(1, "API result = %d\n",retval); @@ -371,29 +569,7 @@ static int blackbird_mbox_func(void *priv, int command, int in, int out, u32 dat memory_write(dev->core, dev->mailbox, flag); return retval; } -/* ------------------------------------------------------------------ */ - -/* We don't need to call the API often, so using just one mailbox will probably suffice */ -static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command, - u32 inputcnt, u32 outputcnt, ...) -{ - u32 data[CX2341X_MBOX_MAX_DATA]; - va_list vargs; - int i, err; - va_start(vargs, outputcnt); - - for (i = 0; i < inputcnt; i++) { - data[i] = va_arg(vargs, int); - } - err = blackbird_mbox_func(dev, command, inputcnt, outputcnt, data); - for (i = 0; i < outputcnt; i++) { - int *vptr = va_arg(vargs, int *); - *vptr = data[i]; - } - va_end(vargs); - return err; -} static int blackbird_find_mailbox(struct cx8802_dev *dev) { @@ -438,13 +614,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) if (retval < 0) dprintk(0, "Error with register_write\n"); - retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME, + retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME, &dev->pci->dev); if (retval != 0) { dprintk(0, "ERROR: Hotplug firmware request failed (%s).\n", - CX2341X_FIRM_ENC_FILENAME); + BLACKBIRD_FIRM_ENC_FILENAME); dprintk(0, "Please fix your hotplug setup, the board will " "not work without firmware loaded!\n"); return -1; @@ -453,13 +629,11 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n", firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); - release_firmware(firmware); return -1; } if (0 != memcmp(firmware->data, magic, 8)) { dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n"); - release_firmware(firmware); return -1; } @@ -480,7 +654,6 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) } if (checksum) { dprintk(0, "ERROR: Firmware load failed (checksum mismatch).\n"); - release_firmware(firmware); return -1; } release_firmware(firmware); @@ -513,19 +686,12 @@ DB* DVD | MPEG2 | 720x576PAL | CBR | 600 :Good | 6000 Kbps | 25fps | M *DB: "DirectBurn" */ -static void blackbird_codec_settings(struct cx8802_dev *dev) -{ - /* assign frame size */ - blackbird_api_cmd(dev, CX2341X_ENC_SET_FRAME_SIZE, 2, 0, - dev->height, dev->width); - - dev->params.width = dev->width; - dev->params.height = dev->height; - dev->params.is_50hz = (dev->core->tvnorm->id & V4L2_STD_625_50) != 0; - - cx2341x_update(dev, blackbird_mbox_func, NULL, &dev->params); -} - +static struct blackbird_dnr default_dnr_params = { + .mode = BLACKBIRD_DNR_BITS_MANUAL, + .type = BLACKBIRD_MEDIAN_FILTER_DISABLED, + .spatial = 0, + .temporal = 0 +}; static struct v4l2_mpeg_compression default_mpeg_params = { .st_type = V4L2_MPEG_PS_2, .st_bitrate = { @@ -546,7 +712,7 @@ static struct v4l2_mpeg_compression default_mpeg_params = { .target = 224, .max = 224 }, - .au_sample_rate = 48000, + .au_sample_rate = 44100, .au_pesid = 0, .vi_type = V4L2_MPEG_VI_2, .vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3, @@ -557,13 +723,524 @@ static struct v4l2_mpeg_compression default_mpeg_params = { .max = 6000 }, .vi_frame_rate = 25, - .vi_frames_per_gop = 12, + .vi_frames_per_gop = 15, .vi_bframes_count = 2, .vi_pesid = 0, - .closed_gops = 1, + .closed_gops = 0, .pulldown = 0 }; +static enum blackbird_stream_type mpeg_stream_types[] = { + [V4L2_MPEG_SS_1] = BLACKBIRD_STREAM_MPEG1, + [V4L2_MPEG_PS_2] = BLACKBIRD_STREAM_PROGRAM, + [V4L2_MPEG_TS_2] = BLACKBIRD_STREAM_TRANSPORT, + [V4L2_MPEG_PS_DVD] = BLACKBIRD_STREAM_DVD, +}; +static enum blackbird_aspect_ratio mpeg_stream_ratios[] = { + [V4L2_MPEG_ASPECT_SQUARE] = BLACKBIRD_ASPECT_RATIO_1_1_SQUARE, + [V4L2_MPEG_ASPECT_4_3] = BLACKBIRD_ASPECT_RATIO_4_3, + [V4L2_MPEG_ASPECT_16_9] = BLACKBIRD_ASPECT_RATIO_16_9, + [V4L2_MPEG_ASPECT_1_221] = BLACKBIRD_ASPECT_RATIO_221_100, +}; +static enum blackbird_video_bitrate_type mpeg_video_bitrates[] = { + [V4L2_BITRATE_NONE] = BLACKBIRD_VIDEO_CBR, + [V4L2_BITRATE_CBR] = BLACKBIRD_VIDEO_CBR, + [V4L2_BITRATE_VBR] = BLACKBIRD_VIDEO_VBR, +}; +/* find the best layer I/II bitrate to fit a given numeric value */ +struct bitrate_bits { + u32 bits; /* layer bits for the best fit */ + u32 rate; /* actual numeric value for the layer best fit */ +}; +struct bitrate_approximation { + u32 target; /* numeric value of the rate we want */ + struct bitrate_bits layer[2]; +}; +static struct bitrate_approximation mpeg_audio_bitrates[] = { + /* target layer[0].bits layer[0].rate layer[1].bits layer[1].rate */ + { 0, { { 0, 0, }, { 0, 0, }, }, }, + { 32, { { BLACKBIRD_AUDIO_BITS_LAYER_1_32 , 32, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_32 , 32, }, }, }, + { 48, { { BLACKBIRD_AUDIO_BITS_LAYER_1_64 , 64, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_48 , 48, }, }, }, + { 56, { { BLACKBIRD_AUDIO_BITS_LAYER_1_64 , 64, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_56 , 56, }, }, }, + { 64, { { BLACKBIRD_AUDIO_BITS_LAYER_1_64 , 64, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_64 , 64, }, }, }, + { 80, { { BLACKBIRD_AUDIO_BITS_LAYER_1_96 , 96, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_80 , 80, }, }, }, + { 96, { { BLACKBIRD_AUDIO_BITS_LAYER_1_96 , 96, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_96 , 96, }, }, }, + { 112, { { BLACKBIRD_AUDIO_BITS_LAYER_1_128, 128, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_112, 112, }, }, }, + { 128, { { BLACKBIRD_AUDIO_BITS_LAYER_1_128, 128, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_128, 128, }, }, }, + { 160, { { BLACKBIRD_AUDIO_BITS_LAYER_1_160, 160, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_160, 160, }, }, }, + { 192, { { BLACKBIRD_AUDIO_BITS_LAYER_1_192, 192, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_192, 192, }, }, }, + { 224, { { BLACKBIRD_AUDIO_BITS_LAYER_1_224, 224, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_224, 224, }, }, }, + { 256, { { BLACKBIRD_AUDIO_BITS_LAYER_1_256, 256, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_256, 256, }, }, }, + { 288, { { BLACKBIRD_AUDIO_BITS_LAYER_1_288, 288, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_320, 320, }, }, }, + { 320, { { BLACKBIRD_AUDIO_BITS_LAYER_1_320, 320, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_320, 320, }, }, }, + { 352, { { BLACKBIRD_AUDIO_BITS_LAYER_1_352, 352, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_384, 384, }, }, }, + { 384, { { BLACKBIRD_AUDIO_BITS_LAYER_1_384, 384, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_384, 384, }, }, }, + { 416, { { BLACKBIRD_AUDIO_BITS_LAYER_1_416, 416, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_384, 384, }, }, }, + { 448, { { BLACKBIRD_AUDIO_BITS_LAYER_1_448, 448, }, { BLACKBIRD_AUDIO_BITS_LAYER_2_384, 384, }, }, }, +}; +static const int BITRATES_SIZE = ARRAY_SIZE(mpeg_audio_bitrates); + +static void blackbird_set_default_params(struct cx8802_dev *dev) +{ + struct v4l2_mpeg_compression *params = &dev->params; + u32 au_params; + + /* assign stream type */ + if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) ) + params->st_type = V4L2_MPEG_PS_2; + if( params->st_type == V4L2_MPEG_SS_1 ) + params->vi_type = V4L2_MPEG_VI_1; + else + params->vi_type = V4L2_MPEG_VI_2; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]); + + /* assign framerate */ + if( params->vi_frame_rate <= 25 ) + { + params->vi_frame_rate = 25; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25); + } + else + { + params->vi_frame_rate = 30; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30); + } + + /* assign aspect ratio */ + if( params->vi_aspect_ratio >= ARRAY_SIZE(mpeg_stream_ratios) ) + params->vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]); + + /* assign gop properties */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_STRUCTURE, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1); + + /* assign gop closure */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_CLOSURE, 1, 0, params->closed_gops); + + /* assign 3 2 pulldown */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_3_2_PULLDOWN, 1, 0, params->pulldown); + + /* make sure the params are within bounds */ + if( params->st_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->vi_bitrate.mode = V4L2_BITRATE_NONE; + if( params->vi_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->vi_bitrate.mode = V4L2_BITRATE_NONE; + if( params->au_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->au_bitrate.mode = V4L2_BITRATE_NONE; + + /* assign audio properties */ + /* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */ + au_params = BLACKBIRD_AUDIO_BITS_STEREO | + /* BLACKBIRD_AUDIO_BITS_BOUND_4 | */ + BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE | + BLACKBIRD_AUDIO_BITS_CRC_OFF | + BLACKBIRD_AUDIO_BITS_COPYRIGHT_OFF | + BLACKBIRD_AUDIO_BITS_COPY | + 0; + if( params->au_sample_rate <= 32000 ) + { + params->au_sample_rate = 32000; + au_params |= BLACKBIRD_AUDIO_BITS_32000HZ; + } + else if( params->au_sample_rate <= 44100 ) + { + params->au_sample_rate = 44100; + au_params |= BLACKBIRD_AUDIO_BITS_44100HZ; + } + else + { + params->au_sample_rate = 48000; + au_params |= BLACKBIRD_AUDIO_BITS_48000HZ; + } + if( params->au_type == V4L2_MPEG_AU_2_I ) + { + au_params |= BLACKBIRD_AUDIO_BITS_LAYER_1; + } + else + { + /* TODO: try to handle the other formats more gracefully */ + params->au_type = V4L2_MPEG_AU_2_II; + au_params |= BLACKBIRD_AUDIO_BITS_LAYER_2; + } + if( params->au_bitrate.mode ) + { + int layer; + + if( params->au_bitrate.mode == V4L2_BITRATE_CBR ) + params->au_bitrate.max = params->vi_bitrate.target; + else + params->au_bitrate.target = params->vi_bitrate.max; + + layer = params->au_type; + if( params->au_bitrate.target == 0 ) + { + /* TODO: use the minimum possible bitrate instead of 0 ? */ + au_params |= 0; + } + else if( params->au_bitrate.target >= + mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate ) + { + /* clamp the bitrate to the max supported by the standard */ + params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate; + params->au_bitrate.max = params->au_bitrate.target; + au_params |= mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].bits; + } + else + { + /* round up to the nearest supported bitrate */ + int i; + for(i = 1; i < BITRATES_SIZE; i++) + { + if( params->au_bitrate.target > mpeg_audio_bitrates[i-1].layer[layer].rate && + params->au_bitrate.target <= mpeg_audio_bitrates[i].layer[layer].rate ) + { + params->au_bitrate.target = mpeg_audio_bitrates[i].layer[layer].rate; + params->au_bitrate.max = params->au_bitrate.target; + au_params |= mpeg_audio_bitrates[i].layer[layer].bits; + break; + } + } + } + } + else + { + /* TODO: ??? */ + params->au_bitrate.target = params->au_bitrate.max = 0; + au_params |= 0; + } + blackbird_api_cmd(dev, BLACKBIRD_API_SET_AUDIO_PARAMS, 1, 0, au_params ); + + /* assign bitrates */ + if( params->vi_bitrate.mode ) + { + /* bitrate is set, let's figure out the cbr/vbr mess */ + if( params->vi_bitrate.max < params->vi_bitrate.target ) + { + if( params->vi_bitrate.mode == V4L2_BITRATE_CBR ) + params->vi_bitrate.max = params->vi_bitrate.target; + else + params->vi_bitrate.target = params->vi_bitrate.max; + } + } + else + { + if( params->st_bitrate.max < params->st_bitrate.target ) + { + if( params->st_bitrate.mode == V4L2_BITRATE_VBR ) + params->st_bitrate.target = params->st_bitrate.max; + else + params->st_bitrate.max = params->st_bitrate.target; + } + /* calculate vi_bitrate = st_bitrate - au_bitrate */ + params->vi_bitrate.max = params->st_bitrate.max - params->au_bitrate.max; + params->vi_bitrate.target = params->st_bitrate.target - params->au_bitrate.target; + } + blackbird_api_cmd(dev, BLACKBIRD_API_SET_VIDEO_BITRATE, 4, 0, + mpeg_video_bitrates[params->vi_bitrate.mode], + params->vi_bitrate.target * 1000, /* kbps -> bps */ + params->vi_bitrate.max * 1000 / BLACKBIRD_PEAK_RATE_DIVISOR, /* peak/400 */ + BLACKBIRD_MUX_RATE_DEFAULT /*, 0x70*/); /* encoding buffer, ckennedy */ + + /* TODO: implement the stream ID stuff: + ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr, + ps_size, au_pesid, vi_pesid + */ +} +#define CHECK_PARAM( name ) ( dev->params.name != params->name ) +#define IF_PARAM( name ) if( CHECK_PARAM( name ) ) +#define UPDATE_PARAM( name ) dev->params.name = params->name +void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *params) +{ + u32 au_params; + + /* assign stream type */ + if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) ) + params->st_type = V4L2_MPEG_PS_2; + if( params->st_type == V4L2_MPEG_SS_1 ) + params->vi_type = V4L2_MPEG_VI_1; + else + params->vi_type = V4L2_MPEG_VI_2; + if( CHECK_PARAM( st_type ) || CHECK_PARAM( vi_type ) ) + { + UPDATE_PARAM( st_type ); + UPDATE_PARAM( vi_type ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_STREAM_TYPE, 1, 0, mpeg_stream_types[params->st_type]); + } + + /* assign framerate */ + if( params->vi_frame_rate <= 25 ) + params->vi_frame_rate = 25; + else + params->vi_frame_rate = 30; + IF_PARAM( vi_frame_rate ) + { + UPDATE_PARAM( vi_frame_rate ); + if( params->vi_frame_rate == 25 ) + blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_PAL_25); + else + blackbird_api_cmd(dev, BLACKBIRD_API_SET_FRAMERATE, 1, 0, BLACKBIRD_FRAMERATE_NTSC_30); + } + + /* assign aspect ratio */ + if( params->vi_aspect_ratio >= ARRAY_SIZE(mpeg_stream_ratios) ) + params->vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3; + IF_PARAM( vi_aspect_ratio ) + { + UPDATE_PARAM( vi_aspect_ratio ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_ASPECT_RATIO, 1, 0, mpeg_stream_ratios[params->vi_aspect_ratio]); + } + + /* assign gop properties */ + if( CHECK_PARAM( vi_frames_per_gop ) || CHECK_PARAM( vi_bframes_count ) ) + { + UPDATE_PARAM( vi_frames_per_gop ); + UPDATE_PARAM( vi_bframes_count ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_STRUCTURE, 2, 0, params->vi_frames_per_gop, params->vi_bframes_count+1); + } + + /* assign gop closure */ + IF_PARAM( closed_gops ) + { + UPDATE_PARAM( closed_gops ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_GOP_CLOSURE, 1, 0, params->closed_gops); + } + + /* assign 3 2 pulldown */ + IF_PARAM( pulldown ) + { + UPDATE_PARAM( pulldown ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_3_2_PULLDOWN, 1, 0, params->pulldown); + } + + /* make sure the params are within bounds */ + if( params->st_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->vi_bitrate.mode = V4L2_BITRATE_NONE; + if( params->vi_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->vi_bitrate.mode = V4L2_BITRATE_NONE; + if( params->au_bitrate.mode >= ARRAY_SIZE(mpeg_video_bitrates) ) + params->au_bitrate.mode = V4L2_BITRATE_NONE; + + /* assign audio properties */ + /* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */ + au_params = BLACKBIRD_AUDIO_BITS_STEREO | + /* BLACKBIRD_AUDIO_BITS_BOUND_4 | */ + BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE | + BLACKBIRD_AUDIO_BITS_CRC_OFF | + BLACKBIRD_AUDIO_BITS_COPYRIGHT_OFF | + BLACKBIRD_AUDIO_BITS_COPY | + 0; + if( params->au_sample_rate < 32000 ) + { + params->au_sample_rate = 32000; + au_params |= BLACKBIRD_AUDIO_BITS_32000HZ; + } + else if( params->au_sample_rate < 44100 ) + { + params->au_sample_rate = 44100; + au_params |= BLACKBIRD_AUDIO_BITS_44100HZ; + } + else + { + params->au_sample_rate = 48000; + au_params |= BLACKBIRD_AUDIO_BITS_48000HZ; + } + if( params->au_type == V4L2_MPEG_AU_2_I ) + { + au_params |= BLACKBIRD_AUDIO_BITS_LAYER_1; + } + else + { + /* TODO: try to handle the other formats more gracefully */ + params->au_type = V4L2_MPEG_AU_2_II; + au_params |= BLACKBIRD_AUDIO_BITS_LAYER_2; + } + if( params->au_bitrate.mode ) + { + int layer; + + if( params->au_bitrate.mode == V4L2_BITRATE_CBR ) + params->au_bitrate.max = params->vi_bitrate.target; + else + params->au_bitrate.target = params->vi_bitrate.max; + + layer = params->au_type; + if( params->au_bitrate.target == 0 ) + { + /* TODO: use the minimum possible bitrate instead of 0 ? */ + au_params |= 0; + } + else if( params->au_bitrate.target >= + mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate ) + { + /* clamp the bitrate to the max supported by the standard */ + params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate; + params->au_bitrate.max = params->au_bitrate.target; + au_params |= mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].bits; + } + else + { + /* round up to the nearest supported bitrate */ + int i; + for(i = 1; i < BITRATES_SIZE; i++) + { + if( params->au_bitrate.target > mpeg_audio_bitrates[i-1].layer[layer].rate && + params->au_bitrate.target <= mpeg_audio_bitrates[i].layer[layer].rate ) + { + params->au_bitrate.target = mpeg_audio_bitrates[i].layer[layer].rate; + params->au_bitrate.max = params->au_bitrate.target; + au_params |= mpeg_audio_bitrates[i].layer[layer].bits; + break; + } + } + } + } + else + { + /* TODO: ??? */ + params->au_bitrate.target = params->au_bitrate.max = 0; + au_params |= 0; + } + if( CHECK_PARAM( au_type ) || CHECK_PARAM( au_sample_rate ) + || CHECK_PARAM( au_bitrate.mode ) || CHECK_PARAM( au_bitrate.max ) + || CHECK_PARAM( au_bitrate.target ) + ) + { + UPDATE_PARAM( au_type ); + UPDATE_PARAM( au_sample_rate ); + UPDATE_PARAM( au_bitrate ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_AUDIO_PARAMS, 1, 0, au_params ); + } + + /* assign bitrates */ + if( params->vi_bitrate.mode ) + { + /* bitrate is set, let's figure out the cbr/vbr mess */ + if( params->vi_bitrate.max < params->vi_bitrate.target ) + { + if( params->vi_bitrate.mode == V4L2_BITRATE_CBR ) + params->vi_bitrate.max = params->vi_bitrate.target; + else + params->vi_bitrate.target = params->vi_bitrate.max; + } + } + else + { + if( params->st_bitrate.max < params->st_bitrate.target ) + { + if( params->st_bitrate.mode == V4L2_BITRATE_VBR ) + params->st_bitrate.target = params->st_bitrate.max; + else + params->st_bitrate.max = params->st_bitrate.target; + } + /* calculate vi_bitrate = st_bitrate - au_bitrate */ + params->vi_bitrate.max = params->st_bitrate.max - params->au_bitrate.max; + params->vi_bitrate.target = params->st_bitrate.target - params->au_bitrate.target; + } + UPDATE_PARAM( st_bitrate ); + if( CHECK_PARAM( vi_bitrate.mode ) || CHECK_PARAM( vi_bitrate.max ) + || CHECK_PARAM( vi_bitrate.target ) + ) + { + UPDATE_PARAM( vi_bitrate ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_VIDEO_BITRATE, 4, 0, + mpeg_video_bitrates[params->vi_bitrate.mode], + params->vi_bitrate.target * 1000, /* kbps -> bps */ + params->vi_bitrate.max * 1000 / BLACKBIRD_PEAK_RATE_DIVISOR, /* peak/400 */ + BLACKBIRD_MUX_RATE_DEFAULT /*, 0x70*/); /* encoding buffer, ckennedy */ + } + + /* TODO: implement the stream ID stuff: + ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr, + ps_size, au_pesid, vi_pesid + */ + UPDATE_PARAM( ts_pid_pmt ); + UPDATE_PARAM( ts_pid_audio ); + UPDATE_PARAM( ts_pid_video ); + UPDATE_PARAM( ts_pid_pcr ); + UPDATE_PARAM( ps_size ); + UPDATE_PARAM( au_pesid ); + UPDATE_PARAM( vi_pesid ); +} + +static void blackbird_set_default_dnr_params(struct cx8802_dev *dev) +{ + /* assign dnr filter mode */ + if( dev->dnr_params.mode > BLACKBIRD_DNR_BITS_AUTO ) + dev->dnr_params.mode = BLACKBIRD_DNR_BITS_MANUAL; + if( dev->dnr_params.type > BLACKBIRD_MEDIAN_FILTER_DIAGONAL ) + dev->dnr_params.type = BLACKBIRD_MEDIAN_FILTER_DISABLED; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MODE, 2, 0, + dev->dnr_params.mode, + dev->dnr_params.type + ); + + /* assign dnr filter props*/ + if( dev->dnr_params.spatial > 15 ) + dev->dnr_params.spatial = 15; + if( dev->dnr_params.temporal > 31 ) + dev->dnr_params.temporal = 31; + blackbird_api_cmd(dev, BLACKBIRD_API_SET_MANUAL_DNR, 2, 0, + dev->dnr_params.spatial, + dev->dnr_params.temporal + ); +} +#define CHECK_DNR_PARAM( name ) ( dev->dnr_params.name != dnr_params->name ) +#define UPDATE_DNR_PARAM( name ) dev->dnr_params.name = dnr_params->name +void blackbird_set_dnr_params(struct cx8802_dev *dev, struct blackbird_dnr* dnr_params) +{ + /* assign dnr filter mode */ + /* clamp values */ + if( dnr_params->mode > BLACKBIRD_DNR_BITS_AUTO ) + dnr_params->mode = BLACKBIRD_DNR_BITS_MANUAL; + if( dnr_params->type > BLACKBIRD_MEDIAN_FILTER_DIAGONAL ) + dnr_params->type = BLACKBIRD_MEDIAN_FILTER_DISABLED; + /* check if the params actually changed */ + if( CHECK_DNR_PARAM( mode ) || CHECK_DNR_PARAM( type ) ) + { + UPDATE_DNR_PARAM( mode ); + UPDATE_DNR_PARAM( type ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MODE, 2, 0, dnr_params->mode, dnr_params->type); + } + + /* assign dnr filter props*/ + if( dnr_params->spatial > 15 ) + dnr_params->spatial = 15; + if( dnr_params->temporal > 31 ) + dnr_params->temporal = 31; + if( CHECK_DNR_PARAM( spatial ) || CHECK_DNR_PARAM( temporal ) ) + { + UPDATE_DNR_PARAM( spatial ); + UPDATE_DNR_PARAM( temporal ); + blackbird_api_cmd(dev, BLACKBIRD_API_SET_MANUAL_DNR, 2, 0, dnr_params->spatial, dnr_params->temporal); + } +} + +static void blackbird_codec_settings(struct cx8802_dev *dev) +{ + + /* assign output port */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_OUTPUT_PORT, 1, 0, BLACKBIRD_OUTPUT_PORT_STREAMING); /* Host */ + + /* assign frame size */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_RESOLUTION, 2, 0, + dev->height, dev->width); + + /* assign coring levels (luma_h, luma_l, chroma_h, chroma_l) */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_DNR_MEDIAN, 4, 0, 0, 255, 0, 255); + + /* assign spatial filter type: luma_t: horiz_only, chroma_t: horiz_only */ + blackbird_api_cmd(dev, BLACKBIRD_API_SET_SPATIAL_FILTER, 2, 0, + BLACKBIRD_SPATIAL_FILTER_LUMA_1D_HORIZ, + BLACKBIRD_SPATIAL_FILTER_CHROMA_1D_HORIZ + ); + + /* assign frame drop rate */ + /* blackbird_api_cmd(dev, IVTV_API_ASSIGN_FRAME_DROP_RATE, 1, 0, 0); */ + + blackbird_set_default_params(dev); + blackbird_set_default_dnr_params(dev); +} + static int blackbird_initialize_codec(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; @@ -571,7 +1248,7 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev) int retval; dprintk(1,"Initialize codec\n"); - retval = blackbird_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */ + retval = blackbird_api_cmd(dev, BLACKBIRD_API_PING, 0, 0); /* ping */ if (retval < 0) { /* ping was not successful, reset and upload firmware */ cx_write(MO_SRST_IO, 0); /* SYS_RSTO=0 */ @@ -586,13 +1263,13 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev) if (dev->mailbox < 0) return -1; - retval = blackbird_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */ + retval = blackbird_api_cmd(dev, BLACKBIRD_API_PING, 0, 0); /* ping */ if (retval < 0) { dprintk(0, "ERROR: Firmware ping failed!\n"); return -1; } - retval = blackbird_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1, &version); + retval = blackbird_api_cmd(dev, BLACKBIRD_API_GET_VERSION, 0, 1, &version); if (retval < 0) { dprintk(0, "ERROR: Firmware get encoder version failed!\n"); return -1; @@ -612,35 +1289,35 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev) /* blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0xef, 0xef); blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0xf0, 0xf0); blackbird_api_cmd(dev, IVTV_API_ASSIGN_NUM_VSYNC_LINES, 4, 0, 0x180, 0x180); */ - blackbird_api_cmd(dev, CX2341X_ENC_SET_NUM_VSYNC_LINES, 2, 0, + blackbird_api_cmd(dev, BLACKBIRD_API_SET_CAPTURE_LINES, 2, 0, BLACKBIRD_FIELD1_SAA7115, - BLACKBIRD_FIELD2_SAA7115 + BLACKBIRD_FIELD1_SAA7115 ); /* blackbird_api_cmd(dev, IVTV_API_ASSIGN_PLACEHOLDER, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); */ - blackbird_api_cmd(dev, CX2341X_ENC_SET_PLACEHOLDER, 12, 0, + blackbird_api_cmd(dev, BLACKBIRD_API_SET_CUSTOM_DATA, 12, 0, BLACKBIRD_CUSTOM_EXTENSION_USR_DATA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); /* initialize the video input */ - blackbird_api_cmd(dev, CX2341X_ENC_INITIALIZE_INPUT, 0, 0); + blackbird_api_cmd(dev, BLACKBIRD_API_INIT_VIDEO_INPUT, 0, 0); msleep(1); - blackbird_api_cmd(dev, CX2341X_ENC_MUTE_VIDEO, 1, 0, BLACKBIRD_UNMUTE); + blackbird_api_cmd(dev, BLACKBIRD_API_MUTE_VIDEO, 1, 0, BLACKBIRD_UNMUTE); msleep(1); - blackbird_api_cmd(dev, CX2341X_ENC_MUTE_AUDIO, 1, 0, BLACKBIRD_UNMUTE); + blackbird_api_cmd(dev, BLACKBIRD_API_MUTE_AUDIO, 1, 0, BLACKBIRD_UNMUTE); msleep(1); /* start capturing to the host interface */ - /* blackbird_api_cmd(dev, CX2341X_ENC_START_CAPTURE, 2, 0, 0, 0x13); */ - blackbird_api_cmd(dev, CX2341X_ENC_START_CAPTURE, 2, 0, + /* blackbird_api_cmd(dev, BLACKBIRD_API_BEGIN_CAPTURE, 2, 0, 0, 0x13); */ + blackbird_api_cmd(dev, BLACKBIRD_API_BEGIN_CAPTURE, 2, 0, BLACKBIRD_MPEG_CAPTURE, BLACKBIRD_RAW_BITS_NONE ); msleep(10); - blackbird_api_cmd(dev, CX2341X_ENC_REFRESH_INPUT, 0,0); + blackbird_api_cmd(dev, BLACKBIRD_API_REFRESH_INPUT, 0,0); return 0; } @@ -689,39 +1366,6 @@ static struct videobuf_queue_ops blackbird_qops = { /* ------------------------------------------------------------------ */ -static const u32 *ctrl_classes[] = { - cx88_user_ctrls, - cx2341x_mpeg_ctrls, - NULL -}; - -static int blackbird_queryctrl(struct cx8802_dev *dev, struct v4l2_queryctrl *qctrl) -{ - qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id); - if (qctrl->id == 0) - return -EINVAL; - - /* Standard V4L2 controls */ - if (cx8800_ctrl_query(qctrl) == 0) - return 0; - - /* MPEG V4L2 controls */ - if (cx2341x_ctrl_query(&dev->params, qctrl)) - qctrl->flags |= V4L2_CTRL_FLAG_DISABLED; - return 0; -} - -static int blackbird_querymenu(struct cx8802_dev *dev, struct v4l2_querymenu *qmenu) -{ - struct v4l2_queryctrl qctrl; - - qctrl.id = qmenu->id; - blackbird_queryctrl(dev, &qctrl); - return v4l2_ctrl_query_menu(qmenu, &qctrl, cx2341x_ctrl_get_menu(qmenu->id)); -} - -/* ------------------------------------------------------------------ */ - static int mpeg_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { @@ -841,84 +1485,27 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, { struct v4l2_mpeg_compression *f = arg; - printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " - "Replace with VIDIOC_G_EXT_CTRLS!"); - memcpy(f,&default_mpeg_params,sizeof(*f)); + memcpy(f,&dev->params,sizeof(*f)); return 0; } case VIDIOC_S_MPEGCOMP: - printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " - "Replace with VIDIOC_S_EXT_CTRLS!"); - return 0; - case VIDIOC_G_EXT_CTRLS: { - struct v4l2_ext_controls *f = arg; - - if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - return cx2341x_ext_ctrls(&dev->params, f, cmd); - } - case VIDIOC_S_EXT_CTRLS: - case VIDIOC_TRY_EXT_CTRLS: - { - struct v4l2_ext_controls *f = arg; - struct cx2341x_mpeg_params p; - int err; - - if (f->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - p = dev->params; - err = cx2341x_ext_ctrls(&p, f, cmd); - if (err == 0 && cmd == VIDIOC_S_EXT_CTRLS) { - err = cx2341x_update(dev, blackbird_mbox_func, &dev->params, &p); - dev->params = p; - } - return err; - } - case VIDIOC_S_FREQUENCY: - { - blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0, - BLACKBIRD_END_NOW, - BLACKBIRD_MPEG_CAPTURE, - BLACKBIRD_RAW_BITS_NONE); - - cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); + struct v4l2_mpeg_compression *f = arg; - blackbird_initialize_codec(dev); - cx88_set_scale(dev->core, dev->width, dev->height, - fh->mpegq.field); - return 0; - } - case VIDIOC_LOG_STATUS: - { - char name[32 + 2]; - - snprintf(name, sizeof(name), "%s/2", core->name); - printk("%s/2: ============ START LOG STATUS ============\n", - core->name); - cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0); - cx2341x_log_status(&dev->params, name); - printk("%s/2: ============= END LOG STATUS =============\n", - core->name); + blackbird_set_params(dev, f); return 0; } - case VIDIOC_QUERYMENU: - return blackbird_querymenu(dev, arg); - case VIDIOC_QUERYCTRL: - { - struct v4l2_queryctrl *c = arg; - - if (blackbird_queryctrl(dev, c) == 0) - return 0; - return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); - } default: - return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); + return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook ); } return 0; } +int (*cx88_ioctl_hook)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); +unsigned int (*cx88_ioctl_translator)(unsigned int cmd); + static unsigned int mpeg_translate_ioctl(unsigned int cmd) { return cmd; @@ -927,8 +1514,8 @@ static unsigned int mpeg_translate_ioctl(unsigned int cmd) static int mpeg_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - cmd = mpeg_translate_ioctl( cmd ); - return video_usercopy(inode, file, cmd, arg, mpeg_do_ioctl); + cmd = cx88_ioctl_translator( cmd ); + return video_usercopy(inode, file, cmd, arg, cx88_ioctl_hook); } static int mpeg_open(struct inode *inode, struct file *file) @@ -975,14 +1562,13 @@ static int mpeg_release(struct inode *inode, struct file *file) { struct cx8802_fh *fh = file->private_data; - /* blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0, BLACKBIRD_END_NOW, 0, 0x13); */ - blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0, + /* blackbird_api_cmd(fh->dev, BLACKBIRD_API_END_CAPTURE, 3, 0, BLACKBIRD_END_NOW, 0, 0x13); */ + blackbird_api_cmd(fh->dev, BLACKBIRD_API_END_CAPTURE, 3, 0, BLACKBIRD_END_NOW, BLACKBIRD_MPEG_CAPTURE, BLACKBIRD_RAW_BITS_NONE ); - cx8802_cancel_buffers(fh->dev); /* stop mpeg capture */ if (fh->mpegq.streaming) videobuf_streamoff(&fh->mpegq); @@ -1097,13 +1683,19 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev, dev->core = core; dev->width = 720; dev->height = 576; - cx2341x_fill_defaults(&dev->params); - dev->params.port = CX2341X_PORT_STREAMING; + memcpy(&dev->params,&default_mpeg_params,sizeof(default_mpeg_params)); + memcpy(&dev->dnr_params,&default_dnr_params,sizeof(default_dnr_params)); + + if (core->board == CX88_BOARD_HAUPPAUGE_ROSLYN) { + + if (core->tuner_formats & V4L2_STD_525_60) { + dev->height = 480; + dev->params.vi_frame_rate = 30; + } else { + dev->height = 576; + dev->params.vi_frame_rate = 25; + } - if (core->tvnorm->id & V4L2_STD_525_60) { - dev->height = 480; - } else { - dev->height = 576; } err = cx8802_init_common(dev); @@ -1174,6 +1766,8 @@ static int blackbird_init(void) printk(KERN_INFO "cx2388x: snapshot date %04d-%02d-%02d\n", SNAPSHOT/10000, (SNAPSHOT/100)%100, SNAPSHOT%100); #endif + cx88_ioctl_hook = mpeg_do_ioctl; + cx88_ioctl_translator = mpeg_translate_ioctl; return pci_register_driver(&blackbird_pci_driver); } @@ -1185,6 +1779,11 @@ static void blackbird_fini(void) module_init(blackbird_init); module_exit(blackbird_fini); +EXPORT_SYMBOL(cx88_ioctl_hook); +EXPORT_SYMBOL(cx88_ioctl_translator); +EXPORT_SYMBOL(blackbird_set_params); +EXPORT_SYMBOL(blackbird_set_dnr_params); + /* ----------------------------------------------------------- */ /* * Local variables: diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 14bd4863d..f80154b87 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c @@ -114,7 +114,7 @@ struct cx88_board cx88_boards[] = { .radio = { .type = CX88_RADIO, .gpio0 = 0xff10, - }, + }, }, [CX88_BOARD_ATI_WONDER_PRO] = { .name = "ATI TV Wonder Pro", @@ -267,7 +267,7 @@ struct cx88_board cx88_boards[] = { .gpio1 = 0x00007004, .gpio2 = 0x0035d700, .gpio3 = 0x02000000, - }, + }, }, [CX88_BOARD_LEADTEK_PVR2000] = { // gpio values for PAL version from regspy by DScaler @@ -413,7 +413,7 @@ struct cx88_board cx88_boards[] = { .type = CX88_VMUX_COMPOSITE1, .vmux = 1, .gpio0 = 0x000027df, - },{ + },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, .gpio0 = 0x000027df, @@ -536,7 +536,7 @@ struct cx88_board cx88_boards[] = { .type = CX88_VMUX_COMPOSITE1, .vmux = 1, .gpio0 = 0x000027df, - },{ + },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, .gpio0 = 0x000027df, @@ -759,7 +759,7 @@ struct cx88_board cx88_boards[] = { }, [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = { .name = "DViCO FusionHDTV 5 Gold", - .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */ + .tuner_type = TUNER_LG_TDVS_H062F, .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, @@ -1050,7 +1050,11 @@ struct cx88_board cx88_boards[] = { .dvb = 1, }, [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = { - /* FIXME: Audio not working for s-video / composite inputs. */ + /* FIXME: Standard video using the cx88 broadcast decoder is + * working, but blackbird isn't working yet, audio is only + * working correctly for television mode. S-Video and Composite + * are working for video-only, so I have them disabled for now. + */ .name = "KWorld HardwareMpegTV XPert", .tuner_type = TUNER_PHILIPS_TDA8290, .radio_type = UNSET, @@ -1061,21 +1065,12 @@ struct cx88_board cx88_boards[] = { .vmux = 0, .gpio0 = 0x3de2, .gpio2 = 0x00ff, - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, - .gpio0 = 0x3de6, - },{ - .type = CX88_VMUX_SVIDEO, - .vmux = 2, - .gpio0 = 0x3de6, }}, .radio = { .type = CX88_RADIO, .gpio0 = 0x3de6, .gpio2 = 0x00ff, }, - .blackbird = 1, }, [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = { .name = "DViCO FusionHDTV DVB-T Hybrid", @@ -1098,117 +1093,7 @@ struct cx88_board cx88_boards[] = { }}, .dvb = 1, }, - [CX88_BOARD_PCHDTV_HD5500] = { - .name = "pcHDTV HD5500 HDTV", - .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */ - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .tda9887_conf = TDA9887_PRESENT, - .input = {{ - .type = CX88_VMUX_TELEVISION, - .vmux = 0, - .gpio0 = 0x87fd, - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, - .gpio0 = 0x87f9, - },{ - .type = CX88_VMUX_SVIDEO, - .vmux = 2, - .gpio0 = 0x87f9, - }}, - .dvb = 1, - }, - [CX88_BOARD_KWORLD_MCE200_DELUXE] = { - /* FIXME: tested TV input only, disabled composite, - svideo and radio until they can be tested also. */ - .name = "Kworld MCE 200 Deluxe", - .tuner_type = TUNER_TENA_9533_DI, - .radio_type = UNSET, - .tda9887_conf = TDA9887_PRESENT, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .input = {{ - .type = CX88_VMUX_TELEVISION, - .vmux = 0, - .gpio0 = 0x0000BDE6 - }}, - .blackbird = 1, - }, - [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = { - /* FIXME: SVideo, Composite and FM inputs are untested */ - .name = "PixelView PlayTV P7000", - .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE | - TDA9887_PORT2_ACTIVE, - .input = {{ - .type = CX88_VMUX_TELEVISION, - .vmux = 0, - .gpio0 = 0x5da6, - }}, - .blackbird = 1, - }, - [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = { - .name = "NPG Tech Real TV FM Top 10", - .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */ - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .input = {{ - .type = CX88_VMUX_TELEVISION, - .vmux = 0, - .gpio0 = 0x0788, - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, - .gpio0 = 0x078b, - },{ - .type = CX88_VMUX_SVIDEO, - .vmux = 2, - .gpio0 = 0x078b, - }}, - .radio = { - .type = CX88_RADIO, - .gpio0 = 0x074a, - }, - }, - [CX88_BOARD_WINFAST_DTV2000H] = { - /* video inputs and radio still in testing */ - .name = "WinFast DTV2000 H", - .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .tda9887_conf = TDA9887_PRESENT, - .input = {{ - .type = CX88_VMUX_TELEVISION, - .vmux = 0, - .gpio0 = 0x00017304, - .gpio1 = 0x00008203, - .gpio2 = 0x00017304, - .gpio3 = 0x02000000, - }}, - .dvb = 1, - }, - [CX88_BOARD_GENIATECH_DVBS] = { - .name = "Geniatech DVB-S", - .tuner_type = TUNER_ABSENT, - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - .input = {{ - .type = CX88_VMUX_DVB, - .vmux = 0, - },{ - .type = CX88_VMUX_COMPOSITE1, - .vmux = 1, - }}, - .dvb = 1, - }, + }; const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); @@ -1426,38 +1311,6 @@ struct cx88_subid cx88_subids[] = { .subvendor = 0x18ac, .subdevice = 0xdb44, .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID, - },{ - .subvendor = 0x7063, - .subdevice = 0x5500, - .card = CX88_BOARD_PCHDTV_HD5500, - },{ - .subvendor = 0x17de, - .subdevice = 0x0841, - .card = CX88_BOARD_KWORLD_MCE200_DELUXE, - },{ - .subvendor = 0x1822, - .subdevice = 0x0019, - .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO, - },{ - .subvendor = 0x1554, - .subdevice = 0x4813, - .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000, - },{ - .subvendor = 0x14f1, - .subdevice = 0x0842, - .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM, - },{ - .subvendor = 0x107d, - .subdevice = 0x665e, - .card = CX88_BOARD_WINFAST_DTV2000H, - },{ - .subvendor = 0x18ac, - .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */ - .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q, - },{ - .subvendor = 0x14f1, - .subdevice = 0x0084, - .card = CX88_BOARD_GENIATECH_DVBS, }, }; const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); @@ -1719,6 +1572,11 @@ void cx88_card_setup(struct cx88_core *core) /* ------------------------------------------------------------------ */ EXPORT_SYMBOL(cx88_boards); +EXPORT_SYMBOL(cx88_bcount); +EXPORT_SYMBOL(cx88_subids); +EXPORT_SYMBOL(cx88_idcount); +EXPORT_SYMBOL(cx88_card_list); +EXPORT_SYMBOL(cx88_card_setup); /* * Local variables: diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 973d3f39b..e1092d5d4 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c @@ -677,7 +677,7 @@ static unsigned int inline norm_htotal(struct cx88_tvnorm *norm) static unsigned int inline norm_vbipack(struct cx88_tvnorm *norm) { - return (norm->id & V4L2_STD_625_50) ? 511 : 400; + return (norm->id & V4L2_STD_625_50) ? 511 : 288; } int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int height, @@ -932,9 +932,9 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm) htotal, cx_read(MO_HTOTAL), (u32)tmp64); cx_write(MO_HTOTAL, htotal); - // vbi stuff, set vbi offset to 10 (for 20 Clk*2 pixels), this makes - // the effective vbi offset ~244 samples, the same as the Bt8x8 - cx_write(MO_VBI_PACKET, (10<<11) | norm_vbipack(norm)); + // vbi stuff + cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */ + norm_vbipack(norm))); // this is needed as well to set all tvnorm parameter cx88_set_scale(core, 320, 240, V4L2_FIELD_INTERLACED); @@ -1031,8 +1031,8 @@ static int get_ressources(struct cx88_core *core, struct pci_dev *pci) pci_resource_len(pci,0), core->name)) return 0; - printk(KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n", - core->name,(unsigned long long)pci_resource_start(pci,0)); + printk(KERN_ERR "%s: can't get MMIO memory @ 0x%lx\n", + core->name,pci_resource_start(pci,0)); return -EBUSY; } @@ -1181,6 +1181,8 @@ EXPORT_SYMBOL(cx88_set_scale); EXPORT_SYMBOL(cx88_vdev_init); EXPORT_SYMBOL(cx88_core_get); EXPORT_SYMBOL(cx88_core_put); +EXPORT_SYMBOL(cx88_start_audio_dma); +EXPORT_SYMBOL(cx88_stop_audio_dma); /* * Local variables: diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index fd3ef4ca6..3619a449a 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -51,7 +51,6 @@ #endif #ifdef HAVE_LGDT330X # include "lgdt330x.h" -# include "lg_h06xf.h" #endif #ifdef HAVE_NXT200X # include "nxt200x.h" @@ -59,7 +58,6 @@ #ifdef HAVE_CX24123 # include "cx24123.h" #endif -#include "isl6421.h" MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); MODULE_AUTHOR("Chris Pascoe "); @@ -115,6 +113,21 @@ static struct videobuf_queue_ops dvb_qops = { /* ------------------------------------------------------------------ */ +#if defined(HAVE_MT352) || defined(HAVE_ZL10353) +static int zarlink_pll_set(struct dvb_frontend *fe, + struct dvb_frontend_parameters *params, + u8 *pllbuf) +{ + struct cx8802_dev *dev = fe->dvb->priv; + + pllbuf[0] = dev->core->pll_addr << 1; + dvb_pll_configure(dev->core->pll_desc, pllbuf + 1, + params->frequency, + params->u.ofdm.bandwidth); + return 0; +} +#endif + #ifdef HAVE_MT352 static int dvico_fusionhdtv_demod_init(struct dvb_frontend* fe) { @@ -183,16 +196,19 @@ static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe) static struct mt352_config dvico_fusionhdtv = { .demod_address = 0x0F, .demod_init = dvico_fusionhdtv_demod_init, + .pll_set = zarlink_pll_set, }; static struct mt352_config dntv_live_dvbt_config = { .demod_address = 0x0f, .demod_init = dntv_live_dvbt_demod_init, + .pll_set = zarlink_pll_set, }; static struct mt352_config dvico_fusionhdtv_dual = { .demod_address = 0x0F, .demod_init = dvico_dual_demod_init, + .pll_set = zarlink_pll_set, }; #ifdef HAVE_VP3054_I2C @@ -230,8 +246,6 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe) .buf = fmd1216_init, .len = sizeof(fmd1216_init) }; int err; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { if (err < 0) return err; @@ -242,14 +256,14 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe) return 0; } -static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters* params) +static int dntv_live_dvbt_pro_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params, + u8* pllbuf) { struct cx8802_dev *dev= fe->dvb->priv; - u8 buf[4]; struct i2c_msg msg = { .addr = dev->core->pll_addr, .flags = 0, - .buf = buf, .len = 4 }; + .buf = pllbuf+1, .len = 4 }; int err; /* Switch PLL to DVB mode */ @@ -258,16 +272,14 @@ static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe, return err; /* Tune PLL */ - dvb_pll_configure(dev->core->pll_desc, buf, + pllbuf[0] = dev->core->pll_addr << 1; + dvb_pll_configure(dev->core->pll_desc, pllbuf+1, params->frequency, params->u.ofdm.bandwidth); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { - printk(KERN_WARNING "cx88-dvb: %s error " "(addr %02x <- %02x, err = %i)\n", - __FUNCTION__, dev->core->pll_addr, buf[0], err); + __FUNCTION__, pllbuf[0], pllbuf[1], err); if (err < 0) return err; else @@ -281,27 +293,27 @@ static struct mt352_config dntv_live_dvbt_pro_config = { .demod_address = 0x0f, .no_tuner = 1, .demod_init = dntv_live_dvbt_pro_demod_init, + .pll_set = dntv_live_dvbt_pro_pll_set, }; #endif #endif #ifdef HAVE_ZL10353 -static int dvico_hybrid_tuner_set_params(struct dvb_frontend *fe, - struct dvb_frontend_parameters *params) +static int dvico_hybrid_tune_pll(struct dvb_frontend *fe, + struct dvb_frontend_parameters *params, + u8 *pllbuf) { - u8 pllbuf[4]; struct cx8802_dev *dev= fe->dvb->priv; struct i2c_msg msg = { .addr = dev->core->pll_addr, .flags = 0, - .buf = pllbuf, .len = 4 }; + .buf = pllbuf + 1, .len = 4 }; int err; - dvb_pll_configure(dev->core->pll_desc, pllbuf, + pllbuf[0] = dev->core->pll_addr << 1; + dvb_pll_configure(dev->core->pll_desc, pllbuf + 1, params->frequency, params->u.ofdm.bandwidth); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "cx88-dvb: %s error " "(addr %02x <- %02x, err = %i)\n", @@ -317,11 +329,12 @@ static int dvico_hybrid_tuner_set_params(struct dvb_frontend *fe, static struct zl10353_config dvico_fusionhdtv_hybrid = { .demod_address = 0x0F, - .no_tuner = 1, + .pll_set = dvico_hybrid_tune_pll, }; static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { .demod_address = 0x0F, + .pll_set = zarlink_pll_set, }; #endif @@ -329,15 +342,21 @@ static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { static struct cx22702_config connexant_refboard_config = { .demod_address = 0x43, .output_mode = CX22702_SERIAL_OUTPUT, + .pll_address = 0x60, + .pll_desc = &dvb_pll_thomson_dtt7579, }; static struct cx22702_config hauppauge_novat_config = { .demod_address = 0x43, .output_mode = CX22702_SERIAL_OUTPUT, + .pll_address = 0x61, + .pll_desc = &dvb_pll_thomson_dtt759x, }; static struct cx22702_config hauppauge_hvr1100_config = { .demod_address = 0x63, .output_mode = CX22702_SERIAL_OUTPUT, + .pll_address = 0x61, + .pll_desc = &dvb_pll_fmd1216me, }; #endif @@ -352,13 +371,15 @@ static int or51132_set_ts_param(struct dvb_frontend* fe, static struct or51132_config pchdtv_hd3000 = { .demod_address = 0x15, + .pll_address = 0x61, + .pll_desc = &dvb_pll_thomson_dtt761x, .set_ts_params = or51132_set_ts_param, }; #endif #ifdef HAVE_LGDT330X -static int lgdt3302_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters* params) +static int lgdt330x_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params) { /* FIXME make this routine use the tuner-simple code. * It could probably be shared with a number of ATSC @@ -371,12 +392,12 @@ static int lgdt3302_tuner_set_params(struct dvb_frontend* fe, { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; int err; + /* Put the analog decoder in standby to keep it quiet */ + cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); + dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); - - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "cx88-dvb: %s error " "(addr %02x <- %02x, err = %i)\n", @@ -386,21 +407,16 @@ static int lgdt3302_tuner_set_params(struct dvb_frontend* fe, else return -EREMOTEIO; } + if (core->tuner_type == TUNER_LG_TDVS_H062F) { + /* Set the Auxiliary Byte. */ + buf[2] &= ~0x20; + buf[2] |= 0x18; + buf[3] = 0x50; + i2c_transfer(&core->i2c_adap, &msg, 1); + } return 0; } -static int lgdt3303_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters* params) -{ - struct cx8802_dev *dev= fe->dvb->priv; - struct cx88_core *core = dev->core; - - /* Put the analog decoder in standby to keep it quiet */ - cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); - - return lg_h06xf_pll_set(fe, &core->i2c_adap, params); -} - static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) { struct cx8802_dev *dev= fe->dvb->priv; @@ -428,6 +444,7 @@ static struct lgdt330x_config fusionhdtv_3_gold = { .demod_address = 0x0e, .demod_chip = LGDT3302, .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */ + .pll_set = lgdt330x_pll_set, .set_ts_params = lgdt330x_set_ts_param, }; @@ -435,13 +452,7 @@ static struct lgdt330x_config fusionhdtv_5_gold = { .demod_address = 0x0e, .demod_chip = LGDT3303, .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ - .set_ts_params = lgdt330x_set_ts_param, -}; - -static struct lgdt330x_config pchdtv_hd5500 = { - .demod_address = 0x59, - .demod_chip = LGDT3303, - .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ + .pll_set = lgdt330x_pll_set, .set_ts_params = lgdt330x_set_ts_param, }; #endif @@ -466,6 +477,8 @@ static int nxt200x_set_pll_input(u8* buf, int input) static struct nxt200x_config ati_hdtvwonder = { .demod_address = 0x0a, + .pll_address = 0x61, + .pll_desc = &dvb_pll_tuv1236d, .set_pll_input = nxt200x_set_pll_input, .set_ts_params = nxt200x_set_ts_param, }; @@ -480,50 +493,28 @@ static int cx24123_set_ts_param(struct dvb_frontend* fe, return 0; } -static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) +static void cx24123_enable_lnb_voltage(struct dvb_frontend* fe, int on) { struct cx8802_dev *dev= fe->dvb->priv; struct cx88_core *core = dev->core; - if (voltage == SEC_VOLTAGE_OFF) { - cx_write(MO_GP0_IO, 0x000006fB); - } else { + if (on) cx_write(MO_GP0_IO, 0x000006f9); - } - - if (core->prev_set_voltage) - return core->prev_set_voltage(fe, voltage); - return 0; -} - -static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) -{ - struct cx8802_dev *dev= fe->dvb->priv; - struct cx88_core *core = dev->core; - - if (voltage == SEC_VOLTAGE_OFF) { - dprintk(1,"LNB Voltage OFF\n"); - cx_write(MO_GP0_IO, 0x0000efff); - } - - if (core->prev_set_voltage) - return core->prev_set_voltage(fe, voltage); - return 0; + else + cx_write(MO_GP0_IO, 0x000006fB); } -static struct cx24123_config geniatech_dvbs_config = { - .demod_address = 0x55, - .set_ts_params = cx24123_set_ts_param, -}; - static struct cx24123_config hauppauge_novas_config = { .demod_address = 0x55, + .use_isl6421 = 1, .set_ts_params = cx24123_set_ts_param, }; static struct cx24123_config kworld_dvbs_100_config = { .demod_address = 0x15, + .use_isl6421 = 0, .set_ts_params = cx24123_set_ts_param, + .enable_lnb_voltage = cx24123_enable_lnb_voltage, }; #endif @@ -539,11 +530,6 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_HAUPPAUGE_DVB_T1: dev->dvb.frontend = cx22702_attach(&hauppauge_novat_config, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - &dev->core->i2c_adap, - &dvb_pll_thomson_dtt759x); - } break; case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: case CX88_BOARD_CONEXANT_DVB_T1: @@ -551,92 +537,44 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_WINFAST_DTV1000: dev->dvb.frontend = cx22702_attach(&connexant_refboard_config, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x60, - &dev->core->i2c_adap, - &dvb_pll_thomson_dtt7579); - } break; - case CX88_BOARD_WINFAST_DTV2000H: case CX88_BOARD_HAUPPAUGE_HVR1100: case CX88_BOARD_HAUPPAUGE_HVR1100LP: dev->dvb.frontend = cx22702_attach(&hauppauge_hvr1100_config, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - &dev->core->i2c_adap, - &dvb_pll_fmd1216me); - } break; #endif #if defined(HAVE_MT352) || defined(HAVE_ZL10353) case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: + dev->core->pll_addr = 0x60; + dev->core->pll_desc = &dvb_pll_thomson_dtt7579; #ifdef HAVE_MT352 dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x60, - NULL, - &dvb_pll_thomson_dtt7579); + if (dev->dvb.frontend != NULL) break; - } #endif #ifdef HAVE_ZL10353 /* ZL10353 replaces MT352 on later cards */ dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x60, - NULL, - &dvb_pll_thomson_dtt7579); - } -#endif - break; - case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: -#ifdef HAVE_MT352 - /* The tin box says DEE1601, but it seems to be DTT7579 - * compatible, with a slightly different MT352 AGC gain. */ - dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv_dual, - &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - NULL, - &dvb_pll_thomson_dtt7579); - break; - } -#endif -#ifdef HAVE_ZL10353 - /* ZL10353 replaces MT352 on later cards */ - dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_plus_v1_1, - &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - NULL, - &dvb_pll_thomson_dtt7579); - } #endif break; #endif /* HAVE_MT352 || HAVE_ZL10353 */ #ifdef HAVE_MT352 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: + dev->core->pll_addr = 0x61; + dev->core->pll_desc = &dvb_pll_lg_z201; dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - NULL, - &dvb_pll_lg_z201); - } break; case CX88_BOARD_KWORLD_DVB_T: case CX88_BOARD_DNTV_LIVE_DVB_T: case CX88_BOARD_ADSTECH_DVB_T_PCI: + dev->core->pll_addr = 0x61; + dev->core->pll_desc = &dvb_pll_unknown_1; dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_config, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - NULL, - &dvb_pll_unknown_1); - } break; case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: #ifdef HAVE_VP3054_I2C @@ -644,13 +582,18 @@ static int dvb_register(struct cx8802_dev *dev) dev->core->pll_desc = &dvb_pll_fmd1216me; dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config, &((struct vp3054_i2c_state *)dev->card_priv)->adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; - } #else printk("%s: built without vp3054 support\n", dev->core->name); #endif break; + case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: + /* The tin box says DEE1601, but it seems to be DTT7579 + * compatible, with a slightly different MT352 AGC gain. */ + dev->core->pll_addr = 0x61; + dev->core->pll_desc = &dvb_pll_thomson_dtt7579; + dev->dvb.frontend = mt352_attach(&dvico_fusionhdtv_dual, + &dev->core->i2c_adap); + break; #endif #ifdef HAVE_ZL10353 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: @@ -658,20 +601,12 @@ static int dvb_register(struct cx8802_dev *dev) dev->core->pll_desc = &dvb_pll_thomson_fe6600; dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = dvico_hybrid_tuner_set_params; - } break; #endif #ifdef HAVE_OR51132 case CX88_BOARD_PCHDTV_HD3000: dev->dvb.frontend = or51132_attach(&pchdtv_hd3000, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - &dev->core->i2c_adap, - &dvb_pll_thomson_dtt761x); - } break; #endif #ifdef HAVE_LGDT330X @@ -692,9 +627,6 @@ static int dvb_register(struct cx8802_dev *dev) dev->core->pll_desc = &dvb_pll_microtune_4042; dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; - } } break; case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T: @@ -711,9 +643,6 @@ static int dvb_register(struct cx8802_dev *dev) dev->core->pll_desc = &dvb_pll_thomson_dtt761x; dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params; - } } break; case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: @@ -726,28 +655,10 @@ static int dvb_register(struct cx8802_dev *dev) mdelay(100); cx_set(MO_GP0_IO, 1); mdelay(200); + dev->core->pll_addr = 0x61; + dev->core->pll_desc = &dvb_pll_tdvs_tua6034; dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; - } - } - break; - case CX88_BOARD_PCHDTV_HD5500: - dev->ts_gen_cntrl = 0x08; - { - /* Do a hardware reset of chip before using it. */ - struct cx88_core *core = dev->core; - - cx_clear(MO_GP0_IO, 1); - mdelay(100); - cx_set(MO_GP0_IO, 1); - mdelay(200); - dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, - &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params; - } } break; #endif @@ -755,11 +666,6 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_ATI_HDTVWONDER: dev->dvb.frontend = nxt200x_attach(&ati_hdtvwonder, &dev->core->i2c_adap); - if (dev->dvb.frontend != NULL) { - dvb_pll_attach(dev->dvb.frontend, 0x61, - NULL, - &dvb_pll_tuv1236d); - } break; #endif #ifdef HAVE_CX24123 @@ -767,26 +673,10 @@ static int dvb_register(struct cx8802_dev *dev) case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: dev->dvb.frontend = cx24123_attach(&hauppauge_novas_config, &dev->core->i2c_adap); - if (dev->dvb.frontend) { - isl6421_attach(dev->dvb.frontend, &dev->core->i2c_adap, - 0x08, 0x00, 0x00); - } break; case CX88_BOARD_KWORLD_DVBS_100: dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config, &dev->core->i2c_adap); - if (dev->dvb.frontend) { - dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; - dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage; - } - break; - case CX88_BOARD_GENIATECH_DVBS: - dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_config, - &dev->core->i2c_adap); - if (dev->dvb.frontend) { - dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage; - dev->dvb.frontend->ops.set_voltage = geniatech_dvbs_set_voltage; - } break; #endif default: @@ -800,15 +690,15 @@ static int dvb_register(struct cx8802_dev *dev) } if (dev->core->pll_desc) { - dev->dvb.frontend->ops.info.frequency_min = dev->core->pll_desc->min; - dev->dvb.frontend->ops.info.frequency_max = dev->core->pll_desc->max; + dev->dvb.frontend->ops->info.frequency_min = dev->core->pll_desc->min; + dev->dvb.frontend->ops->info.frequency_max = dev->core->pll_desc->max; } /* Put the analog decoder in standby to keep it quiet */ cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); /* register everything */ - return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev); + return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev); } /* ----------------------------------------------------------- */ diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index 70663805c..f720901e9 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c @@ -138,13 +138,13 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg) return; if (core->dvbdev) { - if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl) - core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1); + if (core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl) + core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1); i2c_clients_command(&core->i2c_adap, cmd, arg); - if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl) - core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0); + if (core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl) + core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0); } else i2c_clients_command(&core->i2c_adap, cmd, arg); } @@ -234,6 +234,7 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) /* ----------------------------------------------------------------------- */ EXPORT_SYMBOL(cx88_call_i2c_clients); +EXPORT_SYMBOL(cx88_i2c_init); /* * Local variables: diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index c25564648..78a63b7dd 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c @@ -70,33 +70,14 @@ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); static void cx88_ir_handle_key(struct cx88_IR *ir) { struct cx88_core *core = ir->core; - u32 gpio, data, auxgpio; + u32 gpio, data; /* read gpio value */ gpio = cx_read(ir->gpio_addr); - if (core->board == CX88_BOARD_NPGTECH_REALTV_TOP10FM) { - /* This board apparently uses a combination of 2 GPIO - to represent the keys. Additionally, the second GPIO - can be used for parity. - - Example: - - for key "5" - gpio = 0x758, auxgpio = 0xe5 or 0xf5 - for key "Power" - gpio = 0x758, auxgpio = 0xed or 0xfd - */ - - auxgpio = cx_read(MO_GP1_IO); - /* Take out the parity part */ - gpio=(gpio & 0x7fd) + (auxgpio & 0xef); - } else - auxgpio = gpio; - if (ir->polling) { - if (ir->last_gpio == auxgpio) + if (ir->last_gpio == gpio) return; - ir->last_gpio = auxgpio; + ir->last_gpio = gpio; } /* extract data */ @@ -191,13 +172,12 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_type = IR_TYPE_RC5; ir->sampling = 1; break; - case CX88_BOARD_WINFAST_DTV2000H: case CX88_BOARD_WINFAST2000XP_EXPERT: ir_codes = ir_codes_winfast; ir->gpio_addr = MO_GP0_IO; ir->mask_keycode = 0x8f8; ir->mask_keyup = 0x100; - ir->polling = 50; /* ms */ + ir->polling = 1; /* ms */ break; case CX88_BOARD_IODATA_GVBCTV7E: ir_codes = ir_codes_iodata_bctv7e; @@ -248,12 +228,6 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_type = IR_TYPE_PD; ir->sampling = 0xff00; /* address */ break; - case CX88_BOARD_NPGTECH_REALTV_TOP10FM: - ir_codes = ir_codes_npgtech; - ir->gpio_addr = MO_GP0_IO; - ir->mask_keycode = 0xfa; - ir->polling = 50; /* ms */ - break; } if (NULL == ir_codes) { diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 138a4f692..7d16888b4 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c @@ -54,7 +54,7 @@ static int cx8802_start_dma(struct cx8802_dev *dev, { struct cx88_core *core = dev->core; - dprintk(1, "cx8802_start_dma w: %d, h: %d, f: %d\n", dev->width, dev->height, buf->vb.field); + dprintk(0, "cx8802_start_dma w: %d, h: %d, f: %d\n", dev->width, dev->height, buf->vb.field); /* setup fifo + format */ cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28], @@ -76,7 +76,6 @@ static int cx8802_start_dma(struct cx8802_dev *dev, case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q: case CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T: case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: - case CX88_BOARD_PCHDTV_HD5500: cx_write(TS_SOP_STAT, 1<<13); break; case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: @@ -110,7 +109,7 @@ static int cx8802_start_dma(struct cx8802_dev *dev, q->count = 1; /* enable irqs */ - dprintk( 1, "setting the interrupt mask\n" ); + dprintk( 0, "setting the interrupt mask\n" ); cx_set(MO_PCI_INTMSK, core->pci_irqmask | 0x04); cx_set(MO_TS_INTMSK, 0x1f0011); @@ -123,7 +122,7 @@ static int cx8802_start_dma(struct cx8802_dev *dev, static int cx8802_stop_dma(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; - dprintk( 1, "cx8802_stop_dma\n" ); + dprintk( 0, "cx8802_stop_dma\n" ); /* stop dma */ cx_clear(MO_TS_DMACNTRL, 0x11); @@ -143,43 +142,10 @@ static int cx8802_restart_queue(struct cx8802_dev *dev, struct cx88_buffer *buf; struct list_head *item; - dprintk( 1, "cx8802_restart_queue\n" ); + dprintk( 0, "cx8802_restart_queue\n" ); if (list_empty(&q->active)) { - struct cx88_buffer *prev; - prev = NULL; - - dprintk(1, "cx8802_restart_queue: queue is empty\n" ); - - for (;;) { - if (list_empty(&q->queued)) - return 0; - buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); - if (NULL == prev) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue,&q->active); - cx8802_start_dma(dev, q, buf); - buf->vb.state = STATE_ACTIVE; - buf->count = q->count++; - mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); - dprintk(1,"[%p/%d] restart_queue - first active\n", - buf,buf->vb.i); - - } else if (prev->vb.width == buf->vb.width && - prev->vb.height == buf->vb.height && - prev->fmt == buf->fmt) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue,&q->active); - buf->vb.state = STATE_ACTIVE; - buf->count = q->count++; - prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); - dprintk(1,"[%p/%d] restart_queue - move to active\n", - buf,buf->vb.i); - } else { - return 0; - } - prev = buf; - } + dprintk( 0, "cx8802_restart_queue: queue is empty\n" ); return 0; } @@ -238,13 +204,13 @@ void cx8802_buf_queue(struct cx8802_dev *dev, struct cx88_buffer *buf) buf->risc.jmp[1] = cpu_to_le32(cx88q->stopper.dma); if (list_empty(&cx88q->active)) { - dprintk( 1, "queue is empty - first active\n" ); + dprintk( 0, "queue is empty - first active\n" ); list_add_tail(&buf->vb.queue,&cx88q->active); cx8802_start_dma(dev, cx88q, buf); buf->vb.state = STATE_ACTIVE; buf->count = cx88q->count++; mod_timer(&cx88q->timeout, jiffies+BUFFER_TIMEOUT); - dprintk(1,"[%p/%d] %s - first active\n", + dprintk(0,"[%p/%d] %s - first active\n", buf, buf->vb.i, __FUNCTION__); } else { @@ -278,7 +244,7 @@ static void do_cancel_buffers(struct cx8802_dev *dev, char *reason, int restart) } if (restart) { - dprintk(1, "restarting queue\n" ); + dprintk(0, "restarting queue\n" ); cx8802_restart_queue(dev,q); } spin_unlock_irqrestore(&dev->slock,flags); @@ -420,9 +386,9 @@ int cx8802_init_common(struct cx8802_dev *dev) pci_read_config_byte(dev->pci, PCI_CLASS_REVISION, &dev->pci_rev); pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER, &dev->pci_lat); printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, " - "latency: %d, mmio: 0x%llx\n", dev->core->name, + "latency: %d, mmio: 0x%lx\n", dev->core->name, pci_name(dev->pci), dev->pci_rev, dev->pci->irq, - dev->pci_lat,(unsigned long long)pci_resource_start(dev->pci,0)); + dev->pci_lat,pci_resource_start(dev->pci,0)); /* initialize driver struct */ spin_lock_init(&dev->slock); @@ -438,7 +404,7 @@ int cx8802_init_common(struct cx8802_dev *dev) /* get irq */ err = request_irq(dev->pci->irq, cx8802_irq, - IRQF_SHARED | IRQF_DISABLED, dev->core->name, dev); + SA_SHIRQ | SA_INTERRUPT, dev->core->name, dev); if (err < 0) { printk(KERN_ERR "%s: can't get IRQ %d\n", dev->core->name, dev->pci->irq); diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index cbd85feec..641a0c5a6 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c @@ -137,28 +137,21 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl) { u32 volume; -#ifndef CONFIG_VIDEO_CX88_ALSA +#ifndef USING_CX88_ALSA /* restart dma; This avoids buzz in NICAM and is good in others */ cx88_stop_audio_dma(core); #endif cx_write(AUD_RATE_THRES_DMD, 0x000000C0); -#ifndef CONFIG_VIDEO_CX88_ALSA +#ifndef USING_CX88_ALSA cx88_start_audio_dma(core); #endif if (cx88_boards[core->board].blackbird) { /* sets sound input from external adc */ - switch (core->board) { - case CX88_BOARD_HAUPPAUGE_ROSLYN: - case CX88_BOARD_KWORLD_MCE200_DELUXE: - case CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT: - case CX88_BOARD_PIXELVIEW_PLAYTV_P7000: - case CX88_BOARD_ASUS_PVR_416: + if (core->board == CX88_BOARD_HAUPPAUGE_ROSLYN) cx_clear(AUD_CTL, EN_I2SIN_ENABLE); - break; - default: + else cx_set(AUD_CTL, EN_I2SIN_ENABLE); - } cx_write(AUD_I2SINPUTCNTL, 4); cx_write(AUD_BAUDRATE, 1); @@ -725,7 +718,7 @@ static void set_audio_standard_FM(struct cx88_core *core, /* ----------------------------------------------------------- */ -static int cx88_detect_nicam(struct cx88_core *core) +int cx88_detect_nicam(struct cx88_core *core) { int i, j = 0; diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c index aa2a69770..846faadc9 100644 --- a/drivers/media/video/cx88/cx88-vbi.c +++ b/drivers/media/video/cx88/cx88-vbi.c @@ -34,8 +34,8 @@ void cx8800_vbi_fmt(struct cx8800_dev *dev, struct v4l2_format *f) if (dev->core->tvnorm->id & V4L2_STD_525_60) { /* ntsc */ f->fmt.vbi.sampling_rate = 28636363; - f->fmt.vbi.start[0] = 10; - f->fmt.vbi.start[1] = 273; + f->fmt.vbi.start[0] = 10 -1; + f->fmt.vbi.start[1] = 273 -1; } else if (dev->core->tvnorm->id & V4L2_STD_625_50) { /* pal */ diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 94c92bacc..694d1d80f 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -327,51 +327,6 @@ static struct cx88_ctrl cx8800_ctls[] = { }; static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); -const u32 cx88_user_ctrls[] = { - V4L2_CID_USER_CLASS, - V4L2_CID_BRIGHTNESS, - V4L2_CID_CONTRAST, - V4L2_CID_SATURATION, - V4L2_CID_HUE, - V4L2_CID_AUDIO_VOLUME, - V4L2_CID_AUDIO_BALANCE, - V4L2_CID_AUDIO_MUTE, - 0 -}; -EXPORT_SYMBOL(cx88_user_ctrls); - -static const u32 *ctrl_classes[] = { - cx88_user_ctrls, - NULL -}; - -int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl) -{ - int i; - - if (qctrl->id < V4L2_CID_BASE || - qctrl->id >= V4L2_CID_LASTP1) - return -EINVAL; - for (i = 0; i < CX8800_CTLS; i++) - if (cx8800_ctls[i].v.id == qctrl->id) - break; - if (i == CX8800_CTLS) { - *qctrl = no_ctl; - return 0; - } - *qctrl = cx8800_ctls[i].v; - return 0; -} -EXPORT_SYMBOL(cx8800_ctrl_query); - -static int cx88_queryctrl(struct v4l2_queryctrl *qctrl) -{ - qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id); - if (qctrl->id == 0) - return -EINVAL; - return cx8800_ctrl_query(qctrl); -} - /* ------------------------------------------------------------------- */ /* resource management */ @@ -539,7 +494,8 @@ static int restart_video_queue(struct cx8800_dev *dev, return 0; buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue); if (NULL == prev) { - list_move_tail(&buf->vb.queue, &q->active); + list_del(&buf->vb.queue); + list_add_tail(&buf->vb.queue,&q->active); start_video_dma(dev, q, buf); buf->vb.state = STATE_ACTIVE; buf->count = q->count++; @@ -550,7 +506,8 @@ static int restart_video_queue(struct cx8800_dev *dev, } else if (prev->vb.width == buf->vb.width && prev->vb.height == buf->vb.height && prev->fmt == buf->fmt) { - list_move_tail(&buf->vb.queue, &q->active); + list_del(&buf->vb.queue); + list_add_tail(&buf->vb.queue,&q->active); buf->vb.state = STATE_ACTIVE; buf->count = q->count++; prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); @@ -1180,6 +1137,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_VBI_CAPTURE | + V4L2_CAP_VIDEO_OVERLAY | 0; if (UNSET != core->tuner_type) cap->capabilities |= V4L2_CAP_TUNER; @@ -1225,7 +1183,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, struct v4l2_format *f = arg; return cx8800_try_fmt(dev,fh,f); } -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_V4L1 /* --- streaming capture ------------------------------------- */ case VIDIOCGMBUF: { @@ -1406,8 +1364,20 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, case VIDIOC_QUERYCTRL: { struct v4l2_queryctrl *c = arg; + int i; - return cx88_queryctrl(c); + if (c->id < V4L2_CID_BASE || + c->id >= V4L2_CID_LASTP1) + return -EINVAL; + for (i = 0; i < CX8800_CTLS; i++) + if (cx8800_ctls[i].v.id == c->id) + break; + if (i == CX8800_CTLS) { + *c = no_ctl; + return 0; + } + *c = cx8800_ctls[i].v; + return 0; } case VIDIOC_G_CTRL: return get_control(core,arg); @@ -1584,7 +1554,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, *id = 0; return 0; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_V4L1 case VIDIOCSTUNER: { struct video_tuner *v = arg; @@ -1879,9 +1849,9 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " - "latency: %d, mmio: 0x%llx\n", core->name, + "latency: %d, mmio: 0x%lx\n", core->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, - dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); + dev->pci_lat,pci_resource_start(pci_dev,0)); pci_set_master(pci_dev); if (!pci_dma_supported(pci_dev,0xffffffff)) { @@ -1914,7 +1884,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, /* get irq */ err = request_irq(pci_dev->irq, cx8800_irq, - IRQF_SHARED | IRQF_DISABLED, core->name, dev); + SA_SHIRQ | SA_INTERRUPT, core->name, dev); if (err < 0) { printk(KERN_ERR "%s: can't get IRQ %d\n", core->name,pci_dev->irq); @@ -1925,6 +1895,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, /* load and configure helper modules */ if (TUNER_ABSENT != core->tuner_type) request_module("tuner"); + if (core->tda9887_conf) + request_module("tda9887"); /* register v4l devices */ dev->video_dev = cx88_vdev_init(core,dev->pci, diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index e7810955d..326a25f14 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h @@ -25,11 +25,9 @@ #include #include -#include #include #include #include -#include #include #include "btcx-risc.h" @@ -37,7 +35,7 @@ #include #include -#define CX88_VERSION_CODE KERNEL_VERSION(0,0,6) +#define CX88_VERSION_CODE KERNEL_VERSION(0,0,5) #ifndef TRUE # define TRUE (1==1) @@ -191,12 +189,6 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL 44 #define CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT 45 #define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID 46 -#define CX88_BOARD_PCHDTV_HD5500 47 -#define CX88_BOARD_KWORLD_MCE200_DELUXE 48 -#define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49 -#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50 -#define CX88_BOARD_WINFAST_DTV2000H 51 -#define CX88_BOARD_GENIATECH_DVBS 52 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, @@ -304,7 +296,6 @@ struct cx88_core { /* config info -- dvb */ struct dvb_pll_desc *pll_desc; unsigned int pll_addr; - int (*prev_set_voltage)(struct dvb_frontend* fe, fe_sec_voltage_t voltage); /* state info */ struct task_struct *kthread; @@ -400,6 +391,14 @@ struct cx8802_suspend_state { int disabled; }; +/* TODO: move this to struct v4l2_mpeg_compression ? */ +struct blackbird_dnr { + u32 mode; + u32 type; + u32 spatial; + u32 temporal; +}; + struct cx8802_dev { struct cx88_core *core; spinlock_t slock; @@ -433,7 +432,8 @@ struct cx8802_dev { unsigned char ts_gen_cntrl; /* mpeg params */ - struct cx2341x_mpeg_params params; + struct v4l2_mpeg_compression params; + struct blackbird_dnr dnr_params; }; /* ----------------------------------------------------------- */ @@ -564,6 +564,7 @@ void cx88_newstation(struct cx88_core *core); void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual); int cx88_audio_thread(void *data); +int cx88_detect_nicam(struct cx88_core *core); /* ----------------------------------------------------------- */ /* cx88-input.c */ @@ -591,8 +592,16 @@ int cx8802_resume_common(struct pci_dev *pci_dev); extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, struct cx88_core *core, unsigned int cmd, void *arg, v4l2_kioctl driver_ioctl); -extern const u32 cx88_user_ctrls[]; -extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl); + +/* ----------------------------------------------------------- */ +/* cx88-blackbird.c */ +extern int (*cx88_ioctl_hook)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); +extern unsigned int (*cx88_ioctl_translator)(unsigned int cmd); +void blackbird_set_params(struct cx8802_dev *dev, + struct v4l2_mpeg_compression *params); +void blackbird_set_dnr_params(struct cx8802_dev *dev, + struct blackbird_dnr* dnr_params); /* * Local variables: diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/video/dsbr100.c similarity index 99% rename from drivers/media/radio/dsbr100.c rename to drivers/media/video/dsbr100.c index f7e33f9ee..3b4e9985c 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/video/dsbr100.c @@ -72,7 +72,6 @@ #include #include #include -#include #include #include diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index ed882ebc7..3ba3439db 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -3,7 +3,7 @@ Copyright (C) 2005 Ludovico Cavedon Markus Rechberger - Mauro Carvalho Chehab + Mauro Carvalho Chehab Sascha Sommer This program is free software; you can redistribute it and/or modify @@ -29,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -48,11 +46,11 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -66,11 +64,11 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -84,11 +82,11 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -102,15 +100,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE2, + .vmux = 2, .amux = 1, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -124,15 +122,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE2, + .vmux = 2, .amux = 0, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -148,11 +146,11 @@ struct em28xx_board em28xx_boards[] = { /*FIXME: S-Video not tested */ .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = TVP5150_COMPOSITE0, + .vmux = 0, .amux = MSP_INPUT_DEFAULT, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = TVP5150_SVIDEO, + .vmux = 2, .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), }}, @@ -167,15 +165,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7114, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE4, + .vmux = 4, .amux = 0, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -190,15 +188,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE2, + .vmux = 2, .amux = 0, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -213,15 +211,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE2, + .vmux = 2, .amux = 0, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -236,15 +234,15 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_TELEVISION, - .vmux = SAA7115_COMPOSITE2, + .vmux = 2, .amux = 0, },{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -256,11 +254,11 @@ struct em28xx_board em28xx_boards[] = { .decoder = EM28XX_SAA7113, .input = {{ .type = EM28XX_VMUX_COMPOSITE1, - .vmux = SAA7115_COMPOSITE0, + .vmux = 0, .amux = 1, },{ .type = EM28XX_VMUX_SVIDEO, - .vmux = SAA7115_SVIDEO3, + .vmux = 9, .amux = 1, }}, }, @@ -326,4 +324,8 @@ void em28xx_card_setup(struct em28xx *dev) } } +EXPORT_SYMBOL(em28xx_boards); +EXPORT_SYMBOL(em28xx_bcount); +EXPORT_SYMBOL(em28xx_id_table); + MODULE_DEVICE_TABLE (usb, em28xx_id_table); diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 4350cc75b..e5ee8bceb 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -3,7 +3,7 @@ Copyright (C) 2005 Ludovico Cavedon Markus Rechberger - Mauro Carvalho Chehab + Mauro Carvalho Chehab Sascha Sommer This program is free software; you can redistribute it and/or modify @@ -317,8 +317,8 @@ int em28xx_outfmt_set_yuv422(struct em28xx *dev) return em28xx_write_regs(dev, VINCTRL_REG, "\x11", 1); } -static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, - u8 ymin, u8 ymax) +int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin, + u8 ymax) { em28xx_coredbg("em28xx Scale: (%d,%d)-(%d,%d)\n", xmin, ymin, xmax, ymax); @@ -328,7 +328,7 @@ static int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, return em28xx_write_regs(dev, YMAX_REG, &ymax, 1); } -static int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, +int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, u16 width, u16 height) { u8 cwidth = width; @@ -345,7 +345,7 @@ static int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, return em28xx_write_regs(dev, OFLOW_REG, &overflow, 1); } -static int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v) +int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v) { u8 mode; /* the em2800 scaler only supports scaling down to 50% */ @@ -534,7 +534,7 @@ static inline void em28xx_isoc_video_copy(struct em28xx *dev, * em28xx_isoIrq() * handles the incoming isoc urbs and fills the frames from our inqueue */ -static void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs) +void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs) { struct em28xx *dev = urb->context; int i, status; diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index d829d8f8c..5b6cece37 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c @@ -3,7 +3,7 @@ Copyright (C) 2005 Ludovico Cavedon Markus Rechberger - Mauro Carvalho Chehab + Mauro Carvalho Chehab Sascha Sommer This program is free software; you can redistribute it and/or modify @@ -399,6 +399,17 @@ static u32 functionality(struct i2c_adapter *adap) return I2C_FUNC_SMBUS_EMUL; } +#ifndef I2C_PEC +static void inc_use(struct i2c_adapter *adap) +{ + MOD_INC_USE_COUNT; +} + +static void dec_use(struct i2c_adapter *adap) +{ + MOD_DEC_USE_COUNT; +} +#endif static int em28xx_set_tuner(int check_eeprom, struct i2c_client *client) { @@ -425,19 +436,9 @@ static int attach_inform(struct i2c_client *client) struct em28xx *dev = client->adapter->algo_data; switch (client->addr << 1) { - case 0x43: - case 0x4b: - { - struct tuner_setup tun_setup; - - tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; - tun_setup.type = TUNER_TDA9887; - tun_setup.addr = client->addr; - - em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); + case 0x86: em28xx_i2c_call_clients(dev, TDA9887_SET_CONFIG, &dev->tda9887_conf); break; - } case 0x42: dprintk1(1,"attach_inform: saa7114 detected.\n"); break; @@ -463,7 +464,6 @@ static int attach_inform(struct i2c_client *client) case 0xba: dprintk1(1,"attach_inform: tvp5150 detected.\n"); break; - default: dprintk1(1,"attach inform: detected I2C address %x\n", client->addr << 1); dev->tuner_addr = client->addr; @@ -480,7 +480,12 @@ static struct i2c_algorithm em28xx_algo = { }; static struct i2c_adapter em28xx_adap_template = { +#ifdef I2C_PEC .owner = THIS_MODULE, +#else + .inc_use = inc_use, + .dec_use = dec_use, +#endif .class = I2C_CLASS_TV_ANALOG, .name = "em28xx", .id = I2C_HW_B_EM28XX, diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 3ffb5684f..31e89e4f1 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c @@ -3,7 +3,7 @@ Copyright (C) 2005 Ludovico Cavedon Markus Rechberger - Mauro Carvalho Chehab + Mauro Carvalho Chehab Sascha Sommer This program is free software; you can redistribute it and/or modify @@ -105,7 +105,7 @@ static int get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) return 1; } -static int get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +static int get_key_pinnacle_usb(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) { unsigned char buf[3]; @@ -148,8 +148,8 @@ void em28xx_set_ir(struct em28xx * dev,struct IR_i2c *ir) snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Terratec)"); break; case (EM2820_BOARD_PINNACLE_USB_2): - ir->ir_codes = ir_codes_pinnacle_grey; - ir->get_key = get_key_pinnacle_usb_grey; + ir->ir_codes = ir_codes_em_pinnacle_usb; + ir->get_key = get_key_pinnacle_usb; snprintf(ir->c.name, sizeof(ir->c.name), "i2c IR (EM28XX Pinnacle PCTV)"); break; case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2): diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 2a461dde4..cf7cdf9ef 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -3,7 +3,7 @@ Copyright (C) 2005 Ludovico Cavedon Markus Rechberger - Mauro Carvalho Chehab + Mauro Carvalho Chehab Sascha Sommer Some parts based on SN9C10x PC Camera Controllers GPL driver made @@ -42,7 +42,7 @@ #define DRIVER_AUTHOR "Ludovico Cavedon , " \ "Markus Rechberger , " \ - "Mauro Carvalho Chehab , " \ + "Mauro Carvalho Chehab , " \ "Sascha Sommer " #define DRIVER_NAME "em28xx" @@ -170,12 +170,8 @@ static int em28xx_config(struct em28xx *dev) static void em28xx_config_i2c(struct em28xx *dev) { struct v4l2_frequency f; - struct v4l2_routing route; - - route.input = INPUT(dev->ctl_input)->vmux; - route.output = 0; em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL); - em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route); + em28xx_i2c_call_clients(dev, VIDIOC_S_INPUT, &dev->ctl_input); em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL); /* configure tuner */ @@ -210,19 +206,19 @@ static void em28xx_empty_framequeues(struct em28xx *dev) static void video_mux(struct em28xx *dev, int index) { - int ainput; - struct v4l2_routing route; + int input, ainput; - route.input = INPUT(index)->vmux; - route.output = 0; + input = INPUT(index)->vmux; dev->ctl_input = index; dev->ctl_ainput = INPUT(index)->amux; - em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route); + em28xx_i2c_call_clients(dev, VIDIOC_S_INPUT, &input); - em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,route.input,dev->ctl_ainput); + em28xx_videodbg("Setting input index=%d, vmux=%d, amux=%d\n",index,input,dev->ctl_ainput); if (dev->has_msp34xx) { + struct v4l2_routing route; + if (dev->i2s_speed) em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); route.input = dev->ctl_ainput; @@ -1574,6 +1570,8 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, request_module("tvp5150"); if (dev->has_tuner) request_module("tuner"); + if (dev->tda9887_conf) + request_module("tda9887"); #endif errCode = em28xx_config(dev); if (errCode) { diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index d8fcc9e17..e1ddc2f27 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h @@ -3,7 +3,7 @@ Copyright (C) 2005 Markus Rechberger Ludovico Cavedon - Mauro Carvalho Chehab + Mauro Carvalho Chehab Based on the em2800 driver from Sascha Sommer @@ -319,7 +319,13 @@ int em28xx_audio_analog_set(struct em28xx *dev); int em28xx_colorlevels_set_default(struct em28xx *dev); int em28xx_capture_start(struct em28xx *dev, int start); int em28xx_outfmt_set_yuv422(struct em28xx *dev); +int em28xx_accumulator_set(struct em28xx *dev, u8 xmin, u8 xmax, u8 ymin, + u8 ymax); +int em28xx_capture_area_set(struct em28xx *dev, u8 hstart, u8 vstart, + u16 width, u16 height); +int em28xx_scaler_set(struct em28xx *dev, u16 h, u16 v); int em28xx_resolution_set(struct em28xx *dev); +void em28xx_isocIrq(struct urb *urb, struct pt_regs *regs); int em28xx_init_isoc(struct em28xx *dev); void em28xx_uninit_isoc(struct em28xx *dev); int em28xx_set_alternate(struct em28xx *dev); diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index 8992b6e62..dfc9dd732 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c @@ -2341,9 +2341,11 @@ static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_CTRL: return et61x251_vidioc_g_ctrl(cam, arg); + case VIDIOC_S_CTRL_OLD: case VIDIOC_S_CTRL: return et61x251_vidioc_s_ctrl(cam, arg); + case VIDIOC_CROPCAP_OLD: case VIDIOC_CROPCAP: return et61x251_vidioc_cropcap(cam, arg); @@ -2390,6 +2392,7 @@ static int et61x251_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_PARM: return et61x251_vidioc_g_parm(cam, arg); + case VIDIOC_S_PARM_OLD: case VIDIOC_S_PARM: return et61x251_vidioc_s_parm(cam, arg); diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index fba30a40e..7e66d83fe 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c @@ -150,11 +150,12 @@ static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) return 1; } -/* Common (grey or coloured) pinnacle PCTV remote handling +/* The new pinnacle PCTV remote (with the colored buttons) * + * Ricardo Cerqueira */ -static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, - int parity_offset, int marker, int code_modulo) + +int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) { unsigned char b[4]; unsigned int start = 0,parity = 0,code = 0; @@ -166,9 +167,9 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, } for (start = 0; start<4; start++) { - if (b[start] == marker) { - code=b[(start+parity_offset+1)%4]; - parity=b[(start+parity_offset)%4]; + if (b[start] == 0x80) { + code=b[(start+3)%4]; + parity=b[(start+2)%4]; } } @@ -180,14 +181,16 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, if (ir->old == parity) return 0; + ir->old = parity; - /* drop special codes when a key is held down a long time for the grey controller - In this case, the second bit of the code is asserted */ - if (marker == 0xfe && (code & 0x40)) - return 0; + /* Reduce code value to fit inside IR_KEYTAB_SIZE + * + * this is the only value that results in 42 unique + * codes < 128 + */ - code %= code_modulo; + code %= 0x88; *ir_raw = code; *ir_key = code; @@ -197,40 +200,7 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw, return 1; } -/* The grey pinnacle PCTV remote - * - * There are one issue with this remote: - * - I2c packet does not change when the same key is pressed quickly. The workaround - * is to hold down each key for about half a second, so that another code is generated - * in the i2c packet, and the function can distinguish key presses. - * - * Sylvain Pasche - */ -int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) -{ - - return get_key_pinnacle(ir, ir_key, ir_raw, 1, 0xfe, 0xff); -} - -EXPORT_SYMBOL_GPL(get_key_pinnacle_grey); - - -/* The new pinnacle PCTV remote (with the colored buttons) - * - * Ricardo Cerqueira - */ -int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) -{ - /* code_modulo parameter (0x88) is used to reduce code value to fit inside IR_KEYTAB_SIZE - * - * this is the only value that results in 42 unique - * codes < 128 - */ - - return get_key_pinnacle(ir, ir_key, ir_raw, 2, 0x80, 0x88); -} - -EXPORT_SYMBOL_GPL(get_key_pinnacle_color); +EXPORT_SYMBOL_GPL(get_key_pinnacle); /* ----------------------------------------------------------------------- */ diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c deleted file mode 100644 index 3bf7ac4f5..000000000 --- a/drivers/media/video/ks0127.c +++ /dev/null @@ -1,846 +0,0 @@ -/* - * Video Capture Driver (Video for Linux 1/2) - * for the Matrox Marvel G200,G400 and Rainbow Runner-G series - * - * This module is an interface to the KS0127 video decoder chip. - * - * Copyright (C) 1999 Ryan Drake - * - * 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. - * - ***************************************************************************** - * - * Modified and extended by - * Mike Bernson - * Gerard v.d. Horst - * Leon van Stuivenberg - * Gernot Ziegler - * - * Version History: - * V1.0 Ryan Drake Initial version by Ryan Drake - * V1.1 Gerard v.d. Horst Added some debugoutput, reset the video-standard - */ - -#ifndef __KERNEL__ -#define __KERNEL__ -#endif - -#include -#include -#include -#include -#include -#include -#include -#include "ks0127.h" - -#include -#include - -#define dprintk if (debug) printk - -/* i2c identification */ -#define I2C_KS0127_ADDON 0xD8 -#define I2C_KS0127_ONBOARD 0xDA - -#define KS_TYPE_UNKNOWN 0 -#define KS_TYPE_0122S 1 -#define KS_TYPE_0127 2 -#define KS_TYPE_0127B 3 - -/* ks0127 control registers */ -#define KS_STAT 0x00 -#define KS_CMDA 0x01 -#define KS_CMDB 0x02 -#define KS_CMDC 0x03 -#define KS_CMDD 0x04 -#define KS_HAVB 0x05 -#define KS_HAVE 0x06 -#define KS_HS1B 0x07 -#define KS_HS1E 0x08 -#define KS_HS2B 0x09 -#define KS_HS2E 0x0a -#define KS_AGC 0x0b -#define KS_HXTRA 0x0c -#define KS_CDEM 0x0d -#define KS_PORTAB 0x0e -#define KS_LUMA 0x0f -#define KS_CON 0x10 -#define KS_BRT 0x11 -#define KS_CHROMA 0x12 -#define KS_CHROMB 0x13 -#define KS_DEMOD 0x14 -#define KS_SAT 0x15 -#define KS_HUE 0x16 -#define KS_VERTIA 0x17 -#define KS_VERTIB 0x18 -#define KS_VERTIC 0x19 -#define KS_HSCLL 0x1a -#define KS_HSCLH 0x1b -#define KS_VSCLL 0x1c -#define KS_VSCLH 0x1d -#define KS_OFMTA 0x1e -#define KS_OFMTB 0x1f -#define KS_VBICTL 0x20 -#define KS_CCDAT2 0x21 -#define KS_CCDAT1 0x22 -#define KS_VBIL30 0x23 -#define KS_VBIL74 0x24 -#define KS_VBIL118 0x25 -#define KS_VBIL1512 0x26 -#define KS_TTFRAM 0x27 -#define KS_TESTA 0x28 -#define KS_UVOFFH 0x29 -#define KS_UVOFFL 0x2a -#define KS_UGAIN 0x2b -#define KS_VGAIN 0x2c -#define KS_VAVB 0x2d -#define KS_VAVE 0x2e -#define KS_CTRACK 0x2f -#define KS_POLCTL 0x30 -#define KS_REFCOD 0x31 -#define KS_INVALY 0x32 -#define KS_INVALU 0x33 -#define KS_INVALV 0x34 -#define KS_UNUSEY 0x35 -#define KS_UNUSEU 0x36 -#define KS_UNUSEV 0x37 -#define KS_USRSAV 0x38 -#define KS_USREAV 0x39 -#define KS_SHS1A 0x3a -#define KS_SHS1B 0x3b -#define KS_SHS1C 0x3c -#define KS_CMDE 0x3d -#define KS_VSDEL 0x3e -#define KS_CMDF 0x3f -#define KS_GAMMA0 0x40 -#define KS_GAMMA1 0x41 -#define KS_GAMMA2 0x42 -#define KS_GAMMA3 0x43 -#define KS_GAMMA4 0x44 -#define KS_GAMMA5 0x45 -#define KS_GAMMA6 0x46 -#define KS_GAMMA7 0x47 -#define KS_GAMMA8 0x48 -#define KS_GAMMA9 0x49 -#define KS_GAMMA10 0x4a -#define KS_GAMMA11 0x4b -#define KS_GAMMA12 0x4c -#define KS_GAMMA13 0x4d -#define KS_GAMMA14 0x4e -#define KS_GAMMA15 0x4f -#define KS_GAMMA16 0x50 -#define KS_GAMMA17 0x51 -#define KS_GAMMA18 0x52 -#define KS_GAMMA19 0x53 -#define KS_GAMMA20 0x54 -#define KS_GAMMA21 0x55 -#define KS_GAMMA22 0x56 -#define KS_GAMMA23 0x57 -#define KS_GAMMA24 0x58 -#define KS_GAMMA25 0x59 -#define KS_GAMMA26 0x5a -#define KS_GAMMA27 0x5b -#define KS_GAMMA28 0x5c -#define KS_GAMMA29 0x5d -#define KS_GAMMA30 0x5e -#define KS_GAMMA31 0x5f -#define KS_GAMMAD0 0x60 -#define KS_GAMMAD1 0x61 -#define KS_GAMMAD2 0x62 -#define KS_GAMMAD3 0x63 -#define KS_GAMMAD4 0x64 -#define KS_GAMMAD5 0x65 -#define KS_GAMMAD6 0x66 -#define KS_GAMMAD7 0x67 -#define KS_GAMMAD8 0x68 -#define KS_GAMMAD9 0x69 -#define KS_GAMMAD10 0x6a -#define KS_GAMMAD11 0x6b -#define KS_GAMMAD12 0x6c -#define KS_GAMMAD13 0x6d -#define KS_GAMMAD14 0x6e -#define KS_GAMMAD15 0x6f -#define KS_GAMMAD16 0x70 -#define KS_GAMMAD17 0x71 -#define KS_GAMMAD18 0x72 -#define KS_GAMMAD19 0x73 -#define KS_GAMMAD20 0x74 -#define KS_GAMMAD21 0x75 -#define KS_GAMMAD22 0x76 -#define KS_GAMMAD23 0x77 -#define KS_GAMMAD24 0x78 -#define KS_GAMMAD25 0x79 -#define KS_GAMMAD26 0x7a -#define KS_GAMMAD27 0x7b -#define KS_GAMMAD28 0x7c -#define KS_GAMMAD29 0x7d -#define KS_GAMMAD30 0x7e -#define KS_GAMMAD31 0x7f - - -/**************************************************************************** -* mga_dev : represents one ks0127 chip. -****************************************************************************/ - -struct adjust { - int contrast; - int bright; - int hue; - int ugain; - int vgain; -}; - -struct ks0127 { - struct i2c_client *client; - unsigned char addr; - int format_width; - int format_height; - int cap_width; - int cap_height; - int norm; - int ks_type; - u8 regs[256]; -}; - - -static int debug; /* insmod parameter */ - -module_param(debug, int, 0); -MODULE_PARM_DESC(debug, "Debug output"); -MODULE_LICENSE("GPL"); - -static u8 reg_defaults[64]; - - - -static void init_reg_defaults(void) -{ - u8 *table = reg_defaults; - - table[KS_CMDA] = 0x2c; /* VSE=0, CCIR 601, autodetect standard */ - table[KS_CMDB] = 0x12; /* VALIGN=0, AGC control and input */ - table[KS_CMDC] = 0x00; /* Test options */ - /* clock & input select, write 1 to PORTA */ - table[KS_CMDD] = 0x01; - table[KS_HAVB] = 0x00; /* HAV Start Control */ - table[KS_HAVE] = 0x00; /* HAV End Control */ - table[KS_HS1B] = 0x10; /* HS1 Start Control */ - table[KS_HS1E] = 0x00; /* HS1 End Control */ - table[KS_HS2B] = 0x00; /* HS2 Start Control */ - table[KS_HS2E] = 0x00; /* HS2 End Control */ - table[KS_AGC] = 0x53; /* Manual setting for AGC */ - table[KS_HXTRA] = 0x00; /* Extra Bits for HAV and HS1/2 */ - table[KS_CDEM] = 0x00; /* Chroma Demodulation Control */ - table[KS_PORTAB] = 0x0f; /* port B is input, port A output GPPORT */ - table[KS_LUMA] = 0x01; /* Luma control */ - table[KS_CON] = 0x00; /* Contrast Control */ - table[KS_BRT] = 0x00; /* Brightness Control */ - table[KS_CHROMA] = 0x2a; /* Chroma control A */ - table[KS_CHROMB] = 0x90; /* Chroma control B */ - table[KS_DEMOD] = 0x00; /* Chroma Demodulation Control & Status */ - table[KS_SAT] = 0x00; /* Color Saturation Control*/ - table[KS_HUE] = 0x00; /* Hue Control */ - table[KS_VERTIA] = 0x00; /* Vertical Processing Control A */ - /* Vertical Processing Control B, luma 1 line delayed */ - table[KS_VERTIB] = 0x12; - table[KS_VERTIC] = 0x0b; /* Vertical Processing Control C */ - table[KS_HSCLL] = 0x00; /* Horizontal Scaling Ratio Low */ - table[KS_HSCLH] = 0x00; /* Horizontal Scaling Ratio High */ - table[KS_VSCLL] = 0x00; /* Vertical Scaling Ratio Low */ - table[KS_VSCLH] = 0x00; /* Vertical Scaling Ratio High */ - /* 16 bit YCbCr 4:2:2 output; I can't make the bt866 like 8 bit /Sam */ - table[KS_OFMTA] = 0x30; - table[KS_OFMTB] = 0x00; /* Output Control B */ - /* VBI Decoder Control; 4bit fmt: avoid Y overflow */ - table[KS_VBICTL] = 0x5d; - table[KS_CCDAT2] = 0x00; /* Read Only register */ - table[KS_CCDAT1] = 0x00; /* Read Only register */ - table[KS_VBIL30] = 0xa8; /* VBI data decoding options */ - table[KS_VBIL74] = 0xaa; /* VBI data decoding options */ - table[KS_VBIL118] = 0x2a; /* VBI data decoding options */ - table[KS_VBIL1512] = 0x00; /* VBI data decoding options */ - table[KS_TTFRAM] = 0x00; /* Teletext frame alignment pattern */ - table[KS_TESTA] = 0x00; /* test register, shouldn't be written */ - table[KS_UVOFFH] = 0x00; /* UV Offset Adjustment High */ - table[KS_UVOFFL] = 0x00; /* UV Offset Adjustment Low */ - table[KS_UGAIN] = 0x00; /* U Component Gain Adjustment */ - table[KS_VGAIN] = 0x00; /* V Component Gain Adjustment */ - table[KS_VAVB] = 0x07; /* VAV Begin */ - table[KS_VAVE] = 0x00; /* VAV End */ - table[KS_CTRACK] = 0x00; /* Chroma Tracking Control */ - table[KS_POLCTL] = 0x41; /* Timing Signal Polarity Control */ - table[KS_REFCOD] = 0x80; /* Reference Code Insertion Control */ - table[KS_INVALY] = 0x10; /* Invalid Y Code */ - table[KS_INVALU] = 0x80; /* Invalid U Code */ - table[KS_INVALV] = 0x80; /* Invalid V Code */ - table[KS_UNUSEY] = 0x10; /* Unused Y Code */ - table[KS_UNUSEU] = 0x80; /* Unused U Code */ - table[KS_UNUSEV] = 0x80; /* Unused V Code */ - table[KS_USRSAV] = 0x00; /* reserved */ - table[KS_USREAV] = 0x00; /* reserved */ - table[KS_SHS1A] = 0x00; /* User Defined SHS1 A */ - /* User Defined SHS1 B, ALT656=1 on 0127B */ - table[KS_SHS1B] = 0x80; - table[KS_SHS1C] = 0x00; /* User Defined SHS1 C */ - table[KS_CMDE] = 0x00; /* Command Register E */ - table[KS_VSDEL] = 0x00; /* VS Delay Control */ - /* Command Register F, update -immediately- */ - /* (there might come no vsync)*/ - table[KS_CMDF] = 0x02; -} - - -/* We need to manually read because of a bug in the KS0127 chip. - * - * An explanation from kayork@mail.utexas.edu: - * - * During I2C reads, the KS0127 only samples for a stop condition - * during the place where the acknoledge bit should be. Any standard - * I2C implementation (correctly) throws in another clock transition - * at the 9th bit, and the KS0127 will not recognize the stop condition - * and will continue to clock out data. - * - * So we have to do the read ourself. Big deal. - workaround in i2c-algo-bit - */ - - -static u8 ks0127_read(struct ks0127 *ks, u8 reg) -{ - struct i2c_client *c = ks->client; - char val = 0; - struct i2c_msg msgs[] = { - {c->addr, 0, sizeof(reg), ®}, - {c->addr, I2C_M_RD | I2C_M_NO_RD_ACK, sizeof(val), &val}}; - int ret; - - ret = i2c_transfer(c->adapter, msgs, ARRAY_SIZE(msgs)); - if (ret != ARRAY_SIZE(msgs)) - dprintk("ks0127_write error\n"); - - return val; -} - - -static void ks0127_write(struct ks0127 *ks, u8 reg, u8 val) -{ - char msg[] = {reg, val}; - - if (i2c_master_send(ks->client, msg, sizeof(msg)) != sizeof(msg)) - dprintk("ks0127_write error\n"); - - ks->regs[reg] = val; -} - - -/* generic bit-twiddling */ -static void ks0127_and_or(struct ks0127 *ks, u8 reg, u8 and_v, u8 or_v) -{ - u8 val = ks->regs[reg]; - val = (val & and_v) | or_v; - ks0127_write(ks, reg, val); -} - - - -/**************************************************************************** -* ks0127 private api -****************************************************************************/ -static void ks0127_reset(struct ks0127* ks) -{ - int i; - u8 *table = reg_defaults; - - ks->ks_type = KS_TYPE_UNKNOWN; - - dprintk("ks0127: reset\n"); - msleep(1); - - /* initialize all registers to known values */ - /* (except STAT, 0x21, 0x22, TEST and 0x38,0x39) */ - - for(i = 1; i < 33; i++) - ks0127_write(ks, i, table[i]); - - for(i = 35; i < 40; i++) - ks0127_write(ks, i, table[i]); - - for(i = 41; i < 56; i++) - ks0127_write(ks, i, table[i]); - - for(i = 58; i < 64; i++) - ks0127_write(ks, i, table[i]); - - - if ((ks0127_read(ks, KS_STAT) & 0x80) == 0) { - ks->ks_type = KS_TYPE_0122S; - dprintk("ks0127: ks0122s Found\n"); - return; - } - - switch(ks0127_read(ks, KS_CMDE) & 0x0f) { - - case 0: - ks->ks_type = KS_TYPE_0127; - dprintk("ks0127: ks0127 found\n"); - break; - - case 9: - ks->ks_type = KS_TYPE_0127B; - dprintk("ks0127: ks0127B Revision A found\n"); - break; - - default: - dprintk("ks0127: unknown revision\n"); - break; - } -} - -static int ks0127_command(struct i2c_client *client, - unsigned int cmd, void *arg) -{ - struct ks0127 *ks = i2c_get_clientdata(client); - - int *iarg = (int*)arg; - - int status; - - if (!ks) - return -ENODEV; - - switch (cmd) { - - case DECODER_INIT: - dprintk("ks0127: command DECODER_INIT\n"); - ks0127_reset(ks); - break; - - case DECODER_SET_INPUT: - switch(*iarg) { - case KS_INPUT_COMPOSITE_1: - case KS_INPUT_COMPOSITE_2: - case KS_INPUT_COMPOSITE_3: - case KS_INPUT_COMPOSITE_4: - case KS_INPUT_COMPOSITE_5: - case KS_INPUT_COMPOSITE_6: - dprintk("ks0127: command DECODER_SET_INPUT %d: " - "Composite\n", *iarg); - /* autodetect 50/60 Hz */ - ks0127_and_or(ks, KS_CMDA, 0xfc, 0x00); - /* VSE=0 */ - ks0127_and_or(ks, KS_CMDA, ~0x40, 0x00); - /* set input line */ - ks0127_and_or(ks, KS_CMDB, 0xb0, *iarg); - /* non-freerunning mode */ - ks0127_and_or(ks, KS_CMDC, 0x70, 0x0a); - /* analog input */ - ks0127_and_or(ks, KS_CMDD, 0x03, 0x00); - /* enable chroma demodulation */ - ks0127_and_or(ks, KS_CTRACK, 0xcf, 0x00); - /* chroma trap, HYBWR=1 */ - ks0127_and_or(ks, KS_LUMA, 0x00, - (reg_defaults[KS_LUMA])|0x0c); - /* scaler fullbw, luma comb off */ - ks0127_and_or(ks, KS_VERTIA, 0x08, 0x81); - /* manual chroma comb .25 .5 .25 */ - ks0127_and_or(ks, KS_VERTIC, 0x0f, 0x90); - - /* chroma path delay */ - ks0127_and_or(ks, KS_CHROMB, 0x0f, 0x90); - - ks0127_write(ks, KS_UGAIN, reg_defaults[KS_UGAIN]); - ks0127_write(ks, KS_VGAIN, reg_defaults[KS_VGAIN]); - ks0127_write(ks, KS_UVOFFH, reg_defaults[KS_UVOFFH]); - ks0127_write(ks, KS_UVOFFL, reg_defaults[KS_UVOFFL]); - break; - - case KS_INPUT_SVIDEO_1: - case KS_INPUT_SVIDEO_2: - case KS_INPUT_SVIDEO_3: - dprintk("ks0127: command DECODER_SET_INPUT %d: " - "S-Video\n", *iarg); - /* autodetect 50/60 Hz */ - ks0127_and_or(ks, KS_CMDA, 0xfc, 0x00); - /* VSE=0 */ - ks0127_and_or(ks, KS_CMDA, ~0x40, 0x00); - /* set input line */ - ks0127_and_or(ks, KS_CMDB, 0xb0, *iarg); - /* non-freerunning mode */ - ks0127_and_or(ks, KS_CMDC, 0x70, 0x0a); - /* analog input */ - ks0127_and_or(ks, KS_CMDD, 0x03, 0x00); - /* enable chroma demodulation */ - ks0127_and_or(ks, KS_CTRACK, 0xcf, 0x00); - ks0127_and_or(ks, KS_LUMA, 0x00, - reg_defaults[KS_LUMA]); - /* disable luma comb */ - ks0127_and_or(ks, KS_VERTIA, 0x08, - (reg_defaults[KS_VERTIA]&0xf0)|0x01); - ks0127_and_or(ks, KS_VERTIC, 0x0f, - reg_defaults[KS_VERTIC]&0xf0); - - ks0127_and_or(ks, KS_CHROMB, 0x0f, - reg_defaults[KS_CHROMB]&0xf0); - - ks0127_write(ks, KS_UGAIN, reg_defaults[KS_UGAIN]); - ks0127_write(ks, KS_VGAIN, reg_defaults[KS_VGAIN]); - ks0127_write(ks, KS_UVOFFH, reg_defaults[KS_UVOFFH]); - ks0127_write(ks, KS_UVOFFL, reg_defaults[KS_UVOFFL]); - break; - - case KS_INPUT_YUV656: - dprintk("ks0127: command DECODER_SET_INPUT 15: " - "YUV656\n"); - if (ks->norm == VIDEO_MODE_NTSC || - ks->norm == KS_STD_PAL_M) - /* force 60 Hz */ - ks0127_and_or(ks, KS_CMDA, 0xfc, 0x03); - else - /* force 50 Hz */ - ks0127_and_or(ks, KS_CMDA, 0xfc, 0x02); - - ks0127_and_or(ks, KS_CMDA, 0xff, 0x40); /* VSE=1 */ - /* set input line and VALIGN */ - ks0127_and_or(ks, KS_CMDB, 0xb0, (*iarg | 0x40)); - /* freerunning mode, */ - /* TSTGEN = 1 TSTGFR=11 TSTGPH=0 TSTGPK=0 VMEM=1*/ - ks0127_and_or(ks, KS_CMDC, 0x70, 0x87); - /* digital input, SYNDIR = 0 INPSL=01 CLKDIR=0 EAV=0 */ - ks0127_and_or(ks, KS_CMDD, 0x03, 0x08); - /* disable chroma demodulation */ - ks0127_and_or(ks, KS_CTRACK, 0xcf, 0x30); - /* HYPK =01 CTRAP = 0 HYBWR=0 PED=1 RGBH=1 UNIT=1 */ - ks0127_and_or(ks, KS_LUMA, 0x00, 0x71); - ks0127_and_or(ks, KS_VERTIC, 0x0f, - reg_defaults[KS_VERTIC]&0xf0); - - /* scaler fullbw, luma comb off */ - ks0127_and_or(ks, KS_VERTIA, 0x08, 0x81); - - ks0127_and_or(ks, KS_CHROMB, 0x0f, - reg_defaults[KS_CHROMB]&0xf0); - - ks0127_and_or(ks, KS_CON, 0x00, 0x00); - ks0127_and_or(ks, KS_BRT, 0x00, 32); /* spec: 34 */ - /* spec: 229 (e5) */ - ks0127_and_or(ks, KS_SAT, 0x00, 0xe8); - ks0127_and_or(ks, KS_HUE, 0x00, 0); - - ks0127_and_or(ks, KS_UGAIN, 0x00, 238); - ks0127_and_or(ks, KS_VGAIN, 0x00, 0x00); - - /*UOFF:0x30, VOFF:0x30, TSTCGN=1 */ - ks0127_and_or(ks, KS_UVOFFH, 0x00, 0x4f); - ks0127_and_or(ks, KS_UVOFFL, 0x00, 0x00); - break; - - default: - dprintk("ks0127: command DECODER_SET_INPUT: " - "Unknown input %d\n", *iarg); - break; - } - - /* hack: CDMLPF sometimes spontaneously switches on; */ - /* force back off */ - ks0127_write(ks, KS_DEMOD, reg_defaults[KS_DEMOD]); - break; - - case DECODER_SET_OUTPUT: - switch(*iarg) { - case KS_OUTPUT_YUV656E: - dprintk("ks0127: command DECODER_SET_OUTPUT: " - "OUTPUT_YUV656E (Missing)\n"); - return -EINVAL; - break; - - case KS_OUTPUT_EXV: - dprintk("ks0127: command DECODER_SET_OUTPUT: " - "OUTPUT_EXV\n"); - ks0127_and_or(ks, KS_OFMTA, 0xf0, 0x09); - break; - } - break; - - case DECODER_SET_NORM: //sam This block mixes old and new norm names... - /* Set to automatic SECAM/Fsc mode */ - ks0127_and_or(ks, KS_DEMOD, 0xf0, 0x00); - - ks->norm = *iarg; - switch(*iarg) - { - /* this is untested !! */ - /* It just detects PAL_N/NTSC_M (no special frequencies) */ - /* And you have to set the standard a second time afterwards */ - case VIDEO_MODE_AUTO: - dprintk("ks0127: command DECODER_SET_NORM: AUTO\n"); - - /* The chip determines the format */ - /* based on the current field rate */ - ks0127_and_or(ks, KS_CMDA, 0xfc, 0x00); - ks0127_and_or(ks, KS_CHROMA, 0x9f, 0x20); - /* This is wrong for PAL ! As I said, */ - /* you need to set the standard once again !! */ - ks->format_height = 240; - ks->format_width = 704; - break; - - case VIDEO_MODE_NTSC: - dprintk("ks0127: command DECODER_SET_NORM: NTSC_M\n"); - ks0127_and_or(ks, KS_CHROMA, 0x9f, 0x20); - ks->format_height = 240; - ks->format_width = 704; - break; - - case KS_STD_NTSC_N: - dprintk("ks0127: command KS0127_SET_STANDARD: " - "NTSC_N (fixme)\n"); - ks0127_and_or(ks, KS_CHROMA, 0x9f, 0x40); - ks->format_height = 240; - ks->format_width = 704; - break; - - case VIDEO_MODE_PAL: - dprintk("ks0127: command DECODER_SET_NORM: PAL_N\n"); - ks0127_and_or(ks, KS_CHROMA, 0x9f, 0x20); - ks->format_height = 290; - ks->format_width = 704; - break; - - case KS_STD_PAL_M: - dprintk("ks0127: command KS0127_SET_STANDARD: " - "PAL_M (fixme)\n"); - ks0127_and_or(ks, KS_CHROMA, 0x9f, 0x40); - ks->format_height = 290; - ks->format_width = 704; - break; - - case VIDEO_MODE_SECAM: - dprintk("ks0127: command KS0127_SET_STANDARD: " - "SECAM\n"); - ks->format_height = 290; - ks->format_width = 704; - - /* set to secam autodetection */ - ks0127_and_or(ks, KS_CHROMA, 0xdf, 0x20); - ks0127_and_or(ks, KS_DEMOD, 0xf0, 0x00); - schedule_timeout_interruptible(HZ/10+1); - - /* did it autodetect? */ - if (ks0127_read(ks, KS_DEMOD) & 0x40) - break; - - /* force to secam mode */ - ks0127_and_or(ks, KS_DEMOD, 0xf0, 0x0f); - break; - - default: - dprintk("ks0127: command DECODER_SET_NORM: " - "Unknown norm %d\n", *iarg); - break; - } - break; - - case DECODER_SET_PICTURE: - dprintk("ks0127: command DECODER_SET_PICTURE " - "not yet supported (fixme)\n"); - return -EINVAL; - - //sam todo: KS0127_SET_BRIGHTNESS: Merge into DECODER_SET_PICTURE - //sam todo: KS0127_SET_CONTRAST: Merge into DECODER_SET_PICTURE - //sam todo: KS0127_SET_HUE: Merge into DECODER_SET_PICTURE? - //sam todo: KS0127_SET_SATURATION: Merge into DECODER_SET_PICTURE - //sam todo: KS0127_SET_AGC_MODE: - //sam todo: KS0127_SET_AGC: - //sam todo: KS0127_SET_CHROMA_MODE: - //sam todo: KS0127_SET_PIXCLK_MODE: - //sam todo: KS0127_SET_GAMMA_MODE: - //sam todo: KS0127_SET_UGAIN: - //sam todo: KS0127_SET_VGAIN: - //sam todo: KS0127_SET_INVALY: - //sam todo: KS0127_SET_INVALU: - //sam todo: KS0127_SET_INVALV: - //sam todo: KS0127_SET_UNUSEY: - //sam todo: KS0127_SET_UNUSEU: - //sam todo: KS0127_SET_UNUSEV: - //sam todo: KS0127_SET_VSALIGN_MODE: - - case DECODER_ENABLE_OUTPUT: - { - - int *iarg = arg; - int enable = (*iarg != 0); - if (enable) { - dprintk("ks0127: command " - "DECODER_ENABLE_OUTPUT on " - "(%d)\n", enable); - /* All output pins on */ - ks0127_and_or(ks, KS_OFMTA, 0xcf, 0x30); - /* Obey the OEN pin */ - ks0127_and_or(ks, KS_CDEM, 0x7f, 0x00); - } else { - dprintk("ks0127: command " - "DECODER_ENABLE_OUTPUT off " - "(%d)\n", enable); - /* Video output pins off */ - ks0127_and_or(ks, KS_OFMTA, 0xcf, 0x00); - /* Ignore the OEN pin */ - ks0127_and_or(ks, KS_CDEM, 0x7f, 0x80); - } - } - break; - - //sam todo: KS0127_SET_OUTPUT_MODE: - //sam todo: KS0127_SET_WIDTH: - //sam todo: KS0127_SET_HEIGHT: - //sam todo: KS0127_SET_HSCALE: - - case DECODER_GET_STATUS: - dprintk("ks0127: command DECODER_GET_STATUS\n"); - *iarg = 0; - status = ks0127_read(ks, KS_STAT); - if (!(status & 0x20)) /* NOVID not set */ - *iarg = (*iarg & DECODER_STATUS_GOOD); - if ((status & 0x01)) /* CLOCK set */ - *iarg = (*iarg & DECODER_STATUS_COLOR); - if ((status & 0x08)) /* PALDET set */ - *iarg = (*iarg & DECODER_STATUS_PAL); - else - *iarg = (*iarg & DECODER_STATUS_NTSC); - break; - - //Catch any unknown command - default: - dprintk("ks0127: command unknown: %04X\n", cmd); - return -EINVAL; - } - return 0; -} - - - - -static int ks0127_probe(struct i2c_adapter *adapter); -static int ks0127_detach(struct i2c_client *client); -static int ks0127_command(struct i2c_client *client, - unsigned int cmd, void *arg); - - - -/* Addresses to scan */ -static unsigned short normal_i2c[] = {I2C_KS0127_ADDON>>1, - I2C_KS0127_ONBOARD>>1, I2C_CLIENT_END}; -static unsigned short probe[2] = {I2C_CLIENT_END, I2C_CLIENT_END}; -static unsigned short ignore[2] = {I2C_CLIENT_END, I2C_CLIENT_END}; -static struct i2c_client_address_data addr_data = { - normal_i2c, - probe, - ignore, -}; - -static struct i2c_driver i2c_driver_ks0127 = { - .driver.name = "ks0127", - .id = I2C_DRIVERID_KS0127, - .attach_adapter = ks0127_probe, - .detach_client = ks0127_detach, - .command = ks0127_command -}; - -static struct i2c_client ks0127_client_tmpl = -{ - .name = "(ks0127 unset)", - .addr = 0, - .adapter = NULL, - .driver = &i2c_driver_ks0127, - .usage_count = 0 -}; - -static int ks0127_found_proc(struct i2c_adapter *adapter, int addr, int kind) -{ - struct ks0127 *ks; - struct i2c_client *client; - - client = kzalloc(sizeof(*client), GFP_KERNEL); - if (client == NULL) - return -ENOMEM; - memcpy(client, &ks0127_client_tmpl, sizeof(*client)); - - ks = kzalloc(sizeof(*ks), GFP_KERNEL); - if (ks == NULL) { - kfree(client); - return -ENOMEM; - } - - i2c_set_clientdata(client, ks); - client->adapter = adapter; - client->addr = addr; - sprintf(client->name, "ks0127-%02x", adapter->id); - - ks->client = client; - ks->addr = addr; - ks->ks_type = KS_TYPE_UNKNOWN; - - /* power up */ - ks0127_write(ks, KS_CMDA, 0x2c); - mdelay(10); - - /* reset the device */ - ks0127_reset(ks); - printk(KERN_INFO "ks0127: attach: %s video decoder\n", - ks->addr==(I2C_KS0127_ADDON>>1) ? "addon" : "on-board"); - - i2c_attach_client(client); - return 0; -} - - -static int ks0127_probe(struct i2c_adapter *adapter) -{ - if (adapter->id == I2C_HW_B_ZR36067) - return i2c_probe(adapter, &addr_data, ks0127_found_proc); - return 0; -} - -static int ks0127_detach(struct i2c_client *client) -{ - struct ks0127 *ks = i2c_get_clientdata(client); - - ks0127_write(ks, KS_OFMTA, 0x20); /*tristate*/ - ks0127_write(ks, KS_CMDA, 0x2c | 0x80); /* power down */ - - i2c_detach_client(client); - kfree(ks); - kfree(client); - - dprintk("ks0127: detach\n"); - return 0; -} - - -static int __devinit ks0127_init_module(void) -{ - init_reg_defaults(); - i2c_add_driver(&i2c_driver_ks0127); - return 0; -} - -static void __devexit ks0127_cleanup_module(void) -{ - i2c_del_driver(&i2c_driver_ks0127); -} - - -module_init(ks0127_init_module); -module_exit(ks0127_cleanup_module); diff --git a/drivers/media/video/ks0127.h b/drivers/media/video/ks0127.h deleted file mode 100644 index 1ec578833..000000000 --- a/drivers/media/video/ks0127.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Video Capture Driver ( Video for Linux 1/2 ) - * for the Matrox Marvel G200,G400 and Rainbow Runner-G series - * - * This module is an interface to the KS0127 video decoder chip. - * - * Copyright (C) 1999 Ryan Drake - * - * 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 KS0127_H -#define KS0127_H - -#include - -/* input channels */ -#define KS_INPUT_COMPOSITE_1 0 -#define KS_INPUT_COMPOSITE_2 1 -#define KS_INPUT_COMPOSITE_3 2 -#define KS_INPUT_COMPOSITE_4 4 -#define KS_INPUT_COMPOSITE_5 5 -#define KS_INPUT_COMPOSITE_6 6 - -#define KS_INPUT_SVIDEO_1 8 -#define KS_INPUT_SVIDEO_2 9 -#define KS_INPUT_SVIDEO_3 10 - -#define KS_INPUT_YUV656 15 -#define KS_INPUT_COUNT 10 - -/* output channels */ -#define KS_OUTPUT_YUV656E 0 -#define KS_OUTPUT_EXV 1 - -/* video standards */ -#define KS_STD_NTSC_N 112 /* 50 Hz NTSC */ -#define KS_STD_PAL_M 113 /* 60 Hz PAL */ - -#endif /* KS0127_H */ - diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index e278753f8..850bee970 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c @@ -26,12 +26,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include #include #include -#include #include #include #include @@ -1682,13 +1682,13 @@ static unsigned int meye_poll(struct file *file, poll_table *wait) static void meye_vm_open(struct vm_area_struct *vma) { - long idx = (long)vma->vm_private_data; + int idx = (int)vma->vm_private_data; meye.vma_use_count[idx]++; } static void meye_vm_close(struct vm_area_struct *vma) { - long idx = (long)vma->vm_private_data; + int idx = (int)vma->vm_private_data; meye.vma_use_count[idx]--; } @@ -1881,7 +1881,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, meye.mchip_irq = pcidev->irq; if (request_irq(meye.mchip_irq, meye_irq, - IRQF_DISABLED | IRQF_SHARED, "meye", meye_irq)) { + SA_INTERRUPT | SA_SHIRQ, "meye", meye_irq)) { printk(KERN_ERR "meye: request_irq failed\n"); goto outreqirq; } diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h index ea107cb5c..0d09a0e38 100644 --- a/drivers/media/video/meye.h +++ b/drivers/media/video/meye.h @@ -36,6 +36,7 @@ #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ __stringify(MEYE_DRIVER_MINORVERSION) +#include #include #include #include diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index cf43df3fe..b806999d6 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c @@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout) } /* ------------------------------------------------------------------------ */ -#ifdef CONFIG_VIDEO_V4L1 + static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) { if (rxsubchans == V4L2_TUNER_SUB_MONO) @@ -384,7 +384,67 @@ static int msp_mode_v4l1_to_v4l2(int mode) return V4L2_TUNER_MODE_LANG1; return V4L2_TUNER_MODE_MONO; } -#endif + +static struct v4l2_queryctrl msp_qctrl_std[] = { + { + .id = V4L2_CID_AUDIO_VOLUME, + .name = "Volume", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 58880, + .flags = 0, + .type = V4L2_CTRL_TYPE_INTEGER, + },{ + .id = V4L2_CID_AUDIO_MUTE, + .name = "Mute", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1, + .flags = 0, + .type = V4L2_CTRL_TYPE_BOOLEAN, + }, +}; + +static struct v4l2_queryctrl msp_qctrl_sound_processing[] = { + { + .id = V4L2_CID_AUDIO_BALANCE, + .name = "Balance", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + .flags = 0, + .type = V4L2_CTRL_TYPE_INTEGER, + },{ + .id = V4L2_CID_AUDIO_BASS, + .name = "Bass", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + .type = V4L2_CTRL_TYPE_INTEGER, + },{ + .id = V4L2_CID_AUDIO_TREBLE, + .name = "Treble", + .minimum = 0, + .maximum = 65535, + .step = 65535/100, + .default_value = 32768, + .type = V4L2_CTRL_TYPE_INTEGER, + },{ + .id = V4L2_CID_AUDIO_LOUDNESS, + .name = "Loudness", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 1, + .flags = 0, + .type = V4L2_CTRL_TYPE_BOOLEAN, + }, +}; + static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl) { @@ -510,7 +570,6 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */ -#ifdef CONFIG_VIDEO_V4L1 case VIDIOCGAUDIO: { struct video_audio *va = arg; @@ -579,12 +638,6 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) } case VIDIOCSFREQ: - { - /* new channel -- kick audio carrier scan */ - msp_wake_thread(client); - break; - } -#endif case VIDIOC_S_FREQUENCY: { /* new channel -- kick audio carrier scan */ @@ -621,31 +674,22 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) int sc1_out = rt->output & 0xf; int sc2_out = (rt->output >> 4) & 0xf; u16 val, reg; - int i; - int extern_input = 1; if (state->routing.input == rt->input && state->routing.output == rt->output) break; state->routing = *rt; - /* check if the tuner input is used */ - for (i = 0; i < 5; i++) { - if (((rt->input >> (4 + i * 4)) & 0xf) == 0) - extern_input = 0; - } - if (extern_input) - state->mode = MSP_MODE_EXTERN; - else - state->mode = MSP_MODE_AM_DETECT; msp_set_scart(client, sc_in, 0); msp_set_scart(client, sc1_out, 1); msp_set_scart(client, sc2_out, 2); msp_set_audmode(client); reg = (state->opmode == OPMODE_AUTOSELECT) ? 0x30 : 0xbb; val = msp_read_dem(client, reg); - msp_write_dem(client, reg, (val & ~0x100) | (tuner << 8)); - /* wake thread when a new input is chosen */ - msp_wake_thread(client); + if (tuner != ((val >> 8) & 1)) { + msp_write_dem(client, reg, (val & ~0x100) | (tuner << 8)); + /* wake thread when a new tuner input is chosen */ + msp_wake_thread(client); + } break; } @@ -700,25 +744,21 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) case VIDIOC_QUERYCTRL: { struct v4l2_queryctrl *qc = arg; + int i; - switch (qc->id) { - case V4L2_CID_AUDIO_VOLUME: - case V4L2_CID_AUDIO_MUTE: - return v4l2_ctrl_query_fill_std(qc); - default: - break; - } + for (i = 0; i < ARRAY_SIZE(msp_qctrl_std); i++) + if (qc->id && qc->id == msp_qctrl_std[i].id) { + memcpy(qc, &msp_qctrl_std[i], sizeof(*qc)); + return 0; + } if (!state->has_sound_processing) return -EINVAL; - switch (qc->id) { - case V4L2_CID_AUDIO_LOUDNESS: - case V4L2_CID_AUDIO_BALANCE: - case V4L2_CID_AUDIO_BASS: - case V4L2_CID_AUDIO_TREBLE: - return v4l2_ctrl_query_fill_std(qc); - default: - return -EINVAL; - } + for (i = 0; i < ARRAY_SIZE(msp_qctrl_sound_processing); i++) + if (qc->id && qc->id == msp_qctrl_sound_processing[i].id) { + memcpy(qc, &msp_qctrl_sound_processing[i], sizeof(*qc)); + return 0; + } + return -EINVAL; } case VIDIOC_G_CTRL: @@ -754,9 +794,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) case MSP_MODE_EXTERN: p = "External input"; break; default: p = "unknown"; break; } - if (state->mode == MSP_MODE_EXTERN) { - v4l_info(client, "Mode: %s\n", p); - } else if (state->opmode == OPMODE_MANUAL) { + if (state->opmode == OPMODE_MANUAL) { v4l_info(client, "Mode: %s (%s%s)\n", p, (state->rxsubchans & V4L2_TUNER_SUB_STEREO) ? "stereo" : "mono", (state->rxsubchans & V4L2_TUNER_SUB_LANG2) ? ", dual" : ""); @@ -904,8 +942,6 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) state->has_virtual_dolby_surround = msp_revision == 'G' && msp_prod_lo == 1; /* Has Virtual Dolby Surround & Dolby Pro Logic: only in msp34x2 */ state->has_dolby_pro_logic = msp_revision == 'G' && msp_prod_lo == 2; - /* The msp343xG supports BTSC only and cannot do Automatic Standard Detection. */ - state->force_btsc = msp_family == 3 && msp_revision == 'G' && msp_prod_hi == 3; state->opmode = opmode; if (state->opmode == OPMODE_AUTO) { diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/video/msp3400-driver.h index 7531efa16..4e4510490 100644 --- a/drivers/media/video/msp3400-driver.h +++ b/drivers/media/video/msp3400-driver.h @@ -64,7 +64,6 @@ struct msp_state { u8 has_sound_processing; u8 has_virtual_dolby_surround; u8 has_dolby_pro_logic; - u8 force_btsc; int radio; int opmode; @@ -91,8 +90,8 @@ struct msp_state { /* thread */ struct task_struct *kthread; wait_queue_head_t wq; - unsigned int restart:1; - unsigned int watch_stereo:1; + int restart:1; + int watch_stereo:1; }; /* msp3400-driver.c */ diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index 4c7f85b56..633a10213 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c @@ -244,21 +244,19 @@ static void msp3400c_set_audmode(struct i2c_client *client) the hardware does not support SAP. So the rxsubchans combination of STEREO | LANG2 does not occur. */ - if (state->mode != MSP_MODE_EXTERN) { - /* switch to mono if only mono is available */ - if (state->rxsubchans == V4L2_TUNER_SUB_MONO) - audmode = V4L2_TUNER_MODE_MONO; - /* if bilingual */ - else if (state->rxsubchans & V4L2_TUNER_SUB_LANG2) { - /* and mono or stereo, then fallback to lang1 */ - if (audmode == V4L2_TUNER_MODE_MONO || - audmode == V4L2_TUNER_MODE_STEREO) - audmode = V4L2_TUNER_MODE_LANG1; - } - /* if stereo, and audmode is not mono, then switch to stereo */ - else if (audmode != V4L2_TUNER_MODE_MONO) - audmode = V4L2_TUNER_MODE_STEREO; + /* switch to mono if only mono is available */ + if (state->rxsubchans == V4L2_TUNER_SUB_MONO) + audmode = V4L2_TUNER_MODE_MONO; + /* if bilingual */ + else if (state->rxsubchans & V4L2_TUNER_SUB_LANG2) { + /* and mono or stereo, then fallback to lang1 */ + if (audmode == V4L2_TUNER_MODE_MONO || + audmode == V4L2_TUNER_MODE_STEREO) + audmode = V4L2_TUNER_MODE_LANG1; } + /* if stereo, and audmode is not mono, then switch to stereo */ + else if (audmode != V4L2_TUNER_MODE_MONO) + audmode = V4L2_TUNER_MODE_STEREO; /* switch demodulator */ switch (state->mode) { @@ -483,7 +481,6 @@ int msp3400c_thread(void *data) /* no carrier scan, just unmute */ v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); state->scan_in_progress = 0; - state->rxsubchans = V4L2_TUNER_SUB_STEREO; msp_set_audio(client); continue; } @@ -950,22 +947,13 @@ int msp34xxg_thread(void *data) if (kthread_should_stop()) break; - if (state->mode == MSP_MODE_EXTERN) { - /* no carrier scan needed, just unmute */ - v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); - state->scan_in_progress = 0; - msp_set_audio(client); - continue; - } - /* setup the chip*/ msp34xxg_reset(client); - state->std = state->radio ? 0x40 : - (state->force_btsc && msp_standard == 1) ? 32 : msp_standard; - msp_write_dem(client, 0x20, state->std); - /* start autodetect */ + state->std = state->radio ? 0x40 : msp_standard; if (state->std != 1) goto unmute; + /* start autodetect */ + msp_write_dem(client, 0x20, state->std); /* watch autodetect */ v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); @@ -990,11 +978,6 @@ int msp34xxg_thread(void *data) v4l_dbg(1, msp_debug, client, "detected standard: %s (0x%04x)\n", msp_standard_std_name(state->std), state->std); - if (state->std == 9) { - /* AM NICAM mode */ - msp_write_dsp(client, 0x0e, 0x7c00); - } - /* unmute: dispatch sound to scart output, set scart volume */ msp_set_audio(client); diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index 1b07a61c2..fdc8e3f13 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c @@ -35,6 +35,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -3238,7 +3239,7 @@ ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n) RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw); if (frame->scanstate == STATE_LINES) { - int nextf; + int nextf; frame->grabstate = FRAME_DONE; wake_up_interruptible(&frame->wq); @@ -3404,7 +3405,7 @@ eof: RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw); if (frame->scanstate == STATE_LINES) { - int nextf; + int nextf; frame->grabstate = FRAME_DONE; wake_up_interruptible(&frame->wq); diff --git a/drivers/media/video/ov511.h b/drivers/media/video/ov511.h index 68b082bce..12b3d51e1 100644 --- a/drivers/media/video/ov511.h +++ b/drivers/media/video/ov511.h @@ -3,7 +3,6 @@ #include #include -#include #include #include #include diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c index 3484e36b6..d9e3cada5 100644 --- a/drivers/media/video/planb.c +++ b/drivers/media/video/planb.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 5d681fa8b..09835ca09 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -805,7 +804,7 @@ static int pms_do_ioctl(struct inode *inode, struct file *file, struct video_picture *p = arg; if(!((p->palette==VIDEO_PALETTE_RGB565 && p->depth==16) ||(p->palette==VIDEO_PALETTE_RGB555 && p->depth==15))) - return -EINVAL; + return -EINVAL; pd->picture= *p; /* diff --git a/drivers/media/video/pvrusb2/Kconfig b/drivers/media/video/pvrusb2/Kconfig deleted file mode 100644 index e43a97927..000000000 --- a/drivers/media/video/pvrusb2/Kconfig +++ /dev/null @@ -1,57 +0,0 @@ -config VIDEO_PVRUSB2 - tristate "Hauppauge WinTV-PVR USB2 support" - depends on VIDEO_V4L2 && USB && I2C && EXPERIMENTAL - select FW_LOADER - select VIDEO_TUNER - select VIDEO_TVEEPROM - select VIDEO_CX2341X - select VIDEO_SAA711X - select VIDEO_MSP3400 - ---help--- - This is a video4linux driver for Conexant 23416 based - usb2 personal video recorder devices. - - To compile this driver as a module, choose M here: the - module will be called pvrusb2 - -config VIDEO_PVRUSB2_24XXX - bool "Hauppauge WinTV-PVR USB2 support for 24xxx model series" - depends on VIDEO_PVRUSB2 && EXPERIMENTAL - select VIDEO_CX25840 - select VIDEO_WM8775 - ---help--- - This option enables inclusion of additional logic to operate - newer WinTV-PVR USB2 devices whose model number is of the - form "24xxx" (leading prefix of "24" followed by 3 digits). - To see if you may need this option, examine the white - sticker on the underside of your device. Enabling this - option will not harm support for older devices. - - If you are in doubt, say Y. - -config VIDEO_PVRUSB2_SYSFS - bool "pvrusb2 sysfs support (EXPERIMENTAL)" - default y - depends on VIDEO_PVRUSB2 && SYSFS && EXPERIMENTAL - ---help--- - This option enables the operation of a sysfs based - interface for query and control of the pvrusb2 driver. - - This is not generally needed for v4l applications, - although certain applications are optimized to take - advantage of this feature. - - If you are in doubt, say Y. - - Note: This feature is experimental and subject to change. - -config VIDEO_PVRUSB2_DEBUGIFC - bool "pvrusb2 debug interface" - depends on VIDEO_PVRUSB2_SYSFS - ---help--- - This option enables the inclusion of a debug interface - in the pvrusb2 driver, hosted through sysfs. - - You do not need to select this option unless you plan - on debugging the driver or performing a manual firmware - extraction. diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile deleted file mode 100644 index 02e414210..000000000 --- a/drivers/media/video/pvrusb2/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -obj-pvrusb2-sysfs-$(CONFIG_VIDEO_PVRUSB2_SYSFS) := pvrusb2-sysfs.o -obj-pvrusb2-debugifc-$(CONFIG_VIDEO_PVRUSB2_DEBUGIFC) := pvrusb2-debugifc.o - -obj-pvrusb2-24xxx-$(CONFIG_VIDEO_PVRUSB2_24XXX) := \ - pvrusb2-cx2584x-v4l.o \ - pvrusb2-wm8775.o - -pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \ - pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \ - pvrusb2-encoder.o pvrusb2-video-v4l.o \ - pvrusb2-eeprom.o pvrusb2-tuner.o \ - pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \ - pvrusb2-ctrl.o pvrusb2-std.o \ - pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \ - $(obj-pvrusb2-24xxx-y) \ - $(obj-pvrusb2-sysfs-y) $(obj-pvrusb2-debugifc-y) - -obj-$(CONFIG_VIDEO_PVRUSB2) += pvrusb2.o diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c deleted file mode 100644 index 9846c464e..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-audio.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 "pvrusb2-audio.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include -#include -#include - -struct pvr2_msp3400_handler { - struct pvr2_hdw *hdw; - struct pvr2_i2c_client *client; - struct pvr2_i2c_handler i2c_handler; - struct pvr2_audio_stat astat; - unsigned long stale_mask; -}; - - -/* This function selects the correct audio input source */ -static void set_stereo(struct pvr2_msp3400_handler *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - struct v4l2_routing route; - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo"); - - if (hdw->input_val == PVR2_CVAL_INPUT_TV) { - struct v4l2_tuner vt; - memset(&vt,0,sizeof(vt)); - vt.audmode = hdw->audiomode_val; - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_S_TUNER,&vt); - } - - route.input = MSP_INPUT_DEFAULT; - route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1); - switch (hdw->input_val) { - case PVR2_CVAL_INPUT_TV: - break; - case PVR2_CVAL_INPUT_RADIO: - /* Assume that msp34xx also handle FM decoding, in which case - we're still using the tuner. */ - /* HV: actually it is more likely to be the SCART2 input if - the ivtv experience is any indication. */ - route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, - MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); - break; - case PVR2_CVAL_INPUT_SVIDEO: - case PVR2_CVAL_INPUT_COMPOSITE: - /* SCART 1 input */ - route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, - MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); - break; - } - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); -} - - -static int check_stereo(struct pvr2_msp3400_handler *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return (hdw->input_dirty || - hdw->audiomode_dirty); -} - - -struct pvr2_msp3400_ops { - void (*update)(struct pvr2_msp3400_handler *); - int (*check)(struct pvr2_msp3400_handler *); -}; - - -static const struct pvr2_msp3400_ops msp3400_ops[] = { - { .update = set_stereo, .check = check_stereo}, -}; - - -static int msp3400_check(struct pvr2_msp3400_handler *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(msp3400_ops)/sizeof(msp3400_ops[0]); - idx++) { - msk = 1 << idx; - if (ctxt->stale_mask & msk) continue; - if (msp3400_ops[idx].check(ctxt)) { - ctxt->stale_mask |= msk; - } - } - return ctxt->stale_mask != 0; -} - - -static void msp3400_update(struct pvr2_msp3400_handler *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(msp3400_ops)/sizeof(msp3400_ops[0]); - idx++) { - msk = 1 << idx; - if (!(ctxt->stale_mask & msk)) continue; - ctxt->stale_mask &= ~msk; - msp3400_ops[idx].update(ctxt); - } -} - - -/* This reads back the current signal type */ -static int get_audio_status(struct pvr2_msp3400_handler *ctxt) -{ - struct v4l2_tuner vt; - int stat; - - memset(&vt,0,sizeof(vt)); - stat = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_G_TUNER,&vt); - if (stat < 0) return stat; - - ctxt->hdw->flag_stereo = (vt.audmode & V4L2_TUNER_MODE_STEREO) != 0; - ctxt->hdw->flag_bilingual = - (vt.audmode & V4L2_TUNER_MODE_LANG2) != 0; - return 0; -} - - -static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) -{ - ctxt->client->handler = NULL; - ctxt->hdw->audio_stat = NULL; - kfree(ctxt); -} - - -static unsigned int pvr2_msp3400_describe(struct pvr2_msp3400_handler *ctxt, - char *buf,unsigned int cnt) -{ - return scnprintf(buf,cnt,"handler: pvrusb2-audio v4l2"); -} - - -const static struct pvr2_i2c_handler_functions msp3400_funcs = { - .detach = (void (*)(void *))pvr2_msp3400_detach, - .check = (int (*)(void *))msp3400_check, - .update = (void (*)(void *))msp3400_update, - .describe = (unsigned int (*)(void *,char *,unsigned int))pvr2_msp3400_describe, -}; - - -int pvr2_i2c_msp3400_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) -{ - struct pvr2_msp3400_handler *ctxt; - if (hdw->audio_stat) return 0; - if (cp->handler) return 0; - - ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); - if (!ctxt) return 0; - memset(ctxt,0,sizeof(*ctxt)); - - ctxt->i2c_handler.func_data = ctxt; - ctxt->i2c_handler.func_table = &msp3400_funcs; - ctxt->client = cp; - ctxt->hdw = hdw; - ctxt->astat.ctxt = ctxt; - ctxt->astat.status = (int (*)(void *))get_audio_status; - ctxt->astat.detach = (void (*)(void *))pvr2_msp3400_detach; - ctxt->stale_mask = (1 << (sizeof(msp3400_ops)/ - sizeof(msp3400_ops[0]))) - 1; - cp->handler = &ctxt->i2c_handler; - hdw->audio_stat = &ctxt->astat; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L2 handler set up", - cp->client->addr); - return !0; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.h b/drivers/media/video/pvrusb2/pvrusb2-audio.h deleted file mode 100644 index 536339b68..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-audio.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_AUDIO_H -#define __PVRUSB2_AUDIO_H - -#include "pvrusb2-i2c-core.h" - -int pvr2_i2c_msp3400_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); - -#endif /* __PVRUSB2_AUDIO_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c deleted file mode 100644 index f129f316d..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-context.h" -#include "pvrusb2-io.h" -#include "pvrusb2-ioread.h" -#include "pvrusb2-hdw.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include - - -static void pvr2_context_destroy(struct pvr2_context *mp) -{ - if (mp->hdw) pvr2_hdw_destroy(mp->hdw); - pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr_main id=%p",mp); - flush_workqueue(mp->workqueue); - destroy_workqueue(mp->workqueue); - kfree(mp); -} - - -static void pvr2_context_trigger_poll(struct pvr2_context *mp) -{ - queue_work(mp->workqueue,&mp->workpoll); -} - - -static void pvr2_context_poll(struct pvr2_context *mp) -{ - pvr2_context_enter(mp); do { - pvr2_hdw_poll(mp->hdw); - } while (0); pvr2_context_exit(mp); -} - - -static void pvr2_context_setup(struct pvr2_context *mp) -{ - pvr2_context_enter(mp); do { - if (!pvr2_hdw_dev_ok(mp->hdw)) break; - pvr2_hdw_setup(mp->hdw); - pvr2_hdw_setup_poll_trigger( - mp->hdw, - (void (*)(void *))pvr2_context_trigger_poll, - mp); - if (!pvr2_hdw_dev_ok(mp->hdw)) break; - if (!pvr2_hdw_init_ok(mp->hdw)) break; - mp->video_stream.stream = pvr2_hdw_get_video_stream(mp->hdw); - if (mp->setup_func) { - mp->setup_func(mp); - } - } while (0); pvr2_context_exit(mp); -} - - -struct pvr2_context *pvr2_context_create( - struct usb_interface *intf, - const struct usb_device_id *devid, - void (*setup_func)(struct pvr2_context *)) -{ - struct pvr2_context *mp = NULL; - mp = kmalloc(sizeof(*mp),GFP_KERNEL); - if (!mp) goto done; - memset(mp,0,sizeof(*mp)); - pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_main id=%p",mp); - mp->setup_func = setup_func; - mutex_init(&mp->mutex); - mp->hdw = pvr2_hdw_create(intf,devid); - if (!mp->hdw) { - pvr2_context_destroy(mp); - mp = NULL; - goto done; - } - - mp->workqueue = create_singlethread_workqueue("pvrusb2"); - INIT_WORK(&mp->workinit,(void (*)(void*))pvr2_context_setup,mp); - INIT_WORK(&mp->workpoll,(void (*)(void*))pvr2_context_poll,mp); - queue_work(mp->workqueue,&mp->workinit); - done: - return mp; -} - - -void pvr2_context_enter(struct pvr2_context *mp) -{ - mutex_lock(&mp->mutex); - pvr2_trace(PVR2_TRACE_CREG,"pvr2_context_enter(id=%p)",mp); -} - - -void pvr2_context_exit(struct pvr2_context *mp) -{ - int destroy_flag = 0; - if (!(mp->mc_first || !mp->disconnect_flag)) { - destroy_flag = !0; - } - pvr2_trace(PVR2_TRACE_CREG,"pvr2_context_exit(id=%p) outside",mp); - mutex_unlock(&mp->mutex); - if (destroy_flag) pvr2_context_destroy(mp); -} - - -static void pvr2_context_run_checks(struct pvr2_context *mp) -{ - struct pvr2_channel *ch1,*ch2; - for (ch1 = mp->mc_first; ch1; ch1 = ch2) { - ch2 = ch1->mc_next; - if (ch1->check_func) { - ch1->check_func(ch1); - } - } -} - - -void pvr2_context_disconnect(struct pvr2_context *mp) -{ - pvr2_context_enter(mp); do { - pvr2_hdw_disconnect(mp->hdw); - mp->disconnect_flag = !0; - pvr2_context_run_checks(mp); - } while (0); pvr2_context_exit(mp); -} - - -void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) -{ - cp->hdw = mp->hdw; - cp->mc_head = mp; - cp->mc_next = NULL; - cp->mc_prev = mp->mc_last; - if (mp->mc_last) { - mp->mc_last->mc_next = cp; - } else { - mp->mc_first = cp; - } - mp->mc_last = cp; -} - - -static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) -{ - if (!cp->stream) return; - pvr2_stream_kill(cp->stream->stream); - cp->stream->user = NULL; - cp->stream = NULL; -} - - -void pvr2_channel_done(struct pvr2_channel *cp) -{ - struct pvr2_context *mp = cp->mc_head; - pvr2_channel_disclaim_stream(cp); - if (cp->mc_next) { - cp->mc_next->mc_prev = cp->mc_prev; - } else { - mp->mc_last = cp->mc_prev; - } - if (cp->mc_prev) { - cp->mc_prev->mc_next = cp->mc_next; - } else { - mp->mc_first = cp->mc_next; - } - cp->hdw = NULL; -} - - -int pvr2_channel_claim_stream(struct pvr2_channel *cp, - struct pvr2_context_stream *sp) -{ - int code = 0; - pvr2_context_enter(cp->mc_head); do { - if (sp == cp->stream) break; - if (sp->user) { - code = -EBUSY; - break; - } - pvr2_channel_disclaim_stream(cp); - if (!sp) break; - sp->user = cp; - cp->stream = sp; - } while (0); pvr2_context_exit(cp->mc_head); - return code; -} - - -// This is the marker for the real beginning of a legitimate mpeg2 stream. -static char stream_sync_key[] = { - 0x00, 0x00, 0x01, 0xba, -}; - -struct pvr2_ioread *pvr2_channel_create_mpeg_stream( - struct pvr2_context_stream *sp) -{ - struct pvr2_ioread *cp; - cp = pvr2_ioread_create(); - if (!cp) return NULL; - pvr2_ioread_setup(cp,sp->stream); - pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); - return cp; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.h b/drivers/media/video/pvrusb2/pvrusb2-context.h deleted file mode 100644 index 6327fa1f7..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-context.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_BASE_H -#define __PVRUSB2_BASE_H - -#include -#include -#include - -struct pvr2_hdw; /* hardware interface - defined elsewhere */ -struct pvr2_stream; /* stream interface - defined elsewhere */ - -struct pvr2_context; /* All central state */ -struct pvr2_channel; /* One I/O pathway to a user */ -struct pvr2_context_stream; /* Wrapper for a stream */ -struct pvr2_crit_reg; /* Critical region pointer */ -struct pvr2_ioread; /* Low level stream structure */ - -struct pvr2_context_stream { - struct pvr2_channel *user; - struct pvr2_stream *stream; -}; - -struct pvr2_context { - struct pvr2_channel *mc_first; - struct pvr2_channel *mc_last; - struct pvr2_hdw *hdw; - struct pvr2_context_stream video_stream; - struct mutex mutex; - int disconnect_flag; - - /* Called after pvr2_context initialization is complete */ - void (*setup_func)(struct pvr2_context *); - - /* Work queue overhead for out-of-line processing */ - struct workqueue_struct *workqueue; - struct work_struct workinit; - struct work_struct workpoll; -}; - -struct pvr2_channel { - struct pvr2_context *mc_head; - struct pvr2_channel *mc_next; - struct pvr2_channel *mc_prev; - struct pvr2_context_stream *stream; - struct pvr2_hdw *hdw; - void (*check_func)(struct pvr2_channel *); -}; - -void pvr2_context_enter(struct pvr2_context *); -void pvr2_context_exit(struct pvr2_context *); - -struct pvr2_context *pvr2_context_create(struct usb_interface *intf, - const struct usb_device_id *devid, - void (*setup_func)(struct pvr2_context *)); -void pvr2_context_disconnect(struct pvr2_context *); - -void pvr2_channel_init(struct pvr2_channel *,struct pvr2_context *); -void pvr2_channel_done(struct pvr2_channel *); -int pvr2_channel_claim_stream(struct pvr2_channel *, - struct pvr2_context_stream *); -struct pvr2_ioread *pvr2_channel_create_mpeg_stream( - struct pvr2_context_stream *); - - -#endif /* __PVRUSB2_CONTEXT_H */ -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c deleted file mode 100644 index c77de859c..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ /dev/null @@ -1,602 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-ctrl.h" -#include "pvrusb2-hdw-internal.h" -#include -#include -#include - - -/* Set the given control. */ -int pvr2_ctrl_set_value(struct pvr2_ctrl *cptr,int val) -{ - return pvr2_ctrl_set_mask_value(cptr,~0,val); -} - - -/* Set/clear specific bits of the given control. */ -int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *cptr,int mask,int val) -{ - int ret = 0; - if (!cptr) return -EINVAL; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->set_value != 0) { - if (cptr->info->type == pvr2_ctl_bitmask) { - mask &= cptr->info->def.type_bitmask.valid_bits; - } else if (cptr->info->type == pvr2_ctl_int) { - int lim; - lim = cptr->info->def.type_int.min_value; - if (cptr->info->get_min_value) { - cptr->info->get_min_value(cptr,&lim); - } - if (val < lim) break; - lim = cptr->info->def.type_int.max_value; - if (cptr->info->get_max_value) { - cptr->info->get_max_value(cptr,&lim); - } - if (val > lim) break; - } else if (cptr->info->type == pvr2_ctl_enum) { - if (val >= cptr->info->def.type_enum.count) { - break; - } - } else if (cptr->info->type != pvr2_ctl_bool) { - break; - } - ret = cptr->info->set_value(cptr,mask,val); - } else { - ret = -EPERM; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Get the current value of the given control. */ -int pvr2_ctrl_get_value(struct pvr2_ctrl *cptr,int *valptr) -{ - int ret = 0; - if (!cptr) return -EINVAL; - LOCK_TAKE(cptr->hdw->big_lock); do { - ret = cptr->info->get_value(cptr,valptr); - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve control's type */ -enum pvr2_ctl_type pvr2_ctrl_get_type(struct pvr2_ctrl *cptr) -{ - if (!cptr) return pvr2_ctl_int; - return cptr->info->type; -} - - -/* Retrieve control's maximum value (int type) */ -int pvr2_ctrl_get_max(struct pvr2_ctrl *cptr) -{ - int ret = 0; - if (!cptr) return 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->get_max_value) { - cptr->info->get_max_value(cptr,&ret); - } else if (cptr->info->type == pvr2_ctl_int) { - ret = cptr->info->def.type_int.max_value; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve control's minimum value (int type) */ -int pvr2_ctrl_get_min(struct pvr2_ctrl *cptr) -{ - int ret = 0; - if (!cptr) return 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->get_min_value) { - cptr->info->get_min_value(cptr,&ret); - } else if (cptr->info->type == pvr2_ctl_int) { - ret = cptr->info->def.type_int.min_value; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve control's default value (any type) */ -int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr) -{ - int ret = 0; - if (!cptr) return 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_int) { - ret = cptr->info->default_value; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve control's enumeration count (enum only) */ -int pvr2_ctrl_get_cnt(struct pvr2_ctrl *cptr) -{ - int ret = 0; - if (!cptr) return 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_enum) { - ret = cptr->info->def.type_enum.count; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve control's valid mask bits (bit mask only) */ -int pvr2_ctrl_get_mask(struct pvr2_ctrl *cptr) -{ - int ret = 0; - if (!cptr) return 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_bitmask) { - ret = cptr->info->def.type_bitmask.valid_bits; - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Retrieve the control's name */ -const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) -{ - if (!cptr) return NULL; - return cptr->info->name; -} - - -/* Retrieve the control's desc */ -const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) -{ - if (!cptr) return NULL; - return cptr->info->desc; -} - - -/* Retrieve a control enumeration or bit mask value */ -int pvr2_ctrl_get_valname(struct pvr2_ctrl *cptr,int val, - char *bptr,unsigned int bmax, - unsigned int *blen) -{ - int ret = -EINVAL; - if (!cptr) return 0; - *blen = 0; - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_enum) { - const char **names; - names = cptr->info->def.type_enum.value_names; - if ((val >= 0) && - (val < cptr->info->def.type_enum.count)) { - if (names[val]) { - *blen = scnprintf( - bptr,bmax,"%s", - names[val]); - } else { - *blen = 0; - } - ret = 0; - } - } else if (cptr->info->type == pvr2_ctl_bitmask) { - const char **names; - unsigned int idx; - int msk; - names = cptr->info->def.type_bitmask.bit_names; - val &= cptr->info->def.type_bitmask.valid_bits; - for (idx = 0, msk = 1; val; idx++, msk <<= 1) { - if (val & msk) { - *blen = scnprintf(bptr,bmax,"%s", - names[idx]); - ret = 0; - break; - } - } - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Return V4L ID for this control or zero if none */ -int pvr2_ctrl_get_v4lid(struct pvr2_ctrl *cptr) -{ - if (!cptr) return 0; - return cptr->info->v4l_id; -} - - -unsigned int pvr2_ctrl_get_v4lflags(struct pvr2_ctrl *cptr) -{ - unsigned int flags = 0; - - if (cptr->info->get_v4lflags) { - flags = cptr->info->get_v4lflags(cptr); - } - - if (cptr->info->set_value) { - flags &= ~V4L2_CTRL_FLAG_READ_ONLY; - } else { - flags |= V4L2_CTRL_FLAG_READ_ONLY; - } - - return flags; -} - - -/* Return true if control is writable */ -int pvr2_ctrl_is_writable(struct pvr2_ctrl *cptr) -{ - if (!cptr) return 0; - return cptr->info->set_value != 0; -} - - -/* Return true if control has custom symbolic representation */ -int pvr2_ctrl_has_custom_symbols(struct pvr2_ctrl *cptr) -{ - if (!cptr) return 0; - if (!cptr->info->val_to_sym) return 0; - if (!cptr->info->sym_to_val) return 0; - return !0; -} - - -/* Convert a given mask/val to a custom symbolic value */ -int pvr2_ctrl_custom_value_to_sym(struct pvr2_ctrl *cptr, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len) -{ - if (!cptr) return -EINVAL; - if (!cptr->info->val_to_sym) return -EINVAL; - return cptr->info->val_to_sym(cptr,mask,val,buf,maxlen,len); -} - - -/* Convert a symbolic value to a mask/value pair */ -int pvr2_ctrl_custom_sym_to_value(struct pvr2_ctrl *cptr, - const char *buf,unsigned int len, - int *maskptr,int *valptr) -{ - if (!cptr) return -EINVAL; - if (!cptr->info->sym_to_val) return -EINVAL; - return cptr->info->sym_to_val(cptr,buf,len,maskptr,valptr); -} - - -static unsigned int gen_bitmask_string(int msk,int val,int msk_only, - const char **names, - char *ptr,unsigned int len) -{ - unsigned int idx; - long sm,um; - int spcFl; - unsigned int uc,cnt; - const char *idStr; - - spcFl = 0; - uc = 0; - um = 0; - for (idx = 0, sm = 1; msk; idx++, sm <<= 1) { - if (sm & msk) { - msk &= ~sm; - idStr = names[idx]; - if (idStr) { - cnt = scnprintf(ptr,len,"%s%s%s", - (spcFl ? " " : ""), - (msk_only ? "" : - ((val & sm) ? "+" : "-")), - idStr); - ptr += cnt; len -= cnt; uc += cnt; - spcFl = !0; - } else { - um |= sm; - } - } - } - if (um) { - if (msk_only) { - cnt = scnprintf(ptr,len,"%s0x%lx", - (spcFl ? " " : ""), - um); - ptr += cnt; len -= cnt; uc += cnt; - spcFl = !0; - } else if (um & val) { - cnt = scnprintf(ptr,len,"%s+0x%lx", - (spcFl ? " " : ""), - um & val); - ptr += cnt; len -= cnt; uc += cnt; - spcFl = !0; - } else if (um & ~val) { - cnt = scnprintf(ptr,len,"%s+0x%lx", - (spcFl ? " " : ""), - um & ~val); - ptr += cnt; len -= cnt; uc += cnt; - spcFl = !0; - } - } - return uc; -} - - -static const char *boolNames[] = { - "false", - "true", - "no", - "yes", -}; - - -static int parse_token(const char *ptr,unsigned int len, - int *valptr, - const char **names,unsigned int namecnt) -{ - char buf[33]; - unsigned int slen; - unsigned int idx; - int negfl; - char *p2; - *valptr = 0; - if (!names) namecnt = 0; - for (idx = 0; idx < namecnt; idx++) { - if (!names[idx]) continue; - slen = strlen(names[idx]); - if (slen != len) continue; - if (memcmp(names[idx],ptr,slen)) continue; - *valptr = idx; - return 0; - } - negfl = 0; - if ((*ptr == '-') || (*ptr == '+')) { - negfl = (*ptr == '-'); - ptr++; len--; - } - if (len >= sizeof(buf)) return -EINVAL; - memcpy(buf,ptr,len); - buf[len] = 0; - *valptr = simple_strtol(buf,&p2,0); - if (negfl) *valptr = -(*valptr); - if (*p2) return -EINVAL; - return 1; -} - - -static int parse_mtoken(const char *ptr,unsigned int len, - int *valptr, - const char **names,int valid_bits) -{ - char buf[33]; - unsigned int slen; - unsigned int idx; - char *p2; - int msk; - *valptr = 0; - for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { - if (!msk & valid_bits) continue; - valid_bits &= ~msk; - if (!names[idx]) continue; - slen = strlen(names[idx]); - if (slen != len) continue; - if (memcmp(names[idx],ptr,slen)) continue; - *valptr = msk; - return 0; - } - if (len >= sizeof(buf)) return -EINVAL; - memcpy(buf,ptr,len); - buf[len] = 0; - *valptr = simple_strtol(buf,&p2,0); - if (*p2) return -EINVAL; - return 0; -} - - -static int parse_tlist(const char *ptr,unsigned int len, - int *maskptr,int *valptr, - const char **names,int valid_bits) -{ - unsigned int cnt; - int mask,val,kv,mode,ret; - mask = 0; - val = 0; - ret = 0; - while (len) { - cnt = 0; - while ((cnt < len) && - ((ptr[cnt] <= 32) || - (ptr[cnt] >= 127))) cnt++; - ptr += cnt; - len -= cnt; - mode = 0; - if ((*ptr == '-') || (*ptr == '+')) { - mode = (*ptr == '-') ? -1 : 1; - ptr++; - len--; - } - cnt = 0; - while (cnt < len) { - if (ptr[cnt] <= 32) break; - if (ptr[cnt] >= 127) break; - cnt++; - } - if (!cnt) break; - if (parse_mtoken(ptr,cnt,&kv,names,valid_bits)) { - ret = -EINVAL; - break; - } - ptr += cnt; - len -= cnt; - switch (mode) { - case 0: - mask = valid_bits; - val |= kv; - break; - case -1: - mask |= kv; - val &= ~kv; - break; - case 1: - mask |= kv; - val |= kv; - break; - default: - break; - } - } - *maskptr = mask; - *valptr = val; - return ret; -} - - -/* Convert a symbolic value to a mask/value pair */ -int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr, - const char *ptr,unsigned int len, - int *maskptr,int *valptr) -{ - int ret = -EINVAL; - unsigned int cnt; - - *maskptr = 0; - *valptr = 0; - - cnt = 0; - while ((cnt < len) && ((ptr[cnt] <= 32) || (ptr[cnt] >= 127))) cnt++; - len -= cnt; ptr += cnt; - cnt = 0; - while ((cnt < len) && ((ptr[len-(cnt+1)] <= 32) || - (ptr[len-(cnt+1)] >= 127))) cnt++; - len -= cnt; - - if (!len) return -EINVAL; - - LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->type == pvr2_ctl_int) { - ret = parse_token(ptr,len,valptr,NULL,0); - if ((ret >= 0) && - ((*valptr < cptr->info->def.type_int.min_value) || - (*valptr > cptr->info->def.type_int.max_value))) { - ret = -ERANGE; - } - if (maskptr) *maskptr = ~0; - } else if (cptr->info->type == pvr2_ctl_bool) { - ret = parse_token( - ptr,len,valptr,boolNames, - sizeof(boolNames)/sizeof(boolNames[0])); - if (ret == 1) { - *valptr = *valptr ? !0 : 0; - } else if (ret == 0) { - *valptr = (*valptr & 1) ? !0 : 0; - } - if (maskptr) *maskptr = 1; - } else if (cptr->info->type == pvr2_ctl_enum) { - ret = parse_token( - ptr,len,valptr, - cptr->info->def.type_enum.value_names, - cptr->info->def.type_enum.count); - if ((ret >= 0) && - ((*valptr < 0) || - (*valptr >= cptr->info->def.type_enum.count))) { - ret = -ERANGE; - } - if (maskptr) *maskptr = ~0; - } else if (cptr->info->type == pvr2_ctl_bitmask) { - ret = parse_tlist( - ptr,len,maskptr,valptr, - cptr->info->def.type_bitmask.bit_names, - cptr->info->def.type_bitmask.valid_bits); - } - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* Convert a given mask/val to a symbolic value */ -int pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *cptr, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len) -{ - int ret = -EINVAL; - - *len = 0; - if (cptr->info->type == pvr2_ctl_int) { - *len = scnprintf(buf,maxlen,"%d",val); - ret = 0; - } else if (cptr->info->type == pvr2_ctl_bool) { - *len = scnprintf(buf,maxlen,"%s",val ? "true" : "false"); - ret = 0; - } else if (cptr->info->type == pvr2_ctl_enum) { - const char **names; - names = cptr->info->def.type_enum.value_names; - if ((val >= 0) && - (val < cptr->info->def.type_enum.count)) { - if (names[val]) { - *len = scnprintf( - buf,maxlen,"%s", - names[val]); - } else { - *len = 0; - } - ret = 0; - } - } else if (cptr->info->type == pvr2_ctl_bitmask) { - *len = gen_bitmask_string( - val & mask & cptr->info->def.type_bitmask.valid_bits, - ~0,!0, - cptr->info->def.type_bitmask.bit_names, - buf,maxlen); - } - return ret; -} - - -/* Convert a given mask/val to a symbolic value */ -int pvr2_ctrl_value_to_sym(struct pvr2_ctrl *cptr, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len) -{ - int ret; - LOCK_TAKE(cptr->hdw->big_lock); do { - ret = pvr2_ctrl_value_to_sym_internal(cptr,mask,val, - buf,maxlen,len); - } while(0); LOCK_GIVE(cptr->hdw->big_lock); - return ret; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.h b/drivers/media/video/pvrusb2/pvrusb2-ctrl.h deleted file mode 100644 index c1680053c..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_CTRL_H -#define __PVRUSB2_CTRL_H - -struct pvr2_ctrl; - -enum pvr2_ctl_type { - pvr2_ctl_int = 0, - pvr2_ctl_enum = 1, - pvr2_ctl_bitmask = 2, - pvr2_ctl_bool = 3, -}; - - -/* Set the given control. */ -int pvr2_ctrl_set_value(struct pvr2_ctrl *,int val); - -/* Set/clear specific bits of the given control. */ -int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *,int mask,int val); - -/* Get the current value of the given control. */ -int pvr2_ctrl_get_value(struct pvr2_ctrl *,int *valptr); - -/* Retrieve control's type */ -enum pvr2_ctl_type pvr2_ctrl_get_type(struct pvr2_ctrl *); - -/* Retrieve control's maximum value (int type) */ -int pvr2_ctrl_get_max(struct pvr2_ctrl *); - -/* Retrieve control's minimum value (int type) */ -int pvr2_ctrl_get_min(struct pvr2_ctrl *); - -/* Retrieve control's default value (any type) */ -int pvr2_ctrl_get_def(struct pvr2_ctrl *); - -/* Retrieve control's enumeration count (enum only) */ -int pvr2_ctrl_get_cnt(struct pvr2_ctrl *); - -/* Retrieve control's valid mask bits (bit mask only) */ -int pvr2_ctrl_get_mask(struct pvr2_ctrl *); - -/* Retrieve the control's name */ -const char *pvr2_ctrl_get_name(struct pvr2_ctrl *); - -/* Retrieve the control's desc */ -const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *); - -/* Retrieve a control enumeration or bit mask value */ -int pvr2_ctrl_get_valname(struct pvr2_ctrl *,int,char *,unsigned int, - unsigned int *); - -/* Return true if control is writable */ -int pvr2_ctrl_is_writable(struct pvr2_ctrl *); - -/* Return V4L flags value for control (or zero if there is no v4l control - actually under this control) */ -unsigned int pvr2_ctrl_get_v4lflags(struct pvr2_ctrl *); - -/* Return V4L ID for this control or zero if none */ -int pvr2_ctrl_get_v4lid(struct pvr2_ctrl *); - -/* Return true if control has custom symbolic representation */ -int pvr2_ctrl_has_custom_symbols(struct pvr2_ctrl *); - -/* Convert a given mask/val to a custom symbolic value */ -int pvr2_ctrl_custom_value_to_sym(struct pvr2_ctrl *, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len); - -/* Convert a symbolic value to a mask/value pair */ -int pvr2_ctrl_custom_sym_to_value(struct pvr2_ctrl *, - const char *buf,unsigned int len, - int *maskptr,int *valptr); - -/* Convert a given mask/val to a symbolic value */ -int pvr2_ctrl_value_to_sym(struct pvr2_ctrl *, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len); - -/* Convert a symbolic value to a mask/value pair */ -int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *, - const char *buf,unsigned int len, - int *maskptr,int *valptr); - -/* Convert a given mask/val to a symbolic value - must already be - inside of critical region. */ -int pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *, - int mask,int val, - char *buf,unsigned int maxlen, - unsigned int *len); - -#endif /* __PVRUSB2_CTRL_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c deleted file mode 100644 index c80c26be6..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ /dev/null @@ -1,279 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 source file is specifically designed to interface with the - cx2584x, in kernels 2.6.16 or newer. - -*/ - -#include "pvrusb2-cx2584x-v4l.h" -#include "pvrusb2-video-v4l.h" -#include "pvrusb2-i2c-cmd-v4l2.h" - - -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include -#include - -struct pvr2_v4l_cx2584x { - struct pvr2_i2c_handler handler; - struct pvr2_decoder_ctrl ctrl; - struct pvr2_i2c_client *client; - struct pvr2_hdw *hdw; - unsigned long stale_mask; -}; - - -static void set_input(struct pvr2_v4l_cx2584x *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - struct v4l2_routing route; - enum cx25840_video_input vid_input; - enum cx25840_audio_input aud_input; - - memset(&route,0,sizeof(route)); - - switch(hdw->input_val) { - case PVR2_CVAL_INPUT_TV: - vid_input = CX25840_COMPOSITE7; - aud_input = CX25840_AUDIO8; - break; - case PVR2_CVAL_INPUT_COMPOSITE: - vid_input = CX25840_COMPOSITE3; - aud_input = CX25840_AUDIO_SERIAL; - break; - case PVR2_CVAL_INPUT_SVIDEO: - vid_input = CX25840_SVIDEO1; - aud_input = CX25840_AUDIO_SERIAL; - break; - case PVR2_CVAL_INPUT_RADIO: - default: - // Just set it to be composite input for now... - vid_input = CX25840_COMPOSITE3; - aud_input = CX25840_AUDIO_SERIAL; - break; - } - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x set_input vid=0x%x aud=0x%x", - vid_input,aud_input); - route.input = (u32)vid_input; - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_VIDEO_ROUTING,&route); - route.input = (u32)aud_input; - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); -} - - -static int check_input(struct pvr2_v4l_cx2584x *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return hdw->input_dirty != 0; -} - - -static void set_audio(struct pvr2_v4l_cx2584x *ctxt) -{ - u32 val; - struct pvr2_hdw *hdw = ctxt->hdw; - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx2584x set_audio %d", - hdw->srate_val); - switch (hdw->srate_val) { - default: - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000: - val = 48000; - break; - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100: - val = 44100; - break; - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000: - val = 32000; - break; - } - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_AUDIO_CLOCK_FREQ,&val); -} - - -static int check_audio(struct pvr2_v4l_cx2584x *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return hdw->srate_dirty != 0; -} - - -struct pvr2_v4l_cx2584x_ops { - void (*update)(struct pvr2_v4l_cx2584x *); - int (*check)(struct pvr2_v4l_cx2584x *); -}; - - -static const struct pvr2_v4l_cx2584x_ops decoder_ops[] = { - { .update = set_input, .check = check_input}, - { .update = set_audio, .check = check_audio}, -}; - - -static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) -{ - ctxt->client->handler = NULL; - ctxt->hdw->decoder_ctrl = NULL; - kfree(ctxt); -} - - -static int decoder_check(struct pvr2_v4l_cx2584x *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(decoder_ops)/sizeof(decoder_ops[0]); - idx++) { - msk = 1 << idx; - if (ctxt->stale_mask & msk) continue; - if (decoder_ops[idx].check(ctxt)) { - ctxt->stale_mask |= msk; - } - } - return ctxt->stale_mask != 0; -} - - -static void decoder_update(struct pvr2_v4l_cx2584x *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(decoder_ops)/sizeof(decoder_ops[0]); - idx++) { - msk = 1 << idx; - if (!(ctxt->stale_mask & msk)) continue; - ctxt->stale_mask &= ~msk; - decoder_ops[idx].update(ctxt); - } -} - - -static void decoder_enable(struct pvr2_v4l_cx2584x *ctxt,int fl) -{ - pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_enable(%d)",fl); - pvr2_v4l2_cmd_stream(ctxt->client,fl); -} - - -static int decoder_detect(struct pvr2_i2c_client *cp) -{ - int ret; - /* Attempt to query the decoder - let's see if it will answer */ - struct v4l2_queryctrl qc; - - memset(&qc,0,sizeof(qc)); - - qc.id = V4L2_CID_BRIGHTNESS; - - ret = pvr2_i2c_client_cmd(cp,VIDIOC_QUERYCTRL,&qc); - return ret == 0; /* Return true if it answered */ -} - - -static int decoder_is_tuned(struct pvr2_v4l_cx2584x *ctxt) -{ - struct v4l2_tuner vt; - int ret; - - memset(&vt,0,sizeof(vt)); - ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_G_TUNER,&vt); - if (ret < 0) return -EINVAL; - return vt.signal ? 1 : 0; -} - - -static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt, - char *buf,unsigned int cnt) -{ - return scnprintf(buf,cnt,"handler: pvrusb2-cx2584x-v4l"); -} - - -static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) -{ - int ret; - ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL); - pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); -} - - -const static struct pvr2_i2c_handler_functions hfuncs = { - .detach = (void (*)(void *))decoder_detach, - .check = (int (*)(void *))decoder_check, - .update = (void (*)(void *))decoder_update, - .describe = (unsigned int (*)(void *,char *,unsigned int))decoder_describe, -}; - - -int pvr2_i2c_cx2584x_v4l_setup(struct pvr2_hdw *hdw, - struct pvr2_i2c_client *cp) -{ - struct pvr2_v4l_cx2584x *ctxt; - - if (hdw->decoder_ctrl) return 0; - if (cp->handler) return 0; - if (!decoder_detect(cp)) return 0; - - ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); - if (!ctxt) return 0; - memset(ctxt,0,sizeof(*ctxt)); - - ctxt->handler.func_data = ctxt; - ctxt->handler.func_table = &hfuncs; - ctxt->ctrl.ctxt = ctxt; - ctxt->ctrl.detach = (void (*)(void *))decoder_detach; - ctxt->ctrl.enable = (void (*)(void *,int))decoder_enable; - ctxt->ctrl.tuned = (int (*)(void *))decoder_is_tuned; - ctxt->ctrl.force_reset = (void (*)(void*))decoder_reset; - ctxt->client = cp; - ctxt->hdw = hdw; - ctxt->stale_mask = (1 << (sizeof(decoder_ops)/ - sizeof(decoder_ops[0]))) - 1; - hdw->decoder_ctrl = &ctxt->ctrl; - cp->handler = &ctxt->handler; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x cx2584x V4L2 handler set up", - cp->client->addr); - return !0; -} - - - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h deleted file mode 100644 index 54b2844e7..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_CX2584X_V4L_H -#define __PVRUSB2_CX2584X_V4L_H - -/* - - This module connects the pvrusb2 driver to the I2C chip level - driver which handles combined device audio & video processing. - This interface is used internally by the driver; higher level code - should only interact through the interface provided by - pvrusb2-hdw.h. - -*/ - - - -#include "pvrusb2-i2c-core.h" - -int pvr2_i2c_cx2584x_v4l_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); - - -#endif /* __PVRUSB2_CX2584X_V4L_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-debug.h b/drivers/media/video/pvrusb2/pvrusb2-debug.h deleted file mode 100644 index d95a8588e..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-debug.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_DEBUG_H -#define __PVRUSB2_DEBUG_H - -extern int pvrusb2_debug; - -#define pvr2_trace(msk, fmt, arg...) do {if(msk & pvrusb2_debug) printk(KERN_INFO "pvrusb2: " fmt "\n", ##arg); } while (0) - -/* These are listed in *rough* order of decreasing usefulness and - increasing noise level. */ -#define PVR2_TRACE_INFO (1 << 0) // Normal messages -#define PVR2_TRACE_ERROR_LEGS (1 << 1) // error messages -#define PVR2_TRACE_TOLERANCE (1 << 2) // track tolerance-affected errors -#define PVR2_TRACE_TRAP (1 << 3) // Trap & report misbehavior from app -#define PVR2_TRACE_INIT (1 << 4) // misc initialization steps -#define PVR2_TRACE_START_STOP (1 << 5) // Streaming start / stop -#define PVR2_TRACE_CTL (1 << 6) // commit of control changes -#define PVR2_TRACE_DEBUG (1 << 7) // Temporary debug code -#define PVR2_TRACE_EEPROM (1 << 8) // eeprom parsing / report -#define PVR2_TRACE_STRUCT (1 << 9) // internal struct creation -#define PVR2_TRACE_OPEN_CLOSE (1 << 10) // application open / close -#define PVR2_TRACE_CREG (1 << 11) // Main critical region entry / exit -#define PVR2_TRACE_SYSFS (1 << 12) // Sysfs driven I/O -#define PVR2_TRACE_FIRMWARE (1 << 13) // firmware upload actions -#define PVR2_TRACE_CHIPS (1 << 14) // chip broadcast operation -#define PVR2_TRACE_I2C (1 << 15) // I2C related stuff -#define PVR2_TRACE_I2C_CMD (1 << 16) // Software commands to I2C modules -#define PVR2_TRACE_I2C_CORE (1 << 17) // I2C core debugging -#define PVR2_TRACE_I2C_TRAF (1 << 18) // I2C traffic through the adapter -#define PVR2_TRACE_V4LIOCTL (1 << 19) // v4l ioctl details -#define PVR2_TRACE_ENCODER (1 << 20) // mpeg2 encoder operation -#define PVR2_TRACE_BUF_POOL (1 << 21) // Track buffer pool management -#define PVR2_TRACE_BUF_FLOW (1 << 22) // Track buffer flow in system -#define PVR2_TRACE_DATA_FLOW (1 << 23) // Track data flow -#define PVR2_TRACE_DEBUGIFC (1 << 24) // Debug interface actions -#define PVR2_TRACE_GPIO (1 << 25) // GPIO state bit changes - - -#endif /* __PVRUSB2_HDW_INTERNAL_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c deleted file mode 100644 index f985f00d8..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ /dev/null @@ -1,478 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include "pvrusb2-debugifc.h" -#include "pvrusb2-hdw.h" -#include "pvrusb2-debug.h" -#include "pvrusb2-i2c-core.h" - -struct debugifc_mask_item { - const char *name; - unsigned long msk; -}; - -static struct debugifc_mask_item mask_items[] = { - {"ENC_FIRMWARE",(1<= 2) && (buf[0] == '0') && - ((buf[1] == 'x') || (buf[1] == 'X'))) { - radix = 16; - count -= 2; - buf += 2; - } else if ((count >= 1) && (buf[0] == '0')) { - radix = 8; - } - - while (count--) { - ch = *buf++; - if ((ch >= '0') && (ch <= '9')) { - val = ch - '0'; - } else if ((ch >= 'a') && (ch <= 'f')) { - val = ch - 'a' + 10; - } else if ((ch >= 'A') && (ch <= 'F')) { - val = ch - 'A' + 10; - } else { - return -EINVAL; - } - if (val >= radix) return -EINVAL; - result *= radix; - result += val; - } - *num_ptr = result; - return 0; -} - - -static int debugifc_match_keyword(const char *buf,unsigned int count, - const char *keyword) -{ - unsigned int kl; - if (!keyword) return 0; - kl = strlen(keyword); - if (kl != count) return 0; - return !memcmp(buf,keyword,kl); -} - - -static unsigned long debugifc_find_mask(const char *buf,unsigned int count) -{ - struct debugifc_mask_item *mip; - unsigned int idx; - for (idx = 0; idx < sizeof(mask_items)/sizeof(mask_items[0]); idx++) { - mip = mask_items + idx; - if (debugifc_match_keyword(buf,count,mip->name)) { - return mip->msk; - } - } - return 0; -} - - -static int debugifc_print_mask(char *buf,unsigned int sz, - unsigned long msk,unsigned long val) -{ - struct debugifc_mask_item *mip; - unsigned int idx; - int bcnt = 0; - int ccnt; - for (idx = 0; idx < sizeof(mask_items)/sizeof(mask_items[0]); idx++) { - mip = mask_items + idx; - if (!(mip->msk & msk)) continue; - ccnt = scnprintf(buf,sz,"%s%c%s", - (bcnt ? " " : ""), - ((mip->msk & val) ? '+' : '-'), - mip->name); - sz -= ccnt; - buf += ccnt; - bcnt += ccnt; - } - return bcnt; -} - -static unsigned int debugifc_parse_subsys_mask(const char *buf, - unsigned int count, - unsigned long *mskPtr, - unsigned long *valPtr) -{ - const char *wptr; - unsigned int consume_cnt = 0; - unsigned int scnt; - unsigned int wlen; - int mode; - unsigned long m1,msk,val; - - msk = 0; - val = 0; - - while (count) { - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) break; - consume_cnt += scnt; count -= scnt; buf += scnt; - if (!wptr) break; - - mode = 0; - if (wlen) switch (wptr[0]) { - case '+': - wptr++; - wlen--; - break; - case '-': - mode = 1; - wptr++; - wlen--; - break; - } - if (!wlen) continue; - m1 = debugifc_find_mask(wptr,wlen); - if (!m1) break; - msk |= m1; - if (!mode) val |= m1; - } - *mskPtr = msk; - *valPtr = val; - return consume_cnt; -} - - -int pvr2_debugifc_print_info(struct pvr2_hdw *hdw,char *buf,unsigned int acnt) -{ - int bcnt = 0; - int ccnt; - struct pvr2_hdw_debug_info dbg; - - pvr2_hdw_get_debug_info(hdw,&dbg); - - ccnt = scnprintf(buf,acnt,"big lock %s; ctl lock %s", - (dbg.big_lock_held ? "held" : "free"), - (dbg.ctl_lock_held ? "held" : "free")); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - if (dbg.ctl_lock_held) { - ccnt = scnprintf(buf,acnt,"; cmd_state=%d cmd_code=%d" - " cmd_wlen=%d cmd_rlen=%d" - " wpend=%d rpend=%d tmout=%d rstatus=%d" - " wstatus=%d", - dbg.cmd_debug_state,dbg.cmd_code, - dbg.cmd_debug_write_len, - dbg.cmd_debug_read_len, - dbg.cmd_debug_write_pend, - dbg.cmd_debug_read_pend, - dbg.cmd_debug_timeout, - dbg.cmd_debug_rstatus, - dbg.cmd_debug_wstatus); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - } - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf( - buf,acnt,"driver flags: %s %s %s\n", - (dbg.flag_init_ok ? "initialized" : "uninitialized"), - (dbg.flag_ok ? "ok" : "fail"), - (dbg.flag_disconnected ? "disconnected" : "connected")); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"Subsystems enabled / configured: "); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = debugifc_print_mask(buf,acnt,dbg.subsys_flags,dbg.subsys_flags); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"Subsystems disabled / unconfigured: "); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = debugifc_print_mask(buf,acnt,~dbg.subsys_flags,dbg.subsys_flags); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - ccnt = scnprintf(buf,acnt,"Attached I2C modules:\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = pvr2_i2c_report(hdw,buf,acnt); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - return bcnt; -} - - -int pvr2_debugifc_print_status(struct pvr2_hdw *hdw, - char *buf,unsigned int acnt) -{ - int bcnt = 0; - int ccnt; - unsigned long msk; - int ret; - u32 gpio_dir,gpio_in,gpio_out; - - ret = pvr2_hdw_is_hsm(hdw); - ccnt = scnprintf(buf,acnt,"USB link speed: %s\n", - (ret < 0 ? "FAIL" : (ret ? "high" : "full"))); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - gpio_dir = 0; gpio_in = 0; gpio_out = 0; - pvr2_hdw_gpio_get_dir(hdw,&gpio_dir); - pvr2_hdw_gpio_get_out(hdw,&gpio_out); - pvr2_hdw_gpio_get_in(hdw,&gpio_in); - ccnt = scnprintf(buf,acnt,"GPIO state: dir=0x%x in=0x%x out=0x%x\n", - gpio_dir,gpio_in,gpio_out); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - ccnt = scnprintf(buf,acnt,"Streaming is %s\n", - pvr2_hdw_get_streaming(hdw) ? "on" : "off"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - msk = pvr2_hdw_subsys_get(hdw); - ccnt = scnprintf(buf,acnt,"Subsystems enabled / configured: "); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = debugifc_print_mask(buf,acnt,msk,msk); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"Subsystems disabled / unconfigured: "); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = debugifc_print_mask(buf,acnt,~msk,msk); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - msk = pvr2_hdw_subsys_stream_get(hdw); - ccnt = scnprintf(buf,acnt,"Subsystems stopped on stream shutdown: "); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = debugifc_print_mask(buf,acnt,msk,msk); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - ccnt = scnprintf(buf,acnt,"\n"); - bcnt += ccnt; acnt -= ccnt; buf += ccnt; - - return bcnt; -} - - -static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, - unsigned int count) -{ - const char *wptr; - unsigned int wlen; - unsigned int scnt; - - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) return 0; - count -= scnt; buf += scnt; - if (!wptr) return 0; - - pvr2_trace(PVR2_TRACE_DEBUGIFC,"debugifc cmd: \"%.*s\"",wlen,wptr); - if (debugifc_match_keyword(wptr,wlen,"reset")) { - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) return -EINVAL; - count -= scnt; buf += scnt; - if (!wptr) return -EINVAL; - if (debugifc_match_keyword(wptr,wlen,"cpu")) { - pvr2_hdw_cpureset_assert(hdw,!0); - pvr2_hdw_cpureset_assert(hdw,0); - return 0; - } else if (debugifc_match_keyword(wptr,wlen,"bus")) { - pvr2_hdw_device_reset(hdw); - } else if (debugifc_match_keyword(wptr,wlen,"soft")) { - return pvr2_hdw_cmd_powerup(hdw); - } else if (debugifc_match_keyword(wptr,wlen,"deep")) { - return pvr2_hdw_cmd_deep_reset(hdw); - } else if (debugifc_match_keyword(wptr,wlen,"firmware")) { - return pvr2_upload_firmware2(hdw); - } else if (debugifc_match_keyword(wptr,wlen,"decoder")) { - return pvr2_hdw_cmd_decoder_reset(hdw); - } - return -EINVAL; - } else if (debugifc_match_keyword(wptr,wlen,"subsys_flags")) { - unsigned long msk = 0; - unsigned long val = 0; - if (debugifc_parse_subsys_mask(buf,count,&msk,&val) != count) { - pvr2_trace(PVR2_TRACE_DEBUGIFC, - "debugifc parse error on subsys mask"); - return -EINVAL; - } - pvr2_hdw_subsys_bit_chg(hdw,msk,val); - return 0; - } else if (debugifc_match_keyword(wptr,wlen,"stream_flags")) { - unsigned long msk = 0; - unsigned long val = 0; - if (debugifc_parse_subsys_mask(buf,count,&msk,&val) != count) { - pvr2_trace(PVR2_TRACE_DEBUGIFC, - "debugifc parse error on stream mask"); - return -EINVAL; - } - pvr2_hdw_subsys_stream_bit_chg(hdw,msk,val); - return 0; - } else if (debugifc_match_keyword(wptr,wlen,"cpufw")) { - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) return -EINVAL; - count -= scnt; buf += scnt; - if (!wptr) return -EINVAL; - if (debugifc_match_keyword(wptr,wlen,"fetch")) { - pvr2_hdw_cpufw_set_enabled(hdw,!0); - return 0; - } else if (debugifc_match_keyword(wptr,wlen,"done")) { - pvr2_hdw_cpufw_set_enabled(hdw,0); - return 0; - } else { - return -EINVAL; - } - } else if (debugifc_match_keyword(wptr,wlen,"gpio")) { - int dir_fl = 0; - int ret; - u32 msk,val; - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) return -EINVAL; - count -= scnt; buf += scnt; - if (!wptr) return -EINVAL; - if (debugifc_match_keyword(wptr,wlen,"dir")) { - dir_fl = !0; - } else if (!debugifc_match_keyword(wptr,wlen,"out")) { - return -EINVAL; - } - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (!scnt) return -EINVAL; - count -= scnt; buf += scnt; - if (!wptr) return -EINVAL; - ret = debugifc_parse_unsigned_number(wptr,wlen,&msk); - if (ret) return ret; - scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); - if (wptr) { - ret = debugifc_parse_unsigned_number(wptr,wlen,&val); - if (ret) return ret; - } else { - val = msk; - msk = 0xffffffff; - } - if (dir_fl) { - ret = pvr2_hdw_gpio_chg_dir(hdw,msk,val); - } else { - ret = pvr2_hdw_gpio_chg_out(hdw,msk,val); - } - return ret; - } - pvr2_trace(PVR2_TRACE_DEBUGIFC, - "debugifc failed to recognize cmd: \"%.*s\"",wlen,wptr); - return -EINVAL; -} - - -int pvr2_debugifc_docmd(struct pvr2_hdw *hdw,const char *buf, - unsigned int count) -{ - unsigned int bcnt = 0; - int ret; - - while (count) { - for (bcnt = 0; bcnt < count; bcnt++) { - if (buf[bcnt] == '\n') break; - } - - ret = pvr2_debugifc_do1cmd(hdw,buf,bcnt); - if (ret < 0) return ret; - if (bcnt < count) bcnt++; - buf += bcnt; - count -= bcnt; - } - - return 0; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.h b/drivers/media/video/pvrusb2/pvrusb2-debugifc.h deleted file mode 100644 index 990b02d35..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_DEBUGIFC_H -#define __PVRUSB2_DEBUGIFC_H - -struct pvr2_hdw; - -/* Non-intrusively print some useful debugging info from inside the - driver. This should work even if the driver appears to be - wedged. */ -int pvr2_debugifc_print_info(struct pvr2_hdw *, - char *buf_ptr,unsigned int buf_size); - -/* Print general status of driver. This will also trigger a probe of - the USB link. Unlike print_info(), this one synchronizes with the - driver so the information should be self-consistent (but it will - hang if the driver is wedged). */ -int pvr2_debugifc_print_status(struct pvr2_hdw *, - char *buf_ptr,unsigned int buf_size); - -/* Parse a string command into a driver action. */ -int pvr2_debugifc_docmd(struct pvr2_hdw *, - const char *buf_ptr,unsigned int buf_size); - -#endif /* __PVRUSB2_DEBUGIFC_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c deleted file mode 100644 index 6cff8e75f..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 "pvrusb2-eeprom.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" - -#define trace_eeprom(...) pvr2_trace(PVR2_TRACE_EEPROM,__VA_ARGS__) - - - -/* - - Read and analyze data in the eeprom. Use tveeprom to figure out - the packet structure, since this is another Hauppauge device and - internally it has a family resemblence to ivtv-type devices - -*/ - -#include - -/* We seem to only be interested in the last 128 bytes of the EEPROM */ -#define EEPROM_SIZE 128 - -/* Grab EEPROM contents, needed for direct method. */ -static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) -{ - struct i2c_msg msg[2]; - u8 *eeprom; - u8 iadd[2]; - u8 addr; - u16 eepromSize; - unsigned int offs; - int ret; - int mode16 = 0; - unsigned pcnt,tcnt; - eeprom = kmalloc(EEPROM_SIZE,GFP_KERNEL); - if (!eeprom) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to allocate memory" - " required to read eeprom"); - return NULL; - } - - trace_eeprom("Value for eeprom addr from controller was 0x%x", - hdw->eeprom_addr); - addr = hdw->eeprom_addr; - /* Seems that if the high bit is set, then the *real* eeprom - address is shifted right now bit position (noticed this in - newer PVR USB2 hardware) */ - if (addr & 0x80) addr >>= 1; - - /* FX2 documentation states that a 16bit-addressed eeprom is - expected if the I2C address is an odd number (yeah, this is - strange but it's what they do) */ - mode16 = (addr & 1); - eepromSize = (mode16 ? 4096 : 256); - trace_eeprom("Examining %d byte eeprom at location 0x%x" - " using %d bit addressing",eepromSize,addr, - mode16 ? 16 : 8); - - msg[0].addr = addr; - msg[0].flags = 0; - msg[0].len = mode16 ? 2 : 1; - msg[0].buf = iadd; - msg[1].addr = addr; - msg[1].flags = I2C_M_RD; - - /* We have to do the actual eeprom data fetch ourselves, because - (1) we're only fetching part of the eeprom, and (2) if we were - getting the whole thing our I2C driver can't grab it in one - pass - which is what tveeprom is otherwise going to attempt */ - memset(eeprom,0,EEPROM_SIZE); - for (tcnt = 0; tcnt < EEPROM_SIZE; tcnt += pcnt) { - pcnt = 16; - if (pcnt + tcnt > EEPROM_SIZE) pcnt = EEPROM_SIZE-tcnt; - offs = tcnt + (eepromSize - EEPROM_SIZE); - if (mode16) { - iadd[0] = offs >> 8; - iadd[1] = offs; - } else { - iadd[0] = offs; - } - msg[1].len = pcnt; - msg[1].buf = eeprom+tcnt; - if ((ret = i2c_transfer( - &hdw->i2c_adap, - msg,sizeof(msg)/sizeof(msg[0]))) != 2) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "eeprom fetch set offs err=%d",ret); - kfree(eeprom); - return NULL; - } - } - return eeprom; -} - - -/* Directly call eeprom analysis function within tveeprom. */ -int pvr2_eeprom_analyze(struct pvr2_hdw *hdw) -{ - u8 *eeprom; - struct tveeprom tvdata; - - memset(&tvdata,0,sizeof(tvdata)); - - eeprom = pvr2_eeprom_fetch(hdw); - if (!eeprom) return -EINVAL; - - { - struct i2c_client fake_client; - /* Newer version expects a useless client interface */ - fake_client.addr = hdw->eeprom_addr; - fake_client.adapter = &hdw->i2c_adap; - tveeprom_hauppauge_analog(&fake_client,&tvdata,eeprom); - } - - trace_eeprom("eeprom assumed v4l tveeprom module"); - trace_eeprom("eeprom direct call results:"); - trace_eeprom("has_radio=%d",tvdata.has_radio); - trace_eeprom("tuner_type=%d",tvdata.tuner_type); - trace_eeprom("tuner_formats=0x%x",tvdata.tuner_formats); - trace_eeprom("audio_processor=%d",tvdata.audio_processor); - trace_eeprom("model=%d",tvdata.model); - trace_eeprom("revision=%d",tvdata.revision); - trace_eeprom("serial_number=%d",tvdata.serial_number); - trace_eeprom("rev_str=%s",tvdata.rev_str); - hdw->tuner_type = tvdata.tuner_type; - hdw->serial_number = tvdata.serial_number; - hdw->std_mask_eeprom = tvdata.tuner_formats; - - kfree(eeprom); - - return 0; -} - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.h b/drivers/media/video/pvrusb2/pvrusb2-eeprom.h deleted file mode 100644 index 84242975d..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_EEPROM_H -#define __PVRUSB2_EEPROM_H - -struct pvr2_hdw; - -int pvr2_eeprom_analyze(struct pvr2_hdw *); - -#endif /* __PVRUSB2_EEPROM_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c deleted file mode 100644 index 18a707350..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ /dev/null @@ -1,418 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 // for linux/firmware.h -#include -#include "pvrusb2-util.h" -#include "pvrusb2-encoder.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" - - - -/* Firmware mailbox flags - definitions found from ivtv */ -#define IVTV_MBOX_FIRMWARE_DONE 0x00000004 -#define IVTV_MBOX_DRIVER_DONE 0x00000002 -#define IVTV_MBOX_DRIVER_BUSY 0x00000001 - - -static int pvr2_encoder_write_words(struct pvr2_hdw *hdw, - const u32 *data, unsigned int dlen) -{ - unsigned int idx; - int ret; - unsigned int offs = 0; - unsigned int chunkCnt; - - /* - - Format: First byte must be 0x01. Remaining 32 bit words are - spread out into chunks of 7 bytes each, little-endian ordered, - offset at zero within each 2 blank bytes following and a - single byte that is 0x44 plus the offset of the word. Repeat - request for additional words, with offset adjusted - accordingly. - - */ - while (dlen) { - chunkCnt = 8; - if (chunkCnt > dlen) chunkCnt = dlen; - memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); - hdw->cmd_buffer[0] = 0x01; - for (idx = 0; idx < chunkCnt; idx++) { - hdw->cmd_buffer[1+(idx*7)+6] = 0x44 + idx + offs; - PVR2_DECOMPOSE_LE(hdw->cmd_buffer, 1+(idx*7), - data[idx]); - } - ret = pvr2_send_request(hdw, - hdw->cmd_buffer,1+(chunkCnt*7), - NULL,0); - if (ret) return ret; - data += chunkCnt; - dlen -= chunkCnt; - offs += chunkCnt; - } - - return 0; -} - - -static int pvr2_encoder_read_words(struct pvr2_hdw *hdw,int statusFl, - u32 *data, unsigned int dlen) -{ - unsigned int idx; - int ret; - unsigned int offs = 0; - unsigned int chunkCnt; - - /* - - Format: First byte must be 0x02 (status check) or 0x28 (read - back block of 32 bit words). Next 6 bytes must be zero, - followed by a single byte of 0x44+offset for portion to be - read. Returned data is packed set of 32 bits words that were - read. - - */ - - while (dlen) { - chunkCnt = 16; - if (chunkCnt > dlen) chunkCnt = dlen; - memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); - hdw->cmd_buffer[0] = statusFl ? 0x02 : 0x28; - hdw->cmd_buffer[7] = 0x44 + offs; - ret = pvr2_send_request(hdw, - hdw->cmd_buffer,8, - hdw->cmd_buffer,chunkCnt * 4); - if (ret) return ret; - - for (idx = 0; idx < chunkCnt; idx++) { - data[idx] = PVR2_COMPOSE_LE(hdw->cmd_buffer,idx*4); - } - data += chunkCnt; - dlen -= chunkCnt; - offs += chunkCnt; - } - - return 0; -} - - -/* This prototype is set up to be compatible with the - cx2341x_mbox_func prototype in cx2341x.h, which should be in - kernels 2.6.18 or later. We do this so that we can enable - cx2341x.ko to write to our encoder (by handing it a pointer to this - function). For earlier kernels this doesn't really matter. */ -static int pvr2_encoder_cmd(void *ctxt, - int cmd, - int arg_cnt_send, - int arg_cnt_recv, - u32 *argp) -{ - unsigned int poll_count; - int ret = 0; - unsigned int idx; - /* These sizes look to be limited by the FX2 firmware implementation */ - u32 wrData[16]; - u32 rdData[16]; - struct pvr2_hdw *hdw = (struct pvr2_hdw *)ctxt; - - - /* - - The encoder seems to speak entirely using blocks 32 bit words. - In ivtv driver terms, this is a mailbox which we populate with - data and watch what the hardware does with it. The first word - is a set of flags used to control the transaction, the second - word is the command to execute, the third byte is zero (ivtv - driver suggests that this is some kind of return value), and - the fourth byte is a specified timeout (windows driver always - uses 0x00060000 except for one case when it is zero). All - successive words are the argument words for the command. - - First, write out the entire set of words, with the first word - being zero. - - Next, write out just the first word again, but set it to - IVTV_MBOX_DRIVER_DONE | IVTV_DRIVER_BUSY this time (which - probably means "go"). - - Next, read back 16 words as status. Check the first word, - which should have IVTV_MBOX_FIRMWARE_DONE set. If however - that bit is not set, then the command isn't done so repeat the - read. - - Next, read back 32 words and compare with the original - arugments. Hopefully they will match. - - Finally, write out just the first word again, but set it to - 0x0 this time (which probably means "idle"). - - */ - - if (arg_cnt_send > (sizeof(wrData)/sizeof(wrData[0]))-4) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Failed to write cx23416 command" - " - too many input arguments" - " (was given %u limit %u)", - arg_cnt_send, - (unsigned int)(sizeof(wrData)/sizeof(wrData[0])) - 4); - return -EINVAL; - } - - if (arg_cnt_recv > (sizeof(rdData)/sizeof(rdData[0]))-4) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Failed to write cx23416 command" - " - too many return arguments" - " (was given %u limit %u)", - arg_cnt_recv, - (unsigned int)(sizeof(rdData)/sizeof(rdData[0])) - 4); - return -EINVAL; - } - - - LOCK_TAKE(hdw->ctl_lock); do { - - wrData[0] = 0; - wrData[1] = cmd; - wrData[2] = 0; - wrData[3] = 0x00060000; - for (idx = 0; idx < arg_cnt_send; idx++) { - wrData[idx+4] = argp[idx]; - } - for (; idx < (sizeof(wrData)/sizeof(wrData[0]))-4; idx++) { - wrData[idx+4] = 0; - } - - ret = pvr2_encoder_write_words(hdw,wrData,idx); - if (ret) break; - wrData[0] = IVTV_MBOX_DRIVER_DONE|IVTV_MBOX_DRIVER_BUSY; - ret = pvr2_encoder_write_words(hdw,wrData,1); - if (ret) break; - poll_count = 0; - while (1) { - if (poll_count < 10000000) poll_count++; - ret = pvr2_encoder_read_words(hdw,!0,rdData,1); - if (ret) break; - if (rdData[0] & IVTV_MBOX_FIRMWARE_DONE) { - break; - } - if (poll_count == 100) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "***WARNING*** device's encoder" - " appears to be stuck" - " (status=0%08x)",rdData[0]); - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Encoder command: 0x%02x",cmd); - for (idx = 4; idx < arg_cnt_send; idx++) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Encoder arg%d: 0x%08x", - idx-3,wrData[idx]); - } - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Giving up waiting." - " It is likely that" - " this is a bad idea..."); - ret = -EBUSY; - break; - } - } - if (ret) break; - wrData[0] = 0x7; - ret = pvr2_encoder_read_words( - hdw,0,rdData, - sizeof(rdData)/sizeof(rdData[0])); - if (ret) break; - for (idx = 0; idx < arg_cnt_recv; idx++) { - argp[idx] = rdData[idx+4]; - } - - wrData[0] = 0x0; - ret = pvr2_encoder_write_words(hdw,wrData,1); - if (ret) break; - - } while(0); LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - - -static int pvr2_encoder_vcmd(struct pvr2_hdw *hdw, int cmd, - int args, ...) -{ - va_list vl; - unsigned int idx; - u32 data[12]; - - if (args > sizeof(data)/sizeof(data[0])) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Failed to write cx23416 command" - " - too many arguments" - " (was given %u limit %u)", - args,(unsigned int)(sizeof(data)/sizeof(data[0]))); - return -EINVAL; - } - - va_start(vl, args); - for (idx = 0; idx < args; idx++) { - data[idx] = va_arg(vl, u32); - } - va_end(vl); - - return pvr2_encoder_cmd(hdw,cmd,args,0,data); -} - -int pvr2_encoder_configure(struct pvr2_hdw *hdw) -{ - int ret; - pvr2_trace(PVR2_TRACE_ENCODER,"pvr2_encoder_configure" - " (cx2341x module)"); - hdw->enc_ctl_state.port = CX2341X_PORT_STREAMING; - hdw->enc_ctl_state.width = hdw->res_hor_val; - hdw->enc_ctl_state.height = hdw->res_ver_val; - hdw->enc_ctl_state.is_50hz = ((hdw->std_mask_cur & - (V4L2_STD_NTSC|V4L2_STD_PAL_M)) ? - 0 : 1); - - ret = 0; - - if (!ret) ret = pvr2_encoder_vcmd( - hdw,CX2341X_ENC_SET_NUM_VSYNC_LINES, 2, - 0xf0, 0xf0); - - /* setup firmware to notify us about some events (don't know why...) */ - if (!ret) ret = pvr2_encoder_vcmd( - hdw,CX2341X_ENC_SET_EVENT_NOTIFICATION, 4, - 0, 0, 0x10000000, 0xffffffff); - - if (!ret) ret = pvr2_encoder_vcmd( - hdw,CX2341X_ENC_SET_VBI_LINE, 5, - 0xffffffff,0,0,0,0); - - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to configure cx32416"); - return ret; - } - - ret = cx2341x_update(hdw,pvr2_encoder_cmd, - (hdw->enc_cur_valid ? &hdw->enc_cur_state : NULL), - &hdw->enc_ctl_state); - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Error from cx2341x module code=%d",ret); - return ret; - } - - ret = 0; - - if (!ret) ret = pvr2_encoder_vcmd( - hdw, CX2341X_ENC_INITIALIZE_INPUT, 0); - - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to initialize cx32416 video input"); - return ret; - } - - hdw->subsys_enabled_mask |= (1<enc_cur_state,&hdw->enc_ctl_state, - sizeof(struct cx2341x_mpeg_params)); - hdw->enc_cur_valid = !0; - return 0; -} - - -int pvr2_encoder_start(struct pvr2_hdw *hdw) -{ - int status; - - /* unmask some interrupts */ - pvr2_write_register(hdw, 0x0048, 0xbfffffff); - - /* change some GPIO data */ - pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000481); - pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000000); - - if (hdw->config == pvr2_config_vbi) { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, - 0x01,0x14); - } else if (hdw->config == pvr2_config_mpeg) { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, - 0,0x13); - } else { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_START_CAPTURE,2, - 0,0x13); - } - if (!status) { - hdw->subsys_enabled_mask |= (1<config == pvr2_config_vbi) { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, - 0x01,0x01,0x14); - } else if (hdw->config == pvr2_config_mpeg) { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, - 0x01,0,0x13); - } else { - status = pvr2_encoder_vcmd(hdw,CX2341X_ENC_STOP_CAPTURE,3, - 0x01,0,0x13); - } - - /* change some GPIO data */ - /* Note: Bit d7 of dir appears to control the LED. So we shut it - off here. */ - pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000401); - pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000000); - - if (!status) { - hdw->subsys_enabled_mask &= ~(1< - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_ENCODER_H -#define __PVRUSB2_ENCODER_H - -struct pvr2_hdw; - -int pvr2_encoder_configure(struct pvr2_hdw *); -int pvr2_encoder_start(struct pvr2_hdw *); -int pvr2_encoder_stop(struct pvr2_hdw *); - -#endif /* __PVRUSB2_ENCODER_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h deleted file mode 100644 index 7dd6c3d83..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ /dev/null @@ -1,368 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_HDW_INTERNAL_H -#define __PVRUSB2_HDW_INTERNAL_H - -/* - - This header sets up all the internal structures and definitions needed to - track and coordinate the driver's interaction with the hardware. ONLY - source files which actually implement part of that whole circus should be - including this header. Higher levels, like the external layers to the - various public APIs (V4L, sysfs, etc) should NOT ever include this - private, internal header. This means that pvrusb2-hdw, pvrusb2-encoder, - etc will include this, but pvrusb2-v4l should not. - -*/ - -#include -#include -#include -#include "pvrusb2-hdw.h" -#include "pvrusb2-io.h" -#include - -/* Legal values for the SRATE state variable */ -#define PVR2_CVAL_SRATE_48 0 -#define PVR2_CVAL_SRATE_44_1 1 - -/* Legal values for the AUDIOBITRATE state variable */ -#define PVR2_CVAL_AUDIOBITRATE_384 0 -#define PVR2_CVAL_AUDIOBITRATE_320 1 -#define PVR2_CVAL_AUDIOBITRATE_256 2 -#define PVR2_CVAL_AUDIOBITRATE_224 3 -#define PVR2_CVAL_AUDIOBITRATE_192 4 -#define PVR2_CVAL_AUDIOBITRATE_160 5 -#define PVR2_CVAL_AUDIOBITRATE_128 6 -#define PVR2_CVAL_AUDIOBITRATE_112 7 -#define PVR2_CVAL_AUDIOBITRATE_96 8 -#define PVR2_CVAL_AUDIOBITRATE_80 9 -#define PVR2_CVAL_AUDIOBITRATE_64 10 -#define PVR2_CVAL_AUDIOBITRATE_56 11 -#define PVR2_CVAL_AUDIOBITRATE_48 12 -#define PVR2_CVAL_AUDIOBITRATE_32 13 -#define PVR2_CVAL_AUDIOBITRATE_VBR 14 - -/* Legal values for the AUDIOEMPHASIS state variable */ -#define PVR2_CVAL_AUDIOEMPHASIS_NONE 0 -#define PVR2_CVAL_AUDIOEMPHASIS_50_15 1 -#define PVR2_CVAL_AUDIOEMPHASIS_CCITT 2 - -/* Legal values for PVR2_CID_HSM */ -#define PVR2_CVAL_HSM_FAIL 0 -#define PVR2_CVAL_HSM_FULL 1 -#define PVR2_CVAL_HSM_HIGH 2 - -#define PVR2_VID_ENDPOINT 0x84 -#define PVR2_UNK_ENDPOINT 0x86 /* maybe raw yuv ? */ -#define PVR2_VBI_ENDPOINT 0x88 - -#define PVR2_CTL_BUFFSIZE 64 - -#define FREQTABLE_SIZE 500 - -#define LOCK_TAKE(x) do { mutex_lock(&x##_mutex); x##_held = !0; } while (0) -#define LOCK_GIVE(x) do { x##_held = 0; mutex_unlock(&x##_mutex); } while (0) - -struct pvr2_decoder; - -typedef int (*pvr2_ctlf_is_dirty)(struct pvr2_ctrl *); -typedef void (*pvr2_ctlf_clear_dirty)(struct pvr2_ctrl *); -typedef int (*pvr2_ctlf_get_value)(struct pvr2_ctrl *,int *); -typedef int (*pvr2_ctlf_set_value)(struct pvr2_ctrl *,int msk,int val); -typedef int (*pvr2_ctlf_val_to_sym)(struct pvr2_ctrl *,int msk,int val, - char *,unsigned int,unsigned int *); -typedef int (*pvr2_ctlf_sym_to_val)(struct pvr2_ctrl *, - const char *,unsigned int, - int *mskp,int *valp); -typedef unsigned int (*pvr2_ctlf_get_v4lflags)(struct pvr2_ctrl *); - -/* This structure describes a specific control. A table of these is set up - in pvrusb2-hdw.c. */ -struct pvr2_ctl_info { - /* Control's name suitable for use as an identifier */ - const char *name; - - /* Short description of control */ - const char *desc; - - /* Control's implementation */ - pvr2_ctlf_get_value get_value; /* Get its value */ - pvr2_ctlf_get_value get_min_value; /* Get minimum allowed value */ - pvr2_ctlf_get_value get_max_value; /* Get maximum allowed value */ - pvr2_ctlf_set_value set_value; /* Set its value */ - pvr2_ctlf_val_to_sym val_to_sym; /* Custom convert value->symbol */ - pvr2_ctlf_sym_to_val sym_to_val; /* Custom convert symbol->value */ - pvr2_ctlf_is_dirty is_dirty; /* Return true if dirty */ - pvr2_ctlf_clear_dirty clear_dirty; /* Clear dirty state */ - pvr2_ctlf_get_v4lflags get_v4lflags;/* Retrieve v4l flags */ - - /* Control's type (int, enum, bitmask) */ - enum pvr2_ctl_type type; - - /* Associated V4L control ID, if any */ - int v4l_id; - - /* Associated driver internal ID, if any */ - int internal_id; - - /* Don't implicitly initialize this control's value */ - int skip_init; - - /* Starting value for this control */ - int default_value; - - /* Type-specific control information */ - union { - struct { /* Integer control */ - long min_value; /* lower limit */ - long max_value; /* upper limit */ - } type_int; - struct { /* enumerated control */ - unsigned int count; /* enum value count */ - const char **value_names; /* symbol names */ - } type_enum; - struct { /* bitmask control */ - unsigned int valid_bits; /* bits in use */ - const char **bit_names; /* symbol name/bit */ - } type_bitmask; - } def; -}; - - -/* Same as pvr2_ctl_info, but includes storage for the control description */ -#define PVR2_CTLD_INFO_DESC_SIZE 32 -struct pvr2_ctld_info { - struct pvr2_ctl_info info; - char desc[PVR2_CTLD_INFO_DESC_SIZE]; -}; - -struct pvr2_ctrl { - const struct pvr2_ctl_info *info; - struct pvr2_hdw *hdw; -}; - - -struct pvr2_audio_stat { - void *ctxt; - void (*detach)(void *); - int (*status)(void *); -}; - -struct pvr2_decoder_ctrl { - void *ctxt; - void (*detach)(void *); - void (*enable)(void *,int); - int (*tuned)(void *); - void (*force_reset)(void *); -}; - -#define PVR2_I2C_PEND_DETECT 0x01 /* Need to detect a client type */ -#define PVR2_I2C_PEND_CLIENT 0x02 /* Client needs a specific update */ -#define PVR2_I2C_PEND_REFRESH 0x04 /* Client has specific pending bits */ -#define PVR2_I2C_PEND_STALE 0x08 /* Broadcast pending bits */ - -#define PVR2_I2C_PEND_ALL (PVR2_I2C_PEND_DETECT |\ - PVR2_I2C_PEND_CLIENT |\ - PVR2_I2C_PEND_REFRESH |\ - PVR2_I2C_PEND_STALE) - -/* Disposition of firmware1 loading situation */ -#define FW1_STATE_UNKNOWN 0 -#define FW1_STATE_MISSING 1 -#define FW1_STATE_FAILED 2 -#define FW1_STATE_RELOAD 3 -#define FW1_STATE_OK 4 - -/* Known major hardware variants, keyed from device ID */ -#define PVR2_HDW_TYPE_29XXX 0 -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX -#define PVR2_HDW_TYPE_24XXX 1 -#endif - -typedef int (*pvr2_i2c_func)(struct pvr2_hdw *,u8,u8 *,u16,u8 *, u16); -#define PVR2_I2C_FUNC_CNT 128 - -/* This structure contains all state data directly needed to - manipulate the hardware (as opposed to complying with a kernel - interface) */ -struct pvr2_hdw { - /* Underlying USB device handle */ - struct usb_device *usb_dev; - struct usb_interface *usb_intf; - - /* Device type, one of PVR2_HDW_TYPE_xxxxx */ - unsigned int hdw_type; - - /* Video spigot */ - struct pvr2_stream *vid_stream; - - /* Mutex for all hardware state control */ - struct mutex big_lock_mutex; - int big_lock_held; /* For debugging */ - - void (*poll_trigger_func)(void *); - void *poll_trigger_data; - - char name[32]; - - /* I2C stuff */ - struct i2c_adapter i2c_adap; - struct i2c_algorithm i2c_algo; - pvr2_i2c_func i2c_func[PVR2_I2C_FUNC_CNT]; - int i2c_cx25840_hack_state; - int i2c_linked; - unsigned int i2c_pend_types; /* Which types of update are needed */ - unsigned long i2c_pend_mask; /* Change bits we need to scan */ - unsigned long i2c_stale_mask; /* Pending broadcast change bits */ - unsigned long i2c_active_mask; /* All change bits currently in use */ - struct list_head i2c_clients; - struct mutex i2c_list_lock; - - /* Frequency table */ - unsigned int freqTable[FREQTABLE_SIZE]; - unsigned int freqProgSlot; - unsigned int freqSlot; - - /* Stuff for handling low level control interaction with device */ - struct mutex ctl_lock_mutex; - int ctl_lock_held; /* For debugging */ - struct urb *ctl_write_urb; - struct urb *ctl_read_urb; - unsigned char *ctl_write_buffer; - unsigned char *ctl_read_buffer; - volatile int ctl_write_pend_flag; - volatile int ctl_read_pend_flag; - volatile int ctl_timeout_flag; - struct completion ctl_done; - unsigned char cmd_buffer[PVR2_CTL_BUFFSIZE]; - int cmd_debug_state; // Low level command debugging info - unsigned char cmd_debug_code; // - unsigned int cmd_debug_write_len; // - unsigned int cmd_debug_read_len; // - - int flag_ok; // device in known good state - int flag_disconnected; // flag_ok == 0 due to disconnect - int flag_init_ok; // true if structure is fully initialized - int flag_streaming_enabled; // true if streaming should be on - int fw1_state; // current situation with fw1 - - int flag_decoder_is_tuned; - - struct pvr2_decoder_ctrl *decoder_ctrl; - - // CPU firmware info (used to help find / save firmware data) - char *fw_buffer; - unsigned int fw_size; - - // Which subsystem pieces have been enabled / configured - unsigned long subsys_enabled_mask; - - // Which subsystems are manipulated to enable streaming - unsigned long subsys_stream_mask; - - // True if there is a request to trigger logging of state in each - // module. - int log_requested; - - /* Tuner / frequency control stuff */ - unsigned int tuner_type; - int tuner_updated; - unsigned int freqVal; - int freqDirty; - - /* Video standard handling */ - v4l2_std_id std_mask_eeprom; // Hardware supported selections - v4l2_std_id std_mask_avail; // Which standards we may select from - v4l2_std_id std_mask_cur; // Currently selected standard(s) - unsigned int std_enum_cnt; // # of enumerated standards - int std_enum_cur; // selected standard enumeration value - int std_dirty; // True if std_mask_cur has changed - struct pvr2_ctl_info std_info_enum; - struct pvr2_ctl_info std_info_avail; - struct pvr2_ctl_info std_info_cur; - struct v4l2_standard *std_defs; - const char **std_enum_names; - - // Generated string names, one per actual V4L2 standard - const char *std_mask_ptrs[32]; - char std_mask_names[32][10]; - - int unit_number; /* ID for driver instance */ - unsigned long serial_number; /* ID for hardware itself */ - - /* Minor number used by v4l logic (yes, this is a hack, as there should - be no v4l junk here). Probably a better way to do this. */ - int v4l_minor_number; - - /* Location of eeprom or a negative number if none */ - int eeprom_addr; - - enum pvr2_config config; - - /* Information about what audio signal we're hearing */ - int flag_stereo; - int flag_bilingual; - struct pvr2_audio_stat *audio_stat; - - /* Control state needed for cx2341x module */ - struct cx2341x_mpeg_params enc_cur_state; - struct cx2341x_mpeg_params enc_ctl_state; - /* True if an encoder attribute has changed */ - int enc_stale; - /* True if enc_cur_state is valid */ - int enc_cur_valid; - - /* Control state */ -#define VCREATE_DATA(lab) int lab##_val; int lab##_dirty - VCREATE_DATA(brightness); - VCREATE_DATA(contrast); - VCREATE_DATA(saturation); - VCREATE_DATA(hue); - VCREATE_DATA(volume); - VCREATE_DATA(balance); - VCREATE_DATA(bass); - VCREATE_DATA(treble); - VCREATE_DATA(mute); - VCREATE_DATA(input); - VCREATE_DATA(audiomode); - VCREATE_DATA(res_hor); - VCREATE_DATA(res_ver); - VCREATE_DATA(srate); -#undef VCREATE_DATA - - struct pvr2_ctld_info *mpeg_ctrl_info; - - struct pvr2_ctrl *controls; - unsigned int control_cnt; -}; - -#endif /* __PVRUSB2_HDW_INTERNAL_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c deleted file mode 100644 index a36a69d9e..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ /dev/null @@ -1,3128 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include -#include -#include "pvrusb2.h" -#include "pvrusb2-std.h" -#include "pvrusb2-util.h" -#include "pvrusb2-hdw.h" -#include "pvrusb2-i2c-core.h" -#include "pvrusb2-tuner.h" -#include "pvrusb2-eeprom.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-encoder.h" -#include "pvrusb2-debug.h" - -struct usb_device_id pvr2_device_table[] = { - [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, -#endif - { } -}; - -MODULE_DEVICE_TABLE(usb, pvr2_device_table); - -static const char *pvr2_device_names[] = { - [PVR2_HDW_TYPE_29XXX] = "WinTV PVR USB2 Model Category 29xxxx", -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - [PVR2_HDW_TYPE_24XXX] = "WinTV PVR USB2 Model Category 24xxxx", -#endif -}; - -struct pvr2_string_table { - const char **lst; - unsigned int cnt; -}; - -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX -// Names of other client modules to request for 24xxx model hardware -static const char *pvr2_client_24xxx[] = { - "cx25840", - "tuner", - "wm8775", -}; -#endif - -// Names of other client modules to request for 29xxx model hardware -static const char *pvr2_client_29xxx[] = { - "msp3400", - "saa7115", - "tuner", -}; - -static struct pvr2_string_table pvr2_client_lists[] = { - [PVR2_HDW_TYPE_29XXX] = { - pvr2_client_29xxx, - sizeof(pvr2_client_29xxx)/sizeof(pvr2_client_29xxx[0]), - }, -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - [PVR2_HDW_TYPE_24XXX] = { - pvr2_client_24xxx, - sizeof(pvr2_client_24xxx)/sizeof(pvr2_client_24xxx[0]), - }, -#endif -}; - -static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL}; -static DECLARE_MUTEX(pvr2_unit_sem); - -static int ctlchg = 0; -static int initusbreset = 1; -static int procreload = 0; -static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 }; -static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 }; -static int video_std[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 }; -static int init_pause_msec = 0; - -module_param(ctlchg, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value"); -module_param(init_pause_msec, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay"); -module_param(initusbreset, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(initusbreset, "Do USB reset device on probe"); -module_param(procreload, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(procreload, - "Attempt init failure recovery with firmware reload"); -module_param_array(tuner, int, NULL, 0444); -MODULE_PARM_DESC(tuner,"specify installed tuner type"); -module_param_array(video_std, int, NULL, 0444); -MODULE_PARM_DESC(video_std,"specify initial video standard"); -module_param_array(tolerance, int, NULL, 0444); -MODULE_PARM_DESC(tolerance,"specify stream error tolerance"); - -#define PVR2_CTL_WRITE_ENDPOINT 0x01 -#define PVR2_CTL_READ_ENDPOINT 0x81 - -#define PVR2_GPIO_IN 0x9008 -#define PVR2_GPIO_OUT 0x900c -#define PVR2_GPIO_DIR 0x9020 - -#define trace_firmware(...) pvr2_trace(PVR2_TRACE_FIRMWARE,__VA_ARGS__) - -#define PVR2_FIRMWARE_ENDPOINT 0x02 - -/* size of a firmware chunk */ -#define FIRMWARE_CHUNK_SIZE 0x2000 - -/* Define the list of additional controls we'll dynamically construct based - on query of the cx2341x module. */ -struct pvr2_mpeg_ids { - const char *strid; - int id; -}; -static const struct pvr2_mpeg_ids mpeg_ids[] = { - { - .strid = "audio_layer", - .id = V4L2_CID_MPEG_AUDIO_ENCODING, - },{ - .strid = "audio_bitrate", - .id = V4L2_CID_MPEG_AUDIO_L2_BITRATE, - },{ - /* Already using audio_mode elsewhere :-( */ - .strid = "mpeg_audio_mode", - .id = V4L2_CID_MPEG_AUDIO_MODE, - },{ - .strid = "mpeg_audio_mode_extension", - .id = V4L2_CID_MPEG_AUDIO_MODE_EXTENSION, - },{ - .strid = "audio_emphasis", - .id = V4L2_CID_MPEG_AUDIO_EMPHASIS, - },{ - .strid = "audio_crc", - .id = V4L2_CID_MPEG_AUDIO_CRC, - },{ - .strid = "video_aspect", - .id = V4L2_CID_MPEG_VIDEO_ASPECT, - },{ - .strid = "video_b_frames", - .id = V4L2_CID_MPEG_VIDEO_B_FRAMES, - },{ - .strid = "video_gop_size", - .id = V4L2_CID_MPEG_VIDEO_GOP_SIZE, - },{ - .strid = "video_gop_closure", - .id = V4L2_CID_MPEG_VIDEO_GOP_CLOSURE, - },{ - .strid = "video_pulldown", - .id = V4L2_CID_MPEG_VIDEO_PULLDOWN, - },{ - .strid = "video_bitrate_mode", - .id = V4L2_CID_MPEG_VIDEO_BITRATE_MODE, - },{ - .strid = "video_bitrate", - .id = V4L2_CID_MPEG_VIDEO_BITRATE, - },{ - .strid = "video_bitrate_peak", - .id = V4L2_CID_MPEG_VIDEO_BITRATE_PEAK, - },{ - .strid = "video_temporal_decimation", - .id = V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION, - },{ - .strid = "stream_type", - .id = V4L2_CID_MPEG_STREAM_TYPE, - },{ - .strid = "video_spatial_filter_mode", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE, - },{ - .strid = "video_spatial_filter", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER, - },{ - .strid = "video_luma_spatial_filter_type", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE, - },{ - .strid = "video_chroma_spatial_filter_type", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE, - },{ - .strid = "video_temporal_filter_mode", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE, - },{ - .strid = "video_temporal_filter", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER, - },{ - .strid = "video_median_filter_type", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE, - },{ - .strid = "video_luma_median_filter_top", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP, - },{ - .strid = "video_luma_median_filter_bottom", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM, - },{ - .strid = "video_chroma_median_filter_top", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP, - },{ - .strid = "video_chroma_median_filter_bottom", - .id = V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM, - } -}; -#define MPEGDEF_COUNT (sizeof(mpeg_ids)/sizeof(mpeg_ids[0])) - -static const char *control_values_srate[] = { - [PVR2_CVAL_SRATE_48] = "48KHz", - [PVR2_CVAL_SRATE_44_1] = "44.1KHz", -}; - - - - -static const char *control_values_input[] = { - [PVR2_CVAL_INPUT_TV] = "television", /*xawtv needs this name*/ - [PVR2_CVAL_INPUT_RADIO] = "radio", - [PVR2_CVAL_INPUT_SVIDEO] = "s-video", - [PVR2_CVAL_INPUT_COMPOSITE] = "composite", -}; - - -static const char *control_values_audiomode[] = { - [V4L2_TUNER_MODE_MONO] = "Mono", - [V4L2_TUNER_MODE_STEREO] = "Stereo", - [V4L2_TUNER_MODE_LANG1] = "Lang1", - [V4L2_TUNER_MODE_LANG2] = "Lang2", - [V4L2_TUNER_MODE_LANG1_LANG2] = "Lang1+Lang2", -}; - - -static const char *control_values_hsm[] = { - [PVR2_CVAL_HSM_FAIL] = "Fail", - [PVR2_CVAL_HSM_HIGH] = "High", - [PVR2_CVAL_HSM_FULL] = "Full", -}; - - -static const char *control_values_subsystem[] = { - [PVR2_SUBSYS_B_ENC_FIRMWARE] = "enc_firmware", - [PVR2_SUBSYS_B_ENC_CFG] = "enc_config", - [PVR2_SUBSYS_B_DIGITIZER_RUN] = "digitizer_run", - [PVR2_SUBSYS_B_USBSTREAM_RUN] = "usbstream_run", - [PVR2_SUBSYS_B_ENC_RUN] = "enc_run", -}; - -static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl); -static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw); -static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw); -static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw); -static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw); -static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw); -static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw); -static void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, - unsigned long msk, - unsigned long val); -static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, - unsigned long msk, - unsigned long val); -static int pvr2_send_request_ex(struct pvr2_hdw *hdw, - unsigned int timeout,int probe_fl, - void *write_data,unsigned int write_len, - void *read_data,unsigned int read_len); -static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res); -static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res); - -static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) -{ - struct pvr2_hdw *hdw = cptr->hdw; - if ((hdw->freqProgSlot > 0) && (hdw->freqProgSlot <= FREQTABLE_SIZE)) { - *vp = hdw->freqTable[hdw->freqProgSlot-1]; - } else { - *vp = 0; - } - return 0; -} - -static int ctrl_channelfreq_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - if ((hdw->freqProgSlot > 0) && (hdw->freqProgSlot <= FREQTABLE_SIZE)) { - hdw->freqTable[hdw->freqProgSlot-1] = v; - } - return 0; -} - -static int ctrl_channelprog_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->freqProgSlot; - return 0; -} - -static int ctrl_channelprog_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - if ((v >= 0) && (v <= FREQTABLE_SIZE)) { - hdw->freqProgSlot = v; - } - return 0; -} - -static int ctrl_channel_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->freqSlot; - return 0; -} - -static int ctrl_channel_set(struct pvr2_ctrl *cptr,int m,int v) -{ - unsigned freq = 0; - struct pvr2_hdw *hdw = cptr->hdw; - hdw->freqSlot = v; - if ((hdw->freqSlot > 0) && (hdw->freqSlot <= FREQTABLE_SIZE)) { - freq = hdw->freqTable[hdw->freqSlot-1]; - } - if (freq && (freq != hdw->freqVal)) { - hdw->freqVal = freq; - hdw->freqDirty = !0; - } - return 0; -} - -static int ctrl_freq_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->freqVal; - return 0; -} - -static int ctrl_freq_is_dirty(struct pvr2_ctrl *cptr) -{ - return cptr->hdw->freqDirty != 0; -} - -static void ctrl_freq_clear_dirty(struct pvr2_ctrl *cptr) -{ - cptr->hdw->freqDirty = 0; -} - -static int ctrl_freq_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - hdw->freqVal = v; - hdw->freqDirty = !0; - hdw->freqSlot = 0; - return 0; -} - -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX -static int ctrl_hres_max_get(struct pvr2_ctrl *cptr,int *vp) -{ - /* If we're dealing with a 24xxx device, force the horizontal - maximum to be 720 no matter what, since we can't get the device - to work properly with any other value. Otherwise just return - the normal value. */ - *vp = cptr->info->def.type_int.max_value; - if (cptr->hdw->hdw_type == PVR2_HDW_TYPE_24XXX) *vp = 720; - return 0; -} - -static int ctrl_hres_min_get(struct pvr2_ctrl *cptr,int *vp) -{ - /* If we're dealing with a 24xxx device, force the horizontal - minimum to be 720 no matter what, since we can't get the device - to work properly with any other value. Otherwise just return - the normal value. */ - *vp = cptr->info->def.type_int.min_value; - if (cptr->hdw->hdw_type == PVR2_HDW_TYPE_24XXX) *vp = 720; - return 0; -} -#endif - -static int ctrl_cx2341x_is_dirty(struct pvr2_ctrl *cptr) -{ - return cptr->hdw->enc_stale != 0; -} - -static void ctrl_cx2341x_clear_dirty(struct pvr2_ctrl *cptr) -{ - cptr->hdw->enc_stale = 0; -} - -static int ctrl_cx2341x_get(struct pvr2_ctrl *cptr,int *vp) -{ - int ret; - struct v4l2_ext_controls cs; - struct v4l2_ext_control c1; - memset(&cs,0,sizeof(cs)); - memset(&c1,0,sizeof(c1)); - cs.controls = &c1; - cs.count = 1; - c1.id = cptr->info->v4l_id; - ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state,&cs, - VIDIOC_G_EXT_CTRLS); - if (ret) return ret; - *vp = c1.value; - return 0; -} - -static int ctrl_cx2341x_set(struct pvr2_ctrl *cptr,int m,int v) -{ - int ret; - struct v4l2_ext_controls cs; - struct v4l2_ext_control c1; - memset(&cs,0,sizeof(cs)); - memset(&c1,0,sizeof(c1)); - cs.controls = &c1; - cs.count = 1; - c1.id = cptr->info->v4l_id; - c1.value = v; - ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state,&cs, - VIDIOC_S_EXT_CTRLS); - if (ret) return ret; - cptr->hdw->enc_stale = !0; - return 0; -} - -static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr) -{ - struct v4l2_queryctrl qctrl; - struct pvr2_ctl_info *info; - qctrl.id = cptr->info->v4l_id; - cx2341x_ctrl_query(&cptr->hdw->enc_ctl_state,&qctrl); - /* Strip out the const so we can adjust a function pointer. It's - OK to do this here because we know this is a dynamically created - control, so the underlying storage for the info pointer is (a) - private to us, and (b) not in read-only storage. Either we do - this or we significantly complicate the underlying control - implementation. */ - info = (struct pvr2_ctl_info *)(cptr->info); - if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { - if (info->set_value) { - info->set_value = NULL; - } - } else { - if (!(info->set_value)) { - info->set_value = ctrl_cx2341x_set; - } - } - return qctrl.flags; -} - -static int ctrl_streamingenabled_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->flag_streaming_enabled; - return 0; -} - -static int ctrl_hsm_get(struct pvr2_ctrl *cptr,int *vp) -{ - int result = pvr2_hdw_is_hsm(cptr->hdw); - *vp = PVR2_CVAL_HSM_FULL; - if (result < 0) *vp = PVR2_CVAL_HSM_FAIL; - if (result) *vp = PVR2_CVAL_HSM_HIGH; - return 0; -} - -static int ctrl_stdavail_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->std_mask_avail; - return 0; -} - -static int ctrl_stdavail_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - v4l2_std_id ns; - ns = hdw->std_mask_avail; - ns = (ns & ~m) | (v & m); - if (ns == hdw->std_mask_avail) return 0; - hdw->std_mask_avail = ns; - pvr2_hdw_internal_set_std_avail(hdw); - pvr2_hdw_internal_find_stdenum(hdw); - return 0; -} - -static int ctrl_std_val_to_sym(struct pvr2_ctrl *cptr,int msk,int val, - char *bufPtr,unsigned int bufSize, - unsigned int *len) -{ - *len = pvr2_std_id_to_str(bufPtr,bufSize,msk & val); - return 0; -} - -static int ctrl_std_sym_to_val(struct pvr2_ctrl *cptr, - const char *bufPtr,unsigned int bufSize, - int *mskp,int *valp) -{ - int ret; - v4l2_std_id id; - ret = pvr2_std_str_to_id(&id,bufPtr,bufSize); - if (ret < 0) return ret; - if (mskp) *mskp = id; - if (valp) *valp = id; - return 0; -} - -static int ctrl_stdcur_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->std_mask_cur; - return 0; -} - -static int ctrl_stdcur_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - v4l2_std_id ns; - ns = hdw->std_mask_cur; - ns = (ns & ~m) | (v & m); - if (ns == hdw->std_mask_cur) return 0; - hdw->std_mask_cur = ns; - hdw->std_dirty = !0; - pvr2_hdw_internal_find_stdenum(hdw); - return 0; -} - -static int ctrl_stdcur_is_dirty(struct pvr2_ctrl *cptr) -{ - return cptr->hdw->std_dirty != 0; -} - -static void ctrl_stdcur_clear_dirty(struct pvr2_ctrl *cptr) -{ - cptr->hdw->std_dirty = 0; -} - -static int ctrl_signal_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = ((pvr2_hdw_get_signal_status_internal(cptr->hdw) & - PVR2_SIGNAL_OK) ? 1 : 0); - return 0; -} - -static int ctrl_subsys_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->subsys_enabled_mask; - return 0; -} - -static int ctrl_subsys_set(struct pvr2_ctrl *cptr,int m,int v) -{ - pvr2_hdw_subsys_bit_chg_no_lock(cptr->hdw,m,v); - return 0; -} - -static int ctrl_subsys_stream_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->subsys_stream_mask; - return 0; -} - -static int ctrl_subsys_stream_set(struct pvr2_ctrl *cptr,int m,int v) -{ - pvr2_hdw_subsys_stream_bit_chg_no_lock(cptr->hdw,m,v); - return 0; -} - -static int ctrl_stdenumcur_set(struct pvr2_ctrl *cptr,int m,int v) -{ - struct pvr2_hdw *hdw = cptr->hdw; - if (v < 0) return -EINVAL; - if (v > hdw->std_enum_cnt) return -EINVAL; - hdw->std_enum_cur = v; - if (!v) return 0; - v--; - if (hdw->std_mask_cur == hdw->std_defs[v].id) return 0; - hdw->std_mask_cur = hdw->std_defs[v].id; - hdw->std_dirty = !0; - return 0; -} - - -static int ctrl_stdenumcur_get(struct pvr2_ctrl *cptr,int *vp) -{ - *vp = cptr->hdw->std_enum_cur; - return 0; -} - - -static int ctrl_stdenumcur_is_dirty(struct pvr2_ctrl *cptr) -{ - return cptr->hdw->std_dirty != 0; -} - - -static void ctrl_stdenumcur_clear_dirty(struct pvr2_ctrl *cptr) -{ - cptr->hdw->std_dirty = 0; -} - - -#define DEFINT(vmin,vmax) \ - .type = pvr2_ctl_int, \ - .def.type_int.min_value = vmin, \ - .def.type_int.max_value = vmax - -#define DEFENUM(tab) \ - .type = pvr2_ctl_enum, \ - .def.type_enum.count = (sizeof(tab)/sizeof((tab)[0])), \ - .def.type_enum.value_names = tab - -#define DEFBOOL \ - .type = pvr2_ctl_bool - -#define DEFMASK(msk,tab) \ - .type = pvr2_ctl_bitmask, \ - .def.type_bitmask.valid_bits = msk, \ - .def.type_bitmask.bit_names = tab - -#define DEFREF(vname) \ - .set_value = ctrl_set_##vname, \ - .get_value = ctrl_get_##vname, \ - .is_dirty = ctrl_isdirty_##vname, \ - .clear_dirty = ctrl_cleardirty_##vname - - -#define VCREATE_FUNCS(vname) \ -static int ctrl_get_##vname(struct pvr2_ctrl *cptr,int *vp) \ -{*vp = cptr->hdw->vname##_val; return 0;} \ -static int ctrl_set_##vname(struct pvr2_ctrl *cptr,int m,int v) \ -{cptr->hdw->vname##_val = v; cptr->hdw->vname##_dirty = !0; return 0;} \ -static int ctrl_isdirty_##vname(struct pvr2_ctrl *cptr) \ -{return cptr->hdw->vname##_dirty != 0;} \ -static void ctrl_cleardirty_##vname(struct pvr2_ctrl *cptr) \ -{cptr->hdw->vname##_dirty = 0;} - -VCREATE_FUNCS(brightness) -VCREATE_FUNCS(contrast) -VCREATE_FUNCS(saturation) -VCREATE_FUNCS(hue) -VCREATE_FUNCS(volume) -VCREATE_FUNCS(balance) -VCREATE_FUNCS(bass) -VCREATE_FUNCS(treble) -VCREATE_FUNCS(mute) -VCREATE_FUNCS(input) -VCREATE_FUNCS(audiomode) -VCREATE_FUNCS(res_hor) -VCREATE_FUNCS(res_ver) -VCREATE_FUNCS(srate) - -#define MIN_FREQ 55250000L -#define MAX_FREQ 850000000L - -/* Table definition of all controls which can be manipulated */ -static const struct pvr2_ctl_info control_defs[] = { - { - .v4l_id = V4L2_CID_BRIGHTNESS, - .desc = "Brightness", - .name = "brightness", - .default_value = 128, - DEFREF(brightness), - DEFINT(0,255), - },{ - .v4l_id = V4L2_CID_CONTRAST, - .desc = "Contrast", - .name = "contrast", - .default_value = 68, - DEFREF(contrast), - DEFINT(0,127), - },{ - .v4l_id = V4L2_CID_SATURATION, - .desc = "Saturation", - .name = "saturation", - .default_value = 64, - DEFREF(saturation), - DEFINT(0,127), - },{ - .v4l_id = V4L2_CID_HUE, - .desc = "Hue", - .name = "hue", - .default_value = 0, - DEFREF(hue), - DEFINT(-128,127), - },{ - .v4l_id = V4L2_CID_AUDIO_VOLUME, - .desc = "Volume", - .name = "volume", - .default_value = 65535, - DEFREF(volume), - DEFINT(0,65535), - },{ - .v4l_id = V4L2_CID_AUDIO_BALANCE, - .desc = "Balance", - .name = "balance", - .default_value = 0, - DEFREF(balance), - DEFINT(-32768,32767), - },{ - .v4l_id = V4L2_CID_AUDIO_BASS, - .desc = "Bass", - .name = "bass", - .default_value = 0, - DEFREF(bass), - DEFINT(-32768,32767), - },{ - .v4l_id = V4L2_CID_AUDIO_TREBLE, - .desc = "Treble", - .name = "treble", - .default_value = 0, - DEFREF(treble), - DEFINT(-32768,32767), - },{ - .v4l_id = V4L2_CID_AUDIO_MUTE, - .desc = "Mute", - .name = "mute", - .default_value = 0, - DEFREF(mute), - DEFBOOL, - },{ - .desc = "Video Source", - .name = "input", - .internal_id = PVR2_CID_INPUT, - .default_value = PVR2_CVAL_INPUT_TV, - DEFREF(input), - DEFENUM(control_values_input), - },{ - .desc = "Audio Mode", - .name = "audio_mode", - .internal_id = PVR2_CID_AUDIOMODE, - .default_value = V4L2_TUNER_MODE_STEREO, - DEFREF(audiomode), - DEFENUM(control_values_audiomode), - },{ - .desc = "Horizontal capture resolution", - .name = "resolution_hor", - .internal_id = PVR2_CID_HRES, - .default_value = 720, - DEFREF(res_hor), - DEFINT(320,720), -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - /* Hook in check for clamp on horizontal resolution in - order to avoid unsolved problem involving cx25840. */ - .get_max_value = ctrl_hres_max_get, - .get_min_value = ctrl_hres_min_get, -#endif - },{ - .desc = "Vertical capture resolution", - .name = "resolution_ver", - .internal_id = PVR2_CID_VRES, - .default_value = 480, - DEFREF(res_ver), - DEFINT(200,625), - },{ - .v4l_id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ, - .desc = "Sample rate", - .name = "srate", - .default_value = PVR2_CVAL_SRATE_48, - DEFREF(srate), - DEFENUM(control_values_srate), - },{ - .desc = "Tuner Frequency (Hz)", - .name = "frequency", - .internal_id = PVR2_CID_FREQUENCY, - .default_value = 175250000L, - .set_value = ctrl_freq_set, - .get_value = ctrl_freq_get, - .is_dirty = ctrl_freq_is_dirty, - .clear_dirty = ctrl_freq_clear_dirty, - DEFINT(MIN_FREQ,MAX_FREQ), - },{ - .desc = "Channel", - .name = "channel", - .set_value = ctrl_channel_set, - .get_value = ctrl_channel_get, - DEFINT(0,FREQTABLE_SIZE), - },{ - .desc = "Channel Program Frequency", - .name = "freq_table_value", - .set_value = ctrl_channelfreq_set, - .get_value = ctrl_channelfreq_get, - DEFINT(MIN_FREQ,MAX_FREQ), - },{ - .desc = "Channel Program ID", - .name = "freq_table_channel", - .set_value = ctrl_channelprog_set, - .get_value = ctrl_channelprog_get, - DEFINT(0,FREQTABLE_SIZE), - },{ - .desc = "Streaming Enabled", - .name = "streaming_enabled", - .get_value = ctrl_streamingenabled_get, - DEFBOOL, - },{ - .desc = "USB Speed", - .name = "usb_speed", - .get_value = ctrl_hsm_get, - DEFENUM(control_values_hsm), - },{ - .desc = "Signal Present", - .name = "signal_present", - .get_value = ctrl_signal_get, - DEFBOOL, - },{ - .desc = "Video Standards Available Mask", - .name = "video_standard_mask_available", - .internal_id = PVR2_CID_STDAVAIL, - .skip_init = !0, - .get_value = ctrl_stdavail_get, - .set_value = ctrl_stdavail_set, - .val_to_sym = ctrl_std_val_to_sym, - .sym_to_val = ctrl_std_sym_to_val, - .type = pvr2_ctl_bitmask, - },{ - .desc = "Video Standards In Use Mask", - .name = "video_standard_mask_active", - .internal_id = PVR2_CID_STDCUR, - .skip_init = !0, - .get_value = ctrl_stdcur_get, - .set_value = ctrl_stdcur_set, - .is_dirty = ctrl_stdcur_is_dirty, - .clear_dirty = ctrl_stdcur_clear_dirty, - .val_to_sym = ctrl_std_val_to_sym, - .sym_to_val = ctrl_std_sym_to_val, - .type = pvr2_ctl_bitmask, - },{ - .desc = "Subsystem enabled mask", - .name = "debug_subsys_mask", - .skip_init = !0, - .get_value = ctrl_subsys_get, - .set_value = ctrl_subsys_set, - DEFMASK(PVR2_SUBSYS_ALL,control_values_subsystem), - },{ - .desc = "Subsystem stream mask", - .name = "debug_subsys_stream_mask", - .skip_init = !0, - .get_value = ctrl_subsys_stream_get, - .set_value = ctrl_subsys_stream_set, - DEFMASK(PVR2_SUBSYS_ALL,control_values_subsystem), - },{ - .desc = "Video Standard Name", - .name = "video_standard", - .internal_id = PVR2_CID_STDENUM, - .skip_init = !0, - .get_value = ctrl_stdenumcur_get, - .set_value = ctrl_stdenumcur_set, - .is_dirty = ctrl_stdenumcur_is_dirty, - .clear_dirty = ctrl_stdenumcur_clear_dirty, - .type = pvr2_ctl_enum, - } -}; - -#define CTRLDEF_COUNT (sizeof(control_defs)/sizeof(control_defs[0])) - - -const char *pvr2_config_get_name(enum pvr2_config cfg) -{ - switch (cfg) { - case pvr2_config_empty: return "empty"; - case pvr2_config_mpeg: return "mpeg"; - case pvr2_config_vbi: return "vbi"; - case pvr2_config_radio: return "radio"; - } - return ""; -} - - -struct usb_device *pvr2_hdw_get_dev(struct pvr2_hdw *hdw) -{ - return hdw->usb_dev; -} - - -unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw) -{ - return hdw->serial_number; -} - -int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw) -{ - return hdw->unit_number; -} - - -/* Attempt to locate one of the given set of files. Messages are logged - appropriate to what has been found. The return value will be 0 or - greater on success (it will be the index of the file name found) and - fw_entry will be filled in. Otherwise a negative error is returned on - failure. If the return value is -ENOENT then no viable firmware file - could be located. */ -static int pvr2_locate_firmware(struct pvr2_hdw *hdw, - const struct firmware **fw_entry, - const char *fwtypename, - unsigned int fwcount, - const char *fwnames[]) -{ - unsigned int idx; - int ret = -EINVAL; - for (idx = 0; idx < fwcount; idx++) { - ret = request_firmware(fw_entry, - fwnames[idx], - &hdw->usb_dev->dev); - if (!ret) { - trace_firmware("Located %s firmware: %s;" - " uploading...", - fwtypename, - fwnames[idx]); - return idx; - } - if (ret == -ENOENT) continue; - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "request_firmware fatal error with code=%d",ret); - return ret; - } - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "***WARNING***" - " Device %s firmware" - " seems to be missing.", - fwtypename); - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Did you install the pvrusb2 firmware files" - " in their proper location?"); - if (fwcount == 1) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "request_firmware unable to locate %s file %s", - fwtypename,fwnames[0]); - } else { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "request_firmware unable to locate" - " one of the following %s files:", - fwtypename); - for (idx = 0; idx < fwcount; idx++) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "request_firmware: Failed to find %s", - fwnames[idx]); - } - } - return ret; -} - - -/* - * pvr2_upload_firmware1(). - * - * Send the 8051 firmware to the device. After the upload, arrange for - * device to re-enumerate. - * - * NOTE : the pointer to the firmware data given by request_firmware() - * is not suitable for an usb transaction. - * - */ -static int pvr2_upload_firmware1(struct pvr2_hdw *hdw) -{ - const struct firmware *fw_entry = NULL; - void *fw_ptr; - unsigned int pipe; - int ret; - u16 address; - static const char *fw_files_29xxx[] = { - "v4l-pvrusb2-29xxx-01.fw", - }; -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - static const char *fw_files_24xxx[] = { - "v4l-pvrusb2-24xxx-01.fw", - }; -#endif - static const struct pvr2_string_table fw_file_defs[] = { - [PVR2_HDW_TYPE_29XXX] = { - fw_files_29xxx, - sizeof(fw_files_29xxx)/sizeof(fw_files_29xxx[0]), - }, -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - [PVR2_HDW_TYPE_24XXX] = { - fw_files_24xxx, - sizeof(fw_files_24xxx)/sizeof(fw_files_24xxx[0]), - }, -#endif - }; - hdw->fw1_state = FW1_STATE_FAILED; // default result - - trace_firmware("pvr2_upload_firmware1"); - - ret = pvr2_locate_firmware(hdw,&fw_entry,"fx2 controller", - fw_file_defs[hdw->hdw_type].cnt, - fw_file_defs[hdw->hdw_type].lst); - if (ret < 0) { - if (ret == -ENOENT) hdw->fw1_state = FW1_STATE_MISSING; - return ret; - } - - usb_settoggle(hdw->usb_dev, 0 & 0xf, !(0 & USB_DIR_IN), 0); - usb_clear_halt(hdw->usb_dev, usb_sndbulkpipe(hdw->usb_dev, 0 & 0x7f)); - - pipe = usb_sndctrlpipe(hdw->usb_dev, 0); - - if (fw_entry->size != 0x2000){ - pvr2_trace(PVR2_TRACE_ERROR_LEGS,"wrong fx2 firmware size"); - release_firmware(fw_entry); - return -ENOMEM; - } - - fw_ptr = kmalloc(0x800, GFP_KERNEL); - if (fw_ptr == NULL){ - release_firmware(fw_entry); - return -ENOMEM; - } - - /* We have to hold the CPU during firmware upload. */ - pvr2_hdw_cpureset_assert(hdw,1); - - /* upload the firmware to address 0000-1fff in 2048 (=0x800) bytes - chunk. */ - - ret = 0; - for(address = 0; address < fw_entry->size; address += 0x800) { - memcpy(fw_ptr, fw_entry->data + address, 0x800); - ret += usb_control_msg(hdw->usb_dev, pipe, 0xa0, 0x40, address, - 0, fw_ptr, 0x800, HZ); - } - - trace_firmware("Upload done, releasing device's CPU"); - - /* Now release the CPU. It will disconnect and reconnect later. */ - pvr2_hdw_cpureset_assert(hdw,0); - - kfree(fw_ptr); - release_firmware(fw_entry); - - trace_firmware("Upload done (%d bytes sent)",ret); - - /* We should have written 8192 bytes */ - if (ret == 8192) { - hdw->fw1_state = FW1_STATE_RELOAD; - return 0; - } - - return -EIO; -} - - -/* - * pvr2_upload_firmware2() - * - * This uploads encoder firmware on endpoint 2. - * - */ - -int pvr2_upload_firmware2(struct pvr2_hdw *hdw) -{ - const struct firmware *fw_entry = NULL; - void *fw_ptr; - unsigned int pipe, fw_len, fw_done; - int actual_length; - int ret = 0; - int fwidx; - static const char *fw_files[] = { - CX2341X_FIRM_ENC_FILENAME, - }; - - trace_firmware("pvr2_upload_firmware2"); - - ret = pvr2_locate_firmware(hdw,&fw_entry,"encoder", - sizeof(fw_files)/sizeof(fw_files[0]), - fw_files); - if (ret < 0) return ret; - fwidx = ret; - ret = 0; - /* Since we're about to completely reinitialize the encoder, - invalidate our cached copy of its configuration state. Next - time we configure the encoder, then we'll fully configure it. */ - hdw->enc_cur_valid = 0; - - /* First prepare firmware loading */ - ret |= pvr2_write_register(hdw, 0x0048, 0xffffffff); /*interrupt mask*/ - ret |= pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000088); /*gpio dir*/ - ret |= pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000008); /*gpio output state*/ - ret |= pvr2_hdw_cmd_deep_reset(hdw); - ret |= pvr2_write_register(hdw, 0xa064, 0x00000000); /*APU command*/ - ret |= pvr2_hdw_gpio_chg_dir(hdw,0xffffffff,0x00000408); /*gpio dir*/ - ret |= pvr2_hdw_gpio_chg_out(hdw,0xffffffff,0x00000008); /*gpio output state*/ - ret |= pvr2_write_register(hdw, 0x9058, 0xffffffed); /*VPU ctrl*/ - ret |= pvr2_write_register(hdw, 0x9054, 0xfffffffd); /*reset hw blocks*/ - ret |= pvr2_write_register(hdw, 0x07f8, 0x80000800); /*encoder SDRAM refresh*/ - ret |= pvr2_write_register(hdw, 0x07fc, 0x0000001a); /*encoder SDRAM pre-charge*/ - ret |= pvr2_write_register(hdw, 0x0700, 0x00000000); /*I2C clock*/ - ret |= pvr2_write_register(hdw, 0xaa00, 0x00000000); /*unknown*/ - ret |= pvr2_write_register(hdw, 0xaa04, 0x00057810); /*unknown*/ - ret |= pvr2_write_register(hdw, 0xaa10, 0x00148500); /*unknown*/ - ret |= pvr2_write_register(hdw, 0xaa18, 0x00840000); /*unknown*/ - ret |= pvr2_write_u8(hdw, 0x52, 0); - ret |= pvr2_write_u16(hdw, 0x0600, 0); - - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "firmware2 upload prep failed, ret=%d",ret); - release_firmware(fw_entry); - return ret; - } - - /* Now send firmware */ - - fw_len = fw_entry->size; - - if (fw_len % FIRMWARE_CHUNK_SIZE) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "size of %s firmware" - " must be a multiple of 8192B", - fw_files[fwidx]); - release_firmware(fw_entry); - return -1; - } - - fw_ptr = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL); - if (fw_ptr == NULL){ - release_firmware(fw_entry); - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "failed to allocate memory for firmware2 upload"); - return -ENOMEM; - } - - pipe = usb_sndbulkpipe(hdw->usb_dev, PVR2_FIRMWARE_ENDPOINT); - - for (fw_done = 0 ; (fw_done < fw_len) && !ret ; - fw_done += FIRMWARE_CHUNK_SIZE ) { - int i; - memcpy(fw_ptr, fw_entry->data + fw_done, FIRMWARE_CHUNK_SIZE); - /* Usbsnoop log shows that we must swap bytes... */ - for (i = 0; i < FIRMWARE_CHUNK_SIZE/4 ; i++) - ((u32 *)fw_ptr)[i] = ___swab32(((u32 *)fw_ptr)[i]); - - ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr, - FIRMWARE_CHUNK_SIZE, - &actual_length, HZ); - ret |= (actual_length != FIRMWARE_CHUNK_SIZE); - } - - trace_firmware("upload of %s : %i / %i ", - fw_files[fwidx],fw_done,fw_len); - - kfree(fw_ptr); - release_firmware(fw_entry); - - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "firmware2 upload transfer failure"); - return ret; - } - - /* Finish upload */ - - ret |= pvr2_write_register(hdw, 0x9054, 0xffffffff); /*reset hw blocks*/ - ret |= pvr2_write_register(hdw, 0x9058, 0xffffffe8); /*VPU ctrl*/ - ret |= pvr2_write_u16(hdw, 0x0600, 0); - - if (ret) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "firmware2 upload post-proc failure"); - } else { - hdw->subsys_enabled_mask |= (1<flag_ok) return; - - msk &= PVR2_SUBSYS_ALL; - nmsk = (hdw->subsys_enabled_mask & ~msk) | (val & msk); - nmsk &= PVR2_SUBSYS_ALL; - - for (;;) { - tryCount++; - if (!((nmsk ^ hdw->subsys_enabled_mask) & - PVR2_SUBSYS_ALL)) break; - if (tryCount > 4) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Too many retries when configuring device;" - " giving up"); - pvr2_hdw_render_useless(hdw); - break; - } - if (tryCount > 1) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Retrying device reconfiguration"); - } - pvr2_trace(PVR2_TRACE_INIT, - "subsys mask changing 0x%lx:0x%lx" - " from 0x%lx to 0x%lx", - msk,val,hdw->subsys_enabled_mask,nmsk); - - vmsk = (nmsk ^ hdw->subsys_enabled_mask) & - hdw->subsys_enabled_mask; - if (vmsk) { - if (vmsk & (1<subsys_enabled_mask &= - ~FIRMWARE_RECOVERY_BITS; - continue; - } - } - if (vmsk & (1<decoder_ctrl) { - hdw->decoder_ctrl->enable( - hdw->decoder_ctrl->ctxt,0); - } else { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "WARNING:" - " No decoder present"); - } - hdw->subsys_enabled_mask &= - ~(1<subsys_enabled_mask &= - ~(vmsk & PVR2_SUBSYS_CFG_ALL); - } - } - vmsk = (nmsk ^ hdw->subsys_enabled_mask) & nmsk; - if (vmsk) { - if (vmsk & (1<subsys_enabled_mask &= - ~FIRMWARE_RECOVERY_BITS; - continue; - } - } - if (vmsk & (1<decoder_ctrl) { - hdw->decoder_ctrl->enable( - hdw->decoder_ctrl->ctxt,!0); - } else { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "WARNING:" - " No decoder present"); - } - hdw->subsys_enabled_mask |= - (1<subsys_enabled_mask &= - ~FIRMWARE_RECOVERY_BITS; - continue; - } - } - } - } -} - - -void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, - unsigned long msk,unsigned long val) -{ - LOCK_TAKE(hdw->big_lock); do { - pvr2_hdw_subsys_bit_chg_no_lock(hdw,msk,val); - } while (0); LOCK_GIVE(hdw->big_lock); -} - - -unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *hdw) -{ - return hdw->subsys_enabled_mask; -} - - -unsigned long pvr2_hdw_subsys_stream_get(struct pvr2_hdw *hdw) -{ - return hdw->subsys_stream_mask; -} - - -static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, - unsigned long msk, - unsigned long val) -{ - unsigned long val2; - msk &= PVR2_SUBSYS_ALL; - val2 = ((hdw->subsys_stream_mask & ~msk) | (val & msk)); - pvr2_trace(PVR2_TRACE_INIT, - "stream mask changing 0x%lx:0x%lx from 0x%lx to 0x%lx", - msk,val,hdw->subsys_stream_mask,val2); - hdw->subsys_stream_mask = val2; -} - - -void pvr2_hdw_subsys_stream_bit_chg(struct pvr2_hdw *hdw, - unsigned long msk, - unsigned long val) -{ - LOCK_TAKE(hdw->big_lock); do { - pvr2_hdw_subsys_stream_bit_chg_no_lock(hdw,msk,val); - } while (0); LOCK_GIVE(hdw->big_lock); -} - - -static int pvr2_hdw_set_streaming_no_lock(struct pvr2_hdw *hdw,int enableFl) -{ - if ((!enableFl) == !(hdw->flag_streaming_enabled)) return 0; - if (enableFl) { - pvr2_trace(PVR2_TRACE_START_STOP, - "/*--TRACE_STREAM--*/ enable"); - pvr2_hdw_subsys_bit_chg_no_lock(hdw,~0,~0); - } else { - pvr2_trace(PVR2_TRACE_START_STOP, - "/*--TRACE_STREAM--*/ disable"); - pvr2_hdw_subsys_bit_chg_no_lock(hdw,hdw->subsys_stream_mask,0); - } - if (!hdw->flag_ok) return -EIO; - hdw->flag_streaming_enabled = enableFl != 0; - return 0; -} - - -int pvr2_hdw_get_streaming(struct pvr2_hdw *hdw) -{ - return hdw->flag_streaming_enabled != 0; -} - - -int pvr2_hdw_set_streaming(struct pvr2_hdw *hdw,int enable_flag) -{ - int ret; - LOCK_TAKE(hdw->big_lock); do { - ret = pvr2_hdw_set_streaming_no_lock(hdw,enable_flag); - } while (0); LOCK_GIVE(hdw->big_lock); - return ret; -} - - -static int pvr2_hdw_set_stream_type_no_lock(struct pvr2_hdw *hdw, - enum pvr2_config config) -{ - unsigned long sm = hdw->subsys_enabled_mask; - if (!hdw->flag_ok) return -EIO; - pvr2_hdw_subsys_bit_chg_no_lock(hdw,hdw->subsys_stream_mask,0); - hdw->config = config; - pvr2_hdw_subsys_bit_chg_no_lock(hdw,~0,sm); - return 0; -} - - -int pvr2_hdw_set_stream_type(struct pvr2_hdw *hdw,enum pvr2_config config) -{ - int ret; - if (!hdw->flag_ok) return -EIO; - LOCK_TAKE(hdw->big_lock); - ret = pvr2_hdw_set_stream_type_no_lock(hdw,config); - LOCK_GIVE(hdw->big_lock); - return ret; -} - - -static int get_default_tuner_type(struct pvr2_hdw *hdw) -{ - int unit_number = hdw->unit_number; - int tp = -1; - if ((unit_number >= 0) && (unit_number < PVR_NUM)) { - tp = tuner[unit_number]; - } - if (tp < 0) return -EINVAL; - hdw->tuner_type = tp; - return 0; -} - - -static v4l2_std_id get_default_standard(struct pvr2_hdw *hdw) -{ - int unit_number = hdw->unit_number; - int tp = 0; - if ((unit_number >= 0) && (unit_number < PVR_NUM)) { - tp = video_std[unit_number]; - } - return tp; -} - - -static unsigned int get_default_error_tolerance(struct pvr2_hdw *hdw) -{ - int unit_number = hdw->unit_number; - int tp = 0; - if ((unit_number >= 0) && (unit_number < PVR_NUM)) { - tp = tolerance[unit_number]; - } - return tp; -} - - -static int pvr2_hdw_check_firmware(struct pvr2_hdw *hdw) -{ - /* Try a harmless request to fetch the eeprom's address over - endpoint 1. See what happens. Only the full FX2 image can - respond to this. If this probe fails then likely the FX2 - firmware needs be loaded. */ - int result; - LOCK_TAKE(hdw->ctl_lock); do { - hdw->cmd_buffer[0] = 0xeb; - result = pvr2_send_request_ex(hdw,HZ*1,!0, - hdw->cmd_buffer,1, - hdw->cmd_buffer,1); - if (result < 0) break; - } while(0); LOCK_GIVE(hdw->ctl_lock); - if (result) { - pvr2_trace(PVR2_TRACE_INIT, - "Probe of device endpoint 1 result status %d", - result); - } else { - pvr2_trace(PVR2_TRACE_INIT, - "Probe of device endpoint 1 succeeded"); - } - return result == 0; -} - -static void pvr2_hdw_setup_std(struct pvr2_hdw *hdw) -{ - char buf[40]; - unsigned int bcnt; - v4l2_std_id std1,std2; - - std1 = get_default_standard(hdw); - - bcnt = pvr2_std_id_to_str(buf,sizeof(buf),hdw->std_mask_eeprom); - pvr2_trace(PVR2_TRACE_INIT, - "Supported video standard(s) reported by eeprom: %.*s", - bcnt,buf); - - hdw->std_mask_avail = hdw->std_mask_eeprom; - - std2 = std1 & ~hdw->std_mask_avail; - if (std2) { - bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std2); - pvr2_trace(PVR2_TRACE_INIT, - "Expanding supported video standards" - " to include: %.*s", - bcnt,buf); - hdw->std_mask_avail |= std2; - } - - pvr2_hdw_internal_set_std_avail(hdw); - - if (std1) { - bcnt = pvr2_std_id_to_str(buf,sizeof(buf),std1); - pvr2_trace(PVR2_TRACE_INIT, - "Initial video standard forced to %.*s", - bcnt,buf); - hdw->std_mask_cur = std1; - hdw->std_dirty = !0; - pvr2_hdw_internal_find_stdenum(hdw); - return; - } - - if (hdw->std_enum_cnt > 1) { - // Autoselect the first listed standard - hdw->std_enum_cur = 1; - hdw->std_mask_cur = hdw->std_defs[hdw->std_enum_cur-1].id; - hdw->std_dirty = !0; - pvr2_trace(PVR2_TRACE_INIT, - "Initial video standard auto-selected to %s", - hdw->std_defs[hdw->std_enum_cur-1].name); - return; - } - - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Unable to select a viable initial video standard"); -} - - -static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) -{ - int ret; - unsigned int idx; - struct pvr2_ctrl *cptr; - int reloadFl = 0; - if (!reloadFl) { - reloadFl = (hdw->usb_intf->cur_altsetting->desc.bNumEndpoints - == 0); - if (reloadFl) { - pvr2_trace(PVR2_TRACE_INIT, - "USB endpoint config looks strange" - "; possibly firmware needs to be loaded"); - } - } - if (!reloadFl) { - reloadFl = !pvr2_hdw_check_firmware(hdw); - if (reloadFl) { - pvr2_trace(PVR2_TRACE_INIT, - "Check for FX2 firmware failed" - "; possibly firmware needs to be loaded"); - } - } - if (reloadFl) { - if (pvr2_upload_firmware1(hdw) != 0) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failure uploading firmware1"); - } - return; - } - hdw->fw1_state = FW1_STATE_OK; - - if (initusbreset) { - pvr2_hdw_device_reset(hdw); - } - if (!pvr2_hdw_dev_ok(hdw)) return; - - for (idx = 0; idx < pvr2_client_lists[hdw->hdw_type].cnt; idx++) { - request_module(pvr2_client_lists[hdw->hdw_type].lst[idx]); - } - - pvr2_hdw_cmd_powerup(hdw); - if (!pvr2_hdw_dev_ok(hdw)) return; - - if (pvr2_upload_firmware2(hdw)){ - pvr2_trace(PVR2_TRACE_ERROR_LEGS,"device unstable!!"); - pvr2_hdw_render_useless(hdw); - return; - } - - // This step MUST happen after the earlier powerup step. - pvr2_i2c_core_init(hdw); - if (!pvr2_hdw_dev_ok(hdw)) return; - - for (idx = 0; idx < CTRLDEF_COUNT; idx++) { - cptr = hdw->controls + idx; - if (cptr->info->skip_init) continue; - if (!cptr->info->set_value) continue; - cptr->info->set_value(cptr,~0,cptr->info->default_value); - } - - // Do not use pvr2_reset_ctl_endpoints() here. It is not - // thread-safe against the normal pvr2_send_request() mechanism. - // (We should make it thread safe). - - ret = pvr2_hdw_get_eeprom_addr(hdw); - if (!pvr2_hdw_dev_ok(hdw)) return; - if (ret < 0) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Unable to determine location of eeprom, skipping"); - } else { - hdw->eeprom_addr = ret; - pvr2_eeprom_analyze(hdw); - if (!pvr2_hdw_dev_ok(hdw)) return; - } - - pvr2_hdw_setup_std(hdw); - - if (!get_default_tuner_type(hdw)) { - pvr2_trace(PVR2_TRACE_INIT, - "pvr2_hdw_setup: Tuner type overridden to %d", - hdw->tuner_type); - } - - hdw->tuner_updated = !0; - pvr2_i2c_core_check_stale(hdw); - hdw->tuner_updated = 0; - - if (!pvr2_hdw_dev_ok(hdw)) return; - - pvr2_hdw_commit_ctl_internal(hdw); - if (!pvr2_hdw_dev_ok(hdw)) return; - - hdw->vid_stream = pvr2_stream_create(); - if (!pvr2_hdw_dev_ok(hdw)) return; - pvr2_trace(PVR2_TRACE_INIT, - "pvr2_hdw_setup: video stream is %p",hdw->vid_stream); - if (hdw->vid_stream) { - idx = get_default_error_tolerance(hdw); - if (idx) { - pvr2_trace(PVR2_TRACE_INIT, - "pvr2_hdw_setup: video stream %p" - " setting tolerance %u", - hdw->vid_stream,idx); - } - pvr2_stream_setup(hdw->vid_stream,hdw->usb_dev, - PVR2_VID_ENDPOINT,idx); - } - - if (!pvr2_hdw_dev_ok(hdw)) return; - - /* Make sure everything is up to date */ - pvr2_i2c_core_sync(hdw); - - if (!pvr2_hdw_dev_ok(hdw)) return; - - hdw->flag_init_ok = !0; -} - - -int pvr2_hdw_setup(struct pvr2_hdw *hdw) -{ - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_setup(hdw=%p) begin",hdw); - LOCK_TAKE(hdw->big_lock); do { - pvr2_hdw_setup_low(hdw); - pvr2_trace(PVR2_TRACE_INIT, - "pvr2_hdw_setup(hdw=%p) done, ok=%d init_ok=%d", - hdw,hdw->flag_ok,hdw->flag_init_ok); - if (pvr2_hdw_dev_ok(hdw)) { - if (pvr2_hdw_init_ok(hdw)) { - pvr2_trace( - PVR2_TRACE_INFO, - "Device initialization" - " completed successfully."); - break; - } - if (hdw->fw1_state == FW1_STATE_RELOAD) { - pvr2_trace( - PVR2_TRACE_INFO, - "Device microcontroller firmware" - " (re)loaded; it should now reset" - " and reconnect."); - break; - } - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Device initialization was not successful."); - if (hdw->fw1_state == FW1_STATE_MISSING) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Giving up since device" - " microcontroller firmware" - " appears to be missing."); - break; - } - } - if (procreload) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Attempting pvrusb2 recovery by reloading" - " primary firmware."); - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "If this works, device should disconnect" - " and reconnect in a sane state."); - hdw->fw1_state = FW1_STATE_UNKNOWN; - pvr2_upload_firmware1(hdw); - } else { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "***WARNING*** pvrusb2 device hardware" - " appears to be jammed" - " and I can't clear it."); - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "You might need to power cycle" - " the pvrusb2 device" - " in order to recover."); - } - } while (0); LOCK_GIVE(hdw->big_lock); - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_setup(hdw=%p) end",hdw); - return hdw->flag_init_ok; -} - - -/* Create and return a structure for interacting with the underlying - hardware */ -struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, - const struct usb_device_id *devid) -{ - unsigned int idx,cnt1,cnt2; - struct pvr2_hdw *hdw; - unsigned int hdw_type; - int valid_std_mask; - struct pvr2_ctrl *cptr; - __u8 ifnum; - struct v4l2_queryctrl qctrl; - struct pvr2_ctl_info *ciptr; - - hdw_type = devid - pvr2_device_table; - if (hdw_type >= - sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Bogus device type of %u reported",hdw_type); - return NULL; - } - - hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_create: hdw=%p, type \"%s\"", - hdw,pvr2_device_names[hdw_type]); - if (!hdw) goto fail; - memset(hdw,0,sizeof(*hdw)); - cx2341x_fill_defaults(&hdw->enc_ctl_state); - - hdw->control_cnt = CTRLDEF_COUNT; - hdw->control_cnt += MPEGDEF_COUNT; - hdw->controls = kmalloc(sizeof(struct pvr2_ctrl) * hdw->control_cnt, - GFP_KERNEL); - if (!hdw->controls) goto fail; - memset(hdw->controls,0,sizeof(struct pvr2_ctrl) * hdw->control_cnt); - hdw->hdw_type = hdw_type; - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - cptr->hdw = hdw; - } - for (idx = 0; idx < 32; idx++) { - hdw->std_mask_ptrs[idx] = hdw->std_mask_names[idx]; - } - for (idx = 0; idx < CTRLDEF_COUNT; idx++) { - cptr = hdw->controls + idx; - cptr->info = control_defs+idx; - } - /* Define and configure additional controls from cx2341x module. */ - hdw->mpeg_ctrl_info = kmalloc( - sizeof(*(hdw->mpeg_ctrl_info)) * MPEGDEF_COUNT, GFP_KERNEL); - if (!hdw->mpeg_ctrl_info) goto fail; - memset(hdw->mpeg_ctrl_info,0, - sizeof(*(hdw->mpeg_ctrl_info)) * MPEGDEF_COUNT); - for (idx = 0; idx < MPEGDEF_COUNT; idx++) { - cptr = hdw->controls + idx + CTRLDEF_COUNT; - ciptr = &(hdw->mpeg_ctrl_info[idx].info); - ciptr->desc = hdw->mpeg_ctrl_info[idx].desc; - ciptr->name = mpeg_ids[idx].strid; - ciptr->v4l_id = mpeg_ids[idx].id; - ciptr->skip_init = !0; - ciptr->get_value = ctrl_cx2341x_get; - ciptr->get_v4lflags = ctrl_cx2341x_getv4lflags; - ciptr->is_dirty = ctrl_cx2341x_is_dirty; - if (!idx) ciptr->clear_dirty = ctrl_cx2341x_clear_dirty; - qctrl.id = ciptr->v4l_id; - cx2341x_ctrl_query(&hdw->enc_ctl_state,&qctrl); - if (!(qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY)) { - ciptr->set_value = ctrl_cx2341x_set; - } - strncpy(hdw->mpeg_ctrl_info[idx].desc,qctrl.name, - PVR2_CTLD_INFO_DESC_SIZE); - hdw->mpeg_ctrl_info[idx].desc[PVR2_CTLD_INFO_DESC_SIZE-1] = 0; - ciptr->default_value = qctrl.default_value; - switch (qctrl.type) { - default: - case V4L2_CTRL_TYPE_INTEGER: - ciptr->type = pvr2_ctl_int; - ciptr->def.type_int.min_value = qctrl.minimum; - ciptr->def.type_int.max_value = qctrl.maximum; - break; - case V4L2_CTRL_TYPE_BOOLEAN: - ciptr->type = pvr2_ctl_bool; - break; - case V4L2_CTRL_TYPE_MENU: - ciptr->type = pvr2_ctl_enum; - ciptr->def.type_enum.value_names = - cx2341x_ctrl_get_menu(ciptr->v4l_id); - for (cnt1 = 0; - ciptr->def.type_enum.value_names[cnt1] != NULL; - cnt1++) { } - ciptr->def.type_enum.count = cnt1; - break; - } - cptr->info = ciptr; - } - - // Initialize video standard enum dynamic control - cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDENUM); - if (cptr) { - memcpy(&hdw->std_info_enum,cptr->info, - sizeof(hdw->std_info_enum)); - cptr->info = &hdw->std_info_enum; - - } - // Initialize control data regarding video standard masks - valid_std_mask = pvr2_std_get_usable(); - for (idx = 0; idx < 32; idx++) { - if (!(valid_std_mask & (1 << idx))) continue; - cnt1 = pvr2_std_id_to_str( - hdw->std_mask_names[idx], - sizeof(hdw->std_mask_names[idx])-1, - 1 << idx); - hdw->std_mask_names[idx][cnt1] = 0; - } - cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDAVAIL); - if (cptr) { - memcpy(&hdw->std_info_avail,cptr->info, - sizeof(hdw->std_info_avail)); - cptr->info = &hdw->std_info_avail; - hdw->std_info_avail.def.type_bitmask.bit_names = - hdw->std_mask_ptrs; - hdw->std_info_avail.def.type_bitmask.valid_bits = - valid_std_mask; - } - cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDCUR); - if (cptr) { - memcpy(&hdw->std_info_cur,cptr->info, - sizeof(hdw->std_info_cur)); - cptr->info = &hdw->std_info_cur; - hdw->std_info_cur.def.type_bitmask.bit_names = - hdw->std_mask_ptrs; - hdw->std_info_avail.def.type_bitmask.valid_bits = - valid_std_mask; - } - - hdw->eeprom_addr = -1; - hdw->unit_number = -1; - hdw->v4l_minor_number = -1; - hdw->ctl_write_buffer = kmalloc(PVR2_CTL_BUFFSIZE,GFP_KERNEL); - if (!hdw->ctl_write_buffer) goto fail; - hdw->ctl_read_buffer = kmalloc(PVR2_CTL_BUFFSIZE,GFP_KERNEL); - if (!hdw->ctl_read_buffer) goto fail; - hdw->ctl_write_urb = usb_alloc_urb(0,GFP_KERNEL); - if (!hdw->ctl_write_urb) goto fail; - hdw->ctl_read_urb = usb_alloc_urb(0,GFP_KERNEL); - if (!hdw->ctl_read_urb) goto fail; - - down(&pvr2_unit_sem); do { - for (idx = 0; idx < PVR_NUM; idx++) { - if (unit_pointers[idx]) continue; - hdw->unit_number = idx; - unit_pointers[idx] = hdw; - break; - } - } while (0); up(&pvr2_unit_sem); - - cnt1 = 0; - cnt2 = scnprintf(hdw->name+cnt1,sizeof(hdw->name)-cnt1,"pvrusb2"); - cnt1 += cnt2; - if (hdw->unit_number >= 0) { - cnt2 = scnprintf(hdw->name+cnt1,sizeof(hdw->name)-cnt1,"_%c", - ('a' + hdw->unit_number)); - cnt1 += cnt2; - } - if (cnt1 >= sizeof(hdw->name)) cnt1 = sizeof(hdw->name)-1; - hdw->name[cnt1] = 0; - - pvr2_trace(PVR2_TRACE_INIT,"Driver unit number is %d, name is %s", - hdw->unit_number,hdw->name); - - hdw->tuner_type = -1; - hdw->flag_ok = !0; - /* Initialize the mask of subsystems that we will shut down when we - stop streaming. */ - hdw->subsys_stream_mask = PVR2_SUBSYS_RUN_ALL; - hdw->subsys_stream_mask |= (1<subsys_stream_mask); - - hdw->usb_intf = intf; - hdw->usb_dev = interface_to_usbdev(intf); - - ifnum = hdw->usb_intf->cur_altsetting->desc.bInterfaceNumber; - usb_set_interface(hdw->usb_dev,ifnum,0); - - mutex_init(&hdw->ctl_lock_mutex); - mutex_init(&hdw->big_lock_mutex); - - return hdw; - fail: - if (hdw) { - if (hdw->ctl_read_urb) usb_free_urb(hdw->ctl_read_urb); - if (hdw->ctl_write_urb) usb_free_urb(hdw->ctl_write_urb); - if (hdw->ctl_read_buffer) kfree(hdw->ctl_read_buffer); - if (hdw->ctl_write_buffer) kfree(hdw->ctl_write_buffer); - if (hdw->controls) kfree(hdw->controls); - if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); - kfree(hdw); - } - return NULL; -} - - -/* Remove _all_ associations between this driver and the underlying USB - layer. */ -static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) -{ - if (hdw->flag_disconnected) return; - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_remove_usb_stuff: hdw=%p",hdw); - if (hdw->ctl_read_urb) { - usb_kill_urb(hdw->ctl_read_urb); - usb_free_urb(hdw->ctl_read_urb); - hdw->ctl_read_urb = NULL; - } - if (hdw->ctl_write_urb) { - usb_kill_urb(hdw->ctl_write_urb); - usb_free_urb(hdw->ctl_write_urb); - hdw->ctl_write_urb = NULL; - } - if (hdw->ctl_read_buffer) { - kfree(hdw->ctl_read_buffer); - hdw->ctl_read_buffer = NULL; - } - if (hdw->ctl_write_buffer) { - kfree(hdw->ctl_write_buffer); - hdw->ctl_write_buffer = NULL; - } - pvr2_hdw_render_useless_unlocked(hdw); - hdw->flag_disconnected = !0; - hdw->usb_dev = NULL; - hdw->usb_intf = NULL; -} - - -/* Destroy hardware interaction structure */ -void pvr2_hdw_destroy(struct pvr2_hdw *hdw) -{ - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); - if (hdw->fw_buffer) { - kfree(hdw->fw_buffer); - hdw->fw_buffer = NULL; - } - if (hdw->vid_stream) { - pvr2_stream_destroy(hdw->vid_stream); - hdw->vid_stream = NULL; - } - if (hdw->audio_stat) { - hdw->audio_stat->detach(hdw->audio_stat->ctxt); - } - if (hdw->decoder_ctrl) { - hdw->decoder_ctrl->detach(hdw->decoder_ctrl->ctxt); - } - pvr2_i2c_core_done(hdw); - pvr2_hdw_remove_usb_stuff(hdw); - down(&pvr2_unit_sem); do { - if ((hdw->unit_number >= 0) && - (hdw->unit_number < PVR_NUM) && - (unit_pointers[hdw->unit_number] == hdw)) { - unit_pointers[hdw->unit_number] = NULL; - } - } while (0); up(&pvr2_unit_sem); - if (hdw->controls) kfree(hdw->controls); - if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); - if (hdw->std_defs) kfree(hdw->std_defs); - if (hdw->std_enum_names) kfree(hdw->std_enum_names); - kfree(hdw); -} - - -int pvr2_hdw_init_ok(struct pvr2_hdw *hdw) -{ - return hdw->flag_init_ok; -} - - -int pvr2_hdw_dev_ok(struct pvr2_hdw *hdw) -{ - return (hdw && hdw->flag_ok); -} - - -/* Called when hardware has been unplugged */ -void pvr2_hdw_disconnect(struct pvr2_hdw *hdw) -{ - pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_disconnect(hdw=%p)",hdw); - LOCK_TAKE(hdw->big_lock); - LOCK_TAKE(hdw->ctl_lock); - pvr2_hdw_remove_usb_stuff(hdw); - LOCK_GIVE(hdw->ctl_lock); - LOCK_GIVE(hdw->big_lock); -} - - -// Attempt to autoselect an appropriate value for std_enum_cur given -// whatever is currently in std_mask_cur -static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw) -{ - unsigned int idx; - for (idx = 1; idx < hdw->std_enum_cnt; idx++) { - if (hdw->std_defs[idx-1].id == hdw->std_mask_cur) { - hdw->std_enum_cur = idx; - return; - } - } - hdw->std_enum_cur = 0; -} - - -// Calculate correct set of enumerated standards based on currently known -// set of available standards bits. -static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) -{ - struct v4l2_standard *newstd; - unsigned int std_cnt; - unsigned int idx; - - newstd = pvr2_std_create_enum(&std_cnt,hdw->std_mask_avail); - - if (hdw->std_defs) { - kfree(hdw->std_defs); - hdw->std_defs = NULL; - } - hdw->std_enum_cnt = 0; - if (hdw->std_enum_names) { - kfree(hdw->std_enum_names); - hdw->std_enum_names = NULL; - } - - if (!std_cnt) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "WARNING: Failed to identify any viable standards"); - } - hdw->std_enum_names = kmalloc(sizeof(char *)*(std_cnt+1),GFP_KERNEL); - hdw->std_enum_names[0] = "none"; - for (idx = 0; idx < std_cnt; idx++) { - hdw->std_enum_names[idx+1] = - newstd[idx].name; - } - // Set up the dynamic control for this standard - hdw->std_info_enum.def.type_enum.value_names = hdw->std_enum_names; - hdw->std_info_enum.def.type_enum.count = std_cnt+1; - hdw->std_defs = newstd; - hdw->std_enum_cnt = std_cnt+1; - hdw->std_enum_cur = 0; - hdw->std_info_cur.def.type_bitmask.valid_bits = hdw->std_mask_avail; -} - - -int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw, - struct v4l2_standard *std, - unsigned int idx) -{ - int ret = -EINVAL; - if (!idx) return ret; - LOCK_TAKE(hdw->big_lock); do { - if (idx >= hdw->std_enum_cnt) break; - idx--; - memcpy(std,hdw->std_defs+idx,sizeof(*std)); - ret = 0; - } while (0); LOCK_GIVE(hdw->big_lock); - return ret; -} - - -/* Get the number of defined controls */ -unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *hdw) -{ - return hdw->control_cnt; -} - - -/* Retrieve a control handle given its index (0..count-1) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, - unsigned int idx) -{ - if (idx >= hdw->control_cnt) return NULL; - return hdw->controls + idx; -} - - -/* Retrieve a control handle given its index (0..count-1) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *hdw, - unsigned int ctl_id) -{ - struct pvr2_ctrl *cptr; - unsigned int idx; - int i; - - /* This could be made a lot more efficient, but for now... */ - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - i = cptr->info->internal_id; - if (i && (i == ctl_id)) return cptr; - } - return NULL; -} - - -/* Given a V4L ID, retrieve the control structure associated with it. */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *hdw,unsigned int ctl_id) -{ - struct pvr2_ctrl *cptr; - unsigned int idx; - int i; - - /* This could be made a lot more efficient, but for now... */ - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - i = cptr->info->v4l_id; - if (i && (i == ctl_id)) return cptr; - } - return NULL; -} - - -/* Given a V4L ID for its immediate predecessor, retrieve the control - structure associated with it. */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw, - unsigned int ctl_id) -{ - struct pvr2_ctrl *cptr,*cp2; - unsigned int idx; - int i; - - /* This could be made a lot more efficient, but for now... */ - cp2 = NULL; - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - i = cptr->info->v4l_id; - if (!i) continue; - if (i <= ctl_id) continue; - if (cp2 && (cp2->info->v4l_id < i)) continue; - cp2 = cptr; - } - return cp2; - return NULL; -} - - -static const char *get_ctrl_typename(enum pvr2_ctl_type tp) -{ - switch (tp) { - case pvr2_ctl_int: return "integer"; - case pvr2_ctl_enum: return "enum"; - case pvr2_ctl_bool: return "boolean"; - case pvr2_ctl_bitmask: return "bitmask"; - } - return ""; -} - - -/* Commit all control changes made up to this point. Subsystems can be - indirectly affected by these changes. For a given set of things being - committed, we'll clear the affected subsystem bits and then once we're - done committing everything we'll make a request to restore the subsystem - state(s) back to their previous value before this function was called. - Thus we can automatically reconfigure affected pieces of the driver as - controls are changed. */ -static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw) -{ - unsigned long saved_subsys_mask = hdw->subsys_enabled_mask; - unsigned long stale_subsys_mask = 0; - unsigned int idx; - struct pvr2_ctrl *cptr; - int value; - int commit_flag = 0; - char buf[100]; - unsigned int bcnt,ccnt; - - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - if (cptr->info->is_dirty == 0) continue; - if (!cptr->info->is_dirty(cptr)) continue; - if (!commit_flag) { - commit_flag = !0; - } - - bcnt = scnprintf(buf,sizeof(buf),"\"%s\" <-- ", - cptr->info->name); - value = 0; - cptr->info->get_value(cptr,&value); - pvr2_ctrl_value_to_sym_internal(cptr,~0,value, - buf+bcnt, - sizeof(buf)-bcnt,&ccnt); - bcnt += ccnt; - bcnt += scnprintf(buf+bcnt,sizeof(buf)-bcnt," <%s>", - get_ctrl_typename(cptr->info->type)); - pvr2_trace(PVR2_TRACE_CTL, - "/*--TRACE_COMMIT--*/ %.*s", - bcnt,buf); - } - - if (!commit_flag) { - /* Nothing has changed */ - return 0; - } - - /* When video standard changes, reset the hres and vres values - - but if the user has pending changes there, then let the changes - take priority. */ - if (hdw->std_dirty) { - /* Rewrite the vertical resolution to be appropriate to the - video standard that has been selected. */ - int nvres; - if (hdw->std_mask_cur & V4L2_STD_525_60) { - nvres = 480; - } else { - nvres = 576; - } - if (nvres != hdw->res_ver_val) { - hdw->res_ver_val = nvres; - hdw->res_ver_dirty = !0; - } - } - - if (hdw->std_dirty || - 0) { - /* If any of this changes, then the encoder needs to be - reconfigured, and we need to reset the stream. */ - stale_subsys_mask |= (1<subsys_stream_mask; - } - - if (hdw->srate_dirty) { - /* Write new sample rate into control structure since - * the master copy is stale. We must track srate - * separate from the mpeg control structure because - * other logic also uses this value. */ - struct v4l2_ext_controls cs; - struct v4l2_ext_control c1; - memset(&cs,0,sizeof(cs)); - memset(&c1,0,sizeof(c1)); - cs.controls = &c1; - cs.count = 1; - c1.id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ; - c1.value = hdw->srate_val; - cx2341x_ext_ctrls(&hdw->enc_ctl_state,&cs,VIDIOC_S_EXT_CTRLS); - } - - /* Scan i2c core at this point - before we clear all the dirty - bits. Various parts of the i2c core will notice dirty bits as - appropriate and arrange to broadcast or directly send updates to - the client drivers in order to keep everything in sync */ - pvr2_i2c_core_check_stale(hdw); - - for (idx = 0; idx < hdw->control_cnt; idx++) { - cptr = hdw->controls + idx; - if (!cptr->info->clear_dirty) continue; - cptr->info->clear_dirty(cptr); - } - - /* Now execute i2c core update */ - pvr2_i2c_core_sync(hdw); - - pvr2_hdw_subsys_bit_chg_no_lock(hdw,stale_subsys_mask,0); - pvr2_hdw_subsys_bit_chg_no_lock(hdw,~0,saved_subsys_mask); - - return 0; -} - - -int pvr2_hdw_commit_ctl(struct pvr2_hdw *hdw) -{ - LOCK_TAKE(hdw->big_lock); do { - pvr2_hdw_commit_ctl_internal(hdw); - } while (0); LOCK_GIVE(hdw->big_lock); - return 0; -} - - -void pvr2_hdw_poll(struct pvr2_hdw *hdw) -{ - LOCK_TAKE(hdw->big_lock); do { - pvr2_i2c_core_sync(hdw); - } while (0); LOCK_GIVE(hdw->big_lock); -} - - -void pvr2_hdw_setup_poll_trigger(struct pvr2_hdw *hdw, - void (*func)(void *), - void *data) -{ - LOCK_TAKE(hdw->big_lock); do { - hdw->poll_trigger_func = func; - hdw->poll_trigger_data = data; - } while (0); LOCK_GIVE(hdw->big_lock); -} - - -void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw) -{ - if (hdw->poll_trigger_func) { - hdw->poll_trigger_func(hdw->poll_trigger_data); - } -} - -/* Return name for this driver instance */ -const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw) -{ - return hdw->name; -} - - -/* Return bit mask indicating signal status */ -static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw) -{ - unsigned int msk = 0; - switch (hdw->input_val) { - case PVR2_CVAL_INPUT_TV: - case PVR2_CVAL_INPUT_RADIO: - if (hdw->decoder_ctrl && - hdw->decoder_ctrl->tuned(hdw->decoder_ctrl->ctxt)) { - msk |= PVR2_SIGNAL_OK; - if (hdw->audio_stat && - hdw->audio_stat->status(hdw->audio_stat->ctxt)) { - if (hdw->flag_stereo) { - msk |= PVR2_SIGNAL_STEREO; - } - if (hdw->flag_bilingual) { - msk |= PVR2_SIGNAL_SAP; - } - } - } - break; - default: - msk |= PVR2_SIGNAL_OK | PVR2_SIGNAL_STEREO; - } - return msk; -} - - -int pvr2_hdw_is_hsm(struct pvr2_hdw *hdw) -{ - int result; - LOCK_TAKE(hdw->ctl_lock); do { - hdw->cmd_buffer[0] = 0x0b; - result = pvr2_send_request(hdw, - hdw->cmd_buffer,1, - hdw->cmd_buffer,1); - if (result < 0) break; - result = (hdw->cmd_buffer[0] != 0); - } while(0); LOCK_GIVE(hdw->ctl_lock); - return result; -} - - -/* Return bit mask indicating signal status */ -unsigned int pvr2_hdw_get_signal_status(struct pvr2_hdw *hdw) -{ - unsigned int msk = 0; - LOCK_TAKE(hdw->big_lock); do { - msk = pvr2_hdw_get_signal_status_internal(hdw); - } while (0); LOCK_GIVE(hdw->big_lock); - return msk; -} - - -/* Get handle to video output stream */ -struct pvr2_stream *pvr2_hdw_get_video_stream(struct pvr2_hdw *hp) -{ - return hp->vid_stream; -} - - -void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw) -{ - int nr = pvr2_hdw_get_unit_number(hdw); - LOCK_TAKE(hdw->big_lock); do { - hdw->log_requested = !0; - printk(KERN_INFO "pvrusb2: ================= START STATUS CARD #%d =================\n", nr); - pvr2_i2c_core_check_stale(hdw); - hdw->log_requested = 0; - pvr2_i2c_core_sync(hdw); - pvr2_trace(PVR2_TRACE_INFO,"cx2341x config:"); - cx2341x_log_status(&hdw->enc_ctl_state, "pvrusb2"); - printk(KERN_INFO "pvrusb2: ================== END STATUS CARD #%d ==================\n", nr); - } while (0); LOCK_GIVE(hdw->big_lock); -} - -void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, int enable_flag) -{ - int ret; - u16 address; - unsigned int pipe; - LOCK_TAKE(hdw->big_lock); do { - if ((hdw->fw_buffer == 0) == !enable_flag) break; - - if (!enable_flag) { - pvr2_trace(PVR2_TRACE_FIRMWARE, - "Cleaning up after CPU firmware fetch"); - kfree(hdw->fw_buffer); - hdw->fw_buffer = NULL; - hdw->fw_size = 0; - /* Now release the CPU. It will disconnect and - reconnect later. */ - pvr2_hdw_cpureset_assert(hdw,0); - break; - } - - pvr2_trace(PVR2_TRACE_FIRMWARE, - "Preparing to suck out CPU firmware"); - hdw->fw_size = 0x2000; - hdw->fw_buffer = kmalloc(hdw->fw_size,GFP_KERNEL); - if (!hdw->fw_buffer) { - hdw->fw_size = 0; - break; - } - - memset(hdw->fw_buffer,0,hdw->fw_size); - - /* We have to hold the CPU during firmware upload. */ - pvr2_hdw_cpureset_assert(hdw,1); - - /* download the firmware from address 0000-1fff in 2048 - (=0x800) bytes chunk. */ - - pvr2_trace(PVR2_TRACE_FIRMWARE,"Grabbing CPU firmware"); - pipe = usb_rcvctrlpipe(hdw->usb_dev, 0); - for(address = 0; address < hdw->fw_size; address += 0x800) { - ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0xc0, - address,0, - hdw->fw_buffer+address,0x800,HZ); - if (ret < 0) break; - } - - pvr2_trace(PVR2_TRACE_FIRMWARE,"Done grabbing CPU firmware"); - - } while (0); LOCK_GIVE(hdw->big_lock); -} - - -/* Return true if we're in a mode for retrieval CPU firmware */ -int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *hdw) -{ - return hdw->fw_buffer != 0; -} - - -int pvr2_hdw_cpufw_get(struct pvr2_hdw *hdw,unsigned int offs, - char *buf,unsigned int cnt) -{ - int ret = -EINVAL; - LOCK_TAKE(hdw->big_lock); do { - if (!buf) break; - if (!cnt) break; - - if (!hdw->fw_buffer) { - ret = -EIO; - break; - } - - if (offs >= hdw->fw_size) { - pvr2_trace(PVR2_TRACE_FIRMWARE, - "Read firmware data offs=%d EOF", - offs); - ret = 0; - break; - } - - if (offs + cnt > hdw->fw_size) cnt = hdw->fw_size - offs; - - memcpy(buf,hdw->fw_buffer+offs,cnt); - - pvr2_trace(PVR2_TRACE_FIRMWARE, - "Read firmware data offs=%d cnt=%d", - offs,cnt); - ret = cnt; - } while (0); LOCK_GIVE(hdw->big_lock); - - return ret; -} - - -int pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *hdw) -{ - return hdw->v4l_minor_number; -} - - -/* Store the v4l minor device number */ -void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw,int v) -{ - hdw->v4l_minor_number = v; -} - - -static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs) -{ - struct pvr2_hdw *hdw = urb->context; - hdw->ctl_write_pend_flag = 0; - if (hdw->ctl_read_pend_flag) return; - complete(&hdw->ctl_done); -} - - -static void pvr2_ctl_read_complete(struct urb *urb, struct pt_regs *regs) -{ - struct pvr2_hdw *hdw = urb->context; - hdw->ctl_read_pend_flag = 0; - if (hdw->ctl_write_pend_flag) return; - complete(&hdw->ctl_done); -} - - -static void pvr2_ctl_timeout(unsigned long data) -{ - struct pvr2_hdw *hdw = (struct pvr2_hdw *)data; - if (hdw->ctl_write_pend_flag || hdw->ctl_read_pend_flag) { - hdw->ctl_timeout_flag = !0; - if (hdw->ctl_write_pend_flag && hdw->ctl_write_urb) { - usb_unlink_urb(hdw->ctl_write_urb); - } - if (hdw->ctl_read_pend_flag && hdw->ctl_read_urb) { - usb_unlink_urb(hdw->ctl_read_urb); - } - } -} - - -/* Issue a command and get a response from the device. This extended - version includes a probe flag (which if set means that device errors - should not be logged or treated as fatal) and a timeout in jiffies. - This can be used to non-lethally probe the health of endpoint 1. */ -static int pvr2_send_request_ex(struct pvr2_hdw *hdw, - unsigned int timeout,int probe_fl, - void *write_data,unsigned int write_len, - void *read_data,unsigned int read_len) -{ - unsigned int idx; - int status = 0; - struct timer_list timer; - if (!hdw->ctl_lock_held) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Attempted to execute control transfer" - " without lock!!"); - return -EDEADLK; - } - if ((!hdw->flag_ok) && !probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Attempted to execute control transfer" - " when device not ok"); - return -EIO; - } - if (!(hdw->ctl_read_urb && hdw->ctl_write_urb)) { - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Attempted to execute control transfer" - " when USB is disconnected"); - } - return -ENOTTY; - } - - /* Ensure that we have sane parameters */ - if (!write_data) write_len = 0; - if (!read_data) read_len = 0; - if (write_len > PVR2_CTL_BUFFSIZE) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Attempted to execute %d byte" - " control-write transfer (limit=%d)", - write_len,PVR2_CTL_BUFFSIZE); - return -EINVAL; - } - if (read_len > PVR2_CTL_BUFFSIZE) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Attempted to execute %d byte" - " control-read transfer (limit=%d)", - write_len,PVR2_CTL_BUFFSIZE); - return -EINVAL; - } - if ((!write_len) && (!read_len)) { - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "Attempted to execute null control transfer?"); - return -EINVAL; - } - - - hdw->cmd_debug_state = 1; - if (write_len) { - hdw->cmd_debug_code = ((unsigned char *)write_data)[0]; - } else { - hdw->cmd_debug_code = 0; - } - hdw->cmd_debug_write_len = write_len; - hdw->cmd_debug_read_len = read_len; - - /* Initialize common stuff */ - init_completion(&hdw->ctl_done); - hdw->ctl_timeout_flag = 0; - hdw->ctl_write_pend_flag = 0; - hdw->ctl_read_pend_flag = 0; - init_timer(&timer); - timer.expires = jiffies + timeout; - timer.data = (unsigned long)hdw; - timer.function = pvr2_ctl_timeout; - - if (write_len) { - hdw->cmd_debug_state = 2; - /* Transfer write data to internal buffer */ - for (idx = 0; idx < write_len; idx++) { - hdw->ctl_write_buffer[idx] = - ((unsigned char *)write_data)[idx]; - } - /* Initiate a write request */ - usb_fill_bulk_urb(hdw->ctl_write_urb, - hdw->usb_dev, - usb_sndbulkpipe(hdw->usb_dev, - PVR2_CTL_WRITE_ENDPOINT), - hdw->ctl_write_buffer, - write_len, - pvr2_ctl_write_complete, - hdw); - hdw->ctl_write_urb->actual_length = 0; - hdw->ctl_write_pend_flag = !0; - status = usb_submit_urb(hdw->ctl_write_urb,GFP_KERNEL); - if (status < 0) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to submit write-control" - " URB status=%d",status); - hdw->ctl_write_pend_flag = 0; - goto done; - } - } - - if (read_len) { - hdw->cmd_debug_state = 3; - memset(hdw->ctl_read_buffer,0x43,read_len); - /* Initiate a read request */ - usb_fill_bulk_urb(hdw->ctl_read_urb, - hdw->usb_dev, - usb_rcvbulkpipe(hdw->usb_dev, - PVR2_CTL_READ_ENDPOINT), - hdw->ctl_read_buffer, - read_len, - pvr2_ctl_read_complete, - hdw); - hdw->ctl_read_urb->actual_length = 0; - hdw->ctl_read_pend_flag = !0; - status = usb_submit_urb(hdw->ctl_read_urb,GFP_KERNEL); - if (status < 0) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to submit read-control" - " URB status=%d",status); - hdw->ctl_read_pend_flag = 0; - goto done; - } - } - - /* Start timer */ - add_timer(&timer); - - /* Now wait for all I/O to complete */ - hdw->cmd_debug_state = 4; - while (hdw->ctl_write_pend_flag || hdw->ctl_read_pend_flag) { - wait_for_completion(&hdw->ctl_done); - } - hdw->cmd_debug_state = 5; - - /* Stop timer */ - del_timer_sync(&timer); - - hdw->cmd_debug_state = 6; - status = 0; - - if (hdw->ctl_timeout_flag) { - status = -ETIMEDOUT; - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Timed out control-write"); - } - goto done; - } - - if (write_len) { - /* Validate results of write request */ - if ((hdw->ctl_write_urb->status != 0) && - (hdw->ctl_write_urb->status != -ENOENT) && - (hdw->ctl_write_urb->status != -ESHUTDOWN) && - (hdw->ctl_write_urb->status != -ECONNRESET)) { - /* USB subsystem is reporting some kind of failure - on the write */ - status = hdw->ctl_write_urb->status; - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "control-write URB failure," - " status=%d", - status); - } - goto done; - } - if (hdw->ctl_write_urb->actual_length < write_len) { - /* Failed to write enough data */ - status = -EIO; - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "control-write URB short," - " expected=%d got=%d", - write_len, - hdw->ctl_write_urb->actual_length); - } - goto done; - } - } - if (read_len) { - /* Validate results of read request */ - if ((hdw->ctl_read_urb->status != 0) && - (hdw->ctl_read_urb->status != -ENOENT) && - (hdw->ctl_read_urb->status != -ESHUTDOWN) && - (hdw->ctl_read_urb->status != -ECONNRESET)) { - /* USB subsystem is reporting some kind of failure - on the read */ - status = hdw->ctl_read_urb->status; - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "control-read URB failure," - " status=%d", - status); - } - goto done; - } - if (hdw->ctl_read_urb->actual_length < read_len) { - /* Failed to read enough data */ - status = -EIO; - if (!probe_fl) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "control-read URB short," - " expected=%d got=%d", - read_len, - hdw->ctl_read_urb->actual_length); - } - goto done; - } - /* Transfer retrieved data out from internal buffer */ - for (idx = 0; idx < read_len; idx++) { - ((unsigned char *)read_data)[idx] = - hdw->ctl_read_buffer[idx]; - } - } - - done: - - hdw->cmd_debug_state = 0; - if ((status < 0) && (!probe_fl)) { - pvr2_hdw_render_useless_unlocked(hdw); - } - return status; -} - - -int pvr2_send_request(struct pvr2_hdw *hdw, - void *write_data,unsigned int write_len, - void *read_data,unsigned int read_len) -{ - return pvr2_send_request_ex(hdw,HZ*4,0, - write_data,write_len, - read_data,read_len); -} - -int pvr2_write_register(struct pvr2_hdw *hdw, u16 reg, u32 data) -{ - int ret; - - LOCK_TAKE(hdw->ctl_lock); - - hdw->cmd_buffer[0] = 0x04; /* write register prefix */ - PVR2_DECOMPOSE_LE(hdw->cmd_buffer,1,data); - hdw->cmd_buffer[5] = 0; - hdw->cmd_buffer[6] = (reg >> 8) & 0xff; - hdw->cmd_buffer[7] = reg & 0xff; - - - ret = pvr2_send_request(hdw, hdw->cmd_buffer, 8, hdw->cmd_buffer, 0); - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - - -static int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data) -{ - int ret = 0; - - LOCK_TAKE(hdw->ctl_lock); - - hdw->cmd_buffer[0] = 0x05; /* read register prefix */ - hdw->cmd_buffer[1] = 0; - hdw->cmd_buffer[2] = 0; - hdw->cmd_buffer[3] = 0; - hdw->cmd_buffer[4] = 0; - hdw->cmd_buffer[5] = 0; - hdw->cmd_buffer[6] = (reg >> 8) & 0xff; - hdw->cmd_buffer[7] = reg & 0xff; - - ret |= pvr2_send_request(hdw, hdw->cmd_buffer, 8, hdw->cmd_buffer, 4); - *data = PVR2_COMPOSE_LE(hdw->cmd_buffer,0); - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - - -static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res) -{ - int ret; - - LOCK_TAKE(hdw->ctl_lock); - - hdw->cmd_buffer[0] = (data >> 8) & 0xff; - hdw->cmd_buffer[1] = data & 0xff; - - ret = pvr2_send_request(hdw, hdw->cmd_buffer, 2, hdw->cmd_buffer, res); - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - - -static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res) -{ - int ret; - - LOCK_TAKE(hdw->ctl_lock); - - hdw->cmd_buffer[0] = data; - - ret = pvr2_send_request(hdw, hdw->cmd_buffer, 1, hdw->cmd_buffer, res); - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - - -static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) -{ - if (!hdw->flag_ok) return; - pvr2_trace(PVR2_TRACE_INIT,"render_useless"); - hdw->flag_ok = 0; - if (hdw->vid_stream) { - pvr2_stream_setup(hdw->vid_stream,NULL,0,0); - } - hdw->flag_streaming_enabled = 0; - hdw->subsys_enabled_mask = 0; -} - - -void pvr2_hdw_render_useless(struct pvr2_hdw *hdw) -{ - LOCK_TAKE(hdw->ctl_lock); - pvr2_hdw_render_useless_unlocked(hdw); - LOCK_GIVE(hdw->ctl_lock); -} - - -void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) -{ - int ret; - pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); - ret = usb_lock_device_for_reset(hdw->usb_dev,NULL); - if (ret == 1) { - ret = usb_reset_device(hdw->usb_dev); - usb_unlock_device(hdw->usb_dev); - } else { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to lock USB device ret=%d",ret); - } - if (init_pause_msec) { - pvr2_trace(PVR2_TRACE_INFO, - "Waiting %u msec for hardware to settle", - init_pause_msec); - msleep(init_pause_msec); - } - -} - - -void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int val) -{ - char da[1]; - unsigned int pipe; - int ret; - - if (!hdw->usb_dev) return; - - pvr2_trace(PVR2_TRACE_INIT,"cpureset_assert(%d)",val); - - da[0] = val ? 0x01 : 0x00; - - /* Write the CPUCS register on the 8051. The lsb of the register - is the reset bit; a 1 asserts reset while a 0 clears it. */ - pipe = usb_sndctrlpipe(hdw->usb_dev, 0); - ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,HZ); - if (ret < 0) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "cpureset_assert(%d) error=%d",val,ret); - pvr2_hdw_render_useless(hdw); - } -} - - -int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw) -{ - int status; - LOCK_TAKE(hdw->ctl_lock); do { - pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); - hdw->flag_ok = !0; - hdw->cmd_buffer[0] = 0xdd; - status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); - } while (0); LOCK_GIVE(hdw->ctl_lock); - return status; -} - - -int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw) -{ - int status; - LOCK_TAKE(hdw->ctl_lock); do { - pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); - hdw->cmd_buffer[0] = 0xde; - status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); - } while (0); LOCK_GIVE(hdw->ctl_lock); - return status; -} - - -int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw) -{ - if (!hdw->decoder_ctrl) { - pvr2_trace(PVR2_TRACE_INIT, - "Unable to reset decoder: nothing attached"); - return -ENOTTY; - } - - if (!hdw->decoder_ctrl->force_reset) { - pvr2_trace(PVR2_TRACE_INIT, - "Unable to reset decoder: not implemented"); - return -ENOTTY; - } - - pvr2_trace(PVR2_TRACE_INIT, - "Requesting decoder reset"); - hdw->decoder_ctrl->force_reset(hdw->decoder_ctrl->ctxt); - return 0; -} - - -/* Stop / start video stream transport */ -static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) -{ - int status; - LOCK_TAKE(hdw->ctl_lock); do { - hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); - status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0); - } while (0); LOCK_GIVE(hdw->ctl_lock); - if (!status) { - hdw->subsys_enabled_mask = - ((hdw->subsys_enabled_mask & - ~(1<big_lock_held = hdw->big_lock_held; - ptr->ctl_lock_held = hdw->ctl_lock_held; - ptr->flag_ok = hdw->flag_ok; - ptr->flag_disconnected = hdw->flag_disconnected; - ptr->flag_init_ok = hdw->flag_init_ok; - ptr->flag_streaming_enabled = hdw->flag_streaming_enabled; - ptr->subsys_flags = hdw->subsys_enabled_mask; - ptr->cmd_debug_state = hdw->cmd_debug_state; - ptr->cmd_code = hdw->cmd_debug_code; - ptr->cmd_debug_write_len = hdw->cmd_debug_write_len; - ptr->cmd_debug_read_len = hdw->cmd_debug_read_len; - ptr->cmd_debug_timeout = hdw->ctl_timeout_flag; - ptr->cmd_debug_write_pend = hdw->ctl_write_pend_flag; - ptr->cmd_debug_read_pend = hdw->ctl_read_pend_flag; - ptr->cmd_debug_rstatus = hdw->ctl_read_urb->status; - ptr->cmd_debug_wstatus = hdw->ctl_read_urb->status; -} - - -int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *dp) -{ - return pvr2_read_register(hdw,PVR2_GPIO_DIR,dp); -} - - -int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *dp) -{ - return pvr2_read_register(hdw,PVR2_GPIO_OUT,dp); -} - - -int pvr2_hdw_gpio_get_in(struct pvr2_hdw *hdw,u32 *dp) -{ - return pvr2_read_register(hdw,PVR2_GPIO_IN,dp); -} - - -int pvr2_hdw_gpio_chg_dir(struct pvr2_hdw *hdw,u32 msk,u32 val) -{ - u32 cval,nval; - int ret; - if (~msk) { - ret = pvr2_read_register(hdw,PVR2_GPIO_DIR,&cval); - if (ret) return ret; - nval = (cval & ~msk) | (val & msk); - pvr2_trace(PVR2_TRACE_GPIO, - "GPIO direction changing 0x%x:0x%x" - " from 0x%x to 0x%x", - msk,val,cval,nval); - } else { - nval = val; - pvr2_trace(PVR2_TRACE_GPIO, - "GPIO direction changing to 0x%x",nval); - } - return pvr2_write_register(hdw,PVR2_GPIO_DIR,nval); -} - - -int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val) -{ - u32 cval,nval; - int ret; - if (~msk) { - ret = pvr2_read_register(hdw,PVR2_GPIO_OUT,&cval); - if (ret) return ret; - nval = (cval & ~msk) | (val & msk); - pvr2_trace(PVR2_TRACE_GPIO, - "GPIO output changing 0x%x:0x%x from 0x%x to 0x%x", - msk,val,cval,nval); - } else { - nval = val; - pvr2_trace(PVR2_TRACE_GPIO, - "GPIO output changing to 0x%x",nval); - } - return pvr2_write_register(hdw,PVR2_GPIO_OUT,nval); -} - - -/* Find I2C address of eeprom */ -static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) -{ - int result; - LOCK_TAKE(hdw->ctl_lock); do { - hdw->cmd_buffer[0] = 0xeb; - result = pvr2_send_request(hdw, - hdw->cmd_buffer,1, - hdw->cmd_buffer,1); - if (result < 0) break; - result = hdw->cmd_buffer[0]; - } while(0); LOCK_GIVE(hdw->ctl_lock); - return result; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h deleted file mode 100644 index fd931b5da..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ /dev/null @@ -1,303 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_HDW_H -#define __PVRUSB2_HDW_H - -#include -#include -#include "pvrusb2-io.h" -#include "pvrusb2-ctrl.h" - - -/* Private internal control ids, look these up with - pvr2_hdw_get_ctrl_by_id() - these are NOT visible in V4L */ -#define PVR2_CID_STDENUM 1 -#define PVR2_CID_STDCUR 2 -#define PVR2_CID_STDAVAIL 3 -#define PVR2_CID_INPUT 4 -#define PVR2_CID_AUDIOMODE 5 -#define PVR2_CID_FREQUENCY 6 -#define PVR2_CID_HRES 7 -#define PVR2_CID_VRES 8 - -/* Legal values for the INPUT state variable */ -#define PVR2_CVAL_INPUT_TV 0 -#define PVR2_CVAL_INPUT_SVIDEO 1 -#define PVR2_CVAL_INPUT_COMPOSITE 2 -#define PVR2_CVAL_INPUT_RADIO 3 - -/* Values that pvr2_hdw_get_signal_status() returns */ -#define PVR2_SIGNAL_OK 0x0001 -#define PVR2_SIGNAL_STEREO 0x0002 -#define PVR2_SIGNAL_SAP 0x0004 - - -/* Subsystem definitions - these are various pieces that can be - independently stopped / started. Usually you don't want to mess with - this directly (let the driver handle things itself), but it is useful - for debugging. */ -#define PVR2_SUBSYS_B_ENC_FIRMWARE 0 -#define PVR2_SUBSYS_B_ENC_CFG 1 -#define PVR2_SUBSYS_B_DIGITIZER_RUN 2 -#define PVR2_SUBSYS_B_USBSTREAM_RUN 3 -#define PVR2_SUBSYS_B_ENC_RUN 4 - -#define PVR2_SUBSYS_CFG_ALL ( \ - (1 << PVR2_SUBSYS_B_ENC_FIRMWARE) | \ - (1 << PVR2_SUBSYS_B_ENC_CFG) ) -#define PVR2_SUBSYS_RUN_ALL ( \ - (1 << PVR2_SUBSYS_B_DIGITIZER_RUN) | \ - (1 << PVR2_SUBSYS_B_USBSTREAM_RUN) | \ - (1 << PVR2_SUBSYS_B_ENC_RUN) ) -#define PVR2_SUBSYS_ALL ( \ - PVR2_SUBSYS_CFG_ALL | \ - PVR2_SUBSYS_RUN_ALL ) - -enum pvr2_config { - pvr2_config_empty, - pvr2_config_mpeg, - pvr2_config_vbi, - pvr2_config_radio, -}; - -const char *pvr2_config_get_name(enum pvr2_config); - -struct pvr2_hdw; - -/* Create and return a structure for interacting with the underlying - hardware */ -struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, - const struct usb_device_id *devid); - -/* Poll for background activity (if any) */ -void pvr2_hdw_poll(struct pvr2_hdw *); - -/* Trigger a poll to take place later at a convenient time */ -void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *); - -/* Register a callback used to trigger a future poll */ -void pvr2_hdw_setup_poll_trigger(struct pvr2_hdw *, - void (*func)(void *), - void *data); - -/* Destroy hardware interaction structure */ -void pvr2_hdw_destroy(struct pvr2_hdw *); - -/* Set up the structure and attempt to put the device into a usable state. - This can be a time-consuming operation, which is why it is not done - internally as part of the create() step. Return value is exactly the - same as pvr2_hdw_init_ok(). */ -int pvr2_hdw_setup(struct pvr2_hdw *); - -/* Initialization succeeded */ -int pvr2_hdw_init_ok(struct pvr2_hdw *); - -/* Return true if in the ready (normal) state */ -int pvr2_hdw_dev_ok(struct pvr2_hdw *); - -/* Return small integer number [1..N] for logical instance number of this - device. This is useful for indexing array-valued module parameters. */ -int pvr2_hdw_get_unit_number(struct pvr2_hdw *); - -/* Get pointer to underlying USB device */ -struct usb_device *pvr2_hdw_get_dev(struct pvr2_hdw *); - -/* Retrieve serial number of device */ -unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *); - -/* Called when hardware has been unplugged */ -void pvr2_hdw_disconnect(struct pvr2_hdw *); - -/* Get the number of defined controls */ -unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *); - -/* Retrieve a control handle given its index (0..count-1) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *,unsigned int); - -/* Retrieve a control handle given its internal ID (if any) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *,unsigned int); - -/* Retrieve a control handle given its V4L ID (if any) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *,unsigned int ctl_id); - -/* Retrieve a control handle given its immediate predecessor V4L ID (if any) */ -struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *, - unsigned int ctl_id); - -/* Commit all control changes made up to this point */ -int pvr2_hdw_commit_ctl(struct pvr2_hdw *); - -/* Return name for this driver instance */ -const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *); - -/* Return PVR2_SIGNAL_XXXX bit mask indicating signal status */ -unsigned int pvr2_hdw_get_signal_status(struct pvr2_hdw *); - -/* Query device and see if it thinks it is on a high-speed USB link */ -int pvr2_hdw_is_hsm(struct pvr2_hdw *); - -/* Turn streaming on/off */ -int pvr2_hdw_set_streaming(struct pvr2_hdw *,int); - -/* Find out if streaming is on */ -int pvr2_hdw_get_streaming(struct pvr2_hdw *); - -/* Configure the type of stream to generate */ -int pvr2_hdw_set_stream_type(struct pvr2_hdw *, enum pvr2_config); - -/* Get handle to video output stream */ -struct pvr2_stream *pvr2_hdw_get_video_stream(struct pvr2_hdw *); - -/* Emit a video standard struct */ -int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std, - unsigned int idx); - -/* Enable / disable various pieces of hardware. Items to change are - identified by bit positions within msk, and new state for each item is - identified by corresponding bit positions within val. */ -void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, - unsigned long msk,unsigned long val); - -/* Retrieve mask indicating which pieces of hardware are currently enabled - / configured. */ -unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *); - -/* Adjust mask of what get shut down when streaming is stopped. This is a - debugging aid. */ -void pvr2_hdw_subsys_stream_bit_chg(struct pvr2_hdw *hdw, - unsigned long msk,unsigned long val); - -/* Retrieve mask indicating which pieces of hardware are disabled when - streaming is turned off. */ -unsigned long pvr2_hdw_subsys_stream_get(struct pvr2_hdw *); - - -/* Enable / disable retrieval of CPU firmware. This must be enabled before - pvr2_hdw_cpufw_get() will function. Note that doing this may prevent - the device from running (and leaving this mode may imply a device - reset). */ -void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *, int enable_flag); - -/* Return true if we're in a mode for retrieval CPU firmware */ -int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *); - -/* Retrieve a piece of the CPU's firmware at the given offset. Return - value is the number of bytes retrieved or zero if we're past the end or - an error otherwise (e.g. if firmware retrieval is not enabled). */ -int pvr2_hdw_cpufw_get(struct pvr2_hdw *,unsigned int offs, - char *buf,unsigned int cnt); - -/* Retrieve previously stored v4l minor device number */ -int pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *); - -/* Store the v4l minor device number */ -void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *,int); - - -/* The following entry points are all lower level things you normally don't - want to worry about. */ - -/* Issue a command and get a response from the device. LOTS of higher - level stuff is built on this. */ -int pvr2_send_request(struct pvr2_hdw *, - void *write_ptr,unsigned int write_len, - void *read_ptr,unsigned int read_len); - -/* Slightly higher level device communication functions. */ -int pvr2_write_register(struct pvr2_hdw *, u16, u32); - -/* Call if for any reason we can't talk to the hardware anymore - this will - cause the driver to stop flailing on the device. */ -void pvr2_hdw_render_useless(struct pvr2_hdw *); - -/* Set / clear 8051's reset bit */ -void pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int); - -/* Execute a USB-commanded device reset */ -void pvr2_hdw_device_reset(struct pvr2_hdw *); - -/* Execute hard reset command (after this point it's likely that the - encoder will have to be reconfigured). This also clears the "useless" - state. */ -int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *); - -/* Execute simple reset command */ -int pvr2_hdw_cmd_powerup(struct pvr2_hdw *); - -/* Order decoder to reset */ -int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); - -/* Direct manipulation of GPIO bits */ -int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *); -int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *); -int pvr2_hdw_gpio_get_in(struct pvr2_hdw *hdw,u32 *); -int pvr2_hdw_gpio_chg_dir(struct pvr2_hdw *hdw,u32 msk,u32 val); -int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val); - -/* This data structure is specifically for the next function... */ -struct pvr2_hdw_debug_info { - int big_lock_held; - int ctl_lock_held; - int flag_ok; - int flag_disconnected; - int flag_init_ok; - int flag_streaming_enabled; - unsigned long subsys_flags; - int cmd_debug_state; - int cmd_debug_write_len; - int cmd_debug_read_len; - int cmd_debug_write_pend; - int cmd_debug_read_pend; - int cmd_debug_timeout; - int cmd_debug_rstatus; - int cmd_debug_wstatus; - unsigned char cmd_code; -}; - -/* Non-intrusively retrieve internal state info - this is useful for - diagnosing lockups. Note that this operation is completed without any - kind of locking and so it is not atomic and may yield inconsistent - results. This is *purely* a debugging aid. */ -void pvr2_hdw_get_debug_info(const struct pvr2_hdw *hdw, - struct pvr2_hdw_debug_info *); - -/* Cause modules to log their state once */ -void pvr2_hdw_trigger_module_log(struct pvr2_hdw *hdw); - -/* Cause encoder firmware to be uploaded into the device. This is normally - done autonomously, but the interface is exported here because it is also - a debugging aid. */ -int pvr2_upload_firmware2(struct pvr2_hdw *hdw); - -/* List of device types that we can match */ -extern struct usb_device_id pvr2_device_table[]; - -#endif /* __PVRUSB2_HDW_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c deleted file mode 100644 index fbe6039ae..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-i2c-core.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include "pvrusb2-i2c-cmd-v4l2.h" -#include "pvrusb2-audio.h" -#include "pvrusb2-tuner.h" -#include "pvrusb2-video-v4l.h" -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX -#include "pvrusb2-cx2584x-v4l.h" -#include "pvrusb2-wm8775.h" -#endif - -#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__) - -#define OP_STANDARD 0 -#define OP_BCSH 1 -#define OP_VOLUME 2 -#define OP_FREQ 3 -#define OP_AUDIORATE 4 -#define OP_SIZE 5 -#define OP_LOG 6 - -static const struct pvr2_i2c_op * const ops[] = { - [OP_STANDARD] = &pvr2_i2c_op_v4l2_standard, - [OP_BCSH] = &pvr2_i2c_op_v4l2_bcsh, - [OP_VOLUME] = &pvr2_i2c_op_v4l2_volume, - [OP_FREQ] = &pvr2_i2c_op_v4l2_frequency, - [OP_SIZE] = &pvr2_i2c_op_v4l2_size, - [OP_LOG] = &pvr2_i2c_op_v4l2_log, -}; - -void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) -{ - int id; - id = cp->client->driver->id; - cp->ctl_mask = ((1 << OP_STANDARD) | - (1 << OP_BCSH) | - (1 << OP_VOLUME) | - (1 << OP_FREQ) | - (1 << OP_SIZE) | - (1 << OP_LOG)); - - if (id == I2C_DRIVERID_MSP3400) { - if (pvr2_i2c_msp3400_setup(hdw,cp)) { - return; - } - } - if (id == I2C_DRIVERID_TUNER) { - if (pvr2_i2c_tuner_setup(hdw,cp)) { - return; - } - } -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - if (id == I2C_DRIVERID_CX25840) { - if (pvr2_i2c_cx2584x_v4l_setup(hdw,cp)) { - return; - } - } - if (id == I2C_DRIVERID_WM8775) { - if (pvr2_i2c_wm8775_setup(hdw,cp)) { - return; - } - } -#endif - if (id == I2C_DRIVERID_SAA711X) { - if (pvr2_i2c_decoder_v4l_setup(hdw,cp)) { - return; - } - } -} - - -const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx) -{ - if (idx >= sizeof(ops)/sizeof(ops[0])) return 0; - return ops[idx]; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c deleted file mode 100644 index 8a9933dec..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 "pvrusb2-i2c-cmd-v4l2.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include - - -static void set_standard(struct pvr2_hdw *hdw) -{ - v4l2_std_id vs; - vs = hdw->std_mask_cur; - pvr2_trace(PVR2_TRACE_CHIPS, - "i2c v4l2 set_standard(0x%llx)",(__u64)vs); - - pvr2_i2c_core_cmd(hdw,VIDIOC_S_STD,&vs); -} - - -static int check_standard(struct pvr2_hdw *hdw) -{ - return hdw->std_dirty != 0; -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard = { - .check = check_standard, - .update = set_standard, - .name = "v4l2_standard", -}; - - -static void set_bcsh(struct pvr2_hdw *hdw) -{ - struct v4l2_control ctrl; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_bcsh" - " b=%d c=%d s=%d h=%d", - hdw->brightness_val,hdw->contrast_val, - hdw->saturation_val,hdw->hue_val); - memset(&ctrl,0,sizeof(ctrl)); - ctrl.id = V4L2_CID_BRIGHTNESS; - ctrl.value = hdw->brightness_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_CONTRAST; - ctrl.value = hdw->contrast_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_SATURATION; - ctrl.value = hdw->saturation_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_HUE; - ctrl.value = hdw->hue_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); -} - - -static int check_bcsh(struct pvr2_hdw *hdw) -{ - return (hdw->brightness_dirty || - hdw->contrast_dirty || - hdw->saturation_dirty || - hdw->hue_dirty); -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_bcsh = { - .check = check_bcsh, - .update = set_bcsh, - .name = "v4l2_bcsh", -}; - - -static void set_volume(struct pvr2_hdw *hdw) -{ - struct v4l2_control ctrl; - pvr2_trace(PVR2_TRACE_CHIPS, - "i2c v4l2 set_volume" - "(vol=%d bal=%d bas=%d treb=%d mute=%d)", - hdw->volume_val, - hdw->balance_val, - hdw->bass_val, - hdw->treble_val, - hdw->mute_val); - memset(&ctrl,0,sizeof(ctrl)); - ctrl.id = V4L2_CID_AUDIO_MUTE; - ctrl.value = hdw->mute_val ? 1 : 0; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_AUDIO_VOLUME; - ctrl.value = hdw->volume_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_AUDIO_BALANCE; - ctrl.value = hdw->balance_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_AUDIO_BASS; - ctrl.value = hdw->bass_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); - ctrl.id = V4L2_CID_AUDIO_TREBLE; - ctrl.value = hdw->treble_val; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_CTRL,&ctrl); -} - - -static int check_volume(struct pvr2_hdw *hdw) -{ - return (hdw->volume_dirty || - hdw->balance_dirty || - hdw->bass_dirty || - hdw->treble_dirty || - hdw->mute_dirty); -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_volume = { - .check = check_volume, - .update = set_volume, - .name = "v4l2_volume", -}; - - -static void set_frequency(struct pvr2_hdw *hdw) -{ - unsigned long fv; - struct v4l2_frequency freq; - fv = hdw->freqVal; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_freq(%lu)",fv); - memset(&freq,0,sizeof(freq)); - freq.frequency = fv / 62500; - freq.tuner = 0; - freq.type = V4L2_TUNER_ANALOG_TV; - pvr2_i2c_core_cmd(hdw,VIDIOC_S_FREQUENCY,&freq); -} - - -static int check_frequency(struct pvr2_hdw *hdw) -{ - return hdw->freqDirty != 0; -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_frequency = { - .check = check_frequency, - .update = set_frequency, - .name = "v4l2_freq", -}; - - -static void set_size(struct pvr2_hdw *hdw) -{ - struct v4l2_format fmt; - - memset(&fmt,0,sizeof(fmt)); - - fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - fmt.fmt.pix.width = hdw->res_hor_val; - fmt.fmt.pix.height = hdw->res_ver_val; - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_size(%dx%d)", - fmt.fmt.pix.width,fmt.fmt.pix.height); - - pvr2_i2c_core_cmd(hdw,VIDIOC_S_FMT,&fmt); -} - - -static int check_size(struct pvr2_hdw *hdw) -{ - return (hdw->res_hor_dirty || hdw->res_ver_dirty); -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size = { - .check = check_size, - .update = set_size, - .name = "v4l2_size", -}; - - -static void do_log(struct pvr2_hdw *hdw) -{ - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); - pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,NULL); - -} - - -static int check_log(struct pvr2_hdw *hdw) -{ - return hdw->log_requested != 0; -} - - -const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log = { - .check = check_log, - .update = do_log, - .name = "v4l2_log", -}; - - -void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) -{ - pvr2_i2c_client_cmd(cp, - (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),NULL); -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h deleted file mode 100644 index ecabddba1..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_CMD_V4L2_H -#define __PVRUSB2_CMD_V4L2_H - -#include "pvrusb2-i2c-core.h" - -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard; -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_bcsh; -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_volume; -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_frequency; -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size; -extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log; - -void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *,int); - -#endif /* __PVRUSB2_CMD_V4L2_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c deleted file mode 100644 index 7fca47982..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ /dev/null @@ -1,941 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-i2c-core.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" - -#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__) - -/* - - This module attempts to implement a compliant I2C adapter for the pvrusb2 - device. By doing this we can then make use of existing functionality in - V4L (e.g. tuner.c) rather than rolling our own. - -*/ - -static unsigned int i2c_scan = 0; -module_param(i2c_scan, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time"); - -static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, - unsigned int detail, - char *buf,unsigned int maxlen); - -static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ - u8 i2c_addr, /* I2C address we're talking to */ - u8 *data, /* Data to write */ - u16 length) /* Size of data to write */ -{ - /* Return value - default 0 means success */ - int ret; - - - if (!data) length = 0; - if (length > (sizeof(hdw->cmd_buffer) - 3)) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Killing an I2C write to %u that is too large" - " (desired=%u limit=%u)", - i2c_addr, - length,(unsigned int)(sizeof(hdw->cmd_buffer) - 3)); - return -ENOTSUPP; - } - - LOCK_TAKE(hdw->ctl_lock); - - /* Clear the command buffer (likely to be paranoia) */ - memset(hdw->cmd_buffer, 0, sizeof(hdw->cmd_buffer)); - - /* Set up command buffer for an I2C write */ - hdw->cmd_buffer[0] = 0x08; /* write prefix */ - hdw->cmd_buffer[1] = i2c_addr; /* i2c addr of chip */ - hdw->cmd_buffer[2] = length; /* length of what follows */ - if (length) memcpy(hdw->cmd_buffer + 3, data, length); - - /* Do the operation */ - ret = pvr2_send_request(hdw, - hdw->cmd_buffer, - length + 3, - hdw->cmd_buffer, - 1); - if (!ret) { - if (hdw->cmd_buffer[0] != 8) { - ret = -EIO; - if (hdw->cmd_buffer[0] != 7) { - trace_i2c("unexpected status" - " from i2_write[%d]: %d", - i2c_addr,hdw->cmd_buffer[0]); - } - } - } - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - -static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */ - u8 i2c_addr, /* I2C address we're talking to */ - u8 *data, /* Data to write */ - u16 dlen, /* Size of data to write */ - u8 *res, /* Where to put data we read */ - u16 rlen) /* Amount of data to read */ -{ - /* Return value - default 0 means success */ - int ret; - - - if (!data) dlen = 0; - if (dlen > (sizeof(hdw->cmd_buffer) - 4)) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Killing an I2C read to %u that has wlen too large" - " (desired=%u limit=%u)", - i2c_addr, - dlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 4)); - return -ENOTSUPP; - } - if (res && (rlen > (sizeof(hdw->cmd_buffer) - 1))) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Killing an I2C read to %u that has rlen too large" - " (desired=%u limit=%u)", - i2c_addr, - rlen,(unsigned int)(sizeof(hdw->cmd_buffer) - 1)); - return -ENOTSUPP; - } - - LOCK_TAKE(hdw->ctl_lock); - - /* Clear the command buffer (likely to be paranoia) */ - memset(hdw->cmd_buffer, 0, sizeof(hdw->cmd_buffer)); - - /* Set up command buffer for an I2C write followed by a read */ - hdw->cmd_buffer[0] = 0x09; /* read prefix */ - hdw->cmd_buffer[1] = dlen; /* arg length */ - hdw->cmd_buffer[2] = rlen; /* answer length. Device will send one - more byte (status). */ - hdw->cmd_buffer[3] = i2c_addr; /* i2c addr of chip */ - if (dlen) memcpy(hdw->cmd_buffer + 4, data, dlen); - - /* Do the operation */ - ret = pvr2_send_request(hdw, - hdw->cmd_buffer, - 4 + dlen, - hdw->cmd_buffer, - rlen + 1); - if (!ret) { - if (hdw->cmd_buffer[0] != 8) { - ret = -EIO; - if (hdw->cmd_buffer[0] != 7) { - trace_i2c("unexpected status" - " from i2_read[%d]: %d", - i2c_addr,hdw->cmd_buffer[0]); - } - } - } - - /* Copy back the result */ - if (res && rlen) { - if (ret) { - /* Error, just blank out the return buffer */ - memset(res, 0, rlen); - } else { - memcpy(res, hdw->cmd_buffer + 1, rlen); - } - } - - LOCK_GIVE(hdw->ctl_lock); - - return ret; -} - -/* This is the common low level entry point for doing I2C operations to the - hardware. */ -static int pvr2_i2c_basic_op(struct pvr2_hdw *hdw, - u8 i2c_addr, - u8 *wdata, - u16 wlen, - u8 *rdata, - u16 rlen) -{ - if (!rdata) rlen = 0; - if (!wdata) wlen = 0; - if (rlen || !wlen) { - return pvr2_i2c_read(hdw,i2c_addr,wdata,wlen,rdata,rlen); - } else { - return pvr2_i2c_write(hdw,i2c_addr,wdata,wlen); - } -} - -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - -/* This is a special entry point that is entered if an I2C operation is - attempted to a wm8775 chip on model 24xxx hardware. Autodetect of this - part doesn't work, but we know it is really there. So let's look for - the autodetect attempt and just return success if we see that. */ -static int i2c_hack_wm8775(struct pvr2_hdw *hdw, - u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) -{ - if (!(rlen || wlen)) { - // This is a probe attempt. Just let it succeed. - return 0; - } - return pvr2_i2c_basic_op(hdw,i2c_addr,wdata,wlen,rdata,rlen); -} - -/* This is a special entry point that is entered if an I2C operation is - attempted to a cx25840 chip on model 24xxx hardware. This chip can - sometimes wedge itself. Worse still, when this happens msp3400 can - falsely detect this part and then the system gets hosed up after msp3400 - gets confused and dies. What we want to do here is try to keep msp3400 - away and also try to notice if the chip is wedged and send a warning to - the system log. */ -static int i2c_hack_cx25840(struct pvr2_hdw *hdw, - u8 i2c_addr,u8 *wdata,u16 wlen,u8 *rdata,u16 rlen) -{ - int ret; - unsigned int subaddr; - u8 wbuf[2]; - int state = hdw->i2c_cx25840_hack_state; - - if (!(rlen || wlen)) { - // Probe attempt - always just succeed and don't bother the - // hardware (this helps to make the state machine further - // down somewhat easier). - return 0; - } - - if (state == 3) { - return pvr2_i2c_basic_op(hdw,i2c_addr,wdata,wlen,rdata,rlen); - } - - /* We're looking for the exact pattern where the revision register - is being read. The cx25840 module will always look at the - revision register first. Any other pattern of access therefore - has to be a probe attempt from somebody else so we'll reject it. - Normally we could just let each client just probe the part - anyway, but when the cx25840 is wedged, msp3400 will get a false - positive and that just screws things up... */ - - if (wlen == 0) { - switch (state) { - case 1: subaddr = 0x0100; break; - case 2: subaddr = 0x0101; break; - default: goto fail; - } - } else if (wlen == 2) { - subaddr = (wdata[0] << 8) | wdata[1]; - switch (subaddr) { - case 0x0100: state = 1; break; - case 0x0101: state = 2; break; - default: goto fail; - } - } else { - goto fail; - } - if (!rlen) goto success; - state = 0; - if (rlen != 1) goto fail; - - /* If we get to here then we have a legitimate read for one of the - two revision bytes, so pass it through. */ - wbuf[0] = subaddr >> 8; - wbuf[1] = subaddr; - ret = pvr2_i2c_basic_op(hdw,i2c_addr,wbuf,2,rdata,rlen); - - if ((ret != 0) || (*rdata == 0x04) || (*rdata == 0x0a)) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "WARNING: Detected a wedged cx25840 chip;" - " the device will not work."); - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "WARNING: Try power cycling the pvrusb2 device."); - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "WARNING: Disabling further access to the device" - " to prevent other foul-ups."); - // This blocks all further communication with the part. - hdw->i2c_func[0x44] = NULL; - pvr2_hdw_render_useless(hdw); - goto fail; - } - - /* Success! */ - pvr2_trace(PVR2_TRACE_CHIPS,"cx25840 appears to be OK."); - state = 3; - - success: - hdw->i2c_cx25840_hack_state = state; - return 0; - - fail: - hdw->i2c_cx25840_hack_state = state; - return -EIO; -} - -#endif /* CONFIG_VIDEO_PVRUSB2_24XXX */ - -/* This is a very, very limited I2C adapter implementation. We can only - support what we actually know will work on the device... */ -static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, - struct i2c_msg msgs[], - int num) -{ - int ret = -ENOTSUPP; - pvr2_i2c_func funcp = NULL; - struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); - - if (!num) { - ret = -EINVAL; - goto done; - } - if ((msgs[0].flags & I2C_M_NOSTART)) { - trace_i2c("i2c refusing I2C_M_NOSTART"); - goto done; - } - if (msgs[0].addr < PVR2_I2C_FUNC_CNT) { - funcp = hdw->i2c_func[msgs[0].addr]; - } - if (!funcp) { - ret = -EIO; - goto done; - } - - if (num == 1) { - if (msgs[0].flags & I2C_M_RD) { - /* Simple read */ - u16 tcnt,bcnt,offs; - if (!msgs[0].len) { - /* Length == 0 read. This is a probe. */ - if (funcp(hdw,msgs[0].addr,NULL,0,NULL,0)) { - ret = -EIO; - goto done; - } - ret = 1; - goto done; - } - /* If the read is short enough we'll do the whole - thing atomically. Otherwise we have no choice - but to break apart the reads. */ - tcnt = msgs[0].len; - offs = 0; - while (tcnt) { - bcnt = tcnt; - if (bcnt > sizeof(hdw->cmd_buffer)-1) { - bcnt = sizeof(hdw->cmd_buffer)-1; - } - if (funcp(hdw,msgs[0].addr,NULL,0, - msgs[0].buf+offs,bcnt)) { - ret = -EIO; - goto done; - } - offs += bcnt; - tcnt -= bcnt; - } - ret = 1; - goto done; - } else { - /* Simple write */ - ret = 1; - if (funcp(hdw,msgs[0].addr, - msgs[0].buf,msgs[0].len,NULL,0)) { - ret = -EIO; - } - goto done; - } - } else if (num == 2) { - if (msgs[0].addr != msgs[1].addr) { - trace_i2c("i2c refusing 2 phase transfer with" - " conflicting target addresses"); - ret = -ENOTSUPP; - goto done; - } - if ((!((msgs[0].flags & I2C_M_RD))) && - (msgs[1].flags & I2C_M_RD)) { - u16 tcnt,bcnt,wcnt,offs; - /* Write followed by atomic read. If the read - portion is short enough we'll do the whole thing - atomically. Otherwise we have no choice but to - break apart the reads. */ - tcnt = msgs[1].len; - wcnt = msgs[0].len; - offs = 0; - while (tcnt || wcnt) { - bcnt = tcnt; - if (bcnt > sizeof(hdw->cmd_buffer)-1) { - bcnt = sizeof(hdw->cmd_buffer)-1; - } - if (funcp(hdw,msgs[0].addr, - msgs[0].buf,wcnt, - msgs[1].buf+offs,bcnt)) { - ret = -EIO; - goto done; - } - offs += bcnt; - tcnt -= bcnt; - wcnt = 0; - } - ret = 2; - goto done; - } else { - trace_i2c("i2c refusing complex transfer" - " read0=%d read1=%d", - (msgs[0].flags & I2C_M_RD), - (msgs[1].flags & I2C_M_RD)); - } - } else { - trace_i2c("i2c refusing %d phase transfer",num); - } - - done: - if (pvrusb2_debug & PVR2_TRACE_I2C_TRAF) { - unsigned int idx,offs,cnt; - for (idx = 0; idx < num; idx++) { - cnt = msgs[idx].len; - printk(KERN_INFO - "pvrusb2 i2c xfer %u/%u:" - " addr=0x%x len=%d %s%s", - idx+1,num, - msgs[idx].addr, - cnt, - (msgs[idx].flags & I2C_M_RD ? - "read" : "write"), - (msgs[idx].flags & I2C_M_NOSTART ? - " nostart" : "")); - if ((ret > 0) || !(msgs[idx].flags & I2C_M_RD)) { - if (cnt > 8) cnt = 8; - printk(" ["); - for (offs = 0; offs < (cnt>8?8:cnt); offs++) { - if (offs) printk(" "); - printk("%02x",msgs[idx].buf[offs]); - } - if (offs < cnt) printk(" ..."); - printk("]"); - } - if (idx+1 == num) { - printk(" result=%d",ret); - } - printk("\n"); - } - if (!num) { - printk(KERN_INFO - "pvrusb2 i2c xfer null transfer result=%d\n", - ret); - } - } - return ret; -} - -static int pvr2_i2c_control(struct i2c_adapter *adapter, - unsigned int cmd, unsigned long arg) -{ - return 0; -} - -static u32 pvr2_i2c_functionality(struct i2c_adapter *adap) -{ - return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE_DATA; -} - -static int pvr2_i2c_core_singleton(struct i2c_client *cp, - unsigned int cmd,void *arg) -{ - int stat; - if (!cp) return -EINVAL; - if (!(cp->driver)) return -EINVAL; - if (!(cp->driver->command)) return -EINVAL; - if (!try_module_get(cp->driver->driver.owner)) return -EAGAIN; - stat = cp->driver->command(cp,cmd,arg); - module_put(cp->driver->driver.owner); - return stat; -} - -int pvr2_i2c_client_cmd(struct pvr2_i2c_client *cp,unsigned int cmd,void *arg) -{ - int stat; - if (pvrusb2_debug & PVR2_TRACE_I2C_CMD) { - char buf[100]; - unsigned int cnt; - cnt = pvr2_i2c_client_describe(cp,PVR2_I2C_DETAIL_DEBUG, - buf,sizeof(buf)); - pvr2_trace(PVR2_TRACE_I2C_CMD, - "i2c COMMAND (code=%u 0x%x) to %.*s", - cmd,cmd,cnt,buf); - } - stat = pvr2_i2c_core_singleton(cp->client,cmd,arg); - if (pvrusb2_debug & PVR2_TRACE_I2C_CMD) { - char buf[100]; - unsigned int cnt; - cnt = pvr2_i2c_client_describe(cp,PVR2_I2C_DETAIL_DEBUG, - buf,sizeof(buf)); - pvr2_trace(PVR2_TRACE_I2C_CMD, - "i2c COMMAND to %.*s (ret=%d)",cnt,buf,stat); - } - return stat; -} - -int pvr2_i2c_core_cmd(struct pvr2_hdw *hdw,unsigned int cmd,void *arg) -{ - struct list_head *item,*nc; - struct pvr2_i2c_client *cp; - int stat = -EINVAL; - - if (!hdw) return stat; - - mutex_lock(&hdw->i2c_list_lock); - list_for_each_safe(item,nc,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client,list); - if (!cp->recv_enable) continue; - mutex_unlock(&hdw->i2c_list_lock); - stat = pvr2_i2c_client_cmd(cp,cmd,arg); - mutex_lock(&hdw->i2c_list_lock); - } - mutex_unlock(&hdw->i2c_list_lock); - return stat; -} - - -static int handler_check(struct pvr2_i2c_client *cp) -{ - struct pvr2_i2c_handler *hp = cp->handler; - if (!hp) return 0; - if (!hp->func_table->check) return 0; - return hp->func_table->check(hp->func_data) != 0; -} - -#define BUFSIZE 500 - -void pvr2_i2c_core_sync(struct pvr2_hdw *hdw) -{ - unsigned long msk; - unsigned int idx; - struct list_head *item,*nc; - struct pvr2_i2c_client *cp; - - if (!hdw->i2c_linked) return; - if (!(hdw->i2c_pend_types & PVR2_I2C_PEND_ALL)) { - return; - } - mutex_lock(&hdw->i2c_list_lock); do { - pvr2_trace(PVR2_TRACE_I2C_CORE,"i2c: core_sync BEGIN"); - if (hdw->i2c_pend_types & PVR2_I2C_PEND_DETECT) { - /* One or more I2C clients have attached since we - last synced. So scan the list and identify the - new clients. */ - char *buf; - unsigned int cnt; - unsigned long amask = 0; - buf = kmalloc(BUFSIZE,GFP_KERNEL); - pvr2_trace(PVR2_TRACE_I2C_CORE,"i2c: PEND_DETECT"); - hdw->i2c_pend_types &= ~PVR2_I2C_PEND_DETECT; - list_for_each(item,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client, - list); - if (!cp->detected_flag) { - cp->ctl_mask = 0; - pvr2_i2c_probe(hdw,cp); - cp->detected_flag = !0; - msk = cp->ctl_mask; - cnt = 0; - if (buf) { - cnt = pvr2_i2c_client_describe( - cp, - PVR2_I2C_DETAIL_ALL, - buf,BUFSIZE); - } - trace_i2c("Probed: %.*s",cnt,buf); - if (handler_check(cp)) { - hdw->i2c_pend_types |= - PVR2_I2C_PEND_CLIENT; - } - cp->pend_mask = msk; - hdw->i2c_pend_mask |= msk; - hdw->i2c_pend_types |= - PVR2_I2C_PEND_REFRESH; - } - amask |= cp->ctl_mask; - } - hdw->i2c_active_mask = amask; - if (buf) kfree(buf); - } - if (hdw->i2c_pend_types & PVR2_I2C_PEND_STALE) { - /* Need to do one or more global updates. Arrange - for this to happen. */ - unsigned long m2; - pvr2_trace(PVR2_TRACE_I2C_CORE, - "i2c: PEND_STALE (0x%lx)", - hdw->i2c_stale_mask); - hdw->i2c_pend_types &= ~PVR2_I2C_PEND_STALE; - list_for_each(item,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client, - list); - m2 = hdw->i2c_stale_mask; - m2 &= cp->ctl_mask; - m2 &= ~cp->pend_mask; - if (m2) { - pvr2_trace(PVR2_TRACE_I2C_CORE, - "i2c: cp=%p setting 0x%lx", - cp,m2); - cp->pend_mask |= m2; - } - } - hdw->i2c_pend_mask |= hdw->i2c_stale_mask; - hdw->i2c_stale_mask = 0; - hdw->i2c_pend_types |= PVR2_I2C_PEND_REFRESH; - } - if (hdw->i2c_pend_types & PVR2_I2C_PEND_CLIENT) { - /* One or more client handlers are asking for an - update. Run through the list of known clients - and update each one. */ - pvr2_trace(PVR2_TRACE_I2C_CORE,"i2c: PEND_CLIENT"); - hdw->i2c_pend_types &= ~PVR2_I2C_PEND_CLIENT; - list_for_each_safe(item,nc,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client, - list); - if (!cp->handler) continue; - if (!cp->handler->func_table->update) continue; - pvr2_trace(PVR2_TRACE_I2C_CORE, - "i2c: cp=%p update",cp); - mutex_unlock(&hdw->i2c_list_lock); - cp->handler->func_table->update( - cp->handler->func_data); - mutex_lock(&hdw->i2c_list_lock); - /* If client's update function set some - additional pending bits, account for that - here. */ - if (cp->pend_mask & ~hdw->i2c_pend_mask) { - hdw->i2c_pend_mask |= cp->pend_mask; - hdw->i2c_pend_types |= - PVR2_I2C_PEND_REFRESH; - } - } - } - if (hdw->i2c_pend_types & PVR2_I2C_PEND_REFRESH) { - const struct pvr2_i2c_op *opf; - unsigned long pm; - /* Some actual updates are pending. Walk through - each update type and perform it. */ - pvr2_trace(PVR2_TRACE_I2C_CORE,"i2c: PEND_REFRESH" - " (0x%lx)",hdw->i2c_pend_mask); - hdw->i2c_pend_types &= ~PVR2_I2C_PEND_REFRESH; - pm = hdw->i2c_pend_mask; - hdw->i2c_pend_mask = 0; - for (idx = 0, msk = 1; pm; idx++, msk <<= 1) { - if (!(pm & msk)) continue; - pm &= ~msk; - list_for_each(item,&hdw->i2c_clients) { - cp = list_entry(item, - struct pvr2_i2c_client, - list); - if (cp->pend_mask & msk) { - cp->pend_mask &= ~msk; - cp->recv_enable = !0; - } else { - cp->recv_enable = 0; - } - } - opf = pvr2_i2c_get_op(idx); - if (!opf) continue; - mutex_unlock(&hdw->i2c_list_lock); - opf->update(hdw); - mutex_lock(&hdw->i2c_list_lock); - } - } - pvr2_trace(PVR2_TRACE_I2C_CORE,"i2c: core_sync END"); - } while (0); mutex_unlock(&hdw->i2c_list_lock); -} - -int pvr2_i2c_core_check_stale(struct pvr2_hdw *hdw) -{ - unsigned long msk,sm,pm; - unsigned int idx; - const struct pvr2_i2c_op *opf; - struct list_head *item; - struct pvr2_i2c_client *cp; - unsigned int pt = 0; - - pvr2_trace(PVR2_TRACE_I2C_CORE,"pvr2_i2c_core_check_stale BEGIN"); - - pm = hdw->i2c_active_mask; - sm = 0; - for (idx = 0, msk = 1; pm; idx++, msk <<= 1) { - if (!(msk & pm)) continue; - pm &= ~msk; - opf = pvr2_i2c_get_op(idx); - if (!opf) continue; - if (opf->check(hdw)) { - sm |= msk; - } - } - if (sm) pt |= PVR2_I2C_PEND_STALE; - - list_for_each(item,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client,list); - if (!handler_check(cp)) continue; - pt |= PVR2_I2C_PEND_CLIENT; - } - - if (pt) { - mutex_lock(&hdw->i2c_list_lock); do { - hdw->i2c_pend_types |= pt; - hdw->i2c_stale_mask |= sm; - hdw->i2c_pend_mask |= hdw->i2c_stale_mask; - } while (0); mutex_unlock(&hdw->i2c_list_lock); - } - - pvr2_trace(PVR2_TRACE_I2C_CORE, - "i2c: types=0x%x stale=0x%lx pend=0x%lx", - hdw->i2c_pend_types, - hdw->i2c_stale_mask, - hdw->i2c_pend_mask); - pvr2_trace(PVR2_TRACE_I2C_CORE,"pvr2_i2c_core_check_stale END"); - - return (hdw->i2c_pend_types & PVR2_I2C_PEND_ALL) != 0; -} - -static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, - unsigned int detail, - char *buf,unsigned int maxlen) -{ - unsigned int ccnt,bcnt; - int spcfl = 0; - const struct pvr2_i2c_op *opf; - - ccnt = 0; - if (detail & PVR2_I2C_DETAIL_DEBUG) { - bcnt = scnprintf(buf,maxlen, - "ctxt=%p ctl_mask=0x%lx", - cp,cp->ctl_mask); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - spcfl = !0; - } - bcnt = scnprintf(buf,maxlen, - "%s%s @ 0x%x", - (spcfl ? " " : ""), - cp->client->name, - cp->client->addr); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - if ((detail & PVR2_I2C_DETAIL_HANDLER) && - cp->handler && cp->handler->func_table->describe) { - bcnt = scnprintf(buf,maxlen," ("); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - bcnt = cp->handler->func_table->describe( - cp->handler->func_data,buf,maxlen); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - bcnt = scnprintf(buf,maxlen,")"); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - } - if ((detail & PVR2_I2C_DETAIL_CTLMASK) && cp->ctl_mask) { - unsigned int idx; - unsigned long msk,sm; - int spcfl; - bcnt = scnprintf(buf,maxlen," ["); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - sm = 0; - spcfl = 0; - for (idx = 0, msk = 1; msk; idx++, msk <<= 1) { - if (!(cp->ctl_mask & msk)) continue; - opf = pvr2_i2c_get_op(idx); - if (opf) { - bcnt = scnprintf(buf,maxlen,"%s%s", - spcfl ? " " : "", - opf->name); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - spcfl = !0; - } else { - sm |= msk; - } - } - if (sm) { - bcnt = scnprintf(buf,maxlen,"%s%lx", - idx != 0 ? " " : "",sm); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - } - bcnt = scnprintf(buf,maxlen,"]"); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - } - return ccnt; -} - -unsigned int pvr2_i2c_report(struct pvr2_hdw *hdw, - char *buf,unsigned int maxlen) -{ - unsigned int ccnt,bcnt; - struct list_head *item; - struct pvr2_i2c_client *cp; - ccnt = 0; - mutex_lock(&hdw->i2c_list_lock); do { - list_for_each(item,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client,list); - bcnt = pvr2_i2c_client_describe( - cp, - (PVR2_I2C_DETAIL_HANDLER| - PVR2_I2C_DETAIL_CTLMASK), - buf,maxlen); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - bcnt = scnprintf(buf,maxlen,"\n"); - ccnt += bcnt; buf += bcnt; maxlen -= bcnt; - } - } while (0); mutex_unlock(&hdw->i2c_list_lock); - return ccnt; -} - -static int pvr2_i2c_attach_inform(struct i2c_client *client) -{ - struct pvr2_hdw *hdw = (struct pvr2_hdw *)(client->adapter->algo_data); - struct pvr2_i2c_client *cp; - int fl = !(hdw->i2c_pend_types & PVR2_I2C_PEND_ALL); - cp = kmalloc(sizeof(*cp),GFP_KERNEL); - trace_i2c("i2c_attach [client=%s @ 0x%x ctxt=%p]", - client->name, - client->addr,cp); - if (!cp) return -ENOMEM; - memset(cp,0,sizeof(*cp)); - INIT_LIST_HEAD(&cp->list); - cp->client = client; - mutex_lock(&hdw->i2c_list_lock); do { - list_add_tail(&cp->list,&hdw->i2c_clients); - hdw->i2c_pend_types |= PVR2_I2C_PEND_DETECT; - } while (0); mutex_unlock(&hdw->i2c_list_lock); - if (fl) pvr2_hdw_poll_trigger_unlocked(hdw); - return 0; -} - -static int pvr2_i2c_detach_inform(struct i2c_client *client) -{ - struct pvr2_hdw *hdw = (struct pvr2_hdw *)(client->adapter->algo_data); - struct pvr2_i2c_client *cp; - struct list_head *item,*nc; - unsigned long amask = 0; - int foundfl = 0; - mutex_lock(&hdw->i2c_list_lock); do { - list_for_each_safe(item,nc,&hdw->i2c_clients) { - cp = list_entry(item,struct pvr2_i2c_client,list); - if (cp->client == client) { - trace_i2c("pvr2_i2c_detach" - " [client=%s @ 0x%x ctxt=%p]", - client->name, - client->addr,cp); - if (cp->handler && - cp->handler->func_table->detach) { - cp->handler->func_table->detach( - cp->handler->func_data); - } - list_del(&cp->list); - kfree(cp); - foundfl = !0; - continue; - } - amask |= cp->ctl_mask; - } - hdw->i2c_active_mask = amask; - } while (0); mutex_unlock(&hdw->i2c_list_lock); - if (!foundfl) { - trace_i2c("pvr2_i2c_detach [client=%s @ 0x%x ctxt=]", - client->name, - client->addr); - } - return 0; -} - -static struct i2c_algorithm pvr2_i2c_algo_template = { - .master_xfer = pvr2_i2c_xfer, - .algo_control = pvr2_i2c_control, - .functionality = pvr2_i2c_functionality, -}; - -static struct i2c_adapter pvr2_i2c_adap_template = { - .owner = THIS_MODULE, - .class = I2C_CLASS_TV_ANALOG, - .id = I2C_HW_B_BT848, - .client_register = pvr2_i2c_attach_inform, - .client_unregister = pvr2_i2c_detach_inform, -}; - -static void do_i2c_scan(struct pvr2_hdw *hdw) -{ - struct i2c_msg msg[1]; - int i,rc; - msg[0].addr = 0; - msg[0].flags = I2C_M_RD; - msg[0].len = 0; - msg[0].buf = NULL; - printk("%s: i2c scan beginning\n",hdw->name); - for (i = 0; i < 128; i++) { - msg[0].addr = i; - rc = i2c_transfer(&hdw->i2c_adap,msg, - sizeof(msg)/sizeof(msg[0])); - if (rc != 1) continue; - printk("%s: i2c scan: found device @ 0x%x\n",hdw->name,i); - } - printk("%s: i2c scan done.\n",hdw->name); -} - -void pvr2_i2c_core_init(struct pvr2_hdw *hdw) -{ - unsigned int idx; - - // The default action for all possible I2C addresses is just to do - // the transfer normally. - for (idx = 0; idx < PVR2_I2C_FUNC_CNT; idx++) { - hdw->i2c_func[idx] = pvr2_i2c_basic_op; - } - -#ifdef CONFIG_VIDEO_PVRUSB2_24XXX - // If however we're dealing with new hardware, insert some hacks in - // the I2C transfer stack to let things work better. - if (hdw->hdw_type == PVR2_HDW_TYPE_24XXX) { - hdw->i2c_func[0x1b] = i2c_hack_wm8775; - hdw->i2c_func[0x44] = i2c_hack_cx25840; - } -#endif - - // Configure the adapter and set up everything else related to it. - memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap)); - memcpy(&hdw->i2c_algo,&pvr2_i2c_algo_template,sizeof(hdw->i2c_algo)); - strlcpy(hdw->i2c_adap.name,hdw->name,sizeof(hdw->i2c_adap.name)); - hdw->i2c_adap.algo = &hdw->i2c_algo; - hdw->i2c_adap.algo_data = hdw; - hdw->i2c_pend_mask = 0; - hdw->i2c_stale_mask = 0; - hdw->i2c_active_mask = 0; - INIT_LIST_HEAD(&hdw->i2c_clients); - mutex_init(&hdw->i2c_list_lock); - hdw->i2c_linked = !0; - i2c_add_adapter(&hdw->i2c_adap); - if (i2c_scan) do_i2c_scan(hdw); -} - -void pvr2_i2c_core_done(struct pvr2_hdw *hdw) -{ - if (hdw->i2c_linked) { - i2c_del_adapter(&hdw->i2c_adap); - hdw->i2c_linked = 0; - } -} - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h deleted file mode 100644 index 6d7e25247..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_I2C_CORE_H -#define __PVRUSB2_I2C_CORE_H - -#include -#include - -struct pvr2_hdw; -struct pvr2_i2c_client; -struct pvr2_i2c_handler; -struct pvr2_i2c_handler_functions; -struct pvr2_i2c_op; -struct pvr2_i2c_op_functions; - -struct pvr2_i2c_client { - struct i2c_client *client; - struct pvr2_i2c_handler *handler; - struct list_head list; - int detected_flag; - int recv_enable; - unsigned long pend_mask; - unsigned long ctl_mask; -}; - -struct pvr2_i2c_handler { - void *func_data; - const struct pvr2_i2c_handler_functions *func_table; -}; - -struct pvr2_i2c_handler_functions { - void (*detach)(void *); - int (*check)(void *); - void (*update)(void *); - unsigned int (*describe)(void *,char *,unsigned int); -}; - -struct pvr2_i2c_op { - int (*check)(struct pvr2_hdw *); - void (*update)(struct pvr2_hdw *); - const char *name; -}; - -void pvr2_i2c_core_init(struct pvr2_hdw *); -void pvr2_i2c_core_done(struct pvr2_hdw *); - -int pvr2_i2c_client_cmd(struct pvr2_i2c_client *,unsigned int cmd,void *arg); -int pvr2_i2c_core_cmd(struct pvr2_hdw *,unsigned int cmd,void *arg); - -int pvr2_i2c_core_check_stale(struct pvr2_hdw *); -void pvr2_i2c_core_sync(struct pvr2_hdw *); -unsigned int pvr2_i2c_report(struct pvr2_hdw *,char *buf,unsigned int maxlen); -#define PVR2_I2C_DETAIL_DEBUG 0x0001 -#define PVR2_I2C_DETAIL_HANDLER 0x0002 -#define PVR2_I2C_DETAIL_CTLMASK 0x0004 -#define PVR2_I2C_DETAIL_ALL (\ - PVR2_I2C_DETAIL_DEBUG |\ - PVR2_I2C_DETAIL_HANDLER |\ - PVR2_I2C_DETAIL_CTLMASK) - -void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *); -const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx); - -#endif /* __PVRUSB2_I2C_CORE_H */ - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c deleted file mode 100644 index 1e3937625..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-io.c +++ /dev/null @@ -1,667 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-io.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include - -static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state); - -#define BUFFER_SIG 0x47653271 - -// #define SANITY_CHECK_BUFFERS - - -#ifdef SANITY_CHECK_BUFFERS -#define BUFFER_CHECK(bp) do { \ - if ((bp)->signature != BUFFER_SIG) { \ - pvr2_trace(PVR2_TRACE_ERROR_LEGS, \ - "Buffer %p is bad at %s:%d", \ - (bp),__FILE__,__LINE__); \ - pvr2_buffer_describe(bp,"BadSig"); \ - BUG(); \ - } \ -} while (0) -#else -#define BUFFER_CHECK(bp) do {} while(0) -#endif - -struct pvr2_stream { - /* Buffers queued for reading */ - struct list_head queued_list; - unsigned int q_count; - unsigned int q_bcount; - /* Buffers with retrieved data */ - struct list_head ready_list; - unsigned int r_count; - unsigned int r_bcount; - /* Buffers available for use */ - struct list_head idle_list; - unsigned int i_count; - unsigned int i_bcount; - /* Pointers to all buffers */ - struct pvr2_buffer **buffers; - /* Array size of buffers */ - unsigned int buffer_slot_count; - /* Total buffers actually in circulation */ - unsigned int buffer_total_count; - /* Designed number of buffers to be in circulation */ - unsigned int buffer_target_count; - /* Executed when ready list become non-empty */ - pvr2_stream_callback callback_func; - void *callback_data; - /* Context for transfer endpoint */ - struct usb_device *dev; - int endpoint; - /* Overhead for mutex enforcement */ - spinlock_t list_lock; - struct mutex mutex; - /* Tracking state for tolerating errors */ - unsigned int fail_count; - unsigned int fail_tolerance; -}; - -struct pvr2_buffer { - int id; - int signature; - enum pvr2_buffer_state state; - void *ptr; /* Pointer to storage area */ - unsigned int max_count; /* Size of storage area */ - unsigned int used_count; /* Amount of valid data in storage area */ - int status; /* Transfer result status */ - struct pvr2_stream *stream; - struct list_head list_overhead; - struct urb *purb; -}; - -static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) -{ - switch (st) { - case pvr2_buffer_state_none: return "none"; - case pvr2_buffer_state_idle: return "idle"; - case pvr2_buffer_state_queued: return "queued"; - case pvr2_buffer_state_ready: return "ready"; - } - return "unknown"; -} - -#ifdef SANITY_CHECK_BUFFERS -static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) -{ - pvr2_trace(PVR2_TRACE_INFO, - "buffer%s%s %p state=%s id=%d status=%d" - " stream=%p purb=%p sig=0x%x", - (msg ? " " : ""), - (msg ? msg : ""), - bp, - (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), - (bp ? bp->id : 0), - (bp ? bp->status : 0), - (bp ? bp->stream : NULL), - (bp ? bp->purb : NULL), - (bp ? bp->signature : 0)); -} -#endif /* SANITY_CHECK_BUFFERS */ - -static void pvr2_buffer_remove(struct pvr2_buffer *bp) -{ - unsigned int *cnt; - unsigned int *bcnt; - unsigned int ccnt; - struct pvr2_stream *sp = bp->stream; - switch (bp->state) { - case pvr2_buffer_state_idle: - cnt = &sp->i_count; - bcnt = &sp->i_bcount; - ccnt = bp->max_count; - break; - case pvr2_buffer_state_queued: - cnt = &sp->q_count; - bcnt = &sp->q_bcount; - ccnt = bp->max_count; - break; - case pvr2_buffer_state_ready: - cnt = &sp->r_count; - bcnt = &sp->r_bcount; - ccnt = bp->used_count; - break; - default: - return; - } - list_del_init(&bp->list_overhead); - (*cnt)--; - (*bcnt) -= ccnt; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/" - " bufferPool %8s dec cap=%07d cnt=%02d", - pvr2_buffer_state_decode(bp->state),*bcnt,*cnt); - bp->state = pvr2_buffer_state_none; -} - -static void pvr2_buffer_set_none(struct pvr2_buffer *bp) -{ - unsigned long irq_flags; - struct pvr2_stream *sp; - BUFFER_CHECK(bp); - sp = bp->stream; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferState %p %6s --> %6s", - bp, - pvr2_buffer_state_decode(bp->state), - pvr2_buffer_state_decode(pvr2_buffer_state_none)); - spin_lock_irqsave(&sp->list_lock,irq_flags); - pvr2_buffer_remove(bp); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); -} - -static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) -{ - int fl; - unsigned long irq_flags; - struct pvr2_stream *sp; - BUFFER_CHECK(bp); - sp = bp->stream; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferState %p %6s --> %6s", - bp, - pvr2_buffer_state_decode(bp->state), - pvr2_buffer_state_decode(pvr2_buffer_state_ready)); - spin_lock_irqsave(&sp->list_lock,irq_flags); - fl = (sp->r_count == 0); - pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->ready_list); - bp->state = pvr2_buffer_state_ready; - (sp->r_count)++; - sp->r_bcount += bp->used_count; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/" - " bufferPool %8s inc cap=%07d cnt=%02d", - pvr2_buffer_state_decode(bp->state), - sp->r_bcount,sp->r_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - return fl; -} - -static void pvr2_buffer_set_idle(struct pvr2_buffer *bp) -{ - unsigned long irq_flags; - struct pvr2_stream *sp; - BUFFER_CHECK(bp); - sp = bp->stream; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferState %p %6s --> %6s", - bp, - pvr2_buffer_state_decode(bp->state), - pvr2_buffer_state_decode(pvr2_buffer_state_idle)); - spin_lock_irqsave(&sp->list_lock,irq_flags); - pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->idle_list); - bp->state = pvr2_buffer_state_idle; - (sp->i_count)++; - sp->i_bcount += bp->max_count; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/" - " bufferPool %8s inc cap=%07d cnt=%02d", - pvr2_buffer_state_decode(bp->state), - sp->i_bcount,sp->i_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); -} - -static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) -{ - unsigned long irq_flags; - struct pvr2_stream *sp; - BUFFER_CHECK(bp); - sp = bp->stream; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferState %p %6s --> %6s", - bp, - pvr2_buffer_state_decode(bp->state), - pvr2_buffer_state_decode(pvr2_buffer_state_queued)); - spin_lock_irqsave(&sp->list_lock,irq_flags); - pvr2_buffer_remove(bp); - list_add_tail(&bp->list_overhead,&sp->queued_list); - bp->state = pvr2_buffer_state_queued; - (sp->q_count)++; - sp->q_bcount += bp->max_count; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/" - " bufferPool %8s inc cap=%07d cnt=%02d", - pvr2_buffer_state_decode(bp->state), - sp->q_bcount,sp->q_count); - spin_unlock_irqrestore(&sp->list_lock,irq_flags); -} - -static void pvr2_buffer_wipe(struct pvr2_buffer *bp) -{ - if (bp->state == pvr2_buffer_state_queued) { - usb_kill_urb(bp->purb); - } -} - -static int pvr2_buffer_init(struct pvr2_buffer *bp, - struct pvr2_stream *sp, - unsigned int id) -{ - memset(bp,0,sizeof(*bp)); - bp->signature = BUFFER_SIG; - bp->id = id; - pvr2_trace(PVR2_TRACE_BUF_POOL, - "/*---TRACE_FLOW---*/ bufferInit %p stream=%p",bp,sp); - bp->stream = sp; - bp->state = pvr2_buffer_state_none; - INIT_LIST_HEAD(&bp->list_overhead); - bp->purb = usb_alloc_urb(0,GFP_KERNEL); - if (! bp->purb) return -ENOMEM; -#ifdef SANITY_CHECK_BUFFERS - pvr2_buffer_describe(bp,"create"); -#endif - return 0; -} - -static void pvr2_buffer_done(struct pvr2_buffer *bp) -{ -#ifdef SANITY_CHECK_BUFFERS - pvr2_buffer_describe(bp,"delete"); -#endif - pvr2_buffer_wipe(bp); - pvr2_buffer_set_none(bp); - bp->signature = 0; - bp->stream = NULL; - if (bp->purb) usb_free_urb(bp->purb); - pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" - " bufferDone %p",bp); -} - -static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) -{ - int ret; - unsigned int scnt; - - /* Allocate buffers pointer array in multiples of 32 entries */ - if (cnt == sp->buffer_total_count) return 0; - - pvr2_trace(PVR2_TRACE_BUF_POOL, - "/*---TRACE_FLOW---*/ poolResize " - " stream=%p cur=%d adj=%+d", - sp, - sp->buffer_total_count, - cnt-sp->buffer_total_count); - - scnt = cnt & ~0x1f; - if (cnt > scnt) scnt += 0x20; - - if (cnt > sp->buffer_total_count) { - if (scnt > sp->buffer_slot_count) { - struct pvr2_buffer **nb; - nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); - if (!nb) return -ENOMEM; - if (sp->buffer_slot_count) { - memcpy(nb,sp->buffers, - sp->buffer_slot_count * sizeof(*nb)); - kfree(sp->buffers); - } - sp->buffers = nb; - sp->buffer_slot_count = scnt; - } - while (sp->buffer_total_count < cnt) { - struct pvr2_buffer *bp; - bp = kmalloc(sizeof(*bp),GFP_KERNEL); - if (!bp) return -ENOMEM; - ret = pvr2_buffer_init(bp,sp,sp->buffer_total_count); - if (ret) { - kfree(bp); - return -ENOMEM; - } - sp->buffers[sp->buffer_total_count] = bp; - (sp->buffer_total_count)++; - pvr2_buffer_set_idle(bp); - } - } else { - while (sp->buffer_total_count > cnt) { - struct pvr2_buffer *bp; - bp = sp->buffers[sp->buffer_total_count - 1]; - /* Paranoia */ - sp->buffers[sp->buffer_total_count - 1] = NULL; - (sp->buffer_total_count)--; - pvr2_buffer_done(bp); - kfree(bp); - } - if (scnt < sp->buffer_slot_count) { - struct pvr2_buffer **nb = NULL; - if (scnt) { - nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); - if (!nb) return -ENOMEM; - memcpy(nb,sp->buffers,scnt * sizeof(*nb)); - } - kfree(sp->buffers); - sp->buffers = nb; - sp->buffer_slot_count = scnt; - } - } - return 0; -} - -static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp) -{ - struct pvr2_buffer *bp; - unsigned int cnt; - - if (sp->buffer_total_count == sp->buffer_target_count) return 0; - - pvr2_trace(PVR2_TRACE_BUF_POOL, - "/*---TRACE_FLOW---*/" - " poolCheck stream=%p cur=%d tgt=%d", - sp,sp->buffer_total_count,sp->buffer_target_count); - - if (sp->buffer_total_count < sp->buffer_target_count) { - return pvr2_stream_buffer_count(sp,sp->buffer_target_count); - } - - cnt = 0; - while ((sp->buffer_total_count - cnt) > sp->buffer_target_count) { - bp = sp->buffers[sp->buffer_total_count - (cnt + 1)]; - if (bp->state != pvr2_buffer_state_idle) break; - cnt++; - } - if (cnt) { - pvr2_stream_buffer_count(sp,sp->buffer_total_count - cnt); - } - - return 0; -} - -static void pvr2_stream_internal_flush(struct pvr2_stream *sp) -{ - struct list_head *lp; - struct pvr2_buffer *bp1; - while ((lp = sp->queued_list.next) != &sp->queued_list) { - bp1 = list_entry(lp,struct pvr2_buffer,list_overhead); - pvr2_buffer_wipe(bp1); - /* At this point, we should be guaranteed that no - completion callback may happen on this buffer. But it's - possible that it might have completed after we noticed - it but before we wiped it. So double check its status - here first. */ - if (bp1->state != pvr2_buffer_state_queued) continue; - pvr2_buffer_set_idle(bp1); - } - if (sp->buffer_total_count != sp->buffer_target_count) { - pvr2_stream_achieve_buffer_count(sp); - } -} - -static void pvr2_stream_init(struct pvr2_stream *sp) -{ - spin_lock_init(&sp->list_lock); - mutex_init(&sp->mutex); - INIT_LIST_HEAD(&sp->queued_list); - INIT_LIST_HEAD(&sp->ready_list); - INIT_LIST_HEAD(&sp->idle_list); -} - -static void pvr2_stream_done(struct pvr2_stream *sp) -{ - mutex_lock(&sp->mutex); do { - pvr2_stream_internal_flush(sp); - pvr2_stream_buffer_count(sp,0); - } while (0); mutex_unlock(&sp->mutex); -} - -static void buffer_complete(struct urb *urb, struct pt_regs *regs) -{ - struct pvr2_buffer *bp = urb->context; - struct pvr2_stream *sp; - unsigned long irq_flags; - BUFFER_CHECK(bp); - sp = bp->stream; - bp->used_count = 0; - bp->status = 0; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferComplete %p stat=%d cnt=%d", - bp,urb->status,urb->actual_length); - spin_lock_irqsave(&sp->list_lock,irq_flags); - if ((!(urb->status)) || - (urb->status == -ENOENT) || - (urb->status == -ECONNRESET) || - (urb->status == -ESHUTDOWN)) { - bp->used_count = urb->actual_length; - if (sp->fail_count) { - pvr2_trace(PVR2_TRACE_TOLERANCE, - "stream %p transfer ok" - " - fail count reset",sp); - sp->fail_count = 0; - } - } else if (sp->fail_count < sp->fail_tolerance) { - // We can tolerate this error, because we're below the - // threshold... - (sp->fail_count)++; - pvr2_trace(PVR2_TRACE_TOLERANCE, - "stream %p ignoring error %d" - " - fail count increased to %u", - sp,urb->status,sp->fail_count); - } else { - bp->status = urb->status; - } - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - pvr2_buffer_set_ready(bp); - if (sp && sp->callback_func) { - sp->callback_func(sp->callback_data); - } -} - -struct pvr2_stream *pvr2_stream_create(void) -{ - struct pvr2_stream *sp; - sp = kmalloc(sizeof(*sp),GFP_KERNEL); - if (!sp) return sp; - memset(sp,0,sizeof(*sp)); - pvr2_trace(PVR2_TRACE_INIT,"pvr2_stream_create: sp=%p",sp); - pvr2_stream_init(sp); - return sp; -} - -void pvr2_stream_destroy(struct pvr2_stream *sp) -{ - if (!sp) return; - pvr2_trace(PVR2_TRACE_INIT,"pvr2_stream_destroy: sp=%p",sp); - pvr2_stream_done(sp); - kfree(sp); -} - -void pvr2_stream_setup(struct pvr2_stream *sp, - struct usb_device *dev, - int endpoint, - unsigned int tolerance) -{ - mutex_lock(&sp->mutex); do { - pvr2_stream_internal_flush(sp); - sp->dev = dev; - sp->endpoint = endpoint; - sp->fail_tolerance = tolerance; - } while(0); mutex_unlock(&sp->mutex); -} - -void pvr2_stream_set_callback(struct pvr2_stream *sp, - pvr2_stream_callback func, - void *data) -{ - unsigned long irq_flags; - mutex_lock(&sp->mutex); do { - spin_lock_irqsave(&sp->list_lock,irq_flags); - sp->callback_data = data; - sp->callback_func = func; - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - } while(0); mutex_unlock(&sp->mutex); -} - -/* Query / set the nominal buffer count */ -int pvr2_stream_get_buffer_count(struct pvr2_stream *sp) -{ - return sp->buffer_target_count; -} - -int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) -{ - int ret; - if (sp->buffer_target_count == cnt) return 0; - mutex_lock(&sp->mutex); do { - sp->buffer_target_count = cnt; - ret = pvr2_stream_achieve_buffer_count(sp); - } while(0); mutex_unlock(&sp->mutex); - return ret; -} - -struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) -{ - struct list_head *lp = sp->idle_list.next; - if (lp == &sp->idle_list) return NULL; - return list_entry(lp,struct pvr2_buffer,list_overhead); -} - -struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) -{ - struct list_head *lp = sp->ready_list.next; - if (lp == &sp->ready_list) return NULL; - return list_entry(lp,struct pvr2_buffer,list_overhead); -} - -struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) -{ - if (id < 0) return NULL; - if (id >= sp->buffer_total_count) return NULL; - return sp->buffers[id]; -} - -int pvr2_stream_get_ready_count(struct pvr2_stream *sp) -{ - return sp->r_count; -} - -void pvr2_stream_kill(struct pvr2_stream *sp) -{ - struct pvr2_buffer *bp; - mutex_lock(&sp->mutex); do { - pvr2_stream_internal_flush(sp); - while ((bp = pvr2_stream_get_ready_buffer(sp)) != 0) { - pvr2_buffer_set_idle(bp); - } - if (sp->buffer_total_count != sp->buffer_target_count) { - pvr2_stream_achieve_buffer_count(sp); - } - } while(0); mutex_unlock(&sp->mutex); -} - -int pvr2_buffer_queue(struct pvr2_buffer *bp) -{ -#undef SEED_BUFFER -#ifdef SEED_BUFFER - unsigned int idx; - unsigned int val; -#endif - int ret = 0; - struct pvr2_stream *sp; - if (!bp) return -EINVAL; - sp = bp->stream; - mutex_lock(&sp->mutex); do { - pvr2_buffer_wipe(bp); - if (!sp->dev) { - ret = -EIO; - break; - } - pvr2_buffer_set_queued(bp); -#ifdef SEED_BUFFER - for (idx = 0; idx < (bp->max_count) / 4; idx++) { - val = bp->id << 24; - val |= idx; - ((unsigned int *)(bp->ptr))[idx] = val; - } -#endif - bp->status = -EINPROGRESS; - usb_fill_bulk_urb(bp->purb, // struct urb *urb - sp->dev, // struct usb_device *dev - // endpoint (below) - usb_rcvbulkpipe(sp->dev,sp->endpoint), - bp->ptr, // void *transfer_buffer - bp->max_count, // int buffer_length - buffer_complete, - bp); - usb_submit_urb(bp->purb,GFP_KERNEL); - } while(0); mutex_unlock(&sp->mutex); - return ret; -} - -int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) -{ - int ret = 0; - unsigned long irq_flags; - struct pvr2_stream *sp; - if (!bp) return -EINVAL; - sp = bp->stream; - mutex_lock(&sp->mutex); do { - spin_lock_irqsave(&sp->list_lock,irq_flags); - if (bp->state != pvr2_buffer_state_idle) { - ret = -EPERM; - } else { - bp->ptr = ptr; - bp->stream->i_bcount -= bp->max_count; - bp->max_count = cnt; - bp->stream->i_bcount += bp->max_count; - pvr2_trace(PVR2_TRACE_BUF_FLOW, - "/*---TRACE_FLOW---*/ bufferPool " - " %8s cap cap=%07d cnt=%02d", - pvr2_buffer_state_decode( - pvr2_buffer_state_idle), - bp->stream->i_bcount,bp->stream->i_count); - } - spin_unlock_irqrestore(&sp->list_lock,irq_flags); - } while(0); mutex_unlock(&sp->mutex); - return ret; -} - -unsigned int pvr2_buffer_get_count(struct pvr2_buffer *bp) -{ - return bp->used_count; -} - -int pvr2_buffer_get_status(struct pvr2_buffer *bp) -{ - return bp->status; -} - -int pvr2_buffer_get_id(struct pvr2_buffer *bp) -{ - return bp->id; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.h b/drivers/media/video/pvrusb2/pvrusb2-io.h deleted file mode 100644 index 93279cc2a..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-io.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_IO_H -#define __PVRUSB2_IO_H - -#include -#include - -typedef void (*pvr2_stream_callback)(void *); - -enum pvr2_buffer_state { - pvr2_buffer_state_none = 0, // Not on any list - pvr2_buffer_state_idle = 1, // Buffer is ready to be used again - pvr2_buffer_state_queued = 2, // Buffer has been queued for filling - pvr2_buffer_state_ready = 3, // Buffer has data available -}; - -struct pvr2_stream; -struct pvr2_buffer; - -/* Initialize / tear down stream structure */ -struct pvr2_stream *pvr2_stream_create(void); -void pvr2_stream_destroy(struct pvr2_stream *); -void pvr2_stream_setup(struct pvr2_stream *, - struct usb_device *dev,int endpoint, - unsigned int tolerance); -void pvr2_stream_set_callback(struct pvr2_stream *, - pvr2_stream_callback func, - void *data); - -/* Query / set the nominal buffer count */ -int pvr2_stream_get_buffer_count(struct pvr2_stream *); -int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int); - -/* Get a pointer to a buffer that is either idle, ready, or is specified - named. */ -struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *); -struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *); -struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id); - -/* Find out how many buffers are idle or ready */ -int pvr2_stream_get_ready_count(struct pvr2_stream *); - - -/* Kill all pending buffers and throw away any ready buffers as well */ -void pvr2_stream_kill(struct pvr2_stream *); - -/* Set up the actual storage for a buffer */ -int pvr2_buffer_set_buffer(struct pvr2_buffer *,void *ptr,unsigned int cnt); - -/* Find out size of data in the given ready buffer */ -unsigned int pvr2_buffer_get_count(struct pvr2_buffer *); - -/* Retrieve completion code for given ready buffer */ -int pvr2_buffer_get_status(struct pvr2_buffer *); - -/* Retrieve ID of given buffer */ -int pvr2_buffer_get_id(struct pvr2_buffer *); - -/* Start reading into given buffer (kill it if needed) */ -int pvr2_buffer_queue(struct pvr2_buffer *); - -#endif /* __PVRUSB2_IO_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c deleted file mode 100644 index b71f9a961..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-ioread.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include -#include - -#define BUFFER_COUNT 32 -#define BUFFER_SIZE PAGE_ALIGN(0x4000) - -struct pvr2_ioread { - struct pvr2_stream *stream; - char *buffer_storage[BUFFER_COUNT]; - char *sync_key_ptr; - unsigned int sync_key_len; - unsigned int sync_buf_offs; - unsigned int sync_state; - unsigned int sync_trashed_count; - int enabled; // Streaming is on - int spigot_open; // OK to pass data to client - int stream_running; // Passing data to client now - - /* State relevant to current buffer being read */ - struct pvr2_buffer *c_buf; - char *c_data_ptr; - unsigned int c_data_len; - unsigned int c_data_offs; - struct mutex mutex; -}; - -static int pvr2_ioread_init(struct pvr2_ioread *cp) -{ - unsigned int idx; - - cp->stream = NULL; - mutex_init(&cp->mutex); - - for (idx = 0; idx < BUFFER_COUNT; idx++) { - cp->buffer_storage[idx] = kmalloc(BUFFER_SIZE,GFP_KERNEL); - if (!(cp->buffer_storage[idx])) break; - } - - if (idx < BUFFER_COUNT) { - // An allocation appears to have failed - for (idx = 0; idx < BUFFER_COUNT; idx++) { - if (!(cp->buffer_storage[idx])) continue; - kfree(cp->buffer_storage[idx]); - } - return -ENOMEM; - } - return 0; -} - -static void pvr2_ioread_done(struct pvr2_ioread *cp) -{ - unsigned int idx; - - pvr2_ioread_setup(cp,NULL); - for (idx = 0; idx < BUFFER_COUNT; idx++) { - if (!(cp->buffer_storage[idx])) continue; - kfree(cp->buffer_storage[idx]); - } -} - -struct pvr2_ioread *pvr2_ioread_create(void) -{ - struct pvr2_ioread *cp; - cp = kmalloc(sizeof(*cp),GFP_KERNEL); - if (!cp) return NULL; - pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); - memset(cp,0,sizeof(*cp)); - if (pvr2_ioread_init(cp) < 0) { - kfree(cp); - return NULL; - } - return cp; -} - -void pvr2_ioread_destroy(struct pvr2_ioread *cp) -{ - if (!cp) return; - pvr2_ioread_done(cp); - pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); - if (cp->sync_key_ptr) { - kfree(cp->sync_key_ptr); - cp->sync_key_ptr = NULL; - } - kfree(cp); -} - -void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp, - const char *sync_key_ptr, - unsigned int sync_key_len) -{ - if (!cp) return; - - if (!sync_key_ptr) sync_key_len = 0; - if ((sync_key_len == cp->sync_key_len) && - ((!sync_key_len) || - (!memcmp(sync_key_ptr,cp->sync_key_ptr,sync_key_len)))) return; - - if (sync_key_len != cp->sync_key_len) { - if (cp->sync_key_ptr) { - kfree(cp->sync_key_ptr); - cp->sync_key_ptr = NULL; - } - cp->sync_key_len = 0; - if (sync_key_len) { - cp->sync_key_ptr = kmalloc(sync_key_len,GFP_KERNEL); - if (cp->sync_key_ptr) { - cp->sync_key_len = sync_key_len; - } - } - } - if (!cp->sync_key_len) return; - memcpy(cp->sync_key_ptr,sync_key_ptr,cp->sync_key_len); -} - -static void pvr2_ioread_stop(struct pvr2_ioread *cp) -{ - if (!(cp->enabled)) return; - pvr2_trace(PVR2_TRACE_START_STOP, - "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); - pvr2_stream_kill(cp->stream); - cp->c_buf = NULL; - cp->c_data_ptr = NULL; - cp->c_data_len = 0; - cp->c_data_offs = 0; - cp->enabled = 0; - cp->stream_running = 0; - cp->spigot_open = 0; - if (cp->sync_state) { - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/ sync_state <== 0"); - cp->sync_state = 0; - } -} - -static int pvr2_ioread_start(struct pvr2_ioread *cp) -{ - int stat; - struct pvr2_buffer *bp; - if (cp->enabled) return 0; - if (!(cp->stream)) return 0; - pvr2_trace(PVR2_TRACE_START_STOP, - "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp); - while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != 0) { - stat = pvr2_buffer_queue(bp); - if (stat < 0) { - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/" - " pvr2_ioread_start id=%p" - " error=%d", - cp,stat); - pvr2_ioread_stop(cp); - return stat; - } - } - cp->enabled = !0; - cp->c_buf = NULL; - cp->c_data_ptr = NULL; - cp->c_data_len = 0; - cp->c_data_offs = 0; - cp->stream_running = 0; - if (cp->sync_key_len) { - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/ sync_state <== 1"); - cp->sync_state = 1; - cp->sync_trashed_count = 0; - cp->sync_buf_offs = 0; - } - cp->spigot_open = 0; - return 0; -} - -struct pvr2_stream *pvr2_ioread_get_stream(struct pvr2_ioread *cp) -{ - return cp->stream; -} - -int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) -{ - int ret; - unsigned int idx; - struct pvr2_buffer *bp; - - mutex_lock(&cp->mutex); do { - if (cp->stream) { - pvr2_trace(PVR2_TRACE_START_STOP, - "/*---TRACE_READ---*/" - " pvr2_ioread_setup (tear-down) id=%p",cp); - pvr2_ioread_stop(cp); - pvr2_stream_kill(cp->stream); - if (pvr2_stream_get_buffer_count(cp->stream)) { - pvr2_stream_set_buffer_count(cp->stream,0); - } - cp->stream = NULL; - } - if (sp) { - pvr2_trace(PVR2_TRACE_START_STOP, - "/*---TRACE_READ---*/" - " pvr2_ioread_setup (setup) id=%p",cp); - pvr2_stream_kill(sp); - ret = pvr2_stream_set_buffer_count(sp,BUFFER_COUNT); - if (ret < 0) return ret; - for (idx = 0; idx < BUFFER_COUNT; idx++) { - bp = pvr2_stream_get_buffer(sp,idx); - pvr2_buffer_set_buffer(bp, - cp->buffer_storage[idx], - BUFFER_SIZE); - } - cp->stream = sp; - } - } while (0); mutex_unlock(&cp->mutex); - - return 0; -} - -int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl) -{ - int ret = 0; - if ((!fl) == (!(cp->enabled))) return ret; - - mutex_lock(&cp->mutex); do { - if (fl) { - ret = pvr2_ioread_start(cp); - } else { - pvr2_ioread_stop(cp); - } - } while (0); mutex_unlock(&cp->mutex); - return ret; -} - -static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) -{ - int stat; - - while (cp->c_data_len <= cp->c_data_offs) { - if (cp->c_buf) { - // Flush out current buffer first. - stat = pvr2_buffer_queue(cp->c_buf); - if (stat < 0) { - // Streaming error... - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/" - " pvr2_ioread_read id=%p" - " queue_error=%d", - cp,stat); - pvr2_ioread_stop(cp); - return 0; - } - cp->c_buf = NULL; - cp->c_data_ptr = NULL; - cp->c_data_len = 0; - cp->c_data_offs = 0; - } - // Now get a freshly filled buffer. - cp->c_buf = pvr2_stream_get_ready_buffer(cp->stream); - if (!cp->c_buf) break; // Nothing ready; done. - cp->c_data_len = pvr2_buffer_get_count(cp->c_buf); - if (!cp->c_data_len) { - // Nothing transferred. Was there an error? - stat = pvr2_buffer_get_status(cp->c_buf); - if (stat < 0) { - // Streaming error... - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/" - " pvr2_ioread_read id=%p" - " buffer_error=%d", - cp,stat); - pvr2_ioread_stop(cp); - // Give up. - return 0; - } - // Start over... - continue; - } - cp->c_data_offs = 0; - cp->c_data_ptr = cp->buffer_storage[ - pvr2_buffer_get_id(cp->c_buf)]; - } - return !0; -} - -static void pvr2_ioread_filter(struct pvr2_ioread *cp) -{ - unsigned int idx; - if (!cp->enabled) return; - if (cp->sync_state != 1) return; - - // Search the stream for our synchronization key. This is made - // complicated by the fact that in order to be honest with - // ourselves here we must search across buffer boundaries... - mutex_lock(&cp->mutex); while (1) { - // Ensure we have a buffer - if (!pvr2_ioread_get_buffer(cp)) break; - if (!cp->c_data_len) break; - - // Now walk the buffer contents until we match the key or - // run out of buffer data. - for (idx = cp->c_data_offs; idx < cp->c_data_len; idx++) { - if (cp->sync_buf_offs >= cp->sync_key_len) break; - if (cp->c_data_ptr[idx] == - cp->sync_key_ptr[cp->sync_buf_offs]) { - // Found the next key byte - (cp->sync_buf_offs)++; - } else { - // Whoops, mismatched. Start key over... - cp->sync_buf_offs = 0; - } - } - - // Consume what we've walked through - cp->c_data_offs += idx; - cp->sync_trashed_count += idx; - - // If we've found the key, then update state and get out. - if (cp->sync_buf_offs >= cp->sync_key_len) { - cp->sync_trashed_count -= cp->sync_key_len; - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/" - " sync_state <== 2 (skipped %u bytes)", - cp->sync_trashed_count); - cp->sync_state = 2; - cp->sync_buf_offs = 0; - break; - } - - if (cp->c_data_offs < cp->c_data_len) { - // Sanity check - should NEVER get here - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "ERROR: pvr2_ioread filter sync problem" - " len=%u offs=%u", - cp->c_data_len,cp->c_data_offs); - // Get out so we don't get stuck in an infinite - // loop. - break; - } - - continue; // (for clarity) - } mutex_unlock(&cp->mutex); -} - -int pvr2_ioread_avail(struct pvr2_ioread *cp) -{ - int ret; - if (!(cp->enabled)) { - // Stream is not enabled; so this is an I/O error - return -EIO; - } - - if (cp->sync_state == 1) { - pvr2_ioread_filter(cp); - if (cp->sync_state == 1) return -EAGAIN; - } - - ret = 0; - if (cp->stream_running) { - if (!pvr2_stream_get_ready_count(cp->stream)) { - // No data available at all right now. - ret = -EAGAIN; - } - } else { - if (pvr2_stream_get_ready_count(cp->stream) < BUFFER_COUNT/2) { - // Haven't buffered up enough yet; try again later - ret = -EAGAIN; - } - } - - if ((!(cp->spigot_open)) != (!(ret == 0))) { - cp->spigot_open = (ret == 0); - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/ data is %s", - cp->spigot_open ? "available" : "pending"); - } - - return ret; -} - -int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) -{ - unsigned int copied_cnt; - unsigned int bcnt; - const char *src; - int stat; - int ret = 0; - unsigned int req_cnt = cnt; - - if (!cnt) { - pvr2_trace(PVR2_TRACE_TRAP, - "/*---TRACE_READ---*/ pvr2_ioread_read id=%p" - " ZERO Request? Returning zero.",cp); - return 0; - } - - stat = pvr2_ioread_avail(cp); - if (stat < 0) return stat; - - cp->stream_running = !0; - - mutex_lock(&cp->mutex); do { - - // Suck data out of the buffers and copy to the user - copied_cnt = 0; - if (!buf) cnt = 0; - while (1) { - if (!pvr2_ioread_get_buffer(cp)) { - ret = -EIO; - break; - } - - if (!cnt) break; - - if (cp->sync_state == 2) { - // We're repeating the sync key data into - // the stream. - src = cp->sync_key_ptr + cp->sync_buf_offs; - bcnt = cp->sync_key_len - cp->sync_buf_offs; - } else { - // Normal buffer copy - src = cp->c_data_ptr + cp->c_data_offs; - bcnt = cp->c_data_len - cp->c_data_offs; - } - - if (!bcnt) break; - - // Don't run past user's buffer - if (bcnt > cnt) bcnt = cnt; - - if (copy_to_user(buf,src,bcnt)) { - // User supplied a bad pointer? - // Give up - this *will* cause data - // to be lost. - ret = -EFAULT; - break; - } - cnt -= bcnt; - buf += bcnt; - copied_cnt += bcnt; - - if (cp->sync_state == 2) { - // Update offset inside sync key that we're - // repeating back out. - cp->sync_buf_offs += bcnt; - if (cp->sync_buf_offs >= cp->sync_key_len) { - // Consumed entire key; switch mode - // to normal. - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/" - " sync_state <== 0"); - cp->sync_state = 0; - } - } else { - // Update buffer offset. - cp->c_data_offs += bcnt; - } - } - - } while (0); mutex_unlock(&cp->mutex); - - if (!ret) { - if (copied_cnt) { - // If anything was copied, return that count - ret = copied_cnt; - } else { - // Nothing copied; suggest to caller that another - // attempt should be tried again later - ret = -EAGAIN; - } - } - - pvr2_trace(PVR2_TRACE_DATA_FLOW, - "/*---TRACE_READ---*/ pvr2_ioread_read" - " id=%p request=%d result=%d", - cp,req_cnt,ret); - return ret; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.h b/drivers/media/video/pvrusb2/pvrusb2-ioread.h deleted file mode 100644 index 1d362f833..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_IOREAD_H -#define __PVRUSB2_IOREAD_H - -#include "pvrusb2-io.h" - -struct pvr2_ioread; - -struct pvr2_ioread *pvr2_ioread_create(void); -void pvr2_ioread_destroy(struct pvr2_ioread *); -int pvr2_ioread_setup(struct pvr2_ioread *,struct pvr2_stream *); -struct pvr2_stream *pvr2_ioread_get_stream(struct pvr2_ioread *); -void pvr2_ioread_set_sync_key(struct pvr2_ioread *, - const char *sync_key_ptr, - unsigned int sync_key_len); -int pvr2_ioread_set_enabled(struct pvr2_ioread *,int fl); -int pvr2_ioread_read(struct pvr2_ioread *,void __user *buf,unsigned int cnt); -int pvr2_ioread_avail(struct pvr2_ioread *); - -#endif /* __PVRUSB2_IOREAD_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c deleted file mode 100644 index e976c484c..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pvrusb2-hdw.h" -#include "pvrusb2-context.h" -#include "pvrusb2-debug.h" -#include "pvrusb2-v4l2.h" -#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS -#include "pvrusb2-sysfs.h" -#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ - -#define DRIVER_AUTHOR "Mike Isely " -#define DRIVER_DESC "Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner" -#define DRIVER_VERSION "V4L in-tree version" - -#define DEFAULT_DEBUG_MASK (PVR2_TRACE_ERROR_LEGS| \ - PVR2_TRACE_INFO| \ - PVR2_TRACE_TOLERANCE| \ - PVR2_TRACE_TRAP| \ - 0) - -int pvrusb2_debug = DEFAULT_DEBUG_MASK; - -module_param_named(debug,pvrusb2_debug,int,S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(debug, "Debug trace mask"); - -#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS -static struct pvr2_sysfs_class *class_ptr = NULL; -#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ - -static void pvr_setup_attach(struct pvr2_context *pvr) -{ - /* Create association with v4l layer */ - pvr2_v4l2_create(pvr); -#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS - pvr2_sysfs_create(pvr,class_ptr); -#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ -} - -static int pvr_probe(struct usb_interface *intf, - const struct usb_device_id *devid) -{ - struct pvr2_context *pvr; - - /* Create underlying hardware interface */ - pvr = pvr2_context_create(intf,devid,pvr_setup_attach); - if (!pvr) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "Failed to create hdw handler"); - return -ENOMEM; - } - - pvr2_trace(PVR2_TRACE_INIT,"pvr_probe(pvr=%p)",pvr); - - usb_set_intfdata(intf, pvr); - - return 0; -} - -/* - * pvr_disconnect() - * - */ -static void pvr_disconnect(struct usb_interface *intf) -{ - struct pvr2_context *pvr = usb_get_intfdata(intf); - - pvr2_trace(PVR2_TRACE_INIT,"pvr_disconnect(pvr=%p) BEGIN",pvr); - - usb_set_intfdata (intf, NULL); - pvr2_context_disconnect(pvr); - - pvr2_trace(PVR2_TRACE_INIT,"pvr_disconnect(pvr=%p) DONE",pvr); - -} - -static struct usb_driver pvr_driver = { - .name = "pvrusb2", - .id_table = pvr2_device_table, - .probe = pvr_probe, - .disconnect = pvr_disconnect -}; - -/* - * pvr_init() / pvr_exit() - * - * This code is run to initialize/exit the driver. - * - */ -static int __init pvr_init(void) -{ - int ret; - - pvr2_trace(PVR2_TRACE_INIT,"pvr_init"); - -#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS - class_ptr = pvr2_sysfs_class_create(); -#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ - - ret = usb_register(&pvr_driver); - - if (ret == 0) - info(DRIVER_DESC " : " DRIVER_VERSION); - if (pvrusb2_debug) info("Debug mask is %d (0x%x)", - pvrusb2_debug,pvrusb2_debug); - - return ret; -} - -static void __exit pvr_exit(void) -{ - - pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); - -#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS - pvr2_sysfs_class_destroy(class_ptr); -#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ - - usb_deregister(&pvr_driver); -} - -module_init(pvr_init); -module_exit(pvr_exit); - -/* Mike Isely 11-Mar-2006: See pvrusb2-hdw.c for - MODULE_DEVICE_TABLE(). We have to declare that attribute there - because that's where the device table actually is now and it seems - that certain gcc configurations get angry if MODULE_DEVICE_TABLE() - is used on what ends up being an external symbol. */ -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); -MODULE_LICENSE("GPL"); - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c deleted file mode 100644 index f95c598ff..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 "pvrusb2-std.h" -#include "pvrusb2-debug.h" -#include -#include - -struct std_name { - const char *name; - v4l2_std_id id; -}; - - -#define CSTD_PAL \ - (V4L2_STD_PAL_B| \ - V4L2_STD_PAL_B1| \ - V4L2_STD_PAL_G| \ - V4L2_STD_PAL_H| \ - V4L2_STD_PAL_I| \ - V4L2_STD_PAL_D| \ - V4L2_STD_PAL_D1| \ - V4L2_STD_PAL_K| \ - V4L2_STD_PAL_M| \ - V4L2_STD_PAL_N| \ - V4L2_STD_PAL_Nc| \ - V4L2_STD_PAL_60) - -#define CSTD_NTSC \ - (V4L2_STD_NTSC_M| \ - V4L2_STD_NTSC_M_JP| \ - V4L2_STD_NTSC_M_KR| \ - V4L2_STD_NTSC_443) - -#define CSTD_SECAM \ - (V4L2_STD_SECAM_B| \ - V4L2_STD_SECAM_D| \ - V4L2_STD_SECAM_G| \ - V4L2_STD_SECAM_H| \ - V4L2_STD_SECAM_K| \ - V4L2_STD_SECAM_K1| \ - V4L2_STD_SECAM_L| \ - V4L2_STD_SECAM_LC) - -#define TSTD_B (V4L2_STD_PAL_B|V4L2_STD_SECAM_B) -#define TSTD_B1 (V4L2_STD_PAL_B1) -#define TSTD_D (V4L2_STD_PAL_D|V4L2_STD_SECAM_D) -#define TSTD_D1 (V4L2_STD_PAL_D1) -#define TSTD_G (V4L2_STD_PAL_G|V4L2_STD_SECAM_G) -#define TSTD_H (V4L2_STD_PAL_H|V4L2_STD_SECAM_H) -#define TSTD_I (V4L2_STD_PAL_I) -#define TSTD_K (V4L2_STD_PAL_K|V4L2_STD_SECAM_K) -#define TSTD_K1 (V4L2_STD_SECAM_K1) -#define TSTD_L (V4L2_STD_SECAM_L) -#define TSTD_M (V4L2_STD_PAL_M|V4L2_STD_NTSC_M) -#define TSTD_N (V4L2_STD_PAL_N) -#define TSTD_Nc (V4L2_STD_PAL_Nc) -#define TSTD_60 (V4L2_STD_PAL_60) - -#define CSTD_ALL (CSTD_PAL|CSTD_NTSC|CSTD_SECAM) - -/* Mapping of standard bits to color system */ -const static struct std_name std_groups[] = { - {"PAL",CSTD_PAL}, - {"NTSC",CSTD_NTSC}, - {"SECAM",CSTD_SECAM}, -}; - -/* Mapping of standard bits to modulation system */ -const static struct std_name std_items[] = { - {"B",TSTD_B}, - {"B1",TSTD_B1}, - {"D",TSTD_D}, - {"D1",TSTD_D1}, - {"G",TSTD_G}, - {"H",TSTD_H}, - {"I",TSTD_I}, - {"K",TSTD_K}, - {"K1",TSTD_K1}, - {"L",TSTD_L}, - {"LC",V4L2_STD_SECAM_LC}, - {"M",TSTD_M}, - {"Mj",V4L2_STD_NTSC_M_JP}, - {"443",V4L2_STD_NTSC_443}, - {"Mk",V4L2_STD_NTSC_M_KR}, - {"N",TSTD_N}, - {"Nc",TSTD_Nc}, - {"60",TSTD_60}, -}; - - -// Search an array of std_name structures and return a pointer to the -// element with the matching name. -static const struct std_name *find_std_name(const struct std_name *arrPtr, - unsigned int arrSize, - const char *bufPtr, - unsigned int bufSize) -{ - unsigned int idx; - const struct std_name *p; - for (idx = 0; idx < arrSize; idx++) { - p = arrPtr + idx; - if (strlen(p->name) != bufSize) continue; - if (!memcmp(bufPtr,p->name,bufSize)) return p; - } - return NULL; -} - - -int pvr2_std_str_to_id(v4l2_std_id *idPtr,const char *bufPtr, - unsigned int bufSize) -{ - v4l2_std_id id = 0; - v4l2_std_id cmsk = 0; - v4l2_std_id t; - int mMode = 0; - unsigned int cnt; - char ch; - const struct std_name *sp; - - while (bufSize) { - if (!mMode) { - cnt = 0; - while ((cnt < bufSize) && (bufPtr[cnt] != '-')) cnt++; - if (cnt >= bufSize) return 0; // No more characters - sp = find_std_name( - std_groups, - sizeof(std_groups)/sizeof(std_groups[0]), - bufPtr,cnt); - if (!sp) return 0; // Illegal color system name - cnt++; - bufPtr += cnt; - bufSize -= cnt; - mMode = !0; - cmsk = sp->id; - continue; - } - cnt = 0; - while (cnt < bufSize) { - ch = bufPtr[cnt]; - if (ch == ';') { - mMode = 0; - break; - } - if (ch == '/') break; - cnt++; - } - sp = find_std_name(std_items, - sizeof(std_items)/sizeof(std_items[0]), - bufPtr,cnt); - if (!sp) return 0; // Illegal modulation system ID - t = sp->id & cmsk; - if (!t) return 0; // Specific color + modulation system illegal - id |= t; - if (cnt < bufSize) cnt++; - bufPtr += cnt; - bufSize -= cnt; - } - - if (idPtr) *idPtr = id; - return !0; -} - - -unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize, - v4l2_std_id id) -{ - unsigned int idx1,idx2; - const struct std_name *ip,*gp; - int gfl,cfl; - unsigned int c1,c2; - cfl = 0; - c1 = 0; - for (idx1 = 0; - idx1 < sizeof(std_groups)/sizeof(std_groups[0]); - idx1++) { - gp = std_groups + idx1; - gfl = 0; - for (idx2 = 0; - idx2 < sizeof(std_items)/sizeof(std_items[0]); - idx2++) { - ip = std_items + idx2; - if (!(gp->id & ip->id & id)) continue; - if (!gfl) { - if (cfl) { - c2 = scnprintf(bufPtr,bufSize,";"); - c1 += c2; - bufSize -= c2; - bufPtr += c2; - } - cfl = !0; - c2 = scnprintf(bufPtr,bufSize, - "%s-",gp->name); - gfl = !0; - } else { - c2 = scnprintf(bufPtr,bufSize,"/"); - } - c1 += c2; - bufSize -= c2; - bufPtr += c2; - c2 = scnprintf(bufPtr,bufSize, - ip->name); - c1 += c2; - bufSize -= c2; - bufPtr += c2; - } - } - return c1; -} - - -// Template data for possible enumerated video standards. Here we group -// standards which share common frame rates and resolution. -static struct v4l2_standard generic_standards[] = { - { - .id = (TSTD_B|TSTD_B1| - TSTD_D|TSTD_D1| - TSTD_G| - TSTD_H| - TSTD_I| - TSTD_K|TSTD_K1| - TSTD_L| - V4L2_STD_SECAM_LC | - TSTD_N|TSTD_Nc), - .frameperiod = - { - .numerator = 1, - .denominator= 25 - }, - .framelines = 625, - .reserved = {0,0,0,0} - }, { - .id = (TSTD_M| - V4L2_STD_NTSC_M_JP| - V4L2_STD_NTSC_M_KR), - .frameperiod = - { - .numerator = 1001, - .denominator= 30000 - }, - .framelines = 525, - .reserved = {0,0,0,0} - }, { // This is a total wild guess - .id = (TSTD_60), - .frameperiod = - { - .numerator = 1001, - .denominator= 30000 - }, - .framelines = 525, - .reserved = {0,0,0,0} - }, { // This is total wild guess - .id = V4L2_STD_NTSC_443, - .frameperiod = - { - .numerator = 1001, - .denominator= 30000 - }, - .framelines = 525, - .reserved = {0,0,0,0} - } -}; - -#define generic_standards_cnt (sizeof(generic_standards)/sizeof(generic_standards[0])) - -static struct v4l2_standard *match_std(v4l2_std_id id) -{ - unsigned int idx; - for (idx = 0; idx < generic_standards_cnt; idx++) { - if (generic_standards[idx].id & id) { - return generic_standards + idx; - } - } - return NULL; -} - -static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id) -{ - struct v4l2_standard *template; - int idx; - unsigned int bcnt; - template = match_std(id); - if (!template) return 0; - idx = std->index; - memcpy(std,template,sizeof(*template)); - std->index = idx; - std->id = id; - bcnt = pvr2_std_id_to_str(std->name,sizeof(std->name)-1,id); - std->name[bcnt] = 0; - pvr2_trace(PVR2_TRACE_INIT,"Set up standard idx=%u name=%s", - std->index,std->name); - return !0; -} - -/* These are special cases of combined standards that we should enumerate - separately if the component pieces are present. */ -static v4l2_std_id std_mixes[] = { - V4L2_STD_PAL_B | V4L2_STD_PAL_G, - V4L2_STD_PAL_D | V4L2_STD_PAL_K, - V4L2_STD_SECAM_B | V4L2_STD_SECAM_G, - V4L2_STD_SECAM_D | V4L2_STD_SECAM_K, -}; - -struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, - v4l2_std_id id) -{ - unsigned int std_cnt = 0; - unsigned int idx,bcnt,idx2; - v4l2_std_id idmsk,cmsk,fmsk; - struct v4l2_standard *stddefs; - - if (pvrusb2_debug & PVR2_TRACE_INIT) { - char buf[50]; - bcnt = pvr2_std_id_to_str(buf,sizeof(buf),id); - pvr2_trace( - PVR2_TRACE_INIT,"Mapping standards mask=0x%x (%.*s)", - (int)id,bcnt,buf); - } - - *countptr = 0; - std_cnt = 0; - fmsk = 0; - for (idmsk = 1, cmsk = id; cmsk; idmsk <<= 1) { - if (!(idmsk & cmsk)) continue; - cmsk &= ~idmsk; - if (match_std(idmsk)) { - std_cnt++; - continue; - } - fmsk |= idmsk; - } - - for (idx2 = 0; idx2 < sizeof(std_mixes)/sizeof(std_mixes[0]); idx2++) { - if ((id & std_mixes[idx2]) == std_mixes[idx2]) std_cnt++; - } - - if (fmsk) { - char buf[50]; - bcnt = pvr2_std_id_to_str(buf,sizeof(buf),fmsk); - pvr2_trace( - PVR2_TRACE_ERROR_LEGS, - "WARNING:" - " Failed to classify the following standard(s): %.*s", - bcnt,buf); - } - - pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", - std_cnt); - if (!std_cnt) return NULL; // paranoia - - stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, - GFP_KERNEL); - memset(stddefs,0,sizeof(struct v4l2_standard) * std_cnt); - for (idx = 0; idx < std_cnt; idx++) stddefs[idx].index = idx; - - idx = 0; - - /* Enumerate potential special cases */ - for (idx2 = 0; ((idx2 < sizeof(std_mixes)/sizeof(std_mixes[0])) && - (idx < std_cnt)); idx2++) { - if (!(id & std_mixes[idx2])) continue; - if (pvr2_std_fill(stddefs+idx,std_mixes[idx2])) idx++; - } - /* Now enumerate individual pieces */ - for (idmsk = 1, cmsk = id; cmsk && (idx < std_cnt); idmsk <<= 1) { - if (!(idmsk & cmsk)) continue; - cmsk &= ~idmsk; - if (!pvr2_std_fill(stddefs+idx,idmsk)) continue; - idx++; - } - - *countptr = std_cnt; - return stddefs; -} - -v4l2_std_id pvr2_std_get_usable(void) -{ - return CSTD_ALL; -} - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.h b/drivers/media/video/pvrusb2/pvrusb2-std.h deleted file mode 100644 index 07c399375..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-std.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_STD_H -#define __PVRUSB2_STD_H - -#include - -// Convert string describing one or more video standards into a mask of V4L -// standard bits. Return true if conversion succeeds otherwise return -// false. String is expected to be of the form: C1-x/y;C2-a/b where C1 and -// C2 are color system names (e.g. "PAL", "NTSC") and x, y, a, and b are -// modulation schemes (e.g. "M", "B", "G", etc). -int pvr2_std_str_to_id(v4l2_std_id *idPtr,const char *bufPtr, - unsigned int bufSize); - -// Convert any arbitrary set of video standard bits into an unambiguous -// readable string. Return value is the number of bytes consumed in the -// buffer. The formatted string is of a form that can be parsed by our -// sibling std_std_to_id() function. -unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize, - v4l2_std_id id); - -// Create an array of suitable v4l2_standard structures given a bit mask of -// video standards to support. The array is allocated from the heap, and -// the number of elements is returned in the first argument. -struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, - v4l2_std_id id); - -// Return mask of which video standard bits are valid -v4l2_std_id pvr2_std_get_usable(void); - -#endif /* __PVRUSB2_STD_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c deleted file mode 100644 index 38e9222dc..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ /dev/null @@ -1,925 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include "pvrusb2-sysfs.h" -#include "pvrusb2-hdw.h" -#include "pvrusb2-debug.h" -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC -#include "pvrusb2-debugifc.h" -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - -#define pvr2_sysfs_trace(...) pvr2_trace(PVR2_TRACE_SYSFS,__VA_ARGS__) - -struct pvr2_sysfs { - struct pvr2_channel channel; - struct class_device *class_dev; -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC - struct pvr2_sysfs_debugifc *debugifc; -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - struct pvr2_sysfs_ctl_item *item_first; - struct pvr2_sysfs_ctl_item *item_last; - struct sysfs_ops kops; - struct kobj_type ktype; - struct class_device_attribute attr_v4l_minor_number; - struct class_device_attribute attr_unit_number; - int v4l_minor_number_created_ok; - int unit_number_created_ok; -}; - -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC -struct pvr2_sysfs_debugifc { - struct class_device_attribute attr_debugcmd; - struct class_device_attribute attr_debuginfo; - int debugcmd_created_ok; - int debuginfo_created_ok; -}; -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - -struct pvr2_sysfs_ctl_item { - struct class_device_attribute attr_name; - struct class_device_attribute attr_type; - struct class_device_attribute attr_min; - struct class_device_attribute attr_max; - struct class_device_attribute attr_enum; - struct class_device_attribute attr_bits; - struct class_device_attribute attr_val; - struct class_device_attribute attr_custom; - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *chptr; - struct pvr2_sysfs_ctl_item *item_next; - struct attribute *attr_gen[7]; - struct attribute_group grp; - int created_ok; - char name[80]; -}; - -struct pvr2_sysfs_class { - struct class class; -}; - -static ssize_t show_name(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - const char *name; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - - name = pvr2_ctrl_get_desc(cptr); - pvr2_sysfs_trace("pvr2_sysfs(%p) show_name(cid=%d) is %s",sfp,id,name); - - if (!name) return -EINVAL; - - return scnprintf(buf,PAGE_SIZE,"%s\n",name); -} - -static ssize_t show_type(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - const char *name; - enum pvr2_ctl_type tp; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - - tp = pvr2_ctrl_get_type(cptr); - switch (tp) { - case pvr2_ctl_int: name = "integer"; break; - case pvr2_ctl_enum: name = "enum"; break; - case pvr2_ctl_bitmask: name = "bitmask"; break; - case pvr2_ctl_bool: name = "boolean"; break; - default: name = "?"; break; - } - pvr2_sysfs_trace("pvr2_sysfs(%p) show_type(cid=%d) is %s",sfp,id,name); - - if (!name) return -EINVAL; - - return scnprintf(buf,PAGE_SIZE,"%s\n",name); -} - -static ssize_t show_min(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - long val; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - val = pvr2_ctrl_get_min(cptr); - - pvr2_sysfs_trace("pvr2_sysfs(%p) show_min(cid=%d) is %ld",sfp,id,val); - - return scnprintf(buf,PAGE_SIZE,"%ld\n",val); -} - -static ssize_t show_max(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - long val; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - val = pvr2_ctrl_get_max(cptr); - - pvr2_sysfs_trace("pvr2_sysfs(%p) show_max(cid=%d) is %ld",sfp,id,val); - - return scnprintf(buf,PAGE_SIZE,"%ld\n",val); -} - -static ssize_t show_val_norm(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - int val,ret; - unsigned int cnt = 0; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - - ret = pvr2_ctrl_get_value(cptr,&val); - if (ret < 0) return ret; - - ret = pvr2_ctrl_value_to_sym(cptr,~0,val, - buf,PAGE_SIZE-1,&cnt); - - pvr2_sysfs_trace("pvr2_sysfs(%p) show_val_norm(cid=%d) is %.*s (%d)", - sfp,id,cnt,buf,val); - buf[cnt] = '\n'; - return cnt+1; -} - -static ssize_t show_val_custom(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - int val,ret; - unsigned int cnt = 0; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - - ret = pvr2_ctrl_get_value(cptr,&val); - if (ret < 0) return ret; - - ret = pvr2_ctrl_custom_value_to_sym(cptr,~0,val, - buf,PAGE_SIZE-1,&cnt); - - pvr2_sysfs_trace("pvr2_sysfs(%p) show_val_custom(cid=%d) is %.*s (%d)", - sfp,id,cnt,buf,val); - buf[cnt] = '\n'; - return cnt+1; -} - -static ssize_t show_enum(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - long val; - unsigned int bcnt,ccnt,ecnt; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - ecnt = pvr2_ctrl_get_cnt(cptr); - bcnt = 0; - for (val = 0; val < ecnt; val++) { - pvr2_ctrl_get_valname(cptr,val,buf+bcnt,PAGE_SIZE-bcnt,&ccnt); - if (!ccnt) continue; - bcnt += ccnt; - if (bcnt >= PAGE_SIZE) break; - buf[bcnt] = '\n'; - bcnt++; - } - pvr2_sysfs_trace("pvr2_sysfs(%p) show_enum(cid=%d)",sfp,id); - return bcnt; -} - -static ssize_t show_bits(int id,struct class_device *class_dev,char *buf) -{ - struct pvr2_ctrl *cptr; - struct pvr2_sysfs *sfp; - int valid_bits,msk; - unsigned int bcnt,ccnt; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (!cptr) return -EINVAL; - valid_bits = pvr2_ctrl_get_mask(cptr); - bcnt = 0; - for (msk = 1; valid_bits; msk <<= 1) { - if (!(msk & valid_bits)) continue; - valid_bits &= ~msk; - pvr2_ctrl_get_valname(cptr,msk,buf+bcnt,PAGE_SIZE-bcnt,&ccnt); - bcnt += ccnt; - if (bcnt >= PAGE_SIZE) break; - buf[bcnt] = '\n'; - bcnt++; - } - pvr2_sysfs_trace("pvr2_sysfs(%p) show_bits(cid=%d)",sfp,id); - return bcnt; -} - -static int store_val_any(int id,int customfl,struct pvr2_sysfs *sfp, - const char *buf,unsigned int count) -{ - struct pvr2_ctrl *cptr; - int ret; - int mask,val; - - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,id); - if (customfl) { - ret = pvr2_ctrl_custom_sym_to_value(cptr,buf,count,&mask,&val); - } else { - ret = pvr2_ctrl_sym_to_value(cptr,buf,count,&mask,&val); - } - if (ret < 0) return ret; - ret = pvr2_ctrl_set_mask_value(cptr,mask,val); - pvr2_hdw_commit_ctl(sfp->channel.hdw); - return ret; -} - -static ssize_t store_val_norm(int id,struct class_device *class_dev, - const char *buf,size_t count) -{ - struct pvr2_sysfs *sfp; - int ret; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - ret = store_val_any(id,0,sfp,buf,count); - if (!ret) ret = count; - return ret; -} - -static ssize_t store_val_custom(int id,struct class_device *class_dev, - const char *buf,size_t count) -{ - struct pvr2_sysfs *sfp; - int ret; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - ret = store_val_any(id,1,sfp,buf,count); - if (!ret) ret = count; - return ret; -} - -/* - Mike Isely 30-April-2005 - - This next batch of horrible preprocessor hackery is needed because the - kernel's class_device_attribute mechanism fails to pass the actual - attribute through to the show / store functions, which means we have no - way to package up any attribute-specific parameters, like for example the - control id. So we work around this brain-damage by encoding the control - id into the show / store functions themselves and pick the function based - on the control id we're setting up. These macros try to ease the pain. - Yuck. -*/ - -#define CREATE_SHOW_INSTANCE(sf_name,ctl_id) \ -static ssize_t sf_name##_##ctl_id(struct class_device *class_dev,char *buf) \ -{ return sf_name(ctl_id,class_dev,buf); } - -#define CREATE_STORE_INSTANCE(sf_name,ctl_id) \ -static ssize_t sf_name##_##ctl_id(struct class_device *class_dev,const char *buf,size_t count) \ -{ return sf_name(ctl_id,class_dev,buf,count); } - -#define CREATE_BATCH(ctl_id) \ -CREATE_SHOW_INSTANCE(show_name,ctl_id) \ -CREATE_SHOW_INSTANCE(show_type,ctl_id) \ -CREATE_SHOW_INSTANCE(show_min,ctl_id) \ -CREATE_SHOW_INSTANCE(show_max,ctl_id) \ -CREATE_SHOW_INSTANCE(show_val_norm,ctl_id) \ -CREATE_SHOW_INSTANCE(show_val_custom,ctl_id) \ -CREATE_SHOW_INSTANCE(show_enum,ctl_id) \ -CREATE_SHOW_INSTANCE(show_bits,ctl_id) \ -CREATE_STORE_INSTANCE(store_val_norm,ctl_id) \ -CREATE_STORE_INSTANCE(store_val_custom,ctl_id) \ - -CREATE_BATCH(0) -CREATE_BATCH(1) -CREATE_BATCH(2) -CREATE_BATCH(3) -CREATE_BATCH(4) -CREATE_BATCH(5) -CREATE_BATCH(6) -CREATE_BATCH(7) -CREATE_BATCH(8) -CREATE_BATCH(9) -CREATE_BATCH(10) -CREATE_BATCH(11) -CREATE_BATCH(12) -CREATE_BATCH(13) -CREATE_BATCH(14) -CREATE_BATCH(15) -CREATE_BATCH(16) -CREATE_BATCH(17) -CREATE_BATCH(18) -CREATE_BATCH(19) -CREATE_BATCH(20) -CREATE_BATCH(21) -CREATE_BATCH(22) -CREATE_BATCH(23) -CREATE_BATCH(24) -CREATE_BATCH(25) -CREATE_BATCH(26) -CREATE_BATCH(27) -CREATE_BATCH(28) -CREATE_BATCH(29) -CREATE_BATCH(30) -CREATE_BATCH(31) -CREATE_BATCH(32) -CREATE_BATCH(33) -CREATE_BATCH(34) -CREATE_BATCH(35) -CREATE_BATCH(36) -CREATE_BATCH(37) -CREATE_BATCH(38) -CREATE_BATCH(39) -CREATE_BATCH(40) -CREATE_BATCH(41) -CREATE_BATCH(42) -CREATE_BATCH(43) -CREATE_BATCH(44) -CREATE_BATCH(45) -CREATE_BATCH(46) -CREATE_BATCH(47) -CREATE_BATCH(48) -CREATE_BATCH(49) -CREATE_BATCH(50) -CREATE_BATCH(51) -CREATE_BATCH(52) -CREATE_BATCH(53) -CREATE_BATCH(54) -CREATE_BATCH(55) -CREATE_BATCH(56) -CREATE_BATCH(57) -CREATE_BATCH(58) -CREATE_BATCH(59) - -struct pvr2_sysfs_func_set { - ssize_t (*show_name)(struct class_device *,char *); - ssize_t (*show_type)(struct class_device *,char *); - ssize_t (*show_min)(struct class_device *,char *); - ssize_t (*show_max)(struct class_device *,char *); - ssize_t (*show_enum)(struct class_device *,char *); - ssize_t (*show_bits)(struct class_device *,char *); - ssize_t (*show_val_norm)(struct class_device *,char *); - ssize_t (*store_val_norm)(struct class_device *, - const char *,size_t); - ssize_t (*show_val_custom)(struct class_device *,char *); - ssize_t (*store_val_custom)(struct class_device *, - const char *,size_t); -}; - -#define INIT_BATCH(ctl_id) \ -[ctl_id] = { \ - .show_name = show_name_##ctl_id, \ - .show_type = show_type_##ctl_id, \ - .show_min = show_min_##ctl_id, \ - .show_max = show_max_##ctl_id, \ - .show_enum = show_enum_##ctl_id, \ - .show_bits = show_bits_##ctl_id, \ - .show_val_norm = show_val_norm_##ctl_id, \ - .store_val_norm = store_val_norm_##ctl_id, \ - .show_val_custom = show_val_custom_##ctl_id, \ - .store_val_custom = store_val_custom_##ctl_id, \ -} \ - -static struct pvr2_sysfs_func_set funcs[] = { - INIT_BATCH(0), - INIT_BATCH(1), - INIT_BATCH(2), - INIT_BATCH(3), - INIT_BATCH(4), - INIT_BATCH(5), - INIT_BATCH(6), - INIT_BATCH(7), - INIT_BATCH(8), - INIT_BATCH(9), - INIT_BATCH(10), - INIT_BATCH(11), - INIT_BATCH(12), - INIT_BATCH(13), - INIT_BATCH(14), - INIT_BATCH(15), - INIT_BATCH(16), - INIT_BATCH(17), - INIT_BATCH(18), - INIT_BATCH(19), - INIT_BATCH(20), - INIT_BATCH(21), - INIT_BATCH(22), - INIT_BATCH(23), - INIT_BATCH(24), - INIT_BATCH(25), - INIT_BATCH(26), - INIT_BATCH(27), - INIT_BATCH(28), - INIT_BATCH(29), - INIT_BATCH(30), - INIT_BATCH(31), - INIT_BATCH(32), - INIT_BATCH(33), - INIT_BATCH(34), - INIT_BATCH(35), - INIT_BATCH(36), - INIT_BATCH(37), - INIT_BATCH(38), - INIT_BATCH(39), - INIT_BATCH(40), - INIT_BATCH(41), - INIT_BATCH(42), - INIT_BATCH(43), - INIT_BATCH(44), - INIT_BATCH(45), - INIT_BATCH(46), - INIT_BATCH(47), - INIT_BATCH(48), - INIT_BATCH(49), - INIT_BATCH(50), - INIT_BATCH(51), - INIT_BATCH(52), - INIT_BATCH(53), - INIT_BATCH(54), - INIT_BATCH(55), - INIT_BATCH(56), - INIT_BATCH(57), - INIT_BATCH(58), - INIT_BATCH(59), -}; - - -static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id) -{ - struct pvr2_sysfs_ctl_item *cip; - struct pvr2_sysfs_func_set *fp; - struct pvr2_ctrl *cptr; - unsigned int cnt,acnt; - int ret; - - if ((ctl_id < 0) || (ctl_id >= (sizeof(funcs)/sizeof(funcs[0])))) { - return; - } - - fp = funcs + ctl_id; - cptr = pvr2_hdw_get_ctrl_by_index(sfp->channel.hdw,ctl_id); - if (!cptr) return; - - cip = kmalloc(sizeof(*cip),GFP_KERNEL); - if (!cip) return; - memset(cip,0,sizeof(*cip)); - pvr2_sysfs_trace("Creating pvr2_sysfs_ctl_item id=%p",cip); - - cip->cptr = cptr; - - cip->chptr = sfp; - cip->item_next = NULL; - if (sfp->item_last) { - sfp->item_last->item_next = cip; - } else { - sfp->item_first = cip; - } - sfp->item_last = cip; - - cip->attr_name.attr.owner = THIS_MODULE; - cip->attr_name.attr.name = "name"; - cip->attr_name.attr.mode = S_IRUGO; - cip->attr_name.show = fp->show_name; - - cip->attr_type.attr.owner = THIS_MODULE; - cip->attr_type.attr.name = "type"; - cip->attr_type.attr.mode = S_IRUGO; - cip->attr_type.show = fp->show_type; - - cip->attr_min.attr.owner = THIS_MODULE; - cip->attr_min.attr.name = "min_val"; - cip->attr_min.attr.mode = S_IRUGO; - cip->attr_min.show = fp->show_min; - - cip->attr_max.attr.owner = THIS_MODULE; - cip->attr_max.attr.name = "max_val"; - cip->attr_max.attr.mode = S_IRUGO; - cip->attr_max.show = fp->show_max; - - cip->attr_val.attr.owner = THIS_MODULE; - cip->attr_val.attr.name = "cur_val"; - cip->attr_val.attr.mode = S_IRUGO; - - cip->attr_custom.attr.owner = THIS_MODULE; - cip->attr_custom.attr.name = "custom_val"; - cip->attr_custom.attr.mode = S_IRUGO; - - cip->attr_enum.attr.owner = THIS_MODULE; - cip->attr_enum.attr.name = "enum_val"; - cip->attr_enum.attr.mode = S_IRUGO; - cip->attr_enum.show = fp->show_enum; - - cip->attr_bits.attr.owner = THIS_MODULE; - cip->attr_bits.attr.name = "bit_val"; - cip->attr_bits.attr.mode = S_IRUGO; - cip->attr_bits.show = fp->show_bits; - - if (pvr2_ctrl_is_writable(cptr)) { - cip->attr_val.attr.mode |= S_IWUSR|S_IWGRP; - cip->attr_custom.attr.mode |= S_IWUSR|S_IWGRP; - } - - acnt = 0; - cip->attr_gen[acnt++] = &cip->attr_name.attr; - cip->attr_gen[acnt++] = &cip->attr_type.attr; - cip->attr_gen[acnt++] = &cip->attr_val.attr; - cip->attr_val.show = fp->show_val_norm; - cip->attr_val.store = fp->store_val_norm; - if (pvr2_ctrl_has_custom_symbols(cptr)) { - cip->attr_gen[acnt++] = &cip->attr_custom.attr; - cip->attr_custom.show = fp->show_val_custom; - cip->attr_custom.store = fp->store_val_custom; - } - switch (pvr2_ctrl_get_type(cptr)) { - case pvr2_ctl_enum: - // Control is an enumeration - cip->attr_gen[acnt++] = &cip->attr_enum.attr; - break; - case pvr2_ctl_int: - // Control is an integer - cip->attr_gen[acnt++] = &cip->attr_min.attr; - cip->attr_gen[acnt++] = &cip->attr_max.attr; - break; - case pvr2_ctl_bitmask: - // Control is an bitmask - cip->attr_gen[acnt++] = &cip->attr_bits.attr; - break; - default: break; - } - - cnt = scnprintf(cip->name,sizeof(cip->name)-1,"ctl_%s", - pvr2_ctrl_get_name(cptr)); - cip->name[cnt] = 0; - cip->grp.name = cip->name; - cip->grp.attrs = cip->attr_gen; - - ret = sysfs_create_group(&sfp->class_dev->kobj,&cip->grp); - if (ret) { - printk(KERN_WARNING "%s: sysfs_create_group error: %d\n", - __FUNCTION__, ret); - return; - } - cip->created_ok = !0; -} - -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC -static ssize_t debuginfo_show(struct class_device *,char *); -static ssize_t debugcmd_show(struct class_device *,char *); -static ssize_t debugcmd_store(struct class_device *,const char *,size_t count); - -static void pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp) -{ - struct pvr2_sysfs_debugifc *dip; - int ret; - - dip = kmalloc(sizeof(*dip),GFP_KERNEL); - if (!dip) return; - memset(dip,0,sizeof(*dip)); - dip->attr_debugcmd.attr.owner = THIS_MODULE; - dip->attr_debugcmd.attr.name = "debugcmd"; - dip->attr_debugcmd.attr.mode = S_IRUGO|S_IWUSR|S_IWGRP; - dip->attr_debugcmd.show = debugcmd_show; - dip->attr_debugcmd.store = debugcmd_store; - dip->attr_debuginfo.attr.owner = THIS_MODULE; - dip->attr_debuginfo.attr.name = "debuginfo"; - dip->attr_debuginfo.attr.mode = S_IRUGO; - dip->attr_debuginfo.show = debuginfo_show; - sfp->debugifc = dip; - ret = class_device_create_file(sfp->class_dev,&dip->attr_debugcmd); - if (ret < 0) { - printk(KERN_WARNING "%s: class_device_create_file error: %d\n", - __FUNCTION__, ret); - } else { - dip->debugcmd_created_ok = !0; - } - ret = class_device_create_file(sfp->class_dev,&dip->attr_debuginfo); - if (ret < 0) { - printk(KERN_WARNING "%s: class_device_create_file error: %d\n", - __FUNCTION__, ret); - } else { - dip->debuginfo_created_ok = !0; - } -} - - -static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp) -{ - if (!sfp->debugifc) return; - if (sfp->debugifc->debuginfo_created_ok) { - class_device_remove_file(sfp->class_dev, - &sfp->debugifc->attr_debuginfo); - } - if (sfp->debugifc->debugcmd_created_ok) { - class_device_remove_file(sfp->class_dev, - &sfp->debugifc->attr_debugcmd); - } - kfree(sfp->debugifc); - sfp->debugifc = NULL; -} -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - - -static void pvr2_sysfs_add_controls(struct pvr2_sysfs *sfp) -{ - unsigned int idx,cnt; - cnt = pvr2_hdw_get_ctrl_count(sfp->channel.hdw); - for (idx = 0; idx < cnt; idx++) { - pvr2_sysfs_add_control(sfp,idx); - } -} - - -static void pvr2_sysfs_tear_down_controls(struct pvr2_sysfs *sfp) -{ - struct pvr2_sysfs_ctl_item *cip1,*cip2; - for (cip1 = sfp->item_first; cip1; cip1 = cip2) { - cip2 = cip1->item_next; - if (cip1->created_ok) { - sysfs_remove_group(&sfp->class_dev->kobj,&cip1->grp); - } - pvr2_sysfs_trace("Destroying pvr2_sysfs_ctl_item id=%p",cip1); - kfree(cip1); - } -} - - -static void pvr2_sysfs_class_release(struct class *class) -{ - struct pvr2_sysfs_class *clp; - clp = container_of(class,struct pvr2_sysfs_class,class); - pvr2_sysfs_trace("Destroying pvr2_sysfs_class id=%p",clp); - kfree(clp); -} - - -static void pvr2_sysfs_release(struct class_device *class_dev) -{ - pvr2_sysfs_trace("Releasing class_dev id=%p",class_dev); - kfree(class_dev); -} - - -static void class_dev_destroy(struct pvr2_sysfs *sfp) -{ - if (!sfp->class_dev) return; -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC - pvr2_sysfs_tear_down_debugifc(sfp); -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - pvr2_sysfs_tear_down_controls(sfp); - if (sfp->v4l_minor_number_created_ok) { - class_device_remove_file(sfp->class_dev, - &sfp->attr_v4l_minor_number); - } - if (sfp->unit_number_created_ok) { - class_device_remove_file(sfp->class_dev, - &sfp->attr_unit_number); - } - pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); - sfp->class_dev->class_data = NULL; - class_device_unregister(sfp->class_dev); - sfp->class_dev = NULL; -} - - -static ssize_t v4l_minor_number_show(struct class_device *class_dev,char *buf) -{ - struct pvr2_sysfs *sfp; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - return scnprintf(buf,PAGE_SIZE,"%d\n", - pvr2_hdw_v4l_get_minor_number(sfp->channel.hdw)); -} - - -static ssize_t unit_number_show(struct class_device *class_dev,char *buf) -{ - struct pvr2_sysfs *sfp; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - return scnprintf(buf,PAGE_SIZE,"%d\n", - pvr2_hdw_get_unit_number(sfp->channel.hdw)); -} - - -static void class_dev_create(struct pvr2_sysfs *sfp, - struct pvr2_sysfs_class *class_ptr) -{ - struct usb_device *usb_dev; - struct class_device *class_dev; - int ret; - - usb_dev = pvr2_hdw_get_dev(sfp->channel.hdw); - if (!usb_dev) return; - class_dev = kmalloc(sizeof(*class_dev),GFP_KERNEL); - if (!class_dev) return; - memset(class_dev,0,sizeof(*class_dev)); - - pvr2_sysfs_trace("Creating class_dev id=%p",class_dev); - - class_dev->class = &class_ptr->class; - if (pvr2_hdw_get_sn(sfp->channel.hdw)) { - snprintf(class_dev->class_id,BUS_ID_SIZE,"sn-%lu", - pvr2_hdw_get_sn(sfp->channel.hdw)); - } else if (pvr2_hdw_get_unit_number(sfp->channel.hdw) >= 0) { - snprintf(class_dev->class_id,BUS_ID_SIZE,"unit-%c", - pvr2_hdw_get_unit_number(sfp->channel.hdw) + 'a'); - } else { - kfree(class_dev); - return; - } - - class_dev->dev = &usb_dev->dev; - - sfp->class_dev = class_dev; - class_dev->class_data = sfp; - ret = class_device_register(class_dev); - if (ret) { - printk(KERN_ERR "%s: class_device_register failed\n", - __FUNCTION__); - kfree(class_dev); - return; - } - - sfp->attr_v4l_minor_number.attr.owner = THIS_MODULE; - sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; - sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; - sfp->attr_v4l_minor_number.show = v4l_minor_number_show; - sfp->attr_v4l_minor_number.store = NULL; - ret = class_device_create_file(sfp->class_dev, - &sfp->attr_v4l_minor_number); - if (ret < 0) { - printk(KERN_WARNING "%s: class_device_create_file error: %d\n", - __FUNCTION__, ret); - } else { - sfp->v4l_minor_number_created_ok = !0; - } - - sfp->attr_unit_number.attr.owner = THIS_MODULE; - sfp->attr_unit_number.attr.name = "unit_number"; - sfp->attr_unit_number.attr.mode = S_IRUGO; - sfp->attr_unit_number.show = unit_number_show; - sfp->attr_unit_number.store = NULL; - ret = class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); - if (ret < 0) { - printk(KERN_WARNING "%s: class_device_create_file error: %d\n", - __FUNCTION__, ret); - } else { - sfp->unit_number_created_ok = !0; - } - - pvr2_sysfs_add_controls(sfp); -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC - pvr2_sysfs_add_debugifc(sfp); -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ -} - - -static void pvr2_sysfs_internal_check(struct pvr2_channel *chp) -{ - struct pvr2_sysfs *sfp; - sfp = container_of(chp,struct pvr2_sysfs,channel); - if (!sfp->channel.mc_head->disconnect_flag) return; - pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_sysfs id=%p",sfp); - class_dev_destroy(sfp); - pvr2_channel_done(&sfp->channel); - kfree(sfp); -} - - -struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *mp, - struct pvr2_sysfs_class *class_ptr) -{ - struct pvr2_sysfs *sfp; - sfp = kmalloc(sizeof(*sfp),GFP_KERNEL); - if (!sfp) return sfp; - memset(sfp,0,sizeof(*sfp)); - pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr2_sysfs id=%p",sfp); - pvr2_channel_init(&sfp->channel,mp); - sfp->channel.check_func = pvr2_sysfs_internal_check; - - class_dev_create(sfp,class_ptr); - return sfp; -} - - -static int pvr2_sysfs_hotplug(struct class_device *cd,char **envp, - int numenvp,char *buf,int size) -{ - /* Even though we don't do anything here, we still need this function - because sysfs will still try to call it. */ - return 0; -} - -struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) -{ - struct pvr2_sysfs_class *clp; - clp = kmalloc(sizeof(*clp),GFP_KERNEL); - if (!clp) return clp; - memset(clp,0,sizeof(*clp)); - pvr2_sysfs_trace("Creating pvr2_sysfs_class id=%p",clp); - clp->class.name = "pvrusb2"; - clp->class.class_release = pvr2_sysfs_class_release; - clp->class.release = pvr2_sysfs_release; - clp->class.uevent = pvr2_sysfs_hotplug; - if (class_register(&clp->class)) { - pvr2_sysfs_trace( - "Registration failed for pvr2_sysfs_class id=%p",clp); - kfree(clp); - clp = NULL; - } - return clp; -} - - -void pvr2_sysfs_class_destroy(struct pvr2_sysfs_class *clp) -{ - class_unregister(&clp->class); -} - - -#ifdef CONFIG_VIDEO_PVRUSB2_DEBUGIFC -static ssize_t debuginfo_show(struct class_device *class_dev,char *buf) -{ - struct pvr2_sysfs *sfp; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - pvr2_hdw_trigger_module_log(sfp->channel.hdw); - return pvr2_debugifc_print_info(sfp->channel.hdw,buf,PAGE_SIZE); -} - - -static ssize_t debugcmd_show(struct class_device *class_dev,char *buf) -{ - struct pvr2_sysfs *sfp; - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - return pvr2_debugifc_print_status(sfp->channel.hdw,buf,PAGE_SIZE); -} - - -static ssize_t debugcmd_store(struct class_device *class_dev, - const char *buf,size_t count) -{ - struct pvr2_sysfs *sfp; - int ret; - - sfp = (struct pvr2_sysfs *)class_dev->class_data; - if (!sfp) return -EINVAL; - - ret = pvr2_debugifc_docmd(sfp->channel.hdw,buf,count); - if (ret < 0) return ret; - return count; -} -#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.h b/drivers/media/video/pvrusb2/pvrusb2-sysfs.h deleted file mode 100644 index ff9373b47..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_SYSFS_H -#define __PVRUSB2_SYSFS_H - -#include -#include -#include "pvrusb2-context.h" - -struct pvr2_sysfs; -struct pvr2_sysfs_class; - -struct pvr2_sysfs_class *pvr2_sysfs_class_create(void); -void pvr2_sysfs_class_destroy(struct pvr2_sysfs_class *); - -struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *, - struct pvr2_sysfs_class *); - -#endif /* __PVRUSB2_SYSFS_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/drivers/media/video/pvrusb2/pvrusb2-tuner.c deleted file mode 100644 index af9f246f8..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-tuner.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 "pvrusb2.h" -#include "pvrusb2-util.h" -#include "pvrusb2-tuner.h" -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include -#include -#include - -struct pvr2_tuner_handler { - struct pvr2_hdw *hdw; - struct pvr2_i2c_client *client; - struct pvr2_i2c_handler i2c_handler; - int type_update_fl; -}; - - -static void set_type(struct pvr2_tuner_handler *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - struct tuner_setup setup; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c tuner set_type(%d)",hdw->tuner_type); - if (((int)(hdw->tuner_type)) < 0) return; - - setup.addr = ADDR_UNSET; - setup.type = hdw->tuner_type; - setup.mode_mask = T_RADIO | T_ANALOG_TV; - /* We may really want mode_mask to be T_ANALOG_TV for now */ - pvr2_i2c_client_cmd(ctxt->client,TUNER_SET_TYPE_ADDR,&setup); - ctxt->type_update_fl = 0; -} - - -static int tuner_check(struct pvr2_tuner_handler *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - if (hdw->tuner_updated) ctxt->type_update_fl = !0; - return ctxt->type_update_fl != 0; -} - - -static void tuner_update(struct pvr2_tuner_handler *ctxt) -{ - if (ctxt->type_update_fl) set_type(ctxt); -} - - -static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) -{ - ctxt->client->handler = NULL; - kfree(ctxt); -} - - -static unsigned int pvr2_tuner_describe(struct pvr2_tuner_handler *ctxt,char *buf,unsigned int cnt) -{ - return scnprintf(buf,cnt,"handler: pvrusb2-tuner"); -} - - -const static struct pvr2_i2c_handler_functions tuner_funcs = { - .detach = (void (*)(void *))pvr2_tuner_detach, - .check = (int (*)(void *))tuner_check, - .update = (void (*)(void *))tuner_update, - .describe = (unsigned int (*)(void *,char *,unsigned int))pvr2_tuner_describe, -}; - - -int pvr2_i2c_tuner_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) -{ - struct pvr2_tuner_handler *ctxt; - if (cp->handler) return 0; - - ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); - if (!ctxt) return 0; - memset(ctxt,0,sizeof(*ctxt)); - - ctxt->i2c_handler.func_data = ctxt; - ctxt->i2c_handler.func_table = &tuner_funcs; - ctxt->type_update_fl = !0; - ctxt->client = cp; - ctxt->hdw = hdw; - cp->handler = &ctxt->i2c_handler; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x tuner handler set up", - cp->client->addr); - return !0; -} - - - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.h b/drivers/media/video/pvrusb2/pvrusb2-tuner.h deleted file mode 100644 index 556f12aa9..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-tuner.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_TUNER_H -#define __PVRUSB2_TUNER_H - -#include "pvrusb2-i2c-core.h" - -int pvr2_i2c_tuner_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); - -#endif /* __PVRUSB2_TUNER_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-util.h b/drivers/media/video/pvrusb2/pvrusb2-util.h deleted file mode 100644 index e53aee416..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-util.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_UTIL_H -#define __PVRUSB2_UTIL_H - -#define PVR2_DECOMPOSE_LE(t,i,d) \ - do { \ - (t)[i] = (d) & 0xff;\ - (t)[i+1] = ((d) >> 8) & 0xff;\ - (t)[i+2] = ((d) >> 16) & 0xff;\ - (t)[i+3] = ((d) >> 24) & 0xff;\ - } while(0) - -#define PVR2_DECOMPOSE_BE(t,i,d) \ - do { \ - (t)[i+3] = (d) & 0xff;\ - (t)[i+2] = ((d) >> 8) & 0xff;\ - (t)[i+1] = ((d) >> 16) & 0xff;\ - (t)[i] = ((d) >> 24) & 0xff;\ - } while(0) - -#define PVR2_COMPOSE_LE(t,i) \ - ((((u32)((t)[i+3])) << 24) | \ - (((u32)((t)[i+2])) << 16) | \ - (((u32)((t)[i+1])) << 8) | \ - ((u32)((t)[i]))) - -#define PVR2_COMPOSE_BE(t,i) \ - ((((u32)((t)[i])) << 24) | \ - (((u32)((t)[i+1])) << 16) | \ - (((u32)((t)[i+2])) << 8) | \ - ((u32)((t)[i+3]))) - - -#endif /* __PVRUSB2_UTIL_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c deleted file mode 100644 index 72f444cf3..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ /dev/null @@ -1,1087 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include "pvrusb2-context.h" -#include "pvrusb2-hdw.h" -#include "pvrusb2.h" -#include "pvrusb2-debug.h" -#include "pvrusb2-v4l2.h" -#include "pvrusb2-ioread.h" -#include -#include - -/* Mike Isely 23-Sep-2006 - This function is prototyped - * only for V4L1 but is implemented regardless of the V4L1 compatibility - * option state. V4L2 has no replacement for this and we need it. For now - * copy the prototype here so we can avoid the compiler warning. */ -extern struct video_device* video_devdata(struct file*); - -struct pvr2_v4l2_dev; -struct pvr2_v4l2_fh; -struct pvr2_v4l2; - - -struct pvr2_v4l2_dev { - struct pvr2_v4l2 *v4lp; - struct video_device *vdev; - struct pvr2_context_stream *stream; - enum pvr2_config config; -}; - -struct pvr2_v4l2_fh { - struct pvr2_channel channel; - struct pvr2_v4l2_dev *dev_info; - enum v4l2_priority prio; - struct pvr2_ioread *rhp; - struct file *file; - struct pvr2_v4l2 *vhead; - struct pvr2_v4l2_fh *vnext; - struct pvr2_v4l2_fh *vprev; - wait_queue_head_t wait_data; - int fw_mode_flag; -}; - -struct pvr2_v4l2 { - struct pvr2_channel channel; - struct pvr2_v4l2_fh *vfirst; - struct pvr2_v4l2_fh *vlast; - - struct v4l2_prio_state prio; - - /* streams */ - struct pvr2_v4l2_dev video_dev; -}; - -static int video_nr[PVR_NUM] = {[0 ... PVR_NUM-1] = -1}; -module_param_array(video_nr, int, NULL, 0444); -MODULE_PARM_DESC(video_nr, "Offset for device's minor"); - -static struct v4l2_capability pvr_capability ={ - .driver = "pvrusb2", - .card = "Hauppauge WinTV pvr-usb2", - .bus_info = "usb", - .version = KERNEL_VERSION(0,8,0), - .capabilities = (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE | - V4L2_CAP_TUNER | V4L2_CAP_AUDIO | - V4L2_CAP_READWRITE), - .reserved = {0,0,0,0} -}; - -static struct v4l2_tuner pvr_v4l2_tuners[]= { - { - .index = 0, - .name = "TV Tuner", - .type = V4L2_TUNER_ANALOG_TV, - .capability = (V4L2_TUNER_CAP_NORM | - V4L2_TUNER_CAP_STEREO | - V4L2_TUNER_CAP_LANG1 | - V4L2_TUNER_CAP_LANG2), - .rangelow = 0, - .rangehigh = 0, - .rxsubchans = V4L2_TUNER_SUB_STEREO, - .audmode = V4L2_TUNER_MODE_STEREO, - .signal = 0, - .afc = 0, - .reserved = {0,0,0,0} - } -}; - -static struct v4l2_fmtdesc pvr_fmtdesc [] = { - { - .index = 0, - .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, - .flags = V4L2_FMT_FLAG_COMPRESSED, - .description = "MPEG1/2", - // This should really be V4L2_PIX_FMT_MPEG, but xawtv - // breaks when I do that. - .pixelformat = 0, // V4L2_PIX_FMT_MPEG, - .reserved = { 0, 0, 0, 0 } - } -}; - -#define PVR_FORMAT_PIX 0 -#define PVR_FORMAT_VBI 1 - -static struct v4l2_format pvr_format [] = { - [PVR_FORMAT_PIX] = { - .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, - .fmt = { - .pix = { - .width = 720, - .height = 576, - // This should really be V4L2_PIX_FMT_MPEG, - // but xawtv breaks when I do that. - .pixelformat = 0, // V4L2_PIX_FMT_MPEG, - .field = V4L2_FIELD_INTERLACED, - .bytesperline = 0, // doesn't make sense - // here - //FIXME : Don't know what to put here... - .sizeimage = (32*1024), - .colorspace = 0, // doesn't make sense here - .priv = 0 - } - } - }, - [PVR_FORMAT_VBI] = { - .type = V4L2_BUF_TYPE_VBI_CAPTURE, - .fmt = { - .vbi = { - .sampling_rate = 27000000, - .offset = 248, - .samples_per_line = 1443, - .sample_format = V4L2_PIX_FMT_GREY, - .start = { 0, 0 }, - .count = { 0, 0 }, - .flags = 0, - .reserved = { 0, 0 } - } - } - } -}; - -/* - * pvr_ioctl() - * - * This is part of Video 4 Linux API. The procedure handles ioctl() calls. - * - */ -static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) -{ - struct pvr2_v4l2_fh *fh = file->private_data; - struct pvr2_v4l2 *vp = fh->vhead; - struct pvr2_v4l2_dev *dev_info = fh->dev_info; - struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; - int ret = -EINVAL; - - if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) { - v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw),cmd); - } - - if (!pvr2_hdw_dev_ok(hdw)) { - pvr2_trace(PVR2_TRACE_ERROR_LEGS, - "ioctl failed - bad or no context"); - return -EFAULT; - } - - /* check priority */ - switch (cmd) { - case VIDIOC_S_CTRL: - case VIDIOC_S_STD: - case VIDIOC_S_INPUT: - case VIDIOC_S_TUNER: - case VIDIOC_S_FREQUENCY: - ret = v4l2_prio_check(&vp->prio, &fh->prio); - if (ret) - return ret; - } - - switch (cmd) { - case VIDIOC_QUERYCAP: - { - struct v4l2_capability *cap = arg; - - memcpy(cap, &pvr_capability, sizeof(struct v4l2_capability)); - - ret = 0; - break; - } - - case VIDIOC_G_PRIORITY: - { - enum v4l2_priority *p = arg; - - *p = v4l2_prio_max(&vp->prio); - ret = 0; - break; - } - - case VIDIOC_S_PRIORITY: - { - enum v4l2_priority *prio = arg; - - ret = v4l2_prio_change(&vp->prio, &fh->prio, *prio); - break; - } - - case VIDIOC_ENUMSTD: - { - struct v4l2_standard *vs = (struct v4l2_standard *)arg; - int idx = vs->index; - ret = pvr2_hdw_get_stdenum_value(hdw,vs,idx+1); - break; - } - - case VIDIOC_G_STD: - { - int val = 0; - ret = pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDCUR),&val); - *(v4l2_std_id *)arg = val; - break; - } - - case VIDIOC_S_STD: - { - ret = pvr2_ctrl_set_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_STDCUR), - *(v4l2_std_id *)arg); - break; - } - - case VIDIOC_ENUMINPUT: - { - struct pvr2_ctrl *cptr; - struct v4l2_input *vi = (struct v4l2_input *)arg; - struct v4l2_input tmp; - unsigned int cnt; - - cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_INPUT); - - memset(&tmp,0,sizeof(tmp)); - tmp.index = vi->index; - ret = 0; - switch (vi->index) { - case PVR2_CVAL_INPUT_TV: - case PVR2_CVAL_INPUT_RADIO: - tmp.type = V4L2_INPUT_TYPE_TUNER; - break; - case PVR2_CVAL_INPUT_SVIDEO: - case PVR2_CVAL_INPUT_COMPOSITE: - tmp.type = V4L2_INPUT_TYPE_CAMERA; - break; - default: - ret = -EINVAL; - break; - } - if (ret < 0) break; - - cnt = 0; - pvr2_ctrl_get_valname(cptr,vi->index, - tmp.name,sizeof(tmp.name)-1,&cnt); - tmp.name[cnt] = 0; - - /* Don't bother with audioset, since this driver currently - always switches the audio whenever the video is - switched. */ - - /* Handling std is a tougher problem. It doesn't make - sense in cases where a device might be multi-standard. - We could just copy out the current value for the - standard, but it can change over time. For now just - leave it zero. */ - - memcpy(vi, &tmp, sizeof(tmp)); - - ret = 0; - break; - } - - case VIDIOC_G_INPUT: - { - struct pvr2_ctrl *cptr; - struct v4l2_input *vi = (struct v4l2_input *)arg; - int val; - cptr = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_INPUT); - val = 0; - ret = pvr2_ctrl_get_value(cptr,&val); - vi->index = val; - break; - } - - case VIDIOC_S_INPUT: - { - struct v4l2_input *vi = (struct v4l2_input *)arg; - ret = pvr2_ctrl_set_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_INPUT), - vi->index); - break; - } - - case VIDIOC_ENUMAUDIO: - { - ret = -EINVAL; - break; - } - - case VIDIOC_G_AUDIO: - { - ret = -EINVAL; - break; - } - - case VIDIOC_S_AUDIO: - { - ret = -EINVAL; - break; - } - case VIDIOC_G_TUNER: - { - struct v4l2_tuner *vt = (struct v4l2_tuner *)arg; - unsigned int status_mask; - int val; - if (vt->index !=0) break; - - status_mask = pvr2_hdw_get_signal_status(hdw); - - memcpy(vt, &pvr_v4l2_tuners[vt->index], - sizeof(struct v4l2_tuner)); - - vt->signal = 0; - if (status_mask & PVR2_SIGNAL_OK) { - if (status_mask & PVR2_SIGNAL_STEREO) { - vt->rxsubchans = V4L2_TUNER_SUB_STEREO; - } else { - vt->rxsubchans = V4L2_TUNER_SUB_MONO; - } - if (status_mask & PVR2_SIGNAL_SAP) { - vt->rxsubchans |= (V4L2_TUNER_SUB_LANG1 | - V4L2_TUNER_SUB_LANG2); - } - vt->signal = 65535; - } - - val = 0; - ret = pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_AUDIOMODE), - &val); - vt->audmode = val; - break; - } - - case VIDIOC_S_TUNER: - { - struct v4l2_tuner *vt=(struct v4l2_tuner *)arg; - - if (vt->index != 0) - break; - - ret = pvr2_ctrl_set_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_AUDIOMODE), - vt->audmode); - } - - case VIDIOC_S_FREQUENCY: - { - const struct v4l2_frequency *vf = (struct v4l2_frequency *)arg; - ret = pvr2_ctrl_set_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_FREQUENCY), - vf->frequency * 62500); - break; - } - - case VIDIOC_G_FREQUENCY: - { - struct v4l2_frequency *vf = (struct v4l2_frequency *)arg; - int val = 0; - ret = pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_FREQUENCY), - &val); - val /= 62500; - vf->frequency = val; - break; - } - - case VIDIOC_ENUM_FMT: - { - struct v4l2_fmtdesc *fd = (struct v4l2_fmtdesc *)arg; - - /* Only one format is supported : mpeg.*/ - if (fd->index != 0) - break; - - memcpy(fd, pvr_fmtdesc, sizeof(struct v4l2_fmtdesc)); - ret = 0; - break; - } - - case VIDIOC_G_FMT: - { - struct v4l2_format *vf = (struct v4l2_format *)arg; - int val; - switch(vf->type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - memcpy(vf, &pvr_format[PVR_FORMAT_PIX], - sizeof(struct v4l2_format)); - val = 0; - pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_HRES), - &val); - vf->fmt.pix.width = val; - val = 0; - pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_VRES), - &val); - vf->fmt.pix.height = val; - ret = 0; - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - // ????? Still need to figure out to do VBI correctly - ret = -EINVAL; - break; - default: - ret = -EINVAL; - break; - } - break; - } - - case VIDIOC_TRY_FMT: - case VIDIOC_S_FMT: - { - struct v4l2_format *vf = (struct v4l2_format *)arg; - - ret = 0; - switch(vf->type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: { - int lmin,lmax; - struct pvr2_ctrl *hcp,*vcp; - int h = vf->fmt.pix.height; - int w = vf->fmt.pix.width; - hcp = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_HRES); - vcp = pvr2_hdw_get_ctrl_by_id(hdw,PVR2_CID_VRES); - - lmin = pvr2_ctrl_get_min(hcp); - lmax = pvr2_ctrl_get_max(hcp); - if (w < lmin) { - w = lmin; - } else if (w > lmax) { - w = lmax; - } - lmin = pvr2_ctrl_get_min(vcp); - lmax = pvr2_ctrl_get_max(vcp); - if (h < lmin) { - h = lmin; - } else if (h > lmax) { - h = lmax; - } - - memcpy(vf, &pvr_format[PVR_FORMAT_PIX], - sizeof(struct v4l2_format)); - vf->fmt.pix.width = w; - vf->fmt.pix.height = h; - - if (cmd == VIDIOC_S_FMT) { - pvr2_ctrl_set_value(hcp,vf->fmt.pix.width); - pvr2_ctrl_set_value(vcp,vf->fmt.pix.height); - } - } break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - // ????? Still need to figure out to do VBI correctly - ret = -EINVAL; - break; - default: - ret = -EINVAL; - break; - } - break; - } - - case VIDIOC_STREAMON: - { - ret = pvr2_hdw_set_stream_type(hdw,dev_info->config); - if (ret < 0) return ret; - ret = pvr2_hdw_set_streaming(hdw,!0); - break; - } - - case VIDIOC_STREAMOFF: - { - ret = pvr2_hdw_set_streaming(hdw,0); - break; - } - - case VIDIOC_QUERYCTRL: - { - struct pvr2_ctrl *cptr; - struct v4l2_queryctrl *vc = (struct v4l2_queryctrl *)arg; - ret = 0; - if (vc->id & V4L2_CTRL_FLAG_NEXT_CTRL) { - cptr = pvr2_hdw_get_ctrl_nextv4l( - hdw,(vc->id & ~V4L2_CTRL_FLAG_NEXT_CTRL)); - if (cptr) vc->id = pvr2_ctrl_get_v4lid(cptr); - } else { - cptr = pvr2_hdw_get_ctrl_v4l(hdw,vc->id); - } - if (!cptr) { - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "QUERYCTRL id=0x%x not implemented here", - vc->id); - ret = -EINVAL; - break; - } - - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "QUERYCTRL id=0x%x mapping name=%s (%s)", - vc->id,pvr2_ctrl_get_name(cptr), - pvr2_ctrl_get_desc(cptr)); - strlcpy(vc->name,pvr2_ctrl_get_desc(cptr),sizeof(vc->name)); - vc->flags = pvr2_ctrl_get_v4lflags(cptr); - vc->default_value = pvr2_ctrl_get_def(cptr); - switch (pvr2_ctrl_get_type(cptr)) { - case pvr2_ctl_enum: - vc->type = V4L2_CTRL_TYPE_MENU; - vc->minimum = 0; - vc->maximum = pvr2_ctrl_get_cnt(cptr) - 1; - vc->step = 1; - break; - case pvr2_ctl_bool: - vc->type = V4L2_CTRL_TYPE_BOOLEAN; - vc->minimum = 0; - vc->maximum = 1; - vc->step = 1; - break; - case pvr2_ctl_int: - vc->type = V4L2_CTRL_TYPE_INTEGER; - vc->minimum = pvr2_ctrl_get_min(cptr); - vc->maximum = pvr2_ctrl_get_max(cptr); - vc->step = 1; - break; - default: - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "QUERYCTRL id=0x%x name=%s not mappable", - vc->id,pvr2_ctrl_get_name(cptr)); - ret = -EINVAL; - break; - } - break; - } - - case VIDIOC_QUERYMENU: - { - struct v4l2_querymenu *vm = (struct v4l2_querymenu *)arg; - unsigned int cnt = 0; - ret = pvr2_ctrl_get_valname(pvr2_hdw_get_ctrl_v4l(hdw,vm->id), - vm->index, - vm->name,sizeof(vm->name)-1, - &cnt); - vm->name[cnt] = 0; - break; - } - - case VIDIOC_G_CTRL: - { - struct v4l2_control *vc = (struct v4l2_control *)arg; - int val = 0; - ret = pvr2_ctrl_get_value(pvr2_hdw_get_ctrl_v4l(hdw,vc->id), - &val); - vc->value = val; - break; - } - - case VIDIOC_S_CTRL: - { - struct v4l2_control *vc = (struct v4l2_control *)arg; - ret = pvr2_ctrl_set_value(pvr2_hdw_get_ctrl_v4l(hdw,vc->id), - vc->value); - break; - } - - case VIDIOC_G_EXT_CTRLS: - { - struct v4l2_ext_controls *ctls = - (struct v4l2_ext_controls *)arg; - struct v4l2_ext_control *ctrl; - unsigned int idx; - int val; - for (idx = 0; idx < ctls->count; idx++) { - ctrl = ctls->controls + idx; - ret = pvr2_ctrl_get_value( - pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id),&val); - if (ret) { - ctls->error_idx = idx; - break; - } - /* Ensure that if read as a 64 bit value, the user - will still get a hopefully sane value */ - ctrl->value64 = 0; - ctrl->value = val; - } - break; - } - - case VIDIOC_S_EXT_CTRLS: - { - struct v4l2_ext_controls *ctls = - (struct v4l2_ext_controls *)arg; - struct v4l2_ext_control *ctrl; - unsigned int idx; - for (idx = 0; idx < ctls->count; idx++) { - ctrl = ctls->controls + idx; - ret = pvr2_ctrl_set_value( - pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id), - ctrl->value); - if (ret) { - ctls->error_idx = idx; - break; - } - } - break; - } - - case VIDIOC_TRY_EXT_CTRLS: - { - struct v4l2_ext_controls *ctls = - (struct v4l2_ext_controls *)arg; - struct v4l2_ext_control *ctrl; - struct pvr2_ctrl *pctl; - unsigned int idx; - /* For the moment just validate that the requested control - actually exists. */ - for (idx = 0; idx < ctls->count; idx++) { - ctrl = ctls->controls + idx; - pctl = pvr2_hdw_get_ctrl_v4l(hdw,ctrl->id); - if (!pctl) { - ret = -EINVAL; - ctls->error_idx = idx; - break; - } - } - break; - } - - case VIDIOC_LOG_STATUS: - { - pvr2_hdw_trigger_module_log(hdw); - ret = 0; - break; - } - - default : - ret = v4l_compat_translate_ioctl(inode,file,cmd, - arg,pvr2_v4l2_do_ioctl); - } - - pvr2_hdw_commit_ctl(hdw); - - if (ret < 0) { - if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) { - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "pvr2_v4l2_do_ioctl failure, ret=%d",ret); - } else { - if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) { - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "pvr2_v4l2_do_ioctl failure, ret=%d" - " command was:",ret); - v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw), - cmd); - } - } - } else { - pvr2_trace(PVR2_TRACE_V4LIOCTL, - "pvr2_v4l2_do_ioctl complete, ret=%d (0x%x)", - ret,ret); - } - return ret; -} - - -static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) -{ - printk(KERN_INFO "pvrusb2: unregistering device video%d [%s]\n", - dip->vdev->minor,pvr2_config_get_name(dip->config)); - video_unregister_device(dip->vdev); -} - - -static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp) -{ - pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw,-1); - pvr2_v4l2_dev_destroy(&vp->video_dev); - - pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_v4l2 id=%p",vp); - pvr2_channel_done(&vp->channel); - kfree(vp); -} - - -static void pvr2_v4l2_internal_check(struct pvr2_channel *chp) -{ - struct pvr2_v4l2 *vp; - vp = container_of(chp,struct pvr2_v4l2,channel); - if (!vp->channel.mc_head->disconnect_flag) return; - if (vp->vfirst) return; - pvr2_v4l2_destroy_no_lock(vp); -} - - -static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - -/* Temporary hack : use ivtv api until a v4l2 one is available. */ -#define IVTV_IOC_G_CODEC 0xFFEE7703 -#define IVTV_IOC_S_CODEC 0xFFEE7704 - if (cmd == IVTV_IOC_G_CODEC || cmd == IVTV_IOC_S_CODEC) return 0; - return video_usercopy(inode, file, cmd, arg, pvr2_v4l2_do_ioctl); -} - - -static int pvr2_v4l2_release(struct inode *inode, struct file *file) -{ - struct pvr2_v4l2_fh *fhp = file->private_data; - struct pvr2_v4l2 *vp = fhp->vhead; - struct pvr2_context *mp = fhp->vhead->channel.mc_head; - - pvr2_trace(PVR2_TRACE_OPEN_CLOSE,"pvr2_v4l2_release"); - - if (fhp->rhp) { - struct pvr2_stream *sp; - struct pvr2_hdw *hdw; - hdw = fhp->channel.mc_head->hdw; - pvr2_hdw_set_streaming(hdw,0); - sp = pvr2_ioread_get_stream(fhp->rhp); - if (sp) pvr2_stream_set_callback(sp,NULL,NULL); - pvr2_ioread_destroy(fhp->rhp); - fhp->rhp = NULL; - } - v4l2_prio_close(&vp->prio, &fhp->prio); - file->private_data = NULL; - - pvr2_context_enter(mp); do { - if (fhp->vnext) { - fhp->vnext->vprev = fhp->vprev; - } else { - vp->vlast = fhp->vprev; - } - if (fhp->vprev) { - fhp->vprev->vnext = fhp->vnext; - } else { - vp->vfirst = fhp->vnext; - } - fhp->vnext = NULL; - fhp->vprev = NULL; - fhp->vhead = NULL; - pvr2_channel_done(&fhp->channel); - pvr2_trace(PVR2_TRACE_STRUCT, - "Destroying pvr_v4l2_fh id=%p",fhp); - kfree(fhp); - if (vp->channel.mc_head->disconnect_flag && !vp->vfirst) { - pvr2_v4l2_destroy_no_lock(vp); - } - } while (0); pvr2_context_exit(mp); - return 0; -} - - -static int pvr2_v4l2_open(struct inode *inode, struct file *file) -{ - struct pvr2_v4l2_dev *dip = NULL; /* Our own context pointer */ - struct pvr2_v4l2_fh *fhp; - struct pvr2_v4l2 *vp; - struct pvr2_hdw *hdw; - - { - struct video_device *vdev = video_devdata(file); - dip = (struct pvr2_v4l2_dev *)video_get_drvdata(vdev); - } - - if (!dip) return -ENODEV; /* Should be impossible but I'm paranoid */ - - vp = dip->v4lp; - hdw = vp->channel.hdw; - - pvr2_trace(PVR2_TRACE_OPEN_CLOSE,"pvr2_v4l2_open"); - - if (!pvr2_hdw_dev_ok(hdw)) { - pvr2_trace(PVR2_TRACE_OPEN_CLOSE, - "pvr2_v4l2_open: hardware not ready"); - return -EIO; - } - - fhp = kmalloc(sizeof(*fhp),GFP_KERNEL); - if (!fhp) { - return -ENOMEM; - } - memset(fhp,0,sizeof(*fhp)); - - init_waitqueue_head(&fhp->wait_data); - fhp->dev_info = dip; - - pvr2_context_enter(vp->channel.mc_head); do { - pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); - pvr2_channel_init(&fhp->channel,vp->channel.mc_head); - fhp->vnext = NULL; - fhp->vprev = vp->vlast; - if (vp->vlast) { - vp->vlast->vnext = fhp; - } else { - vp->vfirst = fhp; - } - vp->vlast = fhp; - fhp->vhead = vp; - } while (0); pvr2_context_exit(vp->channel.mc_head); - - fhp->file = file; - file->private_data = fhp; - v4l2_prio_open(&vp->prio,&fhp->prio); - - fhp->fw_mode_flag = pvr2_hdw_cpufw_get_enabled(hdw); - - return 0; -} - - -static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp) -{ - wake_up(&fhp->wait_data); -} - -static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) -{ - int ret; - struct pvr2_stream *sp; - struct pvr2_hdw *hdw; - if (fh->rhp) return 0; - - /* First read() attempt. Try to claim the stream and start - it... */ - if ((ret = pvr2_channel_claim_stream(&fh->channel, - fh->dev_info->stream)) != 0) { - /* Someone else must already have it */ - return ret; - } - - fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); - if (!fh->rhp) { - pvr2_channel_claim_stream(&fh->channel,NULL); - return -ENOMEM; - } - - hdw = fh->channel.mc_head->hdw; - sp = fh->dev_info->stream->stream; - pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh); - pvr2_hdw_set_stream_type(hdw,fh->dev_info->config); - pvr2_hdw_set_streaming(hdw,!0); - ret = pvr2_ioread_set_enabled(fh->rhp,!0); - - return ret; -} - - -static ssize_t pvr2_v4l2_read(struct file *file, - char __user *buff, size_t count, loff_t *ppos) -{ - struct pvr2_v4l2_fh *fh = file->private_data; - int ret; - - if (fh->fw_mode_flag) { - struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; - char *tbuf; - int c1,c2; - int tcnt = 0; - unsigned int offs = *ppos; - - tbuf = kmalloc(PAGE_SIZE,GFP_KERNEL); - if (!tbuf) return -ENOMEM; - - while (count) { - c1 = count; - if (c1 > PAGE_SIZE) c1 = PAGE_SIZE; - c2 = pvr2_hdw_cpufw_get(hdw,offs,tbuf,c1); - if (c2 < 0) { - tcnt = c2; - break; - } - if (!c2) break; - if (copy_to_user(buff,tbuf,c2)) { - tcnt = -EFAULT; - break; - } - offs += c2; - tcnt += c2; - buff += c2; - count -= c2; - *ppos += c2; - } - kfree(tbuf); - return tcnt; - } - - if (!fh->rhp) { - ret = pvr2_v4l2_iosetup(fh); - if (ret) { - return ret; - } - } - - for (;;) { - ret = pvr2_ioread_read(fh->rhp,buff,count); - if (ret >= 0) break; - if (ret != -EAGAIN) break; - if (file->f_flags & O_NONBLOCK) break; - /* Doing blocking I/O. Wait here. */ - ret = wait_event_interruptible( - fh->wait_data, - pvr2_ioread_avail(fh->rhp) >= 0); - if (ret < 0) break; - } - - return ret; -} - - -static unsigned int pvr2_v4l2_poll(struct file *file, poll_table *wait) -{ - unsigned int mask = 0; - struct pvr2_v4l2_fh *fh = file->private_data; - int ret; - - if (fh->fw_mode_flag) { - mask |= POLLIN | POLLRDNORM; - return mask; - } - - if (!fh->rhp) { - ret = pvr2_v4l2_iosetup(fh); - if (ret) return POLLERR; - } - - poll_wait(file,&fh->wait_data,wait); - - if (pvr2_ioread_avail(fh->rhp) >= 0) { - mask |= POLLIN | POLLRDNORM; - } - - return mask; -} - - -static struct file_operations vdev_fops = { - .owner = THIS_MODULE, - .open = pvr2_v4l2_open, - .release = pvr2_v4l2_release, - .read = pvr2_v4l2_read, - .ioctl = pvr2_v4l2_ioctl, - .llseek = no_llseek, - .poll = pvr2_v4l2_poll, -}; - - -#define VID_HARDWARE_PVRUSB2 38 /* FIXME : need a good value */ - -static struct video_device vdev_template = { - .owner = THIS_MODULE, - .type = VID_TYPE_CAPTURE | VID_TYPE_TUNER, - .type2 = (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE - | V4L2_CAP_TUNER | V4L2_CAP_AUDIO - | V4L2_CAP_READWRITE), - .hardware = VID_HARDWARE_PVRUSB2, - .fops = &vdev_fops, -}; - - -static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, - struct pvr2_v4l2 *vp, - enum pvr2_config cfg) -{ - int mindevnum; - int unit_number; - int v4l_type; - dip->v4lp = vp; - dip->config = cfg; - - - switch (cfg) { - case pvr2_config_mpeg: - v4l_type = VFL_TYPE_GRABBER; - dip->stream = &vp->channel.mc_head->video_stream; - break; - case pvr2_config_vbi: - v4l_type = VFL_TYPE_VBI; - break; - case pvr2_config_radio: - v4l_type = VFL_TYPE_RADIO; - break; - default: - /* Bail out (this should be impossible) */ - err("Failed to set up pvrusb2 v4l dev" - " due to unrecognized config"); - return; - } - - if (!dip->stream) { - err("Failed to set up pvrusb2 v4l dev" - " due to missing stream instance"); - return; - } - - dip->vdev = video_device_alloc(); - if (!dip->vdev) { - err("Alloc of pvrusb2 v4l video device failed"); - return; - } - - memcpy(dip->vdev,&vdev_template,sizeof(vdev_template)); - dip->vdev->release = video_device_release; - video_set_drvdata(dip->vdev,dip); - - mindevnum = -1; - unit_number = pvr2_hdw_get_unit_number(vp->channel.mc_head->hdw); - if ((unit_number >= 0) && (unit_number < PVR_NUM)) { - mindevnum = video_nr[unit_number]; - } - if ((video_register_device(dip->vdev, v4l_type, mindevnum) < 0) && - (video_register_device(dip->vdev, v4l_type, -1) < 0)) { - err("Failed to register pvrusb2 v4l video device"); - } else { - printk(KERN_INFO "pvrusb2: registered device video%d [%s]\n", - dip->vdev->minor,pvr2_config_get_name(dip->config)); - } - - - pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, - dip->vdev->minor); -} - - -struct pvr2_v4l2 *pvr2_v4l2_create(struct pvr2_context *mnp) -{ - struct pvr2_v4l2 *vp; - - vp = kmalloc(sizeof(*vp),GFP_KERNEL); - if (!vp) return vp; - memset(vp,0,sizeof(*vp)); - pvr2_channel_init(&vp->channel,mnp); - pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr2_v4l2 id=%p",vp); - - vp->channel.check_func = pvr2_v4l2_internal_check; - - /* register streams */ - pvr2_v4l2_dev_init(&vp->video_dev,vp,pvr2_config_mpeg); - - - return vp; -} - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.h b/drivers/media/video/pvrusb2/pvrusb2-v4l2.h deleted file mode 100644 index 9a995e2d2..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * - * 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 - * - * 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 __PVRUSB2_V4L2_H -#define __PVRUSB2_V4L2_H - -#include "pvrusb2-context.h" - -struct pvr2_v4l2; - -struct pvr2_v4l2 *pvr2_v4l2_create(struct pvr2_context *); - -#endif /* __PVRUSB2_V4L2_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 75 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c deleted file mode 100644 index 05f2cddeb..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 source file is specifically designed to interface with the - saa711x support that is available in the v4l available starting - with linux 2.6.15. - -*/ - -#include "pvrusb2-video-v4l.h" -#include "pvrusb2-i2c-cmd-v4l2.h" - - -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include -#include - -struct pvr2_v4l_decoder { - struct pvr2_i2c_handler handler; - struct pvr2_decoder_ctrl ctrl; - struct pvr2_i2c_client *client; - struct pvr2_hdw *hdw; - unsigned long stale_mask; -}; - - -static void set_input(struct pvr2_v4l_decoder *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - struct v4l2_routing route; - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_input(%d)",hdw->input_val); - switch(hdw->input_val) { - case PVR2_CVAL_INPUT_TV: - route.input = SAA7115_COMPOSITE4; - break; - case PVR2_CVAL_INPUT_COMPOSITE: - route.input = SAA7115_COMPOSITE5; - break; - case PVR2_CVAL_INPUT_SVIDEO: - route.input = SAA7115_SVIDEO2; - break; - case PVR2_CVAL_INPUT_RADIO: - // ????? No idea yet what to do here - default: - return; - } - route.output = 0; - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_VIDEO_ROUTING,&route); -} - - -static int check_input(struct pvr2_v4l_decoder *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return hdw->input_dirty != 0; -} - - -static void set_audio(struct pvr2_v4l_decoder *ctxt) -{ - u32 val; - struct pvr2_hdw *hdw = ctxt->hdw; - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 set_audio %d", - hdw->srate_val); - switch (hdw->srate_val) { - default: - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000: - val = 48000; - break; - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100: - val = 44100; - break; - case V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000: - val = 32000; - break; - } - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_AUDIO_CLOCK_FREQ,&val); -} - - -static int check_audio(struct pvr2_v4l_decoder *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return hdw->srate_dirty != 0; -} - - -struct pvr2_v4l_decoder_ops { - void (*update)(struct pvr2_v4l_decoder *); - int (*check)(struct pvr2_v4l_decoder *); -}; - - -static const struct pvr2_v4l_decoder_ops decoder_ops[] = { - { .update = set_input, .check = check_input}, - { .update = set_audio, .check = check_audio}, -}; - - -static void decoder_detach(struct pvr2_v4l_decoder *ctxt) -{ - ctxt->client->handler = NULL; - ctxt->hdw->decoder_ctrl = NULL; - kfree(ctxt); -} - - -static int decoder_check(struct pvr2_v4l_decoder *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(decoder_ops)/sizeof(decoder_ops[0]); - idx++) { - msk = 1 << idx; - if (ctxt->stale_mask & msk) continue; - if (decoder_ops[idx].check(ctxt)) { - ctxt->stale_mask |= msk; - } - } - return ctxt->stale_mask != 0; -} - - -static void decoder_update(struct pvr2_v4l_decoder *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(decoder_ops)/sizeof(decoder_ops[0]); - idx++) { - msk = 1 << idx; - if (!(ctxt->stale_mask & msk)) continue; - ctxt->stale_mask &= ~msk; - decoder_ops[idx].update(ctxt); - } -} - - -static int decoder_detect(struct pvr2_i2c_client *cp) -{ - /* Attempt to query the decoder - let's see if it will answer */ - struct v4l2_tuner vt; - int ret; - - memset(&vt,0,sizeof(vt)); - ret = pvr2_i2c_client_cmd(cp,VIDIOC_G_TUNER,&vt); - return ret == 0; /* Return true if it answered */ -} - - -static void decoder_enable(struct pvr2_v4l_decoder *ctxt,int fl) -{ - pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 decoder_enable(%d)",fl); - pvr2_v4l2_cmd_stream(ctxt->client,fl); -} - - -static int decoder_is_tuned(struct pvr2_v4l_decoder *ctxt) -{ - struct v4l2_tuner vt; - int ret; - - memset(&vt,0,sizeof(vt)); - ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_G_TUNER,&vt); - if (ret < 0) return -EINVAL; - return vt.signal ? 1 : 0; -} - - -static unsigned int decoder_describe(struct pvr2_v4l_decoder *ctxt,char *buf,unsigned int cnt) -{ - return scnprintf(buf,cnt,"handler: pvrusb2-video-v4l"); -} - - -const static struct pvr2_i2c_handler_functions hfuncs = { - .detach = (void (*)(void *))decoder_detach, - .check = (int (*)(void *))decoder_check, - .update = (void (*)(void *))decoder_update, - .describe = (unsigned int (*)(void *,char *,unsigned int))decoder_describe, -}; - - -int pvr2_i2c_decoder_v4l_setup(struct pvr2_hdw *hdw, - struct pvr2_i2c_client *cp) -{ - struct pvr2_v4l_decoder *ctxt; - - if (hdw->decoder_ctrl) return 0; - if (cp->handler) return 0; - if (!decoder_detect(cp)) return 0; - - ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); - if (!ctxt) return 0; - memset(ctxt,0,sizeof(*ctxt)); - - ctxt->handler.func_data = ctxt; - ctxt->handler.func_table = &hfuncs; - ctxt->ctrl.ctxt = ctxt; - ctxt->ctrl.detach = (void (*)(void *))decoder_detach; - ctxt->ctrl.enable = (void (*)(void *,int))decoder_enable; - ctxt->ctrl.tuned = (int (*)(void *))decoder_is_tuned; - ctxt->client = cp; - ctxt->hdw = hdw; - ctxt->stale_mask = (1 << (sizeof(decoder_ops)/ - sizeof(decoder_ops[0]))) - 1; - hdw->decoder_ctrl = &ctxt->ctrl; - cp->handler = &ctxt->handler; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x saa711x V4L2 handler set up", - cp->client->addr); - return !0; -} - - - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h deleted file mode 100644 index 2b917fda0..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_VIDEO_V4L_H -#define __PVRUSB2_VIDEO_V4L_H - -/* - - This module connects the pvrusb2 driver to the I2C chip level - driver which handles device video processing. This interface is - used internally by the driver; higher level code should only - interact through the interface provided by pvrusb2-hdw.h. - -*/ - - - -#include "pvrusb2-i2c-core.h" - -int pvr2_i2c_decoder_v4l_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); - - -#endif /* __PVRUSB2_VIDEO_V4L_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c deleted file mode 100644 index 2413e5198..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 source file is specifically designed to interface with the - wm8775. - -*/ - -#include "pvrusb2-wm8775.h" -#include "pvrusb2-i2c-cmd-v4l2.h" - - -#include "pvrusb2-hdw-internal.h" -#include "pvrusb2-debug.h" -#include -#include -#include -#include - -struct pvr2_v4l_wm8775 { - struct pvr2_i2c_handler handler; - struct pvr2_i2c_client *client; - struct pvr2_hdw *hdw; - unsigned long stale_mask; -}; - - -static void set_input(struct pvr2_v4l_wm8775 *ctxt) -{ - struct v4l2_routing route; - struct pvr2_hdw *hdw = ctxt->hdw; - int msk = 0; - - memset(&route,0,sizeof(route)); - - pvr2_trace(PVR2_TRACE_CHIPS,"i2c wm8775 set_input(val=%d msk=0x%x)", - hdw->input_val,msk); - - // Always point to input #1 no matter what - route.input = 2; - pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); -} - -static int check_input(struct pvr2_v4l_wm8775 *ctxt) -{ - struct pvr2_hdw *hdw = ctxt->hdw; - return hdw->input_dirty != 0; -} - - -struct pvr2_v4l_wm8775_ops { - void (*update)(struct pvr2_v4l_wm8775 *); - int (*check)(struct pvr2_v4l_wm8775 *); -}; - - -static const struct pvr2_v4l_wm8775_ops wm8775_ops[] = { - { .update = set_input, .check = check_input}, -}; - - -static unsigned int wm8775_describe(struct pvr2_v4l_wm8775 *ctxt, - char *buf,unsigned int cnt) -{ - return scnprintf(buf,cnt,"handler: pvrusb2-wm8775"); -} - - -static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) -{ - ctxt->client->handler = NULL; - kfree(ctxt); -} - - -static int wm8775_check(struct pvr2_v4l_wm8775 *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(wm8775_ops)/sizeof(wm8775_ops[0]); - idx++) { - msk = 1 << idx; - if (ctxt->stale_mask & msk) continue; - if (wm8775_ops[idx].check(ctxt)) { - ctxt->stale_mask |= msk; - } - } - return ctxt->stale_mask != 0; -} - - -static void wm8775_update(struct pvr2_v4l_wm8775 *ctxt) -{ - unsigned long msk; - unsigned int idx; - - for (idx = 0; idx < sizeof(wm8775_ops)/sizeof(wm8775_ops[0]); - idx++) { - msk = 1 << idx; - if (!(ctxt->stale_mask & msk)) continue; - ctxt->stale_mask &= ~msk; - wm8775_ops[idx].update(ctxt); - } -} - - -const static struct pvr2_i2c_handler_functions hfuncs = { - .detach = (void (*)(void *))wm8775_detach, - .check = (int (*)(void *))wm8775_check, - .update = (void (*)(void *))wm8775_update, - .describe = (unsigned int (*)(void *,char *,unsigned int))wm8775_describe, -}; - - -int pvr2_i2c_wm8775_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) -{ - struct pvr2_v4l_wm8775 *ctxt; - - if (cp->handler) return 0; - - ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL); - if (!ctxt) return 0; - memset(ctxt,0,sizeof(*ctxt)); - - ctxt->handler.func_data = ctxt; - ctxt->handler.func_table = &hfuncs; - ctxt->client = cp; - ctxt->hdw = hdw; - ctxt->stale_mask = (1 << (sizeof(wm8775_ops)/ - sizeof(wm8775_ops[0]))) - 1; - cp->handler = &ctxt->handler; - pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x wm8775 V4L2 handler set up", - cp->client->addr); - return !0; -} - - - - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.h b/drivers/media/video/pvrusb2/pvrusb2-wm8775.h deleted file mode 100644 index 8aaeff4e1..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_WM8775_H -#define __PVRUSB2_WM8775_H - -/* - - This module connects the pvrusb2 driver to the I2C chip level - driver which performs analog -> digital audio conversion for - external audio inputs. This interface is used internally by the - driver; higher level code should only interact through the - interface provided by pvrusb2-hdw.h. - -*/ - - - -#include "pvrusb2-i2c-core.h" - -int pvr2_i2c_wm8775_setup(struct pvr2_hdw *,struct pvr2_i2c_client *); - - -#endif /* __PVRUSB2_WM8775_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pvrusb2/pvrusb2.h b/drivers/media/video/pvrusb2/pvrusb2.h deleted file mode 100644 index 074533e9c..000000000 --- a/drivers/media/video/pvrusb2/pvrusb2.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * $Id$ - * - * Copyright (C) 2005 Mike Isely - * Copyright (C) 2004 Aurelien Alleaume - * - * 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 - * - * 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 __PVRUSB2_H -#define __PVRUSB2_H - -/* Maximum number of pvrusb2 instances we can track at once. You - might want to increase this - however the driver operation will not - be impaired if it is too small. Instead additional units just - won't have an ID assigned and it might not be possible to specify - module paramters for those extra units. */ -#define PVR_NUM 20 - -#endif /* __PVRUSB2_H */ - -/* - Stuff for Emacs to see, in order to encourage consistent editing style: - *** Local Variables: *** - *** mode: c *** - *** fill-column: 70 *** - *** tab-width: 8 *** - *** c-basic-offset: 8 *** - *** End: *** - */ diff --git a/drivers/media/video/pwc/Kconfig b/drivers/media/video/pwc/Kconfig index 8fdf7101d..53cbc950f 100644 --- a/drivers/media/video/pwc/Kconfig +++ b/drivers/media/video/pwc/Kconfig @@ -7,7 +7,6 @@ config USB_PWC * Philips PCA645, PCA646 * Philips PCVC675, PCVC680, PCVC690 * Philips PCVC720/40, PCVC730, PCVC740, PCVC750 - * Philips SPC900NC * Askey VC010 * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro' and 'Orbit'/'Sphere' @@ -20,18 +19,10 @@ config USB_PWC and never will be, but the 665 and 720/20 are supported by other drivers. - Some newer logitech webcams are not handled by this driver but by the - Usb Video Class driver (linux-uvc). + See for more information and + installation instructions. The built-in microphone is enabled by selecting USB Audio support. To compile this driver as a module, choose M here: the module will be called pwc. - -config USB_PWC_DEBUG - bool "USB Philips Cameras verbose debug" - depends on USB_PWC - help - Say Y here in order to have the pwc driver generate verbose debugging - messages. - A special module options 'trace' is used to control the verbosity. diff --git a/drivers/media/video/pwc/Makefile b/drivers/media/video/pwc/Makefile index 9db2260d1..33d60126c 100644 --- a/drivers/media/video/pwc/Makefile +++ b/drivers/media/video/pwc/Makefile @@ -1,12 +1,3 @@ -pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-v4l.o pwc-uncompress.o -pwc-objs += pwc-dec1.o pwc-dec23.o pwc-kiara.o pwc-timon.o +pwc-objs := pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o pwc-timon.o pwc-kiara.o obj-$(CONFIG_USB_PWC) += pwc.o - -ifeq ($(CONFIG_USB_PWC_DEBUG),y) -EXTRA_CFLAGS += -DCONFIG_PWC_DEBUG=1 -else -EXTRA_CFLAGS += -DCONFIG_PWC_DEBUG=0 -endif - - diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index 0bd115588..4ba549bfa 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c @@ -2,7 +2,7 @@ Functions that send various control messages to the webcam, including video modes. (C) 1999-2003 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -41,14 +41,12 @@ #include #endif #include -#include #include "pwc.h" +#include "pwc-ioctl.h" #include "pwc-uncompress.h" #include "pwc-kiara.h" #include "pwc-timon.h" -#include "pwc-dec1.h" -#include "pwc-dec23.h" /* Request types: video */ #define SET_LUM_CTL 0x01 @@ -59,10 +57,6 @@ #define GET_STATUS_CTL 0x06 #define SET_EP_STREAM_CTL 0x07 #define GET_EP_STREAM_CTL 0x08 -#define GET_XX_CTL 0x09 -#define SET_XX_CTL 0x0A -#define GET_XY_CTL 0x0B -#define SET_XY_CTL 0x0C #define SET_MPT_CTL 0x0D #define GET_MPT_CTL 0x0E @@ -99,20 +93,12 @@ #define READ_SHUTTER_FORMATTER 0x0600 #define READ_RED_GAIN_FORMATTER 0x0700 #define READ_BLUE_GAIN_FORMATTER 0x0800 -#define GET_STATUS_B00 0x0B00 #define SENSOR_TYPE_FORMATTER1 0x0C00 -#define GET_STATUS_3000 0x3000 #define READ_RAW_Y_MEAN_FORMATTER 0x3100 #define SET_POWER_SAVE_MODE_FORMATTER 0x3200 #define MIRROR_IMAGE_FORMATTER 0x3300 #define LED_FORMATTER 0x3400 -#define LOWLIGHT 0x3500 -#define GET_STATUS_3600 0x3600 #define SENSOR_TYPE_FORMATTER2 0x3700 -#define GET_STATUS_3800 0x3800 -#define GET_STATUS_4000 0x4000 -#define GET_STATUS_4100 0x4100 /* Get */ -#define CTL_STATUS_4200 0x4200 /* [GS] 1 */ /* Formatters for the Video Endpoint controls [GS]ET_EP_STREAM_CTL */ #define VIDEO_OUTPUT_CONTROL_FORMATTER 0x0100 @@ -152,7 +138,6 @@ static struct Nala_table_entry Nala_table[PSZ_MAX][8] = #include "pwc-nala.h" }; -static void pwc_set_image_buffer_size(struct pwc_device *pdev); /****************************************************************************/ @@ -174,7 +159,31 @@ static void pwc_set_image_buffer_size(struct pwc_device *pdev); &buf, buflen, 500) -static int send_video_command(struct usb_device *udev, int index, void *buf, int buflen) +#if PWC_DEBUG +void pwc_hexdump(void *p, int len) +{ + int i; + unsigned char *s; + char buf[100], *d; + + s = (unsigned char *)p; + d = buf; + *d = '\0'; + Debug("Doing hexdump @ %p, %d bytes.\n", p, len); + for (i = 0; i < len; i++) { + d += sprintf(d, "%02X ", *s++); + if ((i & 0xF) == 0xF) { + Debug("%s\n", buf); + d = buf; + *d = '\0'; + } + } + if ((i & 0xF) != 0) + Debug("%s\n", buf); +} +#endif + +static inline int send_video_command(struct usb_device *udev, int index, void *buf, int buflen) { return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), @@ -187,7 +196,7 @@ static int send_video_command(struct usb_device *udev, int index, void *buf, int -static int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) +static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) { unsigned char buf[3]; int ret, fps; @@ -220,14 +229,34 @@ static int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) if (pEntry->alternate == 0) return -EINVAL; + if (pEntry->compressed) + return -ENOENT; /* Not supported. */ + memcpy(buf, pEntry->mode, 3); ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3); if (ret < 0) { - PWC_DEBUG_MODULE("Failed to send video command... %d\n", ret); + Debug("Failed to send video command... %d\n", ret); return ret; } if (pEntry->compressed && pdev->vpalette != VIDEO_PALETTE_RAW) - pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data); + { + switch(pdev->type) { + case 645: + case 646: +/* pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data); */ + break; + + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: +/* pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data); */ + break; + } + } pdev->cmd_len = 3; memcpy(pdev->cmd_buf, buf, 3); @@ -254,7 +283,7 @@ static int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) } -static int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) +static inline int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) { unsigned char buf[13]; const struct Timon_table_entry *pChoose; @@ -286,8 +315,8 @@ static int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, i if (ret < 0) return ret; - if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) - pwc_dec23_init(pdev, pdev->type, buf); +/* if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) + pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data); */ pdev->cmd_len = 13; memcpy(pdev->cmd_buf, buf, 13); @@ -307,7 +336,7 @@ static int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, i } -static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) +static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, int compression, int snapshot) { const struct Kiara_table_entry *pChoose = NULL; int fps, ret; @@ -321,14 +350,21 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i fps = (frames / 5) - 1; /* special case: VGA @ 5 fps and snapshot is raw bayer mode */ - if (size == PSZ_VGA && frames == 5 && snapshot && pdev->vpalette == VIDEO_PALETTE_RAW) + if (size == PSZ_VGA && frames == 5 && snapshot) { /* Only available in case the raw palette is selected or we have the decompressor available. This mode is only available in compressed form */ - PWC_DEBUG_SIZE("Choosing VGA/5 BAYER mode.\n"); - pChoose = &RawEntry; + if (pdev->vpalette == VIDEO_PALETTE_RAW) + { + Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette); + pChoose = &RawEntry; + } + else + { + Info("VGA/5 BAYER mode _must_ have a decompressor available, or use RAW palette.\n"); + } } else { @@ -336,7 +372,6 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i if the preferred ratio is not available. Skip this step when using RAW modes. */ - snapshot = 0; while (compression <= 3) { pChoose = &Kiara_table[size][fps][compression]; if (pChoose->alternate != 0) @@ -347,7 +382,7 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i if (pChoose == NULL || pChoose->alternate == 0) return -ENOENT; /* Not supported. */ - PWC_TRACE("Using alternate setting %d.\n", pChoose->alternate); + Debug("Using alternate setting %d.\n", pChoose->alternate); /* usb_control_msg won't take staticly allocated arrays as argument?? */ memcpy(buf, pChoose->mode, 12); @@ -359,8 +394,8 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i if (ret < 0) return ret; - if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) - pwc_dec23_init(pdev, pdev->type, buf); +/* if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) + pwc_dec23_init(pdev->type, pdev->release, buf, pdev->decompress_data); */ pdev->cmd_len = 12; memcpy(pdev->cmd_buf, buf, 12); @@ -375,13 +410,49 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i pdev->frame_size = (pdev->vbandlength * pdev->image.y) / 4; else pdev->frame_size = (pdev->image.x * pdev->image.y * 12) / 8; - PWC_TRACE("frame_size=%d, vframes=%d, vsize=%d, vsnapshot=%d, vbandlength=%d\n", - pdev->frame_size,pdev->vframes,pdev->vsize,pdev->vsnapshot,pdev->vbandlength); return 0; } +static void pwc_set_image_buffer_size(struct pwc_device *pdev) +{ + int i, factor = 0, filler = 0; + + /* for PALETTE_YUV420P */ + switch(pdev->vpalette) + { + case VIDEO_PALETTE_YUV420P: + factor = 6; + filler = 128; + break; + case VIDEO_PALETTE_RAW: + factor = 6; /* can be uncompressed YUV420P */ + filler = 0; + break; + } + + /* Set sizes in bytes */ + pdev->image.size = pdev->image.x * pdev->image.y * factor / 4; + pdev->view.size = pdev->view.x * pdev->view.y * factor / 4; + + /* Align offset, or you'll get some very weird results in + YUV420 mode... x must be multiple of 4 (to get the Y's in + place), and y even (or you'll mixup U & V). This is less of a + problem for YUV420P. + */ + pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC; + pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE; + + /* Fill buffers with gray or black */ + for (i = 0; i < MAX_IMAGES; i++) { + if (pdev->image_ptr[i] != NULL) + memset(pdev->image_ptr[i], filler, pdev->view.size); + } +} + + + /** @pdev: device structure @width: viewport width @@ -394,78 +465,50 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame { int ret, size; - PWC_DEBUG_FLOW("set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette); + Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette); size = pwc_decode_size(pdev, width, height); if (size < 0) { - PWC_DEBUG_MODULE("Could not find suitable size.\n"); + Debug("Could not find suitable size.\n"); return -ERANGE; } - PWC_TRACE("decode_size = %d.\n", size); + Debug("decode_size = %d.\n", size); - if (DEVICE_USE_CODEC1(pdev->type)) { + ret = -EINVAL; + switch(pdev->type) { + case 645: + case 646: ret = set_video_mode_Nala(pdev, size, frames); + break; - } else if (DEVICE_USE_CODEC3(pdev->type)) { - ret = set_video_mode_Kiara(pdev, size, frames, compression, snapshot); - - } else { + case 675: + case 680: + case 690: ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot); + break; + + case 720: + case 730: + case 740: + case 750: + ret = set_video_mode_Kiara(pdev, size, frames, compression, snapshot); + break; } if (ret < 0) { - PWC_ERROR("Failed to set video mode %s@%d fps; return code = %d\n", size2name[size], frames, ret); + if (ret == -ENOENT) + Info("Video mode %s@%d fps is only supported with the decompressor module (pwcx).\n", size2name[size], frames); + else { + Err("Failed to set video mode %s@%d fps; return code = %d\n", size2name[size], frames, ret); + } return ret; } pdev->view.x = width; pdev->view.y = height; pdev->frame_total_size = pdev->frame_size + pdev->frame_header_size + pdev->frame_trailer_size; pwc_set_image_buffer_size(pdev); - PWC_DEBUG_SIZE("Set viewport to %dx%d, image size is %dx%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y); + Trace(TRACE_SIZE, "Set viewport to %dx%d, image size is %dx%d.\n", width, height, pwc_image_sizes[size].x, pwc_image_sizes[size].y); return 0; } -#define BLACK_Y 0 -#define BLACK_U 128 -#define BLACK_V 128 - -static void pwc_set_image_buffer_size(struct pwc_device *pdev) -{ - int i, factor = 0; - - /* for PALETTE_YUV420P */ - switch(pdev->vpalette) - { - case VIDEO_PALETTE_YUV420P: - factor = 6; - break; - case VIDEO_PALETTE_RAW: - factor = 6; /* can be uncompressed YUV420P */ - break; - } - - /* Set sizes in bytes */ - pdev->image.size = pdev->image.x * pdev->image.y * factor / 4; - pdev->view.size = pdev->view.x * pdev->view.y * factor / 4; - - /* Align offset, or you'll get some very weird results in - YUV420 mode... x must be multiple of 4 (to get the Y's in - place), and y even (or you'll mixup U & V). This is less of a - problem for YUV420P. - */ - pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC; - pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE; - - /* Fill buffers with black colors */ - for (i = 0; i < pwc_mbufs; i++) { - unsigned char *p = pdev->image_data + pdev->images[i].offset; - memset(p, BLACK_Y, pdev->view.x * pdev->view.y); - p += pdev->view.x * pdev->view.y; - memset(p, BLACK_U, pdev->view.x * pdev->view.y/4); - p += pdev->view.x * pdev->view.y/4; - memset(p, BLACK_V, pdev->view.x * pdev->view.y/4); - } -} - - /* BRIGHTNESS */ @@ -477,7 +520,7 @@ int pwc_get_brightness(struct pwc_device *pdev) ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1); if (ret < 0) return ret; - return buf; + return buf << 9; } int pwc_set_brightness(struct pwc_device *pdev, int value) @@ -502,7 +545,7 @@ int pwc_get_contrast(struct pwc_device *pdev) ret = RecvControlMsg(GET_LUM_CTL, CONTRAST_FORMATTER, 1); if (ret < 0) return ret; - return buf; + return buf << 10; } int pwc_set_contrast(struct pwc_device *pdev, int value) @@ -527,7 +570,7 @@ int pwc_get_gamma(struct pwc_device *pdev) ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1); if (ret < 0) return ret; - return buf; + return buf << 11; } int pwc_set_gamma(struct pwc_device *pdev, int value) @@ -545,47 +588,37 @@ int pwc_set_gamma(struct pwc_device *pdev, int value) /* SATURATION */ -/* return a value between [-100 , 100] */ -int pwc_get_saturation(struct pwc_device *pdev, int *value) +int pwc_get_saturation(struct pwc_device *pdev) { char buf; - int ret, saturation_register; + int ret; if (pdev->type < 675) - return -EINVAL; - if (pdev->type < 730) - saturation_register = SATURATION_MODE_FORMATTER2; - else - saturation_register = SATURATION_MODE_FORMATTER1; - ret = RecvControlMsg(GET_CHROM_CTL, saturation_register, 1); + return -1; + ret = RecvControlMsg(GET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1); if (ret < 0) return ret; - *value = (signed)buf; - return 0; + return 32768 + buf * 327; } -/* @param value saturation color between [-100 , 100] */ int pwc_set_saturation(struct pwc_device *pdev, int value) { char buf; - int saturation_register; if (pdev->type < 675) return -EINVAL; - if (value < -100) - value = -100; - if (value > 100) - value = 100; - if (pdev->type < 730) - saturation_register = SATURATION_MODE_FORMATTER2; - else - saturation_register = SATURATION_MODE_FORMATTER1; - return SendControlMsg(SET_CHROM_CTL, saturation_register, 1); + if (value < 0) + value = 0; + if (value > 0xffff) + value = 0xffff; + /* saturation ranges from -100 to +100 */ + buf = (value - 32768) / 327; + return SendControlMsg(SET_CHROM_CTL, pdev->type < 730 ? SATURATION_MODE_FORMATTER2 : SATURATION_MODE_FORMATTER1, 1); } /* AGC */ -int pwc_set_agc(struct pwc_device *pdev, int mode, int value) +static inline int pwc_set_agc(struct pwc_device *pdev, int mode, int value) { char buf; int ret; @@ -610,7 +643,7 @@ int pwc_set_agc(struct pwc_device *pdev, int mode, int value) return 0; } -int pwc_get_agc(struct pwc_device *pdev, int *value) +static inline int pwc_get_agc(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -640,7 +673,7 @@ int pwc_get_agc(struct pwc_device *pdev, int *value) return 0; } -int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) +static inline int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) { char buf[2]; int speed, ret; @@ -658,16 +691,23 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) value = 0; if (value > 0xffff) value = 0xffff; - - if (DEVICE_USE_CODEC2(pdev->type)) { + switch(pdev->type) { + case 675: + case 680: + case 690: /* speed ranges from 0x0 to 0x290 (656) */ speed = (value / 100); buf[1] = speed >> 8; buf[0] = speed & 0xff; - } else if (DEVICE_USE_CODEC3(pdev->type)) { + break; + case 720: + case 730: + case 740: + case 750: /* speed seems to range from 0x0 to 0xff */ buf[1] = 0; buf[0] = value >> 8; + break; } ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2); @@ -675,25 +715,6 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value) return ret; } -/* This function is not exported to v4l1, so output values between 0 -> 256 */ -int pwc_get_shutter_speed(struct pwc_device *pdev, int *value) -{ - unsigned char buf[2]; - int ret; - - ret = RecvControlMsg(GET_STATUS_CTL, READ_SHUTTER_FORMATTER, 2); - if (ret < 0) - return ret; - *value = buf[0] + (buf[1] << 8); - if (DEVICE_USE_CODEC2(pdev->type)) { - /* speed ranges from 0x0 to 0x290 (656) */ - *value *= 256/656; - } else if (DEVICE_USE_CODEC3(pdev->type)) { - /* speed seems to range from 0x0 to 0xff */ - } - return 0; -} - /* POWER */ @@ -715,19 +736,19 @@ int pwc_camera_power(struct pwc_device *pdev, int power) /* private calls */ -int pwc_restore_user(struct pwc_device *pdev) +static inline int pwc_restore_user(struct pwc_device *pdev) { char buf; /* dummy */ return SendControlMsg(SET_STATUS_CTL, RESTORE_USER_DEFAULTS_FORMATTER, 0); } -int pwc_save_user(struct pwc_device *pdev) +static inline int pwc_save_user(struct pwc_device *pdev) { char buf; /* dummy */ return SendControlMsg(SET_STATUS_CTL, SAVE_USER_DEFAULTS_FORMATTER, 0); } -int pwc_restore_factory(struct pwc_device *pdev) +static inline int pwc_restore_factory(struct pwc_device *pdev) { char buf; /* dummy */ return SendControlMsg(SET_STATUS_CTL, RESTORE_FACTORY_DEFAULTS_FORMATTER, 0); @@ -745,7 +766,7 @@ int pwc_restore_factory(struct pwc_device *pdev) * 03: manual * 04: auto */ -int pwc_set_awb(struct pwc_device *pdev, int mode) +static inline int pwc_set_awb(struct pwc_device *pdev, int mode) { char buf; int ret; @@ -765,7 +786,7 @@ int pwc_set_awb(struct pwc_device *pdev, int mode) return 0; } -int pwc_get_awb(struct pwc_device *pdev) +static inline int pwc_get_awb(struct pwc_device *pdev) { unsigned char buf; int ret; @@ -777,7 +798,7 @@ int pwc_get_awb(struct pwc_device *pdev) return buf; } -int pwc_set_red_gain(struct pwc_device *pdev, int value) +static inline int pwc_set_red_gain(struct pwc_device *pdev, int value) { unsigned char buf; @@ -790,7 +811,7 @@ int pwc_set_red_gain(struct pwc_device *pdev, int value) return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1); } -int pwc_get_red_gain(struct pwc_device *pdev, int *value) +static inline int pwc_get_red_gain(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -803,7 +824,7 @@ int pwc_get_red_gain(struct pwc_device *pdev, int *value) } -int pwc_set_blue_gain(struct pwc_device *pdev, int value) +static inline int pwc_set_blue_gain(struct pwc_device *pdev, int value) { unsigned char buf; @@ -816,7 +837,7 @@ int pwc_set_blue_gain(struct pwc_device *pdev, int value) return SendControlMsg(SET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1); } -int pwc_get_blue_gain(struct pwc_device *pdev, int *value) +static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -833,7 +854,7 @@ int pwc_get_blue_gain(struct pwc_device *pdev, int *value) internal red/blue gains, which may be different from the manual gains set or read above. */ -static int pwc_read_red_gain(struct pwc_device *pdev, int *value) +static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -845,7 +866,7 @@ static int pwc_read_red_gain(struct pwc_device *pdev, int *value) return 0; } -static int pwc_read_blue_gain(struct pwc_device *pdev, int *value) +static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -858,7 +879,7 @@ static int pwc_read_blue_gain(struct pwc_device *pdev, int *value) } -static int pwc_set_wb_speed(struct pwc_device *pdev, int speed) +static inline int pwc_set_wb_speed(struct pwc_device *pdev, int speed) { unsigned char buf; @@ -867,7 +888,7 @@ static int pwc_set_wb_speed(struct pwc_device *pdev, int speed) return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1); } -static int pwc_get_wb_speed(struct pwc_device *pdev, int *value) +static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -880,7 +901,7 @@ static int pwc_get_wb_speed(struct pwc_device *pdev, int *value) } -static int pwc_set_wb_delay(struct pwc_device *pdev, int delay) +static inline int pwc_set_wb_delay(struct pwc_device *pdev, int delay) { unsigned char buf; @@ -889,7 +910,7 @@ static int pwc_set_wb_delay(struct pwc_device *pdev, int delay) return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1); } -static int pwc_get_wb_delay(struct pwc_device *pdev, int *value) +static inline int pwc_get_wb_delay(struct pwc_device *pdev, int *value) { unsigned char buf; int ret; @@ -944,7 +965,7 @@ static int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value) return 0; } -int pwc_set_contour(struct pwc_device *pdev, int contour) +static inline int pwc_set_contour(struct pwc_device *pdev, int contour) { unsigned char buf; int ret; @@ -969,7 +990,7 @@ int pwc_set_contour(struct pwc_device *pdev, int contour) return 0; } -int pwc_get_contour(struct pwc_device *pdev, int *contour) +static inline int pwc_get_contour(struct pwc_device *pdev, int *contour) { unsigned char buf; int ret; @@ -991,7 +1012,7 @@ int pwc_get_contour(struct pwc_device *pdev, int *contour) } -int pwc_set_backlight(struct pwc_device *pdev, int backlight) +static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight) { unsigned char buf; @@ -1002,7 +1023,7 @@ int pwc_set_backlight(struct pwc_device *pdev, int backlight) return SendControlMsg(SET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1); } -int pwc_get_backlight(struct pwc_device *pdev, int *backlight) +static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight) { int ret; unsigned char buf; @@ -1010,35 +1031,12 @@ int pwc_get_backlight(struct pwc_device *pdev, int *backlight) ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1); if (ret < 0) return ret; - *backlight = !!buf; + *backlight = buf; return 0; } -int pwc_set_colour_mode(struct pwc_device *pdev, int colour) -{ - unsigned char buf; - if (colour) - buf = 0xff; - else - buf = 0x0; - return SendControlMsg(SET_CHROM_CTL, COLOUR_MODE_FORMATTER, 1); -} - -int pwc_get_colour_mode(struct pwc_device *pdev, int *colour) -{ - int ret; - unsigned char buf; - - ret = RecvControlMsg(GET_CHROM_CTL, COLOUR_MODE_FORMATTER, 1); - if (ret < 0) - return ret; - *colour = !!buf; - return 0; -} - - -int pwc_set_flicker(struct pwc_device *pdev, int flicker) +static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker) { unsigned char buf; @@ -1049,7 +1047,7 @@ int pwc_set_flicker(struct pwc_device *pdev, int flicker) return SendControlMsg(SET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1); } -int pwc_get_flicker(struct pwc_device *pdev, int *flicker) +static inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker) { int ret; unsigned char buf; @@ -1057,11 +1055,12 @@ int pwc_get_flicker(struct pwc_device *pdev, int *flicker) ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1); if (ret < 0) return ret; - *flicker = !!buf; + *flicker = buf; return 0; } -int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) + +static inline int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) { unsigned char buf; @@ -1073,7 +1072,7 @@ int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) return SendControlMsg(SET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1); } -int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) +static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) { int ret; unsigned char buf; @@ -1085,7 +1084,7 @@ int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) return 0; } -static int _pwc_mpt_reset(struct pwc_device *pdev, int flags) +static int pwc_mpt_reset(struct pwc_device *pdev, int flags) { unsigned char buf; @@ -1093,18 +1092,7 @@ static int _pwc_mpt_reset(struct pwc_device *pdev, int flags) return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1); } -int pwc_mpt_reset(struct pwc_device *pdev, int flags) -{ - int ret; - ret = _pwc_mpt_reset(pdev, flags); - if (ret >= 0) { - pdev->pan_angle = 0; - pdev->tilt_angle = 0; - } - return ret; -} - -static int _pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) +static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) { unsigned char buf[4]; @@ -1122,35 +1110,7 @@ static int _pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) return SendControlMsg(SET_MPT_CTL, PT_RELATIVE_CONTROL_FORMATTER, 4); } -int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) -{ - int ret; - - /* check absolute ranges */ - if (pan < pdev->angle_range.pan_min || - pan > pdev->angle_range.pan_max || - tilt < pdev->angle_range.tilt_min || - tilt > pdev->angle_range.tilt_max) - return -ERANGE; - - /* go to relative range, check again */ - pan -= pdev->pan_angle; - tilt -= pdev->tilt_angle; - /* angles are specified in degrees * 100, thus the limit = 36000 */ - if (pan < -36000 || pan > 36000 || tilt < -36000 || tilt > 36000) - return -ERANGE; - - ret = _pwc_mpt_set_angle(pdev, pan, tilt); - if (ret >= 0) { - pdev->pan_angle += pan; - pdev->tilt_angle += tilt; - } - if (ret == -EPIPE) /* stall -> out of range */ - ret = -ERANGE; - return ret; -} - -static int pwc_mpt_get_status(struct pwc_device *pdev, struct pwc_mpt_status *status) +static inline int pwc_mpt_get_status(struct pwc_device *pdev, struct pwc_mpt_status *status) { int ret; unsigned char buf[5]; @@ -1191,26 +1151,6 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) /* End of Add-Ons */ /* ************************************************* */ -/* Linux 2.5.something and 2.6 pass direct pointers to arguments of - ioctl() calls. With 2.4, you have to do tedious copy_from_user() - and copy_to_user() calls. With these macros we circumvent this, - and let me maintain only one source file. The functionality is - exactly the same otherwise. - */ - - -/* define local variable for arg */ -#define ARG_DEF(ARG_type, ARG_name)\ - ARG_type *ARG_name = arg; -/* copy arg to local variable */ -#define ARG_IN(ARG_name) /* nothing */ -/* argument itself (referenced) */ -#define ARGR(ARG_name) (*ARG_name) -/* argument address */ -#define ARGA(ARG_name) ARG_name -/* copy local variable to arg */ -#define ARG_OUT(ARG_name) /* nothing */ - int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { @@ -1240,243 +1180,206 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) case VIDIOCPWCSCQUAL: { - ARG_DEF(int, qual) + int *qual = arg; - ARG_IN(qual) - if (ARGR(qual) < 0 || ARGR(qual) > 3) + if (*qual < 0 || *qual > 3) ret = -EINVAL; else - ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, ARGR(qual), pdev->vsnapshot); + ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, *qual, pdev->vsnapshot); if (ret >= 0) - pdev->vcompression = ARGR(qual); + pdev->vcompression = *qual; break; } case VIDIOCPWCGCQUAL: { - ARG_DEF(int, qual) - - ARGR(qual) = pdev->vcompression; - ARG_OUT(qual) + int *qual = arg; + *qual = pdev->vcompression; break; } case VIDIOCPWCPROBE: { - ARG_DEF(struct pwc_probe, probe) - - strcpy(ARGR(probe).name, pdev->vdev->name); - ARGR(probe).type = pdev->type; - ARG_OUT(probe) + struct pwc_probe *probe = arg; + strcpy(probe->name, pdev->vdev->name); + probe->type = pdev->type; break; } case VIDIOCPWCGSERIAL: { - ARG_DEF(struct pwc_serial, serial) - - strcpy(ARGR(serial).serial, pdev->serial); - ARG_OUT(serial) + struct pwc_serial *serial = arg; + strcpy(serial->serial, pdev->serial); break; } case VIDIOCPWCSAGC: { - ARG_DEF(int, agc) - - ARG_IN(agc) - if (pwc_set_agc(pdev, ARGR(agc) < 0 ? 1 : 0, ARGR(agc))) + int *agc = arg; + if (pwc_set_agc(pdev, *agc < 0 ? 1 : 0, *agc)) ret = -EINVAL; break; } case VIDIOCPWCGAGC: { - ARG_DEF(int, agc) + int *agc = arg; - if (pwc_get_agc(pdev, ARGA(agc))) + if (pwc_get_agc(pdev, agc)) ret = -EINVAL; - ARG_OUT(agc) break; } case VIDIOCPWCSSHUTTER: { - ARG_DEF(int, shutter_speed) - - ARG_IN(shutter_speed) - ret = pwc_set_shutter_speed(pdev, ARGR(shutter_speed) < 0 ? 1 : 0, ARGR(shutter_speed)); + int *shutter_speed = arg; + ret = pwc_set_shutter_speed(pdev, *shutter_speed < 0 ? 1 : 0, *shutter_speed); break; } case VIDIOCPWCSAWB: { - ARG_DEF(struct pwc_whitebalance, wb) + struct pwc_whitebalance *wb = arg; - ARG_IN(wb) - ret = pwc_set_awb(pdev, ARGR(wb).mode); - if (ret >= 0 && ARGR(wb).mode == PWC_WB_MANUAL) { - pwc_set_red_gain(pdev, ARGR(wb).manual_red); - pwc_set_blue_gain(pdev, ARGR(wb).manual_blue); + ret = pwc_set_awb(pdev, wb->mode); + if (ret >= 0 && wb->mode == PWC_WB_MANUAL) { + pwc_set_red_gain(pdev, wb->manual_red); + pwc_set_blue_gain(pdev, wb->manual_blue); } break; } case VIDIOCPWCGAWB: { - ARG_DEF(struct pwc_whitebalance, wb) + struct pwc_whitebalance *wb = arg; - memset(ARGA(wb), 0, sizeof(struct pwc_whitebalance)); - ARGR(wb).mode = pwc_get_awb(pdev); - if (ARGR(wb).mode < 0) + memset(wb, 0, sizeof(struct pwc_whitebalance)); + wb->mode = pwc_get_awb(pdev); + if (wb->mode < 0) ret = -EINVAL; else { - if (ARGR(wb).mode == PWC_WB_MANUAL) { - ret = pwc_get_red_gain(pdev, &ARGR(wb).manual_red); + if (wb->mode == PWC_WB_MANUAL) { + ret = pwc_get_red_gain(pdev, &wb->manual_red); if (ret < 0) break; - ret = pwc_get_blue_gain(pdev, &ARGR(wb).manual_blue); + ret = pwc_get_blue_gain(pdev, &wb->manual_blue); if (ret < 0) break; } - if (ARGR(wb).mode == PWC_WB_AUTO) { - ret = pwc_read_red_gain(pdev, &ARGR(wb).read_red); + if (wb->mode == PWC_WB_AUTO) { + ret = pwc_read_red_gain(pdev, &wb->read_red); if (ret < 0) break; - ret =pwc_read_blue_gain(pdev, &ARGR(wb).read_blue); + ret = pwc_read_blue_gain(pdev, &wb->read_blue); if (ret < 0) break; } } - ARG_OUT(wb) break; } case VIDIOCPWCSAWBSPEED: { - ARG_DEF(struct pwc_wb_speed, wbs) + struct pwc_wb_speed *wbs = arg; - if (ARGR(wbs).control_speed > 0) { - ret = pwc_set_wb_speed(pdev, ARGR(wbs).control_speed); + if (wbs->control_speed > 0) { + ret = pwc_set_wb_speed(pdev, wbs->control_speed); } - if (ARGR(wbs).control_delay > 0) { - ret = pwc_set_wb_delay(pdev, ARGR(wbs).control_delay); + if (wbs->control_delay > 0) { + ret = pwc_set_wb_delay(pdev, wbs->control_delay); } break; } case VIDIOCPWCGAWBSPEED: { - ARG_DEF(struct pwc_wb_speed, wbs) + struct pwc_wb_speed *wbs = arg; - ret = pwc_get_wb_speed(pdev, &ARGR(wbs).control_speed); + ret = pwc_get_wb_speed(pdev, &wbs->control_speed); if (ret < 0) break; - ret = pwc_get_wb_delay(pdev, &ARGR(wbs).control_delay); + ret = pwc_get_wb_delay(pdev, &wbs->control_delay); if (ret < 0) break; - ARG_OUT(wbs) break; } case VIDIOCPWCSLED: { - ARG_DEF(struct pwc_leds, leds) - - ARG_IN(leds) - ret = pwc_set_leds(pdev, ARGR(leds).led_on, ARGR(leds).led_off); - break; + struct pwc_leds *leds = arg; + ret = pwc_set_leds(pdev, leds->led_on, leds->led_off); + break; } case VIDIOCPWCGLED: { - ARG_DEF(struct pwc_leds, leds) - - ret = pwc_get_leds(pdev, &ARGR(leds).led_on, &ARGR(leds).led_off); - ARG_OUT(leds) + struct pwc_leds *leds = arg; + ret = pwc_get_leds(pdev, &leds->led_on, &leds->led_off); break; } case VIDIOCPWCSCONTOUR: { - ARG_DEF(int, contour) - - ARG_IN(contour) - ret = pwc_set_contour(pdev, ARGR(contour)); + int *contour = arg; + ret = pwc_set_contour(pdev, *contour); break; } case VIDIOCPWCGCONTOUR: { - ARG_DEF(int, contour) - - ret = pwc_get_contour(pdev, ARGA(contour)); - ARG_OUT(contour) + int *contour = arg; + ret = pwc_get_contour(pdev, contour); break; } case VIDIOCPWCSBACKLIGHT: { - ARG_DEF(int, backlight) - - ARG_IN(backlight) - ret = pwc_set_backlight(pdev, ARGR(backlight)); + int *backlight = arg; + ret = pwc_set_backlight(pdev, *backlight); break; } case VIDIOCPWCGBACKLIGHT: { - ARG_DEF(int, backlight) - - ret = pwc_get_backlight(pdev, ARGA(backlight)); - ARG_OUT(backlight) + int *backlight = arg; + ret = pwc_get_backlight(pdev, backlight); break; } case VIDIOCPWCSFLICKER: { - ARG_DEF(int, flicker) - - ARG_IN(flicker) - ret = pwc_set_flicker(pdev, ARGR(flicker)); + int *flicker = arg; + ret = pwc_set_flicker(pdev, *flicker); break; } case VIDIOCPWCGFLICKER: { - ARG_DEF(int, flicker) - - ret = pwc_get_flicker(pdev, ARGA(flicker)); - ARG_OUT(flicker) + int *flicker = arg; + ret = pwc_get_flicker(pdev, flicker); break; } case VIDIOCPWCSDYNNOISE: { - ARG_DEF(int, dynnoise) - - ARG_IN(dynnoise) - ret = pwc_set_dynamic_noise(pdev, ARGR(dynnoise)); + int *dynnoise = arg; + ret = pwc_set_dynamic_noise(pdev, *dynnoise); break; } case VIDIOCPWCGDYNNOISE: { - ARG_DEF(int, dynnoise) - - ret = pwc_get_dynamic_noise(pdev, ARGA(dynnoise)); - ARG_OUT(dynnoise); + int *dynnoise = arg; + ret = pwc_get_dynamic_noise(pdev, dynnoise); break; } case VIDIOCPWCGREALSIZE: { - ARG_DEF(struct pwc_imagesize, size) - - ARGR(size).width = pdev->image.x; - ARGR(size).height = pdev->image.y; - ARG_OUT(size) + struct pwc_imagesize *size = arg; + size->width = pdev->image.x; + size->height = pdev->image.y; break; } @@ -1484,10 +1387,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { if (pdev->features & FEATURE_MOTOR_PANTILT) { - ARG_DEF(int, flags) + int *flags = arg; - ARG_IN(flags) - ret = pwc_mpt_reset(pdev, ARGR(flags)); + ret = pwc_mpt_reset(pdev, *flags); + if (ret >= 0) + { + pdev->pan_angle = 0; + pdev->tilt_angle = 0; + } } else { @@ -1500,10 +1407,8 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { if (pdev->features & FEATURE_MOTOR_PANTILT) { - ARG_DEF(struct pwc_mpt_range, range) - - ARGR(range) = pdev->angle_range; - ARG_OUT(range) + struct pwc_mpt_range *range = arg; + *range = pdev->angle_range; } else { @@ -1518,23 +1423,48 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) if (pdev->features & FEATURE_MOTOR_PANTILT) { - ARG_DEF(struct pwc_mpt_angles, angles) - - ARG_IN(angles) + struct pwc_mpt_angles *angles = arg; /* The camera can only set relative angles, so do some calculations when getting an absolute angle . */ - if (ARGR(angles).absolute) + if (angles->absolute) { - new_pan = ARGR(angles).pan; - new_tilt = ARGR(angles).tilt; + new_pan = angles->pan; + new_tilt = angles->tilt; } else { - new_pan = pdev->pan_angle + ARGR(angles).pan; - new_tilt = pdev->tilt_angle + ARGR(angles).tilt; + new_pan = pdev->pan_angle + angles->pan; + new_tilt = pdev->tilt_angle + angles->tilt; + } + /* check absolute ranges */ + if (new_pan < pdev->angle_range.pan_min || + new_pan > pdev->angle_range.pan_max || + new_tilt < pdev->angle_range.tilt_min || + new_tilt > pdev->angle_range.tilt_max) + { + ret = -ERANGE; + } + else + { + /* go to relative range, check again */ + new_pan -= pdev->pan_angle; + new_tilt -= pdev->tilt_angle; + /* angles are specified in degrees * 100, thus the limit = 36000 */ + if (new_pan < -36000 || new_pan > 36000 || new_tilt < -36000 || new_tilt > 36000) + ret = -ERANGE; + } + if (ret == 0) /* no errors so far */ + { + ret = pwc_mpt_set_angle(pdev, new_pan, new_tilt); + if (ret >= 0) + { + pdev->pan_angle += new_pan; + pdev->tilt_angle += new_tilt; + } + if (ret == -EPIPE) /* stall -> out of range */ + ret = -ERANGE; } - ret = pwc_mpt_set_angle(pdev, new_pan, new_tilt); } else { @@ -1548,12 +1478,11 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) if (pdev->features & FEATURE_MOTOR_PANTILT) { - ARG_DEF(struct pwc_mpt_angles, angles) + struct pwc_mpt_angles *angles = arg; - ARGR(angles).absolute = 1; - ARGR(angles).pan = pdev->pan_angle; - ARGR(angles).tilt = pdev->tilt_angle; - ARG_OUT(angles) + angles->absolute = 1; + angles->pan = pdev->pan_angle; + angles->tilt = pdev->tilt_angle; } else { @@ -1566,10 +1495,8 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { if (pdev->features & FEATURE_MOTOR_PANTILT) { - ARG_DEF(struct pwc_mpt_status, status) - - ret = pwc_mpt_get_status(pdev, ARGA(status)); - ARG_OUT(status) + struct pwc_mpt_status *status = arg; + ret = pwc_mpt_get_status(pdev, status); } else { @@ -1580,24 +1507,22 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) case VIDIOCPWCGVIDCMD: { - ARG_DEF(struct pwc_video_command, cmd); - - ARGR(cmd).type = pdev->type; - ARGR(cmd).release = pdev->release; - ARGR(cmd).command_len = pdev->cmd_len; - memcpy(&ARGR(cmd).command_buf, pdev->cmd_buf, pdev->cmd_len); - ARGR(cmd).bandlength = pdev->vbandlength; - ARGR(cmd).frame_size = pdev->frame_size; - ARG_OUT(cmd) + struct pwc_video_command *cmd = arg; + + cmd->type = pdev->type; + cmd->release = pdev->release; + cmd->command_len = pdev->cmd_len; + memcpy(&cmd->command_buf, pdev->cmd_buf, pdev->cmd_len); + cmd->bandlength = pdev->vbandlength; + cmd->frame_size = pdev->frame_size; break; } /* case VIDIOCPWCGVIDTABLE: { - ARG_DEF(struct pwc_table_init_buffer, table); - ARGR(table).len = pdev->cmd_len; - memcpy(&ARGR(table).buffer, pdev->decompress_data, pdev->decompressor->table_size); - ARG_OUT(table) + struct pwc_table_init_buffer *table = arg; + table->len = pdev->cmd_len; + memcpy(&table->buffer, pdev->decompress_data, pdev->decompressor->table_size); break; } */ @@ -1613,4 +1538,4 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) } -/* vim: set cinoptions= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ + diff --git a/drivers/media/video/pwc/pwc-dec1.c b/drivers/media/video/pwc/pwc-dec1.c deleted file mode 100644 index c29593f58..000000000 --- a/drivers/media/video/pwc/pwc-dec1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Linux driver for Philips webcam - Decompression for chipset version 1 - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - 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 "pwc-dec1.h" - - -void pwc_dec1_init(int type, int release, void *buffer, void *table) -{ - -} - -void pwc_dec1_exit(void) -{ - - - -} - -int pwc_dec1_alloc(struct pwc_device *pwc) -{ - pwc->decompress_data = kmalloc(sizeof(struct pwc_dec1_private), GFP_KERNEL); - if (pwc->decompress_data == NULL) - return -ENOMEM; - return 0; -} - diff --git a/drivers/media/video/pwc/pwc-dec1.h b/drivers/media/video/pwc/pwc-dec1.h deleted file mode 100644 index 8b62ddcc5..000000000 --- a/drivers/media/video/pwc/pwc-dec1.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - 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 PWC_DEC1_H -#define PWC_DEC1_H - -#include "pwc.h" - -struct pwc_dec1_private -{ - int version; - -}; - -int pwc_dec1_alloc(struct pwc_device *pwc); -void pwc_dec1_init(int type, int release, void *buffer, void *private_data); -void pwc_dec1_exit(void); - -#endif - diff --git a/drivers/media/video/pwc/pwc-dec23.c b/drivers/media/video/pwc/pwc-dec23.c deleted file mode 100644 index 9e2d91f26..000000000 --- a/drivers/media/video/pwc/pwc-dec23.c +++ /dev/null @@ -1,941 +0,0 @@ -/* Linux driver for Philips webcam - Decompression for chipset version 2 et 3 - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - 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 "pwc-timon.h" -#include "pwc-kiara.h" -#include "pwc-dec23.h" -#include - -#include - -/* - * USE_LOOKUP_TABLE_TO_CLAMP - * 0: use a C version of this tests: { a<0?0:(a>255?255:a) } - * 1: use a faster lookup table for cpu with a big cache (intel) - */ -#define USE_LOOKUP_TABLE_TO_CLAMP 1 -/* - * UNROLL_LOOP_FOR_COPYING_BLOCK - * 0: use a loop for a smaller code (but little slower) - * 1: when unrolling the loop, gcc produces some faster code (perhaps only - * valid for intel processor class). Activating this option, automaticaly - * activate USE_LOOKUP_TABLE_TO_CLAMP - */ -#define UNROLL_LOOP_FOR_COPY 1 -#if UNROLL_LOOP_FOR_COPY -# undef USE_LOOKUP_TABLE_TO_CLAMP -# define USE_LOOKUP_TABLE_TO_CLAMP 1 -#endif - -/* - * ENABLE_BAYER_DECODER - * 0: bayer decoder is not build (save some space) - * 1: bayer decoder is build and can be used - */ -#define ENABLE_BAYER_DECODER 0 - -static void build_subblock_pattern(struct pwc_dec23_private *pdec) -{ - static const unsigned int initial_values[12] = { - -0x526500, -0x221200, 0x221200, 0x526500, - -0x3de200, 0x3de200, - -0x6db480, -0x2d5d00, 0x2d5d00, 0x6db480, - -0x12c200, 0x12c200 - - }; - static const unsigned int values_derivated[12] = { - 0xa4ca, 0x4424, -0x4424, -0xa4ca, - 0x7bc4, -0x7bc4, - 0xdb69, 0x5aba, -0x5aba, -0xdb69, - 0x2584, -0x2584 - }; - unsigned int temp_values[12]; - int i, j; - - memcpy(temp_values, initial_values, sizeof(initial_values)); - for (i = 0; i < 256; i++) { - for (j = 0; j < 12; j++) { - pdec->table_subblock[i][j] = temp_values[j]; - temp_values[j] += values_derivated[j]; - } - } -} - -static void build_bit_powermask_table(struct pwc_dec23_private *pdec) -{ - unsigned char *p; - unsigned int bit, byte, mask, val; - unsigned int bitpower = 1; - - for (bit = 0; bit < 8; bit++) { - mask = bitpower - 1; - p = pdec->table_bitpowermask[bit]; - for (byte = 0; byte < 256; byte++) { - val = (byte & mask); - if (byte & bitpower) - val = -val; - *p++ = val; - } - bitpower<<=1; - } -} - - -static void build_table_color(const unsigned int romtable[16][8], - unsigned char p0004[16][1024], - unsigned char p8004[16][256]) -{ - int compression_mode, j, k, bit, pw; - unsigned char *p0, *p8; - const unsigned int *r; - - /* We have 16 compressions tables */ - for (compression_mode = 0; compression_mode < 16; compression_mode++) { - p0 = p0004[compression_mode]; - p8 = p8004[compression_mode]; - r = romtable[compression_mode]; - - for (j = 0; j < 8; j++, r++, p0 += 128) { - - for (k = 0; k < 16; k++) { - if (k == 0) - bit = 1; - else if (k >= 1 && k < 3) - bit = (r[0] >> 15) & 7; - else if (k >= 3 && k < 6) - bit = (r[0] >> 12) & 7; - else if (k >= 6 && k < 10) - bit = (r[0] >> 9) & 7; - else if (k >= 10 && k < 13) - bit = (r[0] >> 6) & 7; - else if (k >= 13 && k < 15) - bit = (r[0] >> 3) & 7; - else - bit = (r[0]) & 7; - if (k == 0) - *p8++ = 8; - else - *p8++ = j - bit; - *p8++ = bit; - - pw = 1 << bit; - p0[k + 0x00] = (1 * pw) + 0x80; - p0[k + 0x10] = (2 * pw) + 0x80; - p0[k + 0x20] = (3 * pw) + 0x80; - p0[k + 0x30] = (4 * pw) + 0x80; - p0[k + 0x40] = (-1 * pw) + 0x80; - p0[k + 0x50] = (-2 * pw) + 0x80; - p0[k + 0x60] = (-3 * pw) + 0x80; - p0[k + 0x70] = (-4 * pw) + 0x80; - } /* end of for (k=0; k<16; k++, p8++) */ - } /* end of for (j=0; j<8; j++ , table++) */ - } /* end of foreach compression_mode */ -} - -/* - * - */ -static void fill_table_dc00_d800(struct pwc_dec23_private *pdec) -{ -#define SCALEBITS 15 -#define ONE_HALF (1UL << (SCALEBITS - 1)) - int i; - unsigned int offset1 = ONE_HALF; - unsigned int offset2 = 0x0000; - - for (i=0; i<256; i++) { - pdec->table_dc00[i] = offset1 & ~(ONE_HALF); - pdec->table_d800[i] = offset2; - - offset1 += 0x7bc4; - offset2 += 0x7bc4; - } -} - -/* - * To decode the stream: - * if look_bits(2) == 0: # op == 2 in the lookup table - * skip_bits(2) - * end of the stream - * elif look_bits(3) == 7: # op == 1 in the lookup table - * skip_bits(3) - * yyyy = get_bits(4) - * xxxx = get_bits(8) - * else: # op == 0 in the lookup table - * skip_bits(x) - * - * For speedup processing, we build a lookup table and we takes the first 6 bits. - * - * struct { - * unsigned char op; // operation to execute - * unsigned char bits; // bits use to perform operation - * unsigned char offset1; // offset to add to access in the table_0004 % 16 - * unsigned char offset2; // offset to add to access in the table_0004 - * } - * - * How to build this table ? - * op == 2 when (i%4)==0 - * op == 1 when (i%8)==7 - * op == 0 otherwise - * - */ -static const unsigned char hash_table_ops[64*4] = { - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x10, - 0x00, 0x06, 0x01, 0x30, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x01, 0x20, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x50, - 0x00, 0x05, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x03, 0x00, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x10, - 0x00, 0x06, 0x02, 0x10, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x01, 0x60, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x50, - 0x00, 0x05, 0x02, 0x40, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x03, 0x40, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x10, - 0x00, 0x06, 0x01, 0x70, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x01, 0x20, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x50, - 0x00, 0x05, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x03, 0x00, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x10, - 0x00, 0x06, 0x02, 0x50, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x01, 0x60, - 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x00, - 0x00, 0x04, 0x01, 0x50, - 0x00, 0x05, 0x02, 0x40, - 0x02, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x01, 0x40, - 0x00, 0x05, 0x03, 0x40, - 0x01, 0x00, 0x00, 0x00 -}; - -/* - * - */ -static const unsigned int MulIdx[16][16] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,}, - {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,}, - {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,}, - {4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4,}, - {6, 7, 8, 9, 7, 10, 11, 8, 8, 11, 10, 7, 9, 8, 7, 6,}, - {4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4,}, - {1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2,}, - {0, 3, 3, 0, 1, 2, 2, 1, 2, 1, 1, 2, 3, 0, 0, 3,}, - {0, 1, 2, 3, 3, 2, 1, 0, 3, 2, 1, 0, 0, 1, 2, 3,}, - {1, 1, 1, 1, 3, 3, 3, 3, 0, 0, 0, 0, 2, 2, 2, 2,}, - {7, 10, 11, 8, 9, 8, 7, 6, 6, 7, 8, 9, 8, 11, 10, 7,}, - {4, 5, 5, 4, 5, 4, 4, 5, 5, 4, 4, 5, 4, 5, 5, 4,}, - {7, 9, 6, 8, 10, 8, 7, 11, 11, 7, 8, 10, 8, 6, 9, 7,}, - {1, 3, 0, 2, 2, 0, 3, 1, 2, 0, 3, 1, 1, 3, 0, 2,}, - {1, 2, 2, 1, 3, 0, 0, 3, 0, 3, 3, 0, 2, 1, 1, 2,}, - {10, 8, 7, 11, 8, 6, 9, 7, 7, 9, 6, 8, 11, 7, 8, 10} -}; - -#if USE_LOOKUP_TABLE_TO_CLAMP -#define MAX_OUTER_CROP_VALUE (512) -static unsigned char pwc_crop_table[256 + 2*MAX_OUTER_CROP_VALUE]; -#define CLAMP(x) (pwc_crop_table[MAX_OUTER_CROP_VALUE+(x)]) -#else -#define CLAMP(x) ((x)>255?255:((x)<0?0:x)) -#endif - - -/* If the type or the command change, we rebuild the lookup table */ -int pwc_dec23_init(struct pwc_device *pwc, int type, unsigned char *cmd) -{ - int flags, version, shift, i; - struct pwc_dec23_private *pdec; - - if (pwc->decompress_data == NULL) { - pdec = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); - if (pdec == NULL) - return -ENOMEM; - pwc->decompress_data = pdec; - } - pdec = pwc->decompress_data; - - if (DEVICE_USE_CODEC3(type)) { - flags = cmd[2] & 0x18; - if (flags == 8) - pdec->nbits = 7; /* More bits, mean more bits to encode the stream, but better quality */ - else if (flags == 0x10) - pdec->nbits = 8; - else - pdec->nbits = 6; - - version = cmd[2] >> 5; - build_table_color(KiaraRomTable[version][0], pdec->table_0004_pass1, pdec->table_8004_pass1); - build_table_color(KiaraRomTable[version][1], pdec->table_0004_pass2, pdec->table_8004_pass2); - - } else { - - flags = cmd[2] & 6; - if (flags == 2) - pdec->nbits = 7; - else if (flags == 4) - pdec->nbits = 8; - else - pdec->nbits = 6; - - version = cmd[2] >> 3; - build_table_color(TimonRomTable[version][0], pdec->table_0004_pass1, pdec->table_8004_pass1); - build_table_color(TimonRomTable[version][1], pdec->table_0004_pass2, pdec->table_8004_pass2); - } - - /* Informations can be coded on a variable number of bits but never less than 8 */ - shift = 8 - pdec->nbits; - pdec->scalebits = SCALEBITS - shift; - pdec->nbitsmask = 0xFF >> shift; - - fill_table_dc00_d800(pdec); - build_subblock_pattern(pdec); - build_bit_powermask_table(pdec); - -#if USE_LOOKUP_TABLE_TO_CLAMP - /* Build the static table to clamp value [0-255] */ - for (i=0;i> scalebits]; - *d++ = cm[c[1] >> scalebits]; - *d++ = cm[c[2] >> scalebits]; - *d++ = cm[c[3] >> scalebits]; - - d = dst + bytes_per_line; - *d++ = cm[c[4] >> scalebits]; - *d++ = cm[c[5] >> scalebits]; - *d++ = cm[c[6] >> scalebits]; - *d++ = cm[c[7] >> scalebits]; - - d = dst + bytes_per_line*2; - *d++ = cm[c[8] >> scalebits]; - *d++ = cm[c[9] >> scalebits]; - *d++ = cm[c[10] >> scalebits]; - *d++ = cm[c[11] >> scalebits]; - - d = dst + bytes_per_line*3; - *d++ = cm[c[12] >> scalebits]; - *d++ = cm[c[13] >> scalebits]; - *d++ = cm[c[14] >> scalebits]; - *d++ = cm[c[15] >> scalebits]; -#else - int i; - const int *c = src; - unsigned char *d = dst; - for (i = 0; i < 4; i++, c++) - *d++ = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line; - for (i = 0; i < 4; i++, c++) - *d++ = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line*2; - for (i = 0; i < 4; i++, c++) - *d++ = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line*3; - for (i = 0; i < 4; i++, c++) - *d++ = CLAMP((*c) >> scalebits); -#endif -} - -/* - * Copy the 4x4 image block to a CrCb plane buffer - * - */ -static void copy_image_block_CrCb(const int *src, unsigned char *dst, unsigned int bytes_per_line, unsigned int scalebits) -{ -#if UNROLL_LOOP_FOR_COPY - /* Unroll all loops */ - const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE; - const int *c = src; - unsigned char *d = dst; - - *d++ = cm[c[0] >> scalebits]; - *d++ = cm[c[4] >> scalebits]; - *d++ = cm[c[1] >> scalebits]; - *d++ = cm[c[5] >> scalebits]; - *d++ = cm[c[2] >> scalebits]; - *d++ = cm[c[6] >> scalebits]; - *d++ = cm[c[3] >> scalebits]; - *d++ = cm[c[7] >> scalebits]; - - d = dst + bytes_per_line; - *d++ = cm[c[12] >> scalebits]; - *d++ = cm[c[8] >> scalebits]; - *d++ = cm[c[13] >> scalebits]; - *d++ = cm[c[9] >> scalebits]; - *d++ = cm[c[14] >> scalebits]; - *d++ = cm[c[10] >> scalebits]; - *d++ = cm[c[15] >> scalebits]; - *d++ = cm[c[11] >> scalebits]; -#else - int i; - const int *c1 = src; - const int *c2 = src + 4; - unsigned char *d = dst; - - for (i = 0; i < 4; i++, c1++, c2++) { - *d++ = CLAMP((*c1) >> scalebits); - *d++ = CLAMP((*c2) >> scalebits); - } - c1 = src + 12; - d = dst + bytes_per_line; - for (i = 0; i < 4; i++, c1++, c2++) { - *d++ = CLAMP((*c1) >> scalebits); - *d++ = CLAMP((*c2) >> scalebits); - } -#endif -} - -#if ENABLE_BAYER_DECODER -/* - * Format: 8x2 pixels - * . G . G . G . G . G . G . G - * . . . . . . . . . . . . . . - * . G . G . G . G . G . G . G - * . . . . . . . . . . . . . . - * or - * . . . . . . . . . . . . . . - * G . G . G . G . G . G . G . - * . . . . . . . . . . . . . . - * G . G . G . G . G . G . G . -*/ -static void copy_image_block_Green(const int *src, unsigned char *dst, unsigned int bytes_per_line, unsigned int scalebits) -{ -#if UNROLL_LOOP_FOR_COPY - /* Unroll all loops */ - const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE; - unsigned char *d = dst; - const int *c = src; - - d[0] = cm[c[0] >> scalebits]; - d[2] = cm[c[1] >> scalebits]; - d[4] = cm[c[2] >> scalebits]; - d[6] = cm[c[3] >> scalebits]; - d[8] = cm[c[4] >> scalebits]; - d[10] = cm[c[5] >> scalebits]; - d[12] = cm[c[6] >> scalebits]; - d[14] = cm[c[7] >> scalebits]; - - d = dst + bytes_per_line; - d[0] = cm[c[8] >> scalebits]; - d[2] = cm[c[9] >> scalebits]; - d[4] = cm[c[10] >> scalebits]; - d[6] = cm[c[11] >> scalebits]; - d[8] = cm[c[12] >> scalebits]; - d[10] = cm[c[13] >> scalebits]; - d[12] = cm[c[14] >> scalebits]; - d[14] = cm[c[15] >> scalebits]; -#else - int i; - unsigned char *d; - const int *c = src; - - d = dst; - for (i = 0; i < 8; i++, c++) - d[i*2] = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line; - for (i = 0; i < 8; i++, c++) - d[i*2] = CLAMP((*c) >> scalebits); -#endif -} -#endif - -#if ENABLE_BAYER_DECODER -/* - * Format: 4x4 pixels - * R . R . R . R - * . B . B . B . - * R . R . R . R - * . B . B . B . - */ -static void copy_image_block_RedBlue(const int *src, unsigned char *dst, unsigned int bytes_per_line, unsigned int scalebits) -{ -#if UNROLL_LOOP_FOR_COPY - /* Unroll all loops */ - const unsigned char *cm = pwc_crop_table+MAX_OUTER_CROP_VALUE; - unsigned char *d = dst; - const int *c = src; - - d[0] = cm[c[0] >> scalebits]; - d[2] = cm[c[1] >> scalebits]; - d[4] = cm[c[2] >> scalebits]; - d[6] = cm[c[3] >> scalebits]; - - d = dst + bytes_per_line; - d[1] = cm[c[4] >> scalebits]; - d[3] = cm[c[5] >> scalebits]; - d[5] = cm[c[6] >> scalebits]; - d[7] = cm[c[7] >> scalebits]; - - d = dst + bytes_per_line*2; - d[0] = cm[c[8] >> scalebits]; - d[2] = cm[c[9] >> scalebits]; - d[4] = cm[c[10] >> scalebits]; - d[6] = cm[c[11] >> scalebits]; - - d = dst + bytes_per_line*3; - d[1] = cm[c[12] >> scalebits]; - d[3] = cm[c[13] >> scalebits]; - d[5] = cm[c[14] >> scalebits]; - d[7] = cm[c[15] >> scalebits]; -#else - int i; - unsigned char *d; - const int *c = src; - - d = dst; - for (i = 0; i < 4; i++, c++) - d[i*2] = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line; - for (i = 0; i < 4; i++, c++) - d[i*2+1] = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line*2; - for (i = 0; i < 4; i++, c++) - d[i*2] = CLAMP((*c) >> scalebits); - - d = dst + bytes_per_line*3; - for (i = 0; i < 4; i++, c++) - d[i*2+1] = CLAMP((*c) >> scalebits); -#endif -} -#endif - -/* - * To manage the stream, we keep bits in a 32 bits register. - * fill_nbits(n): fill the reservoir with at least n bits - * skip_bits(n): discard n bits from the reservoir - * get_bits(n): fill the reservoir, returns the first n bits and discard the - * bits from the reservoir. - * __get_nbits(n): faster version of get_bits(n), but asumes that the reservoir - * contains at least n bits. bits returned is discarded. - */ -#define fill_nbits(pdec, nbits_wanted) do { \ - while (pdec->nbits_in_reservoir<(nbits_wanted)) \ - { \ - pdec->reservoir |= (*(pdec->stream)++) << (pdec->nbits_in_reservoir); \ - pdec->nbits_in_reservoir += 8; \ - } \ -} while(0); - -#define skip_nbits(pdec, nbits_to_skip) do { \ - pdec->reservoir >>= (nbits_to_skip); \ - pdec->nbits_in_reservoir -= (nbits_to_skip); \ -} while(0); - -#define get_nbits(pdec, nbits_wanted, result) do { \ - fill_nbits(pdec, nbits_wanted); \ - result = (pdec->reservoir) & ((1U<<(nbits_wanted))-1); \ - skip_nbits(pdec, nbits_wanted); \ -} while(0); - -#define __get_nbits(pdec, nbits_wanted, result) do { \ - result = (pdec->reservoir) & ((1U<<(nbits_wanted))-1); \ - skip_nbits(pdec, nbits_wanted); \ -} while(0); - -#define look_nbits(pdec, nbits_wanted) \ - ((pdec->reservoir) & ((1U<<(nbits_wanted))-1)) - -/* - * Decode a 4x4 pixel block - */ -static void decode_block(struct pwc_dec23_private *pdec, - const unsigned char *ptable0004, - const unsigned char *ptable8004) -{ - unsigned int primary_color; - unsigned int channel_v, offset1, op; - int i; - - fill_nbits(pdec, 16); - __get_nbits(pdec, pdec->nbits, primary_color); - - if (look_nbits(pdec,2) == 0) { - skip_nbits(pdec, 2); - /* Very simple, the color is the same for all pixels of the square */ - for (i = 0; i < 16; i++) - pdec->temp_colors[i] = pdec->table_dc00[primary_color]; - - return; - } - - /* This block is encoded with small pattern */ - for (i = 0; i < 16; i++) - pdec->temp_colors[i] = pdec->table_d800[primary_color]; - - __get_nbits(pdec, 3, channel_v); - channel_v = ((channel_v & 1) << 2) | (channel_v & 2) | ((channel_v & 4) >> 2); - - ptable0004 += (channel_v * 128); - ptable8004 += (channel_v * 32); - - offset1 = 0; - do - { - unsigned int htable_idx, rows = 0; - const unsigned int *block; - - /* [ zzzz y x x ] - * xx == 00 :=> end of the block def, remove the two bits from the stream - * yxx == 111 - * yxx == any other value - * - */ - fill_nbits(pdec, 16); - htable_idx = look_nbits(pdec, 6); - op = hash_table_ops[htable_idx * 4]; - - if (op == 2) { - skip_nbits(pdec, 2); - - } else if (op == 1) { - /* 15bits [ xxxx xxxx yyyy 111 ] - * yyy => offset in the table8004 - * xxx => offset in the tabled004 (tree) - */ - unsigned int mask, shift; - unsigned int nbits, col1; - unsigned int yyyy; - - skip_nbits(pdec, 3); - /* offset1 += yyyy */ - __get_nbits(pdec, 4, yyyy); - offset1 += 1 + yyyy; - offset1 &= 0x0F; - nbits = ptable8004[offset1 * 2]; - - /* col1 = xxxx xxxx */ - __get_nbits(pdec, nbits+1, col1); - - /* Bit mask table */ - mask = pdec->table_bitpowermask[nbits][col1]; - shift = ptable8004[offset1 * 2 + 1]; - rows = ((mask << shift) + 0x80) & 0xFF; - - block = pdec->table_subblock[rows]; - for (i = 0; i < 16; i++) - pdec->temp_colors[i] += block[MulIdx[offset1][i]]; - - } else { - /* op == 0 - * offset1 is coded on 3 bits - */ - unsigned int shift; - - offset1 += hash_table_ops [htable_idx * 4 + 2]; - offset1 &= 0x0F; - - rows = ptable0004[offset1 + hash_table_ops [htable_idx * 4 + 3]]; - block = pdec->table_subblock[rows]; - for (i = 0; i < 16; i++) - pdec->temp_colors[i] += block[MulIdx[offset1][i]]; - - shift = hash_table_ops[htable_idx * 4 + 1]; - skip_nbits(pdec, shift); - } - - } while (op != 2); - -} - -static void DecompressBand23(struct pwc_dec23_private *pdec, - const unsigned char *rawyuv, - unsigned char *planar_y, - unsigned char *planar_u, - unsigned char *planar_v, - unsigned int compressed_image_width, - unsigned int real_image_width) -{ - int compression_index, nblocks; - const unsigned char *ptable0004; - const unsigned char *ptable8004; - - pdec->reservoir = 0; - pdec->nbits_in_reservoir = 0; - pdec->stream = rawyuv + 1; /* The first byte of the stream is skipped */ - - get_nbits(pdec, 4, compression_index); - - /* pass 1: uncompress Y component */ - nblocks = compressed_image_width / 4; - - ptable0004 = pdec->table_0004_pass1[compression_index]; - ptable8004 = pdec->table_8004_pass1[compression_index]; - - /* Each block decode a square of 4x4 */ - while (nblocks) { - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_Y(pdec->temp_colors, planar_y, real_image_width, pdec->scalebits); - planar_y += 4; - nblocks--; - } - - /* pass 2: uncompress UV component */ - nblocks = compressed_image_width / 8; - - ptable0004 = pdec->table_0004_pass2[compression_index]; - ptable8004 = pdec->table_8004_pass2[compression_index]; - - /* Each block decode a square of 4x4 */ - while (nblocks) { - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_CrCb(pdec->temp_colors, planar_u, real_image_width/2, pdec->scalebits); - - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_CrCb(pdec->temp_colors, planar_v, real_image_width/2, pdec->scalebits); - - planar_v += 8; - planar_u += 8; - nblocks -= 2; - } - -} - -#if ENABLE_BAYER_DECODER -/* - * Size need to be a multiple of 8 in width - * - * Return a block of four line encoded like this: - * - * G R G R G R G R G R G R G R G R - * B G B G B G B G B G B G B G B G - * G R G R G R G R G R G R G R G R - * B G B G B G B G B G B G B G B G - * - */ -static void DecompressBandBayer(struct pwc_dec23_private *pdec, - const unsigned char *rawyuv, - unsigned char *rgbbayer, - unsigned int compressed_image_width, - unsigned int real_image_width) -{ - int compression_index, nblocks; - const unsigned char *ptable0004; - const unsigned char *ptable8004; - unsigned char *dest; - - pdec->reservoir = 0; - pdec->nbits_in_reservoir = 0; - pdec->stream = rawyuv + 1; /* The first byte of the stream is skipped */ - - get_nbits(pdec, 4, compression_index); - - /* pass 1: uncompress RB component */ - nblocks = compressed_image_width / 4; - - ptable0004 = pdec->table_0004_pass1[compression_index]; - ptable8004 = pdec->table_8004_pass1[compression_index]; - dest = rgbbayer; - - /* Each block decode a square of 4x4 */ - while (nblocks) { - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_RedBlue(pdec->temp_colors, rgbbayer, real_image_width, pdec->scalebits); - dest += 8; - nblocks--; - } - - /* pass 2: uncompress G component */ - nblocks = compressed_image_width / 8; - - ptable0004 = pdec->table_0004_pass2[compression_index]; - ptable8004 = pdec->table_8004_pass2[compression_index]; - - /* Each block decode a square of 4x4 */ - while (nblocks) { - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_Green(pdec->temp_colors, rgbbayer+1, real_image_width, pdec->scalebits); - - decode_block(pdec, ptable0004, ptable8004); - copy_image_block_Green(pdec->temp_colors, rgbbayer+real_image_width, real_image_width, pdec->scalebits); - - rgbbayer += 16; - nblocks -= 2; - } -} -#endif - - -/** - * - * Uncompress a pwc23 buffer. - * - * pwc.view: size of the image wanted - * pwc.image: size of the image returned by the camera - * pwc.offset: (x,y) to displayer image in the view - * - * src: raw data - * dst: image output - * flags: PWCX_FLAG_PLANAR or PWCX_FLAG_BAYER - */ -void pwc_dec23_decompress(const struct pwc_device *pwc, - const void *src, - void *dst, - int flags) -{ - int bandlines_left, stride, bytes_per_block; - - bandlines_left = pwc->image.y / 4; - bytes_per_block = pwc->view.x * 4; - - if (flags & PWCX_FLAG_BAYER) { -#if ENABLE_BAYER_DECODER - /* RGB Bayer format */ - unsigned char *rgbout; - - stride = pwc->view.x * pwc->offset.y; - rgbout = dst + stride + pwc->offset.x; - - - while (bandlines_left--) { - - DecompressBandBayer(pwc->decompress_data, - src, - rgbout, - pwc->image.x, pwc->view.x); - - src += pwc->vbandlength; - rgbout += bytes_per_block; - - } -#else - memset(dst, 0, pwc->view.x * pwc->view.y); -#endif - - } else { - /* YUV420P image format */ - unsigned char *pout_planar_y; - unsigned char *pout_planar_u; - unsigned char *pout_planar_v; - unsigned int plane_size; - - plane_size = pwc->view.x * pwc->view.y; - - /* offset in Y plane */ - stride = pwc->view.x * pwc->offset.y; - pout_planar_y = dst + stride + pwc->offset.x; - - /* offsets in U/V planes */ - stride = (pwc->view.x * pwc->offset.y) / 4 + pwc->offset.x / 2; - pout_planar_u = dst + plane_size + stride; - pout_planar_v = dst + plane_size + plane_size / 4 + stride; - - while (bandlines_left--) { - - DecompressBand23(pwc->decompress_data, - src, - pout_planar_y, pout_planar_u, pout_planar_v, - pwc->image.x, pwc->view.x); - src += pwc->vbandlength; - pout_planar_y += bytes_per_block; - pout_planar_u += pwc->view.x; - pout_planar_v += pwc->view.x; - - } - - } - -} - -void pwc_dec23_exit(void) -{ - /* Do nothing */ - -} - -/** - * Allocate a private structure used by lookup table. - * You must call kfree() to free the memory allocated. - */ -int pwc_dec23_alloc(struct pwc_device *pwc) -{ - pwc->decompress_data = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); - if (pwc->decompress_data == NULL) - return -ENOMEM; - return 0; -} - -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ diff --git a/drivers/media/video/pwc/pwc-dec23.h b/drivers/media/video/pwc/pwc-dec23.h deleted file mode 100644 index 1c55298ad..000000000 --- a/drivers/media/video/pwc/pwc-dec23.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - 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 PWC_DEC23_H -#define PWC_DEC23_H - -#include "pwc.h" - -struct pwc_dec23_private -{ - unsigned int scalebits; - unsigned int nbitsmask, nbits; /* Number of bits of a color in the compressed stream */ - - unsigned int reservoir; - unsigned int nbits_in_reservoir; - const unsigned char *stream; - int temp_colors[16]; - - unsigned char table_0004_pass1[16][1024]; - unsigned char table_0004_pass2[16][1024]; - unsigned char table_8004_pass1[16][256]; - unsigned char table_8004_pass2[16][256]; - unsigned int table_subblock[256][12]; - - unsigned char table_bitpowermask[8][256]; - unsigned int table_d800[256]; - unsigned int table_dc00[256]; - -}; - - -int pwc_dec23_alloc(struct pwc_device *pwc); -int pwc_dec23_init(struct pwc_device *pwc, int type, unsigned char *cmd); -void pwc_dec23_exit(void); -void pwc_dec23_decompress(const struct pwc_device *pwc, - const void *src, - void *dst, - int flags); - - - -#endif - - -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ - diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index d4703944d..41418294a 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -1,7 +1,7 @@ /* Linux driver for Philips webcam USB and Video4Linux interface part. (C) 1999-2004 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -62,21 +62,18 @@ #include #include #include -#include #include -#include #include "pwc.h" +#include "pwc-ioctl.h" #include "pwc-kiara.h" #include "pwc-timon.h" -#include "pwc-dec23.h" -#include "pwc-dec1.h" #include "pwc-uncompress.h" /* Function prototypes and driver templates */ /* hotplug device table support */ -static const struct usb_device_id pwc_device_table [] = { +static struct usb_device_id pwc_device_table [] = { { USB_DEVICE(0x0471, 0x0302) }, /* Philips models */ { USB_DEVICE(0x0471, 0x0303) }, { USB_DEVICE(0x0471, 0x0304) }, @@ -84,10 +81,9 @@ static const struct usb_device_id pwc_device_table [] = { { USB_DEVICE(0x0471, 0x0308) }, { USB_DEVICE(0x0471, 0x030C) }, { USB_DEVICE(0x0471, 0x0310) }, - { USB_DEVICE(0x0471, 0x0311) }, /* Philips ToUcam PRO II */ + { USB_DEVICE(0x0471, 0x0311) }, { USB_DEVICE(0x0471, 0x0312) }, { USB_DEVICE(0x0471, 0x0313) }, /* the 'new' 720K */ - { USB_DEVICE(0x0471, 0x0329) }, /* Philips SPC 900NC PC Camera */ { USB_DEVICE(0x069A, 0x0001) }, /* Askey */ { USB_DEVICE(0x046D, 0x08B0) }, /* Logitech QuickCam Pro 3000 */ { USB_DEVICE(0x046D, 0x08B1) }, /* Logitech QuickCam Notebook Pro */ @@ -98,9 +94,8 @@ static const struct usb_device_id pwc_device_table [] = { { USB_DEVICE(0x046D, 0x08B6) }, /* Logitech (reserved) */ { USB_DEVICE(0x046D, 0x08B7) }, /* Logitech (reserved) */ { USB_DEVICE(0x046D, 0x08B8) }, /* Logitech (reserved) */ - { USB_DEVICE(0x055D, 0x9000) }, /* Samsung MPC-C10 */ - { USB_DEVICE(0x055D, 0x9001) }, /* Samsung MPC-C30 */ - { USB_DEVICE(0x055D, 0x9002) }, /* Samsung SNC-35E (Ver3.0) */ + { USB_DEVICE(0x055D, 0x9000) }, /* Samsung */ + { USB_DEVICE(0x055D, 0x9001) }, { USB_DEVICE(0x041E, 0x400C) }, /* Creative Webcam 5 */ { USB_DEVICE(0x041E, 0x4011) }, /* Creative Webcam Pro Ex */ { USB_DEVICE(0x04CC, 0x8116) }, /* Afina Eye */ @@ -127,13 +122,11 @@ static struct usb_driver pwc_driver = { static int default_size = PSZ_QCIF; static int default_fps = 10; static int default_fbufs = 3; /* Default number of frame buffers */ - int pwc_mbufs = 2; /* Default number of mmap() buffers */ -#if CONFIG_PWC_DEBUG - int pwc_trace = PWC_DEBUG_LEVEL; -#endif +static int default_mbufs = 2; /* Default number of mmap() buffers */ + int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX; static int power_save = 0; static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */ -static int pwc_preferred_compression = 1; /* 0..3 = uncompressed..high */ +static int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */ static struct { int type; char serial_number[30]; @@ -145,7 +138,7 @@ static struct { static int pwc_video_open(struct inode *inode, struct file *file); static int pwc_video_close(struct inode *inode, struct file *file); -static ssize_t pwc_video_read(struct file *file, char __user *buf, +static ssize_t pwc_video_read(struct file *file, char __user * buf, size_t count, loff_t *ppos); static unsigned int pwc_video_poll(struct file *file, poll_table *wait); static int pwc_video_ioctl(struct inode *inode, struct file *file, @@ -210,44 +203,52 @@ static struct video_device pwc_template = { /* Here we want the physical address of the memory. * This is used when initializing the contents of the area. */ +static inline unsigned long kvirt_to_pa(unsigned long adr) +{ + unsigned long kva, ret; + kva = (unsigned long) page_address(vmalloc_to_page((void *)adr)); + kva |= adr & (PAGE_SIZE-1); /* restore the offset */ + ret = __pa(kva); + return ret; +} - -static void *pwc_rvmalloc(unsigned long size) +static void * rvmalloc(unsigned long size) { void * mem; unsigned long adr; + size=PAGE_ALIGN(size); mem=vmalloc_32(size); - if (!mem) - return NULL; - - memset(mem, 0, size); /* Clear the ram out, no junk to the user */ - adr=(unsigned long) mem; - while (size > 0) - { - SetPageReserved(vmalloc_to_page((void *)adr)); - adr += PAGE_SIZE; - size -= PAGE_SIZE; - } + if (mem) + { + memset(mem, 0, size); /* Clear the ram out, no junk to the user */ + adr=(unsigned long) mem; + while (size > 0) + { + SetPageReserved(vmalloc_to_page((void *)adr)); + adr+=PAGE_SIZE; + size-=PAGE_SIZE; + } + } return mem; } -static void pwc_rvfree(void * mem, unsigned long size) +static void rvfree(void * mem, unsigned long size) { unsigned long adr; - if (!mem) - return; - - adr=(unsigned long) mem; - while ((long) size > 0) - { - ClearPageReserved(vmalloc_to_page((void *)adr)); - adr += PAGE_SIZE; - size -= PAGE_SIZE; - } - vfree(mem); + if (mem) + { + adr=(unsigned long) mem; + while ((long) size > 0) + { + ClearPageReserved(vmalloc_to_page((void *)adr)); + adr+=PAGE_SIZE; + size-=PAGE_SIZE; + } + vfree(mem); + } } @@ -255,83 +256,100 @@ static void pwc_rvfree(void * mem, unsigned long size) static int pwc_allocate_buffers(struct pwc_device *pdev) { - int i, err; + int i; void *kbuf; - PWC_DEBUG_MEMORY(">> pwc_allocate_buffers(pdev = 0x%p)\n", pdev); + Trace(TRACE_MEMORY, ">> pwc_allocate_buffers(pdev = 0x%p)\n", pdev); if (pdev == NULL) return -ENXIO; - /* Allocate Isochronuous pipe buffers */ +#ifdef PWC_MAGIC + if (pdev->magic != PWC_MAGIC) { + Err("allocate_buffers(): magic failed.\n"); + return -ENXIO; + } +#endif + /* Allocate Isochronous pipe buffers */ for (i = 0; i < MAX_ISO_BUFS; i++) { if (pdev->sbuf[i].data == NULL) { - kbuf = kzalloc(ISO_BUFFER_SIZE, GFP_KERNEL); + kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL); if (kbuf == NULL) { - PWC_ERROR("Failed to allocate iso buffer %d.\n", i); + Err("Failed to allocate iso buffer %d.\n", i); return -ENOMEM; } - PWC_DEBUG_MEMORY("Allocated iso buffer at %p.\n", kbuf); + Trace(TRACE_MEMORY, "Allocated iso buffer at %p.\n", kbuf); pdev->sbuf[i].data = kbuf; + memset(kbuf, 0, ISO_BUFFER_SIZE); } } /* Allocate frame buffer structure */ if (pdev->fbuf == NULL) { - kbuf = kzalloc(default_fbufs * sizeof(struct pwc_frame_buf), GFP_KERNEL); + kbuf = kmalloc(default_fbufs * sizeof(struct pwc_frame_buf), GFP_KERNEL); if (kbuf == NULL) { - PWC_ERROR("Failed to allocate frame buffer structure.\n"); + Err("Failed to allocate frame buffer structure.\n"); return -ENOMEM; } - PWC_DEBUG_MEMORY("Allocated frame buffer structure at %p.\n", kbuf); + Trace(TRACE_MEMORY, "Allocated frame buffer structure at %p.\n", kbuf); pdev->fbuf = kbuf; + memset(kbuf, 0, default_fbufs * sizeof(struct pwc_frame_buf)); } - /* create frame buffers, and make circular ring */ for (i = 0; i < default_fbufs; i++) { if (pdev->fbuf[i].data == NULL) { kbuf = vmalloc(PWC_FRAME_SIZE); /* need vmalloc since frame buffer > 128K */ if (kbuf == NULL) { - PWC_ERROR("Failed to allocate frame buffer %d.\n", i); + Err("Failed to allocate frame buffer %d.\n", i); return -ENOMEM; } - PWC_DEBUG_MEMORY("Allocated frame buffer %d at %p.\n", i, kbuf); + Trace(TRACE_MEMORY, "Allocated frame buffer %d at %p.\n", i, kbuf); pdev->fbuf[i].data = kbuf; - memset(kbuf, 0, PWC_FRAME_SIZE); + memset(kbuf, 128, PWC_FRAME_SIZE); } } /* Allocate decompressor table space */ - if (DEVICE_USE_CODEC1(pdev->type)) - err = pwc_dec1_alloc(pdev); - else - err = pwc_dec23_alloc(pdev); - - if (err) { - PWC_ERROR("Failed to allocate decompress table.\n"); - return err; - } + kbuf = NULL; + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: +#if 0 + Trace(TRACE_MEMORY,"private_data(%zu)\n",sizeof(struct pwc_dec23_private)); + kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ + break; + case 645: + case 646: + /* TODO & FIXME */ + kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); + break; +#endif + ; + } + pdev->decompress_data = kbuf; /* Allocate image buffer; double buffer for mmap() */ - kbuf = pwc_rvmalloc(pwc_mbufs * pdev->len_per_image); + kbuf = rvmalloc(default_mbufs * pdev->len_per_image); if (kbuf == NULL) { - PWC_ERROR("Failed to allocate image buffer(s). needed (%d)\n", - pwc_mbufs * pdev->len_per_image); + Err("Failed to allocate image buffer(s). needed (%d)\n",default_mbufs * pdev->len_per_image); return -ENOMEM; } - PWC_DEBUG_MEMORY("Allocated image buffer at %p.\n", kbuf); + Trace(TRACE_MEMORY, "Allocated image buffer at %p.\n", kbuf); pdev->image_data = kbuf; - for (i = 0; i < pwc_mbufs; i++) { - pdev->images[i].offset = i * pdev->len_per_image; - pdev->images[i].vma_use_count = 0; - } - for (; i < MAX_IMAGES; i++) { - pdev->images[i].offset = 0; - } + for (i = 0; i < default_mbufs; i++) + pdev->image_ptr[i] = kbuf + i * pdev->len_per_image; + for (; i < MAX_IMAGES; i++) + pdev->image_ptr[i] = NULL; kbuf = NULL; - PWC_DEBUG_MEMORY("<< pwc_allocate_buffers()\n"); + Trace(TRACE_MEMORY, "<< pwc_allocate_buffers()\n"); return 0; } @@ -339,14 +357,21 @@ static void pwc_free_buffers(struct pwc_device *pdev) { int i; - PWC_DEBUG_MEMORY("Entering free_buffers(%p).\n", pdev); + Trace(TRACE_MEMORY, "Entering free_buffers(%p).\n", pdev); if (pdev == NULL) return; +#ifdef PWC_MAGIC + if (pdev->magic != PWC_MAGIC) { + Err("free_buffers(): magic failed.\n"); + return; + } +#endif + /* Release Iso-pipe buffers */ for (i = 0; i < MAX_ISO_BUFS; i++) if (pdev->sbuf[i].data != NULL) { - PWC_DEBUG_MEMORY("Freeing ISO buffer at %p.\n", pdev->sbuf[i].data); + Trace(TRACE_MEMORY, "Freeing ISO buffer at %p.\n", pdev->sbuf[i].data); kfree(pdev->sbuf[i].data); pdev->sbuf[i].data = NULL; } @@ -355,7 +380,7 @@ static void pwc_free_buffers(struct pwc_device *pdev) if (pdev->fbuf != NULL) { for (i = 0; i < default_fbufs; i++) { if (pdev->fbuf[i].data != NULL) { - PWC_DEBUG_MEMORY("Freeing frame buffer %d at %p.\n", i, pdev->fbuf[i].data); + Trace(TRACE_MEMORY, "Freeing frame buffer %d at %p.\n", i, pdev->fbuf[i].data); vfree(pdev->fbuf[i].data); pdev->fbuf[i].data = NULL; } @@ -366,19 +391,20 @@ static void pwc_free_buffers(struct pwc_device *pdev) /* Intermediate decompression buffer & tables */ if (pdev->decompress_data != NULL) { - PWC_DEBUG_MEMORY("Freeing decompression buffer at %p.\n", pdev->decompress_data); + Trace(TRACE_MEMORY, "Freeing decompression buffer at %p.\n", pdev->decompress_data); kfree(pdev->decompress_data); pdev->decompress_data = NULL; } + pdev->decompressor = NULL; /* Release image buffers */ if (pdev->image_data != NULL) { - PWC_DEBUG_MEMORY("Freeing image buffer at %p.\n", pdev->image_data); - pwc_rvfree(pdev->image_data, pwc_mbufs * pdev->len_per_image); + Trace(TRACE_MEMORY, "Freeing image buffer at %p.\n", pdev->image_data); + rvfree(pdev->image_data, default_mbufs * pdev->len_per_image); } pdev->image_data = NULL; - PWC_DEBUG_MEMORY("Leaving free_buffers().\n"); + Trace(TRACE_MEMORY, "Leaving free_buffers().\n"); } /* The frame & image buffer mess. @@ -438,7 +464,7 @@ static void pwc_free_buffers(struct pwc_device *pdev) /** \brief Find next frame buffer to fill. Take from empty or full list, whichever comes first. */ -static int pwc_next_fill_frame(struct pwc_device *pdev) +static inline int pwc_next_fill_frame(struct pwc_device *pdev) { int ret; unsigned long flags; @@ -463,17 +489,23 @@ static int pwc_next_fill_frame(struct pwc_device *pdev) } else { /* Hmm. Take it from the full list */ +#if PWC_DEBUG /* sanity check */ if (pdev->full_frames == NULL) { - PWC_ERROR("Neither empty or full frames available!\n"); + Err("Neither empty or full frames available!\n"); spin_unlock_irqrestore(&pdev->ptrlock, flags); return -EINVAL; } +#endif pdev->fill_frame = pdev->full_frames; pdev->full_frames = pdev->full_frames->next; ret = 1; } pdev->fill_frame->next = NULL; +#if PWC_DEBUG + Trace(TRACE_SEQUENCE, "Assigning sequence number %d.\n", pdev->sequence); + pdev->fill_frame->sequence = pdev->sequence++; +#endif spin_unlock_irqrestore(&pdev->ptrlock, flags); return ret; } @@ -489,8 +521,6 @@ static void pwc_reset_buffers(struct pwc_device *pdev) int i; unsigned long flags; - PWC_DEBUG_MEMORY(">> %s __enter__\n", __FUNCTION__); - spin_lock_irqsave(&pdev->ptrlock, flags); pdev->full_frames = NULL; pdev->full_frames_tail = NULL; @@ -510,15 +540,13 @@ static void pwc_reset_buffers(struct pwc_device *pdev) pdev->image_read_pos = 0; pdev->fill_image = 0; spin_unlock_irqrestore(&pdev->ptrlock, flags); - - PWC_DEBUG_MEMORY("<< %s __leaving__\n", __FUNCTION__); } /** \brief Do all the handling for getting one frame: get pointer, decompress, advance pointers. */ -int pwc_handle_frame(struct pwc_device *pdev) +static int pwc_handle_frame(struct pwc_device *pdev) { int ret = 0; unsigned long flags; @@ -528,40 +556,41 @@ int pwc_handle_frame(struct pwc_device *pdev) we can release the lock after this without problems */ if (pdev->read_frame != NULL) { /* This can't theoretically happen */ - PWC_ERROR("Huh? Read frame still in use?\n"); - spin_unlock_irqrestore(&pdev->ptrlock, flags); - return ret; - } - - - if (pdev->full_frames == NULL) { - PWC_ERROR("Woops. No frames ready.\n"); + Err("Huh? Read frame still in use?\n"); } else { - pdev->read_frame = pdev->full_frames; - pdev->full_frames = pdev->full_frames->next; - pdev->read_frame->next = NULL; - } - - if (pdev->read_frame != NULL) { - /* Decompression is a lenghty process, so it's outside of the lock. - This gives the isoc_handler the opportunity to fill more frames - in the mean time. - */ - spin_unlock_irqrestore(&pdev->ptrlock, flags); - ret = pwc_decompress(pdev); - spin_lock_irqsave(&pdev->ptrlock, flags); - - /* We're done with read_buffer, tack it to the end of the empty buffer list */ - if (pdev->empty_frames == NULL) { - pdev->empty_frames = pdev->read_frame; - pdev->empty_frames_tail = pdev->empty_frames; + if (pdev->full_frames == NULL) { + Err("Woops. No frames ready.\n"); } else { - pdev->empty_frames_tail->next = pdev->read_frame; - pdev->empty_frames_tail = pdev->read_frame; + pdev->read_frame = pdev->full_frames; + pdev->full_frames = pdev->full_frames->next; + pdev->read_frame->next = NULL; + } + + if (pdev->read_frame != NULL) { +#if PWC_DEBUG + Trace(TRACE_SEQUENCE, "Decompressing frame %d\n", pdev->read_frame->sequence); +#endif + /* Decompression is a lenghty process, so it's outside of the lock. + This gives the isoc_handler the opportunity to fill more frames + in the mean time. + */ + spin_unlock_irqrestore(&pdev->ptrlock, flags); + ret = pwc_decompress(pdev); + spin_lock_irqsave(&pdev->ptrlock, flags); + + /* We're done with read_buffer, tack it to the end of the empty buffer list */ + if (pdev->empty_frames == NULL) { + pdev->empty_frames = pdev->read_frame; + pdev->empty_frames_tail = pdev->empty_frames; + } + else { + pdev->empty_frames_tail->next = pdev->read_frame; + pdev->empty_frames_tail = pdev->read_frame; + } + pdev->read_frame = NULL; } - pdev->read_frame = NULL; } spin_unlock_irqrestore(&pdev->ptrlock, flags); return ret; @@ -570,114 +599,12 @@ int pwc_handle_frame(struct pwc_device *pdev) /** \brief Advance pointers of image buffer (after each user request) */ -void pwc_next_image(struct pwc_device *pdev) +static inline void pwc_next_image(struct pwc_device *pdev) { pdev->image_used[pdev->fill_image] = 0; - pdev->fill_image = (pdev->fill_image + 1) % pwc_mbufs; + pdev->fill_image = (pdev->fill_image + 1) % default_mbufs; } -/** - * Print debug information when a frame is discarded because all of our buffer - * is full - */ -static void pwc_frame_dumped(struct pwc_device *pdev) -{ - pdev->vframes_dumped++; - if (pdev->vframe_count < FRAME_LOWMARK) - return; - - if (pdev->vframes_dumped < 20) - PWC_DEBUG_FLOW("Dumping frame %d\n", pdev->vframe_count); - else if (pdev->vframes_dumped == 20) - PWC_DEBUG_FLOW("Dumping frame %d (last message)\n", - pdev->vframe_count); -} - -static int pwc_rcv_short_packet(struct pwc_device *pdev, const struct pwc_frame_buf *fbuf) -{ - int awake = 0; - - /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus - frames on the USB wire after an exposure change. This conditition is - however detected in the cam and a bit is set in the header. - */ - if (pdev->type == 730) { - unsigned char *ptr = (unsigned char *)fbuf->data; - - if (ptr[1] == 1 && ptr[0] & 0x10) { - PWC_TRACE("Hyundai CMOS sensor bug. Dropping frame.\n"); - pdev->drop_frames += 2; - pdev->vframes_error++; - } - if ((ptr[0] ^ pdev->vmirror) & 0x01) { - if (ptr[0] & 0x01) { - pdev->snapshot_button_status = 1; - PWC_TRACE("Snapshot button pressed.\n"); - } - else { - PWC_TRACE("Snapshot button released.\n"); - } - } - if ((ptr[0] ^ pdev->vmirror) & 0x02) { - if (ptr[0] & 0x02) - PWC_TRACE("Image is mirrored.\n"); - else - PWC_TRACE("Image is normal.\n"); - } - pdev->vmirror = ptr[0] & 0x03; - /* Sometimes the trailer of the 730 is still sent as a 4 byte packet - after a short frame; this condition is filtered out specifically. A 4 byte - frame doesn't make sense anyway. - So we get either this sequence: - drop_bit set -> 4 byte frame -> short frame -> good frame - Or this one: - drop_bit set -> short frame -> good frame - So we drop either 3 or 2 frames in all! - */ - if (fbuf->filled == 4) - pdev->drop_frames++; - } - else if (pdev->type == 740 || pdev->type == 720) { - unsigned char *ptr = (unsigned char *)fbuf->data; - if ((ptr[0] ^ pdev->vmirror) & 0x01) { - if (ptr[0] & 0x01) { - pdev->snapshot_button_status = 1; - PWC_TRACE("Snapshot button pressed.\n"); - } - else - PWC_TRACE("Snapshot button released.\n"); - } - pdev->vmirror = ptr[0] & 0x03; - } - - /* In case we were instructed to drop the frame, do so silently. - The buffer pointers are not updated either (but the counters are reset below). - */ - if (pdev->drop_frames > 0) - pdev->drop_frames--; - else { - /* Check for underflow first */ - if (fbuf->filled < pdev->frame_total_size) { - PWC_DEBUG_FLOW("Frame buffer underflow (%d bytes);" - " discarded.\n", fbuf->filled); - pdev->vframes_error++; - } - else { - /* Send only once per EOF */ - awake = 1; /* delay wake_ups */ - - /* Find our next frame to fill. This will always succeed, since we - * nick a frame from either empty or full list, but if we had to - * take it from the full list, it means a frame got dropped. - */ - if (pwc_next_fill_frame(pdev)) - pwc_frame_dumped(pdev); - - } - } /* !drop_frames */ - pdev->vframe_count++; - return awake; -} /* This gets called for the Isochronous pipe (video). This is done in * interrupt time, so it has to be fast, not crash, and not stall. Neat. @@ -693,12 +620,17 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) awake = 0; pdev = (struct pwc_device *)urb->context; if (pdev == NULL) { - PWC_ERROR("isoc_handler() called with NULL device?!\n"); + Err("isoc_handler() called with NULL device?!\n"); return; } - +#ifdef PWC_MAGIC + if (pdev->magic != PWC_MAGIC) { + Err("isoc_handler() called with bad magic!\n"); + return; + } +#endif if (urb->status == -ENOENT || urb->status == -ECONNRESET) { - PWC_DEBUG_OPEN("URB (%p) unlinked %ssynchronuously.\n", urb, urb->status == -ENOENT ? "" : "a"); + Trace(TRACE_OPEN, "pwc_isoc_handler(): URB (%p) unlinked %ssynchronuously.\n", urb, urb->status == -ENOENT ? "" : "a"); return; } if (urb->status != -EINPROGRESS && urb->status != 0) { @@ -713,13 +645,13 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) case -EILSEQ: errmsg = "CRC/Timeout (could be anything)"; break; case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break; } - PWC_DEBUG_FLOW("pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg); + Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg); /* Give up after a number of contiguous errors on the USB bus. Appearantly something is wrong so we simulate an unplug event. */ if (++pdev->visoc_errors > MAX_ISOC_ERRORS) { - PWC_INFO("Too many ISOC errors, bailing out.\n"); + Info("Too many ISOC errors, bailing out.\n"); pdev->error_status = EIO; awake = 1; wake_up_interruptible(&pdev->frameq); @@ -729,7 +661,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) fbuf = pdev->fill_frame; if (fbuf == NULL) { - PWC_ERROR("pwc_isoc_handler without valid fill frame.\n"); + Err("pwc_isoc_handler without valid fill frame.\n"); awake = 1; goto handler_end; } @@ -756,7 +688,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) /* ...copy data to frame buffer, if possible */ if (flen + fbuf->filled > pdev->frame_total_size) { - PWC_DEBUG_FLOW("Frame buffer overflow (flen = %d, frame_total_size = %d).\n", flen, pdev->frame_total_size); + Trace(TRACE_FLOW, "Frame buffer overflow (flen = %d, frame_total_size = %d).\n", flen, pdev->frame_total_size); pdev->vsync = 0; /* Hmm, let's wait for an EOF (end-of-frame) */ pdev->vframes_error++; } @@ -772,28 +704,96 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) /* Shorter packet... We probably have the end of an image-frame; wake up read() process and let select()/poll() do something. Decompression is done in user time over there. - */ + */ if (pdev->vsync == 2) { - if (pwc_rcv_short_packet(pdev, fbuf)) { - awake = 1; - fbuf = pdev->fill_frame; + /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus + frames on the USB wire after an exposure change. This conditition is + however detected in the cam and a bit is set in the header. + */ + if (pdev->type == 730) { + unsigned char *ptr = (unsigned char *)fbuf->data; + + if (ptr[1] == 1 && ptr[0] & 0x10) { +#if PWC_DEBUG + Debug("Hyundai CMOS sensor bug. Dropping frame %d.\n", fbuf->sequence); +#endif + pdev->drop_frames += 2; + pdev->vframes_error++; + } + if ((ptr[0] ^ pdev->vmirror) & 0x01) { + if (ptr[0] & 0x01) + Info("Snapshot button pressed.\n"); + else + Info("Snapshot button released.\n"); + } + if ((ptr[0] ^ pdev->vmirror) & 0x02) { + if (ptr[0] & 0x02) + Info("Image is mirrored.\n"); + else + Info("Image is normal.\n"); + } + pdev->vmirror = ptr[0] & 0x03; + /* Sometimes the trailer of the 730 is still sent as a 4 byte packet + after a short frame; this condition is filtered out specifically. A 4 byte + frame doesn't make sense anyway. + So we get either this sequence: + drop_bit set -> 4 byte frame -> short frame -> good frame + Or this one: + drop_bit set -> short frame -> good frame + So we drop either 3 or 2 frames in all! + */ + if (fbuf->filled == 4) + pdev->drop_frames++; } + + /* In case we were instructed to drop the frame, do so silently. + The buffer pointers are not updated either (but the counters are reset below). + */ + if (pdev->drop_frames > 0) + pdev->drop_frames--; + else { + /* Check for underflow first */ + if (fbuf->filled < pdev->frame_total_size) { + Trace(TRACE_FLOW, "Frame buffer underflow (%d bytes); discarded.\n", fbuf->filled); + pdev->vframes_error++; + } + else { + /* Send only once per EOF */ + awake = 1; /* delay wake_ups */ + + /* Find our next frame to fill. This will always succeed, since we + * nick a frame from either empty or full list, but if we had to + * take it from the full list, it means a frame got dropped. + */ + if (pwc_next_fill_frame(pdev)) { + pdev->vframes_dumped++; + if ((pdev->vframe_count > FRAME_LOWMARK) && (pwc_trace & TRACE_FLOW)) { + if (pdev->vframes_dumped < 20) + Trace(TRACE_FLOW, "Dumping frame %d.\n", pdev->vframe_count); + if (pdev->vframes_dumped == 20) + Trace(TRACE_FLOW, "Dumping frame %d (last message).\n", pdev->vframe_count); + } + } + fbuf = pdev->fill_frame; + } + } /* !drop_frames */ + pdev->vframe_count++; } fbuf->filled = 0; fillptr = fbuf->data; pdev->vsync = 1; - } - + } /* .. flen < last_packet_size */ pdev->vlast_packet_size = flen; } /* ..status == 0 */ +#if PWC_DEBUG + /* This is normally not interesting to the user, unless you are really debugging something */ else { - /* This is normally not interesting to the user, unless - * you are really debugging something */ static int iso_error = 0; iso_error++; if (iso_error < 20) - PWC_DEBUG_FLOW("Iso frame %d of USB has error %d\n", i, fst); + Trace(TRACE_FLOW, "Iso frame %d of USB has error %d\n", i, fst); } +#endif } handler_end: @@ -803,11 +803,11 @@ handler_end: urb->dev = pdev->udev; i = usb_submit_urb(urb, GFP_ATOMIC); if (i != 0) - PWC_ERROR("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i); + Err("Error (%d) re-submitting urb in pwc_isoc_handler.\n", i); } -int pwc_isoc_init(struct pwc_device *pdev) +static int pwc_isoc_init(struct pwc_device *pdev) { struct usb_device *udev; struct urb *urb; @@ -826,6 +826,7 @@ int pwc_isoc_init(struct pwc_device *pdev) /* Get the current alternate interface, adjust packet size */ if (!udev->actconfig) return -EFAULT; + intf = usb_ifnum_to_if(udev, 0); if (intf) idesc = usb_altnum_to_altsetting(intf, pdev->valternate); @@ -835,21 +836,20 @@ int pwc_isoc_init(struct pwc_device *pdev) /* Search video endpoint */ pdev->vmax_packet_size = -1; - for (i = 0; i < idesc->desc.bNumEndpoints; i++) { + for (i = 0; i < idesc->desc.bNumEndpoints; i++) if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) { pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize); break; } - } if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { - PWC_ERROR("Failed to find packet size for video endpoint in current alternate setting.\n"); + Err("Failed to find packet size for video endpoint in current alternate setting.\n"); return -ENFILE; /* Odd error, that should be noticeable */ } /* Set alternate interface */ ret = 0; - PWC_DEBUG_OPEN("Setting alternate interface %d\n", pdev->valternate); + Trace(TRACE_OPEN, "Setting alternate interface %d\n", pdev->valternate); ret = usb_set_interface(pdev->udev, 0, pdev->valternate); if (ret < 0) return ret; @@ -857,12 +857,12 @@ int pwc_isoc_init(struct pwc_device *pdev) for (i = 0; i < MAX_ISO_BUFS; i++) { urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL); if (urb == NULL) { - PWC_ERROR("Failed to allocate urb %d\n", i); + Err("Failed to allocate urb %d\n", i); ret = -ENOMEM; break; } pdev->sbuf[i].urb = urb; - PWC_DEBUG_MEMORY("Allocated URB at 0x%p\n", urb); + Trace(TRACE_MEMORY, "Allocated URB at 0x%p\n", urb); } if (ret) { /* De-allocate in reverse order */ @@ -899,26 +899,24 @@ int pwc_isoc_init(struct pwc_device *pdev) for (i = 0; i < MAX_ISO_BUFS; i++) { ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL); if (ret) - PWC_ERROR("isoc_init() submit_urb %d failed with error %d\n", i, ret); + Err("isoc_init() submit_urb %d failed with error %d\n", i, ret); else - PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->sbuf[i].urb); + Trace(TRACE_MEMORY, "URB 0x%p submitted.\n", pdev->sbuf[i].urb); } /* All is done... */ pdev->iso_init = 1; - PWC_DEBUG_OPEN("<< pwc_isoc_init()\n"); + Trace(TRACE_OPEN, "<< pwc_isoc_init()\n"); return 0; } -void pwc_isoc_cleanup(struct pwc_device *pdev) +static void pwc_isoc_cleanup(struct pwc_device *pdev) { int i; - PWC_DEBUG_OPEN(">> pwc_isoc_cleanup()\n"); + Trace(TRACE_OPEN, ">> pwc_isoc_cleanup()\n"); if (pdev == NULL) return; - if (pdev->iso_init == 0) - return; /* Unlinking ISOC buffers one by one */ for (i = 0; i < MAX_ISO_BUFS; i++) { @@ -927,10 +925,10 @@ void pwc_isoc_cleanup(struct pwc_device *pdev) urb = pdev->sbuf[i].urb; if (urb != 0) { if (pdev->iso_init) { - PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb); + Trace(TRACE_MEMORY, "Unlinking URB %p\n", urb); usb_kill_urb(urb); } - PWC_DEBUG_MEMORY("Freeing URB\n"); + Trace(TRACE_MEMORY, "Freeing URB\n"); usb_free_urb(urb); pdev->sbuf[i].urb = NULL; } @@ -940,12 +938,12 @@ void pwc_isoc_cleanup(struct pwc_device *pdev) is signalled by EPIPE) */ if (pdev->error_status && pdev->error_status != EPIPE) { - PWC_DEBUG_OPEN("Setting alternate interface 0.\n"); + Trace(TRACE_OPEN, "Setting alternate interface 0.\n"); usb_set_interface(pdev->udev, 0, 0); } pdev->iso_init = 0; - PWC_DEBUG_OPEN("<< pwc_isoc_cleanup()\n"); + Trace(TRACE_OPEN, "<< pwc_isoc_cleanup()\n"); } int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot) @@ -959,18 +957,18 @@ int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_f /* Try to set video mode... */ start = ret = pwc_set_video_mode(pdev, width, height, new_fps, new_compression, new_snapshot); if (ret) { - PWC_DEBUG_FLOW("pwc_set_video_mode attempt 1 failed.\n"); + Trace(TRACE_FLOW, "pwc_set_video_mode attempt 1 failed.\n"); /* That failed... restore old mode (we know that worked) */ start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); if (start) { - PWC_DEBUG_FLOW("pwc_set_video_mode attempt 2 failed.\n"); + Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n"); } } if (start == 0) { if (pwc_isoc_init(pdev) < 0) { - PWC_WARNING("Failed to restart ISOC transfers in pwc_try_video_mode.\n"); + Info("Failed to restart ISOC transfers in pwc_try_video_mode.\n"); ret = -EAGAIN; /* let's try again, who knows if it works a second time */ } } @@ -978,129 +976,54 @@ int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_f return ret; /* Return original error code */ } -/********* - * sysfs - *********/ -static struct pwc_device *cd_to_pwc(struct class_device *cd) -{ - struct video_device *vdev = to_video_device(cd); - return video_get_drvdata(vdev); -} - -static ssize_t show_pan_tilt(struct class_device *class_dev, char *buf) -{ - struct pwc_device *pdev = cd_to_pwc(class_dev); - return sprintf(buf, "%d %d\n", pdev->pan_angle, pdev->tilt_angle); -} - -static ssize_t store_pan_tilt(struct class_device *class_dev, const char *buf, - size_t count) -{ - struct pwc_device *pdev = cd_to_pwc(class_dev); - int pan, tilt; - int ret = -EINVAL; - - if (strncmp(buf, "reset", 5) == 0) - ret = pwc_mpt_reset(pdev, 0x3); - - else if (sscanf(buf, "%d %d", &pan, &tilt) > 0) - ret = pwc_mpt_set_angle(pdev, pan, tilt); - - if (ret < 0) - return ret; - return strlen(buf); -} -static CLASS_DEVICE_ATTR(pan_tilt, S_IRUGO | S_IWUSR, show_pan_tilt, - store_pan_tilt); - -static ssize_t show_snapshot_button_status(struct class_device *class_dev, char *buf) -{ - struct pwc_device *pdev = cd_to_pwc(class_dev); - int status = pdev->snapshot_button_status; - pdev->snapshot_button_status = 0; - return sprintf(buf, "%d\n", status); -} - -static CLASS_DEVICE_ATTR(button, S_IRUGO | S_IWUSR, show_snapshot_button_status, - NULL); - -static void pwc_create_sysfs_files(struct video_device *vdev) -{ - struct pwc_device *pdev = video_get_drvdata(vdev); - if (pdev->features & FEATURE_MOTOR_PANTILT) - video_device_create_file(vdev, &class_device_attr_pan_tilt); - video_device_create_file(vdev, &class_device_attr_button); -} - -static void pwc_remove_sysfs_files(struct video_device *vdev) -{ - struct pwc_device *pdev = video_get_drvdata(vdev); - if (pdev->features & FEATURE_MOTOR_PANTILT) - video_device_remove_file(vdev, &class_device_attr_pan_tilt); - video_device_remove_file(vdev, &class_device_attr_button); -} - -#if CONFIG_PWC_DEBUG -static const char *pwc_sensor_type_to_string(unsigned int sensor_type) -{ - switch(sensor_type) { - case 0x00: - return "Hyundai CMOS sensor"; - case 0x20: - return "Sony CCD sensor + TDA8787"; - case 0x2E: - return "Sony CCD sensor + Exas 98L59"; - case 0x2F: - return "Sony CCD sensor + ADI 9804"; - case 0x30: - return "Sharp CCD sensor + TDA8787"; - case 0x3E: - return "Sharp CCD sensor + Exas 98L59"; - case 0x3F: - return "Sharp CCD sensor + ADI 9804"; - case 0x40: - return "UPA 1021 sensor"; - case 0x100: - return "VGA sensor"; - case 0x101: - return "PAL MR sensor"; - default: - return "unknown type of sensor"; - } -} -#endif /***************************************************************************/ /* Video4Linux functions */ static int pwc_video_open(struct inode *inode, struct file *file) { - int i, ret; + int i; struct video_device *vdev = video_devdata(file); struct pwc_device *pdev; - PWC_DEBUG_OPEN(">> video_open called(vdev = 0x%p).\n", vdev); + Trace(TRACE_OPEN, ">> video_open called(vdev = 0x%p).\n", vdev); pdev = (struct pwc_device *)vdev->priv; if (pdev == NULL) BUG(); - if (pdev->vopen) { - PWC_DEBUG_OPEN("I'm busy, someone is using the device.\n"); + if (pdev->vopen) return -EBUSY; - } down(&pdev->modlock); if (!pdev->usb_init) { - PWC_DEBUG_OPEN("Doing first time initialization.\n"); + Trace(TRACE_OPEN, "Doing first time initialization.\n"); pdev->usb_init = 1; - /* Query sensor type */ - ret = pwc_get_cmos_sensor(pdev, &i); - if (ret >= 0) + if (pwc_trace & TRACE_OPEN) { - PWC_DEBUG_OPEN("This %s camera is equipped with a %s (%d).\n", - pdev->vdev->name, - pwc_sensor_type_to_string(i), i); + /* Query sensor type */ + const char *sensor_type = NULL; + int ret; + + ret = pwc_get_cmos_sensor(pdev, &i); + if (ret >= 0) + { + switch(i) { + case 0x00: sensor_type = "Hyundai CMOS sensor"; break; + case 0x20: sensor_type = "Sony CCD sensor + TDA8787"; break; + case 0x2E: sensor_type = "Sony CCD sensor + Exas 98L59"; break; + case 0x2F: sensor_type = "Sony CCD sensor + ADI 9804"; break; + case 0x30: sensor_type = "Sharp CCD sensor + TDA8787"; break; + case 0x3E: sensor_type = "Sharp CCD sensor + Exas 98L59"; break; + case 0x3F: sensor_type = "Sharp CCD sensor + ADI 9804"; break; + case 0x40: sensor_type = "UPA 1021 sensor"; break; + case 0x100: sensor_type = "VGA sensor"; break; + case 0x101: sensor_type = "PAL MR sensor"; break; + default: sensor_type = "unknown type of sensor"; break; + } + } + if (sensor_type != NULL) + Info("This %s camera is equipped with a %s (%d).\n", pdev->vdev->name, sensor_type, i); } } @@ -1108,32 +1031,34 @@ static int pwc_video_open(struct inode *inode, struct file *file) if (power_save) { i = pwc_camera_power(pdev, 1); if (i < 0) - PWC_DEBUG_OPEN("Failed to restore power to the camera! (%d)\n", i); + Info("Failed to restore power to the camera! (%d)\n", i); } /* Set LED on/off time */ if (pwc_set_leds(pdev, led_on, led_off) < 0) - PWC_DEBUG_OPEN("Failed to set LED on/off time.\n"); + Info("Failed to set LED on/off time.\n"); pwc_construct(pdev); /* set min/max sizes correct */ /* So far, so good. Allocate memory. */ i = pwc_allocate_buffers(pdev); if (i < 0) { - PWC_DEBUG_OPEN("Failed to allocate buffers memory.\n"); - pwc_free_buffers(pdev); + Trace(TRACE_OPEN, "Failed to allocate buffer memory.\n"); up(&pdev->modlock); return i; } /* Reset buffers & parameters */ pwc_reset_buffers(pdev); - for (i = 0; i < pwc_mbufs; i++) + for (i = 0; i < default_mbufs; i++) pdev->image_used[i] = 0; pdev->vframe_count = 0; pdev->vframes_dumped = 0; pdev->vframes_error = 0; pdev->visoc_errors = 0; pdev->error_status = 0; +#if PWC_DEBUG + pdev->sequence = 0; +#endif pwc_construct(pdev); /* set min/max sizes correct */ /* Set some defaults */ @@ -1145,44 +1070,29 @@ static int pwc_video_open(struct inode *inode, struct file *file) */ i = pwc_set_video_mode(pdev, pwc_image_sizes[pdev->vsize].x, pwc_image_sizes[pdev->vsize].y, pdev->vframes, pdev->vcompression, 0); if (i) { - unsigned int default_resolution; - PWC_DEBUG_OPEN("First attempt at set_video_mode failed.\n"); - if (pdev->type>= 730) - default_resolution = PSZ_QSIF; + Trace(TRACE_OPEN, "First attempt at set_video_mode failed.\n"); + if (pdev->type == 730 || pdev->type == 740 || pdev->type == 750) + i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QSIF].x, pwc_image_sizes[PSZ_QSIF].y, 10, pdev->vcompression, 0); else - default_resolution = PSZ_QCIF; - - i = pwc_set_video_mode(pdev, - pwc_image_sizes[default_resolution].x, - pwc_image_sizes[default_resolution].y, - 10, - pdev->vcompression, - 0); + i = pwc_set_video_mode(pdev, pwc_image_sizes[PSZ_QCIF].x, pwc_image_sizes[PSZ_QCIF].y, 10, pdev->vcompression, 0); } if (i) { - PWC_DEBUG_OPEN("Second attempt at set_video_mode failed.\n"); - pwc_free_buffers(pdev); + Trace(TRACE_OPEN, "Second attempt at set_video_mode failed.\n"); up(&pdev->modlock); return i; } i = pwc_isoc_init(pdev); if (i) { - PWC_DEBUG_OPEN("Failed to init ISOC stuff = %d.\n", i); - pwc_isoc_cleanup(pdev); - pwc_free_buffers(pdev); + Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i); up(&pdev->modlock); return i; } - /* Initialize the webcam to sane value */ - pwc_set_brightness(pdev, 0x7fff); - pwc_set_agc(pdev, 1, 0); - pdev->vopen++; file->private_data = vdev; up(&pdev->modlock); - PWC_DEBUG_OPEN("<< video_open() returns 0.\n"); + Trace(TRACE_OPEN, "<< video_open() returns 0.\n"); return 0; } @@ -1193,23 +1103,35 @@ static int pwc_video_close(struct inode *inode, struct file *file) struct pwc_device *pdev; int i; - PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev); + Trace(TRACE_OPEN, ">> video_close called(vdev = 0x%p).\n", vdev); pdev = (struct pwc_device *)vdev->priv; if (pdev->vopen == 0) - PWC_DEBUG_MODULE("video_close() called on closed device?\n"); + Info("video_close() called on closed device?\n"); /* Dump statistics, but only if a reasonable amount of frames were processed (to prevent endless log-entries in case of snap-shot programs) */ if (pdev->vframe_count > 20) - PWC_DEBUG_MODULE("Closing video device: %d frames received, dumped %d frames, %d frames with errors.\n", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error); + Info("Closing video device: %d frames received, dumped %d frames, %d frames with errors.\n", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error); - if (DEVICE_USE_CODEC1(pdev->type)) - pwc_dec1_exit(); - else - pwc_dec23_exit(); + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: +/* pwc_dec23_exit(); *//* Timon & Kiara */ + break; + case 645: + case 646: +/* pwc_dec1_exit(); */ + break; + } pwc_isoc_cleanup(pdev); pwc_free_buffers(pdev); @@ -1218,15 +1140,15 @@ static int pwc_video_close(struct inode *inode, struct file *file) if (pdev->error_status != EPIPE) { /* Turn LEDs off */ if (pwc_set_leds(pdev, 0, 0) < 0) - PWC_DEBUG_MODULE("Failed to set LED on/off time.\n"); + Info("Failed to set LED on/off time.\n"); if (power_save) { i = pwc_camera_power(pdev, 0); if (i < 0) - PWC_ERROR("Failed to power down camera (%d)\n", i); + Err("Failed to power down camera (%d)\n", i); } } - pdev->vopen--; - PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen); + pdev->vopen = 0; + Trace(TRACE_OPEN, "<< video_close()\n"); return 0; } @@ -1242,7 +1164,7 @@ static int pwc_video_close(struct inode *inode, struct file *file) device is tricky anyhow. */ -static ssize_t pwc_video_read(struct file *file, char __user *buf, +static ssize_t pwc_video_read(struct file *file, char __user * buf, size_t count, loff_t *ppos) { struct video_device *vdev = file->private_data; @@ -1250,10 +1172,8 @@ static ssize_t pwc_video_read(struct file *file, char __user *buf, int noblock = file->f_flags & O_NONBLOCK; DECLARE_WAITQUEUE(wait, current); int bytes_to_read; - void *image_buffer_addr; - PWC_DEBUG_READ("pwc_video_read(vdev=0x%p, buf=%p, count=%zd) called.\n", - vdev, buf, count); + Trace(TRACE_READ, "video_read(0x%p, %p, %zu) called.\n", vdev, buf, count); if (vdev == NULL) return -EFAULT; pdev = vdev->priv; @@ -1294,19 +1214,16 @@ static ssize_t pwc_video_read(struct file *file, char __user *buf, return -EFAULT; } - PWC_DEBUG_READ("Copying data to user space.\n"); + Trace(TRACE_READ, "Copying data to user space.\n"); if (pdev->vpalette == VIDEO_PALETTE_RAW) - bytes_to_read = pdev->frame_size + sizeof(struct pwc_raw_frame); + bytes_to_read = pdev->frame_size; else bytes_to_read = pdev->view.size; /* copy bytes to user space; we allow for partial reads */ if (count + pdev->image_read_pos > bytes_to_read) count = bytes_to_read - pdev->image_read_pos; - image_buffer_addr = pdev->image_data; - image_buffer_addr += pdev->images[pdev->fill_image].offset; - image_buffer_addr += pdev->image_read_pos; - if (copy_to_user(buf, image_buffer_addr, count)) + if (copy_to_user(buf, pdev->image_ptr[pdev->fill_image] + pdev->image_read_pos, count)) return -EFAULT; pdev->image_read_pos += count; if (pdev->image_read_pos >= bytes_to_read) { /* All data has been read */ @@ -1336,56 +1253,370 @@ static unsigned int pwc_video_poll(struct file *file, poll_table *wait) return 0; } +static int pwc_video_do_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, void *arg) +{ + struct video_device *vdev = file->private_data; + struct pwc_device *pdev; + DECLARE_WAITQUEUE(wait, current); + + if (vdev == NULL) + return -EFAULT; + pdev = vdev->priv; + if (pdev == NULL) + return -EFAULT; + + switch (cmd) { + /* Query cabapilities */ + case VIDIOCGCAP: + { + struct video_capability *caps = arg; + + strcpy(caps->name, vdev->name); + caps->type = VID_TYPE_CAPTURE; + caps->channels = 1; + caps->audios = 1; + caps->minwidth = pdev->view_min.x; + caps->minheight = pdev->view_min.y; + caps->maxwidth = pdev->view_max.x; + caps->maxheight = pdev->view_max.y; + break; + } + + /* Channel functions (simulate 1 channel) */ + case VIDIOCGCHAN: + { + struct video_channel *v = arg; + + if (v->channel != 0) + return -EINVAL; + v->flags = 0; + v->tuners = 0; + v->type = VIDEO_TYPE_CAMERA; + strcpy(v->name, "Webcam"); + return 0; + } + + case VIDIOCSCHAN: + { + /* The spec says the argument is an integer, but + the bttv driver uses a video_channel arg, which + makes sense becasue it also has the norm flag. + */ + struct video_channel *v = arg; + if (v->channel != 0) + return -EINVAL; + return 0; + } + + + /* Picture functions; contrast etc. */ + case VIDIOCGPICT: + { + struct video_picture *p = arg; + int val; + + val = pwc_get_brightness(pdev); + if (val >= 0) + p->brightness = val; + else + p->brightness = 0xffff; + val = pwc_get_contrast(pdev); + if (val >= 0) + p->contrast = val; + else + p->contrast = 0xffff; + /* Gamma, Whiteness, what's the difference? :) */ + val = pwc_get_gamma(pdev); + if (val >= 0) + p->whiteness = val; + else + p->whiteness = 0xffff; + val = pwc_get_saturation(pdev); + if (val >= 0) + p->colour = val; + else + p->colour = 0xffff; + p->depth = 24; + p->palette = pdev->vpalette; + p->hue = 0xFFFF; /* N/A */ + break; + } + + case VIDIOCSPICT: + { + struct video_picture *p = arg; + /* + * FIXME: Suppose we are mid read + ANSWER: No problem: the firmware of the camera + can handle brightness/contrast/etc + changes at _any_ time, and the palette + is used exactly once in the uncompress + routine. + */ + pwc_set_brightness(pdev, p->brightness); + pwc_set_contrast(pdev, p->contrast); + pwc_set_gamma(pdev, p->whiteness); + pwc_set_saturation(pdev, p->colour); + if (p->palette && p->palette != pdev->vpalette) { + switch (p->palette) { + case VIDEO_PALETTE_YUV420P: + case VIDEO_PALETTE_RAW: + pdev->vpalette = p->palette; + return pwc_try_video_mode(pdev, pdev->image.x, pdev->image.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); + break; + default: + return -EINVAL; + break; + } + } + break; + } + + /* Window/size parameters */ + case VIDIOCGWIN: + { + struct video_window *vw = arg; + + vw->x = 0; + vw->y = 0; + vw->width = pdev->view.x; + vw->height = pdev->view.y; + vw->chromakey = 0; + vw->flags = (pdev->vframes << PWC_FPS_SHIFT) | + (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0); + break; + } + + case VIDIOCSWIN: + { + struct video_window *vw = arg; + int fps, snapshot, ret; + + fps = (vw->flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT; + snapshot = vw->flags & PWC_FPS_SNAPSHOT; + if (fps == 0) + fps = pdev->vframes; + if (pdev->view.x == vw->width && pdev->view.y && fps == pdev->vframes && snapshot == pdev->vsnapshot) + return 0; + ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot); + if (ret) + return ret; + break; + } + + /* We don't have overlay support (yet) */ + case VIDIOCGFBUF: + { + struct video_buffer *vb = arg; + + memset(vb,0,sizeof(*vb)); + break; + } + + /* mmap() functions */ + case VIDIOCGMBUF: + { + /* Tell the user program how much memory is needed for a mmap() */ + struct video_mbuf *vm = arg; + int i; + + memset(vm, 0, sizeof(*vm)); + vm->size = default_mbufs * pdev->len_per_image; + vm->frames = default_mbufs; /* double buffering should be enough for most applications */ + for (i = 0; i < default_mbufs; i++) + vm->offsets[i] = i * pdev->len_per_image; + break; + } + + case VIDIOCMCAPTURE: + { + /* Start capture into a given image buffer (called 'frame' in video_mmap structure) */ + struct video_mmap *vm = arg; + + Trace(TRACE_READ, "VIDIOCMCAPTURE: %dx%d, frame %d, format %d\n", vm->width, vm->height, vm->frame, vm->format); + if (vm->frame < 0 || vm->frame >= default_mbufs) + return -EINVAL; + + /* xawtv is nasty. It probes the available palettes + by setting a very small image size and trying + various palettes... The driver doesn't support + such small images, so I'm working around it. + */ + if (vm->format) + { + switch (vm->format) + { + case VIDEO_PALETTE_YUV420P: + case VIDEO_PALETTE_RAW: + break; + default: + return -EINVAL; + break; + } + } + + if ((vm->width != pdev->view.x || vm->height != pdev->view.y) && + (vm->width >= pdev->view_min.x && vm->height >= pdev->view_min.y)) { + int ret; + + Trace(TRACE_OPEN, "VIDIOCMCAPTURE: changing size to please xawtv :-(.\n"); + ret = pwc_try_video_mode(pdev, vm->width, vm->height, pdev->vframes, pdev->vcompression, pdev->vsnapshot); + if (ret) + return ret; + } /* ... size mismatch */ + + /* FIXME: should we lock here? */ + if (pdev->image_used[vm->frame]) + return -EBUSY; /* buffer wasn't available. Bummer */ + pdev->image_used[vm->frame] = 1; + + /* Okay, we're done here. In the SYNC call we wait until a + frame comes available, then expand image into the given + buffer. + In contrast to the CPiA cam the Philips cams deliver a + constant stream, almost like a grabber card. Also, + we have separate buffers for the rawdata and the image, + meaning we can nearly always expand into the requested buffer. + */ + Trace(TRACE_READ, "VIDIOCMCAPTURE done.\n"); + break; + } + + case VIDIOCSYNC: + { + /* The doc says: "Whenever a buffer is used it should + call VIDIOCSYNC to free this frame up and continue." + + The only odd thing about this whole procedure is + that MCAPTURE flags the buffer as "in use", and + SYNC immediately unmarks it, while it isn't + after SYNC that you know that the buffer actually + got filled! So you better not start a CAPTURE in + the same frame immediately (use double buffering). + This is not a problem for this cam, since it has + extra intermediate buffers, but a hardware + grabber card will then overwrite the buffer + you're working on. + */ + int *mbuf = arg; + int ret; + + Trace(TRACE_READ, "VIDIOCSYNC called (%d).\n", *mbuf); + + /* bounds check */ + if (*mbuf < 0 || *mbuf >= default_mbufs) + return -EINVAL; + /* check if this buffer was requested anyway */ + if (pdev->image_used[*mbuf] == 0) + return -EINVAL; + + /* Add ourselves to the frame wait-queue. + + FIXME: needs auditing for safety. + QUESTION: In what respect? I think that using the + frameq is safe now. + */ + add_wait_queue(&pdev->frameq, &wait); + while (pdev->full_frames == NULL) { + if (pdev->error_status) { + remove_wait_queue(&pdev->frameq, &wait); + set_current_state(TASK_RUNNING); + return -pdev->error_status; + } + + if (signal_pending(current)) { + remove_wait_queue(&pdev->frameq, &wait); + set_current_state(TASK_RUNNING); + return -ERESTARTSYS; + } + schedule(); + set_current_state(TASK_INTERRUPTIBLE); + } + remove_wait_queue(&pdev->frameq, &wait); + set_current_state(TASK_RUNNING); + + /* The frame is ready. Expand in the image buffer + requested by the user. I don't care if you + mmap() 5 buffers and request data in this order: + buffer 4 2 3 0 1 2 3 0 4 3 1 . . . + Grabber hardware may not be so forgiving. + */ + Trace(TRACE_READ, "VIDIOCSYNC: frame ready.\n"); + pdev->fill_image = *mbuf; /* tell in which buffer we want the image to be expanded */ + /* Decompress, etc */ + ret = pwc_handle_frame(pdev); + pdev->image_used[*mbuf] = 0; + if (ret) + return -EFAULT; + break; + } + + case VIDIOCGAUDIO: + { + struct video_audio *v = arg; + + strcpy(v->name, "Microphone"); + v->audio = -1; /* unknown audio minor */ + v->flags = 0; + v->mode = VIDEO_SOUND_MONO; + v->volume = 0; + v->bass = 0; + v->treble = 0; + v->balance = 0x8000; + v->step = 1; + break; + } + + case VIDIOCSAUDIO: + { + /* Dummy: nothing can be set */ + break; + } + + case VIDIOCGUNIT: + { + struct video_unit *vu = arg; + + vu->video = pdev->vdev->minor & 0x3F; + vu->audio = -1; /* not known yet */ + vu->vbi = -1; + vu->radio = -1; + vu->teletext = -1; + break; + } + default: + return pwc_ioctl(pdev, cmd, arg); + } /* ..switch */ + return 0; +} + static int pwc_video_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { return video_usercopy(inode, file, cmd, arg, pwc_video_do_ioctl); } + static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) { struct video_device *vdev = file->private_data; struct pwc_device *pdev; - unsigned long start; - unsigned long size; - unsigned long page, pos = 0; - int index; + unsigned long start = vma->vm_start; + unsigned long size = vma->vm_end-vma->vm_start; + unsigned long page, pos; - PWC_DEBUG_MEMORY(">> %s\n", __FUNCTION__); + Trace(TRACE_MEMORY, "mmap(0x%p, 0x%lx, %lu) called.\n", vdev, start, size); pdev = vdev->priv; - size = vma->vm_end - vma->vm_start; - start = vma->vm_start; - /* Find the idx buffer for this mapping */ - for (index = 0; index < pwc_mbufs; index++) { - pos = pdev->images[index].offset; - if ((pos>>PAGE_SHIFT) == vma->vm_pgoff) - break; - } - if (index == MAX_IMAGES) - return -EINVAL; - if (index == 0) { - /* - * Special case for v4l1. In v4l1, we map only one big buffer, - * but in v4l2 each buffer is mapped - */ - unsigned long total_size; - total_size = pwc_mbufs * pdev->len_per_image; - if (size != pdev->len_per_image && size != total_size) { - PWC_ERROR("Wrong size (%lu) needed to be len_per_image=%d or total_size=%lu\n", - size, pdev->len_per_image, total_size); - return -EINVAL; - } - } else if (size > pdev->len_per_image) - return -EINVAL; + vma->vm_flags |= VM_IO; - vma->vm_flags |= VM_IO; /* from 2.6.9-acX */ - - pos += (unsigned long)pdev->image_data; + pos = (unsigned long)pdev->image_data; while (size > 0) { page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; + start += PAGE_SIZE; pos += PAGE_SIZE; if (size > PAGE_SIZE) @@ -1393,6 +1624,7 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) else size = 0; } + return 0; } @@ -1413,12 +1645,10 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id int video_nr = -1; /* default: use next available device */ char serial_number[30], *name; - vendor_id = le16_to_cpu(udev->descriptor.idVendor); - product_id = le16_to_cpu(udev->descriptor.idProduct); - /* Check if we can handle this device */ - PWC_DEBUG_PROBE("probe() called [%04X %04X], if %d\n", - vendor_id, product_id, + Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n", + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct), intf->altsetting->desc.bInterfaceNumber); /* the interfaces are probed one by one. We are only interested in the @@ -1428,63 +1658,61 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id if (intf->altsetting->desc.bInterfaceNumber > 0) return -ENODEV; + vendor_id = le16_to_cpu(udev->descriptor.idVendor); + product_id = le16_to_cpu(udev->descriptor.idProduct); + if (vendor_id == 0x0471) { switch (product_id) { case 0x0302: - PWC_INFO("Philips PCA645VC USB webcam detected.\n"); + Info("Philips PCA645VC USB webcam detected.\n"); name = "Philips 645 webcam"; type_id = 645; break; case 0x0303: - PWC_INFO("Philips PCA646VC USB webcam detected.\n"); + Info("Philips PCA646VC USB webcam detected.\n"); name = "Philips 646 webcam"; type_id = 646; break; case 0x0304: - PWC_INFO("Askey VC010 type 2 USB webcam detected.\n"); + Info("Askey VC010 type 2 USB webcam detected.\n"); name = "Askey VC010 webcam"; type_id = 646; break; case 0x0307: - PWC_INFO("Philips PCVC675K (Vesta) USB webcam detected.\n"); + Info("Philips PCVC675K (Vesta) USB webcam detected.\n"); name = "Philips 675 webcam"; type_id = 675; break; case 0x0308: - PWC_INFO("Philips PCVC680K (Vesta Pro) USB webcam detected.\n"); + Info("Philips PCVC680K (Vesta Pro) USB webcam detected.\n"); name = "Philips 680 webcam"; type_id = 680; break; case 0x030C: - PWC_INFO("Philips PCVC690K (Vesta Pro Scan) USB webcam detected.\n"); + Info("Philips PCVC690K (Vesta Pro Scan) USB webcam detected.\n"); name = "Philips 690 webcam"; type_id = 690; break; case 0x0310: - PWC_INFO("Philips PCVC730K (ToUCam Fun)/PCVC830 (ToUCam II) USB webcam detected.\n"); + Info("Philips PCVC730K (ToUCam Fun)/PCVC830 (ToUCam II) USB webcam detected.\n"); name = "Philips 730 webcam"; type_id = 730; break; case 0x0311: - PWC_INFO("Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam detected.\n"); + Info("Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam detected.\n"); name = "Philips 740 webcam"; type_id = 740; break; case 0x0312: - PWC_INFO("Philips PCVC750K (ToUCam Pro Scan) USB webcam detected.\n"); + Info("Philips PCVC750K (ToUCam Pro Scan) USB webcam detected.\n"); name = "Philips 750 webcam"; type_id = 750; break; case 0x0313: - PWC_INFO("Philips PCVC720K/40 (ToUCam XS) USB webcam detected.\n"); + Info("Philips PCVC720K/40 (ToUCam XS) USB webcam detected.\n"); name = "Philips 720K/40 webcam"; type_id = 720; break; - case 0x0329: - PWC_INFO("Philips SPC 900NC USB webcam detected.\n"); - name = "Philips SPC 900NC webcam"; - type_id = 720; - break; default: return -ENODEV; break; @@ -1493,7 +1721,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id else if (vendor_id == 0x069A) { switch(product_id) { case 0x0001: - PWC_INFO("Askey VC010 type 1 USB webcam detected.\n"); + Info("Askey VC010 type 1 USB webcam detected.\n"); name = "Askey VC010 webcam"; type_id = 645; break; @@ -1505,33 +1733,32 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id else if (vendor_id == 0x046d) { switch(product_id) { case 0x08b0: - PWC_INFO("Logitech QuickCam Pro 3000 USB webcam detected.\n"); + Info("Logitech QuickCam Pro 3000 USB webcam detected.\n"); name = "Logitech QuickCam Pro 3000"; type_id = 740; /* CCD sensor */ break; case 0x08b1: - PWC_INFO("Logitech QuickCam Notebook Pro USB webcam detected.\n"); + Info("Logitech QuickCam Notebook Pro USB webcam detected.\n"); name = "Logitech QuickCam Notebook Pro"; type_id = 740; /* CCD sensor */ break; case 0x08b2: - PWC_INFO("Logitech QuickCam 4000 Pro USB webcam detected.\n"); + Info("Logitech QuickCam 4000 Pro USB webcam detected.\n"); name = "Logitech QuickCam Pro 4000"; type_id = 740; /* CCD sensor */ break; case 0x08b3: - PWC_INFO("Logitech QuickCam Zoom USB webcam detected.\n"); + Info("Logitech QuickCam Zoom USB webcam detected.\n"); name = "Logitech QuickCam Zoom"; type_id = 740; /* CCD sensor */ break; case 0x08B4: - PWC_INFO("Logitech QuickCam Zoom (new model) USB webcam detected.\n"); + Info("Logitech QuickCam Zoom (new model) USB webcam detected.\n"); name = "Logitech QuickCam Zoom"; type_id = 740; /* CCD sensor */ - power_save = 1; break; case 0x08b5: - PWC_INFO("Logitech QuickCam Orbit/Sphere USB webcam detected.\n"); + Info("Logitech QuickCam Orbit/Sphere USB webcam detected.\n"); name = "Logitech QuickCam Orbit"; type_id = 740; /* CCD sensor */ features |= FEATURE_MOTOR_PANTILT; @@ -1539,7 +1766,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id case 0x08b6: case 0x08b7: case 0x08b8: - PWC_INFO("Logitech QuickCam detected (reserved ID).\n"); + Info("Logitech QuickCam detected (reserved ID).\n"); name = "Logitech QuickCam (res.)"; type_id = 730; /* Assuming CMOS */ break; @@ -1555,20 +1782,15 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id */ switch(product_id) { case 0x9000: - PWC_INFO("Samsung MPC-C10 USB webcam detected.\n"); + Info("Samsung MPC-C10 USB webcam detected.\n"); name = "Samsung MPC-C10"; type_id = 675; break; case 0x9001: - PWC_INFO("Samsung MPC-C30 USB webcam detected.\n"); + Info("Samsung MPC-C30 USB webcam detected.\n"); name = "Samsung MPC-C30"; type_id = 675; break; - case 0x9002: - PWC_INFO("Samsung SNC-35E (v3.0) USB webcam detected.\n"); - name = "Samsung MPC-C30"; - type_id = 740; - break; default: return -ENODEV; break; @@ -1577,12 +1799,12 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id else if (vendor_id == 0x041e) { switch(product_id) { case 0x400c: - PWC_INFO("Creative Labs Webcam 5 detected.\n"); + Info("Creative Labs Webcam 5 detected.\n"); name = "Creative Labs Webcam 5"; type_id = 730; break; case 0x4011: - PWC_INFO("Creative Labs Webcam Pro Ex detected.\n"); + Info("Creative Labs Webcam Pro Ex detected.\n"); name = "Creative Labs Webcam Pro Ex"; type_id = 740; break; @@ -1594,7 +1816,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id else if (vendor_id == 0x04cc) { switch(product_id) { case 0x8116: - PWC_INFO("Sotec Afina Eye USB webcam detected.\n"); + Info("Sotec Afina Eye USB webcam detected.\n"); name = "Sotec Afina Eye"; type_id = 730; break; @@ -1607,7 +1829,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id switch(product_id) { case 0x8116: /* This is essentially the same cam as the Sotec Afina Eye */ - PWC_INFO("AME Co. Afina Eye USB webcam detected.\n"); + Info("AME Co. Afina Eye USB webcam detected.\n"); name = "AME Co. Afina Eye"; type_id = 750; break; @@ -1620,12 +1842,12 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id else if (vendor_id == 0x0d81) { switch(product_id) { case 0x1900: - PWC_INFO("Visionite VCS-UC300 USB webcam detected.\n"); + Info("Visionite VCS-UC300 USB webcam detected.\n"); name = "Visionite VCS-UC300"; type_id = 740; /* CCD sensor */ break; case 0x1910: - PWC_INFO("Visionite VCS-UM100 USB webcam detected.\n"); + Info("Visionite VCS-UM100 USB webcam detected.\n"); name = "Visionite VCS-UM100"; type_id = 730; /* CMOS sensor */ break; @@ -1639,15 +1861,15 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id memset(serial_number, 0, 30); usb_string(udev, udev->descriptor.iSerialNumber, serial_number, 29); - PWC_DEBUG_PROBE("Device serial number is %s\n", serial_number); + Trace(TRACE_PROBE, "Device serial number is %s\n", serial_number); if (udev->descriptor.bNumConfigurations > 1) - PWC_WARNING("Warning: more than 1 configuration available.\n"); + Info("Warning: more than 1 configuration available.\n"); /* Allocate structure, initialize pointers, mutexes, etc. and link it to the usb_device */ pdev = kzalloc(sizeof(struct pwc_device), GFP_KERNEL); if (pdev == NULL) { - PWC_ERROR("Oops, could not allocate memory for pwc_device.\n"); + Err("Oops, could not allocate memory for pwc_device.\n"); return -ENOMEM; } pdev->type = type_id; @@ -1678,18 +1900,17 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id pdev->vdev = video_device_alloc(); if (pdev->vdev == 0) { - PWC_ERROR("Err, cannot allocate video_device struture. Failing probe."); + Err("Err, cannot allocate video_device struture. Failing probe."); kfree(pdev); return -ENOMEM; } memcpy(pdev->vdev, &pwc_template, sizeof(pwc_template)); - pdev->vdev->dev = &(udev->dev); strcpy(pdev->vdev->name, name); pdev->vdev->owner = THIS_MODULE; video_set_drvdata(pdev->vdev, pdev); pdev->release = le16_to_cpu(udev->descriptor.bcdDevice); - PWC_DEBUG_PROBE("Release: %04x\n", pdev->release); + Trace(TRACE_PROBE, "Release: %04x\n", pdev->release); /* Now search device_hint[] table for a match, so we can hint a node number. */ for (hint = 0; hint < MAX_DEV_HINTS; hint++) { @@ -1697,10 +1918,10 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id (device_hint[hint].pdev == NULL)) { /* so far, so good... try serial number */ if ((device_hint[hint].serial_number[0] == '*') || !strcmp(device_hint[hint].serial_number, serial_number)) { - /* match! */ - video_nr = device_hint[hint].device_node; - PWC_DEBUG_PROBE("Found hint, will try to register as /dev/video%d\n", video_nr); - break; + /* match! */ + video_nr = device_hint[hint].device_node; + Trace(TRACE_PROBE, "Found hint, will try to register as /dev/video%d\n", video_nr); + break; } } } @@ -1708,27 +1929,21 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id pdev->vdev->release = video_device_release; i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr); if (i < 0) { - PWC_ERROR("Failed to register as video device (%d).\n", i); + Err("Failed to register as video device (%d).\n", i); video_device_release(pdev->vdev); /* Drip... drip... drip... */ kfree(pdev); /* Oops, no memory leaks please */ return -EIO; } else { - PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F); + Info("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F); } /* occupy slot */ if (hint < MAX_DEV_HINTS) device_hint[hint].pdev = pdev; - PWC_DEBUG_PROBE("probe() function returning struct at 0x%p.\n", pdev); + Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev); usb_set_intfdata (intf, pdev); - pwc_create_sysfs_files(pdev->vdev); - - /* Set the leds off */ - pwc_set_leds(pdev, 0, 0); - pwc_camera_power(pdev, 0); - return 0; } @@ -1742,21 +1957,27 @@ static void usb_pwc_disconnect(struct usb_interface *intf) pdev = usb_get_intfdata (intf); usb_set_intfdata (intf, NULL); if (pdev == NULL) { - PWC_ERROR("pwc_disconnect() Called without private pointer.\n"); + Err("pwc_disconnect() Called without private pointer.\n"); goto disconnect_out; } if (pdev->udev == NULL) { - PWC_ERROR("pwc_disconnect() already called for %p\n", pdev); + Err("pwc_disconnect() already called for %p\n", pdev); goto disconnect_out; } if (pdev->udev != interface_to_usbdev(intf)) { - PWC_ERROR("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n"); + Err("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n"); + goto disconnect_out; + } +#ifdef PWC_MAGIC + if (pdev->magic != PWC_MAGIC) { + Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n"); goto disconnect_out; } +#endif /* We got unplugged; this is signalled by an EPIPE error code */ if (pdev->vopen) { - PWC_INFO("Disconnected while webcam is in use!\n"); + Info("Disconnected while webcam is in use!\n"); pdev->error_status = EPIPE; } @@ -1766,8 +1987,7 @@ static void usb_pwc_disconnect(struct usb_interface *intf) while (pdev->vopen) schedule(); /* Device is now closed, so we can safely unregister it */ - PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n"); - pwc_remove_sysfs_files(pdev->vdev); + Trace(TRACE_PROBE, "Unregistering video device in disconnect().\n"); video_unregister_device(pdev->vdev); /* Free memory (don't set pdev to 0 just yet) */ @@ -1801,64 +2021,58 @@ static int pwc_atoi(const char *s) * Initialization code & module stuff */ -static char *size; -static int fps; -static int fbufs; -static int mbufs; +static char size[10]; +static int fps = 0; +static int fbufs = 0; +static int mbufs = 0; +static int trace = -1; static int compression = -1; static int leds[2] = { -1, -1 }; -static int leds_nargs; -static char *dev_hint[MAX_DEV_HINTS]; -static int dev_hint_nargs; - -module_param(size, charp, 0444); -module_param(fps, int, 0444); -module_param(fbufs, int, 0444); -module_param(mbufs, int, 0444); -#if CONFIG_PWC_DEBUG -module_param_named(trace, pwc_trace, int, 0644); -#endif -module_param(power_save, int, 0444); -module_param(compression, int, 0444); -module_param_array(leds, int, &leds_nargs, 0444); -module_param_array(dev_hint, charp, &dev_hint_nargs, 0444); +static char *dev_hint[MAX_DEV_HINTS] = { }; +module_param_string(size, size, sizeof(size), 0); MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); +module_param(fps, int, 0000); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); +module_param(fbufs, int, 0000); MODULE_PARM_DESC(fbufs, "Number of internal frame buffers to reserve"); +module_param(mbufs, int, 0000); MODULE_PARM_DESC(mbufs, "Number of external (mmap()ed) image buffers"); +module_param(trace, int, 0000); MODULE_PARM_DESC(trace, "For debugging purposes"); +module_param(power_save, bool, 0000); MODULE_PARM_DESC(power_save, "Turn power save feature in camera on or off"); +module_param(compression, int, 0000); MODULE_PARM_DESC(compression, "Preferred compression quality. Range 0 (uncompressed) to 3 (high compression)"); +module_param_array(leds, int, NULL, 0000); MODULE_PARM_DESC(leds, "LED on,off time in milliseconds"); +module_param_array(dev_hint, charp, NULL, 0000); MODULE_PARM_DESC(dev_hint, "Device node hints"); MODULE_DESCRIPTION("Philips & OEM USB webcam driver"); MODULE_AUTHOR("Luc Saillard "); MODULE_LICENSE("GPL"); -MODULE_ALIAS("pwcx"); -MODULE_VERSION( PWC_VERSION ); static int __init usb_pwc_init(void) { int i, sz; char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" }; - PWC_INFO("Philips webcam module version " PWC_VERSION " loaded.\n"); - PWC_INFO("Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.\n"); - PWC_INFO("Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,\n"); - PWC_INFO("the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n"); + Info("Philips webcam module version " PWC_VERSION " loaded.\n"); + Info("Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.\n"); + Info("Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,\n"); + Info("the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n"); if (fps) { if (fps < 4 || fps > 30) { - PWC_ERROR("Framerate out of bounds (4-30).\n"); + Err("Framerate out of bounds (4-30).\n"); return -EINVAL; } default_fps = fps; - PWC_DEBUG_MODULE("Default framerate set to %d.\n", default_fps); + Info("Default framerate set to %d.\n", default_fps); } - if (size) { + if (size[0]) { /* string; try matching with array */ for (sz = 0; sz < PSZ_MAX; sz++) { if (!strcmp(sizenames[sz], size)) { /* Found! */ @@ -1867,42 +2081,41 @@ static int __init usb_pwc_init(void) } } if (sz == PSZ_MAX) { - PWC_ERROR("Size not recognized; try size=[sqcif | qsif | qcif | sif | cif | vga].\n"); + Err("Size not recognized; try size=[sqcif | qsif | qcif | sif | cif | vga].\n"); return -EINVAL; } - PWC_DEBUG_MODULE("Default image size set to %s [%dx%d].\n", sizenames[default_size], pwc_image_sizes[default_size].x, pwc_image_sizes[default_size].y); + Info("Default image size set to %s [%dx%d].\n", sizenames[default_size], pwc_image_sizes[default_size].x, pwc_image_sizes[default_size].y); } if (mbufs) { if (mbufs < 1 || mbufs > MAX_IMAGES) { - PWC_ERROR("Illegal number of mmap() buffers; use a number between 1 and %d.\n", MAX_IMAGES); + Err("Illegal number of mmap() buffers; use a number between 1 and %d.\n", MAX_IMAGES); return -EINVAL; } - pwc_mbufs = mbufs; - PWC_DEBUG_MODULE("Number of image buffers set to %d.\n", pwc_mbufs); + default_mbufs = mbufs; + Info("Number of image buffers set to %d.\n", default_mbufs); } if (fbufs) { if (fbufs < 2 || fbufs > MAX_FRAMES) { - PWC_ERROR("Illegal number of frame buffers; use a number between 2 and %d.\n", MAX_FRAMES); + Err("Illegal number of frame buffers; use a number between 2 and %d.\n", MAX_FRAMES); return -EINVAL; } default_fbufs = fbufs; - PWC_DEBUG_MODULE("Number of frame buffers set to %d.\n", default_fbufs); + Info("Number of frame buffers set to %d.\n", default_fbufs); } -#if CONFIG_PWC_DEBUG - if (pwc_trace >= 0) { - PWC_DEBUG_MODULE("Trace options: 0x%04x\n", pwc_trace); + if (trace >= 0) { + Info("Trace options: 0x%04x\n", trace); + pwc_trace = trace; } -#endif if (compression >= 0) { if (compression > 3) { - PWC_ERROR("Invalid compression setting; use a number between 0 (uncompressed) and 3 (high).\n"); + Err("Invalid compression setting; use a number between 0 (uncompressed) and 3 (high).\n"); return -EINVAL; } pwc_preferred_compression = compression; - PWC_DEBUG_MODULE("Preferred compression set to %d.\n", pwc_preferred_compression); + Info("Preferred compression set to %d.\n", pwc_preferred_compression); } if (power_save) - PWC_DEBUG_MODULE("Enabling power save on open/close.\n"); + Info("Enabling power save on open/close.\n"); if (leds[0] >= 0) led_on = leds[0]; if (leds[1] >= 0) @@ -1933,14 +2146,14 @@ static int __init usb_pwc_init(void) dot++; /* Few sanity checks */ if (*dot != '\0' && dot > colon) { - PWC_ERROR("Malformed camera hint: the colon must be after the dot.\n"); + Err("Malformed camera hint: the colon must be after the dot.\n"); return -EINVAL; } if (*colon == '\0') { /* No colon */ if (*dot != '\0') { - PWC_ERROR("Malformed camera hint: no colon + device node given.\n"); + Err("Malformed camera hint: no colon + device node given.\n"); return -EINVAL; } else { @@ -1965,27 +2178,28 @@ static int __init usb_pwc_init(void) device_hint[i].serial_number[k] = '\0'; } } - PWC_TRACE("device_hint[%d]:\n", i); - PWC_TRACE(" type : %d\n", device_hint[i].type); - PWC_TRACE(" serial# : %s\n", device_hint[i].serial_number); - PWC_TRACE(" node : %d\n", device_hint[i].device_node); +#if PWC_DEBUG + Debug("device_hint[%d]:\n", i); + Debug(" type : %d\n", device_hint[i].type); + Debug(" serial# : %s\n", device_hint[i].serial_number); + Debug(" node : %d\n", device_hint[i].device_node); +#endif } else device_hint[i].type = 0; /* not filled */ } /* ..for MAX_DEV_HINTS */ - PWC_DEBUG_PROBE("Registering driver at address 0x%p.\n", &pwc_driver); + Trace(TRACE_PROBE, "Registering driver at address 0x%p.\n", &pwc_driver); return usb_register(&pwc_driver); } static void __exit usb_pwc_exit(void) { - PWC_DEBUG_MODULE("Deregistering driver.\n"); + Trace(TRACE_MODULE, "Deregistering driver.\n"); usb_deregister(&pwc_driver); - PWC_INFO("Philips webcam module removed.\n"); + Info("Philips webcam module removed.\n"); } module_init(usb_pwc_init); module_exit(usb_pwc_exit); -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ diff --git a/drivers/media/video/pwc/pwc-kiara.c b/drivers/media/video/pwc/pwc-kiara.c index fec39cc5a..4c96037f7 100644 --- a/drivers/media/video/pwc/pwc-kiara.c +++ b/drivers/media/video/pwc/pwc-kiara.c @@ -1,5 +1,5 @@ /* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -316,576 +316,3 @@ const struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4] = }, }; - -/* - * Rom table for kiara chips - * - * 32 roms tables (one for each resolution ?) - * 2 tables per roms (one for each passes) (Y, and U&V) - * 128 bytes per passes - */ - -const unsigned int KiaraRomTable [8][2][16][8] = -{ - { /* version 0 */ - { /* version 0, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000001,0x00000001}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x0000124a,0x00009252,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00009252,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009292,0x00009292,0x00009493,0x000124db}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x0000a493,0x000124db,0x000124db,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x000124db,0x000126dc,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 0, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000001,0x00000009, - 0x00000009,0x00000009,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00001252}, - {0x00000000,0x00000000,0x00000049,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009252,0x00009292,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009292,0x00009292,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00009292, - 0x00009492,0x00009493,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009252,0x00009493, - 0x000126dc,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x000136e4,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 1 */ - { /* version 1, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000001}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009252,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00009252, - 0x00009492,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 1, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000009, - 0x00000049,0x00000009,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000000}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000049,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009252,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009292,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009292,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009292,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x0000924a,0x0000924a, - 0x00009492,0x00009493,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 2 */ - { /* version 2, passes 0 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009493,0x00009493,0x0000a49b}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000124db,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x000126dc,0x0001b724,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 2, passes 1 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x0000a49b,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00009252,0x0000a49b, - 0x0001249b,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 3 */ - { /* version 3, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000136e4,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x000136e4,0x0001b925,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 3, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 4 */ - { /* version 4, passes 0 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00009252,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009252,0x00009493, - 0x000124db,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009252,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 4, passes 1 */ - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000049,0x00000049,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00000249,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009252,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009252,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009493,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 5 */ - { /* version 5, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001c96e,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 5, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009252,0x00009252,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000126dc,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 6 */ - { /* version 6, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x00012492,0x000126db, - 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 6, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009252,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009292,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 7 */ - { /* version 7, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x0000a49b, - 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b725,0x000124db}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001c96e,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b924,0x0001c92d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x00012492,0x000136db, - 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 7, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x00009492,0x00009292,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000136db, - 0x0001b724,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000136db, - 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00009292,0x000136db, - 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - } -}; - diff --git a/drivers/media/video/pwc/pwc-kiara.h b/drivers/media/video/pwc/pwc-kiara.h index 0bdb22547..12929abbb 100644 --- a/drivers/media/video/pwc/pwc-kiara.h +++ b/drivers/media/video/pwc/pwc-kiara.h @@ -1,5 +1,5 @@ /* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -27,7 +27,7 @@ #ifndef PWC_KIARA_H #define PWC_KIARA_H -#include +#include "pwc-ioctl.h" struct Kiara_table_entry { @@ -37,8 +37,8 @@ struct Kiara_table_entry unsigned char mode[12]; /* precomputed mode settings for cam */ }; -extern const struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4]; -extern const unsigned int KiaraRomTable[8][2][16][8]; +const extern struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4]; +const extern unsigned int KiaraRomTable[8][2][16][8]; #endif diff --git a/drivers/media/video/pwc/pwc-misc.c b/drivers/media/video/pwc/pwc-misc.c index 589c68743..58fe79747 100644 --- a/drivers/media/video/pwc/pwc-misc.c +++ b/drivers/media/video/pwc/pwc-misc.c @@ -1,7 +1,7 @@ /* Linux driver for Philips webcam Various miscellaneous functions and tables. (C) 1999-2003 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -24,17 +24,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "pwc.h" -const struct pwc_coord pwc_image_sizes[PSZ_MAX] = +struct pwc_coord pwc_image_sizes[PSZ_MAX] = { - { 128, 96, 0 }, /* sqcif */ - { 160, 120, 0 }, /* qsif */ - { 176, 144, 0 }, /* qcif */ - { 320, 240, 0 }, /* sif */ - { 352, 288, 0 }, /* cif */ - { 640, 480, 0 }, /* vga */ + { 128, 96, 0 }, + { 160, 120, 0 }, + { 176, 144, 0 }, + { 320, 240, 0 }, + { 352, 288, 0 }, + { 640, 480, 0 }, }; /* x,y -> PSZ_ */ @@ -51,7 +52,7 @@ int pwc_decode_size(struct pwc_device *pdev, int width, int height) { if (width > pdev->abs_max.x || height > pdev->abs_max.y) { - PWC_DEBUG_SIZE("VIDEO_PALETTE_RAW: going beyond abs_max.\n"); + Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n"); return -1; } } @@ -59,7 +60,7 @@ int pwc_decode_size(struct pwc_device *pdev, int width, int height) { if (width > pdev->view_max.x || height > pdev->view_max.y) { - PWC_DEBUG_SIZE("VIDEO_PALETTE_not RAW: going beyond view_max.\n"); + Debug("VIDEO_PALETTE_ not RAW: going beyond view_max.\n"); return -1; } } @@ -80,8 +81,9 @@ int pwc_decode_size(struct pwc_device *pdev, int width, int height) /* initialize variables depending on type and decompressor*/ void pwc_construct(struct pwc_device *pdev) { - if (DEVICE_USE_CODEC1(pdev->type)) { - + switch(pdev->type) { + case 645: + case 646: pdev->view_min.x = 128; pdev->view_min.y = 96; pdev->view_max.x = 352; @@ -93,23 +95,10 @@ void pwc_construct(struct pwc_device *pdev) pdev->vendpoint = 4; pdev->frame_header_size = 0; pdev->frame_trailer_size = 0; - - } else if (DEVICE_USE_CODEC3(pdev->type)) { - - pdev->view_min.x = 160; - pdev->view_min.y = 120; - pdev->view_max.x = 640; - pdev->view_max.y = 480; - pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA; - pdev->abs_max.x = 640; - pdev->abs_max.y = 480; - pdev->vcinterface = 3; - pdev->vendpoint = 5; - pdev->frame_header_size = TOUCAM_HEADER_SIZE; - pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE; - - } else /* if (DEVICE_USE_CODEC2(pdev->type)) */ { - + break; + case 675: + case 680: + case 690: pdev->view_min.x = 128; pdev->view_min.y = 96; /* Anthill bug #38: PWC always reports max size, even without PWCX */ @@ -122,12 +111,30 @@ void pwc_construct(struct pwc_device *pdev) pdev->vendpoint = 4; pdev->frame_header_size = 0; pdev->frame_trailer_size = 0; + break; + case 720: + case 730: + case 740: + case 750: + pdev->view_min.x = 160; + pdev->view_min.y = 120; + pdev->view_max.x = 640; + pdev->view_max.y = 480; + pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA; + pdev->abs_max.x = 640; + pdev->abs_max.y = 480; + pdev->vcinterface = 3; + pdev->vendpoint = 5; + pdev->frame_header_size = TOUCAM_HEADER_SIZE; + pdev->frame_trailer_size = TOUCAM_TRAILER_SIZE; + break; } + Debug("type = %d\n",pdev->type); pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */ pdev->view_min.size = pdev->view_min.x * pdev->view_min.y; pdev->view_max.size = pdev->view_max.x * pdev->view_max.y; /* length of image, in YUV format; always allocate enough memory. */ - pdev->len_per_image = PAGE_ALIGN((pdev->abs_max.x * pdev->abs_max.y * 3) / 2); + pdev->len_per_image = (pdev->abs_max.x * pdev->abs_max.y * 3) / 2; } diff --git a/drivers/media/video/pwc/pwc-timon.c b/drivers/media/video/pwc/pwc-timon.c index be65bdcd1..175250d08 100644 --- a/drivers/media/video/pwc/pwc-timon.c +++ b/drivers/media/video/pwc/pwc-timon.c @@ -1,5 +1,5 @@ /* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -314,1133 +314,3 @@ const struct Timon_table_entry Timon_table[PSZ_MAX][6][4] = }, }; -/* - * 16 versions: - * 2 tables (one for Y, and one for U&V) - * 16 levels of details per tables - * 8 blocs - */ - -const unsigned int TimonRomTable [16][2][16][8] = -{ - { /* version 0 */ - { /* version 0, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000001}, - {0x00000000,0x00000000,0x00000001,0x00000001, - 0x00000001,0x00000001,0x00000001,0x00000001}, - {0x00000000,0x00000000,0x00000001,0x00000001, - 0x00000001,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000001, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000009,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x00000249,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x0000124a,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 0, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000001,0x00000001, - 0x00000001,0x00000001,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000009,0x00000001, - 0x00000001,0x00000009,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000009, - 0x00000009,0x00000049,0x00000001,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000009, - 0x00000009,0x00000049,0x00000001,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000249,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 1 */ - { /* version 1, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000001}, - {0x00000000,0x00000000,0x00000001,0x00000001, - 0x00000001,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000009,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00001252}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 1, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000001,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000009,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000001,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000049,0x00000249,0x00000009,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000249,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00000049,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009252,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 2 */ - { /* version 2, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000001}, - {0x00000000,0x00000000,0x00000009,0x00000009, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009252,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00009252, - 0x00009492,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 2, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000009, - 0x00000049,0x00000009,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000000}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000049,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x0000024a,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009252,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009292,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009292,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009292,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x0000924a,0x0000924a, - 0x00009492,0x00009493,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 3 */ - { /* version 3, passes 0 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000001}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000049,0x00000249, - 0x00000249,0x00000249,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009292,0x00009292,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009292,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00009252, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009292,0x0000a49b,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x0000a49b,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x0001b725,0x000136e4}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 3, passes 1 */ - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000}, - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000001,0x00000000}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x00000049,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00000001}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009252,0x00009292,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009252,0x00009292,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009493,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009493,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009493,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009292, - 0x0000a493,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 4 */ - { /* version 4, passes 0 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00009252,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009493,0x00009493,0x0000a49b}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000124db,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x000126dc,0x0001b724,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 4, passes 1 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x0000a49b,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00009252,0x0000a49b, - 0x0001249b,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 5 */ - { /* version 5, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x0000124a,0x00001252,0x00009292}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x0000124a,0x00009292,0x00009292,0x00009493}, - {0x00000000,0x00000000,0x00000249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x000124db,0x000124db,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000126dc,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 5, passes 1 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x00009493,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x000124db,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009493,0x000124db,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x000124db,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x000126dc,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 6 */ - { /* version 6, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x0000124a,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000136e4,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x000136e4,0x0001b925,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 6, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x0000a49b,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 7 */ - { /* version 7, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x0000a49b,0x000124db,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0001249b,0x000126dc,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000126dc,0x0001b724,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001c96e,0x0002496e}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x0001b925,0x0001c96e,0x0002496e}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x0002496d,0x00025bb6,0x00025bbf}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 7, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000136e4,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x000136e4,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00012492,0x000126db, - 0x0001b724,0x0001b925,0x0001b725,0x000136e4}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 8 */ - { /* version 8, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009292,0x00009493,0x0000a49b,0x000124db}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x000124db,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000136e4}, - {0x00000000,0x00000000,0x00001249,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000136e4,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b725,0x0001b925}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x000126dc,0x0001b724,0x0001b92d,0x0001c92d}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000126dc,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x00024b76,0x00024b77}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x0001b925,0x00024b76,0x00025bbf}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x000136e4,0x0001c92d,0x00024b76,0x00025bbf}, - {0x00000000,0x00000000,0x00012492,0x000136db, - 0x0001b724,0x00024b6d,0x0002ddb6,0x0002efff}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 8, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000126dc,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000136e4,0x0001b724,0x0001b725,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x0001b925,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x0001b925,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x0002496d,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 9 */ - { /* version 9, passes 0 */ - {0x00000000,0x00000000,0x00000049,0x00000049, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000249,0x00000249,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x0000124a,0x00009252,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009252,0x00009493, - 0x000124db,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009252,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 9, passes 1 */ - {0x00000000,0x00000000,0x00000249,0x00000049, - 0x00000009,0x00000009,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000049,0x00000049,0x00000009,0x00000009}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00000249,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009252,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009252,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009493,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009252,0x000124db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 10 */ - { /* version 10, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00000249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x00009493,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x000124db,0x000124db,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0001249b,0x000126dc,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000126dc,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009252,0x0000a49b, - 0x000124db,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000126dc,0x0001b925,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x000136e4,0x0002496d,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 10, passes 1 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000049,0x00000049,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00000249,0x00000049,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x00009252,0x0000024a,0x00000049}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009493,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009252, - 0x00009492,0x00009493,0x00001252,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009493,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x00009492,0x00009493,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009493,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009252,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 11 */ - { /* version 11, passes 0 */ - {0x00000000,0x00000000,0x00000249,0x00000249, - 0x00000249,0x00000249,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009492,0x0000a49b,0x0000a49b,0x00009292}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x000136e4}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001c96e,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 11, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00000249, - 0x00000249,0x00000249,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009252,0x00009252,0x0000024a,0x0000024a}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x0000a49b,0x00009292,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000126dc,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 12 */ - { /* version 12, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x0000a493,0x0000a49b,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001b92d,0x0001b724}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001b925,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x00012492,0x000126db, - 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 12, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x00001249,0x00009292, - 0x00009492,0x00009252,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009292,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000124db,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000126dc,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x000136e4,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00009492,0x000126db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 13 */ - { /* version 13, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x00009252,0x00009292,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x0000a49b, - 0x0001249b,0x000126dc,0x000126dc,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x000136e4,0x0001b725,0x000124db}, - {0x00000000,0x00000000,0x00009292,0x0000a49b, - 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000136e4,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001c96e,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x000136e4,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b924,0x0001c92d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x00012492,0x000136db, - 0x00024924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 13, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x00009492,0x00009292,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x0000a49b,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000124db,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000136db, - 0x0001b724,0x000124db,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000136db, - 0x0001b724,0x000126dc,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00009292,0x000136db, - 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000126dc,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 14 */ - { /* version 14, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x0000924a, - 0x00009292,0x00009493,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00001249,0x0000a49b, - 0x0000a493,0x000124db,0x000126dc,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x0000a49b}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x000136e4,0x0001b725,0x000124db}, - {0x00000000,0x00000000,0x00009292,0x000124db, - 0x000126dc,0x0001b724,0x0001b92d,0x000126dc}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b724,0x0001b92d,0x000126dc}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001c92d,0x0001c96e,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x00024b76,0x0001b925}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b724,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x0001c92d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b924,0x0002496d,0x00024b76,0x00024b77}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x00024924,0x0002db6d,0x00036db6,0x0002efff}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 14, passes 1 */ - {0x00000000,0x00000000,0x00001249,0x00001249, - 0x0000124a,0x0000124a,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x00009493, - 0x0000a493,0x00009292,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x0000a49b,0x00001252,0x00001252}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000136e4,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000136e4,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x000136e4,0x00009493,0x00009292}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000136e4,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000136e4,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000136e4,0x0000a49b,0x00009493}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001b724,0x000136e4,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000124db,0x0000a49b}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b724,0x000136e4,0x000126dc,0x000124db}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x0001c924,0x0001b724,0x000136e4,0x000126dc}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - }, - { /* version 15 */ - { /* version 15, passes 0 */ - {0x00000000,0x00000000,0x00001249,0x00009493, - 0x0000a493,0x0000a49b,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0001249b,0x000126dc,0x000136e4,0x000124db}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x000126dc,0x0001b724,0x0001b725,0x000126dc}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x0001b724,0x0001b92d,0x000126dc}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x000136e4,0x0001b925,0x0001c96e,0x000136e4}, - {0x00000000,0x00000000,0x00009492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000124db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b724}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b724,0x0001c92d,0x0001c96e,0x0001b925}, - {0x00000000,0x00000000,0x0000a492,0x000126db, - 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b924,0x0001c92d,0x00024b76,0x0001c92d}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001b924,0x0002496d,0x00024b76,0x0002496e}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0002496d,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x00024b6d,0x00025bb6,0x00024b77}, - {0x00000000,0x00000000,0x00012492,0x000136db, - 0x0001c924,0x00024b6d,0x0002ddb6,0x00025bbf}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x00024924,0x0002db6d,0x00036db6,0x0002efff}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - }, - { /* version 15, passes 1 */ - {0x00000000,0x00000000,0x0000924a,0x0000924a, - 0x00009292,0x00009292,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x0000a49b, - 0x0000a493,0x000124db,0x00009292,0x00009292}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000124db,0x0001b724,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000126dc,0x0001b724,0x00009493,0x00009493}, - {0x00000000,0x00000000,0x0000924a,0x000124db, - 0x000136e4,0x0001b724,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00009292,0x000136db, - 0x0001b724,0x0001b724,0x0000a49b,0x0000a49b}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001c924,0x0001b724,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x00009492,0x000136db, - 0x0001c924,0x0001b724,0x000124db,0x000124db}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b724,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b925,0x000126dc,0x000126dc}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b925,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b925,0x000136e4,0x000136e4}, - {0x00000000,0x00000000,0x0000a492,0x000136db, - 0x0001c924,0x0001b925,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x00012492,0x000136db, - 0x0001c924,0x0001b925,0x0001b725,0x0001b724}, - {0x00000000,0x00000000,0x00012492,0x0001b6db, - 0x00024924,0x0002496d,0x0001b92d,0x0001b925}, - {0x00000000,0x00000000,0x00000000,0x00000000, - 0x00000000,0x00000000,0x00000000,0x00000000} - } - } -}; diff --git a/drivers/media/video/pwc/pwc-timon.h b/drivers/media/video/pwc/pwc-timon.h index eef9e2cd4..a86b3782a 100644 --- a/drivers/media/video/pwc/pwc-timon.h +++ b/drivers/media/video/pwc/pwc-timon.h @@ -1,5 +1,5 @@ /* Linux driver for Philips webcam - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -42,7 +42,7 @@ #ifndef PWC_TIMON_H #define PWC_TIMON_H -#include +#include "pwc-ioctl.h" struct Timon_table_entry { @@ -52,8 +52,8 @@ struct Timon_table_entry unsigned char mode[13]; /* precomputed mode settings for cam */ }; -extern const struct Timon_table_entry Timon_table[PSZ_MAX][6][4]; -extern const unsigned int TimonRomTable [16][2][16][8]; +const extern struct Timon_table_entry Timon_table[PSZ_MAX][6][4]; +const extern unsigned int TimonRomTable [16][2][16][8]; #endif diff --git a/drivers/media/video/pwc/pwc-uncompress.c b/drivers/media/video/pwc/pwc-uncompress.c index 5d82028ef..b37a89a16 100644 --- a/drivers/media/video/pwc/pwc-uncompress.c +++ b/drivers/media/video/pwc/pwc-uncompress.c @@ -1,7 +1,7 @@ /* Linux driver for Philips webcam Decompression frontend. (C) 1999-2003 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -22,8 +22,6 @@ 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 - - vim: set ts=8: */ #include @@ -31,8 +29,6 @@ #include "pwc.h" #include "pwc-uncompress.h" -#include "pwc-dec1.h" -#include "pwc-dec23.h" int pwc_decompress(struct pwc_device *pdev) { @@ -44,95 +40,107 @@ int pwc_decompress(struct pwc_device *pdev) if (pdev == NULL) return -EFAULT; +#if defined(__KERNEL__) && defined(PWC_MAGIC) + if (pdev->magic != PWC_MAGIC) { + Err("pwc_decompress(): magic failed.\n"); + return -EFAULT; + } +#endif fbuf = pdev->read_frame; if (fbuf == NULL) return -EFAULT; - image = pdev->image_data; - image += pdev->images[pdev->fill_image].offset; + image = pdev->image_ptr[pdev->fill_image]; + if (!image) + return -EFAULT; yuv = fbuf->data + pdev->frame_header_size; /* Skip header */ /* Raw format; that's easy... */ if (pdev->vpalette == VIDEO_PALETTE_RAW) { - struct pwc_raw_frame *raw_frame = image; - raw_frame->type = cpu_to_le16(pdev->type); - raw_frame->vbandlength = cpu_to_le16(pdev->vbandlength); - /* cmd_buf is always 4 bytes, but sometimes, only the - * first 3 bytes is filled (Nala case). We can - * determine this using the type of the webcam */ - memcpy(raw_frame->cmd, pdev->cmd_buf, 4); - memcpy(raw_frame+1, yuv, pdev->frame_size); + memcpy(image, yuv, pdev->frame_size); return 0; } if (pdev->vbandlength == 0) { - /* Uncompressed mode. - * We copy the data into the output buffer, using the viewport - * size (which may be larger than the image size). - * Unfortunately we have to do a bit of byte stuffing to get - * the desired output format/size. - * - * We do some byte shuffling here to go from the - * native format to YUV420P. + /* Uncompressed mode. We copy the data into the output buffer, + using the viewport size (which may be larger than the image + size). Unfortunately we have to do a bit of byte stuffing + to get the desired output format/size. */ - src = (u16 *)yuv; - n = pdev->view.x * pdev->view.y; - - /* offset in Y plane */ - stride = pdev->view.x * pdev->offset.y + pdev->offset.x; - dsty = (u16 *)(image + stride); - - /* offsets in U/V planes */ - stride = pdev->view.x * pdev->offset.y / 4 + pdev->offset.x / 2; - dstu = (u16 *)(image + n + stride); - dstv = (u16 *)(image + n + n / 4 + stride); - - /* increment after each line */ - stride = (pdev->view.x - pdev->image.x) / 2; /* u16 is 2 bytes */ - - for (line = 0; line < pdev->image.y; line++) { - for (col = 0; col < pdev->image.x; col += 4) { - *dsty++ = *src++; - *dsty++ = *src++; + /* + * We do some byte shuffling here to go from the + * native format to YUV420P. + */ + src = (u16 *)yuv; + n = pdev->view.x * pdev->view.y; + + /* offset in Y plane */ + stride = pdev->view.x * pdev->offset.y + pdev->offset.x; + dsty = (u16 *)(image + stride); + + /* offsets in U/V planes */ + stride = pdev->view.x * pdev->offset.y / 4 + pdev->offset.x / 2; + dstu = (u16 *)(image + n + stride); + dstv = (u16 *)(image + n + n / 4 + stride); + + /* increment after each line */ + stride = (pdev->view.x - pdev->image.x) / 2; /* u16 is 2 bytes */ + + for (line = 0; line < pdev->image.y; line++) { + for (col = 0; col < pdev->image.x; col += 4) { + *dsty++ = *src++; + *dsty++ = *src++; + if (line & 1) + *dstv++ = *src++; + else + *dstu++ = *src++; + } + dsty += stride; if (line & 1) - *dstv++ = *src++; + dstv += (stride >> 1); else - *dstu++ = *src++; + dstu += (stride >> 1); } - dsty += stride; - if (line & 1) - dstv += (stride >> 1); - else - dstu += (stride >> 1); - } - - return 0; - } - - /* - * Compressed; - * the decompressor routines will write the data in planar format - * immediately. - */ - if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot) { - PWC_ERROR("Mode Bayer is not supported for now\n"); - /* flags |= PWCX_FLAG_BAYER; */ - return -ENXIO; /* No such device or address: missing decompressor */ } - - if (DEVICE_USE_CODEC1(pdev->type)) { - - /* TODO & FIXME */ - PWC_ERROR("This chipset is not supported for now\n"); - return -ENXIO; /* No such device or address: missing decompressor */ - - } else { - pwc_dec23_decompress(pdev, yuv, image, PWCX_FLAG_PLANAR); + else { + /* Compressed; the decompressor routines will write the data + in planar format immediately. + */ + int flags; + + flags = PWCX_FLAG_PLANAR; + if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot) + { + printk(KERN_ERR "pwc: Mode Bayer is not supported for now\n"); + flags |= PWCX_FLAG_BAYER; + return -ENXIO; /* No such device or address: missing decompressor */ + } + +#if 0 + switch (pdev->type) + { + case 675: + case 680: + case 690: + case 720: + case 730: + case 740: + case 750: + pwc_dec23_decompress(&pdev->image, &pdev->view, + &pdev->offset, yuv, image, flags, + pdev->decompress_data, pdev->vbandlength); + break; + case 645: + case 646: + /* TODO & FIXME */ + return -ENXIO; /* Missing decompressor */ + break; + } +#endif } return 0; } -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ diff --git a/drivers/media/video/pwc/pwc-uncompress.h b/drivers/media/video/pwc/pwc-uncompress.h index 43028e74e..f75e1b6cb 100644 --- a/drivers/media/video/pwc/pwc-uncompress.h +++ b/drivers/media/video/pwc/pwc-uncompress.h @@ -1,5 +1,5 @@ /* (C) 1999-2003 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -30,8 +30,9 @@ #ifndef PWC_UNCOMPRESS_H #define PWC_UNCOMPRESS_H +#include -#include +#include "pwc-ioctl.h" /* from pwc-dec.h */ #define PWCX_FLAG_PLANAR 0x0001 diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c deleted file mode 100644 index b7eb3ce3b..000000000 --- a/drivers/media/video/pwc/pwc-v4l.c +++ /dev/null @@ -1,1202 +0,0 @@ -/* Linux driver for Philips webcam - USB and Video4Linux interface part. - (C) 1999-2004 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pwc.h" - -static struct v4l2_queryctrl pwc_controls[] = { - { - .id = V4L2_CID_BRIGHTNESS, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Brightness", - .minimum = 0, - .maximum = 128, - .step = 1, - .default_value = 64, - }, - { - .id = V4L2_CID_CONTRAST, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Contrast", - .minimum = 0, - .maximum = 64, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_SATURATION, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Saturation", - .minimum = -100, - .maximum = 100, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_GAMMA, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Gamma", - .minimum = 0, - .maximum = 32, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Red Gain", - .minimum = 0, - .maximum = 256, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Blue Gain", - .minimum = 0, - .maximum = 256, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_AUTO_WHITE_BALANCE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Auto White Balance", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_EXPOSURE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Shutter Speed (Exposure)", - .minimum = 0, - .maximum = 256, - .step = 1, - .default_value = 200, - }, - { - .id = V4L2_CID_AUTOGAIN, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Auto Gain Enabled", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 1, - }, - { - .id = V4L2_CID_GAIN, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Gain Level", - .minimum = 0, - .maximum = 256, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_SAVE_USER, - .type = V4L2_CTRL_TYPE_BUTTON, - .name = "Save User Settings", - .minimum = 0, - .maximum = 0, - .step = 0, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_RESTORE_USER, - .type = V4L2_CTRL_TYPE_BUTTON, - .name = "Restore User Settings", - .minimum = 0, - .maximum = 0, - .step = 0, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_RESTORE_FACTORY, - .type = V4L2_CTRL_TYPE_BUTTON, - .name = "Restore Factory Settings", - .minimum = 0, - .maximum = 0, - .step = 0, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_COLOUR_MODE, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Colour mode", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_AUTOCONTOUR, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Auto contour", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_CONTOUR, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Contour", - .minimum = 0, - .maximum = 63, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_BACKLIGHT, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Backlight compensation", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_FLICKERLESS, - .type = V4L2_CTRL_TYPE_BOOLEAN, - .name = "Flickerless", - .minimum = 0, - .maximum = 1, - .step = 1, - .default_value = 0, - }, - { - .id = V4L2_CID_PRIVATE_NOISE_REDUCTION, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "Noise reduction", - .minimum = 0, - .maximum = 3, - .step = 1, - .default_value = 0, - }, -}; - - -static void pwc_vidioc_fill_fmt(const struct pwc_device *pdev, struct v4l2_format *f) -{ - memset(&f->fmt.pix, 0, sizeof(struct v4l2_pix_format)); - f->fmt.pix.width = pdev->view.x; - f->fmt.pix.height = pdev->view.y; - f->fmt.pix.field = V4L2_FIELD_NONE; - if (pdev->vpalette == VIDEO_PALETTE_YUV420P) { - f->fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420; - f->fmt.pix.bytesperline = (f->fmt.pix.width * 3)/2; - f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; - } else { - /* vbandlength contains 4 lines ... */ - f->fmt.pix.bytesperline = pdev->vbandlength/4; - f->fmt.pix.sizeimage = pdev->frame_size + sizeof(struct pwc_raw_frame); - if (DEVICE_USE_CODEC1(pdev->type)) - f->fmt.pix.pixelformat = V4L2_PIX_FMT_PWC1; - else - f->fmt.pix.pixelformat = V4L2_PIX_FMT_PWC2; - } - PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() " - "width=%d, height=%d, bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n", - f->fmt.pix.width, - f->fmt.pix.height, - f->fmt.pix.bytesperline, - f->fmt.pix.sizeimage, - (f->fmt.pix.pixelformat)&255, - (f->fmt.pix.pixelformat>>8)&255, - (f->fmt.pix.pixelformat>>16)&255, - (f->fmt.pix.pixelformat>>24)&255); -} - -/* ioctl(VIDIOC_TRY_FMT) */ -static int pwc_vidioc_try_fmt(struct pwc_device *pdev, struct v4l2_format *f) -{ - if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { - PWC_DEBUG_IOCTL("Bad video type must be V4L2_BUF_TYPE_VIDEO_CAPTURE\n"); - return -EINVAL; - } - - switch (f->fmt.pix.pixelformat) { - case V4L2_PIX_FMT_YUV420: - break; - case V4L2_PIX_FMT_PWC1: - if (DEVICE_USE_CODEC23(pdev->type)) { - PWC_DEBUG_IOCTL("codec1 is only supported for old pwc webcam\n"); - return -EINVAL; - } - break; - case V4L2_PIX_FMT_PWC2: - if (DEVICE_USE_CODEC1(pdev->type)) { - PWC_DEBUG_IOCTL("codec23 is only supported for new pwc webcam\n"); - return -EINVAL; - } - break; - default: - PWC_DEBUG_IOCTL("Unsupported pixel format\n"); - return -EINVAL; - - } - - if (f->fmt.pix.width > pdev->view_max.x) - f->fmt.pix.width = pdev->view_max.x; - else if (f->fmt.pix.width < pdev->view_min.x) - f->fmt.pix.width = pdev->view_min.x; - - if (f->fmt.pix.height > pdev->view_max.y) - f->fmt.pix.height = pdev->view_max.y; - else if (f->fmt.pix.height < pdev->view_min.y) - f->fmt.pix.height = pdev->view_min.y; - - return 0; -} - -/* ioctl(VIDIOC_SET_FMT) */ -static int pwc_vidioc_set_fmt(struct pwc_device *pdev, struct v4l2_format *f) -{ - int ret, fps, snapshot, compression, pixelformat; - - ret = pwc_vidioc_try_fmt(pdev, f); - if (ret<0) - return ret; - - pixelformat = f->fmt.pix.pixelformat; - compression = pdev->vcompression; - snapshot = 0; - fps = pdev->vframes; - if (f->fmt.pix.priv) { - compression = (f->fmt.pix.priv & PWC_QLT_MASK) >> PWC_QLT_SHIFT; - snapshot = !!(f->fmt.pix.priv & PWC_FPS_SNAPSHOT); - fps = (f->fmt.pix.priv & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT; - if (fps == 0) - fps = pdev->vframes; - } - - if (pixelformat == V4L2_PIX_FMT_YUV420) - pdev->vpalette = VIDEO_PALETTE_YUV420P; - else - pdev->vpalette = VIDEO_PALETTE_RAW; - - PWC_DEBUG_IOCTL("Try to change format to: width=%d height=%d fps=%d " - "compression=%d snapshot=%d format=%c%c%c%c\n", - f->fmt.pix.width, f->fmt.pix.height, fps, - compression, snapshot, - (pixelformat)&255, - (pixelformat>>8)&255, - (pixelformat>>16)&255, - (pixelformat>>24)&255); - - ret = pwc_try_video_mode(pdev, - f->fmt.pix.width, - f->fmt.pix.height, - fps, - compression, - snapshot); - - PWC_DEBUG_IOCTL("pwc_try_video_mode(), return=%d\n", ret); - - if (ret) - return ret; - - pwc_vidioc_fill_fmt(pdev, f); - - return 0; - -} - -int pwc_video_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) -{ - struct video_device *vdev = video_devdata(file); - struct pwc_device *pdev; - DECLARE_WAITQUEUE(wait, current); - - if (vdev == NULL) - return -EFAULT; - pdev = vdev->priv; - if (pdev == NULL) - return -EFAULT; - -#if CONFIG_PWC_DEBUG - if (PWC_DEBUG_LEVEL_IOCTL & pwc_trace) - v4l_printk_ioctl(cmd); -#endif - - - switch (cmd) { - /* Query cabapilities */ - case VIDIOCGCAP: - { - struct video_capability *caps = arg; - - strcpy(caps->name, vdev->name); - caps->type = VID_TYPE_CAPTURE; - caps->channels = 1; - caps->audios = 1; - caps->minwidth = pdev->view_min.x; - caps->minheight = pdev->view_min.y; - caps->maxwidth = pdev->view_max.x; - caps->maxheight = pdev->view_max.y; - break; - } - - /* Channel functions (simulate 1 channel) */ - case VIDIOCGCHAN: - { - struct video_channel *v = arg; - - if (v->channel != 0) - return -EINVAL; - v->flags = 0; - v->tuners = 0; - v->type = VIDEO_TYPE_CAMERA; - strcpy(v->name, "Webcam"); - return 0; - } - - case VIDIOCSCHAN: - { - /* The spec says the argument is an integer, but - the bttv driver uses a video_channel arg, which - makes sense becasue it also has the norm flag. - */ - struct video_channel *v = arg; - if (v->channel != 0) - return -EINVAL; - return 0; - } - - - /* Picture functions; contrast etc. */ - case VIDIOCGPICT: - { - struct video_picture *p = arg; - int val; - - val = pwc_get_brightness(pdev); - if (val >= 0) - p->brightness = (val<<9); - else - p->brightness = 0xffff; - val = pwc_get_contrast(pdev); - if (val >= 0) - p->contrast = (val<<10); - else - p->contrast = 0xffff; - /* Gamma, Whiteness, what's the difference? :) */ - val = pwc_get_gamma(pdev); - if (val >= 0) - p->whiteness = (val<<11); - else - p->whiteness = 0xffff; - if (pwc_get_saturation(pdev, &val)<0) - p->colour = 0xffff; - else - p->colour = 32768 + val * 327; - p->depth = 24; - p->palette = pdev->vpalette; - p->hue = 0xFFFF; /* N/A */ - break; - } - - case VIDIOCSPICT: - { - struct video_picture *p = arg; - /* - * FIXME: Suppose we are mid read - ANSWER: No problem: the firmware of the camera - can handle brightness/contrast/etc - changes at _any_ time, and the palette - is used exactly once in the uncompress - routine. - */ - pwc_set_brightness(pdev, p->brightness); - pwc_set_contrast(pdev, p->contrast); - pwc_set_gamma(pdev, p->whiteness); - pwc_set_saturation(pdev, (p->colour-32768)/327); - if (p->palette && p->palette != pdev->vpalette) { - switch (p->palette) { - case VIDEO_PALETTE_YUV420P: - case VIDEO_PALETTE_RAW: - pdev->vpalette = p->palette; - return pwc_try_video_mode(pdev, pdev->image.x, pdev->image.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); - break; - default: - return -EINVAL; - break; - } - } - break; - } - - /* Window/size parameters */ - case VIDIOCGWIN: - { - struct video_window *vw = arg; - - vw->x = 0; - vw->y = 0; - vw->width = pdev->view.x; - vw->height = pdev->view.y; - vw->chromakey = 0; - vw->flags = (pdev->vframes << PWC_FPS_SHIFT) | - (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0); - break; - } - - case VIDIOCSWIN: - { - struct video_window *vw = arg; - int fps, snapshot, ret; - - fps = (vw->flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT; - snapshot = vw->flags & PWC_FPS_SNAPSHOT; - if (fps == 0) - fps = pdev->vframes; - if (pdev->view.x == vw->width && pdev->view.y && fps == pdev->vframes && snapshot == pdev->vsnapshot) - return 0; - ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot); - if (ret) - return ret; - break; - } - - /* We don't have overlay support (yet) */ - case VIDIOCGFBUF: - { - struct video_buffer *vb = arg; - - memset(vb,0,sizeof(*vb)); - break; - } - - /* mmap() functions */ - case VIDIOCGMBUF: - { - /* Tell the user program how much memory is needed for a mmap() */ - struct video_mbuf *vm = arg; - int i; - - memset(vm, 0, sizeof(*vm)); - vm->size = pwc_mbufs * pdev->len_per_image; - vm->frames = pwc_mbufs; /* double buffering should be enough for most applications */ - for (i = 0; i < pwc_mbufs; i++) - vm->offsets[i] = i * pdev->len_per_image; - break; - } - - case VIDIOCMCAPTURE: - { - /* Start capture into a given image buffer (called 'frame' in video_mmap structure) */ - struct video_mmap *vm = arg; - - PWC_DEBUG_READ("VIDIOCMCAPTURE: %dx%d, frame %d, format %d\n", vm->width, vm->height, vm->frame, vm->format); - if (vm->frame < 0 || vm->frame >= pwc_mbufs) - return -EINVAL; - - /* xawtv is nasty. It probes the available palettes - by setting a very small image size and trying - various palettes... The driver doesn't support - such small images, so I'm working around it. - */ - if (vm->format) - { - switch (vm->format) - { - case VIDEO_PALETTE_YUV420P: - case VIDEO_PALETTE_RAW: - break; - default: - return -EINVAL; - break; - } - } - - if ((vm->width != pdev->view.x || vm->height != pdev->view.y) && - (vm->width >= pdev->view_min.x && vm->height >= pdev->view_min.y)) { - int ret; - - PWC_DEBUG_OPEN("VIDIOCMCAPTURE: changing size to please xawtv :-(.\n"); - ret = pwc_try_video_mode(pdev, vm->width, vm->height, pdev->vframes, pdev->vcompression, pdev->vsnapshot); - if (ret) - return ret; - } /* ... size mismatch */ - - /* FIXME: should we lock here? */ - if (pdev->image_used[vm->frame]) - return -EBUSY; /* buffer wasn't available. Bummer */ - pdev->image_used[vm->frame] = 1; - - /* Okay, we're done here. In the SYNC call we wait until a - frame comes available, then expand image into the given - buffer. - In contrast to the CPiA cam the Philips cams deliver a - constant stream, almost like a grabber card. Also, - we have separate buffers for the rawdata and the image, - meaning we can nearly always expand into the requested buffer. - */ - PWC_DEBUG_READ("VIDIOCMCAPTURE done.\n"); - break; - } - - case VIDIOCSYNC: - { - /* The doc says: "Whenever a buffer is used it should - call VIDIOCSYNC to free this frame up and continue." - - The only odd thing about this whole procedure is - that MCAPTURE flags the buffer as "in use", and - SYNC immediately unmarks it, while it isn't - after SYNC that you know that the buffer actually - got filled! So you better not start a CAPTURE in - the same frame immediately (use double buffering). - This is not a problem for this cam, since it has - extra intermediate buffers, but a hardware - grabber card will then overwrite the buffer - you're working on. - */ - int *mbuf = arg; - int ret; - - PWC_DEBUG_READ("VIDIOCSYNC called (%d).\n", *mbuf); - - /* bounds check */ - if (*mbuf < 0 || *mbuf >= pwc_mbufs) - return -EINVAL; - /* check if this buffer was requested anyway */ - if (pdev->image_used[*mbuf] == 0) - return -EINVAL; - - /* Add ourselves to the frame wait-queue. - - FIXME: needs auditing for safety. - QUESTION: In what respect? I think that using the - frameq is safe now. - */ - add_wait_queue(&pdev->frameq, &wait); - while (pdev->full_frames == NULL) { - /* Check for unplugged/etc. here */ - if (pdev->error_status) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -pdev->error_status; - } - - if (signal_pending(current)) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -ERESTARTSYS; - } - schedule(); - set_current_state(TASK_INTERRUPTIBLE); - } - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - - /* The frame is ready. Expand in the image buffer - requested by the user. I don't care if you - mmap() 5 buffers and request data in this order: - buffer 4 2 3 0 1 2 3 0 4 3 1 . . . - Grabber hardware may not be so forgiving. - */ - PWC_DEBUG_READ("VIDIOCSYNC: frame ready.\n"); - pdev->fill_image = *mbuf; /* tell in which buffer we want the image to be expanded */ - /* Decompress, etc */ - ret = pwc_handle_frame(pdev); - pdev->image_used[*mbuf] = 0; - if (ret) - return -EFAULT; - break; - } - - case VIDIOCGAUDIO: - { - struct video_audio *v = arg; - - strcpy(v->name, "Microphone"); - v->audio = -1; /* unknown audio minor */ - v->flags = 0; - v->mode = VIDEO_SOUND_MONO; - v->volume = 0; - v->bass = 0; - v->treble = 0; - v->balance = 0x8000; - v->step = 1; - break; - } - - case VIDIOCSAUDIO: - { - /* Dummy: nothing can be set */ - break; - } - - case VIDIOCGUNIT: - { - struct video_unit *vu = arg; - - vu->video = pdev->vdev->minor & 0x3F; - vu->audio = -1; /* not known yet */ - vu->vbi = -1; - vu->radio = -1; - vu->teletext = -1; - break; - } - - /* V4L2 Layer */ - case VIDIOC_QUERYCAP: - { - struct v4l2_capability *cap = arg; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYCAP) This application "\ - "try to use the v4l2 layer\n"); - strcpy(cap->driver,PWC_NAME); - strlcpy(cap->card, vdev->name, sizeof(cap->card)); - usb_make_path(pdev->udev,cap->bus_info,sizeof(cap->bus_info)); - cap->version = PWC_VERSION_CODE; - cap->capabilities = - V4L2_CAP_VIDEO_CAPTURE | - V4L2_CAP_STREAMING | - V4L2_CAP_READWRITE; - return 0; - } - - case VIDIOC_ENUMINPUT: - { - struct v4l2_input *i = arg; - - if ( i->index ) /* Only one INPUT is supported */ - return -EINVAL; - - memset(i, 0, sizeof(struct v4l2_input)); - strcpy(i->name, "usb"); - return 0; - } - - case VIDIOC_G_INPUT: - { - int *i = arg; - *i = 0; /* Only one INPUT is supported */ - return 0; - } - case VIDIOC_S_INPUT: - { - int *i = arg; - - if ( *i ) { /* Only one INPUT is supported */ - PWC_DEBUG_IOCTL("Only one input source is"\ - " supported with this webcam.\n"); - return -EINVAL; - } - return 0; - } - - /* TODO: */ - case VIDIOC_QUERYCTRL: - { - struct v4l2_queryctrl *c = arg; - int i; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYCTRL) query id=%d\n", c->id); - for (i=0; iid) { - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYCTRL) found\n"); - memcpy(c,&pwc_controls[i],sizeof(struct v4l2_queryctrl)); - return 0; - } - } - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYCTRL) not found\n"); - - return -EINVAL; - } - case VIDIOC_G_CTRL: - { - struct v4l2_control *c = arg; - int ret; - - switch (c->id) - { - case V4L2_CID_BRIGHTNESS: - c->value = pwc_get_brightness(pdev); - if (c->value<0) - return -EINVAL; - return 0; - case V4L2_CID_CONTRAST: - c->value = pwc_get_contrast(pdev); - if (c->value<0) - return -EINVAL; - return 0; - case V4L2_CID_SATURATION: - ret = pwc_get_saturation(pdev, &c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_GAMMA: - c->value = pwc_get_gamma(pdev); - if (c->value<0) - return -EINVAL; - return 0; - case V4L2_CID_RED_BALANCE: - ret = pwc_get_red_gain(pdev, &c->value); - if (ret<0) - return -EINVAL; - c->value >>= 8; - return 0; - case V4L2_CID_BLUE_BALANCE: - ret = pwc_get_blue_gain(pdev, &c->value); - if (ret<0) - return -EINVAL; - c->value >>= 8; - return 0; - case V4L2_CID_AUTO_WHITE_BALANCE: - ret = pwc_get_awb(pdev); - if (ret<0) - return -EINVAL; - c->value = (ret == PWC_WB_MANUAL)?0:1; - return 0; - case V4L2_CID_GAIN: - ret = pwc_get_agc(pdev, &c->value); - if (ret<0) - return -EINVAL; - c->value >>= 8; - return 0; - case V4L2_CID_AUTOGAIN: - ret = pwc_get_agc(pdev, &c->value); - if (ret<0) - return -EINVAL; - c->value = (c->value < 0)?1:0; - return 0; - case V4L2_CID_EXPOSURE: - ret = pwc_get_shutter_speed(pdev, &c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_COLOUR_MODE: - ret = pwc_get_colour_mode(pdev, &c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_AUTOCONTOUR: - ret = pwc_get_contour(pdev, &c->value); - if (ret < 0) - return -EINVAL; - c->value=(c->value == -1?1:0); - return 0; - case V4L2_CID_PRIVATE_CONTOUR: - ret = pwc_get_contour(pdev, &c->value); - if (ret < 0) - return -EINVAL; - c->value >>= 10; - return 0; - case V4L2_CID_PRIVATE_BACKLIGHT: - ret = pwc_get_backlight(pdev, &c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_FLICKERLESS: - ret = pwc_get_flicker(pdev, &c->value); - if (ret < 0) - return -EINVAL; - c->value=(c->value?1:0); - return 0; - case V4L2_CID_PRIVATE_NOISE_REDUCTION: - ret = pwc_get_dynamic_noise(pdev, &c->value); - if (ret < 0) - return -EINVAL; - return 0; - - case V4L2_CID_PRIVATE_SAVE_USER: - case V4L2_CID_PRIVATE_RESTORE_USER: - case V4L2_CID_PRIVATE_RESTORE_FACTORY: - return -EINVAL; - } - return -EINVAL; - } - case VIDIOC_S_CTRL: - { - struct v4l2_control *c = arg; - int ret; - - switch (c->id) - { - case V4L2_CID_BRIGHTNESS: - c->value <<= 9; - ret = pwc_set_brightness(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_CONTRAST: - c->value <<= 10; - ret = pwc_set_contrast(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_SATURATION: - ret = pwc_set_saturation(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_GAMMA: - c->value <<= 11; - ret = pwc_set_gamma(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_RED_BALANCE: - c->value <<= 8; - ret = pwc_set_red_gain(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_BLUE_BALANCE: - c->value <<= 8; - ret = pwc_set_blue_gain(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_AUTO_WHITE_BALANCE: - c->value = (c->value == 0)?PWC_WB_MANUAL:PWC_WB_AUTO; - ret = pwc_set_awb(pdev, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_EXPOSURE: - c->value <<= 8; - ret = pwc_set_shutter_speed(pdev, c->value?0:1, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_AUTOGAIN: - /* autogain off means nothing without a gain */ - if (c->value == 0) - return 0; - ret = pwc_set_agc(pdev, c->value, 0); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_GAIN: - c->value <<= 8; - ret = pwc_set_agc(pdev, 0, c->value); - if (ret<0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_SAVE_USER: - if (pwc_save_user(pdev)) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_RESTORE_USER: - if (pwc_restore_user(pdev)) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_RESTORE_FACTORY: - if (pwc_restore_factory(pdev)) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_COLOUR_MODE: - ret = pwc_set_colour_mode(pdev, c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_AUTOCONTOUR: - c->value=(c->value == 1)?-1:0; - ret = pwc_set_contour(pdev, c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_CONTOUR: - c->value <<= 10; - ret = pwc_set_contour(pdev, c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_BACKLIGHT: - ret = pwc_set_backlight(pdev, c->value); - if (ret < 0) - return -EINVAL; - return 0; - case V4L2_CID_PRIVATE_FLICKERLESS: - ret = pwc_set_flicker(pdev, c->value); - if (ret < 0) - return -EINVAL; - case V4L2_CID_PRIVATE_NOISE_REDUCTION: - ret = pwc_set_dynamic_noise(pdev, c->value); - if (ret < 0) - return -EINVAL; - return 0; - - } - return -EINVAL; - } - - case VIDIOC_ENUM_FMT: - { - struct v4l2_fmtdesc *f = arg; - int index; - - if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - - /* We only support two format: the raw format, and YUV */ - index = f->index; - memset(f,0,sizeof(struct v4l2_fmtdesc)); - f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - f->index = index; - switch(index) - { - case 0: - /* RAW format */ - f->pixelformat = pdev->type<=646?V4L2_PIX_FMT_PWC1:V4L2_PIX_FMT_PWC2; - f->flags = V4L2_FMT_FLAG_COMPRESSED; - strlcpy(f->description,"Raw Philips Webcam",sizeof(f->description)); - break; - case 1: - f->pixelformat = V4L2_PIX_FMT_YUV420; - strlcpy(f->description,"4:2:0, planar, Y-Cb-Cr",sizeof(f->description)); - break; - default: - return -EINVAL; - } - return 0; - } - - case VIDIOC_G_FMT: - { - struct v4l2_format *f = arg; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_G_FMT) return size %dx%d\n",pdev->image.x,pdev->image.y); - if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - - pwc_vidioc_fill_fmt(pdev, f); - - return 0; - } - - case VIDIOC_TRY_FMT: - return pwc_vidioc_try_fmt(pdev, arg); - - case VIDIOC_S_FMT: - return pwc_vidioc_set_fmt(pdev, arg); - - case VIDIOC_G_STD: - { - v4l2_std_id *std = arg; - *std = V4L2_STD_UNKNOWN; - return 0; - } - - case VIDIOC_S_STD: - { - v4l2_std_id *std = arg; - if (*std != V4L2_STD_UNKNOWN) - return -EINVAL; - return 0; - } - - case VIDIOC_ENUMSTD: - { - struct v4l2_standard *std = arg; - if (std->index != 0) - return -EINVAL; - std->id = V4L2_STD_UNKNOWN; - strncpy(std->name, "webcam", sizeof(std->name)); - return 0; - } - - case VIDIOC_REQBUFS: - { - struct v4l2_requestbuffers *rb = arg; - int nbuffers; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_REQBUFS) count=%d\n",rb->count); - if (rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - if (rb->memory != V4L2_MEMORY_MMAP) - return -EINVAL; - - nbuffers = rb->count; - if (nbuffers < 2) - nbuffers = 2; - else if (nbuffers > pwc_mbufs) - nbuffers = pwc_mbufs; - /* Force to use our # of buffers */ - rb->count = pwc_mbufs; - return 0; - } - - case VIDIOC_QUERYBUF: - { - struct v4l2_buffer *buf = arg; - int index; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYBUF) index=%d\n",buf->index); - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYBUF) Bad type\n"); - return -EINVAL; - } - if (buf->memory != V4L2_MEMORY_MMAP) { - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYBUF) Bad memory type\n"); - return -EINVAL; - } - index = buf->index; - if (index < 0 || index >= pwc_mbufs) { - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QUERYBUF) Bad index %d\n", buf->index); - return -EINVAL; - } - - memset(buf, 0, sizeof(struct v4l2_buffer)); - buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf->index = index; - buf->m.offset = index * pdev->len_per_image; - if (pdev->vpalette == VIDEO_PALETTE_RAW) - buf->bytesused = pdev->frame_size + sizeof(struct pwc_raw_frame); - else - buf->bytesused = pdev->view.size; - buf->field = V4L2_FIELD_NONE; - buf->memory = V4L2_MEMORY_MMAP; - //buf->flags = V4L2_BUF_FLAG_MAPPED; - buf->length = pdev->len_per_image; - - PWC_DEBUG_READ("VIDIOC_QUERYBUF: index=%d\n",buf->index); - PWC_DEBUG_READ("VIDIOC_QUERYBUF: m.offset=%d\n",buf->m.offset); - PWC_DEBUG_READ("VIDIOC_QUERYBUF: bytesused=%d\n",buf->bytesused); - - return 0; - } - - case VIDIOC_QBUF: - { - struct v4l2_buffer *buf = arg; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_QBUF) index=%d\n",buf->index); - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - if (buf->memory != V4L2_MEMORY_MMAP) - return -EINVAL; - if (buf->index < 0 || buf->index >= pwc_mbufs) - return -EINVAL; - - buf->flags |= V4L2_BUF_FLAG_QUEUED; - buf->flags &= ~V4L2_BUF_FLAG_DONE; - - return 0; - } - - case VIDIOC_DQBUF: - { - struct v4l2_buffer *buf = arg; - int ret; - - PWC_DEBUG_IOCTL("ioctl(VIDIOC_DQBUF)\n"); - - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - - /* Add ourselves to the frame wait-queue. - - FIXME: needs auditing for safety. - QUESTION: In what respect? I think that using the - frameq is safe now. - */ - add_wait_queue(&pdev->frameq, &wait); - while (pdev->full_frames == NULL) { - if (pdev->error_status) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -pdev->error_status; - } - - if (signal_pending(current)) { - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - return -ERESTARTSYS; - } - schedule(); - set_current_state(TASK_INTERRUPTIBLE); - } - remove_wait_queue(&pdev->frameq, &wait); - set_current_state(TASK_RUNNING); - - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: frame ready.\n"); - /* Decompress data in pdev->images[pdev->fill_image] */ - ret = pwc_handle_frame(pdev); - if (ret) - return -EFAULT; - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: after pwc_handle_frame\n"); - - buf->index = pdev->fill_image; - if (pdev->vpalette == VIDEO_PALETTE_RAW) - buf->bytesused = pdev->frame_size + sizeof(struct pwc_raw_frame); - else - buf->bytesused = pdev->view.size; - buf->flags = V4L2_BUF_FLAG_MAPPED; - buf->field = V4L2_FIELD_NONE; - do_gettimeofday(&buf->timestamp); - buf->sequence = 0; - buf->memory = V4L2_MEMORY_MMAP; - buf->m.offset = pdev->fill_image * pdev->len_per_image; - buf->length = buf->bytesused; - pwc_next_image(pdev); - - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: buf->index=%d\n",buf->index); - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: buf->length=%d\n",buf->length); - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: m.offset=%d\n",buf->m.offset); - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: bytesused=%d\n",buf->bytesused); - PWC_DEBUG_IOCTL("VIDIOC_DQBUF: leaving\n"); - return 0; - - } - - case VIDIOC_STREAMON: - { - /* WARNING: pwc_try_video_mode() called pwc_isoc_init */ - pwc_isoc_init(pdev); - return 0; - } - - case VIDIOC_STREAMOFF: - { - pwc_isoc_cleanup(pdev); - return 0; - } - - default: - return pwc_ioctl(pdev, cmd, arg); - } /* ..switch */ - return 0; -} - -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h index 7e9c4237d..1b0ee0ced 100644 --- a/drivers/media/video/pwc/pwc.h +++ b/drivers/media/video/pwc/pwc.h @@ -1,5 +1,5 @@ /* (C) 1999-2003 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) + (C) 2004 Luc Saillard (luc@saillard.org) NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx driver and thus may have bugs that are not present in the original version. @@ -25,90 +25,55 @@ #ifndef PWC_H #define PWC_H +#include #include #include #include +#include #include #include -#include #include #include -#include -#include #include "pwc-uncompress.h" -#include +#include "pwc-ioctl.h" -/* Turn some debugging options on/off */ -#ifndef CONFIG_PWC_DEBUG -#define CONFIG_PWC_DEBUG 1 -#endif - -/* Version block */ -#define PWC_MAJOR 10 -#define PWC_MINOR 0 -#define PWC_EXTRAMINOR 12 -#define PWC_VERSION_CODE KERNEL_VERSION(PWC_MAJOR,PWC_MINOR,PWC_EXTRAMINOR) -#define PWC_VERSION "10.0.12" -#define PWC_NAME "pwc" -#define PFX PWC_NAME ": " +/* Defines and structures for the Philips webcam */ +/* Used for checking memory corruption/pointer validation */ +#define PWC_MAGIC 0x89DC10ABUL +#undef PWC_MAGIC +/* Turn some debugging options on/off */ +#define PWC_DEBUG 0 /* Trace certain actions in the driver */ -#define PWC_DEBUG_LEVEL_MODULE (1<<0) -#define PWC_DEBUG_LEVEL_PROBE (1<<1) -#define PWC_DEBUG_LEVEL_OPEN (1<<2) -#define PWC_DEBUG_LEVEL_READ (1<<3) -#define PWC_DEBUG_LEVEL_MEMORY (1<<4) -#define PWC_DEBUG_LEVEL_FLOW (1<<5) -#define PWC_DEBUG_LEVEL_SIZE (1<<6) -#define PWC_DEBUG_LEVEL_IOCTL (1<<7) -#define PWC_DEBUG_LEVEL_TRACE (1<<8) - -#define PWC_DEBUG_MODULE(fmt, args...) PWC_DEBUG(MODULE, fmt, ##args) -#define PWC_DEBUG_PROBE(fmt, args...) PWC_DEBUG(PROBE, fmt, ##args) -#define PWC_DEBUG_OPEN(fmt, args...) PWC_DEBUG(OPEN, fmt, ##args) -#define PWC_DEBUG_READ(fmt, args...) PWC_DEBUG(READ, fmt, ##args) -#define PWC_DEBUG_MEMORY(fmt, args...) PWC_DEBUG(MEMORY, fmt, ##args) -#define PWC_DEBUG_FLOW(fmt, args...) PWC_DEBUG(FLOW, fmt, ##args) -#define PWC_DEBUG_SIZE(fmt, args...) PWC_DEBUG(SIZE, fmt, ##args) -#define PWC_DEBUG_IOCTL(fmt, args...) PWC_DEBUG(IOCTL, fmt, ##args) -#define PWC_DEBUG_TRACE(fmt, args...) PWC_DEBUG(TRACE, fmt, ##args) - - -#if CONFIG_PWC_DEBUG - -#define PWC_DEBUG_LEVEL (PWC_DEBUG_LEVEL_MODULE) - -#define PWC_DEBUG(level, fmt, args...) do {\ - if ((PWC_DEBUG_LEVEL_ ##level) & pwc_trace) \ - printk(KERN_DEBUG PFX fmt, ##args); \ - } while(0) - -#define PWC_ERROR(fmt, args...) printk(KERN_ERR PFX fmt, ##args) -#define PWC_WARNING(fmt, args...) printk(KERN_WARNING PFX fmt, ##args) -#define PWC_INFO(fmt, args...) printk(KERN_INFO PFX fmt, ##args) -#define PWC_TRACE(fmt, args...) PWC_DEBUG(TRACE, fmt, ##args) - -#else /* if ! CONFIG_PWC_DEBUG */ - -#define PWC_ERROR(fmt, args...) printk(KERN_ERR PFX fmt, ##args) -#define PWC_WARNING(fmt, args...) printk(KERN_WARNING PFX fmt, ##args) -#define PWC_INFO(fmt, args...) printk(KERN_INFO PFX fmt, ##args) -#define PWC_TRACE(fmt, args...) do { } while(0) -#define PWC_DEBUG(level, fmt, args...) do { } while(0) - -#define pwc_trace 0 +#define TRACE_MODULE 0x0001 +#define TRACE_PROBE 0x0002 +#define TRACE_OPEN 0x0004 +#define TRACE_READ 0x0008 +#define TRACE_MEMORY 0x0010 +#define TRACE_FLOW 0x0020 +#define TRACE_SIZE 0x0040 +#define TRACE_PWCX 0x0080 +#define TRACE_SEQUENCE 0x1000 + +#define Trace(R, A...) if (pwc_trace & R) printk(KERN_DEBUG PWC_NAME " " A) +#define Debug(A...) printk(KERN_DEBUG PWC_NAME " " A) +#define Info(A...) printk(KERN_INFO PWC_NAME " " A) +#define Err(A...) printk(KERN_ERR PWC_NAME " " A) -#endif /* Defines for ToUCam cameras */ #define TOUCAM_HEADER_SIZE 8 #define TOUCAM_TRAILER_SIZE 4 #define FEATURE_MOTOR_PANTILT 0x0001 -#define FEATURE_CODEC1 0x0002 -#define FEATURE_CODEC2 0x0004 + +/* Version block */ +#define PWC_MAJOR 9 +#define PWC_MINOR 0 +#define PWC_VERSION "9.0.2-unofficial" +#define PWC_NAME "pwc" /* Turn certain features on/off */ #define PWC_INT_PIPE 0 @@ -130,18 +95,6 @@ /* Absolute maximum number of buffers available for mmap() */ #define MAX_IMAGES 10 -/* Some macros to quickly find the type of a webcam */ -#define DEVICE_USE_CODEC1(x) ((x)<675) -#define DEVICE_USE_CODEC2(x) ((x)>=675 && (x)<700) -#define DEVICE_USE_CODEC3(x) ((x)>=700) -#define DEVICE_USE_CODEC23(x) ((x)>=675) - - -#ifndef V4L2_PIX_FMT_PWC1 -#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') -#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') -#endif - /* The following structures were based on cpia.h. Why reinvent the wheel? :-) */ struct pwc_iso_buf { @@ -157,19 +110,17 @@ struct pwc_frame_buf void *data; volatile int filled; /* number of bytes filled */ struct pwc_frame_buf *next; /* list */ -}; - -/* additionnal informations used when dealing image between kernel and userland */ -struct pwc_imgbuf -{ - unsigned long offset; /* offset of this buffer in the big array of image_data */ - int vma_use_count; /* count the number of time this memory is mapped */ +#if PWC_DEBUG + int sequence; /* Sequence number */ +#endif }; struct pwc_device { struct video_device *vdev; - +#ifdef PWC_MAGIC + int magic; +#endif /* Pointer to our usb_device */ struct usb_device *udev; @@ -226,8 +177,12 @@ struct pwc_device int frame_size; int frame_total_size; /* including header & trailer */ int drop_frames; +#if PWC_DEBUG + int sequence; /* Debugging aid */ +#endif /* 3: decompression */ + struct pwc_decompressor *decompressor; /* function block with decompression routines */ void *decompress_data; /* private data for decompression engine */ /* 4: image */ @@ -243,7 +198,7 @@ struct pwc_device struct pwc_coord offset; /* offset within the viewport */ void *image_data; /* total buffer, which is subdivided into ... */ - struct pwc_imgbuf images[MAX_IMAGES];/* ...several images... */ + void *image_ptr[MAX_IMAGES]; /* ...several images... */ int fill_image; /* ...which are rotated. */ int len_per_image; /* length per image */ int image_read_pos; /* In case we read data in pieces, keep track of were we are in the imagebuffer */ @@ -256,7 +211,6 @@ struct pwc_device struct pwc_mpt_range angle_range; int pan_angle; /* in degrees * 100 */ int tilt_angle; /* absolute angle; 0,0 is home position */ - int snapshot_button_status; /* set to 1 when the user push the button, reset to 0 when this value is read */ /*** Misc. data ***/ wait_queue_head_t frameq; /* When waiting for a frame to finish... */ @@ -265,26 +219,20 @@ struct pwc_device #endif }; + #ifdef __cplusplus extern "C" { #endif -/* Global variables */ -#if CONFIG_PWC_DEBUG +/* Global variable */ extern int pwc_trace; -#endif -extern int pwc_mbufs; /** functions in pwc-if.c */ int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot); -int pwc_handle_frame(struct pwc_device *pdev); -void pwc_next_image(struct pwc_device *pdev); -int pwc_isoc_init(struct pwc_device *pdev); -void pwc_isoc_cleanup(struct pwc_device *pdev); /** Functions in pwc-misc.c */ /* sizes in pixels */ -extern const struct pwc_coord pwc_image_sizes[PSZ_MAX]; +extern struct pwc_coord pwc_image_sizes[PSZ_MAX]; int pwc_decode_size(struct pwc_device *pdev, int width, int height); void pwc_construct(struct pwc_device *pdev); @@ -292,9 +240,6 @@ void pwc_construct(struct pwc_device *pdev); /** Functions in pwc-ctrl.c */ /* Request a certain video mode. Returns < 0 if not possible */ extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot); -/* Calculate the number of bytes per image (not frame) */ -extern int pwc_mpt_reset(struct pwc_device *pdev, int flags); -extern int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt); /* Various controls; should be obvious. Value 0..65535, or < 0 on error */ extern int pwc_get_brightness(struct pwc_device *pdev); @@ -303,36 +248,10 @@ extern int pwc_get_contrast(struct pwc_device *pdev); extern int pwc_set_contrast(struct pwc_device *pdev, int value); extern int pwc_get_gamma(struct pwc_device *pdev); extern int pwc_set_gamma(struct pwc_device *pdev, int value); -extern int pwc_get_saturation(struct pwc_device *pdev, int *value); +extern int pwc_get_saturation(struct pwc_device *pdev); extern int pwc_set_saturation(struct pwc_device *pdev, int value); extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value); extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor); -extern int pwc_restore_user(struct pwc_device *pdev); -extern int pwc_save_user(struct pwc_device *pdev); -extern int pwc_restore_factory(struct pwc_device *pdev); - -/* exported for use by v4l2 controls */ -extern int pwc_get_red_gain(struct pwc_device *pdev, int *value); -extern int pwc_set_red_gain(struct pwc_device *pdev, int value); -extern int pwc_get_blue_gain(struct pwc_device *pdev, int *value); -extern int pwc_set_blue_gain(struct pwc_device *pdev, int value); -extern int pwc_get_awb(struct pwc_device *pdev); -extern int pwc_set_awb(struct pwc_device *pdev, int mode); -extern int pwc_set_agc(struct pwc_device *pdev, int mode, int value); -extern int pwc_get_agc(struct pwc_device *pdev, int *value); -extern int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value); -extern int pwc_get_shutter_speed(struct pwc_device *pdev, int *value); - -extern int pwc_set_colour_mode(struct pwc_device *pdev, int colour); -extern int pwc_get_colour_mode(struct pwc_device *pdev, int *colour); -extern int pwc_set_contour(struct pwc_device *pdev, int contour); -extern int pwc_get_contour(struct pwc_device *pdev, int *contour); -extern int pwc_set_backlight(struct pwc_device *pdev, int backlight); -extern int pwc_get_backlight(struct pwc_device *pdev, int *backlight); -extern int pwc_set_flicker(struct pwc_device *pdev, int flicker); -extern int pwc_get_flicker(struct pwc_device *pdev, int *flicker); -extern int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise); -extern int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise); /* Power down or up the camera; not supported by all models */ extern int pwc_camera_power(struct pwc_device *pdev, int power); @@ -340,9 +259,6 @@ extern int pwc_camera_power(struct pwc_device *pdev, int power); /* Private ioctl()s; see pwc-ioctl.h */ extern int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg); -/** Functions in pwc-v4l.c */ -extern int pwc_video_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg); /** pwc-uncompress.c */ /* Expand frame to image, possibly including decompression. Uses read_frame and fill_image */ @@ -354,4 +270,3 @@ extern int pwc_decompress(struct pwc_device *pdev); #endif -/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */ diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index 59a187272..dd830e0e5 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include "saa5246a.h" diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 19a8d6569..531e9461c 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c @@ -56,7 +56,6 @@ #include #include #include -#include #include diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index 676b9970e..41d951db6 100644 --- a/drivers/media/video/saa7110.c +++ b/drivers/media/video/saa7110.c @@ -43,7 +43,6 @@ MODULE_LICENSE("GPL"); #define I2C_NAME(s) (s)->name #include -#include #include static int debug = 0; diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index b59c11717..dceebc0b1 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c @@ -72,10 +72,6 @@ struct saa7115_state { int sat; enum v4l2_chip_ident ident; u32 audclk_freq; - u32 crystal_freq; - u8 ucgc; - u8 cgcdiv; - u8 apll; }; /* ----------------------------------------------------------------------- */ @@ -379,6 +375,10 @@ static const unsigned char saa7113_init_auto_input[] = { }; static const unsigned char saa7115_init_misc[] = { + 0x38, 0x03, /* audio stuff */ + 0x39, 0x10, + 0x3a, 0x08, + 0x81, 0x01, /* reg 0x15,0x16 define blanking window */ 0x82, 0x00, 0x83, 0x01, /* I port settings */ @@ -584,7 +584,6 @@ static int saa7115_set_audio_clock_freq(struct i2c_client *client, u32 freq) u32 acni; u32 hz; u64 f; - u8 acc = 0; /* reg 0x3a, audio clock control */ v4l_dbg(1, debug, client, "set audio clock freq: %d\n", freq); @@ -592,34 +591,18 @@ static int saa7115_set_audio_clock_freq(struct i2c_client *client, u32 freq) if (freq < 32000 || freq > 48000) return -EINVAL; - /* The saa7113 has no audio clock */ - if (state->ident == V4L2_IDENT_SAA7113) - return 0; - /* hz is the refresh rate times 100 */ hz = (state->std & V4L2_STD_525_60) ? 5994 : 5000; /* acpf = (256 * freq) / field_frequency == (256 * 100 * freq) / hz */ acpf = (25600 * freq) / hz; /* acni = (256 * freq * 2^23) / crystal_frequency = (freq * 2^(8+23)) / crystal_frequency = - (freq << 31) / crystal_frequency */ + (freq << 31) / 32.11 MHz */ f = freq; f = f << 31; - do_div(f, state->crystal_freq); + do_div(f, 32110000); acni = f; - if (state->ucgc) { - acpf = acpf * state->cgcdiv / 16; - acni = acni * state->cgcdiv / 16; - acc = 0x80; - if (state->cgcdiv == 3) - acc |= 0x40; - } - if (state->apll) - acc |= 0x08; - saa7115_write(client, 0x38, 0x03); - saa7115_write(client, 0x39, 0x10); - saa7115_write(client, 0x3a, acc); saa7115_write(client, 0x30, acpf & 0xff); saa7115_write(client, 0x31, (acpf >> 8) & 0xff); saa7115_write(client, 0x32, (acpf >> 16) & 0x03); @@ -1090,6 +1073,48 @@ static void saa7115_decode_vbi_line(struct i2c_client *client, /* ============ SAA7115 AUDIO settings (end) ============= */ +static struct v4l2_queryctrl saa7115_qctrl[] = { + { + .id = V4L2_CID_BRIGHTNESS, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Brightness", + .minimum = 0, + .maximum = 255, + .step = 1, + .default_value = 128, + .flags = 0, + }, { + .id = V4L2_CID_CONTRAST, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Contrast", + .minimum = 0, + .maximum = 127, + .step = 1, + .default_value = 64, + .flags = 0, + }, { + .id = V4L2_CID_SATURATION, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Saturation", + .minimum = 0, + .maximum = 127, + .step = 1, + .default_value = 64, + .flags = 0, + }, { + .id = V4L2_CID_HUE, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "Hue", + .minimum = -128, + .maximum = 127, + .step = 1, + .default_value = 0, + .flags = 0, + }, +}; + +/* ----------------------------------------------------------------------- */ + static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct saa7115_state *state = i2c_get_clientdata(client); @@ -1133,16 +1158,14 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar case VIDIOC_QUERYCTRL: { struct v4l2_queryctrl *qc = arg; + int i; - switch (qc->id) { - case V4L2_CID_BRIGHTNESS: - case V4L2_CID_CONTRAST: - case V4L2_CID_SATURATION: - case V4L2_CID_HUE: - return v4l2_ctrl_query_fill_std(qc); - default: - return -EINVAL; - } + for (i = 0; i < ARRAY_SIZE(saa7115_qctrl); i++) + if (qc->id && qc->id == saa7115_qctrl[i].id) { + memcpy(qc, &saa7115_qctrl[i], sizeof(*qc)); + return 0; + } + return -EINVAL; } case VIDIOC_G_STD: @@ -1198,6 +1221,34 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar break; } + case VIDIOC_G_INPUT: + *(int *)arg = state->input; + break; + + case VIDIOC_S_INPUT: + v4l_dbg(1, debug, client, "decoder set input %d\n", *iarg); + /* inputs from 0-9 are available */ + if (*iarg < 0 || *iarg > 9) { + return -EINVAL; + } + + if (state->input == *iarg) + break; + v4l_dbg(1, debug, client, "now setting %s input\n", + *iarg >= 6 ? "S-Video" : "Composite"); + state->input = *iarg; + + /* select mode */ + saa7115_write(client, 0x02, + (saa7115_read(client, 0x02) & 0xf0) | + state->input); + + /* bypass chrominance trap for modes 6..9 */ + saa7115_write(client, 0x09, + (saa7115_read(client, 0x09) & 0x7f) | + (state->input < 6 ? 0x0 : 0x80)); + break; + case VIDIOC_STREAMON: case VIDIOC_STREAMOFF: v4l_dbg(1, debug, client, "%s output\n", @@ -1209,21 +1260,6 @@ static int saa7115_command(struct i2c_client *client, unsigned int cmd, void *ar } break; - case VIDIOC_INT_S_CRYSTAL_FREQ: - { - struct v4l2_crystal_freq *freq = arg; - - if (freq->freq != SAA7115_FREQ_32_11_MHZ && - freq->freq != SAA7115_FREQ_24_576_MHZ) - return -EINVAL; - state->crystal_freq = freq->freq; - state->cgcdiv = (freq->flags & SAA7115_FREQ_FL_CGCDIV) ? 3 : 4; - state->ucgc = (freq->flags & SAA7115_FREQ_FL_UCGC) ? 1 : 0; - state->apll = (freq->flags & SAA7115_FREQ_FL_APLL) ? 1 : 0; - saa7115_set_audio_clock_freq(client, state->audclk_freq); - break; - } - case VIDIOC_INT_DECODE_VBI_LINE: saa7115_decode_vbi_line(client, arg); break; @@ -1365,13 +1401,10 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind) v4l_dbg(1, debug, client, "writing init values\n"); /* init to 60hz/48khz */ - if (state->ident == V4L2_IDENT_SAA7113) { - state->crystal_freq = SAA7115_FREQ_24_576_MHZ; + if (state->ident == V4L2_IDENT_SAA7113) saa7115_writeregs(client, saa7113_init_auto_input); - } else { - state->crystal_freq = SAA7115_FREQ_32_11_MHZ; + else saa7115_writeregs(client, saa7115_init_auto_input); - } saa7115_writeregs(client, saa7115_init_misc); saa7115_writeregs(client, saa7115_cfg_60hz_fullres_x); saa7115_writeregs(client, saa7115_cfg_60hz_fullres_y); diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index ad401bdef..c271e2e14 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c @@ -270,7 +270,7 @@ static const char * const wss_strs[] = { "letterbox 16:9 top", "invalid", "invalid", - "16:9 full format anamorphic", + "16:9 full format anamorphic" "4:3 full format", "invalid", "invalid", diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index f5543166d..e1c1805df 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -40,7 +40,6 @@ config VIDEO_SAA7134_DVB depends on VIDEO_SAA7134 && DVB_CORE select VIDEO_BUF_DVB select FW_LOADER - select DVB_PLL ---help--- This adds support for DVB cards based on the Philips saa7134 chip. diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index afc8f352b..0e0ba5094 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c @@ -39,23 +39,6 @@ enum saa6752hs_videoformat { SAA6752HS_VF_UNKNOWN, }; -struct saa6752hs_mpeg_params { - /* transport streams */ - __u16 ts_pid_pmt; - __u16 ts_pid_audio; - __u16 ts_pid_video; - __u16 ts_pid_pcr; - - /* audio */ - enum v4l2_mpeg_audio_l2_bitrate au_l2_bitrate; - - /* video */ - enum v4l2_mpeg_video_aspect vi_aspect; - enum v4l2_mpeg_video_bitrate_mode vi_bitrate_mode; - __u32 vi_bitrate; - __u32 vi_bitrate_peak; -}; - static const struct v4l2_format v4l2_format_table[] = { [SAA6752HS_VF_D1] = @@ -72,19 +55,18 @@ static const struct v4l2_format v4l2_format_table[] = struct saa6752hs_state { struct i2c_client client; - struct v4l2_mpeg_compression old_params; - struct saa6752hs_mpeg_params params; + struct v4l2_mpeg_compression params; enum saa6752hs_videoformat video_format; v4l2_std_id standard; }; enum saa6752hs_command { SAA6752HS_COMMAND_RESET = 0, - SAA6752HS_COMMAND_STOP = 1, - SAA6752HS_COMMAND_START = 2, - SAA6752HS_COMMAND_PAUSE = 3, - SAA6752HS_COMMAND_RECONFIGURE = 4, - SAA6752HS_COMMAND_SLEEP = 5, + SAA6752HS_COMMAND_STOP = 1, + SAA6752HS_COMMAND_START = 2, + SAA6752HS_COMMAND_PAUSE = 3, + SAA6752HS_COMMAND_RECONFIGURE = 4, + SAA6752HS_COMMAND_SLEEP = 5, SAA6752HS_COMMAND_RECONFIGURE_FORCE = 6, SAA6752HS_COMMAND_MAX @@ -147,22 +129,7 @@ static u8 PMT[] = { 0x00, 0x00, 0x00, 0x00 /* CRC32 */ }; -static struct saa6752hs_mpeg_params param_defaults = -{ - .ts_pid_pmt = 16, - .ts_pid_video = 260, - .ts_pid_audio = 256, - .ts_pid_pcr = 259, - - .vi_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3, - .vi_bitrate = 4000, - .vi_bitrate_peak = 6000, - .vi_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, - - .au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K, -}; - -static struct v4l2_mpeg_compression old_param_defaults = +static struct v4l2_mpeg_compression param_defaults = { .st_type = V4L2_MPEG_TS_2, .st_bitrate = { @@ -261,57 +228,45 @@ static int saa6752hs_chip_command(struct i2c_client* client, static int saa6752hs_set_bitrate(struct i2c_client* client, - struct saa6752hs_mpeg_params* params) + struct v4l2_mpeg_compression* params) { u8 buf[3]; - int tot_bitrate; /* set the bitrate mode */ buf[0] = 0x71; - buf[1] = (params->vi_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) ? 0 : 1; + buf[1] = (params->vi_bitrate.mode == V4L2_BITRATE_VBR) ? 0 : 1; i2c_master_send(client, buf, 2); /* set the video bitrate */ - if (params->vi_bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) { + if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) { /* set the target bitrate */ buf[0] = 0x80; - buf[1] = params->vi_bitrate >> 8; - buf[2] = params->vi_bitrate & 0xff; + buf[1] = params->vi_bitrate.target >> 8; + buf[2] = params->vi_bitrate.target & 0xff; i2c_master_send(client, buf, 3); /* set the max bitrate */ buf[0] = 0x81; - buf[1] = params->vi_bitrate_peak >> 8; - buf[2] = params->vi_bitrate_peak & 0xff; + buf[1] = params->vi_bitrate.max >> 8; + buf[2] = params->vi_bitrate.max & 0xff; i2c_master_send(client, buf, 3); - tot_bitrate = params->vi_bitrate_peak; } else { /* set the target bitrate (no max bitrate for CBR) */ buf[0] = 0x81; - buf[1] = params->vi_bitrate >> 8; - buf[2] = params->vi_bitrate & 0xff; + buf[1] = params->vi_bitrate.target >> 8; + buf[2] = params->vi_bitrate.target & 0xff; i2c_master_send(client, buf, 3); - tot_bitrate = params->vi_bitrate; } /* set the audio bitrate */ buf[0] = 0x94; - buf[1] = (V4L2_MPEG_AUDIO_L2_BITRATE_256K == params->au_l2_bitrate) ? 0 : 1; + buf[1] = (256 == params->au_bitrate.target) ? 0 : 1; i2c_master_send(client, buf, 2); - tot_bitrate += (V4L2_MPEG_AUDIO_L2_BITRATE_256K == params->au_l2_bitrate) ? 256 : 384; - - /* Note: the total max bitrate is determined by adding the video and audio - bitrates together and also adding an extra 768kbit/s to stay on the - safe side. If more control should be required, then an extra MPEG control - should be added. */ - tot_bitrate += 768; - if (tot_bitrate > MPEG_TOTAL_TARGET_BITRATE_MAX) - tot_bitrate = MPEG_TOTAL_TARGET_BITRATE_MAX; /* set the total bitrate */ buf[0] = 0xb1; - buf[1] = tot_bitrate >> 8; - buf[2] = tot_bitrate & 0xff; + buf[1] = params->st_bitrate.target >> 8; + buf[2] = params->st_bitrate.target & 0xff; i2c_master_send(client, buf, 3); return 0; @@ -363,188 +318,50 @@ static void saa6752hs_set_subsampling(struct i2c_client* client, } -static void saa6752hs_old_set_params(struct i2c_client* client, +static void saa6752hs_set_params(struct i2c_client* client, struct v4l2_mpeg_compression* params) { struct saa6752hs_state *h = i2c_get_clientdata(client); /* check PIDs */ - if (params->ts_pid_pmt <= MPEG_PID_MAX) { - h->old_params.ts_pid_pmt = params->ts_pid_pmt; + if (params->ts_pid_pmt <= MPEG_PID_MAX) h->params.ts_pid_pmt = params->ts_pid_pmt; - } - if (params->ts_pid_pcr <= MPEG_PID_MAX) { - h->old_params.ts_pid_pcr = params->ts_pid_pcr; + if (params->ts_pid_pcr <= MPEG_PID_MAX) h->params.ts_pid_pcr = params->ts_pid_pcr; - } - if (params->ts_pid_video <= MPEG_PID_MAX) { - h->old_params.ts_pid_video = params->ts_pid_video; + if (params->ts_pid_video <= MPEG_PID_MAX) h->params.ts_pid_video = params->ts_pid_video; - } - if (params->ts_pid_audio <= MPEG_PID_MAX) { - h->old_params.ts_pid_audio = params->ts_pid_audio; + if (params->ts_pid_audio <= MPEG_PID_MAX) h->params.ts_pid_audio = params->ts_pid_audio; - } /* check bitrate parameters */ if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) || - (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) { - h->old_params.vi_bitrate.mode = params->vi_bitrate.mode; - h->params.vi_bitrate_mode = (params->vi_bitrate.mode == V4L2_BITRATE_VBR) ? - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR : V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; - } + (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) + h->params.vi_bitrate.mode = params->vi_bitrate.mode; if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.st_bitrate.target = params->st_bitrate.target; + h->params.st_bitrate.target = params->st_bitrate.target; if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.vi_bitrate.target = params->vi_bitrate.target; + h->params.vi_bitrate.target = params->vi_bitrate.target; if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) - h->old_params.vi_bitrate.max = params->vi_bitrate.max; + h->params.vi_bitrate.max = params->vi_bitrate.max; if (params->au_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.au_bitrate.target = params->au_bitrate.target; + h->params.au_bitrate.target = params->au_bitrate.target; /* aspect ratio */ if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3 || - params->vi_aspect_ratio == V4L2_MPEG_ASPECT_16_9) { - h->old_params.vi_aspect_ratio = params->vi_aspect_ratio; - if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3) - h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3; - else - h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_16x9; - } + params->vi_aspect_ratio == V4L2_MPEG_ASPECT_16_9) + h->params.vi_aspect_ratio = params->vi_aspect_ratio; /* range checks */ - if (h->old_params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) - h->old_params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; - if (h->old_params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) - h->old_params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; - if (h->old_params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) - h->old_params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; - h->params.vi_bitrate = params->vi_bitrate.target; - h->params.vi_bitrate_peak = params->vi_bitrate.max; - if (h->old_params.au_bitrate.target <= 256) { - h->old_params.au_bitrate.target = 256; - h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K; - } - else { - h->old_params.au_bitrate.target = 384; - h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_384K; - } -} - -static int handle_ctrl(struct saa6752hs_mpeg_params *params, - struct v4l2_ext_control *ctrl, unsigned int cmd) -{ - int old = 0, new; - int set = (cmd == VIDIOC_S_EXT_CTRLS); - - new = ctrl->value; - switch (ctrl->id) { - case V4L2_CID_MPEG_STREAM_TYPE: - old = V4L2_MPEG_STREAM_TYPE_MPEG2_TS; - if (set && new != old) - return -ERANGE; - new = old; - break; - case V4L2_CID_MPEG_STREAM_PID_PMT: - old = params->ts_pid_pmt; - if (set && new > MPEG_PID_MAX) - return -ERANGE; - if (new > MPEG_PID_MAX) - new = MPEG_PID_MAX; - params->ts_pid_pmt = new; - break; - case V4L2_CID_MPEG_STREAM_PID_AUDIO: - old = params->ts_pid_audio; - if (set && new > MPEG_PID_MAX) - return -ERANGE; - if (new > MPEG_PID_MAX) - new = MPEG_PID_MAX; - params->ts_pid_audio = new; - break; - case V4L2_CID_MPEG_STREAM_PID_VIDEO: - old = params->ts_pid_video; - if (set && new > MPEG_PID_MAX) - return -ERANGE; - if (new > MPEG_PID_MAX) - new = MPEG_PID_MAX; - params->ts_pid_video = new; - break; - case V4L2_CID_MPEG_STREAM_PID_PCR: - old = params->ts_pid_pcr; - if (set && new > MPEG_PID_MAX) - return -ERANGE; - if (new > MPEG_PID_MAX) - new = MPEG_PID_MAX; - params->ts_pid_pcr = new; - break; - case V4L2_CID_MPEG_AUDIO_ENCODING: - old = V4L2_MPEG_AUDIO_ENCODING_LAYER_2; - if (set && new != old) - return -ERANGE; - new = old; - break; - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - old = params->au_l2_bitrate; - if (set && new != V4L2_MPEG_AUDIO_L2_BITRATE_256K && - new != V4L2_MPEG_AUDIO_L2_BITRATE_384K) - return -ERANGE; - if (new <= V4L2_MPEG_AUDIO_L2_BITRATE_256K) - new = V4L2_MPEG_AUDIO_L2_BITRATE_256K; - else - new = V4L2_MPEG_AUDIO_L2_BITRATE_384K; - params->au_l2_bitrate = new; - break; - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - old = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000; - if (set && new != old) - return -ERANGE; - new = old; - break; - case V4L2_CID_MPEG_VIDEO_ENCODING: - old = V4L2_MPEG_VIDEO_ENCODING_MPEG_2; - if (set && new != old) - return -ERANGE; - new = old; - break; - case V4L2_CID_MPEG_VIDEO_ASPECT: - old = params->vi_aspect; - if (set && new != V4L2_MPEG_VIDEO_ASPECT_16x9 && - new != V4L2_MPEG_VIDEO_ASPECT_4x3) - return -ERANGE; - if (new != V4L2_MPEG_VIDEO_ASPECT_16x9) - new = V4L2_MPEG_VIDEO_ASPECT_4x3; - params->vi_aspect = new; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE: - old = params->vi_bitrate * 1000; - new = 1000 * (new / 1000); - if (set && new > MPEG_VIDEO_TARGET_BITRATE_MAX * 1000) - return -ERANGE; - if (new > MPEG_VIDEO_TARGET_BITRATE_MAX * 1000) - new = MPEG_VIDEO_TARGET_BITRATE_MAX * 1000; - params->vi_bitrate = new / 1000; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: - old = params->vi_bitrate_peak * 1000; - new = 1000 * (new / 1000); - if (set && new > MPEG_VIDEO_TARGET_BITRATE_MAX * 1000) - return -ERANGE; - if (new > MPEG_VIDEO_TARGET_BITRATE_MAX * 1000) - new = MPEG_VIDEO_TARGET_BITRATE_MAX * 1000; - params->vi_bitrate_peak = new / 1000; - break; - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - old = params->vi_bitrate_mode; - params->vi_bitrate_mode = new; - break; - default: - return -EINVAL; - } - if (cmd == VIDIOC_G_EXT_CTRLS) - ctrl->value = old; + if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) + h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) + h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) + h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; + if (h->params.au_bitrate.target <= 256) + h->params.au_bitrate.target = 256; else - ctrl->value = new; - return 0; + h->params.au_bitrate.target = 384; } static int saa6752hs_init(struct i2c_client* client) @@ -578,22 +395,22 @@ static int saa6752hs_init(struct i2c_client* client) buf[2] = 0x0D; i2c_master_send(client,buf,3); - /* Set minimum Q-scale {4} */ + /* Set minimum Q-scale {4} */ buf[0] = 0x82; buf[1] = 0x04; i2c_master_send(client,buf,2); - /* Set maximum Q-scale {12} */ + /* Set maximum Q-scale {12} */ buf[0] = 0x83; buf[1] = 0x0C; i2c_master_send(client,buf,2); - /* Set Output Protocol */ + /* Set Output Protocol */ buf[0] = 0xD0; buf[1] = 0x81; i2c_master_send(client,buf,2); - /* Set video output stream format {TS} */ + /* Set video output stream format {TS} */ buf[0] = 0xB0; buf[1] = 0x05; i2c_master_send(client,buf,2); @@ -624,7 +441,7 @@ static int saa6752hs_init(struct i2c_client* client) localPMT[sizeof(PMT) - 2] = (crc >> 8) & 0xFF; localPMT[sizeof(PMT) - 1] = crc & 0xFF; - /* Set Audio PID */ + /* Set Audio PID */ buf[0] = 0xC1; buf[1] = (h->params.ts_pid_audio >> 8) & 0xFF; buf[2] = h->params.ts_pid_audio & 0xFF; @@ -672,11 +489,11 @@ static int saa6752hs_init(struct i2c_client* client) buf[3] = 0x82; buf[4] = 0xB0; buf[5] = buf2[0]; - switch(h->params.vi_aspect) { - case V4L2_MPEG_VIDEO_ASPECT_16x9: + switch(h->params.vi_aspect_ratio) { + case V4L2_MPEG_ASPECT_16_9: buf[6] = buf2[1] | 0x40; break; - case V4L2_MPEG_VIDEO_ASPECT_4x3: + case V4L2_MPEG_ASPECT_4_3: default: buf[6] = buf2[1] & 0xBF; break; @@ -698,7 +515,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) return -ENOMEM; h->client = client_template; h->params = param_defaults; - h->old_params = old_param_defaults; h->client.adapter = adap; h->client.addr = addr; @@ -734,45 +550,20 @@ static int saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct saa6752hs_state *h = i2c_get_clientdata(client); - struct v4l2_ext_controls *ctrls = arg; - struct v4l2_mpeg_compression *old_params = arg; - struct saa6752hs_mpeg_params params; + struct v4l2_mpeg_compression *params = arg; int err = 0; - int i; switch (cmd) { case VIDIOC_S_MPEGCOMP: - if (NULL == old_params) { + if (NULL == params) { /* apply settings and start encoder */ saa6752hs_init(client); break; } - saa6752hs_old_set_params(client, old_params); + saa6752hs_set_params(client, params); /* fall through */ case VIDIOC_G_MPEGCOMP: - *old_params = h->old_params; - break; - case VIDIOC_S_EXT_CTRLS: - if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - if (ctrls->count == 0) { - /* apply settings and start encoder */ - saa6752hs_init(client); - break; - } - /* fall through */ - case VIDIOC_TRY_EXT_CTRLS: - case VIDIOC_G_EXT_CTRLS: - if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - params = h->params; - for (i = 0; i < ctrls->count; i++) { - if ((err = handle_ctrl(¶ms, ctrls->controls + i, cmd))) { - ctrls->error_idx = i; - return err; - } - } - h->params = params; + *params = h->params; break; case VIDIOC_G_FMT: { diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index d73cff197..bb3e0ba94 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -818,7 +818,7 @@ static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol, break; } - /* output xbar always main channel */ + /* output xbar always main channel */ saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL1, 0xbbbb10); if (left || right) { // We've got data, turn the input on @@ -929,7 +929,7 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) err = request_irq(dev->pci->irq, saa7134_alsa_irq, - IRQF_SHARED | IRQF_DISABLED, dev->name, + SA_SHIRQ | SA_INTERRUPT, dev->name, (void*) &dev->dmasound); if (err < 0) { @@ -997,9 +997,9 @@ static int saa7134_alsa_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; - if (!saa7134_dmasound_init && !saa7134_dmasound_exit) { - saa7134_dmasound_init = alsa_device_init; - saa7134_dmasound_exit = alsa_device_exit; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = alsa_device_init; + dmasound_exit = alsa_device_exit; } else { printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); return -EBUSY; @@ -1036,8 +1036,8 @@ static void saa7134_alsa_exit(void) snd_card_free(snd_saa7134_cards[idx]); } - saa7134_dmasound_init = NULL; - saa7134_dmasound_exit = NULL; + dmasound_init = NULL; + dmasound_exit = NULL; printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); return; diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 927413ade..86eae3528 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c @@ -2160,7 +2160,7 @@ struct saa7134_board saa7134_boards[] = { .radio = { .name = name_radio, .amux = LINE2, - }, + }, }, [SAA7134_BOARD_GOTVIEW_7135] = { /* Mike Baikov */ @@ -2842,55 +2842,6 @@ struct saa7134_board saa7134_boards[] = { .gpio = 0x000000, /* GPIO21=Low for FM radio antenna */ }, }, - [SAA7134_BOARD_FLYVIDEO3000_NTSC] = { - /* "Zac Bowling" */ - .name = "LifeView FlyVIDEO3000 (NTSC)", - .audio_clock = 0x00200000, - .tuner_type = TUNER_PHILIPS_NTSC, - .radio_type = UNSET, - .tuner_addr = ADDR_UNSET, - .radio_addr = ADDR_UNSET, - - .gpiomask = 0xe000, - .inputs = {{ - .name = name_tv, - .vmux = 1, - .amux = TV, - .gpio = 0x8000, - .tv = 1, - },{ - .name = name_tv_mono, - .vmux = 1, - .amux = LINE2, - .gpio = 0x0000, - .tv = 1, - },{ - .name = name_comp1, - .vmux = 0, - .amux = LINE2, - .gpio = 0x4000, - },{ - .name = name_comp2, - .vmux = 3, - .amux = LINE2, - .gpio = 0x4000, - },{ - .name = name_svideo, - .vmux = 8, - .amux = LINE2, - .gpio = 0x4000, - }}, - .radio = { - .name = name_radio, - .amux = LINE2, - .gpio = 0x2000, - }, - .mute = { - .name = name_mute, - .amux = TV, - .gpio = 0x8000, - }, - }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -2947,12 +2898,6 @@ struct pci_device_id saa7134_pci_tbl[] = { .subvendor = 0x153b, .subdevice = 0x1162, .driver_data = SAA7134_BOARD_CINERGY400_CARDBUS, - },{ - .vendor = PCI_VENDOR_ID_PHILIPS, - .device = PCI_DEVICE_ID_PHILIPS_SAA7134, - .subvendor = 0x5169, - .subdevice = 0x0138, - .driver_data = SAA7134_BOARD_FLYVIDEO3000_NTSC, },{ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, @@ -3514,7 +3459,6 @@ int saa7134_board_init1(struct saa7134_dev *dev) switch (dev->board) { case SAA7134_BOARD_FLYVIDEO2000: case SAA7134_BOARD_FLYVIDEO3000: - case SAA7134_BOARD_FLYVIDEO3000_NTSC: dev->has_remote = SAA7134_REMOTE_GPIO; board_flyvideo(dev); break; diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index be3a81fc9..f0c2111f1 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -20,6 +20,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -95,8 +96,8 @@ LIST_HEAD(saa7134_devlist); static LIST_HEAD(mops_list); static unsigned int saa7134_devcount; -int (*saa7134_dmasound_init)(struct saa7134_dev *dev); -int (*saa7134_dmasound_exit)(struct saa7134_dev *dev); +int (*dmasound_init)(struct saa7134_dev *dev); +int (*dmasound_exit)(struct saa7134_dev *dev); #define dprintk(fmt, arg...) if (core_debug) \ printk(KERN_DEBUG "%s/core: " fmt, dev->name , ## arg) @@ -870,9 +871,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev); pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat); printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, " - "latency: %d, mmio: 0x%llx\n", dev->name, + "latency: %d, mmio: 0x%lx\n", dev->name, pci_name(pci_dev), dev->pci_rev, pci_dev->irq, - dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); + dev->pci_lat,pci_resource_start(pci_dev,0)); pci_set_master(pci_dev); if (!pci_dma_supported(pci_dev, DMA_32BIT_MASK)) { printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name); @@ -904,8 +905,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, pci_resource_len(pci_dev,0), dev->name)) { err = -EBUSY; - printk(KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n", - dev->name,(unsigned long long)pci_resource_start(pci_dev,0)); + printk(KERN_ERR "%s: can't get MMIO memory @ 0x%lx\n", + dev->name,pci_resource_start(pci_dev,0)); goto fail1; } dev->lmmio = ioremap(pci_resource_start(pci_dev,0), 0x1000); @@ -923,7 +924,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, /* get irq */ err = request_irq(pci_dev->irq, saa7134_irq, - IRQF_SHARED | IRQF_DISABLED, dev->name, dev); + SA_SHIRQ | SA_INTERRUPT, dev->name, dev); if (err < 0) { printk(KERN_ERR "%s: can't get IRQ %d\n", dev->name,pci_dev->irq); @@ -941,6 +942,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, /* load i2c helpers */ if (TUNER_ABSENT != dev->tuner_type) request_module("tuner"); + if (dev->tda9887_conf) + request_module("tda9887"); if (card_is_empress(dev)) { request_module("saa6752hs"); request_module_depend("saa7134-empress",&need_empress); @@ -1008,8 +1011,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, /* check for signal */ saa7134_irq_video_intl(dev); - if (saa7134_dmasound_init && !dev->dmasound.priv_data) { - saa7134_dmasound_init(dev); + if (dmasound_init && !dev->dmasound.priv_data) { + dmasound_init(dev); } return 0; @@ -1036,8 +1039,8 @@ static void __devexit saa7134_finidev(struct pci_dev *pci_dev) struct saa7134_mpeg_ops *mops; /* Release DMA sound modules if present */ - if (saa7134_dmasound_exit && dev->dmasound.priv_data) { - saa7134_dmasound_exit(dev); + if (dmasound_exit && dev->dmasound.priv_data) { + dmasound_exit(dev); } /* debugging ... */ @@ -1169,8 +1172,8 @@ EXPORT_SYMBOL(saa7134_boards); /* ----------------- for the DMA sound modules --------------- */ -EXPORT_SYMBOL(saa7134_dmasound_init); -EXPORT_SYMBOL(saa7134_dmasound_exit); +EXPORT_SYMBOL(dmasound_init); +EXPORT_SYMBOL(dmasound_exit); EXPORT_SYMBOL(saa7134_pgtable_free); EXPORT_SYMBOL(saa7134_pgtable_build); EXPORT_SYMBOL(saa7134_pgtable_alloc); diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 449fe2301..222a36c38 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -132,8 +132,9 @@ static int mt352_aver777_init(struct dvb_frontend* fe) return 0; } -static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe, - struct dvb_frontend_parameters* params) +static int mt352_pinnacle_pll_set(struct dvb_frontend* fe, + struct dvb_frontend_parameters* params, + u8* pllbuf) { u8 off[] = { 0x00, 0xf1}; u8 on[] = { 0x00, 0x71}; @@ -146,31 +147,30 @@ static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe, f.tuner = 0; f.type = V4L2_TUNER_DIGITAL_TV; f.frequency = params->frequency / 1000 * 16 / 1000; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); msg.buf = on; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); pinnacle_antenna_pwr(dev, antenna_pwr); /* mt352 setup */ - return mt352_pinnacle_init(fe); + mt352_pinnacle_init(fe); + pllbuf[0] = 0xc2; + pllbuf[1] = 0x00; + pllbuf[2] = 0x00; + pllbuf[3] = 0x80; + pllbuf[4] = 0x00; + return 0; } -static int mt352_aver777_tuner_calc_regs(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, u8* pllbuf, int buf_len) +static int mt352_aver777_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, u8* pllbuf) { - if (buf_len < 5) - return -EINVAL; - - pllbuf[0] = 0x61; + pllbuf[0] = 0xc2; dvb_pll_configure(&dvb_pll_philips_td1316, pllbuf+1, params->frequency, params->u.ofdm.bandwidth); - return 5; + return 0; } static struct mt352_config pinnacle_300i = { @@ -179,11 +179,13 @@ static struct mt352_config pinnacle_300i = { .if2 = 36150, .no_tuner = 1, .demod_init = mt352_pinnacle_init, + .pll_set = mt352_pinnacle_pll_set, }; static struct mt352_config avermedia_777 = { .demod_address = 0xf, .demod_init = mt352_aver777_init, + .pll_set = mt352_aver777_pll_set, }; #endif @@ -266,8 +268,6 @@ static int philips_tda6651_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb_ tuner_buf[2] = 0xca; tuner_buf[3] = (cp << 5) | (filter << 3) | band; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -281,8 +281,6 @@ static int philips_tda6651_pll_init(u8 addr, struct dvb_frontend *fe) struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; /* setup PLL configuration */ - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -292,12 +290,12 @@ static int philips_tda6651_pll_init(u8 addr, struct dvb_frontend *fe) /* ------------------------------------------------------------------ */ -static int philips_tu1216_tuner_60_init(struct dvb_frontend *fe) +static int philips_tu1216_pll_60_init(struct dvb_frontend *fe) { return philips_tda6651_pll_init(0x60, fe); } -static int philips_tu1216_tuner_60_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tu1216_pll_60_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { return philips_tda6651_pll_set(0x60, fe, params); } @@ -317,17 +315,20 @@ static struct tda1004x_config philips_tu1216_60_config = { .xtal_freq = TDA10046_XTAL_4M, .agc_config = TDA10046_AGC_DEFAULT, .if_freq = TDA10046_FREQ_3617, + .pll_init = philips_tu1216_pll_60_init, + .pll_set = philips_tu1216_pll_60_set, + .pll_sleep = NULL, .request_firmware = philips_tu1216_request_firmware, }; /* ------------------------------------------------------------------ */ -static int philips_tu1216_tuner_61_init(struct dvb_frontend *fe) +static int philips_tu1216_pll_61_init(struct dvb_frontend *fe) { return philips_tda6651_pll_init(0x61, fe); } -static int philips_tu1216_tuner_61_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tu1216_pll_61_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { return philips_tda6651_pll_set(0x61, fe, params); } @@ -340,20 +341,21 @@ static struct tda1004x_config philips_tu1216_61_config = { .xtal_freq = TDA10046_XTAL_4M, .agc_config = TDA10046_AGC_DEFAULT, .if_freq = TDA10046_FREQ_3617, + .pll_init = philips_tu1216_pll_61_init, + .pll_set = philips_tu1216_pll_61_set, + .pll_sleep = NULL, .request_firmware = philips_tu1216_request_firmware, }; /* ------------------------------------------------------------------ */ -static int philips_europa_tuner_init(struct dvb_frontend *fe) +static int philips_europa_pll_init(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; static u8 msg[] = { 0x0b, 0xf5, 0x86, 0xab }; struct i2c_msg init_msg = {.addr = 0x61,.flags = 0,.buf = msg,.len = sizeof(msg) }; /* setup PLL configuration */ - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) return -EIO; msleep(1); @@ -363,20 +365,18 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe) init_msg.len = 0x02; msg[0] = 0x00; msg[1] = 0x40; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) return -EIO; return 0; } -static int philips_td1316_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_td1316_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { return philips_tda6651_pll_set(0x61, fe, params); } -static int philips_europa_tuner_sleep(struct dvb_frontend *fe) +static void philips_europa_analog(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; /* this message actually turns the tuner back to analog mode */ @@ -391,20 +391,7 @@ static int philips_europa_tuner_sleep(struct dvb_frontend *fe) analog_msg.len = 0x02; msg[0] = 0x00; msg[1] = 0x14; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &analog_msg, 1); - return 0; -} - -static int philips_europa_demod_sleep(struct dvb_frontend *fe) -{ - struct saa7134_dev *dev = fe->dvb->priv; - - if (dev->original_demod_sleep) - dev->original_demod_sleep(fe); - fe->ops.i2c_gate_ctrl(fe, 1); - return 0; } static struct tda1004x_config philips_europa_config = { @@ -415,20 +402,21 @@ static struct tda1004x_config philips_europa_config = { .xtal_freq = TDA10046_XTAL_4M, .agc_config = TDA10046_AGC_IFO_AUTO_POS, .if_freq = TDA10046_FREQ_052, + .pll_init = philips_europa_pll_init, + .pll_set = philips_td1316_pll_set, + .pll_sleep = philips_europa_analog, .request_firmware = NULL, }; /* ------------------------------------------------------------------ */ -static int philips_fmd1216_tuner_init(struct dvb_frontend *fe) +static int philips_fmd1216_pll_init(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; /* this message is to set up ATC and ALC */ static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 }; struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) return -EIO; msleep(1); @@ -436,27 +424,22 @@ static int philips_fmd1216_tuner_init(struct dvb_frontend *fe) return 0; } -static int philips_fmd1216_tuner_sleep(struct dvb_frontend *fe) +static void philips_fmd1216_analog(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; /* this message actually turns the tuner back to analog mode */ static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 }; struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); msleep(1); fmd1216_init[2] = 0x86; fmd1216_init[3] = 0x54; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); msleep(1); - return 0; } -static int philips_fmd1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_fmd1216_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct saa7134_dev *dev = fe->dvb->priv; u8 tuner_buf[4]; @@ -533,8 +516,6 @@ static int philips_fmd1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_ tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4; tuner_buf[3] = 0x40 | band; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) return -EIO; return 0; @@ -547,6 +528,9 @@ static struct tda1004x_config medion_cardbus = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_IFO_AUTO_NEG, .if_freq = TDA10046_FREQ_3613, + .pll_init = philips_fmd1216_pll_init, + .pll_set = philips_fmd1216_pll_set, + .pll_sleep = philips_fmd1216_analog, .request_firmware = NULL, }; @@ -594,12 +578,12 @@ static struct tda827x_data tda827x_dvbt[] = { { .lomax = 0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0} }; -static int philips_tda827x_tuner_init(struct dvb_frontend *fe) +static int philips_tda827x_pll_init(struct dvb_frontend *fe) { return 0; } -static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tda827x_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { struct saa7134_dev *dev = fe->dvb->priv; u8 tuner_buf[14]; @@ -646,8 +630,6 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_ tuner_buf[13] = 0x40; tuner_msg.len = 14; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) return -EIO; @@ -656,23 +638,18 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_ tuner_buf[0] = 0x30; tuner_buf[1] = 0x50 + tda827x_dvbt[i].cp; tuner_msg.len = 2; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); return 0; } -static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe) +static void philips_tda827x_pll_sleep(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; static u8 tda827x_sleep[] = { 0x30, 0xd0}; struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep, .len = sizeof(tda827x_sleep) }; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); - return 0; } static struct tda1004x_config tda827x_lifeview_config = { @@ -682,6 +659,9 @@ static struct tda1004x_config tda827x_lifeview_config = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_TDA827X, .if_freq = TDA10046_FREQ_045, + .pll_init = philips_tda827x_pll_init, + .pll_set = philips_tda827x_pll_set, + .pll_sleep = philips_tda827x_pll_sleep, .request_firmware = NULL, }; @@ -773,8 +753,6 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb tuner_buf[12] = 0x00; tuner_buf[13] = 0x39; // lpsel msg.len = 14; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) return -EIO; @@ -782,14 +760,10 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb msg.len = 2; reg2[0] = 0x60; reg2[1] = 0x3c; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); reg2[0] = 0xa0; reg2[1] = 0x40; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); msleep(2); @@ -797,43 +771,36 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb reg2[0] = 0x30; reg2[1] = 0x10 + tda827xa_dvbt[i].scr; msg.len = 2; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); msleep(550); reg2[0] = 0x50; reg2[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4); - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &msg, 1); return 0; } -static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe) +static void philips_tda827xa_pll_sleep(u8 addr, struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; static u8 tda827xa_sleep[] = { 0x30, 0x90}; struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tda827xa_sleep, .len = sizeof(tda827xa_sleep) }; - if (fe->ops.i2c_gate_ctrl) - fe->ops.i2c_gate_ctrl(fe, 1); i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); - return 0; + } /* ------------------------------------------------------------------ */ -static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int philips_tiger_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { int ret; struct saa7134_dev *dev = fe->dvb->priv; static u8 tda8290_close[] = { 0x21, 0xc0}; static u8 tda8290_open[] = { 0x21, 0x80}; struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2}; - /* close tda8290 i2c bridge */ tda8290_msg.buf = tda8290_close; ret = i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1); @@ -849,7 +816,7 @@ static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_fr return ret; } -static int philips_tiger_tuner_init(struct dvb_frontend *fe) +static int philips_tiger_dvb_mode(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; static u8 data[] = { 0x3c, 0x33, 0x6a}; @@ -860,15 +827,14 @@ static int philips_tiger_tuner_init(struct dvb_frontend *fe) return 0; } -static int philips_tiger_tuner_sleep(struct dvb_frontend *fe) +static void philips_tiger_analog_mode(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; static u8 data[] = { 0x3c, 0x33, 0x68}; struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; i2c_transfer(&dev->i2c_adap, &msg, 1); - philips_tda827xa_tuner_sleep( 0x61, fe); - return 0; + philips_tda827xa_pll_sleep( 0x61, fe); } static struct tda1004x_config philips_tiger_config = { @@ -878,12 +844,15 @@ static struct tda1004x_config philips_tiger_config = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_TDA827X, .if_freq = TDA10046_FREQ_045, + .pll_init = philips_tiger_dvb_mode, + .pll_set = philips_tiger_pll_set, + .pll_sleep = philips_tiger_analog_mode, .request_firmware = NULL, }; /* ------------------------------------------------------------------ */ -static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int lifeview_trio_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { int ret; @@ -891,12 +860,16 @@ static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_fr return ret; } -static int lifeview_trio_tuner_sleep(struct dvb_frontend *fe) +static int lifeview_trio_dvb_mode(struct dvb_frontend *fe) { - philips_tda827xa_tuner_sleep(0x60, fe); return 0; } +static void lifeview_trio_analog_mode(struct dvb_frontend *fe) +{ + philips_tda827xa_pll_sleep(0x60, fe); +} + static struct tda1004x_config lifeview_trio_config = { .demod_address = 0x09, .invert = 1, @@ -904,12 +877,15 @@ static struct tda1004x_config lifeview_trio_config = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_TDA827X_GPL, .if_freq = TDA10046_FREQ_045, + .pll_init = lifeview_trio_dvb_mode, + .pll_set = lifeview_trio_pll_set, + .pll_sleep = lifeview_trio_analog_mode, .request_firmware = NULL, }; /* ------------------------------------------------------------------ */ -static int ads_duo_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int ads_duo_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { int ret; @@ -917,7 +893,7 @@ static int ads_duo_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend return ret; } -static int ads_duo_tuner_init(struct dvb_frontend *fe) +static int ads_duo_dvb_mode(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; /* route TDA8275a AGC input to the channel decoder */ @@ -925,13 +901,12 @@ static int ads_duo_tuner_init(struct dvb_frontend *fe) return 0; } -static int ads_duo_tuner_sleep(struct dvb_frontend *fe) +static void ads_duo_analog_mode(struct dvb_frontend *fe) { struct saa7134_dev *dev = fe->dvb->priv; /* route TDA8275a AGC input to the analog IF chip*/ saa_writeb(SAA7134_GPIO_GPSTATUS2, 0x20); - philips_tda827xa_tuner_sleep( 0x61, fe); - return 0; + philips_tda827xa_pll_sleep( 0x61, fe); } static struct tda1004x_config ads_tech_duo_config = { @@ -941,24 +916,31 @@ static struct tda1004x_config ads_tech_duo_config = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_TDA827X_GPL, .if_freq = TDA10046_FREQ_045, + .pll_init = ads_duo_dvb_mode, + .pll_set = ads_duo_pll_set, + .pll_sleep = ads_duo_analog_mode, .request_firmware = NULL, }; /* ------------------------------------------------------------------ */ -static int tevion_dvb220rf_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) +static int tevion_dvb220rf_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { int ret; ret = philips_tda827xa_pll_set(0x60, fe, params); return ret; } -static int tevion_dvb220rf_tuner_sleep(struct dvb_frontend *fe) +static int tevion_dvb220rf_pll_init(struct dvb_frontend *fe) { - philips_tda827xa_tuner_sleep( 0x61, fe); return 0; } +static void tevion_dvb220rf_pll_sleep(struct dvb_frontend *fe) +{ + philips_tda827xa_pll_sleep( 0x61, fe); +} + static struct tda1004x_config tevion_dvbt220rf_config = { .demod_address = 0x08, .invert = 1, @@ -966,6 +948,9 @@ static struct tda1004x_config tevion_dvbt220rf_config = { .xtal_freq = TDA10046_XTAL_16M, .agc_config = TDA10046_AGC_TDA827X, .if_freq = TDA10046_FREQ_045, + .pll_init = tevion_dvb220rf_pll_init, + .pll_set = tevion_dvb220rf_pll_set, + .pll_sleep = tevion_dvb220rf_pll_sleep, .request_firmware = NULL, }; @@ -976,6 +961,8 @@ static struct tda1004x_config tevion_dvbt220rf_config = { #ifdef HAVE_NXT200X static struct nxt200x_config avertvhda180 = { .demod_address = 0x0a, + .pll_address = 0x61, + .pll_desc = &dvb_pll_tdhu2, }; static int nxt200x_set_pll_input(u8 *buf, int input) @@ -989,6 +976,8 @@ static int nxt200x_set_pll_input(u8 *buf, int input) static struct nxt200x_config kworldatsc110 = { .demod_address = 0x0a, + .pll_address = 0x61, + .pll_desc = &dvb_pll_tuv1236d, .set_pll_input = nxt200x_set_pll_input, }; #endif @@ -1014,158 +1003,78 @@ static int dvb_init(struct saa7134_dev *dev) printk("%s: pinnacle 300i dvb setup\n",dev->name); dev->dvb.frontend = mt352_attach(&pinnacle_300i, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params; - } break; case SAA7134_BOARD_AVERMEDIA_777: printk("%s: avertv 777 dvb setup\n",dev->name); dev->dvb.frontend = mt352_attach(&avermedia_777, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; - } break; #endif #ifdef HAVE_TDA1004X case SAA7134_BOARD_MD7134: dev->dvb.frontend = tda10046_attach(&medion_cardbus, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; - } break; case SAA7134_BOARD_PHILIPS_TOUGH: dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_60_init; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_60_set_params; - } break; case SAA7134_BOARD_FLYDVBTDUO: dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; - } break; case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; - } break; case SAA7134_BOARD_PHILIPS_EUROPA: dev->dvb.frontend = tda10046_attach(&philips_europa_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->original_demod_sleep = dev->dvb.frontend->ops.sleep; - dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep; - dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; - } break; case SAA7134_BOARD_VIDEOMATE_DVBT_300: dev->dvb.frontend = tda10046_attach(&philips_europa_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; - } break; case SAA7134_BOARD_VIDEOMATE_DVBT_200: dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_61_init; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_61_set_params; - } break; case SAA7134_BOARD_PHILIPS_TIGER: dev->dvb.frontend = tda10046_attach(&philips_tiger_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; - } break; case SAA7134_BOARD_ASUSTeK_P7131_DUAL: dev->dvb.frontend = tda10046_attach(&philips_tiger_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; - } break; case SAA7134_BOARD_FLYDVBT_LR301: dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params; - } break; case SAA7134_BOARD_FLYDVB_TRIO: dev->dvb.frontend = tda10046_attach(&lifeview_trio_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = lifeview_trio_tuner_set_params; - } break; case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params; - } break; case SAA7134_BOARD_TEVION_DVBT_220RF: dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = tevion_dvb220rf_tuner_set_params; - } break; case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, &dev->i2c_adap); - if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep; - dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params; - } break; #endif #ifdef HAVE_NXT200X case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: dev->dvb.frontend = nxt200x_attach(&avertvhda180, &dev->i2c_adap); - if (dev->dvb.frontend) { - dvb_pll_attach(dev->dvb.frontend, 0x61, NULL, &dvb_pll_tdhu2); - } break; case SAA7134_BOARD_KWORLD_ATSC110: dev->dvb.frontend = nxt200x_attach(&kworldatsc110, &dev->i2c_adap); - if (dev->dvb.frontend) { - dvb_pll_attach(dev->dvb.frontend, 0x61, NULL, &dvb_pll_tuv1236d); - } break; #endif default: @@ -1179,7 +1088,7 @@ static int dvb_init(struct saa7134_dev *dev) } /* register everything else */ - return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev); + return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev); } static int dvb_fini(struct saa7134_dev *dev) diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 65d044086..1d972edb3 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c @@ -64,10 +64,8 @@ static void ts_reset_encoder(struct saa7134_dev* dev) static int ts_init_encoder(struct saa7134_dev* dev) { - struct v4l2_ext_controls ctrls = { V4L2_CTRL_CLASS_MPEG, 0 }; - ts_reset_encoder(dev); - saa7134_i2c_call_clients(dev, VIDIOC_S_EXT_CTRLS, &ctrls); + saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, NULL); dev->empress_started = 1; return 0; } @@ -164,7 +162,6 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { struct saa7134_dev *dev = file->private_data; - struct v4l2_ext_controls *ctrls = arg; if (debug > 1) v4l_print_ioctl(dev->name,cmd); @@ -281,31 +278,12 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, return saa7134_common_ioctl(dev, cmd, arg); case VIDIOC_S_MPEGCOMP: - printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " - "Replace with VIDIOC_S_EXT_CTRLS!"); saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg); ts_init_encoder(dev); return 0; case VIDIOC_G_MPEGCOMP: - printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " - "Replace with VIDIOC_G_EXT_CTRLS!"); saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg); return 0; - case VIDIOC_S_EXT_CTRLS: - /* count == 0 is abused in saa6752hs.c, so that special - case is handled here explicitly. */ - if (ctrls->count == 0) - return 0; - if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - saa7134_i2c_call_clients(dev, VIDIOC_S_EXT_CTRLS, arg); - ts_init_encoder(dev); - return 0; - case VIDIOC_G_EXT_CTRLS: - if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) - return -EINVAL; - saa7134_i2c_call_clients(dev, VIDIOC_G_EXT_CTRLS, arg); - return 0; default: return -ENOIOCTLCMD; diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 7c595492c..1426e4c86 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -37,10 +37,6 @@ static unsigned int ir_debug = 0; module_param(ir_debug, int, 0644); MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); -static int pinnacle_remote = 0; -module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */ -MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)"); - #define dprintk(fmt, arg...) if (ir_debug) \ printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) #define i2cdprintk(fmt, arg...) if (ir_debug) \ @@ -320,13 +316,8 @@ void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir) switch (dev->board) { case SAA7134_BOARD_PINNACLE_PCTV_110i: snprintf(ir->c.name, sizeof(ir->c.name), "Pinnacle PCTV"); - if (pinnacle_remote == 0) { - ir->get_key = get_key_pinnacle_color; - ir->ir_codes = ir_codes_pinnacle_color; - } else { - ir->get_key = get_key_pinnacle_grey; - ir->ir_codes = ir_codes_pinnacle_grey; - } + ir->get_key = get_key_pinnacle; + ir->ir_codes = ir_codes_pinnacle; break; case SAA7134_BOARD_UPMOST_PURPLE_TV: snprintf(ir->c.name, sizeof(ir->c.name), "Purple TV"); diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 2e3ba5f31..7aa02b34e 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c @@ -845,7 +845,7 @@ int saa7134_oss_init1(struct saa7134_dev *dev) { if ((request_irq(dev->pci->irq, saa7134_oss_irq, - IRQF_SHARED | IRQF_DISABLED, dev->name, + SA_SHIRQ | SA_INTERRUPT, dev->name, (void*) &dev->dmasound)) < 0) return -1; @@ -993,9 +993,9 @@ static int saa7134_oss_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; - if (!saa7134_dmasound_init && !saa7134_dmasound_exit) { - saa7134_dmasound_init = oss_device_init; - saa7134_dmasound_exit = oss_device_exit; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = oss_device_init; + dmasound_exit = oss_device_exit; } else { printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); return -EBUSY; @@ -1037,8 +1037,8 @@ static void saa7134_oss_exit(void) } - saa7134_dmasound_init = NULL; - saa7134_dmasound_exit = NULL; + dmasound_init = NULL; + dmasound_exit = NULL; printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 2c171af9a..e4156ec9c 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -40,7 +40,7 @@ static unsigned int video_debug = 0; static unsigned int gbuffers = 8; -static unsigned int noninterlaced = 1; +static unsigned int noninterlaced = 0; static unsigned int gbufsize = 720*576*4; static unsigned int gbufsize_max = 720*576*4; module_param(video_debug, int, 0644); @@ -48,7 +48,7 @@ MODULE_PARM_DESC(video_debug,"enable debug messages [video]"); module_param(gbuffers, int, 0444); MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32"); module_param(noninterlaced, int, 0644); -MODULE_PARM_DESC(noninterlaced,"capture non interlaced video"); +MODULE_PARM_DESC(noninterlaced,"video input is noninterlaced"); #define dprintk(fmt, arg...) if (video_debug) \ printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg) @@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, struct v4l2_format *f = arg; return saa7134_try_fmt(dev,fh,f); } -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_V4L1 case VIDIOCGMBUF: { struct video_mbuf *mbuf = arg; diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index c04ce6152..353af3a8b 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -33,7 +33,6 @@ #include -#include #include #include #include @@ -222,7 +221,6 @@ struct saa7134_format { #define SAA7134_BOARD_AVERMEDIA_A169_B1 92 #define SAA7134_BOARD_MD7134_BRIDGE_2 93 #define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94 -#define SAA7134_BOARD_FLYVIDEO3000_NTSC 95 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 @@ -533,7 +531,6 @@ struct saa7134_dev { /* SAA7134_MPEG_DVB only */ struct videobuf_dvb dvb; - int (*original_demod_sleep)(struct dvb_frontend* fe); }; /* ----------------------------------------------------------- */ @@ -586,8 +583,8 @@ void saa7134_dma_free(struct videobuf_queue *q,struct saa7134_buf *buf); int saa7134_set_dmabits(struct saa7134_dev *dev); -extern int (*saa7134_dmasound_init)(struct saa7134_dev *dev); -extern int (*saa7134_dmasound_exit)(struct saa7134_dev *dev); +extern int (*dmasound_init)(struct saa7134_dev *dev); +extern int (*dmasound_exit)(struct saa7134_dev *dev); /* ----------------------------------------------------------- */ diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c index 67987baee..a846ebc78 100644 --- a/drivers/media/video/se401.c +++ b/drivers/media/video/se401.c @@ -27,6 +27,7 @@ static const char version[] = "0.24"; +#include #include #include #include diff --git a/drivers/media/video/se401.h b/drivers/media/video/se401.h index c0891b3e0..a7a216bd4 100644 --- a/drivers/media/video/se401.h +++ b/drivers/media/video/se401.h @@ -4,7 +4,6 @@ #include #include -#include #include #include diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index 48d138a7c..ea4394dc9 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c @@ -2608,9 +2608,11 @@ static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_CTRL: return sn9c102_vidioc_g_ctrl(cam, arg); + case VIDIOC_S_CTRL_OLD: case VIDIOC_S_CTRL: return sn9c102_vidioc_s_ctrl(cam, arg); + case VIDIOC_CROPCAP_OLD: case VIDIOC_CROPCAP: return sn9c102_vidioc_cropcap(cam, arg); @@ -2657,6 +2659,7 @@ static int sn9c102_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_PARM: return sn9c102_vidioc_g_parm(cam, arg); + case VIDIOC_S_PARM_OLD: case VIDIOC_S_PARM: return sn9c102_vidioc_s_parm(cam, arg); diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index 5686547ba..af372dd25 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c @@ -42,7 +42,6 @@ #include #include #include -#include #include "saa7146.h" #include "saa7146reg.h" @@ -1983,7 +1982,7 @@ static int __devinit configure_saa7146(struct pci_dev *pdev, int num) memcpy(&saa->video_dev, &saa_template, sizeof(saa_template)); saawrite(0, SAA7146_IER); /* turn off all interrupts */ - retval = request_irq(saa->irq, saa7146_irq, IRQF_SHARED | IRQF_DISABLED, + retval = request_irq(saa->irq, saa7146_irq, SA_SHIRQ | SA_INTERRUPT, "stradis", saa); if (retval == -EINVAL) dev_err(&pdev->dev, "%d: Bad irq number or handler\n", num); @@ -2189,7 +2188,7 @@ static struct pci_driver stradis_driver = { .remove = __devexit_p(stradis_remove) }; -static int __init stradis_init(void) +int __init stradis_init(void) { int retval; @@ -2202,7 +2201,7 @@ static int __init stradis_init(void) return retval; } -static void __exit stradis_exit(void) +void __exit stradis_exit(void) { pci_unregister_driver(&stradis_driver); printk(KERN_INFO "stradis: module cleanup complete\n"); diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c index 2ba2991a2..b38bda83a 100644 --- a/drivers/media/video/stv680.c +++ b/drivers/media/video/stv680.c @@ -58,6 +58,7 @@ * Fixed proc entry removal bug. */ +#include #include #include #include @@ -65,7 +66,6 @@ #include #include #include -#include #include #include diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c index 827633b3b..103ccb919 100644 --- a/drivers/media/video/tda9875.c +++ b/drivers/media/video/tda9875.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -164,7 +163,7 @@ static void do_tda9875_init(struct i2c_client *client) struct tda9875 *t = i2c_get_clientdata(client); dprintk("In tda9875_init\n"); tda9875_write(client, TDA9875_CFG, 0xd0 ); /*reg de config 0 (reset)*/ - tda9875_write(client, TDA9875_MSR, 0x03 ); /* Monitor 0b00000XXX*/ + tda9875_write(client, TDA9875_MSR, 0x03 ); /* Monitor 0b00000XXX*/ tda9875_write(client, TDA9875_C1MSB, 0x00 ); /*Car1(FM) MSB XMHz*/ tda9875_write(client, TDA9875_C1MIB, 0x00 ); /*Car1(FM) MIB XMHz*/ tda9875_write(client, TDA9875_C1LSB, 0x00 ); /*Car1(FM) LSB XMHz*/ diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 8dab481d3..0d54f6c19 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c @@ -18,21 +18,49 @@ TDA9886 (PAL, SECAM, NTSC) TDA9887 (PAL, SECAM, NTSC, FM Radio) - Used as part of several tuners + found on: + - Pinnacle PCTV (Jul.2002 Version with MT2032, bttv) + TDA9887 (world), TDA9885 (USA) + Note: OP2 of tda988x must be set to 1, else MT2032 is disabled! + - KNC One TV-Station RDS (saa7134) + - Hauppauge PVR-150/500 (possibly more) */ -#define tda9887_info(fmt, arg...) do {\ - printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.name, \ - i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) -#define tda9887_dbg(fmt, arg...) do {\ - if (tuner_debug) \ - printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.name, \ - i2c_adapter_id(t->i2c.adapter), t->i2c.addr , ##arg); } while (0) +/* Addresses to scan */ +static unsigned short normal_i2c[] = { + 0x84 >>1, + 0x86 >>1, + 0x96 >>1, + I2C_CLIENT_END, +}; +I2C_CLIENT_INSMOD; + +/* insmod options */ +static unsigned int debug = 0; +module_param(debug, int, 0644); +MODULE_LICENSE("GPL"); /* ---------------------------------------------------------------------- */ #define UNSET (-1U) +#define tda9887_info(fmt, arg...) do {\ + printk(KERN_INFO "%s %d-%04x: " fmt, t->client.name, \ + i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0) +#define tda9887_dbg(fmt, arg...) do {\ + if (debug) \ + printk(KERN_INFO "%s %d-%04x: " fmt, t->client.name, \ + i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0) + +struct tda9887 { + struct i2c_client client; + v4l2_std_id std; + enum tuner_mode mode; + unsigned int config; + unsigned int using_v4l2; + unsigned int radio_mode; + unsigned char data[4]; +}; struct tvnorm { v4l2_std_id std; @@ -42,6 +70,9 @@ struct tvnorm { unsigned char e; }; +static struct i2c_driver driver; +static struct i2c_client client_template; + /* ---------------------------------------------------------------------- */ // @@ -84,7 +115,8 @@ struct tvnorm { #define cAudioGain6 0x80 // bit c7 #define cTopMask 0x1f // bit c0:4 -#define cTopDefault 0x10 // bit c0:4 +#define cTopPalSecamDefault 0x14 // bit c0:4 +#define cTopNtscRadioDefault 0x10 // bit c0:4 //// third reg (e) #define cAudioIF_4_5 0x00 // bit e0:1 @@ -122,7 +154,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis50 | - cTopDefault), + cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_5_5 | cVideoIF_38_90 ), @@ -133,7 +165,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis50 | - cTopDefault), + cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_6_0 | cVideoIF_38_90 ), @@ -144,7 +176,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis50 | - cTopDefault), + cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_6_5 | cVideoIF_38_90 ), @@ -155,7 +187,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis75 | - cTopDefault), + cTopNtscRadioDefault), .e = ( cGating_36 | cAudioIF_4_5 | cVideoIF_45_75 ), @@ -164,7 +196,7 @@ static struct tvnorm tvnorms[] = { .name = "SECAM-BGH", .b = ( cPositiveAmTV | cQSS ), - .c = ( cTopDefault), + .c = ( cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_5_5 | cVideoIF_38_90 ), @@ -173,7 +205,7 @@ static struct tvnorm tvnorms[] = { .name = "SECAM-L", .b = ( cPositiveAmTV | cQSS ), - .c = ( cTopDefault), + .c = ( cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_6_5 | cVideoIF_38_90 ), @@ -183,7 +215,7 @@ static struct tvnorm tvnorms[] = { .b = ( cOutputPort2Inactive | cPositiveAmTV | cQSS ), - .c = ( cTopDefault), + .c = ( cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_6_5 | cVideoIF_33_90 ), @@ -194,7 +226,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis50 | - cTopDefault), + cTopPalSecamDefault), .e = ( cGating_36 | cAudioIF_6_5 | cVideoIF_38_90 ), @@ -205,7 +237,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis75 | - cTopDefault), + cTopNtscRadioDefault), .e = ( cGating_36 | cAudioIF_4_5 | cVideoIF_45_75 ), @@ -216,7 +248,7 @@ static struct tvnorm tvnorms[] = { cQSS ), .c = ( cDeemphasisON | cDeemphasis50 | - cTopDefault), + cTopNtscRadioDefault), .e = ( cGating_36 | cAudioIF_4_5 | cVideoIF_58_75 ), @@ -229,7 +261,7 @@ static struct tvnorm radio_stereo = { cQSS ), .c = ( cDeemphasisOFF | cAudioGain6 | - cTopDefault), + cTopNtscRadioDefault), .e = ( cTunerGainLow | cAudioIF_5_5 | cRadioIF_38_90 ), @@ -241,7 +273,7 @@ static struct tvnorm radio_mono = { cQSS ), .c = ( cDeemphasisON | cDeemphasis75 | - cTopDefault), + cTopNtscRadioDefault), .e = ( cTunerGainLow | cAudioIF_5_5 | cRadioIF_38_90 ), @@ -249,7 +281,7 @@ static struct tvnorm radio_mono = { /* ---------------------------------------------------------------------- */ -static void dump_read_message(struct tuner *t, unsigned char *buf) +static void dump_read_message(struct tda9887 *t, unsigned char *buf) { static char *afc[16] = { "- 12.5 kHz", @@ -277,7 +309,7 @@ static void dump_read_message(struct tuner *t, unsigned char *buf) tda9887_info(" vfi level : %s\n", (buf[0] & 0x80) ? "high" : "low"); } -static void dump_write_message(struct tuner *t, unsigned char *buf) +static void dump_write_message(struct tda9887 *t, unsigned char *buf) { static char *sound[4] = { "AM/TV", @@ -373,13 +405,13 @@ static void dump_write_message(struct tuner *t, unsigned char *buf) /* ---------------------------------------------------------------------- */ -static int tda9887_set_tvnorm(struct tuner *t, char *buf) +static int tda9887_set_tvnorm(struct tda9887 *t, char *buf) { struct tvnorm *norm = NULL; int i; - if (t->mode == V4L2_TUNER_RADIO) { - if (t->audmode == V4L2_TUNER_MODE_MONO) + if (t->mode == T_RADIO) { + if (t->radio_mode == V4L2_TUNER_MODE_MONO) norm = &radio_mono; else norm = &radio_stereo; @@ -413,7 +445,7 @@ module_param(port2, int, 0644); module_param(qss, int, 0644); module_param(adjust, int, 0644); -static int tda9887_set_insmod(struct tuner *t, char *buf) +static int tda9887_set_insmod(struct tda9887 *t, char *buf) { if (UNSET != port1) { if (port1) @@ -442,27 +474,27 @@ static int tda9887_set_insmod(struct tuner *t, char *buf) return 0; } -static int tda9887_set_config(struct tuner *t, char *buf) +static int tda9887_set_config(struct tda9887 *t, char *buf) { - if (t->tda9887_config & TDA9887_PORT1_ACTIVE) + if (t->config & TDA9887_PORT1_ACTIVE) buf[1] &= ~cOutputPort1Inactive; - if (t->tda9887_config & TDA9887_PORT1_INACTIVE) + if (t->config & TDA9887_PORT1_INACTIVE) buf[1] |= cOutputPort1Inactive; - if (t->tda9887_config & TDA9887_PORT2_ACTIVE) + if (t->config & TDA9887_PORT2_ACTIVE) buf[1] &= ~cOutputPort2Inactive; - if (t->tda9887_config & TDA9887_PORT2_INACTIVE) + if (t->config & TDA9887_PORT2_INACTIVE) buf[1] |= cOutputPort2Inactive; - if (t->tda9887_config & TDA9887_QSS) + if (t->config & TDA9887_QSS) buf[1] |= cQSS; - if (t->tda9887_config & TDA9887_INTERCARRIER) + if (t->config & TDA9887_INTERCARRIER) buf[1] &= ~cQSS; - if (t->tda9887_config & TDA9887_AUTOMUTE) + if (t->config & TDA9887_AUTOMUTE) buf[1] |= cAutoMuteFmActive; - if (t->tda9887_config & TDA9887_DEEMPHASIS_MASK) { + if (t->config & TDA9887_DEEMPHASIS_MASK) { buf[2] &= ~0x60; - switch (t->tda9887_config & TDA9887_DEEMPHASIS_MASK) { + switch (t->config & TDA9887_DEEMPHASIS_MASK) { case TDA9887_DEEMPHASIS_NONE: buf[2] |= cDeemphasisOFF; break; @@ -474,36 +506,153 @@ static int tda9887_set_config(struct tuner *t, char *buf) break; } } - if (t->tda9887_config & TDA9887_TOP_SET) { + if (t->config & TDA9887_TOP_SET) { buf[2] &= ~cTopMask; - buf[2] |= (t->tda9887_config >> 8) & cTopMask; + buf[2] |= (t->config >> 8) & cTopMask; } - if ((t->tda9887_config & TDA9887_INTERCARRIER_NTSC) && (t->std & V4L2_STD_NTSC)) + if ((t->config & TDA9887_INTERCARRIER_NTSC) && (t->std & V4L2_STD_NTSC)) buf[1] &= ~cQSS; return 0; } /* ---------------------------------------------------------------------- */ -static int tda9887_status(struct tuner *t) +static char pal[] = "--"; +static char secam[] = "--"; +static char ntsc[] = "-"; + +module_param_string(pal, pal, sizeof(pal), 0644); +module_param_string(secam, secam, sizeof(secam), 0644); +module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); + +static int tda9887_fixup_std(struct tda9887 *t) +{ + /* get more precise norm info from insmod option */ + if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) { + switch (pal[0]) { + case 'b': + case 'B': + case 'g': + case 'G': + case 'h': + case 'H': + case 'n': + case 'N': + if (pal[1] == 'c' || pal[1] == 'C') { + tda9887_dbg("insmod fixup: PAL => PAL-Nc\n"); + t->std = V4L2_STD_PAL_Nc; + } else { + tda9887_dbg("insmod fixup: PAL => PAL-BGHN\n"); + t->std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H | V4L2_STD_PAL_N; + } + break; + case 'i': + case 'I': + tda9887_dbg("insmod fixup: PAL => PAL-I\n"); + t->std = V4L2_STD_PAL_I; + break; + case 'd': + case 'D': + case 'k': + case 'K': + tda9887_dbg("insmod fixup: PAL => PAL-DK\n"); + t->std = V4L2_STD_PAL_DK; + break; + case 'm': + case 'M': + tda9887_dbg("insmod fixup: PAL => PAL-M\n"); + t->std = V4L2_STD_PAL_M; + break; + case '-': + /* default parameter, do nothing */ + break; + default: + tda9887_info("pal= argument not recognised\n"); + break; + } + } + if ((t->std & V4L2_STD_SECAM) == V4L2_STD_SECAM) { + switch (secam[0]) { + case 'b': + case 'B': + case 'g': + case 'G': + case 'h': + case 'H': + tda9887_dbg("insmod fixup: SECAM => SECAM-BGH\n"); + t->std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H; + break; + case 'd': + case 'D': + case 'k': + case 'K': + tda9887_dbg("insmod fixup: SECAM => SECAM-DK\n"); + t->std = V4L2_STD_SECAM_DK; + break; + case 'l': + case 'L': + if (secam[1] == 'c' || secam[1] == 'C') { + tda9887_dbg("insmod fixup: SECAM => SECAM-L'\n"); + t->std = V4L2_STD_SECAM_LC; + } else { + tda9887_dbg("insmod fixup: SECAM => SECAM-L\n"); + t->std = V4L2_STD_SECAM_L; + } + break; + case '-': + /* default parameter, do nothing */ + break; + default: + tda9887_info("secam= argument not recognised\n"); + break; + } + } + if ((t->std & V4L2_STD_NTSC) == V4L2_STD_NTSC) { + switch (ntsc[0]) { + case 'm': + case 'M': + tda9887_dbg("insmod fixup: NTSC => NTSC-M\n"); + t->std = V4L2_STD_NTSC_M; + break; + case 'j': + case 'J': + tda9887_dbg("insmod fixup: NTSC => NTSC_M_JP\n"); + t->std = V4L2_STD_NTSC_M_JP; + break; + case 'k': + case 'K': + tda9887_dbg("insmod fixup: NTSC => NTSC_M_KR\n"); + t->std = V4L2_STD_NTSC_M_KR; + break; + case '-': + /* default parameter, do nothing */ + break; + default: + tda9887_info("ntsc= argument not recognised\n"); + break; + } + } + return 0; +} + +static int tda9887_status(struct tda9887 *t) { unsigned char buf[1]; int rc; memset(buf,0,sizeof(buf)); - if (1 != (rc = i2c_master_recv(&t->i2c,buf,1))) + if (1 != (rc = i2c_master_recv(&t->client,buf,1))) tda9887_info("i2c i/o error: rc == %d (should be 1)\n",rc); dump_read_message(t, buf); return 0; } -static void tda9887_configure(struct i2c_client *client) +static int tda9887_configure(struct tda9887 *t) { - struct tuner *t = i2c_get_clientdata(client); int rc; - memset(t->tda9887_data,0,sizeof(t->tda9887_data)); - tda9887_set_tvnorm(t,t->tda9887_data); + memset(t->data,0,sizeof(t->data)); + tda9887_set_tvnorm(t,t->data); /* A note on the port settings: These settings tend to depend on the specifics of the board. @@ -518,84 +667,249 @@ static void tda9887_configure(struct i2c_client *client) the ports should be set to active (0), but, again, that may differ depending on the precise hardware configuration. */ - t->tda9887_data[1] |= cOutputPort1Inactive; - t->tda9887_data[1] |= cOutputPort2Inactive; + t->data[1] |= cOutputPort1Inactive; + t->data[1] |= cOutputPort2Inactive; - tda9887_set_config(t,t->tda9887_data); - tda9887_set_insmod(t,t->tda9887_data); + tda9887_set_config(t,t->data); + tda9887_set_insmod(t,t->data); if (t->mode == T_STANDBY) { - t->tda9887_data[1] |= cForcedMuteAudioON; + t->data[1] |= cForcedMuteAudioON; } tda9887_dbg("writing: b=0x%02x c=0x%02x e=0x%02x\n", - t->tda9887_data[1],t->tda9887_data[2],t->tda9887_data[3]); - if (tuner_debug > 1) - dump_write_message(t, t->tda9887_data); + t->data[1],t->data[2],t->data[3]); + if (debug > 1) + dump_write_message(t, t->data); - if (4 != (rc = i2c_master_send(&t->i2c,t->tda9887_data,4))) + if (4 != (rc = i2c_master_send(&t->client,t->data,4))) tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc); - if (tuner_debug > 2) { + if (debug > 2) { msleep_interruptible(1000); tda9887_status(t); } + return 0; } /* ---------------------------------------------------------------------- */ -static void tda9887_tuner_status(struct i2c_client *client) +static int tda9887_attach(struct i2c_adapter *adap, int addr, int kind) { - struct tuner *t = i2c_get_clientdata(client); - tda9887_info("Data bytes: b=0x%02x c=0x%02x e=0x%02x\n", t->tda9887_data[1], t->tda9887_data[2], t->tda9887_data[3]); + struct tda9887 *t; + + client_template.adapter = adap; + client_template.addr = addr; + + if (NULL == (t = kzalloc(sizeof(*t), GFP_KERNEL))) + return -ENOMEM; + + t->client = client_template; + t->std = 0; + t->radio_mode = V4L2_TUNER_MODE_STEREO; + + tda9887_info("chip found @ 0x%x (%s)\n", addr<<1, adap->name); + + i2c_set_clientdata(&t->client, t); + i2c_attach_client(&t->client); + + return 0; } -static int tda9887_get_afc(struct i2c_client *client) +static int tda9887_probe(struct i2c_adapter *adap) { - struct tuner *t = i2c_get_clientdata(client); - static int AFC_BITS_2_kHz[] = { - -12500, -37500, -62500, -97500, - -112500, -137500, -162500, -187500, - 187500, 162500, 137500, 112500, - 97500 , 62500, 37500 , 12500 - }; - int afc=0; - __u8 reg = 0; + if (adap->class & I2C_CLASS_TV_ANALOG) + return i2c_probe(adap, &addr_data, tda9887_attach); + return 0; +} - if (1 == i2c_master_recv(&t->i2c,®,1)) - afc = AFC_BITS_2_kHz[(reg>>1)&0x0f]; +static int tda9887_detach(struct i2c_client *client) +{ + struct tda9887 *t = i2c_get_clientdata(client); - return afc; + i2c_detach_client(client); + kfree(t); + return 0; } -static void tda9887_standby(struct i2c_client *client) +#define SWITCH_V4L2 if (!t->using_v4l2 && debug) \ + tda9887_info("switching to v4l2\n"); \ + t->using_v4l2 = 1; +#define CHECK_V4L2 if (t->using_v4l2) { if (debug) \ + tda9887_info("ignore v4l1 call\n"); \ + return 0; } + +static int +tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg) { - tda9887_configure(client); + struct tda9887 *t = i2c_get_clientdata(client); + + switch (cmd) { + + /* --- configuration --- */ + case AUDC_SET_RADIO: + { + t->mode = T_RADIO; + tda9887_configure(t); + break; + } + case TUNER_SET_STANDBY: + { + t->mode = T_STANDBY; + tda9887_configure(t); + break; + } + case TDA9887_SET_CONFIG: + { + int *i = arg; + + t->config = *i; + tda9887_configure(t); + break; + } + /* --- v4l ioctls --- */ + /* take care: bttv does userspace copying, we'll get a + kernel pointer here... */ + case VIDIOCSCHAN: + { + static const v4l2_std_id map[] = { + [ VIDEO_MODE_PAL ] = V4L2_STD_PAL, + [ VIDEO_MODE_NTSC ] = V4L2_STD_NTSC_M, + [ VIDEO_MODE_SECAM ] = V4L2_STD_SECAM, + [ 4 /* bttv */ ] = V4L2_STD_PAL_M, + [ 5 /* bttv */ ] = V4L2_STD_PAL_N, + [ 6 /* bttv */ ] = V4L2_STD_NTSC_M_JP, + }; + struct video_channel *vc = arg; + + CHECK_V4L2; + t->mode = T_ANALOG_TV; + if (vc->norm < ARRAY_SIZE(map)) + t->std = map[vc->norm]; + tda9887_fixup_std(t); + tda9887_configure(t); + break; + } + case VIDIOC_S_STD: + { + v4l2_std_id *id = arg; + + SWITCH_V4L2; + t->mode = T_ANALOG_TV; + t->std = *id; + tda9887_fixup_std(t); + tda9887_configure(t); + break; + } + case VIDIOC_S_FREQUENCY: + { + struct v4l2_frequency *f = arg; + + SWITCH_V4L2; + if (V4L2_TUNER_ANALOG_TV == f->type) { + if (t->mode == T_ANALOG_TV) + return 0; + t->mode = T_ANALOG_TV; + } + if (V4L2_TUNER_RADIO == f->type) { + if (t->mode == T_RADIO) + return 0; + t->mode = T_RADIO; + } + tda9887_configure(t); + break; + } + case VIDIOC_G_TUNER: + { + static int AFC_BITS_2_kHz[] = { + -12500, -37500, -62500, -97500, + -112500, -137500, -162500, -187500, + 187500, 162500, 137500, 112500, + 97500 , 62500, 37500 , 12500 + }; + struct v4l2_tuner* tuner = arg; + + if (t->mode == T_RADIO) { + __u8 reg = 0; + tuner->afc=0; + if (1 == i2c_master_recv(&t->client,®,1)) + tuner->afc = AFC_BITS_2_kHz[(reg>>1)&0x0f]; + } + break; + } + case VIDIOC_S_TUNER: + { + struct v4l2_tuner* tuner = arg; + + if (t->mode == T_RADIO) { + t->radio_mode = tuner->audmode; + tda9887_configure (t); + } + break; + } + case VIDIOC_LOG_STATUS: + { + tda9887_info("Data bytes: b=0x%02x c=0x%02x e=0x%02x\n", t->data[1], t->data[2], t->data[3]); + break; + } + default: + /* nothing */ + break; + } + return 0; } -static void tda9887_set_freq(struct i2c_client *client, unsigned int freq) +static int tda9887_suspend(struct device * dev, pm_message_t state) { - tda9887_configure(client); + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + struct tda9887 *t = i2c_get_clientdata(c); + + tda9887_dbg("suspend\n"); + return 0; } -int tda9887_tuner_init(struct i2c_client *c) +static int tda9887_resume(struct device * dev) { - struct tuner *t = i2c_get_clientdata(c); + struct i2c_client *c = container_of(dev, struct i2c_client, dev); + struct tda9887 *t = i2c_get_clientdata(c); - strlcpy(c->name, "tda9887", sizeof(c->name)); + tda9887_dbg("resume\n"); + tda9887_configure(t); + return 0; +} - tda9887_info("tda988[5/6/7] found @ 0x%x (%s)\n", t->i2c.addr, - t->i2c.driver->driver.name); +/* ----------------------------------------------------------------------- */ + +static struct i2c_driver driver = { + .id = I2C_DRIVERID_TDA9887, + .attach_adapter = tda9887_probe, + .detach_client = tda9887_detach, + .command = tda9887_command, + .driver = { + .name = "tda9887", + .suspend = tda9887_suspend, + .resume = tda9887_resume, + }, +}; +static struct i2c_client client_template = +{ + .name = "tda9887", + .driver = &driver, +}; - t->set_tv_freq = tda9887_set_freq; - t->set_radio_freq = tda9887_set_freq; - t->standby = tda9887_standby; - t->tuner_status = tda9887_tuner_status; - t->get_afc = tda9887_get_afc; +static int __init tda9887_init_module(void) +{ + return i2c_add_driver(&driver); +} - return 0; +static void __exit tda9887_cleanup_module(void) +{ + i2c_del_driver(&driver); } +module_init(tda9887_init_module); +module_exit(tda9887_cleanup_module); + /* * Overrides for Emacs so that we follow Linus's tabbing style. * --------------------------------------------------------------------------- diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c index d1c41781c..c2b98f81c 100644 --- a/drivers/media/video/tea5767.c +++ b/drivers/media/video/tea5767.c @@ -3,7 +3,7 @@ * I2C address is allways 0xC0. * * - * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@infradead.org) + * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License * * tea5767 autodetection thanks to Torsten Seeboth and Atsushi Nakagawa diff --git a/drivers/media/video/tlv320aic23b.c b/drivers/media/video/tlv320aic23b.c deleted file mode 100644 index 76b2e9642..000000000 --- a/drivers/media/video/tlv320aic23b.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * tlv320aic23b - driver version 0.0.1 - * - * Copyright (C) 2006 Scott Alfter - * - * Based on wm8775 driver - * - * Copyright (C) 2004 Ulf Eklund - * Copyright (C) 2005 Hans Verkuil - * - * 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 -#include -#include -#include -#include -#include -#include -#include - -MODULE_DESCRIPTION("tlv320aic23b driver"); -MODULE_AUTHOR("Scott Alfter, Ulf Eklund, Hans Verkuil"); -MODULE_LICENSE("GPL"); - -static unsigned short normal_i2c[] = { 0x34 >> 1, I2C_CLIENT_END }; - - -I2C_CLIENT_INSMOD; - -/* ----------------------------------------------------------------------- */ - -struct tlv320aic23b_state { - u8 muted; -}; - -static int tlv320aic23b_write(struct i2c_client *client, int reg, u16 val) -{ - int i; - - if ((reg < 0 || reg > 9) && (reg != 15)) { - v4l_err(client, "Invalid register R%d\n", reg); - return -1; - } - - for (i = 0; i < 3; i++) { - if (i2c_smbus_write_byte_data(client, (reg << 1) | - (val >> 8), val & 0xff) == 0) { - return 0; - } - } - v4l_err(client, "I2C: cannot write %03x to register R%d\n", val, reg); - return -1; -} - -static int tlv320aic23b_command(struct i2c_client *client, unsigned int cmd, - void *arg) -{ - struct tlv320aic23b_state *state = i2c_get_clientdata(client); - struct v4l2_control *ctrl = arg; - u32* freq = arg; - - switch (cmd) { - case VIDIOC_INT_AUDIO_CLOCK_FREQ: - switch (*freq) { - case 32000: /* set sample rate to 32 kHz */ - tlv320aic23b_write(client, 8, 0x018); - break; - case 44100: /* set sample rate to 44.1 kHz */ - tlv320aic23b_write(client, 8, 0x022); - break; - case 48000: /* set sample rate to 48 kHz */ - tlv320aic23b_write(client, 8, 0x000); - break; - default: - return -EINVAL; - } - break; - - case VIDIOC_G_CTRL: - if (ctrl->id != V4L2_CID_AUDIO_MUTE) - return -EINVAL; - ctrl->value = state->muted; - break; - - case VIDIOC_S_CTRL: - if (ctrl->id != V4L2_CID_AUDIO_MUTE) - return -EINVAL; - state->muted = ctrl->value; - tlv320aic23b_write(client, 0, 0x180); /* mute both channels */ - /* set gain on both channels to +3.0 dB */ - if (!state->muted) - tlv320aic23b_write(client, 0, 0x119); - break; - - case VIDIOC_LOG_STATUS: - v4l_info(client, "Input: %s\n", - state->muted ? "muted" : "active"); - break; - - default: - return -EINVAL; - } - return 0; -} - -/* ----------------------------------------------------------------------- */ - -/* i2c implementation */ - -/* - * Generic i2c probe - * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' - */ - -static struct i2c_driver i2c_driver; - -static int tlv320aic23b_attach(struct i2c_adapter *adapter, int address, int kind) -{ - struct i2c_client *client; - struct tlv320aic23b_state *state; - - /* Check if the adapter supports the needed features */ - if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) - return 0; - - client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) - return -ENOMEM; - - client->addr = address; - client->adapter = adapter; - client->driver = &i2c_driver; - snprintf(client->name, sizeof(client->name) - 1, "tlv320aic23b"); - - v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); - - state = kmalloc(sizeof(struct tlv320aic23b_state), GFP_KERNEL); - if (state == NULL) { - kfree(client); - return -ENOMEM; - } - state->muted = 0; - i2c_set_clientdata(client, state); - - /* initialize tlv320aic23b */ - tlv320aic23b_write(client, 15, 0x000); /* RESET */ - tlv320aic23b_write(client, 6, 0x00A); /* turn off DAC & mic input */ - tlv320aic23b_write(client, 7, 0x049); /* left-justified, 24-bit, master mode */ - tlv320aic23b_write(client, 0, 0x119); /* set gain on both channels to +3.0 dB */ - tlv320aic23b_write(client, 8, 0x000); /* set sample rate to 48 kHz */ - tlv320aic23b_write(client, 9, 0x001); /* activate digital interface */ - - i2c_attach_client(client); - - return 0; -} - -static int tlv320aic23b_probe(struct i2c_adapter *adapter) -{ - if (adapter->class & I2C_CLASS_TV_ANALOG) - return i2c_probe(adapter, &addr_data, tlv320aic23b_attach); - return 0; -} - -static int tlv320aic23b_detach(struct i2c_client *client) -{ - int err; - - err = i2c_detach_client(client); - if (err) { - return err; - } - kfree(client); - - return 0; -} - -/* ----------------------------------------------------------------------- */ - -/* i2c implementation */ -static struct i2c_driver i2c_driver = { - .driver = { - .name = "tlv320aic23b", - }, - .id = I2C_DRIVERID_TLV320AIC23B, - .attach_adapter = tlv320aic23b_probe, - .detach_client = tlv320aic23b_detach, - .command = tlv320aic23b_command, -}; - - -static int __init tlv320aic23b_init_module(void) -{ - return i2c_add_driver(&i2c_driver); -} - -static void __exit tlv320aic23b_cleanup_module(void) -{ - i2c_del_driver(&i2c_driver); -} - -module_init(tlv320aic23b_init_module); -module_exit(tlv320aic23b_cleanup_module); diff --git a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c index bdf506e6a..74ab48c09 100644 --- a/drivers/media/video/tuner-3036.c +++ b/drivers/media/video/tuner-3036.c @@ -25,7 +25,6 @@ #include #include -#include #include diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 40590bae5..1013b4de8 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -40,6 +40,7 @@ static unsigned int no_autodetect = 0; static unsigned int show_i2c = 0; /* insmod options used at runtime => read/write */ +static unsigned int tuner_debug_old = 0; int tuner_debug = 0; static unsigned int tv_range[2] = { 44, 958 }; @@ -53,6 +54,8 @@ static char ntsc[] = "-"; module_param(addr, int, 0444); module_param(no_autodetect, int, 0444); module_param(show_i2c, int, 0444); +/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */ +module_param_named(tuner_debug,tuner_debug_old, int, 0444); module_param_named(debug,tuner_debug, int, 0644); module_param_string(pal, pal, sizeof(pal), 0644); module_param_string(secam, secam, sizeof(secam), 0644); @@ -196,6 +199,14 @@ static void set_type(struct i2c_client *c, unsigned int type, i2c_master_send(c, buffer, 4); default_tuner_init(c); break; + case TUNER_LG_TDVS_H062F: + /* Set the Auxiliary Byte. */ + buffer[2] &= ~0x20; + buffer[2] |= 0x18; + buffer[3] = 0x20; + i2c_master_send(c, buffer, 4); + default_tuner_init(c); + break; case TUNER_PHILIPS_TD1316: buffer[0] = 0x0b; buffer[1] = 0xdc; @@ -204,9 +215,6 @@ static void set_type(struct i2c_client *c, unsigned int type, i2c_master_send(c,buffer,4); default_tuner_init(c); break; - case TUNER_TDA9887: - tda9887_tuner_init(c); - break; default: default_tuner_init(c); break; @@ -233,8 +241,6 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup) { struct tuner *t = i2c_get_clientdata(c); - tuner_dbg("set addr for type %i\n", t->type); - if ( t->type == UNSET && ((tun_setup->addr == ADDR_UNSET && (t->mode_mask & tun_setup->mode_mask)) || tun_setup->addr == c->addr)) { @@ -408,7 +414,7 @@ static void tuner_status(struct i2c_client *client) /* ---------------------------------------------------------------------- */ -/* static vars: used only in tuner_attach and tuner_probe */ +/* static var Used only in tuner_attach and tuner_probe */ static unsigned default_mode_mask; /* During client attach, set_type is called by adapter's attach_inform callback. @@ -430,7 +436,11 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) t->radio_if2 = 10700 * 1000; /* 10.7MHz - FM radio */ t->audmode = V4L2_TUNER_MODE_STEREO; t->mode_mask = T_UNINITIALIZED; - t->tuner_status = tuner_status; + if (tuner_debug_old) { + tuner_debug = tuner_debug_old; + printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n"); + printk(KERN_ERR "tuner: use the debug option instead.\n"); + } if (show_i2c) { unsigned char buffer[16]; @@ -452,14 +462,10 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) case 0x4b: /* If chip is not tda8290, don't register. since it can be tda9887*/ - if (tda8290_probe(&t->i2c) == 0) { - tuner_dbg("chip at addr %x is a tda8290\n", addr); - } else { - /* Default is being tda9887 */ - t->type = TUNER_TDA9887; - t->mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; - t->mode = T_STANDBY; - goto register_client; + if (tda8290_probe(&t->i2c) != 0) { + tuner_dbg("chip at addr %x is not a tda8290\n", addr); + kfree(t); + return 0; } break; case 0x60: @@ -586,11 +592,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) case TUNER_SET_STANDBY: if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL) return 0; - t->mode = T_STANDBY; if (t->standby) t->standby (client); break; -#ifdef CONFIG_VIDEO_V4L1 case VIDIOCSAUDIO: if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) return 0; @@ -600,6 +604,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) /* Should be implemented, since bttv calls it */ tuner_dbg("VIDIOCSAUDIO not implemented.\n"); break; + /* --- v4l ioctls --- */ + /* take care: bttv does userspace copying, we'll get a + kernel pointer here... */ case VIDIOCSCHAN: { static const v4l2_std_id map[] = { @@ -683,18 +690,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; return 0; } -#endif - case TDA9887_SET_CONFIG: - if (t->type == TUNER_TDA9887) { - int *i = arg; - t->tda9887_config = *i; - set_freq(client, t->tv_freq); - } - break; - /* --- v4l ioctls --- */ - /* take care: bttv does userspace copying, we'll get a - kernel pointer here... */ case VIDIOC_S_STD: { v4l2_std_id *id = arg; @@ -715,10 +711,14 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct v4l2_frequency *f = arg; - if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") - == EINVAL) - return 0; switch_v4l2(); + if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode) + || (V4L2_TUNER_DIGITAL_TV == f->type + && V4L2_TUNER_DIGITAL_TV != t->mode)) { + if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") + == EINVAL) + return 0; + } set_freq(client,f->frequency); break; @@ -744,8 +744,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) switch_v4l2(); tuner->type = t->mode; - if (t->get_afc) - tuner->afc=t->get_afc(client); if (t->mode == V4L2_TUNER_ANALOG_TV) tuner->capability |= V4L2_TUNER_CAP_NORM; if (t->mode != V4L2_TUNER_RADIO) { @@ -789,8 +787,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) break; } case VIDIOC_LOG_STATUS: - if (t->tuner_status) - t->tuner_status(client); + tuner_status(client); break; } diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index a17cc8e97..5d7abed71 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c @@ -7,7 +7,6 @@ #include #include #include -#include static int offset = 0; module_param(offset, int, 0666); @@ -106,9 +105,8 @@ static int tuner_stereo(struct i2c_client *c) switch (t->type) { case TUNER_PHILIPS_FM1216ME_MK3: - case TUNER_PHILIPS_FM1236_MK3: + case TUNER_PHILIPS_FM1236_MK3: case TUNER_PHILIPS_FM1256_IH3: - case TUNER_LG_NTSC_TAPE: stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3); break; default: @@ -130,7 +128,6 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) u8 buffer[4]; int rc, IFPCoff, i, j; enum param_type desired_type; - struct tuner_params *params; tun = &tuners[t->type]; @@ -172,20 +169,19 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) IFPCoff,t->type); j = 0; } - params = &tun->params[j]; - for (i = 0; i < params->count; i++) { - if (freq > params->ranges[i].limit) + for (i = 0; i < tun->params[j].count; i++) { + if (freq > tun->params[j].ranges[i].limit) continue; break; } - if (i == params->count) { + if (i == tun->params[j].count) { tuner_dbg("TV frequency out of range (%d > %d)", - freq, params->ranges[i - 1].limit); - freq = params->ranges[--i].limit; + freq, tun->params[j].ranges[i - 1].limit); + freq = tun->params[j].ranges[--i].limit; } - config = params->ranges[i].config; - cb = params->ranges[i].cb; + config = tun->params[j].ranges[i].config; + cb = tun->params[j].ranges[i].cb; /* i == 0 -> VHF_LO * i == 1 -> VHF_HI * i == 2 -> UHF */ @@ -285,7 +281,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) break; } - if (params->cb_first_if_lower_freq && div < t->last_div) { + if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { buffer[0] = config; buffer[1] = cb; buffer[2] = (div>>8) & 0x7f; @@ -297,63 +293,13 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) buffer[3] = cb; } t->last_div = div; - if (params->has_tda9887) { - int config = 0; - int is_secam_l = (t->std & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)) && - !(t->std & ~(V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)); - - if (t->std == V4L2_STD_SECAM_LC) { - if (params->port1_active ^ params->port1_invert_for_secam_lc) - config |= TDA9887_PORT1_ACTIVE; - if (params->port2_active ^ params->port2_invert_for_secam_lc) - config |= TDA9887_PORT2_ACTIVE; - } - else { - if (params->port1_active) - config |= TDA9887_PORT1_ACTIVE; - if (params->port2_active) - config |= TDA9887_PORT2_ACTIVE; - } - if (params->intercarrier_mode) - config |= TDA9887_INTERCARRIER; - if (is_secam_l) { - if (i == 0 && params->default_top_secam_low) - config |= TDA9887_TOP(params->default_top_secam_low); - else if (i == 1 && params->default_top_secam_mid) - config |= TDA9887_TOP(params->default_top_secam_mid); - else if (params->default_top_secam_high) - config |= TDA9887_TOP(params->default_top_secam_high); - } - else { - if (i == 0 && params->default_top_low) - config |= TDA9887_TOP(params->default_top_low); - else if (i == 1 && params->default_top_mid) - config |= TDA9887_TOP(params->default_top_mid); - else if (params->default_top_high) - config |= TDA9887_TOP(params->default_top_high); - } - i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config); - } tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", buffer[0],buffer[1],buffer[2],buffer[3]); if (4 != (rc = i2c_master_send(c,buffer,4))) tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); - switch (t->type) { - case TUNER_LG_TDVS_H06XF: - /* Set the Auxiliary Byte. */ - buffer[0] = buffer[2]; - buffer[0] &= ~0x20; - buffer[0] |= 0x18; - buffer[1] = 0x20; - tuner_dbg("tv 0x%02x 0x%02x\n",buffer[0],buffer[1]); - - if (2 != (rc = i2c_master_send(c,buffer,2))) - tuner_warn("i2c i/o error: rc == %d (should be 2)\n",rc); - break; - case TUNER_MICROTUNE_4042FI5: - { + if (t->type == TUNER_MICROTUNE_4042FI5) { // FIXME - this may also work for other tuners unsigned long timeout = jiffies + msecs_to_jiffies(1); u8 status_byte = 0; @@ -378,12 +324,10 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq) buffer[2] = config; buffer[3] = cb; tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", - buffer[0],buffer[1],buffer[2],buffer[3]); + buffer[0],buffer[1],buffer[2],buffer[3]); if (4 != (rc = i2c_master_send(c,buffer,4))) tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); - break; - } } } @@ -395,7 +339,6 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) u16 div; int rc, j; enum param_type desired_type = TUNER_PARAM_TYPE_RADIO; - struct tuner_params *params; tun = &tuners[t->type]; @@ -409,8 +352,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) j = 0; div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ - params = &tun->params[j]; - buffer[2] = (params->ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ + buffer[2] = (tun->params[j].ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ switch (t->type) { case TUNER_TENA_9533_DI: @@ -420,7 +362,6 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) case TUNER_PHILIPS_FM1216ME_MK3: case TUNER_PHILIPS_FM1236_MK3: case TUNER_PHILIPS_FMD1216ME_MK3: - case TUNER_LG_NTSC_TAPE: buffer[3] = 0x19; break; case TUNER_TNF_5335MF: @@ -443,7 +384,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) } buffer[0] = (div>>8) & 0x7f; buffer[1] = div & 0xff; - if (params->cb_first_if_lower_freq && div < t->last_div) { + if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { buffer[0] = buffer[2]; buffer[1] = buffer[3]; buffer[2] = (div>>8) & 0x7f; @@ -457,18 +398,6 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) buffer[0],buffer[1],buffer[2],buffer[3]); t->last_div = div; - if (params->has_tda9887) { - int config = 0; - if (params->port1_active && !params->port1_fm_high_sensitivity) - config |= TDA9887_PORT1_ACTIVE; - if (params->port2_active && !params->port2_fm_high_sensitivity) - config |= TDA9887_PORT2_ACTIVE; - if (params->intercarrier_mode) - config |= TDA9887_INTERCARRIER; -/* if (params->port1_set_for_fm_mono) - config &= ~TDA9887_PORT1_ACTIVE;*/ - i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config); - } if (4 != (rc = i2c_master_send(c,buffer,4))) tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); } diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index c37115915..a1ae036b4 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c @@ -380,10 +380,6 @@ static struct tuner_params tuner_philips_fq1216me_params[] = { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_lg_pal_ranges, .count = ARRAY_SIZE(tuner_lg_pal_ranges), - .has_tda9887 = 1, - .port1_active = 1, - .port2_active = 1, - .port2_invert_for_secam_lc = 1, }, }; @@ -546,14 +542,6 @@ static struct tuner_params tuner_fm1216me_mk3_params[] = { .ranges = tuner_fm1216me_mk3_pal_ranges, .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), .cb_first_if_lower_freq = 1, - .has_tda9887 = 1, - .port1_active = 1, - .port2_active = 1, - .port2_invert_for_secam_lc = 1, - .port1_fm_high_sensitivity = 1, - .default_top_mid = -2, - .default_top_secam_mid = -2, - .default_top_secam_high = -2, }, }; @@ -624,10 +612,6 @@ static struct tuner_params tuner_fm1236_mk3_params[] = { .ranges = tuner_fm1236_mk3_ntsc_ranges, .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), .cb_first_if_lower_freq = 1, - .has_tda9887 = 1, - .port1_active = 1, - .port2_active = 1, - .port1_fm_high_sensitivity = 1, }, }; @@ -648,8 +632,6 @@ static struct tuner_params tuner_microtune_4049_fm5_params[] = { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_temic_4009f_5_pal_ranges, .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), - .has_tda9887 = 1, - .port1_invert_for_secam_lc = 1, }, }; @@ -666,8 +648,16 @@ static struct tuner_params tuner_panasonic_vp27_params[] = { .type = TUNER_PARAM_TYPE_NTSC, .ranges = tuner_panasonic_vp27_ntsc_ranges, .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), - .has_tda9887 = 1, - .intercarrier_mode = 1, + }, +}; + +/* ------------ TUNER_LG_NTSC_TAPE - LGINNOTEK NTSC ------------ */ + +static struct tuner_params tuner_lg_ntsc_tape_params[] = { + { + .type = TUNER_PARAM_TYPE_NTSC, + .ranges = tuner_fm1236_mk3_ntsc_ranges, + .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), }, }; @@ -792,13 +782,6 @@ static struct tuner_params tuner_philips_fq1216ame_mk4_params[] = { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), - .has_tda9887 = 1, - .port1_active = 1, - .port2_invert_for_secam_lc = 1, - .default_top_mid = -2, - .default_top_secam_low = -2, - .default_top_secam_mid = -2, - .default_top_secam_high = -2, }, }; @@ -887,17 +870,11 @@ static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = { .type = TUNER_PARAM_TYPE_PAL, .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), - .has_tda9887 = 1, - .port1_active = 1, - .port2_active = 1, - .port2_fm_high_sensitivity = 1, - .port2_invert_for_secam_lc = 1, - .port1_set_for_fm_mono = 1, }, }; -/* ------ TUNER_LG_TDVS_H06XF - LG INNOTEK / INFINEON ATSC ----- */ +/* ------------ TUNER_LG_TDVS_H062F - INFINEON ATSC ------------ */ static struct tuner_range tuner_tua6034_ntsc_ranges[] = { { 16 * 165.00 /*MHz*/, 0x8e, 0x01 }, @@ -906,7 +883,7 @@ static struct tuner_range tuner_tua6034_ntsc_ranges[] = { }; -static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { +static struct tuner_params tuner_tua6034_params[] = { { .type = TUNER_PARAM_TYPE_NTSC, .ranges = tuner_tua6034_ntsc_ranges, @@ -916,17 +893,11 @@ static struct tuner_params tuner_lg_tdvs_h06xf_params[] = { /* ------------ TUNER_YMEC_TVF66T5_B_DFF - Philips PAL ------------ */ -static struct tuner_range tuner_ymec_tvf66t5_b_dff_pal_ranges[] = { - { 16 * 160.25 /*MHz*/, 0x8e, 0x01, }, - { 16 * 464.25 /*MHz*/, 0x8e, 0x02, }, - { 16 * 999.99 , 0x8e, 0x08, }, -}; - static struct tuner_params tuner_ymec_tvf66t5_b_dff_params[] = { { .type = TUNER_PARAM_TYPE_PAL, - .ranges = tuner_ymec_tvf66t5_b_dff_pal_ranges, - .count = ARRAY_SIZE(tuner_ymec_tvf66t5_b_dff_pal_ranges), + .ranges = tuner_tena_9533_di_pal_ranges, + .count = ARRAY_SIZE(tuner_tena_9533_di_pal_ranges), }, }; @@ -1023,11 +994,10 @@ static struct tuner_params tuner_tnf_5335mf_params[] = { /* 70-79 */ /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ -/* '+ 4' turns on the Low Noise Amplifier */ static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { - { 16 * 130.00 /*MHz*/, 0xce, 0x01 + 4, }, - { 16 * 364.50 /*MHz*/, 0xce, 0x02 + 4, }, - { 16 * 999.99 , 0xce, 0x08 + 4, }, + { 16 * 130.00 /*MHz*/, 0xce, 0x01, }, + { 16 * 364.50 /*MHz*/, 0xce, 0x02, }, + { 16 * 999.99 , 0xce, 0x08, }, }; static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { @@ -1035,7 +1005,6 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { .type = TUNER_PARAM_TYPE_NTSC, .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), - .has_tda9887 = 1, }, }; @@ -1055,27 +1024,6 @@ static struct tuner_params tuner_thomson_fe6600_params[] = { }, }; -/* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ - -/* '+ 4' turns on the Low Noise Amplifier */ -static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { - { 16 * 146.25 /*MHz*/, 0xce, 0x01 + 4, }, - { 16 * 428.50 /*MHz*/, 0xce, 0x02 + 4, }, - { 16 * 999.99 , 0xce, 0x08 + 4, }, -}; - -static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { - { - .type = TUNER_PARAM_TYPE_PAL, - .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, - .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), - .has_tda9887 = 1, - .port1_active = 1, - .port2_active = 1, - .port2_invert_for_secam_lc = 1, - }, -}; - /* --------------------------------------------------------------------- */ struct tunertype tuners[] = { @@ -1321,8 +1269,8 @@ struct tunertype tuners[] = { }, [TUNER_LG_NTSC_TAPE] = { /* LGINNOTEK NTSC */ .name = "LG NTSC (TAPE series)", - .params = tuner_fm1236_mk3_params, - .count = ARRAY_SIZE(tuner_fm1236_mk3_params), + .params = tuner_lg_ntsc_tape_params, + .count = ARRAY_SIZE(tuner_lg_ntsc_tape_params), }, [TUNER_TNF_8831BGFF] = { /* Philips PAL */ .name = "Tenna TNF 8831 BGFF)", @@ -1406,10 +1354,10 @@ struct tunertype tuners[] = { .params = tuner_philips_fmd1216me_mk3_params, .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_params), }, - [TUNER_LG_TDVS_H06XF] = { /* LGINNOTEK ATSC */ - .name = "LG TDVS-H06xF", /* H061F, H062F & H064F */ - .params = tuner_lg_tdvs_h06xf_params, - .count = ARRAY_SIZE(tuner_lg_tdvs_h06xf_params), + [TUNER_LG_TDVS_H062F] = { /* LGINNOTEK ATSC */ + .name = "LG TDVS-H062F/TUA6034", + .params = tuner_tua6034_params, + .count = ARRAY_SIZE(tuner_tua6034_params), }, [TUNER_YMEC_TVF66T5_B_DFF] = { /* Philips PAL */ .name = "Ymec TVF66T5-B/DFF", @@ -1452,16 +1400,6 @@ struct tunertype tuners[] = { .params = tuner_thomson_fe6600_params, .count = ARRAY_SIZE(tuner_thomson_fe6600_params), }, - [TUNER_SAMSUNG_TCPG_6121P30A] = { /* Samsung PAL */ - .name = "Samsung TCPG 6121P30A", - .params = tuner_samsung_tcpg_6121p30a_params, - .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_params), - }, - [TUNER_TDA9887] = { /* Philips TDA 9887 IF PLL Demodulator. - This chip is part of some modern tuners */ - .name = "Philips TDA988[5,6,7] IF PLL Demodulator", - /* see tda9887.c for details */ - }, }; unsigned const int tuner_count = ARRAY_SIZE(tuners); diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 936e3f746..c2b756107 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c @@ -14,6 +14,7 @@ * */ +#include #include #include #include diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index d95529e8e..b463e9969 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c @@ -73,14 +73,14 @@ static struct HAUPPAUGE_TUNER_FMT } hauppauge_tuner_fmt[] = { - { V4L2_STD_UNKNOWN, " UNKNOWN" }, - { V4L2_STD_UNKNOWN, " FM" }, - { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" }, - { V4L2_STD_MN, " NTSC(M)" }, - { V4L2_STD_PAL_I, " PAL(I)" }, - { V4L2_STD_SECAM_L|V4L2_STD_SECAM_LC, " SECAM(L/L')" }, - { V4L2_STD_DK, " PAL(D/D1/K)" }, - { V4L2_STD_ATSC, " ATSC/DVB Digital" }, + { V4L2_STD_UNKNOWN," UNKNOWN" }, + { V4L2_STD_UNKNOWN," FM" }, + { V4L2_STD_PAL_BG, " PAL(B/G)" }, + { V4L2_STD_NTSC_M, " NTSC(M)" }, + { V4L2_STD_PAL_I, " PAL(I)" }, + { V4L2_STD_SECAM_L," SECAM(L/L')" }, + { V4L2_STD_PAL_DK, " PAL(D/D1/K)" }, + { V4L2_STD_ATSC, " ATSC/DVB Digital" }, }; /* This is the full list of possible tuners. Many thanks to Hauppauge for @@ -200,7 +200,7 @@ hauppauge_tuner[] = { TUNER_ABSENT, "Philips FQ1286A MK4"}, { TUNER_ABSENT, "Philips FQ1216ME MK5"}, { TUNER_ABSENT, "Philips FQ1236 MK5"}, - { TUNER_SAMSUNG_TCPG_6121P30A, "Samsung TCPG 6121P30A"}, + { TUNER_ABSENT, "Samsung TCPG_6121P30A"}, { TUNER_TCL_2002MB, "TCL 2002MB_3H"}, { TUNER_ABSENT, "TCL 2002MI_3H"}, { TUNER_TCL_2002N, "TCL 2002N 5H"}, @@ -219,7 +219,7 @@ hauppauge_tuner[] = { TUNER_ABSENT, "Thompson DTT75105"}, { TUNER_ABSENT, "Conexant_CX24109"}, { TUNER_TCL_2002N, "TCL M2523_5N_E"}, - { TUNER_TCL_2002MB, "TCL M2523_3DB_E"}, + { TUNER_ABSENT, "TCL M2523_3DB_E"}, { TUNER_ABSENT, "Philips 8275A"}, { TUNER_ABSENT, "Microtune MT2060"}, { TUNER_ABSENT, "Philips FM1236 MK5"}, diff --git a/drivers/media/video/tvmixer.c b/drivers/media/video/tvmixer.c index 1654576de..9e86caeb9 100644 --- a/drivers/media/video/tvmixer.c +++ b/drivers/media/video/tvmixer.c @@ -198,6 +198,10 @@ static int tvmixer_open(struct inode *inode, struct file *file) /* lock bttv in memory while the mixer is in use */ file->private_data = mix; +#ifndef I2C_PEC + if (client->adapter->inc_use) + client->adapter->inc_use(client->adapter); +#endif if (client->adapter->owner) try_module_get(client->adapter->owner); return 0; @@ -213,6 +217,10 @@ static int tvmixer_release(struct inode *inode, struct file *file) return -ENODEV; } +#ifndef I2C_PEC + if (client->adapter->dec_use) + client->adapter->dec_use(client->adapter); +#endif if (client->adapter->owner) module_put(client->adapter->owner); return 0; diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index b167ffab2..dab4973bc 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "tvp5150_reg.h" @@ -90,7 +89,7 @@ struct tvp5150 { struct i2c_client *client; v4l2_std_id norm; /* Current set standard */ - struct v4l2_routing route; + int input; int enable; int bright; int contrast; @@ -284,26 +283,29 @@ static void dump_reg(struct i2c_client *c) /**************************************************************************** Basic functions ****************************************************************************/ +enum tvp5150_input { + TVP5150_ANALOG_CH0 = 0, + TVP5150_SVIDEO = 1, + TVP5150_ANALOG_CH1 = 2, + TVP5150_BLACK_SCREEN = 8 +}; -static inline void tvp5150_selmux(struct i2c_client *c) +static inline void tvp5150_selmux(struct i2c_client *c, + enum tvp5150_input input) { int opmode=0; + struct tvp5150 *decoder = i2c_get_clientdata(c); - int input = 0; - if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable) - input = 8; + if (!decoder->enable) + input |= TVP5150_BLACK_SCREEN; switch (input) { - case TVP5150_COMPOSITE1: - input |= 2; - /* fall through */ - case TVP5150_COMPOSITE0: + case TVP5150_ANALOG_CH0: + case TVP5150_ANALOG_CH1: opmode=0x30; /* TV Mode */ break; - case TVP5150_SVIDEO: default: - input |= 1; opmode=0; /* Auto Mode */ break; } @@ -788,7 +790,7 @@ static inline void tvp5150_reset(struct i2c_client *c) tvp5150_vdp_init(c, vbi_ram_default); /* Selects decoder input */ - tvp5150_selmux(c); + tvp5150_selmux(c, decoder->input); /* Initializes TVP5150 to stream enabled values */ tvp5150_write_inittab(c, tvp5150_init_enable); @@ -858,21 +860,6 @@ static int tvp5150_command(struct i2c_client *c, case VIDIOC_INT_RESET: tvp5150_reset(c); break; - case VIDIOC_INT_G_VIDEO_ROUTING: - { - struct v4l2_routing *route = arg; - - *route = decoder->route; - break; - } - case VIDIOC_INT_S_VIDEO_ROUTING: - { - struct v4l2_routing *route = arg; - - decoder->route = *route; - tvp5150_selmux(c); - break; - } case VIDIOC_S_STD: if (decoder->norm == *(v4l2_std_id *)arg) break; @@ -1076,7 +1063,7 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, rv = i2c_attach_client(c); core->norm = V4L2_STD_ALL; /* Default is autodetect */ - core->route.input = TVP5150_COMPOSITE1; + core->input = 2; core->enable = 1; core->bright = 32768; core->contrast = 32768; diff --git a/drivers/media/video/usbvideo/Kconfig b/drivers/media/video/usbvideo/Kconfig index a0fd82b92..39269a2c5 100644 --- a/drivers/media/video/usbvideo/Kconfig +++ b/drivers/media/video/usbvideo/Kconfig @@ -3,7 +3,7 @@ config VIDEO_USBVIDEO config USB_VICAM tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)" - depends on USB && VIDEO_DEV && VIDEO_V4L1 && EXPERIMENTAL + depends on USB && VIDEO_V4L1 && EXPERIMENTAL select VIDEO_USBVIDEO ---help--- Say Y here if you have 3com homeconnect camera (vicam). @@ -13,7 +13,7 @@ config USB_VICAM config USB_IBMCAM tristate "USB IBM (Xirlink) C-it Camera support" - depends on USB && VIDEO_DEV && VIDEO_V4L1 + depends on USB && VIDEO_V4L1 select VIDEO_USBVIDEO ---help--- Say Y here if you want to connect a IBM "C-It" camera, also known as @@ -28,7 +28,7 @@ config USB_IBMCAM config USB_KONICAWC tristate "USB Konica Webcam support" - depends on USB && VIDEO_DEV && VIDEO_V4L1 + depends on USB && VIDEO_V4L1 select VIDEO_USBVIDEO ---help--- Say Y here if you want support for webcams based on a Konica @@ -36,15 +36,3 @@ config USB_KONICAWC To compile this driver as a module, choose M here: the module will be called konicawc. - -config USB_QUICKCAM_MESSENGER - tristate "USB Logitech Quickcam Messenger" - depends on USB && VIDEO_DEV && VIDEO_V4L1 - select VIDEO_USBVIDEO - ---help--- - Say Y or M here to enable support for the USB Logitech Quickcam - Messenger webcam. - - To compile this driver as a module, choose M here: the - module will be called quickcam_messenger. - diff --git a/drivers/media/video/usbvideo/Makefile b/drivers/media/video/usbvideo/Makefile index 4a1b144be..bb52eb8dc 100644 --- a/drivers/media/video/usbvideo/Makefile +++ b/drivers/media/video/usbvideo/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_VIDEO_USBVIDEO) += usbvideo.o obj-$(CONFIG_USB_IBMCAM) += ibmcam.o ultracam.o obj-$(CONFIG_USB_KONICAWC) += konicawc.o obj-$(CONFIG_USB_VICAM) += vicam.o -obj-$(CONFIG_USB_QUICKCAM_MESSENGER) += quickcam_messenger.o diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c index 6f31ecc88..c11f5d46b 100644 --- a/drivers/media/video/usbvideo/konicawc.c +++ b/drivers/media/video/usbvideo/konicawc.c @@ -15,7 +15,8 @@ #include #include #include -#include +#include +#include #include "usbvideo.h" diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c deleted file mode 100644 index 56e01b622..000000000 --- a/drivers/media/video/usbvideo/quickcam_messenger.c +++ /dev/null @@ -1,1120 +0,0 @@ -/* - * Driver for Logitech Quickcam Messenger usb video camera - * Copyright (C) Jaya Kumar - * - * This work was sponsored by CIS(M) Sdn Bhd. - * History: - * 05/08/2006 - Jaya Kumar - * I wrote this based on the konicawc by Simon Evans. - * - - * Full credit for reverse engineering and creating an initial - * working linux driver for the VV6422 goes to the qce-ga project by - * Tuukka Toivonen, Jochen Hoenicke, Peter McConnell, - * Cristiano De Michele, Georg Acher, Jean-Frederic Clere as well as - * others. - * --- - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include - -#include "usbvideo.h" -#include "quickcam_messenger.h" - -/* - * Version Information - */ - -#ifdef CONFIG_USB_DEBUG -static int debug; -#define DEBUG(n, format, arg...) \ - if (n <= debug) { \ - printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __FUNCTION__ , ## arg); \ - } -#else -#define DEBUG(n, arg...) -static const int debug = 0; -#endif - -#define DRIVER_VERSION "v0.01" -#define DRIVER_DESC "Logitech Quickcam Messenger USB" - -#define USB_LOGITECH_VENDOR_ID 0x046D -#define USB_QCM_PRODUCT_ID 0x08F0 - -#define MAX_CAMERAS 1 - -#define MAX_COLOUR 32768 -#define MAX_HUE 32768 -#define MAX_BRIGHTNESS 32768 -#define MAX_CONTRAST 32768 -#define MAX_WHITENESS 32768 - -static int size = SIZE_320X240; -static int colour = MAX_COLOUR; -static int hue = MAX_HUE; -static int brightness = MAX_BRIGHTNESS; -static int contrast = MAX_CONTRAST; -static int whiteness = MAX_WHITENESS; - -static struct usbvideo *cams; - -static struct usb_device_id qcm_table [] = { - { USB_DEVICE(USB_LOGITECH_VENDOR_ID, USB_QCM_PRODUCT_ID) }, - { } -}; -MODULE_DEVICE_TABLE(usb, qcm_table); - -#ifdef CONFIG_INPUT -static void qcm_register_input(struct qcm *cam, struct usb_device *dev) -{ - struct input_dev *input_dev; - - usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname)); - strncat(cam->input_physname, "/input0", sizeof(cam->input_physname)); - - cam->input = input_dev = input_allocate_device(); - if (!input_dev) { - warn("insufficient mem for cam input device"); - return; - } - - input_dev->name = "QCM button"; - input_dev->phys = cam->input_physname; - usb_to_input_id(dev, &input_dev->id); - input_dev->cdev.dev = &dev->dev; - - input_dev->evbit[0] = BIT(EV_KEY); - input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0); - - input_dev->private = cam; - - input_register_device(cam->input); -} - -static void qcm_unregister_input(struct qcm *cam) -{ - if (cam->input) { - input_unregister_device(cam->input); - cam->input = NULL; - } -} - -static void qcm_report_buttonstat(struct qcm *cam) -{ - if (cam->input) { - input_report_key(cam->input, BTN_0, cam->button_sts); - input_sync(cam->input); - } -} - -static void qcm_int_irq(struct urb *urb, struct pt_regs *regs) -{ - int ret; - struct uvd *uvd = urb->context; - struct qcm *cam; - - if (!CAMERA_IS_OPERATIONAL(uvd)) - return; - - if (!uvd->streaming) - return; - - uvd->stats.urb_count++; - - if (urb->status < 0) - uvd->stats.iso_err_count++; - else { - if (urb->actual_length > 0 ) { - cam = (struct qcm *) uvd->user_data; - if (cam->button_sts_buf == 0x88) - cam->button_sts = 0x0; - else if (cam->button_sts_buf == 0x80) - cam->button_sts = 0x1; - qcm_report_buttonstat(cam); - } - } - - ret = usb_submit_urb(urb, GFP_ATOMIC); - if (ret < 0) - err("usb_submit_urb error (%d)", ret); -} - -static int qcm_setup_input_int(struct qcm *cam, struct uvd *uvd) -{ - int errflag; - usb_fill_int_urb(cam->button_urb, uvd->dev, - usb_rcvintpipe(uvd->dev, uvd->video_endp + 1), - &cam->button_sts_buf, - 1, - qcm_int_irq, - uvd, 16); - - errflag = usb_submit_urb(cam->button_urb, GFP_KERNEL); - if (errflag) - err ("usb_submit_int ret %d", errflag); - return errflag; -} - -static void qcm_stop_int_data(struct qcm *cam) -{ - usb_kill_urb(cam->button_urb); -} - -static int qcm_alloc_int_urb(struct qcm *cam) -{ - cam->button_urb = usb_alloc_urb(0, GFP_KERNEL); - - if (!cam->button_urb) - return -ENOMEM; - - return 0; -} - -static void qcm_free_int(struct qcm *cam) -{ - if (cam->button_urb) - usb_free_urb(cam->button_urb); -} -#endif /* CONFIG_INPUT */ - -static int qcm_stv_setb(struct usb_device *dev, u16 reg, u8 val) -{ - int ret; - - /* we'll wait up to 3 slices but no more */ - ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), - 0x04, USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, - reg, 0, &val, 1, 3*HZ); - return ret; -} - -static int qcm_stv_setw(struct usb_device *dev, u16 reg, u16 val) -{ - int ret; - - /* we'll wait up to 3 slices but no more */ - ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), - 0x04, USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, - reg, 0, &val, 2, 3*HZ); - return ret; -} - -static int qcm_stv_getw(struct usb_device *dev, unsigned short reg, - __le16 *val) -{ - int ret; - - /* we'll wait up to 3 slices but no more */ - ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - 0x04, USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_DEVICE, - reg, 0, val, 2, 3*HZ); - return ret; -} - -static int qcm_camera_on(struct uvd *uvd) -{ - int ret; - CHECK_RET(ret, qcm_stv_setb(uvd->dev, STV_ISO_ENABLE, 0x01)); - return 0; -} - -static int qcm_camera_off(struct uvd *uvd) -{ - int ret; - CHECK_RET(ret, qcm_stv_setb(uvd->dev, STV_ISO_ENABLE, 0x00)); - return 0; -} - -static void qcm_hsv2rgb(u16 hue, u16 sat, u16 val, u16 *r, u16 *g, u16 *b) -{ - unsigned int segment, valsat; - signed int h = (signed int) hue; - unsigned int s = (sat - 32768) * 2; /* rescale */ - unsigned int v = val; - unsigned int p; - - /* - the registers controling gain are 8 bit of which - we affect only the last 4 bits with our gain. - we know that if saturation is 0, (unsaturated) then - we're grayscale (center axis of the colour cone) so - we set rgb=value. we use a formula obtained from - wikipedia to map the cone to the RGB plane. it's - as follows for the human value case of h=0..360, - s=0..1, v=0..1 - h_i = h/60 % 6 , f = h/60 - h_i , p = v(1-s) - q = v(1 - f*s) , t = v(1 - (1-f)s) - h_i==0 => r=v , g=t, b=p - h_i==1 => r=q , g=v, b=p - h_i==2 => r=p , g=v, b=t - h_i==3 => r=p , g=q, b=v - h_i==4 => r=t , g=p, b=v - h_i==5 => r=v , g=p, b=q - the bottom side (the point) and the stuff just up - of that is black so we simplify those two cases. - */ - if (sat < 32768) { - /* anything less than this is unsaturated */ - *r = val; - *g = val; - *b = val; - return; - } - if (val <= (0xFFFF/8)) { - /* anything less than this is black */ - *r = 0; - *g = 0; - *b = 0; - return; - } - - /* the rest of this code is copying tukkat's - implementation of the hsv2rgb conversion as taken - from qc-usb-messenger code. the 10923 is 0xFFFF/6 - to divide the cone into 6 sectors. */ - - segment = (h + 10923) & 0xFFFF; - segment = segment*3 >> 16; /* 0..2: 0=R, 1=G, 2=B */ - hue -= segment * 21845; /* -10923..10923 */ - h = hue; - h *= 3; - valsat = v*s >> 16; /* 0..65534 */ - p = v - valsat; - if (h >= 0) { - unsigned int t = v - (valsat * (32769 - h) >> 15); - switch (segment) { - case 0: /* R-> */ - *r = v; - *g = t; - *b = p; - break; - case 1: /* G-> */ - *r = p; - *g = v; - *b = t; - break; - case 2: /* B-> */ - *r = t; - *g = p; - *b = v; - break; - } - } else { - unsigned int q = v - (valsat * (32769 + h) >> 15); - switch (segment) { - case 0: /* ->R */ - *r = v; - *g = p; - *b = q; - break; - case 1: /* ->G */ - *r = q; - *g = v; - *b = p; - break; - case 2: /* ->B */ - *r = p; - *g = q; - *b = v; - break; - } - } -} - -static int qcm_sensor_set_gains(struct uvd *uvd, u16 hue, - u16 saturation, u16 value) -{ - int ret; - u16 r=0,g=0,b=0; - - /* this code is based on qc-usb-messenger */ - qcm_hsv2rgb(hue, saturation, value, &r, &g, &b); - - r >>= 12; - g >>= 12; - b >>= 12; - - /* min val is 8 */ - r = max((u16) 8, r); - g = max((u16) 8, g); - b = max((u16) 8, b); - - r |= 0x30; - g |= 0x30; - b |= 0x30; - - /* set the r,g,b gain registers */ - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x0509, r)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x050A, g)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x050B, b)); - - /* doing as qc-usb did */ - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x050C, 0x2A)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x050D, 0x01)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x143F, 0x01)); - - return 0; -} - -static int qcm_sensor_set_exposure(struct uvd *uvd, int exposure) -{ - int ret; - int formedval; - - /* calculation was from qc-usb-messenger driver */ - formedval = ( exposure >> 12 ); - - /* max value for formedval is 14 */ - formedval = min(formedval, 14); - - CHECK_RET(ret, qcm_stv_setb(uvd->dev, - 0x143A, 0xF0 | formedval)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x143F, 0x01)); - return 0; -} - -static int qcm_sensor_setlevels(struct uvd *uvd, int brightness, int contrast, - int hue, int colour) -{ - int ret; - /* brightness is exposure, contrast is gain, colour is saturation */ - CHECK_RET(ret, - qcm_sensor_set_exposure(uvd, brightness)); - CHECK_RET(ret, qcm_sensor_set_gains(uvd, hue, colour, contrast)); - - return 0; -} - -static int qcm_sensor_setsize(struct uvd *uvd, u8 size) -{ - int ret; - - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x1505, size)); - return 0; -} - -static int qcm_sensor_set_shutter(struct uvd *uvd, int whiteness) -{ - int ret; - /* some rescaling as done by the qc-usb-messenger code */ - if (whiteness > 0xC000) - whiteness = 0xC000 + (whiteness & 0x3FFF)*8; - - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x143D, - (whiteness >> 8) & 0xFF)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x143E, - (whiteness >> 16) & 0x03)); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x143F, 0x01)); - - return 0; -} - -static int qcm_sensor_init(struct uvd *uvd) -{ - struct qcm *cam = (struct qcm *) uvd->user_data; - int ret; - int i; - - for (i=0; i < sizeof(regval_table)/sizeof(regval_table[0]) ; i++) { - CHECK_RET(ret, qcm_stv_setb(uvd->dev, - regval_table[i].reg, - regval_table[i].val)); - } - - CHECK_RET(ret, qcm_stv_setw(uvd->dev, 0x15c1, - cpu_to_le16(ISOC_PACKET_SIZE))); - CHECK_RET(ret, qcm_stv_setb(uvd->dev, 0x15c3, 0x08)); - CHECK_RET(ret, ret = qcm_stv_setb(uvd->dev, 0x143f, 0x01)); - - CHECK_RET(ret, qcm_stv_setb(uvd->dev, STV_ISO_ENABLE, 0x00)); - - CHECK_RET(ret, qcm_sensor_setsize(uvd, camera_sizes[cam->size].cmd)); - - CHECK_RET(ret, qcm_sensor_setlevels(uvd, uvd->vpic.brightness, - uvd->vpic.contrast, uvd->vpic.hue, uvd->vpic.colour)); - - CHECK_RET(ret, qcm_sensor_set_shutter(uvd, uvd->vpic.whiteness)); - CHECK_RET(ret, qcm_sensor_setsize(uvd, camera_sizes[cam->size].cmd)); - - return 0; -} - -static int qcm_set_camera_size(struct uvd *uvd) -{ - int ret; - struct qcm *cam = (struct qcm *) uvd->user_data; - - CHECK_RET(ret, qcm_sensor_setsize(uvd, camera_sizes[cam->size].cmd)); - cam->width = camera_sizes[cam->size].width; - cam->height = camera_sizes[cam->size].height; - uvd->videosize = VIDEOSIZE(cam->width, cam->height); - - return 0; -} - -static int qcm_setup_on_open(struct uvd *uvd) -{ - int ret; - - CHECK_RET(ret, qcm_sensor_set_gains(uvd, uvd->vpic.hue, - uvd->vpic.colour, uvd->vpic.contrast)); - CHECK_RET(ret, qcm_sensor_set_exposure(uvd, uvd->vpic.brightness)); - CHECK_RET(ret, qcm_sensor_set_shutter(uvd, uvd->vpic.whiteness)); - CHECK_RET(ret, qcm_set_camera_size(uvd)); - CHECK_RET(ret, qcm_camera_on(uvd)); - return 0; -} - -static void qcm_adjust_picture(struct uvd *uvd) -{ - int ret; - struct qcm *cam = (struct qcm *) uvd->user_data; - - ret = qcm_camera_off(uvd); - if (ret) { - err("can't turn camera off. abandoning pic adjustment"); - return; - } - - /* if there's been a change in contrast, hue, or - colour then we need to recalculate hsv in order - to update gains */ - if ((cam->contrast != uvd->vpic.contrast) || - (cam->hue != uvd->vpic.hue) || - (cam->colour != uvd->vpic.colour)) { - cam->contrast = uvd->vpic.contrast; - cam->hue = uvd->vpic.hue; - cam->colour = uvd->vpic.colour; - ret = qcm_sensor_set_gains(uvd, cam->hue, cam->colour, - cam->contrast); - if (ret) { - err("can't set gains. abandoning pic adjustment"); - return; - } - } - - if (cam->brightness != uvd->vpic.brightness) { - cam->brightness = uvd->vpic.brightness; - ret = qcm_sensor_set_exposure(uvd, cam->brightness); - if (ret) { - err("can't set exposure. abandoning pic adjustment"); - return; - } - } - - if (cam->whiteness != uvd->vpic.whiteness) { - cam->whiteness = uvd->vpic.whiteness; - qcm_sensor_set_shutter(uvd, cam->whiteness); - if (ret) { - err("can't set shutter. abandoning pic adjustment"); - return; - } - } - - ret = qcm_camera_on(uvd); - if (ret) { - err("can't reenable camera. pic adjustment failed"); - return; - } -} - -static int qcm_process_frame(struct uvd *uvd, u8 *cdata, int framelen) -{ - int datalen; - int totaldata; - struct framehdr { - __be16 id; - __be16 len; - }; - struct framehdr *fhdr; - - totaldata = 0; - while (framelen) { - fhdr = (struct framehdr *) cdata; - datalen = be16_to_cpu(fhdr->len); - framelen -= 4; - cdata += 4; - - if ((fhdr->id) == cpu_to_be16(0x8001)) { - RingQueue_Enqueue(&uvd->dp, marker, 4); - totaldata += 4; - continue; - } - if ((fhdr->id & cpu_to_be16(0xFF00)) == cpu_to_be16(0x0200)) { - RingQueue_Enqueue(&uvd->dp, cdata, datalen); - totaldata += datalen; - } - framelen -= datalen; - cdata += datalen; - } - return totaldata; -} - -static int qcm_compress_iso(struct uvd *uvd, struct urb *dataurb) -{ - int totlen; - int i; - unsigned char *cdata; - - totlen=0; - for (i = 0; i < dataurb->number_of_packets; i++) { - int n = dataurb->iso_frame_desc[i].actual_length; - int st = dataurb->iso_frame_desc[i].status; - - cdata = dataurb->transfer_buffer + - dataurb->iso_frame_desc[i].offset; - - if (st < 0) { - warn("Data error: packet=%d. len=%d. status=%d.", - i, n, st); - uvd->stats.iso_err_count++; - continue; - } - if (!n) - continue; - - totlen += qcm_process_frame(uvd, cdata, n); - } - return totlen; -} - -static void resubmit_urb(struct uvd *uvd, struct urb *urb) -{ - int ret; - - urb->dev = uvd->dev; - ret = usb_submit_urb(urb, GFP_ATOMIC); - if (ret) - err("usb_submit_urb error (%d)", ret); -} - -static void qcm_isoc_irq(struct urb *urb, struct pt_regs *regs) -{ - int len; - struct uvd *uvd = urb->context; - - if (!CAMERA_IS_OPERATIONAL(uvd)) - return; - - if (!uvd->streaming) - return; - - uvd->stats.urb_count++; - - if (!urb->actual_length) { - resubmit_urb(uvd, urb); - return; - } - - len = qcm_compress_iso(uvd, urb); - resubmit_urb(uvd, urb); - uvd->stats.urb_length = len; - uvd->stats.data_count += len; - if (len) - RingQueue_WakeUpInterruptible(&uvd->dp); -} - -static int qcm_start_data(struct uvd *uvd) -{ - struct qcm *cam = (struct qcm *) uvd->user_data; - int i; - int errflag; - int pktsz; - int err; - - pktsz = uvd->iso_packet_len; - if (!CAMERA_IS_OPERATIONAL(uvd)) { - err("Camera is not operational"); - return -EFAULT; - } - - err = usb_set_interface(uvd->dev, uvd->iface, uvd->ifaceAltActive); - if (err < 0) { - err("usb_set_interface error"); - uvd->last_error = err; - return -EBUSY; - } - - for (i=0; i < USBVIDEO_NUMSBUF; i++) { - int j, k; - struct urb *urb = uvd->sbuf[i].urb; - urb->dev = uvd->dev; - urb->context = uvd; - urb->pipe = usb_rcvisocpipe(uvd->dev, uvd->video_endp); - urb->interval = 1; - urb->transfer_flags = URB_ISO_ASAP; - urb->transfer_buffer = uvd->sbuf[i].data; - urb->complete = qcm_isoc_irq; - urb->number_of_packets = FRAMES_PER_DESC; - urb->transfer_buffer_length = pktsz * FRAMES_PER_DESC; - for (j=k=0; j < FRAMES_PER_DESC; j++, k += pktsz) { - urb->iso_frame_desc[j].offset = k; - urb->iso_frame_desc[j].length = pktsz; - } - } - - uvd->streaming = 1; - uvd->curframe = -1; - for (i=0; i < USBVIDEO_NUMSBUF; i++) { - errflag = usb_submit_urb(uvd->sbuf[i].urb, GFP_KERNEL); - if (errflag) - err ("usb_submit_isoc(%d) ret %d", i, errflag); - } - - CHECK_RET(err, qcm_setup_input_int(cam, uvd)); - CHECK_RET(err, qcm_camera_on(uvd)); - return 0; -} - -static void qcm_stop_data(struct uvd *uvd) -{ - struct qcm *cam = (struct qcm *) uvd->user_data; - int i, j; - int ret; - - if ((uvd == NULL) || (!uvd->streaming) || (uvd->dev == NULL)) - return; - - ret = qcm_camera_off(uvd); - if (ret) - warn("couldn't turn the cam off."); - - uvd->streaming = 0; - - /* Unschedule all of the iso td's */ - for (i=0; i < USBVIDEO_NUMSBUF; i++) - usb_kill_urb(uvd->sbuf[i].urb); - - qcm_stop_int_data(cam); - - if (!uvd->remove_pending) { - /* Set packet size to 0 */ - j = usb_set_interface(uvd->dev, uvd->iface, - uvd->ifaceAltInactive); - if (j < 0) { - err("usb_set_interface() error %d.", j); - uvd->last_error = j; - } - } -} - -static void qcm_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) -{ - struct qcm *cam = (struct qcm *) uvd->user_data; - int x; - struct rgb *rgbL0; - struct rgb *rgbL1; - struct bayL0 *bayL0; - struct bayL1 *bayL1; - int hor,ver,hordel,verdel; - assert(frame != NULL); - - switch (cam->size) { - case SIZE_160X120: - hor = 162; ver = 124; hordel = 1; verdel = 2; - break; - case SIZE_320X240: - default: - hor = 324; ver = 248; hordel = 2; verdel = 4; - break; - } - - if (frame->scanstate == ScanState_Scanning) { - while (RingQueue_GetLength(&uvd->dp) >= - 4 + (hor*verdel + hordel)) { - if ((RING_QUEUE_PEEK(&uvd->dp, 0) == 0x00) && - (RING_QUEUE_PEEK(&uvd->dp, 1) == 0xff) && - (RING_QUEUE_PEEK(&uvd->dp, 2) == 0x00) && - (RING_QUEUE_PEEK(&uvd->dp, 3) == 0xff)) { - frame->curline = 0; - frame->scanstate = ScanState_Lines; - frame->frameState = FrameState_Grabbing; - RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 4); - /* - * if we're starting, we need to discard the first - * 4 lines of y bayer data - * and the first 2 gr elements of x bayer data - */ - RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, - (hor*verdel + hordel)); - break; - } - RING_QUEUE_DEQUEUE_BYTES(&uvd->dp, 1); - } - } - - if (frame->scanstate == ScanState_Scanning) - return; - - /* now we can start processing bayer data so long as we have at least - * 2 lines worth of data. this is the simplest demosaicing method that - * I could think of. I use each 2x2 bayer element without interpolation - * to generate 4 rgb pixels. - */ - while ( frame->curline < cam->height && - (RingQueue_GetLength(&uvd->dp) >= hor*2)) { - /* get 2 lines of bayer for demosaicing - * into 2 lines of RGB */ - RingQueue_Dequeue(&uvd->dp, cam->scratch, hor*2); - bayL0 = (struct bayL0 *) cam->scratch; - bayL1 = (struct bayL1 *) (cam->scratch + hor); - /* frame->curline is the rgb y line */ - rgbL0 = (struct rgb *) - ( frame->data + (cam->width*3*frame->curline)); - /* w/2 because we're already doing 2 pixels */ - rgbL1 = rgbL0 + (cam->width/2); - - for (x=0; x < cam->width; x+=2) { - rgbL0->r = bayL0->r; - rgbL0->g = bayL0->g; - rgbL0->b = bayL1->b; - - rgbL0->r2 = bayL0->r; - rgbL0->g2 = bayL1->g; - rgbL0->b2 = bayL1->b; - - rgbL1->r = bayL0->r; - rgbL1->g = bayL1->g; - rgbL1->b = bayL1->b; - - rgbL1->r2 = bayL0->r; - rgbL1->g2 = bayL1->g; - rgbL1->b2 = bayL1->b; - - rgbL0++; - rgbL1++; - - bayL0++; - bayL1++; - } - - frame->seqRead_Length += cam->width*3*2; - frame->curline += 2; - } - /* See if we filled the frame */ - if (frame->curline == cam->height) { - frame->frameState = FrameState_Done_Hold; - frame->curline = 0; - uvd->curframe = -1; - uvd->stats.frame_num++; - } -} - -/* taken from konicawc */ -static int qcm_set_video_mode(struct uvd *uvd, struct video_window *vw) -{ - int ret; - int newsize; - int oldsize; - int x = vw->width; - int y = vw->height; - struct qcm *cam = (struct qcm *) uvd->user_data; - - if (x > 0 && y > 0) { - DEBUG(2, "trying to find size %d,%d", x, y); - for (newsize = 0; newsize <= MAX_FRAME_SIZE; newsize++) { - if ((camera_sizes[newsize].width == x) && - (camera_sizes[newsize].height == y)) - break; - } - } else - newsize = cam->size; - - if (newsize > MAX_FRAME_SIZE) { - DEBUG(1, "couldn't find size %d,%d", x, y); - return -EINVAL; - } - - if (newsize == cam->size) { - DEBUG(1, "Nothing to do"); - return 0; - } - - qcm_stop_data(uvd); - - if (cam->size != newsize) { - oldsize = cam->size; - cam->size = newsize; - ret = qcm_set_camera_size(uvd); - if (ret) { - err("Couldn't set camera size, err=%d",ret); - /* restore the original size */ - cam->size = oldsize; - return ret; - } - } - - /* Flush the input queue and clear any current frame in progress */ - - RingQueue_Flush(&uvd->dp); - if (uvd->curframe != -1) { - uvd->frame[uvd->curframe].curline = 0; - uvd->frame[uvd->curframe].seqRead_Length = 0; - uvd->frame[uvd->curframe].seqRead_Index = 0; - } - - CHECK_RET(ret, qcm_start_data(uvd)); - return 0; -} - -static int qcm_configure_video(struct uvd *uvd) -{ - int ret; - memset(&uvd->vpic, 0, sizeof(uvd->vpic)); - memset(&uvd->vpic_old, 0x55, sizeof(uvd->vpic_old)); - - uvd->vpic.colour = colour; - uvd->vpic.hue = hue; - uvd->vpic.brightness = brightness; - uvd->vpic.contrast = contrast; - uvd->vpic.whiteness = whiteness; - uvd->vpic.depth = 24; - uvd->vpic.palette = VIDEO_PALETTE_RGB24; - - memset(&uvd->vcap, 0, sizeof(uvd->vcap)); - strcpy(uvd->vcap.name, "QCM USB Camera"); - uvd->vcap.type = VID_TYPE_CAPTURE; - uvd->vcap.channels = 1; - uvd->vcap.audios = 0; - - uvd->vcap.minwidth = camera_sizes[SIZE_160X120].width; - uvd->vcap.minheight = camera_sizes[SIZE_160X120].height; - uvd->vcap.maxwidth = camera_sizes[SIZE_320X240].width; - uvd->vcap.maxheight = camera_sizes[SIZE_320X240].height; - - memset(&uvd->vchan, 0, sizeof(uvd->vchan)); - uvd->vchan.flags = 0 ; - uvd->vchan.tuners = 0; - uvd->vchan.channel = 0; - uvd->vchan.type = VIDEO_TYPE_CAMERA; - strcpy(uvd->vchan.name, "Camera"); - - CHECK_RET(ret, qcm_sensor_init(uvd)); - return 0; -} - -static int qcm_probe(struct usb_interface *intf, - const struct usb_device_id *devid) -{ - int err; - struct uvd *uvd; - struct usb_device *dev = interface_to_usbdev(intf); - struct qcm *cam; - size_t buffer_size; - unsigned char video_ep; - struct usb_host_interface *interface; - struct usb_endpoint_descriptor *endpoint; - int i,j; - unsigned int ifacenum, ifacenum_inact=0; - __le16 sensor_id; - - /* we don't support multiconfig cams */ - if (dev->descriptor.bNumConfigurations != 1) - return -ENODEV; - - /* first check for the video interface and not - * the audio interface */ - interface = &intf->cur_altsetting[0]; - if ((interface->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC) - || (interface->desc.bInterfaceSubClass != - USB_CLASS_VENDOR_SPEC)) - return -ENODEV; - - /* - walk through each endpoint in each setting in the interface - stop when we find the one that's an isochronous IN endpoint. - */ - for (i=0; i < intf->num_altsetting; i++) { - interface = &intf->cur_altsetting[i]; - ifacenum = interface->desc.bAlternateSetting; - /* walk the end points */ - for (j=0; j < interface->desc.bNumEndpoints; j++) { - endpoint = &interface->endpoint[j].desc; - - if ((endpoint->bEndpointAddress & - USB_ENDPOINT_DIR_MASK) != USB_DIR_IN) - continue; /* not input then not good */ - - buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); - if (!buffer_size) { - ifacenum_inact = ifacenum; - continue; /* 0 pkt size is not what we want */ - } - - if ((endpoint->bmAttributes & - USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_ISOC) { - video_ep = endpoint->bEndpointAddress; - /* break out of the search */ - goto good_videoep; - } - } - } - /* failed out since nothing useful was found */ - err("No suitable endpoint was found\n"); - return -ENODEV; - -good_videoep: - /* disable isochronous stream before doing anything else */ - err = qcm_stv_setb(dev, STV_ISO_ENABLE, 0); - if (err < 0) { - err("Failed to disable sensor stream"); - return -EIO; - } - - /* - Check that this is the same unknown sensor that is known to work. This - sensor is suspected to be the ST VV6422C001. I'll check the same value - that the qc-usb driver checks. This value is probably not even the - sensor ID since it matches the USB dev ID. Oh well. If it doesn't - match, it's probably a diff sensor so exit and apologize. - */ - err = qcm_stv_getw(dev, CMOS_SENSOR_IDREV, &sensor_id); - if (err < 0) { - err("Couldn't read sensor values. Err %d\n",err); - return err; - } - if (sensor_id != cpu_to_le16(0x08F0)) { - err("Sensor ID %x != %x. Unsupported. Sorry\n", - le16_to_cpu(sensor_id), (0x08F0)); - return -ENODEV; - } - - uvd = usbvideo_AllocateDevice(cams); - if (!uvd) - return -ENOMEM; - - cam = (struct qcm *) uvd->user_data; - - /* buf for doing demosaicing */ - cam->scratch = kmalloc(324*2, GFP_KERNEL); - if (!cam->scratch) /* uvd freed in dereg */ - return -ENOMEM; - - /* yes, if we fail after here, cam->scratch gets freed - by qcm_free_uvd */ - - err = qcm_alloc_int_urb(cam); - if (err < 0) - return err; - - /* yes, if we fail after here, int urb gets freed - by qcm_free_uvd */ - - RESTRICT_TO_RANGE(size, SIZE_160X120, SIZE_320X240); - cam->width = camera_sizes[size].width; - cam->height = camera_sizes[size].height; - cam->size = size; - - uvd->debug = debug; - uvd->flags = 0; - uvd->dev = dev; - uvd->iface = intf->altsetting->desc.bInterfaceNumber; - uvd->ifaceAltActive = ifacenum; - uvd->ifaceAltInactive = ifacenum_inact; - uvd->video_endp = video_ep; - uvd->iso_packet_len = buffer_size; - uvd->paletteBits = 1L << VIDEO_PALETTE_RGB24; - uvd->defaultPalette = VIDEO_PALETTE_RGB24; - uvd->canvas = VIDEOSIZE(320, 240); - uvd->videosize = VIDEOSIZE(cam->width, cam->height); - err = qcm_configure_video(uvd); - if (err) { - err("failed to configure video settings"); - return err; - } - - err = usbvideo_RegisterVideoDevice(uvd); - if (err) { /* the uvd gets freed in Deregister */ - err("usbvideo_RegisterVideoDevice() failed."); - return err; - } - - uvd->max_frame_size = (320 * 240 * 3); - qcm_register_input(cam, dev); - usb_set_intfdata(intf, uvd); - return 0; -} - -static void qcm_free_uvd(struct uvd *uvd) -{ - struct qcm *cam = (struct qcm *) uvd->user_data; - - kfree(cam->scratch); - qcm_unregister_input(cam); - qcm_free_int(cam); -} - -static struct usbvideo_cb qcm_driver = { - .probe = qcm_probe, - .setupOnOpen = qcm_setup_on_open, - .processData = qcm_process_isoc, - .setVideoMode = qcm_set_video_mode, - .startDataPump = qcm_start_data, - .stopDataPump = qcm_stop_data, - .adjustPicture = qcm_adjust_picture, - .userFree = qcm_free_uvd -}; - -static int __init qcm_init(void) -{ - info(DRIVER_DESC " " DRIVER_VERSION); - - return usbvideo_register( - &cams, - MAX_CAMERAS, - sizeof(struct qcm), - "QCM", - &qcm_driver, - THIS_MODULE, - qcm_table); -} - -static void __exit qcm_exit(void) -{ - usbvideo_Deregister(&cams); -} - -module_param(size, int, 0); -MODULE_PARM_DESC(size, "Initial Size 0: 160x120 1: 320x240"); -module_param(colour, int, 0); -MODULE_PARM_DESC(colour, "Initial colour"); -module_param(hue, int, 0); -MODULE_PARM_DESC(hue, "Initial hue"); -module_param(brightness, int, 0); -MODULE_PARM_DESC(brightness, "Initial brightness"); -module_param(contrast, int, 0); -MODULE_PARM_DESC(contrast, "Initial contrast"); -module_param(whiteness, int, 0); -MODULE_PARM_DESC(whiteness, "Initial whiteness"); - -#ifdef CONFIG_USB_DEBUG -module_param(debug, int, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(debug, "Debug level: 0-9 (default=0)"); -#endif - -module_init(qcm_init); -module_exit(qcm_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Jaya Kumar"); -MODULE_DESCRIPTION("QCM USB Camera"); -MODULE_SUPPORTED_DEVICE("QCM USB Camera"); diff --git a/drivers/media/video/usbvideo/quickcam_messenger.h b/drivers/media/video/usbvideo/quickcam_messenger.h deleted file mode 100644 index baab9c081..000000000 --- a/drivers/media/video/usbvideo/quickcam_messenger.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef quickcam_messenger_h -#define quickcam_messenger_h - -#ifndef CONFIG_INPUT -/* if we're not using input we dummy out these functions */ -#define qcm_register_input(...) -#define qcm_unregister_input(...) -#define qcm_report_buttonstat(...) -#define qcm_setup_input_int(...) 0 -#define qcm_stop_int_data(...) -#define qcm_alloc_int_urb(...) 0 -#define qcm_free_int(...) -#endif - - -#define CHECK_RET(ret, expr) \ - if ((ret = expr) < 0) return ret - -/* Control Registers for the STVV6422 ASIC - * - this define is taken from the qc-usb-messenger code - */ -#define STV_ISO_ENABLE 0x1440 -#define ISOC_PACKET_SIZE 1023 - -/* Chip identification number including revision indicator */ -#define CMOS_SENSOR_IDREV 0xE00A - -struct rgb { - u8 b; - u8 g; - u8 r; - u8 b2; - u8 g2; - u8 r2; -}; - -struct bayL0 { -#ifdef __BIG_ENDIAN - u8 r; - u8 g; -#elif __LITTLE_ENDIAN - u8 g; - u8 r; -#else -#error not byte order defined -#endif -}; - -struct bayL1 { -#ifdef __BIG_ENDIAN - u8 g; - u8 b; -#elif __LITTLE_ENDIAN - u8 b; - u8 g; -#else -#error not byte order defined -#endif -}; - -struct cam_size { - u16 width; - u16 height; - u8 cmd; -}; - -static const struct cam_size camera_sizes[] = { - { 160, 120, 0xf }, - { 320, 240, 0x2 }, -}; - -enum frame_sizes { - SIZE_160X120 = 0, - SIZE_320X240 = 1, -}; - -#define MAX_FRAME_SIZE SIZE_320X240 - -struct qcm { - u16 colour; - u16 hue; - u16 brightness; - u16 contrast; - u16 whiteness; - - u8 size; - int height; - int width; - u8 *scratch; - struct urb *button_urb; - u8 button_sts; - u8 button_sts_buf; - -#ifdef CONFIG_INPUT - struct input_dev *input; - char input_physname[64]; -#endif -}; - -struct regval { - u16 reg; - u8 val; -}; -/* this table is derived from the -qc-usb-messenger code */ -static const struct regval regval_table[] = { - { STV_ISO_ENABLE, 0x00 }, - { 0x1436, 0x00 }, { 0x1432, 0x03 }, - { 0x143a, 0xF9 }, { 0x0509, 0x38 }, - { 0x050a, 0x38 }, { 0x050b, 0x38 }, - { 0x050c, 0x2A }, { 0x050d, 0x01 }, - { 0x1431, 0x00 }, { 0x1433, 0x34 }, - { 0x1438, 0x18 }, { 0x1439, 0x00 }, - { 0x143b, 0x05 }, { 0x143c, 0x00 }, - { 0x143e, 0x01 }, { 0x143d, 0x00 }, - { 0x1442, 0xe2 }, { 0x1500, 0xd0 }, - { 0x1500, 0xd0 }, { 0x1500, 0x50 }, - { 0x1501, 0xaf }, { 0x1502, 0xc2 }, - { 0x1503, 0x45 }, { 0x1505, 0x02 }, - { 0x150e, 0x8e }, { 0x150f, 0x37 }, - { 0x15c0, 0x00 }, -}; - -static const unsigned char marker[] = { 0x00, 0xff, 0x00, 0xFF }; - -#endif /* quickcam_messenger_h */ diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h index 051775d4c..3cbf4fc49 100644 --- a/drivers/media/video/usbvideo/usbvideo.h +++ b/drivers/media/video/usbvideo/usbvideo.h @@ -16,8 +16,8 @@ #ifndef usbvideo_h #define usbvideo_h +#include #include -#include #include #include diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index d7c3fcbc8..474a29bc1 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c @@ -16,6 +16,7 @@ * */ +#include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include #include @@ -599,10 +599,6 @@ v4l_compat_translate_ioctl(struct inode *inode, dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); break; } - - pict->depth = ((fmt2->fmt.pix.bytesperline<<3) - + (fmt2->fmt.pix.width-1) ) - /fmt2->fmt.pix.width; pict->palette = pixelformat_to_palette( fmt2->fmt.pix.pixelformat); break; diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 8d972ffda..d330fa985 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c @@ -44,6 +44,7 @@ * Added Gerd Knorrs v4l1 enhancements (Justin Schoeman) */ +#include #include #include #include @@ -58,7 +59,6 @@ #include #include #include -#define __OLD_VIDIOC_ /* To allow fixing old calls*/ #include #ifdef CONFIG_KMOD @@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = { /* ------------------------------------------------------------------ */ /* debug help functions */ -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_V4L1 static const char *v4l1_ioctls[] = { [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", @@ -293,15 +293,12 @@ static const char *v4l2_ioctls[] = { #if 1 [_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP", #endif - [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS", - [_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS", - [_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS", - [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS" + [_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS" }; #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) static const char *v4l2_int_ioctls[] = { -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_VIDEO_DECODER [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", @@ -334,8 +331,7 @@ static const char *v4l2_int_ioctls[] = { [_IOC_NR(VIDIOC_INT_S_AUDIO_ROUTING)] = "VIDIOC_INT_S_AUDIO_ROUTING", [_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)] = "VIDIOC_INT_G_AUDIO_ROUTING", [_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)] = "VIDIOC_INT_S_VIDEO_ROUTING", - [_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING", - [_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)] = "VIDIOC_INT_S_CRYSTAL_FREQ" + [_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING" }; #define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls) @@ -367,7 +363,7 @@ void v4l_printk_ioctl(unsigned int cmd) (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); break; -#ifdef CONFIG_VIDEO_V4L1_COMPAT +#ifdef HAVE_V4L1 case 'v': printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", (_IOC_NR(cmd) < V4L1_IOCTLS) ? @@ -414,7 +410,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) printk ("%s: tuner type=%d\n", s, *p); break; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT case DECODER_SET_VBI_BYPASS: case DECODER_ENABLE_OUTPUT: case DECODER_GET_STATUS: @@ -425,13 +420,10 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) case VIDIOCCAPTURE: case VIDIOCSYNC: case VIDIOCSWRITEMODE: -#endif case TUNER_SET_TYPE_ADDR: case TUNER_SET_STANDBY: case TDA9887_SET_CONFIG: -#ifdef __OLD_VIDIOC_ case VIDIOC_OVERLAY_OLD: -#endif case VIDIOC_STREAMOFF: case VIDIOC_G_OUTPUT: case VIDIOC_S_OUTPUT: @@ -447,9 +439,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) case VIDIOC_G_AUDIO: case VIDIOC_S_AUDIO: case VIDIOC_ENUMAUDIO: -#ifdef __OLD_VIDIOC_ case VIDIOC_G_AUDIO_OLD: -#endif { struct v4l2_audio *p=arg; @@ -460,9 +450,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) case VIDIOC_G_AUDOUT: case VIDIOC_S_AUDOUT: case VIDIOC_ENUMAUDOUT: -#ifdef __OLD_VIDIOC_ case VIDIOC_G_AUDOUT_OLD: -#endif { struct v4l2_audioout *p=arg; printk ("%s: index=%d, name=%s, capability=%d, mode=%d\n", s, @@ -490,9 +478,9 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) prt_names(p->memory,v4l2_memory_names), p->m.userptr); printk ("%s: timecode= %02d:%02d:%02d type=%d, " - "flags=0x%08x, frames=%d, userbits=0x%08x\n", + "flags=0x%08x, frames=%d, userbits=0x%p\n", s,tc->hours,tc->minutes,tc->seconds, - tc->type, tc->flags, tc->frames, *(__u32 *) tc->userbits); + tc->type, tc->flags, tc->frames, tc->userbits); break; } case VIDIOC_QUERYCAP: @@ -507,31 +495,12 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) } case VIDIOC_G_CTRL: case VIDIOC_S_CTRL: -#ifdef __OLD_VIDIOC_ case VIDIOC_S_CTRL_OLD: -#endif { struct v4l2_control *p=arg; printk ("%s: id=%d, value=%d\n", s, p->id, p->value); break; } - case VIDIOC_G_EXT_CTRLS: - case VIDIOC_S_EXT_CTRLS: - case VIDIOC_TRY_EXT_CTRLS: - { - struct v4l2_ext_controls *p = arg; - int i; - - printk("%s: ctrl_class=%d, count=%d\n", s, p->ctrl_class, p->count); - for (i = 0; i < p->count; i++) { - struct v4l2_ext_control *c = &p->controls[i]; - if (cmd == VIDIOC_G_EXT_CTRLS) - printk("%s: id=%d\n", s, c->id); - else - printk("%s: id=%d, value=%d\n", s, c->id, c->value); - } - break; - } case VIDIOC_G_CROP: case VIDIOC_S_CROP: { @@ -541,9 +510,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) break; } case VIDIOC_CROPCAP: -#ifdef __OLD_VIDIOC_ case VIDIOC_CROPCAP_OLD: -#endif { struct v4l2_cropcap *p=arg; /*FIXME: Should also show rect structs */ @@ -700,12 +667,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) printk ("%s: input=0x%x, output=0x%x\n", s, p->input, p->output); break; } - case VIDIOC_INT_S_CRYSTAL_FREQ: - { - struct v4l2_crystal_freq *p=arg; - printk ("%s: freq=%u, flags=0x%x\n", s, p->freq, p->flags); - break; - } case VIDIOC_G_SLICED_VBI_CAP: { struct v4l2_sliced_vbi_cap *p=arg; @@ -735,9 +696,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) } case VIDIOC_G_PARM: case VIDIOC_S_PARM: -#ifdef __OLD_VIDIOC_ case VIDIOC_S_PARM_OLD: -#endif { struct v4l2_streamparm *p=arg; printk ("%s: type=%d\n", s, p->type); @@ -757,7 +716,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) p->afc); break; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT case VIDIOCGVBIFMT: case VIDIOCSVBIFMT: { @@ -927,14 +885,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) p->clipcount); break; } - case VIDIOCGFREQ: - case VIDIOCSFREQ: - { - unsigned long *p=arg; - printk ("%s: value=%lu\n", s, *p); - break; - } -#endif case VIDIOC_INT_AUDIO_CLOCK_FREQ: case VIDIOC_INT_I2S_CLOCK_FREQ: case VIDIOC_INT_S_STANDBY: @@ -944,6 +894,13 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) printk ("%s: value=%d\n", s, *p); break; } + case VIDIOCGFREQ: + case VIDIOCSFREQ: + { + unsigned long *p=arg; + printk ("%s: value=%lu\n", s, *p); + break; + } case VIDIOC_G_STD: case VIDIOC_S_STD: case VIDIOC_QUERYSTD: @@ -958,498 +915,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) /* ----------------------------------------------------------------- */ -/* Helper functions for control handling */ - -/* Check for correctness of the ctrl's value based on the data from - struct v4l2_queryctrl and the available menu items. Note that - menu_items may be NULL, in that case it is ignored. */ -int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, - const char **menu_items) -{ - if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED) - return -EINVAL; - if (qctrl->flags & V4L2_CTRL_FLAG_GRABBED) - return -EBUSY; - if (qctrl->type == V4L2_CTRL_TYPE_BUTTON || - qctrl->type == V4L2_CTRL_TYPE_INTEGER64 || - qctrl->type == V4L2_CTRL_TYPE_CTRL_CLASS) - return 0; - if (ctrl->value < qctrl->minimum || ctrl->value > qctrl->maximum) - return -ERANGE; - if (qctrl->type == V4L2_CTRL_TYPE_MENU && menu_items != NULL) { - if (menu_items[ctrl->value] == NULL || - menu_items[ctrl->value][0] == '\0') - return -EINVAL; - } - return 0; -} - -/* Returns NULL or a character pointer array containing the menu for - the given control ID. The pointer array ends with a NULL pointer. - An empty string signifies a menu entry that is invalid. This allows - drivers to disable certain options if it is not supported. */ -const char **v4l2_ctrl_get_menu(u32 id) -{ - static const char *mpeg_audio_sampling_freq[] = { - "44.1 kHz", - "48 kHz", - "32 kHz", - NULL - }; - static const char *mpeg_audio_encoding[] = { - "Layer I", - "Layer II", - "Layer III", - NULL - }; - static const char *mpeg_audio_l1_bitrate[] = { - "32 kbps", - "64 kbps", - "96 kbps", - "128 kbps", - "160 kbps", - "192 kbps", - "224 kbps", - "256 kbps", - "288 kbps", - "320 kbps", - "352 kbps", - "384 kbps", - "416 kbps", - "448 kbps", - NULL - }; - static const char *mpeg_audio_l2_bitrate[] = { - "32 kbps", - "48 kbps", - "56 kbps", - "64 kbps", - "80 kbps", - "96 kbps", - "112 kbps", - "128 kbps", - "160 kbps", - "192 kbps", - "224 kbps", - "256 kbps", - "320 kbps", - "384 kbps", - NULL - }; - static const char *mpeg_audio_l3_bitrate[] = { - "32 kbps", - "40 kbps", - "48 kbps", - "56 kbps", - "64 kbps", - "80 kbps", - "96 kbps", - "112 kbps", - "128 kbps", - "160 kbps", - "192 kbps", - "224 kbps", - "256 kbps", - "320 kbps", - NULL - }; - static const char *mpeg_audio_mode[] = { - "Stereo", - "Joint Stereo", - "Dual", - "Mono", - NULL - }; - static const char *mpeg_audio_mode_extension[] = { - "Bound 4", - "Bound 8", - "Bound 12", - "Bound 16", - NULL - }; - static const char *mpeg_audio_emphasis[] = { - "No Emphasis", - "50/15 us", - "CCITT J17", - NULL - }; - static const char *mpeg_audio_crc[] = { - "No CRC", - "16-bit CRC", - NULL - }; - static const char *mpeg_video_encoding[] = { - "MPEG-1", - "MPEG-2", - NULL - }; - static const char *mpeg_video_aspect[] = { - "1x1", - "4x3", - "16x9", - "2.21x1", - NULL - }; - static const char *mpeg_video_bitrate_mode[] = { - "Variable Bitrate", - "Constant Bitrate", - NULL - }; - static const char *mpeg_stream_type[] = { - "MPEG-2 Program Stream", - "MPEG-2 Transport Stream", - "MPEG-1 System Stream", - "MPEG-2 DVD-compatible Stream", - "MPEG-1 VCD-compatible Stream", - "MPEG-2 SVCD-compatible Stream", - NULL - }; - static const char *mpeg_stream_vbi_fmt[] = { - "No VBI", - "Private packet, IVTV format", - NULL - }; - - switch (id) { - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - return mpeg_audio_sampling_freq; - case V4L2_CID_MPEG_AUDIO_ENCODING: - return mpeg_audio_encoding; - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: - return mpeg_audio_l1_bitrate; - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - return mpeg_audio_l2_bitrate; - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: - return mpeg_audio_l3_bitrate; - case V4L2_CID_MPEG_AUDIO_MODE: - return mpeg_audio_mode; - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - return mpeg_audio_mode_extension; - case V4L2_CID_MPEG_AUDIO_EMPHASIS: - return mpeg_audio_emphasis; - case V4L2_CID_MPEG_AUDIO_CRC: - return mpeg_audio_crc; - case V4L2_CID_MPEG_VIDEO_ENCODING: - return mpeg_video_encoding; - case V4L2_CID_MPEG_VIDEO_ASPECT: - return mpeg_video_aspect; - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - return mpeg_video_bitrate_mode; - case V4L2_CID_MPEG_STREAM_TYPE: - return mpeg_stream_type; - case V4L2_CID_MPEG_STREAM_VBI_FMT: - return mpeg_stream_vbi_fmt; - default: - return NULL; - } -} - -/* Fill in a struct v4l2_queryctrl */ -int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def) -{ - const char *name; - - qctrl->flags = 0; - switch (qctrl->id) { - /* USER controls */ - case V4L2_CID_USER_CLASS: name = "User Controls"; break; - case V4L2_CID_AUDIO_VOLUME: name = "Volume"; break; - case V4L2_CID_AUDIO_MUTE: name = "Mute"; break; - case V4L2_CID_AUDIO_BALANCE: name = "Balance"; break; - case V4L2_CID_AUDIO_BASS: name = "Bass"; break; - case V4L2_CID_AUDIO_TREBLE: name = "Treble"; break; - case V4L2_CID_AUDIO_LOUDNESS: name = "Loudness"; break; - case V4L2_CID_BRIGHTNESS: name = "Brightness"; break; - case V4L2_CID_CONTRAST: name = "Contrast"; break; - case V4L2_CID_SATURATION: name = "Saturation"; break; - case V4L2_CID_HUE: name = "Hue"; break; - - /* MPEG controls */ - case V4L2_CID_MPEG_CLASS: name = "MPEG Encoder Controls"; break; - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: name = "Audio Sampling Frequency"; break; - case V4L2_CID_MPEG_AUDIO_ENCODING: name = "Audio Encoding Layer"; break; - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: name = "Audio Layer I Bitrate"; break; - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: name = "Audio Layer II Bitrate"; break; - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: name = "Audio Layer III Bitrate"; break; - case V4L2_CID_MPEG_AUDIO_MODE: name = "Audio Stereo Mode"; break; - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: name = "Audio Stereo Mode Extension"; break; - case V4L2_CID_MPEG_AUDIO_EMPHASIS: name = "Audio Emphasis"; break; - case V4L2_CID_MPEG_AUDIO_CRC: name = "Audio CRC"; break; - case V4L2_CID_MPEG_VIDEO_ENCODING: name = "Video Encoding"; break; - case V4L2_CID_MPEG_VIDEO_ASPECT: name = "Video Aspect"; break; - case V4L2_CID_MPEG_VIDEO_B_FRAMES: name = "Video B Frames"; break; - case V4L2_CID_MPEG_VIDEO_GOP_SIZE: name = "Video GOP Size"; break; - case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: name = "Video GOP Closure"; break; - case V4L2_CID_MPEG_VIDEO_PULLDOWN: name = "Video Pulldown"; break; - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: name = "Video Bitrate Mode"; break; - case V4L2_CID_MPEG_VIDEO_BITRATE: name = "Video Bitrate"; break; - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: name = "Video Peak Bitrate"; break; - case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: name = "Video Temporal Decimation"; break; - case V4L2_CID_MPEG_STREAM_TYPE: name = "Stream Type"; break; - case V4L2_CID_MPEG_STREAM_PID_PMT: name = "Stream PMT Program ID"; break; - case V4L2_CID_MPEG_STREAM_PID_AUDIO: name = "Stream Audio Program ID"; break; - case V4L2_CID_MPEG_STREAM_PID_VIDEO: name = "Stream Video Program ID"; break; - case V4L2_CID_MPEG_STREAM_PID_PCR: name = "Stream PCR Program ID"; break; - case V4L2_CID_MPEG_STREAM_PES_ID_AUDIO: name = "Stream PES Audio ID"; break; - case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: name = "Stream PES Video ID"; break; - case V4L2_CID_MPEG_STREAM_VBI_FMT: name = "Stream VBI Format"; break; - - default: - return -EINVAL; - } - switch (qctrl->id) { - case V4L2_CID_AUDIO_MUTE: - case V4L2_CID_AUDIO_LOUDNESS: - case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: - case V4L2_CID_MPEG_VIDEO_PULLDOWN: - qctrl->type = V4L2_CTRL_TYPE_BOOLEAN; - min = 0; - max = step = 1; - break; - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - case V4L2_CID_MPEG_AUDIO_ENCODING: - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: - case V4L2_CID_MPEG_AUDIO_MODE: - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - case V4L2_CID_MPEG_AUDIO_EMPHASIS: - case V4L2_CID_MPEG_AUDIO_CRC: - case V4L2_CID_MPEG_VIDEO_ENCODING: - case V4L2_CID_MPEG_VIDEO_ASPECT: - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - case V4L2_CID_MPEG_STREAM_TYPE: - case V4L2_CID_MPEG_STREAM_VBI_FMT: - qctrl->type = V4L2_CTRL_TYPE_MENU; - step = 1; - break; - case V4L2_CID_USER_CLASS: - case V4L2_CID_MPEG_CLASS: - qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS; - qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; - min = max = step = def = 0; - break; - default: - qctrl->type = V4L2_CTRL_TYPE_INTEGER; - break; - } - switch (qctrl->id) { - case V4L2_CID_MPEG_AUDIO_ENCODING: - case V4L2_CID_MPEG_AUDIO_MODE: - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - case V4L2_CID_MPEG_VIDEO_B_FRAMES: - case V4L2_CID_MPEG_STREAM_TYPE: - qctrl->flags |= V4L2_CTRL_FLAG_UPDATE; - break; - case V4L2_CID_AUDIO_VOLUME: - case V4L2_CID_AUDIO_BALANCE: - case V4L2_CID_AUDIO_BASS: - case V4L2_CID_AUDIO_TREBLE: - case V4L2_CID_BRIGHTNESS: - case V4L2_CID_CONTRAST: - case V4L2_CID_SATURATION: - case V4L2_CID_HUE: - qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; - break; - } - qctrl->minimum = min; - qctrl->maximum = max; - qctrl->step = step; - qctrl->default_value = def; - qctrl->reserved[0] = qctrl->reserved[1] = 0; - snprintf(qctrl->name, sizeof(qctrl->name), name); - return 0; -} - -/* Fill in a struct v4l2_queryctrl with standard values based on - the control ID. */ -int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl) -{ - switch (qctrl->id) { - /* USER controls */ - case V4L2_CID_USER_CLASS: - case V4L2_CID_MPEG_CLASS: - return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0); - case V4L2_CID_AUDIO_VOLUME: - return v4l2_ctrl_query_fill(qctrl, 0, 65535, 65535 / 100, 58880); - case V4L2_CID_AUDIO_MUTE: - case V4L2_CID_AUDIO_LOUDNESS: - return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0); - case V4L2_CID_AUDIO_BALANCE: - case V4L2_CID_AUDIO_BASS: - case V4L2_CID_AUDIO_TREBLE: - return v4l2_ctrl_query_fill(qctrl, 0, 65535, 65535 / 100, 32768); - case V4L2_CID_BRIGHTNESS: - return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 128); - case V4L2_CID_CONTRAST: - case V4L2_CID_SATURATION: - return v4l2_ctrl_query_fill(qctrl, 0, 127, 1, 64); - case V4L2_CID_HUE: - return v4l2_ctrl_query_fill(qctrl, -128, 127, 1, 0); - - /* MPEG controls */ - case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000, 1, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000); - case V4L2_CID_MPEG_AUDIO_ENCODING: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_ENCODING_LAYER_1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_3, 1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2); - case V4L2_CID_MPEG_AUDIO_L1_BITRATE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_L1_BITRATE_32K, - V4L2_MPEG_AUDIO_L1_BITRATE_448K, 1, - V4L2_MPEG_AUDIO_L1_BITRATE_256K); - case V4L2_CID_MPEG_AUDIO_L2_BITRATE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_L2_BITRATE_32K, - V4L2_MPEG_AUDIO_L2_BITRATE_384K, 1, - V4L2_MPEG_AUDIO_L2_BITRATE_224K); - case V4L2_CID_MPEG_AUDIO_L3_BITRATE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_L3_BITRATE_32K, - V4L2_MPEG_AUDIO_L3_BITRATE_320K, 1, - V4L2_MPEG_AUDIO_L3_BITRATE_192K); - case V4L2_CID_MPEG_AUDIO_MODE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_MODE_STEREO, - V4L2_MPEG_AUDIO_MODE_MONO, 1, - V4L2_MPEG_AUDIO_MODE_STEREO); - case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16, 1, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4); - case V4L2_CID_MPEG_AUDIO_EMPHASIS: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_EMPHASIS_NONE, - V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17, 1, - V4L2_MPEG_AUDIO_EMPHASIS_NONE); - case V4L2_CID_MPEG_AUDIO_CRC: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_AUDIO_CRC_NONE, - V4L2_MPEG_AUDIO_CRC_CRC16, 1, - V4L2_MPEG_AUDIO_CRC_NONE); - case V4L2_CID_MPEG_VIDEO_ENCODING: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_VIDEO_ENCODING_MPEG_1, - V4L2_MPEG_VIDEO_ENCODING_MPEG_2, 1, - V4L2_MPEG_VIDEO_ENCODING_MPEG_2); - case V4L2_CID_MPEG_VIDEO_ASPECT: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_VIDEO_ASPECT_1x1, - V4L2_MPEG_VIDEO_ASPECT_221x100, 1, - V4L2_MPEG_VIDEO_ASPECT_4x3); - case V4L2_CID_MPEG_VIDEO_B_FRAMES: - return v4l2_ctrl_query_fill(qctrl, 0, 33, 1, 2); - case V4L2_CID_MPEG_VIDEO_GOP_SIZE: - return v4l2_ctrl_query_fill(qctrl, 1, 34, 1, 12); - case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: - return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 1); - case V4L2_CID_MPEG_VIDEO_PULLDOWN: - return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0); - case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, - V4L2_MPEG_VIDEO_BITRATE_MODE_CBR, 1, - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR); - case V4L2_CID_MPEG_VIDEO_BITRATE: - return v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 6000000); - case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: - return v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 8000000); - case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: - return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); - case V4L2_CID_MPEG_STREAM_TYPE: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_STREAM_TYPE_MPEG2_PS, - V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD, 1, - V4L2_MPEG_STREAM_TYPE_MPEG2_PS); - case V4L2_CID_MPEG_STREAM_PID_PMT: - return v4l2_ctrl_query_fill(qctrl, 0, (1 << 14) - 1, 1, 16); - case V4L2_CID_MPEG_STREAM_PID_AUDIO: - return v4l2_ctrl_query_fill(qctrl, 0, (1 << 14) - 1, 1, 260); - case V4L2_CID_MPEG_STREAM_PID_VIDEO: - return v4l2_ctrl_query_fill(qctrl, 0, (1 << 14) - 1, 1, 256); - case V4L2_CID_MPEG_STREAM_PID_PCR: - return v4l2_ctrl_query_fill(qctrl, 0, (1 << 14) - 1, 1, 259); - case V4L2_CID_MPEG_STREAM_PES_ID_AUDIO: - return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); - case V4L2_CID_MPEG_STREAM_PES_ID_VIDEO: - return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); - case V4L2_CID_MPEG_STREAM_VBI_FMT: - return v4l2_ctrl_query_fill(qctrl, - V4L2_MPEG_STREAM_VBI_FMT_NONE, - V4L2_MPEG_STREAM_VBI_FMT_IVTV, 1, - V4L2_MPEG_STREAM_VBI_FMT_NONE); - default: - return -EINVAL; - } -} - -/* Fill in a struct v4l2_querymenu based on the struct v4l2_queryctrl and - the menu. The qctrl pointer may be NULL, in which case it is ignored. */ -int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl, - const char **menu_items) -{ - int i; - - if (menu_items == NULL || - (qctrl && (qmenu->index < qctrl->minimum || qmenu->index > qctrl->maximum))) - return -EINVAL; - for (i = 0; i < qmenu->index && menu_items[i]; i++) ; - if (menu_items[i] == NULL || menu_items[i][0] == '\0') - return -EINVAL; - snprintf(qmenu->name, sizeof(qmenu->name), menu_items[qmenu->index]); - qmenu->reserved = 0; - return 0; -} - -/* ctrl_classes points to an array of u32 pointers, the last element is - a NULL pointer. Each u32 array is a 0-terminated array of control IDs. - Each array must be sorted low to high and belong to the same control - class. The array of u32 pointer must also be sorted, from low class IDs - to high class IDs. - - This function returns the first ID that follows after the given ID. - When no more controls are available 0 is returned. */ -u32 v4l2_ctrl_next(const u32 * const * ctrl_classes, u32 id) -{ - u32 ctrl_class; - const u32 *pctrl; - - /* if no query is desired, then just return the control ID */ - if ((id & V4L2_CTRL_FLAG_NEXT_CTRL) == 0) - return id; - if (ctrl_classes == NULL) - return 0; - id &= V4L2_CTRL_ID_MASK; - ctrl_class = V4L2_CTRL_ID2CLASS(id); - id++; /* select next control */ - /* find first class that matches (or is greater than) the class of - the ID */ - while (*ctrl_classes && V4L2_CTRL_ID2CLASS(**ctrl_classes) < ctrl_class) - ctrl_classes++; - /* no more classes */ - if (*ctrl_classes == NULL) - return 0; - pctrl = *ctrl_classes; - /* find first ctrl within the class that is >= ID */ - while (*pctrl && *pctrl < id) pctrl++; - if (*pctrl) - return *pctrl; - /* we are at the end of the controls of the current class. */ - /* continue with next class if available */ - ctrl_classes++; - if (*ctrl_classes == NULL) - return 0; - return **ctrl_classes; -} - -/* ----------------------------------------------------------------- */ - EXPORT_SYMBOL(v4l2_video_std_construct); EXPORT_SYMBOL(v4l2_prio_init); @@ -1464,13 +929,6 @@ EXPORT_SYMBOL(v4l2_type_names); EXPORT_SYMBOL(v4l_printk_ioctl); EXPORT_SYMBOL(v4l_printk_ioctl_arg); -EXPORT_SYMBOL(v4l2_ctrl_next); -EXPORT_SYMBOL(v4l2_ctrl_check); -EXPORT_SYMBOL(v4l2_ctrl_get_menu); -EXPORT_SYMBOL(v4l2_ctrl_query_menu); -EXPORT_SYMBOL(v4l2_ctrl_query_fill); -EXPORT_SYMBOL(v4l2_ctrl_query_fill_std); - /* * Local variables: * c-basic-offset: 8 diff --git a/drivers/media/video/video-buf-dvb.c b/drivers/media/video/video-buf-dvb.c index 7ee8a53cd..caf3e7e2f 100644 --- a/drivers/media/video/video-buf-dvb.c +++ b/drivers/media/video/video-buf-dvb.c @@ -135,15 +135,14 @@ static int videobuf_dvb_stop_feed(struct dvb_demux_feed *feed) int videobuf_dvb_register(struct videobuf_dvb *dvb, struct module *module, - void *adapter_priv, - struct device *device) + void *adapter_priv) { int result; mutex_init(&dvb->lock); /* register adapter */ - result = dvb_register_adapter(&dvb->adapter, dvb->name, module, device); + result = dvb_register_adapter(&dvb->adapter, dvb->name, module); if (result < 0) { printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", dvb->name, result); diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 2ae3fb250..8f271de57 100644 --- a/drivers/media/video/videocodec.c +++ b/drivers/media/video/videocodec.c @@ -36,6 +36,7 @@ #include // kernel config is here (procfs flag) +#include #ifdef CONFIG_PROC_FS #include diff --git a/drivers/media/video/videocodec.h b/drivers/media/video/videocodec.h index 97a3bbeda..8c233720b 100644 --- a/drivers/media/video/videocodec.h +++ b/drivers/media/video/videocodec.h @@ -222,14 +222,14 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1]) /* ========================= */ struct vfe_polarity { - unsigned int vsync_pol:1; - unsigned int hsync_pol:1; - unsigned int field_pol:1; - unsigned int blank_pol:1; - unsigned int subimg_pol:1; - unsigned int poe_pol:1; - unsigned int pvalid_pol:1; - unsigned int vclk_pol:1; + int vsync_pol:1; + int hsync_pol:1; + int field_pol:1; + int blank_pol:1; + int subimg_pol:1; + int poe_pol:1; + int pvalid_pol:1; + int vclk_pol:1; }; struct vfe_settings { diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 2299e294e..5f87dd5f1 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c @@ -1,31 +1,20 @@ /* - * Video capture interface for Linux version 2 + * Video capture interface for Linux * - * A generic video device interface for the LINUX operating system - * using a set of device structures/vectors for low level operations. + * A generic video device interface for the LINUX operating system + * using a set of device structures/vectors for low level operations. * - * 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 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. * - * Authors: Alan Cox, (version 1) - * Mauro Carvalho Chehab (version 2) + * Author: Alan Cox, * * Fixes: 20000516 Claudio Matsuoka * - Added procfs support */ -#define dbgarg(cmd, fmt, arg...) \ - if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ - printk (KERN_DEBUG "%s: ", vfd->name); \ - v4l_printk_ioctl(cmd); \ - printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); - -#define dbgarg2(fmt, arg...) \ - if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \ - printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); - #include #include #include @@ -37,16 +26,11 @@ #include #include #include +#include #include #include -#define __OLD_VIDIOC_ /* To allow fixing old calls*/ -#include - -#ifdef CONFIG_VIDEO_V4L1 #include -#endif -#include #define VIDEO_NUM_DEVICES 256 #define VIDEO_NAME "video4linux" @@ -57,8 +41,7 @@ static ssize_t show_name(struct class_device *cd, char *buf) { - struct video_device *vfd = container_of(cd, struct video_device, - class_dev); + struct video_device *vfd = container_of(cd, struct video_device, class_dev); return sprintf(buf,"%.*s\n",(int)sizeof(vfd->name),vfd->name); } @@ -79,8 +62,7 @@ void video_device_release(struct video_device *vfd) static void video_release(struct class_device *cd) { - struct video_device *vfd = container_of(cd, struct video_device, - class_dev); + struct video_device *vfd = container_of(cd, struct video_device, class_dev); #if 1 /* needed until all drivers are fixed */ @@ -108,7 +90,7 @@ struct video_device* video_devdata(struct file *file) } /* - * Open a video device - FIXME: Obsoleted + * Open a video device. */ static int video_open(struct inode *inode, struct file *file) { @@ -148,7 +130,6 @@ static int video_open(struct inode *inode, struct file *file) * helper function -- handles userspace copying for ioctl arguments */ -#ifdef __OLD_VIDIOC_ static unsigned int video_fix_command(unsigned int cmd) { @@ -174,11 +155,7 @@ video_fix_command(unsigned int cmd) } return cmd; } -#endif -/* - * Obsolete usercopy function - Should be removed soon - */ int video_usercopy(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg, @@ -189,15 +166,8 @@ video_usercopy(struct inode *inode, struct file *file, void *mbuf = NULL; void *parg = NULL; int err = -EINVAL; - int is_ext_ctrl; - size_t ctrls_size = 0; - void __user *user_ptr = NULL; -#ifdef __OLD_VIDIOC_ cmd = video_fix_command(cmd); -#endif - is_ext_ctrl = (cmd == VIDIOC_S_EXT_CTRLS || cmd == VIDIOC_G_EXT_CTRLS || - cmd == VIDIOC_TRY_EXT_CTRLS); /* Copy arguments into temp kernel buffer */ switch (_IOC_DIR(cmd)) { @@ -223,43 +193,14 @@ video_usercopy(struct inode *inode, struct file *file, goto out; break; } - if (is_ext_ctrl) { - struct v4l2_ext_controls *p = parg; - - /* In case of an error, tell the caller that it wasn't - a specific control that caused it. */ - p->error_idx = p->count; - user_ptr = (void __user *)p->controls; - if (p->count) { - ctrls_size = sizeof(struct v4l2_ext_control) * p->count; - /* Note: v4l2_ext_controls fits in sbuf[] so mbuf is still NULL. */ - mbuf = kmalloc(ctrls_size, GFP_KERNEL); - err = -ENOMEM; - if (NULL == mbuf) - goto out_ext_ctrl; - err = -EFAULT; - if (copy_from_user(mbuf, user_ptr, ctrls_size)) - goto out_ext_ctrl; - p->controls = mbuf; - } - } /* call driver */ err = func(inode, file, cmd, parg); if (err == -ENOIOCTLCMD) err = -EINVAL; - if (is_ext_ctrl) { - struct v4l2_ext_controls *p = parg; - - p->controls = (void *)user_ptr; - if (p->count && err == 0 && copy_to_user(user_ptr, mbuf, ctrls_size)) - err = -EFAULT; - goto out_ext_ctrl; - } if (err < 0) goto out; -out_ext_ctrl: /* Copy results into user buffer */ switch (_IOC_DIR(cmd)) { @@ -277,7 +218,6 @@ out: /* * open/release helper functions -- handle exclusive opens - * Should be removed soon */ int video_exclusive_open(struct inode *inode, struct file *file) { @@ -302,1184 +242,6 @@ int video_exclusive_release(struct inode *inode, struct file *file) return 0; } -static char *v4l2_memory_names[] = { - [V4L2_MEMORY_MMAP] = "mmap", - [V4L2_MEMORY_USERPTR] = "userptr", - [V4L2_MEMORY_OVERLAY] = "overlay", -}; - - -/* FIXME: Those stuff are replicated also on v4l2-common.c */ -static char *v4l2_type_names_FIXME[] = { - [V4L2_BUF_TYPE_VIDEO_CAPTURE] = "video-cap", - [V4L2_BUF_TYPE_VIDEO_OVERLAY] = "video-over", - [V4L2_BUF_TYPE_VIDEO_OUTPUT] = "video-out", - [V4L2_BUF_TYPE_VBI_CAPTURE] = "vbi-cap", - [V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out", - [V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out", - [V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-capture", - [V4L2_BUF_TYPE_PRIVATE] = "private", -}; - -static char *v4l2_field_names_FIXME[] = { - [V4L2_FIELD_ANY] = "any", - [V4L2_FIELD_NONE] = "none", - [V4L2_FIELD_TOP] = "top", - [V4L2_FIELD_BOTTOM] = "bottom", - [V4L2_FIELD_INTERLACED] = "interlaced", - [V4L2_FIELD_SEQ_TB] = "seq-tb", - [V4L2_FIELD_SEQ_BT] = "seq-bt", - [V4L2_FIELD_ALTERNATE] = "alternate", -}; - -#define prt_names(a,arr) (((a)>=0)&&((a)timecode; - - dbgarg (cmd, "%02ld:%02d:%02d.%08ld index=%d, type=%s, " - "bytesused=%d, flags=0x%08d, " - "field=%0d, sequence=%d, memory=%s, offset/userptr=0x%08lx\n", - (p->timestamp.tv_sec/3600), - (int)(p->timestamp.tv_sec/60)%60, - (int)(p->timestamp.tv_sec%60), - p->timestamp.tv_usec, - p->index, - prt_names(p->type,v4l2_type_names_FIXME), - p->bytesused,p->flags, - p->field,p->sequence, - prt_names(p->memory,v4l2_memory_names), - p->m.userptr); - dbgarg2 ("timecode= %02d:%02d:%02d type=%d, " - "flags=0x%08d, frames=%d, userbits=0x%08x\n", - tc->hours,tc->minutes,tc->seconds, - tc->type, tc->flags, tc->frames, *(__u32 *) tc->userbits); -} - -static inline void dbgrect(struct video_device *vfd, char *s, - struct v4l2_rect *r) -{ - dbgarg2 ("%sRect start at %dx%d, size= %dx%d\n", s, r->left, r->top, - r->width, r->height); -}; - -static inline void v4l_print_pix_fmt (struct video_device *vfd, - struct v4l2_pix_format *fmt) -{ - dbgarg2 ("width=%d, height=%d, format=0x%08x, field=%s, " - "bytesperline=%d sizeimage=%d, colorspace=%d\n", - fmt->width,fmt->height,fmt->pixelformat, - prt_names(fmt->field,v4l2_field_names_FIXME), - fmt->bytesperline,fmt->sizeimage,fmt->colorspace); -}; - - -static int check_fmt (struct video_device *vfd, enum v4l2_buf_type type) -{ - switch (type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - if (vfd->vidioc_try_fmt_cap) - return (0); - break; - case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (vfd->vidioc_try_fmt_overlay) - return (0); - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - if (vfd->vidioc_try_fmt_vbi) - return (0); - break; - case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (vfd->vidioc_try_fmt_vbi_output) - return (0); - break; - case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (vfd->vidioc_try_fmt_vbi_capture) - return (0); - break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (vfd->vidioc_try_fmt_video_output) - return (0); - break; - case V4L2_BUF_TYPE_VBI_OUTPUT: - if (vfd->vidioc_try_fmt_vbi_output) - return (0); - break; - case V4L2_BUF_TYPE_PRIVATE: - if (vfd->vidioc_try_fmt_type_private) - return (0); - break; - } - return (-EINVAL); -} - -static int __video_do_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, void *arg) -{ - struct video_device *vfd = video_devdata(file); - void *fh = file->private_data; - int ret = -EINVAL; - - if ( (vfd->debug & V4L2_DEBUG_IOCTL) && - !(vfd->debug | V4L2_DEBUG_IOCTL_ARG)) { - v4l_print_ioctl(vfd->name, cmd); - } - - switch(cmd) { - /* --- capabilities ------------------------------------------ */ - case VIDIOC_QUERYCAP: - { - struct v4l2_capability *cap = (struct v4l2_capability*)arg; - memset(cap, 0, sizeof(*cap)); - - if (!vfd->vidioc_querycap) - break; - - ret=vfd->vidioc_querycap(file, fh, cap); - if (!ret) - dbgarg (cmd, "driver=%s, card=%s, bus=%s, " - "version=0x%08x, " - "capabilities=0x%08x\n", - cap->driver,cap->card,cap->bus_info, - cap->version, - cap->capabilities); - break; - } - - /* --- priority ------------------------------------------ */ - case VIDIOC_G_PRIORITY: - { - enum v4l2_priority *p=arg; - - if (!vfd->vidioc_g_priority) - break; - ret=vfd->vidioc_g_priority(file, fh, p); - if (!ret) - dbgarg(cmd, "priority is %d\n", *p); - break; - } - case VIDIOC_S_PRIORITY: - { - enum v4l2_priority *p=arg; - - if (!vfd->vidioc_s_priority) - break; - dbgarg(cmd, "setting priority to %d\n", *p); - ret=vfd->vidioc_s_priority(file, fh, *p); - break; - } - - /* --- capture ioctls ---------------------------------------- */ - case VIDIOC_ENUM_FMT: - { - struct v4l2_fmtdesc *f = arg; - enum v4l2_buf_type type; - unsigned int index; - - index = f->index; - type = f->type; - memset(f,0,sizeof(*f)); - f->index = index; - f->type = type; - - switch (type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - if (vfd->vidioc_enum_fmt_cap) - ret=vfd->vidioc_enum_fmt_cap(file, fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (vfd->vidioc_enum_fmt_overlay) - ret=vfd->vidioc_enum_fmt_overlay(file, fh, f); - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - if (vfd->vidioc_enum_fmt_vbi) - ret=vfd->vidioc_enum_fmt_vbi(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (vfd->vidioc_enum_fmt_vbi_output) - ret=vfd->vidioc_enum_fmt_vbi_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (vfd->vidioc_enum_fmt_vbi_capture) - ret=vfd->vidioc_enum_fmt_vbi_capture(file, - fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (vfd->vidioc_enum_fmt_video_output) - ret=vfd->vidioc_enum_fmt_video_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_VBI_OUTPUT: - if (vfd->vidioc_enum_fmt_vbi_output) - ret=vfd->vidioc_enum_fmt_vbi_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_PRIVATE: - if (vfd->vidioc_enum_fmt_type_private) - ret=vfd->vidioc_enum_fmt_type_private(file, - fh, f); - break; - } - if (!ret) - dbgarg (cmd, "index=%d, type=%d, flags=%d, " - "description=%s," - " pixelformat=0x%8x\n", - f->index, f->type, f->flags, - f->description, - f->pixelformat); - - break; - } - case VIDIOC_G_FMT: - { - struct v4l2_format *f = (struct v4l2_format *)arg; - enum v4l2_buf_type type=f->type; - - memset(&f->fmt.pix,0,sizeof(f->fmt.pix)); - f->type=type; - - /* FIXME: Should be one dump per type */ - dbgarg (cmd, "type=%s\n", prt_names(type, - v4l2_type_names_FIXME)); - - switch (type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - if (vfd->vidioc_g_fmt_cap) - ret=vfd->vidioc_g_fmt_cap(file, fh, f); - if (!ret) - v4l_print_pix_fmt(vfd,&f->fmt.pix); - break; - case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (vfd->vidioc_g_fmt_overlay) - ret=vfd->vidioc_g_fmt_overlay(file, fh, f); - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - if (vfd->vidioc_g_fmt_vbi) - ret=vfd->vidioc_g_fmt_vbi(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (vfd->vidioc_g_fmt_vbi_output) - ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (vfd->vidioc_g_fmt_vbi_capture) - ret=vfd->vidioc_g_fmt_vbi_capture(file, fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (vfd->vidioc_g_fmt_video_output) - ret=vfd->vidioc_g_fmt_video_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_VBI_OUTPUT: - if (vfd->vidioc_g_fmt_vbi_output) - ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f); - break; - case V4L2_BUF_TYPE_PRIVATE: - if (vfd->vidioc_g_fmt_type_private) - ret=vfd->vidioc_g_fmt_type_private(file, - fh, f); - break; - } - - break; - } - case VIDIOC_S_FMT: - { - struct v4l2_format *f = (struct v4l2_format *)arg; - - /* FIXME: Should be one dump per type */ - dbgarg (cmd, "type=%s\n", prt_names(f->type, - v4l2_type_names_FIXME)); - - switch (f->type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - v4l_print_pix_fmt(vfd,&f->fmt.pix); - if (vfd->vidioc_s_fmt_cap) - ret=vfd->vidioc_s_fmt_cap(file, fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (vfd->vidioc_s_fmt_overlay) - ret=vfd->vidioc_s_fmt_overlay(file, fh, f); - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - if (vfd->vidioc_s_fmt_vbi) - ret=vfd->vidioc_s_fmt_vbi(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (vfd->vidioc_s_fmt_vbi_output) - ret=vfd->vidioc_s_fmt_vbi_output(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (vfd->vidioc_s_fmt_vbi_capture) - ret=vfd->vidioc_s_fmt_vbi_capture(file, fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (vfd->vidioc_s_fmt_video_output) - ret=vfd->vidioc_s_fmt_video_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_VBI_OUTPUT: - if (vfd->vidioc_s_fmt_vbi_output) - ret=vfd->vidioc_s_fmt_vbi_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_PRIVATE: - if (vfd->vidioc_s_fmt_type_private) - ret=vfd->vidioc_s_fmt_type_private(file, - fh, f); - break; - } - break; - } - case VIDIOC_TRY_FMT: - { - struct v4l2_format *f = (struct v4l2_format *)arg; - - /* FIXME: Should be one dump per type */ - dbgarg (cmd, "type=%s\n", prt_names(f->type, - v4l2_type_names_FIXME)); - switch (f->type) { - case V4L2_BUF_TYPE_VIDEO_CAPTURE: - if (vfd->vidioc_try_fmt_cap) - ret=vfd->vidioc_try_fmt_cap(file, fh, f); - if (!ret) - v4l_print_pix_fmt(vfd,&f->fmt.pix); - break; - case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (vfd->vidioc_try_fmt_overlay) - ret=vfd->vidioc_try_fmt_overlay(file, fh, f); - break; - case V4L2_BUF_TYPE_VBI_CAPTURE: - if (vfd->vidioc_try_fmt_vbi) - ret=vfd->vidioc_try_fmt_vbi(file, fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (vfd->vidioc_try_fmt_vbi_output) - ret=vfd->vidioc_try_fmt_vbi_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (vfd->vidioc_try_fmt_vbi_capture) - ret=vfd->vidioc_try_fmt_vbi_capture(file, - fh, f); - break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (vfd->vidioc_try_fmt_video_output) - ret=vfd->vidioc_try_fmt_video_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_VBI_OUTPUT: - if (vfd->vidioc_try_fmt_vbi_output) - ret=vfd->vidioc_try_fmt_vbi_output(file, - fh, f); - break; - case V4L2_BUF_TYPE_PRIVATE: - if (vfd->vidioc_try_fmt_type_private) - ret=vfd->vidioc_try_fmt_type_private(file, - fh, f); - break; - } - - break; - } - /* FIXME: Those buf reqs could be handled here, - with some changes on videobuf to allow its header to be included at - videodev2.h or being merged at videodev2. - */ - case VIDIOC_REQBUFS: - { - struct v4l2_requestbuffers *p=arg; - - if (!vfd->vidioc_reqbufs) - break; - ret = check_fmt (vfd, p->type); - if (ret) - break; - - ret=vfd->vidioc_reqbufs(file, fh, p); - dbgarg (cmd, "count=%d, type=%s, memory=%s\n", - p->count, - prt_names(p->type,v4l2_type_names_FIXME), - prt_names(p->memory,v4l2_memory_names)); - break; - } - case VIDIOC_QUERYBUF: - { - struct v4l2_buffer *p=arg; - - if (!vfd->vidioc_querybuf) - break; - ret = check_fmt (vfd, p->type); - if (ret) - break; - - ret=vfd->vidioc_querybuf(file, fh, p); - if (!ret) - dbgbuf(cmd,vfd,p); - break; - } - case VIDIOC_QBUF: - { - struct v4l2_buffer *p=arg; - - if (!vfd->vidioc_qbuf) - break; - ret = check_fmt (vfd, p->type); - if (ret) - break; - - ret=vfd->vidioc_qbuf(file, fh, p); - if (!ret) - dbgbuf(cmd,vfd,p); - break; - } - case VIDIOC_DQBUF: - { - struct v4l2_buffer *p=arg; - if (!vfd->vidioc_dqbuf) - break; - ret = check_fmt (vfd, p->type); - if (ret) - break; - - ret=vfd->vidioc_dqbuf(file, fh, p); - if (!ret) - dbgbuf(cmd,vfd,p); - break; - } - case VIDIOC_OVERLAY: - { - int *i = arg; - - if (!vfd->vidioc_overlay) - break; - dbgarg (cmd, "value=%d\n",*i); - ret=vfd->vidioc_overlay(file, fh, *i); - break; - } -#ifdef CONFIG_VIDEO_V4L1_COMPAT - /* --- streaming capture ------------------------------------- */ - case VIDIOCGMBUF: - { - struct video_mbuf *p=arg; - - memset(p,0,sizeof(p)); - - if (!vfd->vidiocgmbuf) - break; - ret=vfd->vidiocgmbuf(file, fh, p); - if (!ret) - dbgarg (cmd, "size=%d, frames=%d, offsets=0x%08lx\n", - p->size, p->frames, - (unsigned long)p->offsets); - break; - } -#endif - case VIDIOC_G_FBUF: - { - struct v4l2_framebuffer *p=arg; - if (!vfd->vidioc_g_fbuf) - break; - ret=vfd->vidioc_g_fbuf(file, fh, arg); - if (!ret) { - dbgarg (cmd, "capability=%d, flags=%d, base=0x%08lx\n", - p->capability,p->flags, - (unsigned long)p->base); - v4l_print_pix_fmt (vfd, &p->fmt); - } - break; - } - case VIDIOC_S_FBUF: - { - struct v4l2_framebuffer *p=arg; - if (!vfd->vidioc_s_fbuf) - break; - - dbgarg (cmd, "capability=%d, flags=%d, base=0x%08lx\n", - p->capability,p->flags,(unsigned long)p->base); - v4l_print_pix_fmt (vfd, &p->fmt); - ret=vfd->vidioc_s_fbuf(file, fh, arg); - - break; - } - case VIDIOC_STREAMON: - { - enum v4l2_buf_type i = *(int *)arg; - if (!vfd->vidioc_streamon) - break; - dbgarg (cmd, "type=%s\n", prt_names(i,v4l2_type_names_FIXME)); - ret=vfd->vidioc_streamon(file, fh,i); - break; - } - case VIDIOC_STREAMOFF: - { - enum v4l2_buf_type i = *(int *)arg; - - if (!vfd->vidioc_streamoff) - break; - dbgarg (cmd, "type=%s\n", prt_names(i,v4l2_type_names_FIXME)); - ret=vfd->vidioc_streamoff(file, fh, i); - break; - } - /* ---------- tv norms ---------- */ - case VIDIOC_ENUMSTD: - { - struct v4l2_standard *p = arg; - unsigned int index = p->index; - - if (!vfd->tvnormsize) { - printk (KERN_WARNING "%s: no TV norms defined!\n", - vfd->name); - break; - } - - if (index < 0 || index >= vfd->tvnormsize) { - ret=-EINVAL; - break; - } - v4l2_video_std_construct(p, vfd->tvnorms[p->index].id, - vfd->tvnorms[p->index].name); - p->index = index; - - dbgarg (cmd, "index=%d, id=%Ld, name=%s, fps=%d/%d, " - "framelines=%d\n", p->index, - (unsigned long long)p->id, p->name, - p->frameperiod.numerator, - p->frameperiod.denominator, - p->framelines); - - ret=0; - break; - } - case VIDIOC_G_STD: - { - v4l2_std_id *id = arg; - - *id = vfd->current_norm; - - dbgarg (cmd, "value=%Lu\n", (long long unsigned) *id); - - ret=0; - break; - } - case VIDIOC_S_STD: - { - v4l2_std_id *id = arg; - unsigned int i; - - if (!vfd->tvnormsize) { - printk (KERN_WARNING "%s: no TV norms defined!\n", - vfd->name); - break; - } - - dbgarg (cmd, "value=%Lu\n", (long long unsigned) *id); - - /* First search for exact match */ - for (i = 0; i < vfd->tvnormsize; i++) - if (*id == vfd->tvnorms[i].id) - break; - /* Then for a generic video std that contains desired std */ - if (i == vfd->tvnormsize) - for (i = 0; i < vfd->tvnormsize; i++) - if (*id & vfd->tvnorms[i].id) - break; - if (i == vfd->tvnormsize) { - break; - } - - /* Calls the specific handler */ - if (vfd->vidioc_s_std) - ret=vfd->vidioc_s_std(file, fh, i); - else - ret=-EINVAL; - - /* Updates standard information */ - if (!ret) - vfd->current_norm=*id; - - break; - } - case VIDIOC_QUERYSTD: - { - v4l2_std_id *p=arg; - - if (!vfd->vidioc_querystd) - break; - ret=vfd->vidioc_querystd(file, fh, arg); - if (!ret) - dbgarg (cmd, "detected std=%Lu\n", - (unsigned long long)*p); - break; - } - /* ------ input switching ---------- */ - /* FIXME: Inputs can be handled inside videodev2 */ - case VIDIOC_ENUMINPUT: - { - struct v4l2_input *p=arg; - int i=p->index; - - if (!vfd->vidioc_enum_input) - break; - memset(p, 0, sizeof(*p)); - p->index=i; - - ret=vfd->vidioc_enum_input(file, fh, p); - if (!ret) - dbgarg (cmd, "index=%d, name=%s, type=%d, " - "audioset=%d, " - "tuner=%d, std=%Ld, status=%d\n", - p->index,p->name,p->type,p->audioset, - p->tuner, - (unsigned long long)p->std, - p->status); - break; - } - case VIDIOC_G_INPUT: - { - unsigned int *i = arg; - - if (!vfd->vidioc_g_input) - break; - ret=vfd->vidioc_g_input(file, fh, i); - if (!ret) - dbgarg (cmd, "value=%d\n",*i); - break; - } - case VIDIOC_S_INPUT: - { - unsigned int *i = arg; - - if (!vfd->vidioc_s_input) - break; - dbgarg (cmd, "value=%d\n",*i); - ret=vfd->vidioc_s_input(file, fh, *i); - break; - } - - /* ------ output switching ---------- */ - case VIDIOC_G_OUTPUT: - { - unsigned int *i = arg; - - if (!vfd->vidioc_g_output) - break; - ret=vfd->vidioc_g_output(file, fh, i); - if (!ret) - dbgarg (cmd, "value=%d\n",*i); - break; - } - case VIDIOC_S_OUTPUT: - { - unsigned int *i = arg; - - if (!vfd->vidioc_s_output) - break; - dbgarg (cmd, "value=%d\n",*i); - ret=vfd->vidioc_s_output(file, fh, *i); - break; - } - - /* --- controls ---------------------------------------------- */ - case VIDIOC_QUERYCTRL: - { - struct v4l2_queryctrl *p=arg; - - if (!vfd->vidioc_queryctrl) - break; - ret=vfd->vidioc_queryctrl(file, fh, p); - - if (!ret) - dbgarg (cmd, "id=%d, type=%d, name=%s, " - "min/max=%d/%d," - " step=%d, default=%d, flags=0x%08x\n", - p->id,p->type,p->name,p->minimum, - p->maximum,p->step,p->default_value, - p->flags); - break; - } - case VIDIOC_G_CTRL: - { - struct v4l2_control *p = arg; - - if (!vfd->vidioc_g_ctrl) - break; - dbgarg(cmd, "Enum for index=%d\n", p->id); - - ret=vfd->vidioc_g_ctrl(file, fh, p); - if (!ret) - dbgarg2 ( "id=%d, value=%d\n", p->id, p->value); - break; - } - case VIDIOC_S_CTRL: - { - struct v4l2_control *p = arg; - - if (!vfd->vidioc_s_ctrl) - break; - dbgarg (cmd, "id=%d, value=%d\n", p->id, p->value); - - ret=vfd->vidioc_s_ctrl(file, fh, p); - break; - } - case VIDIOC_G_EXT_CTRLS: - { - struct v4l2_ext_controls *p = arg; - - if (vfd->vidioc_g_ext_ctrls) { - dbgarg(cmd, "count=%d\n", p->count); - - ret=vfd->vidioc_g_ext_ctrls(file, fh, p); - } - break; - } - case VIDIOC_S_EXT_CTRLS: - { - struct v4l2_ext_controls *p = arg; - - if (vfd->vidioc_s_ext_ctrls) { - dbgarg(cmd, "count=%d\n", p->count); - - ret=vfd->vidioc_s_ext_ctrls(file, fh, p); - } - break; - } - case VIDIOC_TRY_EXT_CTRLS: - { - struct v4l2_ext_controls *p = arg; - - if (vfd->vidioc_try_ext_ctrls) { - dbgarg(cmd, "count=%d\n", p->count); - - ret=vfd->vidioc_try_ext_ctrls(file, fh, p); - } - break; - } - case VIDIOC_QUERYMENU: - { - struct v4l2_querymenu *p=arg; - if (!vfd->vidioc_querymenu) - break; - ret=vfd->vidioc_querymenu(file, fh, p); - if (!ret) - dbgarg (cmd, "id=%d, index=%d, name=%s\n", - p->id,p->index,p->name); - break; - } - /* --- audio ---------------------------------------------- */ - case VIDIOC_ENUMAUDIO: - { - struct v4l2_audio *p=arg; - - if (!vfd->vidioc_enumaudio) - break; - dbgarg(cmd, "Enum for index=%d\n", p->index); - ret=vfd->vidioc_enumaudio(file, fh, p); - if (!ret) - dbgarg2("index=%d, name=%s, capability=%d, " - "mode=%d\n",p->index,p->name, - p->capability, p->mode); - break; - } - case VIDIOC_G_AUDIO: - { - struct v4l2_audio *p=arg; - - if (!vfd->vidioc_g_audio) - break; - dbgarg(cmd, "Get for index=%d\n", p->index); - ret=vfd->vidioc_g_audio(file, fh, p); - if (!ret) - dbgarg2("index=%d, name=%s, capability=%d, " - "mode=%d\n",p->index, - p->name,p->capability, p->mode); - break; - } - case VIDIOC_S_AUDIO: - { - struct v4l2_audio *p=arg; - - if (!vfd->vidioc_s_audio) - break; - dbgarg(cmd, "index=%d, name=%s, capability=%d, " - "mode=%d\n", p->index, p->name, - p->capability, p->mode); - ret=vfd->vidioc_s_audio(file, fh, p); - break; - } - case VIDIOC_ENUMAUDOUT: - { - struct v4l2_audioout *p=arg; - - if (!vfd->vidioc_enumaudout) - break; - dbgarg(cmd, "Enum for index=%d\n", p->index); - ret=vfd->vidioc_enumaudout(file, fh, p); - if (!ret) - dbgarg2("index=%d, name=%s, capability=%d, " - "mode=%d\n", p->index, p->name, - p->capability,p->mode); - break; - } - case VIDIOC_G_AUDOUT: - { - struct v4l2_audioout *p=arg; - - if (!vfd->vidioc_g_audout) - break; - dbgarg(cmd, "Enum for index=%d\n", p->index); - ret=vfd->vidioc_g_audout(file, fh, p); - if (!ret) - dbgarg2("index=%d, name=%s, capability=%d, " - "mode=%d\n", p->index, p->name, - p->capability,p->mode); - break; - } - case VIDIOC_S_AUDOUT: - { - struct v4l2_audioout *p=arg; - - if (!vfd->vidioc_s_audout) - break; - dbgarg(cmd, "index=%d, name=%s, capability=%d, " - "mode=%d\n", p->index, p->name, - p->capability,p->mode); - - ret=vfd->vidioc_s_audout(file, fh, p); - break; - } - case VIDIOC_G_MODULATOR: - { - struct v4l2_modulator *p=arg; - if (!vfd->vidioc_g_modulator) - break; - ret=vfd->vidioc_g_modulator(file, fh, p); - if (!ret) - dbgarg(cmd, "index=%d, name=%s, " - "capability=%d, rangelow=%d," - " rangehigh=%d, txsubchans=%d\n", - p->index, p->name,p->capability, - p->rangelow, p->rangehigh, - p->txsubchans); - break; - } - case VIDIOC_S_MODULATOR: - { - struct v4l2_modulator *p=arg; - if (!vfd->vidioc_s_modulator) - break; - dbgarg(cmd, "index=%d, name=%s, capability=%d, " - "rangelow=%d, rangehigh=%d, txsubchans=%d\n", - p->index, p->name,p->capability,p->rangelow, - p->rangehigh,p->txsubchans); - ret=vfd->vidioc_s_modulator(file, fh, p); - break; - } - case VIDIOC_G_CROP: - { - struct v4l2_crop *p=arg; - if (!vfd->vidioc_g_crop) - break; - ret=vfd->vidioc_g_crop(file, fh, p); - if (!ret) { - dbgarg(cmd, "type=%d\n", p->type); - dbgrect(vfd, "", &p->c); - } - break; - } - case VIDIOC_S_CROP: - { - struct v4l2_crop *p=arg; - if (!vfd->vidioc_s_crop) - break; - dbgarg(cmd, "type=%d\n", p->type); - dbgrect(vfd, "", &p->c); - ret=vfd->vidioc_s_crop(file, fh, p); - break; - } - case VIDIOC_CROPCAP: - { - struct v4l2_cropcap *p=arg; - /*FIXME: Should also show v4l2_fract pixelaspect */ - if (!vfd->vidioc_cropcap) - break; - dbgarg(cmd, "type=%d\n", p->type); - dbgrect(vfd, "bounds ", &p->bounds); - dbgrect(vfd, "defrect ", &p->defrect); - ret=vfd->vidioc_cropcap(file, fh, p); - break; - } - case VIDIOC_G_MPEGCOMP: - { - struct v4l2_mpeg_compression *p=arg; - - /*FIXME: Several fields not shown */ - if (!vfd->vidioc_g_mpegcomp) - break; - ret=vfd->vidioc_g_mpegcomp(file, fh, p); - if (!ret) - dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d," - " ts_pid_video=%d, ts_pid_pcr=%d, " - "ps_size=%d, au_sample_rate=%d, " - "au_pesid=%c, vi_frame_rate=%d, " - "vi_frames_per_gop=%d, " - "vi_bframes_count=%d, vi_pesid=%c\n", - p->ts_pid_pmt,p->ts_pid_audio, - p->ts_pid_video,p->ts_pid_pcr, - p->ps_size, p->au_sample_rate, - p->au_pesid, p->vi_frame_rate, - p->vi_frames_per_gop, - p->vi_bframes_count, p->vi_pesid); - break; - } - case VIDIOC_S_MPEGCOMP: - { - struct v4l2_mpeg_compression *p=arg; - /*FIXME: Several fields not shown */ - if (!vfd->vidioc_s_mpegcomp) - break; - dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d, " - "ts_pid_video=%d, ts_pid_pcr=%d, ps_size=%d, " - "au_sample_rate=%d, au_pesid=%c, " - "vi_frame_rate=%d, vi_frames_per_gop=%d, " - "vi_bframes_count=%d, vi_pesid=%c\n", - p->ts_pid_pmt,p->ts_pid_audio, p->ts_pid_video, - p->ts_pid_pcr, p->ps_size, p->au_sample_rate, - p->au_pesid, p->vi_frame_rate, - p->vi_frames_per_gop, p->vi_bframes_count, - p->vi_pesid); - ret=vfd->vidioc_s_mpegcomp(file, fh, p); - break; - } - case VIDIOC_G_JPEGCOMP: - { - struct v4l2_jpegcompression *p=arg; - if (!vfd->vidioc_g_jpegcomp) - break; - ret=vfd->vidioc_g_jpegcomp(file, fh, p); - if (!ret) - dbgarg (cmd, "quality=%d, APPn=%d, " - "APP_len=%d, COM_len=%d, " - "jpeg_markers=%d\n", - p->quality,p->APPn,p->APP_len, - p->COM_len,p->jpeg_markers); - break; - } - case VIDIOC_S_JPEGCOMP: - { - struct v4l2_jpegcompression *p=arg; - if (!vfd->vidioc_g_jpegcomp) - break; - dbgarg (cmd, "quality=%d, APPn=%d, APP_len=%d, " - "COM_len=%d, jpeg_markers=%d\n", - p->quality,p->APPn,p->APP_len, - p->COM_len,p->jpeg_markers); - ret=vfd->vidioc_s_jpegcomp(file, fh, p); - break; - } - case VIDIOC_G_PARM: - { - struct v4l2_streamparm *p=arg; - if (!vfd->vidioc_g_parm) - break; - ret=vfd->vidioc_g_parm(file, fh, p); - dbgarg (cmd, "type=%d\n", p->type); - break; - } - case VIDIOC_S_PARM: - { - struct v4l2_streamparm *p=arg; - if (!vfd->vidioc_s_parm) - break; - dbgarg (cmd, "type=%d\n", p->type); - ret=vfd->vidioc_s_parm(file, fh, p); - break; - } - case VIDIOC_G_TUNER: - { - struct v4l2_tuner *p=arg; - if (!vfd->vidioc_g_tuner) - break; - ret=vfd->vidioc_g_tuner(file, fh, p); - if (!ret) - dbgarg (cmd, "index=%d, name=%s, type=%d, " - "capability=%d, rangelow=%d, " - "rangehigh=%d, signal=%d, afc=%d, " - "rxsubchans=%d, audmode=%d\n", - p->index, p->name, p->type, - p->capability, p->rangelow, - p->rangehigh, p->rxsubchans, - p->audmode, p->signal, p->afc); - break; - } - case VIDIOC_S_TUNER: - { - struct v4l2_tuner *p=arg; - if (!vfd->vidioc_s_tuner) - break; - dbgarg (cmd, "index=%d, name=%s, type=%d, " - "capability=%d, rangelow=%d, rangehigh=%d, " - "signal=%d, afc=%d, rxsubchans=%d, " - "audmode=%d\n",p->index, p->name, p->type, - p->capability, p->rangelow,p->rangehigh, - p->rxsubchans, p->audmode, p->signal, - p->afc); - ret=vfd->vidioc_s_tuner(file, fh, p); - break; - } - case VIDIOC_G_FREQUENCY: - { - struct v4l2_frequency *p=arg; - if (!vfd->vidioc_g_frequency) - break; - ret=vfd->vidioc_g_frequency(file, fh, p); - if (!ret) - dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n", - p->tuner,p->type,p->frequency); - break; - } - case VIDIOC_S_FREQUENCY: - { - struct v4l2_frequency *p=arg; - if (!vfd->vidioc_s_frequency) - break; - dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n", - p->tuner,p->type,p->frequency); - ret=vfd->vidioc_s_frequency(file, fh, p); - break; - } - case VIDIOC_G_SLICED_VBI_CAP: - { - struct v4l2_sliced_vbi_cap *p=arg; - if (!vfd->vidioc_g_sliced_vbi_cap) - break; - ret=vfd->vidioc_g_sliced_vbi_cap(file, fh, p); - if (!ret) - dbgarg (cmd, "service_set=%d\n", p->service_set); - break; - } - case VIDIOC_LOG_STATUS: - { - if (!vfd->vidioc_log_status) - break; - ret=vfd->vidioc_log_status(file, fh); - break; - } - - /* --- Others --------------------------------------------- */ - - default: - ret=v4l_compat_translate_ioctl(inode,file,cmd,arg,__video_do_ioctl); - } - - if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { - if (ret<0) { - printk ("%s: err:\n", vfd->name); - v4l_print_ioctl(vfd->name, cmd); - } - } - - return ret; -} - -int video_ioctl2 (struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - char sbuf[128]; - void *mbuf = NULL; - void *parg = NULL; - int err = -EINVAL; - int is_ext_ctrl; - size_t ctrls_size = 0; - void __user *user_ptr = NULL; - -#ifdef __OLD_VIDIOC_ - cmd = video_fix_command(cmd); -#endif - is_ext_ctrl = (cmd == VIDIOC_S_EXT_CTRLS || cmd == VIDIOC_G_EXT_CTRLS || - cmd == VIDIOC_TRY_EXT_CTRLS); - - /* Copy arguments into temp kernel buffer */ - switch (_IOC_DIR(cmd)) { - case _IOC_NONE: - parg = NULL; - break; - case _IOC_READ: - case _IOC_WRITE: - case (_IOC_WRITE | _IOC_READ): - if (_IOC_SIZE(cmd) <= sizeof(sbuf)) { - parg = sbuf; - } else { - /* too big to allocate from stack */ - mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL); - if (NULL == mbuf) - return -ENOMEM; - parg = mbuf; - } - - err = -EFAULT; - if (_IOC_DIR(cmd) & _IOC_WRITE) - if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd))) - goto out; - break; - } - - if (is_ext_ctrl) { - struct v4l2_ext_controls *p = parg; - - /* In case of an error, tell the caller that it wasn't - a specific control that caused it. */ - p->error_idx = p->count; - user_ptr = (void __user *)p->controls; - if (p->count) { - ctrls_size = sizeof(struct v4l2_ext_control) * p->count; - /* Note: v4l2_ext_controls fits in sbuf[] so mbuf is still NULL. */ - mbuf = kmalloc(ctrls_size, GFP_KERNEL); - err = -ENOMEM; - if (NULL == mbuf) - goto out_ext_ctrl; - err = -EFAULT; - if (copy_from_user(mbuf, user_ptr, ctrls_size)) - goto out_ext_ctrl; - p->controls = mbuf; - } - } - - /* Handles IOCTL */ - err = __video_do_ioctl(inode, file, cmd, parg); - if (err == -ENOIOCTLCMD) - err = -EINVAL; - if (is_ext_ctrl) { - struct v4l2_ext_controls *p = parg; - - p->controls = (void *)user_ptr; - if (p->count && err == 0 && copy_to_user(user_ptr, mbuf, ctrls_size)) - err = -EFAULT; - goto out_ext_ctrl; - } - if (err < 0) - goto out; - -out_ext_ctrl: - /* Copy results into user buffer */ - switch (_IOC_DIR(cmd)) - { - case _IOC_READ: - case (_IOC_WRITE | _IOC_READ): - if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd))) - err = -EFAULT; - break; - } - -out: - kfree(mbuf); - return err; -} - - static struct file_operations video_fops; /** @@ -1512,7 +274,6 @@ int video_register_device(struct video_device *vfd, int type, int nr) int i=0; int base; int end; - int ret; char *name_base; switch(type) @@ -1538,8 +299,6 @@ int video_register_device(struct video_device *vfd, int type, int nr) name_base = "radio"; break; default: - printk(KERN_ERR "%s called with unknown type: %d\n", - __FUNCTION__, type); return -1; } @@ -1565,6 +324,10 @@ int video_register_device(struct video_device *vfd, int type, int nr) video_device[i]=vfd; vfd->minor=i; mutex_unlock(&videodev_lock); + + sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); + devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor), + S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name); mutex_init(&vfd->lock); /* sysfs class */ @@ -1573,19 +336,10 @@ int video_register_device(struct video_device *vfd, int type, int nr) vfd->class_dev.dev = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); - sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); - ret = class_device_register(&vfd->class_dev); - if (ret < 0) { - printk(KERN_ERR "%s: class_device_register failed\n", - __FUNCTION__); - goto fail_minor; - } - ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name); - if (ret < 0) { - printk(KERN_ERR "%s: class_device_create_file 'name' failed\n", - __FUNCTION__); - goto fail_classdev; - } + strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE); + class_device_register(&vfd->class_dev); + class_device_create_file(&vfd->class_dev, + &class_device_attr_name); #if 1 /* needed until all drivers are fixed */ @@ -1595,15 +349,6 @@ int video_register_device(struct video_device *vfd, int type, int nr) "http://lwn.net/Articles/36850/\n", vfd->name); #endif return 0; - -fail_classdev: - class_device_unregister(&vfd->class_dev); -fail_minor: - mutex_lock(&videodev_lock); - video_device[vfd->minor] = NULL; - vfd->minor = -1; - mutex_unlock(&videodev_lock); - return ret; } /** @@ -1620,14 +365,13 @@ void video_unregister_device(struct video_device *vfd) if(video_device[vfd->minor]!=vfd) panic("videodev: bad unregister"); + devfs_remove(vfd->devfs_name); video_device[vfd->minor]=NULL; class_device_unregister(&vfd->class_dev); mutex_unlock(&videodev_lock); } -/* - * Video fs operations - */ + static struct file_operations video_fops= { .owner = THIS_MODULE, @@ -1643,7 +387,7 @@ static int __init videodev_init(void) { int ret; - printk(KERN_INFO "Linux video capture interface: v2.00\n"); + printk(KERN_INFO "Linux video capture interface: v1.00\n"); if (register_chrdev(VIDEO_MAJOR, VIDEO_NAME, &video_fops)) { printk(KERN_WARNING "video_dev: unable to get major %d\n", VIDEO_MAJOR); return -EIO; @@ -1674,12 +418,11 @@ EXPORT_SYMBOL(video_devdata); EXPORT_SYMBOL(video_usercopy); EXPORT_SYMBOL(video_exclusive_open); EXPORT_SYMBOL(video_exclusive_release); -EXPORT_SYMBOL(video_ioctl2); EXPORT_SYMBOL(video_device_alloc); EXPORT_SYMBOL(video_device_release); -MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab "); -MODULE_DESCRIPTION("Device registrar for Video4Linux drivers v2"); +MODULE_AUTHOR("Alan Cox"); +MODULE_DESCRIPTION("Device registrar for Video4Linux drivers"); MODULE_LICENSE("GPL"); diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 268e69fde..a8c101494 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 841884af0..779db2677 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -48,15 +48,34 @@ #include "font.h" +#ifndef kzalloc +#define kzalloc(size, flags) \ +({ \ + void *__ret = kmalloc(size, flags); \ + if (__ret) \ + memset(__ret, 0, size); \ + __ret; \ +}) +#endif + +MODULE_DESCRIPTION("Video Technology Magazine Virtual Video Capture Board"); +MODULE_AUTHOR("Mauro Carvalho Chehab, Ted Walther and John Sokol"); +MODULE_LICENSE("Dual BSD/GPL"); + #define VIVI_MAJOR_VERSION 0 #define VIVI_MINOR_VERSION 4 #define VIVI_RELEASE 0 #define VIVI_VERSION KERNEL_VERSION(VIVI_MAJOR_VERSION, VIVI_MINOR_VERSION, VIVI_RELEASE) -/* Declare static vars that will be used as parameters */ -static unsigned int vid_limit = 16; /* Video memory limit, in Mb */ -static struct video_device vivi; /* Video device */ -static int video_nr = -1; /* /dev/videoN, -1 for autodetect */ +static int video_nr = -1; /* /dev/videoN, -1 for autodetect */ +module_param(video_nr, int, 0); + +static int debug = 0; +module_param(debug, int, 0); + +static unsigned int vid_limit = 16; +module_param(vid_limit,int,0644); +MODULE_PARM_DESC(vid_limit,"capture memory limit in megabytes"); /* supported controls */ static struct v4l2_queryctrl vivi_qctrl[] = { @@ -110,10 +129,10 @@ static struct v4l2_queryctrl vivi_qctrl[] = { static int qctl_regs[ARRAY_SIZE(vivi_qctrl)]; -#define dprintk(level,fmt, arg...) \ - do { \ - if (vivi.debug >= (level)) \ - printk(KERN_DEBUG "vivi: " fmt , ## arg); \ +#define dprintk(level,fmt, arg...) \ + do { \ + if (debug >= (level)) \ + printk(KERN_DEBUG "vivi: " fmt , ## arg); \ } while (0) /* ------------------------------------------------------------------ @@ -171,7 +190,7 @@ struct vivi_dev { /* various device info */ unsigned int resources; - struct video_device vfd; + struct video_device video_dev; struct vivi_dmaqueue vidq; @@ -229,8 +248,7 @@ static u8 bars[8][3] = { #define TSTAMP_MAX_Y TSTAMP_MIN_Y+15 #define TSTAMP_MIN_X 64 -static void prep_to_addr(struct sg_to_addr to_addr[], - struct videobuf_buffer *vb) +void prep_to_addr(struct sg_to_addr to_addr[],struct videobuf_buffer *vb) { int i, pos=0; @@ -241,7 +259,7 @@ static void prep_to_addr(struct sg_to_addr to_addr[], } } -static int get_addr_pos(int pos, int pages, struct sg_to_addr to_addr[]) +inline int get_addr_pos(int pos, int pages, struct sg_to_addr to_addr[]) { int p1=0,p2=pages-1,p3=pages/2; @@ -262,8 +280,8 @@ static int get_addr_pos(int pos, int pages, struct sg_to_addr to_addr[]) return (p1); } -static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, - int hmax, int line, char *timestr) +void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, + int hmax, int line, char *timestr) { int w,i,j,pos=inipos,pgpos,oldpg,y; char *p,*s,*basep; @@ -473,7 +491,7 @@ static void vivi_thread_tick(struct vivi_dmaqueue *dma_q) dprintk(1,"%s: %d buffers handled (should be 1)\n",__FUNCTION__,bc); } -static void vivi_sleep(struct vivi_dmaqueue *dma_q) +void vivi_sleep(struct vivi_dmaqueue *dma_q) { int timeout; DECLARE_WAITQUEUE(wait, current); @@ -508,7 +526,7 @@ static void vivi_sleep(struct vivi_dmaqueue *dma_q) try_to_freeze(); } -static int vivi_thread(void *data) +int vivi_thread(void *data) { struct vivi_dmaqueue *dma_q=data; @@ -524,7 +542,7 @@ static int vivi_thread(void *data) return 0; } -static int vivi_start_thread(struct vivi_dmaqueue *dma_q) +int vivi_start_thread(struct vivi_dmaqueue *dma_q) { dma_q->frame=0; dma_q->ini_jiffies=jiffies; @@ -542,7 +560,7 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) return 0; } -static void vivi_stop_thread(struct vivi_dmaqueue *dma_q) +void vivi_stop_thread(struct vivi_dmaqueue *dma_q) { dprintk(1,"%s\n",__FUNCTION__); /* shutdown control thread */ @@ -648,7 +666,8 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) return 0; } -static void free_buffer(struct videobuf_queue *vq, struct vivi_buffer *buf) +void +free_buffer(struct videobuf_queue *vq, struct vivi_buffer *buf) { dprintk(1,"%s\n",__FUNCTION__); @@ -772,8 +791,8 @@ static void buffer_release(struct videobuf_queue *vq, struct videobuf_buffer *vb free_buffer(vq,buf); } -static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents, - int direction) +int vivi_map_sg (void *dev, struct scatterlist *sg, int nents, + int direction) { int i; @@ -789,15 +808,15 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents, return nents; } -static int vivi_unmap_sg(void *dev,struct scatterlist *sglist,int nr_pages, - int direction) +int vivi_unmap_sg(void *dev,struct scatterlist *sglist,int nr_pages, + int direction) { dprintk(1,"%s\n",__FUNCTION__); return 0; } -static int vivi_dma_sync_sg(void *dev,struct scatterlist *sglist, int nr_pages, - int direction) +int vivi_dma_sync_sg(void *dev,struct scatterlist *sglist,int nr_pages, + int direction) { // dprintk(1,"%s\n",__FUNCTION__); @@ -821,80 +840,7 @@ static struct videobuf_queue_ops vivi_video_qops = { IOCTL handling ------------------------------------------------------------------*/ - -static int res_get(struct vivi_dev *dev, struct vivi_fh *fh) -{ - /* is it free? */ - down(&dev->lock); - if (dev->resources) { - /* no, someone else uses it */ - up(&dev->lock); - return 0; - } - /* it's free, grab it */ - dev->resources =1; - dprintk(1,"res: get\n"); - up(&dev->lock); - return 1; -} - -static int res_locked(struct vivi_dev *dev) -{ - return (dev->resources); -} - -static void res_free(struct vivi_dev *dev, struct vivi_fh *fh) -{ - down(&dev->lock); - dev->resources = 0; - dprintk(1,"res: put\n"); - up(&dev->lock); -} - -/* ------------------------------------------------------------------ - IOCTL vidioc handling - ------------------------------------------------------------------*/ -static int vidioc_querycap (struct file *file, void *priv, - struct v4l2_capability *cap) -{ - strcpy(cap->driver, "vivi"); - strcpy(cap->card, "vivi"); - cap->version = VIVI_VERSION; - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | - V4L2_CAP_STREAMING | - V4L2_CAP_READWRITE; - return 0; -} - -static int vidioc_enum_fmt_cap (struct file *file, void *priv, - struct v4l2_fmtdesc *f) -{ - if (f->index > 0) - return -EINVAL; - - strlcpy(f->description,format.name,sizeof(f->description)); - f->pixelformat = format.fourcc; - return 0; -} - -static int vidioc_g_fmt_cap (struct file *file, void *priv, - struct v4l2_format *f) -{ - struct vivi_fh *fh=priv; - - f->fmt.pix.width = fh->width; - f->fmt.pix.height = fh->height; - f->fmt.pix.field = fh->vb_vidq.field; - f->fmt.pix.pixelformat = fh->fmt->fourcc; - f->fmt.pix.bytesperline = - (f->fmt.pix.width * fh->fmt->depth) >> 3; - f->fmt.pix.sizeimage = - f->fmt.pix.height * f->fmt.pix.bytesperline; - - return (0); -} - -static int vidioc_try_fmt_cap (struct file *file, void *priv, +static int vivi_try_fmt(struct vivi_dev *dev, struct vivi_fh *fh, struct v4l2_format *f) { struct vivi_fmt *fmt; @@ -902,8 +848,7 @@ static int vidioc_try_fmt_cap (struct file *file, void *priv, unsigned int maxw, maxh; if (format.fourcc != f->fmt.pix.pixelformat) { - dprintk(1,"Fourcc format (0x%08x) invalid. Driver accepts " - "only 0x%08x\n",f->fmt.pix.pixelformat,format.fourcc); + dprintk(1,"Fourcc format invalid.\n"); return -EINVAL; } fmt=&format; @@ -939,196 +884,356 @@ static int vidioc_try_fmt_cap (struct file *file, void *priv, return 0; } -/*FIXME: This seems to be generic enough to be at videodev2 */ -static int vidioc_s_fmt_cap (struct file *file, void *priv, - struct v4l2_format *f) +static int res_get(struct vivi_dev *dev, struct vivi_fh *fh) { - struct vivi_fh *fh=priv; - int ret = vidioc_try_fmt_cap(file,fh,f); - if (ret < 0) - return (ret); - - fh->fmt = &format; - fh->width = f->fmt.pix.width; - fh->height = f->fmt.pix.height; - fh->vb_vidq.field = f->fmt.pix.field; - fh->type = f->type; - - return (0); + /* is it free? */ + down(&dev->lock); + if (dev->resources) { + /* no, someone else uses it */ + up(&dev->lock); + return 0; + } + /* it's free, grab it */ + dev->resources =1; + dprintk(1,"res: get\n"); + up(&dev->lock); + return 1; } -static int vidioc_reqbufs (struct file *file, void *priv, struct v4l2_requestbuffers *p) +static inline int res_locked(struct vivi_dev *dev) { - struct vivi_fh *fh=priv; - - return (videobuf_reqbufs(&fh->vb_vidq, p)); + return (dev->resources); } -static int vidioc_querybuf (struct file *file, void *priv, struct v4l2_buffer *p) +static void res_free(struct vivi_dev *dev, struct vivi_fh *fh) { - struct vivi_fh *fh=priv; - - return (videobuf_querybuf(&fh->vb_vidq, p)); + down(&dev->lock); + dev->resources = 0; + dprintk(1,"res: put\n"); + up(&dev->lock); } -static int vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *p) +static int vivi_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg) { - struct vivi_fh *fh=priv; + struct vivi_fh *fh = file->private_data; + struct vivi_dev *dev = fh->dev; + int ret=0; - return (videobuf_qbuf(&fh->vb_vidq, p)); -} + if (debug) { + if (_IOC_DIR(cmd) & _IOC_WRITE) + v4l_printk_ioctl_arg("vivi(w)",cmd, arg); + else if (!_IOC_DIR(cmd) & _IOC_READ) { + v4l_print_ioctl("vivi", cmd); + } + } -static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p) -{ - struct vivi_fh *fh=priv; + switch(cmd) { + /* --- capabilities ------------------------------------------ */ + case VIDIOC_QUERYCAP: + { + struct v4l2_capability *cap = (struct v4l2_capability*)arg; + + memset(cap, 0, sizeof(*cap)); + + strcpy(cap->driver, "vivi"); + strcpy(cap->card, "vivi"); + cap->version = VIVI_VERSION; + cap->capabilities = + V4L2_CAP_VIDEO_CAPTURE | + V4L2_CAP_STREAMING | + V4L2_CAP_READWRITE; + break; + } + /* --- capture ioctls ---------------------------------------- */ + case VIDIOC_ENUM_FMT: + { + struct v4l2_fmtdesc *f = arg; + enum v4l2_buf_type type; + unsigned int index; - return (videobuf_dqbuf(&fh->vb_vidq, p, - file->f_flags & O_NONBLOCK)); -} + index = f->index; + type = f->type; -#ifdef CONFIG_VIDEO_V4L1_COMPAT -static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) -{ - struct vivi_fh *fh=priv; - struct videobuf_queue *q=&fh->vb_vidq; - struct v4l2_requestbuffers req; - unsigned int i, ret; - - req.type = q->type; - req.count = 8; - req.memory = V4L2_MEMORY_MMAP; - ret = videobuf_reqbufs(q,&req); - if (ret < 0) - return (ret); - - mbuf->frames = req.count; - mbuf->size = 0; - for (i = 0; i < mbuf->frames; i++) { - mbuf->offsets[i] = q->bufs[i]->boff; - mbuf->size += q->bufs[i]->bsize; - } - return (0); -} -#endif + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } -static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) -{ - struct vivi_fh *fh=priv; - struct vivi_dev *dev = fh->dev; + switch (type) { + case V4L2_BUF_TYPE_VIDEO_CAPTURE: + if (index > 0){ + ret=-EINVAL; + break; + } + memset(f,0,sizeof(*f)); - if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - if (i != fh->type) - return -EINVAL; + f->index = index; + f->type = type; + strlcpy(f->description,format.name,sizeof(f->description)); + f->pixelformat = format.fourcc; + break; + default: + ret=-EINVAL; + } + break; + } + case VIDIOC_G_FMT: + { + struct v4l2_format *f = (struct v4l2_format *)arg; - if (!res_get(dev,fh)) - return -EBUSY; - return (videobuf_streamon(&fh->vb_vidq)); -} + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } -static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) -{ - struct vivi_fh *fh=priv; - struct vivi_dev *dev = fh->dev; + memset(&f->fmt.pix,0,sizeof(f->fmt.pix)); + f->fmt.pix.width = fh->width; + f->fmt.pix.height = fh->height; + f->fmt.pix.field = fh->vb_vidq.field; + f->fmt.pix.pixelformat = fh->fmt->fourcc; + f->fmt.pix.bytesperline = + (f->fmt.pix.width * fh->fmt->depth) >> 3; + f->fmt.pix.sizeimage = + f->fmt.pix.height * f->fmt.pix.bytesperline; + break; + } + case VIDIOC_S_FMT: + { + struct v4l2_format *f = arg; - if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - if (i != fh->type) - return -EINVAL; + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + dprintk(1,"Only capture supported.\n"); + ret=-EINVAL; + break; + } - videobuf_streamoff(&fh->vb_vidq); - res_free(dev,fh); + ret = vivi_try_fmt(dev,fh,f); + if (ret < 0) + break; - return (0); -} + fh->fmt = &format; + fh->width = f->fmt.pix.width; + fh->height = f->fmt.pix.height; + fh->vb_vidq.field = f->fmt.pix.field; + fh->type = f->type; -static struct v4l2_tvnorm tvnorms[] = { + break; + } + case VIDIOC_TRY_FMT: { - .name = "NTSC-M", - .id = V4L2_STD_NTSC_M, + struct v4l2_format *f = arg; + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + + ret=vivi_try_fmt(dev,fh,f); + break; } -}; + case VIDIOC_REQBUFS: + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + ret=videobuf_reqbufs(&fh->vb_vidq, arg); + break; + case VIDIOC_QUERYBUF: + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + ret=videobuf_querybuf(&fh->vb_vidq, arg); + break; + case VIDIOC_QBUF: + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + ret=videobuf_qbuf(&fh->vb_vidq, arg); + break; + case VIDIOC_DQBUF: + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + ret=videobuf_dqbuf(&fh->vb_vidq, arg, + file->f_flags & O_NONBLOCK); + break; +#ifdef HAVE_V4L1 + /* --- streaming capture ------------------------------------- */ + case VIDIOCGMBUF: + { + struct video_mbuf *mbuf = arg; + struct videobuf_queue *q=&fh->vb_vidq; + struct v4l2_requestbuffers req; + unsigned int i; + + memset(&req,0,sizeof(req)); + req.type = q->type; + req.count = 8; + req.memory = V4L2_MEMORY_MMAP; + ret = videobuf_reqbufs(q,&req); + if (ret < 0) + break; + memset(mbuf,0,sizeof(*mbuf)); + mbuf->frames = req.count; + mbuf->size = 0; + for (i = 0; i < mbuf->frames; i++) { + mbuf->offsets[i] = q->bufs[i]->boff; + mbuf->size += q->bufs[i]->bsize; + } + break; + } +#endif + case VIDIOC_STREAMON: + { + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + return -EINVAL; + if (!res_get(dev,fh)) + return -EBUSY; + ret=videobuf_streamon(&fh->vb_vidq); + break; + } + case VIDIOC_STREAMOFF: + { + if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { + ret=-EINVAL; + break; + } + ret = videobuf_streamoff(&fh->vb_vidq); + if (ret < 0) + break; + res_free(dev,fh); + break; + } + /* ---------- tv norms ---------- */ + case VIDIOC_ENUMSTD: + { + struct v4l2_standard *e = arg; -static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id a) -{ + if (e->index>0) { + ret=-EINVAL; + break; + } + ret = v4l2_video_std_construct(e, V4L2_STD_NTSC_M, "NTSC-M"); - return 0; -} + /* Allows vivi to use different fps from video std */ + e->frameperiod.numerator = WAKE_NUMERATOR; + e->frameperiod.denominator = WAKE_DENOMINATOR; -/* only one input in this sample driver */ -static int vidioc_enum_input (struct file *file, void *priv, - struct v4l2_input *inp) -{ - if (inp->index != 0) - return -EINVAL; + break; + } + case VIDIOC_G_STD: + { + v4l2_std_id *id = arg; - inp->type = V4L2_INPUT_TYPE_CAMERA; - inp->std = V4L2_STD_NTSC_M; - strcpy(inp->name,"Camera"); + *id = V4L2_STD_NTSC_M; + break; + } + case VIDIOC_S_STD: + { + break; + } + /* ------ input switching ---------- */ + case VIDIOC_ENUMINPUT: + { /* only one input in this sample driver */ + struct v4l2_input *inp = arg; - return (0); -} + if (inp->index != 0) { + ret=-EINVAL; + break; + } + memset(inp, 0, sizeof(*inp)); -static int vidioc_g_input (struct file *file, void *priv, unsigned int *i) -{ - *i = 0; + inp->index = 0; + inp->type = V4L2_INPUT_TYPE_CAMERA; + inp->std = V4L2_STD_NTSC_M; + strcpy(inp->name,"Camera"); + break; + } + case VIDIOC_G_INPUT: + { + unsigned int *i = arg; - return (0); -} -static int vidioc_s_input (struct file *file, void *priv, unsigned int i) -{ - if (i > 0) - return -EINVAL; + *i = 0; + break; + } + case VIDIOC_S_INPUT: + { + unsigned int *i = arg; - return (0); -} + if (*i > 0) + ret=-EINVAL; + break; + } /* --- controls ---------------------------------------------- */ -static int vidioc_queryctrl (struct file *file, void *priv, - struct v4l2_queryctrl *qc) -{ - int i; + case VIDIOC_QUERYCTRL: + { + struct v4l2_queryctrl *qc = arg; + int i; + + for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) + if (qc->id && qc->id == vivi_qctrl[i].id) { + memcpy(qc, &(vivi_qctrl[i]), + sizeof(*qc)); + break; + } - for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) - if (qc->id && qc->id == vivi_qctrl[i].id) { - memcpy(qc, &(vivi_qctrl[i]), - sizeof(*qc)); - return (0); - } + ret=-EINVAL; + break; + } + case VIDIOC_G_CTRL: + { + struct v4l2_control *ctrl = arg; + int i; - return -EINVAL; -} + for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) + if (ctrl->id == vivi_qctrl[i].id) { + ctrl->value=qctl_regs[i]; + break; + } -static int vidioc_g_ctrl (struct file *file, void *priv, - struct v4l2_control *ctrl) -{ - int i; + ret=-EINVAL; + break; + } + case VIDIOC_S_CTRL: + { + struct v4l2_control *ctrl = arg; + int i; + for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) + if (ctrl->id == vivi_qctrl[i].id) { + if (ctrl->value < + vivi_qctrl[i].minimum + || ctrl->value > + vivi_qctrl[i].maximum) { + ret=-ERANGE; + break; + } + qctl_regs[i]=ctrl->value; + break; + } + ret=-EINVAL; + break; + } + default: + ret=v4l_compat_translate_ioctl(inode,file,cmd,arg,vivi_do_ioctl); + } - for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) - if (ctrl->id == vivi_qctrl[i].id) { - ctrl->value=qctl_regs[i]; - return (0); - } + if (debug) { + if (ret<0) { + v4l_print_ioctl("vivi(err)", cmd); + dprintk(1,"errcode=%d\n",ret); + } else if (_IOC_DIR(cmd) & _IOC_READ) + v4l_printk_ioctl_arg("vivi(r)",cmd, arg); + } - return -EINVAL; + return ret; } -static int vidioc_s_ctrl (struct file *file, void *priv, - struct v4l2_control *ctrl) -{ - int i; - for (i = 0; i < ARRAY_SIZE(vivi_qctrl); i++) - if (ctrl->id == vivi_qctrl[i].id) { - if (ctrl->value < - vivi_qctrl[i].minimum - || ctrl->value > - vivi_qctrl[i].maximum) { - return (-ERANGE); - } - qctl_regs[i]=ctrl->value; - return (0); - } - return -EINVAL; +static int vivi_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +{ + return video_usercopy(inode, file, cmd, arg, vivi_do_ioctl); } /* ------------------------------------------------------------------ @@ -1150,7 +1255,7 @@ static int vivi_open(struct inode *inode, struct file *file) list_for_each(list,&vivi_devlist) { h = list_entry(list, struct vivi_dev, vivi_devlist); - if (h->vfd.minor == minor) { + if (h->video_dev.minor == minor) { dev = h; type = V4L2_BUF_TYPE_VIDEO_CAPTURE; } @@ -1159,7 +1264,6 @@ static int vivi_open(struct inode *inode, struct file *file) return -ENODEV; - /* If more than one user, mutex should be added */ dev->users++; @@ -1175,7 +1279,6 @@ static int vivi_open(struct inode *inode, struct file *file) file->private_data = fh; fh->dev = dev; - fh->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; fh->fmt = &format; fh->width = 640; @@ -1211,7 +1314,7 @@ static int vivi_open(struct inode *inode, struct file *file) static ssize_t vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { - struct vivi_fh *fh = file->private_data; + struct vivi_fh *fh = file->private_data; if (fh->type==V4L2_BUF_TYPE_VIDEO_CAPTURE) { if (res_locked(fh->dev)) @@ -1225,8 +1328,8 @@ vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos) static unsigned int vivi_poll(struct file *file, struct poll_table_struct *wait) { - struct vivi_fh *fh = file->private_data; - struct vivi_buffer *buf; + struct vivi_fh *fh = file->private_data; + struct vivi_buffer *buf; dprintk(1,"%s\n",__FUNCTION__); @@ -1255,8 +1358,8 @@ vivi_poll(struct file *file, struct poll_table_struct *wait) static int vivi_release(struct inode *inode, struct file *file) { - struct vivi_fh *fh = file->private_data; - struct vivi_dev *dev = fh->dev; + struct vivi_fh *fh = file->private_data; + struct vivi_dev *dev = fh->dev; struct vivi_dmaqueue *vidq = &dev->vidq; int minor = iminor(inode); @@ -1276,7 +1379,7 @@ static int vivi_release(struct inode *inode, struct file *file) static int vivi_mmap(struct file *file, struct vm_area_struct * vma) { - struct vivi_fh *fh = file->private_data; + struct vivi_fh *fh = file->private_data; int ret; dprintk (1,"mmap called, vma=0x%08lx\n",(unsigned long)vma); @@ -1297,44 +1400,20 @@ static struct file_operations vivi_fops = { .release = vivi_release, .read = vivi_read, .poll = vivi_poll, - .ioctl = video_ioctl2, /* V4L2 ioctl handler */ + .ioctl = vivi_ioctl, .mmap = vivi_mmap, .llseek = no_llseek, }; static struct video_device vivi = { - .name = "vivi", + .name = "VTM Virtual Video Capture Board", .type = VID_TYPE_CAPTURE, .hardware = 0, .fops = &vivi_fops, .minor = -1, // .release = video_device_release, - - .vidioc_querycap = vidioc_querycap, - .vidioc_enum_fmt_cap = vidioc_enum_fmt_cap, - .vidioc_g_fmt_cap = vidioc_g_fmt_cap, - .vidioc_try_fmt_cap = vidioc_try_fmt_cap, - .vidioc_s_fmt_cap = vidioc_s_fmt_cap, - .vidioc_reqbufs = vidioc_reqbufs, - .vidioc_querybuf = vidioc_querybuf, - .vidioc_qbuf = vidioc_qbuf, - .vidioc_dqbuf = vidioc_dqbuf, - .vidioc_s_std = vidioc_s_std, - .vidioc_enum_input = vidioc_enum_input, - .vidioc_g_input = vidioc_g_input, - .vidioc_s_input = vidioc_s_input, - .vidioc_queryctrl = vidioc_queryctrl, - .vidioc_g_ctrl = vidioc_g_ctrl, - .vidioc_s_ctrl = vidioc_s_ctrl, - .vidioc_streamon = vidioc_streamon, - .vidioc_streamoff = vidioc_streamoff, -#ifdef CONFIG_VIDEO_V4L1_COMPAT - .vidiocgmbuf = vidiocgmbuf, -#endif - .tvnorms = tvnorms, - .tvnormsize = ARRAY_SIZE(tvnorms), }; -/* ----------------------------------------------------------------- +/* ------------------------------------------------------------------ Initialization and module stuff ------------------------------------------------------------------*/ @@ -1378,16 +1457,3 @@ static void __exit vivi_exit(void) module_init(vivi_init); module_exit(vivi_exit); - -MODULE_DESCRIPTION("Video Technology Magazine Virtual Video Capture Board"); -MODULE_AUTHOR("Mauro Carvalho Chehab, Ted Walther and John Sokol"); -MODULE_LICENSE("Dual BSD/GPL"); - -module_param(video_nr, int, 0); - -module_param_named(debug,vivi.debug, int, 0644); -MODULE_PARM_DESC(debug,"activates debug info"); - -module_param(vid_limit,int,0644); -MODULE_PARM_DESC(vid_limit,"capture memory limit in megabytes"); - diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 1eca7e65d..40b205b91 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c @@ -34,7 +34,6 @@ #define I2C_NAME(x) (x)->name #include -#include #include #define I2C_VPX3220 0x86 diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index 4bdc886ab..80ef8a1b8 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c @@ -58,7 +58,6 @@ #include #include #include -#include #include //#define DEBUG // Undef me for production diff --git a/drivers/media/video/w9968cf.h b/drivers/media/video/w9968cf.h index ec7696e8f..2836b45ec 100644 --- a/drivers/media/video/w9968cf.h +++ b/drivers/media/video/w9968cf.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/media/video/zc0301/Kconfig b/drivers/media/video/zc0301/Kconfig index a859a6920..115833e4f 100644 --- a/drivers/media/video/zc0301/Kconfig +++ b/drivers/media/video/zc0301/Kconfig @@ -1,9 +1,9 @@ config USB_ZC0301 - tristate "USB ZC0301[P] Image Processor and Control Chip support" + tristate "USB ZC0301 Image Processor and Control Chip support" depends on USB && VIDEO_V4L1 ---help--- - Say Y here if you want support for cameras based on the ZC0301 or - ZC0301P Image Processors and Control Chips. + Say Y here if you want support for cameras based on the ZC0301 + Image Processor and Control Chip. See for more info. diff --git a/drivers/media/video/zc0301/Makefile b/drivers/media/video/zc0301/Makefile index d9e6d97fa..d749199d8 100644 --- a/drivers/media/video/zc0301/Makefile +++ b/drivers/media/video/zc0301/Makefile @@ -1,3 +1,3 @@ -zc0301-objs := zc0301_core.o zc0301_pb0330.o zc0301_pas202bcb.o +zc0301-objs := zc0301_core.o zc0301_pas202bcb.o obj-$(CONFIG_USB_ZC0301) += zc0301.o diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c index 1b2be2d2a..0fad39754 100644 --- a/drivers/media/video/zc0301/zc0301_core.c +++ b/drivers/media/video/zc0301/zc0301_core.c @@ -1,5 +1,5 @@ /*************************************************************************** - * Video4Linux2 driver for ZC0301[P] Image Processor and Control Chip * + * Video4Linux2 driver for ZC0301 Image Processor and Control Chip * * * * Copyright (C) 2006 by Luca Risolia * * * @@ -47,13 +47,13 @@ /*****************************************************************************/ -#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301[P] " \ +#define ZC0301_MODULE_NAME "V4L2 driver for ZC0301 " \ "Image Processor and Control Chip" #define ZC0301_MODULE_AUTHOR "(C) 2006 Luca Risolia" #define ZC0301_AUTHOR_EMAIL "" #define ZC0301_MODULE_LICENSE "GPL" -#define ZC0301_MODULE_VERSION "1:1.05" -#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 5) +#define ZC0301_MODULE_VERSION "1:1.03" +#define ZC0301_MODULE_VERSION_CODE KERNEL_VERSION(1, 0, 3) /*****************************************************************************/ @@ -427,11 +427,10 @@ resubmit_urb: static int zc0301_start_transfer(struct zc0301_device* cam) { struct usb_device *udev = cam->usbdev; - struct usb_host_interface* altsetting = usb_altnum_to_altsetting( - usb_ifnum_to_if(udev, 0), - ZC0301_ALTERNATE_SETTING); - const unsigned int psz = altsetting->endpoint[0].desc.wMaxPacketSize; struct urb* urb; + const unsigned int wMaxPacketSize[] = {0, 128, 192, 256, 384, + 512, 768, 1023}; + const unsigned int psz = wMaxPacketSize[ZC0301_ALTERNATE_SETTING]; s8 i, j; int err = 0; @@ -1773,9 +1772,11 @@ static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_CTRL: return zc0301_vidioc_g_ctrl(cam, arg); + case VIDIOC_S_CTRL_OLD: case VIDIOC_S_CTRL: return zc0301_vidioc_s_ctrl(cam, arg); + case VIDIOC_CROPCAP_OLD: case VIDIOC_CROPCAP: return zc0301_vidioc_cropcap(cam, arg); @@ -1822,6 +1823,7 @@ static int zc0301_ioctl_v4l2(struct inode* inode, struct file* filp, case VIDIOC_G_PARM: return zc0301_vidioc_g_parm(cam, arg); + case VIDIOC_S_PARM_OLD: case VIDIOC_S_PARM: return zc0301_vidioc_s_parm(cam, arg); @@ -1912,7 +1914,7 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) mutex_init(&cam->dev_mutex); - DBG(2, "ZC0301[P] Image Processor and Control Chip detected " + DBG(2, "ZC0301 Image Processor and Control Chip detected " "(vid/pid 0x%04X/0x%04X)",id->idVendor, id->idProduct); for (i = 0; zc0301_sensor_table[i]; i++) { @@ -1934,7 +1936,7 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) cam->state |= DEV_MISCONFIGURED; } - strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera"); + strcpy(cam->v4ldev->name, "ZC0301 PC Camera"); cam->v4ldev->owner = THIS_MODULE; cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; cam->v4ldev->hardware = 0; diff --git a/drivers/media/video/zc0301/zc0301_pas202bcb.c b/drivers/media/video/zc0301/zc0301_pas202bcb.c index ecfd39a56..eaadf0252 100644 --- a/drivers/media/video/zc0301/zc0301_pas202bcb.c +++ b/drivers/media/video/zc0301/zc0301_pas202bcb.c @@ -1,10 +1,10 @@ /*************************************************************************** - * Plug-in for PAS202BCB image sensor connected to the ZC0301[P] Image * + * Plug-in for PAS202BCB image sensor connected to the ZC030! Image * * Processor and Control Chip * * * * Copyright (C) 2006 by Luca Risolia * * * - * Initialization values of the ZC0301[P] have been taken from the SPCA5XX * + * Initialization values of the ZC0301 have been taken from the SPCA5XX * * driver maintained by Michel Xhaard * * * * This program is free software; you can redistribute it and/or modify * diff --git a/drivers/media/video/zc0301/zc0301_pb0330.c b/drivers/media/video/zc0301/zc0301_pb0330.c deleted file mode 100644 index ed8542e6c..000000000 --- a/drivers/media/video/zc0301/zc0301_pb0330.c +++ /dev/null @@ -1,187 +0,0 @@ -/*************************************************************************** - * Plug-in for PB-0330 image sensor connected to the ZC0301[P] Image * - * Processor and Control Chip * - * * - * Copyright (C) 2006 by Luca Risolia * - * * - * Initialization values of the ZC0301[P] have been taken from the SPCA5XX * - * driver maintained by Michel Xhaard * - * * - * 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 -#include "zc0301_sensor.h" - - -static struct zc0301_sensor pb0330; - - -static int pb0330_init(struct zc0301_device* cam) -{ - int err = 0; - - err += zc0301_write_reg(cam, 0x0000, 0x01); - err += zc0301_write_reg(cam, 0x0008, 0x03); - err += zc0301_write_reg(cam, 0x0010, 0x0A); - err += zc0301_write_reg(cam, 0x0002, 0x00); - err += zc0301_write_reg(cam, 0x0003, 0x02); - err += zc0301_write_reg(cam, 0x0004, 0x80); - err += zc0301_write_reg(cam, 0x0005, 0x01); - err += zc0301_write_reg(cam, 0x0006, 0xE0); - err += zc0301_write_reg(cam, 0x0001, 0x01); - err += zc0301_write_reg(cam, 0x0012, 0x05); - err += zc0301_write_reg(cam, 0x0012, 0x07); - err += zc0301_write_reg(cam, 0x0098, 0x00); - err += zc0301_write_reg(cam, 0x009A, 0x00); - err += zc0301_write_reg(cam, 0x011A, 0x00); - err += zc0301_write_reg(cam, 0x011C, 0x00); - err += zc0301_write_reg(cam, 0x0012, 0x05); - - err += zc0301_i2c_write(cam, 0x01, 0x0006); - err += zc0301_i2c_write(cam, 0x02, 0x0011); - err += zc0301_i2c_write(cam, 0x03, 0x01E7); - err += zc0301_i2c_write(cam, 0x04, 0x0287); - err += zc0301_i2c_write(cam, 0x06, 0x0003); - err += zc0301_i2c_write(cam, 0x07, 0x3002); - err += zc0301_i2c_write(cam, 0x20, 0x1100); - err += zc0301_i2c_write(cam, 0x2F, 0xF7B0); - err += zc0301_i2c_write(cam, 0x30, 0x0005); - err += zc0301_i2c_write(cam, 0x31, 0x0000); - err += zc0301_i2c_write(cam, 0x34, 0x0100); - err += zc0301_i2c_write(cam, 0x35, 0x0060); - err += zc0301_i2c_write(cam, 0x3D, 0x068F); - err += zc0301_i2c_write(cam, 0x40, 0x01E0); - err += zc0301_i2c_write(cam, 0x58, 0x0078); - err += zc0301_i2c_write(cam, 0x62, 0x0411); - - err += zc0301_write_reg(cam, 0x0087, 0x10); - err += zc0301_write_reg(cam, 0x0101, 0x37); - err += zc0301_write_reg(cam, 0x0012, 0x05); - err += zc0301_write_reg(cam, 0x0100, 0x0D); - err += zc0301_write_reg(cam, 0x0189, 0x06); - err += zc0301_write_reg(cam, 0x01AD, 0x00); - err += zc0301_write_reg(cam, 0x01C5, 0x03); - err += zc0301_write_reg(cam, 0x01CB, 0x13); - err += zc0301_write_reg(cam, 0x0250, 0x08); - err += zc0301_write_reg(cam, 0x0301, 0x08); - err += zc0301_write_reg(cam, 0x01A8, 0x60); - err += zc0301_write_reg(cam, 0x018D, 0x6C); - err += zc0301_write_reg(cam, 0x01AD, 0x09); - err += zc0301_write_reg(cam, 0x01AE, 0x15); - err += zc0301_write_reg(cam, 0x010A, 0x50); - err += zc0301_write_reg(cam, 0x010B, 0xF8); - err += zc0301_write_reg(cam, 0x010C, 0xF8); - err += zc0301_write_reg(cam, 0x010D, 0xF8); - err += zc0301_write_reg(cam, 0x010E, 0x50); - err += zc0301_write_reg(cam, 0x010F, 0xF8); - err += zc0301_write_reg(cam, 0x0110, 0xF8); - err += zc0301_write_reg(cam, 0x0111, 0xF8); - err += zc0301_write_reg(cam, 0x0112, 0x50); - err += zc0301_write_reg(cam, 0x0008, 0x03); - err += zc0301_write_reg(cam, 0x01C6, 0x08); - err += zc0301_write_reg(cam, 0x01CB, 0x0F); - err += zc0301_write_reg(cam, 0x010A, 0x50); - err += zc0301_write_reg(cam, 0x010B, 0xF8); - err += zc0301_write_reg(cam, 0x010C, 0xF8); - err += zc0301_write_reg(cam, 0x010D, 0xF8); - err += zc0301_write_reg(cam, 0x010E, 0x50); - err += zc0301_write_reg(cam, 0x010F, 0xF8); - err += zc0301_write_reg(cam, 0x0110, 0xF8); - err += zc0301_write_reg(cam, 0x0111, 0xF8); - err += zc0301_write_reg(cam, 0x0112, 0x50); - err += zc0301_write_reg(cam, 0x0180, 0x00); - err += zc0301_write_reg(cam, 0x0019, 0x00); - - err += zc0301_i2c_write(cam, 0x05, 0x0066); - err += zc0301_i2c_write(cam, 0x09, 0x02B2); - err += zc0301_i2c_write(cam, 0x10, 0x0002); - - err += zc0301_write_reg(cam, 0x011D, 0x60); - err += zc0301_write_reg(cam, 0x0190, 0x00); - err += zc0301_write_reg(cam, 0x0191, 0x07); - err += zc0301_write_reg(cam, 0x0192, 0x8C); - err += zc0301_write_reg(cam, 0x0195, 0x00); - err += zc0301_write_reg(cam, 0x0196, 0x00); - err += zc0301_write_reg(cam, 0x0197, 0x8A); - err += zc0301_write_reg(cam, 0x018C, 0x10); - err += zc0301_write_reg(cam, 0x018F, 0x20); - err += zc0301_write_reg(cam, 0x01A9, 0x14); - err += zc0301_write_reg(cam, 0x01AA, 0x24); - err += zc0301_write_reg(cam, 0x001D, 0xD7); - err += zc0301_write_reg(cam, 0x001E, 0xF0); - err += zc0301_write_reg(cam, 0x001F, 0xF8); - err += zc0301_write_reg(cam, 0x0020, 0xFF); - err += zc0301_write_reg(cam, 0x01AD, 0x09); - err += zc0301_write_reg(cam, 0x01AE, 0x15); - err += zc0301_write_reg(cam, 0x0180, 0x40); - err += zc0301_write_reg(cam, 0x0180, 0x42); - - msleep(100); - - return err; -} - - -static struct zc0301_sensor pb0330 = { - .name = "PB-0330", - .init = &pb0330_init, - .cropcap = { - .bounds = { - .left = 0, - .top = 0, - .width = 640, - .height = 480, - }, - .defrect = { - .left = 0, - .top = 0, - .width = 640, - .height = 480, - }, - }, - .pix_format = { - .width = 640, - .height = 480, - .pixelformat = V4L2_PIX_FMT_JPEG, - .priv = 8, - }, -}; - - -int zc0301_probe_pb0330(struct zc0301_device* cam) -{ - int r0, err = 0; - - err += zc0301_write_reg(cam, 0x0000, 0x01); - err += zc0301_write_reg(cam, 0x0010, 0x0a); - err += zc0301_write_reg(cam, 0x0001, 0x01); - err += zc0301_write_reg(cam, 0x0012, 0x03); - err += zc0301_write_reg(cam, 0x0012, 0x01); - - msleep(10); - - r0 = zc0301_i2c_read(cam, 0x00, 2); - - if (r0 < 0 || err) - return -EIO; - - if (r0 != 0x8243) - return -ENODEV; - - zc0301_attach_sensor(cam, &pb0330); - - return 0; -} diff --git a/drivers/media/video/zc0301/zc0301_sensor.h b/drivers/media/video/zc0301/zc0301_sensor.h index 4363a915b..1f95c28b1 100644 --- a/drivers/media/video/zc0301/zc0301_sensor.h +++ b/drivers/media/video/zc0301/zc0301_sensor.h @@ -1,5 +1,5 @@ /*************************************************************************** - * API for image sensors connected to the ZC0301 Image Processor and * + * API for image sensors connected to the ZC030! Image Processor and * * Control Chip * * * * Copyright (C) 2006 by Luca Risolia * @@ -35,13 +35,11 @@ struct zc0301_sensor; /*****************************************************************************/ extern int zc0301_probe_pas202bcb(struct zc0301_device* cam); -extern int zc0301_probe_pb0330(struct zc0301_device* cam); #define ZC0301_SENSOR_TABLE \ /* Weak detections must go at the end of the list */ \ static int (*zc0301_sensor_table[])(struct zc0301_device*) = { \ &zc0301_probe_pas202bcb, \ - &zc0301_probe_pb0330, \ NULL, \ }; @@ -60,28 +58,14 @@ zc0301_attach_sensor(struct zc0301_device* cam, struct zc0301_sensor* sensor); #define ZC0301_ID_TABLE \ static const struct usb_device_id zc0301_id_table[] = { \ - { ZC0301_USB_DEVICE(0x041e, 0x4017, 0xff), }, /* ICM105 */ \ + { ZC0301_USB_DEVICE(0x041e, 0x4017, 0xff), }, \ { ZC0301_USB_DEVICE(0x041e, 0x401c, 0xff), }, /* PAS106 */ \ - { ZC0301_USB_DEVICE(0x041e, 0x401e, 0xff), }, /* HV7131 */ \ - { ZC0301_USB_DEVICE(0x041e, 0x401f, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x041e, 0x4022, 0xff), }, \ + { ZC0301_USB_DEVICE(0x041e, 0x401e, 0xff), }, /* HV7131B */ \ { ZC0301_USB_DEVICE(0x041e, 0x4034, 0xff), }, /* PAS106 */ \ { ZC0301_USB_DEVICE(0x041e, 0x4035, 0xff), }, /* PAS106 */ \ - { ZC0301_USB_DEVICE(0x041e, 0x4036, 0xff), }, /* HV7131 */ \ - { ZC0301_USB_DEVICE(0x041e, 0x403a, 0xff), }, /* HV7131 */ \ - { ZC0301_USB_DEVICE(0x0458, 0x7007, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x0458, 0x700C, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x0458, 0x700f, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x046d, 0x08ae, 0xff), }, /* PAS202 */ \ - { ZC0301_USB_DEVICE(0x055f, 0xd003, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x055f, 0xd004, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x046d, 0x08ae, 0xff), }, /* PAS202 */ \ + { ZC0301_USB_DEVICE(0x046d, 0x08ae, 0xff), }, /* PAS202BCB */ \ { ZC0301_USB_DEVICE(0x0ac8, 0x0301, 0xff), }, \ - { ZC0301_USB_DEVICE(0x0ac8, 0x301b, 0xff), }, /* PB-0330/HV7131 */ \ - { ZC0301_USB_DEVICE(0x0ac8, 0x303b, 0xff), }, /* PB-0330 */ \ - { ZC0301_USB_DEVICE(0x10fd, 0x0128, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x10fd, 0x8050, 0xff), }, /* TAS5130 */ \ - { ZC0301_USB_DEVICE(0x10fd, 0x804e, 0xff), }, /* TAS5130 */ \ + { ZC0301_USB_DEVICE(0x10fd, 0x8050, 0xff), }, /* TAS5130D */ \ { } \ }; diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h index 8fb4a3414..0166f555a 100644 --- a/drivers/media/video/zoran.h +++ b/drivers/media/video/zoran.h @@ -159,7 +159,7 @@ Private IOCTL to set up for displaying MJPEG #define BUZ_MAX_FRAME 256 /* Must be a power of 2 */ #define BUZ_MASK_FRAME 255 /* Must be BUZ_MAX_FRAME-1 */ -#define BUZ_MAX_INPUT 16 +#define BUZ_MAX_INPUT 8 #if VIDEO_MAX_FRAME <= 32 # define V4L_MAX_FRAME 32 @@ -191,9 +191,6 @@ enum card_type { /* Iomega */ BUZ, - /* AverMedia */ - AVS6EYES, - /* total number of cards */ NUM_CARDS }; @@ -267,7 +264,7 @@ struct zoran_v4l_settings { }; /* whoops, this one is undeclared if !v4l2 */ -#ifndef CONFIG_VIDEO_V4L2 +#ifndef HAVE_V4L2 struct v4l2_jpegcompression { int quality; int APPn; @@ -382,9 +379,6 @@ struct card_info { /* is the /GWS line conected? */ u8 gws_not_connected; - /* avs6eyes mux setting */ - u8 input_mux; - void (*init) (struct zoran * zr); }; diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index f2249ed25..0a85c9e7f 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c @@ -27,8 +27,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - +#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -95,11 +93,6 @@ module_param(default_input, int, 0); MODULE_PARM_DESC(default_input, "Default input (0=Composite, 1=S-Video, 2=Internal)"); -static int default_mux = 1; /* 6 Eyes input selection */ -module_param(default_mux, int, 0); -MODULE_PARM_DESC(default_mux, - "Default 6 Eyes mux setting (Input selection)"); - static int default_norm = 0; /* 0=PAL, 1=NTSC 2=SECAM */ module_param(default_norm, int, 0); MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); @@ -308,30 +301,6 @@ lml33_init (struct zoran *zr) GPIO(zr, 2, 1); // Set Composite input/output } -static void -avs6eyes_init (struct zoran *zr) -{ - // AverMedia 6-Eyes original driver by Christer Weinigel - - // Lifted straight from Christer's old driver and - // modified slightly by Martin Samuelsson. - - int mux = default_mux; /* 1 = BT866, 7 = VID1 */ - - GPIO(zr, 4, 1); /* Bt866 SLEEP on */ - udelay(2); - - GPIO(zr, 0, 1); /* ZR36060 /RESET on */ - GPIO(zr, 1, 0); /* ZR36060 /SLEEP on */ - GPIO(zr, 2, mux & 1); /* MUX S0 */ - GPIO(zr, 3, 0); /* /FRAME on */ - GPIO(zr, 4, 0); /* Bt866 SLEEP off */ - GPIO(zr, 5, mux & 2); /* MUX S1 */ - GPIO(zr, 6, 0); /* ? */ - GPIO(zr, 7, mux & 4); /* MUX S2 */ - -} - static char * i2cid_to_modulename (u16 i2c_id) { @@ -422,14 +391,6 @@ static struct tvnorm f60sqpixel_dc10 = { 780, 640, 0, 716, 525, 480, 12 }; static struct tvnorm f50ccir601_lm33r10 = { 864, 720, 74+54, 804, 625, 576, 18 }; static struct tvnorm f60ccir601_lm33r10 = { 858, 720, 56+54, 788, 525, 480, 16 }; -/* FIXME: The ks0127 seem incapable of swapping U and V, too, which is why I - * copy Maxim's left shift hack for the 6 Eyes. - * - * Christer's driver used the unshifted norms, though... - * /Sam */ -static struct tvnorm f50ccir601_avs6eyes = { 864, 720, 74, 804, 625, 576, 18 }; -static struct tvnorm f60ccir601_avs6eyes = { 858, 720, 56, 788, 525, 480, 16 }; - static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { { .type = DC10_old, @@ -458,7 +419,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { -1, 0 }, .vfe_pol = { 0, 0, 0, 0, 0, 0, 0, 0 }, .gws_not_connected = 0, - .input_mux = 0, .init = &dc10_init, }, { .type = DC10_new, @@ -485,7 +445,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { -1, 1}, .vfe_pol = { 1, 1, 1, 1, 0, 0, 0, 0 }, .gws_not_connected = 0, - .input_mux = 0, .init = &dc10plus_init, }, { .type = DC10plus, @@ -515,7 +474,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { -1, 1 }, .vfe_pol = { 1, 1, 1, 1, 0, 0, 0, 0 }, .gws_not_connected = 0, - .input_mux = 0, .init = &dc10plus_init, }, { .type = DC30, @@ -544,7 +502,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { -1, 0 }, .vfe_pol = { 0, 0, 0, 0, 0, 0, 0, 0 }, .gws_not_connected = 0, - .input_mux = 0, .init = &dc10_init, }, { .type = DC30plus, @@ -575,7 +532,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { -1, 0 }, .vfe_pol = { 0, 0, 0, 0, 0, 0, 0, 0 }, .gws_not_connected = 0, - .input_mux = 0, .init = &dc10_init, }, { .type = LML33, @@ -602,7 +558,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { 3, 1 }, .vfe_pol = { 1, 1, 0, 0, 0, 1, 0, 0 }, .gws_not_connected = 1, - .input_mux = 0, .init = &lml33_init, }, { .type = LML33R10, @@ -631,7 +586,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { 3, 1 }, .vfe_pol = { 1, 1, 0, 0, 0, 1, 0, 0 }, .gws_not_connected = 1, - .input_mux = 0, .init = &lml33_init, }, { .type = BUZ, @@ -660,49 +614,8 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { .gpcs = { 3, 1 }, .vfe_pol = { 1, 1, 0, 0, 0, 1, 0, 0 }, .gws_not_connected = 1, - .input_mux = 0, .init = &buz_init, - }, { - .type = AVS6EYES, - .name = "6-Eyes", - /* AverMedia chose not to brand the 6-Eyes. Thus it - can't be autodetected, and requires card=x. */ - .vendor_id = -1, - .device_id = -1, - .i2c_decoder = I2C_DRIVERID_KS0127, - .i2c_encoder = I2C_DRIVERID_BT866, - .video_codec = CODEC_TYPE_ZR36060, - - .inputs = 10, - .input = { - { 0, "Composite 1" }, - { 1, "Composite 2" }, - { 2, "Composite 3" }, - { 4, "Composite 4" }, - { 5, "Composite 5" }, - { 6, "Composite 6" }, - { 8, "S-Video 1" }, - { 9, "S-Video 2" }, - {10, "S-Video 3" }, - {15, "YCbCr" } - }, - .norms = 2, - .tvn = { - &f50ccir601_avs6eyes, - &f60ccir601_avs6eyes, - NULL - }, - .jpeg_int = ZR36057_ISR_GIRQ1, - .vsync_int = ZR36057_ISR_GIRQ0, - .gpio = { 1, 0, 3, -1, -1, -1, -1, -1 },// Validity unknown /Sam - .gpio_pol = { 0, 0, 0, 0, 0, 0, 0, 0 }, // Validity unknown /Sam - .gpcs = { 3, 1 }, // Validity unknown /Sam - .vfe_pol = { 1, 0, 0, 0, 0, 1, 0, 0 }, // Validity unknown /Sam - .gws_not_connected = 1, - .input_mux = 1, - .init = &avs6eyes_init, } - }; /* @@ -1380,7 +1293,7 @@ find_zr36057 (void) result = request_irq(zr->pci_dev->irq, zoran_irq, - IRQF_SHARED | IRQF_DISABLED, + SA_SHIRQ | SA_INTERRUPT, ZR_DEVNAME(zr), (void *) zr); if (result < 0) { diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index 3cbac2e8a..c690b2ee8 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c @@ -27,6 +27,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -535,7 +536,7 @@ zr36057_overlay (struct zoran *zr, * All error messages are internal driver checking only! */ /* video display top and bottom registers */ - reg = (long) zr->buffer.base + + reg = (u32) zr->buffer.base + zr->overlay_settings.x * ((zr->overlay_settings.format->depth + 7) / 8) + zr->overlay_settings.y * diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 5f90db278..b5a576a37 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c @@ -44,6 +44,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -72,7 +73,6 @@ ) #include -#include #include "videocodec.h" #include @@ -86,7 +86,7 @@ #include "zoran_device.h" #include "zoran_card.h" -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 /* we declare some card type definitions here, they mean * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ #define ZORAN_V4L2_VID_FLAGS ( \ @@ -103,7 +103,7 @@ const struct zoran_format zoran_formats[] = { { .name = "15-bit RGB", .palette = VIDEO_PALETTE_RGB555, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_RGB555, #else @@ -117,7 +117,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "16-bit RGB", .palette = VIDEO_PALETTE_RGB565, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_RGB565, #else @@ -131,7 +131,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "24-bit RGB", .palette = VIDEO_PALETTE_RGB24, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_BGR24, #else @@ -145,7 +145,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "32-bit RGB", .palette = VIDEO_PALETTE_RGB32, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 #ifdef __LITTLE_ENDIAN .fourcc = V4L2_PIX_FMT_BGR32, #else @@ -159,7 +159,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "4:2:2, packed, YUYV", .palette = VIDEO_PALETTE_YUV422, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 .fourcc = V4L2_PIX_FMT_YUYV, .colorspace = V4L2_COLORSPACE_SMPTE170M, #endif @@ -169,7 +169,7 @@ const struct zoran_format zoran_formats[] = { }, { .name = "Hardware-encoded Motion-JPEG", .palette = -1, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 .fourcc = V4L2_PIX_FMT_MJPEG, .colorspace = V4L2_COLORSPACE_SMPTE170M, #endif @@ -210,7 +210,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */ module_param(lock_norm, int, 0); MODULE_PARM_DESC(lock_norm, "Users can't change norm"); -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 /* small helper function for calculating buffersizes for v4l2 * we calculate the nearest higher power-of-two, which * will be the recommended buffersize */ @@ -1761,7 +1761,7 @@ setup_overlay (struct file *file, return wait_grab_pending(zr); } -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 /* get the status of a buffer in the clients buffer queue */ static int zoran_v4l2_buffer_status (struct file *file, @@ -2047,7 +2047,7 @@ zoran_do_ioctl (struct inode *inode, dprintk(3, KERN_DEBUG "%s: VIDIOCGCAP\n", ZR_DEVNAME(zr)); memset(vcap, 0, sizeof(struct video_capability)); - strncpy(vcap->name, ZR_DEVNAME(zr), sizeof(vcap->name)-1); + strncpy(vcap->name, ZR_DEVNAME(zr), sizeof(vcap->name)); vcap->type = ZORAN_VID_TYPE; vcap->channels = zr->card.inputs; @@ -2676,7 +2676,7 @@ zoran_do_ioctl (struct inode *inode, } break; -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 /* The new video4linux2 capture interface - much nicer than video4linux1, since * it allows for integrating the JPEG capturing calls inside standard v4l2 @@ -2689,8 +2689,8 @@ zoran_do_ioctl (struct inode *inode, dprintk(3, KERN_DEBUG "%s: VIDIOC_QUERYCAP\n", ZR_DEVNAME(zr)); memset(cap, 0, sizeof(*cap)); - strncpy(cap->card, ZR_DEVNAME(zr), sizeof(cap->card)-1); - strncpy(cap->driver, "zoran", sizeof(cap->driver)-1); + strncpy(cap->card, ZR_DEVNAME(zr), sizeof(cap->card)); + strncpy(cap->driver, "zoran", sizeof(cap->driver)); snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", pci_name(zr->pci_dev)); cap->version = @@ -2742,7 +2742,7 @@ zoran_do_ioctl (struct inode *inode, memset(fmt, 0, sizeof(*fmt)); fmt->index = index; fmt->type = type; - strncpy(fmt->description, zoran_formats[i].name, sizeof(fmt->description)-1); + strncpy(fmt->description, zoran_formats[i].name, 31); fmt->pixelformat = zoran_formats[i].fourcc; if (zoran_formats[i].flags & ZORAN_FORMAT_COMPRESSED) fmt->flags |= V4L2_FMT_FLAG_COMPRESSED; @@ -3566,16 +3566,16 @@ zoran_do_ioctl (struct inode *inode, switch (ctrl->id) { case V4L2_CID_BRIGHTNESS: - strncpy(ctrl->name, "Brightness", sizeof(ctrl->name)-1); + strncpy(ctrl->name, "Brightness", 31); break; case V4L2_CID_CONTRAST: - strncpy(ctrl->name, "Contrast", sizeof(ctrl->name)-1); + strncpy(ctrl->name, "Contrast", 31); break; case V4L2_CID_SATURATION: - strncpy(ctrl->name, "Saturation", sizeof(ctrl->name)-1); + strncpy(ctrl->name, "Saturation", 31); break; case V4L2_CID_HUE: - strncpy(ctrl->name, "Hue", sizeof(ctrl->name)-1); + strncpy(ctrl->name, "Hue", 31); break; } @@ -3693,7 +3693,7 @@ zoran_do_ioctl (struct inode *inode, &caps); if (caps.flags & VIDEO_DECODER_AUTO) { std->id = V4L2_STD_ALL; - strncpy(std->name, "Autodetect", sizeof(std->name)-1); + strncpy(std->name, "Autodetect", 31); return 0; } else return -EINVAL; @@ -3701,21 +3701,21 @@ zoran_do_ioctl (struct inode *inode, switch (std->index) { case 0: std->id = V4L2_STD_PAL; - strncpy(std->name, "PAL", sizeof(std->name)-1); + strncpy(std->name, "PAL", 31); std->frameperiod.numerator = 1; std->frameperiod.denominator = 25; std->framelines = zr->card.tvn[0]->Ht; break; case 1: std->id = V4L2_STD_NTSC; - strncpy(std->name, "NTSC", sizeof(std->name)-1); + strncpy(std->name, "NTSC", 31); std->frameperiod.numerator = 1001; std->frameperiod.denominator = 30000; std->framelines = zr->card.tvn[1]->Ht; break; case 2: std->id = V4L2_STD_SECAM; - strncpy(std->name, "SECAM", sizeof(std->name)-1); + strncpy(std->name, "SECAM", 31); std->frameperiod.numerator = 1; std->frameperiod.denominator = 25; std->framelines = zr->card.tvn[2]->Ht; @@ -3871,7 +3871,7 @@ zoran_do_ioctl (struct inode *inode, memset(outp, 0, sizeof(*outp)); outp->index = 0; outp->type = V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY; - strncpy(outp->name, "Autodetect", sizeof(outp->name)-1); + strncpy(outp->name, "Autodetect", 31); return 0; } @@ -4689,7 +4689,7 @@ static struct file_operations zoran_fops = { struct video_device zoran_template __devinitdata = { .name = ZORAN_NAME, .type = ZORAN_VID_TYPE, -#ifdef CONFIG_VIDEO_V4L2 +#ifdef HAVE_V4L2 .type2 = ZORAN_V4L2_VID_FLAGS, #endif .hardware = ZORAN_HARDWARE, diff --git a/drivers/media/video/zoran_procfs.c b/drivers/media/video/zoran_procfs.c index c7f6f6488..a00fae902 100644 --- a/drivers/media/video/zoran_procfs.c +++ b/drivers/media/video/zoran_procfs.c @@ -27,6 +27,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -42,7 +43,6 @@ #include #include -#include #include #include "videocodec.h" diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c index 50437383e..6ac3b6740 100644 --- a/drivers/media/video/zr36120.c +++ b/drivers/media/video/zr36120.c @@ -1858,7 +1858,7 @@ int __init find_zoran(void) DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem)); result = request_irq(dev->irq, zoran_irq, - IRQF_SHARED|IRQF_DISABLED,"zoran", ztv); + SA_SHIRQ|SA_INTERRUPT,"zoran", ztv); if (result==-EINVAL) { iounmap(ztv->zoran_mem); diff --git a/drivers/media/video/zr36120_mem.c b/drivers/media/video/zr36120_mem.c index 416eaa93b..c87113d6c 100644 --- a/drivers/media/video/zr36120_mem.c +++ b/drivers/media/video/zr36120_mem.c @@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/message/fusion/Kconfig b/drivers/message/fusion/Kconfig index ea31d8470..bbc229852 100644 --- a/drivers/message/fusion/Kconfig +++ b/drivers/message/fusion/Kconfig @@ -48,8 +48,10 @@ config FUSION_SAS List of supported controllers: LSISAS1064 + LSISAS1066 LSISAS1068 LSISAS1064E + LSISAS1066E LSISAS1068E config FUSION_MAX_SGE diff --git a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile index 341691390..51740b346 100644 --- a/drivers/message/fusion/Makefile +++ b/drivers/message/fusion/Makefile @@ -9,6 +9,7 @@ #EXTRA_CFLAGS += -DMPT_DEBUG_EXIT #EXTRA_CFLAGS += -DMPT_DEBUG_FAIL + # # driver/module specifics... # @@ -32,11 +33,6 @@ # For mptfc: #CFLAGS_mptfc.o += -DMPT_DEBUG_FC -# For mptsas: -#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS -#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS_WIDE - - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC obj-$(CONFIG_FUSION_SPI) += mptbase.o mptscsih.o mptspi.o diff --git a/drivers/message/fusion/lsi/fc_log.h b/drivers/message/fusion/lsi/fc_log.h new file mode 100644 index 000000000..dc98d46f9 --- /dev/null +++ b/drivers/message/fusion/lsi/fc_log.h @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2000-2001 LSI Logic Corporation. All rights reserved. + * + * NAME: fc_log.h + * SUMMARY: MPI IocLogInfo definitions for the SYMFC9xx chips + * DESCRIPTION: Contains the enumerated list of values that may be returned + * in the IOCLogInfo field of a MPI Default Reply Message. + * + * CREATION DATE: 6/02/2000 + * ID: $Id: fc_log.h,v 4.6 2001/07/26 14:41:33 sschremm Exp $ + */ + + +/* + * MpiIocLogInfo_t enum + * + * These 32 bit values are used in the IOCLogInfo field of the MPI reply + * messages. + * The value is 0xabcccccc where + * a = The type of log info as per the MPI spec. Since these codes are + * all for Fibre Channel this value will always be 2. + * b = Specifies a subclass of the firmware where + * 0 = FCP Initiator + * 1 = FCP Target + * 2 = LAN + * 3 = MPI Message Layer + * 4 = FC Link + * 5 = Context Manager + * 6 = Invalid Field Offset + * 7 = State Change Info + * all others are reserved for future use + * c = A specific value within the subclass. + * + * NOTE: Any new values should be added to the end of each subclass so that the + * codes remain consistent across firmware releases. + */ +typedef enum _MpiIocLogInfoFc +{ + MPI_IOCLOGINFO_FC_INIT_BASE = 0x20000000, + MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */ + MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primative */ + MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME = 0x20000003, /* Bad Rx Frame, bad end of frame primative */ + MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN = 0x20000004, /* Bad Rx Frame, overrun */ + MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER = 0x20000005, /* Other errors caught by IOC which require retries */ + MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD = 0x20000006, /* Main processor could not initialize sub-processor */ + MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OVERRUN = 0x20000007, /* Scatter Gather overrun */ + MPI_IOCLOGINFO_FC_INIT_ERROR_RX_BAD_STATUS = 0x20000008, /* Receiver detected context mismatch via invalid header */ + MPI_IOCLOGINFO_FC_INIT_ERROR_RX_UNEXPECTED_FRAME= 0x20000009, /* CtxMgr detected unsupported frame type */ + MPI_IOCLOGINFO_FC_INIT_ERROR_LINK_FAILURE = 0x2000000A, /* Link failure occurred */ + MPI_IOCLOGINFO_FC_INIT_ERROR_TX_TIMEOUT = 0x2000000B, /* Transmitter timeout error */ + + MPI_IOCLOGINFO_FC_TARGET_BASE = 0x21000000, + MPI_IOCLOGINFO_FC_TARGET_NO_PDISC = 0x21000001, /* not sent because we are waiting for a PDISC from the initiator */ + MPI_IOCLOGINFO_FC_TARGET_NO_LOGIN = 0x21000002, /* not sent because we are not logged in to the remote node */ + MPI_IOCLOGINFO_FC_TARGET_DOAR_KILLED_BY_LIP = 0x21000003, /* Data Out, Auto Response, not sent due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_DIAR_KILLED_BY_LIP = 0x21000004, /* Data In, Auto Response, not sent due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_DIAR_MISSING_DATA = 0x21000005, /* Data In, Auto Response, missing data frames */ + MPI_IOCLOGINFO_FC_TARGET_DONR_KILLED_BY_LIP = 0x21000006, /* Data Out, No Response, not sent due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_WRSP_KILLED_BY_LIP = 0x21000007, /* Auto-response after a write not sent due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_DINR_KILLED_BY_LIP = 0x21000008, /* Data In, No Response, not completed due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_DINR_MISSING_DATA = 0x21000009, /* Data In, No Response, missing data frames */ + MPI_IOCLOGINFO_FC_TARGET_MRSP_KILLED_BY_LIP = 0x2100000a, /* Manual Response not sent due to a LIP */ + MPI_IOCLOGINFO_FC_TARGET_NO_CLASS_3 = 0x2100000b, /* not sent because remote node does not support Class 3 */ + MPI_IOCLOGINFO_FC_TARGET_LOGIN_NOT_VALID = 0x2100000c, /* not sent because login to remote node not validated */ + MPI_IOCLOGINFO_FC_TARGET_FROM_OUTBOUND = 0x2100000e, /* cleared from the outbound queue after a logout */ + MPI_IOCLOGINFO_FC_TARGET_WAITING_FOR_DATA_IN = 0x2100000f, /* cleared waiting for data after a logout */ + + MPI_IOCLOGINFO_FC_LAN_BASE = 0x22000000, + MPI_IOCLOGINFO_FC_LAN_TRANS_SGL_MISSING = 0x22000001, /* Transaction Context Sgl Missing */ + MPI_IOCLOGINFO_FC_LAN_TRANS_WRONG_PLACE = 0x22000002, /* Transaction Context found before an EOB */ + MPI_IOCLOGINFO_FC_LAN_TRANS_RES_BITS_SET = 0x22000003, /* Transaction Context value has reserved bits set */ + MPI_IOCLOGINFO_FC_LAN_WRONG_SGL_FLAG = 0x22000004, /* Invalid SGL Flags */ + + MPI_IOCLOGINFO_FC_MSG_BASE = 0x23000000, + + MPI_IOCLOGINFO_FC_LINK_BASE = 0x24000000, + MPI_IOCLOGINFO_FC_LINK_LOOP_INIT_TIMEOUT = 0x24000001, /* Loop initialization timed out */ + MPI_IOCLOGINFO_FC_LINK_ALREADY_INITIALIZED = 0x24000002, /* Another system controller already initialized the loop */ + MPI_IOCLOGINFO_FC_LINK_LINK_NOT_ESTABLISHED = 0x24000003, /* Not synchronized to signal or still negotiating (possible cable problem) */ + MPI_IOCLOGINFO_FC_LINK_CRC_ERROR = 0x24000004, /* CRC check detected error on received frame */ + + MPI_IOCLOGINFO_FC_CTX_BASE = 0x25000000, + + MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET = 0x26000000, /* The lower 24 bits give the byte offset of the field in the request message that is invalid */ + MPI_IOCLOGINFO_FC_INVALID_FIELD_MAX_OFFSET = 0x26ffffff, + + MPI_IOCLOGINFO_FC_STATE_CHANGE = 0x27000000 /* The lower 24 bits give additional information concerning state change */ + +} MpiIocLogInfoFc_t; diff --git a/drivers/message/fusion/lsi/mpi.h b/drivers/message/fusion/lsi/mpi.h index 81ad77622..02cdc840a 100644 --- a/drivers/message/fusion/lsi/mpi.h +++ b/drivers/message/fusion/lsi/mpi.h @@ -6,7 +6,7 @@ * Title: MPI Message independent structures and definitions * Creation Date: July 27, 2000 * - * mpi.h Version: 01.05.11 + * mpi.h Version: 01.05.10 * * Version History * --------------- @@ -76,7 +76,6 @@ * Added EEDP IOCStatus codes. * 08-03-05 01.05.09 Bumped MPI_HEADER_VERSION_UNIT. * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target. - * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT. * -------------------------------------------------------------------------- */ @@ -107,7 +106,7 @@ /* Note: The major versions of 0xe0 through 0xff are reserved */ /* versioning for this MPI header set */ -#define MPI_HEADER_VERSION_UNIT (0x0D) +#define MPI_HEADER_VERSION_UNIT (0x0C) #define MPI_HEADER_VERSION_DEV (0x00) #define MPI_HEADER_VERSION_UNIT_MASK (0xFF00) #define MPI_HEADER_VERSION_UNIT_SHIFT (8) diff --git a/drivers/message/fusion/lsi/mpi_cnfg.h b/drivers/message/fusion/lsi/mpi_cnfg.h index 47e13e360..b1becec27 100644 --- a/drivers/message/fusion/lsi/mpi_cnfg.h +++ b/drivers/message/fusion/lsi/mpi_cnfg.h @@ -6,7 +6,7 @@ * Title: MPI Config message, structures, and Pages * Creation Date: July 27, 2000 * - * mpi_cnfg.h Version: 01.05.12 + * mpi_cnfg.h Version: 01.05.11 * * Version History * --------------- @@ -266,16 +266,6 @@ * Added postpone SATA Init bit to SAS IO Unit Page 1 * ControlFlags. * Changed LogEntry format for Log Page 0. - * 03-27-06 01.05.12 Added two new Flags defines for Manufacturing Page 4. - * Added Manufacturing Page 7. - * Added MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING. - * Added IOC Page 6. - * Added PrevBootDeviceForm field to CONFIG_PAGE_BIOS_2. - * Added MaxLBAHigh field to RAID Volume Page 0. - * Added Nvdata version fields to SAS IO Unit Page 0. - * Added AdditionalControlFlags, MaxTargetPortConnectTime, - * ReportDeviceMissingDelay, and IODeviceMissingDelay - * fields to SAS IO Unit Page 1. * -------------------------------------------------------------------------- */ @@ -641,11 +631,9 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4 } CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4, ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t; -#define MPI_MANUFACTURING4_PAGEVERSION (0x04) +#define MPI_MANUFACTURING4_PAGEVERSION (0x03) /* defines for the Flags field */ -#define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE (0x80) -#define MPI_MANPAGE4_FORCE_OFFLINE_FAILOVER (0x40) #define MPI_MANPAGE4_IME_DISABLE (0x20) #define MPI_MANPAGE4_IM_DISABLE (0x10) #define MPI_MANPAGE4_IS_DISABLE (0x08) @@ -680,66 +668,6 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_6 #define MPI_MANUFACTURING6_PAGEVERSION (0x00) -typedef struct _MPI_MANPAGE7_CONNECTOR_INFO -{ - U32 Pinout; /* 00h */ - U8 Connector[16]; /* 04h */ - U8 Location; /* 14h */ - U8 Reserved1; /* 15h */ - U16 Slot; /* 16h */ - U32 Reserved2; /* 18h */ -} MPI_MANPAGE7_CONNECTOR_INFO, MPI_POINTER PTR_MPI_MANPAGE7_CONNECTOR_INFO, - MpiManPage7ConnectorInfo_t, MPI_POINTER pMpiManPage7ConnectorInfo_t; - -/* defines for the Pinout field */ -#define MPI_MANPAGE7_PINOUT_SFF_8484_L4 (0x00080000) -#define MPI_MANPAGE7_PINOUT_SFF_8484_L3 (0x00040000) -#define MPI_MANPAGE7_PINOUT_SFF_8484_L2 (0x00020000) -#define MPI_MANPAGE7_PINOUT_SFF_8484_L1 (0x00010000) -#define MPI_MANPAGE7_PINOUT_SFF_8470_L4 (0x00000800) -#define MPI_MANPAGE7_PINOUT_SFF_8470_L3 (0x00000400) -#define MPI_MANPAGE7_PINOUT_SFF_8470_L2 (0x00000200) -#define MPI_MANPAGE7_PINOUT_SFF_8470_L1 (0x00000100) -#define MPI_MANPAGE7_PINOUT_SFF_8482 (0x00000002) -#define MPI_MANPAGE7_PINOUT_CONNECTION_UNKNOWN (0x00000001) - -/* defines for the Location field */ -#define MPI_MANPAGE7_LOCATION_UNKNOWN (0x01) -#define MPI_MANPAGE7_LOCATION_INTERNAL (0x02) -#define MPI_MANPAGE7_LOCATION_EXTERNAL (0x04) -#define MPI_MANPAGE7_LOCATION_SWITCHABLE (0x08) -#define MPI_MANPAGE7_LOCATION_AUTO (0x10) -#define MPI_MANPAGE7_LOCATION_NOT_PRESENT (0x20) -#define MPI_MANPAGE7_LOCATION_NOT_CONNECTED (0x80) - -/* - * Host code (drivers, BIOS, utilities, etc.) should leave this define set to - * one and check NumPhys at runtime. - */ -#ifndef MPI_MANPAGE7_CONNECTOR_INFO_MAX -#define MPI_MANPAGE7_CONNECTOR_INFO_MAX (1) -#endif - -typedef struct _CONFIG_PAGE_MANUFACTURING_7 -{ - CONFIG_PAGE_HEADER Header; /* 00h */ - U32 Reserved1; /* 04h */ - U32 Reserved2; /* 08h */ - U32 Flags; /* 0Ch */ - U8 EnclosureName[16]; /* 10h */ - U8 NumPhys; /* 20h */ - U8 Reserved3; /* 21h */ - U16 Reserved4; /* 22h */ - MPI_MANPAGE7_CONNECTOR_INFO ConnectorInfo[MPI_MANPAGE7_CONNECTOR_INFO_MAX]; /* 24h */ -} CONFIG_PAGE_MANUFACTURING_7, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_7, - ManufacturingPage7_t, MPI_POINTER pManufacturingPage7_t; - -#define MPI_MANUFACTURING7_PAGEVERSION (0x00) - -/* defines for the Flags field */ -#define MPI_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001) - - /**************************************************************************** * IO Unit Config Pages ****************************************************************************/ @@ -939,7 +867,7 @@ typedef struct _CONFIG_PAGE_IOC_2 } CONFIG_PAGE_IOC_2, MPI_POINTER PTR_CONFIG_PAGE_IOC_2, IOCPage2_t, MPI_POINTER pIOCPage2_t; -#define MPI_IOCPAGE2_PAGEVERSION (0x04) +#define MPI_IOCPAGE2_PAGEVERSION (0x03) /* IOC Page 2 Capabilities flags */ @@ -950,7 +878,6 @@ typedef struct _CONFIG_PAGE_IOC_2 #define MPI_IOCPAGE2_CAP_FLAGS_RAID_6_SUPPORT (0x00000010) #define MPI_IOCPAGE2_CAP_FLAGS_RAID_10_SUPPORT (0x00000020) #define MPI_IOCPAGE2_CAP_FLAGS_RAID_50_SUPPORT (0x00000040) -#define MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING (0x10000000) #define MPI_IOCPAGE2_CAP_FLAGS_SES_SUPPORT (0x20000000) #define MPI_IOCPAGE2_CAP_FLAGS_SAFTE_SUPPORT (0x40000000) #define MPI_IOCPAGE2_CAP_FLAGS_CROSS_CHANNEL_SUPPORT (0x80000000) @@ -1048,44 +975,6 @@ typedef struct _CONFIG_PAGE_IOC_5 #define MPI_IOCPAGE5_PAGEVERSION (0x00) -typedef struct _CONFIG_PAGE_IOC_6 -{ - CONFIG_PAGE_HEADER Header; /* 00h */ - U32 CapabilitiesFlags; /* 04h */ - U8 MaxDrivesIS; /* 08h */ - U8 MaxDrivesIM; /* 09h */ - U8 MaxDrivesIME; /* 0Ah */ - U8 Reserved1; /* 0Bh */ - U8 MinDrivesIS; /* 0Ch */ - U8 MinDrivesIM; /* 0Dh */ - U8 MinDrivesIME; /* 0Eh */ - U8 Reserved2; /* 0Fh */ - U8 MaxGlobalHotSpares; /* 10h */ - U8 Reserved3; /* 11h */ - U16 Reserved4; /* 12h */ - U32 Reserved5; /* 14h */ - U32 SupportedStripeSizeMapIS; /* 18h */ - U32 SupportedStripeSizeMapIME; /* 1Ch */ - U32 Reserved6; /* 20h */ - U8 MetadataSize; /* 24h */ - U8 Reserved7; /* 25h */ - U16 Reserved8; /* 26h */ - U16 MaxBadBlockTableEntries; /* 28h */ - U16 Reserved9; /* 2Ah */ - U16 IRNvsramUsage; /* 2Ch */ - U16 Reserved10; /* 2Eh */ - U32 IRNvsramVersion; /* 30h */ - U32 Reserved11; /* 34h */ - U32 Reserved12; /* 38h */ -} CONFIG_PAGE_IOC_6, MPI_POINTER PTR_CONFIG_PAGE_IOC_6, - IOCPage6_t, MPI_POINTER pIOCPage6_t; - -#define MPI_IOCPAGE6_PAGEVERSION (0x00) - -/* IOC Page 6 Capabilities Flags */ - -#define MPI_IOCPAGE6_CAP_FLAGS_GLOBAL_HOT_SPARE (0x00000001) - /**************************************************************************** * BIOS Config Pages @@ -1329,13 +1218,13 @@ typedef struct _CONFIG_PAGE_BIOS_2 U32 Reserved5; /* 14h */ U32 Reserved6; /* 18h */ U8 BootDeviceForm; /* 1Ch */ - U8 PrevBootDeviceForm; /* 1Ch */ + U8 Reserved7; /* 1Dh */ U16 Reserved8; /* 1Eh */ MPI_BIOSPAGE2_BOOT_DEVICE BootDevice; /* 20h */ } CONFIG_PAGE_BIOS_2, MPI_POINTER PTR_CONFIG_PAGE_BIOS_2, BIOSPage2_t, MPI_POINTER pBIOSPage2_t; -#define MPI_BIOSPAGE2_PAGEVERSION (0x02) +#define MPI_BIOSPAGE2_PAGEVERSION (0x01) #define MPI_BIOSPAGE2_FORM_MASK (0x0F) #define MPI_BIOSPAGE2_FORM_ADAPTER_ORDER (0x00) @@ -2191,7 +2080,7 @@ typedef struct _CONFIG_PAGE_RAID_VOL_0 RAID_VOL0_STATUS VolumeStatus; /* 08h */ RAID_VOL0_SETTINGS VolumeSettings; /* 0Ch */ U32 MaxLBA; /* 10h */ - U32 MaxLBAHigh; /* 14h */ + U32 Reserved1; /* 14h */ U32 StripeSize; /* 18h */ U32 Reserved2; /* 1Ch */ U32 Reserved3; /* 20h */ @@ -2203,7 +2092,7 @@ typedef struct _CONFIG_PAGE_RAID_VOL_0 } CONFIG_PAGE_RAID_VOL_0, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_0, RaidVolumePage0_t, MPI_POINTER pRaidVolumePage0_t; -#define MPI_RAIDVOLPAGE0_PAGEVERSION (0x06) +#define MPI_RAIDVOLPAGE0_PAGEVERSION (0x05) /* values for RAID Volume Page 0 InactiveStatus field */ #define MPI_RAIDVOLPAGE0_UNKNOWN_INACTIVE (0x00) @@ -2435,8 +2324,7 @@ typedef struct _MPI_SAS_IO_UNIT0_PHY_DATA typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0 { CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */ - U16 NvdataVersionDefault; /* 08h */ - U16 NvdataVersionPersistent; /* 0Ah */ + U32 Reserved1; /* 08h */ U8 NumPhys; /* 0Ch */ U8 Reserved2; /* 0Dh */ U16 Reserved3; /* 0Eh */ @@ -2444,7 +2332,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0 } CONFIG_PAGE_SAS_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_0, SasIOUnitPage0_t, MPI_POINTER pSasIOUnitPage0_t; -#define MPI_SASIOUNITPAGE0_PAGEVERSION (0x04) +#define MPI_SASIOUNITPAGE0_PAGEVERSION (0x03) /* values for SAS IO Unit Page 0 PortFlags */ #define MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS (0x08) @@ -2485,13 +2373,12 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0 typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA { - U8 Port; /* 00h */ - U8 PortFlags; /* 01h */ - U8 PhyFlags; /* 02h */ - U8 MaxMinLinkRate; /* 03h */ - U32 ControllerPhyDeviceInfo; /* 04h */ - U16 MaxTargetPortConnectTime; /* 08h */ - U16 Reserved1; /* 0Ah */ + U8 Port; /* 00h */ + U8 PortFlags; /* 01h */ + U8 PhyFlags; /* 02h */ + U8 MaxMinLinkRate; /* 03h */ + U32 ControllerPhyDeviceInfo;/* 04h */ + U32 Reserved1; /* 08h */ } MPI_SAS_IO_UNIT1_PHY_DATA, MPI_POINTER PTR_MPI_SAS_IO_UNIT1_PHY_DATA, SasIOUnit1PhyData, MPI_POINTER pSasIOUnit1PhyData; @@ -2508,17 +2395,15 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1 CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */ U16 ControlFlags; /* 08h */ U16 MaxNumSATATargets; /* 0Ah */ - U16 AdditionalControlFlags; /* 0Ch */ - U16 Reserved1; /* 0Eh */ + U32 Reserved1; /* 0Ch */ U8 NumPhys; /* 10h */ U8 SATAMaxQDepth; /* 11h */ - U8 ReportDeviceMissingDelay; /* 12h */ - U8 IODeviceMissingDelay; /* 13h */ + U16 Reserved2; /* 12h */ MPI_SAS_IO_UNIT1_PHY_DATA PhyData[MPI_SAS_IOUNIT1_PHY_MAX]; /* 14h */ } CONFIG_PAGE_SAS_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_1, SasIOUnitPage1_t, MPI_POINTER pSasIOUnitPage1_t; -#define MPI_SASIOUNITPAGE1_PAGEVERSION (0x06) +#define MPI_SASIOUNITPAGE1_PAGEVERSION (0x05) /* values for SAS IO Unit Page 1 ControlFlags */ #define MPI_SAS_IOUNIT1_CONTROL_DEVICE_SELF_TEST (0x8000) @@ -2543,13 +2428,6 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1 #define MPI_SAS_IOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY (0x0002) #define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001) -/* values for SAS IO Unit Page 1 AdditionalControlFlags */ -#define MPI_SAS_IOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE (0x0001) - -/* defines for SAS IO Unit Page 1 ReportDeviceMissingDelay */ -#define MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK (0x7F) -#define MPI_SAS_IOUNIT1_REPORT_MISSING_UNIT_16 (0x80) - /* values for SAS IO Unit Page 1 PortFlags */ #define MPI_SAS_IOUNIT1_PORT_FLAGS_0_TARGET_IOC_NUM (0x00) #define MPI_SAS_IOUNIT1_PORT_FLAGS_1_TARGET_IOC_NUM (0x04) diff --git a/drivers/message/fusion/lsi/mpi_history.txt b/drivers/message/fusion/lsi/mpi_history.txt index 582cfe7c2..4a5f8dd1d 100644 --- a/drivers/message/fusion/lsi/mpi_history.txt +++ b/drivers/message/fusion/lsi/mpi_history.txt @@ -6,25 +6,25 @@ Copyright (c) 2000-2005 LSI Logic Corporation. --------------------------------------- - Header Set Release Version: 01.05.13 - Header Set Release Date: 03-27-06 + Header Set Release Version: 01.05.12 + Header Set Release Date: 08-30-05 --------------------------------------- Filename Current version Prior version ---------- --------------- ------------- - mpi.h 01.05.11 01.05.10 - mpi_ioc.h 01.05.11 01.05.10 - mpi_cnfg.h 01.05.12 01.05.11 - mpi_init.h 01.05.07 01.05.06 - mpi_targ.h 01.05.06 01.05.05 + mpi.h 01.05.10 01.05.09 + mpi_ioc.h 01.05.10 01.05.09 + mpi_cnfg.h 01.05.11 01.05.10 + mpi_init.h 01.05.06 01.05.06 + mpi_targ.h 01.05.05 01.05.05 mpi_fc.h 01.05.01 01.05.01 mpi_lan.h 01.05.01 01.05.01 mpi_raid.h 01.05.02 01.05.02 mpi_tool.h 01.05.03 01.05.03 mpi_inb.h 01.05.01 01.05.01 - mpi_sas.h 01.05.03 01.05.02 - mpi_type.h 01.05.02 01.05.02 - mpi_history.txt 01.05.13 01.05.12 + mpi_sas.h 01.05.02 01.05.01 + mpi_type.h 01.05.02 01.05.01 + mpi_history.txt 01.05.12 01.05.11 * Date Version Description @@ -93,7 +93,6 @@ mpi.h * Added EEDP IOCStatus codes. * 08-03-05 01.05.09 Bumped MPI_HEADER_VERSION_UNIT. * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target. - * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT. * -------------------------------------------------------------------------- mpi_ioc.h @@ -171,17 +170,6 @@ mpi_ioc.h * Added new ReasonCode value for SAS Device Status Change * event. * Added new family code for FC949E. - * 03-27-06 01.05.11 Added MPI_IOCFACTS_CAPABILITY_TLR. - * Added additional Reason Codes and more event data fields - * to EVENT_DATA_SAS_DEVICE_STATUS_CHANGE. - * Added EVENT_DATA_SAS_BROADCAST_PRIMITIVE structure and - * new event. - * Added MPI_EVENT_SAS_SMP_ERROR and event data structure. - * Added MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE and event - * data structure. - * Added MPI_EVENT_SAS_INIT_TABLE_OVERFLOW and event - * data structure. - * Added MPI_EXT_IMAGE_TYPE_INITIALIZATION. * -------------------------------------------------------------------------- mpi_cnfg.h @@ -437,16 +425,6 @@ mpi_cnfg.h * Added postpone SATA Init bit to SAS IO Unit Page 1 * ControlFlags. * Changed LogEntry format for Log Page 0. - * 03-27-06 01.05.12 Added two new Flags defines for Manufacturing Page 4. - * Added Manufacturing Page 7. - * Added MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING. - * Added IOC Page 6. - * Added PrevBootDeviceForm field to CONFIG_PAGE_BIOS_2. - * Added MaxLBAHigh field to RAID Volume Page 0. - * Added Nvdata version fields to SAS IO Unit Page 0. - * Added AdditionalControlFlags, MaxTargetPortConnectTime, - * ReportDeviceMissingDelay, and IODeviceMissingDelay - * fields to SAS IO Unit Page 1. * -------------------------------------------------------------------------- mpi_init.h @@ -489,7 +467,6 @@ mpi_init.h * Added four new defines for SEP SlotStatus. * 08-03-05 01.05.06 Fixed some MPI_SCSIIO32_MSGFLGS_ defines to make them * unique in the first 32 characters. - * 03-27-06 01.05.07 Added Task Management type of Clear ACA. * -------------------------------------------------------------------------- mpi_targ.h @@ -534,7 +511,6 @@ mpi_targ.h * 02-22-05 01.05.03 Changed a comment. * 03-11-05 01.05.04 Removed TargetAssistExtended Request. * 06-24-05 01.05.05 Added TargetAssistExtended structures and defines. - * 03-27-06 01.05.06 Added a comment. * -------------------------------------------------------------------------- mpi_fc.h @@ -634,10 +610,6 @@ mpi_sas.h * 08-30-05 01.05.02 Added DeviceInfo bit for SEP. * Added PrimFlags and Primitive field to SAS IO Unit * Control request, and added a new operation code. - * 03-27-06 01.05.03 Added Force Full Discovery, Transmit Port Select Signal, - * and Remove Device operations to SAS IO Unit Control. - * Added DevHandle field to SAS IO Unit Control request and - * reply. * -------------------------------------------------------------------------- mpi_type.h @@ -653,20 +625,20 @@ mpi_type.h mpi_history.txt Parts list history -Filename 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09 ----------- -------- -------- -------- -------- -------- -mpi.h 01.05.11 01.05.10 01.05.09 01.05.08 01.05.07 -mpi_ioc.h 01.05.11 01.05.10 01.05.09 01.05.09 01.05.08 -mpi_cnfg.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.08 -mpi_init.h 01.05.07 01.05.06 01.05.06 01.05.05 01.05.04 -mpi_targ.h 01.05.06 01.05.05 01.05.05 01.05.05 01.05.04 -mpi_fc.h 01.05.01 01.05.01 01.05.01 01.05.01 01.05.01 -mpi_lan.h 01.05.01 01.05.01 01.05.01 01.05.01 01.05.01 -mpi_raid.h 01.05.02 01.05.02 01.05.02 01.05.02 01.05.02 -mpi_tool.h 01.05.03 01.05.03 01.05.03 01.05.03 01.05.03 -mpi_inb.h 01.05.01 01.05.01 01.05.01 01.05.01 01.05.01 -mpi_sas.h 01.05.03 01.05.02 01.05.01 01.05.01 01.05.01 -mpi_type.h 01.05.02 01.05.02 01.05.01 01.05.01 01.05.01 +Filename 01.05.12 01.05.11 01.05.10 01.05.09 +---------- -------- -------- -------- -------- +mpi.h 01.05.10 01.05.09 01.05.08 01.05.07 +mpi_ioc.h 01.05.10 01.05.09 01.05.09 01.05.08 +mpi_cnfg.h 01.05.11 01.05.10 01.05.09 01.05.08 +mpi_init.h 01.05.06 01.05.06 01.05.05 01.05.04 +mpi_targ.h 01.05.05 01.05.05 01.05.05 01.05.04 +mpi_fc.h 01.05.01 01.05.01 01.05.01 01.05.01 +mpi_lan.h 01.05.01 01.05.01 01.05.01 01.05.01 +mpi_raid.h 01.05.02 01.05.02 01.05.02 01.05.02 +mpi_tool.h 01.05.03 01.05.03 01.05.03 01.05.03 +mpi_inb.h 01.05.01 01.05.01 01.05.01 01.05.01 +mpi_sas.h 01.05.02 01.05.01 01.05.01 01.05.01 +mpi_type.h 01.05.02 01.05.01 01.05.01 01.05.01 Filename 01.05.08 01.05.07 01.05.06 01.05.05 01.05.04 01.05.03 ---------- -------- -------- -------- -------- -------- -------- diff --git a/drivers/message/fusion/lsi/mpi_init.h b/drivers/message/fusion/lsi/mpi_init.h index c1c678989..68941f459 100644 --- a/drivers/message/fusion/lsi/mpi_init.h +++ b/drivers/message/fusion/lsi/mpi_init.h @@ -6,7 +6,7 @@ * Title: MPI initiator mode messages and structures * Creation Date: June 8, 2000 * - * mpi_init.h Version: 01.05.07 + * mpi_init.h Version: 01.05.06 * * Version History * --------------- @@ -52,7 +52,6 @@ * Added four new defines for SEP SlotStatus. * 08-03-05 01.05.06 Fixed some MPI_SCSIIO32_MSGFLGS_ defines to make them * unique in the first 32 characters. - * 03-27-06 01.05.07 Added Task Management type of Clear ACA. * -------------------------------------------------------------------------- */ @@ -428,7 +427,6 @@ typedef struct _MSG_SCSI_TASK_MGMT #define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05) #define MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06) #define MPI_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07) -#define MPI_SCSITASKMGMT_TASKTYPE_CLEAR_ACA (0x08) /* MsgFlags bits */ #define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00) diff --git a/drivers/message/fusion/lsi/mpi_ioc.h b/drivers/message/fusion/lsi/mpi_ioc.h index 18ba407fd..2c5f43fa7 100644 --- a/drivers/message/fusion/lsi/mpi_ioc.h +++ b/drivers/message/fusion/lsi/mpi_ioc.h @@ -6,7 +6,7 @@ * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages * Creation Date: August 11, 2000 * - * mpi_ioc.h Version: 01.05.11 + * mpi_ioc.h Version: 01.05.10 * * Version History * --------------- @@ -87,17 +87,6 @@ * Added new ReasonCode value for SAS Device Status Change * event. * Added new family code for FC949E. - * 03-27-06 01.05.11 Added MPI_IOCFACTS_CAPABILITY_TLR. - * Added additional Reason Codes and more event data fields - * to EVENT_DATA_SAS_DEVICE_STATUS_CHANGE. - * Added EVENT_DATA_SAS_BROADCAST_PRIMITIVE structure and - * new event. - * Added MPI_EVENT_SAS_SMP_ERROR and event data structure. - * Added MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE and event - * data structure. - * Added MPI_EVENT_SAS_INIT_TABLE_OVERFLOW and event - * data structure. - * Added MPI_EXT_IMAGE_TYPE_INITIALIZATION. * -------------------------------------------------------------------------- */ @@ -283,7 +272,6 @@ typedef struct _MSG_IOC_FACTS_REPLY #define MPI_IOCFACTS_CAPABILITY_MULTICAST (0x00000100) #define MPI_IOCFACTS_CAPABILITY_SCSIIO32 (0x00000200) #define MPI_IOCFACTS_CAPABILITY_NO_SCSIIO16 (0x00000400) -#define MPI_IOCFACTS_CAPABILITY_TLR (0x00000800) /***************************************************************************** @@ -460,34 +448,30 @@ typedef struct _MSG_EVENT_ACK_REPLY /* Event */ -#define MPI_EVENT_NONE (0x00000000) -#define MPI_EVENT_LOG_DATA (0x00000001) -#define MPI_EVENT_STATE_CHANGE (0x00000002) -#define MPI_EVENT_UNIT_ATTENTION (0x00000003) -#define MPI_EVENT_IOC_BUS_RESET (0x00000004) -#define MPI_EVENT_EXT_BUS_RESET (0x00000005) -#define MPI_EVENT_RESCAN (0x00000006) -#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) -#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) -#define MPI_EVENT_LOGOUT (0x00000009) -#define MPI_EVENT_EVENT_CHANGE (0x0000000A) -#define MPI_EVENT_INTEGRATED_RAID (0x0000000B) -#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) -#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) -#define MPI_EVENT_QUEUE_FULL (0x0000000E) -#define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F) -#define MPI_EVENT_SAS_SES (0x00000010) -#define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011) -#define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012) -#define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013) -#define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014) -#define MPI_EVENT_IR2 (0x00000015) -#define MPI_EVENT_SAS_DISCOVERY (0x00000016) -#define MPI_EVENT_SAS_BROADCAST_PRIMITIVE (0x00000017) -#define MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x00000018) -#define MPI_EVENT_SAS_INIT_TABLE_OVERFLOW (0x00000019) -#define MPI_EVENT_SAS_SMP_ERROR (0x0000001A) -#define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021) +#define MPI_EVENT_NONE (0x00000000) +#define MPI_EVENT_LOG_DATA (0x00000001) +#define MPI_EVENT_STATE_CHANGE (0x00000002) +#define MPI_EVENT_UNIT_ATTENTION (0x00000003) +#define MPI_EVENT_IOC_BUS_RESET (0x00000004) +#define MPI_EVENT_EXT_BUS_RESET (0x00000005) +#define MPI_EVENT_RESCAN (0x00000006) +#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) +#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) +#define MPI_EVENT_LOGOUT (0x00000009) +#define MPI_EVENT_EVENT_CHANGE (0x0000000A) +#define MPI_EVENT_INTEGRATED_RAID (0x0000000B) +#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) +#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) +#define MPI_EVENT_QUEUE_FULL (0x0000000E) +#define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F) +#define MPI_EVENT_SAS_SES (0x00000010) +#define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011) +#define MPI_EVENT_SAS_PHY_LINK_STATUS (0x00000012) +#define MPI_EVENT_SAS_DISCOVERY_ERROR (0x00000013) +#define MPI_EVENT_IR_RESYNC_UPDATE (0x00000014) +#define MPI_EVENT_IR2 (0x00000015) +#define MPI_EVENT_SAS_DISCOVERY (0x00000016) +#define MPI_EVENT_LOG_ENTRY_ADDED (0x00000021) /* AckRequired field values */ @@ -574,25 +558,18 @@ typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE U8 PhyNum; /* 0Eh */ U8 Reserved1; /* 0Fh */ U64 SASAddress; /* 10h */ - U8 LUN[8]; /* 18h */ - U16 TaskTag; /* 20h */ - U16 Reserved2; /* 22h */ } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE, MpiEventDataSasDeviceStatusChange_t, MPI_POINTER pMpiEventDataSasDeviceStatusChange_t; /* MPI SAS Device Status Change Event data ReasonCode values */ -#define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03) -#define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04) -#define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05) -#define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06) -#define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07) -#define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08) -#define MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09) -#define MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A) -#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B) -#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C) +#define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03) +#define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04) +#define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05) +#define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06) +#define MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07) +#define MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08) /* SCSI Event data for Queue Full event */ @@ -765,27 +742,6 @@ typedef struct _EVENT_DATA_SAS_SES } EVENT_DATA_SAS_SES, MPI_POINTER PTR_EVENT_DATA_SAS_SES, MpiEventDataSasSes_t, MPI_POINTER pMpiEventDataSasSes_t; -/* SAS Broadcast Primitive Event data */ - -typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE -{ - U8 PhyNum; /* 00h */ - U8 Port; /* 01h */ - U8 PortWidth; /* 02h */ - U8 Primitive; /* 04h */ -} EVENT_DATA_SAS_BROADCAST_PRIMITIVE, - MPI_POINTER PTR_EVENT_DATA_SAS_BROADCAST_PRIMITIVE, - MpiEventDataSasBroadcastPrimitive_t, - MPI_POINTER pMpiEventDataSasBroadcastPrimitive_t; - -#define MPI_EVENT_PRIMITIVE_CHANGE (0x01) -#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03) -#define MPI_EVENT_PRIMITIVE_RESERVED2 (0x04) -#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05) -#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06) -#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07) -#define MPI_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08) - /* SAS Phy Link Status Event data */ typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS @@ -848,53 +804,6 @@ typedef struct _EVENT_DATA_DISCOVERY_ERROR #define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800) #define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000) -/* SAS SMP Error Event data */ - -typedef struct _EVENT_DATA_SAS_SMP_ERROR -{ - U8 Status; /* 00h */ - U8 Port; /* 01h */ - U8 SMPFunctionResult; /* 02h */ - U8 Reserved1; /* 03h */ - U64 SASAddress; /* 04h */ -} EVENT_DATA_SAS_SMP_ERROR, MPI_POINTER PTR_EVENT_DATA_SAS_SMP_ERROR, - MpiEventDataSasSmpError_t, MPI_POINTER pMpiEventDataSasSmpError_t; - -/* defines for the Status field of the SAS SMP Error event */ -#define MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID (0x00) -#define MPI_EVENT_SAS_SMP_CRC_ERROR (0x01) -#define MPI_EVENT_SAS_SMP_TIMEOUT (0x02) -#define MPI_EVENT_SAS_SMP_NO_DESTINATION (0x03) -#define MPI_EVENT_SAS_SMP_BAD_DESTINATION (0x04) - -/* SAS Initiator Device Status Change Event data */ - -typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE -{ - U8 ReasonCode; /* 00h */ - U8 Port; /* 01h */ - U16 DevHandle; /* 02h */ - U64 SASAddress; /* 04h */ -} EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE, - MPI_POINTER PTR_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE, - MpiEventDataSasInitDevStatusChange_t, - MPI_POINTER pMpiEventDataSasInitDevStatusChange_t; - -/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */ -#define MPI_EVENT_SAS_INIT_RC_ADDED (0x01) - -/* SAS Initiator Device Table Overflow Event data */ - -typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOW -{ - U8 MaxInit; /* 00h */ - U8 CurrentInit; /* 01h */ - U16 Reserved1; /* 02h */ -} EVENT_DATA_SAS_INIT_TABLE_OVERFLOW, - MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW, - MpiEventDataSasInitTableOverflow_t, - MPI_POINTER pMpiEventDataSasInitTableOverflow_t; - /***************************************************************************** * @@ -1104,6 +1013,5 @@ typedef struct _MPI_EXT_IMAGE_HEADER #define MPI_EXT_IMAGE_TYPE_FW (0x01) #define MPI_EXT_IMAGE_TYPE_NVDATA (0x03) #define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04) -#define MPI_EXT_IMAGE_TYPE_INITIALIZATION (0x05) #endif diff --git a/drivers/message/fusion/lsi/mpi_log_sas.h b/drivers/message/fusion/lsi/mpi_log_sas.h index 871ebc08b..a9c14ad13 100644 --- a/drivers/message/fusion/lsi/mpi_log_sas.h +++ b/drivers/message/fusion/lsi/mpi_log_sas.h @@ -13,8 +13,6 @@ #ifndef IOPI_IOCLOGINFO_H_INCLUDED #define IOPI_IOCLOGINFO_H_INCLUDED -#define SAS_LOGINFO_NEXUS_LOSS 0x31170000 -#define SAS_LOGINFO_MASK 0xFFFF0000 /****************************************************************************/ /* IOC LOGINFO defines, 0x00000000 - 0x0FFFFFFF */ @@ -53,9 +51,6 @@ #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DNM (0x00030500) /* Device Not Mapped */ #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PERSIST (0x00030600) /* Persistent Page not found */ #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DEFAULT (0x00030700) /* Default Page not found */ - -#define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */ - #define IOP_LOGINFO_CODE_TASK_TERMINATED (0x00050000) #define IOP_LOGINFO_CODE_ENCL_MGMT_READ_ACTION_ERR0R (0x00060001) /* Read Action not supported for SEP msg */ @@ -108,7 +103,6 @@ #define PL_LOGINFO_CODE_IO_EXECUTED (0x00140000) #define PL_LOGINFO_CODE_PERS_RESV_OUT_NOT_AFFIL_OWNER (0x00150000) #define PL_LOGINFO_CODE_OPEN_TXDMA_ABORT (0x00160000) -#define PL_LOGINFO_CODE_IO_DEVICE_MISSING_DELAY_RETRY (0x00170000) #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE (0x00000100) #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_NO_DEST_TIMEOUT (0x00000101) #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ORR_TIMEOUT (0x0000011A) /* Open Reject (Retry) Timeout */ @@ -171,81 +165,11 @@ /****************************************************************************/ /* IR LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IR */ /****************************************************************************/ -#define IR_LOGINFO_RAID_ACTION_ERROR (0x00010000) -#define IR_LOGINFO_CODE_UNUSED2 (0x00020000) - -/* Amount of information passed down for Create Volume is too large */ -#define IR_LOGINFO_VOLUME_CREATE_INVALID_LENGTH (0x00010001) -/* Creation of duplicate volume attempted (Bus/Target ID checked) */ -#define IR_LOGINFO_VOLUME_CREATE_DUPLICATE (0x00010002) -/* Creation failed due to maximum number of supported volumes exceeded */ -#define IR_LOGINFO_VOLUME_CREATE_NO_SLOTS (0x00010003) -/* Creation failed due to DMA error in trying to read from host */ -#define IR_LOGINFO_VOLUME_CREATE_DMA_ERROR (0x00010004) -/* Creation failed due to invalid volume type passed down */ -#define IR_LOGINFO_VOLUME_CREATE_INVALID_VOLUME_TYPE (0x00010005) -/* Creation failed due to error reading MFG Page 4 */ -#define IR_LOGINFO_VOLUME_MFG_PAGE4_ERROR (0x00010006) -/* Creation failed when trying to create internal structures */ -#define IR_LOGINFO_VOLUME_INTERNAL_CONFIG_STRUCTURE_ERROR (0x00010007) - -/* Activation failed due to trying to activate an already active volume */ -#define IR_LOGINFO_VOLUME_ACTIVATING_AN_ACTIVE_VOLUME (0x00010010) -/* Activation failed due to trying to active unsupported volume type */ -#define IR_LOGINFO_VOLUME_ACTIVATING_INVALID_VOLUME_TYPE (0x00010011) -/* Activation failed due to trying to active too many volumes */ -#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_VOLUMES (0x00010012) -/* Activation failed due to Volume ID in use already */ -#define IR_LOGINFO_VOLUME_ACTIVATING_VOLUME_ID_IN_USE (0x00010013) -/* Activation failed call to activateVolume returned failure */ -#define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED (0x00010014) -/* Activation failed trying to import the volume */ -#define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED (0x00010015) - -/* Phys Disk failed, too many phys disks */ -#define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS (0x00010020) -/* Amount of information passed down for Create Pnysdisk is too large */ -#define IR_LOGINFO_PHYSDISK_CREATE_INVALID_LENGTH (0x00010021) -/* Creation failed due to DMA error in trying to read from host */ -#define IR_LOGINFO_PHYSDISK_CREATE_DMA_ERROR (0x00010022) -/* Creation failed due to invalid Bus TargetID passed down */ -#define IR_LOGINFO_PHYSDISK_CREATE_BUS_TID_INVALID (0x00010023) -/* Creation failed due to error in creating RAID Phys Disk Config Page */ -#define IR_LOGINFO_PHYSDISK_CREATE_CONFIG_PAGE_ERROR (0x00010024) - - -/* Compatibility Error : IR Disabled */ -#define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED (0x00010030) -/* Compatibility Error : Inquiry Comand failed */ -#define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED (0x00010031) -/* Compatibility Error : Device not direct access device */ -#define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS (0x00010032) -/* Compatibility Error : Removable device found */ -#define IR_LOGINFO_COMPAT_ERROR_REMOVABLE_FOUND (0x00010033) -/* Compatibility Error : Device SCSI Version not 2 or higher */ -#define IR_LOGINFO_COMPAT_ERROR_NEED_SCSI_2_OR_HIGHER (0x00010034) -/* Compatibility Error : SATA device, 48 BIT LBA not supported */ -#define IR_LOGINFO_COMPAT_ERROR_SATA_48BIT_LBA_NOT_SUPPORTED (0x00010035) -/* Compatibility Error : Device does not have 512 byte block sizes */ -#define IR_LOGINFO_COMPAT_ERROR_DEVICE_NOT_512_BYTE_BLOCK (0x00010036) -/* Compatibility Error : Volume Type check failed */ -#define IR_LOGINFO_COMPAT_ERROR_VOLUME_TYPE_CHECK_FAILED (0x00010037) -/* Compatibility Error : Volume Type is unsupported by FW */ -#define IR_LOGINFO_COMPAT_ERROR_UNSUPPORTED_VOLUME_TYPE (0x00010038) -/* Compatibility Error : Disk drive too small for use in volume */ -#define IR_LOGINFO_COMPAT_ERROR_DISK_TOO_SMALL (0x00010039) -/* Compatibility Error : Phys disk for Create Volume not found */ -#define IR_LOGINFO_COMPAT_ERROR_PHYS_DISK_NOT_FOUND (0x0001003A) -/* Compatibility Error : membership count error, too many or too few disks for volume type */ -#define IR_LOGINFO_COMPAT_ERROR_MEMBERSHIP_COUNT (0x0001003B) -/* Compatibility Error : Disk stripe sizes must be 64KB */ -#define IR_LOGINFO_COMPAT_ERROR_NON_64K_STRIPE_SIZE (0x0001003C) -/* Compatibility Error : IME size limited to < 2TB */ -#define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED (0x0001003D) - +#define IR_LOGINFO_CODE_UNUSED1 (0x00010000) +#define IR_LOGINFO_CODE_UNUSED2 (0x00020000) /****************************************************************************/ -/* Defines for convenience */ +/* Defines for convienence */ /****************************************************************************/ #define IOC_LOGINFO_PREFIX_IOP ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IOP) #define IOC_LOGINFO_PREFIX_PL ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_PL) diff --git a/drivers/message/fusion/lsi/mpi_sas.h b/drivers/message/fusion/lsi/mpi_sas.h index 50b8f0a8f..70514867b 100644 --- a/drivers/message/fusion/lsi/mpi_sas.h +++ b/drivers/message/fusion/lsi/mpi_sas.h @@ -6,7 +6,7 @@ * Title: MPI Serial Attached SCSI structures and definitions * Creation Date: August 19, 2004 * - * mpi_sas.h Version: 01.05.03 + * mpi_sas.h Version: 01.05.02 * * Version History * --------------- @@ -17,10 +17,6 @@ * 08-30-05 01.05.02 Added DeviceInfo bit for SEP. * Added PrimFlags and Primitive field to SAS IO Unit * Control request, and added a new operation code. - * 03-27-06 01.05.03 Added Force Full Discovery, Transmit Port Select Signal, - * and Remove Device operations to SAS IO Unit Control. - * Added DevHandle field to SAS IO Unit Control request and - * reply. * -------------------------------------------------------------------------- */ @@ -213,7 +209,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUEST U8 Reserved1; /* 01h */ U8 ChainOffset; /* 02h */ U8 Function; /* 03h */ - U16 DevHandle; /* 04h */ + U16 Reserved2; /* 04h */ U8 Reserved3; /* 06h */ U8 MsgFlags; /* 07h */ U32 MsgContext; /* 08h */ @@ -235,9 +231,6 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUEST #define MPI_SAS_OP_PHY_CLEAR_ERROR_LOG (0x08) #define MPI_SAS_OP_MAP_CURRENT (0x09) #define MPI_SAS_OP_SEND_PRIMITIVE (0x0A) -#define MPI_SAS_OP_FORCE_FULL_DISCOVERY (0x0B) -#define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C) -#define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE (0x0D) /* values for the PrimFlags field */ #define MPI_SAS_PRIMFLAGS_SINGLE (0x08) @@ -252,7 +245,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REPLY U8 Reserved1; /* 01h */ U8 MsgLength; /* 02h */ U8 Function; /* 03h */ - U16 DevHandle; /* 04h */ + U16 Reserved2; /* 04h */ U8 Reserved3; /* 06h */ U8 MsgFlags; /* 07h */ U32 MsgContext; /* 08h */ diff --git a/drivers/message/fusion/lsi/mpi_targ.h b/drivers/message/fusion/lsi/mpi_targ.h index 20b667315..3f462859c 100644 --- a/drivers/message/fusion/lsi/mpi_targ.h +++ b/drivers/message/fusion/lsi/mpi_targ.h @@ -6,7 +6,7 @@ * Title: MPI Target mode messages and structures * Creation Date: June 22, 2000 * - * mpi_targ.h Version: 01.05.06 + * mpi_targ.h Version: 01.05.05 * * Version History * --------------- @@ -54,7 +54,6 @@ * 02-22-05 01.05.03 Changed a comment. * 03-11-05 01.05.04 Removed TargetAssistExtended Request. * 06-24-05 01.05.05 Added TargetAssistExtended structures and defines. - * 03-27-06 01.05.06 Added a comment. * -------------------------------------------------------------------------- */ @@ -352,7 +351,7 @@ typedef struct _MSG_TARGET_ASSIST_REQUEST #define TARGET_ASSIST_FLAGS_CONFIRMED (0x08) #define TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80) -/* Standard Target Mode Reply message */ + typedef struct _MSG_TARGET_ERROR_REPLY { U16 Reserved; /* 00h */ diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 6a035959c..79718c1cf 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -46,6 +46,7 @@ */ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +#include #include #include #include @@ -62,6 +63,9 @@ #ifdef CONFIG_MTRR #include #endif +#ifdef __sparc__ +#include /* needed for __irq_itoa() proto */ +#endif #include "mptbase.h" @@ -369,21 +373,20 @@ static irqreturn_t mpt_interrupt(int irq, void *bus_id, struct pt_regs *r) { MPT_ADAPTER *ioc = bus_id; - u32 pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo); - - if (pa == 0xFFFFFFFF) - return IRQ_NONE; + u32 pa; /* * Drain the reply FIFO! */ - do { - if (pa & MPI_ADDRESS_REPLY_A_BIT) + while (1) { + pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo); + if (pa == 0xFFFFFFFF) + return IRQ_HANDLED; + else if (pa & MPI_ADDRESS_REPLY_A_BIT) mpt_reply(ioc, pa); else mpt_turbo_reply(ioc, pa); - pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo); - } while (pa != 0xFFFFFFFF); + } return IRQ_HANDLED; } @@ -437,6 +440,8 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply) */ if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) { freereq = 0; + devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p does not return Request frame\n", + ioc->name, pEvReply)); } else { devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n", ioc->name, pEvReply)); @@ -677,19 +682,19 @@ int mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx) { MPT_ADAPTER *ioc; - const struct pci_device_id *id; - if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) + if (cb_idx < 1 || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) { return -EINVAL; + } MptDeviceDriverHandlers[cb_idx] = dd_cbfunc; /* call per pci device probe entry point */ list_for_each_entry(ioc, &ioc_list, list) { - id = ioc->pcidev->driver ? - ioc->pcidev->driver->id_table : NULL; - if (dd_cbfunc->probe) - dd_cbfunc->probe(ioc->pcidev, id); + if(dd_cbfunc->probe) { + dd_cbfunc->probe(ioc->pcidev, + ioc->pcidev->driver->id_table); + } } return 0; @@ -1055,8 +1060,9 @@ mpt_host_page_alloc(MPT_ADAPTER *ioc, pIOCInit_t ioc_init) dinitprintk((MYIOC_s_INFO_FMT "host_page_buffer @ %p, dma @ %x, sz=%d bytes\n", - ioc->name, ioc->HostPageBuffer, - (u32)ioc->HostPageBuffer_dma, + ioc->name, + ioc->HostPageBuffer, + ioc->HostPageBuffer_dma, host_page_buffer_sz)); ioc->alloc_total += host_page_buffer_sz; ioc->HostPageBuffer_sz = host_page_buffer_sz; @@ -1183,6 +1189,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->pcidev = pdev; ioc->diagPending = 0; spin_lock_init(&ioc->diagLock); + spin_lock_init(&ioc->fc_rescan_work_lock); spin_lock_init(&ioc->initializing_hba_lock); /* Initialize the event logging. @@ -1218,25 +1225,31 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) port = psize = 0; for (ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) { if (pci_resource_flags(pdev, ii) & PCI_BASE_ADDRESS_SPACE_IO) { - if (psize) - continue; /* Get I/O space! */ port = pci_resource_start(pdev, ii); psize = pci_resource_len(pdev,ii); } else { - if (msize) - continue; /* Get memmap */ mem_phys = pci_resource_start(pdev, ii); msize = pci_resource_len(pdev,ii); + break; } } ioc->mem_size = msize; + if (ii == DEVICE_COUNT_RESOURCE) { + printk(KERN_ERR MYNAM ": ERROR - MPT adapter has no memory regions defined!\n"); + kfree(ioc); + return -EINVAL; + } + + dinitprintk((KERN_INFO MYNAM ": MPT adapter @ %lx, msize=%dd bytes\n", mem_phys, msize)); + dinitprintk((KERN_INFO MYNAM ": (port i/o @ %lx, psize=%dd bytes)\n", port, psize)); + mem = NULL; /* Get logical ptr for PciMem0 space */ /*mem = ioremap(mem_phys, msize);*/ - mem = ioremap(mem_phys, msize); + mem = ioremap(mem_phys, 0x100); if (mem == NULL) { printk(KERN_ERR MYNAM ": ERROR - Unable to map adapter memory!\n"); kfree(ioc); @@ -1336,6 +1349,11 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->bus_type = SAS; ioc->errata_flag_1064 = 1; } + else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1066) { + ioc->prod_name = "LSISAS1066"; + ioc->bus_type = SAS; + ioc->errata_flag_1064 = 1; + } else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1068) { ioc->prod_name = "LSISAS1068"; ioc->bus_type = SAS; @@ -1345,12 +1363,12 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->prod_name = "LSISAS1064E"; ioc->bus_type = SAS; } - else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1068E) { - ioc->prod_name = "LSISAS1068E"; + else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1066E) { + ioc->prod_name = "LSISAS1066E"; ioc->bus_type = SAS; } - else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) { - ioc->prod_name = "LSISAS1078"; + else if (pdev->device == MPI_MANUFACTPAGE_DEVID_SAS1068E) { + ioc->prod_name = "LSISAS1068E"; ioc->bus_type = SAS; } @@ -1369,6 +1387,39 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) /* Set lookup ptr. */ list_add_tail(&ioc->list, &ioc_list); + ioc->pci_irq = -1; + if (pdev->irq) { + if (mpt_msi_enable && !pci_enable_msi(pdev)) + printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", ioc->name); + + r = request_irq(pdev->irq, mpt_interrupt, SA_SHIRQ, ioc->name, ioc); + + if (r < 0) { +#ifndef __sparc__ + printk(MYIOC_s_ERR_FMT "Unable to allocate interrupt %d!\n", + ioc->name, pdev->irq); +#else + printk(MYIOC_s_ERR_FMT "Unable to allocate interrupt %s!\n", + ioc->name, __irq_itoa(pdev->irq)); +#endif + list_del(&ioc->list); + iounmap(mem); + kfree(ioc); + return -EBUSY; + } + + ioc->pci_irq = pdev->irq; + + pci_set_master(pdev); /* ?? */ + pci_set_drvdata(pdev, ioc); + +#ifndef __sparc__ + dprintk((KERN_INFO MYNAM ": %s installed at interrupt %d\n", ioc->name, pdev->irq)); +#else + dprintk((KERN_INFO MYNAM ": %s installed at interrupt %s\n", ioc->name, __irq_itoa(pdev->irq))); +#endif + } + /* Check for "bound ports" (929, 929X, 1030, 1035) to reduce redundant resets. */ mpt_detect_bound_ports(ioc, pdev); @@ -1380,6 +1431,9 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->name, r); list_del(&ioc->list); + free_irq(ioc->pci_irq, ioc); + if (mpt_msi_enable) + pci_disable_msi(pdev); if (ioc->alt_ioc) ioc->alt_ioc->alt_ioc = NULL; iounmap(mem); @@ -1598,7 +1652,6 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) int handlers; int ret = 0; int reset_alt_ioc_active = 0; - int irq_allocated = 0; printk(KERN_INFO MYNAM ": Initiating %s %s\n", ioc->name, reason==MPT_HOSTEVENT_IOC_BRINGUP ? "bringup" : "recovery"); @@ -1682,36 +1735,6 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) } } - /* - * Device is reset now. It must have de-asserted the interrupt line - * (if it was asserted) and it should be safe to register for the - * interrupt now. - */ - if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) { - ioc->pci_irq = -1; - if (ioc->pcidev->irq) { - if (mpt_msi_enable && !pci_enable_msi(ioc->pcidev)) - printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", - ioc->name); - rc = request_irq(ioc->pcidev->irq, mpt_interrupt, - IRQF_SHARED, ioc->name, ioc); - if (rc < 0) { - printk(MYIOC_s_ERR_FMT "Unable to allocate " - "interrupt %d!\n", ioc->name, - ioc->pcidev->irq); - if (mpt_msi_enable) - pci_disable_msi(ioc->pcidev); - return -EBUSY; - } - irq_allocated = 1; - ioc->pci_irq = ioc->pcidev->irq; - pci_set_master(ioc->pcidev); /* ?? */ - pci_set_drvdata(ioc->pcidev, ioc); - dprintk((KERN_INFO MYNAM ": %s installed at interrupt " - "%d\n", ioc->name, ioc->pcidev->irq)); - } - } - /* Prime reply & request queues! * (mucho alloc's) Must be done prior to * init as upper addresses are needed for init. @@ -1761,9 +1784,9 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) * chips (mpt_adapter_disable, * mpt_diag_reset) */ + ioc->cached_fw = NULL; ddlprintk((MYIOC_s_INFO_FMT ": mpt_upload: alt_%s has cached_fw=%p \n", ioc->name, ioc->alt_ioc->name, ioc->alt_ioc->cached_fw)); - ioc->alt_ioc->cached_fw = NULL; } } else { printk(KERN_WARNING MYNAM ": firmware upload failure!\n"); @@ -1811,7 +1834,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) ret = mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); if(ret != 0) - goto out; + return -1; } /* Find IM volumes @@ -1819,6 +1842,14 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) mpt_findImVolumes(ioc); } else if (ioc->bus_type == FC) { + /* + * Pre-fetch FC port WWN and stuff... + * (FCPortPage0_t stuff) + */ + for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { + (void) mptbase_GetFcPortPage0(ioc, ii); + } + if ((ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) && (ioc->lan_cnfg_page0.Header.PageLength == 0)) { /* @@ -1884,12 +1915,6 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) /* FIXME? Examine results here? */ } - out: - if ((ret != 0) && irq_allocated) { - free_irq(ioc->pci_irq, ioc); - if (mpt_msi_enable) - pci_disable_msi(ioc->pcidev); - } return ret; } @@ -2264,7 +2289,7 @@ MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag) } if (sleepFlag == CAN_SLEEP) { - msleep(1); + msleep_interruptible(1); } else { mdelay (1); /* 1 msec delay */ } @@ -2652,7 +2677,7 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepFlag) state = mpt_GetIocState(ioc, 1); while (state != MPI_IOC_STATE_OPERATIONAL && --cntdn) { if (sleepFlag == CAN_SLEEP) { - msleep(1); + msleep_interruptible(1); } else { mdelay(1); } @@ -2669,7 +2694,6 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepFlag) dinitprintk((MYIOC_s_INFO_FMT "INFO - Wait IOC_OPERATIONAL state (cnt=%d)\n", ioc->name, count)); - ioc->aen_event_read_flag=0; return r; } @@ -2737,8 +2761,6 @@ mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) { ioc->cached_fw = ioc->alt_ioc->cached_fw; /* use alt_ioc's memory */ ioc->cached_fw_dma = ioc->alt_ioc->cached_fw_dma; - ioc->alloc_total += size; - ioc->alt_ioc->alloc_total -= size; } else { if ( (ioc->cached_fw = pci_alloc_consistent(ioc->pcidev, size, &ioc->cached_fw_dma) ) ) ioc->alloc_total += size; @@ -2907,7 +2929,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag) /* wait 1 msec */ if (sleepFlag == CAN_SLEEP) { - msleep(1); + msleep_interruptible(1); } else { mdelay (1); } @@ -2924,7 +2946,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag) } /* wait .1 sec */ if (sleepFlag == CAN_SLEEP) { - msleep (100); + msleep_interruptible (100); } else { mdelay (100); } @@ -3014,7 +3036,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag) /* wait 1 msec */ if (sleepFlag == CAN_SLEEP) { - msleep (1); + msleep_interruptible (1); } else { mdelay (1); } @@ -3062,7 +3084,7 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag) return 0; } if (sleepFlag == CAN_SLEEP) { - msleep (10); + msleep_interruptible (10); } else { mdelay (10); } @@ -3113,7 +3135,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag) SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag); if (sleepFlag == CAN_SLEEP) { - msleep (1000); + msleep_interruptible (1000); } else { mdelay (1000); } @@ -3135,7 +3157,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag) return hard_reset_done; } if (sleepFlag == CAN_SLEEP) { - msleep (10); + msleep_interruptible (10); } else { mdelay (10); } @@ -3168,7 +3190,6 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag) static int mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) { - MPT_ADAPTER *iocp=NULL; u32 diag0val; u32 doorbell; int hard_reset_done = 0; @@ -3177,37 +3198,6 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) u32 diag1val = 0; #endif - if (ioc->pcidev->device == MPI_MANUFACTPAGE_DEVID_SAS1078) { - drsprintk((MYIOC_s_WARN_FMT "%s: Doorbell=%p; 1078 reset " - "address=%p\n", ioc->name, __FUNCTION__, - &ioc->chip->Doorbell, &ioc->chip->Reset_1078)); - CHIPREG_WRITE32(&ioc->chip->Reset_1078, 0x07); - if (sleepFlag == CAN_SLEEP) - msleep(1); - else - mdelay(1); - - for (count = 0; count < 60; count ++) { - doorbell = CHIPREG_READ32(&ioc->chip->Doorbell); - doorbell &= MPI_IOC_STATE_MASK; - - drsprintk((MYIOC_s_INFO_FMT - "looking for READY STATE: doorbell=%x" - " count=%d\n", - ioc->name, doorbell, count)); - if (doorbell == MPI_IOC_STATE_READY) { - return 0; - } - - /* wait 1 sec */ - if (sleepFlag == CAN_SLEEP) - msleep(1000); - else - mdelay(1000); - } - return -1; - } - /* Clear any existing interrupts */ CHIPREG_WRITE32(&ioc->chip->IntStatus, 0); @@ -3238,7 +3228,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) /* wait 100 msec */ if (sleepFlag == CAN_SLEEP) { - msleep (100); + msleep_interruptible (100); } else { mdelay (100); } @@ -3304,32 +3294,26 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) /* FIXME? Examine results here? */ } - if (ioc->cached_fw) - iocp = ioc; - else if (ioc->alt_ioc && ioc->alt_ioc->cached_fw) - iocp = ioc->alt_ioc; - if (iocp) { + if (ioc->cached_fw) { /* If the DownloadBoot operation fails, the * IOC will be left unusable. This is a fatal error * case. _diag_reset will return < 0 */ for (count = 0; count < 30; count ++) { - diag0val = CHIPREG_READ32(&iocp->chip->Diagnostic); + diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic); if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) { break; } - dprintk((MYIOC_s_INFO_FMT "cached_fw: diag0val=%x count=%d\n", - iocp->name, diag0val, count)); /* wait 1 sec */ if (sleepFlag == CAN_SLEEP) { - msleep (1000); + msleep_interruptible (1000); } else { mdelay (1000); } } if ((count = mpt_downloadboot(ioc, - (MpiFwHeader_t *)iocp->cached_fw, sleepFlag)) < 0) { + (MpiFwHeader_t *)ioc->cached_fw, sleepFlag)) < 0) { printk(KERN_WARNING MYNAM ": firmware downloadboot failure (%d)!\n", count); } @@ -3351,7 +3335,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) /* wait 1 sec */ if (sleepFlag == CAN_SLEEP) { - msleep (1000); + msleep_interruptible (1000); } else { mdelay (1000); } @@ -3385,7 +3369,7 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag) /* wait 100 msec */ if (sleepFlag == CAN_SLEEP) { - msleep (100); + msleep_interruptible (100); } else { mdelay (100); } @@ -3479,7 +3463,7 @@ SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag) } if (sleepFlag == CAN_SLEEP) { - msleep(1); + msleep_interruptible(1); } else { mdelay (1); /* 1 msec delay */ } @@ -3916,18 +3900,18 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag) if (sleepFlag == CAN_SLEEP) { while (--cntdn) { - msleep (1); intstat = CHIPREG_READ32(&ioc->chip->IntStatus); if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) break; + msleep_interruptible (1); count++; } } else { while (--cntdn) { - mdelay (1); intstat = CHIPREG_READ32(&ioc->chip->IntStatus); if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS)) break; + mdelay (1); count++; } } @@ -3968,7 +3952,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag) intstat = CHIPREG_READ32(&ioc->chip->IntStatus); if (intstat & MPI_HIS_DOORBELL_INTERRUPT) break; - msleep(1); + msleep_interruptible(1); count++; } } else { @@ -4189,6 +4173,108 @@ GetLanConfigPages(MPT_ADAPTER *ioc) return rc; } +/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +/* + * mptbase_GetFcPortPage0 - Fetch FCPort config Page0. + * @ioc: Pointer to MPT_ADAPTER structure + * @portnum: IOC Port number + * + * Return: 0 for success + * -ENOMEM if no memory available + * -EPERM if not allowed due to ISR context + * -EAGAIN if no msg frames currently available + * -EFAULT for non-successful reply or no reply (timeout) + */ +int +mptbase_GetFcPortPage0(MPT_ADAPTER *ioc, int portnum) +{ + ConfigPageHeader_t hdr; + CONFIGPARMS cfg; + FCPortPage0_t *ppage0_alloc; + FCPortPage0_t *pp0dest; + dma_addr_t page0_dma; + int data_sz; + int copy_sz; + int rc; + int count = 400; + + + /* Get FCPort Page 0 header */ + hdr.PageVersion = 0; + hdr.PageLength = 0; + hdr.PageNumber = 0; + hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; + cfg.cfghdr.hdr = &hdr; + cfg.physAddr = -1; + cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; + cfg.dir = 0; + cfg.pageAddr = portnum; + cfg.timeout = 0; + + if ((rc = mpt_config(ioc, &cfg)) != 0) + return rc; + + if (hdr.PageLength == 0) + return 0; + + data_sz = hdr.PageLength * 4; + rc = -ENOMEM; + ppage0_alloc = (FCPortPage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma); + if (ppage0_alloc) { + + try_again: + memset((u8 *)ppage0_alloc, 0, data_sz); + cfg.physAddr = page0_dma; + cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; + + if ((rc = mpt_config(ioc, &cfg)) == 0) { + /* save the data */ + pp0dest = &ioc->fc_port_page0[portnum]; + copy_sz = min_t(int, sizeof(FCPortPage0_t), data_sz); + memcpy(pp0dest, ppage0_alloc, copy_sz); + + /* + * Normalize endianness of structure data, + * by byte-swapping all > 1 byte fields! + */ + pp0dest->Flags = le32_to_cpu(pp0dest->Flags); + pp0dest->PortIdentifier = le32_to_cpu(pp0dest->PortIdentifier); + pp0dest->WWNN.Low = le32_to_cpu(pp0dest->WWNN.Low); + pp0dest->WWNN.High = le32_to_cpu(pp0dest->WWNN.High); + pp0dest->WWPN.Low = le32_to_cpu(pp0dest->WWPN.Low); + pp0dest->WWPN.High = le32_to_cpu(pp0dest->WWPN.High); + pp0dest->SupportedServiceClass = le32_to_cpu(pp0dest->SupportedServiceClass); + pp0dest->SupportedSpeeds = le32_to_cpu(pp0dest->SupportedSpeeds); + pp0dest->CurrentSpeed = le32_to_cpu(pp0dest->CurrentSpeed); + pp0dest->MaxFrameSize = le32_to_cpu(pp0dest->MaxFrameSize); + pp0dest->FabricWWNN.Low = le32_to_cpu(pp0dest->FabricWWNN.Low); + pp0dest->FabricWWNN.High = le32_to_cpu(pp0dest->FabricWWNN.High); + pp0dest->FabricWWPN.Low = le32_to_cpu(pp0dest->FabricWWPN.Low); + pp0dest->FabricWWPN.High = le32_to_cpu(pp0dest->FabricWWPN.High); + pp0dest->DiscoveredPortsCount = le32_to_cpu(pp0dest->DiscoveredPortsCount); + pp0dest->MaxInitiators = le32_to_cpu(pp0dest->MaxInitiators); + + /* + * if still doing discovery, + * hang loose a while until finished + */ + if (pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN) { + if (count-- > 0) { + msleep_interruptible(100); + goto try_again; + } + printk(MYIOC_s_INFO_FMT "Firmware discovery not" + " complete.\n", + ioc->name); + } + } + + pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma); + } + + return rc; +} + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * mptbase_sas_persist_operation - Perform operation on SAS Persitent Table @@ -4892,7 +4978,6 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc) pIoc4 = pci_alloc_consistent(ioc->pcidev, iocpage4sz, &ioc4_dma); if (!pIoc4) return; - ioc->alloc_total += iocpage4sz; } else { ioc4_dma = ioc->spi_data.IocPg4_dma; iocpage4sz = ioc->spi_data.IocPg4Sz; @@ -4909,7 +4994,6 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc) } else { pci_free_consistent(ioc->pcidev, iocpage4sz, pIoc4, ioc4_dma); ioc->spi_data.pIocPg4 = NULL; - ioc->alloc_total -= iocpage4sz; } } @@ -5041,18 +5125,19 @@ SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp) EventAck_t *pAck; if ((pAck = (EventAck_t *) mpt_get_msg_frame(mpt_base_index, ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n", - ioc->name,__FUNCTION__)); + printk(MYIOC_s_WARN_FMT "Unable to allocate event ACK " + "request frame for Event=%x EventContext=%x EventData=%x!\n", + ioc->name, evnp->Event, le32_to_cpu(evnp->EventContext), + le32_to_cpu(evnp->Data[0])); return -1; } + memset(pAck, 0, sizeof(*pAck)); - devtverboseprintk((MYIOC_s_INFO_FMT "Sending EventAck\n", ioc->name)); + dprintk((MYIOC_s_INFO_FMT "Sending EventAck\n", ioc->name)); pAck->Function = MPI_FUNCTION_EVENT_ACK; pAck->ChainOffset = 0; - pAck->Reserved[0] = pAck->Reserved[1] = 0; pAck->MsgFlags = 0; - pAck->Reserved1[0] = pAck->Reserved1[1] = pAck->Reserved1[2] = 0; pAck->Event = evnp->Event; pAck->EventContext = evnp->EventContext; @@ -5563,7 +5648,11 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh a[5], a[4], a[3], a[2], a[1], a[0]); } +#ifndef __sparc__ y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq); +#else + y += sprintf(buffer+len+y, ", IRQ=%s", __irq_itoa(ioc->pci_irq)); +#endif if (!ioc->active) y += sprintf(buffer+len+y, " (disabled)"); @@ -5622,7 +5711,7 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag) /* The SCSI driver needs to adjust timeouts on all current * commands prior to the diagnostic reset being issued. - * Prevents timeouts occurring during a diagnostic reset...very bad. + * Prevents timeouts occuring during a diagnostic reset...very bad. * For all other protocol drivers, this is a no-op. */ { @@ -5714,9 +5803,9 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr) break; case MPI_EVENT_EVENT_CHANGE: if (evData0) - ds = "Events ON"; + ds = "Events(ON) Change"; else - ds = "Events OFF"; + ds = "Events(OFF) Change"; break; case MPI_EVENT_INTEGRATED_RAID: { @@ -5787,27 +5876,8 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr) break; case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: No Persistancy: id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET: - snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: Internal Device Reset : id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL: - snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: Internal Task Abort : id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL: - snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: Internal Abort Task Set : id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL: - snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: Internal Clear Task Set : id=%d", id); - break; - case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL: - snprintf(evStr, EVENT_DESCR_STR_SZ, - "SAS Device Status Change: Internal Query Task : id=%d", id); + "SAS Device Status Change: No Persistancy " + "Added: id=%d", id); break; default: snprintf(evStr, EVENT_DESCR_STR_SZ, @@ -6063,7 +6133,7 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply * @ioc: Pointer to MPT_ADAPTER structure * @log_info: U32 LogInfo reply word from the IOC * - * Refer to lsi/mpi_log_fc.h. + * Refer to lsi/fc_log.h. */ static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) @@ -6160,10 +6230,8 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) "Invalid SAS Address", /* 01h */ NULL, /* 02h */ "Invalid Page", /* 03h */ - "Diag Message Error", /* 04h */ - "Task Terminated", /* 05h */ - "Enclosure Management", /* 06h */ - "Target Mode" /* 07h */ + NULL, /* 04h */ + "Task Terminated" /* 05h */ }; static char *pl_code_str[] = { NULL, /* 00h */ @@ -6189,7 +6257,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) "IO Executed", /* 14h */ "Persistant Reservation Out Not Affiliation Owner", /* 15h */ "Open Transmit DMA Abort", /* 16h */ - "IO Device Missing Delay Retry", /* 17h */ + NULL, /* 17h */ NULL, /* 18h */ NULL, /* 19h */ NULL, /* 1Ah */ @@ -6269,7 +6337,7 @@ static void mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) { u32 status = ioc_status & MPI_IOCSTATUS_MASK; - char *desc = NULL; + char *desc = ""; switch (status) { case MPI_IOCSTATUS_INVALID_FUNCTION: /* 0x0001 */ @@ -6379,7 +6447,7 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf) desc = "Others"; break; } - if (desc != NULL) + if (desc != "") printk(MYIOC_s_INFO_FMT "IOCStatus(0x%04x): %s\n", ioc->name, status, desc); } @@ -6416,6 +6484,8 @@ EXPORT_SYMBOL(mpt_findImVolumes); EXPORT_SYMBOL(mpt_alloc_fw_memory); EXPORT_SYMBOL(mpt_free_fw_memory); EXPORT_SYMBOL(mptbase_sas_persist_operation); +EXPORT_SYMBOL(mptbase_GetFcPortPage0); + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index c537d71c1..f673cca50 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h @@ -49,6 +49,7 @@ #define MPTBASE_H_INCLUDED /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +#include #include #include @@ -75,8 +76,8 @@ #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR #endif -#define MPT_LINUX_VERSION_COMMON "3.04.01" -#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.01" +#define MPT_LINUX_VERSION_COMMON "3.03.09" +#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.09" #define WHAT_MAGIC_STRING "@" "(" "#" ")" #define show_mptmod_ver(s,ver) \ @@ -307,8 +308,7 @@ typedef struct _SYSIF_REGS u32 HostIndex; /* 50 Host Index register */ u32 Reserved4[15]; /* 54-8F */ u32 Fubar; /* 90 For Fubar usage */ - u32 Reserved5[1050];/* 94-10F8 */ - u32 Reset_1078; /* 10FC Reset 1078 */ + u32 Reserved5[27]; /* 94-FF */ } SYSIF_REGS; /* @@ -342,7 +342,6 @@ typedef struct _VirtTarget { u8 negoFlags; /* bit field, see above */ u8 raidVolume; /* set, if RAID Volume */ u8 type; /* byte 0 of Inquiry data */ - u8 deleted; /* target in process of being removed */ u32 num_luns; u32 luns[8]; /* Max LUNs is 256 */ } VirtTarget; @@ -363,7 +362,6 @@ typedef struct _VirtDevice { #define MPT_TARGET_FLAGS_VALID_56 0x10 #define MPT_TARGET_FLAGS_SAF_TE_ISSUED 0x20 #define MPT_TARGET_FLAGS_RAID_COMPONENT 0x40 -#define MPT_TARGET_FLAGS_LED_ON 0x80 /* * /proc/mpt interface @@ -489,15 +487,6 @@ typedef struct _RaidCfgData { int isRaid; /* bit field, 1 if RAID */ }RaidCfgData; -typedef struct _FcCfgData { - /* will ultimately hold fc_port_page0 also */ - struct { - FCPortPage1_t *data; - dma_addr_t dma; - int pg_sz; - } fc_port_page1[2]; -} FcCfgData; - #define MPT_RPORT_INFO_FLAGS_REGISTERED 0x01 /* rport registered */ #define MPT_RPORT_INFO_FLAGS_MISSING 0x02 /* missing from DevPage0 scan */ @@ -576,7 +565,6 @@ typedef struct _MPT_ADAPTER SpiCfgData spi_data; /* Scsi config. data */ RaidCfgData raid_data; /* Raid config. data */ SasCfgData sas_data; /* Sas config. data */ - FcCfgData fc_data; /* Fc config. data */ MPT_IOCTL *ioctl; /* ioctl data pointer */ struct proc_dir_entry *ioc_dentry; struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ @@ -632,14 +620,14 @@ typedef struct _MPT_ADAPTER struct mutex sas_discovery_mutex; u8 sas_discovery_runtime; u8 sas_discovery_ignore_events; - u16 handle; int sas_index; /* index refrencing */ MPT_SAS_MGMT sas_mgmt; - struct work_struct sas_persist_task; + int num_ports; + struct work_struct mptscsih_persistTask; - struct work_struct fc_setup_reset_work; struct list_head fc_rports; spinlock_t fc_rescan_work_lock; + int fc_rescan_work_count; struct work_struct fc_rescan_work; char fc_rescan_work_q_name[KOBJ_NAME_LEN]; struct workqueue_struct *fc_rescan_work_q; @@ -894,13 +882,6 @@ typedef struct _mpt_sge { #define DBG_DUMP_REQUEST_FRAME_HDR(mfp) #endif -// debug sas wide ports -#ifdef MPT_DEBUG_SAS_WIDE -#define dsaswideprintk(x) printk x -#else -#define dsaswideprintk(x) -#endif - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -980,7 +961,7 @@ typedef struct _MPT_SCSI_HOST { wait_queue_head_t scandv_waitq; int scandv_wait_done; long last_queue_full; - u16 tm_iocstatus; + u8 mpt_pq_filter; } MPT_SCSI_HOST; /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ @@ -1046,6 +1027,7 @@ extern void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size); extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); extern int mpt_findImVolumes(MPT_ADAPTER *ioc); extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); +extern int mptbase_GetFcPortPage0(MPT_ADAPTER *ioc, int portnum); /* * Public data decl's... diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 30975ccd9..b4967bb8a 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c @@ -2332,7 +2332,7 @@ done_free_mem: } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* Prototype Routine for the HOST INFO command. +/* Prototype Routine for the HP HOST INFO command. * * Outputs: None. * Return: 0 if successful @@ -2568,7 +2568,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) } /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ -/* Prototype Routine for the TARGET INFO command. +/* Prototype Routine for the HP TARGET INFO command. * * Outputs: None. * Return: 0 if successful diff --git a/drivers/message/fusion/mptctl.h b/drivers/message/fusion/mptctl.h index 043941882..a2f8a9799 100644 --- a/drivers/message/fusion/mptctl.h +++ b/drivers/message/fusion/mptctl.h @@ -354,6 +354,9 @@ struct mpt_ioctl_command32 { /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ +/* + * HP Specific IOCTL Defines and Structures + */ #define CPQFCTS_IOC_MAGIC 'Z' #define HP_IOC_MAGIC 'Z' @@ -361,6 +364,8 @@ struct mpt_ioctl_command32 { #define HP_GETHOSTINFO1 _IOR(HP_IOC_MAGIC, 20, hp_host_info_rev0_t) #define HP_GETTARGETINFO _IOR(HP_IOC_MAGIC, 21, hp_target_info_t) +/* All HP IOCTLs must include this header + */ typedef struct _hp_header { unsigned int iocnum; unsigned int host; diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 85696f34c..856487741 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -77,6 +77,10 @@ MODULE_DESCRIPTION(my_NAME); MODULE_LICENSE("GPL"); /* Command line args */ +static int mpt_pq_filter = 0; +module_param(mpt_pq_filter, int, 0); +MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)"); + #define MPTFC_DEV_LOSS_TMO (60) static int mptfc_dev_loss_tmo = MPTFC_DEV_LOSS_TMO; /* reasonable default */ module_param(mptfc_dev_loss_tmo, int, 0); @@ -128,21 +132,21 @@ static struct scsi_host_template mptfc_driver_template = { */ static struct pci_device_id mptfc_pci_table[] = { - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC909, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC909, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC919, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC919, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC929, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC929, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC919X, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC919X, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC929X, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC929X, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC939X, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC939X, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC949X, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC949X, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC949E, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_FC949ES, PCI_ANY_ID, PCI_ANY_ID }, {0} /* Terminating entry */ }; @@ -165,6 +169,13 @@ static struct fc_function_template mptfc_transport_functions = { }; +/* FIXME! values controlling firmware RESCAN event + * need to be set low to allow dev_loss_tmo to + * work as expected. Currently, firmware doesn't + * notify driver of RESCAN event until some number + * of seconds elapse. This value can be set via + * lsiutil. + */ static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout) { @@ -301,8 +312,10 @@ mptfc_GetFcDevPage0(MPT_ADAPTER *ioc, int ioc_port, } out: - kfree(pp0_array); - kfree(p0_array); + if (pp0_array) + kfree(pp0_array); + if (p0_array) + kfree(p0_array); return rc; } @@ -509,7 +522,8 @@ mptfc_slave_alloc(struct scsi_device *sdev) if (vtarget->num_luns == 0) { vtarget->ioc_id = hd->ioc->id; - vtarget->tflags = MPT_TARGET_FLAGS_Q_YES; + vtarget->tflags = MPT_TARGET_FLAGS_Q_YES | + MPT_TARGET_FLAGS_VALID_INQUIRY; hd->Targets[sdev->id] = vtarget; } @@ -573,269 +587,15 @@ mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) #ifdef DMPT_DEBUG_FC if (unlikely(err)) { dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_qcmd.%d: %d:%d, mptscsih_qcmd returns non-zero, (%x).\n", + "mptfc_qcmd.%d: %d:%d, mptscsih_qcmd returns non-zero.\n", ((MPT_SCSI_HOST *) SCpnt->device->host->hostdata)->ioc->name, ((MPT_SCSI_HOST *) SCpnt->device->host->hostdata)->ioc->sh->host_no, - SCpnt->device->id,SCpnt->device->lun,err)); + SCpnt->device->id,SCpnt->device->lun)); } #endif return err; } -/* - * mptfc_GetFcPortPage0 - Fetch FCPort config Page0. - * @ioc: Pointer to MPT_ADAPTER structure - * @portnum: IOC Port number - * - * Return: 0 for success - * -ENOMEM if no memory available - * -EPERM if not allowed due to ISR context - * -EAGAIN if no msg frames currently available - * -EFAULT for non-successful reply or no reply (timeout) - * -EINVAL portnum arg out of range (hardwired to two elements) - */ -static int -mptfc_GetFcPortPage0(MPT_ADAPTER *ioc, int portnum) -{ - ConfigPageHeader_t hdr; - CONFIGPARMS cfg; - FCPortPage0_t *ppage0_alloc; - FCPortPage0_t *pp0dest; - dma_addr_t page0_dma; - int data_sz; - int copy_sz; - int rc; - int count = 400; - - if (portnum > 1) - return -EINVAL; - - /* Get FCPort Page 0 header */ - hdr.PageVersion = 0; - hdr.PageLength = 0; - hdr.PageNumber = 0; - hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; - cfg.cfghdr.hdr = &hdr; - cfg.physAddr = -1; - cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; - cfg.dir = 0; - cfg.pageAddr = portnum; - cfg.timeout = 0; - - if ((rc = mpt_config(ioc, &cfg)) != 0) - return rc; - - if (hdr.PageLength == 0) - return 0; - - data_sz = hdr.PageLength * 4; - rc = -ENOMEM; - ppage0_alloc = (FCPortPage0_t *) pci_alloc_consistent(ioc->pcidev, data_sz, &page0_dma); - if (ppage0_alloc) { - - try_again: - memset((u8 *)ppage0_alloc, 0, data_sz); - cfg.physAddr = page0_dma; - cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; - - if ((rc = mpt_config(ioc, &cfg)) == 0) { - /* save the data */ - pp0dest = &ioc->fc_port_page0[portnum]; - copy_sz = min_t(int, sizeof(FCPortPage0_t), data_sz); - memcpy(pp0dest, ppage0_alloc, copy_sz); - - /* - * Normalize endianness of structure data, - * by byte-swapping all > 1 byte fields! - */ - pp0dest->Flags = le32_to_cpu(pp0dest->Flags); - pp0dest->PortIdentifier = le32_to_cpu(pp0dest->PortIdentifier); - pp0dest->WWNN.Low = le32_to_cpu(pp0dest->WWNN.Low); - pp0dest->WWNN.High = le32_to_cpu(pp0dest->WWNN.High); - pp0dest->WWPN.Low = le32_to_cpu(pp0dest->WWPN.Low); - pp0dest->WWPN.High = le32_to_cpu(pp0dest->WWPN.High); - pp0dest->SupportedServiceClass = le32_to_cpu(pp0dest->SupportedServiceClass); - pp0dest->SupportedSpeeds = le32_to_cpu(pp0dest->SupportedSpeeds); - pp0dest->CurrentSpeed = le32_to_cpu(pp0dest->CurrentSpeed); - pp0dest->MaxFrameSize = le32_to_cpu(pp0dest->MaxFrameSize); - pp0dest->FabricWWNN.Low = le32_to_cpu(pp0dest->FabricWWNN.Low); - pp0dest->FabricWWNN.High = le32_to_cpu(pp0dest->FabricWWNN.High); - pp0dest->FabricWWPN.Low = le32_to_cpu(pp0dest->FabricWWPN.Low); - pp0dest->FabricWWPN.High = le32_to_cpu(pp0dest->FabricWWPN.High); - pp0dest->DiscoveredPortsCount = le32_to_cpu(pp0dest->DiscoveredPortsCount); - pp0dest->MaxInitiators = le32_to_cpu(pp0dest->MaxInitiators); - - /* - * if still doing discovery, - * hang loose a while until finished - */ - if ((pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN) || - (pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_ONLINE && - (pp0dest->Flags & MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK) - == MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT)) { - if (count-- > 0) { - msleep(100); - goto try_again; - } - printk(MYIOC_s_INFO_FMT "Firmware discovery not" - " complete.\n", - ioc->name); - } - } - - pci_free_consistent(ioc->pcidev, data_sz, (u8 *) ppage0_alloc, page0_dma); - } - - return rc; -} - -static int -mptfc_WriteFcPortPage1(MPT_ADAPTER *ioc, int portnum) -{ - ConfigPageHeader_t hdr; - CONFIGPARMS cfg; - int rc; - - if (portnum > 1) - return -EINVAL; - - if (!(ioc->fc_data.fc_port_page1[portnum].data)) - return -EINVAL; - - /* get fcport page 1 header */ - hdr.PageVersion = 0; - hdr.PageLength = 0; - hdr.PageNumber = 1; - hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; - cfg.cfghdr.hdr = &hdr; - cfg.physAddr = -1; - cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; - cfg.dir = 0; - cfg.pageAddr = portnum; - cfg.timeout = 0; - - if ((rc = mpt_config(ioc, &cfg)) != 0) - return rc; - - if (hdr.PageLength == 0) - return -ENODEV; - - if (hdr.PageLength*4 != ioc->fc_data.fc_port_page1[portnum].pg_sz) - return -EINVAL; - - cfg.physAddr = ioc->fc_data.fc_port_page1[portnum].dma; - cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT; - cfg.dir = 1; - - rc = mpt_config(ioc, &cfg); - - return rc; -} - -static int -mptfc_GetFcPortPage1(MPT_ADAPTER *ioc, int portnum) -{ - ConfigPageHeader_t hdr; - CONFIGPARMS cfg; - FCPortPage1_t *page1_alloc; - dma_addr_t page1_dma; - int data_sz; - int rc; - - if (portnum > 1) - return -EINVAL; - - /* get fcport page 1 header */ - hdr.PageVersion = 0; - hdr.PageLength = 0; - hdr.PageNumber = 1; - hdr.PageType = MPI_CONFIG_PAGETYPE_FC_PORT; - cfg.cfghdr.hdr = &hdr; - cfg.physAddr = -1; - cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER; - cfg.dir = 0; - cfg.pageAddr = portnum; - cfg.timeout = 0; - - if ((rc = mpt_config(ioc, &cfg)) != 0) - return rc; - - if (hdr.PageLength == 0) - return -ENODEV; - -start_over: - - if (ioc->fc_data.fc_port_page1[portnum].data == NULL) { - data_sz = hdr.PageLength * 4; - if (data_sz < sizeof(FCPortPage1_t)) - data_sz = sizeof(FCPortPage1_t); - - page1_alloc = (FCPortPage1_t *) pci_alloc_consistent(ioc->pcidev, - data_sz, - &page1_dma); - if (!page1_alloc) - return -ENOMEM; - } - else { - page1_alloc = ioc->fc_data.fc_port_page1[portnum].data; - page1_dma = ioc->fc_data.fc_port_page1[portnum].dma; - data_sz = ioc->fc_data.fc_port_page1[portnum].pg_sz; - if (hdr.PageLength * 4 > data_sz) { - ioc->fc_data.fc_port_page1[portnum].data = NULL; - pci_free_consistent(ioc->pcidev, data_sz, (u8 *) - page1_alloc, page1_dma); - goto start_over; - } - } - - memset(page1_alloc,0,data_sz); - - cfg.physAddr = page1_dma; - cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT; - - if ((rc = mpt_config(ioc, &cfg)) == 0) { - ioc->fc_data.fc_port_page1[portnum].data = page1_alloc; - ioc->fc_data.fc_port_page1[portnum].pg_sz = data_sz; - ioc->fc_data.fc_port_page1[portnum].dma = page1_dma; - } - else { - ioc->fc_data.fc_port_page1[portnum].data = NULL; - pci_free_consistent(ioc->pcidev, data_sz, (u8 *) - page1_alloc, page1_dma); - } - - return rc; -} - -static void -mptfc_SetFcPortPage1_defaults(MPT_ADAPTER *ioc) -{ - int ii; - FCPortPage1_t *pp1; - - #define MPTFC_FW_DEVICE_TIMEOUT (1) - #define MPTFC_FW_IO_PEND_TIMEOUT (1) - #define ON_FLAGS (MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY) - #define OFF_FLAGS (MPI_FCPORTPAGE1_FLAGS_VERBOSE_RESCAN_EVENTS) - - for (ii=0; iifacts.NumberOfPorts; ii++) { - if (mptfc_GetFcPortPage1(ioc, ii) != 0) - continue; - pp1 = ioc->fc_data.fc_port_page1[ii].data; - if ((pp1->InitiatorDeviceTimeout == MPTFC_FW_DEVICE_TIMEOUT) - && (pp1->InitiatorIoPendTimeout == MPTFC_FW_IO_PEND_TIMEOUT) - && ((pp1->Flags & ON_FLAGS) == ON_FLAGS) - && ((pp1->Flags & OFF_FLAGS) == 0)) - continue; - pp1->InitiatorDeviceTimeout = MPTFC_FW_DEVICE_TIMEOUT; - pp1->InitiatorIoPendTimeout = MPTFC_FW_IO_PEND_TIMEOUT; - pp1->Flags &= ~OFF_FLAGS; - pp1->Flags |= ON_FLAGS; - mptfc_WriteFcPortPage1(ioc, ii); - } -} - - static void mptfc_init_host_attr(MPT_ADAPTER *ioc,int portnum) { @@ -868,75 +628,64 @@ mptfc_init_host_attr(MPT_ADAPTER *ioc,int portnum) fc_host_tgtid_bind_type(ioc->sh) = FC_TGTID_BIND_BY_WWPN; } -static void -mptfc_setup_reset(void *arg) -{ - MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; - u64 pn; - struct mptfc_rport_info *ri; - - /* reset about to happen, delete (block) all rports */ - list_for_each_entry(ri, &ioc->fc_rports, list) { - if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { - ri->flags &= ~MPT_RPORT_INFO_FLAGS_REGISTERED; - fc_remote_port_delete(ri->rport); /* won't sleep */ - ri->rport = NULL; - - pn = (u64)ri->pg0.WWPN.High << 32 | - (u64)ri->pg0.WWPN.Low; - dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_setup_reset.%d: %llx deleted\n", - ioc->name, - ioc->sh->host_no, - (unsigned long long)pn)); - } - } -} - static void mptfc_rescan_devices(void *arg) { MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; int ii; + int work_to_do; u64 pn; + unsigned long flags; struct mptfc_rport_info *ri; - /* start by tagging all ports as missing */ - list_for_each_entry(ri, &ioc->fc_rports, list) { - if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { - ri->flags |= MPT_RPORT_INFO_FLAGS_MISSING; + do { + /* start by tagging all ports as missing */ + list_for_each_entry(ri, &ioc->fc_rports, list) { + if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) { + ri->flags |= MPT_RPORT_INFO_FLAGS_MISSING; + } } - } - /* - * now rescan devices known to adapter, - * will reregister existing rports - */ - for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { - (void) mptfc_GetFcPortPage0(ioc, ii); - mptfc_init_host_attr(ioc, ii); /* refresh */ - mptfc_GetFcDevPage0(ioc, ii, mptfc_register_dev); - } + /* + * now rescan devices known to adapter, + * will reregister existing rports + */ + for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { + (void) mptbase_GetFcPortPage0(ioc, ii); + mptfc_init_host_attr(ioc,ii); /* refresh */ + mptfc_GetFcDevPage0(ioc,ii,mptfc_register_dev); + } - /* delete devices still missing */ - list_for_each_entry(ri, &ioc->fc_rports, list) { - /* if newly missing, delete it */ - if (ri->flags & MPT_RPORT_INFO_FLAGS_MISSING) { + /* delete devices still missing */ + list_for_each_entry(ri, &ioc->fc_rports, list) { + /* if newly missing, delete it */ + if (ri->flags & MPT_RPORT_INFO_FLAGS_MISSING) { - ri->flags &= ~(MPT_RPORT_INFO_FLAGS_REGISTERED| - MPT_RPORT_INFO_FLAGS_MISSING); - fc_remote_port_delete(ri->rport); /* won't sleep */ - ri->rport = NULL; + ri->flags &= ~(MPT_RPORT_INFO_FLAGS_REGISTERED| + MPT_RPORT_INFO_FLAGS_MISSING); + fc_remote_port_delete(ri->rport); /* won't sleep */ + ri->rport = NULL; - pn = (u64)ri->pg0.WWPN.High << 32 | - (u64)ri->pg0.WWPN.Low; - dfcprintk ((MYIOC_s_INFO_FMT - "mptfc_rescan.%d: %llx deleted\n", - ioc->name, - ioc->sh->host_no, - (unsigned long long)pn)); + pn = (u64)ri->pg0.WWPN.High << 32 | + (u64)ri->pg0.WWPN.Low; + dfcprintk ((MYIOC_s_INFO_FMT + "mptfc_rescan.%d: %llx deleted\n", + ioc->name, + ioc->sh->host_no, + (unsigned long long)pn)); + } } - } + + /* + * allow multiple passes as target state + * might have changed during scan + */ + spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); + if (ioc->fc_rescan_work_count > 2) /* only need one more */ + ioc->fc_rescan_work_count = 2; + work_to_do = --ioc->fc_rescan_work_count; + spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); + } while (work_to_do); } static int @@ -1004,9 +753,7 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto out_mptfc_probe; } - spin_lock_init(&ioc->fc_rescan_work_lock); INIT_WORK(&ioc->fc_rescan_work, mptfc_rescan_devices,(void *)ioc); - INIT_WORK(&ioc->fc_setup_reset_work, mptfc_setup_reset, (void *)ioc); spin_lock_irqsave(&ioc->FreeQlock, flags); @@ -1113,6 +860,13 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) hd->timer.data = (unsigned long) hd; hd->timer.function = mptscsih_timer_expired; + hd->mpt_pq_filter = mpt_pq_filter; + + ddvprintk((MYIOC_s_INFO_FMT + "mpt_pq_filter %x\n", + ioc->name, + mpt_pq_filter)); + init_waitqueue_head(&hd->scandv_waitq); hd->scandv_wait_done = 0; hd->last_queue_full = 0; @@ -1134,20 +888,12 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (!ioc->fc_rescan_work_q) goto out_mptfc_probe; - /* - * Pre-fetch FC port WWN and stuff... - * (FCPortPage0_t stuff) - */ - for (ii=0; ii < ioc->facts.NumberOfPorts; ii++) { - (void) mptfc_GetFcPortPage0(ioc, ii); - } - mptfc_SetFcPortPage1_defaults(ioc); - /* * scan for rports - * by doing it via the workqueue, some locking is eliminated */ + ioc->fc_rescan_work_count = 1; queue_work(ioc->fc_rescan_work_q, &ioc->fc_rescan_work); flush_workqueue(ioc->fc_rescan_work_q); @@ -1171,77 +917,6 @@ static struct pci_driver mptfc_driver = { #endif }; -static int -mptfc_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) -{ - MPT_SCSI_HOST *hd; - u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; - unsigned long flags; - int rc=1; - - devtverboseprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", - ioc->name, event)); - - if (ioc->sh == NULL || - ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) - return 1; - - switch (event) { - case MPI_EVENT_RESCAN: - spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); - if (ioc->fc_rescan_work_q) { - queue_work(ioc->fc_rescan_work_q, - &ioc->fc_rescan_work); - } - spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); - break; - default: - rc = mptscsih_event_process(ioc,pEvReply); - break; - } - return rc; -} - -static int -mptfc_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) -{ - int rc; - unsigned long flags; - - rc = mptscsih_ioc_reset(ioc,reset_phase); - if (rc == 0) - return rc; - - - dtmprintk((KERN_WARNING MYNAM - ": IOC %s_reset routed to FC host driver!\n", - reset_phase==MPT_IOC_SETUP_RESET ? "setup" : ( - reset_phase==MPT_IOC_PRE_RESET ? "pre" : "post"))); - - if (reset_phase == MPT_IOC_SETUP_RESET) { - spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); - if (ioc->fc_rescan_work_q) { - queue_work(ioc->fc_rescan_work_q, - &ioc->fc_setup_reset_work); - } - spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); - } - - else if (reset_phase == MPT_IOC_PRE_RESET) { - } - - else { /* MPT_IOC_POST_RESET */ - mptfc_SetFcPortPage1_defaults(ioc); - spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); - if (ioc->fc_rescan_work_q) { - queue_work(ioc->fc_rescan_work_q, - &ioc->fc_rescan_work); - } - spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); - } - return 1; -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /** * mptfc_init - Register MPT adapter(s) as SCSI host(s) with @@ -1256,8 +931,8 @@ mptfc_init(void) show_mptmod_ver(my_NAME, my_VERSION); - /* sanity check module parameters */ - if (mptfc_dev_loss_tmo <= 0) + /* sanity check module parameter */ + if (mptfc_dev_loss_tmo == 0) mptfc_dev_loss_tmo = MPTFC_DEV_LOSS_TMO; mptfc_transport_template = @@ -1270,12 +945,12 @@ mptfc_init(void) mptfcTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTFC_DRIVER); mptfcInternalCtx = mpt_register(mptscsih_scandv_complete, MPTFC_DRIVER); - if (mpt_event_register(mptfcDoneCtx, mptfc_event_process) == 0) { + if (mpt_event_register(mptfcDoneCtx, mptscsih_event_process) == 0) { devtverboseprintk((KERN_INFO MYNAM ": Registered for IOC event notifications\n")); } - if (mpt_reset_register(mptfcDoneCtx, mptfc_ioc_reset) == 0) { + if (mpt_reset_register(mptfcDoneCtx, mptscsih_ioc_reset) == 0) { dprintk((KERN_INFO MYNAM ": Registered for IOC reset notifications\n")); } @@ -1300,7 +975,6 @@ mptfc_remove(struct pci_dev *pdev) struct mptfc_rport_info *p, *n; struct workqueue_struct *work_q; unsigned long flags; - int ii; /* destroy workqueue */ if ((work_q=ioc->fc_rescan_work_q)) { @@ -1317,16 +991,6 @@ mptfc_remove(struct pci_dev *pdev) kfree(p); } - for (ii=0; iifacts.NumberOfPorts; ii++) { - if (ioc->fc_data.fc_port_page1[ii].data) { - pci_free_consistent(ioc->pcidev, - ioc->fc_data.fc_port_page1[ii].pg_sz, - (u8 *) ioc->fc_data.fc_port_page1[ii].data, - ioc->fc_data.fc_port_page1[ii].dma); - ioc->fc_data.fc_port_page1[ii].data = NULL; - } - } - mptscsih_remove(pdev); } diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index f66f22031..af6ec553f 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -50,14 +50,11 @@ #include #include #include -#include /* for mdelay */ -#include #include #include #include #include -#include #include "mptbase.h" #include "mptscsih.h" @@ -67,19 +64,20 @@ #define my_VERSION MPT_LINUX_VERSION_COMMON #define MYNAM "mptsas" -/* - * Reserved channel for integrated raid - */ -#define MPTSAS_RAID_CHANNEL 1 - MODULE_AUTHOR(MODULEAUTHOR); MODULE_DESCRIPTION(my_NAME); MODULE_LICENSE("GPL"); +static int mpt_pq_filter; +module_param(mpt_pq_filter, int, 0); +MODULE_PARM_DESC(mpt_pq_filter, + "Enable peripheral qualifier filter: enable=1 " + "(default=0)"); + static int mpt_pt_clear; module_param(mpt_pt_clear, int, 0); MODULE_PARM_DESC(mpt_pt_clear, - " Clear persistency table: enable=1 " + "Clear persistency table: enable=1 " "(default=MPTSCSIH_PT_CLEAR=0)"); static int mptsasDoneCtx = -1; @@ -139,36 +137,23 @@ struct mptsas_devinfo { u32 device_info; /* bitfield detailed info about this device */ }; -/* - * Specific details on ports, wide/narrow - */ -struct mptsas_portinfo_details{ - u16 num_phys; /* number of phys belong to this port */ - u64 phy_bitmask; /* TODO, extend support for 255 phys */ - struct sas_rphy *rphy; /* transport layer rphy object */ - struct sas_port *port; /* transport layer port object */ - struct scsi_target *starget; - struct mptsas_portinfo *port_info; -}; - struct mptsas_phyinfo { u8 phy_id; /* phy index */ - u8 port_id; /* firmware port identifier */ + u8 port_id; /* port number this phy is part of */ u8 negotiated_link_rate; /* nego'd link rate for this phy */ u8 hw_link_rate; /* hardware max/min phys link rate */ u8 programmed_link_rate; /* programmed max/min phy link rate */ - u8 sas_port_add_phy; /* flag to request sas_port_add_phy*/ struct mptsas_devinfo identify; /* point to phy device info */ struct mptsas_devinfo attached; /* point to attached device info */ - struct sas_phy *phy; /* transport layer phy object */ - struct mptsas_portinfo *portinfo; - struct mptsas_portinfo_details * port_details; + struct sas_phy *phy; + struct sas_rphy *rphy; + struct scsi_target *starget; }; struct mptsas_portinfo { struct list_head list; u16 handle; /* unique id to address this */ - u16 num_phys; /* number of phys */ + u8 num_phys; /* number of phys */ struct mptsas_phyinfo *phy_info; }; @@ -184,7 +169,7 @@ struct mptsas_enclosure { u8 sep_channel; /* SEP channel logical channel id */ }; -#ifdef MPT_DEBUG_SAS +#ifdef SASDEBUG static void mptsas_print_phy_data(MPI_SAS_IO_UNIT0_PHY_DATA *phy_data) { printk("---- IO UNIT PAGE 0 ------------\n"); @@ -320,7 +305,7 @@ mptsas_find_portinfo_by_handle(MPT_ADAPTER *ioc, u16 handle) static inline int mptsas_is_end_device(struct mptsas_devinfo * attached) { - if ((attached->sas_address) && + if ((attached->handle) && (attached->device_info & MPI_SAS_DEVICE_INFO_END_DEVICE) && ((attached->device_info & @@ -334,247 +319,6 @@ mptsas_is_end_device(struct mptsas_devinfo * attached) return 0; } -/* no mutex */ -static void -mptsas_port_delete(struct mptsas_portinfo_details * port_details) -{ - struct mptsas_portinfo *port_info; - struct mptsas_phyinfo *phy_info; - u8 i; - - if (!port_details) - return; - - port_info = port_details->port_info; - phy_info = port_info->phy_info; - - dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d " - "bitmask=0x%016llX\n", - __FUNCTION__, port_details, port_details->num_phys, - port_details->phy_bitmask)); - - for (i = 0; i < port_info->num_phys; i++, phy_info++) { - if(phy_info->port_details != port_details) - continue; - memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo)); - phy_info->port_details = NULL; - } - kfree(port_details); -} - -static inline struct sas_rphy * -mptsas_get_rphy(struct mptsas_phyinfo *phy_info) -{ - if (phy_info->port_details) - return phy_info->port_details->rphy; - else - return NULL; -} - -static inline void -mptsas_set_rphy(struct mptsas_phyinfo *phy_info, struct sas_rphy *rphy) -{ - if (phy_info->port_details) { - phy_info->port_details->rphy = rphy; - dsaswideprintk((KERN_DEBUG "sas_rphy_add: rphy=%p\n", rphy)); - } - -#ifdef MPT_DEBUG_SAS_WIDE - if (rphy) { - dev_printk(KERN_DEBUG, &rphy->dev, "add:"); - printk("rphy=%p release=%p\n", - rphy, rphy->dev.release); - } -#endif -} - -static inline struct sas_port * -mptsas_get_port(struct mptsas_phyinfo *phy_info) -{ - if (phy_info->port_details) - return phy_info->port_details->port; - else - return NULL; -} - -static inline void -mptsas_set_port(struct mptsas_phyinfo *phy_info, struct sas_port *port) -{ - if (phy_info->port_details) - phy_info->port_details->port = port; - -#ifdef MPT_DEBUG_SAS_WIDE - if (port) { - dev_printk(KERN_DEBUG, &port->dev, "add: "); - printk("port=%p release=%p\n", - port, port->dev.release); - } -#endif -} - -static inline struct scsi_target * -mptsas_get_starget(struct mptsas_phyinfo *phy_info) -{ - if (phy_info->port_details) - return phy_info->port_details->starget; - else - return NULL; -} - -static inline void -mptsas_set_starget(struct mptsas_phyinfo *phy_info, struct scsi_target * -starget) -{ - if (phy_info->port_details) - phy_info->port_details->starget = starget; -} - - -/* - * mptsas_setup_wide_ports - * - * Updates for new and existing narrow/wide port configuration - * in the sas_topology - */ -static void -mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) -{ - struct mptsas_portinfo_details * port_details; - struct mptsas_phyinfo *phy_info, *phy_info_cmp; - u64 sas_address; - int i, j; - - mutex_lock(&ioc->sas_topology_mutex); - - phy_info = port_info->phy_info; - for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { - if (phy_info->attached.handle) - continue; - port_details = phy_info->port_details; - if (!port_details) - continue; - if (port_details->num_phys < 2) - continue; - /* - * Removing a phy from a port, letting the last - * phy be removed by firmware events. - */ - dsaswideprintk((KERN_DEBUG - "%s: [%p]: deleting phy = %d\n", - __FUNCTION__, port_details, i)); - port_details->num_phys--; - port_details->phy_bitmask &= ~ (1 << phy_info->phy_id); - memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo)); - sas_port_delete_phy(port_details->port, phy_info->phy); - phy_info->port_details = NULL; - } - - /* - * Populate and refresh the tree - */ - phy_info = port_info->phy_info; - for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { - sas_address = phy_info->attached.sas_address; - dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n", - i, sas_address)); - if (!sas_address) - continue; - port_details = phy_info->port_details; - /* - * Forming a port - */ - if (!port_details) { - port_details = kzalloc(sizeof(*port_details), - GFP_KERNEL); - if (!port_details) - goto out; - port_details->num_phys = 1; - port_details->port_info = port_info; - if (phy_info->phy_id < 64 ) - port_details->phy_bitmask |= - (1 << phy_info->phy_id); - phy_info->sas_port_add_phy=1; - dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t" - "phy_id=%d sas_address=0x%018llX\n", - i, sas_address)); - phy_info->port_details = port_details; - } - - if (i == port_info->num_phys - 1) - continue; - phy_info_cmp = &port_info->phy_info[i + 1]; - for (j = i + 1 ; j < port_info->num_phys ; j++, - phy_info_cmp++) { - if (!phy_info_cmp->attached.sas_address) - continue; - if (sas_address != phy_info_cmp->attached.sas_address) - continue; - if (phy_info_cmp->port_details == port_details ) - continue; - dsaswideprintk((KERN_DEBUG - "\t\tphy_id=%d sas_address=0x%018llX\n", - j, phy_info_cmp->attached.sas_address)); - if (phy_info_cmp->port_details) { - port_details->rphy = - mptsas_get_rphy(phy_info_cmp); - port_details->port = - mptsas_get_port(phy_info_cmp); - port_details->starget = - mptsas_get_starget(phy_info_cmp); - port_details->num_phys = - phy_info_cmp->port_details->num_phys; - if (!phy_info_cmp->port_details->num_phys) - kfree(phy_info_cmp->port_details); - } else - phy_info_cmp->sas_port_add_phy=1; - /* - * Adding a phy to a port - */ - phy_info_cmp->port_details = port_details; - if (phy_info_cmp->phy_id < 64 ) - port_details->phy_bitmask |= - (1 << phy_info_cmp->phy_id); - port_details->num_phys++; - } - } - - out: - -#ifdef MPT_DEBUG_SAS_WIDE - for (i = 0; i < port_info->num_phys; i++) { - port_details = port_info->phy_info[i].port_details; - if (!port_details) - continue; - dsaswideprintk((KERN_DEBUG - "%s: [%p]: phy_id=%02d num_phys=%02d " - "bitmask=0x%016llX\n", - __FUNCTION__, - port_details, i, port_details->num_phys, - port_details->phy_bitmask)); - dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", - port_details->port, port_details->rphy)); - } - dsaswideprintk((KERN_DEBUG"\n")); -#endif - mutex_unlock(&ioc->sas_topology_mutex); -} - -static void -mptsas_target_reset(MPT_ADAPTER *ioc, VirtTarget * vtarget) -{ - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; - - if (mptscsih_TMHandler(hd, - MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, - vtarget->bus_id, vtarget->target_id, 0, 0, 5) < 0) { - hd->tmPending = 0; - hd->tmState = TM_STATE_NONE; - printk(MYIOC_s_WARN_FMT - "Error processing TaskMgmt id=%d TARGET_RESET\n", - ioc->name, vtarget->target_id); - } -} - static int mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, u32 form, u32 form_specific) @@ -643,112 +387,24 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, static int mptsas_slave_configure(struct scsi_device *sdev) { - - if (sdev->channel == MPTSAS_RAID_CHANNEL) - goto out; - - sas_read_port_mode_page(sdev); - - out: - return mptscsih_slave_configure(sdev); -} - -static int -mptsas_target_alloc(struct scsi_target *starget) -{ - struct Scsi_Host *host = dev_to_shost(&starget->dev); - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; - VirtTarget *vtarget; - u32 target_id; - u32 channel; - struct sas_rphy *rphy; - struct mptsas_portinfo *p; - int i; - - vtarget = kzalloc(sizeof(VirtTarget), GFP_KERNEL); - if (!vtarget) - return -ENOMEM; - - vtarget->starget = starget; - vtarget->ioc_id = hd->ioc->id; - vtarget->tflags = MPT_TARGET_FLAGS_Q_YES|MPT_TARGET_FLAGS_VALID_INQUIRY; - - target_id = starget->id; - channel = 0; - - hd->Targets[target_id] = vtarget; - - if (starget->channel == MPTSAS_RAID_CHANNEL) - goto out; - - rphy = dev_to_rphy(starget->dev.parent); - mutex_lock(&hd->ioc->sas_topology_mutex); - list_for_each_entry(p, &hd->ioc->sas_topology, list) { - for (i = 0; i < p->num_phys; i++) { - if (p->phy_info[i].attached.sas_address != - rphy->identify.sas_address) - continue; - target_id = p->phy_info[i].attached.id; - channel = p->phy_info[i].attached.channel; - mptsas_set_starget(&p->phy_info[i], starget); - - /* - * Exposing hidden raid components - */ - if (mptscsih_is_phys_disk(hd->ioc, target_id)) { - target_id = mptscsih_raid_id_to_num(hd, - target_id); - vtarget->tflags |= - MPT_TARGET_FLAGS_RAID_COMPONENT; - } - mutex_unlock(&hd->ioc->sas_topology_mutex); - goto out; - } - } - mutex_unlock(&hd->ioc->sas_topology_mutex); - - kfree(vtarget); - return -ENXIO; - - out: - vtarget->target_id = target_id; - vtarget->bus_id = channel; - starget->hostdata = vtarget; - return 0; -} - -static void -mptsas_target_destroy(struct scsi_target *starget) -{ - struct Scsi_Host *host = dev_to_shost(&starget->dev); + struct Scsi_Host *host = sdev->host; MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; - struct sas_rphy *rphy; - struct mptsas_portinfo *p; - int i; - if (!starget->hostdata) - return; - - if (starget->channel == MPTSAS_RAID_CHANNEL) - goto out; - - rphy = dev_to_rphy(starget->dev.parent); - list_for_each_entry(p, &hd->ioc->sas_topology, list) { - for (i = 0; i < p->num_phys; i++) { - if (p->phy_info[i].attached.sas_address != - rphy->identify.sas_address) - continue; - mptsas_set_starget(&p->phy_info[i], NULL); - goto out; - } - } + /* + * RAID volumes placed beyond the last expected port. + * Ignore sending sas mode pages in that case.. + */ + if (sdev->channel < hd->ioc->num_ports) + sas_read_port_mode_page(sdev); - out: - kfree(starget->hostdata); - starget->hostdata = NULL; + return mptscsih_slave_configure(sdev); } - +/* + * This is pretty ugly. We will be able to seriously clean it up + * once the DV code in mptscsih goes away and we can properly + * implement ->target_alloc. + */ static int mptsas_slave_alloc(struct scsi_device *sdev) { @@ -756,38 +412,61 @@ mptsas_slave_alloc(struct scsi_device *sdev) MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; struct sas_rphy *rphy; struct mptsas_portinfo *p; + VirtTarget *vtarget; VirtDevice *vdev; struct scsi_target *starget; - int i; + u32 target_id; + int i; vdev = kzalloc(sizeof(VirtDevice), GFP_KERNEL); if (!vdev) { - printk(MYIOC_s_ERR_FMT "slave_alloc kzalloc(%zd) FAILED!\n", + printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n", hd->ioc->name, sizeof(VirtDevice)); return -ENOMEM; } + sdev->hostdata = vdev; starget = scsi_target(sdev); - vdev->vtarget = starget->hostdata; + vtarget = starget->hostdata; + vtarget->ioc_id = hd->ioc->id; + vdev->vtarget = vtarget; + if (vtarget->num_luns == 0) { + vtarget->tflags = MPT_TARGET_FLAGS_Q_YES|MPT_TARGET_FLAGS_VALID_INQUIRY; + hd->Targets[sdev->id] = vtarget; + } - if (sdev->channel == MPTSAS_RAID_CHANNEL) + /* + RAID volumes placed beyond the last expected port. + */ + if (sdev->channel == hd->ioc->num_ports) { + target_id = sdev->id; + vtarget->bus_id = 0; + vdev->lun = 0; goto out; + } rphy = dev_to_rphy(sdev->sdev_target->dev.parent); mutex_lock(&hd->ioc->sas_topology_mutex); list_for_each_entry(p, &hd->ioc->sas_topology, list) { for (i = 0; i < p->num_phys; i++) { - if (p->phy_info[i].attached.sas_address != - rphy->identify.sas_address) - continue; - vdev->lun = sdev->lun; - /* - * Exposing hidden raid components - */ - if (mptscsih_is_phys_disk(hd->ioc, - p->phy_info[i].attached.id)) - sdev->no_uld_attach = 1; - mutex_unlock(&hd->ioc->sas_topology_mutex); - goto out; + if (p->phy_info[i].attached.sas_address == + rphy->identify.sas_address) { + target_id = p->phy_info[i].attached.id; + vtarget->bus_id = p->phy_info[i].attached.channel; + vdev->lun = sdev->lun; + p->phy_info[i].starget = sdev->sdev_target; + /* + * Exposing hidden disk (RAID) + */ + if (mptscsih_is_phys_disk(hd->ioc, target_id)) { + target_id = mptscsih_raid_id_to_num(hd, + target_id); + vdev->vtarget->tflags |= + MPT_TARGET_FLAGS_RAID_COMPONENT; + sdev->no_uld_attach = 1; + } + mutex_unlock(&hd->ioc->sas_topology_mutex); + goto out; + } } } mutex_unlock(&hd->ioc->sas_topology_mutex); @@ -796,39 +475,57 @@ mptsas_slave_alloc(struct scsi_device *sdev) return -ENXIO; out: - vdev->vtarget->num_luns++; - sdev->hostdata = vdev; + vtarget->target_id = target_id; + vtarget->num_luns++; return 0; } -static int -mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) +static void +mptsas_slave_destroy(struct scsi_device *sdev) { - VirtDevice *vdev = SCpnt->device->hostdata; + struct Scsi_Host *host = sdev->host; + MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; + VirtDevice *vdev; -// scsi_print_command(SCpnt); - if (vdev->vtarget->deleted) { - SCpnt->result = DID_NO_CONNECT << 16; - done(SCpnt); - return 0; - } + /* + * Issue target reset to flush firmware outstanding commands. + */ + vdev = sdev->hostdata; + if (vdev->configured_lun){ + if (mptscsih_TMHandler(hd, + MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, + vdev->vtarget->bus_id, + vdev->vtarget->target_id, + 0, 0, 5 /* 5 second timeout */) + < 0){ + + /* The TM request failed! + * Fatal error case. + */ + printk(MYIOC_s_WARN_FMT + "Error processing TaskMgmt id=%d TARGET_RESET\n", + hd->ioc->name, + vdev->vtarget->target_id); - return mptscsih_qcmd(SCpnt,done); + hd->tmPending = 0; + hd->tmState = TM_STATE_NONE; + } + } + mptscsih_slave_destroy(sdev); } - static struct scsi_host_template mptsas_driver_template = { .module = THIS_MODULE, .proc_name = "mptsas", .proc_info = mptscsih_proc_info, .name = "MPT SPI Host", .info = mptscsih_info, - .queuecommand = mptsas_qcmd, - .target_alloc = mptsas_target_alloc, + .queuecommand = mptscsih_qcmd, + .target_alloc = mptscsih_target_alloc, .slave_alloc = mptsas_slave_alloc, .slave_configure = mptsas_slave_configure, - .target_destroy = mptsas_target_destroy, - .slave_destroy = mptscsih_slave_destroy, + .target_destroy = mptscsih_target_destroy, + .slave_destroy = mptsas_slave_destroy, .change_queue_depth = mptscsih_change_queue_depth, .eh_abort_handler = mptscsih_abort, .eh_device_reset_handler = mptscsih_dev_reset, @@ -1098,7 +795,7 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) port_info->num_phys = buffer->NumPhys; port_info->phy_info = kcalloc(port_info->num_phys, - sizeof(*port_info->phy_info),GFP_KERNEL); + sizeof(struct mptsas_phyinfo),GFP_KERNEL); if (!port_info->phy_info) { error = -ENOMEM; goto out_free_consistent; @@ -1114,7 +811,6 @@ mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) buffer->PhyData[i].Port; port_info->phy_info[i].negotiated_link_rate = buffer->PhyData[i].NegotiatedLinkRate; - port_info->phy_info[i].portinfo = port_info; } out_free_consistent: @@ -1272,7 +968,7 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info, CONFIGPARMS cfg; SasExpanderPage0_t *buffer; dma_addr_t dma_handle; - int i, error; + int error; hdr.PageVersion = MPI_SASEXPANDER0_PAGEVERSION; hdr.ExtPageLength = 0; @@ -1317,15 +1013,12 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info, port_info->num_phys = buffer->NumPhys; port_info->handle = le16_to_cpu(buffer->DevHandle); port_info->phy_info = kcalloc(port_info->num_phys, - sizeof(*port_info->phy_info),GFP_KERNEL); + sizeof(struct mptsas_phyinfo),GFP_KERNEL); if (!port_info->phy_info) { error = -ENOMEM; goto out_free_consistent; } - for (i = 0; i < port_info->num_phys; i++) - port_info->phy_info[i].portinfo = port_info; - out_free_consistent: pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, buffer, dma_handle); @@ -1468,23 +1161,19 @@ static int mptsas_probe_one_phy(struct device *dev, { MPT_ADAPTER *ioc; struct sas_phy *phy; - struct sas_port *port; - int error = 0; + int error; - if (!dev) { - error = -ENODEV; - goto out; - } + if (!dev) + return -ENODEV; if (!phy_info->phy) { phy = sas_phy_alloc(dev, index); - if (!phy) { - error = -ENOMEM; - goto out; - } + if (!phy) + return -ENOMEM; } else phy = phy_info->phy; + phy->port_identifier = phy_info->port_id; mptsas_parse_device_info(&phy->identify, &phy_info->identify); /* @@ -1576,51 +1265,19 @@ static int mptsas_probe_one_phy(struct device *dev, error = sas_phy_add(phy); if (error) { sas_phy_free(phy); - goto out; + return error; } phy_info->phy = phy; } - if (!phy_info->attached.handle || - !phy_info->port_details) - goto out; - - port = mptsas_get_port(phy_info); - ioc = phy_to_ioc(phy_info->phy); - - if (phy_info->sas_port_add_phy) { - - if (!port) { - port = sas_port_alloc_num(dev); - if (!port) { - error = -ENOMEM; - goto out; - } - error = sas_port_add(port); - if (error) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - goto out; - } - mptsas_set_port(phy_info, port); - dsaswideprintk((KERN_DEBUG - "sas_port_alloc: port=%p dev=%p port_id=%d\n", - port, dev, port->port_identifier)); - } - dsaswideprintk((KERN_DEBUG "sas_port_add_phy: phy_id=%d\n", - phy_info->phy_id)); - sas_port_add_phy(port, phy_info->phy); - phy_info->sas_port_add_phy = 0; - } - - if (!mptsas_get_rphy(phy_info) && port && !port->rphy) { + if ((phy_info->attached.handle) && + (!phy_info->rphy)) { struct sas_rphy *rphy; - struct device *parent; struct sas_identify identify; - parent = dev->parent->parent; + ioc = phy_to_ioc(phy_info->phy); + /* * Let the hotplug_work thread handle processing * the adding/removing of devices that occur @@ -1628,63 +1285,36 @@ static int mptsas_probe_one_phy(struct device *dev, */ if (ioc->sas_discovery_runtime && mptsas_is_end_device(&phy_info->attached)) - goto out; + return 0; mptsas_parse_device_info(&identify, &phy_info->attached); - if (scsi_is_host_device(parent)) { - struct mptsas_portinfo *port_info; - int i; - - mutex_lock(&ioc->sas_topology_mutex); - port_info = mptsas_find_portinfo_by_handle(ioc, - ioc->handle); - mutex_unlock(&ioc->sas_topology_mutex); - - for (i = 0; i < port_info->num_phys; i++) - if (port_info->phy_info[i].identify.sas_address == - identify.sas_address) - goto out; - - } else if (scsi_is_sas_rphy(parent)) { - struct sas_rphy *parent_rphy = dev_to_rphy(parent); - if (identify.sas_address == - parent_rphy->identify.sas_address) - goto out; - } - switch (identify.device_type) { case SAS_END_DEVICE: - rphy = sas_end_device_alloc(port); + rphy = sas_end_device_alloc(phy); break; case SAS_EDGE_EXPANDER_DEVICE: case SAS_FANOUT_EXPANDER_DEVICE: - rphy = sas_expander_alloc(port, identify.device_type); + rphy = sas_expander_alloc(phy, identify.device_type); break; default: rphy = NULL; break; } - if (!rphy) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - goto out; - } + if (!rphy) + return 0; /* non-fatal: an rphy can be added later */ rphy->identify = identify; + error = sas_rphy_add(rphy); if (error) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); sas_rphy_free(rphy); - goto out; + return error; } - mptsas_set_rphy(phy_info, rphy); + + phy_info->rphy = rphy; } - out: - return error; + return 0; } static int @@ -1703,7 +1333,6 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc) goto out_free_port_info; mutex_lock(&ioc->sas_topology_mutex); - ioc->handle = hba->handle; port_info = mptsas_find_portinfo_by_handle(ioc, hba->handle); if (!port_info) { port_info = hba; @@ -1713,11 +1342,13 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc) for (i = 0; i < hba->num_phys; i++) port_info->phy_info[i].negotiated_link_rate = hba->phy_info[i].negotiated_link_rate; - kfree(hba->phy_info); + if (hba->phy_info) + kfree(hba->phy_info); kfree(hba); hba = NULL; } mutex_unlock(&ioc->sas_topology_mutex); + ioc->num_ports = port_info->num_phys; for (i = 0; i < port_info->num_phys; i++) { mptsas_sas_phy_pg0(ioc, &port_info->phy_info[i], @@ -1731,24 +1362,24 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc) port_info->phy_info[i].phy_id; handle = port_info->phy_info[i].identify.handle; - if (port_info->phy_info[i].attached.handle) + if (port_info->phy_info[i].attached.handle) { mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].attached, (MPI_SAS_DEVICE_PGAD_FORM_HANDLE << MPI_SAS_DEVICE_PGAD_FORM_SHIFT), port_info->phy_info[i].attached.handle); - } - - mptsas_setup_wide_ports(ioc, port_info); + } - for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) mptsas_probe_one_phy(&ioc->sh->shost_gendev, &port_info->phy_info[i], ioc->sas_index, 1); + ioc->sas_index++; + } return 0; out_free_port_info: - kfree(hba); + if (hba) + kfree(hba); out: return error; } @@ -1757,8 +1388,6 @@ static int mptsas_probe_expander_phys(MPT_ADAPTER *ioc, u32 *handle) { struct mptsas_portinfo *port_info, *p, *ex; - struct device *parent; - struct sas_rphy *rphy; int error = -ENOMEM, i, j; ex = kzalloc(sizeof(*port_info), GFP_KERNEL); @@ -1780,13 +1409,16 @@ mptsas_probe_expander_phys(MPT_ADAPTER *ioc, u32 *handle) list_add_tail(&port_info->list, &ioc->sas_topology); } else { port_info->handle = ex->handle; - kfree(ex->phy_info); + if (ex->phy_info) + kfree(ex->phy_info); kfree(ex); ex = NULL; } mutex_unlock(&ioc->sas_topology_mutex); for (i = 0; i < port_info->num_phys; i++) { + struct device *parent; + mptsas_sas_expander_pg1(ioc, &port_info->phy_info[i], (MPI_SAS_EXPAND_PGAD_FORM_HANDLE_PHY_NUM << MPI_SAS_EXPAND_PGAD_FORM_SHIFT), (i << 16) + *handle); @@ -1810,34 +1442,34 @@ mptsas_probe_expander_phys(MPT_ADAPTER *ioc, u32 *handle) port_info->phy_info[i].attached.phy_id = port_info->phy_info[i].phy_id; } - } - parent = &ioc->sh->shost_gendev; - for (i = 0; i < port_info->num_phys; i++) { + /* + * If we find a parent port handle this expander is + * attached to another expander, else it hangs of the + * HBA phys. + */ + parent = &ioc->sh->shost_gendev; mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry(p, &ioc->sas_topology, list) { for (j = 0; j < p->num_phys; j++) { - if (port_info->phy_info[i].identify.handle != + if (port_info->phy_info[i].identify.handle == p->phy_info[j].attached.handle) - continue; - rphy = mptsas_get_rphy(&p->phy_info[j]); - parent = &rphy->dev; + parent = &p->phy_info[j].rphy->dev; } } mutex_unlock(&ioc->sas_topology_mutex); - } - mptsas_setup_wide_ports(ioc, port_info); - - for (i = 0; i < port_info->num_phys; i++, ioc->sas_index++) mptsas_probe_one_phy(parent, &port_info->phy_info[i], ioc->sas_index, 0); + ioc->sas_index++; + } return 0; out_free_port_info: if (ex) { - kfree(ex->phy_info); + if (ex->phy_info) + kfree(ex->phy_info); kfree(ex); } out: @@ -1856,12 +1488,7 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc) { struct mptsas_portinfo buffer; struct mptsas_portinfo *port_info, *n, *parent; - struct mptsas_phyinfo *phy_info; - struct scsi_target * starget; - VirtTarget * vtarget; - struct sas_port * port; int i; - u64 expander_sas_address; mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry_safe(port_info, n, &ioc->sas_topology, list) { @@ -1875,25 +1502,6 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc) (MPI_SAS_EXPAND_PGAD_FORM_HANDLE << MPI_SAS_EXPAND_PGAD_FORM_SHIFT), port_info->handle)) { - /* - * Issue target reset to all child end devices - * then mark them deleted to prevent further - * IO going to them. - */ - phy_info = port_info->phy_info; - for (i = 0; i < port_info->num_phys; i++, phy_info++) { - starget = mptsas_get_starget(phy_info); - if (!starget) - continue; - vtarget = starget->hostdata; - if(vtarget->deleted) - continue; - vtarget->deleted = 1; - mptsas_target_reset(ioc, vtarget); - sas_port_delete(mptsas_get_port(phy_info)); - mptsas_port_delete(phy_info->port_details); - } - /* * Obtain the port_info instance to the parent port */ @@ -1903,44 +1511,34 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc) if (!parent) goto next_port; - expander_sas_address = - port_info->phy_info[0].identify.sas_address; - /* * Delete rphys in the parent that point * to this expander. The transport layer will * cleanup all the children. */ - phy_info = parent->phy_info; - for (i = 0; i < parent->num_phys; i++, phy_info++) { - port = mptsas_get_port(phy_info); - if (!port) + for (i = 0; i < parent->num_phys; i++) { + if ((!parent->phy_info[i].rphy) || + (parent->phy_info[i].attached.sas_address != + port_info->phy_info[i].identify.sas_address)) continue; - if (phy_info->attached.sas_address != - expander_sas_address) - continue; -#ifdef MPT_DEBUG_SAS_WIDE - dev_printk(KERN_DEBUG, &port->dev, - "delete port (%d)\n", port->port_identifier); -#endif - sas_port_delete(port); - mptsas_port_delete(phy_info->port_details); + sas_rphy_delete(parent->phy_info[i].rphy); + memset(&parent->phy_info[i].attached, 0, + sizeof(struct mptsas_devinfo)); + parent->phy_info[i].rphy = NULL; + parent->phy_info[i].starget = NULL; } next_port: - - phy_info = port_info->phy_info; - for (i = 0; i < port_info->num_phys; i++, phy_info++) - mptsas_port_delete(phy_info->port_details); - list_del(&port_info->list); - kfree(port_info->phy_info); + if (port_info->phy_info) + kfree(port_info->phy_info); kfree(port_info); } /* * Free this memory allocated from inside * mptsas_sas_expander_pg0 */ - kfree(buffer.phy_info); + if (buffer.phy_info) + kfree(buffer.phy_info); } mutex_unlock(&ioc->sas_topology_mutex); } @@ -1966,7 +1564,7 @@ mptsas_scan_sas_topology(MPT_ADAPTER *ioc) if (!ioc->raid_data.pIocPg2->NumActiveVolumes) goto out; for (i=0; iraid_data.pIocPg2->NumActiveVolumes; i++) { - scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, + scsi_add_device(ioc->sh, ioc->num_ports, ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID, 0); } out: @@ -1976,59 +1574,60 @@ mptsas_scan_sas_topology(MPT_ADAPTER *ioc) /* * Work queue thread to handle Runtime discovery * Mere purpose is the hot add/delete of expanders - *(Mutex UNLOCKED) */ static void -__mptsas_discovery_work(MPT_ADAPTER *ioc) +mptscsih_discovery_work(void * arg) { + struct mptsas_discovery_event *ev = arg; + MPT_ADAPTER *ioc = ev->ioc; u32 handle = 0xFFFF; + mutex_lock(&ioc->sas_discovery_mutex); ioc->sas_discovery_runtime=1; mptsas_delete_expander_phys(ioc); mptsas_probe_hba_phys(ioc); while (!mptsas_probe_expander_phys(ioc, &handle)) ; + kfree(ev); ioc->sas_discovery_runtime=0; -} - -/* - * Work queue thread to handle Runtime discovery - * Mere purpose is the hot add/delete of expanders - *(Mutex LOCKED) - */ -static void -mptsas_discovery_work(void * arg) -{ - struct mptsas_discovery_event *ev = arg; - MPT_ADAPTER *ioc = ev->ioc; - - mutex_lock(&ioc->sas_discovery_mutex); - __mptsas_discovery_work(ioc); mutex_unlock(&ioc->sas_discovery_mutex); - kfree(ev); } static struct mptsas_phyinfo * -mptsas_find_phyinfo_by_sas_address(MPT_ADAPTER *ioc, u64 sas_address) +mptsas_find_phyinfo_by_parent(MPT_ADAPTER *ioc, u16 parent_handle, u8 phy_id) { struct mptsas_portinfo *port_info; + struct mptsas_devinfo device_info; struct mptsas_phyinfo *phy_info = NULL; - int i; + int i, error; + /* + * Retrieve the parent sas_address + */ + error = mptsas_sas_device_pg0(ioc, &device_info, + (MPI_SAS_DEVICE_PGAD_FORM_HANDLE << + MPI_SAS_DEVICE_PGAD_FORM_SHIFT), + parent_handle); + if (error) + return NULL; + + /* + * The phy_info structures are never deallocated during lifetime of + * a host, so the code below is safe without additional refcounting. + */ mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry(port_info, &ioc->sas_topology, list) { for (i = 0; i < port_info->num_phys; i++) { - if (port_info->phy_info[i].attached.sas_address - != sas_address) - continue; - if (!mptsas_is_end_device( - &port_info->phy_info[i].attached)) - continue; - phy_info = &port_info->phy_info[i]; - break; + if (port_info->phy_info[i].identify.sas_address == + device_info.sas_address && + port_info->phy_info[i].phy_id == phy_id) { + phy_info = &port_info->phy_info[i]; + break; + } } } mutex_unlock(&ioc->sas_topology_mutex); + return phy_info; } @@ -2039,19 +1638,21 @@ mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u32 id) struct mptsas_phyinfo *phy_info = NULL; int i; + /* + * The phy_info structures are never deallocated during lifetime of + * a host, so the code below is safe without additional refcounting. + */ mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry(port_info, &ioc->sas_topology, list) { - for (i = 0; i < port_info->num_phys; i++) { - if (port_info->phy_info[i].attached.id != id) - continue; - if (!mptsas_is_end_device( - &port_info->phy_info[i].attached)) - continue; - phy_info = &port_info->phy_info[i]; - break; - } + for (i = 0; i < port_info->num_phys; i++) + if (mptsas_is_end_device(&port_info->phy_info[i].attached)) + if (port_info->phy_info[i].attached.id == id) { + phy_info = &port_info->phy_info[i]; + break; + } } mutex_unlock(&ioc->sas_topology_mutex); + return phy_info; } @@ -2059,7 +1660,7 @@ mptsas_find_phyinfo_by_target(MPT_ADAPTER *ioc, u32 id) * Work queue thread to clear the persitency table */ static void -mptsas_persist_clear_table(void * arg) +mptscsih_sas_persist_clear_table(void * arg) { MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; @@ -2080,6 +1681,7 @@ mptsas_reprobe_target(struct scsi_target *starget, int uld_attach) mptsas_reprobe_lun); } + /* * Work queue thread to handle SAS hotplug events */ @@ -2090,17 +1692,14 @@ mptsas_hotplug_work(void *arg) MPT_ADAPTER *ioc = ev->ioc; struct mptsas_phyinfo *phy_info; struct sas_rphy *rphy; - struct sas_port *port; struct scsi_device *sdev; - struct scsi_target * starget; struct sas_identify identify; char *ds = NULL; struct mptsas_devinfo sas_device; VirtTarget *vtarget; - VirtDevice *vdevice; - mutex_lock(&ioc->sas_discovery_mutex); + switch (ev->event_type) { case MPTSAS_DEL_DEVICE: @@ -2109,50 +1708,24 @@ mptsas_hotplug_work(void *arg) /* * Sanity checks, for non-existing phys and remote rphys. */ - if (!phy_info || !phy_info->port_details) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + if (!phy_info) break; - } - rphy = mptsas_get_rphy(phy_info); - if (!rphy) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + if (!phy_info->rphy) break; - } - port = mptsas_get_port(phy_info); - if (!port) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - break; - } + if (phy_info->starget) { + vtarget = phy_info->starget->hostdata; - starget = mptsas_get_starget(phy_info); - if (starget) { - vtarget = starget->hostdata; - - if (!vtarget) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + if (!vtarget) break; - } - /* * Handling RAID components */ if (ev->phys_disk_num_valid) { vtarget->target_id = ev->phys_disk_num; vtarget->tflags |= MPT_TARGET_FLAGS_RAID_COMPONENT; - mptsas_reprobe_target(starget, 1); + mptsas_reprobe_target(vtarget->starget, 1); break; } - - vtarget->deleted = 1; - mptsas_target_reset(ioc, vtarget); } if (phy_info->attached.device_info & MPI_SAS_DEVICE_INFO_SSP_TARGET) @@ -2166,12 +1739,10 @@ mptsas_hotplug_work(void *arg) "removing %s device, channel %d, id %d, phy %d\n", ioc->name, ds, ev->channel, ev->id, phy_info->phy_id); -#ifdef MPT_DEBUG_SAS_WIDE - dev_printk(KERN_DEBUG, &port->dev, - "delete port (%d)\n", port->port_identifier); -#endif - sas_port_delete(port); - mptsas_port_delete(phy_info->port_details); + sas_rphy_delete(phy_info->rphy); + memset(&phy_info->attached, 0, sizeof(struct mptsas_devinfo)); + phy_info->rphy = NULL; + phy_info->starget = NULL; break; case MPTSAS_ADD_DEVICE: @@ -2183,60 +1754,59 @@ mptsas_hotplug_work(void *arg) */ if (mptsas_sas_device_pg0(ioc, &sas_device, (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID << - MPI_SAS_DEVICE_PGAD_FORM_SHIFT), ev->id)) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + MPI_SAS_DEVICE_PGAD_FORM_SHIFT), ev->id)) break; - } - ssleep(2); - __mptsas_discovery_work(ioc); + phy_info = mptsas_find_phyinfo_by_parent(ioc, + sas_device.handle_parent, sas_device.phy_id); - phy_info = mptsas_find_phyinfo_by_sas_address(ioc, - sas_device.sas_address); + if (!phy_info) { + u32 handle = 0xFFFF; - if (!phy_info || !phy_info->port_details) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - break; + /* + * Its possible when an expander has been hot added + * containing attached devices, the sas firmware + * may send a RC_ADDED event prior to the + * DISCOVERY STOP event. If that occurs, our + * view of the topology in the driver in respect to this + * expander might of not been setup, and we hit this + * condition. + * Therefore, this code kicks off discovery to + * refresh the data. + * Then again, we check whether the parent phy has + * been created. + */ + ioc->sas_discovery_runtime=1; + mptsas_delete_expander_phys(ioc); + mptsas_probe_hba_phys(ioc); + while (!mptsas_probe_expander_phys(ioc, &handle)) + ; + ioc->sas_discovery_runtime=0; + + phy_info = mptsas_find_phyinfo_by_parent(ioc, + sas_device.handle_parent, sas_device.phy_id); + if (!phy_info) + break; } - starget = mptsas_get_starget(phy_info); - if (starget) { - vtarget = starget->hostdata; + if (phy_info->starget) { + vtarget = phy_info->starget->hostdata; - if (!vtarget) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + if (!vtarget) break; - } /* * Handling RAID components */ if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) { vtarget->tflags &= ~MPT_TARGET_FLAGS_RAID_COMPONENT; vtarget->target_id = ev->id; - mptsas_reprobe_target(starget, 0); + mptsas_reprobe_target(phy_info->starget, 0); } break; } - if (mptsas_get_rphy(phy_info)) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - break; - } - port = mptsas_get_port(phy_info); - if (!port) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); + if (phy_info->rphy) break; - } memcpy(&phy_info->attached, &sas_device, sizeof(struct mptsas_devinfo)); @@ -2253,48 +1823,59 @@ mptsas_hotplug_work(void *arg) ioc->name, ds, ev->channel, ev->id, ev->phy_id); mptsas_parse_device_info(&identify, &phy_info->attached); - rphy = sas_end_device_alloc(port); - if (!rphy) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); - break; /* non-fatal: an rphy can be added later */ + switch (identify.device_type) { + case SAS_END_DEVICE: + rphy = sas_end_device_alloc(phy_info->phy); + break; + case SAS_EDGE_EXPANDER_DEVICE: + case SAS_FANOUT_EXPANDER_DEVICE: + rphy = sas_expander_alloc(phy_info->phy, identify.device_type); + break; + default: + rphy = NULL; + break; } + if (!rphy) + break; /* non-fatal: an rphy can be added later */ rphy->identify = identify; if (sas_rphy_add(rphy)) { - dfailprintk((MYIOC_s_ERR_FMT - "%s: exit at line=%d\n", ioc->name, - __FUNCTION__, __LINE__)); sas_rphy_free(rphy); break; } - mptsas_set_rphy(phy_info, rphy); + + phy_info->rphy = rphy; break; case MPTSAS_ADD_RAID: - sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, - ev->id, 0); + sdev = scsi_device_lookup( + ioc->sh, + ioc->num_ports, + ev->id, + 0); if (sdev) { scsi_device_put(sdev); break; } printk(MYIOC_s_INFO_FMT "attaching raid volume, channel %d, id %d\n", - ioc->name, MPTSAS_RAID_CHANNEL, ev->id); - scsi_add_device(ioc->sh, MPTSAS_RAID_CHANNEL, ev->id, 0); + ioc->name, ioc->num_ports, ev->id); + scsi_add_device(ioc->sh, + ioc->num_ports, + ev->id, + 0); mpt_findImVolumes(ioc); break; case MPTSAS_DEL_RAID: - sdev = scsi_device_lookup(ioc->sh, MPTSAS_RAID_CHANNEL, - ev->id, 0); + sdev = scsi_device_lookup( + ioc->sh, + ioc->num_ports, + ev->id, + 0); if (!sdev) break; printk(MYIOC_s_INFO_FMT "removing raid volume, channel %d, id %d\n", - ioc->name, MPTSAS_RAID_CHANNEL, ev->id); - vdevice = sdev->hostdata; - vdevice->vtarget->deleted = 1; - mptsas_target_reset(ioc, vdevice->vtarget); + ioc->name, ioc->num_ports, ev->id); scsi_remove_device(sdev); scsi_device_put(sdev); mpt_findImVolumes(ioc); @@ -2304,13 +1885,12 @@ mptsas_hotplug_work(void *arg) break; } - mutex_unlock(&ioc->sas_discovery_mutex); kfree(ev); - + mutex_unlock(&ioc->sas_discovery_mutex); } static void -mptsas_send_sas_event(MPT_ADAPTER *ioc, +mptscsih_send_sas_event(MPT_ADAPTER *ioc, EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) { struct mptsas_hotplug_event *ev; @@ -2326,7 +1906,7 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, switch (sas_event_data->ReasonCode) { case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: - ev = kzalloc(sizeof(*ev), GFP_ATOMIC); + ev = kmalloc(sizeof(*ev), GFP_ATOMIC); if (!ev) { printk(KERN_WARNING "mptsas: lost hotplug event\n"); break; @@ -2356,9 +1936,10 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, /* * Persistent table is full. */ - INIT_WORK(&ioc->sas_persist_task, - mptsas_persist_clear_table, (void *)ioc); - schedule_work(&ioc->sas_persist_task); + INIT_WORK(&ioc->mptscsih_persistTask, + mptscsih_sas_persist_clear_table, + (void *)ioc); + schedule_work(&ioc->mptscsih_persistTask); break; case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA: /* TODO */ @@ -2370,7 +1951,7 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc, } static void -mptsas_send_raid_event(MPT_ADAPTER *ioc, +mptscsih_send_raid_event(MPT_ADAPTER *ioc, EVENT_DATA_RAID *raid_event_data) { struct mptsas_hotplug_event *ev; @@ -2380,12 +1961,13 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc, if (ioc->bus_type != SAS) return; - ev = kzalloc(sizeof(*ev), GFP_ATOMIC); + ev = kmalloc(sizeof(*ev), GFP_ATOMIC); if (!ev) { printk(KERN_WARNING "mptsas: lost hotplug event\n"); return; } + memset(ev,0,sizeof(struct mptsas_hotplug_event)); INIT_WORK(&ev->work, mptsas_hotplug_work, ev); ev->ioc = ioc; ev->id = raid_event_data->VolumeID; @@ -2447,7 +2029,7 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc, } static void -mptsas_send_discovery_event(MPT_ADAPTER *ioc, +mptscsih_send_discovery(MPT_ADAPTER *ioc, EVENT_DATA_SAS_DISCOVERY *discovery_data) { struct mptsas_discovery_event *ev; @@ -2462,10 +2044,11 @@ mptsas_send_discovery_event(MPT_ADAPTER *ioc, if (discovery_data->DiscoveryStatus) return; - ev = kzalloc(sizeof(*ev), GFP_ATOMIC); + ev = kmalloc(sizeof(*ev), GFP_ATOMIC); if (!ev) return; - INIT_WORK(&ev->work, mptsas_discovery_work, ev); + memset(ev,0,sizeof(struct mptsas_discovery_event)); + INIT_WORK(&ev->work, mptscsih_discovery_work, ev); ev->ioc = ioc; schedule_work(&ev->work); }; @@ -2493,21 +2076,21 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) switch (event) { case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: - mptsas_send_sas_event(ioc, + mptscsih_send_sas_event(ioc, (EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data); break; case MPI_EVENT_INTEGRATED_RAID: - mptsas_send_raid_event(ioc, + mptscsih_send_raid_event(ioc, (EVENT_DATA_RAID *)reply->Data); break; case MPI_EVENT_PERSISTENT_TABLE_FULL: - INIT_WORK(&ioc->sas_persist_task, - mptsas_persist_clear_table, + INIT_WORK(&ioc->mptscsih_persistTask, + mptscsih_sas_persist_clear_table, (void *)ioc); - schedule_work(&ioc->sas_persist_task); + schedule_work(&ioc->mptscsih_persistTask); break; case MPI_EVENT_SAS_DISCOVERY: - mptsas_send_discovery_event(ioc, + mptscsih_send_discovery(ioc, (EVENT_DATA_SAS_DISCOVERY *)reply->Data); break; default: @@ -2697,6 +2280,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) hd->timer.data = (unsigned long) hd; hd->timer.function = mptscsih_timer_expired; + hd->mpt_pq_filter = mpt_pq_filter; ioc->sas_data.ptClear = mpt_pt_clear; if (ioc->sas_data.ptClear==1) { @@ -2704,6 +2288,12 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT); } + ddvprintk((MYIOC_s_INFO_FMT + "mpt_pq_filter %x mpt_pq_filter %x\n", + ioc->name, + mpt_pq_filter, + mpt_pq_filter)); + init_waitqueue_head(&hd->scandv_waitq); hd->scandv_wait_done = 0; hd->last_queue_full = 0; @@ -2719,7 +2309,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) return 0; - out_mptsas_probe: +out_mptsas_probe: mptscsih_remove(pdev); return error; @@ -2729,7 +2319,6 @@ static void __devexit mptsas_remove(struct pci_dev *pdev) { MPT_ADAPTER *ioc = pci_get_drvdata(pdev); struct mptsas_portinfo *p, *n; - int i; ioc->sas_discovery_ignore_events=1; sas_remove_host(ioc->sh); @@ -2737,9 +2326,8 @@ static void __devexit mptsas_remove(struct pci_dev *pdev) mutex_lock(&ioc->sas_topology_mutex); list_for_each_entry_safe(p, n, &ioc->sas_topology, list) { list_del(&p->list); - for (i = 0 ; i < p->num_phys ; i++) - mptsas_port_delete(p->phy_info[i].port_details); - kfree(p->phy_info); + if (p->phy_info) + kfree(p->phy_info); kfree(p); } mutex_unlock(&ioc->sas_topology_mutex); @@ -2748,15 +2336,17 @@ static void __devexit mptsas_remove(struct pci_dev *pdev) } static struct pci_device_id mptsas_pci_table[] = { - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1064, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1064, + PCI_ANY_ID, PCI_ANY_ID }, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1066, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1068, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1068, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1064E, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1064E, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1068E, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1066E, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1078, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1068E, PCI_ANY_ID, PCI_ANY_ID }, {0} /* Terminating entry */ }; diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 30524dc54..84fa271eb 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c @@ -66,7 +66,6 @@ #include "mptbase.h" #include "mptscsih.h" -#include "lsi/mpi_log_sas.h" /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #define my_NAME "Fusion MPT SCSI Host driver" @@ -128,7 +127,7 @@ static void mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx); static void mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply); static int mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd); static int mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ); -static int SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); +static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc); static int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout); @@ -498,34 +497,6 @@ nextSGEset: return SUCCESS; } /* mptscsih_AddSGE() */ -static void -mptscsih_issue_sep_command(MPT_ADAPTER *ioc, VirtTarget *vtarget, - U32 SlotStatus) -{ - MPT_FRAME_HDR *mf; - SEPRequest_t *SEPMsg; - - if (ioc->bus_type == FC) - return; - - if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { - dfailprintk((MYIOC_s_WARN_FMT "%s: no msg frames!!\n", - ioc->name,__FUNCTION__)); - return; - } - - SEPMsg = (SEPRequest_t *)mf; - SEPMsg->Function = MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR; - SEPMsg->Bus = vtarget->bus_id; - SEPMsg->TargetID = vtarget->target_id; - SEPMsg->Action = MPI_SEP_REQ_ACTION_WRITE_STATUS; - SEPMsg->SlotStatus = SlotStatus; - devtverboseprintk((MYIOC_s_WARN_FMT - "Sending SEP cmd=%x id=%d bus=%d\n", - ioc->name, SlotStatus, SEPMsg->TargetID, SEPMsg->Bus)); - mpt_put_msg_frame(ioc->DoneCtx, ioc, mf); -} - /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * mptscsih_io_done - Main SCSI IO callback routine registered to @@ -549,8 +520,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) SCSIIORequest_t *pScsiReq; SCSIIOReply_t *pScsiReply; u16 req_idx, req_idx_MR; - VirtDevice *vdev; - VirtTarget *vtarget; hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; @@ -569,7 +538,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) } sc = hd->ScsiLookup[req_idx]; - hd->ScsiLookup[req_idx] = NULL; if (sc == NULL) { MPIHeader_t *hdr = (MPIHeader_t *)mf; @@ -585,12 +553,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) return 1; } - if ((unsigned char *)mf != sc->host_scribble) { - mptscsih_freeChainBuffers(ioc, req_idx); - return 1; - } - - sc->host_scribble = NULL; sc->result = DID_OK << 16; /* Set default reply as OK */ pScsiReq = (SCSIIORequest_t *) mf; pScsiReply = (SCSIIOReply_t *) mr; @@ -678,36 +640,10 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) if (hd->sel_timeout[pScsiReq->TargetID] < 0xFFFF) hd->sel_timeout[pScsiReq->TargetID]++; - - vdev = sc->device->hostdata; - if (!vdev) - break; - vtarget = vdev->vtarget; - if (vtarget->tflags & MPT_TARGET_FLAGS_LED_ON) { - mptscsih_issue_sep_command(ioc, vtarget, - MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED); - vtarget->tflags &= ~MPT_TARGET_FLAGS_LED_ON; - } break; - case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */ - if ( ioc->bus_type == SAS ) { - u16 ioc_status = le16_to_cpu(pScsiReply->IOCStatus); - if (ioc_status & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) { - u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo); - log_info &=SAS_LOGINFO_MASK; - if (log_info == SAS_LOGINFO_NEXUS_LOSS) { - sc->result = (DID_BUS_BUSY << 16); - break; - } - } - } - - /* - * Allow non-SAS & non-NEXUS_LOSS to drop into below code - */ - case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */ + case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */ case MPI_IOCSTATUS_SCSI_EXT_TERMINATED: /* 0x004C */ /* Linux handles an unsolicited DID_RESET better * than an unsolicited DID_ABORT. @@ -722,7 +658,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) sc->result=DID_SOFT_ERROR << 16; else /* Sufficient data transfer occurred */ sc->result = (DID_OK << 16) | scsi_status; - dreplyprintk((KERN_NOTICE + dreplyprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id)); break; @@ -848,6 +784,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) sc->request_bufflen, sc->sc_data_direction); } + hd->ScsiLookup[req_idx] = NULL; + sc->scsi_done(sc); /* Issue the command callback */ /* Free Chain buffers */ @@ -889,17 +827,9 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd) dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n", mf, SCpnt)); - /* Free Chain buffers */ - mptscsih_freeChainBuffers(ioc, ii); - - /* Free Message frames */ - mpt_free_msg_frame(ioc, mf); - - if ((unsigned char *)mf != SCpnt->host_scribble) - continue; - /* Set status, free OS resources (SG DMA buffers) * Do OS callback + * Free driver resources (chain, msg buffers) */ if (SCpnt->use_sg) { pci_unmap_sg(ioc->pcidev, @@ -915,6 +845,12 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd) SCpnt->result = DID_RESET << 16; SCpnt->host_scribble = NULL; + /* Free Chain buffers */ + mptscsih_freeChainBuffers(ioc, ii); + + /* Free Message frames */ + mpt_free_msg_frame(ioc, mf); + SCpnt->scsi_done(SCpnt); /* Issue the command callback */ } } @@ -951,10 +887,10 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice) if ((sc = hd->ScsiLookup[ii]) != NULL) { mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii); - if (mf == NULL) - continue; + dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n", hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1])); + if ((mf->TargetID != ((u8)vdevice->vtarget->target_id)) || (mf->LUN[1] != ((u8) vdevice->lun))) continue; @@ -963,8 +899,6 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice) hd->ScsiLookup[ii] = NULL; mptscsih_freeChainBuffers(hd->ioc, ii); mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf); - if ((unsigned char *)mf != sc->host_scribble) - continue; if (sc->use_sg) { pci_unmap_sg(hd->ioc->pcidev, (struct scatterlist *) sc->request_buffer, @@ -1407,8 +1341,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) goto fail; } - SCpnt->host_scribble = (unsigned char *)mf; hd->ScsiLookup[my_idx] = SCpnt; + SCpnt->host_scribble = NULL; mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf); dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n", @@ -1595,12 +1529,6 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, in rc = mpt_HardResetHandler(hd->ioc, CAN_SLEEP); } - /* - * Check IOCStatus from TM reply message - */ - if (hd->tm_iocstatus != MPI_IOCSTATUS_SUCCESS) - rc = FAILED; - dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc)); return rc; @@ -1726,7 +1654,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) int scpnt_idx; int retval; VirtDevice *vdev; - ulong sn = SCpnt->serial_number; /* If we can't locate our host adapter structure, return FAILED status. */ @@ -1780,11 +1707,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) vdev->vtarget->bus_id, vdev->vtarget->target_id, vdev->lun, ctx2abort, mptscsih_get_tm_timeout(hd->ioc)); - if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx && - SCpnt->serial_number == sn) { - retval = FAILED; - } - printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", hd->ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); @@ -2000,7 +1922,7 @@ mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout ) break; } spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); - msleep(250); + msleep_interruptible(250); } while (--loop_count); return status; @@ -2101,7 +2023,6 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK; - hd->tm_iocstatus = iocstatus; dtmprintk((MYIOC_s_WARN_FMT " SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n", ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo))); /* Error? (anything non-zero?) */ @@ -2480,13 +2401,6 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR ioc->events[idx].data[1] = (sense_data[13] << 8) || sense_data[12]; ioc->eventContext++; - if (hd->ioc->pcidev->vendor == - PCI_VENDOR_ID_IBM) { - mptscsih_issue_sep_command(hd->ioc, - vdev->vtarget, MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT); - vdev->vtarget->tflags |= - MPT_TARGET_FLAGS_LED_ON; - } } } } else { @@ -2495,7 +2409,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR } } -static int +static u32 SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc) { MPT_SCSI_HOST *hd; @@ -2607,6 +2521,18 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) hd->cmdPtr = NULL; } + /* 7. FC: Rescan for blocked rports which might have returned. + */ + if (ioc->bus_type == FC) { + spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); + if (ioc->fc_rescan_work_q) { + if (ioc->fc_rescan_work_count++ == 0) { + queue_work(ioc->fc_rescan_work_q, + &ioc->fc_rescan_work); + } + } + spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); + } dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name)); } @@ -2620,6 +2546,7 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) { MPT_SCSI_HOST *hd; u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; + unsigned long flags; devtverboseprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", ioc->name, event)); @@ -2642,6 +2569,14 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) break; case MPI_EVENT_RESCAN: /* 06 */ + spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags); + if (ioc->fc_rescan_work_q) { + if (ioc->fc_rescan_work_count++ == 0) { + queue_work(ioc->fc_rescan_work_q, + &ioc->fc_rescan_work); + } + } + spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags); break; /* diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index e4cc3dd5f..3201de053 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -83,6 +83,10 @@ static int mpt_saf_te = MPTSCSIH_SAF_TE; module_param(mpt_saf_te, int, 0); MODULE_PARM_DESC(mpt_saf_te, " Force enabling SEP Processor: enable=1 (default=MPTSCSIH_SAF_TE=0)"); +static int mpt_pq_filter = 0; +module_param(mpt_pq_filter, int, 0); +MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1 (default=0)"); + static void mptspi_write_offset(struct scsi_target *, int); static void mptspi_write_width(struct scsi_target *, int); static int mptspi_write_spi_device_pg1(struct scsi_target *, @@ -771,9 +775,9 @@ static struct spi_function_template mptspi_transport_functions = { */ static struct pci_device_id mptspi_pci_table[] = { - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1030, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C1030, PCI_ANY_ID, PCI_ANY_ID }, - { PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1035, + { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_1030_53C1035, PCI_ANY_ID, PCI_ANY_ID }, {0} /* Terminating entry */ }; @@ -1043,12 +1047,14 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id) hd->timer.function = mptscsih_timer_expired; ioc->spi_data.Saf_Te = mpt_saf_te; + hd->mpt_pq_filter = mpt_pq_filter; hd->negoNvram = MPT_SCSICFG_USE_NVRAM; ddvprintk((MYIOC_s_INFO_FMT - "saf_te %x\n", + "saf_te %x mpt_pq_filter %x\n", ioc->name, - mpt_saf_te)); + mpt_saf_te, + mpt_pq_filter)); ioc->spi_data.noQas = 0; init_waitqueue_head(&hd->scandv_waitq); diff --git a/drivers/message/i2o/core.h b/drivers/message/i2o/core.h index dc388a3ff..184974cc7 100644 --- a/drivers/message/i2o/core.h +++ b/drivers/message/i2o/core.h @@ -38,9 +38,6 @@ extern struct device_attribute i2o_device_attrs[]; extern void i2o_device_remove(struct i2o_device *); extern int i2o_device_parse_lct(struct i2o_controller *); -int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, - int oplen, void *reslist, int reslen); - /* IOP */ extern struct i2o_controller *i2o_iop_alloc(void); diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c index 8abe45e49..5a6cca8e8 100644 --- a/drivers/message/i2o/debug.c +++ b/drivers/message/i2o/debug.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 1ddc2fb42..7d4c54977 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -1089,6 +1089,7 @@ static int i2o_block_probe(struct device *dev) gd = i2o_blk_dev->gd; gd->first_minor = unit << 4; sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit); + sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit); gd->driverfs_dev = &i2o_dev->device; /* setup request queue */ diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 7d23e082b..89daf67b7 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c @@ -36,10 +36,10 @@ #include -#include "core.h" - #define SG_TABLESIZE 30 +extern int i2o_parm_issue(struct i2o_device *, int, void *, int, void *, int); + static int i2o_cfg_ioctl(struct inode *, struct file *, unsigned int, unsigned long); diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c index 6ebf38213..c08ddac37 100644 --- a/drivers/message/i2o/i2o_scsi.c +++ b/drivers/message/i2o/i2o_scsi.c @@ -65,7 +65,9 @@ #include #include #include +#include #include +#include #define OSM_NAME "scsi-osm" #define OSM_VERSION "1.316" @@ -586,7 +588,6 @@ static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt, mptr = &msg->body[0]; -#if 0 /* this code can't work */ #ifdef CONFIG_I2O_EXT_ADAPTEC if (c->adaptec) { u32 adpt_flags = 0; @@ -623,7 +624,6 @@ static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt, *mptr++ = cpu_to_le32(I2O_VENDOR_DPT << 16 | I2O_CMD_SCSI_EXEC); *mptr++ = cpu_to_le32(adpt_flags | tid); } -#endif #endif msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid); diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index 3305c1237..febbdd4e0 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c @@ -683,10 +683,9 @@ static int i2o_iop_systab_set(struct i2o_controller *c) c->mem_alloc = 1; sb->current_mem_size = 1 + res->end - res->start; sb->current_mem_base = res->start; - osm_info("%s: allocated %llu bytes of PCI memory at " - "0x%016llX.\n", c->name, - (unsigned long long)(1 + res->end - res->start), - (unsigned long long)res->start); + osm_info("%s: allocated %ld bytes of PCI memory at " + "0x%08lX.\n", c->name, + 1 + res->end - res->start, res->start); } } @@ -705,10 +704,9 @@ static int i2o_iop_systab_set(struct i2o_controller *c) c->io_alloc = 1; sb->current_io_size = 1 + res->end - res->start; sb->current_mem_base = res->start; - osm_info("%s: allocated %llu bytes of PCI I/O at " - "0x%016llX.\n", c->name, - (unsigned long long)(1 + res->end - res->start), - (unsigned long long)res->start); + osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX" + ".\n", c->name, 1 + res->end - res->start, + res->start); } } @@ -1241,6 +1239,7 @@ EXPORT_SYMBOL(i2o_cntxt_list_remove); EXPORT_SYMBOL(i2o_cntxt_list_get_ptr); #endif EXPORT_SYMBOL(i2o_msg_get_wait); +EXPORT_SYMBOL(i2o_msg_nop); EXPORT_SYMBOL(i2o_find_iop); EXPORT_SYMBOL(i2o_iop_find_device); EXPORT_SYMBOL(i2o_event_register); diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 1b58444d5..4f1515cae 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c @@ -274,7 +274,7 @@ static int i2o_pci_irq_enable(struct i2o_controller *c) writel(0xffffffff, c->irq_mask); if (pdev->irq) { - rc = request_irq(pdev->irq, i2o_pci_interrupt, IRQF_SHARED, + rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ, c->name, c); if (rc < 0) { printk(KERN_ERR "%s: unable to allocate interrupt %d." diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 2bf32721e..aff83f966 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c @@ -16,6 +16,7 @@ * Note that all locks are private to this file. Nothing else may * touch them. */ +#include #include #include #include @@ -419,10 +420,8 @@ static int ucb1x00_detect_irq(struct ucb1x00 *ucb) unsigned long mask; mask = probe_irq_on(); - if (!mask) { - probe_irq_off(mask); + if (!mask) return NO_IRQ; - } /* * Enable the ADC interrupt. @@ -479,7 +478,7 @@ static int ucb1x00_probe(struct mcp *mcp) mcp_enable(mcp); id = mcp_reg_read(mcp, UCB_ID); - if (id != UCB_ID_1200 && id != UCB_ID_1300 && id != UCB_ID_TC35143) { + if (id != UCB_ID_1200 && id != UCB_ID_1300) { printk(KERN_WARNING "UCB1x00 ID not found: %04x\n", id); goto err_disable; } @@ -508,7 +507,7 @@ static int ucb1x00_probe(struct mcp *mcp) goto err_free; } - ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING, + ret = request_irq(ucb->irq, ucb1x00_irq, SA_TRIGGER_RISING, "UCB1x00", ucb); if (ret) { printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n", diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 027768144..79fd062cc 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c @@ -17,6 +17,7 @@ * pin should provide pulses even when the LCD is blanked, otherwise * a pen touch needed to unblank the LCD will never be read. */ +#include #include #include #include diff --git a/drivers/mfd/ucb1x00.h b/drivers/mfd/ucb1x00.h index ca8df8072..9c9a647d8 100644 --- a/drivers/mfd/ucb1x00.h +++ b/drivers/mfd/ucb1x00.h @@ -94,7 +94,6 @@ #define UCB_ID 0x0c #define UCB_ID_1200 0x1004 #define UCB_ID_1300 0x1005 -#define UCB_ID_TC35143 0x9712 #define UCB_MODE 0x0d #define UCB_MODE_DYN_VFLAG_ENA (1 << 12) diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 634d538cc..6aba41954 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index b99dc507d..26a230b6f 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c @@ -90,11 +90,10 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root); static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); -static int ibmasmfs_get_super(struct file_system_type *fst, - int flags, const char *name, void *data, - struct vfsmount *mnt) +static struct super_block *ibmasmfs_get_super(struct file_system_type *fst, + int flags, const char *name, void *data) { - return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt); + return get_sb_single(fst, flags, data, ibmasmfs_fill_super); } static struct super_operations ibmasmfs_s_ops = { @@ -147,6 +146,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode) if (ret) { ret->i_mode = mode; ret->i_uid = ret->i_gid = 0; + ret->i_blksize = PAGE_CACHE_SIZE; ret->i_blocks = 0; ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; } @@ -174,7 +174,7 @@ static struct dentry *ibmasmfs_create_file (struct super_block *sb, } inode->i_fop = fops; - inode->i_private = data; + inode->u.generic_ip = data; d_add(dentry, inode); return dentry; @@ -243,7 +243,7 @@ static int command_file_open(struct inode *inode, struct file *file) { struct ibmasmfs_command_data *command_data; - if (!inode->i_private) + if (!inode->u.generic_ip) return -ENODEV; command_data = kmalloc(sizeof(struct ibmasmfs_command_data), GFP_KERNEL); @@ -251,7 +251,7 @@ static int command_file_open(struct inode *inode, struct file *file) return -ENOMEM; command_data->command = NULL; - command_data->sp = inode->i_private; + command_data->sp = inode->u.generic_ip; file->private_data = command_data; return 0; } @@ -350,10 +350,10 @@ static int event_file_open(struct inode *inode, struct file *file) struct ibmasmfs_event_data *event_data; struct service_processor *sp; - if (!inode->i_private) + if (!inode->u.generic_ip) return -ENODEV; - sp = inode->i_private; + sp = inode->u.generic_ip; event_data = kmalloc(sizeof(struct ibmasmfs_event_data), GFP_KERNEL); if (!event_data) @@ -438,14 +438,14 @@ static int r_heartbeat_file_open(struct inode *inode, struct file *file) { struct ibmasmfs_heartbeat_data *rhbeat; - if (!inode->i_private) + if (!inode->u.generic_ip) return -ENODEV; rhbeat = kmalloc(sizeof(struct ibmasmfs_heartbeat_data), GFP_KERNEL); if (!rhbeat) return -ENOMEM; - rhbeat->sp = inode->i_private; + rhbeat->sp = (struct service_processor *)inode->u.generic_ip; rhbeat->active = 0; ibmasm_init_reverse_heartbeat(rhbeat->sp, &rhbeat->heartbeat); file->private_data = rhbeat; @@ -507,7 +507,7 @@ static ssize_t r_heartbeat_file_write(struct file *file, const char __user *buf, static int remote_settings_file_open(struct inode *inode, struct file *file) { - file->private_data = inode->i_private; + file->private_data = inode->u.generic_ip; return 0; } diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index 2f3bddfab..1fdf03fd2 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c @@ -85,7 +85,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi } memset(sp, 0, sizeof(struct service_processor)); - spin_lock_init(&sp->lock); + sp->lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&sp->command_queue); pci_set_drvdata(pdev, (void *)sp); @@ -113,7 +113,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi goto error_ioremap; } - result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp); + result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp); if (result) { dev_err(sp->dev, "Failed to register interrupt handler\n"); goto error_request_irq; diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 6b7638b84..88f0eef9c 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c @@ -53,6 +53,7 @@ Gets the status of the write protect pin, if available. */ +#include #include #include #include @@ -80,6 +81,13 @@ #undef SUPPORT_4WIRE +#ifdef CONFIG_MMC_DEBUG +#define DBG(fmt...) \ + printk(fmt) +#else +#define DBG(fmt...) do { } while (0) +#endif + static struct clk *mci_clk; #define FL_SENT_COMMAND (1 << 0) @@ -194,50 +202,50 @@ static void at91mci_pre_dma_read(struct at91mci_host *host) struct mmc_command *cmd; struct mmc_data *data; - pr_debug("pre dma read\n"); + DBG("pre dma read\n"); cmd = host->cmd; if (!cmd) { - pr_debug("no command\n"); + DBG("no command\n"); return; } data = cmd->data; if (!data) { - pr_debug("no data\n"); + DBG("no data\n"); return; } for (i = 0; i < 2; i++) { /* nothing left to transfer */ if (host->transfer_index >= data->sg_len) { - pr_debug("Nothing left to transfer (index = %d)\n", host->transfer_index); + DBG("Nothing left to transfer (index = %d)\n", host->transfer_index); break; } /* Check to see if this needs filling */ if (i == 0) { if (at91_mci_read(AT91_PDC_RCR) != 0) { - pr_debug("Transfer active in current\n"); + DBG("Transfer active in current\n"); continue; } } else { if (at91_mci_read(AT91_PDC_RNCR) != 0) { - pr_debug("Transfer active in next\n"); + DBG("Transfer active in next\n"); continue; } } /* Setup the next transfer */ - pr_debug("Using transfer index %d\n", host->transfer_index); + DBG("Using transfer index %d\n", host->transfer_index); sg = &data->sg[host->transfer_index++]; - pr_debug("sg = %p\n", sg); + DBG("sg = %p\n", sg); sg->dma_address = dma_map_page(NULL, sg->page, sg->offset, sg->length, DMA_FROM_DEVICE); - pr_debug("dma address = %08X, length = %d\n", sg->dma_address, sg->length); + DBG("dma address = %08X, length = %d\n", sg->dma_address, sg->length); if (i == 0) { at91_mci_write(AT91_PDC_RPR, sg->dma_address); @@ -249,7 +257,7 @@ static void at91mci_pre_dma_read(struct at91mci_host *host) } } - pr_debug("pre dma read done\n"); + DBG("pre dma read done\n"); } /* @@ -260,17 +268,17 @@ static void at91mci_post_dma_read(struct at91mci_host *host) struct mmc_command *cmd; struct mmc_data *data; - pr_debug("post dma read\n"); + DBG("post dma read\n"); cmd = host->cmd; if (!cmd) { - pr_debug("no command\n"); + DBG("no command\n"); return; } data = cmd->data; if (!data) { - pr_debug("no data\n"); + DBG("no data\n"); return; } @@ -281,17 +289,17 @@ static void at91mci_post_dma_read(struct at91mci_host *host) struct scatterlist *sg; - pr_debug("finishing index %d\n", host->in_use_index); + DBG("finishing index %d\n", host->in_use_index); sg = &data->sg[host->in_use_index++]; - pr_debug("Unmapping page %08X\n", sg->dma_address); + DBG("Unmapping page %08X\n", sg->dma_address); dma_unmap_page(NULL, sg->dma_address, sg->length, DMA_FROM_DEVICE); /* Swap the contents of the buffer */ buffer = kmap_atomic(sg->page, KM_BIO_SRC_IRQ) + sg->offset; - pr_debug("buffer = %p, length = %d\n", buffer, sg->length); + DBG("buffer = %p, length = %d\n", buffer, sg->length); data->bytes_xfered += sg->length; @@ -312,7 +320,7 @@ static void at91mci_post_dma_read(struct at91mci_host *host) at91_mci_write(AT91_PDC_PTCR, AT91_PDC_RXTDIS | AT91_PDC_TXTDIS); } - pr_debug("post dma read done\n"); + DBG("post dma read done\n"); } /* @@ -323,7 +331,7 @@ static void at91_mci_handle_transmitted(struct at91mci_host *host) struct mmc_command *cmd; struct mmc_data *data; - pr_debug("Handling the transmit\n"); + DBG("Handling the transmit\n"); /* Disable the transfer */ at91_mci_write(AT91_PDC_PTCR, AT91_PDC_RXTDIS | AT91_PDC_TXTDIS); @@ -379,12 +387,12 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ /* Not sure if this is needed */ #if 0 if ((at91_mci_read(AT91_MCI_SR) & AT91_MCI_RTOE) && (cmd->opcode == 1)) { - pr_debug("Clearing timeout\n"); + DBG("Clearing timeout\n"); at91_mci_write(AT91_MCI_ARGR, 0); at91_mci_write(AT91_MCI_CMDR, AT91_MCI_OPDCMD); while (!(at91_mci_read(AT91_MCI_SR) & AT91_MCI_CMDRDY)) { /* spin */ - pr_debug("Clearing: SR = %08X\n", at91_mci_read(AT91_MCI_SR)); + DBG("Clearing: SR = %08X\n", at91_mci_read(AT91_MCI_SR)); } } #endif @@ -403,7 +411,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ } if (data) { - block_length = data->blksz; + block_length = 1 << data->blksz_bits; blocks = data->blocks; /* always set data start - also set direction flag for read */ @@ -431,7 +439,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ /* * Set the arguments and send the command */ - pr_debug("Sending command %d as %08X, arg = %08X, blocks = %d, length = %d (MR = %08lX)\n", + DBG("Sending command %d as %08X, arg = %08X, blocks = %d, length = %d (MR = %08lX)\n", cmd->opcode, cmdr, cmd->arg, blocks, block_length, at91_mci_read(AT91_MCI_MR)); if (!data) { @@ -483,7 +491,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ at91mci_sg_to_dma(host, data); - pr_debug("Transmitting %d bytes\n", host->total_length); + DBG("Transmitting %d bytes\n", host->total_length); at91_mci_write(AT91_PDC_TPR, host->physical_address); at91_mci_write(AT91_PDC_TCR, host->total_length / 4); @@ -517,7 +525,7 @@ static void at91mci_process_command(struct at91mci_host *host, struct mmc_comman ier = at91_mci_send_command(host, cmd); - pr_debug("setting ier to %08X\n", ier); + DBG("setting ier to %08X\n", ier); /* Stop on errors or the required value */ at91_mci_write(AT91_MCI_IER, 0xffff0000 | ier); @@ -562,7 +570,7 @@ static void at91mci_completed_command(struct at91mci_host *host) status = at91_mci_read(AT91_MCI_SR); - pr_debug("Status = %08X [%08X %08X %08X %08X]\n", + DBG("Status = %08X [%08X %08X %08X %08X]\n", status, cmd->resp[0], cmd->resp[1], cmd->resp[2], cmd->resp[3]); if (status & (AT91_MCI_RINDE | AT91_MCI_RDIRE | AT91_MCI_RCRCE | @@ -582,7 +590,7 @@ static void at91mci_completed_command(struct at91mci_host *host) else cmd->error = MMC_ERR_FAILED; - pr_debug("Error detected and set to %d (cmd = %d, retries = %d)\n", + DBG("Error detected and set to %d (cmd = %d, retries = %d)\n", cmd->error, cmd->opcode, cmd->retries); } } @@ -613,7 +621,10 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) struct at91mci_host *host = mmc_priv(mmc); unsigned long at91_master_clock = clk_get_rate(mci_clk); - host->bus_mode = ios->bus_mode; + if (host) + host->bus_mode = ios->bus_mode; + else + printk("MMC: No host for bus_mode\n"); if (ios->clock == 0) { /* Disable the MCI controller */ @@ -629,15 +640,15 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) else clkdiv = (at91_master_clock / ios->clock) / 2; - pr_debug("clkdiv = %d. mcck = %ld\n", clkdiv, + DBG("clkdiv = %d. mcck = %ld\n", clkdiv, at91_master_clock / (2 * (clkdiv + 1))); } if (ios->bus_width == MMC_BUS_WIDTH_4 && host->board->wire4) { - pr_debug("MMC: Setting controller bus width to 4\n"); + DBG("MMC: Setting controller bus width to 4\n"); at91_mci_write(AT91_MCI_SDCR, at91_mci_read(AT91_MCI_SDCR) | AT91_MCI_SDCBUS); } else { - pr_debug("MMC: Setting controller bus width to 1\n"); + DBG("MMC: Setting controller bus width to 1\n"); at91_mci_write(AT91_MCI_SDCR, at91_mci_read(AT91_MCI_SDCR) & ~AT91_MCI_SDCBUS); } @@ -645,7 +656,7 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) at91_mci_write(AT91_MCI_MR, (at91_mci_read(AT91_MCI_MR) & ~AT91_MCI_CLKDIV) | clkdiv); /* maybe switch power to the card */ - if (host->board->vcc_pin) { + if (host && host->board->vcc_pin) { switch (ios->power_mode) { case MMC_POWER_OFF: at91_set_gpio_output(host->board->vcc_pin, 0); @@ -668,8 +679,11 @@ static irqreturn_t at91_mci_irq(int irq, void *devid, struct pt_regs *regs) unsigned int int_status; + if (host == NULL) + return IRQ_HANDLED; + int_status = at91_mci_read(AT91_MCI_SR); - pr_debug("MCI irq: status = %08X, %08lX, %08lX\n", int_status, at91_mci_read(AT91_MCI_IMR), + DBG("MCI irq: status = %08X, %08lX, %08lX\n", int_status, at91_mci_read(AT91_MCI_IMR), int_status & at91_mci_read(AT91_MCI_IMR)); if ((int_status & at91_mci_read(AT91_MCI_IMR)) & 0xffff0000) @@ -678,75 +692,75 @@ static irqreturn_t at91_mci_irq(int irq, void *devid, struct pt_regs *regs) int_status &= at91_mci_read(AT91_MCI_IMR); if (int_status & AT91_MCI_UNRE) - pr_debug("MMC: Underrun error\n"); + DBG("MMC: Underrun error\n"); if (int_status & AT91_MCI_OVRE) - pr_debug("MMC: Overrun error\n"); + DBG("MMC: Overrun error\n"); if (int_status & AT91_MCI_DTOE) - pr_debug("MMC: Data timeout\n"); + DBG("MMC: Data timeout\n"); if (int_status & AT91_MCI_DCRCE) - pr_debug("MMC: CRC error in data\n"); + DBG("MMC: CRC error in data\n"); if (int_status & AT91_MCI_RTOE) - pr_debug("MMC: Response timeout\n"); + DBG("MMC: Response timeout\n"); if (int_status & AT91_MCI_RENDE) - pr_debug("MMC: Response end bit error\n"); + DBG("MMC: Response end bit error\n"); if (int_status & AT91_MCI_RCRCE) - pr_debug("MMC: Response CRC error\n"); + DBG("MMC: Response CRC error\n"); if (int_status & AT91_MCI_RDIRE) - pr_debug("MMC: Response direction error\n"); + DBG("MMC: Response direction error\n"); if (int_status & AT91_MCI_RINDE) - pr_debug("MMC: Response index error\n"); + DBG("MMC: Response index error\n"); /* Only continue processing if no errors */ if (!completed) { if (int_status & AT91_MCI_TXBUFE) { - pr_debug("TX buffer empty\n"); + DBG("TX buffer empty\n"); at91_mci_handle_transmitted(host); } if (int_status & AT91_MCI_RXBUFF) { - pr_debug("RX buffer full\n"); + DBG("RX buffer full\n"); at91_mci_write(AT91_MCI_IER, AT91_MCI_CMDRDY); } if (int_status & AT91_MCI_ENDTX) { - pr_debug("Transmit has ended\n"); + DBG("Transmit has ended\n"); } if (int_status & AT91_MCI_ENDRX) { - pr_debug("Receive has ended\n"); + DBG("Receive has ended\n"); at91mci_post_dma_read(host); } if (int_status & AT91_MCI_NOTBUSY) { - pr_debug("Card is ready\n"); + DBG("Card is ready\n"); at91_mci_write(AT91_MCI_IER, AT91_MCI_CMDRDY); } if (int_status & AT91_MCI_DTIP) { - pr_debug("Data transfer in progress\n"); + DBG("Data transfer in progress\n"); } if (int_status & AT91_MCI_BLKE) { - pr_debug("Block transfer has ended\n"); + DBG("Block transfer has ended\n"); } if (int_status & AT91_MCI_TXRDY) { - pr_debug("Ready to transmit\n"); + DBG("Ready to transmit\n"); } if (int_status & AT91_MCI_RXRDY) { - pr_debug("Ready to receive\n"); + DBG("Ready to receive\n"); } if (int_status & AT91_MCI_CMDRDY) { - pr_debug("Command ready\n"); + DBG("Command ready\n"); completed = 1; } } at91_mci_write(AT91_MCI_IDR, int_status); if (completed) { - pr_debug("Completed command\n"); + DBG("Completed command\n"); at91_mci_write(AT91_MCI_IDR, 0xffffffff); at91mci_completed_command(host); } @@ -765,10 +779,10 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host, struct pt_regs *regs) */ if (present != host->present) { host->present = present; - pr_debug("%s: card %s\n", mmc_hostname(host->mmc), + DBG("%s: card %s\n", mmc_hostname(host->mmc), present ? "insert" : "remove"); if (!present) { - pr_debug("****** Resetting SD-card bus width ******\n"); + DBG("****** Resetting SD-card bus width ******\n"); at91_mci_write(AT91_MCI_SDCR, 0); } mmc_detect_change(host->mmc, msecs_to_jiffies(100)); @@ -808,13 +822,13 @@ static int at91_mci_probe(struct platform_device *pdev) struct at91mci_host *host; int ret; - pr_debug("Probe MCI devices\n"); + DBG("Probe MCI devices\n"); at91_mci_disable(); at91_mci_enable(); mmc = mmc_alloc_host(sizeof(struct at91mci_host), &pdev->dev); if (!mmc) { - pr_debug("Failed to allocate mmc host\n"); + DBG("Failed to allocate mmc host\n"); return -ENOMEM; } @@ -840,9 +854,8 @@ static int at91_mci_probe(struct platform_device *pdev) * Get Clock */ mci_clk = clk_get(&pdev->dev, "mci_clk"); - if (IS_ERR(mci_clk)) { + if (!mci_clk) { printk(KERN_ERR "AT91 MMC: no clock defined.\n"); - mmc_free_host(mmc); return -ENODEV; } clk_enable(mci_clk); /* Enable the peripheral clock */ @@ -850,12 +863,9 @@ static int at91_mci_probe(struct platform_device *pdev) /* * Allocate the MCI interrupt */ - ret = request_irq(AT91_ID_MCI, at91_mci_irq, IRQF_SHARED, DRIVER_NAME, host); + ret = request_irq(AT91_ID_MCI, at91_mci_irq, SA_SHIRQ, DRIVER_NAME, host); if (ret) { - printk(KERN_ERR "Failed to request MCI interrupt\n"); - clk_disable(mci_clk); - clk_put(mci_clk); - mmc_free_host(mmc); + DBG("Failed to request MCI interrupt\n"); return ret; } @@ -876,12 +886,12 @@ static int at91_mci_probe(struct platform_device *pdev) */ if (host->board->det_pin) { ret = request_irq(host->board->det_pin, at91_mmc_det_irq, - 0, DRIVER_NAME, host); + SA_SAMPLE_RANDOM, DRIVER_NAME, host); if (ret) - printk(KERN_ERR "couldn't allocate MMC detect irq\n"); + DBG("couldn't allocate MMC detect irq\n"); } - pr_debug(KERN_INFO "Added MCI driver\n"); + DBG(KERN_INFO "Added MCI driver\n"); return 0; } @@ -914,7 +924,7 @@ static int at91_mci_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); - pr_debug("MCI Removed\n"); + DBG("Removed\n"); return 0; } diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index fb606165a..5dc4bee7a 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c @@ -34,6 +34,7 @@ * So we use the timer to check the status manually. */ +#include #include #include #include @@ -886,7 +887,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev) int i, ret = 0; /* THe interrupt is shared among all controllers */ - ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0); + ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, SA_INTERRUPT, "MMC", 0); if (ret) { printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index fb6565b98..a4eb1d0e7 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c @@ -25,6 +25,7 @@ * deficiencies * */ +#include #ifdef CONFIG_MMC_DEBUG #define DEBUG @@ -91,8 +92,6 @@ struct imxmci_host { int dma_allocated; unsigned char actual_bus_width; - - int prev_cmd_code; }; #define IMXMCI_PEND_IRQ_b 0 @@ -229,7 +228,7 @@ static int imxmci_busy_wait_for_status(struct imxmci_host *host, static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) { unsigned int nob = data->blocks; - unsigned int blksz = data->blksz; + unsigned int blksz = 1 << data->blksz_bits; unsigned int datasz = nob * blksz; int i; @@ -250,14 +249,16 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) * partial FIFO fills and reads. The length has to be rounded up to burst size multiple. * This is required for SCR read at least. */ - if (datasz < 512) { + if (datasz < 64) { host->dma_size = datasz; if (data->flags & MMC_DATA_READ) { host->dma_dir = DMA_FROM_DEVICE; /* Hack to enable read SCR */ - MMC_NOB = 1; - MMC_BLK_LEN = 512; + if(datasz < 16) { + MMC_NOB = 1; + MMC_BLK_LEN = 16; + } } else { host->dma_dir = DMA_TO_DEVICE; } @@ -409,9 +410,6 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request * spin_unlock_irqrestore(&host->lock, flags); - if(req && req->cmd) - host->prev_cmd_code = req->cmd->opcode; - host->req = NULL; host->cmd = NULL; host->data = NULL; @@ -556,6 +554,7 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) { int i; int burst_len; + int flush_len; int trans_done = 0; unsigned int stat = *pstat; @@ -568,43 +567,44 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data running STATUS = 0x%x\n", stat); - udelay(20); /* required for clocks < 8MHz*/ - if(host->dma_dir == DMA_FROM_DEVICE) { imxmci_busy_wait_for_status(host, &stat, STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE, - 50, "imxmci_cpu_driven_data read"); + 20, "imxmci_cpu_driven_data read"); while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && - (host->data_cnt < 512)) { - - udelay(20); /* required for clocks < 8MHz*/ + (host->data_cnt < host->dma_size)) { + if(burst_len >= host->dma_size - host->data_cnt) { + flush_len = burst_len; + burst_len = host->dma_size - host->data_cnt; + flush_len -= burst_len; + host->data_cnt = host->dma_size; + trans_done = 1; + } else { + flush_len = 0; + host->data_cnt += burst_len; + } for(i = burst_len; i>=2 ; i-=2) { - u16 data; - data = MMC_BUFFER_ACCESS; - udelay(10); /* required for clocks < 8MHz*/ - if(host->data_cnt+2 <= host->dma_size) { - *(host->data_ptr++) = data; - } else { - if(host->data_cnt < host->dma_size) - *(u8*)(host->data_ptr) = data; - } - host->data_cnt += 2; + *(host->data_ptr++) = MMC_BUFFER_ACCESS; + udelay(20); /* required for clocks < 8MHz*/ } - stat = MMC_STATUS; - - dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", - host->data_cnt, burst_len, stat); - } + if(i == 1) + *(u8*)(host->data_ptr) = MMC_BUFFER_ACCESS; - if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) - trans_done = 1; + stat = MMC_STATUS; - if(host->dma_size & 0x1ff) - stat &= ~STATUS_CRC_READ_ERR; + /* Flush extra bytes from FIFO */ + while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){ + i = MMC_BUFFER_ACCESS; + stat = MMC_STATUS; + stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */ + } + dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read burst %d STATUS = 0x%x\n", + burst_len, stat); + } } else { imxmci_busy_wait_for_status(host, &stat, STATUS_APPL_BUFF_FE, @@ -693,8 +693,8 @@ static void imxmci_tasklet_fnc(unsigned long data) what, stat, MMC_INT_MASK); dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); - dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", - host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<actual_bus_width, host->dma_size); + dev_err(mmc_dev(host->mmc), "CMD%d, bus %d-bit, dma_size = 0x%x\n", + host->cmd?host->cmd->opcode:0, 1<actual_bus_width, host->dma_size); } if(!host->present || timeout) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 74eaaee66..6201f3086 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -9,6 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -128,7 +129,7 @@ static void mmc_wait_done(struct mmc_request *mrq) int mmc_wait_for_req(struct mmc_host *host, struct mmc_request *mrq) { - DECLARE_COMPLETION_ONSTACK(complete); + DECLARE_COMPLETION(complete); mrq->done_data = &complete; mrq->done = mmc_wait_done; @@ -247,55 +248,6 @@ int mmc_wait_for_app_cmd(struct mmc_host *host, unsigned int rca, EXPORT_SYMBOL(mmc_wait_for_app_cmd); -/** - * mmc_set_data_timeout - set the timeout for a data command - * @data: data phase for command - * @card: the MMC card associated with the data transfer - * @write: flag to differentiate reads from writes - */ -void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card, - int write) -{ - unsigned int mult; - - /* - * SD cards use a 100 multiplier rather than 10 - */ - mult = mmc_card_sd(card) ? 100 : 10; - - /* - * Scale up the multiplier (and therefore the timeout) by - * the r2w factor for writes. - */ - if (write) - mult <<= card->csd.r2w_factor; - - data->timeout_ns = card->csd.tacc_ns * mult; - data->timeout_clks = card->csd.tacc_clks * mult; - - /* - * SD cards also have an upper limit on the timeout. - */ - if (mmc_card_sd(card)) { - unsigned int timeout_us, limit_us; - - timeout_us = data->timeout_ns / 1000; - timeout_us += data->timeout_clks * 1000 / - (card->host->ios.clock / 1000); - - if (write) - limit_us = 250000; - else - limit_us = 100000; - - if (timeout_us > limit_us) { - data->timeout_ns = limit_us * 1000; - data->timeout_clks = 0; - } - } -} -EXPORT_SYMBOL(mmc_set_data_timeout); - static int mmc_select_card(struct mmc_host *host, struct mmc_card *card); /** @@ -957,9 +909,11 @@ static void mmc_read_scrs(struct mmc_host *host) { int err; struct mmc_card *card; + struct mmc_request mrq; struct mmc_command cmd; struct mmc_data data; + struct scatterlist sg; list_for_each_entry(card, &host->cards, node) { @@ -994,8 +948,8 @@ static void mmc_read_scrs(struct mmc_host *host) memset(&data, 0, sizeof(struct mmc_data)); - mmc_set_data_timeout(&data, card, 0); - + data.timeout_ns = card->csd.tacc_ns * 10; + data.timeout_clks = card->csd.tacc_clks * 10; data.blksz_bits = 3; data.blksz = 1 << 3; data.blocks = 1; diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index a0e0dad1b..587458b37 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -27,10 +27,10 @@ #include #include #include +#include #include #include -#include #include #include @@ -172,6 +172,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) brq.cmd.arg = req->sector << 9; brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + brq.data.timeout_ns = card->csd.tacc_ns * 10; + brq.data.timeout_clks = card->csd.tacc_clks * 10; brq.data.blksz_bits = md->block_bits; brq.data.blksz = 1 << md->block_bits; brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); @@ -179,8 +181,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) brq.stop.arg = 0; brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; - mmc_set_data_timeout(&brq.data, card, rq_data_dir(req) != READ); - if (rq_data_dir(req) == READ) { brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; brq.data.flags |= MMC_DATA_READ; @@ -188,6 +188,12 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) brq.cmd.opcode = MMC_WRITE_BLOCK; brq.data.flags |= MMC_DATA_WRITE; brq.data.blocks = 1; + + /* + * Scale up the timeout by the r2w factor + */ + brq.data.timeout_ns <<= card->csd.r2w_factor; + brq.data.timeout_clks <<= card->csd.r2w_factor; } if (brq.data.blocks > 1) { @@ -319,11 +325,52 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) md->read_only = mmc_blk_readonly(card); /* - * Both SD and MMC specifications state (although a bit - * unclearly in the MMC case) that a block size of 512 - * bytes must always be supported by the card. + * Figure out a workable block size. MMC cards have: + * - two block sizes, one for read and one for write. + * - may support partial reads and/or writes + * (allows block sizes smaller than specified) + */ + md->block_bits = card->csd.read_blkbits; + if (card->csd.write_blkbits != card->csd.read_blkbits) { + if (card->csd.write_blkbits < card->csd.read_blkbits && + card->csd.read_partial) { + /* + * write block size is smaller than read block + * size, but we support partial reads, so choose + * the smaller write block size. + */ + md->block_bits = card->csd.write_blkbits; + } else if (card->csd.write_blkbits > card->csd.read_blkbits && + card->csd.write_partial) { + /* + * read block size is smaller than write block + * size, but we support partial writes. Use read + * block size. + */ + } else { + /* + * We don't support this configuration for writes. + */ + printk(KERN_ERR "%s: unable to select block size for " + "writing (rb%u wb%u rp%u wp%u)\n", + mmc_card_id(card), + 1 << card->csd.read_blkbits, + 1 << card->csd.write_blkbits, + card->csd.read_partial, + card->csd.write_partial); + md->read_only = 1; + } + } + + /* + * Refuse to allow block sizes smaller than 512 bytes. */ - md->block_bits = 9; + if (md->block_bits < 9) { + printk(KERN_ERR "%s: unable to support block size %u\n", + mmc_card_id(card), 1 << md->block_bits); + ret = -EINVAL; + goto err_kfree; + } md->disk = alloc_disk(1 << MMC_SHIFT); if (md->disk == NULL) { @@ -362,6 +409,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) */ sprintf(md->disk->disk_name, "mmcblk%d", devidx); + sprintf(md->disk->devfs_name, "mmc/blk%d", devidx); blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); @@ -507,6 +555,7 @@ static int __init mmc_blk_init(void) if (major == 0) major = res; + devfs_mk_dir("mmc"); return mmc_register_driver(&mmc_driver); out: @@ -516,6 +565,7 @@ static int __init mmc_blk_init(void) static void __exit mmc_blk_exit(void) { mmc_unregister_driver(&mmc_driver); + devfs_remove("mmc"); unregister_blkdev(major, "mmc"); } diff --git a/drivers/mmc/mmc_queue.c b/drivers/mmc/mmc_queue.c index 74f8cdeef..0b9682e9a 100644 --- a/drivers/mmc/mmc_queue.c +++ b/drivers/mmc/mmc_queue.c @@ -79,8 +79,7 @@ static int mmc_queue_thread(void *d) spin_lock_irq(q->queue_lock); set_current_state(TASK_INTERRUPTIBLE); if (!blk_queue_plugged(q)) - req = elv_next_request(q); - mq->req = req; + mq->req = req = elv_next_request(q); spin_unlock_irq(q->queue_lock); if (!req) { diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 1886562ab..da8e4d733 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -531,11 +532,11 @@ static int mmci_probe(struct amba_device *dev, void *id) writel(0, host->base + MMCIMASK1); writel(0xfff, host->base + MMCICLEAR); - ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host); + ret = request_irq(dev->irq[0], mmci_irq, SA_SHIRQ, DRIVER_NAME " (cmd)", host); if (ret) goto unmap; - ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, DRIVER_NAME " (pio)", host); + ret = request_irq(dev->irq[1], mmci_pio_irq, SA_SHIRQ, DRIVER_NAME " (pio)", host); if (ret) goto irq0_free; @@ -545,9 +546,9 @@ static int mmci_probe(struct amba_device *dev, void *id) mmc_add_host(mmc); - printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%016llx irq %d,%d\n", + printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n", mmc_hostname(mmc), amba_rev(dev), amba_config(dev), - (unsigned long long)dev->res.start, dev->irq[0], dev->irq[1]); + dev->res.start, dev->irq[0], dev->irq[1]); init_timer(&host->timer); host->timer.data = (unsigned long)host; diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index ddf06b32c..becb3c68c 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -60,7 +61,6 @@ struct mmc_omap_host { unsigned char id; /* 16xx chips have 2 MMC blocks */ struct clk * iclk; struct clk * fclk; - struct resource *res; void __iomem *base; int irq; unsigned char bus_mode; @@ -340,6 +340,8 @@ static void mmc_omap_xfer_data(struct mmc_omap_host *host, int write) { int n; + void __iomem *reg; + u16 *p; if (host->buffer_bytes_left == 0) { host->sg_idx++; @@ -582,10 +584,10 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data) int sync_dev = 0; data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA; - frame = data->blksz; + frame = 1 << data->blksz_bits; count = sg_dma_len(sg); - if ((data->blocks == 1) && (count > data->blksz)) + if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) count = frame; host->dma_len = count; @@ -656,12 +658,12 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data) struct mmc_data *mmcdat = host->data; if (unlikely(host->dma_ch < 0)) { - dev_err(mmc_dev(host->mmc), - "DMA callback while DMA not enabled\n"); + dev_err(mmc_dev(host->mmc), "DMA callback while DMA not + enabled\n"); return; } /* FIXME: We really should do something to _handle_ the errors */ - if (ch_status & OMAP1_DMA_TOUT_IRQ) { + if (ch_status & OMAP_DMA_TOUT_IRQ) { dev_err(mmc_dev(host->mmc),"DMA timeout\n"); return; } @@ -774,7 +776,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) } - block_size = data->blksz; + block_size = 1 << data->blksz_bits; OMAP_MMC_WRITE(host->base, NBLK, data->blocks - 1); OMAP_MMC_WRITE(host->base, BLEN, block_size - 1); @@ -971,20 +973,20 @@ static int __init mmc_omap_probe(struct platform_device *pdev) struct omap_mmc_conf *minfo = pdev->dev.platform_data; struct mmc_host *mmc; struct mmc_omap_host *host = NULL; - struct resource *r; int ret = 0; - int irq; - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - irq = platform_get_irq(pdev, 0); - if (!r || irq < 0) - return -ENXIO; + if (platform_get_resource(pdev, IORESOURCE_MEM, 0) || + platform_get_irq(pdev, IORESOURCE_IRQ, 0)) { + dev_err(&pdev->dev, "mmc_omap_probe: invalid resource type\n"); + return -ENODEV; + } - r = request_mem_region(pdev->resource[0].start, + if (!request_mem_region(pdev->resource[0].start, pdev->resource[0].end - pdev->resource[0].start + 1, - pdev->name); - if (!r) + pdev->name)) { + dev_dbg(&pdev->dev, "request_mem_region failed\n"); return -EBUSY; + } mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev); if (!mmc) { @@ -1001,8 +1003,6 @@ static int __init mmc_omap_probe(struct platform_device *pdev) host->dma_timer.data = (unsigned long) host; host->id = pdev->id; - host->res = r; - host->irq = irq; if (cpu_is_omap24xx()) { host->iclk = clk_get(&pdev->dev, "mmc_ick"); @@ -1032,9 +1032,13 @@ static int __init mmc_omap_probe(struct platform_device *pdev) host->dma_ch = -1; host->irq = pdev->resource[1].start; - host->base = (void __iomem*)IO_ADDRESS(r->start); + host->base = ioremap(pdev->res.start, SZ_4K); + if (!host->base) { + ret = -ENOMEM; + goto out; + } - if (minfo->wire4) + if (minfo->wire4) mmc->caps |= MMC_CAP_4_BIT_DATA; mmc->ops = &mmc_omap_ops; @@ -1053,8 +1057,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev) if (host->power_pin >= 0) { if ((ret = omap_request_gpio(host->power_pin)) != 0) { - dev_err(mmc_dev(host->mmc), - "Unable to get GPIO pin for MMC power\n"); + dev_err(mmc_dev(host->mmc), "Unable to get GPIO + pin for MMC power\n"); goto out; } omap_set_gpio_direction(host->power_pin, 0); @@ -1082,7 +1086,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) omap_set_gpio_direction(host->switch_pin, 1); ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin), - mmc_omap_switch_irq, IRQF_TRIGGER_RISING, DRIVER_NAME, host); + mmc_omap_switch_irq, SA_TRIGGER_RISING, DRIVER_NAME, host); if (ret) { dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n"); omap_free_gpio(host->switch_pin); @@ -1096,7 +1100,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) device_remove_file(&pdev->dev, &dev_attr_cover_switch); } if (ret) { - dev_warn(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); + dev_wan(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); free_irq(OMAP_GPIO_IRQ(host->switch_pin), host); omap_free_gpio(host->switch_pin); host->switch_pin = -1; diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c index ef3509084..b49368fd9 100644 --- a/drivers/mmc/pxamci.c +++ b/drivers/mmc/pxamci.c @@ -16,6 +16,7 @@ * 1 and 3 byte data transfers not supported * max block length up to 1023 */ +#include #include #include #include diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 4e21b3b9d..b0053280f 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -8,6 +8,12 @@ * published by the Free Software Foundation. */ + /* + * Note that PIO transfer is rather crappy atm. The buffer full/empty + * interrupts aren't reliable so we currently transfer the entire buffer + * directly. Patches to solve the problem are welcome. + */ + #include #include #include @@ -21,50 +27,16 @@ #include "sdhci.h" #define DRIVER_NAME "sdhci" -#define DRIVER_VERSION "0.12" +#define DRIVER_VERSION "0.11" #define BUGMAIL "" #define DBG(f, x...) \ pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) -static unsigned int debug_nodma = 0; -static unsigned int debug_forcedma = 0; -static unsigned int debug_quirks = 0; - -#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) -#define SDHCI_QUIRK_FORCE_DMA (1<<1) - static const struct pci_device_id pci_ids[] __devinitdata = { - { - .vendor = PCI_VENDOR_ID_RICOH, - .device = PCI_DEVICE_ID_RICOH_R5C822, - .subvendor = PCI_VENDOR_ID_IBM, - .subdevice = PCI_ANY_ID, - .driver_data = SDHCI_QUIRK_CLOCK_BEFORE_RESET | - SDHCI_QUIRK_FORCE_DMA, - }, - - { - .vendor = PCI_VENDOR_ID_RICOH, - .device = PCI_DEVICE_ID_RICOH_R5C822, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .driver_data = SDHCI_QUIRK_FORCE_DMA, - }, - - { - .vendor = PCI_VENDOR_ID_TI, - .device = PCI_DEVICE_ID_TI_XX21_XX11_SD, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .driver_data = SDHCI_QUIRK_FORCE_DMA, - }, - - { /* Generic SD host controller */ - PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00) - }, - + /* handle any SD host controller */ + {PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)}, { /* end: all zeroes */ }, }; @@ -122,27 +94,12 @@ static void sdhci_dumpregs(struct sdhci_host *host) static void sdhci_reset(struct sdhci_host *host, u8 mask) { - unsigned long timeout; - writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET); - if (mask & SDHCI_RESET_ALL) + if (mask & SDHCI_RESET_ALL) { host->clock = 0; - /* Wait max 100 ms */ - timeout = 100; - - /* hw clears the bit when it's done */ - while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) { - if (timeout == 0) { - printk(KERN_ERR "%s: Reset 0x%x never completed. " - "Please report this to " BUGMAIL ".\n", - mmc_hostname(host->mmc), (int)mask); - sdhci_dumpregs(host); - return; - } - timeout--; - mdelay(1); + mdelay(50); } } @@ -152,15 +109,13 @@ static void sdhci_init(struct sdhci_host *host) sdhci_reset(host, SDHCI_RESET_ALL); - intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | - SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | - SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | - SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT | - SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | - SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE; + intmask = ~(SDHCI_INT_CARD_INT | SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); + + /* This is unknown magic. */ + writeb(0xE, host->ioaddr + SDHCI_TIMEOUT_CONTROL); } static void sdhci_activate_led(struct sdhci_host *host) @@ -217,96 +172,79 @@ static inline int sdhci_next_sg(struct sdhci_host* host) return host->num_sg; } -static void sdhci_read_block_pio(struct sdhci_host *host) +static void sdhci_transfer_pio(struct sdhci_host *host) { - int blksize, chunk_remain; - u32 data; char *buffer; - int size; + u32 mask; + int bytes, size; + unsigned long max_jiffies; - DBG("PIO reading\n"); + BUG_ON(!host->data); - blksize = host->data->blksz; - chunk_remain = 0; - data = 0; + if (host->num_sg == 0) + return; - buffer = sdhci_kmap_sg(host) + host->offset; + bytes = 0; + if (host->data->flags & MMC_DATA_READ) + mask = SDHCI_DATA_AVAILABLE; + else + mask = SDHCI_SPACE_AVAILABLE; - while (blksize) { - if (chunk_remain == 0) { - data = readl(host->ioaddr + SDHCI_BUFFER); - chunk_remain = min(blksize, 4); - } + buffer = sdhci_kmap_sg(host) + host->offset; - size = min(host->size, host->remain); - size = min(size, chunk_remain); + /* Transfer shouldn't take more than 5 s */ + max_jiffies = jiffies + HZ * 5; - chunk_remain -= size; - blksize -= size; - host->offset += size; - host->remain -= size; - host->size -= size; - while (size) { - *buffer = data & 0xFF; - buffer++; - data >>= 8; - size--; - } + while (host->size > 0) { + if (time_after(jiffies, max_jiffies)) { + printk(KERN_ERR "%s: PIO transfer stalled. " + "Please report this to " + BUGMAIL ".\n", mmc_hostname(host->mmc)); + sdhci_dumpregs(host); - if (host->remain == 0) { sdhci_kunmap_sg(host); - if (sdhci_next_sg(host) == 0) { - BUG_ON(blksize != 0); - return; - } - buffer = sdhci_kmap_sg(host); - } - } - - sdhci_kunmap_sg(host); -} -static void sdhci_write_block_pio(struct sdhci_host *host) -{ - int blksize, chunk_remain; - u32 data; - char *buffer; - int bytes, size; - - DBG("PIO writing\n"); - - blksize = host->data->blksz; - chunk_remain = 4; - data = 0; + host->data->error = MMC_ERR_FAILED; + sdhci_finish_data(host); + return; + } - bytes = 0; - buffer = sdhci_kmap_sg(host) + host->offset; + if (!(readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask)) + continue; - while (blksize) { size = min(host->size, host->remain); - size = min(size, chunk_remain); - chunk_remain -= size; - blksize -= size; + if (size >= 4) { + if (host->data->flags & MMC_DATA_READ) + *(u32*)buffer = readl(host->ioaddr + SDHCI_BUFFER); + else + writel(*(u32*)buffer, host->ioaddr + SDHCI_BUFFER); + size = 4; + } else if (size >= 2) { + if (host->data->flags & MMC_DATA_READ) + *(u16*)buffer = readw(host->ioaddr + SDHCI_BUFFER); + else + writew(*(u16*)buffer, host->ioaddr + SDHCI_BUFFER); + size = 2; + } else { + if (host->data->flags & MMC_DATA_READ) + *(u8*)buffer = readb(host->ioaddr + SDHCI_BUFFER); + else + writeb(*(u8*)buffer, host->ioaddr + SDHCI_BUFFER); + size = 1; + } + + buffer += size; host->offset += size; host->remain -= size; - host->size -= size; - while (size) { - data >>= 8; - data |= (u32)*buffer << 24; - buffer++; - size--; - } - if (chunk_remain == 0) { - writel(data, host->ioaddr + SDHCI_BUFFER); - chunk_remain = min(blksize, 4); - } + bytes += size; + host->size -= size; if (host->remain == 0) { sdhci_kunmap_sg(host); if (sdhci_next_sg(host) == 0) { - BUG_ON(blksize != 0); + DBG("PIO transfer: %d bytes\n", bytes); return; } buffer = sdhci_kmap_sg(host); @@ -314,87 +252,38 @@ static void sdhci_write_block_pio(struct sdhci_host *host) } sdhci_kunmap_sg(host); -} - -static void sdhci_transfer_pio(struct sdhci_host *host) -{ - u32 mask; - - BUG_ON(!host->data); - - if (host->size == 0) - return; - - if (host->data->flags & MMC_DATA_READ) - mask = SDHCI_DATA_AVAILABLE; - else - mask = SDHCI_SPACE_AVAILABLE; - - while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { - if (host->data->flags & MMC_DATA_READ) - sdhci_read_block_pio(host); - else - sdhci_write_block_pio(host); - - if (host->size == 0) - break; - - BUG_ON(host->num_sg == 0); - } - DBG("PIO transfer complete.\n"); + DBG("PIO transfer: %d bytes\n", bytes); } static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) { - u8 count; - unsigned target_timeout, current_timeout; + u16 mode; WARN_ON(host->data); - if (data == NULL) + if (data == NULL) { + writew(0, host->ioaddr + SDHCI_TRANSFER_MODE); return; + } DBG("blksz %04x blks %04x flags %08x\n", - data->blksz, data->blocks, data->flags); + 1 << data->blksz_bits, data->blocks, data->flags); DBG("tsac %d ms nsac %d clk\n", data->timeout_ns / 1000000, data->timeout_clks); - /* Sanity checks */ - BUG_ON(data->blksz * data->blocks > 524288); - BUG_ON(data->blksz > host->max_block); - BUG_ON(data->blocks > 65535); - - /* timeout in us */ - target_timeout = data->timeout_ns / 1000 + - data->timeout_clks / host->clock; - - /* - * Figure out needed cycles. - * We do this in steps in order to fit inside a 32 bit int. - * The first step is the minimum timeout, which will have a - * minimum resolution of 6 bits: - * (1) 2^13*1000 > 2^22, - * (2) host->timeout_clk < 2^16 - * => - * (1) / (2) > 2^6 - */ - count = 0; - current_timeout = (1 << 13) * 1000 / host->timeout_clk; - while (current_timeout < target_timeout) { - count++; - current_timeout <<= 1; - if (count >= 0xF) - break; - } + mode = SDHCI_TRNS_BLK_CNT_EN; + if (data->blocks > 1) + mode |= SDHCI_TRNS_MULTI; + if (data->flags & MMC_DATA_READ) + mode |= SDHCI_TRNS_READ; + if (host->flags & SDHCI_USE_DMA) + mode |= SDHCI_TRNS_DMA; - if (count >= 0xF) { - printk(KERN_WARNING "%s: Too large timeout requested!\n", - mmc_hostname(host->mmc)); - count = 0xE; - } + writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); - writeb(count, host->ioaddr + SDHCI_TIMEOUT_CONTROL); + writew(1 << data->blksz_bits, host->ioaddr + SDHCI_BLOCK_SIZE); + writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); if (host->flags & SDHCI_USE_DMA) { int count; @@ -405,7 +294,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS); } else { - host->size = data->blksz * data->blocks; + host->size = (1 << data->blksz_bits) * data->blocks; host->cur_sg = data->sg; host->num_sg = data->sg_len; @@ -413,37 +302,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) host->offset = 0; host->remain = host->cur_sg->length; } - - /* We do not handle DMA boundaries, so set it to max (512 KiB) */ - writew(SDHCI_MAKE_BLKSZ(7, data->blksz), - host->ioaddr + SDHCI_BLOCK_SIZE); - writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); -} - -static void sdhci_set_transfer_mode(struct sdhci_host *host, - struct mmc_data *data) -{ - u16 mode; - - WARN_ON(host->data); - - if (data == NULL) - return; - - mode = SDHCI_TRNS_BLK_CNT_EN; - if (data->blocks > 1) - mode |= SDHCI_TRNS_MULTI; - if (data->flags & MMC_DATA_READ) - mode |= SDHCI_TRNS_READ; - if (host->flags & SDHCI_USE_DMA) - mode |= SDHCI_TRNS_DMA; - - writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); } static void sdhci_finish_data(struct sdhci_host *host) { struct mmc_data *data; + u32 intmask; u16 blocks; BUG_ON(!host->data); @@ -454,6 +318,14 @@ static void sdhci_finish_data(struct sdhci_host *host) if (host->flags & SDHCI_USE_DMA) { pci_unmap_sg(host->chip->pdev, data->sg, data->sg_len, (data->flags & MMC_DATA_READ)?PCI_DMA_FROMDEVICE:PCI_DMA_TODEVICE); + } else { + intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE); + intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); + writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); + + intmask = readl(host->ioaddr + SDHCI_INT_ENABLE); + intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); + writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); } /* @@ -463,14 +335,16 @@ static void sdhci_finish_data(struct sdhci_host *host) blocks = 0; else blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT); - data->bytes_xfered = data->blksz * (data->blocks - blocks); + data->bytes_xfered = (1 << data->blksz_bits) * (data->blocks - blocks); if ((data->error == MMC_ERR_NONE) && blocks) { printk(KERN_ERR "%s: Controller signalled completion even " "though there were blocks left. Please report this " "to " BUGMAIL ".\n", mmc_hostname(host->mmc)); data->error = MMC_ERR_FAILED; - } else if (host->size != 0) { + } + + if (host->size != 0) { printk(KERN_ERR "%s: %d bytes were left untransferred. " "Please report this to " BUGMAIL ".\n", mmc_hostname(host->mmc), host->size); @@ -497,38 +371,27 @@ static void sdhci_finish_data(struct sdhci_host *host) static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) { int flags; - u32 mask; - unsigned long timeout; + u32 present; + unsigned long max_jiffies; WARN_ON(host->cmd); DBG("Sending cmd (%x)\n", cmd->opcode); /* Wait max 10 ms */ - timeout = 10; - - mask = SDHCI_CMD_INHIBIT; - if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) - mask |= SDHCI_DATA_INHIBIT; - - /* We shouldn't wait for data inihibit for stop commands, even - though they might use busy signaling */ - if (host->mrq->data && (cmd == host->mrq->data->stop)) - mask &= ~SDHCI_DATA_INHIBIT; - - while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { - if (timeout == 0) { + max_jiffies = jiffies + (HZ + 99)/100; + do { + if (time_after(jiffies, max_jiffies)) { printk(KERN_ERR "%s: Controller never released " - "inhibit bit(s). Please report this to " + "inhibit bits. Please report this to " BUGMAIL ".\n", mmc_hostname(host->mmc)); sdhci_dumpregs(host); cmd->error = MMC_ERR_FAILED; tasklet_schedule(&host->finish_tasklet); return; } - timeout--; - mdelay(1); - } + present = readl(host->ioaddr + SDHCI_PRESENT_STATE); + } while (present & (SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT)); mod_timer(&host->timer, jiffies + 10 * HZ); @@ -538,8 +401,6 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) writel(cmd->arg, host->ioaddr + SDHCI_ARGUMENT); - sdhci_set_transfer_mode(host, cmd->data); - if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { printk(KERN_ERR "%s: Unsupported response type! " "Please report this to " BUGMAIL ".\n", @@ -565,7 +426,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) if (cmd->data) flags |= SDHCI_CMD_DATA; - writew(SDHCI_MAKE_CMD(cmd->opcode, flags), + writel(SDHCI_MAKE_CMD(cmd->opcode, flags), host->ioaddr + SDHCI_COMMAND); } @@ -595,9 +456,31 @@ static void sdhci_finish_command(struct sdhci_host *host) DBG("Ending cmd (%x)\n", host->cmd->opcode); - if (host->cmd->data) + if (host->cmd->data) { + u32 intmask; + host->data = host->cmd->data; - else + + if (!(host->flags & SDHCI_USE_DMA)) { + /* + * Don't enable the interrupts until now to make sure we + * get stable handling of the FIFO. + */ + intmask = readl(host->ioaddr + SDHCI_INT_ENABLE); + intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL; + writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); + + intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE); + intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL; + writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); + + /* + * The buffer interrupts are to unreliable so we + * start the transfer immediatly. + */ + sdhci_transfer_pio(host); + } + } else tasklet_schedule(&host->finish_tasklet); host->cmd = NULL; @@ -607,7 +490,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) { int div; u16 clk; - unsigned long timeout; + unsigned long max_jiffies; if (clock == host->clock) return; @@ -628,19 +511,17 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); /* Wait max 10 ms */ - timeout = 10; - while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL)) - & SDHCI_CLOCK_INT_STABLE)) { - if (timeout == 0) { + max_jiffies = jiffies + (HZ + 99)/100; + do { + if (time_after(jiffies, max_jiffies)) { printk(KERN_ERR "%s: Internal clock never stabilised. " "Please report this to " BUGMAIL ".\n", mmc_hostname(host->mmc)); sdhci_dumpregs(host); return; } - timeout--; - mdelay(1); - } + clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL); + } while (!(clk & SDHCI_CLOCK_INT_STABLE)); clk |= SDHCI_CLOCK_CARD_EN; writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); @@ -649,46 +530,6 @@ out: host->clock = clock; } -static void sdhci_set_power(struct sdhci_host *host, unsigned short power) -{ - u8 pwr; - - if (host->power == power) - return; - - writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); - - if (power == (unsigned short)-1) - goto out; - - pwr = SDHCI_POWER_ON; - - switch (power) { - case MMC_VDD_170: - case MMC_VDD_180: - case MMC_VDD_190: - pwr |= SDHCI_POWER_180; - break; - case MMC_VDD_290: - case MMC_VDD_300: - case MMC_VDD_310: - pwr |= SDHCI_POWER_300; - break; - case MMC_VDD_320: - case MMC_VDD_330: - case MMC_VDD_340: - pwr |= SDHCI_POWER_330; - break; - default: - BUG(); - } - - writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL); - -out: - host->power = power; -} - /*****************************************************************************\ * * * MMC callbacks * @@ -735,15 +576,17 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) */ if (ios->power_mode == MMC_POWER_OFF) { writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE); + spin_unlock_irqrestore(&host->lock, flags); sdhci_init(host); + spin_lock_irqsave(&host->lock, flags); } sdhci_set_clock(host, ios->clock); if (ios->power_mode == MMC_POWER_OFF) - sdhci_set_power(host, -1); + writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); else - sdhci_set_power(host, ios->vdd); + writeb(0xFF, host->ioaddr + SDHCI_POWER_CONTROL); ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL); if (ios->bus_width == MMC_BUS_WIDTH_4) @@ -836,19 +679,6 @@ static void sdhci_tasklet_finish(unsigned long param) if ((mrq->cmd->error != MMC_ERR_NONE) || (mrq->data && ((mrq->data->error != MMC_ERR_NONE) || (mrq->data->stop && (mrq->data->stop->error != MMC_ERR_NONE))))) { - - /* Some controllers need this kick or reset won't work here */ - if (host->chip->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) { - unsigned int clock; - - /* This is to force an update */ - clock = host->clock; - host->clock = 0; - sdhci_set_clock(host, clock); - } - - /* Spec says we should do both at the same time, but Ricoh - controllers do not like that. */ sdhci_reset(host, SDHCI_RESET_CMD); sdhci_reset(host, SDHCI_RESET_DATA); } @@ -963,7 +793,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) if (host->data->error != MMC_ERR_NONE) sdhci_finish_data(host); else { - if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL)) + if (intmask & (SDHCI_INT_BUF_FULL | SDHCI_INT_BUF_EMPTY)) sdhci_transfer_pio(host); if (intmask & SDHCI_INT_DATA_END) @@ -988,45 +818,51 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id, struct pt_regs *regs) DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask); - if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { - writel(intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE), - host->ioaddr + SDHCI_INT_STATUS); + if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) tasklet_schedule(&host->card_tasklet); - } - - intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); if (intmask & SDHCI_INT_CMD_MASK) { + sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK); + writel(intmask & SDHCI_INT_CMD_MASK, host->ioaddr + SDHCI_INT_STATUS); - sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK); } if (intmask & SDHCI_INT_DATA_MASK) { + sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK); + writel(intmask & SDHCI_INT_DATA_MASK, host->ioaddr + SDHCI_INT_STATUS); - sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK); } intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); - if (intmask & SDHCI_INT_BUS_POWER) { - printk(KERN_ERR "%s: Card is consuming too much power!\n", + if (intmask & SDHCI_INT_CARD_INT) { + printk(KERN_ERR "%s: Unexpected card interrupt. Please " + "report this to " BUGMAIL ".\n", mmc_hostname(host->mmc)); - writel(SDHCI_INT_BUS_POWER, host->ioaddr + SDHCI_INT_STATUS); + sdhci_dumpregs(host); } - intmask &= SDHCI_INT_BUS_POWER; + if (intmask & SDHCI_INT_BUS_POWER) { + printk(KERN_ERR "%s: Unexpected bus power interrupt. Please " + "report this to " BUGMAIL ".\n", + mmc_hostname(host->mmc)); + sdhci_dumpregs(host); + } - if (intmask) { - printk(KERN_ERR "%s: Unexpected interrupt 0x%08x. Please " + if (intmask & SDHCI_INT_ACMD12ERR) { + printk(KERN_ERR "%s: Unexpected auto CMD12 error. Please " "report this to " BUGMAIL ".\n", - mmc_hostname(host->mmc), intmask); + mmc_hostname(host->mmc)); sdhci_dumpregs(host); - writel(intmask, host->ioaddr + SDHCI_INT_STATUS); + writew(~0, host->ioaddr + SDHCI_ACMD12_ERR); } + if (intmask) + writel(intmask, host->ioaddr + SDHCI_INT_STATUS); + result = IRQ_HANDLED; out: @@ -1118,7 +954,6 @@ static int sdhci_resume (struct pci_dev *pdev) static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) { int ret; - unsigned int version; struct sdhci_chip *chip; struct mmc_host *mmc; struct sdhci_host *host; @@ -1150,16 +985,6 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) return -ENODEV; } - if ((pdev->class & 0x0000FF) == PCI_SDHCI_IFVENDOR) { - printk(KERN_ERR DRIVER_NAME ": Vendor specific interface. Aborting.\n"); - return -ENODEV; - } - - if ((pdev->class & 0x0000FF) > PCI_SDHCI_IFVENDOR) { - printk(KERN_ERR DRIVER_NAME ": Unknown interface. Aborting.\n"); - return -ENODEV; - } - mmc = mmc_alloc_host(sizeof(struct sdhci_host), &pdev->dev); if (!mmc) return -ENOMEM; @@ -1187,30 +1012,9 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) goto release; } - sdhci_reset(host, SDHCI_RESET_ALL); - - version = readw(host->ioaddr + SDHCI_HOST_VERSION); - version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT; - if (version != 0) { - printk(KERN_ERR "%s: Unknown controller version (%d). " - "You may experience problems.\n", host->slot_descr, - version); - } - caps = readl(host->ioaddr + SDHCI_CAPABILITIES); - if (debug_nodma) - DBG("DMA forced off\n"); - else if (debug_forcedma) { - DBG("DMA forced on\n"); - host->flags |= SDHCI_USE_DMA; - } else if (chip->quirks & SDHCI_QUIRK_FORCE_DMA) - host->flags |= SDHCI_USE_DMA; - else if ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) - DBG("Controller doesn't have DMA interface\n"); - else if (!(caps & SDHCI_CAN_DO_DMA)) - DBG("Controller doesn't have DMA capability\n"); - else + if ((caps & SDHCI_CAN_DO_DMA) && ((pdev->class & 0x0000FF) == 0x01)) host->flags |= SDHCI_USE_DMA; if (host->flags & SDHCI_USE_DMA) { @@ -1226,59 +1030,18 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) else /* XXX: Hack to get MMC layer to avoid highmem */ pdev->dma_mask = 0; - host->max_clk = - (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; - if (host->max_clk == 0) { - printk(KERN_ERR "%s: Hardware doesn't specify base clock " - "frequency.\n", host->slot_descr); - ret = -ENODEV; - goto unmap; - } + host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; host->max_clk *= 1000000; - host->timeout_clk = - (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; - if (host->timeout_clk == 0) { - printk(KERN_ERR "%s: Hardware doesn't specify timeout clock " - "frequency.\n", host->slot_descr); - ret = -ENODEV; - goto unmap; - } - if (caps & SDHCI_TIMEOUT_CLK_UNIT) - host->timeout_clk *= 1000; - - host->max_block = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; - if (host->max_block >= 3) { - printk(KERN_ERR "%s: Invalid maximum block size.\n", - host->slot_descr); - ret = -ENODEV; - goto unmap; - } - host->max_block = 512 << host->max_block; - /* * Set host parameters. */ mmc->ops = &sdhci_ops; mmc->f_min = host->max_clk / 256; mmc->f_max = host->max_clk; + mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34; mmc->caps = MMC_CAP_4_BIT_DATA; - mmc->ocr_avail = 0; - if (caps & SDHCI_CAN_VDD_330) - mmc->ocr_avail |= MMC_VDD_32_33|MMC_VDD_33_34; - else if (caps & SDHCI_CAN_VDD_300) - mmc->ocr_avail |= MMC_VDD_29_30|MMC_VDD_30_31; - else if (caps & SDHCI_CAN_VDD_180) - mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19; - - if (mmc->ocr_avail == 0) { - printk(KERN_ERR "%s: Hardware doesn't report any " - "support voltages.\n", host->slot_descr); - ret = -ENODEV; - goto unmap; - } - spin_lock_init(&host->lock); /* @@ -1291,10 +1054,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) mmc->max_phys_segs = 16; /* - * Maximum number of sectors in one transfer. Limited by DMA boundary - * size (512KiB), which means (512 KiB/512=) 1024 entries. + * Maximum number of sectors in one transfer. Limited by sector + * count register. */ - mmc->max_sectors = 1024; + mmc->max_sectors = 0x3FFF; /* * Maximum segment size. Could be one segment with the maximum number @@ -1310,12 +1073,12 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) tasklet_init(&host->finish_tasklet, sdhci_tasklet_finish, (unsigned long)host); - setup_timer(&host->timer, sdhci_timeout_timer, (long)host); + setup_timer(&host->timer, sdhci_timeout_timer, (int)host); - ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED, + ret = request_irq(host->irq, sdhci_irq, SA_SHIRQ, host->slot_descr, host); if (ret) - goto untasklet; + goto unmap; sdhci_init(host); @@ -1334,10 +1097,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) return 0; -untasklet: +unmap: tasklet_kill(&host->card_tasklet); tasklet_kill(&host->finish_tasklet); -unmap: + iounmap(host->ioaddr); release: pci_release_region(pdev, host->bar); @@ -1381,18 +1144,13 @@ static int __devinit sdhci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int ret, i; - u8 slots, rev; + u8 slots; struct sdhci_chip *chip; BUG_ON(pdev == NULL); BUG_ON(ent == NULL); - pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev); - - printk(KERN_INFO DRIVER_NAME - ": SDHCI controller found at %s [%04x:%04x] (rev %x)\n", - pci_name(pdev), (int)pdev->vendor, (int)pdev->device, - (int)rev); + DBG("found at %s\n", pci_name(pdev)); ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots); if (ret) @@ -1415,10 +1173,6 @@ static int __devinit sdhci_probe(struct pci_dev *pdev, } chip->pdev = pdev; - chip->quirks = ent->driver_data; - - if (debug_quirks) - chip->quirks = debug_quirks; chip->num_slots = slots; pci_set_drvdata(pdev, chip); @@ -1497,15 +1251,7 @@ static void __exit sdhci_drv_exit(void) module_init(sdhci_drv_init); module_exit(sdhci_drv_exit); -module_param(debug_nodma, uint, 0444); -module_param(debug_forcedma, uint, 0444); -module_param(debug_quirks, uint, 0444); - MODULE_AUTHOR("Pierre Ossman "); MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL"); - -MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); -MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)"); -MODULE_PARM_DESC(debug_quirks, "Force certain quirks."); diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h index f2453343f..3b270ef48 100644 --- a/drivers/mmc/sdhci.h +++ b/drivers/mmc/sdhci.h @@ -12,10 +12,6 @@ * PCI registers */ -#define PCI_SDHCI_IFPIO 0x00 -#define PCI_SDHCI_IFDMA 0x01 -#define PCI_SDHCI_IFVENDOR 0x02 - #define PCI_SLOT_INFO 0x40 /* 8 bits */ #define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7) #define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07 @@ -27,7 +23,6 @@ #define SDHCI_DMA_ADDRESS 0x00 #define SDHCI_BLOCK_SIZE 0x04 -#define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF)) #define SDHCI_BLOCK_COUNT 0x06 @@ -72,10 +67,6 @@ #define SDHCI_CTRL_4BITBUS 0x02 #define SDHCI_POWER_CONTROL 0x29 -#define SDHCI_POWER_ON 0x01 -#define SDHCI_POWER_180 0x0A -#define SDHCI_POWER_300 0x0C -#define SDHCI_POWER_330 0x0E #define SDHCI_BLOCK_GAP_CONTROL 0x2A @@ -100,8 +91,8 @@ #define SDHCI_INT_RESPONSE 0x00000001 #define SDHCI_INT_DATA_END 0x00000002 #define SDHCI_INT_DMA_END 0x00000008 -#define SDHCI_INT_SPACE_AVAIL 0x00000010 -#define SDHCI_INT_DATA_AVAIL 0x00000020 +#define SDHCI_INT_BUF_EMPTY 0x00000010 +#define SDHCI_INT_BUF_FULL 0x00000020 #define SDHCI_INT_CARD_INSERT 0x00000040 #define SDHCI_INT_CARD_REMOVE 0x00000080 #define SDHCI_INT_CARD_INT 0x00000100 @@ -121,7 +112,7 @@ #define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \ SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ - SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ + SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL | \ SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ SDHCI_INT_DATA_END_BIT) @@ -130,17 +121,9 @@ /* 3E-3F reserved */ #define SDHCI_CAPABILITIES 0x40 -#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F -#define SDHCI_TIMEOUT_CLK_SHIFT 0 -#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 +#define SDHCI_CAN_DO_DMA 0x00400000 #define SDHCI_CLOCK_BASE_MASK 0x00003F00 #define SDHCI_CLOCK_BASE_SHIFT 8 -#define SDHCI_MAX_BLOCK_MASK 0x00030000 -#define SDHCI_MAX_BLOCK_SHIFT 16 -#define SDHCI_CAN_DO_DMA 0x00400000 -#define SDHCI_CAN_VDD_330 0x01000000 -#define SDHCI_CAN_VDD_300 0x02000000 -#define SDHCI_CAN_VDD_180 0x04000000 /* 44-47 reserved for more caps */ @@ -153,10 +136,6 @@ #define SDHCI_SLOT_INT_STATUS 0xFC #define SDHCI_HOST_VERSION 0xFE -#define SDHCI_VENDOR_VER_MASK 0xFF00 -#define SDHCI_VENDOR_VER_SHIFT 8 -#define SDHCI_SPEC_VER_MASK 0x00FF -#define SDHCI_SPEC_VER_SHIFT 0 struct sdhci_chip; @@ -170,11 +149,8 @@ struct sdhci_host { #define SDHCI_USE_DMA (1<<0) unsigned int max_clk; /* Max possible freq (MHz) */ - unsigned int timeout_clk; /* Timeout freq (KHz) */ - unsigned int max_block; /* Max block size (bytes) */ unsigned int clock; /* Current clock (MHz) */ - unsigned short power; /* Current voltage */ struct mmc_request *mrq; /* Current request */ struct mmc_command *cmd; /* Current command */ @@ -204,8 +180,6 @@ struct sdhci_host { struct sdhci_chip { struct pci_dev *pdev; - unsigned long quirks; - int num_slots; /* Slots on controller */ struct sdhci_host *hosts[0]; /* Pointers to hosts */ }; diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index c351c6d1a..8167332d4 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c @@ -21,6 +21,7 @@ * - On APIC systems the FIFO empty interrupt is sometimes lost. */ +#include #include #include #include @@ -41,7 +42,7 @@ #include "wbsd.h" #define DRIVER_NAME "wbsd" -#define DRIVER_VERSION "1.6" +#define DRIVER_VERSION "1.5" #define DBG(x...) \ pr_debug(DRIVER_NAME ": " x) @@ -1439,13 +1440,13 @@ static int __devinit wbsd_scan(struct wbsd_host *host) static int __devinit wbsd_request_region(struct wbsd_host *host, int base) { - if (base & 0x7) + if (io & 0x7) return -EINVAL; if (!request_region(base, 8, DRIVER_NAME)) return -EIO; - host->base = base; + host->base = io; return 0; } @@ -1553,7 +1554,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) * Allocate interrupt. */ - ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); + ret = request_irq(irq, wbsd_irq, SA_SHIRQ, DRIVER_NAME, host); if (ret) return ret; @@ -1773,7 +1774,7 @@ static int __devinit wbsd_init(struct device *dev, int base, int irq, int dma, /* * Request resources. */ - ret = wbsd_request_resources(host, base, irq, dma); + ret = wbsd_request_resources(host, io, irq, dma); if (ret) { wbsd_release_resources(host); wbsd_free_mmc(dev); @@ -1861,7 +1862,6 @@ static void __devexit wbsd_shutdown(struct device *dev, int pnp) static int __devinit wbsd_probe(struct platform_device *dev) { - /* Use the module parameters for resources */ return wbsd_init(&dev->dev, io, irq, dma, 0); } diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 1344ad7a4..f6b775e63 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -78,7 +78,7 @@ config MTD_REDBOOT_DIRECTORY_BLOCK option. The option specifies which Flash sectors holds the RedBoot - partition table. A zero or positive value gives an absolute + partition table. A zero or positive value gives an absolete erase block number. A negative value specifies a number of sectors before the end of the device. @@ -86,14 +86,14 @@ config MTD_REDBOOT_DIRECTORY_BLOCK block and "-2" means the penultimate block. config MTD_REDBOOT_PARTS_UNALLOCATED - bool "Include unallocated flash regions" + bool " Include unallocated flash regions" depends on MTD_REDBOOT_PARTS help If you need to register each unallocated flash region as a MTD 'partition', enable this option. config MTD_REDBOOT_PARTS_READONLY - bool "Force read-only for RedBoot system images" + bool " Force read-only for RedBoot system images" depends on MTD_REDBOOT_PARTS help If you need to force read-only for 'RedBoot', 'RedBoot Config' and @@ -103,7 +103,7 @@ config MTD_CMDLINE_PARTS bool "Command line partition table parsing" depends on MTD_PARTITIONS = "y" ---help--- - Allow generic configuration of the MTD partition tables via the kernel + Allow generic configuration of the MTD paritition tables via the kernel command line. Multiple flash resources are supported for hardware where different kinds of flash memory are available. diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig index 6d8f30deb..a7ec5954c 100644 --- a/drivers/mtd/chips/Kconfig +++ b/drivers/mtd/chips/Kconfig @@ -30,6 +30,7 @@ config MTD_JEDECPROBE config MTD_GEN_PROBE tristate + select OBSOLETE_INTERMODULE config MTD_CFI_ADV_OPTIONS bool "Flash chip driver advanced configuration options" diff --git a/drivers/mtd/chips/Makefile b/drivers/mtd/chips/Makefile index 75bc1c2a0..8afe3092c 100644 --- a/drivers/mtd/chips/Makefile +++ b/drivers/mtd/chips/Makefile @@ -3,6 +3,13 @@ # # $Id: Makefile.common,v 1.5 2005/11/07 11:14:22 gleixner Exp $ +# *** BIG UGLY NOTE *** +# +# The removal of get_module_symbol() and replacement with +# inter_module_register() et al has introduced a link order dependency +# here where previously there was none. We now have to ensure that +# the CFI command set drivers are linked before gen_probe.o + obj-$(CONFIG_MTD) += chipreg.o obj-$(CONFIG_MTD_AMDSTD) += amd_flash.o obj-$(CONFIG_MTD_CFI) += cfi_probe.o diff --git a/drivers/mtd/chips/amd_flash.c b/drivers/mtd/chips/amd_flash.c index 16eaca69f..57115618c 100644 --- a/drivers/mtd/chips/amd_flash.c +++ b/drivers/mtd/chips/amd_flash.c @@ -97,6 +97,7 @@ struct amd_flash_private { int interleave; int numchips; unsigned long chipshift; +// const char *im_name; struct flchip chips[0]; }; @@ -130,6 +131,12 @@ static struct mtd_chip_driver amd_flash_chipdrv = { .module = THIS_MODULE }; + + +static const char im_name[] = "amd_flash"; + + + static inline __u32 wide_read(struct map_info *map, __u32 addr) { if (map->buswidth == 1) { @@ -730,7 +737,6 @@ static struct mtd_info *amd_flash_probe(struct map_info *map) offset += dev_size; } mtd->type = MTD_NORFLASH; - mtd->writesize = 1; mtd->flags = MTD_CAP_NORFLASH; mtd->name = map->name; mtd->erase = amd_flash_erase; diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 7ea49a0d5..1c074d63f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -331,6 +331,13 @@ read_pri_intelext(struct map_info *map, __u16 adr) return extp; } +/* This routine is made available to other mtd code via + * inter_module_register. It must only be accessed through + * inter_module_get which will bump the use count of this module. The + * addresses passed back in cfi are valid as long as the use count of + * this module is non-zero, i.e. between inter_module_get and + * inter_module_put. Keith Owens 29 Oct 2000. + */ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) { struct cfi_private *cfi = map->fldrv_priv; @@ -357,7 +364,6 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) mtd->resume = cfi_intelext_resume; mtd->flags = MTD_CAP_NORFLASH; mtd->name = map->name; - mtd->writesize = 1; mtd->reboot_notifier.notifier_call = cfi_intelext_reboot; @@ -400,7 +406,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) for (i=0; i< cfi->numchips; i++) { cfi->chips[i].word_write_time = 1<cfiq->WordWriteTimeoutTyp; cfi->chips[i].buffer_write_time = 1<cfiq->BufWriteTimeoutTyp; - cfi->chips[i].erase_time = 1000<cfiq->BlockEraseTimeoutTyp; + cfi->chips[i].erase_time = 1<cfiq->BlockEraseTimeoutTyp; cfi->chips[i].ref_point_counter = 0; init_waitqueue_head(&(cfi->chips[i].wq)); } @@ -409,11 +415,6 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) return cfi_intelext_setup(mtd); } -struct mtd_info *cfi_cmdset_0003(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001"))); -struct mtd_info *cfi_cmdset_0200(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001"))); -EXPORT_SYMBOL_GPL(cfi_cmdset_0001); -EXPORT_SYMBOL_GPL(cfi_cmdset_0003); -EXPORT_SYMBOL_GPL(cfi_cmdset_0200); static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) { @@ -546,12 +547,12 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, if (extp->MinorVersion >= '4') { struct cfi_intelext_programming_regioninfo *prinfo; prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; - mtd->writesize = cfi->interleave << prinfo->ProgRegShift; + MTD_PROGREGION_SIZE(mtd) = cfi->interleave << prinfo->ProgRegShift; MTD_PROGREGION_CTRLMODE_VALID(mtd) = cfi->interleave * prinfo->ControlValid; MTD_PROGREGION_CTRLMODE_INVALID(mtd) = cfi->interleave * prinfo->ControlInvalid; - mtd->flags &= ~MTD_BIT_WRITEABLE; + mtd->flags |= MTD_PROGRAM_REGIONS; printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", - map->name, mtd->writesize, + map->name, MTD_PROGREGION_SIZE(mtd), MTD_PROGREGION_CTRLMODE_VALID(mtd), MTD_PROGREGION_CTRLMODE_INVALID(mtd)); } @@ -895,33 +896,26 @@ static void __xipram xip_enable(struct map_info *map, struct flchip *chip, /* * When a delay is required for the flash operation to complete, the - * xip_wait_for_operation() function is polling for both the given timeout - * and pending (but still masked) hardware interrupts. Whenever there is an - * interrupt pending then the flash erase or write operation is suspended, - * array mode restored and interrupts unmasked. Task scheduling might also - * happen at that point. The CPU eventually returns from the interrupt or - * the call to schedule() and the suspended flash operation is resumed for - * the remaining of the delay period. + * xip_udelay() function is polling for both the given timeout and pending + * (but still masked) hardware interrupts. Whenever there is an interrupt + * pending then the flash erase or write operation is suspended, array mode + * restored and interrupts unmasked. Task scheduling might also happen at that + * point. The CPU eventually returns from the interrupt or the call to + * schedule() and the suspended flash operation is resumed for the remaining + * of the delay period. * * Warning: this function _will_ fool interrupt latency tracing tools. */ -static int __xipram xip_wait_for_operation( - struct map_info *map, struct flchip *chip, - unsigned long adr, unsigned int chip_op_time ) +static void __xipram xip_udelay(struct map_info *map, struct flchip *chip, + unsigned long adr, int usec) { struct cfi_private *cfi = map->fldrv_priv; struct cfi_pri_intelext *cfip = cfi->cmdset_priv; map_word status, OK = CMD(0x80); - unsigned long usec, suspended, start, done; + unsigned long suspended, start = xip_currtime(); flstate_t oldstate, newstate; - start = xip_currtime(); - usec = chip_op_time * 8; - if (usec == 0) - usec = 500000; - done = 0; - do { cpu_relax(); if (xip_irqpending() && cfip && @@ -938,9 +932,9 @@ static int __xipram xip_wait_for_operation( * we resume the whole thing at once). Yes, it * can happen! */ - usec -= done; map_write(map, CMD(0xb0), adr); map_write(map, CMD(0x70), adr); + usec -= xip_elapsed_since(start); suspended = xip_currtime(); do { if (xip_elapsed_since(suspended) > 100000) { @@ -950,7 +944,7 @@ static int __xipram xip_wait_for_operation( * This is a critical error but there * is not much we can do here. */ - return -EIO; + return; } status = map_read(map, adr); } while (!map_word_andequal(map, status, OK, OK)); @@ -1010,106 +1004,65 @@ static int __xipram xip_wait_for_operation( xip_cpu_idle(); } status = map_read(map, adr); - done = xip_elapsed_since(start); } while (!map_word_andequal(map, status, OK, OK) - && done < usec); - - return (done >= usec) ? -ETIME : 0; + && xip_elapsed_since(start) < usec); } +#define UDELAY(map, chip, adr, usec) xip_udelay(map, chip, adr, usec) + /* * The INVALIDATE_CACHED_RANGE() macro is normally used in parallel while * the flash is actively programming or erasing since we have to poll for * the operation to complete anyway. We can't do that in a generic way with * a XIP setup so do it before the actual flash operation in this case - * and stub it out from INVAL_CACHE_AND_WAIT. + * and stub it out from INVALIDATE_CACHE_UDELAY. */ #define XIP_INVAL_CACHED_RANGE(map, from, size) \ INVALIDATE_CACHED_RANGE(map, from, size) -#define INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, inval_adr, inval_len, usec) \ - xip_wait_for_operation(map, chip, cmd_adr, usec) +#define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec) \ + UDELAY(map, chip, cmd_adr, usec) + +/* + * Extra notes: + * + * Activating this XIP support changes the way the code works a bit. For + * example the code to suspend the current process when concurrent access + * happens is never executed because xip_udelay() will always return with the + * same chip state as it was entered with. This is why there is no care for + * the presence of add_wait_queue() or schedule() calls from within a couple + * xip_disable()'d areas of code, like in do_erase_oneblock for example. + * The queueing and scheduling are always happening within xip_udelay(). + * + * Similarly, get_chip() and put_chip() just happen to always be executed + * with chip->state set to FL_READY (or FL_XIP_WHILE_*) where flash state + * is in array mode, therefore never executing many cases therein and not + * causing any problem with XIP. + */ #else #define xip_disable(map, chip, adr) #define xip_enable(map, chip, adr) #define XIP_INVAL_CACHED_RANGE(x...) -#define INVAL_CACHE_AND_WAIT inval_cache_and_wait_for_operation - -static int inval_cache_and_wait_for_operation( - struct map_info *map, struct flchip *chip, - unsigned long cmd_adr, unsigned long inval_adr, int inval_len, - unsigned int chip_op_time) -{ - struct cfi_private *cfi = map->fldrv_priv; - map_word status, status_OK = CMD(0x80); - int chip_state = chip->state; - unsigned int timeo, sleep_time; - - spin_unlock(chip->mutex); - if (inval_len) - INVALIDATE_CACHED_RANGE(map, inval_adr, inval_len); - spin_lock(chip->mutex); - - /* set our timeout to 8 times the expected delay */ - timeo = chip_op_time * 8; - if (!timeo) - timeo = 500000; - sleep_time = chip_op_time / 2; - - for (;;) { - status = map_read(map, cmd_adr); - if (map_word_andequal(map, status, status_OK, status_OK)) - break; - - if (!timeo) { - map_write(map, CMD(0x70), cmd_adr); - chip->state = FL_STATUS; - return -ETIME; - } - /* OK Still waiting. Drop the lock, wait a while and retry. */ - spin_unlock(chip->mutex); - if (sleep_time >= 1000000/HZ) { - /* - * Half of the normal delay still remaining - * can be performed with a sleeping delay instead - * of busy waiting. - */ - msleep(sleep_time/1000); - timeo -= sleep_time; - sleep_time = 1000000/HZ; - } else { - udelay(1); - cond_resched(); - timeo--; - } - spin_lock(chip->mutex); - - if (chip->state != chip_state) { - /* Someone's suspended the operation: sleep */ - DECLARE_WAITQUEUE(wait, current); - set_current_state(TASK_UNINTERRUPTIBLE); - add_wait_queue(&chip->wq, &wait); - spin_unlock(chip->mutex); - schedule(); - remove_wait_queue(&chip->wq, &wait); - spin_lock(chip->mutex); - } - } - - /* Done and happy. */ - chip->state = FL_STATUS; - return 0; -} +#define UDELAY(map, chip, adr, usec) \ +do { \ + spin_unlock(chip->mutex); \ + cfi_udelay(usec); \ + spin_lock(chip->mutex); \ +} while (0) + +#define INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, adr, len, usec) \ +do { \ + spin_unlock(chip->mutex); \ + INVALIDATE_CACHED_RANGE(map, adr, len); \ + cfi_udelay(usec); \ + spin_lock(chip->mutex); \ +} while (0) #endif -#define WAIT_TIMEOUT(map, chip, adr, udelay) \ - INVAL_CACHE_AND_WAIT(map, chip, adr, 0, 0, udelay); - - static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t adr, size_t len) { unsigned long cmd_addr; @@ -1299,11 +1252,14 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, unsigned long adr, map_word datum, int mode) { struct cfi_private *cfi = map->fldrv_priv; - map_word status, write_cmd; - int ret=0; + map_word status, status_OK, write_cmd; + unsigned long timeo; + int z, ret=0; adr += chip->start; + /* Let's determine those according to the interleave only once */ + status_OK = CMD(0x80); switch (mode) { case FL_WRITING: write_cmd = (cfi->cfiq->P_ID != 0x0200) ? CMD(0x40) : CMD(0x41); @@ -1329,17 +1285,57 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, map_write(map, datum, adr); chip->state = mode; - ret = INVAL_CACHE_AND_WAIT(map, chip, adr, - adr, map_bankwidth(map), - chip->word_write_time); - if (ret) { - xip_enable(map, chip, adr); - printk(KERN_ERR "%s: word write error (status timeout)\n", map->name); - goto out; + INVALIDATE_CACHE_UDELAY(map, chip, adr, + adr, map_bankwidth(map), + chip->word_write_time); + + timeo = jiffies + (HZ/2); + z = 0; + for (;;) { + if (chip->state != mode) { + /* Someone's suspended the write. Sleep */ + DECLARE_WAITQUEUE(wait, current); + + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&chip->wq, &wait); + spin_unlock(chip->mutex); + schedule(); + remove_wait_queue(&chip->wq, &wait); + timeo = jiffies + (HZ / 2); /* FIXME */ + spin_lock(chip->mutex); + continue; + } + + status = map_read(map, adr); + if (map_word_andequal(map, status, status_OK, status_OK)) + break; + + /* OK Still waiting */ + if (time_after(jiffies, timeo)) { + map_write(map, CMD(0x70), adr); + chip->state = FL_STATUS; + xip_enable(map, chip, adr); + printk(KERN_ERR "%s: word write error (status timeout)\n", map->name); + ret = -EIO; + goto out; + } + + /* Latency issues. Drop the lock, wait a while and retry */ + z++; + UDELAY(map, chip, adr, 1); + } + if (!z) { + chip->word_write_time--; + if (!chip->word_write_time) + chip->word_write_time = 1; } + if (z > 1) + chip->word_write_time++; + + /* Done and happy. */ + chip->state = FL_STATUS; /* check for errors */ - status = map_read(map, adr); if (map_word_bitsset(map, status, CMD(0x1a))) { unsigned long chipstatus = MERGESTATUS(status); @@ -1456,9 +1452,9 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, unsigned long *pvec_seek, int len) { struct cfi_private *cfi = map->fldrv_priv; - map_word status, write_cmd, datum; - unsigned long cmd_adr; - int ret, wbufsize, word_gap, words; + map_word status, status_OK, write_cmd, datum; + unsigned long cmd_adr, timeo; + int wbufsize, z, ret=0, word_gap, words; const struct kvec *vec; unsigned long vec_seek; @@ -1467,6 +1463,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, cmd_adr = adr & ~(wbufsize-1); /* Let's determine this according to the interleave only once */ + status_OK = CMD(0x80); write_cmd = (cfi->cfiq->P_ID != 0x0200) ? CMD(0xe8) : CMD(0xe9); spin_lock(chip->mutex); @@ -1480,14 +1477,12 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, ENABLE_VPP(map); xip_disable(map, chip, cmd_adr); - /* §4.8 of the 28FxxxJ3A datasheet says "Any time SR.4 and/or SR.5 is set + /* §4.8 of the 28FxxxJ3A datasheet says "Any time SR.4 and/or SR.5 is set [...], the device will not accept any more Write to Buffer commands". So we must check here and reset those bits if they're set. Otherwise we're just pissing in the wind */ - if (chip->state != FL_STATUS) { + if (chip->state != FL_STATUS) map_write(map, CMD(0x70), cmd_adr); - chip->state = FL_STATUS; - } status = map_read(map, cmd_adr); if (map_word_bitsset(map, status, CMD(0x30))) { xip_enable(map, chip, cmd_adr); @@ -1498,20 +1493,32 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, } chip->state = FL_WRITING_TO_BUFFER; - map_write(map, write_cmd, cmd_adr); - ret = WAIT_TIMEOUT(map, chip, cmd_adr, 0); - if (ret) { - /* Argh. Not ready for write to buffer */ - map_word Xstatus = map_read(map, cmd_adr); - map_write(map, CMD(0x70), cmd_adr); - chip->state = FL_STATUS; + + z = 0; + for (;;) { + map_write(map, write_cmd, cmd_adr); + status = map_read(map, cmd_adr); - map_write(map, CMD(0x50), cmd_adr); - map_write(map, CMD(0x70), cmd_adr); - xip_enable(map, chip, cmd_adr); - printk(KERN_ERR "%s: Chip not ready for buffer write. Xstatus = %lx, status = %lx\n", - map->name, Xstatus.x[0], status.x[0]); - goto out; + if (map_word_andequal(map, status, status_OK, status_OK)) + break; + + UDELAY(map, chip, cmd_adr, 1); + + if (++z > 20) { + /* Argh. Not ready for write to buffer */ + map_word Xstatus; + map_write(map, CMD(0x70), cmd_adr); + chip->state = FL_STATUS; + Xstatus = map_read(map, cmd_adr); + /* Odd. Clear status bits */ + map_write(map, CMD(0x50), cmd_adr); + map_write(map, CMD(0x70), cmd_adr); + xip_enable(map, chip, cmd_adr); + printk(KERN_ERR "%s: Chip not ready for buffer write. status = %lx, Xstatus = %lx\n", + map->name, status.x[0], Xstatus.x[0]); + ret = -EIO; + goto out; + } } /* Figure out the number of words to write */ @@ -1566,19 +1573,56 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, map_write(map, CMD(0xd0), cmd_adr); chip->state = FL_WRITING; - ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, - adr, len, - chip->buffer_write_time); - if (ret) { - map_write(map, CMD(0x70), cmd_adr); - chip->state = FL_STATUS; - xip_enable(map, chip, cmd_adr); - printk(KERN_ERR "%s: buffer write error (status timeout)\n", map->name); - goto out; + INVALIDATE_CACHE_UDELAY(map, chip, cmd_adr, + adr, len, + chip->buffer_write_time); + + timeo = jiffies + (HZ/2); + z = 0; + for (;;) { + if (chip->state != FL_WRITING) { + /* Someone's suspended the write. Sleep */ + DECLARE_WAITQUEUE(wait, current); + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&chip->wq, &wait); + spin_unlock(chip->mutex); + schedule(); + remove_wait_queue(&chip->wq, &wait); + timeo = jiffies + (HZ / 2); /* FIXME */ + spin_lock(chip->mutex); + continue; + } + + status = map_read(map, cmd_adr); + if (map_word_andequal(map, status, status_OK, status_OK)) + break; + + /* OK Still waiting */ + if (time_after(jiffies, timeo)) { + map_write(map, CMD(0x70), cmd_adr); + chip->state = FL_STATUS; + xip_enable(map, chip, cmd_adr); + printk(KERN_ERR "%s: buffer write error (status timeout)\n", map->name); + ret = -EIO; + goto out; + } + + /* Latency issues. Drop the lock, wait a while and retry */ + z++; + UDELAY(map, chip, cmd_adr, 1); } + if (!z) { + chip->buffer_write_time--; + if (!chip->buffer_write_time) + chip->buffer_write_time = 1; + } + if (z > 1) + chip->buffer_write_time++; + + /* Done and happy. */ + chip->state = FL_STATUS; /* check for errors */ - status = map_read(map, cmd_adr); if (map_word_bitsset(map, status, CMD(0x1a))) { unsigned long chipstatus = MERGESTATUS(status); @@ -1649,11 +1693,6 @@ static int cfi_intelext_writev (struct mtd_info *mtd, const struct kvec *vecs, if (chipnum == cfi->numchips) return 0; } - - /* Be nice and reschedule with the chip in a usable state for other - processes. */ - cond_resched(); - } while (len); return 0; @@ -1674,12 +1713,17 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr, int len, void *thunk) { struct cfi_private *cfi = map->fldrv_priv; - map_word status; + map_word status, status_OK; + unsigned long timeo; int retries = 3; - int ret; + DECLARE_WAITQUEUE(wait, current); + int ret = 0; adr += chip->start; + /* Let's determine this according to the interleave only once */ + status_OK = CMD(0x80); + retry: spin_lock(chip->mutex); ret = get_chip(map, chip, adr, FL_ERASING); @@ -1701,15 +1745,48 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, chip->state = FL_ERASING; chip->erase_suspended = 0; - ret = INVAL_CACHE_AND_WAIT(map, chip, adr, - adr, len, - chip->erase_time); - if (ret) { - map_write(map, CMD(0x70), adr); - chip->state = FL_STATUS; - xip_enable(map, chip, adr); - printk(KERN_ERR "%s: block erase error: (status timeout)\n", map->name); - goto out; + INVALIDATE_CACHE_UDELAY(map, chip, adr, + adr, len, + chip->erase_time*1000/2); + + /* FIXME. Use a timer to check this, and return immediately. */ + /* Once the state machine's known to be working I'll do that */ + + timeo = jiffies + (HZ*20); + for (;;) { + if (chip->state != FL_ERASING) { + /* Someone's suspended the erase. Sleep */ + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&chip->wq, &wait); + spin_unlock(chip->mutex); + schedule(); + remove_wait_queue(&chip->wq, &wait); + spin_lock(chip->mutex); + continue; + } + if (chip->erase_suspended) { + /* This erase was suspended and resumed. + Adjust the timeout */ + timeo = jiffies + (HZ*20); /* FIXME */ + chip->erase_suspended = 0; + } + + status = map_read(map, adr); + if (map_word_andequal(map, status, status_OK, status_OK)) + break; + + /* OK Still waiting */ + if (time_after(jiffies, timeo)) { + map_write(map, CMD(0x70), adr); + chip->state = FL_STATUS; + xip_enable(map, chip, adr); + printk(KERN_ERR "%s: block erase error: (status timeout)\n", map->name); + ret = -EIO; + goto out; + } + + /* Latency issues. Drop the lock, wait a while and retry */ + UDELAY(map, chip, adr, 1000000/HZ); } /* We've broken this before. It doesn't hurt to be safe */ @@ -1738,6 +1815,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, ret = -EIO; } else if (chipstatus & 0x20 && retries--) { printk(KERN_DEBUG "block erase failed at 0x%08lx: status 0x%lx. Retrying...\n", adr, chipstatus); + timeo = jiffies + HZ; put_chip(map, chip, adr); spin_unlock(chip->mutex); goto retry; @@ -1843,11 +1921,15 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip { struct cfi_private *cfi = map->fldrv_priv; struct cfi_pri_intelext *extp = cfi->cmdset_priv; - int udelay; + map_word status, status_OK; + unsigned long timeo = jiffies + HZ; int ret; adr += chip->start; + /* Let's determine this according to the interleave only once */ + status_OK = CMD(0x80); + spin_lock(chip->mutex); ret = get_chip(map, chip, adr, FL_LOCKING); if (ret) { @@ -1872,21 +1954,41 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip * If Instant Individual Block Locking supported then no need * to delay. */ - udelay = (!extp || !(extp->FeatureSupport & (1 << 5))) ? 1000000/HZ : 0; - ret = WAIT_TIMEOUT(map, chip, adr, udelay); - if (ret) { - map_write(map, CMD(0x70), adr); - chip->state = FL_STATUS; - xip_enable(map, chip, adr); - printk(KERN_ERR "%s: block unlock error: (status timeout)\n", map->name); - goto out; + if (!extp || !(extp->FeatureSupport & (1 << 5))) + UDELAY(map, chip, adr, 1000000/HZ); + + /* FIXME. Use a timer to check this, and return immediately. */ + /* Once the state machine's known to be working I'll do that */ + + timeo = jiffies + (HZ*20); + for (;;) { + + status = map_read(map, adr); + if (map_word_andequal(map, status, status_OK, status_OK)) + break; + + /* OK Still waiting */ + if (time_after(jiffies, timeo)) { + map_write(map, CMD(0x70), adr); + chip->state = FL_STATUS; + xip_enable(map, chip, adr); + printk(KERN_ERR "%s: block unlock error: (status timeout)\n", map->name); + put_chip(map, chip, adr); + spin_unlock(chip->mutex); + return -EIO; + } + + /* Latency issues. Drop the lock, wait a while and retry */ + UDELAY(map, chip, adr, 1); } + /* Done and happy. */ + chip->state = FL_STATUS; xip_enable(map, chip, adr); -out: put_chip(map, chip, adr); + put_chip(map, chip, adr); spin_unlock(chip->mutex); - return ret; + return 0; } static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len) @@ -2343,8 +2445,28 @@ static void cfi_intelext_destroy(struct mtd_info *mtd) kfree(mtd->eraseregions); } +static char im_name_0001[] = "cfi_cmdset_0001"; +static char im_name_0003[] = "cfi_cmdset_0003"; +static char im_name_0200[] = "cfi_cmdset_0200"; + +static int __init cfi_intelext_init(void) +{ + inter_module_register(im_name_0001, THIS_MODULE, &cfi_cmdset_0001); + inter_module_register(im_name_0003, THIS_MODULE, &cfi_cmdset_0001); + inter_module_register(im_name_0200, THIS_MODULE, &cfi_cmdset_0001); + return 0; +} + +static void __exit cfi_intelext_exit(void) +{ + inter_module_unregister(im_name_0001); + inter_module_unregister(im_name_0003); + inter_module_unregister(im_name_0200); +} + +module_init(cfi_intelext_init); +module_exit(cfi_intelext_exit); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Woodhouse et al."); MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips"); -MODULE_ALIAS("cfi_cmdset_0003"); -MODULE_ALIAS("cfi_cmdset_0200"); diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index a482e8922..aed10bd5c 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include @@ -45,11 +46,9 @@ #define MAX_WORD_RETRIES 3 #define MANUFACTURER_AMD 0x0001 -#define MANUFACTURER_ATMEL 0x001F #define MANUFACTURER_SST 0x00BF #define SST49LF004B 0x0060 #define SST49LF008A 0x005a -#define AT49BV6416 0x00d6 static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *); static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); @@ -70,9 +69,6 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr); #include "fwh_lock.h" -static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len); -static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len); - static struct mtd_chip_driver cfi_amdstd_chipdrv = { .probe = NULL, /* Not usable directly */ .destroy = cfi_amdstd_destroy, @@ -166,26 +162,6 @@ static void fixup_use_write_buffers(struct mtd_info *mtd, void *param) } } -/* Atmel chips don't use the same PRI format as AMD chips */ -static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param) -{ - struct map_info *map = mtd->priv; - struct cfi_private *cfi = map->fldrv_priv; - struct cfi_pri_amdstd *extp = cfi->cmdset_priv; - struct cfi_pri_atmel atmel_pri; - - memcpy(&atmel_pri, extp, sizeof(atmel_pri)); - memset((char *)extp + 5, 0, sizeof(*extp) - 5); - - if (atmel_pri.Features & 0x02) - extp->EraseSuspend = 2; - - if (atmel_pri.BottomBoot) - extp->TopBottom = 2; - else - extp->TopBottom = 3; -} - static void fixup_use_secsi(struct mtd_info *mtd, void *param) { /* Setup for chips with a secsi area */ @@ -204,16 +180,6 @@ static void fixup_use_erase_chip(struct mtd_info *mtd, void *param) } -/* - * Some Atmel chips (e.g. the AT49BV6416) power-up with all sectors - * locked by default. - */ -static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param) -{ - mtd->lock = cfi_atmel_lock; - mtd->unlock = cfi_atmel_unlock; -} - static struct cfi_fixup cfi_fixup_table[] = { #ifdef AMD_BOOTLOC_BUG { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, @@ -227,7 +193,6 @@ static struct cfi_fixup cfi_fixup_table[] = { #if !FORCE_WORD_WRITE { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, #endif - { CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL }, { 0, 0, NULL, NULL } }; static struct cfi_fixup jedec_fixup_table[] = { @@ -243,7 +208,6 @@ static struct cfi_fixup fixup_table[] = { * we know that is the case. */ { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip, NULL }, - { CFI_MFR_ATMEL, AT49BV6416, fixup_use_atmel_lock, NULL }, { 0, 0, NULL, NULL } }; @@ -272,7 +236,6 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) mtd->resume = cfi_amdstd_resume; mtd->flags = MTD_CAP_NORFLASH; mtd->name = map->name; - mtd->writesize = 1; if (cfi->cfi_mode==CFI_MODE_CFI){ unsigned char bootloc; @@ -363,7 +326,7 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) return cfi_amdstd_setup(mtd); } -EXPORT_SYMBOL_GPL(cfi_cmdset_0002); + static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) { @@ -1644,80 +1607,6 @@ static int cfi_amdstd_erase_chip(struct mtd_info *mtd, struct erase_info *instr) return 0; } -static int do_atmel_lock(struct map_info *map, struct flchip *chip, - unsigned long adr, int len, void *thunk) -{ - struct cfi_private *cfi = map->fldrv_priv; - int ret; - - spin_lock(chip->mutex); - ret = get_chip(map, chip, adr + chip->start, FL_LOCKING); - if (ret) - goto out_unlock; - chip->state = FL_LOCKING; - - DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n", - __func__, adr, len); - - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, - cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, - cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, - cfi->device_type, NULL); - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, - cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, - cfi->device_type, NULL); - map_write(map, CMD(0x40), chip->start + adr); - - chip->state = FL_READY; - put_chip(map, chip, adr + chip->start); - ret = 0; - -out_unlock: - spin_unlock(chip->mutex); - return ret; -} - -static int do_atmel_unlock(struct map_info *map, struct flchip *chip, - unsigned long adr, int len, void *thunk) -{ - struct cfi_private *cfi = map->fldrv_priv; - int ret; - - spin_lock(chip->mutex); - ret = get_chip(map, chip, adr + chip->start, FL_UNLOCKING); - if (ret) - goto out_unlock; - chip->state = FL_UNLOCKING; - - DEBUG(MTD_DEBUG_LEVEL3, "MTD %s(): LOCK 0x%08lx len %d\n", - __func__, adr, len); - - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, - cfi->device_type, NULL); - map_write(map, CMD(0x70), adr); - - chip->state = FL_READY; - put_chip(map, chip, adr + chip->start); - ret = 0; - -out_unlock: - spin_unlock(chip->mutex); - return ret; -} - -static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len) -{ - return cfi_varsize_frob(mtd, do_atmel_lock, ofs, len, NULL); -} - -static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) -{ - return cfi_varsize_frob(mtd, do_atmel_unlock, ofs, len, NULL); -} - static void cfi_amdstd_sync (struct mtd_info *mtd) { @@ -1869,6 +1758,25 @@ static void cfi_amdstd_destroy(struct mtd_info *mtd) kfree(mtd->eraseregions); } +static char im_name[]="cfi_cmdset_0002"; + + +static int __init cfi_amdstd_init(void) +{ + inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0002); + return 0; +} + + +static void __exit cfi_amdstd_exit(void) +{ + inter_module_unregister(im_name); +} + + +module_init(cfi_amdstd_init); +module_exit(cfi_amdstd_exit); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Crossnet Co. et al."); MODULE_DESCRIPTION("MTD chip driver for AMD/Fujitsu flash chips"); diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index fae70a5db..0807c1c91 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -162,7 +162,6 @@ struct mtd_info *cfi_cmdset_0020(struct map_info *map, int primary) return cfi_staa_setup(map); } -EXPORT_SYMBOL_GPL(cfi_cmdset_0020); static struct mtd_info *cfi_staa_setup(struct map_info *map) { @@ -238,8 +237,9 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) mtd->unlock = cfi_staa_unlock; mtd->suspend = cfi_staa_suspend; mtd->resume = cfi_staa_resume; - mtd->flags = MTD_CAP_NORFLASH & ~MTD_BIT_WRITEABLE; - mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ + mtd->flags = MTD_CAP_NORFLASH; + mtd->flags |= MTD_ECC; /* FIXME: Not all STMicro flashes have this */ + mtd->eccsize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ map->fldrv = &cfi_staa_chipdrv; __module_get(THIS_MODULE); mtd->name = map->name; @@ -1410,4 +1410,20 @@ static void cfi_staa_destroy(struct mtd_info *mtd) kfree(cfi); } +static char im_name[]="cfi_cmdset_0020"; + +static int __init cfi_staa_init(void) +{ + inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020); + return 0; +} + +static void __exit cfi_staa_exit(void) +{ + inter_module_unregister(im_name); +} + +module_init(cfi_staa_init); +module_exit(cfi_staa_exit); + MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c index 60e11a0ad..e636aa86b 100644 --- a/drivers/mtd/chips/cfi_probe.c +++ b/drivers/mtd/chips/cfi_probe.c @@ -4,6 +4,7 @@ $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $ */ +#include #include #include #include @@ -348,12 +349,12 @@ static void print_cfi_ident(struct cfi_ident *cfip) else printk("No Vpp line\n"); - printk("Typical byte/word write timeout: %d µs\n", 1<WordWriteTimeoutTyp); - printk("Maximum byte/word write timeout: %d µs\n", (1<WordWriteTimeoutMax) * (1<WordWriteTimeoutTyp)); + printk("Typical byte/word write timeout: %d µs\n", 1<WordWriteTimeoutTyp); + printk("Maximum byte/word write timeout: %d µs\n", (1<WordWriteTimeoutMax) * (1<WordWriteTimeoutTyp)); if (cfip->BufWriteTimeoutTyp || cfip->BufWriteTimeoutMax) { - printk("Typical full buffer write timeout: %d µs\n", 1<BufWriteTimeoutTyp); - printk("Maximum full buffer write timeout: %d µs\n", (1<BufWriteTimeoutMax) * (1<BufWriteTimeoutTyp)); + printk("Typical full buffer write timeout: %d µs\n", 1<BufWriteTimeoutTyp); + printk("Maximum full buffer write timeout: %d µs\n", (1<BufWriteTimeoutMax) * (1<BufWriteTimeoutTyp)); } else printk("Full buffer write not supported\n"); diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c index 2174c9754..c2127840a 100644 --- a/drivers/mtd/chips/chipreg.c +++ b/drivers/mtd/chips/chipreg.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c index cdb0f590b..41bd59d20 100644 --- a/drivers/mtd/chips/gen_probe.c +++ b/drivers/mtd/chips/gen_probe.c @@ -37,15 +37,8 @@ struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp) if (!mtd) mtd = check_cmd_set(map, 0); /* Then the secondary */ - if (mtd) { - if (mtd->size > map->size) { - printk(KERN_WARNING "Reducing visibility of %ldKiB chip to %ldKiB\n", - (unsigned long)mtd->size >> 10, - (unsigned long)map->size >> 10); - mtd->size = map->size; - } + if (mtd) return mtd; - } printk(KERN_WARNING"gen_probe: No supported Vendor Command Set found\n"); @@ -107,12 +100,7 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi * Align bitmap storage size to full byte. */ max_chips = map->size >> cfi.chipshift; - if (!max_chips) { - printk(KERN_WARNING "NOR chip too large to fit in mapping. Attempting to cope...\n"); - max_chips = 1; - } - - mapsize = (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG; + mapsize = (max_chips / 8) + ((max_chips % 8) ? 1 : 0); chip_map = kmalloc(mapsize, GFP_KERNEL); if (!chip_map) { printk(KERN_WARNING "%s: kmalloc failed for CFI chip map\n", map->name); @@ -206,28 +194,25 @@ static inline struct mtd_info *cfi_cmdset_unknown(struct map_info *map, { struct cfi_private *cfi = map->fldrv_priv; __u16 type = primary?cfi->cfiq->P_ID:cfi->cfiq->A_ID; -#ifdef CONFIG_MODULES - char probename[16+sizeof(MODULE_SYMBOL_PREFIX)]; +#if defined(CONFIG_MODULES) && defined(HAVE_INTER_MODULE) + char probename[32]; cfi_cmdset_fn_t *probe_function; - sprintf(probename, MODULE_SYMBOL_PREFIX "cfi_cmdset_%4.4X", type); + sprintf(probename, "cfi_cmdset_%4.4X", type); - probe_function = __symbol_get(probename); - if (!probe_function) { - request_module(probename + sizeof(MODULE_SYMBOL_PREFIX) - 1); - probe_function = __symbol_get(probename); - } + probe_function = inter_module_get_request(probename, probename); if (probe_function) { struct mtd_info *mtd; mtd = (*probe_function)(map, primary); /* If it was happy, it'll have increased its own use count */ - symbol_put_addr(probe_function); + inter_module_put(probename); return mtd; } #endif - printk(KERN_NOTICE "Support for command set %04X not present\n", type); + printk(KERN_NOTICE "Support for command set %04X not present\n", + type); return NULL; } @@ -241,8 +226,12 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary) return NULL; switch(type){ - /* We need these for the !CONFIG_MODULES case, - because symbol_get() doesn't work there */ + /* Urgh. Ifdefs. The version with weak symbols was + * _much_ nicer. Shame it didn't seem to work on + * anything but x86, really. + * But we can't rely in inter_module_get() because + * that'd mean we depend on link order. + */ #ifdef CONFIG_MTD_CFI_INTELEXT case 0x0001: case 0x0003: @@ -257,9 +246,9 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary) case 0x0020: return cfi_cmdset_0020(map, primary); #endif - default: - return cfi_cmdset_unknown(map, primary); } + + return cfi_cmdset_unknown(map, primary); } MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/chips/jedec.c b/drivers/mtd/chips/jedec.c index 2c3f01919..c40b48dab 100644 --- a/drivers/mtd/chips/jedec.c +++ b/drivers/mtd/chips/jedec.c @@ -256,7 +256,6 @@ static struct mtd_info *jedec_probe(struct map_info *map) MTD->name = map->name; MTD->type = MTD_NORFLASH; MTD->flags = MTD_CAP_NORFLASH; - MTD->writesize = 1; MTD->erasesize = SectorSize*(map->buswidth); // printk("MTD->erasesize is %x\n",(unsigned int)MTD->erasesize); MTD->size = priv->size; diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index 1154dac71..517ea33e7 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c @@ -8,6 +8,7 @@ Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com */ +#include #include #include #include @@ -111,7 +112,6 @@ #define MX29LV040C 0x004F #define MX29LV160T 0x22C4 #define MX29LV160B 0x2249 -#define MX29F040 0x00A4 #define MX29F016 0x00AD #define MX29F002T 0x00B0 #define MX29F004T 0x0045 @@ -1172,19 +1172,6 @@ static const struct amd_flash_info jedec_table[] = { ERASEINFO(0x10000,31) } }, { - .mfr_id = MANUFACTURER_MACRONIX, - .dev_id = MX29F040, - .name = "Macronix MX29F040", - .uaddr = { - [0] = MTD_UADDR_0x0555_0x02AA /* x8 */ - }, - .DevSize = SIZE_512KiB, - .CmdSet = P_ID_AMD_STD, - .NumEraseRegions= 1, - .regions = { - ERASEINFO(0x10000,8), - } - }, { .mfr_id = MANUFACTURER_MACRONIX, .dev_id = MX29F016, .name = "Macronix MX29F016", diff --git a/drivers/mtd/chips/map_absent.c b/drivers/mtd/chips/map_absent.c index ac01a949b..a611de9b1 100644 --- a/drivers/mtd/chips/map_absent.c +++ b/drivers/mtd/chips/map_absent.c @@ -64,8 +64,7 @@ static struct mtd_info *map_absent_probe(struct map_info *map) mtd->write = map_absent_write; mtd->sync = map_absent_sync; mtd->flags = 0; - mtd->erasesize = PAGE_SIZE; - mtd->writesize = 1; + mtd->erasesize = PAGE_SIZE; __module_get(THIS_MODULE); return mtd; diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c index 3a66680ab..bd2e876a8 100644 --- a/drivers/mtd/chips/map_ram.c +++ b/drivers/mtd/chips/map_ram.c @@ -70,8 +70,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map) mtd->read = mapram_read; mtd->write = mapram_write; mtd->sync = mapram_nop; - mtd->flags = MTD_CAP_RAM; - mtd->writesize = 1; + mtd->flags = MTD_CAP_RAM | MTD_VOLATILE; mtd->erasesize = PAGE_SIZE; while(mtd->size & (mtd->erasesize - 1)) diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c index 1b328b137..624c12c23 100644 --- a/drivers/mtd/chips/map_rom.c +++ b/drivers/mtd/chips/map_rom.c @@ -46,8 +46,9 @@ static struct mtd_info *map_rom_probe(struct map_info *map) mtd->write = maprom_write; mtd->sync = maprom_nop; mtd->flags = MTD_CAP_ROM; - mtd->erasesize = map->size; - mtd->writesize = 1; + mtd->erasesize = 131072; + while(mtd->size & (mtd->erasesize - 1)) + mtd->erasesize >>= 1; __module_get(THIS_MODULE); return mtd; diff --git a/drivers/mtd/chips/sharp.c b/drivers/mtd/chips/sharp.c index 967abbecd..3cc0b23c5 100644 --- a/drivers/mtd/chips/sharp.c +++ b/drivers/mtd/chips/sharp.c @@ -140,7 +140,6 @@ static struct mtd_info *sharp_probe(struct map_info *map) mtd->suspend = sharp_suspend; mtd->resume = sharp_resume; mtd->flags = MTD_CAP_NORFLASH; - mtd->writesize = 1; mtd->name = map->name; memset(sharp, 0, sizeof(*sharp)); diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index 16c02b5cc..7fac438b5 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -47,11 +47,6 @@ config MTD_MS02NV accelerator. Say Y here if you have a DECstation 5000/2x0 or a DECsystem 5900 equipped with such a module. - If you want to compile this driver as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read . The module will - be called ms02-nv.o. - config MTD_DATAFLASH tristate "Support for AT45xxx DataFlash" depends on MTD && SPI_MASTER && EXPERIMENTAL @@ -214,6 +209,7 @@ config MTD_DOC2001PLUS config MTD_DOCPROBE tristate select MTD_DOCECC + select OBSOLETE_INTERMODULE config MTD_DOCECC tristate diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile index 0f788d5c4..b65736703 100644 --- a/drivers/mtd/devices/Makefile +++ b/drivers/mtd/devices/Makefile @@ -3,6 +3,13 @@ # # $Id: Makefile.common,v 1.7 2004/12/22 17:51:15 joern Exp $ +# *** BIG UGLY NOTE *** +# +# The removal of get_module_symbol() and replacement with +# inter_module_register() et al has introduced a link order dependency +# here where previously there was none. We now have to ensure that +# doc200[01].o are linked before docprobe.o + obj-$(CONFIG_MTD_DOC2000) += doc2000.o obj-$(CONFIG_MTD_DOC2001) += doc2001.o obj-$(CONFIG_MTD_DOC2001PLUS) += doc2001plus.o diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 401c6a294..4160b8334 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -4,10 +4,11 @@ * block2mtd.c - create an mtd from a block device * * Copyright (C) 2001,2002 Simon Evans - * Copyright (C) 2004-2006 Jörn Engel + * Copyright (C) 2004,2005 Jörn Engel * * Licence: GPL */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #define VERSION "$Revision: 1.30 $" @@ -237,8 +237,6 @@ static int _block2mtd_write(struct block2mtd_dev *dev, const u_char *buf, } return 0; } - - static int block2mtd_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { @@ -302,19 +300,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) /* Get a handle on the device */ bdev = open_bdev_excl(devname, O_RDWR, NULL); -#ifndef MODULE - if (IS_ERR(bdev)) { - - /* We might not have rootfs mounted at this point. Try - to resolve the device name by other means. */ - - dev_t dev = name_to_dev_t(devname); - if (dev != 0) { - bdev = open_by_devnum(dev, FMODE_WRITE | FMODE_READ); - } - } -#endif - if (IS_ERR(bdev)) { ERROR("error: cannot open device %s", devname); goto devinit_err; @@ -339,7 +324,6 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK; dev->mtd.erasesize = erase_size; - dev->mtd.writesize = 1; dev->mtd.type = MTD_RAM; dev->mtd.flags = MTD_CAP_RAM; dev->mtd.erase = block2mtd_erase; @@ -347,6 +331,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size) dev->mtd.writev = default_mtd_writev; dev->mtd.sync = block2mtd_sync; dev->mtd.read = block2mtd_read; + dev->mtd.readv = default_mtd_readv; dev->mtd.priv = dev; dev->mtd.owner = THIS_MODULE; @@ -366,12 +351,6 @@ devinit_err: } -/* This function works similar to reguler strtoul. In addition, it - * allows some suffixes for a more human-readable number format: - * ki, Ki, kiB, KiB - multiply result with 1024 - * Mi, MiB - multiply result with 1024^2 - * Gi, GiB - multiply result with 1024^3 - */ static int ustrtoul(const char *cp, char **endp, unsigned int base) { unsigned long result = simple_strtoul(cp, endp, base); @@ -380,16 +359,11 @@ static int ustrtoul(const char *cp, char **endp, unsigned int base) result *= 1024; case 'M': result *= 1024; - case 'K': case 'k': result *= 1024; /* By dwmw2 editorial decree, "ki", "Mi" or "Gi" are to be used. */ - if ((*endp)[1] == 'i') { - if ((*endp)[2] == 'B') - (*endp) += 3; - else - (*endp) += 2; - } + if ((*endp)[1] == 'i') + (*endp) += 2; } return result; } @@ -409,6 +383,26 @@ static int parse_num(size_t *num, const char *token) } +static int parse_name(char **pname, const char *token, size_t limit) +{ + size_t len; + char *name; + + len = strlen(token) + 1; + if (len > limit) + return -ENOSPC; + + name = kmalloc(len, GFP_KERNEL); + if (!name) + return -ENOMEM; + + strcpy(name, token); + + *pname = name; + return 0; +} + + static inline void kill_final_newline(char *str) { char *newline = strrchr(str, '\n'); @@ -422,16 +416,9 @@ static inline void kill_final_newline(char *str) return 0; \ } while (0) -#ifndef MODULE -static int block2mtd_init_called = 0; -static __initdata char block2mtd_paramline[80 + 12]; /* 80 for device, 12 for erase size */ -#endif - - -static int block2mtd_setup2(const char *val) +static int block2mtd_setup(const char *val, struct kernel_param *kp) { - char buf[80 + 12]; /* 80 for device, 12 for erase size */ - char *str = buf; + char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ char *token[2]; char *name; size_t erase_size = PAGE_SIZE; @@ -443,7 +430,7 @@ static int block2mtd_setup2(const char *val) strcpy(str, val); kill_final_newline(str); - for (i = 0; i < 2; i++) + for (i=0; i<2; i++) token[i] = strsep(&str, ","); if (str) @@ -452,16 +439,18 @@ static int block2mtd_setup2(const char *val) if (!token[0]) parse_err("no argument"); - name = token[0]; - if (strlen(name) + 1 > 80) - parse_err("device name too long"); + ret = parse_name(&name, token[0], 80); + if (ret == -ENOMEM) + parse_err("out of memory"); + if (ret == -ENOSPC) + parse_err("name too long"); + if (ret) + return 0; if (token[1]) { ret = parse_num(&erase_size, token[1]); - if (ret) { - kfree(name); + if (ret) parse_err("illegal erase size"); - } } add_device(name, erase_size); @@ -470,48 +459,13 @@ static int block2mtd_setup2(const char *val) } -static int block2mtd_setup(const char *val, struct kernel_param *kp) -{ -#ifdef MODULE - return block2mtd_setup2(val); -#else - /* If more parameters are later passed in via - /sys/module/block2mtd/parameters/block2mtd - and block2mtd_init() has already been called, - we can parse the argument now. */ - - if (block2mtd_init_called) - return block2mtd_setup2(val); - - /* During early boot stage, we only save the parameters - here. We must parse them later: if the param passed - from kernel boot command line, block2mtd_setup() is - called so early that it is not possible to resolve - the device (even kmalloc() fails). Deter that work to - block2mtd_setup2(). */ - - strlcpy(block2mtd_paramline, val, sizeof(block2mtd_paramline)); - - return 0; -#endif -} - - module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200); MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=[,]\""); static int __init block2mtd_init(void) { - int ret = 0; INFO("version " VERSION); - -#ifndef MODULE - if (strlen(block2mtd_paramline)) - ret = block2mtd_setup2(block2mtd_paramline); - block2mtd_init_called = 1; -#endif - - return ret; + return 0; } diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c index 603a7951a..23e7a5c7d 100644 --- a/drivers/mtd/devices/doc2000.c +++ b/drivers/mtd/devices/doc2000.c @@ -55,10 +55,17 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); +static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); +static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); +static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen, + u_char *eccbuf, struct nand_oobinfo *oobsel); +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, u_char *buf); +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf); static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len, size_t *retlen, const u_char *buf); static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); @@ -510,9 +517,16 @@ static int DoC2k_is_alias(struct DiskOnChip *doc1, struct DiskOnChip *doc2) return retval; } -/* This routine is found from the docprobe code by symbol_get(), - * which will bump the use count of this module. */ -void DoC2k_init(struct mtd_info *mtd) +static const char im_name[] = "DoC2k_init"; + +/* This routine is made available to other mtd code via + * inter_module_register. It must only be accessed through + * inter_module_get which will bump the use count of this module. The + * addresses passed back in mtd are valid as long as the use count of + * this module is non-zero, i.e. between inter_module_get and + * inter_module_put. Keith Owens 29 Oct 2000. + */ +static void DoC2k_init(struct mtd_info *mtd) { struct DiskOnChip *this = mtd->priv; struct DiskOnChip *old = NULL; @@ -572,7 +586,7 @@ void DoC2k_init(struct mtd_info *mtd) mtd->ecctype = MTD_ECC_RS_DiskOnChip; mtd->size = 0; mtd->erasesize = 0; - mtd->writesize = 512; + mtd->oobblock = 512; mtd->oobsize = 16; mtd->owner = THIS_MODULE; mtd->erase = doc_erase; @@ -580,6 +594,9 @@ void DoC2k_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; + mtd->read_ecc = doc_read_ecc; + mtd->write_ecc = doc_write_ecc; + mtd->writev_ecc = doc_writev_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; @@ -606,15 +623,21 @@ void DoC2k_init(struct mtd_info *mtd) return; } } -EXPORT_SYMBOL_GPL(DoC2k_init); static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf) +{ + /* Just a special case of doc_read_ecc */ + return doc_read_ecc(mtd, from, len, retlen, buf, NULL, NULL); +} + +static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel) { struct DiskOnChip *this = mtd->priv; void __iomem *docptr = this->virtadr; struct Nand *mychip; - unsigned char syndrome[6], eccbuf[6]; + unsigned char syndrome[6]; volatile char dummy; int i, len256 = 0, ret=0; size_t left = len; @@ -662,9 +685,15 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, DoC_Address(this, ADDR_COLUMN_PAGE, from, CDSN_CTRL_WP, CDSN_CTRL_ECC_IO); - /* Prime the ECC engine */ - WriteDOC(DOC_ECC_RESET, docptr, ECCConf); - WriteDOC(DOC_ECC_EN, docptr, ECCConf); + if (eccbuf) { + /* Prime the ECC engine */ + WriteDOC(DOC_ECC_RESET, docptr, ECCConf); + WriteDOC(DOC_ECC_EN, docptr, ECCConf); + } else { + /* disable the ECC engine */ + WriteDOC(DOC_ECC_RESET, docptr, ECCConf); + WriteDOC(DOC_ECC_DIS, docptr, ECCConf); + } /* treat crossing 256-byte sector for 2M x 8bits devices */ if (this->page256 && from + len > (from | 0xff) + 1) { @@ -681,59 +710,58 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, /* Let the caller know we completed it */ *retlen += len; - /* Read the ECC data through the DiskOnChip ECC logic */ - /* Note: this will work even with 2M x 8bit devices as */ - /* they have 8 bytes of OOB per 256 page. mf. */ - DoC_ReadBuf(this, eccbuf, 6); - - /* Flush the pipeline */ - if (DoC_is_Millennium(this)) { - dummy = ReadDOC(docptr, ECCConf); - dummy = ReadDOC(docptr, ECCConf); - i = ReadDOC(docptr, ECCConf); - } else { - dummy = ReadDOC(docptr, 2k_ECCStatus); - dummy = ReadDOC(docptr, 2k_ECCStatus); - i = ReadDOC(docptr, 2k_ECCStatus); - } + if (eccbuf) { + /* Read the ECC data through the DiskOnChip ECC logic */ + /* Note: this will work even with 2M x 8bit devices as */ + /* they have 8 bytes of OOB per 256 page. mf. */ + DoC_ReadBuf(this, eccbuf, 6); + + /* Flush the pipeline */ + if (DoC_is_Millennium(this)) { + dummy = ReadDOC(docptr, ECCConf); + dummy = ReadDOC(docptr, ECCConf); + i = ReadDOC(docptr, ECCConf); + } else { + dummy = ReadDOC(docptr, 2k_ECCStatus); + dummy = ReadDOC(docptr, 2k_ECCStatus); + i = ReadDOC(docptr, 2k_ECCStatus); + } - /* Check the ECC Status */ - if (i & 0x80) { - int nb_errors; - /* There was an ECC error */ + /* Check the ECC Status */ + if (i & 0x80) { + int nb_errors; + /* There was an ECC error */ #ifdef ECC_DEBUG - printk(KERN_ERR "DiskOnChip ECC Error: Read at %lx\n", (long)from); + printk(KERN_ERR "DiskOnChip ECC Error: Read at %lx\n", (long)from); #endif - /* Read the ECC syndrom through the DiskOnChip ECC - logic. These syndrome will be all ZERO when there - is no error */ - for (i = 0; i < 6; i++) { - syndrome[i] = - ReadDOC(docptr, ECCSyndrome0 + i); - } - nb_errors = doc_decode_ecc(buf, syndrome); + /* Read the ECC syndrom through the DiskOnChip ECC logic. + These syndrome will be all ZERO when there is no error */ + for (i = 0; i < 6; i++) { + syndrome[i] = + ReadDOC(docptr, ECCSyndrome0 + i); + } + nb_errors = doc_decode_ecc(buf, syndrome); #ifdef ECC_DEBUG - printk(KERN_ERR "Errors corrected: %x\n", nb_errors); + printk(KERN_ERR "Errors corrected: %x\n", nb_errors); #endif - if (nb_errors < 0) { - /* We return error, but have actually done the - read. Not that this can be told to - user-space, via sys_read(), but at least - MTD-aware stuff can know about it by - checking *retlen */ - ret = -EIO; + if (nb_errors < 0) { + /* We return error, but have actually done the read. Not that + this can be told to user-space, via sys_read(), but at least + MTD-aware stuff can know about it by checking *retlen */ + ret = -EIO; + } } - } #ifdef PSYCHO_DEBUG - printk(KERN_DEBUG "ECC DATA at %lxB: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long)from, eccbuf[0], eccbuf[1], eccbuf[2], - eccbuf[3], eccbuf[4], eccbuf[5]); + printk(KERN_DEBUG "ECC DATA at %lxB: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long)from, eccbuf[0], eccbuf[1], eccbuf[2], + eccbuf[3], eccbuf[4], eccbuf[5]); #endif - /* disable the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr , ECCConf); + /* disable the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr , ECCConf); + } /* according to 11.4.1, we need to wait for the busy line * drop if we read to the end of the page. */ @@ -754,11 +782,18 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, size_t * retlen, const u_char * buf) +{ + char eccbuf[6]; + return doc_write_ecc(mtd, to, len, retlen, buf, eccbuf, NULL); +} + +static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf, + u_char * eccbuf, struct nand_oobinfo *oobsel) { struct DiskOnChip *this = mtd->priv; int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */ void __iomem *docptr = this->virtadr; - unsigned char eccbuf[6]; volatile char dummy; int len256 = 0; struct Nand *mychip; @@ -812,9 +847,15 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, DoC_Command(this, NAND_CMD_SEQIN, 0); DoC_Address(this, ADDR_COLUMN_PAGE, to, 0, CDSN_CTRL_ECC_IO); - /* Prime the ECC engine */ - WriteDOC(DOC_ECC_RESET, docptr, ECCConf); - WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, ECCConf); + if (eccbuf) { + /* Prime the ECC engine */ + WriteDOC(DOC_ECC_RESET, docptr, ECCConf); + WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, ECCConf); + } else { + /* disable the ECC engine */ + WriteDOC(DOC_ECC_RESET, docptr, ECCConf); + WriteDOC(DOC_ECC_DIS, docptr, ECCConf); + } /* treat crossing 256-byte sector for 2M x 8bits devices */ if (this->page256 && to + len > (to | 0xff) + 1) { @@ -844,35 +885,39 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, DoC_WriteBuf(this, &buf[len256], len - len256); - WriteDOC(CDSN_CTRL_ECC_IO | CDSN_CTRL_CE, docptr, CDSNControl); - - if (DoC_is_Millennium(this)) { - WriteDOC(0, docptr, NOP); - WriteDOC(0, docptr, NOP); - WriteDOC(0, docptr, NOP); - } else { - WriteDOC_(0, docptr, this->ioreg); - WriteDOC_(0, docptr, this->ioreg); - WriteDOC_(0, docptr, this->ioreg); - } + if (eccbuf) { + WriteDOC(CDSN_CTRL_ECC_IO | CDSN_CTRL_CE, docptr, + CDSNControl); + + if (DoC_is_Millennium(this)) { + WriteDOC(0, docptr, NOP); + WriteDOC(0, docptr, NOP); + WriteDOC(0, docptr, NOP); + } else { + WriteDOC_(0, docptr, this->ioreg); + WriteDOC_(0, docptr, this->ioreg); + WriteDOC_(0, docptr, this->ioreg); + } - WriteDOC(CDSN_CTRL_ECC_IO | CDSN_CTRL_FLASH_IO | CDSN_CTRL_CE, docptr, - CDSNControl); + WriteDOC(CDSN_CTRL_ECC_IO | CDSN_CTRL_FLASH_IO | CDSN_CTRL_CE, docptr, + CDSNControl); - /* Read the ECC data through the DiskOnChip ECC logic */ - for (di = 0; di < 6; di++) { - eccbuf[di] = ReadDOC(docptr, ECCSyndrome0 + di); - } + /* Read the ECC data through the DiskOnChip ECC logic */ + for (di = 0; di < 6; di++) { + eccbuf[di] = ReadDOC(docptr, ECCSyndrome0 + di); + } - /* Reset the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr, ECCConf); + /* Reset the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr, ECCConf); #ifdef PSYCHO_DEBUG - printk - ("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], - eccbuf[4], eccbuf[5]); + printk + ("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], + eccbuf[4], eccbuf[5]); #endif + } + DoC_Command(this, NAND_CMD_PAGEPROG, 0); DoC_Command(this, NAND_CMD_STATUS, CDSN_CTRL_WP); @@ -926,18 +971,72 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, return 0; } -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen, + u_char *eccbuf, struct nand_oobinfo *oobsel) +{ + static char static_buf[512]; + static DEFINE_MUTEX(writev_buf_mutex); + + size_t totretlen = 0; + size_t thisvecofs = 0; + int ret= 0; + + mutex_lock(&writev_buf_mutex); + + while(count) { + size_t thislen, thisretlen; + unsigned char *buf; + + buf = vecs->iov_base + thisvecofs; + thislen = vecs->iov_len - thisvecofs; + + + if (thislen >= 512) { + thislen = thislen & ~(512-1); + thisvecofs += thislen; + } else { + /* Not enough to fill a page. Copy into buf */ + memcpy(static_buf, buf, thislen); + buf = &static_buf[thislen]; + + while(count && thislen < 512) { + vecs++; + count--; + thisvecofs = min((512-thislen), vecs->iov_len); + memcpy(buf, vecs->iov_base, thisvecofs); + thislen += thisvecofs; + buf += thisvecofs; + } + buf = static_buf; + } + if (count && thisvecofs == vecs->iov_len) { + thisvecofs = 0; + vecs++; + count--; + } + ret = doc_write_ecc(mtd, to, thislen, &thisretlen, buf, eccbuf, oobsel); + + totretlen += thisretlen; + + if (ret || thisretlen != thislen) + break; + + to += thislen; + } + + mutex_unlock(&writev_buf_mutex); + *retlen = totretlen; + return ret; +} + + +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t * retlen, u_char * buf) { struct DiskOnChip *this = mtd->priv; int len256 = 0, ret; struct Nand *mychip; - uint8_t *buf = ops->oobbuf; - size_t len = ops->len; - - BUG_ON(ops->mode != MTD_OOB_PLACE); - - ofs += ops->ooboffs; mutex_lock(&this->lock); @@ -978,7 +1077,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, DoC_ReadBuf(this, &buf[len256], len - len256); - ops->retlen = len; + *retlen = len; /* Reading the full OOB data drops us off of the end of the page, * causing the flash device to go into busy mode, so we need * to wait until ready 11.4.1 and Toshiba TC58256FT docs */ @@ -1093,20 +1192,17 @@ static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len, } -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t * retlen, const u_char * buf) { - struct DiskOnChip *this = mtd->priv; - int ret; + struct DiskOnChip *this = mtd->priv; + int ret; - BUG_ON(ops->mode != MTD_OOB_PLACE); - - mutex_lock(&this->lock); - ret = doc_write_oob_nolock(mtd, ofs + ops->ooboffs, ops->len, - &ops->retlen, ops->oobbuf); + mutex_lock(&this->lock); + ret = doc_write_oob_nolock(mtd, ofs, len, retlen, buf); - mutex_unlock(&this->lock); - return ret; + mutex_unlock(&this->lock); + return ret; } static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) @@ -1181,6 +1277,12 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) * ****************************************************************************/ +static int __init init_doc2000(void) +{ + inter_module_register(im_name, THIS_MODULE, &DoC2k_init); + return 0; +} + static void __exit cleanup_doc2000(void) { struct mtd_info *mtd; @@ -1196,9 +1298,11 @@ static void __exit cleanup_doc2000(void) kfree(this->chips); kfree(mtd); } + inter_module_unregister(im_name); } module_exit(cleanup_doc2000); +module_init(init_doc2000); MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Woodhouse et al."); diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c index 0e2a9326f..681a9c73a 100644 --- a/drivers/mtd/devices/doc2001.c +++ b/drivers/mtd/devices/doc2001.c @@ -37,10 +37,16 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); +static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel); +static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel); +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, u_char *buf); +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf); static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); static struct mtd_info *docmillist = NULL; @@ -318,9 +324,16 @@ static int DoCMil_is_alias(struct DiskOnChip *doc1, struct DiskOnChip *doc2) return retval; } -/* This routine is found from the docprobe code by symbol_get(), - * which will bump the use count of this module. */ -void DoCMil_init(struct mtd_info *mtd) +static const char im_name[] = "DoCMil_init"; + +/* This routine is made available to other mtd code via + * inter_module_register. It must only be accessed through + * inter_module_get which will bump the use count of this module. The + * addresses passed back in mtd are valid as long as the use count of + * this module is non-zero, i.e. between inter_module_get and + * inter_module_put. Keith Owens 29 Oct 2000. + */ +static void DoCMil_init(struct mtd_info *mtd) { struct DiskOnChip *this = mtd->priv; struct DiskOnChip *old = NULL; @@ -355,7 +368,7 @@ void DoCMil_init(struct mtd_info *mtd) /* FIXME: erase size is not always 8KiB */ mtd->erasesize = 0x2000; - mtd->writesize = 512; + mtd->oobblock = 512; mtd->oobsize = 16; mtd->owner = THIS_MODULE; mtd->erase = doc_erase; @@ -363,6 +376,8 @@ void DoCMil_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; + mtd->read_ecc = doc_read_ecc; + mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; @@ -386,14 +401,21 @@ void DoCMil_init(struct mtd_info *mtd) return; } } -EXPORT_SYMBOL_GPL(DoCMil_init); static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) +{ + /* Just a special case of doc_read_ecc */ + return doc_read_ecc(mtd, from, len, retlen, buf, NULL, NULL); +} + +static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel) { int i, ret; volatile char dummy; - unsigned char syndrome[6], eccbuf[6]; + unsigned char syndrome[6]; struct DiskOnChip *this = mtd->priv; void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[from >> (this->chipshift)]; @@ -423,9 +445,15 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, DoC_Address(docptr, 3, from, CDSN_CTRL_WP, 0x00); DoC_WaitReady(docptr); - /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ - WriteDOC (DOC_ECC_RESET, docptr, ECCConf); - WriteDOC (DOC_ECC_EN, docptr, ECCConf); + if (eccbuf) { + /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ + WriteDOC (DOC_ECC_RESET, docptr, ECCConf); + WriteDOC (DOC_ECC_EN, docptr, ECCConf); + } else { + /* disable the ECC engine */ + WriteDOC (DOC_ECC_RESET, docptr, ECCConf); + WriteDOC (DOC_ECC_DIS, docptr, ECCConf); + } /* Read the data via the internal pipeline through CDSN IO register, see Pipelined Read Operations 11.3 */ @@ -445,56 +473,58 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, *retlen = len; ret = 0; - /* Read the ECC data from Spare Data Area, - see Reed-Solomon EDC/ECC 11.1 */ - dummy = ReadDOC(docptr, ReadPipeInit); + if (eccbuf) { + /* Read the ECC data from Spare Data Area, + see Reed-Solomon EDC/ECC 11.1 */ + dummy = ReadDOC(docptr, ReadPipeInit); #ifndef USE_MEMCPY - for (i = 0; i < 5; i++) { - /* N.B. you have to increase the source address in this way or the - ECC logic will not work properly */ - eccbuf[i] = ReadDOC(docptr, Mil_CDSN_IO + i); - } + for (i = 0; i < 5; i++) { + /* N.B. you have to increase the source address in this way or the + ECC logic will not work properly */ + eccbuf[i] = ReadDOC(docptr, Mil_CDSN_IO + i); + } #else - memcpy_fromio(eccbuf, docptr + DoC_Mil_CDSN_IO, 5); + memcpy_fromio(eccbuf, docptr + DoC_Mil_CDSN_IO, 5); #endif - eccbuf[5] = ReadDOC(docptr, LastDataRead); + eccbuf[5] = ReadDOC(docptr, LastDataRead); - /* Flush the pipeline */ - dummy = ReadDOC(docptr, ECCConf); - dummy = ReadDOC(docptr, ECCConf); + /* Flush the pipeline */ + dummy = ReadDOC(docptr, ECCConf); + dummy = ReadDOC(docptr, ECCConf); - /* Check the ECC Status */ - if (ReadDOC(docptr, ECCConf) & 0x80) { - int nb_errors; - /* There was an ECC error */ + /* Check the ECC Status */ + if (ReadDOC(docptr, ECCConf) & 0x80) { + int nb_errors; + /* There was an ECC error */ #ifdef ECC_DEBUG - printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); + printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); #endif - /* Read the ECC syndrom through the DiskOnChip ECC logic. - These syndrome will be all ZERO when there is no error */ - for (i = 0; i < 6; i++) { - syndrome[i] = ReadDOC(docptr, ECCSyndrome0 + i); - } - nb_errors = doc_decode_ecc(buf, syndrome); + /* Read the ECC syndrom through the DiskOnChip ECC logic. + These syndrome will be all ZERO when there is no error */ + for (i = 0; i < 6; i++) { + syndrome[i] = ReadDOC(docptr, ECCSyndrome0 + i); + } + nb_errors = doc_decode_ecc(buf, syndrome); #ifdef ECC_DEBUG - printk("ECC Errors corrected: %x\n", nb_errors); + printk("ECC Errors corrected: %x\n", nb_errors); #endif - if (nb_errors < 0) { - /* We return error, but have actually done the read. Not that - this can be told to user-space, via sys_read(), but at least - MTD-aware stuff can know about it by checking *retlen */ - ret = -EIO; + if (nb_errors < 0) { + /* We return error, but have actually done the read. Not that + this can be told to user-space, via sys_read(), but at least + MTD-aware stuff can know about it by checking *retlen */ + ret = -EIO; + } } - } #ifdef PSYCHO_DEBUG - printk("ECC DATA at %lx: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long)from, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], - eccbuf[4], eccbuf[5]); + printk("ECC DATA at %lx: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long)from, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], + eccbuf[4], eccbuf[5]); #endif - /* disable the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr , ECCConf); + /* disable the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr , ECCConf); + } return ret; } @@ -502,8 +532,15 @@ static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, static int doc_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) { - int i,ret = 0; char eccbuf[6]; + return doc_write_ecc(mtd, to, len, retlen, buf, eccbuf, NULL); +} + +static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel) +{ + int i,ret = 0; volatile char dummy; struct DiskOnChip *this = mtd->priv; void __iomem *docptr = this->virtadr; @@ -544,9 +581,15 @@ static int doc_write (struct mtd_info *mtd, loff_t to, size_t len, DoC_Address(docptr, 3, to, 0x00, 0x00); DoC_WaitReady(docptr); - /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ - WriteDOC (DOC_ECC_RESET, docptr, ECCConf); - WriteDOC (DOC_ECC_EN | DOC_ECC_RW, docptr, ECCConf); + if (eccbuf) { + /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ + WriteDOC (DOC_ECC_RESET, docptr, ECCConf); + WriteDOC (DOC_ECC_EN | DOC_ECC_RW, docptr, ECCConf); + } else { + /* disable the ECC engine */ + WriteDOC (DOC_ECC_RESET, docptr, ECCConf); + WriteDOC (DOC_ECC_DIS, docptr, ECCConf); + } /* Write the data via the internal pipeline through CDSN IO register, see Pipelined Write Operations 11.2 */ @@ -561,44 +604,46 @@ static int doc_write (struct mtd_info *mtd, loff_t to, size_t len, #endif WriteDOC(0x00, docptr, WritePipeTerm); - /* Write ECC data to flash, the ECC info is generated by the DiskOnChip ECC logic - see Reed-Solomon EDC/ECC 11.1 */ - WriteDOC(0, docptr, NOP); - WriteDOC(0, docptr, NOP); - WriteDOC(0, docptr, NOP); + if (eccbuf) { + /* Write ECC data to flash, the ECC info is generated by the DiskOnChip ECC logic + see Reed-Solomon EDC/ECC 11.1 */ + WriteDOC(0, docptr, NOP); + WriteDOC(0, docptr, NOP); + WriteDOC(0, docptr, NOP); - /* Read the ECC data through the DiskOnChip ECC logic */ - for (i = 0; i < 6; i++) { - eccbuf[i] = ReadDOC(docptr, ECCSyndrome0 + i); - } + /* Read the ECC data through the DiskOnChip ECC logic */ + for (i = 0; i < 6; i++) { + eccbuf[i] = ReadDOC(docptr, ECCSyndrome0 + i); + } - /* ignore the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr , ECCConf); + /* ignore the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr , ECCConf); #ifndef USE_MEMCPY - /* Write the ECC data to flash */ - for (i = 0; i < 6; i++) { - /* N.B. you have to increase the source address in this way or the - ECC logic will not work properly */ - WriteDOC(eccbuf[i], docptr, Mil_CDSN_IO + i); - } + /* Write the ECC data to flash */ + for (i = 0; i < 6; i++) { + /* N.B. you have to increase the source address in this way or the + ECC logic will not work properly */ + WriteDOC(eccbuf[i], docptr, Mil_CDSN_IO + i); + } #else - memcpy_toio(docptr + DoC_Mil_CDSN_IO, eccbuf, 6); + memcpy_toio(docptr + DoC_Mil_CDSN_IO, eccbuf, 6); #endif - /* write the block status BLOCK_USED (0x5555) at the end of ECC data - FIXME: this is only a hack for programming the IPL area for LinuxBIOS - and should be replace with proper codes in user space utilities */ - WriteDOC(0x55, docptr, Mil_CDSN_IO); - WriteDOC(0x55, docptr, Mil_CDSN_IO + 1); + /* write the block status BLOCK_USED (0x5555) at the end of ECC data + FIXME: this is only a hack for programming the IPL area for LinuxBIOS + and should be replace with proper codes in user space utilities */ + WriteDOC(0x55, docptr, Mil_CDSN_IO); + WriteDOC(0x55, docptr, Mil_CDSN_IO + 1); - WriteDOC(0x00, docptr, WritePipeTerm); + WriteDOC(0x00, docptr, WritePipeTerm); #ifdef PSYCHO_DEBUG - printk("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], - eccbuf[4], eccbuf[5]); + printk("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], + eccbuf[4], eccbuf[5]); #endif + } /* Commit the Page Program command and wait for ready see Software Requirement 11.4 item 1.*/ @@ -625,8 +670,8 @@ static int doc_write (struct mtd_info *mtd, loff_t to, size_t len, return ret; } -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, u_char *buf) { #ifndef USE_MEMCPY int i; @@ -635,12 +680,6 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, struct DiskOnChip *this = mtd->priv; void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; - uint8_t *buf = ops->oobbuf; - size_t len = ops->len; - - BUG_ON(ops->mode != MTD_OOB_PLACE); - - ofs += ops->ooboffs; /* Find the chip which is to be used and select it */ if (this->curfloor != mychip->floor) { @@ -677,13 +716,13 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, #endif buf[len - 1] = ReadDOC(docptr, LastDataRead); - ops->retlen = len; + *retlen = len; return 0; } -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf) { #ifndef USE_MEMCPY int i; @@ -693,12 +732,6 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, struct DiskOnChip *this = mtd->priv; void __iomem *docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; - uint8_t *buf = ops->oobbuf; - size_t len = ops->len; - - BUG_ON(ops->mode != MTD_OOB_PLACE); - - ofs += ops->ooboffs; /* Find the chip which is to be used and select it */ if (this->curfloor != mychip->floor) { @@ -750,12 +783,12 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, if (ReadDOC(docptr, Mil_CDSN_IO) & 1) { printk("Error programming oob data\n"); /* FIXME: implement Bad Block Replacement (in nftl.c ??) */ - ops->retlen = 0; + *retlen = 0; ret = -EIO; } dummy = ReadDOC(docptr, LastDataRead); - ops->retlen = len; + *retlen = len; return ret; } @@ -823,6 +856,12 @@ int doc_erase (struct mtd_info *mtd, struct erase_info *instr) * ****************************************************************************/ +static int __init init_doc2001(void) +{ + inter_module_register(im_name, THIS_MODULE, &DoCMil_init); + return 0; +} + static void __exit cleanup_doc2001(void) { struct mtd_info *mtd; @@ -838,9 +877,11 @@ static void __exit cleanup_doc2001(void) kfree(this->chips); kfree(mtd); } + inter_module_unregister(im_name); } module_exit(cleanup_doc2001); +module_init(init_doc2001); MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Woodhouse et al."); diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c index 92dbb47f2..5f57f29ef 100644 --- a/drivers/mtd/devices/doc2001plus.c +++ b/drivers/mtd/devices/doc2001plus.c @@ -41,10 +41,16 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops); +static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel); +static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel); +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, u_char *buf); +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf); static int doc_erase (struct mtd_info *mtd, struct erase_info *instr); static struct mtd_info *docmilpluslist = NULL; @@ -441,9 +447,16 @@ static int DoCMilPlus_is_alias(struct DiskOnChip *doc1, struct DiskOnChip *doc2) return retval; } -/* This routine is found from the docprobe code by symbol_get(), - * which will bump the use count of this module. */ -void DoCMilPlus_init(struct mtd_info *mtd) +static const char im_name[] = "DoCMilPlus_init"; + +/* This routine is made available to other mtd code via + * inter_module_register. It must only be accessed through + * inter_module_get which will bump the use count of this module. The + * addresses passed back in mtd are valid as long as the use count of + * this module is non-zero, i.e. between inter_module_get and + * inter_module_put. Keith Owens 29 Oct 2000. + */ +static void DoCMilPlus_init(struct mtd_info *mtd) { struct DiskOnChip *this = mtd->priv; struct DiskOnChip *old = NULL; @@ -477,7 +490,7 @@ void DoCMilPlus_init(struct mtd_info *mtd) mtd->size = 0; mtd->erasesize = 0; - mtd->writesize = 512; + mtd->oobblock = 512; mtd->oobsize = 16; mtd->owner = THIS_MODULE; mtd->erase = doc_erase; @@ -485,6 +498,8 @@ void DoCMilPlus_init(struct mtd_info *mtd) mtd->unpoint = NULL; mtd->read = doc_read; mtd->write = doc_write; + mtd->read_ecc = doc_read_ecc; + mtd->write_ecc = doc_write_ecc; mtd->read_oob = doc_read_oob; mtd->write_oob = doc_write_oob; mtd->sync = NULL; @@ -509,7 +524,6 @@ void DoCMilPlus_init(struct mtd_info *mtd) return; } } -EXPORT_SYMBOL_GPL(DoCMilPlus_init); #if 0 static int doc_dumpblk(struct mtd_info *mtd, loff_t from) @@ -588,11 +602,19 @@ static int doc_dumpblk(struct mtd_info *mtd, loff_t from) static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) +{ + /* Just a special case of doc_read_ecc */ + return doc_read_ecc(mtd, from, len, retlen, buf, NULL, NULL); +} + +static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel) { int ret, i; volatile char dummy; loff_t fofs; - unsigned char syndrome[6], eccbuf[6]; + unsigned char syndrome[6]; struct DiskOnChip *this = mtd->priv; void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[from >> (this->chipshift)]; @@ -630,51 +652,56 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, WriteDOC(0, docptr, Mplus_FlashControl); DoC_WaitReady(docptr); - /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ - WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); - WriteDOC(DOC_ECC_EN, docptr, Mplus_ECCConf); + if (eccbuf) { + /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ + WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); + WriteDOC(DOC_ECC_EN, docptr, Mplus_ECCConf); + } else { + /* disable the ECC engine */ + WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); + } /* Let the caller know we completed it */ *retlen = len; - ret = 0; + ret = 0; ReadDOC(docptr, Mplus_ReadPipeInit); ReadDOC(docptr, Mplus_ReadPipeInit); - /* Read the data via the internal pipeline through CDSN IO - register, see Pipelined Read Operations 11.3 */ - MemReadDOC(docptr, buf, len); + if (eccbuf) { + /* Read the data via the internal pipeline through CDSN IO + register, see Pipelined Read Operations 11.3 */ + MemReadDOC(docptr, buf, len); - /* Read the ECC data following raw data */ - MemReadDOC(docptr, eccbuf, 4); - eccbuf[4] = ReadDOC(docptr, Mplus_LastDataRead); - eccbuf[5] = ReadDOC(docptr, Mplus_LastDataRead); + /* Read the ECC data following raw data */ + MemReadDOC(docptr, eccbuf, 4); + eccbuf[4] = ReadDOC(docptr, Mplus_LastDataRead); + eccbuf[5] = ReadDOC(docptr, Mplus_LastDataRead); - /* Flush the pipeline */ - dummy = ReadDOC(docptr, Mplus_ECCConf); - dummy = ReadDOC(docptr, Mplus_ECCConf); + /* Flush the pipeline */ + dummy = ReadDOC(docptr, Mplus_ECCConf); + dummy = ReadDOC(docptr, Mplus_ECCConf); - /* Check the ECC Status */ - if (ReadDOC(docptr, Mplus_ECCConf) & 0x80) { - int nb_errors; - /* There was an ECC error */ + /* Check the ECC Status */ + if (ReadDOC(docptr, Mplus_ECCConf) & 0x80) { + int nb_errors; + /* There was an ECC error */ #ifdef ECC_DEBUG - printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); + printk("DiskOnChip ECC Error: Read at %lx\n", (long)from); #endif - /* Read the ECC syndrom through the DiskOnChip ECC logic. - These syndrome will be all ZERO when there is no error */ - for (i = 0; i < 6; i++) - syndrome[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); + /* Read the ECC syndrom through the DiskOnChip ECC logic. + These syndrome will be all ZERO when there is no error */ + for (i = 0; i < 6; i++) + syndrome[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); - nb_errors = doc_decode_ecc(buf, syndrome); + nb_errors = doc_decode_ecc(buf, syndrome); #ifdef ECC_DEBUG - printk("ECC Errors corrected: %x\n", nb_errors); + printk("ECC Errors corrected: %x\n", nb_errors); #endif - if (nb_errors < 0) { - /* We return error, but have actually done the - read. Not that this can be told to user-space, via - sys_read(), but at least MTD-aware stuff can know - about it by checking *retlen */ + if (nb_errors < 0) { + /* We return error, but have actually done the read. Not that + this can be told to user-space, via sys_read(), but at least + MTD-aware stuff can know about it by checking *retlen */ #ifdef ECC_DEBUG printk("%s(%d): Millennium Plus ECC error (from=0x%x:\n", __FILE__, __LINE__, (int)from); @@ -688,16 +715,24 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, eccbuf[3], eccbuf[4], eccbuf[5]); #endif ret = -EIO; + } } - } #ifdef PSYCHO_DEBUG - printk("ECC DATA at %lx: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long)from, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], - eccbuf[4], eccbuf[5]); + printk("ECC DATA at %lx: %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long)from, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], + eccbuf[4], eccbuf[5]); #endif - /* disable the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr , Mplus_ECCConf); + + /* disable the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr , Mplus_ECCConf); + } else { + /* Read the data via the internal pipeline through CDSN IO + register, see Pipelined Read Operations 11.3 */ + MemReadDOC(docptr, buf, len-2); + buf[len-2] = ReadDOC(docptr, Mplus_LastDataRead); + buf[len-1] = ReadDOC(docptr, Mplus_LastDataRead); + } /* Disable flash internally */ WriteDOC(0, docptr, Mplus_FlashSelect); @@ -707,11 +742,18 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) +{ + char eccbuf[6]; + return doc_write_ecc(mtd, to, len, retlen, buf, eccbuf, NULL); +} + +static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, u_char *eccbuf, + struct nand_oobinfo *oobsel) { int i, before, ret = 0; loff_t fto; volatile char dummy; - char eccbuf[6]; struct DiskOnChip *this = mtd->priv; void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[to >> (this->chipshift)]; @@ -761,42 +803,46 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, /* Disable the ECC engine */ WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); - if (before) { - /* Write the block status BLOCK_USED (0x5555) */ - WriteDOC(0x55, docptr, Mil_CDSN_IO); - WriteDOC(0x55, docptr, Mil_CDSN_IO); - } + if (eccbuf) { + if (before) { + /* Write the block status BLOCK_USED (0x5555) */ + WriteDOC(0x55, docptr, Mil_CDSN_IO); + WriteDOC(0x55, docptr, Mil_CDSN_IO); + } - /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ - WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, Mplus_ECCConf); + /* init the ECC engine, see Reed-Solomon EDC/ECC 11.1 .*/ + WriteDOC(DOC_ECC_EN | DOC_ECC_RW, docptr, Mplus_ECCConf); + } MemWriteDOC(docptr, (unsigned char *) buf, len); - /* Write ECC data to flash, the ECC info is generated by - the DiskOnChip ECC logic see Reed-Solomon EDC/ECC 11.1 */ - DoC_Delay(docptr, 3); + if (eccbuf) { + /* Write ECC data to flash, the ECC info is generated by + the DiskOnChip ECC logic see Reed-Solomon EDC/ECC 11.1 */ + DoC_Delay(docptr, 3); - /* Read the ECC data through the DiskOnChip ECC logic */ - for (i = 0; i < 6; i++) - eccbuf[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); + /* Read the ECC data through the DiskOnChip ECC logic */ + for (i = 0; i < 6; i++) + eccbuf[i] = ReadDOC(docptr, Mplus_ECCSyndrome0 + i); - /* disable the ECC engine */ - WriteDOC(DOC_ECC_DIS, docptr, Mplus_ECCConf); + /* disable the ECC engine */ + WriteDOC(DOC_ECC_DIS, docptr, Mplus_ECCConf); - /* Write the ECC data to flash */ - MemWriteDOC(docptr, eccbuf, 6); + /* Write the ECC data to flash */ + MemWriteDOC(docptr, eccbuf, 6); - if (!before) { - /* Write the block status BLOCK_USED (0x5555) */ - WriteDOC(0x55, docptr, Mil_CDSN_IO+6); - WriteDOC(0x55, docptr, Mil_CDSN_IO+7); - } + if (!before) { + /* Write the block status BLOCK_USED (0x5555) */ + WriteDOC(0x55, docptr, Mil_CDSN_IO+6); + WriteDOC(0x55, docptr, Mil_CDSN_IO+7); + } #ifdef PSYCHO_DEBUG - printk("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", - (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], - eccbuf[4], eccbuf[5]); + printk("OOB data at %lx is %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X\n", + (long) to, eccbuf[0], eccbuf[1], eccbuf[2], eccbuf[3], + eccbuf[4], eccbuf[5]); #endif + } WriteDOC(0x00, docptr, Mplus_WritePipeTerm); WriteDOC(0x00, docptr, Mplus_WritePipeTerm); @@ -830,20 +876,14 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, return ret; } -static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, u_char *buf) { loff_t fofs, base; struct DiskOnChip *this = mtd->priv; void __iomem * docptr = this->virtadr; struct Nand *mychip = &this->chips[ofs >> this->chipshift]; size_t i, size, got, want; - uint8_t *buf = ops->oobbuf; - size_t len = ops->len; - - BUG_ON(ops->mode != MTD_OOB_PLACE); - - ofs += ops->ooboffs; DoC_CheckASIC(docptr); @@ -909,12 +949,12 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, /* Disable flash internally */ WriteDOC(0, docptr, Mplus_FlashSelect); - ops->retlen = len; + *retlen = len; return 0; } -static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, - struct mtd_oob_ops *ops) +static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, + size_t *retlen, const u_char *buf) { volatile char dummy; loff_t fofs, base; @@ -923,12 +963,6 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, struct Nand *mychip = &this->chips[ofs >> this->chipshift]; size_t i, size, got, want; int ret = 0; - uint8_t *buf = ops->oobbuf; - size_t len = ops->len; - - BUG_ON(ops->mode != MTD_OOB_PLACE); - - ofs += ops->ooboffs; DoC_CheckASIC(docptr); @@ -1004,7 +1038,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, printk("MTD: Error 0x%x programming oob at 0x%x\n", dummy, (int)ofs); /* FIXME: implement Bad Block Replacement */ - ops->retlen = 0; + *retlen = 0; ret = -EIO; } dummy = ReadDOC(docptr, Mplus_LastDataRead); @@ -1017,7 +1051,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, /* Disable flash internally */ WriteDOC(0, docptr, Mplus_FlashSelect); - ops->retlen = len; + *retlen = len; return ret; } @@ -1088,6 +1122,12 @@ int doc_erase(struct mtd_info *mtd, struct erase_info *instr) * ****************************************************************************/ +static int __init init_doc2001plus(void) +{ + inter_module_register(im_name, THIS_MODULE, &DoCMilPlus_init); + return 0; +} + static void __exit cleanup_doc2001plus(void) { struct mtd_info *mtd; @@ -1103,9 +1143,11 @@ static void __exit cleanup_doc2001plus(void) kfree(this->chips); kfree(mtd); } + inter_module_unregister(im_name); } module_exit(cleanup_doc2001plus); +module_init(init_doc2001plus); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Greg Ungerer et al."); diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c index 78872c3f3..13178b9dd 100644 --- a/drivers/mtd/devices/docprobe.c +++ b/drivers/mtd/devices/docprobe.c @@ -40,6 +40,7 @@ */ #define DOC_SINGLE_DRIVER +#include #include #include #include @@ -230,10 +231,6 @@ static inline int __init doccheck(void __iomem *potential, unsigned long physadr static int docfound; -extern void DoC2k_init(struct mtd_info *); -extern void DoCMil_init(struct mtd_info *); -extern void DoCMilPlus_init(struct mtd_info *); - static void __init DoC_Probe(unsigned long physadr) { void __iomem *docptr; @@ -242,6 +239,8 @@ static void __init DoC_Probe(unsigned long physadr) int ChipID; char namebuf[15]; char *name = namebuf; + char *im_funcname = NULL; + char *im_modname = NULL; void (*initroutine)(struct mtd_info *) = NULL; docptr = ioremap(physadr, DOC_IOREMAP_LEN); @@ -279,33 +278,41 @@ static void __init DoC_Probe(unsigned long physadr) switch(ChipID) { case DOC_ChipID_Doc2kTSOP: name="2000 TSOP"; - initroutine = symbol_request(DoC2k_init); + im_funcname = "DoC2k_init"; + im_modname = "doc2000"; break; case DOC_ChipID_Doc2k: name="2000"; - initroutine = symbol_request(DoC2k_init); + im_funcname = "DoC2k_init"; + im_modname = "doc2000"; break; case DOC_ChipID_DocMil: name="Millennium"; #ifdef DOC_SINGLE_DRIVER - initroutine = symbol_request(DoC2k_init); + im_funcname = "DoC2k_init"; + im_modname = "doc2000"; #else - initroutine = symbol_request(DoCMil_init); + im_funcname = "DoCMil_init"; + im_modname = "doc2001"; #endif /* DOC_SINGLE_DRIVER */ break; case DOC_ChipID_DocMilPlus16: case DOC_ChipID_DocMilPlus32: name="MillenniumPlus"; - initroutine = symbol_request(DoCMilPlus_init); + im_funcname = "DoCMilPlus_init"; + im_modname = "doc2001plus"; break; } + if (im_funcname) + initroutine = inter_module_get_request(im_funcname, im_modname); + if (initroutine) { (*initroutine)(mtd); - symbol_put_addr(initroutine); + inter_module_put(im_funcname); return; } printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr); diff --git a/drivers/mtd/devices/lart.c b/drivers/mtd/devices/lart.c index 4ea50a1dd..29b0ddaa3 100644 --- a/drivers/mtd/devices/lart.c +++ b/drivers/mtd/devices/lart.c @@ -635,7 +635,6 @@ int __init lart_flash_init (void) printk ("%s: This looks like a LART board to me.\n",module_name); mtd.name = module_name; mtd.type = MTD_NORFLASH; - mtd.writesize = 1; mtd.flags = MTD_CAP_NORFLASH; mtd.size = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM + FLASH_BLOCKSIZE_MAIN * FLASH_NUMBLOCKS_16m_MAIN; mtd.erasesize = FLASH_BLOCKSIZE_MAIN; diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index ef4a731ca..04e65d5da 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -406,13 +406,13 @@ struct flash_info { static struct flash_info __devinitdata m25p_data [] = { /* REVISIT: fill in JEDEC ids, for parts that have them */ - { "m25p05", 0x05, 0x2010, 32 * 1024, 2 }, - { "m25p10", 0x10, 0x2011, 32 * 1024, 4 }, - { "m25p20", 0x11, 0x2012, 64 * 1024, 4 }, - { "m25p40", 0x12, 0x2013, 64 * 1024, 8 }, + { "m25p05", 0x05, 0x0000, 32 * 1024, 2 }, + { "m25p10", 0x10, 0x0000, 32 * 1024, 4 }, + { "m25p20", 0x11, 0x0000, 64 * 1024, 4 }, + { "m25p40", 0x12, 0x0000, 64 * 1024, 8 }, { "m25p80", 0x13, 0x0000, 64 * 1024, 16 }, - { "m25p16", 0x14, 0x2015, 64 * 1024, 32 }, - { "m25p32", 0x15, 0x2016, 64 * 1024, 64 }, + { "m25p16", 0x14, 0x0000, 64 * 1024, 32 }, + { "m25p32", 0x15, 0x0000, 64 * 1024, 64 }, { "m25p64", 0x16, 0x2017, 64 * 1024, 128 }, }; @@ -465,7 +465,6 @@ static int __devinit m25p_probe(struct spi_device *spi) flash->mtd.name = spi->dev.bus_id; flash->mtd.type = MTD_NORFLASH; - flash->mtd.writesize = 1; flash->mtd.flags = MTD_CAP_NORFLASH; flash->mtd.size = info->sector_size * info->n_sectors; flash->mtd.erasesize = info->sector_size; diff --git a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c index 08dfb899b..485f66349 100644 --- a/drivers/mtd/devices/ms02-nv.c +++ b/drivers/mtd/devices/ms02-nv.c @@ -219,13 +219,12 @@ static int __init ms02nv_init_one(ulong addr) mp->uaddr = phys_to_virt(fixaddr); mtd->type = MTD_RAM; - mtd->flags = MTD_CAP_RAM; + mtd->flags = MTD_CAP_RAM | MTD_XIP; mtd->size = fixsize; mtd->name = (char *)ms02nv_name; mtd->owner = THIS_MODULE; mtd->read = ms02nv_read; mtd->write = ms02nv_write; - mtd->writesize = 1; ret = -EIO; if (add_mtd_device(mtd)) { diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 5db716045..a19480d07 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c @@ -9,6 +9,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -477,7 +478,6 @@ add_dataflash(struct spi_device *spi, char *name, device->name = (pdata && pdata->name) ? pdata->name : priv->name; device->size = nr_pages * pagesize; device->erasesize = pagesize; - device->writesize = pagesize; device->owner = THIS_MODULE; device->type = MTD_DATAFLASH; device->flags = MTD_CAP_NORFLASH; diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index e427c82d5..1443117fd 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -105,7 +106,6 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address, mtd->type = MTD_RAM; mtd->flags = MTD_CAP_RAM; mtd->size = size; - mtd->writesize = 1; mtd->erasesize = MTDRAM_ERASE_SIZE; mtd->priv = mapped_address; diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 6c7337f9e..e8685ee6c 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -1,8 +1,8 @@ /** * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $ * - * Copyright (c) ???? Jochen Schäuble - * Copyright (c) 2003-2004 Jörn Engel + * Copyright (c) ???? Jochen Schäuble + * Copyright (c) 2003-2004 Jörn Engel * * Usage: * @@ -142,7 +142,7 @@ static int register_device(char *name, unsigned long start, unsigned long len) new->mtd.name = name; new->mtd.size = len; - new->mtd.flags = MTD_CAP_RAM; + new->mtd.flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE; new->mtd.erase = phram_erase; new->mtd.point = phram_point; new->mtd.unpoint = phram_unpoint; @@ -151,7 +151,6 @@ static int register_device(char *name, unsigned long start, unsigned long len) new->mtd.owner = THIS_MODULE; new->mtd.type = MTD_RAM; new->mtd.erasesize = PAGE_SIZE; - new->mtd.writesize = 1; ret = -EAGAIN; if (add_mtd_device(&new->mtd)) { @@ -267,16 +266,12 @@ static int phram_setup(const char *val, struct kernel_param *kp) return 0; ret = parse_num32(&start, token[1]); - if (ret) { - kfree(name); + if (ret) parse_err("illegal start address\n"); - } ret = parse_num32(&len, token[2]); - if (ret) { - kfree(name); + if (ret) parse_err("illegal device length\n"); - } register_device(name, start, len); @@ -301,5 +296,5 @@ module_init(init_phram); module_exit(cleanup_phram); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Jörn Engel "); +MODULE_AUTHOR("Jörn Engel "); MODULE_DESCRIPTION("MTD driver for physical RAM"); diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index 2c0149708..666cce1bf 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c @@ -82,6 +82,7 @@ * * Comb the init routine. It's still a bit cludgy on a few things. */ +#include #include #include #include @@ -99,6 +100,10 @@ #include #include +#ifndef CONFIG_PCI +#error Enable PCI in your kernel config +#endif + #include #include #include @@ -546,11 +551,11 @@ static u32 fixup_pmc551 (struct pci_dev *dev) /* * Some screen fun */ - printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%llx\n", + printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%lx\n", (size<1024)?size:(size<1048576)?size>>10:size>>20, (size<1024)?'B':(size<1048576)?'K':'M', size, ((dcmd&(0x1<<3)) == 0)?"non-":"", - (unsigned long long)((dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK)); + (dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK ); /* * Check to see the state of the memory @@ -680,8 +685,8 @@ static int __init init_pmc551(void) break; } - printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%llx\n", - (unsigned long long)PCI_Device->resource[0].start); + printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n", + PCI_Device->resource[0].start); /* * The PMC551 device acts VERY weird if you don't init it @@ -773,8 +778,7 @@ static int __init init_pmc551(void) mtd->type = MTD_RAM; mtd->name = "PMC551 RAM board"; mtd->erasesize = 0x10000; - mtd->writesize = 1; - mtd->owner = THIS_MODULE; + mtd->owner = THIS_MODULE; if (add_mtd_device(mtd)) { printk(KERN_NOTICE "pmc551: Failed to register new device\n"); diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 542a0c009..6faee6c69 100644 --- a/drivers/mtd/devices/slram.c +++ b/drivers/mtd/devices/slram.c @@ -200,7 +200,8 @@ static int register_device(char *name, unsigned long start, unsigned long length (*curmtd)->mtdinfo->name = name; (*curmtd)->mtdinfo->size = length; - (*curmtd)->mtdinfo->flags = MTD_CAP_RAM; + (*curmtd)->mtdinfo->flags = MTD_CLEAR_BITS | MTD_SET_BITS | + MTD_WRITEB_WRITEABLE | MTD_VOLATILE | MTD_CAP_RAM; (*curmtd)->mtdinfo->erase = slram_erase; (*curmtd)->mtdinfo->point = slram_point; (*curmtd)->mtdinfo->unpoint = slram_unpoint; @@ -209,7 +210,6 @@ static int register_device(char *name, unsigned long start, unsigned long length (*curmtd)->mtdinfo->owner = THIS_MODULE; (*curmtd)->mtdinfo->type = MTD_RAM; (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; - (*curmtd)->mtdinfo->writesize = 1; if (add_mtd_device((*curmtd)->mtdinfo)) { E("slram: Failed to register new device\n"); diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c index 411653580..a3b924797 100644 --- a/drivers/mtd/inftlcore.c +++ b/drivers/mtd/inftlcore.c @@ -24,6 +24,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -79,12 +79,14 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) inftl->mbd.devnum = -1; inftl->mbd.blksize = 512; inftl->mbd.tr = tr; + memcpy(&inftl->oobinfo, &mtd->oobinfo, sizeof(struct nand_oobinfo)); + inftl->oobinfo.useecc = MTD_NANDECC_PLACEONLY; - if (INFTL_mount(inftl) < 0) { + if (INFTL_mount(inftl) < 0) { printk(KERN_WARNING "INFTL: could not mount device\n"); kfree(inftl); return; - } + } /* OK, it's a new one. Set up all the data structures. */ @@ -149,69 +151,6 @@ static void inftl_remove_dev(struct mtd_blktrans_dev *dev) * Actual INFTL access routines. */ -/* - * Read oob data from flash - */ -int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs & (mtd->writesize - 1); - ops.ooblen = len; - ops.oobbuf = buf; - ops.datbuf = NULL; - ops.len = len; - - res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - -/* - * Write oob data to flash - */ -int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs & (mtd->writesize - 1); - ops.ooblen = len; - ops.oobbuf = buf; - ops.datbuf = NULL; - ops.len = len; - - res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - -/* - * Write data and oob to flash - */ -static int inftl_write(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf, uint8_t *oob) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs; - ops.ooblen = mtd->oobsize; - ops.oobbuf = oob; - ops.datbuf = buf; - ops.len = len; - - res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - /* * INFTL_findfreeblock: Find a free Erase Unit on the INFTL partition. * This function is used when the give Virtual Unit Chain. @@ -259,11 +198,10 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned u16 BlockMap[MAX_SECTORS_PER_UNIT]; unsigned char BlockDeleted[MAX_SECTORS_PER_UNIT]; unsigned int thisEUN, prevEUN, status; - struct mtd_info *mtd = inftl->mbd.mtd; int block, silly; unsigned int targetEUN; struct inftl_oob oob; - size_t retlen; + size_t retlen; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_foldchain(inftl=%p,thisVUC=%d," "pending=%d)\n", inftl, thisVUC, pendingblock); @@ -283,18 +221,18 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned * Scan to find the Erase Unit which holds the actual data for each * 512-byte block within the Chain. */ - silly = MAX_LOOPS; + silly = MAX_LOOPS; while (thisEUN < inftl->nb_blocks) { for (block = 0; block < inftl->EraseSize/SECTORSIZE; block ++) { if ((BlockMap[block] != 0xffff) || BlockDeleted[block]) continue; - if (inftl_read_oob(mtd, (thisEUN * inftl->EraseSize) - + (block * SECTORSIZE), 16, &retlen, - (char *)&oob) < 0) + if (MTD_READOOB(inftl->mbd.mtd, (thisEUN * inftl->EraseSize) + + (block * SECTORSIZE), 16 , &retlen, + (char *)&oob) < 0) status = SECTOR_IGNORE; else - status = oob.b.Status | oob.b.Status1; + status = oob.b.Status | oob.b.Status1; switch(status) { case SECTOR_FREE: @@ -344,31 +282,29 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned continue; } - /* + /* * Copy only in non free block (free blocks can only * happen in case of media errors or deleted blocks). */ - if (BlockMap[block] == BLOCK_NIL) - continue; - - ret = mtd->read(mtd, (inftl->EraseSize * BlockMap[block]) + - (block * SECTORSIZE), SECTORSIZE, &retlen, - movebuf); - if (ret < 0 && ret != -EUCLEAN) { - ret = mtd->read(mtd, - (inftl->EraseSize * BlockMap[block]) + - (block * SECTORSIZE), SECTORSIZE, - &retlen, movebuf); + if (BlockMap[block] == BLOCK_NIL) + continue; + + ret = MTD_READ(inftl->mbd.mtd, (inftl->EraseSize * + BlockMap[block]) + (block * SECTORSIZE), SECTORSIZE, + &retlen, movebuf); + if (ret < 0) { + ret = MTD_READ(inftl->mbd.mtd, (inftl->EraseSize * + BlockMap[block]) + (block * SECTORSIZE), + SECTORSIZE, &retlen, movebuf); if (ret != -EIO) - DEBUG(MTD_DEBUG_LEVEL1, "INFTL: error went " - "away on retry?\n"); - } - memset(&oob, 0xff, sizeof(struct inftl_oob)); - oob.b.Status = oob.b.Status1 = SECTOR_USED; - - inftl_write(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + - (block * SECTORSIZE), SECTORSIZE, &retlen, - movebuf, (char *)&oob); + DEBUG(MTD_DEBUG_LEVEL1, "INFTL: error went " + "away on retry?\n"); + } + memset(&oob, 0xff, sizeof(struct inftl_oob)); + oob.b.Status = oob.b.Status1 = SECTOR_USED; + MTD_WRITEECC(inftl->mbd.mtd, (inftl->EraseSize * targetEUN) + + (block * SECTORSIZE), SECTORSIZE, &retlen, + movebuf, (char *)&oob, &inftl->oobinfo); } /* @@ -393,17 +329,17 @@ static u16 INFTL_foldchain(struct INFTLrecord *inftl, unsigned thisVUC, unsigned if (thisEUN == targetEUN) break; - if (INFTL_formatblock(inftl, thisEUN) < 0) { + if (INFTL_formatblock(inftl, thisEUN) < 0) { /* * Could not erase : mark block as reserved. */ inftl->PUtable[thisEUN] = BLOCK_RESERVED; - } else { + } else { /* Correctly erased : mark it as free */ inftl->PUtable[thisEUN] = BLOCK_FREE; inftl->PUtable[prevEUN] = BLOCK_NIL; inftl->numfreeEUNs++; - } + } } return targetEUN; @@ -479,7 +415,6 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) unsigned int thisVUC = block / (inftl->EraseSize / SECTORSIZE); unsigned int thisEUN, writeEUN, prev_block, status; unsigned long blockofs = (block * SECTORSIZE) & (inftl->EraseSize -1); - struct mtd_info *mtd = inftl->mbd.mtd; struct inftl_oob oob; struct inftl_bci bci; unsigned char anac, nacs, parity; @@ -499,10 +434,10 @@ static inline u16 INFTL_findwriteunit(struct INFTLrecord *inftl, unsigned block) silly = MAX_LOOPS; while (thisEUN <= inftl->lastEUN) { - inftl_read_oob(mtd, (thisEUN * inftl->EraseSize) + - blockofs, 8, &retlen, (char *)&bci); + MTD_READOOB(inftl->mbd.mtd, (thisEUN * inftl->EraseSize) + + blockofs, 8, &retlen, (char *)&bci); - status = bci.Status | bci.Status1; + status = bci.Status | bci.Status1; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: status of block %d in " "EUN %d is %x\n", block , writeEUN, status); @@ -587,8 +522,8 @@ hitused: nacs = 0; thisEUN = inftl->VUtable[thisVUC]; if (thisEUN != BLOCK_NIL) { - inftl_read_oob(mtd, thisEUN * inftl->EraseSize - + 8, 8, &retlen, (char *)&oob.u); + MTD_READOOB(inftl->mbd.mtd, thisEUN * inftl->EraseSize + + 8, 8, &retlen, (char *)&oob.u); anac = oob.u.a.ANAC + 1; nacs = oob.u.a.NACs + 1; } @@ -609,8 +544,8 @@ hitused: oob.u.a.parityPerField = parity; oob.u.a.discarded = 0xaa; - inftl_write_oob(mtd, writeEUN * inftl->EraseSize + 8, 8, - &retlen, (char *)&oob.u); + MTD_WRITEOOB(inftl->mbd.mtd, writeEUN * inftl->EraseSize + 8, 8, + &retlen, (char *)&oob.u); /* Also back up header... */ oob.u.b.virtualUnitNo = cpu_to_le16(thisVUC); @@ -620,8 +555,8 @@ hitused: oob.u.b.parityPerField = parity; oob.u.b.discarded = 0xaa; - inftl_write_oob(mtd, writeEUN * inftl->EraseSize + - SECTORSIZE * 4 + 8, 8, &retlen, (char *)&oob.u); + MTD_WRITEOOB(inftl->mbd.mtd, writeEUN * inftl->EraseSize + + SECTORSIZE * 4 + 8, 8, &retlen, (char *)&oob.u); inftl->PUtable[writeEUN] = inftl->VUtable[thisVUC]; inftl->VUtable[thisVUC] = writeEUN; @@ -641,7 +576,6 @@ hitused: */ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) { - struct mtd_info *mtd = inftl->mbd.mtd; unsigned char BlockUsed[MAX_SECTORS_PER_UNIT]; unsigned char BlockDeleted[MAX_SECTORS_PER_UNIT]; unsigned int thisEUN, status; @@ -672,9 +606,9 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) if (BlockUsed[block] || BlockDeleted[block]) continue; - if (inftl_read_oob(mtd, (thisEUN * inftl->EraseSize) - + (block * SECTORSIZE), 8 , &retlen, - (char *)&bci) < 0) + if (MTD_READOOB(inftl->mbd.mtd, (thisEUN * inftl->EraseSize) + + (block * SECTORSIZE), 8 , &retlen, + (char *)&bci) < 0) status = SECTOR_IGNORE; else status = bci.Status | bci.Status1; @@ -736,12 +670,12 @@ static void INFTL_trydeletechain(struct INFTLrecord *inftl, unsigned thisVUC) DEBUG(MTD_DEBUG_LEVEL3, "Deleting EUN %d from VUC %d\n", thisEUN, thisVUC); - if (INFTL_formatblock(inftl, thisEUN) < 0) { + if (INFTL_formatblock(inftl, thisEUN) < 0) { /* * Could not erase : mark block as reserved. */ inftl->PUtable[thisEUN] = BLOCK_RESERVED; - } else { + } else { /* Correctly erased : mark it as free */ inftl->PUtable[thisEUN] = BLOCK_FREE; inftl->numfreeEUNs++; @@ -763,7 +697,6 @@ static int INFTL_deleteblock(struct INFTLrecord *inftl, unsigned block) { unsigned int thisEUN = inftl->VUtable[block / (inftl->EraseSize / SECTORSIZE)]; unsigned long blockofs = (block * SECTORSIZE) & (inftl->EraseSize - 1); - struct mtd_info *mtd = inftl->mbd.mtd; unsigned int status; int silly = MAX_LOOPS; size_t retlen; @@ -773,8 +706,8 @@ static int INFTL_deleteblock(struct INFTLrecord *inftl, unsigned block) "block=%d)\n", inftl, block); while (thisEUN < inftl->nb_blocks) { - if (inftl_read_oob(mtd, (thisEUN * inftl->EraseSize) + - blockofs, 8, &retlen, (char *)&bci) < 0) + if (MTD_READOOB(inftl->mbd.mtd, (thisEUN * inftl->EraseSize) + + blockofs, 8, &retlen, (char *)&bci) < 0) status = SECTOR_IGNORE; else status = bci.Status | bci.Status1; @@ -808,10 +741,10 @@ foundit: if (thisEUN != BLOCK_NIL) { loff_t ptr = (thisEUN * inftl->EraseSize) + blockofs; - if (inftl_read_oob(mtd, ptr, 8, &retlen, (char *)&bci) < 0) + if (MTD_READOOB(inftl->mbd.mtd, ptr, 8, &retlen, (char *)&bci) < 0) return -EIO; bci.Status = bci.Status1 = SECTOR_DELETED; - if (inftl_write_oob(mtd, ptr, 8, &retlen, (char *)&bci) < 0) + if (MTD_WRITEOOB(inftl->mbd.mtd, ptr, 8, &retlen, (char *)&bci) < 0) return -EIO; INFTL_trydeletechain(inftl, block / (inftl->EraseSize / SECTORSIZE)); } @@ -851,10 +784,9 @@ static int inftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block, memset(&oob, 0xff, sizeof(struct inftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; - - inftl_write(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + - blockofs, SECTORSIZE, &retlen, (char *)buffer, - (char *)&oob); + MTD_WRITEECC(inftl->mbd.mtd, (writeEUN * inftl->EraseSize) + + blockofs, SECTORSIZE, &retlen, (char *)buffer, + (char *)&oob, &inftl->oobinfo); /* * need to write SECTOR_USED flags since they are not written * in mtd_writeecc @@ -872,18 +804,17 @@ static int inftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block, struct INFTLrecord *inftl = (void *)mbd; unsigned int thisEUN = inftl->VUtable[block / (inftl->EraseSize / SECTORSIZE)]; unsigned long blockofs = (block * SECTORSIZE) & (inftl->EraseSize - 1); - struct mtd_info *mtd = inftl->mbd.mtd; - unsigned int status; + unsigned int status; int silly = MAX_LOOPS; - struct inftl_bci bci; + struct inftl_bci bci; size_t retlen; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: inftl_readblock(inftl=%p,block=%ld," "buffer=%p)\n", inftl, block, buffer); while (thisEUN < inftl->nb_blocks) { - if (inftl_read_oob(mtd, (thisEUN * inftl->EraseSize) + - blockofs, 8, &retlen, (char *)&bci) < 0) + if (MTD_READOOB(inftl->mbd.mtd, (thisEUN * inftl->EraseSize) + + blockofs, 8, &retlen, (char *)&bci) < 0) status = SECTOR_IGNORE; else status = bci.Status | bci.Status1; @@ -919,12 +850,10 @@ foundit: /* The requested block is not on the media, return all 0x00 */ memset(buffer, 0, SECTORSIZE); } else { - size_t retlen; + size_t retlen; loff_t ptr = (thisEUN * inftl->EraseSize) + blockofs; - int ret = mtd->read(mtd, ptr, SECTORSIZE, &retlen, buffer); - - /* Handle corrected bit flips gracefully */ - if (ret < 0 && ret != -EUCLEAN) + if (MTD_READ(inftl->mbd.mtd, ptr, SECTORSIZE, &retlen, + buffer)) return -EIO; } return 0; diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index 8f6006f1a..43fdc9433 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c @@ -43,11 +43,6 @@ char inftlmountrev[]="$Revision: 1.18 $"; -extern int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf); -extern int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf); - /* * find_boot_record: Find the INFTL Media Header and its Spare copy which * contains the various device information of the INFTL partition and @@ -62,7 +57,6 @@ static int find_boot_record(struct INFTLrecord *inftl) unsigned int i, block; u8 buf[SECTORSIZE]; struct INFTLMediaHeader *mh = &inftl->MediaHdr; - struct mtd_info *mtd = inftl->mbd.mtd; struct INFTLPartition *ip; size_t retlen; @@ -86,8 +80,8 @@ static int find_boot_record(struct INFTLrecord *inftl) * Check for BNAND header first. Then whinge if it's found * but later checks fail. */ - ret = mtd->read(mtd, block * inftl->EraseSize, - SECTORSIZE, &retlen, buf); + ret = MTD_READ(inftl->mbd.mtd, block * inftl->EraseSize, + SECTORSIZE, &retlen, buf); /* We ignore ret in case the ECC of the MediaHeader is invalid (which is apparently acceptable) */ if (retlen != SECTORSIZE) { @@ -112,9 +106,8 @@ static int find_boot_record(struct INFTLrecord *inftl) } /* To be safer with BIOS, also use erase mark as discriminant */ - if ((ret = inftl_read_oob(mtd, block * inftl->EraseSize + - SECTORSIZE + 8, 8, &retlen, - (char *)&h1) < 0)) { + if ((ret = MTD_READOOB(inftl->mbd.mtd, block * inftl->EraseSize + + SECTORSIZE + 8, 8, &retlen, (char *)&h1) < 0)) { printk(KERN_WARNING "INFTL: ANAND header found at " "0x%x in mtd%d, but OOB data read failed " "(err %d)\n", block * inftl->EraseSize, @@ -130,8 +123,8 @@ static int find_boot_record(struct INFTLrecord *inftl) memcpy(mh, buf, sizeof(struct INFTLMediaHeader)); /* Read the spare media header at offset 4096 */ - mtd->read(mtd, block * inftl->EraseSize + 4096, - SECTORSIZE, &retlen, buf); + MTD_READ(inftl->mbd.mtd, block * inftl->EraseSize + 4096, + SECTORSIZE, &retlen, buf); if (retlen != SECTORSIZE) { printk(KERN_WARNING "INFTL: Unable to read spare " "Media Header\n"); @@ -240,7 +233,7 @@ static int find_boot_record(struct INFTLrecord *inftl) */ instr->addr = ip->Reserved0 * inftl->EraseSize; instr->len = inftl->EraseSize; - mtd->erase(mtd, instr); + MTD_ERASE(inftl->mbd.mtd, instr); } if ((ip->lastUnit - ip->firstUnit + 1) < ip->virtualUnits) { printk(KERN_WARNING "INFTL: Media Header " @@ -357,21 +350,21 @@ static int check_free_sectors(struct INFTLrecord *inftl, unsigned int address, int len, int check_oob) { u8 buf[SECTORSIZE + inftl->mbd.mtd->oobsize]; - struct mtd_info *mtd = inftl->mbd.mtd; size_t retlen; int i; + DEBUG(MTD_DEBUG_LEVEL3, "INFTL: check_free_sectors(inftl=%p," + "address=0x%x,len=%d,check_oob=%d)\n", inftl, + address, len, check_oob); + for (i = 0; i < len; i += SECTORSIZE) { - if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf)) + if (MTD_READECC(inftl->mbd.mtd, address, SECTORSIZE, &retlen, buf, &buf[SECTORSIZE], &inftl->oobinfo) < 0) return -1; if (memcmpb(buf, 0xff, SECTORSIZE) != 0) return -1; if (check_oob) { - if(inftl_read_oob(mtd, address, mtd->oobsize, - &retlen, &buf[SECTORSIZE]) < 0) - return -1; - if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0) + if (memcmpb(buf + SECTORSIZE, 0xff, inftl->mbd.mtd->oobsize) != 0) return -1; } address += SECTORSIZE; @@ -394,7 +387,6 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) size_t retlen; struct inftl_unittail uci; struct erase_info *instr = &inftl->instr; - struct mtd_info *mtd = inftl->mbd.mtd; int physblock; DEBUG(MTD_DEBUG_LEVEL3, "INFTL: INFTL_formatblock(inftl=%p," @@ -412,9 +404,8 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) /* Erase one physical eraseblock at a time, even though the NAND api allows us to group them. This way we if we have a failure, we can mark only the failed block in the bbt. */ - for (physblock = 0; physblock < inftl->EraseSize; - physblock += instr->len, instr->addr += instr->len) { - mtd->erase(inftl->mbd.mtd, instr); + for (physblock = 0; physblock < inftl->EraseSize; physblock += instr->len, instr->addr += instr->len) { + MTD_ERASE(inftl->mbd.mtd, instr); if (instr->state == MTD_ERASE_FAILED) { printk(KERN_WARNING "INFTL: error while formatting block %d\n", @@ -423,10 +414,10 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) } /* - * Check the "freeness" of Erase Unit before updating metadata. - * FixMe: is this check really necessary? Since we have check - * the return code after the erase operation. - */ + * Check the "freeness" of Erase Unit before updating metadata. + * FixMe: is this check really necessary? Since we have check the + * return code after the erase operation. + */ if (check_free_sectors(inftl, instr->addr, instr->len, 1) != 0) goto fail; } @@ -438,7 +429,8 @@ int INFTL_formatblock(struct INFTLrecord *inftl, int block) uci.Reserved[2] = 0; uci.Reserved[3] = 0; instr->addr = block * inftl->EraseSize + SECTORSIZE * 2; - if (inftl_write_oob(mtd, instr->addr + 8, 8, &retlen, (char *)&uci) < 0) + if (MTD_WRITEOOB(inftl->mbd.mtd, instr->addr + + 8, 8, &retlen, (char *)&uci) < 0) goto fail; return 0; fail: @@ -557,7 +549,6 @@ void INFTL_dumpVUchains(struct INFTLrecord *s) int INFTL_mount(struct INFTLrecord *s) { - struct mtd_info *mtd = s->mbd.mtd; unsigned int block, first_block, prev_block, last_block; unsigned int first_logical_block, logical_block, erase_mark; int chain_length, do_format_chain; @@ -616,11 +607,10 @@ int INFTL_mount(struct INFTLrecord *s) break; } - if (inftl_read_oob(mtd, block * s->EraseSize + 8, - 8, &retlen, (char *)&h0) < 0 || - inftl_read_oob(mtd, block * s->EraseSize + - 2 * SECTORSIZE + 8, 8, &retlen, - (char *)&h1) < 0) { + if (MTD_READOOB(s->mbd.mtd, block * s->EraseSize + 8, + 8, &retlen, (char *)&h0) < 0 || + MTD_READOOB(s->mbd.mtd, block * s->EraseSize + + 2 * SECTORSIZE + 8, 8, &retlen, (char *)&h1) < 0) { /* Should never happen? */ do_format_chain++; break; diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 64d1b6a6c..7abd7fee0 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -13,13 +13,13 @@ config MTD_COMPLEX_MAPPINGS config MTD_PHYSMAP tristate "CFI Flash device in physical memory map" - depends on MTD_CFI || MTD_JEDECPROBE || MTD_ROM + depends on MTD_CFI help - This provides a 'mapping' driver which allows the NOR Flash and - ROM driver code to communicate with chips which are mapped - physically into the CPU's memory. You will need to configure - the physical address and size of the flash chips on your - particular board as well as the bus width, either statically + This provides a 'mapping' driver which allows the CFI probe and + command set driver code to communicate with flash chips which + are mapped physically into the CPU's memory. You will need to + configure the physical address and size of the flash chips on + your particular board as well as the bus width, either statically with config options or at run-time. config MTD_PHYSMAP_START @@ -37,7 +37,7 @@ config MTD_PHYSMAP_START config MTD_PHYSMAP_LEN hex "Physical length of flash mapping" depends on MTD_PHYSMAP - default "0" + default "0x4000000" help This is the total length of the mapping of the flash chips on your particular board. If there is space, or aliases, in the @@ -78,7 +78,7 @@ config MTD_PNC2000 config MTD_SC520CDP tristate "CFI Flash device mapped on AMD SC520 CDP" - depends on X86 && MTD_CFI && MTD_CONCAT + depends on X86 && MTD_CFI help The SC520 CDP board has two banks of CFI-compliant chips and one Dual-in-line JEDEC chip. This 'mapping' driver supports that @@ -109,7 +109,7 @@ config MTD_TS5500 mtd1 allows you to reprogram your BIOS. BE VERY CAREFUL. Note that jumper 3 ("Write Enable Drive A") must be set - otherwise detection won't succeed. + otherwise detection won't succeeed. config MTD_SBC_GXX tristate "CFI Flash device mapped on Arcom SBC-GXx boards" @@ -200,8 +200,8 @@ config MTD_TSUNAMI Support for the flash chip on Tsunami TIG bus. config MTD_LASAT - tristate "LASAT flash device" - depends on LASAT && MTD_CFI + tristate "Flash chips on LASAT board" + depends on LASAT help Support for the flash chips on the Lasat 100 and 200 boards. @@ -212,7 +212,7 @@ config MTD_NETtel Support for flash chips on NETtel/SecureEdge/SnapGear boards. config MTD_ALCHEMY - tristate "AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support" + tristate ' AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support' depends on SOC_AU1X00 help Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards @@ -561,6 +561,7 @@ config MTD_PCMCIA config MTD_PCMCIA_ANONYMOUS bool "Use PCMCIA MTD drivers for anonymous PCMCIA cards" depends on MTD_PCMCIA + default N help If this option is enabled, PCMCIA cards which do not report anything about themselves are assumed to be MTD cards. diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c index 7fc8097e4..b933a2a27 100644 --- a/drivers/mtd/maps/alchemy-flash.c +++ b/drivers/mtd/maps/alchemy-flash.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 447955be1..c350878d4 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -122,10 +123,9 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, window->rsrc.parent = NULL; printk(KERN_ERR MOD_NAME " %s(): Unable to register resource" - " 0x%.16llx-0x%.16llx - kernel bug?\n", + " 0x%.08lx-0x%.08lx - kernel bug?\n", __func__, - (unsigned long long)window->rsrc.start, - (unsigned long long)window->rsrc.end); + window->rsrc.start, window->rsrc.end); } #if 0 diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index 0402c21e2..5a95ab370 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c @@ -14,6 +14,7 @@ * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/cfi_flagadm.c b/drivers/mtd/maps/cfi_flagadm.c index 92b5d883d..fd0f0d318 100644 --- a/drivers/mtd/maps/cfi_flagadm.c +++ b/drivers/mtd/maps/cfi_flagadm.c @@ -1,5 +1,5 @@ /* - * Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson + * Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson * * $Id: cfi_flagadm.c,v 1.15 2005/11/07 11:14:26 gleixner Exp $ * @@ -135,5 +135,5 @@ module_exit(cleanup_flagadm); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Kári Davíðsson "); +MODULE_AUTHOR("Kári Davíðsson "); MODULE_DESCRIPTION("MTD map driver for Flaga digital module"); diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c index aa56defb9..a370953c1 100644 --- a/drivers/mtd/maps/cstm_mips_ixx.c +++ b/drivers/mtd/maps/cstm_mips_ixx.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) diff --git a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c index 92a9c7fac..652813cd6 100644 --- a/drivers/mtd/maps/dbox2-flash.c +++ b/drivers/mtd/maps/dbox2-flash.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* partition_info gives details on the logical partitions that the split the @@ -121,5 +122,5 @@ module_exit(cleanup_dbox2_flash); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Kári Davíðsson , Bastian Blank , Alexander Wild "); +MODULE_AUTHOR("Kári Davíðsson , Bastian Blank , Alexander Wild "); MODULE_DESCRIPTION("MTD map driver for D-Box 2 board"); diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index b32bb9347..8b3784e2d 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c @@ -7,6 +7,7 @@ * * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c index b1104fe1f..c299d10b3 100644 --- a/drivers/mtd/maps/dilnetpc.c +++ b/drivers/mtd/maps/dilnetpc.c @@ -25,6 +25,7 @@ * and http://www.ssv-embedded.de/ssv/pc104/p170.htm */ +#include #include #include #include diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c index a43c49905..2bb3c0f0f 100644 --- a/drivers/mtd/maps/dmv182.c +++ b/drivers/mtd/maps/dmv182.c @@ -16,6 +16,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c index 641e1dd84..60a6e51d6 100644 --- a/drivers/mtd/maps/ebony.c +++ b/drivers/mtd/maps/ebony.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c index 1c5b97c89..b48a3473f 100644 --- a/drivers/mtd/maps/edb7312.c +++ b/drivers/mtd/maps/edb7312.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_PARTITIONS #include diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 6dde3182d..0667101cc 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c @@ -8,6 +8,7 @@ * 2003 Thomas Gleixner */ +#include #include #include #include diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index db4b570d8..ea5073781 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -176,10 +177,9 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev, window->rsrc.parent = NULL; printk(KERN_DEBUG MOD_NAME ": %s(): Unable to register resource" - " 0x%.16llx-0x%.16llx - kernel bug?\n", + " 0x%.08lx-0x%.08lx - kernel bug?\n", __func__, - (unsigned long long)window->rsrc.start, - (unsigned long long)window->rsrc.end); + window->rsrc.start, window->rsrc.end); } /* Map the firmware hub into my address space. */ diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index a0b4dc715..ba7f40311 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_PARTITIONS #include diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c index c8db01b3e..a3ba52fbd 100644 --- a/drivers/mtd/maps/integrator-flash.c +++ b/drivers/mtd/maps/integrator-flash.c @@ -26,6 +26,7 @@ ======================================================================*/ +#include #include #include #include diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c index f27c13279..b8ccb0a95 100644 --- a/drivers/mtd/maps/ipaq-flash.c +++ b/drivers/mtd/maps/ipaq-flash.c @@ -8,6 +8,7 @@ * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index c26488a17..2c9cc7f37 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c @@ -42,6 +42,7 @@ struct ixp2000_flash_info { struct map_info map; struct mtd_partition *partitions; struct resource *res; + int nr_banks; }; static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long ofs) @@ -182,6 +183,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) */ info->map.phys = NO_XIP; + info->nr_banks = ixp_data->nr_banks; info->map.size = ixp_data->nr_banks * window_size; info->map.bankwidth = 1; diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c index 6b784ef5e..851bf9576 100644 --- a/drivers/mtd/maps/l440gx.c +++ b/drivers/mtd/maps/l440gx.c @@ -13,6 +13,7 @@ #include #include #include +#include #define PIIXE_IOBASE_RESOURCE 11 diff --git a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c index 1c13d2dc0..c658d4045 100644 --- a/drivers/mtd/maps/lasat.c +++ b/drivers/mtd/maps/lasat.c @@ -19,6 +19,7 @@ #include #include #include +#include #include static struct mtd_info *lasat_mtd; diff --git a/drivers/mtd/maps/mpc1211.c b/drivers/mtd/maps/mpc1211.c index 45a00fac8..4685e8e13 100644 --- a/drivers/mtd/maps/mpc1211.c +++ b/drivers/mtd/maps/mpc1211.c @@ -15,6 +15,7 @@ #include #include #include +#include static struct mtd_info *flash_mtd; static struct mtd_partition *parsed_parts; diff --git a/drivers/mtd/maps/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c index d884f2be2..d1e66e186 100644 --- a/drivers/mtd/maps/mtx-1_flash.c +++ b/drivers/mtd/maps/mtx-1_flash.c @@ -4,10 +4,11 @@ * $Id: mtx-1_flash.c,v 1.2 2005/11/07 11:14:27 gleixner Exp $ * * (C) 2005 Bruno Randolf - * (C) 2005 Jörn Engel + * (C) 2005 Jörn Engel * */ +#include #include #include #include diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c index 0994b5b2e..54a3102ab 100644 --- a/drivers/mtd/maps/nettel.c +++ b/drivers/mtd/maps/nettel.c @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include /****************************************************************************/ @@ -190,7 +188,7 @@ int nettel_eraseconfig(void) set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&wait_q, &wait); - ret = mtd->erase(mtd, &nettel_erase); + ret = MTD_ERASE(mtd, &nettel_erase); if (ret) { set_current_state(TASK_RUNNING); remove_wait_queue(&wait_q, &wait); diff --git a/drivers/mtd/maps/ocotea.c b/drivers/mtd/maps/ocotea.c index 2f07602ba..a21fcd195 100644 --- a/drivers/mtd/maps/ocotea.c +++ b/drivers/mtd/maps/ocotea.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/maps/omap-toto-flash.c b/drivers/mtd/maps/omap-toto-flash.c index e6e391efb..dc3765270 100644 --- a/drivers/mtd/maps/omap-toto-flash.c +++ b/drivers/mtd/maps/omap-toto-flash.c @@ -8,6 +8,7 @@ * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index c861134cb..d27f4129a 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c @@ -713,7 +713,6 @@ static void pcmciamtd_detach(struct pcmcia_device *link) if(dev->mtd_info) { del_mtd_device(dev->mtd_info); - map_destroy(dev->mtd_info); info("mtd%d: Removed", dev->mtd_info->index); } diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 7799a25a7..f49ebc3c4 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c @@ -14,228 +14,112 @@ #include #include #include -#include -#include +#include #include #include +#include #include #include -#include - -struct physmap_flash_info { - struct mtd_info *mtd; - struct map_info map; - struct resource *res; -#ifdef CONFIG_MTD_PARTITIONS - int nr_parts; - struct mtd_partition *parts; -#endif -}; +static struct mtd_info *mymtd; -static int physmap_flash_remove(struct platform_device *dev) -{ - struct physmap_flash_info *info; - struct physmap_flash_data *physmap_data; - - info = platform_get_drvdata(dev); - if (info == NULL) - return 0; - platform_set_drvdata(dev, NULL); - - physmap_data = dev->dev.platform_data; +struct map_info physmap_map = { + .name = "phys_mapped_flash", + .phys = CONFIG_MTD_PHYSMAP_START, + .size = CONFIG_MTD_PHYSMAP_LEN, + .bankwidth = CONFIG_MTD_PHYSMAP_BANKWIDTH, +}; - if (info->mtd != NULL) { #ifdef CONFIG_MTD_PARTITIONS - if (info->nr_parts) { - del_mtd_partitions(info->mtd); - kfree(info->parts); - } else if (physmap_data->nr_parts) { - del_mtd_partitions(info->mtd); - } else { - del_mtd_device(info->mtd); - } -#else - del_mtd_device(info->mtd); -#endif - map_destroy(info->mtd); - } +static struct mtd_partition *mtd_parts; +static int mtd_parts_nb; - if (info->map.virt != NULL) - iounmap((void *)info->map.virt); +static int num_physmap_partitions; +static struct mtd_partition *physmap_partitions; - if (info->res != NULL) { - release_resource(info->res); - kfree(info->res); - } +static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL}; - return 0; +void physmap_set_partitions(struct mtd_partition *parts, int num_parts) +{ + physmap_partitions=parts; + num_physmap_partitions=num_parts; } +#endif /* CONFIG_MTD_PARTITIONS */ -static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL }; -#ifdef CONFIG_MTD_PARTITIONS -static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; -#endif - -static int physmap_flash_probe(struct platform_device *dev) +static int __init init_physmap(void) { - struct physmap_flash_data *physmap_data; - struct physmap_flash_info *info; - const char **probe_type; - int err; - - physmap_data = dev->dev.platform_data; - if (physmap_data == NULL) - return -ENODEV; - - printk(KERN_NOTICE "physmap platform flash device: %.8llx at %.8llx\n", - (unsigned long long)dev->resource->end - dev->resource->start + 1, - (unsigned long long)dev->resource->start); - - info = kmalloc(sizeof(struct physmap_flash_info), GFP_KERNEL); - if (info == NULL) { - err = -ENOMEM; - goto err_out; - } - memset(info, 0, sizeof(*info)); + static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL }; + const char **type; - platform_set_drvdata(dev, info); + printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys); + physmap_map.virt = ioremap(physmap_map.phys, physmap_map.size); - info->res = request_mem_region(dev->resource->start, - dev->resource->end - dev->resource->start + 1, - dev->dev.bus_id); - if (info->res == NULL) { - dev_err(&dev->dev, "Could not reserve memory region\n"); - err = -ENOMEM; - goto err_out; + if (!physmap_map.virt) { + printk("Failed to ioremap\n"); + return -EIO; } - info->map.name = dev->dev.bus_id; - info->map.phys = dev->resource->start; - info->map.size = dev->resource->end - dev->resource->start + 1; - info->map.bankwidth = physmap_data->width; - info->map.set_vpp = physmap_data->set_vpp; - - info->map.virt = ioremap(info->map.phys, info->map.size); - if (info->map.virt == NULL) { - dev_err(&dev->dev, "Failed to ioremap flash region\n"); - err = EIO; - goto err_out; - } + simple_map_init(&physmap_map); - simple_map_init(&info->map); - - probe_type = rom_probe_types; - for (; info->mtd == NULL && *probe_type != NULL; probe_type++) - info->mtd = do_map_probe(*probe_type, &info->map); - if (info->mtd == NULL) { - dev_err(&dev->dev, "map_probe failed\n"); - err = -ENXIO; - goto err_out; + mymtd = NULL; + type = rom_probe_types; + for(; !mymtd && *type; type++) { + mymtd = do_map_probe(*type, &physmap_map); } - info->mtd->owner = THIS_MODULE; + if (mymtd) { + mymtd->owner = THIS_MODULE; #ifdef CONFIG_MTD_PARTITIONS - err = parse_mtd_partitions(info->mtd, part_probe_types, &info->parts, 0); - if (err > 0) { - add_mtd_partitions(info->mtd, info->parts, err); - return 0; - } - - if (physmap_data->nr_parts) { - printk(KERN_NOTICE "Using physmap partition information\n"); - add_mtd_partitions(info->mtd, physmap_data->parts, - physmap_data->nr_parts); - return 0; - } -#endif + mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes, + &mtd_parts, 0); - add_mtd_device(info->mtd); - return 0; - -err_out: - physmap_flash_remove(dev); - return err; -} - -static struct platform_driver physmap_flash_driver = { - .probe = physmap_flash_probe, - .remove = physmap_flash_remove, - .driver = { - .name = "physmap-flash", - }, -}; + if (mtd_parts_nb > 0) + { + add_mtd_partitions (mymtd, mtd_parts, mtd_parts_nb); + return 0; + } + if (num_physmap_partitions != 0) + { + printk(KERN_NOTICE + "Using physmap partition definition\n"); + add_mtd_partitions (mymtd, physmap_partitions, num_physmap_partitions); + return 0; + } -#ifdef CONFIG_MTD_PHYSMAP_LEN -#if CONFIG_MTD_PHYSMAP_LEN != 0 -#warning using PHYSMAP compat code -#define PHYSMAP_COMPAT -#endif #endif + add_mtd_device(mymtd); -#ifdef PHYSMAP_COMPAT -static struct physmap_flash_data physmap_flash_data = { - .width = CONFIG_MTD_PHYSMAP_BANKWIDTH, -}; - -static struct resource physmap_flash_resource = { - .start = CONFIG_MTD_PHYSMAP_START, - .end = CONFIG_MTD_PHYSMAP_START + CONFIG_MTD_PHYSMAP_LEN - 1, - .flags = IORESOURCE_MEM, -}; - -static struct platform_device physmap_flash = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &physmap_flash_data, - }, - .num_resources = 1, - .resource = &physmap_flash_resource, -}; - -void physmap_configure(unsigned long addr, unsigned long size, - int bankwidth, void (*set_vpp)(struct map_info *, int)) -{ - physmap_flash_resource.start = addr; - physmap_flash_resource.end = addr + size - 1; - physmap_flash_data.width = bankwidth; - physmap_flash_data.set_vpp = set_vpp; -} + return 0; + } -#ifdef CONFIG_MTD_PARTITIONS -void physmap_set_partitions(struct mtd_partition *parts, int num_parts) -{ - physmap_flash_data.nr_parts = num_parts; - physmap_flash_data.parts = parts; + iounmap(physmap_map.virt); + return -ENXIO; } -#endif -#endif -static int __init physmap_init(void) +static void __exit cleanup_physmap(void) { - int err; - - err = platform_driver_register(&physmap_flash_driver); -#ifdef PHYSMAP_COMPAT - if (err == 0) - platform_device_register(&physmap_flash); +#ifdef CONFIG_MTD_PARTITIONS + if (mtd_parts_nb) { + del_mtd_partitions(mymtd); + kfree(mtd_parts); + } else if (num_physmap_partitions) { + del_mtd_partitions(mymtd); + } else { + del_mtd_device(mymtd); + } +#else + del_mtd_device(mymtd); #endif + map_destroy(mymtd); - return err; + iounmap(physmap_map.virt); + physmap_map.virt = NULL; } -static void __exit physmap_exit(void) -{ -#ifdef PHYSMAP_COMPAT - platform_device_unregister(&physmap_flash); -#endif - platform_driver_unregister(&physmap_flash_driver); -} +module_init(init_physmap); +module_exit(cleanup_physmap); -module_init(physmap_init); -module_exit(physmap_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("David Woodhouse "); diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c index ec8fdae1d..50b140336 100644 --- a/drivers/mtd/maps/redwood.c +++ b/drivers/mtd/maps/redwood.c @@ -13,6 +13,7 @@ * or implied. */ +#include #include #include #include diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index 950bf1c57..5cefb0156 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c @@ -5,6 +5,7 @@ * * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c index 7d0fcf8f4..350286dc1 100644 --- a/drivers/mtd/maps/sbc8240.c +++ b/drivers/mtd/maps/sbc8240.c @@ -18,6 +18,7 @@ * Both parts are JEDEC compatible. */ +#include #include #include #include diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c index 9b50cfc35..e8c130e1e 100644 --- a/drivers/mtd/maps/sc520cdp.c +++ b/drivers/mtd/maps/sc520cdp.c @@ -25,6 +25,7 @@ * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html */ +#include #include #include #include diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c index dcfb85840..97a8dfd69 100644 --- a/drivers/mtd/maps/scb2_flash.c +++ b/drivers/mtd/maps/scb2_flash.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c index 7391fd544..28b8a571a 100644 --- a/drivers/mtd/maps/scx200_docflash.c +++ b/drivers/mtd/maps/scx200_docflash.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -163,9 +164,8 @@ static int __init init_scx200_docflash(void) outl(pmr, scx200_cb_base + SCx200_PMR); } - printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n", - (unsigned long long)docmem.start, - (unsigned long long)docmem.end, width); + printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n", + docmem.start, docmem.end, width); scx200_docflash_map.size = size; if (width == 8) diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c index d76ceef45..c53c2c369 100644 --- a/drivers/mtd/maps/solutionengine.c +++ b/drivers/mtd/maps/solutionengine.c @@ -16,6 +16,7 @@ #include #include #include +#include #include static struct mtd_info *flash_mtd; diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 4db2055ce..0758cb1d0 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -31,141 +30,146 @@ #define UFLASH_WINDOW_SIZE 0x200000 #define UFLASH_BUSWIDTH 1 /* EBus is 8-bit */ -MODULE_AUTHOR("Eric Brower "); -MODULE_DESCRIPTION("User-programmable flash device on Sun Microsystems boardsets"); -MODULE_SUPPORTED_DEVICE("userflash"); -MODULE_LICENSE("GPL"); -MODULE_VERSION("2.0"); +MODULE_AUTHOR + ("Eric Brower "); +MODULE_DESCRIPTION + ("User-programmable flash device on Sun Microsystems boardsets"); +MODULE_SUPPORTED_DEVICE + ("userflash"); +MODULE_LICENSE + ("GPL"); static LIST_HEAD(device_list); struct uflash_dev { - char *name; /* device name */ + char * name; /* device name */ struct map_info map; /* mtd map info */ - struct mtd_info *mtd; /* mtd info */ + struct mtd_info * mtd; /* mtd info */ + struct list_head list; }; struct map_info uflash_map_templ = { - .name = "SUNW,???-????", - .size = UFLASH_WINDOW_SIZE, - .bankwidth = UFLASH_BUSWIDTH, + .name = "SUNW,???-????", + .size = UFLASH_WINDOW_SIZE, + .bankwidth = UFLASH_BUSWIDTH, }; -int uflash_devinit(struct linux_ebus_device *edev, struct device_node *dp) +int uflash_devinit(struct linux_ebus_device* edev) { - struct uflash_dev *up; - struct resource *res; + int iTmp, nregs; + struct linux_prom_registers regs[2]; + struct uflash_dev *pdev; + + iTmp = prom_getproperty( + edev->prom_node, "reg", (void *)regs, sizeof(regs)); + if ((iTmp % sizeof(regs[0])) != 0) { + printk("%s: Strange reg property size %d\n", + UFLASH_DEVNAME, iTmp); + return -ENODEV; + } - res = &edev->resource[0]; + nregs = iTmp / sizeof(regs[0]); - if (edev->num_addrs != 1) { + if (nregs != 1) { /* Non-CFI userflash device-- once I find one we * can work on supporting it. */ - printk("%s: unsupported device at 0x%llx (%d regs): " \ + printk("%s: unsupported device at 0x%lx (%d regs): " \ "email ebrower@usa.net\n", - dp->full_name, (unsigned long long)res->start, - edev->num_addrs); - + UFLASH_DEVNAME, edev->resource[0].start, nregs); return -ENODEV; } - up = kzalloc(sizeof(struct uflash_dev), GFP_KERNEL); - if (!up) - return -ENOMEM; + if(0 == (pdev = kmalloc(sizeof(struct uflash_dev), GFP_KERNEL))) { + printk("%s: unable to kmalloc new device\n", UFLASH_DEVNAME); + return(-ENOMEM); + } /* copy defaults and tweak parameters */ - memcpy(&up->map, &uflash_map_templ, sizeof(uflash_map_templ)); - up->map.size = (res->end - res->start) + 1UL; - - up->name = of_get_property(dp, "model", NULL); - if (up->name && 0 < strlen(up->name)) - up->map.name = up->name; - - up->map.phys = res->start; - - up->map.virt = ioremap_nocache(res->start, up->map.size); - if (!up->map.virt) { - printk("%s: Failed to map device.\n", dp->full_name); - kfree(up); - - return -EINVAL; + memcpy(&pdev->map, &uflash_map_templ, sizeof(uflash_map_templ)); + pdev->map.size = regs[0].reg_size; + + iTmp = prom_getproplen(edev->prom_node, "model"); + pdev->name = kmalloc(iTmp, GFP_KERNEL); + prom_getstring(edev->prom_node, "model", pdev->name, iTmp); + if(0 != pdev->name && 0 < strlen(pdev->name)) { + pdev->map.name = pdev->name; + } + pdev->map.phys = edev->resource[0].start; + pdev->map.virt = ioremap_nocache(edev->resource[0].start, pdev->map.size); + if(0 == pdev->map.virt) { + printk("%s: failed to map device\n", __FUNCTION__); + kfree(pdev->name); + kfree(pdev); + return(-1); } - simple_map_init(&up->map); + simple_map_init(&pdev->map); /* MTD registration */ - up->mtd = do_map_probe("cfi_probe", &up->map); - if (!up->mtd) { - iounmap(up->map.virt); - kfree(up); - - return -ENXIO; + pdev->mtd = do_map_probe("cfi_probe", &pdev->map); + if(0 == pdev->mtd) { + iounmap(pdev->map.virt); + kfree(pdev->name); + kfree(pdev); + return(-ENXIO); } - up->mtd->owner = THIS_MODULE; + list_add(&pdev->list, &device_list); - add_mtd_device(up->mtd); + pdev->mtd->owner = THIS_MODULE; - dev_set_drvdata(&edev->ofdev.dev, up); - - return 0; + add_mtd_device(pdev->mtd); + return(0); } -static int __devinit uflash_probe(struct of_device *dev, const struct of_device_id *match) +static int __init uflash_init(void) { - struct linux_ebus_device *edev = to_ebus_device(&dev->dev); - struct device_node *dp = dev->node; + struct linux_ebus *ebus = NULL; + struct linux_ebus_device *edev = NULL; + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, UFLASH_OBPNAME)) { + if(0 > prom_getproplen(edev->prom_node, "user")) { + DEBUG(2, "%s: ignoring device at 0x%lx\n", + UFLASH_DEVNAME, edev->resource[0].start); + } else { + uflash_devinit(edev); + } + } + } + } - if (of_find_property(dp, "user", NULL)) + if(list_empty(&device_list)) { + printk("%s: unable to locate device\n", UFLASH_DEVNAME); return -ENODEV; - - return uflash_devinit(edev, dp); -} - -static int __devexit uflash_remove(struct of_device *dev) -{ - struct uflash_dev *up = dev_get_drvdata(&dev->dev); - - if (up->mtd) { - del_mtd_device(up->mtd); - map_destroy(up->mtd); } - if (up->map.virt) { - iounmap(up->map.virt); - up->map.virt = NULL; - } - - kfree(up); - - return 0; + return(0); } -static struct of_device_id uflash_match[] = { - { - .name = UFLASH_OBPNAME, - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, uflash_match); - -static struct of_platform_driver uflash_driver = { - .name = UFLASH_DEVNAME, - .match_table = uflash_match, - .probe = uflash_probe, - .remove = __devexit_p(uflash_remove), -}; - -static int __init uflash_init(void) +static void __exit uflash_cleanup(void) { - return of_register_driver(&uflash_driver, &ebus_bus_type); -} - -static void __exit uflash_exit(void) -{ - of_unregister_driver(&uflash_driver); + struct list_head *udevlist; + struct uflash_dev *udev; + + list_for_each(udevlist, &device_list) { + udev = list_entry(udevlist, struct uflash_dev, list); + DEBUG(2, "%s: removing device %s\n", + UFLASH_DEVNAME, udev->name); + + if(0 != udev->mtd) { + del_mtd_device(udev->mtd); + map_destroy(udev->mtd); + } + if(0 != udev->map.virt) { + iounmap(udev->map.virt); + udev->map.virt = NULL; + } + kfree(udev->name); + kfree(udev); + } } module_init(uflash_init); -module_exit(uflash_exit); +module_exit(uflash_cleanup); diff --git a/drivers/mtd/maps/tqm834x.c b/drivers/mtd/maps/tqm834x.c index 58e5912bd..c7ae9a515 100644 --- a/drivers/mtd/maps/tqm834x.c +++ b/drivers/mtd/maps/tqm834x.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c index 19578ba84..a43517053 100644 --- a/drivers/mtd/maps/tqm8xxl.c +++ b/drivers/mtd/maps/tqm8xxl.c @@ -22,6 +22,7 @@ * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at * kernel configuration. */ +#include #include #include #include diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c index b47270e85..a7422c200 100644 --- a/drivers/mtd/maps/ts5500_flash.c +++ b/drivers/mtd/maps/ts5500_flash.c @@ -26,6 +26,7 @@ * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ */ +#include #include #include #include diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index 389fea28b..f7264dc2a 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -10,6 +10,7 @@ /****************************************************************************/ +#include #include #include #include diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c index ec80eec37..f46bec661 100644 --- a/drivers/mtd/maps/walnut.c +++ b/drivers/mtd/maps/walnut.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c index ac5b8105b..60c197ec4 100644 --- a/drivers/mtd/maps/wr_sbc82xx_flash.c +++ b/drivers/mtd/maps/wr_sbc82xx_flash.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 04ed34694..2cef280e3 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c @@ -7,6 +7,7 @@ * (C) 1999-2003 David Woodhouse */ +#include #include #include #include @@ -70,7 +71,7 @@ static int erase_write (struct mtd_info *mtd, unsigned long pos, set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&wait_q, &wait); - ret = mtd->erase(mtd, &erase); + ret = MTD_ERASE(mtd, &erase); if (ret) { set_current_state(TASK_RUNNING); remove_wait_queue(&wait_q, &wait); @@ -87,7 +88,7 @@ static int erase_write (struct mtd_info *mtd, unsigned long pos, * Next, writhe data to flash. */ - ret = mtd->write(mtd, pos, len, &retlen, buf); + ret = MTD_WRITE (mtd, pos, len, &retlen, buf); if (ret) return ret; if (retlen != len) @@ -137,7 +138,7 @@ static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos, mtd->name, pos, len); if (!sect_size) - return mtd->write(mtd, pos, len, &retlen, buf); + return MTD_WRITE (mtd, pos, len, &retlen, buf); while (len > 0) { unsigned long sect_start = (pos/sect_size)*sect_size; @@ -169,8 +170,7 @@ static int do_cached_write (struct mtdblk_dev *mtdblk, unsigned long pos, mtdblk->cache_offset != sect_start) { /* fill the cache with the current sector */ mtdblk->cache_state = STATE_EMPTY; - ret = mtd->read(mtd, sect_start, sect_size, - &retlen, mtdblk->cache_data); + ret = MTD_READ(mtd, sect_start, sect_size, &retlen, mtdblk->cache_data); if (ret) return ret; if (retlen != sect_size) @@ -207,7 +207,7 @@ static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos, mtd->name, pos, len); if (!sect_size) - return mtd->read(mtd, pos, len, &retlen, buf); + return MTD_READ (mtd, pos, len, &retlen, buf); while (len > 0) { unsigned long sect_start = (pos/sect_size)*sect_size; @@ -226,7 +226,7 @@ static int do_cached_read (struct mtdblk_dev *mtdblk, unsigned long pos, mtdblk->cache_offset == sect_start) { memcpy (buf, mtdblk->cache_data + offset, size); } else { - ret = mtd->read(mtd, pos, size, &retlen, buf); + ret = MTD_READ (mtd, pos, size, &retlen, buf); if (ret) return ret; if (retlen != size) @@ -288,7 +288,8 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd) mutex_init(&mtdblk->cache_mutex); mtdblk->cache_state = STATE_EMPTY; - if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) { + if ((mtdblk->mtd->flags & MTD_CAP_RAM) != MTD_CAP_RAM && + mtdblk->mtd->erasesize) { mtdblk->cache_size = mtdblk->mtd->erasesize; mtdblk->cache_data = NULL; } diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c index 29563ed25..0c830ba41 100644 --- a/drivers/mtd/mtdblock_ro.c +++ b/drivers/mtd/mtdblock_ro.c @@ -45,7 +45,9 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) dev->blksize = 512; dev->size = mtd->size >> 9; dev->tr = tr; - dev->readonly = 1; + if ((mtd->flags & (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE)) != + (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE)) + dev->readonly = 1; add_mtd_blktrans_dev(dev); } diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 5b6acfcb2..6f044584b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include @@ -48,33 +49,42 @@ static struct mtd_notifier notifier = { }; /* - * Data structure to hold the pointer to the mtd device as well - * as mode information ofr various use cases. + * We use file->private_data to store a pointer to the MTDdevice. + * Since alighment is at least 32 bits, we have 2 bits free for OTP + * modes as well. */ -struct mtd_file_info { - struct mtd_info *mtd; - enum mtd_file_modes mode; -}; + +#define TO_MTD(file) (struct mtd_info *)((long)((file)->private_data) & ~3L) + +#define MTD_MODE_OTP_FACT 1 +#define MTD_MODE_OTP_USER 2 +#define MTD_MODE(file) ((long)((file)->private_data) & 3) + +#define SET_MTD_MODE(file, mode) \ + do { long __p = (long)((file)->private_data); \ + (file)->private_data = (void *)((__p & ~3L) | mode); } while (0) static loff_t mtd_lseek (struct file *file, loff_t offset, int orig) { - struct mtd_file_info *mfi = file->private_data; - struct mtd_info *mtd = mfi->mtd; + struct mtd_info *mtd = TO_MTD(file); switch (orig) { - case SEEK_SET: + case 0: + /* SEEK_SET */ break; - case SEEK_CUR: + case 1: + /* SEEK_CUR */ offset += file->f_pos; break; - case SEEK_END: + case 2: + /* SEEK_END */ offset += mtd->size; break; default: return -EINVAL; } - if (offset >= 0 && offset <= mtd->size) + if (offset >= 0 && offset < mtd->size) return file->f_pos = offset; return -EINVAL; @@ -87,7 +97,6 @@ static int mtd_open(struct inode *inode, struct file *file) int minor = iminor(inode); int devnum = minor >> 1; struct mtd_info *mtd; - struct mtd_file_info *mfi; DEBUG(MTD_DEBUG_LEVEL0, "MTD_open\n"); @@ -108,20 +117,14 @@ static int mtd_open(struct inode *inode, struct file *file) return -ENODEV; } + file->private_data = mtd; + /* You can't open it RW if it's not a writeable device */ if ((file->f_mode & 2) && !(mtd->flags & MTD_WRITEABLE)) { put_mtd_device(mtd); return -EACCES; } - mfi = kzalloc(sizeof(*mfi), GFP_KERNEL); - if (!mfi) { - put_mtd_device(mtd); - return -ENOMEM; - } - mfi->mtd = mtd; - file->private_data = mfi; - return 0; } /* mtd_open */ @@ -129,17 +132,16 @@ static int mtd_open(struct inode *inode, struct file *file) static int mtd_close(struct inode *inode, struct file *file) { - struct mtd_file_info *mfi = file->private_data; - struct mtd_info *mtd = mfi->mtd; + struct mtd_info *mtd; DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n"); + mtd = TO_MTD(file); + if (mtd->sync) mtd->sync(mtd); put_mtd_device(mtd); - file->private_data = NULL; - kfree(mfi); return 0; } /* mtd_close */ @@ -151,8 +153,7 @@ static int mtd_close(struct inode *inode, struct file *file) static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t *ppos) { - struct mtd_file_info *mfi = file->private_data; - struct mtd_info *mtd = mfi->mtd; + struct mtd_info *mtd = TO_MTD(file); size_t retlen=0; size_t total_retlen=0; int ret=0; @@ -169,58 +170,36 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t /* FIXME: Use kiovec in 2.5 to lock down the user's buffers and pass them directly to the MTD functions */ - - if (count > MAX_KMALLOC_SIZE) - kbuf=kmalloc(MAX_KMALLOC_SIZE, GFP_KERNEL); - else - kbuf=kmalloc(count, GFP_KERNEL); - - if (!kbuf) - return -ENOMEM; - while (count) { - if (count > MAX_KMALLOC_SIZE) len = MAX_KMALLOC_SIZE; else len = count; - switch (mfi->mode) { - case MTD_MODE_OTP_FACTORY: + kbuf=kmalloc(len,GFP_KERNEL); + if (!kbuf) + return -ENOMEM; + + switch (MTD_MODE(file)) { + case MTD_MODE_OTP_FACT: ret = mtd->read_fact_prot_reg(mtd, *ppos, len, &retlen, kbuf); break; case MTD_MODE_OTP_USER: ret = mtd->read_user_prot_reg(mtd, *ppos, len, &retlen, kbuf); break; - case MTD_MODE_RAW: - { - struct mtd_oob_ops ops; - - ops.mode = MTD_OOB_RAW; - ops.datbuf = kbuf; - ops.oobbuf = NULL; - ops.len = len; - - ret = mtd->read_oob(mtd, *ppos, &ops); - retlen = ops.retlen; - break; - } default: - ret = mtd->read(mtd, *ppos, len, &retlen, kbuf); + ret = MTD_READ(mtd, *ppos, len, &retlen, kbuf); } /* Nand returns -EBADMSG on ecc errors, but it returns * the data. For our userspace tools it is important * to dump areas with ecc errors ! - * For kernel internal usage it also might return -EUCLEAN - * to signal the caller that a bitflip has occured and has - * been corrected by the ECC algorithm. * Userspace software which accesses NAND this way * must be aware of the fact that it deals with NAND */ - if (!ret || (ret == -EUCLEAN) || (ret == -EBADMSG)) { + if (!ret || (ret == -EBADMSG)) { *ppos += retlen; if (copy_to_user(buf, kbuf, retlen)) { - kfree(kbuf); + kfree(kbuf); return -EFAULT; } else @@ -236,16 +215,15 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t return ret; } + kfree(kbuf); } - kfree(kbuf); return total_retlen; } /* mtd_read */ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count,loff_t *ppos) { - struct mtd_file_info *mfi = file->private_data; - struct mtd_info *mtd = mfi->mtd; + struct mtd_info *mtd = TO_MTD(file); char *kbuf; size_t retlen; size_t total_retlen=0; @@ -263,28 +241,25 @@ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count if (!count) return 0; - if (count > MAX_KMALLOC_SIZE) - kbuf=kmalloc(MAX_KMALLOC_SIZE, GFP_KERNEL); - else - kbuf=kmalloc(count, GFP_KERNEL); - - if (!kbuf) - return -ENOMEM; - while (count) { - if (count > MAX_KMALLOC_SIZE) len = MAX_KMALLOC_SIZE; else len = count; + kbuf=kmalloc(len,GFP_KERNEL); + if (!kbuf) { + printk("kmalloc is null\n"); + return -ENOMEM; + } + if (copy_from_user(kbuf, buf, len)) { kfree(kbuf); return -EFAULT; } - switch (mfi->mode) { - case MTD_MODE_OTP_FACTORY: + switch (MTD_MODE(file)) { + case MTD_MODE_OTP_FACT: ret = -EROFS; break; case MTD_MODE_OTP_USER: @@ -294,21 +269,6 @@ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count } ret = mtd->write_user_prot_reg(mtd, *ppos, len, &retlen, kbuf); break; - - case MTD_MODE_RAW: - { - struct mtd_oob_ops ops; - - ops.mode = MTD_OOB_RAW; - ops.datbuf = kbuf; - ops.oobbuf = NULL; - ops.len = len; - - ret = mtd->write_oob(mtd, *ppos, &ops); - retlen = ops.retlen; - break; - } - default: ret = (*(mtd->write))(mtd, *ppos, len, &retlen, kbuf); } @@ -322,9 +282,10 @@ static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count kfree(kbuf); return ret; } + + kfree(kbuf); } - kfree(kbuf); return total_retlen; } /* mtd_write */ @@ -338,45 +299,13 @@ static void mtdchar_erase_callback (struct erase_info *instr) wake_up((wait_queue_head_t *)instr->priv); } -#if defined(CONFIG_MTD_OTP) || defined(CONFIG_MTD_ONENAND_OTP) -static int otp_select_filemode(struct mtd_file_info *mfi, int mode) -{ - struct mtd_info *mtd = mfi->mtd; - int ret = 0; - - switch (mode) { - case MTD_OTP_FACTORY: - if (!mtd->read_fact_prot_reg) - ret = -EOPNOTSUPP; - else - mfi->mode = MTD_MODE_OTP_FACTORY; - break; - case MTD_OTP_USER: - if (!mtd->read_fact_prot_reg) - ret = -EOPNOTSUPP; - else - mfi->mode = MTD_MODE_OTP_USER; - break; - default: - ret = -EINVAL; - case MTD_OTP_OFF: - break; - } - return ret; -} -#else -# define otp_select_filemode(f,m) -EOPNOTSUPP -#endif - static int mtd_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg) { - struct mtd_file_info *mfi = file->private_data; - struct mtd_info *mtd = mfi->mtd; + struct mtd_info *mtd = TO_MTD(file); void __user *argp = (void __user *)arg; int ret = 0; u_long size; - struct mtd_info_user info; DEBUG(MTD_DEBUG_LEVEL0, "MTD_ioctl\n"); @@ -412,15 +341,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file, } case MEMGETINFO: - info.type = mtd->type; - info.flags = mtd->flags; - info.size = mtd->size; - info.erasesize = mtd->erasesize; - info.writesize = mtd->writesize; - info.oobsize = mtd->oobsize; - info.ecctype = mtd->ecctype; - info.eccsize = mtd->eccsize; - if (copy_to_user(argp, &info, sizeof(struct mtd_info_user))) + if (copy_to_user(argp, mtd, sizeof(struct mtd_info_user))) return -EFAULT; break; @@ -479,7 +400,8 @@ static int mtd_ioctl(struct inode *inode, struct file *file, case MEMWRITEOOB: { struct mtd_oob_buf buf; - struct mtd_oob_ops ops; + void *databuf; + ssize_t retlen; if(!(file->f_mode & 2)) return -EPERM; @@ -487,7 +409,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file, if (copy_from_user(&buf, argp, sizeof(struct mtd_oob_buf))) return -EFAULT; - if (buf.length > 4096) + if (buf.length > 0x4096) return -EINVAL; if (!mtd->write_oob) @@ -499,32 +421,21 @@ static int mtd_ioctl(struct inode *inode, struct file *file, if (ret) return ret; - ops.len = buf.length; - ops.ooblen = buf.length; - ops.ooboffs = buf.start & (mtd->oobsize - 1); - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs)) - return -EINVAL; - - ops.oobbuf = kmalloc(buf.length, GFP_KERNEL); - if (!ops.oobbuf) + databuf = kmalloc(buf.length, GFP_KERNEL); + if (!databuf) return -ENOMEM; - if (copy_from_user(ops.oobbuf, buf.ptr, buf.length)) { - kfree(ops.oobbuf); + if (copy_from_user(databuf, buf.ptr, buf.length)) { + kfree(databuf); return -EFAULT; } - buf.start &= ~(mtd->oobsize - 1); - ret = mtd->write_oob(mtd, buf.start, &ops); + ret = (mtd->write_oob)(mtd, buf.start, buf.length, &retlen, databuf); - if (copy_to_user(argp + sizeof(uint32_t), &ops.retlen, - sizeof(uint32_t))) + if (copy_to_user(argp + sizeof(uint32_t), &retlen, sizeof(uint32_t))) ret = -EFAULT; - kfree(ops.oobbuf); + kfree(databuf); break; } @@ -532,12 +443,13 @@ static int mtd_ioctl(struct inode *inode, struct file *file, case MEMREADOOB: { struct mtd_oob_buf buf; - struct mtd_oob_ops ops; + void *databuf; + ssize_t retlen; if (copy_from_user(&buf, argp, sizeof(struct mtd_oob_buf))) return -EFAULT; - if (buf.length > 4096) + if (buf.length > 0x4096) return -EINVAL; if (!mtd->read_oob) @@ -545,32 +457,22 @@ static int mtd_ioctl(struct inode *inode, struct file *file, else ret = access_ok(VERIFY_WRITE, buf.ptr, buf.length) ? 0 : -EFAULT; + if (ret) return ret; - ops.len = buf.length; - ops.ooblen = buf.length; - ops.ooboffs = buf.start & (mtd->oobsize - 1); - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - if (ops.ooboffs && ops.len > (mtd->oobsize - ops.ooboffs)) - return -EINVAL; - - ops.oobbuf = kmalloc(buf.length, GFP_KERNEL); - if (!ops.oobbuf) + databuf = kmalloc(buf.length, GFP_KERNEL); + if (!databuf) return -ENOMEM; - buf.start &= ~(mtd->oobsize - 1); - ret = mtd->read_oob(mtd, buf.start, &ops); + ret = (mtd->read_oob)(mtd, buf.start, buf.length, &retlen, databuf); - if (put_user(ops.retlen, (uint32_t __user *)argp)) + if (put_user(retlen, (uint32_t __user *)argp)) ret = -EFAULT; - else if (ops.retlen && copy_to_user(buf.ptr, ops.oobbuf, - ops.retlen)) + else if (retlen && copy_to_user(buf.ptr, databuf, retlen)) ret = -EFAULT; - kfree(ops.oobbuf); + kfree(databuf); break; } @@ -602,22 +504,16 @@ static int mtd_ioctl(struct inode *inode, struct file *file, break; } - /* Legacy interface */ - case MEMGETOOBSEL: + case MEMSETOOBSEL: { - struct nand_oobinfo oi; - - if (!mtd->ecclayout) - return -EOPNOTSUPP; - if (mtd->ecclayout->eccbytes > ARRAY_SIZE(oi.eccpos)) - return -EINVAL; - - oi.useecc = MTD_NANDECC_AUTOPLACE; - memcpy(&oi.eccpos, mtd->ecclayout->eccpos, sizeof(oi.eccpos)); - memcpy(&oi.oobfree, mtd->ecclayout->oobfree, - sizeof(oi.oobfree)); + if (copy_from_user(&mtd->oobinfo, argp, sizeof(struct nand_oobinfo))) + return -EFAULT; + break; + } - if (copy_to_user(argp, &oi, sizeof(struct nand_oobinfo))) + case MEMGETOOBSEL: + { + if (copy_to_user(argp, &(mtd->oobinfo), sizeof(struct nand_oobinfo))) return -EFAULT; break; } @@ -648,17 +544,31 @@ static int mtd_ioctl(struct inode *inode, struct file *file, break; } -#if defined(CONFIG_MTD_OTP) || defined(CONFIG_MTD_ONENAND_OTP) +#ifdef CONFIG_MTD_OTP case OTPSELECT: { int mode; if (copy_from_user(&mode, argp, sizeof(int))) return -EFAULT; - - mfi->mode = MTD_MODE_NORMAL; - - ret = otp_select_filemode(mfi, mode); - + SET_MTD_MODE(file, 0); + switch (mode) { + case MTD_OTP_FACTORY: + if (!mtd->read_fact_prot_reg) + ret = -EOPNOTSUPP; + else + SET_MTD_MODE(file, MTD_MODE_OTP_FACT); + break; + case MTD_OTP_USER: + if (!mtd->read_fact_prot_reg) + ret = -EOPNOTSUPP; + else + SET_MTD_MODE(file, MTD_MODE_OTP_USER); + break; + default: + ret = -EINVAL; + case MTD_OTP_OFF: + break; + } file->f_pos = 0; break; } @@ -670,8 +580,8 @@ static int mtd_ioctl(struct inode *inode, struct file *file, if (!buf) return -ENOMEM; ret = -EOPNOTSUPP; - switch (mfi->mode) { - case MTD_MODE_OTP_FACTORY: + switch (MTD_MODE(file)) { + case MTD_MODE_OTP_FACT: if (mtd->get_fact_prot_info) ret = mtd->get_fact_prot_info(mtd, buf, 4096); break; @@ -679,8 +589,6 @@ static int mtd_ioctl(struct inode *inode, struct file *file, if (mtd->get_user_prot_info) ret = mtd->get_user_prot_info(mtd, buf, 4096); break; - default: - break; } if (ret >= 0) { if (cmd == OTPGETREGIONCOUNT) { @@ -699,7 +607,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file, { struct otp_info info; - if (mfi->mode != MTD_MODE_OTP_USER) + if (MTD_MODE(file) != MTD_MODE_OTP_USER) return -EINVAL; if (copy_from_user(&info, argp, sizeof(info))) return -EFAULT; @@ -710,49 +618,6 @@ static int mtd_ioctl(struct inode *inode, struct file *file, } #endif - case ECCGETLAYOUT: - { - if (!mtd->ecclayout) - return -EOPNOTSUPP; - - if (copy_to_user(argp, &mtd->ecclayout, - sizeof(struct nand_ecclayout))) - return -EFAULT; - break; - } - - case ECCGETSTATS: - { - if (copy_to_user(argp, &mtd->ecc_stats, - sizeof(struct mtd_ecc_stats))) - return -EFAULT; - break; - } - - case MTDFILEMODE: - { - mfi->mode = 0; - - switch(arg) { - case MTD_MODE_OTP_FACTORY: - case MTD_MODE_OTP_USER: - ret = otp_select_filemode(mfi, arg); - break; - - case MTD_MODE_RAW: - if (!mtd->read_oob || !mtd->write_oob) - return -EOPNOTSUPP; - mfi->mode = arg; - - case MTD_MODE_NORMAL: - break; - default: - ret = -EINVAL; - } - file->f_pos = 0; - break; - } - default: ret = -ENOTTY; } diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 1fea631b5..9af840364 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -19,8 +19,6 @@ #include #include -#include - /* * Our storage structure: * Subdev points to an array of pointers to struct mtd_info objects @@ -56,7 +54,7 @@ concat_read(struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); - int ret = 0, err; + int err = -EINVAL; int i; *retlen = 0; @@ -80,29 +78,19 @@ concat_read(struct mtd_info *mtd, loff_t from, size_t len, err = subdev->read(subdev, from, size, &retsize, buf); - /* Save information about bitflips! */ - if (unlikely(err)) { - if (err == -EBADMSG) { - mtd->ecc_stats.failed++; - ret = err; - } else if (err == -EUCLEAN) { - mtd->ecc_stats.corrected++; - /* Do not overwrite -EBADMSG !! */ - if (!ret) - ret = err; - } else - return err; - } + if (err) + break; *retlen += retsize; len -= size; if (len == 0) - return ret; + break; + err = -EINVAL; buf += size; from = 0; } - return -EINVAL; + return err; } static int @@ -153,185 +141,211 @@ concat_write(struct mtd_info *mtd, loff_t to, size_t len, } static int -concat_writev(struct mtd_info *mtd, const struct kvec *vecs, - unsigned long count, loff_t to, size_t * retlen) +concat_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * eccbuf, + struct nand_oobinfo *oobsel) { struct mtd_concat *concat = CONCAT(mtd); - struct kvec *vecs_copy; - unsigned long entry_low, entry_high; - size_t total_len = 0; - int i; int err = -EINVAL; - - if (!(mtd->flags & MTD_WRITEABLE)) - return -EROFS; + int i; *retlen = 0; - /* Calculate total length of data */ - for (i = 0; i < count; i++) - total_len += vecs[i].iov_len; + for (i = 0; i < concat->num_subdev; i++) { + struct mtd_info *subdev = concat->subdev[i]; + size_t size, retsize; - /* Do not allow write past end of device */ - if ((to + total_len) > mtd->size) - return -EINVAL; + if (from >= subdev->size) { + /* Not destined for this subdev */ + size = 0; + from -= subdev->size; + continue; + } - /* Check alignment */ - if (mtd->writesize > 1) { - loff_t __to = to; - if (do_div(__to, mtd->writesize) || (total_len % mtd->writesize)) - return -EINVAL; + if (from + len > subdev->size) + /* First part goes into this subdev */ + size = subdev->size - from; + else + /* Entire transaction goes into this subdev */ + size = len; + + if (subdev->read_ecc) + err = subdev->read_ecc(subdev, from, size, + &retsize, buf, eccbuf, oobsel); + else + err = -EINVAL; + + if (err) + break; + + *retlen += retsize; + len -= size; + if (len == 0) + break; + + err = -EINVAL; + buf += size; + if (eccbuf) { + eccbuf += subdev->oobsize; + /* in nand.c at least, eccbufs are + tagged with 2 (int)eccstatus'; we + must account for these */ + eccbuf += 2 * (sizeof (int)); + } + from = 0; } + return err; +} - /* make a copy of vecs */ - vecs_copy = kmalloc(sizeof(struct kvec) * count, GFP_KERNEL); - if (!vecs_copy) - return -ENOMEM; - memcpy(vecs_copy, vecs, sizeof(struct kvec) * count); +static int +concat_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf, u_char * eccbuf, + struct nand_oobinfo *oobsel) +{ + struct mtd_concat *concat = CONCAT(mtd); + int err = -EINVAL; + int i; + + if (!(mtd->flags & MTD_WRITEABLE)) + return -EROFS; + + *retlen = 0; - entry_low = 0; for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; - size_t size, wsize, retsize, old_iov_len; + size_t size, retsize; if (to >= subdev->size) { + size = 0; to -= subdev->size; continue; } - - size = min(total_len, (size_t)(subdev->size - to)); - wsize = size; /* store for future use */ - - entry_high = entry_low; - while (entry_high < count) { - if (size <= vecs_copy[entry_high].iov_len) - break; - size -= vecs_copy[entry_high++].iov_len; - } - - old_iov_len = vecs_copy[entry_high].iov_len; - vecs_copy[entry_high].iov_len = size; + if (to + len > subdev->size) + size = subdev->size - to; + else + size = len; if (!(subdev->flags & MTD_WRITEABLE)) err = -EROFS; + else if (subdev->write_ecc) + err = subdev->write_ecc(subdev, to, size, + &retsize, buf, eccbuf, oobsel); else - err = subdev->writev(subdev, &vecs_copy[entry_low], - entry_high - entry_low + 1, to, &retsize); - - vecs_copy[entry_high].iov_len = old_iov_len - size; - vecs_copy[entry_high].iov_base += size; - - entry_low = entry_high; + err = -EINVAL; if (err) break; *retlen += retsize; - total_len -= wsize; - - if (total_len == 0) + len -= size; + if (len == 0) break; err = -EINVAL; + buf += size; + if (eccbuf) + eccbuf += subdev->oobsize; to = 0; } - - kfree(vecs_copy); return err; } static int -concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) +concat_read_oob(struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); - struct mtd_oob_ops devops = *ops; - int i, err, ret = 0; + int err = -EINVAL; + int i; - ops->retlen = 0; + *retlen = 0; for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; + size_t size, retsize; if (from >= subdev->size) { + /* Not destined for this subdev */ + size = 0; from -= subdev->size; continue; } + if (from + len > subdev->size) + /* First part goes into this subdev */ + size = subdev->size - from; + else + /* Entire transaction goes into this subdev */ + size = len; - /* partial read ? */ - if (from + devops.len > subdev->size) - devops.len = subdev->size - from; - - err = subdev->read_oob(subdev, from, &devops); - ops->retlen += devops.retlen; - - /* Save information about bitflips! */ - if (unlikely(err)) { - if (err == -EBADMSG) { - mtd->ecc_stats.failed++; - ret = err; - } else if (err == -EUCLEAN) { - mtd->ecc_stats.corrected++; - /* Do not overwrite -EBADMSG !! */ - if (!ret) - ret = err; - } else - return err; - } + if (subdev->read_oob) + err = subdev->read_oob(subdev, from, size, + &retsize, buf); + else + err = -EINVAL; - devops.len = ops->len - ops->retlen; - if (!devops.len) - return ret; + if (err) + break; - if (devops.datbuf) - devops.datbuf += devops.retlen; - if (devops.oobbuf) - devops.oobbuf += devops.ooblen; + *retlen += retsize; + len -= size; + if (len == 0) + break; + err = -EINVAL; + buf += size; from = 0; } - return -EINVAL; + return err; } static int -concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) +concat_write_oob(struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf) { struct mtd_concat *concat = CONCAT(mtd); - struct mtd_oob_ops devops = *ops; - int i, err; + int err = -EINVAL; + int i; if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; - ops->retlen = 0; + *retlen = 0; for (i = 0; i < concat->num_subdev; i++) { struct mtd_info *subdev = concat->subdev[i]; + size_t size, retsize; if (to >= subdev->size) { + size = 0; to -= subdev->size; continue; } + if (to + len > subdev->size) + size = subdev->size - to; + else + size = len; - /* partial write ? */ - if (to + devops.len > subdev->size) - devops.len = subdev->size - to; + if (!(subdev->flags & MTD_WRITEABLE)) + err = -EROFS; + else if (subdev->write_oob) + err = subdev->write_oob(subdev, to, size, &retsize, + buf); + else + err = -EINVAL; - err = subdev->write_oob(subdev, to, &devops); - ops->retlen += devops.retlen; if (err) - return err; + break; - devops.len = ops->len - ops->retlen; - if (!devops.len) - return 0; + *retlen += retsize; + len -= size; + if (len == 0) + break; - if (devops.datbuf) - devops.datbuf += devops.retlen; - if (devops.oobbuf) - devops.oobbuf += devops.ooblen; + err = -EINVAL; + buf += size; to = 0; } - return -EINVAL; + return err; } static void concat_erase_callback(struct erase_info *instr) @@ -622,60 +636,6 @@ static void concat_resume(struct mtd_info *mtd) } } -static int concat_block_isbad(struct mtd_info *mtd, loff_t ofs) -{ - struct mtd_concat *concat = CONCAT(mtd); - int i, res = 0; - - if (!concat->subdev[0]->block_isbad) - return res; - - if (ofs > mtd->size) - return -EINVAL; - - for (i = 0; i < concat->num_subdev; i++) { - struct mtd_info *subdev = concat->subdev[i]; - - if (ofs >= subdev->size) { - ofs -= subdev->size; - continue; - } - - res = subdev->block_isbad(subdev, ofs); - break; - } - - return res; -} - -static int concat_block_markbad(struct mtd_info *mtd, loff_t ofs) -{ - struct mtd_concat *concat = CONCAT(mtd); - int i, err = -EINVAL; - - if (!concat->subdev[0]->block_markbad) - return 0; - - if (ofs > mtd->size) - return -EINVAL; - - for (i = 0; i < concat->num_subdev; i++) { - struct mtd_info *subdev = concat->subdev[i]; - - if (ofs >= subdev->size) { - ofs -= subdev->size; - continue; - } - - err = subdev->block_markbad(subdev, ofs); - if (!err) - mtd->ecc_stats.badblocks++; - break; - } - - return err; -} - /* * This function constructs a virtual MTD device by concatenating * num_devs MTD devices. A pointer to the new device object is @@ -717,22 +677,18 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c concat->mtd.flags = subdev[0]->flags; concat->mtd.size = subdev[0]->size; concat->mtd.erasesize = subdev[0]->erasesize; - concat->mtd.writesize = subdev[0]->writesize; + concat->mtd.oobblock = subdev[0]->oobblock; concat->mtd.oobsize = subdev[0]->oobsize; concat->mtd.ecctype = subdev[0]->ecctype; concat->mtd.eccsize = subdev[0]->eccsize; - if (subdev[0]->writev) - concat->mtd.writev = concat_writev; + if (subdev[0]->read_ecc) + concat->mtd.read_ecc = concat_read_ecc; + if (subdev[0]->write_ecc) + concat->mtd.write_ecc = concat_write_ecc; if (subdev[0]->read_oob) concat->mtd.read_oob = concat_read_oob; if (subdev[0]->write_oob) concat->mtd.write_oob = concat_write_oob; - if (subdev[0]->block_isbad) - concat->mtd.block_isbad = concat_block_isbad; - if (subdev[0]->block_markbad) - concat->mtd.block_markbad = concat_block_markbad; - - concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks; concat->subdev[0] = subdev[0]; @@ -761,12 +717,12 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c subdev[i]->flags & MTD_WRITEABLE; } concat->mtd.size += subdev[i]->size; - concat->mtd.ecc_stats.badblocks += - subdev[i]->ecc_stats.badblocks; - if (concat->mtd.writesize != subdev[i]->writesize || + if (concat->mtd.oobblock != subdev[i]->oobblock || concat->mtd.oobsize != subdev[i]->oobsize || concat->mtd.ecctype != subdev[i]->ecctype || concat->mtd.eccsize != subdev[i]->eccsize || + !concat->mtd.read_ecc != !subdev[i]->read_ecc || + !concat->mtd.write_ecc != !subdev[i]->write_ecc || !concat->mtd.read_oob != !subdev[i]->read_oob || !concat->mtd.write_oob != !subdev[i]->write_oob) { kfree(concat); @@ -778,11 +734,14 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c } - concat->mtd.ecclayout = subdev[0]->ecclayout; - concat->num_subdev = num_devs; concat->mtd.name = name; + /* + * NOTE: for now, we do not provide any readv()/writev() methods + * because they are messy to implement and they are not + * used to a great extent anyway. + */ concat->mtd.erase = concat_erase; concat->mtd.read = concat_read; concat->mtd.write = concat_write; diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 168d3ba06..9905870f5 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -46,7 +47,6 @@ int add_mtd_device(struct mtd_info *mtd) { int i; - BUG_ON(mtd->writesize == 0); mutex_lock(&mtd_table_mutex); for (i=0; i < MAX_MTD_DEVICES; i++) @@ -254,6 +254,37 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, return ret; } + +/* default_mtd_readv - default mtd readv method for MTD devices that dont + * implement their own + */ + +int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs, + unsigned long count, loff_t from, size_t *retlen) +{ + unsigned long i; + size_t totlen = 0, thislen; + int ret = 0; + + if(!mtd->read) { + ret = -EIO; + } else { + for (i=0; iread(mtd, from, vecs[i].iov_len, &thislen, vecs[i].iov_base); + totlen += thislen; + if (ret || thislen != vecs[i].iov_len) + break; + from += vecs[i].iov_len; + } + } + if (retlen) + *retlen = totlen; + return ret; +} + + EXPORT_SYMBOL(add_mtd_device); EXPORT_SYMBOL(del_mtd_device); EXPORT_SYMBOL(get_mtd_device); @@ -261,6 +292,7 @@ EXPORT_SYMBOL(put_mtd_device); EXPORT_SYMBOL(register_mtd_user); EXPORT_SYMBOL(unregister_mtd_user); EXPORT_SYMBOL(default_mtd_writev); +EXPORT_SYMBOL(default_mtd_readv); #ifdef CONFIG_PROC_FS diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 06a930372..99395911d 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -50,21 +51,16 @@ static int part_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { struct mtd_part *part = PART(mtd); - int res; - if (from >= mtd->size) len = 0; else if (from + len > mtd->size) len = mtd->size - from; - res = part->master->read (part->master, from + part->offset, - len, retlen, buf); - if (unlikely(res)) { - if (res == -EUCLEAN) - mtd->ecc_stats.corrected++; - if (res == -EBADMSG) - mtd->ecc_stats.failed++; - } - return res; + if (part->master->read_ecc == NULL) + return part->master->read (part->master, from + part->offset, + len, retlen, buf); + else + return part->master->read_ecc (part->master, from + part->offset, + len, retlen, buf, NULL, &mtd->oobinfo); } static int part_point (struct mtd_info *mtd, loff_t from, size_t len, @@ -78,7 +74,6 @@ static int part_point (struct mtd_info *mtd, loff_t from, size_t len, return part->master->point (part->master, from + part->offset, len, retlen, buf); } - static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) { struct mtd_part *part = PART(mtd); @@ -86,25 +81,31 @@ static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_ part->master->unpoint (part->master, addr, from + part->offset, len); } -static int part_read_oob(struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops) + +static int part_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel) { struct mtd_part *part = PART(mtd); - int res; - + if (oobsel == NULL) + oobsel = &mtd->oobinfo; if (from >= mtd->size) - return -EINVAL; - if (from + ops->len > mtd->size) - return -EINVAL; - res = part->master->read_oob(part->master, from + part->offset, ops); + len = 0; + else if (from + len > mtd->size) + len = mtd->size - from; + return part->master->read_ecc (part->master, from + part->offset, + len, retlen, buf, eccbuf, oobsel); +} - if (unlikely(res)) { - if (res == -EUCLEAN) - mtd->ecc_stats.corrected++; - if (res == -EBADMSG) - mtd->ecc_stats.failed++; - } - return res; +static int part_read_oob (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) +{ + struct mtd_part *part = PART(mtd); + if (from >= mtd->size) + len = 0; + else if (from + len > mtd->size) + len = mtd->size - from; + return part->master->read_oob (part->master, from + part->offset, + len, retlen, buf); } static int part_read_user_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, @@ -147,23 +148,44 @@ static int part_write (struct mtd_info *mtd, loff_t to, size_t len, len = 0; else if (to + len > mtd->size) len = mtd->size - to; - return part->master->write (part->master, to + part->offset, - len, retlen, buf); + if (part->master->write_ecc == NULL) + return part->master->write (part->master, to + part->offset, + len, retlen, buf); + else + return part->master->write_ecc (part->master, to + part->offset, + len, retlen, buf, NULL, &mtd->oobinfo); + } -static int part_write_oob(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops) +static int part_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, + u_char *eccbuf, struct nand_oobinfo *oobsel) { struct mtd_part *part = PART(mtd); - if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; + if (oobsel == NULL) + oobsel = &mtd->oobinfo; + if (to >= mtd->size) + len = 0; + else if (to + len > mtd->size) + len = mtd->size - to; + return part->master->write_ecc (part->master, to + part->offset, + len, retlen, buf, eccbuf, oobsel); +} +static int part_write_oob (struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) +{ + struct mtd_part *part = PART(mtd); + if (!(mtd->flags & MTD_WRITEABLE)) + return -EROFS; if (to >= mtd->size) - return -EINVAL; - if (to + ops->len > mtd->size) - return -EINVAL; - return part->master->write_oob(part->master, to + part->offset, ops); + len = 0; + else if (to + len > mtd->size) + len = mtd->size - to; + return part->master->write_oob (part->master, to + part->offset, + len, retlen, buf); } static int part_write_user_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, @@ -186,8 +208,52 @@ static int part_writev (struct mtd_info *mtd, const struct kvec *vecs, struct mtd_part *part = PART(mtd); if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; - return part->master->writev (part->master, vecs, count, + if (part->master->writev_ecc == NULL) + return part->master->writev (part->master, vecs, count, to + part->offset, retlen); + else + return part->master->writev_ecc (part->master, vecs, count, + to + part->offset, retlen, + NULL, &mtd->oobinfo); +} + +static int part_readv (struct mtd_info *mtd, struct kvec *vecs, + unsigned long count, loff_t from, size_t *retlen) +{ + struct mtd_part *part = PART(mtd); + if (part->master->readv_ecc == NULL) + return part->master->readv (part->master, vecs, count, + from + part->offset, retlen); + else + return part->master->readv_ecc (part->master, vecs, count, + from + part->offset, retlen, + NULL, &mtd->oobinfo); +} + +static int part_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen, + u_char *eccbuf, struct nand_oobinfo *oobsel) +{ + struct mtd_part *part = PART(mtd); + if (!(mtd->flags & MTD_WRITEABLE)) + return -EROFS; + if (oobsel == NULL) + oobsel = &mtd->oobinfo; + return part->master->writev_ecc (part->master, vecs, count, + to + part->offset, retlen, + eccbuf, oobsel); +} + +static int part_readv_ecc (struct mtd_info *mtd, struct kvec *vecs, + unsigned long count, loff_t from, size_t *retlen, + u_char *eccbuf, struct nand_oobinfo *oobsel) +{ + struct mtd_part *part = PART(mtd); + if (oobsel == NULL) + oobsel = &mtd->oobinfo; + return part->master->readv_ecc (part->master, vecs, count, + from + part->offset, retlen, + eccbuf, oobsel); } static int part_erase (struct mtd_info *mtd, struct erase_info *instr) @@ -263,17 +329,12 @@ static int part_block_isbad (struct mtd_info *mtd, loff_t ofs) static int part_block_markbad (struct mtd_info *mtd, loff_t ofs) { struct mtd_part *part = PART(mtd); - int res; - if (!(mtd->flags & MTD_WRITEABLE)) return -EROFS; if (ofs >= mtd->size) return -EINVAL; ofs += part->offset; - res = part->master->block_markbad(part->master, ofs); - if (!res) - mtd->ecc_stats.badblocks++; - return res; + return part->master->block_markbad(part->master, ofs); } /* @@ -337,7 +398,7 @@ int add_mtd_partitions(struct mtd_info *master, slave->mtd.type = master->type; slave->mtd.flags = master->flags & ~parts[i].mask_flags; slave->mtd.size = parts[i].size; - slave->mtd.writesize = master->writesize; + slave->mtd.oobblock = master->oobblock; slave->mtd.oobsize = master->oobsize; slave->mtd.ecctype = master->ecctype; slave->mtd.eccsize = master->eccsize; @@ -354,6 +415,10 @@ int add_mtd_partitions(struct mtd_info *master, slave->mtd.unpoint = part_unpoint; } + if (master->read_ecc) + slave->mtd.read_ecc = part_read_ecc; + if (master->write_ecc) + slave->mtd.write_ecc = part_write_ecc; if (master->read_oob) slave->mtd.read_oob = part_read_oob; if (master->write_oob) @@ -378,6 +443,12 @@ int add_mtd_partitions(struct mtd_info *master, } if (master->writev) slave->mtd.writev = part_writev; + if (master->readv) + slave->mtd.readv = part_readv; + if (master->writev_ecc) + slave->mtd.writev_ecc = part_writev_ecc; + if (master->readv_ecc) + slave->mtd.readv_ecc = part_readv_ecc; if (master->lock) slave->mtd.lock = part_lock; if (master->unlock) @@ -457,17 +528,8 @@ int add_mtd_partitions(struct mtd_info *master, parts[i].name); } - slave->mtd.ecclayout = master->ecclayout; - if (master->block_isbad) { - uint32_t offs = 0; - - while(offs < slave->mtd.size) { - if (master->block_isbad(master, - offs + slave->offset)) - slave->mtd.ecc_stats.badblocks++; - offs += slave->mtd.erasesize; - } - } + /* copy oobinfo from master */ + memcpy(&slave->mtd.oobinfo, &master->oobinfo, sizeof(slave->mtd.oobinfo)); if(parts[i].mtdp) { /* store the object pointer (caller may or may not register it */ diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index c99302ed3..cfe288a6e 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -11,7 +11,7 @@ config MTD_NAND help This enables support for accessing all type of NAND flash devices. For further information see - . + . config MTD_NAND_VERIFY_WRITE bool "Verify NAND page writes" @@ -23,14 +23,6 @@ config MTD_NAND_VERIFY_WRITE device thinks the write was successful, a bit could have been flipped accidentaly due to device wear or something else. -config MTD_NAND_ECC_SMC - bool "NAND ECC Smart Media byte order" - depends on MTD_NAND - default n - help - Software ECC according to the Smart Media Specification. - The original Linux implementation had byte 0 and 1 swapped. - config MTD_NAND_AUTCPU12 tristate "SmartMediaCard on autronix autcpu12 board" depends on MTD_NAND && ARCH_AUTCPU12 @@ -57,24 +49,12 @@ config MTD_NAND_SPIA help If you had to ask, you don't have one. Say 'N'. -config MTD_NAND_AMS_DELTA - tristate "NAND Flash device on Amstrad E3" - depends on MACH_AMS_DELTA && MTD_NAND - help - Support for NAND flash on Amstrad E3 (Delta). - config MTD_NAND_TOTO tristate "NAND Flash device on TOTO board" - depends on ARCH_OMAP && MTD_NAND && BROKEN + depends on ARCH_OMAP && MTD_NAND help Support for NAND flash on Texas Instruments Toto platform. -config MTD_NAND_TS7250 - tristate "NAND Flash device on TS-7250 board" - depends on MACH_TS72XX && MTD_NAND - help - Support for NAND flash on Technologic Systems TS-7250 platform. - config MTD_NAND_IDS tristate @@ -96,7 +76,7 @@ config MTD_NAND_RTC_FROM4 config MTD_NAND_PPCHAMELEONEVB tristate "NAND Flash device on PPChameleonEVB board" - depends on PPCHAMELEONEVB && MTD_NAND && BROKEN + depends on PPCHAMELEONEVB && MTD_NAND help This enables the NAND flash driver on the PPChameleon EVB Board. @@ -107,7 +87,7 @@ config MTD_NAND_S3C2410 This enables the NAND flash controller on the S3C2410 and S3C2440 SoCs - No board specific support is done by this driver, each board + No board specfic support is done by this driver, each board must advertise a platform_device for the driver to attach. config MTD_NAND_S3C2410_DEBUG @@ -129,22 +109,6 @@ config MTD_NAND_S3C2410_HWECC currently not be able to switch to software, as there is no implementation for ECC method used by the S3C2410 -config MTD_NAND_NDFC - tristate "NDFC NanD Flash Controller" - depends on MTD_NAND && 44x - help - NDFC Nand Flash Controllers are integrated in EP44x SoCs - -config MTD_NAND_S3C2410_CLKSTOP - bool "S3C2410 NAND IDLE clock stop" - depends on MTD_NAND_S3C2410 - default n - help - Stop the clock to the NAND controller when there is no chip - selected to save power. This will mean there is a small delay - when the is NAND chip selected or released, but will save - approximately 5mA of power when there is nothing happening. - config MTD_NAND_DISKONCHIP tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation) (EXPERIMENTAL)" depends on MTD_NAND && EXPERIMENTAL @@ -219,24 +183,11 @@ config MTD_NAND_SHARPSL tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)" depends on MTD_NAND && ARCH_PXA -config MTD_NAND_CS553X - tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)" - depends on MTD_NAND && X86_32 && (X86_PC || X86_GENERICARCH) - help - The CS553x companion chips for the AMD Geode processor - include NAND flash controllers with built-in hardware ECC - capabilities; enabling this option will allow you to use - these. The driver will check the MSRs to verify that the - controller is enabled for NAND, and currently requires that - the controller be in MMIO mode. - - If you say "m", the module will be called "cs553x_nand.ko". - config MTD_NAND_NANDSIM tristate "Support for NAND Flash Simulator" depends on MTD_NAND && MTD_PARTITIONS help - The simulator may simulate various NAND flash chips for the + The simulator may simulate verious NAND flash chips for the MTD nand layer. endmenu diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index f74759351..41742026a 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -7,7 +7,6 @@ obj-$(CONFIG_MTD_NAND) += nand.o nand_ecc.o obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o obj-$(CONFIG_MTD_NAND_SPIA) += spia.o -obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o obj-$(CONFIG_MTD_NAND_TOTO) += toto.o obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o @@ -18,9 +17,6 @@ obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o obj-$(CONFIG_MTD_NAND_H1900) += h1910.o obj-$(CONFIG_MTD_NAND_RTC_FROM4) += rtc_from4.o obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o -obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o -obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o -obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o nand-objs = nand_base.o nand_bbt.o diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c deleted file mode 100644 index a0ba07c36..000000000 --- a/drivers/mtd/nand/ams-delta.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * drivers/mtd/nand/ams-delta.c - * - * Copyright (C) 2006 Jonathan McDowell - * - * Derived from drivers/mtd/toto.c - * - * 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. - * - * Overview: - * This is a device driver for the NAND flash device found on the - * Amstrad E3 (Delta). - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * MTD structure for E3 (Delta) - */ -static struct mtd_info *ams_delta_mtd = NULL; - -#define NAND_MASK (AMS_DELTA_LATCH2_NAND_NRE | AMS_DELTA_LATCH2_NAND_NWE | AMS_DELTA_LATCH2_NAND_CLE | AMS_DELTA_LATCH2_NAND_ALE | AMS_DELTA_LATCH2_NAND_NCE | AMS_DELTA_LATCH2_NAND_NWP) - -/* - * Define partitions for flash devices - */ - -static struct mtd_partition partition_info[] = { - { .name = "Kernel", - .offset = 0, - .size = 3 * SZ_1M + SZ_512K }, - { .name = "u-boot", - .offset = 3 * SZ_1M + SZ_512K, - .size = SZ_256K }, - { .name = "u-boot params", - .offset = 3 * SZ_1M + SZ_512K + SZ_256K, - .size = SZ_256K }, - { .name = "Amstrad LDR", - .offset = 4 * SZ_1M, - .size = SZ_256K }, - { .name = "File system", - .offset = 4 * SZ_1M + 1 * SZ_256K, - .size = 27 * SZ_1M }, - { .name = "PBL reserved", - .offset = 32 * SZ_1M - 3 * SZ_256K, - .size = 3 * SZ_256K }, -}; - -static void ams_delta_write_byte(struct mtd_info *mtd, u_char byte) -{ - struct nand_chip *this = mtd->priv; - - omap_writew(0, (OMAP_MPUIO_BASE + OMAP_MPUIO_IO_CNTL)); - omap_writew(byte, this->IO_ADDR_W); - ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, 0); - ndelay(40); - ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NWE, - AMS_DELTA_LATCH2_NAND_NWE); -} - -static u_char ams_delta_read_byte(struct mtd_info *mtd) -{ - u_char res; - struct nand_chip *this = mtd->priv; - - ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, 0); - ndelay(40); - omap_writew(~0, (OMAP_MPUIO_BASE + OMAP_MPUIO_IO_CNTL)); - res = omap_readw(this->IO_ADDR_R); - ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_NRE, - AMS_DELTA_LATCH2_NAND_NRE); - - return res; -} - -static void ams_delta_write_buf(struct mtd_info *mtd, const u_char *buf, - int len) -{ - int i; - - for (i=0; i bit 2 - * NAND_CLE: bit 1 -> bit 7 - * NAND_ALE: bit 2 -> bit 6 - */ -static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) -{ - - if (ctrl & NAND_CTRL_CHANGE) { - unsigned long bits; - - bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0; - bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0; - bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0; - - ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE | - AMS_DELTA_LATCH2_NAND_ALE | - AMS_DELTA_LATCH2_NAND_NCE, bits); - } - - if (cmd != NAND_CMD_NONE) - ams_delta_write_byte(mtd, cmd); -} - -static int ams_delta_nand_ready(struct mtd_info *mtd) -{ - return omap_get_gpio_datain(AMS_DELTA_GPIO_PIN_NAND_RB); -} - -/* - * Main initialization routine - */ -static int __init ams_delta_init(void) -{ - struct nand_chip *this; - int err = 0; - - /* Allocate memory for MTD device structure and private data */ - ams_delta_mtd = kmalloc(sizeof(struct mtd_info) + - sizeof(struct nand_chip), GFP_KERNEL); - if (!ams_delta_mtd) { - printk (KERN_WARNING "Unable to allocate E3 NAND MTD device structure.\n"); - err = -ENOMEM; - goto out; - } - - ams_delta_mtd->owner = THIS_MODULE; - - /* Get pointer to private data */ - this = (struct nand_chip *) (&ams_delta_mtd[1]); - - /* Initialize structures */ - memset(ams_delta_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); - - /* Link the private data with the MTD structure */ - ams_delta_mtd->priv = this; - - /* Set address of NAND IO lines */ - this->IO_ADDR_R = (OMAP_MPUIO_BASE + OMAP_MPUIO_INPUT_LATCH); - this->IO_ADDR_W = (OMAP_MPUIO_BASE + OMAP_MPUIO_OUTPUT); - this->read_byte = ams_delta_read_byte; - this->write_buf = ams_delta_write_buf; - this->read_buf = ams_delta_read_buf; - this->verify_buf = ams_delta_verify_buf; - this->cmd_ctrl = ams_delta_hwcontrol; - if (!omap_request_gpio(AMS_DELTA_GPIO_PIN_NAND_RB)) { - this->dev_ready = ams_delta_nand_ready; - } else { - this->dev_ready = NULL; - printk(KERN_NOTICE "Couldn't request gpio for Delta NAND ready.\n"); - } - /* 25 us command delay time */ - this->chip_delay = 30; - this->ecc.mode = NAND_ECC_SOFT; - - /* Set chip enabled, but */ - ams_delta_latch2_write(NAND_MASK, AMS_DELTA_LATCH2_NAND_NRE | - AMS_DELTA_LATCH2_NAND_NWE | - AMS_DELTA_LATCH2_NAND_NCE | - AMS_DELTA_LATCH2_NAND_NWP); - - /* Scan to find existance of the device */ - if (nand_scan(ams_delta_mtd, 1)) { - err = -ENXIO; - goto out_mtd; - } - - /* Register the partitions */ - add_mtd_partitions(ams_delta_mtd, partition_info, - ARRAY_SIZE(partition_info)); - - goto out; - - out_mtd: - kfree(ams_delta_mtd); - out: - return err; -} - -module_init(ams_delta_init); - -/* - * Clean up routine - */ -static void __exit ams_delta_cleanup(void) -{ - /* Release resources, unregister device */ - nand_release(ams_delta_mtd); - - /* Free the MTD device structure */ - kfree(ams_delta_mtd); -} -module_exit(ams_delta_cleanup); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Jonathan McDowell "); -MODULE_DESCRIPTION("Glue layer for NAND flash on Amstrad E3 (Delta)"); diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index 31228334d..bde355091 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -39,21 +38,22 @@ */ static struct mtd_info *au1550_mtd = NULL; static void __iomem *p_nand; -static int nand_width = 1; /* default x8 */ -static void (*au1550_write_byte)(struct mtd_info *, u_char); +static int nand_width = 1; /* default x8*/ /* * Define partitions for flash device */ static const struct mtd_partition partition_info[] = { { - .name = "NAND FS 0", - .offset = 0, - .size = 8 * 1024 * 1024}, + .name = "NAND FS 0", + .offset = 0, + .size = 8*1024*1024 + }, { - .name = "NAND FS 1", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL} + .name = "NAND FS 1", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL + } }; /** @@ -129,6 +129,21 @@ static u16 au_read_word(struct mtd_info *mtd) return ret; } +/** + * au_write_word - write one word to the chip + * @mtd: MTD device structure + * @word: data word to write + * + * write function for 16bit buswith without + * endianess conversion + */ +static void au_write_word(struct mtd_info *mtd, u16 word) +{ + struct nand_chip *this = mtd->priv; + writew(word, this->IO_ADDR_W); + au_sync(); +} + /** * au_write_buf - write buffer to chip * @mtd: MTD device structure @@ -142,7 +157,7 @@ static void au_write_buf(struct mtd_info *mtd, const u_char *buf, int len) int i; struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_W); au_sync(); } @@ -161,7 +176,7 @@ static void au_read_buf(struct mtd_info *mtd, u_char *buf, int len) int i; struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_R); au_sync(); } @@ -180,7 +195,7 @@ static int au_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) int i; struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_R)) return -EFAULT; au_sync(); @@ -204,7 +219,7 @@ static void au_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_W); au_sync(); } @@ -226,7 +241,7 @@ static void au_read_buf16(struct mtd_info *mtd, u_char *buf, int len) u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_R); au_sync(); } @@ -247,7 +262,7 @@ static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) { + for (i=0; iIO_ADDR_R)) return -EFAULT; au_sync(); @@ -255,52 +270,32 @@ static int au_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) return 0; } -/* Select the chip by setting nCE to low */ -#define NAND_CTL_SETNCE 1 -/* Deselect the chip by setting nCE to high */ -#define NAND_CTL_CLRNCE 2 -/* Select the command latch by setting CLE to high */ -#define NAND_CTL_SETCLE 3 -/* Deselect the command latch by setting CLE to low */ -#define NAND_CTL_CLRCLE 4 -/* Select the address latch by setting ALE to high */ -#define NAND_CTL_SETALE 5 -/* Deselect the address latch by setting ALE to low */ -#define NAND_CTL_CLRALE 6 static void au1550_hwcontrol(struct mtd_info *mtd, int cmd) { register struct nand_chip *this = mtd->priv; - switch (cmd) { + switch(cmd){ - case NAND_CTL_SETCLE: - this->IO_ADDR_W = p_nand + MEM_STNAND_CMD; - break; - - case NAND_CTL_CLRCLE: - this->IO_ADDR_W = p_nand + MEM_STNAND_DATA; - break; - - case NAND_CTL_SETALE: - this->IO_ADDR_W = p_nand + MEM_STNAND_ADDR; - break; + case NAND_CTL_SETCLE: this->IO_ADDR_W = p_nand + MEM_STNAND_CMD; break; + case NAND_CTL_CLRCLE: this->IO_ADDR_W = p_nand + MEM_STNAND_DATA; break; + case NAND_CTL_SETALE: this->IO_ADDR_W = p_nand + MEM_STNAND_ADDR; break; case NAND_CTL_CLRALE: this->IO_ADDR_W = p_nand + MEM_STNAND_DATA; - /* FIXME: Nobody knows why this is necessary, + /* FIXME: Nobody knows why this is neccecary, * but it works only that way */ udelay(1); break; case NAND_CTL_SETNCE: /* assert (force assert) chip enable */ - au_writel((1 << (4 + NAND_CS)), MEM_STNDCTL); + au_writel((1<<(4+NAND_CS)) , MEM_STNDCTL); break; break; case NAND_CTL_CLRNCE: - /* deassert chip enable */ - au_writel(0, MEM_STNDCTL); + /* deassert chip enable */ + au_writel(0, MEM_STNDCTL); break; break; } @@ -317,200 +312,69 @@ int au1550_device_ready(struct mtd_info *mtd) return ret; } -/** - * au1550_select_chip - control -CE line - * Forbid driving -CE manually permitting the NAND controller to do this. - * Keeping -CE asserted during the whole sector reads interferes with the - * NOR flash and PCMCIA drivers as it causes contention on the static bus. - * We only have to hold -CE low for the NAND read commands since the flash - * chip needs it to be asserted during chip not ready time but the NAND - * controller keeps it released. - * - * @mtd: MTD device structure - * @chip: chipnumber to select, -1 for deselect - */ -static void au1550_select_chip(struct mtd_info *mtd, int chip) -{ -} - -/** - * au1550_command - Send command to NAND device - * @mtd: MTD device structure - * @command: the command to be sent - * @column: the column address for this command, -1 if none - * @page_addr: the page address for this command, -1 if none - */ -static void au1550_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) -{ - register struct nand_chip *this = mtd->priv; - int ce_override = 0, i; - ulong flags; - - /* Begin command latch cycle */ - au1550_hwcontrol(mtd, NAND_CTL_SETCLE); - /* - * Write out the command to the device. - */ - if (command == NAND_CMD_SEQIN) { - int readcmd; - - if (column >= mtd->writesize) { - /* OOB area */ - column -= mtd->writesize; - readcmd = NAND_CMD_READOOB; - } else if (column < 256) { - /* First 256 bytes --> READ0 */ - readcmd = NAND_CMD_READ0; - } else { - column -= 256; - readcmd = NAND_CMD_READ1; - } - au1550_write_byte(mtd, readcmd); - } - au1550_write_byte(mtd, command); - - /* Set ALE and clear CLE to start address cycle */ - au1550_hwcontrol(mtd, NAND_CTL_CLRCLE); - - if (column != -1 || page_addr != -1) { - au1550_hwcontrol(mtd, NAND_CTL_SETALE); - - /* Serially input address */ - if (column != -1) { - /* Adjust columns for 16 bit buswidth */ - if (this->options & NAND_BUSWIDTH_16) - column >>= 1; - au1550_write_byte(mtd, column); - } - if (page_addr != -1) { - au1550_write_byte(mtd, (u8)(page_addr & 0xff)); - - if (command == NAND_CMD_READ0 || - command == NAND_CMD_READ1 || - command == NAND_CMD_READOOB) { - /* - * NAND controller will release -CE after - * the last address byte is written, so we'll - * have to forcibly assert it. No interrupts - * are allowed while we do this as we don't - * want the NOR flash or PCMCIA drivers to - * steal our precious bytes of data... - */ - ce_override = 1; - local_irq_save(flags); - au1550_hwcontrol(mtd, NAND_CTL_SETNCE); - } - - au1550_write_byte(mtd, (u8)(page_addr >> 8)); - - /* One more address cycle for devices > 32MiB */ - if (this->chipsize > (32 << 20)) - au1550_write_byte(mtd, (u8)((page_addr >> 16) & 0x0f)); - } - /* Latch in address */ - au1550_hwcontrol(mtd, NAND_CTL_CLRALE); - } - - /* - * Program and erase have their own busy handlers. - * Status and sequential in need no delay. - */ - switch (command) { - - case NAND_CMD_PAGEPROG: - case NAND_CMD_ERASE1: - case NAND_CMD_ERASE2: - case NAND_CMD_SEQIN: - case NAND_CMD_STATUS: - return; - - case NAND_CMD_RESET: - break; - - case NAND_CMD_READ0: - case NAND_CMD_READ1: - case NAND_CMD_READOOB: - /* Check if we're really driving -CE low (just in case) */ - if (unlikely(!ce_override)) - break; - - /* Apply a short delay always to ensure that we do wait tWB. */ - ndelay(100); - /* Wait for a chip to become ready... */ - for (i = this->chip_delay; !this->dev_ready(mtd) && i > 0; --i) - udelay(1); - - /* Release -CE and re-enable interrupts. */ - au1550_hwcontrol(mtd, NAND_CTL_CLRNCE); - local_irq_restore(flags); - return; - } - /* Apply this short delay always to ensure that we do wait tWB. */ - ndelay(100); - - while(!this->dev_ready(mtd)); -} - - /* * Main initialization routine */ -static int __init au1xxx_nand_init(void) +int __init au1xxx_nand_init (void) { struct nand_chip *this; - u16 boot_swapboot = 0; /* default value */ + u16 boot_swapboot = 0; /* default value */ int retval; u32 mem_staddr; u32 nand_phys; /* Allocate memory for MTD device structure and private data */ - au1550_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + au1550_mtd = kmalloc (sizeof(struct mtd_info) + + sizeof (struct nand_chip), GFP_KERNEL); if (!au1550_mtd) { - printk("Unable to allocate NAND MTD dev structure.\n"); + printk ("Unable to allocate NAND MTD dev structure.\n"); return -ENOMEM; } /* Get pointer to private data */ - this = (struct nand_chip *)(&au1550_mtd[1]); + this = (struct nand_chip *) (&au1550_mtd[1]); /* Initialize structures */ - memset(au1550_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) au1550_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ au1550_mtd->priv = this; - au1550_mtd->owner = THIS_MODULE; - /* MEM_STNDCTL: disable ints, disable nand boot */ - au_writel(0, MEM_STNDCTL); + /* disable interrupts */ + au_writel(au_readl(MEM_STNDCTL) & ~(1<<8), MEM_STNDCTL); + + /* disable NAND boot */ + au_writel(au_readl(MEM_STNDCTL) & ~(1<<0), MEM_STNDCTL); #ifdef CONFIG_MIPS_PB1550 /* set gpio206 high */ - au_writel(au_readl(GPIO2_DIR) & ~(1 << 6), GPIO2_DIR); + au_writel(au_readl(GPIO2_DIR) & ~(1<<6), GPIO2_DIR); - boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) | ((bcsr->status >> 6) & 0x1); + boot_swapboot = (au_readl(MEM_STSTAT) & (0x7<<1)) | + ((bcsr->status >> 6) & 0x1); switch (boot_swapboot) { - case 0: - case 2: - case 8: - case 0xC: - case 0xD: - /* x16 NAND Flash */ - nand_width = 0; - break; - case 1: - case 9: - case 3: - case 0xE: - case 0xF: - /* x8 NAND Flash */ - nand_width = 1; - break; - default: - printk("Pb1550 NAND: bad boot:swap\n"); - retval = -EINVAL; - goto outmem; + case 0: + case 2: + case 8: + case 0xC: + case 0xD: + /* x16 NAND Flash */ + nand_width = 0; + break; + case 1: + case 9: + case 3: + case 0xE: + case 0xF: + /* x8 NAND Flash */ + nand_width = 1; + break; + default: + printk("Pb1550 NAND: bad boot:swap\n"); + retval = -EINVAL; + goto outmem; } #endif @@ -560,22 +424,21 @@ static int __init au1xxx_nand_init(void) /* make controller and MTD agree */ if (NAND_CS == 0) - nand_width = au_readl(MEM_STCFG0) & (1 << 22); + nand_width = au_readl(MEM_STCFG0) & (1<<22); if (NAND_CS == 1) - nand_width = au_readl(MEM_STCFG1) & (1 << 22); + nand_width = au_readl(MEM_STCFG1) & (1<<22); if (NAND_CS == 2) - nand_width = au_readl(MEM_STCFG2) & (1 << 22); + nand_width = au_readl(MEM_STCFG2) & (1<<22); if (NAND_CS == 3) - nand_width = au_readl(MEM_STCFG3) & (1 << 22); + nand_width = au_readl(MEM_STCFG3) & (1<<22); + /* Set address of hardware control function */ + this->hwcontrol = au1550_hwcontrol; this->dev_ready = au1550_device_ready; - this->select_chip = au1550_select_chip; - this->cmdfunc = au1550_command; - /* 30 us command delay time */ this->chip_delay = 30; - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; this->options = NAND_NO_AUTOINCR; @@ -583,14 +446,15 @@ static int __init au1xxx_nand_init(void) this->options |= NAND_BUSWIDTH_16; this->read_byte = (!nand_width) ? au_read_byte16 : au_read_byte; - au1550_write_byte = (!nand_width) ? au_write_byte16 : au_write_byte; + this->write_byte = (!nand_width) ? au_write_byte16 : au_write_byte; + this->write_word = au_write_word; this->read_word = au_read_word; this->write_buf = (!nand_width) ? au_write_buf16 : au_write_buf; this->read_buf = (!nand_width) ? au_read_buf16 : au_read_buf; this->verify_buf = (!nand_width) ? au_verify_buf16 : au_verify_buf; /* Scan to find existence of the device */ - if (nand_scan(au1550_mtd, 1)) { + if (nand_scan (au1550_mtd, 1)) { retval = -ENXIO; goto outio; } @@ -601,10 +465,10 @@ static int __init au1xxx_nand_init(void) return 0; outio: - iounmap((void *)p_nand); + iounmap ((void *)p_nand); outmem: - kfree(au1550_mtd); + kfree (au1550_mtd); return retval; } @@ -613,21 +477,22 @@ module_init(au1xxx_nand_init); /* * Clean up routine */ -static void __exit au1550_cleanup(void) +#ifdef MODULE +static void __exit au1550_cleanup (void) { - struct nand_chip *this = (struct nand_chip *)&au1550_mtd[1]; + struct nand_chip *this = (struct nand_chip *) &au1550_mtd[1]; /* Release resources, unregister device */ - nand_release(au1550_mtd); + nand_release (au1550_mtd); /* Free the MTD device structure */ - kfree(au1550_mtd); + kfree (au1550_mtd); /* Unmap */ - iounmap((void *)p_nand); + iounmap ((void *)p_nand); } - module_exit(au1550_cleanup); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Embedded Edge, LLC"); diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index fe94ae9ae..a3c7fea40 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c @@ -4,7 +4,7 @@ * Copyright (c) 2002 Thomas Gleixner * * Derived from drivers/mtd/spia.c - * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) + * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) * * $Id: autcpu12.c,v 1.23 2005/11/07 11:14:30 gleixner Exp $ * @@ -42,7 +42,12 @@ * MTD structure for AUTCPU12 board */ static struct mtd_info *autcpu12_mtd = NULL; -static void __iomem *autcpu12_fio_base; + +static int autcpu12_io_base = CS89712_VIRT_BASE; +static int autcpu12_fio_pbase = AUTCPU12_PHYS_SMC; +static int autcpu12_fio_ctrl = AUTCPU12_SMC_SELECT_OFFSET; +static int autcpu12_pedr = AUTCPU12_SMC_PORT_OFFSET; +static void __iomem * autcpu12_fio_base; /* * Define partitions for flash devices @@ -89,131 +94,108 @@ static struct mtd_partition partition_info128k[] = { #define NUM_PARTITIONS128K 2 /* * hardware specific access to control-lines - * - * ALE bit 4 autcpu12_pedr - * CLE bit 5 autcpu12_pedr - * NCE bit 0 fio_ctrl - * - */ -static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +*/ +static void autcpu12_hwcontrol(struct mtd_info *mtd, int cmd) { - struct nand_chip *chip = mtd->priv; - if (ctrl & NAND_CTRL_CHANGE) { - void __iomem *addr - unsigned char bits; + switch(cmd){ - addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET; - bits = (ctrl & NAND_CLE) << 4; - bits |= (ctrl & NAND_ALE) << 2; - writeb((readb(addr) & ~0x30) | bits, addr); + case NAND_CTL_SETCLE: (*(volatile unsigned char *) (autcpu12_io_base + autcpu12_pedr)) |= AUTCPU12_SMC_CLE; break; + case NAND_CTL_CLRCLE: (*(volatile unsigned char *) (autcpu12_io_base + autcpu12_pedr)) &= ~AUTCPU12_SMC_CLE; break; - addr = autcpu12_fio_base + AUTCPU12_SMC_SELECT_OFFSET; - writeb((readb(addr) & ~0x1) | (ctrl & NAND_NCE), addr); - } + case NAND_CTL_SETALE: (*(volatile unsigned char *) (autcpu12_io_base + autcpu12_pedr)) |= AUTCPU12_SMC_ALE; break; + case NAND_CTL_CLRALE: (*(volatile unsigned char *) (autcpu12_io_base + autcpu12_pedr)) &= ~AUTCPU12_SMC_ALE; break; - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); + case NAND_CTL_SETNCE: (*(volatile unsigned char *) (autcpu12_fio_base + autcpu12_fio_ctrl)) = 0x01; break; + case NAND_CTL_CLRNCE: (*(volatile unsigned char *) (autcpu12_fio_base + autcpu12_fio_ctrl)) = 0x00; break; + } } /* - * read device ready pin - */ +* read device ready pin +*/ int autcpu12_device_ready(struct mtd_info *mtd) { - void __iomem *addr = CS89712_VIRT_BASE + AUTCPU12_SMC_PORT_OFFSET; - return readb(addr) & AUTCPU12_SMC_RDY; + return ( (*(volatile unsigned char *) (autcpu12_io_base + autcpu12_pedr)) & AUTCPU12_SMC_RDY) ? 1 : 0; + } /* * Main initialization routine */ -static int __init autcpu12_init(void) +int __init autcpu12_init (void) { struct nand_chip *this; int err = 0; /* Allocate memory for MTD device structure and private data */ - autcpu12_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), - GFP_KERNEL); + autcpu12_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); if (!autcpu12_mtd) { - printk("Unable to allocate AUTCPU12 NAND MTD device structure.\n"); + printk ("Unable to allocate AUTCPU12 NAND MTD device structure.\n"); err = -ENOMEM; goto out; } /* map physical adress */ - autcpu12_fio_base = ioremap(AUTCPU12_PHYS_SMC, SZ_1K); - if (!autcpu12_fio_base) { + autcpu12_fio_base = ioremap(autcpu12_fio_pbase,SZ_1K); + if(!autcpu12_fio_base){ printk("Ioremap autcpu12 SmartMedia Card failed\n"); err = -EIO; goto out_mtd; } /* Get pointer to private data */ - this = (struct nand_chip *)(&autcpu12_mtd[1]); + this = (struct nand_chip *) (&autcpu12_mtd[1]); /* Initialize structures */ - memset(autcpu12_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) autcpu12_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ autcpu12_mtd->priv = this; - autcpu12_mtd->owner = THIS_MODULE; /* Set address of NAND IO lines */ this->IO_ADDR_R = autcpu12_fio_base; this->IO_ADDR_W = autcpu12_fio_base; - this->cmd_ctrl = autcpu12_hwcontrol; + this->hwcontrol = autcpu12_hwcontrol; this->dev_ready = autcpu12_device_ready; /* 20 us command delay time */ this->chip_delay = 20; - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; /* Enable the following for a flash based bad block table */ /* - this->options = NAND_USE_FLASH_BBT; - */ + this->options = NAND_USE_FLASH_BBT; + */ this->options = NAND_USE_FLASH_BBT; /* Scan to find existance of the device */ - if (nand_scan(autcpu12_mtd, 1)) { + if (nand_scan (autcpu12_mtd, 1)) { err = -ENXIO; goto out_ior; } /* Register the partitions */ - switch (autcpu12_mtd->size) { - case SZ_16M: - add_mtd_partitions(autcpu12_mtd, partition_info16k, - NUM_PARTITIONS16K); - break; - case SZ_32M: - add_mtd_partitions(autcpu12_mtd, partition_info32k, - NUM_PARTITIONS32K); - break; - case SZ_64M: - add_mtd_partitions(autcpu12_mtd, partition_info64k, - NUM_PARTITIONS64K); - break; - case SZ_128M: - add_mtd_partitions(autcpu12_mtd, partition_info128k, - NUM_PARTITIONS128K); - break; - default: - printk("Unsupported SmartMedia device\n"); + switch(autcpu12_mtd->size){ + case SZ_16M: add_mtd_partitions(autcpu12_mtd, partition_info16k, NUM_PARTITIONS16K); break; + case SZ_32M: add_mtd_partitions(autcpu12_mtd, partition_info32k, NUM_PARTITIONS32K); break; + case SZ_64M: add_mtd_partitions(autcpu12_mtd, partition_info64k, NUM_PARTITIONS64K); break; + case SZ_128M: add_mtd_partitions(autcpu12_mtd, partition_info128k, NUM_PARTITIONS128K); break; + default: { + printk ("Unsupported SmartMedia device\n"); err = -ENXIO; goto out_ior; + } } goto out; - out_ior: - iounmap(autcpu12_fio_base); - out_mtd: - kfree(autcpu12_mtd); - out: +out_ior: + iounmap((void *)autcpu12_fio_base); +out_mtd: + kfree (autcpu12_mtd); +out: return err; } @@ -222,19 +204,20 @@ module_init(autcpu12_init); /* * Clean up routine */ -static void __exit autcpu12_cleanup(void) +#ifdef MODULE +static void __exit autcpu12_cleanup (void) { /* Release resources, unregister device */ - nand_release(autcpu12_mtd); + nand_release (autcpu12_mtd); /* unmap physical adress */ - iounmap(autcpu12_fio_base); + iounmap((void *)autcpu12_fio_base); /* Free the MTD device structure */ - kfree(autcpu12_mtd); + kfree (autcpu12_mtd); } - module_exit(autcpu12_cleanup); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Thomas Gleixner "); diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c deleted file mode 100644 index e0a1d386e..000000000 --- a/drivers/mtd/nand/cs553x_nand.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * drivers/mtd/nand/cs553x_nand.c - * - * (C) 2005, 2006 Red Hat Inc. - * - * Author: David Woodhouse - * Tom Sylla - * - * 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. - * - * Overview: - * This is a device driver for the NAND flash controller found on - * the AMD CS5535/CS5536 companion chipsets for the Geode processor. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#define NR_CS553X_CONTROLLERS 4 - -#define MSR_DIVIL_GLD_CAP 0x51400000 /* DIVIL capabilitiies */ -#define CAP_CS5535 0x2df000ULL -#define CAP_CS5536 0x5df500ULL - -/* NAND Timing MSRs */ -#define MSR_NANDF_DATA 0x5140001b /* NAND Flash Data Timing MSR */ -#define MSR_NANDF_CTL 0x5140001c /* NAND Flash Control Timing */ -#define MSR_NANDF_RSVD 0x5140001d /* Reserved */ - -/* NAND BAR MSRs */ -#define MSR_DIVIL_LBAR_FLSH0 0x51400010 /* Flash Chip Select 0 */ -#define MSR_DIVIL_LBAR_FLSH1 0x51400011 /* Flash Chip Select 1 */ -#define MSR_DIVIL_LBAR_FLSH2 0x51400012 /* Flash Chip Select 2 */ -#define MSR_DIVIL_LBAR_FLSH3 0x51400013 /* Flash Chip Select 3 */ - /* Each made up of... */ -#define FLSH_LBAR_EN (1ULL<<32) -#define FLSH_NOR_NAND (1ULL<<33) /* 1 for NAND */ -#define FLSH_MEM_IO (1ULL<<34) /* 1 for MMIO */ - /* I/O BARs have BASE_ADDR in bits 15:4, IO_MASK in 47:36 */ - /* MMIO BARs have BASE_ADDR in bits 31:12, MEM_MASK in 63:44 */ - -/* Pin function selection MSR (IDE vs. flash on the IDE pins) */ -#define MSR_DIVIL_BALL_OPTS 0x51400015 -#define PIN_OPT_IDE (1<<0) /* 0 for flash, 1 for IDE */ - -/* Registers within the NAND flash controller BAR -- memory mapped */ -#define MM_NAND_DATA 0x00 /* 0 to 0x7ff, in fact */ -#define MM_NAND_CTL 0x800 /* Any even address 0x800-0x80e */ -#define MM_NAND_IO 0x801 /* Any odd address 0x801-0x80f */ -#define MM_NAND_STS 0x810 -#define MM_NAND_ECC_LSB 0x811 -#define MM_NAND_ECC_MSB 0x812 -#define MM_NAND_ECC_COL 0x813 -#define MM_NAND_LAC 0x814 -#define MM_NAND_ECC_CTL 0x815 - -/* Registers within the NAND flash controller BAR -- I/O mapped */ -#define IO_NAND_DATA 0x00 /* 0 to 3, in fact */ -#define IO_NAND_CTL 0x04 -#define IO_NAND_IO 0x05 -#define IO_NAND_STS 0x06 -#define IO_NAND_ECC_CTL 0x08 -#define IO_NAND_ECC_LSB 0x09 -#define IO_NAND_ECC_MSB 0x0a -#define IO_NAND_ECC_COL 0x0b -#define IO_NAND_LAC 0x0c - -#define CS_NAND_CTL_DIST_EN (1<<4) /* Enable NAND Distract interrupt */ -#define CS_NAND_CTL_RDY_INT_MASK (1<<3) /* Enable RDY/BUSY# interrupt */ -#define CS_NAND_CTL_ALE (1<<2) -#define CS_NAND_CTL_CLE (1<<1) -#define CS_NAND_CTL_CE (1<<0) /* Keep low; 1 to reset */ - -#define CS_NAND_STS_FLASH_RDY (1<<3) -#define CS_NAND_CTLR_BUSY (1<<2) -#define CS_NAND_CMD_COMP (1<<1) -#define CS_NAND_DIST_ST (1<<0) - -#define CS_NAND_ECC_PARITY (1<<2) -#define CS_NAND_ECC_CLRECC (1<<1) -#define CS_NAND_ECC_ENECC (1<<0) - -static void cs553x_read_buf(struct mtd_info *mtd, u_char *buf, int len) -{ - struct nand_chip *this = mtd->priv; - - while (unlikely(len > 0x800)) { - memcpy_fromio(buf, this->IO_ADDR_R, 0x800); - buf += 0x800; - len -= 0x800; - } - memcpy_fromio(buf, this->IO_ADDR_R, len); -} - -static void cs553x_write_buf(struct mtd_info *mtd, const u_char *buf, int len) -{ - struct nand_chip *this = mtd->priv; - - while (unlikely(len > 0x800)) { - memcpy_toio(this->IO_ADDR_R, buf, 0x800); - buf += 0x800; - len -= 0x800; - } - memcpy_toio(this->IO_ADDR_R, buf, len); -} - -static unsigned char cs553x_read_byte(struct mtd_info *mtd) -{ - struct nand_chip *this = mtd->priv; - return readb(this->IO_ADDR_R); -} - -static void cs553x_write_byte(struct mtd_info *mtd, u_char byte) -{ - struct nand_chip *this = mtd->priv; - int i = 100000; - - while (i && readb(this->IO_ADDR_R + MM_NAND_STS) & CS_NAND_CTLR_BUSY) { - udelay(1); - i--; - } - writeb(byte, this->IO_ADDR_W + 0x801); -} - -static void cs553x_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) -{ - struct nand_chip *this = mtd->priv; - void __iomem *mmio_base = this->IO_ADDR_R; - if (ctrl & NAND_CTRL_CHANGE) { - unsigned char ctl = (ctrl & ~NAND_CTRL_CHANGE ) ^ 0x01; - writeb(ctl, mmio_base + MM_NAND_CTL); - } - if (cmd != NAND_CMD_NONE) - cs553x_write_byte(mtd, cmd); -} - -static int cs553x_device_ready(struct mtd_info *mtd) -{ - struct nand_chip *this = mtd->priv; - void __iomem *mmio_base = this->IO_ADDR_R; - unsigned char foo = readb(mmio_base + MM_NAND_STS); - - return (foo & CS_NAND_STS_FLASH_RDY) && !(foo & CS_NAND_CTLR_BUSY); -} - -static void cs_enable_hwecc(struct mtd_info *mtd, int mode) -{ - struct nand_chip *this = mtd->priv; - void __iomem *mmio_base = this->IO_ADDR_R; - - writeb(0x07, mmio_base + MM_NAND_ECC_CTL); -} - -static int cs_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) -{ - uint32_t ecc; - struct nand_chip *this = mtd->priv; - void __iomem *mmio_base = this->IO_ADDR_R; - - ecc = readl(mmio_base + MM_NAND_STS); - - ecc_code[1] = ecc >> 8; - ecc_code[0] = ecc >> 16; - ecc_code[2] = ecc >> 24; - return 0; -} - -static struct mtd_info *cs553x_mtd[4]; - -static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) -{ - int err = 0; - struct nand_chip *this; - struct mtd_info *new_mtd; - - printk(KERN_NOTICE "Probing CS553x NAND controller CS#%d at %sIO 0x%08lx\n", cs, mmio?"MM":"P", adr); - - if (!mmio) { - printk(KERN_NOTICE "PIO mode not yet implemented for CS553X NAND controller\n"); - return -ENXIO; - } - - /* Allocate memory for MTD device structure and private data */ - new_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); - if (!new_mtd) { - printk(KERN_WARNING "Unable to allocate CS553X NAND MTD device structure.\n"); - err = -ENOMEM; - goto out; - } - - /* Get pointer to private data */ - this = (struct nand_chip *)(&new_mtd[1]); - - /* Initialize structures */ - memset(new_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); - - /* Link the private data with the MTD structure */ - new_mtd->priv = this; - new_mtd->owner = THIS_MODULE; - - /* map physical address */ - this->IO_ADDR_R = this->IO_ADDR_W = ioremap(adr, 4096); - if (!this->IO_ADDR_R) { - printk(KERN_WARNING "ioremap cs553x NAND @0x%08lx failed\n", adr); - err = -EIO; - goto out_mtd; - } - - this->cmd_ctrl = cs553x_hwcontrol; - this->dev_ready = cs553x_device_ready; - this->read_byte = cs553x_read_byte; - this->read_buf = cs553x_read_buf; - this->write_buf = cs553x_write_buf; - - this->chip_delay = 0; - - this->ecc.mode = NAND_ECC_HW; - this->ecc.size = 256; - this->ecc.bytes = 3; - this->ecc.hwctl = cs_enable_hwecc; - this->ecc.calculate = cs_calculate_ecc; - this->ecc.correct = nand_correct_data; - - /* Enable the following for a flash based bad block table */ - this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; - - /* Scan to find existance of the device */ - if (nand_scan(new_mtd, 1)) { - err = -ENXIO; - goto out_ior; - } - - cs553x_mtd[cs] = new_mtd; - goto out; - -out_ior: - iounmap((void *)this->IO_ADDR_R); -out_mtd: - kfree(new_mtd); -out: - return err; -} - -static int is_geode(void) -{ - /* These are the CPUs which will have a CS553[56] companion chip */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 == 5 && - boot_cpu_data.x86_model == 10) - return 1; /* Geode LX */ - - if ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC || - boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) && - boot_cpu_data.x86 == 5 && - boot_cpu_data.x86_model == 5) - return 1; /* Geode GX (née GX2) */ - - return 0; -} - -static int __init cs553x_init(void) -{ - int err = -ENXIO; - int i; - uint64_t val; - - /* If the CPU isn't a Geode GX or LX, abort */ - if (!is_geode()) - return -ENXIO; - - /* If it doesn't have the CS553[56], abort */ - rdmsrl(MSR_DIVIL_GLD_CAP, val); - val &= ~0xFFULL; - if (val != CAP_CS5535 && val != CAP_CS5536) - return -ENXIO; - - /* If it doesn't have the NAND controller enabled, abort */ - rdmsrl(MSR_DIVIL_BALL_OPTS, val); - if (val & 1) { - printk(KERN_INFO "CS553x NAND controller: Flash I/O not enabled in MSR_DIVIL_BALL_OPTS.\n"); - return -ENXIO; - } - - for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { - rdmsrl(MSR_DIVIL_LBAR_FLSH0 + i, val); - - if ((val & (FLSH_LBAR_EN|FLSH_NOR_NAND)) == (FLSH_LBAR_EN|FLSH_NOR_NAND)) - err = cs553x_init_one(i, !!(val & FLSH_MEM_IO), val & 0xFFFFFFFF); - } - - /* Register all devices together here. This means we can easily hack it to - do mtdconcat etc. if we want to. */ - for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { - if (cs553x_mtd[i]) { - add_mtd_device(cs553x_mtd[i]); - - /* If any devices registered, return success. Else the last error. */ - err = 0; - } - } - - return err; -} - -module_init(cs553x_init); - -static void __exit cs553x_cleanup(void) -{ - int i; - - for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { - struct mtd_info *mtd = cs553x_mtd[i]; - struct nand_chip *this; - void __iomem *mmio_base; - - if (!mtd) - break; - - this = cs553x_mtd[i]->priv; - mmio_base = this->IO_ADDR_R; - - /* Release resources, unregister device */ - nand_release(cs553x_mtd[i]); - cs553x_mtd[i] = NULL; - - /* unmap physical adress */ - iounmap(mmio_base); - - /* Free the MTD device structure */ - kfree(mtd); - } -} - -module_exit(cs553x_cleanup); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("David Woodhouse "); -MODULE_DESCRIPTION("NAND controller driver for AMD CS5535/CS5536 companion chip"); diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 6107f5328..ec5e45e4e 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c @@ -58,10 +58,10 @@ static unsigned long __initdata doc_locations[] = { 0xe4000000, #elif defined(CONFIG_MOMENCO_OCELOT) 0x2f000000, - 0xff000000, + 0xff000000, #elif defined(CONFIG_MOMENCO_OCELOT_G) || defined (CONFIG_MOMENCO_OCELOT_C) - 0xff000000, -#else + 0xff000000, +##else #warning Unknown architecture for DiskOnChip. No default probe locations defined #endif 0xffffffff }; @@ -73,7 +73,7 @@ struct doc_priv { unsigned long physadr; u_char ChipID; u_char CDSNControl; - int chips_per_floor; /* The number of chips detected on each floor */ + int chips_per_floor; /* The number of chips detected on each floor */ int curfloor; int curchip; int mh0_page; @@ -84,7 +84,6 @@ struct doc_priv { /* This is the syndrome computed by the HW ecc generator upon reading an empty page, one with all 0xff for data and stored ecc code. */ static u_char empty_read_syndrome[6] = { 0x26, 0xff, 0x6d, 0x47, 0x73, 0x7a }; - /* This is the ecc value computed by the HW ecc generator upon writing an empty page, one with all 0xff for data. */ static u_char empty_write_ecc[6] = { 0x4b, 0x00, 0xe2, 0x0e, 0x93, 0xf7 }; @@ -95,29 +94,28 @@ static u_char empty_write_ecc[6] = { 0x4b, 0x00, 0xe2, 0x0e, 0x93, 0xf7 }; #define DoC_is_Millennium(doc) ((doc)->ChipID == DOC_ChipID_DocMil) #define DoC_is_2000(doc) ((doc)->ChipID == DOC_ChipID_Doc2k) -static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int bitmask); +static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd); static void doc200x_select_chip(struct mtd_info *mtd, int chip); -static int debug = 0; +static int debug=0; module_param(debug, int, 0); -static int try_dword = 1; +static int try_dword=1; module_param(try_dword, int, 0); -static int no_ecc_failures = 0; +static int no_ecc_failures=0; module_param(no_ecc_failures, int, 0); -static int no_autopart = 0; +static int no_autopart=0; module_param(no_autopart, int, 0); -static int show_firmware_partition = 0; +static int show_firmware_partition=0; module_param(show_firmware_partition, int, 0); #ifdef MTD_NAND_DISKONCHIP_BBTWRITE -static int inftl_bbt_write = 1; +static int inftl_bbt_write=1; #else -static int inftl_bbt_write = 0; +static int inftl_bbt_write=0; #endif module_param(inftl_bbt_write, int, 0); @@ -125,6 +123,7 @@ static unsigned long doc_config_location = CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDR module_param(doc_config_location, ulong, 0); MODULE_PARM_DESC(doc_config_location, "Physical memory address at which to probe for DiskOnChip"); + /* Sector size for HW ECC */ #define SECTOR_SIZE 512 /* The sector bytes are packed into NB_DATA 10 bit words */ @@ -148,7 +147,7 @@ static struct rs_control *rs_decoder; * some comments, improved a minor bit and converted it to make use * of the generic Reed-Solomon libary. tglx */ -static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) +static int doc_ecc_decode (struct rs_control *rs, uint8_t *data, uint8_t *ecc) { int i, j, nerr, errpos[8]; uint8_t parity; @@ -169,18 +168,18 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) * s[i] = ds[3]x^3 + ds[2]x^2 + ds[1]x^1 + ds[0] * where x = alpha^(FCR + i) */ - for (j = 1; j < NROOTS; j++) { - if (ds[j] == 0) + for(j = 1; j < NROOTS; j++) { + if(ds[j] == 0) continue; tmp = rs->index_of[ds[j]]; - for (i = 0; i < NROOTS; i++) + for(i = 0; i < NROOTS; i++) s[i] ^= rs->alpha_to[rs_modnn(rs, tmp + (FCR + i) * j)]; } /* Calc s[i] = s[i] / alpha^(v + i) */ for (i = 0; i < NROOTS; i++) { if (syn[i]) - syn[i] = rs_modnn(rs, rs->index_of[s[i]] + (NN - FCR - i)); + syn[i] = rs_modnn(rs, rs->index_of[s[i]] + (NN - FCR - i)); } /* Call the decoder library */ nerr = decode_rs16(rs, NULL, NULL, 1019, syn, 0, errpos, 0, errval); @@ -194,7 +193,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) * but they are given by the design of the de/encoder circuit * in the DoC ASIC's. */ - for (i = 0; i < nerr; i++) { + for(i = 0;i < nerr; i++) { int index, bitpos, pos = 1015 - errpos[i]; uint8_t val; if (pos >= NB_DATA && pos < 1019) @@ -206,7 +205,8 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) can be modified since pos is even */ index = (pos >> 3) ^ 1; bitpos = pos & 7; - if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { + if ((index >= 0 && index < SECTOR_SIZE) || + index == (SECTOR_SIZE + 1)) { val = (uint8_t) (errval[i] >> (2 + bitpos)); parity ^= val; if (index < SECTOR_SIZE) @@ -216,8 +216,9 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) bitpos = (bitpos + 10) & 7; if (bitpos == 0) bitpos = 8; - if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { - val = (uint8_t) (errval[i] << (8 - bitpos)); + if ((index >= 0 && index < SECTOR_SIZE) || + index == (SECTOR_SIZE + 1)) { + val = (uint8_t)(errval[i] << (8 - bitpos)); parity ^= val; if (index < SECTOR_SIZE) data[index] ^= val; @@ -249,11 +250,10 @@ static void DoC_Delay(struct doc_priv *doc, unsigned short cycles) /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */ static int _DoC_WaitReady(struct doc_priv *doc) { - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; unsigned long timeo = jiffies + (HZ * 10); - if (debug) - printk("_DoC_WaitReady...\n"); + if(debug) printk("_DoC_WaitReady...\n"); /* Out-of-line routine to wait for chip response */ if (DoC_is_MillenniumPlus(doc)) { while ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) { @@ -280,7 +280,7 @@ static int _DoC_WaitReady(struct doc_priv *doc) static inline int DoC_WaitReady(struct doc_priv *doc) { - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int ret = 0; if (DoC_is_MillenniumPlus(doc)) { @@ -298,8 +298,7 @@ static inline int DoC_WaitReady(struct doc_priv *doc) DoC_Delay(doc, 2); } - if (debug) - printk("DoC_WaitReady OK\n"); + if(debug) printk("DoC_WaitReady OK\n"); return ret; } @@ -307,10 +306,9 @@ static void doc2000_write_byte(struct mtd_info *mtd, u_char datum) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; - if (debug) - printk("write_byte %02x\n", datum); + if(debug)printk("write_byte %02x\n", datum); WriteDOC(datum, docptr, CDSNSlowIO); WriteDOC(datum, docptr, 2k_CDSN_IO); } @@ -319,78 +317,77 @@ static u_char doc2000_read_byte(struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; u_char ret; ReadDOC(docptr, CDSNSlowIO); DoC_Delay(doc, 2); ret = ReadDOC(docptr, 2k_CDSN_IO); - if (debug) - printk("read_byte returns %02x\n", ret); + if (debug) printk("read_byte returns %02x\n", ret); return ret; } -static void doc2000_writebuf(struct mtd_info *mtd, const u_char *buf, int len) +static void doc2000_writebuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - if (debug) - printk("writebuf of %d bytes: ", len); - for (i = 0; i < len; i++) { + if (debug)printk("writebuf of %d bytes: ", len); + for (i=0; i < len; i++) { WriteDOC_(buf[i], docptr, DoC_2k_CDSN_IO + i); if (debug && i < 16) printk("%02x ", buf[i]); } - if (debug) - printk("\n"); + if (debug) printk("\n"); } -static void doc2000_readbuf(struct mtd_info *mtd, u_char *buf, int len) +static void doc2000_readbuf(struct mtd_info *mtd, + u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; - int i; + void __iomem *docptr = doc->virtadr; + int i; - if (debug) - printk("readbuf of %d bytes: ", len); + if (debug)printk("readbuf of %d bytes: ", len); - for (i = 0; i < len; i++) { + for (i=0; i < len; i++) { buf[i] = ReadDOC(docptr, 2k_CDSN_IO + i); } } -static void doc2000_readbuf_dword(struct mtd_info *mtd, u_char *buf, int len) +static void doc2000_readbuf_dword(struct mtd_info *mtd, + u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; - int i; + void __iomem *docptr = doc->virtadr; + int i; - if (debug) - printk("readbuf_dword of %d bytes: ", len); + if (debug) printk("readbuf_dword of %d bytes: ", len); - if (unlikely((((unsigned long)buf) | len) & 3)) { - for (i = 0; i < len; i++) { - *(uint8_t *) (&buf[i]) = ReadDOC(docptr, 2k_CDSN_IO + i); + if (unlikely((((unsigned long)buf)|len) & 3)) { + for (i=0; i < len; i++) { + *(uint8_t *)(&buf[i]) = ReadDOC(docptr, 2k_CDSN_IO + i); } } else { - for (i = 0; i < len; i += 4) { - *(uint32_t *) (&buf[i]) = readl(docptr + DoC_2k_CDSN_IO + i); + for (i=0; i < len; i+=4) { + *(uint32_t*)(&buf[i]) = readl(docptr + DoC_2k_CDSN_IO + i); } } } -static int doc2000_verifybuf(struct mtd_info *mtd, const u_char *buf, int len) +static int doc2000_verifybuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - for (i = 0; i < len; i++) + for (i=0; i < len; i++) if (buf[i] != ReadDOC(docptr, 2k_CDSN_IO)) return -EFAULT; return 0; @@ -403,10 +400,12 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr) uint16_t ret; doc200x_select_chip(mtd, nr); - doc200x_hwcontrol(mtd, NAND_CMD_READID, - NAND_CTRL_CLE | NAND_CTRL_CHANGE); - doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); - doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); + doc200x_hwcontrol(mtd, NAND_CTL_SETCLE); + this->write_byte(mtd, NAND_CMD_READID); + doc200x_hwcontrol(mtd, NAND_CTL_CLRCLE); + doc200x_hwcontrol(mtd, NAND_CTL_SETALE); + this->write_byte(mtd, 0); + doc200x_hwcontrol(mtd, NAND_CTL_CLRALE); /* We cant' use dev_ready here, but at least we wait for the * command to complete @@ -424,11 +423,12 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr) } ident; void __iomem *docptr = doc->virtadr; - doc200x_hwcontrol(mtd, NAND_CMD_READID, - NAND_CTRL_CLE | NAND_CTRL_CHANGE); - doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); - doc200x_hwcontrol(mtd, NAND_CMD_NONE, - NAND_NCE | NAND_CTRL_CHANGE); + doc200x_hwcontrol(mtd, NAND_CTL_SETCLE); + doc2000_write_byte(mtd, NAND_CMD_READID); + doc200x_hwcontrol(mtd, NAND_CTL_CLRCLE); + doc200x_hwcontrol(mtd, NAND_CTL_SETALE); + doc2000_write_byte(mtd, 0); + doc200x_hwcontrol(mtd, NAND_CTL_CLRALE); udelay(50); @@ -464,7 +464,7 @@ static void __init doc2000_count_chips(struct mtd_info *mtd) printk(KERN_DEBUG "Detected %d chips per floor.\n", i); } -static int doc200x_wait(struct mtd_info *mtd, struct nand_chip *this) +static int doc200x_wait(struct mtd_info *mtd, struct nand_chip *this, int state) { struct doc_priv *doc = this->priv; @@ -482,7 +482,7 @@ static void doc2001_write_byte(struct mtd_info *mtd, u_char datum) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; WriteDOC(datum, docptr, CDSNSlowIO); WriteDOC(datum, docptr, Mil_CDSN_IO); @@ -493,7 +493,7 @@ static u_char doc2001_read_byte(struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; //ReadDOC(docptr, CDSNSlowIO); /* 11.4.5 -- delay twice to allow extended length cycle */ @@ -503,47 +503,50 @@ static u_char doc2001_read_byte(struct mtd_info *mtd) return ReadDOC(docptr, LastDataRead); } -static void doc2001_writebuf(struct mtd_info *mtd, const u_char *buf, int len) +static void doc2001_writebuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - for (i = 0; i < len; i++) + for (i=0; i < len; i++) WriteDOC_(buf[i], docptr, DoC_Mil_CDSN_IO + i); /* Terminate write pipeline */ WriteDOC(0x00, docptr, WritePipeTerm); } -static void doc2001_readbuf(struct mtd_info *mtd, u_char *buf, int len) +static void doc2001_readbuf(struct mtd_info *mtd, + u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; /* Start read pipeline */ ReadDOC(docptr, ReadPipeInit); - for (i = 0; i < len - 1; i++) + for (i=0; i < len-1; i++) buf[i] = ReadDOC(docptr, Mil_CDSN_IO + (i & 0xff)); /* Terminate read pipeline */ buf[i] = ReadDOC(docptr, LastDataRead); } -static int doc2001_verifybuf(struct mtd_info *mtd, const u_char *buf, int len) +static int doc2001_verifybuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; /* Start read pipeline */ ReadDOC(docptr, ReadPipeInit); - for (i = 0; i < len - 1; i++) + for (i=0; i < len-1; i++) if (buf[i] != ReadDOC(docptr, Mil_CDSN_IO)) { ReadDOC(docptr, LastDataRead); return i; @@ -557,90 +560,87 @@ static u_char doc2001plus_read_byte(struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; u_char ret; - ReadDOC(docptr, Mplus_ReadPipeInit); - ReadDOC(docptr, Mplus_ReadPipeInit); - ret = ReadDOC(docptr, Mplus_LastDataRead); - if (debug) - printk("read_byte returns %02x\n", ret); + ReadDOC(docptr, Mplus_ReadPipeInit); + ReadDOC(docptr, Mplus_ReadPipeInit); + ret = ReadDOC(docptr, Mplus_LastDataRead); + if (debug) printk("read_byte returns %02x\n", ret); return ret; } -static void doc2001plus_writebuf(struct mtd_info *mtd, const u_char *buf, int len) +static void doc2001plus_writebuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - if (debug) - printk("writebuf of %d bytes: ", len); - for (i = 0; i < len; i++) { + if (debug)printk("writebuf of %d bytes: ", len); + for (i=0; i < len; i++) { WriteDOC_(buf[i], docptr, DoC_Mil_CDSN_IO + i); if (debug && i < 16) printk("%02x ", buf[i]); } - if (debug) - printk("\n"); + if (debug) printk("\n"); } -static void doc2001plus_readbuf(struct mtd_info *mtd, u_char *buf, int len) +static void doc2001plus_readbuf(struct mtd_info *mtd, + u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - if (debug) - printk("readbuf of %d bytes: ", len); + if (debug)printk("readbuf of %d bytes: ", len); /* Start read pipeline */ ReadDOC(docptr, Mplus_ReadPipeInit); ReadDOC(docptr, Mplus_ReadPipeInit); - for (i = 0; i < len - 2; i++) { + for (i=0; i < len-2; i++) { buf[i] = ReadDOC(docptr, Mil_CDSN_IO); if (debug && i < 16) printk("%02x ", buf[i]); } /* Terminate read pipeline */ - buf[len - 2] = ReadDOC(docptr, Mplus_LastDataRead); + buf[len-2] = ReadDOC(docptr, Mplus_LastDataRead); if (debug && i < 16) - printk("%02x ", buf[len - 2]); - buf[len - 1] = ReadDOC(docptr, Mplus_LastDataRead); + printk("%02x ", buf[len-2]); + buf[len-1] = ReadDOC(docptr, Mplus_LastDataRead); if (debug && i < 16) - printk("%02x ", buf[len - 1]); - if (debug) - printk("\n"); + printk("%02x ", buf[len-1]); + if (debug) printk("\n"); } -static int doc2001plus_verifybuf(struct mtd_info *mtd, const u_char *buf, int len) +static int doc2001plus_verifybuf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; - if (debug) - printk("verifybuf of %d bytes: ", len); + if (debug)printk("verifybuf of %d bytes: ", len); /* Start read pipeline */ ReadDOC(docptr, Mplus_ReadPipeInit); ReadDOC(docptr, Mplus_ReadPipeInit); - for (i = 0; i < len - 2; i++) + for (i=0; i < len-2; i++) if (buf[i] != ReadDOC(docptr, Mil_CDSN_IO)) { ReadDOC(docptr, Mplus_LastDataRead); ReadDOC(docptr, Mplus_LastDataRead); return i; } - if (buf[len - 2] != ReadDOC(docptr, Mplus_LastDataRead)) - return len - 2; - if (buf[len - 1] != ReadDOC(docptr, Mplus_LastDataRead)) - return len - 1; + if (buf[len-2] != ReadDOC(docptr, Mplus_LastDataRead)) + return len-2; + if (buf[len-1] != ReadDOC(docptr, Mplus_LastDataRead)) + return len-1; return 0; } @@ -648,11 +648,10 @@ static void doc2001plus_select_chip(struct mtd_info *mtd, int chip) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int floor = 0; - if (debug) - printk("select chip (%d)\n", chip); + if(debug)printk("select chip (%d)\n", chip); if (chip == -1) { /* Disable flash internally */ @@ -661,7 +660,7 @@ static void doc2001plus_select_chip(struct mtd_info *mtd, int chip) } floor = chip / doc->chips_per_floor; - chip -= (floor * doc->chips_per_floor); + chip -= (floor * doc->chips_per_floor); /* Assert ChipEnable and deassert WriteProtect */ WriteDOC((DOC_FLASH_CE), docptr, Mplus_FlashSelect); @@ -675,61 +674,72 @@ static void doc200x_select_chip(struct mtd_info *mtd, int chip) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int floor = 0; - if (debug) - printk("select chip (%d)\n", chip); + if(debug)printk("select chip (%d)\n", chip); if (chip == -1) return; floor = chip / doc->chips_per_floor; - chip -= (floor * doc->chips_per_floor); + chip -= (floor * doc->chips_per_floor); /* 11.4.4 -- deassert CE before changing chip */ - doc200x_hwcontrol(mtd, NAND_CMD_NONE, 0 | NAND_CTRL_CHANGE); + doc200x_hwcontrol(mtd, NAND_CTL_CLRNCE); WriteDOC(floor, docptr, FloorSelect); WriteDOC(chip, docptr, CDSNDeviceSelect); - doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); + doc200x_hwcontrol(mtd, NAND_CTL_SETNCE); doc->curchip = chip; doc->curfloor = floor; } -#define CDSN_CTRL_MSK (CDSN_CTRL_CE | CDSN_CTRL_CLE | CDSN_CTRL_ALE) - -static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void doc200x_hwcontrol(struct mtd_info *mtd, int cmd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; - if (ctrl & NAND_CTRL_CHANGE) { - doc->CDSNControl &= ~CDSN_CTRL_MSK; - doc->CDSNControl |= ctrl & CDSN_CTRL_MSK; - if (debug) - printk("hwcontrol(%d): %02x\n", cmd, doc->CDSNControl); - WriteDOC(doc->CDSNControl, docptr, CDSNControl); - /* 11.4.3 -- 4 NOPs after CSDNControl write */ - DoC_Delay(doc, 4); - } - if (cmd != NAND_CMD_NONE) { - if (DoC_is_2000(doc)) - doc2000_write_byte(mtd, cmd); - else - doc2001_write_byte(mtd, cmd); + switch(cmd) { + case NAND_CTL_SETNCE: + doc->CDSNControl |= CDSN_CTRL_CE; + break; + case NAND_CTL_CLRNCE: + doc->CDSNControl &= ~CDSN_CTRL_CE; + break; + case NAND_CTL_SETCLE: + doc->CDSNControl |= CDSN_CTRL_CLE; + break; + case NAND_CTL_CLRCLE: + doc->CDSNControl &= ~CDSN_CTRL_CLE; + break; + case NAND_CTL_SETALE: + doc->CDSNControl |= CDSN_CTRL_ALE; + break; + case NAND_CTL_CLRALE: + doc->CDSNControl &= ~CDSN_CTRL_ALE; + break; + case NAND_CTL_SETWP: + doc->CDSNControl |= CDSN_CTRL_WP; + break; + case NAND_CTL_CLRWP: + doc->CDSNControl &= ~CDSN_CTRL_WP; + break; } + if (debug)printk("hwcontrol(%d): %02x\n", cmd, doc->CDSNControl); + WriteDOC(doc->CDSNControl, docptr, CDSNControl); + /* 11.4.3 -- 4 NOPs after CSDNControl write */ + DoC_Delay(doc, 4); } -static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int column, int page_addr) +static void doc2001plus_command (struct mtd_info *mtd, unsigned command, int column, int page_addr) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; /* * Must terminate write pipeline before sending any commands @@ -746,9 +756,9 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu if (command == NAND_CMD_SEQIN) { int readcmd; - if (column >= mtd->writesize) { + if (column >= mtd->oobblock) { /* OOB area */ - column -= mtd->writesize; + column -= mtd->oobblock; readcmd = NAND_CMD_READOOB; } else if (column < 256) { /* First 256 bytes --> READ0 */ @@ -772,26 +782,25 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu WriteDOC(column, docptr, Mplus_FlashAddress); } if (page_addr != -1) { - WriteDOC((unsigned char)(page_addr & 0xff), docptr, Mplus_FlashAddress); - WriteDOC((unsigned char)((page_addr >> 8) & 0xff), docptr, Mplus_FlashAddress); + WriteDOC((unsigned char) (page_addr & 0xff), docptr, Mplus_FlashAddress); + WriteDOC((unsigned char) ((page_addr >> 8) & 0xff), docptr, Mplus_FlashAddress); /* One more address cycle for higher density devices */ if (this->chipsize & 0x0c000000) { - WriteDOC((unsigned char)((page_addr >> 16) & 0x0f), docptr, Mplus_FlashAddress); + WriteDOC((unsigned char) ((page_addr >> 16) & 0x0f), docptr, Mplus_FlashAddress); printk("high density\n"); } } WriteDOC(0, docptr, Mplus_WritePipeTerm); WriteDOC(0, docptr, Mplus_WritePipeTerm); /* deassert ALE */ - if (command == NAND_CMD_READ0 || command == NAND_CMD_READ1 || - command == NAND_CMD_READOOB || command == NAND_CMD_READID) + if (command == NAND_CMD_READ0 || command == NAND_CMD_READ1 || command == NAND_CMD_READOOB || command == NAND_CMD_READID) WriteDOC(0, docptr, Mplus_FlashControl); } /* * program and erase have their own busy handlers * status and sequential in needs no delay - */ + */ switch (command) { case NAND_CMD_PAGEPROG: @@ -808,57 +817,55 @@ static void doc2001plus_command(struct mtd_info *mtd, unsigned command, int colu WriteDOC(NAND_CMD_STATUS, docptr, Mplus_FlashCmd); WriteDOC(0, docptr, Mplus_WritePipeTerm); WriteDOC(0, docptr, Mplus_WritePipeTerm); - while (!(this->read_byte(mtd) & 0x40)) ; + while ( !(this->read_byte(mtd) & 0x40)); return; - /* This applies to read commands */ + /* This applies to read commands */ default: /* * If we don't have access to the busy pin, we apply the given * command delay - */ + */ if (!this->dev_ready) { - udelay(this->chip_delay); + udelay (this->chip_delay); return; } } /* Apply this short delay always to ensure that we do wait tWB in * any case on any machine. */ - ndelay(100); + ndelay (100); /* wait until command is processed */ - while (!this->dev_ready(mtd)) ; + while (!this->dev_ready(mtd)); } static int doc200x_dev_ready(struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; if (DoC_is_MillenniumPlus(doc)) { /* 11.4.2 -- must NOP four times before checking FR/B# */ DoC_Delay(doc, 4); if ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK) { - if (debug) + if(debug) printk("not ready\n"); return 0; } - if (debug) - printk("was ready\n"); + if (debug)printk("was ready\n"); return 1; } else { /* 11.4.2 -- must NOP four times before checking FR/B# */ DoC_Delay(doc, 4); if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B)) { - if (debug) + if(debug) printk("not ready\n"); return 0; } /* 11.4.2 -- Must NOP twice if it's ready */ DoC_Delay(doc, 2); - if (debug) - printk("was ready\n"); + if (debug)printk("was ready\n"); return 1; } } @@ -874,10 +881,10 @@ static void doc200x_enable_hwecc(struct mtd_info *mtd, int mode) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; /* Prime the ECC engine */ - switch (mode) { + switch(mode) { case NAND_ECC_READ: WriteDOC(DOC_ECC_RESET, docptr, ECCConf); WriteDOC(DOC_ECC_EN, docptr, ECCConf); @@ -893,10 +900,10 @@ static void doc2001plus_enable_hwecc(struct mtd_info *mtd, int mode) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; /* Prime the ECC engine */ - switch (mode) { + switch(mode) { case NAND_ECC_READ: WriteDOC(DOC_ECC_RESET, docptr, Mplus_ECCConf); WriteDOC(DOC_ECC_EN, docptr, Mplus_ECCConf); @@ -909,11 +916,12 @@ static void doc2001plus_enable_hwecc(struct mtd_info *mtd, int mode) } /* This code is only called on write */ -static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, unsigned char *ecc_code) +static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, + unsigned char *ecc_code) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; + void __iomem *docptr = doc->virtadr; int i; int emptymatch = 1; @@ -953,8 +961,7 @@ static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, unsign often. It could be optimized away by examining the data in the writebuf routine, and remembering the result. */ for (i = 0; i < 512; i++) { - if (dat[i] == 0xff) - continue; + if (dat[i] == 0xff) continue; emptymatch = 0; break; } @@ -962,20 +969,17 @@ static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, unsign /* If emptymatch still =1, we do have an all-0xff data buffer. Return all-0xff ecc value instead of the computed one, so it'll look just like a freshly-erased page. */ - if (emptymatch) - memset(ecc_code, 0xff, 6); + if (emptymatch) memset(ecc_code, 0xff, 6); #endif return 0; } -static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, - u_char *read_ecc, u_char *isnull) +static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) { int i, ret = 0; struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; - void __iomem *docptr = doc->virtadr; - uint8_t calc_ecc[6]; + void __iomem *docptr = doc->virtadr; volatile u_char dummy; int emptymatch = 1; @@ -1008,20 +1012,18 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, all-0xff data and stored ecc block. Check the stored ecc. */ if (emptymatch) { for (i = 0; i < 6; i++) { - if (read_ecc[i] == 0xff) - continue; + if (read_ecc[i] == 0xff) continue; emptymatch = 0; break; } } /* If emptymatch still =1, check the data block. */ if (emptymatch) { - /* Note: this somewhat expensive test should not be triggered - often. It could be optimized away by examining the data in - the readbuf routine, and remembering the result. */ + /* Note: this somewhat expensive test should not be triggered + often. It could be optimized away by examining the data in + the readbuf routine, and remembering the result. */ for (i = 0; i < 512; i++) { - if (dat[i] == 0xff) - continue; + if (dat[i] == 0xff) continue; emptymatch = 0; break; } @@ -1030,8 +1032,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, erased block, in which case the ECC will not come out right. We'll suppress the error and tell the caller everything's OK. Because it is. */ - if (!emptymatch) - ret = doc_ecc_decode(rs_decoder, dat, calc_ecc); + if (!emptymatch) ret = doc_ecc_decode (rs_decoder, dat, calc_ecc); if (ret > 0) printk(KERN_ERR "doc200x_correct_data corrected %d errors\n", ret); } @@ -1058,10 +1059,11 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, * safer. The only problem with it is that any code that parses oobfree must * be able to handle out-of-order segments. */ -static struct nand_ecclayout doc200x_oobinfo = { - .eccbytes = 6, - .eccpos = {0, 1, 2, 3, 4, 5}, - .oobfree = {{8, 8}, {6, 2}} +static struct nand_oobinfo doc200x_oobinfo = { + .useecc = MTD_NANDECC_AUTOPLACE, + .eccbytes = 6, + .eccpos = {0, 1, 2, 3, 4, 5}, + .oobfree = { {8, 8}, {6, 2} } }; /* Find the (I)NFTL Media Header, and optionally also the mirror media header. @@ -1070,7 +1072,8 @@ static struct nand_ecclayout doc200x_oobinfo = { either "ANAND" or "BNAND". If findmirror=1, also look for the mirror media header. The page #s of the found media headers are placed in mh0_page and mh1_page in the DOC private structure. */ -static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const char *id, int findmirror) +static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, + const char *id, int findmirror) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; @@ -1079,19 +1082,17 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch size_t retlen; for (offs = 0; offs < mtd->size; offs += mtd->erasesize) { - ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); - if (retlen != mtd->writesize) - continue; + ret = mtd->read(mtd, offs, mtd->oobblock, &retlen, buf); + if (retlen != mtd->oobblock) continue; if (ret) { - printk(KERN_WARNING "ECC error scanning DOC at 0x%x\n", offs); + printk(KERN_WARNING "ECC error scanning DOC at 0x%x\n", + offs); } - if (memcmp(buf, id, 6)) - continue; + if (memcmp(buf, id, 6)) continue; printk(KERN_INFO "Found DiskOnChip %s Media Header at 0x%x\n", id, offs); if (doc->mh0_page == -1) { doc->mh0_page = offs >> this->page_shift; - if (!findmirror) - return 1; + if (!findmirror) return 1; continue; } doc->mh1_page = offs >> this->page_shift; @@ -1104,8 +1105,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch /* Only one mediaheader was found. We want buf to contain a mediaheader on return, so we'll have to re-read the one we found. */ offs = doc->mh0_page << this->page_shift; - ret = mtd->read(mtd, offs, mtd->writesize, &retlen, buf); - if (retlen != mtd->writesize) { + ret = mtd->read(mtd, offs, mtd->oobblock, &retlen, buf); + if (retlen != mtd->oobblock) { /* Insanity. Give up. */ printk(KERN_ERR "Read DiskOnChip Media Header once, but can't reread it???\n"); return 0; @@ -1113,7 +1114,8 @@ static int __init find_media_headers(struct mtd_info *mtd, u_char *buf, const ch return 1; } -static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partition *parts) +static inline int __init nftl_partscan(struct mtd_info *mtd, + struct mtd_partition *parts) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; @@ -1125,14 +1127,13 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio unsigned blocks, maxblocks; int offs, numheaders; - buf = kmalloc(mtd->writesize, GFP_KERNEL); + buf = kmalloc(mtd->oobblock, GFP_KERNEL); if (!buf) { printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); return 0; } - if (!(numheaders = find_media_headers(mtd, buf, "ANAND", 1))) - goto out; - mh = (struct NFTLMediaHeader *)buf; + if (!(numheaders=find_media_headers(mtd, buf, "ANAND", 1))) goto out; + mh = (struct NFTLMediaHeader *) buf; mh->NumEraseUnits = le16_to_cpu(mh->NumEraseUnits); mh->FirstPhysicalEUN = le16_to_cpu(mh->FirstPhysicalEUN); @@ -1154,8 +1155,8 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio /* Auto-determine UnitSizeFactor. The constraints are: - There can be at most 32768 virtual blocks. - There can be at most (virtual block size - page size) - virtual blocks (because MediaHeader+BBT must fit in 1). - */ + virtual blocks (because MediaHeader+BBT must fit in 1). + */ mh->UnitSizeFactor = 0xff; while (blocks > maxblocks) { blocks >>= 1; @@ -1210,13 +1211,14 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio } ret = numparts; - out: +out: kfree(buf); return ret; } /* This is a stripped-down copy of the code in inftlmount.c */ -static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partition *parts) +static inline int __init inftl_partscan(struct mtd_info *mtd, + struct mtd_partition *parts) { struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; @@ -1233,16 +1235,15 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti if (inftl_bbt_write) end -= (INFTL_BBT_RESERVED_BLOCKS << this->phys_erase_shift); - buf = kmalloc(mtd->writesize, GFP_KERNEL); + buf = kmalloc(mtd->oobblock, GFP_KERNEL); if (!buf) { printk(KERN_ERR "DiskOnChip mediaheader kmalloc failed!\n"); return 0; } - if (!find_media_headers(mtd, buf, "BNAND", 0)) - goto out; + if (!find_media_headers(mtd, buf, "BNAND", 0)) goto out; doc->mh1_page = doc->mh0_page + (4096 >> this->page_shift); - mh = (struct INFTLMediaHeader *)buf; + mh = (struct INFTLMediaHeader *) buf; mh->NoOfBootImageBlocks = le32_to_cpu(mh->NoOfBootImageBlocks); mh->NoOfBinaryPartitions = le32_to_cpu(mh->NoOfBinaryPartitions); @@ -1318,10 +1319,8 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti parts[numparts].offset = ip->firstUnit << vshift; parts[numparts].size = (1 + ip->lastUnit - ip->firstUnit) << vshift; numparts++; - if (ip->lastUnit > lastvunit) - lastvunit = ip->lastUnit; - if (ip->flags & INFTL_LAST) - break; + if (ip->lastUnit > lastvunit) lastvunit = ip->lastUnit; + if (ip->flags & INFTL_LAST) break; } lastvunit++; if ((lastvunit << vshift) < end) { @@ -1331,7 +1330,7 @@ static inline int __init inftl_partscan(struct mtd_info *mtd, struct mtd_partiti numparts++; } ret = numparts; - out: +out: kfree(buf); return ret; } @@ -1343,12 +1342,11 @@ static int __init nftl_scan_bbt(struct mtd_info *mtd) struct doc_priv *doc = this->priv; struct mtd_partition parts[2]; - memset((char *)parts, 0, sizeof(parts)); + memset((char *) parts, 0, sizeof(parts)); /* On NFTL, we have to find the media headers before we can read the BBTs, since they're stored in the media header eraseblocks. */ numparts = nftl_partscan(mtd, parts); - if (!numparts) - return -EIO; + if (!numparts) return -EIO; this->bbt_td->options = NAND_BBT_ABSPAGE | NAND_BBT_8BIT | NAND_BBT_SAVECONTENT | NAND_BBT_WRITE | NAND_BBT_VERSION; @@ -1395,7 +1393,8 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) this->bbt_td->pages[0] = 2; this->bbt_md = NULL; } else { - this->bbt_td->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION; + this->bbt_td->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | + NAND_BBT_VERSION; if (inftl_bbt_write) this->bbt_td->options |= NAND_BBT_WRITE; this->bbt_td->offs = 8; @@ -1405,7 +1404,8 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) this->bbt_td->reserved_block_code = 0x01; this->bbt_td->pattern = "MSYS_BBT"; - this->bbt_md->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | NAND_BBT_VERSION; + this->bbt_md->options = NAND_BBT_LASTBLOCK | NAND_BBT_8BIT | + NAND_BBT_VERSION; if (inftl_bbt_write) this->bbt_md->options |= NAND_BBT_WRITE; this->bbt_md->offs = 8; @@ -1420,13 +1420,12 @@ static int __init inftl_scan_bbt(struct mtd_info *mtd) At least as nand_bbt.c is currently written. */ if ((ret = nand_scan_bbt(mtd, NULL))) return ret; - memset((char *)parts, 0, sizeof(parts)); + memset((char *) parts, 0, sizeof(parts)); numparts = inftl_partscan(mtd, parts); /* At least for now, require the INFTL Media Header. We could probably do without it for non-INFTL use, since all it gives us is autopartitioning, but I want to give it more thought. */ - if (!numparts) - return -EIO; + if (!numparts) return -EIO; add_mtd_device(mtd); #ifdef CONFIG_MTD_PARTITIONS if (!no_autopart) @@ -1440,6 +1439,7 @@ static inline int __init doc2000_init(struct mtd_info *mtd) struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; + this->write_byte = doc2000_write_byte; this->read_byte = doc2000_read_byte; this->write_buf = doc2000_writebuf; this->read_buf = doc2000_readbuf; @@ -1457,6 +1457,7 @@ static inline int __init doc2001_init(struct mtd_info *mtd) struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; + this->write_byte = doc2001_write_byte; this->read_byte = doc2001_read_byte; this->write_buf = doc2001_writebuf; this->read_buf = doc2001_readbuf; @@ -1488,15 +1489,16 @@ static inline int __init doc2001plus_init(struct mtd_info *mtd) struct nand_chip *this = mtd->priv; struct doc_priv *doc = this->priv; + this->write_byte = NULL; this->read_byte = doc2001plus_read_byte; this->write_buf = doc2001plus_writebuf; this->read_buf = doc2001plus_readbuf; this->verify_buf = doc2001plus_verifybuf; this->scan_bbt = inftl_scan_bbt; - this->cmd_ctrl = NULL; + this->hwcontrol = NULL; this->select_chip = doc2001plus_select_chip; this->cmdfunc = doc2001plus_command; - this->ecc.hwctl = doc2001plus_enable_hwecc; + this->enable_hwecc = doc2001plus_enable_hwecc; doc->chips_per_floor = 1; mtd->name = "DiskOnChip Millennium Plus"; @@ -1533,16 +1535,20 @@ static int __init doc_probe(unsigned long physadr) save_control = ReadDOC(virtadr, DOCControl); /* Reset the DiskOnChip ASIC */ - WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, virtadr, DOCControl); - WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, virtadr, DOCControl); + WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, + virtadr, DOCControl); + WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, + virtadr, DOCControl); /* Enable the DiskOnChip ASIC */ - WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, virtadr, DOCControl); - WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, virtadr, DOCControl); + WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, + virtadr, DOCControl); + WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, + virtadr, DOCControl); ChipID = ReadDOC(virtadr, ChipID); - switch (ChipID) { + switch(ChipID) { case DOC_ChipID_Doc2k: reg = DoC_2k_ECCStatus; break; @@ -1558,13 +1564,15 @@ static int __init doc_probe(unsigned long physadr) ReadDOC(virtadr, Mplus_Power); /* Reset the Millennium Plus ASIC */ - tmp = DOC_MODE_RESET | DOC_MODE_MDWREN | DOC_MODE_RST_LAT | DOC_MODE_BDECT; + tmp = DOC_MODE_RESET | DOC_MODE_MDWREN | DOC_MODE_RST_LAT | + DOC_MODE_BDECT; WriteDOC(tmp, virtadr, Mplus_DOCControl); WriteDOC(~tmp, virtadr, Mplus_CtrlConfirm); mdelay(1); /* Enable the Millennium Plus ASIC */ - tmp = DOC_MODE_NORMAL | DOC_MODE_MDWREN | DOC_MODE_RST_LAT | DOC_MODE_BDECT; + tmp = DOC_MODE_NORMAL | DOC_MODE_MDWREN | DOC_MODE_RST_LAT | + DOC_MODE_BDECT; WriteDOC(tmp, virtadr, Mplus_DOCControl); WriteDOC(~tmp, virtadr, Mplus_CtrlConfirm); mdelay(1); @@ -1588,7 +1596,7 @@ static int __init doc_probe(unsigned long physadr) goto notfound; } /* Check the TOGGLE bit in the ECC register */ - tmp = ReadDOC_(virtadr, reg) & DOC_TOGGLE_BIT; + tmp = ReadDOC_(virtadr, reg) & DOC_TOGGLE_BIT; tmpb = ReadDOC_(virtadr, reg) & DOC_TOGGLE_BIT; tmpc = ReadDOC_(virtadr, reg) & DOC_TOGGLE_BIT; if ((tmp == tmpb) || (tmp != tmpc)) { @@ -1618,11 +1626,11 @@ static int __init doc_probe(unsigned long physadr) if (ChipID == DOC_ChipID_DocMilPlus16) { WriteDOC(~newval, virtadr, Mplus_AliasResolution); oldval = ReadDOC(doc->virtadr, Mplus_AliasResolution); - WriteDOC(newval, virtadr, Mplus_AliasResolution); // restore it + WriteDOC(newval, virtadr, Mplus_AliasResolution); // restore it } else { WriteDOC(~newval, virtadr, AliasResolution); oldval = ReadDOC(doc->virtadr, AliasResolution); - WriteDOC(newval, virtadr, AliasResolution); // restore it + WriteDOC(newval, virtadr, AliasResolution); // restore it } newval = ~newval; if (oldval == newval) { @@ -1634,8 +1642,10 @@ static int __init doc_probe(unsigned long physadr) printk(KERN_NOTICE "DiskOnChip found at 0x%lx\n", physadr); len = sizeof(struct mtd_info) + - sizeof(struct nand_chip) + sizeof(struct doc_priv) + (2 * sizeof(struct nand_bbt_descr)); - mtd = kmalloc(len, GFP_KERNEL); + sizeof(struct nand_chip) + + sizeof(struct doc_priv) + + (2 * sizeof(struct nand_bbt_descr)); + mtd = kmalloc(len, GFP_KERNEL); if (!mtd) { printk(KERN_ERR "DiskOnChip kmalloc (%d bytes) failed!\n", len); ret = -ENOMEM; @@ -1653,19 +1663,17 @@ static int __init doc_probe(unsigned long physadr) nand->priv = doc; nand->select_chip = doc200x_select_chip; - nand->cmd_ctrl = doc200x_hwcontrol; + nand->hwcontrol = doc200x_hwcontrol; nand->dev_ready = doc200x_dev_ready; nand->waitfunc = doc200x_wait; nand->block_bad = doc200x_block_bad; - nand->ecc.hwctl = doc200x_enable_hwecc; - nand->ecc.calculate = doc200x_calculate_ecc; - nand->ecc.correct = doc200x_correct_data; + nand->enable_hwecc = doc200x_enable_hwecc; + nand->calculate_ecc = doc200x_calculate_ecc; + nand->correct_data = doc200x_correct_data; - nand->ecc.layout = &doc200x_oobinfo; - nand->ecc.mode = NAND_ECC_HW_SYNDROME; - nand->ecc.size = 512; - nand->ecc.bytes = 6; - nand->options = NAND_USE_FLASH_BBT; + nand->autooob = &doc200x_oobinfo; + nand->eccmode = NAND_ECC_HW6_512; + nand->options = NAND_USE_FLASH_BBT | NAND_HWECC_SYNDROME; doc->physadr = physadr; doc->virtadr = virtadr; @@ -1699,18 +1707,18 @@ static int __init doc_probe(unsigned long physadr) doclist = mtd; return 0; - notfound: +notfound: /* Put back the contents of the DOCControl register, in case it's not actually a DiskOnChip. */ WriteDOC(save_control, virtadr, DOCControl); - fail: +fail: iounmap(virtadr); return ret; } static void release_nanddoc(void) { - struct mtd_info *mtd, *nextmtd; + struct mtd_info *mtd, *nextmtd; struct nand_chip *nand; struct doc_priv *doc; @@ -1739,8 +1747,8 @@ static int __init init_nanddoc(void) * generator polinomial degree = 4 */ rs_decoder = init_rs(10, 0x409, FCR, 1, NROOTS); - if (!rs_decoder) { - printk(KERN_ERR "DiskOnChip: Could not create a RS decoder\n"); + if (!rs_decoder) { + printk (KERN_ERR "DiskOnChip: Could not create a RS decoder\n"); return -ENOMEM; } @@ -1750,7 +1758,7 @@ static int __init init_nanddoc(void) if (ret < 0) goto outerr; } else { - for (i = 0; (doc_locations[i] != 0xffffffff); i++) { + for (i=0; (doc_locations[i] != 0xffffffff); i++) { doc_probe(doc_locations[i]); } } @@ -1762,7 +1770,7 @@ static int __init init_nanddoc(void) goto outerr; } return 0; - outerr: +outerr: free_rs(rs_decoder); return ret; } diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c index 516c0e5e5..9b1fd2f38 100644 --- a/drivers/mtd/nand/edb7312.c +++ b/drivers/mtd/nand/edb7312.c @@ -1,7 +1,7 @@ /* * drivers/mtd/nand/edb7312.c * - * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) + * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) * * Derived from drivers/mtd/nand/autcpu12.c * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) @@ -25,7 +25,7 @@ #include #include #include -#include /* for CLPS7111_VIRT_BASE */ +#include /* for CLPS7111_VIRT_BASE */ #include #include @@ -54,45 +54,51 @@ static struct mtd_info *ep7312_mtd = NULL; */ static unsigned long ep7312_fio_pbase = EP7312_FIO_PBASE; -static void __iomem *ep7312_pxdr = (void __iomem *)EP7312_PXDR; -static void __iomem *ep7312_pxddr = (void __iomem *)EP7312_PXDDR; +static void __iomem * ep7312_pxdr = (void __iomem *) EP7312_PXDR; +static void __iomem * ep7312_pxddr = (void __iomem *) EP7312_PXDDR; #ifdef CONFIG_MTD_PARTITIONS /* * Define static partitions for flash device */ static struct mtd_partition partition_info[] = { - {.name = "EP7312 Nand Flash", - .offset = 0, - .size = 8 * 1024 * 1024} + { .name = "EP7312 Nand Flash", + .offset = 0, + .size = 8*1024*1024 } }; - #define NUM_PARTITIONS 1 #endif + /* * hardware specific access to control-lines - * - * NAND_NCE: bit 0 -> bit 7 - * NAND_CLE: bit 1 -> bit 4 - * NAND_ALE: bit 2 -> bit 5 */ -static void ep7312_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) +static void ep7312_hwcontrol(struct mtd_info *mtd, int cmd) { - struct nand_chip *chip = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { - unsigned char bits; - - bits = (ctrl & (NAND_CLE | NAND_ALE)) << 3; - bits = (ctrl & NAND_NCE) << 7; - - clps_writeb((clps_readb(ep7312_pxdr) & 0xB0) | 0x10, - ep7312_pxdr); + switch(cmd) { + + case NAND_CTL_SETCLE: + clps_writeb(clps_readb(ep7312_pxdr) | 0x10, ep7312_pxdr); + break; + case NAND_CTL_CLRCLE: + clps_writeb(clps_readb(ep7312_pxdr) & ~0x10, ep7312_pxdr); + break; + + case NAND_CTL_SETALE: + clps_writeb(clps_readb(ep7312_pxdr) | 0x20, ep7312_pxdr); + break; + case NAND_CTL_CLRALE: + clps_writeb(clps_readb(ep7312_pxdr) & ~0x20, ep7312_pxdr); + break; + + case NAND_CTL_SETNCE: + clps_writeb((clps_readb(ep7312_pxdr) | 0x80) & ~0x40, ep7312_pxdr); + break; + case NAND_CTL_CLRNCE: + clps_writeb((clps_readb(ep7312_pxdr) | 0x80) | 0x40, ep7312_pxdr); + break; } - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); } /* @@ -102,7 +108,6 @@ static int ep7312_device_ready(struct mtd_info *mtd) { return 1; } - #ifdef CONFIG_MTD_PARTITIONS const char *part_probes[] = { "cmdlinepart", NULL }; #endif @@ -110,16 +115,18 @@ const char *part_probes[] = { "cmdlinepart", NULL }; /* * Main initialization routine */ -static int __init ep7312_init(void) +static int __init ep7312_init (void) { struct nand_chip *this; const char *part_type = 0; int mtd_parts_nb = 0; struct mtd_partition *mtd_parts = 0; - void __iomem *ep7312_fio_base; + void __iomem * ep7312_fio_base; /* Allocate memory for MTD device structure and private data */ - ep7312_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + ep7312_mtd = kmalloc(sizeof(struct mtd_info) + + sizeof(struct nand_chip), + GFP_KERNEL); if (!ep7312_mtd) { printk("Unable to allocate EDB7312 NAND MTD device structure.\n"); return -ENOMEM; @@ -127,22 +134,21 @@ static int __init ep7312_init(void) /* map physical adress */ ep7312_fio_base = ioremap(ep7312_fio_pbase, SZ_1K); - if (!ep7312_fio_base) { + if(!ep7312_fio_base) { printk("ioremap EDB7312 NAND flash failed\n"); kfree(ep7312_mtd); return -EIO; } /* Get pointer to private data */ - this = (struct nand_chip *)(&ep7312_mtd[1]); + this = (struct nand_chip *) (&ep7312_mtd[1]); /* Initialize structures */ - memset(ep7312_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) ep7312_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ ep7312_mtd->priv = this; - ep7312_mtd->owner = THIS_MODULE; /* * Set GPIO Port B control register so that the pins are configured @@ -153,20 +159,22 @@ static int __init ep7312_init(void) /* insert callbacks */ this->IO_ADDR_R = ep7312_fio_base; this->IO_ADDR_W = ep7312_fio_base; - this->cmd_ctrl = ep7312_hwcontrol; + this->hwcontrol = ep7312_hwcontrol; this->dev_ready = ep7312_device_ready; /* 15 us command delay time */ this->chip_delay = 15; /* Scan to find existence of the device */ - if (nand_scan(ep7312_mtd, 1)) { + if (nand_scan (ep7312_mtd, 1)) { iounmap((void *)ep7312_fio_base); - kfree(ep7312_mtd); + kfree (ep7312_mtd); return -ENXIO; } + #ifdef CONFIG_MTD_PARTITIONS ep7312_mtd->name = "edb7312-nand"; - mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, part_probes, &mtd_parts, 0); + mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, part_probes, + &mtd_parts, 0); if (mtd_parts_nb > 0) part_type = "command line"; else @@ -185,23 +193,24 @@ static int __init ep7312_init(void) /* Return happy */ return 0; } - module_init(ep7312_init); /* * Clean up routine */ -static void __exit ep7312_cleanup(void) +static void __exit ep7312_cleanup (void) { - struct nand_chip *this = (struct nand_chip *)&ep7312_mtd[1]; + struct nand_chip *this = (struct nand_chip *) &ep7312_mtd[1]; /* Release resources, unregister device */ - nand_release(ap7312_mtd); + nand_release (ap7312_mtd); + + /* Free internal data buffer */ + kfree (this->data_buf); /* Free the MTD device structure */ - kfree(ep7312_mtd); + kfree (ep7312_mtd); } - module_exit(ep7312_cleanup); MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c index 2d585d2d0..f68f7a99a 100644 --- a/drivers/mtd/nand/h1910.c +++ b/drivers/mtd/nand/h1910.c @@ -4,7 +4,7 @@ * Copyright (C) 2003 Joshua Wise (joshua@joshuawise.com) * * Derived from drivers/mtd/nand/edb7312.c - * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) + * Copyright (C) 2002 Marius Gröger (mag@sysgo.de) * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) * * $Id: h1910.c,v 1.6 2005/11/07 11:14:30 gleixner Exp $ @@ -26,7 +26,7 @@ #include #include #include -#include /* for CLPS7111_VIRT_BASE */ +#include /* for CLPS7111_VIRT_BASE */ #include #include #include @@ -45,29 +45,47 @@ static struct mtd_info *h1910_nand_mtd = NULL; * Define static partitions for flash device */ static struct mtd_partition partition_info[] = { - {name:"h1910 NAND Flash", - offset:0, - size:16 * 1024 * 1024} + { name: "h1910 NAND Flash", + offset: 0, + size: 16*1024*1024 } }; - #define NUM_PARTITIONS 1 #endif + /* * hardware specific access to control-lines - * - * NAND_NCE: bit 0 - don't care - * NAND_CLE: bit 1 - address bit 2 - * NAND_ALE: bit 2 - address bit 3 */ -static void h1910_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void h1910_hwcontrol(struct mtd_info *mtd, int cmd) { - struct nand_chip *chip = mtd->priv; - - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W | ((ctrl & 0x6) << 1)); + struct nand_chip* this = (struct nand_chip *) (mtd->priv); + + switch(cmd) { + + case NAND_CTL_SETCLE: + this->IO_ADDR_R |= (1 << 2); + this->IO_ADDR_W |= (1 << 2); + break; + case NAND_CTL_CLRCLE: + this->IO_ADDR_R &= ~(1 << 2); + this->IO_ADDR_W &= ~(1 << 2); + break; + + case NAND_CTL_SETALE: + this->IO_ADDR_R |= (1 << 3); + this->IO_ADDR_W |= (1 << 3); + break; + case NAND_CTL_CLRALE: + this->IO_ADDR_R &= ~(1 << 3); + this->IO_ADDR_W &= ~(1 << 3); + break; + + case NAND_CTL_SETNCE: + break; + case NAND_CTL_CLRNCE: + break; + } } /* @@ -83,7 +101,7 @@ static int h1910_device_ready(struct mtd_info *mtd) /* * Main initialization routine */ -static int __init h1910_init(void) +static int __init h1910_init (void) { struct nand_chip *this; const char *part_type = 0; @@ -101,23 +119,24 @@ static int __init h1910_init(void) } /* Allocate memory for MTD device structure and private data */ - h1910_nand_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + h1910_nand_mtd = kmalloc(sizeof(struct mtd_info) + + sizeof(struct nand_chip), + GFP_KERNEL); if (!h1910_nand_mtd) { printk("Unable to allocate h1910 NAND MTD device structure.\n"); - iounmap((void *)nandaddr); + iounmap ((void *) nandaddr); return -ENOMEM; } /* Get pointer to private data */ - this = (struct nand_chip *)(&h1910_nand_mtd[1]); + this = (struct nand_chip *) (&h1910_nand_mtd[1]); /* Initialize structures */ - memset(h1910_nand_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) h1910_nand_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ h1910_nand_mtd->priv = this; - h1910_nand_mtd->owner = THIS_MODULE; /* * Enable VPEN @@ -127,28 +146,31 @@ static int __init h1910_init(void) /* insert callbacks */ this->IO_ADDR_R = nandaddr; this->IO_ADDR_W = nandaddr; - this->cmd_ctrl = h1910_hwcontrol; + this->hwcontrol = h1910_hwcontrol; this->dev_ready = NULL; /* unknown whether that was correct or not so we will just do it like this */ /* 15 us command delay time */ this->chip_delay = 50; - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; this->options = NAND_NO_AUTOINCR; /* Scan to find existence of the device */ - if (nand_scan(h1910_nand_mtd, 1)) { + if (nand_scan (h1910_nand_mtd, 1)) { printk(KERN_NOTICE "No NAND device - returning -ENXIO\n"); - kfree(h1910_nand_mtd); - iounmap((void *)nandaddr); + kfree (h1910_nand_mtd); + iounmap ((void *) nandaddr); return -ENXIO; } + #ifdef CONFIG_MTD_CMDLINE_PARTS - mtd_parts_nb = parse_cmdline_partitions(h1910_nand_mtd, &mtd_parts, "h1910-nand"); + mtd_parts_nb = parse_cmdline_partitions(h1910_nand_mtd, &mtd_parts, + "h1910-nand"); if (mtd_parts_nb > 0) - part_type = "command line"; + part_type = "command line"; else - mtd_parts_nb = 0; + mtd_parts_nb = 0; #endif - if (mtd_parts_nb == 0) { + if (mtd_parts_nb == 0) + { mtd_parts = partition_info; mtd_parts_nb = NUM_PARTITIONS; part_type = "static"; @@ -161,26 +183,24 @@ static int __init h1910_init(void) /* Return happy */ return 0; } - module_init(h1910_init); /* * Clean up routine */ -static void __exit h1910_cleanup(void) +static void __exit h1910_cleanup (void) { - struct nand_chip *this = (struct nand_chip *)&h1910_nand_mtd[1]; + struct nand_chip *this = (struct nand_chip *) &h1910_nand_mtd[1]; /* Release resources, unregister device */ - nand_release(h1910_nand_mtd); + nand_release (h1910_nand_mtd); /* Release io resource */ - iounmap((void *)this->IO_ADDR_W); + iounmap ((void *) this->IO_ADDR_W); /* Free the MTD device structure */ - kfree(h1910_nand_mtd); + kfree (h1910_nand_mtd); } - module_exit(h1910_cleanup); MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 975b2ef61..95e96fa1f 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -10,31 +10,67 @@ * http://www.linux-mtd.infradead.org/tech/nand.html * * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com) - * 2002-2006 Thomas Gleixner (tglx@linutronix.de) + * 2002 Thomas Gleixner (tglx@linutronix.de) * - * Credits: + * 02-08-2004 tglx: support for strange chips, which cannot auto increment + * pages on read / read_oob + * + * 03-17-2004 tglx: Check ready before auto increment check. Simon Bayes + * pointed this out, as he marked an auto increment capable chip + * as NOAUTOINCR in the board driver. + * Make reads over block boundaries work too + * + * 04-14-2004 tglx: first working version for 2k page size chips + * + * 05-19-2004 tglx: Basic support for Renesas AG-AND chips + * + * 09-24-2004 tglx: add support for hardware controllers (e.g. ECC) shared + * among multiple independend devices. Suggestions and initial patch + * from Ben Dooks + * + * 12-05-2004 dmarlin: add workaround for Renesas AG-AND chips "disturb" issue. + * Basically, any block not rewritten may lose data when surrounding blocks + * are rewritten many times. JFFS2 ensures this doesn't happen for blocks + * it uses, but the Bad Block Table(s) may not be rewritten. To ensure they + * do not lose data, force them to be rewritten when some of the surrounding + * blocks are erased. Rather than tracking a specific nearby block (which + * could itself go bad), use a page address 'mask' to select several blocks + * in the same area, and rewrite the BBT when any of them are erased. + * + * 01-03-2005 dmarlin: added support for the device recovery command sequence for Renesas + * AG-AND chips. If there was a sudden loss of power during an erase operation, + * a "device recovery" operation must be performed when power is restored + * to ensure correct operation. + * + * 01-20-2005 dmarlin: added support for optional hardware specific callback routine to + * perform extra error status checks on erase and write failures. This required + * adding a wrapper function for nand_read_ecc. + * + * 08-20-2005 vwool: suspend/resume added + * + * Credits: * David Woodhouse for adding multichip support * * Aleph One Ltd. and Toby Churchill Ltd. for supporting the * rework for 2K page size chips * - * TODO: + * TODO: * Enable cached programming for 2k page size chips * Check, if mtd->ecctype should be set to MTD_ECC_HW * if we have HW ecc support. * The AG-AND chips have nice features for speed improvement, * which are not supported yet. Read / program 4 pages in one go. * + * $Id: nand_base.c,v 1.150 2005/09/15 13:58:48 vwool Exp $ + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */ -#include #include #include -#include #include #include #include @@ -52,46 +88,75 @@ #endif /* Define default oob placement schemes for large and small page devices */ -static struct nand_ecclayout nand_oob_8 = { +static struct nand_oobinfo nand_oob_8 = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 3, .eccpos = {0, 1, 2}, - .oobfree = { - {.offset = 3, - .length = 2}, - {.offset = 6, - .length = 2}} + .oobfree = { {3, 2}, {6, 2} } }; -static struct nand_ecclayout nand_oob_16 = { +static struct nand_oobinfo nand_oob_16 = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 6, .eccpos = {0, 1, 2, 3, 6, 7}, - .oobfree = { - {.offset = 8, - . length = 8}} + .oobfree = { {8, 8} } }; -static struct nand_ecclayout nand_oob_64 = { +static struct nand_oobinfo nand_oob_64 = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 24, .eccpos = { - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63}, - .oobfree = { - {.offset = 2, - .length = 38}} + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63}, + .oobfree = { {2, 38} } }; -static int nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, - int new_state); - -static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops); +/* This is used for padding purposes in nand_write_oob */ +static u_char ffchars[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; /* - * For devices which display every fart in the system on a seperate LED. Is - * compiled away when LED support is disabled. + * NAND low-level MTD interface functions */ -DEFINE_LED_TRIGGER(nand_led_trigger); +static void nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len); +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len); +static int nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len); + +static int nand_read (struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf); +static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel); +static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf); +static int nand_write (struct mtd_info *mtd, loff_t to, size_t len, size_t * retlen, const u_char * buf); +static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel); +static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * retlen, const u_char *buf); +static int nand_writev (struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t * retlen); +static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t * retlen, u_char *eccbuf, struct nand_oobinfo *oobsel); +static int nand_erase (struct mtd_info *mtd, struct erase_info *instr); +static void nand_sync (struct mtd_info *mtd); + +/* Some internal functions */ +static int nand_write_page (struct mtd_info *mtd, struct nand_chip *this, int page, u_char *oob_buf, + struct nand_oobinfo *oobsel, int mode); +#ifdef CONFIG_MTD_NAND_VERIFY_WRITE +static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int page, int numpages, + u_char *oob_buf, struct nand_oobinfo *oobsel, int chipnr, int oobmode); +#else +#define nand_verify_pages(...) (0) +#endif + +static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int new_state); /** * nand_release_device - [GENERIC] release chip @@ -99,19 +164,27 @@ DEFINE_LED_TRIGGER(nand_led_trigger); * * Deselect, release chip lock and wake up anyone waiting on the device */ -static void nand_release_device(struct mtd_info *mtd) +static void nand_release_device (struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; /* De-select the NAND device */ - chip->select_chip(mtd, -1); - - /* Release the controller and the chip */ - spin_lock(&chip->controller->lock); - chip->controller->active = NULL; - chip->state = FL_READY; - wake_up(&chip->controller->wq); - spin_unlock(&chip->controller->lock); + this->select_chip(mtd, -1); + + if (this->controller) { + /* Release the controller and the chip */ + spin_lock(&this->controller->lock); + this->controller->active = NULL; + this->state = FL_READY; + wake_up(&this->controller->wq); + spin_unlock(&this->controller->lock); + } else { + /* Release the chip */ + spin_lock(&this->chip_lock); + this->state = FL_READY; + wake_up(&this->wq); + spin_unlock(&this->chip_lock); + } } /** @@ -120,10 +193,23 @@ static void nand_release_device(struct mtd_info *mtd) * * Default read function for 8bit buswith */ -static uint8_t nand_read_byte(struct mtd_info *mtd) +static u_char nand_read_byte(struct mtd_info *mtd) +{ + struct nand_chip *this = mtd->priv; + return readb(this->IO_ADDR_R); +} + +/** + * nand_write_byte - [DEFAULT] write one byte to the chip + * @mtd: MTD device structure + * @byte: pointer to data byte to write + * + * Default write function for 8it buswith + */ +static void nand_write_byte(struct mtd_info *mtd, u_char byte) { - struct nand_chip *chip = mtd->priv; - return readb(chip->IO_ADDR_R); + struct nand_chip *this = mtd->priv; + writeb(byte, this->IO_ADDR_W); } /** @@ -133,10 +219,24 @@ static uint8_t nand_read_byte(struct mtd_info *mtd) * Default read function for 16bit buswith with * endianess conversion */ -static uint8_t nand_read_byte16(struct mtd_info *mtd) +static u_char nand_read_byte16(struct mtd_info *mtd) +{ + struct nand_chip *this = mtd->priv; + return (u_char) cpu_to_le16(readw(this->IO_ADDR_R)); +} + +/** + * nand_write_byte16 - [DEFAULT] write one byte endianess aware to the chip + * @mtd: MTD device structure + * @byte: pointer to data byte to write + * + * Default write function for 16bit buswith with + * endianess conversion + */ +static void nand_write_byte16(struct mtd_info *mtd, u_char byte) { - struct nand_chip *chip = mtd->priv; - return (uint8_t) cpu_to_le16(readw(chip->IO_ADDR_R)); + struct nand_chip *this = mtd->priv; + writew(le16_to_cpu((u16) byte), this->IO_ADDR_W); } /** @@ -148,26 +248,40 @@ static uint8_t nand_read_byte16(struct mtd_info *mtd) */ static u16 nand_read_word(struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; - return readw(chip->IO_ADDR_R); + struct nand_chip *this = mtd->priv; + return readw(this->IO_ADDR_R); +} + +/** + * nand_write_word - [DEFAULT] write one word to the chip + * @mtd: MTD device structure + * @word: data word to write + * + * Default write function for 16bit buswith without + * endianess conversion + */ +static void nand_write_word(struct mtd_info *mtd, u16 word) +{ + struct nand_chip *this = mtd->priv; + writew(word, this->IO_ADDR_W); } /** * nand_select_chip - [DEFAULT] control CE line * @mtd: MTD device structure - * @chipnr: chipnumber to select, -1 for deselect + * @chip: chipnumber to select, -1 for deselect * * Default select function for 1 chip devices. */ -static void nand_select_chip(struct mtd_info *mtd, int chipnr) +static void nand_select_chip(struct mtd_info *mtd, int chip) { - struct nand_chip *chip = mtd->priv; - - switch (chipnr) { + struct nand_chip *this = mtd->priv; + switch(chip) { case -1: - chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | NAND_CTRL_CHANGE); + this->hwcontrol(mtd, NAND_CTL_CLRNCE); break; case 0: + this->hwcontrol(mtd, NAND_CTL_SETNCE); break; default: @@ -183,13 +297,13 @@ static void nand_select_chip(struct mtd_info *mtd, int chipnr) * * Default write function for 8bit buswith */ -static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) +static void nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) - writeb(buf[i], chip->IO_ADDR_W); + for (i=0; iIO_ADDR_W); } /** @@ -200,13 +314,13 @@ static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) * * Default read function for 8bit buswith */ -static void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) - buf[i] = readb(chip->IO_ADDR_R); + for (i=0; iIO_ADDR_R); } /** @@ -217,14 +331,15 @@ static void nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) * * Default verify function for 8bit buswith */ -static int nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) +static int nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - for (i = 0; i < len; i++) - if (buf[i] != readb(chip->IO_ADDR_R)) + for (i=0; iIO_ADDR_R)) return -EFAULT; + return 0; } @@ -236,15 +351,15 @@ static int nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) * * Default write function for 16bit buswith */ -static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) +static void nand_write_buf16(struct mtd_info *mtd, const u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) - writew(p[i], chip->IO_ADDR_W); + for (i=0; iIO_ADDR_W); } @@ -256,15 +371,15 @@ static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) * * Default read function for 16bit buswith */ -static void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) +static void nand_read_buf16(struct mtd_info *mtd, u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) - p[i] = readw(chip->IO_ADDR_R); + for (i=0; iIO_ADDR_R); } /** @@ -275,15 +390,15 @@ static void nand_read_buf16(struct mtd_info *mtd, uint8_t *buf, int len) * * Default verify function for 16bit buswith */ -static int nand_verify_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) +static int nand_verify_buf16(struct mtd_info *mtd, const u_char *buf, int len) { int i; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; u16 *p = (u16 *) buf; len >>= 1; - for (i = 0; i < len; i++) - if (p[i] != readw(chip->IO_ADDR_R)) + for (i=0; iIO_ADDR_R)) return -EFAULT; return 0; @@ -300,37 +415,38 @@ static int nand_verify_buf16(struct mtd_info *mtd, const uint8_t *buf, int len) static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) { int page, chipnr, res = 0; - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; u16 bad; if (getchip) { - page = (int)(ofs >> chip->page_shift); - chipnr = (int)(ofs >> chip->chip_shift); + page = (int)(ofs >> this->page_shift); + chipnr = (int)(ofs >> this->chip_shift); - nand_get_device(chip, mtd, FL_READING); + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd, FL_READING); /* Select the NAND device */ - chip->select_chip(mtd, chipnr); + this->select_chip(mtd, chipnr); } else - page = (int)ofs; + page = (int) ofs; - if (chip->options & NAND_BUSWIDTH_16) { - chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos & 0xFE, - page & chip->pagemask); - bad = cpu_to_le16(chip->read_word(mtd)); - if (chip->badblockpos & 0x1) + if (this->options & NAND_BUSWIDTH_16) { + this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE, page & this->pagemask); + bad = cpu_to_le16(this->read_word(mtd)); + if (this->badblockpos & 0x1) bad >>= 8; if ((bad & 0xFF) != 0xff) res = 1; } else { - chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos, - page & chip->pagemask); - if (chip->read_byte(mtd) != 0xff) + this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos, page & this->pagemask); + if (this->read_byte(mtd) != 0xff) res = 1; } - if (getchip) + if (getchip) { + /* Deselect and wake up anyone waiting on the device */ nand_release_device(mtd); + } return res; } @@ -345,33 +461,23 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) */ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) { - struct nand_chip *chip = mtd->priv; - uint8_t buf[2] = { 0, 0 }; - int block, ret; + struct nand_chip *this = mtd->priv; + u_char buf[2] = {0, 0}; + size_t retlen; + int block; /* Get block number */ - block = ((int)ofs) >> chip->bbt_erase_shift; - if (chip->bbt) - chip->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); + block = ((int) ofs) >> this->bbt_erase_shift; + if (this->bbt) + this->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1); /* Do we have a flash based bad block table ? */ - if (chip->options & NAND_USE_FLASH_BBT) - ret = nand_update_bbt(mtd, ofs); - else { - /* We write two bytes, so we dont have to mess with 16 bit - * access - */ - ofs += mtd->oobsize; - chip->ops.len = 2; - chip->ops.datbuf = NULL; - chip->ops.oobbuf = buf; - chip->ops.ooboffs = chip->badblockpos & ~0x01; + if (this->options & NAND_USE_FLASH_BBT) + return nand_update_bbt (mtd, ofs); - ret = nand_do_write_oob(mtd, ofs, &chip->ops); - } - if (!ret) - mtd->ecc_stats.badblocks++; - return ret; + /* We write two bytes, so we dont have to mess with 16 bit access */ + ofs += mtd->oobsize + (this->badblockpos & ~0x01); + return nand_write_oob (mtd, ofs , 2, &retlen, buf); } /** @@ -381,12 +487,12 @@ static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) * * The function expects, that the device is already selected */ -static int nand_check_wp(struct mtd_info *mtd) +static int nand_check_wp (struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; /* Check the WP bit */ - chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1); - return (chip->read_byte(mtd) & NAND_STATUS_WP) ? 0 : 1; + this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1); + return (this->read_byte(mtd) & NAND_STATUS_WP) ? 0 : 1; } /** @@ -399,31 +505,32 @@ static int nand_check_wp(struct mtd_info *mtd) * Check, if the block is bad. Either by reading the bad block table or * calling of the scan function. */ -static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int getchip, - int allowbbt) +static int nand_block_checkbad (struct mtd_info *mtd, loff_t ofs, int getchip, int allowbbt) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - if (!chip->bbt) - return chip->block_bad(mtd, ofs, getchip); + if (!this->bbt) + return this->block_bad(mtd, ofs, getchip); /* Return info from the table */ - return nand_isbad_bbt(mtd, ofs, allowbbt); + return nand_isbad_bbt (mtd, ofs, allowbbt); } +DEFINE_LED_TRIGGER(nand_led_trigger); + /* * Wait for the ready pin, after a command * The timeout is catched later. */ static void nand_wait_ready(struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; - unsigned long timeo = jiffies + 2; + struct nand_chip *this = mtd->priv; + unsigned long timeo = jiffies + 2; led_trigger_event(nand_led_trigger, LED_FULL); /* wait until command is processed or timeout occures */ do { - if (chip->dev_ready(mtd)) + if (this->dev_ready(mtd)) break; touch_softlockup_watchdog(); } while (time_before(jiffies, timeo)); @@ -440,21 +547,21 @@ static void nand_wait_ready(struct mtd_info *mtd) * Send command to NAND device. This function is used for small page * devices (256/512 Bytes per page) */ -static void nand_command(struct mtd_info *mtd, unsigned int command, - int column, int page_addr) +static void nand_command (struct mtd_info *mtd, unsigned command, int column, int page_addr) { - register struct nand_chip *chip = mtd->priv; - int ctrl = NAND_CTRL_CLE | NAND_CTRL_CHANGE; + register struct nand_chip *this = mtd->priv; + /* Begin command latch cycle */ + this->hwcontrol(mtd, NAND_CTL_SETCLE); /* * Write out the command to the device. */ if (command == NAND_CMD_SEQIN) { int readcmd; - if (column >= mtd->writesize) { + if (column >= mtd->oobblock) { /* OOB area */ - column -= mtd->writesize; + column -= mtd->oobblock; readcmd = NAND_CMD_READOOB; } else if (column < 256) { /* First 256 bytes --> READ0 */ @@ -463,37 +570,38 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, column -= 256; readcmd = NAND_CMD_READ1; } - chip->cmd_ctrl(mtd, readcmd, ctrl); - ctrl &= ~NAND_CTRL_CHANGE; + this->write_byte(mtd, readcmd); } - chip->cmd_ctrl(mtd, command, ctrl); + this->write_byte(mtd, command); - /* - * Address cycle, when necessary - */ - ctrl = NAND_CTRL_ALE | NAND_CTRL_CHANGE; - /* Serially input address */ - if (column != -1) { - /* Adjust columns for 16 bit buswidth */ - if (chip->options & NAND_BUSWIDTH_16) - column >>= 1; - chip->cmd_ctrl(mtd, column, ctrl); - ctrl &= ~NAND_CTRL_CHANGE; - } - if (page_addr != -1) { - chip->cmd_ctrl(mtd, page_addr, ctrl); - ctrl &= ~NAND_CTRL_CHANGE; - chip->cmd_ctrl(mtd, page_addr >> 8, ctrl); - /* One more address cycle for devices > 32MiB */ - if (chip->chipsize > (32 << 20)) - chip->cmd_ctrl(mtd, page_addr >> 16, ctrl); + /* Set ALE and clear CLE to start address cycle */ + this->hwcontrol(mtd, NAND_CTL_CLRCLE); + + if (column != -1 || page_addr != -1) { + this->hwcontrol(mtd, NAND_CTL_SETALE); + + /* Serially input address */ + if (column != -1) { + /* Adjust columns for 16 bit buswidth */ + if (this->options & NAND_BUSWIDTH_16) + column >>= 1; + this->write_byte(mtd, column); + } + if (page_addr != -1) { + this->write_byte(mtd, (unsigned char) (page_addr & 0xff)); + this->write_byte(mtd, (unsigned char) ((page_addr >> 8) & 0xff)); + /* One more address cycle for devices > 32MiB */ + if (this->chipsize > (32 << 20)) + this->write_byte(mtd, (unsigned char) ((page_addr >> 16) & 0x0f)); + } + /* Latch in address */ + this->hwcontrol(mtd, NAND_CTL_CLRALE); } - chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); /* * program and erase have their own busy handlers * status and sequential in needs no delay - */ + */ switch (command) { case NAND_CMD_PAGEPROG: @@ -504,30 +612,29 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, return; case NAND_CMD_RESET: - if (chip->dev_ready) + if (this->dev_ready) break; - udelay(chip->chip_delay); - chip->cmd_ctrl(mtd, NAND_CMD_STATUS, - NAND_CTRL_CLE | NAND_CTRL_CHANGE); - chip->cmd_ctrl(mtd, - NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); - while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ; + udelay(this->chip_delay); + this->hwcontrol(mtd, NAND_CTL_SETCLE); + this->write_byte(mtd, NAND_CMD_STATUS); + this->hwcontrol(mtd, NAND_CTL_CLRCLE); + while ( !(this->read_byte(mtd) & NAND_STATUS_READY)); return; - /* This applies to read commands */ + /* This applies to read commands */ default: /* * If we don't have access to the busy pin, we apply the given * command delay - */ - if (!chip->dev_ready) { - udelay(chip->chip_delay); + */ + if (!this->dev_ready) { + udelay (this->chip_delay); return; } } /* Apply this short delay always to ensure that we do wait tWB in * any case on any machine. */ - ndelay(100); + ndelay (100); nand_wait_ready(mtd); } @@ -539,48 +646,50 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, * @column: the column address for this command, -1 if none * @page_addr: the page address for this command, -1 if none * - * Send command to NAND device. This is the version for the new large page - * devices We dont have the separate regions as we have in the small page - * devices. We must emulate NAND_CMD_READOOB to keep the code compatible. + * Send command to NAND device. This is the version for the new large page devices + * We dont have the seperate regions as we have in the small page devices. + * We must emulate NAND_CMD_READOOB to keep the code compatible. + * */ -static void nand_command_lp(struct mtd_info *mtd, unsigned int command, - int column, int page_addr) +static void nand_command_lp (struct mtd_info *mtd, unsigned command, int column, int page_addr) { - register struct nand_chip *chip = mtd->priv; + register struct nand_chip *this = mtd->priv; /* Emulate NAND_CMD_READOOB */ if (command == NAND_CMD_READOOB) { - column += mtd->writesize; + column += mtd->oobblock; command = NAND_CMD_READ0; } - /* Command latch cycle */ - chip->cmd_ctrl(mtd, command & 0xff, - NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE); + + /* Begin command latch cycle */ + this->hwcontrol(mtd, NAND_CTL_SETCLE); + /* Write out the command to the device. */ + this->write_byte(mtd, (command & 0xff)); + /* End command latch cycle */ + this->hwcontrol(mtd, NAND_CTL_CLRCLE); if (column != -1 || page_addr != -1) { - int ctrl = NAND_CTRL_CHANGE | NAND_NCE | NAND_ALE; + this->hwcontrol(mtd, NAND_CTL_SETALE); /* Serially input address */ if (column != -1) { /* Adjust columns for 16 bit buswidth */ - if (chip->options & NAND_BUSWIDTH_16) + if (this->options & NAND_BUSWIDTH_16) column >>= 1; - chip->cmd_ctrl(mtd, column, ctrl); - ctrl &= ~NAND_CTRL_CHANGE; - chip->cmd_ctrl(mtd, column >> 8, ctrl); + this->write_byte(mtd, column & 0xff); + this->write_byte(mtd, column >> 8); } if (page_addr != -1) { - chip->cmd_ctrl(mtd, page_addr, ctrl); - chip->cmd_ctrl(mtd, page_addr >> 8, - NAND_NCE | NAND_ALE); + this->write_byte(mtd, (unsigned char) (page_addr & 0xff)); + this->write_byte(mtd, (unsigned char) ((page_addr >> 8) & 0xff)); /* One more address cycle for devices > 128MiB */ - if (chip->chipsize > (128 << 20)) - chip->cmd_ctrl(mtd, page_addr >> 16, - NAND_NCE | NAND_ALE); + if (this->chipsize > (128 << 20)) + this->write_byte(mtd, (unsigned char) ((page_addr >> 16) & 0xff)); } + /* Latch in address */ + this->hwcontrol(mtd, NAND_CTL_CLRALE); } - chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); /* * program and erase have their own busy handlers @@ -593,96 +702,95 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, case NAND_CMD_ERASE1: case NAND_CMD_ERASE2: case NAND_CMD_SEQIN: - case NAND_CMD_RNDIN: case NAND_CMD_STATUS: case NAND_CMD_DEPLETE1: return; - /* - * read error status commands require only a short delay - */ + /* + * read error status commands require only a short delay + */ case NAND_CMD_STATUS_ERROR: case NAND_CMD_STATUS_ERROR0: case NAND_CMD_STATUS_ERROR1: case NAND_CMD_STATUS_ERROR2: case NAND_CMD_STATUS_ERROR3: - udelay(chip->chip_delay); + udelay(this->chip_delay); return; case NAND_CMD_RESET: - if (chip->dev_ready) + if (this->dev_ready) break; - udelay(chip->chip_delay); - chip->cmd_ctrl(mtd, NAND_CMD_STATUS, - NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE); - chip->cmd_ctrl(mtd, NAND_CMD_NONE, - NAND_NCE | NAND_CTRL_CHANGE); - while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ; - return; - - case NAND_CMD_RNDOUT: - /* No ready / busy check necessary */ - chip->cmd_ctrl(mtd, NAND_CMD_RNDOUTSTART, - NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE); - chip->cmd_ctrl(mtd, NAND_CMD_NONE, - NAND_NCE | NAND_CTRL_CHANGE); + udelay(this->chip_delay); + this->hwcontrol(mtd, NAND_CTL_SETCLE); + this->write_byte(mtd, NAND_CMD_STATUS); + this->hwcontrol(mtd, NAND_CTL_CLRCLE); + while ( !(this->read_byte(mtd) & NAND_STATUS_READY)); return; case NAND_CMD_READ0: - chip->cmd_ctrl(mtd, NAND_CMD_READSTART, - NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE); - chip->cmd_ctrl(mtd, NAND_CMD_NONE, - NAND_NCE | NAND_CTRL_CHANGE); - - /* This applies to read commands */ + /* Begin command latch cycle */ + this->hwcontrol(mtd, NAND_CTL_SETCLE); + /* Write out the start read command */ + this->write_byte(mtd, NAND_CMD_READSTART); + /* End command latch cycle */ + this->hwcontrol(mtd, NAND_CTL_CLRCLE); + /* Fall through into ready check */ + + /* This applies to read commands */ default: /* * If we don't have access to the busy pin, we apply the given * command delay - */ - if (!chip->dev_ready) { - udelay(chip->chip_delay); + */ + if (!this->dev_ready) { + udelay (this->chip_delay); return; } } /* Apply this short delay always to ensure that we do wait tWB in * any case on any machine. */ - ndelay(100); + ndelay (100); nand_wait_ready(mtd); } /** * nand_get_device - [GENERIC] Get chip for selected access - * @chip: the nand chip descriptor + * @this: the nand chip descriptor * @mtd: MTD device structure * @new_state: the state which is requested * * Get the device and lock it for exclusive access */ -static int -nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state) +static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int new_state) { - spinlock_t *lock = &chip->controller->lock; - wait_queue_head_t *wq = &chip->controller->wq; - DECLARE_WAITQUEUE(wait, current); - retry: + struct nand_chip *active; + spinlock_t *lock; + wait_queue_head_t *wq; + DECLARE_WAITQUEUE (wait, current); + + lock = (this->controller) ? &this->controller->lock : &this->chip_lock; + wq = (this->controller) ? &this->controller->wq : &this->wq; +retry: + active = this; spin_lock(lock); /* Hardware controller shared among independend devices */ - /* Hardware controller shared among independend devices */ - if (!chip->controller->active) - chip->controller->active = chip; - - if (chip->controller->active == chip && chip->state == FL_READY) { - chip->state = new_state; + if (this->controller) { + if (this->controller->active) + active = this->controller->active; + else + this->controller->active = this; + } + if (active == this && this->state == FL_READY) { + this->state = new_state; spin_unlock(lock); return 0; } if (new_state == FL_PM_SUSPENDED) { spin_unlock(lock); - return (chip->state == FL_PM_SUSPENDED) ? 0 : -EAGAIN; + return (this->state == FL_PM_SUSPENDED) ? 0 : -EAGAIN; } set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(wq, &wait); @@ -695,341 +803,541 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state) /** * nand_wait - [DEFAULT] wait until the command is done * @mtd: MTD device structure - * @chip: NAND chip structure + * @this: NAND chip structure + * @state: state to select the max. timeout value * * Wait for command done. This applies to erase and program only * Erase can take up to 400ms and program up to 20ms according to * general NAND and SmartMedia specs - */ -static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) + * +*/ +static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state) { - unsigned long timeo = jiffies; - int status, state = chip->state; + unsigned long timeo = jiffies; + int status; if (state == FL_ERASING) - timeo += (HZ * 400) / 1000; + timeo += (HZ * 400) / 1000; else - timeo += (HZ * 20) / 1000; + timeo += (HZ * 20) / 1000; led_trigger_event(nand_led_trigger, LED_FULL); /* Apply this short delay always to ensure that we do wait tWB in * any case on any machine. */ - ndelay(100); + ndelay (100); - if ((state == FL_ERASING) && (chip->options & NAND_IS_AND)) - chip->cmdfunc(mtd, NAND_CMD_STATUS_MULTI, -1, -1); + if ((state == FL_ERASING) && (this->options & NAND_IS_AND)) + this->cmdfunc (mtd, NAND_CMD_STATUS_MULTI, -1, -1); else - chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1); + this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1); while (time_before(jiffies, timeo)) { - if (chip->dev_ready) { - if (chip->dev_ready(mtd)) + /* Check, if we were interrupted */ + if (this->state != state) + return 0; + + if (this->dev_ready) { + if (this->dev_ready(mtd)) break; } else { - if (chip->read_byte(mtd) & NAND_STATUS_READY) + if (this->read_byte(mtd) & NAND_STATUS_READY) break; } cond_resched(); } led_trigger_event(nand_led_trigger, LED_OFF); - status = (int)chip->read_byte(mtd); + status = (int) this->read_byte(mtd); return status; } /** - * nand_read_page_raw - [Intern] read raw page data without ecc - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: buffer to store read data + * nand_write_page - [GENERIC] write one page + * @mtd: MTD device structure + * @this: NAND chip structure + * @page: startpage inside the chip, must be called with (page & this->pagemask) + * @oob_buf: out of band data buffer + * @oobsel: out of band selecttion structre + * @cached: 1 = enable cached programming if supported by chip + * + * Nand_page_program function is used for write and writev ! + * This function will always program a full page of data + * If you call it with a non page aligned buffer, you're lost :) + * + * Cached programming is not supported yet. */ -static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) +static int nand_write_page (struct mtd_info *mtd, struct nand_chip *this, int page, + u_char *oob_buf, struct nand_oobinfo *oobsel, int cached) { - chip->read_buf(mtd, buf, mtd->writesize); - chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); - return 0; -} + int i, status; + u_char ecc_code[32]; + int eccmode = oobsel->useecc ? this->eccmode : NAND_ECC_NONE; + int *oob_config = oobsel->eccpos; + int datidx = 0, eccidx = 0, eccsteps = this->eccsteps; + int eccbytes = 0; + + /* FIXME: Enable cached programming */ + cached = 0; -/** - * nand_read_page_swecc - {REPLACABLE] software ecc based page read function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: buffer to store read data - */ -static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) -{ - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - uint8_t *p = buf; - uint8_t *ecc_calc = chip->buffers.ecccalc; - uint8_t *ecc_code = chip->buffers.ecccode; - int *eccpos = chip->ecc.layout->eccpos; + /* Send command to begin auto page programming */ + this->cmdfunc (mtd, NAND_CMD_SEQIN, 0x00, page); + + /* Write out complete page of data, take care of eccmode */ + switch (eccmode) { + /* No ecc, write all */ + case NAND_ECC_NONE: + printk (KERN_WARNING "Writing data without ECC to NAND-FLASH is not recommended\n"); + this->write_buf(mtd, this->data_poi, mtd->oobblock); + break; - nand_read_page_raw(mtd, chip, buf); + /* Software ecc 3/256, write all */ + case NAND_ECC_SOFT: + for (; eccsteps; eccsteps--) { + this->calculate_ecc(mtd, &this->data_poi[datidx], ecc_code); + for (i = 0; i < 3; i++, eccidx++) + oob_buf[oob_config[eccidx]] = ecc_code[i]; + datidx += this->eccsize; + } + this->write_buf(mtd, this->data_poi, mtd->oobblock); + break; + default: + eccbytes = this->eccbytes; + for (; eccsteps; eccsteps--) { + /* enable hardware ecc logic for write */ + this->enable_hwecc(mtd, NAND_ECC_WRITE); + this->write_buf(mtd, &this->data_poi[datidx], this->eccsize); + this->calculate_ecc(mtd, &this->data_poi[datidx], ecc_code); + for (i = 0; i < eccbytes; i++, eccidx++) + oob_buf[oob_config[eccidx]] = ecc_code[i]; + /* If the hardware ecc provides syndromes then + * the ecc code must be written immidiately after + * the data bytes (words) */ + if (this->options & NAND_HWECC_SYNDROME) + this->write_buf(mtd, ecc_code, eccbytes); + datidx += this->eccsize; + } + break; + } - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) - chip->ecc.calculate(mtd, p, &ecc_calc[i]); + /* Write out OOB data */ + if (this->options & NAND_HWECC_SYNDROME) + this->write_buf(mtd, &oob_buf[oobsel->eccbytes], mtd->oobsize - oobsel->eccbytes); + else + this->write_buf(mtd, oob_buf, mtd->oobsize); - for (i = 0; i < chip->ecc.total; i++) - ecc_code[i] = chip->oob_poi[eccpos[i]]; + /* Send command to actually program the data */ + this->cmdfunc (mtd, cached ? NAND_CMD_CACHEDPROG : NAND_CMD_PAGEPROG, -1, -1); - eccsteps = chip->ecc.steps; - p = buf; + if (!cached) { + /* call wait ready function */ + status = this->waitfunc (mtd, this, FL_WRITING); - for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - int stat; + /* See if operation failed and additional status checks are available */ + if ((status & NAND_STATUS_FAIL) && (this->errstat)) { + status = this->errstat(mtd, this, FL_WRITING, status, page); + } - stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); - if (stat == -1) - mtd->ecc_stats.failed++; - else - mtd->ecc_stats.corrected += stat; + /* See if device thinks it succeeded */ + if (status & NAND_STATUS_FAIL) { + DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page); + return -EIO; + } + } else { + /* FIXME: Implement cached programming ! */ + /* wait until cache is ready*/ + // status = this->waitfunc (mtd, this, FL_CACHEDRPG); } return 0; } +#ifdef CONFIG_MTD_NAND_VERIFY_WRITE /** - * nand_read_page_hwecc - {REPLACABLE] hardware ecc based page read function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: buffer to store read data + * nand_verify_pages - [GENERIC] verify the chip contents after a write + * @mtd: MTD device structure + * @this: NAND chip structure + * @page: startpage inside the chip, must be called with (page & this->pagemask) + * @numpages: number of pages to verify + * @oob_buf: out of band data buffer + * @oobsel: out of band selecttion structre + * @chipnr: number of the current chip + * @oobmode: 1 = full buffer verify, 0 = ecc only * - * Not for syndrome calculating ecc controllers which need a special oob layout + * The NAND device assumes that it is always writing to a cleanly erased page. + * Hence, it performs its internal write verification only on bits that + * transitioned from 1 to 0. The device does NOT verify the whole page on a + * byte by byte basis. It is possible that the page was not completely erased + * or the page is becoming unusable due to wear. The read with ECC would catch + * the error later when the ECC page check fails, but we would rather catch + * it early in the page write stage. Better to write no data than invalid data. */ -static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) +static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int page, int numpages, + u_char *oob_buf, struct nand_oobinfo *oobsel, int chipnr, int oobmode) { - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - uint8_t *p = buf; - uint8_t *ecc_calc = chip->buffers.ecccalc; - uint8_t *ecc_code = chip->buffers.ecccode; - int *eccpos = chip->ecc.layout->eccpos; - - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - chip->ecc.calculate(mtd, p, &ecc_calc[i]); - } - chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); + int i, j, datidx = 0, oobofs = 0, res = -EIO; + int eccsteps = this->eccsteps; + int hweccbytes; + u_char oobdata[64]; + + hweccbytes = (this->options & NAND_HWECC_SYNDROME) ? (oobsel->eccbytes / eccsteps) : 0; + + /* Send command to read back the first page */ + this->cmdfunc (mtd, NAND_CMD_READ0, 0, page); + + for(;;) { + for (j = 0; j < eccsteps; j++) { + /* Loop through and verify the data */ + if (this->verify_buf(mtd, &this->data_poi[datidx], mtd->eccsize)) { + DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + goto out; + } + datidx += mtd->eccsize; + /* Have we a hw generator layout ? */ + if (!hweccbytes) + continue; + if (this->verify_buf(mtd, &this->oob_buf[oobofs], hweccbytes)) { + DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + goto out; + } + oobofs += hweccbytes; + } - for (i = 0; i < chip->ecc.total; i++) - ecc_code[i] = chip->oob_poi[eccpos[i]]; + /* check, if we must compare all data or if we just have to + * compare the ecc bytes + */ + if (oobmode) { + if (this->verify_buf(mtd, &oob_buf[oobofs], mtd->oobsize - hweccbytes * eccsteps)) { + DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + goto out; + } + } else { + /* Read always, else autoincrement fails */ + this->read_buf(mtd, oobdata, mtd->oobsize - hweccbytes * eccsteps); + + if (oobsel->useecc != MTD_NANDECC_OFF && !hweccbytes) { + int ecccnt = oobsel->eccbytes; + + for (i = 0; i < ecccnt; i++) { + int idx = oobsel->eccpos[i]; + if (oobdata[idx] != oob_buf[oobofs + idx] ) { + DEBUG (MTD_DEBUG_LEVEL0, + "%s: Failed ECC write " + "verify, page 0x%08x, " "%6i bytes were succesful\n", __FUNCTION__, page, i); + goto out; + } + } + } + } + oobofs += mtd->oobsize - hweccbytes * eccsteps; + page++; + numpages--; + + /* Apply delay or wait for ready/busy pin + * Do this before the AUTOINCR check, so no problems + * arise if a chip which does auto increment + * is marked as NOAUTOINCR by the board driver. + * Do this also before returning, so the chip is + * ready for the next command. + */ + if (!this->dev_ready) + udelay (this->chip_delay); + else + nand_wait_ready(mtd); - eccsteps = chip->ecc.steps; - p = buf; + /* All done, return happy */ + if (!numpages) + return 0; - for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - int stat; - stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); - if (stat == -1) - mtd->ecc_stats.failed++; - else - mtd->ecc_stats.corrected += stat; + /* Check, if the chip supports auto page increment */ + if (!NAND_CANAUTOINCR(this)) + this->cmdfunc (mtd, NAND_CMD_READ0, 0x00, page); } - return 0; + /* + * Terminate the read command. We come here in case of an error + * So we must issue a reset command. + */ +out: + this->cmdfunc (mtd, NAND_CMD_RESET, -1, -1); + return res; } +#endif /** - * nand_read_page_syndrome - {REPLACABLE] hardware ecc syndrom based page read - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: buffer to store read data + * nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc + * @mtd: MTD device structure + * @from: offset to read from + * @len: number of bytes to read + * @retlen: pointer to variable to store the number of read bytes + * @buf: the databuffer to put data * - * The hw generator calculates the error syndrome automatically. Therefor - * we need a special oob layout and handling. + * This function simply calls nand_do_read_ecc with oob buffer and oobsel = NULL + * and flags = 0xff */ -static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) +static int nand_read (struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf) { - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - uint8_t *p = buf; - uint8_t *oob = chip->oob_poi; - - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - int stat; - - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - - if (chip->ecc.prepad) { - chip->read_buf(mtd, oob, chip->ecc.prepad); - oob += chip->ecc.prepad; - } - - chip->ecc.hwctl(mtd, NAND_ECC_READSYN); - chip->read_buf(mtd, oob, eccbytes); - stat = chip->ecc.correct(mtd, p, oob, NULL); - - if (stat == -1) - mtd->ecc_stats.failed++; - else - mtd->ecc_stats.corrected += stat; - - oob += eccbytes; - - if (chip->ecc.postpad) { - chip->read_buf(mtd, oob, chip->ecc.postpad); - oob += chip->ecc.postpad; - } - } - - /* Calculate remaining oob bytes */ - i = mtd->oobsize - (oob - chip->oob_poi); - if (i) - chip->read_buf(mtd, oob, i); - - return 0; + return nand_do_read_ecc (mtd, from, len, retlen, buf, NULL, &mtd->oobinfo, 0xff); } + /** - * nand_transfer_oob - [Internal] Transfer oob to client buffer - * @chip: nand chip structure - * @oob: oob destination address - * @ops: oob ops structure + * nand_read_ecc - [MTD Interface] MTD compability function for nand_do_read_ecc + * @mtd: MTD device structure + * @from: offset to read from + * @len: number of bytes to read + * @retlen: pointer to variable to store the number of read bytes + * @buf: the databuffer to put data + * @oob_buf: filesystem supplied oob data buffer + * @oobsel: oob selection structure + * + * This function simply calls nand_do_read_ecc with flags = 0xff */ -static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, - struct mtd_oob_ops *ops) +static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * oob_buf, struct nand_oobinfo *oobsel) { - size_t len = ops->ooblen; - - switch(ops->mode) { - - case MTD_OOB_PLACE: - case MTD_OOB_RAW: - memcpy(oob, chip->oob_poi + ops->ooboffs, len); - return oob + len; - - case MTD_OOB_AUTO: { - struct nand_oobfree *free = chip->ecc.layout->oobfree; - uint32_t boffs = 0, roffs = ops->ooboffs; - size_t bytes = 0; - - for(; free->length && len; free++, len -= bytes) { - /* Read request not from offset 0 ? */ - if (unlikely(roffs)) { - if (roffs >= free->length) { - roffs -= free->length; - continue; - } - boffs = free->offset + roffs; - bytes = min_t(size_t, len, - (free->length - roffs)); - roffs = 0; - } else { - bytes = min_t(size_t, len, free->length); - boffs = free->offset; - } - memcpy(oob, chip->oob_poi + boffs, bytes); - oob += bytes; - } - return oob; - } - default: - BUG(); - } - return NULL; + /* use userspace supplied oobinfo, if zero */ + if (oobsel == NULL) + oobsel = &mtd->oobinfo; + return nand_do_read_ecc(mtd, from, len, retlen, buf, oob_buf, oobsel, 0xff); } + /** - * nand_do_read_ops - [Internal] Read data with ECC - * + * nand_do_read_ecc - [MTD Interface] Read data with ECC * @mtd: MTD device structure * @from: offset to read from - * @ops: oob ops structure + * @len: number of bytes to read + * @retlen: pointer to variable to store the number of read bytes + * @buf: the databuffer to put data + * @oob_buf: filesystem supplied oob data buffer (can be NULL) + * @oobsel: oob selection structure + * @flags: flag to indicate if nand_get_device/nand_release_device should be preformed + * and how many corrected error bits are acceptable: + * bits 0..7 - number of tolerable errors + * bit 8 - 0 == do not get/release chip, 1 == get/release chip * - * Internal function. Called with chip held. + * NAND read with ECC */ -static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops) +int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * oob_buf, + struct nand_oobinfo *oobsel, int flags) { - int chipnr, page, realpage, col, bytes, aligned; - struct nand_chip *chip = mtd->priv; - struct mtd_ecc_stats stats; - int blkcheck = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1; - int sndcmd = 1; - int ret = 0; - uint32_t readlen = ops->len; - uint8_t *bufpoi, *oob, *buf; - stats = mtd->ecc_stats; + int i, j, col, realpage, page, end, ecc, chipnr, sndcmd = 1; + int read = 0, oob = 0, ecc_status = 0, ecc_failed = 0; + struct nand_chip *this = mtd->priv; + u_char *data_poi, *oob_data = oob_buf; + u_char ecc_calc[32]; + u_char ecc_code[32]; + int eccmode, eccsteps; + int *oob_config, datidx; + int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1; + int eccbytes; + int compareecc = 1; + int oobreadlen; + + + DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); + + /* Do not allow reads past end of device */ + if ((from + len) > mtd->size) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: Attempt read beyond end of device\n"); + *retlen = 0; + return -EINVAL; + } + + /* Grab the lock and see if the device is available */ + if (flags & NAND_GET_DEVICE) + nand_get_device (this, mtd, FL_READING); + + /* Autoplace of oob data ? Use the default placement scheme */ + if (oobsel->useecc == MTD_NANDECC_AUTOPLACE) + oobsel = this->autooob; + + eccmode = oobsel->useecc ? this->eccmode : NAND_ECC_NONE; + oob_config = oobsel->eccpos; + + /* Select the NAND device */ + chipnr = (int)(from >> this->chip_shift); + this->select_chip(mtd, chipnr); + + /* First we calculate the starting page */ + realpage = (int) (from >> this->page_shift); + page = realpage & this->pagemask; + + /* Get raw starting column */ + col = from & (mtd->oobblock - 1); + + end = mtd->oobblock; + ecc = this->eccsize; + eccbytes = this->eccbytes; + + if ((eccmode == NAND_ECC_NONE) || (this->options & NAND_HWECC_SYNDROME)) + compareecc = 0; - chipnr = (int)(from >> chip->chip_shift); - chip->select_chip(mtd, chipnr); + oobreadlen = mtd->oobsize; + if (this->options & NAND_HWECC_SYNDROME) + oobreadlen -= oobsel->eccbytes; - realpage = (int)(from >> chip->page_shift); - page = realpage & chip->pagemask; + /* Loop until all data read */ + while (read < len) { + + int aligned = (!col && (len - read) >= end); + /* + * If the read is not page aligned, we have to read into data buffer + * due to ecc, else we read into return buffer direct + */ + if (aligned) + data_poi = &buf[read]; + else + data_poi = this->data_buf; - col = (int)(from & (mtd->writesize - 1)); - chip->oob_poi = chip->buffers.oobrbuf; + /* Check, if we have this page in the buffer + * + * FIXME: Make it work when we must provide oob data too, + * check the usage of data_buf oob field + */ + if (realpage == this->pagebuf && !oob_buf) { + /* aligned read ? */ + if (aligned) + memcpy (data_poi, this->data_buf, end); + goto readdata; + } - buf = ops->datbuf; - oob = ops->oobbuf; + /* Check, if we must send the read command */ + if (sndcmd) { + this->cmdfunc (mtd, NAND_CMD_READ0, 0x00, page); + sndcmd = 0; + } - while(1) { - bytes = min(mtd->writesize - col, readlen); - aligned = (bytes == mtd->writesize); + /* get oob area, if we have no oob buffer from fs-driver */ + if (!oob_buf || oobsel->useecc == MTD_NANDECC_AUTOPLACE || + oobsel->useecc == MTD_NANDECC_AUTOPL_USR) + oob_data = &this->data_buf[end]; - /* Is the current page in the buffer ? */ - if (realpage != chip->pagebuf || oob) { - bufpoi = aligned ? buf : chip->buffers.databuf; + eccsteps = this->eccsteps; - if (likely(sndcmd)) { - chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); - sndcmd = 0; + switch (eccmode) { + case NAND_ECC_NONE: { /* No ECC, Read in a page */ + static unsigned long lastwhinge = 0; + if ((lastwhinge / HZ) != (jiffies / HZ)) { + printk (KERN_WARNING "Reading data from NAND FLASH without ECC is not recommended\n"); + lastwhinge = jiffies; } + this->read_buf(mtd, data_poi, end); + break; + } - /* Now read the page into the buffer */ - ret = chip->ecc.read_page(mtd, chip, bufpoi); - if (ret < 0) - break; + case NAND_ECC_SOFT: /* Software ECC 3/256: Read in a page + oob data */ + this->read_buf(mtd, data_poi, end); + for (i = 0, datidx = 0; eccsteps; eccsteps--, i+=3, datidx += ecc) + this->calculate_ecc(mtd, &data_poi[datidx], &ecc_calc[i]); + break; - /* Transfer not aligned data */ - if (!aligned) { - chip->pagebuf = realpage; - memcpy(buf, chip->buffers.databuf + col, bytes); + default: + for (i = 0, datidx = 0; eccsteps; eccsteps--, i+=eccbytes, datidx += ecc) { + this->enable_hwecc(mtd, NAND_ECC_READ); + this->read_buf(mtd, &data_poi[datidx], ecc); + + /* HW ecc with syndrome calculation must read the + * syndrome from flash immidiately after the data */ + if (!compareecc) { + /* Some hw ecc generators need to know when the + * syndrome is read from flash */ + this->enable_hwecc(mtd, NAND_ECC_READSYN); + this->read_buf(mtd, &oob_data[i], eccbytes); + /* We calc error correction directly, it checks the hw + * generator for an error, reads back the syndrome and + * does the error correction on the fly */ + ecc_status = this->correct_data(mtd, &data_poi[datidx], &oob_data[i], &ecc_code[i]); + if ((ecc_status == -1) || (ecc_status > (flags && 0xff))) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " + "Failed ECC read, page 0x%08x on chip %d\n", page, chipnr); + ecc_failed++; + } + } else { + this->calculate_ecc(mtd, &data_poi[datidx], &ecc_calc[i]); + } } + break; + } + + /* read oobdata */ + this->read_buf(mtd, &oob_data[mtd->oobsize - oobreadlen], oobreadlen); + + /* Skip ECC check, if not requested (ECC_NONE or HW_ECC with syndromes) */ + if (!compareecc) + goto readoob; + + /* Pick the ECC bytes out of the oob data */ + for (j = 0; j < oobsel->eccbytes; j++) + ecc_code[j] = oob_data[oob_config[j]]; + + /* correct data, if neccecary */ + for (i = 0, j = 0, datidx = 0; i < this->eccsteps; i++, datidx += ecc) { + ecc_status = this->correct_data(mtd, &data_poi[datidx], &ecc_code[j], &ecc_calc[j]); - buf += bytes; + /* Get next chunk of ecc bytes */ + j += eccbytes; - if (unlikely(oob)) { - /* Raw mode does data:oob:data:oob */ - if (ops->mode != MTD_OOB_RAW) - oob = nand_transfer_oob(chip, oob, ops); - else - buf = nand_transfer_oob(chip, buf, ops); + /* Check, if we have a fs supplied oob-buffer, + * This is the legacy mode. Used by YAFFS1 + * Should go away some day + */ + if (oob_buf && oobsel->useecc == MTD_NANDECC_PLACE) { + int *p = (int *)(&oob_data[mtd->oobsize]); + p[i] = ecc_status; } - if (!(chip->options & NAND_NO_READRDY)) { - /* - * Apply delay or wait for ready/busy pin. Do - * this before the AUTOINCR check, so no - * problems arise if a chip which does auto - * increment is marked as NOAUTOINCR by the - * board driver. - */ - if (!chip->dev_ready) - udelay(chip->chip_delay); - else - nand_wait_ready(mtd); + if ((ecc_status == -1) || (ecc_status > (flags && 0xff))) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x\n", page); + ecc_failed++; } - } else { - memcpy(buf, chip->buffers.databuf + col, bytes); - buf += bytes; } - readlen -= bytes; + readoob: + /* check, if we have a fs supplied oob-buffer */ + if (oob_buf) { + /* without autoplace. Legacy mode used by YAFFS1 */ + switch(oobsel->useecc) { + case MTD_NANDECC_AUTOPLACE: + case MTD_NANDECC_AUTOPL_USR: + /* Walk through the autoplace chunks */ + for (i = 0; oobsel->oobfree[i][1]; i++) { + int from = oobsel->oobfree[i][0]; + int num = oobsel->oobfree[i][1]; + memcpy(&oob_buf[oob], &oob_data[from], num); + oob += num; + } + break; + case MTD_NANDECC_PLACE: + /* YAFFS1 legacy mode */ + oob_data += this->eccsteps * sizeof (int); + default: + oob_data += mtd->oobsize; + } + } + readdata: + /* Partial page read, transfer data into fs buffer */ + if (!aligned) { + for (j = col; j < end && read < len; j++) + buf[read++] = data_poi[j]; + this->pagebuf = realpage; + } else + read += mtd->oobblock; + + /* Apply delay or wait for ready/busy pin + * Do this before the AUTOINCR check, so no problems + * arise if a chip which does auto increment + * is marked as NOAUTOINCR by the board driver. + */ + if (!this->dev_ready) + udelay (this->chip_delay); + else + nand_wait_ready(mtd); - if (!readlen) + if (read == len) break; /* For subsequent reads align to page boundary. */ @@ -1037,777 +1345,701 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, /* Increment page address */ realpage++; - page = realpage & chip->pagemask; + page = realpage & this->pagemask; /* Check, if we cross a chip boundary */ if (!page) { chipnr++; - chip->select_chip(mtd, -1); - chip->select_chip(mtd, chipnr); + this->select_chip(mtd, -1); + this->select_chip(mtd, chipnr); } - /* Check, if the chip supports auto page increment * or if we have hit a block boundary. - */ - if (!NAND_CANAUTOINCR(chip) || !(page & blkcheck)) + */ + if (!NAND_CANAUTOINCR(this) || !(page & blockcheck)) sndcmd = 1; } - ops->retlen = ops->len - (size_t) readlen; - - if (ret) - return ret; - - if (mtd->ecc_stats.failed - stats.failed) - return -EBADMSG; + /* Deselect and wake up anyone waiting on the device */ + if (flags & NAND_GET_DEVICE) + nand_release_device(mtd); - return mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0; + /* + * Return success, if no ECC failures, else -EBADMSG + * fs driver will take care of that, because + * retlen == desired len and result == -EBADMSG + */ + *retlen = read; + return ecc_failed ? -EBADMSG : 0; } /** - * nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc + * nand_read_oob - [MTD Interface] NAND read out-of-band * @mtd: MTD device structure * @from: offset to read from * @len: number of bytes to read * @retlen: pointer to variable to store the number of read bytes * @buf: the databuffer to put data * - * Get hold of the chip and call nand_do_read + * NAND read out-of-band data from the spare area */ -static int nand_read(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, uint8_t *buf) +static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t * retlen, u_char * buf) { - struct nand_chip *chip = mtd->priv; - int ret; + int i, col, page, chipnr; + struct nand_chip *this = mtd->priv; + int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1; + + DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); + + /* Shift to get page */ + page = (int)(from >> this->page_shift); + chipnr = (int)(from >> this->chip_shift); + + /* Mask to get column */ + col = from & (mtd->oobsize - 1); + + /* Initialize return length value */ + *retlen = 0; /* Do not allow reads past end of device */ - if ((from + len) > mtd->size) + if ((from + len) > mtd->size) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_read_oob: Attempt read beyond end of device\n"); + *retlen = 0; return -EINVAL; - if (!len) - return 0; + } + + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd , FL_READING); - nand_get_device(chip, mtd, FL_READING); + /* Select the NAND device */ + this->select_chip(mtd, chipnr); - chip->ops.len = len; - chip->ops.datbuf = buf; - chip->ops.oobbuf = NULL; + /* Send the read command */ + this->cmdfunc (mtd, NAND_CMD_READOOB, col, page & this->pagemask); + /* + * Read the data, if we read more than one page + * oob data, let the device transfer the data ! + */ + i = 0; + while (i < len) { + int thislen = mtd->oobsize - col; + thislen = min_t(int, thislen, len); + this->read_buf(mtd, &buf[i], thislen); + i += thislen; + + /* Read more ? */ + if (i < len) { + page++; + col = 0; + + /* Check, if we cross a chip boundary */ + if (!(page & this->pagemask)) { + chipnr++; + this->select_chip(mtd, -1); + this->select_chip(mtd, chipnr); + } - ret = nand_do_read_ops(mtd, from, &chip->ops); + /* Apply delay or wait for ready/busy pin + * Do this before the AUTOINCR check, so no problems + * arise if a chip which does auto increment + * is marked as NOAUTOINCR by the board driver. + */ + if (!this->dev_ready) + udelay (this->chip_delay); + else + nand_wait_ready(mtd); - *retlen = chip->ops.retlen; + /* Check, if the chip supports auto page increment + * or if we have hit a block boundary. + */ + if (!NAND_CANAUTOINCR(this) || !(page & blockcheck)) { + /* For subsequent page reads set offset to 0 */ + this->cmdfunc (mtd, NAND_CMD_READOOB, 0x0, page & this->pagemask); + } + } + } + /* Deselect and wake up anyone waiting on the device */ nand_release_device(mtd); - return ret; + /* Return happy */ + *retlen = len; + return 0; } /** - * nand_read_oob_std - [REPLACABLE] the most common OOB data read function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @page: page number to read - * @sndcmd: flag whether to issue read command or not + * nand_read_raw - [GENERIC] Read raw data including oob into buffer + * @mtd: MTD device structure + * @buf: temporary buffer + * @from: offset to read from + * @len: number of bytes to read + * @ooblen: number of oob data bytes to read + * + * Read raw data including oob into buffer */ -static int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, - int page, int sndcmd) +int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len, size_t ooblen) { - if (sndcmd) { - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); - sndcmd = 0; - } - chip->read_buf(mtd, chip->oob_poi, mtd->oobsize); - return sndcmd; -} - -/** - * nand_read_oob_syndrome - [REPLACABLE] OOB data read function for HW ECC - * with syndromes - * @mtd: mtd info structure - * @chip: nand chip info structure - * @page: page number to read - * @sndcmd: flag whether to issue read command or not - */ -static int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip, - int page, int sndcmd) -{ - uint8_t *buf = chip->oob_poi; - int length = mtd->oobsize; - int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; - int eccsize = chip->ecc.size; - uint8_t *bufpoi = buf; - int i, toread, sndrnd = 0, pos; - - chip->cmdfunc(mtd, NAND_CMD_READ0, chip->ecc.size, page); - for (i = 0; i < chip->ecc.steps; i++) { - if (sndrnd) { - pos = eccsize + i * (eccsize + chunk); - if (mtd->writesize > 512) - chip->cmdfunc(mtd, NAND_CMD_RNDOUT, pos, -1); - else - chip->cmdfunc(mtd, NAND_CMD_READ0, pos, page); - } else - sndrnd = 1; - toread = min_t(int, length, chunk); - chip->read_buf(mtd, bufpoi, toread); - bufpoi += toread; - length -= toread; - } - if (length > 0) - chip->read_buf(mtd, bufpoi, length); - - return 1; -} - -/** - * nand_write_oob_std - [REPLACABLE] the most common OOB data write function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @page: page number to write - */ -static int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip, - int page) -{ - int status = 0; - const uint8_t *buf = chip->oob_poi; - int length = mtd->oobsize; - - chip->cmdfunc(mtd, NAND_CMD_SEQIN, mtd->writesize, page); - chip->write_buf(mtd, buf, length); - /* Send command to program the OOB data */ - chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); - - status = chip->waitfunc(mtd, chip); - - return status & NAND_STATUS_FAIL ? -EIO : 0; -} - -/** - * nand_write_oob_syndrome - [REPLACABLE] OOB data write function for HW ECC - * with syndrome - only for large page flash ! - * @mtd: mtd info structure - * @chip: nand chip info structure - * @page: page number to write - */ -static int nand_write_oob_syndrome(struct mtd_info *mtd, - struct nand_chip *chip, int page) -{ - int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; - int eccsize = chip->ecc.size, length = mtd->oobsize; - int i, len, pos, status = 0, sndcmd = 0, steps = chip->ecc.steps; - const uint8_t *bufpoi = chip->oob_poi; - - /* - * data-ecc-data-ecc ... ecc-oob - * or - * data-pad-ecc-pad-data-pad .... ecc-pad-oob - */ - if (!chip->ecc.prepad && !chip->ecc.postpad) { - pos = steps * (eccsize + chunk); - steps = 0; - } else - pos = eccsize; + struct nand_chip *this = mtd->priv; + int page = (int) (from >> this->page_shift); + int chip = (int) (from >> this->chip_shift); + int sndcmd = 1; + int cnt = 0; + int pagesize = mtd->oobblock + mtd->oobsize; + int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1; - chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); - for (i = 0; i < steps; i++) { - if (sndcmd) { - if (mtd->writesize <= 512) { - uint32_t fill = 0xFFFFFFFF; - - len = eccsize; - while (len > 0) { - int num = min_t(int, len, 4); - chip->write_buf(mtd, (uint8_t *)&fill, - num); - len -= num; - } - } else { - pos = eccsize + i * (eccsize + chunk); - chip->cmdfunc(mtd, NAND_CMD_RNDIN, pos, -1); - } - } else - sndcmd = 1; - len = min_t(int, length, chunk); - chip->write_buf(mtd, bufpoi, len); - bufpoi += len; - length -= len; + /* Do not allow reads past end of device */ + if ((from + len) > mtd->size) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_read_raw: Attempt read beyond end of device\n"); + return -EINVAL; } - if (length > 0) - chip->write_buf(mtd, bufpoi, length); - chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); - status = chip->waitfunc(mtd, chip); - - return status & NAND_STATUS_FAIL ? -EIO : 0; -} - -/** - * nand_do_read_oob - [Intern] NAND read out-of-band - * @mtd: MTD device structure - * @from: offset to read from - * @ops: oob operations description structure - * - * NAND read out-of-band data from the spare area - */ -static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops) -{ - int page, realpage, chipnr, sndcmd = 1; - struct nand_chip *chip = mtd->priv; - int blkcheck = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1; - int readlen = ops->len; - uint8_t *buf = ops->oobbuf; - - DEBUG(MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08Lx, len = %i\n", - (unsigned long long)from, readlen); - - chipnr = (int)(from >> chip->chip_shift); - chip->select_chip(mtd, chipnr); - - /* Shift to get page */ - realpage = (int)(from >> chip->page_shift); - page = realpage & chip->pagemask; + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd , FL_READING); - chip->oob_poi = chip->buffers.oobrbuf; + this->select_chip (mtd, chip); - while(1) { - sndcmd = chip->ecc.read_oob(mtd, chip, page, sndcmd); - buf = nand_transfer_oob(chip, buf, ops); + /* Add requested oob length */ + len += ooblen; - if (!(chip->options & NAND_NO_READRDY)) { - /* - * Apply delay or wait for ready/busy pin. Do this - * before the AUTOINCR check, so no problems arise if a - * chip which does auto increment is marked as - * NOAUTOINCR by the board driver. - */ - if (!chip->dev_ready) - udelay(chip->chip_delay); - else - nand_wait_ready(mtd); - } + while (len) { + if (sndcmd) + this->cmdfunc (mtd, NAND_CMD_READ0, 0, page & this->pagemask); + sndcmd = 0; - readlen -= ops->ooblen; - if (!readlen) - break; + this->read_buf (mtd, &buf[cnt], pagesize); - /* Increment page address */ - realpage++; + len -= pagesize; + cnt += pagesize; + page++; - page = realpage & chip->pagemask; - /* Check, if we cross a chip boundary */ - if (!page) { - chipnr++; - chip->select_chip(mtd, -1); - chip->select_chip(mtd, chipnr); - } + if (!this->dev_ready) + udelay (this->chip_delay); + else + nand_wait_ready(mtd); - /* Check, if the chip supports auto page increment - * or if we have hit a block boundary. - */ - if (!NAND_CANAUTOINCR(chip) || !(page & blkcheck)) + /* Check, if the chip supports auto page increment */ + if (!NAND_CANAUTOINCR(this) || !(page & blockcheck)) sndcmd = 1; } - ops->retlen = ops->len; + /* Deselect and wake up anyone waiting on the device */ + nand_release_device(mtd); return 0; } + /** - * nand_read_oob - [MTD Interface] NAND read data and/or out-of-band + * nand_prepare_oobbuf - [GENERIC] Prepare the out of band buffer * @mtd: MTD device structure - * @from: offset to read from - * @ops: oob operation description structure + * @fsbuf: buffer given by fs driver + * @oobsel: out of band selection structre + * @autoplace: 1 = place given buffer into the oob bytes + * @numpages: number of pages to prepare * - * NAND read data and/or out-of-band data - */ -static int nand_read_oob(struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops) + * Return: + * 1. Filesystem buffer available and autoplacement is off, + * return filesystem buffer + * 2. No filesystem buffer or autoplace is off, return internal + * buffer + * 3. Filesystem buffer is given and autoplace selected + * put data from fs buffer into internal buffer and + * retrun internal buffer + * + * Note: The internal buffer is filled with 0xff. This must + * be done only once, when no autoplacement happens + * Autoplacement sets the buffer dirty flag, which + * forces the 0xff fill before using the buffer again. + * +*/ +static u_char * nand_prepare_oobbuf (struct mtd_info *mtd, u_char *fsbuf, struct nand_oobinfo *oobsel, + int autoplace, int numpages) { - int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) = NULL; - struct nand_chip *chip = mtd->priv; - int ret = -ENOTSUPP; - - ops->retlen = 0; - - /* Do not allow reads past end of device */ - if ((from + ops->len) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " - "Attempt read beyond end of device\n"); - return -EINVAL; + struct nand_chip *this = mtd->priv; + int i, len, ofs; + + /* Zero copy fs supplied buffer */ + if (fsbuf && !autoplace) + return fsbuf; + + /* Check, if the buffer must be filled with ff again */ + if (this->oobdirty) { + memset (this->oob_buf, 0xff, + mtd->oobsize << (this->phys_erase_shift - this->page_shift)); + this->oobdirty = 0; } - nand_get_device(chip, mtd, FL_READING); - - switch(ops->mode) { - case MTD_OOB_PLACE: - case MTD_OOB_AUTO: - break; - - case MTD_OOB_RAW: - /* Replace the read_page algorithm temporary */ - read_page = chip->ecc.read_page; - chip->ecc.read_page = nand_read_page_raw; - break; - - default: - goto out; + /* If we have no autoplacement or no fs buffer use the internal one */ + if (!autoplace || !fsbuf) + return this->oob_buf; + + /* Walk through the pages and place the data */ + this->oobdirty = 1; + ofs = 0; + while (numpages--) { + for (i = 0, len = 0; len < mtd->oobavail; i++) { + int to = ofs + oobsel->oobfree[i][0]; + int num = oobsel->oobfree[i][1]; + memcpy (&this->oob_buf[to], fsbuf, num); + len += num; + fsbuf += num; + } + ofs += mtd->oobavail; } - - if (!ops->datbuf) - ret = nand_do_read_oob(mtd, from, ops); - else - ret = nand_do_read_ops(mtd, from, ops); - - if (unlikely(ops->mode == MTD_OOB_RAW)) - chip->ecc.read_page = read_page; - out: - nand_release_device(mtd); - return ret; + return this->oob_buf; } +#define NOTALIGNED(x) (x & (mtd->oobblock-1)) != 0 /** - * nand_write_page_raw - [Intern] raw page write function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: data buffer - */ -static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf) -{ - chip->write_buf(mtd, buf, mtd->writesize); - chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); -} - -/** - * nand_write_page_swecc - {REPLACABLE] software ecc based page write function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: data buffer - */ -static void nand_write_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf) -{ - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - uint8_t *ecc_calc = chip->buffers.ecccalc; - const uint8_t *p = buf; - int *eccpos = chip->ecc.layout->eccpos; - - /* Software ecc calculation */ - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) - chip->ecc.calculate(mtd, p, &ecc_calc[i]); - - for (i = 0; i < chip->ecc.total; i++) - chip->oob_poi[eccpos[i]] = ecc_calc[i]; - - nand_write_page_raw(mtd, chip, buf); -} - -/** - * nand_write_page_hwecc - {REPLACABLE] hardware ecc based page write function - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: data buffer - */ -static void nand_write_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf) + * nand_write - [MTD Interface] compability function for nand_write_ecc + * @mtd: MTD device structure + * @to: offset to write to + * @len: number of bytes to write + * @retlen: pointer to variable to store the number of written bytes + * @buf: the data to write + * + * This function simply calls nand_write_ecc with oob buffer and oobsel = NULL + * +*/ +static int nand_write (struct mtd_info *mtd, loff_t to, size_t len, size_t * retlen, const u_char * buf) { - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - uint8_t *ecc_calc = chip->buffers.ecccalc; - const uint8_t *p = buf; - int *eccpos = chip->ecc.layout->eccpos; - - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - chip->ecc.hwctl(mtd, NAND_ECC_WRITE); - chip->write_buf(mtd, p, eccsize); - chip->ecc.calculate(mtd, p, &ecc_calc[i]); - } - - for (i = 0; i < chip->ecc.total; i++) - chip->oob_poi[eccpos[i]] = ecc_calc[i]; - - chip->write_buf(mtd, chip->oob_poi, mtd->oobsize); + return (nand_write_ecc (mtd, to, len, retlen, buf, NULL, NULL)); } /** - * nand_write_page_syndrome - {REPLACABLE] hardware ecc syndrom based page write - * @mtd: mtd info structure - * @chip: nand chip info structure - * @buf: data buffer + * nand_write_ecc - [MTD Interface] NAND write with ECC + * @mtd: MTD device structure + * @to: offset to write to + * @len: number of bytes to write + * @retlen: pointer to variable to store the number of written bytes + * @buf: the data to write + * @eccbuf: filesystem supplied oob data buffer + * @oobsel: oob selection structure * - * The hw generator calculates the error syndrome automatically. Therefor - * we need a special oob layout and handling. + * NAND write with ECC */ -static void nand_write_page_syndrome(struct mtd_info *mtd, - struct nand_chip *chip, const uint8_t *buf) +static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, + size_t * retlen, const u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel) { - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps; - const uint8_t *p = buf; - uint8_t *oob = chip->oob_poi; + int startpage, page, ret = -EIO, oob = 0, written = 0, chipnr; + int autoplace = 0, numpages, totalpages; + struct nand_chip *this = mtd->priv; + u_char *oobbuf, *bufstart; + int ppblock = (1 << (this->phys_erase_shift - this->page_shift)); - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - - chip->ecc.hwctl(mtd, NAND_ECC_WRITE); - chip->write_buf(mtd, p, eccsize); - - if (chip->ecc.prepad) { - chip->write_buf(mtd, oob, chip->ecc.prepad); - oob += chip->ecc.prepad; - } + DEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); - chip->ecc.calculate(mtd, p, oob); - chip->write_buf(mtd, oob, eccbytes); - oob += eccbytes; + /* Initialize retlen, in case of early exit */ + *retlen = 0; - if (chip->ecc.postpad) { - chip->write_buf(mtd, oob, chip->ecc.postpad); - oob += chip->ecc.postpad; - } + /* Do not allow write past end of device */ + if ((to + len) > mtd->size) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: Attempt to write past end of page\n"); + return -EINVAL; } - /* Calculate remaining oob bytes */ - i = mtd->oobsize - (oob - chip->oob_poi); - if (i) - chip->write_buf(mtd, oob, i); -} - -/** - * nand_write_page - [INTERNAL] write one page - * @mtd: MTD device structure - * @chip: NAND chip descriptor - * @buf: the data to write - * @page: page number to write - * @cached: cached programming - */ -static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf, int page, int cached) -{ - int status; - - chip->cmdfunc(mtd, NAND_CMD_SEQIN, 0x00, page); + /* reject writes, which are not page aligned */ + if (NOTALIGNED (to) || NOTALIGNED(len)) { + printk (KERN_NOTICE "nand_write_ecc: Attempt to write not page aligned data\n"); + return -EINVAL; + } - chip->ecc.write_page(mtd, chip, buf); + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd, FL_WRITING); - /* - * Cached progamming disabled for now, Not sure if its worth the - * trouble. The speed gain is not very impressive. (2.3->2.6Mib/s) - */ - cached = 0; + /* Calculate chipnr */ + chipnr = (int)(to >> this->chip_shift); + /* Select the NAND device */ + this->select_chip(mtd, chipnr); - if (!cached || !(chip->options & NAND_CACHEPRG)) { + /* Check, if it is write protected */ + if (nand_check_wp(mtd)) + goto out; - chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); - status = chip->waitfunc(mtd, chip); - /* - * See if operation failed and additional status checks are - * available - */ - if ((status & NAND_STATUS_FAIL) && (chip->errstat)) - status = chip->errstat(mtd, chip, FL_WRITING, status, - page); + /* if oobsel is NULL, use chip defaults */ + if (oobsel == NULL) + oobsel = &mtd->oobinfo; - if (status & NAND_STATUS_FAIL) - return -EIO; - } else { - chip->cmdfunc(mtd, NAND_CMD_CACHEDPROG, -1, -1); - status = chip->waitfunc(mtd, chip); + /* Autoplace of oob data ? Use the default placement scheme */ + if (oobsel->useecc == MTD_NANDECC_AUTOPLACE) { + oobsel = this->autooob; + autoplace = 1; } + if (oobsel->useecc == MTD_NANDECC_AUTOPL_USR) + autoplace = 1; -#ifdef CONFIG_MTD_NAND_VERIFY_WRITE - /* Send command to read back the data */ - chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); - - if (chip->verify_buf(mtd, buf, mtd->writesize)) - return -EIO; -#endif - return 0; -} + /* Setup variables and oob buffer */ + totalpages = len >> this->page_shift; + page = (int) (to >> this->page_shift); + /* Invalidate the page cache, if we write to the cached page */ + if (page <= this->pagebuf && this->pagebuf < (page + totalpages)) + this->pagebuf = -1; + + /* Set it relative to chip */ + page &= this->pagemask; + startpage = page; + /* Calc number of pages we can write in one go */ + numpages = min (ppblock - (startpage & (ppblock - 1)), totalpages); + oobbuf = nand_prepare_oobbuf (mtd, eccbuf, oobsel, autoplace, numpages); + bufstart = (u_char *)buf; + + /* Loop until all data is written */ + while (written < len) { + + this->data_poi = (u_char*) &buf[written]; + /* Write one page. If this is the last page to write + * or the last page in this block, then use the + * real pageprogram command, else select cached programming + * if supported by the chip. + */ + ret = nand_write_page (mtd, this, page, &oobbuf[oob], oobsel, (--numpages > 0)); + if (ret) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: write_page failed %d\n", ret); + goto out; + } + /* Next oob page */ + oob += mtd->oobsize; + /* Update written bytes count */ + written += mtd->oobblock; + if (written == len) + goto cmp; -/** - * nand_fill_oob - [Internal] Transfer client buffer to oob - * @chip: nand chip structure - * @oob: oob data buffer - * @ops: oob ops structure - */ -static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, - struct mtd_oob_ops *ops) -{ - size_t len = ops->ooblen; - - switch(ops->mode) { - - case MTD_OOB_PLACE: - case MTD_OOB_RAW: - memcpy(chip->oob_poi + ops->ooboffs, oob, len); - return oob + len; - - case MTD_OOB_AUTO: { - struct nand_oobfree *free = chip->ecc.layout->oobfree; - uint32_t boffs = 0, woffs = ops->ooboffs; - size_t bytes = 0; - - for(; free->length && len; free++, len -= bytes) { - /* Write request not from offset 0 ? */ - if (unlikely(woffs)) { - if (woffs >= free->length) { - woffs -= free->length; - continue; - } - boffs = free->offset + woffs; - bytes = min_t(size_t, len, - (free->length - woffs)); - woffs = 0; - } else { - bytes = min_t(size_t, len, free->length); - boffs = free->offset; + /* Increment page address */ + page++; + + /* Have we hit a block boundary ? Then we have to verify and + * if verify is ok, we have to setup the oob buffer for + * the next pages. + */ + if (!(page & (ppblock - 1))){ + int ofs; + this->data_poi = bufstart; + ret = nand_verify_pages (mtd, this, startpage, + page - startpage, + oobbuf, oobsel, chipnr, (eccbuf != NULL)); + if (ret) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret); + goto out; + } + *retlen = written; + + ofs = autoplace ? mtd->oobavail : mtd->oobsize; + if (eccbuf) + eccbuf += (page - startpage) * ofs; + totalpages -= page - startpage; + numpages = min (totalpages, ppblock); + page &= this->pagemask; + startpage = page; + oobbuf = nand_prepare_oobbuf (mtd, eccbuf, oobsel, + autoplace, numpages); + oob = 0; + /* Check, if we cross a chip boundary */ + if (!page) { + chipnr++; + this->select_chip(mtd, -1); + this->select_chip(mtd, chipnr); } - memcpy(chip->oob_poi + boffs, oob, bytes); - oob += bytes; } - return oob; } - default: - BUG(); - } - return NULL; + /* Verify the remaining pages */ +cmp: + this->data_poi = bufstart; + ret = nand_verify_pages (mtd, this, startpage, totalpages, + oobbuf, oobsel, chipnr, (eccbuf != NULL)); + if (!ret) + *retlen = written; + else + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret); + +out: + /* Deselect and wake up anyone waiting on the device */ + nand_release_device(mtd); + + return ret; } -#define NOTALIGNED(x) (x & (mtd->writesize-1)) != 0 /** - * nand_do_write_ops - [Internal] NAND write with ECC + * nand_write_oob - [MTD Interface] NAND write out-of-band * @mtd: MTD device structure * @to: offset to write to - * @ops: oob operations description structure + * @len: number of bytes to write + * @retlen: pointer to variable to store the number of written bytes + * @buf: the data to write * - * NAND write with ECC + * NAND write out-of-band */ -static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops) +static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * retlen, const u_char * buf) { - int chipnr, realpage, page, blockmask; - struct nand_chip *chip = mtd->priv; - uint32_t writelen = ops->len; - uint8_t *oob = ops->oobbuf; - uint8_t *buf = ops->datbuf; - int bytes = mtd->writesize; - int ret; + int column, page, status, ret = -EIO, chipnr; + struct nand_chip *this = mtd->priv; - ops->retlen = 0; + DEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); - /* reject writes, which are not page aligned */ - if (NOTALIGNED(to) || NOTALIGNED(ops->len)) { - printk(KERN_NOTICE "nand_write: " - "Attempt to write not page aligned data\n"); - return -EINVAL; - } + /* Shift to get page */ + page = (int) (to >> this->page_shift); + chipnr = (int) (to >> this->chip_shift); - if (!writelen) - return 0; + /* Mask to get column */ + column = to & (mtd->oobsize - 1); - chipnr = (int)(to >> chip->chip_shift); - chip->select_chip(mtd, chipnr); + /* Initialize return length value */ + *retlen = 0; - /* Check, if it is write protected */ - if (nand_check_wp(mtd)) - return -EIO; + /* Do not allow write past end of page */ + if ((column + len) > mtd->oobsize) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: Attempt to write past end of page\n"); + return -EINVAL; + } - realpage = (int)(to >> chip->page_shift); - page = realpage & chip->pagemask; - blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1; + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd, FL_WRITING); - /* Invalidate the page cache, when we write to the cached page */ - if (to <= (chip->pagebuf << chip->page_shift) && - (chip->pagebuf << chip->page_shift) < (to + ops->len)) - chip->pagebuf = -1; + /* Select the NAND device */ + this->select_chip(mtd, chipnr); - chip->oob_poi = chip->buffers.oobwbuf; + /* Reset the chip. Some chips (like the Toshiba TC5832DC found + in one of my DiskOnChip 2000 test units) will clear the whole + data page too if we don't do this. I have no clue why, but + I seem to have 'fixed' it in the doc2000 driver in + August 1999. dwmw2. */ + this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); - while(1) { - int cached = writelen > bytes && page != blockmask; + /* Check, if it is write protected */ + if (nand_check_wp(mtd)) + goto out; - if (unlikely(oob)) - oob = nand_fill_oob(chip, oob, ops); + /* Invalidate the page cache, if we write to the cached page */ + if (page == this->pagebuf) + this->pagebuf = -1; + + if (NAND_MUST_PAD(this)) { + /* Write out desired data */ + this->cmdfunc (mtd, NAND_CMD_SEQIN, mtd->oobblock, page & this->pagemask); + /* prepad 0xff for partial programming */ + this->write_buf(mtd, ffchars, column); + /* write data */ + this->write_buf(mtd, buf, len); + /* postpad 0xff for partial programming */ + this->write_buf(mtd, ffchars, mtd->oobsize - (len+column)); + } else { + /* Write out desired data */ + this->cmdfunc (mtd, NAND_CMD_SEQIN, mtd->oobblock + column, page & this->pagemask); + /* write data */ + this->write_buf(mtd, buf, len); + } + /* Send command to program the OOB data */ + this->cmdfunc (mtd, NAND_CMD_PAGEPROG, -1, -1); - ret = nand_write_page(mtd, chip, buf, page, cached); - if (ret) - break; + status = this->waitfunc (mtd, this, FL_WRITING); - writelen -= bytes; - if (!writelen) - break; + /* See if device thinks it succeeded */ + if (status & NAND_STATUS_FAIL) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write, page 0x%08x\n", page); + ret = -EIO; + goto out; + } + /* Return happy */ + *retlen = len; - buf += bytes; - realpage++; +#ifdef CONFIG_MTD_NAND_VERIFY_WRITE + /* Send command to read back the data */ + this->cmdfunc (mtd, NAND_CMD_READOOB, column, page & this->pagemask); - page = realpage & chip->pagemask; - /* Check, if we cross a chip boundary */ - if (!page) { - chipnr++; - chip->select_chip(mtd, -1); - chip->select_chip(mtd, chipnr); - } + if (this->verify_buf(mtd, buf, len)) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page); + ret = -EIO; + goto out; } +#endif + ret = 0; +out: + /* Deselect and wake up anyone waiting on the device */ + nand_release_device(mtd); - if (unlikely(oob)) - memset(chip->oob_poi, 0xff, mtd->oobsize); - - ops->retlen = ops->len - writelen; return ret; } + /** - * nand_write - [MTD Interface] NAND write with ECC + * nand_writev - [MTD Interface] compabilty function for nand_writev_ecc * @mtd: MTD device structure + * @vecs: the iovectors to write + * @count: number of vectors * @to: offset to write to - * @len: number of bytes to write * @retlen: pointer to variable to store the number of written bytes - * @buf: the data to write * - * NAND write with ECC + * NAND write with kvec. This just calls the ecc function */ -static int nand_write(struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const uint8_t *buf) +static int nand_writev (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, + loff_t to, size_t * retlen) { - struct nand_chip *chip = mtd->priv; - int ret; - - /* Do not allow reads past end of device */ - if ((to + len) > mtd->size) - return -EINVAL; - if (!len) - return 0; - - nand_get_device(chip, mtd, FL_WRITING); - - chip->ops.len = len; - chip->ops.datbuf = (uint8_t *)buf; - chip->ops.oobbuf = NULL; - - ret = nand_do_write_ops(mtd, to, &chip->ops); - - *retlen = chip->ops.retlen; - - nand_release_device(mtd); - - return ret; + return (nand_writev_ecc (mtd, vecs, count, to, retlen, NULL, NULL)); } /** - * nand_do_write_oob - [MTD Interface] NAND write out-of-band + * nand_writev_ecc - [MTD Interface] write with iovec with ecc * @mtd: MTD device structure + * @vecs: the iovectors to write + * @count: number of vectors * @to: offset to write to - * @ops: oob operation description structure + * @retlen: pointer to variable to store the number of written bytes + * @eccbuf: filesystem supplied oob data buffer + * @oobsel: oob selection structure * - * NAND write out-of-band + * NAND write with iovec with ecc */ -static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops) +static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, + loff_t to, size_t * retlen, u_char *eccbuf, struct nand_oobinfo *oobsel) { - int chipnr, page, status; - struct nand_chip *chip = mtd->priv; + int i, page, len, total_len, ret = -EIO, written = 0, chipnr; + int oob, numpages, autoplace = 0, startpage; + struct nand_chip *this = mtd->priv; + int ppblock = (1 << (this->phys_erase_shift - this->page_shift)); + u_char *oobbuf, *bufstart; + + /* Preset written len for early exit */ + *retlen = 0; - DEBUG(MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", - (unsigned int)to, (int)ops->len); + /* Calculate total length of data */ + total_len = 0; + for (i = 0; i < count; i++) + total_len += (int) vecs[i].iov_len; + + DEBUG (MTD_DEBUG_LEVEL3, + "nand_writev: to = 0x%08x, len = %i, count = %ld\n", (unsigned int) to, (unsigned int) total_len, count); /* Do not allow write past end of page */ - if ((ops->ooboffs + ops->len) > mtd->oobsize) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: " - "Attempt to write past end of page\n"); + if ((to + total_len) > mtd->size) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_writev: Attempted write past end of device\n"); return -EINVAL; } - chipnr = (int)(to >> chip->chip_shift); - chip->select_chip(mtd, chipnr); + /* reject writes, which are not page aligned */ + if (NOTALIGNED (to) || NOTALIGNED(total_len)) { + printk (KERN_NOTICE "nand_write_ecc: Attempt to write not page aligned data\n"); + return -EINVAL; + } - /* Shift to get page */ - page = (int)(to >> chip->page_shift); + /* Grab the lock and see if the device is available */ + nand_get_device (this, mtd, FL_WRITING); - /* - * Reset the chip. Some chips (like the Toshiba TC5832DC found in one - * of my DiskOnChip 2000 test units) will clear the whole data page too - * if we don't do this. I have no clue why, but I seem to have 'fixed' - * it in the doc2000 driver in August 1999. dwmw2. - */ - chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); + /* Get the current chip-nr */ + chipnr = (int) (to >> this->chip_shift); + /* Select the NAND device */ + this->select_chip(mtd, chipnr); /* Check, if it is write protected */ if (nand_check_wp(mtd)) - return -EROFS; - - /* Invalidate the page cache, if we write to the cached page */ - if (page == chip->pagebuf) - chip->pagebuf = -1; - - chip->oob_poi = chip->buffers.oobwbuf; - memset(chip->oob_poi, 0xff, mtd->oobsize); - nand_fill_oob(chip, ops->oobbuf, ops); - status = chip->ecc.write_oob(mtd, chip, page & chip->pagemask); - memset(chip->oob_poi, 0xff, mtd->oobsize); - - if (status) - return status; - - ops->retlen = ops->len; - - return 0; -} - -/** - * nand_write_oob - [MTD Interface] NAND write data and/or out-of-band - * @mtd: MTD device structure - * @to: offset to write to - * @ops: oob operation description structure - */ -static int nand_write_oob(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops) -{ - void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf) = NULL; - struct nand_chip *chip = mtd->priv; - int ret = -ENOTSUPP; + goto out; - ops->retlen = 0; + /* if oobsel is NULL, use chip defaults */ + if (oobsel == NULL) + oobsel = &mtd->oobinfo; - /* Do not allow writes past end of device */ - if ((to + ops->len) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " - "Attempt read beyond end of device\n"); - return -EINVAL; + /* Autoplace of oob data ? Use the default placement scheme */ + if (oobsel->useecc == MTD_NANDECC_AUTOPLACE) { + oobsel = this->autooob; + autoplace = 1; } + if (oobsel->useecc == MTD_NANDECC_AUTOPL_USR) + autoplace = 1; - nand_get_device(chip, mtd, FL_WRITING); + /* Setup start page */ + page = (int) (to >> this->page_shift); + /* Invalidate the page cache, if we write to the cached page */ + if (page <= this->pagebuf && this->pagebuf < ((to + total_len) >> this->page_shift)) + this->pagebuf = -1; - switch(ops->mode) { - case MTD_OOB_PLACE: - case MTD_OOB_AUTO: - break; + startpage = page & this->pagemask; - case MTD_OOB_RAW: - /* Replace the write_page algorithm temporary */ - write_page = chip->ecc.write_page; - chip->ecc.write_page = nand_write_page_raw; - break; + /* Loop until all kvec' data has been written */ + len = 0; + while (count) { + /* If the given tuple is >= pagesize then + * write it out from the iov + */ + if ((vecs->iov_len - len) >= mtd->oobblock) { + /* Calc number of pages we can write + * out of this iov in one go */ + numpages = (vecs->iov_len - len) >> this->page_shift; + /* Do not cross block boundaries */ + numpages = min (ppblock - (startpage & (ppblock - 1)), numpages); + oobbuf = nand_prepare_oobbuf (mtd, NULL, oobsel, autoplace, numpages); + bufstart = (u_char *)vecs->iov_base; + bufstart += len; + this->data_poi = bufstart; + oob = 0; + for (i = 1; i <= numpages; i++) { + /* Write one page. If this is the last page to write + * then use the real pageprogram command, else select + * cached programming if supported by the chip. + */ + ret = nand_write_page (mtd, this, page & this->pagemask, + &oobbuf[oob], oobsel, i != numpages); + if (ret) + goto out; + this->data_poi += mtd->oobblock; + len += mtd->oobblock; + oob += mtd->oobsize; + page++; + } + /* Check, if we have to switch to the next tuple */ + if (len >= (int) vecs->iov_len) { + vecs++; + len = 0; + count--; + } + } else { + /* We must use the internal buffer, read data out of each + * tuple until we have a full page to write + */ + int cnt = 0; + while (cnt < mtd->oobblock) { + if (vecs->iov_base != NULL && vecs->iov_len) + this->data_buf[cnt++] = ((u_char *) vecs->iov_base)[len++]; + /* Check, if we have to switch to the next tuple */ + if (len >= (int) vecs->iov_len) { + vecs++; + len = 0; + count--; + } + } + this->pagebuf = page; + this->data_poi = this->data_buf; + bufstart = this->data_poi; + numpages = 1; + oobbuf = nand_prepare_oobbuf (mtd, NULL, oobsel, autoplace, numpages); + ret = nand_write_page (mtd, this, page & this->pagemask, + oobbuf, oobsel, 0); + if (ret) + goto out; + page++; + } - default: - goto out; - } + this->data_poi = bufstart; + ret = nand_verify_pages (mtd, this, startpage, numpages, oobbuf, oobsel, chipnr, 0); + if (ret) + goto out; - if (!ops->datbuf) - ret = nand_do_write_oob(mtd, to, ops); - else - ret = nand_do_write_ops(mtd, to, ops); + written += mtd->oobblock * numpages; + /* All done ? */ + if (!count) + break; - if (unlikely(ops->mode == MTD_OOB_RAW)) - chip->ecc.write_page = write_page; - out: + startpage = page & this->pagemask; + /* Check, if we cross a chip boundary */ + if (!startpage) { + chipnr++; + this->select_chip(mtd, -1); + this->select_chip(mtd, chipnr); + } + } + ret = 0; +out: + /* Deselect and wake up anyone waiting on the device */ nand_release_device(mtd); + + *retlen = written; return ret; } @@ -1818,12 +2050,12 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to, * * Standard erase command for NAND chips */ -static void single_erase_cmd(struct mtd_info *mtd, int page) +static void single_erase_cmd (struct mtd_info *mtd, int page) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; /* Send commands to erase a block */ - chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page); - chip->cmdfunc(mtd, NAND_CMD_ERASE2, -1, -1); + this->cmdfunc (mtd, NAND_CMD_ERASE1, -1, page); + this->cmdfunc (mtd, NAND_CMD_ERASE2, -1, -1); } /** @@ -1834,15 +2066,15 @@ static void single_erase_cmd(struct mtd_info *mtd, int page) * AND multi block erase command function * Erase 4 consecutive blocks */ -static void multi_erase_cmd(struct mtd_info *mtd, int page) +static void multi_erase_cmd (struct mtd_info *mtd, int page) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; /* Send commands to erase a block */ - chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page++); - chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page++); - chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page++); - chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page); - chip->cmdfunc(mtd, NAND_CMD_ERASE2, -1, -1); + this->cmdfunc (mtd, NAND_CMD_ERASE1, -1, page++); + this->cmdfunc (mtd, NAND_CMD_ERASE1, -1, page++); + this->cmdfunc (mtd, NAND_CMD_ERASE1, -1, page++); + this->cmdfunc (mtd, NAND_CMD_ERASE1, -1, page); + this->cmdfunc (mtd, NAND_CMD_ERASE2, -1, -1); } /** @@ -1852,82 +2084,79 @@ static void multi_erase_cmd(struct mtd_info *mtd, int page) * * Erase one ore more blocks */ -static int nand_erase(struct mtd_info *mtd, struct erase_info *instr) +static int nand_erase (struct mtd_info *mtd, struct erase_info *instr) { - return nand_erase_nand(mtd, instr, 0); + return nand_erase_nand (mtd, instr, 0); } #define BBT_PAGE_MASK 0xffffff3f /** - * nand_erase_nand - [Internal] erase block(s) + * nand_erase_intern - [NAND Interface] erase block(s) * @mtd: MTD device structure * @instr: erase instruction * @allowbbt: allow erasing the bbt area * * Erase one ore more blocks */ -int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, - int allowbbt) +int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbbt) { int page, len, status, pages_per_block, ret, chipnr; - struct nand_chip *chip = mtd->priv; - int rewrite_bbt[NAND_MAX_CHIPS]={0}; - unsigned int bbt_masked_page = 0xffffffff; + struct nand_chip *this = mtd->priv; + int rewrite_bbt[NAND_MAX_CHIPS]={0}; /* flags to indicate the page, if bbt needs to be rewritten. */ + unsigned int bbt_masked_page; /* bbt mask to compare to page being erased. */ + /* It is used to see if the current page is in the same */ + /* 256 block group and the same bank as the bbt. */ - DEBUG(MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n", - (unsigned int)instr->addr, (unsigned int)instr->len); + DEBUG (MTD_DEBUG_LEVEL3, + "nand_erase: start = 0x%08x, len = %i\n", (unsigned int) instr->addr, (unsigned int) instr->len); /* Start address must align on block boundary */ - if (instr->addr & ((1 << chip->phys_erase_shift) - 1)) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n"); + if (instr->addr & ((1 << this->phys_erase_shift) - 1)) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n"); return -EINVAL; } /* Length must align on block boundary */ - if (instr->len & ((1 << chip->phys_erase_shift) - 1)) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: " - "Length not block aligned\n"); + if (instr->len & ((1 << this->phys_erase_shift) - 1)) { + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n"); return -EINVAL; } /* Do not allow erase past end of device */ if ((instr->len + instr->addr) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: " - "Erase past end of device\n"); + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n"); return -EINVAL; } instr->fail_addr = 0xffffffff; /* Grab the lock and see if the device is available */ - nand_get_device(chip, mtd, FL_ERASING); + nand_get_device (this, mtd, FL_ERASING); /* Shift to get first page */ - page = (int)(instr->addr >> chip->page_shift); - chipnr = (int)(instr->addr >> chip->chip_shift); + page = (int) (instr->addr >> this->page_shift); + chipnr = (int) (instr->addr >> this->chip_shift); /* Calculate pages in each block */ - pages_per_block = 1 << (chip->phys_erase_shift - chip->page_shift); + pages_per_block = 1 << (this->phys_erase_shift - this->page_shift); /* Select the NAND device */ - chip->select_chip(mtd, chipnr); + this->select_chip(mtd, chipnr); + /* Check the WP bit */ /* Check, if it is write protected */ if (nand_check_wp(mtd)) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: " - "Device is write protected!!!\n"); + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n"); instr->state = MTD_ERASE_FAILED; goto erase_exit; } - /* - * If BBT requires refresh, set the BBT page mask to see if the BBT - * should be rewritten. Otherwise the mask is set to 0xffffffff which - * can not be matched. This is also done when the bbt is actually - * erased to avoid recusrsive updates - */ - if (chip->options & BBT_AUTO_REFRESH && !allowbbt) - bbt_masked_page = chip->bbt_td->pages[chipnr] & BBT_PAGE_MASK; + /* if BBT requires refresh, set the BBT page mask to see if the BBT should be rewritten */ + if (this->options & BBT_AUTO_REFRESH) { + bbt_masked_page = this->bbt_td->pages[chipnr] & BBT_PAGE_MASK; + } else { + bbt_masked_page = 0xffffffff; /* should not match anything */ + } /* Loop through the pages */ len = instr->len; @@ -1935,77 +2164,64 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, instr->state = MTD_ERASING; while (len) { - /* - * heck if we have a bad block, we do not erase bad blocks ! - */ - if (nand_block_checkbad(mtd, ((loff_t) page) << - chip->page_shift, 0, allowbbt)) { - printk(KERN_WARNING "nand_erase: attempt to erase a " - "bad block at page 0x%08x\n", page); + /* Check if we have a bad block, we do not erase bad blocks ! */ + if (nand_block_checkbad(mtd, ((loff_t) page) << this->page_shift, 0, allowbbt)) { + printk (KERN_WARNING "nand_erase: attempt to erase a bad block at page 0x%08x\n", page); instr->state = MTD_ERASE_FAILED; goto erase_exit; } - /* - * Invalidate the page cache, if we erase the block which - * contains the current cached page - */ - if (page <= chip->pagebuf && chip->pagebuf < - (page + pages_per_block)) - chip->pagebuf = -1; + /* Invalidate the page cache, if we erase the block which contains + the current cached page */ + if (page <= this->pagebuf && this->pagebuf < (page + pages_per_block)) + this->pagebuf = -1; - chip->erase_cmd(mtd, page & chip->pagemask); + this->erase_cmd (mtd, page & this->pagemask); - status = chip->waitfunc(mtd, chip); + status = this->waitfunc (mtd, this, FL_ERASING); - /* - * See if operation failed and additional status checks are - * available - */ - if ((status & NAND_STATUS_FAIL) && (chip->errstat)) - status = chip->errstat(mtd, chip, FL_ERASING, - status, page); + /* See if operation failed and additional status checks are available */ + if ((status & NAND_STATUS_FAIL) && (this->errstat)) { + status = this->errstat(mtd, this, FL_ERASING, status, page); + } /* See if block erase succeeded */ if (status & NAND_STATUS_FAIL) { - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase: " - "Failed erase, page 0x%08x\n", page); + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " "Failed erase, page 0x%08x\n", page); instr->state = MTD_ERASE_FAILED; - instr->fail_addr = (page << chip->page_shift); + instr->fail_addr = (page << this->page_shift); goto erase_exit; } - /* - * If BBT requires refresh, set the BBT rewrite flag to the - * page being erased - */ - if (bbt_masked_page != 0xffffffff && - (page & BBT_PAGE_MASK) == bbt_masked_page) - rewrite_bbt[chipnr] = (page << chip->page_shift); + /* if BBT requires refresh, set the BBT rewrite flag to the page being erased */ + if (this->options & BBT_AUTO_REFRESH) { + if (((page & BBT_PAGE_MASK) == bbt_masked_page) && + (page != this->bbt_td->pages[chipnr])) { + rewrite_bbt[chipnr] = (page << this->page_shift); + } + } /* Increment page address and decrement length */ - len -= (1 << chip->phys_erase_shift); + len -= (1 << this->phys_erase_shift); page += pages_per_block; /* Check, if we cross a chip boundary */ - if (len && !(page & chip->pagemask)) { + if (len && !(page & this->pagemask)) { chipnr++; - chip->select_chip(mtd, -1); - chip->select_chip(mtd, chipnr); + this->select_chip(mtd, -1); + this->select_chip(mtd, chipnr); + + /* if BBT requires refresh and BBT-PERCHIP, + * set the BBT page mask to see if this BBT should be rewritten */ + if ((this->options & BBT_AUTO_REFRESH) && (this->bbt_td->options & NAND_BBT_PERCHIP)) { + bbt_masked_page = this->bbt_td->pages[chipnr] & BBT_PAGE_MASK; + } - /* - * If BBT requires refresh and BBT-PERCHIP, set the BBT - * page mask to see if this BBT should be rewritten - */ - if (bbt_masked_page != 0xffffffff && - (chip->bbt_td->options & NAND_BBT_PERCHIP)) - bbt_masked_page = chip->bbt_td->pages[chipnr] & - BBT_PAGE_MASK; } } instr->state = MTD_ERASE_DONE; - erase_exit: +erase_exit: ret = instr->state == MTD_ERASE_DONE ? 0 : -EIO; /* Do call back function */ @@ -2015,21 +2231,16 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, /* Deselect and wake up anyone waiting on the device */ nand_release_device(mtd); - /* - * If BBT requires refresh and erase was successful, rewrite any - * selected bad block tables - */ - if (bbt_masked_page == 0xffffffff || ret) - return ret; - - for (chipnr = 0; chipnr < chip->numchips; chipnr++) { - if (!rewrite_bbt[chipnr]) - continue; - /* update the BBT for chip */ - DEBUG(MTD_DEBUG_LEVEL0, "nand_erase_nand: nand_update_bbt " - "(%d:0x%0x 0x%0x)\n", chipnr, rewrite_bbt[chipnr], - chip->bbt_td->pages[chipnr]); - nand_update_bbt(mtd, rewrite_bbt[chipnr]); + /* if BBT requires refresh and erase was successful, rewrite any selected bad block tables */ + if ((this->options & BBT_AUTO_REFRESH) && (!ret)) { + for (chipnr = 0; chipnr < this->numchips; chipnr++) { + if (rewrite_bbt[chipnr]) { + /* update the BBT for chip */ + DEBUG (MTD_DEBUG_LEVEL0, "nand_erase_nand: nand_update_bbt (%d:0x%0x 0x%0x)\n", + chipnr, rewrite_bbt[chipnr], this->bbt_td->pages[chipnr]); + nand_update_bbt (mtd, rewrite_bbt[chipnr]); + } + } } /* Return more or less happy */ @@ -2042,50 +2253,51 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, * * Sync is actually a wait for chip ready function */ -static void nand_sync(struct mtd_info *mtd) +static void nand_sync (struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - DEBUG(MTD_DEBUG_LEVEL3, "nand_sync: called\n"); + DEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n"); /* Grab the lock and see if the device is available */ - nand_get_device(chip, mtd, FL_SYNCING); + nand_get_device (this, mtd, FL_SYNCING); /* Release it and go back */ - nand_release_device(mtd); + nand_release_device (mtd); } + /** - * nand_block_isbad - [MTD Interface] Check if block at offset is bad + * nand_block_isbad - [MTD Interface] Check whether the block at the given offset is bad * @mtd: MTD device structure - * @offs: offset relative to mtd start + * @ofs: offset relative to mtd start */ -static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) +static int nand_block_isbad (struct mtd_info *mtd, loff_t ofs) { /* Check for invalid offset */ - if (offs > mtd->size) + if (ofs > mtd->size) return -EINVAL; - return nand_block_checkbad(mtd, offs, 1, 0); + return nand_block_checkbad (mtd, ofs, 1, 0); } /** - * nand_block_markbad - [MTD Interface] Mark block at the given offset as bad + * nand_block_markbad - [MTD Interface] Mark the block at the given offset as bad * @mtd: MTD device structure * @ofs: offset relative to mtd start */ -static int nand_block_markbad(struct mtd_info *mtd, loff_t ofs) +static int nand_block_markbad (struct mtd_info *mtd, loff_t ofs) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; int ret; - if ((ret = nand_block_isbad(mtd, ofs))) { - /* If it was bad already, return success and do nothing. */ + if ((ret = nand_block_isbad(mtd, ofs))) { + /* If it was bad already, return success and do nothing. */ if (ret > 0) return 0; - return ret; - } + return ret; + } - return chip->block_markbad(mtd, ofs); + return this->block_markbad(mtd, ofs); } /** @@ -2094,9 +2306,9 @@ static int nand_block_markbad(struct mtd_info *mtd, loff_t ofs) */ static int nand_suspend(struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - return nand_get_device(chip, mtd, FL_PM_SUSPENDED); + return nand_get_device (this, mtd, FL_PM_SUSPENDED); } /** @@ -2105,385 +2317,373 @@ static int nand_suspend(struct mtd_info *mtd) */ static void nand_resume(struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; - if (chip->state == FL_PM_SUSPENDED) + if (this->state == FL_PM_SUSPENDED) nand_release_device(mtd); else - printk(KERN_ERR "nand_resume() called for a chip which is not " - "in suspended state\n"); + printk(KERN_ERR "resume() called for the chip which is not " + "in suspended state\n"); + } -/* - * Set default functions + +/** + * nand_scan - [NAND Interface] Scan for the NAND device + * @mtd: MTD device structure + * @maxchips: Number of chips to scan for + * + * This fills out all the not initialized function pointers + * with the defaults. + * The flash ID is read and the mtd/chip structures are + * filled with the appropriate values. Buffers are allocated if + * they are not provided by the board driver + * */ -static void nand_set_defaults(struct nand_chip *chip, int busw) +int nand_scan (struct mtd_info *mtd, int maxchips) { + int i, nand_maf_id, nand_dev_id, busw, maf_id; + struct nand_chip *this = mtd->priv; + + /* Get buswidth to select the correct functions*/ + busw = this->options & NAND_BUSWIDTH_16; + /* check for proper chip_delay setup, set 20us if not */ - if (!chip->chip_delay) - chip->chip_delay = 20; + if (!this->chip_delay) + this->chip_delay = 20; /* check, if a user supplied command function given */ - if (chip->cmdfunc == NULL) - chip->cmdfunc = nand_command; + if (this->cmdfunc == NULL) + this->cmdfunc = nand_command; /* check, if a user supplied wait function given */ - if (chip->waitfunc == NULL) - chip->waitfunc = nand_wait; - - if (!chip->select_chip) - chip->select_chip = nand_select_chip; - if (!chip->read_byte) - chip->read_byte = busw ? nand_read_byte16 : nand_read_byte; - if (!chip->read_word) - chip->read_word = nand_read_word; - if (!chip->block_bad) - chip->block_bad = nand_block_bad; - if (!chip->block_markbad) - chip->block_markbad = nand_default_block_markbad; - if (!chip->write_buf) - chip->write_buf = busw ? nand_write_buf16 : nand_write_buf; - if (!chip->read_buf) - chip->read_buf = busw ? nand_read_buf16 : nand_read_buf; - if (!chip->verify_buf) - chip->verify_buf = busw ? nand_verify_buf16 : nand_verify_buf; - if (!chip->scan_bbt) - chip->scan_bbt = nand_default_bbt; - - if (!chip->controller) { - chip->controller = &chip->hwcontrol; - spin_lock_init(&chip->controller->lock); - init_waitqueue_head(&chip->controller->wq); - } - -} - -/* - * Get the flash and manufacturer id and lookup if the type is supported - */ -static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, - struct nand_chip *chip, - int busw, int *maf_id) -{ - struct nand_flash_dev *type = NULL; - int i, dev_id, maf_idx; + if (this->waitfunc == NULL) + this->waitfunc = nand_wait; + + if (!this->select_chip) + this->select_chip = nand_select_chip; + if (!this->write_byte) + this->write_byte = busw ? nand_write_byte16 : nand_write_byte; + if (!this->read_byte) + this->read_byte = busw ? nand_read_byte16 : nand_read_byte; + if (!this->write_word) + this->write_word = nand_write_word; + if (!this->read_word) + this->read_word = nand_read_word; + if (!this->block_bad) + this->block_bad = nand_block_bad; + if (!this->block_markbad) + this->block_markbad = nand_default_block_markbad; + if (!this->write_buf) + this->write_buf = busw ? nand_write_buf16 : nand_write_buf; + if (!this->read_buf) + this->read_buf = busw ? nand_read_buf16 : nand_read_buf; + if (!this->verify_buf) + this->verify_buf = busw ? nand_verify_buf16 : nand_verify_buf; + if (!this->scan_bbt) + this->scan_bbt = nand_default_bbt; /* Select the device */ - chip->select_chip(mtd, 0); + this->select_chip(mtd, 0); /* Send the command for reading device ID */ - chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); + this->cmdfunc (mtd, NAND_CMD_READID, 0x00, -1); /* Read manufacturer and device IDs */ - *maf_id = chip->read_byte(mtd); - dev_id = chip->read_byte(mtd); + nand_maf_id = this->read_byte(mtd); + nand_dev_id = this->read_byte(mtd); - /* Lookup the flash id */ + /* Print and store flash device information */ for (i = 0; nand_flash_ids[i].name != NULL; i++) { - if (dev_id == nand_flash_ids[i].id) { - type = &nand_flash_ids[i]; - break; - } - } - - if (!type) - return ERR_PTR(-ENODEV); - - if (!mtd->name) - mtd->name = type->name; - - chip->chipsize = type->chipsize << 20; - - /* Newer devices have all the information in additional id bytes */ - if (!type->pagesize) { - int extid; - /* The 3rd id byte contains non relevant data ATM */ - extid = chip->read_byte(mtd); - /* The 4th id byte is the important one */ - extid = chip->read_byte(mtd); - /* Calc pagesize */ - mtd->writesize = 1024 << (extid & 0x3); - extid >>= 2; - /* Calc oobsize */ - mtd->oobsize = (8 << (extid & 0x01)) * (mtd->writesize >> 9); - extid >>= 2; - /* Calc blocksize. Blocksize is multiples of 64KiB */ - mtd->erasesize = (64 * 1024) << (extid & 0x03); - extid >>= 2; - /* Get buswidth information */ - busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0; - - } else { - /* - * Old devices have chip data hardcoded in the device id table - */ - mtd->erasesize = type->erasesize; - mtd->writesize = type->pagesize; - mtd->oobsize = mtd->writesize / 32; - busw = type->options & NAND_BUSWIDTH_16; - } - - /* Try to identify manufacturer */ - for (maf_idx = 0; nand_manuf_ids[maf_idx].id != 0x0; maf_idx++) { - if (nand_manuf_ids[maf_idx].id == *maf_id) - break; - } - - /* - * Check, if buswidth is correct. Hardware drivers should set - * chip correct ! - */ - if (busw != (chip->options & NAND_BUSWIDTH_16)) { - printk(KERN_INFO "NAND device: Manufacturer ID:" - " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, - dev_id, nand_manuf_ids[maf_idx].name, mtd->name); - printk(KERN_WARNING "NAND bus width %d instead %d bit\n", - (chip->options & NAND_BUSWIDTH_16) ? 16 : 8, - busw ? 16 : 8); - return ERR_PTR(-EINVAL); - } - - /* Calculate the address shift from the page size */ - chip->page_shift = ffs(mtd->writesize) - 1; - /* Convert chipsize to number of pages per chip -1. */ - chip->pagemask = (chip->chipsize >> chip->page_shift) - 1; - - chip->bbt_erase_shift = chip->phys_erase_shift = - ffs(mtd->erasesize) - 1; - chip->chip_shift = ffs(chip->chipsize) - 1; - - /* Set the bad block position */ - chip->badblockpos = mtd->writesize > 512 ? - NAND_LARGE_BADBLOCK_POS : NAND_SMALL_BADBLOCK_POS; - /* Get chip options, preserve non chip based options */ - chip->options &= ~NAND_CHIPOPTIONS_MSK; - chip->options |= type->options & NAND_CHIPOPTIONS_MSK; + if (nand_dev_id != nand_flash_ids[i].id) + continue; - /* - * Set chip as a default. Board drivers can override it, if necessary - */ - chip->options |= NAND_NO_AUTOINCR; + if (!mtd->name) mtd->name = nand_flash_ids[i].name; + this->chipsize = nand_flash_ids[i].chipsize << 20; + + /* New devices have all the information in additional id bytes */ + if (!nand_flash_ids[i].pagesize) { + int extid; + /* The 3rd id byte contains non relevant data ATM */ + extid = this->read_byte(mtd); + /* The 4th id byte is the important one */ + extid = this->read_byte(mtd); + /* Calc pagesize */ + mtd->oobblock = 1024 << (extid & 0x3); + extid >>= 2; + /* Calc oobsize */ + mtd->oobsize = (8 << (extid & 0x01)) * (mtd->oobblock >> 9); + extid >>= 2; + /* Calc blocksize. Blocksize is multiples of 64KiB */ + mtd->erasesize = (64 * 1024) << (extid & 0x03); + extid >>= 2; + /* Get buswidth information */ + busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0; - /* Check if chip is a not a samsung device. Do not clear the - * options for chips which are not having an extended id. - */ - if (*maf_id != NAND_MFR_SAMSUNG && !type->pagesize) - chip->options &= ~NAND_SAMSUNG_LP_OPTIONS; - - /* Check for AND chips with 4 page planes */ - if (chip->options & NAND_4PAGE_ARRAY) - chip->erase_cmd = multi_erase_cmd; - else - chip->erase_cmd = single_erase_cmd; + } else { + /* Old devices have this data hardcoded in the + * device id table */ + mtd->erasesize = nand_flash_ids[i].erasesize; + mtd->oobblock = nand_flash_ids[i].pagesize; + mtd->oobsize = mtd->oobblock / 32; + busw = nand_flash_ids[i].options & NAND_BUSWIDTH_16; + } - /* Do not replace user supplied command function ! */ - if (mtd->writesize > 512 && chip->cmdfunc == nand_command) - chip->cmdfunc = nand_command_lp; + /* Try to identify manufacturer */ + for (maf_id = 0; nand_manuf_ids[maf_id].id != 0x0; maf_id++) { + if (nand_manuf_ids[maf_id].id == nand_maf_id) + break; + } - printk(KERN_INFO "NAND device: Manufacturer ID:" - " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, dev_id, - nand_manuf_ids[maf_idx].name, type->name); + /* Check, if buswidth is correct. Hardware drivers should set + * this correct ! */ + if (busw != (this->options & NAND_BUSWIDTH_16)) { + printk (KERN_INFO "NAND device: Manufacturer ID:" + " 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id, + nand_manuf_ids[maf_id].name , mtd->name); + printk (KERN_WARNING + "NAND bus width %d instead %d bit\n", + (this->options & NAND_BUSWIDTH_16) ? 16 : 8, + busw ? 16 : 8); + this->select_chip(mtd, -1); + return 1; + } - return type; -} + /* Calculate the address shift from the page size */ + this->page_shift = ffs(mtd->oobblock) - 1; + this->bbt_erase_shift = this->phys_erase_shift = ffs(mtd->erasesize) - 1; + this->chip_shift = ffs(this->chipsize) - 1; + + /* Set the bad block position */ + this->badblockpos = mtd->oobblock > 512 ? + NAND_LARGE_BADBLOCK_POS : NAND_SMALL_BADBLOCK_POS; + + /* Get chip options, preserve non chip based options */ + this->options &= ~NAND_CHIPOPTIONS_MSK; + this->options |= nand_flash_ids[i].options & NAND_CHIPOPTIONS_MSK; + /* Set this as a default. Board drivers can override it, if neccecary */ + this->options |= NAND_NO_AUTOINCR; + /* Check if this is a not a samsung device. Do not clear the options + * for chips which are not having an extended id. + */ + if (nand_maf_id != NAND_MFR_SAMSUNG && !nand_flash_ids[i].pagesize) + this->options &= ~NAND_SAMSUNG_LP_OPTIONS; -/* module_text_address() isn't exported, and it's mostly a pointless - test if this is a module _anyway_ -- they'd have to try _really_ hard - to call us from in-kernel code if the core NAND support is modular. */ -#ifdef MODULE -#define caller_is_module() (1) -#else -#define caller_is_module() \ - module_text_address((unsigned long)__builtin_return_address(0)) -#endif + /* Check for AND chips with 4 page planes */ + if (this->options & NAND_4PAGE_ARRAY) + this->erase_cmd = multi_erase_cmd; + else + this->erase_cmd = single_erase_cmd; -/** - * nand_scan - [NAND Interface] Scan for the NAND device - * @mtd: MTD device structure - * @maxchips: Number of chips to scan for - * - * This fills out all the uninitialized function pointers - * with the defaults. - * The flash ID is read and the mtd/chip structures are - * filled with the appropriate values. - * The mtd->owner field must be set to the module of the caller - * - */ -int nand_scan(struct mtd_info *mtd, int maxchips) -{ - int i, busw, nand_maf_id; - struct nand_chip *chip = mtd->priv; - struct nand_flash_dev *type; + /* Do not replace user supplied command function ! */ + if (mtd->oobblock > 512 && this->cmdfunc == nand_command) + this->cmdfunc = nand_command_lp; - /* Many callers got this wrong, so check for it for a while... */ - if (!mtd->owner && caller_is_module()) { - printk(KERN_CRIT "nand_scan() called with NULL mtd->owner!\n"); - BUG(); + printk (KERN_INFO "NAND device: Manufacturer ID:" + " 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id, + nand_manuf_ids[maf_id].name , nand_flash_ids[i].name); + break; } - /* Get buswidth to select the correct functions */ - busw = chip->options & NAND_BUSWIDTH_16; - /* Set the default functions */ - nand_set_defaults(chip, busw); - - /* Read the flash type */ - type = nand_get_flash_type(mtd, chip, busw, &nand_maf_id); - - if (IS_ERR(type)) { - printk(KERN_WARNING "No NAND device found!!!\n"); - chip->select_chip(mtd, -1); - return PTR_ERR(type); + if (!nand_flash_ids[i].name) { + printk (KERN_WARNING "No NAND device found!!!\n"); + this->select_chip(mtd, -1); + return 1; } - /* Check for a chip array */ - for (i = 1; i < maxchips; i++) { - chip->select_chip(mtd, i); + for (i=1; i < maxchips; i++) { + this->select_chip(mtd, i); + /* Send the command for reading device ID */ - chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1); + this->cmdfunc (mtd, NAND_CMD_READID, 0x00, -1); + /* Read manufacturer and device IDs */ - if (nand_maf_id != chip->read_byte(mtd) || - type->id != chip->read_byte(mtd)) + if (nand_maf_id != this->read_byte(mtd) || + nand_dev_id != this->read_byte(mtd)) break; } if (i > 1) printk(KERN_INFO "%d NAND chips detected\n", i); - /* Store the number of chips and calc total size for mtd */ - chip->numchips = i; - mtd->size = i * chip->chipsize; + /* Allocate buffers, if neccecary */ + if (!this->oob_buf) { + size_t len; + len = mtd->oobsize << (this->phys_erase_shift - this->page_shift); + this->oob_buf = kmalloc (len, GFP_KERNEL); + if (!this->oob_buf) { + printk (KERN_ERR "nand_scan(): Cannot allocate oob_buf\n"); + return -ENOMEM; + } + this->options |= NAND_OOBBUF_ALLOC; + } - /* Preset the internal oob write buffer */ - memset(chip->buffers.oobwbuf, 0xff, mtd->oobsize); + if (!this->data_buf) { + size_t len; + len = mtd->oobblock + mtd->oobsize; + this->data_buf = kmalloc (len, GFP_KERNEL); + if (!this->data_buf) { + if (this->options & NAND_OOBBUF_ALLOC) + kfree (this->oob_buf); + printk (KERN_ERR "nand_scan(): Cannot allocate data_buf\n"); + return -ENOMEM; + } + this->options |= NAND_DATABUF_ALLOC; + } - /* - * If no default placement scheme is given, select an appropriate one - */ - if (!chip->ecc.layout) { + /* Store the number of chips and calc total size for mtd */ + this->numchips = i; + mtd->size = i * this->chipsize; + /* Convert chipsize to number of pages per chip -1. */ + this->pagemask = (this->chipsize >> this->page_shift) - 1; + /* Preset the internal oob buffer */ + memset(this->oob_buf, 0xff, mtd->oobsize << (this->phys_erase_shift - this->page_shift)); + + /* If no default placement scheme is given, select an + * appropriate one */ + if (!this->autooob) { + /* Select the appropriate default oob placement scheme for + * placement agnostic filesystems */ switch (mtd->oobsize) { case 8: - chip->ecc.layout = &nand_oob_8; + this->autooob = &nand_oob_8; break; case 16: - chip->ecc.layout = &nand_oob_16; + this->autooob = &nand_oob_16; break; case 64: - chip->ecc.layout = &nand_oob_64; + this->autooob = &nand_oob_64; break; default: - printk(KERN_WARNING "No oob scheme defined for " - "oobsize %d\n", mtd->oobsize); + printk (KERN_WARNING "No oob scheme defined for oobsize %d\n", + mtd->oobsize); BUG(); } } + /* The number of bytes available for the filesystem to place fs dependend + * oob data */ + mtd->oobavail = 0; + for (i = 0; this->autooob->oobfree[i][1]; i++) + mtd->oobavail += this->autooob->oobfree[i][1]; + /* - * check ECC mode, default to software if 3byte/512byte hardware ECC is - * selected and we have 256 byte pagesize fallback to software ECC - */ - switch (chip->ecc.mode) { - case NAND_ECC_HW: - /* Use standard hwecc read page function ? */ - if (!chip->ecc.read_page) - chip->ecc.read_page = nand_read_page_hwecc; - if (!chip->ecc.write_page) - chip->ecc.write_page = nand_write_page_hwecc; - if (!chip->ecc.read_oob) - chip->ecc.read_oob = nand_read_oob_std; - if (!chip->ecc.write_oob) - chip->ecc.write_oob = nand_write_oob_std; - - case NAND_ECC_HW_SYNDROME: - if (!chip->ecc.calculate || !chip->ecc.correct || - !chip->ecc.hwctl) { - printk(KERN_WARNING "No ECC functions supplied, " - "Hardware ECC not possible\n"); - BUG(); - } - /* Use standard syndrome read/write page function ? */ - if (!chip->ecc.read_page) - chip->ecc.read_page = nand_read_page_syndrome; - if (!chip->ecc.write_page) - chip->ecc.write_page = nand_write_page_syndrome; - if (!chip->ecc.read_oob) - chip->ecc.read_oob = nand_read_oob_syndrome; - if (!chip->ecc.write_oob) - chip->ecc.write_oob = nand_write_oob_syndrome; - - if (mtd->writesize >= chip->ecc.size) - break; - printk(KERN_WARNING "%d byte HW ECC not possible on " - "%d byte page size, fallback to SW ECC\n", - chip->ecc.size, mtd->writesize); - chip->ecc.mode = NAND_ECC_SOFT; + * check ECC mode, default to software + * if 3byte/512byte hardware ECC is selected and we have 256 byte pagesize + * fallback to software ECC + */ + this->eccsize = 256; /* set default eccsize */ + this->eccbytes = 3; + + switch (this->eccmode) { + case NAND_ECC_HW12_2048: + if (mtd->oobblock < 2048) { + printk(KERN_WARNING "2048 byte HW ECC not possible on %d byte page size, fallback to SW ECC\n", + mtd->oobblock); + this->eccmode = NAND_ECC_SOFT; + this->calculate_ecc = nand_calculate_ecc; + this->correct_data = nand_correct_data; + } else + this->eccsize = 2048; + break; - case NAND_ECC_SOFT: - chip->ecc.calculate = nand_calculate_ecc; - chip->ecc.correct = nand_correct_data; - chip->ecc.read_page = nand_read_page_swecc; - chip->ecc.write_page = nand_write_page_swecc; - chip->ecc.read_oob = nand_read_oob_std; - chip->ecc.write_oob = nand_write_oob_std; - chip->ecc.size = 256; - chip->ecc.bytes = 3; + case NAND_ECC_HW3_512: + case NAND_ECC_HW6_512: + case NAND_ECC_HW8_512: + if (mtd->oobblock == 256) { + printk (KERN_WARNING "512 byte HW ECC not possible on 256 Byte pagesize, fallback to SW ECC \n"); + this->eccmode = NAND_ECC_SOFT; + this->calculate_ecc = nand_calculate_ecc; + this->correct_data = nand_correct_data; + } else + this->eccsize = 512; /* set eccsize to 512 */ + break; + + case NAND_ECC_HW3_256: break; case NAND_ECC_NONE: - printk(KERN_WARNING "NAND_ECC_NONE selected by board driver. " - "This is not recommended !!\n"); - chip->ecc.read_page = nand_read_page_raw; - chip->ecc.write_page = nand_write_page_raw; - chip->ecc.read_oob = nand_read_oob_std; - chip->ecc.write_oob = nand_write_oob_std; - chip->ecc.size = mtd->writesize; - chip->ecc.bytes = 0; + printk (KERN_WARNING "NAND_ECC_NONE selected by board driver. This is not recommended !!\n"); + this->eccmode = NAND_ECC_NONE; + break; + + case NAND_ECC_SOFT: + this->calculate_ecc = nand_calculate_ecc; + this->correct_data = nand_correct_data; break; + default: - printk(KERN_WARNING "Invalid NAND_ECC_MODE %d\n", - chip->ecc.mode); + printk (KERN_WARNING "Invalid NAND_ECC_MODE %d\n", this->eccmode); BUG(); } - /* - * The number of bytes available for a client to place data into - * the out of band area - */ - chip->ecc.layout->oobavail = 0; - for (i = 0; chip->ecc.layout->oobfree[i].length; i++) - chip->ecc.layout->oobavail += - chip->ecc.layout->oobfree[i].length; - - /* - * Set the number of read / write steps for one page depending on ECC - * mode - */ - chip->ecc.steps = mtd->writesize / chip->ecc.size; - if(chip->ecc.steps * chip->ecc.size != mtd->writesize) { - printk(KERN_WARNING "Invalid ecc parameters\n"); + /* Check hardware ecc function availability and adjust number of ecc bytes per + * calculation step + */ + switch (this->eccmode) { + case NAND_ECC_HW12_2048: + this->eccbytes += 4; + case NAND_ECC_HW8_512: + this->eccbytes += 2; + case NAND_ECC_HW6_512: + this->eccbytes += 3; + case NAND_ECC_HW3_512: + case NAND_ECC_HW3_256: + if (this->calculate_ecc && this->correct_data && this->enable_hwecc) + break; + printk (KERN_WARNING "No ECC functions supplied, Hardware ECC not possible\n"); BUG(); } - chip->ecc.total = chip->ecc.steps * chip->ecc.bytes; - /* Initialize state */ - chip->state = FL_READY; + mtd->eccsize = this->eccsize; + + /* Set the number of read / write steps for one page to ensure ECC generation */ + switch (this->eccmode) { + case NAND_ECC_HW12_2048: + this->eccsteps = mtd->oobblock / 2048; + break; + case NAND_ECC_HW3_512: + case NAND_ECC_HW6_512: + case NAND_ECC_HW8_512: + this->eccsteps = mtd->oobblock / 512; + break; + case NAND_ECC_HW3_256: + case NAND_ECC_SOFT: + this->eccsteps = mtd->oobblock / 256; + break; + + case NAND_ECC_NONE: + this->eccsteps = 1; + break; + } + + /* Initialize state, waitqueue and spinlock */ + this->state = FL_READY; + init_waitqueue_head (&this->wq); + spin_lock_init (&this->chip_lock); /* De-select the device */ - chip->select_chip(mtd, -1); + this->select_chip(mtd, -1); /* Invalidate the pagebuffer reference */ - chip->pagebuf = -1; + this->pagebuf = -1; /* Fill in remaining MTD driver data */ mtd->type = MTD_NANDFLASH; - mtd->flags = MTD_CAP_NANDFLASH; + mtd->flags = MTD_CAP_NANDFLASH | MTD_ECC; mtd->ecctype = MTD_ECC_SW; mtd->erase = nand_erase; mtd->point = NULL; mtd->unpoint = NULL; mtd->read = nand_read; mtd->write = nand_write; + mtd->read_ecc = nand_read_ecc; + mtd->write_ecc = nand_write_ecc; mtd->read_oob = nand_read_oob; mtd->write_oob = nand_write_oob; + mtd->readv = NULL; + mtd->writev = nand_writev; + mtd->writev_ecc = nand_writev_ecc; mtd->sync = nand_sync; mtd->lock = NULL; mtd->unlock = NULL; @@ -2492,38 +2692,47 @@ int nand_scan(struct mtd_info *mtd, int maxchips) mtd->block_isbad = nand_block_isbad; mtd->block_markbad = nand_block_markbad; - /* propagate ecc.layout to mtd_info */ - mtd->ecclayout = chip->ecc.layout; + /* and make the autooob the default one */ + memcpy(&mtd->oobinfo, this->autooob, sizeof(mtd->oobinfo)); + + mtd->owner = THIS_MODULE; /* Check, if we should skip the bad block table scan */ - if (chip->options & NAND_SKIP_BBTSCAN) + if (this->options & NAND_SKIP_BBTSCAN) return 0; /* Build bad block table */ - return chip->scan_bbt(mtd); + return this->scan_bbt (mtd); } /** * nand_release - [NAND Interface] Free resources held by the NAND device * @mtd: MTD device structure */ -void nand_release(struct mtd_info *mtd) +void nand_release (struct mtd_info *mtd) { - struct nand_chip *chip = mtd->priv; + struct nand_chip *this = mtd->priv; #ifdef CONFIG_MTD_PARTITIONS /* Deregister partitions */ - del_mtd_partitions(mtd); + del_mtd_partitions (mtd); #endif /* Deregister the device */ - del_mtd_device(mtd); + del_mtd_device (mtd); /* Free bad block table memory */ - kfree(chip->bbt); + kfree (this->bbt); + /* Buffer allocated by nand_scan ? */ + if (this->options & NAND_OOBBUF_ALLOC) + kfree (this->oob_buf); + /* Buffer allocated by nand_scan ? */ + if (this->options & NAND_DATABUF_ALLOC) + kfree (this->data_buf); } -EXPORT_SYMBOL_GPL(nand_scan); -EXPORT_SYMBOL_GPL(nand_release); +EXPORT_SYMBOL_GPL (nand_scan); +EXPORT_SYMBOL_GPL (nand_release); + static int __init nand_base_init(void) { @@ -2539,6 +2748,6 @@ static void __exit nand_base_exit(void) module_init(nand_base_init); module_exit(nand_base_exit); -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Steven J. Hill , Thomas Gleixner "); -MODULE_DESCRIPTION("Generic NAND flash driver code"); +MODULE_LICENSE ("GPL"); +MODULE_AUTHOR ("Steven J. Hill , Thomas Gleixner "); +MODULE_DESCRIPTION ("Generic NAND flash driver code"); diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index a612c4ea8..ca286999f 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -48,7 +48,7 @@ * * Following assumptions are made: * - bbts start at a page boundary, if autolocated on a block boundary - * - the space necessary for a bbt in FLASH does not exceed a block boundary + * - the space neccecary for a bbt in FLASH does not exceed a block boundary * */ @@ -60,7 +60,7 @@ #include #include #include -#include + /** * check_pattern - [GENERIC] check if a pattern is in the buffer @@ -75,7 +75,7 @@ * pattern area contain 0xff * */ -static int check_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td) +static int check_pattern (uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td) { int i, end = 0; uint8_t *p = buf; @@ -116,7 +116,7 @@ static int check_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_desc * no optional empty check * */ -static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td) +static int check_short_pattern (uint8_t *buf, struct nand_bbt_descr *td) { int i; uint8_t *p = buf; @@ -142,8 +142,8 @@ static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td) * Read the bad block table starting from page. * */ -static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, - int bits, int offs, int reserved_block_code) +static int read_bbt (struct mtd_info *mtd, uint8_t *buf, int page, int num, + int bits, int offs, int reserved_block_code) { int res, i, j, act = 0; struct nand_chip *this = mtd->priv; @@ -152,17 +152,17 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, uint8_t msk = (uint8_t) ((1 << bits) - 1); totlen = (num * bits) >> 3; - from = ((loff_t) page) << this->page_shift; + from = ((loff_t)page) << this->page_shift; while (totlen) { - len = min(totlen, (size_t) (1 << this->bbt_erase_shift)); - res = mtd->read(mtd, from, len, &retlen, buf); + len = min (totlen, (size_t) (1 << this->bbt_erase_shift)); + res = mtd->read_ecc (mtd, from, len, &retlen, buf, NULL, this->autooob); if (res < 0) { if (retlen != len) { - printk(KERN_INFO "nand_bbt: Error reading bad block table\n"); + printk (KERN_INFO "nand_bbt: Error reading bad block table\n"); return res; } - printk(KERN_WARNING "nand_bbt: ECC error while reading bad block table\n"); + printk (KERN_WARNING "nand_bbt: ECC error while reading bad block table\n"); } /* Analyse data */ @@ -172,23 +172,22 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, uint8_t tmp = (dat >> j) & msk; if (tmp == msk) continue; - if (reserved_block_code && (tmp == reserved_block_code)) { - printk(KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n", - ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); + if (reserved_block_code && + (tmp == reserved_block_code)) { + printk (KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n", + ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06); - mtd->ecc_stats.bbtblocks++; continue; } /* Leave it for now, if its matured we can move this * message to MTD_DEBUG_LEVEL0 */ - printk(KERN_DEBUG "nand_read_bbt: Bad block at 0x%08x\n", - ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); + printk (KERN_DEBUG "nand_read_bbt: Bad block at 0x%08x\n", + ((offs << 2) + (act >> 1)) << this->bbt_erase_shift); /* Factory marked bad or worn out ? */ if (tmp == 0) this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06); else this->bbt[offs + (act >> 3)] |= 0x1 << (act & 0x06); - mtd->ecc_stats.badblocks++; } } totlen -= len; @@ -208,7 +207,7 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, * Read the bad block table for all chips starting at a given page * We assume that the bbt bits are in consecutive order. */ -static int read_abs_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, int chip) +static int read_abs_bbt (struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, int chip) { struct nand_chip *this = mtd->priv; int res = 0, i; @@ -232,42 +231,6 @@ static int read_abs_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc return 0; } -/* - * Scan read raw data from flash - */ -static int scan_read_raw(struct mtd_info *mtd, uint8_t *buf, loff_t offs, - size_t len) -{ - struct mtd_oob_ops ops; - - ops.mode = MTD_OOB_RAW; - ops.ooboffs = 0; - ops.ooblen = mtd->oobsize; - ops.oobbuf = buf; - ops.datbuf = buf; - ops.len = len; - - return mtd->read_oob(mtd, offs, &ops); -} - -/* - * Scan write data with oob to flash - */ -static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, - uint8_t *buf, uint8_t *oob) -{ - struct mtd_oob_ops ops; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = 0; - ops.ooblen = mtd->oobsize; - ops.datbuf = buf; - ops.oobbuf = oob; - ops.len = len; - - return mtd->write_oob(mtd, offs, &ops); -} - /** * read_abs_bbts - [GENERIC] Read the bad block table(s) for all chips starting at a given page * @mtd: MTD device structure @@ -279,83 +242,26 @@ static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, * We assume that the bbt bits are in consecutive order. * */ -static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, - struct nand_bbt_descr *td, struct nand_bbt_descr *md) +static int read_abs_bbts (struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, + struct nand_bbt_descr *md) { struct nand_chip *this = mtd->priv; /* Read the primary version, if available */ if (td->options & NAND_BBT_VERSION) { - scan_read_raw(mtd, buf, td->pages[0] << this->page_shift, - mtd->writesize); - td->version[0] = buf[mtd->writesize + td->veroffs]; - printk(KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", - td->pages[0], td->version[0]); + nand_read_raw (mtd, buf, td->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); + td->version[0] = buf[mtd->oobblock + td->veroffs]; + printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", td->pages[0], td->version[0]); } /* Read the mirror version, if available */ if (md && (md->options & NAND_BBT_VERSION)) { - scan_read_raw(mtd, buf, md->pages[0] << this->page_shift, - mtd->writesize); - md->version[0] = buf[mtd->writesize + md->veroffs]; - printk(KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", - md->pages[0], md->version[0]); - } - return 1; -} - -/* - * Scan a given block full - */ -static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd, - loff_t offs, uint8_t *buf, size_t readlen, - int scanlen, int len) -{ - int ret, j; - - ret = scan_read_raw(mtd, buf, offs, readlen); - if (ret) - return ret; - - for (j = 0; j < len; j++, buf += scanlen) { - if (check_pattern(buf, scanlen, mtd->writesize, bd)) - return 1; + nand_read_raw (mtd, buf, md->pages[0] << this->page_shift, mtd->oobblock, mtd->oobsize); + md->version[0] = buf[mtd->oobblock + md->veroffs]; + printk (KERN_DEBUG "Bad block table at page %d, version 0x%02X\n", md->pages[0], md->version[0]); } - return 0; -} - -/* - * Scan a given block partially - */ -static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd, - loff_t offs, uint8_t *buf, int len) -{ - struct mtd_oob_ops ops; - int j, ret; - - ops.len = mtd->oobsize; - ops.ooblen = mtd->oobsize; - ops.oobbuf = buf; - ops.ooboffs = 0; - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - for (j = 0; j < len; j++) { - /* - * Read the full oob until read_oob is fixed to - * handle single byte reads for 16 bit - * buswidth - */ - ret = mtd->read_oob(mtd, offs, &ops); - if (ret) - return ret; - - if (check_short_pattern(buf, bd)) - return 1; - offs += mtd->writesize; - } - return 0; + return 1; } /** @@ -369,16 +275,15 @@ static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd, * Create a bad block table by scanning the device * for the given good/bad block identify pattern */ -static int create_bbt(struct mtd_info *mtd, uint8_t *buf, - struct nand_bbt_descr *bd, int chip) +static int create_bbt (struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *bd, int chip) { struct nand_chip *this = mtd->priv; - int i, numblocks, len, scanlen; + int i, j, numblocks, len, scanlen; int startblock; loff_t from; - size_t readlen; + size_t readlen, ooblen; - printk(KERN_INFO "Scanning device for bad blocks\n"); + printk (KERN_INFO "Scanning device for bad blocks\n"); if (bd->options & NAND_BBT_SCANALLPAGES) len = 1 << (this->bbt_erase_shift - this->page_shift); @@ -391,24 +296,25 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, if (!(bd->options & NAND_BBT_SCANEMPTY)) { /* We need only read few bytes from the OOB area */ - scanlen = 0; + scanlen = ooblen = 0; readlen = bd->len; } else { /* Full page content should be read */ - scanlen = mtd->writesize + mtd->oobsize; - readlen = len * mtd->writesize; + scanlen = mtd->oobblock + mtd->oobsize; + readlen = len * mtd->oobblock; + ooblen = len * mtd->oobsize; } if (chip == -1) { - /* Note that numblocks is 2 * (real numblocks) here, see i+=2 - * below as it makes shifting and masking less painful */ + /* Note that numblocks is 2 * (real numblocks) here, see i+=2 below as it + * makes shifting and masking less painful */ numblocks = mtd->size >> (this->bbt_erase_shift - 1); startblock = 0; from = 0; } else { if (chip >= this->numchips) { - printk(KERN_WARNING "create_bbt(): chipnr (%d) > available chips (%d)\n", - chip + 1, this->numchips); + printk (KERN_WARNING "create_bbt(): chipnr (%d) > available chips (%d)\n", + chip + 1, this->numchips); return -EINVAL; } numblocks = this->chipsize >> (this->bbt_erase_shift - 1); @@ -420,22 +326,36 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, for (i = startblock; i < numblocks;) { int ret; - if (bd->options & NAND_BBT_SCANALLPAGES) - ret = scan_block_full(mtd, bd, from, buf, readlen, - scanlen, len); - else - ret = scan_block_fast(mtd, bd, from, buf, len); - - if (ret < 0) - return ret; - - if (ret) { - this->bbt[i >> 3] |= 0x03 << (i & 0x6); - printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", - i >> 1, (unsigned int)from); - mtd->ecc_stats.badblocks++; + if (bd->options & NAND_BBT_SCANEMPTY) + if ((ret = nand_read_raw (mtd, buf, from, readlen, ooblen))) + return ret; + + for (j = 0; j < len; j++) { + if (!(bd->options & NAND_BBT_SCANEMPTY)) { + size_t retlen; + + /* Read the full oob until read_oob is fixed to + * handle single byte reads for 16 bit buswidth */ + ret = mtd->read_oob(mtd, from + j * mtd->oobblock, + mtd->oobsize, &retlen, buf); + if (ret) + return ret; + + if (check_short_pattern (buf, bd)) { + this->bbt[i >> 3] |= 0x03 << (i & 0x6); + printk (KERN_WARNING "Bad eraseblock %d at 0x%08x\n", + i >> 1, (unsigned int) from); + break; + } + } else { + if (check_pattern (&buf[j * scanlen], scanlen, mtd->oobblock, bd)) { + this->bbt[i >> 3] |= 0x03 << (i & 0x6); + printk (KERN_WARNING "Bad eraseblock %d at 0x%08x\n", + i >> 1, (unsigned int) from); + break; + } + } } - i += 2; from += (1 << this->bbt_erase_shift); } @@ -454,23 +374,22 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, * block. * If the option NAND_BBT_PERCHIP is given, each chip is searched * for a bbt, which contains the bad block information of this chip. - * This is necessary to provide support for certain DOC devices. + * This is neccecary to provide support for certain DOC devices. * * The bbt ident pattern resides in the oob area of the first page * in a block. */ -static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td) +static int search_bbt (struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td) { struct nand_chip *this = mtd->priv; int i, chips; int bits, startblock, block, dir; - int scanlen = mtd->writesize + mtd->oobsize; + int scanlen = mtd->oobblock + mtd->oobsize; int bbtblocks; - int blocktopage = this->bbt_erase_shift - this->page_shift; /* Search direction top -> down ? */ if (td->options & NAND_BBT_LASTBLOCK) { - startblock = (mtd->size >> this->bbt_erase_shift) - 1; + startblock = (mtd->size >> this->bbt_erase_shift) -1; dir = -1; } else { startblock = 0; @@ -496,16 +415,13 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr td->pages[i] = -1; /* Scan the maximum number of blocks */ for (block = 0; block < td->maxblocks; block++) { - int actblock = startblock + dir * block; - loff_t offs = actblock << this->bbt_erase_shift; - /* Read first page */ - scan_read_raw(mtd, buf, offs, mtd->writesize); - if (!check_pattern(buf, scanlen, mtd->writesize, td)) { - td->pages[i] = actblock << blocktopage; + nand_read_raw (mtd, buf, actblock << this->bbt_erase_shift, mtd->oobblock, mtd->oobsize); + if (!check_pattern(buf, scanlen, mtd->oobblock, td)) { + td->pages[i] = actblock << (this->bbt_erase_shift - this->page_shift); if (td->options & NAND_BBT_VERSION) { - td->version[i] = buf[mtd->writesize + td->veroffs]; + td->version[i] = buf[mtd->oobblock + td->veroffs]; } break; } @@ -515,10 +431,9 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr /* Check, if we found a bbt for each requested chip */ for (i = 0; i < chips; i++) { if (td->pages[i] == -1) - printk(KERN_WARNING "Bad block table not found for chip %d\n", i); + printk (KERN_WARNING "Bad block table not found for chip %d\n", i); else - printk(KERN_DEBUG "Bad block table found at page %d, version 0x%02X\n", td->pages[i], - td->version[i]); + printk (KERN_DEBUG "Bad block table found at page %d, version 0x%02X\n", td->pages[i], td->version[i]); } return 0; } @@ -532,19 +447,21 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr * * Search and read the bad block table(s) */ -static int search_read_bbts(struct mtd_info *mtd, uint8_t * buf, struct nand_bbt_descr *td, struct nand_bbt_descr *md) +static int search_read_bbts (struct mtd_info *mtd, uint8_t *buf, + struct nand_bbt_descr *td, struct nand_bbt_descr *md) { /* Search the primary table */ - search_bbt(mtd, buf, td); + search_bbt (mtd, buf, td); /* Search the mirror table */ if (md) - search_bbt(mtd, buf, md); + search_bbt (mtd, buf, md); /* Force result check */ return 1; } + /** * write_bbt - [GENERIC] (Re)write the bad block table * @@ -557,31 +474,25 @@ static int search_read_bbts(struct mtd_info *mtd, uint8_t * buf, struct nand_bbt * (Re)write the bad block table * */ -static int write_bbt(struct mtd_info *mtd, uint8_t *buf, - struct nand_bbt_descr *td, struct nand_bbt_descr *md, - int chipsel) +static int write_bbt (struct mtd_info *mtd, uint8_t *buf, + struct nand_bbt_descr *td, struct nand_bbt_descr *md, int chipsel) { struct nand_chip *this = mtd->priv; + struct nand_oobinfo oobinfo; struct erase_info einfo; int i, j, res, chip = 0; int bits, startblock, dir, page, offs, numblocks, sft, sftmsk; - int nrchips, bbtoffs, pageoffs, ooboffs; + int nrchips, bbtoffs, pageoffs; uint8_t msk[4]; uint8_t rcode = td->reserved_block_code; size_t retlen, len = 0; loff_t to; - struct mtd_oob_ops ops; - - ops.ooblen = mtd->oobsize; - ops.ooboffs = 0; - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; if (!rcode) rcode = 0xff; /* Write bad block table per chip rather than per device ? */ if (td->options & NAND_BBT_PERCHIP) { - numblocks = (int)(this->chipsize >> this->bbt_erase_shift); + numblocks = (int) (this->chipsize >> this->bbt_erase_shift); /* Full device write or specific chip ? */ if (chipsel == -1) { nrchips = this->numchips; @@ -590,7 +501,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, chip = chipsel; } } else { - numblocks = (int)(mtd->size >> this->bbt_erase_shift); + numblocks = (int) (mtd->size >> this->bbt_erase_shift); nrchips = 1; } @@ -619,38 +530,27 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, for (i = 0; i < td->maxblocks; i++) { int block = startblock + dir * i; /* Check, if the block is bad */ - switch ((this->bbt[block >> 2] >> - (2 * (block & 0x03))) & 0x03) { + switch ((this->bbt[block >> 2] >> (2 * (block & 0x03))) & 0x03) { case 0x01: case 0x03: continue; } - page = block << - (this->bbt_erase_shift - this->page_shift); + page = block << (this->bbt_erase_shift - this->page_shift); /* Check, if the block is used by the mirror table */ if (!md || md->pages[chip] != page) goto write; } - printk(KERN_ERR "No space left to write bad block table\n"); + printk (KERN_ERR "No space left to write bad block table\n"); return -ENOSPC; - write: +write: /* Set up shift count and masks for the flash table */ bits = td->options & NAND_BBT_NRBITS_MSK; - msk[2] = ~rcode; switch (bits) { - case 1: sft = 3; sftmsk = 0x07; msk[0] = 0x00; msk[1] = 0x01; - msk[3] = 0x01; - break; - case 2: sft = 2; sftmsk = 0x06; msk[0] = 0x00; msk[1] = 0x01; - msk[3] = 0x03; - break; - case 4: sft = 1; sftmsk = 0x04; msk[0] = 0x00; msk[1] = 0x0C; - msk[3] = 0x0f; - break; - case 8: sft = 0; sftmsk = 0x00; msk[0] = 0x00; msk[1] = 0x0F; - msk[3] = 0xff; - break; + case 1: sft = 3; sftmsk = 0x07; msk[0] = 0x00; msk[1] = 0x01; msk[2] = ~rcode; msk[3] = 0x01; break; + case 2: sft = 2; sftmsk = 0x06; msk[0] = 0x00; msk[1] = 0x01; msk[2] = ~rcode; msk[3] = 0x03; break; + case 4: sft = 1; sftmsk = 0x04; msk[0] = 0x00; msk[1] = 0x0C; msk[2] = ~rcode; msk[3] = 0x0f; break; + case 8: sft = 0; sftmsk = 0x00; msk[0] = 0x00; msk[1] = 0x0F; msk[2] = ~rcode; msk[3] = 0xff; break; default: return -EINVAL; } @@ -658,92 +558,82 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, to = ((loff_t) page) << this->page_shift; + memcpy (&oobinfo, this->autooob, sizeof(oobinfo)); + oobinfo.useecc = MTD_NANDECC_PLACEONLY; + /* Must we save the block contents ? */ if (td->options & NAND_BBT_SAVECONTENT) { /* Make it block aligned */ to &= ~((loff_t) ((1 << this->bbt_erase_shift) - 1)); len = 1 << this->bbt_erase_shift; - res = mtd->read(mtd, to, len, &retlen, buf); + res = mtd->read_ecc (mtd, to, len, &retlen, buf, &buf[len], &oobinfo); if (res < 0) { if (retlen != len) { - printk(KERN_INFO "nand_bbt: Error " - "reading block for writing " - "the bad block table\n"); + printk (KERN_INFO "nand_bbt: Error reading block for writing the bad block table\n"); return res; } - printk(KERN_WARNING "nand_bbt: ECC error " - "while reading block for writing " - "bad block table\n"); + printk (KERN_WARNING "nand_bbt: ECC error while reading block for writing bad block table\n"); } - /* Read oob data */ - ops.len = (len >> this->page_shift) * mtd->oobsize; - ops.oobbuf = &buf[len]; - res = mtd->read_oob(mtd, to + mtd->writesize, &ops); - if (res < 0 || ops.retlen != ops.len) - goto outerr; - /* Calc the byte offset in the buffer */ pageoffs = page - (int)(to >> this->page_shift); offs = pageoffs << this->page_shift; /* Preset the bbt area with 0xff */ - memset(&buf[offs], 0xff, (size_t) (numblocks >> sft)); - ooboffs = len + (pageoffs * mtd->oobsize); - + memset (&buf[offs], 0xff, (size_t)(numblocks >> sft)); + /* Preset the bbt's oob area with 0xff */ + memset (&buf[len + pageoffs * mtd->oobsize], 0xff, + ((len >> this->page_shift) - pageoffs) * mtd->oobsize); + if (td->options & NAND_BBT_VERSION) { + buf[len + (pageoffs * mtd->oobsize) + td->veroffs] = td->version[chip]; + } } else { /* Calc length */ len = (size_t) (numblocks >> sft); /* Make it page aligned ! */ - len = (len + (mtd->writesize - 1)) & - ~(mtd->writesize - 1); + len = (len + (mtd->oobblock-1)) & ~(mtd->oobblock-1); /* Preset the buffer with 0xff */ - memset(buf, 0xff, len + - (len >> this->page_shift)* mtd->oobsize); + memset (buf, 0xff, len + (len >> this->page_shift) * mtd->oobsize); offs = 0; - ooboffs = len; /* Pattern is located in oob area of first page */ - memcpy(&buf[ooboffs + td->offs], td->pattern, td->len); + memcpy (&buf[len + td->offs], td->pattern, td->len); + if (td->options & NAND_BBT_VERSION) { + buf[len + td->veroffs] = td->version[chip]; + } } - if (td->options & NAND_BBT_VERSION) - buf[ooboffs + td->veroffs] = td->version[chip]; - /* walk through the memory table */ - for (i = 0; i < numblocks;) { + for (i = 0; i < numblocks; ) { uint8_t dat; dat = this->bbt[bbtoffs + (i >> 2)]; - for (j = 0; j < 4; j++, i++) { + for (j = 0; j < 4; j++ , i++) { int sftcnt = (i << (3 - sft)) & sftmsk; /* Do not store the reserved bbt blocks ! */ - buf[offs + (i >> sft)] &= - ~(msk[dat & 0x03] << sftcnt); + buf[offs + (i >> sft)] &= ~(msk[dat & 0x03] << sftcnt); dat >>= 2; } } - memset(&einfo, 0, sizeof(einfo)); + memset (&einfo, 0, sizeof (einfo)); einfo.mtd = mtd; - einfo.addr = (unsigned long)to; + einfo.addr = (unsigned long) to; einfo.len = 1 << this->bbt_erase_shift; - res = nand_erase_nand(mtd, &einfo, 1); - if (res < 0) - goto outerr; - - res = scan_write_bbt(mtd, to, len, buf, &buf[len]); - if (res < 0) - goto outerr; + res = nand_erase_nand (mtd, &einfo, 1); + if (res < 0) { + printk (KERN_WARNING "nand_bbt: Error during block erase: %d\n", res); + return res; + } - printk(KERN_DEBUG "Bad block table written to 0x%08x, version " - "0x%02X\n", (unsigned int)to, td->version[chip]); + res = mtd->write_ecc (mtd, to, len, &retlen, buf, &buf[len], &oobinfo); + if (res < 0) { + printk (KERN_WARNING "nand_bbt: Error while writing bad block table %d\n", res); + return res; + } + printk (KERN_DEBUG "Bad block table written to 0x%08x, version 0x%02X\n", + (unsigned int) to, td->version[chip]); /* Mark it as used */ td->pages[chip] = page; } return 0; - - outerr: - printk(KERN_WARNING - "nand_bbt: Error while writing bad block table %d\n", res); - return res; } /** @@ -754,27 +644,27 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, * The function creates a memory based bbt by scanning the device * for manufacturer / software marked good / bad blocks */ -static inline int nand_memory_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) +static inline int nand_memory_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) { struct nand_chip *this = mtd->priv; bd->options &= ~NAND_BBT_SCANEMPTY; - return create_bbt(mtd, this->buffers.databuf, bd, -1); + return create_bbt (mtd, this->data_buf, bd, -1); } /** - * check_create - [GENERIC] create and write bbt(s) if necessary + * check_create - [GENERIC] create and write bbt(s) if neccecary * @mtd: MTD device structure * @buf: temporary buffer * @bd: descriptor for the good/bad block search pattern * * The function checks the results of the previous call to read_bbt - * and creates / updates the bbt(s) if necessary - * Creation is necessary if no bbt was found for the chip/device - * Update is necessary if one of the tables is missing or the + * and creates / updates the bbt(s) if neccecary + * Creation is neccecary if no bbt was found for the chip/device + * Update is neccecary if one of the tables is missing or the * version nr. of one table is less than the other */ -static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *bd) +static int check_create (struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *bd) { int i, chips, writeops, chipsel, res; struct nand_chip *this = mtd->priv; @@ -842,35 +732,35 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc rd = td; goto writecheck; } - create: +create: /* Create the bad block table by scanning the device ? */ if (!(td->options & NAND_BBT_CREATE)) continue; /* Create the table in memory by scanning the chip(s) */ - create_bbt(mtd, buf, bd, chipsel); + create_bbt (mtd, buf, bd, chipsel); td->version[i] = 1; if (md) md->version[i] = 1; - writecheck: +writecheck: /* read back first ? */ if (rd) - read_abs_bbt(mtd, buf, rd, chipsel); + read_abs_bbt (mtd, buf, rd, chipsel); /* If they weren't versioned, read both. */ if (rd2) - read_abs_bbt(mtd, buf, rd2, chipsel); + read_abs_bbt (mtd, buf, rd2, chipsel); /* Write the bad block table to the device ? */ if ((writeops & 0x01) && (td->options & NAND_BBT_WRITE)) { - res = write_bbt(mtd, buf, td, md, chipsel); + res = write_bbt (mtd, buf, td, md, chipsel); if (res < 0) return res; } /* Write the mirror bad block table to the device ? */ if ((writeops & 0x02) && md && (md->options & NAND_BBT_WRITE)) { - res = write_bbt(mtd, buf, md, td, chipsel); + res = write_bbt (mtd, buf, md, td, chipsel); if (res < 0) return res; } @@ -887,7 +777,7 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc * accidental erasures / writes. The regions are identified by * the mark 0x02. */ -static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td) +static void mark_bbt_region (struct mtd_info *mtd, struct nand_bbt_descr *td) { struct nand_chip *this = mtd->priv; int i, j, chips, block, nrblocks, update; @@ -905,8 +795,7 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td) for (i = 0; i < chips; i++) { if ((td->options & NAND_BBT_ABSPAGE) || !(td->options & NAND_BBT_WRITE)) { - if (td->pages[i] == -1) - continue; + if (td->pages[i] == -1) continue; block = td->pages[i] >> (this->bbt_erase_shift - this->page_shift); block <<= 1; oldval = this->bbt[(block >> 3)]; @@ -926,8 +815,7 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td) oldval = this->bbt[(block >> 3)]; newval = oldval | (0x2 << (block & 0x06)); this->bbt[(block >> 3)] = newval; - if (oldval != newval) - update = 1; + if (oldval != newval) update = 1; block += 2; } /* If we want reserved blocks to be recorded to flash, and some @@ -952,7 +840,7 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td) * by calling the nand_free_bbt function. * */ -int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) +int nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) { struct nand_chip *this = mtd->priv; int len, res = 0; @@ -962,21 +850,21 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) len = mtd->size >> (this->bbt_erase_shift + 2); /* Allocate memory (2bit per block) */ - this->bbt = kmalloc(len, GFP_KERNEL); + this->bbt = kmalloc (len, GFP_KERNEL); if (!this->bbt) { - printk(KERN_ERR "nand_scan_bbt: Out of memory\n"); + printk (KERN_ERR "nand_scan_bbt: Out of memory\n"); return -ENOMEM; } /* Clear the memory bad block table */ - memset(this->bbt, 0x00, len); + memset (this->bbt, 0x00, len); /* If no primary table decriptor is given, scan the device * to build a memory based bad block table */ if (!td) { if ((res = nand_memory_bbt(mtd, bd))) { - printk(KERN_ERR "nand_bbt: Can't scan flash and build the RAM-based BBT\n"); - kfree(this->bbt); + printk (KERN_ERR "nand_bbt: Can't scan flash and build the RAM-based BBT\n"); + kfree (this->bbt); this->bbt = NULL; } return res; @@ -985,34 +873,35 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) /* Allocate a temporary buffer for one eraseblock incl. oob */ len = (1 << this->bbt_erase_shift); len += (len >> this->page_shift) * mtd->oobsize; - buf = vmalloc(len); + buf = kmalloc (len, GFP_KERNEL); if (!buf) { - printk(KERN_ERR "nand_bbt: Out of memory\n"); - kfree(this->bbt); + printk (KERN_ERR "nand_bbt: Out of memory\n"); + kfree (this->bbt); this->bbt = NULL; return -ENOMEM; } /* Is the bbt at a given page ? */ if (td->options & NAND_BBT_ABSPAGE) { - res = read_abs_bbts(mtd, buf, td, md); + res = read_abs_bbts (mtd, buf, td, md); } else { /* Search the bad block table using a pattern in oob */ - res = search_read_bbts(mtd, buf, td, md); + res = search_read_bbts (mtd, buf, td, md); } if (res) - res = check_create(mtd, buf, bd); + res = check_create (mtd, buf, bd); /* Prevent the bbt regions from erasing / writing */ - mark_bbt_region(mtd, td); + mark_bbt_region (mtd, td); if (md) - mark_bbt_region(mtd, md); + mark_bbt_region (mtd, md); - vfree(buf); + kfree (buf); return res; } + /** * nand_update_bbt - [NAND Interface] update bad block table(s) * @mtd: MTD device structure @@ -1020,7 +909,7 @@ int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) * * The function updates the bad block table(s) */ -int nand_update_bbt(struct mtd_info *mtd, loff_t offs) +int nand_update_bbt (struct mtd_info *mtd, loff_t offs) { struct nand_chip *this = mtd->priv; int len, res = 0, writeops = 0; @@ -1036,9 +925,9 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs) /* Allocate a temporary buffer for one eraseblock incl. oob */ len = (1 << this->bbt_erase_shift); len += (len >> this->page_shift) * mtd->oobsize; - buf = kmalloc(len, GFP_KERNEL); + buf = kmalloc (len, GFP_KERNEL); if (!buf) { - printk(KERN_ERR "nand_update_bbt: Out of memory\n"); + printk (KERN_ERR "nand_update_bbt: Out of memory\n"); return -ENOMEM; } @@ -1046,7 +935,7 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs) /* Do we have a bbt per chip ? */ if (td->options & NAND_BBT_PERCHIP) { - chip = (int)(offs >> this->chip_shift); + chip = (int) (offs >> this->chip_shift); chipsel = chip; } else { chip = 0; @@ -1059,17 +948,17 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs) /* Write the bad block table to the device ? */ if ((writeops & 0x01) && (td->options & NAND_BBT_WRITE)) { - res = write_bbt(mtd, buf, td, md, chipsel); + res = write_bbt (mtd, buf, td, md, chipsel); if (res < 0) goto out; } /* Write the mirror bad block table to the device ? */ if ((writeops & 0x02) && md && (md->options & NAND_BBT_WRITE)) { - res = write_bbt(mtd, buf, md, td, chipsel); + res = write_bbt (mtd, buf, md, td, chipsel); } - out: - kfree(buf); +out: + kfree (buf); return res; } @@ -1092,14 +981,14 @@ static struct nand_bbt_descr largepage_memorybased = { }; static struct nand_bbt_descr smallpage_flashbased = { - .options = NAND_BBT_SCAN2NDPAGE, + .options = NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES, .offs = 5, .len = 1, .pattern = scan_ff_pattern }; static struct nand_bbt_descr largepage_flashbased = { - .options = NAND_BBT_SCAN2NDPAGE, + .options = NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES, .offs = 0, .len = 2, .pattern = scan_ff_pattern @@ -1147,7 +1036,7 @@ static struct nand_bbt_descr bbt_mirror_descr = { * support for the device and calls the nand_scan_bbt function * */ -int nand_default_bbt(struct mtd_info *mtd) +int nand_default_bbt (struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; @@ -1157,7 +1046,7 @@ int nand_default_bbt(struct mtd_info *mtd) * of the good / bad information, so we _must_ store * this information in a good / bad table during * startup - */ + */ if (this->options & NAND_IS_AND) { /* Use the default pattern descriptors */ if (!this->bbt_td) { @@ -1165,9 +1054,10 @@ int nand_default_bbt(struct mtd_info *mtd) this->bbt_md = &bbt_mirror_descr; } this->options |= NAND_USE_FLASH_BBT; - return nand_scan_bbt(mtd, &agand_flashbased); + return nand_scan_bbt (mtd, &agand_flashbased); } + /* Is a flash based bad block table requested ? */ if (this->options & NAND_USE_FLASH_BBT) { /* Use the default pattern descriptors */ @@ -1176,17 +1066,18 @@ int nand_default_bbt(struct mtd_info *mtd) this->bbt_md = &bbt_mirror_descr; } if (!this->badblock_pattern) { - this->badblock_pattern = (mtd->writesize > 512) ? &largepage_flashbased : &smallpage_flashbased; + this->badblock_pattern = (mtd->oobblock > 512) ? + &largepage_flashbased : &smallpage_flashbased; } } else { this->bbt_td = NULL; this->bbt_md = NULL; if (!this->badblock_pattern) { - this->badblock_pattern = (mtd->writesize > 512) ? - &largepage_memorybased : &smallpage_memorybased; + this->badblock_pattern = (mtd->oobblock > 512) ? + &largepage_memorybased : &smallpage_memorybased; } } - return nand_scan_bbt(mtd, this->badblock_pattern); + return nand_scan_bbt (mtd, this->badblock_pattern); } /** @@ -1196,29 +1087,26 @@ int nand_default_bbt(struct mtd_info *mtd) * @allowbbt: allow access to bad block table region * */ -int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) +int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt) { struct nand_chip *this = mtd->priv; int block; - uint8_t res; + uint8_t res; /* Get block number * 2 */ - block = (int)(offs >> (this->bbt_erase_shift - 1)); + block = (int) (offs >> (this->bbt_erase_shift - 1)); res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; - DEBUG(MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n", - (unsigned int)offs, block >> 1, res); + DEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n", + (unsigned int)offs, block >> 1, res); switch ((int)res) { - case 0x00: - return 0; - case 0x01: - return 1; - case 0x02: - return allowbbt ? 0 : 1; + case 0x00: return 0; + case 0x01: return 1; + case 0x02: return allowbbt ? 0 : 1; } return 1; } -EXPORT_SYMBOL(nand_scan_bbt); -EXPORT_SYMBOL(nand_default_bbt); +EXPORT_SYMBOL (nand_scan_bbt); +EXPORT_SYMBOL (nand_default_bbt); diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index dd438ca47..40ac90915 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c @@ -7,8 +7,6 @@ * Copyright (C) 2000-2004 Steven J. Hill (sjhill@realitydiluted.com) * Toshiba America Electronics Components, Inc. * - * Copyright (C) 2006 Thomas Gleixner - * * $Id: nand_ecc.c,v 1.15 2005/11/07 11:14:30 gleixner Exp $ * * This file is free software; you can redistribute it and/or modify it @@ -64,75 +62,90 @@ static const u_char nand_ecc_precalc_table[] = { 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a, 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00 }; + /** - * nand_calculate_ecc - [NAND Interface] Calculate 3-byte ECC for 256-byte block + * nand_trans_result - [GENERIC] create non-inverted ECC + * @reg2: line parity reg 2 + * @reg3: line parity reg 3 + * @ecc_code: ecc + * + * Creates non-inverted ECC code from line parity + */ +static void nand_trans_result(u_char reg2, u_char reg3, + u_char *ecc_code) +{ + u_char a, b, i, tmp1, tmp2; + + /* Initialize variables */ + a = b = 0x80; + tmp1 = tmp2 = 0; + + /* Calculate first ECC byte */ + for (i = 0; i < 4; i++) { + if (reg3 & a) /* LP15,13,11,9 --> ecc_code[0] */ + tmp1 |= b; + b >>= 1; + if (reg2 & a) /* LP14,12,10,8 --> ecc_code[0] */ + tmp1 |= b; + b >>= 1; + a >>= 1; + } + + /* Calculate second ECC byte */ + b = 0x80; + for (i = 0; i < 4; i++) { + if (reg3 & a) /* LP7,5,3,1 --> ecc_code[1] */ + tmp2 |= b; + b >>= 1; + if (reg2 & a) /* LP6,4,2,0 --> ecc_code[1] */ + tmp2 |= b; + b >>= 1; + a >>= 1; + } + + /* Store two of the ECC bytes */ + ecc_code[0] = tmp1; + ecc_code[1] = tmp2; +} + +/** + * nand_calculate_ecc - [NAND Interface] Calculate 3 byte ECC code for 256 byte block * @mtd: MTD block structure * @dat: raw data * @ecc_code: buffer for ECC */ -int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, - u_char *ecc_code) +int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) { - uint8_t idx, reg1, reg2, reg3, tmp1, tmp2; - int i; + u_char idx, reg1, reg2, reg3; + int j; /* Initialize variables */ reg1 = reg2 = reg3 = 0; + ecc_code[0] = ecc_code[1] = ecc_code[2] = 0; /* Build up column parity */ - for(i = 0; i < 256; i++) { + for(j = 0; j < 256; j++) { + /* Get CP0 - CP5 from table */ - idx = nand_ecc_precalc_table[*dat++]; + idx = nand_ecc_precalc_table[dat[j]]; reg1 ^= (idx & 0x3f); /* All bit XOR = 1 ? */ if (idx & 0x40) { - reg3 ^= (uint8_t) i; - reg2 ^= ~((uint8_t) i); + reg3 ^= (u_char) j; + reg2 ^= ~((u_char) j); } } /* Create non-inverted ECC code from line parity */ - tmp1 = (reg3 & 0x80) >> 0; /* B7 -> B7 */ - tmp1 |= (reg2 & 0x80) >> 1; /* B7 -> B6 */ - tmp1 |= (reg3 & 0x40) >> 1; /* B6 -> B5 */ - tmp1 |= (reg2 & 0x40) >> 2; /* B6 -> B4 */ - tmp1 |= (reg3 & 0x20) >> 2; /* B5 -> B3 */ - tmp1 |= (reg2 & 0x20) >> 3; /* B5 -> B2 */ - tmp1 |= (reg3 & 0x10) >> 3; /* B4 -> B1 */ - tmp1 |= (reg2 & 0x10) >> 4; /* B4 -> B0 */ - - tmp2 = (reg3 & 0x08) << 4; /* B3 -> B7 */ - tmp2 |= (reg2 & 0x08) << 3; /* B3 -> B6 */ - tmp2 |= (reg3 & 0x04) << 3; /* B2 -> B5 */ - tmp2 |= (reg2 & 0x04) << 2; /* B2 -> B4 */ - tmp2 |= (reg3 & 0x02) << 2; /* B1 -> B3 */ - tmp2 |= (reg2 & 0x02) << 1; /* B1 -> B2 */ - tmp2 |= (reg3 & 0x01) << 1; /* B0 -> B1 */ - tmp2 |= (reg2 & 0x01) << 0; /* B7 -> B0 */ + nand_trans_result(reg2, reg3, ecc_code); /* Calculate final ECC code */ -#ifdef CONFIG_NAND_ECC_SMC - ecc_code[0] = ~tmp2; - ecc_code[1] = ~tmp1; -#else - ecc_code[0] = ~tmp1; - ecc_code[1] = ~tmp2; -#endif + ecc_code[0] = ~ecc_code[0]; + ecc_code[1] = ~ecc_code[1]; ecc_code[2] = ((~reg1) << 2) | 0x03; - return 0; } -EXPORT_SYMBOL(nand_calculate_ecc); - -static inline int countbits(uint32_t byte) -{ - int res = 0; - - for (;byte; byte >>= 1) - res += byte & 0x01; - return res; -} /** * nand_correct_data - [NAND Interface] Detect and correct bit error(s) @@ -143,54 +156,93 @@ static inline int countbits(uint32_t byte) * * Detect and correct a 1 bit error for 256 byte block */ -int nand_correct_data(struct mtd_info *mtd, u_char *dat, - u_char *read_ecc, u_char *calc_ecc) +int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) { - uint8_t s0, s1, s2; - -#ifdef CONFIG_NAND_ECC_SMC - s0 = calc_ecc[0] ^ read_ecc[0]; - s1 = calc_ecc[1] ^ read_ecc[1]; - s2 = calc_ecc[2] ^ read_ecc[2]; -#else - s1 = calc_ecc[0] ^ read_ecc[0]; - s0 = calc_ecc[1] ^ read_ecc[1]; - s2 = calc_ecc[2] ^ read_ecc[2]; -#endif - if ((s0 | s1 | s2) == 0) - return 0; - - /* Check for a single bit error */ - if( ((s0 ^ (s0 >> 1)) & 0x55) == 0x55 && - ((s1 ^ (s1 >> 1)) & 0x55) == 0x55 && - ((s2 ^ (s2 >> 1)) & 0x54) == 0x54) { - - uint32_t byteoffs, bitnum; - - byteoffs = (s1 << 0) & 0x80; - byteoffs |= (s1 << 1) & 0x40; - byteoffs |= (s1 << 2) & 0x20; - byteoffs |= (s1 << 3) & 0x10; - - byteoffs |= (s0 >> 4) & 0x08; - byteoffs |= (s0 >> 3) & 0x04; - byteoffs |= (s0 >> 2) & 0x02; - byteoffs |= (s0 >> 1) & 0x01; + u_char a, b, c, d1, d2, d3, add, bit, i; - bitnum = (s2 >> 5) & 0x04; - bitnum |= (s2 >> 4) & 0x02; - bitnum |= (s2 >> 3) & 0x01; + /* Do error detection */ + d1 = calc_ecc[0] ^ read_ecc[0]; + d2 = calc_ecc[1] ^ read_ecc[1]; + d3 = calc_ecc[2] ^ read_ecc[2]; - dat[byteoffs] ^= (1 << bitnum); - - return 1; + if ((d1 | d2 | d3) == 0) { + /* No errors */ + return 0; + } + else { + a = (d1 ^ (d1 >> 1)) & 0x55; + b = (d2 ^ (d2 >> 1)) & 0x55; + c = (d3 ^ (d3 >> 1)) & 0x54; + + /* Found and will correct single bit error in the data */ + if ((a == 0x55) && (b == 0x55) && (c == 0x54)) { + c = 0x80; + add = 0; + a = 0x80; + for (i=0; i<4; i++) { + if (d1 & c) + add |= a; + c >>= 2; + a >>= 1; + } + c = 0x80; + for (i=0; i<4; i++) { + if (d2 & c) + add |= a; + c >>= 2; + a >>= 1; + } + bit = 0; + b = 0x04; + c = 0x80; + for (i=0; i<3; i++) { + if (d3 & c) + bit |= b; + c >>= 2; + b >>= 1; + } + b = 0x01; + a = dat[add]; + a ^= (b << bit); + dat[add] = a; + return 1; + } + else { + i = 0; + while (d1) { + if (d1 & 0x01) + ++i; + d1 >>= 1; + } + while (d2) { + if (d2 & 0x01) + ++i; + d2 >>= 1; + } + while (d3) { + if (d3 & 0x01) + ++i; + d3 >>= 1; + } + if (i == 1) { + /* ECC Code Error Correction */ + read_ecc[0] = calc_ecc[0]; + read_ecc[1] = calc_ecc[1]; + read_ecc[2] = calc_ecc[2]; + return 2; + } + else { + /* Uncorrectable Error */ + return -1; + } + } } - if(countbits(s0 | ((uint32_t)s1 << 8) | ((uint32_t)s2 <<16)) == 1) - return 1; - + /* Should never happen */ return -1; } + +EXPORT_SYMBOL(nand_calculate_ecc); EXPORT_SYMBOL(nand_correct_data); MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 2e2cdf2fc..dbc7e55a4 100644 --- a/drivers/mtd/nand/nand_ids.c +++ b/drivers/mtd/nand/nand_ids.c @@ -18,110 +18,99 @@ * Name. ID code, pagesize, chipsize in MegaByte, eraseblock size, * options * -* Pagesize; 0, 256, 512 -* 0 get this information from the extended chip ID +* Pagesize; 0, 256, 512 +* 0 get this information from the extended chip ID + 256 256 Byte page size * 512 512 Byte page size */ struct nand_flash_dev nand_flash_ids[] = { - {"NAND 1MiB 5V 8-bit", 0x6e, 256, 1, 0x1000, 0}, - {"NAND 2MiB 5V 8-bit", 0x64, 256, 2, 0x1000, 0}, - {"NAND 4MiB 5V 8-bit", 0x6b, 512, 4, 0x2000, 0}, - {"NAND 1MiB 3,3V 8-bit", 0xe8, 256, 1, 0x1000, 0}, - {"NAND 1MiB 3,3V 8-bit", 0xec, 256, 1, 0x1000, 0}, - {"NAND 2MiB 3,3V 8-bit", 0xea, 256, 2, 0x1000, 0}, - {"NAND 4MiB 3,3V 8-bit", 0xd5, 512, 4, 0x2000, 0}, - {"NAND 4MiB 3,3V 8-bit", 0xe3, 512, 4, 0x2000, 0}, - {"NAND 4MiB 3,3V 8-bit", 0xe5, 512, 4, 0x2000, 0}, - {"NAND 8MiB 3,3V 8-bit", 0xd6, 512, 8, 0x2000, 0}, - - {"NAND 8MiB 1,8V 8-bit", 0x39, 512, 8, 0x2000, 0}, - {"NAND 8MiB 3,3V 8-bit", 0xe6, 512, 8, 0x2000, 0}, - {"NAND 8MiB 1,8V 16-bit", 0x49, 512, 8, 0x2000, NAND_BUSWIDTH_16}, - {"NAND 8MiB 3,3V 16-bit", 0x59, 512, 8, 0x2000, NAND_BUSWIDTH_16}, - - {"NAND 16MiB 1,8V 8-bit", 0x33, 512, 16, 0x4000, 0}, - {"NAND 16MiB 3,3V 8-bit", 0x73, 512, 16, 0x4000, 0}, - {"NAND 16MiB 1,8V 16-bit", 0x43, 512, 16, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 16MiB 3,3V 16-bit", 0x53, 512, 16, 0x4000, NAND_BUSWIDTH_16}, - - {"NAND 32MiB 1,8V 8-bit", 0x35, 512, 32, 0x4000, 0}, - {"NAND 32MiB 3,3V 8-bit", 0x75, 512, 32, 0x4000, 0}, - {"NAND 32MiB 1,8V 16-bit", 0x45, 512, 32, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 32MiB 3,3V 16-bit", 0x55, 512, 32, 0x4000, NAND_BUSWIDTH_16}, - - {"NAND 64MiB 1,8V 8-bit", 0x36, 512, 64, 0x4000, 0}, - {"NAND 64MiB 3,3V 8-bit", 0x76, 512, 64, 0x4000, 0}, - {"NAND 64MiB 1,8V 16-bit", 0x46, 512, 64, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 64MiB 3,3V 16-bit", 0x56, 512, 64, 0x4000, NAND_BUSWIDTH_16}, - - {"NAND 128MiB 1,8V 8-bit", 0x78, 512, 128, 0x4000, 0}, - {"NAND 128MiB 1,8V 8-bit", 0x39, 512, 128, 0x4000, 0}, - {"NAND 128MiB 3,3V 8-bit", 0x79, 512, 128, 0x4000, 0}, - {"NAND 128MiB 1,8V 16-bit", 0x72, 512, 128, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 128MiB 1,8V 16-bit", 0x49, 512, 128, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 128MiB 3,3V 16-bit", 0x74, 512, 128, 0x4000, NAND_BUSWIDTH_16}, - {"NAND 128MiB 3,3V 16-bit", 0x59, 512, 128, 0x4000, NAND_BUSWIDTH_16}, - - {"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0}, - - /* - * These are the new chips with large page size. The pagesize and the - * erasesize is determined from the extended id bytes - */ -#define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY | NAND_NO_AUTOINCR) -#define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) - + {"NAND 1MiB 5V 8-bit", 0x6e, 256, 1, 0x1000, 0}, + {"NAND 2MiB 5V 8-bit", 0x64, 256, 2, 0x1000, 0}, + {"NAND 4MiB 5V 8-bit", 0x6b, 512, 4, 0x2000, 0}, + {"NAND 1MiB 3,3V 8-bit", 0xe8, 256, 1, 0x1000, 0}, + {"NAND 1MiB 3,3V 8-bit", 0xec, 256, 1, 0x1000, 0}, + {"NAND 2MiB 3,3V 8-bit", 0xea, 256, 2, 0x1000, 0}, + {"NAND 4MiB 3,3V 8-bit", 0xd5, 512, 4, 0x2000, 0}, + {"NAND 4MiB 3,3V 8-bit", 0xe3, 512, 4, 0x2000, 0}, + {"NAND 4MiB 3,3V 8-bit", 0xe5, 512, 4, 0x2000, 0}, + {"NAND 8MiB 3,3V 8-bit", 0xd6, 512, 8, 0x2000, 0}, + + {"NAND 8MiB 1,8V 8-bit", 0x39, 512, 8, 0x2000, 0}, + {"NAND 8MiB 3,3V 8-bit", 0xe6, 512, 8, 0x2000, 0}, + {"NAND 8MiB 1,8V 16-bit", 0x49, 512, 8, 0x2000, NAND_BUSWIDTH_16}, + {"NAND 8MiB 3,3V 16-bit", 0x59, 512, 8, 0x2000, NAND_BUSWIDTH_16}, + + {"NAND 16MiB 1,8V 8-bit", 0x33, 512, 16, 0x4000, 0}, + {"NAND 16MiB 3,3V 8-bit", 0x73, 512, 16, 0x4000, 0}, + {"NAND 16MiB 1,8V 16-bit", 0x43, 512, 16, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 16MiB 3,3V 16-bit", 0x53, 512, 16, 0x4000, NAND_BUSWIDTH_16}, + + {"NAND 32MiB 1,8V 8-bit", 0x35, 512, 32, 0x4000, 0}, + {"NAND 32MiB 3,3V 8-bit", 0x75, 512, 32, 0x4000, 0}, + {"NAND 32MiB 1,8V 16-bit", 0x45, 512, 32, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 32MiB 3,3V 16-bit", 0x55, 512, 32, 0x4000, NAND_BUSWIDTH_16}, + + {"NAND 64MiB 1,8V 8-bit", 0x36, 512, 64, 0x4000, 0}, + {"NAND 64MiB 3,3V 8-bit", 0x76, 512, 64, 0x4000, 0}, + {"NAND 64MiB 1,8V 16-bit", 0x46, 512, 64, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 64MiB 3,3V 16-bit", 0x56, 512, 64, 0x4000, NAND_BUSWIDTH_16}, + + {"NAND 128MiB 1,8V 8-bit", 0x78, 512, 128, 0x4000, 0}, + {"NAND 128MiB 1,8V 8-bit", 0x39, 512, 128, 0x4000, 0}, + {"NAND 128MiB 3,3V 8-bit", 0x79, 512, 128, 0x4000, 0}, + {"NAND 128MiB 1,8V 16-bit", 0x72, 512, 128, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 128MiB 1,8V 16-bit", 0x49, 512, 128, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 128MiB 3,3V 16-bit", 0x74, 512, 128, 0x4000, NAND_BUSWIDTH_16}, + {"NAND 128MiB 3,3V 16-bit", 0x59, 512, 128, 0x4000, NAND_BUSWIDTH_16}, + + {"NAND 256MiB 3,3V 8-bit", 0x71, 512, 256, 0x4000, 0}, + + /* These are the new chips with large page size. The pagesize + * and the erasesize is determined from the extended id bytes + */ /*512 Megabit */ - {"NAND 64MiB 1,8V 8-bit", 0xA2, 0, 64, 0, LP_OPTIONS}, - {"NAND 64MiB 3,3V 8-bit", 0xF2, 0, 64, 0, LP_OPTIONS}, - {"NAND 64MiB 1,8V 16-bit", 0xB2, 0, 64, 0, LP_OPTIONS16}, - {"NAND 64MiB 3,3V 16-bit", 0xC2, 0, 64, 0, LP_OPTIONS16}, + {"NAND 64MiB 1,8V 8-bit", 0xA2, 0, 64, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 64MiB 3,3V 8-bit", 0xF2, 0, 64, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 64MiB 1,8V 16-bit", 0xB2, 0, 64, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 64MiB 3,3V 16-bit", 0xC2, 0, 64, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, /* 1 Gigabit */ - {"NAND 128MiB 1,8V 8-bit", 0xA1, 0, 128, 0, LP_OPTIONS}, - {"NAND 128MiB 3,3V 8-bit", 0xF1, 0, 128, 0, LP_OPTIONS}, - {"NAND 128MiB 1,8V 16-bit", 0xB1, 0, 128, 0, LP_OPTIONS16}, - {"NAND 128MiB 3,3V 16-bit", 0xC1, 0, 128, 0, LP_OPTIONS16}, + {"NAND 128MiB 1,8V 8-bit", 0xA1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 128MiB 3,3V 8-bit", 0xF1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 128MiB 1,8V 16-bit", 0xB1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 128MiB 3,3V 16-bit", 0xC1, 0, 128, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, /* 2 Gigabit */ - {"NAND 256MiB 1,8V 8-bit", 0xAA, 0, 256, 0, LP_OPTIONS}, - {"NAND 256MiB 3,3V 8-bit", 0xDA, 0, 256, 0, LP_OPTIONS}, - {"NAND 256MiB 1,8V 16-bit", 0xBA, 0, 256, 0, LP_OPTIONS16}, - {"NAND 256MiB 3,3V 16-bit", 0xCA, 0, 256, 0, LP_OPTIONS16}, + {"NAND 256MiB 1,8V 8-bit", 0xAA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 256MiB 3,3V 8-bit", 0xDA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 256MiB 1,8V 16-bit", 0xBA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 256MiB 3,3V 16-bit", 0xCA, 0, 256, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, /* 4 Gigabit */ - {"NAND 512MiB 1,8V 8-bit", 0xAC, 0, 512, 0, LP_OPTIONS}, - {"NAND 512MiB 3,3V 8-bit", 0xDC, 0, 512, 0, LP_OPTIONS}, - {"NAND 512MiB 1,8V 16-bit", 0xBC, 0, 512, 0, LP_OPTIONS16}, - {"NAND 512MiB 3,3V 16-bit", 0xCC, 0, 512, 0, LP_OPTIONS16}, + {"NAND 512MiB 1,8V 8-bit", 0xAC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 512MiB 3,3V 8-bit", 0xDC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 512MiB 1,8V 16-bit", 0xBC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 512MiB 3,3V 16-bit", 0xCC, 0, 512, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, /* 8 Gigabit */ - {"NAND 1GiB 1,8V 8-bit", 0xA3, 0, 1024, 0, LP_OPTIONS}, - {"NAND 1GiB 3,3V 8-bit", 0xD3, 0, 1024, 0, LP_OPTIONS}, - {"NAND 1GiB 1,8V 16-bit", 0xB3, 0, 1024, 0, LP_OPTIONS16}, - {"NAND 1GiB 3,3V 16-bit", 0xC3, 0, 1024, 0, LP_OPTIONS16}, + {"NAND 1GiB 1,8V 8-bit", 0xA3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 1GiB 3,3V 8-bit", 0xD3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 1GiB 1,8V 16-bit", 0xB3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 1GiB 3,3V 16-bit", 0xC3, 0, 1024, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, /* 16 Gigabit */ - {"NAND 2GiB 1,8V 8-bit", 0xA5, 0, 2048, 0, LP_OPTIONS}, - {"NAND 2GiB 3,3V 8-bit", 0xD5, 0, 2048, 0, LP_OPTIONS}, - {"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, LP_OPTIONS16}, - {"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, LP_OPTIONS16}, - - /* - * Renesas AND 1 Gigabit. Those chips do not support extended id and - * have a strange page/block layout ! The chosen minimum erasesize is - * 4 * 2 * 2048 = 16384 Byte, as those chips have an array of 4 page - * planes 1 block = 2 pages, but due to plane arrangement the blocks - * 0-3 consists of page 0 + 4,1 + 5, 2 + 6, 3 + 7 Anyway JFFS2 would - * increase the eraseblock size so we chose a combined one which can be - * erased in one go There are more speed improvements for reads and - * writes possible, but not implemented now + {"NAND 2GiB 1,8V 8-bit", 0xA5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 2GiB 3,3V 8-bit", 0xD5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR}, + {"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + {"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR}, + + /* Renesas AND 1 Gigabit. Those chips do not support extended id and have a strange page/block layout ! + * The chosen minimum erasesize is 4 * 2 * 2048 = 16384 Byte, as those chips have an array of 4 page planes + * 1 block = 2 pages, but due to plane arrangement the blocks 0-3 consists of page 0 + 4,1 + 5, 2 + 6, 3 + 7 + * Anyway JFFS2 would increase the eraseblock size so we chose a combined one which can be erased in one go + * There are more speed improvements for reads and writes possible, but not implemented now */ - {"AND 128MiB 3,3V 8-bit", 0x01, 2048, 128, 0x4000, - NAND_IS_AND | NAND_NO_AUTOINCR |NAND_NO_READRDY | NAND_4PAGE_ARRAY | - BBT_AUTO_REFRESH - }, + {"AND 128MiB 3,3V 8-bit", 0x01, 2048, 128, 0x4000, NAND_IS_AND | NAND_NO_AUTOINCR | NAND_4PAGE_ARRAY | BBT_AUTO_REFRESH}, {NULL,} }; @@ -136,13 +125,13 @@ struct nand_manufacturers nand_manuf_ids[] = { {NAND_MFR_NATIONAL, "National"}, {NAND_MFR_RENESAS, "Renesas"}, {NAND_MFR_STMICRO, "ST Micro"}, - {NAND_MFR_HYNIX, "Hynix"}, + {NAND_MFR_HYNIX, "Hynix"}, {0x0, "Unknown"} }; -EXPORT_SYMBOL(nand_manuf_ids); -EXPORT_SYMBOL(nand_flash_ids); +EXPORT_SYMBOL (nand_manuf_ids); +EXPORT_SYMBOL (nand_flash_ids); -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Thomas Gleixner "); -MODULE_DESCRIPTION("Nand device & manufacturer IDs"); +MODULE_LICENSE ("GPL"); +MODULE_AUTHOR ("Thomas Gleixner "); +MODULE_DESCRIPTION ("Nand device & manufacturer ID's"); diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 545ff252d..a0af92cc7 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -25,6 +25,7 @@ * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $ */ +#include #include #include #include @@ -368,7 +369,7 @@ init_nandsim(struct mtd_info *mtd) /* Initialize the NAND flash parameters */ ns->busw = chip->options & NAND_BUSWIDTH_16 ? 16 : 8; ns->geom.totsz = mtd->size; - ns->geom.pgsz = mtd->writesize; + ns->geom.pgsz = mtd->oobblock; ns->geom.oobsz = mtd->oobsize; ns->geom.secsz = mtd->erasesize; ns->geom.pgszoob = ns->geom.pgsz + ns->geom.oobsz; @@ -1070,6 +1071,68 @@ switch_state(struct nandsim *ns) } } +static void +ns_hwcontrol(struct mtd_info *mtd, int cmd) +{ + struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv; + + switch (cmd) { + + /* set CLE line high */ + case NAND_CTL_SETCLE: + NS_DBG("ns_hwcontrol: start command latch cycles\n"); + ns->lines.cle = 1; + break; + + /* set CLE line low */ + case NAND_CTL_CLRCLE: + NS_DBG("ns_hwcontrol: stop command latch cycles\n"); + ns->lines.cle = 0; + break; + + /* set ALE line high */ + case NAND_CTL_SETALE: + NS_DBG("ns_hwcontrol: start address latch cycles\n"); + ns->lines.ale = 1; + break; + + /* set ALE line low */ + case NAND_CTL_CLRALE: + NS_DBG("ns_hwcontrol: stop address latch cycles\n"); + ns->lines.ale = 0; + break; + + /* set WP line high */ + case NAND_CTL_SETWP: + NS_DBG("ns_hwcontrol: enable write protection\n"); + ns->lines.wp = 1; + break; + + /* set WP line low */ + case NAND_CTL_CLRWP: + NS_DBG("ns_hwcontrol: disable write protection\n"); + ns->lines.wp = 0; + break; + + /* set CE line low */ + case NAND_CTL_SETNCE: + NS_DBG("ns_hwcontrol: enable chip\n"); + ns->lines.ce = 1; + break; + + /* set CE line high */ + case NAND_CTL_CLRNCE: + NS_DBG("ns_hwcontrol: disable chip\n"); + ns->lines.ce = 0; + break; + + default: + NS_ERR("hwcontrol: unknown command\n"); + } + + return; +} + static u_char ns_nand_read_byte(struct mtd_info *mtd) { @@ -1296,18 +1359,6 @@ ns_nand_write_byte(struct mtd_info *mtd, u_char byte) return; } -static void ns_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int bitmask) -{ - struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv; - - ns->lines.cle = bitmask & NAND_CLE ? 1 : 0; - ns->lines.ale = bitmask & NAND_ALE ? 1 : 0; - ns->lines.ce = bitmask & NAND_NCE ? 1 : 0; - - if (cmd != NAND_CMD_NONE) - ns_nand_write_byte(mtd, cmd); -} - static int ns_device_ready(struct mtd_info *mtd) { @@ -1325,6 +1376,17 @@ ns_nand_read_word(struct mtd_info *mtd) return chip->read_byte(mtd) | (chip->read_byte(mtd) << 8); } +static void +ns_nand_write_word(struct mtd_info *mtd, uint16_t word) +{ + struct nand_chip *chip = (struct nand_chip *)mtd->priv; + + NS_DBG("write_word\n"); + + chip->write_byte(mtd, word & 0xFF); + chip->write_byte(mtd, word >> 8); +} + static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) { @@ -1452,14 +1514,16 @@ static int __init ns_init_module(void) /* * Register simulator's callbacks. */ - chip->cmd_ctrl = ns_hwcontrol; + chip->hwcontrol = ns_hwcontrol; chip->read_byte = ns_nand_read_byte; chip->dev_ready = ns_device_ready; + chip->write_byte = ns_nand_write_byte; chip->write_buf = ns_nand_write_buf; chip->read_buf = ns_nand_read_buf; chip->verify_buf = ns_nand_verify_buf; + chip->write_word = ns_nand_write_word; chip->read_word = ns_nand_read_word; - chip->ecc.mode = NAND_ECC_SOFT; + chip->eccmode = NAND_ECC_SOFT; chip->options |= NAND_SKIP_BBTSCAN; /* @@ -1482,8 +1546,6 @@ static int __init ns_init_module(void) chip->options |= NAND_BUSWIDTH_16; } - nsmtd->owner = THIS_MODULE; - if ((retval = nand_scan(nsmtd, 1)) != 0) { NS_ERR("can't register NAND Simulator\n"); if (retval > 0) diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c deleted file mode 100644 index e5bd88f2d..000000000 --- a/drivers/mtd/nand/ndfc.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * drivers/mtd/ndfc.c - * - * Overview: - * Platform independend driver for NDFC (NanD Flash Controller) - * integrated into EP440 cores - * - * Author: Thomas Gleixner - * - * Copyright 2006 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 -#include -#include -#include -#include -#include -#include - -#include -#include - -struct ndfc_nand_mtd { - struct mtd_info mtd; - struct nand_chip chip; - struct platform_nand_chip *pl_chip; -}; - -static struct ndfc_nand_mtd ndfc_mtd[NDFC_MAX_BANKS]; - -struct ndfc_controller { - void __iomem *ndfcbase; - struct nand_hw_control ndfc_control; - atomic_t childs_active; -}; - -static struct ndfc_controller ndfc_ctrl; - -static void ndfc_select_chip(struct mtd_info *mtd, int chip) -{ - uint32_t ccr; - struct ndfc_controller *ndfc = &ndfc_ctrl; - struct nand_chip *nandchip = mtd->priv; - struct ndfc_nand_mtd *nandmtd = nandchip->priv; - struct platform_nand_chip *pchip = nandmtd->pl_chip; - - ccr = __raw_readl(ndfc->ndfcbase + NDFC_CCR); - if (chip >= 0) { - ccr &= ~NDFC_CCR_BS_MASK; - ccr |= NDFC_CCR_BS(chip + pchip->chip_offset); - } else - ccr |= NDFC_CCR_RESET_CE; - writel(ccr, ndfc->ndfcbase + NDFC_CCR); -} - -static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - - if (cmd == NAND_CMD_NONE) - return; - - if (ctrl & NAND_CLE) - writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_CMD); - else - writel(cmd & 0xFF, ndfc->ndfcbase + NDFC_ALE); -} - -static int ndfc_ready(struct mtd_info *mtd) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - - return __raw_readl(ndfc->ndfcbase + NDFC_STAT) & NDFC_STAT_IS_READY; -} - -static void ndfc_enable_hwecc(struct mtd_info *mtd, int mode) -{ - uint32_t ccr; - struct ndfc_controller *ndfc = &ndfc_ctrl; - - ccr = __raw_readl(ndfc->ndfcbase + NDFC_CCR); - ccr |= NDFC_CCR_RESET_ECC; - __raw_writel(ccr, ndfc->ndfcbase + NDFC_CCR); - wmb(); -} - -static int ndfc_calculate_ecc(struct mtd_info *mtd, - const u_char *dat, u_char *ecc_code) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - uint32_t ecc; - uint8_t *p = (uint8_t *)&ecc; - - wmb(); - ecc = __raw_readl(ndfc->ndfcbase + NDFC_ECC); - ecc_code[0] = p[1]; - ecc_code[1] = p[2]; - ecc_code[2] = p[3]; - - return 0; -} - -/* - * Speedups for buffer read/write/verify - * - * NDFC allows 32bit read/write of data. So we can speed up the buffer - * functions. No further checking, as nand_base will always read/write - * page aligned. - */ -static void ndfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - uint32_t *p = (uint32_t *) buf; - - for(;len > 0; len -= 4) - *p++ = __raw_readl(ndfc->ndfcbase + NDFC_DATA); -} - -static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - uint32_t *p = (uint32_t *) buf; - - for(;len > 0; len -= 4) - __raw_writel(*p++, ndfc->ndfcbase + NDFC_DATA); -} - -static int ndfc_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - uint32_t *p = (uint32_t *) buf; - - for(;len > 0; len -= 4) - if (*p++ != __raw_readl(ndfc->ndfcbase + NDFC_DATA)) - return -EFAULT; - return 0; -} - -/* - * Initialize chip structure - */ -static void ndfc_chip_init(struct ndfc_nand_mtd *mtd) -{ - struct ndfc_controller *ndfc = &ndfc_ctrl; - struct nand_chip *chip = &mtd->chip; - - chip->IO_ADDR_R = ndfc->ndfcbase + NDFC_DATA; - chip->IO_ADDR_W = ndfc->ndfcbase + NDFC_DATA; - chip->cmd_ctrl = ndfc_hwcontrol; - chip->dev_ready = ndfc_ready; - chip->select_chip = ndfc_select_chip; - chip->chip_delay = 50; - chip->priv = mtd; - chip->options = mtd->pl_chip->options; - chip->controller = &ndfc->ndfc_control; - chip->read_buf = ndfc_read_buf; - chip->write_buf = ndfc_write_buf; - chip->verify_buf = ndfc_verify_buf; - chip->ecc.correct = nand_correct_data; - chip->ecc.hwctl = ndfc_enable_hwecc; - chip->ecc.calculate = ndfc_calculate_ecc; - chip->ecc.mode = NAND_ECC_HW; - chip->ecc.size = 256; - chip->ecc.bytes = 3; - chip->ecclayout = mtd->pl_chip->ecclayout; - mtd->mtd.priv = chip; - mtd->mtd.owner = THIS_MODULE; -} - -static int ndfc_chip_probe(struct platform_device *pdev) -{ - struct platform_nand_chip *nc = pdev->dev.platform_data; - struct ndfc_chip_settings *settings = nc->priv; - struct ndfc_controller *ndfc = &ndfc_ctrl; - struct ndfc_nand_mtd *nandmtd; - - if (nc->chip_offset >= NDFC_MAX_BANKS || nc->nr_chips > NDFC_MAX_BANKS) - return -EINVAL; - - /* Set the bank settings */ - __raw_writel(settings->bank_settings, - ndfc->ndfcbase + NDFC_BCFG0 + (nc->chip_offset << 2)); - - nandmtd = &ndfc_mtd[pdev->id]; - if (nandmtd->pl_chip) - return -EBUSY; - - nandmtd->pl_chip = nc; - ndfc_chip_init(nandmtd); - - /* Scan for chips */ - if (nand_scan(&nandmtd->mtd, nc->nr_chips)) { - nandmtd->pl_chip = NULL; - return -ENODEV; - } - -#ifdef CONFIG_MTD_PARTITIONS - printk("Number of partitions %d\n", nc->nr_partitions); - if (nc->nr_partitions) { - /* Add the full device, so complete dumps can be made */ - add_mtd_device(&nandmtd->mtd); - add_mtd_partitions(&nandmtd->mtd, nc->partitions, - nc->nr_partitions); - - } else -#else - add_mtd_device(&nandmtd->mtd); -#endif - - atomic_inc(&ndfc->childs_active); - return 0; -} - -static int ndfc_chip_remove(struct platform_device *pdev) -{ - return 0; -} - -static int ndfc_nand_probe(struct platform_device *pdev) -{ - struct platform_nand_ctrl *nc = pdev->dev.platform_data; - struct ndfc_controller_settings *settings = nc->priv; - struct resource *res = pdev->resource; - struct ndfc_controller *ndfc = &ndfc_ctrl; - unsigned long long phys = settings->ndfc_erpn | res->start; - - ndfc->ndfcbase = ioremap64(phys, res->end - res->start + 1); - if (!ndfc->ndfcbase) { - printk(KERN_ERR "NDFC: ioremap failed\n"); - return -EIO; - } - - __raw_writel(settings->ccr_settings, ndfc->ndfcbase + NDFC_CCR); - - spin_lock_init(&ndfc->ndfc_control.lock); - init_waitqueue_head(&ndfc->ndfc_control.wq); - - platform_set_drvdata(pdev, ndfc); - - printk("NDFC NAND Driver initialized. Chip-Rev: 0x%08x\n", - __raw_readl(ndfc->ndfcbase + NDFC_REVID)); - - return 0; -} - -static int ndfc_nand_remove(struct platform_device *pdev) -{ - struct ndfc_controller *ndfc = platform_get_drvdata(pdev); - - if (atomic_read(&ndfc->childs_active)) - return -EBUSY; - - if (ndfc) { - platform_set_drvdata(pdev, NULL); - iounmap(ndfc_ctrl.ndfcbase); - ndfc_ctrl.ndfcbase = NULL; - } - return 0; -} - -/* driver device registration */ - -static struct platform_driver ndfc_chip_driver = { - .probe = ndfc_chip_probe, - .remove = ndfc_chip_remove, - .driver = { - .name = "ndfc-chip", - .owner = THIS_MODULE, - }, -}; - -static struct platform_driver ndfc_nand_driver = { - .probe = ndfc_nand_probe, - .remove = ndfc_nand_remove, - .driver = { - .name = "ndfc-nand", - .owner = THIS_MODULE, - }, -}; - -static int __init ndfc_nand_init(void) -{ - int ret; - - spin_lock_init(&ndfc_ctrl.ndfc_control.lock); - init_waitqueue_head(&ndfc_ctrl.ndfc_control.wq); - - ret = platform_driver_register(&ndfc_nand_driver); - if (!ret) - ret = platform_driver_register(&ndfc_chip_driver); - return ret; -} - -static void __exit ndfc_nand_exit(void) -{ - platform_driver_unregister(&ndfc_chip_driver); - platform_driver_unregister(&ndfc_nand_driver); -} - -module_init(ndfc_nand_init); -module_exit(ndfc_nand_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Thomas Gleixner "); -MODULE_DESCRIPTION("Platform driver for NDFC"); diff --git a/drivers/mtd/nand/ppchameleonevb.c b/drivers/mtd/nand/ppchameleonevb.c index 22fa65c12..91a95f34a 100644 --- a/drivers/mtd/nand/ppchameleonevb.c +++ b/drivers/mtd/nand/ppchameleonevb.c @@ -58,21 +58,21 @@ /* * MTD structure for PPChameleonEVB board */ -static struct mtd_info *ppchameleon_mtd = NULL; +static struct mtd_info *ppchameleon_mtd = NULL; static struct mtd_info *ppchameleonevb_mtd = NULL; /* * Module stuff */ -static unsigned long ppchameleon_fio_pbase = CFG_NAND0_PADDR; +static unsigned long ppchameleon_fio_pbase = CFG_NAND0_PADDR; static unsigned long ppchameleonevb_fio_pbase = CFG_NAND1_PADDR; #ifdef MODULE module_param(ppchameleon_fio_pbase, ulong, 0); module_param(ppchameleonevb_fio_pbase, ulong, 0); #else -__setup("ppchameleon_fio_pbase=", ppchameleon_fio_pbase); -__setup("ppchameleonevb_fio_pbase=", ppchameleonevb_fio_pbase); +__setup("ppchameleon_fio_pbase=",ppchameleon_fio_pbase); +__setup("ppchameleonevb_fio_pbase=",ppchameleonevb_fio_pbase); #endif #ifdef CONFIG_MTD_PARTITIONS @@ -80,96 +80,82 @@ __setup("ppchameleonevb_fio_pbase=", ppchameleonevb_fio_pbase); * Define static partitions for flash devices */ static struct mtd_partition partition_info_hi[] = { - { .name = "PPChameleon HI Nand Flash", - offset = 0, - .size = 128 * 1024 * 1024 - } + { name: "PPChameleon HI Nand Flash", + offset: 0, + size: 128*1024*1024 } }; static struct mtd_partition partition_info_me[] = { - { .name = "PPChameleon ME Nand Flash", - .offset = 0, - .size = 32 * 1024 * 1024 - } + { name: "PPChameleon ME Nand Flash", + offset: 0, + size: 32*1024*1024 } }; static struct mtd_partition partition_info_evb[] = { - { .name = "PPChameleonEVB Nand Flash", - .offset = 0, - .size = 32 * 1024 * 1024 - } + { name: "PPChameleonEVB Nand Flash", + offset: 0, + size: 32*1024*1024 } }; #define NUM_PARTITIONS 1 -extern int parse_cmdline_partitions(struct mtd_info *master, struct mtd_partition **pparts, const char *mtd_id); +extern int parse_cmdline_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + const char *mtd_id); #endif + /* * hardware specific access to control-lines */ -static void ppchameleon_hwcontrol(struct mtd_info *mtdinfo, int cmd, - unsigned int ctrl) +static void ppchameleon_hwcontrol(struct mtd_info *mtdinfo, int cmd) { - struct nand_chip *chip = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { -#error Missing headerfiles. No way to fix this. -tglx - switch (cmd) { - case NAND_CTL_SETCLE: - MACRO_NAND_CTL_SETCLE((unsigned long)CFG_NAND0_PADDR); - break; - case NAND_CTL_CLRCLE: - MACRO_NAND_CTL_CLRCLE((unsigned long)CFG_NAND0_PADDR); - break; - case NAND_CTL_SETALE: - MACRO_NAND_CTL_SETALE((unsigned long)CFG_NAND0_PADDR); - break; - case NAND_CTL_CLRALE: - MACRO_NAND_CTL_CLRALE((unsigned long)CFG_NAND0_PADDR); - break; - case NAND_CTL_SETNCE: + switch(cmd) { + + case NAND_CTL_SETCLE: + MACRO_NAND_CTL_SETCLE((unsigned long)CFG_NAND0_PADDR); + break; + case NAND_CTL_CLRCLE: + MACRO_NAND_CTL_CLRCLE((unsigned long)CFG_NAND0_PADDR); + break; + case NAND_CTL_SETALE: + MACRO_NAND_CTL_SETALE((unsigned long)CFG_NAND0_PADDR); + break; + case NAND_CTL_CLRALE: + MACRO_NAND_CTL_CLRALE((unsigned long)CFG_NAND0_PADDR); + break; + case NAND_CTL_SETNCE: MACRO_NAND_ENABLE_CE((unsigned long)CFG_NAND0_PADDR); - break; - case NAND_CTL_CLRNCE: + break; + case NAND_CTL_CLRNCE: MACRO_NAND_DISABLE_CE((unsigned long)CFG_NAND0_PADDR); - break; - } + break; } - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); } -static void ppchameleonevb_hwcontrol(struct mtd_info *mtdinfo, int cmd, - unsigned int ctrl) +static void ppchameleonevb_hwcontrol(struct mtd_info *mtdinfo, int cmd) { - struct nand_chip *chip = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { -#error Missing headerfiles. No way to fix this. -tglx - switch (cmd) { - case NAND_CTL_SETCLE: - MACRO_NAND_CTL_SETCLE((unsigned long)CFG_NAND1_PADDR); - break; - case NAND_CTL_CLRCLE: - MACRO_NAND_CTL_CLRCLE((unsigned long)CFG_NAND1_PADDR); - break; - case NAND_CTL_SETALE: - MACRO_NAND_CTL_SETALE((unsigned long)CFG_NAND1_PADDR); - break; - case NAND_CTL_CLRALE: - MACRO_NAND_CTL_CLRALE((unsigned long)CFG_NAND1_PADDR); - break; - case NAND_CTL_SETNCE: - MACRO_NAND_ENABLE_CE((unsigned long)CFG_NAND1_PADDR); - break; - case NAND_CTL_CLRNCE: - MACRO_NAND_DISABLE_CE((unsigned long)CFG_NAND1_PADDR); - break; - } + switch(cmd) { + + case NAND_CTL_SETCLE: + MACRO_NAND_CTL_SETCLE((unsigned long)CFG_NAND1_PADDR); + break; + case NAND_CTL_CLRCLE: + MACRO_NAND_CTL_CLRCLE((unsigned long)CFG_NAND1_PADDR); + break; + case NAND_CTL_SETALE: + MACRO_NAND_CTL_SETALE((unsigned long)CFG_NAND1_PADDR); + break; + case NAND_CTL_CLRALE: + MACRO_NAND_CTL_CLRALE((unsigned long)CFG_NAND1_PADDR); + break; + case NAND_CTL_SETNCE: + MACRO_NAND_ENABLE_CE((unsigned long)CFG_NAND1_PADDR); + break; + case NAND_CTL_CLRNCE: + MACRO_NAND_DISABLE_CE((unsigned long)CFG_NAND1_PADDR); + break; } - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); } #ifdef USE_READY_BUSY_PIN @@ -178,15 +164,15 @@ static void ppchameleonevb_hwcontrol(struct mtd_info *mtdinfo, int cmd, */ static int ppchameleon_device_ready(struct mtd_info *minfo) { - if (in_be32((volatile unsigned *)GPIO0_IR) & NAND_RB_GPIO_PIN) + if (in_be32((volatile unsigned*)GPIO0_IR) & NAND_RB_GPIO_PIN) return 1; return 0; } static int ppchameleonevb_device_ready(struct mtd_info *minfo) { - if (in_be32((volatile unsigned *)GPIO0_IR) & NAND_EVB_RB_GPIO_PIN) - return 1; + if (in_be32((volatile unsigned*)GPIO0_IR) & NAND_EVB_RB_GPIO_PIN) + return 1; return 0; } #endif @@ -199,7 +185,7 @@ const char *part_probes_evb[] = { "cmdlinepart", NULL }; /* * Main initialization routine */ -static int __init ppchameleonevb_init(void) +static int __init ppchameleonevb_init (void) { struct nand_chip *this; const char *part_type = 0; @@ -208,11 +194,13 @@ static int __init ppchameleonevb_init(void) void __iomem *ppchameleon_fio_base; void __iomem *ppchameleonevb_fio_base; + /********************************* * Processor module NAND (if any) * *********************************/ /* Allocate memory for MTD device structure and private data */ - ppchameleon_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + ppchameleon_mtd = kmalloc(sizeof(struct mtd_info) + + sizeof(struct nand_chip), GFP_KERNEL); if (!ppchameleon_mtd) { printk("Unable to allocate PPChameleon NAND MTD device structure.\n"); return -ENOMEM; @@ -220,65 +208,63 @@ static int __init ppchameleonevb_init(void) /* map physical address */ ppchameleon_fio_base = ioremap(ppchameleon_fio_pbase, SZ_4M); - if (!ppchameleon_fio_base) { + if(!ppchameleon_fio_base) { printk("ioremap PPChameleon NAND flash failed\n"); kfree(ppchameleon_mtd); return -EIO; } /* Get pointer to private data */ - this = (struct nand_chip *)(&ppchameleon_mtd[1]); + this = (struct nand_chip *) (&ppchameleon_mtd[1]); /* Initialize structures */ - memset(ppchameleon_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) ppchameleon_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ ppchameleon_mtd->priv = this; - ppchameleon_mtd->owner = THIS_MODULE; - /* Initialize GPIOs */ + /* Initialize GPIOs */ /* Pin mapping for NAND chip */ /* - CE GPIO_01 - CLE GPIO_02 - ALE GPIO_03 - R/B GPIO_04 - */ + CE GPIO_01 + CLE GPIO_02 + ALE GPIO_03 + R/B GPIO_04 + */ /* output select */ - out_be32((volatile unsigned *)GPIO0_OSRH, in_be32((volatile unsigned *)GPIO0_OSRH) & 0xC0FFFFFF); + out_be32((volatile unsigned*)GPIO0_OSRH, in_be32((volatile unsigned*)GPIO0_OSRH) & 0xC0FFFFFF); /* three-state select */ - out_be32((volatile unsigned *)GPIO0_TSRH, in_be32((volatile unsigned *)GPIO0_TSRH) & 0xC0FFFFFF); + out_be32((volatile unsigned*)GPIO0_TSRH, in_be32((volatile unsigned*)GPIO0_TSRH) & 0xC0FFFFFF); /* enable output driver */ - out_be32((volatile unsigned *)GPIO0_TCR, - in_be32((volatile unsigned *)GPIO0_TCR) | NAND_nCE_GPIO_PIN | NAND_CLE_GPIO_PIN | NAND_ALE_GPIO_PIN); + out_be32((volatile unsigned*)GPIO0_TCR, in_be32((volatile unsigned*)GPIO0_TCR) | NAND_nCE_GPIO_PIN | NAND_CLE_GPIO_PIN | NAND_ALE_GPIO_PIN); #ifdef USE_READY_BUSY_PIN /* three-state select */ - out_be32((volatile unsigned *)GPIO0_TSRH, in_be32((volatile unsigned *)GPIO0_TSRH) & 0xFF3FFFFF); + out_be32((volatile unsigned*)GPIO0_TSRH, in_be32((volatile unsigned*)GPIO0_TSRH) & 0xFF3FFFFF); /* high-impedecence */ - out_be32((volatile unsigned *)GPIO0_TCR, in_be32((volatile unsigned *)GPIO0_TCR) & (~NAND_RB_GPIO_PIN)); + out_be32((volatile unsigned*)GPIO0_TCR, in_be32((volatile unsigned*)GPIO0_TCR) & (~NAND_RB_GPIO_PIN)); /* input select */ - out_be32((volatile unsigned *)GPIO0_ISR1H, - (in_be32((volatile unsigned *)GPIO0_ISR1H) & 0xFF3FFFFF) | 0x00400000); + out_be32((volatile unsigned*)GPIO0_ISR1H, (in_be32((volatile unsigned*)GPIO0_ISR1H) & 0xFF3FFFFF) | 0x00400000); #endif /* insert callbacks */ this->IO_ADDR_R = ppchameleon_fio_base; this->IO_ADDR_W = ppchameleon_fio_base; - this->cmd_ctrl = ppchameleon_hwcontrol; + this->hwcontrol = ppchameleon_hwcontrol; #ifdef USE_READY_BUSY_PIN this->dev_ready = ppchameleon_device_ready; #endif this->chip_delay = NAND_BIG_DELAY_US; /* ECC mode */ - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; /* Scan to find existence of the device (it could not be mounted) */ - if (nand_scan(ppchameleon_mtd, 1)) { + if (nand_scan (ppchameleon_mtd, 1)) { iounmap((void *)ppchameleon_fio_base); - kfree(ppchameleon_mtd); + kfree (ppchameleon_mtd); goto nand_evb_init; } + #ifndef USE_READY_BUSY_PIN /* Adjust delay if necessary */ if (ppchameleon_mtd->size == NAND_SMALL_SIZE) @@ -289,11 +275,12 @@ static int __init ppchameleonevb_init(void) ppchameleon_mtd->name = "ppchameleon-nand"; mtd_parts_nb = parse_mtd_partitions(ppchameleon_mtd, part_probes, &mtd_parts, 0); if (mtd_parts_nb > 0) - part_type = "command line"; + part_type = "command line"; else - mtd_parts_nb = 0; + mtd_parts_nb = 0; #endif - if (mtd_parts_nb == 0) { + if (mtd_parts_nb == 0) + { if (ppchameleon_mtd->size == NAND_SMALL_SIZE) mtd_parts = partition_info_me; else @@ -306,12 +293,13 @@ static int __init ppchameleonevb_init(void) printk(KERN_NOTICE "Using %s partition definition\n", part_type); add_mtd_partitions(ppchameleon_mtd, mtd_parts, mtd_parts_nb); - nand_evb_init: +nand_evb_init: /**************************** * EVB NAND (always present) * ****************************/ /* Allocate memory for MTD device structure and private data */ - ppchameleonevb_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + ppchameleonevb_mtd = kmalloc(sizeof(struct mtd_info) + + sizeof(struct nand_chip), GFP_KERNEL); if (!ppchameleonevb_mtd) { printk("Unable to allocate PPChameleonEVB NAND MTD device structure.\n"); return -ENOMEM; @@ -319,76 +307,77 @@ static int __init ppchameleonevb_init(void) /* map physical address */ ppchameleonevb_fio_base = ioremap(ppchameleonevb_fio_pbase, SZ_4M); - if (!ppchameleonevb_fio_base) { + if(!ppchameleonevb_fio_base) { printk("ioremap PPChameleonEVB NAND flash failed\n"); kfree(ppchameleonevb_mtd); return -EIO; } /* Get pointer to private data */ - this = (struct nand_chip *)(&ppchameleonevb_mtd[1]); + this = (struct nand_chip *) (&ppchameleonevb_mtd[1]); /* Initialize structures */ - memset(ppchameleonevb_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) ppchameleonevb_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ ppchameleonevb_mtd->priv = this; - /* Initialize GPIOs */ + /* Initialize GPIOs */ /* Pin mapping for NAND chip */ /* - CE GPIO_14 - CLE GPIO_15 - ALE GPIO_16 - R/B GPIO_31 - */ + CE GPIO_14 + CLE GPIO_15 + ALE GPIO_16 + R/B GPIO_31 + */ /* output select */ - out_be32((volatile unsigned *)GPIO0_OSRH, in_be32((volatile unsigned *)GPIO0_OSRH) & 0xFFFFFFF0); - out_be32((volatile unsigned *)GPIO0_OSRL, in_be32((volatile unsigned *)GPIO0_OSRL) & 0x3FFFFFFF); + out_be32((volatile unsigned*)GPIO0_OSRH, in_be32((volatile unsigned*)GPIO0_OSRH) & 0xFFFFFFF0); + out_be32((volatile unsigned*)GPIO0_OSRL, in_be32((volatile unsigned*)GPIO0_OSRL) & 0x3FFFFFFF); /* three-state select */ - out_be32((volatile unsigned *)GPIO0_TSRH, in_be32((volatile unsigned *)GPIO0_TSRH) & 0xFFFFFFF0); - out_be32((volatile unsigned *)GPIO0_TSRL, in_be32((volatile unsigned *)GPIO0_TSRL) & 0x3FFFFFFF); + out_be32((volatile unsigned*)GPIO0_TSRH, in_be32((volatile unsigned*)GPIO0_TSRH) & 0xFFFFFFF0); + out_be32((volatile unsigned*)GPIO0_TSRL, in_be32((volatile unsigned*)GPIO0_TSRL) & 0x3FFFFFFF); /* enable output driver */ - out_be32((volatile unsigned *)GPIO0_TCR, in_be32((volatile unsigned *)GPIO0_TCR) | NAND_EVB_nCE_GPIO_PIN | + out_be32((volatile unsigned*)GPIO0_TCR, in_be32((volatile unsigned*)GPIO0_TCR) | NAND_EVB_nCE_GPIO_PIN | NAND_EVB_CLE_GPIO_PIN | NAND_EVB_ALE_GPIO_PIN); #ifdef USE_READY_BUSY_PIN /* three-state select */ - out_be32((volatile unsigned *)GPIO0_TSRL, in_be32((volatile unsigned *)GPIO0_TSRL) & 0xFFFFFFFC); + out_be32((volatile unsigned*)GPIO0_TSRL, in_be32((volatile unsigned*)GPIO0_TSRL) & 0xFFFFFFFC); /* high-impedecence */ - out_be32((volatile unsigned *)GPIO0_TCR, in_be32((volatile unsigned *)GPIO0_TCR) & (~NAND_EVB_RB_GPIO_PIN)); + out_be32((volatile unsigned*)GPIO0_TCR, in_be32((volatile unsigned*)GPIO0_TCR) & (~NAND_EVB_RB_GPIO_PIN)); /* input select */ - out_be32((volatile unsigned *)GPIO0_ISR1L, - (in_be32((volatile unsigned *)GPIO0_ISR1L) & 0xFFFFFFFC) | 0x00000001); + out_be32((volatile unsigned*)GPIO0_ISR1L, (in_be32((volatile unsigned*)GPIO0_ISR1L) & 0xFFFFFFFC) | 0x00000001); #endif /* insert callbacks */ this->IO_ADDR_R = ppchameleonevb_fio_base; this->IO_ADDR_W = ppchameleonevb_fio_base; - this->cmd_ctrl = ppchameleonevb_hwcontrol; + this->hwcontrol = ppchameleonevb_hwcontrol; #ifdef USE_READY_BUSY_PIN this->dev_ready = ppchameleonevb_device_ready; #endif this->chip_delay = NAND_SMALL_DELAY_US; /* ECC mode */ - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; /* Scan to find existence of the device */ - if (nand_scan(ppchameleonevb_mtd, 1)) { + if (nand_scan (ppchameleonevb_mtd, 1)) { iounmap((void *)ppchameleonevb_fio_base); - kfree(ppchameleonevb_mtd); + kfree (ppchameleonevb_mtd); return -ENXIO; } + #ifdef CONFIG_MTD_PARTITIONS ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME; mtd_parts_nb = parse_mtd_partitions(ppchameleonevb_mtd, part_probes_evb, &mtd_parts, 0); if (mtd_parts_nb > 0) - part_type = "command line"; + part_type = "command line"; else - mtd_parts_nb = 0; + mtd_parts_nb = 0; #endif - if (mtd_parts_nb == 0) { + if (mtd_parts_nb == 0) + { mtd_parts = partition_info_evb; mtd_parts_nb = NUM_PARTITIONS; part_type = "static"; @@ -401,19 +390,18 @@ static int __init ppchameleonevb_init(void) /* Return happy */ return 0; } - module_init(ppchameleonevb_init); /* * Clean up routine */ -static void __exit ppchameleonevb_cleanup(void) +static void __exit ppchameleonevb_cleanup (void) { struct nand_chip *this; /* Release resources, unregister device(s) */ - nand_release(ppchameleon_mtd); - nand_release(ppchameleonevb_mtd); + nand_release (ppchameleon_mtd); + nand_release (ppchameleonevb_mtd); /* Release iomaps */ this = (struct nand_chip *) &ppchameleon_mtd[1]; diff --git a/drivers/mtd/nand/rtc_from4.c b/drivers/mtd/nand/rtc_from4.c index f8c496453..4129c03df 100644 --- a/drivers/mtd/nand/rtc_from4.c +++ b/drivers/mtd/nand/rtc_from4.c @@ -97,12 +97,12 @@ static struct mtd_info *rtc_from4_mtd = NULL; static void __iomem *rtc_from4_fio_base = (void *)P2SEGADDR(RTC_FROM4_FIO_BASE); static const struct mtd_partition partition_info[] = { - { - .name = "Renesas flash partition 1", - .offset = 0, - .size = MTDPART_SIZ_FULL}, + { + .name = "Renesas flash partition 1", + .offset = 0, + .size = MTDPART_SIZ_FULL + }, }; - #define NUM_PARTITIONS 1 /* @@ -111,8 +111,8 @@ static const struct mtd_partition partition_info[] = { * NAND_BBT_CREATE and/or NAND_BBT_WRITE * */ -static uint8_t bbt_pattern[] = { 'B', 'b', 't', '0' }; -static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' }; +static uint8_t bbt_pattern[] = {'B', 'b', 't', '0' }; +static uint8_t mirror_pattern[] = {'1', 't', 'b', 'B' }; static struct nand_bbt_descr rtc_from4_bbt_main_descr = { .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE @@ -134,6 +134,8 @@ static struct nand_bbt_descr rtc_from4_bbt_mirror_descr = { .pattern = mirror_pattern }; + + #ifdef RTC_FROM4_HWECC /* the Reed Solomon control structure */ @@ -142,14 +144,15 @@ static struct rs_control *rs_decoder; /* * hardware specific Out Of Band information */ -static struct nand_ecclayout rtc_from4_nand_oobinfo = { +static struct nand_oobinfo rtc_from4_nand_oobinfo = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 32, .eccpos = { - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31}, - .oobfree = {{32, 32}} + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31}, + .oobfree = { {32, 32} } }; /* Aargh. I missed the reversed bit order, when I @@ -159,42 +162,44 @@ static struct nand_ecclayout rtc_from4_nand_oobinfo = { * of the ecc byte which we get from the FPGA */ static uint8_t revbits[256] = { - 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, - 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, - 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, - 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, - 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, - 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, - 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, - 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, - 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, - 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, - 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, - 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, - 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, - 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, - 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, - 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, - 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, - 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, - 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, - 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, - 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, - 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, - 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, - 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, - 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, - 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, - 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, - 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, - 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, - 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, - 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, - 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, + 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, + 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, + 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, + 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, + 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, + 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, + 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, + 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, + 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, + 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, + 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, + 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, + 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, + 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, + 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, + 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, }; #endif + + /* * rtc_from4_hwcontrol - hardware specific access to control-lines * @mtd: MTD device structure @@ -207,20 +212,35 @@ static uint8_t revbits[256] = { * Address lines (A24-A22), so no action is required here. * */ -static void rtc_from4_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void rtc_from4_hwcontrol(struct mtd_info *mtd, int cmd) { - struct nand_chip *chip = (mtd->priv); + struct nand_chip* this = (struct nand_chip *) (mtd->priv); + + switch(cmd) { - if (cmd == NAND_CMD_NONE) - return; + case NAND_CTL_SETCLE: + this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W | RTC_FROM4_CLE); + break; + case NAND_CTL_CLRCLE: + this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W & ~RTC_FROM4_CLE); + break; + + case NAND_CTL_SETALE: + this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W | RTC_FROM4_ALE); + break; + case NAND_CTL_CLRALE: + this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W & ~RTC_FROM4_ALE); + break; - if (ctrl & NAND_CLE) - writeb(cmd, chip->IO_ADDR_W | RTC_FROM4_CLE); - else - writeb(cmd, chip->IO_ADDR_W | RTC_FROM4_ALE); + case NAND_CTL_SETNCE: + break; + case NAND_CTL_CLRNCE: + break; + + } } + /* * rtc_from4_nand_select_chip - hardware specific chip select * @mtd: MTD device structure @@ -232,25 +252,26 @@ static void rtc_from4_hwcontrol(struct mtd_info *mtd, int cmd, */ static void rtc_from4_nand_select_chip(struct mtd_info *mtd, int chip) { - struct nand_chip *this = mtd->priv; + struct nand_chip *this = mtd->priv; this->IO_ADDR_R = (void __iomem *)((unsigned long)this->IO_ADDR_R & ~RTC_FROM4_NAND_ADDR_MASK); this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W & ~RTC_FROM4_NAND_ADDR_MASK); - switch (chip) { + switch(chip) { - case 0: /* select slot 3 chip */ + case 0: /* select slot 3 chip */ this->IO_ADDR_R = (void __iomem *)((unsigned long)this->IO_ADDR_R | RTC_FROM4_NAND_ADDR_SLOT3); this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W | RTC_FROM4_NAND_ADDR_SLOT3); - break; - case 1: /* select slot 4 chip */ + break; + case 1: /* select slot 4 chip */ this->IO_ADDR_R = (void __iomem *)((unsigned long)this->IO_ADDR_R | RTC_FROM4_NAND_ADDR_SLOT4); this->IO_ADDR_W = (void __iomem *)((unsigned long)this->IO_ADDR_W | RTC_FROM4_NAND_ADDR_SLOT4); - break; + break; - } + } } + /* * rtc_from4_nand_device_ready - hardware specific ready/busy check * @mtd: MTD device structure @@ -269,6 +290,7 @@ static int rtc_from4_nand_device_ready(struct mtd_info *mtd) } + /* * deplete - code to perform device recovery in case there was a power loss * @mtd: MTD device structure @@ -284,23 +306,24 @@ static int rtc_from4_nand_device_ready(struct mtd_info *mtd) */ static void deplete(struct mtd_info *mtd, int chip) { - struct nand_chip *this = mtd->priv; + struct nand_chip *this = mtd->priv; - /* wait until device is ready */ - while (!this->dev_ready(mtd)) ; + /* wait until device is ready */ + while (!this->dev_ready(mtd)); this->select_chip(mtd, chip); /* Send the commands for device recovery, phase 1 */ - this->cmdfunc(mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0000); - this->cmdfunc(mtd, NAND_CMD_DEPLETE2, -1, -1); + this->cmdfunc (mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0000); + this->cmdfunc (mtd, NAND_CMD_DEPLETE2, -1, -1); /* Send the commands for device recovery, phase 2 */ - this->cmdfunc(mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0004); - this->cmdfunc(mtd, NAND_CMD_DEPLETE2, -1, -1); + this->cmdfunc (mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0004); + this->cmdfunc (mtd, NAND_CMD_DEPLETE2, -1, -1); } + #ifdef RTC_FROM4_HWECC /* * rtc_from4_enable_hwecc - hardware specific hardware ECC enable function @@ -312,35 +335,39 @@ static void deplete(struct mtd_info *mtd, int chip) */ static void rtc_from4_enable_hwecc(struct mtd_info *mtd, int mode) { - volatile unsigned short *rs_ecc_ctl = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC_CTL); + volatile unsigned short * rs_ecc_ctl = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC_CTL); unsigned short status; switch (mode) { - case NAND_ECC_READ: - status = RTC_FROM4_RS_ECC_CTL_CLR | RTC_FROM4_RS_ECC_CTL_FD_E; + case NAND_ECC_READ : + status = RTC_FROM4_RS_ECC_CTL_CLR + | RTC_FROM4_RS_ECC_CTL_FD_E; *rs_ecc_ctl = status; break; - case NAND_ECC_READSYN: - status = 0x00; + case NAND_ECC_READSYN : + status = 0x00; *rs_ecc_ctl = status; break; - case NAND_ECC_WRITE: - status = RTC_FROM4_RS_ECC_CTL_CLR | RTC_FROM4_RS_ECC_CTL_GEN | RTC_FROM4_RS_ECC_CTL_FD_E; + case NAND_ECC_WRITE : + status = RTC_FROM4_RS_ECC_CTL_CLR + | RTC_FROM4_RS_ECC_CTL_GEN + | RTC_FROM4_RS_ECC_CTL_FD_E; *rs_ecc_ctl = status; break; - default: + default: BUG(); break; } } + /* * rtc_from4_calculate_ecc - hardware specific code to read ECC code * @mtd: MTD device structure @@ -356,7 +383,7 @@ static void rtc_from4_enable_hwecc(struct mtd_info *mtd, int mode) */ static void rtc_from4_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) { - volatile unsigned short *rs_eccn = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECCN); + volatile unsigned short * rs_eccn = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECCN); unsigned short value; int i; @@ -368,6 +395,7 @@ static void rtc_from4_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_c ecc_code[7] |= 0x0f; /* set the last four bits (not used) */ } + /* * rtc_from4_correct_data - hardware specific code to correct data using ECC code * @mtd: MTD device structure @@ -386,7 +414,7 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha unsigned short status; uint16_t par[6], syn[6]; uint8_t ecc[8]; - volatile unsigned short *rs_ecc; + volatile unsigned short *rs_ecc; status = *((volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC_CHK)); @@ -396,18 +424,23 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha /* Read the syndrom pattern from the FPGA and correct the bitorder */ rs_ecc = (volatile unsigned short *)(rtc_from4_fio_base + RTC_FROM4_RS_ECC); - for (i = 0; i < 8; i++) { - ecc[i] = revbits[(*rs_ecc) & 0xFF]; - rs_ecc++; - } + for (i = 0; i < 8; i++) { + ecc[i] = revbits[(*rs_ecc) & 0xFF]; + rs_ecc++; + } /* convert into 6 10bit syndrome fields */ - par[5] = rs_decoder->index_of[(((uint16_t) ecc[0] >> 0) & 0x0ff) | (((uint16_t) ecc[1] << 8) & 0x300)]; - par[4] = rs_decoder->index_of[(((uint16_t) ecc[1] >> 2) & 0x03f) | (((uint16_t) ecc[2] << 6) & 0x3c0)]; - par[3] = rs_decoder->index_of[(((uint16_t) ecc[2] >> 4) & 0x00f) | (((uint16_t) ecc[3] << 4) & 0x3f0)]; - par[2] = rs_decoder->index_of[(((uint16_t) ecc[3] >> 6) & 0x003) | (((uint16_t) ecc[4] << 2) & 0x3fc)]; - par[1] = rs_decoder->index_of[(((uint16_t) ecc[5] >> 0) & 0x0ff) | (((uint16_t) ecc[6] << 8) & 0x300)]; - par[0] = (((uint16_t) ecc[6] >> 2) & 0x03f) | (((uint16_t) ecc[7] << 6) & 0x3c0); + par[5] = rs_decoder->index_of[(((uint16_t)ecc[0] >> 0) & 0x0ff) | + (((uint16_t)ecc[1] << 8) & 0x300)]; + par[4] = rs_decoder->index_of[(((uint16_t)ecc[1] >> 2) & 0x03f) | + (((uint16_t)ecc[2] << 6) & 0x3c0)]; + par[3] = rs_decoder->index_of[(((uint16_t)ecc[2] >> 4) & 0x00f) | + (((uint16_t)ecc[3] << 4) & 0x3f0)]; + par[2] = rs_decoder->index_of[(((uint16_t)ecc[3] >> 6) & 0x003) | + (((uint16_t)ecc[4] << 2) & 0x3fc)]; + par[1] = rs_decoder->index_of[(((uint16_t)ecc[5] >> 0) & 0x0ff) | + (((uint16_t)ecc[6] << 8) & 0x300)]; + par[0] = (((uint16_t)ecc[6] >> 2) & 0x03f) | (((uint16_t)ecc[7] << 6) & 0x3c0); /* Convert to computable syndrome */ for (i = 0; i < 6; i++) { @@ -420,14 +453,16 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha syn[i] = rs_decoder->index_of[syn[i]]; } - /* Let the library code do its magic. */ - res = decode_rs8(rs_decoder, (uint8_t *) buf, par, 512, syn, 0, NULL, 0xff, NULL); + /* Let the library code do its magic.*/ + res = decode_rs8(rs_decoder, (uint8_t *)buf, par, 512, syn, 0, NULL, 0xff, NULL); if (res > 0) { - DEBUG(MTD_DEBUG_LEVEL0, "rtc_from4_correct_data: " "ECC corrected %d errors on read\n", res); + DEBUG (MTD_DEBUG_LEVEL0, "rtc_from4_correct_data: " + "ECC corrected %d errors on read\n", res); } return res; } + /** * rtc_from4_errstat - perform additional error status checks * @mtd: MTD device structure @@ -443,66 +478,54 @@ static int rtc_from4_correct_data(struct mtd_info *mtd, const u_char *buf, u_cha * note: see pages 34..37 of data sheet for details. * */ -static int rtc_from4_errstat(struct mtd_info *mtd, struct nand_chip *this, - int state, int status, int page) +static int rtc_from4_errstat(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page) { - int er_stat = 0; - int rtn, retlen; - size_t len; + int er_stat=0; + int rtn, retlen; + size_t len; uint8_t *buf; - int i; - - this->cmdfunc(mtd, NAND_CMD_STATUS_CLEAR, -1, -1); - - if (state == FL_ERASING) { - - for (i = 0; i < 4; i++) { - if (!(status & 1 << (i + 1))) - continue; - this->cmdfunc(mtd, (NAND_CMD_STATUS_ERROR + i + 1), - -1, -1); - rtn = this->read_byte(mtd); - this->cmdfunc(mtd, NAND_CMD_STATUS_RESET, -1, -1); - - /* err_ecc_not_avail */ - if (!(rtn & ERR_STAT_ECC_AVAILABLE)) - er_stat |= 1 << (i + 1); + int i; + + this->cmdfunc (mtd, NAND_CMD_STATUS_CLEAR, -1, -1); + + if (state == FL_ERASING) { + for (i=0; i<4; i++) { + if (status & 1<<(i+1)) { + this->cmdfunc (mtd, (NAND_CMD_STATUS_ERROR + i + 1), -1, -1); + rtn = this->read_byte(mtd); + this->cmdfunc (mtd, NAND_CMD_STATUS_RESET, -1, -1); + if (!(rtn & ERR_STAT_ECC_AVAILABLE)) { + er_stat |= 1<<(i+1); /* err_ecc_not_avail */ + } + } } - } else if (state == FL_WRITING) { - - unsigned long corrected = mtd->ecc_stats.corrected; - /* single bank write logic */ - this->cmdfunc(mtd, NAND_CMD_STATUS_ERROR, -1, -1); + this->cmdfunc (mtd, NAND_CMD_STATUS_ERROR, -1, -1); rtn = this->read_byte(mtd); - this->cmdfunc(mtd, NAND_CMD_STATUS_RESET, -1, -1); - + this->cmdfunc (mtd, NAND_CMD_STATUS_RESET, -1, -1); if (!(rtn & ERR_STAT_ECC_AVAILABLE)) { - /* err_ecc_not_avail */ - er_stat |= 1 << 1; - goto out; - } - - len = mtd->writesize; - buf = kmalloc(len, GFP_KERNEL); - if (!buf) { - printk(KERN_ERR "rtc_from4_errstat: Out of memory!\n"); - er_stat = 1; - goto out; + er_stat |= 1<<1; /* err_ecc_not_avail */ + } else { + len = mtd->oobblock; + buf = kmalloc (len, GFP_KERNEL); + if (!buf) { + printk (KERN_ERR "rtc_from4_errstat: Out of memory!\n"); + er_stat = 1; /* if we can't check, assume failed */ + } else { + /* recovery read */ + /* page read */ + rtn = nand_do_read_ecc (mtd, page, len, &retlen, buf, NULL, this->autooob, 1); + if (rtn) { /* if read failed or > 1-bit error corrected */ + er_stat |= 1<<1; /* ECC read failed */ + } + kfree(buf); + } } - - /* recovery read */ - rtn = nand_do_read(mtd, page, len, &retlen, buf); - - /* if read failed or > 1-bit error corrected */ - if (rtn || (mtd->ecc_stats.corrected - corrected) > 1) { - er_stat |= 1 << 1; - kfree(buf); } rtn = status; - if (er_stat == 0) { /* if ECC is available */ + if (er_stat == 0) { /* if ECC is available */ rtn = (status & ~NAND_STATUS_FAIL); /* clear the error bit */ } @@ -510,32 +533,33 @@ static int rtc_from4_errstat(struct mtd_info *mtd, struct nand_chip *this, } #endif + /* * Main initialization routine */ -static int __init rtc_from4_init(void) +int __init rtc_from4_init (void) { struct nand_chip *this; unsigned short bcr1, bcr2, wcr2; int i; /* Allocate memory for MTD device structure and private data */ - rtc_from4_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + rtc_from4_mtd = kmalloc(sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); if (!rtc_from4_mtd) { - printk("Unable to allocate Renesas NAND MTD device structure.\n"); + printk ("Unable to allocate Renesas NAND MTD device structure.\n"); return -ENOMEM; } /* Get pointer to private data */ - this = (struct nand_chip *)(&rtc_from4_mtd[1]); + this = (struct nand_chip *) (&rtc_from4_mtd[1]); /* Initialize structures */ - memset(rtc_from4_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) rtc_from4_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ rtc_from4_mtd->priv = this; - rtc_from4_mtd->owner = THIS_MODULE; /* set area 5 as PCMCIA mode to clear the spec of tDH(Data hold time;9ns min) */ bcr1 = *SH77X9_BCR1 & ~0x0002; @@ -556,9 +580,9 @@ static int __init rtc_from4_init(void) this->IO_ADDR_R = rtc_from4_fio_base; this->IO_ADDR_W = rtc_from4_fio_base; /* Set address of hardware control function */ - this->cmd_ctrl = rtc_from4_hwcontrol; + this->hwcontrol = rtc_from4_hwcontrol; /* Set address of chip select function */ - this->select_chip = rtc_from4_nand_select_chip; + this->select_chip = rtc_from4_nand_select_chip; /* command delay time (in us) */ this->chip_delay = 100; /* return the status of the Ready/Busy line */ @@ -567,20 +591,19 @@ static int __init rtc_from4_init(void) #ifdef RTC_FROM4_HWECC printk(KERN_INFO "rtc_from4_init: using hardware ECC detection.\n"); - this->ecc.mode = NAND_ECC_HW_SYNDROME; - this->ecc.size = 512; - this->ecc.bytes = 8; + this->eccmode = NAND_ECC_HW8_512; + this->options |= NAND_HWECC_SYNDROME; /* return the status of extra status and ECC checks */ this->errstat = rtc_from4_errstat; /* set the nand_oobinfo to support FPGA H/W error detection */ - this->ecc.layout = &rtc_from4_nand_oobinfo; - this->ecc.hwctl = rtc_from4_enable_hwecc; - this->ecc.calculate = rtc_from4_calculate_ecc; - this->ecc.correct = rtc_from4_correct_data; + this->autooob = &rtc_from4_nand_oobinfo; + this->enable_hwecc = rtc_from4_enable_hwecc; + this->calculate_ecc = rtc_from4_calculate_ecc; + this->correct_data = rtc_from4_correct_data; #else printk(KERN_INFO "rtc_from4_init: using software ECC detection.\n"); - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; #endif /* set the bad block tables to support debugging */ @@ -594,7 +617,7 @@ static int __init rtc_from4_init(void) } /* Perform 'device recovery' for each chip in case there was a power loss. */ - for (i = 0; i < this->numchips; i++) { + for (i=0; i < this->numchips; i++) { deplete(rtc_from4_mtd, i); } @@ -620,7 +643,7 @@ static int __init rtc_from4_init(void) */ rs_decoder = init_rs(10, 0x409, 0, 1, 6); if (!rs_decoder) { - printk(KERN_ERR "Could not create a RS decoder\n"); + printk (KERN_ERR "Could not create a RS decoder\n"); nand_release(rtc_from4_mtd); kfree(rtc_from4_mtd); return -ENOMEM; @@ -629,19 +652,20 @@ static int __init rtc_from4_init(void) /* Return happy */ return 0; } - module_init(rtc_from4_init); + /* * Clean up routine */ -static void __exit rtc_from4_cleanup(void) +#ifdef MODULE +static void __exit rtc_from4_cleanup (void) { /* Release resource, unregister partitions */ nand_release(rtc_from4_mtd); /* Free the MTD device structure */ - kfree(rtc_from4_mtd); + kfree (rtc_from4_mtd); #ifdef RTC_FROM4_HWECC /* Free the reed solomon resources */ @@ -650,9 +674,10 @@ static void __exit rtc_from4_cleanup(void) } #endif } - module_exit(rtc_from4_cleanup); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("d.marlin +#include + #ifdef CONFIG_MTD_NAND_S3C2410_DEBUG #define DEBUG #endif @@ -63,26 +65,22 @@ #include #include +#define PFX "s3c2410-nand: " + #ifdef CONFIG_MTD_NAND_S3C2410_HWECC static int hardware_ecc = 1; #else static int hardware_ecc = 0; #endif -#ifdef CONFIG_MTD_NAND_S3C2410_CLKSTOP -static int clock_stop = 1; -#else -static const int clock_stop = 0; -#endif - - /* new oob placement block for use with hardware ecc generation */ -static struct nand_ecclayout nand_hw_eccoob = { - .eccbytes = 3, - .eccpos = {0, 1, 2}, - .oobfree = {{8, 8}} +static struct nand_oobinfo nand_hw_eccoob = { + .useecc = MTD_NANDECC_AUTOPLACE, + .eccbytes = 3, + .eccpos = {0, 1, 2 }, + .oobfree = { {8, 8} } }; /* controller and mtd information */ @@ -97,12 +95,6 @@ struct s3c2410_nand_mtd { int scan_res; }; -enum s3c_cpu_type { - TYPE_S3C2410, - TYPE_S3C2412, - TYPE_S3C2440, -}; - /* overview of the s3c2410 nand state */ struct s3c2410_nand_info { @@ -116,11 +108,9 @@ struct s3c2410_nand_info { struct resource *area; struct clk *clk; void __iomem *regs; - void __iomem *sel_reg; - int sel_bit; int mtd_count; - enum s3c_cpu_type cpu_type; + unsigned char is_s3c2440; }; /* conversion functions */ @@ -145,16 +135,11 @@ static struct s3c2410_platform_nand *to_nand_plat(struct platform_device *dev) return dev->dev.platform_data; } -static inline int allow_clk_stop(struct s3c2410_nand_info *info) -{ - return clock_stop; -} - /* timing calculations */ #define NS_IN_KHZ 1000000 -static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max) +static int s3c2410_nand_calc_rate(int wanted, unsigned long clk, int max) { int result; @@ -164,7 +149,8 @@ static int s3c_nand_calc_rate(int wanted, unsigned long clk, int max) pr_debug("result %d from %ld, %d\n", result, clk, wanted); if (result > max) { - printk("%d ns is too big for current clock rate %ld\n", wanted, clk); + printk("%d ns is too big for current clock rate %ld\n", + wanted, clk); return -1; } @@ -183,53 +169,46 @@ static int s3c2410_nand_inithw(struct s3c2410_nand_info *info, { struct s3c2410_platform_nand *plat = to_nand_plat(pdev); unsigned long clkrate = clk_get_rate(info->clk); - int tacls_max = (info->cpu_type == TYPE_S3C2412) ? 8 : 4; int tacls, twrph0, twrph1; - unsigned long cfg = 0; + unsigned long cfg; /* calculate the timing information for the controller */ clkrate /= 1000; /* turn clock into kHz for ease of use */ if (plat != NULL) { - tacls = s3c_nand_calc_rate(plat->tacls, clkrate, tacls_max); - twrph0 = s3c_nand_calc_rate(plat->twrph0, clkrate, 8); - twrph1 = s3c_nand_calc_rate(plat->twrph1, clkrate, 8); + tacls = s3c2410_nand_calc_rate(plat->tacls, clkrate, 4); + twrph0 = s3c2410_nand_calc_rate(plat->twrph0, clkrate, 8); + twrph1 = s3c2410_nand_calc_rate(plat->twrph1, clkrate, 8); } else { /* default timings */ - tacls = tacls_max; + tacls = 4; twrph0 = 8; twrph1 = 8; } if (tacls < 0 || twrph0 < 0 || twrph1 < 0) { - dev_err(info->device, "cannot get suitable timings\n"); + printk(KERN_ERR PFX "cannot get timings suitable for board\n"); return -EINVAL; } - dev_info(info->device, "Tacls=%d, %dns Twrph0=%d %dns, Twrph1=%d %dns\n", - tacls, to_ns(tacls, clkrate), twrph0, to_ns(twrph0, clkrate), twrph1, to_ns(twrph1, clkrate)); + printk(KERN_INFO PFX "Tacls=%d, %dns Twrph0=%d %dns, Twrph1=%d %dns\n", + tacls, to_ns(tacls, clkrate), + twrph0, to_ns(twrph0, clkrate), + twrph1, to_ns(twrph1, clkrate)); - switch (info->cpu_type) { - case TYPE_S3C2410: - cfg = S3C2410_NFCONF_EN; - cfg |= S3C2410_NFCONF_TACLS(tacls - 1); - cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); - cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); - break; - - case TYPE_S3C2440: - case TYPE_S3C2412: - cfg = S3C2440_NFCONF_TACLS(tacls - 1); - cfg |= S3C2440_NFCONF_TWRPH0(twrph0 - 1); - cfg |= S3C2440_NFCONF_TWRPH1(twrph1 - 1); - - /* enable the controller and de-assert nFCE */ - - writel(S3C2440_NFCONT_ENABLE, info->regs + S3C2440_NFCONT); + if (!info->is_s3c2440) { + cfg = S3C2410_NFCONF_EN; + cfg |= S3C2410_NFCONF_TACLS(tacls-1); + cfg |= S3C2410_NFCONF_TWRPH0(twrph0-1); + cfg |= S3C2410_NFCONF_TWRPH1(twrph1-1); + } else { + cfg = S3C2440_NFCONF_TACLS(tacls-1); + cfg |= S3C2440_NFCONF_TWRPH0(twrph0-1); + cfg |= S3C2440_NFCONF_TWRPH1(twrph1-1); } - dev_dbg(info->device, "NF_CONF is 0x%lx\n", cfg); + pr_debug(PFX "NF_CONF is 0x%lx\n", cfg); writel(cfg, info->regs + S3C2410_NFCONF); return 0; @@ -242,71 +221,99 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip) struct s3c2410_nand_info *info; struct s3c2410_nand_mtd *nmtd; struct nand_chip *this = mtd->priv; + void __iomem *reg; unsigned long cur; + unsigned long bit; nmtd = this->priv; info = nmtd->info; - if (chip != -1 && allow_clk_stop(info)) - clk_enable(info->clk); + bit = (info->is_s3c2440) ? S3C2440_NFCONT_nFCE : S3C2410_NFCONF_nFCE; + reg = info->regs+((info->is_s3c2440) ? S3C2440_NFCONT:S3C2410_NFCONF); - cur = readl(info->sel_reg); + cur = readl(reg); if (chip == -1) { - cur |= info->sel_bit; + cur |= bit; } else { if (nmtd->set != NULL && chip > nmtd->set->nr_chips) { - dev_err(info->device, "invalid chip %d\n", chip); + printk(KERN_ERR PFX "chip %d out of range\n", chip); return; } if (info->platform != NULL) { if (info->platform->select_chip != NULL) - (info->platform->select_chip) (nmtd->set, chip); + (info->platform->select_chip)(nmtd->set, chip); } - cur &= ~info->sel_bit; + cur &= ~bit; } - writel(cur, info->sel_reg); - - if (chip == -1 && allow_clk_stop(info)) - clk_disable(info->clk); + writel(cur, reg); } -/* s3c2410_nand_hwcontrol +/* command and control functions + * + * Note, these all use tglx's method of changing the IO_ADDR_W field + * to make the code simpler, and use the nand layer's code to issue the + * command and address sequences via the proper IO ports. * - * Issue command and address cycles to the chip */ -static void s3c2410_nand_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void s3c2410_nand_hwcontrol(struct mtd_info *mtd, int cmd) { struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); - - if (cmd == NAND_CMD_NONE) - return; - - if (ctrl & NAND_CLE) - writeb(cmd, info->regs + S3C2410_NFCMD); - else - writeb(cmd, info->regs + S3C2410_NFADDR); + struct nand_chip *chip = mtd->priv; + + switch (cmd) { + case NAND_CTL_SETNCE: + case NAND_CTL_CLRNCE: + printk(KERN_ERR "%s: called for NCE\n", __FUNCTION__); + break; + + case NAND_CTL_SETCLE: + chip->IO_ADDR_W = info->regs + S3C2410_NFCMD; + break; + + case NAND_CTL_SETALE: + chip->IO_ADDR_W = info->regs + S3C2410_NFADDR; + break; + + /* NAND_CTL_CLRCLE: */ + /* NAND_CTL_CLRALE: */ + default: + chip->IO_ADDR_W = info->regs + S3C2410_NFDATA; + break; + } } /* command and control functions */ -static void s3c2440_nand_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void s3c2440_nand_hwcontrol(struct mtd_info *mtd, int cmd) { struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); + struct nand_chip *chip = mtd->priv; - if (cmd == NAND_CMD_NONE) - return; + switch (cmd) { + case NAND_CTL_SETNCE: + case NAND_CTL_CLRNCE: + printk(KERN_ERR "%s: called for NCE\n", __FUNCTION__); + break; + + case NAND_CTL_SETCLE: + chip->IO_ADDR_W = info->regs + S3C2440_NFCMD; + break; + + case NAND_CTL_SETALE: + chip->IO_ADDR_W = info->regs + S3C2440_NFADDR; + break; - if (ctrl & NAND_CLE) - writeb(cmd, info->regs + S3C2440_NFCMD); - else - writeb(cmd, info->regs + S3C2440_NFADDR); + /* NAND_CTL_CLRCLE: */ + /* NAND_CTL_CLRALE: */ + default: + chip->IO_ADDR_W = info->regs + S3C2440_NFDATA; + break; + } } /* s3c2410_nand_devready() @@ -317,32 +324,28 @@ static void s3c2440_nand_hwcontrol(struct mtd_info *mtd, int cmd, static int s3c2410_nand_devready(struct mtd_info *mtd) { struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); - return readb(info->regs + S3C2410_NFSTAT) & S3C2410_NFSTAT_BUSY; -} -static int s3c2440_nand_devready(struct mtd_info *mtd) -{ - struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); - return readb(info->regs + S3C2440_NFSTAT) & S3C2440_NFSTAT_READY; + if (info->is_s3c2440) + return readb(info->regs + S3C2440_NFSTAT) & S3C2440_NFSTAT_READY; + return readb(info->regs + S3C2410_NFSTAT) & S3C2410_NFSTAT_BUSY; } -static int s3c2412_nand_devready(struct mtd_info *mtd) -{ - struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); - return readb(info->regs + S3C2412_NFSTAT) & S3C2412_NFSTAT_READY; -} /* ECC handling functions */ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) { - pr_debug("s3c2410_nand_correct_data(%p,%p,%p,%p)\n", mtd, dat, read_ecc, calc_ecc); + pr_debug("s3c2410_nand_correct_data(%p,%p,%p,%p)\n", + mtd, dat, read_ecc, calc_ecc); pr_debug("eccs: read %02x,%02x,%02x vs calc %02x,%02x,%02x\n", - read_ecc[0], read_ecc[1], read_ecc[2], calc_ecc[0], calc_ecc[1], calc_ecc[2]); + read_ecc[0], read_ecc[1], read_ecc[2], + calc_ecc[0], calc_ecc[1], calc_ecc[2]); - if (read_ecc[0] == calc_ecc[0] && read_ecc[1] == calc_ecc[1] && read_ecc[2] == calc_ecc[2]) + if (read_ecc[0] == calc_ecc[0] && + read_ecc[1] == calc_ecc[1] && + read_ecc[2] == calc_ecc[2]) return 0; /* we curently have no method for correcting the error */ @@ -375,7 +378,8 @@ static void s3c2440_nand_enable_hwecc(struct mtd_info *mtd, int mode) writel(ctrl | S3C2440_NFCONT_INITECC, info->regs + S3C2440_NFCONT); } -static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) +static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, + const u_char *dat, u_char *ecc_code) { struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); @@ -383,12 +387,15 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u ecc_code[1] = readb(info->regs + S3C2410_NFECC + 1); ecc_code[2] = readb(info->regs + S3C2410_NFECC + 2); - pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", ecc_code[0], ecc_code[1], ecc_code[2]); + pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", + ecc_code[0], ecc_code[1], ecc_code[2]); return 0; } -static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) + +static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, + const u_char *dat, u_char *ecc_code) { struct s3c2410_nand_info *info = s3c2410_nand_mtd_toinfo(mtd); unsigned long ecc = readl(info->regs + S3C2440_NFMECC0); @@ -397,11 +404,13 @@ static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u ecc_code[1] = ecc >> 8; ecc_code[2] = ecc >> 16; - pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", ecc_code[0], ecc_code[1], ecc_code[2]); + pr_debug("calculate_ecc: returning ecc %02x,%02x,%02x\n", + ecc_code[0], ecc_code[1], ecc_code[2]); return 0; } + /* over-ride the standard functions for a little more speed. We can * use read/write block to move the data buffers to/from the controller */ @@ -412,7 +421,8 @@ static void s3c2410_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) readsb(this->IO_ADDR_R, buf, len); } -static void s3c2410_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len) +static void s3c2410_nand_write_buf(struct mtd_info *mtd, + const u_char *buf, int len) { struct nand_chip *this = mtd->priv; writesb(this->IO_ADDR_W, buf, len); @@ -449,8 +459,7 @@ static int s3c2410_nand_remove(struct platform_device *pdev) /* free the common resources */ if (info->clk != NULL && !IS_ERR(info->clk)) { - if (!allow_clk_stop(info)) - clk_disable(info->clk); + clk_disable(info->clk); clk_put(info->clk); } @@ -479,7 +488,9 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, return add_mtd_device(&mtd->mtd); if (set->nr_partitions > 0 && set->partitions != NULL) { - return add_mtd_partitions(&mtd->mtd, set->partitions, set->nr_partitions); + return add_mtd_partitions(&mtd->mtd, + set->partitions, + set->nr_partitions); } return add_mtd_device(&mtd->mtd); @@ -503,8 +514,11 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, struct s3c2410_nand_set *set) { struct nand_chip *chip = &nmtd->chip; - void __iomem *regs = info->regs; + chip->IO_ADDR_R = info->regs + S3C2410_NFDATA; + chip->IO_ADDR_W = info->regs + S3C2410_NFDATA; + chip->hwcontrol = s3c2410_nand_hwcontrol; + chip->dev_ready = s3c2410_nand_devready; chip->write_buf = s3c2410_nand_write_buf; chip->read_buf = s3c2410_nand_read_buf; chip->select_chip = s3c2410_nand_select_chip; @@ -513,66 +527,29 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, chip->options = 0; chip->controller = &info->controller; - switch (info->cpu_type) { - case TYPE_S3C2410: - chip->IO_ADDR_W = regs + S3C2410_NFDATA; - info->sel_reg = regs + S3C2410_NFCONF; - info->sel_bit = S3C2410_NFCONF_nFCE; - chip->cmd_ctrl = s3c2410_nand_hwcontrol; - chip->dev_ready = s3c2410_nand_devready; - break; - - case TYPE_S3C2440: - chip->IO_ADDR_W = regs + S3C2440_NFDATA; - info->sel_reg = regs + S3C2440_NFCONT; - info->sel_bit = S3C2440_NFCONT_nFCE; - chip->cmd_ctrl = s3c2440_nand_hwcontrol; - chip->dev_ready = s3c2440_nand_devready; - break; - - case TYPE_S3C2412: - chip->IO_ADDR_W = regs + S3C2440_NFDATA; - info->sel_reg = regs + S3C2440_NFCONT; - info->sel_bit = S3C2412_NFCONT_nFCE0; - chip->cmd_ctrl = s3c2440_nand_hwcontrol; - chip->dev_ready = s3c2412_nand_devready; - - if (readl(regs + S3C2410_NFCONF) & S3C2412_NFCONF_NANDBOOT) - dev_info(info->device, "System booted from NAND\n"); - - break; - } - - chip->IO_ADDR_R = chip->IO_ADDR_W; + if (info->is_s3c2440) { + chip->IO_ADDR_R = info->regs + S3C2440_NFDATA; + chip->IO_ADDR_W = info->regs + S3C2440_NFDATA; + chip->hwcontrol = s3c2440_nand_hwcontrol; + } nmtd->info = info; nmtd->mtd.priv = chip; - nmtd->mtd.owner = THIS_MODULE; nmtd->set = set; if (hardware_ecc) { - chip->ecc.calculate = s3c2410_nand_calculate_ecc; - chip->ecc.correct = s3c2410_nand_correct_data; - chip->ecc.mode = NAND_ECC_HW; - chip->ecc.size = 512; - chip->ecc.bytes = 3; - chip->ecc.layout = &nand_hw_eccoob; - - switch (info->cpu_type) { - case TYPE_S3C2410: - chip->ecc.hwctl = s3c2410_nand_enable_hwecc; - chip->ecc.calculate = s3c2410_nand_calculate_ecc; - break; - - case TYPE_S3C2412: - case TYPE_S3C2440: - chip->ecc.hwctl = s3c2440_nand_enable_hwecc; - chip->ecc.calculate = s3c2440_nand_calculate_ecc; - break; - + chip->correct_data = s3c2410_nand_correct_data; + chip->enable_hwecc = s3c2410_nand_enable_hwecc; + chip->calculate_ecc = s3c2410_nand_calculate_ecc; + chip->eccmode = NAND_ECC_HW3_512; + chip->autooob = &nand_hw_eccoob; + + if (info->is_s3c2440) { + chip->enable_hwecc = s3c2440_nand_enable_hwecc; + chip->calculate_ecc = s3c2440_nand_calculate_ecc; } } else { - chip->ecc.mode = NAND_ECC_SOFT; + chip->eccmode = NAND_ECC_SOFT; } } @@ -584,8 +561,7 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, * nand layer to look for devices */ -static int s3c24xx_nand_probe(struct platform_device *pdev, - enum s3c_cpu_type cpu_type) +static int s3c24xx_nand_probe(struct platform_device *pdev, int is_s3c2440) { struct s3c2410_platform_nand *plat = to_nand_plat(pdev); struct s3c2410_nand_info *info; @@ -640,7 +616,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, info->device = &pdev->dev; info->platform = plat; info->regs = ioremap(res->start, size); - info->cpu_type = cpu_type; + info->is_s3c2440 = is_s3c2440; if (info->regs == NULL) { dev_err(&pdev->dev, "cannot reserve register region\n"); @@ -678,11 +654,13 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, nmtd = info->mtds; for (setno = 0; setno < nr_sets; setno++, nmtd++) { - pr_debug("initialising set %d (%p, info %p)\n", setno, nmtd, info); + pr_debug("initialising set %d (%p, info %p)\n", + setno, nmtd, info); s3c2410_nand_init_chip(info, nmtd, sets); - nmtd->scan_res = nand_scan(&nmtd->mtd, (sets) ? sets->nr_chips : 1); + nmtd->scan_res = nand_scan(&nmtd->mtd, + (sets) ? sets->nr_chips : 1); if (nmtd->scan_res == 0) { s3c2410_nand_add_partition(info, nmtd, sets); @@ -692,11 +670,6 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, sets++; } - if (allow_clk_stop(info)) { - dev_info(&pdev->dev, "clock idle support enabled\n"); - clk_disable(info->clk); - } - pr_debug("initialised ok\n"); return 0; @@ -708,63 +681,21 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, return err; } -/* PM Support */ -#ifdef CONFIG_PM - -static int s3c24xx_nand_suspend(struct platform_device *dev, pm_message_t pm) -{ - struct s3c2410_nand_info *info = platform_get_drvdata(dev); - - if (info) { - if (!allow_clk_stop(info)) - clk_disable(info->clk); - } - - return 0; -} - -static int s3c24xx_nand_resume(struct platform_device *dev) -{ - struct s3c2410_nand_info *info = platform_get_drvdata(dev); - - if (info) { - clk_enable(info->clk); - s3c2410_nand_inithw(info, dev); - - if (allow_clk_stop(info)) - clk_disable(info->clk); - } - - return 0; -} - -#else -#define s3c24xx_nand_suspend NULL -#define s3c24xx_nand_resume NULL -#endif - /* driver device registration */ static int s3c2410_nand_probe(struct platform_device *dev) { - return s3c24xx_nand_probe(dev, TYPE_S3C2410); + return s3c24xx_nand_probe(dev, 0); } static int s3c2440_nand_probe(struct platform_device *dev) { - return s3c24xx_nand_probe(dev, TYPE_S3C2440); -} - -static int s3c2412_nand_probe(struct platform_device *dev) -{ - return s3c24xx_nand_probe(dev, TYPE_S3C2412); + return s3c24xx_nand_probe(dev, 1); } static struct platform_driver s3c2410_nand_driver = { .probe = s3c2410_nand_probe, .remove = s3c2410_nand_remove, - .suspend = s3c24xx_nand_suspend, - .resume = s3c24xx_nand_resume, .driver = { .name = "s3c2410-nand", .owner = THIS_MODULE, @@ -774,37 +705,22 @@ static struct platform_driver s3c2410_nand_driver = { static struct platform_driver s3c2440_nand_driver = { .probe = s3c2440_nand_probe, .remove = s3c2410_nand_remove, - .suspend = s3c24xx_nand_suspend, - .resume = s3c24xx_nand_resume, .driver = { .name = "s3c2440-nand", .owner = THIS_MODULE, }, }; -static struct platform_driver s3c2412_nand_driver = { - .probe = s3c2412_nand_probe, - .remove = s3c2410_nand_remove, - .suspend = s3c24xx_nand_suspend, - .resume = s3c24xx_nand_resume, - .driver = { - .name = "s3c2412-nand", - .owner = THIS_MODULE, - }, -}; - static int __init s3c2410_nand_init(void) { printk("S3C24XX NAND Driver, (c) 2004 Simtec Electronics\n"); - platform_driver_register(&s3c2412_nand_driver); platform_driver_register(&s3c2440_nand_driver); return platform_driver_register(&s3c2410_nand_driver); } static void __exit s3c2410_nand_exit(void) { - platform_driver_unregister(&s3c2412_nand_driver); platform_driver_unregister(&s3c2440_nand_driver); platform_driver_unregister(&s3c2410_nand_driver); } diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index 51c7288ab..1924a4f13 100755 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c @@ -46,6 +46,7 @@ static int sharpsl_phys_base = 0x0C000000; #define FLCLE (1 << 1) #define FLCE0 (1 << 0) + /* * MTD structure for SharpSL */ @@ -59,47 +60,50 @@ static struct mtd_info *sharpsl_mtd = NULL; static int nr_partitions; static struct mtd_partition sharpsl_nand_default_partition_info[] = { { - .name = "System Area", - .offset = 0, - .size = 7 * 1024 * 1024, - }, + .name = "System Area", + .offset = 0, + .size = 7 * 1024 * 1024, + }, { - .name = "Root Filesystem", - .offset = 7 * 1024 * 1024, - .size = 30 * 1024 * 1024, - }, + .name = "Root Filesystem", + .offset = 7 * 1024 * 1024, + .size = 30 * 1024 * 1024, + }, { - .name = "Home Filesystem", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - }, + .name = "Home Filesystem", + .offset = MTDPART_OFS_APPEND , + .size = MTDPART_SIZ_FULL , + }, }; /* * hardware specific access to control-lines - * ctrl: - * NAND_CNE: bit 0 -> ! bit 0 & 4 - * NAND_CLE: bit 1 -> bit 1 - * NAND_ALE: bit 2 -> bit 2 - * */ -static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) +static void +sharpsl_nand_hwcontrol(struct mtd_info* mtd, int cmd) { - struct nand_chip *chip = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { - unsigned char bits = ctrl & 0x07; - - bits |= (ctrl & 0x01) << 4; - - bits ^= 0x11; - - writeb((readb(FLASHCTL) & ~0x17) | bits, FLASHCTL); + switch (cmd) { + case NAND_CTL_SETCLE: + writeb(readb(FLASHCTL) | FLCLE, FLASHCTL); + break; + case NAND_CTL_CLRCLE: + writeb(readb(FLASHCTL) & ~FLCLE, FLASHCTL); + break; + + case NAND_CTL_SETALE: + writeb(readb(FLASHCTL) | FLALE, FLASHCTL); + break; + case NAND_CTL_CLRALE: + writeb(readb(FLASHCTL) & ~FLALE, FLASHCTL); + break; + + case NAND_CTL_SETNCE: + writeb(readb(FLASHCTL) & ~(FLCE0|FLCE1), FLASHCTL); + break; + case NAND_CTL_CLRNCE: + writeb(readb(FLASHCTL) | (FLCE0|FLCE1), FLASHCTL); + break; } - - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); } static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; @@ -118,26 +122,31 @@ static struct nand_bbt_descr sharpsl_akita_bbt = { .pattern = scan_ff_pattern }; -static struct nand_ecclayout akita_oobinfo = { +static struct nand_oobinfo akita_oobinfo = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 24, .eccpos = { - 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11, - 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23, - 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37}, - .oobfree = {{0x08, 0x09}} + 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11, + 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23, + 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37}, + .oobfree = { {0x08, 0x09} } }; -static int sharpsl_nand_dev_ready(struct mtd_info *mtd) +static int +sharpsl_nand_dev_ready(struct mtd_info* mtd) { return !((readb(FLASHCTL) & FLRYBY) == 0); } -static void sharpsl_nand_enable_hwecc(struct mtd_info *mtd, int mode) +static void +sharpsl_nand_enable_hwecc(struct mtd_info* mtd, int mode) { - writeb(0, ECCCLRR); + writeb(0 ,ECCCLRR); } -static int sharpsl_nand_calculate_ecc(struct mtd_info *mtd, const u_char * dat, u_char * ecc_code) +static int +sharpsl_nand_calculate_ecc(struct mtd_info* mtd, const u_char* dat, + u_char* ecc_code) { ecc_code[0] = ~readb(ECCLPUB); ecc_code[1] = ~readb(ECCLPLB); @@ -145,44 +154,47 @@ static int sharpsl_nand_calculate_ecc(struct mtd_info *mtd, const u_char * dat, return readb(ECCCNTR) != 0; } + #ifdef CONFIG_MTD_PARTITIONS const char *part_probes[] = { "cmdlinepart", NULL }; #endif + /* * Main initialization routine */ -static int __init sharpsl_nand_init(void) +int __init +sharpsl_nand_init(void) { struct nand_chip *this; - struct mtd_partition *sharpsl_partition_info; + struct mtd_partition* sharpsl_partition_info; int err = 0; /* Allocate memory for MTD device structure and private data */ - sharpsl_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + sharpsl_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), + GFP_KERNEL); if (!sharpsl_mtd) { - printk("Unable to allocate SharpSL NAND MTD device structure.\n"); + printk ("Unable to allocate SharpSL NAND MTD device structure.\n"); return -ENOMEM; } /* map physical adress */ sharpsl_io_base = ioremap(sharpsl_phys_base, 0x1000); - if (!sharpsl_io_base) { + if(!sharpsl_io_base){ printk("ioremap to access Sharp SL NAND chip failed\n"); kfree(sharpsl_mtd); return -EIO; } /* Get pointer to private data */ - this = (struct nand_chip *)(&sharpsl_mtd[1]); + this = (struct nand_chip *) (&sharpsl_mtd[1]); /* Initialize structures */ - memset(sharpsl_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) sharpsl_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ sharpsl_mtd->priv = this; - sharpsl_mtd->owner = THIS_MODULE; /* * PXA initialize @@ -193,25 +205,23 @@ static int __init sharpsl_nand_init(void) this->IO_ADDR_R = FLASHIO; this->IO_ADDR_W = FLASHIO; /* Set address of hardware control function */ - this->cmd_ctrl = sharpsl_nand_hwcontrol; + this->hwcontrol = sharpsl_nand_hwcontrol; this->dev_ready = sharpsl_nand_dev_ready; /* 15 us command delay time */ this->chip_delay = 15; /* set eccmode using hardware ECC */ - this->ecc.mode = NAND_ECC_HW; - this->ecc.size = 256; - this->ecc.bytes = 3; + this->eccmode = NAND_ECC_HW3_256; this->badblock_pattern = &sharpsl_bbt; if (machine_is_akita() || machine_is_borzoi()) { this->badblock_pattern = &sharpsl_akita_bbt; - this->ecc.layout = &akita_oobinfo; + this->autooob = &akita_oobinfo; } - this->ecc.hwctl = sharpsl_nand_enable_hwecc; - this->ecc.calculate = sharpsl_nand_calculate_ecc; - this->ecc.correct = nand_correct_data; + this->enable_hwecc = sharpsl_nand_enable_hwecc; + this->calculate_ecc = sharpsl_nand_calculate_ecc; + this->correct_data = nand_correct_data; /* Scan to find existence of the device */ - err = nand_scan(sharpsl_mtd, 1); + err=nand_scan(sharpsl_mtd,1); if (err) { iounmap(sharpsl_io_base); kfree(sharpsl_mtd); @@ -220,39 +230,47 @@ static int __init sharpsl_nand_init(void) /* Register the partitions */ sharpsl_mtd->name = "sharpsl-nand"; - nr_partitions = parse_mtd_partitions(sharpsl_mtd, part_probes, &sharpsl_partition_info, 0); + nr_partitions = parse_mtd_partitions(sharpsl_mtd, part_probes, + &sharpsl_partition_info, 0); if (nr_partitions <= 0) { nr_partitions = DEFAULT_NUM_PARTITIONS; sharpsl_partition_info = sharpsl_nand_default_partition_info; if (machine_is_poodle()) { - sharpsl_partition_info[1].size = 22 * 1024 * 1024; + sharpsl_partition_info[1].size=30 * 1024 * 1024; } else if (machine_is_corgi() || machine_is_shepherd()) { - sharpsl_partition_info[1].size = 25 * 1024 * 1024; + sharpsl_partition_info[1].size=25 * 1024 * 1024; } else if (machine_is_husky()) { - sharpsl_partition_info[1].size = 53 * 1024 * 1024; + sharpsl_partition_info[1].size=53 * 1024 * 1024; } else if (machine_is_spitz()) { - sharpsl_partition_info[1].size = 5 * 1024 * 1024; + sharpsl_partition_info[1].size=5 * 1024 * 1024; } else if (machine_is_akita()) { - sharpsl_partition_info[1].size = 58 * 1024 * 1024; + sharpsl_partition_info[1].size=58 * 1024 * 1024; } else if (machine_is_borzoi()) { - sharpsl_partition_info[1].size = 32 * 1024 * 1024; + sharpsl_partition_info[1].size=32 * 1024 * 1024; } } + if (machine_is_husky() || machine_is_borzoi() || machine_is_akita()) { + /* Need to use small eraseblock size for backward compatibility */ + sharpsl_mtd->flags |= MTD_NO_VIRTBLOCKS; + } + add_mtd_partitions(sharpsl_mtd, sharpsl_partition_info, nr_partitions); /* Return happy */ return 0; } - module_init(sharpsl_nand_init); /* * Clean up routine */ +#ifdef MODULE static void __exit sharpsl_nand_cleanup(void) { + struct nand_chip *this = (struct nand_chip *) &sharpsl_mtd[1]; + /* Release resources, unregister device */ nand_release(sharpsl_mtd); @@ -261,8 +279,8 @@ static void __exit sharpsl_nand_cleanup(void) /* Free the MTD device structure */ kfree(sharpsl_mtd); } - module_exit(sharpsl_nand_cleanup); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Richard Purdie "); diff --git a/drivers/mtd/nand/spia.c b/drivers/mtd/nand/spia.c index 1f6d429b1..9cf1ce718 100644 --- a/drivers/mtd/nand/spia.c +++ b/drivers/mtd/nand/spia.c @@ -39,16 +39,16 @@ static struct mtd_info *spia_mtd = NULL; */ #define SPIA_IO_BASE 0xd0000000 /* Start of EP7212 IO address space */ #define SPIA_FIO_BASE 0xf0000000 /* Address where flash is mapped */ -#define SPIA_PEDR 0x0080 /* - * IO offset to Port E data register - * where the CLE, ALE and NCE pins - * are wired to. - */ -#define SPIA_PEDDR 0x00c0 /* - * IO offset to Port E data direction - * register so we can control the IO - * lines. - */ +#define SPIA_PEDR 0x0080 /* + * IO offset to Port E data register + * where the CLE, ALE and NCE pins + * are wired to. + */ +#define SPIA_PEDDR 0x00c0 /* + * IO offset to Port E data direction + * register so we can control the IO + * lines. + */ /* * Module stuff @@ -69,84 +69,79 @@ module_param(spia_peddr, int, 0); */ static const struct mtd_partition partition_info[] = { { - .name = "SPIA flash partition 1", - .offset = 0, - .size = 2 * 1024 * 1024}, + .name = "SPIA flash partition 1", + .offset = 0, + .size = 2*1024*1024 + }, { - .name = "SPIA flash partition 2", - .offset = 2 * 1024 * 1024, - .size = 6 * 1024 * 1024} + .name = "SPIA flash partition 2", + .offset = 2*1024*1024, + .size = 6*1024*1024 + } }; - #define NUM_PARTITIONS 2 + /* * hardware specific access to control-lines - * - * ctrl: - * NAND_CNE: bit 0 -> bit 2 - * NAND_CLE: bit 1 -> bit 0 - * NAND_ALE: bit 2 -> bit 1 - */ -static void spia_hwcontrol(struct mtd_info *mtd, int cmd) -{ - struct nand_chip *chip = mtd->priv; +*/ +static void spia_hwcontrol(struct mtd_info *mtd, int cmd){ - if (ctrl & NAND_CTRL_CHANGE) { - void __iomem *addr = spia_io_base + spia_pedr; - unsigned char bits; + switch(cmd){ - bits = (ctrl & NAND_CNE) << 2; - bits |= (ctrl & NAND_CLE | NAND_ALE) >> 1; - writeb((readb(addr) & ~0x7) | bits, addr); - } + case NAND_CTL_SETCLE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) |= 0x01; break; + case NAND_CTL_CLRCLE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) &= ~0x01; break; + + case NAND_CTL_SETALE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) |= 0x02; break; + case NAND_CTL_CLRALE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) &= ~0x02; break; - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); + case NAND_CTL_SETNCE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) &= ~0x04; break; + case NAND_CTL_CLRNCE: (*(volatile unsigned char *) (spia_io_base + spia_pedr)) |= 0x04; break; + } } /* * Main initialization routine */ -static int __init spia_init(void) +int __init spia_init (void) { struct nand_chip *this; /* Allocate memory for MTD device structure and private data */ - spia_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + spia_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); if (!spia_mtd) { - printk("Unable to allocate SPIA NAND MTD device structure.\n"); + printk ("Unable to allocate SPIA NAND MTD device structure.\n"); return -ENOMEM; } /* Get pointer to private data */ - this = (struct nand_chip *)(&spia_mtd[1]); + this = (struct nand_chip *) (&spia_mtd[1]); /* Initialize structures */ - memset(spia_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) spia_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ spia_mtd->priv = this; - spia_mtd->owner = THIS_MODULE; /* * Set GPIO Port E control register so that the pins are configured * to be outputs for controlling the NAND flash. */ - (*(volatile unsigned char *)(spia_io_base + spia_peddr)) = 0x07; + (*(volatile unsigned char *) (spia_io_base + spia_peddr)) = 0x07; /* Set address of NAND IO lines */ - this->IO_ADDR_R = (void __iomem *)spia_fio_base; - this->IO_ADDR_W = (void __iomem *)spia_fio_base; + this->IO_ADDR_R = (void __iomem *) spia_fio_base; + this->IO_ADDR_W = (void __iomem *) spia_fio_base; /* Set address of hardware control function */ - this->cmd_ctrl = spia_hwcontrol; + this->hwcontrol = spia_hwcontrol; /* 15 us command delay time */ this->chip_delay = 15; /* Scan to find existence of the device */ - if (nand_scan(spia_mtd, 1)) { - kfree(spia_mtd); + if (nand_scan (spia_mtd, 1)) { + kfree (spia_mtd); return -ENXIO; } @@ -156,22 +151,22 @@ static int __init spia_init(void) /* Return happy */ return 0; } - module_init(spia_init); /* * Clean up routine */ -static void __exit spia_cleanup(void) +#ifdef MODULE +static void __exit spia_cleanup (void) { /* Release resources, unregister device */ - nand_release(spia_mtd); + nand_release (spia_mtd); /* Free the MTD device structure */ - kfree(spia_mtd); + kfree (spia_mtd); } - module_exit(spia_cleanup); +#endif MODULE_LICENSE("GPL"); MODULE_AUTHOR("Steven J. Hill #include -#define CONFIG_NAND_WORKAROUND 1 - /* * MTD structure for TOTO board */ @@ -41,6 +39,25 @@ static struct mtd_info *toto_mtd = NULL; static unsigned long toto_io_base = OMAP_FLASH_1_BASE; +#define CONFIG_NAND_WORKAROUND 1 + +#define NAND_NCE 0x4000 +#define NAND_CLE 0x1000 +#define NAND_ALE 0x0002 +#define NAND_MASK (NAND_CLE | NAND_ALE | NAND_NCE) + +#define T_NAND_CTL_CLRALE(iob) gpiosetout(NAND_ALE, 0) +#define T_NAND_CTL_SETALE(iob) gpiosetout(NAND_ALE, NAND_ALE) +#ifdef CONFIG_NAND_WORKAROUND /* "some" dev boards busted, blue wired to rts2 :( */ +#define T_NAND_CTL_CLRCLE(iob) gpiosetout(NAND_CLE, 0); rts2setout(2, 2) +#define T_NAND_CTL_SETCLE(iob) gpiosetout(NAND_CLE, NAND_CLE); rts2setout(2, 0) +#else +#define T_NAND_CTL_CLRCLE(iob) gpiosetout(NAND_CLE, 0) +#define T_NAND_CTL_SETCLE(iob) gpiosetout(NAND_CLE, NAND_CLE) +#endif +#define T_NAND_CTL_SETNCE(iob) gpiosetout(NAND_NCE, 0) +#define T_NAND_CTL_CLRNCE(iob) gpiosetout(NAND_NCE, NAND_NCE) + /* * Define partitions for flash devices */ @@ -74,110 +91,91 @@ static struct mtd_partition partition_info32M[] = { #define NUM_PARTITIONS32M 3 #define NUM_PARTITIONS64M 4 - /* * hardware specific access to control-lines - * - * ctrl: - * NAND_NCE: bit 0 -> bit 14 (0x4000) - * NAND_CLE: bit 1 -> bit 12 (0x1000) - * NAND_ALE: bit 2 -> bit 1 (0x0002) - */ -static void toto_hwcontrol(struct mtd_info *mtd, int cmd, - unsigned int ctrl) -{ - struct nand_chip *chip = mtd->priv; +*/ - if (ctrl & NAND_CTRL_CHANGE) { - unsigned long bits; +static void toto_hwcontrol(struct mtd_info *mtd, int cmd) +{ - /* hopefully enough time for tc make proceding write to clear */ - udelay(1); + udelay(1); /* hopefully enough time for tc make proceding write to clear */ + switch(cmd){ - bits = (~ctrl & NAND_NCE) << 14; - bits |= (ctrl & NAND_CLE) << 12; - bits |= (ctrl & NAND_ALE) >> 1; + case NAND_CTL_SETCLE: T_NAND_CTL_SETCLE(cmd); break; + case NAND_CTL_CLRCLE: T_NAND_CTL_CLRCLE(cmd); break; -#warning Wild guess as gpiosetout() is nowhere defined in the kernel source - tglx - gpiosetout(0x5002, bits); + case NAND_CTL_SETALE: T_NAND_CTL_SETALE(cmd); break; + case NAND_CTL_CLRALE: T_NAND_CTL_CLRALE(cmd); break; -#ifdef CONFIG_NAND_WORKAROUND - /* "some" dev boards busted, blue wired to rts2 :( */ - rts2setout(2, (ctrl & NAND_CLE) << 1); -#endif - /* allow time to ensure gpio state to over take memory write */ - udelay(1); + case NAND_CTL_SETNCE: T_NAND_CTL_SETNCE(cmd); break; + case NAND_CTL_CLRNCE: T_NAND_CTL_CLRNCE(cmd); break; } - - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); + udelay(1); /* allow time to ensure gpio state to over take memory write */ } /* * Main initialization routine */ -static int __init toto_init(void) +int __init toto_init (void) { struct nand_chip *this; int err = 0; /* Allocate memory for MTD device structure and private data */ - toto_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); + toto_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); if (!toto_mtd) { - printk(KERN_WARNING "Unable to allocate toto NAND MTD device structure.\n"); + printk (KERN_WARNING "Unable to allocate toto NAND MTD device structure.\n"); err = -ENOMEM; goto out; } /* Get pointer to private data */ - this = (struct nand_chip *)(&toto_mtd[1]); + this = (struct nand_chip *) (&toto_mtd[1]); /* Initialize structures */ - memset(toto_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); + memset((char *) toto_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); /* Link the private data with the MTD structure */ toto_mtd->priv = this; - toto_mtd->owner = THIS_MODULE; /* Set address of NAND IO lines */ this->IO_ADDR_R = toto_io_base; this->IO_ADDR_W = toto_io_base; - this->cmd_ctrl = toto_hwcontrol; + this->hwcontrol = toto_hwcontrol; this->dev_ready = NULL; /* 25 us command delay time */ this->chip_delay = 30; - this->ecc.mode = NAND_ECC_SOFT; + this->eccmode = NAND_ECC_SOFT; - /* Scan to find existance of the device */ - if (nand_scan(toto_mtd, 1)) { + /* Scan to find existance of the device */ + if (nand_scan (toto_mtd, 1)) { err = -ENXIO; goto out_mtd; } /* Register the partitions */ - switch (toto_mtd->size) { - case SZ_64M: - add_mtd_partitions(toto_mtd, partition_info64M, NUM_PARTITIONS64M); - break; - case SZ_32M: - add_mtd_partitions(toto_mtd, partition_info32M, NUM_PARTITIONS32M); - break; - default:{ - printk(KERN_WARNING "Unsupported Nand device\n"); + switch(toto_mtd->size){ + case SZ_64M: add_mtd_partitions(toto_mtd, partition_info64M, NUM_PARTITIONS64M); break; + case SZ_32M: add_mtd_partitions(toto_mtd, partition_info32M, NUM_PARTITIONS32M); break; + default: { + printk (KERN_WARNING "Unsupported Nand device\n"); err = -ENXIO; goto out_buf; } } - gpioreserve(NAND_MASK); /* claim our gpios */ - archflashwp(0, 0); /* open up flash for writing */ + gpioreserve(NAND_MASK); /* claim our gpios */ + archflashwp(0,0); /* open up flash for writing */ goto out; - out_mtd: - kfree(toto_mtd); - out: +out_buf: + kfree (this->data_buf); +out_mtd: + kfree (toto_mtd); +out: return err; } @@ -186,21 +184,20 @@ module_init(toto_init); /* * Clean up routine */ -static void __exit toto_cleanup(void) +static void __exit toto_cleanup (void) { /* Release resources, unregister device */ - nand_release(toto_mtd); + nand_release (toto_mtd); /* Free the MTD device structure */ - kfree(toto_mtd); + kfree (toto_mtd); /* stop flash writes */ - archflashwp(0, 1); + archflashwp(0,1); /* release gpios to system */ - gpiorelease(NAND_MASK); + gpiorelease(NAND_MASK); } - module_exit(toto_cleanup); MODULE_LICENSE("GPL"); diff --git a/drivers/mtd/nand/ts7250.c b/drivers/mtd/nand/ts7250.c deleted file mode 100644 index f40081069..000000000 --- a/drivers/mtd/nand/ts7250.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * drivers/mtd/nand/ts7250.c - * - * Copyright (C) 2004 Technologic Systems (support@embeddedARM.com) - * - * Derived from drivers/mtd/nand/edb7312.c - * Copyright (C) 2004 Marius Gröger (mag@sysgo.de) - * - * Derived from drivers/mtd/nand/autcpu12.c - * Copyright (c) 2001 Thomas Gleixner (gleixner@autronix.de) - * - * $Id: ts7250.c,v 1.4 2004/12/30 22:02:07 joff Exp $ - * - * 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. - * - * Overview: - * This is a device driver for the NAND flash device found on the - * TS-7250 board which utilizes a Samsung 32 Mbyte part. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * MTD structure for TS7250 board - */ -static struct mtd_info *ts7250_mtd = NULL; - -#ifdef CONFIG_MTD_PARTITIONS -static const char *part_probes[] = { "cmdlinepart", NULL }; - -#define NUM_PARTITIONS 3 - -/* - * Define static partitions for flash device - */ -static struct mtd_partition partition_info32[] = { - { - .name = "TS-BOOTROM", - .offset = 0x00000000, - .size = 0x00004000, - }, { - .name = "Linux", - .offset = 0x00004000, - .size = 0x01d00000, - }, { - .name = "RedBoot", - .offset = 0x01d04000, - .size = 0x002fc000, - }, -}; - -/* - * Define static partitions for flash device - */ -static struct mtd_partition partition_info128[] = { - { - .name = "TS-BOOTROM", - .offset = 0x00000000, - .size = 0x00004000, - }, { - .name = "Linux", - .offset = 0x00004000, - .size = 0x07d00000, - }, { - .name = "RedBoot", - .offset = 0x07d04000, - .size = 0x002fc000, - }, -}; -#endif - - -/* - * hardware specific access to control-lines - * - * ctrl: - * NAND_NCE: bit 0 -> bit 2 - * NAND_CLE: bit 1 -> bit 1 - * NAND_ALE: bit 2 -> bit 0 - */ -static void ts7250_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) -{ - struct nand_chip *chip = mtd->priv; - - if (ctrl & NAND_CTRL_CHANGE) { - unsigned long addr = TS72XX_NAND_CONTROL_VIRT_BASE; - unsigned char bits; - - bits = (ctrl & NAND_NCE) << 2; - bits |= ctrl & NAND_CLE; - bits |= (ctrl & NAND_ALE) >> 2; - - __raw_writeb((__raw_readb(addr) & ~0x7) | bits, addr); - } - - if (cmd != NAND_CMD_NONE) - writeb(cmd, chip->IO_ADDR_W); -} - -/* - * read device ready pin - */ -static int ts7250_device_ready(struct mtd_info *mtd) -{ - return __raw_readb(TS72XX_NAND_BUSY_VIRT_BASE) & 0x20; -} - -/* - * Main initialization routine - */ -static int __init ts7250_init(void) -{ - struct nand_chip *this; - const char *part_type = 0; - int mtd_parts_nb = 0; - struct mtd_partition *mtd_parts = 0; - - if (!machine_is_ts72xx() || board_is_ts7200()) - return -ENXIO; - - /* Allocate memory for MTD device structure and private data */ - ts7250_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); - if (!ts7250_mtd) { - printk("Unable to allocate TS7250 NAND MTD device structure.\n"); - return -ENOMEM; - } - - /* Get pointer to private data */ - this = (struct nand_chip *)(&ts7250_mtd[1]); - - /* Initialize structures */ - memset(ts7250_mtd, 0, sizeof(struct mtd_info)); - memset(this, 0, sizeof(struct nand_chip)); - - /* Link the private data with the MTD structure */ - ts7250_mtd->priv = this; - ts7250_mtd->owner = THIS_MODULE; - - /* insert callbacks */ - this->IO_ADDR_R = (void *)TS72XX_NAND_DATA_VIRT_BASE; - this->IO_ADDR_W = (void *)TS72XX_NAND_DATA_VIRT_BASE; - this->cmd_ctrl = ts7250_hwcontrol; - this->dev_ready = ts7250_device_ready; - this->chip_delay = 15; - this->ecc.mode = NAND_ECC_SOFT; - - printk("Searching for NAND flash...\n"); - /* Scan to find existence of the device */ - if (nand_scan(ts7250_mtd, 1)) { - kfree(ts7250_mtd); - return -ENXIO; - } -#ifdef CONFIG_MTD_PARTITIONS - ts7250_mtd->name = "ts7250-nand"; - mtd_parts_nb = parse_mtd_partitions(ts7250_mtd, part_probes, &mtd_parts, 0); - if (mtd_parts_nb > 0) - part_type = "command line"; - else - mtd_parts_nb = 0; -#endif - if (mtd_parts_nb == 0) { - mtd_parts = partition_info32; - if (ts7250_mtd->size >= (128 * 0x100000)) - mtd_parts = partition_info128; - mtd_parts_nb = NUM_PARTITIONS; - part_type = "static"; - } - - /* Register the partitions */ - printk(KERN_NOTICE "Using %s partition definition\n", part_type); - add_mtd_partitions(ts7250_mtd, mtd_parts, mtd_parts_nb); - - /* Return happy */ - return 0; -} - -module_init(ts7250_init); - -/* - * Clean up routine - */ -static void __exit ts7250_cleanup(void) -{ - /* Unregister the device */ - del_mtd_device(ts7250_mtd); - - /* Free the MTD device structure */ - kfree(ts7250_mtd); -} - -module_exit(ts7250_cleanup); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Jesse Off "); -MODULE_DESCRIPTION("MTD map driver for Technologic Systems TS-7250 board"); diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c index dd5cea8b4..d7cd5fa16 100644 --- a/drivers/mtd/nftlcore.c +++ b/drivers/mtd/nftlcore.c @@ -11,6 +11,7 @@ #define PRERELEASE +#include #include #include #include @@ -69,6 +70,8 @@ static void nftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) nftl->mbd.devnum = -1; nftl->mbd.blksize = 512; nftl->mbd.tr = tr; + memcpy(&nftl->oobinfo, &mtd->oobinfo, sizeof(struct nand_oobinfo)); + nftl->oobinfo.useecc = MTD_NANDECC_PLACEONLY; if (NFTL_mount(nftl) < 0) { printk(KERN_WARNING "NFTL: could not mount device\n"); @@ -133,69 +136,6 @@ static void nftl_remove_dev(struct mtd_blktrans_dev *dev) kfree(nftl); } -/* - * Read oob data from flash - */ -int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs & (mtd->writesize - 1); - ops.ooblen = len; - ops.oobbuf = buf; - ops.datbuf = NULL; - ops.len = len; - - res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - -/* - * Write oob data to flash - */ -int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs & (mtd->writesize - 1); - ops.ooblen = len; - ops.oobbuf = buf; - ops.datbuf = NULL; - ops.len = len; - - res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - -/* - * Write data and oob to flash - */ -static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf, uint8_t *oob) -{ - struct mtd_oob_ops ops; - int res; - - ops.mode = MTD_OOB_PLACE; - ops.ooboffs = offs; - ops.ooblen = mtd->oobsize; - ops.oobbuf = oob; - ops.datbuf = buf; - ops.len = len; - - res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops); - *retlen = ops.retlen; - return res; -} - #ifdef CONFIG_NFTL_RW /* Actual NFTL access routines */ @@ -245,7 +185,6 @@ static u16 NFTL_findfreeblock(struct NFTLrecord *nftl, int desperate ) static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned pendingblock ) { - struct mtd_info *mtd = nftl->mbd.mtd; u16 BlockMap[MAX_SECTORS_PER_UNIT]; unsigned char BlockLastState[MAX_SECTORS_PER_UNIT]; unsigned char BlockFreeFound[MAX_SECTORS_PER_UNIT]; @@ -255,7 +194,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p unsigned int targetEUN; struct nftl_oob oob; int inplace = 1; - size_t retlen; + size_t retlen; memset(BlockMap, 0xff, sizeof(BlockMap)); memset(BlockFreeFound, 0, sizeof(BlockFreeFound)); @@ -271,21 +210,21 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p /* Scan to find the Erase Unit which holds the actual data for each 512-byte block within the Chain. */ - silly = MAX_LOOPS; + silly = MAX_LOOPS; targetEUN = BLOCK_NIL; while (thisEUN <= nftl->lastEUN ) { - unsigned int status, foldmark; + unsigned int status, foldmark; targetEUN = thisEUN; for (block = 0; block < nftl->EraseSize / 512; block ++) { - nftl_read_oob(mtd, (thisEUN * nftl->EraseSize) + - (block * 512), 16 , &retlen, - (char *)&oob); + MTD_READOOB(nftl->mbd.mtd, + (thisEUN * nftl->EraseSize) + (block * 512), + 16 , &retlen, (char *)&oob); if (block == 2) { - foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; - if (foldmark == FOLD_MARK_IN_PROGRESS) { - DEBUG(MTD_DEBUG_LEVEL1, - "Write Inhibited on EUN %d\n", thisEUN); + foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; + if (foldmark == FOLD_MARK_IN_PROGRESS) { + DEBUG(MTD_DEBUG_LEVEL1, + "Write Inhibited on EUN %d\n", thisEUN); inplace = 0; } else { /* There's no other reason not to do inplace, @@ -294,7 +233,7 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p inplace = 1; } } - status = oob.b.Status | oob.b.Status1; + status = oob.b.Status | oob.b.Status1; BlockLastState[block] = status; switch(status) { @@ -389,15 +328,15 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p return BLOCK_NIL; } } else { - /* We put a fold mark in the chain we are folding only if we - fold in place to help the mount check code. If we do not fold in - place, it is possible to find the valid chain by selecting the - longer one */ - oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); - oob.u.c.unused = 0xffffffff; - nftl_write_oob(mtd, (nftl->EraseSize * targetEUN) + 2 * 512 + 8, - 8, &retlen, (char *)&oob.u); - } + /* We put a fold mark in the chain we are folding only if + we fold in place to help the mount check code. If we do + not fold in place, it is possible to find the valid + chain by selecting the longer one */ + oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); + oob.u.c.unused = 0xffffffff; + MTD_WRITEOOB(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) + 2 * 512 + 8, + 8, &retlen, (char *)&oob.u); + } /* OK. We now know the location of every block in the Virtual Unit Chain, and the Erase Unit into which we are supposed to be copying. @@ -414,33 +353,33 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p continue; } - /* copy only in non free block (free blocks can only + /* copy only in non free block (free blocks can only happen in case of media errors or deleted blocks) */ - if (BlockMap[block] == BLOCK_NIL) - continue; - - ret = mtd->read(mtd, (nftl->EraseSize * BlockMap[block]) + (block * 512), - 512, &retlen, movebuf); - if (ret < 0 && ret != -EUCLEAN) { - ret = mtd->read(mtd, (nftl->EraseSize * BlockMap[block]) - + (block * 512), 512, &retlen, - movebuf); - if (ret != -EIO) - printk("Error went away on retry.\n"); - } + if (BlockMap[block] == BLOCK_NIL) + continue; + + ret = MTD_READ(nftl->mbd.mtd, (nftl->EraseSize * BlockMap[block]) + (block * 512), + 512, &retlen, movebuf); + if (ret < 0) { + ret = MTD_READ(nftl->mbd.mtd, (nftl->EraseSize * BlockMap[block]) + + (block * 512), 512, &retlen, + movebuf); + if (ret != -EIO) + printk("Error went away on retry.\n"); + } memset(&oob, 0xff, sizeof(struct nftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; - - nftl_write(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) + - (block * 512), 512, &retlen, movebuf, (char *)&oob); + MTD_WRITEECC(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) + (block * 512), + 512, &retlen, movebuf, (char *)&oob, &nftl->oobinfo); } - /* add the header so that it is now a valid chain */ - oob.u.a.VirtUnitNum = oob.u.a.SpareVirtUnitNum = cpu_to_le16(thisVUC); - oob.u.a.ReplUnitNum = oob.u.a.SpareReplUnitNum = 0xffff; + /* add the header so that it is now a valid chain */ + oob.u.a.VirtUnitNum = oob.u.a.SpareVirtUnitNum + = cpu_to_le16(thisVUC); + oob.u.a.ReplUnitNum = oob.u.a.SpareReplUnitNum = 0xffff; - nftl_write_oob(mtd, (nftl->EraseSize * targetEUN) + 8, - 8, &retlen, (char *)&oob.u); + MTD_WRITEOOB(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) + 8, + 8, &retlen, (char *)&oob.u); /* OK. We've moved the whole lot into the new block. Now we have to free the original blocks. */ @@ -457,18 +396,18 @@ static u16 NFTL_foldchain (struct NFTLrecord *nftl, unsigned thisVUC, unsigned p while (thisEUN <= nftl->lastEUN && thisEUN != targetEUN) { unsigned int EUNtmp; - EUNtmp = nftl->ReplUnitTable[thisEUN]; + EUNtmp = nftl->ReplUnitTable[thisEUN]; - if (NFTL_formatblock(nftl, thisEUN) < 0) { + if (NFTL_formatblock(nftl, thisEUN) < 0) { /* could not erase : mark block as reserved */ nftl->ReplUnitTable[thisEUN] = BLOCK_RESERVED; - } else { + } else { /* correctly erased : mark it as free */ nftl->ReplUnitTable[thisEUN] = BLOCK_FREE; nftl->numfreeEUNs++; - } - thisEUN = EUNtmp; + } + thisEUN = EUNtmp; } /* Make this the new start of chain for thisVUC */ @@ -534,7 +473,6 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) { u16 lastEUN; u16 thisVUC = block / (nftl->EraseSize / 512); - struct mtd_info *mtd = nftl->mbd.mtd; unsigned int writeEUN; unsigned long blockofs = (block * 512) & (nftl->EraseSize -1); size_t retlen; @@ -551,22 +489,21 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) */ lastEUN = BLOCK_NIL; writeEUN = nftl->EUNtable[thisVUC]; - silly = MAX_LOOPS; + silly = MAX_LOOPS; while (writeEUN <= nftl->lastEUN) { struct nftl_bci bci; size_t retlen; - unsigned int status; + unsigned int status; lastEUN = writeEUN; - nftl_read_oob(mtd, - (writeEUN * nftl->EraseSize) + blockofs, - 8, &retlen, (char *)&bci); + MTD_READOOB(nftl->mbd.mtd, (writeEUN * nftl->EraseSize) + blockofs, + 8, &retlen, (char *)&bci); DEBUG(MTD_DEBUG_LEVEL2, "Status of block %d in EUN %d is %x\n", block , writeEUN, le16_to_cpu(bci.Status)); - status = bci.Status | bci.Status1; + status = bci.Status | bci.Status1; switch(status) { case SECTOR_FREE: return writeEUN; @@ -637,10 +574,10 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) /* We've found a free block. Insert it into the chain. */ if (lastEUN != BLOCK_NIL) { - thisVUC |= 0x8000; /* It's a replacement block */ + thisVUC |= 0x8000; /* It's a replacement block */ } else { - /* The first block in a new chain */ - nftl->EUNtable[thisVUC] = writeEUN; + /* The first block in a new chain */ + nftl->EUNtable[thisVUC] = writeEUN; } /* set up the actual EUN we're writing into */ @@ -648,29 +585,29 @@ static inline u16 NFTL_findwriteunit(struct NFTLrecord *nftl, unsigned block) nftl->ReplUnitTable[writeEUN] = BLOCK_NIL; /* ... and on the flash itself */ - nftl_read_oob(mtd, writeEUN * nftl->EraseSize + 8, 8, - &retlen, (char *)&oob.u); + MTD_READOOB(nftl->mbd.mtd, writeEUN * nftl->EraseSize + 8, 8, + &retlen, (char *)&oob.u); oob.u.a.VirtUnitNum = oob.u.a.SpareVirtUnitNum = cpu_to_le16(thisVUC); - nftl_write_oob(mtd, writeEUN * nftl->EraseSize + 8, 8, - &retlen, (char *)&oob.u); + MTD_WRITEOOB(nftl->mbd.mtd, writeEUN * nftl->EraseSize + 8, 8, + &retlen, (char *)&oob.u); - /* we link the new block to the chain only after the + /* we link the new block to the chain only after the block is ready. It avoids the case where the chain could point to a free block */ - if (lastEUN != BLOCK_NIL) { + if (lastEUN != BLOCK_NIL) { /* Both in our cache... */ nftl->ReplUnitTable[lastEUN] = writeEUN; /* ... and on the flash itself */ - nftl_read_oob(mtd, (lastEUN * nftl->EraseSize) + 8, - 8, &retlen, (char *)&oob.u); + MTD_READOOB(nftl->mbd.mtd, (lastEUN * nftl->EraseSize) + 8, + 8, &retlen, (char *)&oob.u); oob.u.a.ReplUnitNum = oob.u.a.SpareReplUnitNum = cpu_to_le16(writeEUN); - nftl_write_oob(mtd, (lastEUN * nftl->EraseSize) + 8, - 8, &retlen, (char *)&oob.u); + MTD_WRITEOOB(nftl->mbd.mtd, (lastEUN * nftl->EraseSize) + 8, + 8, &retlen, (char *)&oob.u); } return writeEUN; @@ -702,9 +639,10 @@ static int nftl_writeblock(struct mtd_blktrans_dev *mbd, unsigned long block, memset(&oob, 0xff, sizeof(struct nftl_oob)); oob.b.Status = oob.b.Status1 = SECTOR_USED; + MTD_WRITEECC(nftl->mbd.mtd, (writeEUN * nftl->EraseSize) + blockofs, + 512, &retlen, (char *)buffer, (char *)&oob, &nftl->oobinfo); + /* need to write SECTOR_USED flags since they are not written in mtd_writeecc */ - nftl_write(nftl->mbd.mtd, (writeEUN * nftl->EraseSize) + blockofs, - 512, &retlen, (char *)buffer, (char *)&oob); return 0; } #endif /* CONFIG_NFTL_RW */ @@ -713,22 +651,20 @@ static int nftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block, char *buffer) { struct NFTLrecord *nftl = (void *)mbd; - struct mtd_info *mtd = nftl->mbd.mtd; u16 lastgoodEUN; u16 thisEUN = nftl->EUNtable[block / (nftl->EraseSize / 512)]; unsigned long blockofs = (block * 512) & (nftl->EraseSize - 1); - unsigned int status; + unsigned int status; int silly = MAX_LOOPS; - size_t retlen; - struct nftl_bci bci; + size_t retlen; + struct nftl_bci bci; lastgoodEUN = BLOCK_NIL; - if (thisEUN != BLOCK_NIL) { + if (thisEUN != BLOCK_NIL) { while (thisEUN < nftl->nb_blocks) { - if (nftl_read_oob(mtd, (thisEUN * nftl->EraseSize) + - blockofs, 8, &retlen, - (char *)&bci) < 0) + if (MTD_READOOB(nftl->mbd.mtd, (thisEUN * nftl->EraseSize) + blockofs, + 8, &retlen, (char *)&bci) < 0) status = SECTOR_IGNORE; else status = bci.Status | bci.Status1; @@ -758,7 +694,7 @@ static int nftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block, } thisEUN = nftl->ReplUnitTable[thisEUN]; } - } + } the_end: if (lastgoodEUN == BLOCK_NIL) { @@ -767,9 +703,7 @@ static int nftl_readblock(struct mtd_blktrans_dev *mbd, unsigned long block, } else { loff_t ptr = (lastgoodEUN * nftl->EraseSize) + blockofs; size_t retlen; - int res = mtd->read(mtd, ptr, 512, &retlen, buffer); - - if (res < 0 && res != -EUCLEAN) + if (MTD_READ(nftl->mbd.mtd, ptr, 512, &retlen, buffer)) return -EIO; } return 0; diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index 067262ee8..3b104ebb2 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c @@ -33,11 +33,6 @@ char nftlmountrev[]="$Revision: 1.41 $"; -extern int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf); -extern int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len, - size_t *retlen, uint8_t *buf); - /* find_boot_record: Find the NFTL Media Header and its Spare copy which contains the * various device information of the NFTL partition and Bad Unit Table. Update * the ReplUnitTable[] table accroding to the Bad Unit Table. ReplUnitTable[] @@ -50,7 +45,6 @@ static int find_boot_record(struct NFTLrecord *nftl) size_t retlen; u8 buf[SECTORSIZE]; struct NFTLMediaHeader *mh = &nftl->MediaHdr; - struct mtd_info *mtd = nftl->mbd.mtd; unsigned int i; /* Assume logical EraseSize == physical erasesize for starting the scan. @@ -71,8 +65,7 @@ static int find_boot_record(struct NFTLrecord *nftl) /* Check for ANAND header first. Then can whinge if it's found but later checks fail */ - ret = mtd->read(mtd, block * nftl->EraseSize, SECTORSIZE, - &retlen, buf); + ret = MTD_READ(nftl->mbd.mtd, block * nftl->EraseSize, SECTORSIZE, &retlen, buf); /* We ignore ret in case the ECC of the MediaHeader is invalid (which is apparently acceptable) */ if (retlen != SECTORSIZE) { @@ -97,9 +90,8 @@ static int find_boot_record(struct NFTLrecord *nftl) } /* To be safer with BIOS, also use erase mark as discriminant */ - if ((ret = nftl_read_oob(mtd, block * nftl->EraseSize + - SECTORSIZE + 8, 8, &retlen, - (char *)&h1) < 0)) { + if ((ret = MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, + 8, &retlen, (char *)&h1) < 0)) { printk(KERN_WARNING "ANAND header found at 0x%x in mtd%d, but OOB data read failed (err %d)\n", block * nftl->EraseSize, nftl->mbd.mtd->index, ret); continue; @@ -117,8 +109,8 @@ static int find_boot_record(struct NFTLrecord *nftl) } /* Finally reread to check ECC */ - if ((ret = mtd->read(mtd, block * nftl->EraseSize, SECTORSIZE, - &retlen, buf) < 0)) { + if ((ret = MTD_READECC(nftl->mbd.mtd, block * nftl->EraseSize, SECTORSIZE, + &retlen, buf, (char *)&oob, NULL) < 0)) { printk(KERN_NOTICE "ANAND header found at 0x%x in mtd%d, but ECC read failed (err %d)\n", block * nftl->EraseSize, nftl->mbd.mtd->index, ret); continue; @@ -236,9 +228,9 @@ device is already correct. The new DiskOnChip driver already scanned the bad block table. Just query it. if ((i & (SECTORSIZE - 1)) == 0) { /* read one sector for every SECTORSIZE of blocks */ - if ((ret = mtd->read(nftl->mbd.mtd, block * nftl->EraseSize + - i + SECTORSIZE, SECTORSIZE, &retlen, - buf)) < 0) { + if ((ret = MTD_READECC(nftl->mbd.mtd, block * nftl->EraseSize + + i + SECTORSIZE, SECTORSIZE, &retlen, buf, + (char *)&oob, NULL)) < 0) { printk(KERN_NOTICE "Read of bad sector table failed (err %d)\n", ret); kfree(nftl->ReplUnitTable); @@ -276,22 +268,18 @@ static int memcmpb(void *a, int c, int n) static int check_free_sectors(struct NFTLrecord *nftl, unsigned int address, int len, int check_oob) { - u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize]; - struct mtd_info *mtd = nftl->mbd.mtd; - size_t retlen; int i; + size_t retlen; + u8 buf[SECTORSIZE + nftl->mbd.mtd->oobsize]; for (i = 0; i < len; i += SECTORSIZE) { - if (mtd->read(mtd, address, SECTORSIZE, &retlen, buf)) + if (MTD_READECC(nftl->mbd.mtd, address, SECTORSIZE, &retlen, buf, &buf[SECTORSIZE], &nftl->oobinfo) < 0) return -1; if (memcmpb(buf, 0xff, SECTORSIZE) != 0) return -1; if (check_oob) { - if(nftl_read_oob(mtd, address, mtd->oobsize, - &retlen, &buf[SECTORSIZE]) < 0) - return -1; - if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0) + if (memcmpb(buf + SECTORSIZE, 0xff, nftl->mbd.mtd->oobsize) != 0) return -1; } address += SECTORSIZE; @@ -313,11 +301,10 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block) unsigned int nb_erases, erase_mark; struct nftl_uci1 uci; struct erase_info *instr = &nftl->instr; - struct mtd_info *mtd = nftl->mbd.mtd; /* Read the Unit Control Information #1 for Wear-Leveling */ - if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, - 8, &retlen, (char *)&uci) < 0) + if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, + 8, &retlen, (char *)&uci) < 0) goto default_uci1; erase_mark = le16_to_cpu ((uci.EraseMark | uci.EraseMark1)); @@ -334,7 +321,7 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block) instr->mtd = nftl->mbd.mtd; instr->addr = block * nftl->EraseSize; instr->len = nftl->EraseSize; - mtd->erase(mtd, instr); + MTD_ERASE(nftl->mbd.mtd, instr); if (instr->state == MTD_ERASE_FAILED) { printk("Error while formatting block %d\n", block); @@ -356,8 +343,8 @@ int NFTL_formatblock(struct NFTLrecord *nftl, int block) goto fail; uci.WearInfo = le32_to_cpu(nb_erases); - if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE + - 8, 8, &retlen, (char *)&uci) < 0) + if (MTD_WRITEOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8, + &retlen, (char *)&uci) < 0) goto fail; return 0; fail: @@ -378,7 +365,6 @@ fail: * case. */ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_block) { - struct mtd_info *mtd = nftl->mbd.mtd; unsigned int block, i, status; struct nftl_bci bci; int sectors_per_block; @@ -388,9 +374,8 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b block = first_block; for (;;) { for (i = 0; i < sectors_per_block; i++) { - if (nftl_read_oob(mtd, - block * nftl->EraseSize + i * SECTORSIZE, - 8, &retlen, (char *)&bci) < 0) + if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + i * SECTORSIZE, + 8, &retlen, (char *)&bci) < 0) status = SECTOR_IGNORE; else status = bci.Status | bci.Status1; @@ -409,10 +394,9 @@ static void check_sectors_in_chain(struct NFTLrecord *nftl, unsigned int first_b /* sector not free actually : mark it as SECTOR_IGNORE */ bci.Status = SECTOR_IGNORE; bci.Status1 = SECTOR_IGNORE; - nftl_write_oob(mtd, block * - nftl->EraseSize + - i * SECTORSIZE, 8, - &retlen, (char *)&bci); + MTD_WRITEOOB(nftl->mbd.mtd, + block * nftl->EraseSize + i * SECTORSIZE, + 8, &retlen, (char *)&bci); } break; default: @@ -497,14 +481,13 @@ static void format_chain(struct NFTLrecord *nftl, unsigned int first_block) * 1. */ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) { - struct mtd_info *mtd = nftl->mbd.mtd; struct nftl_uci1 h1; unsigned int erase_mark; size_t retlen; /* check erase mark. */ - if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8, - &retlen, (char *)&h1) < 0) + if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8, + &retlen, (char *)&h1) < 0) return -1; erase_mark = le16_to_cpu ((h1.EraseMark | h1.EraseMark1)); @@ -518,9 +501,8 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) h1.EraseMark = cpu_to_le16(ERASE_MARK); h1.EraseMark1 = cpu_to_le16(ERASE_MARK); h1.WearInfo = cpu_to_le32(0); - if (nftl_write_oob(mtd, - block * nftl->EraseSize + SECTORSIZE + 8, 8, - &retlen, (char *)&h1) < 0) + if (MTD_WRITEOOB(nftl->mbd.mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8, + &retlen, (char *)&h1) < 0) return -1; } else { #if 0 @@ -531,8 +513,8 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) SECTORSIZE, 0) != 0) return -1; - if (nftl_read_oob(mtd, block * nftl->EraseSize + i, - 16, &retlen, buf) < 0) + if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + i, + 16, &retlen, buf) < 0) return -1; if (i == SECTORSIZE) { /* skip erase mark */ @@ -558,12 +540,11 @@ static int check_and_mark_free_block(struct NFTLrecord *nftl, int block) */ static int get_fold_mark(struct NFTLrecord *nftl, unsigned int block) { - struct mtd_info *mtd = nftl->mbd.mtd; struct nftl_uci2 uci; size_t retlen; - if (nftl_read_oob(mtd, block * nftl->EraseSize + 2 * SECTORSIZE + 8, - 8, &retlen, (char *)&uci) < 0) + if (MTD_READOOB(nftl->mbd.mtd, block * nftl->EraseSize + 2 * SECTORSIZE + 8, + 8, &retlen, (char *)&uci) < 0) return 0; return le16_to_cpu((uci.FoldMark | uci.FoldMark1)); @@ -577,7 +558,6 @@ int NFTL_mount(struct NFTLrecord *s) int chain_length, do_format_chain; struct nftl_uci0 h0; struct nftl_uci1 h1; - struct mtd_info *mtd = s->mbd.mtd; size_t retlen; /* search for NFTL MediaHeader and Spare NFTL Media Header */ @@ -602,13 +582,10 @@ int NFTL_mount(struct NFTLrecord *s) for (;;) { /* read the block header. If error, we format the chain */ - if (nftl_read_oob(mtd, - block * s->EraseSize + 8, 8, - &retlen, (char *)&h0) < 0 || - nftl_read_oob(mtd, - block * s->EraseSize + - SECTORSIZE + 8, 8, - &retlen, (char *)&h1) < 0) { + if (MTD_READOOB(s->mbd.mtd, block * s->EraseSize + 8, 8, + &retlen, (char *)&h0) < 0 || + MTD_READOOB(s->mbd.mtd, block * s->EraseSize + SECTORSIZE + 8, 8, + &retlen, (char *)&h1) < 0) { s->ReplUnitTable[block] = BLOCK_NIL; do_format_chain = 1; break; diff --git a/drivers/mtd/onenand/Kconfig b/drivers/mtd/onenand/Kconfig index 5930a0373..126ff6bf6 100644 --- a/drivers/mtd/onenand/Kconfig +++ b/drivers/mtd/onenand/Kconfig @@ -29,20 +29,6 @@ config MTD_ONENAND_GENERIC help Support for OneNAND flash via platform device driver. -config MTD_ONENAND_OTP - bool "OneNAND OTP Support" - depends on MTD_ONENAND - help - One Block of the NAND Flash Array memory is reserved as - a One-Time Programmable Block memory area. - Also, 1st Block of NAND Flash Array can be used as OTP. - - The OTP block can be read, programmed and locked using the same - operations as any other NAND Flash Array memory block. - OTP block cannot be erased. - - OTP block is fully-guaranteed to be a valid block. - config MTD_ONENAND_SYNC_READ bool "OneNAND Sync. Burst Read Support" depends on ARCH_OMAP diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 84ec40d25..a53a73fc2 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -23,7 +23,8 @@ /** * onenand_oob_64 - oob info for large (2KB) page */ -static struct nand_ecclayout onenand_oob_64 = { +static struct nand_oobinfo onenand_oob_64 = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 20, .eccpos = { 8, 9, 10, 11, 12, @@ -33,14 +34,14 @@ static struct nand_ecclayout onenand_oob_64 = { }, .oobfree = { {2, 3}, {14, 2}, {18, 3}, {30, 2}, - {34, 3}, {46, 2}, {50, 3}, {62, 2} - } + {24, 3}, {46, 2}, {40, 3}, {62, 2} } }; /** * onenand_oob_32 - oob info for middle (1KB) page */ -static struct nand_ecclayout onenand_oob_32 = { +static struct nand_oobinfo onenand_oob_32 = { + .useecc = MTD_NANDECC_AUTOPLACE, .eccbytes = 10, .eccpos = { 8, 9, 10, 11, 12, @@ -189,7 +190,7 @@ static int onenand_buffer_address(int dataram1, int sectors, int count) static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t len) { struct onenand_chip *this = mtd->priv; - int value, readcmd = 0, block_cmd = 0; + int value, readcmd = 0; int block, page; /* Now we use page size operation */ int sectors = 4, count = 4; @@ -205,8 +206,6 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le case ONENAND_CMD_ERASE: case ONENAND_CMD_BUFFERRAM: - case ONENAND_CMD_OTP_ACCESS: - block_cmd = 1; block = (int) (addr >> this->erase_shift); page = -1; break; @@ -234,12 +233,6 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le /* Write 'DFS, FBA' of Flash */ value = onenand_block_address(this, block); this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1); - - if (block_cmd) { - /* Select DataRAM for DDP */ - value = onenand_bufferram_address(this, block); - this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2); - } } if (page != -1) { @@ -308,7 +301,6 @@ static int onenand_wait(struct mtd_info *mtd, int state) if (state != FL_READING) cond_resched(); - touch_softlockup_watchdog(); } /* To get correct interrupt status in timeout case */ interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT); @@ -352,7 +344,7 @@ static inline int onenand_bufferram_offset(struct mtd_info *mtd, int area) if (ONENAND_CURRENT_BUFFERRAM(this)) { if (area == ONENAND_DATARAM) - return mtd->writesize; + return mtd->oobblock; if (area == ONENAND_SPARERAM) return mtd->oobsize; } @@ -380,17 +372,6 @@ static int onenand_read_bufferram(struct mtd_info *mtd, int area, bufferram += onenand_bufferram_offset(mtd, area); - if (ONENAND_CHECK_BYTE_ACCESS(count)) { - unsigned short word; - - /* Align with word(16-bit) size */ - count--; - - /* Read word and save byte */ - word = this->read_word(bufferram + offset + count); - buffer[count] = (word & 0xff); - } - memcpy(buffer, bufferram + offset, count); return 0; @@ -418,17 +399,6 @@ static int onenand_sync_read_bufferram(struct mtd_info *mtd, int area, this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ); - if (ONENAND_CHECK_BYTE_ACCESS(count)) { - unsigned short word; - - /* Align with word(16-bit) size */ - count--; - - /* Read word and save byte */ - word = this->read_word(bufferram + offset + count); - buffer[count] = (word & 0xff); - } - memcpy(buffer, bufferram + offset, count); this->mmcontrol(mtd, 0); @@ -456,22 +426,6 @@ static int onenand_write_bufferram(struct mtd_info *mtd, int area, bufferram += onenand_bufferram_offset(mtd, area); - if (ONENAND_CHECK_BYTE_ACCESS(count)) { - unsigned short word; - int byte_offset; - - /* Align with word(16-bit) size */ - count--; - - /* Calculate byte access offset */ - byte_offset = offset + count; - - /* Read word and save byte */ - word = this->read_word(bufferram + byte_offset); - word = (word & ~0xff) | buffer[count]; - this->write_word(word, bufferram + byte_offset); - } - memcpy(bufferram + offset, buffer, count); return 0; @@ -595,28 +549,31 @@ static void onenand_release_device(struct mtd_info *mtd) } /** - * onenand_read - [MTD Interface] Read data from flash + * onenand_read_ecc - [MTD Interface] Read data with ECC * @param mtd MTD device structure * @param from offset to read from * @param len number of bytes to read * @param retlen pointer to variable to store the number of read bytes * @param buf the databuffer to put data + * @param oob_buf filesystem supplied oob data buffer + * @param oobsel oob selection structure * - * Read with ecc -*/ -static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) + * OneNAND read with ECC + */ +static int onenand_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf, + u_char *oob_buf, struct nand_oobinfo *oobsel) { struct onenand_chip *this = mtd->priv; int read = 0, column; int thislen; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_read: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); + DEBUG(MTD_DEBUG_LEVEL3, "onenand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); /* Do not allow reads past end of device */ if ((from + len) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_read: Attempt read beyond end of device\n"); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_read_ecc: Attempt read beyond end of device\n"); *retlen = 0; return -EINVAL; } @@ -627,14 +584,14 @@ static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, /* TODO handling oob */ while (read < len) { - thislen = min_t(int, mtd->writesize, len - read); + thislen = min_t(int, mtd->oobblock, len - read); - column = from & (mtd->writesize - 1); - if (column + thislen > mtd->writesize) - thislen = mtd->writesize - column; + column = from & (mtd->oobblock - 1); + if (column + thislen > mtd->oobblock) + thislen = mtd->oobblock - column; if (!onenand_check_bufferram(mtd, from)) { - this->command(mtd, ONENAND_CMD_READ, from, mtd->writesize); + this->command(mtd, ONENAND_CMD_READ, from, mtd->oobblock); ret = this->wait(mtd, FL_READING); /* First copy data and check return value for ECC handling */ @@ -649,7 +606,7 @@ static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, break; if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_read: read failed = %d\n", ret); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_read_ecc: read failed = %d\n", ret); goto out; } @@ -671,7 +628,23 @@ out: } /** - * onenand_do_read_oob - [MTD Interface] OneNAND read out-of-band + * onenand_read - [MTD Interface] MTD compability function for onenand_read_ecc + * @param mtd MTD device structure + * @param from offset to read from + * @param len number of bytes to read + * @param retlen pointer to variable to store the number of read bytes + * @param buf the databuffer to put data + * + * This function simply calls onenand_read_ecc with oob buffer and oobsel = NULL +*/ +static int onenand_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) +{ + return onenand_read_ecc(mtd, from, len, retlen, buf, NULL, NULL); +} + +/** + * onenand_read_oob - [MTD Interface] OneNAND read out-of-band * @param mtd MTD device structure * @param from offset to read from * @param len number of bytes to read @@ -680,8 +653,8 @@ out: * * OneNAND read out-of-band data from the spare area */ -int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) +static int onenand_read_oob(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { struct onenand_chip *this = mtd->priv; int read = 0, thislen, column; @@ -731,7 +704,7 @@ int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, /* Read more? */ if (read < len) { /* Page size */ - from += mtd->writesize; + from += mtd->oobblock; column = 0; } } @@ -744,52 +717,7 @@ out: return ret; } -/** - * onenand_read_oob - [MTD Interface] NAND write data and/or out-of-band - * @mtd: MTD device structure - * @from: offset to read from - * @ops: oob operation description structure - */ -static int onenand_read_oob(struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops) -{ - BUG_ON(ops->mode != MTD_OOB_PLACE); - - return onenand_do_read_oob(mtd, from + ops->ooboffs, ops->len, - &ops->retlen, ops->oobbuf); -} - #ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE -/** - * onenand_verify_oob - [GENERIC] verify the oob contents after a write - * @param mtd MTD device structure - * @param buf the databuffer to verify - * @param to offset to read from - * @param len number of bytes to read and compare - * - */ -static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to, int len) -{ - struct onenand_chip *this = mtd->priv; - char *readp = this->page_buf; - int column = to & (mtd->oobsize - 1); - int status, i; - - this->command(mtd, ONENAND_CMD_READOOB, to, mtd->oobsize); - onenand_update_bufferram(mtd, to, 0); - status = this->wait(mtd, FL_READING); - if (status) - return status; - - this->read_bufferram(mtd, ONENAND_SPARERAM, readp, column, len); - - for(i = 0; i < len; i++) - if (buf[i] != 0xFF && buf[i] != readp[i]) - return -EBADMSG; - - return 0; -} - /** * onenand_verify_page - [GENERIC] verify the chip contents after a write * @param mtd MTD device structure @@ -803,7 +731,7 @@ static int onenand_verify_page(struct mtd_info *mtd, u_char *buf, loff_t addr) void __iomem *dataram0, *dataram1; int ret = 0; - this->command(mtd, ONENAND_CMD_READ, addr, mtd->writesize); + this->command(mtd, ONENAND_CMD_READ, addr, mtd->oobblock); ret = this->wait(mtd, FL_READING); if (ret) @@ -813,51 +741,53 @@ static int onenand_verify_page(struct mtd_info *mtd, u_char *buf, loff_t addr) /* Check, if the two dataram areas are same */ dataram0 = this->base + ONENAND_DATARAM; - dataram1 = dataram0 + mtd->writesize; + dataram1 = dataram0 + mtd->oobblock; - if (memcmp(dataram0, dataram1, mtd->writesize)) + if (memcmp(dataram0, dataram1, mtd->oobblock)) return -EBADMSG; return 0; } #else #define onenand_verify_page(...) (0) -#define onenand_verify_oob(...) (0) #endif -#define NOTALIGNED(x) ((x & (mtd->writesize - 1)) != 0) +#define NOTALIGNED(x) ((x & (mtd->oobblock - 1)) != 0) /** - * onenand_write - [MTD Interface] write buffer to FLASH + * onenand_write_ecc - [MTD Interface] OneNAND write with ECC * @param mtd MTD device structure * @param to offset to write to * @param len number of bytes to write * @param retlen pointer to variable to store the number of written bytes * @param buf the data to write + * @param eccbuf filesystem supplied oob data buffer + * @param oobsel oob selection structure * - * Write with ECC + * OneNAND write with ECC */ -static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const u_char *buf) +static int onenand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf, + u_char *eccbuf, struct nand_oobinfo *oobsel) { struct onenand_chip *this = mtd->priv; int written = 0; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_write: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); + DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); /* Initialize retlen, in case of early exit */ *retlen = 0; /* Do not allow writes past end of device */ if (unlikely((to + len) > mtd->size)) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: Attempt write to past end of device\n"); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: Attempt write to past end of device\n"); return -EINVAL; } /* Reject writes, which are not page aligned */ if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: Attempt to write not page aligned data\n"); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: Attempt to write not page aligned data\n"); return -EINVAL; } @@ -866,20 +796,20 @@ static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len, /* Loop until all data write */ while (written < len) { - int thislen = min_t(int, mtd->writesize, len - written); + int thislen = min_t(int, mtd->oobblock, len - written); - this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->writesize); + this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobblock); this->write_bufferram(mtd, ONENAND_DATARAM, buf, 0, thislen); this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize); - this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize); + this->command(mtd, ONENAND_CMD_PROG, to, mtd->oobblock); onenand_update_bufferram(mtd, to, 1); ret = this->wait(mtd, FL_WRITING); if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: write filaed %d\n", ret); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: write filaed %d\n", ret); goto out; } @@ -888,7 +818,7 @@ static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len, /* Only check verify write turn on */ ret = onenand_verify_page(mtd, (u_char *) buf, to); if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write: verify failed %d\n", ret); + DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_ecc: verify failed %d\n", ret); goto out; } @@ -909,7 +839,24 @@ out: } /** - * onenand_do_write_oob - [Internal] OneNAND write out-of-band + * onenand_write - [MTD Interface] compability function for onenand_write_ecc + * @param mtd MTD device structure + * @param to offset to write to + * @param len number of bytes to write + * @param retlen pointer to variable to store the number of written bytes + * @param buf the data to write + * + * This function simply calls onenand_write_ecc + * with oob buffer and oobsel = NULL + */ +static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) +{ + return onenand_write_ecc(mtd, to, len, retlen, buf, NULL, NULL); +} + +/** + * onenand_write_oob - [MTD Interface] OneNAND write out-of-band * @param mtd MTD device structure * @param to offset to write to * @param len number of bytes to write @@ -918,11 +865,11 @@ out: * * OneNAND write out-of-band */ -static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len, - size_t *retlen, const u_char *buf) +static int onenand_write_oob(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) { struct onenand_chip *this = mtd->priv; - int column, ret = 0; + int column, status; int written = 0; DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); @@ -947,27 +894,16 @@ static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len, this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize); - /* We send data to spare ram with oobsize - * to prevent byte access */ - memset(this->page_buf, 0xff, mtd->oobsize); - memcpy(this->page_buf + column, buf, thislen); - this->write_bufferram(mtd, ONENAND_SPARERAM, this->page_buf, 0, mtd->oobsize); + this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize); + this->write_bufferram(mtd, ONENAND_SPARERAM, buf, column, thislen); this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize); onenand_update_bufferram(mtd, to, 0); - ret = this->wait(mtd, FL_WRITING); - if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_oob: write filaed %d\n", ret); - goto out; - } - - ret = onenand_verify_oob(mtd, buf, to, thislen); - if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_write_oob: verify failed %d\n", ret); + status = this->wait(mtd, FL_WRITING); + if (status) goto out; - } written += thislen; @@ -984,22 +920,145 @@ out: *retlen = written; - return ret; + return 0; } /** - * onenand_write_oob - [MTD Interface] NAND write data and/or out-of-band - * @mtd: MTD device structure - * @from: offset to read from - * @ops: oob operation description structure + * onenand_writev_ecc - [MTD Interface] write with iovec with ecc + * @param mtd MTD device structure + * @param vecs the iovectors to write + * @param count number of vectors + * @param to offset to write to + * @param retlen pointer to variable to store the number of written bytes + * @param eccbuf filesystem supplied oob data buffer + * @param oobsel oob selection structure + * + * OneNAND write with iovec with ecc */ -static int onenand_write_oob(struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops) +static int onenand_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen, + u_char *eccbuf, struct nand_oobinfo *oobsel) { - BUG_ON(ops->mode != MTD_OOB_PLACE); + struct onenand_chip *this = mtd->priv; + unsigned char *pbuf; + size_t total_len, len; + int i, written = 0; + int ret = 0; + + /* Preset written len for early exit */ + *retlen = 0; + + /* Calculate total length of data */ + total_len = 0; + for (i = 0; i < count; i++) + total_len += vecs[i].iov_len; + + DEBUG(MTD_DEBUG_LEVEL3, "onenand_writev_ecc: to = 0x%08x, len = %i, count = %ld\n", (unsigned int) to, (unsigned int) total_len, count); + + /* Do not allow write past end of the device */ + if (unlikely((to + total_len) > mtd->size)) { + DEBUG(MTD_DEBUG_LEVEL0, "onenand_writev_ecc: Attempted write past end of device\n"); + return -EINVAL; + } + + /* Reject writes, which are not page aligned */ + if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(total_len))) { + DEBUG(MTD_DEBUG_LEVEL0, "onenand_writev_ecc: Attempt to write not page aligned data\n"); + return -EINVAL; + } + + /* Grab the lock and see if the device is available */ + onenand_get_device(mtd, FL_WRITING); + + /* TODO handling oob */ + + /* Loop until all keve's data has been written */ + len = 0; + while (count) { + pbuf = this->page_buf; + /* + * If the given tuple is >= pagesize then + * write it out from the iov + */ + if ((vecs->iov_len - len) >= mtd->oobblock) { + pbuf = vecs->iov_base + len; + + len += mtd->oobblock; + + /* Check, if we have to switch to the next tuple */ + if (len >= (int) vecs->iov_len) { + vecs++; + len = 0; + count--; + } + } else { + int cnt = 0, thislen; + while (cnt < mtd->oobblock) { + thislen = min_t(int, mtd->oobblock - cnt, vecs->iov_len - len); + memcpy(this->page_buf + cnt, vecs->iov_base + len, thislen); + cnt += thislen; + len += thislen; + + /* Check, if we have to switch to the next tuple */ + if (len >= (int) vecs->iov_len) { + vecs++; + len = 0; + count--; + } + } + } + + this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobblock); - return onenand_do_write_oob(mtd, to + ops->ooboffs, ops->len, - &ops->retlen, ops->oobbuf); + this->write_bufferram(mtd, ONENAND_DATARAM, pbuf, 0, mtd->oobblock); + this->write_bufferram(mtd, ONENAND_SPARERAM, ffchars, 0, mtd->oobsize); + + this->command(mtd, ONENAND_CMD_PROG, to, mtd->oobblock); + + onenand_update_bufferram(mtd, to, 1); + + ret = this->wait(mtd, FL_WRITING); + if (ret) { + DEBUG(MTD_DEBUG_LEVEL0, "onenand_writev_ecc: write failed %d\n", ret); + goto out; + } + + + /* Only check verify write turn on */ + ret = onenand_verify_page(mtd, (u_char *) pbuf, to); + if (ret) { + DEBUG(MTD_DEBUG_LEVEL0, "onenand_writev_ecc: verify failed %d\n", ret); + goto out; + } + + written += mtd->oobblock; + + to += mtd->oobblock; + } + +out: + /* Deselect and wakt up anyone waiting on the device */ + onenand_release_device(mtd); + + *retlen = written; + + return 0; +} + +/** + * onenand_writev - [MTD Interface] compabilty function for onenand_writev_ecc + * @param mtd MTD device structure + * @param vecs the iovectors to write + * @param count number of vectors + * @param to offset to write to + * @param retlen pointer to variable to store the number of written bytes + * + * OneNAND write with kvec. This just calls the ecc function + */ +static int onenand_writev(struct mtd_info *mtd, const struct kvec *vecs, + unsigned long count, loff_t to, size_t *retlen) +{ + return onenand_writev_ecc(mtd, vecs, count, to, retlen, NULL, NULL); } /** @@ -1168,7 +1227,7 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) /* We write two bytes, so we dont have to mess with 16 bit access */ ofs += mtd->oobsize + (bbm->badblockpos & ~0x01); - return onenand_do_write_oob(mtd, ofs , 2, &retlen, buf); + return mtd->write_oob(mtd, ofs , 2, &retlen, buf); } /** @@ -1265,304 +1324,6 @@ static int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) return 0; } -#ifdef CONFIG_MTD_ONENAND_OTP - -/* Interal OTP operation */ -typedef int (*otp_op_t)(struct mtd_info *mtd, loff_t form, size_t len, - size_t *retlen, u_char *buf); - -/** - * do_otp_read - [DEFAULT] Read OTP block area - * @param mtd MTD device structure - * @param from The offset to read - * @param len number of bytes to read - * @param retlen pointer to variable to store the number of readbytes - * @param buf the databuffer to put/get data - * - * Read OTP block area. - */ -static int do_otp_read(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) -{ - struct onenand_chip *this = mtd->priv; - int ret; - - /* Enter OTP access mode */ - this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); - this->wait(mtd, FL_OTPING); - - ret = mtd->read(mtd, from, len, retlen, buf); - - /* Exit OTP access mode */ - this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); - - return ret; -} - -/** - * do_otp_write - [DEFAULT] Write OTP block area - * @param mtd MTD device structure - * @param from The offset to write - * @param len number of bytes to write - * @param retlen pointer to variable to store the number of write bytes - * @param buf the databuffer to put/get data - * - * Write OTP block area. - */ -static int do_otp_write(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) -{ - struct onenand_chip *this = mtd->priv; - unsigned char *pbuf = buf; - int ret; - - /* Force buffer page aligned */ - if (len < mtd->writesize) { - memcpy(this->page_buf, buf, len); - memset(this->page_buf + len, 0xff, mtd->writesize - len); - pbuf = this->page_buf; - len = mtd->writesize; - } - - /* Enter OTP access mode */ - this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); - this->wait(mtd, FL_OTPING); - - ret = mtd->write(mtd, from, len, retlen, pbuf); - - /* Exit OTP access mode */ - this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); - - return ret; -} - -/** - * do_otp_lock - [DEFAULT] Lock OTP block area - * @param mtd MTD device structure - * @param from The offset to lock - * @param len number of bytes to lock - * @param retlen pointer to variable to store the number of lock bytes - * @param buf the databuffer to put/get data - * - * Lock OTP block area. - */ -static int do_otp_lock(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf) -{ - struct onenand_chip *this = mtd->priv; - int ret; - - /* Enter OTP access mode */ - this->command(mtd, ONENAND_CMD_OTP_ACCESS, 0, 0); - this->wait(mtd, FL_OTPING); - - ret = onenand_do_write_oob(mtd, from, len, retlen, buf); - - /* Exit OTP access mode */ - this->command(mtd, ONENAND_CMD_RESET, 0, 0); - this->wait(mtd, FL_RESETING); - - return ret; -} - -/** - * onenand_otp_walk - [DEFAULT] Handle OTP operation - * @param mtd MTD device structure - * @param from The offset to read/write - * @param len number of bytes to read/write - * @param retlen pointer to variable to store the number of read bytes - * @param buf the databuffer to put/get data - * @param action do given action - * @param mode specify user and factory - * - * Handle OTP operation. - */ -static int onenand_otp_walk(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf, - otp_op_t action, int mode) -{ - struct onenand_chip *this = mtd->priv; - int otp_pages; - int density; - int ret = 0; - - *retlen = 0; - - density = this->device_id >> ONENAND_DEVICE_DENSITY_SHIFT; - if (density < ONENAND_DEVICE_DENSITY_512Mb) - otp_pages = 20; - else - otp_pages = 10; - - if (mode == MTD_OTP_FACTORY) { - from += mtd->writesize * otp_pages; - otp_pages = 64 - otp_pages; - } - - /* Check User/Factory boundary */ - if (((mtd->writesize * otp_pages) - (from + len)) < 0) - return 0; - - while (len > 0 && otp_pages > 0) { - if (!action) { /* OTP Info functions */ - struct otp_info *otpinfo; - - len -= sizeof(struct otp_info); - if (len <= 0) - return -ENOSPC; - - otpinfo = (struct otp_info *) buf; - otpinfo->start = from; - otpinfo->length = mtd->writesize; - otpinfo->locked = 0; - - from += mtd->writesize; - buf += sizeof(struct otp_info); - *retlen += sizeof(struct otp_info); - } else { - size_t tmp_retlen; - int size = len; - - ret = action(mtd, from, len, &tmp_retlen, buf); - - buf += size; - len -= size; - *retlen += size; - - if (ret < 0) - return ret; - } - otp_pages--; - } - - return 0; -} - -/** - * onenand_get_fact_prot_info - [MTD Interface] Read factory OTP info - * @param mtd MTD device structure - * @param buf the databuffer to put/get data - * @param len number of bytes to read - * - * Read factory OTP info. - */ -static int onenand_get_fact_prot_info(struct mtd_info *mtd, - struct otp_info *buf, size_t len) -{ - size_t retlen; - int ret; - - ret = onenand_otp_walk(mtd, 0, len, &retlen, (u_char *) buf, NULL, MTD_OTP_FACTORY); - - return ret ? : retlen; -} - -/** - * onenand_read_fact_prot_reg - [MTD Interface] Read factory OTP area - * @param mtd MTD device structure - * @param from The offset to read - * @param len number of bytes to read - * @param retlen pointer to variable to store the number of read bytes - * @param buf the databuffer to put/get data - * - * Read factory OTP area. - */ -static int onenand_read_fact_prot_reg(struct mtd_info *mtd, loff_t from, - size_t len, size_t *retlen, u_char *buf) -{ - return onenand_otp_walk(mtd, from, len, retlen, buf, do_otp_read, MTD_OTP_FACTORY); -} - -/** - * onenand_get_user_prot_info - [MTD Interface] Read user OTP info - * @param mtd MTD device structure - * @param buf the databuffer to put/get data - * @param len number of bytes to read - * - * Read user OTP info. - */ -static int onenand_get_user_prot_info(struct mtd_info *mtd, - struct otp_info *buf, size_t len) -{ - size_t retlen; - int ret; - - ret = onenand_otp_walk(mtd, 0, len, &retlen, (u_char *) buf, NULL, MTD_OTP_USER); - - return ret ? : retlen; -} - -/** - * onenand_read_user_prot_reg - [MTD Interface] Read user OTP area - * @param mtd MTD device structure - * @param from The offset to read - * @param len number of bytes to read - * @param retlen pointer to variable to store the number of read bytes - * @param buf the databuffer to put/get data - * - * Read user OTP area. - */ -static int onenand_read_user_prot_reg(struct mtd_info *mtd, loff_t from, - size_t len, size_t *retlen, u_char *buf) -{ - return onenand_otp_walk(mtd, from, len, retlen, buf, do_otp_read, MTD_OTP_USER); -} - -/** - * onenand_write_user_prot_reg - [MTD Interface] Write user OTP area - * @param mtd MTD device structure - * @param from The offset to write - * @param len number of bytes to write - * @param retlen pointer to variable to store the number of write bytes - * @param buf the databuffer to put/get data - * - * Write user OTP area. - */ -static int onenand_write_user_prot_reg(struct mtd_info *mtd, loff_t from, - size_t len, size_t *retlen, u_char *buf) -{ - return onenand_otp_walk(mtd, from, len, retlen, buf, do_otp_write, MTD_OTP_USER); -} - -/** - * onenand_lock_user_prot_reg - [MTD Interface] Lock user OTP area - * @param mtd MTD device structure - * @param from The offset to lock - * @param len number of bytes to unlock - * - * Write lock mark on spare area in page 0 in OTP block - */ -static int onenand_lock_user_prot_reg(struct mtd_info *mtd, loff_t from, - size_t len) -{ - unsigned char oob_buf[64]; - size_t retlen; - int ret; - - memset(oob_buf, 0xff, mtd->oobsize); - /* - * Note: OTP lock operation - * OTP block : 0xXXFC - * 1st block : 0xXXF3 (If chip support) - * Both : 0xXXF0 (If chip support) - */ - oob_buf[ONENAND_OTP_LOCK_OFFSET] = 0xFC; - - /* - * Write lock mark to 8th word of sector0 of page0 of the spare0. - * We write 16 bytes spare area instead of 2 bytes. - */ - from = 0; - len = 16; - - ret = onenand_otp_walk(mtd, from, len, &retlen, oob_buf, do_otp_lock, MTD_OTP_USER); - - return ret ? : retlen; -} -#endif /* CONFIG_MTD_ONENAND_OTP */ - /** * onenand_print_device_info - Print device ID * @param device device ID @@ -1662,15 +1423,15 @@ static int onenand_probe(struct mtd_info *mtd) /* OneNAND page size & block size */ /* The data buffer size is equal to page size */ - mtd->writesize = this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE); - mtd->oobsize = mtd->writesize >> 5; + mtd->oobblock = this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE); + mtd->oobsize = mtd->oobblock >> 5; /* Pagers per block is always 64 in OneNAND */ - mtd->erasesize = mtd->writesize << 6; + mtd->erasesize = mtd->oobblock << 6; this->erase_shift = ffs(mtd->erasesize) - 1; - this->page_shift = ffs(mtd->writesize) - 1; + this->page_shift = ffs(mtd->oobblock) - 1; this->ppb_shift = (this->erase_shift - this->page_shift); - this->page_mask = (mtd->erasesize / mtd->writesize) - 1; + this->page_mask = (mtd->erasesize / mtd->oobblock) - 1; /* REVIST: Multichip handling */ @@ -1714,6 +1475,7 @@ static void onenand_resume(struct mtd_info *mtd) "in suspended state\n"); } + /** * onenand_scan - [OneNAND Interface] Scan for the OneNAND device * @param mtd MTD device structure @@ -1760,7 +1522,7 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) /* Allocate buffers, if necessary */ if (!this->page_buf) { size_t len; - len = mtd->writesize + mtd->oobsize; + len = mtd->oobblock + mtd->oobsize; this->page_buf = kmalloc(len, GFP_KERNEL); if (!this->page_buf) { printk(KERN_ERR "onenand_scan(): Can't allocate page_buf\n"); @@ -1775,42 +1537,40 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) switch (mtd->oobsize) { case 64: - this->ecclayout = &onenand_oob_64; + this->autooob = &onenand_oob_64; break; case 32: - this->ecclayout = &onenand_oob_32; + this->autooob = &onenand_oob_32; break; default: printk(KERN_WARNING "No OOB scheme defined for oobsize %d\n", mtd->oobsize); /* To prevent kernel oops */ - this->ecclayout = &onenand_oob_32; + this->autooob = &onenand_oob_32; break; } - mtd->ecclayout = this->ecclayout; + memcpy(&mtd->oobinfo, this->autooob, sizeof(mtd->oobinfo)); /* Fill in remaining MTD driver data */ mtd->type = MTD_NANDFLASH; - mtd->flags = MTD_CAP_NANDFLASH; + mtd->flags = MTD_CAP_NANDFLASH | MTD_ECC; mtd->ecctype = MTD_ECC_SW; mtd->erase = onenand_erase; mtd->point = NULL; mtd->unpoint = NULL; mtd->read = onenand_read; mtd->write = onenand_write; + mtd->read_ecc = onenand_read_ecc; + mtd->write_ecc = onenand_write_ecc; mtd->read_oob = onenand_read_oob; mtd->write_oob = onenand_write_oob; -#ifdef CONFIG_MTD_ONENAND_OTP - mtd->get_fact_prot_info = onenand_get_fact_prot_info; - mtd->read_fact_prot_reg = onenand_read_fact_prot_reg; - mtd->get_user_prot_info = onenand_get_user_prot_info; - mtd->read_user_prot_reg = onenand_read_user_prot_reg; - mtd->write_user_prot_reg = onenand_write_user_prot_reg; - mtd->lock_user_prot_reg = onenand_lock_user_prot_reg; -#endif + mtd->readv = NULL; + mtd->readv_ecc = NULL; + mtd->writev = onenand_writev; + mtd->writev_ecc = onenand_writev_ecc; mtd->sync = onenand_sync; mtd->lock = NULL; mtd->unlock = onenand_unlock; diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 1b00dac3d..4510d3361 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c @@ -17,9 +17,6 @@ #include #include -extern int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char *buf); - /** * check_short_pattern - [GENERIC] check if a pattern is in the buffer * @param buf the buffer to search @@ -90,13 +87,13 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr /* No need to read pages fully, * just read required OOB bytes */ - ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs, - readlen, &retlen, &buf[0]); + ret = mtd->read_oob(mtd, from + j * mtd->oobblock + bd->offs, + readlen, &retlen, &buf[0]); if (ret) return ret; - if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) { + if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->oobblock, bd)) { bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", i >> 1, (unsigned int) from); diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 5b58523e4..c077d2ec9 100644 --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c @@ -1,5 +1,5 @@ /* - * $Id: redboot.c,v 1.21 2006/03/30 18:34:37 bjd Exp $ + * $Id: redboot.c,v 1.19 2005/12/01 10:03:51 dwmw2 Exp $ * * Parse RedBoot-style Flash Image System (FIS) tables and * produce a Linux partition array to match. @@ -15,14 +15,14 @@ struct fis_image_desc { unsigned char name[16]; // Null terminated name - uint32_t flash_base; // Address within FLASH of image - uint32_t mem_base; // Address in memory where it executes - uint32_t size; // Length of image - uint32_t entry_point; // Execution entry point - uint32_t data_length; // Length of actual data - unsigned char _pad[256-(16+7*sizeof(uint32_t))]; - uint32_t desc_cksum; // Checksum over image descriptor - uint32_t file_cksum; // Checksum over image data + unsigned long flash_base; // Address within FLASH of image + unsigned long mem_base; // Address in memory where it executes + unsigned long size; // Length of image + unsigned long entry_point; // Execution entry point + unsigned long data_length; // Length of actual data + unsigned char _pad[256-(16+7*sizeof(unsigned long))]; + unsigned long desc_cksum; // Checksum over image descriptor + unsigned long file_cksum; // Checksum over image data }; struct fis_list { diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index fa4362fb4..a3e00a463 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -3,7 +3,7 @@ * * Copyright (C) 2005 Sean Young * - * $Id: rfd_ftl.c,v 1.8 2006/01/15 12:51:44 sean Exp $ + * $Id: rfd_ftl.c,v 1.5 2005/11/07 11:14:21 gleixner Exp $ * * This type of flash translation layer (FTL) is used by the Embedded BIOS * by General Software. It is known as the Resident Flash Disk (RFD), see: @@ -61,7 +61,6 @@ struct block { BLOCK_OK, BLOCK_ERASING, BLOCK_ERASED, - BLOCK_UNUSED, BLOCK_FAILED } state; int free_sectors; @@ -100,8 +99,10 @@ static int build_block_map(struct partition *part, int block_no) block->offset = part->block_size * block_no; if (le16_to_cpu(part->header_cache[0]) != RFD_MAGIC) { - block->state = BLOCK_UNUSED; - return -ENOENT; + block->state = BLOCK_ERASED; /* assumption */ + block->free_sectors = part->data_sectors_per_block; + part->reserved_block = block_no; + return 1; } block->state = BLOCK_OK; @@ -123,7 +124,7 @@ static int build_block_map(struct partition *part, int block_no) entry = 0; if (entry >= part->sector_count) { - printk(KERN_WARNING PREFIX + printk(KERN_NOTICE PREFIX "'%s': unit #%d: entry %d corrupt, " "sector %d out of range\n", part->mbd.mtd->name, block_no, i, entry); @@ -131,7 +132,7 @@ static int build_block_map(struct partition *part, int block_no) } if (part->sector_map[entry] != -1) { - printk(KERN_WARNING PREFIX + printk(KERN_NOTICE PREFIX "'%s': more than one entry for sector %d\n", part->mbd.mtd->name, entry); part->errors = 1; @@ -166,7 +167,7 @@ static int scan_header(struct partition *part) /* each erase block has three bytes header, followed by the map */ part->header_sectors_per_block = ((HEADER_MAP_OFFSET + sectors_per_block) * - sizeof(u16) + SECTOR_SIZE - 1) / SECTOR_SIZE; + sizeof(u16) + SECTOR_SIZE - 1) / SECTOR_SIZE; part->data_sectors_per_block = sectors_per_block - part->header_sectors_per_block; @@ -225,7 +226,7 @@ static int scan_header(struct partition *part) } if (part->reserved_block == -1) { - printk(KERN_WARNING PREFIX "'%s': no empty erase unit found\n", + printk(KERN_NOTICE PREFIX "'%s': no empty erase unit found\n", part->mbd.mtd->name); part->errors = 1; @@ -314,7 +315,7 @@ static void erase_callback(struct erase_info *erase) rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "'%s': unable to write RFD " + printk(KERN_NOTICE PREFIX "'%s': unable to write RFD " "header at 0x%lx\n", part->mbd.mtd->name, part->blocks[i].offset); @@ -347,7 +348,7 @@ static int erase_block(struct partition *part, int block) rc = part->mbd.mtd->erase(part->mbd.mtd, erase); if (rc) { - printk(KERN_ERR PREFIX "erase of region %x,%x on '%s' " + printk(KERN_WARNING PREFIX "erase of region %x,%x on '%s' " "failed\n", erase->addr, erase->len, part->mbd.mtd->name); kfree(erase); @@ -382,7 +383,7 @@ static int move_block_contents(struct partition *part, int block_no, u_long *old rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "error reading '%s' at " + printk(KERN_NOTICE PREFIX "error reading '%s' at " "0x%lx\n", part->mbd.mtd->name, part->blocks[block_no].offset); @@ -422,7 +423,7 @@ static int move_block_contents(struct partition *part, int block_no, u_long *old rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "'%s': Unable to " + printk(KERN_NOTICE PREFIX "'%s': Unable to " "read sector for relocation\n", part->mbd.mtd->name); @@ -519,7 +520,7 @@ static int reclaim_block(struct partition *part, u_long *old_sector) * because if we fill that one up first it'll have the most chance of having * the least live sectors at reclaim. */ -static int find_free_block(struct partition *part) +static int find_free_block(const struct partition *part) { int block, stop; @@ -532,9 +533,6 @@ static int find_free_block(struct partition *part) block != part->reserved_block) return block; - if (part->blocks[block].state == BLOCK_UNUSED) - erase_block(part, block); - if (++block >= part->total_blocks) block = 0; @@ -543,7 +541,7 @@ static int find_free_block(struct partition *part) return -1; } -static int find_writable_block(struct partition *part, u_long *old_sector) +static int find_writeable_block(struct partition *part, u_long *old_sector) { int rc, block; size_t retlen; @@ -572,7 +570,7 @@ static int find_writable_block(struct partition *part, u_long *old_sector) rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "'%s': unable to read header at " + printk(KERN_NOTICE PREFIX "'%s': unable to read header at " "0x%lx\n", part->mbd.mtd->name, part->blocks[block].offset); goto err; @@ -604,7 +602,7 @@ static int mark_sector_deleted(struct partition *part, u_long old_addr) rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "error writing '%s' at " + printk(KERN_WARNING PREFIX "error writing '%s' at " "0x%lx\n", part->mbd.mtd->name, addr); if (rc) goto err; @@ -654,7 +652,7 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf, if (part->current_block == -1 || !part->blocks[part->current_block].free_sectors) { - rc = find_writable_block(part, old_addr); + rc = find_writeable_block(part, old_addr); if (rc) goto err; } @@ -677,7 +675,7 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf, rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n", + printk(KERN_WARNING PREFIX "error writing '%s' at 0x%lx\n", part->mbd.mtd->name, addr); if (rc) goto err; @@ -697,7 +695,7 @@ static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf, rc = -EIO; if (rc) { - printk(KERN_ERR PREFIX "error writing '%s' at 0x%lx\n", + printk(KERN_WARNING PREFIX "error writing '%s' at 0x%lx\n", part->mbd.mtd->name, addr); if (rc) goto err; @@ -778,7 +776,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) part->block_size = block_size; else { if (!mtd->erasesize) { - printk(KERN_WARNING PREFIX "please provide block_size"); + printk(KERN_NOTICE PREFIX "please provide block_size"); return; } else @@ -793,8 +791,8 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) if (!(mtd->flags & MTD_WRITEABLE)) part->mbd.readonly = 1; else if (part->errors) { - printk(KERN_WARNING PREFIX "'%s': errors found, " - "setting read-only\n", mtd->name); + printk(KERN_NOTICE PREFIX "'%s': errors found, " + "setting read-only", mtd->name); part->mbd.readonly = 1; } diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index d7b115a35..f6d51ce34 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c @@ -120,6 +120,7 @@ static const char version[] = #include #include #include +#include /* for CONFIG_IP_MULTICAST */ #include #include #include @@ -507,11 +508,11 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev) * speak of. We simply pull the packet out of its PIO buffer (which is slow) * and queue it for the kernel. Then we reset the card for the next packet. * - * We sometimes get surprise interrupts late both because the SMP IRQ delivery + * We sometimes get suprise interrupts late both because the SMP IRQ delivery * is message passing and because the card sometimes seems to deliver late. I * think if it is part way through a receive and the mode is changed it carries * on receiving and sends us an interrupt. We have to band aid all these cases - * to get a sensible 150kBytes/second performance. Even then you want a small + * to get a sensible 150kbytes/second performance. Even then you want a small * TCP window. */ @@ -908,7 +909,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ number"); * here also causes the module to be unloaded */ -int __init init_module(void) +int init_module(void) { dev_3c501 = el1_probe(-1); if (IS_ERR(dev_3c501)) diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c index cb5ef7545..dcc98afa6 100644 --- a/drivers/net/3c503.c +++ b/drivers/net/3c503.c @@ -688,7 +688,7 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int __init +int init_module(void) { struct net_device *dev; diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 19c0b856c..111601ca4 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c @@ -1633,7 +1633,7 @@ MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)"); MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)"); MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)"); -int __init init_module(void) +int init_module(void) { int this_dev, found = 0; diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index 603904925..4db828939 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c @@ -932,7 +932,7 @@ module_param(irq, int, 0); MODULE_PARM_DESC(io, "EtherLink16 I/O base address"); MODULE_PARM_DESC(irq, "(ignored)"); -int __init init_module(void) +int init_module(void) { if (io == 0) printk("3c507: You should not use auto-probing with insmod!\n"); diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index cbdae54f7..dc845f36f 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c @@ -68,6 +68,7 @@ /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work = 10; +#include #include #ifdef CONFIG_MCA #include diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index aedfddf20..91d1c4c24 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c @@ -57,6 +57,7 @@ static int max_interrupt_work = 20; #define RX_RING_SIZE 16 #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ +#include #include #include #include @@ -760,7 +761,7 @@ static int corkscrew_open(struct net_device *dev) vp->product_name, dev)) return -EAGAIN; enable_dma(dev->dma); set_dma_mode(dev->dma, DMA_MODE_CASCADE); - } else if (request_irq(dev->irq, &corkscrew_interrupt, IRQF_SHARED, + } else if (request_irq(dev->irq, &corkscrew_interrupt, SA_SHIRQ, vp->product_name, dev)) { return -EAGAIN; } @@ -1003,8 +1004,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, /* Calculate the next Tx descriptor entry. */ int entry = vp->cur_tx % TX_RING_SIZE; struct boom_tx_desc *prev_entry; - unsigned long flags; - int i; + unsigned long flags, i; if (vp->tx_full) /* No room to transmit with */ return 1; diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 5dfd97f0b..b40885d41 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c @@ -289,7 +289,7 @@ static int elmc_open(struct net_device *dev) elmc_id_attn586(); /* disable interrupts */ - ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, + ret = request_irq(dev->irq, &elmc_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); if (ret) { printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq); @@ -1277,7 +1277,7 @@ MODULE_PARM_DESC(io, "EtherLink/MC I/O base address(es)"); MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)"); MODULE_LICENSE("GPL"); -int __init init_module(void) +int init_module(void) { int this_dev,found = 0; diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index 03c0f7176..6db3301e7 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c @@ -435,7 +435,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) * Grab the IRQ */ - err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev); + err = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, DRV_NAME, dev); if (err) { release_region(dev->base_addr, MC32_IO_EXTENT); printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); @@ -1031,7 +1031,8 @@ static int mc32_send_packet(struct sk_buff *skb, struct net_device *dev) return 1; } - if (skb_padto(skb, ETH_ZLEN)) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) { netif_wake_queue(dev); return 0; } @@ -1645,7 +1646,7 @@ static struct net_device *this_device; * insmod multiple modules for now but it's a hack. */ -int __init init_module(void) +int init_module(void) { this_device = mc32_probe(-1); if (IS_ERR(this_device)) diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 80e8ca013..274b0138d 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -17,6 +17,172 @@ 410 Severn Ave., Suite 210 Annapolis MD 21403 + Linux Kernel Additions: + + 0.99H+lk0.9 - David S. Miller - softnet, PCI DMA updates + 0.99H+lk1.0 - Jeff Garzik + Remove compatibility defines for kernel versions < 2.2.x. + Update for new 2.3.x module interface + LK1.1.2 (March 19, 2000) + * New PCI interface (jgarzik) + + LK1.1.3 25 April 2000, Andrew Morton + - Merged with 3c575_cb.c + - Don't set RxComplete in boomerang interrupt enable reg + - spinlock in vortex_timer to protect mdio functions + - disable local interrupts around call to vortex_interrupt in + vortex_tx_timeout() (So vortex_interrupt can use spin_lock()) + - Select window 3 in vortex_timer()'s write to Wn3_MAC_Ctrl + - In vortex_start_xmit(), move the lock to _after_ we've altered + vp->cur_tx and vp->tx_full. This defeats the race between + vortex_start_xmit() and vortex_interrupt which was identified + by Bogdan Costescu. + - Merged back support for six new cards from various sources + - Set vortex_have_pci if pci_module_init returns zero (fixes cardbus + insertion oops) + - Tell it that 3c905C has NWAY for 100bT autoneg + - Fix handling of SetStatusEnd in 'Too much work..' code, as + per 2.3.99's 3c575_cb (Dave Hinds). + - Split ISR into two for vortex & boomerang + - Fix MOD_INC/DEC races + - Handle resource allocation failures. + - Fix 3CCFE575CT LED polarity + - Make tx_interrupt_mitigation the default + + LK1.1.4 25 April 2000, Andrew Morton + - Add extra TxReset to vortex_up() to fix 575_cb hotplug initialisation probs. + - Put vortex_info_tbl into __devinitdata + - In the vortex_error StatsFull HACK, disable stats in vp->intr_enable as well + as in the hardware. + - Increased the loop counter in issue_and_wait from 2,000 to 4,000. + + LK1.1.5 28 April 2000, andrewm + - Added powerpc defines (John Daniel said these work...) + - Some extra diagnostics + - In vortex_error(), reset the Tx on maxCollisions. Otherwise most + chips usually get a Tx timeout. + - Added extra_reset module parm + - Replaced some inline timer manip with mod_timer + (Franois romieu ) + - In vortex_up(), don't make Wn3_config initialisation dependent upon has_nway + (this came across from 3c575_cb). + + LK1.1.6 06 Jun 2000, andrewm + - Backed out the PPC defines. + - Use del_timer_sync(), mod_timer(). + - Fix wrapped ulong comparison in boomerang_rx() + - Add IS_TORNADO, use it to suppress 3c905C checksum error msg + (Donald Becker, I Lee Hetherington ) + - Replace union wn3_config with BFINS/BFEXT manipulation for + sparc64 (Pete Zaitcev, Peter Jones) + - In vortex_error, do_tx_reset and vortex_tx_timeout(Vortex): + do a netif_wake_queue() to better recover from errors. (Anders Pedersen, + Donald Becker) + - Print a warning on out-of-memory (rate limited to 1 per 10 secs) + - Added two more Cardbus 575 NICs: 5b57 and 6564 (Paul Wagland) + + LK1.1.7 2 Jul 2000 andrewm + - Better handling of shared IRQs + - Reset the transmitter on a Tx reclaim error + - Fixed crash under OOM during vortex_open() (Mark Hemment) + - Fix Rx cessation problem during OOM (help from Mark Hemment) + - The spinlocks around the mdio access were blocking interrupts for 300uS. + Fix all this to use spin_lock_bh() within mdio_read/write + - Only write to TxFreeThreshold if it's a boomerang - other NICs don't + have one. + - Added 802.3x MAC-layer flow control support + + LK1.1.8 13 Aug 2000 andrewm + - Ignore request_region() return value - already reserved if Cardbus. + - Merged some additional Cardbus flags from Don's 0.99Qk + - Some fixes for 3c556 (Fred Maciel) + - Fix for EISA initialisation (Jan Rekorajski) + - Renamed MII_XCVR_PWR and EEPROM_230 to align with 3c575_cb and D. Becker's drivers + - Fixed MII_XCVR_PWR for 3CCFE575CT + - Added INVERT_LED_PWR, used it. + - Backed out the extra_reset stuff + + LK1.1.9 12 Sep 2000 andrewm + - Backed out the tx_reset_resume flags. It was a no-op. + - In vortex_error, don't reset the Tx on txReclaim errors + - In vortex_error, don't reset the Tx on maxCollisions errors. + Hence backed out all the DownListPtr logic here. + - In vortex_error, give Tornado cards a partial TxReset on + maxCollisions (David Hinds). Defined MAX_COLLISION_RESET for this. + - Redid some driver flags and device names based on pcmcia_cs-3.1.20. + - Fixed a bug where, if vp->tx_full is set when the interface + is downed, it remains set when the interface is upped. Bad + things happen. + + LK1.1.10 17 Sep 2000 andrewm + - Added EEPROM_8BIT for 3c555 (Fred Maciel) + - Added experimental support for the 3c556B Laptop Hurricane (Louis Gerbarg) + - Add HAS_NWAY to "3c900 Cyclone 10Mbps TPO" + + LK1.1.11 13 Nov 2000 andrewm + - Dump MOD_INC/DEC_USE_COUNT, use SET_MODULE_OWNER + + LK1.1.12 1 Jan 2001 andrewm (2.4.0-pre1) + - Call pci_enable_device before we request our IRQ (Tobias Ringstrom) + - Add 3c590 PCI latency timer hack to vortex_probe1 (from 0.99Ra) + - Added extended issue_and_wait for the 3c905CX. + - Look for an MII on PHY index 24 first (3c905CX oddity). + - Add HAS_NWAY to 3cSOHO100-TX (Brett Frankenberger) + - Don't free skbs we don't own on oom path in vortex_open(). + + LK1.1.13 27 Jan 2001 + - Added explicit `medialock' flag so we can truly + lock the media type down with `options'. + - "check ioremap return and some tidbits" (Arnaldo Carvalho de Melo ) + - Added and used EEPROM_NORESET for 3c556B PM resumes. + - Fixed leakage of vp->rx_ring. + - Break out separate HAS_HWCKSM device capability flag. + - Kill vp->tx_full (ANK) + - Merge zerocopy fragment handling (ANK?) + + LK1.1.14 15 Feb 2001 + - Enable WOL. Can be turned on with `enable_wol' module option. + - EISA and PCI initialisation fixes (jgarzik, Manfred Spraul) + - If a device's internalconfig register reports it has NWAY, + use it, even if autoselect is enabled. + + LK1.1.15 6 June 2001 akpm + - Prevent double counting of received bytes (Lars Christensen) + - Add ethtool support (jgarzik) + - Add module parm descriptions (Andrzej M. Krzysztofowicz) + - Implemented alloc_etherdev() API + - Special-case the 'Tx error 82' message. + + LK1.1.16 18 July 2001 akpm + - Make NETIF_F_SG dependent upon nr_free_highpages(), not on CONFIG_HIGHMEM + - Lessen verbosity of bootup messages + - Fix WOL - use new PM API functions. + - Use netif_running() instead of vp->open in suspend/resume. + - Don't reset the interface logic on open/close/rmmod. It upsets + autonegotiation, and hence DHCP (from 0.99T). + - Back out EEPROM_NORESET flag because of the above (we do it for all + NICs). + - Correct 3c982 identification string + - Rename wait_for_completion() to issue_and_wait() to avoid completion.h + clash. + + LK1.1.17 18Dec01 akpm + - PCI ID 9805 is a Python-T, not a dual-port Cyclone. Apparently. + And it has NWAY. + - Mask our advertised modes (vp->advertising) with our capabilities + (MII reg5) when deciding which duplex mode to use. + - Add `global_options' as default for options[]. Ditto global_enable_wol, + global_full_duplex. + + LK1.1.18 01Jul02 akpm + - Fix for undocumented transceiver power-up bit on some 3c566B's + (Donald Becker, Rahul Karnik) + + - See http://www.zip.com.au/~akpm/linux/#3c59x-2.3 for more details. + - Also see Documentation/networking/vortex.txt + + LK1.1.19 10Nov02 Marc Zyngier + - EISA sysfs integration. */ /* @@ -70,6 +236,7 @@ static int vortex_debug = VORTEX_DEBUG; static int vortex_debug = 1; #endif +#include #include #include #include @@ -208,7 +375,8 @@ limit of 4K. of the drivers, and will likely be provided by some future kernel. */ enum pci_flags_bit { - PCI_USES_MASTER=4, + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3, }; enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4, IS_TORNADO=8, @@ -278,95 +446,95 @@ static struct vortex_chip_info { int io_size; } vortex_info_tbl[] __devinitdata = { {"3c590 Vortex 10Mbps", - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c592 EISA 10Mbps Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */ - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c597 EISA Fast Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */ - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c595 Vortex 100baseTx", - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c595 Vortex 100baseT4", - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c595 Vortex 100base-MII", - PCI_USES_MASTER, IS_VORTEX, 32, }, + PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, }, {"3c900 Boomerang 10baseT", - PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, {"3c900 Boomerang 10Mbps Combo", - PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|EEPROM_RESET, 64, }, {"3c900 Cyclone 10Mbps TPO", /* AKPM: from Don's 0.99M */ - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c900 Cyclone 10Mbps Combo", - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c900 Cyclone 10Mbps TPC", /* AKPM: from Don's 0.99M */ - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c900B-FL Cyclone 10base-FL", - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905 Boomerang 100baseTx", - PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905 Boomerang 100baseT4", - PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c905B Cyclone 10/100/BNC", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c905B-FX Cyclone 100baseFx", - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905C Tornado", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", - PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, }, {"3c980 Cyclone", - PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c980C Python-T", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3cSOHO100-TX Hurricane", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c555 Laptop Hurricane", - PCI_USES_MASTER, IS_CYCLONE|EEPROM_8BIT|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|EEPROM_8BIT|HAS_HWCKSM, 128, }, {"3c556 Laptop Tornado", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_8BIT|HAS_CB_FNS|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_8BIT|HAS_CB_FNS|INVERT_MII_PWR| HAS_HWCKSM, 128, }, {"3c556B Laptop Hurricane", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR| WNO_XCVR_PWR|HAS_HWCKSM, 128, }, {"3c575 [Megahertz] 10/100 LAN CardBus", - PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, {"3c575 Boomerang CardBus", - PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, {"3CCFE575BT Cyclone CardBus", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT| + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT| INVERT_LED_PWR|HAS_HWCKSM, 128, }, {"3CCFE575CT Tornado CardBus", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, {"3CCFE656 Cyclone CardBus", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, {"3CCFEM656B Cyclone+Winmodem CardBus", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, {"3CXFEM656C Tornado+Winmodem CardBus", /* From pcmcia-cs-3.1.5 */ - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, {"3c450 HomePNA Tornado", /* AKPM: from Don's 0.99Q */ - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c920 Tornado", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c982 Hydra Dual Port A", - PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c982 Hydra Dual Port B", - PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c905B-T4", - PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM Tornado", - PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {NULL,}, /* NULL terminated list. */ }; @@ -830,7 +998,7 @@ static int vortex_resume(struct pci_dev *pdev) pci_enable_device(pdev); pci_set_master(pdev); if (request_irq(dev->irq, vp->full_bus_master_rx ? - &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { + &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev)) { printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); pci_disable_device(pdev); return -EBUSY; @@ -1214,12 +1382,17 @@ static int __devinit vortex_probe1(struct device *gendev, for (i = 0; i < 6; i++) iowrite8(dev->dev_addr[i], ioaddr + i); +#ifdef __sparc__ + if (print_info) + printk(", IRQ %s\n", __irq_itoa(dev->irq)); +#else if (print_info) printk(", IRQ %d\n", dev->irq); /* Tell them about an invalid IRQ. */ if (dev->irq <= 0 || dev->irq >= NR_IRQS) printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", dev->irq); +#endif EL3WINDOW(4); step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; @@ -1240,10 +1413,8 @@ static int __devinit vortex_probe1(struct device *gendev, } if (print_info) { - printk(KERN_INFO "%s: CardBus functions mapped " - "%16.16llx->%p\n", - print_name, - (unsigned long long)pci_resource_start(pdev, 2), + printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", + print_name, pci_resource_start(pdev, 2), vp->cb_fn_base); } EL3WINDOW(2); @@ -1667,7 +1838,7 @@ vortex_open(struct net_device *dev) /* Use the now-standard shared IRQ implementation. */ if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? - &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) { + &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev))) { printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); goto out; } @@ -1731,7 +1902,7 @@ vortex_timer(unsigned long data) printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo); } - disable_irq_lockdep(dev->irq); + disable_irq(dev->irq); old_window = ioread16(ioaddr + EL3_CMD) >> 13; EL3WINDOW(4); media_status = ioread16(ioaddr + Wn4_Media); @@ -1812,7 +1983,7 @@ leave_media_alone: dev->name, media_tbl[dev->if_port].name); EL3WINDOW(old_window); - enable_irq_lockdep(dev->irq); + enable_irq(dev->irq); mod_timer(&vp->timer, RUN_AT(next_tick)); if (vp->deferred) iowrite16(FakeIntr, ioaddr + EL3_CMD); diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 1428bb771..365a07494 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c @@ -19,11 +19,11 @@ See the file COPYING in this distribution for more information. Contributors: - + Wake-on-LAN support - Felipe Damasio PCI suspend/resume - Felipe Damasio LinkChg interrupt - Felipe Damasio - + TODO: * Test Tx checksumming thoroughly * Implement dev->tx_timeout @@ -52,6 +52,7 @@ #define DRV_RELDATE "Mar 22, 2004" +#include #include #include #include @@ -400,11 +401,6 @@ static void cp_clean_rings (struct cp_private *cp); #ifdef CONFIG_NET_POLL_CONTROLLER static void cp_poll_controller(struct net_device *dev); #endif -static int cp_get_eeprom_len(struct net_device *dev); -static int cp_get_eeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data); -static int cp_set_eeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data); static struct pci_device_id cp_pci_tbl[] = { { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, @@ -465,7 +461,7 @@ static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) static inline void cp_set_rxbufsize (struct cp_private *cp) { unsigned int mtu = cp->dev->mtu; - + if (mtu > ETH_DATA_LEN) /* MTU + ethernet header + FCS + optional VLAN tag */ cp->rx_buf_sz = mtu + ETH_HLEN + 8; @@ -514,7 +510,7 @@ static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail, static inline unsigned int cp_rx_csum_ok (u32 status) { unsigned int protocol = (status >> 16) & 0x3; - + if (likely((protocol == RxProtoTCP) && (!(status & TCPFail)))) return 1; else if ((protocol == RxProtoUDP) && (!(status & UDPFail))) @@ -1065,7 +1061,7 @@ static void cp_init_hw (struct cp_private *cp) cpw8(Config3, PARMEnable); cp->wol_enabled = 0; - cpw8(Config5, cpr8(Config5) & PMEStatus); + cpw8(Config5, cpr8(Config5) & PMEStatus); cpw32_f(HiTxRingAddr, 0); cpw32_f(HiTxRingAddr + 4, 0); @@ -1203,7 +1199,7 @@ static int cp_open (struct net_device *dev) cp_init_hw(cp); - rc = request_irq(dev->irq, cp_interrupt, IRQF_SHARED, dev->name, dev); + rc = request_irq(dev->irq, cp_interrupt, SA_SHIRQ, dev->name, dev); if (rc) goto err_out_hw; @@ -1355,7 +1351,7 @@ static void netdev_get_wol (struct cp_private *cp, WAKE_MCAST | WAKE_UCAST; /* We don't need to go on if WOL is disabled */ if (!cp->wol_enabled) return; - + options = cpr8 (Config3); if (options & LinkUp) wol->wolopts |= WAKE_PHY; if (options & MagicPacket) wol->wolopts |= WAKE_MAGIC; @@ -1581,9 +1577,6 @@ static struct ethtool_ops cp_ethtool_ops = { .get_strings = cp_get_strings, .get_ethtool_stats = cp_get_ethtool_stats, .get_perm_addr = ethtool_op_get_perm_addr, - .get_eeprom_len = cp_get_eeprom_len, - .get_eeprom = cp_get_eeprom, - .set_eeprom = cp_set_eeprom, }; static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) @@ -1619,32 +1612,24 @@ static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd) #define eeprom_delay() readl(ee_addr) /* The EEPROM commands include the alway-set leading bit. */ -#define EE_EXTEND_CMD (4) #define EE_WRITE_CMD (5) #define EE_READ_CMD (6) #define EE_ERASE_CMD (7) -#define EE_EWDS_ADDR (0) -#define EE_WRAL_ADDR (1) -#define EE_ERAL_ADDR (2) -#define EE_EWEN_ADDR (3) - -#define CP_EEPROM_MAGIC PCI_DEVICE_ID_REALTEK_8139 - -static void eeprom_cmd_start(void __iomem *ee_addr) +static int read_eeprom (void __iomem *ioaddr, int location, int addr_len) { + int i; + unsigned retval = 0; + void __iomem *ee_addr = ioaddr + Cfg9346; + int read_cmd = location | (EE_READ_CMD << addr_len); + writeb (EE_ENB & ~EE_CS, ee_addr); writeb (EE_ENB, ee_addr); eeprom_delay (); -} - -static void eeprom_cmd(void __iomem *ee_addr, int cmd, int cmd_len) -{ - int i; - /* Shift the command bits out. */ - for (i = cmd_len - 1; i >= 0; i--) { - int dataval = (cmd & (1 << i)) ? EE_DATA_WRITE : 0; + /* Shift the read command bits out. */ + for (i = 4 + addr_len; i >= 0; i--) { + int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0; writeb (EE_ENB | dataval, ee_addr); eeprom_delay (); writeb (EE_ENB | dataval | EE_SHIFT_CLK, ee_addr); @@ -1652,33 +1637,6 @@ static void eeprom_cmd(void __iomem *ee_addr, int cmd, int cmd_len) } writeb (EE_ENB, ee_addr); eeprom_delay (); -} - -static void eeprom_cmd_end(void __iomem *ee_addr) -{ - writeb (~EE_CS, ee_addr); - eeprom_delay (); -} - -static void eeprom_extend_cmd(void __iomem *ee_addr, int extend_cmd, - int addr_len) -{ - int cmd = (EE_EXTEND_CMD << addr_len) | (extend_cmd << (addr_len - 2)); - - eeprom_cmd_start(ee_addr); - eeprom_cmd(ee_addr, cmd, 3 + addr_len); - eeprom_cmd_end(ee_addr); -} - -static u16 read_eeprom (void __iomem *ioaddr, int location, int addr_len) -{ - int i; - u16 retval = 0; - void __iomem *ee_addr = ioaddr + Cfg9346; - int read_cmd = location | (EE_READ_CMD << addr_len); - - eeprom_cmd_start(ee_addr); - eeprom_cmd(ee_addr, read_cmd, 3 + addr_len); for (i = 16; i > 0; i--) { writeb (EE_ENB | EE_SHIFT_CLK, ee_addr); @@ -1690,125 +1648,13 @@ static u16 read_eeprom (void __iomem *ioaddr, int location, int addr_len) eeprom_delay (); } - eeprom_cmd_end(ee_addr); + /* Terminate the EEPROM access. */ + writeb (~EE_CS, ee_addr); + eeprom_delay (); return retval; } -static void write_eeprom(void __iomem *ioaddr, int location, u16 val, - int addr_len) -{ - int i; - void __iomem *ee_addr = ioaddr + Cfg9346; - int write_cmd = location | (EE_WRITE_CMD << addr_len); - - eeprom_extend_cmd(ee_addr, EE_EWEN_ADDR, addr_len); - - eeprom_cmd_start(ee_addr); - eeprom_cmd(ee_addr, write_cmd, 3 + addr_len); - eeprom_cmd(ee_addr, val, 16); - eeprom_cmd_end(ee_addr); - - eeprom_cmd_start(ee_addr); - for (i = 0; i < 20000; i++) - if (readb(ee_addr) & EE_DATA_READ) - break; - eeprom_cmd_end(ee_addr); - - eeprom_extend_cmd(ee_addr, EE_EWDS_ADDR, addr_len); -} - -static int cp_get_eeprom_len(struct net_device *dev) -{ - struct cp_private *cp = netdev_priv(dev); - int size; - - spin_lock_irq(&cp->lock); - size = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 256 : 128; - spin_unlock_irq(&cp->lock); - - return size; -} - -static int cp_get_eeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) -{ - struct cp_private *cp = netdev_priv(dev); - unsigned int addr_len; - u16 val; - u32 offset = eeprom->offset >> 1; - u32 len = eeprom->len; - u32 i = 0; - - eeprom->magic = CP_EEPROM_MAGIC; - - spin_lock_irq(&cp->lock); - - addr_len = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 8 : 6; - - if (eeprom->offset & 1) { - val = read_eeprom(cp->regs, offset, addr_len); - data[i++] = (u8)(val >> 8); - offset++; - } - - while (i < len - 1) { - val = read_eeprom(cp->regs, offset, addr_len); - data[i++] = (u8)val; - data[i++] = (u8)(val >> 8); - offset++; - } - - if (i < len) { - val = read_eeprom(cp->regs, offset, addr_len); - data[i] = (u8)val; - } - - spin_unlock_irq(&cp->lock); - return 0; -} - -static int cp_set_eeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) -{ - struct cp_private *cp = netdev_priv(dev); - unsigned int addr_len; - u16 val; - u32 offset = eeprom->offset >> 1; - u32 len = eeprom->len; - u32 i = 0; - - if (eeprom->magic != CP_EEPROM_MAGIC) - return -EINVAL; - - spin_lock_irq(&cp->lock); - - addr_len = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 8 : 6; - - if (eeprom->offset & 1) { - val = read_eeprom(cp->regs, offset, addr_len) & 0xff; - val |= (u16)data[i++] << 8; - write_eeprom(cp->regs, offset, val, addr_len); - offset++; - } - - while (i < len - 1) { - val = (u16)data[i++]; - val |= (u16)data[i++] << 8; - write_eeprom(cp->regs, offset, val, addr_len); - offset++; - } - - if (i < len) { - val = read_eeprom(cp->regs, offset, addr_len) & 0xff00; - val |= (u16)data[i]; - write_eeprom(cp->regs, offset, val, addr_len); - } - - spin_unlock_irq(&cp->lock); - return 0; -} - /* Put the board into D3cold state and wait for WakeUp signal */ static void cp_set_d3_state (struct cp_private *cp) { @@ -1822,7 +1668,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) struct cp_private *cp; int rc; void __iomem *regs; - resource_size_t pciaddr; + long pciaddr; unsigned int addr_len, i, pci_using_dac; u8 pci_rev; @@ -1836,10 +1682,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if (pdev->vendor == PCI_VENDOR_ID_REALTEK && pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) { - dev_err(&pdev->dev, - "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n", - pdev->vendor, pdev->device, pci_rev); - dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n"); + printk(KERN_ERR PFX "pci dev %s (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n", + pci_name(pdev), pdev->vendor, pdev->device, pci_rev); + printk(KERN_ERR PFX "Try the \"8139too\" driver instead.\n"); return -ENODEV; } @@ -1877,13 +1722,14 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) pciaddr = pci_resource_start(pdev, 1); if (!pciaddr) { rc = -EIO; - dev_err(&pdev->dev, "no MMIO resource\n"); + printk(KERN_ERR PFX "no MMIO resource for pci dev %s\n", + pci_name(pdev)); goto err_out_res; } if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) { rc = -EIO; - dev_err(&pdev->dev, "MMIO resource (%llx) too small\n", - (unsigned long long)pci_resource_len(pdev, 1)); + printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", + pci_resource_len(pdev, 1), pci_name(pdev)); goto err_out_res; } @@ -1897,15 +1743,14 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { - dev_err(&pdev->dev, - "No usable DMA configuration, aborting.\n"); + printk(KERN_ERR PFX "No usable DMA configuration, " + "aborting.\n"); goto err_out_res; } rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); if (rc) { - dev_err(&pdev->dev, - "No usable consistent DMA configuration, " - "aborting.\n"); + printk(KERN_ERR PFX "No usable consistent DMA configuration, " + "aborting.\n"); goto err_out_res; } } @@ -1916,9 +1761,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) regs = ioremap(pciaddr, CP_REGS_SIZE); if (!regs) { rc = -EIO; - dev_err(&pdev->dev, "Cannot map PCI MMIO (%Lx@%Lx)\n", - (unsigned long long)pci_resource_len(pdev, 1), - (unsigned long long)pciaddr); + printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", + pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); goto err_out_res; } dev->base_addr = (unsigned long) regs; @@ -1987,8 +1831,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) /* enable busmastering and memory-write-invalidate */ pci_set_master(pdev); - if (cp->wol_enabled) - cp_set_d3_state (cp); + if (cp->wol_enabled) cp_set_d3_state (cp); return 0; @@ -2013,8 +1856,7 @@ static void cp_remove_one (struct pci_dev *pdev) BUG_ON(!dev); unregister_netdev(dev); iounmap(cp->regs); - if (cp->wol_enabled) - pci_set_power_state (pdev, PCI_D0); + if (cp->wol_enabled) pci_set_power_state (pdev, PCI_D0); pci_release_regions(pdev); pci_clear_mwi(pdev); pci_disable_device(pdev); @@ -2077,7 +1919,7 @@ static int cp_resume (struct pci_dev *pdev) mii_check_media(&cp->mii_if, netif_msg_link(cp), FALSE); spin_unlock_irqrestore (&cp->lock, flags); - + return 0; } #endif /* CONFIG_PM */ diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index e4f4eaff7..feae7832f 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -93,6 +93,7 @@ #define DRV_VERSION "0.9.27" +#include #include #include #include @@ -164,7 +165,7 @@ static int multicast_filter_limit = 32; static int debug = -1; /* - * Receive ring size + * Receive ring size * Warning: 64K ring has hardware issues and may lock up. */ #if defined(CONFIG_SH_DREAMCAST) @@ -256,7 +257,7 @@ static struct pci_device_id rtl8139_pci_tbl[] = { {0x018a, 0x0106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, {0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, - {0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, + {0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 }, #ifdef CONFIG_SH_SECUREEDGE5410 /* Bogus 8139 silicon reports 8129 without external PROM :-( */ @@ -768,7 +769,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, /* dev and priv zeroed in alloc_etherdev */ dev = alloc_etherdev (sizeof (*tp)); if (dev == NULL) { - dev_err(&pdev->dev, "Unable to alloc new net device\n"); + printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev)); return -ENOMEM; } SET_MODULE_OWNER(dev); @@ -800,31 +801,31 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, #ifdef USE_IO_OPS /* make sure PCI base addr 0 is PIO */ if (!(pio_flags & IORESOURCE_IO)) { - dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n"); + printk (KERN_ERR PFX "%s: region #0 not a PIO resource, aborting\n", pci_name(pdev)); rc = -ENODEV; goto err_out; } /* check for weird/broken PCI region reporting */ if (pio_len < RTL_MIN_IO_SIZE) { - dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n"); + printk (KERN_ERR PFX "%s: Invalid PCI I/O region size(s), aborting\n", pci_name(pdev)); rc = -ENODEV; goto err_out; } #else /* make sure PCI base addr 1 is MMIO */ if (!(mmio_flags & IORESOURCE_MEM)) { - dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n"); + printk (KERN_ERR PFX "%s: region #1 not an MMIO resource, aborting\n", pci_name(pdev)); rc = -ENODEV; goto err_out; } if (mmio_len < RTL_MIN_IO_SIZE) { - dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n"); + printk (KERN_ERR PFX "%s: Invalid PCI mem region size(s), aborting\n", pci_name(pdev)); rc = -ENODEV; goto err_out; } #endif - rc = pci_request_regions (pdev, DRV_NAME); + rc = pci_request_regions (pdev, "8139too"); if (rc) goto err_out; disable_dev_on_err = 1; @@ -835,7 +836,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, #ifdef USE_IO_OPS ioaddr = ioport_map(pio_start, pio_len); if (!ioaddr) { - dev_err(&pdev->dev, "cannot map PIO, aborting\n"); + printk (KERN_ERR PFX "%s: cannot map PIO, aborting\n", pci_name(pdev)); rc = -EIO; goto err_out; } @@ -846,7 +847,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, /* ioremap MMIO region */ ioaddr = pci_iomap(pdev, 1, 0); if (ioaddr == NULL) { - dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); + printk (KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", pci_name(pdev)); rc = -EIO; goto err_out; } @@ -860,7 +861,8 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, /* check for missing/broken hardware */ if (RTL_R32 (TxConfig) == 0xFFFFFFFF) { - dev_err(&pdev->dev, "Chip not responding, ignoring board\n"); + printk (KERN_ERR PFX "%s: Chip not responding, ignoring board\n", + pci_name(pdev)); rc = -EIO; goto err_out; } @@ -874,10 +876,9 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, } /* if unknown chip, assume array element #0, original RTL-8139 in this case */ - dev_printk (KERN_DEBUG, &pdev->dev, - "unknown chip version, assuming RTL-8139\n"); - dev_printk (KERN_DEBUG, &pdev->dev, - "TxConfig = 0x%lx\n", RTL_R32 (TxConfig)); + printk (KERN_DEBUG PFX "%s: unknown chip version, assuming RTL-8139\n", + pci_name(pdev)); + printk (KERN_DEBUG PFX "%s: TxConfig = 0x%lx\n", pci_name(pdev), RTL_R32 (TxConfig)); tp->chipset = 0; match: @@ -954,11 +955,9 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, if (pdev->vendor == PCI_VENDOR_ID_REALTEK && pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) { - dev_info(&pdev->dev, - "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n", - pdev->vendor, pdev->device, pci_rev); - dev_info(&pdev->dev, - "Use the \"8139cp\" driver for improved performance and stability.\n"); + printk(KERN_INFO PFX "pci dev %s (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n", + pci_name(pdev), pdev->vendor, pdev->device, pci_rev); + printk(KERN_INFO PFX "Use the \"8139cp\" driver for improved performance and stability.\n"); } i = rtl8139_init_board (pdev, &dev); @@ -1312,7 +1311,7 @@ static int rtl8139_open (struct net_device *dev) int retval; void __iomem *ioaddr = tp->mmio_addr; - retval = request_irq (dev->irq, rtl8139_interrupt, IRQF_SHARED, dev->name, dev); + retval = request_irq (dev->irq, rtl8139_interrupt, SA_SHIRQ, dev->name, dev); if (retval) return retval; @@ -1342,9 +1341,9 @@ static int rtl8139_open (struct net_device *dev) netif_start_queue (dev); if (netif_msg_ifup(tp)) - printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#llx IRQ %d" - " GP Pins %2.2x %s-duplex.\n", dev->name, - (unsigned long long)pci_resource_start (tp->pci_dev, 1), + printk(KERN_DEBUG "%s: rtl8139_open() ioaddr %#lx IRQ %d" + " GP Pins %2.2x %s-duplex.\n", + dev->name, pci_resource_start (tp->pci_dev, 1), dev->irq, RTL_R8 (MediaStatus), tp->mii.full_duplex ? "full" : "half"); @@ -1709,7 +1708,6 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) void __iomem *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; - unsigned long flags; /* Calculate the next Tx descriptor entry. */ entry = tp->cur_tx % NUM_TX_DESC; @@ -1726,7 +1724,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) return 0; } - spin_lock_irqsave(&tp->lock, flags); + spin_lock_irq(&tp->lock); RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); @@ -1737,7 +1735,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) netif_stop_queue (dev); - spin_unlock_irqrestore(&tp->lock, flags); + spin_unlock_irq(&tp->lock); if (netif_msg_tx_queued(tp)) printk (KERN_DEBUG "%s: Queued Tx packet size %u to slot %d.\n", @@ -1826,7 +1824,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, int tmp_work; #endif - if (netif_msg_rx_err (tp)) + if (netif_msg_rx_err (tp)) printk(KERN_DEBUG "%s: Ethernet frame had errors, status %8.8x.\n", dev->name, rx_status); tp->stats.rx_errors++; @@ -1946,7 +1944,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, RTL_R16 (RxBufAddr), RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd)); - while (netif_running(dev) && received < budget + while (netif_running(dev) && received < budget && (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { u32 ring_offset = cur_rx % RX_BUF_LEN; u32 rx_status; @@ -2033,7 +2031,7 @@ no_early_rx: netif_receive_skb (skb); } else { - if (net_ratelimit()) + if (net_ratelimit()) printk (KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name); @@ -2160,13 +2158,13 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, status = RTL_R16 (IntrStatus); /* shared irq? */ - if (unlikely((status & rtl8139_intr_mask) == 0)) + if (unlikely((status & rtl8139_intr_mask) == 0)) goto out; handled = 1; /* h/w no longer present (hotplug?) or major error, bail */ - if (unlikely(status == 0xFFFF)) + if (unlikely(status == 0xFFFF)) goto out; /* close possible race's with dev_close */ diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 257d3bce3..da0c878dc 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c @@ -40,6 +40,7 @@ */ +#include #include #include #include @@ -899,7 +900,7 @@ memory_squeeze: } -static void i596_cleanup_cmd(struct net_device *dev, struct i596_private *lp) +static inline void i596_cleanup_cmd(struct net_device *dev, struct i596_private *lp) { struct i596_cmd *ptr; @@ -932,8 +933,7 @@ static void i596_cleanup_cmd(struct net_device *dev, struct i596_private *lp) lp->scb.cmd = I596_NULL; } -static void i596_reset(struct net_device *dev, struct i596_private *lp, - int ioaddr) +static inline void i596_reset(struct net_device *dev, struct i596_private *lp, int ioaddr) { unsigned long flags; @@ -1070,7 +1070,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) skb->len, (unsigned int)skb->data)); if (skb->len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } @@ -1579,7 +1580,7 @@ static int debug = -1; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "i82596 debug mask"); -int __init init_module(void) +int init_module(void) { if (debug >= 0) i596_debug = debug; @@ -1589,7 +1590,7 @@ int __init init_module(void) return 0; } -void __exit cleanup_module(void) +void cleanup_module(void) { unregister_netdev(dev_82596); #ifdef __mc68000__ diff --git a/drivers/net/8390.c b/drivers/net/8390.c index d2935ae39..f87027420 100644 --- a/drivers/net/8390.c +++ b/drivers/net/8390.c @@ -249,7 +249,7 @@ void ei_tx_timeout(struct net_device *dev) /* Ugly but a reset can be slow, yet must be protected */ - disable_irq_nosync_lockdep(dev->irq); + disable_irq_nosync(dev->irq); spin_lock(&ei_local->page_lock); /* Try to restart the card. Perhaps the user has fixed something. */ @@ -257,7 +257,7 @@ void ei_tx_timeout(struct net_device *dev) NS8390_init(dev, 1); spin_unlock(&ei_local->page_lock); - enable_irq_lockdep(dev->irq); + enable_irq(dev->irq); netif_wake_queue(dev); } @@ -275,14 +275,12 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); int send_length = skb->len, output_page; unsigned long flags; - char buf[ETH_ZLEN]; - char *data = skb->data; if (skb->len < ETH_ZLEN) { - memset(buf, 0, ETH_ZLEN); /* more efficient than doing just the needed bits */ - memcpy(buf, data, skb->len); + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; send_length = ETH_ZLEN; - data = buf; } /* Mask interrupts from the ethercard. @@ -349,7 +347,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) * trigger the send later, upon receiving a Tx done interrupt. */ - ei_block_output(dev, send_length, data, output_page); + ei_block_output(dev, send_length, skb->data, output_page); if (! ei_local->txing) { diff --git a/drivers/net/8390.h b/drivers/net/8390.h index a9a58f518..51e39dcd0 100644 --- a/drivers/net/8390.h +++ b/drivers/net/8390.h @@ -7,6 +7,7 @@ #ifndef _8390_h #define _8390_h +#include #include #include #include diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index a2bd81192..b7c3e118e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -447,7 +447,6 @@ config MIPS_GT96100ETH config MIPS_AU1X00_ENET bool "MIPS AU1000 Ethernet support" depends on NET_ETHERNET && SOC_AU1X00 - select PHYLIB select CRC32 help If you have an Alchemy Semi AU1X00 based system @@ -854,17 +853,6 @@ config SMC9194 . The module will be called smc9194. -config NET_NETX - tristate "NetX Ethernet support" - select MII - depends on NET_ETHERNET && ARCH_NETX - help - This is support for the Hilscher netX builtin Ethernet ports - - To compile this driver as a module, choose M here and read - . The module - will be called netx-eth. - config DM9000 tristate "DM9000 support" depends on (ARM || MIPS) && NET_ETHERNET @@ -877,22 +865,6 @@ config DM9000 . The module will be called dm9000. -config SMC911X - tristate "SMSC LAN911[5678] support" - select CRC32 - select MII - depends on NET_ETHERNET && ARCH_PXA - help - This is a driver for SMSC's LAN911x series of Ethernet chipsets - including the new LAN9115, LAN9116, LAN9117, and LAN9118. - Say Y if you want it compiled into the kernel, - and read the Ethernet-HOWTO, available from - . - - This driver is also available as a module. The module will be - called smc911x. If you want to compile it as a module, say M - here and read - config NET_VENDOR_RACAL bool "Racal-Interlan (Micom) NI cards" depends on NET_ETHERNET && ISA @@ -1387,8 +1359,8 @@ config APRICOT called apricot. config B44 - tristate "Broadcom 4400 ethernet support" - depends on NET_PCI && PCI + tristate "Broadcom 4400 ethernet support (EXPERIMENTAL)" + depends on NET_PCI && PCI && EXPERIMENTAL select MII help If you have a network (Ethernet) controller of this type, say Y and @@ -1724,20 +1696,6 @@ config VIA_RHINE_MMIO If unsure, say Y. -config VIA_RHINE_NAPI - bool "Use Rx Polling (NAPI)" - depends on VIA_RHINE - help - NAPI is a new driver API designed to reduce CPU and interrupt load - when the driver is receiving lots of packets from the card. - - If your estimated Rx load is 10kpps or more, or if the card will be - deployed on potentially unfriendly networks (e.g. in a firewall), - then say Y here. - - See for more - information. - config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" depends on NET_PCI && EXPERIMENTAL && MIPS @@ -2205,17 +2163,44 @@ config TIGON3 config BNX2 tristate "Broadcom NetXtremeII support" depends on PCI - select CRC32 - select ZLIB_INFLATE help This driver supports Broadcom NetXtremeII gigabit Ethernet cards. To compile this driver as a module, choose M here: the module will be called bnx2. This is recommended. +config BCM5700 + tristate "Broadcom 57xx support" + depends on PCI + ---help--- + This driver supports the Broadcom (HP NC10xx/67xx/77xx/150x/320x/325x) Gigabit + family adapters. Specifically, it supports: + HP NC1020 Gigabit Server Adapter + HP NC6770 Gigabit Server Adapter + HP NC7760 Gigabit Server Adapter + HP Embedded NC7761 Gigabit Server Adapter + HP NC7770 Gigabit Server Adapter + HP NC7771 Gigabit Server Adapter + HP NC7780 Gigabit Server Adapter + HP NC7781 Gigabit Server Adapter + HP NC7782 Embedded Gigabit Server + HP ProLiant NC150T PCI 4-Port Gigabit Combo Switch Adapter + HP NC320i Integrated Gigabit Server Adapter + HP NC325i Integrated Dual Port PCI Express Gigabit Server Adapter + HP NC320T Gigabit Server Adapter + HP NC324i Integrated Dual Port PCI Express Gigabit Server Adapter + HP NC326i Integrated Dual Port PCI Express Gigabit Server Adapter + + The source for this driver was obtained from + + + To compile this driver as a module, choose M here and read + . The module + will be called bcm5700. + config SPIDER_NET tristate "Spider Gigabit Ethernet driver" - depends on PCI && PPC_IBM_CELL_BLADE + depends on PCI && PPC_CELL select FW_LOADER help This driver supports the Gigabit Ethernet chips present on the @@ -2223,43 +2208,16 @@ config SPIDER_NET config GIANFAR tristate "Gianfar Ethernet" - depends on 85xx || 83xx || PPC_86xx + depends on 85xx || 83xx select PHYLIB help - This driver supports the Gigabit TSEC on the MPC83xx, MPC85xx, - and MPC86xx family of chips, and the FEC on the 8540. + This driver supports the Gigabit TSEC on the MPC85xx + family of chips, and the FEC on the 8540 config GFAR_NAPI bool "NAPI Support" depends on GIANFAR -config UCC_GETH - tristate "Freescale QE UCC GETH" - depends on QUICC_ENGINE && UCC_FAST - help - This driver supports the Gigabit Ethernet mode of QE UCC. - QE can be found on MPC836x CPUs. - -config UGETH_NAPI - bool "NAPI Support" - depends on UCC_GETH - -config UGETH_MAGIC_PACKET - bool "Magic Packet detection support" - depends on UCC_GETH - -config UGETH_FILTERING - bool "Mac address filtering support" - depends on UCC_GETH - -config UGETH_TX_ON_DEMOND - bool "Transmit on Demond support" - depends on UCC_GETH - -config UGETH_HAS_GIGA - bool - depends on UCC_GETH && MPC836x - config MV643XX_ETH tristate "MV-643XX Ethernet support" depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MV64360 || MOMENCO_OCELOT_3 || PPC_MULTIPLATFORM @@ -2382,23 +2340,6 @@ config S2IO_NAPI If in doubt, say N. -config MYRI10GE - tristate "Myricom Myri-10G Ethernet support" - depends on PCI - select FW_LOADER - select CRC32 - ---help--- - This driver supports Myricom Myri-10G Dual Protocol interface in - Ethernet mode. If the eeprom on your board is not recent enough, - you will need a newer firmware image. - You may get this image or more information, at: - - - - To compile this driver as a module, choose M here and read - . The module - will be called myri10ge. - endmenu source "drivers/net/tokenring/Kconfig" diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 7454d25e8..0e455ffeb 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -6,6 +6,7 @@ ifeq ($(CONFIG_ISDN_PPP),y) obj-$(CONFIG_ISDN) += slhc.o endif +obj-$(CONFIG_BCM5700) += bcm5700/ obj-$(CONFIG_E1000) += e1000/ obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IXGB) += ixgb/ @@ -18,9 +19,6 @@ gianfar_driver-objs := gianfar.o \ gianfar_mii.o \ gianfar_sysfs.o -obj-$(CONFIG_UCC_GETH) += ucc_geth_driver.o -ucc_geth_driver-objs := ucc_geth.o ucc_geth_phy.o - # # link order important here # @@ -191,15 +189,12 @@ obj-$(CONFIG_MACSONIC) += macsonic.o obj-$(CONFIG_MACMACE) += macmace.o obj-$(CONFIG_MAC89x0) += mac89x0.o obj-$(CONFIG_TUN) += tun.o -obj-$(CONFIG_NET_NETX) += netx-eth.o obj-$(CONFIG_DL2K) += dl2k.o obj-$(CONFIG_R8169) += r8169.o obj-$(CONFIG_AMD8111_ETH) += amd8111e.o obj-$(CONFIG_IBMVETH) += ibmveth.o obj-$(CONFIG_S2IO) += s2io.o -obj-$(CONFIG_MYRI10GE) += myri10ge/ obj-$(CONFIG_SMC91X) += smc91x.o -obj-$(CONFIG_SMC911X) += smc911x.o obj-$(CONFIG_DM9000) += dm9000.o obj-$(CONFIG_FEC_8XX) += fec_8xx/ diff --git a/drivers/net/Space.c b/drivers/net/Space.c index a8c245a82..60304f7e7 100644 --- a/drivers/net/Space.c +++ b/drivers/net/Space.c @@ -27,6 +27,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index f4ea62641..79bb56b8d 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -495,7 +496,7 @@ static int lance_open (struct net_device *dev) ll->rdp = LE_C0_STOP; /* Install the Interrupt handler */ - ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, IRQF_SHARED, + ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, SA_SHIRQ, dev->name, dev); if (ret) return ret; @@ -572,7 +573,8 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) if (len < ETH_ZLEN) { len = ETH_ZLEN; - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; } diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 0fbbcb75a..7952dc6d7 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c @@ -370,7 +370,8 @@ MODULE_PARM_DESC(mem, "Memory base address(es)"); MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver"); MODULE_LICENSE("GPL"); -int __init init_module(void) +int +init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 1c01e9b3d..b508812e9 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c @@ -50,6 +50,7 @@ * Grant Grundler : PCI write posting fixes. */ +#include #include #include #include @@ -578,7 +579,11 @@ static int __devinit acenic_probe_one(struct pci_dev *pdev, } printk("Gigabit Ethernet at 0x%08lx, ", dev->base_addr); - printk("irq %d\n", pdev->irq); +#ifdef __sparc__ + printk("irq %s\n", __irq_itoa(pdev->irq)); +#else + printk("irq %i\n", pdev->irq); +#endif #ifdef CONFIG_ACENIC_OMIT_TIGON_I if ((readl(&ap->regs->HostCtrl) >> 28) == 4) { @@ -1194,7 +1199,7 @@ static int __devinit ace_init(struct net_device *dev) goto init_error; } - ecode = request_irq(pdev->irq, ace_interrupt, IRQF_SHARED, + ecode = request_irq(pdev->irq, ace_interrupt, SA_SHIRQ, DRV_NAME, dev); if (ecode) { printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", diff --git a/drivers/net/acenic.h b/drivers/net/acenic.h index 62ec8ceee..a97107023 100644 --- a/drivers/net/acenic.h +++ b/drivers/net/acenic.h @@ -1,6 +1,7 @@ #ifndef _ACENIC_H_ #define _ACENIC_H_ +#include /* * Generate TX index update each time, when TX ring is closed. diff --git a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h index ec146f60d..d7882dd78 100644 --- a/drivers/net/acenic_firmware.h +++ b/drivers/net/acenic_firmware.h @@ -1,3 +1,4 @@ +#include /* * Declare these here even if Tigon I support is disabled to avoid * the compiler complaining about undefined symbols. diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index ed322a769..d9ba8be72 100755 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -69,6 +69,7 @@ Revision History: */ +#include #include #include #include @@ -1376,7 +1377,7 @@ static int amd8111e_open(struct net_device * dev ) { struct amd8111e_priv *lp = netdev_priv(dev); - if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, IRQF_SHARED, + if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, dev->name, dev)) return -EAGAIN; diff --git a/drivers/net/apne.c b/drivers/net/apne.c index 9cc13a025..b9820b86c 100644 --- a/drivers/net/apne.c +++ b/drivers/net/apne.c @@ -313,7 +313,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr) dev->base_addr = ioaddr; /* Install the Interrupt handler */ - i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, IRQF_SHARED, DRV_NAME, dev); + i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, DRV_NAME, dev); if (i) return i; for(i = 0; i < ETHER_ADDR_LEN; i++) { diff --git a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig index 0a0e0cd81..b14e89004 100644 --- a/drivers/net/appletalk/Kconfig +++ b/drivers/net/appletalk/Kconfig @@ -29,7 +29,7 @@ config ATALK even politically correct people are allowed to say Y here. config DEV_APPLETALK - tristate "Appletalk interfaces support" + bool "Appletalk interfaces support" depends on ATALK help AppleTalk is the protocol that Apple computers can use to communicate diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index ae7f82834..9edaa1832 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c @@ -48,6 +48,7 @@ static const char *version = * the driver figure it out. */ +#include #include #include #include @@ -1030,7 +1031,7 @@ module_param(io, int, 0); module_param(irq, int, 0); module_param(board_type, int, 0); -int __init init_module(void) +int init_module(void) { if (io == 0) printk(KERN_WARNING "%s: You shouldn't autoprobe with insmod\n", diff --git a/drivers/net/appletalk/cops_ffdrv.h b/drivers/net/appletalk/cops_ffdrv.h index b02005087..31cf8c9c9 100644 --- a/drivers/net/appletalk/cops_ffdrv.h +++ b/drivers/net/appletalk/cops_ffdrv.h @@ -24,6 +24,7 @@ * - Jay Schulist */ +#include #ifdef CONFIG_COPS_DAYNA diff --git a/drivers/net/appletalk/cops_ltdrv.h b/drivers/net/appletalk/cops_ltdrv.h index c699b1ad3..4afb8e18b 100644 --- a/drivers/net/appletalk/cops_ltdrv.h +++ b/drivers/net/appletalk/cops_ltdrv.h @@ -23,6 +23,7 @@ * - Jay Schulist */ +#include #ifdef CONFIG_COPS_TANGENT diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index 7f7dd4502..1a44a79ed 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c @@ -23,6 +23,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 5a9500525..fabc0607b 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -44,6 +44,7 @@ #define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n" #include +#include #include #include #include diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index 979a33df0..96636ca87 100644 --- a/drivers/net/arcnet/com20020-pci.c +++ b/drivers/net/arcnet/com20020-pci.c @@ -120,7 +120,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de goto out_port; } - if ((err = com20020_found(dev, IRQF_SHARED)) != 0) + if ((err = com20020_found(dev, SA_SHIRQ)) != 0) goto out_port; return 0; diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index cc721addd..d1b6b1f79 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c @@ -320,7 +320,7 @@ static int ariadne_open(struct net_device *dev) netif_start_queue(dev); - i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, IRQF_SHARED, + i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, SA_SHIRQ, dev->name, dev); if (i) return i; @@ -607,7 +607,8 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev) /* FIXME: is the 79C960 new enough to do its own padding right ? */ if (skb->len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; len = ETH_ZLEN; } diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 85493b7b9..5503dc8a6 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -42,9 +43,7 @@ #define DRV_VERSION "1.0" static struct net_device *at91_dev; - -static struct timer_list check_timer; -#define LINK_POLL_INTERVAL (HZ) +static struct clk *ether_clk; /* ..................................................................... */ @@ -144,7 +143,7 @@ static void read_phy(unsigned char phy_addr, unsigned char address, unsigned int * MAC accordingly. * If no link or auto-negotiation is busy, then no changes are made. */ -static void update_linkspeed(struct net_device *dev, int silent) +static void update_linkspeed(struct net_device *dev) { struct at91_private *lp = (struct at91_private *) dev->priv; unsigned int bmsr, bmcr, lpa, mac_cfg; @@ -152,8 +151,7 @@ static void update_linkspeed(struct net_device *dev, int silent) if (!mii_link_ok(&lp->mii)) { /* no link */ netif_carrier_off(dev); - if (!silent) - printk(KERN_INFO "%s: Link down.\n", dev->name); + printk(KERN_INFO "%s: Link down.\n", dev->name); return; } @@ -188,8 +186,7 @@ static void update_linkspeed(struct net_device *dev, int silent) } at91_emac_write(AT91_EMAC_CFG, mac_cfg); - if (!silent) - printk(KERN_INFO "%s: Link now %i-%s\n", dev->name, speed, (duplex == DUPLEX_FULL) ? "FullDuplex" : "HalfDuplex"); + printk(KERN_INFO "%s: Link now %i-%s\n", dev->name, speed, (duplex == DUPLEX_FULL) ? "FullDuplex" : "HalfDuplex"); netif_carrier_on(dev); } @@ -229,7 +226,7 @@ static irqreturn_t at91ether_phy_interrupt(int irq, void *dev_id, struct pt_regs goto done; } - update_linkspeed(dev, 0); + update_linkspeed(dev); done: disable_mdi(); @@ -246,17 +243,14 @@ static void enable_phyirq(struct net_device *dev) unsigned int dsintr, irq_number; int status; - irq_number = lp->board_data.phy_irq_pin; - if (!irq_number) { - /* - * PHY doesn't have an IRQ pin (RTL8201, DP83847, AC101L), - * or board does not have it connected. - */ - check_timer.expires = jiffies + LINK_POLL_INTERVAL; - add_timer(&check_timer); + if (lp->phy_type == MII_RTL8201_ID) /* RTL8201 does not have an interrupt */ + return; + if (lp->phy_type == MII_DP83847_ID) /* DP83847 does not have an interrupt */ + return; + if (lp->phy_type == MII_AC101L_ID) /* AC101L interrupt not supported yet */ return; - } + irq_number = lp->board_data.phy_irq_pin; status = request_irq(irq_number, at91ether_phy_interrupt, 0, dev->name, dev); if (status) { printk(KERN_ERR "at91_ether: PHY IRQ %d request failed - status %d!\n", irq_number, status); @@ -298,11 +292,12 @@ static void disable_phyirq(struct net_device *dev) unsigned int dsintr; unsigned int irq_number; - irq_number = lp->board_data.phy_irq_pin; - if (!irq_number) { - del_timer_sync(&check_timer); + if (lp->phy_type == MII_RTL8201_ID) /* RTL8201 does not have an interrupt */ + return; + if (lp->phy_type == MII_DP83847_ID) /* DP83847 does not have an interrupt */ + return; + if (lp->phy_type == MII_AC101L_ID) /* AC101L interrupt not supported yet */ return; - } spin_lock_irq(&lp->lock); enable_mdi(); @@ -331,6 +326,7 @@ static void disable_phyirq(struct net_device *dev) disable_mdi(); spin_unlock_irq(&lp->lock); + irq_number = lp->board_data.phy_irq_pin; free_irq(irq_number, dev); /* Free interrupt handler */ } @@ -359,18 +355,6 @@ static void reset_phy(struct net_device *dev) } #endif -static void at91ether_check_link(unsigned long dev_id) -{ - struct net_device *dev = (struct net_device *) dev_id; - - enable_mdi(); - update_linkspeed(dev, 1); - disable_mdi(); - - check_timer.expires = jiffies + LINK_POLL_INTERVAL; - add_timer(&check_timer); -} - /* ......................... ADDRESS MANAGEMENT ........................ */ /* @@ -517,7 +501,7 @@ static int hash_get_index(__u8 *addr) hash_index |= (bitval << j); } - return hash_index; + return hash_index; } /* @@ -573,8 +557,10 @@ static void at91ether_set_rx_mode(struct net_device *dev) at91_emac_write(AT91_EMAC_CFG, cfg); } + /* ......................... ETHTOOL SUPPORT ........................... */ + static int mdio_read(struct net_device *dev, int phy_id, int location) { unsigned int value; @@ -656,22 +642,6 @@ static struct ethtool_ops at91ether_ethtool_ops = { .get_link = ethtool_op_get_link, }; -static int at91ether_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct at91_private *lp = (struct at91_private *) dev->priv; - int res; - - if (!netif_running(dev)) - return -EINVAL; - - spin_lock_irq(&lp->lock); - enable_mdi(); - res = generic_mii_ioctl(&lp->mii, if_mii(rq), cmd, NULL); - disable_mdi(); - spin_unlock_irq(&lp->lock); - - return res; -} /* ................................ MAC ................................ */ @@ -715,10 +685,10 @@ static int at91ether_open(struct net_device *dev) struct at91_private *lp = (struct at91_private *) dev->priv; unsigned long ctl; - if (!is_valid_ether_addr(dev->dev_addr)) - return -EADDRNOTAVAIL; + if (!is_valid_ether_addr(dev->dev_addr)) + return -EADDRNOTAVAIL; - clk_enable(lp->ether_clk); /* Re-enable Peripheral clock */ + clk_enable(ether_clk); /* Re-enable Peripheral clock */ /* Clear internal statistics */ ctl = at91_emac_read(AT91_EMAC_CTL); @@ -738,7 +708,7 @@ static int at91ether_open(struct net_device *dev) /* Determine current link speed */ spin_lock_irq(&lp->lock); enable_mdi(); - update_linkspeed(dev, 0); + update_linkspeed(dev); disable_mdi(); spin_unlock_irq(&lp->lock); @@ -752,7 +722,6 @@ static int at91ether_open(struct net_device *dev) */ static int at91ether_close(struct net_device *dev) { - struct at91_private *lp = (struct at91_private *) dev->priv; unsigned long ctl; /* Disable Receiver and Transmitter */ @@ -769,7 +738,7 @@ static int at91ether_close(struct net_device *dev) netif_stop_queue(dev); - clk_disable(lp->ether_clk); /* Disable Peripheral clock */ + clk_disable(ether_clk); /* Disable Peripheral clock */ return 0; } @@ -901,7 +870,7 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id, struct pt_regs *re if (intstatus & AT91_EMAC_RCOM) /* Receive complete */ at91ether_rx(dev); - if (intstatus & AT91_EMAC_TCOM) { /* Transmit complete */ + if (intstatus & AT91_EMAC_TCOM) { /* Transmit complete */ /* The TCOM bit is set even if the transmission failed. */ if (intstatus & (AT91_EMAC_TUND | AT91_EMAC_RTRY)) lp->stats.tx_errors += 1; @@ -930,8 +899,7 @@ static irqreturn_t at91ether_interrupt(int irq, void *dev_id, struct pt_regs *re /* * Initialize the ethernet interface */ -static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_address, - struct platform_device *pdev, struct clk *ether_clk) +static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_address, struct platform_device *pdev) { struct at91_eth_data *board_data = pdev->dev.platform_data; struct net_device *dev; @@ -965,7 +933,6 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add return -ENOMEM; } lp->board_data = *board_data; - lp->ether_clk = ether_clk; platform_set_drvdata(pdev, dev); spin_lock_init(&lp->lock); @@ -978,7 +945,6 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add dev->set_multicast_list = at91ether_set_rx_mode; dev->set_mac_address = set_mac_address; dev->ethtool_ops = &at91ether_ethtool_ops; - dev->do_ioctl = at91ether_ioctl; SET_NETDEV_DEV(dev, &pdev->dev); @@ -1009,9 +975,6 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add lp->mii.dev = dev; /* Support for ethtool */ lp->mii.mdio_read = mdio_read; lp->mii.mdio_write = mdio_write; - lp->mii.phy_id = phy_address; - lp->mii.phy_id_mask = 0x1f; - lp->mii.reg_num_mask = 0x1f; lp->phy_type = phy_type; /* Type of PHY connected */ lp->phy_address = phy_address; /* MDI address of PHY */ @@ -1029,18 +992,11 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add /* Determine current link speed */ spin_lock_irq(&lp->lock); enable_mdi(); - update_linkspeed(dev, 0); + update_linkspeed(dev); disable_mdi(); spin_unlock_irq(&lp->lock); netif_carrier_off(dev); /* will be enabled in open() */ - /* If board has no PHY IRQ, use a timer to poll the PHY */ - if (!lp->board_data.phy_irq_pin) { - init_timer(&check_timer); - check_timer.data = (unsigned long)dev; - check_timer.function = at91ether_check_link; - } - /* Display ethernet banner */ printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%02x:%02x:%02x:%02x:%02x:%02x)\n", dev->name, (uint) dev->base_addr, dev->irq, @@ -1049,7 +1005,7 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); if ((phy_type == MII_DM9161_ID) || (lp->phy_type == MII_DM9161A_ID)) - printk(KERN_INFO "%s: Davicom 9161 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)"); + printk(KERN_INFO "%s: Davicom 9196 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)"); else if (phy_type == MII_LXT971A_ID) printk(KERN_INFO "%s: Intel LXT971A PHY\n", dev->name); else if (phy_type == MII_RTL8201_ID) @@ -1075,10 +1031,9 @@ static int __init at91ether_probe(struct platform_device *pdev) int detected = -1; unsigned long phy_id; unsigned short phy_address = 0; - struct clk *ether_clk; ether_clk = clk_get(&pdev->dev, "ether_clk"); - if (IS_ERR(ether_clk)) { + if (!ether_clk) { printk(KERN_ERR "at91_ether: no clock defined\n"); return -ENODEV; } @@ -1101,7 +1056,7 @@ static int __init at91ether_probe(struct platform_device *pdev) case MII_DP83847_ID: /* National Semiconductor DP83847: */ case MII_AC101L_ID: /* Altima AC101L: PHY_ID1 = 0x22, PHY_ID2 = 0x5520 */ case MII_KS8721_ID: /* Micrel KS8721: PHY_ID1 = 0x22, PHY_ID2 = 0x1610 */ - detected = at91ether_setup(phy_id, phy_address, pdev, ether_clk); + detected = at91ether_setup(phy_id, phy_address, pdev); break; } @@ -1120,61 +1075,17 @@ static int __devexit at91ether_remove(struct platform_device *pdev) unregister_netdev(at91_dev); free_irq(at91_dev->irq, at91_dev); dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys); - clk_put(lp->ether_clk); + clk_put(ether_clk); free_netdev(at91_dev); at91_dev = NULL; return 0; } -#ifdef CONFIG_PM - -static int at91ether_suspend(struct platform_device *pdev, pm_message_t mesg) -{ - struct at91_private *lp = (struct at91_private *) at91_dev->priv; - struct net_device *net_dev = platform_get_drvdata(pdev); - int phy_irq = lp->board_data.phy_irq_pin; - - if (netif_running(net_dev)) { - if (phy_irq) - disable_irq(phy_irq); - - netif_stop_queue(net_dev); - netif_device_detach(net_dev); - - clk_disable(lp->ether_clk); - } - return 0; -} - -static int at91ether_resume(struct platform_device *pdev) -{ - struct at91_private *lp = (struct at91_private *) at91_dev->priv; - struct net_device *net_dev = platform_get_drvdata(pdev); - int phy_irq = lp->board_data.phy_irq_pin; - - if (netif_running(net_dev)) { - clk_enable(lp->ether_clk); - - netif_device_attach(net_dev); - netif_start_queue(net_dev); - - if (phy_irq) - enable_irq(phy_irq); - } - return 0; -} - -#else -#define at91ether_suspend NULL -#define at91ether_resume NULL -#endif - static struct platform_driver at91ether_driver = { .probe = at91ether_probe, .remove = __devexit_p(at91ether_remove), - .suspend = at91ether_suspend, - .resume = at91ether_resume, + /* FIXME: support suspend and resume */ .driver = { .name = DRV_NAME, .owner = THIS_MODULE, diff --git a/drivers/net/arm/at91_ether.h b/drivers/net/arm/at91_ether.h index d1e72e02b..9885735c9 100644 --- a/drivers/net/arm/at91_ether.h +++ b/drivers/net/arm/at91_ether.h @@ -80,7 +80,6 @@ struct at91_private struct net_device_stats stats; struct mii_if_info mii; /* ethtool support */ struct at91_eth_data board_data; /* board-specific configuration */ - struct clk *ether_clk; /* clock */ /* PHY */ unsigned long phy_type; /* type of PHY (PHY_ID) */ diff --git a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c index 312955d07..36475eb27 100644 --- a/drivers/net/arm/ether1.c +++ b/drivers/net/arm/ether1.c @@ -700,7 +700,8 @@ ether1_sendpacket (struct sk_buff *skb, struct net_device *dev) } if (skb->len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) goto out; } diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c index 081074180..f1d5b1027 100644 --- a/drivers/net/arm/ether3.c +++ b/drivers/net/arm/ether3.c @@ -518,7 +518,8 @@ ether3_sendpacket(struct sk_buff *skb, struct net_device *dev) length = (length + 1) & ~1; if (length != skb->len) { - if (skb_padto(skb, length)) + skb = skb_padto(skb, length); + if (skb == NULL) goto out; } diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index 4ca061c2d..e613cc289 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c @@ -35,6 +35,7 @@ response to inb()s from other device probes! */ +#include #include #include #include @@ -901,7 +902,7 @@ MODULE_PARM_DESC(io, "AT1700/FMV18X I/O base address"); MODULE_PARM_DESC(irq, "AT1700/FMV18X IRQ number"); MODULE_PARM_DESC(net_debug, "AT1700/FMV18X debug level (0-6)"); -int __init init_module(void) +int init_module(void) { if (io == 0) printk("at1700: You should not use auto-probing with insmod!\n"); diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index 91783a800..442b2cbeb 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c @@ -804,7 +804,8 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) ++len; if (len > skb->len) { - if (skb_padto(skb, len)) + skb = skb_padto(skb, len); + if (skb == NULL) return 0; } diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 55f6e3f65..14dbad14a 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c @@ -2,16 +2,13 @@ * * Alchemy Au1x00 ethernet driver * - * Copyright 2001-2003, 2006 MontaVista Software Inc. + * Copyright 2001,2002,2003 MontaVista Software Inc. * Copyright 2002 TimeSys Corp. * Added ethtool/mii-tool support, * Copyright 2004 Matt Porter * Update: 2004 Bjoern Riemer, riemer@fokus.fraunhofer.de * or riemer@riemer-nt.de: fixed the link beat detection with * ioctls (SIOCGMIIPHY) - * Copyright 2006 Herbert Valerio Riedel - * converted to use linux-2.6.x's PHY framework - * * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * @@ -35,6 +32,7 @@ * */ +#include #include #include #include @@ -55,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +68,7 @@ static int au1000_debug = 5; static int au1000_debug = 3; #endif -#define DRV_NAME "au1000_eth" +#define DRV_NAME "au1000eth" #define DRV_VERSION "1.5" #define DRV_AUTHOR "Pete Popov " #define DRV_DESC "Au1xxx on-chip Ethernet driver" @@ -83,7 +80,7 @@ MODULE_LICENSE("GPL"); // prototypes static void hard_stop(struct net_device *); static void enable_rx_tx(struct net_device *dev); -static struct net_device * au1000_probe(int port_num); +static struct net_device * au1000_probe(u32 ioaddr, int irq, int port_num); static int au1000_init(struct net_device *); static int au1000_open(struct net_device *); static int au1000_close(struct net_device *); @@ -91,15 +88,17 @@ static int au1000_tx(struct sk_buff *, struct net_device *); static int au1000_rx(struct net_device *); static irqreturn_t au1000_interrupt(int, void *, struct pt_regs *); static void au1000_tx_timeout(struct net_device *); +static int au1000_set_config(struct net_device *dev, struct ifmap *map); static void set_rx_mode(struct net_device *); static struct net_device_stats *au1000_get_stats(struct net_device *); +static void au1000_timer(unsigned long); static int au1000_ioctl(struct net_device *, struct ifreq *, int); static int mdio_read(struct net_device *, int, int); static void mdio_write(struct net_device *, int, int, u16); -static void au1000_adjust_link(struct net_device *); -static void enable_mac(struct net_device *, int); +static void dump_mii(struct net_device *dev, int phy_id); // externs +extern void ack_rise_edge_irq(unsigned int); extern int get_ethernet_addr(char *ethernet_addr); extern void str2eaddr(unsigned char *ea, unsigned char *str); extern char * __init prom_getcmdline(void); @@ -127,83 +126,705 @@ static unsigned char au1000_mac_addr[6] __devinitdata = { 0x00, 0x50, 0xc2, 0x0c, 0x30, 0x00 }; +#define nibswap(x) ((((x) >> 4) & 0x0f) | (((x) << 4) & 0xf0)) +#define RUN_AT(x) (jiffies + (x)) + +// For reading/writing 32-bit words from/to DMA memory +#define cpu_to_dma32 cpu_to_be32 +#define dma32_to_cpu be32_to_cpu + struct au1000_private *au_macs[NUM_ETH_INTERFACES]; -/* - * board-specific configurations - * - * PHY detection algorithm - * - * If AU1XXX_PHY_STATIC_CONFIG is undefined, the PHY setup is - * autodetected: - * - * mii_probe() first searches the current MAC's MII bus for a PHY, - * selecting the first (or last, if AU1XXX_PHY_SEARCH_HIGHEST_ADDR is - * defined) PHY address not already claimed by another netdev. - * - * If nothing was found that way when searching for the 2nd ethernet - * controller's PHY and AU1XXX_PHY1_SEARCH_ON_MAC0 is defined, then - * the first MII bus is searched as well for an unclaimed PHY; this is - * needed in case of a dual-PHY accessible only through the MAC0's MII - * bus. - * - * Finally, if no PHY is found, then the corresponding ethernet - * controller is not registered to the network subsystem. +/* FIXME + * All of the PHY code really should be detached from the MAC + * code. */ -/* autodetection defaults */ -#undef AU1XXX_PHY_SEARCH_HIGHEST_ADDR -#define AU1XXX_PHY1_SEARCH_ON_MAC0 +/* Default advertise */ +#define GENMII_DEFAULT_ADVERTISE \ + ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | \ + ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | \ + ADVERTISED_Autoneg -/* static PHY setup - * - * most boards PHY setup should be detectable properly with the - * autodetection algorithm in mii_probe(), but in some cases (e.g. if - * you have a switch attached, or want to use the PHY's interrupt - * notification capabilities) you can provide a static PHY - * configuration here - * - * IRQs may only be set, if a PHY address was configured - * If a PHY address is given, also a bus id is required to be set - * - * ps: make sure the used irqs are configured properly in the board - * specific irq-map - */ +#define GENMII_DEFAULT_FEATURES \ + SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \ + SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \ + SUPPORTED_Autoneg + +int bcm_5201_init(struct net_device *dev, int phy_addr) +{ + s16 data; + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) + dump_mii(dev, phy_addr); + return 0; +} + +int bcm_5201_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +bcm_5201_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "bcm_5201_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL); + if (mii_data & MII_AUX_100) { + if (mii_data & MII_AUX_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int lsi_80227_init(struct net_device *dev, int phy_addr) +{ + if (au1000_debug > 4) + printk("lsi_80227_init\n"); + + /* restart auto-negotiation */ + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO); // | MII_CNTL_FDX); + mdelay(1); + + /* set up LEDs to correct display */ +#ifdef CONFIG_MIPS_MTX1 + mdio_write(dev, phy_addr, 17, 0xff80); +#else + mdio_write(dev, phy_addr, 17, 0xffc0); +#endif + + if (au1000_debug > 4) + dump_mii(dev, phy_addr); + return 0; +} + +int lsi_80227_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) { + printk("lsi_80227_reset\n"); + dump_mii(dev, phy_addr); + } + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +lsi_80227_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "lsi_80227_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_LSI_PHY_STAT); + if (mii_data & MII_LSI_PHY_STAT_SPD) { + if (mii_data & MII_LSI_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int am79c901_init(struct net_device *dev, int phy_addr) +{ + printk("am79c901_init\n"); + return 0; +} + +int am79c901_reset(struct net_device *dev, int phy_addr) +{ + printk("am79c901_reset\n"); + return 0; +} + +int +am79c901_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + return 0; +} + +int am79c874_init(struct net_device *dev, int phy_addr) +{ + s16 data; + + /* 79c874 has quit resembled bit assignments to BCM5201 */ + if (au1000_debug > 4) + printk("am79c847_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int am79c874_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("am79c874_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +am79c874_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + // printk("am79c874_status\n"); + if (!dev) { + printk(KERN_ERR "am79c874_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AMD_PHY_STAT); + if (mii_data & MII_AMD_PHY_STAT_SPD) { + if (mii_data & MII_AMD_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int lxt971a_init(struct net_device *dev, int phy_addr) +{ + if (au1000_debug > 4) + printk("lxt971a_init\n"); + + /* restart auto-negotiation */ + mdio_write(dev, phy_addr, MII_CONTROL, + MII_CNTL_F100 | MII_CNTL_AUTO | MII_CNTL_RST_AUTO | MII_CNTL_FDX); + + /* set up LEDs to correct display */ + mdio_write(dev, phy_addr, 20, 0x0422); + + if (au1000_debug > 4) + dump_mii(dev, phy_addr); + return 0; +} + +int lxt971a_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) { + printk("lxt971a_reset\n"); + dump_mii(dev, phy_addr); + } + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +lxt971a_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "lxt971a_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_INTEL_PHY_STAT); + if (mii_data & MII_INTEL_PHY_STAT_SPD) { + if (mii_data & MII_INTEL_PHY_STAT_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int ks8995m_init(struct net_device *dev, int phy_addr) +{ + s16 data; + +// printk("ks8995m_init\n"); + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + + return 0; +} + +int ks8995m_reset(struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + +// printk("ks8995m_reset\n"); + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int ks8995m_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "ks8995m_status error: NULL dev\n"); + return -1; + } + aup = (struct au1000_private *) dev->priv; + + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, MII_AUX_CNTRL); + if (mii_data & MII_AUX_100) { + if (mii_data & MII_AUX_FDX) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + +int +smsc_83C185_init (struct net_device *dev, int phy_addr) +{ + s16 data; + + if (au1000_debug > 4) + printk("smsc_83C185_init\n"); + + /* Stop auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, data & ~MII_CNTL_AUTO); + + /* Set advertisement to 10/100 and Half/Full duplex + * (full capabilities) */ + data = mdio_read(dev, phy_addr, MII_ANADV); + data |= MII_NWAY_TX | MII_NWAY_TX_FDX | MII_NWAY_T_FDX | MII_NWAY_T; + mdio_write(dev, phy_addr, MII_ANADV, data); + + /* Restart auto-negotiation */ + data = mdio_read(dev, phy_addr, MII_CONTROL); + data |= MII_CNTL_RST_AUTO | MII_CNTL_AUTO; + + mdio_write(dev, phy_addr, MII_CONTROL, data); + + if (au1000_debug > 4) dump_mii(dev, phy_addr); + return 0; +} + +int +smsc_83C185_reset (struct net_device *dev, int phy_addr) +{ + s16 mii_control, timeout; + + if (au1000_debug > 4) + printk("smsc_83C185_reset\n"); + + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + mdio_write(dev, phy_addr, MII_CONTROL, mii_control | MII_CNTL_RESET); + mdelay(1); + for (timeout = 100; timeout > 0; --timeout) { + mii_control = mdio_read(dev, phy_addr, MII_CONTROL); + if ((mii_control & MII_CNTL_RESET) == 0) + break; + mdelay(1); + } + if (mii_control & MII_CNTL_RESET) { + printk(KERN_ERR "%s PHY reset timeout !\n", dev->name); + return -1; + } + return 0; +} + +int +smsc_83C185_status (struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + u16 mii_data; + struct au1000_private *aup; + + if (!dev) { + printk(KERN_ERR "smsc_83C185_status error: NULL dev\n"); + return -1; + } + + aup = (struct au1000_private *) dev->priv; + mii_data = mdio_read(dev, aup->phy_addr, MII_STATUS); + + if (mii_data & MII_STAT_LINK) { + *link = 1; + mii_data = mdio_read(dev, aup->phy_addr, 0x1f); + if (mii_data & (1<<3)) { + if (mii_data & (1<<4)) { + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + } + else { + *speed = IF_PORT_100BASETX; + dev->if_port = IF_PORT_100BASETX; + } + } + else { + *speed = IF_PORT_10BASET; + dev->if_port = IF_PORT_10BASET; + } + } + else { + *link = 0; + *speed = 0; + dev->if_port = IF_PORT_UNKNOWN; + } + return 0; +} + + +#ifdef CONFIG_MIPS_BOSPORUS +int stub_init(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_init\n"); + return 0; +} + +int stub_reset(struct net_device *dev, int phy_addr) +{ + //printk("PHY stub_reset\n"); + return 0; +} + +int +stub_status(struct net_device *dev, int phy_addr, u16 *link, u16 *speed) +{ + //printk("PHY stub_status\n"); + *link = 1; + /* hmmm, revisit */ + *speed = IF_PORT_100BASEFX; + dev->if_port = IF_PORT_100BASEFX; + return 0; +} +#endif + +struct phy_ops bcm_5201_ops = { + bcm_5201_init, + bcm_5201_reset, + bcm_5201_status, +}; + +struct phy_ops am79c874_ops = { + am79c874_init, + am79c874_reset, + am79c874_status, +}; + +struct phy_ops am79c901_ops = { + am79c901_init, + am79c901_reset, + am79c901_status, +}; + +struct phy_ops lsi_80227_ops = { + lsi_80227_init, + lsi_80227_reset, + lsi_80227_status, +}; -#if defined(CONFIG_MIPS_BOSPORUS) -/* - * Micrel/Kendin 5 port switch attached to MAC0, - * MAC0 is associated with PHY address 5 (== WAN port) - * MAC1 is not associated with any PHY, since it's connected directly - * to the switch. - * no interrupts are used - */ -# define AU1XXX_PHY_STATIC_CONFIG +struct phy_ops lxt971a_ops = { + lxt971a_init, + lxt971a_reset, + lxt971a_status, +}; -# define AU1XXX_PHY0_ADDR 5 -# define AU1XXX_PHY0_BUSID 0 -# undef AU1XXX_PHY0_IRQ +struct phy_ops ks8995m_ops = { + ks8995m_init, + ks8995m_reset, + ks8995m_status, +}; + +struct phy_ops smsc_83C185_ops = { + smsc_83C185_init, + smsc_83C185_reset, + smsc_83C185_status, +}; -# undef AU1XXX_PHY1_ADDR -# undef AU1XXX_PHY1_BUSID -# undef AU1XXX_PHY1_IRQ +#ifdef CONFIG_MIPS_BOSPORUS +struct phy_ops stub_ops = { + stub_init, + stub_reset, + stub_status, +}; #endif -#if defined(AU1XXX_PHY0_BUSID) && (AU1XXX_PHY0_BUSID > 0) -# error MAC0-associated PHY attached 2nd MACs MII bus not supported yet +static struct mii_chip_info { + const char * name; + u16 phy_id0; + u16 phy_id1; + struct phy_ops *phy_ops; + int dual_phy; +} mii_chip_table[] = { + {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0}, + {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0}, + {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1}, + {"NS DP83847 PHY", 0x2000, 0x5c30, &bcm_5201_ops ,0}, + {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0}, + {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0}, + {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0}, + {"Intel LXT971A Dual Speed PHY",0x0013,0x78e2, &lxt971a_ops,0}, + {"Kendin KS8995M 10/100 BaseT PHY",0x0022,0x1450, &ks8995m_ops,0}, + {"SMSC LAN83C185 10/100 BaseT PHY",0x0007,0xc0a3, &smsc_83C185_ops,0}, +#ifdef CONFIG_MIPS_BOSPORUS + {"Stub", 0x1234, 0x5678, &stub_ops }, #endif + {0,}, +}; -/* - * MII operations - */ -static int mdio_read(struct net_device *dev, int phy_addr, int reg) +static int mdio_read(struct net_device *dev, int phy_id, int reg) { struct au1000_private *aup = (struct au1000_private *) dev->priv; - volatile u32 *const mii_control_reg = &aup->mac->mii_control; - volatile u32 *const mii_data_reg = &aup->mac->mii_data; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; + #ifdef CONFIG_BCM5222_DUAL_PHY + /* First time we probe, it's for the mac0 phy. + * Since we haven't determined yet that we have a dual phy, + * aup->mii->mii_control_reg won't be setup and we'll + * default to the else statement. + * By the time we probe for the mac1 phy, the mii_control_reg + * will be setup to be the address of the mac0 phy control since + * both phys are controlled through mac0. + */ + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { @@ -214,7 +835,7 @@ static int mdio_read(struct net_device *dev, int phy_addr, int reg) } mii_control = MAC_SET_MII_SELECT_REG(reg) | - MAC_SET_MII_SELECT_PHY(phy_addr) | MAC_MII_READ; + MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_READ; *mii_control_reg = mii_control; @@ -230,14 +851,32 @@ static int mdio_read(struct net_device *dev, int phy_addr, int reg) return (int)*mii_data_reg; } -static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value) +static void mdio_write(struct net_device *dev, int phy_id, int reg, u16 value) { struct au1000_private *aup = (struct au1000_private *) dev->priv; - volatile u32 *const mii_control_reg = &aup->mac->mii_control; - volatile u32 *const mii_data_reg = &aup->mac->mii_data; + volatile u32 *mii_control_reg; + volatile u32 *mii_data_reg; u32 timedout = 20; u32 mii_control; + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mii && aup->mii->mii_control_reg) { + mii_control_reg = aup->mii->mii_control_reg; + mii_data_reg = aup->mii->mii_data_reg; + } + else if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + /* assume both phys are controlled through mac0 */ + mii_control_reg = au_macs[0]->mii->mii_control_reg; + mii_data_reg = au_macs[0]->mii->mii_data_reg; + } + else + #endif + { + /* default control and data reg addresses */ + mii_control_reg = &aup->mac->mii_control; + mii_data_reg = &aup->mac->mii_data; + } + while (*mii_control_reg & MAC_MII_BUSY) { mdelay(1); if (--timedout == 0) { @@ -248,145 +887,165 @@ static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value) } mii_control = MAC_SET_MII_SELECT_REG(reg) | - MAC_SET_MII_SELECT_PHY(phy_addr) | MAC_MII_WRITE; + MAC_SET_MII_SELECT_PHY(phy_id) | MAC_MII_WRITE; *mii_data_reg = value; *mii_control_reg = mii_control; } -static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) -{ - /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does - * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */ - struct net_device *const dev = bus->priv; - - enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ - return mdio_read(dev, phy_addr, regnum); -} - -static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, - u16 value) -{ - struct net_device *const dev = bus->priv; - - enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ - mdio_write(dev, phy_addr, regnum, value); - return 0; -} -static int mdiobus_reset(struct mii_bus *bus) +static void dump_mii(struct net_device *dev, int phy_id) { - struct net_device *const dev = bus->priv; + int i, val; - enable_mac(dev, 0); /* make sure the MAC associated with this - * mii_bus is enabled */ - return 0; + for (i = 0; i < 7; i++) { + if ((val = mdio_read(dev, phy_id, i)) >= 0) + printk("%s: MII Reg %d=%x\n", dev->name, i, val); + } + for (i = 16; i < 25; i++) { + if ((val = mdio_read(dev, phy_id, i)) >= 0) + printk("%s: MII Reg %d=%x\n", dev->name, i, val); + } } -static int mii_probe (struct net_device *dev) +static int mii_probe (struct net_device * dev) { - struct au1000_private *const aup = (struct au1000_private *) dev->priv; - struct phy_device *phydev = NULL; - -#if defined(AU1XXX_PHY_STATIC_CONFIG) - BUG_ON(aup->mac_id < 0 || aup->mac_id > 1); - - if(aup->mac_id == 0) { /* get PHY0 */ -# if defined(AU1XXX_PHY0_ADDR) - phydev = au_macs[AU1XXX_PHY0_BUSID]->mii_bus.phy_map[AU1XXX_PHY0_ADDR]; -# else - printk (KERN_INFO DRV_NAME ":%s: using PHY-less setup\n", - dev->name); - return 0; -# endif /* defined(AU1XXX_PHY0_ADDR) */ - } else if (aup->mac_id == 1) { /* get PHY1 */ -# if defined(AU1XXX_PHY1_ADDR) - phydev = au_macs[AU1XXX_PHY1_BUSID]->mii_bus.phy_map[AU1XXX_PHY1_ADDR]; -# else - printk (KERN_INFO DRV_NAME ":%s: using PHY-less setup\n", - dev->name); - return 0; -# endif /* defined(AU1XXX_PHY1_ADDR) */ - } - -#else /* defined(AU1XXX_PHY_STATIC_CONFIG) */ + struct au1000_private *aup = (struct au1000_private *) dev->priv; int phy_addr; +#ifdef CONFIG_MIPS_BOSPORUS + int phy_found=0; +#endif - /* find the first (lowest address) PHY on the current MAC's MII bus */ - for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) - if (aup->mii_bus.phy_map[phy_addr]) { - phydev = aup->mii_bus.phy_map[phy_addr]; -# if !defined(AU1XXX_PHY_SEARCH_HIGHEST_ADDR) - break; /* break out with first one found */ -# endif - } - -# if defined(AU1XXX_PHY1_SEARCH_ON_MAC0) - /* try harder to find a PHY */ - if (!phydev && (aup->mac_id == 1)) { - /* no PHY found, maybe we have a dual PHY? */ - printk (KERN_INFO DRV_NAME ": no PHY found on MAC1, " - "let's see if it's attached to MAC0...\n"); - - BUG_ON(!au_macs[0]); - - /* find the first (lowest address) non-attached PHY on - * the MAC0 MII bus */ - for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { - struct phy_device *const tmp_phydev = - au_macs[0]->mii_bus.phy_map[phy_addr]; - - if (!tmp_phydev) - continue; /* no PHY here... */ - - if (tmp_phydev->attached_dev) - continue; /* already claimed by MAC0 */ + /* search for total of 32 possible mii phy addresses */ + for (phy_addr = 0; phy_addr < 32; phy_addr++) { + u16 mii_status; + u16 phy_id0, phy_id1; + int i; - phydev = tmp_phydev; - break; /* found it */ + #ifdef CONFIG_BCM5222_DUAL_PHY + /* Mask the already found phy, try next one */ + if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) { + if (au_macs[0]->phy_addr == phy_addr) + continue; + } + #endif + + mii_status = mdio_read(dev, phy_addr, MII_STATUS); + if (mii_status == 0xffff || mii_status == 0x0000) + /* the mii is not accessable, try next one */ + continue; + + phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0); + phy_id1 = mdio_read(dev, phy_addr, MII_PHY_ID1); + + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + if (phy_id0 == mii_chip_table[i].phy_id0 && + phy_id1 == mii_chip_table[i].phy_id1) { + struct mii_phy * mii_phy = aup->mii; + + printk(KERN_INFO "%s: %s at phy address %d\n", + dev->name, mii_chip_table[i].name, + phy_addr); +#ifdef CONFIG_MIPS_BOSPORUS + phy_found = 1; +#endif + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->want_autoneg = 1; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); + + // Check for dual-phy and then store required + // values and set indicators. We need to do + // this now since mdio_{read,write} need the + // control and data register addresses. + #ifdef CONFIG_BCM5222_DUAL_PHY + if ( mii_chip_table[i].dual_phy) { + + /* assume both phys are controlled + * through MAC0. Board specific? */ + + /* sanity check */ + if (!au_macs[0] || !au_macs[0]->mii) + return -1; + aup->mii->mii_control_reg = (u32 *) + &au_macs[0]->mac->mii_control; + aup->mii->mii_data_reg = (u32 *) + &au_macs[0]->mac->mii_data; + } + #endif + goto found; + } } } -# endif /* defined(AU1XXX_PHY1_SEARCH_OTHER_BUS) */ +found: + +#ifdef CONFIG_MIPS_BOSPORUS + /* This is a workaround for the Micrel/Kendin 5 port switch + The second MAC doesn't see a PHY connected... so we need to + trick it into thinking we have one. + + If this kernel is run on another Au1500 development board + the stub will be found as well as the actual PHY. However, + the last found PHY will be used... usually at Addr 31 (Db1500). + */ + if ( (!phy_found) ) + { + u16 phy_id0, phy_id1; + int i; -#endif /* defined(AU1XXX_PHY_STATIC_CONFIG) */ - if (!phydev) { - printk (KERN_ERR DRV_NAME ":%s: no PHY found\n", dev->name); - return -1; + phy_id0 = 0x1234; + phy_id1 = 0x5678; + + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + if (phy_id0 == mii_chip_table[i].phy_id0 && + phy_id1 == mii_chip_table[i].phy_id1) { + struct mii_phy * mii_phy; + + printk(KERN_INFO "%s: %s at phy address %d\n", + dev->name, mii_chip_table[i].name, + phy_addr); + mii_phy = kmalloc(sizeof(struct mii_phy), + GFP_KERNEL); + if (mii_phy) { + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + mii_phy->next = aup->mii; + aup->phy_ops = + mii_chip_table[i].phy_ops; + aup->mii = mii_phy; + aup->phy_ops->phy_init(dev,phy_addr); + } else { + printk(KERN_ERR "%s: out of memory\n", + dev->name); + return -1; + } + mii_phy->chip_info = mii_chip_table+i; + aup->phy_addr = phy_addr; + aup->phy_ops = mii_chip_table[i].phy_ops; + aup->phy_ops->phy_init(dev,phy_addr); + break; + } + } } - - /* now we are supposed to have a proper phydev, to attach to... */ - BUG_ON(!phydev); - BUG_ON(phydev->attached_dev); - - phydev = phy_connect(dev, phydev->dev.bus_id, &au1000_adjust_link, 0); - - if (IS_ERR(phydev)) { - printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); - return PTR_ERR(phydev); + if (aup->mac_id == 0) { + /* the Bosporus phy responds to addresses 0-5 but + * 5 is the correct one. + */ + aup->phy_addr = 5; } +#endif - /* mask with MAC supported features */ - phydev->supported &= (SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full - | SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full - | SUPPORTED_Autoneg - /* | SUPPORTED_Pause | SUPPORTED_Asym_Pause */ - | SUPPORTED_MII - | SUPPORTED_TP); - - phydev->advertising = phydev->supported; - - aup->old_link = 0; - aup->old_speed = 0; - aup->old_duplex = -1; - aup->phy_dev = phydev; + if (aup->mii->chip_info == NULL) { + printk(KERN_ERR "%s: Au1x No known MII transceivers found!\n", + dev->name); + return -1; + } - printk(KERN_INFO "%s: attached PHY driver [%s] " - "(mii_bus:phy_addr=%s, irq=%d)\n", - dev->name, phydev->drv->name, phydev->dev.bus_id, phydev->irq); + printk(KERN_INFO "%s: Using %s as default\n", + dev->name, aup->mii->chip_info->name); return 0; } @@ -438,38 +1097,35 @@ static void hard_stop(struct net_device *dev) au_sync_delay(10); } -static void enable_mac(struct net_device *dev, int force_reset) + +static void reset_mac(struct net_device *dev) { - unsigned long flags; + int i; + u32 flags; struct au1000_private *aup = (struct au1000_private *) dev->priv; + if (au1000_debug > 4) + printk(KERN_INFO "%s: reset mac, aup %x\n", + dev->name, (unsigned)aup); + spin_lock_irqsave(&aup->lock, flags); + if (aup->timer.function == &au1000_timer) {/* check if timer initted */ + del_timer(&aup->timer); + } - if(force_reset || (!aup->mac_enabled)) { + hard_stop(dev); + #ifdef CONFIG_BCM5222_DUAL_PHY + if (aup->mac_id != 0) { + #endif + /* If BCM5222, we can't leave MAC0 in reset because then + * we can't access the dual phy for ETH1 */ *aup->enable = MAC_EN_CLOCK_ENABLE; au_sync_delay(2); - *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2 - | MAC_EN_CLOCK_ENABLE); + *aup->enable = 0; au_sync_delay(2); - - aup->mac_enabled = 1; + #ifdef CONFIG_BCM5222_DUAL_PHY } - - spin_unlock_irqrestore(&aup->lock, flags); -} - -static void reset_mac_unlocked(struct net_device *dev) -{ - struct au1000_private *const aup = (struct au1000_private *) dev->priv; - int i; - - hard_stop(dev); - - *aup->enable = MAC_EN_CLOCK_ENABLE; - au_sync_delay(2); - *aup->enable = 0; - au_sync_delay(2); - + #endif aup->tx_full = 0; for (i = 0; i < NUM_RX_DMA; i++) { /* reset control bits */ @@ -479,27 +1135,10 @@ static void reset_mac_unlocked(struct net_device *dev) /* reset control bits */ aup->tx_dma_ring[i]->buff_stat &= ~0xf; } - - aup->mac_enabled = 0; - -} - -static void reset_mac(struct net_device *dev) -{ - struct au1000_private *const aup = (struct au1000_private *) dev->priv; - unsigned long flags; - - if (au1000_debug > 4) - printk(KERN_INFO "%s: reset mac, aup %x\n", - dev->name, (unsigned)aup); - - spin_lock_irqsave(&aup->lock, flags); - - reset_mac_unlocked (dev); - spin_unlock_irqrestore(&aup->lock, flags); } + /* * Setup the receive and transmit "rings". These pointers are the addresses * of the rx and tx MAC DMA registers so they are fixed by the hardware -- @@ -521,27 +1160,12 @@ setup_hw_rings(struct au1000_private *aup, u32 rx_base, u32 tx_base) } static struct { + int port; u32 base_addr; u32 macen_addr; int irq; struct net_device *dev; -} iflist[2] = { -#ifdef CONFIG_SOC_AU1000 - {AU1000_ETH0_BASE, AU1000_MAC0_ENABLE, AU1000_MAC0_DMA_INT}, - {AU1000_ETH1_BASE, AU1000_MAC1_ENABLE, AU1000_MAC1_DMA_INT} -#endif -#ifdef CONFIG_SOC_AU1100 - {AU1100_ETH0_BASE, AU1100_MAC0_ENABLE, AU1100_MAC0_DMA_INT} -#endif -#ifdef CONFIG_SOC_AU1500 - {AU1500_ETH0_BASE, AU1500_MAC0_ENABLE, AU1500_MAC0_DMA_INT}, - {AU1500_ETH1_BASE, AU1500_MAC1_ENABLE, AU1500_MAC1_DMA_INT} -#endif -#ifdef CONFIG_SOC_AU1550 - {AU1550_ETH0_BASE, AU1550_MAC0_ENABLE, AU1550_MAC0_DMA_INT}, - {AU1550_ETH1_BASE, AU1550_MAC1_ENABLE, AU1550_MAC1_DMA_INT} -#endif -}; +} iflist[2]; static int num_ifs; @@ -552,14 +1176,58 @@ static int num_ifs; */ static int __init au1000_init_module(void) { + struct cpuinfo_mips *c = ¤t_cpu_data; int ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4); struct net_device *dev; int i, found_one = 0; - num_ifs = NUM_ETH_INTERFACES - ni; - + switch (c->cputype) { +#ifdef CONFIG_SOC_AU1000 + case CPU_AU1000: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1000_ETH0_BASE; + iflist[1].base_addr = AU1000_ETH1_BASE; + iflist[0].macen_addr = AU1000_MAC0_ENABLE; + iflist[1].macen_addr = AU1000_MAC1_ENABLE; + iflist[0].irq = AU1000_MAC0_DMA_INT; + iflist[1].irq = AU1000_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1100 + case CPU_AU1100: + num_ifs = 1 - ni; + iflist[0].base_addr = AU1100_ETH0_BASE; + iflist[0].macen_addr = AU1100_MAC0_ENABLE; + iflist[0].irq = AU1100_MAC0_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1500 + case CPU_AU1500: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1500_ETH0_BASE; + iflist[1].base_addr = AU1500_ETH1_BASE; + iflist[0].macen_addr = AU1500_MAC0_ENABLE; + iflist[1].macen_addr = AU1500_MAC1_ENABLE; + iflist[0].irq = AU1500_MAC0_DMA_INT; + iflist[1].irq = AU1500_MAC1_DMA_INT; + break; +#endif +#ifdef CONFIG_SOC_AU1550 + case CPU_AU1550: + num_ifs = 2 - ni; + iflist[0].base_addr = AU1550_ETH0_BASE; + iflist[1].base_addr = AU1550_ETH1_BASE; + iflist[0].macen_addr = AU1550_MAC0_ENABLE; + iflist[1].macen_addr = AU1550_MAC1_ENABLE; + iflist[0].irq = AU1550_MAC0_DMA_INT; + iflist[1].irq = AU1550_MAC1_DMA_INT; + break; +#endif + default: + num_ifs = 0; + } for(i = 0; i < num_ifs; i++) { - dev = au1000_probe(i); + dev = au1000_probe(iflist[i].base_addr, iflist[i].irq, i); iflist[i].dev = dev; if (dev) found_one++; @@ -569,31 +1237,178 @@ static int __init au1000_init_module(void) return 0; } -/* - * ethtool operations - */ +static int au1000_setup_aneg(struct net_device *dev, u32 advertise) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl, adv; + + /* Setup standard advertise */ + adv = mdio_read(dev, aup->phy_addr, MII_ADVERTISE); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); + if (advertise & ADVERTISED_10baseT_Half) + adv |= ADVERTISE_10HALF; + if (advertise & ADVERTISED_10baseT_Full) + adv |= ADVERTISE_10FULL; + if (advertise & ADVERTISED_100baseT_Half) + adv |= ADVERTISE_100HALF; + if (advertise & ADVERTISED_100baseT_Full) + adv |= ADVERTISE_100FULL; + mdio_write(dev, aup->phy_addr, MII_ADVERTISE, adv); + + /* Start/Restart aneg */ + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); -static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) + return 0; +} + +static int au1000_setup_forced(struct net_device *dev, int speed, int fd) { struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 ctl; + + ctl = mdio_read(dev, aup->phy_addr, MII_BMCR); + ctl &= ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_ANENABLE); + + /* First reset the PHY */ + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl | BMCR_RESET); + + /* Select speed & duplex */ + switch (speed) { + case SPEED_10: + break; + case SPEED_100: + ctl |= BMCR_SPEED100; + break; + case SPEED_1000: + default: + return -EINVAL; + } + if (fd == DUPLEX_FULL) + ctl |= BMCR_FULLDPLX; + mdio_write(dev, aup->phy_addr, MII_BMCR, ctl); + + return 0; +} - if (aup->phy_dev) - return phy_ethtool_gset(aup->phy_dev, cmd); - return -EINVAL; +static void +au1000_start_link(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + u32 advertise; + int autoneg; + int forced_speed; + int forced_duplex; + + /* Default advertise */ + advertise = GENMII_DEFAULT_ADVERTISE; + autoneg = aup->want_autoneg; + forced_speed = SPEED_100; + forced_duplex = DUPLEX_FULL; + + /* Setup link parameters */ + if (cmd) { + if (cmd->autoneg == AUTONEG_ENABLE) { + advertise = cmd->advertising; + autoneg = 1; + } else { + autoneg = 0; + + forced_speed = cmd->speed; + forced_duplex = cmd->duplex; + } + } + + /* Configure PHY & start aneg */ + aup->want_autoneg = autoneg; + if (autoneg) + au1000_setup_aneg(dev, advertise); + else + au1000_setup_forced(dev, forced_speed, forced_duplex); + mod_timer(&aup->timer, jiffies + HZ); } -static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int au1000_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 link, speed; + + cmd->supported = GENMII_DEFAULT_FEATURES; + cmd->advertising = GENMII_DEFAULT_ADVERTISE; + cmd->port = PORT_MII; + cmd->transceiver = XCVR_EXTERNAL; + cmd->phy_address = aup->phy_addr; + spin_lock_irq(&aup->lock); + cmd->autoneg = aup->want_autoneg; + aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed); + if ((speed == IF_PORT_100BASETX) || (speed == IF_PORT_100BASEFX)) + cmd->speed = SPEED_100; + else if (speed == IF_PORT_10BASET) + cmd->speed = SPEED_10; + if (link && (dev->if_port == IF_PORT_100BASEFX)) + cmd->duplex = DUPLEX_FULL; + else + cmd->duplex = DUPLEX_HALF; + spin_unlock_irq(&aup->lock); + return 0; +} - if (!capable(CAP_NET_ADMIN)) - return -EPERM; +static int au1000_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; + unsigned long features = GENMII_DEFAULT_FEATURES; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (cmd->autoneg != AUTONEG_ENABLE && cmd->autoneg != AUTONEG_DISABLE) + return -EINVAL; + if (cmd->autoneg == AUTONEG_ENABLE && cmd->advertising == 0) + return -EINVAL; + if (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) + return -EINVAL; + if (cmd->autoneg == AUTONEG_DISABLE) + switch (cmd->speed) { + case SPEED_10: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_10baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_10baseT_Full) == 0) + return -EINVAL; + break; + case SPEED_100: + if (cmd->duplex == DUPLEX_HALF && + (features & SUPPORTED_100baseT_Half) == 0) + return -EINVAL; + if (cmd->duplex == DUPLEX_FULL && + (features & SUPPORTED_100baseT_Full) == 0) + return -EINVAL; + break; + default: + return -EINVAL; + } + else if ((features & SUPPORTED_Autoneg) == 0) + return -EINVAL; + + spin_lock_irq(&aup->lock); + au1000_start_link(dev, cmd); + spin_unlock_irq(&aup->lock); + return 0; +} - if (aup->phy_dev) - return phy_ethtool_sset(aup->phy_dev, cmd); +static int au1000_nway_reset(struct net_device *dev) +{ + struct au1000_private *aup = (struct au1000_private *)dev->priv; - return -EINVAL; + if (!aup->want_autoneg) + return -EINVAL; + spin_lock_irq(&aup->lock); + au1000_start_link(dev, NULL); + spin_unlock_irq(&aup->lock); + return 0; } static void @@ -608,14 +1423,21 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) info->regdump_len = 0; } +static u32 au1000_get_link(struct net_device *dev) +{ + return netif_carrier_ok(dev); +} + static struct ethtool_ops au1000_ethtool_ops = { .get_settings = au1000_get_settings, .set_settings = au1000_set_settings, .get_drvinfo = au1000_get_drvinfo, - .get_link = ethtool_op_get_link, + .nway_reset = au1000_nway_reset, + .get_link = au1000_get_link }; -static struct net_device * au1000_probe(int port_num) +static struct net_device * +au1000_probe(u32 ioaddr, int irq, int port_num) { static unsigned version_printed = 0; struct au1000_private *aup = NULL; @@ -623,115 +1445,106 @@ static struct net_device * au1000_probe(int port_num) db_dest_t *pDB, *pDBfree; char *pmac, *argptr; char ethaddr[6]; - int irq, i, err; - u32 base, macen; - - if (port_num >= NUM_ETH_INTERFACES) - return NULL; + int i, err; - base = CPHYSADDR(iflist[port_num].base_addr ); - macen = CPHYSADDR(iflist[port_num].macen_addr); - irq = iflist[port_num].irq; - - if (!request_mem_region( base, MAC_IOSIZE, "Au1x00 ENET") || - !request_mem_region(macen, 4, "Au1x00 ENET")) + if (!request_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE, "Au1x00 ENET")) return NULL; - if (version_printed++ == 0) + if (version_printed++ == 0) printk("%s version %s %s\n", DRV_NAME, DRV_VERSION, DRV_AUTHOR); dev = alloc_etherdev(sizeof(struct au1000_private)); if (!dev) { - printk(KERN_ERR "%s: alloc_etherdev failed\n", DRV_NAME); + printk (KERN_ERR "au1000 eth: alloc_etherdev failed\n"); return NULL; } - if ((err = register_netdev(dev)) != 0) { - printk(KERN_ERR "%s: Cannot register net device, error %d\n", - DRV_NAME, err); + if ((err = register_netdev(dev))) { + printk(KERN_ERR "Au1x_eth Cannot register net device err %d\n", + err); free_netdev(dev); return NULL; } - printk("%s: Au1xx0 Ethernet found at 0x%x, irq %d\n", - dev->name, base, irq); + printk("%s: Au1x Ethernet found at 0x%x, irq %d\n", + dev->name, ioaddr, irq); aup = dev->priv; /* Allocate the data buffers */ /* Snooping works fine with eth on all au1xxx */ - aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE * - (NUM_TX_BUFFS + NUM_RX_BUFFS), - &aup->dma_addr, 0); + aup->vaddr = (u32)dma_alloc_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + &aup->dma_addr, + 0); if (!aup->vaddr) { free_netdev(dev); - release_mem_region( base, MAC_IOSIZE); - release_mem_region(macen, 4); + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); return NULL; } /* aup->mac is the base address of the MAC's registers */ - aup->mac = (volatile mac_reg_t *)iflist[port_num].base_addr; - + aup->mac = (volatile mac_reg_t *)((unsigned long)ioaddr); /* Setup some variables for quick register address access */ - aup->enable = (volatile u32 *)iflist[port_num].macen_addr; - aup->mac_id = port_num; - au_macs[port_num] = aup; - - if (port_num == 0) { - /* Check the environment variables first */ - if (get_ethernet_addr(ethaddr) == 0) + if (ioaddr == iflist[0].base_addr) + { + /* check env variables first */ + if (!get_ethernet_addr(ethaddr)) { memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); - else { + } else { /* Check command line */ argptr = prom_getcmdline(); - if ((pmac = strstr(argptr, "ethaddr=")) == NULL) - printk(KERN_INFO "%s: No MAC address found\n", - dev->name); - /* Use the hard coded MAC addresses */ - else { + if ((pmac = strstr(argptr, "ethaddr=")) == NULL) { + printk(KERN_INFO "%s: No mac address found\n", + dev->name); + /* use the hard coded mac addresses */ + } else { str2eaddr(ethaddr, pmac + strlen("ethaddr=")); memcpy(au1000_mac_addr, ethaddr, - sizeof(au1000_mac_addr)); + sizeof(au1000_mac_addr)); } } - + aup->enable = (volatile u32 *) + ((unsigned long)iflist[0].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); - } else if (port_num == 1) + aup->mac_id = 0; + au_macs[0] = aup; + } + else + if (ioaddr == iflist[1].base_addr) + { + aup->enable = (volatile u32 *) + ((unsigned long)iflist[1].macen_addr); + memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); + dev->dev_addr[4] += 0x10; setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR); + aup->mac_id = 1; + au_macs[1] = aup; + } + else + { + printk(KERN_ERR "%s: bad ioaddr\n", dev->name); + } - /* - * Assign to the Ethernet ports two consecutive MAC addresses - * to match those that are printed on their stickers - */ - memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr)); - dev->dev_addr[5] += port_num; - - *aup->enable = 0; - aup->mac_enabled = 0; - - aup->mii_bus.priv = dev; - aup->mii_bus.read = mdiobus_read; - aup->mii_bus.write = mdiobus_write; - aup->mii_bus.reset = mdiobus_reset; - aup->mii_bus.name = "au1000_eth_mii"; - aup->mii_bus.id = aup->mac_id; - aup->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); - for(i = 0; i < PHY_MAX_ADDR; ++i) - aup->mii_bus.irq[i] = PHY_POLL; - - /* if known, set corresponding PHY IRQs */ -#if defined(AU1XXX_PHY_STATIC_CONFIG) -# if defined(AU1XXX_PHY0_IRQ) - if (AU1XXX_PHY0_BUSID == aup->mii_bus.id) - aup->mii_bus.irq[AU1XXX_PHY0_ADDR] = AU1XXX_PHY0_IRQ; -# endif -# if defined(AU1XXX_PHY1_IRQ) - if (AU1XXX_PHY1_BUSID == aup->mii_bus.id) - aup->mii_bus.irq[AU1XXX_PHY1_ADDR] = AU1XXX_PHY1_IRQ; -# endif -#endif - mdiobus_register(&aup->mii_bus); + /* bring the device out of reset, otherwise probing the mii + * will hang */ + *aup->enable = MAC_EN_CLOCK_ENABLE; + au_sync_delay(2); + *aup->enable = MAC_EN_RESET0 | MAC_EN_RESET1 | + MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE; + au_sync_delay(2); + + aup->mii = kmalloc(sizeof(struct mii_phy), GFP_KERNEL); + if (!aup->mii) { + printk(KERN_ERR "%s: out of memory\n", dev->name); + goto err_out; + } + aup->mii->next = NULL; + aup->mii->chip_info = NULL; + aup->mii->status = 0; + aup->mii->mii_control_reg = 0; + aup->mii->mii_data_reg = 0; if (mii_probe(dev) != 0) { goto err_out; @@ -768,7 +1581,7 @@ static struct net_device * au1000_probe(int port_num) } spin_lock_init(&aup->lock); - dev->base_addr = base; + dev->base_addr = ioaddr; dev->irq = irq; dev->open = au1000_open; dev->hard_start_xmit = au1000_tx; @@ -777,6 +1590,7 @@ static struct net_device * au1000_probe(int port_num) dev->set_multicast_list = &set_rx_mode; dev->do_ioctl = &au1000_ioctl; SET_ETHTOOL_OPS(dev, &au1000_ethtool_ops); + dev->set_config = &au1000_set_config; dev->tx_timeout = au1000_tx_timeout; dev->watchdog_timeo = ETH_TX_TIMEOUT; @@ -792,7 +1606,7 @@ err_out: /* here we should have a valid dev plus aup-> register addresses * so we can reset the mac properly.*/ reset_mac(dev); - + kfree(aup->mii); for (i = 0; i < NUM_RX_DMA; i++) { if (aup->rx_db_inuse[i]) ReleaseDB(aup, aup->rx_db_inuse[i]); @@ -801,12 +1615,13 @@ err_out: if (aup->tx_db_inuse[i]) ReleaseDB(aup, aup->tx_db_inuse[i]); } - dma_free_noncoherent(NULL, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), - (void *)aup->vaddr, aup->dma_addr); + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); unregister_netdev(dev); free_netdev(dev); - release_mem_region( base, MAC_IOSIZE); - release_mem_region(macen, 4); + release_mem_region(CPHYSADDR(ioaddr), MAC_IOSIZE); return NULL; } @@ -825,15 +1640,20 @@ static int au1000_init(struct net_device *dev) u32 flags; int i; u32 control; + u16 link, speed; if (au1000_debug > 4) printk("%s: au1000_init\n", dev->name); - /* bring the device out of reset */ - enable_mac(dev, 1); - spin_lock_irqsave(&aup->lock, flags); + /* bring the device out of reset */ + *aup->enable = MAC_EN_CLOCK_ENABLE; + au_sync_delay(2); + *aup->enable = MAC_EN_RESET0 | MAC_EN_RESET1 | + MAC_EN_RESET2 | MAC_EN_CLOCK_ENABLE; + au_sync_delay(20); + aup->mac->control = 0; aup->tx_head = (aup->tx_dma_ring[0]->buff_stat & 0xC) >> 2; aup->tx_tail = aup->tx_head; @@ -848,16 +1668,12 @@ static int au1000_init(struct net_device *dev) } au_sync(); - control = MAC_RX_ENABLE | MAC_TX_ENABLE; + aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed); + control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE; #ifndef CONFIG_CPU_LITTLE_ENDIAN control |= MAC_BIG_ENDIAN; #endif - if (aup->phy_dev) { - if (aup->phy_dev->link && (DUPLEX_FULL == aup->phy_dev->duplex)) - control |= MAC_FULL_DUPLEX; - else - control |= MAC_DISABLE_RX_OWN; - } else { /* PHY-less op, assume full-duplex */ + if (link && (dev->if_port == IF_PORT_100BASEFX)) { control |= MAC_FULL_DUPLEX; } @@ -869,84 +1685,57 @@ static int au1000_init(struct net_device *dev) return 0; } -static void -au1000_adjust_link(struct net_device *dev) +static void au1000_timer(unsigned long data) { + struct net_device *dev = (struct net_device *)data; struct au1000_private *aup = (struct au1000_private *) dev->priv; - struct phy_device *phydev = aup->phy_dev; - unsigned long flags; - - int status_change = 0; - - BUG_ON(!aup->phy_dev); - - spin_lock_irqsave(&aup->lock, flags); + unsigned char if_port; + u16 link, speed; - if (phydev->link && (aup->old_speed != phydev->speed)) { - // speed changed + if (!dev) { + /* fatal error, don't restart the timer */ + printk(KERN_ERR "au1000_timer error: NULL dev\n"); + return; + } - switch(phydev->speed) { - case SPEED_10: - case SPEED_100: - break; - default: - printk(KERN_WARNING - "%s: Speed (%d) is not 10/100 ???\n", - dev->name, phydev->speed); - break; + if_port = dev->if_port; + if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) { + if (link) { + if (!netif_carrier_ok(dev)) { + netif_carrier_on(dev); + printk(KERN_INFO "%s: link up\n", dev->name); + } + } + else { + if (netif_carrier_ok(dev)) { + netif_carrier_off(dev); + dev->if_port = 0; + printk(KERN_INFO "%s: link down\n", dev->name); + } } - - aup->old_speed = phydev->speed; - - status_change = 1; } - if (phydev->link && (aup->old_duplex != phydev->duplex)) { - // duplex mode changed - - /* switching duplex mode requires to disable rx and tx! */ + if (link && (dev->if_port != if_port) && + (dev->if_port != IF_PORT_UNKNOWN)) { hard_stop(dev); - - if (DUPLEX_FULL == phydev->duplex) - aup->mac->control = ((aup->mac->control - | MAC_FULL_DUPLEX) - & ~MAC_DISABLE_RX_OWN); - else - aup->mac->control = ((aup->mac->control - & ~MAC_FULL_DUPLEX) - | MAC_DISABLE_RX_OWN); - au_sync_delay(1); - - enable_rx_tx(dev); - aup->old_duplex = phydev->duplex; - - status_change = 1; - } - - if(phydev->link != aup->old_link) { - // link state changed - - if (phydev->link) // link went up - netif_schedule(dev); - else { // link went down - aup->old_speed = 0; - aup->old_duplex = -1; + if (dev->if_port == IF_PORT_100BASEFX) { + printk(KERN_INFO "%s: going to full duplex\n", + dev->name); + aup->mac->control |= MAC_FULL_DUPLEX; + au_sync_delay(1); } - - aup->old_link = phydev->link; - status_change = 1; + else { + aup->mac->control &= ~MAC_FULL_DUPLEX; + au_sync_delay(1); + } + enable_rx_tx(dev); } - spin_unlock_irqrestore(&aup->lock, flags); + aup->timer.expires = RUN_AT((1*HZ)); + aup->timer.data = (unsigned long)dev; + aup->timer.function = &au1000_timer; /* timer handler */ + add_timer(&aup->timer); - if (status_change) { - if (phydev->link) - printk(KERN_INFO "%s: link up (%d/%s)\n", - dev->name, phydev->speed, - DUPLEX_FULL == phydev->duplex ? "Full" : "Half"); - else - printk(KERN_INFO "%s: link down\n", dev->name); - } } static int au1000_open(struct net_device *dev) @@ -957,26 +1746,25 @@ static int au1000_open(struct net_device *dev) if (au1000_debug > 4) printk("%s: open: dev=%p\n", dev->name, dev); - if ((retval = request_irq(dev->irq, &au1000_interrupt, 0, - dev->name, dev))) { - printk(KERN_ERR "%s: unable to get IRQ %d\n", - dev->name, dev->irq); - return retval; - } - if ((retval = au1000_init(dev))) { printk(KERN_ERR "%s: error in au1000_init\n", dev->name); free_irq(dev->irq, dev); return retval; } + netif_start_queue(dev); - if (aup->phy_dev) { - /* cause the PHY state machine to schedule a link state check */ - aup->phy_dev->state = PHY_CHANGELINK; - phy_start(aup->phy_dev); + if ((retval = request_irq(dev->irq, &au1000_interrupt, 0, + dev->name, dev))) { + printk(KERN_ERR "%s: unable to get IRQ %d\n", + dev->name, dev->irq); + return retval; } - netif_start_queue(dev); + init_timer(&aup->timer); /* used in ioctl() */ + aup->timer.expires = RUN_AT((3*HZ)); + aup->timer.data = (unsigned long)dev; + aup->timer.function = &au1000_timer; /* timer handler */ + add_timer(&aup->timer); if (au1000_debug > 4) printk("%s: open: Initialization done.\n", dev->name); @@ -986,19 +1774,16 @@ static int au1000_open(struct net_device *dev) static int au1000_close(struct net_device *dev) { - unsigned long flags; - struct au1000_private *const aup = (struct au1000_private *) dev->priv; + u32 flags; + struct au1000_private *aup = (struct au1000_private *) dev->priv; if (au1000_debug > 4) printk("%s: close: dev=%p\n", dev->name, dev); - if (aup->phy_dev) - phy_stop(aup->phy_dev); + reset_mac(dev); spin_lock_irqsave(&aup->lock, flags); - - reset_mac_unlocked (dev); - + /* stop the device */ netif_stop_queue(dev); @@ -1020,18 +1805,21 @@ static void __exit au1000_cleanup_module(void) if (dev) { aup = (struct au1000_private *) dev->priv; unregister_netdev(dev); - for (j = 0; j < NUM_RX_DMA; j++) + kfree(aup->mii); + for (j = 0; j < NUM_RX_DMA; j++) { if (aup->rx_db_inuse[j]) ReleaseDB(aup, aup->rx_db_inuse[j]); - for (j = 0; j < NUM_TX_DMA; j++) + } + for (j = 0; j < NUM_TX_DMA; j++) { if (aup->tx_db_inuse[j]) ReleaseDB(aup, aup->tx_db_inuse[j]); - dma_free_noncoherent(NULL, MAX_BUF_SIZE * - (NUM_TX_BUFFS + NUM_RX_BUFFS), - (void *)aup->vaddr, aup->dma_addr); - release_mem_region(dev->base_addr, MAC_IOSIZE); - release_mem_region(CPHYSADDR(iflist[i].macen_addr), 4); + } + dma_free_noncoherent(NULL, + MAX_BUF_SIZE * (NUM_TX_BUFFS+NUM_RX_BUFFS), + (void *)aup->vaddr, + aup->dma_addr); free_netdev(dev); + release_mem_region(CPHYSADDR(iflist[i].base_addr), MAC_IOSIZE); } } } @@ -1042,7 +1830,7 @@ static void update_tx_stats(struct net_device *dev, u32 status) struct net_device_stats *ps = &aup->stats; if (status & TX_FRAME_ABORTED) { - if (!aup->phy_dev || (DUPLEX_FULL == aup->phy_dev->duplex)) { + if (dev->if_port == IF_PORT_100BASEFX) { if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) { /* any other tx errors are only valid * in half duplex mode */ @@ -1316,15 +2104,126 @@ static void set_rx_mode(struct net_device *dev) } } + static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct au1000_private *aup = (struct au1000_private *)dev->priv; + u16 *data = (u16 *)&rq->ifr_ifru; + + switch(cmd) { + case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */ + case SIOCGMIIPHY: + if (!netif_running(dev)) return -EINVAL; + data[0] = aup->phy_addr; + case SIOCDEVPRIVATE+1: /* Read the specified MII register. */ + case SIOCGMIIREG: + data[3] = mdio_read(dev, data[0], data[1]); + return 0; + case SIOCDEVPRIVATE+2: /* Write the specified MII register */ + case SIOCSMIIREG: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + mdio_write(dev, data[0], data[1],data[2]); + return 0; + default: + return -EOPNOTSUPP; + } + +} + + +static int au1000_set_config(struct net_device *dev, struct ifmap *map) +{ + struct au1000_private *aup = (struct au1000_private *) dev->priv; + u16 control; - if (!netif_running(dev)) return -EINVAL; + if (au1000_debug > 4) { + printk("%s: set_config called: dev->if_port %d map->port %x\n", + dev->name, dev->if_port, map->port); + } - if (!aup->phy_dev) return -EINVAL; // PHY not controllable + switch(map->port){ + case IF_PORT_UNKNOWN: /* use auto here */ + printk(KERN_INFO "%s: config phy for aneg\n", + dev->name); + dev->if_port = map->port; + /* Link Down: the timer will bring it up */ + netif_carrier_off(dev); + + /* read current control */ + control = mdio_read(dev, aup->phy_addr, MII_CONTROL); + control &= ~(MII_CNTL_FDX | MII_CNTL_F100); + + /* enable auto negotiation and reset the negotiation */ + mdio_write(dev, aup->phy_addr, MII_CONTROL, + control | MII_CNTL_AUTO | + MII_CNTL_RST_AUTO); - return phy_mii_ioctl(aup->phy_dev, if_mii(rq), cmd); + break; + + case IF_PORT_10BASET: /* 10BaseT */ + printk(KERN_INFO "%s: config phy for 10BaseT\n", + dev->name); + dev->if_port = map->port; + + /* Link Down: the timer will bring it up */ + netif_carrier_off(dev); + + /* set Speed to 10Mbps, Half Duplex */ + control = mdio_read(dev, aup->phy_addr, MII_CONTROL); + control &= ~(MII_CNTL_F100 | MII_CNTL_AUTO | + MII_CNTL_FDX); + + /* disable auto negotiation and force 10M/HD mode*/ + mdio_write(dev, aup->phy_addr, MII_CONTROL, control); + break; + + case IF_PORT_100BASET: /* 100BaseT */ + case IF_PORT_100BASETX: /* 100BaseTx */ + printk(KERN_INFO "%s: config phy for 100BaseTX\n", + dev->name); + dev->if_port = map->port; + + /* Link Down: the timer will bring it up */ + netif_carrier_off(dev); + + /* set Speed to 100Mbps, Half Duplex */ + /* disable auto negotiation and enable 100MBit Mode */ + control = mdio_read(dev, aup->phy_addr, MII_CONTROL); + control &= ~(MII_CNTL_AUTO | MII_CNTL_FDX); + control |= MII_CNTL_F100; + mdio_write(dev, aup->phy_addr, MII_CONTROL, control); + break; + + case IF_PORT_100BASEFX: /* 100BaseFx */ + printk(KERN_INFO "%s: config phy for 100BaseFX\n", + dev->name); + dev->if_port = map->port; + + /* Link Down: the timer will bring it up */ + netif_carrier_off(dev); + + /* set Speed to 100Mbps, Full Duplex */ + /* disable auto negotiation and enable 100MBit Mode */ + control = mdio_read(dev, aup->phy_addr, MII_CONTROL); + control &= ~MII_CNTL_AUTO; + control |= MII_CNTL_F100 | MII_CNTL_FDX; + mdio_write(dev, aup->phy_addr, MII_CONTROL, control); + break; + case IF_PORT_10BASE2: /* 10Base2 */ + case IF_PORT_AUI: /* AUI */ + /* These Modes are not supported (are they?)*/ + printk(KERN_ERR "%s: 10Base2/AUI not supported", + dev->name); + return -EOPNOTSUPP; + break; + + default: + printk(KERN_ERR "%s: Invalid media selected", + dev->name); + return -EINVAL; + } + return 0; } static struct net_device_stats *au1000_get_stats(struct net_device *dev) diff --git a/drivers/net/au1000_eth.h b/drivers/net/au1000_eth.h index 41c2f848d..7f9326e39 100644 --- a/drivers/net/au1000_eth.h +++ b/drivers/net/au1000_eth.h @@ -40,6 +40,120 @@ #define MULTICAST_FILTER_LIMIT 64 +/* FIXME + * The PHY defines should be in a separate file. + */ + +/* MII register offsets */ +#define MII_CONTROL 0x0000 +#define MII_STATUS 0x0001 +#define MII_PHY_ID0 0x0002 +#define MII_PHY_ID1 0x0003 +#define MII_ANADV 0x0004 +#define MII_ANLPAR 0x0005 +#define MII_AEXP 0x0006 +#define MII_ANEXT 0x0007 +#define MII_LSI_PHY_CONFIG 0x0011 +/* Status register */ +#define MII_LSI_PHY_STAT 0x0012 +#define MII_AMD_PHY_STAT MII_LSI_PHY_STAT +#define MII_INTEL_PHY_STAT 0x0011 + +#define MII_AUX_CNTRL 0x0018 +/* mii registers specific to AMD 79C901 */ +#define MII_STATUS_SUMMARY = 0x0018 + +/* MII Control register bit definitions. */ +#define MII_CNTL_FDX 0x0100 +#define MII_CNTL_RST_AUTO 0x0200 +#define MII_CNTL_ISOLATE 0x0400 +#define MII_CNTL_PWRDWN 0x0800 +#define MII_CNTL_AUTO 0x1000 +#define MII_CNTL_F100 0x2000 +#define MII_CNTL_LPBK 0x4000 +#define MII_CNTL_RESET 0x8000 + +/* MII Status register bit */ +#define MII_STAT_EXT 0x0001 +#define MII_STAT_JAB 0x0002 +#define MII_STAT_LINK 0x0004 +#define MII_STAT_CAN_AUTO 0x0008 +#define MII_STAT_FAULT 0x0010 +#define MII_STAT_AUTO_DONE 0x0020 +#define MII_STAT_CAN_T 0x0800 +#define MII_STAT_CAN_T_FDX 0x1000 +#define MII_STAT_CAN_TX 0x2000 +#define MII_STAT_CAN_TX_FDX 0x4000 +#define MII_STAT_CAN_T4 0x8000 + + +#define MII_ID1_OUI_LO 0xFC00 /* low bits of OUI mask */ +#define MII_ID1_MODEL 0x03F0 /* model number */ +#define MII_ID1_REV 0x000F /* model number */ + +/* MII NWAY Register Bits ... + valid for the ANAR (Auto-Negotiation Advertisement) and + ANLPAR (Auto-Negotiation Link Partner) registers */ +#define MII_NWAY_NODE_SEL 0x001f +#define MII_NWAY_CSMA_CD 0x0001 +#define MII_NWAY_T 0x0020 +#define MII_NWAY_T_FDX 0x0040 +#define MII_NWAY_TX 0x0080 +#define MII_NWAY_TX_FDX 0x0100 +#define MII_NWAY_T4 0x0200 +#define MII_NWAY_PAUSE 0x0400 +#define MII_NWAY_RF 0x2000 /* Remote Fault */ +#define MII_NWAY_ACK 0x4000 /* Remote Acknowledge */ +#define MII_NWAY_NP 0x8000 /* Next Page (Enable) */ + +/* mii stsout register bits */ +#define MII_STSOUT_LINK_FAIL 0x4000 +#define MII_STSOUT_SPD 0x0080 +#define MII_STSOUT_DPLX 0x0040 + +/* mii stsics register bits */ +#define MII_STSICS_SPD 0x8000 +#define MII_STSICS_DPLX 0x4000 +#define MII_STSICS_LINKSTS 0x0001 + +/* mii stssum register bits */ +#define MII_STSSUM_LINK 0x0008 +#define MII_STSSUM_DPLX 0x0004 +#define MII_STSSUM_AUTO 0x0002 +#define MII_STSSUM_SPD 0x0001 + +/* lsi phy status register */ +#define MII_LSI_PHY_STAT_FDX 0x0040 +#define MII_LSI_PHY_STAT_SPD 0x0080 + +/* amd phy status register */ +#define MII_AMD_PHY_STAT_FDX 0x0800 +#define MII_AMD_PHY_STAT_SPD 0x0400 + +/* intel phy status register */ +#define MII_INTEL_PHY_STAT_FDX 0x0200 +#define MII_INTEL_PHY_STAT_SPD 0x4000 + +/* Auxilliary Control/Status Register */ +#define MII_AUX_FDX 0x0001 +#define MII_AUX_100 0x0002 +#define MII_AUX_F100 0x0004 +#define MII_AUX_ANEG 0x0008 + +typedef struct mii_phy { + struct mii_phy * next; + struct mii_chip_info * chip_info; + u16 status; + u32 *mii_control_reg; + u32 *mii_data_reg; +} mii_phy_t; + +struct phy_ops { + int (*phy_init) (struct net_device *, int); + int (*phy_reset) (struct net_device *, int); + int (*phy_status) (struct net_device *, int, u16 *, u16 *); +}; + /* * Data Buffer Descriptor. Data buffers must be aligned on 32 byte * boundary for both, receive and transmit. @@ -86,6 +200,7 @@ typedef struct mac_reg { struct au1000_private { + db_dest_t *pDBfree; db_dest_t db[NUM_RX_BUFFS+NUM_TX_BUFFS]; volatile rx_dma_t *rx_dma_ring[NUM_RX_DMA]; @@ -98,15 +213,8 @@ struct au1000_private { u32 tx_full; int mac_id; - - int mac_enabled; /* whether MAC is currently enabled and running (req. for mdio) */ - - int old_link; /* used by au1000_adjust_link */ - int old_speed; - int old_duplex; - - struct phy_device *phy_dev; - struct mii_bus mii_bus; + mii_phy_t *mii; + struct phy_ops *phy_ops; /* These variables are just for quick access to certain regs addresses. */ volatile mac_reg_t *mac; /* mac registers */ @@ -115,6 +223,14 @@ struct au1000_private { u32 vaddr; /* virtual address of rx/tx buffers */ dma_addr_t dma_addr; /* dma address of rx/tx buffers */ + u8 *hash_table; + u32 hash_mode; + u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */ + int phy_addr; /* phy address */ + u32 options; /* User-settable misc. driver options. */ + u32 drv_flags; + int want_autoneg; struct net_device_stats stats; + struct timer_list timer; spinlock_t lock; /* Serialise access to device */ }; diff --git a/drivers/net/b44.c b/drivers/net/b44.c index e83c73e98..6e3e5a297 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -29,8 +29,8 @@ #define DRV_MODULE_NAME "b44" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.01" -#define DRV_MODULE_RELDATE "Jun 16, 2006" +#define DRV_MODULE_VERSION "1.00" +#define DRV_MODULE_RELDATE "Apr 7, 2006" #define B44_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ @@ -75,15 +75,6 @@ /* minimum number of free TX descriptors required to wake up TX process */ #define B44_TX_WAKEUP_THRESH (B44_TX_RING_SIZE / 4) -/* b44 internal pattern match filter info */ -#define B44_PATTERN_BASE 0x400 -#define B44_PATTERN_SIZE 0x80 -#define B44_PMASK_BASE 0x600 -#define B44_PMASK_SIZE 0x10 -#define B44_MAX_PATTERNS 16 -#define B44_ETHIPV6UDP_HLEN 62 -#define B44_ETHIPV4UDP_HLEN 42 - static char version[] __devinitdata = DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; @@ -111,7 +102,7 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl); static void b44_halt(struct b44 *); static void b44_init_rings(struct b44 *); -static void b44_init_hw(struct b44 *, int); +static void b44_init_hw(struct b44 *); static int dma_desc_align_mask; static int dma_desc_sync_size; @@ -883,7 +874,7 @@ static int b44_poll(struct net_device *netdev, int *budget) spin_lock_irq(&bp->lock); b44_halt(bp); b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); netif_wake_queue(bp->dev); spin_unlock_irq(&bp->lock); done = 1; @@ -952,7 +943,7 @@ static void b44_tx_timeout(struct net_device *dev) b44_halt(bp); b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); spin_unlock_irq(&bp->lock); @@ -1069,7 +1060,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu) b44_halt(bp); dev->mtu = new_mtu; b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); spin_unlock_irq(&bp->lock); b44_enable_ints(bp); @@ -1366,15 +1357,13 @@ static int b44_set_mac_addr(struct net_device *dev, void *p) * packet processing. Invoked with bp->lock held. */ static void __b44_set_rx_mode(struct net_device *); -static void b44_init_hw(struct b44 *bp, int full_reset) +static void b44_init_hw(struct b44 *bp) { u32 val; b44_chip_reset(bp); - if (full_reset) { - b44_phy_reset(bp); - b44_setup_phy(bp); - } + b44_phy_reset(bp); + b44_setup_phy(bp); /* Enable CRC32, set proper LED modes and power on PHY */ bw32(bp, B44_MAC_CTRL, MAC_CTRL_CRC32_ENAB | MAC_CTRL_PHY_LEDCTRL); @@ -1388,21 +1377,16 @@ static void b44_init_hw(struct b44 *bp, int full_reset) bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ - if (full_reset) { - bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); - bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); - bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | - (bp->rx_offset << DMARX_CTRL_ROSHIFT))); - bw32(bp, B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset); + bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); + bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); + bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | + (bp->rx_offset << DMARX_CTRL_ROSHIFT))); + bw32(bp, B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset); - bw32(bp, B44_DMARX_PTR, bp->rx_pending); - bp->rx_prod = bp->rx_pending; + bw32(bp, B44_DMARX_PTR, bp->rx_pending); + bp->rx_prod = bp->rx_pending; - bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); - } else { - bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | - (bp->rx_offset << DMARX_CTRL_ROSHIFT))); - } + bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); val = br32(bp, B44_ENET_CTRL); bw32(bp, B44_ENET_CTRL, (val | ENET_CTRL_ENABLE)); @@ -1418,11 +1402,11 @@ static int b44_open(struct net_device *dev) goto out; b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); b44_check_phy(bp); - err = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); + err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); if (unlikely(err < 0)) { b44_chip_reset(bp); b44_free_rings(bp); @@ -1467,140 +1451,6 @@ static void b44_poll_controller(struct net_device *dev) } #endif -static void bwfilter_table(struct b44 *bp, u8 *pp, u32 bytes, u32 table_offset) -{ - u32 i; - u32 *pattern = (u32 *) pp; - - for (i = 0; i < bytes; i += sizeof(u32)) { - bw32(bp, B44_FILT_ADDR, table_offset + i); - bw32(bp, B44_FILT_DATA, pattern[i / sizeof(u32)]); - } -} - -static int b44_magic_pattern(u8 *macaddr, u8 *ppattern, u8 *pmask, int offset) -{ - int magicsync = 6; - int k, j, len = offset; - int ethaddr_bytes = ETH_ALEN; - - memset(ppattern + offset, 0xff, magicsync); - for (j = 0; j < magicsync; j++) - set_bit(len++, (unsigned long *) pmask); - - for (j = 0; j < B44_MAX_PATTERNS; j++) { - if ((B44_PATTERN_SIZE - len) >= ETH_ALEN) - ethaddr_bytes = ETH_ALEN; - else - ethaddr_bytes = B44_PATTERN_SIZE - len; - if (ethaddr_bytes <=0) - break; - for (k = 0; k< ethaddr_bytes; k++) { - ppattern[offset + magicsync + - (j * ETH_ALEN) + k] = macaddr[k]; - len++; - set_bit(len, (unsigned long *) pmask); - } - } - return len - 1; -} - -/* Setup magic packet patterns in the b44 WOL - * pattern matching filter. - */ -static void b44_setup_pseudo_magicp(struct b44 *bp) -{ - - u32 val; - int plen0, plen1, plen2; - u8 *pwol_pattern; - u8 pwol_mask[B44_PMASK_SIZE]; - - pwol_pattern = kmalloc(B44_PATTERN_SIZE, GFP_KERNEL); - if (!pwol_pattern) { - printk(KERN_ERR PFX "Memory not available for WOL\n"); - return; - } - - /* Ipv4 magic packet pattern - pattern 0.*/ - memset(pwol_pattern, 0, B44_PATTERN_SIZE); - memset(pwol_mask, 0, B44_PMASK_SIZE); - plen0 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, - B44_ETHIPV4UDP_HLEN); - - bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, B44_PATTERN_BASE); - bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, B44_PMASK_BASE); - - /* Raw ethernet II magic packet pattern - pattern 1 */ - memset(pwol_pattern, 0, B44_PATTERN_SIZE); - memset(pwol_mask, 0, B44_PMASK_SIZE); - plen1 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, - ETH_HLEN); - - bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, - B44_PATTERN_BASE + B44_PATTERN_SIZE); - bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, - B44_PMASK_BASE + B44_PMASK_SIZE); - - /* Ipv6 magic packet pattern - pattern 2 */ - memset(pwol_pattern, 0, B44_PATTERN_SIZE); - memset(pwol_mask, 0, B44_PMASK_SIZE); - plen2 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, - B44_ETHIPV6UDP_HLEN); - - bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, - B44_PATTERN_BASE + B44_PATTERN_SIZE + B44_PATTERN_SIZE); - bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, - B44_PMASK_BASE + B44_PMASK_SIZE + B44_PMASK_SIZE); - - kfree(pwol_pattern); - - /* set these pattern's lengths: one less than each real length */ - val = plen0 | (plen1 << 8) | (plen2 << 16) | WKUP_LEN_ENABLE_THREE; - bw32(bp, B44_WKUP_LEN, val); - - /* enable wakeup pattern matching */ - val = br32(bp, B44_DEVCTRL); - bw32(bp, B44_DEVCTRL, val | DEVCTRL_PFE); - -} - -static void b44_setup_wol(struct b44 *bp) -{ - u32 val; - u16 pmval; - - bw32(bp, B44_RXCONFIG, RXCONFIG_ALLMULTI); - - if (bp->flags & B44_FLAG_B0_ANDLATER) { - - bw32(bp, B44_WKUP_LEN, WKUP_LEN_DISABLE); - - val = bp->dev->dev_addr[2] << 24 | - bp->dev->dev_addr[3] << 16 | - bp->dev->dev_addr[4] << 8 | - bp->dev->dev_addr[5]; - bw32(bp, B44_ADDR_LO, val); - - val = bp->dev->dev_addr[0] << 8 | - bp->dev->dev_addr[1]; - bw32(bp, B44_ADDR_HI, val); - - val = br32(bp, B44_DEVCTRL); - bw32(bp, B44_DEVCTRL, val | DEVCTRL_MPM | DEVCTRL_PFE); - - } else { - b44_setup_pseudo_magicp(bp); - } - - val = br32(bp, B44_SBTMSLOW); - bw32(bp, B44_SBTMSLOW, val | SBTMSLOW_PE); - - pci_read_config_word(bp->pdev, SSB_PMCSR, &pmval); - pci_write_config_word(bp->pdev, SSB_PMCSR, pmval | SSB_PE); - -} - static int b44_close(struct net_device *dev) { struct b44 *bp = netdev_priv(dev); @@ -1626,11 +1476,6 @@ static int b44_close(struct net_device *dev) netif_poll_enable(dev); - if (bp->flags & B44_FLAG_WOL_ENABLE) { - b44_init_hw(bp, 0); - b44_setup_wol(bp); - } - b44_free_consistent(bp); return 0; @@ -1776,6 +1621,8 @@ static int b44_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct b44 *bp = netdev_priv(dev); + if (!netif_running(dev)) + return -EAGAIN; cmd->supported = (SUPPORTED_Autoneg); cmd->supported |= (SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | @@ -1803,12 +1650,6 @@ static int b44_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) XCVR_INTERNAL : XCVR_EXTERNAL; cmd->autoneg = (bp->flags & B44_FLAG_FORCE_LINK) ? AUTONEG_DISABLE : AUTONEG_ENABLE; - if (cmd->autoneg == AUTONEG_ENABLE) - cmd->advertising |= ADVERTISED_Autoneg; - if (!netif_running(dev)){ - cmd->speed = 0; - cmd->duplex = 0xff; - } cmd->maxtxpkt = 0; cmd->maxrxpkt = 0; return 0; @@ -1818,6 +1659,9 @@ static int b44_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct b44 *bp = netdev_priv(dev); + if (!netif_running(dev)) + return -EAGAIN; + /* We do not support gigabit. */ if (cmd->autoneg == AUTONEG_ENABLE) { if (cmd->advertising & @@ -1834,39 +1678,28 @@ static int b44_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) spin_lock_irq(&bp->lock); if (cmd->autoneg == AUTONEG_ENABLE) { - bp->flags &= ~(B44_FLAG_FORCE_LINK | - B44_FLAG_100_BASE_T | - B44_FLAG_FULL_DUPLEX | - B44_FLAG_ADV_10HALF | + bp->flags &= ~B44_FLAG_FORCE_LINK; + bp->flags &= ~(B44_FLAG_ADV_10HALF | B44_FLAG_ADV_10FULL | B44_FLAG_ADV_100HALF | B44_FLAG_ADV_100FULL); - if (cmd->advertising == 0) { - bp->flags |= (B44_FLAG_ADV_10HALF | - B44_FLAG_ADV_10FULL | - B44_FLAG_ADV_100HALF | - B44_FLAG_ADV_100FULL); - } else { - if (cmd->advertising & ADVERTISED_10baseT_Half) - bp->flags |= B44_FLAG_ADV_10HALF; - if (cmd->advertising & ADVERTISED_10baseT_Full) - bp->flags |= B44_FLAG_ADV_10FULL; - if (cmd->advertising & ADVERTISED_100baseT_Half) - bp->flags |= B44_FLAG_ADV_100HALF; - if (cmd->advertising & ADVERTISED_100baseT_Full) - bp->flags |= B44_FLAG_ADV_100FULL; - } + if (cmd->advertising & ADVERTISE_10HALF) + bp->flags |= B44_FLAG_ADV_10HALF; + if (cmd->advertising & ADVERTISE_10FULL) + bp->flags |= B44_FLAG_ADV_10FULL; + if (cmd->advertising & ADVERTISE_100HALF) + bp->flags |= B44_FLAG_ADV_100HALF; + if (cmd->advertising & ADVERTISE_100FULL) + bp->flags |= B44_FLAG_ADV_100FULL; } else { bp->flags |= B44_FLAG_FORCE_LINK; - bp->flags &= ~(B44_FLAG_100_BASE_T | B44_FLAG_FULL_DUPLEX); if (cmd->speed == SPEED_100) bp->flags |= B44_FLAG_100_BASE_T; if (cmd->duplex == DUPLEX_FULL) bp->flags |= B44_FLAG_FULL_DUPLEX; } - if (netif_running(dev)) - b44_setup_phy(bp); + b44_setup_phy(bp); spin_unlock_irq(&bp->lock); @@ -1902,7 +1735,7 @@ static int b44_set_ringparam(struct net_device *dev, b44_halt(bp); b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); netif_wake_queue(bp->dev); spin_unlock_irq(&bp->lock); @@ -1945,7 +1778,7 @@ static int b44_set_pauseparam(struct net_device *dev, if (bp->flags & B44_FLAG_PAUSE_AUTO) { b44_halt(bp); b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); } else { __b44_set_flow_ctrl(bp, bp->flags); } @@ -1987,40 +1820,12 @@ static void b44_get_ethtool_stats(struct net_device *dev, spin_unlock_irq(&bp->lock); } -static void b44_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) -{ - struct b44 *bp = netdev_priv(dev); - - wol->supported = WAKE_MAGIC; - if (bp->flags & B44_FLAG_WOL_ENABLE) - wol->wolopts = WAKE_MAGIC; - else - wol->wolopts = 0; - memset(&wol->sopass, 0, sizeof(wol->sopass)); -} - -static int b44_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) -{ - struct b44 *bp = netdev_priv(dev); - - spin_lock_irq(&bp->lock); - if (wol->wolopts & WAKE_MAGIC) - bp->flags |= B44_FLAG_WOL_ENABLE; - else - bp->flags &= ~B44_FLAG_WOL_ENABLE; - spin_unlock_irq(&bp->lock); - - return 0; -} - static struct ethtool_ops b44_ethtool_ops = { .get_drvinfo = b44_get_drvinfo, .get_settings = b44_get_settings, .set_settings = b44_set_settings, .nway_reset = b44_nway_reset, .get_link = ethtool_op_get_link, - .get_wol = b44_get_wol, - .set_wol = b44_set_wol, .get_ringparam = b44_get_ringparam, .set_ringparam = b44_set_ringparam, .get_pauseparam = b44_get_pauseparam, @@ -2099,10 +1904,6 @@ static int __devinit b44_get_invariants(struct b44 *bp) /* XXX - really required? bp->flags |= B44_FLAG_BUGGY_TXPTR; */ - - if (ssb_get_core_rev(bp) >= 7) - bp->flags |= B44_FLAG_B0_ANDLATER; - out: return err; } @@ -2121,14 +1922,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev, err = pci_enable_device(pdev); if (err) { - dev_err(&pdev->dev, "Cannot enable PCI device, " + printk(KERN_ERR PFX "Cannot enable PCI device, " "aborting.\n"); return err; } if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { - dev_err(&pdev->dev, - "Cannot find proper PCI device " + printk(KERN_ERR PFX "Cannot find proper PCI device " "base address, aborting.\n"); err = -ENODEV; goto err_out_disable_pdev; @@ -2136,8 +1936,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev, err = pci_request_regions(pdev, DRV_MODULE_NAME); if (err) { - dev_err(&pdev->dev, - "Cannot obtain PCI resources, aborting.\n"); + printk(KERN_ERR PFX "Cannot obtain PCI resources, " + "aborting.\n"); goto err_out_disable_pdev; } @@ -2145,13 +1945,15 @@ static int __devinit b44_init_one(struct pci_dev *pdev, err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK); if (err) { - dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n"); + printk(KERN_ERR PFX "No usable DMA configuration, " + "aborting.\n"); goto err_out_free_res; } err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK); if (err) { - dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n"); + printk(KERN_ERR PFX "No usable DMA configuration, " + "aborting.\n"); goto err_out_free_res; } @@ -2160,7 +1962,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, dev = alloc_etherdev(sizeof(*bp)); if (!dev) { - dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n"); + printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n"); err = -ENOMEM; goto err_out_free_res; } @@ -2181,7 +1983,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev, bp->regs = ioremap(b44reg_base, b44reg_len); if (bp->regs == 0UL) { - dev_err(&pdev->dev, "Cannot map device registers, aborting.\n"); + printk(KERN_ERR PFX "Cannot map device registers, " + "aborting.\n"); err = -ENOMEM; goto err_out_free_dev; } @@ -2211,8 +2014,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev, err = b44_get_invariants(bp); if (err) { - dev_err(&pdev->dev, - "Problem fetching invariants of chip, aborting.\n"); + printk(KERN_ERR PFX "Problem fetching invariants of chip, " + "aborting.\n"); goto err_out_iounmap; } @@ -2232,7 +2035,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev, err = register_netdev(dev); if (err) { - dev_err(&pdev->dev, "Cannot register net device, aborting.\n"); + printk(KERN_ERR PFX "Cannot register net device, " + "aborting.\n"); goto err_out_iounmap; } @@ -2300,10 +2104,6 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) spin_unlock_irq(&bp->lock); free_irq(dev->irq, dev); - if (bp->flags & B44_FLAG_WOL_ENABLE) { - b44_init_hw(bp, 0); - b44_setup_wol(bp); - } pci_disable_device(pdev); return 0; } @@ -2320,13 +2120,13 @@ static int b44_resume(struct pci_dev *pdev) if (!netif_running(dev)) return 0; - if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev)) printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); spin_lock_irq(&bp->lock); b44_init_rings(bp); - b44_init_hw(bp, 1); + b44_init_hw(bp); netif_device_attach(bp->dev); spin_unlock_irq(&bp->lock); diff --git a/drivers/net/b44.h b/drivers/net/b44.h index 4944507fa..b17866297 100644 --- a/drivers/net/b44.h +++ b/drivers/net/b44.h @@ -24,9 +24,6 @@ #define WKUP_LEN_P3_MASK 0x7f000000 /* Pattern 3 */ #define WKUP_LEN_P3_SHIFT 24 #define WKUP_LEN_D3 0x80000000 -#define WKUP_LEN_DISABLE 0x80808080 -#define WKUP_LEN_ENABLE_TWO 0x80800000 -#define WKUP_LEN_ENABLE_THREE 0x80000000 #define B44_ISTAT 0x0020UL /* Interrupt Status */ #define ISTAT_LS 0x00000020 /* Link Change (B0 only) */ #define ISTAT_PME 0x00000040 /* Power Management Event */ @@ -267,8 +264,6 @@ #define SBIDHIGH_VC_SHIFT 16 /* SSB PCI config space registers. */ -#define SSB_PMCSR 0x44 -#define SSB_PE 0x100 #define SSB_BAR0_WIN 0x80 #define SSB_BAR1_WIN 0x84 #define SSB_SPROM_CONTROL 0x88 @@ -425,7 +420,6 @@ struct b44 { u32 dma_offset; u32 flags; -#define B44_FLAG_B0_ANDLATER 0x00000001 #define B44_FLAG_BUGGY_TXPTR 0x00000002 #define B44_FLAG_REORDER_BUG 0x00000004 #define B44_FLAG_PAUSE_AUTO 0x00008000 @@ -441,7 +435,6 @@ struct b44 { #define B44_FLAG_INTERNAL_PHY 0x10000000 #define B44_FLAG_RX_RING_HACK 0x20000000 #define B44_FLAG_TX_RING_HACK 0x40000000 -#define B44_FLAG_WOL_ENABLE 0x80000000 u32 rx_offset; diff --git a/drivers/net/bcm5700/.cvsignore b/drivers/net/bcm5700/.cvsignore new file mode 100644 index 000000000..0dd20dde1 --- /dev/null +++ b/drivers/net/bcm5700/.cvsignore @@ -0,0 +1,3 @@ +.*.cmd +*.mod.c +*.ko diff --git a/drivers/net/bcm5700/5701rls.c b/drivers/net/bcm5700/5701rls.c new file mode 100644 index 000000000..6b7d49c7a --- /dev/null +++ b/drivers/net/bcm5700/5701rls.c @@ -0,0 +1,46 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/* */ +/******************************************************************************/ + +#ifdef INCLUDE_5701_AX_FIX + +#include "mm.h" +#include "5701rls.h" + +LM_STATUS LM_LoadRlsFirmware(PLM_DEVICE_BLOCK pDevice) +{ + T3_FWIMG_INFO FwImgInfo; + + FwImgInfo.StartAddress = t3FwStartAddr; + FwImgInfo.Text.Buffer = (PLM_UINT8)t3FwText; + FwImgInfo.Text.Offset = t3FwTextAddr; + FwImgInfo.Text.Length = t3FwTextLen; + FwImgInfo.ROnlyData.Buffer = (PLM_UINT8)t3FwRodata; + FwImgInfo.ROnlyData.Offset = t3FwRodataAddr; + FwImgInfo.ROnlyData.Length = t3FwRodataLen; + FwImgInfo.Data.Buffer = (PLM_UINT8)t3FwData; + FwImgInfo.Data.Offset = t3FwDataAddr; + FwImgInfo.Data.Length = t3FwDataLen; + + if (LM_LoadFirmware(pDevice, + &FwImgInfo, + T3_RX_CPU_ID | T3_TX_CPU_ID, + T3_RX_CPU_ID) != LM_STATUS_SUCCESS) + { + return LM_STATUS_FAILURE; + } + + return LM_STATUS_SUCCESS; +} + +#endif /* INCLUDE_5701_AX_FIX */ diff --git a/drivers/net/bcm5700/5701rls.h b/drivers/net/bcm5700/5701rls.h new file mode 100644 index 000000000..793726d28 --- /dev/null +++ b/drivers/net/bcm5700/5701rls.h @@ -0,0 +1,198 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/******************************************************************************/ + +typedef unsigned long U32; +int t3FwReleaseMajor = 0x0; +int t3FwReleaseMinor = 0x0; +int t3FwReleaseFix = 0x0; +U32 t3FwStartAddr = 0x08000000; +U32 t3FwTextAddr = 0x08000000; +int t3FwTextLen = 0x9c0; +U32 t3FwRodataAddr = 0x080009c0; +int t3FwRodataLen = 0x60; +U32 t3FwDataAddr = 0x08000a40; +int t3FwDataLen = 0x20; +U32 t3FwSbssAddr = 0x08000a60; +int t3FwSbssLen = 0xc; +U32 t3FwBssAddr = 0x08000a70; +int t3FwBssLen = 0x10; +U32 t3FwText[(0x9c0/4) + 1] = { +0x0, +0x10000003, 0x0, 0xd, 0xd, +0x3c1d0800, 0x37bd3ffc, 0x3a0f021, 0x3c100800, +0x26100000, 0xe000018, 0x0, 0xd, +0x3c1d0800, 0x37bd3ffc, 0x3a0f021, 0x3c100800, +0x26100034, 0xe00021c, 0x0, 0xd, +0x0, 0x0, 0x0, 0x27bdffe0, +0x3c1cc000, 0xafbf0018, 0xaf80680c, 0xe00004c, +0x241b2105, 0x97850000, 0x97870002, 0x9782002c, +0x9783002e, 0x3c040800, 0x248409c0, 0xafa00014, +0x21400, 0x621825, 0x52c00, 0xafa30010, +0x8f860010, 0xe52825, 0xe000060, 0x24070102, +0x3c02ac00, 0x34420100, 0x3c03ac01, 0x34630100, +0xaf820490, 0x3c02ffff, 0xaf820494, 0xaf830498, +0xaf82049c, 0x24020001, 0xaf825ce0, 0xe00003f, +0xaf825d00, 0xe000140, 0x0, 0x8fbf0018, +0x3e00008, 0x27bd0020, 0x2402ffff, 0xaf825404, +0x8f835400, 0x34630400, 0xaf835400, 0xaf825404, +0x3c020800, 0x24420034, 0xaf82541c, 0x3e00008, +0xaf805400, 0x0, 0x0, 0x3c020800, +0x34423000, 0x3c030800, 0x34633000, 0x3c040800, +0x348437ff, 0x3c010800, 0xac220a64, 0x24020040, +0x3c010800, 0xac220a68, 0x3c010800, 0xac200a60, +0xac600000, 0x24630004, 0x83102b, 0x5040fffd, +0xac600000, 0x3e00008, 0x0, 0x804821, +0x8faa0010, 0x3c020800, 0x8c420a60, 0x3c040800, +0x8c840a68, 0x8fab0014, 0x24430001, 0x44102b, +0x3c010800, 0xac230a60, 0x14400003, 0x4021, +0x3c010800, 0xac200a60, 0x3c020800, 0x8c420a60, +0x3c030800, 0x8c630a64, 0x91240000, 0x21140, +0x431021, 0x481021, 0x25080001, 0xa0440000, +0x29020008, 0x1440fff4, 0x25290001, 0x3c020800, +0x8c420a60, 0x3c030800, 0x8c630a64, 0x8f84680c, +0x21140, 0x431021, 0xac440008, 0xac45000c, +0xac460010, 0xac470014, 0xac4a0018, 0x3e00008, +0xac4b001c, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x2000008, +0x0, 0xa0001e3, 0x3c0a0001, 0xa0001e3, +0x3c0a0002, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x3c0a0007, 0xa0001e3, 0x3c0a0008, 0xa0001e3, +0x3c0a0009, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x3c0a000b, 0xa0001e3, +0x3c0a000c, 0xa0001e3, 0x3c0a000d, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x3c0a000e, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x0, 0xa0001e3, +0x0, 0xa0001e3, 0x3c0a0013, 0xa0001e3, +0x3c0a0014, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x27bdffe0, +0x1821, 0x1021, 0xafbf0018, 0xafb10014, +0xafb00010, 0x3c010800, 0x220821, 0xac200a70, +0x3c010800, 0x220821, 0xac200a74, 0x3c010800, +0x220821, 0xac200a78, 0x24630001, 0x1860fff5, +0x2442000c, 0x24110001, 0x8f906810, 0x32020004, +0x14400005, 0x24040001, 0x3c020800, 0x8c420a78, +0x18400003, 0x2021, 0xe000182, 0x0, +0x32020001, 0x10400003, 0x0, 0xe000169, +0x0, 0xa000153, 0xaf915028, 0x8fbf0018, +0x8fb10014, 0x8fb00010, 0x3e00008, 0x27bd0020, +0x3c050800, 0x8ca50a70, 0x3c060800, 0x8cc60a80, +0x3c070800, 0x8ce70a78, 0x27bdffe0, 0x3c040800, +0x248409d0, 0xafbf0018, 0xafa00010, 0xe000060, +0xafa00014, 0xe00017b, 0x2021, 0x8fbf0018, +0x3e00008, 0x27bd0020, 0x24020001, 0x8f836810, +0x821004, 0x21027, 0x621824, 0x3e00008, +0xaf836810, 0x27bdffd8, 0xafbf0024, 0x1080002e, +0xafb00020, 0x8f825cec, 0xafa20018, 0x8f825cec, +0x3c100800, 0x26100a78, 0xafa2001c, 0x34028000, +0xaf825cec, 0x8e020000, 0x18400016, 0x0, +0x3c020800, 0x94420a74, 0x8fa3001c, 0x221c0, +0xac830004, 0x8fa2001c, 0x3c010800, 0xe000201, +0xac220a74, 0x10400005, 0x0, 0x8e020000, +0x24420001, 0xa0001df, 0xae020000, 0x3c020800, +0x8c420a70, 0x21c02, 0x321c0, 0xa0001c5, +0xafa2001c, 0xe000201, 0x0, 0x1040001f, +0x0, 0x8e020000, 0x8fa3001c, 0x24420001, +0x3c010800, 0xac230a70, 0x3c010800, 0xac230a74, +0xa0001df, 0xae020000, 0x3c100800, 0x26100a78, +0x8e020000, 0x18400028, 0x0, 0xe000201, +0x0, 0x14400024, 0x0, 0x8e020000, +0x3c030800, 0x8c630a70, 0x2442ffff, 0xafa3001c, +0x18400006, 0xae020000, 0x31402, 0x221c0, +0x8c820004, 0x3c010800, 0xac220a70, 0x97a2001e, +0x2442ff00, 0x2c420300, 0x1440000b, 0x24024000, +0x3c040800, 0x248409dc, 0xafa00010, 0xafa00014, +0x8fa6001c, 0x24050008, 0xe000060, 0x3821, +0xa0001df, 0x0, 0xaf825cf8, 0x3c020800, +0x8c420a40, 0x8fa3001c, 0x24420001, 0xaf835cf8, +0x3c010800, 0xac220a40, 0x8fbf0024, 0x8fb00020, +0x3e00008, 0x27bd0028, 0x27bdffe0, 0x3c040800, +0x248409e8, 0x2821, 0x3021, 0x3821, +0xafbf0018, 0xafa00010, 0xe000060, 0xafa00014, +0x8fbf0018, 0x3e00008, 0x27bd0020, 0x8f82680c, +0x8f85680c, 0x21827, 0x3182b, 0x31823, +0x431024, 0x441021, 0xa2282b, 0x10a00006, +0x0, 0x401821, 0x8f82680c, 0x43102b, +0x1440fffd, 0x0, 0x3e00008, 0x0, +0x3c040800, 0x8c840000, 0x3c030800, 0x8c630a40, +0x64102b, 0x54400002, 0x831023, 0x641023, +0x2c420008, 0x3e00008, 0x38420001, 0x27bdffe0, +0x802821, 0x3c040800, 0x24840a00, 0x3021, +0x3821, 0xafbf0018, 0xafa00010, 0xe000060, +0xafa00014, 0xa000216, 0x0, 0x8fbf0018, +0x3e00008, 0x27bd0020, 0x0, 0x27bdffe0, +0x3c1cc000, 0xafbf0018, 0xe00004c, 0xaf80680c, +0x3c040800, 0x24840a10, 0x3802821, 0x3021, +0x3821, 0xafa00010, 0xe000060, 0xafa00014, +0x2402ffff, 0xaf825404, 0x3c0200aa, 0xe000234, +0xaf825434, 0x8fbf0018, 0x3e00008, 0x27bd0020, +0x0, 0x0, 0x0, 0x27bdffe8, +0xafb00010, 0x24100001, 0xafbf0014, 0x3c01c003, +0xac200000, 0x8f826810, 0x30422000, 0x10400003, +0x0, 0xe000246, 0x0, 0xa00023a, +0xaf905428, 0x8fbf0014, 0x8fb00010, 0x3e00008, +0x27bd0018, 0x27bdfff8, 0x8f845d0c, 0x3c0200ff, +0x3c030800, 0x8c630a50, 0x3442fff8, 0x821024, +0x1043001e, 0x3c0500ff, 0x34a5fff8, 0x3c06c003, +0x3c074000, 0x851824, 0x8c620010, 0x3c010800, +0xac230a50, 0x30420008, 0x10400005, 0x871025, +0x8cc20000, 0x24420001, 0xacc20000, 0x871025, +0xaf825d0c, 0x8fa20000, 0x24420001, 0xafa20000, +0x8fa20000, 0x8fa20000, 0x24420001, 0xafa20000, +0x8fa20000, 0x8f845d0c, 0x3c030800, 0x8c630a50, +0x851024, 0x1443ffe8, 0x851824, 0x27bd0008, +0x3e00008, 0x0, 0x0, 0x0 }; +U32 t3FwRodata[(0x60/4) + 1] = { +0x35373031, 0x726c7341, 0x0, +0x0, 0x53774576, 0x656e7430, 0x0, +0x726c7045, 0x76656e74, 0x31000000, 0x556e6b6e, +0x45766e74, 0x0, 0x0, 0x0, +0x0, 0x66617461, 0x6c457272, 0x0, +0x0, 0x4d61696e, 0x43707542, 0x0, +0x0, 0x0 }; +U32 t3FwData[(0x20/4) + 1] = { +0x0, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0 }; diff --git a/drivers/net/bcm5700/DISTRIB.TXT b/drivers/net/bcm5700/DISTRIB.TXT new file mode 100755 index 000000000..22891d3f2 --- /dev/null +++ b/drivers/net/bcm5700/DISTRIB.TXT @@ -0,0 +1,166 @@ + + Additional Installation Notes for Various Linux Distributions + Broadcom BCM5700 Linux Driver + Version 8.3.17b + 02/21/2006 + + Broadcom Corporation + 16215 Alton Parkway, + Irvine, CA 92619-7013 + + Copyright (c) 2000-2006 Broadcom Corporation + All rights reserved + + +Table of Contents +================= + + Introduction + Limitations + Prerequisites + Enable Loadable Module Support on Turbolinux 10 + Remove tg3 Driver + Edit /etc/modules.conf + Patching PCI Files (Red Hat - Optional) + Patching module-info Files (Red Hat - Optional) + Network Installation (Red Hat) + Message-"no version for "struct_module" found" + +Introduction +============ + +This file contains additional installation notes for the Broadcom NetXtreme +bcm5700 Linux driver that are specific to certain Linux distributions. General +installation notes are contained in README.TXT. + + +Limitations +=========== + +The current version of the driver has been tested on selected Linux +distributions for i386, ia64, and x86_64. Limited testing has also +been done on PPC64 systems. Testing is normally focused on the +following distributions: + + Red Hat 4.0 and 3.0AS + SuSE 9 + + +Prerequisites +============= + +In order to compile your Broadcom NetXtreme Linux driver, you must first +have a properly compiled kernel source tree which matches your running +kernel. You must also have a working C/C++ compiler and all the associated +dependencies installed before attempting to compile the driver. + +On Red Hat distributions, if you have opted for a custom installation, you +need to select "Development Tools" and "Kernel Development" to install +the necessary tools and kernel source tree. + +On Linux distributions, you must change the software packages +installed by default when presented with the Installation Settings. Under +software selelction, select "Detailed Selection". In this area ensure that +"C/C++ Compiler and Tools" is selected. This should install the C/C++ +compiler as well as the kernel-source files. + +For further assistance, please review your Linux documentation. + + +Enable Loadable Module Support on Turboilinux 10 +================================================ + +When attempting to compile the driver, the following message may be displayed: + + The present kernel configuration has modules disabled. Type 'make config' + and enable loadable module support. Then build a kernel with module + support enabled. + +Do the following to enable loadable module support: + + cp /usr/src/configs/kernel-x.x.x-i586.config /usr/src/.config + + +Remove tg3 Driver +================= + +Many newer distributions and newer kernels may already contain and use the +tg3 driver by default for Broadcom BCM5700 series devices. While tg3 is a fully +functioning driver written by Red Hat, Broadcom recommends users to use +the bcm5700 driver written and tested by Broadcom. + +1. Use ifconfig to bring down all interfaces used by tg3, then use `rmmod` to + remove the module if loaded. The following assumes eth0 and eth1 are both + Broadcom devices using the tg3 driver. + + ifconfig eth0 down + ifconfig eth1 down + rmmod tg3 + +2. Now it may be necessary to manually edit your /etc/modules.conf file to + allow the bcm5700 driver to load at boot time instead of the tg3 driver. See + below. + + +Edit /etc/modules.conf +====================== + +If there is an alias entry in your /etc/modules.conf file referencing the +tg3 driver, make sure that you replace tg3 with bcm5700. Otherwise, add the +entry below if necessary. + +Example: + +alias eth0 bcm5700 + + +Patching PCI Files (Red Hat - Optional) +======================================= + +To use the Red Hat kudzu hardware detection utility, and to list the +BCM5700 series devices by name using lspci, a script has been included +in the bcm_sup-.tar.gz package. +The /bin/bash script to update the Red Hat PCI device list and patch +files for the latest kernels by running this script. + +For example, on Red Hat 3 i386, apply the script in the following way: + + ./update_ids.sh + +Run kudzu: + + kudzu + + +Network Installation (Red Hat) +============================== + +For network installations through NFS, FTP, or HTTP (using a network boot disk +or PXE), a driver diskette that contains the bcm5700 driver is needed. The +driver diskette images for the most recent Red Hat versions are included. Boot +drivers for other Linux versions can be compiled by modifying the Makefile and +the make environment. Further information is available from Red Hat's website. + +To create the driver diskette, select the appropriate image file, gunzip it, +and do the following: + +dd if=dd.img of=/dev/fd0H1440. + + +Message -"no version for "struct_module" found" +============================================== +If you see this message, bring the kernel version.h file up to date by +executing the following command, then remake the bcm5700 module. + +(cd /usr/src/linux; make include/linux/version.h) + + +'rpm -e' does not uninstall the bcm5700 module +============================================== +On some linux installations, the bcm5700 module comes as part of the kernel +package. In these cases, the administrator will have to install a newer +version of the module by using the --force flag. While this flag does +allow the newer version module to be installed, it does not change the +ownership of the file to the newer package. Consequently, the 'rpm -e' +command will not remove the file, since it is not associated with that +package. diff --git a/drivers/net/bcm5700/LICENSE b/drivers/net/bcm5700/LICENSE new file mode 100755 index 000000000..44e50a438 --- /dev/null +++ b/drivers/net/bcm5700/LICENSE @@ -0,0 +1,290 @@ + + + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + diff --git a/drivers/net/bcm5700/Makefile b/drivers/net/bcm5700/Makefile new file mode 100755 index 000000000..2096995dd --- /dev/null +++ b/drivers/net/bcm5700/Makefile @@ -0,0 +1,33 @@ +################################################################################ +# +# Makefile for building Linux Broadcom Gigabit ethernet driver as a module. +# +################################################################################ + +obj-$(CONFIG_BCM5700) = bcm5700.o + +bcm5700-objs := b57um.o b57proc.o tigon3.o autoneg.o 5701rls.o tcp_seg.o b57diag.o + +EXTRA_CFLAGS = -DDBG=0 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT -DINCLUDE_5701_AX_FIX=1 $(NETDUMP_CFLAG) +ifeq ($(ARCH),x86_64) + CFLAGS+=-mno-red-zone -mcmodel=kernel -pipe -finline-limit=2000 +endif + +ifeq ($(ARCH),ia64) + CFLAGS+=-pipe -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32 +endif + +ifeq ($(ARCH),ppc64) + CFLAGS+=-m64 + CFLAGS+=-fno-strict-aliasing -fno-common -fomit-frame-pointer -msoft-float -pipe -mminimal-toc -fno-builtin +endif + +ifdef DBG + CFLAGS += -DTIGON3_DEBUG=2 +endif + +ifdef SMALL + CFLAGS += -Os -DBCM_SMALL_DRV=1 +else + CFLAGS += -O2 +endif diff --git a/drivers/net/bcm5700/README.TXT b/drivers/net/bcm5700/README.TXT new file mode 100644 index 000000000..05d713d6a --- /dev/null +++ b/drivers/net/bcm5700/README.TXT @@ -0,0 +1,566 @@ + + Installation Notes + Broadcom BCM5700 Linux Driver + Version 8.3.17b + 02/21/2006 + + Broadcom Corporation + 16215 Alton Parkway, + Irvine, CA 92619-7013 + + Copyright (c) 2000-2006 Broadcom Corporation + All rights reserved + + +Table of Contents +================= + + Introduction + Limitations + Packaging + Installing Source RPM Package + Building Driver From TAR File + Patching Driver Into Kernel + Unloading and Removing Driver + Module Parameters + Driver Messages + Statistics + + +Introduction +============ + +This file describes the Linux driver for the Broadcom NetXtreme BCM5700 +series 10/100/1000 Mbps PCI/PCI-X/PCI Express Ethernet Network Controllers. + + +Limitations +=========== + +The current version of the driver has been tested on the latest Red Hat, SuSE, +and other Linux distributions for i386, ia64, and x86_64 CPU architectures +using 2.4.x and 2.6.x kernels. The driver has been tested up to kernel +version 2.4.31 and 2.6.13. + +The driver should work on other little endian or big endian CPU architectures, +but only very limited testing has been done on some of these machines. The +Makefile may have to be modified to include architecture specific compile +switches, and some minor changes in the source files may also be required. +On these machines, patching the driver into the kernel is recommended (see +below for instructions). + + +Packaging +========= + +The driver is released in two packaging formats: source RPM and compressed tar +formats. The file names for the two packages are bcm5700-.src.rpm and +bcm5700-.tar.gz respectively. Identical source files to build the +driver are included in both packages. bcm_sup- is a seperate tar file +that contains additional utilities such as patches and driver diskette images +for network installation. + + +Installing Source RPM Package +============================= + +The following are general guidelines for installing the driver. Refer to +DISTRIB.TXT for additional installation notes for various Linux distributions. + +1. Install the source RPM package: + + rpm -ivh bcm5700-.src.rpm + +2. CD to the RPM path and build the binary driver for your kernel: + + cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..} + + rpm -bb SPECS/bcm5700.spec + +or + + rpmbuild -bb SPECS/bcm5700.spec (for RPM version 4.x.x) + +Note that the RPM path is different for different Linux distributions. + +3. Install the newly built package (driver and man page): + + rpm -ivh RPMS/i386/bcm5700-.i386.rpm + +Note that the --force option is needed if installing on Red Hat 7.2, 7.3, +2.1AS and others that already contain an older version of the driver. + +The driver will be installed in the following path: + +2.2.x kernels: + + /lib/modules//net/bcm5700.o + +2.4.x kernels: + + /lib/modules//kernel/drivers/net/bcm5700.o + +2.4.x kernels with bcm5700 as an addon driver (e.g. Red Hat 7.3, 2.1AS): + + /lib/modules//kernel/drivers/net/bcm/bcm5700.o + +or + + /lib/modules//kernel/drivers/addon/bcm5700/bcm5700.o + +2.6.x kernels: + + /lib/modules//kernel/drivers/net/bcm5700.ko + +2.6.x kernels with bcm5700 as an addon driver (e.g. SuSE 9 SLES): + + /lib/modules//kernel/drivers/net/bcm/bcm5700.ko + +4. Load the driver: + + modprobe bcm5700 + +If loading the driver on Red Hat 3 update 4, 2.1 AS or other newer kernels with the +tg3 driver, refer to the "Removing tg3 Driver" in DISTRIB.TXT before loading +the driver. + +5. To configure network protocol and address, refer to various Linux +documentations. + + +Building Driver From TAR File +============================= + +The following are general guidelines for installing the driver. Refer to +DISTRIB.TXT for additional installation notes for various Linux distributions. + +1. Create a directory and extract the files: + + tar xvzf bcm5700-.tar.gz + +2. Build the driver bcm5700.o as a loadable module for the running kernel: + + cd src + make + +3. Test the driver by loading it: + + insmod bcm5700.o +or + insmod bcm5700.ko (on 2.6.x kernels) + +If loading the driver on Red Hat 3 update 4, 2.1 AS or other newer kernels with the +tg3 driver, refer to the "Removing tg3 Driver" in DISTRIB.TXT before loading +the driver. + +4. Install the driver and man page: + + make install + +See RPM instructions above for the location of the installed driver. + +5. To configure network protocol and address, refer to various Linux +documentations. + + +Patching Driver Into Kernel (Optional) +====================================== + +Patch files are included for patching the driver into some of the latest +2.4.x and 2.6.x kernel source trees. This step is optional and can be done +by users familiar with configuring and building the kernel. The patch +will modify the orginal kernel's source code. + +The following steps may allow you to patch the driver into a kernel: + +1. Select the patch file that matches your kernel and apply the patch: + + patch -p1 -d < bcm5700--2.4..patch + patch -p1 -d < bcm5700--2.6..patch + +where is the version of the bcm5700 driver and 2.4. is the +version of the kernel to patch (e.g. 2.4.31). + +Note: is usually /usr/src/linux or /usr/src/linux-2.4. +Note: is usually /usr/src/linux or /usr/src/linux-2.6. + +2. Configure the kernel to include the bcm5700 driver. It can be found +under Network Device Support ---> Ethernet (1000 Mbit) ---> Broadcom BCM5700 +support when make menuconfig is run. Select built-in or module for the driver: + + cd + make menuconfig + +3. Compile the kernel: + + make dep + make clean + .... + .... + + +Unloading and Removing Driver +============================= + +To unload the driver, use ifconfig to bring down all eth# interfaces opened +by the driver, then do the following: + +rmmod bcm5700 + + +If the driver was installed using rpm, do the following to remove it: + +rpm -e bcm5700 + + +If the driver was installed using make install from the tar file, the driver +bcm5700.o has to be manually deleted from the system. Refer to the section +"Installing Source RPM Package" for the location of the installed driver. + + +Module Parameters +================= + +Optional parameters for the driver can be supplied as command line arguments +to the insmod command. Typically, these parameters are set in the file +/etc/modules.conf (see the man page for modules.conf). These parameters take +the form + + =value[,value,...] + +where the multiple values for the same parameter are for multiple NICs +installed in the system. + +Note that default or other meaningful values will be used when invalid values +are selected. Some combinations of parameter values may conflict and lead to +failures. The driver cannot detect all such conflicting combinations. + +All the parameters are listed below. + +line_speed + + Selects the line speed of the link. This parameter is used together with + full_duplex and auto_speed to select the speed and duplexity of the link + and the setting of autonegotiation. + + The valid values are: + + 0 Autonegotiate for highest speed supported by link partner (default) + 10 10 Mbps + 100 100 Mbps + 1000 1000 Mbps + + If line_speed is set to 10, 100, or 1000, the NIC will autonegotiate for + the selected speed (and selected duplexity) if auto_speed is set to 1. + If auto_speed is set to 0, the selected speed and duplexity will be + set without autonegotiation. Note that 1000 Mbps must be negotiated for + copper twisted pair links. + +auto_speed + + Enables or disables autonegotiation. The valid values are: + + 0 Autonegotiation disabled + 1 Autonegotiation enabled (default) + + Note that this parameter is ignored and assumed 1 if line_speed is set + to 0. + +full_duplex + + Selects the duplexity of the link. This paramter is used together with + line_speed to select the speed and duplexity of the link. Note that this + parameter is ignored if line_speed is 0. + + The valid values are: + + 0 half duplex + 1 full duplex (default) + + +rx_flow_control + + Enables or disables receiving flow control (pause) frames. This parameter + is used together with auto_flow_control. The valid values are: + + 0 pause receive disabled + 1 pause receive enabled if auto_flow_control is set to 0, or + pause receive advertised if auto_flow_control is set to 1 (default) + +tx_flow_control + + Enables or disables transmitting flow control (pause) frames. This parameter + is used together with auto_flow_control. The valid values are: + + 0 pause transmit disabled + 1 pause transmit enabled if auto_flow_control is set to 0, or + pause transmit advertised if auto_flow_control is set to 1 (default) + +auto_flow_control + + Enables or disables autonegotiation of flow control. This parameter is used + together with rx_flow_control and tx_flow_control to determine the + advertised flow control capability. The valid values are: + + 0 flow control autonegotiation disabled + 1 flow control autonegotiation enabled with capability specified in + rx_flow_control and tx_flow_control (only valid if line_speed is + set to 0 or auto_speed is set to 1) (default) + +mtu + + Enables jumbo frames up to the specified MTU size. The valid range for + this parameter is 1500 to 9000. Default is 1500 which is standard + ethernet (non-jumbo) MTU size. Note that the MTU size excludes the + ethernet header size of 14 bytes. Actual frame size is MTU size + 14 bytes. + Jumbo MTU sizes are not supported on BCM5705 chips. + + The MTU size can also be changed using ifconfig after the driver is loaded. + See the ifconfig man page for details. + +tx_checksum + + Enables or disables hardware transmit TCP/UDP checksum. The valid values + are: + + 0 checksum disabled + 1 checksum enabled (default) + +rx_checksum + + Enables or disables hardware receive TCP/UDP checksum validation. The + valid values are: + + 0 checksum disabled + 1 checksum enabled (default) + +scatter_gather + + Enables or disables scatter-gather and 64-bit DMA on x86. This option is + only useful when running on TUX-enabled kernels or newer kernels with + zero-copy TCP. The valid values are: + + 0 scatter-gather and 64-bit DMA on x86 disabled + 1 scatter-gather and 64-bit DMA on x86 enabled (default) + +nic_tx_bd + + Enables either NIC based or host based transmit buffer descriptors (Tx BDs). + NIC based Tx BDs may be slightly faster on certain machines on earlier + 2.4 kernels where each transmit packet is usually entirely contiguous. On + later kernels with scatter-gather and TCP segmentation option, host based + Tx BDs using DMA transfer are usually faster. NIC based Tx BDs are not + supported on 5705 and later family controllers. The valid values are: + + 0 NIC based transmit buffer descriptors disabled (using host based + transmit buffer descriptors) (default) + 1 NIC based transmit buffer descriptors enabled (not supported + on 5705 family controllers) + +tx_pkt_desc_cnt + + Configures the number of transmit descriptors. Default is 120. The + valid range is from 1 to 511. Note that the driver may not be able to + allocate the required amount of memory if this parameter is set too high. + Depending on kernel and CPU architecture, each descriptor may require up + to about 268 bytes. This parameter should not be set less than 80 if + adaptive_coalesce (see below) is enabled. + +rx_std_desc_cnt + + Configures the number of receive descriptors for frames up to 1528 bytes. + Default is 200. The valid range is from 1 to 511. This parameter should + not be set less than 80 on systems with high network traffic. Setting this + parameter higher allows the NIC to buffer larger bursts of network + traffic without dropping frames, especially on slower systems. Note that + the driver may not be able to allocate the required amount of memory if + this parameter is set too high. Depending on kernel and CPU architecture, + each descriptor may require up to about 268 bytes. Each descriptor also + requires a socket buffer of at least 1536 bytes. This parameter should not + be set less than 50 if adaptive_coalesce (see below) is enabled. + +rx_jumbo_desc_cnt + + Configures the number of receive descriptors for jumbo frames larger + than 1528 bytes. Default is 128 and valid range is from 1 to 255. + When jumbo frames larger than 1528 bytes are used, this parameter should + not be set lower than 60 on systems with high network traffic. Setting + this parameter higher allows the NIC to buffer larger bursts of jumbo + traffic without dropping frames, especially on slower systems. Depending + on kernel and CPU architecture, each descriptor may require up to about + 268 bytes. Each descriptor also requires a socket buffer the size of a + maximum jumbo frame. On systems with insufficient memory, it may be + necessary to reduce this parameter. This parameter should not be set less + than 50 if adaptive_coalesce (see below) is enabled. When the maximum + frame size is 1528 or smaller (MTU size 1514 or smaller), this parameter + is not used and is always 0. + +adaptive_coalesce + + Enables or disables adaptive adjustments to the various interrupt + coalescing parameters. Enabling it allows the driver to dynamically + adjust the interrupt coalescing parameters to achieve high throughput + during heavy traffic and low latency during light traffic. + rx_std_desc_cnt, (and rx_jumbo_desc_cnt if using jumbo frames) should not + be set less than 50, and tx_pkt_desc_cnt should not be set less than 80 + when this parameter is enabled. Note that if the kernel supports the NAPI + receive polling mode, interrupt coalescing will be handled in a different + way and this parameter will not be used. The valid values are: + + 0 disabled (always disabled in NAPI mode) + 1 enabled (default) + +rx_coalesce_ticks + + Configures the number of 1 usec ticks before the NIC generates receive + interrupt after receiving a frame. This parameter works in conjunction + with the rx_max_coalesce_frames parameter. Interrupt will be generated + when either of these thresholds is exceeded. 0 means this parameter is + ignored and interrupt will be generated when the rx_max_coalesce_frames + threshold is reached. The valid range is from 0 to 500, and default is + 60 (18 if using NAPI mode). This parameter is not used and will be + adjusted automatically if adaptive_coalesce is set to 1. + +rx_max_coalesce_frames + + Configures the number of received frames before the NIC generates receive + interrupt. The valid range is from 0 to 100, and default is 15 (6 if using + NAPI mode). This parameter and rx_coalesce_ticks cannot be both 0, + otherwise no receive interrupts will be generated. It should also be set + lower than rx_std_desc_cnt (and rx_jumbo_desc_cnt if using jumbo frames). + This parameter is not used and will be adjusted automatically if + adaptive_coalesce is set to 1. + +tx_coalesce_ticks + + Configures the number of 1 usec ticks before the NIC generates transmit + interrupt after transmitting a frame. This parameter works in conjunction + with the tx_max_coalesce_frames parameter. Interrupt will be generated + when either of these thresholds is exceeded. 0 means this + parameter is ignored and interrupt will be generated when the + tx_max_coalesce_frames threshold is reached. The valid range is from 0 to + 500, and default is 200. This parameter is not used and will be adjusted + automatically if adaptive_coalesce is set to 1. + +tx_max_coalesce_frames + + Configures the number of transmitted frames before the NIC generates + transmit interrupt. The valid range is from 0 to 100, and default is 35. + This parameter and tx_coalesce_ticks cannot be both 0, otherwise no + transmit completion interrupt will be generated. This parameter should + always be set lower than tx_pkt_desc_cnt. This parameter is not used and + will be adjusted automatically if adaptive_coalesce is set to 1. + +stats_coalesce_ticks + + Configures the number of 1 usec ticks between periodic statistics updates + (DMAs). The valid range is from 100 to 3600000000, and default is 1000000 + (1 sec.). 0 is also valid and is used to disable statistics updates. + This parameter is not used and will be set to default if adaptive_coalesce + is set to 1. Please note that the valid range may vary by kernel version. + +enable_wol + + Enables or disables magic packet Wake-On-LAN when the system is shutdown. + Note that not all systems support Wake-On-LAN. The valid values are: + + 0 magic packet Wake-On-LAN disabled (default) + 1 magic packet Wake-On-LAN enabled + +enable_tso + + Enables or disables TCP Segmentation Option (TSO) when using kernels that + support it. This parameter is only defined on newer kernels that support + TSO. The valid values are: + + 0 TSO disabled + 1 TSO enabled (default) + +disable_msi + + Enables or disables message signal interrupts (MSI) when using kernels that + support it. This parameter is only defined on newer kernels that support + MSI. The valid values are: + + 1 MSI disabled + 0 MSI enabled (default) + Note: Only applies to the latest devices. + +vlan_tag_mode + + This parameter controls the stripping of VLAN tags on incoming packets, + and is used to allow VLAN tagged ASF or IPMI packets to be received + properly. The valid values are: + + 0 Auto mode (default) + 1 Normal strip mode + 2 Forced strip mode + + In normal mode, VLAN tags are only stripped if VLANs are registered + by the 802.1q VLAN module or BASP. In forced strip mode, VLAN tags + are always stripped. Auto mode will select normal strip mode if ASF/IPMI + is disabled, or forced strip mode if ASF/IPMI is enabled. + +delay_link + + If set to 1, this parameter will cause the driver to return + -EOPNOTSUPP when the SIOCGMIIREG or ETHTOOL_GLINK ioctls are called + during the first 6 seconds after driver reset. When the driver resets + the NIC during ifconfig, the link will drop and it may take several + seconds for the link to come up after autonegotiation completes. Some + applications, such as ifup, may not wait long enough for the link + before giving up. Setting this parameter to 1 may get around such + problems. The default value is 0, which means that the driver will + always return true link states to all ioctl calls, when applicable. + +disable_d3hot + + If set to 1, this parameter will cause the driver to never + put the device in D3Hot power state when the NIC is shutdown or + suspended. If set, this parameter will also disable the Wake-On-Lan + setting. A rare D3Hot related problem was seen during repeated + shutdown of PCI Express devices on systems running 2.6 kernels. + +Driver Messages +=============== + +The following are the most common sample messages that may be logged in the file +/var/log/messages. Use dmesg -n to control the level at which messages +will appear on the console. Most systems are set to level 6 by default. + +Broadcom Gigabit Ethernet Driver bcm5700 with Broadcom NIC Extension (NICE) +ver. 8.3.17b (02/21/06) + + Driver signon + + +eth#: Broadcom BCM5704 1000Base-T found at mem faff0000, IRQ 16, node addr 0010180402d8 +eth#: Broadcom BCM5704 Integrated Copper transceiver found +eth#: Scatter-gather ON, 64-bit DMA ON, Tx Checksum ON, Rx Checksum ON, 802.1Q VLAN ON, TSO ON, NAPI ON + + NIC detected + + +bcm5700: eth# NIC Link is Up, 1000 Mbps full duplex, receive and transmit flow control ON + + Link up and speed indication + + +bcm5700: eth# NIC Link is Down + + Link down indication + +bcm5700: eth# Using Message Signaled Interrupt (MSI) + + The driver is in MSI mode + +bcm5700: eth# Using PCI INTX interrupt + + The driver is in IRQ mode + +Statistics +========== + +Detailed statistics and configuration information can be viewed in the file +/proc/net/nicinfo/eth#.info. + diff --git a/drivers/net/bcm5700/RELEASE.TXT b/drivers/net/bcm5700/RELEASE.TXT new file mode 100755 index 000000000..10ca5a076 --- /dev/null +++ b/drivers/net/bcm5700/RELEASE.TXT @@ -0,0 +1,3726 @@ + + Release Notes + Broadcom BCM5700 Linux Driver + Version 8.3.17b + 02/21/2006 + + Broadcom Corporation + 16215 Alton Parkway, + Irvine, CA 92619-7013 + + Copyright (c) 2000-2006 Broadcom Corporation + All rights reserved + + +v8.3.17b (February 21 2006) +========================= + Fixes: + ------ + 1. Problem : (ISSUE289636) 5715 ports hang under linux with 6 or more + ports are active in the RFC2544 test. + Cause : While running RFC2544 test with 6 or more ports active + the linux error message "NETDEV_WATCHDOG transmitt timed out" + gets displayed multiple times. After multiple errors 5715 + ports stop working. + Change : Updated trans_start with jiffies before calling + netif_stop_queue to prevent false NETDEV WATCHDOG + Impact : 5715. + +v8.3.17 (January 18 2006) +========================= +The patch file in the bcm_sup-8.3.16 tar file will not compile +in 2.6.14 kernels. This release version is using a patch +file for 2.6.13 kernels. + +v8.3.16 (January 10 2006) +========================= + Enhancement: + ------------ + ECD13216 complete workaround for 5714/5715 fiber: + During chip init set: + 0x5b0[10]=1 + 0x6808[5:4]=01 + To check link status read: + 0x460 bit 3 is set when link is established. + + +v8.3.15 (December 16, 2005) +=========================== + Enhancement: + ------------ + Added support for 5714S and 5715S. + + +v8.3.14 (November 02, 2005) +=========================== + Fixes: + ------ + 1. Problem : (CQ14546) Montara A2 devices cannot write to ST flash + parts. + Cause : ST parts require an additional "write enable" command + to be executed before any write operations can + commence. Montara A2 devices do not issue this + command on behalf of the driver. + Change : Code already exists in the driver to issue the + "write enable" command, but the code is only enabled + on an opt-in basis. The 5714 family devices have + been added to the list of devices that explicitly + issue this command. + Impact : This fix only impacts 5714 family of devices. + + +v8.3.13 (October 28, 2005) +========================== + Fixes: + ------ + 1. Problem : CQ13326 NETDEV Watchdog timeout followed by kernel panic. + Cause : A NETDEV watchdog timeout was occurring because writes to the + indirect memory register were not being flushed when setting + the watchdog timer's keep alive bit. + Change : Changed the driver to use direct memory writes instead of + indirect memory writes when setting the keep alive bit. + Impact : This fix impacts any PCI-E device that has ASF/IPMI enabled. + + + +v8.3.11 (October 20, 2005) +========================== + Fixes: + ------ + 1. Problem : CQ13326 NETDEV Watchdog timeout followed by kernel panic. + Some systems would generate NMI's followed by NETDEV Watchdog + timeouts and eventually panic when running a stress test using + multiple NIC's in a BASP team with ASF/IPMI enabled. + Cause : The NMI was caused by the ASF/IPMI firmware reseting the NIC + while the driver was operational because of a watchdog timeout. + The watchdog timeout was occurring because the keep alive + handshake between the driver and firmware would fail + occasionally for the same reason as documented in CQ13369 in + v8.3.1. In this case, the driver was using pci config writes to + set the keep alive flag when ASF/IPMI was enabled. Pci config + writes made by the driver while it is running can result in the + chipset misrouting the write to another device. When this + happens, the firmware does not see the keep alive bit being set + by the driver and concludes that the driver had failed and + resets the chip accordingly. + Change : There are two methods available to workaround this problem. One + workaround is to set the pci=nommconfig switch when starting + the kernel. This switch is available only with newer kernels + (2.6) and on systems that support PCI-E (i.e. ICH6-7). Starting + the kernel with this switch will disable memory mapped config + cycles from being used by the kernel, so the kernel instead + uses the standard 0xcf8/0xcfc i/o ports to generate pci config + cycles. The other method is to upgrade to this driver which + avoids using pci config cycles when updating the keep alive + flag and uses memory writes cycles instead. + Impact : This problem occurs on devices that have ASF/IPMI enabled and + are running on a 2.6 kernel and in a system that is PCI-E + capable. Similarly, this patch is executed only on systems with + an Intel ICH4 or newer chipsets and when ASF/IPMI is enable. + The patch is not executed if ASF is disable. Also, the old + method of using pci config writes to update the keep alive flag + is used when the chipset is older than ICH4. + + 2. Problem : Broadcom Teaming driver would not fail over when controller + speed was forced to 100 half duplex. + Cause : The driver did not indicate a link down state when necessary. + The LineSpeed variable was not being set properly in the NICE + interface for teaming. + Change : The driver indicates the proper link state in the NICE interface. + Impact : Broadcom Teaming driver will failover properly. + + +v8.3.11 (October 18, 2005) +========================== + +Note: Removal of support for 5714S, 5715S, 5755, 5787 controllers. + + + +v8.3.10 (October 14, 2005) +========================== + Fixes: + ------ + + 1. Problem : CQ13716 Netdump does not work on RH4EL U1 with bcm5700 + driver. When intentionally crashing the system to test the + netdump application, the bcm5700 driver would hang on the + client and so the dump file would not be created on the netdump + server. + Cause : The interface to the driver poll function called by netdump + when the system crashes changed slightly between RHEL3 and + RHEL4. For RHEL4, the poll function in the driver called by + netdump (poll_bcm5700) no longer has to call the bcm_poll() as + it had previously. This is because the netdump controller calls + the bcm_poll() function from outside the driver. Calling + bcm_poll() from within the driver results in recursively + re-entering netdump, hanging the application. + Change : The driver was modified to detect the version of Redhat it's + being built for and to use the appropriate algorithm in + poll_bcm5700(). + Impact : This change applies specifically to Redhat and Fedora OS's, and + is independent of the device type. + + 2. Problem : CQ14274 Linux bcm5700 build errors on SUSE 10.2.6.13-15. + Cause : The driver was using "#if"'s instead of "#ifdef"'s on variables + that could remain undefined. This caused the compiler + distributed with SUSE to issue compiler warnings when building + the bcm5700 driver. + Change : Two categories of changes made to the driver to fix this + problem. First, if the variable causing the warning was used + such that it either simply was "defined" or "not defined", then + the "#if" was changed to "#ifdef" in the driver. However, if + the variable usage was such that it could either be + "not defined" or a number from 0-n, then a conditional was + added into the header file to define the variable and set its + value to 0 whenever it was not defined. This allowed the code + in the driver to still use the "#if" and not have to change + Impact : This change was applied to the driver in general and applies to + all linux distributions, not just SUSE. These changes do not + apply to a specific NIC, though they are used enable and + disable specific features in the driver, such as, software + workarounds for 570x, enabling Jumbo Frames, TBI support and + PCI-X software workarounds. + + +v8.3.9 (September 30, 2005) +=========================== + Fixes: + ------ + Problem :The PHY registers can become corrupted on all 5714S, + 5715S, and 5780S devices. + Cause :The periodic link check code does not acquire the phy + lock before performing its task. + Change :Add phy lock acquisition and release code around + the link check function call. + Impact : 5714/5715/5780 fiber. + + +v8.3.8 (September 29, 2005) +=========================== + Fixes: + ------ + Problem :CQ14155 5714 fiber occasionally does not get link. + Cause :This problem occurs when the duplex and line_speed + parameters are used with the 5714 fiber controller. + The driver allowed autonegotiation with only half + duplex advertised. Some switches do not support 1G fiber at half + duplex. + Change :If the controller is fiber, autonegotiation has full and half + duplex advertised regardless of parameter settings. + Impact : 5714/5715/5780 fiber. + + Note: Removed support for 5903F that was introducd in v8.3.2. + +v8.3.7 (September 27, 2005) +=========================== + Fixes: + ------ + 1. Problem : The 5780 fiber ports on an IBM Maui PPC Blade server would stop + receiving packets during a simple ping test. + Cause : The RX DMA Engine (RDE) was not being re-enabled after the RX + MAC was reset. This happens only after driver v8.3.2. + Change : The sequence of reseting the Rx MAC was changed so that the RDE + is enabled after the Rx MAC is reset. + Impact : This change was made to specifically correct a problem seen on + 5780 and 5714 fiber devices. However, it should be noted that + the implementation applies the change to all fiber devices. + + 2. Problem : CQ 13980 BCM5780S can't pass link test with bcm5700 v8.3.2. + Cause : The link test would fail when running "ethtool -t ethx" on + fiber links that were in forced fallback mode. The test failed + because the PHY_FIBER_FALLBACK flag in the PhyFlags variable + was not being reinitialized when the PHY was reset. This caused + the driver to think it was already in forced fallback mode when + it wasn't. Running ethtool -t would reset the PHY and the + driver would autoneg the link. When autoneg would fail, the + driver wouldn't force the link because the force fallback flag + (PHY_FIBER_FALLBACK) was already set from the initial PHY reset + and hence the driver though it had already fallen back. + Change : Changing the driver to clear the PHY_FIBER_FALLBACK flag in + the PhyFlags variable whenever 1) auto-neg is initiated or + 2) whenever the PHY is reset fixed this problem. + Impact : This problem only occurred on 5780, 5714 and 5715 devices with + fiber phys attached to a switch that forces the link to gigabit + speed (e.g a switch that doesn't auto negotiate the link). + + +v8.3.6 (September 22, 2005) +=========================== + Fixes: + ------ + 1. Problem :CQ14069 5714s causes NMI when bringing interface down + with ASFIPMI enabled. + Cause :5714 Switching to VAUX power on certain systems caused + NMI to occur. + Change :The 5714/5715 will not switch to VAUX power. + Impact :5714/5715 controllers. + + 2. Problem :CQ14119 Using 5714 fiber a linking loop occurs when restrictive + autoneg is used. + Cause :The driver continually configures the fiber link causing + continual phy interrupts. Only when user forces link. + Change :The driver reconfigures the phy when requested configuration + differs from current configuration. + Impact :5714/5715 fiber. + + +v8.3.5 (September 19, 2005) +========================== + Fixes: + ------ + 1. Problem :CQ14063 parameter nic_tx_bd not getting set. + Cause :5705 and later controllers do not support this + feature. + Change :README.TXT was updated to include the description + "and later" + Impact :None. + + 2. Problem :CQ14054 Two adapter names for each lom in Linux. + Cause :The driver displayed a different integrated phy + number than the controller type. + Change :Changed the code to ensure the correct phy number + is displayed. + Impact :5780 SERDES only. + + 3. Problem :CQ13971 5714S stops passing traffic after a few seconds. + Cause :The Rx Mac Mode reset was causing this to occur. + Change :No longer reset RxMode for 5714 SERDES. + Impact :5714/5715 SERDES. + + +v8.3.4 (September 15, 2005) +========================== + + + Enhancements: + ============ + 1. Added basic support for 5755 and 5787 to driver. + - Added device, asic and phy ids for 5755/5787 devices. + - Modified the id macros to include these new devices. + - Added code to recognize the new phy id. + - Changed the PCI-E detection algorithm to use the kernel api. + 2. Enabled hardware fix for CQ12384 and CQ12156 on 5755 and 5787. + - The 5751/5752/5753 devices may assert #INTA before writting + the corresponding status block to host memory. + - A software workaround for this problem was first implemented in + v8.1.10 of the driver (change #1 in release.txt). + - A hardware workaround to this problem has also been implemented + in 5755 and 5787 devices. + - This change enables the hardware workaround to this problem by + setting bit-29 in register 0x4c00 on 5755 and 5787 devices. + 3. Enabled full hardware checksum offloading on 5755 and 5787. + - Use NETIF_F_HW_CSUM instead of NETIF_F_IP_CSUM on 5755/5787 + devices. + 4. Added TSO support for 5755 and 5787 to the driver. + - The definition of the L3/L4 header length field in the send + buffer descriptor has been changed on 5755/5787 devices. + - The driver was modified to use a new algorithm to calculate + the L3/L4 header length for 5755/5787 devices. + 5. Added fix for ECD13216 for the SERDES cross link problem. + + + +v8.3.3 (September 7, 2005) +========================== + Fixes: + ------ + 1. Problem : CQ13626 Wrong message is displayed on the console when jumbo + frames are enabled. + Cause : Redo of fix #2 in 8.3.1. + Change : Reordered some of the printk's in the driver so that the + messages will be displayed correctly for all options. + Impact : This bug is cosmetic, though it will cause some confusion + regarding whether TSO or jumbo frames has been enabled on + adapters other than the 5714 family. + + 2. Problem : 5714, 5715, and 5780 devices do not work with ST flash + parts. + Cause : The NVRAM discovery code was using the legacy + discovery method instead of the 5750 method. + Change : Change code to use the 5750 NVRAM discovery method. + Impact : ST NVRAM parts operate correctly. + + 3. Problem : CQ13846 Call Trace When Jumbo Frames Are Enabled. + Cause : When jumbo frames are enabled the driver will use vmalloc + and vfree to setup the jumbo packet descriptors. + vfree/vmalloc can only be used in user context (open/close/ioctle) + and enterrupts must be enabled. The driver was using vfree with + interrupts disabled causing the call trace. + Change : The vmalloc/vfree was replaced with kmalloc/kfree. + Impact : None. + + 4. Problem : CQ13660 Ethtool Offline Test, intermittently Fails Loopback Test. + Cause : The driver did not reset the RX mode in the mac causing the + phy to drop the first few packets. This only occured in + the 5780/5714/5715 devices. Other serdes devices have the rx + mode reset in the code. + Change : Added rx mode reset to ensure the phy is in sync with the mac. + Impact : Only 5780/5714/5715. + + + +v8.3.2 (August 26, 2005) +======================= + Fixes: + ------ + 1. Problem : CQ13025 Unable to force speed on legacy serdes (5704,03,etc). + Cause : Failed in ethtool due to code that did not include 5704/3 + fiber properly. + Change : Changed code to allow fiber to be forced to 1000Mbs. + Impact : All Serdes adapters. + + 2. Problem : CQ13533 Cannot compile on PPC w/SuSe 8. + Cause : Missing #include . This problem + was originally reported in driver v8.2.14 as + vmalloc() was introduced. The vmalloc was removed at that + time. + Change : Added missing include. + Impact : none. + + Enhancements : + ============= + Added support for 5903M and 5903F adapters. + + + +v8.3.1 (August 23, 2005) +======================= + Fixes : + ------- + 1. Problem : CQ13369 Kernel panic occurs under stress with large 802.3ad + teams. + Cause : The kernel panic was caused by the ICH6 rev. C2 misdirecting + pci config reads to the wrong device. The driver was using pci + config cycle to read the low-priority mailbox of the 5703 + attached to the 5714's expansion bus. The driver was using + indirect pci config cycles to read the MB to apply a special + cycle workaround needed for 5703-A1/2 and 5704-A0 when they + are connected to the PCI-X bus of an ICH1-ICH4. + Change : This workaround is really only needed when the 5703/4 is + directly attached to older ICH chips. This problem was resolved + by modifying the driver to only apply the workaround when a + 5703-A1/2 or 5704-A0 is directly attached to an ICH1-ICH4 + chipset. This problem can also be worked around by setting the + switch pci=nommconfig when starting the kernel. This switch is + available only with newer kernels (2.6) and on systems with + PCI-E (i.e. ICH6-7). Starting the kernel with the above switch + disables memory mapped config cycles being used by the kernel, + so the kernel instead uses the standard 0xcf8/0xcfc i/o ports + to generate pci config cycles. + Impact : This problem and the fix only applies to 5703-A1/A2 or 5704-A0 + connect to a PCI-X bus in systems with an ICH6 or ICH7 chipset. + + 2. Problem : CQ13626 Wrong message is displayed on the console when jumbo + frames are enabled. + Cause : The 5714 family of adapters cannot support both jumbo frames + and TSO at the same time. When the driver detects that a user + is trying to enable both features on a 5714, it will disable + TSO, enable jumbo frames, and log a message to the syslog. + There was a bug in the driver logic that caused it to log a + message saying jumbo frames and TSO cannot simultaneously + be supported even if the adapter could support both features + being enabled at the same time. + Change : The driver logic was changed to only log this message when the + adapter is a member of the 5714 family of controllers. + Impact : This bug is cosmetic, though it will cause some confusion + regarding whether TSO or jumbo frames has been enabled on + adapters other than the 5714 family. + + 3. Problem : CQ13658 stats_coalesce_ticks parameter does not default to + the correct number. + Cause : If the parameter value is set by the user and it is below + the minimum supported value, then the parameter value used + will be the minimum supported value for this parameter. + When the value exceeds the maximum supported + value, then the value will become the default value. + Change : The driver will not validate this paremeter if the + adaptive_coalesce parameter is set. + Impact : The driver will display a message when stats_coalesce_ticks + and adaptive_coalesce parameters are set. + + 4. Problem : CQ13025 Unable to force speed on legacy serdes (5704,03,etc). + Cause : A bug in the driver prevented the user from forcing speed on + serdes adapters. The speed parameter was not being checked + properly. + Change : The driver checks the speed input correctly. + Impact : All legacy serdes adapters can now be forced to 1000. + + 5. Problem : CQ13612 Rx_Jumbo_Packets counter does not increment on 5780. + Cause : The adapters 5705 and later do not have the jumbo packet + counters. + Change : The driver does not display the jumbo packets counter. + Impact : 5705 and new adapters will not display the counter. + + 6. Problem : CQ13263 5780 fiber intermittently fails to link properly with + 3COM 4900 SX switch. + Cause : Occasionally the 4900 switch and the 5780 fiber will not + autonegotiate. + Change : A delay was put in the driver to allow better autonegotiation. + Impact : 5780 Serdes only. + + 7. Problem : CQ13759 bcm5700 corrupts memory when doing ethtool -t eth0. + Cause : The driver was using a wrong value in the driver self test + allowing data writes to user space. + Change : The test value was changed to the correct value. This bug + was found and fixed by York Chung. + Impact : All adapters when running this test. + + + Enhancements: + ============ + 1. Added support for 5714/5715 family of adapters. + 2. Added the 5714/5714 performance fix for CQ13140. + 3. Added new IPMI handshake. + + +v8.2.18 (August 1, 2005) +======================== + Fixes: + ====== + Problem : CQ13578 Linux i386 2.4:insmod bcm5700 8.2.XX with tg3 + already loaded causes panic. + Cause : The netdevice_notifier was being registered to the bcm + driver code and the code did not unregister the notifier + callback routine when the bcm device was not present. + This bug was introduced in driver v8.2.6 cq10262. + Change : Registering of notifier is done when a device is found. + Impact : 2.4 kernel + + +v8.2.17 (July 29, 2005) +====================== + Fixes: + ====== + Problem : CQ13550 Linux 8.2.12+ driver fails BASP Automation. + Cause : A bug was introduced in v8.2.12 that prevented the + 5703 from getting proper link after closing and opening + the driver interface. + Change : The code was modified to ensure 5703 is configured + properly after each interface open. + Impact : 5703 copper nics using using v8.2.12 upto v8.2.16. + + +v8.2.16 (July 27, 2005) +====================== + Enhancement: + ============ + Added the skb_cloned_header check for tco support in 2.6.12 kernels. + + +v8.2.15 (July 26, 2005) +======================= + Fixes: + ====== + + 1. Problem : CQ13533 Cannot compile on PPC w/SuSe 8. + Cause : vmalloc is not in the SuSe 8 library. + vamalloc was introduced into the driver in v8.2.13. + Change : Replaced vmalloc with kmalloc. + Impact : Problem resolved on SuSe 8 PPC. + + 2. Problem : CQ13525 Missing items in supplemental tar file. + Cause : latest patch file was not included, nor was disk image. + Change : included patch files and disk image. + Impact : None. + + 3. Problem : CQ13519 Jumbo enabled causes call trace. + Cause : vmalloc was being used outsie of init or close functions. + Change : Replaced vmalloc with kmalloc. + Impact : None. + + +v8.2.14 (July 21, 2005) +======================= + +This version does not have support for 5714/5715 controllers. + + +v8.2.13 (July 21, 2005) +======================= + 1. Problem : CQ 13381 5715s: Driver incorrectly reports the PCI-X bus + speed is 33 MHz instead of 133 MHz. + Cause : The driver was incorrectly using just the Bond ID (and not + the ASIC IC) to determine if chip was a 5704CIOBE. On a + 5714Cu, the Bond ID by luck matched the CIOBE which led the + driver to conclude that the PCI-X bus speed was 133 MHz. On + a 5714S, the Bond ID did NOT match the CIOBE, and so the + driver used the bits 0-4 (=0) in the Clock Control register + (0x70) to incorrectly conclude that the PCI-X bus speed was + 33 MHz. + Change : The driver was hardcoded to display the PCI-X bus speed as + 133 MHz when 1) both the ASIC Id AND the Bond Id both + identify the chip as a 5704CIOBE, or 2) the ASIC ID is a + 5714, 5715 or 5780. + Impact : This change is only cosmetic and will not have any impact + on system performance or functionality. The change was only to + correctly display the bus speed stored in /proc/net/nicinfo. + The code that was changed is used by all PCI-X devices, + in particular CIOBE, 5714, 5715 and 57890. + + 2. Problem : CQ 13431 B57LDIAG nictest fails on 5780/5714/5715. + Cause : The driver was not restoring the MSI state properly + after resets. This bug was introduced in driver v8.2.12. + Change : Save the MSI state before reset and retore it after + reset. + Impact : All msi supported drivers. + + Enhancement : 5703 DMA read water mark was to 512 in pcix mode as + the proper value for the workaround below after + tests determined this setting to be the optimal value. + + +v8.2.12 (July 20, 2005) +======================= + Fixes : + ------- + 1. Problem : CQ13208 Kernel panics when using ethtool on an + inactive interface. + Cause : The ethtool command executes LM_SetupPhy(), which + dereferences the device's status block. When an + interface is not active though, the status block + memory will have been freed / will be NULL. The + crash is due to a NULL pointer dereference. + Change : Avoid calling LM_SetupPhy() if the interface is not + active. + Impact : None. + + 2. Problem : A 5703 or 5704 can hang when connected to a PCI-X bus if the + DMA Read Watermark register is not programmed correctly. This + problem typically manifests itself as a watchdog timeout and + possible loss of a TCP session. The driver monitors watchdog + timeout events and will automatically recovers from these + events by reseting the chip. + Cause : This problem was documented in the hardware errata for the + 5703 chips, though it was not implemented in prior driver + releases. + Change : When a 5703 or 5704 is connected to a PCI-X bus, the DMA Read + Watermark is programmed as follows: + + Max Read Byte Count = PCI Config. Reg. 0x42, bits 3-2 + DMA Read Watermark = PCI Config. Reg. 0x6C, bits 18-16 + + Max Read Byte Count Allowable DMA Read Watermark Values + ------------------- ----------------------------------- + 00 = 512 bytes 0-4 + 01 = 1024 bytes 0-5 + 10 = 2048 bytes 0-7 + + Impact : Systems using a 5703 or 5704 chip in a PCI-X bus may + experience NETDEV watchdog timouts without this change. + Upgrading the driver to this version should fix this problem. + No other system components need to be changed. + + 3. Problem : ethtool -t causing oops when interface is down. + Cause : Driver code would attempt to free memory based + on the index of the receive packet queue after the + queue memory had already been freed. + Change : The re-initializeation of the receive packet queue at driver + close to clear the index. + Impact : none. + + 4. Problem : CQ13263 5780 fiber occasionally looses link on 3com 4900sx. + Cause : Phy link would go down during reset and the reset phy + function was not waiting long enough. + Change : Added longer delay in Reset Phy driver code and the driver + does not toggle the gigabit setting in Mac. + Impact : 5780 fiber only. + + + Enhancement: Added loopback mode support for testing. + + +v8.2.11 (July 01, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ13321 Driver does not build. + Cause : Undefined constant. + Change : Recode so that the constant is no longer needed. + Impact : None. + + +v8.2.10 (July 01, 2005) +======================= + + 1. Problem : CQ12559 Call trace occurs when enslaving interface. + Cause : The bonding driver can call the bcm5700 in a context + where preemption is disabled. Some kernels will + issue a call trace when an interface function involves + a sleep thread when there should be none. + Change : The driver was changed to detect if a call was being + made to it in a non sleep context and it uses the + appropriate copy function. + ( the prior implementation of this fix was incorrect ) + Impact : All adapters with this version driver and kernel 2.6.x + and above. + There is still a call trace when the bonding driver is + brought down, but it occurs with the tg3 driver as well. + + 2. Problem : CQ13280 5780 displays incorrect speed and duplex + advertisements in the procfile. + Cause : The 5780 uses new phy code, which did not include + filling in the "advertising" field of our device + structure. This field is used to construct strings + for the procfile. + Change : Add code to properly construct speed advertisement + strings for the 5780. + Impact : None. + + +v8.2.9 (June 28, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ13274 5780 cannot get link on copper PHYs. + Cause : The 5780 uses the same PHY, but a different PHY mode + when configured as a serdes device. The different + PHY mode requires the use of a different PHY register + set. The driver was coded to always use the alternate + PHY mode when setting the flow control advertisement. + Change : Change the code to use the alternate PHY mode only + when on a 5714 family serdes device. + Impact : None. + + +v8.2.8 (June 24, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ13202 Shasta C1 fails ethtool -t test and stops + responding. + Cause : The new HaltCpu code was improperly attempting to + halt a non-existant Tx Cpu. This is because the + T3_HAS_TWO_CPUS bit was somehow set. + Change : Explicitly turn off T3_HAS_TWO_CPUS before detecting + devices that actually have two CPUS. + Impact : All non-two-cpu devices. + + 2. Problem : CQ13205 5714 fiber boards repeatedly display message + of link down. + Cause : RH 4 seems to continually open and close the interface + of one of the ports of the 5714. If the cable of that + port is not linked, the message will be displayed. + Change : The driver will report link status when it changes. + Impact : All 5714 family fiber. + + +v8.2.7 (June 21, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ13011 5714s/5715s does not link when switch is forced + to a 1000 and not set to Auto Negotiation. + Cause : The speed forcing code for 5714s was not in place. + Change : Code was added to the driver to allow forcing the + speed to 1000Mbs and the driver will fall back to + 1000Mbs when connection is sensed but autonegotiation + is disabled on the switch. + Impact : 5714s/5715s/5780s + + 2. Problem : CQ13051 5714s/5715s does have flow control function. + Cause : The code for flow control was not in place. + Change : Code was added to the driver to allow flow control. + Impact : 5714s/5715s/5780s + + 3. Problem : CQ13072 Do not switch to VAUX power on 5714/5715. + Cause : Power consumption is excessive. + Change : Code was added to the driver to ensure VAUX power is + not consumed. + Impact : 5714s/5715s + + 4. Problem : CQ12559 Call trace occurs when enslaving interface. + Cause : The bonding driver can call the bcm5700 in a context + where preemption is disabled. Some kernels will + issue a call trace when an interface function involves + a sleep thread when there should be none. + Change : The driver was changed to detect if a call was being + made to it in a non sleep context and it uses the + appropriate copy function. + Impact : All adapters with this version driver and kernel 2.6.x + and above. + + + +v8.2.6 (June 13, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ10262 iThe /proc/net/nicinfo filename does + not match the device name in the output of + ifconfig. + Cause : No mechanism existed to notify the driver when the + administrator changes the name of the device. + Change : Added a callback function to respond to name change + events. When a name change event occurs, the proc + filesystem entry is torn down and rebuilt. + Impact : None. + + 2. Problem : CQ12637 When running 'ethtool -t ', the + system becomes unresponsive for a several seconds. + Cause : On uniprocessor systems, the kernel is busy performing + the ethtool test. This processing comes at the + expense of servicing user events. + Change : Added a message before the test begins notifying the + administrator that the test will take some time. + Littered the code with sleep() calls so that the + kernel can service user events in between tests. + Impact : None. + + 3. Problem : CQ12972 Kernel panics when ethtool test is run after + being up'd and down'd. + Cause : When attempting to restore the previous power state + (D3), the code dereferences a NULL status block + pointer. + Change : Detect if the status block pointer is NULL. If so, + forgo any packet ring cleanups. + Impact : None. + + 4. Problem : CQ12969 During 'ethtool -t ' tests, the + kernel issues "transmit timed out" messages. + Cause : In normal operation, MM_IndicateStatus turns on and + off the kernel transmit queues. When the transmit + queues are on, a packet must be transmitted within a + certain amount of time, or else these warnings will + appear. During ethtool tests, the device is suspended + and all kernel transmit queues are turned off. It is + possible however, for MM_IndicateStatus to be called + after suspending the device. In this scenario, on + link up, MM_IndicateStatus would reenable the transmit + queue during the ethtool test. The end result is the + above messages. + Change : Modify the MM_IndicateStatus() function to only toggle + the kernel queues if we are not suspended. + Impact : None. + + 5. Problem : CQ12215 Ethtool failures during ethtool test. + Cause : There is a race condition between the driver and the + firmware with respect to nvram lock acquisition. + There can be cases where a terminated firmware + acquires the NVRAM lock post-mortem. + Change : Modify LM_HaltCpu() to free the nvram lock on behalf + of the firmware whenever we can. Flag the error + otherwise. + Impact : None. + + 6. Problem : CQ12884 Linux DMA problem with ldiag. + Cause : Some new distributions do not allow user space apps + access to memory allocated by a kernel process. + Change : The driver will map/unmap memory that was allocated + in user space. + Impact : Ldiag application only. + + 7. Problem : CQ12427 Enabling TSO causes random link down/up. + Cause : Oversized message stress tests may impact TSO in + some machines causing NETDEV Timeouts. + Change : Added code to disable TSO if Timeouts detected + with TSO enabled. + Impact : 575x + +v8.2.5 (May 20, 2005) +======================= + + Fixes : + ------- + 1. Problem : CQ12806 Random kernel panics with 5714A1 + the kernel. + CQ12827 Load/Unload with MSI enabled causes + "nobody cared! (screaming interrupt)" + + Cause : MSI enable bit in MSI capability block + is cleared during GRC reset. + + Change : Added software work-around to restore + the state of this bit after a GRC reset + + Impact : None. + + +v8.2.4 (May 16, 2005) +======================= + + Enhancements : + -------------- + 1. Change : Added support for new HP NC32Xi products. + Impact : None. + + +v8.2.3 (May 13, 2005) +======================= + + Fix: + ---- + 1. Problem : CQ12133 Ethtool reports the wrong link speed. + Cause : When the driver forces the link, the link will + many times be acquired before finishing the + SetupCopperPhy() call. This, in turn, will + cause MM_IndicateStatus() _not_ to be called. + MM_IndicateStatus() updates the line_speed + variable which is used to report the link + speed when using the ethtool method. In effect, + the ethtool query reports a stale link speed. + Change : Code the driver to obtain the link speed from + the pDevice->LinkSpeed field instead. Removed + the line_speed member from the device structure. + Impact : None. + + 2. Problem : CQ12831 Bootcode version string missing device + name for 5714 devices. + Cause : The GetBootCodeVersion function tests the value + of an instruction it read from NVRAM to determine + whether it should use the new version extraction + routines or the old extraction routines. The test + was overly restrictive, which would force the + driver to use the old method. + Change : Change the test to only inspect the opcode portion + of the instruction. The rest of the bits are + offset bits which can and do change between + firmware versions. + Impact : None. + + +v8.2.2 (May 10, 2005) +======================= + + Fix: + ---- + 1.Problem : CQ12784 hogging interrupts message seen with 5714. + Cause : The device was not initializing properly due to the + the driver putting the device into slow clock mode. + Change : The driver keeps the device in full power mode. + Impact : This impacts the 5714/15 and 5780. + + 2.Problem : CQ12785 NMI seen using 5714. + Cause : Same as above. + + 3.Problem : CQ12786 5715 cannot get link. + Cause : Sambe as above. + + 4.Problem : CQ12824 5714 removing driver from bonding team and + basp team results in kernel panic. + Cause : Same as above. + + Enhancement + ----------- + Added msi support for 5780. + + +v8.2.1 (April 29, 2005) +======================= + + Fix: + ---- + 1.Problem : CQ12781 5714C stops passing traffic after ifup/down. + Cause : The driver puts the device into slow clock mode when + shutting down the interface to conserve power and this + occasionally creates an inability for the device to + transmit when brought back up. The real problem may + lay in the driver initialization code of the device + clock speed on power up. This driver release is to allow + internal testing to contine, until debug is completed. + Change : The driver does not slow the clock when shutting down + the interface. + Impact : 5714/5715 should function as expected. + + 2.Problem : CQ12469 Add 5780 Device IDs. + Cause : The 5780 copper and fiber have PCI Device IDs of 0x166a + and 0x166b respectively. + Change : Added the ids. + Impact : 5780. + + +v8.2.0 (April 22, 2005) +======================== + + Enhancements + ------------ + 1. Change : Added support for 5714 + + 2. Change : CQ12081 Added MSI support for 5714. + Impact : Only 5714. + + 3. Change : Added support in Makefile for PPC and SuSE. + Impact : Only in PPC machines. + + Fix: + ---- + Problem : CQ12677 "$" character appended to device name. + Cause : Typo in script file. + Change : Deleted extra character. + Impact : Only visual. + + +v8.1.55 (April 8, 2005) +======================== + + Enhancement: Using the updated GPHY BIAS for 5752. + ------------ + Change : The code was changed to include a setting to the GPHY + to ensure a high quality network link over long cable + lengths. No problems have been reported with the + previous GPHY BIAS setting. + + Impact : 5752 has no noticable impact. + + +v8.1.54 (April 8, 2005) +======================= + + Fix: + ---- + Problem : CQ12639 Latest driver causes panic on DELL 6650. + Cause : A bug introduced in driver v8.1.50 created a timing + window on the 5700 where a releasing spinlock + was out of sync with the acquiring spinlock. + This problem was specific to the 5700 and only + seen on the 6650 integrated 5700 device. + Change : The driver code was changed to ensure the 5700 + spinlock is not released before is is acquired. + Impact : 5700 only. + + + +v8.1.53 (April 6, 2005) +======================= + + Fix: + ---- + 1.Problem : CQ12628 Driver does not compile on Beta SuSE 9.3 + Cause : A coding bug in the driver code accessed only + by kernel versions greater than 2.6.10. This bug + was introduced in driver v8.1.10. + Change : This bug was a typo that was corrected. + Impact : None. + + + 2.Problem : CQ12450 bcm5700 does not compile on PPC64 RHEL3 U3. + Cause : Additional Makefile switches were needed to compile on + the RHEL3 U3 PPC64. + Change : The Makefile was updated to include a makefile + switch and an LD line to allow PPC64 compilation on + RHEL3 U3 PPC64. + Impact : May no longer build on older PPC64 kernels. + + +v8.1.52 (April 1, 2005) +============================ + + Fix: + ---- + Problem1: CQ12549 Error 63 getting the ASF configuration table. + Cause : The NVRAM was not being read properly. + Change : The NVRAM access code was changed to properly access + NVRAM. + Impact : None. + + Problem2: CQ12467 System hanging after unloading driver. + Cause : The driver accessed reserved registers. + Change : Removed the code that accessed the reserved registers. + Impact : None. + + +v8.1.51 (March 29, 2005) +============================ + + Fix: + ---- + Problem : CQ12549 Error writing to ASF config table in NVRAM. + Cause : The 5752 will not allow an NVRAM to write above 64k. + Change : The reported size of the NVRAM was changed to 64k. + Impact : None. + + Removed support for that 5714 ASIC revision. + +v8.1.50 (March 16, 2005) +============================ + + Fix: + ---- + Problem : CQ11136 GPIOs need to be configured to outputs. + Cause : 5752 GPIOs default to inputs. + Change : Added code to enable GPIO output. + Impact : None. + + + Added support for ASIC revisions 5752, 5714. + + +v8.1.11 (March 11, 2005) +============================ + + Fix: + ---- + Problem : CQ12400 Removing driver causes a kernel panic + Cause : The statistics timer was not being disabled at + shutdown. + Change : Disable statistics timer at shutdown. + Impact : None. + + +v8.1.10 (March 10, 2005) +============================ + + Fix: + ---- + Problem : CQ12156 ATI transmit timeout-"NETDEV WATCHDOG". + Cause : The ATI chipset did not call the driver ISR + after the ISR did not service an INTx interrupt. + Change : The driver will check a register to determine if + the INTx should be claimed if the status block has + not been updated on ISR entry. + Impact : This fix may improve system performance on some + systems as it reduces the amount of spurious or + unclaimed interrupts. + + Enhancemnts + ----------- + + 1. Problem : Users want command line parameters. + + Change : All the parameters are accessible on the command line. + The code uses MODULE_PARAM for new kernels. + + 2. Problem : MSI support needs to test for older non-msi supported + machines running kernels with MSI support enabled. + Change : Added MSI validity test. + + 3. Problem : Jumbo frame support on some systems caused device + counters to increment CRC errors. + Change : Added additional setting to PHY. + Impact : None. + + 4. Problem : pci_find_device() will be deprecated. + Change : Added pci_dev_present() and pci_get_device() where + pci_find_device() is. + + 5. Change : Added mmiowb() in tx/rx paths. + + 6. Change : Changed makefile for netdump service build to not + rely on #define RED_HAT_LINUX_KERNEL. + + 7. Change : Added code to better scale the timer intervals + dependent on device. + + +v8.1.9 (March 1, 2005) +============================ + + Support for ASIC revisions 5752, 5714 and 5715 was taken out of + the driver. + + +v8.1.8 (February 28, 2005) +============================ + Fixes: + ------ + + 1. Problem : CQ11788 5721 not receiving probes in Intel team. + Cause : Statistics do not get updated fast enough. + Change : Connect the stats_coalesce_ticks module parameter + to the actual statistics update frequency. + Impact : System behaves as expected. + + + 2. Problem : CQ12273 "MODULE_PARM is deprecated" messages are + displayed when compiling on Red Hat 4.0. + + Cause : Drivers using the deprecated macro MODULE_PARM will + cause compile warnings to be displayed in systems + using RedHat 4. The bcm5700 driver was still using + the MODULE_PARM as the parameter interface. + + Change : The driver now uses ethtool for passing most parameters. + + Impact : The driver operating in environments with kernel versions + of 2.6.5 and above requires the use of ethtool to set + parameters. When the driver is used with a kernel version + older than 2.6.5 it will accept all command line parameters. + + The only parameters accepted from the command line in + kernel versions 2.6.5 and later are: + + nic_tx_bd + delay_link + disable_d3hot + disable_msi + + 3. Problem : CQ12278 Make driver errors on Suse 9. + + Cause : The MODULE_PARAM macro is defined differently in kernel + versions below 2.6.10 than they are in the 2.6.10 + kernel verion. The driver did not account for the + different macro definitions and the driver code path + was flawed for 2.4.x kernels when declaring + MODULE_PARM. + + Change : The driver parameters are declared in three ways and all + the original parameters are still used when the driver + is operating in systems with kernel versions below 2.6.5. + + Impact : The driver operating in systems with kernel versions + of 2.6.5 and above requires the use of ethtool to set + parameters. The driver accepts all parameters from + the command line when running in systems with kernel + versions older than 2.6.5. + + The only parameters accepted from the command line in + kernel versions 2.6.5 and later are: + + nic_tx_bd + delay_link + disable_d3hot + disable_msi + + + +v8.1.7 (February 25, 2005) +============================ + Fixes: + ------ + + 1. Problem : CQ12168 Running ethtool -d causes + system to hang or panic. + Cause : Driver stores two copies of memory allocated for + register data. One copy gets incremented as it + gets filled. The other does not. The driver was + using the incremented pointer to free the memory + instead of the non-incremented pointer. + Change : Pass the original pointer value to kfree(). + Impact : System behaves as expected. + + 2. Problem : External loopback test not working with 5752 devices. + Cause : 5752 ISR was dereferencing an invalid packet + descriptor pointer. + Change : Turn off interrupts when loopback tests are running. + Impact : System behaves as expected. + + 3. Problem : CQ11916 HTLE has intermittent problem passing traffic. + Cause : The HTLE seems to have a problem with low clock speed. + Change : The driver will not slow the clock down when unloading + for HTLE. + Impact : None. + + 4. Problem : CQ12080 TSO should be disabled by the driver when + jumbo frames are used with the 5714. + Cause : The driver did not disable TSO when running + jumbo frames on the 5714 + Change : Added code to disable TSO when 5714 is running in + jumbo frame mode. + Impact : None. + + 5. Problem : CQ12209 5714 Fiber would not pass traffic with IPMI + enabled. + Cause : The fiber would not get initialized due to the driver + using the wrong phy type. + Change : The driver now checks for the correct phy id when + IPMI is loaded. + Impact : None. + + 6. Problem : CQ12166 Running ethtool -t fails register and memory + tests on 5752. + Cause : Test was performing tests for this device. + Change : Change code to use 5705 register and memory tests. + Impact : None. + + + +v8.1.6 (February 23, 2005) +============================ + Fixes: + ------ + + 1. Problem : CQ12128 5701 locks up system when driver loads. + Cause : The driver used the wrong NVRAM access type. + Change : The driver code was changed to use the correct + NVRAM type to access the NVRAM. + Impact : 5701 will not lock up the system. + + 2. Problem : CQ12212 Unwanted information is displayed. + Cause : The driver displayed debug information. + Change : The debug information was removed from the driver. + Imapct : None. + + + Enhancements + ------------ + + 1. Problem : CQ11650 Driver does not show ASF / IPMI version. + Change : Added code to extract ASF / IPMI version info from + NVRAM. + Impact : None. + + + +v8.1.5 (February 18, 2005) +============================ + + Fixes: + ----- + 1. Problem : CQ12097 Unable to link with 5714S. + Cause : The v8.1.4 driver did not fully support 5714S. + Change : Added support for the 5714S. + Impact : 5714S is functional w/v8.1.5. + + + 2. Problem : CQ11807 Driver will not pass traffic with + forced speed. + Cause : The driver default setting of gigabit mode + was interferring with the forced settings. + Change : The gigabit mode setting is now cleared until used. + Impact : None. + + + 3. Problem : CQ12104 VPD Read error on 5714 LOM. + Cause : The race condition described CQ11951. + Change : Change is described in v8.1.3. and actually + fixed in v8.1.3. + Impact : None. + + + +v8.1.4 (February 16, 2005) +============================ + + Fixes: + ----- + 1. Problem : CQ11918 Customer reported problem with kernel dump. + Cause : When the driver was using the NAPI POLL function, it + did not have a way for the kernel dump to function. + Change : The driver NAPI POLL function code was change so that + it now will call the driver ISR to allow the kernel + dump function to run when the kernel dump feature + is enabled in the kernel. + Impact : None. + + 2. Problem : CQ12114 The MSI state machine on the device is not + disabled on the in the event that the system + call to enable msi fails. + Change : The driver will disable the MSI state machine + when the call to pci_enable_msi() fails. + Impact : None. + + + + +v8.1.3 (February 15, 2005) +============================ + + Fixes: + ----- + + 1. Problem : (CQ11951) "Failed to access NVRAM" messages are + showing up in the message file. + Cause : Because EEPROM accesses are much slower than flash + accesses, the bootcode can take that much longer to + initialize the hardware. The problem here was that + Linux was downloading the LSO firmware to the NIC + before the bootcode had a chance to complete it's + task. As a result, the firmware would crash, while + still holding the NVRAM lock. + Change : Acquire the NVRAM lock before halting the CPU and + downloading the LSO firmware. + Impact : None. + + 2. Problem : (CQ12096) MODULE_PARM deprecated warnings. + Cause : Linux is moving to a new module parameter declaration + format. The kernel has deprecated the older + parameter declaration style. + Change : For those module parameters that do not have a + configuration tool equivalent, the parameter + declarations have been converted to the new style. + All other module parameters have been dropped in + favor of their configuration tool equivalents. + Impact : None. + + + Enhancements: + ------------- + + 1. Problem : (CQ10408) Driver does not issue a "Link is DOWN" + message when bringing the interface down. + Change : Issue a "Link down" message upon device closure. + Impact : None. + + 2. Problem : (CQ10828) The driver needs a way to isolate + loopback testing. + Change : Added a NICE command to invoke loopback tests. + Impact : None. + + 3. Problem : CQ12159 Older silicon has memory location 0xd38 uninitialized + and bits 17,18 may be set which causes the capacitive + coupling and pre-emphasis settings to be enabled by mistake. + Change : Validate memory location 0xd38 before using it. + The patch is similiar to a patch done in tg3. + Impact : none. + + 4. Problem : Added changed asic revs for 5714 family. + + + +v8.1.2 (February 1, 2005) +============================ + Fixes: + ----- + + 1. Problem : (CQ12046)Does not compile on some supported distrobutions. + Cause : The disable_msi switch was declared but then used within + #defines + Change : The disable_msi switch is declared within the same defines + as where it is used. + + Impact: None. + + 2. Problem: (CQ12045)Unable to pass traffic on the 5714. + Cause : The disable_msi switch seems to have caused compile problems. + Change : The above change resolves this problem too. + + Impact: None. + + Enhancment: Added support for the 5751_C0. + + +v8.1.1 (February 1, 2005) +============================ + Enhancements: + ------------ + Change: MAC address is read from NVRAM on 5714s for now. + + Impact: None. + + +v8.1.0.5 (January 28, 2005) +============================ + Enhancement: + ------------ + Change: Jumbo frames are supported on the 5714. + msi is supported on the 5714 + NVRAM support code was enhanced. + + Impact: None. + + Note: This is a preliminary driver for internal testing only. + + +8.1.0.4.msi (January 1, 2005) +============================ + Enhancement: + ------------ + Change: Additional tweeking to support 5752 & 5714/5715 including: + -msi is enabled for 5752 only. + -detection of 5752 & 5714 is fixed. + + Impact: None. + + Note: This is still a preliminary driver release for internal + testing only. + + + +v8.1.0.2 (December 16, 2004) +============================ + Enhancement: + ------------ + Change: PCI IDs were added to support the 5752 + + Impact: None. + + Note: This is a very preliminary and internal release for internal + testing only. + + + +v8.1.0.1 (December 14, 2004) +============================ + Enhancement: + ------------ + Change: PCI IDs were added to support the 5714 and 1515. + + Impact: None. + + Note: This is an alpha release for support of the 5714 & 5715 + + +v7.4.10 (December 3, 2004) +========================= + + 1. Problem : (CQ11042)ASF IP Monitoring cannot update config table. + + Cause : The NVRAM on 5750 LOM systems could not be written as + the NVRAM write protection was not being cleared by + the driver. + + Change : The driver now correctly uses the write protection + capabilities of the 5750 LOM NVRAM. + + Impact : The driver can write to the NVRAM for 5750 LOMs. + + + +v7.4.9 (December 1, 2004) +========================= + + 1. Problem : EEPROM_ExecuteCommand warnings showing up on the console. + + Cause : Code incorrectly uses old EEPROM routines. + + Change : Use new nvram routines when available. + + Impact : Flash works as expected. + + 2. Problem : (CQ11472)Add PLL workaround. + + Cause : Occasionally a problem occurs when the device is put + into D3 cold. The problem can result in a chip lockup. + This only occurs on 5750 AX/BX chips. + + Change : Added the workaroud to code, which is to keep the + power clks ticking when transitioning to d3 cold/hot. + + Impact : D3 transition is robust. + + +v7.4.8 (November 24, 2004) +========================= + + 1. Problem : Vpd cannot be read on 5704 and other legacy devices. + + Cause : Code incorrectly identifies flash type. + + Change : Ignore bits 24 and 25 on Config1 for legacy devices. + + Impact : Flash works as expected. + + + 2. Problem : (CQ11402) Driver crashes while obtaining chip size on 5701. + + Cause : Code uses incorrect read routine. Chipsize was not + initialized which caused a divide by zero. + + Change : Change code to use correct read routine. Made sure + to set the chipsize to a valid chipsize (nonzero) + before calling the read routine. + + Impact : EEPROM works as expected. + + + 3. Problem : Firmware version not correct for 5721 devices. + + Cause : Offset calculation error for Atmel parts. + + Change : Fix calculation error. + + Impact : Firmware version correct. + + +v7.4.7 (November 18, 2004) +========================= + + 1. Problem : Firmware version not displaying on BCM5753 devices. + + Cause : Reads being performed before the NVRAM is locked. + + Change : Lock the NVRAM before performing any reads. + + Impact : None. + + + 2. Problem : (CQ11142) OOPS occuring on PPC750 + + Cause : Statistic and status memory pointers were initialized + even after driver shutdown and memory deallocation + causing OOPS to occur when statistics were probed. + + Change : Reset pointers to zero after shutdown. + + Impact : None. + + + 3. Problem : (CQ11115) Driver allows for invalid user adminstered + MAC address. + + Cause : Driver did not check for valid address. + + Change : Driver checks for valid MAC address. + + Impact : None. + + + 4. Problem : (CQ10598) Driver occasionally cannot get link on certain + machines. + + Cause : The certain machines had interrupt sharing between many + devices and occasionally the driver would lose the + link change interrupt. + + Change : The ISR was modified to ensure the interrupt being cleared + has been serviced properly. + + Impact : None. + + + 5. Problem : (CQ11117) Need SERDES pre-emphasis support. + + Cause : Certain 5704 designs have requested that certain bits be + set in SERDES configuration registers. + + Change : Changes made use presupplied value for SERDES configuration. + + Impact : None. + + + Enhancement : + ------------- + + 1. Change : GPIO2 will not have an output for the 5753 family. + + 2. Change : Added code to support more flash (and EEPROM) types. + The flash write code has been separated into buffered + and unbuffered versions. The flash and EEPROM read + code has been modified to support sub-32bit word reads. + New nvram sizing functions have been introduced. + + +v7.4.6 (October 25, 2004) +========================= + + 1. Problem : (CQ11088) Remove the ability to set speed & duplex on the 150T + + Cause : The switch on the 150T nic is set to autoneg. The line speed + on the 5705 should only be set to auto for proper link to + be established with the internal switch. + + Change : Added code in b57um.c line 4316 to check for this nic and + always set it to auto. + + Impact : None. + + + 2. Problem : (CQ11102) NMI occurs during load/unload w/ASF enabled. + + Cause : The 5753 drove GPIO2 as an output, which did not allow + ASF to use it to sense main power properly. + + Change : The driver does not driver GPIO2. + + Impact : None. + + +v7.4.5 (October 11, 2004) +======================== + Enhancement: + ------------ + Change: PCI IDs were added to support the 5753, 5753M, 5753F and 5789. + + Impact: None. + + +v7.4.4 (October 4, 2004) +======================= + + 1. Problem : (CQ10955) DELL 6650 kernel panic during negotiation + using 5700 lom. + + Cause : Spinlock deadlock during reset & link up. + + Change : Removed the spinlock contention. + + Impact : None. + + + 2. Problem : (CQ10436)Man page needs update. + + Cause : bcm5700.ko was not noted in man page. + + Change : Modified man page. + + Impact : None. + + + 3. Problem : (CQ10396) Cannot ping when Dell PowerEdge 6650(#459) + is configured for 10half forced. + + Cause : 5411 PHY does not require a PHY reset before being set + up to 10 half, or a PHY reset was being called without + sufficient delay before the PHY was being set up. + + The code in LM_ResetAdapter()calls + LM_ResetPhy()(on line 3479 in tigon3.c) immediately before + calling LM_SetupPhy(). + If a 2 second delay is placed between these two functions, + then 10half forced will function, or when LM_ResetPhy() + is removed, 10half forced will again function. + + It is not clear why This delay is needed or why + LM_ResetPhy()is needed here as the MII control reg shows + the same values for a successful or failed case. + LM_ResetPhy() is not called for the 5401 PHY for the + same reason this problem occurs. + A request for assistance was emailed to HWEng with no + response. + + Change : Removed unnecessary PHY reset for 5411 PHY. + + Impact : Forcing 5411 PHY to 10 half will function as expected. + + + +v7.4.3 (August 26, 2004) +====================== + Fixes: + ------ + 1. Problem : (CQ10437) Driver is installed in a directory other + than the directory noted in the README.TXT file. + + Cause : Note omission. + + Change : Added a line in the README.TXT file diclosing an + alternative install directory + (/lib/modules//kernel/drivers/net/bcm/) + for SLES9 installations. + + Impact : Problem resolved. + + 2. Problem : (CQ10396) Cannot ping when Dell PowerEdge 6650(#459) + is configured for 10half forced. + + Cause : 5411 PHY does not require a PHY reset before being + forced to 10 half. + + Change : Removed unnecessary PHY reset for 5411 PHY. + + Impact : Forcing 5411 PHY to 10 half will function as expected. + + + 3. Problem : (CQ10540)Max value for "stats_coalesce_ticks" is + rejected in 2.6 kernels. + + Cause : 2.6 kernels are using a different parameter interface + that limits the value range. + + Change : README.TXT was changed to inform the user that the + value range for this parameter may very by kernel version. + + Impact : None. + + + 4. Problem : (CQ9804)5751 freezes in certain platforms under heavy + stress. + + Cause : A logic bug in clearing interrupts caused this to occur. + See previous entry for CQ9804. + + Change : Setting Bit 29 in 0x7c00 (TLP control reg) prevents + the lock-up from occurring and was set as a safeguard. + + Impact : None. + + + Enhancement: (CQ10355) Ethtool -i shows no value for "firmware-version" + ------------ + Change : Added bootcode version value to Ethtool driver info structure. + + Impact : None. + + + + +v7.4.2 (July 29, 2004) +====================== + Fixes: + ------ + 1. Problem:(CQ10695) System screen froze after third port. + + Cause: Third port was pci and driver was treating it + as a pciexpress. Bug introduced v7.4.1. + + Change:Driver checks for PCIE or PCI and then executes + PCIE code only on PCIE adapter. + + Impact:Problem resolved. + + 2. Problem:(CQ10627)Remove 5751-A0 support. + + Cause: 5751-A0 is not shipping. + + Change:Driver checks for 5751 A0 then fails if found. + + Impact:Driver will not load on 5751-A0 + + +v7.4.1 (July 27, 2004) +====================== + Fixes: + ------ + 1. Problem:(CQ10602) FSC 1899 system may freeze/reboot when bringing the + initerface up/down with ASF enabled. + + Cause: Handshake between ASF & driver disrupted by 7.4.0 extra + delay, allowing the driver to enable D3 state before ASF + was ready. + + Change: Delay was moved to immediately before enabling D3. + + Impact: Driver will not freeze or reboot system. + + 2. Problem:(CQ10481)Driver displays gigabit speed on adapter + that only supports 10/100. + + Cause: The Driver displayed support for 10/100/1000 link + do to an error in the code. + + Change: Code changed to display correct link support + values. + + Impact: Driver displays correct supported link speeds. + + +v7.4.0 (July 12, 2004) +====================== + Enhancement: + ------------ + Change: Added extra delay after GRC reset to make the + firmware D3hot workaround in 3.29i effective. + + Impact: None. + + Fixes: + ------ + 1. Problem: (CQ10549) "BCM_DRV: command not found" when compiling + the source RPM. + + Cause: $(BCM_DRV) not substituted properly. + + Change: Changed all $(BCM_DRV) to $BCM_DRV in bcm5700.spec. + + Impact: None. + + 2. Problem: (CQ10468) Driver not working properly in bridging environment + after changing mtu. + + Cause: Promiscuous mode not preserved after changing mtu. + + Change: Fixed by setting the rx mode after mtu change. + + Impact: None. + + 3. Problem: (CQ10557) Kernel panics with 17 or more devices installed. + + Cause: Driver parameters checking logic assumes maximum of 16 + devices. + + Change: Added logic to skip parameter processing if the device + index is higher than or equal to 16. + + Impact: This will prevent the kernel panic and the driver will load with + any number of devices in the system. Driver parameters will + only work for the first 16 devices. + + 4. Problem: Changing mtu may cause the kernel to print a warning message: + sleeping function called from invalid context at mm/slab.c. + + Cause: Calling kmalloc with GFP_KERNEL from invalid context. + + Change: Changed to GFP_ATOMIC. + + Impact: None. + +v7.3.5 (June 23, 2004) +====================== + Fixes: + ------ + 1. Problem: (CQ10407) Linux 2.6 kernel fails to get IP address using DHCP + on 5751 A1. + + Cause: When DHCP fails, ifup script will shutdown the NIC and it + will go to D3hot state. On 2.6 kernels, the config write + to put device in D3hot will be written using mmconfig with + a mmconfig read of register 0 to flush the write. The + read immediately following the write when the device is + transitioning to L1 link state may cause problems. The symptom + is that the device will lose the memory space bit in the + PCI command register. When ifup brings up the NIC again + to retry DHCP, the device will not be functional. + + Change: The fix for the problem is in bootcode 3.29 which will + greatly reduce if not eliminate this problem from happening. + To further reduce the risk, 2 changes were made to the driver. + 1. Add a parameter to disable D3hot (disable_d3hot). + 2. Check PCI command register and re-enable the memory space + and other bits multiple times until the bits are set + or up to a maximum during driver init. + + Impact: None. + +v7.3.4 (June 18, 2004) +====================== + Fixes: + ------ + 1. Problem: (CQ10312) System Hangs when loading and unloading the driver + continuously with 5705. + + Cause: Hang was caused by infinite retry soon after writing to register + 0x74 to speed up the core clock. + + Change: Implemented a 2-step sequence to speed up the core clock on + 5705 and shasta devices. + + Impact: None. + + 2. Problem: System crashes occasionally when loading and unloading the + driver. + + Cause: System may be unable to map memory. + + Change: Added error check on memory mapping and gracefully fail + the driver load. + + Impact: None. + + 3. Problem: (CQ10364) System hangs when issuing reset from b57ldiag. + + Cause: Deadlock when trying to get a spinlock. + + Change: Removed the deadlock. + + Impact: None. + + 4. Problem: (CQ10379) Driver allows jumbo frames on 5751/5721 devices + using ifconfig. + + Cause: Missing validity check for mtu on shasta devices. + + Change: Added checks. + + Impact: None. + + 5. Problem: (CQ#10110) ethtool -d still hangs on some systems. + + Cause: Chip does not respond to reserved registers, causing + some machines to hang. + + Change: More changes to only dump the valid registers in the + memory space. + + Impact: None. + + Enhancements: + ------------- + 1. Change: Added Capacitive coupling phy support. + +v7.3.3 (June 03, 2004) +====================== + Enhancements: + ------------- + 1. Change: Added support for 5789. + + Fixes: + ------ + 1. Problem: 5704 may run on Vaux during normal operations. + + Cause: Depending on the sequence of shutdown, the first port + of a 5704 may be brought up and run on Vaux due to + a programming error. + + Change: Corrected the GPIO programming sequence to take + both ports of the 5704 into account. + + Impact: None. + + 2. Problem: NC150T not identified. + + Change: Added OEM string. + + Impact: None. + + 3. Problem: (CQ #10340) NC1020 identified as NC7722. + + Cause: String not updated. + + Change: Updated OEM string. + + Impact: None. + +v7.3.2 (June 03, 2004) +====================== + Enhancements: + ------------- + 1. Change: Added support for 5751F. + + Fixes: + ------ + 1. Problem: (CQ #10145) IBM PPC64 PBlade crashes after many hours. + + Cause: Speculative execution path reading an old descriptor, causing + the wrong buffer to be freed. + + Change: Added read memory barriers to prevent this. + + Impact: None + + 2. Problem: 5701 does not link up intermittently. + + Cause: Concurrent register writes when adding multicast address and + sevicing link change interrupt. This is a chip bug. + + Change: Added locking to prevent this one case of concurrent register + access. + + Impact: None. + +v7.3.1 (May 27, 2004) +===================== + Fixes: + ------ + 1. Change: Added workaround for 5750 A3 to disable the CPU after + reset. + + Impact: None. + +v7.3.0 (May 21, 2004) +===================== + Enhancements: + ------------- + 1. Change: Added support for 5751M devices. + + Fixes: + ------ + 1. Problem: (CQ#10109) CIOBE hangs machine after many hours of heavy traffic. + + Cause: New hw errata on 5704 PCIX multi-split mode. + + Change: Disabled multi-split on CIOBE. + + Impact: None. + + 2. Problem: (CQ#10110) ethtool -d hangs on some systems. + + Cause: Chip does not respond to reserved registers, causing + some machines to hang. + + Change: Changed code to only dump the valis registers in the + memory space. + + Impact: None. + + 3. Problem: Driver contains unresolved genapic symbol when compiled + on some kernels. + + Cause: genapic may be referenced by hard_smp_processor_id. + + Change: Removed hard_smp_processor_id which is purely for + debugging and not needed. + + Impact: None. + + 3. Problem: (CQ#9959) ethtool returns wrong flow control settings. + + Cause: Minor bug. + + Impact: None. + +v7.2.24 (April 23, 2004) +======================== + Enhancements: + ------------- + 1. Change: (CQ #9955) Remove support for 5751M devices. + + Impact: None. + + 2. Change: Added support for cache line aligned write DMA on PPC64. + This feature is only supported on 5700/5701. + + Impact: None. + + Fixes: + ------ + 1. Problem: ASF doesn't run properly after ifdown on 5750 chips. + + Cause: Driver sets device to run on slow core clock during + shutdown. ASF cannot run on slow clock. + + Change: Added check to skip slowing the core clock if ASF + is running on 5750 chips. + + Impact: None. + + 2. Problem: TSO doesn't work on non-x86 architectures. + + Cause: U32 misdefined. + + Impact: None. + +v7.2.23 (April 19, 2004) +======================== + Fixes: + ------ + 1. Problem: (CQ #9782) ethtool link test fails on 5703 intermittently. + + Cause: Not waiting long enough for link up. + + Change: Added 3 more seconds if copper link is still down. + + Impact: None. + + Enhancements: + ------------- + 1. Change: Added PHY workaround for 5705/5750 to improve bit error rate. + + Impact: None. + +v7.2.22 (April 14, 2004) +======================== + Fixes: + ------ + 1. Problem: (CQ #9804) PCIE system freezes under heavy stress. + + Cause: 2 problems - 1. Logic in poll routine prematurely clears + the next interrupt, causing tx timeout. 2. Bug in reset + logic causing hang. + + Change: Made changes to the logic that reenables rx interrupt + in the poll routine. Fixed the tx timeout reset routine. + + Impact: None. + + 2. Problem: (CQ #9836) 5700 LOMs not recognising link down. + + Cause: 5700 in 66 MHz or higher bus speeds will go through + chip reset instead of the normal link down interrupt + when link goes down at gigabit link speed. There is + a bug in the reset logic that causes the link down + event to be unreported. + + Change: Simple change in the reset logic. + + Impact: None. + + +v7.2.21 (April 08, 2004) +======================= + Fixes: + ------ + 1. Problem: (CQ #9645) Unable to pass traffic on 5701 with long cable. + + Cause: Phy register 0x18 shadow 0 not set correctly. + + Change: Changed the code to do read-modify-write on that register + to preserve the contents of that register. + + Impact: None. + +v7.2.20 (Mar. 31, 2004) +======================= + Fixes: + ------ + 1. Problem: Poor performance in NAPI mode in certain test cases. + + Cause: Stale packets not processed by the driver after polling + completes. This is caused by rx interrupt being + enabled right after a new status block is already + initiated and pending DMA. + + Change: Implemented a new scheme to detect possible missed + packets after rx interrupt is enabled. Also set + the "during-int" coalescing parameters to be the + same as the normal coalescing parameters. + + Impact: None. + + 2. Problem: Driver unable to identify the PHY intermittently. + + Cause: In some cases, both boot code and driver + cannot read the proper PHY ID from the PHY. Driver + relies on either the PHY ID read by boot code or + directly read from the PHY register to idendify the PHY. + + Change: Changed the PHY detection logic to make it more + robust by doing PHY reset when boot code and PHY + registers return invalid PHY ID. + + Impact: None. + + 3. Problem: LEDs not working perfectly on shasta devices. + + Cause: Some new shasta LED modes require driver to update + register 0x450. + + Change: Added necessary code to update register 0x450. + Also changed driver to program register 0x40c + instead of relying on boot code to program it. + + Impact: None. + + 3. Problem: Driver does not compile on kernels not supporting + NAPI. + + Cause: Minor syntax error. + + Enhancements: + ------------- + 1. Change: Added a new OEM ID and string. + +v7.2.19 (Mar. 11, 2004) +======================= + Fixes: + ------ + 1. Problem: (CQ9188) Gigabit link light still does not work on 5751. + + Cause: bug in implementation. + + Change: Cleaned up the LED code in the driver and let the + bootcode program the LEDs on shasta (575x/572x) devices. + + Impact: None. + + 2. Problem: CRC errors reported on 5700 using 5411 PHYs. + + Cause: PHY register 0x18 shadow register 0 not programmed + correctly. + + Change: Fixed code to use the same setting as 5401. + + Impact: None. + + 3. Change: Enabled hw bug fix for 5703/04 PCI-X write DMA bug. + + Impact: None. + + 4. Problem: ethtool -t fails nvram test in big endian systems. + + Cause: Endian bug in calculating CRC in nvram. + + Change: Simple fix by swapping data. + + Impact: None. + + Enhancements: + ------------- + 1. Change: (CQ8586) Added some missing stats counters to + ETHTOOL_GSTATS + + Impact: None + +v7.2.18 (Feb. 24, 2004) +======================= + Fixes: + ------ + 1. Change: Changed driver for 5751 A1 by disabling PCIE reset + during GRC reset. + + Impact: None. + + 2. Change: Changed driver for 5751 A1 by enabing PCIE data + fifo bug fix in the chip. + + Impact: None. + +v7.2.16 (Feb. 20, 2004) +======================= + Fixes: + ------ + 1. Problem: (CQ9188) Gigabit link light does not work on 5751. + + Cause: Driver did not support the new shasta LED modes. + + Change: Added support for the new shasta LED modes. + + Impact: None. + + 2. Problem: (CQ9418) 5700 NIC fails to pass traffic at 10Mbps + half duplex when connected to a switch port forced + to the same speed setting. + + Cause: The 5401 PHY requires a long delay after PHY reset + before the PHY can be confiured. + + Change: Changed code to skip PHY reset if it is 5401. + + Impact: None. + + 3. Problem: (CQ9430) RPM build errors occur on 2.6.x kernels. + + Cause: spec file was not handling 2.6 kernels with the new + kernel build mechanism properly. + + Change: Modified the spec file. + + Impact: None. + + 4. Problem: (CQ9410 & CQ9393) Delayed link report to MII and + ETHTOOL ioctls causing problems. + + Cause: Workaround for ifup problem (see v6.2.11, CQ7791 bug + fix descript for details) causing problems in + other applications that require accurate link information. + + Change: Changed driver so that the delayed link workaround is + enabled using a delay_link driver parameter. The parameter + is disabled be default. + + Impact: ifup may not be able to obtain IP address using DHCP. + Use the delay_link parameter or modify the ifup script + to increase the wait time for link up. + +v7.2.15 (Feb. 12, 2004) +======================= + Enhancement: + ------------ + 1. Change: Added diagnostics functions to support ethtool -t. + + Impact: None. + +v7.2.12 (Feb. 05, 2004) +======================= + Fixes: + ------ + 1. Problem: Tx timeout reset may crash when hardware is unreliable. + + Cause: Reset routine relies on a valid rx consumer index in status + block to free the rx buffers. (related to problem #1 + fixed in 7.2.10) + + Change: Changed logic to not rely on the hw rx consumer index. + + Impact: None. + + 2. Problem: Driver not running in NAPI mode + + Cause: see Problem #1 fixed in 7.2.10. + + Change: Fixed NAPI code so that it will also run in single-threaded + mode. + Impact: None. + + 3. Problem: (CQ 9293) Driver hangs intermittently during ifdown. + + Cause: Writing to Nic's memory when memory arbiter is disabled. + + Change: Changed code to write firmware mailbox signatures before + memory arbiter is disabled. + + Impact: None. + + 4. Problem: PHY's extended packet length bit not set when using + jumbo frames. + + Change: Added change to always set this bit on NICs that + support jumbo frames. + + Impact: None, but testing required. + + 5. Problem: Posted writes not flushed before delay loop, causing + the delay to be less than intended in duration. + + Change: Added register read back to flush the writes before delay + loop, where appropriate. + + Impact: None. + + 6. Problem: (CQ 9263) ethtool -a returning wrong autonegotiation + status. + + Cause: Minor bug. + + Change: Minor change. + + Impact: None. + + Enhancement: + ------------ + 1. Change: Implemented TSO for 5788 and changed name to NetLink + + Impact: None. + +v7.2.11 (Jan. 21, 2004) +======================= + Fixes: + ------ + 1. Problem: (CQ#9207) ASF does not work when driver is loaded on 5751. + + Cause: Driver/ASF handshake problem caused by a long delay after + GRC reset. + + Change: Added the new Driver/ASF handshake mechanism. + + Impact: None. + + 2. Problem: (CQ#9179) Driver allows jumbo frames on 575x. + + Change: Minor change to disallow setting jumbo frames on 575x. + + Impact: None. + +v7.2.10 (Jan. 13, 2004) +======================= + Fixes: + ------ + 1. Problem: (CQ#9181) Panic on IBM PCIE system running chariot. + + Cause: The panic was caused by a problem in the tx timeout + reset logic that assumed a good rx BD consumer index + can always be read from the chip during reset. When + something is wrong with the chip and a bogus rx BD + consumer is read, the system panics when trying to + recycle a wrong BD. + + The tx timeout itself was caused by buggy single-threaded + workaround code and register read back code originally + implemented for the 5700 and 5701. + + Change: Fixed the single-threaded and register read back + workaround. The fix was implemented for non-NAPI + mode only as the fix for NAPI will take more time. + The driver will only run in non-NAPI mode. + + Impact: Minor. + + 2. Problem: ASF does not run on 5751. + + Cause: FTQ reset after chip reset. + + Change: Removed FTQ reset. + + Impact: Should be none, but need to be tested on all 570x chips. + + 3. Problem: (CQ#9170) NMI occurs intermittently when doing ifconfig down. + + Cause: HW bug when programming 5751 to low power mode. + + Change: Removed low power mode setting for 5751. + + Impact: Wol will not work on 5751. + + 4. Change: Changed delay after GRC reset to 500 msec. + + 5. Change: Changed shasta_smp_fix to 1 (enabled) be default. + +v7.2.9 (Jan. 09, 2004) +====================== + Enhancements: + ------------- + 1. Change: Added parameter shasta_smp_fix to enable/disable + SMP workaround (see fix #2 in v7.2.8). Default + is workaround disabled. + + Impact: None. + +v7.2.8 (Jan. 05, 2004) +====================== + Fixes: + ------ + 1. Problem: (CQ#9096) Data corruption with large ping packets. + + Cause: Mbuf pool start and length registers overwritten by + driver. + + Change: Fixed code so that the 2 mbuf registers will not be + overwritten for the 5750. + + Impact: None. + + 2. Change: Added register read back and single-threaded workaround + for 5750 PCIE. + + Impact: Lower performance. + +v7.2.7 (Dec. 24, 2003) +====================== + Fixes: + ------ + 1. Change: Changed delay to 300msec after GRC reset for 5751/5721 A0 PCI + Express devices. + + Impact: None. + +v7.2.6 (Dec. 10, 2003) +====================== + Fixes: + ------ + 1. Problem: Driver does not receive interrupts on some PCI + Express systems. + + Cause: A register bit could not be set using config. cycles. + + Change: Changed to memory write cycle to write the register. + + Impact: None. + +v7.2.5 (Dec. 02, 2003) +====================== + Fixes: + ------ + 1. Problem: Driver crashes during transmit timeout reset. + + Cause: Driver was calling schedule_timeout which is a + blocking function and cannot be called in interrupt + context. + + Change: Changed to udelay. + + Impact: None. + +v7.2.4 (Nov. 24, 2003) +====================== + Fixes: + ------ + 1. Problem: (CQ #8908) System freezes when 5751 PCI Express device + is brought up. + + Cause: PCI Express device was not detected properly. + + Change: Corrected the PCI Express detection logic. + + Impact: None. + + 2. Problem: (CQ #8910) PCI_Bus_Speed is misreported for PCI Express + device. + + Cause: Old logic did not take PCI Express into account. + + Change: Made simple change to account for PCI Express device. + + Impact: None. + +v7.2.1 (Nov. 18, 2003) +====================== + + Enhancements: + ------------- + 1. Change: Made some changes to make 5751 work on PCIE 1.0 systems. + +v7.2.0 (Nov. 17, 2003) +====================== + + Enhancements: + ------------- + 1. Change: Added support for 575x and 572x PCI and PCIE chips. + +v7.1.21 (Jan. 05, 2004) +======================= + Fixes: + ------ + 1. Problem: ASF stops working after driver is loaded if PXE ran + and did not shutdown properly. + + Cause: The wait time to gain NVRAM arbitration was not long + enough in 5704 using serial eprom. As a result, a + reset can happen to one channel of a 5704 while + the other channel is still loading boot code. This + will cause ASF to subsequently hang waiting forever + for NVRAM arbitration. + + Change: Changed the wait time to cover the worst case + serial eprom boot code load time plus a safety margin. + + Impact: None. + + 2. Problem: (CQ#8890) Receive errors on 5700 NICs. + + Cause: Incorrect PHY settings on the 5401 introduced in 6.2.18 + when PHY loopback was implemented. + + Change: Fixed the PHY settings. + + Impact: None. + + 3. Problem: Driver does not compile on some 2.4 kernels. + + Cause: Driver not compatible with some older ethtool.h files. + + Change: Added #ifdef to fix the problem. + + Impact: None. + +v7.1.20 (Dec. 24, 2003) +====================== + + Fixes: + ------ + 1. Problem: ASF stops working after driver is loaded if PXE is enabled. + + Cause: The fix for the PXE problem in version 7.1.18 (fix #3, see below) + has a flaw that causes reset to always occur if PXE is enabled. + This reset causes ASF to stop functioning. + + Change: Fixed the flawed logic. + + Imapct: None. + +v7.1.19 (Dec. 10, 2003) +====================== + + Fixes: + ------ + 1. Problem: (CQ #8961) Interrupt test fails intermitently. + + Cause: A race condition between the ioctl and interrupt + service routine can cause the interrupt test to fail. + + Change: Added code to regenerate the interrupt in the loop + that waits for interrupt to complete. + + Impact: None. + + Enhancements: + ------------- + 1. Change: Changed Makefile to use ppc64 compiler and linker + if compiling on ppc64 environment. + + Impact: None. + +v7.1.18 (Nov. 21, 2003) +====================== + + Fixes: + ------ + 1. Problem: IPMI firmware receiving VLAN tagged packets stops working + after ifconfig up. + + Cause: Driver sets NIC to keep VLAN tags by default. + + Change: Added code and driver parameter vlan_tag_mode to control whether + VLAN tags will be stripped or not. By default, the driver will + always strip VLAN tags if ASF/IPMI firmware is enabled. + + Imapct: If ASF is enabled, the NIC may not work properly when VLAN + and bonding are used together. Sniffer applications that + wants to receive raw VLAN-tagged frames will also be affected. + + 2. Problem: IPMI firmware stops working after ifconfig up on PPC64 machine. + + Cause: Timing differences on PPC cause the driver to reset a certain + chip block after firmware has enabled it. Timing difference + is due to very slow config cycles on the PPC. + + Change: Rearranged some code in LM_ResetAdapter to get around the problem. + + Impact: None. + + 3. Problem: Driver does not load if PXE ran previously and did not shutdown + the chip. + + Cause: Driver does not work properly as it expects the chip to be + disabled during reset. + + Change: Added code to check if the chip is enabled and reset it + if necessary before setup. + + Imapct: None. + + 4. Problem: Driver takes a long time to reset if the bootcode is + disabled on the PPC. + + Cause: Config cycles are very slow on the PPC and the loop + to check for the firmware signature is too tight. + + Change: Loosened the loop to check for the firmeare signature + after reset. Also made the maximum loop count smaller + if it is using flash NVRAM. + + Imapct: None. + + Enhancements: + ------------- + 1. Change: Added ETHTOOL_GRINGPARAM ioctl + + Imapct: None. + + 2. Change: Added PPC64 specific compile switches in Makefile to allow + the driver to be compiled as a standalone module. + + Imapct: None. + +v7.1.11 (Nov. 05, 2003) +====================== + + Fixes: + ------ + 1. Problem: Running b57ldiag on PPC system crashes after a while. + + Cause: PCI addresses not properly unmapped during diagnostics + suspend operation. + + Change: Added code to unmap PCI addresses in rx buffers during + suspend. + + Impact: None. + + Enhancements: + ------------- + 1. Problem: Driver doesn't load on SerDes and 5704 devices when + the NVRAM is blank or corrupted. Driver needs to load + to support diagnostics. + + Cause: 5704 NVRAM cannot be reliably accessed when boot code is + not running, so driver cannot get proper MAC address + and proper PHY ID. + + Change: Changed code to allow driver to load with warnings when + even when NVRAM cannot be accessed. + + Impact: When boot code is blank, driver will load with a bogus + MAC address. + + 2. Problem: Driver cannot reliably read/write NVRAM when NVRAM + is corrupted or blank. + + Cause: When bootcode is not running, the NVRAM interface state + machines will get locked up. + + Change: Added code to reset the NVRAM interfaces of both + ports in 5704. + + Impact: None. + + 3. Change: Added ioctl to get and clear statistics block. + + Impact: None. + +v7.1.9 (Nov. 03, 2003) +====================== + + Fixes: + ------ + 1. Problem: Driver does not load on 5704S devices if the eeprom is + blank. + + Cause: 5704S defaults to an unsupported device ID when eeprom + is blank. + + Change: Added the default 5704S device ID. + + Impact: None. + + +v7.1.8 (Oct. 31, 2003) +====================== + + Fixes: + ------ + 1. Problem: ASF/IPMI stops passing traffic after driver is loaded. + + Cause: GRC mode control register overwritten when driver loads. + + Change: Changed driver to preserve the relevant bit in the GRC + mode control register during driver load. + + Impact: None. + + Enhancements: + ------------- + 1. Change: Changed memory allocation ioctl to support diagnostics + program doing DMA tests. + Added a new ioctl to force Nvram write protect on/off + in case the write protect setting is wrong in the nvram. + + Impact: None. + +v7.1.6 (Oct. 27, 2003) +====================== + + Fixes: + ------ + 1. Problem: (CQ #8732) Unloading bcm5700.ko in 2.6 kernels causes + segmentation fault. + + Cause: Driver uses init_etherdev which has been deprecated by + alloc_etherdev and register_netdev. + + Change: Changed to use the new APIs in 2.6 kernels. + + Impact: None. + +v7.1.5 (Oct. 21, 2003) +====================== + + Fixes: + ------ + 1. Problem: Driver does not compile on 2.5+ kernels. + + Cause: mem_map_reserve/mem_unmap_reserve no longer defined in 2.5+ + kernels. + + Change: Changed to SetPageReserved/ClearPageReserved (More testing + is needed to make sure this works on 2.5+ kernels) + + Impact: No impact on normal driver operations. The memory + allocation ioctl that supports diagnostics may be impacted. + +v7.1.4 (Oct. 17, 2003) +====================== + + Enhancements: + ------------- + 1. Change: Added memory allocation ioctl to allow user apps to mmap it + for dma tests. + + Imapct: None. + + Fixes: + ------ + 1. Problem: Driver does not load on ia64 with register_ioctl32_conversion + undefined. + + Cause: register_ioctl32_conversion not defined for ia64. + + Change: Removed this routine for ia64. + + Imapct: None. + +v7.1.2 (Oct. 13, 2003) +====================== + + Enhancements: + ------------- + 1. Change: Added OEM string. + + Impact: None. + +v7.1.1 (Oct. 07, 2003) +====================== + + Enhancements: + ------------- + 1. Change: Added a few more diagnostics ioctl commands. + + Impact: None. + + 2. Change: (CQ #8428) Added nic_tx_bd parameter. + + Impact: None. + + 3. Change: Added ETHTOOL_GTSO and ETHTOL_STSO ioctl commands and + changed TSO to be enabled by default (when supported + by the NIC and the kernel) + + Impact: None. + + 4. Problem: (CQ #8469) Mandrake 9.1 has new module path. + + Change: Modified Makefile to install driver in the new 3rdparty path. + + Impact: None. + + 5. Problem: (CQ #8438) Some parameters do not assume default values + as documented. + + Cause: When running in NAPI mode, some coalescing parameters have + different default values. + + Change: Updated documentation and man page. + + Impact: None. + + +v7.1.0 (Sep. 22, 2003) +====================== + + Fixes: + ------ + 1. Problem: SIOCNICE ioctl does not work in 64-bit systems when + the calling application is 32-bit. + + Cause: The 32-bit ifreq data structure is converted by the + kernel to 64-bit, messing up the nice_req structure. + + Change: Added 32-bit ioctl conversion routine to handle the + proper conversion. + + Impact: None. + + Enhancements: + ------------- + 1. Problem: Ethtool -e does not output the same data on big + and little endian systems. + + Change: Change swapping scheme so that nvram read/write routines + will work with the same byte-stream data in big and little + endian systems. + + Impact: None. + + 2. Change: Added support for 5705F. + + Impact: None. + +v7.0.0 (Aug. 14, 2003) +====================== + + Enhancements: + ------------- + 1. Problem: Phy ADC and gamma fix not applied properly to all + relevant PHY cores. + + Change: Made appropriate changes to apply the fix to the + relevant PHYs after PHY reset. + + 2. Problem: 5704 SerDes drive transmission level not set properly. + + Change: Changed 5704 SerDes' drive transmission level to 1.2V. + +v6.2.20 (Aug. 08, 2003) +======================= + + Fixes: + ------ + 1. Problem: (CQ #8275) 5704B0 NICs not working properly on HP rx2600 + PCIX systems + + Cause: Problem in one of the hardware fixes in 5704 B0. + + Change: Disable the h/w fix. + + Impact: None. + +v6.2.19 (July 31, 2003) +======================= + + Fixes: + ------ + 1. Problem: Repeated ifup/ifdown hangs systems using iommu's. + + Cause: Rx buffers not properly unmapped during ifdown. + + Change: Fixed driver to unmap all buffers during ifdown. + + Impact: None. + + 2. Problem: (CQ# 8232) Copper NICs drop packets when connected + to some switches. + + Cause: Phy register 0x18 (aux. ctrl) shadow 0 not set up + properly. This bug was introduced when adding + external loop back function in v6.2.18. + + Change: Fixed the phy register setting. + + Impact: None. + + Enhancements: + ------------- + 1. Problem: Not setting up dma mask (pci_set_dma_mask) according to + Documentation/DMA-mapping.txt. + + Change: Made the required changes when calling pci_set_dma_mask. + + Impact: None. + + 2. Problem: Driver does not restore line speed settings after + external loopback. + + Change: Added code to save line_speed settings before ext. + loopback and to restore the settings afterward. + + Impact: None. + + 3. Problem: Makefile does not compile driver properly on 2.5+ kernels. + + Change: Modified Makefile to support 2.4 anf 2.5+ kernels + transparently. (More work needs to be done) + + Impact: None. + +v6.2.18 (July 25, 2003) +======================= + + Fixes: + ------ + 1. Problem: TSO doesn't work on ia64 and big endian machines. + + Cause: U32 typedef as unsigned long and TSO firmware was not + downloaded properly on big endian machines. + + Change: Fixed U32 typedef and big endian code for firmware + downloading. Also made additional cleanup and testing + on the big endian code. + + Impact: None. + + Enhancements: + ------------- + 1. Problem: TSO performance slightly below (< 10%) non-TSO + performance on 5703/5704. + + Change: Optimized firmware to narrow the performance gap. + + Impact: None. + + 2. Problem: (CQ #8184) Driver limits the number of Multicast addresses + to 32. + + Change: Changed scheme to allow unlimited Multicast addresses by + by just keeping the Hash values. + + Impact: None. + + 3. Problem: (CQ #7822) Driver does not support ETHTOOL_GSTRINGS, + ETHTOOL_GSTATS, ETHTOOL_GREGS, ETHTOOL_PHYS_ID ioctls. + + Change: Added these ioctls. + + Impact: None. + + 4. Problem: Driver does not support 5704 B0. + + Change: Added support for 5704 B0. + + Impact: None. + +v6.2.17 (July 14, 2003) +======================= + + Fixes: + ------ + 1. Problem: (CQ8125) ethtool -e hangs system + + Cause: ethtool tries to read 1Mbytes of data from the slow + nvram. + + Change: Changed maximum size of nvram to 128K and added a 1K + limit to ETHTOOL_GEEPROM ioctl. + + Impact: None. + + 2. Problem: Driver does not work properly on the latest 2.5 kernels + and generates "irq xx: nobody cared!" message. + + Cause: Interrupt service routine needs to return value to indicate + whether interrupt was serviced or not in the latest 2.5 + kernels. + + Change: Made the necessary change in the ISR. + + Impact: None. Still compatible with 2.4 and older kernels. + +v6.2.16 (July 11, 2003) +======================= + + Enhancements: + ------------- + 1. Problem: Link polling interval for 5703S NICs is too long. + + Change: Decreased the link polling interval to 1/4 second. + + Impact: None. + +v6.2.15 (July 10, 2003) +======================= + + Fixes: + ------ + 1. Problem: (CQ7987) Blade NIC link toggles up and down under network + stress. + + Cause: PCS SYNC signal appears to be unstable in some cases + under stress. + + Change: Changed driver to poll for link changes instead of using + interrupts. Also added code to proceed with PHY setup + only if PCS SYNC or SIGNAL DETECT are down. These changes + allow the NIC to run with minimal interruption when the NIC + occasionally loses PCS SYNC for short periods of time. + + Impact: May slightly affect link change/autoneg behavior. + +v6.2.14 (July 01, 2003) +======================= + + Fixes: + ------ + 1. Problem: Driver panics when loading on 2.4.20-18.7 RH kernel. + + Cause: Makefile compiles driver with kgcc, making the driver + incompatible with the kernel that was compiled with gcc. + + Change: Modified Makefile to choose kgcc only if the kernel + was compiled with kgcc. + + Impact: None. + + 2. Problem: Link error when compiling driver into kernel with + CONFIG_HOTPLUG not defined. + + Cause: __devexit_p not used in the bcm5700_remove_one pointer. + + Change: Added __devexit_p for the bcm5700_remove_one pointer. + + Impact: None. + +v6.2.11 (May 16, 2003) +====================== + + Fixes: + ------ + 1. Problem: CQ#7791 Driver cannot consistently lease DHCP address. + + Cause: The Broadcom NICs sometimes takes longer to link up + when connected to certain switches. This may cause + the ifup script to conclude that link is down and not + proceed to obtain an IP address using DHCP. + + Change: The workaround is done in the driver to return error when the + mii-tool or ethtool getlink ioctl interfaces are called during + the first 6 seconds after driver reset. When the driver returns + error, the ifup script will assume link is up and proceed with + the DHCP request. After 6 seconds, these ioctl interfaces will + return the true link states at the time they are called. + + Impact: ifup always proceeds with DHCP request whether link is up + or down. + +v6.2.7 (May 14, 2003) +===================== + + Enhancements: + ------------- + 1. Problem: Driver does not have OEM strings for some 5703 B0 NICs. + + Change: Added OEM sub IDs and description strings. + + +v6.2.6 (May 09, 2003) +======================= + + Enhancements: + ------------- + 1. Problem: Driver does not support 5901 A2/A3. + + Change: Added support for 5901 A2/A3. + + +v6.2.5 (May 05, 2003) +======================= + + Fixes: + ------ + 1. Problem: Driver intermittently won't load when ASF is enabled. + + Cause: Driver's init function's PHY routines contend with ASF. + + Change: Removed PHY access routines in init function when ASF is + enabled. Using the latest firmware (2.33) will guarantee + that the proper PHY ID will be obtained by the driver. + + Enhancements: + ------------- + 1. Problem: Driver does not support 5901. + + Change: Added support for 5901. + +v6.2.4 (April 29, 2003) +======================= + + Fixes: + ------ + 1. Problem: The PHY lockup problem described in v6.2.3 Fix #4 below + theoretically can affect other PHY cores in 5703 and 5705. + + Cause: Hardware bug in the PHY core. Probability of lockup is + extremely small. + + Change: Expanded the lockup detection and recovery code to 5703, + 5704, and 5705. Also changed the driver to do a PHY reset + on link down on all versions of 5705. Also added PHY reset + before restart autoneg in ethtool for 5703, 04, and 05. + +v6.2.3 (April 18, 2003) +======================= + + Fixes: + ------ + 1. Problem: (CQ #7518) Using ethtool to set speed before ifup crashes + the system when using fiber NICs. + + Cause: ethtool ioctl may access the status block which is not + initialized before ifup. + + Change: Added check before proceeding with some ethtool ioctls. + + Impact: Only impact certain ethtool commands. + + + 2. Problem: (CQ #7577) Cannot receive traffic in some rare situations + after loading the driver. + + Cause: In some rare situations when running in NAPI mode, the chip + generates a receive interrupt before the interface state is + up. The driver then disables rx interrupt and schedules the + polling function which fails because the interface is not up. + This polling function will not be called and no rx packets + will be processed. + + Change: Added check for the return value of netif_rx_schedule_prep() + and will only disable rx interrupt if it returns success. + + Impact: Receive code path in NAPI mode. + + + 3. Problem: ethtool -r (restart autoneg) does not work on 5704S. + + Cause: LM_SetupPhy does not restart autoneg if autoneg is already + set for 5704S. + + Change: Added code to first disable autoneg and then reneable it. + + Impact: Only affects ethtool -r for fiber NICs. + + + 4. Problem: In some extremely rare situations, 5704 Copper NICs + may not link up after a PHY reset. + + Cause: On some 5704 PHY cores, there is a small probability of + lock up after a PHY reset. + + Change: Added code to detect PHY lock up after a PHY reset and + reset again if lock up is detected. + + Impact: The added lock up detection and recovery code affects + driver reset and link down events where PHY resets are + performed. + + +v6.2.2 (04/09/03) + +- Fixed the problem of intermittently using a MAC address of all zeros. +- Added support for BASP in NAPI mode. +- Added polling mode to support netdump. + +v6.2.1 (03/25/03) + +- Added NAPI. + +v6.2.0 (03/18/03) + +- Added support for 5788. +- Changed locking functions into macros to avoid passing the flags. + +v6.0.3 (02/25/03) + +- Fixed the problem of 5704S not linking when it is set to autoneg. and the + link partner has autoneg. disabled. + +v6.0.2 (02/14/03) + +- Fixed the problem of T3_CHIP_ID_5705_A2 not defined in tigon3.h + +v6.0.1 (02/11/03) + +- Fixed some minor bugs in the adaptive coalescing logic. + +v6.0.0 (02/10/03) + +- Fixed another ASF problem that occurred when WOL was disabled in firmware + but enabled in the driver. + +- Added new device IDs for 5705 A2/A3 and made necessary changes to support + 5705 A3. + +v5.0.22 (02/07/03) + +- Fixed the problem of ASF malfunction when the device is shutdown. + +v5.0.21 (02/06/03) + +- Fixed the problem of ifup (mii-tool) always detecting link down on 5704S. +- Fixed the problem of high CPU utilization when receiving line-rate traffic + from Smartbits or Ixia by limiting the number of buffers allocated in the ISR. + +v5.0.20 (02/05/03) + +- Fixed a bad IP checksum problem in the 5702/03/04 TSO firmware. + +v5.0.19 (01/23/03) + +- Changed Makefile to include proper compiler switches for x86_64 architectures. +- Fixed a bug in the adaptive coalescing function. Some variables were not + properly initialized after ifdown and ifup and this bug may cause + low performance especially when using jumbo frames. +- Tweaked the adaptive coalescing parameters slightly to improve netperf + performance. + +v5.0.17 (01/10/03) + +- Made changes for 5705 A2. +- Added autoneg. workaround for 5704S. + +v5.0.16 (01/03/03) + +- Fixed the hang problem on 5700 during ifdown. + +v5.0.15 (01/03/03) + +- Fixed some WOL issues. +- Fixed TSO problems on 5702/03/04. +- Fixed problems with the network_install dd images. + +v5.0.14 (12/19/02) + +- Made flow control work better. +- Added 10Mbps limit for 5704 WOL. +- Removed 5901 and 5705MFE support. + +v5.0.12 (12/12/02) + +- Added diagnostics ioctls. +- Enabled flow control by default. + +v5.0.11 (12/06/02) + +- Fixed data corruption problem on 5705 with TSO enabled. +- Fixed 5701 lockup during initialization. + +v5.0.10 (11/20/02) + +- Added support for 5705MFE and 5901. +- Added TSO for 5705 A1. +- Fixed ifconfig hang on Intel McKinley. + +v5.0.9 (11/08/02) + +- Made changes for 5705 A1 chips. + +v5.0.8 (11/05/02) + +- Fixed ASF problem on 5705. +- Fixed problem with changing MAC address. +- Added MTU change using ifconfig. +- Fixed problem running on AMD X86_64 machines. + +v5.0.7 (10/11/02) + +- Fixed 5704S link related problems. +- Improved performance slightly on some PCIX machines. +- Fixed GEEPROM to allow full access to NVRAM. + +v5.0.6 (10/03/02) + +- Fixed problem of 5704S not linking up. +- Added code to support autoneg in 5704S hardware. + +v5.0.5 (09/24/02) + +- Fine-tuned some parameters for improved performance. +- Added TSO. +- Fixed WOL problems on 5704. +- Fixed the problem of not enabling ASF on the fly. +- Fixed incorrect PCIX speed in proc file. +- Added 5704S support. +- Fixed incorrect PCIX speed in proc file. +- Fixed the initialization failure on 5701 LOMs. + +v3.0.12 (08/22/02) + +- Fixed the problem of not loading on CIOBE A1. +- Fixed intermittent hang problem when configuring 802.1q VLAN. + +v3.0.11 (08/21/02) + +- Added DIAG_SUSPEND/DIAG_RESUME ioctls. +- Added some workarounds for 5705. +- Added vlan tag size adjustment when receiving vlan tagged packets. + +v3.0.10 (08/07/02) + +- Fixed NVRAM write corruption. +- Added check to not allow jumbo MTUs on 5705. +- Added WOL on OEM 5703 Fiber LOM. + +v3.0.9 (08/05/02) + +- Added support for 5705. + +v3.0.8 (07/25/02) + +- Fixed VLAN problem with BASP. +- Added new 5704 IDs. +- Added support for 5702FE. + +v3.0.7 (07/17/02) + +- Changed to enable VLAN tag stripping only when VLAN or BASP is registered. +- Fixed problem of sending bad zero-copy packets. +- Added additional workaround for systems with AMD762. +- Adjusted EEPROM delay loop. + +v3.0.6 (06/25/02) + +- Fixed an ASF failure. +- Added 802.1Q VLAN +- Added a locking scheme for PHY access. +- Fixed an intermittent crash problem with fiber NICs. +- Adjusted fiber autoneg. logic to work with 3Com 4900SX switch. +- Added netif_carrier_on and netif_carrier_off. + +v3.0.5 (05/30/02) + +- Fixed occasional hang during load and unload. +- Fixed non-zero statistics when stats_coalesce_ticks is 0. + +v3.0.4 (05/15/02) + +- Fixed 10Mbps line speed setting bug. +- Fixed problem with jumbo packets. +- Fixed a compile warning on Red Hat 7.3 + +v3.0.3 (05/13/02) + +- Added support for ASF. +- Added 64-bit counters for 64-bit machines. +- Reduced code size. +- Fixed intermittent VPD failures. + +v3.0.2 (05/03/02) + +- Fixed a bug on PCIX systems. + +v3.0.1 (05/02/02) + +- Added workaround for Intel ICH and ICH0 chipsets. +- Fixed 5704 related problems. + +v3.0.0 (04/22/02) + +- Added 5704 support +- Reduced some overhead in the upper/lower driver interface. + +v2.2.19 (04/10/02) + +- Fixed a panic problem on 5700 under heavy traffic on certain machines. +- Reduced code size slightly. +- Added necessary delays after changes to GPIO. + +v2.2.18 (04/03/02) + +- Added new OEM subsystem IDs. +- Fixed some ethtool problems. + +v2.2.17 (04/02/02) + +- Adjusted some delay loops to avoid hangs during intermittent failures. + +v2.3.0 (03/29/02) + +- Special version with external memory and Mini ring support. + +v2.2.12 (03/27/02) + +- Minor fix for some fiber related issues. + +v2.2.11 (03/23/02) + +- Adjusted fiber autoneg scheme to be consistent with other Broadcom + drivers. + +v2.2.10 (03/21/02) + +- Changed Fiber LED to software control. +- Fixed 4 GByte boundary check for 5700. + +v2.2.9 (03/13/02) + +- Fixed a hang problem on 5703S with cable disconnected. + +v2.2.8 (03/07/02) + +- More changes to fiber autonegotiation - interrupt with polling backup + for fiber link changes. + +v2.2.7 (03/06/02) + +- Made some changes to autonegotiation of fiber. + +v2.2.6 (03/05/02) + +- Added fix for 5703S. +- Improved adaptive interrupt coalescing. +- Fixed a problem in WOL. + +v2.2.5 (02/27/02) + +- Fixed a big endian problem. + +v2.2.4 (02/27/02) + +- Added new device IDs for 5703/5702. +- Fixed parity error NMIs with 5703 on PCIX systems. +- Added Ethernet@WireSpeed. + +v2.2.3 (02/07/02) + +- Fixed EEPROM corruption during repeated load/unload of the driver. +- Changed driver to use polling for fiber link changes. + +v2.2.1 (01/23/02) + +- Increased eeprom timing delays for slower clocks. + +v2.2.0 (01/22/02) + +- First release for 5702/5703 A1. + +v2.0.34 (01/04/02) + +- Fixed data corruption problem on PCIX systems under heavy traffic. + +v2.0.32 (01/02/02) + +- No change. + +v2.0.31 (12/14/01) + +- Changed i/o accesses to use writel/readl macros. +- Fixed problem when loading driver on an OEM LOM with no cable attached. +- Fixed problem of setting IFF_ALLMULTI. +- Changed to use pci_map_page to map the zero copy transmit fragments. + +v2.0.28 (11/05/01) + +- Added SIOCETHTOOL ioctl support. + +v2.0.27 (10/26/01) + +- Fixed a link up problem for an OEM LOM. + +v2.0.26 (10/25/01) + +- Added 5702 support. + +v2.0.25 (10/22/01) + +- Added Rx_Short_Fragments and other counters. +- Added code to detect AMD762 Northbridge and enable PCI ordering on that chip. + +v2.0.24 (09/19/01) + +- Fixed intermittent link failures. + +v2.0.21 (09/14/01) + +- Fixed zero copy failure. + +v2.0.19 (09/11/01) + +- Fixed the problem of over reporting CRC errors. +- Fixed the problem of late collisions in 1000Mbps half duplex. + +v2.0.18 (08/24/01) + +- Added same fix in 2.0.17 for the latest A3 chips. + +v2.0.17 (08/22/01) + +- Fixed a lock-up problem when loading fibre card with no cable attached. + +v2.0.16 (08/18/01) + +- Fixed a panic caused by an interrupt before the NIC is fully initialized. + +v2.0.15 (08/14/01) + +- Fixed a problem that caused unnecessary resets to the chip during +heavy traffic. + +v2.0.14 (08/09/01) + +- Lowered core clock freq. in latest 5701 chip in 100Mbps WOL mode. + +v2.0.12 (08/02/01) + +- Fixed a 100Mbps fixed speed problem. +- Fixed the accidental clearing of RX stats during link changes. +- Added reentrancy protection in tasklet so that it will work on RH7.2 beta3. + +v2.0.11 (07/19/01) + +- Fixed some fiber autonegotiation problems. + +v2.0.10 (07/13/01) + +- Added promiscuous mode support. +- Improved performance, especially on 5700 chips. + +v2.0.9 (07/04/01) + +- Fixed IA64 DMA alignment problem. + +v2.0.8 (07/03/01) + +- Fixed panic during ifdown. + +v2.0.7 (07/01/01) + +- Fixed problems with fibre cards. +- Added 100Mbps WOL for 5701 B2 chip. + +v2.0.6 (06/22/01) + +- Improved adaptive receive interrupt coalescing. +- Added LED blinking ioctl. +- Added support for new boards. +- Fixed hang problem when cable is not attached. + +v2.0.5 (06/18/01) + +- Some performance improvements. +- Added adaptive receive interrupt coalescing. +- Preliminary release for IA64. + +v2.0.4 (06/01/01) + +- Fixed a problem with multiple cards using jumbo frames. + +v2.0.3 (05/22/01) + +- Fixed panic during hotplug. +- Fixed RPM error on Mandrake. + +v2.0.2 (05/21/01) + +- Fixed a spin lock problem. + +v2.0.1 (05/18/01) + +- Fixed memory leak when unloading driver. + +v1.5.6 (05/11/01) + +- Added additional OEM support. +- Added Wake-On-LAN support. + +v1.5.4 (05/04/01) + +- Fixed interrupt and TX hung problem on 5701. +- Added OEM strings. + +v1.5.3 (04/26/01) + +- Fixed parameter defaults. +- Added /proc filesystem reporting. + +v1.5.2 (04/18/01) + +- Fixed bug in transmit IP checksum. + +v1.5.1 (04/15/01) + +- Added scatter/gather, HIGHMEM DMA, and IP transmit checksum offload for the + TUX kernel. +- Added support of BCM5701. + +v1.5.0 (03/14/01) + +- Added Fibre transceiver support. + +v1.4.6 (02/14/01) + +- Fixed the problem of dropping VLAN tagged 802.2/802.3 frames. +- Fixed Makefile to work in non Red Hat environments. +- Fixed the problem of over-counting receive errors. + +v1.4.5 (01/31/01) + +- Added PCI-X support for BCM5700. +- Fixed Jumbo frame problems by modifying some thresholds and increased +Jumbo frame size to 9K. + +v1.4.4 (01/18/01) + +- Fixed the problem of transmit congestion during very heavy traffic in pre- +2.4.0 kernels. + +v1.4.3 (01/10/01) + +- Changed driver to use new PCI DMA functions in 2.4 kernel. + +v1.4.2 (01/03/01) + +- Changed driver to use spin locks for SMP machines. +- Added spin locks around PRIVATE ioctls for MII registers . + +v1.4.1 (12/26/00) + +- Made changes for B1 chips. + +v1.4.0 (12/19/00) + +- Made changes for 2.4.0 kernel. + +v1.3.8 (12/13/00) + +- Fixed the problem of setting a user assigned MAC address. +- Added VLAN support for BASP. + +v1.3.7 (12/01/00) + +- Added code to handle BCM5401 B0 phy chips. + +v1.3.6 (11/22/00) + +- Fixed LED problems. + +v1.3.5 (11/21/00) + +- Fixed some flow control auto negotiation problems. + +v1.3.4 (11/17/00) + +- Fixed a problem of missing interrupts. +- Resolved all fixed speed related problems. + +v1.3.3 (11/13/00) + +- Fixed the problem of memory allocation failure in some machines. + +v1.3.2 (11/09/00) + +- Made more changes regarding fixed speeds. Also removed manual selection + of 1000 Mbps. +- Made a SRPM package. + +v1.03b (10/31/00) + +- Fixed problems #452, #441, #364, and other speed related problems in the + Lower Module. + +v1.03 (10/30/00) + +- Released Lower Module as tigon3.o. + +v1.02c (10/27/00) + +- Fixed the fixed speed problem in Lower Module. + +v1.02b (10/24/00) + +- Added new parameters for flow control settings. +- Fixed problem with uninitialized statistics counters (problem #338). + +v1.02 (10/16/00) + +- Modified for B0 chips, should also work for other chips. +- Reenabled TCP/UDP receive hardware checksums. + +v1.01b (10/09/00) + +- Changed driver to use pci* routines instead of pcibios* routines to obtain + the correct IRQ on some MP machines. +- Resolved Problems #253, #257. + +v1.01 (09/27/00) + +- Added statistics collection function. +- Added jumbo frames support. +- Added MII related ioctl calls. +- Disabled UDP/TCP receive checksum offload to workaround a memory corruption + problem in A1 chips. +- Fixed interrupt sharing problem. + +v1.00 (09/13/00) + +-First release of the driver for BCM5700 A1 chips. + diff --git a/drivers/net/bcm5700/autoneg.c b/drivers/net/bcm5700/autoneg.c new file mode 100644 index 000000000..d467f0347 --- /dev/null +++ b/drivers/net/bcm5700/autoneg.c @@ -0,0 +1,438 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/******************************************************************************/ + +#ifdef INCLUDE_TBI_SUPPORT +#include "mm.h" + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +void +MM_AnTxConfig( + PAN_STATE_INFO pAnInfo) +{ + PLM_DEVICE_BLOCK pDevice; + + pDevice = (PLM_DEVICE_BLOCK) pAnInfo->pContext; + + REG_WR(pDevice, MacCtrl.TxAutoNeg, (LM_UINT32) pAnInfo->TxConfig.AsUSHORT); + + pDevice->MacMode |= MAC_MODE_SEND_CONFIGS; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +void +MM_AnTxIdle( + PAN_STATE_INFO pAnInfo) +{ + PLM_DEVICE_BLOCK pDevice; + + pDevice = (PLM_DEVICE_BLOCK) pAnInfo->pContext; + + pDevice->MacMode &= ~MAC_MODE_SEND_CONFIGS; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +char +MM_AnRxConfig( + PAN_STATE_INFO pAnInfo, + unsigned short *pRxConfig) +{ + PLM_DEVICE_BLOCK pDevice; + LM_UINT32 Value32; + char Retcode; + + Retcode = AN_FALSE; + + pDevice = (PLM_DEVICE_BLOCK) pAnInfo->pContext; + + Value32 = REG_RD(pDevice, MacCtrl.Status); + if(Value32 & MAC_STATUS_RECEIVING_CFG) + { + Value32 = REG_RD(pDevice, MacCtrl.RxAutoNeg); + *pRxConfig = (unsigned short) Value32; + + Retcode = AN_TRUE; + } + + return Retcode; +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +void +AutonegInit( + PAN_STATE_INFO pAnInfo) +{ + unsigned long j; + + for(j = 0; j < sizeof(AN_STATE_INFO); j++) + { + ((unsigned char *) pAnInfo)[j] = 0; + } + + /* Initialize the default advertisement register. */ + pAnInfo->mr_adv_full_duplex = 1; + pAnInfo->mr_adv_sym_pause = 1; + pAnInfo->mr_adv_asym_pause = 1; + pAnInfo->mr_an_enable = 1; +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +AUTONEG_STATUS +Autoneg8023z( + PAN_STATE_INFO pAnInfo) +{ + unsigned short RxConfig; + unsigned long Delta_us; + AUTONEG_STATUS AnRet; + + /* Get the current time. */ + if(pAnInfo->State == AN_STATE_UNKNOWN) + { + pAnInfo->RxConfig.AsUSHORT = 0; + pAnInfo->CurrentTime_us = 0; + pAnInfo->LinkTime_us = 0; + pAnInfo->AbilityMatchCfg = 0; + pAnInfo->AbilityMatchCnt = 0; + pAnInfo->AbilityMatch = AN_FALSE; + pAnInfo->IdleMatch = AN_FALSE; + pAnInfo->AckMatch = AN_FALSE; + } + + /* Increment the timer tick. This function is called every microsecon. */ +// pAnInfo->CurrentTime_us++; + + /* Set the AbilityMatch, IdleMatch, and AckMatch flags if their */ + /* corresponding conditions are satisfied. */ + if(MM_AnRxConfig(pAnInfo, &RxConfig)) + { + if(RxConfig != pAnInfo->AbilityMatchCfg) + { + pAnInfo->AbilityMatchCfg = RxConfig; + pAnInfo->AbilityMatch = AN_FALSE; + pAnInfo->AbilityMatchCnt = 0; + } + else + { + pAnInfo->AbilityMatchCnt++; + if(pAnInfo->AbilityMatchCnt > 1) + { + pAnInfo->AbilityMatch = AN_TRUE; + pAnInfo->AbilityMatchCfg = RxConfig; + } + } + + if(RxConfig & AN_CONFIG_ACK) + { + pAnInfo->AckMatch = AN_TRUE; + } + else + { + pAnInfo->AckMatch = AN_FALSE; + } + + pAnInfo->IdleMatch = AN_FALSE; + } + else + { + pAnInfo->IdleMatch = AN_TRUE; + + pAnInfo->AbilityMatchCfg = 0; + pAnInfo->AbilityMatchCnt = 0; + pAnInfo->AbilityMatch = AN_FALSE; + pAnInfo->AckMatch = AN_FALSE; + + RxConfig = 0; + } + + /* Save the last Config. */ + pAnInfo->RxConfig.AsUSHORT = RxConfig; + + /* Default return code. */ + AnRet = AUTONEG_STATUS_OK; + + /* Autoneg state machine as defined in 802.3z section 37.3.1.5. */ + switch(pAnInfo->State) + { + case AN_STATE_UNKNOWN: + if(pAnInfo->mr_an_enable || pAnInfo->mr_restart_an) + { + pAnInfo->CurrentTime_us = 0; + pAnInfo->State = AN_STATE_AN_ENABLE; + } + + /* Fall through.*/ + + case AN_STATE_AN_ENABLE: + pAnInfo->mr_an_complete = AN_FALSE; + pAnInfo->mr_page_rx = AN_FALSE; + + if(pAnInfo->mr_an_enable) + { + pAnInfo->LinkTime_us = 0; + pAnInfo->AbilityMatchCfg = 0; + pAnInfo->AbilityMatchCnt = 0; + pAnInfo->AbilityMatch = AN_FALSE; + pAnInfo->IdleMatch = AN_FALSE; + pAnInfo->AckMatch = AN_FALSE; + + pAnInfo->State = AN_STATE_AN_RESTART_INIT; + } + else + { + pAnInfo->State = AN_STATE_DISABLE_LINK_OK; + } + break; + + case AN_STATE_AN_RESTART_INIT: + pAnInfo->LinkTime_us = pAnInfo->CurrentTime_us; + pAnInfo->mr_np_loaded = AN_FALSE; + + pAnInfo->TxConfig.AsUSHORT = 0; + MM_AnTxConfig(pAnInfo); + + AnRet = AUTONEG_STATUS_TIMER_ENABLED; + + pAnInfo->State = AN_STATE_AN_RESTART; + + /* Fall through.*/ + + case AN_STATE_AN_RESTART: + /* Get the current time and compute the delta with the saved */ + /* link timer. */ + Delta_us = pAnInfo->CurrentTime_us - pAnInfo->LinkTime_us; + if(Delta_us > AN_LINK_TIMER_INTERVAL_US) + { + pAnInfo->State = AN_STATE_ABILITY_DETECT_INIT; + } + else + { + AnRet = AUTONEG_STATUS_TIMER_ENABLED; + } + break; + + case AN_STATE_DISABLE_LINK_OK: + AnRet = AUTONEG_STATUS_DONE; + break; + + case AN_STATE_ABILITY_DETECT_INIT: + /* Note: in the state diagram, this variable is set to */ + /* mr_adv_ability<12>. Is this right?. */ + pAnInfo->mr_toggle_tx = AN_FALSE; + + /* Send the config as advertised in the advertisement register. */ + pAnInfo->TxConfig.AsUSHORT = 0; + pAnInfo->TxConfig.D5_FD = pAnInfo->mr_adv_full_duplex; + pAnInfo->TxConfig.D6_HD = pAnInfo->mr_adv_half_duplex; + pAnInfo->TxConfig.D7_PS1 = pAnInfo->mr_adv_sym_pause; + pAnInfo->TxConfig.D8_PS2 = pAnInfo->mr_adv_asym_pause; + pAnInfo->TxConfig.D12_RF1 = pAnInfo->mr_adv_remote_fault1; + pAnInfo->TxConfig.D13_RF2 = pAnInfo->mr_adv_remote_fault2; + pAnInfo->TxConfig.D15_NP = pAnInfo->mr_adv_next_page; + + MM_AnTxConfig(pAnInfo); + + pAnInfo->State = AN_STATE_ABILITY_DETECT; + + break; + + case AN_STATE_ABILITY_DETECT: + if(pAnInfo->AbilityMatch == AN_TRUE && + pAnInfo->RxConfig.AsUSHORT != 0) + { + pAnInfo->State = AN_STATE_ACK_DETECT_INIT; + } + + break; + + case AN_STATE_ACK_DETECT_INIT: + pAnInfo->TxConfig.D14_ACK = 1; + MM_AnTxConfig(pAnInfo); + + pAnInfo->State = AN_STATE_ACK_DETECT; + + /* Fall through. */ + + case AN_STATE_ACK_DETECT: + if(pAnInfo->AckMatch == AN_TRUE) + { + if((pAnInfo->RxConfig.AsUSHORT & ~AN_CONFIG_ACK) == + (pAnInfo->AbilityMatchCfg & ~AN_CONFIG_ACK)) + { + pAnInfo->State = AN_STATE_COMPLETE_ACK_INIT; + } + else + { + pAnInfo->State = AN_STATE_AN_ENABLE; + } + } + else if(pAnInfo->AbilityMatch == AN_TRUE && + pAnInfo->RxConfig.AsUSHORT == 0) + { + pAnInfo->State = AN_STATE_AN_ENABLE; + } + + break; + + case AN_STATE_COMPLETE_ACK_INIT: + /* Make sure invalid bits are not set. */ + if(pAnInfo->RxConfig.bits.D0 || pAnInfo->RxConfig.bits.D1 || + pAnInfo->RxConfig.bits.D2 || pAnInfo->RxConfig.bits.D3 || + pAnInfo->RxConfig.bits.D4 || pAnInfo->RxConfig.bits.D9 || + pAnInfo->RxConfig.bits.D10 || pAnInfo->RxConfig.bits.D11) + { + AnRet = AUTONEG_STATUS_FAILED; + break; + } + + /* Set up the link partner advertisement register. */ + pAnInfo->mr_lp_adv_full_duplex = pAnInfo->RxConfig.D5_FD; + pAnInfo->mr_lp_adv_half_duplex = pAnInfo->RxConfig.D6_HD; + pAnInfo->mr_lp_adv_sym_pause = pAnInfo->RxConfig.D7_PS1; + pAnInfo->mr_lp_adv_asym_pause = pAnInfo->RxConfig.D8_PS2; + pAnInfo->mr_lp_adv_remote_fault1 = pAnInfo->RxConfig.D12_RF1; + pAnInfo->mr_lp_adv_remote_fault2 = pAnInfo->RxConfig.D13_RF2; + pAnInfo->mr_lp_adv_next_page = pAnInfo->RxConfig.D15_NP; + + pAnInfo->LinkTime_us = pAnInfo->CurrentTime_us; + + pAnInfo->mr_toggle_tx = !pAnInfo->mr_toggle_tx; + pAnInfo->mr_toggle_rx = pAnInfo->RxConfig.bits.D11; + pAnInfo->mr_np_rx = pAnInfo->RxConfig.D15_NP; + pAnInfo->mr_page_rx = AN_TRUE; + + pAnInfo->State = AN_STATE_COMPLETE_ACK; + AnRet = AUTONEG_STATUS_TIMER_ENABLED; + + break; + + case AN_STATE_COMPLETE_ACK: + if(pAnInfo->AbilityMatch == AN_TRUE && + pAnInfo->RxConfig.AsUSHORT == 0) + { + pAnInfo->State = AN_STATE_AN_ENABLE; + break; + } + + Delta_us = pAnInfo->CurrentTime_us - pAnInfo->LinkTime_us; + + if(Delta_us > AN_LINK_TIMER_INTERVAL_US) + { + if(pAnInfo->mr_adv_next_page == 0 || + pAnInfo->mr_lp_adv_next_page == 0) + { + pAnInfo->State = AN_STATE_IDLE_DETECT_INIT; + } + else + { + if(pAnInfo->TxConfig.bits.D15 == 0 && + pAnInfo->mr_np_rx == 0) + { + pAnInfo->State = AN_STATE_IDLE_DETECT_INIT; + } + else + { + AnRet = AUTONEG_STATUS_FAILED; + } + } + } + + break; + + case AN_STATE_IDLE_DETECT_INIT: + pAnInfo->LinkTime_us = pAnInfo->CurrentTime_us; + + MM_AnTxIdle(pAnInfo); + + pAnInfo->State = AN_STATE_IDLE_DETECT; + + AnRet = AUTONEG_STATUS_TIMER_ENABLED; + + break; + + case AN_STATE_IDLE_DETECT: + if(pAnInfo->AbilityMatch == AN_TRUE && + pAnInfo->RxConfig.AsUSHORT == 0) + { + pAnInfo->State = AN_STATE_AN_ENABLE; + break; + } + + Delta_us = pAnInfo->CurrentTime_us - pAnInfo->LinkTime_us; + if(Delta_us > AN_LINK_TIMER_INTERVAL_US) + { +// if(pAnInfo->IdleMatch == AN_TRUE) +// { + pAnInfo->State = AN_STATE_LINK_OK; +// } +// else +// { +// AnRet = AUTONEG_STATUS_FAILED; +// break; +// } + } + + break; + + case AN_STATE_LINK_OK: + pAnInfo->mr_an_complete = AN_TRUE; + pAnInfo->mr_link_ok = AN_TRUE; + AnRet = AUTONEG_STATUS_DONE; + + break; + + case AN_STATE_NEXT_PAGE_WAIT_INIT: + break; + + case AN_STATE_NEXT_PAGE_WAIT: + break; + + default: + AnRet = AUTONEG_STATUS_FAILED; + break; + } + + return AnRet; +} +#endif /* INCLUDE_TBI_SUPPORT */ + diff --git a/drivers/net/bcm5700/autoneg.h b/drivers/net/bcm5700/autoneg.h new file mode 100644 index 000000000..5d9be8709 --- /dev/null +++ b/drivers/net/bcm5700/autoneg.h @@ -0,0 +1,418 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/******************************************************************************/ + + +#ifndef AUTONEG_H +#define AUTONEG_H + + + +/******************************************************************************/ +/* Constants. */ +/******************************************************************************/ + +#define AN_LINK_TIMER_INTERVAL_US 12000 /* 10ms */ + +/* TRUE, FALSE */ +#define AN_TRUE 1 +#define AN_FALSE 0 + + + +/******************************************************************************/ +/* Main data structure for keeping track of 802.3z auto-negotation state */ +/* variables as shown in Figure 37-6 of the IEEE 802.3z specification. */ +/******************************************************************************/ + +typedef struct +{ + /* Pointer to the operating system specific data structure. */ + void *pContext; + + /* Current auto-negotiation state. */ + unsigned long State; + #define AN_STATE_UNKNOWN 0 + #define AN_STATE_AN_ENABLE 1 + #define AN_STATE_AN_RESTART_INIT 2 + #define AN_STATE_AN_RESTART 3 + #define AN_STATE_DISABLE_LINK_OK 4 + #define AN_STATE_ABILITY_DETECT_INIT 5 + #define AN_STATE_ABILITY_DETECT 6 + #define AN_STATE_ACK_DETECT_INIT 7 + #define AN_STATE_ACK_DETECT 8 + #define AN_STATE_COMPLETE_ACK_INIT 9 + #define AN_STATE_COMPLETE_ACK 10 + #define AN_STATE_IDLE_DETECT_INIT 11 + #define AN_STATE_IDLE_DETECT 12 + #define AN_STATE_LINK_OK 13 + #define AN_STATE_NEXT_PAGE_WAIT_INIT 14 + #define AN_STATE_NEXT_PAGE_WAIT 16 + + /* Link timer. */ + unsigned long LinkTime_us; + + /* Current time. */ + unsigned long CurrentTime_us; + + /* Ability, idle, and ack match functions. */ + unsigned long AbilityMatchCnt; + + /* Need these values for consistency check. */ + unsigned short AbilityMatchCfg; + + unsigned short reserved; + + char AbilityMatch; + char IdleMatch; + char AckMatch; + char reserved1; + + /* Tx config data */ + union + { + /* The TxConfig register is arranged as follows: */ + /* */ + /* MSB LSB */ + /* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ + /* | D7| D6| D5| D4| D3| D2| D1| D0|D15|D14|D13|D12|D11|D10| D9| D8| */ + /* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ + struct + { +#ifdef BIG_ENDIAN_HOST + unsigned short D7:1; /* PS1 */ + unsigned short D6:1; /* HD */ + unsigned short D5:1; /* FD */ + unsigned short D4:1; + unsigned short D3:1; + unsigned short D2:1; + unsigned short D1:1; + unsigned short D0:1; + unsigned short D15:1; /* NP */ + unsigned short D14:1; /* ACK */ + unsigned short D13:1; /* RF2 */ + unsigned short D12:1; /* RF1 */ + unsigned short D11:1; + unsigned short D10:1; + unsigned short D9:1; + unsigned short D8:1; /* PS2 */ +#else /* BIG_ENDIAN_HOST */ + unsigned int D8:1; /* PS2 */ + unsigned int D9:1; + unsigned int D10:1; + unsigned int D11:1; + unsigned int D12:1; /* RF1 */ + unsigned int D13:1; /* RF2 */ + unsigned int D14:1; /* ACK */ + unsigned int D15:1; /* NP */ + unsigned int D0:1; + unsigned int D1:1; + unsigned int D2:1; + unsigned int D3:1; + unsigned int D4:1; + unsigned int D5:1; /* FD */ + unsigned int D6:1; /* HD */ + unsigned int D7:1; /* PS1 */ +#endif + } bits; + + unsigned short AsUSHORT; + + #define D8_PS2 bits.D8 + #define D12_RF1 bits.D12 + #define D13_RF2 bits.D13 + #define D14_ACK bits.D14 + #define D15_NP bits.D15 + #define D5_FD bits.D5 + #define D6_HD bits.D6 + #define D7_PS1 bits.D7 + } TxConfig; + + /* Rx config data */ + union + { + /* The RxConfig register is arranged as follows: */ + /* */ + /* MSB LSB */ + /* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ + /* | D7| D6| D5| D4| D3| D2| D1| D0|D15|D14|D13|D12|D11|D10| D9| D8| */ + /* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ + struct + { +#ifdef BIG_ENDIAN_HOST + unsigned short D7:1; /* PS1 */ + unsigned short D6:1; /* HD */ + unsigned short D5:1; /* FD */ + unsigned short D4:1; + unsigned short D3:1; + unsigned short D2:1; + unsigned short D1:1; + unsigned short D0:1; + unsigned short D15:1; /* NP */ + unsigned short D14:1; /* ACK */ + unsigned short D13:1; /* RF2 */ + unsigned short D12:1; /* RF1 */ + unsigned short D11:1; + unsigned short D10:1; + unsigned short D9:1; + unsigned short D8:1; /* PS2 */ +#else /* BIG_ENDIAN_HOST */ + unsigned int D8:1; /* PS2 */ + unsigned int D9:1; + unsigned int D10:1; + unsigned int D11:1; + unsigned int D12:1; /* RF1 */ + unsigned int D13:1; /* RF2 */ + unsigned int D14:1; /* ACK */ + unsigned int D15:1; /* NP */ + unsigned int D0:1; + unsigned int D1:1; + unsigned int D2:1; + unsigned int D3:1; + unsigned int D4:1; + unsigned int D5:1; /* FD */ + unsigned int D6:1; /* HD */ + unsigned int D7:1; /* PS1 */ +#endif + } bits; + + unsigned short AsUSHORT; + } RxConfig; + + #define AN_CONFIG_NP 0x0080 + #define AN_CONFIG_ACK 0x0040 + #define AN_CONFIG_RF2 0x0020 + #define AN_CONFIG_RF1 0x0010 + #define AN_CONFIG_PS2 0x0001 + #define AN_CONFIG_PS1 0x8000 + #define AN_CONFIG_HD 0x4000 + #define AN_CONFIG_FD 0x2000 + + + /* Management registers. */ + + /* Control register. */ + union + { + struct + { + unsigned int an_enable:1; + unsigned int loopback:1; + unsigned int reset:1; + unsigned int restart_an:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_an_enable Mr0.bits.an_enable + #define mr_loopback Mr0.bits.loopback + #define mr_main_reset Mr0.bits.reset + #define mr_restart_an Mr0.bits.restart_an + } Mr0; + + /* Status register. */ + union + { + struct + { + unsigned int an_complete:1; + unsigned int link_ok:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_an_complete Mr1.bits.an_complete + #define mr_link_ok Mr1.bits.link_ok + } Mr1; + + /* Advertisement register. */ + union + { + struct + { + unsigned int reserved_4:5; + unsigned int full_duplex:1; + unsigned int half_duplex:1; + unsigned int sym_pause:1; + unsigned int asym_pause:1; + unsigned int reserved_11:3; + unsigned int remote_fault1:1; + unsigned int remote_fault2:1; + unsigned int reserved_14:1; + unsigned int next_page:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_adv_full_duplex Mr4.bits.full_duplex + #define mr_adv_half_duplex Mr4.bits.half_duplex + #define mr_adv_sym_pause Mr4.bits.sym_pause + #define mr_adv_asym_pause Mr4.bits.asym_pause + #define mr_adv_remote_fault1 Mr4.bits.remote_fault1 + #define mr_adv_remote_fault2 Mr4.bits.remote_fault2 + #define mr_adv_next_page Mr4.bits.next_page + } Mr4; + + /* Link partner advertisement register. */ + union + { + struct + { + unsigned int reserved_4:5; + unsigned int lp_full_duplex:1; + unsigned int lp_half_duplex:1; + unsigned int lp_sym_pause:1; + unsigned int lp_asym_pause:1; + unsigned int reserved_11:3; + unsigned int lp_remote_fault1:1; + unsigned int lp_remote_fault2:1; + unsigned int lp_ack:1; + unsigned int lp_next_page:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_lp_adv_full_duplex Mr5.bits.lp_full_duplex + #define mr_lp_adv_half_duplex Mr5.bits.lp_half_duplex + #define mr_lp_adv_sym_pause Mr5.bits.lp_sym_pause + #define mr_lp_adv_asym_pause Mr5.bits.lp_asym_pause + #define mr_lp_adv_remote_fault1 Mr5.bits.lp_remote_fault1 + #define mr_lp_adv_remote_fault2 Mr5.bits.lp_remote_fault2 + #define mr_lp_adv_next_page Mr5.bits.lp_next_page + } Mr5; + + /* Auto-negotiation expansion register. */ + union + { + struct + { + unsigned int reserved_0:1; + unsigned int page_received:1; + unsigned int next_pageable:1; + unsigned int reserved_15:13; + } bits; + + unsigned short AsUSHORT; + } Mr6; + + /* Auto-negotiation next page transmit register. */ + union + { + struct + { + unsigned int code_field:11; + unsigned int toggle:1; + unsigned int ack2:1; + unsigned int message_page:1; + unsigned int reserved_14:1; + unsigned int next_page:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_np_tx Mr7.AsUSHORT + } Mr7; + + /* Auto-negotiation link partner ability register. */ + union + { + struct + { + unsigned int code_field:11; + unsigned int toggle:1; + unsigned int ack2:1; + unsigned int message_page:1; + unsigned int ack:1; + unsigned int next_page:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_lp_np_rx Mr8.AsUSHORT + } Mr8; + + /* Extended status register. */ + union + { + struct + { + unsigned int reserved_11:12; + unsigned int base1000_t_hd:1; + unsigned int base1000_t_fd:1; + unsigned int base1000_x_hd:1; + unsigned int base1000_x_fd:1; + } bits; + + unsigned short AsUSHORT; + } Mr15; + + /* Miscellaneous state variables. */ + union + { + struct + { + unsigned int toggle_tx:1; + unsigned int toggle_rx:1; + unsigned int np_rx:1; + unsigned int page_rx:1; + unsigned int np_loaded:1; + } bits; + + unsigned short AsUSHORT; + + #define mr_toggle_tx MrMisc.bits.toggle_tx + #define mr_toggle_rx MrMisc.bits.toggle_rx + #define mr_np_rx MrMisc.bits.np_rx + #define mr_page_rx MrMisc.bits.page_rx + #define mr_np_loaded MrMisc.bits.np_loaded + } MrMisc; + +} AN_STATE_INFO, *PAN_STATE_INFO; + + + +/******************************************************************************/ +/* Return code of Autoneg8023z. */ +/******************************************************************************/ + +typedef enum +{ + AUTONEG_STATUS_OK = 0, + AUTONEG_STATUS_DONE = 1, + AUTONEG_STATUS_TIMER_ENABLED = 2, +// AUTONEG_STATUS_FAILED = 0xffffffff, + AUTONEG_STATUS_FAILED = 0xfffffff +} AUTONEG_STATUS, *PAUTONEG_STATUS; + + + +/******************************************************************************/ +/* Function prototypes. */ +/******************************************************************************/ + +AUTONEG_STATUS Autoneg8023z(PAN_STATE_INFO pAnInfo); +void AutonegInit(PAN_STATE_INFO pAnInfo); + + + +/******************************************************************************/ +/* The following functions are defined in the os-dependent module. */ +/******************************************************************************/ + +void MM_AnTxConfig(PAN_STATE_INFO pAnInfo); +void MM_AnTxIdle(PAN_STATE_INFO pAnInfo); +char MM_AnRxConfig(PAN_STATE_INFO pAnInfo, unsigned short *pRxConfig); + + + +#endif /* AUTONEG_H */ + diff --git a/drivers/net/bcm5700/b57diag.c b/drivers/net/bcm5700/b57diag.c new file mode 100644 index 000000000..e21fbe022 --- /dev/null +++ b/drivers/net/bcm5700/b57diag.c @@ -0,0 +1,774 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* ethtool -t selftest code. */ +/* */ +/******************************************************************************/ + +#include "mm.h" + +#ifdef NICE_SUPPORT +#include "nicext.h" +#endif + +#ifdef ETHTOOL_TEST + +typedef struct reg_entry +{ + LM_UINT16 offset; + LM_UINT16 flags; +#define BCM5705_ONLY 1 +#define NOT_FOR_BCM5705 2 +#define NOT_FOR_BCM5788 4 + LM_UINT32 read_mask; + LM_UINT32 write_mask; +} reg_entry_t; + +typedef struct mem_entry +{ + LM_UINT32 offset; + LM_UINT32 len; +} mem_entry_t; + +/* Returns 1 on success, 0 on failure */ +int +b57_test_registers(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + int ret; + int i, bcm5705; + LM_UINT32 offset, read_mask, write_mask, val, save_val, read_val; + static reg_entry_t reg_tbl[] = { + /* MAC block */ + { 0x0400, 0x0002, 0x00000000, 0x00ef6f8c }, + { 0x0400, 0x0001, 0x00000000, 0x01ef6b8c }, /* 5705 */ + { 0x0404, 0x0002, 0x03800107, 0x00000000 }, + { 0x0404, 0x0001, 0x03800100, 0x00000000 }, /* 5705 */ + { 0x0408, 0x0002, 0x00000000, 0x07c01400 }, + { 0x0408, 0x0001, 0x00000000, 0x07c01000 }, /* 5705 */ + { 0x040c, 0x0000, 0x00000000, 0xfff8007f }, + { 0x0410, 0x0000, 0x00000000, 0x0000ffff }, + { 0x0414, 0x0000, 0x00000000, 0xffffffff }, + { 0x0418, 0x0000, 0x00000000, 0x0000ffff }, + { 0x041c, 0x0000, 0x00000000, 0xffffffff }, + { 0x0420, 0x0000, 0x00000000, 0x0000ffff }, + { 0x0424, 0x0000, 0x00000000, 0xffffffff }, + { 0x0428, 0x0000, 0x00000000, 0x0000ffff }, + { 0x042c, 0x0000, 0x00000000, 0xffffffff }, + { 0x0430, 0x0002, 0x00000000, 0xffffffff }, + { 0x0430, 0x0001, 0x00000000, 0x0fff03ff }, /* 5705 */ + { 0x0434, 0x0002, 0x00000000, 0x0fffffff }, + { 0x0434, 0x0001, 0x00000000, 0x000001ff }, /* 5705 */ + { 0x043c, 0x0000, 0x00000000, 0x0000ffff }, + { 0x0454, 0x0000, 0x00000000, 0x00000010 }, + { 0x045c, 0x0000, 0x00000000, 0x00000070 }, + { 0x0464, 0x0000, 0x00000000, 0x00003fff }, + { 0x0468, 0x0002, 0x00000000, 0x000007fc }, + { 0x0468, 0x0001, 0x00000000, 0x000007dc }, /* 5705 */ + { 0x0470, 0x0000, 0x00000000, 0xffffffff }, + { 0x0474, 0x0000, 0x00000000, 0xffffffff }, + { 0x0478, 0x0000, 0x00000000, 0xffffffff }, + { 0x047c, 0x0000, 0x00000000, 0xffffffff }, + { 0x0480, 0x0002, 0x00000000, 0xffffffff }, + { 0x0480, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x0484, 0x0000, 0x00000000, 0xffffffff }, + { 0x0488, 0x0002, 0x00000000, 0xffffffff }, + { 0x0488, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x048c, 0x0000, 0x00000000, 0xffffffff }, + { 0x0490, 0x0002, 0x00000000, 0xffffffff }, + { 0x0490, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x0494, 0x0000, 0x00000000, 0xffffffff }, + { 0x0498, 0x0002, 0x00000000, 0xffffffff }, + { 0x0498, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x049c, 0x0000, 0x00000000, 0xffffffff }, + { 0x04a0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04a0, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x04a4, 0x0000, 0x00000000, 0xffffffff }, + { 0x04a8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04a8, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x04ac, 0x0000, 0x00000000, 0xffffffff }, + { 0x04b0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04b0, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x04b4, 0x0000, 0x00000000, 0xffffffff }, + { 0x04b8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04b8, 0x0001, 0x00000000, 0xe7ffffff }, /* 5705 */ + { 0x04bc, 0x0000, 0x00000000, 0xffffffff }, + { 0x04c0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04c4, 0x0002, 0x00000000, 0xffffffff }, + { 0x04c8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04cc, 0x0002, 0x00000000, 0xffffffff }, + { 0x04d0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04d4, 0x0002, 0x00000000, 0xffffffff }, + { 0x04d8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04dc, 0x0002, 0x00000000, 0xffffffff }, + { 0x04e0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04e4, 0x0002, 0x00000000, 0xffffffff }, + { 0x04e8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04ec, 0x0002, 0x00000000, 0xffffffff }, + { 0x04f0, 0x0002, 0x00000000, 0xffffffff }, + { 0x04f4, 0x0002, 0x00000000, 0xffffffff }, + { 0x04f8, 0x0002, 0x00000000, 0xffffffff }, + { 0x04fc, 0x0002, 0x00000000, 0xffffffff }, + { 0x0500, 0x0002, 0x00000000, 0x000000f8 }, + { 0x0500, 0x0001, 0x00000000, 0x00000008 }, /* 5705 */ + + /* Send Data Initiator Control Registers */ + { 0x0c00, 0x0000, 0x00000000, 0x00000006 }, + { 0x0c04, 0x0000, 0x00000004, 0x00000000 }, + { 0x0c08, 0x0000, 0x00000000, 0x0000001b }, + { 0x0c0c, 0x0002, 0x00000000, 0x00ffffff }, + { 0x0c0c, 0x0001, 0x00000000, 0x00000001 }, + { 0x0c80, 0x0000, 0x000003ff, 0x00000000 }, + { 0x0c84, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c88, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c8c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c90, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c94, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c98, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0c9c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0ca0, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0ca4, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0ca8, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cac, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cb0, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cb4, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cb8, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cbc, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cc0, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cc4, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cc8, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0ccc, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cd0, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cd4, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cd8, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0cdc, 0x0002, 0x000003ff, 0x00000000 }, + { 0x0ce0, 0x0001, 0x00000000, 0xffffffff }, /* 5705 */ + { 0x0ce4, 0x0001, 0x00000000, 0xffffffff }, /* 5705 */ + { 0x0ce8, 0x0001, 0x00000000, 0x00ffffff }, /* 5705 */ + { 0x0cec, 0x0001, 0x00000000, 0x000efcf7 }, /* 5705 */ + { 0x0cf0, 0x0001, 0x00000000, 0x0000ffff }, /* 5705 */ + { 0x0cf4, 0x0001, 0x00000000, 0x20000000 }, /* 5705 */ + + /* SDC Control Registers */ + { 0x1000, 0x0000, 0x00000000, 0x00000002 }, + { 0x1008, 0x0001, 0x00000000, 0x40000000 }, /* 5705 */ + + /* Send BD Ring Selector Control Registers. */ + { 0x1400, 0x0000, 0x00000000, 0x00000006 }, + { 0x1404, 0x0000, 0x00000004, 0x00000000 }, + { 0x1408, 0x0000, 0x0000ffff, 0x00000000 }, + { 0x1440, 0x0000, 0x0000000f, 0x00000000 }, + { 0x1444, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1448, 0x0002, 0x0000000f, 0x00000000 }, + { 0x144c, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1450, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1454, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1458, 0x0002, 0x0000000f, 0x00000000 }, + { 0x145c, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1460, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1464, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1468, 0x0002, 0x0000000f, 0x00000000 }, + { 0x146c, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1470, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1474, 0x0002, 0x0000000f, 0x00000000 }, + { 0x1478, 0x0002, 0x0000000f, 0x00000000 }, + { 0x147c, 0x0002, 0x0000000f, 0x00000000 }, + + /* Send BD Inititor Control Registers.*/ + { 0x1800, 0x0000, 0x00000000, 0x00000006 }, + { 0x1804, 0x0000, 0x00000004, 0x00000000 }, + { 0x1808, 0x0000, 0xffffffff, 0x00000000 }, + { 0x180c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1810, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1814, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1818, 0x0002, 0xffffffff, 0x00000000 }, + { 0x181c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1820, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1824, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1828, 0x0002, 0xffffffff, 0x00000000 }, + { 0x182c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1830, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1834, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1838, 0x0002, 0xffffffff, 0x00000000 }, + { 0x183c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1840, 0x0002, 0xffffffff, 0x00000000 }, + { 0x1844, 0x0002, 0xffffffff, 0x00000000 }, + + /* Send BD Completion Control Registers */ + { 0x1c00, 0x0000, 0x00000000, 0x00000002 }, + + /* Receive List Placement Control Registers. */ + { 0x2000, 0x0000, 0x00000000, 0x0000001e }, + { 0x2004, 0x0000, 0x0000001c, 0x00000000 }, + { 0x2010, 0x0002, 0x00000000, 0x00007fff }, + { 0x2010, 0x0001, 0x00000000, 0x000060ff }, /* 5705 */ + { 0x2014, 0x0000, 0x00000000, 0x00000001 }, + { 0x2200, 0x0000, 0x000003ff, 0x00000000 }, + { 0x2204, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2208, 0x0002, 0x000003ff, 0x00000000 }, + { 0x220c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2210, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2214, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2218, 0x0002, 0x000003ff, 0x00000000 }, + { 0x221c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2220, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2224, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2228, 0x0002, 0x000003ff, 0x00000000 }, + { 0x222c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2230, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2234, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2238, 0x0002, 0x000003ff, 0x00000000 }, + { 0x223c, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2240, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2244, 0x0002, 0x000003ff, 0x00000000 }, + { 0x2248, 0x0002, 0x000003ff, 0x00000000 }, + { 0x224c, 0x0000, 0x000003ff, 0x00000000 }, + { 0x2250, 0x0000, 0x000003ff, 0x00000000 }, + { 0x2254, 0x0000, 0x000003ff, 0x00000000 }, + { 0x2258, 0x0002, 0x000003ff, 0x00000000 }, + + /* Receive Data and Receive BD Initiator Control Registers. */ + { 0x2400, 0x0002, 0x00000000, 0x0000001e }, + { 0x2400, 0x0001, 0x00000000, 0x0000001a }, /* 5705 */ + { 0x2404, 0x0000, 0x0000001c, 0x00000000 }, + { 0x2408, 0x0002, 0x00000000, 0x0000ffff }, + { 0x2440, 0x0002, 0x00000000, 0xffffffff }, + { 0x2444, 0x0002, 0x00000000, 0xffffffff }, + { 0x2448, 0x0002, 0x00000000, 0x00000003 }, + { 0x244c, 0x0002, 0x00000000, 0xffffffff }, + { 0x2450, 0x0000, 0x00000000, 0xffffffff }, + { 0x2454, 0x0000, 0x00000000, 0xffffffff }, + { 0x2458, 0x0000, 0x00000000, 0xffff0002 }, + { 0x245c, 0x0000, 0x00000000, 0xffffffff }, + { 0x2470, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2474, 0x0000, 0xffffffff, 0x00000000 }, + { 0x2478, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2480, 0x0000, 0xffffffff, 0x00000000 }, + { 0x2484, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2488, 0x0002, 0xffffffff, 0x00000000 }, + { 0x248c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2490, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2494, 0x0002, 0xffffffff, 0x00000000 }, + { 0x2498, 0x0002, 0xffffffff, 0x00000000 }, + { 0x249c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24a0, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24a4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24a8, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24ac, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24b0, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24b4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24b8, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24bc, 0x0002, 0xffffffff, 0x00000000 }, + { 0x24c0, 0x0000, 0xffffffff, 0x00000000 }, + + /* Receive Data Completion Control Registers */ + { 0x2800, 0x0000, 0x00000000, 0x00000002 }, + + /* Receive BD Initiator Control Registers. */ + { 0x2c00, 0x0000, 0x00000000, 0x00000006 }, + { 0x2c04, 0x0000, 0x00000004, 0x00000000 }, + { 0x2c18, 0x0002, 0x00000000, 0xffffffff }, + { 0x2c18, 0x0001, 0x00000000, 0x000003ff }, /* 5705 */ + { 0x2c1c, 0x0002, 0x00000000, 0xffffffff }, + + /* Receive BD Completion Control Registers. */ + { 0x3000, 0x0000, 0x00000000, 0x00000006 }, + { 0x3004, 0x0000, 0x00000004, 0x00000000 }, + { 0x3008, 0x0002, 0x00000000, 0x000000ff }, + { 0x300c, 0x0000, 0x00000000, 0x000001ff }, + + /* Host Coalescing Control Registers. */ + { 0x3c00, 0x0002, 0x00000000, 0x00000004 }, + { 0x3c00, 0x0001, 0x00000000, 0x000000f6 }, /* 5705 */ + { 0x3c04, 0x0000, 0x00000004, 0x00000000 }, + { 0x3c08, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c08, 0x0001, 0x00000000, 0x000003ff }, /* 5705 */ + { 0x3c0c, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c0c, 0x0001, 0x00000000, 0x000003ff }, /* 5705 */ + { 0x3c10, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c10, 0x0005, 0x00000000, 0x000000ff }, /* 5705 */ + { 0x3c14, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c14, 0x0005, 0x00000000, 0x000000ff }, /* 5705 */ + { 0x3c18, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c1c, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c20, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c20, 0x0005, 0x00000000, 0x000000ff }, /* 5705 */ + { 0x3c24, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c24, 0x0005, 0x00000000, 0x000000ff }, /* 5705 */ + { 0x3c28, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c30, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c34, 0x0002, 0x00000000, 0xffffffff }, + { 0x3c38, 0x0000, 0x00000000, 0xffffffff }, + { 0x3c3c, 0x0000, 0x00000000, 0xffffffff }, + { 0x3c40, 0x0000, 0xffffffff, 0x00000000 }, + { 0x3c44, 0x0000, 0xffffffff, 0x00000000 }, + { 0x3c50, 0x0002, 0x00000000, 0x000000ff }, + { 0x3c54, 0x0000, 0x00000000, 0x000000ff }, + { 0x3c80, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c80, 0x0001, 0x00000000, 0x000001ff }, /* 5705 */ + { 0x3c84, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c88, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c8c, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c90, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c94, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c98, 0x0002, 0x00000000, 0x000007ff }, + { 0x3c9c, 0x0002, 0x00000000, 0x000007ff }, + { 0x3ca0, 0x0002, 0x00000000, 0x000007ff }, + { 0x3ca4, 0x0002, 0x00000000, 0x000007ff }, + { 0x3ca8, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cac, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cb0, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cb4, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cb8, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cbc, 0x0002, 0x00000000, 0x000007ff }, + { 0x3cc0, 0x0000, 0x00000000, 0x000001ff }, + { 0x3cc4, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cc8, 0x0002, 0x00000000, 0x000001ff }, + { 0x3ccc, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cd0, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cd4, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cd8, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cdc, 0x0002, 0x00000000, 0x000001ff }, + { 0x3ce0, 0x0002, 0x00000000, 0x000001ff }, + { 0x3ce4, 0x0002, 0x00000000, 0x000001ff }, + { 0x3ce8, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cec, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cf0, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cf4, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cf8, 0x0002, 0x00000000, 0x000001ff }, + { 0x3cfc, 0x0002, 0x00000000, 0x000001ff }, + + /* Memory Arbiter Registers */ + { 0x4000, 0x0002, 0x00000000, 0x001ffffe }, + { 0x4000, 0x0001, 0x00000000, 0x38111e7e }, + { 0x4004, 0x0002, 0x001ffffc, 0x00000000 }, + { 0x4004, 0x0002, 0x00111dfc, 0x00000000 }, + { 0x4008, 0x0000, 0x00000000, 0x001fffff }, + { 0x400c, 0x0000, 0x00000000, 0x001fffff }, + + /* Buffer Manager Control Registers. */ + { 0x4400, 0x0000, 0x00000000, 0x0000001c }, + { 0x4404, 0x0000, 0x00000014, 0x00000000 }, + { 0x4408, 0x0000, 0x00000000, 0x007fff80 }, + { 0x440c, 0x0000, 0x00000000, 0x007fffff }, + { 0x4410, 0x0000, 0x00000000, 0x0000003f }, + { 0x4414, 0x0000, 0x00000000, 0x000001ff }, + { 0x4418, 0x0000, 0x00000000, 0x000001ff }, + { 0x4420, 0x0000, 0xffffffff, 0x00000000 }, + { 0x4428, 0x0002, 0xffffffff, 0x00000000 }, + { 0x442c, 0x0002, 0xffffffff, 0x00000000 }, + { 0x4430, 0x0002, 0xffffffff, 0x00000000 }, + { 0x4440, 0x0002, 0xffffffff, 0x00000000 }, + { 0x4448, 0x0002, 0xffffffff, 0x00000000 }, + { 0x444c, 0x0000, 0xffffffff, 0x00000000 }, + { 0x4450, 0x0000, 0xffffffff, 0x00000000 }, + { 0x4454, 0x0000, 0xffffffff, 0x00000000 }, + { 0x4458, 0x0001, 0x00000000, 0x000001ff }, /* 5705 */ + + { 0x4800, 0x0002, 0x00000000, 0x000003fe }, + { 0x4800, 0x0001, 0x00000000, 0xc00003fe }, /* 5705 */ + { 0x4804, 0x0000, 0x000003fc, 0x00000000 }, + { 0x4c00, 0x0002, 0x00000000, 0x000003fc }, + { 0x4c00, 0x0001, 0x00000000, 0x000007fc }, /* 5705 */ + { 0x4c04, 0x0000, 0x000003fc, 0x00000000 }, + + /* Mailbox Registers */ + { 0x5804, 0x0000, 0x00000000, 0xffffffff }, + { 0x586c, 0x0000, 0x00000000, 0x000001ff }, + { 0x5874, 0x0002, 0x00000000, 0x000001ff }, + { 0x5884, 0x0000, 0x00000000, 0x000007ff }, + { 0x5904, 0x0000, 0x00000000, 0x000001ff }, + { 0x5984, 0x0002, 0x00000000, 0x000001ff }, + { 0x5a04, 0x0000, 0x00000000, 0xffffffff }, + { 0x5a0c, 0x0000, 0x00000000, 0xffffffff }, + + /* Flow Through Queues. */ + { 0x5c14, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c24, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c34, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c44, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c54, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c64, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c74, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c84, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5c94, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5ca4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5cb4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5cc4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5cd4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5ce4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5cf4, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5d04, 0x0002, 0xffffffff, 0x00000000 }, + { 0x5d14, 0x0002, 0xffffffff, 0x00000000 }, + { 0xffff, 0x0000, 0x00000000, 0x00000000 }, + }; + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)){ + bcm5705 = 1; + } + else { + bcm5705 = 0; + } + + ret = 1; + for (i = 0; reg_tbl[i].offset != 0xffff; i++) { + if (bcm5705 && (reg_tbl[i].flags & NOT_FOR_BCM5705)) + continue; + if (!bcm5705 && (reg_tbl[i].flags & BCM5705_ONLY)) + continue; + if ((pDevice->Flags & BCM5788_FLAG) && + (reg_tbl[i].flags & NOT_FOR_BCM5788)) + continue; + offset = (LM_UINT32) reg_tbl[i].offset; + read_mask = reg_tbl[i].read_mask; + write_mask = reg_tbl[i].write_mask; + + /* Save the original register content */ + save_val = LM_RegRd(pDevice, offset); + + /* Determine the read-only value. */ + read_val = save_val & read_mask; + + /* Write zero to the register, then make sure the read-only bits + are not changed and the read/write bits are all zeros. */ + LM_RegWr(pDevice, offset, 0, FALSE); + + val = LM_RegRd(pDevice, offset); + + /* Test the read-only and read/write bits. */ + if (((val & read_mask) != read_val) || + (val & write_mask)) { + + ret = 0; + LM_RegWr(pDevice, offset, save_val, FALSE); + break; + } + + + /* Write ones to all the bits defined by RdMask and WrMask, then + make sure the read-only bits are not changed and the + read/write bits are all ones. */ + LM_RegWr(pDevice, offset, read_mask | write_mask, FALSE); + + val = LM_RegRd(pDevice, offset); + + /* Test the read-only bits. */ + if ((val & read_mask) != read_val) { + ret = 0; + LM_RegWr(pDevice, offset, save_val, FALSE); + break; + } + + /* Test the read/write bits. */ + if ((val & write_mask) != write_mask) { + ret = 0; + LM_RegWr(pDevice, offset, save_val, FALSE); + break; + } + + LM_RegWr(pDevice, offset, save_val, FALSE); + } + + return ret; +} + + +/* Returns 1 on success, 0 on failure */ +int +b57_do_memory_test(LM_DEVICE_BLOCK *pDevice, LM_UINT32 start, LM_UINT32 size) +{ + const LM_UINT32 test_pattern[] = { 0x00000000, 0xffffffff, 0x55555555, + 0xaaaaaaaa , 0xaa55aa55, 0x55aa55aa }; + LM_UINT32 offset; + int i; + + for (i = 0; i < sizeof(test_pattern)/sizeof(LM_UINT32); i++) { + for (offset = 0; offset < size; offset += 4) { + + LM_MemWrInd(pDevice, start + offset, test_pattern[i]); + + if (LM_MemRdInd(pDevice, start + offset) != + test_pattern[i]) { + return 0; + } + } + } + return 1; +} + +/* Returns 1 on success, 0 on failure */ +int +b57_test_memory(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + int ret = 0; + int i; + mem_entry_t *mem_tbl; + + static mem_entry_t mem_tbl_570x[] = { + { 0x00000000, 0x01000}, + { 0x00002000, 0x1c000}, + { 0xffffffff, 0x00000} + }; + static mem_entry_t mem_tbl_5705[] = { + { 0x00000100, 0x0000c}, + { 0x00000200, 0x00008}, + { 0x00000b50, 0x00400}, + { 0x00004000, 0x00800}, + { 0x00006000, 0x01000}, + { 0x00008000, 0x02000}, + { 0x00010000, 0x0e000}, + { 0xffffffff, 0x00000} + }; + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)){ + mem_tbl = mem_tbl_5705; + } + else { + mem_tbl = mem_tbl_570x; + } + for (i = 0; mem_tbl[i].offset != 0xffffffff; i++) { + if ((ret = b57_do_memory_test(pDevice, mem_tbl[i].offset, + mem_tbl[i].len)) == 0) { + return ret; + } + } + + return ret; +} + +#define EEPROM_SIZE 0x100 + +/* Returns 1 on success, 0 on failure */ +int +b57_test_nvram(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + LM_UINT32 buf[EEPROM_SIZE/4]; + LM_UINT8 *pdata = (LM_UINT8 *) buf; + int i; + LM_UINT32 magic, csum; + + for (i = 0; i < EEPROM_SIZE; i += 4) { + if (LM_NvramRead(pDevice, i, (LM_UINT32 *) (pdata + i)) != + LM_STATUS_SUCCESS) { + break; + } + } + if (i < EEPROM_SIZE) { + return 0; + } + + magic = MM_SWAP_BE32(buf[0]); + if (magic != 0x669955aa) { + return 0; + } + + csum = ComputeCrc32(pdata, 16); + if(csum != MM_SWAP_LE32(buf[0x10/4])) { + return 0; + } + + csum = ComputeCrc32(&pdata[0x74], 136); + if (csum != MM_SWAP_LE32(buf[0xfc/4])) { + return 0; + } + + return 1; +} + +/* Returns 1 on success, 0 on failure */ +int +b57_test_link(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + LM_UINT32 phy_reg; + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + if (REG_RD(pDevice, MacCtrl.Status) & + (MAC_STATUS_PCS_SYNCED | MAC_STATUS_SIGNAL_DETECTED)) { + return 1; + } + return 0; + } + LM_ReadPhy(pDevice, PHY_STATUS_REG, &phy_reg); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &phy_reg); + if (phy_reg & PHY_STATUS_LINK_PASS) + return 1; + return 0; +} + +#endif + +#if defined(ETHTOOL_TEST) || defined(NICE_SUPPORT) + +#if (LINUX_VERSION_CODE < 0x020605) +#define pci_dma_sync_single_for_cpu pci_dma_sync_single +#endif + +/* Returns 1 on success, 0 on failure */ +int +b57_test_loopback(UM_DEVICE_BLOCK *pUmDevice, int testtype, int linespeed) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + struct sk_buff *skb, *rx_skb; + unsigned char *packet; + dma_addr_t map; + LM_UINT32 value32; + LM_UINT32 send_idx, rx_start_idx, rx_idx; + int num_pkts, pkt_size, i, ret; + LM_PACKET *pPacket; + UM_PACKET *pUmPacket; + T3_SND_BD *pSendBd; + T3_RCV_BD *pRcvBd; + + ret = 0; + if (!pUmDevice->opened) + return ret; + LM_ResetAdapter(pDevice); + LM_HaltCpu(pDevice,T3_RX_CPU_ID | T3_TX_CPU_ID); + switch (testtype) { + case NICE_LOOPBACK_TESTTYPE_MAC: + LM_EnableMacLoopBack(pDevice); + break; + case NICE_LOOPBACK_TESTTYPE_PHY: + LM_EnablePhyLoopBack(pDevice); + break; + case NICE_LOOPBACK_TESTTYPE_EXT: + LM_EnableExtLoopBack(pDevice, linespeed); + + /* Wait 4 seconds for link to come up. */ + for (i = 0; i < 4; i++) { + LM_ReadPhy(pDevice, PHY_STATUS_REG, &value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &value32); + if (value32 & PHY_STATUS_LINK_PASS) { + LM_SetupPhy(pDevice); + break; + } + MM_Sleep(pDevice,1000); + } + if (!(value32 & PHY_STATUS_LINK_PASS)) + return ret; + } + pkt_size = 1514; + skb = dev_alloc_skb(pkt_size); + packet = skb_put(skb, pkt_size); + memcpy(packet, pDevice->NodeAddress, 6); + memset(packet + 6, 0x0, 8); + + for (i = 14; i < pkt_size; i++) + packet[i] = (unsigned char) (i & 0xff); + + map = pci_map_single(pUmDevice->pdev, skb->data, pkt_size, + PCI_DMA_TODEVICE); + + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + MM_Wait(10); + rx_start_idx = pDevice->pStatusBlkVirt->Idx[0].RcvProdIdx; + + send_idx = 0; + num_pkts = 0; + pSendBd = &pDevice->pSendBdVirt[send_idx]; + if (pDevice->Flags & NIC_SEND_BD_FLAG) { + T3_64BIT_HOST_ADDR HostAddr; + + MM_SetT3Addr(&HostAddr, map); + MM_MEMWRITEL(&(pSendBd->HostAddr.High), HostAddr.High); + MM_MEMWRITEL(&(pSendBd->HostAddr.Low), HostAddr.Low); + MM_MEMWRITEL(&(pSendBd->u1.Len_Flags), + (pkt_size << 16) | SND_BD_FLAG_END); + send_idx++; + num_pkts++; + MB_REG_WR(pDevice, Mailbox.SendNicProdIdx[0].Low, send_idx); + if (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) { + MB_REG_WR(pDevice, Mailbox.SendNicProdIdx[0].Low, + send_idx); + } + MB_REG_RD(pDevice, Mailbox.SendNicProdIdx[0].Low); + } + else { + MM_SetT3Addr(&pSendBd->HostAddr, map); + pSendBd->u1.Len_Flags = (pkt_size << 16) | SND_BD_FLAG_END; + MM_WMB(); + send_idx++; + num_pkts++; + MB_REG_WR(pDevice, Mailbox.SendHostProdIdx[0].Low, send_idx); + if (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) { + MB_REG_WR(pDevice, Mailbox.SendHostProdIdx[0].Low, + send_idx); + } + MB_REG_RD(pDevice, Mailbox.SendHostProdIdx[0].Low); + } + + MM_Wait(100); + + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + + MM_Sleep(pDevice, 1000); + + pci_unmap_single(pUmDevice->pdev, map, pkt_size, PCI_DMA_TODEVICE); + dev_kfree_skb_irq(skb); + + if (pDevice->pStatusBlkVirt->Idx[0].SendConIdx != send_idx) { + goto loopback_test_done; + } + + rx_idx = pDevice->pStatusBlkVirt->Idx[0].RcvProdIdx; + if (rx_idx != rx_start_idx + num_pkts) { + goto loopback_test_done; + } + + pRcvBd = &pDevice->pRcvRetBdVirt[rx_start_idx]; + pPacket = (PLM_PACKET) (MM_UINT_PTR(pDevice->pPacketDescBase) + + MM_UINT_PTR(pRcvBd->Opaque)); + + pUmPacket = (UM_PACKET *) pPacket; + + if (pRcvBd->ErrorFlag && + pRcvBd->ErrorFlag != RCV_BD_ERR_ODD_NIBBLED_RCVD_MII) { + goto loopback_test_done; + } + if ((pRcvBd->Len - 4) != pkt_size) { + goto loopback_test_done; + } + rx_skb = pUmPacket->skbuff; + + pci_dma_sync_single_for_cpu(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[0]), + pPacket->u.Rx.RxBufferSize, + PCI_DMA_FROMDEVICE); + + for (i = 14; i < pkt_size; i++) { + if (*(rx_skb->data + i) != (unsigned char) (i & 0xff)) { + goto loopback_test_done; + } + } + ret = 1; + +loopback_test_done: + switch (testtype) { + case NICE_LOOPBACK_TESTTYPE_MAC: + LM_DisableMacLoopBack(pDevice); + break; + case NICE_LOOPBACK_TESTTYPE_PHY: + LM_DisablePhyLoopBack(pDevice); + break; + case NICE_LOOPBACK_TESTTYPE_EXT: + LM_DisableExtLoopBack(pDevice); + break; + } + return ret; +} +#endif + diff --git a/drivers/net/bcm5700/b57proc.c b/drivers/net/bcm5700/b57proc.c new file mode 100644 index 000000000..fd3bce41f --- /dev/null +++ b/drivers/net/bcm5700/b57proc.c @@ -0,0 +1,482 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* /proc file system handling code. */ +/* */ +/******************************************************************************/ + +#include "mm.h" +#ifdef BCM_PROC_FS + +#define NICINFO_PROC_DIR "nicinfo" + +static struct proc_dir_entry *bcm5700_procfs_dir; + +extern char bcm5700_driver[], bcm5700_version[]; +extern int bcm5700_open(struct net_device *dev); + +extern uint64_t bcm5700_crc_count(PUM_DEVICE_BLOCK pUmDevice); +extern uint64_t bcm5700_rx_err_count(PUM_DEVICE_BLOCK pUmDevice); + +static char *na_str = "n/a"; +static char *pause_str = "pause "; +static char *asym_pause_str = "asym_pause "; +static char *on_str = "on"; +static char *off_str = "off"; +static char *up_str = "up"; +static char *down_str = "down"; + +int bcm5700_proc_create_dev(struct net_device *dev); +int bcm5700_proc_remove_dev(struct net_device *dev); + +static int bcm5700_netdev_event(struct notifier_block * this, unsigned long event, void * ptr) +{ + struct net_device * event_dev = (struct net_device *)ptr; + + if (event == NETDEV_CHANGENAME) { + if (event_dev->open == bcm5700_open) { + bcm5700_proc_remove_dev(event_dev); + bcm5700_proc_create_dev(event_dev); + } + } + + return NOTIFY_DONE; +} + +static struct notifier_block bcm5700_netdev_notifier = { + .notifier_call = bcm5700_netdev_event +}; + +static struct proc_dir_entry * +proc_getdir(char *name, struct proc_dir_entry *proc_dir) +{ + struct proc_dir_entry *pde = proc_dir; + + lock_kernel(); + for (pde=pde->subdir; pde; pde = pde->next) { + if (pde->namelen && (strcmp(name, pde->name) == 0)) { + /* directory exists */ + break; + } + } + if (pde == (struct proc_dir_entry *) 0) + { + /* create the directory */ +#if (LINUX_VERSION_CODE > 0x20300) + pde = proc_mkdir(name, proc_dir); +#else + pde = create_proc_entry(name, S_IFDIR, proc_dir); +#endif + if (pde == (struct proc_dir_entry *) 0) { + unlock_kernel(); + return (pde); + } + } + unlock_kernel(); + return (pde); +} + +int +bcm5700_proc_create(void) +{ + bcm5700_procfs_dir = proc_getdir(NICINFO_PROC_DIR, proc_net); + + if (bcm5700_procfs_dir == (struct proc_dir_entry *) 0) { + printk(KERN_DEBUG "Could not create procfs nicinfo directory %s\n", NICINFO_PROC_DIR); + return -1; + } + register_netdevice_notifier(&bcm5700_netdev_notifier); + return 0; +} + +int +bcm5700_proc_remove_notifier(void) +{ + unregister_netdevice_notifier(&bcm5700_netdev_notifier); + return 0; +} + +void +b57_get_speed_adv(PUM_DEVICE_BLOCK pUmDevice, char *str) +{ + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + + if (pDevice->DisableAutoNeg == TRUE) { + strcpy(str, na_str); + return; + } + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + strcpy(str, "1000full"); + return; + } + if (pDevice->PhyFlags & PHY_IS_FIBER) { + if (pDevice->RequestedDuplexMode != LM_DUPLEX_MODE_HALF) + strcpy(str, "1000full"); + else + strcpy(str, "1000half"); + return; + } + str[0] = 0; + if (pDevice->advertising & PHY_AN_AD_10BASET_HALF) { + strcat(str, "10half "); + } + if (pDevice->advertising & PHY_AN_AD_10BASET_FULL) { + strcat(str, "10full "); + } + if (pDevice->advertising & PHY_AN_AD_100BASETX_HALF) { + strcat(str, "100half "); + } + if (pDevice->advertising & PHY_AN_AD_100BASETX_FULL) { + strcat(str, "100full "); + } + if (pDevice->advertising1000 & BCM540X_AN_AD_1000BASET_HALF) { + strcat(str, "1000half "); + } + if (pDevice->advertising1000 & BCM540X_AN_AD_1000BASET_FULL) { + strcat(str, "1000full "); + } +} + +void +b57_get_fc_adv(PUM_DEVICE_BLOCK pUmDevice, char *str) +{ + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + + if (pDevice->DisableAutoNeg == TRUE) { + strcpy(str, na_str); + return; + } + str[0] = 0; + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + if(pDevice->DisableAutoNeg == FALSE || + pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) { + if (pDevice->FlowControlCap & + LM_FLOW_CONTROL_RECEIVE_PAUSE) { + + strcpy(str, pause_str); + if (!(pDevice->FlowControlCap & + LM_FLOW_CONTROL_TRANSMIT_PAUSE)) { + + strcpy(str, asym_pause_str); + } + } + else if (pDevice->FlowControlCap & + LM_FLOW_CONTROL_TRANSMIT_PAUSE) { + + strcpy(str, asym_pause_str); + } + } + return; + } + if (pDevice->advertising & PHY_AN_AD_PAUSE_CAPABLE) { + strcat(str, pause_str); + } + if (pDevice->advertising & PHY_AN_AD_ASYM_PAUSE) { + strcat(str, asym_pause_str); + } +} + +int +bcm5700_read_pfs(char *page, char **start, off_t off, int count, + int *eof, void *data) +{ + struct net_device *dev = (struct net_device *) data; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + PT3_STATS_BLOCK pStats = (PT3_STATS_BLOCK) pDevice->pStatsBlkVirt; + int len = 0; + unsigned long rx_mac_errors, rx_crc_errors, rx_align_errors; + unsigned long rx_runt_errors, rx_frag_errors, rx_long_errors; + unsigned long rx_overrun_errors, rx_jabber_errors; + char str[64]; + + if (pUmDevice->opened == 0) + pStats = 0; + + len += sprintf(page+len, "Description\t\t\t%s\n", pUmDevice->name); + len += sprintf(page+len, "Driver_Name\t\t\t%s\n", bcm5700_driver); + len += sprintf(page+len, "Driver_Version\t\t\t%s\n", bcm5700_version); + len += sprintf(page+len, "Bootcode_Version\t\t%s\n", pDevice->BootCodeVer); + if( pDevice->IPMICodeVer[0] != 0 ) + len += sprintf(page+len, "ASF_IPMI_Version\t\t%s\n", pDevice->IPMICodeVer); + len += sprintf(page+len, "PCI_Vendor\t\t\t0x%04x\n", pDevice->PciVendorId); + len += sprintf(page+len, "PCI_Device_ID\t\t\t0x%04x\n", + pDevice->PciDeviceId); + len += sprintf(page+len, "PCI_Subsystem_Vendor\t\t0x%04x\n", + pDevice->SubsystemVendorId); + len += sprintf(page+len, "PCI_Subsystem_ID\t\t0x%04x\n", + pDevice->SubsystemId); + len += sprintf(page+len, "PCI_Revision_ID\t\t\t0x%02x\n", + pDevice->PciRevId); + len += sprintf(page+len, "PCI_Slot\t\t\t%d\n", + PCI_SLOT(pUmDevice->pdev->devfn)); + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + len += sprintf(page+len, "PCI_Function\t\t\t%d\n", + pDevice->FunctNum); + } + len += sprintf(page+len, "PCI_Bus\t\t\t\t%d\n", + pUmDevice->pdev->bus->number); + + len += sprintf(page+len, "PCI_Bus_Speed\t\t\t%s\n", + pDevice->BusSpeedStr); + + len += sprintf(page+len, "Memory\t\t\t\t0x%lx\n", pUmDevice->dev->base_addr); + len += sprintf(page+len, "IRQ\t\t\t\t%d\n", dev->irq); + len += sprintf(page+len, "System_Device_Name\t\t%s\n", dev->name); + len += sprintf(page+len, "Current_HWaddr\t\t\t%02x:%02x:%02x:%02x:%02x:%02x\n", + dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], + dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); + len += sprintf(page+len, + "Permanent_HWaddr\t\t%02x:%02x:%02x:%02x:%02x:%02x\n", + pDevice->NodeAddress[0], pDevice->NodeAddress[1], + pDevice->NodeAddress[2], pDevice->NodeAddress[3], + pDevice->NodeAddress[4], pDevice->NodeAddress[5]); + len += sprintf(page+len, "Part_Number\t\t\t%s\n\n", pDevice->PartNo); + + len += sprintf(page+len, "Link\t\t\t\t%s\n", + (pUmDevice->opened == 0) ? "unknown" : + ((pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE) ? up_str : + down_str)); + len += sprintf(page+len, "Auto_Negotiate\t\t\t%s\n", + (pDevice->DisableAutoNeg == TRUE) ? off_str : on_str); + b57_get_speed_adv(pUmDevice, str); + len += sprintf(page+len, "Speed_Advertisement\t\t%s\n", str); + b57_get_fc_adv(pUmDevice, str); + len += sprintf(page+len, "Flow_Control_Advertisement\t%s\n", str); + len += sprintf(page+len, "Speed\t\t\t\t%s\n", + ((pDevice->LinkStatus == LM_STATUS_LINK_DOWN) || + (pUmDevice->opened == 0)) ? na_str : + ((pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) ? "1000" : + ((pDevice->LineSpeed == LM_LINE_SPEED_100MBPS) ? "100" : + (pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) ? "10" : na_str))); + len += sprintf(page+len, "Duplex\t\t\t\t%s\n", + ((pDevice->LinkStatus == LM_STATUS_LINK_DOWN) || + (pUmDevice->opened == 0)) ? na_str : + ((pDevice->DuplexMode == LM_DUPLEX_MODE_FULL) ? "full" : + "half")); + len += sprintf(page+len, "Flow_Control\t\t\t%s\n", + ((pDevice->LinkStatus == LM_STATUS_LINK_DOWN) || + (pUmDevice->opened == 0)) ? na_str : + ((pDevice->FlowControl == LM_FLOW_CONTROL_NONE) ? off_str : + (((pDevice->FlowControl & LM_FLOW_CONTROL_RX_TX_PAUSE) == + LM_FLOW_CONTROL_RX_TX_PAUSE) ? "receive/transmit" : + (pDevice->FlowControl & LM_FLOW_CONTROL_RECEIVE_PAUSE) ? + "receive" : "transmit"))); + len += sprintf(page+len, "State\t\t\t\t%s\n", + (pUmDevice->suspended ? "suspended" : + ((dev->flags & IFF_UP) ? up_str : down_str))); + len += sprintf(page+len, "MTU_Size\t\t\t%d\n\n", dev->mtu); + len += sprintf(page+len, "Rx_Packets\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->ifHCInUcastPkts) + + MM_GETSTATS(pStats->ifHCInMulticastPkts) + + MM_GETSTATS(pStats->ifHCInBroadcastPkts))); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + if ((dev->mtu > 1500) && !T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) { + len += sprintf(page+len, "Rx_Jumbo_Packets\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS( + pStats->etherStatsPkts1523Octetsto2047Octets) + + MM_GETSTATS( + pStats->etherStatsPkts2048Octetsto4095Octets) + + MM_GETSTATS( + pStats->etherStatsPkts4096Octetsto8191Octets) + + MM_GETSTATS( + pStats->etherStatsPkts8192Octetsto9022Octets))); + } +#endif + len += sprintf(page+len, "Tx_Packets\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->ifHCOutUcastPkts) + + MM_GETSTATS(pStats->ifHCOutMulticastPkts) + + MM_GETSTATS(pStats->ifHCOutBroadcastPkts))); +#ifdef BCM_TSO + len += sprintf(page+len, "TSO_Large_Packets\t\t%lu\n", + pUmDevice->tso_pkt_count); +#endif + len += sprintf(page+len, "Rx_Bytes\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->ifHCInOctets))); + len += sprintf(page+len, "Tx_Bytes\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->ifHCOutOctets))); + if (pStats == 0) { + rx_crc_errors = 0; + rx_align_errors = 0; + rx_runt_errors = 0; + rx_frag_errors = 0; + rx_long_errors = 0; + rx_overrun_errors = 0; + rx_jabber_errors = 0; + } + else { + rx_crc_errors = (unsigned long) bcm5700_crc_count(pUmDevice); + rx_align_errors = MM_GETSTATS(pStats->dot3StatsAlignmentErrors); + rx_runt_errors = MM_GETSTATS(pStats->etherStatsUndersizePkts); + rx_frag_errors = MM_GETSTATS(pStats->etherStatsFragments); + rx_long_errors = MM_GETSTATS(pStats->dot3StatsFramesTooLong); + rx_overrun_errors = MM_GETSTATS(pStats->nicNoMoreRxBDs); + rx_jabber_errors = MM_GETSTATS(pStats->etherStatsJabbers); + } + rx_mac_errors = (unsigned long) bcm5700_rx_err_count(pUmDevice); + len += sprintf(page+len, "Rx_Errors\t\t\t%lu\n", + ((pStats == 0) ? 0 : + rx_mac_errors + rx_overrun_errors + pUmDevice->rx_misc_errors)); + len += sprintf(page+len, "Tx_Errors\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->ifOutErrors))); + len += sprintf(page+len, "\nTx_Carrier_Errors\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsCarrierSenseErrors))); + len += sprintf(page+len, "Tx_Abort_Excess_Coll\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsExcessiveCollisions))); + len += sprintf(page+len, "Tx_Abort_Late_Coll\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsLateCollisions))); + len += sprintf(page+len, "Tx_Deferred_Ok\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsDeferredTransmissions))); + len += sprintf(page+len, "Tx_Single_Coll_Ok\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsSingleCollisionFrames))); + len += sprintf(page+len, "Tx_Multi_Coll_Ok\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsMultipleCollisionFrames))); + len += sprintf(page+len, "Tx_Total_Coll_Ok\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->etherStatsCollisions))); + len += sprintf(page+len, "Tx_XON_Pause_Frames\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->outXonSent))); + len += sprintf(page+len, "Tx_XOFF_Pause_Frames\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->outXoffSent))); + len += sprintf(page+len, "\nRx_CRC_Errors\t\t\t%lu\n", rx_crc_errors); + len += sprintf(page+len, "Rx_Short_Fragment_Errors\t%lu\n", + rx_frag_errors); + len += sprintf(page+len, "Rx_Short_Length_Errors\t\t%lu\n", + rx_runt_errors); + len += sprintf(page+len, "Rx_Long_Length_Errors\t\t%lu\n", + rx_long_errors); + len += sprintf(page+len, "Rx_Align_Errors\t\t\t%lu\n", + rx_align_errors); + len += sprintf(page+len, "Rx_Overrun_Errors\t\t%lu\n", + rx_overrun_errors); + len += sprintf(page+len, "Rx_XON_Pause_Frames\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->xonPauseFramesReceived))); + len += sprintf(page+len, "Rx_XOFF_Pause_Frames\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->xoffPauseFramesReceived))); + len += sprintf(page+len, "\nTx_MAC_Errors\t\t\t%lu\n", + ((pStats == 0) ? 0 : + MM_GETSTATS(pStats->dot3StatsInternalMacTransmitErrors))); + len += sprintf(page+len, "Rx_MAC_Errors\t\t\t%lu\n\n", + rx_mac_errors); + + len += sprintf(page+len, "Tx_Checksum\t\t\t%s\n", + ((pDevice->TaskToOffload & LM_TASK_OFFLOAD_TX_TCP_CHECKSUM) ? + on_str : off_str)); + len += sprintf(page+len, "Rx_Checksum\t\t\t%s\n", + ((pDevice->TaskToOffload & LM_TASK_OFFLOAD_RX_TCP_CHECKSUM) ? + on_str : off_str)); + len += sprintf(page+len, "Scatter_Gather\t\t\t%s\n", +#if (LINUX_VERSION_CODE >= 0x20400) + ((dev->features & NETIF_F_SG) ? on_str : off_str)); +#else + off_str); +#endif +#ifdef BCM_TSO + len += sprintf(page+len, "TSO\t\t\t\t%s\n", + ((dev->features & NETIF_F_TSO) ? on_str : off_str)); +#endif + len += sprintf(page+len, "VLAN\t\t\t\t%s\n\n", + ((pDevice->RxMode & RX_MODE_KEEP_VLAN_TAG) ? off_str : on_str)); + +#ifdef BCM_NIC_SEND_BD + len += sprintf(page+len, "NIC_Tx_BDs\t\t\t%s\n", + (pDevice->Flags & NIC_SEND_BD_FLAG) ? on_str : off_str); +#endif + len += sprintf(page+len, "Tx_Desc_Count\t\t\t%u\n", + pDevice->TxPacketDescCnt); + len += sprintf(page+len, "Rx_Desc_Count\t\t\t%u\n", + pDevice->RxStdDescCnt); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + len += sprintf(page+len, "Rx_Jumbo_Desc_Count\t\t%u\n", + pDevice->RxJumboDescCnt); +#endif +#ifdef BCM_INT_COAL + len += sprintf(page+len, "Adaptive_Coalescing\t\t%s\n", + (pUmDevice->adaptive_coalesce ? on_str : off_str)); + len += sprintf(page+len, "Rx_Coalescing_Ticks\t\t%u\n", + pUmDevice->rx_curr_coalesce_ticks); + len += sprintf(page+len, "Rx_Coalesced_Frames\t\t%u\n", + pUmDevice->rx_curr_coalesce_frames); + len += sprintf(page+len, "Tx_Coalescing_Ticks\t\t%u\n", + pDevice->TxCoalescingTicks); + len += sprintf(page+len, "Tx_Coalesced_Frames\t\t%u\n", + pUmDevice->tx_curr_coalesce_frames); + len += sprintf(page+len, "Stats_Coalescing_Ticks\t\t%u\n", + pDevice->StatsCoalescingTicks); +#endif +#ifdef BCM_WOL + len += sprintf(page+len, "Wake_On_LAN\t\t\t%s\n", + ((pDevice->WakeUpMode & LM_WAKE_UP_MODE_MAGIC_PACKET) ? + on_str : off_str)); +#endif +#if TIGON3_DEBUG + len += sprintf(page+len, "\nDmaReadWriteCtrl\t\t%x\n", + pDevice->DmaReadWriteCtrl); + len += sprintf(page+len, "\nTx_Zero_Copy_Packets\t\t%u\n", + pUmDevice->tx_zc_count); + len += sprintf(page+len, "Tx_Chksum_Packets\t\t%u\n", + pUmDevice->tx_chksum_count); + len += sprintf(page+len, "Tx_Highmem_Fragments\t\t%u\n", + pUmDevice->tx_himem_count); + len += sprintf(page+len, "Rx_Good_Chksum_Packets\t\t%u\n", + pUmDevice->rx_good_chksum_count); + len += sprintf(page+len, "Rx_Bad_Chksum_Packets\t\t%u\n", + pUmDevice->rx_bad_chksum_count); + +#endif + + *eof = 1; + return len; +} + +int +bcm5700_proc_create_dev(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + + if (!bcm5700_procfs_dir) + return -1; + + sprintf(pUmDevice->pfs_name, "%s.info", dev->name); + pUmDevice->pfs_entry = create_proc_entry(pUmDevice->pfs_name, + S_IFREG, bcm5700_procfs_dir); + if (pUmDevice->pfs_entry == 0) + return -1; + pUmDevice->pfs_entry->read_proc = bcm5700_read_pfs; + pUmDevice->pfs_entry->data = dev; + return 0; +} +int +bcm5700_proc_remove_dev(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + + remove_proc_entry(pUmDevice->pfs_name, bcm5700_procfs_dir); + return 0; +} + +#endif diff --git a/drivers/net/bcm5700/b57um.c b/drivers/net/bcm5700/b57um.c new file mode 100644 index 000000000..d3f76adac --- /dev/null +++ b/drivers/net/bcm5700/b57um.c @@ -0,0 +1,5714 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2006 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/******************************************************************************/ + + +char bcm5700_driver[] = "bcm5700"; +char bcm5700_version[] = "8.3.17b"; +char bcm5700_date[] = "(02/21/06)"; + +#define B57UM +#include "mm.h" + +/* A few user-configurable values. */ + +#define MAX_UNITS 16 +/* Used to pass the full-duplex flag, etc. */ +static int line_speed[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +static int auto_speed[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int full_duplex[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int rx_flow_control[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int tx_flow_control[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int auto_flow_control[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +static int mtu[MAX_UNITS] = {1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500,1500}; /* Jumbo MTU for interfaces. */ +#endif +static int tx_checksum[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int rx_checksum[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +static int scatter_gather[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; + +#define TX_DESC_CNT DEFAULT_TX_PACKET_DESC_COUNT +static unsigned int tx_pkt_desc_cnt[MAX_UNITS] = + {TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT, + TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT, + TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT,TX_DESC_CNT, + TX_DESC_CNT}; + +#define RX_DESC_CNT DEFAULT_STD_RCV_DESC_COUNT +static unsigned int rx_std_desc_cnt[MAX_UNITS] = + {RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT, + RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT, + RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT,RX_DESC_CNT, + RX_DESC_CNT }; + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +#define JBO_DESC_CNT DEFAULT_JUMBO_RCV_DESC_COUNT +static unsigned int rx_jumbo_desc_cnt[MAX_UNITS] = + {JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT, + JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT, + JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT,JBO_DESC_CNT, + JBO_DESC_CNT }; +#endif + +#ifdef BCM_INT_COAL +#ifdef BCM_NAPI_RXPOLL +static unsigned int adaptive_coalesce[MAX_UNITS] = + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +#else +static unsigned int adaptive_coalesce[MAX_UNITS] = + {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +#endif + +#define RX_COAL_TK DEFAULT_RX_COALESCING_TICKS +static unsigned int rx_coalesce_ticks[MAX_UNITS] = + {RX_COAL_TK,RX_COAL_TK,RX_COAL_TK,RX_COAL_TK,RX_COAL_TK, + RX_COAL_TK, RX_COAL_TK,RX_COAL_TK,RX_COAL_TK,RX_COAL_TK, + RX_COAL_TK,RX_COAL_TK, RX_COAL_TK,RX_COAL_TK,RX_COAL_TK, + RX_COAL_TK}; + +#define RX_COAL_FM DEFAULT_RX_MAX_COALESCED_FRAMES +static unsigned int rx_max_coalesce_frames[MAX_UNITS] = + {RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM, + RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM, + RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM,RX_COAL_FM, + RX_COAL_FM}; + +#define TX_COAL_TK DEFAULT_TX_COALESCING_TICKS +static unsigned int tx_coalesce_ticks[MAX_UNITS] = + {TX_COAL_TK,TX_COAL_TK,TX_COAL_TK,TX_COAL_TK,TX_COAL_TK, + TX_COAL_TK, TX_COAL_TK,TX_COAL_TK,TX_COAL_TK,TX_COAL_TK, + TX_COAL_TK,TX_COAL_TK, TX_COAL_TK,TX_COAL_TK,TX_COAL_TK, + TX_COAL_TK}; + +#define TX_COAL_FM DEFAULT_TX_MAX_COALESCED_FRAMES +static unsigned int tx_max_coalesce_frames[MAX_UNITS] = + {TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM, + TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM, + TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM,TX_COAL_FM, + TX_COAL_FM}; + +#define ST_COAL_TK DEFAULT_STATS_COALESCING_TICKS +static unsigned int stats_coalesce_ticks[MAX_UNITS] = + {ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK, + ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK, + ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK,ST_COAL_TK, + ST_COAL_TK,}; + +#endif +#ifdef BCM_WOL +static int enable_wol[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +#endif +#ifdef BCM_TSO +static int enable_tso[MAX_UNITS] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; +#endif +#ifdef BCM_NIC_SEND_BD +static int nic_tx_bd[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +#endif +#ifdef BCM_ASF +static int vlan_tag_mode[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +#endif +static int delay_link[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +static int disable_d3hot[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) +static int disable_msi[MAX_UNITS] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +static int bcm_msi_chipset_bug = 0; +#endif + +#define BCM_TIMER_GRANULARITY (1000000 / HZ) + +/* Operational parameters that usually are not changed. */ +/* Time in jiffies before concluding the transmitter is hung. */ +#define TX_TIMEOUT (2*HZ) +/* RQM 289636: */ +#define BCM_TX_TIMEOUT (5*HZ) + +#if (LINUX_VERSION_CODE < 0x02030d) +#define pci_resource_start(dev, bar) (dev->base_address[bar] & PCI_BASE_ADDRESS_MEM_MASK) +#elif (LINUX_VERSION_CODE < 0x02032b) +#define pci_resource_start(dev, bar) (dev->resource[bar] & PCI_BASE_ADDRESS_MEM_MASK) +#endif + +#if (LINUX_VERSION_CODE < 0x02032b) +#define dev_kfree_skb_irq(skb) dev_kfree_skb(skb) +#define netif_wake_queue(dev) clear_bit(0, &dev->tbusy); mark_bh(NET_BH) +#define netif_stop_queue(dev) set_bit(0, &dev->tbusy) + +static inline void netif_start_queue(struct net_device *dev) +{ + dev->tbusy = 0; + dev->interrupt = 0; + dev->start = 1; +} + +#define netif_queue_stopped(dev) dev->tbusy +#define netif_running(dev) dev->start + +static inline void tasklet_schedule(struct tasklet_struct *tasklet) +{ + queue_task(tasklet, &tq_immediate); + mark_bh(IMMEDIATE_BH); +} + +static inline void tasklet_init(struct tasklet_struct *tasklet, + void (*func)(unsigned long), + unsigned long data) +{ + tasklet->next = NULL; + tasklet->sync = 0; + tasklet->routine = (void (*)(void *))func; + tasklet->data = (void *)data; +} + +#define tasklet_kill(tasklet) + +#endif + +#if (LINUX_VERSION_CODE < 0x020300) +struct pci_device_id { + unsigned int vendor, device; /* Vendor and device ID or PCI_ANY_ID */ + unsigned int subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ + unsigned int class, class_mask; /* (class,subclass,prog-if) triplet */ + unsigned long driver_data; /* Data private to the driver */ +}; + +#define PCI_ANY_ID 0 + +#define pci_set_drvdata(pdev, dev) +#define pci_get_drvdata(pdev) 0 + +#define pci_enable_device(pdev) 0 + +#define __devinit __init +#define __devinitdata __initdata +#define __devexit + +#define SET_MODULE_OWNER(dev) +#define MODULE_DEVICE_TABLE(pci, pci_tbl) + +#endif + +#if (LINUX_VERSION_CODE < 0x020411) +#ifndef __devexit_p +#define __devexit_p(x) x +#endif +#endif + +#ifndef MODULE_LICENSE +#define MODULE_LICENSE(license) +#endif + +#ifndef IRQ_RETVAL +typedef void irqreturn_t; +#define IRQ_RETVAL(x) +#endif + +#if (LINUX_VERSION_CODE < 0x02032a) +static inline void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, + dma_addr_t *dma_handle) +{ + void *virt_ptr; + + /* Maximum in slab.c */ + if (size > 131072) + return 0; + + virt_ptr = kmalloc(size, GFP_KERNEL); + *dma_handle = virt_to_bus(virt_ptr); + return virt_ptr; +} +#define pci_free_consistent(dev, size, ptr, dma_ptr) kfree(ptr) + +#endif /*#if (LINUX_VERSION_CODE < 0x02032a) */ + + +#if (LINUX_VERSION_CODE < 0x02040d) + +#if (LINUX_VERSION_CODE >= 0x020409) && defined(RED_HAT_LINUX_KERNEL) + +#define BCM_32BIT_DMA_MASK ((u64) 0x00000000ffffffffULL) +#define BCM_64BIT_DMA_MASK ((u64) 0xffffffffffffffffULL) + +#else +/* pci_set_dma_mask is using dma_addr_t */ + +#define BCM_32BIT_DMA_MASK ((dma_addr_t) 0xffffffff) +#define BCM_64BIT_DMA_MASK ((dma_addr_t) 0xffffffff) + +#endif + +#else /* (LINUX_VERSION_CODE < 0x02040d) */ + +#define BCM_32BIT_DMA_MASK ((u64) 0x00000000ffffffffULL) +#define BCM_64BIT_DMA_MASK ((u64) 0xffffffffffffffffULL) +#endif + +#if (LINUX_VERSION_CODE < 0x020329) +#define pci_set_dma_mask(pdev, mask) (0) +#else +#if (LINUX_VERSION_CODE < 0x020403) +int +pci_set_dma_mask(struct pci_dev *dev, dma_addr_t mask) +{ + if(! pci_dma_supported(dev, mask)) + return -EIO; + + dev->dma_mask = mask; + + return 0; +} +#endif +#endif + +#if (LINUX_VERSION_CODE < 0x020547) +#define pci_set_consistent_dma_mask(pdev, mask) (0) +#endif + +#if (LINUX_VERSION_CODE < 0x020402) +#define pci_request_regions(pdev, name) (0) +#define pci_release_regions(pdev) +#endif + +#if ! defined(spin_is_locked) +#define spin_is_locked(lock) (test_bit(0,(lock))) +#endif + +#define BCM5700_LOCK(pUmDevice, flags) \ + if ((pUmDevice)->do_global_lock) { \ + spin_lock_irqsave(&(pUmDevice)->global_lock, flags); \ + } + +#define BCM5700_UNLOCK(pUmDevice, flags) \ + if ((pUmDevice)->do_global_lock) { \ + spin_unlock_irqrestore(&(pUmDevice)->global_lock, flags);\ + } + +/* Fix for RQM 289636 */ +static inline void +bcm5700_netif_stop_queue(struct net_device *dev) +{ + dev->trans_start = jiffies; /* prevent tx timeout */ + netif_stop_queue(dev); +} + +inline void +bcm5700_intr_lock(PUM_DEVICE_BLOCK pUmDevice) +{ + if (pUmDevice->do_global_lock) { + spin_lock(&pUmDevice->global_lock); + } +} + +inline void +bcm5700_intr_unlock(PUM_DEVICE_BLOCK pUmDevice) +{ + if (pUmDevice->do_global_lock) { + spin_unlock(&pUmDevice->global_lock); + } +} + +void +bcm5700_intr_off(PUM_DEVICE_BLOCK pUmDevice) +{ + atomic_inc(&pUmDevice->intr_sem); + LM_DisableInterrupt(&pUmDevice->lm_dev); +#if (LINUX_VERSION_CODE >= 0x2051c) + synchronize_irq(pUmDevice->dev->irq); +#else + synchronize_irq(); +#endif + LM_DisableInterrupt(&pUmDevice->lm_dev); +} + +void +bcm5700_intr_on(PUM_DEVICE_BLOCK pUmDevice) +{ + if (atomic_dec_and_test(&pUmDevice->intr_sem)) { + LM_EnableInterrupt(&pUmDevice->lm_dev); + } +} + +/* + * Broadcom NIC Extension support + * -ffan + */ +#ifdef NICE_SUPPORT +#include "nicext.h" + +typedef struct { + ushort tag; + ushort signature; +} vlan_tag_t; + +#endif /* NICE_SUPPORT */ + +int MM_Packet_Desc_Size = sizeof(UM_PACKET); + +#if defined(MODULE) +MODULE_AUTHOR("Michael Chan and Gary Zambrano "); +MODULE_DESCRIPTION("BCM5700 Driver"); +MODULE_LICENSE("GPL"); + +#if (LINUX_VERSION_CODE < 0x020605) + +MODULE_PARM(debug, "i"); +MODULE_PARM(line_speed, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(auto_speed, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_flow_control, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(tx_flow_control, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(auto_flow_control, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +MODULE_PARM(mtu, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +MODULE_PARM(tx_checksum, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_checksum, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(scatter_gather, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(tx_pkt_desc_cnt, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_std_desc_cnt, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +MODULE_PARM(rx_jumbo_desc_cnt, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +#ifdef BCM_INT_COAL +MODULE_PARM(adaptive_coalesce, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_coalesce_ticks, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(rx_max_coalesce_frames, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(tx_coalesce_ticks, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(tx_max_coalesce_frames, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(stats_coalesce_ticks, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +#ifdef BCM_WOL +MODULE_PARM(enable_wol, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +#ifdef BCM_TSO +MODULE_PARM(enable_tso, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +#ifdef BCM_NIC_SEND_BD +MODULE_PARM(nic_tx_bd, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +#ifdef BCM_ASF +MODULE_PARM(vlan_tag_mode, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif +MODULE_PARM(delay_link, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM(disable_d3hot, "1-" __MODULE_STRING(MAX_UNITS) "i"); + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) +MODULE_PARM(disable_msi, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#endif + +#else /* parms*/ + +#if (LINUX_VERSION_CODE >= 0x020605) && (LINUX_VERSION_CODE < 0x02060a) + +static int var; + +#define numvar var + +#endif + +#if (LINUX_VERSION_CODE >= 0x2060a) + +#define numvar NULL + +#endif + +module_param_array(line_speed, int, numvar, 0); +module_param_array(auto_speed, int, numvar, 0); +module_param_array(full_duplex, int, numvar, 0); +module_param_array(rx_flow_control, int, numvar, 0); +module_param_array(tx_flow_control, int, numvar, 0); +module_param_array(auto_flow_control, int, numvar, 0); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +module_param_array(mtu, int, numvar, 0); +#endif +module_param_array(tx_checksum, int, numvar, 0); +module_param_array(rx_checksum, int, numvar, 0); +module_param_array(scatter_gather, int, numvar, 0); +module_param_array(tx_pkt_desc_cnt, int, numvar, 0); +module_param_array(rx_std_desc_cnt, int, numvar, 0); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +module_param_array(rx_jumbo_desc_cnt, int, numvar, 0); +#endif +#ifdef BCM_INT_COAL +module_param_array(adaptive_coalesce, int, numvar, 0); +module_param_array(rx_coalesce_ticks, int, numvar, 0); +module_param_array(rx_max_coalesce_frames, int, numvar, 0); +module_param_array(tx_coalesce_ticks, int, numvar, 0); +module_param_array(tx_max_coalesce_frames, int, numvar, 0); +module_param_array(stats_coalesce_ticks, int, numvar, 0); +#endif +#ifdef BCM_WOL +module_param_array(enable_wol, int, numvar, 0); +#endif +#ifdef BCM_TSO +module_param_array(enable_tso, int, numvar, 0); +#endif +#ifdef BCM_NIC_SEND_BD +module_param_array(nic_tx_bd, int, numvar, 0); +#endif +#ifdef BCM_ASF +module_param_array(vlan_tag_mode, int, numvar, 0); +#endif +module_param_array(delay_link, int, numvar, 0); +module_param_array(disable_d3hot, int, numvar, 0); + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) +module_param_array(disable_msi, int, numvar, 0); +#endif + + +#endif /* params */ + + +#endif + +#define RUN_AT(x) (jiffies + (x)) + +char kernel_version[] = UTS_RELEASE; + +#define PCI_SUPPORT_VER2 + +#if ! defined(CAP_NET_ADMIN) +#define capable(CAP_XXX) (suser()) +#endif + +#define tigon3_debug debug +#if TIGON3_DEBUG +static int tigon3_debug = TIGON3_DEBUG; +#else +static int tigon3_debug = 0; +#endif + + +int bcm5700_open(struct net_device *dev); +STATIC void bcm5700_timer(unsigned long data); +STATIC void bcm5700_stats_timer(unsigned long data); +STATIC void bcm5700_reset(struct net_device *dev); +STATIC int bcm5700_start_xmit(struct sk_buff *skb, struct net_device *dev); +STATIC irqreturn_t bcm5700_interrupt(int irq, void *dev_instance, struct pt_regs *regs); +#ifdef BCM_TASKLET +STATIC void bcm5700_tasklet(unsigned long data); +#endif +STATIC int bcm5700_close(struct net_device *dev); +STATIC struct net_device_stats *bcm5700_get_stats(struct net_device *dev); +STATIC int bcm5700_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); +STATIC void bcm5700_do_rx_mode(struct net_device *dev); +STATIC void bcm5700_set_rx_mode(struct net_device *dev); +STATIC int bcm5700_set_mac_addr(struct net_device *dev, void *p); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +STATIC int bcm5700_change_mtu(struct net_device *dev, int new_mtu); +#endif +#ifdef BCM_NAPI_RXPOLL +STATIC int bcm5700_poll(struct net_device *dev, int *budget); +#endif +STATIC int replenish_rx_buffers(PUM_DEVICE_BLOCK pUmDevice, int max); +STATIC int bcm5700_freemem(struct net_device *dev); +#ifdef NICE_SUPPORT +STATIC int bcm5700_freemem2(UM_DEVICE_BLOCK *pUmDevice, int index); +#endif +#ifdef BCM_INT_COAL +#ifndef BCM_NAPI_RXPOLL +STATIC int bcm5700_adapt_coalesce(PUM_DEVICE_BLOCK pUmDevice); +#endif +#endif +STATIC void bcm5700_set_vlan_mode(UM_DEVICE_BLOCK *pUmDevice); +STATIC int bcm5700_init_counters(PUM_DEVICE_BLOCK pUmDevice); +#ifdef BCM_VLAN +STATIC void bcm5700_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp); +STATIC void bcm5700_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid); +#endif +void bcm5700_shutdown(UM_DEVICE_BLOCK *pUmDevice); +void bcm5700_free_remaining_rx_bufs(UM_DEVICE_BLOCK *pUmDevice); +void bcm5700_validate_param_range(UM_DEVICE_BLOCK *pUmDevice, int *param, + char *param_name, int min, int max, int deflt); + +#if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) +STATIC void poll_bcm5700(struct net_device *dev); +#endif + +/* A list of all installed bcm5700 devices. */ +static struct net_device *root_tigon3_dev = NULL; + +#if defined(CONFIG_SPARC64) || defined(CONFIG_X86_64) ||defined(CONFIG_PPC64) + +#ifdef NICE_SUPPORT +#if (LINUX_VERSION_CODE < 0x20500) +extern int register_ioctl32_conversion(unsigned int cmd, + int (*handler)(unsigned int, unsigned int, unsigned long, + struct file *)); +int unregister_ioctl32_conversion(unsigned int cmd); +#else +#include +#endif + +#define BCM_IOCTL32 1 + +atomic_t bcm5700_load_count = ATOMIC_INIT(0); + +static int +bcm5700_ioctl32(unsigned int fd, unsigned int cmd, unsigned long arg, + struct file *filep) +{ + struct ifreq rq; + struct net_device *tmp_dev = root_tigon3_dev; + int ret; + struct nice_req* nrq; + struct ifreq_nice32 { + char ifnr_name[16]; + __u32 cmd; + __u32 nrq1; + __u32 nrq2; + __u32 nrq3; + } nrq32; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (mm_copy_from_user(&nrq32, (char *) arg, 32)) + return -EFAULT; + + memcpy(rq.ifr_name, nrq32.ifnr_name, 16); + + nrq = (struct nice_req*) &rq.ifr_ifru; + nrq->cmd = nrq32.cmd; + if (nrq->cmd == NICE_CMD_GET_STATS_BLOCK) { + nrq->nrq_stats_useraddr = (void *) ((__u64) nrq32.nrq1); + nrq->nrq_stats_size = nrq32.nrq2; + } + else { + memcpy(&nrq->nrq_speed, &nrq32.nrq1, 12); + } + while (tmp_dev) { + if (strcmp(rq.ifr_name, tmp_dev->name) == 0) { + ret = bcm5700_ioctl(tmp_dev, &rq, cmd); + if (ret == 0) { + if (nrq->cmd == NICE_CMD_GET_STATS_BLOCK) + return ret; + + memcpy(&nrq32.nrq1, &nrq->nrq_speed, 12); + if (mm_copy_to_user((char *) arg, &nrq32, 32)) + return -EFAULT; + } + return ret; + } + tmp_dev = ((UM_DEVICE_BLOCK *)(tmp_dev->priv))->next_module; + } + return -ENODEV; +} +#endif /* NICE_SUPPORT */ +#endif + +typedef enum { +#ifdef MEFHACK_NOTFORPLANETLAB + BCM5700A6 = 0, + BCM5700T6, + BCM5700A9, + BCM5700T9, + BCM5700, + BCM5701A5, + BCM5701T1, + BCM5701T8, + BCM5701A7, + BCM5701A10, + BCM5701A12, + BCM5701, + BCM5702, + BCM5703, + BCM5703A31, + BCM5703ARBUCKLE, + TC996T, + TC996ST, + TC996SSX, + TC996SX, + TC996BT, + TC997T, + TC997SX, + TC1000T, + TC1000BT, + TC940BR01, + TC942BR01, + TC998T, + TC998SX, + TC999T, +#endif + NC6770, + NC1020, + NC150T, + NC7760, + NC7761, + NC7770, + NC7771, + NC7780, + NC7781, + NC7772, + NC7782, + NC7783, + NC320T, + NC320I, + NC325I, + NC324I, + NC326I, +#ifdef MEFHACK_NOTFORPLANETLAB + BCM5704CIOBE, + BCM5704, + BCM5704S, + BCM5705, + BCM5705M, + BCM5705F, + BCM5901, + BCM5782, + BCM5788, + BCM5789, + BCM5750, + BCM5750M, + BCM5720, + BCM5751, + BCM5751M, + BCM5751F, + BCM5721, + BCM5753, + BCM5753M, + BCM5753F, + BCM5781, + BCM5752, + BCM5752M, + BCM5714, + BCM5780, + BCM5780S, + BCM5715, + BCM5903M +#endif +} board_t; + + +/* indexed by board_t, above */ +static struct { + char *name; +} board_info[] __devinitdata = { +#ifdef MEFHACK_NOTFORPLANETLAB + { "Broadcom BCM5700 1000Base-T" }, + { "Broadcom BCM5700 1000Base-SX" }, + { "Broadcom BCM5700 1000Base-SX" }, + { "Broadcom BCM5700 1000Base-T" }, + { "Broadcom BCM5700" }, + { "Broadcom BCM5701 1000Base-T" }, + { "Broadcom BCM5701 1000Base-T" }, + { "Broadcom BCM5701 1000Base-T" }, + { "Broadcom BCM5701 1000Base-SX" }, + { "Broadcom BCM5701 1000Base-T" }, + { "Broadcom BCM5701 1000Base-T" }, + { "Broadcom BCM5701" }, + { "Broadcom BCM5702 1000Base-T" }, + { "Broadcom BCM5703 1000Base-T" }, + { "Broadcom BCM5703 1000Base-SX" }, + { "Broadcom B5703 1000Base-SX" }, + { "3Com 3C996 10/100/1000 Server NIC" }, + { "3Com 3C996 10/100/1000 Server NIC" }, + { "3Com 3C996 Gigabit Fiber-SX Server NIC" }, + { "3Com 3C996 Gigabit Fiber-SX Server NIC" }, + { "3Com 3C996B Gigabit Server NIC" }, + { "3Com 3C997 Gigabit Server NIC" }, + { "3Com 3C997 Gigabit Fiber-SX Server NIC" }, + { "3Com 3C1000 Gigabit NIC" }, + { "3Com 3C1000B-T 10/100/1000 PCI" }, + { "3Com 3C940 Gigabit LOM (21X21)" }, + { "3Com 3C942 Gigabit LOM (31X31)" }, + { "3Com 3C998-T Dual Port 10/100/1000 PCI-X Server NIC" }, + { "3Com 3C998-SX Dual Port 1000-SX PCI-X Server NIC" }, + { "3Com 3C999-T Quad Port 10/100/1000 PCI-X Server NIC" }, +#endif + { "HP NC6770 Gigabit Server Adapter" }, + { "NC1020 HP ProLiant Gigabit Server Adapter 32 PCI" }, + { "HP ProLiant NC 150T PCI 4-port Gigabit Combo Switch Adapter" }, + { "HP NC7760 Gigabit Server Adapter" }, + { "HP NC7761 Gigabit Server Adapter" }, + { "HP NC7770 Gigabit Server Adapter" }, + { "HP NC7771 Gigabit Server Adapter" }, + { "HP NC7780 Gigabit Server Adapter" }, + { "HP NC7781 Gigabit Server Adapter" }, + { "HP NC7772 Gigabit Server Adapter" }, + { "HP NC7782 Gigabit Server Adapter" }, + { "HP NC7783 Gigabit Server Adapter" }, + { "HP ProLiant NC 320T PCI Express Gigabit Server Adapter" }, + { "HP ProLiant NC 320i PCI Express Gigabit Server Adapter" }, + { "HP NC325i Integrated Dual Port PCI Express Gigabit Server Adapter" }, + { "HP NC324i Integrated Dual Port PCI Express Gigabit Server Adapter" }, + { "HP NC326i Integrated Dual Port PCI Express Gigabit Server Adapter" }, +#ifdef MEFHACK_NOTFORPLANETLAB + { "Broadcom BCM5704 CIOB-E 1000Base-T" }, + { "Broadcom BCM5704 1000Base-T" }, + { "Broadcom BCM5704 1000Base-SX" }, + { "Broadcom BCM5705 1000Base-T" }, + { "Broadcom BCM5705M 1000Base-T" }, + { "Broadcom 570x 10/100 Integrated Controller" }, + { "Broadcom BCM5901 100Base-TX" }, + { "Broadcom NetXtreme Gigabit Ethernet for hp" }, + { "Broadcom BCM5788 NetLink 1000Base-T" }, + { "Broadcom BCM5789 NetLink 1000Base-T PCI Express" }, + { "Broadcom BCM5750 1000Base-T PCI" }, + { "Broadcom BCM5750M 1000Base-T PCI" }, + { "Broadcom BCM5720 1000Base-T PCI" }, + { "Broadcom BCM5751 1000Base-T PCI Express" }, + { "Broadcom BCM5751M 1000Base-T PCI Express" }, + { "Broadcom BCM5751F 100Base-TX PCI Express" }, + { "Broadcom BCM5721 1000Base-T PCI Express" }, + { "Broadcom BCM5753 1000Base-T PCI Express" }, + { "Broadcom BCM5753M 1000Base-T PCI Express" }, + { "Broadcom BCM5753F 100Base-TX PCI Express" }, + { "Broadcom BCM5781 NetLink 1000Base-T PCI Express" }, + { "Broadcom BCM5752 1000Base-T PCI Express" }, + { "Broadcom BCM5752M 1000Base-T PCI Express" }, + { "Broadcom BCM5714 1000Base-T " }, + { "Broadcom BCM5780 1000Base-T" }, + { "Broadcom BCM5780S 1000Base-SX" }, + { "Broadcom BCM5715 1000Base-T " }, + { "Broadcom BCM5903M Gigabit Ethernet " }, +#endif + { 0 } + }; + +static struct pci_device_id bcm5700_pci_tbl[] __devinitdata = { +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1644, 0x14e4, 0x1644, 0, 0, BCM5700A6 }, + {0x14e4, 0x1644, 0x14e4, 0x2, 0, 0, BCM5700T6 }, + {0x14e4, 0x1644, 0x14e4, 0x3, 0, 0, BCM5700A9 }, + {0x14e4, 0x1644, 0x14e4, 0x4, 0, 0, BCM5700T9 }, + {0x14e4, 0x1644, 0x1028, 0xd1, 0, 0, BCM5700 }, + {0x14e4, 0x1644, 0x1028, 0x0106, 0, 0, BCM5700 }, + {0x14e4, 0x1644, 0x1028, 0x0109, 0, 0, BCM5700 }, + {0x14e4, 0x1644, 0x1028, 0x010a, 0, 0, BCM5700 }, + {0x14e4, 0x1644, 0x10b7, 0x1000, 0, 0, TC996T }, + {0x14e4, 0x1644, 0x10b7, 0x1001, 0, 0, TC996ST }, + {0x14e4, 0x1644, 0x10b7, 0x1002, 0, 0, TC996SSX }, + {0x14e4, 0x1644, 0x10b7, 0x1003, 0, 0, TC997T }, + {0x14e4, 0x1644, 0x10b7, 0x1005, 0, 0, TC997SX }, + {0x14e4, 0x1644, 0x10b7, 0x1008, 0, 0, TC942BR01 }, + {0x14e4, 0x1644, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5700 }, + {0x14e4, 0x1645, 0x14e4, 1, 0, 0, BCM5701A5 }, + {0x14e4, 0x1645, 0x14e4, 5, 0, 0, BCM5701T1 }, + {0x14e4, 0x1645, 0x14e4, 6, 0, 0, BCM5701T8 }, + {0x14e4, 0x1645, 0x14e4, 7, 0, 0, BCM5701A7 }, + {0x14e4, 0x1645, 0x14e4, 8, 0, 0, BCM5701A10 }, + {0x14e4, 0x1645, 0x14e4, 0x8008, 0, 0, BCM5701A12 }, +#endif + {0x14e4, 0x1645, 0x0e11, 0xc1, 0, 0, NC6770 }, + {0x14e4, 0x1645, 0x0e11, 0x7c, 0, 0, NC7770 }, + {0x14e4, 0x1645, 0x0e11, 0x85, 0, 0, NC7780 }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1645, 0x1028, 0x0121, 0, 0, BCM5701 }, + {0x14e4, 0x1645, 0x10b7, 0x1004, 0, 0, TC996SX }, + {0x14e4, 0x1645, 0x10b7, 0x1006, 0, 0, TC996BT }, + {0x14e4, 0x1645, 0x10b7, 0x1007, 0, 0, TC1000T }, + {0x14e4, 0x1645, 0x10b7, 0x1008, 0, 0, TC940BR01 }, + {0x14e4, 0x1645, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5701 }, + {0x14e4, 0x1646, 0x14e4, 0x8009, 0, 0, BCM5702 }, + {0x14e4, 0x1646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5702 }, + {0x14e4, 0x16a6, 0x14e4, 0x8009, 0, 0, BCM5702 }, + {0x14e4, 0x16a6, 0x14e4, 0x000c, 0, 0, BCM5702 }, + {0x14e4, 0x16a6, 0x0e11, 0xbb, 0, 0, NC7760 }, + {0x14e4, 0x16a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5702 }, + {0x14e4, 0x16c6, 0x10b7, 0x1100, 0, 0, TC1000BT }, + {0x14e4, 0x16c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5702 }, + {0x14e4, 0x1647, 0x14e4, 0x0009, 0, 0, BCM5703 }, + {0x14e4, 0x1647, 0x14e4, 0x000a, 0, 0, BCM5703A31 }, + {0x14e4, 0x1647, 0x14e4, 0x000b, 0, 0, BCM5703 }, + {0x14e4, 0x1647, 0x14e4, 0x800a, 0, 0, BCM5703 }, + {0x14e4, 0x1647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5703 }, + {0x14e4, 0x16a7, 0x14e4, 0x0009, 0, 0, BCM5703 }, + {0x14e4, 0x16a7, 0x14e4, 0x000a, 0, 0, BCM5703A31 }, + {0x14e4, 0x16a7, 0x14e4, 0x000b, 0, 0, BCM5703 }, + {0x14e4, 0x16a7, 0x14e4, 0x800a, 0, 0, BCM5703 }, +#endif + {0x14e4, 0x16a7, 0x0e11, 0xca, 0, 0, NC7771 }, + {0x14e4, 0x16a7, 0x0e11, 0xcb, 0, 0, NC7781 }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x16a7, 0x1014, 0x0281, 0, 0, BCM5703ARBUCKLE }, + {0x14e4, 0x16a7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5703 }, + {0x14e4, 0x16c7, 0x14e4, 0x000a, 0, 0, BCM5703A31 }, +#endif + {0x14e4, 0x16c7, 0x0e11, 0xca, 0, 0, NC7771 }, + {0x14e4, 0x16c7, 0x0e11, 0xcb, 0, 0, NC7781 }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x16c7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5703 }, +#endif + {0x14e4, 0x1648, 0x0e11, 0xcf, 0, 0, NC7772 }, + {0x14e4, 0x1648, 0x0e11, 0xd0, 0, 0, NC7782 }, + {0x14e4, 0x1648, 0x0e11, 0xd1, 0, 0, NC7783 }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1648, 0x10b7, 0x2000, 0, 0, TC998T }, + {0x14e4, 0x1648, 0x10b7, 0x3000, 0, 0, TC999T }, + {0x14e4, 0x1648, 0x1166, 0x1648, 0, 0, BCM5704CIOBE }, + {0x14e4, 0x1648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5704 }, + {0x14e4, 0x1649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5704S }, + {0x14e4, 0x16a8, 0x14e4, 0x16a8, 0, 0, BCM5704S }, + {0x14e4, 0x16a8, 0x10b7, 0x2001, 0, 0, TC998SX }, + {0x14e4, 0x16a8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5704S }, +#endif + {0x14e4, 0x1653, 0x0e11, 0x00e3, 0, 0, NC7761 }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5705 }, +#endif + {0x14e4, 0x1654, 0x0e11, 0x00e3, 0, 0, NC7761 }, + {0x14e4, 0x1654, 0x103c, 0x3100, 0, 0, NC1020 }, + {0x14e4, 0x1654, 0x103c, 0x3226, 0, 0, NC150T }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1654, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5705 }, + {0x14e4, 0x165d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5705M }, + {0x14e4, 0x165e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5705M }, + {0x14e4, 0x166e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5705F }, + {0x14e4, 0x1696, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5782 }, + {0x14e4, 0x169c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5788 }, + {0x14e4, 0x169d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5789 }, + {0x14e4, 0x170d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5901 }, + {0x14e4, 0x170e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5901 }, + {0x14e4, 0x1676, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5750 }, + {0x14e4, 0x167c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5750M }, + {0x14e4, 0x1677, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5751 }, + {0x14e4, 0x167d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5751M }, + {0x14e4, 0x167e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5751F }, + {0x14e4, 0x1658, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5720 }, +#endif + {0x14e4, 0x1659, 0x103c, 0x7031, 0, 0, NC320T }, + {0x14e4, 0x1659, 0x103c, 0x7032, 0, 0, NC320T }, + {0x14e4, 0x166a, 0x103c, 0x7035, 0, 0, NC325I }, + {0x14e4, 0x166b, 0x103c, 0x7036, 0, 0, NC325I }, + {0x14e4, 0x1668, 0x103c, 0x7039, 0, 0, NC324I }, + {0x14e4, 0x1669, 0x103c, 0x703a, 0, 0, NC324I }, + {0x14e4, 0x1678, 0x103c, 0x703e, 0, 0, NC326I }, + {0x14e4, 0x1679, 0x103c, 0x703c, 0, 0, NC326I }, +#ifdef MEFHACK_NOTFORPLANETLAB + {0x14e4, 0x1659, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5721 }, + {0x14e4, 0x16f7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5753 }, + {0x14e4, 0x16fd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5753M }, + {0x14e4, 0x16fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5753F }, + {0x14e4, 0x16dd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5781 }, + {0x14e4, 0x1600, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5752 }, + {0x14e4, 0x1601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5752M }, + {0x14e4, 0x1668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5714 }, + {0x14e4, 0x1669, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5714S }, + {0x14e4, 0x166a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5780 }, + {0x14e4, 0x166b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5780S }, + {0x14e4, 0x1678, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5715 }, + {0x14e4, 0x1679, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5715S }, + {0x14e4, 0x16ff, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BCM5903M }, +#endif + {0,} + }; + +MODULE_DEVICE_TABLE(pci, bcm5700_pci_tbl); + +#ifdef BCM_PROC_FS +extern int bcm5700_proc_create(void); +extern int bcm5700_proc_create_dev(struct net_device *dev); +extern int bcm5700_proc_remove_dev(struct net_device *dev); +extern int bcm5700_proc_remove_notifier(void); +#endif + +#if (LINUX_VERSION_CODE >= 0x2060a) + static struct pci_device_id pci_AMD762id[]={ + { PCI_DEVICE(PCI_VENDOR_ID_AMD, + PCI_DEVICE_ID_AMD_FE_GATE_700C) }, + { } + }; +#endif + +/******************************************************************************* + ******************************************************************************* +*/ + +int get_csum_flag(LM_UINT32 ChipRevId) +{ + return NETIF_F_IP_CSUM; +} + +/******************************************************************************* + ******************************************************************************* + + This function returns true if the device passed to it is attached to an + ICH-ICH4. If the chip is not attached to an ICH, or is attached to an ICH5 + or newer, it returns false. + + This function determines which bridge it is attached to by scaning the pci + bus looking for bridge chips (hdr_type=1). When a bridge chip is detected, + the bridge's subordinate's secondary bus number is compared with this + devices bus number. If they match, then the device is attached to this + bridge. The bridge's device id is compared to a list of known device ids for + ICH-ICH4. Since many older ICH's (ICH2-ICH7) share the same device id, the + chip revision must also be checked to determine if the chip is older than an + ICH5. + + To scan the bus, one of two functions is used depending on the kernel + version. For 2.4 kernels, the pci_find_device function is used. This + function has been depricated in the 2.6 kernel and replaced with the + fucntion pci_get_device. The macro walk_pci_bus determines which function to + use when the driver is built. +*/ + +#if (LINUX_VERSION_CODE >= 0x2060a) +#define walk_pci_bus(d) while ((d = pci_get_device( \ + PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) + +#define unwalk_pci_bus(d) pci_dev_put(d) + +#else +#define walk_pci_bus(d) while ((d = pci_find_device( \ + PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) +#define unwalk_pci_bus(d) + +#endif + +#define ICH5_CHIP_VERSION 0xc0 + +static struct pci_device_id pci_ICHtable[] = { + {0x8086, 0x2418}, /* PCI_DEVICE_ID_INTEL_82801AA_8 */ + {0x8086, 0x2428}, /* PCI_DEVICE_ID_INTEL_82801AB_8 */ + {0x8086, 0x244e}, /* PCI_DEVICE_ID_INTEL_82801BA_6 */ + {0x8086, 0x2448}, /* PCI_DEVICE_ID_INTEL_82801BA_11 */ + {0, 0} +}; + +int attached_to_ICH4_or_older( struct pci_dev *pdev) +{ + struct pci_dev *tmp_pdev = NULL; + struct pci_device_id *ich_table; + u8 chip_rev; + + walk_pci_bus (tmp_pdev) { + if ((tmp_pdev->hdr_type == 1) && + (tmp_pdev->subordinate != NULL) && + (tmp_pdev->subordinate->secondary == pdev->bus->number)) { + + ich_table = pci_ICHtable; + + while (ich_table->vendor) { + if ((ich_table->vendor == tmp_pdev->vendor) && + (ich_table->device == tmp_pdev->device)) { + + pci_read_config_byte( tmp_pdev, + PCI_REVISION_ID, &chip_rev); + + if (chip_rev < ICH5_CHIP_VERSION) { + unwalk_pci_bus( tmp_pdev); + return 1; + } + } + ich_table++; + } + } + } + return 0; +} + +static int __devinit bcm5700_init_board(struct pci_dev *pdev, + struct net_device **dev_out, + int board_idx) +{ + struct net_device *dev; + PUM_DEVICE_BLOCK pUmDevice; + PLM_DEVICE_BLOCK pDevice; + int rc; + + *dev_out = NULL; + + /* dev zeroed in init_etherdev */ +#if (LINUX_VERSION_CODE >= 0x20600) + dev = alloc_etherdev(sizeof(*pUmDevice)); +#else + dev = init_etherdev(NULL, sizeof(*pUmDevice)); +#endif + if (dev == NULL) { + printk (KERN_ERR "%s: unable to alloc new ethernet\n", + bcm5700_driver); + return -ENOMEM; + } + SET_MODULE_OWNER(dev); +#if (LINUX_VERSION_CODE >= 0x20600) + SET_NETDEV_DEV(dev, &pdev->dev); +#endif + pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + + /* enable device (incl. PCI PM wakeup), and bus-mastering */ + rc = pci_enable_device (pdev); + if (rc) + goto err_out; + + rc = pci_request_regions(pdev, bcm5700_driver); + if (rc) + goto err_out; + + pci_set_master(pdev); + + if (pci_set_dma_mask(pdev, BCM_64BIT_DMA_MASK) == 0) { + pUmDevice->using_dac = 1; + if (pci_set_consistent_dma_mask(pdev, BCM_64BIT_DMA_MASK) != 0) + { + printk(KERN_ERR "pci_set_consistent_dma_mask failed\n"); + pci_release_regions(pdev); + goto err_out; + } + } + else if (pci_set_dma_mask(pdev, BCM_32BIT_DMA_MASK) == 0) { + pUmDevice->using_dac = 0; + } + else { + printk(KERN_ERR "System does not support DMA\n"); + pci_release_regions(pdev); + goto err_out; + } + + pUmDevice->dev = dev; + pUmDevice->pdev = pdev; + pUmDevice->mem_list_num = 0; + pUmDevice->next_module = root_tigon3_dev; + pUmDevice->index = board_idx; + root_tigon3_dev = dev; + + spin_lock_init(&pUmDevice->global_lock); + + spin_lock_init(&pUmDevice->undi_lock); + + spin_lock_init(&pUmDevice->phy_lock); + + pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + pDevice->Flags = 0; + pDevice->FunctNum = PCI_FUNC(pUmDevice->pdev->devfn); + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + if (board_idx < MAX_UNITS) { + bcm5700_validate_param_range(pUmDevice, &mtu[board_idx], "mtu", 1500, 9000, 1500); + dev->mtu = mtu[board_idx]; + } +#endif + /* If we're attached to an ICH4 or older, we may need to implement a + workaround for special cycles described in the BCM5704/357 Errata. + This workaround is only need on 5703-A1/2 or 5704-A0 chips that + are attached to a PCI-X bus. The NIC chip type and bus are checked + later in the driver and the flag cleared if the workaround is not + needed. The workaround is enabled by setting the flag UNDI_FIX_FLAG + which casues the driver to use indirect pci-config cycles when + accessing the low-priority mailboxes (MB_REG_WR/RD). + */ + + if (attached_to_ICH4_or_older( pdev)) { + pDevice->Flags |= UNDI_FIX_FLAG; + } + +#if (LINUX_VERSION_CODE >= 0x2060a) + if(pci_dev_present(pci_AMD762id)){ + pDevice->Flags |= FLUSH_POSTED_WRITE_FLAG; + pDevice->Flags &= ~NIC_SEND_BD_FLAG; + } +#else + if (pci_find_device(0x1022, 0x700c, NULL)) { + /* AMD762 writes I/O out of order */ + /* Setting bit 1 in 762's register 0x4C still doesn't work */ + /* in all cases */ + pDevice->Flags |= FLUSH_POSTED_WRITE_FLAG; + pDevice->Flags &= ~NIC_SEND_BD_FLAG; + } +#endif + if (LM_GetAdapterInfo(pDevice) != LM_STATUS_SUCCESS) { + rc = -ENODEV; + goto err_out_unmap; + } + + if ( (pDevice->Flags & JUMBO_CAPABLE_FLAG) == 0 ) { + if (dev->mtu > 1500) { + dev->mtu = 1500; + printk(KERN_WARNING "%s-%d: Jumbo mtu sizes not supported, using mtu=1500\n", bcm5700_driver, pUmDevice->index); + } + } + + pUmDevice->do_global_lock = 0; + if (T3_ASIC_REV(pUmDevice->lm_dev.ChipRevId) == T3_ASIC_REV_5700) { + /* The 5700 chip works best without interleaved register */ + /* accesses on certain machines. */ + pUmDevice->do_global_lock = 1; + } + + if ((T3_ASIC_REV(pUmDevice->lm_dev.ChipRevId) == T3_ASIC_REV_5701) && + ((pDevice->PciState & T3_PCI_STATE_NOT_PCI_X_BUS) == 0)) { + + pUmDevice->rx_buf_align = 0; + } + else { + pUmDevice->rx_buf_align = 2; + } + dev->mem_start = pci_resource_start(pdev, 0); + dev->mem_end = dev->mem_start + sizeof(T3_STD_MEM_MAP); + dev->irq = pdev->irq; + + *dev_out = dev; + return 0; + +err_out_unmap: + pci_release_regions(pdev); + bcm5700_freemem(dev); + +err_out: +#if (LINUX_VERSION_CODE < 0x020600) + unregister_netdev(dev); + kfree(dev); +#else + free_netdev(dev); +#endif + return rc; +} + +static int __devinit +bcm5700_print_ver(void) +{ + printk(KERN_INFO "Broadcom Gigabit Ethernet Driver %s ", + bcm5700_driver); +#ifdef NICE_SUPPORT + printk("with Broadcom NIC Extension (NICE) "); +#endif + printk("ver. %s %s\n", bcm5700_version, bcm5700_date); + return 0; +} + +static int __devinit +bcm5700_init_one(struct pci_dev *pdev, + const struct pci_device_id *ent) +{ + struct net_device *dev = NULL; + PUM_DEVICE_BLOCK pUmDevice; + PLM_DEVICE_BLOCK pDevice; + int i; + static int board_idx = -1; + static int printed_version = 0; + struct pci_dev *pci_dev; + + board_idx++; + + if (!printed_version) { + bcm5700_print_ver(); +#ifdef BCM_PROC_FS + bcm5700_proc_create(); +#endif + printed_version = 1; + } + + i = bcm5700_init_board(pdev, &dev, board_idx); + if (i < 0) { + return i; + } + + if (dev == NULL) + return -ENOMEM; + +#ifdef BCM_IOCTL32 + if (atomic_read(&bcm5700_load_count) == 0) { + register_ioctl32_conversion(SIOCNICE, bcm5700_ioctl32); + } + atomic_inc(&bcm5700_load_count); +#endif + dev->open = bcm5700_open; + dev->hard_start_xmit = bcm5700_start_xmit; + dev->stop = bcm5700_close; + dev->get_stats = bcm5700_get_stats; + dev->set_multicast_list = bcm5700_set_rx_mode; + dev->do_ioctl = bcm5700_ioctl; + dev->set_mac_address = &bcm5700_set_mac_addr; +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + dev->change_mtu = &bcm5700_change_mtu; +#endif +#if (LINUX_VERSION_CODE >= 0x20400) + dev->tx_timeout = bcm5700_reset; + /* Fix for RQM 289636 */ + /* dev->watchdog_timeo = TX_TIMEOUT; */ + dev->watchdog_timeo = BCM_TX_TIMEOUT; +#endif +#ifdef BCM_VLAN + dev->vlan_rx_register = &bcm5700_vlan_rx_register; + dev->vlan_rx_kill_vid = &bcm5700_vlan_rx_kill_vid; +#endif +#ifdef BCM_NAPI_RXPOLL + dev->poll = bcm5700_poll; + dev->weight = 64; +#endif + + pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + + dev->base_addr = pci_resource_start(pdev, 0); + dev->irq = pdev->irq; +#if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER) + dev->poll_controller = poll_bcm5700; +#endif + +#if (LINUX_VERSION_CODE >= 0x20600) + if ((i = register_netdev(dev))) { + printk(KERN_ERR "%s: Cannot register net device\n", + bcm5700_driver); + if (pUmDevice->lm_dev.pMappedMemBase) + iounmap(pUmDevice->lm_dev.pMappedMemBase); + pci_release_regions(pdev); + bcm5700_freemem(dev); + free_netdev(dev); + return i; + } +#endif + + + pci_set_drvdata(pdev, dev); + + memcpy(dev->dev_addr, pDevice->NodeAddress, 6); + pUmDevice->name = board_info[ent->driver_data].name, + printk(KERN_INFO "%s: %s found at mem %lx, IRQ %d, ", + dev->name, pUmDevice->name, dev->base_addr, + dev->irq); + printk("node addr "); + for (i = 0; i < 6; i++) { + printk("%2.2x", dev->dev_addr[i]); + } + printk("\n"); + + printk(KERN_INFO "%s: ", dev->name); + if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5400_PHY_ID) + printk("Broadcom BCM5400 Copper "); + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + printk("Broadcom BCM5401 Copper "); + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5411_PHY_ID) + printk("Broadcom BCM5411 Copper "); + else if (((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5701_PHY_ID) && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG)) { + printk("Broadcom BCM5701 Integrated Copper "); + } + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5703_PHY_ID) { + printk("Broadcom BCM5703 Integrated "); + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + printk("SerDes "); + else + printk("Copper "); + } + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5704_PHY_ID) { + printk("Broadcom BCM5704 Integrated "); + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + printk("SerDes "); + else + printk("Copper "); + } + else if (pDevice->PhyFlags & PHY_IS_FIBER){ + if(( pDevice->PhyId & PHY_ID_MASK ) == PHY_BCM5780_PHY_ID) + printk("Broadcom BCM5780S Integrated Serdes "); + + if(( pDevice->PhyId & PHY_ID_MASK ) == PHY_BCM5714_PHY_ID) + printk("Broadcom BCM5714S Integrated Serdes "); + } + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5705_PHY_ID) + printk("Broadcom BCM5705 Integrated Copper "); + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5750_PHY_ID) + printk("Broadcom BCM5750 Integrated Copper "); + + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5714_PHY_ID) + printk("Broadcom BCM5714 Integrated Copper "); + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5780_PHY_ID) + printk("Broadcom BCM5780 Integrated Copper "); + + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5752_PHY_ID) + printk("Broadcom BCM5752 Integrated Copper "); + else if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM8002_PHY_ID) + printk("Broadcom BCM8002 SerDes "); + else if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) { + printk("Broadcom BCM5703 Integrated SerDes "); + } + else if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) { + printk("Broadcom BCM5704 Integrated SerDes "); + } + else { + printk("Agilent HDMP-1636 SerDes "); + } + } + else { + printk("Unknown "); + } + printk("transceiver found\n"); + +#if (LINUX_VERSION_CODE >= 0x20400) + if (scatter_gather[board_idx]) { + dev->features |= NETIF_F_SG; + if (pUmDevice->using_dac && !(pDevice->Flags & BCM5788_FLAG)) + dev->features |= NETIF_F_HIGHDMA; + } + if ((pDevice->TaskOffloadCap & LM_TASK_OFFLOAD_TX_TCP_CHECKSUM) && + tx_checksum[board_idx]) { + + dev->features |= get_csum_flag( pDevice->ChipRevId); + } +#ifdef BCM_VLAN + dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; +#endif +#ifdef BCM_TSO + /* On 5714/15/80 chips, Jumbo Frames and TSO cannot both be enabled at + the same time. Since only one of these features can be enable at a + time, we'll enable only Jumbo Frames and disable TSO when the user + tries to enable both. + */ + dev->features &= ~NETIF_F_TSO; + + if ((pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION) && + (enable_tso[board_idx])) { + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (dev->mtu > 1500)) { + printk(KERN_ALERT "%s: Jumbo Frames and TSO cannot simultaneously be enabled. Jumbo Frames enabled. TSO disabled.\n", dev->name); + } else { + dev->features |= NETIF_F_TSO; + } + } +#endif + printk(KERN_INFO "%s: Scatter-gather %s, 64-bit DMA %s, Tx Checksum %s, ", + dev->name, + (char *) ((dev->features & NETIF_F_SG) ? "ON" : "OFF"), + (char *) ((dev->features & NETIF_F_HIGHDMA) ? "ON" : "OFF"), + (char *) ((dev->features & get_csum_flag( pDevice->ChipRevId)) ? "ON" : "OFF")); +#endif + if ((pDevice->ChipRevId != T3_CHIP_ID_5700_B0) && + rx_checksum[board_idx]) + printk("Rx Checksum ON"); + else + printk("Rx Checksum OFF"); +#ifdef BCM_VLAN + printk(", 802.1Q VLAN ON"); +#endif +#ifdef BCM_TSO + if (dev->features & NETIF_F_TSO) { + printk(", TSO ON"); + } + else +#endif +#ifdef BCM_NAPI_RXPOLL + printk(", NAPI ON"); +#endif + printk("\n"); + +#ifdef BCM_PROC_FS + bcm5700_proc_create_dev(dev); +#endif +#ifdef BCM_TASKLET + tasklet_init(&pUmDevice->tasklet, bcm5700_tasklet, + (unsigned long) pUmDevice); +#endif + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) { + if ((REG_RD(pDevice, PciCfg.DualMacCtrl) & + T3_DUAL_MAC_CH_CTRL_MASK) == 3) { + +printk(KERN_WARNING "%s: Device is configured for Hardware Based Teaming which is not supported with this operating system. Please consult the user diagnostic guide to disable Turbo Teaming.\n", dev->name); + } + } + +#if (LINUX_VERSION_CODE > 0x20605) + + if ((pci_dev = pci_get_device(0x1022, 0x700c, NULL))) { +#else + if ((pci_dev = pci_find_device(0x1022, 0x700c, NULL))) { +#endif + u32 val; + + /* Found AMD 762 North bridge */ + pci_read_config_dword(pci_dev, 0x4c, &val); + if ((val & 0x02) == 0) { + pci_write_config_dword(pci_dev, 0x4c, val | 0x02); + printk(KERN_INFO "%s: Setting AMD762 Northbridge to enable PCI ordering compliance\n", bcm5700_driver); + } + } + +#if (LINUX_VERSION_CODE > 0x20605) + + pci_dev_put(pci_dev); + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + + if ((pci_dev = pci_get_device(0x1066, 0x0017, NULL))) { + bcm_msi_chipset_bug = 1; + } + pci_dev_put(pci_dev); +#endif +#endif + + return 0; +} + + +static void __devexit +bcm5700_remove_one (struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata (pdev); + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + +#ifdef BCM_PROC_FS + bcm5700_proc_remove_dev(dev); +#endif +#ifdef BCM_IOCTL32 + atomic_dec(&bcm5700_load_count); + if (atomic_read(&bcm5700_load_count) == 0) + unregister_ioctl32_conversion(SIOCNICE); +#endif + unregister_netdev(dev); + + if (pUmDevice->lm_dev.pMappedMemBase) + iounmap(pUmDevice->lm_dev.pMappedMemBase); + + pci_release_regions(pdev); + +#if (LINUX_VERSION_CODE < 0x020600) + kfree(dev); +#else + free_netdev(dev); +#endif + + pci_set_drvdata(pdev, NULL); + +} + +int b57_test_intr(UM_DEVICE_BLOCK *pUmDevice); + +int +bcm5700_open(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + int rc; + + if (pUmDevice->suspended){ + return -EAGAIN; + } + /* delay for 6 seconds */ + pUmDevice->delayed_link_ind = (6 * HZ) / pUmDevice->timer_interval; + +#ifdef BCM_INT_COAL +#ifndef BCM_NAPI_RXPOLL + pUmDevice->adaptive_expiry = HZ / pUmDevice->timer_interval; +#endif +#endif + +#ifdef INCLUDE_TBI_SUPPORT + if ((pDevice->TbiFlags & ENABLE_TBI_FLAG) && + (pDevice->TbiFlags & TBI_POLLING_FLAGS)) { + pUmDevice->poll_tbi_interval = HZ / pUmDevice->timer_interval; + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) { + pUmDevice->poll_tbi_interval /= 4; + } + pUmDevice->poll_tbi_expiry = pUmDevice->poll_tbi_interval; + } +#endif + /* set this timer for 2 seconds */ + pUmDevice->asf_heartbeat = (2 * HZ) / pUmDevice->timer_interval; + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + + + if ( ( (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId) ) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5714_A0 ) && + (T3_CHIP_REV(pDevice->ChipRevId) != T3_CHIP_REV_5750_AX ) && + (T3_CHIP_REV(pDevice->ChipRevId) != T3_CHIP_REV_5750_BX ) ) && + !bcm_msi_chipset_bug ){ + + if (disable_msi[pUmDevice->index]==1){ + /* do nothing-it's not turned on */ + }else{ + pDevice->Flags |= USING_MSI_FLAG; + + REG_WR(pDevice, Msi.Mode, 2 ); + + rc = pci_enable_msi(pUmDevice->pdev); + + if(rc!=0){ + pDevice->Flags &= ~ USING_MSI_FLAG; + REG_WR(pDevice, Msi.Mode, 1 ); + } + } + } + + +#endif + + if ((rc= request_irq(pUmDevice->pdev->irq, &bcm5700_interrupt, SA_SHIRQ, dev->name, dev))) + { + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + + if(pDevice->Flags & USING_MSI_FLAG) { + + pci_disable_msi(pUmDevice->pdev); + pDevice->Flags &= ~USING_MSI_FLAG; + REG_WR(pDevice, Msi.Mode, 1 ); + + } +#endif + return rc; + } + + pUmDevice->opened = 1; + if (LM_InitializeAdapter(pDevice) != LM_STATUS_SUCCESS) { + pUmDevice->opened = 0; + free_irq(dev->irq, dev); + bcm5700_freemem(dev); + return -EAGAIN; + } + + bcm5700_set_vlan_mode(pUmDevice); + bcm5700_init_counters(pUmDevice); + + if (pDevice->Flags & UNDI_FIX_FLAG) { + printk(KERN_INFO "%s: Using indirect register access\n", dev->name); + } + + if (memcmp(dev->dev_addr, pDevice->NodeAddress, 6)) + { + /* Do not use invalid eth addrs: any multicast & all zeros */ + if( is_valid_ether_addr(dev->dev_addr) ){ + LM_SetMacAddress(pDevice, dev->dev_addr); + } + else + { + printk(KERN_INFO "%s: Invalid administered node address\n",dev->name); + memcpy(dev->dev_addr, pDevice->NodeAddress, 6); + } + } + + if (tigon3_debug > 1) + printk(KERN_DEBUG "%s: tigon3_open() irq %d.\n", dev->name, dev->irq); + + QQ_InitQueue(&pUmDevice->rx_out_of_buf_q.Container, + MAX_RX_PACKET_DESC_COUNT); + + +#if (LINUX_VERSION_CODE < 0x020300) + MOD_INC_USE_COUNT; +#endif + + atomic_set(&pUmDevice->intr_sem, 0); + + LM_EnableInterrupt(pDevice); + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + + if (pDevice->Flags & USING_MSI_FLAG){ + + /* int test to check support on older machines */ + if (b57_test_intr(pUmDevice) != 1) { + + LM_DisableInterrupt(pDevice); + free_irq(pUmDevice->pdev->irq, dev); + pci_disable_msi(pUmDevice->pdev); + REG_WR(pDevice, Msi.Mode, 1 ); + pDevice->Flags &= ~USING_MSI_FLAG; + + rc = LM_ResetAdapter(pDevice); +printk(KERN_ALERT " The MSI support in this system is not functional.\n"); + + if (rc == LM_STATUS_SUCCESS) + rc = 0; + else + rc = -ENODEV; + + if(rc == 0){ + rc = request_irq(pUmDevice->pdev->irq, &bcm5700_interrupt, + SA_SHIRQ, dev->name, dev); + } + + if(rc){ + LM_Halt(pDevice); + bcm5700_freemem(dev); + pUmDevice->opened = 0; + return rc; + } + + + pDevice->InitDone = TRUE; + atomic_set(&pUmDevice->intr_sem, 0); + LM_EnableInterrupt(pDevice); + } + } +#endif + + init_timer(&pUmDevice->timer); + pUmDevice->timer.expires = RUN_AT(pUmDevice->timer_interval); + pUmDevice->timer.data = (unsigned long)dev; + pUmDevice->timer.function = &bcm5700_timer; + add_timer(&pUmDevice->timer); + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) { + init_timer(&pUmDevice->statstimer); + pUmDevice->statstimer.expires = RUN_AT(pUmDevice->statstimer_interval); + pUmDevice->statstimer.data = (unsigned long)dev; + pUmDevice->statstimer.function = &bcm5700_stats_timer; + add_timer(&pUmDevice->statstimer); + } + + if(pDevice->Flags & USING_MSI_FLAG) + printk(KERN_INFO "%s: Using Message Signaled Interrupt (MSI) \n", dev->name); + else + printk(KERN_INFO "%s: Using PCI INTX interrupt \n", dev->name); + + netif_start_queue(dev); + + return 0; +} + + +STATIC void +bcm5700_stats_timer(unsigned long data) +{ + struct net_device *dev = (struct net_device *)data; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + unsigned long flags = 0; + + if (!pUmDevice->opened) + return; + + if (!atomic_read(&pUmDevice->intr_sem) && + !pUmDevice->suspended && + (pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE)) { + BCM5700_LOCK(pUmDevice, flags); + LM_GetStats(pDevice); + BCM5700_UNLOCK(pUmDevice, flags); + } + + pUmDevice->statstimer.expires = RUN_AT(pUmDevice->statstimer_interval); + + add_timer(&pUmDevice->statstimer); +} + + +STATIC void +bcm5700_timer(unsigned long data) +{ + struct net_device *dev = (struct net_device *)data; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + unsigned long flags = 0; + LM_UINT32 value32; + + if (!pUmDevice->opened) + return; + + if (atomic_read(&pUmDevice->intr_sem) || pUmDevice->suspended) { + pUmDevice->timer.expires = RUN_AT(pUmDevice->timer_interval); + add_timer(&pUmDevice->timer); + return; + } + +#ifdef INCLUDE_TBI_SUPPORT + if ((pDevice->TbiFlags & TBI_POLLING_FLAGS) && + (--pUmDevice->poll_tbi_expiry <= 0)) { + + BCM5700_PHY_LOCK(pUmDevice, flags); + value32 = REG_RD(pDevice, MacCtrl.Status); + if (((pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE) && + ((value32 & (MAC_STATUS_LINK_STATE_CHANGED | + MAC_STATUS_CFG_CHANGED)) || + !(value32 & MAC_STATUS_PCS_SYNCED))) + || + ((pDevice->LinkStatus != LM_STATUS_LINK_ACTIVE) && + (value32 & (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DETECTED)))) + { + LM_SetupPhy(pDevice); + } + BCM5700_PHY_UNLOCK(pUmDevice, flags); + pUmDevice->poll_tbi_expiry = pUmDevice->poll_tbi_interval; + + } +#endif + + if (pUmDevice->delayed_link_ind > 0) { + if (pUmDevice->delayed_link_ind == 1) + MM_IndicateStatus(pDevice, pDevice->LinkStatus); + else + pUmDevice->delayed_link_ind--; + } + + if (pUmDevice->crc_counter_expiry > 0) + pUmDevice->crc_counter_expiry--; + + if (!pUmDevice->interrupt) { + if (!(pDevice->Flags & USE_TAGGED_STATUS_FLAG)) { + BCM5700_LOCK(pUmDevice, flags); + if (pDevice->pStatusBlkVirt->Status & STATUS_BLOCK_UPDATED) { + /* This will generate an interrupt */ + REG_WR(pDevice, Grc.LocalCtrl, + pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_SET_INT); + } + else { + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | + HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + } + if (!(REG_RD(pDevice, DmaWrite.Mode) & + DMA_WRITE_MODE_ENABLE)) { + BCM5700_UNLOCK(pUmDevice, flags); + bcm5700_reset(dev); + } + else { + BCM5700_UNLOCK(pUmDevice, flags); + } + if (pUmDevice->tx_queued) { + pUmDevice->tx_queued = 0; + netif_wake_queue(dev); + } + } +#if (LINUX_VERSION_CODE < 0x02032b) + if ((QQ_GetEntryCnt(&pDevice->TxPacketFreeQ.Container) != + pDevice->TxPacketDescCnt) && + ((jiffies - dev->trans_start) > TX_TIMEOUT)) { + + printk(KERN_WARNING "%s: Tx hung\n", dev->name); + bcm5700_reset(dev); + } +#endif + } +#ifdef BCM_INT_COAL +#ifndef BCM_NAPI_RXPOLL + if (pUmDevice->adaptive_coalesce) { + pUmDevice->adaptive_expiry--; + if (pUmDevice->adaptive_expiry == 0) { + pUmDevice->adaptive_expiry = HZ / + pUmDevice->timer_interval; + bcm5700_adapt_coalesce(pUmDevice); + } + } +#endif +#endif + if (QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container) > + (unsigned int) pUmDevice->rx_buf_repl_panic_thresh) { + /* Generate interrupt and let isr allocate buffers */ + REG_WR(pDevice, HostCoalesce.Mode, pDevice->CoalesceMode | + HOST_COALESCE_ENABLE | HOST_COALESCE_NOW); + } + +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_ENABLED) { + pUmDevice->asf_heartbeat--; + if (pUmDevice->asf_heartbeat == 0) { + if( (pDevice->Flags & UNDI_FIX_FLAG) || + (pDevice->Flags & ENABLE_PCIX_FIX_FLAG)) { + MEM_WR_OFFSET(pDevice, T3_CMD_MAILBOX, + T3_CMD_NICDRV_ALIVE2); + MEM_WR_OFFSET(pDevice, T3_CMD_LENGTH_MAILBOX, + 4); + MEM_WR_OFFSET(pDevice, T3_CMD_DATA_MAILBOX, 5); + } else { + LM_RegWr(pDevice, + (T3_NIC_MBUF_POOL_ADDR + + T3_CMD_MAILBOX), + T3_CMD_NICDRV_ALIVE2, 1); + LM_RegWr(pDevice, + (T3_NIC_MBUF_POOL_ADDR + + T3_CMD_LENGTH_MAILBOX),4,1); + LM_RegWr(pDevice, + (T3_NIC_MBUF_POOL_ADDR + + T3_CMD_DATA_MAILBOX),5,1); + } + + value32 = REG_RD(pDevice, Grc.RxCpuEvent); + REG_WR(pDevice, Grc.RxCpuEvent, value32 | BIT_14); + pUmDevice->asf_heartbeat = (2 * HZ) / + pUmDevice->timer_interval; + } + } +#endif + + if (pDevice->PhyFlags & PHY_IS_FIBER){ + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_5714_FamFiberCheckLink(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + } + + pUmDevice->timer.expires = RUN_AT(pUmDevice->timer_interval); + add_timer(&pUmDevice->timer); +} + +STATIC int +bcm5700_init_counters(PUM_DEVICE_BLOCK pUmDevice) +{ +#ifdef BCM_INT_COAL +#ifndef BCM_NAPI_RXPOLL + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + pUmDevice->rx_curr_coalesce_frames = pDevice->RxMaxCoalescedFrames; + pUmDevice->rx_curr_coalesce_ticks = pDevice->RxCoalescingTicks; + pUmDevice->tx_curr_coalesce_frames = pDevice->TxMaxCoalescedFrames; + pUmDevice->rx_last_cnt = 0; + pUmDevice->tx_last_cnt = 0; +#endif +#endif + pUmDevice->phy_crc_count = 0; +#if TIGON3_DEBUG + pUmDevice->tx_zc_count = 0; + pUmDevice->tx_chksum_count = 0; + pUmDevice->tx_himem_count = 0; + pUmDevice->rx_good_chksum_count = 0; + pUmDevice->rx_bad_chksum_count = 0; +#endif +#ifdef BCM_TSO + pUmDevice->tso_pkt_count = 0; +#endif + return 0; +} + +#ifdef BCM_INT_COAL +#ifndef BCM_NAPI_RXPOLL +STATIC int +bcm5700_do_adapt_coalesce(PUM_DEVICE_BLOCK pUmDevice, + int rx_frames, int rx_ticks, int tx_frames, int rx_frames_intr) +{ + unsigned long flags = 0; + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + if (pUmDevice->do_global_lock) { + if (spin_is_locked(&pUmDevice->global_lock)) + return 0; + spin_lock_irqsave(&pUmDevice->global_lock, flags); + } + pUmDevice->rx_curr_coalesce_frames = rx_frames; + pUmDevice->rx_curr_coalesce_ticks = rx_ticks; + pUmDevice->tx_curr_coalesce_frames = tx_frames; + pUmDevice->rx_curr_coalesce_frames_intr = rx_frames_intr; + REG_WR(pDevice, HostCoalesce.RxMaxCoalescedFrames, rx_frames); + + REG_WR(pDevice, HostCoalesce.RxCoalescingTicks, rx_ticks); + + REG_WR(pDevice, HostCoalesce.TxMaxCoalescedFrames, tx_frames); + + REG_WR(pDevice, HostCoalesce.RxMaxCoalescedFramesDuringInt, + rx_frames_intr); + + BCM5700_UNLOCK(pUmDevice, flags); + return 0; +} + +STATIC int +bcm5700_adapt_coalesce(PUM_DEVICE_BLOCK pUmDevice) +{ + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + uint rx_curr_cnt, tx_curr_cnt, rx_delta, tx_delta, total_delta; + + rx_curr_cnt = pDevice->pStatsBlkVirt->ifHCInUcastPkts.Low; + tx_curr_cnt = pDevice->pStatsBlkVirt->ifHCOutUcastPkts.Low; + if ((rx_curr_cnt <= pUmDevice->rx_last_cnt) || + (tx_curr_cnt < pUmDevice->tx_last_cnt)) { + + /* skip if there is counter rollover */ + pUmDevice->rx_last_cnt = rx_curr_cnt; + pUmDevice->tx_last_cnt = tx_curr_cnt; + return 0; + } + + rx_delta = rx_curr_cnt - pUmDevice->rx_last_cnt; + tx_delta = tx_curr_cnt - pUmDevice->tx_last_cnt; + total_delta = (((rx_delta + rx_delta) + tx_delta) / 3) << 1; + + pUmDevice->rx_last_cnt = rx_curr_cnt; + pUmDevice->tx_last_cnt = tx_curr_cnt; + + if (total_delta < ADAPTIVE_LO_PKT_THRESH) { + if (pUmDevice->rx_curr_coalesce_frames != + ADAPTIVE_LO_RX_MAX_COALESCED_FRAMES) { + + bcm5700_do_adapt_coalesce(pUmDevice, + ADAPTIVE_LO_RX_MAX_COALESCED_FRAMES, + ADAPTIVE_LO_RX_COALESCING_TICKS, + ADAPTIVE_LO_TX_MAX_COALESCED_FRAMES, + ADAPTIVE_LO_RX_MAX_COALESCED_FRAMES_DURING_INT); + } + } + else if (total_delta < ADAPTIVE_HI_PKT_THRESH) { + if (pUmDevice->rx_curr_coalesce_frames != + DEFAULT_RX_MAX_COALESCED_FRAMES) { + + bcm5700_do_adapt_coalesce(pUmDevice, + DEFAULT_RX_MAX_COALESCED_FRAMES, + DEFAULT_RX_COALESCING_TICKS, + DEFAULT_TX_MAX_COALESCED_FRAMES, + DEFAULT_RX_MAX_COALESCED_FRAMES_DURING_INT); + } + } + else { + if (pUmDevice->rx_curr_coalesce_frames != + ADAPTIVE_HI_RX_MAX_COALESCED_FRAMES) { + + bcm5700_do_adapt_coalesce(pUmDevice, + ADAPTIVE_HI_RX_MAX_COALESCED_FRAMES, + ADAPTIVE_HI_RX_COALESCING_TICKS, + ADAPTIVE_HI_TX_MAX_COALESCED_FRAMES, + ADAPTIVE_HI_RX_MAX_COALESCED_FRAMES_DURING_INT); + } + } + return 0; +} +#endif +#endif + +STATIC void +bcm5700_reset(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + unsigned long flags; + +#ifdef BCM_TSO + + if( (dev->features & NETIF_F_TSO) && + (pUmDevice->tx_full) ) { + + dev->features &= ~NETIF_F_TSO; + } +#endif + + netif_stop_queue(dev); + bcm5700_intr_off(pUmDevice); + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_ResetAdapter(pDevice); + pDevice->InitDone = TRUE; + bcm5700_do_rx_mode(dev); + bcm5700_set_vlan_mode(pUmDevice); + bcm5700_init_counters(pUmDevice); + if (memcmp(dev->dev_addr, pDevice->NodeAddress, 6)) { + LM_SetMacAddress(pDevice, dev->dev_addr); + } + BCM5700_PHY_UNLOCK(pUmDevice, flags); + atomic_set(&pUmDevice->intr_sem, 1); + bcm5700_intr_on(pUmDevice); + netif_wake_queue(dev); +} + +STATIC void +bcm5700_set_vlan_mode(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + LM_UINT32 ReceiveMask = pDevice->ReceiveMask; + int vlan_tag_mode = pUmDevice->vlan_tag_mode; + + if (vlan_tag_mode == VLAN_TAG_MODE_AUTO_STRIP) { + if (pDevice->AsfFlags & ASF_ENABLED) { + vlan_tag_mode = VLAN_TAG_MODE_FORCED_STRIP; + } + else { + vlan_tag_mode = VLAN_TAG_MODE_NORMAL_STRIP; + } + } + if (vlan_tag_mode == VLAN_TAG_MODE_NORMAL_STRIP) { + ReceiveMask |= LM_KEEP_VLAN_TAG; +#ifdef BCM_VLAN + if (pUmDevice->vlgrp) + ReceiveMask &= ~LM_KEEP_VLAN_TAG; +#endif +#ifdef NICE_SUPPORT + if (pUmDevice->nice_rx) + ReceiveMask &= ~LM_KEEP_VLAN_TAG; +#endif + } + else if (vlan_tag_mode == VLAN_TAG_MODE_FORCED_STRIP) { + ReceiveMask &= ~LM_KEEP_VLAN_TAG; + } + if (ReceiveMask != pDevice->ReceiveMask) + { + LM_SetReceiveMask(pDevice, ReceiveMask); + } +} + +static void +bcm5700_poll_wait(UM_DEVICE_BLOCK *pUmDevice) +{ +#ifdef BCM_NAPI_RXPOLL + while (pUmDevice->lm_dev.RxPoll) { + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(1); + } +#endif +} + + +#ifdef BCM_VLAN +STATIC void +bcm5700_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + + bcm5700_intr_off(pUmDevice); + bcm5700_poll_wait(pUmDevice); + pUmDevice->vlgrp = vlgrp; + bcm5700_set_vlan_mode(pUmDevice); + bcm5700_intr_on(pUmDevice); +} + +STATIC void +bcm5700_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + + bcm5700_intr_off(pUmDevice); + bcm5700_poll_wait(pUmDevice); + if (pUmDevice->vlgrp) { + pUmDevice->vlgrp->vlan_devices[vid] = NULL; + } + bcm5700_intr_on(pUmDevice); +} +#endif + +STATIC int +bcm5700_start_xmit(struct sk_buff *skb, struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + PLM_PACKET pPacket; + PUM_PACKET pUmPacket; + unsigned long flags = 0; + int frag_no; +#ifdef NICE_SUPPORT + vlan_tag_t *vlan_tag; +#endif +#ifdef BCM_TSO + LM_UINT32 mss = 0 ; + uint16_t ip_tcp_len, tcp_opt_len, tcp_seg_flags; +#endif + + if ((pDevice->LinkStatus == LM_STATUS_LINK_DOWN) || + !pDevice->InitDone || pUmDevice->suspended) + { + dev_kfree_skb(skb); + return 0; + } + +#if (LINUX_VERSION_CODE < 0x02032b) + if (test_and_set_bit(0, &dev->tbusy)) { + return 1; + } +#endif + + if (pUmDevice->do_global_lock && pUmDevice->interrupt) { + /* Fix for RQM 289636 */ + /* netif_stop_queue(dev); */ + bcm5700_netif_stop_queue(dev); + pUmDevice->tx_queued = 1; + if (!pUmDevice->interrupt) { + netif_wake_queue(dev); + pUmDevice->tx_queued = 0; + } + return 1; + } + + pPacket = (PLM_PACKET) + QQ_PopHead(&pDevice->TxPacketFreeQ.Container); + if (pPacket == 0) { + /* Fix for RQM 289636 */ + /* netif_stop_queue(dev); */ + bcm5700_netif_stop_queue(dev); + pUmDevice->tx_full = 1; + if (QQ_GetEntryCnt(&pDevice->TxPacketFreeQ.Container)) { + netif_wake_queue(dev); + pUmDevice->tx_full = 0; + } + return 1; + } + pUmPacket = (PUM_PACKET) pPacket; + pUmPacket->skbuff = skb; + + if (skb->ip_summed == CHECKSUM_HW) { + pPacket->Flags = SND_BD_FLAG_TCP_UDP_CKSUM; +#if TIGON3_DEBUG + pUmDevice->tx_chksum_count++; +#endif + } + else { + pPacket->Flags = 0; + } +#if MAX_SKB_FRAGS + frag_no = skb_shinfo(skb)->nr_frags; +#else + frag_no = 0; +#endif + if (atomic_read(&pDevice->SendBdLeft) < (frag_no + 1)) { + /* Fix for RQM 289636 */ + /* netif_stop_queue(dev); */ + bcm5700_netif_stop_queue(dev); + pUmDevice->tx_full = 1; + QQ_PushHead(&pDevice->TxPacketFreeQ.Container, pPacket); + if (atomic_read(&pDevice->SendBdLeft) >= (frag_no + 1)) { + netif_wake_queue(dev); + pUmDevice->tx_full = 0; + } + return 1; + } + + pPacket->u.Tx.FragCount = frag_no + 1; +#if TIGON3_DEBUG + if (pPacket->u.Tx.FragCount > 1) + pUmDevice->tx_zc_count++; +#endif + +#ifdef BCM_VLAN + if (pUmDevice->vlgrp && vlan_tx_tag_present(skb)) { + pPacket->VlanTag = vlan_tx_tag_get(skb); + pPacket->Flags |= SND_BD_FLAG_VLAN_TAG; + } +#endif +#ifdef NICE_SUPPORT + vlan_tag = (vlan_tag_t *) &skb->cb[0]; + if (vlan_tag->signature == 0x5555) { + pPacket->VlanTag = vlan_tag->tag; + pPacket->Flags |= SND_BD_FLAG_VLAN_TAG; + vlan_tag->signature = 0; + } +#endif + +#ifdef BCM_TSO + if ((mss = (LM_UINT32) skb_shinfo(skb)->tso_size) && + (skb->len > pDevice->TxMtu)) { + +#if (LINUX_VERSION_CODE >= 0x02060c) + + if (skb_header_cloned(skb) && + pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { + + dev_kfree_skb(skb); + return 0; + } +#endif + pUmDevice->tso_pkt_count++; + + pPacket->Flags |= SND_BD_FLAG_CPU_PRE_DMA | + SND_BD_FLAG_CPU_POST_DMA; + + tcp_opt_len = 0; + if (skb->h.th->doff > 5) { + tcp_opt_len = (skb->h.th->doff - 5) << 2; + } + ip_tcp_len = (skb->nh.iph->ihl << 2) + sizeof(struct tcphdr); + skb->nh.iph->check = 0; + + if ( T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId) ){ + skb->h.th->check = 0; + pPacket->Flags &= ~SND_BD_FLAG_TCP_UDP_CKSUM; + } + else { + skb->h.th->check = ~csum_tcpudp_magic( + skb->nh.iph->saddr, skb->nh.iph->daddr, + 0, IPPROTO_TCP, 0); + } + + skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); + tcp_seg_flags = 0; + + if (tcp_opt_len || (skb->nh.iph->ihl > 5)) { + if ( T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) ){ + tcp_seg_flags = + ((skb->nh.iph->ihl - 5) + + (tcp_opt_len >> 2)) << 11; + } + else { + pPacket->Flags |= + ((skb->nh.iph->ihl - 5) + + (tcp_opt_len >> 2)) << 12; + } + } + pPacket->u.Tx.MaxSegmentSize = mss | tcp_seg_flags; + } + else + { + pPacket->u.Tx.MaxSegmentSize = 0; + } +#endif + BCM5700_LOCK(pUmDevice, flags); + LM_SendPacket(pDevice, pPacket); + BCM5700_UNLOCK(pUmDevice, flags); + +#if (LINUX_VERSION_CODE < 0x02032b) + netif_wake_queue(dev); +#endif + dev->trans_start = jiffies; + + + return 0; +} + +#ifdef BCM_NAPI_RXPOLL +STATIC int +bcm5700_poll(struct net_device *dev, int *budget) +{ + int orig_budget = *budget; + int work_done; + UM_DEVICE_BLOCK *pUmDevice = (UM_DEVICE_BLOCK *) dev->priv; + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + unsigned long flags = 0; + LM_UINT32 tag; + + if (orig_budget > dev->quota) + orig_budget = dev->quota; + + BCM5700_LOCK(pUmDevice, flags); + work_done = LM_ServiceRxPoll(pDevice, orig_budget); + *budget -= work_done; + dev->quota -= work_done; + + if (QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container)) { + replenish_rx_buffers(pUmDevice, 0); + } + BCM5700_UNLOCK(pUmDevice, flags); + if (work_done) { + MM_IndicateRxPackets(pDevice); + BCM5700_LOCK(pUmDevice, flags); + LM_QueueRxPackets(pDevice); + BCM5700_UNLOCK(pUmDevice, flags); + } + if ((work_done < orig_budget) || atomic_read(&pUmDevice->intr_sem) || + pUmDevice->suspended) { + + netif_rx_complete(dev); + BCM5700_LOCK(pUmDevice, flags); + REG_WR(pDevice, Grc.Mode, pDevice->GrcMode); + pDevice->RxPoll = FALSE; + if (pDevice->RxPoll) { + BCM5700_UNLOCK(pUmDevice, flags); + return 0; + } + /* Take care of possible missed rx interrupts */ + REG_RD_BACK(pDevice, Grc.Mode); /* flush the register write */ + tag = pDevice->pStatusBlkVirt->StatusTag; + if ((pDevice->pStatusBlkVirt->Status & STATUS_BLOCK_UPDATED) || + (pDevice->pStatusBlkVirt->Idx[0].RcvProdIdx != + pDevice->RcvRetConIdx)) { + + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + } + /* If a new status block is pending in the WDMA state machine */ + /* before the register write to enable the rx interrupt, */ + /* the new status block may DMA with no interrupt. In this */ + /* scenario, the tag read above will be older than the tag in */ + /* the pending status block and writing the older tag will */ + /* cause interrupt to be generated. */ + else if (pDevice->Flags & USE_TAGGED_STATUS_FLAG) { + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, + tag << 24); + /* Make sure we service tx in case some tx interrupts */ + /* are cleared */ + if (atomic_read(&pDevice->SendBdLeft) < + (T3_SEND_RCB_ENTRY_COUNT / 2)) { + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | + HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + } + } + BCM5700_UNLOCK(pUmDevice, flags); + return 0; + } + return 1; +} +#endif /* BCM_NAPI_RXPOLL */ + +STATIC irqreturn_t +bcm5700_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +{ + struct net_device *dev = (struct net_device *)dev_instance; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + LM_UINT32 oldtag, newtag; + int i, max_intr_loop; +#ifdef BCM_TASKLET + int repl_buf_count; +#endif + unsigned int handled = 1; + + if (!pDevice->InitDone) { + handled = 0; + return IRQ_RETVAL(handled); + } + + bcm5700_intr_lock(pUmDevice); + if (atomic_read(&pUmDevice->intr_sem)) { + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 1); + bcm5700_intr_unlock(pUmDevice); + handled = 0; + return IRQ_RETVAL(handled); + } + + if (test_and_set_bit(0, (void*)&pUmDevice->interrupt)) { + printk(KERN_ERR "%s: Duplicate entry of the interrupt handler\n", + dev->name); + bcm5700_intr_unlock(pUmDevice); + handled = 0; + return IRQ_RETVAL(handled); + } + + if ((pDevice->Flags & USING_MSI_FLAG) || + (pDevice->pStatusBlkVirt->Status & STATUS_BLOCK_UPDATED) || + !(REG_RD(pDevice,PciCfg.PciState) & T3_PCI_STATE_INTERRUPT_NOT_ACTIVE) ) + { + + if (pUmDevice->intr_test) { + if (!(REG_RD(pDevice, PciCfg.PciState) & + T3_PCI_STATE_INTERRUPT_NOT_ACTIVE) || + pDevice->Flags & USING_MSI_FLAG ) { + pUmDevice->intr_test_result = 1; + } + pUmDevice->intr_test = 0; + } + +#ifdef BCM_NAPI_RXPOLL + max_intr_loop = 1; +#else + max_intr_loop = 50; +#endif + if (pDevice->Flags & USE_TAGGED_STATUS_FLAG) { + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 1); + oldtag = pDevice->pStatusBlkVirt->StatusTag; + + for (i = 0; ; i++) { + pDevice->pStatusBlkVirt->Status &= ~STATUS_BLOCK_UPDATED; + + LM_ServiceInterrupts(pDevice); + newtag = pDevice->pStatusBlkVirt->StatusTag; + if ((newtag == oldtag) || (i > max_intr_loop)) { + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, oldtag << 24); + pDevice->LastTag = oldtag; + if (pDevice->Flags & UNDI_FIX_FLAG) { + REG_WR(pDevice, Grc.LocalCtrl, + pDevice->GrcLocalCtrl | 0x2); + } + break; + } + oldtag = newtag; + } + } + else + { + i = 0; + do { + uint dummy; + + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 1); + pDevice->pStatusBlkVirt->Status &= ~STATUS_BLOCK_UPDATED; + LM_ServiceInterrupts(pDevice); + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 0); + dummy = MB_REG_RD(pDevice, Mailbox.Interrupt[0].Low); + i++; + } + while ((pDevice->pStatusBlkVirt->Status & STATUS_BLOCK_UPDATED) && + (i < max_intr_loop)); + + if (pDevice->Flags & UNDI_FIX_FLAG) { + REG_WR(pDevice, Grc.LocalCtrl, + pDevice->GrcLocalCtrl | 0x2); + } + } + } + else + { + /* not my interrupt */ + handled = 0; + } + +#ifdef BCM_TASKLET + repl_buf_count = QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container); + if (((repl_buf_count > pUmDevice->rx_buf_repl_panic_thresh) || + pDevice->QueueAgain) && + (!test_and_set_bit(0, &pUmDevice->tasklet_busy))) { + + replenish_rx_buffers(pUmDevice, pUmDevice->rx_buf_repl_isr_limit); + clear_bit(0, (void*)&pUmDevice->tasklet_busy); + } + else if ((repl_buf_count > pUmDevice->rx_buf_repl_thresh) && + !pUmDevice->tasklet_pending) { + + pUmDevice->tasklet_pending = 1; + tasklet_schedule(&pUmDevice->tasklet); + } +#else +#ifdef BCM_NAPI_RXPOLL + if (!pDevice->RxPoll && + QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container)) { + pDevice->RxPoll = 1; + MM_ScheduleRxPoll(pDevice); + } +#else + if (QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container)) { + replenish_rx_buffers(pUmDevice, 0); + } + + if (QQ_GetEntryCnt(&pDevice->RxPacketFreeQ.Container) || + pDevice->QueueAgain) { + + LM_QueueRxPackets(pDevice); + } +#endif +#endif + + clear_bit(0, (void*)&pUmDevice->interrupt); + bcm5700_intr_unlock(pUmDevice); + if (pUmDevice->tx_queued) { + pUmDevice->tx_queued = 0; + netif_wake_queue(dev); + } + return IRQ_RETVAL(handled); +} + + +#ifdef BCM_TASKLET +STATIC void +bcm5700_tasklet(unsigned long data) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)data; + unsigned long flags = 0; + + /* RH 7.2 Beta 3 tasklets are reentrant */ + if (test_and_set_bit(0, &pUmDevice->tasklet_busy)) { + pUmDevice->tasklet_pending = 0; + return; + } + + pUmDevice->tasklet_pending = 0; + if (pUmDevice->opened && !pUmDevice->suspended) { + BCM5700_LOCK(pUmDevice, flags); + replenish_rx_buffers(pUmDevice, 0); + BCM5700_UNLOCK(pUmDevice, flags); + } + + clear_bit(0, &pUmDevice->tasklet_busy); +} +#endif + +STATIC int +bcm5700_close(struct net_device *dev) +{ + + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + +#if (LINUX_VERSION_CODE < 0x02032b) + dev->start = 0; +#endif + /* Fix for RQM 289636 */ + /* netif_stop_queue(dev); */ + bcm5700_netif_stop_queue(dev); + pUmDevice->opened = 0; + +#ifdef BCM_ASF + if( !(pDevice->AsfFlags & ASF_ENABLED) ) +#endif +#ifdef BCM_WOL + if( enable_wol[pUmDevice->index] == 0 ) +#endif + printk(KERN_INFO "%s: %s NIC Link is DOWN\n", bcm5700_driver, dev->name); + + if (tigon3_debug > 1) + printk(KERN_DEBUG "%s: Shutting down Tigon3\n", + dev->name); + + LM_MulticastClear(pDevice); + bcm5700_shutdown(pUmDevice); + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) { + del_timer_sync(&pUmDevice->statstimer); + } + + del_timer_sync(&pUmDevice->timer); + + free_irq(pUmDevice->pdev->irq, dev); + +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + + if(pDevice->Flags & USING_MSI_FLAG) { + pci_disable_msi(pUmDevice->pdev); + REG_WR(pDevice, Msi.Mode, 1 ); + pDevice->Flags &= ~USING_MSI_FLAG; + } + +#endif + + +#if (LINUX_VERSION_CODE < 0x020300) + MOD_DEC_USE_COUNT; +#endif + { + + LM_SetPowerState(pDevice, LM_POWER_STATE_D3); + } + + bcm5700_freemem(dev); + + QQ_InitQueue(&pDevice->RxPacketFreeQ.Container, + MAX_RX_PACKET_DESC_COUNT); + + return 0; +} + +STATIC int +bcm5700_freemem(struct net_device *dev) +{ + int i; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + for (i = 0; i < pUmDevice->mem_list_num; i++) { + if (pUmDevice->mem_size_list[i] == 0) { + kfree(pUmDevice->mem_list[i]); + } + else { + pci_free_consistent(pUmDevice->pdev, + (size_t) pUmDevice->mem_size_list[i], + pUmDevice->mem_list[i], + pUmDevice->dma_list[i]); + } + } + + pDevice->pStatusBlkVirt = 0; + pDevice->pStatsBlkVirt = 0; + pUmDevice->mem_list_num = 0; + +#ifdef NICE_SUPPORT + if (!pUmDevice->opened) { + for (i = 0; i < MAX_MEM2; i++) { + if (pUmDevice->mem_size_list2[i]) { + bcm5700_freemem2(pUmDevice, i); + } + } + } +#endif + return 0; +} + +#ifdef NICE_SUPPORT +/* Frees consistent memory allocated through ioctl */ +/* The memory to be freed is in mem_list2[index] */ +STATIC int +bcm5700_freemem2(UM_DEVICE_BLOCK *pUmDevice, int index) +{ +#if (LINUX_VERSION_CODE >= 0x020400) + void *ptr; + struct page *pg, *last_pg; + + /* Probably won't work on some architectures */ + ptr = pUmDevice->mem_list2[index], + pg = virt_to_page(ptr); + last_pg = virt_to_page(ptr + pUmDevice->mem_size_list2[index] - 1); + for (; ; pg++) { +#if (LINUX_VERSION_CODE > 0x020500) + ClearPageReserved(pg); +#else + mem_map_unreserve(pg); +#endif + if (pg == last_pg) + break; + } + pci_free_consistent(pUmDevice->pdev, + (size_t) pUmDevice->mem_size_list2[index], + pUmDevice->mem_list2[index], + pUmDevice->dma_list2[index]); + pUmDevice->mem_size_list2[index] = 0; +#endif + return 0; +} +#endif + +uint64_t +bcm5700_crc_count(PUM_DEVICE_BLOCK pUmDevice) +{ + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + LM_UINT32 Value32; + PT3_STATS_BLOCK pStats = (PT3_STATS_BLOCK) pDevice->pStatsBlkVirt; + unsigned long flags; + + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG)) { + + if (!pUmDevice->opened || !pDevice->InitDone) + { + + return 0; + } + + /* regulate MDIO access during run time */ + if (pUmDevice->crc_counter_expiry > 0) + return pUmDevice->phy_crc_count; + + pUmDevice->crc_counter_expiry = (5 * HZ) / + pUmDevice->timer_interval; + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_ReadPhy(pDevice, 0x1e, &Value32); + if ((Value32 & 0x8000) == 0) + LM_WritePhy(pDevice, 0x1e, Value32 | 0x8000); + LM_ReadPhy(pDevice, 0x14, &Value32); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + /* Sometimes data on the MDIO bus can be corrupted */ + if (Value32 != 0xffff) + pUmDevice->phy_crc_count += Value32; + return pUmDevice->phy_crc_count; + } + else if (pStats == 0) { + return 0; + } + else { + return (MM_GETSTATS64(pStats->dot3StatsFCSErrors)); + } +} + +uint64_t +bcm5700_rx_err_count(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + T3_STATS_BLOCK *pStats = (T3_STATS_BLOCK *) pDevice->pStatsBlkVirt; + + if (pStats == 0) + return 0; + return (bcm5700_crc_count(pUmDevice) + + MM_GETSTATS64(pStats->dot3StatsAlignmentErrors) + + MM_GETSTATS64(pStats->etherStatsUndersizePkts) + + MM_GETSTATS64(pStats->etherStatsFragments) + + MM_GETSTATS64(pStats->dot3StatsFramesTooLong) + + MM_GETSTATS64(pStats->etherStatsJabbers)); +} + +STATIC struct net_device_stats * +bcm5700_get_stats(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + PT3_STATS_BLOCK pStats = (PT3_STATS_BLOCK) pDevice->pStatsBlkVirt; + struct net_device_stats *p_netstats = &pUmDevice->stats; + + if (pStats == 0) + return p_netstats; + + /* Get stats from LM */ + p_netstats->rx_packets = + MM_GETSTATS(pStats->ifHCInUcastPkts) + + MM_GETSTATS(pStats->ifHCInMulticastPkts) + + MM_GETSTATS(pStats->ifHCInBroadcastPkts); + p_netstats->tx_packets = + MM_GETSTATS(pStats->ifHCOutUcastPkts) + + MM_GETSTATS(pStats->ifHCOutMulticastPkts) + + MM_GETSTATS(pStats->ifHCOutBroadcastPkts); + p_netstats->rx_bytes = MM_GETSTATS(pStats->ifHCInOctets); + p_netstats->tx_bytes = MM_GETSTATS(pStats->ifHCOutOctets); + p_netstats->tx_errors = + MM_GETSTATS(pStats->dot3StatsInternalMacTransmitErrors) + + MM_GETSTATS(pStats->dot3StatsCarrierSenseErrors) + + MM_GETSTATS(pStats->ifOutDiscards) + + MM_GETSTATS(pStats->ifOutErrors); + p_netstats->multicast = MM_GETSTATS(pStats->ifHCInMulticastPkts); + p_netstats->collisions = MM_GETSTATS(pStats->etherStatsCollisions); + p_netstats->rx_length_errors = + MM_GETSTATS(pStats->dot3StatsFramesTooLong) + + MM_GETSTATS(pStats->etherStatsUndersizePkts); + p_netstats->rx_over_errors = MM_GETSTATS(pStats->nicNoMoreRxBDs); + p_netstats->rx_frame_errors = + MM_GETSTATS(pStats->dot3StatsAlignmentErrors); + p_netstats->rx_crc_errors = (unsigned long) + bcm5700_crc_count(pUmDevice); + p_netstats->rx_errors = (unsigned long) + bcm5700_rx_err_count(pUmDevice); + + p_netstats->tx_aborted_errors = MM_GETSTATS(pStats->ifOutDiscards); + p_netstats->tx_carrier_errors = + MM_GETSTATS(pStats->dot3StatsCarrierSenseErrors); + + return p_netstats; +} + +void +b57_suspend_chip(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + if (pUmDevice->opened) { + bcm5700_intr_off(pUmDevice); + netif_carrier_off(pUmDevice->dev); + netif_stop_queue(pUmDevice->dev); +#ifdef BCM_TASKLET + tasklet_kill(&pUmDevice->tasklet); +#endif + bcm5700_poll_wait(pUmDevice); + } + pUmDevice->suspended = 1; + LM_ShutdownChip(pDevice, LM_SUSPEND_RESET); +} + +void +b57_resume_chip(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + if (pUmDevice->suspended) { + pUmDevice->suspended = 0; + if (pUmDevice->opened) { + bcm5700_reset(pUmDevice->dev); + } + else { + LM_ShutdownChip(pDevice, LM_SHUTDOWN_RESET); + } + } +} + +/* Returns 0 on failure, 1 on success */ +int +b57_test_intr(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + int j; + + if (!pUmDevice->opened) + return 0; + pUmDevice->intr_test_result = 0; + pUmDevice->intr_test = 1; + + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + + for (j = 0; j < 10; j++) { + if (pUmDevice->intr_test_result){ + break; + } + + REG_WR(pDevice, HostCoalesce.Mode, + pDevice->CoalesceMode | HOST_COALESCE_ENABLE | + HOST_COALESCE_NOW); + + MM_Sleep(pDevice, 1); + } + + return pUmDevice->intr_test_result; + +} + +#ifdef SIOCETHTOOL + +#ifdef ETHTOOL_GSTRINGS + +#define ETH_NUM_STATS 30 +#define RX_CRC_IDX 5 +#define RX_MAC_ERR_IDX 14 + +struct { + char string[ETH_GSTRING_LEN]; +} bcm5700_stats_str_arr[ETH_NUM_STATS] = { + { "rx_unicast_packets" }, + { "rx_multicast_packets" }, + { "rx_broadcast_packets" }, + { "rx_bytes" }, + { "rx_fragments" }, + { "rx_crc_errors" }, /* this needs to be calculated */ + { "rx_align_errors" }, + { "rx_xon_frames" }, + { "rx_xoff_frames" }, + { "rx_long_frames" }, + { "rx_short_frames" }, + { "rx_jabber" }, + { "rx_discards" }, + { "rx_errors" }, + { "rx_mac_errors" }, /* this needs to be calculated */ + { "tx_unicast_packets" }, + { "tx_multicast_packets" }, + { "tx_broadcast_packets" }, + { "tx_bytes" }, + { "tx_deferred" }, + { "tx_single_collisions" }, + { "tx_multi_collisions" }, + { "tx_total_collisions" }, + { "tx_excess_collisions" }, + { "tx_late_collisions" }, + { "tx_xon_frames" }, + { "tx_xoff_frames" }, + { "tx_internal_mac_errors" }, + { "tx_carrier_errors" }, + { "tx_errors" }, +}; + +#define STATS_OFFSET(offset_name) ((OFFSETOF(T3_STATS_BLOCK, offset_name)) / sizeof(uint64_t)) + +#ifdef __BIG_ENDIAN +#define SWAP_DWORD_64(x) (x) +#else +#define SWAP_DWORD_64(x) ((x << 32) | (x >> 32)) +#endif + +unsigned long bcm5700_stats_offset_arr[ETH_NUM_STATS] = { + STATS_OFFSET(ifHCInUcastPkts), + STATS_OFFSET(ifHCInMulticastPkts), + STATS_OFFSET(ifHCInBroadcastPkts), + STATS_OFFSET(ifHCInOctets), + STATS_OFFSET(etherStatsFragments), + 0, + STATS_OFFSET(dot3StatsAlignmentErrors), + STATS_OFFSET(xonPauseFramesReceived), + STATS_OFFSET(xoffPauseFramesReceived), + STATS_OFFSET(dot3StatsFramesTooLong), + STATS_OFFSET(etherStatsUndersizePkts), + STATS_OFFSET(etherStatsJabbers), + STATS_OFFSET(ifInDiscards), + STATS_OFFSET(ifInErrors), + 0, + STATS_OFFSET(ifHCOutUcastPkts), + STATS_OFFSET(ifHCOutMulticastPkts), + STATS_OFFSET(ifHCOutBroadcastPkts), + STATS_OFFSET(ifHCOutOctets), + STATS_OFFSET(dot3StatsDeferredTransmissions), + STATS_OFFSET(dot3StatsSingleCollisionFrames), + STATS_OFFSET(dot3StatsMultipleCollisionFrames), + STATS_OFFSET(etherStatsCollisions), + STATS_OFFSET(dot3StatsExcessiveCollisions), + STATS_OFFSET(dot3StatsLateCollisions), + STATS_OFFSET(outXonSent), + STATS_OFFSET(outXoffSent), + STATS_OFFSET(dot3StatsInternalMacTransmitErrors), + STATS_OFFSET(dot3StatsCarrierSenseErrors), + STATS_OFFSET(ifOutErrors), +}; + +#endif /* ETHTOOL_GSTRINGS */ + +#ifdef ETHTOOL_TEST +#define ETH_NUM_TESTS 6 +struct { + char string[ETH_GSTRING_LEN]; +} bcm5700_tests_str_arr[ETH_NUM_TESTS] = { + { "register test (offline)" }, + { "memory test (offline)" }, + { "loopback test (offline)" }, + { "nvram test (online)" }, + { "interrupt test (online)" }, + { "link test (online)" }, +}; + +extern LM_STATUS b57_test_registers(UM_DEVICE_BLOCK *pUmDevice); +extern LM_STATUS b57_test_memory(UM_DEVICE_BLOCK *pUmDevice); +extern LM_STATUS b57_test_nvram(UM_DEVICE_BLOCK *pUmDevice); +extern LM_STATUS b57_test_link(UM_DEVICE_BLOCK *pUmDevice); +extern LM_STATUS b57_test_loopback(UM_DEVICE_BLOCK *pUmDevice, int looptype, int linespeed); +#endif + +#ifdef ETHTOOL_GREGS +#if (LINUX_VERSION_CODE >= 0x02040f) +static void +bcm5700_get_reg_blk(UM_DEVICE_BLOCK *pUmDevice, u32 **buf, u32 start, u32 end, + int reserved) +{ + u32 offset; + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + + if (reserved) { + memset(*buf, 0, end - start); + *buf = *buf + (end - start)/4; + return; + } + for (offset = start; offset < end; offset+=4, *buf = *buf + 1) { + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)){ + if (((offset >= 0x3400) && (offset < 0x3c00)) || + ((offset >= 0x5400) && (offset < 0x5800)) || + ((offset >= 0x6400) && (offset < 0x6800))) { + **buf = 0; + continue; + } + } + **buf = REG_RD_OFFSET(pDevice, offset); + } +} +#endif +#endif + +static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr) +{ + struct ethtool_cmd ethcmd; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + + if (mm_copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) + return -EFAULT; + + switch (ethcmd.cmd) { +#ifdef ETHTOOL_GDRVINFO + case ETHTOOL_GDRVINFO: { + struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO}; + + strcpy(info.driver, bcm5700_driver); +#ifdef INCLUDE_5701_AX_FIX + if(pDevice->ChipRevId == T3_CHIP_ID_5701_A0) { + extern int t3FwReleaseMajor; + extern int t3FwReleaseMinor; + extern int t3FwReleaseFix; + + sprintf(info.fw_version, "%i.%i.%i", + t3FwReleaseMajor, t3FwReleaseMinor, + t3FwReleaseFix); + } +#endif + strcpy(info.fw_version, pDevice->BootCodeVer); + strcpy(info.version, bcm5700_version); +#if (LINUX_VERSION_CODE <= 0x020422) + strcpy(info.bus_info, pUmDevice->pdev->slot_name); +#else + strcpy(info.bus_info, pci_name(pUmDevice->pdev)); +#endif + + + +#ifdef ETHTOOL_GEEPROM + BCM_EEDUMP_LEN(&info, pDevice->NvramSize); +#endif +#ifdef ETHTOOL_GREGS + /* dump everything, including holes in the register space */ + info.regdump_len = 0x6c00; +#endif +#ifdef ETHTOOL_GSTATS + info.n_stats = ETH_NUM_STATS; +#endif +#ifdef ETHTOOL_TEST + info.testinfo_len = ETH_NUM_TESTS; +#endif + if (mm_copy_to_user(useraddr, &info, sizeof(info))) + return -EFAULT; + return 0; + } +#endif + case ETHTOOL_GSET: { + if ((pDevice->TbiFlags & ENABLE_TBI_FLAG)|| + (pDevice->PhyFlags & PHY_IS_FIBER)) { + ethcmd.supported = + (SUPPORTED_1000baseT_Full | + SUPPORTED_Autoneg); + ethcmd.supported |= SUPPORTED_FIBRE; + ethcmd.port = PORT_FIBRE; + } + else { + ethcmd.supported = + (SUPPORTED_10baseT_Half | + SUPPORTED_10baseT_Full | + SUPPORTED_100baseT_Half | + SUPPORTED_100baseT_Full | + SUPPORTED_1000baseT_Half | + SUPPORTED_1000baseT_Full | + SUPPORTED_Autoneg); + ethcmd.supported |= SUPPORTED_TP; + ethcmd.port = PORT_TP; + } + + ethcmd.transceiver = XCVR_INTERNAL; + ethcmd.phy_address = 0; + + if (pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) + ethcmd.speed = SPEED_1000; + else if (pDevice->LineSpeed == LM_LINE_SPEED_100MBPS) + ethcmd.speed = SPEED_100; + else if (pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) + ethcmd.speed = SPEED_10; + else + ethcmd.speed = 0; + + if (pDevice->DuplexMode == LM_DUPLEX_MODE_FULL) + ethcmd.duplex = DUPLEX_FULL; + else + ethcmd.duplex = DUPLEX_HALF; + + if (pDevice->DisableAutoNeg == FALSE) { + ethcmd.autoneg = AUTONEG_ENABLE; + ethcmd.advertising = ADVERTISED_Autoneg; + if ((pDevice->TbiFlags & ENABLE_TBI_FLAG) || + (pDevice->PhyFlags & PHY_IS_FIBER)) { + ethcmd.advertising |= + ADVERTISED_1000baseT_Full | + ADVERTISED_FIBRE; + } + else { + ethcmd.advertising |= + ADVERTISED_TP; + if (pDevice->advertising & + PHY_AN_AD_10BASET_HALF) { + + ethcmd.advertising |= + ADVERTISED_10baseT_Half; + } + if (pDevice->advertising & + PHY_AN_AD_10BASET_FULL) { + + ethcmd.advertising |= + ADVERTISED_10baseT_Full; + } + if (pDevice->advertising & + PHY_AN_AD_100BASETX_HALF) { + + ethcmd.advertising |= + ADVERTISED_100baseT_Half; + } + if (pDevice->advertising & + PHY_AN_AD_100BASETX_FULL) { + + ethcmd.advertising |= + ADVERTISED_100baseT_Full; + } + if (pDevice->advertising1000 & + BCM540X_AN_AD_1000BASET_HALF) { + + ethcmd.advertising |= + ADVERTISED_1000baseT_Half; + } + if (pDevice->advertising1000 & + BCM540X_AN_AD_1000BASET_FULL) { + + ethcmd.advertising |= + ADVERTISED_1000baseT_Full; + } + } + } + else { + ethcmd.autoneg = AUTONEG_DISABLE; + ethcmd.advertising = 0; + } + + ethcmd.maxtxpkt = pDevice->TxMaxCoalescedFrames; + ethcmd.maxrxpkt = pDevice->RxMaxCoalescedFrames; + + if(mm_copy_to_user(useraddr, ðcmd, sizeof(ethcmd))) + return -EFAULT; + return 0; + } + case ETHTOOL_SSET: { + unsigned long flags; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (ethcmd.autoneg == AUTONEG_ENABLE) { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->RequestedDuplexMode = LM_DUPLEX_MODE_UNKNOWN; + pDevice->DisableAutoNeg = FALSE; + } + else { + if (ethcmd.speed == SPEED_1000 && + pDevice->PhyFlags & PHY_NO_GIGABIT) + return -EINVAL; + + if (ethcmd.speed == SPEED_1000 && + (pDevice->TbiFlags & ENABLE_TBI_FLAG || + pDevice->PhyFlags & PHY_IS_FIBER ) ) { + + pDevice->RequestedLineSpeed = + LM_LINE_SPEED_1000MBPS; + + pDevice->RequestedDuplexMode = + LM_DUPLEX_MODE_FULL; + } + else if (ethcmd.speed == SPEED_100 && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->PhyFlags & PHY_IS_FIBER)) { + + pDevice->RequestedLineSpeed = + LM_LINE_SPEED_100MBPS; + } + else if (ethcmd.speed == SPEED_10 && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->PhyFlags & PHY_IS_FIBER)) { + + pDevice->RequestedLineSpeed = + LM_LINE_SPEED_10MBPS; + } + else { + return -EINVAL; + } + + pDevice->DisableAutoNeg = TRUE; + if (ethcmd.duplex == DUPLEX_FULL) { + pDevice->RequestedDuplexMode = + LM_DUPLEX_MODE_FULL; + } + else { + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->PhyFlags & PHY_IS_FIBER) ) { + + pDevice->RequestedDuplexMode = + LM_DUPLEX_MODE_HALF; + } + } + } + if (netif_running(dev)) { + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_SetupPhy(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + } + return 0; + } +#ifdef ETHTOOL_GWOL +#ifdef BCM_WOL + case ETHTOOL_GWOL: { + struct ethtool_wolinfo wol = {ETHTOOL_GWOL}; + + if (((pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->Flags & FIBER_WOL_CAPABLE_FLAG)) || + (pDevice->Flags & DISABLE_D3HOT_FLAG)) { + wol.supported = 0; + wol.wolopts = 0; + } + else { + wol.supported = WAKE_MAGIC; + if (pDevice->WakeUpMode == LM_WAKE_UP_MODE_MAGIC_PACKET) + { + wol.wolopts = WAKE_MAGIC; + } + else { + wol.wolopts = 0; + } + } + if (mm_copy_to_user(useraddr, &wol, sizeof(wol))) + return -EFAULT; + return 0; + } + case ETHTOOL_SWOL: { + struct ethtool_wolinfo wol; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&wol, useraddr, sizeof(wol))) + return -EFAULT; + if ((((pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->Flags & FIBER_WOL_CAPABLE_FLAG)) || + (pDevice->Flags & DISABLE_D3HOT_FLAG)) && + wol.wolopts) { + return -EINVAL; + } + + if ((wol.wolopts & ~WAKE_MAGIC) != 0) { + return -EINVAL; + } + if (wol.wolopts & WAKE_MAGIC) { + pDevice->WakeUpModeCap = LM_WAKE_UP_MODE_MAGIC_PACKET; + pDevice->WakeUpMode = LM_WAKE_UP_MODE_MAGIC_PACKET; + } + else { + pDevice->WakeUpModeCap = LM_WAKE_UP_MODE_NONE; + pDevice->WakeUpMode = LM_WAKE_UP_MODE_NONE; + } + return 0; + } +#endif +#endif +#ifdef ETHTOOL_GLINK + case ETHTOOL_GLINK: { + struct ethtool_value edata = {ETHTOOL_GLINK}; + + /* workaround for DHCP using ifup script */ + /* ifup only waits for 5 seconds for link up */ + /* NIC may take more than 5 seconds to establish link */ + if ((pUmDevice->delayed_link_ind > 0) && + delay_link[pUmDevice->index]) + return -EOPNOTSUPP; + + if (pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE) { + edata.data = 1; + } + else { + edata.data = 0; + } + if (mm_copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } +#endif +#ifdef ETHTOOL_NWAY_RST + case ETHTOOL_NWAY_RST: { + LM_UINT32 phyctrl; + unsigned long flags; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (pDevice->DisableAutoNeg) { + return -EINVAL; + } + if (!netif_running(dev)) + return -EAGAIN; + BCM5700_PHY_LOCK(pUmDevice, flags); + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_1000MBPS; + pDevice->DisableAutoNeg = TRUE; + LM_SetupPhy(pDevice); + + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->DisableAutoNeg = FALSE; + LM_SetupPhy(pDevice); + } + else { + if ((T3_ASIC_REV(pDevice->ChipRevId) == + T3_ASIC_REV_5703) || + (T3_ASIC_REV(pDevice->ChipRevId) == + T3_ASIC_REV_5704) || + (T3_ASIC_REV(pDevice->ChipRevId) == + T3_ASIC_REV_5705)) + { + LM_ResetPhy(pDevice); + LM_SetupPhy(pDevice); + } + pDevice->PhyFlags &= ~PHY_FIBER_FALLBACK; + LM_ReadPhy(pDevice, PHY_CTRL_REG, &phyctrl); + LM_WritePhy(pDevice, PHY_CTRL_REG, phyctrl | + PHY_CTRL_AUTO_NEG_ENABLE | + PHY_CTRL_RESTART_AUTO_NEG); + } + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + } +#endif +#ifdef ETHTOOL_GEEPROM + case ETHTOOL_GEEPROM: { + struct ethtool_eeprom eeprom; + LM_UINT32 *buf = 0; + LM_UINT32 buf1[64/4]; + int i, j, offset, len; + + if (mm_copy_from_user(&eeprom, useraddr, sizeof(eeprom))) + return -EFAULT; + + if (eeprom.offset >= pDevice->NvramSize) + return -EFAULT; + + /* maximum data limited */ + /* to read more, call again with a different offset */ + if (eeprom.len > 0x800) { + eeprom.len = 0x800; + if (mm_copy_to_user(useraddr, &eeprom, sizeof(eeprom))) + return -EFAULT; + } + + if (eeprom.len > 64) { + buf = kmalloc(eeprom.len, GFP_KERNEL); + if (!buf) + return -ENOMEM; + } + else { + buf = buf1; + } + useraddr += offsetof(struct ethtool_eeprom, data); + + offset = eeprom.offset; + len = eeprom.len; + if (offset & 3) { + offset &= 0xfffffffc; + len += (offset & 3); + } + len = (len + 3) & 0xfffffffc; + for (i = 0, j = 0; j < len; i++, j += 4) { + if (LM_NvramRead(pDevice, offset + j, buf + i) != + LM_STATUS_SUCCESS) { + break; + } + } + if (j >= len) { + buf += (eeprom.offset & 3); + i = mm_copy_to_user(useraddr, buf, eeprom.len); + } + if (eeprom.len > 64) { + kfree(buf); + } + if ((j < len) || i) + return -EFAULT; + return 0; + } + case ETHTOOL_SEEPROM: { + struct ethtool_eeprom eeprom; + LM_UINT32 buf[64/4]; + int i, offset, len; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&eeprom, useraddr, sizeof(eeprom))) + return -EFAULT; + + if ((eeprom.offset & 3) || (eeprom.len & 3) || + (eeprom.offset >= pDevice->NvramSize)) { + return -EFAULT; + } + + if ((eeprom.offset + eeprom.len) >= pDevice->NvramSize) { + eeprom.len = pDevice->NvramSize - eeprom.offset; + } + + useraddr += offsetof(struct ethtool_eeprom, data); + + len = eeprom.len; + offset = eeprom.offset; + for (; len > 0; ) { + if (len < 64) + i = len; + else + i = 64; + if (mm_copy_from_user(&buf, useraddr, i)) + return -EFAULT; + + bcm5700_intr_off(pUmDevice); + /* Prevent race condition on Grc.Mode register */ + bcm5700_poll_wait(pUmDevice); + + if (LM_NvramWriteBlock(pDevice, offset, buf, i/4) != + LM_STATUS_SUCCESS) { + bcm5700_intr_on(pUmDevice); + return -EFAULT; + } + bcm5700_intr_on(pUmDevice); + len -= i; + offset += i; + useraddr += i; + } + return 0; + } +#endif +#ifdef ETHTOOL_GREGS +#if (LINUX_VERSION_CODE >= 0x02040f) + case ETHTOOL_GREGS: { + struct ethtool_regs eregs; + LM_UINT32 *buf, *buf1; + unsigned int i; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (pDevice->Flags & UNDI_FIX_FLAG) + return -EOPNOTSUPP; + if (mm_copy_from_user(&eregs, useraddr, sizeof(eregs))) + return -EFAULT; + if (eregs.len > 0x6c00) + eregs.len = 0x6c00; + eregs.version = 0x0; + if (mm_copy_to_user(useraddr, &eregs, sizeof(eregs))) + return -EFAULT; + buf = buf1 = kmalloc(eregs.len, GFP_KERNEL); + if (!buf) + return -ENOMEM; + bcm5700_get_reg_blk(pUmDevice, &buf, 0, 0xb0, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0xb0, 0x200, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x200, 0x8f0, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x8f0, 0xc00, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0xc00, 0xce0, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0xce0, 0x1000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1000, 0x1004, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1004, 0x1400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1400, 0x1480, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1480, 0x1800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1800, 0x1848, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1848, 0x1c00, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1c00, 0x1c04, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x1c04, 0x2000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2000, 0x225c, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x225c, 0x2400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2400, 0x24c4, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x24c4, 0x2800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2800, 0x2804, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2804, 0x2c00, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2c00, 0x2c20, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x2c20, 0x3000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3000, 0x3014, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3014, 0x3400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3400, 0x3408, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3408, 0x3800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3800, 0x3808, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3808, 0x3c00, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3c00, 0x3d00, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x3d00, 0x4000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4000, 0x4010, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4010, 0x4400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4400, 0x4458, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4458, 0x4800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4800, 0x4808, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4808, 0x4c00, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4c00, 0x4c08, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x4c08, 0x5000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5000, 0x5050, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5050, 0x5400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5400, 0x5450, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5450, 0x5800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5800, 0x5a10, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x5a10, 0x6000, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x6000, 0x600c, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x600c, 0x6400, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x6400, 0x6404, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x6404, 0x6800, 1); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x6800, 0x6848, 0); + bcm5700_get_reg_blk(pUmDevice, &buf, 0x6848, 0x6c00, 1); + + i = mm_copy_to_user(useraddr + sizeof(eregs), buf1, eregs.len); + kfree(buf1); + if (i) + return -EFAULT; + return 0; + } +#endif +#endif +#ifdef ETHTOOL_GPAUSEPARAM + case ETHTOOL_GPAUSEPARAM: { + struct ethtool_pauseparam epause = { ETHTOOL_GPAUSEPARAM }; + + if (!pDevice->DisableAutoNeg) { + epause.autoneg = (pDevice->FlowControlCap & + LM_FLOW_CONTROL_AUTO_PAUSE) != 0; + } + else { + epause.autoneg = 0; + } + epause.rx_pause = + (pDevice->FlowControl & + LM_FLOW_CONTROL_RECEIVE_PAUSE) != 0; + epause.tx_pause = + (pDevice->FlowControl & + LM_FLOW_CONTROL_TRANSMIT_PAUSE) != 0; + if (mm_copy_to_user(useraddr, &epause, sizeof(epause))) + return -EFAULT; + + return 0; + } + case ETHTOOL_SPAUSEPARAM: { + struct ethtool_pauseparam epause; + unsigned long flags; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&epause, useraddr, sizeof(epause))) + return -EFAULT; + pDevice->FlowControlCap = 0; + if (epause.autoneg && !pDevice->DisableAutoNeg) { + pDevice->FlowControlCap |= LM_FLOW_CONTROL_AUTO_PAUSE; + } + if (epause.rx_pause) { + pDevice->FlowControlCap |= + LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + if (epause.tx_pause) { + pDevice->FlowControlCap |= + LM_FLOW_CONTROL_TRANSMIT_PAUSE; + } + if (netif_running(dev)) { + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_SetupPhy(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + } + + return 0; + } +#endif +#ifdef ETHTOOL_GRXCSUM + case ETHTOOL_GRXCSUM: { + struct ethtool_value edata = { ETHTOOL_GRXCSUM }; + + edata.data = + (pDevice->TaskToOffload & + LM_TASK_OFFLOAD_RX_TCP_CHECKSUM) != 0; + if (mm_copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + + return 0; + } + case ETHTOOL_SRXCSUM: { + struct ethtool_value edata; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + if (edata.data) { + if (!(pDevice->TaskOffloadCap & + LM_TASK_OFFLOAD_TX_TCP_CHECKSUM)) { + + return -EINVAL; + } + pDevice->TaskToOffload |= + LM_TASK_OFFLOAD_RX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_RX_UDP_CHECKSUM; + } + else { + pDevice->TaskToOffload &= + ~(LM_TASK_OFFLOAD_RX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_RX_UDP_CHECKSUM); + } + return 0; + } + case ETHTOOL_GTXCSUM: { + struct ethtool_value edata = { ETHTOOL_GTXCSUM }; + + edata.data = + (dev->features & get_csum_flag( pDevice->ChipRevId)) != 0; + if (mm_copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + + return 0; + } + case ETHTOOL_STXCSUM: { + struct ethtool_value edata; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + if (edata.data) { + if (!(pDevice->TaskOffloadCap & + LM_TASK_OFFLOAD_TX_TCP_CHECKSUM)) { + + return -EINVAL; + } + dev->features |= get_csum_flag( pDevice->ChipRevId); + pDevice->TaskToOffload |= + LM_TASK_OFFLOAD_TX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_TX_UDP_CHECKSUM; + } + else { + dev->features &= ~get_csum_flag( pDevice->ChipRevId); + pDevice->TaskToOffload &= + ~(LM_TASK_OFFLOAD_TX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_TX_UDP_CHECKSUM); + } + return 0; + } + case ETHTOOL_GSG: { + struct ethtool_value edata = { ETHTOOL_GSG }; + + edata.data = + (dev->features & NETIF_F_SG) != 0; + if (mm_copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } + case ETHTOOL_SSG: { + struct ethtool_value edata; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + if (edata.data) { + dev->features |= NETIF_F_SG; + } + else { + dev->features &= ~NETIF_F_SG; + } + return 0; + } +#endif +#ifdef ETHTOOL_GRINGPARAM + case ETHTOOL_GRINGPARAM: { + struct ethtool_ringparam ering = { ETHTOOL_GRINGPARAM }; + + ering.rx_max_pending = T3_STD_RCV_RCB_ENTRY_COUNT - 1; + ering.rx_pending = pDevice->RxStdDescCnt; + ering.rx_mini_max_pending = 0; + ering.rx_mini_pending = 0; +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + ering.rx_jumbo_max_pending = T3_JUMBO_RCV_RCB_ENTRY_COUNT - 1; + ering.rx_jumbo_pending = pDevice->RxJumboDescCnt; +#else + ering.rx_jumbo_max_pending = 0; + ering.rx_jumbo_pending = 0; +#endif + ering.tx_max_pending = MAX_TX_PACKET_DESC_COUNT - 1; + ering.tx_pending = pDevice->TxPacketDescCnt; + if (mm_copy_to_user(useraddr, &ering, sizeof(ering))) + return -EFAULT; + return 0; + } +#endif +#ifdef ETHTOOL_PHYS_ID + case ETHTOOL_PHYS_ID: { + struct ethtool_value edata; + + if(!capable(CAP_NET_ADMIN)) + return -EPERM; + if (mm_copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + if (LM_BlinkLED(pDevice, edata.data) == LM_STATUS_SUCCESS) + return 0; + return -EINTR; + } +#endif +#ifdef ETHTOOL_GSTRINGS + case ETHTOOL_GSTRINGS: { + struct ethtool_gstrings egstr = { ETHTOOL_GSTRINGS }; + + if (mm_copy_from_user(&egstr, useraddr, sizeof(egstr))) + return -EFAULT; + switch(egstr.string_set) { +#ifdef ETHTOOL_GSTATS + case ETH_SS_STATS: + egstr.len = ETH_NUM_STATS; + if (mm_copy_to_user(useraddr, &egstr, sizeof(egstr))) + return -EFAULT; + if (mm_copy_to_user(useraddr + sizeof(egstr), + bcm5700_stats_str_arr, + sizeof(bcm5700_stats_str_arr))) + return -EFAULT; + return 0; +#endif +#ifdef ETHTOOL_TEST + case ETH_SS_TEST: + egstr.len = ETH_NUM_TESTS; + if (mm_copy_to_user(useraddr, &egstr, sizeof(egstr))) + return -EFAULT; + if (mm_copy_to_user(useraddr + sizeof(egstr), + bcm5700_tests_str_arr, + sizeof(bcm5700_tests_str_arr))) + return -EFAULT; + return 0; +#endif + default: + return -EOPNOTSUPP; + } + } +#endif +#ifdef ETHTOOL_GSTATS + case ETHTOOL_GSTATS: { + struct ethtool_stats estats = { ETHTOOL_GSTATS }; + uint64_t stats[ETH_NUM_STATS]; + int i; + uint64_t *pStats = + (uint64_t *) pDevice->pStatsBlkVirt; + + estats.n_stats = ETH_NUM_STATS; + if (pStats == 0) { + memset(stats, 0, sizeof(stats)); + } + else { + + for (i = 0; i < ETH_NUM_STATS; i++) { + if (bcm5700_stats_offset_arr[i] != 0) { + stats[i] = SWAP_DWORD_64(*(pStats + + bcm5700_stats_offset_arr[i])); + } + else if (i == RX_CRC_IDX) { + stats[i] = + bcm5700_crc_count(pUmDevice); + } + else if (i == RX_MAC_ERR_IDX) { + stats[i] = + bcm5700_rx_err_count(pUmDevice); + } + } + } + if (mm_copy_to_user(useraddr, &estats, sizeof(estats))) { + return -EFAULT; + } + if (mm_copy_to_user(useraddr + sizeof(estats), &stats, + sizeof(stats))) { + return -EFAULT; + } + return 0; + } +#endif +#ifdef ETHTOOL_TEST + case ETHTOOL_TEST: { + struct ethtool_test etest; + uint64_t tests[ETH_NUM_TESTS] = {0, 0, 0, 0, 0, 0}; + LM_POWER_STATE old_power_level; + + printk( KERN_ALERT "Performing ethtool test.\n" + "This test will take a few seconds to complete.\n" ); + + if (mm_copy_from_user(&etest, useraddr, sizeof(etest))) + return -EFAULT; + + etest.len = ETH_NUM_TESTS; + old_power_level = pDevice->PowerLevel; + if (old_power_level != LM_POWER_STATE_D0) { + LM_SetPowerState(pDevice, LM_POWER_STATE_D0); + LM_SwitchClocks(pDevice); + } + MM_Sleep(pDevice, 1000); + if (etest.flags & ETH_TEST_FL_OFFLINE) { + b57_suspend_chip(pUmDevice); + MM_Sleep(pDevice, 1000); + LM_HaltCpu(pDevice,T3_RX_CPU_ID | T3_TX_CPU_ID); + MM_Sleep(pDevice, 1000); + if (b57_test_registers(pUmDevice) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[0] = 1; + } + MM_Sleep(pDevice, 1000); + if (b57_test_memory(pUmDevice) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[1] = 1; + } + MM_Sleep(pDevice, 1000); + if (b57_test_loopback(pUmDevice, NICE_LOOPBACK_TESTTYPE_MAC, 0) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[2] = 1; + } + MM_Sleep(pDevice, 1000); + b57_resume_chip(pUmDevice); + /* wait for link to come up for the link test */ + MM_Sleep(pDevice, 4000); + if ((pDevice->LinkStatus != LM_STATUS_LINK_ACTIVE) && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG)) { + + /* wait a little longer for linkup on copper */ + MM_Sleep(pDevice, 3000); + } + } + if (b57_test_nvram(pUmDevice) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[3] = 1; + } + MM_Sleep(pDevice, 1000); + if (b57_test_intr(pUmDevice) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[4] = 1; + } + MM_Sleep(pDevice, 1000); + if (b57_test_link(pUmDevice) == 0) { + etest.flags |= ETH_TEST_FL_FAILED; + tests[5] = 1; + } + MM_Sleep(pDevice, 1000); + if (old_power_level != LM_POWER_STATE_D0) { + LM_SetPowerState(pDevice, old_power_level); + } + if (mm_copy_to_user(useraddr, &etest, sizeof(etest))) { + return -EFAULT; + } + if (mm_copy_to_user(useraddr + sizeof(etest), tests, + sizeof(tests))) { + return -EFAULT; + } + return 0; + } +#endif +#ifdef ETHTOOL_GTSO + case ETHTOOL_GTSO: { + struct ethtool_value edata = { ETHTOOL_GTSO }; + +#ifdef BCM_TSO + edata.data = + (dev->features & NETIF_F_TSO) != 0; +#else + edata.data = 0; +#endif + if (mm_copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } +#endif +#ifdef ETHTOOL_STSO + case ETHTOOL_STSO: { +#ifdef BCM_TSO + struct ethtool_value edata; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (mm_copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + + if (!(pDevice->TaskToOffload & + LM_TASK_OFFLOAD_TCP_SEGMENTATION)) { + return -EINVAL; + } + + dev->features &= ~NETIF_F_TSO; + + if (edata.data) { + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (dev->mtu > 1500)) { + printk(KERN_ALERT "%s: Jumbo Frames and TSO cannot simultaneously be enabled. Jumbo Frames enabled. TSO disabled.\n", dev->name); + return -EINVAL; + } else { + dev->features |= NETIF_F_TSO; + } + } + return 0; +#else + return -EINVAL; +#endif + } +#endif + } + + return -EOPNOTSUPP; +} +#endif /* #ifdef SIOCETHTOOL */ + +#if (LINUX_VERSION_CODE >= 0x20400) && (LINUX_VERSION_CODE < 0x20600) +#include +#endif + +/* Provide ioctl() calls to examine the MII xcvr state. */ +STATIC int bcm5700_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + u16 *data = (u16 *)&rq->ifr_data; + u32 value; + unsigned long flags; + + switch(cmd) { +#ifdef SIOCGMIIPHY + case SIOCGMIIPHY: +#endif + case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */ + data[0] = pDevice->PhyAddr; + +#ifdef SIOCGMIIREG + case SIOCGMIIREG: +#endif + case SIOCDEVPRIVATE+1: /* Read the specified MII register. */ + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + return -EOPNOTSUPP; + + /* workaround for DHCP using ifup script */ + /* ifup only waits for 5 seconds for link up */ + /* NIC may take more than 5 seconds to establish link */ + if ((pUmDevice->delayed_link_ind > 0) && + delay_link[pUmDevice->index]) { + return -EOPNOTSUPP; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_ReadPhy(pDevice, data[1] & 0x1f, (LM_UINT32 *) &value); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + data[3] = value & 0xffff; + return 0; + +#ifdef SIOCSMIIREG + case SIOCSMIIREG: +#endif + case SIOCDEVPRIVATE+2: /* Write the specified MII register */ + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + return -EOPNOTSUPP; + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_WritePhy(pDevice, data[1] & 0x1f, data[2]); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + +#ifdef NICE_SUPPORT + case SIOCNICE: + { + struct nice_req* nrq; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + nrq = (struct nice_req*)&rq->ifr_ifru; + if( nrq->cmd == NICE_CMD_QUERY_SUPPORT ) { + nrq->nrq_magic = NICE_DEVICE_MAGIC; + nrq->nrq_support_rx = 1; + nrq->nrq_support_vlan = 1; + nrq->nrq_support_get_speed = 1; +#ifdef BCM_NAPI_RXPOLL + nrq->nrq_support_rx_napi = 1; +#endif + return 0; + } +#ifdef BCM_NAPI_RXPOLL + else if( nrq->cmd == NICE_CMD_SET_RX_NAPI ) +#else + else if( nrq->cmd == NICE_CMD_SET_RX ) +#endif + { + pUmDevice->nice_rx = nrq->nrq_rx; + pUmDevice->nice_ctx = nrq->nrq_ctx; + bcm5700_set_vlan_mode(pUmDevice); + return 0; + } +#ifdef BCM_NAPI_RXPOLL + else if( nrq->cmd == NICE_CMD_GET_RX_NAPI ) +#else + else if( nrq->cmd == NICE_CMD_GET_RX ) +#endif + { + nrq->nrq_rx = pUmDevice->nice_rx; + nrq->nrq_ctx = pUmDevice->nice_ctx; + return 0; + } + else if( nrq->cmd == NICE_CMD_GET_SPEED ) { + if(pDevice->LinkStatus != LM_STATUS_LINK_ACTIVE){ + nrq->nrq_speed = 0; + } + else if (pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) { + nrq->nrq_speed = SPEED_1000; + } else if (pDevice->LineSpeed == LM_LINE_SPEED_100MBPS) { + nrq->nrq_speed = SPEED_100; + } else if (pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) { + nrq->nrq_speed = SPEED_100; + } else { + nrq->nrq_speed = 0; + } + return 0; + } + else { + if (!pUmDevice->opened) + return -EINVAL; + + switch (nrq->cmd) { + case NICE_CMD_BLINK_LED: + if (LM_BlinkLED(pDevice, nrq->nrq_blink_time) == + LM_STATUS_SUCCESS) { + return 0; + } + return -EINTR; + + case NICE_CMD_DIAG_SUSPEND: + b57_suspend_chip(pUmDevice); + return 0; + + case NICE_CMD_DIAG_RESUME: + b57_resume_chip(pUmDevice); + return 0; + + case NICE_CMD_REG_READ: + if (nrq->nrq_offset >= 0x10000) { + nrq->nrq_data = LM_RegRdInd(pDevice, + nrq->nrq_offset); + } + else { + nrq->nrq_data = LM_RegRd(pDevice, + nrq->nrq_offset); + } + return 0; + + case NICE_CMD_REG_WRITE: + if (nrq->nrq_offset >= 0x10000) { + LM_RegWrInd(pDevice, nrq->nrq_offset, + nrq->nrq_data); + } + else { + LM_RegWr(pDevice, nrq->nrq_offset, + nrq->nrq_data, FALSE); + } + return 0; + + case NICE_CMD_REG_READ_DIRECT: + case NICE_CMD_REG_WRITE_DIRECT: + if ((nrq->nrq_offset >= 0x10000) || + (pDevice->Flags & UNDI_FIX_FLAG)) { + return -EINVAL; + } + + if (nrq->cmd == NICE_CMD_REG_READ_DIRECT) { + nrq->nrq_data = REG_RD_OFFSET(pDevice, + nrq->nrq_offset); + } + else { + REG_WR_OFFSET(pDevice, nrq->nrq_offset, + nrq->nrq_data); + } + return 0; + + case NICE_CMD_MEM_READ: + nrq->nrq_data = LM_MemRdInd(pDevice, + nrq->nrq_offset); + return 0; + + case NICE_CMD_MEM_WRITE: + LM_MemWrInd(pDevice, nrq->nrq_offset, + nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_READ32: + pci_read_config_dword(pUmDevice->pdev, + nrq->nrq_offset, (u32 *)&nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_READ16: + pci_read_config_word(pUmDevice->pdev, + nrq->nrq_offset, (u16 *)&nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_READ8: + pci_read_config_byte(pUmDevice->pdev, + nrq->nrq_offset, (u8 *)&nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_WRITE32: + pci_write_config_dword(pUmDevice->pdev, + nrq->nrq_offset, (u32)nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_WRITE16: + pci_write_config_word(pUmDevice->pdev, + nrq->nrq_offset, (u16)nrq->nrq_data); + return 0; + + case NICE_CMD_CFG_WRITE8: + pci_write_config_byte(pUmDevice->pdev, + nrq->nrq_offset, (u8)nrq->nrq_data); + return 0; + + case NICE_CMD_RESET: + bcm5700_reset(dev); + return 0; + + case NICE_CMD_ENABLE_MAC_LOOPBACK: + if (pDevice->LoopBackMode != 0) { + return -EINVAL; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_EnableMacLoopBack(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_DISABLE_MAC_LOOPBACK: + if (pDevice->LoopBackMode != + LM_MAC_LOOP_BACK_MODE) { + return -EINVAL; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_DisableMacLoopBack(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_ENABLE_PHY_LOOPBACK: + if (pDevice->LoopBackMode != 0) { + return -EINVAL; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_EnablePhyLoopBack(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_DISABLE_PHY_LOOPBACK: + if (pDevice->LoopBackMode != + LM_PHY_LOOP_BACK_MODE) { + return -EINVAL; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_DisablePhyLoopBack(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_ENABLE_EXT_LOOPBACK: + if (pDevice->LoopBackMode != 0) { + return -EINVAL; + } + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + if (nrq->nrq_speed != 1000) + return -EINVAL; + } + else { + if ((nrq->nrq_speed != 1000) && + (nrq->nrq_speed != 100) && + (nrq->nrq_speed != 10)) { + return -EINVAL; + } + } + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_EnableExtLoopBack(pDevice, nrq->nrq_speed); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_DISABLE_EXT_LOOPBACK: + if (pDevice->LoopBackMode != + LM_EXT_LOOP_BACK_MODE) { + return -EINVAL; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + LM_DisableExtLoopBack(pDevice); + BCM5700_PHY_UNLOCK(pUmDevice, flags); + return 0; + + case NICE_CMD_INTERRUPT_TEST: + nrq->nrq_intr_test_result = + b57_test_intr(pUmDevice); + return 0; + + case NICE_CMD_LOOPBACK_TEST: + value = 0; + switch (nrq->nrq_looptype) { + case NICE_LOOPBACK_TESTTYPE_EXT: + if ((nrq->nrq_loopspeed & ~NICE_LOOPBACK_TEST_SPEEDMASK) || + !(nrq->nrq_loopspeed & NICE_LOOPBACK_TEST_SPEEDMASK)) + break; + switch (nrq->nrq_loopspeed) { + case NICE_LOOPBACK_TEST_10MBPS: + value = LM_LINE_SPEED_10MBPS; + break; + case NICE_LOOPBACK_TEST_100MBPS: + value = LM_LINE_SPEED_100MBPS; + break; + case NICE_LOOPBACK_TEST_1000MBPS: + value = LM_LINE_SPEED_1000MBPS; + break; + } + /* Fall through */ + + case NICE_LOOPBACK_TESTTYPE_MAC: + case NICE_LOOPBACK_TESTTYPE_PHY: + b57_suspend_chip(pUmDevice); + value = b57_test_loopback(pUmDevice, + nrq->nrq_looptype, value); + b57_resume_chip(pUmDevice); + break; + } + + if (value == 1) { + /* A '1' indicates success */ + value = 0; + } else { + value = -EINTR; + } + + return value; + + case NICE_CMD_KMALLOC_PHYS: { +#if (LINUX_VERSION_CODE >= 0x020400) + dma_addr_t mapping; + __u64 cpu_pa; + void *ptr; + int i; + struct page *pg, *last_pg; + + for (i = 0; i < MAX_MEM2; i++) { + if (pUmDevice->mem_size_list2[i] == 0) + break; + } + if (i >= MAX_MEM2) + return -EFAULT; + ptr = pci_alloc_consistent(pUmDevice->pdev, + nrq->nrq_size, &mapping); + if (!ptr) { + return -EFAULT; + } + pUmDevice->mem_size_list2[i] = nrq->nrq_size; + pUmDevice->mem_list2[i] = ptr; + pUmDevice->dma_list2[i] = mapping; + + /* put pci mapping at the beginning of buffer */ + *((__u64 *) ptr) = (__u64) mapping; + + /* Probably won't work on some architectures */ + /* get CPU mapping */ + cpu_pa = (__u64) virt_to_phys(ptr); + pUmDevice->cpu_pa_list2[i] = cpu_pa; + nrq->nrq_phys_addr_lo = (__u32) cpu_pa; + nrq->nrq_phys_addr_hi = (__u32) (cpu_pa >> 32); + + pg = virt_to_page(ptr); + last_pg = virt_to_page(ptr + nrq->nrq_size - 1); + for (; ; pg++) { +#if (LINUX_VERSION_CODE > 0x020500) + SetPageReserved(pg); +#else + mem_map_reserve(pg); +#endif + if (pg == last_pg) + break; + } + return 0; +#else + return -EOPNOTSUPP; +#endif + } + + case NICE_CMD_KFREE_PHYS: { + int i; + __u64 cpu_pa; + + cpu_pa = (__u64) nrq->nrq_phys_addr_lo + + ((__u64) nrq->nrq_phys_addr_hi << 32); + for (i = 0; i < MAX_MEM2; i++) { + if (pUmDevice->cpu_pa_list2[i] == + cpu_pa) + { + break; + } + } + if (i >= MAX_MEM2) + return -EFAULT; + + bcm5700_freemem2(pUmDevice, i); + return 0; + } + + case NICE_CMD_SET_WRITE_PROTECT: + if (nrq->nrq_write_protect) + pDevice->Flags |= EEPROM_WP_FLAG; + else + pDevice->Flags &= ~EEPROM_WP_FLAG; + return 0; + case NICE_CMD_GET_STATS_BLOCK: { + PT3_STATS_BLOCK pStats = + (PT3_STATS_BLOCK)pDevice->pStatsBlkVirt; + if (mm_copy_to_user(nrq->nrq_stats_useraddr, + pStats, nrq->nrq_stats_size)) { + return -EFAULT; + } + return 0; + } + case NICE_CMD_CLR_STATS_BLOCK: { + int j; + PT3_STATS_BLOCK pStats = + (PT3_STATS_BLOCK)pDevice->pStatsBlkVirt; + + memset(pStats, 0, sizeof(T3_STATS_BLOCK)); + if (T3_ASIC_REV(pDevice->ChipRevId) == + T3_ASIC_REV_5705) { + return 0; + } + for(j = 0x0300; j < 0x0b00; j = j + 4) { + MEM_WR_OFFSET(pDevice, j, 0); + } + + return 0; + } + + } + } + return -EOPNOTSUPP; + } +#endif /* NICE_SUPPORT */ +#ifdef SIOCETHTOOL + case SIOCETHTOOL: + return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data); +#endif + default: + return -EOPNOTSUPP; + } + return -EOPNOTSUPP; +} + +STATIC void bcm5700_do_rx_mode(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + int i; + struct dev_mc_list *mclist; + + LM_MulticastClear(pDevice); + for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; + i++, mclist = mclist->next) { + LM_MulticastAdd(pDevice, (PLM_UINT8) &mclist->dmi_addr); + } + if (dev->flags & IFF_ALLMULTI) { + if (!(pDevice->ReceiveMask & LM_ACCEPT_ALL_MULTICAST)) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask | LM_ACCEPT_ALL_MULTICAST); + } + } + else if (pDevice->ReceiveMask & LM_ACCEPT_ALL_MULTICAST) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask & ~LM_ACCEPT_ALL_MULTICAST); + } + if (dev->flags & IFF_PROMISC) { + if (!(pDevice->ReceiveMask & LM_PROMISCUOUS_MODE)) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask | LM_PROMISCUOUS_MODE); + } + } + else if (pDevice->ReceiveMask & LM_PROMISCUOUS_MODE) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask & ~LM_PROMISCUOUS_MODE); + } + +} + +STATIC void bcm5700_set_rx_mode(struct net_device *dev) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + int i; + struct dev_mc_list *mclist; + unsigned long flags; + + BCM5700_PHY_LOCK(pUmDevice, flags); + + LM_MulticastClear(pDevice); + for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; + i++, mclist = mclist->next) { + LM_MulticastAdd(pDevice, (PLM_UINT8) &mclist->dmi_addr); + } + if (dev->flags & IFF_ALLMULTI) { + if (!(pDevice->ReceiveMask & LM_ACCEPT_ALL_MULTICAST)) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask | LM_ACCEPT_ALL_MULTICAST); + } + } + else if (pDevice->ReceiveMask & LM_ACCEPT_ALL_MULTICAST) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask & ~LM_ACCEPT_ALL_MULTICAST); + } + if (dev->flags & IFF_PROMISC) { + if (!(pDevice->ReceiveMask & LM_PROMISCUOUS_MODE)) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask | LM_PROMISCUOUS_MODE); + } + } + else if (pDevice->ReceiveMask & LM_PROMISCUOUS_MODE) { + LM_SetReceiveMask(pDevice, + pDevice->ReceiveMask & ~LM_PROMISCUOUS_MODE); + } + + BCM5700_PHY_UNLOCK(pUmDevice, flags); +} + +/* + * Set the hardware MAC address. + */ +STATIC int bcm5700_set_mac_addr(struct net_device *dev, void *p) +{ + struct sockaddr *addr=p; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) dev->priv; + UM_DEVICE_BLOCK *pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + + if(is_valid_ether_addr(addr->sa_data)){ + + memcpy(dev->dev_addr, addr->sa_data,dev->addr_len); + if (pUmDevice->opened) + LM_SetMacAddress(pDevice, dev->dev_addr); + return 0; + } + return -EINVAL; +} + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT +STATIC int bcm5700_change_mtu(struct net_device *dev, int new_mtu) +{ + int pkt_size = new_mtu + ETHERNET_PACKET_HEADER_SIZE; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK)dev->priv; + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + unsigned long flags; + int reinit = 0; + + if ((pkt_size < MIN_ETHERNET_PACKET_SIZE_NO_CRC) || + (pkt_size > MAX_ETHERNET_JUMBO_PACKET_SIZE_NO_CRC)) { + + return -EINVAL; + } + if ( !(pDevice->Flags & JUMBO_CAPABLE_FLAG) && + (pkt_size > MAX_ETHERNET_PACKET_SIZE_NO_CRC) ) { + + return -EINVAL; + } + if (pUmDevice->suspended) + return -EAGAIN; + + if (pUmDevice->opened && (new_mtu != dev->mtu) && + (pDevice->Flags & JUMBO_CAPABLE_FLAG)) { + reinit = 1; + } + + BCM5700_PHY_LOCK(pUmDevice, flags); + if (reinit) { + /* Fix for RQM 289636 */ + /* netif_stop_queue(dev); */ + bcm5700_netif_stop_queue(dev); + bcm5700_shutdown(pUmDevice); + bcm5700_freemem(dev); + } + + dev->mtu = new_mtu; + if (pkt_size < MAX_ETHERNET_PACKET_SIZE_NO_CRC) { + pDevice->RxMtu = pDevice->TxMtu = + MAX_ETHERNET_PACKET_SIZE_NO_CRC; + } + else { + pDevice->RxMtu = pDevice->TxMtu = pkt_size; + } + + if (dev->mtu <= 1514) { + pDevice->RxJumboDescCnt = 0; + } + else if (pDevice->Flags & JUMBO_CAPABLE_FLAG){ + pDevice->RxJumboDescCnt = + rx_jumbo_desc_cnt[pUmDevice->index]; + } + pDevice->RxPacketDescCnt = pDevice->RxJumboDescCnt + + pDevice->RxStdDescCnt; + + pDevice->RxJumboBufferSize = (pDevice->RxMtu + 8 /* CRC + VLAN */ + + COMMON_CACHE_LINE_SIZE-1) & ~COMMON_CACHE_LINE_MASK; + +#ifdef BCM_TSO + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (dev->mtu > 1514) ) { + if (dev->features & NETIF_F_TSO) { + dev->features &= ~NETIF_F_TSO; + printk(KERN_ALERT "%s: TSO previously enabled. Jumbo Frames and TSO cannot simultaneously be enabled. Jumbo Frames enabled. TSO disabled.\n", dev->name); + } + } +#endif + + if (reinit) { + LM_InitializeAdapter(pDevice); + bcm5700_do_rx_mode(dev); + bcm5700_set_vlan_mode(pUmDevice); + bcm5700_init_counters(pUmDevice); + if (memcmp(dev->dev_addr, pDevice->NodeAddress, 6)) { + LM_SetMacAddress(pDevice, dev->dev_addr); + } + netif_start_queue(dev); + bcm5700_intr_on(pUmDevice); + } + BCM5700_PHY_UNLOCK(pUmDevice, flags); + + return 0; +} +#endif + + +#if (LINUX_VERSION_CODE < 0x020300) +int +bcm5700_probe(struct net_device *dev) +{ + int cards_found = 0; + struct pci_dev *pdev = NULL; + struct pci_device_id *pci_tbl; + u16 ssvid, ssid; + + if ( ! pci_present()) + return -ENODEV; + + pci_tbl = bcm5700_pci_tbl; + while ((pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, pdev))) { + int idx; + + pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &ssvid); + pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &ssid); + for (idx = 0; pci_tbl[idx].vendor; idx++) { + if ((pci_tbl[idx].vendor == PCI_ANY_ID || + pci_tbl[idx].vendor == pdev->vendor) && + (pci_tbl[idx].device == PCI_ANY_ID || + pci_tbl[idx].device == pdev->device) && + (pci_tbl[idx].subvendor == PCI_ANY_ID || + pci_tbl[idx].subvendor == ssvid) && + (pci_tbl[idx].subdevice == PCI_ANY_ID || + pci_tbl[idx].subdevice == ssid)) + { + + break; + } + } + if (pci_tbl[idx].vendor == 0) + continue; + + + if (bcm5700_init_one(pdev, &pci_tbl[idx]) == 0) + cards_found++; + } + + return cards_found ? 0 : -ENODEV; +} + +#ifdef MODULE +int init_module(void) +{ + return bcm5700_probe(NULL); +} + +void cleanup_module(void) +{ + struct net_device *next_dev; + PUM_DEVICE_BLOCK pUmDevice; + +#ifdef BCM_PROC_FS + bcm5700_proc_remove_notifier(); +#endif + /* No need to check MOD_IN_USE, as sys_delete_module() checks. */ + while (root_tigon3_dev) { + pUmDevice = (PUM_DEVICE_BLOCK)root_tigon3_dev->priv; +#ifdef BCM_PROC_FS + bcm5700_proc_remove_dev(root_tigon3_dev); +#endif + next_dev = pUmDevice->next_module; + unregister_netdev(root_tigon3_dev); + if (pUmDevice->lm_dev.pMappedMemBase) + iounmap(pUmDevice->lm_dev.pMappedMemBase); +#if (LINUX_VERSION_CODE < 0x020600) + kfree(root_tigon3_dev); +#else + free_netdev(root_tigon3_dev); +#endif + root_tigon3_dev = next_dev; + } +#ifdef BCM_IOCTL32 + unregister_ioctl32_conversion(SIOCNICE); +#endif +} + +#endif /* MODULE */ +#else /* LINUX_VERSION_CODE < 0x020300 */ + + +#if (LINUX_VERSION_CODE >= 0x2060b) +static int bcm5700_suspend(struct pci_dev *pdev, pm_message_t state) +#else +#if (LINUX_VERSION_CODE >= 0x020406) +static int bcm5700_suspend (struct pci_dev *pdev, u32 state) +#else +static void bcm5700_suspend (struct pci_dev *pdev) +#endif +#endif +{ + struct net_device *dev = (struct net_device *) pci_get_drvdata(pdev); + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + + if (!netif_running(dev)) +#if (LINUX_VERSION_CODE >= 0x020406) + return 0; +#else + return; +#endif + + netif_device_detach (dev); + bcm5700_shutdown(pUmDevice); + + LM_SetPowerState(pDevice, LM_POWER_STATE_D3); + +/* pci_power_off(pdev, -1);*/ +#if (LINUX_VERSION_CODE >= 0x020406) + return 0; +#endif +} + + +#if (LINUX_VERSION_CODE >= 0x020406) +static int bcm5700_resume(struct pci_dev *pdev) +#else +static void bcm5700_resume(struct pci_dev *pdev) +#endif +{ + struct net_device *dev = (struct net_device *) pci_get_drvdata(pdev); + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) dev->priv; + PLM_DEVICE_BLOCK pDevice = &pUmDevice->lm_dev; + + if (!netif_running(dev)) +#if (LINUX_VERSION_CODE >= 0x020406) + return 0; +#else + return; +#endif +/* pci_power_on(pdev);*/ + netif_device_attach(dev); + LM_SetPowerState(pDevice, LM_POWER_STATE_D0); + MM_InitializeUmPackets(pDevice); + bcm5700_reset(dev); +#if (LINUX_VERSION_CODE >= 0x020406) + return 0; +#endif +} + + +static struct pci_driver bcm5700_pci_driver = { + name: bcm5700_driver, + id_table: bcm5700_pci_tbl, + probe: bcm5700_init_one, + remove: __devexit_p(bcm5700_remove_one), + suspend: bcm5700_suspend, + resume: bcm5700_resume, +}; + + +static int __init bcm5700_init_module (void) +{ + return pci_module_init(&bcm5700_pci_driver); +} + + +static void __exit bcm5700_cleanup_module (void) +{ +#ifdef BCM_PROC_FS + bcm5700_proc_remove_notifier(); +#endif + pci_unregister_driver(&bcm5700_pci_driver); +} + + +module_init(bcm5700_init_module); +module_exit(bcm5700_cleanup_module); +#endif + +/* + * Middle Module + * + */ + + +#ifdef BCM_NAPI_RXPOLL +LM_STATUS +MM_ScheduleRxPoll(LM_DEVICE_BLOCK *pDevice) +{ + struct net_device *dev = ((UM_DEVICE_BLOCK *) pDevice)->dev; + + if (netif_rx_schedule_prep(dev)) { + __netif_rx_schedule(dev); + return LM_STATUS_SUCCESS; + } + return LM_STATUS_FAILURE; +} +#endif + +LM_STATUS +MM_ReadConfig16(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT16 *pValue16) +{ + UM_DEVICE_BLOCK *pUmDevice; + + pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + pci_read_config_word(pUmDevice->pdev, Offset, (u16 *) pValue16); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_ReadConfig32(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 *pValue32) +{ + UM_DEVICE_BLOCK *pUmDevice; + + pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + pci_read_config_dword(pUmDevice->pdev, Offset, (u32 *) pValue32); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_WriteConfig16(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT16 Value16) +{ + UM_DEVICE_BLOCK *pUmDevice; + + pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + pci_write_config_word(pUmDevice->pdev, Offset, Value16); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_WriteConfig32(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 Value32) +{ + UM_DEVICE_BLOCK *pUmDevice; + + pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + pci_write_config_dword(pUmDevice->pdev, Offset, Value32); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_AllocateSharedMemory(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlockSize, + PLM_VOID *pMemoryBlockVirt, PLM_PHYSICAL_ADDRESS pMemoryBlockPhy, + LM_BOOL Cached) +{ + PLM_VOID pvirt; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + dma_addr_t mapping; + + pvirt = pci_alloc_consistent(pUmDevice->pdev, BlockSize, + &mapping); + if (!pvirt) { + return LM_STATUS_FAILURE; + } + pUmDevice->mem_list[pUmDevice->mem_list_num] = pvirt; + pUmDevice->dma_list[pUmDevice->mem_list_num] = mapping; + pUmDevice->mem_size_list[pUmDevice->mem_list_num++] = BlockSize; + memset(pvirt, 0, BlockSize); + *pMemoryBlockVirt = (PLM_VOID) pvirt; + MM_SetAddr(pMemoryBlockPhy, mapping); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_AllocateMemory(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlockSize, + PLM_VOID *pMemoryBlockVirt) +{ + PLM_VOID pvirt; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + + + /* Maximum in slab.c */ + if (BlockSize > 131072) { + goto MM_Alloc_error; + } + + pvirt = kmalloc(BlockSize,GFP_ATOMIC); + if (!pvirt) { + goto MM_Alloc_error; + } + pUmDevice->mem_list[pUmDevice->mem_list_num] = pvirt; + pUmDevice->dma_list[pUmDevice->mem_list_num] = 0; + pUmDevice->mem_size_list[pUmDevice->mem_list_num++] = 0; + /* mem_size_list[i] == 0 indicates that the memory should be freed */ + /* using kfree */ + memset(pvirt, 0, BlockSize); + *pMemoryBlockVirt = pvirt; + return LM_STATUS_SUCCESS; + +MM_Alloc_error: + printk(KERN_WARNING "%s: Memory allocation failed - buffer parameters may be set too high\n", pUmDevice->dev->name); + return LM_STATUS_FAILURE; +} + +LM_STATUS +MM_MapMemBase(PLM_DEVICE_BLOCK pDevice) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + + pDevice->pMappedMemBase = ioremap_nocache( + pci_resource_start(pUmDevice->pdev, 0), sizeof(T3_STD_MEM_MAP)); + if (pDevice->pMappedMemBase == 0) + return LM_STATUS_FAILURE; + + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_InitializeUmPackets(PLM_DEVICE_BLOCK pDevice) +{ + unsigned int i; + struct sk_buff *skb; + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + PUM_PACKET pUmPacket; + PLM_PACKET pPacket; + + for (i = 0; i < pDevice->RxPacketDescCnt; i++) { + pPacket = QQ_PopHead(&pDevice->RxPacketFreeQ.Container); + pUmPacket = (PUM_PACKET) pPacket; + if (pPacket == 0) { + printk(KERN_DEBUG "Bad RxPacketFreeQ\n"); + } + if (pUmPacket->skbuff == 0) { + skb = dev_alloc_skb(pPacket->u.Rx.RxBufferSize + 2); + if (skb == 0) { + pUmPacket->skbuff = 0; + QQ_PushTail( + &pUmDevice->rx_out_of_buf_q.Container, + pPacket); + continue; + } + pUmPacket->skbuff = skb; + skb->dev = pUmDevice->dev; + skb_reserve(skb, pUmDevice->rx_buf_align); + } + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + } + if (T3_ASIC_REV(pUmDevice->lm_dev.ChipRevId) == T3_ASIC_REV_5700) { + /* reallocate buffers in the ISR */ + pUmDevice->rx_buf_repl_thresh = 0; + pUmDevice->rx_buf_repl_panic_thresh = 0; + pUmDevice->rx_buf_repl_isr_limit = 0; + } + else { + pUmDevice->rx_buf_repl_thresh = pDevice->RxPacketDescCnt / 8; + pUmDevice->rx_buf_repl_panic_thresh = + pDevice->RxPacketDescCnt * 7 / 8; + + /* This limits the time spent in the ISR when the receiver */ + /* is in a steady state of being overrun. */ + pUmDevice->rx_buf_repl_isr_limit = pDevice->RxPacketDescCnt / 8; + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + if (pDevice->RxJumboDescCnt != 0) { + if (pUmDevice->rx_buf_repl_thresh >= + pDevice->RxJumboDescCnt) { + + pUmDevice->rx_buf_repl_thresh = + pUmDevice->rx_buf_repl_panic_thresh = + pDevice->RxJumboDescCnt - 1; + } + if (pUmDevice->rx_buf_repl_thresh >= + pDevice->RxStdDescCnt) { + + pUmDevice->rx_buf_repl_thresh = + pUmDevice->rx_buf_repl_panic_thresh = + pDevice->RxStdDescCnt - 1; + } + } +#endif + } + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_GetConfig(PLM_DEVICE_BLOCK pDevice) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + int index = pUmDevice->index; + struct net_device *dev = pUmDevice->dev; + + if (index >= MAX_UNITS) + return LM_STATUS_SUCCESS; + +#if LINUX_KERNEL_VERSION < 0x0020609 + + bcm5700_validate_param_range(pUmDevice, &auto_speed[index], "auto_speed", + 0, 1, 1); + if (auto_speed[index] == 0) + pDevice->DisableAutoNeg = TRUE; + else + pDevice->DisableAutoNeg = FALSE; + + if (line_speed[index] == 0) { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->DisableAutoNeg = FALSE; + } + else { + bcm5700_validate_param_range(pUmDevice, &full_duplex[index], + "full_duplex", 0, 1, 1); + if (full_duplex[index]) { + pDevice->RequestedDuplexMode = LM_DUPLEX_MODE_FULL; + } + else { + pDevice->RequestedDuplexMode = LM_DUPLEX_MODE_HALF; + } + + if (line_speed[index] == 1000) { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_1000MBPS; + if (pDevice->PhyFlags & PHY_NO_GIGABIT) { + pDevice->RequestedLineSpeed = + LM_LINE_SPEED_100MBPS; + printk(KERN_WARNING "%s-%d: Invalid line_speed parameter (1000), using 100\n", bcm5700_driver, index); + } + else { + if ((pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !full_duplex[index]) { + printk(KERN_WARNING "%s-%d: Invalid full_duplex parameter (0) for fiber, using 1\n", bcm5700_driver, index); + pDevice->RequestedDuplexMode = + LM_DUPLEX_MODE_FULL; + } + + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !auto_speed[index] && !(pDevice->PhyFlags & PHY_IS_FIBER) ) { + printk(KERN_WARNING "%s-%d: Invalid auto_speed parameter (0) for copper, using 1\n", bcm5700_driver, index); + pDevice->DisableAutoNeg = FALSE; + } + } + } + else if ((pDevice->TbiFlags & ENABLE_TBI_FLAG) || + (pDevice->PhyFlags & PHY_IS_FIBER)){ + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->RequestedDuplexMode = LM_DUPLEX_MODE_FULL; + pDevice->DisableAutoNeg = FALSE; + printk(KERN_WARNING "%s-%d: Invalid line_speed parameter (%d), using auto\n", bcm5700_driver, index, line_speed[index]); + } + else if (line_speed[index] == 100) { + + pDevice->RequestedLineSpeed = LM_LINE_SPEED_100MBPS; + } + else if (line_speed[index] == 10) { + + pDevice->RequestedLineSpeed = LM_LINE_SPEED_10MBPS; + } + else { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->DisableAutoNeg = FALSE; + printk(KERN_WARNING "%s-%d: Invalid line_speed parameter (%d), using 0\n", bcm5700_driver, index, line_speed[index]); + } + + } + +#endif /* LINUX_KERNEL_VERSION */ + + /* This is an unmanageable switch nic and will have link problems if + not set to auto + */ + if(pDevice->SubsystemVendorId==0x103c && pDevice->SubsystemId==0x3226) + { + if(pDevice->RequestedLineSpeed != LM_LINE_SPEED_AUTO) + { + printk(KERN_WARNING "%s-%d: Invalid line_speed parameter (%d), using 0\n", + bcm5700_driver, index, line_speed[index]); + } + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->DisableAutoNeg = FALSE; + } + +#if LINUX_KERNEL_VERSION < 0x0020609 + + pDevice->FlowControlCap = 0; + bcm5700_validate_param_range(pUmDevice, &rx_flow_control[index], + "rx_flow_control", 0, 1, 0); + if (rx_flow_control[index] != 0) { + pDevice->FlowControlCap |= LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + bcm5700_validate_param_range(pUmDevice, &tx_flow_control[index], + "tx_flow_control", 0, 1, 0); + if (tx_flow_control[index] != 0) { + pDevice->FlowControlCap |= LM_FLOW_CONTROL_TRANSMIT_PAUSE; + } + bcm5700_validate_param_range(pUmDevice, &auto_flow_control[index], + "auto_flow_control", 0, 1, 0); + if (auto_flow_control[index] != 0) { + if (pDevice->DisableAutoNeg == FALSE) { + + pDevice->FlowControlCap |= LM_FLOW_CONTROL_AUTO_PAUSE; + if ((tx_flow_control[index] == 0) && + (rx_flow_control[index] == 0)) { + + pDevice->FlowControlCap |= + LM_FLOW_CONTROL_TRANSMIT_PAUSE | + LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + } + } + + if (dev->mtu > 1500) { +#ifdef BCM_TSO + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (dev->features & NETIF_F_TSO)) { + dev->features &= ~NETIF_F_TSO; + printk(KERN_ALERT "%s: TSO previously enabled. Jumbo Frames and TSO cannot simultaneously be enabled. Jumbo Frames enabled. TSO disabled.\n", dev->name); + } +#endif + pDevice->RxMtu = dev->mtu + 14; + } + + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + !(pDevice->Flags & BCM5788_FLAG)) { + pDevice->Flags |= USE_TAGGED_STATUS_FLAG; + pUmDevice->timer_interval = HZ; + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) && + (pDevice->TbiFlags & ENABLE_TBI_FLAG)) { + pUmDevice->timer_interval = HZ/4; + } + } + else { + pUmDevice->timer_interval = HZ/10; + } + + bcm5700_validate_param_range(pUmDevice, &tx_pkt_desc_cnt[index], + "tx_pkt_desc_cnt", 1, MAX_TX_PACKET_DESC_COUNT-1, TX_DESC_CNT); + pDevice->TxPacketDescCnt = tx_pkt_desc_cnt[index]; + bcm5700_validate_param_range(pUmDevice, &rx_std_desc_cnt[index], + "rx_std_desc_cnt", 1, T3_STD_RCV_RCB_ENTRY_COUNT-1, + RX_DESC_CNT); + pDevice->RxStdDescCnt = rx_std_desc_cnt[index]; + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + bcm5700_validate_param_range(pUmDevice, &rx_jumbo_desc_cnt[index], + "rx_jumbo_desc_cnt", 1, T3_JUMBO_RCV_RCB_ENTRY_COUNT-1, + JBO_DESC_CNT); + + if (mtu[index] <= 1514) + pDevice->RxJumboDescCnt = 0; + else if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)){ + pDevice->RxJumboDescCnt = rx_jumbo_desc_cnt[index]; + } +#endif + +#ifdef BCM_INT_COAL + bcm5700_validate_param_range(pUmDevice, &adaptive_coalesce[index], + "adaptive_coalesce", 0, 1, 1); +#ifdef BCM_NAPI_RXPOLL + if (adaptive_coalesce[index]) { + printk(KERN_WARNING "%s-%d: adaptive_coalesce not used in NAPI mode\n", bcm5700_driver, index); + adaptive_coalesce[index] = 0; + + } +#endif + pUmDevice->adaptive_coalesce = adaptive_coalesce[index]; + if (!pUmDevice->adaptive_coalesce) { + bcm5700_validate_param_range(pUmDevice, + &rx_coalesce_ticks[index], "rx_coalesce_ticks", 0, + MAX_RX_COALESCING_TICKS, RX_COAL_TK); + if ((rx_coalesce_ticks[index] == 0) && + (rx_max_coalesce_frames[index] == 0)) { + + printk(KERN_WARNING "%s-%d: Conflicting rx_coalesce_ticks (0) and rx_max_coalesce_frames (0) parameters, using %d and %d respectively\n", + bcm5700_driver, index, RX_COAL_TK, RX_COAL_FM); + + rx_coalesce_ticks[index] = RX_COAL_TK; + rx_max_coalesce_frames[index] = RX_COAL_FM; + } + pDevice->RxCoalescingTicks = pUmDevice->rx_curr_coalesce_ticks = + rx_coalesce_ticks[index]; +#ifdef BCM_NAPI_RXPOLL + pDevice->RxCoalescingTicksDuringInt = rx_coalesce_ticks[index]; +#endif + + bcm5700_validate_param_range(pUmDevice, + &rx_max_coalesce_frames[index], + "rx_max_coalesce_frames", 0, + MAX_RX_MAX_COALESCED_FRAMES, RX_COAL_FM); + + pDevice->RxMaxCoalescedFrames = + pUmDevice->rx_curr_coalesce_frames = + rx_max_coalesce_frames[index]; +#ifdef BCM_NAPI_RXPOLL + pDevice->RxMaxCoalescedFramesDuringInt = + rx_max_coalesce_frames[index]; +#endif + + bcm5700_validate_param_range(pUmDevice, + &tx_coalesce_ticks[index], "tx_coalesce_ticks", 0, + MAX_TX_COALESCING_TICKS, TX_COAL_TK); + if ((tx_coalesce_ticks[index] == 0) && + (tx_max_coalesce_frames[index] == 0)) { + + printk(KERN_WARNING "%s-%d: Conflicting tx_coalesce_ticks (0) and tx_max_coalesce_frames (0) parameters, using %d and %d respectively\n", + bcm5700_driver, index, TX_COAL_TK, TX_COAL_FM); + + tx_coalesce_ticks[index] = TX_COAL_TK; + tx_max_coalesce_frames[index] = TX_COAL_FM; + } + pDevice->TxCoalescingTicks = tx_coalesce_ticks[index]; + bcm5700_validate_param_range(pUmDevice, + &tx_max_coalesce_frames[index], + "tx_max_coalesce_frames", 0, + MAX_TX_MAX_COALESCED_FRAMES, TX_COAL_FM); + pDevice->TxMaxCoalescedFrames = tx_max_coalesce_frames[index]; + pUmDevice->tx_curr_coalesce_frames = + pDevice->TxMaxCoalescedFrames; + + bcm5700_validate_param_range(pUmDevice, + &stats_coalesce_ticks[index], "stats_coalesce_ticks", + 0, MAX_STATS_COALESCING_TICKS, ST_COAL_TK); + if (adaptive_coalesce[index]) { + printk(KERN_WARNING "%s-%d: Invalid stats_coalesce_ticks parameter set with with adaptive_coalesce parameter. Using adaptive_coalesce.\n", bcm5700_driver, index); + }else{ + if ((stats_coalesce_ticks[index] > 0) && + (stats_coalesce_ticks[index] < 100)) { + printk(KERN_WARNING "%s-%d: Invalid stats_coalesce_ticks parameter (%u), using 100\n", bcm5700_driver, index, (unsigned int) stats_coalesce_ticks[index]); + stats_coalesce_ticks[index] = 100; + pDevice->StatsCoalescingTicks = stats_coalesce_ticks[index]; + pDevice->StatsCoalescingTicks = stats_coalesce_ticks[index]; + } + } + } + else { + pUmDevice->rx_curr_coalesce_frames = RX_COAL_FM; + pUmDevice->rx_curr_coalesce_ticks = RX_COAL_TK; + pUmDevice->tx_curr_coalesce_frames = TX_COAL_FM; + } +#endif + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) { + unsigned int tmpvar; + + tmpvar = pDevice->StatsCoalescingTicks / BCM_TIMER_GRANULARITY; + + /* + * If the result is zero, the request is too demanding. + */ + if (tmpvar == 0) { + tmpvar = 1; + } + + pDevice->StatsCoalescingTicks = tmpvar * BCM_TIMER_GRANULARITY; + + pUmDevice->statstimer_interval = tmpvar; + } + +#ifdef BCM_WOL + bcm5700_validate_param_range(pUmDevice, &enable_wol[index], + "enable_wol", 0, 1, 0); + if (enable_wol[index]) { + pDevice->WakeUpModeCap = LM_WAKE_UP_MODE_MAGIC_PACKET; + pDevice->WakeUpMode = LM_WAKE_UP_MODE_MAGIC_PACKET; + } +#endif +#ifdef INCLUDE_TBI_SUPPORT + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) { + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703)) { + /* just poll since we have hardware autoneg. in 5704 */ + pDevice->TbiFlags |= TBI_PURE_POLLING_FLAG; + } + else { + pDevice->TbiFlags |= TBI_POLLING_INTR_FLAG; + } + } +#endif + bcm5700_validate_param_range(pUmDevice, &scatter_gather[index], + "scatter_gather", 0, 1, 1); + bcm5700_validate_param_range(pUmDevice, &tx_checksum[index], + "tx_checksum", 0, 1, 1); + bcm5700_validate_param_range(pUmDevice, &rx_checksum[index], + "rx_checksum", 0, 1, 1); + if (!(pDevice->TaskOffloadCap & LM_TASK_OFFLOAD_TX_TCP_CHECKSUM)) { + if (tx_checksum[index] || rx_checksum[index]) { + + pDevice->TaskToOffload = LM_TASK_OFFLOAD_NONE; + printk(KERN_WARNING "%s-%d: Checksum offload not available on this NIC\n", bcm5700_driver, index); + } + } + else { + if (rx_checksum[index]) { + pDevice->TaskToOffload |= + LM_TASK_OFFLOAD_RX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_RX_UDP_CHECKSUM; + } + if (tx_checksum[index]) { + pDevice->TaskToOffload |= + LM_TASK_OFFLOAD_TX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_TX_UDP_CHECKSUM; + pDevice->Flags |= NO_TX_PSEUDO_HDR_CSUM_FLAG; + } + } +#ifdef BCM_TSO + bcm5700_validate_param_range(pUmDevice, &enable_tso[index], + "enable_tso", 0, 1, 1); + + /* Always enable TSO firmware if supported */ + /* This way we can turn it on or off on the fly */ + if (pDevice->TaskOffloadCap & LM_TASK_OFFLOAD_TCP_SEGMENTATION) + { + pDevice->TaskToOffload |= + LM_TASK_OFFLOAD_TCP_SEGMENTATION; + } + if (enable_tso[index] && + !(pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION)) + { + printk(KERN_WARNING "%s-%d: TSO not available on this NIC\n", bcm5700_driver, index); + } +#endif +#ifdef BCM_ASF + bcm5700_validate_param_range(pUmDevice, &vlan_tag_mode[index], + "vlan_strip_mode", 0, 2, 0); + pUmDevice->vlan_tag_mode = vlan_tag_mode[index]; +#else + pUmDevice->vlan_tag_mode = VLAN_TAG_MODE_NORMAL_STRIP; +#endif + +#endif /* LINUX_KERNEL_VERSION */ + +#ifdef BCM_NIC_SEND_BD + bcm5700_validate_param_range(pUmDevice, &nic_tx_bd[index], "nic_tx_bd", + 0, 1, 0); + if (nic_tx_bd[index]) + pDevice->Flags |= NIC_SEND_BD_FLAG; + if ((pDevice->Flags & ENABLE_PCIX_FIX_FLAG) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705)) { + if (pDevice->Flags & NIC_SEND_BD_FLAG) { + pDevice->Flags &= ~NIC_SEND_BD_FLAG; + printk(KERN_WARNING "%s-%d: Nic Send BDs not available on this NIC or not possible on this system\n", bcm5700_driver, index); + } + } +#endif +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_PCI_USE_VECTOR) + bcm5700_validate_param_range(pUmDevice, &disable_msi[pUmDevice->index], + "disable_msi", 0, 1, 0); +#endif + + bcm5700_validate_param_range(pUmDevice, &delay_link[index], + "delay_link", 0, 1, 0); + + bcm5700_validate_param_range(pUmDevice, &disable_d3hot[index], + "disable_d3hot", 0, 1, 0); + if (disable_d3hot[index]) { + +#ifdef BCM_WOL + if (enable_wol[index]) { + pDevice->WakeUpModeCap = LM_WAKE_UP_MODE_NONE; + pDevice->WakeUpMode = LM_WAKE_UP_MODE_NONE; + printk(KERN_WARNING "%s-%d: Wake-On-Lan disabled because D3Hot is disabled\n", bcm5700_driver, index); + } +#endif + pDevice->Flags |= DISABLE_D3HOT_FLAG; + } + + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_IndicateRxPackets(PLM_DEVICE_BLOCK pDevice) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + PLM_PACKET pPacket; + PUM_PACKET pUmPacket; + struct sk_buff *skb; + int size; + int vlan_tag_size = 0; + + if (pDevice->ReceiveMask & LM_KEEP_VLAN_TAG) + vlan_tag_size = 4; + + while (1) { + pPacket = (PLM_PACKET) + QQ_PopHead(&pDevice->RxPacketReceivedQ.Container); + if (pPacket == 0) + break; + pUmPacket = (PUM_PACKET) pPacket; +#if ! defined(NO_PCI_UNMAP) + pci_unmap_single(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[0]), + pPacket->u.Rx.RxBufferSize, + PCI_DMA_FROMDEVICE); +#endif + if ((pPacket->PacketStatus != LM_STATUS_SUCCESS) || + ((size = pPacket->PacketSize) > + (pDevice->RxMtu + vlan_tag_size))) { + + /* reuse skb */ +#ifdef BCM_TASKLET + QQ_PushTail(&pUmDevice->rx_out_of_buf_q.Container, pPacket); +#else + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); +#endif + pUmDevice->rx_misc_errors++; + continue; + } + skb = pUmPacket->skbuff; + skb_put(skb, size); + skb->pkt_type = 0; + skb->protocol = eth_type_trans(skb, skb->dev); + if (size > pDevice->RxMtu) { + /* Make sure we have a valid VLAN tag */ + if (htons(skb->protocol) != 0x8100) { + dev_kfree_skb_irq(skb); + pUmDevice->rx_misc_errors++; + goto drop_rx; + } + } + if ((pPacket->Flags & RCV_BD_FLAG_TCP_UDP_CHKSUM_FIELD) && + (pDevice->TaskToOffload & + LM_TASK_OFFLOAD_RX_TCP_CHECKSUM)) { + if (pPacket->u.Rx.TcpUdpChecksum == 0xffff) { + + skb->ip_summed = CHECKSUM_UNNECESSARY; +#if TIGON3_DEBUG + pUmDevice->rx_good_chksum_count++; +#endif + } + else { + skb->ip_summed = CHECKSUM_NONE; + pUmDevice->rx_bad_chksum_count++; + } + } + else { + skb->ip_summed = CHECKSUM_NONE; + } +#ifdef NICE_SUPPORT + if( pUmDevice->nice_rx ) { + vlan_tag_t *vlan_tag; + + vlan_tag = (vlan_tag_t *) &skb->cb[0]; + if (pPacket->Flags & RCV_BD_FLAG_VLAN_TAG) { + vlan_tag->signature = 0x7777; + vlan_tag->tag = pPacket->VlanTag; + } + else { + vlan_tag->signature = 0; + } + pUmDevice->nice_rx(skb, pUmDevice->nice_ctx); + } + else +#endif + { +#ifdef BCM_VLAN + if (pUmDevice->vlgrp && + (pPacket->Flags & RCV_BD_FLAG_VLAN_TAG)) { + +#ifdef BCM_NAPI_RXPOLL + vlan_hwaccel_receive_skb(skb, pUmDevice->vlgrp, + pPacket->VlanTag); +#else + vlan_hwaccel_rx(skb, pUmDevice->vlgrp, + pPacket->VlanTag); +#endif + } + else +#endif + { +#ifdef BCM_NAPI_RXPOLL + netif_receive_skb(skb); +#else + netif_rx(skb); +#endif + } + } + pUmDevice->dev->last_rx = jiffies; + +drop_rx: +#ifdef BCM_TASKLET + pUmPacket->skbuff = 0; + QQ_PushTail(&pUmDevice->rx_out_of_buf_q.Container, pPacket); +#else + skb = dev_alloc_skb(pPacket->u.Rx.RxBufferSize + 2); + if (skb == 0) { + pUmPacket->skbuff = 0; + QQ_PushTail(&pUmDevice->rx_out_of_buf_q.Container, pPacket); + } + else { + pUmPacket->skbuff = skb; + skb->dev = pUmDevice->dev; + skb_reserve(skb, pUmDevice->rx_buf_align); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + } +#endif + } + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_CoalesceTxBuffer(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket) +{ + PUM_PACKET pUmPacket = (PUM_PACKET) pPacket; + struct sk_buff *skb = pUmPacket->skbuff; + struct sk_buff *nskb; +#if ! defined(NO_PCI_UNMAP) + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + + pci_unmap_single(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[0]), + pci_unmap_len(pUmPacket, map_len[0]), + PCI_DMA_TODEVICE); +#if MAX_SKB_FRAGS + { + int i; + + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + pci_unmap_page(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[i + 1]), + pci_unmap_len(pUmPacket, map_len[i + 1]), + PCI_DMA_TODEVICE); + } + } +#endif +#endif + if ((nskb = skb_copy(skb, GFP_ATOMIC))) { + pUmPacket->lm_packet.u.Tx.FragCount = 1; + dev_kfree_skb(skb); + pUmPacket->skbuff = nskb; + return LM_STATUS_SUCCESS; + } + dev_kfree_skb(skb); + pUmPacket->skbuff = 0; + return LM_STATUS_FAILURE; +} + +/* Returns 1 if not all buffers are allocated */ +STATIC int +replenish_rx_buffers(PUM_DEVICE_BLOCK pUmDevice, int max) +{ + PLM_PACKET pPacket; + PUM_PACKET pUmPacket; + PLM_DEVICE_BLOCK pDevice = (PLM_DEVICE_BLOCK) pUmDevice; + struct sk_buff *skb; + int queue_rx = 0; + int alloc_cnt = 0; + int ret = 0; + + while ((pUmPacket = (PUM_PACKET) + QQ_PopHead(&pUmDevice->rx_out_of_buf_q.Container)) != 0) { + pPacket = (PLM_PACKET) pUmPacket; + if (pUmPacket->skbuff) { + /* reuse an old skb */ + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + queue_rx = 1; + continue; + } + if ((skb = dev_alloc_skb(pPacket->u.Rx.RxBufferSize + 2)) == 0) { + QQ_PushHead(&pUmDevice->rx_out_of_buf_q.Container, + pPacket); + ret = 1; + break; + } + pUmPacket->skbuff = skb; + skb->dev = pUmDevice->dev; + skb_reserve(skb, pUmDevice->rx_buf_align); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + queue_rx = 1; + if (max > 0) { + alloc_cnt++; + if (alloc_cnt >= max) + break; + } + } + if (queue_rx || pDevice->QueueAgain) { + LM_QueueRxPackets(pDevice); + } + return ret; +} + +LM_STATUS +MM_IndicateTxPackets(PLM_DEVICE_BLOCK pDevice) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + PLM_PACKET pPacket; + PUM_PACKET pUmPacket; + struct sk_buff *skb; +#if ! defined(NO_PCI_UNMAP) && MAX_SKB_FRAGS + int i; +#endif + + while (1) { + pPacket = (PLM_PACKET) + QQ_PopHead(&pDevice->TxPacketXmittedQ.Container); + if (pPacket == 0) + break; + pUmPacket = (PUM_PACKET) pPacket; + skb = pUmPacket->skbuff; +#if ! defined(NO_PCI_UNMAP) + pci_unmap_single(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[0]), + pci_unmap_len(pUmPacket, map_len[0]), + PCI_DMA_TODEVICE); +#if MAX_SKB_FRAGS + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + pci_unmap_page(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[i + 1]), + pci_unmap_len(pUmPacket, map_len[i + 1]), + PCI_DMA_TODEVICE); + } +#endif +#endif + dev_kfree_skb_irq(skb); + pUmPacket->skbuff = 0; + QQ_PushTail(&pDevice->TxPacketFreeQ.Container, pPacket); + } + if (pUmDevice->tx_full) { + if (QQ_GetEntryCnt(&pDevice->TxPacketFreeQ.Container) >= + (pDevice->TxPacketDescCnt >> 1)) { + + pUmDevice->tx_full = 0; + netif_wake_queue(pUmDevice->dev); + } + } + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_IndicateStatus(PLM_DEVICE_BLOCK pDevice, LM_STATUS Status) +{ + PUM_DEVICE_BLOCK pUmDevice = (PUM_DEVICE_BLOCK) pDevice; + struct net_device *dev = pUmDevice->dev; + LM_FLOW_CONTROL flow_control; + int speed = 0; + + if (!pUmDevice->opened) + return LM_STATUS_SUCCESS; + + if (!pUmDevice->suspended) { + if (Status == LM_STATUS_LINK_DOWN) { + netif_carrier_off(dev); + } + else if (Status == LM_STATUS_LINK_ACTIVE) { + netif_carrier_on(dev); + } + } + + if (pUmDevice->delayed_link_ind > 0) { + pUmDevice->delayed_link_ind = 0; + if (Status == LM_STATUS_LINK_DOWN) { + printk(KERN_ERR "%s: %s NIC Link is DOWN\n", bcm5700_driver, dev->name); + } + else if (Status == LM_STATUS_LINK_ACTIVE) { + printk(KERN_INFO "%s: %s NIC Link is UP, ", bcm5700_driver, dev->name); + } + } + else { + if (Status == LM_STATUS_LINK_DOWN) { + printk(KERN_ERR "%s: %s NIC Link is Down\n", bcm5700_driver, dev->name); + } + else if (Status == LM_STATUS_LINK_ACTIVE) { + printk(KERN_INFO "%s: %s NIC Link is Up, ", bcm5700_driver, dev->name); + } + } + + if (Status == LM_STATUS_LINK_ACTIVE) { + if (pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) + speed = 1000; + else if (pDevice->LineSpeed == LM_LINE_SPEED_100MBPS) + speed = 100; + else if (pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) + speed = 10; + + printk("%d Mbps ", speed); + + if (pDevice->DuplexMode == LM_DUPLEX_MODE_FULL) + printk("full duplex"); + else + printk("half duplex"); + + flow_control = pDevice->FlowControl & + (LM_FLOW_CONTROL_RECEIVE_PAUSE | + LM_FLOW_CONTROL_TRANSMIT_PAUSE); + if (flow_control) { + if (flow_control & LM_FLOW_CONTROL_RECEIVE_PAUSE) { + printk(", receive "); + if (flow_control & LM_FLOW_CONTROL_TRANSMIT_PAUSE) + printk("& transmit "); + } + else { + printk(", transmit "); + } + printk("flow control ON"); + } + printk("\n"); + } + return LM_STATUS_SUCCESS; +} + +void +MM_UnmapRxDma(LM_DEVICE_BLOCK *pDevice, LM_PACKET *pPacket) +{ +#if ! defined(NO_PCI_UNMAP) + UM_DEVICE_BLOCK *pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + UM_PACKET *pUmPacket = (UM_PACKET *) pPacket; + + if (!pUmPacket->skbuff) + return; + + pci_unmap_single(pUmDevice->pdev, + pci_unmap_addr(pUmPacket, map[0]), + pPacket->u.Rx.RxBufferSize, + PCI_DMA_FROMDEVICE); +#endif +} + +LM_STATUS +MM_FreeRxBuffer(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket) +{ + PUM_PACKET pUmPacket; + struct sk_buff *skb; + + if (pPacket == 0) + return LM_STATUS_SUCCESS; + pUmPacket = (PUM_PACKET) pPacket; + if ((skb = pUmPacket->skbuff)) { + /* DMA address already unmapped */ + dev_kfree_skb(skb); + } + pUmPacket->skbuff = 0; + return LM_STATUS_SUCCESS; +} + +LM_STATUS +MM_Sleep(LM_DEVICE_BLOCK *pDevice, LM_UINT32 msec) +{ + current->state = TASK_INTERRUPTIBLE; + if (schedule_timeout(HZ * msec / 1000) != 0) { + return LM_STATUS_FAILURE; + } + if (signal_pending(current)) + return LM_STATUS_FAILURE; + + return LM_STATUS_SUCCESS; +} + +void +bcm5700_shutdown(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = (LM_DEVICE_BLOCK *) pUmDevice; + + bcm5700_intr_off(pUmDevice); + netif_carrier_off(pUmDevice->dev); +#ifdef BCM_TASKLET + tasklet_kill(&pUmDevice->tasklet); +#endif + bcm5700_poll_wait(pUmDevice); + + LM_Halt(pDevice); + + pDevice->InitDone = 0; + bcm5700_free_remaining_rx_bufs(pUmDevice); +} + +void +bcm5700_free_remaining_rx_bufs(UM_DEVICE_BLOCK *pUmDevice) +{ + LM_DEVICE_BLOCK *pDevice = &pUmDevice->lm_dev; + UM_PACKET *pUmPacket; + int cnt, i; + + cnt = QQ_GetEntryCnt(&pUmDevice->rx_out_of_buf_q.Container); + for (i = 0; i < cnt; i++) { + if ((pUmPacket = + QQ_PopHead(&pUmDevice->rx_out_of_buf_q.Container)) + != 0) { + + MM_UnmapRxDma(pDevice, (LM_PACKET *) pUmPacket); + MM_FreeRxBuffer(pDevice, &pUmPacket->lm_packet); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, + pUmPacket); + } + } +} + +void +bcm5700_validate_param_range(UM_DEVICE_BLOCK *pUmDevice, int *param, + char *param_name, int min, int max, int deflt) +{ + if (((unsigned int) *param < (unsigned int) min) || + ((unsigned int) *param > (unsigned int) max)) { + + printk(KERN_WARNING "%s-%d: Invalid %s parameter (%u), using %u\n", bcm5700_driver, pUmDevice->index, param_name, (unsigned int) *param, (unsigned int) deflt); + *param = deflt; + } +} + +struct net_device * +bcm5700_find_peer(struct net_device *dev) +{ + struct net_device *tmp_dev; + UM_DEVICE_BLOCK *pUmDevice, *pUmTmp; + LM_DEVICE_BLOCK *pDevice; + + tmp_dev = 0; + pUmDevice = (UM_DEVICE_BLOCK *) dev->priv; + pDevice = &pUmDevice->lm_dev; + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) { + tmp_dev = root_tigon3_dev; + while (tmp_dev) { + pUmTmp = (PUM_DEVICE_BLOCK) tmp_dev->priv; + if ((tmp_dev != dev) && + (pUmDevice->pdev->bus->number == + pUmTmp->pdev->bus->number) && + PCI_SLOT(pUmDevice->pdev->devfn) == + PCI_SLOT(pUmTmp->pdev->devfn)) { + + break; + } + tmp_dev = pUmTmp->next_module; + } + } + return tmp_dev; +} + +LM_DEVICE_BLOCK * +MM_FindPeerDev(LM_DEVICE_BLOCK *pDevice) +{ + UM_DEVICE_BLOCK *pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + struct net_device *dev = pUmDevice->dev; + struct net_device *peer_dev; + + peer_dev = bcm5700_find_peer(dev); + if (!peer_dev) + return 0; + return ((LM_DEVICE_BLOCK *) peer_dev->priv); +} + +int MM_FindCapability(LM_DEVICE_BLOCK *pDevice, int capability) +{ + UM_DEVICE_BLOCK *pUmDevice = (UM_DEVICE_BLOCK *) pDevice; + return (pci_find_capability(pUmDevice->pdev, capability)); +} + +#if defined(HAVE_POLL_CONTROLLER)||defined(CONFIG_NET_POLL_CONTROLLER) +STATIC void +poll_bcm5700(struct net_device *dev) +{ + UM_DEVICE_BLOCK *pUmDevice = dev->priv; + +#if defined(RED_HAT_LINUX_KERNEL) && (LINUX_VERSION_CODE < 0x020605) + if (netdump_mode) { + bcm5700_interrupt(pUmDevice->pdev->irq, dev, NULL); +#ifdef BCM_NAPI_RXPOLL + if (dev->poll_list.prev) { + int budget = 64; + + bcm5700_poll(dev, &budget); + } +#endif + } + else +#endif + { + disable_irq(pUmDevice->pdev->irq); + bcm5700_interrupt(pUmDevice->pdev->irq, dev, NULL); + enable_irq(pUmDevice->pdev->irq); + } +} +#endif diff --git a/drivers/net/bcm5700/bcm5700.4 b/drivers/net/bcm5700/bcm5700.4 new file mode 100644 index 000000000..240d40a94 --- /dev/null +++ b/drivers/net/bcm5700/bcm5700.4 @@ -0,0 +1,535 @@ +.\" Copyright (c) 2000-2006 Broadcom Corporation +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation. +.\" +.\" bcm5700.4,v 5.9 +.\" +.TH BCM5700 4 "01/10/06" "Broadcom Corporation" +.\" +.\" NAME part +.\" +.SH NAME +bcm5700 \- Broadcom NetXtreme BCM5700 series Gigabit Ethernet device driver +.\" +.\" SYNOPSIS part +.\" +.SH SYNOPSIS +.B insmod bcm5700.o +.RB [ line_speed=\c +.IR n,... ] +.RB [ auto_speed=\c +.IR n,... ] +.RB [ full_duplex=\c +.IR n,... ] +.RB [ rx_flow_control=\c +.IR n,... ] +.RB [ tx_flow_control=\c +.IR n,... ] +.RB [ auto_flow_control=\c +.IR n,... ] +.RB [ mtu=\c +.IR n,... ] +.RB [ tx_checksum=\c +.IR n,... ] +.RB [ rx_checksum=\c +.IR n,... ] +.RB [ scatter_gather=\c +.IR n,... ] +.RB [ nic_tx_bd=\c +.IR n,... ] +.RB [ tx_pkt_desc_cnt=\c +.IR n,... ] +.RB [ rx_std_desc_cnt=\c +.IR n,... ] +.RB [ rx_jumbo_desc_cnt=\c +.IR n,... ] +.RB [ adaptive_coalesce=\c +.IR n,... ] +.RB [ rx_coalesce_ticks=\c +.IR n,... ] +.RB [ rx_max_coalesce_frames=\c +.IR n,... ] +.RB [ tx_coalesce_ticks=\c +.IR n,... ] +.RB [ tx_max_coalesce_frames=\c +.IR n,... ] +.RB [ stats_coalesce_ticks=\c +.IR n,... ] +.RB [ enable_wol=\c +.IR n,... ] +.RB [ enable_tso=\c +.IR n,... ] +.RB [ vlan_tag_mode=\c +.IR n,... ] +.RB [ delay_link=\c +.IR n,... ] +.RB [ disable_d3hot=\c +.IR n,... ] +.\" +.\" DESCRIPTION part +.\" +.SH DESCRIPTION +.I bcm5700 +is the low-level device driver for the Broadcom +.B NetXtreme BCM5700 +series PCI/PCI-X and PCI Express Gigabit Ethernet NIC. The driver has +been tested on most 2.4.x and 2.6.x kernels up to 2.4.27 and 2.6.8 for +i386, ia64, and x86_64 systems. +It should also work on other big-endian and little-endian CPU platforms, +but only very limited testing has been done and minor modifications to the +Makefile and source files may be required. +.PP +The driver supports up to 16 NICs and allocates the next available ethernet +device (eth0..eth#) for each NIC found. The driver is available as a loadable +module or can be compiled into the kernel. The loadable module binary +\fBbcm5700.o\fP or \fBbcm5700.ko\fP is installed in the following path: +.PP +2.2.x kernels: +.RS +/lib/modules//net/bcm5700.o +.RE +.PP +2.4.x kernels: +.RS +/lib/modules//kernel/drivers/net/bcm5700.o +.RE +.PP +2.4.x kernels with bcm5700 as an addon driver (e.g. Red Hat 7.3, 2.1AS): +.RS +/lib/modules//kernel/drivers/net/bcm/bcm5700.o +.PP +or +.PP +/lib/modules//kernel/drivers/addon/bcm5700/bcm5700.o +.RE +.PP +2.6.x kernels: +.RS +/lib/modules//kernel/drivers/net/bcm5700.ko +.RE +.PP +2.6.x kernels with bcm5700 as an addon driver (e.g. SusE 9 SLES): +.RS +/lib/modules//kernel/drivers/net/bcm/bcm5700.ko +.RE +.PP + +Note: If loading the driver on Red Hat 7.3, 2.1AS or other newer kernels +with the tg3 driver, it may be necessary to unload the tg3 driver first if +it is loaded. While tg3 is a fully functioning driver written by Red Hat et al, +Broadcom recommends users to use the bcm5700 driver written and tested by +Broadcom. Use ifconfig to bring down all eth# interfaces used by tg3 +and use rmmod to unload tg3. +It may also be necessary to manually edit the file /etc/modules.conf to +change interface alias names from tg3 to bcm5700. See the man page for +modules.conf for more details. + +.PP +Refer to various Linux documentations +on how to configure network protocol and address. +.\" +.\" PARAMETER part +.\" +.SH PARAMETERS +Optional parameters for the driver can be supplied as command line arguments +to the insmod command. These parameters can also be set in the file +/etc/modules.conf (see the man page for modules.conf). These parameters take +the form +.PP +.B =n1[,n2,...] +.PP +where the multiple values n1,n2,... are for multiple NICs installed in the +system. +.PP +Note that default or other meaningful values will be used when invalid values +are selected. Some combinations of parameters may conflict and lead to +failures. The driver cannot detect all such conflicting combinations. +.PP +All the parameters are listed below. +.TP +.B line_speed +Selects the line speed of the link. This parameter is used together with +\fBfull_duplex\fP and \fBauto_speed\fP to select the speed and +duplexity of the link and the setting of autonegotiation. The valid values are: +.RS +.TP +.B 0 +Autonegotiate for highest speed supported by link partner (default) +.TP +.B 10 +10 Mbps +.TP +.B 100 +100 Mbps +.TP +.B 1000 +1000 Mbps +.PP +If \fBline_speed\fP is set to \fB10\fP, \fB100\fP, or \fB1000\fP, +the NIC will autonegotiate for +the selected speed (and selected duplexity) if \fBauto_speed\fP is set to +\fB1\fP. If \fBauto_speed\fP is set to \fB0\fP, the selected speed and +duplexity will be set without autonegotiation. Note that 1000 Mbps must be +negotiated for copper twisted pair links. +.RE +.TP +.B auto_speed +Enables or disables autonegotiation. The valid values are: +.RS +.TP +.B 0 +Autonegotiation disabled +.TP +.B 1 +Autonegotiation enabled (default) +.PP +Note that this parameter is ignored and assumed \fB1\fP if \fBline_speed\fP is +set to \fB0\fP. +.RE +.TP +.B full_duplex +Selects the duplexity of the link. This paramter is used together with +\fBline_speed\fP to select the speed and duplexity of the link. Note that this +parameter is ignored if \fBline_speed\fP is \fB0\fP. The valid values are: +.RS +.TP +.B 0 +half duplex +.TP +.B 1 +full duplex (default) +.RE +.TP +.B rx_flow_control +Enables or disables receiving flow control (pause) frames. This parameter +is used together with \fBauto_flow_control\fP. The valid values are: +.RS +.TP +.B 0 +pause receive disabled +.TP +.B 1 +pause receive enabled if \fBauto_flow_control\fP is set to \fB0\fP, or pause +receive advertised if \fBauto_flow_control\fP is set to \fB1\fP (default) +.RE +.TP +.B tx_flow_control +Enables or disables transmitting flow control (pause) frames. This parameter +is used together with \fBauto_flow_control\fP. The valid values are: +.RS +.TP +.B 0 +pause transmit disabled +.TP +.B 1 +pause transmit enabled if \fBauto_flow_control\fP is set to \fB0\fP, or pause +transmit advertised if \fBauto_flow_control\fP is set to \fB1\fP (default) +.RE +.TP +.B auto_flow_control +Enables or disables autonegotiation of flow control. This parameter is used +together with \fBrx_flow_control\fP and \fBtx_flow_control\fP to determine the +advertised flow control capability. The valid values are: +.RS +.TP +.B 0 +flow control autonegotiation disabled +.TP +.B 1 +flow control autonegotiation enabled with capability specified in +\fBrx_flow_control\fP and \fBtx_flow_control\fP (only valid if \fBline_speed\fP +is set to \fB0\fP or \fBauto_speed\fP is set to \fB1\fP) (default) +.RE +.TP +.B mtu +Enables jumbo frames up to the specified MTU size. The valid range for +this parameter is 1500 to 9000. Default is 1500 which is standard +ethernet (non-jumbo) MTU size. Note that the MTU size excludes the +ethernet header size of 14 bytes. Actual frame size is MTU size + 14 bytes. +Jumbo MTU sizes are not supported on BCM5705 chips. + +.RS +The MTU size can also be changed using ifconfig after the driver is loaded. +See the ifconfig man page for details. +.RE +.TP +.B tx_checksum +Enables or disables hardware transmit TCP/UDP checksum. The valid values +are: +.RS +.TP +.B 0 +checksum disabled +.TP +.B 1 +checksum enabled (default) +.RE +.TP +.B rx_checksum +Enables or disables hardware receive TCP/UDP checksum validation. The +valid values are: +.RS +.TP +.B 0 +checksum disabled +.TP +.B 1 +checksum enabled (default) +.RE +.TP +.B +scatter_gather +Enables or disables scatter-gather and 64-bit DMA on x86. This option is only +useful when running on TUX-enabled kernels or newer kernels with zero-copy TCP. +The valid values are: +.RS +.TP +.B 0 +scatter-gather and 64-bit DMA on x86 disabled +.TP +.B 1 +scatter-gather and 64-bit DMA on x86 enabled (default) +.RE +.TP +.B +nic_tx_bd +Enables either NIC based or host based transmit buffer descriptors (Tx BDs). +NIC based Tx BDs may be slightly faster on certain machines on earlier +2.4 kernels where each transmit packet is usually entirely contiguous. On +later kernels with scatter-gather and TCP segmentation option, host based +Tx BDs using DMA transfer are usually faster. NIC based Tx BDs are not +supported on 5705 family controllers. The valid values are: +.RS +.TP +.B 0 +NIC based transmit buffer descriptors disabled (using host based +transmit buffer descriptors) (default) +.TP +.B 1 +NIC based transmit buffer descriptors enabled (not supported +on 5705 family controllers) +.RE +.TP +.B tx_pkt_desc_cnt +Configures the number of transmit descriptors. Default is 120. The +valid range is from 1 to 511. Note that the driver may not be able to +allocate the required amount of memory if this parameter is set too high. +Depending on kernel and CPU architecture, each descriptor may require up +to about 268 bytes. This parameter should not be set less than \fB80\fP if +\fBadaptive_coalesce\fP (see below) is enabled. + +.TP +.B rx_std_desc_cnt +Configures the number of receive descriptors for frames up to 1528 bytes. +Default is 200. The valid range is from 1 to 511. This parameter should +not be set less than \fB80\fP on systems with high network traffic. Setting this +parameter higher allows the NIC to buffer larger bursts of network +traffic without dropping frames, especially on slower systems. Note that +the driver may not be able to allocate the required amount of memory if +this parameter is set too high. Depending on kernel and CPU architecture, +each descriptor may require up to about 268 bytes. Each descriptor also +requires a socket buffer of at least 1536 bytes. This parameter should not +be set less than \fB50\fP if \fBadaptive_coalesce\fP (see below) is enabled. + +.TP +.B rx_jumbo_desc_cnt +Configures the number of receive descriptors for jumbo frames larger +than 1528 bytes. Default is 128 and valid range is from 1 to 255. +When jumbo frames larger than 1528 bytes are used, this parameter should +not be set lower than \fB60\fP on systems with high network traffic. Setting +this parameter higher allows the NIC to buffer larger bursts of jumbo +traffic without dropping frames, especially on slower systems. Depending +on kernel and CPU architecture, each descriptor may require up to about +268 bytes. Each descriptor also requires a socket buffer the size of a +maximum jumbo frame. On systems with insufficient memory, it may be +necessary to reduce this parameter. This parameter should not be set less +than \fB50\fP if \fBadaptive_coalesce\fP (see below) is enabled. When the maximum +frame size is 1528 or smaller (MTU size 1514 or smaller), this parameter +is not used and is always 0. + +.TP +.B adaptive_coalesce +Enables or disables adaptive adjustments to the various interrupt +coalescing parameters. Enabling it allows the driver to dynamically +adjust the interrupt coalescing parameters to achieve high throughput +during heavy traffic and low latency during light traffic. +\fBrx_std_desc_cnt\fP, (and \fBrx_jumbo_desc_cnt\fP if using jumbo frames) +should not be set less than \fB50\fP, and \fBtx_pkt_desc_cnt\fP should not be +set less than \fB80\fP when this parameter is enabled. Note that if the +kernel supports the NAPI receive polling mode, interrupt coalescing will +be handled in a different way and this parameter will not be used. The valid +values are: +.RS +.TP +.B 0 +disabled (always disabled in NAPI mode) +.TP +.B 1 +enabled (default) +.RE +.TP +.B rx_coalesce_ticks +Configures the number of 1 usec ticks before the NIC +generates receive interrupt after receiving a frame. This parameter works +in conjunction with the \fBrx_max_coalesce_frames\fP parameter. Interrupt will +be generated when either of these thresholds is exceeded. \fB0\fP means this +parameter is ignored and interrupt will be generated when the +\fBrx_max_coalesce_frames\fP threshold is reached. The valid range is from 0 +to 500, and default is 60 (18 if using NAPI mode). This parameter is not +used and will be adjusted +automatically if \fBadaptive_coalesce\fP is set to \fB1\fP. +.TP +.B rx_max_coalesce_frames +Configures the number of received frames before the +NIC generates receive interrupt. The valid range is from 0 to 100, and default +is 15 (6 if using NAPI mode). This parameter and +\fBrx_coalesce_ticks\fP cannot be both \fB0\fP, +otherwise no receive interrupts will be generated. It should also be set +lower than \fBrx_std_desc_cnt\fP (and \fBrx_jumbo_desc_cnt\fP +if using jumbo frames). This parameter is not +used and will be adjusted automatically if +\fBadaptive_coalesce\fP is set to \fB1\fP. +.TP +.B tx_coalesce_ticks +Configures the number of 1 usec ticks before the NIC +generates transmit interrupt after transmitting a frame. This parameter +works in conjunction with the \fBtx_max_coalesce_frames\fP parameter. Interrupt +will be generated when either of these thresholds is exceeded. \fB0\fP means +this parameter is ignored and interrupt will be generated when the +\fBtx_max_coalesce_frames\fP threshold is reached. The valid range is from 0 to +500, and default is 200. This parameter is not used and will be adjusted +automatically if \fBadaptive_coalesce\fP is set to \fB1\fP. +.TP +.B tx_max_coalesce_frames +Configures the number of transmitted frames before +the NIC generates transmit interrupt. The valid range is from 0 to 100, and +default is 35. This parameter and \fBtx_coalesce_ticks\fP cannot be both +\fB0\fP, otherwise no transmit completion interrupts will be generated. This +parameter should always be set lower than \fBtx_pkt_desc_cnt\fP. +This parameter is not used and will be adjusted +automatically if \fBadaptive_coalesce\fP is set to \fB1\fP. +.TP +.B stats_coalesce_ticks +Configures the number of 1 usec ticks between +periodic statistics block DMAs. The valid range is from 100 to 3600000000, and +default is 1000000 (1 sec.). 0 is also valid and is used to disable +statistics updates. This parameter is not used and will be set to default +if \fBadaptive_coalesce\fP is set to \fB1\fP. +.TP +.B enable_wol +Enables or disables magic packet Wake-On-LAN when the system is shutdown. +Note that not all systems support Wake-On-LAN. The valid values are: +.RS +.TP +.B 0 +magic packet Wake-On-LAN disabled (default) +.TP +.B 1 +magic packet Wake-On-LAN enabled +.RE +.TP +.B enable_tso +Enables or disables TCP Segmentation Option (TSO) when using kernels that +support it. This parameter is only defined on newer kernels that support +TSO. The valid values are: +.RS +.TP +.B 0 +TSO disabled +.TP +.B 1 +TSO enabled (default) +.RE +.TP +.B vlan_tag_mode +This parameter controls the stripping of VLAN tags on incoming packets, +and is used to allow VLAN tagged ASF or IPMI packets to be received +properly. The valid values are: +.RS +.TP +.B 0 +Auto mode (default) +.TP +.B 1 +Normal strip mode +.TP +.B 2 +Forced strip mode +.PP +In normal mode, VLAN tags are only stripped if VLANs are registered +by the 802.1q VLAN module or BASP. In forced strip mode, VLAN tags +are always stripped. Auto mode will select normal strip mode if ASF/IPMI +is disabled, or forced strip mode if ASF/IPMI is enabled. +.RE +.TP +.B delay_link +If set to 1, this parameter will cause the driver to return +-EOPNOTSUPP when the SIOCGMIIREG or ETHTOOL_GLINK ioctls are called +during the first 6 seconds after driver reset. When the driver resets +the NIC during ifconfig, the link will drop and it may take several +seconds for the link to come up after autonegotiation completes. Some +applications, such as ifup, may not wait long enough for the link +before giving up. Setting this parameter to 1 may get around such +problems. The default value is 0, which means that the driver will +always return true link states to all ioctl calls, when applicable. +.TP +.B disable_d3hot +If set to 1, this parameter will cause the driver to never +put the device in D3Hot power state when the NIC is shutdown or +suspended. If set, this parameter will also disable the Wake-On-Lan +setting. A rare D3Hot related problem was seen during repeated shutdown of +PCI Express devices on systems running 2.6 kernels. + +.\" +.\" DRIVER MESSAGES part +.\" +.SH DRIVER MESSAGES +The following are the most common sample messages that may be logged in the file +/var/log/messages. Use dmesg -n to control the level at which messages +will appear on the console. Most systems are set to level 6 by default. +.PP +.B Broadcom Gigabit Ethernet Driver bcm5700 with Broadcom NIC Extension (NICE) ver. 8.3.9 (09/30/05) +.RS +Driver signon +.RE +.PP +.B eth#: Broadcom BCM5704 1000Base-T found at mem faff0000, IRQ 16, node addr 0010180402d8 +.PP +.B eth#: Broadcom BCM5704 Integrated Copper transceiver found +.PP +.B eth#: Scatter-gather ON, 64-bit DMA ON, Tx Checksum ON, Rx Checksum ON, 802.1Q VLAN ON, NAPI ON +.RS +NIC detected +.RE +.PP +.B bcm5700: eth# NIC Link is Up, 1000 Mbps full duplex, receive & transmit flow control ON +.RS +Link up and speed indication +.RE +.PP +.B bcm5700: eth# NIC Link is Down +.RS + Link down indication +.RE +.\" +.\" FILES part +.\" +.SH FILES +.I /proc/net/nicinfo/eth#.info +.RS +Detailed statistics and configuration file. +.RE +.\" +.\" AUTHOR part +.\" +.SH AUTHOR +Michael Chan \- mchan@broadcom.com +.\" +.\" SEE ALSO part +.\" +.SH SEE ALSO +.BR ifconfig (8), +.BR insmod (8), +.BR modules.conf (5). + diff --git a/drivers/net/bcm5700/bits.h b/drivers/net/bcm5700/bits.h new file mode 100644 index 000000000..cd97e8486 --- /dev/null +++ b/drivers/net/bcm5700/bits.h @@ -0,0 +1,61 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/* 02/25/00 Hav Khauv Initial version. */ +/******************************************************************************/ + +#ifndef BITS_H +#define BITS_H + + + +/******************************************************************************/ +/* Bit Mask definitions */ +/******************************************************************************/ + +#define BIT_NONE 0x00 +#define BIT_0 0x01 +#define BIT_1 0x02 +#define BIT_2 0x04 +#define BIT_3 0x08 +#define BIT_4 0x10 +#define BIT_5 0x20 +#define BIT_6 0x40 +#define BIT_7 0x80 +#define BIT_8 0x0100 +#define BIT_9 0x0200 +#define BIT_10 0x0400 +#define BIT_11 0x0800 +#define BIT_12 0x1000 +#define BIT_13 0x2000 +#define BIT_14 0x4000 +#define BIT_15 0x8000 +#define BIT_16 0x010000 +#define BIT_17 0x020000 +#define BIT_18 0x040000 +#define BIT_19 0x080000 +#define BIT_20 0x100000 +#define BIT_21 0x200000 +#define BIT_22 0x400000 +#define BIT_23 0x800000 +#define BIT_24 0x01000000 +#define BIT_25 0x02000000 +#define BIT_26 0x04000000 +#define BIT_27 0x08000000 +#define BIT_28 0x10000000 +#define BIT_29 0x20000000 +#define BIT_30 0x40000000 +#define BIT_31 0x80000000 + + + +#endif /* BITS_H */ + diff --git a/drivers/net/bcm5700/fw_lso05.h b/drivers/net/bcm5700/fw_lso05.h new file mode 100644 index 000000000..cfe6a9cf2 --- /dev/null +++ b/drivers/net/bcm5700/fw_lso05.h @@ -0,0 +1,289 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* (c) COPYRIGHT 2001-2004 Broadcom Corporation, ALL RIGHTS RESERVED. */ +/* */ +/* Name: F W _ L S O 0 5. H */ +/* Author : Kevin Tran */ +/* Version: 1.2 */ +/* */ +/* Module Description: This file contains firmware binary code of TCP */ +/* Segmentation firmware (BCM5705). */ +/* */ +/* History: */ +/* 08/10/02 Kevin Tran Incarnation. */ +/* 02/02/04 Kevin Tran Added Support for BCM5788. */ +/******************************************************************************/ + +#ifndef __FW_LSO05_H__ +#define __FW_LSO05_H__ + +int t3StkOffLd05FwReleaseMajor = 0x1; +int t3StkOffLd05FwReleaseMinor = 0x2; +int t3StkOffLd05FwReleaseFix = 0x0; +U32 t3StkOffLd05FwStartAddr = 0x00010000; +U32 t3StkOffLd05FwTextAddr = 0x00010000; +int t3StkOffLd05FwTextLen = 0xe90; +U32 t3StkOffLd05FwRodataAddr = 0x00010e90; +int t3StkOffLd05FwRodataLen = 0x50; +U32 t3StkOffLd05FwDataAddr = 0x00010f00; +int t3StkOffLd05FwDataLen = 0x20; +U32 t3StkOffLd05FwSbssAddr = 0x00010f20; +int t3StkOffLd05FwSbssLen = 0x28; +U32 t3StkOffLd05FwBssAddr = 0x00010f50; +int t3StkOffLd05FwBssLen = 0x88; +U32 t3StkOffLd05FwText[(0xe90/4) + 1] = { +0xc004003, 0x0, 0x10f04, +0x0, 0x10000003, 0x0, 0xd, +0xd, 0x3c1d0001, 0x37bde000, 0x3a0f021, +0x3c100001, 0x26100000, 0xc004010, 0x0, +0xd, 0x27bdffe0, 0x3c04fefe, 0xafbf0018, +0xc0042e8, 0x34840002, 0xc004364, 0x0, +0x3c030001, 0x90630f34, 0x24020002, 0x3c040001, +0x24840e9c, 0x14620003, 0x24050001, 0x3c040001, +0x24840e90, 0x24060002, 0x3821, 0xafa00010, +0xc004378, 0xafa00014, 0xc00402c, 0x0, +0x8fbf0018, 0x3e00008, 0x27bd0020, 0x0, +0x0, 0x27bdffe0, 0xafbf001c, 0xafb20018, +0xafb10014, 0xc0042d4, 0xafb00010, 0x3c128000, +0x24110001, 0x8f706810, 0x32020400, 0x10400007, +0x0, 0x8f641008, 0x921024, 0x14400003, +0x0, 0xc004064, 0x0, 0x3c020001, +0x90420f56, 0x10510003, 0x32020200, 0x1040fff1, +0x0, 0xc0041b4, 0x0, 0x8004034, +0x0, 0x8fbf001c, 0x8fb20018, 0x8fb10014, +0x8fb00010, 0x3e00008, 0x27bd0020, 0x27bdffe0, +0x3c040001, 0x24840eb0, 0x2821, 0x3021, +0x3821, 0xafbf0018, 0xafa00010, 0xc004378, +0xafa00014, 0xd021, 0x24020130, 0xaf625000, +0x3c010001, 0xa4200f50, 0x3c010001, 0xa0200f57, +0x8fbf0018, 0x3e00008, 0x27bd0020, 0x0, +0x0, 0x3c030001, 0x24630f60, 0x90620000, +0x27bdfff0, 0x14400003, 0x80c021, 0x8004073, +0x4821, 0x3c022000, 0x3021024, 0x10400003, +0x24090002, 0x8004073, 0xa0600000, 0x24090001, +0x181040, 0x30431f80, 0x346f8008, 0x1520004b, +0x25eb0028, 0x3c040001, 0x832021, 0x8c848010, +0x3c050001, 0x24a50f7a, 0x41402, 0xa0a20000, +0x3c010001, 0xa0240f7b, 0x3c020001, 0x431021, +0x94428014, 0x3c010001, 0xa0220f7c, 0x3c0c0001, +0x1836021, 0x8d8c8018, 0x304200ff, 0x24420008, +0x220c3, 0x24020001, 0x3c010001, 0xa0220f60, +0x124102b, 0x1040000c, 0x3821, 0x24a6000e, +0x1602821, 0x8ca20000, 0x8ca30004, 0x24a50008, +0x24e70001, 0xacc20000, 0xacc30004, 0xe4102b, +0x1440fff8, 0x24c60008, 0x3821, 0x3c080001, +0x25080f7b, 0x91060000, 0x3c020001, 0x90420f7c, +0x2503000d, 0xc32821, 0x461023, 0x21fc2, +0x431021, 0x21043, 0x1840000c, 0x2021, +0x91020001, 0x461023, 0x21fc2, 0x431021, +0x21843, 0x94a20000, 0x24e70001, 0x822021, +0xe3102a, 0x1440fffb, 0x24a50002, 0x41c02, +0x3082ffff, 0x622021, 0x41402, 0x822021, +0x3c02ffff, 0x1821024, 0x3083ffff, 0x431025, +0x3c010001, 0x80040fa, 0xac220f80, 0x3c050001, +0x24a50f7c, 0x90a20000, 0x3c0c0001, 0x1836021, +0x8d8c8018, 0x220c2, 0x1080000e, 0x3821, +0x1603021, 0x24a5000c, 0x8ca20000, 0x8ca30004, +0x24a50008, 0x24e70001, 0xacc20000, 0xacc30004, +0xe4102b, 0x1440fff8, 0x24c60008, 0x3c050001, +0x24a50f7c, 0x90a20000, 0x30430007, 0x24020004, +0x10620011, 0x28620005, 0x10400005, 0x24020002, +0x10620008, 0x710c0, 0x80040fa, 0x0, +0x24020006, 0x1062000e, 0x710c0, 0x80040fa, +0x0, 0xa21821, 0x9463000c, 0x4b1021, +0x80040fa, 0xa4430000, 0x710c0, 0xa21821, +0x8c63000c, 0x4b1021, 0x80040fa, 0xac430000, +0xa21821, 0x8c63000c, 0x4b2021, 0xa21021, +0xac830000, 0x94420010, 0xa4820004, 0x95e70006, +0x3c020001, 0x90420f7c, 0x3c030001, 0x90630f7a, +0xe2c823, 0x3c020001, 0x90420f7b, 0x24630028, +0x1e34021, 0x24420028, 0x15200012, 0x1e23021, +0x94c2000c, 0x3c010001, 0xa4220f78, 0x94c20004, +0x94c30006, 0x3c010001, 0xa4200f76, 0x3c010001, +0xa4200f72, 0x21400, 0x431025, 0x3c010001, +0xac220f6c, 0x95020004, 0x3c010001, 0x8004124, +0xa4220f70, 0x3c020001, 0x94420f70, 0x3c030001, +0x94630f72, 0x431021, 0xa5020004, 0x3c020001, +0x94420f6c, 0xa4c20004, 0x3c020001, 0x8c420f6c, +0xa4c20006, 0x3c040001, 0x94840f72, 0x3c020001, +0x94420f70, 0x3c0a0001, 0x954a0f76, 0x441821, +0x3063ffff, 0x62182a, 0x24020002, 0x1122000b, +0x832023, 0x3c030001, 0x94630f78, 0x30620009, +0x10400006, 0x3062fff6, 0xa4c2000c, 0x3c020001, +0x94420f78, 0x30420009, 0x1425023, 0x24020001, +0x1122001b, 0x29220002, 0x50400005, 0x24020002, +0x11200007, 0x31a2ffff, 0x8004197, 0x0, +0x1122001d, 0x24020016, 0x8004197, 0x31a2ffff, +0x3c0e0001, 0x95ce0f80, 0x10800005, 0x1806821, +0x1c42021, 0x41c02, 0x3082ffff, 0x627021, +0xe1027, 0xa502000a, 0x3c030001, 0x90630f7b, +0x31a2ffff, 0xe21021, 0x800418d, 0x432023, +0x3c020001, 0x94420f80, 0x442021, 0x41c02, +0x3082ffff, 0x622021, 0x807021, 0x41027, +0x8004185, 0xa502000a, 0x3c050001, 0x24a50f7a, +0x90a30000, 0x14620002, 0x24e2fff2, 0xa5e20034, +0x90a20000, 0xe21023, 0xa5020002, 0x3c030001, +0x94630f80, 0x3c020001, 0x94420f5a, 0x30e5ffff, +0x641821, 0x451023, 0x622023, 0x41c02, +0x3082ffff, 0x622021, 0x41027, 0xa502000a, +0x3c030001, 0x90630f7c, 0x24620001, 0x14a20005, +0x807021, 0x1631021, 0x90420000, 0x8004185, +0x26200, 0x24620002, 0x14a20003, 0x306200fe, +0x4b1021, 0x944c0000, 0x3c020001, 0x94420f82, +0x3183ffff, 0x3c040001, 0x90840f7b, 0x431021, +0xe21021, 0x442023, 0x8a2021, 0x41c02, +0x3082ffff, 0x622021, 0x41402, 0x822021, +0x806821, 0x41027, 0xa4c20010, 0x31a2ffff, +0xe1c00, 0x431025, 0x3c040001, 0x24840f72, +0xade20010, 0x94820000, 0x3c050001, 0x94a50f76, +0x3c030001, 0x8c630f6c, 0x24420001, 0xb92821, +0xa4820000, 0x3322ffff, 0x622021, 0x83182b, +0x3c010001, 0xa4250f76, 0x10600003, 0x24a2ffff, +0x3c010001, 0xa4220f76, 0x3c024000, 0x3021025, +0x3c010001, 0xac240f6c, 0xaf621008, 0x3e00008, +0x27bd0010, 0x3c030001, 0x90630f56, 0x27bdffe8, +0x24020001, 0xafbf0014, 0x10620026, 0xafb00010, +0x8f620cf4, 0x2442ffff, 0x3042007f, 0x21100, +0x8c434000, 0x3c010001, 0xac230f64, 0x8c434008, +0x24444000, 0x8c5c4004, 0x30620040, 0x14400002, +0x24020088, 0x24020008, 0x3c010001, 0xa4220f68, +0x30620004, 0x10400005, 0x24020001, 0x3c010001, +0xa0220f57, 0x80041d5, 0x31402, 0x3c010001, +0xa0200f57, 0x31402, 0x3c010001, 0xa4220f54, +0x9483000c, 0x24020001, 0x3c010001, 0xa4200f50, +0x3c010001, 0xa0220f56, 0x3c010001, 0xa4230f62, +0x24020001, 0x1342001e, 0x0, 0x13400005, +0x24020003, 0x13420067, 0x0, 0x80042cf, +0x0, 0x3c020001, 0x94420f62, 0x241a0001, +0x3c010001, 0xa4200f5e, 0x3c010001, 0xa4200f52, +0x304407ff, 0x21bc2, 0x31823, 0x3063003e, +0x34630036, 0x21242, 0x3042003c, 0x621821, +0x3c010001, 0xa4240f58, 0x832021, 0x24630030, +0x3c010001, 0xa4240f5a, 0x3c010001, 0xa4230f5c, +0x3c060001, 0x24c60f52, 0x94c50000, 0x94c30002, +0x3c040001, 0x94840f5a, 0x651021, 0x44102a, +0x10400013, 0x3c108000, 0xa31021, 0xa4c20000, +0x3c02a000, 0xaf620cf4, 0x3c010001, 0xa0200f56, +0x8f641008, 0x901024, 0x14400003, 0x0, +0xc004064, 0x0, 0x8f620cf4, 0x501024, +0x104000b7, 0x0, 0x800420f, 0x0, +0x3c030001, 0x94630f50, 0x851023, 0xa4c40000, +0x621821, 0x3042ffff, 0x3c010001, 0xa4230f50, +0xaf620ce8, 0x3c020001, 0x94420f68, 0x34420024, +0xaf620cec, 0x94c30002, 0x3c020001, 0x94420f50, +0x14620012, 0x3c028000, 0x3c108000, 0x3c02a000, +0xaf620cf4, 0x3c010001, 0xa0200f56, 0x8f641008, +0x901024, 0x14400003, 0x0, 0xc004064, +0x0, 0x8f620cf4, 0x501024, 0x1440fff7, +0x0, 0x80042cf, 0x241a0003, 0xaf620cf4, +0x3c108000, 0x8f641008, 0x901024, 0x14400003, +0x0, 0xc004064, 0x0, 0x8f620cf4, +0x501024, 0x1440fff7, 0x0, 0x80042cf, +0x241a0003, 0x3c070001, 0x24e70f50, 0x94e20000, +0x3821021, 0xaf620ce0, 0x3c020001, 0x8c420f64, +0xaf620ce4, 0x3c050001, 0x94a50f54, 0x94e30000, +0x3c040001, 0x94840f58, 0x3c020001, 0x94420f5e, +0xa32823, 0x822023, 0x30a6ffff, 0x3083ffff, +0xc3102b, 0x14400043, 0x0, 0x3c020001, +0x94420f5c, 0x21400, 0x621025, 0xaf620ce8, +0x94e20000, 0x3c030001, 0x94630f54, 0x441021, +0xa4e20000, 0x3042ffff, 0x14430021, 0x3c020008, +0x3c020001, 0x90420f57, 0x10400006, 0x3c03000c, +0x3c020001, 0x94420f68, 0x34630624, 0x800427c, +0xd021, 0x3c020001, 0x94420f68, 0x3c030008, +0x34630624, 0x431025, 0xaf620cec, 0x3c108000, +0x3c02a000, 0xaf620cf4, 0x3c010001, 0xa0200f56, +0x8f641008, 0x901024, 0x14400003, 0x0, +0xc004064, 0x0, 0x8f620cf4, 0x501024, +0x10400015, 0x0, 0x8004283, 0x0, +0x3c030001, 0x94630f68, 0x34420624, 0x3c108000, +0x621825, 0x3c028000, 0xaf630cec, 0xaf620cf4, +0x8f641008, 0x901024, 0x14400003, 0x0, +0xc004064, 0x0, 0x8f620cf4, 0x501024, +0x1440fff7, 0x0, 0x3c010001, 0x80042cf, +0xa4200f5e, 0x3c020001, 0x94420f5c, 0x21400, +0xc21025, 0xaf620ce8, 0x3c020001, 0x90420f57, +0x10400009, 0x3c03000c, 0x3c020001, 0x94420f68, +0x34630624, 0xd021, 0x431025, 0xaf620cec, +0x80042c1, 0x3c108000, 0x3c020001, 0x94420f68, +0x3c030008, 0x34630604, 0x431025, 0xaf620cec, +0x3c020001, 0x94420f5e, 0x451021, 0x3c010001, +0xa4220f5e, 0x3c108000, 0x3c02a000, 0xaf620cf4, +0x3c010001, 0xa0200f56, 0x8f641008, 0x901024, +0x14400003, 0x0, 0xc004064, 0x0, +0x8f620cf4, 0x501024, 0x1440fff7, 0x0, +0x8fbf0014, 0x8fb00010, 0x3e00008, 0x27bd0018, +0x0, 0x27bdffe0, 0x3c040001, 0x24840ec0, +0x2821, 0x3021, 0x3821, 0xafbf0018, +0xafa00010, 0xc004378, 0xafa00014, 0xd021, +0x24020130, 0xaf625000, 0x3c010001, 0xa4200f50, +0x3c010001, 0xa0200f57, 0x8fbf0018, 0x3e00008, +0x27bd0020, 0x27bdffe8, 0x3c1bc000, 0xafbf0014, +0xafb00010, 0xaf60680c, 0x8f626804, 0x34420082, +0xaf626804, 0x8f634000, 0x24020b50, 0x3c010001, +0xac220f20, 0x24020b78, 0x3c010001, 0xac220f30, +0x34630002, 0xaf634000, 0xc004315, 0x808021, +0x3c010001, 0xa0220f34, 0x304200ff, 0x24030002, +0x14430005, 0x0, 0x3c020001, 0x8c420f20, +0x8004308, 0xac5000c0, 0x3c020001, 0x8c420f20, +0xac5000bc, 0x8f624434, 0x8f634438, 0x8f644410, +0x3c010001, 0xac220f28, 0x3c010001, 0xac230f38, +0x3c010001, 0xac240f24, 0x8fbf0014, 0x8fb00010, +0x3e00008, 0x27bd0018, 0x3e00008, 0x24020001, +0x27bdfff8, 0x18800009, 0x2821, 0x8f63680c, +0x8f62680c, 0x1043fffe, 0x0, 0x24a50001, +0xa4102a, 0x1440fff9, 0x0, 0x3e00008, +0x27bd0008, 0x8f634450, 0x3c020001, 0x8c420f28, +0x31c02, 0x43102b, 0x14400008, 0x3c038000, +0x3c040001, 0x8c840f38, 0x8f624450, 0x21c02, +0x83102b, 0x1040fffc, 0x3c038000, 0xaf634444, +0x8f624444, 0x431024, 0x1440fffd, 0x0, +0x8f624448, 0x3e00008, 0x3042ffff, 0x3082ffff, +0x2442e000, 0x2c422001, 0x14400003, 0x3c024000, +0x8004347, 0x2402ffff, 0x822025, 0xaf645c38, +0x8f625c30, 0x30420002, 0x1440fffc, 0x1021, +0x3e00008, 0x0, 0x8f624450, 0x3c030001, +0x8c630f24, 0x8004350, 0x3042ffff, 0x8f624450, +0x3042ffff, 0x43102b, 0x1440fffc, 0x0, +0x3e00008, 0x0, 0x27bdffe0, 0x802821, +0x3c040001, 0x24840ed0, 0x3021, 0x3821, +0xafbf0018, 0xafa00010, 0xc004378, 0xafa00014, +0x800435f, 0x0, 0x8fbf0018, 0x3e00008, +0x27bd0020, 0x3c020001, 0x3442d600, 0x3c030001, +0x3463d600, 0x3c040001, 0x3484ddff, 0x3c010001, +0xac220f40, 0x24020040, 0x3c010001, 0xac220f44, +0x3c010001, 0xac200f3c, 0xac600000, 0x24630004, +0x83102b, 0x5040fffd, 0xac600000, 0x3e00008, +0x0, 0x804821, 0x8faa0010, 0x3c020001, +0x8c420f3c, 0x3c040001, 0x8c840f44, 0x8fab0014, +0x24430001, 0x44102b, 0x3c010001, 0xac230f3c, +0x14400003, 0x4021, 0x3c010001, 0xac200f3c, +0x3c020001, 0x8c420f3c, 0x3c030001, 0x8c630f40, +0x91240000, 0x21140, 0x431021, 0x481021, +0x25080001, 0xa0440000, 0x29020008, 0x1440fff4, +0x25290001, 0x3c020001, 0x8c420f3c, 0x3c030001, +0x8c630f40, 0x8f64680c, 0x21140, 0x431021, +0xac440008, 0xac45000c, 0xac460010, 0xac470014, +0xac4a0018, 0x3e00008, 0xac4b001c, 0x0, +0x0, 0x0 }; +U32 t3StkOffLd05FwRodata[(0x50/4) + 1] = { +0x4d61696e, +0x43707542, 0x0, 0x4d61696e, 0x43707541, +0x0, 0x0, 0x0, 0x73746b6f, +0x66666c64, 0x0, 0x0, 0x73746b6f, +0x66666c64, 0x0, 0x0, 0x66617461, +0x6c457272, 0x0, 0x0, 0x0 }; +U32 t3StkOffLd05FwData[(0x20/4) + 1] = { +0x0, +0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, +0x0, 0x0, 0x0, 0x0 }; + +#endif /* __FW_LSO05_H__ */ diff --git a/drivers/net/bcm5700/fw_stkoffld.h b/drivers/net/bcm5700/fw_stkoffld.h new file mode 100644 index 000000000..119a17b34 --- /dev/null +++ b/drivers/net/bcm5700/fw_stkoffld.h @@ -0,0 +1,519 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* (c) COPYRIGHT 2000-2003 Broadcom Corporation, ALL RIGHTS RESERVED. */ +/* */ +/* Name: F W _ S T K O F F L D . H */ +/* Author : Kevin Tran */ +/* Version : 1.6 */ +/* */ +/* Module Description: This file contains firmware binary code of for TCP/IP */ +/* stack offload support. Currently, this firmware supports the following */ +/* features: */ +/* 1. TCP segmentation (aka Large Send Offload -- LSO) */ +/* 2. UDP Checksum offload support for IP fragmented UDP frames. */ +/* */ +/* History: */ +/* 07/17/01 Kevin Tran Incarnation. */ +/* 10/10/01 Kevin Tran Added UDP checksum offload support. */ +/* 10/20/01 Kevin Tran Fixed a problem where pseudo checksum is not */ +/* calculated correctly in case of IP */ +/* fragmentation case. */ +/* 10/30/01 Kevin Tran Fixed a problem where checksum is incorrectly */ +/* computed if bit BD_FLAG_TCP_UDP_CKSUM is set */ +/* in Send BDs. */ +/* 05/30/02 Kevin Tran Fixed a problem where UDP checksum is */ +/* incorrectly computed if the length of data is */ +/* less than 6 bytes in the last packetst of */ +/* of a chain of fragmented IP/UDP packets. */ +/* 12/01/02 Kevin Tran Fixed a problem where firmware might lockup */ +/* in a certain test scenario with BCM5704. */ +/* 12/10/02 Kevin Tran Fixed a problem where IP checksum might be */ +/* incorrectly calculated in some corner cases. */ +/* This problem should ONLY happen with BCM5702/ */ +/* BCM5703/BCM5704 ASICs. */ +/* 06/20/03 Kevin Tran Optimized performance so that pre-DMA code */ +/* doesn't have to wait until the first packet */ +/* is completely DMAed before it can setup DMAs */ +/* for subsequent packets. This requires host */ +/* driver to pass IP/TCP option lengths if any */ +/* to F/W via bit 15..12 of Send BD flag. */ +/* 08/12/03 Kevin Tran Fixed a problem where UDP checksum doesn't */ +/* work when the host driver seeds pseudo */ +/* checksum. */ +/* 12/24/03 Kevin Tran Fixed a problem where VLAN tag is not */ +/* inserted correctly in LSO mode. */ +/* 01/16/04 Kevin Tran Fixed a problem where Ethernet Type is not */ +/* set to 0x8870 when the outgoing LSO packet is */ +/* jumbo frame with SNAP encapsulation. */ +/******************************************************************************/ + +#ifndef __FW_STKOFFLD_H__ +#define __FW_STKOFFLD_H__ + +typedef LM_UINT32 U32; + +int t3StkOffLdFwReleaseMajor = 0x1; +int t3StkOffLdFwReleaseMinor = 0x6; +int t3StkOffLdFwReleaseFix = 0x0; +U32 t3StkOffLdFwStartAddr = 0x08000000; +U32 t3StkOffLdFwTextAddr = 0x08000000; +int t3StkOffLdFwTextLen = 0x1aa0; +U32 t3StkOffLdFwRodataAddr = 0x08001aa0; +int t3StkOffLdFwRodataLen = 0x60; +U32 t3StkOffLdFwDataAddr = 0x08001b20; +int t3StkOffLdFwDataLen = 0x30; +U32 t3StkOffLdFwSbssAddr = 0x08001b50; +int t3StkOffLdFwSbssLen = 0x2c; +U32 t3StkOffLdFwBssAddr = 0x08001b80; +int t3StkOffLdFwBssLen = 0x894; +U32 t3StkOffLdFwText[(0x1aa0/4) + 1] = { +0xe000003, 0x0, 0x8001b24, +0x0, 0x10000003, 0x0, 0xd, +0xd, 0x3c1d0800, 0x37bd4000, 0x3a0f021, +0x3c100800, 0x26100000, 0xe000010, 0x0, +0xd, 0x27bdffe0, 0x3c04fefe, 0xafbf0018, +0xe0005d8, 0x34840002, 0xe000668, 0x0, +0x3c030800, 0x90631b68, 0x24020002, 0x3c040800, +0x24841aac, 0x14620003, 0x24050001, 0x3c040800, +0x24841aa0, 0x24060006, 0x3821, 0xafa00010, +0xe00067c, 0xafa00014, 0x8f625c50, 0x34420001, +0xaf625c50, 0x8f625c90, 0x34420001, 0xaf625c90, +0x2402ffff, 0xe000034, 0xaf625404, 0x8fbf0018, +0x3e00008, 0x27bd0020, 0x0, 0x0, +0x0, 0x27bdffe0, 0xafbf001c, 0xafb20018, +0xafb10014, 0xe00005b, 0xafb00010, 0x24120002, +0x24110001, 0x8f706820, 0x32020100, 0x10400003, +0x0, 0xe0000bb, 0x0, 0x8f706820, +0x32022000, 0x10400004, 0x32020001, 0xe0001f0, +0x24040001, 0x32020001, 0x10400003, 0x0, +0xe0000a3, 0x0, 0x3c020800, 0x90421b98, +0x14520003, 0x0, 0xe0004c0, 0x0, +0xa00003c, 0xaf715028, 0x8fbf001c, 0x8fb20018, +0x8fb10014, 0x8fb00010, 0x3e00008, 0x27bd0020, +0x27bdffe0, 0x3c040800, 0x24841ac0, 0x2821, +0x3021, 0x3821, 0xafbf0018, 0xafa00010, +0xe00067c, 0xafa00014, 0x3c040800, 0x248423d8, +0xa4800000, 0x3c010800, 0xa0201b98, 0x3c010800, +0xac201b9c, 0x3c010800, 0xac201ba0, 0x3c010800, +0xac201ba4, 0x3c010800, 0xac201bac, 0x3c010800, +0xac201bb8, 0x3c010800, 0xac201bbc, 0x8f624434, +0x3c010800, 0xac221b88, 0x8f624438, 0x3c010800, +0xac221b8c, 0x8f624410, 0xac80f7a8, 0x3c010800, +0xac201b84, 0x3c010800, 0xac2023e0, 0x3c010800, +0xac2023c8, 0x3c010800, 0xac2023cc, 0x3c010800, +0xac202400, 0x3c010800, 0xac221b90, 0x8f620068, +0x24030007, 0x21702, 0x10430005, 0x0, +0x8f620068, 0x21702, 0x14400004, 0x24020001, +0x3c010800, 0xa000097, 0xac20240c, 0xac820034, +0x3c040800, 0x24841acc, 0x3c050800, 0x8ca5240c, +0x3021, 0x3821, 0xafa00010, 0xe00067c, +0xafa00014, 0x8fbf0018, 0x3e00008, 0x27bd0020, +0x27bdffe0, 0x3c040800, 0x24841ad8, 0x2821, +0x3021, 0x3821, 0xafbf0018, 0xafa00010, +0xe00067c, 0xafa00014, 0xe00005b, 0x0, +0xe0000b4, 0x2021, 0x8fbf0018, 0x3e00008, +0x27bd0020, 0x24020001, 0x8f636820, 0x821004, +0x21027, 0x621824, 0x3e00008, 0xaf636820, +0x27bdffd0, 0xafbf002c, 0xafb60028, 0xafb50024, +0xafb40020, 0xafb3001c, 0xafb20018, 0xafb10014, +0xafb00010, 0x8f675c5c, 0x3c030800, 0x24631bbc, +0x8c620000, 0x14470005, 0x3c0200ff, 0x3c020800, +0x90421b98, 0x14400119, 0x3c0200ff, 0x3442fff8, +0xe28824, 0xac670000, 0x111902, 0x306300ff, +0x30e20003, 0x211c0, 0x622825, 0xa04021, +0x71602, 0x3c030800, 0x90631b98, 0x3044000f, +0x14600036, 0x804821, 0x24020001, 0x3c010800, +0xa0221b98, 0x51100, 0x821025, 0x3c010800, +0xac201b9c, 0x3c010800, 0xac201ba0, 0x3c010800, +0xac201ba4, 0x3c010800, 0xac201bac, 0x3c010800, +0xac201bb8, 0x3c010800, 0xac201bb0, 0x3c010800, +0xac201bb4, 0x3c010800, 0xa42223d8, 0x9622000c, +0x30437fff, 0x3c010800, 0xa4222410, 0x30428000, +0x3c010800, 0xa4231bc6, 0x10400005, 0x24020001, +0x3c010800, 0xac2223f4, 0xa000102, 0x2406003e, +0x24060036, 0x3c010800, 0xac2023f4, 0x9622000a, +0x3c030800, 0x94631bc6, 0x3c010800, 0xac2023f0, +0x3c010800, 0xac2023f8, 0x21302, 0x21080, +0xc21021, 0x621821, 0x3c010800, 0xa42223d0, +0x3c010800, 0xa000115, 0xa4231b96, 0x9622000c, +0x3c010800, 0xa42223ec, 0x3c040800, 0x24841b9c, +0x8c820000, 0x21100, 0x3c010800, 0x220821, +0xac311bc8, 0x8c820000, 0x21100, 0x3c010800, +0x220821, 0xac271bcc, 0x8c820000, 0x25030001, +0x306601ff, 0x21100, 0x3c010800, 0x220821, +0xac261bd0, 0x8c820000, 0x21100, 0x3c010800, +0x220821, 0xac291bd4, 0x96230008, 0x3c020800, +0x8c421bac, 0x432821, 0x3c010800, 0xac251bac, +0x9622000a, 0x30420004, 0x14400018, 0x61100, +0x8f630c14, 0x3063000f, 0x2c620002, 0x1440000b, +0x3c02c000, 0x8f630c14, 0x3c020800, 0x8c421b40, +0x3063000f, 0x24420001, 0x3c010800, 0xac221b40, +0x2c620002, 0x1040fff7, 0x3c02c000, 0xe21825, +0xaf635c5c, 0x8f625c50, 0x30420002, 0x10400014, +0x0, 0xa000147, 0x0, 0x3c030800, +0x8c631b80, 0x3c040800, 0x94841b94, 0x1221025, +0x3c010800, 0xa42223da, 0x24020001, 0x3c010800, +0xac221bb8, 0x24630001, 0x85202a, 0x3c010800, +0x10800003, 0xac231b80, 0x3c010800, 0xa4251b94, +0x3c060800, 0x24c61b9c, 0x8cc20000, 0x24420001, +0xacc20000, 0x28420080, 0x14400005, 0x0, +0xe000656, 0x24040002, 0xa0001e6, 0x0, +0x3c020800, 0x8c421bb8, 0x10400078, 0x24020001, +0x3c050800, 0x90a51b98, 0x14a20072, 0x0, +0x3c150800, 0x96b51b96, 0x3c040800, 0x8c841bac, +0x32a3ffff, 0x83102a, 0x1440006c, 0x0, +0x14830003, 0x0, 0x3c010800, 0xac2523f0, +0x1060005c, 0x9021, 0x24d60004, 0x60a021, +0x24d30014, 0x8ec20000, 0x28100, 0x3c110800, +0x2308821, 0xe000625, 0x8e311bc8, 0x402821, +0x10a00054, 0x0, 0x9628000a, 0x31020040, +0x10400005, 0x2407180c, 0x8e22000c, 0x2407188c, +0x21400, 0xaca20018, 0x3c030800, 0x701821, +0x8c631bd0, 0x3c020800, 0x501021, 0x8c421bd4, +0x31d00, 0x21400, 0x621825, 0xaca30014, +0x8ec30004, 0x96220008, 0x432023, 0x3242ffff, +0x3083ffff, 0x431021, 0x282102a, 0x14400002, +0x2b23023, 0x803021, 0x8e620000, 0x30c4ffff, +0x441021, 0xae620000, 0x8e220000, 0xaca20000, +0x8e220004, 0x8e63fff4, 0x431021, 0xaca20004, +0xa4a6000e, 0x8e62fff4, 0x441021, 0xae62fff4, +0x96230008, 0x43102a, 0x14400005, 0x2469021, +0x8e62fff0, 0xae60fff4, 0x24420001, 0xae62fff0, +0xaca00008, 0x3242ffff, 0x14540008, 0x24020305, +0x31020080, 0x54400001, 0x34e70010, 0x24020905, +0xa4a2000c, 0xa0001cb, 0x34e70020, 0xa4a2000c, +0x3c020800, 0x8c4223f0, 0x10400003, 0x3c024b65, +0xa0001d3, 0x34427654, 0x3c02b49a, 0x344289ab, +0xaca2001c, 0x30e2ffff, 0xaca20010, 0xe0005a2, +0xa02021, 0x3242ffff, 0x54102b, 0x1440ffa9, +0x0, 0x24020002, 0x3c010800, 0xa0001e6, +0xa0221b98, 0x8ec2083c, 0x24420001, 0xa0001e6, +0xaec2083c, 0xe0004c0, 0x0, 0x8fbf002c, +0x8fb60028, 0x8fb50024, 0x8fb40020, 0x8fb3001c, +0x8fb20018, 0x8fb10014, 0x8fb00010, 0x3e00008, +0x27bd0030, 0x27bdffd0, 0xafbf0028, 0xafb30024, +0xafb20020, 0xafb1001c, 0xafb00018, 0x8f725c9c, +0x3c0200ff, 0x3442fff8, 0x3c070800, 0x24e71bb4, +0x2428824, 0x9623000e, 0x8ce20000, 0x431021, +0xace20000, 0x8e220010, 0x30420020, 0x14400011, +0x809821, 0xe00063b, 0x2202021, 0x3c02c000, +0x2421825, 0xaf635c9c, 0x8f625c90, 0x30420002, +0x1040011e, 0x0, 0xaf635c9c, 0x8f625c90, +0x30420002, 0x10400119, 0x0, 0xa00020d, +0x0, 0x8e240008, 0x8e230014, 0x41402, +0x231c0, 0x31502, 0x304201ff, 0x2442ffff, +0x3042007f, 0x31942, 0x30637800, 0x21100, +0x24424000, 0x624821, 0x9522000a, 0x3084ffff, +0x30420008, 0x104000b0, 0x429c0, 0x3c020800, +0x8c422400, 0x14400024, 0x24c50008, 0x94c20014, +0x3c010800, 0xa42223d0, 0x8cc40010, 0x41402, +0x3c010800, 0xa42223d2, 0x3c010800, 0xa42423d4, +0x94c2000e, 0x3083ffff, 0x431023, 0x3c010800, +0xac222408, 0x94c2001a, 0x3c010800, 0xac262400, +0x3c010800, 0xac322404, 0x3c010800, 0xac2223fc, +0x3c02c000, 0x2421825, 0xaf635c9c, 0x8f625c90, +0x30420002, 0x104000e5, 0x0, 0xaf635c9c, +0x8f625c90, 0x30420002, 0x104000e0, 0x0, +0xa000246, 0x0, 0x94c2000e, 0x3c030800, +0x946323d4, 0x434023, 0x3103ffff, 0x2c620008, +0x1040001c, 0x0, 0x94c20014, 0x24420028, +0xa22821, 0x31042, 0x1840000b, 0x2021, +0x24e60848, 0x403821, 0x94a30000, 0x8cc20000, +0x24840001, 0x431021, 0xacc20000, 0x87102a, +0x1440fff9, 0x24a50002, 0x31020001, 0x1040001f, +0x3c024000, 0x3c040800, 0x248423fc, 0xa0a00001, +0x94a30000, 0x8c820000, 0x431021, 0xa000285, +0xac820000, 0x8f626800, 0x3c030010, 0x431024, +0x10400009, 0x0, 0x94c2001a, 0x3c030800, +0x8c6323fc, 0x431021, 0x3c010800, 0xac2223fc, +0xa000286, 0x3c024000, 0x94c2001a, 0x94c4001c, +0x3c030800, 0x8c6323fc, 0x441023, 0x621821, +0x3c010800, 0xac2323fc, 0x3c024000, 0x2421825, +0xaf635c9c, 0x8f625c90, 0x30420002, 0x1440fffc, +0x0, 0x9522000a, 0x30420010, 0x1040009b, +0x0, 0x3c030800, 0x946323d4, 0x3c070800, +0x24e72400, 0x8ce40000, 0x8f626800, 0x24630030, +0x832821, 0x3c030010, 0x431024, 0x1440000a, +0x0, 0x94a20004, 0x3c040800, 0x8c842408, +0x3c030800, 0x8c6323fc, 0x441023, 0x621821, +0x3c010800, 0xac2323fc, 0x3c040800, 0x8c8423fc, +0x41c02, 0x3082ffff, 0x622021, 0x41402, +0x822021, 0x41027, 0xa4a20006, 0x3c030800, +0x8c632404, 0x3c0200ff, 0x3442fff8, 0x628824, +0x96220008, 0x24050001, 0x24034000, 0x231c0, +0x801021, 0xa4c2001a, 0xa4c0001c, 0xace00000, +0x3c010800, 0xac251b60, 0xaf635cb8, 0x8f625cb0, +0x30420002, 0x10400003, 0x0, 0x3c010800, +0xac201b60, 0x8e220008, 0xaf625cb8, 0x8f625cb0, +0x30420002, 0x10400003, 0x0, 0x3c010800, +0xac201b60, 0x3c020800, 0x8c421b60, 0x1040ffec, +0x0, 0x3c040800, 0xe00063b, 0x8c842404, +0xa00032a, 0x0, 0x3c030800, 0x90631b98, +0x24020002, 0x14620003, 0x3c034b65, 0xa0002e1, +0x8021, 0x8e22001c, 0x34637654, 0x10430002, +0x24100002, 0x24100001, 0xc02021, 0xe000350, +0x2003021, 0x24020003, 0x3c010800, 0xa0221b98, +0x24020002, 0x1202000a, 0x24020001, 0x3c030800, +0x8c6323f0, 0x10620006, 0x0, 0x3c020800, +0x944223d8, 0x21400, 0xa00031f, 0xae220014, +0x3c040800, 0x248423da, 0x94820000, 0x21400, +0xae220014, 0x3c020800, 0x8c421bbc, 0x3c03c000, +0x3c010800, 0xa0201b98, 0x431025, 0xaf625c5c, +0x8f625c50, 0x30420002, 0x10400009, 0x0, +0x2484f7e2, 0x8c820000, 0x431025, 0xaf625c5c, +0x8f625c50, 0x30420002, 0x1440fffa, 0x0, +0x3c020800, 0x24421b84, 0x8c430000, 0x24630001, +0xac430000, 0x8f630c14, 0x3063000f, 0x2c620002, +0x1440000c, 0x3c024000, 0x8f630c14, 0x3c020800, +0x8c421b40, 0x3063000f, 0x24420001, 0x3c010800, +0xac221b40, 0x2c620002, 0x1040fff7, 0x0, +0x3c024000, 0x2421825, 0xaf635c9c, 0x8f625c90, +0x30420002, 0x1440fffc, 0x0, 0x12600003, +0x0, 0xe0004c0, 0x0, 0x8fbf0028, +0x8fb30024, 0x8fb20020, 0x8fb1001c, 0x8fb00018, +0x3e00008, 0x27bd0030, 0x8f634450, 0x3c040800, +0x24841b88, 0x8c820000, 0x31c02, 0x43102b, +0x14400007, 0x3c038000, 0x8c840004, 0x8f624450, +0x21c02, 0x83102b, 0x1040fffc, 0x3c038000, +0xaf634444, 0x8f624444, 0x431024, 0x1440fffd, +0x0, 0x8f624448, 0x3e00008, 0x3042ffff, +0x3c024000, 0x822025, 0xaf645c38, 0x8f625c30, +0x30420002, 0x1440fffc, 0x0, 0x3e00008, +0x0, 0x27bdffe0, 0x805821, 0x14c00011, +0x256e0008, 0x3c020800, 0x8c4223f4, 0x10400007, +0x24020016, 0x3c010800, 0xa42223d2, 0x2402002a, +0x3c010800, 0xa000364, 0xa42223d4, 0x8d670010, +0x71402, 0x3c010800, 0xa42223d2, 0x3c010800, +0xa42723d4, 0x3c040800, 0x948423d4, 0x3c030800, +0x946323d2, 0x95cf0006, 0x3c020800, 0x944223d0, +0x832023, 0x1e2c023, 0x3065ffff, 0x24a20028, +0x1c24821, 0x3082ffff, 0x14c0001a, 0x1226021, +0x9582000c, 0x3042003f, 0x3c010800, 0xa42223d6, +0x95820004, 0x95830006, 0x3c010800, 0xac2023e4, +0x3c010800, 0xac2023e8, 0x21400, 0x431025, +0x3c010800, 0xac221bc0, 0x95220004, 0x3c010800, +0xa4221bc4, 0x95230002, 0x1e51023, 0x43102a, +0x10400010, 0x24020001, 0x3c010800, 0xa000398, +0xac2223f8, 0x3c030800, 0x8c6323e8, 0x3c020800, +0x94421bc4, 0x431021, 0xa5220004, 0x3c020800, +0x94421bc0, 0xa5820004, 0x3c020800, 0x8c421bc0, +0xa5820006, 0x3c020800, 0x8c4223f0, 0x3c0d0800, +0x8dad23e4, 0x3c0a0800, 0x144000e5, 0x8d4a23e8, +0x3c020800, 0x94421bc4, 0x4a1821, 0x3063ffff, +0x62182b, 0x24020002, 0x10c2000d, 0x1435023, +0x3c020800, 0x944223d6, 0x30420009, 0x10400008, +0x0, 0x9582000c, 0x3042fff6, 0xa582000c, +0x3c020800, 0x944223d6, 0x30420009, 0x1a26823, +0x3c020800, 0x8c4223f8, 0x1040004a, 0x1203821, +0x3c020800, 0x944223d2, 0x4021, 0xa520000a, +0x1e21023, 0xa5220002, 0x3082ffff, 0x21042, +0x18400008, 0x3021, 0x401821, 0x94e20000, +0x25080001, 0xc23021, 0x103102a, 0x1440fffb, +0x24e70002, 0x61c02, 0x30c2ffff, 0x623021, +0x61402, 0xc23021, 0xc02821, 0x61027, +0xa522000a, 0x3021, 0x2527000c, 0x4021, +0x94e20000, 0x25080001, 0xc23021, 0x2d020004, +0x1440fffb, 0x24e70002, 0x95220002, 0x4021, +0x91230009, 0x442023, 0x1803821, 0x3082ffff, +0xa4e00010, 0x621821, 0x21042, 0x18400010, +0xc33021, 0x404821, 0x94e20000, 0x24e70002, +0xc23021, 0x30e2007f, 0x14400006, 0x25080001, +0x8d630000, 0x3c02007f, 0x3442ff80, 0x625824, +0x25670008, 0x109102a, 0x1440fff3, 0x0, +0x30820001, 0x10400005, 0x61c02, 0xa0e00001, +0x94e20000, 0xc23021, 0x61c02, 0x30c2ffff, +0x623021, 0x61402, 0xc23021, 0xa00047d, +0x30c6ffff, 0x24020002, 0x14c20081, 0x0, +0x3c020800, 0x8c42240c, 0x14400007, 0x0, +0x3c020800, 0x944223d2, 0x95230002, 0x1e21023, +0x10620077, 0x0, 0x3c020800, 0x944223d2, +0x1e21023, 0xa5220002, 0x3c020800, 0x8c42240c, +0x1040001a, 0x31e3ffff, 0x8dc70010, 0x3c020800, +0x94421b96, 0xe04021, 0x72c02, 0xaa2021, +0x431023, 0x823823, 0x72402, 0x30e2ffff, +0x823821, 0x71027, 0xa522000a, 0x3102ffff, +0x3c040800, 0x948423d4, 0x453023, 0xe02821, +0x641823, 0x6d1821, 0xc33021, 0x61c02, +0x30c2ffff, 0xa00047d, 0x623021, 0x1203821, +0x4021, 0x3082ffff, 0x21042, 0x18400008, +0x3021, 0x401821, 0x94e20000, 0x25080001, +0xc23021, 0x103102a, 0x1440fffb, 0x24e70002, +0x61c02, 0x30c2ffff, 0x623021, 0x61402, +0xc23021, 0xc02821, 0x61027, 0xa522000a, +0x3021, 0x2527000c, 0x4021, 0x94e20000, +0x25080001, 0xc23021, 0x2d020004, 0x1440fffb, +0x24e70002, 0x95220002, 0x4021, 0x91230009, +0x442023, 0x1803821, 0x3082ffff, 0xa4e00010, +0x3c040800, 0x948423d4, 0x621821, 0xc33021, +0x61c02, 0x30c2ffff, 0x623021, 0x61c02, +0x3c020800, 0x944223d0, 0xc34821, 0x441023, +0x21fc2, 0x431021, 0x21043, 0x18400010, +0x3021, 0x402021, 0x94e20000, 0x24e70002, +0xc23021, 0x30e2007f, 0x14400006, 0x25080001, +0x8d630000, 0x3c02007f, 0x3442ff80, 0x625824, +0x25670008, 0x104102a, 0x1440fff3, 0x0, +0x3c020800, 0x944223ec, 0xc23021, 0x3122ffff, +0xc23021, 0x61c02, 0x30c2ffff, 0x623021, +0x61402, 0xc23021, 0xc04021, 0x61027, +0xa5820010, 0xadc00014, 0xa00049d, 0xadc00000, +0x8dc70010, 0xe04021, 0x11400007, 0x72c02, +0xaa3021, 0x61402, 0x30c3ffff, 0x433021, +0x61402, 0xc22821, 0x51027, 0xa522000a, +0x3c030800, 0x946323d4, 0x3102ffff, 0x1e21021, +0x433023, 0xcd3021, 0x61c02, 0x30c2ffff, +0x623021, 0x61402, 0xc23021, 0xc04021, +0x61027, 0xa5820010, 0x3102ffff, 0x51c00, +0x431025, 0xadc20010, 0x3c020800, 0x8c4223f4, +0x10400005, 0x2de205eb, 0x14400002, 0x25e2fff2, +0x34028870, 0xa5c20034, 0x3c030800, 0x246323e8, +0x8c620000, 0x24420001, 0xac620000, 0x3c040800, +0x8c8423e4, 0x3c020800, 0x8c421bc0, 0x3303ffff, +0x832021, 0x431821, 0x62102b, 0x3c010800, +0xac2423e4, 0x10400003, 0x2482ffff, 0x3c010800, +0xac2223e4, 0x3c010800, 0xac231bc0, 0x3e00008, +0x27bd0020, 0x27bdffb8, 0x3c050800, 0x24a51b96, +0xafbf0044, 0xafbe0040, 0xafb7003c, 0xafb60038, +0xafb50034, 0xafb40030, 0xafb3002c, 0xafb20028, +0xafb10024, 0xafb00020, 0x94a90000, 0x3c020800, +0x944223d0, 0x3c030800, 0x8c631bb0, 0x3c040800, +0x8c841bac, 0x1221023, 0x64182a, 0xa7a9001e, +0x106000be, 0xa7a20016, 0x24be0022, 0x97b6001e, +0x24b3001a, 0x24b70016, 0x8fc20000, 0x14400008, +0x0, 0x8fc2fff8, 0x97a30016, 0x8fc4fff4, +0x431021, 0x82202a, 0x148000b0, 0x0, +0x97d50818, 0x32a2ffff, 0x104000a3, 0x9021, +0x40a021, 0x8821, 0xe000625, 0x0, +0x403021, 0x14c00007, 0x0, 0x3c020800, +0x8c4223dc, 0x24420001, 0x3c010800, 0xa000596, +0xac2223dc, 0x3c100800, 0x2118021, 0x8e101bc8, +0x9608000a, 0x31020040, 0x10400005, 0x2407180c, +0x8e02000c, 0x2407188c, 0x21400, 0xacc20018, +0x31020080, 0x54400001, 0x34e70010, 0x3c020800, +0x511021, 0x8c421bd0, 0x3c030800, 0x711821, +0x8c631bd4, 0x21500, 0x31c00, 0x431025, +0xacc20014, 0x96040008, 0x3242ffff, 0x821021, +0x282102a, 0x14400002, 0x2b22823, 0x802821, +0x8e020000, 0x2459021, 0xacc20000, 0x8e020004, +0xc02021, 0x26310010, 0xac820004, 0x30e2ffff, +0xac800008, 0xa485000e, 0xac820010, 0x24020305, +0xe0005a2, 0xa482000c, 0x3242ffff, 0x54102b, +0x1440ffc5, 0x3242ffff, 0xa00058e, 0x0, +0x8e620000, 0x8e63fffc, 0x43102a, 0x10400067, +0x0, 0x8e62fff0, 0x28900, 0x3c100800, +0x2118021, 0xe000625, 0x8e101bc8, 0x403021, +0x14c00005, 0x0, 0x8e62082c, 0x24420001, +0xa000596, 0xae62082c, 0x9608000a, 0x31020040, +0x10400005, 0x2407180c, 0x8e02000c, 0x2407188c, +0x21400, 0xacc20018, 0x3c020800, 0x511021, +0x8c421bd0, 0x3c030800, 0x711821, 0x8c631bd4, +0x21500, 0x31c00, 0x431025, 0xacc20014, +0x8e63fff4, 0x96020008, 0x432023, 0x3242ffff, +0x3083ffff, 0x431021, 0x2c2102a, 0x10400003, +0x802821, 0x97a9001e, 0x1322823, 0x8e620000, +0x30a4ffff, 0x441021, 0xae620000, 0xa4c5000e, +0x8e020000, 0xacc20000, 0x8e020004, 0x8e63fff4, +0x431021, 0xacc20004, 0x8e63fff4, 0x96020008, +0x641821, 0x62102a, 0x14400006, 0x2459021, +0x8e62fff0, 0xae60fff4, 0x24420001, 0xa000571, +0xae62fff0, 0xae63fff4, 0xacc00008, 0x3242ffff, +0x10560003, 0x31020004, 0x10400006, 0x24020305, +0x31020080, 0x54400001, 0x34e70010, 0x34e70020, +0x24020905, 0xa4c2000c, 0x8ee30000, 0x8ee20004, +0x14620007, 0x3c02b49a, 0x8ee20860, 0x54400001, +0x34e70400, 0x3c024b65, 0xa000588, 0x34427654, +0x344289ab, 0xacc2001c, 0x30e2ffff, 0xacc20010, +0xe0005a2, 0xc02021, 0x3242ffff, 0x56102b, +0x1440ff9b, 0x0, 0x8e620000, 0x8e63fffc, +0x43102a, 0x1440ff48, 0x0, 0x8fbf0044, +0x8fbe0040, 0x8fb7003c, 0x8fb60038, 0x8fb50034, +0x8fb40030, 0x8fb3002c, 0x8fb20028, 0x8fb10024, +0x8fb00020, 0x3e00008, 0x27bd0048, 0x27bdffe8, +0xafbf0014, 0xafb00010, 0x8f624450, 0x8f634410, +0xa0005b1, 0x808021, 0x8f626820, 0x30422000, +0x10400003, 0x0, 0xe0001f0, 0x2021, +0x8f624450, 0x8f634410, 0x3042ffff, 0x43102b, +0x1440fff5, 0x0, 0x8f630c14, 0x3063000f, +0x2c620002, 0x1440000b, 0x0, 0x8f630c14, +0x3c020800, 0x8c421b40, 0x3063000f, 0x24420001, +0x3c010800, 0xac221b40, 0x2c620002, 0x1040fff7, +0x0, 0xaf705c18, 0x8f625c10, 0x30420002, +0x10400009, 0x0, 0x8f626820, 0x30422000, +0x1040fff8, 0x0, 0xe0001f0, 0x2021, +0xa0005c4, 0x0, 0x8fbf0014, 0x8fb00010, +0x3e00008, 0x27bd0018, 0x0, 0x0, +0x0, 0x27bdffe8, 0x3c1bc000, 0xafbf0014, +0xafb00010, 0xaf60680c, 0x8f626804, 0x34420082, +0xaf626804, 0x8f634000, 0x24020b50, 0x3c010800, +0xac221b54, 0x24020b78, 0x3c010800, 0xac221b64, +0x34630002, 0xaf634000, 0xe000605, 0x808021, +0x3c010800, 0xa0221b68, 0x304200ff, 0x24030002, +0x14430005, 0x0, 0x3c020800, 0x8c421b54, +0xa0005f8, 0xac5000c0, 0x3c020800, 0x8c421b54, +0xac5000bc, 0x8f624434, 0x8f634438, 0x8f644410, +0x3c010800, 0xac221b5c, 0x3c010800, 0xac231b6c, +0x3c010800, 0xac241b58, 0x8fbf0014, 0x8fb00010, +0x3e00008, 0x27bd0018, 0x3c040800, 0x8c870000, +0x3c03aa55, 0x3463aa55, 0x3c06c003, 0xac830000, +0x8cc20000, 0x14430007, 0x24050002, 0x3c0355aa, +0x346355aa, 0xac830000, 0x8cc20000, 0x50430001, +0x24050001, 0x3c020800, 0xac470000, 0x3e00008, +0xa01021, 0x27bdfff8, 0x18800009, 0x2821, +0x8f63680c, 0x8f62680c, 0x1043fffe, 0x0, +0x24a50001, 0xa4102a, 0x1440fff9, 0x0, +0x3e00008, 0x27bd0008, 0x8f634450, 0x3c020800, +0x8c421b5c, 0x31c02, 0x43102b, 0x14400008, +0x3c038000, 0x3c040800, 0x8c841b6c, 0x8f624450, +0x21c02, 0x83102b, 0x1040fffc, 0x3c038000, +0xaf634444, 0x8f624444, 0x431024, 0x1440fffd, +0x0, 0x8f624448, 0x3e00008, 0x3042ffff, +0x3082ffff, 0x2442e000, 0x2c422001, 0x14400003, +0x3c024000, 0xa000648, 0x2402ffff, 0x822025, +0xaf645c38, 0x8f625c30, 0x30420002, 0x1440fffc, +0x1021, 0x3e00008, 0x0, 0x8f624450, +0x3c030800, 0x8c631b58, 0xa000651, 0x3042ffff, +0x8f624450, 0x3042ffff, 0x43102b, 0x1440fffc, +0x0, 0x3e00008, 0x0, 0x27bdffe0, +0x802821, 0x3c040800, 0x24841af0, 0x3021, +0x3821, 0xafbf0018, 0xafa00010, 0xe00067c, +0xafa00014, 0xa000660, 0x0, 0x8fbf0018, +0x3e00008, 0x27bd0020, 0x0, 0x0, +0x0, 0x3c020800, 0x34423000, 0x3c030800, +0x34633000, 0x3c040800, 0x348437ff, 0x3c010800, +0xac221b74, 0x24020040, 0x3c010800, 0xac221b78, +0x3c010800, 0xac201b70, 0xac600000, 0x24630004, +0x83102b, 0x5040fffd, 0xac600000, 0x3e00008, +0x0, 0x804821, 0x8faa0010, 0x3c020800, +0x8c421b70, 0x3c040800, 0x8c841b78, 0x8fab0014, +0x24430001, 0x44102b, 0x3c010800, 0xac231b70, +0x14400003, 0x4021, 0x3c010800, 0xac201b70, +0x3c020800, 0x8c421b70, 0x3c030800, 0x8c631b74, +0x91240000, 0x21140, 0x431021, 0x481021, +0x25080001, 0xa0440000, 0x29020008, 0x1440fff4, +0x25290001, 0x3c020800, 0x8c421b70, 0x3c030800, +0x8c631b74, 0x8f64680c, 0x21140, 0x431021, +0xac440008, 0xac45000c, 0xac460010, 0xac470014, +0xac4a0018, 0x3e00008, 0xac4b001c, 0x0, +0x0, 0x0 }; +U32 t3StkOffLdFwRodata[(0x60/4) + 1] = { +0x4d61696e, +0x43707542, 0x0, 0x4d61696e, 0x43707541, +0x0, 0x0, 0x0, 0x73746b6f, +0x66666c64, 0x496e0000, 0x73746b6f, 0x66662a2a, +0x0, 0x53774576, 0x656e7430, 0x0, +0x0, 0x0, 0x0, 0x66617461, +0x6c457272, 0x0, 0x0, 0x0 }; +U32 t3StkOffLdFwData[(0x30/4) + 1] = { +0x0, 0x73746b6f, 0x66666c64, +0x5f76312e, 0x362e3000, 0x0, 0x0, +0x0, 0x0, 0x0, 0x0, +0x0, 0x0 }; + +#endif /* __FW_STKOFFLD_H__ */ diff --git a/drivers/net/bcm5700/lm.h b/drivers/net/bcm5700/lm.h new file mode 100644 index 000000000..4f6fd7a0e --- /dev/null +++ b/drivers/net/bcm5700/lm.h @@ -0,0 +1,469 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/* 02/25/00 Hav Khauv Initial version. */ +/******************************************************************************/ + +#ifndef LM_H +#define LM_H + +#include "queue.h" +#include "bits.h" + + + +/******************************************************************************/ +/* Basic types. */ +/******************************************************************************/ + +typedef char LM_CHAR, *PLM_CHAR; +typedef unsigned int LM_UINT, *PLM_UINT; +typedef unsigned char LM_UINT8, *PLM_UINT8; +typedef unsigned short LM_UINT16, *PLM_UINT16; +typedef unsigned int LM_UINT32, *PLM_UINT32; +typedef unsigned int LM_COUNTER, *PLM_COUNTER; +typedef void LM_VOID, *PLM_VOID; +typedef char LM_BOOL, *PLM_BOOL; + +/* 64bit value. */ +typedef struct { +#ifdef BIG_ENDIAN_HOST + LM_UINT32 High; + LM_UINT32 Low; +#else /* BIG_ENDIAN_HOST */ + LM_UINT32 Low; + LM_UINT32 High; +#endif /* !BIG_ENDIAN_HOST */ +} LM_UINT64, *PLM_UINT64; + +typedef LM_UINT64 LM_PHYSICAL_ADDRESS, *PLM_PHYSICAL_ADDRESS; + +/* void LM_INC_PHYSICAL_ADDRESS(PLM_PHYSICAL_ADDRESS pAddr,LM_UINT32 IncSize) */ +#define LM_INC_PHYSICAL_ADDRESS(pAddr, IncSize) \ + { \ + LM_UINT32 OrgLow; \ + \ + OrgLow = (pAddr)->Low; \ + (pAddr)->Low += IncSize; \ + if((pAddr)->Low < OrgLow) { \ + (pAddr)->High++; /* Wrap around. */ \ + } \ + } + + +#ifndef TRUE +#define TRUE 1 +#endif /* TRUE */ + +#ifndef FALSE +#define FALSE 0 +#endif /* FALSE */ + +#ifndef NULL +#define NULL ((void *) 0) +#endif /* NULL */ + +#ifndef OFFSETOF +#define OFFSETOF(_s, _m) (MM_UINT_PTR(&(((_s *) 0)->_m))) +#endif /* OFFSETOF */ + + + +/******************************************************************************/ +/* Simple macros. */ +/******************************************************************************/ + +#define IS_ETH_BROADCAST(_pEthAddr) \ + (((unsigned char *) (_pEthAddr))[0] == ((unsigned char) 0xff)) + +#define IS_ETH_MULTICAST(_pEthAddr) \ + (((unsigned char *) (_pEthAddr))[0] & ((unsigned char) 0x01)) + +#define IS_ETH_ADDRESS_EQUAL(_pEtherAddr1, _pEtherAddr2) \ + ((((unsigned char *) (_pEtherAddr1))[0] == \ + ((unsigned char *) (_pEtherAddr2))[0]) && \ + (((unsigned char *) (_pEtherAddr1))[1] == \ + ((unsigned char *) (_pEtherAddr2))[1]) && \ + (((unsigned char *) (_pEtherAddr1))[2] == \ + ((unsigned char *) (_pEtherAddr2))[2]) && \ + (((unsigned char *) (_pEtherAddr1))[3] == \ + ((unsigned char *) (_pEtherAddr2))[3]) && \ + (((unsigned char *) (_pEtherAddr1))[4] == \ + ((unsigned char *) (_pEtherAddr2))[4]) && \ + (((unsigned char *) (_pEtherAddr1))[5] == \ + ((unsigned char *) (_pEtherAddr2))[5])) + +#define COPY_ETH_ADDRESS(_Src, _Dst) \ + ((unsigned char *) (_Dst))[0] = ((unsigned char *) (_Src))[0]; \ + ((unsigned char *) (_Dst))[1] = ((unsigned char *) (_Src))[1]; \ + ((unsigned char *) (_Dst))[2] = ((unsigned char *) (_Src))[2]; \ + ((unsigned char *) (_Dst))[3] = ((unsigned char *) (_Src))[3]; \ + ((unsigned char *) (_Dst))[4] = ((unsigned char *) (_Src))[4]; \ + ((unsigned char *) (_Dst))[5] = ((unsigned char *) (_Src))[5]; + + + +/******************************************************************************/ +/* Constants. */ +/******************************************************************************/ + +#define ETHERNET_ADDRESS_SIZE 6 +#define ETHERNET_PACKET_HEADER_SIZE 14 +#define MIN_ETHERNET_PACKET_SIZE 64 /* with 4 byte crc. */ +#define MAX_ETHERNET_PACKET_SIZE 1518 /* with 4 byte crc. */ +#define MIN_ETHERNET_PACKET_SIZE_NO_CRC 60 +#define MAX_ETHERNET_PACKET_SIZE_NO_CRC 1514 +#define MAX_ETHERNET_PACKET_BUFFER_SIZE 1536 /* A nice even number. */ +#define MAX_ETHERNET_JUMBO_PACKET_SIZE_NO_CRC 9014 + +#ifndef LM_MAX_MC_TABLE_SIZE +#define LM_MAX_MC_TABLE_SIZE 32 +#endif /* LM_MAX_MC_TABLE_SIZE */ +#define LM_MC_ENTRY_SIZE (ETHERNET_ADDRESS_SIZE+1) +#define LM_MC_INSTANCE_COUNT_INDEX (LM_MC_ENTRY_SIZE-1) + + +/* Receive filter masks. */ +#define LM_ACCEPT_UNICAST 0x0001 +#define LM_ACCEPT_MULTICAST 0x0002 +#define LM_ACCEPT_ALL_MULTICAST 0x0004 +#define LM_ACCEPT_BROADCAST 0x0008 +#define LM_ACCEPT_ERROR_PACKET 0x0010 +#define LM_KEEP_VLAN_TAG 0x0020 + +#define LM_PROMISCUOUS_MODE 0x10000 + + + +/******************************************************************************/ +/* PCI registers. */ +/******************************************************************************/ + +#define PCI_VENDOR_ID_REG 0x00 +#define PCI_DEVICE_ID_REG 0x02 + +#define PCI_COMMAND_REG 0x04 +#define PCI_IO_SPACE_ENABLE 0x0001 +#define PCI_MEM_SPACE_ENABLE 0x0002 +#define PCI_BUSMASTER_ENABLE 0x0004 +#define PCI_MEMORY_WRITE_INVALIDATE 0x0010 +#define PCI_PARITY_ERROR_ENABLE 0x0040 +#define PCI_SYSTEM_ERROR_ENABLE 0x0100 +#define PCI_FAST_BACK_TO_BACK_ENABLE 0x0200 + +#define PCI_STATUS_REG 0x06 +#define PCI_REV_ID_REG 0x08 + +#define PCI_CACHE_LINE_SIZE_REG 0x0c + +#define PCI_IO_BASE_ADDR_REG 0x10 +#define PCI_IO_BASE_ADDR_MASK 0xfffffff0 + +#define PCI_MEM_BASE_ADDR_LOW 0x10 +#define PCI_MEM_BASE_ADDR_HIGH 0x14 + +#define PCI_SUBSYSTEM_VENDOR_ID_REG 0x2c +#define PCI_SUBSYSTEM_ID_REG 0x2e +#define PCI_INT_LINE_REG 0x3c + +#define PCIX_CAP_REG 0x40 +#define PCIX_ENABLE_RELAXED_ORDERING BIT_17 + +/******************************************************************************/ +/* Fragment structure. */ +/******************************************************************************/ + +typedef struct { + LM_UINT32 FragSize; + LM_PHYSICAL_ADDRESS FragBuf; +} LM_FRAG, *PLM_FRAG; + +typedef struct { + /* FragCount is initialized for the caller to the maximum array size, on */ + /* return FragCount is the number of the actual fragments in the array. */ + LM_UINT32 FragCount; + + /* Total buffer size. */ + LM_UINT32 TotalSize; + + /* Fragment array buffer. */ + LM_FRAG Fragments[1]; +} LM_FRAG_LIST, *PLM_FRAG_LIST; + +#define DECLARE_FRAG_LIST_BUFFER_TYPE(_FRAG_LIST_TYPE_NAME, _MAX_FRAG_COUNT) \ + typedef struct { \ + LM_FRAG_LIST FragList; \ + LM_FRAG FragListBuffer[_MAX_FRAG_COUNT-1]; \ + } _FRAG_LIST_TYPE_NAME, *P##_FRAG_LIST_TYPE_NAME + + + +/******************************************************************************/ +/* Status codes. */ +/******************************************************************************/ + +#define LM_STATUS_SUCCESS 0 +#define LM_STATUS_FAILURE 1 + +#define LM_STATUS_INTERRUPT_ACTIVE 2 +#define LM_STATUS_INTERRUPT_NOT_ACTIVE 3 + +#define LM_STATUS_LINK_ACTIVE 4 +#define LM_STATUS_LINK_DOWN 5 +#define LM_STATUS_LINK_SETTING_MISMATCH 6 + +#define LM_STATUS_TOO_MANY_FRAGMENTS 7 +#define LM_STATUS_TRANSMIT_ABORTED 8 +#define LM_STATUS_TRANSMIT_ERROR 9 +#define LM_STATUS_RECEIVE_ABORTED 10 +#define LM_STATUS_RECEIVE_ERROR 11 +#define LM_STATUS_INVALID_PACKET_SIZE 12 +#define LM_STATUS_OUT_OF_MAP_REGISTERS 13 +#define LM_STATUS_UNKNOWN_ADAPTER 14 + +typedef LM_UINT LM_STATUS, *PLM_STATUS; + + +/******************************************************************************/ +/* Line speed. */ +/******************************************************************************/ + +#define LM_LINE_SPEED_UNKNOWN 0 +#define LM_LINE_SPEED_AUTO LM_LINE_SPEED_UNKNOWN +#define LM_LINE_SPEED_10MBPS 10 +#define LM_LINE_SPEED_100MBPS 100 +#define LM_LINE_SPEED_1000MBPS 1000 + +typedef LM_UINT32 LM_LINE_SPEED, *PLM_LINE_SPEED; + + + +/******************************************************************************/ +/* Duplex mode. */ +/******************************************************************************/ + +#define LM_DUPLEX_MODE_UNKNOWN 0 +#define LM_DUPLEX_MODE_HALF 1 +#define LM_DUPLEX_MODE_FULL 2 + +typedef LM_UINT32 LM_DUPLEX_MODE, *PLM_DUPLEX_MODE; + + + +/******************************************************************************/ +/* Power state. */ +/******************************************************************************/ + +#define LM_POWER_STATE_D0 0 +#define LM_POWER_STATE_D1 1 +#define LM_POWER_STATE_D2 2 +#define LM_POWER_STATE_D3 3 + +typedef LM_UINT32 LM_POWER_STATE, *PLM_POWER_STATE; + + + +/******************************************************************************/ +/* Task offloading. */ +/******************************************************************************/ + +#define LM_TASK_OFFLOAD_NONE 0x0000 +#define LM_TASK_OFFLOAD_TX_IP_CHECKSUM 0x0001 +#define LM_TASK_OFFLOAD_RX_IP_CHECKSUM 0x0002 +#define LM_TASK_OFFLOAD_TX_TCP_CHECKSUM 0x0004 +#define LM_TASK_OFFLOAD_RX_TCP_CHECKSUM 0x0008 +#define LM_TASK_OFFLOAD_TX_UDP_CHECKSUM 0x0010 +#define LM_TASK_OFFLOAD_RX_UDP_CHECKSUM 0x0020 +#define LM_TASK_OFFLOAD_TCP_SEGMENTATION 0x0040 + +typedef LM_UINT32 LM_TASK_OFFLOAD, *PLM_TASK_OFFLOAD; + + + +/******************************************************************************/ +/* Flow control. */ +/******************************************************************************/ + +#define LM_FLOW_CONTROL_NONE 0x00 +#define LM_FLOW_CONTROL_RECEIVE_PAUSE 0x01 +#define LM_FLOW_CONTROL_TRANSMIT_PAUSE 0x02 +#define LM_FLOW_CONTROL_RX_TX_PAUSE (LM_FLOW_CONTROL_RECEIVE_PAUSE | \ + LM_FLOW_CONTROL_TRANSMIT_PAUSE) + +/* This value can be or-ed with RECEIVE_PAUSE and TRANSMIT_PAUSE. If the */ +/* auto-negotiation is disabled and the RECEIVE_PAUSE and TRANSMIT_PAUSE */ +/* bits are set, then flow control is enabled regardless of link partner's */ +/* flow control capability. */ +#define LM_FLOW_CONTROL_AUTO_PAUSE 0x80000000 + +typedef LM_UINT32 LM_FLOW_CONTROL, *PLM_FLOW_CONTROL; + + + +/******************************************************************************/ +/* Wake up mode. */ +/******************************************************************************/ + +#define LM_WAKE_UP_MODE_NONE 0 +#define LM_WAKE_UP_MODE_MAGIC_PACKET 1 +#define LM_WAKE_UP_MODE_NWUF 2 +#define LM_WAKE_UP_MODE_LINK_CHANGE 4 + +typedef LM_UINT32 LM_WAKE_UP_MODE, *PLM_WAKE_UP_MODE; + + + +/******************************************************************************/ +/* Counters. */ +/******************************************************************************/ + +#define LM_COUNTER_FRAMES_XMITTED_OK 0 +#define LM_COUNTER_FRAMES_RECEIVED_OK 1 +#define LM_COUNTER_ERRORED_TRANSMIT_COUNT 2 +#define LM_COUNTER_ERRORED_RECEIVE_COUNT 3 +#define LM_COUNTER_RCV_CRC_ERROR 4 +#define LM_COUNTER_ALIGNMENT_ERROR 5 +#define LM_COUNTER_SINGLE_COLLISION_FRAMES 6 +#define LM_COUNTER_MULTIPLE_COLLISION_FRAMES 7 +#define LM_COUNTER_FRAMES_DEFERRED 8 +#define LM_COUNTER_MAX_COLLISIONS 9 +#define LM_COUNTER_RCV_OVERRUN 10 +#define LM_COUNTER_XMIT_UNDERRUN 11 +#define LM_COUNTER_UNICAST_FRAMES_XMIT 12 +#define LM_COUNTER_MULTICAST_FRAMES_XMIT 13 +#define LM_COUNTER_BROADCAST_FRAMES_XMIT 14 +#define LM_COUNTER_UNICAST_FRAMES_RCV 15 +#define LM_COUNTER_MULTICAST_FRAMES_RCV 16 +#define LM_COUNTER_BROADCAST_FRAMES_RCV 17 + +typedef LM_UINT32 LM_COUNTER_TYPE, *PLM_COUNTER_TYPE; + + +typedef LM_UINT32 LM_RESET_TYPE; +#define LM_SHUTDOWN_RESET 0 +#define LM_INIT_RESET 1 +#define LM_SUSPEND_RESET 2 + +/******************************************************************************/ +/* Forward definition. */ +/******************************************************************************/ + +typedef struct _LM_DEVICE_BLOCK *PLM_DEVICE_BLOCK; +typedef struct _LM_PACKET *PLM_PACKET; + + + +/******************************************************************************/ +/* Function prototypes. */ +/******************************************************************************/ + +LM_STATUS LM_GetAdapterInfo(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_InitializeAdapter(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_ResetAdapter(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_DisableInterrupt(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_EnableInterrupt(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_SendPacket(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +LM_STATUS LM_ServiceInterrupts(PLM_DEVICE_BLOCK pDevice); +#ifdef BCM_NAPI_RXPOLL +int LM_ServiceRxPoll(PLM_DEVICE_BLOCK pDevice, int limit); +#endif +LM_STATUS LM_QueueRxPackets(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_SetReceiveMask(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Mask); +LM_STATUS LM_Halt(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_Abort(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_MulticastAdd(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMcAddress); +LM_STATUS LM_MulticastDel(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMcAddress); +LM_STATUS LM_MulticastClear(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_SetMacAddress(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pMacAddress); +LM_STATUS LM_LoopbackAddress(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pAddress); + +LM_UINT32 LM_GetCrcCounter(PLM_DEVICE_BLOCK pDevice); + +LM_WAKE_UP_MODE LM_PMCapabilities(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_NwufAdd(PLM_DEVICE_BLOCK pDevice, LM_UINT32 ByteMaskSize, + LM_UINT8 *pByteMask, LM_UINT8 *pPattern); +LM_STATUS LM_NwufRemove(PLM_DEVICE_BLOCK pDevice, LM_UINT32 ByteMaskSize, + LM_UINT8 *pByteMask, LM_UINT8 *pPattern); +LM_STATUS LM_SetPowerState(PLM_DEVICE_BLOCK pDevice, LM_POWER_STATE PowerLevel); + +LM_VOID LM_ReadPhy(PLM_DEVICE_BLOCK pDevice, LM_UINT32 PhyReg, + PLM_UINT32 pData32); +LM_VOID LM_WritePhy(PLM_DEVICE_BLOCK pDevice, LM_UINT32 PhyReg, + LM_UINT32 Data32); + +LM_STATUS LM_EnableMacLoopBack(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_DisableMacLoopBack(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_EnablePhyLoopBack(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_DisablePhyLoopBack(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_EnableExtLoopBack(PLM_DEVICE_BLOCK pDevice, LM_LINE_SPEED Speed); +LM_STATUS LM_DisableExtLoopBack(PLM_DEVICE_BLOCK pDevice); + +LM_STATUS LM_SetupPhy(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_BlinkLED(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlinkDuration); +LM_STATUS LM_GetStats(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_NvramRead(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 *pData); +LM_STATUS LM_NvramWriteBlock(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 *pData, LM_UINT32 Size); +LM_VOID LM_ResetPhy(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_ShutdownChip(PLM_DEVICE_BLOCK pDevice, LM_RESET_TYPE Mode); +LM_STATUS LM_HaltCpu(PLM_DEVICE_BLOCK pDevice,LM_UINT32 cpu_number); +LM_UINT32 ComputeCrc32(LM_UINT8 *pBuffer, LM_UINT32 BufferSize); +LM_STATUS LM_SwitchClocks(PLM_DEVICE_BLOCK pDevice); + +void LM_5714_FamForceFiber( PLM_DEVICE_BLOCK pDevice); +void LM_5714_FamGoFiberAutoNeg( PLM_DEVICE_BLOCK pDevice); +void LM_5714_FamFiberCheckLink( PLM_DEVICE_BLOCK pDevice); + +/******************************************************************************/ +/* These are the OS specific functions called by LMAC. */ +/******************************************************************************/ + +LM_STATUS MM_ReadConfig16(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT16 *pValue16); +LM_STATUS MM_WriteConfig16(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT16 Value16); +LM_STATUS MM_ReadConfig32(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 *pValue32); +LM_STATUS MM_WriteConfig32(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Offset, + LM_UINT32 Value32); +LM_STATUS MM_MapMemBase(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_MapIoBase(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_IndicateRxPackets(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_IndicateTxPackets(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_StartTxDma(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +LM_STATUS MM_CompleteTxDma(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +LM_STATUS MM_AllocateMemory(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlockSize, + PLM_VOID *pMemoryBlockVirt); +LM_STATUS MM_AllocateSharedMemory(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlockSize, + PLM_VOID *pMemoryBlockVirt, PLM_PHYSICAL_ADDRESS pMemoryBlockPhy, + LM_BOOL Cached); +LM_STATUS MM_GetConfig(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_IndicateStatus(PLM_DEVICE_BLOCK pDevice, LM_STATUS Status); +LM_STATUS MM_InitializeUmPackets(PLM_DEVICE_BLOCK pDevice); +LM_STATUS MM_FreeRxBuffer(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +LM_STATUS MM_CoalesceTxBuffer(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +PLM_DEVICE_BLOCK MM_FindPeerDev(PLM_DEVICE_BLOCK pDevice); +int MM_FindCapability(PLM_DEVICE_BLOCK pDevice, int capability); +LM_VOID MM_UnmapRxDma(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket); +#ifdef BCM_NAPI_RXPOLL +LM_STATUS MM_ScheduleRxPoll(PLM_DEVICE_BLOCK pDevice); +#endif +LM_STATUS MM_Sleep(PLM_DEVICE_BLOCK pDevice, LM_UINT32 msec); +LM_STATUS LM_MbufWorkAround(PLM_DEVICE_BLOCK pDevice); + +#ifdef INCLUDE_5703_A0_FIX +LM_STATUS LM_Load5703DmaWFirmware(PLM_DEVICE_BLOCK pDevice); +#endif + + +#endif /* LM_H */ + diff --git a/drivers/net/bcm5700/mm.h b/drivers/net/bcm5700/mm.h new file mode 100644 index 000000000..aeb4f8888 --- /dev/null +++ b/drivers/net/bcm5700/mm.h @@ -0,0 +1,611 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/******************************************************************************/ + +#ifndef MM_H +#define MM_H + +#include + +#if defined(CONFIG_SMP) && ! defined(__SMP__) +#define __SMP__ +#endif + +#if defined(CONFIG_MODVERSIONS) && defined(MODULE) && ! defined(MODVERSIONS) +#ifndef BCM_SMALL_DRV +#define MODVERSIONS +#endif +#endif + +#ifndef B57UM +#define __NO_VERSION__ +#endif +#include + +#ifdef MODULE + +#if defined(MODVERSIONS) && (LINUX_VERSION_CODE < 0x020500) +#ifndef BCM_SMALL_DRV +#include +#endif +#endif + +#if (LINUX_VERSION_CODE < 0x020605) +#include +#else +#include +#endif + +#else + +#define MOD_INC_USE_COUNT +#define MOD_DEC_USE_COUNT +#define SET_MODULE_OWNER(dev) +#define MODULE_DEVICE_TABLE(pci, pci_tbl) +#endif + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Processor type for cache alignment. */ +#include +#include +#include +#include +#include +#include +#include +#if (LINUX_VERSION_CODE >= 0x020400) +#if (LINUX_VERSION_CODE < 0x020500) +#include +#endif +#include +#endif +#ifdef CONFIG_PROC_FS +#include +#include +#define BCM_PROC_FS 1 +#endif +#ifdef NETIF_F_HW_VLAN_TX +#include +#define BCM_VLAN 1 +#endif +#ifdef NETIF_F_TSO +#define BCM_TSO 1 +#define INCLUDE_TCP_SEG_SUPPORT 1 +#include +#include +#include +#endif + +#ifndef LINUX_KERNEL_VERSION +#define LINUX_KERNEL_VERSION 0 +#endif + +#ifndef MAX_SKB_FRAGS +#define MAX_SKB_FRAGS 0 +#endif + +#if (LINUX_VERSION_CODE >= 0x020400) +#ifndef ETHTOOL_GEEPROM + +#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ +#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data */ + +/* for passing EEPROM chunks */ +struct ethtool_eeprom { + u32 cmd; + u32 magic; + u32 offset; /* in bytes */ + u32 len; /* in bytes */ + u8 data[0]; +}; +#define BCM_EEDUMP_LEN(info_p, size) *((u32 *) &((info_p)->reserved1[24]))=size + +#else + +#define BCM_EEDUMP_LEN(info_p, size) (info_p)->eedump_len=size + +#endif +#endif + +#define BCM_INT_COAL 1 +#define BCM_NIC_SEND_BD 1 +#define BCM_ASF 1 +#define BCM_WOL 1 +#define BCM_TASKLET 1 + +#if HAVE_NETIF_RECEIVE_SKB +#define BCM_NAPI_RXPOLL 1 +#undef BCM_TASKLET +#endif + +#if defined(CONFIG_PPC64) +#define BCM_DISCONNECT_AT_CACHELINE 1 +#endif + +#ifdef BCM_SMALL_DRV +#undef BCM_PROC_FS +#undef ETHTOOL_GEEPROM +#undef ETHTOOL_SEEPROM +#undef ETHTOOL_GREGS +#undef ETHTOOL_GPAUSEPARAM +#undef ETHTOOL_GRXCSUM +#undef ETHTOOL_TEST +#undef BCM_INT_COAL +#undef BCM_NIC_SEND_BD +#undef BCM_WOL +#undef NICE_SUPPORT +#undef BCM_TASKLET +#undef BCM_TSO +#endif + +#ifdef __BIG_ENDIAN +#define BIG_ENDIAN_HOST 1 +#endif + +#define MM_SWAP_LE32(x) cpu_to_le32(x) +#define MM_SWAP_BE32(x) cpu_to_be32(x) + +#if (LINUX_VERSION_CODE < 0x020327) +#define __raw_readl readl +#define __raw_writel writel +#endif + +#define MM_MEMWRITEL(ptr, val) __raw_writel(val, ptr) +#define MM_MEMREADL(ptr) __raw_readl(ptr) + +typedef atomic_t MM_ATOMIC_T; + +#define MM_ATOMIC_SET(ptr, val) atomic_set(ptr, val) +#define MM_ATOMIC_READ(ptr) atomic_read(ptr) +#define MM_ATOMIC_INC(ptr) atomic_inc(ptr) +#define MM_ATOMIC_ADD(ptr, val) atomic_add(val, ptr) +#define MM_ATOMIC_DEC(ptr) atomic_dec(ptr) +#define MM_ATOMIC_SUB(ptr, val) atomic_sub(val, ptr) + + +#ifndef mmiowb +#define mmiowb() +#endif + + +#define MM_MB() mb() +#define MM_WMB() wmb() +#define MM_RMB() rmb() +#define MM_MMIOWB() mmiowb() + +#include "lm.h" +#include "queue.h" +#include "tigon3.h" + +#if DBG +#define STATIC +#else +#define STATIC static +#endif + +extern int MM_Packet_Desc_Size; + +#define MM_PACKET_DESC_SIZE MM_Packet_Desc_Size + +DECLARE_QUEUE_TYPE(UM_RX_PACKET_Q, MAX_RX_PACKET_DESC_COUNT+1); + +#define MAX_MEM 16 +#define MAX_MEM2 4 + +#if (LINUX_VERSION_CODE < 0x020211) +typedef u32 dma_addr_t; +#endif + +#if (LINUX_VERSION_CODE < 0x02032a) +#define pci_map_single(dev, address, size, dir) virt_to_bus(address) +#define pci_unmap_single(dev, dma_addr, size, dir) +#endif + +#if MAX_SKB_FRAGS +#if (LINUX_VERSION_CODE >= 0x02040d) + +typedef dma_addr_t dmaaddr_high_t; + +#else + +#if defined(CONFIG_HIGHMEM) && defined(CONFIG_X86) && ! defined(CONFIG_X86_64) + +#if defined(CONFIG_HIGHMEM64G) +typedef unsigned long long dmaaddr_high_t; +#else +typedef dma_addr_t dmaaddr_high_t; +#endif + +#ifndef pci_map_page +#define pci_map_page bcm_pci_map_page +#endif + +static inline dmaaddr_high_t +bcm_pci_map_page(struct pci_dev *dev, struct page *page, + int offset, size_t size, int dir) +{ + dmaaddr_high_t phys; + + phys = (page-mem_map) * (dmaaddr_high_t) PAGE_SIZE + offset; + + return phys; +} + +#ifndef pci_unmap_page +#define pci_unmap_page(dev, map, size, dir) +#endif + +#else /* #if defined(CONFIG_HIGHMEM) && defined(CONFIG_X86) && ! defined(CONFIG_X86_64)*/ + +typedef dma_addr_t dmaaddr_high_t; + +/* Warning - This may not work for all architectures if HIGHMEM is defined */ + +#ifndef pci_map_page +#define pci_map_page(dev, page, offset, size, dir) \ + pci_map_single(dev, page_address(page) + (offset), size, dir) +#endif +#ifndef pci_unmap_page +#define pci_unmap_page(dev, map, size, dir) \ + pci_unmap_single(dev, map, size, dir) +#endif + +#endif /* #if defined(CONFIG_HIGHMEM) && defined(CONFIG_X86) && ! defined(CONFIG_X86_64)*/ + +#endif /* #if (LINUX_VERSION_CODE >= 0x02040d)*/ +#endif /* #if MAX_SKB_FRAGS*/ + +#if defined (CONFIG_X86) && ! defined(CONFIG_X86_64) +#define NO_PCI_UNMAP 1 +#endif + +#if (LINUX_VERSION_CODE < 0x020412) +#if ! defined (NO_PCI_UNMAP) +#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; +#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME; + +#define pci_unmap_addr(PTR, ADDR_NAME) \ + ((PTR)->ADDR_NAME) + +#define pci_unmap_len(PTR, LEN_NAME) \ + ((PTR)->LEN_NAME) + +#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ + (((PTR)->ADDR_NAME) = (VAL)) + +#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ + (((PTR)->LEN_NAME) = (VAL)) +#else +#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) +#define DECLARE_PCI_UNMAP_LEN(ADDR_NAME) + +#define pci_unmap_addr(PTR, ADDR_NAME) 0 +#define pci_unmap_len(PTR, LEN_NAME) 0 +#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) +#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) +#endif +#endif + +#if (LINUX_VERSION_CODE < 0x02030e) +#define net_device device +#define netif_carrier_on(dev) +#define netif_carrier_off(dev) +#endif + +#if (LINUX_VERSION_CODE < 0x02032b) +#define tasklet_struct tq_struct +#endif + +typedef struct _UM_DEVICE_BLOCK { + LM_DEVICE_BLOCK lm_dev; + struct net_device *dev; + struct pci_dev *pdev; + struct net_device *next_module; + char *name; +#ifdef BCM_PROC_FS + struct proc_dir_entry *pfs_entry; + char pfs_name[32]; +#endif + void *mem_list[MAX_MEM]; + dma_addr_t dma_list[MAX_MEM]; + int mem_size_list[MAX_MEM]; + int mem_list_num; + +#ifdef NICE_SUPPORT + void *mem_list2[MAX_MEM2]; /* for diagnostics ioctl */ + dma_addr_t dma_list2[MAX_MEM2]; + __u64 cpu_pa_list2[MAX_MEM2]; + int mem_size_list2[MAX_MEM2]; +#endif + int index; + int opened; + int suspended; + int using_dac; /* dual address cycle */ + int delayed_link_ind; /* Delay link status during initial load */ + int adapter_just_inited; /* the first few seconds after init. */ + int timer_interval; + int statstimer_interval; + int adaptive_expiry; + int crc_counter_expiry; + int poll_tbi_interval; + int poll_tbi_expiry; + int asf_heartbeat; + int tx_full; + int tx_queued; + int line_speed; /* in Mbps, 0 if link is down */ + UM_RX_PACKET_Q rx_out_of_buf_q; + int rx_out_of_buf; + int rx_buf_repl_thresh; + int rx_buf_repl_panic_thresh; + int rx_buf_repl_isr_limit; + int rx_buf_align; + struct timer_list timer; + struct timer_list statstimer; + int do_global_lock; + spinlock_t global_lock; + spinlock_t undi_lock; + spinlock_t phy_lock; + unsigned long undi_flags; + volatile unsigned long interrupt; + atomic_t intr_sem; + int tasklet_pending; + volatile unsigned long tasklet_busy; + struct tasklet_struct tasklet; + struct net_device_stats stats; +#ifdef NICE_SUPPORT + void (*nice_rx)( struct sk_buff*, void* ); + void* nice_ctx; +#endif /* NICE_SUPPORT */ + int intr_test; + int intr_test_result; +#ifdef NETIF_F_HW_VLAN_TX + struct vlan_group *vlgrp; +#endif + int vlan_tag_mode; /* Setting to allow ASF to work properly with */ + /* VLANs */ + #define VLAN_TAG_MODE_AUTO_STRIP 0 + #define VLAN_TAG_MODE_NORMAL_STRIP 1 + #define VLAN_TAG_MODE_FORCED_STRIP 2 + + /* Auto mode - VLAN TAGs are always stripped if ASF is enabled, */ + /* If ASF is not enabled, it will be in normal mode. */ + /* Normal mode - VLAN TAGs are stripped when VLANs are registered */ + /* Forced mode - VLAN TAGs are always stripped. */ + + int adaptive_coalesce; + uint rx_last_cnt; + uint tx_last_cnt; + uint rx_curr_coalesce_frames; + uint rx_curr_coalesce_frames_intr; + uint rx_curr_coalesce_ticks; + uint tx_curr_coalesce_frames; +#if TIGON3_DEBUG + unsigned long tx_zc_count; + unsigned long tx_chksum_count; + unsigned long tx_himem_count; + unsigned long rx_good_chksum_count; +#endif + unsigned long rx_bad_chksum_count; +#ifdef BCM_TSO + unsigned long tso_pkt_count; +#endif + unsigned long rx_misc_errors; + uint64_t phy_crc_count; + unsigned int spurious_int; +} UM_DEVICE_BLOCK, *PUM_DEVICE_BLOCK; + +typedef struct _UM_PACKET { + LM_PACKET lm_packet; + struct sk_buff *skbuff; +#if MAX_SKB_FRAGS + DECLARE_PCI_UNMAP_ADDR(map[MAX_SKB_FRAGS + 1]) + DECLARE_PCI_UNMAP_LEN(map_len[MAX_SKB_FRAGS + 1]) +#else + DECLARE_PCI_UNMAP_ADDR(map[1]) + DECLARE_PCI_UNMAP_LEN(map_len[1]) +#endif +} UM_PACKET, *PUM_PACKET; + +static inline void MM_SetAddr(LM_PHYSICAL_ADDRESS *paddr, dma_addr_t addr) +{ +#if (BITS_PER_LONG == 64) + paddr->High = ((unsigned long) addr) >> 32; + paddr->Low = ((unsigned long) addr) & 0xffffffff; +#else + paddr->High = 0; + paddr->Low = (unsigned long) addr; +#endif +} + +static inline void MM_SetT3Addr(T3_64BIT_HOST_ADDR *paddr, dma_addr_t addr) +{ +#if (BITS_PER_LONG == 64) + paddr->High = ((unsigned long) addr) >> 32; + paddr->Low = ((unsigned long) addr) & 0xffffffff; +#else + paddr->High = 0; + paddr->Low = (unsigned long) addr; +#endif +} + +#if MAX_SKB_FRAGS +static inline void MM_SetT3AddrHigh(T3_64BIT_HOST_ADDR *paddr, + dmaaddr_high_t addr) +{ +#if defined(CONFIG_HIGHMEM64G) && defined(CONFIG_X86) && ! defined(CONFIG_X86_64) + paddr->High = (unsigned long) (addr >> 32); + paddr->Low = (unsigned long) (addr & 0xffffffff); +#else + MM_SetT3Addr(paddr, (dma_addr_t) addr); +#endif +} +#endif + +static inline void MM_MapRxDma(PLM_DEVICE_BLOCK pDevice, + struct _LM_PACKET *pPacket, + T3_64BIT_HOST_ADDR *paddr) +{ + dma_addr_t map; + struct sk_buff *skb = ((struct _UM_PACKET *) pPacket)->skbuff; + + map = pci_map_single(((struct _UM_DEVICE_BLOCK *)pDevice)->pdev, + skb->tail, + pPacket->u.Rx.RxBufferSize, + PCI_DMA_FROMDEVICE); + pci_unmap_addr_set(((struct _UM_PACKET *) pPacket), map[0], map); + MM_SetT3Addr(paddr, map); +} + +static inline void MM_MapTxDma(PLM_DEVICE_BLOCK pDevice, + struct _LM_PACKET *pPacket, + T3_64BIT_HOST_ADDR *paddr, + LM_UINT32 *len, + int frag) +{ + dma_addr_t map; + struct sk_buff *skb = ((struct _UM_PACKET *) pPacket)->skbuff; + unsigned int length; + + if (frag == 0) { +#if MAX_SKB_FRAGS + if (skb_shinfo(skb)->nr_frags) + length = skb->len - skb->data_len; + else +#endif + length = skb->len; + map = pci_map_single(((struct _UM_DEVICE_BLOCK *)pDevice)->pdev, + skb->data, length, PCI_DMA_TODEVICE); + MM_SetT3Addr(paddr, map); + pci_unmap_addr_set(((struct _UM_PACKET *)pPacket), map[0], map); + pci_unmap_len_set(((struct _UM_PACKET *) pPacket), map_len[0], + length); + *len = length; + } +#if MAX_SKB_FRAGS + else { + skb_frag_t *sk_frag; + dmaaddr_high_t hi_map; + + sk_frag = &skb_shinfo(skb)->frags[frag - 1]; + + hi_map = pci_map_page( + ((struct _UM_DEVICE_BLOCK *)pDevice)->pdev, + sk_frag->page, + sk_frag->page_offset, + sk_frag->size, PCI_DMA_TODEVICE); + + MM_SetT3AddrHigh(paddr, hi_map); + pci_unmap_addr_set(((struct _UM_PACKET *) pPacket), map[frag], + hi_map); + pci_unmap_len_set(((struct _UM_PACKET *) pPacket), + map_len[frag], sk_frag->size); + *len = sk_frag->size; + } +#endif +} + +#define BCM5700_PHY_LOCK(pUmDevice, flags) { \ + spinlock_t *lock; \ + if ((pUmDevice)->do_global_lock) { \ + lock = &(pUmDevice)->global_lock; \ + } \ + else { \ + lock = &(pUmDevice)->phy_lock; \ + } \ + spin_lock_irqsave(lock, flags); \ +} + +#define BCM5700_PHY_UNLOCK(pUmDevice, flags) { \ + spinlock_t *lock; \ + if ((pUmDevice)->do_global_lock) { \ + lock = &(pUmDevice)->global_lock; \ + } \ + else { \ + lock = &(pUmDevice)->phy_lock; \ + } \ + spin_unlock_irqrestore(lock, flags); \ +} + + +#define MM_ACQUIRE_UNDI_LOCK(_pDevice) \ + if (!(((PUM_DEVICE_BLOCK)(_pDevice))->do_global_lock)) { \ + unsigned long flags; \ + spin_lock_irqsave(&((PUM_DEVICE_BLOCK)(_pDevice))->undi_lock, flags); \ + ((PUM_DEVICE_BLOCK)(_pDevice))->undi_flags = flags; \ + } + +#define MM_RELEASE_UNDI_LOCK(_pDevice) \ + if (!(((PUM_DEVICE_BLOCK)(_pDevice))->do_global_lock)) { \ + unsigned long flags = ((PUM_DEVICE_BLOCK) (_pDevice))->undi_flags; \ + spin_unlock_irqrestore(&((PUM_DEVICE_BLOCK)(_pDevice))->undi_lock, flags); \ + } + +#define MM_ACQUIRE_PHY_LOCK_IN_IRQ(_pDevice) \ + if (!(((PUM_DEVICE_BLOCK)(_pDevice))->do_global_lock)) { \ + spin_lock(&((PUM_DEVICE_BLOCK)(_pDevice))->phy_lock); \ + } + +#define MM_RELEASE_PHY_LOCK_IN_IRQ(_pDevice) \ + if (!(((PUM_DEVICE_BLOCK)(_pDevice))->do_global_lock)) { \ + spin_unlock(&((PUM_DEVICE_BLOCK)(_pDevice))->phy_lock); \ + } + +#define MM_UINT_PTR(_ptr) ((unsigned long) (_ptr)) + +#define MM_GETSTATS64(_Ctr) \ + (uint64_t) (_Ctr).Low + ((uint64_t) (_Ctr).High << 32) + +#define MM_GETSTATS32(_Ctr) \ + (uint32_t) (_Ctr).Low + +#if (BITS_PER_LONG == 64) +#define MM_GETSTATS(_Ctr) (unsigned long) MM_GETSTATS64(_Ctr) +#else +#define MM_GETSTATS(_Ctr) (unsigned long) MM_GETSTATS32(_Ctr) +#endif + +#if (LINUX_VERSION_CODE >= 0x020600) +#define mm_copy_to_user( to, from, size ) \ + (in_atomic() ? (memcpy((to),(from),(size)), 0) : copy_to_user((to),(from),(size))) +#define mm_copy_from_user( to, from, size ) \ + (in_atomic() ? (memcpy((to),(from),(size)), 0) : copy_from_user((to),(from),(size))) +#else +#define mm_copy_to_user( to, from, size ) \ + copy_to_user((to),(from),(size) ) +#define mm_copy_from_user( to, from, size ) \ + copy_from_user((to),(from),(size)) +#endif + + +#define printf(fmt, args...) printk(KERN_WARNING fmt, ##args) + +#define DbgPrint(fmt, arg...) printk(KERN_DEBUG fmt, ##arg) +#if defined(CONFIG_X86) +#define DbgBreakPoint() __asm__("int $129") +#else +#define DbgBreakPoint() +#endif +#define MM_Wait(time) udelay(time) + +#endif diff --git a/drivers/net/bcm5700/nicext.h b/drivers/net/bcm5700/nicext.h new file mode 100644 index 000000000..a61c52f13 --- /dev/null +++ b/drivers/net/bcm5700/nicext.h @@ -0,0 +1,259 @@ +/**************************************************************************** + * Copyright(c) 2000-2004 Broadcom Corporation. 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. + * + * Name: nicext.h + * + * Description: Broadcom Network Interface Card Extension (NICE) is an + * extension to Linux NET device kernel mode drivers. + * NICE is designed to provide additional functionalities, + * such as receive packet intercept. To support Broadcom NICE, + * the network device driver can be modified by adding an + * device ioctl handler and by indicating receiving packets + * to the NICE receive handler. Broadcom NICE will only be + * enabled by a NICE-aware intermediate driver, such as + * Broadcom Advanced Server Program Driver (BASP). When NICE + * is not enabled, the modified network device drivers + * functions exactly as other non-NICE aware drivers. + * + * Author: Frankie Fan + * + * Created: September 17, 2000 + * + ****************************************************************************/ +#ifndef _nicext_h_ +#define _nicext_h_ + +/* + * ioctl for NICE + */ +#define SIOCNICE SIOCDEVPRIVATE+7 + +/* + * SIOCNICE: + * + * The following structure needs to be less than IFNAMSIZ (16 bytes) because + * we're overloading ifreq.ifr_ifru. + * + * If 16 bytes is not enough, we should consider relaxing this because + * this is no field after ifr_ifru in the ifreq structure. But we may + * run into future compatiability problem in case of changing struct ifreq. + */ +struct nice_req +{ + __u32 cmd; + + union + { +#ifdef __KERNEL__ + /* cmd = NICE_CMD_SET_RX or NICE_CMD_GET_RX */ + /* cmd = NICE_CMD_SET_RX_NAPI or NICE_CMD_GET_RX_NAPI */ + struct + { + void (*nrqus1_rx)( struct sk_buff*, void* ); + void* nrqus1_ctx; + } nrqu_nrqus1; + + /* cmd = NICE_CMD_QUERY_SUPPORT */ + struct + { + __u32 nrqus2_magic; + __u32 nrqus2_support_rx:1; + __u32 nrqus2_support_vlan:1; + __u32 nrqus2_support_get_speed:1; + __u32 nrqus2_support_rx_napi:1; + } nrqu_nrqus2; +#endif + + void *align_ptr; /* this field is not used, it is to align the union */ + /* in 64-bit user mode */ + + /* cmd = NICE_CMD_GET_SPEED - in Mbps or 0 if link down */ + /* cmd = NICE_CMD_ENABLE_EXT_LOOPBACK - in Mbps */ + struct + { + unsigned int nrqus3_speed; /* 1000 = Gb, 100 = 100mbs, 10 = 10mbs */ + } nrqu_nrqus3; + + /* cmd = NICE_CMD_BLINK_LED */ + struct + { + unsigned int nrqus4_blink_time; /* blink duration in seconds */ + } nrqu_nrqus4; + + /* cmd = NICE_CMD_REG_READ */ + /* cmd = NICE_CMD_REG_WRITE */ + /* cmd = NICE_CMD_MEM_READ */ + /* cmd = NICE_CMD_MEM_WRITE */ + /* cmd = NICE_CMD_REG_READ_DIRECT */ + /* cmd = NICE_CMD_REG_WRITE_DIRECT */ + /* cmd = NICE_CMD_CFG_READ32 */ + /* cmd = NICE_CMD_CFG_READ16 */ + /* cmd = NICE_CMD_CFG_READ8 */ + /* cmd = NICE_CMD_CFG_WRITE32 */ + /* cmd = NICE_CMD_CFG_WRITE16 */ + /* cmd = NICE_CMD_CFG_WRITE8 */ + struct + { + unsigned int nrqus5_offset; /* offset */ + unsigned int nrqus5_data; /* value */ + } nrqu_nrqus5; + + /* cmd = NICE_CMD_INTERRUPT_TEST */ + struct + { + unsigned int nrqus6_intr_test_result; /* 1 == pass */ + } nrqu_nrqus6; + + /* cmd = NICE_CMD_KMALLOC_PHYS */ + /* cmd = NICE_CMD_KFREE_PHYS */ + /* These commands allow the diagnostics app. to allocate and free */ + /* PCI consistent memory for DMA tests */ + struct + { + unsigned int nrqus7_size; /* size(bytes) to allocate, not used */ + /* when cmd is NICE_CMD_KFREE_PHYS. */ + __u32 nrqus7_phys_addr_lo;/* CPU physical address allocated or */ + __u32 nrqus7_phys_addr_hi;/* to be freed. */ + /* PCI physical address is contained in */ + /* the 1st 64 bit of the allocated */ + /* buffer. Use open("/dev/mem")/lseek() */ + /* and read()/write() to a access */ + /* buffer in user space. */ + /* mmap() only works on x86. */ + } nrqu_nrqus7; + + /* cmd = NICE_CMD_SET_WRITE_PROTECT */ + struct + { + unsigned int nrqus8_data; /* 1 == set write protect, 0 == clear write protect */ + } nrqu_nrqus8; + + /* cmd = NICE_CMD_GET_STATS_BLOCK */ + struct + { + void *nrqus9_useraddr; /* user space address for the stats block */ + unsigned int nrqus9_size;/* size (in bytes) */ + /* (0x6c0 for the whole block) */ + } nrqu_nrqus9; + + /* cmd = NICE_CMD_LOOPBACK_TEST */ + struct + { + unsigned char nrqus10_looptype; + unsigned char nrqus10_loopspeed; + } nrqu_nrqus10; + + /* cmd = NICE_CMD_KMAP_PHYS/KUNMAP_PHYS */ + struct + { + int nrqus11_rw; /* direction */ + void *nrqus11_uaddr; /* ptr to mem allocated in user space */ + /* when cmd is NICE_CMD_KFREE_PHYS. */ + __u32 nrqus11_phys_addr_lo;/* CPU physical address allocated or */ + __u32 nrqus11_phys_addr_hi;/* to be freed. */ + /* PCI physical address is contained in */ + /* the 1st 64 bit of the allocated */ + /* buffer. Use open("/dev/mem")/lseek() */ + /* and read()/write() to a access */ + /* buffer in user space. */ + /* mmap() only works on x86. */ + } nrqu_nrqus11; + } nrq_nrqu; +}; + +#define nrq_rx nrq_nrqu.nrqu_nrqus1.nrqus1_rx +#define nrq_ctx nrq_nrqu.nrqu_nrqus1.nrqus1_ctx +#define nrq_support_rx nrq_nrqu.nrqu_nrqus2.nrqus2_support_rx +#define nrq_magic nrq_nrqu.nrqu_nrqus2.nrqus2_magic +#define nrq_support_vlan nrq_nrqu.nrqu_nrqus2.nrqus2_support_vlan +#define nrq_support_get_speed nrq_nrqu.nrqu_nrqus2.nrqus2_support_get_speed +#define nrq_support_rx_napi nrq_nrqu.nrqu_nrqus2.nrqus2_support_rx_napi +#define nrq_speed nrq_nrqu.nrqu_nrqus3.nrqus3_speed +#define nrq_blink_time nrq_nrqu.nrqu_nrqus4.nrqus4_blink_time +#define nrq_offset nrq_nrqu.nrqu_nrqus5.nrqus5_offset +#define nrq_data nrq_nrqu.nrqu_nrqus5.nrqus5_data +#define nrq_intr_test_result nrq_nrqu.nrqu_nrqus6.nrqus6_intr_test_result + +#define nrq_size nrq_nrqu.nrqu_nrqus7.nrqus7_size +#define nrq_phys_addr_lo nrq_nrqu.nrqu_nrqus7.nrqus7_phys_addr_lo +#define nrq_phys_addr_hi nrq_nrqu.nrqu_nrqus7.nrqus7_phys_addr_hi + +#define nrq_rw nrq_nrqu.nrqu_nrqus11.nrqus11_rw +#define nrq_puaddr nrq_nrqu.nrqu_nrqus11.nrqus11_uaddr +#define nrq_phys_add_lo nrq_nrqu.nrqu_nrqus11.nrqus11_phys_addr_lo +#define nrq_phys_add_hi nrq_nrqu.nrqu_nrqus11.nrqus11_phys_addr_hi + +#define nrq_write_protect nrq_nrqu.nrqu_nrqus8.nrqus8_data +#define nrq_stats_useraddr nrq_nrqu.nrqu_nrqus9.nrqus9_useraddr +#define nrq_stats_size nrq_nrqu.nrqu_nrqus9.nrqus9_size + +#define nrq_looptype nrq_nrqu.nrqu_nrqus10.nrqus10_looptype +#define nrq_loopspeed nrq_nrqu.nrqu_nrqus10.nrqus10_loopspeed + +/* + * magic constants + */ +#define NICE_REQUESTOR_MAGIC 0x4543494E // NICE in ascii +#define NICE_DEVICE_MAGIC 0x4E494345 // ECIN in ascii + +#define NICE_LOOPBACK_TESTTYPE_MAC 0x1 +#define NICE_LOOPBACK_TESTTYPE_PHY 0x2 +#define NICE_LOOPBACK_TESTTYPE_EXT 0x4 + +#define NICE_LOOPBACK_TEST_SPEEDMASK 0x3 +#define NICE_LOOPBACK_TEST_10MBPS 0x1 +#define NICE_LOOPBACK_TEST_100MBPS 0x2 +#define NICE_LOOPBACK_TEST_1000MBPS 0x3 + + +/* + * command field + */ +typedef enum { + NICE_CMD_QUERY_SUPPORT = 0x00000001, + NICE_CMD_SET_RX = 0x00000002, + NICE_CMD_GET_RX = 0x00000003, + NICE_CMD_GET_SPEED = 0x00000004, + NICE_CMD_BLINK_LED = 0x00000005, + NICE_CMD_DIAG_SUSPEND = 0x00000006, + NICE_CMD_DIAG_RESUME = 0x00000007, + NICE_CMD_REG_READ = 0x00000008, + NICE_CMD_REG_WRITE = 0x00000009, + NICE_CMD_MEM_READ = 0x0000000a, + NICE_CMD_MEM_WRITE = 0x0000000b, + NICE_CMD_ENABLE_MAC_LOOPBACK = 0x0000000c, + NICE_CMD_DISABLE_MAC_LOOPBACK = 0x0000000d, + NICE_CMD_ENABLE_PHY_LOOPBACK = 0x0000000e, + NICE_CMD_DISABLE_PHY_LOOPBACK = 0x0000000f, + NICE_CMD_INTERRUPT_TEST = 0x00000010, + NICE_CMD_SET_WRITE_PROTECT = 0x00000011, + NICE_CMD_SET_RX_NAPI = 0x00000012, + NICE_CMD_GET_RX_NAPI = 0x00000013, + NICE_CMD_ENABLE_EXT_LOOPBACK = 0x00000014, + NICE_CMD_DISABLE_EXT_LOOPBACK = 0x00000015, + NICE_CMD_CFG_READ32 = 0x00000016, + NICE_CMD_CFG_READ16 = 0x00000017, + NICE_CMD_CFG_READ8 = 0x00000018, + NICE_CMD_CFG_WRITE32 = 0x00000019, + NICE_CMD_CFG_WRITE16 = 0x0000001a, + NICE_CMD_CFG_WRITE8 = 0x0000001b, + + NICE_CMD_REG_READ_DIRECT = 0x0000001e, + NICE_CMD_REG_WRITE_DIRECT = 0x0000001f, + NICE_CMD_RESET = 0x00000020, + NICE_CMD_KMALLOC_PHYS = 0x00000021, + NICE_CMD_KFREE_PHYS = 0x00000022, + NICE_CMD_GET_STATS_BLOCK = 0x00000023, + NICE_CMD_CLR_STATS_BLOCK = 0x00000024, + NICE_CMD_LOOPBACK_TEST = 0x00000025, + NICE_CMD_KMAP_PHYS = 0x00000026, + NICE_CMD_KUNMAP_PHYS = 0x00000027, + NICE_CMD_MAX +} nice_cmds; + +#endif // _nicext_h_ + diff --git a/drivers/net/bcm5700/queue.h b/drivers/net/bcm5700/queue.h new file mode 100644 index 000000000..c73be5e88 --- /dev/null +++ b/drivers/net/bcm5700/queue.h @@ -0,0 +1,347 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* Queue functions. */ +/* void QQ_InitQueue(PQQ_CONTAINER pQueue) */ +/* char QQ_Full(PQQ_CONTAINER pQueue) */ +/* char QQ_Empty(PQQ_CONTAINER pQueue) */ +/* unsigned int QQ_GetSize(PQQ_CONTAINER pQueue) */ +/* unsigned int QQ_GetEntryCnt(PQQ_CONTAINER pQueue) */ +/* char QQ_PushHead(PQQ_CONTAINER pQueue, PQQ_ENTRY pEntry) */ +/* char QQ_PushTail(PQQ_CONTAINER pQueue, PQQ_ENTRY pEntry) */ +/* PQQ_ENTRY QQ_PopHead(PQQ_CONTAINER pQueue) */ +/* PQQ_ENTRY QQ_PopTail(PQQ_CONTAINER pQueue) */ +/* PQQ_ENTRY QQ_GetHead(PQQ_CONTAINER pQueue, unsigned int Idx) */ +/* PQQ_ENTRY QQ_GetTail(PQQ_CONTAINER pQueue, unsigned int Idx) */ +/* */ +/* */ +/* History: */ +/* 02/25/00 Hav Khauv Initial version. */ +/******************************************************************************/ + +#ifndef BCM_QUEUE_H +#define BCM_QUEUE_H + + + +/******************************************************************************/ +/* Queue definitions. */ +/******************************************************************************/ + +/* Entry for queueing. */ +typedef void *PQQ_ENTRY; + + +/* Queue header -- base type. */ +typedef struct { + unsigned int Head; + unsigned int Tail; + unsigned int Size; + MM_ATOMIC_T EntryCnt; + PQQ_ENTRY Array[1]; +} QQ_CONTAINER, *PQQ_CONTAINER; + + +/* Declare queue type macro. */ +#define DECLARE_QUEUE_TYPE(_QUEUE_TYPE, _QUEUE_SIZE) \ + \ + typedef struct { \ + QQ_CONTAINER Container; \ + PQQ_ENTRY EntryBuffer[_QUEUE_SIZE]; \ + } _QUEUE_TYPE, *P##_QUEUE_TYPE + + + +/******************************************************************************/ +/* Compilation switches. */ +/******************************************************************************/ + +#if DBG +#undef QQ_NO_OVERFLOW_CHECK +#undef QQ_NO_UNDERFLOW_CHECK +#endif /* DBG */ + +#ifdef QQ_USE_MACROS +/* notdone */ +#else + +#ifdef QQ_NO_INLINE +#define __inline +#endif /* QQ_NO_INLINE */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static void +QQ_InitQueue( +PQQ_CONTAINER pQueue, +unsigned int QueueSize) { + pQueue->Head = 0; + pQueue->Tail = 0; + pQueue->Size = QueueSize+1; + MM_ATOMIC_SET(&pQueue->EntryCnt, 0); +} /* QQ_InitQueue */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static char +QQ_Full( +PQQ_CONTAINER pQueue) { + unsigned int NewHead; + + NewHead = (pQueue->Head + 1) % pQueue->Size; + + return(NewHead == pQueue->Tail); +} /* QQ_Full */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static char +QQ_Empty( +PQQ_CONTAINER pQueue) { + return(pQueue->Head == pQueue->Tail); +} /* QQ_Empty */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static unsigned int +QQ_GetSize( +PQQ_CONTAINER pQueue) { + return pQueue->Size; +} /* QQ_GetSize */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static unsigned int +QQ_GetEntryCnt( +PQQ_CONTAINER pQueue) { + return MM_ATOMIC_READ(&pQueue->EntryCnt); +} /* QQ_GetEntryCnt */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/* TRUE entry was added successfully. */ +/* FALSE queue is full. */ +/******************************************************************************/ +__inline static char +QQ_PushHead( +PQQ_CONTAINER pQueue, +PQQ_ENTRY pEntry) { + unsigned int Head; + + Head = (pQueue->Head + 1) % pQueue->Size; + +#if !defined(QQ_NO_OVERFLOW_CHECK) + if(Head == pQueue->Tail) { + return 0; + } /* if */ +#endif /* QQ_NO_OVERFLOW_CHECK */ + + pQueue->Array[pQueue->Head] = pEntry; + MM_WMB(); + pQueue->Head = Head; + MM_ATOMIC_INC(&pQueue->EntryCnt); + + return -1; +} /* QQ_PushHead */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/* TRUE entry was added successfully. */ +/* FALSE queue is full. */ +/******************************************************************************/ +__inline static char +QQ_PushTail( +PQQ_CONTAINER pQueue, +PQQ_ENTRY pEntry) { + unsigned int Tail; + + Tail = pQueue->Tail; + if(Tail == 0) { + Tail = pQueue->Size; + } /* if */ + Tail--; + +#if !defined(QQ_NO_OVERFLOW_CHECK) + if(Tail == pQueue->Head) { + return 0; + } /* if */ +#endif /* QQ_NO_OVERFLOW_CHECK */ + + pQueue->Array[Tail] = pEntry; + MM_WMB(); + pQueue->Tail = Tail; + MM_ATOMIC_INC(&pQueue->EntryCnt); + + return -1; +} /* QQ_PushTail */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static PQQ_ENTRY +QQ_PopHead( +PQQ_CONTAINER pQueue) { + unsigned int Head; + unsigned int Tail; + PQQ_ENTRY Entry; + + Head = pQueue->Head; + Tail = pQueue->Tail; + + MM_MB(); +#if !defined(QQ_NO_UNDERFLOW_CHECK) + if(Head == Tail) { + return (PQQ_ENTRY) 0; + } /* if */ +#endif /* QQ_NO_UNDERFLOW_CHECK */ + + if(Head == 0) { + Head = pQueue->Size; + } /* if */ + Head--; + + Entry = pQueue->Array[Head]; + MM_MB(); + pQueue->Head = Head; + MM_ATOMIC_DEC(&pQueue->EntryCnt); + + return Entry; +} /* QQ_PopHead */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static PQQ_ENTRY +QQ_PopTail( +PQQ_CONTAINER pQueue) { + unsigned int Head; + unsigned int Tail; + PQQ_ENTRY Entry; + + Head = pQueue->Head; + Tail = pQueue->Tail; + + MM_MB(); +#if !defined(QQ_NO_UNDERFLOW_CHECK) + if(Tail == Head) { + return (PQQ_ENTRY) 0; + } /* if */ +#endif /* QQ_NO_UNDERFLOW_CHECK */ + + Entry = pQueue->Array[Tail]; + MM_MB(); + pQueue->Tail = (Tail + 1) % pQueue->Size; + MM_ATOMIC_DEC(&pQueue->EntryCnt); + + return Entry; +} /* QQ_PopTail */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static PQQ_ENTRY +QQ_GetHead( + PQQ_CONTAINER pQueue, + unsigned int Idx) +{ + if(Idx >= (unsigned int) MM_ATOMIC_READ(&pQueue->EntryCnt)) + { + return (PQQ_ENTRY) 0; + } + + if(pQueue->Head > Idx) + { + Idx = pQueue->Head - Idx; + } + else + { + Idx = pQueue->Size - (Idx - pQueue->Head); + } + Idx--; + + return pQueue->Array[Idx]; +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +__inline static PQQ_ENTRY +QQ_GetTail( + PQQ_CONTAINER pQueue, + unsigned int Idx) +{ + if(Idx >= (unsigned int) MM_ATOMIC_READ(&pQueue->EntryCnt)) + { + return (PQQ_ENTRY) 0; + } + + Idx += pQueue->Tail; + if(Idx >= pQueue->Size) + { + Idx = Idx - pQueue->Size; + } + + return pQueue->Array[Idx]; +} + +#endif /* QQ_USE_MACROS */ + + + +#endif /* QUEUE_H */ diff --git a/drivers/net/bcm5700/tcp_seg.c b/drivers/net/bcm5700/tcp_seg.c new file mode 100644 index 000000000..5a7c8f14a --- /dev/null +++ b/drivers/net/bcm5700/tcp_seg.c @@ -0,0 +1,106 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2002 - 2004 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/* */ +/******************************************************************************/ + +#include "mm.h" + +#ifdef INCLUDE_TCP_SEG_SUPPORT +#include "fw_stkoffld.h" +#include "fw_lso05.h" + +LM_UINT32 LM_GetStkOffLdFirmwareSize(PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 FwSize; + + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5750) + { + return 0; + } + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { + FwSize = (LM_UINT32)(t3StkOffLd05FwTextLen + + t3StkOffLd05FwRodataLen + + t3StkOffLd05FwDataLen + + t3StkOffLd05FwSbssLen + + t3StkOffLd05FwBssLen); + } + else + { + FwSize = (LM_UINT32)(t3StkOffLdFwTextLen + + t3StkOffLdFwRodataLen + + t3StkOffLdFwDataLen + + t3StkOffLdFwSbssLen + + t3StkOffLdFwBssLen); + } + + return FwSize; +} + +LM_STATUS LM_LoadStkOffLdFirmware(PLM_DEVICE_BLOCK pDevice) +{ + T3_FWIMG_INFO FwImgInfo; + LM_UINT32 Cpu; + + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + return LM_STATUS_SUCCESS; + } + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { + FwImgInfo.StartAddress = t3StkOffLd05FwStartAddr; + FwImgInfo.Text.Buffer = (PLM_UINT8)t3StkOffLd05FwText; + FwImgInfo.Text.Offset = t3StkOffLd05FwTextAddr; + FwImgInfo.Text.Length = t3StkOffLd05FwTextLen; + FwImgInfo.ROnlyData.Buffer = (PLM_UINT8)t3StkOffLd05FwRodata; + FwImgInfo.ROnlyData.Offset = t3StkOffLd05FwRodataAddr; + FwImgInfo.ROnlyData.Length = t3StkOffLd05FwRodataLen; + FwImgInfo.Data.Buffer = (PLM_UINT8)t3StkOffLd05FwData; + FwImgInfo.Data.Offset = t3StkOffLd05FwDataAddr; + FwImgInfo.Data.Length = t3StkOffLd05FwDataLen; + FwImgInfo.Sbss.Offset = t3StkOffLd05FwSbssAddr; + FwImgInfo.Sbss.Length = t3StkOffLd05FwSbssLen; + FwImgInfo.Bss.Offset = t3StkOffLd05FwBssAddr; + FwImgInfo.Bss.Length = t3StkOffLd05FwBssLen; + Cpu = T3_RX_CPU_ID; + } + else + { + FwImgInfo.StartAddress = t3StkOffLdFwStartAddr; + FwImgInfo.Text.Buffer = (PLM_UINT8)t3StkOffLdFwText; + FwImgInfo.Text.Offset = t3StkOffLdFwTextAddr; + FwImgInfo.Text.Length = t3StkOffLdFwTextLen; + FwImgInfo.ROnlyData.Buffer = (PLM_UINT8)t3StkOffLdFwRodata; + FwImgInfo.ROnlyData.Offset = t3StkOffLdFwRodataAddr; + FwImgInfo.ROnlyData.Length = t3StkOffLdFwRodataLen; + FwImgInfo.Data.Buffer = (PLM_UINT8)t3StkOffLdFwData; + FwImgInfo.Data.Offset = t3StkOffLdFwDataAddr; + FwImgInfo.Data.Length = t3StkOffLdFwDataLen; + FwImgInfo.Sbss.Offset = t3StkOffLdFwSbssAddr; + FwImgInfo.Sbss.Length = t3StkOffLdFwSbssLen; + FwImgInfo.Bss.Offset = t3StkOffLdFwBssAddr; + FwImgInfo.Bss.Length = t3StkOffLdFwBssLen; + Cpu = T3_TX_CPU_ID; + } + + if (LM_LoadFirmware(pDevice, + &FwImgInfo, + Cpu, + Cpu) != LM_STATUS_SUCCESS) + { + return LM_STATUS_FAILURE; + } + + return LM_STATUS_SUCCESS; +} + +#endif /* INCLUDE_TCP_SEG_SUPPORT */ diff --git a/drivers/net/bcm5700/tigon3.c b/drivers/net/bcm5700/tigon3.c new file mode 100644 index 000000000..6ae0fcb99 --- /dev/null +++ b/drivers/net/bcm5700/tigon3.c @@ -0,0 +1,9892 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2006 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/******************************************************************************/ + +#include "mm.h" + + + +/******************************************************************************/ +/* Local functions. */ +/******************************************************************************/ + +LM_STATUS LM_Abort(PLM_DEVICE_BLOCK pDevice); +LM_STATUS LM_QueueRxPackets(PLM_DEVICE_BLOCK pDevice); + +static LM_STATUS LM_InitBcm540xPhy(PLM_DEVICE_BLOCK pDevice); +static LM_VOID LM_PhyTapPowerMgmt(LM_DEVICE_BLOCK *pDevice); + +LM_VOID LM_ServiceRxInterrupt(PLM_DEVICE_BLOCK pDevice); +LM_VOID LM_ServiceTxInterrupt(PLM_DEVICE_BLOCK pDevice); + +static LM_STATUS LM_ForceAutoNeg(PLM_DEVICE_BLOCK pDevice); +static LM_UINT32 GetPhyAdFlowCntrlSettings(PLM_DEVICE_BLOCK pDevice); +STATIC LM_STATUS LM_SetFlowControl(PLM_DEVICE_BLOCK pDevice, + LM_UINT32 LocalPhyAd, LM_UINT32 RemotePhyAd); +#ifdef INCLUDE_TBI_SUPPORT +STATIC LM_STATUS LM_SetupFiberPhy(PLM_DEVICE_BLOCK pDevice); +STATIC LM_STATUS LM_InitBcm800xPhy(PLM_DEVICE_BLOCK pDevice); +#endif +STATIC LM_STATUS LM_SetupCopperPhy(PLM_DEVICE_BLOCK pDevice); +STATIC LM_VOID LM_SetEthWireSpeed(LM_DEVICE_BLOCK *pDevice); +STATIC LM_STATUS LM_PhyAdvertiseAll(LM_DEVICE_BLOCK *pDevice); +STATIC PLM_ADAPTER_INFO LM_GetAdapterInfoBySsid(LM_UINT16 Svid, LM_UINT16 Ssid); +LM_VOID LM_SwitchVaux(PLM_DEVICE_BLOCK pDevice, PLM_DEVICE_BLOCK pDevice2); +STATIC LM_STATUS LM_DmaTest(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pBufferVirt, + LM_PHYSICAL_ADDRESS BufferPhy, LM_UINT32 BufferSize); +STATIC LM_STATUS LM_DisableChip(PLM_DEVICE_BLOCK pDevice); +STATIC LM_STATUS LM_ResetChip(PLM_DEVICE_BLOCK pDevice); +STATIC LM_STATUS LM_DisableFW(PLM_DEVICE_BLOCK pDevice); +STATIC LM_STATUS LM_Test4GBoundary(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket, + PT3_SND_BD pSendBd); +STATIC LM_VOID LM_WritePreResetSignatures(LM_DEVICE_BLOCK *pDevice, + LM_RESET_TYPE Mode); +STATIC LM_VOID LM_WritePostResetSignatures(LM_DEVICE_BLOCK *pDevice, + LM_RESET_TYPE Mode); +STATIC LM_VOID LM_WriteLegacySignatures(LM_DEVICE_BLOCK *pDevice, + LM_RESET_TYPE Mode); +STATIC void LM_GetPhyId(LM_DEVICE_BLOCK *pDevice); + +/******************************************************************************/ +/* External functions. */ +/******************************************************************************/ + +LM_STATUS LM_LoadRlsFirmware(PLM_DEVICE_BLOCK pDevice); +#ifdef INCLUDE_TCP_SEG_SUPPORT +LM_STATUS LM_LoadStkOffLdFirmware(PLM_DEVICE_BLOCK pDevice); +LM_UINT32 LM_GetStkOffLdFirmwareSize(PLM_DEVICE_BLOCK pDevice); +#endif + +LM_UINT32 +LM_RegRd(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Register) +{ +#ifdef PCIX_TARGET_WORKAROUND + if (pDevice->Flags & UNDI_FIX_FLAG) + { + return (LM_RegRdInd(pDevice, Register)); + } + else +#endif + { + return (REG_RD_OFFSET(pDevice, Register)); + } +} + +/* Mainly used to flush posted write before delaying */ +LM_VOID +LM_RegRdBack(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Register) +{ + LM_UINT32 dummy; + +#ifdef PCIX_TARGET_WORKAROUND + if (pDevice->Flags & ENABLE_PCIX_FIX_FLAG) + { + return; + } + else +#endif + { + if (pDevice->Flags & REG_RD_BACK_FLAG) + return; + + dummy = REG_RD_OFFSET(pDevice, Register); + } +} + +LM_VOID +LM_RegWr(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Register, LM_UINT32 Value32, + LM_UINT32 ReadBack) +{ +#ifdef PCIX_TARGET_WORKAROUND + if (pDevice->Flags & ENABLE_PCIX_FIX_FLAG) + { + LM_RegWrInd(pDevice, Register, Value32); + } + else +#endif + { + LM_UINT32 dummy; + + REG_WR_OFFSET(pDevice, Register, Value32); + if (ReadBack && (pDevice->Flags & REG_RD_BACK_FLAG)) + { + dummy = REG_RD_OFFSET(pDevice, Register); + } + } +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_UINT32 +LM_RegRdInd( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 Register) { + LM_UINT32 Value32; + + MM_ACQUIRE_UNDI_LOCK(pDevice); + MM_WriteConfig32(pDevice, T3_PCI_REG_ADDR_REG, Register); + MM_ReadConfig32(pDevice, T3_PCI_REG_DATA_REG, &Value32); + MM_RELEASE_UNDI_LOCK(pDevice); + + return MM_SWAP_LE32(Value32); +} /* LM_RegRdInd */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_VOID +LM_RegWrInd( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 Register, +LM_UINT32 Value32) { + + MM_ACQUIRE_UNDI_LOCK(pDevice); + MM_WriteConfig32(pDevice, T3_PCI_REG_ADDR_REG, Register); + MM_WriteConfig32(pDevice, T3_PCI_REG_DATA_REG, MM_SWAP_LE32(Value32)); + MM_RELEASE_UNDI_LOCK(pDevice); +} /* LM_RegWrInd */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_UINT32 +LM_MemRdInd( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 MemAddr) { + LM_UINT32 Value32; + + MM_ACQUIRE_UNDI_LOCK(pDevice); + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_ADDR_REG, MemAddr); + MM_ReadConfig32(pDevice, T3_PCI_MEM_WIN_DATA_REG, &Value32); + MM_RELEASE_UNDI_LOCK(pDevice); + + return MM_SWAP_LE32(Value32); +} /* LM_MemRdInd */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_VOID +LM_MemWrInd( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 MemAddr, +LM_UINT32 Value32) { + MM_ACQUIRE_UNDI_LOCK(pDevice); + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_ADDR_REG, MemAddr); + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_DATA_REG, MM_SWAP_LE32(Value32)); + MM_RELEASE_UNDI_LOCK(pDevice); +} /* LM_MemWrInd */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_QueueRxPackets( +PLM_DEVICE_BLOCK pDevice) { + LM_STATUS Lmstatus; + PLM_PACKET pPacket; + PT3_RCV_BD pRcvBd = 0; + LM_UINT32 StdBdAdded = 0; +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + LM_UINT32 JumboBdAdded = 0; +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + LM_UINT32 ConIdx, Idx; + LM_UINT32 Diff = 0; + + Lmstatus = LM_STATUS_SUCCESS; + + if (pDevice->Flags & RX_BD_LIMIT_64_FLAG) + { + ConIdx = pDevice->pStatusBlkVirt->RcvStdConIdx; + Diff = (pDevice->RxStdProdIdx - ConIdx) & + T3_STD_RCV_RCB_ENTRY_COUNT_MASK; + if (Diff >= 56) + { + if (QQ_GetEntryCnt(&pDevice->RxPacketFreeQ.Container)) + { + pDevice->QueueAgain = TRUE; + } + return LM_STATUS_SUCCESS; + } + } + + pDevice->QueueAgain = FALSE; + + pPacket = (PLM_PACKET) QQ_PopHead(&pDevice->RxPacketFreeQ.Container); + while(pPacket) { + switch(pPacket->u.Rx.RcvProdRing) { +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + case T3_JUMBO_RCV_PROD_RING: /* Jumbo Receive Ring. */ + /* Initialize the buffer descriptor. */ + Idx = pDevice->RxJumboProdIdx; + pRcvBd = &pDevice->pRxJumboBdVirt[Idx]; + + pPacket->u.Rx.RcvRingProdIdx = Idx; + pDevice->RxJumboRing[Idx] = pPacket; + /* Update the producer index. */ + pDevice->RxJumboProdIdx = (Idx + 1) & + T3_JUMBO_RCV_RCB_ENTRY_COUNT_MASK; + + JumboBdAdded++; + break; +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + case T3_STD_RCV_PROD_RING: /* Standard Receive Ring. */ + /* Initialize the buffer descriptor. */ + Idx = pDevice->RxStdProdIdx; + pRcvBd = &pDevice->pRxStdBdVirt[Idx]; + + pPacket->u.Rx.RcvRingProdIdx = Idx; + pDevice->RxStdRing[Idx] = pPacket; + /* Update the producer index. */ + pDevice->RxStdProdIdx = (Idx + 1) & + T3_STD_RCV_RCB_ENTRY_COUNT_MASK; + + StdBdAdded++; + break; + + case T3_UNKNOWN_RCV_PROD_RING: + default: + Lmstatus = LM_STATUS_FAILURE; + break; + } /* switch */ + + /* Bail out if there is any error. */ + if(Lmstatus != LM_STATUS_SUCCESS) + { + break; + } + + /* Initialize the receive buffer pointer */ + MM_MapRxDma(pDevice, pPacket, &pRcvBd->HostAddr); + + /* The opaque field may point to an offset from a fix addr. */ + pRcvBd->Opaque = (LM_UINT32) (MM_UINT_PTR(pPacket) - + MM_UINT_PTR(pDevice->pPacketDescBase)); + + if ((pDevice->Flags & RX_BD_LIMIT_64_FLAG) && + ((Diff + StdBdAdded) >= 63)) + { + if (QQ_GetEntryCnt(&pDevice->RxPacketFreeQ.Container)) + { + pDevice->QueueAgain = TRUE; + } + break; + } + pPacket = (PLM_PACKET) QQ_PopHead(&pDevice->RxPacketFreeQ.Container); + } /* while */ + + MM_WMB(); + /* Update the procedure index. */ + if(StdBdAdded) + { + MB_REG_WR(pDevice, Mailbox.RcvStdProdIdx.Low, + pDevice->RxStdProdIdx); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.RcvStdProdIdx.Low); + } + } +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + if(JumboBdAdded) + { + MB_REG_WR(pDevice, Mailbox.RcvJumboProdIdx.Low, + pDevice->RxJumboProdIdx); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.RcvJumboProdIdx.Low); + } + } +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + return Lmstatus; +} /* LM_QueueRxPackets */ + + + + +#define EEPROM_CMD_TIMEOUT 100000 +#define NVRAM_CMD_TIMEOUT 100000 + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS LM_NVRAM_AcquireLock( PLM_DEVICE_BLOCK pDevice ) +{ + LM_UINT i; + LM_UINT32 value32; + LM_STATUS status; + + status = LM_STATUS_SUCCESS; + + /* Request access to the flash interface. */ + REG_WR( pDevice, Nvram.SwArb, SW_ARB_REQ_SET1 ); + + /* + * The worst case wait time for Nvram arbitration + * using serial eprom is about 45 msec on a 5704 + * with the other channel loading boot code. + */ + for( i = 0; i < NVRAM_CMD_TIMEOUT; i++ ) + { + value32 = REG_RD( pDevice, Nvram.SwArb ); + if( value32 & SW_ARB_GNT1 ) + { + break; + } + MM_Wait(20); + } + + + return status; +} /* LM_NVRAM_AcquireLock */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS LM_NVRAM_ReleaseLock( PLM_DEVICE_BLOCK pDevice ) +{ + /* Relinquish nvram interface. */ + REG_WR( pDevice, Nvram.SwArb, SW_ARB_REQ_CLR1 ); + REG_RD_BACK( pDevice, Nvram.SwArb ); + + return LM_STATUS_SUCCESS; +} /* LM_NVRAM_ReleaseLock */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_EEPROM_ExecuteCommand( PLM_DEVICE_BLOCK pDevice, LM_UINT32 cmd ) +{ + LM_UINT32 i; + LM_UINT32 value32; + LM_STATUS status; + + status = LM_STATUS_SUCCESS; + + REG_WR( pDevice, Grc.EepromAddr, cmd ); + + for( i = 0; i < EEPROM_CMD_TIMEOUT; i++ ) + { + value32 = REG_RD( pDevice, Grc.EepromAddr ); + if( value32 & SEEPROM_ADDR_COMPLETE ) + { + break; + } + MM_Wait(20); + } + + if( i == EEPROM_CMD_TIMEOUT ) + { + printk( KERN_WARNING "EEPROM command (0x%x) timed out!\n", cmd ); + status = LM_STATUS_FAILURE; + } + + return status; +} /* LM_EEPROM_ExecuteCommand */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_NVRAM_ExecuteCommand( PLM_DEVICE_BLOCK pDevice, LM_UINT32 cmd ) +{ + LM_UINT32 i; + LM_UINT32 value32; + LM_STATUS status; + + status = LM_STATUS_SUCCESS; + + REG_WR( pDevice, Nvram.Cmd, cmd ); + REG_RD_BACK( pDevice, Nvram.Cmd ); + MM_Wait(10); + + /* Wait for the command to complete. */ + for( i = 0; i < NVRAM_CMD_TIMEOUT; i++ ) + { + value32 = REG_RD( pDevice, Nvram.Cmd ); + if( value32 & NVRAM_CMD_DONE ) + { + break; + } + MM_Wait(1); + } + + if( i == NVRAM_CMD_TIMEOUT ) + { + printk( KERN_WARNING "NVRAM command (0x%x) timed out!\n", cmd ); + status = LM_STATUS_FAILURE; + } + + return status; +} /* LM_NVRAM_ExecuteCommand */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_EEPROM_Read_UINT32( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT32 * data ) +{ + LM_UINT32 value32; + LM_UINT32 Addr; + LM_UINT32 Dev; + LM_STATUS status; + + Dev = offset / pDevice->flashinfo.chipsize; + Addr = offset % pDevice->flashinfo.chipsize; + + value32 = REG_RD( pDevice, Grc.EepromAddr ); + value32 &= ~(SEEPROM_ADDR_DEV_ID_MASK | SEEPROM_ADDR_ADDRESS_MASK | + SEEPROM_ADDR_RW_MASK); + value32 |= SEEPROM_ADDR_DEV_ID(Dev) | SEEPROM_ADDR_ADDRESS(Addr) | + SEEPROM_ADDR_START | SEEPROM_ADDR_READ; + + status = LM_EEPROM_ExecuteCommand( pDevice, value32 ); + if( status == LM_STATUS_SUCCESS ) + { + value32 = REG_RD( pDevice, Grc.EepromData ); + + /* The endianess of the eeprom and flash interface is different */ + *data = MM_SWAP_LE32( value32 ); + } + + return status; +} /* LM_EEPROM_Read_UINT32 */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_NVRAM_Read_UINT32( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT32 * data ) +{ + LM_UINT32 physaddr; + LM_UINT32 ctrlreg; + LM_UINT32 value32; + LM_STATUS status; + + if( pDevice->flashinfo.jedecnum == JEDEC_ATMEL && + pDevice->flashinfo.buffered == TRUE ) + { + /* + * One supported flash part has 9 address bits to address a + * particular page and another 9 address bits to address a + * particular byte within that page. + */ + LM_UINT32 pagenmbr; + + pagenmbr = offset / pDevice->flashinfo.pagesize; + pagenmbr = pagenmbr << ATMEL_AT45DB0X1B_PAGE_POS; + + physaddr = pagenmbr + (offset % pDevice->flashinfo.pagesize); + } + else + { + physaddr = offset; + } + + REG_WR( pDevice, Nvram.Addr, physaddr ); + + ctrlreg = NVRAM_CMD_DONE | NVRAM_CMD_DO_IT | + NVRAM_CMD_LAST | NVRAM_CMD_FIRST | NVRAM_CMD_RD; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_SUCCESS ) + { + value32 = REG_RD( pDevice, Nvram.ReadData ); + + /* + * Data is swapped so that the byte stream is the same + * in big and little endian systems. Caller will do + * additional swapping depending on how it wants to + * look at the data. + */ + *data = MM_SWAP_BE32( value32 ); + } + + return status; +} /* LM_NVRAM_Read_UINT32 */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_NVRAM_ReadBlock( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT8 * data, LM_UINT32 size ) +{ + LM_STATUS status; + LM_UINT32 value32; + LM_UINT32 bytecnt; + LM_UINT8 * srcptr; + + status = LM_STATUS_SUCCESS; + + while( size > 0 ) + { + /* Make sure the read is word aligned. */ + value32 = offset & 0x3; + if( value32 ) + { + bytecnt = sizeof(LM_UINT32) - value32; + offset -= value32; + srcptr = (LM_UINT8 *)(&value32) + value32; + } + else + { + bytecnt = sizeof(LM_UINT32); + srcptr = (LM_UINT8 *)(&value32); + } + + if( bytecnt > size ) + { + bytecnt = size; + } + + if( T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700 && + T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701 ) + { + status = LM_NVRAM_Read_UINT32( pDevice, offset, &value32 ); + } + else + { + status = LM_EEPROM_Read_UINT32( pDevice, offset, &value32 ); + } + + if( status != LM_STATUS_SUCCESS ) + { + break; + } + + memcpy( data, srcptr, bytecnt ); + + offset += sizeof(LM_UINT32); + data += bytecnt; + size -= bytecnt; + } + + return status; +} /* LM_NVRAM_ReadBlock */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_VOID +LM_EEPROM_ReadSize( PLM_DEVICE_BLOCK pDevice, LM_UINT32 * size ) +{ + LM_UINT32 cursize; + LM_UINT32 value32; + LM_STATUS status; + + /* + * Initialize the chipsize to the largest EEPROM size we support. + * This will intentionally restrict our sizing operations to the + * first EEPROM chip. + */ + pDevice->flashinfo.chipsize = ATMEL_AT24C512_CHIP_SIZE; + + value32 = 0; + + /* If anything fails, use the smallest chip as the default chip size. */ + cursize = ATMEL_AT24C64_CHIP_SIZE; + + status = LM_NvramRead(pDevice, 0, &value32); + if( status != LM_STATUS_SUCCESS ) + { + goto done; + } + + value32 = MM_SWAP_BE32(value32); + if( value32 != 0x669955aa ) + { + goto done; + } + + /* + * Size the chip by reading offsets at increasing powers of two. + * When we encounter our validation signature, we know the addressing + * has wrapped around, and thus have our chip size. + */ + while( cursize < ATMEL_AT24C64_CHIP_SIZE ) + { + status = LM_NvramRead(pDevice, cursize, &value32); + if( status != LM_STATUS_SUCCESS ) + { + cursize = ATMEL_AT24C64_CHIP_SIZE; + break; + } + + value32 = MM_SWAP_BE32(value32); + if( value32 == 0x669955aa ) + { + break; + } + cursize <<= 1; + } + +done: + + *size = cursize; + pDevice->flashinfo.pagesize = cursize; + + +} /* LM_EEPROM_ReadSize */ + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_FLASH_Atmel_Buffered_ReadSize( PLM_DEVICE_BLOCK pDevice, LM_UINT32 * size ) +{ + LM_UINT32 config3; + LM_UINT32 value32; + LM_STATUS status; + + /* Temporarily replace the read command with a "read ID" command. */ + config3 = REG_RD( pDevice, Nvram.Config3 ); + value32 = config3 & ~NVRAM_READ_COMMAND(NVRAM_COMMAND_MASK); + value32 |= NVRAM_READ_COMMAND(0x57); + REG_WR( pDevice, Nvram.Config3, value32 ); + + REG_WR( pDevice, Nvram.Addr, 0x0 ); + + status = LM_NVRAM_Read_UINT32(pDevice, 0x0, &value32); + + /* Restore the original read command. */ + REG_WR( pDevice, Nvram.Config3, config3 ); + if( status == LM_STATUS_SUCCESS ) + { + switch( value32 & 0x3c ) + { + case 0x0c: + *size = (1 * (1<<20))/8; + break; + case 0x14: + *size = (2 * (1<<20))/8; + break; + case 0x1c: + *size = (4 * (1<<20))/8; + break; + case 0x24: + *size = (8 * (1<<20))/8; + break; + } + } + + return status; +} /* LM_FLASH_Atmel_Buffered_ReadSize */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_FLASH_ST_ReadSize( PLM_DEVICE_BLOCK pDevice, LM_UINT32 * size ) +{ + LM_STATUS status; + LM_UINT32 i; + LM_UINT32 ctrlreg; + LM_UINT32 value32; + LM_UINT32 config1; + + /* We need to get the size through pass-thru mode. */ + config1 = REG_RD( pDevice, Nvram.Config1 ); + value32 = config1 | FLASH_PASS_THRU_MODE; + REG_WR( pDevice, Nvram.Config1, value32 ); + + /* Issue the "read ID" command. */ + REG_WR( pDevice, Nvram.WriteData, 0x9f ); + + ctrlreg = NVRAM_CMD_DO_IT | NVRAM_CMD_DONE | NVRAM_CMD_FIRST | NVRAM_CMD_WR; + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + goto done; + } + + /* Read in the "read ID" response. */ + ctrlreg = NVRAM_CMD_DO_IT | NVRAM_CMD_DONE; + + /* Discard the first three bytes. */ + for( i = 0; i < 2; i++ ) + { + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + goto done; + } + + value32 = REG_RD(pDevice, Nvram.ReadData); + } + + ctrlreg |= NVRAM_CMD_LAST; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_SUCCESS ) + { + value32 = REG_RD(pDevice, Nvram.ReadData) & 0xff; + switch( value32 ) + { + case 0x11: + *size = (1 * (1<<20)) / 8; + break; + case 0x12: + *size = (2 * (1<<20)) / 8; + break; + case 0x13: + *size = (4 * (1<<20)) / 8; + break; + case 0x14: + *size = (8 * (1<<20)) / 8; + break; + } + } + +done: + + /* Restore the previous flash mode. */ + REG_WR( pDevice, Nvram.Config1, config1 ); + + return status; +} /* LM_FLASH_ST_ReadSize */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_FLASH_Saifun_ReadSize( PLM_DEVICE_BLOCK pDevice, LM_UINT32 * size ) +{ + LM_UINT32 config3; + LM_UINT32 value32; + LM_STATUS status; + + /* Temporarily replace the read command with a "read ID" command. */ + config3 = REG_RD( pDevice, Nvram.Config3 ); + value32 = config3 & ~NVRAM_READ_COMMAND(NVRAM_COMMAND_MASK); + value32 |= NVRAM_READ_COMMAND(0xab); + REG_WR( pDevice, Nvram.Config3, value32 ); + + REG_WR( pDevice, Nvram.Addr, 0x0 ); + + status = LM_NVRAM_Read_UINT32(pDevice, 0x0, &value32); + + /* Restore the original read command. */ + REG_WR( pDevice, Nvram.Config3, config3 ); + + if( status == LM_STATUS_SUCCESS ) + { + switch( value32 & 0xff ) + { + case 0x05: + *size = (512 * (1<<10)/8); + break; + case 0x10: + *size = (1 * (1<<20)/8); + break; + case 0x11: + *size = (2 * (1<<20)/8); + break; + } + } + + return status; +} /* LM_FLASH_Saifun_ReadSize */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_FLASH_ReadSize( PLM_DEVICE_BLOCK pDevice, LM_UINT32 * size ) +{ + LM_UINT32 value32; + LM_STATUS status; + + status = LM_NVRAM_AcquireLock( pDevice ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD( pDevice, Nvram.NvmAccess ); + value32 |= NVRAM_ACCESS_ENABLE | NVRAM_ACCESS_WRITE_ENABLE; + REG_WR( pDevice, Nvram.NvmAccess, value32 ); + } + } + + switch( pDevice->flashinfo.jedecnum ) + { + case JEDEC_ST: + status = LM_FLASH_ST_ReadSize( pDevice, size ); + break; + case JEDEC_ATMEL: + if( pDevice->flashinfo.buffered == TRUE ) + { + status = LM_FLASH_Atmel_Buffered_ReadSize( pDevice, size ); + } + else + { + status = LM_STATUS_FAILURE; + } + break; + case JEDEC_SAIFUN: + status = LM_FLASH_Saifun_ReadSize( pDevice, size ); + break; + case JEDEC_SST: + default: + status = LM_STATUS_FAILURE; + } + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD( pDevice, Nvram.NvmAccess ); + value32 &= ~(NVRAM_ACCESS_ENABLE | NVRAM_ACCESS_WRITE_ENABLE); + REG_WR( pDevice, Nvram.NvmAccess, value32 ); + } + } + + LM_NVRAM_ReleaseLock( pDevice ); + + return status; +} /* LM_FLASH_ReadSize */ + +STATIC LM_VOID LM_NVRAM_Detect_570X( PLM_DEVICE_BLOCK pDevice ) +{ + LM_UINT32 value32; + + value32 = REG_RD(pDevice, Nvram.Config1); + + if( (value32 & FLASH_INTERFACE_ENABLE) == 0 ) + { + pDevice->flashinfo.romtype = ROM_TYPE_EEPROM; + } + else + { + /* + * 5705 and older products do not have bits 24 and 25 defined. + * If we've gotten here, then we can guarantee the flash is + * an Atmel AT45DB011DB. + */ + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE; + pDevice->flashinfo.buffered = TRUE; + } +} /* LM_NVRAM_Detect_570X */ + +STATIC LM_VOID LM_NVRAM_Detect_5750( PLM_DEVICE_BLOCK pDevice ) +{ + LM_UINT32 value32; + + value32 = REG_RD(pDevice, Nvram.Config1); + + if( (value32 & FLASH_INTERFACE_ENABLE) == 0 ) + { + pDevice->flashinfo.romtype = ROM_TYPE_EEPROM; + return; + } + + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + + switch( value32 & FLASH_PART_5750_TYPEMASK ) + { + case FLASH_VENDOR_ATMEL_FLASH_BUFFERED: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE; + pDevice->flashinfo.buffered = TRUE; + break; + case FLASH_VENDOR_ATMEL_FLASH_UNBUFFERED: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.pagesize = ATMEL_AT25F512_PAGE_SIZE; + pDevice->flashinfo.buffered = FALSE; + break; + case FLASH_VENDOR_ST: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.pagesize = ST_M45PEX0_PAGE_SIZE; + pDevice->flashinfo.buffered = TRUE; + break; + case FLASH_VENDOR_SAIFUN: + pDevice->flashinfo.jedecnum = JEDEC_SAIFUN; + pDevice->flashinfo.pagesize = SAIFUN_SA25F0XX_PAGE_SIZE; + pDevice->flashinfo.buffered = FALSE; + break; + case FLASH_VENDOR_SST_SMALL: + case FLASH_VENDOR_SST_LARGE: + pDevice->flashinfo.jedecnum = JEDEC_SST; + pDevice->flashinfo.pagesize = SST_25VF0X0_PAGE_SIZE; + pDevice->flashinfo.buffered = FALSE; + break; + default: + printk( KERN_ALERT "bcm5700 : Unknown NVRAM type.\n" ); + pDevice->flashinfo.jedecnum = 0; + pDevice->flashinfo.romtype = 0; + pDevice->flashinfo.buffered = FALSE; + pDevice->flashinfo.pagesize = 0; + } +} /* LM_NVRAM_Detect_5750 */ + +STATIC LM_VOID LM_NVRAM_Detect_5752( PLM_DEVICE_BLOCK pDevice ) +{ + LM_BOOL supported; + LM_UINT32 value32; + + supported = FALSE; + + value32 = REG_RD(pDevice, Nvram.Config1); + + if(value32 & BIT_27) + pDevice->Flags |= PROTECTED_NVRAM_FLAG; + + switch( value32 & FLASH_PART_5752_TYPEMASK ) + { + case FLASH_PART_5752_EEPROM_ATMEL_64K: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.romtype = ROM_TYPE_EEPROM; + pDevice->flashinfo.buffered = FALSE; + pDevice->flashinfo.chipsize = (64 * (1<<10)/8); + supported = TRUE; + break; + + case FLASH_PART_5752_EEPROM_ATMEL_376K: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.romtype = ROM_TYPE_EEPROM; + pDevice->flashinfo.buffered = FALSE; + pDevice->flashinfo.chipsize = (512 * (1<<10)/8); + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ATMEL_AT45DB041: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (4 * (1<<20)) / 8; + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ATMEL_AT25F512: + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = FALSE; + pDevice->flashinfo.chipsize = (512 * (1<<10)/8); + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ST_M25P10A: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (1 * (1<<20)) / 8; + supported = TRUE; + break; + case FLASH_PART_5752_FLASH_ST_M25P05A: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (512 * (1<<10)/8); + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ST_M45PE10: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (1 * (1<<20)) / 8; + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ST_M45PE20: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (2 * (1<<20)) / 8; + supported = TRUE; + break; + + case FLASH_PART_5752_FLASH_ST_M45PE40: + pDevice->flashinfo.jedecnum = JEDEC_ST; + pDevice->flashinfo.romtype = ROM_TYPE_FLASH; + pDevice->flashinfo.buffered = TRUE; + pDevice->flashinfo.chipsize = (4 * (1<<20)) / 8; + supported = TRUE; + break; + default: + printk( KERN_ALERT "bcm5700 : Unknown NVRAM type.\n" ); + } + + if( pDevice->flashinfo.romtype == ROM_TYPE_FLASH ) + { + switch( value32 & FLASH_PART_5752_PAGEMASK ) + { + case FLASH_PART_5752_PAGE_SIZE_256B: + pDevice->flashinfo.pagesize = 256; + break; + case FLASH_PART_5752_PAGE_SIZE_512B: + pDevice->flashinfo.pagesize = 512; + break; + case FLASH_PART_5752_PAGE_SIZE_1K: + pDevice->flashinfo.pagesize = 1024; + break; + case FLASH_PART_5752_PAGE_SIZE_2K: + pDevice->flashinfo.pagesize = 2048; + break; + case FLASH_PART_5752_PAGE_SIZE_4K: + pDevice->flashinfo.pagesize = 4096; + break; + case FLASH_PART_5752_PAGE_SIZE_264B: + pDevice->flashinfo.pagesize = 264; + break; + default: + printk( KERN_ALERT "bcm5700 : Unknown NVRAM page size.\n" ); + supported = FALSE; + } + } + + if( supported != TRUE ) + { + printk( KERN_ALERT "Flash type unsupported!!!\n" ); + pDevice->flashinfo.jedecnum = 0; + pDevice->flashinfo.romtype = 0; + pDevice->flashinfo.buffered = FALSE; + pDevice->flashinfo.pagesize = 0; + } + + +} /* LM_NVRAM_Detect_5752 */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_VOID LM_NVRAM_Init( PLM_DEVICE_BLOCK pDevice ) +{ + LM_UINT32 Value32; + + pDevice->NvramSize = 0; + + /* Intialize clock period and state machine. */ + Value32 = SEEPROM_ADDR_CLK_PERD(SEEPROM_CLOCK_PERIOD) | + SEEPROM_ADDR_FSM_RESET; + REG_WR(pDevice, Grc.EepromAddr, Value32); + REG_RD_BACK(pDevice, Grc.EepromAddr); + + MM_Wait(100); + + /* Serial eeprom access using the Grc.EepromAddr/EepromData registers. */ + Value32 = REG_RD(pDevice, Grc.LocalCtrl); + REG_WR(pDevice, Grc.LocalCtrl, Value32 | GRC_MISC_LOCAL_CTRL_AUTO_SEEPROM); + + switch( T3_ASIC_REV(pDevice->ChipRevId) ) + { + case T3_ASIC_REV_5700: + case T3_ASIC_REV_5701: + pDevice->flashinfo.romtype = ROM_TYPE_EEPROM; + break; + case T3_ASIC_REV_5752: + LM_NVRAM_Detect_5752(pDevice); + break; + case T3_ASIC_REV_5714_A0: + case T3_ASIC_REV_5780: + case T3_ASIC_REV_5714: + case T3_ASIC_REV_5750: + LM_NVRAM_Detect_5750(pDevice); + break; + default: + LM_NVRAM_Detect_570X(pDevice); + } + + /* Set the 5701 compatibility mode if we are using EEPROM. */ + if( T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700 && + T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701 && + pDevice->flashinfo.romtype == ROM_TYPE_EEPROM ) + { + Value32 = REG_RD(pDevice, Nvram.Config1); + + if( T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + REG_WR(pDevice, Nvram.NvmAccess, + REG_RD(pDevice, Nvram.NvmAccess) | ACCESS_EN); + } + } + + /* Use the new interface to read EEPROM. */ + Value32 &= ~FLASH_COMPAT_BYPASS; + + REG_WR(pDevice, Nvram.Config1, Value32); + + if( T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + REG_WR(pDevice, Nvram.NvmAccess, + REG_RD(pDevice, Nvram.NvmAccess) & ~ACCESS_EN); + } + } + } + + if( !(T3_ASIC_5752(pDevice->ChipRevId)) ) + { + if( pDevice->flashinfo.romtype == ROM_TYPE_EEPROM ) + { + /* The only EEPROM we support is an ATMEL */ + pDevice->flashinfo.jedecnum = JEDEC_ATMEL; + pDevice->flashinfo.pagesize = 0; + pDevice->flashinfo.buffered = FALSE; + + LM_EEPROM_ReadSize( pDevice, &pDevice->flashinfo.chipsize ); + } + else + { + LM_FLASH_ReadSize( pDevice, &pDevice->flashinfo.chipsize ); + pDevice->Flags |= FLASH_DETECTED_FLAG; + } + } + + pDevice->NvramSize = pDevice->flashinfo.chipsize; + +//printk(KERN_ALERT "*nvram:size=0x%x jnum=0x%x page=0x%x buff=0x%x \n",pDevice->NvramSize,pDevice->flashinfo.jedecnum,pDevice->flashinfo.pagesize,pDevice->flashinfo.buffered); + +} /* LM_NVRAM_Init */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_NvramRead( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, LM_UINT32 * data ) +{ + LM_UINT32 value32; + LM_STATUS status; + + if( offset >= pDevice->flashinfo.chipsize ) + { + return LM_STATUS_FAILURE; + } + + if( T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 ) + { + status = LM_EEPROM_Read_UINT32( pDevice, offset, data ); + } + else + { + status = LM_NVRAM_AcquireLock( pDevice ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD( pDevice, Nvram.NvmAccess ); + value32 |= NVRAM_ACCESS_ENABLE; + REG_WR( pDevice, Nvram.NvmAccess, value32 ); + } + } + + status = LM_NVRAM_Read_UINT32(pDevice, offset, data); + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD( pDevice, Nvram.NvmAccess ); + value32 &= ~NVRAM_ACCESS_ENABLE; + REG_WR( pDevice, Nvram.NvmAccess, value32 ); + } + } + + LM_NVRAM_ReleaseLock( pDevice ); + } + + return status; +} /* LM_NvramRead */ + + + +#ifdef ETHTOOL_SEEPROM + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_EEPROM_WriteBlock( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT8 * data, LM_UINT32 size ) +{ + LM_UINT8 * dstptr; + LM_UINT32 value32; + LM_UINT32 bytecnt; + LM_UINT32 subword1; + LM_UINT32 subword2; + LM_UINT32 Addr; + LM_UINT32 Dev; + LM_STATUS status; + + if( offset > pDevice->flashinfo.chipsize ) + { + return LM_STATUS_FAILURE; + } + + status = LM_STATUS_SUCCESS; + + if( size == 0 ) + { + return status; + } + + if( offset & 0x3 ) + { + /* + * If our initial offset does not fall on a word boundary, we + * have to do a read / modify / write to preserve the + * preceding bits we are not interested in. + */ + status = LM_EEPROM_Read_UINT32(pDevice, offset & ~0x3, &subword1); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + } + + if( (offset + size) & 0x3 ) + { + /* + * Likewise, if our ending offset does not fall on a word + * boundary, we have to do a read / modify / write to + * preserve the trailing bits we are not interested in. + */ + status = LM_EEPROM_Read_UINT32( pDevice, (offset + size) & ~0x3, + &subword2 ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + } + + /* Enable EEPROM write. */ + if( pDevice->Flags & EEPROM_WP_FLAG ) + { + REG_WR( pDevice, Grc.LocalCtrl, + pDevice->GrcLocalCtrl | GRC_MISC_LOCAL_CTRL_GPIO_OE1 ); + REG_RD_BACK( pDevice, Grc.LocalCtrl ); + MM_Wait(40); + + value32 = REG_RD( pDevice, Grc.LocalCtrl ); + if( value32 & GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 ) + { + return LM_STATUS_FAILURE; + } + } + + while( size > 0 ) + { + value32 = offset & 0x3; + if( value32 ) + { + /* + * We have to read / modify / write the data to + * preserve the flash contents preceding the offset. + */ + offset &= ~0x3; + + dstptr = ((LM_UINT8 *)(&value32)) + value32; + bytecnt = sizeof(LM_UINT32) - value32; + value32 = subword1; + } + else if( size < sizeof(LM_UINT32) ) + { + dstptr = (LM_UINT8 *)(&value32); + bytecnt = size; + value32 = subword2; + } + else + { + dstptr = (LM_UINT8 *)(&value32); + bytecnt = sizeof(LM_UINT32); + } + + if( size < bytecnt ) + { + bytecnt = size; + } + + memcpy( dstptr, (void *)data, bytecnt ); + + data += bytecnt; + size -= bytecnt; + + /* + * Swap the data so that the byte stream will be + * written the same in little and big endian systems. + */ + value32 = MM_SWAP_LE32(value32); + + /* Set the write value to the eeprom */ + REG_WR( pDevice, Grc.EepromData, value32 ); + + Dev = offset / pDevice->flashinfo.chipsize; + Addr = offset % pDevice->flashinfo.chipsize; + + value32 = REG_RD( pDevice, Grc.EepromAddr ); + value32 &= ~(SEEPROM_ADDR_DEV_ID_MASK | SEEPROM_ADDR_ADDRESS_MASK | + SEEPROM_ADDR_RW_MASK); + value32 |= SEEPROM_ADDR_DEV_ID(Dev) | SEEPROM_ADDR_ADDRESS(Addr) | + SEEPROM_ADDR_START | SEEPROM_ADDR_WRITE; + + status = LM_EEPROM_ExecuteCommand( pDevice, value32 ); + if( status != LM_STATUS_SUCCESS ) + { + break; + } + + offset += sizeof(LM_UINT32); + } + + /* Write-protect EEPROM. */ + if( pDevice->Flags & EEPROM_WP_FLAG ) + { + REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + REG_RD_BACK(pDevice, Grc.LocalCtrl); + MM_Wait(40); + } + + return status; +} /* LM_EEPROM_WriteBlock */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_NVRAM_WriteBlockUnBuffered( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT8 * data, LM_UINT32 size ) +{ + LM_UINT i; + LM_STATUS status; + LM_UINT32 tgtoff; + LM_UINT32 value32; + LM_UINT32 ctrlreg; + LM_UINT32 pagesize; + LM_UINT32 pagemask; + LM_UINT32 physaddr; + + /* Cache the pagesize. */ + pagesize = pDevice->flashinfo.pagesize; + + if( pDevice->flashinfo.jedecnum == JEDEC_SAIFUN ) + { + /* Config2 = 0x500d8 */ + /* Config3 = 0x3840253 */ + /* Write1 = 0xaf000400 */ + + /* Configure the erase command to be "page erase". */ + /* Configure the status command to be "read status register". */ + value32 = REG_RD( pDevice, Nvram.Config2 ); + value32 &= ~(NVRAM_STATUS_COMMAND( NVRAM_COMMAND_MASK ) | + NVRAM_ERASE_COMMAND( NVRAM_COMMAND_MASK )); + value32 |= NVRAM_STATUS_COMMAND( SAIFUN_SA25F0XX_READ_STATUS_CMD ) | + NVRAM_ERASE_COMMAND( SAIFUN_SA25F0XX_PAGE_ERASE_CMD ); + REG_WR( pDevice, Nvram.Config2, value32 ); + + /* Configure the write command to be "page write". */ + value32 = REG_RD( pDevice, Nvram.Config3 ); + value32 &= ~NVRAM_WRITE_UNBUFFERED_COMMAND( NVRAM_COMMAND_MASK ); + value32 |= NVRAM_WRITE_UNBUFFERED_COMMAND( SAIFUN_SA25F0XX_PAGE_WRITE_CMD ); + REG_WR( pDevice, Nvram.Config3, value32 ); + + /* Make sure the "write enable" command is correct. */ + value32 = REG_RD( pDevice, Nvram.Write1 ); + value32 &= ~NVRAM_WRITE1_WRENA_CMD( NVRAM_COMMAND_MASK ); + value32 |= NVRAM_WRITE1_WRENA_CMD( SAIFUN_SA25F0XX_WRENA_CMD ); + REG_WR( pDevice, Nvram.Write1, value32 ); + + pagemask = SAIFUN_SA25F0XX_PAGE_MASK; + } + else + { + /* Unsupported flash type */ + return LM_STATUS_FAILURE; + } + + if( size == 0 ) + { + status = LM_STATUS_SUCCESS; + goto done; + } + + while( size > 0 ) + { + /* Align the offset to a page boundary. */ + physaddr = offset & ~pagemask; + + status = LM_NVRAM_ReadBlock( pDevice, physaddr, + pDevice->flashbuffer, + pagesize ); + if( status == LM_STATUS_FAILURE ) + { + break; + } + + /* Calculate the target index. */ + tgtoff = offset & pagemask; + + /* Copy the new data into the save buffer. */ + for( i = tgtoff; i < pagesize && size > 0; i++ ) + { + pDevice->flashbuffer[i] = *data++; + size--; + } + + /* Move the offset to the next page. */ + offset = offset + (pagesize - tgtoff); + + /* + * The LM_NVRAM_ReadBlock() function releases + * the access enable bit. Reacquire it. + */ + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + REG_WR(pDevice, Nvram.NvmAccess, NVRAM_ACCESS_ENABLE); + + + /* + * Before we can erase the flash page, we need + * to issue a special "write enable" command. + */ + ctrlreg = NVRAM_CMD_WRITE_ENABLE | NVRAM_CMD_DO_IT | NVRAM_CMD_DONE; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + break; + } + + /* Erase the target page */ + REG_WR(pDevice, Nvram.Addr, physaddr); + + ctrlreg = NVRAM_CMD_DO_IT | NVRAM_CMD_DONE | NVRAM_CMD_WR | + NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_ERASE; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + break; + } + + /* Issue another write enable to start the write. */ + ctrlreg = NVRAM_CMD_WRITE_ENABLE | NVRAM_CMD_DO_IT | NVRAM_CMD_DONE; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + break; + } + + /* Copy the data into our NIC's buffers. */ + for( i = 0; i < pagesize; i+= 4 ) + { + value32 = *((LM_UINT32 *)(&pDevice->flashbuffer[i])); + value32 = MM_SWAP_BE32( value32 ); + + /* Write the location we wish to write to. */ + REG_WR( pDevice, Nvram.Addr, physaddr ); + + /* Write the data we wish to write. */ + REG_WR( pDevice, Nvram.WriteData, value32 ); + + ctrlreg = NVRAM_CMD_DO_IT | NVRAM_CMD_DONE | NVRAM_CMD_WR; + + if( i == 0 ) + { + ctrlreg |= NVRAM_CMD_FIRST; + } + else if( i == (pagesize - 4) ) + { + ctrlreg |= NVRAM_CMD_LAST; + } + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + size = 0; + break; + } + + physaddr += sizeof(LM_UINT32); + } + } + + /* Paranoia. Turn off the "write enable" flag. */ + ctrlreg = NVRAM_CMD_WRITE_DISABLE | NVRAM_CMD_DO_IT | NVRAM_CMD_DONE; + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + +done: + + return status; +} /* LM_NVRAM_WriteBlockUnBuffered */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_NVRAM_WriteBlockBuffered( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT8 * data, LM_UINT32 size ) +{ + LM_STATUS status; + LM_UINT32 value32; + LM_UINT32 bytecnt; + LM_UINT32 ctrlreg; + LM_UINT32 pageoff; + LM_UINT32 physaddr; + LM_UINT32 subword1; + LM_UINT32 subword2; + LM_UINT8 * dstptr; + + if(T3_ASIC_5752(pDevice->ChipRevId) && + (pDevice->flashinfo.jedecnum == JEDEC_ST || + pDevice->flashinfo.jedecnum == JEDEC_ATMEL )) + { + /* Do nothing as the 5752 does will take care of it */ + } + else if( pDevice->flashinfo.jedecnum == JEDEC_ST ) + { + /* + * Program our chip to look at bit0 of the NVRAM's status + * register when polling the write or erase operation status. + */ + value32 = REG_RD(pDevice, Nvram.Config1); + value32 &= ~FLASH_STATUS_BITS_MASK; + REG_WR( pDevice, Nvram.Config1, value32 ); + + /* Program the "read status" and "page erase" commands. */ + value32 = NVRAM_STATUS_COMMAND( ST_M45PEX0_READ_STATUS_CMD ) | + NVRAM_ERASE_COMMAND( ST_M45PEX0_PAGE_ERASE_CMD ); + REG_WR( pDevice, Nvram.Config2, value32 ); + + /* Set the write command to be "page program". */ + value32 = REG_RD(pDevice, Nvram.Config3); /* default = 0x03840a53 */ + value32 &= ~NVRAM_WRITE_UNBUFFERED_COMMAND( NVRAM_COMMAND_MASK ); + value32 |= NVRAM_WRITE_UNBUFFERED_COMMAND( ST_M45PEX0_PAGE_PRGM_CMD ); + REG_WR( pDevice, Nvram.Config3, value32 ); + + /* Set the "write enable" and "write disable" commands. */ + value32 = NVRAM_WRITE1_WRENA_CMD( ST_M45PEX0_WRENA_CMD ) | + NVRAM_WRITE1_WRDIS_CMD( ST_M45PEX0_WRDIS_CMD ); + REG_WR( pDevice, Nvram.Write1, value32 ); + } + else if( pDevice->flashinfo.jedecnum == JEDEC_ATMEL ) + { + if( pDevice->flashinfo.romtype == ROM_TYPE_EEPROM ) + { + #if 0 + Config1 = 0x2008200 + Config2 = 0x9f0081 + Config3 = 0xa184a053 + Write1 = 0xaf000400 + #endif + } + else if( pDevice->flashinfo.buffered == TRUE ) + { + /* + * Program our chip to look at bit7 of the NVRAM's status + * register when polling the write operation status. + */ + value32 = REG_RD(pDevice, Nvram.Config1); + value32 |= FLASH_STATUS_BITS_MASK; + REG_WR( pDevice, Nvram.Config1, value32 ); + + /* Set the write command to be "page program". */ + value32 = REG_RD(pDevice, Nvram.Config3); /* default = 0x03840a53 */ + value32 &= ~NVRAM_WRITE_UNBUFFERED_COMMAND( NVRAM_COMMAND_MASK ); + value32 |= NVRAM_WRITE_UNBUFFERED_COMMAND( ATMEL_AT45DB0X1B_BUFFER_WRITE_CMD ); + REG_WR( pDevice, Nvram.Config3, value32 ); + /* Config1 = 0x2008273 */ + /* Config2 = 0x00570081 */ + /* Config3 = 0x68848353 */ + } + else + { + /* NVRAM type unsupported. */ + return LM_STATUS_FAILURE; + } + } + else + { + /* NVRAM type unsupported. */ + return LM_STATUS_FAILURE; + } + + status = LM_STATUS_SUCCESS; + + if( offset & 0x3 ) + { + /* + * If our initial offset does not fall on a word boundary, we + * have to do a read / modify / write to preserve the + * preceding bits we are not interested in. + */ + status = LM_NVRAM_ReadBlock( pDevice, offset & ~0x3, + (LM_UINT8 *)&subword1, + sizeof(subword1) ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + } + + if( (offset + size) & 0x3 ) + { + /* + * Likewise, if our ending offset does not fall on a word + * boundary, we have to do a read / modify / write to + * preserve the trailing bits we are not interested in. + */ + status = LM_NVRAM_ReadBlock( pDevice, (offset + size) & ~0x3, + (LM_UINT8 *)&subword2, + sizeof(subword2) ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + } + + ctrlreg = NVRAM_CMD_FIRST; + + while( size > 0 ) + { + value32 = offset & 0x3; + if( value32 ) + { + /* + * We have to read / modify / write the data to + * preserve the flash contents preceding the offset. + */ + offset &= ~0x3; + + dstptr = ((LM_UINT8 *)(&value32)) + value32; + bytecnt = sizeof(LM_UINT32) - value32; + value32 = subword1; + } + else if( size < sizeof(LM_UINT32) ) + { + dstptr = (LM_UINT8 *)(&value32); + bytecnt = size; + value32 = subword2; + } + else + { + dstptr = (LM_UINT8 *)(&value32); + bytecnt = sizeof(LM_UINT32); + } + + if( size < bytecnt ) + { + bytecnt = size; + } + + memcpy( dstptr, (void *)data, bytecnt ); + + data += bytecnt; + size -= bytecnt; + + /* + * Swap the data so that the byte stream will be + * written the same in little and big endian systems. + */ + value32 = MM_SWAP_BE32(value32); + + /* Set the desired write data value to the flash. */ + REG_WR(pDevice, Nvram.WriteData, value32); + + pageoff = offset % pDevice->flashinfo.pagesize; + + /* Set the target address. */ + if( pDevice->flashinfo.jedecnum == JEDEC_ATMEL && + pDevice->flashinfo.romtype == ROM_TYPE_FLASH ) + { + /* + * If we're dealing with the special ATMEL part, we need to + * convert the submitted offset before it can be considered + * a physical address. + */ + LM_UINT32 pagenmbr; + + pagenmbr = offset / pDevice->flashinfo.pagesize; + pagenmbr = pagenmbr << ATMEL_AT45DB0X1B_PAGE_POS; + + physaddr = pagenmbr + pageoff; + } + else + { + physaddr = offset; + } + + REG_WR(pDevice, Nvram.Addr, physaddr); + + ctrlreg |= (NVRAM_CMD_DO_IT | NVRAM_CMD_DONE | NVRAM_CMD_WR); + + if( pageoff == 0 ) + { + /* Set CMD_FIRST when we are at the beginning of a page. */ + ctrlreg |= NVRAM_CMD_FIRST; + } + else if( pageoff == (pDevice->flashinfo.pagesize - 4) ) + { + /* + * Enable the write to the current page + * before moving on to the next one. + */ + ctrlreg |= NVRAM_CMD_LAST; + } + + if( size == 0 ) + { + ctrlreg |= NVRAM_CMD_LAST; + } + + if( pDevice->flashinfo.jedecnum == JEDEC_ST && + ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5750) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5714)) && + (ctrlreg & NVRAM_CMD_FIRST) ) + { + LM_UINT32 wrencmd; + + REG_WR(pDevice, Nvram.Write1, ST_M45PEX0_WRENA_CMD); + + /* We need to issue a special "write enable" command first. */ + wrencmd = NVRAM_CMD_WRITE_ENABLE | NVRAM_CMD_DO_IT | NVRAM_CMD_DONE; + + status = LM_NVRAM_ExecuteCommand( pDevice, wrencmd ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + } + + if( pDevice->flashinfo.romtype == ROM_TYPE_EEPROM ) + { + /* We always do complete word writes to eeprom. */ + ctrlreg |= (NVRAM_CMD_FIRST | NVRAM_CMD_LAST); + } + + status = LM_NVRAM_ExecuteCommand( pDevice, ctrlreg ); + if( status == LM_STATUS_FAILURE ) + { + break; + } + + offset += sizeof(LM_UINT32); + ctrlreg = 0; + } + + return status; +} /* LM_NVRAM_WriteBlockBuffered */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS LM_NVRAM_WriteBlock( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT8 * data, LM_UINT32 size ) +{ + LM_UINT32 value32; + LM_STATUS status; + + if( offset > pDevice->flashinfo.chipsize || + (offset + size) > pDevice->flashinfo.chipsize ) + { + return LM_STATUS_FAILURE; + } + + if( size == 0 ) + { + return LM_STATUS_SUCCESS; + } + + if( T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 ) + { + status = LM_EEPROM_WriteBlock( pDevice, offset, data, size ); + } + else + { + status = LM_NVRAM_AcquireLock( pDevice ); + if( status == LM_STATUS_FAILURE ) + { + return status; + } + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD( pDevice, Nvram.NvmAccess ); + value32 |= (NVRAM_ACCESS_ENABLE | NVRAM_ACCESS_WRITE_ENABLE); + REG_WR( pDevice, Nvram.NvmAccess, value32 ); + } + } + + /* Enable EEPROM write. */ + if( pDevice->Flags & EEPROM_WP_FLAG ) + { + REG_WR(pDevice, Grc.LocalCtrl, + pDevice->GrcLocalCtrl | GRC_MISC_LOCAL_CTRL_GPIO_OE1); + REG_RD_BACK(pDevice, Grc.LocalCtrl); + MM_Wait(40); + + value32 = REG_RD(pDevice, Grc.LocalCtrl); + if( value32 & GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 ) + { + status = LM_STATUS_FAILURE; + goto error; + } + } + + value32 = REG_RD(pDevice, Grc.Mode); + value32 |= GRC_MODE_NVRAM_WRITE_ENABLE; + REG_WR(pDevice, Grc.Mode, value32); + + if( pDevice->flashinfo.buffered == TRUE || + pDevice->flashinfo.romtype == ROM_TYPE_EEPROM ) + { + status = LM_NVRAM_WriteBlockBuffered(pDevice, offset, data, size); + } + else + { + status = LM_NVRAM_WriteBlockUnBuffered(pDevice, offset, data, size); + } + + value32 = REG_RD(pDevice, Grc.Mode); + value32 &= ~GRC_MODE_NVRAM_WRITE_ENABLE; + REG_WR(pDevice, Grc.Mode, value32); + + if( pDevice->Flags & EEPROM_WP_FLAG ) + { + REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + REG_RD_BACK(pDevice, Grc.LocalCtrl); + MM_Wait(40); + } + +error: + + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + if( (pDevice->Flags & PROTECTED_NVRAM_FLAG) == 0) + { + value32 = REG_RD(pDevice, Nvram.NvmAccess); + value32 &= ~(NVRAM_ACCESS_ENABLE | NVRAM_ACCESS_WRITE_ENABLE); + REG_WR(pDevice, Nvram.NvmAccess, value32); + } + } + + LM_NVRAM_ReleaseLock( pDevice ); + } + + return status; +} /* LM_NVRAM_WriteBlock */ + + +LM_STATUS LM_NvramWriteBlock( PLM_DEVICE_BLOCK pDevice, LM_UINT32 offset, + LM_UINT32 * data, LM_UINT32 size ) +{ + return LM_NVRAM_WriteBlock( pDevice, offset, (LM_UINT8 *)data, size * 4 ); +} + +#endif /* ETHTOOL_SEEPROM */ + + +STATIC void +LM_ReadVPD(PLM_DEVICE_BLOCK pDevice) +{ +#ifdef BCM_PROC_FS + LM_UINT32 Vpd_arr[256/4]; + LM_UINT8 *Vpd = (LM_UINT8 *) &Vpd_arr[0]; + LM_UINT32 *Vpd_dptr = &Vpd_arr[0]; + LM_UINT32 Value32; + unsigned int j; + + /* Read PN from VPD */ + for (j = 0; j < 256; j += 4, Vpd_dptr++ ) + { + if (LM_NvramRead(pDevice, 0x100 + j, &Value32) != LM_STATUS_SUCCESS) { + printf("VPD read failed\n"); + return; + } + *Vpd_dptr = Value32; + } + for (j = 0; j < 256; ) + { + unsigned int Vpd_r_len; + unsigned int Vpd_r_end; + + if ((Vpd[j] == 0x82) || (Vpd[j] == 0x91)) + { + j = j + 3 + Vpd[j + 1] + (Vpd[j + 2] << 8); + } + else if (Vpd[j] == 0x90) + { + Vpd_r_len = Vpd[j + 1] + (Vpd[j + 2] << 8); + j += 3; + Vpd_r_end = Vpd_r_len + j; + while (j < Vpd_r_end) + { + if ((Vpd[j] == 'P') && (Vpd[j + 1] == 'N')) + { + unsigned int len = Vpd[j + 2]; + + if (len <= 24) + { + memcpy(pDevice->PartNo, &Vpd[j + 3], len); + } + break; + } + else + { + if (Vpd[j + 2] == 0) + { + break; + } + j = j + Vpd[j + 2]; + } + } + break; + } + else { + break; + } + } +#endif +} + +STATIC void +LM_ReadBootCodeVersion(PLM_DEVICE_BLOCK pDevice) +{ +#ifdef BCM_PROC_FS + LM_UINT32 Value32, offset, ver_offset, start_addr; + int i; + + if (LM_NvramRead(pDevice, 0x0, &Value32) != LM_STATUS_SUCCESS) + return; + Value32 = MM_SWAP_BE32(Value32); + if (Value32 != 0x669955aa) + return; + if (LM_NvramRead(pDevice, 0xc, &offset) != LM_STATUS_SUCCESS) + return; + + offset = MM_SWAP_BE32(offset); + + if( (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701) && + pDevice->flashinfo.jedecnum == JEDEC_ATMEL && + pDevice->flashinfo.buffered == TRUE ) + { + LM_UINT32 highaddr; + + highaddr = offset >> ATMEL_AT45DB0X1B_PAGE_POS; + highaddr = highaddr * ATMEL_AT45DB0X1B_PAGE_SIZE; + + offset = highaddr + (offset & ATMEL_AT45DB0X1B_PAGE_MASK); + } + if (LM_NvramRead(pDevice, offset, &Value32) != LM_STATUS_SUCCESS) + return; + + Value32 = MM_SWAP_BE32(Value32); + Value32 &= 0xfc000000; + if ((Value32 == 0x0c000000) && + (LM_NvramRead(pDevice, offset + 4, &Value32) == LM_STATUS_SUCCESS) && + (Value32 == 0)) { + + if (LM_NvramRead(pDevice, offset + 8, &ver_offset) != LM_STATUS_SUCCESS) + return; + if (LM_NvramRead(pDevice, 4, &start_addr) != LM_STATUS_SUCCESS) + return; + ver_offset = MM_SWAP_BE32(ver_offset); + start_addr = MM_SWAP_BE32(start_addr); + offset += ver_offset - start_addr; + for (i = 0; i < 16; i += 4) { + if (LM_NvramRead(pDevice, offset + i, &Value32) != + LM_STATUS_SUCCESS) + { + return; + } + memcpy(&(pDevice->BootCodeVer[i]), &Value32, sizeof(Value32)); + } + } + else { + char c; + + if (LM_NvramRead(pDevice, 0x94, &Value32) != LM_STATUS_SUCCESS) + return; + + Value32 = MM_SWAP_BE32(Value32); + i = 0; + c = ((Value32 & 0xff00) >> 8); + + if (c < 10) { + pDevice->BootCodeVer[i++] = c + '0'; + } + else { + pDevice->BootCodeVer[i++] = (c / 10) + '0'; + pDevice->BootCodeVer[i++] = (c % 10) + '0'; + } + pDevice->BootCodeVer[i++] = '.'; + c = Value32 & 0xff; + if (c < 10) { + pDevice->BootCodeVer[i++] = '0'; + pDevice->BootCodeVer[i++] = c + '0'; + } + else { + pDevice->BootCodeVer[i++] = (c / 10) + '0'; + pDevice->BootCodeVer[i++] = (c % 10) + '0'; + } + pDevice->BootCodeVer[i] = 0; + } +#endif +} + +STATIC void +LM_ReadIPMICodeVersion(PLM_DEVICE_BLOCK pDevice) +{ +#ifdef BCM_PROC_FS + static char * present = "BRCM ASF present"; + LM_UINT32 sig1, sig2; + LM_UINT32 value32, offset, asf_offset, ver_offset, start_addr; + int i; + + if (LM_NvramRead(pDevice, 0x0, &value32) != LM_STATUS_SUCCESS) + return; + value32 = MM_SWAP_BE32(value32); + if (value32 != 0x669955aa) + return; + + offset = 0x14 + 4; + for (i = 0; i < 8; i++) { + if (LM_NvramRead(pDevice, offset, &value32) != LM_STATUS_SUCCESS) + return; + value32 = MM_SWAP_BE32(value32) & 0xff000000; + if (value32 == 0x1000000) + break; + offset += 12; + } + + if (i == 8) + return; + + if (LM_NvramRead(pDevice, 0x14 + i * 12, &start_addr) != LM_STATUS_SUCCESS) + return; + + start_addr = MM_SWAP_BE32(start_addr); + + if (start_addr == 0xc0034000) + start_addr = 0x08000000; + + if (LM_NvramRead(pDevice, 0x14 + i * 12 + 8, &asf_offset) != LM_STATUS_SUCCESS) + return; + + asf_offset = MM_SWAP_BE32(asf_offset); + + if (LM_NvramRead(pDevice, asf_offset, &sig1) != LM_STATUS_SUCCESS || + LM_NvramRead(pDevice, asf_offset + 4, &sig2) != LM_STATUS_SUCCESS ) + return; + + sig1 = MM_SWAP_BE32(sig1); + + if ((sig1 & 0xfc000000) != 0x0c000000 || sig2 != 0 ) { + memcpy(pDevice->IPMICodeVer, present, 17); + return; + } + + if (LM_NvramRead(pDevice, asf_offset + 8, &ver_offset) != LM_STATUS_SUCCESS) + return; + + ver_offset = MM_SWAP_BE32(ver_offset); + + ver_offset -= start_addr; + ver_offset += asf_offset; + + for (i = 0; i < 16; i += 4) { + if (LM_NvramRead(pDevice, ver_offset + i, &value32) != LM_STATUS_SUCCESS) + return; + memcpy(&(pDevice->IPMICodeVer[i]), &value32, sizeof(value32)); + } +#endif +} + +STATIC void +LM_GetBusSpeed(PLM_DEVICE_BLOCK pDevice) +{ +#ifdef BCM_PROC_FS + LM_UINT32 PciState = pDevice->PciState; + LM_UINT32 ClockCtrl; + char *SpeedStr = ""; + + if (pDevice->Flags & PCI_EXPRESS_FLAG) + { + strcpy(pDevice->BusSpeedStr, "PCI Express"); + return; + } + if (PciState & T3_PCI_STATE_32BIT_PCI_BUS) + { + strcpy(pDevice->BusSpeedStr, "32-bit "); + } + else + { + strcpy(pDevice->BusSpeedStr, "64-bit "); + } + if (PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE) + { + strcat(pDevice->BusSpeedStr, "PCI "); + if (PciState & T3_PCI_STATE_HIGH_BUS_SPEED) + { + SpeedStr = "66MHz"; + } + else + { + SpeedStr = "33MHz"; + } + } + else + { + strcat(pDevice->BusSpeedStr, "PCIX "); + + // Theses devices have internal PCI-X buses. The driver + // is unable to use the ClockCtrl register to determine the + // bus speed, so we just hardcode the bus speed to 133MHz. + + if ( ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) && + (pDevice->BondId == GRC_MISC_BD_ID_5704CIOBE)) || + (T3_ASIC_5714_FAMILY(pDevice->ChipRevId))) + { + SpeedStr = "133MHz"; + } + else + { + ClockCtrl = pDevice->ClockCtrl & 0x1f; + switch (ClockCtrl) + { + case 0: + SpeedStr = "33MHz"; + break; + + case 2: + SpeedStr = "50MHz"; + break; + + case 4: + SpeedStr = "66MHz"; + break; + + case 6: + SpeedStr = "100MHz"; + break; + + case 7: + SpeedStr = "133MHz"; + break; + } + } + } + strcat(pDevice->BusSpeedStr, SpeedStr); +#endif +} + +/******************************************************************************/ +/* Description: */ +/* This routine initializes default parameters and reads the PCI */ +/* configurations. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_GetAdapterInfo( +PLM_DEVICE_BLOCK pDevice) +{ + PLM_ADAPTER_INFO pAdapterInfo; + LM_UINT32 Value32, LedCfg, Ver; + LM_STATUS Status; + LM_UINT32 EeSigFound; + LM_UINT32 EePhyTypeSerdes = 0; + LM_UINT32 EePhyId = 0; + + /* Get Device Id and Vendor Id */ + Status = MM_ReadConfig32(pDevice, PCI_VENDOR_ID_REG, &Value32); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + pDevice->PciVendorId = (LM_UINT16) Value32; + pDevice->PciDeviceId = (LM_UINT16) (Value32 >> 16); + + Status = MM_ReadConfig32(pDevice, PCI_REV_ID_REG, &Value32); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + pDevice->PciRevId = (LM_UINT8) Value32; + + /* Get chip revision id. */ + Status = MM_ReadConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, &Value32); + pDevice->ChipRevId = Value32 >> 16; + + /* determine if it is PCIE system */ + if( (Value32 = MM_FindCapability(pDevice, T3_PCIE_CAPABILITY_ID)) != 0) + { + pDevice->Flags |= PCI_EXPRESS_FLAG; + } + + /* Get subsystem vendor. */ + Status = MM_ReadConfig32(pDevice, PCI_SUBSYSTEM_VENDOR_ID_REG, &Value32); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + pDevice->SubsystemVendorId = (LM_UINT16) Value32; + + /* Get PCI subsystem id. */ + pDevice->SubsystemId = (LM_UINT16) (Value32 >> 16); + + /* Read bond id for baxter A0 since it has same rev id as hamilton A0*/ + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5714_A0) { + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, Value32 | MISC_HOST_CTRL_ENABLE_INDIRECT_ACCESS); + + Value32 = LM_RegRdInd(pDevice, 0x6804); + Value32 &= GRC_MISC_BD_ID_MASK; + + if((Value32 == 0)||(Value32 == 0x8000)) { + pDevice->ChipRevId = T3_CHIP_ID_5752_A0; + }else{ + pDevice->ChipRevId = T3_CHIP_ID_5714_A0; + } + + Status = MM_ReadConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, &Value32); + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, Value32 & ~ MISC_HOST_CTRL_ENABLE_INDIRECT_ACCESS); + } + + + /* Get the cache line size. */ + MM_ReadConfig32(pDevice, PCI_CACHE_LINE_SIZE_REG, &Value32); + pDevice->CacheLineSize = (LM_UINT8) Value32; + pDevice->SavedCacheLineReg = Value32; + + if(pDevice->ChipRevId != T3_CHIP_ID_5703_A1 && + pDevice->ChipRevId != T3_CHIP_ID_5703_A2 && + pDevice->ChipRevId != T3_CHIP_ID_5704_A0) + { + pDevice->Flags &= ~UNDI_FIX_FLAG; + } +#ifndef PCIX_TARGET_WORKAROUND + pDevice->Flags &= ~UNDI_FIX_FLAG; +#endif + /* Map the memory base to system address space. */ + if (!(pDevice->Flags & UNDI_FIX_FLAG)) + { + Status = MM_MapMemBase(pDevice); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + /* Initialize the memory view pointer. */ + pDevice->pMemView = (PT3_STD_MEM_MAP) pDevice->pMappedMemBase; + } + + if ((T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) || + (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5704_AX)) + { + pDevice->Flags |= TX_4G_WORKAROUND_FLAG; + } + if ( (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) || + (pDevice->Flags == PCI_EXPRESS_FLAG)) + { + pDevice->Flags |= REG_RD_BACK_FLAG; + } + + if(pDevice->ChipRevId==T3_CHIP_ID_5750_A0) + return LM_STATUS_UNKNOWN_ADAPTER; + +#ifdef PCIX_TARGET_WORKAROUND + MM_ReadConfig32(pDevice, T3_PCI_STATE_REG, &Value32); + if((Value32 & T3_PCI_STATE_CONVENTIONAL_PCI_MODE) == 0) + { + /* Enable PCI-X workaround only if we are running on 5700 BX. */ + if(T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) + { + pDevice->Flags |= ENABLE_PCIX_FIX_FLAG; + } + } + if (pDevice->Flags & UNDI_FIX_FLAG) + { + pDevice->Flags |= ENABLE_PCIX_FIX_FLAG; + } +#endif + /* Bx bug: due to the "byte_enable bug" in PCI-X mode, the power */ + /* management register may be clobbered which may cause the */ + /* BCM5700 to go into D3 state. While in this state, we will */ + /* not have memory mapped register access. As a workaround, we */ + /* need to restore the device to D0 state. */ + MM_ReadConfig32(pDevice, T3_PCI_PM_STATUS_CTRL_REG, &Value32); + Value32 |= T3_PM_PME_ASSERTED; + Value32 &= ~T3_PM_POWER_STATE_MASK; + Value32 |= T3_PM_POWER_STATE_D0; + MM_WriteConfig32(pDevice, T3_PCI_PM_STATUS_CTRL_REG, Value32); + + /* read the current PCI command word */ + MM_ReadConfig32(pDevice, PCI_COMMAND_REG, &Value32); + + /* Make sure bus-mastering is enabled. */ + Value32 |= PCI_BUSMASTER_ENABLE; + +#ifdef PCIX_TARGET_WORKAROUND + /* if we are in PCI-X mode, also make sure mem-mapping and SERR#/PERR# + are enabled */ + if (pDevice->Flags & ENABLE_PCIX_FIX_FLAG) { + Value32 |= (PCI_MEM_SPACE_ENABLE | PCI_SYSTEM_ERROR_ENABLE | + PCI_PARITY_ERROR_ENABLE); + } + if (pDevice->Flags & UNDI_FIX_FLAG) + { + Value32 &= ~PCI_MEM_SPACE_ENABLE; + } + +#endif + + if (pDevice->Flags & ENABLE_MWI_FLAG) + { + Value32 |= PCI_MEMORY_WRITE_INVALIDATE; + } + else { + Value32 &= (~PCI_MEMORY_WRITE_INVALIDATE); + } + + /* save the value we are going to write into the PCI command word */ + pDevice->PciCommandStatusWords = Value32; + + Status = MM_WriteConfig32(pDevice, PCI_COMMAND_REG, Value32); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + + /* Setup the mode registers. */ + pDevice->MiscHostCtrl = + MISC_HOST_CTRL_MASK_PCI_INT | + MISC_HOST_CTRL_ENABLE_ENDIAN_WORD_SWAP | +#ifdef BIG_ENDIAN_HOST + MISC_HOST_CTRL_ENABLE_ENDIAN_BYTE_SWAP | +#endif /* BIG_ENDIAN_HOST */ + MISC_HOST_CTRL_ENABLE_INDIRECT_ACCESS | + MISC_HOST_CTRL_ENABLE_PCI_STATE_REG_RW; + /* write to PCI misc host ctr first in order to enable indirect accesses */ + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, pDevice->MiscHostCtrl); + + /* Set power state to D0. */ + LM_SetPowerState(pDevice, LM_POWER_STATE_D0); + + /* Preserve HOST_STACK_UP bit in case ASF firmware is running */ + Value32 = REG_RD(pDevice, Grc.Mode) & GRC_MODE_HOST_STACK_UP; +#ifdef BIG_ENDIAN_HOST + Value32 |= GRC_MODE_BYTE_SWAP_NON_FRAME_DATA | + GRC_MODE_WORD_SWAP_NON_FRAME_DATA; +#else + Value32 |= GRC_MODE_BYTE_SWAP_NON_FRAME_DATA | GRC_MODE_BYTE_SWAP_DATA; +#endif + REG_WR(pDevice, Grc.Mode, Value32); + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + REG_WR(pDevice, Grc.LocalCtrl, GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1); + REG_RD_BACK(pDevice, Grc.LocalCtrl); + } + MM_Wait(40); + + /* Enable memory arbiter*/ + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId) ) + { + Value32 = REG_RD(pDevice,MemArbiter.Mode); + REG_WR(pDevice, MemArbiter.Mode, T3_MEM_ARBITER_MODE_ENABLE | Value32); + } + else + { + REG_WR(pDevice, MemArbiter.Mode, T3_MEM_ARBITER_MODE_ENABLE); + } + + + LM_SwitchClocks(pDevice); + + REG_WR(pDevice, PciCfg.MemWindowBaseAddr, 0); + + /* Check to see if PXE ran and did not shutdown properly */ + if ((REG_RD(pDevice, DmaWrite.Mode) & DMA_WRITE_MODE_ENABLE) || + !(REG_RD(pDevice, PciCfg.MiscHostCtrl) & MISC_HOST_CTRL_MASK_PCI_INT)) + { + LM_DisableInterrupt(pDevice); + /* assume ASF is enabled */ + pDevice->AsfFlags = ASF_ENABLED; + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + pDevice->AsfFlags |= ASF_NEW_HANDSHAKE; + } + LM_ShutdownChip(pDevice, LM_SHUTDOWN_RESET); + pDevice->AsfFlags = 0; + } +#ifdef PCIX_TARGET_WORKAROUND + MM_ReadConfig32(pDevice, T3_PCI_STATE_REG, &Value32); + if (!(pDevice->Flags & ENABLE_PCIX_FIX_FLAG) && + ((Value32 & T3_PCI_STATE_CONVENTIONAL_PCI_MODE) == 0)) + { + if (pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B2 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B5) + { + MM_MEMWRITEL(&(pDevice->pMemView->uIntMem.MemBlock32K[0x300]), 0); + MM_MEMWRITEL(&(pDevice->pMemView->uIntMem.MemBlock32K[0x301]), 0); + MM_MEMWRITEL(&(pDevice->pMemView->uIntMem.MemBlock32K[0x301]), + 0xffffffff); + if (MM_MEMREADL(&(pDevice->pMemView->uIntMem.MemBlock32K[0x300]))) + { + pDevice->Flags |= ENABLE_PCIX_FIX_FLAG; + } + } + } +#endif + + LM_NVRAM_Init(pDevice); + + Status = LM_STATUS_FAILURE; + /* Get the node address. First try to get in from the shared memory. */ + /* If the signature is not present, then get it from the NVRAM. */ + Value32 = MEM_RD_OFFSET(pDevice, T3_MAC_ADDR_HIGH_MAILBOX); + if((Value32 >> 16) == 0x484b) + { + int i; + + pDevice->NodeAddress[0] = (LM_UINT8) (Value32 >> 8); + pDevice->NodeAddress[1] = (LM_UINT8) Value32; + + Value32 = MEM_RD_OFFSET(pDevice, T3_MAC_ADDR_LOW_MAILBOX); + + pDevice->NodeAddress[2] = (LM_UINT8) (Value32 >> 24); + pDevice->NodeAddress[3] = (LM_UINT8) (Value32 >> 16); + pDevice->NodeAddress[4] = (LM_UINT8) (Value32 >> 8); + pDevice->NodeAddress[5] = (LM_UINT8) Value32; + + /* Check for null MAC address which can happen with older boot code */ + for (i = 0; i < 6; i++) + { + if (pDevice->NodeAddress[i] != 0) + { + Status = LM_STATUS_SUCCESS; + break; + } + } + } + + if (Status != LM_STATUS_SUCCESS) + { + int MacOffset; + + MacOffset = 0x7c; + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704 || + (T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) ) + { + if (REG_RD(pDevice, PciCfg.DualMacCtrl) & T3_DUAL_MAC_ID) + { + MacOffset = 0xcc; + } + /* workaround - need to reset nvram if */ + /* the boot code is not running */ + if (LM_NVRAM_AcquireLock(pDevice) != LM_STATUS_SUCCESS) + { + REG_WR(pDevice, Nvram.Cmd, NVRAM_CMD_RESET); + } + else + { + LM_NVRAM_ReleaseLock(pDevice); + } + } + + Status = LM_NvramRead(pDevice, MacOffset, &Value32); + if(Status == LM_STATUS_SUCCESS) + { + LM_UINT8 *c = (LM_UINT8 *) &Value32; + + pDevice->NodeAddress[0] = c[2]; + pDevice->NodeAddress[1] = c[3]; + + Status = LM_NvramRead(pDevice, MacOffset + 4, &Value32); + + c = (LM_UINT8 *) &Value32; + pDevice->NodeAddress[2] = c[0]; + pDevice->NodeAddress[3] = c[1]; + pDevice->NodeAddress[4] = c[2]; + pDevice->NodeAddress[5] = c[3]; + } + } + + if(Status != LM_STATUS_SUCCESS) + { + Value32 = REG_RD(pDevice, MacCtrl.MacAddr[0].High); + pDevice->NodeAddress[0] = (Value32 >> 8) & 0xff; + pDevice->NodeAddress[1] = Value32 & 0xff; + Value32 = REG_RD(pDevice, MacCtrl.MacAddr[0].Low); + pDevice->NodeAddress[2] = (Value32 >> 24) & 0xff; + pDevice->NodeAddress[3] = (Value32 >> 16) & 0xff; + pDevice->NodeAddress[4] = (Value32 >> 8) & 0xff; + pDevice->NodeAddress[5] = Value32 & 0xff; + printf("WARNING: Cannot get MAC addr from NVRAM, using %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", + pDevice->NodeAddress[0], pDevice->NodeAddress[1], + pDevice->NodeAddress[2], pDevice->NodeAddress[3], + pDevice->NodeAddress[4], pDevice->NodeAddress[5]); + } + + memcpy(pDevice->PermanentNodeAddress, pDevice->NodeAddress, 6); + + /* Initialize the default values. */ + pDevice->TxPacketDescCnt = DEFAULT_TX_PACKET_DESC_COUNT; + pDevice->RxStdDescCnt = DEFAULT_STD_RCV_DESC_COUNT; + pDevice->RxCoalescingTicks = DEFAULT_RX_COALESCING_TICKS; + pDevice->TxCoalescingTicks = DEFAULT_TX_COALESCING_TICKS; + pDevice->RxMaxCoalescedFrames = DEFAULT_RX_MAX_COALESCED_FRAMES; + pDevice->TxMaxCoalescedFrames = DEFAULT_TX_MAX_COALESCED_FRAMES; + pDevice->RxCoalescingTicksDuringInt = BAD_DEFAULT_VALUE; + pDevice->TxCoalescingTicksDuringInt = BAD_DEFAULT_VALUE; + pDevice->RxMaxCoalescedFramesDuringInt = BAD_DEFAULT_VALUE; + pDevice->TxMaxCoalescedFramesDuringInt = BAD_DEFAULT_VALUE; + pDevice->StatsCoalescingTicks = DEFAULT_STATS_COALESCING_TICKS; + pDevice->TxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; + pDevice->RxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; + pDevice->DisableAutoNeg = FALSE; + pDevice->PhyIntMode = T3_PHY_INT_MODE_AUTO; + pDevice->LinkChngMode = T3_LINK_CHNG_MODE_AUTO; + + pDevice->PhyFlags = 0; + + if (!(pDevice->Flags & PCI_EXPRESS_FLAG)) + pDevice->Flags |= DELAY_PCI_GRANT_FLAG; + + pDevice->RequestedLineSpeed = LM_LINE_SPEED_AUTO; + pDevice->TaskOffloadCap = LM_TASK_OFFLOAD_NONE; + pDevice->TaskToOffload = LM_TASK_OFFLOAD_NONE; + pDevice->FlowControlCap = LM_FLOW_CONTROL_AUTO_PAUSE; +#ifdef INCLUDE_TBI_SUPPORT + pDevice->TbiFlags = 0; + pDevice->IgnoreTbiLinkChange = FALSE; +#endif +#ifdef INCLUDE_TCP_SEG_SUPPORT + pDevice->LargeSendMaxSize = T3_TCP_SEG_MAX_OFFLOAD_SIZE; + pDevice->LargeSendMinNumSeg = T3_TCP_SEG_MIN_NUM_SEG; +#endif + + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705)) + { + pDevice->PhyFlags |= PHY_RESET_ON_LINKDOWN; + pDevice->PhyFlags |= PHY_CHECK_TAPS_AFTER_RESET; + } + if ((T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5703_AX) || + (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5704_AX)) + { + pDevice->PhyFlags |= PHY_ADC_FIX; + } + if (pDevice->ChipRevId == T3_CHIP_ID_5704_A0) + { + pDevice->PhyFlags |= PHY_5704_A0_FIX; + } + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + pDevice->PhyFlags |= PHY_5705_5750_FIX; + } + /* Ethernet@Wirespeed is supported on 5701,5702,5703,5704,5705a0,5705a1 */ + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + !((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) && + (pDevice->ChipRevId != T3_CHIP_ID_5705_A0) && + (pDevice->ChipRevId != T3_CHIP_ID_5705_A1))) + { + pDevice->PhyFlags |= PHY_ETHERNET_WIRESPEED; + } + + switch (T3_ASIC_REV(pDevice->ChipRevId)) + { + case T3_ASIC_REV_5704: + pDevice->MbufBase = T3_NIC_MBUF_POOL_ADDR; + pDevice->MbufSize = T3_NIC_MBUF_POOL_SIZE64; + break; + default: + pDevice->MbufBase = T3_NIC_MBUF_POOL_ADDR; + pDevice->MbufSize = T3_NIC_MBUF_POOL_SIZE96; + break; + } + + pDevice->LinkStatus = LM_STATUS_LINK_DOWN; + pDevice->QueueRxPackets = TRUE; + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + + if(T3_ASIC_IS_JUMBO_CAPABLE(pDevice->ChipRevId)){ + if( ! T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + pDevice->RxJumboDescCnt = DEFAULT_JUMBO_RCV_DESC_COUNT; + pDevice->Flags |= JUMBO_CAPABLE_FLAG; + } + +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + pDevice->BondId = REG_RD(pDevice, Grc.MiscCfg) & GRC_MISC_BD_ID_MASK; + + if(((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) && + ((pDevice->BondId == 0x10000) || (pDevice->BondId == 0x18000))) || + ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) && + ((pDevice->BondId == 0x14000) || (pDevice->BondId == 0x1c000)))) + { + return LM_STATUS_UNKNOWN_ADAPTER; + } + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) + { + if ((pDevice->BondId == 0x8000) || (pDevice->BondId == 0x4000)) + { + pDevice->PhyFlags |= PHY_NO_GIGABIT; + } + } + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { + if ((pDevice->BondId == GRC_MISC_BD_ID_5788) || + (pDevice->BondId == GRC_MISC_BD_ID_5788M)) + { + pDevice->Flags |= BCM5788_FLAG; + } + + if ((pDevice->PciDeviceId == T3_PCI_DEVICE_ID(T3_PCI_ID_BCM5901)) || + (pDevice->PciDeviceId == T3_PCI_DEVICE_ID(T3_PCI_ID_BCM5901A2)) || + (pDevice->PciDeviceId == T3_PCI_DEVICE_ID(T3_PCI_ID_BCM5705F))) + { + pDevice->PhyFlags |= PHY_NO_GIGABIT; + } + } + + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5750) + { + if ( (pDevice->PciDeviceId == T3_PCI_DEVICE_ID(T3_PCI_ID_BCM5751F))|| + (pDevice->PciDeviceId == T3_PCI_DEVICE_ID(T3_PCI_ID_BCM5753F))) + { + pDevice->PhyFlags |= PHY_NO_GIGABIT; + } + } + + /* CIOBE multisplit has a bug */ +#if 0 + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) && + (pDevice->BondId == GRC_MISC_BD_ID_5704CIOBE)) + { + pDevice->Flags |= MULTI_SPLIT_ENABLE_FLAG; + pDevice->SplitModeMaxReq = SPLIT_MODE_5704_MAX_REQ; + } +#endif + + /* Get Eeprom info. */ + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_SIG_ADDR); + if (Value32 == T3_NIC_DATA_SIG) + { + EeSigFound = TRUE; + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_NIC_CFG_ADDR); + + /* For now the 5753 cannot drive gpio2 or ASF will blow */ + if(Value32 & T3_NIC_GPIO2_NOT_AVAILABLE) + { + pDevice->Flags |= GPIO2_DONOT_OUTPUT; + } + + if (Value32 & T3_NIC_MINI_PCI) + { + pDevice->Flags |= MINI_PCI_FLAG; + } + /* Determine PHY type. */ + switch (Value32 & T3_NIC_CFG_PHY_TYPE_MASK) + { + case T3_NIC_CFG_PHY_TYPE_COPPER: + EePhyTypeSerdes = FALSE; + break; + + case T3_NIC_CFG_PHY_TYPE_FIBER: + EePhyTypeSerdes = TRUE; + break; + + default: + EePhyTypeSerdes = FALSE; + break; + } + + if ( T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + LedCfg = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_NIC_CFG_ADDR2); + LedCfg = LedCfg & (T3_NIC_CFG_LED_MODE_MASK | + T3_SHASTA_EXT_LED_MODE_MASK); + } + else + { + /* Determine PHY led mode. for legacy devices */ + LedCfg = Value32 & T3_NIC_CFG_LED_MODE_MASK; + } + + switch (LedCfg) + { + default: + case T3_NIC_CFG_LED_PHY_MODE_1: + pDevice->LedCtrl = LED_CTRL_PHY_MODE_1; + break; + + case T3_NIC_CFG_LED_PHY_MODE_2: + pDevice->LedCtrl = LED_CTRL_PHY_MODE_2; + break; + + case T3_NIC_CFG_LED_MAC_MODE: + pDevice->LedCtrl = LED_CTRL_MAC_MODE; + break; + + case T3_SHASTA_EXT_LED_SHARED_TRAFFIC_LINK_MODE: + pDevice->LedCtrl = LED_CTRL_SHARED_TRAFFIC_LINK; + if ((pDevice->ChipRevId != T3_CHIP_ID_5750_A0) && + (pDevice->ChipRevId != T3_CHIP_ID_5750_A1)) + { + pDevice->LedCtrl |= LED_CTRL_PHY_MODE_1 | + LED_CTRL_PHY_MODE_2; + } + break; + + case T3_SHASTA_EXT_LED_MAC_MODE: + pDevice->LedCtrl = LED_CTRL_SHASTA_MAC_MODE; + break; + + case T3_SHASTA_EXT_LED_WIRELESS_COMBO_MODE: + pDevice->LedCtrl = LED_CTRL_WIRELESS_COMBO; + if (pDevice->ChipRevId != T3_CHIP_ID_5750_A0) + { + pDevice->LedCtrl |= LED_CTRL_PHY_MODE_1 | + LED_CTRL_PHY_MODE_2; + } + break; + + } + + if (((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701)) && + (pDevice->SubsystemVendorId == T3_SVID_DELL)) + { + pDevice->LedCtrl = LED_CTRL_PHY_MODE_2; + } + + if((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) || + (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) ) + { + /* Enable EEPROM write protection. */ + if(Value32 & T3_NIC_EEPROM_WP) + { + pDevice->Flags |= EEPROM_WP_FLAG; + } + } + pDevice->AsfFlags = 0; +#ifdef BCM_ASF + if (Value32 & T3_NIC_CFG_ENABLE_ASF) + { + pDevice->AsfFlags |= ASF_ENABLED; + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + pDevice->AsfFlags |= ASF_NEW_HANDSHAKE; + } + } +#endif + if (Value32 & T3_NIC_FIBER_WOL_CAPABLE) + { + pDevice->Flags |= FIBER_WOL_CAPABLE_FLAG; + } + if (Value32 & T3_NIC_WOL_LIMIT_10) + { + pDevice->Flags |= WOL_LIMIT_10MBPS_FLAG; + } + + /* Get the PHY Id. */ + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_PHY_ID_ADDR); + if (Value32) + { + EePhyId = (((Value32 & T3_NIC_PHY_ID1_MASK) >> 16) & + PHY_ID1_OUI_MASK) << 10; + + Value32 = Value32 & T3_NIC_PHY_ID2_MASK; + + EePhyId |= ((Value32 & PHY_ID2_OUI_MASK) << 16) | + (Value32 & PHY_ID2_MODEL_MASK) | (Value32 & PHY_ID2_REV_MASK); + } + else + { + EePhyId = 0; + if (!EePhyTypeSerdes && !(pDevice->AsfFlags & ASF_ENABLED)) + { + /* reset PHY if boot code couldn't read the PHY ID */ + LM_ResetPhy(pDevice); + } + } + + Ver = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_VER); + Ver >>= T3_NIC_DATA_VER_SHIFT; + + Value32 = 0; + if((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5703) && + (Ver > 0) && (Ver < 0x100)){ + + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_NIC_CFG_ADDR2); + + if (Value32 & T3_NIC_CFG_CAPACITIVE_COUPLING) + { + pDevice->PhyFlags |= PHY_CAPACITIVE_COUPLING; + } + + if (Value32 & T3_NIC_CFG_PRESERVE_PREEMPHASIS) + { + pDevice->TbiFlags |= TBI_DO_PREEMPHASIS; + } + + } + + } + else + { + EeSigFound = FALSE; + } + + /* Set the PHY address. */ + pDevice->PhyAddr = PHY_DEVICE_ID; + + /* Disable auto polling. */ + pDevice->MiMode = 0xc0000; + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(80); + + if (pDevice->AsfFlags & ASF_ENABLED) + { + /* Reading PHY registers will contend with ASF */ + pDevice->PhyId = 0; + } + else + { + /* Get the PHY id. */ + LM_GetPhyId(pDevice); + } + + /* Set the EnableTbi flag to false if we have a copper PHY. */ + switch(pDevice->PhyId & PHY_ID_MASK) + { + case PHY_BCM5400_PHY_ID: + case PHY_BCM5401_PHY_ID: + case PHY_BCM5411_PHY_ID: + case PHY_BCM5701_PHY_ID: + case PHY_BCM5703_PHY_ID: + case PHY_BCM5704_PHY_ID: + case PHY_BCM5705_PHY_ID: + case PHY_BCM5750_PHY_ID: + break; + case PHY_BCM5714_PHY_ID: + case PHY_BCM5780_PHY_ID: + if(EePhyTypeSerdes == TRUE) + { + pDevice->PhyFlags |= PHY_IS_FIBER; + } + break; + case PHY_BCM5752_PHY_ID: + break; + + case PHY_BCM8002_PHY_ID: + pDevice->TbiFlags |= ENABLE_TBI_FLAG; + break; + + default: + + if (EeSigFound) + { + pDevice->PhyId = EePhyId; + + if (EePhyTypeSerdes && ((pDevice->PhyId == PHY_BCM5714_PHY_ID) || (pDevice->PhyId == PHY_BCM5780_PHY_ID)) ) + { + pDevice->PhyFlags |= PHY_IS_FIBER; + } + else if (EePhyTypeSerdes) + { + pDevice->TbiFlags |= ENABLE_TBI_FLAG; + } + } + else if ((pAdapterInfo = LM_GetAdapterInfoBySsid( + pDevice->SubsystemVendorId, + pDevice->SubsystemId))) + { + pDevice->PhyId = pAdapterInfo->PhyId; + if (pAdapterInfo->Serdes) + { + pDevice->TbiFlags |= ENABLE_TBI_FLAG; + } + } + else + { + if (UNKNOWN_PHY_ID(pDevice->PhyId)) + { + LM_ResetPhy(pDevice); + LM_GetPhyId(pDevice); + } + } + break; + } + + if(UNKNOWN_PHY_ID(pDevice->PhyId) && + !(pDevice->TbiFlags & ENABLE_TBI_FLAG)) + { + pDevice->TbiFlags |= ENABLE_TBI_FLAG; + printf("PHY ID unknown, assume it is SerDes\n"); + } + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) + { + if((pDevice->SavedCacheLineReg & 0xff00) < 0x4000) + { + pDevice->SavedCacheLineReg &= 0xffff00ff; + pDevice->SavedCacheLineReg |= 0x4000; + } + } + + pDevice->ReceiveMask = LM_ACCEPT_MULTICAST | LM_ACCEPT_BROADCAST | + LM_ACCEPT_UNICAST; + + pDevice->TaskOffloadCap = LM_TASK_OFFLOAD_TX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_TX_UDP_CHECKSUM | LM_TASK_OFFLOAD_RX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_RX_UDP_CHECKSUM; + + if (pDevice->ChipRevId == T3_CHIP_ID_5700_B0) + { + pDevice->TaskOffloadCap &= ~(LM_TASK_OFFLOAD_TX_TCP_CHECKSUM | + LM_TASK_OFFLOAD_TX_UDP_CHECKSUM); + } + +#ifdef INCLUDE_TCP_SEG_SUPPORT + pDevice->TaskOffloadCap |= LM_TASK_OFFLOAD_TCP_SEGMENTATION; + + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) || + (pDevice->ChipRevId == T3_CHIP_ID_5705_A0)) + { + pDevice->TaskOffloadCap &= ~LM_TASK_OFFLOAD_TCP_SEGMENTATION; + } +#endif + +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_ENABLED) + { + if (!T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + pDevice->TaskOffloadCap &= ~LM_TASK_OFFLOAD_TCP_SEGMENTATION; + } + } +#endif + + /* Change driver parameters. */ + Status = MM_GetConfig(pDevice); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + pDevice->Flags &= ~NIC_SEND_BD_FLAG; + } + + /* Save the current phy link status. */ + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + !(pDevice->AsfFlags & ASF_ENABLED)) + { + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + + /* If we don't have link reset the PHY. */ + if(!(Value32 & PHY_STATUS_LINK_PASS) || + (pDevice->PhyFlags & PHY_RESET_ON_INIT)) + { + + LM_ResetPhy(pDevice); + + if (LM_PhyAdvertiseAll(pDevice) != LM_STATUS_SUCCESS) + { + Value32 = PHY_AN_AD_PROTOCOL_802_3_CSMA_CD | + PHY_AN_AD_ALL_SPEEDS; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + + if(!(pDevice->PhyFlags & PHY_NO_GIGABIT)) + Value32 = BCM540X_AN_AD_ALL_1G_SPEEDS ; + else + Value32 =0; + +#ifdef INCLUDE_5701_AX_FIX + if(pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0) + { + Value32 |= BCM540X_CONFIG_AS_MASTER | + BCM540X_ENABLE_CONFIG_AS_MASTER; + } +#endif + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, Value32); + + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_AUTO_NEG_ENABLE | + PHY_CTRL_RESTART_AUTO_NEG); + } + + } + LM_SetEthWireSpeed(pDevice); + + LM_ReadPhy(pDevice, PHY_AN_AD_REG, &pDevice->advertising); + LM_ReadPhy(pDevice, BCM540X_1000BASET_CTRL_REG, + &pDevice->advertising1000); + + } + /* Currently 5401 phy only */ + LM_PhyTapPowerMgmt(pDevice); + +#ifdef INCLUDE_TBI_SUPPORT + if(pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + if (!(pDevice->Flags & FIBER_WOL_CAPABLE_FLAG)) + { + pDevice->WakeUpModeCap = LM_WAKE_UP_MODE_NONE; + } + pDevice->PhyIntMode = T3_PHY_INT_MODE_LINK_READY; + if (pDevice->TbiFlags & TBI_PURE_POLLING_FLAG) + { + pDevice->IgnoreTbiLinkChange = TRUE; + } + } + else + { + pDevice->TbiFlags = 0; + } + +#endif /* INCLUDE_TBI_SUPPORT */ + + /* UseTaggedStatus is only valid for 5701 and later. */ + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) || + ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) && + ((pDevice->BondId == GRC_MISC_BD_ID_5788) || + (pDevice->BondId == GRC_MISC_BD_ID_5788M)))) + { + pDevice->Flags &= ~USE_TAGGED_STATUS_FLAG; + pDevice->CoalesceMode = 0; + } + else + { + pDevice->CoalesceMode = HOST_COALESCE_CLEAR_TICKS_ON_RX_BD_EVENT | + HOST_COALESCE_CLEAR_TICKS_ON_TX_BD_EVENT; + } + + /* Set the status block size. */ + if(T3_CHIP_REV(pDevice->ChipRevId) != T3_CHIP_REV_5700_AX && + T3_CHIP_REV(pDevice->ChipRevId) != T3_CHIP_REV_5700_BX) + { + pDevice->CoalesceMode |= HOST_COALESCE_32_BYTE_STATUS_MODE; + } + + /* Check the DURING_INT coalescing ticks parameters. */ + if (pDevice->Flags & USE_TAGGED_STATUS_FLAG) + { + if(pDevice->RxCoalescingTicksDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->RxCoalescingTicksDuringInt = + DEFAULT_RX_COALESCING_TICKS_DURING_INT; + } + + if(pDevice->TxCoalescingTicksDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->TxCoalescingTicksDuringInt = + DEFAULT_TX_COALESCING_TICKS_DURING_INT; + } + + if(pDevice->RxMaxCoalescedFramesDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->RxMaxCoalescedFramesDuringInt = + DEFAULT_RX_MAX_COALESCED_FRAMES_DURING_INT; + } + + if(pDevice->TxMaxCoalescedFramesDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->TxMaxCoalescedFramesDuringInt = + DEFAULT_TX_MAX_COALESCED_FRAMES_DURING_INT; + } + } + else + { + if(pDevice->RxCoalescingTicksDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->RxCoalescingTicksDuringInt = 0; + } + + if(pDevice->TxCoalescingTicksDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->TxCoalescingTicksDuringInt = 0; + } + + if(pDevice->RxMaxCoalescedFramesDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->RxMaxCoalescedFramesDuringInt = 0; + } + + if(pDevice->TxMaxCoalescedFramesDuringInt == BAD_DEFAULT_VALUE) + { + pDevice->TxMaxCoalescedFramesDuringInt = 0; + } + } + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + if(pDevice->RxMtu <= (MAX_STD_RCV_BUFFER_SIZE - 8 /* CRC */)) + { + pDevice->RxJumboDescCnt = 0; + if(pDevice->RxMtu <= MAX_ETHERNET_PACKET_SIZE_NO_CRC) + { + pDevice->RxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; + } + } + else if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { + pDevice->RxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; + pDevice->RxJumboDescCnt = 0; + } + else + { + pDevice->RxJumboBufferSize = (pDevice->RxMtu + 8 /* CRC + VLAN */ + + COMMON_CACHE_LINE_SIZE-1) & ~COMMON_CACHE_LINE_MASK; + + if(pDevice->RxJumboBufferSize > MAX_JUMBO_RCV_BUFFER_SIZE) + { + pDevice->RxJumboBufferSize = DEFAULT_JUMBO_RCV_BUFFER_SIZE; + pDevice->RxMtu = pDevice->RxJumboBufferSize - 8 /* CRC + VLAN */; + } + pDevice->TxMtu = pDevice->RxMtu; + } +#else + pDevice->RxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + pDevice->RxPacketDescCnt = +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + pDevice->RxJumboDescCnt + +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + pDevice->RxStdDescCnt; + + if(pDevice->TxMtu < MAX_ETHERNET_PACKET_SIZE_NO_CRC) + { + pDevice->TxMtu = MAX_ETHERNET_PACKET_SIZE_NO_CRC; + } + + if(pDevice->TxMtu > MAX_JUMBO_TX_BUFFER_SIZE) + { + pDevice->TxMtu = MAX_JUMBO_TX_BUFFER_SIZE; + } + + /* Configure the proper ways to get link change interrupt. */ + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO) + { + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + pDevice->PhyIntMode = T3_PHY_INT_MODE_MI_INTERRUPT; + } + else + { + pDevice->PhyIntMode = T3_PHY_INT_MODE_LINK_READY; + } + } + else if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + /* Auto-polling does not work on 5700_AX and 5700_BX. */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + pDevice->PhyIntMode = T3_PHY_INT_MODE_MI_INTERRUPT; + } + } + + /* Determine the method to get link change status. */ + if(pDevice->LinkChngMode == T3_LINK_CHNG_MODE_AUTO) + { + /* The link status bit in the status block does not work on 5700_AX */ + /* and 5700_BX chips. */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + pDevice->LinkChngMode = T3_LINK_CHNG_MODE_USE_STATUS_REG; + } + else + { + pDevice->LinkChngMode = T3_LINK_CHNG_MODE_USE_STATUS_BLOCK; + } + } + + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_MI_INTERRUPT || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + pDevice->LinkChngMode = T3_LINK_CHNG_MODE_USE_STATUS_REG; + } + + if (!EeSigFound) + { + pDevice->LedCtrl = LED_CTRL_PHY_MODE_1; + } + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) + { + /* bug? 5701 in LINK10 mode does not seem to work when */ + /* PhyIntMode is LINK_READY. */ + if(T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700 && +#ifdef INCLUDE_TBI_SUPPORT + !(pDevice->TbiFlags & ENABLE_TBI_FLAG) && +#endif + pDevice->LedCtrl == LED_CTRL_PHY_MODE_2) + { + pDevice->PhyIntMode = T3_PHY_INT_MODE_MI_INTERRUPT; + pDevice->LinkChngMode = T3_LINK_CHNG_MODE_USE_STATUS_REG; + } + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + pDevice->LedCtrl = LED_CTRL_PHY_MODE_1; + } + } + +#ifdef BCM_WOL + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B2) + { + pDevice->WolSpeed = WOL_SPEED_10MB; + } + else + { + if (pDevice->Flags & WOL_LIMIT_10MBPS_FLAG) + { + pDevice->WolSpeed = WOL_SPEED_10MB; + } + else + { + pDevice->WolSpeed = WOL_SPEED_100MB; + } + } +#endif + + pDevice->PciState = REG_RD(pDevice, PciCfg.PciState); + + pDevice->DmaReadFifoSize = 0; + if (((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) && + (pDevice->ChipRevId != T3_CHIP_ID_5705_A0)) || + T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId) ) + { +#ifdef INCLUDE_TCP_SEG_SUPPORT + if ((pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION) && + ((pDevice->ChipRevId == T3_CHIP_ID_5705_A1) || + (pDevice->ChipRevId == T3_CHIP_ID_5705_A2))) + { + pDevice->DmaReadFifoSize = DMA_READ_MODE_FIFO_SIZE_128; + } + else +#endif + { + if (!(pDevice->PciState & T3_PCI_STATE_HIGH_BUS_SPEED) && + !(pDevice->Flags & BCM5788_FLAG) && + !(pDevice->Flags & PCI_EXPRESS_FLAG)) + { + pDevice->DmaReadFifoSize = DMA_READ_MODE_FIFO_LONG_BURST; + if (pDevice->ChipRevId == T3_CHIP_ID_5705_A1) + { + pDevice->Flags |= RX_BD_LIMIT_64_FLAG; + } + pDevice->Flags |= DMA_WR_MODE_RX_ACCELERATE_FLAG; + } + else if (pDevice->Flags & PCI_EXPRESS_FLAG) + { + pDevice->DmaReadFifoSize = DMA_READ_MODE_FIFO_LONG_BURST; + } + } + } + + pDevice->Flags &= ~T3_HAS_TWO_CPUS; + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + pDevice->Flags |= T3_HAS_TWO_CPUS; + } + + LM_ReadVPD(pDevice); + LM_ReadBootCodeVersion(pDevice); + LM_ReadIPMICodeVersion(pDevice); + LM_GetBusSpeed(pDevice); + + return LM_STATUS_SUCCESS; +} /* LM_GetAdapterInfo */ + +STATIC PLM_ADAPTER_INFO +LM_GetAdapterInfoBySsid( + LM_UINT16 Svid, + LM_UINT16 Ssid) +{ + static LM_ADAPTER_INFO AdapterArr[] = + { + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95700A6, PHY_BCM5401_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701A5, PHY_BCM5701_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95700T6, PHY_BCM8002_PHY_ID, 1}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95700A9, 0, 1 }, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701T1, PHY_BCM5701_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701T8, PHY_BCM5701_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701A7, 0, 1}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701A10, PHY_BCM5701_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95701A12, PHY_BCM5701_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95703Ax1, PHY_BCM5703_PHY_ID, 0}, + { T3_SVID_BROADCOM, T3_SSID_BROADCOM_BCM95703Ax2, PHY_BCM5703_PHY_ID, 0}, + + { T3_SVID_3COM, T3_SSID_3COM_3C996T, PHY_BCM5401_PHY_ID, 0 }, + { T3_SVID_3COM, T3_SSID_3COM_3C996BT, PHY_BCM5701_PHY_ID, 0 }, + { T3_SVID_3COM, T3_SSID_3COM_3C996SX, 0, 1 }, + { T3_SVID_3COM, T3_SSID_3COM_3C1000T, PHY_BCM5701_PHY_ID, 0 }, + { T3_SVID_3COM, T3_SSID_3COM_3C940BR01, PHY_BCM5701_PHY_ID, 0 }, + + { T3_SVID_DELL, T3_SSID_DELL_VIPER, PHY_BCM5401_PHY_ID, 0 }, + { T3_SVID_DELL, T3_SSID_DELL_JAGUAR, PHY_BCM5401_PHY_ID, 0 }, + { T3_SVID_DELL, T3_SSID_DELL_MERLOT, PHY_BCM5411_PHY_ID, 0 }, + { T3_SVID_DELL, T3_SSID_DELL_SLIM_MERLOT, PHY_BCM5411_PHY_ID, 0 }, + + { T3_SVID_COMPAQ, T3_SSID_COMPAQ_BANSHEE, PHY_BCM5701_PHY_ID, 0 }, + { T3_SVID_COMPAQ, T3_SSID_COMPAQ_BANSHEE_2, PHY_BCM5701_PHY_ID, 0 }, + { T3_SVID_COMPAQ, T3_SSID_COMPAQ_CHANGELING, 0, 1 }, + { T3_SVID_COMPAQ, T3_SSID_COMPAQ_NC7780, PHY_BCM5701_PHY_ID, 0 }, + { T3_SVID_COMPAQ, T3_SSID_COMPAQ_NC7780_2, PHY_BCM5701_PHY_ID, 0 }, + + { 0x1014, 0x0281, 0, 1 }, + }; + LM_UINT32 j; + + for(j = 0; j < sizeof(AdapterArr)/sizeof(LM_ADAPTER_INFO); j++) + { + if(AdapterArr[j].Svid == Svid && AdapterArr[j].Ssid == Ssid) + { + return &AdapterArr[j]; + } + } + + return NULL; +} + + + +/******************************************************************************/ +/* Description: */ +/* This routine sets up receive/transmit buffer descriptions queues. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_InitializeAdapter( +PLM_DEVICE_BLOCK pDevice) +{ + LM_PHYSICAL_ADDRESS MemPhy; + PLM_UINT8 pMemVirt; + PLM_PACKET pPacket; + LM_STATUS Status; + LM_UINT32 Size; + LM_UINT32 Value32, j; + LM_UINT32 DmaWrCmd, DmaRdCmd, DmaWrBdry, DmaRdBdry; + + MM_ReadConfig32(pDevice, PCI_COMMAND_REG, &Value32); + j = 0; + while (((Value32 & 0x3ff) != (pDevice->PciCommandStatusWords & 0x3ff)) && + (j < 1000)) + { + /* On PCIE devices, there are some rare cases where the device */ + /* is in the process of link-training at this point */ + MM_Wait(200); + MM_WriteConfig32(pDevice, PCI_COMMAND_REG, pDevice->PciCommandStatusWords); + MM_ReadConfig32(pDevice, PCI_COMMAND_REG, &Value32); + j++; + } + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, pDevice->MiscHostCtrl); + /* Set power state to D0. */ + LM_SetPowerState(pDevice, LM_POWER_STATE_D0); + + /* Intialize the queues. */ + QQ_InitQueue(&pDevice->RxPacketReceivedQ.Container, + MAX_RX_PACKET_DESC_COUNT); + QQ_InitQueue(&pDevice->RxPacketFreeQ.Container, + MAX_RX_PACKET_DESC_COUNT); + + QQ_InitQueue(&pDevice->TxPacketFreeQ.Container,MAX_TX_PACKET_DESC_COUNT); + QQ_InitQueue(&pDevice->TxPacketXmittedQ.Container,MAX_TX_PACKET_DESC_COUNT); + + if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) ) + { + pDevice->RcvRetRcbEntryCount = 512; + pDevice->RcvRetRcbEntryCountMask = 511; + } + else + { + pDevice->RcvRetRcbEntryCount = T3_RCV_RETURN_RCB_ENTRY_COUNT; + pDevice->RcvRetRcbEntryCountMask = T3_RCV_RETURN_RCB_ENTRY_COUNT_MASK; + } + + /* Allocate shared memory for: status block, the buffers for receive */ + /* rings -- standard, mini, jumbo, and return rings. */ + Size = T3_STATUS_BLOCK_SIZE + sizeof(T3_STATS_BLOCK) + + T3_STD_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD) + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + T3_JUMBO_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD) + +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + (pDevice->RcvRetRcbEntryCount * sizeof(T3_RCV_BD)); + + /* Memory for host based Send BD. */ + if (!(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + Size += sizeof(T3_SND_BD) * T3_SEND_RCB_ENTRY_COUNT; + } + + /* Allocate the memory block. */ + Status = MM_AllocateSharedMemory(pDevice, Size, (PLM_VOID) &pMemVirt, &MemPhy, FALSE); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + + DmaWrCmd = DMA_CTRL_WRITE_CMD; + DmaRdCmd = DMA_CTRL_READ_CMD; + DmaWrBdry = DMA_CTRL_WRITE_BOUNDARY_DISABLE; + DmaRdBdry = DMA_CTRL_READ_BOUNDARY_DISABLE; +#ifdef BCM_DISCONNECT_AT_CACHELINE + /* This code is intended for PPC64 and other similar architectures */ + /* Only the following chips support this */ + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) || + (pDevice->Flags & PCI_EXPRESS_FLAG)) + { + switch(pDevice->CacheLineSize * 4) + { + case 16: + case 32: + case 64: + case 128: + if (!(pDevice->PciState & T3_PCI_STATE_NOT_PCI_X_BUS) && + !(pDevice->Flags & PCI_EXPRESS_FLAG)) + { + /* PCI-X */ + /* use 384 which is a multiple of 16,32,64,128 */ + DmaWrBdry = DMA_CTRL_WRITE_BOUNDARY_384_PCIX; + break; + } + else if (pDevice->Flags & PCI_EXPRESS_FLAG) + { + /* PCI Express */ + /* use 128 which is a multiple of 16,32,64,128 */ + DmaWrCmd = DMA_CTRL_WRITE_BOUNDARY_128_PCIE; + break; + } + /* fall through */ + case 256: + /* use 256 which is a multiple of 16,32,64,128,256 */ + if ((pDevice->PciState & T3_PCI_STATE_NOT_PCI_X_BUS) && + !(pDevice->Flags & PCI_EXPRESS_FLAG)) + { + /* PCI */ + DmaWrBdry = DMA_CTRL_WRITE_BOUNDARY_256; + } + else if (!(pDevice->Flags & PCI_EXPRESS_FLAG)) + { + /* PCI-X */ + DmaWrBdry = DMA_CTRL_WRITE_BOUNDARY_256_PCIX; + } + break; + } + } +#endif + pDevice->DmaReadWriteCtrl = DmaWrCmd | DmaRdCmd | DmaWrBdry | DmaRdBdry; + /* Program DMA Read/Write */ + if (pDevice->Flags & PCI_EXPRESS_FLAG) + { + + /* !=0 is 256 max or greater payload size so set water mark accordingly*/ + Value32 = (REG_RD(pDevice, PciCfg.DeviceCtrl) & MAX_PAYLOAD_SIZE_MASK); + if (Value32) + { + pDevice->DmaReadWriteCtrl |= DMA_CTRL_WRITE_PCIE_H20MARK_256; + }else + { + pDevice->DmaReadWriteCtrl |= DMA_CTRL_WRITE_PCIE_H20MARK_128; + } + + } + else if (pDevice->PciState & T3_PCI_STATE_NOT_PCI_X_BUS) + { + if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + pDevice->DmaReadWriteCtrl |= 0x003f0000; + } + else + { + pDevice->DmaReadWriteCtrl |= 0x003f000f; + } + } + else /* pci-x */ + { + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + pDevice->DmaReadWriteCtrl |= 0x009f0000; + } + + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) + { + pDevice->DmaReadWriteCtrl |= 0x009C0000; + } + + if( T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703 ) + { + Value32 = REG_RD(pDevice, PciCfg.ClockCtrl) & 0x1f; + if ((Value32 == 0x6) || (Value32 == 0x7)) + { + pDevice->Flags |= ONE_DMA_AT_ONCE_FLAG; + } + } + else if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId) ) + { + pDevice->DmaReadWriteCtrl &= ~DMA_CTRL_WRITE_ONE_DMA_AT_ONCE; + if( T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5780) + pDevice->DmaReadWriteCtrl |= (BIT_20 | BIT_18 | DMA_CTRL_WRITE_ONE_DMA_AT_ONCE); + else + pDevice->DmaReadWriteCtrl |= (BIT_20 | BIT_18 | BIT_15); + /* bit 15 is the current CQ 13140 Fix */ + } + else + { + pDevice->DmaReadWriteCtrl |= 0x001b000f; + } + } + if((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704)) + { + pDevice->DmaReadWriteCtrl &= 0xfffffff0; + } + + if (pDevice->Flags & ONE_DMA_AT_ONCE_FLAG) + { + pDevice->DmaReadWriteCtrl |= DMA_CTRL_WRITE_ONE_DMA_AT_ONCE; + } + + REG_WR(pDevice, PciCfg.DmaReadWriteCtrl, pDevice->DmaReadWriteCtrl); + + LM_SwitchClocks(pDevice); + + if (LM_DmaTest(pDevice, pMemVirt, MemPhy, 0x400) != LM_STATUS_SUCCESS) + { + return LM_STATUS_FAILURE; + } + + /* Status block. */ + pDevice->pStatusBlkVirt = (PT3_STATUS_BLOCK) pMemVirt; + pDevice->StatusBlkPhy = MemPhy; + pMemVirt += T3_STATUS_BLOCK_SIZE; + LM_INC_PHYSICAL_ADDRESS(&MemPhy, T3_STATUS_BLOCK_SIZE); + + /* Statistics block. */ + pDevice->pStatsBlkVirt = (PT3_STATS_BLOCK) pMemVirt; + pDevice->StatsBlkPhy = MemPhy; + pMemVirt += sizeof(T3_STATS_BLOCK); + LM_INC_PHYSICAL_ADDRESS(&MemPhy, sizeof(T3_STATS_BLOCK)); + + /* Receive standard BD buffer. */ + pDevice->pRxStdBdVirt = (PT3_RCV_BD) pMemVirt; + pDevice->RxStdBdPhy = MemPhy; + + pMemVirt += T3_STD_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD); + LM_INC_PHYSICAL_ADDRESS(&MemPhy, + T3_STD_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD)); + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + /* Receive jumbo BD buffer. */ + pDevice->pRxJumboBdVirt = (PT3_RCV_BD) pMemVirt; + pDevice->RxJumboBdPhy = MemPhy; + + pMemVirt += T3_JUMBO_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD); + LM_INC_PHYSICAL_ADDRESS(&MemPhy, + T3_JUMBO_RCV_RCB_ENTRY_COUNT * sizeof(T3_RCV_BD)); +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + /* Receive return BD buffer. */ + pDevice->pRcvRetBdVirt = (PT3_RCV_BD) pMemVirt; + pDevice->RcvRetBdPhy = MemPhy; + + pMemVirt += pDevice->RcvRetRcbEntryCount * sizeof(T3_RCV_BD); + LM_INC_PHYSICAL_ADDRESS(&MemPhy, + pDevice->RcvRetRcbEntryCount * sizeof(T3_RCV_BD)); + + /* Set up Send BD. */ + if (!(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + pDevice->pSendBdVirt = (PT3_SND_BD) pMemVirt; + pDevice->SendBdPhy = MemPhy; + + pMemVirt += sizeof(T3_SND_BD) * T3_SEND_RCB_ENTRY_COUNT; + LM_INC_PHYSICAL_ADDRESS(&MemPhy, + sizeof(T3_SND_BD) * T3_SEND_RCB_ENTRY_COUNT); + } +#ifdef BCM_NIC_SEND_BD + else + { + pDevice->pSendBdVirt = (PT3_SND_BD) + pDevice->pMemView->uIntMem.First32k.BufferDesc; + pDevice->SendBdPhy.High = 0; + pDevice->SendBdPhy.Low = T3_NIC_SND_BUFFER_DESC_ADDR; + } +#endif + + /* Allocate memory for packet descriptors. */ + Size = (pDevice->RxPacketDescCnt + + pDevice->TxPacketDescCnt) * MM_PACKET_DESC_SIZE; + Status = MM_AllocateMemory(pDevice, Size, (PLM_VOID *) &pPacket); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + pDevice->pPacketDescBase = (PLM_VOID) pPacket; + + /* Create transmit packet descriptors from the memory block and add them */ + /* to the TxPacketFreeQ for each send ring. */ + for(j = 0; j < pDevice->TxPacketDescCnt; j++) + { + /* Ring index. */ + pPacket->Flags = 0; + + /* Queue the descriptor in the TxPacketFreeQ of the 'k' ring. */ + QQ_PushTail(&pDevice->TxPacketFreeQ.Container, pPacket); + + /* Get the pointer to the next descriptor. MM_PACKET_DESC_SIZE */ + /* is the total size of the packet descriptor including the */ + /* os-specific extensions in the UM_PACKET structure. */ + pPacket = (PLM_PACKET) ((PLM_UINT8) pPacket + MM_PACKET_DESC_SIZE); + } /* for(j.. */ + + /* Create receive packet descriptors from the memory block and add them */ + /* to the RxPacketFreeQ. Create the Standard packet descriptors. */ + for(j = 0; j < pDevice->RxStdDescCnt; j++) + { + /* Receive producer ring. */ + pPacket->u.Rx.RcvProdRing = T3_STD_RCV_PROD_RING; + + /* Receive buffer size. */ + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (pDevice->RxJumboBufferSize) ) + { + pPacket->u.Rx.RxBufferSize = pDevice->RxJumboBufferSize; + }else{ + pPacket->u.Rx.RxBufferSize = MAX_STD_RCV_BUFFER_SIZE; + } + + /* Add the descriptor to RxPacketFreeQ. */ + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + + /* Get the pointer to the next descriptor. MM_PACKET_DESC_SIZE */ + /* is the total size of the packet descriptor including the */ + /* os-specific extensions in the UM_PACKET structure. */ + pPacket = (PLM_PACKET) ((PLM_UINT8) pPacket + MM_PACKET_DESC_SIZE); + } /* for */ + + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + /* Create the Jumbo packet descriptors. */ + for(j = 0; j < pDevice->RxJumboDescCnt; j++) + { + /* Receive producer ring. */ + pPacket->u.Rx.RcvProdRing = T3_JUMBO_RCV_PROD_RING; + + /* Receive buffer size. */ + pPacket->u.Rx.RxBufferSize = pDevice->RxJumboBufferSize; + + /* Add the descriptor to RxPacketFreeQ. */ + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + + /* Get the pointer to the next descriptor. MM_PACKET_DESC_SIZE */ + /* is the total size of the packet descriptor including the */ + /* os-specific extensions in the UM_PACKET structure. */ + pPacket = (PLM_PACKET) ((PLM_UINT8) pPacket + MM_PACKET_DESC_SIZE); + } /* for */ +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + /* Initialize the rest of the packet descriptors. */ + Status = MM_InitializeUmPackets(pDevice); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } /* if */ + + /* Default receive mask. */ + pDevice->ReceiveMask &= LM_KEEP_VLAN_TAG; + pDevice->ReceiveMask |= LM_ACCEPT_MULTICAST | LM_ACCEPT_BROADCAST | + LM_ACCEPT_UNICAST; + + /* Make sure we are in the first 32k memory window or NicSendBd. */ + REG_WR(pDevice, PciCfg.MemWindowBaseAddr, 0); + + /* Initialize the hardware. */ + Status = LM_ResetAdapter(pDevice); + if(Status != LM_STATUS_SUCCESS) + { + return Status; + } + + /* We are done with initialization. */ + pDevice->InitDone = TRUE; + + return LM_STATUS_SUCCESS; +} /* LM_InitializeAdapter */ + + +LM_STATUS +LM_DisableChip(PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 data; + + pDevice->RxMode &= ~RX_MODE_ENABLE; + REG_WR(pDevice, MacCtrl.RxMode, pDevice->RxMode); + if(!(REG_RD(pDevice, MacCtrl.RxMode) & RX_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, RcvBdIn.Mode); + data &= ~RCV_BD_IN_MODE_ENABLE; + REG_WR(pDevice, RcvBdIn.Mode,data); + if(!(REG_RD(pDevice, RcvBdIn.Mode) & RCV_BD_IN_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, RcvListPlmt.Mode); + data &= ~RCV_LIST_PLMT_MODE_ENABLE; + REG_WR(pDevice, RcvListPlmt.Mode,data); + if(!(REG_RD(pDevice, RcvListPlmt.Mode) & RCV_LIST_PLMT_MODE_ENABLE)) + { + MM_Wait(20); + } + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + data = REG_RD(pDevice, RcvListSel.Mode); + data &= ~RCV_LIST_SEL_MODE_ENABLE; + REG_WR(pDevice, RcvListSel.Mode,data); + if(!(REG_RD(pDevice, RcvListSel.Mode) & RCV_LIST_SEL_MODE_ENABLE)) + { + MM_Wait(20); + } + } + data = REG_RD(pDevice, RcvDataBdIn.Mode); + data &= ~RCV_DATA_BD_IN_MODE_ENABLE; + REG_WR(pDevice, RcvDataBdIn.Mode,data); + if(!(REG_RD(pDevice, RcvDataBdIn.Mode) & RCV_DATA_BD_IN_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, RcvDataComp.Mode); + data &= ~RCV_DATA_COMP_MODE_ENABLE; + REG_WR(pDevice, RcvDataComp.Mode,data); + if(!(REG_RD(pDevice, RcvDataBdIn.Mode) & RCV_DATA_COMP_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, RcvBdComp.Mode); + data &= ~RCV_BD_COMP_MODE_ENABLE; + REG_WR(pDevice, RcvBdComp.Mode,data); + if(!(REG_RD(pDevice, RcvBdComp.Mode) & RCV_BD_COMP_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, SndBdSel.Mode); + data &= ~SND_BD_SEL_MODE_ENABLE; + REG_WR(pDevice, SndBdSel.Mode, data); + if(!(REG_RD(pDevice, SndBdSel.Mode) & SND_BD_SEL_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, SndBdIn.Mode); + data &= ~SND_BD_IN_MODE_ENABLE; + REG_WR(pDevice, SndBdIn.Mode, data); + if(!(REG_RD(pDevice, SndBdIn.Mode) & SND_BD_IN_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, SndDataIn.Mode); + data &= ~T3_SND_DATA_IN_MODE_ENABLE; + REG_WR(pDevice, SndDataIn.Mode,data); + if(!(REG_RD(pDevice, SndDataIn.Mode) & T3_SND_DATA_IN_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, DmaRead.Mode); + data &= ~DMA_READ_MODE_ENABLE; + REG_WR(pDevice, DmaRead.Mode, data); + if(!(REG_RD(pDevice, DmaRead.Mode) & DMA_READ_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, SndDataComp.Mode); + data &= ~SND_DATA_COMP_MODE_ENABLE; + REG_WR(pDevice, SndDataComp.Mode, data); + if(!(REG_RD(pDevice, SndDataComp.Mode) & SND_DATA_COMP_MODE_ENABLE)) + { + MM_Wait(20); + } + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + data = REG_RD(pDevice,DmaComp.Mode); + data &= ~DMA_COMP_MODE_ENABLE; + REG_WR(pDevice, DmaComp.Mode, data); + if(!(REG_RD(pDevice, DmaComp.Mode) & DMA_COMP_MODE_ENABLE)) + { + MM_Wait(20); + } + } + data = REG_RD(pDevice, SndBdComp.Mode); + data &= ~SND_BD_COMP_MODE_ENABLE; + REG_WR(pDevice, SndBdComp.Mode, data); + if(!(REG_RD(pDevice, SndBdComp.Mode) & SND_BD_COMP_MODE_ENABLE)) + { + MM_Wait(20); + } + /* Clear TDE bit */ + pDevice->MacMode &= ~MAC_MODE_ENABLE_TDE; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + pDevice->TxMode &= ~TX_MODE_ENABLE; + REG_WR(pDevice, MacCtrl.TxMode, pDevice->TxMode); + if(!(REG_RD(pDevice, MacCtrl.TxMode) & TX_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, HostCoalesce.Mode); + data &= ~HOST_COALESCE_ENABLE; + REG_WR(pDevice, HostCoalesce.Mode, data); + if(!(REG_RD(pDevice, SndBdIn.Mode) & HOST_COALESCE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, DmaWrite.Mode); + data &= ~DMA_WRITE_MODE_ENABLE; + REG_WR(pDevice, DmaWrite.Mode,data); + if(!(REG_RD(pDevice, DmaWrite.Mode) & DMA_WRITE_MODE_ENABLE)) + { + MM_Wait(20); + } + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + data = REG_RD(pDevice, MbufClusterFree.Mode); + data &= ~MBUF_CLUSTER_FREE_MODE_ENABLE; + REG_WR(pDevice, MbufClusterFree.Mode,data); + if(!(REG_RD(pDevice, MbufClusterFree.Mode) & MBUF_CLUSTER_FREE_MODE_ENABLE)) + { + MM_Wait(20); + } + } + /* Reset all FTQs */ + REG_WR(pDevice, Ftq.Reset, 0xffffffff); + REG_WR(pDevice, Ftq.Reset, 0x0); + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + data = REG_RD(pDevice, BufMgr.Mode); + data &= ~BUFMGR_MODE_ENABLE; + REG_WR(pDevice, BufMgr.Mode,data); + if(!(REG_RD(pDevice, BufMgr.Mode) & BUFMGR_MODE_ENABLE)) + { + MM_Wait(20); + } + data = REG_RD(pDevice, MemArbiter.Mode); + data &= ~T3_MEM_ARBITER_MODE_ENABLE; + REG_WR(pDevice, MemArbiter.Mode, data); + if(!(REG_RD(pDevice, MemArbiter.Mode) & T3_MEM_ARBITER_MODE_ENABLE)) + { + MM_Wait(20); + } + } + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_DisableFW(PLM_DEVICE_BLOCK pDevice) +{ +#ifdef BCM_ASF + int j; + LM_UINT32 Value32; + + if (pDevice->AsfFlags & ASF_ENABLED) + { + MEM_WR_OFFSET(pDevice, T3_CMD_MAILBOX, T3_CMD_NICDRV_PAUSE_FW); + Value32 = REG_RD(pDevice, Grc.RxCpuEvent); + REG_WR(pDevice, Grc.RxCpuEvent, Value32 | BIT_14); + for (j = 0; j < 100; j++) + { + Value32 = REG_RD(pDevice, Grc.RxCpuEvent); + if (!(Value32 & BIT_14)) + { + break; + } + MM_Wait(1); + } + } +#endif + return LM_STATUS_SUCCESS; +} + +/******************************************************************************/ +/* Description: */ +/* This function reinitializes the adapter. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_ResetAdapter( +PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 Value32; + LM_UINT32 j, k; + int reset_count = 0; + + /* Disable interrupt. */ + LM_DisableInterrupt(pDevice); + +restart_reset: + LM_DisableFW(pDevice); + + /* May get a spurious interrupt */ + pDevice->pStatusBlkVirt->Status = STATUS_BLOCK_UPDATED; + + LM_WritePreResetSignatures(pDevice, LM_INIT_RESET); + /* Disable transmit and receive DMA engines. Abort all pending requests. */ + if(pDevice->InitDone) + { + LM_Abort(pDevice); + } + + pDevice->ShuttingDown = FALSE; + + LM_ResetChip(pDevice); + + LM_WriteLegacySignatures(pDevice, LM_INIT_RESET); + + /* Bug: Athlon fix for B3 silicon only. This bit does not do anything */ + /* in other chip revisions except 5750 */ + if ((pDevice->Flags & DELAY_PCI_GRANT_FLAG) && + !(pDevice->Flags & PCI_EXPRESS_FLAG)) + { + REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | BIT_31); + } + + if(pDevice->ChipRevId == T3_CHIP_ID_5704_A0) + { + if (!(pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE)) + { + Value32 = REG_RD(pDevice, PciCfg.PciState); + Value32 |= T3_PCI_STATE_RETRY_SAME_DMA; + REG_WR(pDevice, PciCfg.PciState, Value32); + } + } + if (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5704_BX) + { + /* New bits defined in register 0x64 to enable some h/w fixes */ + /* These new bits are 'write-only' */ + Value32 = REG_RD(pDevice, PciCfg.MsiData); + REG_WR(pDevice, PciCfg.MsiData, Value32 | BIT_26 | BIT_28 | BIT_29); + } + + /* Enable TaggedStatus mode. */ + if (pDevice->Flags & USE_TAGGED_STATUS_FLAG) + { + pDevice->MiscHostCtrl |= MISC_HOST_CTRL_ENABLE_TAGGED_STATUS_MODE; + } + + /* Restore PCI configuration registers. */ + MM_WriteConfig32(pDevice, PCI_CACHE_LINE_SIZE_REG, + pDevice->SavedCacheLineReg); + MM_WriteConfig32(pDevice, PCI_SUBSYSTEM_VENDOR_ID_REG, + (pDevice->SubsystemId << 16) | pDevice->SubsystemVendorId); + + /* Initialize the statistis Block */ + pDevice->pStatusBlkVirt->Status = 0; + pDevice->pStatusBlkVirt->RcvStdConIdx = 0; + pDevice->pStatusBlkVirt->RcvJumboConIdx = 0; + pDevice->pStatusBlkVirt->RcvMiniConIdx = 0; + + for(j = 0; j < 16; j++) + { + pDevice->pStatusBlkVirt->Idx[j].RcvProdIdx = 0; + pDevice->pStatusBlkVirt->Idx[j].SendConIdx = 0; + } + + for(k = 0; k < T3_STD_RCV_RCB_ENTRY_COUNT ;k++) + { + pDevice->pRxStdBdVirt[k].HostAddr.High = 0; + pDevice->pRxStdBdVirt[k].HostAddr.Low = 0; + pDevice->pRxStdBdVirt[k].Flags = RCV_BD_FLAG_END; + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (pDevice->RxJumboBufferSize) ) + pDevice->pRxStdBdVirt[k].Len = pDevice->RxJumboBufferSize; + else + pDevice->pRxStdBdVirt[k].Len = MAX_STD_RCV_BUFFER_SIZE; + } + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + /* Receive jumbo BD buffer. */ + for(k = 0; k < T3_JUMBO_RCV_RCB_ENTRY_COUNT; k++) + { + pDevice->pRxJumboBdVirt[k].HostAddr.High = 0; + pDevice->pRxJumboBdVirt[k].HostAddr.Low = 0; + pDevice->pRxJumboBdVirt[k].Flags = RCV_BD_FLAG_END | + RCV_BD_FLAG_JUMBO_RING; + pDevice->pRxJumboBdVirt[k].Len = (LM_UINT16) pDevice->RxJumboBufferSize; + } +#endif + + REG_WR(pDevice, PciCfg.DmaReadWriteCtrl, pDevice->DmaReadWriteCtrl); + + /* GRC mode control register. */ + Value32 = +#ifdef BIG_ENDIAN_HOST + GRC_MODE_BYTE_SWAP_NON_FRAME_DATA | + GRC_MODE_WORD_SWAP_NON_FRAME_DATA | + GRC_MODE_BYTE_SWAP_DATA | + GRC_MODE_WORD_SWAP_DATA | +#else + GRC_MODE_WORD_SWAP_NON_FRAME_DATA | + GRC_MODE_BYTE_SWAP_DATA | + GRC_MODE_WORD_SWAP_DATA | +#endif + GRC_MODE_INT_ON_MAC_ATTN | + GRC_MODE_HOST_STACK_UP; + + /* Configure send BD mode. */ + if (!(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + Value32 |= GRC_MODE_HOST_SEND_BDS; + } +#ifdef BCM_NIC_SEND_BD + else + { + Value32 |= GRC_MODE_4X_NIC_BASED_SEND_RINGS; + } +#endif + + /* Configure pseudo checksum mode. */ + if (pDevice->Flags & NO_TX_PSEUDO_HDR_CSUM_FLAG) + { + Value32 |= GRC_MODE_TX_NO_PSEUDO_HEADER_CHKSUM; + } + + if (pDevice->Flags & NO_RX_PSEUDO_HDR_CSUM_FLAG) + { + Value32 |= GRC_MODE_RX_NO_PSEUDO_HEADER_CHKSUM; + } + + pDevice->GrcMode = Value32; + REG_WR(pDevice, Grc.Mode, Value32); + + /* Setup the timer prescalar register. */ + Value32 = REG_RD(pDevice, Grc.MiscCfg) & ~0xff; + /* Clock is always 66Mhz. */ + REG_WR(pDevice, Grc.MiscCfg, Value32 | (65 << 1)); + + /* Set up the MBUF pool base address and size. */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION) + { + Value32 = LM_GetStkOffLdFirmwareSize(pDevice); + Value32 = (Value32 + 0x7f) & ~0x7f; + pDevice->MbufBase = T3_NIC_BCM5705_MBUF_POOL_ADDR + Value32; + pDevice->MbufSize = T3_NIC_BCM5705_MBUF_POOL_SIZE - Value32 - 0xa00; + REG_WR(pDevice, BufMgr.MbufPoolAddr, pDevice->MbufBase); + REG_WR(pDevice, BufMgr.MbufPoolSize, pDevice->MbufSize); + } +#endif + } + else if (!T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + REG_WR(pDevice, BufMgr.MbufPoolAddr, pDevice->MbufBase); + REG_WR(pDevice, BufMgr.MbufPoolSize, pDevice->MbufSize); + + /* Set up the DMA descriptor pool base address and size. */ + REG_WR(pDevice, BufMgr.DmaDescPoolAddr, T3_NIC_DMA_DESC_POOL_ADDR); + REG_WR(pDevice, BufMgr.DmaDescPoolSize, T3_NIC_DMA_DESC_POOL_SIZE); + + } + + /* Configure MBUF and Threshold watermarks */ + /* Configure the DMA read MBUF low water mark. */ + if(pDevice->TxMtu < MAX_ETHERNET_PACKET_BUFFER_SIZE) + { + if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + REG_WR(pDevice, BufMgr.MbufReadDmaLowWaterMark, + T3_DEF_DMA_MBUF_LOW_WMARK_5705); + REG_WR(pDevice, BufMgr.MbufMacRxLowWaterMark, + T3_DEF_RX_MAC_MBUF_LOW_WMARK_5705); + REG_WR(pDevice, BufMgr.MbufHighWaterMark, + T3_DEF_MBUF_HIGH_WMARK_5705); + } + else + { + REG_WR(pDevice, BufMgr.MbufReadDmaLowWaterMark, + T3_DEF_DMA_MBUF_LOW_WMARK); + REG_WR(pDevice, BufMgr.MbufMacRxLowWaterMark, + T3_DEF_RX_MAC_MBUF_LOW_WMARK); + REG_WR(pDevice, BufMgr.MbufHighWaterMark, + T3_DEF_MBUF_HIGH_WMARK); + } + }else if( T3_ASIC_5714_FAMILY(pDevice->ChipRevId)){ + + REG_WR(pDevice, BufMgr.MbufReadDmaLowWaterMark,0); + REG_WR(pDevice, BufMgr.MbufMacRxLowWaterMark,0x4b); + REG_WR(pDevice, BufMgr.MbufHighWaterMark,0x96); + } + else + { + REG_WR(pDevice, BufMgr.MbufReadDmaLowWaterMark, + T3_DEF_DMA_MBUF_LOW_WMARK_JUMBO); + REG_WR(pDevice, BufMgr.MbufMacRxLowWaterMark, + T3_DEF_RX_MAC_MBUF_LOW_WMARK_JUMBO); + REG_WR(pDevice, BufMgr.MbufHighWaterMark, + T3_DEF_MBUF_HIGH_WMARK_JUMBO); + } + + REG_WR(pDevice, BufMgr.DmaLowWaterMark, T3_DEF_DMA_DESC_LOW_WMARK); + REG_WR(pDevice, BufMgr.DmaHighWaterMark, T3_DEF_DMA_DESC_HIGH_WMARK); + + /* Enable buffer manager. */ + REG_WR(pDevice, BufMgr.Mode, BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE); + + for(j = 0 ;j < 2000; j++) + { + if(REG_RD(pDevice, BufMgr.Mode) & BUFMGR_MODE_ENABLE) + break; + MM_Wait(10); + } + + if(j >= 2000) + { + return LM_STATUS_FAILURE; + } + +/* GRC reset will reset FTQ */ +#if 0 + /* Enable the FTQs. */ + REG_WR(pDevice, Ftq.Reset, 0xffffffff); + REG_WR(pDevice, Ftq.Reset, 0); + + /* Wait until FTQ is ready */ + for(j = 0; j < 2000; j++) + { + if(REG_RD(pDevice, Ftq.Reset) == 0) + break; + MM_Wait(10); + } + + if(j >= 2000) + { + return LM_STATUS_FAILURE; + } +#endif + + /* Receive BD Ring replenish threshold. */ + REG_WR(pDevice, RcvBdIn.StdRcvThreshold, pDevice->RxStdDescCnt/8); + + /* Initialize the Standard Receive RCB. */ + REG_WR(pDevice, RcvDataBdIn.StdRcvRcb.HostRingAddr.High, + pDevice->RxStdBdPhy.High); + REG_WR(pDevice, RcvDataBdIn.StdRcvRcb.HostRingAddr.Low, + pDevice->RxStdBdPhy.Low); + REG_WR(pDevice, RcvDataBdIn.StdRcvRcb.NicRingAddr, + (LM_UINT32) T3_NIC_STD_RCV_BUFFER_DESC_ADDR); + + if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + REG_WR(pDevice, RcvDataBdIn.StdRcvRcb.u.MaxLen_Flags, + 512 << 16); + } + else + { + REG_WR(pDevice, RcvDataBdIn.StdRcvRcb.u.MaxLen_Flags, + MAX_STD_RCV_BUFFER_SIZE << 16); + + /* Initialize the Jumbo Receive RCB. */ + REG_WR(pDevice, RcvDataBdIn.JumboRcvRcb.u.MaxLen_Flags, + T3_RCB_FLAG_RING_DISABLED); +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + REG_WR(pDevice, RcvDataBdIn.JumboRcvRcb.HostRingAddr.High, + pDevice->RxJumboBdPhy.High); + REG_WR(pDevice, RcvDataBdIn.JumboRcvRcb.HostRingAddr.Low, + pDevice->RxJumboBdPhy.Low); + REG_WR(pDevice, RcvDataBdIn.JumboRcvRcb.u.MaxLen_Flags, 0); + REG_WR(pDevice, RcvDataBdIn.JumboRcvRcb.NicRingAddr, + (LM_UINT32) T3_NIC_JUMBO_RCV_BUFFER_DESC_ADDR); + + REG_WR(pDevice, RcvBdIn.JumboRcvThreshold, pDevice->RxJumboDescCnt/8); + +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + /* Initialize the Mini Receive RCB. */ + REG_WR(pDevice, RcvDataBdIn.MiniRcvRcb.u.MaxLen_Flags, + T3_RCB_FLAG_RING_DISABLED); + + /* Disable all the unused rings. */ + for(j = 0; j < T3_MAX_SEND_RCB_COUNT; j++) { + MEM_WR(pDevice, SendRcb[j].u.MaxLen_Flags, + T3_RCB_FLAG_RING_DISABLED); + } /* for */ + + } + + /* Initialize the indices. */ + pDevice->SendProdIdx = 0; + pDevice->SendConIdx = 0; + + MB_REG_WR(pDevice, Mailbox.SendHostProdIdx[0].Low, 0); + MB_REG_RD(pDevice, Mailbox.SendHostProdIdx[0].Low); + MB_REG_WR(pDevice, Mailbox.SendNicProdIdx[0].Low, 0); + MB_REG_RD(pDevice, Mailbox.SendNicProdIdx[0].Low); + + /* Set up host or NIC based send RCB. */ + if (!(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + MEM_WR(pDevice, SendRcb[0].HostRingAddr.High, + pDevice->SendBdPhy.High); + MEM_WR(pDevice, SendRcb[0].HostRingAddr.Low, + pDevice->SendBdPhy.Low); + + /* Setup the RCB. */ + MEM_WR(pDevice, SendRcb[0].u.MaxLen_Flags, + T3_SEND_RCB_ENTRY_COUNT << 16); + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + /* Set up the NIC ring address in the RCB. */ + MEM_WR(pDevice, SendRcb[0].NicRingAddr,T3_NIC_SND_BUFFER_DESC_ADDR); + } + for(k = 0; k < T3_SEND_RCB_ENTRY_COUNT; k++) + { + pDevice->pSendBdVirt[k].HostAddr.High = 0; + pDevice->pSendBdVirt[k].HostAddr.Low = 0; + } + } +#ifdef BCM_NIC_SEND_BD + else + { + MEM_WR(pDevice, SendRcb[0].HostRingAddr.High, 0); + MEM_WR(pDevice, SendRcb[0].HostRingAddr.Low, 0); + MEM_WR(pDevice, SendRcb[0].NicRingAddr, + pDevice->SendBdPhy.Low); + + for(k = 0; k < T3_SEND_RCB_ENTRY_COUNT; k++) + { + MM_MEMWRITEL(&(pDevice->pSendBdVirt[k].HostAddr.High), 0); + MM_MEMWRITEL(&(pDevice->pSendBdVirt[k].HostAddr.Low), 0); + MM_MEMWRITEL(&(pDevice->pSendBdVirt[k].u1.Len_Flags), 0); + pDevice->ShadowSendBd[k].HostAddr.High = 0; + pDevice->ShadowSendBd[k].u1.Len_Flags = 0; + } + } +#endif + MM_ATOMIC_SET(&pDevice->SendBdLeft, T3_SEND_RCB_ENTRY_COUNT-1); + + /* Configure the receive return rings. */ + for(j = 0; j < T3_MAX_RCV_RETURN_RCB_COUNT; j++) + { + MEM_WR(pDevice, RcvRetRcb[j].u.MaxLen_Flags, T3_RCB_FLAG_RING_DISABLED); + } + + pDevice->RcvRetConIdx = 0; + + MEM_WR(pDevice, RcvRetRcb[0].HostRingAddr.High, + pDevice->RcvRetBdPhy.High); + MEM_WR(pDevice, RcvRetRcb[0].HostRingAddr.Low, + pDevice->RcvRetBdPhy.Low); + + MEM_WR(pDevice, RcvRetRcb[0].NicRingAddr, 0); + + /* Setup the RCB. */ + MEM_WR(pDevice, RcvRetRcb[0].u.MaxLen_Flags, + pDevice->RcvRetRcbEntryCount << 16); + + /* Reinitialize RX ring producer index */ + MB_REG_WR(pDevice, Mailbox.RcvStdProdIdx.Low, 0); + MB_REG_RD(pDevice, Mailbox.RcvStdProdIdx.Low); + MB_REG_WR(pDevice, Mailbox.RcvJumboProdIdx.Low, 0); + MB_REG_RD(pDevice, Mailbox.RcvJumboProdIdx.Low); + MB_REG_WR(pDevice, Mailbox.RcvMiniProdIdx.Low, 0); + MB_REG_RD(pDevice, Mailbox.RcvMiniProdIdx.Low); + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + pDevice->RxJumboProdIdx = 0; + pDevice->RxJumboQueuedCnt = 0; +#endif + + /* Reinitialize our copy of the indices. */ + pDevice->RxStdProdIdx = 0; + pDevice->RxStdQueuedCnt = 0; + +#if T3_JUMBO_RCV_ENTRY_COUNT + pDevice->RxJumboProdIdx = 0; +#endif /* T3_JUMBO_RCV_ENTRY_COUNT */ + + /* Configure the MAC address. */ + LM_SetMacAddress(pDevice, pDevice->NodeAddress); + + /* Initialize the transmit random backoff seed. */ + Value32 = (pDevice->NodeAddress[0] + pDevice->NodeAddress[1] + + pDevice->NodeAddress[2] + pDevice->NodeAddress[3] + + pDevice->NodeAddress[4] + pDevice->NodeAddress[5]) & + MAC_TX_BACKOFF_SEED_MASK; + REG_WR(pDevice, MacCtrl.TxBackoffSeed, Value32); + + /* Receive MTU. Frames larger than the MTU is marked as oversized. */ + REG_WR(pDevice, MacCtrl.MtuSize, pDevice->RxMtu + 8); /* CRC + VLAN. */ + + /* Configure Time slot/IPG per 802.3 */ + REG_WR(pDevice, MacCtrl.TxLengths, 0x2620); + + /* + * Configure Receive Rules so that packets don't match + * Programmble rule will be queued to Return Ring 1 + */ + REG_WR(pDevice, MacCtrl.RcvRuleCfg, RX_RULE_DEFAULT_CLASS); + + /* + * Configure to have 16 Classes of Services (COS) and one + * queue per class. Bad frames are queued to RRR#1. + * And frames don't match rules are also queued to COS#1. + */ + REG_WR(pDevice, RcvListPlmt.Config, 0x181); + + /* Enable Receive Placement Statistics */ + if ((pDevice->DmaReadFifoSize == DMA_READ_MODE_FIFO_LONG_BURST) && + (pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION)) + { + Value32 = REG_RD(pDevice, RcvListPlmt.StatsEnableMask); + Value32 &= ~T3_DISABLE_LONG_BURST_READ_DYN_FIX; + REG_WR(pDevice, RcvListPlmt.StatsEnableMask, Value32); + } + else + { + REG_WR(pDevice, RcvListPlmt.StatsEnableMask,0xffffff); + } + REG_WR(pDevice, RcvListPlmt.StatsCtrl, RCV_LIST_STATS_ENABLE); + + /* Enable Send Data Initator Statistics */ + REG_WR(pDevice, SndDataIn.StatsEnableMask,0xffffff); + REG_WR(pDevice, SndDataIn.StatsCtrl, + T3_SND_DATA_IN_STATS_CTRL_ENABLE | \ + T3_SND_DATA_IN_STATS_CTRL_FASTER_UPDATE); + + /* Disable the host coalescing state machine before configuring it's */ + /* parameters. */ + REG_WR(pDevice, HostCoalesce.Mode, 0); + for(j = 0; j < 2000; j++) + { + Value32 = REG_RD(pDevice, HostCoalesce.Mode); + if(!(Value32 & HOST_COALESCE_ENABLE)) + { + break; + } + MM_Wait(10); + } + + /* Host coalescing configurations. */ + REG_WR(pDevice, HostCoalesce.RxCoalescingTicks, pDevice->RxCoalescingTicks); + REG_WR(pDevice, HostCoalesce.TxCoalescingTicks, pDevice->TxCoalescingTicks); + REG_WR(pDevice, HostCoalesce.RxMaxCoalescedFrames, + pDevice->RxMaxCoalescedFrames); + REG_WR(pDevice, HostCoalesce.TxMaxCoalescedFrames, + pDevice->TxMaxCoalescedFrames); + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + REG_WR(pDevice, HostCoalesce.RxCoalescedTickDuringInt, + pDevice->RxCoalescingTicksDuringInt); + REG_WR(pDevice, HostCoalesce.TxCoalescedTickDuringInt, + pDevice->TxCoalescingTicksDuringInt); + } + REG_WR(pDevice, HostCoalesce.RxMaxCoalescedFramesDuringInt, + pDevice->RxMaxCoalescedFramesDuringInt); + REG_WR(pDevice, HostCoalesce.TxMaxCoalescedFramesDuringInt, + pDevice->TxMaxCoalescedFramesDuringInt); + + /* Initialize the address of the status block. The NIC will DMA */ + /* the status block to this memory which resides on the host. */ + REG_WR(pDevice, HostCoalesce.StatusBlkHostAddr.High, + pDevice->StatusBlkPhy.High); + REG_WR(pDevice, HostCoalesce.StatusBlkHostAddr.Low, + pDevice->StatusBlkPhy.Low); + + /* Initialize the address of the statistics block. The NIC will DMA */ + /* the statistics to this block of memory. */ + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + REG_WR(pDevice, HostCoalesce.StatsBlkHostAddr.High, + pDevice->StatsBlkPhy.High); + REG_WR(pDevice, HostCoalesce.StatsBlkHostAddr.Low, + pDevice->StatsBlkPhy.Low); + + REG_WR(pDevice, HostCoalesce.StatsCoalescingTicks, + pDevice->StatsCoalescingTicks); + + REG_WR(pDevice, HostCoalesce.StatsBlkNicAddr, 0x300); + REG_WR(pDevice, HostCoalesce.StatusBlkNicAddr,0xb00); + } + + /* Enable Host Coalesing state machine */ + REG_WR(pDevice, HostCoalesce.Mode, HOST_COALESCE_ENABLE | + pDevice->CoalesceMode); + + /* Enable the Receive BD Completion state machine. */ + REG_WR(pDevice, RcvBdComp.Mode, RCV_BD_COMP_MODE_ENABLE | + RCV_BD_COMP_MODE_ATTN_ENABLE); + + /* Enable the Receive List Placement state machine. */ + REG_WR(pDevice, RcvListPlmt.Mode, RCV_LIST_PLMT_MODE_ENABLE); + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + /* Enable the Receive List Selector state machine. */ + REG_WR(pDevice, RcvListSel.Mode, RCV_LIST_SEL_MODE_ENABLE | + RCV_LIST_SEL_MODE_ATTN_ENABLE); + } + + /* Reset the Rx MAC State Machine. + * + * The Rx MAC State Machine must be reset when using fiber to prevent the + * first packet being lost. This is needed primarily so that the loopback + * test (which currently only sends one packet) doesn't fail. + * + * Also note that the Rx MAC State Machine (0x468) should be reset _before_ + * writting to the MAC Mode register (0x400). Failures have been seen on + * 5780/5714's using fiber where they stopped receiving packets in a simple + * ping test when the Rx MAC State Machine was reset _after_ the MAC Mode + * register was set. + */ + + if ((pDevice->TbiFlags & ENABLE_TBI_FLAG) || + (pDevice->PhyFlags & PHY_IS_FIBER)) + { + REG_WR(pDevice, MacCtrl.RxMode, RX_MODE_RESET); + REG_RD_BACK(pDevice, MacCtrl.RxMode); + MM_Wait(10); + REG_WR(pDevice, MacCtrl.RxMode, pDevice->RxMode); + REG_RD_BACK(pDevice, MacCtrl.RxMode); + } + + /* Clear the statistics block. */ + for(j = 0x0300; j < 0x0b00; j = j + 4) + { + MEM_WR_OFFSET(pDevice, j, 0); + } + + /* Set Mac Mode */ + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + pDevice->MacMode = MAC_MODE_PORT_MODE_TBI; + } + else if(pDevice->PhyFlags & PHY_IS_FIBER) + { + pDevice->MacMode = MAC_MODE_PORT_MODE_GMII; + } + else + { + pDevice->MacMode = 0; + } + + /* Enable transmit DMA, clear statistics. */ + pDevice->MacMode |= MAC_MODE_ENABLE_TX_STATISTICS | + MAC_MODE_ENABLE_RX_STATISTICS | MAC_MODE_ENABLE_TDE | + MAC_MODE_ENABLE_RDE | MAC_MODE_ENABLE_FHDE; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode | + MAC_MODE_CLEAR_RX_STATISTICS | MAC_MODE_CLEAR_TX_STATISTICS); + + /* GRC miscellaneous local control register. */ + pDevice->GrcLocalCtrl = GRC_MISC_LOCAL_CTRL_INT_ON_ATTN | + GRC_MISC_LOCAL_CTRL_AUTO_SEEPROM; + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + pDevice->GrcLocalCtrl |= GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1; + } + else if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) && + !(pDevice->Flags & EEPROM_WP_FLAG)) + { + /* Make sure we're on Vmain */ + /* The other port may cause us to be on Vaux */ + pDevice->GrcLocalCtrl |= GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2; + } + + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl); + MM_Wait(40); + + /* Reset RX counters. */ + for(j = 0; j < sizeof(LM_RX_COUNTERS); j++) + { + ((PLM_UINT8) &pDevice->RxCounters)[j] = 0; + } + + /* Reset TX counters. */ + for(j = 0; j < sizeof(LM_TX_COUNTERS); j++) + { + ((PLM_UINT8) &pDevice->TxCounters)[j] = 0; + } + + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 0); + MB_REG_RD(pDevice, Mailbox.Interrupt[0].Low); + pDevice->LastTag = 0; + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + /* Enable the DMA Completion state machine. */ + REG_WR(pDevice, DmaComp.Mode, DMA_COMP_MODE_ENABLE); + } + + /* Enable the DMA Write state machine. */ + Value32 = DMA_WRITE_MODE_ENABLE | + DMA_WRITE_MODE_TARGET_ABORT_ATTN_ENABLE | + DMA_WRITE_MODE_MASTER_ABORT_ATTN_ENABLE | + DMA_WRITE_MODE_PARITY_ERROR_ATTN_ENABLE | + DMA_WRITE_MODE_ADDR_OVERFLOW_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_OVERRUN_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_UNDERRUN_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_OVERREAD_ATTN_ENABLE | + DMA_WRITE_MODE_LONG_READ_ATTN_ENABLE; + + if (pDevice->Flags & DMA_WR_MODE_RX_ACCELERATE_FLAG) + { + Value32 |= DMA_WRITE_MODE_RECEIVE_ACCELERATE; + } + + if (pDevice->Flags & HOST_COALESCING_BUG_FIX) + { + Value32 |= (1 << 29); + } + + REG_WR(pDevice, DmaWrite.Mode, Value32); + + if (!(pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE)) + { + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) + { + Value32 = REG_RD(pDevice, PciCfg.PciXCapabilities); + Value32 &= ~PCIX_CMD_MAX_BURST_MASK; + Value32 |= PCIX_CMD_MAX_BURST_CPIOB << PCIX_CMD_MAX_BURST_SHL; + REG_WR(pDevice, PciCfg.PciXCapabilities, Value32); + } + else if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + Value32 = REG_RD(pDevice, PciCfg.PciXCapabilities); + Value32 &= ~(PCIX_CMD_MAX_SPLIT_MASK | PCIX_CMD_MAX_BURST_MASK); + Value32 |= ((PCIX_CMD_MAX_BURST_CPIOB << PCIX_CMD_MAX_BURST_SHL) & + PCIX_CMD_MAX_BURST_MASK); + if (pDevice->Flags & MULTI_SPLIT_ENABLE_FLAG) + { + Value32 |= (pDevice->SplitModeMaxReq << PCIX_CMD_MAX_SPLIT_SHL) + & PCIX_CMD_MAX_SPLIT_MASK; + } + REG_WR(pDevice, PciCfg.PciXCapabilities, Value32); + } + } + + /* Enable the Read DMA state machine. */ + Value32 = DMA_READ_MODE_ENABLE | + DMA_READ_MODE_TARGET_ABORT_ATTN_ENABLE | + DMA_READ_MODE_MASTER_ABORT_ATTN_ENABLE | + DMA_READ_MODE_PARITY_ERROR_ATTN_ENABLE | + DMA_READ_MODE_ADDR_OVERFLOW_ATTN_ENABLE | + DMA_READ_MODE_FIFO_OVERRUN_ATTN_ENABLE | + DMA_READ_MODE_FIFO_UNDERRUN_ATTN_ENABLE | + DMA_READ_MODE_FIFO_OVERREAD_ATTN_ENABLE | + DMA_READ_MODE_LONG_READ_ATTN_ENABLE; + + if (pDevice->Flags & MULTI_SPLIT_ENABLE_FLAG) + { + Value32 |= DMA_READ_MODE_MULTI_SPLIT_ENABLE; + } + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + Value32 |= pDevice->DmaReadFifoSize; + } +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + Value32 |= BIT_27; + } +#endif + + + REG_WR(pDevice, DmaRead.Mode, Value32); + + /* Enable the Receive Data Completion state machine. */ + REG_WR(pDevice, RcvDataComp.Mode, RCV_DATA_COMP_MODE_ENABLE | + RCV_DATA_COMP_MODE_ATTN_ENABLE); + + if (!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + /* Enable the Mbuf Cluster Free state machine. */ + REG_WR(pDevice, MbufClusterFree.Mode, MBUF_CLUSTER_FREE_MODE_ENABLE); + } + + /* Enable the Send Data Completion state machine. */ + REG_WR(pDevice, SndDataComp.Mode, SND_DATA_COMP_MODE_ENABLE); + + /* Enable the Send BD Completion state machine. */ + REG_WR(pDevice, SndBdComp.Mode, SND_BD_COMP_MODE_ENABLE | + SND_BD_COMP_MODE_ATTN_ENABLE); + + /* Enable the Receive BD Initiator state machine. */ + REG_WR(pDevice, RcvBdIn.Mode, RCV_BD_IN_MODE_ENABLE | + RCV_BD_IN_MODE_BD_IN_DIABLED_RCB_ATTN_ENABLE); + + /* Enable the Receive Data and Receive BD Initiator state machine. */ + REG_WR(pDevice, RcvDataBdIn.Mode, RCV_DATA_BD_IN_MODE_ENABLE | + RCV_DATA_BD_IN_MODE_INVALID_RING_SIZE); + + /* Enable the Send Data Initiator state machine. */ + REG_WR(pDevice, SndDataIn.Mode, T3_SND_DATA_IN_MODE_ENABLE); + +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + REG_WR(pDevice, SndDataIn.Mode, T3_SND_DATA_IN_MODE_ENABLE | 0x8); + } +#endif + + /* Enable the Send BD Initiator state machine. */ + REG_WR(pDevice, SndBdIn.Mode, SND_BD_IN_MODE_ENABLE | + SND_BD_IN_MODE_ATTN_ENABLE); + + /* Enable the Send BD Selector state machine. */ + REG_WR(pDevice, SndBdSel.Mode, SND_BD_SEL_MODE_ENABLE | + SND_BD_SEL_MODE_ATTN_ENABLE); + +#ifdef INCLUDE_5701_AX_FIX + /* Load the firmware for the 5701_A0 workaround. */ + if(pDevice->ChipRevId == T3_CHIP_ID_5701_A0) + { + LM_LoadRlsFirmware(pDevice); + } +#endif + + /* Queue Rx packet buffers. */ + if(pDevice->QueueRxPackets) + { + LM_QueueRxPackets(pDevice); + } + + if (pDevice->ChipRevId == T3_CHIP_ID_5705_A0) + { + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_STD_RCV_BUFFER_DESC_ADDR + 8); + j = 0; + while ((Value32 != MAX_STD_RCV_BUFFER_SIZE) && (j < 10)) + { + MM_Wait(20); + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_STD_RCV_BUFFER_DESC_ADDR + 8); + j++; + } + if (j >= 10) + { + reset_count++; + LM_Abort(pDevice); + if (reset_count > 5) + return LM_STATUS_FAILURE; + goto restart_reset; + } + } + + /* Enable the transmitter. */ + pDevice->TxMode = TX_MODE_ENABLE; + REG_WR(pDevice, MacCtrl.TxMode, pDevice->TxMode); + + /* Enable the receiver. */ + pDevice->RxMode = (pDevice->RxMode & RX_MODE_KEEP_VLAN_TAG) | + RX_MODE_ENABLE; + REG_WR(pDevice, MacCtrl.RxMode, pDevice->RxMode); + +#ifdef BCM_WOL + if (pDevice->RestoreOnWakeUp) + { + pDevice->RestoreOnWakeUp = FALSE; + pDevice->DisableAutoNeg = pDevice->WakeUpDisableAutoNeg; + pDevice->RequestedLineSpeed = pDevice->WakeUpRequestedLineSpeed; + pDevice->RequestedDuplexMode = pDevice->WakeUpRequestedDuplexMode; + } +#endif + + /* Disable auto polling. */ + pDevice->MiMode = 0xc0000; + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + + REG_WR(pDevice, MacCtrl.LedCtrl, pDevice->LedCtrl); + + /* Activate Link to enable MAC state machine */ + REG_WR(pDevice, MacCtrl.MiStatus, MI_STATUS_ENABLE_LINK_STATUS_ATTN); + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + if (pDevice->ChipRevId == T3_CHIP_ID_5703_A1) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, 0x616000); + } + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + + if(!(pDevice->TbiFlags & TBI_DO_PREEMPHASIS)) + { + /* Set SerDes drive transmission level to 1.2V */ + Value32 = REG_RD(pDevice, MacCtrl.SerdesCfg) & 0xfffff000; + REG_WR(pDevice, MacCtrl.SerdesCfg, Value32 | 0x880); + } + } + } + + REG_WR(pDevice, MacCtrl.LowWaterMarkMaxRxFrame, 2); + + /* ecd 13216 workaround for serdes */ + if ((pDevice->PhyFlags & PHY_IS_FIBER) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5780)) + { + Value32 = REG_RD_OFFSET(pDevice, 0x5b0); + REG_WR_OFFSET(pDevice, 0x5b0, Value32 | BIT_10 ); + + pDevice->GrcLocalCtrl |= BIT_4 ; + pDevice->GrcLocalCtrl &= ~BIT_5 ; + + REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl); + Value32 = REG_RD(pDevice, Grc.LocalCtrl); + MM_Wait(40); + } + + if (!pDevice->InitDone) + { + pDevice->LinkStatus = LM_STATUS_LINK_DOWN; + } + + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG) && + ( ((pDevice->PhyId & PHY_ID_MASK) != PHY_BCM5401_PHY_ID)&& + ((pDevice->PhyId & PHY_ID_MASK) != PHY_BCM5411_PHY_ID) )) + { + /* 5401/5411 PHY needs a delay of about 1 second after PHY reset */ + /* Without the delay, it has problem linking at forced 10 half */ + /* So skip the reset... */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5780) + for(j =0; j<0x5000; j++) + MM_Wait(1); + + LM_ResetPhy(pDevice); + } + + /* Setup the phy chip. */ + LM_SetupPhy(pDevice); + + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG)){ + /* Clear CRC stats */ + LM_ReadPhy(pDevice, 0x1e, &Value32); + LM_WritePhy(pDevice, 0x1e, Value32 | 0x8000); + LM_ReadPhy(pDevice, 0x14, &Value32); + } + + /* Set up the receive mask. */ + LM_SetReceiveMask(pDevice, pDevice->ReceiveMask); + +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (pDevice->TaskToOffload & LM_TASK_OFFLOAD_TCP_SEGMENTATION) + { + if (LM_LoadStkOffLdFirmware(pDevice) == LM_STATUS_FAILURE) + { + return LM_STATUS_FAILURE; + } + } +#endif + LM_WritePostResetSignatures(pDevice, LM_INIT_RESET); + + return LM_STATUS_SUCCESS; +} /* LM_ResetAdapter */ + + +/******************************************************************************/ +/* Description: */ +/* This routine disables the adapter from generating interrupts. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_DisableInterrupt( + PLM_DEVICE_BLOCK pDevice) +{ + REG_WR(pDevice, PciCfg.MiscHostCtrl, pDevice->MiscHostCtrl | + MISC_HOST_CTRL_MASK_PCI_INT); + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, 1); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.Interrupt[0].Low); + } + + return LM_STATUS_SUCCESS; +} + + + +/******************************************************************************/ +/* Description: */ +/* This routine enables the adapter to generate interrupts. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_EnableInterrupt( + PLM_DEVICE_BLOCK pDevice) +{ + MB_REG_WR(pDevice, Mailbox.Interrupt[0].Low, pDevice->LastTag << 24); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.Interrupt[0].Low); + } + + REG_WR(pDevice, PciCfg.MiscHostCtrl, pDevice->MiscHostCtrl & + ~MISC_HOST_CTRL_MASK_PCI_INT); + + REG_WR(pDevice, HostCoalesce.Mode, pDevice->CoalesceMode | + HOST_COALESCE_ENABLE | HOST_COALESCE_NOW); + + return LM_STATUS_SUCCESS; +} + + + +/******************************************************************************/ +/* Description: */ +/* This routine puts a packet on the wire if there is a transmit DMA */ +/* descriptor available; otherwise the packet is queued for later */ +/* transmission. If the second argue is NULL, this routine will put */ +/* the queued packet on the wire if possible. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_SendPacket(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket) +{ + LM_UINT32 FragCount; + PT3_SND_BD pSendBd, pTmpSendBd; +#ifdef BCM_NIC_SEND_BD + PT3_SND_BD pShadowSendBd; + T3_SND_BD NicSendBdArr[MAX_FRAGMENT_COUNT]; +#endif + LM_UINT32 StartIdx, Idx; + + while (1) + { + /* Initalize the send buffer descriptors. */ + StartIdx = Idx = pDevice->SendProdIdx; + +#ifdef BCM_NIC_SEND_BD + if (pDevice->Flags & NIC_SEND_BD_FLAG) + { + pTmpSendBd = pSendBd = &NicSendBdArr[0]; + } + else +#endif + { + pTmpSendBd = pSendBd = &pDevice->pSendBdVirt[Idx]; + } + + /* Next producer index. */ + for(FragCount = 0; ; ) + { + LM_UINT32 Value32, Len; + + /* Initialize the pointer to the send buffer fragment. */ + MM_MapTxDma(pDevice, pPacket, &pSendBd->HostAddr, &Len, FragCount); + + pSendBd->u2.VlanTag = pPacket->VlanTag; + + /* Setup the control flags and send buffer size. */ + Value32 = (Len << 16) | pPacket->Flags; + +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (Value32 & (SND_BD_FLAG_CPU_PRE_DMA | SND_BD_FLAG_CPU_POST_DMA)) + { + if(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + pSendBd->u2.s2.Reserved = pPacket->u.Tx.MaxSegmentSize; + } + else if (FragCount == 0) + { + pSendBd->u2.s2.Reserved = pPacket->u.Tx.MaxSegmentSize; + } + else + { + pSendBd->u2.s2.Reserved = 0; + Value32 &= 0xffff0fff; + } + } +#endif + Idx = (Idx + 1) & T3_SEND_RCB_ENTRY_COUNT_MASK; + + FragCount++; + if (FragCount >= pPacket->u.Tx.FragCount) + { + pSendBd->u1.Len_Flags = Value32 | SND_BD_FLAG_END; + break; + } + else + { + pSendBd->u1.Len_Flags = Value32; + } + + pSendBd++; + if ((Idx == 0) && + !(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + pSendBd = &pDevice->pSendBdVirt[0]; + } + + pDevice->SendRing[Idx] = 0; + + } /* for */ + if (pDevice->Flags & TX_4G_WORKAROUND_FLAG) + { + if (LM_Test4GBoundary(pDevice, pPacket, pTmpSendBd) == + LM_STATUS_SUCCESS) + { + if (MM_CoalesceTxBuffer(pDevice, pPacket) != LM_STATUS_SUCCESS) + { + QQ_PushHead(&pDevice->TxPacketFreeQ.Container, pPacket); + return LM_STATUS_FAILURE; + } + continue; + } + } + break; + } + /* Put the packet descriptor in the ActiveQ. */ + pDevice->SendRing[StartIdx] = pPacket; + +#ifdef BCM_NIC_SEND_BD + if (pDevice->Flags & NIC_SEND_BD_FLAG) + { + pSendBd = &pDevice->pSendBdVirt[StartIdx]; + pShadowSendBd = &pDevice->ShadowSendBd[StartIdx]; + + while (StartIdx != Idx) + { + LM_UINT32 Value32; + + if ((Value32 = pTmpSendBd->HostAddr.High) != + pShadowSendBd->HostAddr.High) + { + MM_MEMWRITEL(&(pSendBd->HostAddr.High), Value32); + pShadowSendBd->HostAddr.High = Value32; + } + + MM_MEMWRITEL(&(pSendBd->HostAddr.Low), pTmpSendBd->HostAddr.Low); + + if ((Value32 = pTmpSendBd->u1.Len_Flags) != + pShadowSendBd->u1.Len_Flags) + { + MM_MEMWRITEL(&(pSendBd->u1.Len_Flags), Value32); + pShadowSendBd->u1.Len_Flags = Value32; + } + + if (pPacket->Flags & SND_BD_FLAG_VLAN_TAG) + { + MM_MEMWRITEL(&(pSendBd->u2.VlanTag), pTmpSendBd->u2.VlanTag); + } + + StartIdx = (StartIdx + 1) & T3_SEND_RCB_ENTRY_COUNT_MASK; + if (StartIdx == 0) + { + pSendBd = &pDevice->pSendBdVirt[0]; + pShadowSendBd = &pDevice->ShadowSendBd[0]; + } + else + { + pSendBd++; + pShadowSendBd++; + } + pTmpSendBd++; + } + MM_WMB(); + MB_REG_WR(pDevice, Mailbox.SendNicProdIdx[0].Low, Idx); + + if(T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) + { + MB_REG_WR(pDevice, Mailbox.SendNicProdIdx[0].Low, Idx); + } + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.SendNicProdIdx[0].Low); + } + else + { + MM_MMIOWB(); + } + } + else +#endif + { + MM_WMB(); + MB_REG_WR(pDevice, Mailbox.SendHostProdIdx[0].Low, Idx); + + if(T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5700_BX) + { + MB_REG_WR(pDevice, Mailbox.SendHostProdIdx[0].Low, Idx); + } + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.SendHostProdIdx[0].Low); + } + else + { + MM_MMIOWB(); + } + } + + /* Update the SendBdLeft count. */ + MM_ATOMIC_SUB(&pDevice->SendBdLeft, pPacket->u.Tx.FragCount); + + /* Update the producer index. */ + pDevice->SendProdIdx = Idx; + + return LM_STATUS_SUCCESS; +} + +STATIC LM_STATUS +LM_Test4GBoundary(PLM_DEVICE_BLOCK pDevice, PLM_PACKET pPacket, + PT3_SND_BD pSendBd) +{ + int FragCount; + LM_UINT32 Idx, Base, Len; + + Idx = pDevice->SendProdIdx; + for(FragCount = 0; ; ) + { + Len = pSendBd->u1.Len_Flags >> 16; + if (((Base = pSendBd->HostAddr.Low) > 0xffffdcc0) && + ((Base + 8 + Len) < Base)) + { + return LM_STATUS_SUCCESS; + } + FragCount++; + if (FragCount >= pPacket->u.Tx.FragCount) + { + break; + } + pSendBd++; + if (!(pDevice->Flags & NIC_SEND_BD_FLAG)) + { + Idx = (Idx + 1) & T3_SEND_RCB_ENTRY_COUNT_MASK; + if (Idx == 0) + { + pSendBd = &pDevice->pSendBdVirt[0]; + } + } + } + return LM_STATUS_FAILURE; +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_UINT32 +ComputeCrc32(LM_UINT8 *pBuffer, LM_UINT32 BufferSize) +{ + LM_UINT32 Reg; + LM_UINT32 Tmp; + int j, k; + + Reg = 0xffffffff; + + for(j = 0; j < BufferSize; j++) + { + Reg ^= pBuffer[j]; + + for(k = 0; k < 8; k++) + { + Tmp = Reg & 0x01; + + Reg >>= 1; + + if(Tmp) + { + Reg ^= 0xedb88320; + } + } + } + + return ~Reg; +} /* ComputeCrc32 */ + + + +/******************************************************************************/ +/* Description: */ +/* This routine sets the receive control register according to ReceiveMask */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_SetReceiveMask(PLM_DEVICE_BLOCK pDevice, LM_UINT32 Mask) +{ + LM_UINT32 ReceiveMask; + LM_UINT32 RxMode; + LM_UINT32 j, k; + + ReceiveMask = Mask; + + RxMode = pDevice->RxMode; + + if(Mask & LM_ACCEPT_UNICAST) + { + Mask &= ~LM_ACCEPT_UNICAST; + } + + if(Mask & LM_ACCEPT_MULTICAST) + { + Mask &= ~LM_ACCEPT_MULTICAST; + } + + if(Mask & LM_ACCEPT_ALL_MULTICAST) + { + Mask &= ~LM_ACCEPT_ALL_MULTICAST; + } + + if(Mask & LM_ACCEPT_BROADCAST) + { + Mask &= ~LM_ACCEPT_BROADCAST; + } + + RxMode &= ~RX_MODE_KEEP_VLAN_TAG; + if (Mask & LM_KEEP_VLAN_TAG) + { + RxMode |= RX_MODE_KEEP_VLAN_TAG; + Mask &= ~LM_KEEP_VLAN_TAG; + } + + RxMode &= ~RX_MODE_PROMISCUOUS_MODE; + if(Mask & LM_PROMISCUOUS_MODE) + { + RxMode |= RX_MODE_PROMISCUOUS_MODE; + Mask &= ~LM_PROMISCUOUS_MODE; + } + + RxMode &= ~(RX_MODE_ACCEPT_RUNTS | RX_MODE_ACCEPT_OVERSIZED); + if(Mask & LM_ACCEPT_ERROR_PACKET) + { + RxMode |= RX_MODE_ACCEPT_RUNTS | RX_MODE_ACCEPT_OVERSIZED; + Mask &= ~LM_ACCEPT_ERROR_PACKET; + } + + /* Make sure all the bits are valid before committing changes. */ + if(Mask) + { + return LM_STATUS_FAILURE; + } + + /* Commit the new filter. */ + pDevice->ReceiveMask = ReceiveMask; + + pDevice->RxMode = RxMode; + + if (pDevice->PowerLevel != LM_POWER_STATE_D0) + { + return LM_STATUS_SUCCESS; + } + + REG_WR(pDevice, MacCtrl.RxMode, RxMode); + + /* Set up the MC hash table. */ + if(ReceiveMask & LM_ACCEPT_ALL_MULTICAST) + { + for(k = 0; k < 4; k++) + { + REG_WR(pDevice, MacCtrl.HashReg[k], 0xffffffff); + } + } + else if(ReceiveMask & LM_ACCEPT_MULTICAST) + { + for(k = 0; k < 4; k++) + { + REG_WR(pDevice, MacCtrl.HashReg[k], pDevice->MulticastHash[k]); + } + } + else + { + /* Reject all multicast frames. */ + for(j = 0; j < 4; j++) + { + REG_WR(pDevice, MacCtrl.HashReg[j], 0); + } + } + + /* By default, Tigon3 will accept broadcast frames. We need to setup */ + if(ReceiveMask & LM_ACCEPT_BROADCAST) + { + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE1_REJECT_BROADCAST_IDX].Rule, + REJECT_BROADCAST_RULE1_RULE & RCV_DISABLE_RULE_MASK); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE1_REJECT_BROADCAST_IDX].Value, + REJECT_BROADCAST_RULE1_VALUE & RCV_DISABLE_RULE_MASK); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE2_REJECT_BROADCAST_IDX].Rule, + REJECT_BROADCAST_RULE1_RULE & RCV_DISABLE_RULE_MASK); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE2_REJECT_BROADCAST_IDX].Value, + REJECT_BROADCAST_RULE1_VALUE & RCV_DISABLE_RULE_MASK); + } + else + { + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE1_REJECT_BROADCAST_IDX].Rule, + REJECT_BROADCAST_RULE1_RULE); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE1_REJECT_BROADCAST_IDX].Value, + REJECT_BROADCAST_RULE1_VALUE); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE2_REJECT_BROADCAST_IDX].Rule, + REJECT_BROADCAST_RULE2_RULE); + REG_WR(pDevice, MacCtrl.RcvRules[RCV_RULE2_REJECT_BROADCAST_IDX].Value, + REJECT_BROADCAST_RULE2_VALUE); + } + + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + { + k = 16; + } + else if (!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + k = 16; + } + else + { + k = 8; + } +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_ENABLED) + { + k -= 4; + } +#endif + + /* disable the rest of the rules. */ + for(j = RCV_LAST_RULE_IDX; j < k; j++) + { + REG_WR(pDevice, MacCtrl.RcvRules[j].Rule, 0); + REG_WR(pDevice, MacCtrl.RcvRules[j].Value, 0); + } + + return LM_STATUS_SUCCESS; +} /* LM_SetReceiveMask */ + + + +/******************************************************************************/ +/* Description: */ +/* Disable the interrupt and put the transmitter and receiver engines in */ +/* an idle state. Also aborts all pending send requests and receive */ +/* buffers. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_Abort( +PLM_DEVICE_BLOCK pDevice) +{ + PLM_PACKET pPacket; + LM_UINT Idx; + + LM_DisableInterrupt(pDevice); + + LM_DisableChip(pDevice); + + /* + * If we do not have a status block pointer, then + * the device hasn't really been opened. Do not + * attempt to clean up packets. + */ + if (pDevice->pStatusBlkVirt == NULL) + return LM_STATUS_SUCCESS; + + /* Abort packets that have already queued to go out. */ + Idx = pDevice->SendConIdx; + for ( ; ; ) + { + if ((pPacket = pDevice->SendRing[Idx])) + { + pDevice->SendRing[Idx] = 0; + pPacket->PacketStatus = LM_STATUS_TRANSMIT_ABORTED; + pDevice->TxCounters.TxPacketAbortedCnt++; + + MM_ATOMIC_ADD(&pDevice->SendBdLeft, pPacket->u.Tx.FragCount); + Idx = (Idx + pPacket->u.Tx.FragCount) & + T3_SEND_RCB_ENTRY_COUNT_MASK; + + QQ_PushTail(&pDevice->TxPacketXmittedQ.Container, pPacket); + } + else + { + break; + } + } + + /* Cleanup the receive return rings. */ +#ifdef BCM_NAPI_RXPOLL + LM_ServiceRxPoll(pDevice, T3_RCV_RETURN_RCB_ENTRY_COUNT); +#else + LM_ServiceRxInterrupt(pDevice); +#endif + + /* Indicate packets to the protocol. */ + MM_IndicateTxPackets(pDevice); + +#ifdef BCM_NAPI_RXPOLL + + /* Move the receive packet descriptors in the ReceivedQ to the */ + /* free queue. */ + for(; ;) + { + pPacket = (PLM_PACKET) QQ_PopHead( + &pDevice->RxPacketReceivedQ.Container); + if(pPacket == NULL) + { + break; + } + MM_UnmapRxDma(pDevice, pPacket); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + } +#else + /* Indicate received packets to the protocols. */ + MM_IndicateRxPackets(pDevice); +#endif + + /* Clean up the Std Receive Producer ring. */ + /* Don't always trust the consumer idx in the status block in case of */ + /* hw failure */ + Idx = 0; + + while(Idx < T3_STD_RCV_RCB_ENTRY_COUNT) + { + if ((pPacket = pDevice->RxStdRing[Idx])) + { + MM_UnmapRxDma(pDevice, pPacket); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + pDevice->RxStdRing[Idx] = 0; + } + + Idx++; + } /* while */ + + /* Reinitialize our copy of the indices. */ + pDevice->RxStdProdIdx = 0; + +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + /* Clean up the Jumbo Receive Producer ring. */ + Idx = 0; + + while(Idx < T3_JUMBO_RCV_RCB_ENTRY_COUNT) + { + if ((pPacket = pDevice->RxJumboRing[Idx])) + { + MM_UnmapRxDma(pDevice, pPacket); + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + pDevice->RxJumboRing[Idx] = 0; + } + Idx++; + } /* while */ + + /* Reinitialize our copy of the indices. */ + pDevice->RxJumboProdIdx = 0; +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + + /* Initialize the statistis Block */ + pDevice->pStatusBlkVirt->Status = 0; + pDevice->pStatusBlkVirt->RcvStdConIdx = 0; + pDevice->pStatusBlkVirt->RcvJumboConIdx = 0; + pDevice->pStatusBlkVirt->RcvMiniConIdx = 0; + + return LM_STATUS_SUCCESS; +} /* LM_Abort */ + + + +/******************************************************************************/ +/* Description: */ +/* Disable the interrupt and put the transmitter and receiver engines in */ +/* an idle state. Aborts all pending send requests and receive buffers. */ +/* Also free all the receive buffers. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_DoHalt(LM_DEVICE_BLOCK *pDevice) +{ + PLM_PACKET pPacket; + LM_UINT32 EntryCnt; + + LM_DisableFW(pDevice); + + LM_WritePreResetSignatures(pDevice, LM_SHUTDOWN_RESET); + LM_Abort(pDevice); + + /* Get the number of entries in the queue. */ + EntryCnt = QQ_GetEntryCnt(&pDevice->RxPacketFreeQ.Container); + + /* Make sure all the packets have been accounted for. */ + for(EntryCnt = 0; EntryCnt < pDevice->RxPacketDescCnt; EntryCnt++) + { + pPacket = (PLM_PACKET) QQ_PopHead(&pDevice->RxPacketFreeQ.Container); + if (pPacket == 0) + break; + + MM_FreeRxBuffer(pDevice, pPacket); + + QQ_PushTail(&pDevice->RxPacketFreeQ.Container, pPacket); + } + + LM_ResetChip(pDevice); + LM_WriteLegacySignatures(pDevice, LM_SHUTDOWN_RESET); + + /* Restore PCI configuration registers. */ + MM_WriteConfig32(pDevice, PCI_CACHE_LINE_SIZE_REG, + pDevice->SavedCacheLineReg); + LM_RegWrInd(pDevice, PCI_SUBSYSTEM_VENDOR_ID_REG, + (pDevice->SubsystemId << 16) | pDevice->SubsystemVendorId); + + /* Reprogram the MAC address. */ + LM_SetMacAddress(pDevice, pDevice->NodeAddress); + + return LM_STATUS_SUCCESS; +} /* LM_DoHalt */ + + +LM_STATUS +LM_Halt(LM_DEVICE_BLOCK *pDevice) +{ + LM_STATUS status; + + status = LM_DoHalt(pDevice); + LM_WritePostResetSignatures(pDevice, LM_SHUTDOWN_RESET); + return status; +} + + +STATIC LM_VOID +LM_WritePreResetSignatures(LM_DEVICE_BLOCK *pDevice, LM_RESET_TYPE Mode) +{ + MEM_WR_OFFSET(pDevice, T3_FIRMWARE_MAILBOX,T3_MAGIC_NUM_FIRMWARE_INIT_DONE); +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_NEW_HANDSHAKE) + { + if (Mode == LM_INIT_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_START); + } + else if (Mode == LM_SHUTDOWN_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_UNLOAD); + } + else if (Mode == LM_SUSPEND_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_SUSPEND); + } + } +#endif +} + +STATIC LM_VOID +LM_WritePostResetSignatures(LM_DEVICE_BLOCK *pDevice, LM_RESET_TYPE Mode) +{ +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_NEW_HANDSHAKE) + { + if (Mode == LM_INIT_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, + T3_DRV_STATE_START_DONE); + } + else if (Mode == LM_SHUTDOWN_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, + T3_DRV_STATE_UNLOAD_DONE); + } + } +#endif +} + +STATIC LM_VOID +LM_WriteLegacySignatures(LM_DEVICE_BLOCK *pDevice, LM_RESET_TYPE Mode) +{ +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_ENABLED) + { + if (Mode == LM_INIT_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_START); + } + else if (Mode == LM_SHUTDOWN_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_UNLOAD); + } + else if (Mode == LM_SUSPEND_RESET) + { + MEM_WR_OFFSET(pDevice, T3_DRV_STATE_MAILBOX, T3_DRV_STATE_SUSPEND); + } + } +#endif +} + +STATIC LM_STATUS +LM_ResetChip(PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 Value32; + LM_UINT32 j, tmp1 = 0, tmp2 = 0; + + /* Wait for access to the nvram interface before resetting. This is */ + /* a workaround to prevent EEPROM corruption. */ + if(T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700 && + T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701) + { + /* Request access to the flash interface. */ + LM_NVRAM_AcquireLock(pDevice); + } + + Value32 = GRC_MISC_CFG_CORE_CLOCK_RESET; + if (pDevice->Flags & PCI_EXPRESS_FLAG) + { + if (REG_RD_OFFSET(pDevice, 0x7e2c) == 0x60) /* PCIE 1.0 system */ + { + REG_WR_OFFSET(pDevice, 0x7e2c, 0x20); + } + if (pDevice->ChipRevId != T3_CHIP_ID_5750_A0) + { + /* This bit prevents PCIE link training during GRC reset */ + REG_WR(pDevice, Grc.MiscCfg, BIT_29); /* Write bit 29 first */ + Value32 |= BIT_29; /* and keep bit 29 set during GRC reset */ + } + } + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + Value32 |= GRC_MISC_GPHY_KEEP_POWER_DURING_RESET; + } + + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId) ) + { + /* Save the MSI ENABLE bit (may need to save the message as well) */ + tmp1 = LM_RegRd( pDevice, T3_PCI_MSI_ENABLE ); + } + + /* Global reset. */ + RAW_REG_WR(pDevice, Grc.MiscCfg, Value32); + MM_Wait(120); + + MM_ReadConfig32(pDevice, PCI_COMMAND_REG, &Value32); + + MM_Wait(120); + + /* make sure we re-enable indirect accesses */ + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, + pDevice->MiscHostCtrl); + + /* Set MAX PCI retry to zero. */ + Value32 = T3_PCI_STATE_PCI_ROM_ENABLE | T3_PCI_STATE_PCI_ROM_RETRY_ENABLE; + if (pDevice->ChipRevId == T3_CHIP_ID_5704_A0) + { + if (!(pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE)) + { + Value32 |= T3_PCI_STATE_RETRY_SAME_DMA; + } + } + MM_WriteConfig32(pDevice, T3_PCI_STATE_REG, Value32); + + /* Restore PCI command register. */ + MM_WriteConfig32(pDevice, PCI_COMMAND_REG, + pDevice->PciCommandStatusWords); + + /* Disable PCI-X relaxed ordering bit. */ + MM_ReadConfig32(pDevice, PCIX_CAP_REG, &Value32); + Value32 &= ~PCIX_ENABLE_RELAXED_ORDERING; + MM_WriteConfig32(pDevice, PCIX_CAP_REG, Value32); + + /* Enable memory arbiter */ + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId) ) + { + Value32 = REG_RD(pDevice,MemArbiter.Mode); + REG_WR(pDevice, MemArbiter.Mode, T3_MEM_ARBITER_MODE_ENABLE | Value32); + } + else + { + REG_WR(pDevice, MemArbiter.Mode, T3_MEM_ARBITER_MODE_ENABLE); + } + + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + { + /* restore the MSI ENABLE bit (may need to restore the message also) */ + tmp2 = LM_RegRd( pDevice, T3_PCI_MSI_ENABLE ); + tmp2 |= (tmp1 & (1 << 16)); + LM_RegWr( pDevice, T3_PCI_MSI_ENABLE, tmp2, TRUE ); + tmp2 = LM_RegRd( pDevice, T3_PCI_MSI_ENABLE ); + } + + + if (pDevice->ChipRevId == T3_CHIP_ID_5750_A3) + { + /* Because of chip bug on A3, we need to kill the CPU */ + LM_DisableFW(pDevice); + REG_WR_OFFSET(pDevice, 0x5000, 0x400); + } +#ifdef BIG_ENDIAN_HOST + /* Reconfigure the mode register. */ + Value32 = GRC_MODE_BYTE_SWAP_NON_FRAME_DATA | + GRC_MODE_WORD_SWAP_NON_FRAME_DATA | + GRC_MODE_BYTE_SWAP_DATA | + GRC_MODE_WORD_SWAP_DATA; +#else + /* Reconfigure the mode register. */ + Value32 = GRC_MODE_BYTE_SWAP_NON_FRAME_DATA | GRC_MODE_BYTE_SWAP_DATA; +#endif + REG_WR(pDevice, Grc.Mode, Value32); + + if ((pDevice->Flags & MINI_PCI_FLAG) && + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705)) + { + pDevice->ClockCtrl |= T3_PCI_CLKRUN_OUTPUT_EN; + if (pDevice->ChipRevId == T3_CHIP_ID_5705_A0) + { + pDevice->ClockCtrl |= T3_PCI_FORCE_CLKRUN; + } + REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl); + } + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + pDevice->MacMode = MAC_MODE_PORT_MODE_TBI; + } + else if(pDevice->PhyFlags & PHY_IS_FIBER) + { + pDevice->MacMode = MAC_MODE_PORT_MODE_GMII; + } + else + { + pDevice->MacMode = 0; + } + + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + REG_RD_BACK(pDevice, MacCtrl.Mode); + MM_Wait(40); + + /* Wait for the firmware to finish initialization. */ + for(j = 0; j < 100000; j++) + { + MM_Wait(10); + + if (j < 100) + continue; + + Value32 = MEM_RD_OFFSET(pDevice, T3_FIRMWARE_MAILBOX); + if(Value32 == ~T3_MAGIC_NUM_FIRMWARE_INIT_DONE) + { + break; + } + } + if ((j >= 0x100000) && (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704)) + { + /* workaround - need to reset nvram of both devices at the same time */ + /* if the boot code is not running */ + if (LM_NVRAM_AcquireLock(pDevice) != LM_STATUS_SUCCESS) + { + LM_DEVICE_BLOCK *pDevice2; + + REG_WR(pDevice, Nvram.Cmd, NVRAM_CMD_RESET); + pDevice2 = MM_FindPeerDev(pDevice); + if (pDevice2 && !pDevice2->InitDone) + { + REG_WR(pDevice2, Nvram.Cmd, NVRAM_CMD_RESET); + } + } + else + { + LM_NVRAM_ReleaseLock(pDevice); + } + } + + + if ((pDevice->Flags & PCI_EXPRESS_FLAG) && + (pDevice->ChipRevId != T3_CHIP_ID_5750_A0)) + { + /* Enable PCIE bug fix */ + Value32 = REG_RD_OFFSET(pDevice, 0x7c00); + REG_WR_OFFSET(pDevice, 0x7c00, Value32 | BIT_25 | BIT_29); + } + +#ifdef BCM_ASF + pDevice->AsfFlags = 0; + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_SIG_ADDR); + + if (Value32 == T3_NIC_DATA_SIG) + { + Value32 = MEM_RD_OFFSET(pDevice, T3_NIC_DATA_NIC_CFG_ADDR); + if (Value32 & T3_NIC_CFG_ENABLE_ASF) + { + pDevice->AsfFlags = ASF_ENABLED; + if (T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + pDevice->AsfFlags |= ASF_NEW_HANDSHAKE; + } + } + } +#endif + + return LM_STATUS_SUCCESS; +} + + +LM_STATUS +LM_ShutdownChip(PLM_DEVICE_BLOCK pDevice, LM_RESET_TYPE Mode) +{ + LM_DisableFW(pDevice); + LM_WritePreResetSignatures(pDevice, Mode); + if (pDevice->InitDone) + { + LM_Abort(pDevice); + } + else + { + LM_DisableChip(pDevice); + } + LM_ResetChip(pDevice); + LM_WriteLegacySignatures(pDevice, Mode); + LM_WritePostResetSignatures(pDevice, Mode); + return LM_STATUS_SUCCESS; +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +void +LM_ServiceTxInterrupt( +PLM_DEVICE_BLOCK pDevice) { + PLM_PACKET pPacket; + LM_UINT32 HwConIdx; + LM_UINT32 SwConIdx; + + HwConIdx = pDevice->pStatusBlkVirt->Idx[0].SendConIdx; + + /* Get our copy of the consumer index. The buffer descriptors */ + /* that are in between the consumer indices are freed. */ + SwConIdx = pDevice->SendConIdx; + + /* Move the packets from the TxPacketActiveQ that are sent out to */ + /* the TxPacketXmittedQ. Packets that are sent use the */ + /* descriptors that are between SwConIdx and HwConIdx. */ + while(SwConIdx != HwConIdx) + { + pPacket = pDevice->SendRing[SwConIdx]; + pDevice->SendRing[SwConIdx] = 0; + + /* Set the return status. */ + pPacket->PacketStatus = LM_STATUS_SUCCESS; + + /* Put the packet in the TxPacketXmittedQ for indication later. */ + QQ_PushTail(&pDevice->TxPacketXmittedQ.Container, pPacket); + + /* Move to the next packet's BD. */ + SwConIdx = (SwConIdx + pPacket->u.Tx.FragCount) & + T3_SEND_RCB_ENTRY_COUNT_MASK; + + /* Update the number of unused BDs. */ + MM_ATOMIC_ADD(&pDevice->SendBdLeft, pPacket->u.Tx.FragCount); + + /* Get the new updated HwConIdx. */ + HwConIdx = pDevice->pStatusBlkVirt->Idx[0].SendConIdx; + } /* while */ + + /* Save the new SwConIdx. */ + pDevice->SendConIdx = SwConIdx; + +} /* LM_ServiceTxInterrupt */ + + +#ifdef BCM_NAPI_RXPOLL +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +int +LM_ServiceRxPoll(PLM_DEVICE_BLOCK pDevice, int limit) +{ + PLM_PACKET pPacket=NULL; + PT3_RCV_BD pRcvBd; + LM_UINT32 HwRcvRetProdIdx; + LM_UINT32 SwRcvRetConIdx; + int received = 0; + + /* Loop thru the receive return rings for received packets. */ + HwRcvRetProdIdx = pDevice->pStatusBlkVirt->Idx[0].RcvProdIdx; + + SwRcvRetConIdx = pDevice->RcvRetConIdx; + MM_RMB(); + while (SwRcvRetConIdx != HwRcvRetProdIdx) + { + pRcvBd = &pDevice->pRcvRetBdVirt[SwRcvRetConIdx]; + + /* Get the received packet descriptor. */ + pPacket = (PLM_PACKET) (MM_UINT_PTR(pDevice->pPacketDescBase) + + MM_UINT_PTR(pRcvBd->Opaque)); + + switch(pPacket->u.Rx.RcvProdRing) { +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + case T3_JUMBO_RCV_PROD_RING: /* Jumbo Receive Ring. */ + pDevice->RxJumboRing[pPacket->u.Rx.RcvRingProdIdx] = 0; + break; +#endif + case T3_STD_RCV_PROD_RING: /* Standard Receive Ring. */ + pDevice->RxStdRing[pPacket->u.Rx.RcvRingProdIdx] = 0; + break; + } + + /* Check the error flag. */ + if(pRcvBd->ErrorFlag && + pRcvBd->ErrorFlag != RCV_BD_ERR_ODD_NIBBLED_RCVD_MII) + { + pPacket->PacketStatus = LM_STATUS_FAILURE; + + pDevice->RxCounters.RxPacketErrCnt++; + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_BAD_CRC) + { + pDevice->RxCounters.RxErrCrcCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_COLL_DETECT) + { + pDevice->RxCounters.RxErrCollCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_LINK_LOST_DURING_PKT) + { + pDevice->RxCounters.RxErrLinkLostCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_PHY_DECODE_ERR) + { + pDevice->RxCounters.RxErrPhyDecodeCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_ODD_NIBBLED_RCVD_MII) + { + pDevice->RxCounters.RxErrOddNibbleCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_MAC_ABORT) + { + pDevice->RxCounters.RxErrMacAbortCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_LEN_LT_64) + { + pDevice->RxCounters.RxErrShortPacketCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_TRUNC_NO_RESOURCES) + { + pDevice->RxCounters.RxErrNoResourceCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_GIANT_FRAME_RCVD) + { + pDevice->RxCounters.RxErrLargePacketCnt++; + } + } + else + { + pPacket->PacketStatus = LM_STATUS_SUCCESS; + pPacket->PacketSize = pRcvBd->Len - 4; + + pPacket->Flags = pRcvBd->Flags; + if(pRcvBd->Flags & RCV_BD_FLAG_VLAN_TAG) + { + pPacket->VlanTag = pRcvBd->VlanTag; + } + + pPacket->u.Rx.TcpUdpChecksum = pRcvBd->TcpUdpCksum; + } + + /* Put the packet descriptor containing the received packet */ + /* buffer in the RxPacketReceivedQ for indication later. */ + QQ_PushTail(&pDevice->RxPacketReceivedQ.Container, pPacket); + + /* Go to the next buffer descriptor. */ + SwRcvRetConIdx = (SwRcvRetConIdx + 1) & + pDevice->RcvRetRcbEntryCountMask; + + if (++received >= limit) + { + break; + } + } /* while */ + + pDevice->RcvRetConIdx = SwRcvRetConIdx; + + /* Update the receive return ring consumer index. */ + MB_REG_WR(pDevice, Mailbox.RcvRetConIdx[0].Low, SwRcvRetConIdx); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.RcvRetConIdx[0].Low); + } + else + { + MM_MMIOWB(); + } + return received; +} /* LM_ServiceRxPoll */ +#endif /* BCM_NAPI_RXPOLL */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +void +LM_ServiceRxInterrupt(PLM_DEVICE_BLOCK pDevice) +{ +#ifndef BCM_NAPI_RXPOLL + PLM_PACKET pPacket; + PT3_RCV_BD pRcvBd; +#endif + LM_UINT32 HwRcvRetProdIdx; + LM_UINT32 SwRcvRetConIdx; + + /* Loop thru the receive return rings for received packets. */ + HwRcvRetProdIdx = pDevice->pStatusBlkVirt->Idx[0].RcvProdIdx; + + SwRcvRetConIdx = pDevice->RcvRetConIdx; +#ifdef BCM_NAPI_RXPOLL + if (!pDevice->RxPoll) + { + if (SwRcvRetConIdx != HwRcvRetProdIdx) + { + if (MM_ScheduleRxPoll(pDevice) == LM_STATUS_SUCCESS) + { + pDevice->RxPoll = TRUE; + REG_WR(pDevice, Grc.Mode, + pDevice->GrcMode | GRC_MODE_NO_INTERRUPT_ON_RECEIVE); + } + } + } +#else + MM_RMB(); + while(SwRcvRetConIdx != HwRcvRetProdIdx) + { + pRcvBd = &pDevice->pRcvRetBdVirt[SwRcvRetConIdx]; + + /* Get the received packet descriptor. */ + pPacket = (PLM_PACKET) (MM_UINT_PTR(pDevice->pPacketDescBase) + + MM_UINT_PTR(pRcvBd->Opaque)); + + switch(pPacket->u.Rx.RcvProdRing) { +#if T3_JUMBO_RCV_RCB_ENTRY_COUNT + case T3_JUMBO_RCV_PROD_RING: /* Jumbo Receive Ring. */ + pDevice->RxJumboRing[pPacket->u.Rx.RcvRingProdIdx] = 0; + break; +#endif + case T3_STD_RCV_PROD_RING: /* Standard Receive Ring. */ + pDevice->RxStdRing[pPacket->u.Rx.RcvRingProdIdx] = 0; + break; + } + + /* Check the error flag. */ + if(pRcvBd->ErrorFlag && + pRcvBd->ErrorFlag != RCV_BD_ERR_ODD_NIBBLED_RCVD_MII) + { + pPacket->PacketStatus = LM_STATUS_FAILURE; + + pDevice->RxCounters.RxPacketErrCnt++; + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_BAD_CRC) + { + pDevice->RxCounters.RxErrCrcCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_COLL_DETECT) + { + pDevice->RxCounters.RxErrCollCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_LINK_LOST_DURING_PKT) + { + pDevice->RxCounters.RxErrLinkLostCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_PHY_DECODE_ERR) + { + pDevice->RxCounters.RxErrPhyDecodeCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_ODD_NIBBLED_RCVD_MII) + { + pDevice->RxCounters.RxErrOddNibbleCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_MAC_ABORT) + { + pDevice->RxCounters.RxErrMacAbortCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_LEN_LT_64) + { + pDevice->RxCounters.RxErrShortPacketCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_TRUNC_NO_RESOURCES) + { + pDevice->RxCounters.RxErrNoResourceCnt++; + } + + if(pRcvBd->ErrorFlag & RCV_BD_ERR_GIANT_FRAME_RCVD) + { + pDevice->RxCounters.RxErrLargePacketCnt++; + } + } + else + { + pPacket->PacketStatus = LM_STATUS_SUCCESS; + pPacket->PacketSize = pRcvBd->Len - 4; + + pPacket->Flags = pRcvBd->Flags; + if(pRcvBd->Flags & RCV_BD_FLAG_VLAN_TAG) + { + pPacket->VlanTag = pRcvBd->VlanTag; + } + + pPacket->u.Rx.TcpUdpChecksum = pRcvBd->TcpUdpCksum; + } + + /* Put the packet descriptor containing the received packet */ + /* buffer in the RxPacketReceivedQ for indication later. */ + QQ_PushTail(&pDevice->RxPacketReceivedQ.Container, pPacket); + + /* Go to the next buffer descriptor. */ + SwRcvRetConIdx = (SwRcvRetConIdx + 1) & + pDevice->RcvRetRcbEntryCountMask; + + } /* while */ + + pDevice->RcvRetConIdx = SwRcvRetConIdx; + + /* Update the receive return ring consumer index. */ + MB_REG_WR(pDevice, Mailbox.RcvRetConIdx[0].Low, SwRcvRetConIdx); + if (pDevice->Flags & FLUSH_POSTED_WRITE_FLAG) + { + MB_REG_RD(pDevice, Mailbox.RcvRetConIdx[0].Low); + } + else + { + MM_MMIOWB(); + } + +#endif +} /* LM_ServiceRxInterrupt */ + + + +/******************************************************************************/ +/* Description: */ +/* This is the interrupt event handler routine. It acknowledges all */ +/* pending interrupts and process all pending events. */ +/* */ +/* Return: */ +/* LM_STATUS_SUCCESS */ +/******************************************************************************/ +LM_STATUS +LM_ServiceInterrupts( + PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 Value32; + int ServicePhyInt = FALSE; + + /* Setup the phy chip whenever the link status changes. */ + if(pDevice->LinkChngMode == T3_LINK_CHNG_MODE_USE_STATUS_REG) + { + Value32 = REG_RD(pDevice, MacCtrl.Status); + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_MI_INTERRUPT) + { + if (Value32 & MAC_STATUS_MI_INTERRUPT) + { + ServicePhyInt = TRUE; + } + } + else if(Value32 & MAC_STATUS_LINK_STATE_CHANGED) + { + ServicePhyInt = TRUE; + } + } + else + { + if(pDevice->pStatusBlkVirt->Status & STATUS_BLOCK_LINK_CHANGED_STATUS) + { + pDevice->pStatusBlkVirt->Status = STATUS_BLOCK_UPDATED | + (pDevice->pStatusBlkVirt->Status & ~STATUS_BLOCK_LINK_CHANGED_STATUS); + ServicePhyInt = TRUE; + } + } +#ifdef INCLUDE_TBI_SUPPORT + if (pDevice->IgnoreTbiLinkChange == TRUE) + { + ServicePhyInt = FALSE; + } +#endif + if (ServicePhyInt == TRUE) + { + MM_ACQUIRE_PHY_LOCK_IN_IRQ(pDevice); + LM_SetupPhy(pDevice); + MM_RELEASE_PHY_LOCK_IN_IRQ(pDevice); + } + + /* Service receive and transmit interrupts. */ + LM_ServiceRxInterrupt(pDevice); + LM_ServiceTxInterrupt(pDevice); + +#ifndef BCM_NAPI_RXPOLL + /* No spinlock for this queue since this routine is serialized. */ + if(!QQ_Empty(&pDevice->RxPacketReceivedQ.Container)) + { + /* Indicate receive packets. */ + MM_IndicateRxPackets(pDevice); + } +#endif + + /* No spinlock for this queue since this routine is serialized. */ + if(!QQ_Empty(&pDevice->TxPacketXmittedQ.Container)) + { + MM_IndicateTxPackets(pDevice); + } + + return LM_STATUS_SUCCESS; +} /* LM_ServiceInterrupts */ + + +/******************************************************************************/ +/* Description: Add a Multicast address. Note that MC addresses, once added, */ +/* cannot be individually deleted. All addresses must be */ +/* cleared. */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_MulticastAdd(LM_DEVICE_BLOCK *pDevice, PLM_UINT8 pMcAddress) +{ + + LM_UINT32 RegIndex; + LM_UINT32 Bitpos; + LM_UINT32 Crc32; + + Crc32 = ComputeCrc32(pMcAddress, ETHERNET_ADDRESS_SIZE); + + /* The most significant 7 bits of the CRC32 (no inversion), */ + /* are used to index into one of the possible 128 bit positions. */ + Bitpos = ~Crc32 & 0x7f; + + /* Hash register index. */ + RegIndex = (Bitpos & 0x60) >> 5; + + /* Bit to turn on within a hash register. */ + Bitpos &= 0x1f; + + /* Enable the multicast bit. */ + pDevice->MulticastHash[RegIndex] |= (1 << Bitpos); + + LM_SetReceiveMask(pDevice, pDevice->ReceiveMask | LM_ACCEPT_MULTICAST); + + return LM_STATUS_SUCCESS; +} + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_MulticastDel(LM_DEVICE_BLOCK *pDevice, PLM_UINT8 pMcAddress) +{ + return LM_STATUS_FAILURE; +} /* LM_MulticastDel */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_MulticastClear(LM_DEVICE_BLOCK *pDevice) +{ + int i; + + for (i = 0; i < 4; i++) + { + pDevice->MulticastHash[i] = 0; + } + LM_SetReceiveMask(pDevice, pDevice->ReceiveMask & ~LM_ACCEPT_MULTICAST); + + return LM_STATUS_SUCCESS; +} /* LM_MulticastClear */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_SetMacAddress( + PLM_DEVICE_BLOCK pDevice, + PLM_UINT8 pMacAddress) +{ + LM_UINT32 j; + + for(j = 0; j < 4; j++) + { + REG_WR(pDevice, MacCtrl.MacAddr[j].High, + (pMacAddress[0] << 8) | pMacAddress[1]); + REG_WR(pDevice, MacCtrl.MacAddr[j].Low, + (pMacAddress[2] << 24) | (pMacAddress[3] << 16) | + (pMacAddress[4] << 8) | pMacAddress[5]); + } + + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703) || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704)) + { + for (j = 0; j < 12; j++) + { + REG_WR(pDevice, MacCtrl.MacAddrExt[j].High, + (pMacAddress[0] << 8) | pMacAddress[1]); + REG_WR(pDevice, MacCtrl.MacAddrExt[j].Low, + (pMacAddress[2] << 24) | (pMacAddress[3] << 16) | + (pMacAddress[4] << 8) | pMacAddress[5]); + } + } + return LM_STATUS_SUCCESS; +} + +LM_VOID +LM_PhyTapPowerMgmt(LM_DEVICE_BLOCK *pDevice) +{ + /* Turn off tap power management. */ + if((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x4c20); + LM_WritePhy(pDevice, BCM540X_DSP_ADDRESS_REG, 0x0012); + LM_WritePhy(pDevice, BCM540X_DSP_RW_PORT, 0x1804); + LM_WritePhy(pDevice, BCM540X_DSP_ADDRESS_REG, 0x0013); + LM_WritePhy(pDevice, BCM540X_DSP_RW_PORT, 0x1204); + LM_WritePhy(pDevice, BCM540X_DSP_ADDRESS_REG, 0x8006); + LM_WritePhy(pDevice, BCM540X_DSP_RW_PORT, 0x0132); + LM_WritePhy(pDevice, BCM540X_DSP_ADDRESS_REG, 0x8006); + LM_WritePhy(pDevice, BCM540X_DSP_RW_PORT, 0x0232); + LM_WritePhy(pDevice, BCM540X_DSP_ADDRESS_REG, 0x201f); + LM_WritePhy(pDevice, BCM540X_DSP_RW_PORT, 0x0a20); + + MM_Wait(40); + } +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/* LM_STATUS_LINK_ACTIVE */ +/* LM_STATUS_LINK_DOWN */ +/******************************************************************************/ +static LM_STATUS +LM_InitBcm540xPhy( +PLM_DEVICE_BLOCK pDevice) +{ + LM_LINE_SPEED CurrentLineSpeed; + LM_DUPLEX_MODE CurrentDuplexMode; + LM_STATUS CurrentLinkStatus; + LM_UINT32 Value32; + LM_UINT32 j; + + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x02); + + if ((pDevice->PhyFlags & PHY_RESET_ON_LINKDOWN) && + (pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE)) + { + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + if(!(Value32 & PHY_STATUS_LINK_PASS)) + { + LM_ResetPhy(pDevice); + } + } + if((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + { + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + + if(!pDevice->InitDone) + { + Value32 = 0; + } + + if(!(Value32 & PHY_STATUS_LINK_PASS)) + { + LM_PhyTapPowerMgmt(pDevice); + + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + for(j = 0; j < 1000; j++) + { + MM_Wait(10); + + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + if(Value32 & PHY_STATUS_LINK_PASS) + { + MM_Wait(40); + break; + } + } + + if((pDevice->PhyId & PHY_ID_REV_MASK) == PHY_BCM5401_B0_REV) + { + if(!(Value32 & PHY_STATUS_LINK_PASS) && + (pDevice->OldLineSpeed == LM_LINE_SPEED_1000MBPS)) + { + LM_ResetPhy(pDevice); + } + } + } + } + else if(pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0) + { + /* Bug: 5701 A0, B0 TX CRC workaround. */ + LM_WritePhy(pDevice, 0x15, 0x0a75); + LM_WritePhy(pDevice, 0x1c, 0x8c68); + LM_WritePhy(pDevice, 0x1c, 0x8d68); + LM_WritePhy(pDevice, 0x1c, 0x8c68); + } + + /* Acknowledge interrupts. */ + LM_ReadPhy(pDevice, BCM540X_INT_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, BCM540X_INT_STATUS_REG, &Value32); + + /* Configure the interrupt mask. */ + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_MI_INTERRUPT) + { + LM_WritePhy(pDevice, BCM540X_INT_MASK_REG, ~BCM540X_INT_LINK_CHANGE); + } + + /* Configure PHY led mode. */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700)) + { + if(pDevice->LedCtrl == LED_CTRL_PHY_MODE_1) + { + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, + BCM540X_EXT_CTRL_LINK3_LED_MODE); + } + else + { + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, 0); + } + } + + if (pDevice->PhyFlags & PHY_CAPACITIVE_COUPLING) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x4007); + LM_ReadPhy(pDevice, BCM5401_AUX_CTRL, &Value32); + if (!(Value32 & BIT_10)) + { + /* set the bit and re-link */ + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, Value32 | BIT_10); + return LM_STATUS_LINK_SETTING_MISMATCH; + } + } + + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + + /* Get current link and duplex mode. */ + for(j = 0; j < 100; j++) + { + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + + if(Value32 & PHY_STATUS_LINK_PASS) + { + break; + } + MM_Wait(40); + } + + if(Value32 & PHY_STATUS_LINK_PASS) + { + + /* Determine the current line and duplex settings. */ + LM_ReadPhy(pDevice, BCM540X_AUX_STATUS_REG, &Value32); + for(j = 0; j < 2000; j++) + { + MM_Wait(10); + + LM_ReadPhy(pDevice, BCM540X_AUX_STATUS_REG, &Value32); + if(Value32) + { + break; + } + } + + switch(Value32 & BCM540X_AUX_SPEED_MASK) + { + case BCM540X_AUX_10BASET_HD: + CurrentLineSpeed = LM_LINE_SPEED_10MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_HALF; + break; + + case BCM540X_AUX_10BASET_FD: + CurrentLineSpeed = LM_LINE_SPEED_10MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_FULL; + break; + + case BCM540X_AUX_100BASETX_HD: + CurrentLineSpeed = LM_LINE_SPEED_100MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_HALF; + break; + + case BCM540X_AUX_100BASETX_FD: + CurrentLineSpeed = LM_LINE_SPEED_100MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_FULL; + break; + + case BCM540X_AUX_100BASET_HD: + CurrentLineSpeed = LM_LINE_SPEED_1000MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_HALF; + break; + + case BCM540X_AUX_100BASET_FD: + CurrentLineSpeed = LM_LINE_SPEED_1000MBPS; + CurrentDuplexMode = LM_DUPLEX_MODE_FULL; + break; + + default: + + CurrentLineSpeed = LM_LINE_SPEED_UNKNOWN; + CurrentDuplexMode = LM_DUPLEX_MODE_UNKNOWN; + break; + } + + /* Make sure we are in auto-neg mode. */ + for (j = 0; j < 200; j++) + { + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + if(Value32 && Value32 != 0x7fff) + { + break; + } + + if(Value32 == 0 && + pDevice->RequestedLineSpeed == LM_LINE_SPEED_10MBPS && + pDevice->RequestedDuplexMode == LM_DUPLEX_MODE_HALF) + { + break; + } + + MM_Wait(10); + } + + /* Use the current line settings for "auto" mode. */ + if(pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) + { + if(Value32 & PHY_CTRL_AUTO_NEG_ENABLE) + { + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + + /* We may be exiting low power mode and the link is in */ + /* 10mb. In this case, we need to restart autoneg. */ + + if (LM_PhyAdvertiseAll(pDevice) != LM_STATUS_SUCCESS) + { + CurrentLinkStatus = LM_STATUS_LINK_SETTING_MISMATCH; + } + } + else + { + CurrentLinkStatus = LM_STATUS_LINK_SETTING_MISMATCH; + } + } + else + { + /* Force line settings. */ + /* Use the current setting if it matches the user's requested */ + /* setting. */ + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + if((pDevice->LineSpeed == CurrentLineSpeed) && + (pDevice->DuplexMode == CurrentDuplexMode)) + { + if ((pDevice->DisableAutoNeg && + !(Value32 & PHY_CTRL_AUTO_NEG_ENABLE)) || + (!pDevice->DisableAutoNeg && + (Value32 & PHY_CTRL_AUTO_NEG_ENABLE))) + { + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + else + { + CurrentLinkStatus = LM_STATUS_LINK_SETTING_MISMATCH; + } + } + else + { + CurrentLinkStatus = LM_STATUS_LINK_SETTING_MISMATCH; + } + } + + /* Save line settings. */ + pDevice->LineSpeed = CurrentLineSpeed; + pDevice->DuplexMode = CurrentDuplexMode; + } + + return CurrentLinkStatus; +} /* LM_InitBcm540xPhy */ + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_SetFlowControl( + PLM_DEVICE_BLOCK pDevice, + LM_UINT32 LocalPhyAd, + LM_UINT32 RemotePhyAd) +{ + LM_FLOW_CONTROL FlowCap; + + /* Resolve flow control. */ + FlowCap = LM_FLOW_CONTROL_NONE; + + /* See Table 28B-3 of 802.3ab-1999 spec. */ + if(pDevice->FlowControlCap & LM_FLOW_CONTROL_AUTO_PAUSE) + { + if(pDevice->PhyFlags & PHY_IS_FIBER){ + LocalPhyAd &= ~(PHY_AN_AD_ASYM_PAUSE | + PHY_AN_AD_PAUSE_CAPABLE); + RemotePhyAd &= ~(PHY_AN_AD_ASYM_PAUSE | + PHY_AN_AD_PAUSE_CAPABLE); + + if (LocalPhyAd & PHY_AN_AD_1000XPAUSE) + LocalPhyAd |= PHY_AN_AD_PAUSE_CAPABLE; + if (LocalPhyAd & PHY_AN_AD_1000XPSE_ASYM) + LocalPhyAd |= PHY_AN_AD_ASYM_PAUSE; + if (RemotePhyAd & PHY_AN_AD_1000XPAUSE) + RemotePhyAd |= PHY_LINK_PARTNER_PAUSE_CAPABLE; + if (RemotePhyAd & PHY_AN_AD_1000XPSE_ASYM) + RemotePhyAd |= PHY_LINK_PARTNER_ASYM_PAUSE; + } + + if(LocalPhyAd & PHY_AN_AD_PAUSE_CAPABLE) + { + if(LocalPhyAd & PHY_AN_AD_ASYM_PAUSE) + { + if(RemotePhyAd & PHY_LINK_PARTNER_PAUSE_CAPABLE) + { + FlowCap = LM_FLOW_CONTROL_TRANSMIT_PAUSE | + LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + else if(RemotePhyAd & PHY_LINK_PARTNER_ASYM_PAUSE) + { + FlowCap = LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + } + else + { + if(RemotePhyAd & PHY_LINK_PARTNER_PAUSE_CAPABLE) + { + FlowCap = LM_FLOW_CONTROL_TRANSMIT_PAUSE | + LM_FLOW_CONTROL_RECEIVE_PAUSE; + } + } + } + else if(LocalPhyAd & PHY_AN_AD_ASYM_PAUSE) + { + if((RemotePhyAd & PHY_LINK_PARTNER_PAUSE_CAPABLE) && + (RemotePhyAd & PHY_LINK_PARTNER_ASYM_PAUSE)) + { + FlowCap = LM_FLOW_CONTROL_TRANSMIT_PAUSE; + } + } + } + else + { + FlowCap = pDevice->FlowControlCap; + } + + pDevice->FlowControl = LM_FLOW_CONTROL_NONE; + + /* Enable/disable rx PAUSE. */ + pDevice->RxMode &= ~RX_MODE_ENABLE_FLOW_CONTROL; + if(FlowCap & LM_FLOW_CONTROL_RECEIVE_PAUSE && + (pDevice->FlowControlCap == LM_FLOW_CONTROL_AUTO_PAUSE || + pDevice->FlowControlCap & LM_FLOW_CONTROL_RECEIVE_PAUSE)) + { + pDevice->FlowControl |= LM_FLOW_CONTROL_RECEIVE_PAUSE; + pDevice->RxMode |= RX_MODE_ENABLE_FLOW_CONTROL; + + } + REG_WR(pDevice, MacCtrl.RxMode, pDevice->RxMode); + + /* Enable/disable tx PAUSE. */ + pDevice->TxMode &= ~TX_MODE_ENABLE_FLOW_CONTROL; + if(FlowCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE && + (pDevice->FlowControlCap == LM_FLOW_CONTROL_AUTO_PAUSE || + pDevice->FlowControlCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE)) + { + pDevice->FlowControl |= LM_FLOW_CONTROL_TRANSMIT_PAUSE; + pDevice->TxMode |= TX_MODE_ENABLE_FLOW_CONTROL; + + } + REG_WR(pDevice, MacCtrl.TxMode, pDevice->TxMode); + + return LM_STATUS_SUCCESS; +} + + +#ifdef INCLUDE_TBI_SUPPORT +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_InitBcm800xPhy( + PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 Value32; + LM_UINT32 j; + + + Value32 = REG_RD(pDevice, MacCtrl.Status); + + /* Reset the SERDES during init and when we have link. */ + if(!pDevice->InitDone || Value32 & MAC_STATUS_PCS_SYNCED) + { + /* Set PLL lock range. */ + LM_WritePhy(pDevice, 0x16, 0x8007); + + /* Software reset. */ + LM_WritePhy(pDevice, 0x00, 0x8000); + + /* Wait for reset to complete. */ + for(j = 0; j < 500; j++) + { + MM_Wait(10); + } + + /* Config mode; seletct PMA/Ch 1 regs. */ + LM_WritePhy(pDevice, 0x10, 0x8411); + + /* Enable auto-lock and comdet, select txclk for tx. */ + LM_WritePhy(pDevice, 0x11, 0x0a10); + + LM_WritePhy(pDevice, 0x18, 0x00a0); + LM_WritePhy(pDevice, 0x16, 0x41ff); + + /* Assert and deassert POR. */ + LM_WritePhy(pDevice, 0x13, 0x0400); + MM_Wait(40); + LM_WritePhy(pDevice, 0x13, 0x0000); + + LM_WritePhy(pDevice, 0x11, 0x0a50); + MM_Wait(40); + LM_WritePhy(pDevice, 0x11, 0x0a10); + + /* Delay for signal to stabilize. */ + for(j = 0; j < 15000; j++) + { + MM_Wait(10); + } + + /* Deselect the channel register so we can read the PHY id later. */ + LM_WritePhy(pDevice, 0x10, 0x8011); + } + + return LM_STATUS_SUCCESS; +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +STATIC LM_STATUS +LM_SetupFiberPhy( + PLM_DEVICE_BLOCK pDevice) +{ + LM_STATUS CurrentLinkStatus; + AUTONEG_STATUS AnStatus = 0; + LM_UINT32 Value32; + LM_UINT32 Cnt; + LM_UINT32 j, k; + LM_UINT32 MacStatus, RemotePhyAd, LocalPhyAd; + LM_FLOW_CONTROL PreviousFlowControl = pDevice->FlowControl; + + + if (pDevice->LoopBackMode == LM_MAC_LOOP_BACK_MODE) + { + pDevice->LinkStatus = LM_STATUS_LINK_ACTIVE; + MM_IndicateStatus(pDevice, LM_STATUS_LINK_ACTIVE); + return LM_STATUS_SUCCESS; + } + + + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5704) && + (pDevice->LinkStatus == LM_STATUS_LINK_ACTIVE) && pDevice->InitDone) + { + MacStatus = REG_RD(pDevice, MacCtrl.Status); + if ((MacStatus & (MAC_STATUS_PCS_SYNCED | MAC_STATUS_SIGNAL_DETECTED | + MAC_STATUS_CFG_CHANGED | MAC_STATUS_RECEIVING_CFG)) + == (MAC_STATUS_PCS_SYNCED | MAC_STATUS_SIGNAL_DETECTED)) + { + + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED); + return LM_STATUS_SUCCESS; + } + } + pDevice->MacMode &= ~(MAC_MODE_HALF_DUPLEX | MAC_MODE_PORT_MODE_MASK); + + /* Initialize the send_config register. */ + REG_WR(pDevice, MacCtrl.TxAutoNeg, 0); + + pDevice->MacMode |= MAC_MODE_PORT_MODE_TBI; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + MM_Wait(10); + + /* Initialize the BCM8002 SERDES PHY. */ + switch(pDevice->PhyId & PHY_ID_MASK) + { + case PHY_BCM8002_PHY_ID: + LM_InitBcm800xPhy(pDevice); + break; + + default: + break; + } + + /* Enable link change interrupt. */ + REG_WR(pDevice, MacCtrl.MacEvent, MAC_EVENT_ENABLE_LINK_STATE_CHANGED_ATTN); + + /* Default to link down. */ + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + + /* Get the link status. */ + MacStatus = REG_RD(pDevice, MacCtrl.Status); + + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + LM_UINT32 SgDigCtrl, SgDigStatus; + LM_UINT32 SerdesCfg = 0; + LM_UINT32 ExpectedSgDigCtrl = 0; + LM_UINT32 WorkAround = 0; + LM_UINT32 PortA = 1; + + if ((pDevice->ChipRevId != T3_CHIP_ID_5704_A0) && + (pDevice->ChipRevId != T3_CHIP_ID_5704_A1)) + { + WorkAround = 1; + if (REG_RD(pDevice, PciCfg.DualMacCtrl) & T3_DUAL_MAC_ID) + { + PortA = 0; + } + + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + /* Save voltage reg bits & bits 14:0 */ + SerdesCfg = REG_RD(pDevice, MacCtrl.SerdesCfg) & + (BIT_23 | BIT_22 | BIT_21 | BIT_20 | 0x7fff ); + + } + else + { + /* preserve the voltage regulator bits */ + SerdesCfg = REG_RD(pDevice, MacCtrl.SerdesCfg) & + (BIT_23 | BIT_22 | BIT_21 | BIT_20); + } + } + SgDigCtrl = REG_RD(pDevice, MacCtrl.SgDigControl); + if((pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) || + (pDevice->DisableAutoNeg == FALSE)) + { + + ExpectedSgDigCtrl = 0x81388400; + LocalPhyAd = GetPhyAdFlowCntrlSettings(pDevice); + if(LocalPhyAd & PHY_AN_AD_PAUSE_CAPABLE) + { + ExpectedSgDigCtrl |= BIT_11; + } + if(LocalPhyAd & PHY_AN_AD_ASYM_PAUSE) + { + ExpectedSgDigCtrl |= BIT_12; + } + if (SgDigCtrl != ExpectedSgDigCtrl) + { + if (WorkAround) + { + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, 0xc011000 | SerdesCfg); + } + else + { + REG_WR(pDevice, MacCtrl.SerdesCfg, 0xc011880 | SerdesCfg); + } + } + REG_WR(pDevice, MacCtrl.SgDigControl, ExpectedSgDigCtrl | + BIT_30); + REG_RD_BACK(pDevice, MacCtrl.SgDigControl); + MM_Wait(5); + REG_WR(pDevice, MacCtrl.SgDigControl, ExpectedSgDigCtrl); + pDevice->AutoNegJustInited = TRUE; + } + /* If autoneg is off, you only get SD when link is up */ + else if(MacStatus & (MAC_STATUS_PCS_SYNCED | + MAC_STATUS_SIGNAL_DETECTED)) + { + SgDigStatus = REG_RD(pDevice, MacCtrl.SgDigStatus); + if ((SgDigStatus & BIT_1) && + (MacStatus & MAC_STATUS_PCS_SYNCED)) + { + /* autoneg. completed */ + RemotePhyAd = 0; + if(SgDigStatus & BIT_19) + { + RemotePhyAd |= PHY_LINK_PARTNER_PAUSE_CAPABLE; + } + + if(SgDigStatus & BIT_20) + { + RemotePhyAd |= PHY_LINK_PARTNER_ASYM_PAUSE; + } + + LM_SetFlowControl(pDevice, LocalPhyAd, RemotePhyAd); + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + pDevice->AutoNegJustInited = FALSE; + } + else if (!(SgDigStatus & BIT_1)) + { + if (pDevice->AutoNegJustInited == TRUE) + { + /* we may be checking too soon, so check again */ + /* at the next poll interval */ + pDevice->AutoNegJustInited = FALSE; + } + else + { + /* autoneg. failed */ + if (WorkAround) + { + if (PortA) + { + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0xc010000 | (SerdesCfg & ~0x00001000)); + } + else + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0xc010880 | SerdesCfg); + } + } + else + { + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0x4010000 | (SerdesCfg & ~0x00001000)); + } + else + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0x4010880 | SerdesCfg); + } + } + } + /* turn off autoneg. to allow traffic to pass */ + REG_WR(pDevice, MacCtrl.SgDigControl, 0x01388400); + REG_RD_BACK(pDevice, MacCtrl.SgDigControl); + MM_Wait(40); + MacStatus = REG_RD(pDevice, MacCtrl.Status); + if ((MacStatus & MAC_STATUS_PCS_SYNCED) && !(MacStatus & MAC_STATUS_RECEIVING_CFG)) + { + LM_SetFlowControl(pDevice, 0, 0); + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + } + } + } + } + else + { + if (SgDigCtrl & BIT_31) { + if (WorkAround) + { + if (PortA) + { + + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0xc010000 | (SerdesCfg & ~0x00001000)); + } + else + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0xc010880 | SerdesCfg); + } + } + else + { + if(pDevice->TbiFlags & TBI_DO_PREEMPHASIS) + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0x4010000 | (SerdesCfg & ~0x00001000)); + } + else + { + REG_WR(pDevice, MacCtrl.SerdesCfg, + 0x4010880 | SerdesCfg); + } + } + } + REG_WR(pDevice, MacCtrl.SgDigControl, 0x01388400); + } + if(MacStatus & MAC_STATUS_PCS_SYNCED) + { + LM_SetFlowControl(pDevice, 0, 0); + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + } + } + else if(MacStatus & MAC_STATUS_PCS_SYNCED) + { + if((pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) || + (pDevice->DisableAutoNeg == FALSE)) + { + /* auto-negotiation mode. */ + /* Initialize the autoneg default capaiblities. */ + AutonegInit(&pDevice->AnInfo); + + /* Set the context pointer to point to the main device structure. */ + pDevice->AnInfo.pContext = pDevice; + + /* Setup flow control advertisement register. */ + Value32 = GetPhyAdFlowCntrlSettings(pDevice); + if(Value32 & PHY_AN_AD_PAUSE_CAPABLE) + { + pDevice->AnInfo.mr_adv_sym_pause = 1; + } + else + { + pDevice->AnInfo.mr_adv_sym_pause = 0; + } + + if(Value32 & PHY_AN_AD_ASYM_PAUSE) + { + pDevice->AnInfo.mr_adv_asym_pause = 1; + } + else + { + pDevice->AnInfo.mr_adv_asym_pause = 0; + } + + /* Try to autoneg up to six times. */ + if (pDevice->IgnoreTbiLinkChange) + { + Cnt = 1; + } + else + { + Cnt = 6; + } + for (j = 0; j < Cnt; j++) + { + REG_WR(pDevice, MacCtrl.TxAutoNeg, 0); + + Value32 = pDevice->MacMode & ~MAC_MODE_PORT_MODE_MASK; + REG_WR(pDevice, MacCtrl.Mode, Value32); + REG_RD_BACK(pDevice, MacCtrl.Mode); + MM_Wait(20); + + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode | + MAC_MODE_SEND_CONFIGS); + REG_RD_BACK(pDevice, MacCtrl.Mode); + + MM_Wait(20); + + pDevice->AnInfo.State = AN_STATE_UNKNOWN; + pDevice->AnInfo.CurrentTime_us = 0; + + REG_WR(pDevice, Grc.Timer, 0); + for(k = 0; (pDevice->AnInfo.CurrentTime_us < 75000) && + (k < 75000); k++) + { + AnStatus = Autoneg8023z(&pDevice->AnInfo); + + if((AnStatus == AUTONEG_STATUS_DONE) || + (AnStatus == AUTONEG_STATUS_FAILED)) + { + break; + } + + pDevice->AnInfo.CurrentTime_us = REG_RD(pDevice, Grc.Timer); + + } + if((AnStatus == AUTONEG_STATUS_DONE) || + (AnStatus == AUTONEG_STATUS_FAILED)) + { + break; + } + if (j >= 1) + { + if (!(REG_RD(pDevice, MacCtrl.Status) & + MAC_STATUS_PCS_SYNCED)) { + break; + } + } + } + + /* Stop sending configs. */ + MM_AnTxIdle(&pDevice->AnInfo); + + /* Resolve flow control settings. */ + if((AnStatus == AUTONEG_STATUS_DONE) && + pDevice->AnInfo.mr_an_complete && pDevice->AnInfo.mr_link_ok && + pDevice->AnInfo.mr_lp_adv_full_duplex) + { + LM_UINT32 RemotePhyAd; + LM_UINT32 LocalPhyAd; + + LocalPhyAd = 0; + if(pDevice->AnInfo.mr_adv_sym_pause) + { + LocalPhyAd |= PHY_AN_AD_PAUSE_CAPABLE; + } + + if(pDevice->AnInfo.mr_adv_asym_pause) + { + LocalPhyAd |= PHY_AN_AD_ASYM_PAUSE; + } + + RemotePhyAd = 0; + if(pDevice->AnInfo.mr_lp_adv_sym_pause) + { + RemotePhyAd |= PHY_LINK_PARTNER_PAUSE_CAPABLE; + } + + if(pDevice->AnInfo.mr_lp_adv_asym_pause) + { + RemotePhyAd |= PHY_LINK_PARTNER_ASYM_PAUSE; + } + + LM_SetFlowControl(pDevice, LocalPhyAd, RemotePhyAd); + + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + else + { + LM_SetFlowControl(pDevice, 0, 0); + } + for (j = 0; j < 30; j++) + { + MM_Wait(20); + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED); + REG_RD_BACK(pDevice, MacCtrl.Status); + MM_Wait(20); + if ((REG_RD(pDevice, MacCtrl.Status) & + (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)) == 0) + break; + } + if (pDevice->TbiFlags & TBI_POLLING_FLAGS) + { + Value32 = REG_RD(pDevice, MacCtrl.Status); + if (Value32 & MAC_STATUS_RECEIVING_CFG) + { + pDevice->IgnoreTbiLinkChange = TRUE; + } + else if (pDevice->TbiFlags & TBI_POLLING_INTR_FLAG) + { + pDevice->IgnoreTbiLinkChange = FALSE; + } + } + Value32 = REG_RD(pDevice, MacCtrl.Status); + if (CurrentLinkStatus == LM_STATUS_LINK_DOWN && + (Value32 & MAC_STATUS_PCS_SYNCED) && + ((Value32 & MAC_STATUS_RECEIVING_CFG) == 0)) + { + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + } + else + { + /* We are forcing line speed. */ + pDevice->FlowControlCap &= ~LM_FLOW_CONTROL_AUTO_PAUSE; + LM_SetFlowControl(pDevice, 0, 0); + + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode | + MAC_MODE_SEND_CONFIGS); + } + } + /* Set the link polarity bit. */ + pDevice->MacMode &= ~MAC_MODE_LINK_POLARITY; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + + pDevice->pStatusBlkVirt->Status = STATUS_BLOCK_UPDATED | + (pDevice->pStatusBlkVirt->Status & ~STATUS_BLOCK_LINK_CHANGED_STATUS); + + for (j = 0; j < 100; j++) + { + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED); + REG_RD_BACK(pDevice, MacCtrl.Status); + MM_Wait(5); + if ((REG_RD(pDevice, MacCtrl.Status) & + (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)) == 0) + break; + } + + Value32 = REG_RD(pDevice, MacCtrl.Status); + if((Value32 & MAC_STATUS_PCS_SYNCED) == 0) + { + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + if (pDevice->DisableAutoNeg == FALSE) + { + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode | + MAC_MODE_SEND_CONFIGS); + REG_RD_BACK(pDevice, MacCtrl.Mode); + MM_Wait(1); + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + } + } + + /* Initialize the current link status. */ + if(CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) + { + pDevice->LineSpeed = LM_LINE_SPEED_1000MBPS; + pDevice->DuplexMode = LM_DUPLEX_MODE_FULL; + REG_WR(pDevice, MacCtrl.LedCtrl, pDevice->LedCtrl | + LED_CTRL_OVERRIDE_LINK_LED | + LED_CTRL_1000MBPS_LED_ON); + } + else + { + pDevice->LineSpeed = LM_LINE_SPEED_UNKNOWN; + pDevice->DuplexMode = LM_DUPLEX_MODE_UNKNOWN; + REG_WR(pDevice, MacCtrl.LedCtrl, pDevice->LedCtrl | + LED_CTRL_OVERRIDE_LINK_LED | + LED_CTRL_OVERRIDE_TRAFFIC_LED); + } + + /* Indicate link status. */ + if ((pDevice->LinkStatus != CurrentLinkStatus) || + ((CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) && + (PreviousFlowControl != pDevice->FlowControl))) + { + pDevice->LinkStatus = CurrentLinkStatus; + MM_IndicateStatus(pDevice, CurrentLinkStatus); + } + + return LM_STATUS_SUCCESS; +} +#endif /* INCLUDE_TBI_SUPPORT */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_SetupCopperPhy( + PLM_DEVICE_BLOCK pDevice) +{ + LM_STATUS CurrentLinkStatus; + LM_UINT32 Value32; + + /* Assume there is not link first. */ + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + + /* Disable phy link change attention. */ + REG_WR(pDevice, MacCtrl.MacEvent, 0); + + /* Clear link change attention. */ + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED | MAC_STATUS_MI_COMPLETION | + MAC_STATUS_LINK_STATE_CHANGED); + + /* Disable auto-polling for the moment. */ + pDevice->MiMode = 0xc0000; + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(40); + + /* Determine the requested line speed and duplex. */ + pDevice->OldLineSpeed = pDevice->LineSpeed; + pDevice->LineSpeed = pDevice->RequestedLineSpeed; + pDevice->DuplexMode = pDevice->RequestedDuplexMode; + + /* Set the phy to loopback mode. */ + if ((pDevice->LoopBackMode == LM_PHY_LOOP_BACK_MODE) || + (pDevice->LoopBackMode == LM_MAC_LOOP_BACK_MODE)) + { + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + if(!(Value32 & PHY_CTRL_LOOPBACK_MODE) && + (pDevice->LoopBackMode == LM_PHY_LOOP_BACK_MODE)) + { + /* Disable link change and PHY interrupts. */ + REG_WR(pDevice, MacCtrl.MacEvent, 0); + + /* Clear link change attention. */ + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED); + + LM_WritePhy(pDevice, PHY_CTRL_REG, 0x4140); + MM_Wait(40); + + pDevice->MacMode &= ~MAC_MODE_LINK_POLARITY; + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5703 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705 || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 && + (pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5411_PHY_ID)) + { + pDevice->MacMode |= MAC_MODE_LINK_POLARITY; + } + + /* Prevent the interrupt handling from being called. */ + pDevice->pStatusBlkVirt->Status = STATUS_BLOCK_UPDATED | + (pDevice->pStatusBlkVirt->Status & + ~STATUS_BLOCK_LINK_CHANGED_STATUS); + + /* GMII interface. */ + pDevice->MacMode &= ~MAC_MODE_PORT_MODE_MASK; + pDevice->MacMode |= MAC_MODE_PORT_MODE_GMII; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + REG_RD_BACK(pDevice, MacCtrl.Mode); + MM_Wait(40); + + /* Configure PHY led mode. */ + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701 || + (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700)) + { + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, + BCM540X_EXT_CTRL_LINK3_LED_MODE); + MM_Wait(40); + } + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + int j = 0; + + while (REG_RD(pDevice, DmaWrite.Mode) & DMA_WRITE_MODE_ENABLE) + { + MM_Wait(40); + j++; + if (j > 20) + break; + } + + Value32 = DMA_WRITE_MODE_ENABLE | + DMA_WRITE_MODE_TARGET_ABORT_ATTN_ENABLE | + DMA_WRITE_MODE_MASTER_ABORT_ATTN_ENABLE | + DMA_WRITE_MODE_PARITY_ERROR_ATTN_ENABLE | + DMA_WRITE_MODE_ADDR_OVERFLOW_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_OVERRUN_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_UNDERRUN_ATTN_ENABLE | + DMA_WRITE_MODE_FIFO_OVERREAD_ATTN_ENABLE | + DMA_WRITE_MODE_LONG_READ_ATTN_ENABLE; + REG_WR(pDevice, DmaWrite.Mode, Value32); + } + } + + pDevice->LinkStatus = LM_STATUS_LINK_ACTIVE; + MM_IndicateStatus(pDevice, LM_STATUS_LINK_ACTIVE); + + return LM_STATUS_SUCCESS; + } + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + if(Value32 & PHY_CTRL_LOOPBACK_MODE) + { + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + + /* Re-enable link change interrupt. This was disabled when we */ + /* enter loopback mode. */ + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_MI_INTERRUPT) + { + REG_WR(pDevice, MacCtrl.MacEvent, MAC_EVENT_ENABLE_MI_INTERRUPT); + } + else + { + REG_WR(pDevice, MacCtrl.MacEvent, + MAC_EVENT_ENABLE_LINK_STATE_CHANGED_ATTN); + } + } + else + { + /* Initialize the phy chip. */ + CurrentLinkStatus = LM_InitBcm540xPhy(pDevice); + } + + if(CurrentLinkStatus == LM_STATUS_LINK_SETTING_MISMATCH) + { + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + } + + /* Setup flow control. */ + pDevice->FlowControl = LM_FLOW_CONTROL_NONE; + if(CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) + { + LM_FLOW_CONTROL FlowCap; /* Flow control capability. */ + + FlowCap = LM_FLOW_CONTROL_NONE; + + if(pDevice->DuplexMode == LM_DUPLEX_MODE_FULL) + { + if(pDevice->DisableAutoNeg == FALSE || + pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) + { + LM_UINT32 ExpectedPhyAd; + LM_UINT32 LocalPhyAd; + LM_UINT32 RemotePhyAd; + + LM_ReadPhy(pDevice, PHY_AN_AD_REG, &LocalPhyAd); + pDevice->advertising = LocalPhyAd; + LocalPhyAd &= (PHY_AN_AD_ASYM_PAUSE | PHY_AN_AD_PAUSE_CAPABLE); + + ExpectedPhyAd = GetPhyAdFlowCntrlSettings(pDevice); + + if(LocalPhyAd != ExpectedPhyAd) + { + CurrentLinkStatus = LM_STATUS_LINK_DOWN; + } + else + { + LM_ReadPhy(pDevice, PHY_LINK_PARTNER_ABILITY_REG, + &RemotePhyAd); + + LM_SetFlowControl(pDevice, LocalPhyAd, RemotePhyAd); + } + } + else + { + pDevice->FlowControlCap &= ~LM_FLOW_CONTROL_AUTO_PAUSE; + LM_SetFlowControl(pDevice, 0, 0); + } + } + } + + if(CurrentLinkStatus == LM_STATUS_LINK_DOWN) + { + LM_ForceAutoNeg(pDevice); + + /* If we force line speed, we make get link right away. */ + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + if(Value32 & PHY_STATUS_LINK_PASS) + { + CurrentLinkStatus = LM_STATUS_LINK_ACTIVE; + } + } + + /* GMII interface. */ + pDevice->MacMode &= ~MAC_MODE_PORT_MODE_MASK; + if(CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) + { + if(pDevice->LineSpeed == LM_LINE_SPEED_100MBPS || + pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) + { + pDevice->MacMode |= MAC_MODE_PORT_MODE_MII; + } + else + { + pDevice->MacMode |= MAC_MODE_PORT_MODE_GMII; + } + } + else { + pDevice->MacMode |= MAC_MODE_PORT_MODE_GMII; + } + + /* Set the MAC to operate in the appropriate duplex mode. */ + pDevice->MacMode &= ~MAC_MODE_HALF_DUPLEX; + if(pDevice->DuplexMode == LM_DUPLEX_MODE_HALF) + { + pDevice->MacMode |= MAC_MODE_HALF_DUPLEX; + } + + /* Set the link polarity bit. */ + pDevice->MacMode &= ~MAC_MODE_LINK_POLARITY; + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + if((pDevice->LedCtrl == LED_CTRL_PHY_MODE_2) || + (CurrentLinkStatus == LM_STATUS_LINK_ACTIVE && + pDevice->LineSpeed == LM_LINE_SPEED_10MBPS)) + { + pDevice->MacMode |= MAC_MODE_LINK_POLARITY; + } + } + else + { + if (CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) + { + pDevice->MacMode |= MAC_MODE_LINK_POLARITY; + } + } + + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + + /* Enable auto polling. */ + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + pDevice->MiMode |= MI_MODE_AUTO_POLLING_ENABLE; + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + } + /* if using MAC led mode and not using auto polling, need to configure */ + /* mi status register */ + else if ((pDevice->LedCtrl & + (LED_CTRL_PHY_MODE_1 | LED_CTRL_PHY_MODE_2)) == 0) + { + if (CurrentLinkStatus != LM_STATUS_LINK_ACTIVE) + { + REG_WR(pDevice, MacCtrl.MiStatus, 0); + } + else if (pDevice->LineSpeed == LM_LINE_SPEED_10MBPS) + { + REG_WR(pDevice, MacCtrl.MiStatus, + MI_STATUS_ENABLE_LINK_STATUS_ATTN | MI_STATUS_10MBPS); + } + else + { + REG_WR(pDevice, MacCtrl.MiStatus, + MI_STATUS_ENABLE_LINK_STATUS_ATTN); + } + } + + /* Enable phy link change attention. */ + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_MI_INTERRUPT) + { + REG_WR(pDevice, MacCtrl.MacEvent, MAC_EVENT_ENABLE_MI_INTERRUPT); + } + else + { + REG_WR(pDevice, MacCtrl.MacEvent, + MAC_EVENT_ENABLE_LINK_STATE_CHANGED_ATTN); + } + if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) && + (CurrentLinkStatus == LM_STATUS_LINK_ACTIVE) && + (pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) && + (((pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE) && + (pDevice->PciState & T3_PCI_STATE_BUS_SPEED_HIGH)) || + !(pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE))) + { + MM_Wait(120); + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED); + MEM_WR_OFFSET(pDevice, T3_FIRMWARE_MAILBOX, + T3_MAGIC_NUM_DISABLE_DMAW_ON_LINK_CHANGE); + } + + /* Indicate link status. */ + if (pDevice->LinkStatus != CurrentLinkStatus) { + pDevice->LinkStatus = CurrentLinkStatus; + MM_IndicateStatus(pDevice, CurrentLinkStatus); + } + + return LM_STATUS_SUCCESS; +} /* LM_SetupCopperPhy */ + + +void +LM_5714_FamForceFiber( + PLM_DEVICE_BLOCK pDevice) +{ + u32 Creg, new_bmcr; + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Creg); + + new_bmcr = Creg & ~PHY_CTRL_AUTO_NEG_ENABLE; + + if ( pDevice->RequestedDuplexMode == 0 || + pDevice->RequestedDuplexMode == LM_DUPLEX_MODE_FULL){ + + new_bmcr |= PHY_CTRL_FULL_DUPLEX_MODE; + } + + if(Creg == new_bmcr) + return; + + new_bmcr |= PHY_CTRL_SPEED_SELECT_1000MBPS; /* Reserve bit */ + + /* Force a linkdown */ + LM_WritePhy(pDevice, PHY_AN_AD_REG, 0); + LM_WritePhy(pDevice, PHY_CTRL_REG, new_bmcr | + PHY_CTRL_RESTART_AUTO_NEG | + PHY_CTRL_AUTO_NEG_ENABLE | + PHY_CTRL_SPEED_SELECT_1000MBPS); + MM_Wait(10); + + /* Force it */ + LM_WritePhy(pDevice, PHY_CTRL_REG, new_bmcr); + MM_Wait(10); + + return; + +}/* LM_5714_FamForceFiber */ + + +void +LM_5714_FamGoFiberAutoNeg( + PLM_DEVICE_BLOCK pDevice) +{ + u32 adv,Creg,new; + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Creg); + LM_ReadPhy(pDevice,PHY_AN_AD_REG, &adv); + + new = adv & ~( PHY_AN_AD_1000XFULL | + PHY_AN_AD_1000XHALF | + PHY_AN_AD_1000XPAUSE | + PHY_AN_AD_1000XPSE_ASYM | + 0x1f); + + new |= PHY_AN_AD_1000XPAUSE; + + new |= PHY_AN_AD_1000XFULL; + new |= PHY_AN_AD_1000XHALF; + + if ((new != adv) || !(Creg & PHY_CTRL_AUTO_NEG_ENABLE)){ + LM_WritePhy(pDevice, PHY_AN_AD_REG, new); + MM_Wait(5); + pDevice->AutoNegJustInited=1; + LM_WritePhy(pDevice, PHY_CTRL_REG, (Creg | + PHY_CTRL_RESTART_AUTO_NEG | + PHY_CTRL_SPEED_SELECT_1000MBPS | + PHY_CTRL_AUTO_NEG_ENABLE) ); + } + + return; +} /* 5714_FamGoFiberAutoNeg */ + + +void +LM_5714_FamDoFiberLoopback(PLM_DEVICE_BLOCK pDevice) +{ + u32 Value32; + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + + if( !(Value32 & PHY_CTRL_LOOPBACK_MODE) ) + { + LM_WritePhy(pDevice, PHY_CTRL_REG, 0x4140); + + /* Prevent the interrupt handling from being called. */ + pDevice->pStatusBlkVirt->Status = STATUS_BLOCK_UPDATED | + (pDevice->pStatusBlkVirt->Status & + ~STATUS_BLOCK_LINK_CHANGED_STATUS); + } + + pDevice->LinkStatus = LM_STATUS_LINK_ACTIVE; + MM_IndicateStatus(pDevice, LM_STATUS_LINK_ACTIVE); + + return; + +}/* 5714_FamDoFiberLoopBack */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ + +LM_STATUS +LM_SetupNewFiberPhy( + PLM_DEVICE_BLOCK pDevice) +{ + LM_STATUS LmStatus = LM_STATUS_SUCCESS; + u32 Creg,Sreg,rsav; + + rsav = pDevice->LinkStatus; + + pDevice->MacMode |= MAC_MODE_PORT_MODE_GMII; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + MM_Wait(40); + + /* Disable phy link change attention. */ + REG_WR(pDevice, MacCtrl.MacEvent, 0); + + /* Clear link change attention. */ + REG_WR(pDevice, MacCtrl.Status, MAC_STATUS_SYNC_CHANGED | + MAC_STATUS_CFG_CHANGED | MAC_STATUS_MI_COMPLETION | + MAC_STATUS_LINK_STATE_CHANGED); + + + if( (pDevice->PhyFlags & PHY_FIBER_FALLBACK) && + ( pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) ){ + + /* do nothing */ + }else if ( pDevice->LoopBackMode == LM_MAC_LOOP_BACK_MODE){ + + LM_5714_FamDoFiberLoopback(pDevice); + goto fiberloopbackreturn; + + } else if( pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) { + + LM_5714_FamGoFiberAutoNeg(pDevice); + + + }else { + + LM_5714_FamForceFiber(pDevice); + } + + /* 5714/15 Serdes link status is valid only in reg 0x460 */ + /* ecd 13216 workaround for serdes */ + Sreg = REG_RD(pDevice, MacCtrl.TxStatus); + + if(Sreg & TX_STATUS_LINK_UP){ + + pDevice->LinkStatus = LM_STATUS_LINK_ACTIVE; + pDevice->LineSpeed = LM_LINE_SPEED_1000MBPS; + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Creg); + + if(Creg & PHY_CTRL_FULL_DUPLEX_MODE) { + pDevice->DuplexMode = LM_DUPLEX_MODE_FULL; + }else{ + pDevice->DuplexMode = LM_DUPLEX_MODE_HALF; + pDevice->MacMode |= MAC_MODE_HALF_DUPLEX; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + } + + if(Creg & PHY_CTRL_AUTO_NEG_ENABLE){ + u32 ours,partner; + + LM_ReadPhy(pDevice,PHY_AN_AD_REG, &ours); + LM_ReadPhy(pDevice,PHY_LINK_PARTNER_ABILITY_REG, &partner); + LM_SetFlowControl(pDevice, ours, partner); + } + + }else{ + pDevice->LinkStatus = LM_STATUS_LINK_DOWN; + pDevice->LineSpeed = 0; + } + + if(rsav != pDevice->LinkStatus) + MM_IndicateStatus(pDevice, pDevice->LinkStatus); + +fiberloopbackreturn: + pDevice->MacMode |= MAC_MODE_PORT_MODE_GMII; + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + MM_Wait(40); + /* Enable link change interrupt. */ + REG_WR(pDevice, MacCtrl.MacEvent, MAC_EVENT_ENABLE_LINK_STATE_CHANGED_ATTN); + + return LmStatus; +} /* Setup New phy */ + +void +LM_5714_FamFiberCheckLink( + PLM_DEVICE_BLOCK pDevice) +{ + + if(pDevice->AutoNegJustInited){ + pDevice->AutoNegJustInited=0; + return; + } + + if ((pDevice->LinkStatus != LM_STATUS_LINK_ACTIVE) && + (pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) && + !(pDevice->PhyFlags & PHY_FIBER_FALLBACK)){ + u32 bmcr; + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &bmcr); + if (bmcr & PHY_CTRL_AUTO_NEG_ENABLE) { + u32 phy1, phy2; + + LM_WritePhy(pDevice, 0x1c, 0x7c00); + LM_ReadPhy(pDevice, 0x1c, &phy1); + + LM_WritePhy(pDevice, 0x17, 0x0f01); + LM_ReadPhy(pDevice, 0x15, &phy2); + LM_ReadPhy(pDevice, 0x15, &phy2); + + if ((phy1 & 0x10) && !(phy2 & 0x20)) { + + /* We have signal detect and not receiving + * configs. + */ + + pDevice->PhyFlags |= PHY_FIBER_FALLBACK; + LM_5714_FamForceFiber(pDevice); + } + } + } + else if ( (pDevice->PhyFlags & PHY_FIBER_FALLBACK) && + (pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO)) { + u32 phy2; + + LM_WritePhy(pDevice, 0x17, 0x0f01); + LM_ReadPhy(pDevice, 0x15, &phy2); + if (phy2 & 0x20) { + /* Receiving configs. */ + + pDevice->PhyFlags &= ~PHY_FIBER_FALLBACK; + LM_5714_FamGoFiberAutoNeg(pDevice); + } + } + +} /* LM_5714_FamFiberCheckLink */ + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_SetupPhy( + PLM_DEVICE_BLOCK pDevice) +{ + LM_STATUS LmStatus; + LM_UINT32 Value32; + + if(pDevice->PhyFlags & PHY_IS_FIBER) + { + LmStatus = LM_SetupNewFiberPhy(pDevice); + }else +#ifdef INCLUDE_TBI_SUPPORT + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + LmStatus = LM_SetupFiberPhy(pDevice); + } + else +#endif /* INCLUDE_TBI_SUPPORT */ + { + LmStatus = LM_SetupCopperPhy(pDevice); + } + if (pDevice->ChipRevId == T3_CHIP_ID_5704_A0) + { + if (!(pDevice->PciState & T3_PCI_STATE_CONVENTIONAL_PCI_MODE)) + { + Value32 = REG_RD(pDevice, PciCfg.PciState); + REG_WR(pDevice, PciCfg.PciState, + Value32 | T3_PCI_STATE_RETRY_SAME_DMA); + } + } + if ((pDevice->LineSpeed == LM_LINE_SPEED_1000MBPS) && + (pDevice->DuplexMode == LM_DUPLEX_MODE_HALF)) + { + REG_WR(pDevice, MacCtrl.TxLengths, 0x26ff); + } + else + { + REG_WR(pDevice, MacCtrl.TxLengths, 0x2620); + } + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + if (pDevice->LinkStatus == LM_STATUS_LINK_DOWN) + { + REG_WR(pDevice, HostCoalesce.StatsCoalescingTicks, 0); + } + else + { + REG_WR(pDevice, HostCoalesce.StatsCoalescingTicks, + pDevice->StatsCoalescingTicks); + } + } + + return LmStatus; +} + + +/* test data pattern */ +static LM_UINT32 pattern[4][6] = { + /* For 5703/04, each DFE TAP has 21-bits (low word 15, hi word 6) + For 5705 , each DFE TAP has 19-bits (low word 15, hi word 4) + For simplicity, we check only 19-bits, so we don't have to + distinguish which chip it is. + the LO word contains 15 bits, make sure pattern data is < 0x7fff + the HI word contains 6 bits, make sure pattern data is < 0x003f */ + {0x00005555, 0x00000005, /* ch0, TAP 0, LO/HI pattern */ + 0x00002aaa, 0x0000000a, /* ch0, TAP 1, LO/HI pattern */ + 0x00003456, 0x00000003}, /* ch0, TAP 2, LO/HI pattern */ + + {0x00002aaa, 0x0000000a, /* ch1, TAP 0, LO/HI pattern */ + 0x00003333, 0x00000003, /* ch1, TAP 1, LO/HI pattern */ + 0x0000789a, 0x00000005}, /* ch1, TAP 2, LO/HI pattern */ + + {0x00005a5a, 0x00000005, /* ch2, TAP 0, LO/HI pattern */ + 0x00002a6a, 0x0000000a, /* ch2, TAP 1, LO/HI pattern */ + 0x00001bcd, 0x00000003}, /* ch2, TAP 2, LO/HI pattern */ + + {0x00002a5a, 0x0000000a, /* ch3, TAP 0, LO/HI pattern */ + 0x000033c3, 0x00000003, /* ch3, TAP 1, LO/HI pattern */ + 0x00002ef1, 0x00000005}, /* ch3, TAP 2, LO/HI pattern */ +}; + +/********************************************************/ +/* Routine to wait for PHY Macro Command to complete */ +/* */ +/* If PHY's Macro operation keeps stay busy, nothing we */ +/* can do anyway. The timeout is there so we won't */ +/* stay in this routine indefinitly. */ +/********************************************************/ +static LM_UINT32 LM_wait_macro_done(LM_DEVICE_BLOCK *pDevice); + +static LM_UINT32 +LM_wait_macro_done(LM_DEVICE_BLOCK *pDevice) +{ + LM_UINT32 timeout; + LM_UINT32 val32; + + timeout = 100; + while (timeout--) + { + /* make sure the MACRO operation is complete */ + LM_ReadPhy(pDevice, 0x16, &val32); + if ((val32 & 0x1000) == 0) break; + } + + return( timeout > 0 ); +} + +/********************************************************/ +/* This routine resets the PHY on following chips: */ +/* 5703, 04, CIOB-E and 5705 */ +/* */ +/* This routine will issue PHY_RESET and check if */ +/* the reset is sucessful. If not, another PHY RESET */ +/* will be issued, until max "retry" reaches */ +/* */ +/* Input: */ +/* pDevice - device's context */ +/* retry - number of retries */ +/* reset - TRUE=will cause a PHY reset initially */ +/* FALSE = will not issue a PHY reset */ +/* unless TAP lockup detected */ +/* */ +/* Output: */ +/* TRUE - PHY Reset is done sucessfully */ +/* FALSE - PHY Reset had failed, after "retry" */ +/* has reached */ +/* */ +/* Dependencies: */ +/* void LM_wait_macro_done() */ +/* u32 pattern[] */ +/* */ +/* Usage: */ +/* a. Before calling this routine, caller must */ +/* determine if the chip is a 5702/03/04 or */ +/* CIOB-E, and only call this routine if the */ +/* is one of these. */ +/* or its derivatives. */ +/* b. Instead of using MII register write to reset */ +/* the PHY, call this routine instead */ +/* c. Upon return from this routine, check return */ +/* value (TRUE/FALSE) to determine if PHY reset */ +/* is successful of not and "optionally" take */ +/* appropriate action (such as: event log) */ +/* d. Regardless of the return TRUE or FALSE, */ +/* proceed with PHY setup as you normally would */ +/* after a PHY_RESET. */ +/* e. It is recommended that the caller will give */ +/* 10 "retry", however, caller can change to a */ +/* different number, depending on you code. */ +/* */ +/********************************************************/ +LM_STATUS LM_ResetPhy_5703_4_5(LM_DEVICE_BLOCK *pDevice, int retry, int reset); + +LM_STATUS +LM_ResetPhy_5703_4_5(LM_DEVICE_BLOCK *pDevice, int retry, int reset) +{ + LM_UINT32 val32, save9; + LM_UINT32 dataLo, dataHi; + int i, channel; + int reset_success = LM_STATUS_FAILURE; + int force_reset; + + /* to actually do a PHY_RESET or not is dictated by the caller */ + force_reset = reset; + + while (retry-- && (reset_success != LM_STATUS_SUCCESS)) + { + if (force_reset) + { + /* issue a phy reset, and wait for reset to complete */ + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_PHY_RESET); + for(i = 0; i < 100; i++) + { + MM_Wait(10); + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &val32); + if(val32 && !(val32 & PHY_CTRL_PHY_RESET)) + { + MM_Wait(20); + break; + } + } + + /* no more phy reset unless lockup detected */ + force_reset = FALSE; + } + + /* assuming reset is successful first */ + reset_success = LM_STATUS_SUCCESS; + + /* now go check the DFE TAPs to see if locked up, but + first, we need to set up PHY so we can read DFE TAPs */ + + /* Disable Transmitter and Interrupt, while we play with + the PHY registers, so the link partner won't see any + strange data and the Driver won't see any interrupts. */ + LM_ReadPhy(pDevice, 0x10, &val32); + LM_WritePhy(pDevice, 0x10, val32 | 0x3000); + + /* Setup Full-Duplex, 1000 mbps */ + LM_WritePhy(pDevice, 0x0, 0x0140); + + /* Set to Master mode */ + LM_ReadPhy(pDevice, 0x9, &save9); + LM_WritePhy(pDevice, 0x9, 0x1800); + + /* Enable SM_DSP_CLOCK & 6dB */ + LM_WritePhy(pDevice, 0x18, 0x0c00); + + /* blocks the PHY control access */ + LM_WritePhy(pDevice, 0x17, 0x8005); + LM_WritePhy(pDevice, 0x15, 0x0800); + + /* check TAPs for all 4 channels, as soon + as we see a lockup we'll stop checking */ + for (channel=0; (channel<4) && (reset_success == LM_STATUS_SUCCESS); + channel++) + { + /* select channel and set TAP index to 0 */ + LM_WritePhy(pDevice, 0x17, (channel * 0x2000) | 0x0200); + /* freeze filter again just to be safe */ + LM_WritePhy(pDevice, 0x16, 0x0002); + + /* write fixed pattern to the RAM, 3 TAPs for + each channel, each TAP have 2 WORDs (LO/HI) */ + for (i=0; i<6; i++) + LM_WritePhy(pDevice, 0x15, pattern[channel][i]); + + /* Activate PHY's Macro operation to write DFE TAP from RAM, + and wait for Macro to complete */ + LM_WritePhy(pDevice, 0x16, 0x0202); + if (!LM_wait_macro_done(pDevice)) + { + reset_success = LM_STATUS_FAILURE; + force_reset = TRUE; + break; + } + + /* --- done with write phase, now begin read phase --- */ + + /* select channel and set TAP index to 0 */ + LM_WritePhy(pDevice, 0x17, (channel * 0x2000) | 0x0200); + + /* Active PHY's Macro operation to load DFE TAP to RAM, + and wait for Macro to complete */ + LM_WritePhy(pDevice, 0x16, 0x0082); + if (!LM_wait_macro_done(pDevice)) + { + reset_success = LM_STATUS_FAILURE; + force_reset = TRUE; + break; + } + + /* enable "pre-fetch" */ + LM_WritePhy(pDevice, 0x16, 0x0802); + if (!LM_wait_macro_done(pDevice)) + { + reset_success = LM_STATUS_FAILURE; + force_reset = TRUE; + break; + } + + /* read back the TAP values. + 3 TAPs for each channel, each TAP have 2 WORDs (LO/HI) */ + for (i=0; i<6; i+=2) + { + /* read Lo/Hi then wait for 'done' is faster */ + LM_ReadPhy(pDevice, 0x15, &dataLo); + LM_ReadPhy(pDevice, 0x15, &dataHi); + if (!LM_wait_macro_done(pDevice)) + { + reset_success = LM_STATUS_FAILURE; + force_reset = TRUE; + break; + } + + /* For 5703/04, each DFE TAP has 21-bits (low word 15, + * hi word 6) For 5705, each DFE TAP pas 19-bits (low word 15, + * hi word 4) For simplicity, we check only 19-bits, so we + * don't have to distinguish which chip it is. */ + dataLo &= 0x7fff; + dataHi &= 0x000f; + + /* check if what we wrote is what we read back */ + if ( (dataLo != pattern[channel][i]) || (dataHi != pattern[channel][i+1]) ) + { + /* if failed, then the PHY is locked up, + we need to do PHY reset again */ + reset_success = LM_STATUS_FAILURE; + force_reset = TRUE; + /* 04/25/2003. sb. do these writes before issueing a reset. */ + /* these steps will reduce the chance of back-to-back + * phy lockup after reset */ + LM_WritePhy(pDevice, 0x17, 0x000B); + LM_WritePhy(pDevice, 0x15, 0x4001); + LM_WritePhy(pDevice, 0x15, 0x4005); + break; + } + } /* for i */ + } /* for channel */ + } /* while */ + + /* restore dfe coeff back to zeros */ + for (channel=0; channel<4 ; channel++) + { + LM_WritePhy(pDevice, 0x17, (channel * 0x2000) | 0x0200); + LM_WritePhy(pDevice, 0x16, 0x0002); + for (i=0; i<6; i++) + LM_WritePhy(pDevice, 0x15, 0x0000); + LM_WritePhy(pDevice, 0x16, 0x0202); + if (!LM_wait_macro_done(pDevice)) + { + reset_success = LM_STATUS_FAILURE; + break; + } + } + + /* remove block phy control */ + LM_WritePhy(pDevice, 0x17, 0x8005); + LM_WritePhy(pDevice, 0x15, 0x0000); + + /* unfreeze DFE TAP filter for all channels */ + LM_WritePhy(pDevice, 0x17, 0x8200); + LM_WritePhy(pDevice, 0x16, 0x0000); + + /* Restore PHY back to operating state */ + LM_WritePhy(pDevice, 0x18, 0x0400); + + /* Restore register 9 */ + LM_WritePhy(pDevice, 0x9, save9); + + /* enable transmitter and interrupt */ + LM_ReadPhy(pDevice, 0x10, &val32); + LM_WritePhy(pDevice, 0x10, (val32 & ~0x3000)); + + return reset_success; +} + +LM_VOID +LM_ResetPhy(LM_DEVICE_BLOCK *pDevice) +{ + int j; + LM_UINT32 miireg; + + if (pDevice->PhyFlags & PHY_CHECK_TAPS_AFTER_RESET) + { + LM_ResetPhy_5703_4_5(pDevice, 5, 1); + } + else + { + int wait_val = 100; + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_PHY_RESET); + + if( pDevice->PhyFlags & PHY_IS_FIBER ) + wait_val = 5000; + + for(j = 0; j < wait_val; j++) + { + MM_Wait(10); + + LM_ReadPhy(pDevice, PHY_CTRL_REG, &miireg); + if(miireg && !(miireg & PHY_CTRL_PHY_RESET)) + { + MM_Wait(20); + break; + } + } + + LM_PhyTapPowerMgmt(pDevice); + } + if ( (pDevice->PhyFlags & PHY_ADC_FIX) && + !( pDevice->PhyFlags & PHY_IS_FIBER) ) + { + LM_WritePhy(pDevice, 0x18, 0x0c00); + LM_WritePhy(pDevice, 0x17, 0x201f); + LM_WritePhy(pDevice, 0x15, 0x2aaa); + LM_WritePhy(pDevice, 0x17, 0x000a); + LM_WritePhy(pDevice, 0x15, 0x0323); + LM_WritePhy(pDevice, 0x18, 0x0400); + } + if ( (pDevice->PhyFlags & PHY_5705_5750_FIX) && + !( pDevice->PhyFlags & PHY_IS_FIBER) ) + { + LM_WritePhy(pDevice, 0x18, 0x0c00); + LM_WritePhy(pDevice, 0x17, 0x000a); + LM_WritePhy(pDevice, 0x15, 0x310b); + LM_WritePhy(pDevice, 0x17, 0x201f); + LM_WritePhy(pDevice, 0x15, 0x9506); + LM_WritePhy(pDevice, 0x17, 0x401f); + LM_WritePhy(pDevice, 0x15, 0x14e2); + LM_WritePhy(pDevice, 0x18, 0x0400); + } + if ( (pDevice->PhyFlags & PHY_5704_A0_FIX) && + !( pDevice->PhyFlags & PHY_IS_FIBER) ) + { + LM_WritePhy(pDevice, 0x1c, 0x8d68); + LM_WritePhy(pDevice, 0x1c, 0x8d68); + } + if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + { + LM_ReadPhy(pDevice, BCM540X_EXT_CTRL_REG, &miireg); + miireg |= 1; /* set tx elastic fifo */ + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, miireg); + + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x4c20); + } + else if (pDevice->Flags & JUMBO_CAPABLE_FLAG) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x0007); + LM_ReadPhy(pDevice, BCM5401_AUX_CTRL, &miireg); + miireg |= 0x4000; /* set rx extended packet length */ + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, miireg); + + LM_ReadPhy(pDevice, BCM540X_EXT_CTRL_REG, &miireg); + miireg |= 1; /* set tx elastic fifo */ + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, miireg); + + } + + LM_SetEthWireSpeed(pDevice); + pDevice->PhyFlags &= ~PHY_FIBER_FALLBACK; +} + +STATIC LM_VOID +LM_SetEthWireSpeed(LM_DEVICE_BLOCK *pDevice) +{ + LM_UINT32 Value32; + + if( pDevice->PhyFlags & PHY_IS_FIBER) + return; + + /* Enable Ethernet@WireSpeed. */ + if (pDevice->PhyFlags & PHY_ETHERNET_WIRESPEED) + { + LM_WritePhy(pDevice, 0x18, 0x7007); + LM_ReadPhy(pDevice, 0x18, &Value32); + LM_WritePhy(pDevice, 0x18, Value32 | BIT_15 | BIT_4); + } +} + +STATIC LM_STATUS +LM_PhyAdvertiseAll(LM_DEVICE_BLOCK *pDevice) +{ + LM_UINT32 miireg; + + LM_ReadPhy(pDevice, PHY_AN_AD_REG, &miireg); + pDevice->advertising = miireg; + if ((miireg & PHY_AN_AD_ALL_SPEEDS) != PHY_AN_AD_ALL_SPEEDS) + { + return LM_STATUS_FAILURE; + } + + LM_ReadPhy(pDevice, BCM540X_1000BASET_CTRL_REG, &miireg); + pDevice->advertising1000 = miireg; + + if (!(pDevice->PhyFlags & PHY_NO_GIGABIT)) + { + if ((miireg & BCM540X_AN_AD_ALL_1G_SPEEDS) != + BCM540X_AN_AD_ALL_1G_SPEEDS) + { + return LM_STATUS_FAILURE; + } + }else{ + + if(miireg) + { + return LM_STATUS_FAILURE; + } + } + return LM_STATUS_SUCCESS; +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_VOID +LM_ReadPhy( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 PhyReg, +PLM_UINT32 pData32) { + LM_UINT32 Value32; + LM_UINT32 j; + + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode & + ~MI_MODE_AUTO_POLLING_ENABLE); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(40); + } + + Value32 = (pDevice->PhyAddr << MI_COM_FIRST_PHY_ADDR_BIT) | + ((PhyReg & MI_COM_PHY_REG_ADDR_MASK) << MI_COM_FIRST_PHY_REG_ADDR_BIT) | + MI_COM_CMD_READ | MI_COM_START; + + REG_WR(pDevice, MacCtrl.MiCom, Value32); + + for(j = 0; j < 200; j++) + { + MM_Wait(1); + + Value32 = REG_RD(pDevice, MacCtrl.MiCom); + + if(!(Value32 & MI_COM_BUSY)) + { + MM_Wait(5); + Value32 = REG_RD(pDevice, MacCtrl.MiCom); + Value32 &= MI_COM_PHY_DATA_MASK; + break; + } + } + + if(Value32 & MI_COM_BUSY) + { + Value32 = 0; + } + + *pData32 = Value32; + + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(40); + } +} /* LM_ReadPhy */ + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_VOID +LM_WritePhy( +PLM_DEVICE_BLOCK pDevice, +LM_UINT32 PhyReg, +LM_UINT32 Data32) { + LM_UINT32 Value32; + LM_UINT32 j; + + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode & + ~MI_MODE_AUTO_POLLING_ENABLE); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(40); + } + + Value32 = (pDevice->PhyAddr << MI_COM_FIRST_PHY_ADDR_BIT) | + ((PhyReg & MI_COM_PHY_REG_ADDR_MASK) << MI_COM_FIRST_PHY_REG_ADDR_BIT) | + (Data32 & MI_COM_PHY_DATA_MASK) | MI_COM_CMD_WRITE | MI_COM_START; + + REG_WR(pDevice, MacCtrl.MiCom, Value32); + + for(j = 0; j < 200; j++) + { + MM_Wait(1); + + Value32 = REG_RD(pDevice, MacCtrl.MiCom); + + if(!(Value32 & MI_COM_BUSY)) + { + MM_Wait(5); + break; + } + } + + if(pDevice->PhyIntMode == T3_PHY_INT_MODE_AUTO_POLLING) + { + REG_WR(pDevice, MacCtrl.MiMode, pDevice->MiMode); + REG_RD_BACK(pDevice, MacCtrl.MiMode); + MM_Wait(40); + } +} /* LM_WritePhy */ + +STATIC void +LM_GetPhyId(LM_DEVICE_BLOCK *pDevice) +{ + LM_UINT32 Value32; + + LM_ReadPhy(pDevice, PHY_ID1_REG, &Value32); + pDevice->PhyId = (Value32 & PHY_ID1_OUI_MASK) << 10; + + LM_ReadPhy(pDevice, PHY_ID2_REG, &Value32); + pDevice->PhyId |= ((Value32 & PHY_ID2_OUI_MASK) << 16) | + (Value32 & PHY_ID2_MODEL_MASK) | (Value32 & PHY_ID2_REV_MASK); + +} + +LM_STATUS +LM_EnableMacLoopBack(PLM_DEVICE_BLOCK pDevice) +{ + pDevice->LoopBackMode = LM_MAC_LOOP_BACK_MODE; + pDevice->MacMode &= ~MAC_MODE_PORT_MODE_MASK; + pDevice->MacMode |= (MAC_MODE_PORT_INTERNAL_LOOPBACK | + MAC_MODE_LINK_POLARITY | MAC_MODE_PORT_MODE_GMII); + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + MM_Wait(40); + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_DisableMacLoopBack(PLM_DEVICE_BLOCK pDevice) +{ + pDevice->LoopBackMode = 0; + + pDevice->MacMode &= ~(MAC_MODE_PORT_INTERNAL_LOOPBACK | + MAC_MODE_LINK_POLARITY | MAC_MODE_PORT_MODE_MASK); + REG_WR(pDevice, MacCtrl.Mode, pDevice->MacMode); + MM_Wait(40); + if(pDevice->PhyFlags & PHY_IS_FIBER) + LM_ResetPhy(pDevice); + + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_EnablePhyLoopBack(PLM_DEVICE_BLOCK pDevice) +{ + pDevice->LoopBackMode = LM_PHY_LOOP_BACK_MODE; + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_DisablePhyLoopBack(PLM_DEVICE_BLOCK pDevice) +{ + pDevice->LoopBackMode = 0; + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_EnableExtLoopBack(PLM_DEVICE_BLOCK pDevice, LM_LINE_SPEED LineSpeed) +{ + pDevice->LoopBackMode = LM_EXT_LOOP_BACK_MODE; + + pDevice->SavedDisableAutoNeg = pDevice->DisableAutoNeg; + pDevice->SavedRequestedLineSpeed = pDevice->RequestedLineSpeed; + pDevice->SavedRequestedDuplexMode = pDevice->RequestedDuplexMode; + + pDevice->DisableAutoNeg = TRUE; + pDevice->RequestedLineSpeed = LineSpeed; + pDevice->RequestedDuplexMode = LM_DUPLEX_MODE_FULL; + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +LM_STATUS +LM_DisableExtLoopBack(PLM_DEVICE_BLOCK pDevice) +{ + pDevice->LoopBackMode = 0; + + pDevice->DisableAutoNeg = pDevice->SavedDisableAutoNeg; + pDevice->RequestedLineSpeed = pDevice->SavedRequestedLineSpeed; + pDevice->RequestedDuplexMode = pDevice->SavedRequestedDuplexMode; + + LM_SetupPhy(pDevice); + return LM_STATUS_SUCCESS; +} + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS +LM_SetPowerState( +PLM_DEVICE_BLOCK pDevice, +LM_POWER_STATE PowerLevel) +{ +#ifdef BCM_WOL + LM_UINT32 PmeSupport; + PLM_DEVICE_BLOCK pDevice2 = 0; + int j; +#endif + LM_UINT32 Value32; + LM_UINT32 PmCtrl; + + /* make sureindirect accesses are enabled*/ + MM_WriteConfig32(pDevice, T3_PCI_MISC_HOST_CTRL_REG, pDevice->MiscHostCtrl); + + /* Clear the PME_ASSERT bit and the power state bits. Also enable */ + /* the PME bit. */ + MM_ReadConfig32(pDevice, T3_PCI_PM_STATUS_CTRL_REG, &PmCtrl); + + PmCtrl |= T3_PM_PME_ASSERTED; + PmCtrl &= ~T3_PM_POWER_STATE_MASK; + + /* Set the appropriate power state. */ + if(PowerLevel == LM_POWER_STATE_D0) + { + /* Bring the card out of low power mode. */ + PmCtrl |= T3_PM_POWER_STATE_D0; + MM_WriteConfig32(pDevice, T3_PCI_PM_STATUS_CTRL_REG, PmCtrl); + + Value32 = REG_RD(pDevice, Grc.LocalCtrl); + + if(T3_ASIC_5752(pDevice->ChipRevId)){ + Value32 |= (GRC_MISC_LOCAL_CTRL_GPIO_OE3 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT3 | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2); + } + else + { + Value32 &= ~(GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2); + } + + RAW_REG_WR(pDevice, Grc.LocalCtrl, Value32); + + MM_Wait(40); /* Required delay is about 20us. */ + + pDevice->PowerLevel = PowerLevel; + return LM_STATUS_SUCCESS; + } +#ifdef BCM_WOL + else if(PowerLevel == LM_POWER_STATE_D1) + { + PmCtrl |= T3_PM_POWER_STATE_D1; + } + else if(PowerLevel == LM_POWER_STATE_D2) + { + PmCtrl |= T3_PM_POWER_STATE_D2; + } + else if(PowerLevel == LM_POWER_STATE_D3) + { + PmCtrl |= T3_PM_POWER_STATE_D3; + } + else + { + return LM_STATUS_FAILURE; + } + PmCtrl |= T3_PM_PME_ENABLE; + + /* Mask out all interrupts so LM_SetupPhy won't be called while we are */ + /* setting new line speed. */ + Value32 = REG_RD(pDevice, PciCfg.MiscHostCtrl); + REG_WR(pDevice, PciCfg.MiscHostCtrl, Value32 | MISC_HOST_CTRL_MASK_PCI_INT); + + if(!pDevice->RestoreOnWakeUp) + { + pDevice->RestoreOnWakeUp = TRUE; + pDevice->WakeUpDisableAutoNeg = pDevice->DisableAutoNeg; + pDevice->WakeUpRequestedLineSpeed = pDevice->RequestedLineSpeed; + pDevice->WakeUpRequestedDuplexMode = pDevice->RequestedDuplexMode; + } + + /* Force auto-negotiation to 10 line speed. */ + pDevice->DisableAutoNeg = FALSE; + + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG)) + { + pDevice->RequestedLineSpeed = LM_LINE_SPEED_10MBPS; + LM_SetupPhy(pDevice); + } + + /* Put the driver in the initial state, and go through the power down */ + /* sequence. */ + LM_DoHalt(pDevice); + + if (!(pDevice->AsfFlags & ASF_ENABLED)) + { + for(j = 0; j < 20000; j++) + { + MM_Wait(10); + + Value32 = MEM_RD_OFFSET(pDevice, T3_ASF_FW_STATUS_MAILBOX); + if(Value32 == ~T3_MAGIC_NUM_FIRMWARE_INIT_DONE) + { + break; + } + } + } + + MEM_WR_OFFSET(pDevice, DRV_WOL_MAILBOX, DRV_WOL_SIGNATURE | + DRV_DOWN_STATE_SHUTDOWN | 0x2 | DRV_WOL_SET_MAGIC_PKT); + + MM_ReadConfig32(pDevice, T3_PCI_PM_CAP_REG, &PmeSupport); + + if (pDevice->WakeUpModeCap != LM_WAKE_UP_MODE_NONE) + { + + /* Enable WOL. */ + if (!(pDevice->TbiFlags & ENABLE_TBI_FLAG)) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x5a); + MM_Wait(40); + } + + if (! T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId)) + { + /* Let boot code deal with LED mode on shasta */ + REG_WR(pDevice, MacCtrl.LedCtrl, pDevice->LedCtrl); + } + + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + Value32 = MAC_MODE_PORT_MODE_TBI; + } + else + { + Value32 = MAC_MODE_PORT_MODE_MII; + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) + { + if(pDevice->LedCtrl == LED_CTRL_PHY_MODE_2 || + pDevice->WolSpeed == WOL_SPEED_10MB) + { + Value32 |= MAC_MODE_LINK_POLARITY; + } + } + else + { + Value32 |= MAC_MODE_LINK_POLARITY; + } + } + REG_WR(pDevice, MacCtrl.Mode, Value32); + REG_RD_BACK(pDevice, MacCtrl.Mode); + MM_Wait(40); MM_Wait(40); MM_Wait(40); + + /* Always enable magic packet wake-up if we have vaux. */ + if((PmeSupport & T3_PCI_PM_CAP_PME_D3COLD) && + (pDevice->WakeUpModeCap & LM_WAKE_UP_MODE_MAGIC_PACKET)) + { + Value32 |= MAC_MODE_DETECT_MAGIC_PACKET_ENABLE; + } + +#ifdef BCM_ASF + if (pDevice->AsfFlags & ASF_ENABLED) + { + Value32 &= ~MAC_MODE_ACPI_POWER_ON_ENABLE; + } +#endif + REG_WR(pDevice, MacCtrl.Mode, Value32); + + /* Enable the receiver. */ + REG_WR(pDevice, MacCtrl.RxMode, RX_MODE_ENABLE); + } + else if (!(pDevice->AsfFlags & ASF_ENABLED)) + { + if (pDevice->TbiFlags & ENABLE_TBI_FLAG) + { + REG_WR(pDevice, MacCtrl.LedCtrl, LED_CTRL_OVERRIDE_LINK_LED | + LED_CTRL_OVERRIDE_TRAFFIC_LED); + } + else + { + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, + BCM540X_EXT_CTRL_FORCE_LED_OFF); + LM_WritePhy(pDevice, 0x18, 0x01b2); + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5704) && + !T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) ) + { + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_LOWER_POWER_MODE); + } + } + } + + /* Disable tx/rx clocks, and select an alternate clock. */ + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId)){ + /* Do nothing */ + } + else if ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700) || + ((T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) && + (pDevice->WolSpeed == WOL_SPEED_10MB))) + { + Value32 = T3_PCI_DISABLE_RX_CLOCK | T3_PCI_DISABLE_TX_CLOCK | + T3_PCI_SELECT_ALTERNATE_CLOCK | + T3_PCI_POWER_DOWN_PCI_PLL133; + + REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | Value32); + } + /* ASF on 5750 will not run properly on slow core clock */ + else if( !(T3_ASIC_IS_575X_PLUS(pDevice->ChipRevId) && + (pDevice->AsfFlags & ASF_ENABLED) )) + { + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) + { + Value32 = T3_PCI_DISABLE_RX_CLOCK | T3_PCI_DISABLE_TX_CLOCK | + T3_PCI_SELECT_ALTERNATE_CLOCK; + } + else if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) ) + { + Value32 = T3_PCI_625_CORE_CLOCK; + } + else + { + Value32 = T3_PCI_SELECT_ALTERNATE_CLOCK; + } + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | Value32); + + MM_Wait(40); + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) + { + Value32 = T3_PCI_DISABLE_RX_CLOCK | T3_PCI_DISABLE_TX_CLOCK | + T3_PCI_SELECT_ALTERNATE_CLOCK | T3_PCI_44MHZ_CORE_CLOCK; + } + else if(T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) ) + { + Value32 = T3_PCI_SELECT_ALTERNATE_CLOCK | T3_PCI_625_CORE_CLOCK; + } + else if(!T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + { + Value32 = T3_PCI_SELECT_ALTERNATE_CLOCK | T3_PCI_44MHZ_CORE_CLOCK; + } + + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | Value32); + + if (!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + MM_Wait(40); + + if(T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) + { + Value32 = T3_PCI_DISABLE_RX_CLOCK | T3_PCI_DISABLE_TX_CLOCK | + T3_PCI_44MHZ_CORE_CLOCK; + } + else + { + Value32 = T3_PCI_44MHZ_CORE_CLOCK; + } + + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | Value32); + } + } + + MM_Wait(40); + + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5704) + { + pDevice2 = MM_FindPeerDev(pDevice); + } + if (!(pDevice->Flags & EEPROM_WP_FLAG)) + { + LM_SwitchVaux(pDevice, pDevice2); + } + + LM_WritePostResetSignatures(pDevice, LM_SHUTDOWN_RESET); + + /* Workaround for pll instability */ + if((T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5750_AX) || + (T3_CHIP_REV(pDevice->ChipRevId) == T3_CHIP_REV_5750_BX)) { + + Value32= REG_RD_OFFSET(pDevice, 0x7d00); + REG_WR_OFFSET(pDevice, 0x7d00,Value32 & ~(BIT_16 | BIT_4 | BIT_2 | BIT_1 | BIT_0)); + + if(!(pDevice->AsfFlags & ASF_ENABLED)) + LM_HaltCpu(pDevice, T3_RX_CPU_ID); + + } + + /* Put the the hardware in low power mode. */ + if (!(pDevice->Flags & DISABLE_D3HOT_FLAG)) + { + MM_WriteConfig32(pDevice, T3_PCI_PM_STATUS_CTRL_REG, PmCtrl); + MM_Wait(200); /* Wait 200us for state transition */ + } + + pDevice->PowerLevel = PowerLevel; + +#else + LM_WritePostResetSignatures(pDevice, LM_SHUTDOWN_RESET); +#endif /* BCM_WOL */ + + return LM_STATUS_SUCCESS; +} /* LM_SetPowerState */ + + +LM_VOID +LM_SwitchVaux(PLM_DEVICE_BLOCK pDevice, PLM_DEVICE_BLOCK pDevice2) +{ + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + return; + + pDevice->GrcLocalCtrl &= ~(GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2); + + /* Switch adapter to auxilliary power if WOL enabled */ + if ((pDevice->WakeUpModeCap != LM_WAKE_UP_MODE_NONE) || + (pDevice->AsfFlags & ASF_ENABLED) || + (pDevice2 && ((pDevice2->WakeUpModeCap != LM_WAKE_UP_MODE_NONE) || + (pDevice2->AsfFlags & ASF_ENABLED)))) + { + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5700 || + T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5701) + { + /* GPIO0 = 1, GPIO1 = 1, GPIO2 = 0. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + MM_Wait(40); + } + else + { + if (pDevice2 && pDevice2->InitDone) + { + return; + } + + /* On NICs GPIOs are used for vaux. + The transition of GPIO0 from 0-1 causes vaux + to power up. Transition of GPIO1 from 1-0 turns vaux off. + GPIO2 transition from 1-0 enables a non-glitch vaux + transition from one state to another. + On certain designs we should not output GPIO2. + */ + if(pDevice->Flags & GPIO2_DONOT_OUTPUT) + { + /* GPIO0 = 0, GPIO1 = 1. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + + MM_Wait(40); + + /* GPIO0 = 1, GPIO1 = 1. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + + MM_Wait(40); + } + else + { + + /* GPIO0 = 0, GPIO1 = 1, GPIO2 = 1. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2); + + MM_Wait(40); + + /* GPIO0 = 1, GPIO1 = 1, GPIO2 = 1. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2); + MM_Wait(40); + + /* GPIO0 = 1, GPIO1 = 1, GPIO2 = 0. */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE0 | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OE2 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + MM_Wait(40); + } /* GPIO2 OK */ + } /* Not 5700||5701 */ + } /* WOL disabled */ + else + { + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701)) + { + if (pDevice2 && pDevice2->InitDone) + { + return; + } + + /* GPIO1 = 1 */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + MM_Wait(40); + + /* GPIO1 = 0 */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE1); + MM_Wait(40); + + /* GPIO1 = 1 */ + RAW_REG_WR(pDevice, Grc.LocalCtrl, pDevice->GrcLocalCtrl | + GRC_MISC_LOCAL_CTRL_GPIO_OE1 | + GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1); + MM_Wait(40); + } + } +} + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +static LM_UINT32 +GetPhyAdFlowCntrlSettings( + PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 Value32; + + Value32 = 0; + + /* Auto negotiation flow control only when autonegotiation is enabled. */ + if(pDevice->DisableAutoNeg == FALSE || + pDevice->RequestedLineSpeed == LM_LINE_SPEED_AUTO) + { + if (T3_ASIC_5714_FAMILY(pDevice->ChipRevId) && + (pDevice->PhyFlags & PHY_IS_FIBER)) { + + /* Please refer to Table 28B-3 of the 802.3ab-1999 spec. */ + if((pDevice->FlowControlCap == LM_FLOW_CONTROL_AUTO_PAUSE) || + ((pDevice->FlowControlCap & LM_FLOW_CONTROL_RECEIVE_PAUSE) && + (pDevice->FlowControlCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE))) + { + Value32 |=PHY_AN_AD_1000XPAUSE; + } + else if(pDevice->FlowControlCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE) + { + Value32 |= PHY_AN_AD_1000XPSE_ASYM; + } + else if(pDevice->FlowControlCap & LM_FLOW_CONTROL_RECEIVE_PAUSE) + { + Value32 |= (PHY_AN_AD_1000XPSE_ASYM | PHY_AN_AD_1000XPAUSE); + } + + }else{ + + /* Please refer to Table 28B-3 of the 802.3ab-1999 spec. */ + if((pDevice->FlowControlCap == LM_FLOW_CONTROL_AUTO_PAUSE) || + ((pDevice->FlowControlCap & LM_FLOW_CONTROL_RECEIVE_PAUSE) && + (pDevice->FlowControlCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE))) + { + Value32 |= PHY_AN_AD_PAUSE_CAPABLE; + } + else if(pDevice->FlowControlCap & LM_FLOW_CONTROL_TRANSMIT_PAUSE) + { + Value32 |= PHY_AN_AD_ASYM_PAUSE; + } + else if(pDevice->FlowControlCap & LM_FLOW_CONTROL_RECEIVE_PAUSE) + { + Value32 |= PHY_AN_AD_PAUSE_CAPABLE | PHY_AN_AD_ASYM_PAUSE; + } + } + } + + return Value32; +} + + + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/* LM_STATUS_FAILURE */ +/* LM_STATUS_SUCCESS */ +/* */ +/******************************************************************************/ +static LM_STATUS +LM_ForceAutoNeg(PLM_DEVICE_BLOCK pDevice) +{ + LM_LINE_SPEED LineSpeed; + LM_DUPLEX_MODE DuplexMode; + LM_UINT32 NewPhyCtrl; + LM_UINT32 Value32, PhyReg18; + LM_UINT32 Cnt; + + /* Get the interface type, line speed, and duplex mode. */ + LineSpeed = pDevice->RequestedLineSpeed; + DuplexMode = pDevice->RequestedDuplexMode; + + /* Exit ext. loop back, in case it was in ext. loopback mode */ + /* Set Extended packet length bit on chips that support jumbo frames */ + if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x4c20); + + LM_ReadPhy(pDevice, BCM540X_EXT_CTRL_REG, &Value32); + Value32 |= 1; /* set tx elastic fifo */ + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, Value32); + + } + else + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x0007); + LM_ReadPhy(pDevice, BCM5401_AUX_CTRL, &PhyReg18); + PhyReg18 &= ~0x8000; /* clear external loop back */ + + if (pDevice->Flags & JUMBO_CAPABLE_FLAG) + { + PhyReg18 |= 0x4000; /* set extended packet length */ + LM_ReadPhy(pDevice, BCM540X_EXT_CTRL_REG, &Value32); + Value32 |= 1; /* set tx elastic fifo */ + LM_WritePhy(pDevice, BCM540X_EXT_CTRL_REG, Value32); + } + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, PhyReg18); + } + +#ifdef BCM_WOL + if (pDevice->RestoreOnWakeUp) + { + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, 0); + pDevice->advertising1000 = 0; + Value32 = PHY_AN_AD_10BASET_FULL | PHY_AN_AD_10BASET_HALF; + if (pDevice->WolSpeed == WOL_SPEED_100MB) + { + Value32 |= PHY_AN_AD_100BASETX_FULL | PHY_AN_AD_100BASETX_HALF; + } + Value32 |= PHY_AN_AD_PROTOCOL_802_3_CSMA_CD; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + pDevice->advertising = Value32; + } + /* Setup the auto-negotiation advertisement register. */ + else if(LineSpeed == LM_LINE_SPEED_UNKNOWN) +#else + /* Setup the auto-negotiation advertisement register. */ + if(LineSpeed == LM_LINE_SPEED_UNKNOWN) +#endif + { + /* Setup the 10/100 Mbps auto-negotiation advertisement register. */ + Value32 = PHY_AN_AD_PROTOCOL_802_3_CSMA_CD | PHY_AN_AD_ALL_SPEEDS; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + pDevice->advertising = Value32; + + /* Advertise 1000Mbps */ + if (!(pDevice->PhyFlags & PHY_NO_GIGABIT)) + { + Value32 = BCM540X_AN_AD_ALL_1G_SPEEDS; + +#ifdef INCLUDE_5701_AX_FIX + /* Bug: workaround for CRC error in gigabit mode when we are in */ + /* slave mode. This will force the PHY to operate in */ + /* master mode. */ + if(pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0) + { + Value32 |= BCM540X_CONFIG_AS_MASTER | + BCM540X_ENABLE_CONFIG_AS_MASTER; + } +#endif + + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, Value32); + pDevice->advertising1000 = Value32; + } + else + { + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, 0); + pDevice->advertising1000 = 0; + } + } + else + { + if ((pDevice->PhyFlags & PHY_NO_GIGABIT) && + (LineSpeed == LM_LINE_SPEED_1000MBPS)) + { + LineSpeed = LM_LINE_SPEED_100MBPS; + } + if(LineSpeed == LM_LINE_SPEED_1000MBPS) + { + Value32 = PHY_AN_AD_PROTOCOL_802_3_CSMA_CD; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + pDevice->advertising = Value32; + + if(DuplexMode != LM_DUPLEX_MODE_FULL) + { + Value32 = BCM540X_AN_AD_1000BASET_HALF; + } + else + { + Value32 = BCM540X_AN_AD_1000BASET_FULL; + } + +#ifdef INCLUDE_5701_AX_FIX + if ((pDevice->LoopBackMode == LM_EXT_LOOP_BACK_MODE) || + (pDevice->ChipRevId == T3_CHIP_ID_5701_A0 || + pDevice->ChipRevId == T3_CHIP_ID_5701_B0)) +#else + if (pDevice->LoopBackMode == LM_EXT_LOOP_BACK_MODE) +#endif + { + Value32 |= BCM540X_CONFIG_AS_MASTER | + BCM540X_ENABLE_CONFIG_AS_MASTER; + } + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, Value32); + pDevice->advertising1000 = Value32; + if (pDevice->LoopBackMode == LM_EXT_LOOP_BACK_MODE) + { + if ((pDevice->PhyId & PHY_ID_MASK) == PHY_BCM5401_PHY_ID) + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x8c20); + } + else + { + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, 0x0007); + LM_ReadPhy(pDevice, BCM5401_AUX_CTRL, &PhyReg18); + PhyReg18 |= 0x8000; /* set loop back */ + LM_WritePhy(pDevice, BCM5401_AUX_CTRL, PhyReg18); + } + } + } + else if(LineSpeed == LM_LINE_SPEED_100MBPS) + { + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, 0); + pDevice->advertising1000 = 0; + + if(DuplexMode != LM_DUPLEX_MODE_FULL) + { + Value32 = PHY_AN_AD_100BASETX_HALF; + } + else + { + Value32 = PHY_AN_AD_100BASETX_FULL; + } + + Value32 |= PHY_AN_AD_PROTOCOL_802_3_CSMA_CD; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + pDevice->advertising = Value32; + } + else if(LineSpeed == LM_LINE_SPEED_10MBPS) + { + LM_WritePhy(pDevice, BCM540X_1000BASET_CTRL_REG, 0); + pDevice->advertising1000 = 0; + + if(DuplexMode != LM_DUPLEX_MODE_FULL) + { + Value32 = PHY_AN_AD_10BASET_HALF; + } + else + { + Value32 = PHY_AN_AD_10BASET_FULL; + } + + Value32 |= PHY_AN_AD_PROTOCOL_802_3_CSMA_CD; + Value32 |= GetPhyAdFlowCntrlSettings(pDevice); + + LM_WritePhy(pDevice, PHY_AN_AD_REG, Value32); + pDevice->advertising = Value32; + } + } + + /* Force line speed if auto-negotiation is disabled. */ + if(pDevice->DisableAutoNeg && LineSpeed != LM_LINE_SPEED_UNKNOWN) + { + /* This code path is executed only when there is link. */ + pDevice->LineSpeed = LineSpeed; + pDevice->DuplexMode = DuplexMode; + + /* Force line seepd. */ + NewPhyCtrl = 0; + switch(LineSpeed) + { + case LM_LINE_SPEED_10MBPS: + NewPhyCtrl |= PHY_CTRL_SPEED_SELECT_10MBPS; + break; + case LM_LINE_SPEED_100MBPS: + NewPhyCtrl |= PHY_CTRL_SPEED_SELECT_100MBPS; + break; + case LM_LINE_SPEED_1000MBPS: + NewPhyCtrl |= PHY_CTRL_SPEED_SELECT_1000MBPS; + break; + default: + NewPhyCtrl |= PHY_CTRL_SPEED_SELECT_1000MBPS; + break; + } + + if(DuplexMode == LM_DUPLEX_MODE_FULL) + { + NewPhyCtrl |= PHY_CTRL_FULL_DUPLEX_MODE; + } + + /* Don't do anything if the PHY_CTRL is already what we wanted. */ + LM_ReadPhy(pDevice, PHY_CTRL_REG, &Value32); + if(Value32 != NewPhyCtrl) + { + /* Temporary bring the link down before forcing line speed. */ + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_LOOPBACK_MODE); + + /* Wait for link to go down. */ + for(Cnt = 0; Cnt < 1500; Cnt++) + { + MM_Wait(10); + + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + LM_ReadPhy(pDevice, PHY_STATUS_REG, &Value32); + + if(!(Value32 & PHY_STATUS_LINK_PASS)) + { + MM_Wait(40); + break; + } + } + + LM_WritePhy(pDevice, PHY_CTRL_REG, NewPhyCtrl); + MM_Wait(40); + } + } + else + { + LM_WritePhy(pDevice, PHY_CTRL_REG, PHY_CTRL_AUTO_NEG_ENABLE | + PHY_CTRL_RESTART_AUTO_NEG); + } + + return LM_STATUS_SUCCESS; +} /* LM_ForceAutoNegBcm540xPhy */ + +/******************************************************************************/ +/* Description: */ +/* */ +/* Return: */ +/******************************************************************************/ +LM_STATUS LM_LoadFirmware(PLM_DEVICE_BLOCK pDevice, + PT3_FWIMG_INFO pFwImg, + LM_UINT32 LoadCpu, + LM_UINT32 StartCpu) +{ + LM_UINT32 i; + LM_UINT32 address; + LM_VOID (*Wr_fn)(PLM_DEVICE_BLOCK pDevice,LM_UINT32 Register,LM_UINT32 Value32); + LM_UINT32 (*Rd_fn)(PLM_DEVICE_BLOCK pDevice,LM_UINT32 Register); + LM_UINT32 len; + LM_UINT32 base_addr; + +#ifdef INCLUDE_TCP_SEG_SUPPORT + if (T3_ASIC_REV(pDevice->ChipRevId) == T3_ASIC_REV_5705) + { + Wr_fn = LM_MemWrInd; + Rd_fn = LM_MemRdInd; + len = LM_GetStkOffLdFirmwareSize(pDevice); + base_addr = T3_NIC_BCM5705_MBUF_POOL_ADDR; + } + else +#endif + { + Wr_fn = LM_RegWrInd; + Rd_fn = LM_RegRdInd; + len = T3_RX_CPU_SPAD_SIZE; + base_addr = T3_RX_CPU_SPAD_ADDR; + } + + if (LoadCpu & T3_RX_CPU_ID) + { + if (LM_HaltCpu(pDevice,T3_RX_CPU_ID) != LM_STATUS_SUCCESS) + { + return LM_STATUS_FAILURE; + } + + /* First of all clear scrach pad memory */ + for (i = 0; i < len; i+=4) + { + Wr_fn(pDevice,base_addr+i,0); + } + + /* Copy code first */ + address = base_addr + (pFwImg->Text.Offset & 0xffff); + for (i = 0; i <= pFwImg->Text.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->Text.Buffer)[i/4]); + } + + address = base_addr + (pFwImg->ROnlyData.Offset & 0xffff); + for (i = 0; i <= pFwImg->ROnlyData.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->ROnlyData.Buffer)[i/4]); + } + + address = base_addr + (pFwImg->Data.Offset & 0xffff); + for (i= 0; i <= pFwImg->Data.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->Data.Buffer)[i/4]); + } + } + + if ((LoadCpu & T3_TX_CPU_ID) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5705)) + { + if (LM_HaltCpu(pDevice,T3_TX_CPU_ID) != LM_STATUS_SUCCESS) + { + return LM_STATUS_FAILURE; + } + + /* First of all clear scrach pad memory */ + for (i = 0; i < T3_TX_CPU_SPAD_SIZE; i+=4) + { + Wr_fn(pDevice,T3_TX_CPU_SPAD_ADDR+i,0); + } + + /* Copy code first */ + address = T3_TX_CPU_SPAD_ADDR + (pFwImg->Text.Offset & 0xffff); + for (i= 0; i <= pFwImg->Text.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->Text.Buffer)[i/4]); + } + + address = T3_TX_CPU_SPAD_ADDR + (pFwImg->ROnlyData.Offset & 0xffff); + for (i= 0; i <= pFwImg->ROnlyData.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->ROnlyData.Buffer)[i/4]); + } + + address = T3_TX_CPU_SPAD_ADDR + (pFwImg->Data.Offset & 0xffff); + for (i= 0; i <= pFwImg->Data.Length; i+=4) + { + Wr_fn(pDevice,address+i, + ((LM_UINT32 *)pFwImg->Data.Buffer)[i/4]); + } + } + + if (StartCpu & T3_RX_CPU_ID) + { + /* Start Rx CPU */ + REG_WR(pDevice,rxCpu.reg.state, 0xffffffff); + REG_WR(pDevice,rxCpu.reg.PC,pFwImg->StartAddress); + for (i = 0 ; i < 5; i++) + { + if (pFwImg->StartAddress == REG_RD(pDevice,rxCpu.reg.PC)) + break; + + REG_WR(pDevice,rxCpu.reg.state, 0xffffffff); + REG_WR(pDevice,rxCpu.reg.mode,CPU_MODE_HALT); + REG_WR(pDevice,rxCpu.reg.PC,pFwImg->StartAddress); + REG_RD_BACK(pDevice,rxCpu.reg.PC); + MM_Wait(1000); + } + + REG_WR(pDevice,rxCpu.reg.state, 0xffffffff); + REG_WR(pDevice,rxCpu.reg.mode, 0); + } + + if ((StartCpu & T3_TX_CPU_ID) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5705)) + { + /* Start Tx CPU */ + REG_WR(pDevice,txCpu.reg.state, 0xffffffff); + REG_WR(pDevice,txCpu.reg.PC,pFwImg->StartAddress); + for (i = 0 ; i < 5; i++) + { + if (pFwImg->StartAddress == REG_RD(pDevice,txCpu.reg.PC)) + break; + + REG_WR(pDevice,txCpu.reg.state, 0xffffffff); + REG_WR(pDevice,txCpu.reg.mode,CPU_MODE_HALT); + REG_WR(pDevice,txCpu.reg.PC,pFwImg->StartAddress); + REG_RD_BACK(pDevice,txCpu.reg.PC); + MM_Wait(1000); + } + + REG_WR(pDevice,txCpu.reg.state, 0xffffffff); + REG_WR(pDevice,txCpu.reg.mode, 0); + } + + return LM_STATUS_SUCCESS; +} + +LM_STATUS LM_HaltCpu(PLM_DEVICE_BLOCK pDevice,LM_UINT32 cpu_number) +{ + LM_UINT32 i; + LM_STATUS status; + + status = LM_STATUS_SUCCESS; + + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId) && + !(cpu_number & T3_RX_CPU_ID)) + { + return status; + } + + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701)) + { + status = LM_NVRAM_AcquireLock(pDevice); + } + + if (cpu_number & T3_RX_CPU_ID) + { + for (i = 0 ; i < 10000; i++) + { + REG_WR(pDevice,rxCpu.reg.state, 0xffffffff); + REG_WR(pDevice,rxCpu.reg.mode,CPU_MODE_HALT); + + if (REG_RD(pDevice,rxCpu.reg.mode) & CPU_MODE_HALT) + break; + } + + REG_WR(pDevice,rxCpu.reg.state, 0xffffffff); + REG_WR(pDevice,rxCpu.reg.mode,CPU_MODE_HALT); + REG_RD_BACK(pDevice,rxCpu.reg.mode); + MM_Wait(10); + + if (i == 10000) + status = LM_STATUS_FAILURE; + } + + if ((pDevice->Flags & T3_HAS_TWO_CPUS) && + (cpu_number & T3_TX_CPU_ID)) + { + for (i = 0 ; i < 10000; i++) + { + REG_WR(pDevice,txCpu.reg.state, 0xffffffff); + REG_WR(pDevice,txCpu.reg.mode,CPU_MODE_HALT); + + if (REG_RD(pDevice,txCpu.reg.mode) & CPU_MODE_HALT) + break; + } + + if (i == 10000) + status = LM_STATUS_FAILURE; + } + + if ((T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700) && + (T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701)) + { + if (status != LM_STATUS_SUCCESS) + { + /* + * Some part of this operation failed. + * Just undo our own actions. + */ + LM_NVRAM_ReleaseLock(pDevice); + } + else if (!(pDevice->Flags & T3_HAS_TWO_CPUS) || + cpu_number == (T3_TX_CPU_ID | T3_RX_CPU_ID)) + { + /* + * Release our NVRAM arbitration grant along + * with the firmware's arbitration request bit. + */ + REG_WR(pDevice, Nvram.SwArb, SW_ARB_REQ_CLR1 | SW_ARB_REQ_CLR0); + REG_RD_BACK(pDevice, Nvram.SwArb); + } + else + { + LM_NVRAM_ReleaseLock(pDevice); + + if (LM_NVRAM_AcquireLock(pDevice) == LM_STATUS_SUCCESS) + { + /* All is well. Release the arbitration and continue. */ + LM_NVRAM_ReleaseLock(pDevice); + } + else + { + /* + * We've timed out while attempting to get the + * NVRAM arbitration. Assume the cause is that + * the NVRAM has requested arbitration after we + * acquired arbitration the first time, but before + * the CPU was actually halted. + */ + + /* + * Release our NVRAM arbitration grant along + * with the firmware's arbitration request bit. + */ + REG_WR(pDevice, Nvram.SwArb, SW_ARB_REQ_CLR1 | SW_ARB_REQ_CLR0); + REG_RD_BACK(pDevice, Nvram.SwArb); + } + } + } + + return status; +} + + +LM_STATUS +LM_BlinkLED(PLM_DEVICE_BLOCK pDevice, LM_UINT32 BlinkDurationSec) +{ + int j; + int ret = LM_STATUS_SUCCESS; + + if(BlinkDurationSec == 0) + { + BlinkDurationSec = 1; + } + if(BlinkDurationSec > 120) + { + BlinkDurationSec = 120; + } + + for(j = 0; j < BlinkDurationSec * 2; j++) + { + if(j % 2) + { + // Turn on the LEDs. + REG_WR(pDevice, MacCtrl.LedCtrl, + LED_CTRL_OVERRIDE_LINK_LED | + LED_CTRL_1000MBPS_LED_ON | + LED_CTRL_100MBPS_LED_ON | + LED_CTRL_10MBPS_LED_ON | + LED_CTRL_OVERRIDE_TRAFFIC_LED | + LED_CTRL_BLINK_TRAFFIC_LED | + LED_CTRL_TRAFFIC_LED); + } + else + { + // Turn off the LEDs. + REG_WR(pDevice, MacCtrl.LedCtrl, + LED_CTRL_OVERRIDE_LINK_LED | + LED_CTRL_OVERRIDE_TRAFFIC_LED); + } + if (MM_Sleep(pDevice, 500) != LM_STATUS_SUCCESS)/* 0.5 second */ + { + ret = LM_STATUS_FAILURE; + break; + } + } + REG_WR(pDevice, MacCtrl.LedCtrl, pDevice->LedCtrl); + return ret; +} + +LM_STATUS +LM_SwitchClocks(PLM_DEVICE_BLOCK pDevice) +{ + LM_UINT32 ClockCtrl; + + if(T3_ASIC_5714_FAMILY(pDevice->ChipRevId)) + return LM_STATUS_SUCCESS; + + ClockCtrl = REG_RD(pDevice, PciCfg.ClockCtrl); + pDevice->ClockCtrl = ClockCtrl & (T3_PCI_FORCE_CLKRUN | + T3_PCI_CLKRUN_OUTPUT_EN | 0x1f); + if (T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + if (ClockCtrl & T3_PCI_625_CORE_CLOCK) + { + /* clear ALT clock first */ + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | + T3_PCI_625_CORE_CLOCK); + MM_Wait(40); /* required delay is 27usec */ + } + } + else + { + if (ClockCtrl & T3_PCI_44MHZ_CORE_CLOCK) + { + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | + T3_PCI_44MHZ_CORE_CLOCK | T3_PCI_SELECT_ALTERNATE_CLOCK); + MM_Wait(40); /* required delay is 27usec */ + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl | + T3_PCI_SELECT_ALTERNATE_CLOCK); + MM_Wait(40); /* required delay is 27usec */ + } + } + + RAW_REG_WR(pDevice, PciCfg.ClockCtrl, pDevice->ClockCtrl); + MM_Wait(40); /* required delay is 27usec */ + return LM_STATUS_SUCCESS; +} + +int t3_do_dma(PLM_DEVICE_BLOCK pDevice, + LM_PHYSICAL_ADDRESS host_addr_phy, int length, + int dma_read) +{ + T3_DMA_DESC dma_desc; + int i; + LM_UINT32 dma_desc_addr; + LM_UINT32 value32; + + REG_WR(pDevice, BufMgr.Mode, 0); + REG_WR(pDevice, Ftq.Reset, 0); + + dma_desc.host_addr.High = host_addr_phy.High; + dma_desc.host_addr.Low = host_addr_phy.Low; + dma_desc.nic_mbuf = 0x2100; + dma_desc.len = length; + dma_desc.flags = 0x00000005; /* Generate Rx-CPU event */ + + if (dma_read) + { + dma_desc.cqid_sqid = (T3_QID_RX_BD_COMP << 8) | + T3_QID_DMA_HIGH_PRI_READ; + REG_WR(pDevice, DmaRead.Mode, DMA_READ_MODE_ENABLE); + } + else + { + dma_desc.cqid_sqid = (T3_QID_RX_DATA_COMP << 8) | + T3_QID_DMA_HIGH_PRI_WRITE; + REG_WR(pDevice, DmaWrite.Mode, DMA_WRITE_MODE_ENABLE); + } + + dma_desc_addr = T3_NIC_DMA_DESC_POOL_ADDR; + + /* Writing this DMA descriptor to DMA memory */ + for (i = 0; i < sizeof(T3_DMA_DESC); i += 4) + { + value32 = *((PLM_UINT32) (((PLM_UINT8) &dma_desc) + i)); + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_ADDR_REG, dma_desc_addr+i); + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_DATA_REG, + MM_SWAP_LE32(value32)); + } + MM_WriteConfig32(pDevice, T3_PCI_MEM_WIN_ADDR_REG, 0); + + if (dma_read) + REG_WR(pDevice, Ftq.DmaHighReadFtqFifoEnqueueDequeue, dma_desc_addr); + else + REG_WR(pDevice, Ftq.DmaHighWriteFtqFifoEnqueueDequeue, dma_desc_addr); + + for (i = 0; i < 40; i++) + { + if (dma_read) + value32 = REG_RD(pDevice, Ftq.RcvBdCompFtqFifoEnqueueDequeue); + else + value32 = REG_RD(pDevice, Ftq.RcvDataCompFtqFifoEnqueueDequeue); + + if ((value32 & 0xffff) == dma_desc_addr) + break; + + MM_Wait(10); + } + + return LM_STATUS_SUCCESS; +} + +STATIC LM_STATUS +LM_DmaTest(PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pBufferVirt, + LM_PHYSICAL_ADDRESS BufferPhy, LM_UINT32 BufferSize) +{ + int j; + LM_UINT32 *ptr; + int dma_success = 0; + LM_STATUS ret = LM_STATUS_FAILURE; + + if(T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5700 && + T3_ASIC_REV(pDevice->ChipRevId) != T3_ASIC_REV_5701) + { + return LM_STATUS_SUCCESS; + } + while (!dma_success) + { + /* Fill data with incremental patterns */ + ptr = (LM_UINT32 *)pBufferVirt; + for (j = 0; j < BufferSize/4; j++) + *ptr++ = j; + + if (t3_do_dma(pDevice,BufferPhy,BufferSize, 1) == LM_STATUS_FAILURE) + { + goto LM_DmaTestDone; + } + + MM_Wait(40); + ptr = (LM_UINT32 *)pBufferVirt; + /* Fill data with zero */ + for (j = 0; j < BufferSize/4; j++) + *ptr++ = 0; + + if (t3_do_dma(pDevice,BufferPhy,BufferSize, 0) == LM_STATUS_FAILURE) + { + goto LM_DmaTestDone; + } + + MM_Wait(40); + /* Check for data */ + ptr = (LM_UINT32 *)pBufferVirt; + for (j = 0; j < BufferSize/4; j++) + { + if (*ptr++ != j) + { + if ((pDevice->DmaReadWriteCtrl & DMA_CTRL_WRITE_BOUNDARY_MASK) + != DMA_CTRL_WRITE_BOUNDARY_16) + { + pDevice->DmaReadWriteCtrl = (pDevice->DmaReadWriteCtrl & + ~DMA_CTRL_WRITE_BOUNDARY_MASK) | + DMA_CTRL_WRITE_BOUNDARY_16; + REG_WR(pDevice, PciCfg.DmaReadWriteCtrl, + pDevice->DmaReadWriteCtrl); + break; + } + else + { + goto LM_DmaTestDone; + } + } + } + if (j == (BufferSize/4)) + dma_success = 1; + } + ret = LM_STATUS_SUCCESS; +LM_DmaTestDone: + memset(pBufferVirt, 0, BufferSize); + return ret; +} + +void +LM_Add32To64Counter(LM_UINT32 Counter32, T3_64BIT_REGISTER *Counter64) +{ + Counter64->Low += Counter32; + if (Counter64->Low < Counter32) + { + Counter64->High++; + } +} + +LM_STATUS +LM_GetStats(PLM_DEVICE_BLOCK pDevice) +{ + PT3_STATS_BLOCK pStats = (PT3_STATS_BLOCK) pDevice->pStatsBlkVirt; + + if(!T3_ASIC_IS_5705_BEYOND(pDevice->ChipRevId)) + { + return LM_STATUS_FAILURE; + } + + if (pStats == 0) + { + return LM_STATUS_FAILURE; + } + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCOutOctets), + &pStats->ifHCOutOctets); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.etherStatsCollisions), + &pStats->etherStatsCollisions); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.outXonSent), + &pStats->outXonSent); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.outXoffSent), + &pStats->outXoffSent); + LM_Add32To64Counter(REG_RD(pDevice, + MacCtrl.dot3StatsInternalMacTransmitErrors), + &pStats->dot3StatsInternalMacTransmitErrors); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsSingleCollisionFrames), + &pStats->dot3StatsSingleCollisionFrames); + LM_Add32To64Counter(REG_RD(pDevice, + MacCtrl.dot3StatsMultipleCollisionFrames), + &pStats->dot3StatsMultipleCollisionFrames); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsDeferredTransmissions), + &pStats->dot3StatsDeferredTransmissions); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsExcessiveCollisions), + &pStats->dot3StatsExcessiveCollisions); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsLateCollisions), + &pStats->dot3StatsLateCollisions); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCOutUcastPkts), + &pStats->ifHCOutUcastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCOutMulticastPkts), + &pStats->ifHCOutMulticastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCOutBroadcastPkts), + &pStats->ifHCOutBroadcastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCInOctets), + &pStats->ifHCInOctets); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.etherStatsFragments), + &pStats->etherStatsFragments); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCInUcastPkts), + &pStats->ifHCInUcastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCInMulticastPkts), + &pStats->ifHCInMulticastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.ifHCInBroadcastPkts), + &pStats->ifHCInBroadcastPkts); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsFCSErrors), + &pStats->dot3StatsFCSErrors); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsAlignmentErrors), + &pStats->dot3StatsAlignmentErrors); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.xonPauseFramesReceived), + &pStats->xonPauseFramesReceived); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.xoffPauseFramesReceived), + &pStats->xoffPauseFramesReceived); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.macControlFramesReceived), + &pStats->macControlFramesReceived); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.xoffStateEntered), + &pStats->xoffStateEntered); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.dot3StatsFramesTooLong), + &pStats->dot3StatsFramesTooLong); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.etherStatsJabbers), + &pStats->etherStatsJabbers); + LM_Add32To64Counter(REG_RD(pDevice, MacCtrl.etherStatsUndersizePkts), + &pStats->etherStatsUndersizePkts); + + return LM_STATUS_SUCCESS; +} diff --git a/drivers/net/bcm5700/tigon3.h b/drivers/net/bcm5700/tigon3.h new file mode 100644 index 000000000..b8ecad536 --- /dev/null +++ b/drivers/net/bcm5700/tigon3.h @@ -0,0 +1,3849 @@ +/******************************************************************************/ +/* */ +/* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 - 2005 Broadcom */ +/* Corporation. */ +/* 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, located in the file LICENSE. */ +/* */ +/* History: */ +/* */ +/******************************************************************************/ + +#ifndef TIGON3_H +#define TIGON3_H + +#include "lm.h" +#if INCLUDE_TBI_SUPPORT +#include "autoneg.h" +#endif + + + +/******************************************************************************/ +/* Constants. */ +/******************************************************************************/ + +#ifndef TIGON3_DEBUG +#define TIGON3_DEBUG 0 +#endif /* TIGON3_DEBUG */ + +/* Number of entries in the Jumbo Receive RCB. This value must 256 or 0. */ +/* Currently, Jumbo Receive RCB is disabled. */ +#ifndef T3_JUMBO_RCV_RCB_ENTRY_COUNT +#define T3_JUMBO_RCV_RCB_ENTRY_COUNT 0 +#endif /* T3_JUMBO_RCV_RCB_ENTRY_COUNT */ + +#ifndef T3_JUMBO_RCV_ENTRY_COUNT +#define T3_JUMBO_RCV_ENTRY_COUNT 0 +#endif /* T3_JUMBO_RCV_ENTRY_COUNT */ + +#ifndef T3_JUMBO_RCB_ENTRY_COUNT +#define T3_JUMBO_RCB_ENTRY_COUNT 0 +#endif /* T3_JUMBO_RCB_ENTRY_COUNT */ + +/* Maxim number of packet descriptors used for sending packets. */ +#define MAX_TX_PACKET_DESC_COUNT T3_SEND_RCB_ENTRY_COUNT +#define DEFAULT_TX_PACKET_DESC_COUNT 120 + +/* Maximum number of packet descriptors used for receiving packets. */ +#if T3_JUMBO_RCB_ENTRY_COUNT +#define MAX_RX_PACKET_DESC_COUNT \ + (T3_STD_RCV_RCB_ENTRY_COUNT + T3_JUMBO_RCV_RCB_ENTRY_COUNT) +#else +#define MAX_RX_PACKET_DESC_COUNT T3_STD_RCV_RCB_ENTRY_COUNT +#endif +#define DEFAULT_RX_PACKET_DESC_COUNT 200 + +/* Threshhold for double copying small tx packets. 0 will disable double */ +/* copying of small Tx packets. */ +#define DEFAULT_TX_COPY_BUFFER_SIZE 0 +#define MIN_TX_COPY_BUFFER_SIZE 64 +#define MAX_TX_COPY_BUFFER_SIZE 512 + +/* Cache line. */ +#define COMMON_CACHE_LINE_SIZE 0x20 +#define COMMON_CACHE_LINE_MASK (COMMON_CACHE_LINE_SIZE-1) + +/* Maximum number of fragment we can handle. */ +#ifndef MAX_FRAGMENT_COUNT +#define MAX_FRAGMENT_COUNT 32 +#endif + +/* B0 bug. */ +#define BCM5700_BX_MIN_FRAG_SIZE 10 +#define BCM5700_BX_MIN_FRAG_BUF_SIZE 16 /* nice aligned size. */ +#define BCM5700_BX_MIN_FRAG_BUF_SIZE_MASK (BCM5700_BX_MIN_FRAG_BUF_SIZE-1) +#define BCM5700_BX_TX_COPY_BUF_SIZE (BCM5700_BX_MIN_FRAG_BUF_SIZE * \ + MAX_FRAGMENT_COUNT) + +/* MAGIC number. */ +//#define T3_MAGIC_NUM 'KevT' +#define T3_FIRMWARE_MAILBOX 0x0b50 +#define T3_MAGIC_NUM_FIRMWARE_INIT_DONE 0x4B657654 +#define T3_MAGIC_NUM_DISABLE_DMAW_ON_LINK_CHANGE 0x4861764b + +#define T3_NIC_DATA_SIG_ADDR 0x0b54 +#define T3_NIC_DATA_SIG 0x4b657654 + +#define T3_NIC_DATA_NIC_CFG_ADDR 0x0b58 +#define T3_NIC_CFG_LED_MAC_MODE BIT_NONE +#define T3_NIC_CFG_LED_PHY_MODE_1 BIT_2 +#define T3_NIC_CFG_LED_PHY_MODE_2 BIT_3 +#define T3_NIC_CFG_LED_MODE_MASK (BIT_2 | BIT_3) +#define T3_NIC_CFG_PHY_TYPE_UNKNOWN BIT_NONE +#define T3_NIC_CFG_PHY_TYPE_COPPER BIT_4 +#define T3_NIC_CFG_PHY_TYPE_FIBER BIT_5 +#define T3_NIC_CFG_PHY_TYPE_MASK (BIT_4 | BIT_5) +#define T3_NIC_CFG_ENABLE_WOL BIT_6 +#define T3_NIC_CFG_ENABLE_ASF BIT_7 +#define T3_NIC_EEPROM_WP BIT_8 +#define T3_NIC_WOL_LIMIT_10 BIT_10 +#define T3_NIC_MINI_PCI BIT_12 +#define T3_NIC_FIBER_WOL_CAPABLE BIT_14 +#define T3_NIC_BOTH_PORT_100MB_WOL_CAPABLE BIT_15 +#define T3_NIC_GPIO2_NOT_AVAILABLE BIT_20 + +#define T3_NIC_DATA_VER 0x0b5c +#define T3_NIC_DATA_VER_SHIFT 16 + +#define T3_NIC_DATA_PHY_ID_ADDR 0x0b74 +#define T3_NIC_PHY_ID1_MASK 0xffff0000 +#define T3_NIC_PHY_ID2_MASK 0x0000ffff + +#define T3_CMD_MAILBOX 0x0b78 +#define T3_CMD_NICDRV_ALIVE 0x01 +#define T3_CMD_NICDRV_PAUSE_FW 0x02 +#define T3_CMD_NICDRV_IPV4ADDR_CHANGE 0x03 +#define T3_CMD_NICDRV_IPV6ADDR_CHANGE 0x04 +#define T3_CMD_5703A0_FIX_DMAFW_DMAR 0x05 +#define T3_CMD_5703A0_FIX_DMAFW_DMAW 0x06 + +#define T3_CMD_NICDRV_ALIVE2 0x0d + +#define T3_CMD_LENGTH_MAILBOX 0x0b7c +#define T3_CMD_DATA_MAILBOX 0x0b80 + +#define T3_ASF_FW_STATUS_MAILBOX 0x0c00 + +#define T3_DRV_STATE_MAILBOX 0x0c04 +#define T3_DRV_STATE_START 0x01 +#define T3_DRV_STATE_START_DONE 0x80000001 +#define T3_DRV_STATE_UNLOAD 0x02 +#define T3_DRV_STATE_UNLOAD_DONE 0x80000002 +#define T3_DRV_STATE_WOL 0x03 +#define T3_DRV_STATE_SUSPEND 0x04 + +#define T3_FW_RESET_TYPE_MAILBOX 0x0c08 + +#define T3_MAC_ADDR_HIGH_MAILBOX 0x0c14 +#define T3_MAC_ADDR_LOW_MAILBOX 0x0c18 + +#define DRV_WOL_MAILBOX 0xd30 +#define DRV_WOL_SIGNATURE 0x474c0000 + +#define DRV_DOWN_STATE_SHUTDOWN 0x1 + +#define DRV_WOL_SET_MAGIC_PKT BIT_2 + +#define T3_NIC_DATA_NIC_CFG_ADDR2 0x0d38 /* bit 2-3 are same as in */ + /* 0xb58 */ +#define T3_SHASTA_EXT_LED_MODE_MASK (BIT_15 | BIT_16) +#define T3_SHASTA_EXT_LED_LEGACY_MODE BIT_NONE +#define T3_SHASTA_EXT_LED_SHARED_TRAFFIC_LINK_MODE BIT_15 +#define T3_SHASTA_EXT_LED_MAC_MODE BIT_16 +#define T3_SHASTA_EXT_LED_WIRELESS_COMBO_MODE (BIT_15 | BIT_16) +#define T3_NIC_CFG_CAPACITIVE_COUPLING BIT_17 +#define T3_NIC_CFG_PRESERVE_PREEMPHASIS BIT_18 + +/******************************************************************************/ +/* Hardware constants. */ +/******************************************************************************/ + +/* Number of entries in the send ring: must be 512. */ +#define T3_SEND_RCB_ENTRY_COUNT 512 +#define T3_SEND_RCB_ENTRY_COUNT_MASK (T3_SEND_RCB_ENTRY_COUNT-1) + +/* Number of send RCBs. May be 1-16 but for now, only support one. */ +#define T3_MAX_SEND_RCB_COUNT 16 + +/* Number of entries in the Standard Receive RCB. Must be 512 entries. */ +#define T3_STD_RCV_RCB_ENTRY_COUNT 512 +#define T3_STD_RCV_RCB_ENTRY_COUNT_MASK (T3_STD_RCV_RCB_ENTRY_COUNT-1) +#define DEFAULT_STD_RCV_DESC_COUNT 200 /* Must be < 512. */ +#define MAX_STD_RCV_BUFFER_SIZE 0x600 + +/* Number of entries in the Mini Receive RCB. This value can either be */ +/* 0, 1024. Currently Mini Receive RCB is disabled. */ +#ifndef T3_MINI_RCV_RCB_ENTRY_COUNT +#define T3_MINI_RCV_RCB_ENTRY_COUNT 0 +#endif /* T3_MINI_RCV_RCB_ENTRY_COUNT */ +#define T3_MINI_RCV_RCB_ENTRY_COUNT_MASK (T3_MINI_RCV_RCB_ENTRY_COUNT-1) +#define MAX_MINI_RCV_BUFFER_SIZE 512 +#define DEFAULT_MINI_RCV_BUFFER_SIZE 64 +#define DEFAULT_MINI_RCV_DESC_COUNT 100 /* Must be < 1024. */ + +#define T3_JUMBO_RCV_RCB_ENTRY_COUNT_MASK (T3_JUMBO_RCV_RCB_ENTRY_COUNT-1) + +#define MAX_JUMBO_RCV_BUFFER_SIZE (10 * 1024) /* > 1514 */ +#define DEFAULT_JUMBO_RCV_BUFFER_SIZE (4 * 1024) /* > 1514 */ +#define DEFAULT_JUMBO_RCV_DESC_COUNT 128 /* Must be < 256. */ + +#define MAX_JUMBO_TX_BUFFER_SIZE (8 * 1024) /* > 1514 */ +#define DEFAULT_JUMBO_TX_BUFFER_SIZE (4 * 1024) /* > 1514 */ + +/* Number of receive return RCBs. Maybe 1-16 but for now, only support one. */ +#define T3_MAX_RCV_RETURN_RCB_COUNT 16 + +/* Number of entries in a Receive Return ring. This value is either 1024 */ +/* or 2048. */ +#ifndef T3_RCV_RETURN_RCB_ENTRY_COUNT +#define T3_RCV_RETURN_RCB_ENTRY_COUNT 1024 +#endif /* T3_RCV_RETURN_RCB_ENTRY_COUNT */ +#define T3_RCV_RETURN_RCB_ENTRY_COUNT_MASK (T3_RCV_RETURN_RCB_ENTRY_COUNT-1) + + +/* Default coalescing parameters. */ +#ifdef BCM_NAPI_RXPOLL +#define DEFAULT_RX_COALESCING_TICKS 18 +#define DEFAULT_RX_MAX_COALESCED_FRAMES 6 +#else +#define DEFAULT_RX_COALESCING_TICKS 60 +#define DEFAULT_RX_MAX_COALESCED_FRAMES 15 +#endif + +#define DEFAULT_TX_COALESCING_TICKS 200 +#define DEFAULT_TX_MAX_COALESCED_FRAMES 35 + +#define MAX_RX_COALESCING_TICKS 500 +#define MAX_TX_COALESCING_TICKS 500 +#define MAX_RX_MAX_COALESCED_FRAMES 100 +#define MAX_TX_MAX_COALESCED_FRAMES 100 + +#define ADAPTIVE_LO_RX_MAX_COALESCED_FRAMES 5 +#define ADAPTIVE_HI_RX_MAX_COALESCED_FRAMES 48 +#define ADAPTIVE_LO_RX_COALESCING_TICKS 25 +#define ADAPTIVE_HI_RX_COALESCING_TICKS 120 +#define ADAPTIVE_LO_PKT_THRESH 52000 +#define ADAPTIVE_HI_PKT_THRESH 112000 +#define ADAPTIVE_LO_TX_MAX_COALESCED_FRAMES 20 +#define ADAPTIVE_HI_TX_MAX_COALESCED_FRAMES 75 + +#ifdef BCM_NAPI_RXPOLL +#define DEFAULT_RX_COALESCING_TICKS_DURING_INT 18 +#define DEFAULT_RX_MAX_COALESCED_FRAMES_DURING_INT 6 +#else +#define DEFAULT_RX_COALESCING_TICKS_DURING_INT 25 +#define DEFAULT_RX_MAX_COALESCED_FRAMES_DURING_INT 2 +#endif +#define DEFAULT_TX_COALESCING_TICKS_DURING_INT 25 +#define ADAPTIVE_LO_RX_MAX_COALESCED_FRAMES_DURING_INT 1 +#define ADAPTIVE_HI_RX_MAX_COALESCED_FRAMES_DURING_INT 5 +#define DEFAULT_TX_MAX_COALESCED_FRAMES_DURING_INT 5 + +#define BAD_DEFAULT_VALUE 0xffffffff + +#define DEFAULT_STATS_COALESCING_TICKS 1000000 +#define MIN_STATS_COALESCING_TICKS 100 +#define MAX_STATS_COALESCING_TICKS 3600000000U + + +/* Receive BD Replenish thresholds. */ +#define DEFAULT_RCV_STD_BD_REPLENISH_THRESHOLD 4 +#define DEFAULT_RCV_JUMBO_BD_REPLENISH_THRESHOLD 4 + +/* Maximum physical fragment size. */ +#define MAX_FRAGMENT_SIZE (64 * 1024) + + +/* Standard view. */ +#define T3_STD_VIEW_SIZE (64 * 1024) +#define T3_FLAT_VIEW_SIZE (32 * 1024 * 1024) + + +/* Buffer descriptor base address on the NIC's memory. */ + +#define T3_NIC_SND_BUFFER_DESC_ADDR 0x4000 +#define T3_NIC_STD_RCV_BUFFER_DESC_ADDR 0x6000 +#define T3_NIC_JUMBO_RCV_BUFFER_DESC_ADDR 0x7000 + +#define T3_NIC_STD_RCV_BUFFER_DESC_ADDR_EXT_MEM 0xc000 +#define T3_NIC_JUMBO_RCV_BUFFER_DESC_ADDR_EXT_MEM 0xd000 +#define T3_NIC_MINI_RCV_BUFFER_DESC_ADDR_EXT_MEM 0xe000 + +#define T3_NIC_SND_BUFFER_DESC_SIZE (T3_SEND_RCB_ENTRY_COUNT * \ + sizeof(T3_SND_BD) / 4) + +#define T3_NIC_STD_RCV_BUFFER_DESC_SIZE (T3_STD_RCV_RCB_ENTRY_COUNT * \ + sizeof(T3_RCV_BD) / 4) + +#define T3_NIC_JUMBO_RCV_BUFFER_DESC_SIZE (T3_JUMBO_RCV_RCB_ENTRY_COUNT * \ + sizeof(T3_EXT_RCV_BD) / 4) + + +/* MBUF pool. */ +#define T3_NIC_MBUF_POOL_ADDR 0x8000 +#define T3_NIC_MBUF_POOL_SIZE32 0x8000 +#define T3_NIC_MBUF_POOL_SIZE96 0x18000 +#define T3_NIC_MBUF_POOL_SIZE64 0x10000 + +#define T3_NIC_MBUF_POOL_ADDR_EXT_MEM 0x20000 + +#define T3_NIC_BCM5705_MBUF_POOL_ADDR 0x10000 +#define T3_NIC_BCM5705_MBUF_POOL_SIZE 0xe000 + +/* DMA descriptor pool */ +#define T3_NIC_DMA_DESC_POOL_ADDR 0x2000 +#define T3_NIC_DMA_DESC_POOL_SIZE 0x2000 /* 8KB. */ + +#define T3_DEF_DMA_MBUF_LOW_WMARK 0x50 +#define T3_DEF_RX_MAC_MBUF_LOW_WMARK 0x20 +#define T3_DEF_MBUF_HIGH_WMARK 0x60 + +#define T3_DEF_DMA_MBUF_LOW_WMARK_5705 0x0 +#define T3_DEF_RX_MAC_MBUF_LOW_WMARK_5705 0x10 +#define T3_DEF_MBUF_HIGH_WMARK_5705 0x60 + +#define T3_DEF_DMA_MBUF_LOW_WMARK_JUMBO 304 +#define T3_DEF_RX_MAC_MBUF_LOW_WMARK_JUMBO 152 +#define T3_DEF_MBUF_HIGH_WMARK_JUMBO 380 + +#define T3_DEF_DMA_DESC_LOW_WMARK 5 +#define T3_DEF_DMA_DESC_HIGH_WMARK 10 + +/* Maximum size of giant TCP packet can be sent */ +#define T3_TCP_SEG_MAX_OFFLOAD_SIZE 64*1000 +#define T3_TCP_SEG_MIN_NUM_SEG 20 + +#define T3_RX_CPU_ID 0x1 +#define T3_TX_CPU_ID 0x2 +#define T3_RX_CPU_SPAD_ADDR 0x30000 +#define T3_RX_CPU_SPAD_SIZE 0x4000 +#define T3_TX_CPU_SPAD_ADDR 0x34000 +#define T3_TX_CPU_SPAD_SIZE 0x4000 + +typedef struct T3_DIR_ENTRY +{ + PLM_UINT8 Buffer; + LM_UINT32 Offset; + LM_UINT32 Length; +} T3_DIR_ENTRY,*PT3_DIR_ENTRY; + +typedef struct T3_FWIMG_INFO +{ + LM_UINT32 StartAddress; + T3_DIR_ENTRY Text; + T3_DIR_ENTRY ROnlyData; + T3_DIR_ENTRY Data; + T3_DIR_ENTRY Sbss; + T3_DIR_ENTRY Bss; +} T3_FWIMG_INFO, *PT3_FWIMG_INFO; + + + +/******************************************************************************/ +/* Tigon3 PCI Registers. */ +/******************************************************************************/ +/* MSI ENABLE bit is located at this offset */ +#define T3_PCI_MSI_ENABLE 0x58 + +#define T3_PCI_ID_BCM5700 0x164414e4 +#define T3_PCI_ID_BCM5701 0x164514e4 +#define T3_PCI_ID_BCM5702 0x164614e4 +#define T3_PCI_ID_BCM5702x 0x16A614e4 +#define T3_PCI_ID_BCM5703 0x164714e4 +#define T3_PCI_ID_BCM5703x 0x16A714e4 +#define T3_PCI_ID_BCM5702FE 0x164D14e4 +#define T3_PCI_ID_BCM5704 0x164814e4 +#define T3_PCI_ID_BCM5705 0x165314e4 +#define T3_PCI_ID_BCM5705M 0x165D14e4 +#define T3_PCI_ID_BCM5705F 0x166E14e4 +#define T3_PCI_ID_BCM5901 0x170D14e4 +#define T3_PCI_ID_BCM5901A2 0x170E14e4 +#define T3_PCI_ID_BCM5751F 0x167E14e4 + +#define T3_PCI_ID_BCM5753 0x16f714e4 +#define T3_PCI_ID_BCM5753M 0x16fd14e4 +#define T3_PCI_ID_BCM5753F 0x16fe14e4 +#define T3_PCI_ID_BCM5781 0x16dd14e4 + +#define T3_PCI_ID_BCM5903M 0x16ff14e4 + +#define T3_PCI_VENDOR_ID(x) ((x) & 0xffff) +#define T3_PCI_DEVICE_ID(x) ((x) >> 16) + +#define T3_PCI_MISC_HOST_CTRL_REG 0x68 + +/* The most significant 16bit of register 0x68. */ +/* ChipId:4, ChipRev:4, MetalRev:8 */ +#define T3_CHIP_ID_5700_A0 0x7000 +#define T3_CHIP_ID_5700_A1 0x7001 +#define T3_CHIP_ID_5700_B0 0x7100 +#define T3_CHIP_ID_5700_B1 0x7101 +#define T3_CHIP_ID_5700_C0 0x7200 + +#define T3_CHIP_ID_5701_A0 0x0000 +#define T3_CHIP_ID_5701_B0 0x0100 +#define T3_CHIP_ID_5701_B2 0x0102 +#define T3_CHIP_ID_5701_B5 0x0105 + +#define T3_CHIP_ID_5703_A0 0x1000 +#define T3_CHIP_ID_5703_A1 0x1001 +#define T3_CHIP_ID_5703_A2 0x1002 +#define T3_CHIP_ID_5703_A3 0x1003 + +#define T3_CHIP_ID_5704_A0 0x2000 +#define T3_CHIP_ID_5704_A1 0x2001 +#define T3_CHIP_ID_5704_A2 0x2002 + +#define T3_CHIP_ID_5705_A0 0x3000 +#define T3_CHIP_ID_5705_A1 0x3001 +#define T3_CHIP_ID_5705_A2 0x3002 +#define T3_CHIP_ID_5705_A3 0x3003 + +#define T3_CHIP_ID_5750_A0 0x4000 +#define T3_CHIP_ID_5750_A1 0x4001 +#define T3_CHIP_ID_5750_A3 0x4003 +#define T3_CHIP_ID_5750_B0 0x4010 +#define T3_CHIP_ID_5750_C0 0x4200 + +#define T3_CHIP_ID_5714_A0 0x5000 +#define T3_CHIP_ID_5752_A0 0x6000 +#define T3_CHIP_ID_5714 0x8000 + + +/* Chip Id. */ +#define T3_ASIC_REV(_ChipRevId) ((_ChipRevId) >> 12) +#define T3_ASIC_REV_5700 0x07 +#define T3_ASIC_REV_5701 0x00 +#define T3_ASIC_REV_5703 0x01 +#define T3_ASIC_REV_5704 0x02 +#define T3_ASIC_REV_5705 0x03 +#define T3_ASIC_REV_5750 0x04 +#define T3_ASIC_REV_5714_A0 0x05 /*5714,5715*/ +#define T3_ASIC_REV_5752 0x06 +#define T3_ASIC_REV_5780 0x08 /* 5780 previously htle */ +#define T3_ASIC_REV_5714 0x09 /*5714,5715*/ + +#define T3_ASIC_IS_5705_BEYOND(_ChipRevId) \ + ((T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5705) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5750) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714_A0) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5780) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5752)) + +#define T3_ASIC_IS_575X_PLUS(_ChipRevId) \ + ((T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5750) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714_A0) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5780) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5752)) + +#define T3_ASIC_5714_FAMILY(_ChipRevId) \ + ((T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714_A0) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5780) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714)) + +#define T3_ASIC_IS_JUMBO_CAPABLE(_ChipRevId) \ + ((T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5700) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5701) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5703) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714_A0) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5780) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5714) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5704)) + +#define T3_ASIC_5752(_ChipRevId) \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5752) + +#define T3_ASIC_5705_OR_5750(_ChipRevId) \ + ((T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5705) || \ + (T3_ASIC_REV(_ChipRevId) == T3_ASIC_REV_5750)) + +/* Chip id and revision. */ +#define T3_CHIP_REV(_ChipRevId) ((_ChipRevId) >> 8) +#define T3_CHIP_REV_5700_AX 0x70 +#define T3_CHIP_REV_5700_BX 0x71 +#define T3_CHIP_REV_5700_CX 0x72 +#define T3_CHIP_REV_5701_AX 0x00 +#define T3_CHIP_REV_5703_AX 0x10 +#define T3_CHIP_REV_5704_AX 0x20 +#define T3_CHIP_REV_5704_BX 0x21 + +#define T3_CHIP_REV_5750_AX 0x40 +#define T3_CHIP_REV_5750_BX 0x41 + +/* Metal revision. */ +#define T3_METAL_REV(_ChipRevId) ((_ChipRevId) & 0xff) +#define T3_METAL_REV_A0 0x00 +#define T3_METAL_REV_A1 0x01 +#define T3_METAL_REV_B0 0x00 +#define T3_METAL_REV_B1 0x01 +#define T3_METAL_REV_B2 0x02 + +#define T3_PCI_REG_CLOCK_CTRL 0x74 + +#define T3_PCI_DISABLE_RX_CLOCK BIT_10 +#define T3_PCI_DISABLE_TX_CLOCK BIT_11 +#define T3_PCI_SELECT_ALTERNATE_CLOCK BIT_12 +#define T3_PCI_POWER_DOWN_PCI_PLL133 BIT_15 +#define T3_PCI_44MHZ_CORE_CLOCK BIT_18 +#define T3_PCI_625_CORE_CLOCK BIT_20 +#define T3_PCI_FORCE_CLKRUN BIT_21 +#define T3_PCI_CLKRUN_OUTPUT_EN BIT_22 + + +#define T3_PCI_REG_ADDR_REG 0x78 +#define T3_PCI_REG_DATA_REG 0x80 + +#define T3_PCI_MEM_WIN_ADDR_REG 0x7c +#define T3_PCI_MEM_WIN_DATA_REG 0x84 + +#define T3_PCI_PM_CAP_REG 0x48 + +#define T3_PCI_PM_CAP_PME_D3COLD BIT_31 +#define T3_PCI_PM_CAP_PME_D3HOT BIT_30 + +#define T3_PCI_PM_STATUS_CTRL_REG 0x4c + +#define T3_PM_POWER_STATE_MASK (BIT_0 | BIT_1) +#define T3_PM_POWER_STATE_D0 BIT_NONE +#define T3_PM_POWER_STATE_D1 BIT_0 +#define T3_PM_POWER_STATE_D2 BIT_1 +#define T3_PM_POWER_STATE_D3 (BIT_0 | BIT_1) + +#define T3_PM_PME_ENABLE BIT_8 +#define T3_PM_PME_ASSERTED BIT_15 + +#define T3_MSI_CAPABILITY_ID_REG 0x58 +#define T3_MSI_NEXT_CAPABILITY_PTR 0x59 + +/* PCI state register. */ +#define T3_PCI_STATE_REG 0x70 + +#define T3_PCI_STATE_FORCE_RESET BIT_0 +#define T3_PCI_STATE_INT_NOT_ACTIVE BIT_1 +#define T3_PCI_STATE_CONVENTIONAL_PCI_MODE BIT_2 +#define T3_PCI_STATE_BUS_SPEED_HIGH BIT_3 +#define T3_PCI_STATE_32BIT_PCI_BUS BIT_4 + + +/* Broadcom subsystem/subvendor IDs. */ +#define T3_SVID_BROADCOM 0x14e4 + +#define T3_SSID_BROADCOM_BCM95700A6 0x1644 +#define T3_SSID_BROADCOM_BCM95701A5 0x0001 +#define T3_SSID_BROADCOM_BCM95700T6 0x0002 /* BCM8002 */ +#define T3_SSID_BROADCOM_BCM95700A9 0x0003 /* Agilent */ +#define T3_SSID_BROADCOM_BCM95701T1 0x0005 +#define T3_SSID_BROADCOM_BCM95701T8 0x0006 +#define T3_SSID_BROADCOM_BCM95701A7 0x0007 /* Agilent */ +#define T3_SSID_BROADCOM_BCM95701A10 0x0008 +#define T3_SSID_BROADCOM_BCM95701A12 0x8008 +#define T3_SSID_BROADCOM_BCM95703Ax1 0x0009 +#define T3_SSID_BROADCOM_BCM95703Ax2 0x8009 + +/* 3COM subsystem/subvendor IDs. */ +#define T3_SVID_3COM 0x10b7 + +#define T3_SSID_3COM_3C996T 0x1000 +#define T3_SSID_3COM_3C996BT 0x1006 +#define T3_SSID_3COM_3C996CT 0x1002 +#define T3_SSID_3COM_3C997T 0x1003 +#define T3_SSID_3COM_3C1000T 0x1007 +#define T3_SSID_3COM_3C940BR01 0x1008 + +/* Fiber boards. */ +#define T3_SSID_3COM_3C996SX 0x1004 +#define T3_SSID_3COM_3C997SX 0x1005 + + +/* Dell subsystem/subvendor IDs. */ + +#define T3_SVID_DELL 0x1028 + +#define T3_SSID_DELL_VIPER 0x00d1 +#define T3_SSID_DELL_JAGUAR 0x0106 +#define T3_SSID_DELL_MERLOT 0x0109 +#define T3_SSID_DELL_SLIM_MERLOT 0x010a + +/* Compaq subsystem/subvendor IDs */ + +#define T3_SVID_COMPAQ 0x0e11 + +#define T3_SSID_COMPAQ_BANSHEE 0x007c +#define T3_SSID_COMPAQ_BANSHEE_2 0x009a +#define T3_SSID_COMPAQ_CHANGELING 0x007d +#define T3_SSID_COMPAQ_NC7780 0x0085 +#define T3_SSID_COMPAQ_NC7780_2 0x0099 + +#define T3_PCIE_CAPABILITY_ID_REG 0xD0 +#define T3_PCIE_CAPABILITY_ID 0x10 + +#define T3_PCIE_CAPABILITY_REG 0xD2 + +/******************************************************************************/ +/* MII registers. */ +/******************************************************************************/ + +/* Control register. */ +#define PHY_CTRL_REG 0x00 + +#define PHY_CTRL_SPEED_MASK (BIT_6 | BIT_13) +#define PHY_CTRL_SPEED_SELECT_10MBPS BIT_NONE +#define PHY_CTRL_SPEED_SELECT_100MBPS BIT_13 +#define PHY_CTRL_SPEED_SELECT_1000MBPS BIT_6 +#define PHY_CTRL_COLLISION_TEST_ENABLE BIT_7 +#define PHY_CTRL_FULL_DUPLEX_MODE BIT_8 +#define PHY_CTRL_RESTART_AUTO_NEG BIT_9 +#define PHY_CTRL_ISOLATE_PHY BIT_10 +#define PHY_CTRL_LOWER_POWER_MODE BIT_11 +#define PHY_CTRL_AUTO_NEG_ENABLE BIT_12 +#define PHY_CTRL_LOOPBACK_MODE BIT_14 +#define PHY_CTRL_PHY_RESET BIT_15 + + +/* Status register. */ +#define PHY_STATUS_REG 0x01 + +#define PHY_STATUS_LINK_PASS BIT_2 +#define PHY_STATUS_AUTO_NEG_COMPLETE BIT_5 + + +/* Phy Id registers. */ +#define PHY_ID1_REG 0x02 +#define PHY_ID1_OUI_MASK 0xffff + +#define PHY_ID2_REG 0x03 +#define PHY_ID2_REV_MASK 0x000f +#define PHY_ID2_MODEL_MASK 0x03f0 +#define PHY_ID2_OUI_MASK 0xfc00 + + +/* Auto-negotiation advertisement register. */ +#define PHY_AN_AD_REG 0x04 + +#define PHY_AN_AD_ASYM_PAUSE BIT_11 +#define PHY_AN_AD_PAUSE_CAPABLE BIT_10 +#define PHY_AN_AD_10BASET_HALF BIT_5 +#define PHY_AN_AD_10BASET_FULL BIT_6 +#define PHY_AN_AD_100BASETX_HALF BIT_7 +#define PHY_AN_AD_100BASETX_FULL BIT_8 +#define PHY_AN_AD_PROTOCOL_802_3_CSMA_CD 0x01 + +/* Defines for 5714 family fiber on the 546x phy*/ + +#define PHY_AN_AD_1000XFULL 0x20 +#define PHY_AN_AD_1000XHALF 0x40 +#define PHY_AN_AD_1000XPAUSE 0x80 +#define PHY_AN_AD_1000XPSE_ASYM 0x100 +#define PHY_AN_AD_1000XREM_FAULT_OFFLINE 0x2000 +#define PHY_AN_AD_1000XREM_FAULT_AN_ERROR 0x3000 + +#define PHY_AN_AD_ALL_SPEEDS (PHY_AN_AD_10BASET_HALF | PHY_AN_AD_10BASET_FULL |\ + PHY_AN_AD_100BASETX_HALF | PHY_AN_AD_100BASETX_FULL) + +/* Auto-negotiation Link Partner Ability register. */ +#define PHY_LINK_PARTNER_ABILITY_REG 0x05 + +#define PHY_LINK_PARTNER_ASYM_PAUSE BIT_11 +#define PHY_LINK_PARTNER_PAUSE_CAPABLE BIT_10 + + +/* Auto-negotiation expansion register. */ +#define PHY_AN_EXPANSION_REG 0x06 + + + +/******************************************************************************/ +/* BCM5400 and BCM5401 phy info. */ +/******************************************************************************/ + +#define PHY_DEVICE_ID 1 + +/* OUI: bit 31-10; Model#: bit 9-4; Rev# bit 3-0. */ +#define PHY_UNKNOWN_PHY 0x00000000 +#define PHY_BCM5400_PHY_ID 0x60008040 +#define PHY_BCM5401_PHY_ID 0x60008050 +#define PHY_BCM5411_PHY_ID 0x60008070 +#define PHY_BCM5701_PHY_ID 0x60008110 +#define PHY_BCM5703_PHY_ID 0x60008160 +#define PHY_BCM5704_PHY_ID 0x60008190 +#define PHY_BCM5705_PHY_ID 0x600081a0 +#define PHY_BCM5750_PHY_ID 0x60008180 +#define PHY_BCM8002_PHY_ID 0x60010140 +#define PHY_BCM5714_PHY_ID 0x60008340 +#define PHY_BCM5780_PHY_ID 0x60008350 +#define PHY_BCM5752_PHY_ID 0x60008100 + +#define PHY_BCM5401_B0_REV 0x1 +#define PHY_BCM5401_B2_REV 0x3 +#define PHY_BCM5401_C0_REV 0x6 + +#define PHY_ID_OUI_MASK 0xfffffc00 +#define PHY_ID_MODEL_MASK 0x000003f0 +#define PHY_ID_REV_MASK 0x0000000f +#define PHY_ID_MASK (PHY_ID_OUI_MASK | \ + PHY_ID_MODEL_MASK) + +#define UNKNOWN_PHY_ID(x) ((((x) & PHY_ID_MASK) != PHY_BCM5400_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5401_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5411_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5701_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5703_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5704_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5705_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5750_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM8002_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5714_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5780_PHY_ID) && \ + (((x) & PHY_ID_MASK) != PHY_BCM5752_PHY_ID)) + +/* 1000Base-T control register. */ +#define BCM540X_1000BASET_CTRL_REG 0x09 + +#define BCM540X_AN_AD_1000BASET_HALF BIT_8 +#define BCM540X_AN_AD_1000BASET_FULL BIT_9 +#define BCM540X_CONFIG_AS_MASTER BIT_11 +#define BCM540X_ENABLE_CONFIG_AS_MASTER BIT_12 + +#define BCM540X_AN_AD_ALL_1G_SPEEDS (BCM540X_AN_AD_1000BASET_HALF | \ + BCM540X_AN_AD_1000BASET_FULL) + +/* Extended control register. */ +#define BCM540X_EXT_CTRL_REG 0x10 + +#define BCM540X_EXT_CTRL_LINK3_LED_MODE BIT_1 +#define BCM540X_EXT_CTRL_FORCE_LED_OFF BIT_3 +#define BCM540X_EXT_CTRL_TBI BIT_15 + +/* PHY extended status register. */ +#define BCM540X_EXT_STATUS_REG 0x11 + +#define BCM540X_EXT_STATUS_LINK_PASS BIT_8 + + +/* DSP Coefficient Read/Write Port. */ +#define BCM540X_DSP_RW_PORT 0x15 + + +/* DSP Coeficient Address Register. */ +#define BCM540X_DSP_ADDRESS_REG 0x17 + +#define BCM540X_DSP_TAP_NUMBER_MASK 0x00 +#define BCM540X_DSP_AGC_A 0x00 +#define BCM540X_DSP_AGC_B 0x01 +#define BCM540X_DSP_MSE_PAIR_STATUS 0x02 +#define BCM540X_DSP_SOFT_DECISION 0x03 +#define BCM540X_DSP_PHASE_REG 0x04 +#define BCM540X_DSP_SKEW 0x05 +#define BCM540X_DSP_POWER_SAVER_UPPER_BOUND 0x06 +#define BCM540X_DSP_POWER_SAVER_LOWER_BOUND 0x07 +#define BCM540X_DSP_LAST_ECHO 0x08 +#define BCM540X_DSP_FREQUENCY 0x09 +#define BCM540X_DSP_PLL_BANDWIDTH 0x0a +#define BCM540X_DSP_PLL_PHASE_OFFSET 0x0b + +#define BCM540X_DSP_FILTER_DCOFFSET (BIT_10 | BIT_11) +#define BCM540X_DSP_FILTER_FEXT3 (BIT_8 | BIT_9 | BIT_11) +#define BCM540X_DSP_FILTER_FEXT2 (BIT_9 | BIT_11) +#define BCM540X_DSP_FILTER_FEXT1 (BIT_8 | BIT_11) +#define BCM540X_DSP_FILTER_FEXT0 BIT_11 +#define BCM540X_DSP_FILTER_NEXT3 (BIT_8 | BIT_9 | BIT_10) +#define BCM540X_DSP_FILTER_NEXT2 (BIT_9 | BIT_10) +#define BCM540X_DSP_FILTER_NEXT1 (BIT_8 | BIT_10) +#define BCM540X_DSP_FILTER_NEXT0 BIT_10 +#define BCM540X_DSP_FILTER_ECHO (BIT_8 | BIT_9) +#define BCM540X_DSP_FILTER_DFE BIT_9 +#define BCM540X_DSP_FILTER_FFE BIT_8 + +#define BCM540X_DSP_CONTROL_ALL_FILTERS BIT_12 + +#define BCM540X_DSP_SEL_CH_0 BIT_NONE +#define BCM540X_DSP_SEL_CH_1 BIT_13 +#define BCM540X_DSP_SEL_CH_2 BIT_14 +#define BCM540X_DSP_SEL_CH_3 (BIT_13 | BIT_14) + +#define BCM540X_CONTROL_ALL_CHANNELS BIT_15 + + +/* Auxilliary Control Register (Shadow Register) */ +#define BCM5401_AUX_CTRL 0x18 + +#define BCM5401_SHADOW_SEL_MASK 0x7 +#define BCM5401_SHADOW_SEL_NORMAL 0x00 +#define BCM5401_SHADOW_SEL_10BASET 0x01 +#define BCM5401_SHADOW_SEL_POWER_CONTROL 0x02 +#define BCM5401_SHADOW_SEL_IP_PHONE 0x03 +#define BCM5401_SHADOW_SEL_MISC_TEST1 0x04 +#define BCM5401_SHADOW_SEL_MISC_TEST2 0x05 +#define BCM5401_SHADOW_SEL_IP_PHONE_SEED 0x06 + + +/* Shadow register selector == '000' */ +#define BCM5401_SHDW_NORMAL_DIAG_MODE BIT_3 +#define BCM5401_SHDW_NORMAL_DISABLE_MBP BIT_4 +#define BCM5401_SHDW_NORMAL_DISABLE_LOW_PWR BIT_5 +#define BCM5401_SHDW_NORMAL_DISABLE_INV_PRF BIT_6 +#define BCM5401_SHDW_NORMAL_DISABLE_PRF BIT_7 +#define BCM5401_SHDW_NORMAL_RX_SLICING_NORMAL BIT_NONE +#define BCM5401_SHDW_NORMAL_RX_SLICING_4D BIT_8 +#define BCM5401_SHDW_NORMAL_RX_SLICING_3LVL_1D BIT_9 +#define BCM5401_SHDW_NORMAL_RX_SLICING_5LVL_1D (BIT_8 | BIT_9) +#define BCM5401_SHDW_NORMAL_TX_6DB_CODING BIT_10 +#define BCM5401_SHDW_NORMAL_ENABLE_SM_DSP_CLOCK BIT_11 +#define BCM5401_SHDW_NORMAL_EDGERATE_CTRL_4NS BIT_NONE +#define BCM5401_SHDW_NORMAL_EDGERATE_CTRL_5NS BIT_12 +#define BCM5401_SHDW_NORMAL_EDGERATE_CTRL_3NS BIT_13 +#define BCM5401_SHDW_NORMAL_EDGERATE_CTRL_0NS (BIT_12 | BIT_13) +#define BCM5401_SHDW_NORMAL_EXT_PACKET_LENGTH BIT_14 +#define BCM5401_SHDW_NORMAL_EXTERNAL_LOOPBACK BIT_15 + + +/* Auxilliary status summary. */ +#define BCM540X_AUX_STATUS_REG 0x19 + +#define BCM540X_AUX_LINK_PASS BIT_2 +#define BCM540X_AUX_SPEED_MASK (BIT_8 | BIT_9 | BIT_10) +#define BCM540X_AUX_10BASET_HD BIT_8 +#define BCM540X_AUX_10BASET_FD BIT_9 +#define BCM540X_AUX_100BASETX_HD (BIT_8 | BIT_9) +#define BCM540X_AUX_100BASET4 BIT_10 +#define BCM540X_AUX_100BASETX_FD (BIT_8 | BIT_10) +#define BCM540X_AUX_100BASET_HD (BIT_9 | BIT_10) +#define BCM540X_AUX_100BASET_FD (BIT_8 | BIT_9 | BIT_10) + + +/* Interrupt status. */ +#define BCM540X_INT_STATUS_REG 0x1a + +#define BCM540X_INT_LINK_CHANGE BIT_1 +#define BCM540X_INT_SPEED_CHANGE BIT_2 +#define BCM540X_INT_DUPLEX_CHANGE BIT_3 +#define BCM540X_INT_AUTO_NEG_PAGE_RX BIT_10 + + +/* Interrupt mask register. */ +#define BCM540X_INT_MASK_REG 0x1b + + + +/******************************************************************************/ +/* Register definitions. */ +/******************************************************************************/ + +typedef volatile LM_UINT8 T3_8BIT_REGISTER, *PT3_8BIT_REGISTER; +typedef volatile LM_UINT16 T3_16BIT_REGISTER, *PT3_16BIT_REGISTER; +typedef volatile LM_UINT32 T3_32BIT_REGISTER, *PT3_32BIT_REGISTER; + +typedef struct { + /* Big endian format. */ + T3_32BIT_REGISTER High; + T3_32BIT_REGISTER Low; +} T3_64BIT_REGISTER, *PT3_64BIT_REGISTER; + +typedef T3_64BIT_REGISTER T3_64BIT_HOST_ADDR, *PT3_64BIT_HOST_ADDR; + +#define T3_NUM_OF_DMA_DESC 256 +#define T3_NUM_OF_MBUF 768 + +typedef struct +{ + T3_64BIT_REGISTER host_addr; + T3_32BIT_REGISTER nic_mbuf; + T3_16BIT_REGISTER len; + T3_16BIT_REGISTER cqid_sqid; + T3_32BIT_REGISTER flags; + T3_32BIT_REGISTER opaque1; + T3_32BIT_REGISTER opaque2; + T3_32BIT_REGISTER opaque3; +}T3_DMA_DESC, *PT3_DMA_DESC; + + + +/******************************************************************************/ +/* Ring control block. */ +/******************************************************************************/ + +typedef struct { + T3_64BIT_REGISTER HostRingAddr; + + union { + struct { +#ifdef BIG_ENDIAN_HOST + T3_16BIT_REGISTER MaxLen; + T3_16BIT_REGISTER Flags; +#else /* BIG_ENDIAN_HOST */ + T3_16BIT_REGISTER Flags; + T3_16BIT_REGISTER MaxLen; +#endif + } s; + + T3_32BIT_REGISTER MaxLen_Flags; + } u; + + T3_32BIT_REGISTER NicRingAddr; +} T3_RCB, *PT3_RCB; + +#define T3_RCB_FLAG_USE_EXT_RECV_BD BIT_0 +#define T3_RCB_FLAG_RING_DISABLED BIT_1 + + + +/******************************************************************************/ +/* Status block. */ +/******************************************************************************/ + +/* + * Size of status block is actually 0x50 bytes. Use 0x80 bytes for + * cache line alignment. + */ +#define T3_STATUS_BLOCK_SIZE 0x80 + +typedef struct { + volatile LM_UINT32 Status; + #define STATUS_BLOCK_UPDATED BIT_0 + #define STATUS_BLOCK_LINK_CHANGED_STATUS BIT_1 + #define STATUS_BLOCK_ERROR BIT_2 + + volatile LM_UINT32 StatusTag; + +#ifdef BIG_ENDIAN_HOST + volatile LM_UINT16 RcvStdConIdx; + volatile LM_UINT16 RcvJumboConIdx; + + volatile LM_UINT16 Reserved2; + volatile LM_UINT16 RcvMiniConIdx; + + struct { + volatile LM_UINT16 SendConIdx; /* Send consumer index. */ + volatile LM_UINT16 RcvProdIdx; /* Receive producer index. */ + } Idx[16]; +#else /* BIG_ENDIAN_HOST */ + volatile LM_UINT16 RcvJumboConIdx; + volatile LM_UINT16 RcvStdConIdx; + + volatile LM_UINT16 RcvMiniConIdx; + volatile LM_UINT16 Reserved2; + + struct { + volatile LM_UINT16 RcvProdIdx; /* Receive producer index. */ + volatile LM_UINT16 SendConIdx; /* Send consumer index. */ + } Idx[16]; +#endif +} T3_STATUS_BLOCK, *PT3_STATUS_BLOCK; + + + +/******************************************************************************/ +/* Receive buffer descriptors. */ +/******************************************************************************/ + +typedef struct { + T3_64BIT_HOST_ADDR HostAddr; + +#ifdef BIG_ENDIAN_HOST + volatile LM_UINT16 Index; + volatile LM_UINT16 Len; + + volatile LM_UINT16 Type; + volatile LM_UINT16 Flags; + + volatile LM_UINT16 IpCksum; + volatile LM_UINT16 TcpUdpCksum; + + volatile LM_UINT16 ErrorFlag; + volatile LM_UINT16 VlanTag; +#else /* BIG_ENDIAN_HOST */ + volatile LM_UINT16 Len; + volatile LM_UINT16 Index; + + volatile LM_UINT16 Flags; + volatile LM_UINT16 Type; + + volatile LM_UINT16 TcpUdpCksum; + volatile LM_UINT16 IpCksum; + + volatile LM_UINT16 VlanTag; + volatile LM_UINT16 ErrorFlag; +#endif + + volatile LM_UINT32 Reserved; + volatile LM_UINT32 Opaque; +} T3_RCV_BD, *PT3_RCV_BD; + + +typedef struct { + T3_64BIT_HOST_ADDR HostAddr[3]; + +#ifdef BIG_ENDIAN_HOST + LM_UINT16 Len1; + LM_UINT16 Len2; + + LM_UINT16 Len3; + LM_UINT16 Reserved1; +#else /* BIG_ENDIAN_HOST */ + LM_UINT16 Len2; + LM_UINT16 Len1; + + LM_UINT16 Reserved1; + LM_UINT16 Len3; +#endif + + T3_RCV_BD StdRcvBd; +} T3_EXT_RCV_BD, *PT3_EXT_RCV_BD; + + +/* Error flags. */ +#define RCV_BD_ERR_BAD_CRC 0x0001 +#define RCV_BD_ERR_COLL_DETECT 0x0002 +#define RCV_BD_ERR_LINK_LOST_DURING_PKT 0x0004 +#define RCV_BD_ERR_PHY_DECODE_ERR 0x0008 +#define RCV_BD_ERR_ODD_NIBBLED_RCVD_MII 0x0010 +#define RCV_BD_ERR_MAC_ABORT 0x0020 +#define RCV_BD_ERR_LEN_LT_64 0x0040 +#define RCV_BD_ERR_TRUNC_NO_RESOURCES 0x0080 +#define RCV_BD_ERR_GIANT_FRAME_RCVD 0x0100 + + +/* Buffer descriptor flags. */ +#define RCV_BD_FLAG_END 0x0004 +#define RCV_BD_FLAG_JUMBO_RING 0x0020 +#define RCV_BD_FLAG_VLAN_TAG 0x0040 +#define RCV_BD_FLAG_FRAME_HAS_ERROR 0x0400 +#define RCV_BD_FLAG_MINI_RING 0x0800 +#define RCV_BD_FLAG_IP_CHKSUM_FIELD 0x1000 +#define RCV_BD_FLAG_TCP_UDP_CHKSUM_FIELD 0x2000 +#define RCV_BD_FLAG_TCP_PACKET 0x4000 + + + +/******************************************************************************/ +/* Send buffer descriptor. */ +/******************************************************************************/ + +typedef struct { + T3_64BIT_HOST_ADDR HostAddr; + + union { + struct { +#ifdef BIG_ENDIAN_HOST + LM_UINT16 Len; + LM_UINT16 Flags; +#else /* BIG_ENDIAN_HOST */ + LM_UINT16 Flags; + LM_UINT16 Len; +#endif + } s1; + + LM_UINT32 Len_Flags; + } u1; + + union { + struct { +#ifdef BIG_ENDIAN_HOST + LM_UINT16 Reserved; + LM_UINT16 VlanTag; +#else /* BIG_ENDIAN_HOST */ + LM_UINT16 VlanTag; + LM_UINT16 Reserved; +#endif + } s2; + + LM_UINT32 VlanTag; + } u2; +} T3_SND_BD, *PT3_SND_BD; + + +/* Send buffer descriptor flags. */ +#define SND_BD_FLAG_TCP_UDP_CKSUM 0x0001 +#define SND_BD_FLAG_IP_CKSUM 0x0002 +#define SND_BD_FLAG_END 0x0004 +#define SND_BD_FLAG_IP_FRAG 0x0008 +#define SND_BD_FLAG_IP_FRAG_END 0x0010 +#define SND_BD_FLAG_VLAN_TAG 0x0040 +#define SND_BD_FLAG_COAL_NOW 0x0080 +#define SND_BD_FLAG_CPU_PRE_DMA 0x0100 +#define SND_BD_FLAG_CPU_POST_DMA 0x0200 +#define SND_BD_FLAG_INSERT_SRC_ADDR 0x1000 +#define SND_BD_FLAG_CHOOSE_SRC_ADDR 0x6000 +#define SND_BD_FLAG_DONT_GEN_CRC 0x8000 + +/* MBUFs */ +typedef struct T3_MBUF_FRAME_DESC { +#ifdef BIG_ENDIAN_HOST + LM_UINT32 status_control; + union { + struct { + LM_UINT8 cqid; + LM_UINT8 reserved1; + LM_UINT16 length; + }s1; + LM_UINT32 word; + }u1; + union { + struct + { + LM_UINT16 ip_hdr_start; + LM_UINT16 tcp_udp_hdr_start; + }s2; + + LM_UINT32 word; + }u2; + + union { + struct { + LM_UINT16 data_start; + LM_UINT16 vlan_id; + }s3; + + LM_UINT32 word; + }u3; + + union { + struct { + LM_UINT16 ip_checksum; + LM_UINT16 tcp_udp_checksum; + }s4; + + LM_UINT32 word; + }u4; + + union { + struct { + LM_UINT16 pseudo_checksum; + LM_UINT16 checksum_status; + }s5; + + LM_UINT32 word; + }u5; + + union { + struct { + LM_UINT16 rule_match; + LM_UINT8 class; + LM_UINT8 rupt; + }s6; + + LM_UINT32 word; + }u6; + + union { + struct { + LM_UINT16 reserved2; + LM_UINT16 mbuf_num; + }s7; + + LM_UINT32 word; + }u7; + + LM_UINT32 reserved3; + LM_UINT32 reserved4; +#else + LM_UINT32 status_control; + union { + struct { + LM_UINT16 length; + LM_UINT8 reserved1; + LM_UINT8 cqid; + }s1; + LM_UINT32 word; + }u1; + union { + struct + { + LM_UINT16 tcp_udp_hdr_start; + LM_UINT16 ip_hdr_start; + }s2; + + LM_UINT32 word; + }u2; + + union { + struct { + LM_UINT16 vlan_id; + LM_UINT16 data_start; + }s3; + + LM_UINT32 word; + }u3; + + union { + struct { + LM_UINT16 tcp_udp_checksum; + LM_UINT16 ip_checksum; + }s4; + + LM_UINT32 word; + }u4; + + union { + struct { + LM_UINT16 checksum_status; + LM_UINT16 pseudo_checksum; + }s5; + + LM_UINT32 word; + }u5; + + union { + struct { + LM_UINT8 rupt; + LM_UINT8 class; + LM_UINT16 rule_match; + }s6; + + LM_UINT32 word; + }u6; + + union { + struct { + LM_UINT16 mbuf_num; + LM_UINT16 reserved2; + }s7; + + LM_UINT32 word; + }u7; + + LM_UINT32 reserved3; + LM_UINT32 reserved4; +#endif +}T3_MBUF_FRAME_DESC,*PT3_MBUF_FRAME_DESC; + +typedef struct T3_MBUF_HDR { + union { + struct { + unsigned int C:1; + unsigned int F:1; + unsigned int reserved1:7; + unsigned int next_mbuf:16; + unsigned int length:7; + }s1; + + LM_UINT32 word; + }u1; + + LM_UINT32 next_frame_ptr; +}T3_MBUF_HDR, *PT3_MBUF_HDR; + +typedef struct T3_MBUF +{ + T3_MBUF_HDR hdr; + union + { + struct { + T3_MBUF_FRAME_DESC frame_hdr; + LM_UINT32 data[20]; + }s1; + + struct { + LM_UINT32 data[30]; + }s2; + }body; +}T3_MBUF, *PT3_MBUF; + +#define T3_MBUF_BASE (T3_NIC_MBUF_POOL_ADDR >> 7) +#define T3_MBUF_END ((T3_NIC_MBUF_POOL_ADDR + T3_NIC_MBUF_POOL_SIZE) >> 7) + + + +/******************************************************************************/ +/* Statistics block. */ +/******************************************************************************/ + +typedef struct { + LM_UINT8 Reserved0[0x400-0x300]; + + /* Statistics maintained by Receive MAC. */ + T3_64BIT_REGISTER ifHCInOctets; + T3_64BIT_REGISTER Reserved1; + T3_64BIT_REGISTER etherStatsFragments; + T3_64BIT_REGISTER ifHCInUcastPkts; + T3_64BIT_REGISTER ifHCInMulticastPkts; + T3_64BIT_REGISTER ifHCInBroadcastPkts; + T3_64BIT_REGISTER dot3StatsFCSErrors; + T3_64BIT_REGISTER dot3StatsAlignmentErrors; + T3_64BIT_REGISTER xonPauseFramesReceived; + T3_64BIT_REGISTER xoffPauseFramesReceived; + T3_64BIT_REGISTER macControlFramesReceived; + T3_64BIT_REGISTER xoffStateEntered; + T3_64BIT_REGISTER dot3StatsFramesTooLong; + T3_64BIT_REGISTER etherStatsJabbers; + T3_64BIT_REGISTER etherStatsUndersizePkts; + T3_64BIT_REGISTER inRangeLengthError; + T3_64BIT_REGISTER outRangeLengthError; + T3_64BIT_REGISTER etherStatsPkts64Octets; + T3_64BIT_REGISTER etherStatsPkts65Octetsto127Octets; + T3_64BIT_REGISTER etherStatsPkts128Octetsto255Octets; + T3_64BIT_REGISTER etherStatsPkts256Octetsto511Octets; + T3_64BIT_REGISTER etherStatsPkts512Octetsto1023Octets; + T3_64BIT_REGISTER etherStatsPkts1024Octetsto1522Octets; + T3_64BIT_REGISTER etherStatsPkts1523Octetsto2047Octets; + T3_64BIT_REGISTER etherStatsPkts2048Octetsto4095Octets; + T3_64BIT_REGISTER etherStatsPkts4096Octetsto8191Octets; + T3_64BIT_REGISTER etherStatsPkts8192Octetsto9022Octets; + + T3_64BIT_REGISTER Unused1[37]; + + /* Statistics maintained by Transmit MAC. */ + T3_64BIT_REGISTER ifHCOutOctets; + T3_64BIT_REGISTER Reserved2; + T3_64BIT_REGISTER etherStatsCollisions; + T3_64BIT_REGISTER outXonSent; + T3_64BIT_REGISTER outXoffSent; + T3_64BIT_REGISTER flowControlDone; + T3_64BIT_REGISTER dot3StatsInternalMacTransmitErrors; + T3_64BIT_REGISTER dot3StatsSingleCollisionFrames; + T3_64BIT_REGISTER dot3StatsMultipleCollisionFrames; + T3_64BIT_REGISTER dot3StatsDeferredTransmissions; + T3_64BIT_REGISTER Reserved3; + T3_64BIT_REGISTER dot3StatsExcessiveCollisions; + T3_64BIT_REGISTER dot3StatsLateCollisions; + T3_64BIT_REGISTER dot3Collided2Times; + T3_64BIT_REGISTER dot3Collided3Times; + T3_64BIT_REGISTER dot3Collided4Times; + T3_64BIT_REGISTER dot3Collided5Times; + T3_64BIT_REGISTER dot3Collided6Times; + T3_64BIT_REGISTER dot3Collided7Times; + T3_64BIT_REGISTER dot3Collided8Times; + T3_64BIT_REGISTER dot3Collided9Times; + T3_64BIT_REGISTER dot3Collided10Times; + T3_64BIT_REGISTER dot3Collided11Times; + T3_64BIT_REGISTER dot3Collided12Times; + T3_64BIT_REGISTER dot3Collided13Times; + T3_64BIT_REGISTER dot3Collided14Times; + T3_64BIT_REGISTER dot3Collided15Times; + T3_64BIT_REGISTER ifHCOutUcastPkts; + T3_64BIT_REGISTER ifHCOutMulticastPkts; + T3_64BIT_REGISTER ifHCOutBroadcastPkts; + T3_64BIT_REGISTER dot3StatsCarrierSenseErrors; + T3_64BIT_REGISTER ifOutDiscards; + T3_64BIT_REGISTER ifOutErrors; + + T3_64BIT_REGISTER Unused2[31]; + + /* Statistics maintained by Receive List Placement. */ + T3_64BIT_REGISTER COSIfHCInPkts[16]; + T3_64BIT_REGISTER COSFramesDroppedDueToFilters; + T3_64BIT_REGISTER nicDmaWriteQueueFull; + T3_64BIT_REGISTER nicDmaWriteHighPriQueueFull; + T3_64BIT_REGISTER nicNoMoreRxBDs; + T3_64BIT_REGISTER ifInDiscards; + T3_64BIT_REGISTER ifInErrors; + T3_64BIT_REGISTER nicRecvThresholdHit; + + T3_64BIT_REGISTER Unused3[9]; + + /* Statistics maintained by Send Data Initiator. */ + T3_64BIT_REGISTER COSIfHCOutPkts[16]; + T3_64BIT_REGISTER nicDmaReadQueueFull; + T3_64BIT_REGISTER nicDmaReadHighPriQueueFull; + T3_64BIT_REGISTER nicSendDataCompQueueFull; + + /* Statistics maintained by Host Coalescing. */ + T3_64BIT_REGISTER nicRingSetSendProdIndex; + T3_64BIT_REGISTER nicRingStatusUpdate; + T3_64BIT_REGISTER nicInterrupts; + T3_64BIT_REGISTER nicAvoidedInterrupts; + T3_64BIT_REGISTER nicSendThresholdHit; + + LM_UINT8 Reserved4[0xb00-0x9c0]; +} T3_STATS_BLOCK, *PT3_STATS_BLOCK; + + + +/******************************************************************************/ +/* PCI configuration registers. */ +/******************************************************************************/ + +typedef struct { + T3_16BIT_REGISTER VendorId; + T3_16BIT_REGISTER DeviceId; + + T3_16BIT_REGISTER Command; + T3_16BIT_REGISTER Status; + + T3_32BIT_REGISTER ClassCodeRevId; + + T3_8BIT_REGISTER CacheLineSize; + T3_8BIT_REGISTER LatencyTimer; + T3_8BIT_REGISTER HeaderType; + T3_8BIT_REGISTER Bist; + + T3_32BIT_REGISTER MemBaseAddrLow; + T3_32BIT_REGISTER MemBaseAddrHigh; + + LM_UINT8 Unused1[20]; + + T3_16BIT_REGISTER SubsystemVendorId; + T3_16BIT_REGISTER SubsystemId; + + T3_32BIT_REGISTER RomBaseAddr; + + T3_8BIT_REGISTER PciXCapiblityPtr; + LM_UINT8 Unused2[7]; + + T3_8BIT_REGISTER IntLine; + T3_8BIT_REGISTER IntPin; + T3_8BIT_REGISTER MinGnt; + T3_8BIT_REGISTER MaxLat; + + T3_8BIT_REGISTER PciXCapabilities; + T3_8BIT_REGISTER PmCapabilityPtr; + T3_16BIT_REGISTER PciXCommand; + #define PXC_MAX_READ_BYTE_COUNT_MASK (BIT_3 | BIT_2) + #define PXC_MAX_READ_BYTE_COUNT_512 (0) + #define PXC_MAX_READ_BYTE_COUNT_1024 (BIT_2) + #define PXC_MAX_READ_BYTE_COUNT_2048 (BIT_3) + #define PXC_MAX_READ_BYTE_COUNT_4096 (BIT_3 | BIT_2) + + T3_32BIT_REGISTER PciXStatus; + + T3_8BIT_REGISTER PmCapabilityId; + T3_8BIT_REGISTER VpdCapabilityPtr; + T3_16BIT_REGISTER PmCapabilities; + + T3_16BIT_REGISTER PmCtrlStatus; + #define PM_CTRL_PME_STATUS BIT_15 + #define PM_CTRL_PME_ENABLE BIT_8 + #define PM_CTRL_PME_POWER_STATE_D0 0 + #define PM_CTRL_PME_POWER_STATE_D1 1 + #define PM_CTRL_PME_POWER_STATE_D2 2 + #define PM_CTRL_PME_POWER_STATE_D3H 3 + + T3_8BIT_REGISTER BridgeSupportExt; + T3_8BIT_REGISTER PmData; + + T3_8BIT_REGISTER VpdCapabilityId; + T3_8BIT_REGISTER MsiCapabilityPtr; + T3_16BIT_REGISTER VpdAddrFlag; + #define VPD_FLAG_WRITE (1 << 15) + #define VPD_FLAG_RW_MASK (1 << 15) + #define VPD_FLAG_READ 0 + + + T3_32BIT_REGISTER VpdData; + + T3_8BIT_REGISTER MsiCapabilityId; + T3_8BIT_REGISTER NextCapabilityPtr; + T3_16BIT_REGISTER MsiCtrl; + #define MSI_CTRL_64BIT_CAP (1 << 7) + #define MSI_CTRL_MSG_ENABLE(x) (x << 4) + #define MSI_CTRL_MSG_CAP(x) (x << 1) + #define MSI_CTRL_ENABLE (1 << 0) + + + T3_32BIT_REGISTER MsiAddrLow; + T3_32BIT_REGISTER MsiAddrHigh; + + T3_16BIT_REGISTER MsiData; + T3_16BIT_REGISTER Unused3; + + T3_32BIT_REGISTER MiscHostCtrl; + #define MISC_HOST_CTRL_CLEAR_INT BIT_0 + #define MISC_HOST_CTRL_MASK_PCI_INT BIT_1 + #define MISC_HOST_CTRL_ENABLE_ENDIAN_BYTE_SWAP BIT_2 + #define MISC_HOST_CTRL_ENABLE_ENDIAN_WORD_SWAP BIT_3 + #define MISC_HOST_CTRL_ENABLE_PCI_STATE_REG_RW BIT_4 + #define MISC_HOST_CTRL_ENABLE_CLK_REG_RW BIT_5 + #define MISC_HOST_CTRL_ENABLE_REG_WORD_SWAP BIT_6 + #define MISC_HOST_CTRL_ENABLE_INDIRECT_ACCESS BIT_7 + #define MISC_HOST_CTRL_ENABLE_INT_MASK_MODE BIT_8 + #define MISC_HOST_CTRL_ENABLE_TAGGED_STATUS_MODE BIT_9 + + T3_32BIT_REGISTER DmaReadWriteCtrl; + #define DMA_CTRL_WRITE_CMD 0x70000000 + #define DMA_CTRL_WRITE_BOUNDARY_64_PCIE 0x10000000 + #define DMA_CTRL_WRITE_BOUNDARY_128_PCIE 0x30000000 + #define DMA_CTRL_WRITE_BOUNDARY_DISABLE_PCIE 0x70000000 + #define DMA_CTRL_READ_CMD 0x06000000 + + /* bits 21:19 */ + #define DMA_CTRL_WRITE_PCIE_H20MARK_128 0x00180000 + #define DMA_CTRL_WRITE_PCIE_H20MARK_256 0x00380000 + + #define DMA_CTRL_PCIX_READ_WATERMARK_MASK (BIT_18 | BIT_17 | BIT_16) + #define DMA_CTRL_PCIX_READ_WATERMARK_64 (0) + #define DMA_CTRL_PCIX_READ_WATERMARK_128 (BIT_16) + #define DMA_CTRL_PCIX_READ_WATERMARK_256 (BIT_17) + #define DMA_CTRL_PCIX_READ_WATERMARK_384 (BIT_17 | BIT_16) + #define DMA_CTRL_PCIX_READ_WATERMARK_512 (BIT_18) + #define DMA_CTRL_PCIX_READ_WATERMARK_1024 (BIT_18 | BIT_16) + #define DMA_CTRL_PCIX_READ_WATERMARK_1536X (BIT_18 | BIT_17) + #define DMA_CTRL_PCIX_READ_WATERMARK_1536 (BIT_18 | BIT_17 | BIT_16) + + #define DMA_CTRL_WRITE_BOUNDARY_MASK (BIT_11 | BIT_12 | BIT_13) + #define DMA_CTRL_WRITE_BOUNDARY_DISABLE 0 + #define DMA_CTRL_WRITE_BOUNDARY_16 BIT_11 + #define DMA_CTRL_WRITE_BOUNDARY_128_PCIX BIT_11 + #define DMA_CTRL_WRITE_BOUNDARY_32 BIT_12 + #define DMA_CTRL_WRITE_BOUNDARY_256_PCIX BIT_12 + #define DMA_CTRL_WRITE_BOUNDARY_64 (BIT_12 | BIT_11) + #define DMA_CTRL_WRITE_BOUNDARY_384_PCIX (BIT_12 | BIT_11) + #define DMA_CTRL_WRITE_BOUNDARY_128 BIT_13 + #define DMA_CTRL_WRITE_BOUNDARY_256 (BIT_13 | BIT_11) + #define DMA_CTRL_WRITE_BOUNDARY_512 (BIT_13 | BIT_12) + #define DMA_CTRL_WRITE_BOUNDARY_1024 (BIT_13 | BIT_12 | BIT_11) + #define DMA_CTRL_WRITE_ONE_DMA_AT_ONCE BIT_14 + + #define DMA_CTRL_READ_BOUNDARY_MASK (BIT_10 | BIT_9 | BIT_8) + #define DMA_CTRL_READ_BOUNDARY_DISABLE 0 + #define DMA_CTRL_READ_BOUNDARY_16 BIT_8 + #define DMA_CTRL_READ_BOUNDARY_128_PCIX BIT_8 + #define DMA_CTRL_READ_BOUNDARY_32 BIT_9 + #define DMA_CTRL_READ_BOUNDARY_256_PCIX BIT_9 + #define DMA_CTRL_READ_BOUNDARY_64 (BIT_9 | BIT_8) + #define DMA_CTRL_READ_BOUNDARY_384_PCIX (BIT_9 | BIT_8) + #define DMA_CTRL_READ_BOUNDARY_128 BIT_10 + #define DMA_CTRL_READ_BOUNDARY_256 (BIT_10 | BIT_8) + #define DMA_CTRL_READ_BOUNDARY_512 (BIT_10 | BIT_9) + #define DMA_CTRL_READ_BOUNDARY_1024 (BIT_10 | BIT_9 | BIT_8) + + T3_32BIT_REGISTER PciState; + #define T3_PCI_STATE_FORCE_PCI_RESET BIT_0 + #define T3_PCI_STATE_INTERRUPT_NOT_ACTIVE BIT_1 + #define T3_PCI_STATE_NOT_PCI_X_BUS BIT_2 + #define T3_PCI_STATE_HIGH_BUS_SPEED BIT_3 + #define T3_PCI_STATE_32BIT_PCI_BUS BIT_4 + #define T3_PCI_STATE_PCI_ROM_ENABLE BIT_5 + #define T3_PCI_STATE_PCI_ROM_RETRY_ENABLE BIT_6 + #define T3_PCI_STATE_FLAT_VIEW BIT_8 + #define T3_PCI_STATE_RETRY_SAME_DMA BIT_13 + + T3_32BIT_REGISTER ClockCtrl; + #define T3_PCI_CLKCTRL_TXCPU_CLK_DISABLE BIT_11 + #define T3_PCI_CLKCTRL_RXCPU_CLK_DISABLE BIT_10 + #define T3_PCI_CLKCTRL_CORE_CLK_DISABLE BIT_9 + + T3_32BIT_REGISTER RegBaseAddr; + + T3_32BIT_REGISTER MemWindowBaseAddr; + +#ifdef NIC_CPU_VIEW + /* These registers are ONLY visible to NIC CPU */ + T3_32BIT_REGISTER PowerConsumed; + T3_32BIT_REGISTER PowerDissipated; +#else /* NIC_CPU_VIEW */ + T3_32BIT_REGISTER RegData; + T3_32BIT_REGISTER MemWindowData; +#endif /* !NIC_CPU_VIEW */ + + T3_32BIT_REGISTER ModeCtrl; + + T3_32BIT_REGISTER MiscCfg; + + T3_32BIT_REGISTER MiscLocalCtrl; + + T3_32BIT_REGISTER Unused4; + + /* NOTE: Big/Little-endian clarification needed. Are these register */ + /* in big or little endian formate. */ + T3_64BIT_REGISTER StdRingProdIdx; + T3_64BIT_REGISTER RcvRetRingConIdx; + T3_64BIT_REGISTER SndProdIdx; + + T3_32BIT_REGISTER Unused5[2]; /* 0xb0-0xb7 */ + + T3_32BIT_REGISTER DualMacCtrl; /* 0xb8 */ + #define T3_DUAL_MAC_CH_CTRL_MASK (BIT_1 | BIT_0) + #define T3_DUAL_MAC_ID BIT_2 + + T3_32BIT_REGISTER MacMessageExchangeOutput; /* 0xbc */ + T3_32BIT_REGISTER MacMessageExchangeInput; /* 0xc0 */ + + T3_32BIT_REGISTER FunctionEventMask; /* 0xc4 */ + + T3_32BIT_REGISTER Unused6[4]; /* 0xc8-0xd7 */ + + T3_32BIT_REGISTER DeviceCtrl; /* 0xd8 */ + #define MAX_PAYLOAD_SIZE_MASK 0x0e0 + + LM_UINT8 Unused7[36]; + +} T3_PCI_CONFIGURATION, *PT3_PCI_CONFIGURATION; + +#define PCIX_CMD_MAX_SPLIT_MASK 0x00700000 +#define PCIX_CMD_MAX_SPLIT_SHL 20 +#define PCIX_CMD_MAX_BURST_MASK 0x000c0000 +#define PCIX_CMD_MAX_BURST_SHL 18 +#define PCIX_CMD_MAX_BURST_CPIOB 2 + +/******************************************************************************/ +/* Mac control registers. */ +/******************************************************************************/ + +typedef struct { + /* MAC mode control. */ + T3_32BIT_REGISTER Mode; + #define MAC_MODE_GLOBAL_RESET BIT_0 + #define MAC_MODE_HALF_DUPLEX BIT_1 + #define MAC_MODE_PORT_MODE_MASK (BIT_2 | BIT_3) + #define MAC_MODE_PORT_MODE_TBI (BIT_2 | BIT_3) + #define MAC_MODE_PORT_MODE_GMII BIT_3 + #define MAC_MODE_PORT_MODE_MII BIT_2 + #define MAC_MODE_PORT_MODE_NONE BIT_NONE + #define MAC_MODE_PORT_INTERNAL_LOOPBACK BIT_4 + #define MAC_MODE_TAGGED_MAC_CONTROL BIT_7 + #define MAC_MODE_TX_BURSTING BIT_8 + #define MAC_MODE_MAX_DEFER BIT_9 + #define MAC_MODE_LINK_POLARITY BIT_10 + #define MAC_MODE_ENABLE_RX_STATISTICS BIT_11 + #define MAC_MODE_CLEAR_RX_STATISTICS BIT_12 + #define MAC_MODE_FLUSH_RX_STATISTICS BIT_13 + #define MAC_MODE_ENABLE_TX_STATISTICS BIT_14 + #define MAC_MODE_CLEAR_TX_STATISTICS BIT_15 + #define MAC_MODE_FLUSH_TX_STATISTICS BIT_16 + #define MAC_MODE_SEND_CONFIGS BIT_17 + #define MAC_MODE_DETECT_MAGIC_PACKET_ENABLE BIT_18 + #define MAC_MODE_ACPI_POWER_ON_ENABLE BIT_19 + #define MAC_MODE_ENABLE_MIP BIT_20 + #define MAC_MODE_ENABLE_TDE BIT_21 + #define MAC_MODE_ENABLE_RDE BIT_22 + #define MAC_MODE_ENABLE_FHDE BIT_23 + + /* MAC status */ + T3_32BIT_REGISTER Status; + #define MAC_STATUS_PCS_SYNCED BIT_0 + #define MAC_STATUS_SIGNAL_DETECTED BIT_1 + #define MAC_STATUS_RECEIVING_CFG BIT_2 + #define MAC_STATUS_CFG_CHANGED BIT_3 + #define MAC_STATUS_SYNC_CHANGED BIT_4 + #define MAC_STATUS_PORT_DECODE_ERROR BIT_10 + #define MAC_STATUS_LINK_STATE_CHANGED BIT_12 + #define MAC_STATUS_MI_COMPLETION BIT_22 + #define MAC_STATUS_MI_INTERRUPT BIT_23 + #define MAC_STATUS_AP_ERROR BIT_24 + #define MAC_STATUS_ODI_ERROR BIT_25 + #define MAC_STATUS_RX_STATS_OVERRUN BIT_26 + #define MAC_STATUS_TX_STATS_OVERRUN BIT_27 + + /* Event Enable */ + T3_32BIT_REGISTER MacEvent; + #define MAC_EVENT_ENABLE_PORT_DECODE_ERR BIT_10 + #define MAC_EVENT_ENABLE_LINK_STATE_CHANGED_ATTN BIT_12 + #define MAC_EVENT_ENABLE_MI_COMPLETION BIT_22 + #define MAC_EVENT_ENABLE_MI_INTERRUPT BIT_23 + #define MAC_EVENT_ENABLE_AP_ERROR BIT_24 + #define MAC_EVENT_ENABLE_ODI_ERROR BIT_25 + #define MAC_EVENT_ENABLE_RX_STATS_OVERRUN BIT_26 + #define MAC_EVENT_ENABLE_TX_STATS_OVERRUN BIT_27 + + /* Led control. */ + T3_32BIT_REGISTER LedCtrl; + #define LED_CTRL_OVERRIDE_LINK_LED BIT_0 + #define LED_CTRL_1000MBPS_LED_ON BIT_1 + #define LED_CTRL_100MBPS_LED_ON BIT_2 + #define LED_CTRL_10MBPS_LED_ON BIT_3 + #define LED_CTRL_OVERRIDE_TRAFFIC_LED BIT_4 + #define LED_CTRL_BLINK_TRAFFIC_LED BIT_5 + #define LED_CTRL_TRAFFIC_LED BIT_6 + #define LED_CTRL_1000MBPS_LED_STATUS BIT_7 + #define LED_CTRL_100MBPS_LED_STATUS BIT_8 + #define LED_CTRL_10MBPS_LED_STATUS BIT_9 + #define LED_CTRL_TRAFFIC_LED_STATUS BIT_10 + #define LED_CTRL_MAC_MODE BIT_NONE + #define LED_CTRL_PHY_MODE_1 BIT_11 + #define LED_CTRL_PHY_MODE_2 BIT_12 + #define LED_CTRL_SHASTA_MAC_MODE BIT_13 + #define LED_CTRL_SHARED_TRAFFIC_LINK BIT_14 + #define LED_CTRL_WIRELESS_COMBO BIT_15 + #define LED_CTRL_BLINK_RATE_MASK 0x7ff80000 + #define LED_CTRL_OVERRIDE_BLINK_PERIOD BIT_19 + #define LED_CTRL_OVERRIDE_BLINK_RATE BIT_31 + + /* MAC addresses. */ + struct { + T3_32BIT_REGISTER High; /* Upper 2 bytes. */ + T3_32BIT_REGISTER Low; /* Lower 4 bytes. */ + } MacAddr[4]; + + /* ACPI Mbuf pointer. */ + T3_32BIT_REGISTER AcpiMbufPtr; + + /* ACPI Length and Offset. */ + T3_32BIT_REGISTER AcpiLengthOffset; + #define ACPI_LENGTH_MASK 0xffff + #define ACPI_OFFSET_MASK 0x0fff0000 + #define ACPI_LENGTH(x) x + #define ACPI_OFFSET(x) ((x) << 16) + + /* Transmit random backoff. */ + T3_32BIT_REGISTER TxBackoffSeed; + #define MAC_TX_BACKOFF_SEED_MASK 0x3ff + + /* Receive MTU */ + T3_32BIT_REGISTER MtuSize; + #define MAC_RX_MTU_MASK 0xffff + + /* Gigabit PCS Test. */ + T3_32BIT_REGISTER PcsTest; + #define MAC_PCS_TEST_DATA_PATTERN_MASK 0x0fffff + #define MAC_PCS_TEST_ENABLE BIT_20 + + /* Transmit Gigabit Auto-Negotiation. */ + T3_32BIT_REGISTER TxAutoNeg; + #define MAC_AN_TX_AN_DATA_MASK 0xffff + + /* Receive Gigabit Auto-Negotiation. */ + T3_32BIT_REGISTER RxAutoNeg; + #define MAC_AN_RX_AN_DATA_MASK 0xffff + + /* MI Communication. */ + T3_32BIT_REGISTER MiCom; + #define MI_COM_CMD_MASK (BIT_26 | BIT_27) + #define MI_COM_CMD_WRITE BIT_26 + #define MI_COM_CMD_READ BIT_27 + #define MI_COM_READ_FAILED BIT_28 + #define MI_COM_START BIT_29 + #define MI_COM_BUSY BIT_29 + + #define MI_COM_PHY_ADDR_MASK 0x1f + #define MI_COM_FIRST_PHY_ADDR_BIT 21 + + #define MI_COM_PHY_REG_ADDR_MASK 0x1f + #define MI_COM_FIRST_PHY_REG_ADDR_BIT 16 + + #define MI_COM_PHY_DATA_MASK 0xffff + + /* MI Status. */ + T3_32BIT_REGISTER MiStatus; + #define MI_STATUS_ENABLE_LINK_STATUS_ATTN BIT_0 + #define MI_STATUS_10MBPS BIT_1 + + /* MI Mode. */ + T3_32BIT_REGISTER MiMode; + #define MI_MODE_CLOCK_SPEED_10MHZ BIT_0 + #define MI_MODE_USE_SHORT_PREAMBLE BIT_1 + #define MI_MODE_AUTO_POLLING_ENABLE BIT_4 + #define MI_MODE_CORE_CLOCK_SPEED_62MHZ BIT_15 + + /* Auto-polling status. */ + T3_32BIT_REGISTER AutoPollStatus; + #define AUTO_POLL_ERROR BIT_0 + + /* Transmit MAC mode. */ + T3_32BIT_REGISTER TxMode; + #define TX_MODE_RESET BIT_0 + #define TX_MODE_ENABLE BIT_1 + #define TX_MODE_ENABLE_FLOW_CONTROL BIT_4 + #define TX_MODE_ENABLE_BIG_BACKOFF BIT_5 + #define TX_MODE_ENABLE_LONG_PAUSE BIT_6 + + /* Transmit MAC status. */ + T3_32BIT_REGISTER TxStatus; + #define TX_STATUS_RX_CURRENTLY_XOFFED BIT_0 + #define TX_STATUS_SENT_XOFF BIT_1 + #define TX_STATUS_SENT_XON BIT_2 + #define TX_STATUS_LINK_UP BIT_3 + #define TX_STATUS_ODI_UNDERRUN BIT_4 + #define TX_STATUS_ODI_OVERRUN BIT_5 + + /* Transmit MAC length. */ + T3_32BIT_REGISTER TxLengths; + #define TX_LEN_SLOT_TIME_MASK 0xff + #define TX_LEN_IPG_MASK 0x0f00 + #define TX_LEN_IPG_CRS_MASK (BIT_12 | BIT_13) + + /* Receive MAC mode. */ + T3_32BIT_REGISTER RxMode; + #define RX_MODE_RESET BIT_0 + #define RX_MODE_ENABLE BIT_1 + #define RX_MODE_ENABLE_FLOW_CONTROL BIT_2 + #define RX_MODE_KEEP_MAC_CONTROL BIT_3 + #define RX_MODE_KEEP_PAUSE BIT_4 + #define RX_MODE_ACCEPT_OVERSIZED BIT_5 + #define RX_MODE_ACCEPT_RUNTS BIT_6 + #define RX_MODE_LENGTH_CHECK BIT_7 + #define RX_MODE_PROMISCUOUS_MODE BIT_8 + #define RX_MODE_NO_CRC_CHECK BIT_9 + #define RX_MODE_KEEP_VLAN_TAG BIT_10 + + /* Receive MAC status. */ + T3_32BIT_REGISTER RxStatus; + #define RX_STATUS_REMOTE_TRANSMITTER_XOFFED BIT_0 + #define RX_STATUS_XOFF_RECEIVED BIT_1 + #define RX_STATUS_XON_RECEIVED BIT_2 + + /* Hash registers. */ + T3_32BIT_REGISTER HashReg[4]; + + /* Receive placement rules registers. */ + struct { + T3_32BIT_REGISTER Rule; + T3_32BIT_REGISTER Value; + } RcvRules[16]; + + #define RCV_DISABLE_RULE_MASK 0x7fffffff + + #define RCV_RULE1_REJECT_BROADCAST_IDX 0x00 + #define REJECT_BROADCAST_RULE1_RULE 0xc2000000 + #define REJECT_BROADCAST_RULE1_VALUE 0xffffffff + + #define RCV_RULE2_REJECT_BROADCAST_IDX 0x01 + #define REJECT_BROADCAST_RULE2_RULE 0x86000004 + #define REJECT_BROADCAST_RULE2_VALUE 0xffffffff + +#if INCLUDE_5701_AX_FIX + #define RCV_LAST_RULE_IDX 0x04 +#else + #define RCV_LAST_RULE_IDX 0x02 +#endif + + T3_32BIT_REGISTER RcvRuleCfg; + #define RX_RULE_DEFAULT_CLASS (1 << 3) + + T3_32BIT_REGISTER LowWaterMarkMaxRxFrame; + + LM_UINT8 Reserved1[24]; + + T3_32BIT_REGISTER HashRegU[4]; + + struct { + T3_32BIT_REGISTER High; + T3_32BIT_REGISTER Low; + } MacAddrExt[12]; + + T3_32BIT_REGISTER SerdesCfg; + T3_32BIT_REGISTER SerdesStatus; + + LM_UINT8 Reserved2[24]; + + T3_32BIT_REGISTER SgDigControl; + T3_32BIT_REGISTER SgDigStatus; + + LM_UINT8 Reserved3[72]; + + volatile LM_UINT8 TxMacState[16]; + volatile LM_UINT8 RxMacState[20]; + + LM_UINT8 Reserved4[476]; + + T3_32BIT_REGISTER ifHCOutOctets; + T3_32BIT_REGISTER Reserved5; + T3_32BIT_REGISTER etherStatsCollisions; + T3_32BIT_REGISTER outXonSent; + T3_32BIT_REGISTER outXoffSent; + T3_32BIT_REGISTER Reserved6; + T3_32BIT_REGISTER dot3StatsInternalMacTransmitErrors; + T3_32BIT_REGISTER dot3StatsSingleCollisionFrames; + T3_32BIT_REGISTER dot3StatsMultipleCollisionFrames; + T3_32BIT_REGISTER dot3StatsDeferredTransmissions; + T3_32BIT_REGISTER Reserved7; + T3_32BIT_REGISTER dot3StatsExcessiveCollisions; + T3_32BIT_REGISTER dot3StatsLateCollisions; + T3_32BIT_REGISTER Reserved8[14]; + T3_32BIT_REGISTER ifHCOutUcastPkts; + T3_32BIT_REGISTER ifHCOutMulticastPkts; + T3_32BIT_REGISTER ifHCOutBroadcastPkts; + T3_32BIT_REGISTER Reserved9[2]; + T3_32BIT_REGISTER ifHCInOctets; + T3_32BIT_REGISTER Reserved10; + T3_32BIT_REGISTER etherStatsFragments; + T3_32BIT_REGISTER ifHCInUcastPkts; + T3_32BIT_REGISTER ifHCInMulticastPkts; + T3_32BIT_REGISTER ifHCInBroadcastPkts; + T3_32BIT_REGISTER dot3StatsFCSErrors; + T3_32BIT_REGISTER dot3StatsAlignmentErrors; + T3_32BIT_REGISTER xonPauseFramesReceived; + T3_32BIT_REGISTER xoffPauseFramesReceived; + T3_32BIT_REGISTER macControlFramesReceived; + T3_32BIT_REGISTER xoffStateEntered; + T3_32BIT_REGISTER dot3StatsFramesTooLong; + T3_32BIT_REGISTER etherStatsJabbers; + T3_32BIT_REGISTER etherStatsUndersizePkts; + + T3_32BIT_REGISTER Reserved11[209]; + +} T3_MAC_CONTROL, *PT3_MAC_CONTROL; + + + +/******************************************************************************/ +/* Send data initiator control registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define T3_SND_DATA_IN_MODE_RESET BIT_0 + #define T3_SND_DATA_IN_MODE_ENABLE BIT_1 + #define T3_SND_DATA_IN_MODE_STATS_OFLW_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define T3_SND_DATA_IN_STATUS_STATS_OFLW_ATTN BIT_2 + + T3_32BIT_REGISTER StatsCtrl; + #define T3_SND_DATA_IN_STATS_CTRL_ENABLE BIT_0 + #define T3_SND_DATA_IN_STATS_CTRL_FASTER_UPDATE BIT_1 + #define T3_SND_DATA_IN_STATS_CTRL_CLEAR BIT_2 + #define T3_SND_DATA_IN_STATS_CTRL_FLUSH BIT_3 + #define T3_SND_DATA_IN_STATS_CTRL_FORCE_ZERO BIT_4 + + T3_32BIT_REGISTER StatsEnableMask; + + T3_32BIT_REGISTER StatsIncMask; + + LM_UINT8 Reserved[108]; + + T3_32BIT_REGISTER ClassOfServCnt[16]; + T3_32BIT_REGISTER DmaReadQFullCnt; + T3_32BIT_REGISTER DmaPriorityReadQFullCnt; + T3_32BIT_REGISTER SdcQFullCnt; + + T3_32BIT_REGISTER NicRingSetSendProdIdxCnt; + T3_32BIT_REGISTER StatusUpdatedCnt; + T3_32BIT_REGISTER InterruptsCnt; + T3_32BIT_REGISTER AvoidInterruptsCnt; + T3_32BIT_REGISTER SendThresholdHitCnt; + + /* Unused space. */ + LM_UINT8 Unused[800]; +} T3_SEND_DATA_INITIATOR, *PT3_SEND_DATA_INITIATOR; + + + +/******************************************************************************/ +/* Send data completion control registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define SND_DATA_COMP_MODE_RESET BIT_0 + #define SND_DATA_COMP_MODE_ENABLE BIT_1 + + /* Unused space. */ + LM_UINT8 Unused[1020]; +} T3_SEND_DATA_COMPLETION, *PT3_SEND_DATA_COMPLETION; + + + +/******************************************************************************/ +/* Send BD Ring Selector Control Registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define SND_BD_SEL_MODE_RESET BIT_0 + #define SND_BD_SEL_MODE_ENABLE BIT_1 + #define SND_BD_SEL_MODE_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define SND_BD_SEL_STATUS_ERROR_ATTN BIT_2 + + T3_32BIT_REGISTER HwDiag; + + /* Unused space. */ + LM_UINT8 Unused1[52]; + + /* Send BD Ring Selector Local NIC Send BD Consumer Index. */ + T3_32BIT_REGISTER NicSendBdSelConIdx[16]; + + /* Unused space. */ + LM_UINT8 Unused2[896]; +} T3_SEND_BD_SELECTOR, *PT3_SEND_BD_SELECTOR; + + + +/******************************************************************************/ +/* Send BD initiator control registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define SND_BD_IN_MODE_RESET BIT_0 + #define SND_BD_IN_MODE_ENABLE BIT_1 + #define SND_BD_IN_MODE_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define SND_BD_IN_STATUS_ERROR_ATTN BIT_2 + + /* Send BD initiator local NIC send BD producer index. */ + T3_32BIT_REGISTER NicSendBdInProdIdx[16]; + + /* Unused space. */ + LM_UINT8 Unused2[952]; +} T3_SEND_BD_INITIATOR, *PT3_SEND_BD_INITIATOR; + + + +/******************************************************************************/ +/* Send BD Completion Control. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define SND_BD_COMP_MODE_RESET BIT_0 + #define SND_BD_COMP_MODE_ENABLE BIT_1 + #define SND_BD_COMP_MODE_ATTN_ENABLE BIT_2 + + /* Unused space. */ + LM_UINT8 Unused2[1020]; +} T3_SEND_BD_COMPLETION, *PT3_SEND_BD_COMPLETION; + + + +/******************************************************************************/ +/* Receive list placement control registers. */ +/******************************************************************************/ + +typedef struct { + /* Mode. */ + T3_32BIT_REGISTER Mode; + #define RCV_LIST_PLMT_MODE_RESET BIT_0 + #define RCV_LIST_PLMT_MODE_ENABLE BIT_1 + #define RCV_LIST_PLMT_MODE_CLASS0_ATTN_ENABLE BIT_2 + #define RCV_LIST_PLMT_MODE_MAPPING_OOR_ATTN_ENABLE BIT_3 + #define RCV_LIST_PLMT_MODE_STATS_OFLOW_ATTN_ENABLE BIT_4 + + /* Status. */ + T3_32BIT_REGISTER Status; + #define RCV_LIST_PLMT_STATUS_CLASS0_ATTN BIT_2 + #define RCV_LIST_PLMT_STATUS_MAPPING_ATTN BIT_3 + #define RCV_LIST_PLMT_STATUS_STATS_OFLOW_ATTN BIT_4 + + /* Receive selector list lock register. */ + T3_32BIT_REGISTER Lock; + #define RCV_LIST_SEL_LOCK_REQUEST_MASK 0xffff + #define RCV_LIST_SEL_LOCK_GRANT_MASK 0xffff0000 + + /* Selector non-empty bits. */ + T3_32BIT_REGISTER NonEmptyBits; + #define RCV_LIST_SEL_NON_EMPTY_MASK 0xffff + + /* Receive list placement configuration register. */ + T3_32BIT_REGISTER Config; + + /* Receive List Placement statistics Control. */ + T3_32BIT_REGISTER StatsCtrl; +#define RCV_LIST_STATS_ENABLE BIT_0 +#define RCV_LIST_STATS_FAST_UPDATE BIT_1 + + /* Receive List Placement statistics Enable Mask. */ + T3_32BIT_REGISTER StatsEnableMask; + #define T3_DISABLE_LONG_BURST_READ_DYN_FIX BIT_22 + + /* Receive List Placement statistics Increment Mask. */ + T3_32BIT_REGISTER StatsIncMask; + + /* Unused space. */ + LM_UINT8 Unused1[224]; + + struct { + T3_32BIT_REGISTER Head; + T3_32BIT_REGISTER Tail; + T3_32BIT_REGISTER Count; + + /* Unused space. */ + LM_UINT8 Unused[4]; + } RcvSelectorList[16]; + + /* Local statistics counter. */ + T3_32BIT_REGISTER ClassOfServCnt[16]; + + T3_32BIT_REGISTER DropDueToFilterCnt; + T3_32BIT_REGISTER DmaWriteQFullCnt; + T3_32BIT_REGISTER DmaHighPriorityWriteQFullCnt; + T3_32BIT_REGISTER NoMoreReceiveBdCnt; + T3_32BIT_REGISTER IfInDiscardsCnt; + T3_32BIT_REGISTER IfInErrorsCnt; + T3_32BIT_REGISTER RcvThresholdHitCnt; + + /* Another unused space. */ + LM_UINT8 Unused2[420]; +} T3_RCV_LIST_PLACEMENT, *PT3_RCV_LIST_PLACEMENT; + + + +/******************************************************************************/ +/* Receive Data and Receive BD Initiator Control. */ +/******************************************************************************/ + +typedef struct { + /* Mode. */ + T3_32BIT_REGISTER Mode; + #define RCV_DATA_BD_IN_MODE_RESET BIT_0 + #define RCV_DATA_BD_IN_MODE_ENABLE BIT_1 + #define RCV_DATA_BD_IN_MODE_JUMBO_BD_NEEDED BIT_2 + #define RCV_DATA_BD_IN_MODE_FRAME_TOO_BIG BIT_3 + #define RCV_DATA_BD_IN_MODE_INVALID_RING_SIZE BIT_4 + + /* Status. */ + T3_32BIT_REGISTER Status; + #define RCV_DATA_BD_IN_STATUS_JUMBO_BD_NEEDED BIT_2 + #define RCV_DATA_BD_IN_STATUS_FRAME_TOO_BIG BIT_3 + #define RCV_DATA_BD_IN_STATUS_INVALID_RING_SIZE BIT_4 + + /* Split frame minium size. */ + T3_32BIT_REGISTER SplitFrameMinSize; + + /* Unused space. */ + LM_UINT8 Unused1[0x2440-0x240c]; + + /* Receive RCBs. */ + T3_RCB JumboRcvRcb; + T3_RCB StdRcvRcb; + T3_RCB MiniRcvRcb; + + /* Receive Data and Receive BD Ring Initiator Local NIC Receive */ + /* BD Consumber Index. */ + T3_32BIT_REGISTER NicJumboConIdx; + T3_32BIT_REGISTER NicStdConIdx; + T3_32BIT_REGISTER NicMiniConIdx; + + /* Unused space. */ + LM_UINT8 Unused2[4]; + + /* Receive Data and Receive BD Initiator Local Receive Return ProdIdx. */ + T3_32BIT_REGISTER RcvDataBdProdIdx[16]; + + /* Receive Data and Receive BD Initiator Hardware Diagnostic. */ + T3_32BIT_REGISTER HwDiag; + + /* Unused space. */ + LM_UINT8 Unused3[828]; +} T3_RCV_DATA_BD_INITIATOR, *PT3_RCV_DATA_BD_INITIATOR; + + + +/******************************************************************************/ +/* Receive Data Completion Control Registes. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define RCV_DATA_COMP_MODE_RESET BIT_0 + #define RCV_DATA_COMP_MODE_ENABLE BIT_1 + #define RCV_DATA_COMP_MODE_ATTN_ENABLE BIT_2 + + /* Unused spaced. */ + LM_UINT8 Unused[1020]; +} T3_RCV_DATA_COMPLETION, *PT3_RCV_DATA_COMPLETION; + + + +/******************************************************************************/ +/* Receive BD Initiator Control. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define RCV_BD_IN_MODE_RESET BIT_0 + #define RCV_BD_IN_MODE_ENABLE BIT_1 + #define RCV_BD_IN_MODE_BD_IN_DIABLED_RCB_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define RCV_BD_IN_STATUS_BD_IN_DIABLED_RCB_ATTN BIT_2 + + T3_32BIT_REGISTER NicJumboRcvProdIdx; + T3_32BIT_REGISTER NicStdRcvProdIdx; + T3_32BIT_REGISTER NicMiniRcvProdIdx; + + T3_32BIT_REGISTER MiniRcvThreshold; + T3_32BIT_REGISTER StdRcvThreshold; + T3_32BIT_REGISTER JumboRcvThreshold; + + /* Unused space. */ + LM_UINT8 Unused[992]; +} T3_RCV_BD_INITIATOR, *PT3_RCV_BD_INITIATOR; + + + +/******************************************************************************/ +/* Receive BD Completion Control Registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define RCV_BD_COMP_MODE_RESET BIT_0 + #define RCV_BD_COMP_MODE_ENABLE BIT_1 + #define RCV_BD_COMP_MODE_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define RCV_BD_COMP_STATUS_ERROR_ATTN BIT_2 + + T3_32BIT_REGISTER NicJumboRcvBdProdIdx; + T3_32BIT_REGISTER NicStdRcvBdProdIdx; + T3_32BIT_REGISTER NicMiniRcvBdProdIdx; + + /* Unused space. */ + LM_UINT8 Unused[1004]; +} T3_RCV_BD_COMPLETION, *PT3_RCV_BD_COMPLETION; + + + +/******************************************************************************/ +/* Receive list selector control register. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define RCV_LIST_SEL_MODE_RESET BIT_0 + #define RCV_LIST_SEL_MODE_ENABLE BIT_1 + #define RCV_LIST_SEL_MODE_ATTN_ENABLE BIT_2 + + T3_32BIT_REGISTER Status; + #define RCV_LIST_SEL_STATUS_ERROR_ATTN BIT_2 + + /* Unused space. */ + LM_UINT8 Unused[1016]; +} T3_RCV_LIST_SELECTOR, *PT3_RCV_LIST_SELECTOR; + + + +/******************************************************************************/ +/* Mbuf cluster free registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; +#define MBUF_CLUSTER_FREE_MODE_RESET BIT_0 +#define MBUF_CLUSTER_FREE_MODE_ENABLE BIT_1 + + T3_32BIT_REGISTER Status; + + /* Unused space. */ + LM_UINT8 Unused[1016]; +} T3_MBUF_CLUSTER_FREE, *PT3_MBUF_CLUSTER_FREE; + + + +/******************************************************************************/ +/* Host coalescing control registers. */ +/******************************************************************************/ + +typedef struct { + /* Mode. */ + T3_32BIT_REGISTER Mode; + #define HOST_COALESCE_RESET BIT_0 + #define HOST_COALESCE_ENABLE BIT_1 + #define HOST_COALESCE_ATTN BIT_2 + #define HOST_COALESCE_NOW BIT_3 + #define HOST_COALESCE_FULL_STATUS_MODE BIT_NONE + #define HOST_COALESCE_64_BYTE_STATUS_MODE BIT_7 + #define HOST_COALESCE_32_BYTE_STATUS_MODE BIT_8 + #define HOST_COALESCE_CLEAR_TICKS_ON_RX_BD_EVENT BIT_9 + #define HOST_COALESCE_CLEAR_TICKS_ON_TX_BD_EVENT BIT_10 + #define HOST_COALESCE_NO_INT_ON_COALESCE_NOW_MODE BIT_11 + #define HOST_COALESCE_NO_INT_ON_FORCE_DMAD_MODE BIT_12 + + /* Status. */ + T3_32BIT_REGISTER Status; + #define HOST_COALESCE_ERROR_ATTN BIT_2 + + /* Receive coalescing ticks. */ + T3_32BIT_REGISTER RxCoalescingTicks; + + /* Send coalescing ticks. */ + T3_32BIT_REGISTER TxCoalescingTicks; + + /* Receive max coalesced frames. */ + T3_32BIT_REGISTER RxMaxCoalescedFrames; + + /* Send max coalesced frames. */ + T3_32BIT_REGISTER TxMaxCoalescedFrames; + + /* Receive coalescing ticks during interrupt. */ + T3_32BIT_REGISTER RxCoalescedTickDuringInt; + + /* Send coalescing ticks during interrupt. */ + T3_32BIT_REGISTER TxCoalescedTickDuringInt; + + /* Receive max coalesced frames during interrupt. */ + T3_32BIT_REGISTER RxMaxCoalescedFramesDuringInt; + + /* Send max coalesced frames during interrupt. */ + T3_32BIT_REGISTER TxMaxCoalescedFramesDuringInt; + + /* Statistics tick. */ + T3_32BIT_REGISTER StatsCoalescingTicks; + + /* Unused space. */ + LM_UINT8 Unused2[4]; + + /* Statistics host address. */ + T3_64BIT_REGISTER StatsBlkHostAddr; + + /* Status block host address.*/ + T3_64BIT_REGISTER StatusBlkHostAddr; + + /* Statistics NIC address. */ + T3_32BIT_REGISTER StatsBlkNicAddr; + + /* Statust block NIC address. */ + T3_32BIT_REGISTER StatusBlkNicAddr; + + /* Flow attention registers. */ + T3_32BIT_REGISTER FlowAttn; + + /* Unused space. */ + LM_UINT8 Unused3[4]; + + T3_32BIT_REGISTER NicJumboRcvBdConIdx; + T3_32BIT_REGISTER NicStdRcvBdConIdx; + T3_32BIT_REGISTER NicMiniRcvBdConIdx; + + /* Unused space. */ + LM_UINT8 Unused4[36]; + + T3_32BIT_REGISTER NicRetProdIdx[16]; + T3_32BIT_REGISTER NicSndBdConIdx[16]; + + /* Unused space. */ + LM_UINT8 Unused5[768]; +} T3_HOST_COALESCING, *PT3_HOST_COALESCING; + + + +/******************************************************************************/ +/* Memory arbiter registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; +#define T3_MEM_ARBITER_MODE_RESET BIT_0 +#define T3_MEM_ARBITER_MODE_ENABLE BIT_1 + + T3_32BIT_REGISTER Status; + + T3_32BIT_REGISTER ArbTrapAddrLow; + T3_32BIT_REGISTER ArbTrapAddrHigh; + + /* Unused space. */ + LM_UINT8 Unused[1008]; +} T3_MEM_ARBITER, *PT3_MEM_ARBITER; + + + +/******************************************************************************/ +/* Buffer manager control register. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define BUFMGR_MODE_RESET BIT_0 + #define BUFMGR_MODE_ENABLE BIT_1 + #define BUFMGR_MODE_ATTN_ENABLE BIT_2 + #define BUFMGR_MODE_BM_TEST BIT_3 + #define BUFMGR_MODE_MBUF_LOW_ATTN_ENABLE BIT_4 + + T3_32BIT_REGISTER Status; + #define BUFMGR_STATUS_ERROR BIT_2 + #define BUFMGR_STATUS_MBUF_LOW BIT_4 + + T3_32BIT_REGISTER MbufPoolAddr; + T3_32BIT_REGISTER MbufPoolSize; + T3_32BIT_REGISTER MbufReadDmaLowWaterMark; + T3_32BIT_REGISTER MbufMacRxLowWaterMark; + T3_32BIT_REGISTER MbufHighWaterMark; + + T3_32BIT_REGISTER RxCpuMbufAllocReq; + #define BUFMGR_MBUF_ALLOC_BIT BIT_31 + T3_32BIT_REGISTER RxCpuMbufAllocResp; + T3_32BIT_REGISTER TxCpuMbufAllocReq; + T3_32BIT_REGISTER TxCpuMbufAllocResp; + + T3_32BIT_REGISTER DmaDescPoolAddr; + T3_32BIT_REGISTER DmaDescPoolSize; + T3_32BIT_REGISTER DmaLowWaterMark; + T3_32BIT_REGISTER DmaHighWaterMark; + + T3_32BIT_REGISTER RxCpuDmaAllocReq; + T3_32BIT_REGISTER RxCpuDmaAllocResp; + T3_32BIT_REGISTER TxCpuDmaAllocReq; + T3_32BIT_REGISTER TxCpuDmaAllocResp; + + T3_32BIT_REGISTER Hwdiag[3]; + + /* Unused space. */ + LM_UINT8 Unused[936]; +} T3_BUFFER_MANAGER, *PT3_BUFFER_MANAGER; + + + +/******************************************************************************/ +/* Read DMA control registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define DMA_READ_MODE_RESET BIT_0 + #define DMA_READ_MODE_ENABLE BIT_1 + #define DMA_READ_MODE_TARGET_ABORT_ATTN_ENABLE BIT_2 + #define DMA_READ_MODE_MASTER_ABORT_ATTN_ENABLE BIT_3 + #define DMA_READ_MODE_PARITY_ERROR_ATTN_ENABLE BIT_4 + #define DMA_READ_MODE_ADDR_OVERFLOW_ATTN_ENABLE BIT_5 + #define DMA_READ_MODE_FIFO_OVERRUN_ATTN_ENABLE BIT_6 + #define DMA_READ_MODE_FIFO_UNDERRUN_ATTN_ENABLE BIT_7 + #define DMA_READ_MODE_FIFO_OVERREAD_ATTN_ENABLE BIT_8 + #define DMA_READ_MODE_LONG_READ_ATTN_ENABLE BIT_9 + #define DMA_READ_MODE_MULTI_SPLIT_ENABLE BIT_11 + #define DMA_READ_MODE_MULTI_SPLIT_RESET BIT_12 + #define DMA_READ_MODE_FIFO_SIZE_128 BIT_17 + #define DMA_READ_MODE_FIFO_LONG_BURST (BIT_16 | BIT_17) + + T3_32BIT_REGISTER Status; + #define DMA_READ_STATUS_TARGET_ABORT_ATTN BIT_2 + #define DMA_READ_STATUS_MASTER_ABORT_ATTN BIT_3 + #define DMA_READ_STATUS_PARITY_ERROR_ATTN BIT_4 + #define DMA_READ_STATUS_ADDR_OVERFLOW_ATTN BIT_5 + #define DMA_READ_STATUS_FIFO_OVERRUN_ATTN BIT_6 + #define DMA_READ_STATUS_FIFO_UNDERRUN_ATTN BIT_7 + #define DMA_READ_STATUS_FIFO_OVERREAD_ATTN BIT_8 + #define DMA_READ_STATUS_LONG_READ_ATTN BIT_9 + + /* Unused space. */ + LM_UINT8 Unused[1016]; +} T3_DMA_READ, *PT3_DMA_READ; + +typedef union T3_CPU +{ + struct + { + T3_32BIT_REGISTER mode; + #define CPU_MODE_HALT BIT_10 + #define CPU_MODE_RESET BIT_0 + T3_32BIT_REGISTER state; + T3_32BIT_REGISTER EventMask; + T3_32BIT_REGISTER reserved1[4]; + T3_32BIT_REGISTER PC; + T3_32BIT_REGISTER Instruction; + T3_32BIT_REGISTER SpadUnderflow; + T3_32BIT_REGISTER WatchdogClear; + T3_32BIT_REGISTER WatchdogVector; + T3_32BIT_REGISTER WatchdogSavedPC; + T3_32BIT_REGISTER HardwareBp; + T3_32BIT_REGISTER reserved2[3]; + T3_32BIT_REGISTER WatchdogSavedState; + T3_32BIT_REGISTER LastBrchAddr; + T3_32BIT_REGISTER SpadUnderflowSet; + T3_32BIT_REGISTER reserved3[(0x200-0x50)/4]; + T3_32BIT_REGISTER Regs[32]; + T3_32BIT_REGISTER reserved4[(0x400-0x280)/4]; + }reg; +}T3_CPU, *PT3_CPU; + +/******************************************************************************/ +/* Write DMA control registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define DMA_WRITE_MODE_RESET BIT_0 + #define DMA_WRITE_MODE_ENABLE BIT_1 + #define DMA_WRITE_MODE_TARGET_ABORT_ATTN_ENABLE BIT_2 + #define DMA_WRITE_MODE_MASTER_ABORT_ATTN_ENABLE BIT_3 + #define DMA_WRITE_MODE_PARITY_ERROR_ATTN_ENABLE BIT_4 + #define DMA_WRITE_MODE_ADDR_OVERFLOW_ATTN_ENABLE BIT_5 + #define DMA_WRITE_MODE_FIFO_OVERRUN_ATTN_ENABLE BIT_6 + #define DMA_WRITE_MODE_FIFO_UNDERRUN_ATTN_ENABLE BIT_7 + #define DMA_WRITE_MODE_FIFO_OVERREAD_ATTN_ENABLE BIT_8 + #define DMA_WRITE_MODE_LONG_READ_ATTN_ENABLE BIT_9 + #define DMA_WRITE_MODE_RECEIVE_ACCELERATE BIT_10 + + T3_32BIT_REGISTER Status; + #define DMA_WRITE_STATUS_TARGET_ABORT_ATTN BIT_2 + #define DMA_WRITE_STATUS_MASTER_ABORT_ATTN BIT_3 + #define DMA_WRITE_STATUS_PARITY_ERROR_ATTN BIT_4 + #define DMA_WRITE_STATUS_ADDR_OVERFLOW_ATTN BIT_5 + #define DMA_WRITE_STATUS_FIFO_OVERRUN_ATTN BIT_6 + #define DMA_WRITE_STATUS_FIFO_UNDERRUN_ATTN BIT_7 + #define DMA_WRITE_STATUS_FIFO_OVERREAD_ATTN BIT_8 + #define DMA_WRITE_STATUS_LONG_READ_ATTN BIT_9 + + /* Unused space. */ + LM_UINT8 Unused[1016]; +} T3_DMA_WRITE, *PT3_DMA_WRITE; + + + +/******************************************************************************/ +/* Mailbox registers. */ +/******************************************************************************/ + +typedef struct { + /* Interrupt mailbox registers. */ + T3_64BIT_REGISTER Interrupt[4]; + + /* General mailbox registers. */ + T3_64BIT_REGISTER General[8]; + + /* Reload statistics mailbox. */ + T3_64BIT_REGISTER ReloadStat; + + /* Receive BD ring producer index registers. */ + T3_64BIT_REGISTER RcvStdProdIdx; + T3_64BIT_REGISTER RcvJumboProdIdx; + T3_64BIT_REGISTER RcvMiniProdIdx; + + /* Receive return ring consumer index registers. */ + T3_64BIT_REGISTER RcvRetConIdx[16]; + + /* Send BD ring host producer index registers. */ + T3_64BIT_REGISTER SendHostProdIdx[16]; + + /* Send BD ring nic producer index registers. */ + T3_64BIT_REGISTER SendNicProdIdx[16]; +}T3_MAILBOX, *PT3_MAILBOX; + +typedef struct { + T3_MAILBOX Mailbox; + + /* Priority mailbox registers. */ + T3_32BIT_REGISTER HighPriorityEventVector; + T3_32BIT_REGISTER HighPriorityEventMask; + T3_32BIT_REGISTER LowPriorityEventVector; + T3_32BIT_REGISTER LowPriorityEventMask; + + /* Unused space. */ + LM_UINT8 Unused[496]; +} T3_GRC_MAILBOX, *PT3_GRC_MAILBOX; + + +/******************************************************************************/ +/* Flow through queues. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Reset; + + LM_UINT8 Unused[12]; + + T3_32BIT_REGISTER DmaNormalReadFtqCtrl; + T3_32BIT_REGISTER DmaNormalReadFtqFullCnt; + T3_32BIT_REGISTER DmaNormalReadFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER DmaNormalReadFtqFifoWritePeek; + + T3_32BIT_REGISTER DmaHighReadFtqCtrl; + T3_32BIT_REGISTER DmaHighReadFtqFullCnt; + T3_32BIT_REGISTER DmaHighReadFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER DmaHighReadFtqFifoWritePeek; + + T3_32BIT_REGISTER DmaCompDiscardFtqCtrl; + T3_32BIT_REGISTER DmaCompDiscardFtqFullCnt; + T3_32BIT_REGISTER DmaCompDiscardFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER DmaCompDiscardFtqFifoWritePeek; + + T3_32BIT_REGISTER SendBdCompFtqCtrl; + T3_32BIT_REGISTER SendBdCompFtqFullCnt; + T3_32BIT_REGISTER SendBdCompFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER SendBdCompFtqFifoWritePeek; + + T3_32BIT_REGISTER SendDataInitiatorFtqCtrl; + T3_32BIT_REGISTER SendDataInitiatorFtqFullCnt; + T3_32BIT_REGISTER SendDataInitiatorFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER SendDataInitiatorFtqFifoWritePeek; + + T3_32BIT_REGISTER DmaNormalWriteFtqCtrl; + T3_32BIT_REGISTER DmaNormalWriteFtqFullCnt; + T3_32BIT_REGISTER DmaNormalWriteFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER DmaNormalWriteFtqFifoWritePeek; + + T3_32BIT_REGISTER DmaHighWriteFtqCtrl; + T3_32BIT_REGISTER DmaHighWriteFtqFullCnt; + T3_32BIT_REGISTER DmaHighWriteFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER DmaHighWriteFtqFifoWritePeek; + + T3_32BIT_REGISTER SwType1FtqCtrl; + T3_32BIT_REGISTER SwType1FtqFullCnt; + T3_32BIT_REGISTER SwType1FtqFifoEnqueueDequeue; + T3_32BIT_REGISTER SwType1FtqFifoWritePeek; + + T3_32BIT_REGISTER SendDataCompFtqCtrl; + T3_32BIT_REGISTER SendDataCompFtqFullCnt; + T3_32BIT_REGISTER SendDataCompFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER SendDataCompFtqFifoWritePeek; + + T3_32BIT_REGISTER HostCoalesceFtqCtrl; + T3_32BIT_REGISTER HostCoalesceFtqFullCnt; + T3_32BIT_REGISTER HostCoalesceFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER HostCoalesceFtqFifoWritePeek; + + T3_32BIT_REGISTER MacTxFtqCtrl; + T3_32BIT_REGISTER MacTxFtqFullCnt; + T3_32BIT_REGISTER MacTxFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER MacTxFtqFifoWritePeek; + + T3_32BIT_REGISTER MbufClustFreeFtqCtrl; + T3_32BIT_REGISTER MbufClustFreeFtqFullCnt; + T3_32BIT_REGISTER MbufClustFreeFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER MbufClustFreeFtqFifoWritePeek; + + T3_32BIT_REGISTER RcvBdCompFtqCtrl; + T3_32BIT_REGISTER RcvBdCompFtqFullCnt; + T3_32BIT_REGISTER RcvBdCompFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER RcvBdCompFtqFifoWritePeek; + + T3_32BIT_REGISTER RcvListPlmtFtqCtrl; + T3_32BIT_REGISTER RcvListPlmtFtqFullCnt; + T3_32BIT_REGISTER RcvListPlmtFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER RcvListPlmtFtqFifoWritePeek; + + T3_32BIT_REGISTER RcvDataBdInitiatorFtqCtrl; + T3_32BIT_REGISTER RcvDataBdInitiatorFtqFullCnt; + T3_32BIT_REGISTER RcvDataBdInitiatorFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER RcvDataBdInitiatorFtqFifoWritePeek; + + T3_32BIT_REGISTER RcvDataCompFtqCtrl; + T3_32BIT_REGISTER RcvDataCompFtqFullCnt; + T3_32BIT_REGISTER RcvDataCompFtqFifoEnqueueDequeue; + T3_32BIT_REGISTER RcvDataCompFtqFifoWritePeek; + + T3_32BIT_REGISTER SwType2FtqCtrl; + T3_32BIT_REGISTER SwType2FtqFullCnt; + T3_32BIT_REGISTER SwType2FtqFifoEnqueueDequeue; + T3_32BIT_REGISTER SwType2FtqFifoWritePeek; + + /* Unused space. */ + LM_UINT8 Unused2[736]; +} T3_FTQ, *PT3_FTQ; + + + +/******************************************************************************/ +/* Message signaled interrupt registers. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; +#define MSI_MODE_RESET BIT_0 +#define MSI_MODE_ENABLE BIT_1 + T3_32BIT_REGISTER Status; + + T3_32BIT_REGISTER MsiFifoAccess; + + /* Unused space. */ + LM_UINT8 Unused[1012]; +} T3_MSG_SIGNALED_INT, *PT3_MSG_SIGNALED_INT; + + + +/******************************************************************************/ +/* DMA Completion registes. */ +/******************************************************************************/ + +typedef struct { + T3_32BIT_REGISTER Mode; + #define DMA_COMP_MODE_RESET BIT_0 + #define DMA_COMP_MODE_ENABLE BIT_1 + + /* Unused space. */ + LM_UINT8 Unused[1020]; +} T3_DMA_COMPLETION, *PT3_DMA_COMPLETION; + + + +/******************************************************************************/ +/* GRC registers. */ +/******************************************************************************/ + +typedef struct { + /* Mode control register. */ + T3_32BIT_REGISTER Mode; + #define GRC_MODE_UPDATE_ON_COALESCING BIT_0 + #define GRC_MODE_BYTE_SWAP_NON_FRAME_DATA BIT_1 + #define GRC_MODE_WORD_SWAP_NON_FRAME_DATA BIT_2 + #define GRC_MODE_BYTE_SWAP_DATA BIT_4 + #define GRC_MODE_WORD_SWAP_DATA BIT_5 + #define GRC_MODE_SPLIT_HEADER_MODE BIT_8 + #define GRC_MODE_NO_FRAME_CRACKING BIT_9 + #define GRC_MODE_INCLUDE_CRC BIT_10 + #define GRC_MODE_ALLOW_BAD_FRAMES BIT_11 + #define GRC_MODE_NO_INTERRUPT_ON_SENDS BIT_13 + #define GRC_MODE_NO_INTERRUPT_ON_RECEIVE BIT_14 + #define GRC_MODE_FORCE_32BIT_PCI_BUS_MODE BIT_15 + #define GRC_MODE_HOST_STACK_UP BIT_16 + #define GRC_MODE_HOST_SEND_BDS BIT_17 + #define GRC_MODE_TX_NO_PSEUDO_HEADER_CHKSUM BIT_20 + #define GRC_MODE_NVRAM_WRITE_ENABLE BIT_21 + #define GRC_MODE_RX_NO_PSEUDO_HEADER_CHKSUM BIT_23 + #define GRC_MODE_INT_ON_TX_CPU_ATTN BIT_24 + #define GRC_MODE_INT_ON_RX_CPU_ATTN BIT_25 + #define GRC_MODE_INT_ON_MAC_ATTN BIT_26 + #define GRC_MODE_INT_ON_DMA_ATTN BIT_27 + #define GRC_MODE_INT_ON_FLOW_ATTN BIT_28 + #define GRC_MODE_4X_NIC_BASED_SEND_RINGS BIT_29 + #define GRC_MODE_MULTICAST_FRAME_ENABLE BIT_30 + + /* Misc configuration register. */ + T3_32BIT_REGISTER MiscCfg; + #define GRC_MISC_CFG_CORE_CLOCK_RESET BIT_0 + #define GRC_MISC_PRESCALAR_TIMER_MASK 0xfe + #define GRC_MISC_BD_ID_MASK 0x0001e000 + #define GRC_MISC_BD_ID_5700 0x0001e000 + #define GRC_MISC_BD_ID_5701 0x00000000 + #define GRC_MISC_BD_ID_5703 0x00000000 + #define GRC_MISC_BD_ID_5703S 0x00002000 + #define GRC_MISC_BD_ID_5702FE 0x00004000 + #define GRC_MISC_BD_ID_5704 0x00000000 + #define GRC_MISC_BD_ID_5704CIOBE 0x00004000 + #define GRC_MISC_BD_ID_5788 0x00010000 + #define GRC_MISC_BD_ID_5788M 0x00018000 + #define GRC_MISC_GPHY_KEEP_POWER_DURING_RESET BIT_26 + + /* Miscellaneous local control register. */ + T3_32BIT_REGISTER LocalCtrl; + #define GRC_MISC_LOCAL_CTRL_INT_ACTIVE BIT_0 + #define GRC_MISC_LOCAL_CTRL_CLEAR_INT BIT_1 + #define GRC_MISC_LOCAL_CTRL_SET_INT BIT_2 + #define GRC_MISC_LOCAL_CTRL_INT_ON_ATTN BIT_3 + + #define GRC_MISC_LOCAL_CTRL_GPIO_INPUT3 BIT_5 + #define GRC_MISC_LOCAL_CTRL_GPIO_OE3 BIT_6 + #define GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT3 BIT_7 + + #define GRC_MISC_LOCAL_CTRL_GPIO_INPUT0 BIT_8 + #define GRC_MISC_LOCAL_CTRL_GPIO_INPUT1 BIT_9 + #define GRC_MISC_LOCAL_CTRL_GPIO_INPUT2 BIT_10 + #define GRC_MISC_LOCAL_CTRL_GPIO_OE0 BIT_11 + #define GRC_MISC_LOCAL_CTRL_GPIO_OE1 BIT_12 + #define GRC_MISC_LOCAL_CTRL_GPIO_OE2 BIT_13 + #define GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT0 BIT_14 + #define GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT1 BIT_15 + #define GRC_MISC_LOCAL_CTRL_GPIO_OUTPUT2 BIT_16 + #define GRC_MISC_LOCAL_CTRL_ENABLE_EXT_MEMORY BIT_17 + #define GRC_MISC_LOCAL_CTRL_BANK_SELECT BIT_21 + #define GRC_MISC_LOCAL_CTRL_SSRAM_TYPE BIT_22 + + #define GRC_MISC_MEMSIZE_256K 0 + #define GRC_MISC_MEMSIZE_512K (1 << 18) + #define GRC_MISC_MEMSIZE_1024K (2 << 18) + #define GRC_MISC_MEMSIZE_2048K (3 << 18) + #define GRC_MISC_MEMSIZE_4096K (4 << 18) + #define GRC_MISC_MEMSIZE_8192K (5 << 18) + #define GRC_MISC_MEMSIZE_16M (6 << 18) + #define GRC_MISC_LOCAL_CTRL_AUTO_SEEPROM BIT_24 + + + T3_32BIT_REGISTER Timer; + + T3_32BIT_REGISTER RxCpuEvent; + T3_32BIT_REGISTER RxTimerRef; + T3_32BIT_REGISTER RxCpuSemaphore; + T3_32BIT_REGISTER RemoteRxCpuAttn; + + T3_32BIT_REGISTER TxCpuEvent; + T3_32BIT_REGISTER TxTimerRef; + T3_32BIT_REGISTER TxCpuSemaphore; + T3_32BIT_REGISTER RemoteTxCpuAttn; + + T3_64BIT_REGISTER MemoryPowerUp; + + T3_32BIT_REGISTER EepromAddr; + #define SEEPROM_ADDR_WRITE 0 + #define SEEPROM_ADDR_READ (1 << 31) + #define SEEPROM_ADDR_RW_MASK 0x80000000 + #define SEEPROM_ADDR_COMPLETE (1 << 30) + #define SEEPROM_ADDR_FSM_RESET (1 << 29) + #define SEEPROM_ADDR_DEV_ID(x) (x << 26) + #define SEEPROM_ADDR_DEV_ID_MASK 0x1c000000 + #define SEEPROM_ADDR_START (1 << 25) + #define SEEPROM_ADDR_CLK_PERD(x) (x << 16) + #define SEEPROM_ADDR_ADDRESS(x) (x & 0xfffc) + #define SEEPROM_ADDR_ADDRESS_MASK 0x0000ffff + + #define SEEPROM_CLOCK_PERIOD 60 + #define SEEPROM_CHIP_SIZE (64 * 1024) + + T3_32BIT_REGISTER EepromData; + T3_32BIT_REGISTER EepromCtrl; + + T3_32BIT_REGISTER MdiCtrl; + T3_32BIT_REGISTER SepromDelay; + + /* Unused space. */ + LM_UINT8 Unused[948]; +} T3_GRC, *PT3_GRC; + + +/******************************************************************************/ +/* NVRAM control registers. */ +/******************************************************************************/ + +typedef struct +{ + T3_32BIT_REGISTER Cmd; + #define NVRAM_CMD_RESET BIT_0 + #define NVRAM_CMD_DONE BIT_3 + #define NVRAM_CMD_DO_IT BIT_4 + #define NVRAM_CMD_WR BIT_5 + #define NVRAM_CMD_RD BIT_NONE + #define NVRAM_CMD_ERASE BIT_6 + #define NVRAM_CMD_FIRST BIT_7 + #define NVRAM_CMD_LAST BIT_8 + #define NVRAM_CMD_WRITE_ENABLE BIT_16 + #define NVRAM_CMD_WRITE_DISABLE BIT_17 + #define NVRAM_CMD_EN_WR_SR BIT_18 + #define NVRAM_CMD_DO_WR_SR BIT_19 + + T3_32BIT_REGISTER Status; + T3_32BIT_REGISTER WriteData; + + T3_32BIT_REGISTER Addr; + #define NVRAM_ADDRESS_MASK 0xffffff + + T3_32BIT_REGISTER ReadData; + + /* Flash config 1 register. */ + T3_32BIT_REGISTER Config1; + #define FLASH_INTERFACE_ENABLE BIT_0 + #define FLASH_SSRAM_BUFFERED_MODE BIT_1 + #define FLASH_PASS_THRU_MODE BIT_2 + #define FLASH_BIT_BANG_MODE BIT_3 + #define FLASH_STATUS_BITS_MASK (BIT_4 | BIT_5 | BIT_6) + #define FLASH_SIZE BIT_25 + #define FLASH_COMPAT_BYPASS BIT_31 + #define FLASH_VENDOR_MASK (BIT_25 | BIT_24 | BIT_1 | BIT_0) + #define FLASH_VENDOR_ATMEL_EEPROM BIT_25 + #define FLASH_VENDOR_ATMEL_FLASH_BUFFERED (BIT_25 | BIT_1 | BIT_0) + #define FLASH_VENDOR_ATMEL_FLASH_UNBUFFERED (BIT_1 | BIT_0) + #define FLASH_VENDOR_ST (BIT_25 | BIT_24 | BIT_0) + #define FLASH_VENDOR_SAIFUN (BIT_24 | BIT_1 | BIT_0) + #define FLASH_VENDOR_SST_SMALL BIT_0 + #define FLASH_VENDOR_SST_LARGE (BIT_25 | BIT_0) + + #define BUFFERED_FLASH (FLASH_INTERFACE_ENABLE | FLASH_SSRAM_BUFFERED_MODE) + + /* Buffered flash (Atmel: AT45DB011B) specific information */ + #define BUFFERED_FLASH_PAGE_POS 9 + #define BUFFERED_FLASH_BYTE_ADDR_MASK ((1<Flags & UNDI_FIX_FLAG) ? \ + LM_RegWrInd(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName)+0x5600, \ + Value32) : \ + (void) MM_MEMWRITEL(&((pDevice)->pMemView->OffsetName), Value32) + +#define MB_REG_RD(pDevice, OffsetName) \ + (((pDevice)->Flags & UNDI_FIX_FLAG) ? \ + LM_RegRdInd(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName)+0x5600) : \ + MM_MEMREADL(&((pDevice)->pMemView->OffsetName))) + +#define REG_RD(pDevice, OffsetName) \ + LM_RegRd(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName)) + +#define REG_RD_BACK(pDevice, OffsetName) \ + LM_RegRdBack(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName)) + +#define REG_WR(pDevice, OffsetName, Value32) \ + LM_RegWr(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName), Value32, TRUE) + +#define RAW_REG_WR(pDevice, OffsetName, Value32) \ + LM_RegWr(pDevice, OFFSETOF(T3_STD_MEM_MAP, OffsetName), Value32, FALSE) + +#define REG_RD_OFFSET(pDevice, Offset) \ + MM_MEMREADL(((LM_UINT8 *) (pDevice)->pMemView + Offset)) + +#define REG_WR_OFFSET(pDevice, Offset, Value32) \ + MM_MEMWRITEL(((LM_UINT8 *) (pDevice)->pMemView + Offset), Value32) + +#define MEM_RD(pDevice, AddrName) \ + LM_MemRdInd(pDevice, OFFSETOF(T3_FIRST_32K_SRAM, AddrName)) +#define MEM_WR(pDevice, AddrName, Value32) \ + LM_MemWrInd(pDevice, OFFSETOF(T3_FIRST_32K_SRAM, AddrName), Value32) + +#define MEM_RD_OFFSET(pDevice, Offset) \ + LM_MemRdInd(pDevice, Offset) +#define MEM_WR_OFFSET(pDevice, Offset, Value32) \ + LM_MemWrInd(pDevice, Offset, Value32) + + +#endif /* TIGON3_H */ + diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 6fad83f24..bbca8ae80 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c @@ -7,6 +7,7 @@ * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to * dynamic procfs inode. */ +#include #include #include #include diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 652eb05a6..a8f95e511 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -9,6 +9,7 @@ * Written by: Michael Chan (mchan@broadcom.com) */ +#include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -49,15 +49,14 @@ #include #include #include -#include #include "bnx2.h" #include "bnx2_fw.h" #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.4.44" -#define DRV_MODULE_RELDATE "August 10, 2006" +#define DRV_MODULE_VERSION "1.4.40" +#define DRV_MODULE_RELDATE "May 22, 2006" #define RUN_AT(x) (jiffies + (x)) @@ -209,10 +208,8 @@ MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); static inline u32 bnx2_tx_avail(struct bnx2 *bp) { - u32 diff; + u32 diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); - smp_mb(); - diff = TX_RING_IDX(bp->tx_prod) - TX_RING_IDX(bp->tx_cons); if (diff > MAX_TX_DESC_CNT) diff = (diff & MAX_TX_DESC_CNT) - 1; return (bp->tx_ring_size - diff); @@ -1571,7 +1568,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) struct rx_bd *rxbd = &bp->rx_desc_ring[RX_RING(index)][RX_IDX(index)]; unsigned long align; - skb = netdev_alloc_skb(bp->dev, bp->rx_buf_size); + skb = dev_alloc_skb(bp->rx_buf_size); if (skb == NULL) { return -ENOMEM; } @@ -1580,6 +1577,7 @@ bnx2_alloc_rx_skb(struct bnx2 *bp, u16 index) skb_reserve(skb, 8 - align); } + skb->dev = bp->dev; mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); @@ -1676,7 +1674,7 @@ bnx2_tx_int(struct bnx2 *bp) tx_free_bd += last + 1; - dev_kfree_skb(skb); + dev_kfree_skb_irq(skb); hw_cons = bp->hw_tx_cons = sblk->status_tx_quick_consumer_index0; @@ -1687,20 +1685,15 @@ bnx2_tx_int(struct bnx2 *bp) } bp->tx_cons = sw_cons; - /* Need to make the tx_cons update visible to bnx2_start_xmit() - * before checking for netif_queue_stopped(). Without the - * memory barrier, there is a small possibility that bnx2_start_xmit() - * will miss it and cause the queue to be stopped forever. - */ - smp_mb(); - if (unlikely(netif_queue_stopped(bp->dev)) && - (bnx2_tx_avail(bp) > bp->tx_wake_thresh)) { - netif_tx_lock(bp->dev); + if (unlikely(netif_queue_stopped(bp->dev))) { + spin_lock(&bp->tx_lock); if ((netif_queue_stopped(bp->dev)) && - (bnx2_tx_avail(bp) > bp->tx_wake_thresh)) + (bnx2_tx_avail(bp) > MAX_SKB_FRAGS)) { + netif_wake_queue(bp->dev); - netif_tx_unlock(bp->dev); + } + spin_unlock(&bp->tx_lock); } } @@ -1792,7 +1785,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget) if ((bp->dev->mtu > 1500) && (len <= RX_COPY_THRESH)) { struct sk_buff *new_skb; - new_skb = netdev_alloc_skb(bp->dev, len + 2); + new_skb = dev_alloc_skb(len + 2); if (new_skb == NULL) goto reuse_rx; @@ -1803,6 +1796,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget) skb_reserve(new_skb, 2); skb_put(new_skb, len); + new_skb->dev = bp->dev; bnx2_reuse_rx_skb(bp, skb, sw_ring_cons, sw_ring_prod); @@ -1826,9 +1820,9 @@ reuse_rx: skb->protocol = eth_type_trans(skb, bp->dev); if ((len > (bp->dev->mtu + ETH_HLEN)) && - (ntohs(skb->protocol) != 0x8100)) { + (htons(skb->protocol) != 0x8100)) { - dev_kfree_skb(skb); + dev_kfree_skb_irq(skb); goto next_rx; } @@ -2089,92 +2083,6 @@ bnx2_set_rx_mode(struct net_device *dev) spin_unlock_bh(&bp->phy_lock); } -#define FW_BUF_SIZE 0x8000 - -static int -bnx2_gunzip_init(struct bnx2 *bp) -{ - if ((bp->gunzip_buf = vmalloc(FW_BUF_SIZE)) == NULL) - goto gunzip_nomem1; - - if ((bp->strm = kmalloc(sizeof(*bp->strm), GFP_KERNEL)) == NULL) - goto gunzip_nomem2; - - bp->strm->workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL); - if (bp->strm->workspace == NULL) - goto gunzip_nomem3; - - return 0; - -gunzip_nomem3: - kfree(bp->strm); - bp->strm = NULL; - -gunzip_nomem2: - vfree(bp->gunzip_buf); - bp->gunzip_buf = NULL; - -gunzip_nomem1: - printk(KERN_ERR PFX "%s: Cannot allocate firmware buffer for " - "uncompression.\n", bp->dev->name); - return -ENOMEM; -} - -static void -bnx2_gunzip_end(struct bnx2 *bp) -{ - kfree(bp->strm->workspace); - - kfree(bp->strm); - bp->strm = NULL; - - if (bp->gunzip_buf) { - vfree(bp->gunzip_buf); - bp->gunzip_buf = NULL; - } -} - -static int -bnx2_gunzip(struct bnx2 *bp, u8 *zbuf, int len, void **outbuf, int *outlen) -{ - int n, rc; - - /* check gzip header */ - if ((zbuf[0] != 0x1f) || (zbuf[1] != 0x8b) || (zbuf[2] != Z_DEFLATED)) - return -EINVAL; - - n = 10; - -#define FNAME 0x8 - if (zbuf[3] & FNAME) - while ((zbuf[n++] != 0) && (n < len)); - - bp->strm->next_in = zbuf + n; - bp->strm->avail_in = len - n; - bp->strm->next_out = bp->gunzip_buf; - bp->strm->avail_out = FW_BUF_SIZE; - - rc = zlib_inflateInit2(bp->strm, -MAX_WBITS); - if (rc != Z_OK) - return rc; - - rc = zlib_inflate(bp->strm, Z_FINISH); - - *outlen = FW_BUF_SIZE - bp->strm->avail_out; - *outbuf = bp->gunzip_buf; - - if ((rc != Z_OK) && (rc != Z_STREAM_END)) - printk(KERN_ERR PFX "%s: Firmware decompression error: %s\n", - bp->dev->name, bp->strm->msg); - - zlib_inflateEnd(bp->strm); - - if (rc == Z_STREAM_END) - return 0; - - return rc; -} - static void load_rv2p_fw(struct bnx2 *bp, u32 *rv2p_code, u32 rv2p_code_len, u32 rv2p_proc) @@ -2184,9 +2092,9 @@ load_rv2p_fw(struct bnx2 *bp, u32 *rv2p_code, u32 rv2p_code_len, for (i = 0; i < rv2p_code_len; i += 8) { - REG_WR(bp, BNX2_RV2P_INSTR_HIGH, cpu_to_le32(*rv2p_code)); + REG_WR(bp, BNX2_RV2P_INSTR_HIGH, *rv2p_code); rv2p_code++; - REG_WR(bp, BNX2_RV2P_INSTR_LOW, cpu_to_le32(*rv2p_code)); + REG_WR(bp, BNX2_RV2P_INSTR_LOW, *rv2p_code); rv2p_code++; if (rv2p_proc == RV2P_PROC1) { @@ -2226,7 +2134,7 @@ load_cpu_fw(struct bnx2 *bp, struct cpu_reg *cpu_reg, struct fw_info *fw) int j; for (j = 0; j < (fw->text_len / 4); j++, offset += 4) { - REG_WR_IND(bp, offset, cpu_to_le32(fw->text[j])); + REG_WR_IND(bp, offset, fw->text[j]); } } @@ -2282,32 +2190,15 @@ load_cpu_fw(struct bnx2 *bp, struct cpu_reg *cpu_reg, struct fw_info *fw) REG_WR_IND(bp, cpu_reg->mode, val); } -static int +static void bnx2_init_cpus(struct bnx2 *bp) { struct cpu_reg cpu_reg; struct fw_info fw; - int rc = 0; - void *text; - u32 text_len; - - if ((rc = bnx2_gunzip_init(bp)) != 0) - return rc; /* Initialize the RV2P processor. */ - rc = bnx2_gunzip(bp, bnx2_rv2p_proc1, sizeof(bnx2_rv2p_proc1), &text, - &text_len); - if (rc) - goto init_cpu_err; - - load_rv2p_fw(bp, text, text_len, RV2P_PROC1); - - rc = bnx2_gunzip(bp, bnx2_rv2p_proc2, sizeof(bnx2_rv2p_proc2), &text, - &text_len); - if (rc) - goto init_cpu_err; - - load_rv2p_fw(bp, text, text_len, RV2P_PROC2); + load_rv2p_fw(bp, bnx2_rv2p_proc1, sizeof(bnx2_rv2p_proc1), RV2P_PROC1); + load_rv2p_fw(bp, bnx2_rv2p_proc2, sizeof(bnx2_rv2p_proc2), RV2P_PROC2); /* Initialize the RX Processor. */ cpu_reg.mode = BNX2_RXP_CPU_MODE; @@ -2331,13 +2222,7 @@ bnx2_init_cpus(struct bnx2 *bp) fw.text_addr = bnx2_RXP_b06FwTextAddr; fw.text_len = bnx2_RXP_b06FwTextLen; fw.text_index = 0; - - rc = bnx2_gunzip(bp, bnx2_RXP_b06FwText, sizeof(bnx2_RXP_b06FwText), - &text, &text_len); - if (rc) - goto init_cpu_err; - - fw.text = text; + fw.text = bnx2_RXP_b06FwText; fw.data_addr = bnx2_RXP_b06FwDataAddr; fw.data_len = bnx2_RXP_b06FwDataLen; @@ -2383,13 +2268,7 @@ bnx2_init_cpus(struct bnx2 *bp) fw.text_addr = bnx2_TXP_b06FwTextAddr; fw.text_len = bnx2_TXP_b06FwTextLen; fw.text_index = 0; - - rc = bnx2_gunzip(bp, bnx2_TXP_b06FwText, sizeof(bnx2_TXP_b06FwText), - &text, &text_len); - if (rc) - goto init_cpu_err; - - fw.text = text; + fw.text = bnx2_TXP_b06FwText; fw.data_addr = bnx2_TXP_b06FwDataAddr; fw.data_len = bnx2_TXP_b06FwDataLen; @@ -2435,13 +2314,7 @@ bnx2_init_cpus(struct bnx2 *bp) fw.text_addr = bnx2_TPAT_b06FwTextAddr; fw.text_len = bnx2_TPAT_b06FwTextLen; fw.text_index = 0; - - rc = bnx2_gunzip(bp, bnx2_TPAT_b06FwText, sizeof(bnx2_TPAT_b06FwText), - &text, &text_len); - if (rc) - goto init_cpu_err; - - fw.text = text; + fw.text = bnx2_TPAT_b06FwText; fw.data_addr = bnx2_TPAT_b06FwDataAddr; fw.data_len = bnx2_TPAT_b06FwDataLen; @@ -2487,13 +2360,7 @@ bnx2_init_cpus(struct bnx2 *bp) fw.text_addr = bnx2_COM_b06FwTextAddr; fw.text_len = bnx2_COM_b06FwTextLen; fw.text_index = 0; - - rc = bnx2_gunzip(bp, bnx2_COM_b06FwText, sizeof(bnx2_COM_b06FwText), - &text, &text_len); - if (rc) - goto init_cpu_err; - - fw.text = text; + fw.text = bnx2_COM_b06FwText; fw.data_addr = bnx2_COM_b06FwDataAddr; fw.data_len = bnx2_COM_b06FwDataLen; @@ -2517,9 +2384,6 @@ bnx2_init_cpus(struct bnx2 *bp) load_cpu_fw(bp, &cpu_reg, &fw); -init_cpu_err: - bnx2_gunzip_end(bp); - return rc; } static int @@ -3392,9 +3256,7 @@ bnx2_init_chip(struct bnx2 *bp) * context block must have already been enabled. */ bnx2_init_context(bp); - if ((rc = bnx2_init_cpus(bp)) != 0) - return rc; - + bnx2_init_cpus(bp); bnx2_init_nvram(bp); bnx2_set_mac_addr(bp); @@ -3508,8 +3370,6 @@ bnx2_init_tx_ring(struct bnx2 *bp) struct tx_bd *txbd; u32 val; - bp->tx_wake_thresh = bp->tx_ring_size / 2; - txbd = &bp->tx_desc_ring[MAX_TX_DESC_CNT]; txbd->tx_bd_haddr_hi = (u64) bp->tx_desc_mapping >> 32; @@ -3649,7 +3509,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp) skb_shinfo(skb)->frags[j].size, PCI_DMA_TODEVICE); } - dev_kfree_skb(skb); + dev_kfree_skb_any(skb); i += j + 1; } @@ -3675,7 +3535,7 @@ bnx2_free_rx_skbs(struct bnx2 *bp) rx_buf->skb = NULL; - dev_kfree_skb(skb); + dev_kfree_skb_any(skb); } } @@ -3696,9 +3556,7 @@ bnx2_reset_nic(struct bnx2 *bp, u32 reset_code) if (rc) return rc; - if ((rc = bnx2_init_chip(bp)) != 0) - return rc; - + bnx2_init_chip(bp); bnx2_init_tx_ring(bp); bnx2_init_rx_ring(bp); return 0; @@ -3959,7 +3817,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) return -EINVAL; pkt_size = 1514; - skb = netdev_alloc_skb(bp->dev, pkt_size); + skb = dev_alloc_skb(pkt_size); if (!skb) return -ENOMEM; packet = skb_put(skb, pkt_size); @@ -4005,7 +3863,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) udelay(5); pci_unmap_single(bp->pdev, map, pkt_size, PCI_DMA_TODEVICE); - dev_kfree_skb(skb); + dev_kfree_skb_irq(skb); if (bp->status_blk->status_tx_quick_consumer_index0 != bp->tx_prod) { goto loopback_test_done; @@ -4176,8 +4034,6 @@ bnx2_timer(unsigned long data) msg = (u32) ++bp->fw_drv_pulse_wr_seq; REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg); - bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT); - if ((bp->phy_flags & PHY_SERDES_FLAG) && (CHIP_NUM(bp) == CHIP_NUM_5706)) { @@ -4267,11 +4123,11 @@ bnx2_open(struct net_device *dev) } else { rc = request_irq(bp->pdev->irq, bnx2_interrupt, - IRQF_SHARED, dev->name, dev); + SA_SHIRQ, dev->name, dev); } } else { - rc = request_irq(bp->pdev->irq, bnx2_interrupt, IRQF_SHARED, + rc = request_irq(bp->pdev->irq, bnx2_interrupt, SA_SHIRQ, dev->name, dev); } if (rc) { @@ -4318,7 +4174,7 @@ bnx2_open(struct net_device *dev) if (!rc) { rc = request_irq(bp->pdev->irq, bnx2_interrupt, - IRQF_SHARED, dev->name, dev); + SA_SHIRQ, dev->name, dev); } if (rc) { bnx2_free_skbs(bp); @@ -4397,8 +4253,10 @@ bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) #endif /* Called with netif_tx_lock. - * bnx2_tx_int() runs without netif_tx_lock unless it needs to call - * netif_wake_queue(). + * hard_start_xmit is pseudo-lockless - a lock is only required when + * the tx queue is full. This way, we get the benefit of lockless + * operations most of the time without the complexities to handle + * netif_stop_queue/wake_queue race conditions. */ static int bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -4452,7 +4310,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) ip_tcp_len = (skb->nh.iph->ihl << 2) + sizeof(struct tcphdr); skb->nh.iph->check = 0; - skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); + skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len); skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr, @@ -4517,9 +4375,12 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) dev->trans_start = jiffies; if (unlikely(bnx2_tx_avail(bp) <= MAX_SKB_FRAGS)) { + spin_lock(&bp->tx_lock); netif_stop_queue(dev); - if (bnx2_tx_avail(bp) > bp->tx_wake_thresh) + + if (bnx2_tx_avail(bp) > MAX_SKB_FRAGS) netif_wake_queue(dev); + spin_unlock(&bp->tx_lock); } return NETDEV_TX_OK; @@ -4542,7 +4403,7 @@ bnx2_close(struct net_device *dev) bnx2_netif_stop(bp); del_timer_sync(&bp->timer); if (bp->flags & NO_WOL_FLAG) - reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; + reset_code = BNX2_DRV_MSG_CODE_UNLOAD; else if (bp->wol) reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; else @@ -4643,10 +4504,6 @@ bnx2_get_stats(struct net_device *dev) net_stats->tx_aborted_errors + net_stats->tx_carrier_errors; - net_stats->rx_missed_errors = - (unsigned long) (stats_blk->stat_IfInMBUFDiscards + - stats_blk->stat_FwRxDrop); - return net_stats; } @@ -5129,17 +4986,7 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data) return 0; } -static int -bnx2_set_tso(struct net_device *dev, u32 data) -{ - if (data) - dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; - else - dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN); - return 0; -} - -#define BNX2_NUM_STATS 46 +#define BNX2_NUM_STATS 45 static struct { char string[ETH_GSTRING_LEN]; @@ -5189,7 +5036,6 @@ static struct { { "rx_mac_ctrl_frames" }, { "rx_filtered_packets" }, { "rx_discards" }, - { "rx_fw_discards" }, }; #define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4) @@ -5240,7 +5086,6 @@ static const unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = { STATS_OFFSET32(stat_MacControlFramesReceived), STATS_OFFSET32(stat_IfInFramesL2FilterDiscards), STATS_OFFSET32(stat_IfInMBUFDiscards), - STATS_OFFSET32(stat_FwRxDrop), }; /* stat_IfHCInBadOctets and stat_Dot3StatsCarrierSenseErrors are @@ -5251,7 +5096,7 @@ static u8 bnx2_5706_stats_len_arr[BNX2_NUM_STATS] = { 4,0,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4, + 4,4,4,4,4, }; static u8 bnx2_5708_stats_len_arr[BNX2_NUM_STATS] = { @@ -5259,7 +5104,7 @@ static u8 bnx2_5708_stats_len_arr[BNX2_NUM_STATS] = { 4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4, - 4,4,4,4,4,4, + 4,4,4,4,4, }; #define BNX2_NUM_TESTS 6 @@ -5456,7 +5301,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { .set_sg = ethtool_op_set_sg, #ifdef BCM_TSO .get_tso = ethtool_op_get_tso, - .set_tso = bnx2_set_tso, + .set_tso = ethtool_op_set_tso, #endif .self_test_count = bnx2_self_test_count, .self_test = bnx2_self_test, @@ -5577,20 +5422,20 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) /* enable device (incl. PCI PM wakeup), and bus-mastering */ rc = pci_enable_device(pdev); if (rc) { - dev_err(&pdev->dev, "Cannot enable PCI device, aborting."); + printk(KERN_ERR PFX "Cannot enable PCI device, aborting."); goto err_out; } if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { - dev_err(&pdev->dev, - "Cannot find PCI device base address, aborting.\n"); + printk(KERN_ERR PFX "Cannot find PCI device base address, " + "aborting.\n"); rc = -ENODEV; goto err_out_disable; } rc = pci_request_regions(pdev, DRV_MODULE_NAME); if (rc) { - dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n"); + printk(KERN_ERR PFX "Cannot obtain PCI resources, aborting.\n"); goto err_out_disable; } @@ -5598,15 +5443,15 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); if (bp->pm_cap == 0) { - dev_err(&pdev->dev, - "Cannot find power management capability, aborting.\n"); + printk(KERN_ERR PFX "Cannot find power management capability, " + "aborting.\n"); rc = -EIO; goto err_out_release; } bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX); if (bp->pcix_cap == 0) { - dev_err(&pdev->dev, "Cannot find PCIX capability, aborting.\n"); + printk(KERN_ERR PFX "Cannot find PCIX capability, aborting.\n"); rc = -EIO; goto err_out_release; } @@ -5614,14 +5459,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { bp->flags |= USING_DAC_FLAG; if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { - dev_err(&pdev->dev, - "pci_set_consistent_dma_mask failed, aborting.\n"); + printk(KERN_ERR PFX "pci_set_consistent_dma_mask " + "failed, aborting.\n"); rc = -EIO; goto err_out_release; } } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { - dev_err(&pdev->dev, "System does not support DMA, aborting.\n"); + printk(KERN_ERR PFX "System does not support DMA, aborting.\n"); rc = -EIO; goto err_out_release; } @@ -5630,6 +5475,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->pdev = pdev; spin_lock_init(&bp->phy_lock); + spin_lock_init(&bp->tx_lock); INIT_WORK(&bp->reset_task, bnx2_reset_task, bp); dev->base_addr = dev->mem_start = pci_resource_start(pdev, 0); @@ -5640,7 +5486,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->regview = ioremap_nocache(dev->base_addr, mem_len); if (!bp->regview) { - dev_err(&pdev->dev, "Cannot map register space, aborting.\n"); + printk(KERN_ERR PFX "Cannot map register space, aborting.\n"); rc = -ENOMEM; goto err_out_release; } @@ -5712,8 +5558,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) && !(bp->flags & PCIX_FLAG)) { - dev_err(&pdev->dev, - "5706 A1 can only be used in a PCIX bus, aborting.\n"); + printk(KERN_ERR PFX "5706 A1 can only be used in a PCIX bus, " + "aborting.\n"); goto err_out_unmap; } @@ -5734,7 +5580,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) != BNX2_DEV_INFO_SIGNATURE_MAGIC) { - dev_err(&pdev->dev, "Firmware not running, aborting.\n"); + printk(KERN_ERR PFX "Firmware not running, aborting.\n"); rc = -ENODEV; goto err_out_unmap; } @@ -5752,7 +5598,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->mac_addr[5] = (u8) reg; bp->tx_ring_size = MAX_TX_DESC_CNT; - bnx2_set_rx_ring_size(bp, 255); + bnx2_set_rx_ring_size(bp, 100); bp->rx_csum = 1; @@ -5788,9 +5634,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) } } - if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || - (CHIP_ID(bp) == CHIP_ID_5708_B0) || - (CHIP_ID(bp) == CHIP_ID_5708_B1)) + if (CHIP_NUM(bp) == CHIP_NUM_5708) bp->flags |= NO_WOL_FLAG; if (CHIP_ID(bp) == CHIP_ID_5706_A0) { @@ -5896,7 +5740,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) #endif if ((rc = register_netdev(dev))) { - dev_err(&pdev->dev, "Cannot register net device\n"); + printk(KERN_ERR PFX "Cannot register net device\n"); if (bp->regview) iounmap(bp->regview); pci_release_regions(pdev); @@ -5936,7 +5780,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; #endif #ifdef BCM_TSO - dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; + dev->features |= NETIF_F_TSO; #endif netif_carrier_off(bp->dev); @@ -5978,7 +5822,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) netif_device_detach(dev); del_timer_sync(&bp->timer); if (bp->flags & NO_WOL_FLAG) - reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; + reset_code = BNX2_DRV_MSG_CODE_UNLOAD; else if (bp->wol) reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; else diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index fe804763c..b87925f6a 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h @@ -231,7 +231,6 @@ struct statistics_block { u32 stat_GenStat13; u32 stat_GenStat14; u32 stat_GenStat15; - u32 stat_FwRxDrop; }; @@ -3482,8 +3481,6 @@ struct l2_fhdr { #define BNX2_COM_SCRATCH 0x00120000 -#define BNX2_FW_RX_DROP_COUNT 0x00120084 - /* * cp_reg definition @@ -3750,12 +3747,7 @@ struct l2_fhdr { #define DMA_READ_CHANS 5 #define DMA_WRITE_CHANS 3 -/* Use CPU native page size up to 16K for the ring sizes. */ -#if (PAGE_SHIFT > 14) -#define BCM_PAGE_BITS 14 -#else -#define BCM_PAGE_BITS PAGE_SHIFT -#endif +#define BCM_PAGE_BITS 12 #define BCM_PAGE_SIZE (1 << BCM_PAGE_BITS) #define TX_DESC_CNT (BCM_PAGE_SIZE / sizeof(struct tx_bd)) @@ -3778,7 +3770,7 @@ struct l2_fhdr { #define RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) -#define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> (BCM_PAGE_BITS - 4)) +#define RX_RING(x) (((x) & ~MAX_RX_DESC_CNT) >> 8) #define RX_IDX(x) ((x) & MAX_RX_DESC_CNT) /* Context size. */ @@ -3890,6 +3882,10 @@ struct bnx2 { u32 tx_prod_bseq __attribute__((aligned(L1_CACHE_BYTES))); u16 tx_prod; + struct tx_bd *tx_desc_ring; + struct sw_bd *tx_buf_ring; + int tx_ring_size; + u16 tx_cons __attribute__((aligned(L1_CACHE_BYTES))); u16 hw_tx_cons; @@ -3912,11 +3908,9 @@ struct bnx2 { struct sw_bd *rx_buf_ring; struct rx_bd *rx_desc_ring[MAX_RX_RINGS]; - /* TX constants */ - struct tx_bd *tx_desc_ring; - struct sw_bd *tx_buf_ring; - int tx_ring_size; - u32 tx_wake_thresh; + /* Only used to synchronize netif_stop_queue/wake_queue when tx */ + /* ring is full */ + spinlock_t tx_lock; /* End of fields used in the performance code paths. */ @@ -4054,9 +4048,6 @@ struct bnx2 { u32 flash_size; int status_stats_size; - - struct z_stream_s *strm; - void *gunzip_buf; }; static u32 bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset); @@ -4172,7 +4163,6 @@ struct fw_info { #define BNX2_DRV_MSG_CODE_PULSE 0x06000000 #define BNX2_DRV_MSG_CODE_DIAG 0x07000000 #define BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL 0x09000000 -#define BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN 0x0b000000 #define BNX2_DRV_MSG_DATA 0x00ff0000 #define BNX2_DRV_MSG_DATA_WAIT0 0x00010000 diff --git a/drivers/net/bnx2_fw.h b/drivers/net/bnx2_fw.h index 2d753dca0..8158974c3 100644 --- a/drivers/net/bnx2_fw.h +++ b/drivers/net/bnx2_fw.h @@ -7,7 +7,7 @@ * the Free Software Foundation, except as noted below. * * This file contains firmware data derived from proprietary unpublished - * source code, Copyright (c) 2004, 2005, 2006 Broadcom Corporation. + * source code, Copyright (c) 2004, 2005 Broadcom Corporation. * * Permission is hereby granted for the distribution of this firmware data * in hexadecimal or equivalent format, provided this copyright notice is @@ -28,641 +28,943 @@ static const u32 bnx2_COM_b06FwBssAddr = 0x08005860; static const int bnx2_COM_b06FwBssLen = 0x88; static const u32 bnx2_COM_b06FwSbssAddr = 0x08005840; static const int bnx2_COM_b06FwSbssLen = 0x1c; -static u8 bnx2_COM_b06FwText[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x09, 0x83, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xec, 0x5b, 0x7d, 0x6c, - 0x5b, 0xd7, 0x75, 0x3f, 0xef, 0xf1, 0x51, 0x7a, 0x96, 0x68, 0xf9, 0x99, - 0x7e, 0x96, 0x59, 0x4f, 0xb1, 0x49, 0xf1, 0xc9, 0xd2, 0x62, 0x2d, 0x63, - 0x34, 0x35, 0xd1, 0x3a, 0x26, 0x66, 0x48, 0xda, 0x71, 0x36, 0x67, 0xa0, - 0x1d, 0x05, 0x51, 0x51, 0xaf, 0xd0, 0x48, 0xd9, 0xcd, 0xb2, 0x0c, 0x73, - 0x96, 0xb4, 0x70, 0xbc, 0xb4, 0xa1, 0x25, 0x79, 0xf5, 0x06, 0x45, 0xcf, - 0xb3, 0x34, 0x39, 0xc0, 0x82, 0x41, 0x10, 0x9d, 0x3a, 0x7f, 0x30, 0xa5, - 0xed, 0x7c, 0x19, 0xe8, 0x12, 0x29, 0xb2, 0x93, 0xb5, 0x43, 0xd0, 0xa6, - 0x68, 0xff, 0xe8, 0x8a, 0x6e, 0x30, 0x52, 0x0c, 0xf3, 0x3a, 0xa0, 0x30, - 0xfa, 0xc7, 0xe6, 0x2d, 0x1f, 0xdc, 0xef, 0xdc, 0x77, 0x1f, 0xf9, 0x48, - 0x51, 0x96, 0x1c, 0x34, 0x5d, 0xb7, 0x99, 0x80, 0xf0, 0xde, 0xbd, 0xf7, - 0xbc, 0x7b, 0xcf, 0x3d, 0xdf, 0xe7, 0xdc, 0xab, 0x5f, 0x53, 0xa9, 0x85, - 0xe4, 0x6f, 0x2d, 0xfe, 0xc2, 0x7f, 0xf4, 0xc7, 0xb9, 0xdb, 0x3e, 0x7d, - 0x5b, 0x1f, 0x5e, 0x07, 0x54, 0xdd, 0xaf, 0x72, 0xbf, 0x0f, 0x7f, 0x26, - 0xfe, 0xfa, 0xe4, 0x7b, 0xa3, 0x9f, 0x81, 0xbf, 0x2b, 0x18, 0x1c, 0xfe, - 0x09, 0x91, 0xb2, 0x0c, 0x8c, 0xf7, 0x57, 0x2e, 0x5f, 0x7f, 0x9c, 0x17, - 0x0e, 0xaf, 0x62, 0x9e, 0x9b, 0xbf, 0x9b, 0xbf, 0x9b, 0xbf, 0x9b, 0xbf, - 0x9b, 0xbf, 0x9b, 0xbf, 0x9b, 0xbf, 0xff, 0x3f, 0x3f, 0x9f, 0x13, 0x72, - 0x88, 0x98, 0x85, 0xff, 0x48, 0x57, 0xe3, 0x89, 0xa1, 0xa4, 0x45, 0xba, - 0x2f, 0x7e, 0x65, 0x28, 0x67, 0x11, 0x25, 0x8a, 0xdb, 0xc3, 0x29, 0xfa, - 0xb0, 0x9c, 0x37, 0x35, 0xe2, 0xfe, 0x5b, 0xe2, 0x1f, 0x3c, 0xfd, 0xfa, - 0x9d, 0x91, 0xab, 0xb3, 0x3e, 0xd2, 0x8d, 0xf8, 0xcb, 0xba, 0xb1, 0x8d, - 0xf4, 0x0e, 0x7c, 0xf3, 0x5c, 0xf7, 0x7f, 0xa8, 0xd4, 0xe6, 0xce, 0x75, - 0xa5, 0xfc, 0x7a, 0x37, 0xe5, 0x37, 0xc7, 0x75, 0x52, 0xe3, 0x5d, 0x3f, - 0x48, 0xfa, 0x8c, 0x61, 0x5f, 0xdc, 0xa0, 0xf9, 0x12, 0x65, 0x0e, 0x4c, - 0xf0, 0x1a, 0xb1, 0x75, 0xf7, 0x62, 0x2e, 0x2d, 0x3e, 0x3c, 0xf4, 0x67, - 0xd6, 0xd3, 0x65, 0xd5, 0xb2, 0x7a, 0xe6, 0x28, 0x30, 0xf0, 0x7c, 0x3f, - 0xc6, 0x8b, 0x91, 0x1e, 0xa2, 0x3b, 0x49, 0xb5, 0xf2, 0x01, 0x9f, 0xa5, - 0x53, 0xb2, 0x64, 0x51, 0xaa, 0x44, 0xf4, 0x77, 0x45, 0x85, 0x9e, 0xb7, - 0xda, 0x69, 0xae, 0xf7, 0x83, 0x72, 0x02, 0xb8, 0xbc, 0x6d, 0x0d, 0x0f, - 0x8d, 0x5b, 0x3c, 0x57, 0x7c, 0x9d, 0x83, 0x6f, 0x6f, 0x5b, 0xce, 0xd2, - 0x68, 0xb4, 0xc8, 0x7d, 0xbd, 0x2d, 0xdc, 0xe7, 0x8f, 0x3f, 0x1c, 0x7c, - 0xde, 0x0a, 0xc8, 0xbe, 0x1f, 0xa5, 0x92, 0x98, 0x6f, 0xac, 0xc8, 0xb0, - 0xcf, 0xde, 0x91, 0xb3, 0x4c, 0xd9, 0x6f, 0xc5, 0x93, 0x56, 0x08, 0xfd, - 0x1d, 0x72, 0x2c, 0xbd, 0x2e, 0x67, 0x59, 0x72, 0xac, 0x88, 0x6f, 0x7a, - 0x65, 0xff, 0x3b, 0xa9, 0x9c, 0x15, 0x93, 0xfd, 0x57, 0x93, 0x49, 0xab, - 0x5f, 0xf6, 0x1f, 0xbe, 0x2b, 0x67, 0xc5, 0x65, 0xff, 0xf7, 0x81, 0x8b, - 0x41, 0xc7, 0x8a, 0x61, 0xfc, 0x25, 0x30, 0xfe, 0x9a, 0x41, 0x6d, 0x19, - 0x8c, 0x61, 0xef, 0xb6, 0x4e, 0x97, 0x7d, 0x21, 0x7a, 0xbd, 0xfb, 0x32, - 0x68, 0x63, 0xd0, 0xd9, 0x12, 0x29, 0x99, 0xee, 0x10, 0x68, 0x62, 0xd2, - 0xb9, 0x52, 0x2b, 0xf9, 0x4e, 0xfa, 0xb0, 0xe7, 0xcf, 0x51, 0xd6, 0xd4, - 0x69, 0xfd, 0x8c, 0x42, 0x9d, 0x7d, 0x6b, 0x28, 0x61, 0xe4, 0x29, 0xd5, - 0x8d, 0x28, 0x6e, 0xd2, 0x24, 0x6d, 0x66, 0x71, 0xbd, 0x8a, 0x1e, 0x95, - 0x22, 0xa1, 0x2c, 0x28, 0x3c, 0x72, 0xfa, 0x5d, 0x8e, 0x39, 0xb1, 0x26, - 0xff, 0x85, 0x29, 0x35, 0x71, 0x2b, 0x0d, 0x1b, 0x8c, 0x0f, 0x80, 0x05, - 0x1f, 0x74, 0x25, 0x79, 0x2a, 0x44, 0xc7, 0xec, 0x80, 0x92, 0x3a, 0x75, - 0x37, 0x25, 0x63, 0x64, 0xaa, 0xd4, 0x25, 0xbe, 0x2d, 0x14, 0x43, 0x34, - 0x6e, 0x93, 0x92, 0xb4, 0x99, 0x5e, 0xed, 0x18, 0x6f, 0x13, 0xb0, 0xe8, - 0xeb, 0xf0, 0x51, 0x97, 0x91, 0x22, 0x9d, 0x71, 0x46, 0x7f, 0x50, 0x49, - 0x8b, 0x39, 0x44, 0x7f, 0x78, 0x8c, 0x02, 0x74, 0xba, 0x68, 0x4a, 0xd8, - 0x72, 0x39, 0x19, 0x33, 0x00, 0x07, 0xda, 0xd9, 0x26, 0x0d, 0xe3, 0x39, - 0x6a, 0xf3, 0xfa, 0x21, 0xc8, 0xcc, 0xb7, 0x87, 0xb2, 0xd3, 0x62, 0xbe, - 0xb0, 0x2f, 0xce, 0xf3, 0x75, 0x00, 0xee, 0x1d, 0xe0, 0xa5, 0x90, 0x26, - 0x78, 0x95, 0xa0, 0xec, 0x84, 0x02, 0x79, 0xc2, 0x53, 0xd0, 0x2d, 0x0d, - 0xfc, 0x35, 0xb2, 0xfa, 0x14, 0xca, 0x59, 0x9b, 0x28, 0x6f, 0xa0, 0x5d, - 0xbc, 0xa0, 0x26, 0xed, 0x66, 0x4a, 0x69, 0x61, 0xec, 0x5f, 0xc8, 0x0a, - 0x8d, 0xe1, 0x1b, 0xd5, 0x62, 0x98, 0x9f, 0x61, 0xef, 0xc3, 0x82, 0xfe, - 0x4d, 0xf1, 0xfd, 0x74, 0x69, 0x22, 0xaf, 0x26, 0x4b, 0xed, 0xe4, 0x9b, - 0x89, 0x40, 0x9a, 0xc7, 0xd5, 0xd4, 0x19, 0x8d, 0xfc, 0x93, 0x0a, 0x41, - 0x3e, 0x0c, 0x5f, 0xfc, 0xb8, 0xba, 0xb3, 0x74, 0x41, 0x4d, 0x95, 0xf8, - 0x1b, 0xc0, 0x16, 0x55, 0xd0, 0x96, 0xdf, 0xb7, 0x83, 0x96, 0x34, 0xac, - 0xc6, 0x75, 0x3d, 0x51, 0x64, 0x99, 0xe5, 0x6f, 0xc1, 0x0f, 0xec, 0xe5, - 0x9c, 0x0d, 0xfe, 0x08, 0x7e, 0x85, 0xc1, 0xaf, 0x6f, 0x82, 0x5f, 0xfd, - 0xe0, 0x53, 0x8c, 0xde, 0x28, 0xf5, 0xd2, 0x6b, 0xa5, 0x1e, 0x7a, 0x15, - 0x32, 0xf9, 0x4a, 0x29, 0x4c, 0x2f, 0x97, 0x3a, 0xe8, 0xa5, 0x52, 0x88, - 0xce, 0x0b, 0x1e, 0xa6, 0x21, 0xff, 0x82, 0xaf, 0xfa, 0x26, 0xf0, 0xa4, - 0x1d, 0x3c, 0x59, 0x0f, 0x79, 0xd9, 0x08, 0xf9, 0x9b, 0xee, 0xd6, 0x69, - 0xaa, 0x9b, 0x12, 0x41, 0xf4, 0x6f, 0x89, 0x6b, 0x82, 0x4e, 0x1a, 0xc6, - 0xc7, 0x26, 0xfc, 0x94, 0x32, 0x4e, 0xd3, 0x7b, 0x93, 0x1a, 0x8d, 0x95, - 0xa6, 0x36, 0x3a, 0x7c, 0xe3, 0xf6, 0x2c, 0x5d, 0x44, 0x5f, 0xca, 0x98, - 0xa5, 0x4b, 0xdb, 0x54, 0x1a, 0x9d, 0xfe, 0x1b, 0x4a, 0x9e, 0x39, 0x4d, - 0x3f, 0xfe, 0x3a, 0x51, 0x06, 0x34, 0x51, 0xfb, 0x7e, 0x5a, 0x4e, 0x18, - 0xa0, 0x45, 0x5f, 0xaf, 0x90, 0x08, 0xb5, 0x8f, 0x79, 0x19, 0x86, 0xae, - 0x68, 0x4a, 0xca, 0x7e, 0x01, 0xfa, 0xd2, 0xaa, 0x24, 0xa7, 0x88, 0x72, - 0x53, 0x65, 0xca, 0xc5, 0xfc, 0xf4, 0x98, 0x51, 0xa6, 0x74, 0xac, 0x89, - 0xbe, 0x68, 0xb4, 0xd3, 0x68, 0xef, 0x6f, 0xf8, 0xdc, 0x5c, 0x65, 0xba, - 0xd4, 0x8f, 0x77, 0xee, 0x23, 0x9a, 0x12, 0xef, 0x4e, 0x7f, 0xbe, 0xe4, - 0xa7, 0x84, 0x99, 0x0f, 0x69, 0xf4, 0x8e, 0xcf, 0xc1, 0x29, 0xe1, 0x8e, - 0x81, 0x57, 0xc3, 0xb0, 0x0f, 0x8e, 0x0c, 0x66, 0x27, 0xd6, 0x5c, 0x4b, - 0x88, 0x6e, 0xc0, 0x0b, 0xd9, 0xd3, 0x18, 0x8f, 0x61, 0x25, 0x6e, 0x52, - 0xa7, 0xd0, 0x8d, 0x7e, 0xc0, 0x0c, 0x28, 0xfb, 0x4a, 0xcc, 0x6b, 0xbc, - 0x17, 0x19, 0xd7, 0xcd, 0x80, 0xd5, 0xf0, 0x4c, 0x48, 0x9c, 0xbd, 0x78, - 0xf2, 0x5c, 0x8c, 0x27, 0x3f, 0x7f, 0xcf, 0x83, 0xe7, 0xe7, 0x2b, 0xef, - 0x53, 0x9e, 0xf7, 0x7c, 0xe9, 0x4f, 0x03, 0x0e, 0x7e, 0x4c, 0xcf, 0x01, - 0x1a, 0x9d, 0x38, 0x2c, 0xd7, 0xc2, 0x7b, 0x91, 0xd7, 0x38, 0x0d, 0x3a, - 0x09, 0xc8, 0x15, 0xd6, 0x3a, 0xec, 0x59, 0xeb, 0x49, 0xcf, 0x5a, 0x4f, - 0x7a, 0xd6, 0xca, 0x83, 0xb6, 0xb4, 0x4e, 0xb5, 0xfc, 0xd0, 0x51, 0xee, - 0x39, 0x8e, 0x39, 0x9f, 0x03, 0x5f, 0xbe, 0x0a, 0x98, 0x38, 0x2d, 0xda, - 0xa0, 0xc7, 0x94, 0x46, 0x7b, 0x4d, 0x7e, 0x7f, 0xb1, 0xd5, 0xc1, 0x8b, - 0xdf, 0x2f, 0x48, 0x9c, 0x5a, 0x1d, 0xb8, 0xd2, 0x15, 0xa1, 0xff, 0xf3, - 0x25, 0xd6, 0x4f, 0x8a, 0xf9, 0x2c, 0x3a, 0x94, 0x8e, 0xb5, 0xd3, 0x98, - 0xa1, 0xc4, 0x46, 0x7b, 0x9a, 0x99, 0x8e, 0x09, 0xd5, 0x6a, 0x85, 0x0e, - 0x50, 0x58, 0x65, 0xdb, 0x25, 0xf0, 0x7b, 0x49, 0xe2, 0x61, 0x70, 0x3b, - 0xa3, 0x5a, 0xc1, 0xba, 0x7e, 0x96, 0xdf, 0x57, 0xf0, 0xce, 0x32, 0x9c, - 0xd4, 0x9c, 0xb5, 0x5f, 0x45, 0x9b, 0xed, 0xce, 0x66, 0xd9, 0x76, 0xc7, - 0xff, 0xa0, 0xa9, 0xb6, 0xfd, 0x05, 0xb3, 0xb6, 0xed, 0xea, 0x82, 0xd7, - 0x66, 0xf1, 0xde, 0xc2, 0xe4, 0xb3, 0x58, 0x8e, 0xfc, 0xc0, 0x35, 0x06, - 0x3d, 0x6c, 0x96, 0x38, 0x7c, 0x4b, 0xe2, 0x00, 0x5c, 0x01, 0x37, 0x5a, - 0xe2, 0x6f, 0x04, 0x4b, 0xea, 0xda, 0x4c, 0x43, 0xf7, 0x7d, 0xad, 0x18, - 0xbf, 0xec, 0xe3, 0x75, 0xdc, 0x27, 0x29, 0x69, 0xe8, 0xc9, 0xd8, 0xb4, - 0x46, 0xd9, 0xd8, 0x26, 0x21, 0xd7, 0xd9, 0x58, 0xd5, 0x06, 0x8c, 0x4e, - 0xd4, 0xdb, 0x00, 0xfe, 0x8e, 0x6d, 0x80, 0xa3, 0xfb, 0x63, 0xd3, 0x6c, - 0x0b, 0x1c, 0xdd, 0x3f, 0x36, 0xc1, 0x36, 0x41, 0xcc, 0x09, 0xfd, 0x67, - 0x3b, 0xe0, 0xda, 0x00, 0xfe, 0x86, 0x6d, 0x80, 0x0f, 0xf2, 0xcd, 0xf3, - 0xb9, 0x6b, 0x8f, 0xd7, 0xcd, 0x3b, 0xce, 0xb6, 0x45, 0xd9, 0xd9, 0xcd, - 0x30, 0xc7, 0xb1, 0x76, 0x80, 0x0a, 0xd3, 0xcc, 0xc3, 0x48, 0xe8, 0x08, - 0x1d, 0x17, 0x36, 0xef, 0xf4, 0x04, 0x25, 0x0e, 0x9e, 0x18, 0xa0, 0x34, - 0x6c, 0xc0, 0xdc, 0xc4, 0xb5, 0x32, 0xf8, 0x78, 0x47, 0x13, 0x59, 0xb0, - 0x75, 0xf0, 0x93, 0xfd, 0x7e, 0xf2, 0xc5, 0xe3, 0x90, 0xb7, 0x98, 0xf0, - 0x5d, 0xd5, 0x9f, 0xa6, 0xed, 0xaa, 0x69, 0x37, 0xc1, 0x3f, 0x62, 0xde, - 0xfe, 0x98, 0x90, 0x4d, 0xef, 0x2f, 0x09, 0x1b, 0x94, 0x8c, 0x7d, 0x08, - 0xf9, 0x75, 0x69, 0xe4, 0xea, 0x1f, 0xdb, 0xfa, 0x2b, 0x1e, 0x1f, 0xb2, - 0x05, 0x76, 0xdf, 0x84, 0x3c, 0xb9, 0x76, 0x9f, 0xed, 0x71, 0x88, 0x6d, - 0x26, 0xf4, 0x8d, 0x6d, 0x70, 0x80, 0xd4, 0x19, 0x4d, 0xda, 0x69, 0x5d, - 0xda, 0xe9, 0x00, 0x6c, 0x34, 0xb7, 0x0d, 0xd9, 0x36, 0x45, 0x1b, 0xf6, - 0x1a, 0xf6, 0x70, 0x77, 0x3a, 0x35, 0xc1, 0xfe, 0x10, 0xbe, 0x7b, 0x86, - 0x75, 0xf8, 0xdb, 0x43, 0x23, 0xd3, 0xc2, 0x07, 0xb0, 0xff, 0x80, 0x65, - 0x66, 0x1b, 0xce, 0xb6, 0x1c, 0xfb, 0x2e, 0x62, 0xdd, 0x8a, 0xad, 0x64, - 0x39, 0xf1, 0xe2, 0xc5, 0x38, 0xad, 0x21, 0xf5, 0xa4, 0x43, 0x6b, 0x35, - 0xfe, 0xa8, 0x46, 0x2d, 0x4c, 0x63, 0xc6, 0x7f, 0x2b, 0x70, 0xe6, 0x7d, - 0xfd, 0x4f, 0xe0, 0xcc, 0xeb, 0xd6, 0xe3, 0x4d, 0x7a, 0x6b, 0xfc, 0xac, - 0xfe, 0xf0, 0x33, 0xa4, 0x37, 0xc7, 0xcf, 0xd2, 0xbf, 0x58, 0x74, 0x9f, - 0x0e, 0x3f, 0xdb, 0xad, 0xc0, 0xcf, 0x16, 0xa1, 0xef, 0x53, 0x3a, 0x1d, - 0x3c, 0x15, 0xc9, 0xfc, 0x2b, 0x45, 0x61, 0x3f, 0x76, 0xd0, 0xc8, 0x94, - 0x42, 0x7a, 0x17, 0xb5, 0xc3, 0x7f, 0xf4, 0x37, 0x61, 0xfe, 0x5d, 0x44, - 0x9b, 0x1d, 0xbf, 0xd9, 0x15, 0x1e, 0x05, 0xff, 0xd3, 0x2f, 0x7e, 0x05, - 0xdf, 0x3c, 0x4d, 0x07, 0xa7, 0x0e, 0x2b, 0x39, 0xfb, 0x08, 0xe0, 0x97, - 0x83, 0xd5, 0x01, 0x9b, 0x07, 0xec, 0x97, 0x31, 0xef, 0xd3, 0xa4, 0xdf, - 0x1e, 0x19, 0x48, 0x28, 0xc0, 0xe3, 0x45, 0x01, 0x2f, 0x7d, 0x71, 0x97, - 0xb1, 0x53, 0xf0, 0x3f, 0x40, 0xef, 0x15, 0x2f, 0x80, 0xbe, 0xbd, 0xf0, - 0x39, 0x91, 0x67, 0x61, 0x93, 0xe1, 0x8f, 0x22, 0x57, 0x31, 0x2d, 0x7c, - 0x11, 0x29, 0x0f, 0x76, 0xa7, 0x41, 0xef, 0x38, 0xfc, 0xd3, 0x00, 0xfc, - 0x53, 0x0c, 0xbe, 0xa9, 0x07, 0x7e, 0xc9, 0x82, 0x5f, 0x0a, 0x83, 0x1f, - 0x06, 0xcd, 0xc2, 0x47, 0xcd, 0x42, 0xfe, 0xe7, 0x66, 0x48, 0x19, 0x04, - 0xad, 0xcf, 0xc1, 0x3f, 0x26, 0x63, 0x77, 0x42, 0xcf, 0x22, 0x17, 0x66, - 0xd5, 0x41, 0xca, 0xc1, 0x9f, 0x77, 0x6e, 0x8b, 0x62, 0xbd, 0x26, 0x4a, - 0x84, 0x5c, 0x1d, 0xe5, 0xdf, 0x7e, 0x85, 0xac, 0x7f, 0x06, 0xef, 0x22, - 0x61, 0xa2, 0x3d, 0x94, 0xb5, 0xa3, 0x46, 0xa7, 0xda, 0x03, 0x18, 0x6e, - 0x87, 0x95, 0x03, 0x53, 0x11, 0x05, 0xfb, 0x03, 0xcd, 0x27, 0x60, 0xeb, - 0xcb, 0x34, 0x1e, 0x63, 0x3d, 0x29, 0xd3, 0xf3, 0xb1, 0xc8, 0x40, 0x9e, - 0x5a, 0xe9, 0x98, 0x39, 0x21, 0x7c, 0xbc, 0x16, 0x3f, 0x21, 0x74, 0x2c, - 0x67, 0xe1, 0x59, 0xec, 0x54, 0xb2, 0x53, 0xbc, 0x7e, 0x14, 0x5a, 0xee, - 0xc7, 0x93, 0xe7, 0x07, 0xdd, 0xfa, 0x49, 0x39, 0xd8, 0x9d, 0x87, 0x77, - 0x88, 0x18, 0x8b, 0x58, 0x39, 0x35, 0x11, 0x0d, 0x45, 0x55, 0x8d, 0x86, - 0x35, 0x85, 0x46, 0x61, 0x6f, 0xd2, 0xb1, 0xff, 0x2c, 0x1f, 0x33, 0x79, - 0xbc, 0x99, 0xbe, 0x2a, 0xfc, 0x0d, 0xd6, 0x2e, 0x4c, 0x63, 0x5d, 0x3f, - 0xf8, 0xcb, 0xeb, 0xf2, 0x3c, 0x68, 0xc3, 0xf6, 0x6b, 0x56, 0xe4, 0xd9, - 0x3c, 0xed, 0x00, 0x6d, 0xd9, 0x66, 0xc1, 0x3e, 0x0c, 0x60, 0xed, 0x5e, - 0xd8, 0x4f, 0x3c, 0x93, 0xbd, 0x1c, 0x07, 0x05, 0x68, 0xd8, 0x64, 0x79, - 0xd4, 0xe5, 0x98, 0xe9, 0x19, 0xf3, 0xcb, 0xb1, 0x20, 0xfe, 0xe0, 0x7f, - 0x4d, 0x96, 0x19, 0x6e, 0x73, 0x4c, 0xc6, 0x34, 0x09, 0xd3, 0xdc, 0x64, - 0x02, 0x34, 0x8b, 0x9c, 0x4d, 0x10, 0xd3, 0x0c, 0x46, 0x7b, 0x7f, 0x82, - 0xbe, 0x64, 0xaf, 0xf7, 0x3b, 0xb6, 0xb0, 0x55, 0x49, 0xc1, 0x17, 0xa8, - 0x56, 0x0b, 0x7c, 0x45, 0x98, 0x5e, 0x15, 0xb0, 0x64, 0xa8, 0xf1, 0x68, - 0xe8, 0x4b, 0x74, 0xab, 0xb0, 0x11, 0x09, 0xc3, 0x4b, 0xe3, 0xff, 0x52, - 0xc9, 0x72, 0xbf, 0x69, 0xa5, 0xec, 0x20, 0xf3, 0x89, 0xd7, 0x33, 0x68, - 0xae, 0xe4, 0xbc, 0xfb, 0x10, 0xa3, 0x16, 0x60, 0x6b, 0xce, 0x4f, 0xaa, - 0xf4, 0xf8, 0x1d, 0xf0, 0x65, 0xb1, 0x6d, 0x58, 0xcb, 0xc4, 0x78, 0x1e, - 0x6d, 0x15, 0x6d, 0xe8, 0x99, 0x11, 0x02, 0x8f, 0xb9, 0x9f, 0xe1, 0x4c, - 0xfc, 0xbd, 0xcf, 0xb1, 0x75, 0x3e, 0xab, 0xde, 0x4a, 0x14, 0x64, 0x7a, - 0xc5, 0x40, 0x2b, 0xcb, 0x50, 0xd5, 0x6d, 0xc2, 0x5f, 0x3b, 0xb6, 0xc4, - 0x82, 0x2e, 0xc2, 0xe6, 0xf6, 0x79, 0x75, 0x91, 0xe3, 0x09, 0x57, 0x17, - 0x23, 0xa1, 0x84, 0x0a, 0x5b, 0xdc, 0xa7, 0xd1, 0x09, 0xd1, 0x56, 0x28, - 0x31, 0x18, 0x09, 0x2d, 0xa8, 0x1c, 0x4b, 0x33, 0x6c, 0x18, 0xf1, 0x4a, - 0x40, 0xc2, 0x22, 0x9e, 0xb3, 0xdd, 0x98, 0x30, 0x84, 0x7e, 0x53, 0xf4, - 0x1f, 0xab, 0xe8, 0xa8, 0x13, 0xff, 0xa9, 0x88, 0x11, 0x0b, 0x88, 0x11, - 0x53, 0x42, 0x47, 0x8d, 0x04, 0x72, 0x04, 0xd0, 0xdc, 0xd1, 0xcf, 0x42, - 0x91, 0x71, 0xc9, 0xb1, 0x5c, 0x0e, 0x00, 0x99, 0x13, 0x8e, 0x7d, 0xa4, - 0x3c, 0xc7, 0x91, 0xa3, 0xea, 0x53, 0x34, 0x5c, 0x60, 0x3f, 0x8e, 0x3f, - 0x9b, 0x6d, 0x2d, 0xec, 0xa3, 0xf0, 0xc5, 0x51, 0xf0, 0x39, 0x0f, 0x1a, - 0xac, 0x97, 0x74, 0xdd, 0x4f, 0x07, 0xec, 0x3d, 0xa0, 0x79, 0x9c, 0x46, - 0x4e, 0x8d, 0xb0, 0xcc, 0xf6, 0x14, 0x28, 0xd2, 0x73, 0x8c, 0xb6, 0x1b, - 0x73, 0x2c, 0xdf, 0x83, 0xe5, 0x1d, 0xe0, 0x85, 0xd0, 0x51, 0xc8, 0x20, - 0x65, 0x0b, 0x23, 0xf4, 0x58, 0x89, 0xfb, 0xf2, 0xa0, 0x1d, 0xe2, 0xda, - 0xfe, 0xfd, 0x52, 0xce, 0x31, 0x9f, 0xe6, 0xce, 0x37, 0x22, 0xe7, 0x63, - 0x38, 0x86, 0xe1, 0x6f, 0xaa, 0xf3, 0xee, 0x14, 0x3c, 0x8d, 0x18, 0x5d, - 0x6a, 0x79, 0x87, 0x1f, 0xe3, 0xcf, 0xf7, 0xf3, 0x3b, 0xe6, 0x81, 0xef, - 0x6f, 0xb6, 0xf6, 0x00, 0x76, 0x10, 0x73, 0xfa, 0xa9, 0xb3, 0xdd, 0xc5, - 0x37, 0x81, 0xb5, 0xd9, 0xcf, 0x31, 0x9f, 0x1f, 0xa1, 0xec, 0xa9, 0x7c, - 0x8f, 0x0a, 0x19, 0x9b, 0xcd, 0x28, 0xe4, 0xb7, 0x1e, 0xa6, 0xdc, 0xa9, - 0xa3, 0x6c, 0x37, 0x40, 0xab, 0x3d, 0xb4, 0x6b, 0x22, 0xd2, 0x73, 0x80, - 0x34, 0xb1, 0xce, 0x5b, 0x24, 0xe8, 0x1f, 0x9b, 0x15, 0xbe, 0x20, 0x43, - 0xe9, 0x89, 0xed, 0xa1, 0x4b, 0xe8, 0x1b, 0x1e, 0x8c, 0x84, 0x17, 0xe8, - 0x09, 0xd0, 0xe5, 0x23, 0xf8, 0x22, 0xab, 0x67, 0x0c, 0x3a, 0x84, 0x9c, - 0x0a, 0xeb, 0x8f, 0x4a, 0xda, 0xe0, 0xbb, 0xcc, 0x51, 0xd0, 0x8f, 0xf2, - 0x0e, 0x4d, 0x99, 0x9e, 0x4c, 0xcb, 0xaf, 0xc0, 0xf6, 0x1c, 0x11, 0xb1, - 0x4b, 0x56, 0xd0, 0xee, 0xd2, 0x06, 0x47, 0x0e, 0x60, 0x8b, 0x30, 0xef, - 0xe5, 0x41, 0x85, 0xb6, 0x20, 0x4e, 0x3f, 0x24, 0x78, 0xeb, 0xa3, 0x7d, - 0x66, 0xd4, 0xd8, 0x47, 0xf3, 0x7e, 0x27, 0x56, 0xc0, 0x3c, 0x3d, 0xf7, - 0x60, 0x0f, 0x90, 0x53, 0xfb, 0xeb, 0xeb, 0xa8, 0x2d, 0x12, 0x4e, 0xa8, - 0x09, 0xfa, 0x93, 0xd2, 0xdd, 0xe4, 0xe8, 0x77, 0x2b, 0xdb, 0x7e, 0xf0, - 0xb0, 0xd3, 0x69, 0x5b, 0x78, 0x16, 0x3a, 0xb1, 0x1e, 0xe3, 0xfe, 0xac, - 0xc0, 0x7d, 0x84, 0xba, 0xa1, 0x6b, 0x22, 0x8f, 0x39, 0x51, 0x8b, 0x17, - 0xf3, 0xbc, 0x9e, 0xcf, 0x5f, 0xc6, 0x3c, 0xdc, 0xcf, 0x70, 0x78, 0x2f, - 0x3c, 0x41, 0x23, 0x90, 0xc7, 0x5c, 0x7f, 0x57, 0x68, 0x0c, 0xdf, 0xa4, - 0x4a, 0x4d, 0x74, 0x54, 0xe3, 0xf1, 0x48, 0x38, 0xaf, 0x1e, 0x42, 0xdc, - 0xf3, 0xb8, 0xea, 0xb7, 0x7e, 0xe6, 0x67, 0xbf, 0xe3, 0xb7, 0xae, 0x29, - 0xd5, 0xb9, 0x10, 0x87, 0x8a, 0xdc, 0x60, 0x41, 0x19, 0x2c, 0x5d, 0x52, - 0x92, 0x85, 0x6b, 0x4a, 0xaa, 0xc4, 0x30, 0x8e, 0xce, 0x67, 0xcf, 0x74, - 0x82, 0x4e, 0x1f, 0x89, 0xef, 0xe6, 0x7a, 0x8f, 0x50, 0xea, 0xd4, 0xad, - 0x94, 0x9e, 0xe6, 0xbc, 0x34, 0x02, 0x7c, 0x3f, 0x2a, 0xe7, 0x62, 0x41, - 0xca, 0x9d, 0xe1, 0x31, 0xb6, 0x5f, 0xd6, 0xd5, 0x45, 0x1f, 0xef, 0x9f, - 0xf9, 0x6f, 0x52, 0xc1, 0x7e, 0x53, 0xd2, 0x8f, 0xdf, 0x7d, 0x9c, 0x93, - 0xe1, 0xf7, 0x6f, 0x86, 0xd3, 0xb7, 0x95, 0x16, 0x36, 0xdc, 0xc8, 0x3e, - 0x57, 0xb3, 0xc7, 0x47, 0x7d, 0x7e, 0x6b, 0x7b, 0x13, 0xb5, 0x84, 0x80, - 0xc3, 0x4a, 0x7b, 0x64, 0x98, 0x5f, 0x87, 0x1c, 0xb0, 0x4d, 0xd9, 0x0d, - 0x7e, 0x5a, 0x6c, 0xc3, 0x60, 0x93, 0x76, 0x53, 0xae, 0xc4, 0xb2, 0x1d, - 0x35, 0x32, 0x90, 0xb1, 0x34, 0x75, 0xb1, 0x1e, 0xb9, 0xba, 0x07, 0xdb, - 0x9d, 0x87, 0xed, 0x46, 0x3c, 0x64, 0x53, 0xbe, 0x29, 0xce, 0x36, 0xbc, - 0x0b, 0xb2, 0x85, 0xbe, 0x62, 0x55, 0x17, 0x77, 0x2d, 0xc1, 0x5d, 0x5b, - 0xc2, 0xa3, 0x02, 0xd5, 0xe2, 0x3f, 0x4b, 0x8c, 0xff, 0x5f, 0x00, 0xff, - 0xcf, 0x01, 0x7f, 0xc6, 0xa9, 0x31, 0xfe, 0x3b, 0x2b, 0xf8, 0x33, 0x0c, - 0xfc, 0x1c, 0x64, 0xf1, 0x0d, 0xe8, 0xe2, 0x6b, 0x36, 0x7c, 0x9d, 0x0d, - 0xff, 0x67, 0xc3, 0xdf, 0xd9, 0xf0, 0x8b, 0x36, 0x7c, 0x1e, 0xf6, 0x74, - 0x0e, 0x36, 0xe9, 0xac, 0x9d, 0x34, 0x58, 0x9f, 0x92, 0x31, 0xf6, 0x9d, - 0xbb, 0x65, 0xde, 0x1d, 0x92, 0x71, 0xf7, 0xa7, 0x64, 0x2c, 0x7b, 0x00, - 0xb1, 0xec, 0x66, 0x1a, 0xed, 0xe1, 0x9c, 0xa4, 0x05, 0xcf, 0x75, 0x78, - 0x22, 0x6e, 0xed, 0x49, 0x48, 0xbd, 0xfc, 0x0c, 0x62, 0x5c, 0xd8, 0xff, - 0x1e, 0xe4, 0x37, 0x19, 0xc4, 0x6a, 0x56, 0x1f, 0xc7, 0xe5, 0xb0, 0x65, - 0xef, 0x37, 0x39, 0x76, 0xfe, 0x2e, 0x19, 0x03, 0xbb, 0xed, 0x56, 0xc0, - 0xa4, 0xd1, 0xd7, 0x8a, 0x6f, 0x7e, 0x07, 0xb2, 0xdf, 0x86, 0xf6, 0xce, - 0x3a, 0x18, 0xe4, 0xb3, 0x56, 0x16, 0x7d, 0x11, 0xc0, 0xb4, 0x61, 0x9d, - 0x0e, 0xb4, 0xf7, 0xa0, 0x7d, 0x8b, 0xb3, 0x8e, 0xf1, 0x2b, 0x68, 0xa7, - 0xea, 0xbe, 0xd9, 0x8a, 0xbe, 0x4c, 0x5d, 0xdf, 0x9b, 0xe8, 0x4b, 0xa2, - 0x6f, 0x51, 0x7e, 0x97, 0x47, 0x3b, 0x52, 0x07, 0xb3, 0x88, 0x3e, 0xc6, - 0xf1, 0x5b, 0x78, 0xde, 0x47, 0xa3, 0x19, 0x8e, 0x03, 0xdc, 0xb1, 0xdc, - 0x7a, 0x6a, 0xe3, 0xdc, 0xf7, 0x43, 0x21, 0x3b, 0xf3, 0xd2, 0x46, 0xa7, - 0x27, 0xd8, 0x4f, 0x8c, 0x20, 0xee, 0xe1, 0x71, 0xe1, 0x9c, 0x3c, 0xfd, - 0x1f, 0x00, 0xf6, 0x61, 0x8c, 0x21, 0x56, 0xb7, 0xcb, 0x4d, 0x8d, 0xc7, - 0x1f, 0xc5, 0xf8, 0x5f, 0xca, 0x6f, 0x2b, 0x73, 0x03, 0xfe, 0x1b, 0x75, - 0x7d, 0x6a, 0xb0, 0xb6, 0xbd, 0xd6, 0xf3, 0xbe, 0x4d, 0x5f, 0xfa, 0xfd, - 0x48, 0x1d, 0xfc, 0xef, 0x6e, 0xa8, 0x6d, 0x3f, 0xc5, 0xdf, 0x20, 0x87, - 0x70, 0xdb, 0x09, 0xc8, 0x1d, 0xdb, 0xa4, 0xfa, 0x79, 0x3e, 0x6b, 0xd4, - 0xf6, 0x6d, 0x32, 0x6b, 0xdb, 0x1c, 0x27, 0x31, 0x5c, 0x08, 0xf2, 0xde, - 0xa1, 0xec, 0xb2, 0x7f, 0x13, 0xe3, 0x61, 0xe5, 0x5e, 0xdb, 0x8b, 0x67, - 0x48, 0xe6, 0x46, 0xe1, 0x4a, 0xcc, 0x3b, 0x5f, 0x0a, 0x40, 0xae, 0x3e, - 0x0f, 0x9e, 0x73, 0xdc, 0x53, 0xd5, 0xf1, 0xf7, 0x68, 0x39, 0x1d, 0x67, - 0x1f, 0xc0, 0x31, 0xfe, 0x36, 0x11, 0x1f, 0xfb, 0xe2, 0x4f, 0x70, 0x0c, - 0xf6, 0xb4, 0xe3, 0x5b, 0x2c, 0xf8, 0x43, 0xb4, 0x4b, 0x7e, 0xc7, 0x6e, - 0x22, 0x9f, 0xc8, 0x16, 0xd8, 0x9f, 0xb1, 0x0f, 0x89, 0xc0, 0x4e, 0xb3, - 0x1f, 0xfd, 0x24, 0x7d, 0xc6, 0x5d, 0xcd, 0x6c, 0xfb, 0x34, 0xeb, 0x05, - 0xc4, 0x0b, 0x1c, 0xe7, 0xb1, 0xed, 0xc6, 0x7b, 0xd1, 0x8d, 0x57, 0xee, - 0xd7, 0xc8, 0xaa, 0xfa, 0x11, 0x67, 0x8f, 0x5b, 0x59, 0x37, 0x56, 0xb1, - 0xef, 0xc6, 0xb6, 0xed, 0xc7, 0x75, 0xb6, 0xe1, 0xb2, 0xb0, 0x0d, 0x0f, - 0x6a, 0x7e, 0xeb, 0xf7, 0x9b, 0x1d, 0x79, 0x6d, 0x6c, 0x1b, 0xee, 0xad, - 0xd8, 0x06, 0x57, 0x5e, 0xbd, 0x79, 0xeb, 0x0f, 0xc0, 0x1b, 0x0b, 0xbc, - 0xa9, 0xaf, 0xd5, 0x70, 0x8e, 0xe2, 0x87, 0x1f, 0xe2, 0x18, 0x91, 0x73, - 0xd9, 0x18, 0xe5, 0x62, 0x45, 0xc4, 0x6a, 0x91, 0xd9, 0xd9, 0x4a, 0x8e, - 0xf5, 0x35, 0x69, 0xbb, 0x6b, 0xe2, 0x22, 0x7a, 0xbc, 0x78, 0x09, 0xf8, - 0x73, 0xbc, 0xa5, 0x49, 0x1b, 0xc1, 0xfd, 0xe3, 0x12, 0x47, 0x7e, 0xe7, - 0x3a, 0x1e, 0x7c, 0x69, 0xf1, 0x47, 0xe0, 0x15, 0xc7, 0x7d, 0x51, 0x27, - 0xde, 0xab, 0x89, 0xa9, 0xd7, 0xf8, 0xc9, 0xe2, 0x78, 0x89, 0x61, 0x74, - 0x19, 0x2f, 0x05, 0x64, 0x5e, 0x63, 0xc8, 0x3c, 0x87, 0x63, 0x6d, 0xae, - 0xb1, 0xd6, 0xc7, 0x50, 0x0b, 0x43, 0xc1, 0x6d, 0xcc, 0x13, 0x8e, 0xa1, - 0xda, 0x28, 0x39, 0xe3, 0xc4, 0x50, 0x4e, 0x9d, 0xcd, 0xcd, 0x71, 0x5c, - 0x5c, 0xd9, 0x0f, 0xef, 0xc0, 0x3e, 0x45, 0x9e, 0x14, 0x74, 0xea, 0x7f, - 0x1a, 0xec, 0xf6, 0x51, 0xf4, 0x8f, 0xba, 0xfd, 0x9e, 0x5c, 0xc3, 0xc5, - 0x85, 0x7d, 0xbd, 0x1b, 0xd3, 0xed, 0x96, 0x31, 0x1d, 0x62, 0x18, 0xdb, - 0xc9, 0xbb, 0xf6, 0x16, 0x33, 0xe8, 0xe3, 0x75, 0x11, 0x1b, 0x12, 0xc7, - 0x49, 0x90, 0xaf, 0xfd, 0x91, 0x50, 0x58, 0xad, 0xc7, 0xab, 0x75, 0xa1, - 0x16, 0xaf, 0x41, 0xf1, 0xdd, 0xf8, 0x92, 0xef, 0x48, 0xc4, 0x92, 0xe3, - 0xf6, 0x10, 0xe8, 0xc5, 0xf8, 0xb9, 0xba, 0xe1, 0xc6, 0xc9, 0x8c, 0xd3, - 0x3f, 0x82, 0xc6, 0xbb, 0x15, 0xfe, 0x7e, 0xcc, 0xde, 0x2f, 0xe8, 0x96, - 0x15, 0xb8, 0x0e, 0x7b, 0x70, 0x1d, 0x91, 0xb8, 0xb2, 0x2e, 0xb0, 0x7e, - 0x78, 0x6b, 0x9a, 0xa6, 0xd8, 0x1b, 0x70, 0x0e, 0xf3, 0xb9, 0xb9, 0x6a, - 0x2d, 0x0c, 0xf9, 0xb6, 0xc1, 0x1f, 0x02, 0xd7, 0xac, 0x88, 0x43, 0x03, - 0x0b, 0xf5, 0x34, 0x1c, 0xc7, 0x5a, 0x88, 0xdb, 0x81, 0x8f, 0xcb, 0xf3, - 0x26, 0x89, 0xcf, 0x37, 0xc5, 0xdc, 0x63, 0xa2, 0x06, 0xea, 0xd3, 0x39, - 0x77, 0xc9, 0x0a, 0xde, 0x69, 0x92, 0x77, 0x8f, 0x56, 0xf0, 0x73, 0x78, - 0x1c, 0x90, 0x74, 0xe5, 0xdc, 0x95, 0x75, 0x5a, 0xf0, 0xa7, 0x9d, 0x73, - 0xd3, 0x41, 0x6a, 0x14, 0x23, 0x2f, 0x0c, 0xa9, 0xdb, 0x1c, 0x3a, 0x3a, - 0x31, 0xf2, 0xda, 0xba, 0x18, 0xf9, 0xb6, 0x20, 0xc7, 0x5a, 0xc3, 0x50, - 0x82, 0x79, 0xf8, 0xba, 0x97, 0x6d, 0xc8, 0x36, 0x70, 0x3d, 0x5f, 0x53, - 0xbb, 0xec, 0x59, 0xa6, 0xd6, 0x1c, 0x20, 0xdf, 0x0c, 0xfb, 0x0e, 0x0b, - 0x79, 0x06, 0x91, 0x36, 0xc9, 0x3a, 0xcb, 0xbe, 0xbd, 0x1a, 0x67, 0xcf, - 0x51, 0xa3, 0x18, 0xfb, 0x46, 0xfd, 0xfa, 0x79, 0xbf, 0xdf, 0x3a, 0xac, - 0x3b, 0x36, 0x73, 0x25, 0xbf, 0xee, 0xc2, 0xed, 0x41, 0x9c, 0xad, 0x50, - 0x93, 0x55, 0xc0, 0xfe, 0xde, 0xf0, 0x37, 0x5b, 0xae, 0x2e, 0x06, 0x68, - 0xfd, 0xcc, 0x2d, 0x42, 0x1f, 0x8d, 0xc9, 0xaa, 0x3e, 0x8e, 0x82, 0x37, - 0x19, 0xa7, 0x06, 0x60, 0xae, 0xa7, 0xeb, 0xd7, 0x0b, 0xc6, 0xed, 0x37, - 0xfd, 0xaa, 0xe5, 0xca, 0xc0, 0xf5, 0xf2, 0x91, 0x4f, 0xd5, 0xd1, 0xba, - 0x51, 0x4d, 0xf8, 0x2c, 0xe8, 0x1a, 0x47, 0xde, 0x1d, 0x79, 0x81, 0x10, - 0x3b, 0x39, 0x79, 0x78, 0x1a, 0xb9, 0x77, 0xe4, 0x02, 0xe7, 0xe3, 0x6e, - 0x7e, 0xfe, 0x6a, 0x29, 0x72, 0x36, 0x8f, 0x9c, 0x79, 0x1e, 0x39, 0xf9, - 0xcb, 0xc8, 0xc9, 0xcf, 0x97, 0x7a, 0x41, 0xff, 0x1e, 0x99, 0x8f, 0xb3, - 0x8e, 0x99, 0x74, 0x11, 0xb9, 0xd3, 0x77, 0x67, 0xd8, 0x46, 0x74, 0xd1, - 0x3d, 0xc8, 0x35, 0xbe, 0x3f, 0xa9, 0x68, 0x9d, 0x7d, 0x01, 0x5f, 0xc2, - 0xb8, 0x91, 0x38, 0x71, 0x29, 0x4f, 0x1a, 0xc7, 0x8a, 0x23, 0x4d, 0x7e, - 0x6b, 0xae, 0x95, 0x5a, 0xf6, 0x2c, 0xcb, 0x93, 0x6a, 0xac, 0xe8, 0xc2, - 0x19, 0xd4, 0xd9, 0xf7, 0x87, 0x9c, 0xdb, 0xc4, 0x48, 0xe4, 0xd3, 0xeb, - 0xe8, 0xed, 0x93, 0x65, 0xda, 0x19, 0xbb, 0x56, 0xbe, 0x68, 0xad, 0xa3, - 0x6c, 0xef, 0x43, 0x32, 0x97, 0x5c, 0x78, 0x28, 0x69, 0xe5, 0x43, 0x3e, - 0xf7, 0x7c, 0x62, 0x42, 0x47, 0x84, 0xc8, 0xbf, 0x20, 0xcd, 0x0d, 0x20, - 0x71, 0x6e, 0xd9, 0xfe, 0x02, 0x1f, 0x10, 0xb1, 0x6d, 0x9c, 0x33, 0x03, - 0xa2, 0xd6, 0xb6, 0xd1, 0xe2, 0x7e, 0x03, 0xfc, 0xbe, 0x8f, 0xe6, 0x90, - 0x43, 0x14, 0x44, 0x1e, 0xde, 0x0e, 0x78, 0x37, 0x0f, 0xbf, 0x1f, 0xb9, - 0x01, 0xd3, 0xd8, 0x04, 0xfc, 0x6f, 0x03, 0xc6, 0x6b, 0x43, 0x9f, 0x6b, - 0x22, 0xf1, 0x3d, 0x8f, 0xb7, 0x13, 0xd7, 0x65, 0xab, 0xf3, 0xf2, 0x9c, - 0x3c, 0xf6, 0x61, 0xf9, 0xf6, 0xbe, 0x3e, 0xcf, 0xdc, 0x6d, 0x9e, 0xb9, - 0xef, 0xf0, 0xcc, 0xed, 0xc3, 0xb7, 0x2e, 0x3e, 0x41, 0x7c, 0xeb, 0xae, - 0xf1, 0xb7, 0x9e, 0x35, 0x5c, 0xdc, 0xdb, 0x3d, 0xb8, 0xbf, 0x8f, 0xf9, - 0xb9, 0xcf, 0xf4, 0xf4, 0xf1, 0x9a, 0x1b, 0x68, 0x6e, 0xb0, 0x8d, 0x16, - 0x4f, 0x72, 0x5f, 0xd0, 0x83, 0x0b, 0xe3, 0x17, 0x90, 0x63, 0x6d, 0x74, - 0xf1, 0x64, 0x8b, 0xc0, 0x9b, 0xfd, 0xf9, 0xc6, 0xca, 0x9a, 0x57, 0xb0, - 0xa6, 0x3b, 0x97, 0x89, 0x6f, 0x19, 0x96, 0xf1, 0xe3, 0x31, 0xee, 0xe3, - 0xb1, 0x37, 0xcb, 0x5f, 0x33, 0x82, 0xce, 0x9e, 0x0d, 0xc6, 0xcd, 0xfd, - 0x56, 0x6b, 0x26, 0x8b, 0xdb, 0x9d, 0x34, 0x1b, 0xd4, 0xc0, 0x37, 0x55, - 0xfa, 0x28, 0xae, 0x23, 0xa8, 0x4a, 0xb4, 0x8f, 0xf9, 0xbc, 0x4e, 0xd6, - 0xaf, 0x5b, 0x30, 0x6f, 0xd8, 0xcd, 0xd1, 0x88, 0xe5, 0x38, 0x27, 0xec, - 0xbe, 0x26, 0xc7, 0xd9, 0xee, 0xb3, 0xdf, 0xc7, 0x53, 0xc8, 0xaa, 0x3c, - 0xaf, 0x29, 0xed, 0xa0, 0x83, 0x50, 0xcf, 0x8b, 0xb2, 0x9e, 0xb2, 0xe8, - 0xad, 0x99, 0x18, 0x4e, 0x1c, 0xe3, 0x9c, 0xed, 0xac, 0x85, 0xfe, 0xe0, - 0xbd, 0x98, 0x00, 0x1e, 0x61, 0x8a, 0xe2, 0xaf, 0x50, 0xca, 0xe3, 0x69, - 0xe1, 0xa9, 0xe0, 0xc9, 0xf5, 0x0c, 0x1d, 0x4f, 0xe8, 0x18, 0xec, 0x53, - 0xb4, 0xef, 0x92, 0x93, 0x3f, 0x41, 0x37, 0xde, 0x9e, 0x74, 0xea, 0x51, - 0x8b, 0xd6, 0x72, 0xf5, 0xa8, 0x3f, 0x67, 0x9e, 0x9c, 0x70, 0xeb, 0x51, - 0x8b, 0x24, 0xea, 0x51, 0x27, 0x56, 0xa8, 0x47, 0x25, 0x56, 0x5f, 0x8f, - 0xe2, 0xf9, 0x35, 0xda, 0xd7, 0x4f, 0xca, 0x17, 0x64, 0x3d, 0xea, 0x3d, - 0x72, 0xea, 0x51, 0x17, 0xa9, 0x71, 0x3d, 0xea, 0x78, 0x5d, 0x3d, 0x2a, - 0x28, 0xea, 0x51, 0x3c, 0x8f, 0x53, 0x8f, 0x12, 0xed, 0xbe, 0x88, 0xa7, - 0xee, 0x42, 0xf4, 0xee, 0x64, 0x07, 0x68, 0x66, 0xd0, 0xf7, 0x1a, 0xda, - 0x34, 0x45, 0xc8, 0xdb, 0x4a, 0x35, 0xd0, 0x07, 0x6e, 0xb8, 0xbe, 0xa2, - 0xd0, 0x06, 0xcc, 0x9b, 0xec, 0x7b, 0xd8, 0x53, 0x63, 0x61, 0x9a, 0xff, - 0x62, 0xea, 0x2c, 0x07, 0x45, 0x9d, 0xe5, 0x87, 0x6b, 0xbc, 0x75, 0x96, - 0x45, 0xba, 0x7e, 0x9d, 0xe5, 0x60, 0x83, 0x3a, 0xcb, 0x5b, 0x54, 0xad, - 0xb3, 0xbc, 0x45, 0xd5, 0x3a, 0xcb, 0xc1, 0x12, 0xe7, 0xe2, 0x3e, 0x89, - 0x5f, 0x06, 0xed, 0x41, 0xf1, 0xc7, 0xb5, 0x97, 0xc5, 0xca, 0x1e, 0x7e, - 0xd9, 0x6a, 0x2f, 0x6c, 0x03, 0x22, 0x17, 0x2e, 0xd7, 0xd4, 0x5e, 0xb8, - 0x0d, 0x9d, 0xb1, 0xd7, 0x08, 0x19, 0x99, 0x83, 0x7f, 0x5f, 0x9c, 0x0c, - 0x61, 0xce, 0x0e, 0xf8, 0x8c, 0x0e, 0xe4, 0x06, 0x61, 0xb4, 0x15, 0xda, - 0x64, 0x0d, 0xa1, 0x8f, 0xc7, 0xd9, 0x0e, 0x43, 0xb7, 0x6c, 0x77, 0x7f, - 0x0f, 0x48, 0x1a, 0x44, 0x68, 0xb8, 0x9d, 0xf4, 0x20, 0xfb, 0x8e, 0xc9, - 0x3d, 0x74, 0xc8, 0xde, 0x22, 0xf6, 0xbd, 0xc1, 0xaa, 0x95, 0xb9, 0xc1, - 0x1b, 0x90, 0xb9, 0xcc, 0xaa, 0x65, 0x8e, 0xe5, 0xcd, 0x39, 0xf7, 0xdd, - 0x60, 0xf1, 0xfa, 0x1d, 0x02, 0xa7, 0x77, 0x1b, 0xc8, 0xfb, 0x18, 0xec, - 0x8e, 0x33, 0xbf, 0x2e, 0xd7, 0xab, 0x8f, 0x87, 0x9f, 0x6d, 0x66, 0xff, - 0xbd, 0x72, 0x3d, 0xb1, 0xde, 0x7f, 0xaf, 0xe4, 0x47, 0x15, 0x61, 0x93, - 0xb3, 0x25, 0xae, 0xed, 0x7b, 0xf9, 0x33, 0x8f, 0x9c, 0x00, 0x7d, 0x42, - 0x0f, 0x98, 0xae, 0x41, 0xf0, 0x01, 0xeb, 0xd8, 0x4f, 0xc9, 0x5a, 0x16, - 0x9e, 0x05, 0x97, 0x7f, 0xad, 0xb0, 0x99, 0xee, 0x18, 0xdb, 0x01, 0x0b, - 0xfe, 0x8f, 0xeb, 0x28, 0x7c, 0x8e, 0xca, 0xfd, 0x2e, 0x5f, 0xbb, 0x2e, - 0xbc, 0xa7, 0x72, 0xbb, 0x5c, 0xce, 0x8a, 0x7a, 0x2d, 0xa9, 0x9d, 0x7d, - 0xd3, 0x2d, 0x6c, 0x6b, 0xb6, 0x58, 0xae, 0xcc, 0x26, 0xf0, 0xce, 0x7c, - 0x7d, 0x17, 0x36, 0x9c, 0xcf, 0xaa, 0xbf, 0x23, 0x6a, 0x04, 0x73, 0x36, - 0xdb, 0x6b, 0x8e, 0x41, 0x7f, 0x0b, 0xb2, 0xc4, 0xef, 0x51, 0x71, 0x2e, - 0x21, 0x6a, 0xf8, 0x83, 0xdc, 0x76, 0xed, 0x4a, 0x94, 0xed, 0x30, 0xf6, - 0x5c, 0xa5, 0x31, 0xe2, 0x23, 0xc8, 0x0c, 0xc7, 0xb1, 0x0c, 0xe7, 0xc6, - 0x9e, 0x9a, 0xa7, 0x66, 0xab, 0xcb, 0xb8, 0x88, 0x75, 0x39, 0x00, 0x9a, - 0xed, 0x10, 0x31, 0xea, 0xb8, 0x5d, 0xa6, 0xea, 0x19, 0x3f, 0xd3, 0xdc, - 0x39, 0xe7, 0x3f, 0x66, 0x2f, 0x47, 0xfb, 0xcd, 0x37, 0x48, 0x7b, 0x47, - 0x1f, 0x6b, 0xe9, 0xae, 0x23, 0x7e, 0x71, 0xe9, 0xee, 0xfa, 0xa8, 0x49, - 0x49, 0x83, 0xa8, 0xac, 0x2b, 0x7e, 0x5a, 0x9e, 0x29, 0xfd, 0x5f, 0xd8, - 0xaf, 0xe2, 0xd9, 0xaf, 0xab, 0xbb, 0xfb, 0xe4, 0x7e, 0xc3, 0x75, 0xba, - 0x1b, 0x97, 0x75, 0xb9, 0x5f, 0x84, 0xee, 0xba, 0x7b, 0xe2, 0xb5, 0xb7, - 0x5c, 0x67, 0xdd, 0x67, 0x48, 0x8d, 0xaf, 0x14, 0x7b, 0xff, 0xb4, 0xf9, - 0xe3, 0xc5, 0xde, 0x1f, 0x87, 0x9e, 0x5e, 0xbd, 0x65, 0x1a, 0xb6, 0x89, - 0xb8, 0xc2, 0xd1, 0x1f, 0xd8, 0xe3, 0x82, 0x9f, 0x16, 0x1e, 0xd2, 0xe9, - 0x9f, 0xee, 0xe4, 0xfa, 0xac, 0x26, 0x73, 0x7c, 0x6e, 0x7f, 0xb1, 0x95, - 0x63, 0xab, 0x4d, 0xd6, 0x77, 0x44, 0x6e, 0x95, 0x57, 0x4d, 0x8f, 0x1f, - 0x31, 0x30, 0xce, 0x63, 0x61, 0xba, 0x1c, 0xbc, 0x91, 0xb8, 0xbc, 0xcb, - 0x58, 0xf4, 0xad, 0x26, 0x2e, 0xbf, 0x55, 0xf7, 0x5b, 0x7f, 0xdd, 0x7a, - 0xbd, 0x3a, 0x47, 0x35, 0x2e, 0xe7, 0x7c, 0x3e, 0xe8, 0xd4, 0x18, 0x4c, - 0x8e, 0xcf, 0xd7, 0x4a, 0x9e, 0xf0, 0x3b, 0x72, 0x11, 0x1b, 0x79, 0x08, - 0x64, 0xfc, 0x55, 0xc8, 0xca, 0x2b, 0x36, 0xf2, 0x0e, 0x1b, 0xf9, 0x88, - 0x8d, 0xdc, 0xc3, 0x46, 0xee, 0x61, 0xf7, 0xc8, 0x1c, 0x26, 0x23, 0xeb, - 0x56, 0x7c, 0x46, 0xcb, 0xf9, 0x61, 0x5e, 0xc9, 0xd8, 0xe3, 0x7c, 0x1f, - 0x41, 0x4d, 0xc6, 0x36, 0xca, 0x78, 0xf0, 0x38, 0xdf, 0x77, 0x28, 0xab, - 0x71, 0xae, 0x45, 0x91, 0xaa, 0xc6, 0x6f, 0x87, 0x8f, 0xda, 0x0e, 0xbc, - 0x9a, 0x79, 0xdc, 0xa7, 0xc6, 0x5b, 0x99, 0x76, 0x8a, 0x1a, 0x5f, 0x2b, - 0xcf, 0x0d, 0x7a, 0x03, 0x0e, 0xfe, 0xdd, 0xdc, 0xd6, 0xd4, 0xf8, 0xdd, - 0xec, 0xd3, 0xc2, 0xa4, 0xba, 0xfd, 0xb7, 0x07, 0x98, 0xae, 0xa4, 0xde, - 0x16, 0xe0, 0xb8, 0x76, 0xde, 0xf6, 0x8b, 0x3b, 0x05, 0xc9, 0x18, 0xd7, - 0xcc, 0xb8, 0x5d, 0xa5, 0xab, 0xba, 0x2c, 0x5d, 0xfd, 0x95, 0xfa, 0x3f, - 0xd3, 0xd2, 0xc7, 0x70, 0xa2, 0x36, 0xc6, 0x34, 0x75, 0xe7, 0xe3, 0xf3, - 0x66, 0x5e, 0x47, 0xdc, 0x63, 0xc0, 0xf3, 0x60, 0x33, 0xb5, 0x0d, 0x0e, - 0xf9, 0x2d, 0xef, 0xba, 0x6c, 0x43, 0x76, 0x90, 0x37, 0xc7, 0x5a, 0x7e, - 0xcd, 0xa8, 0x38, 0x1b, 0x49, 0xf6, 0x47, 0x85, 0xec, 0xb0, 0xac, 0x69, - 0xe2, 0xce, 0xd5, 0x47, 0xe2, 0x1e, 0x09, 0xcb, 0x19, 0xcb, 0xf2, 0x78, - 0x7f, 0x57, 0x58, 0x53, 0x5b, 0xb0, 0x46, 0x98, 0xd2, 0x25, 0x71, 0x56, - 0x80, 0x7c, 0xe9, 0xdc, 0x3a, 0x6a, 0xfb, 0x07, 0xbd, 0x9a, 0xc7, 0x46, - 0x9d, 0xb3, 0x7a, 0xbb, 0xde, 0xff, 0x8d, 0x8a, 0x73, 0x65, 0xc7, 0x06, - 0xb9, 0xe7, 0xc3, 0xab, 0x3b, 0xff, 0xbe, 0xbe, 0x3e, 0xb5, 0xd4, 0xd7, - 0x0d, 0x24, 0x0d, 0x98, 0x36, 0x8d, 0xcf, 0xee, 0xe7, 0x4b, 0x7c, 0xaf, - 0x25, 0x12, 0xe3, 0xdc, 0x6d, 0x44, 0xdc, 0xf9, 0x50, 0x21, 0x85, 0x3a, - 0x8d, 0x19, 0x9c, 0xf3, 0x85, 0x86, 0x7d, 0x71, 0xca, 0x64, 0x27, 0x48, - 0x43, 0xac, 0x98, 0xa9, 0xd6, 0x03, 0x1f, 0x5c, 0x43, 0x96, 0x2b, 0x97, - 0x51, 0xce, 0x1f, 0x6a, 0xce, 0xed, 0x16, 0xe9, 0xb0, 0x72, 0xa0, 0x74, - 0x84, 0x0e, 0x34, 0x8c, 0x29, 0x1b, 0xd7, 0x03, 0x2f, 0xd6, 0xd5, 0x14, - 0x16, 0x44, 0x4d, 0x21, 0xb7, 0xc6, 0x6f, 0x3d, 0x19, 0x70, 0xee, 0xb5, - 0x34, 0xd6, 0x93, 0x5d, 0x15, 0x3d, 0x71, 0xe1, 0xf8, 0x2c, 0xbe, 0x8d, - 0x76, 0x8a, 0xb5, 0x0e, 0x2b, 0x59, 0xbb, 0x95, 0x76, 0x1a, 0x0e, 0xd6, - 0xa3, 0x36, 0xe3, 0x75, 0x58, 0x39, 0x68, 0xe7, 0x95, 0xb4, 0xa8, 0x3d, - 0x70, 0x8c, 0xbf, 0xe6, 0xda, 0x30, 0x95, 0xe9, 0xed, 0x98, 0xfb, 0x3d, - 0xc3, 0x78, 0x6b, 0x8a, 0x2e, 0x9d, 0xf8, 0x2e, 0x51, 0x58, 0xe6, 0x6f, - 0xce, 0x7c, 0xb9, 0x29, 0xae, 0x25, 0xde, 0x8f, 0xfd, 0x33, 0xfc, 0x6e, - 0x25, 0x39, 0x55, 0x2e, 0xa7, 0x31, 0x3e, 0xd6, 0x7b, 0xaf, 0xc8, 0x8d, - 0xd4, 0x38, 0x0d, 0x71, 0x8e, 0xac, 0x2d, 0xc9, 0x91, 0xd3, 0xd0, 0x35, - 0xc4, 0x20, 0x76, 0x13, 0xbe, 0x75, 0xe3, 0x91, 0xcf, 0xae, 0x75, 0x64, - 0xe4, 0xbb, 0x12, 0x0f, 0x1e, 0xff, 0xfb, 0x80, 0x7b, 0x0f, 0x28, 0x77, - 0x2a, 0x8d, 0xfd, 0x37, 0x51, 0xca, 0x74, 0xf2, 0xbb, 0xec, 0x99, 0x23, - 0x1b, 0x6a, 0xe1, 0xd1, 0x77, 0xca, 0x85, 0x0f, 0xd6, 0xc1, 0xf3, 0x19, - 0xd7, 0x5f, 0xd5, 0xc1, 0x07, 0x3d, 0xf0, 0x66, 0x1d, 0x3c, 0xe2, 0xae, - 0x33, 0xdf, 0xa8, 0x83, 0x37, 0x3d, 0xf0, 0xed, 0x75, 0xf0, 0xed, 0x80, - 0x7f, 0xa3, 0x0e, 0x1e, 0x7d, 0xa7, 0x90, 0x13, 0x08, 0xda, 0x70, 0x8c, - 0x74, 0x48, 0xe6, 0x89, 0x78, 0x2e, 0xb9, 0x1f, 0xc9, 0xf2, 0xd3, 0x01, - 0x1a, 0x7b, 0xeb, 0xb5, 0x09, 0xd8, 0xa8, 0xaa, 0x4c, 0x39, 0xfa, 0xea, - 0x95, 0x25, 0x96, 0xbd, 0x3c, 0xe4, 0x15, 0x7a, 0x54, 0x80, 0x3e, 0x15, - 0x5c, 0x5f, 0xca, 0x77, 0xaa, 0x22, 0xc7, 0x1d, 0x3d, 0x56, 0x68, 0xbd, - 0x35, 0x2f, 0x73, 0x91, 0xab, 0x8c, 0x3b, 0xfc, 0x86, 0xeb, 0x3b, 0xe8, - 0x84, 0x63, 0x57, 0x58, 0xbf, 0x79, 0x7e, 0x69, 0x5f, 0x4a, 0x2c, 0x87, - 0xce, 0x3a, 0xe9, 0x25, 0x32, 0x1b, 0x5e, 0x52, 0x77, 0xf1, 0xd5, 0xd9, - 0x77, 0x12, 0xf6, 0x3d, 0xd7, 0xe2, 0xb7, 0x36, 0xac, 0xbd, 0x9e, 0x7d, - 0xcf, 0x78, 0xec, 0x7b, 0x38, 0x58, 0xf5, 0xf9, 0x8f, 0x09, 0x9f, 0xdf, - 0xd1, 0xc0, 0x66, 0xac, 0xde, 0xe7, 0xef, 0xfd, 0xd8, 0x3e, 0x7f, 0xb9, - 0x75, 0x57, 0xe3, 0xf3, 0x1f, 0x69, 0xf9, 0x78, 0x3e, 0x9f, 0xd7, 0xac, - 0xaf, 0x65, 0x7a, 0xcf, 0x59, 0x8e, 0xca, 0x18, 0x7b, 0xb7, 0x27, 0xc6, - 0x66, 0xfc, 0xbe, 0x27, 0xef, 0x02, 0x9e, 0x5e, 0xeb, 0xc8, 0xdb, 0x51, - 0x19, 0xa7, 0x73, 0xec, 0x8d, 0xf7, 0xc2, 0x23, 0x90, 0xd1, 0x7c, 0x8f, - 0x8f, 0x54, 0x9a, 0x35, 0x9d, 0xb3, 0xed, 0x9f, 0x6f, 0xae, 0x17, 0xa1, - 0xcb, 0xc2, 0x9f, 0x24, 0x3e, 0x81, 0x5a, 0xea, 0x49, 0xc8, 0x8f, 0xbb, - 0xaf, 0x95, 0x6a, 0xa9, 0xf5, 0xe7, 0x1f, 0x7c, 0xee, 0x41, 0xca, 0x03, - 0x95, 0x73, 0x10, 0xaf, 0x4e, 0xe9, 0x94, 0x9d, 0x21, 0xdd, 0x8c, 0x93, - 0xb2, 0x8f, 0x71, 0x8e, 0xfd, 0xb0, 0x52, 0x6f, 0x3f, 0x24, 0x6b, 0x30, - 0xea, 0xb2, 0x77, 0x82, 0x7e, 0x02, 0x7c, 0x58, 0xaf, 0x9c, 0x1a, 0x8c, - 0xea, 0xdc, 0x09, 0x3a, 0xfe, 0xf3, 0xbb, 0x13, 0xc4, 0xf3, 0x6b, 0xb4, - 0xb7, 0xc1, 0x9d, 0x20, 0xdf, 0x2a, 0xef, 0x04, 0xad, 0x17, 0x35, 0x18, - 0x9e, 0xc7, 0xa9, 0xc1, 0x70, 0xbb, 0xb3, 0x8f, 0xe5, 0x3a, 0x4c, 0xa3, - 0x93, 0xb7, 0x88, 0x7b, 0xa8, 0x9d, 0x7d, 0xb5, 0xf2, 0xbd, 0xef, 0x13, - 0x8d, 0xa5, 0x79, 0xbd, 0xa3, 0x0d, 0xef, 0xb6, 0x24, 0x3f, 0xc1, 0x9a, - 0xcb, 0x21, 0x51, 0x73, 0xb9, 0xb3, 0xcd, 0x5b, 0x73, 0x51, 0x57, 0xb8, - 0xdb, 0x72, 0xa8, 0x41, 0xcd, 0xc5, 0xef, 0xb9, 0xdb, 0xe2, 0xf7, 0xdc, - 0x6d, 0x39, 0x24, 0xeb, 0x2b, 0xea, 0x2f, 0xd1, 0xdd, 0x96, 0xe4, 0x8a, - 0x77, 0x5b, 0xb6, 0x4a, 0x7d, 0xf5, 0xc2, 0xaf, 0xfe, 0xbc, 0x32, 0x55, - 0x67, 0xe7, 0x13, 0xc2, 0xce, 0xdf, 0xd5, 0xea, 0xb7, 0x9e, 0x69, 0xbb, - 0x9e, 0x9d, 0xdf, 0x57, 0xd1, 0x53, 0xbe, 0xa3, 0xcd, 0x77, 0xbe, 0x58, - 0x16, 0xf9, 0x7c, 0xa6, 0x89, 0x72, 0x03, 0xbf, 0x2a, 0x68, 0xf6, 0x58, - 0x6f, 0xed, 0x99, 0x63, 0xf5, 0x5e, 0xa4, 0xee, 0xb9, 0x17, 0x69, 0xa2, - 0x5f, 0xaf, 0xab, 0x87, 0x04, 0xe4, 0xdd, 0x7e, 0xf8, 0xc2, 0x19, 0x43, - 0xda, 0x5e, 0xc4, 0x70, 0x98, 0xae, 0x50, 0xe4, 0x3b, 0x95, 0x6d, 0xe4, - 0x9b, 0x71, 0xce, 0x4b, 0x54, 0x11, 0x63, 0x42, 0x8e, 0x8b, 0x7e, 0xe1, - 0x6f, 0xd4, 0xb8, 0x23, 0xb3, 0xe3, 0xf6, 0x05, 0xe0, 0xbf, 0x21, 0x51, - 0x6d, 0x9b, 0x95, 0x5a, 0xce, 0x58, 0xe5, 0x0e, 0xbf, 0x09, 0xfb, 0xe0, - 0xdc, 0x07, 0xca, 0x98, 0x7c, 0x67, 0xe4, 0x62, 0x5b, 0xf5, 0x3e, 0xd0, - 0x67, 0xa4, 0x9c, 0x3a, 0xf7, 0x81, 0x48, 0x4d, 0x40, 0x3e, 0x6e, 0xe4, - 0x3e, 0x50, 0xd7, 0x92, 0xfb, 0x40, 0x2b, 0xf3, 0x66, 0xe9, 0x7d, 0xa0, - 0xc6, 0xfc, 0xe1, 0xfb, 0x40, 0xff, 0xde, 0xe6, 0xdc, 0x43, 0x5d, 0x89, - 0x3f, 0x6e, 0x9c, 0xf4, 0x11, 0xe0, 0xf9, 0x3e, 0x50, 0xe5, 0x1e, 0x90, - 0xe7, 0x0e, 0x10, 0xdf, 0x25, 0x59, 0xee, 0x0c, 0xce, 0x7b, 0xff, 0xa4, - 0xa7, 0x72, 0xff, 0xe4, 0x7c, 0xc9, 0xf5, 0xed, 0xee, 0xb9, 0x1c, 0xc7, - 0x39, 0xbb, 0x44, 0x8e, 0x7a, 0xae, 0x54, 0x5b, 0xc3, 0x60, 0xbe, 0x8f, - 0x16, 0xcf, 0x81, 0x3e, 0x6f, 0x89, 0xdc, 0x00, 0x7c, 0xde, 0xe2, 0x23, - 0xe6, 0x1d, 0x29, 0xa0, 0x8b, 0x38, 0xcb, 0x75, 0xf8, 0xdd, 0x21, 0x64, - 0xc1, 0x91, 0x8b, 0xdd, 0x9e, 0xf3, 0xd0, 0xaa, 0x1c, 0x38, 0x67, 0xba, - 0x0e, 0xef, 0x6a, 0x65, 0x46, 0x9c, 0xdd, 0x0c, 0xed, 0xb5, 0x9c, 0xf3, - 0xc6, 0xa8, 0x38, 0xb7, 0x6d, 0xaf, 0xb3, 0x5b, 0x3a, 0xe4, 0x06, 0x31, - 0x67, 0x8c, 0xeb, 0xd5, 0x8c, 0xfb, 0x66, 0xc1, 0xe3, 0x46, 0x67, 0x71, - 0x2b, 0xd7, 0xf1, 0xdc, 0x9a, 0x0a, 0x21, 0x97, 0xd8, 0x9d, 0xce, 0x09, - 0xbb, 0xe9, 0xac, 0xdd, 0x29, 0xd6, 0xde, 0x58, 0x77, 0x96, 0xcd, 0x72, - 0xb5, 0x5c, 0x4c, 0x70, 0x3d, 0x9a, 0xde, 0xb3, 0x84, 0xa6, 0xb5, 0xba, - 0x84, 0xdc, 0xb5, 0x62, 0xe3, 0x3b, 0x2a, 0xba, 0x34, 0x2e, 0xee, 0x21, - 0xbb, 0xe7, 0xb5, 0x0e, 0xfd, 0xaa, 0xba, 0xb7, 0x5c, 0x3c, 0x53, 0x4f, - 0xbf, 0x4d, 0xff, 0x4b, 0xe8, 0x77, 0x15, 0xf4, 0xe3, 0x77, 0x03, 0xef, - 0xef, 0x8a, 0x7a, 0xc0, 0xb9, 0x52, 0xe4, 0x78, 0x9e, 0x38, 0x4e, 0x88, - 0xcc, 0x2e, 0x50, 0x0f, 0xe8, 0xc8, 0xff, 0xeb, 0xe2, 0xde, 0x9d, 0x60, - 0xfa, 0xb2, 0x7d, 0x8f, 0xbc, 0x70, 0x99, 0xd8, 0xc6, 0xdf, 0x8d, 0x7d, - 0x94, 0xcb, 0x2f, 0xc5, 0x5c, 0xfa, 0xb3, 0xee, 0x73, 0x9d, 0xaa, 0x76, - 0x5f, 0x7b, 0x57, 0xed, 0x53, 0x1d, 0xf9, 0xcc, 0x34, 0x90, 0xcf, 0x8c, - 0xdc, 0xa3, 0x6f, 0xa6, 0x71, 0xbc, 0x9a, 0x9a, 0xfc, 0xef, 0x5e, 0xae, - 0x26, 0xb6, 0x8d, 0x22, 0x0a, 0xbf, 0xac, 0xd7, 0x4e, 0xe3, 0xa4, 0x61, - 0x93, 0x3a, 0xad, 0x69, 0xd2, 0x60, 0xc7, 0x4b, 0x12, 0x29, 0xa5, 0xa4, - 0x52, 0x55, 0x45, 0x60, 0xa9, 0x21, 0x4e, 0xda, 0x0a, 0x71, 0x70, 0x0b, - 0x48, 0x51, 0xc5, 0x21, 0x4d, 0xd3, 0x7b, 0x85, 0x84, 0x54, 0xa1, 0x8a, - 0x46, 0x4e, 0x02, 0x15, 0x4a, 0xe5, 0x0a, 0x96, 0x72, 0x41, 0xa2, 0xd8, - 0x8e, 0x02, 0x52, 0x2a, 0xf7, 0xca, 0x85, 0xba, 0xbf, 0x08, 0x89, 0x03, - 0x70, 0x06, 0x29, 0x2a, 0x3f, 0xe2, 0xc0, 0x8d, 0x1b, 0x54, 0x5d, 0xde, - 0x37, 0xb3, 0x63, 0xaf, 0x77, 0xd7, 0x8e, 0x03, 0x11, 0x07, 0x27, 0xbb, - 0xf6, 0xcc, 0xce, 0xec, 0xcc, 0x37, 0x6f, 0xbe, 0xf7, 0x37, 0xfd, 0xbe, - 0x78, 0x8d, 0x5a, 0xdb, 0x5b, 0xf3, 0x55, 0xec, 0xe7, 0xaf, 0x37, 0x18, - 0x57, 0xed, 0xba, 0xe4, 0xa9, 0xf5, 0xe3, 0x9a, 0x72, 0xd9, 0x1b, 0xf0, - 0xfe, 0xc7, 0x68, 0x51, 0xd8, 0x86, 0x94, 0xad, 0xee, 0xc5, 0x40, 0x9b, - 0xd9, 0xff, 0x33, 0x16, 0x03, 0x3e, 0x9b, 0x68, 0xad, 0x6d, 0x8a, 0xed, - 0x71, 0xd9, 0x16, 0xde, 0xda, 0xc2, 0xb6, 0x10, 0x3c, 0x16, 0xfd, 0x9e, - 0xb1, 0xa8, 0xc9, 0xea, 0xa1, 0x16, 0xed, 0x74, 0x88, 0x21, 0xbf, 0x9d, - 0x67, 0x6c, 0x05, 0xca, 0xce, 0x4f, 0x5d, 0x36, 0x3c, 0xe0, 0x73, 0xdc, - 0x59, 0xeb, 0xc0, 0x27, 0xb5, 0x9d, 0x1a, 0x51, 0xed, 0x01, 0x8f, 0xc9, - 0xc5, 0x45, 0x82, 0xbe, 0x86, 0x36, 0xe3, 0x82, 0xe3, 0xfa, 0x39, 0x14, - 0x8f, 0xf1, 0xfa, 0x1b, 0x88, 0xe5, 0x70, 0xda, 0x3f, 0xd9, 0x76, 0xae, - 0x9c, 0xe5, 0xbd, 0x42, 0xd4, 0x63, 0xbd, 0xef, 0x52, 0xdb, 0x82, 0xa8, - 0x27, 0xe3, 0x20, 0x1c, 0x1d, 0xd0, 0xe1, 0xe2, 0x8d, 0x74, 0x3f, 0xff, - 0x9e, 0x13, 0xcc, 0xdd, 0x7f, 0xdd, 0x1d, 0x36, 0x3f, 0x34, 0x64, 0xae, - 0xde, 0x56, 0xdc, 0x5d, 0xd9, 0x89, 0x06, 0x85, 0xaf, 0xc1, 0xad, 0x7b, - 0x41, 0x76, 0x5d, 0xe0, 0x3d, 0x7c, 0xa8, 0xba, 0x7f, 0xef, 0x84, 0x7d, - 0xe8, 0x99, 0x16, 0x62, 0x1d, 0x44, 0x8e, 0xe5, 0x2b, 0x53, 0xc8, 0x45, - 0xaa, 0xe6, 0xef, 0x78, 0xf3, 0x3c, 0x20, 0x3f, 0x55, 0x9e, 0x87, 0xca, - 0x23, 0xc5, 0x7b, 0x24, 0x02, 0xf2, 0x3c, 0xdc, 0x32, 0x18, 0xf5, 0xea, - 0xdf, 0xc3, 0x2d, 0x7f, 0x57, 0x1c, 0xf9, 0x5b, 0xf0, 0xd8, 0xe3, 0x97, - 0xf3, 0x6a, 0x2d, 0x20, 0xe7, 0x43, 0xf1, 0x94, 0xde, 0x00, 0x9e, 0x12, - 0x9c, 0xeb, 0xa1, 0xa5, 0x2f, 0xf2, 0x5e, 0x7e, 0x08, 0x7b, 0xb9, 0x51, - 0x8b, 0xe9, 0x95, 0x72, 0xf0, 0xdc, 0x3a, 0x64, 0xa2, 0xca, 0xb9, 0x81, - 0x5c, 0x44, 0x2c, 0x3c, 0xe6, 0xba, 0xe4, 0x60, 0x11, 0xbf, 0xa9, 0x58, - 0x52, 0xa5, 0x47, 0xbd, 0x23, 0xf2, 0x0c, 0xbe, 0x1b, 0x3f, 0xcc, 0x1c, - 0x18, 0xf2, 0x13, 0x76, 0xa6, 0x43, 0x0e, 0x1f, 0xbe, 0xcc, 0xbf, 0x8d, - 0x39, 0xd7, 0x92, 0x8b, 0xca, 0x6b, 0xa5, 0x4b, 0xfd, 0xd0, 0x41, 0xe6, - 0x6f, 0x0e, 0x2f, 0xad, 0xb3, 0x41, 0xc4, 0x53, 0xda, 0xdb, 0x74, 0xa1, - 0xd8, 0x0c, 0x83, 0xf5, 0xf8, 0x4b, 0x79, 0x38, 0x4f, 0x42, 0x70, 0x9e, - 0x9f, 0x3a, 0xc2, 0xe6, 0x44, 0x4f, 0xb3, 0x38, 0x9c, 0x53, 0x55, 0xfc, - 0xa9, 0x72, 0xaa, 0x6f, 0x8f, 0x3a, 0x10, 0xa7, 0xe6, 0xc7, 0x04, 0xe6, - 0x1f, 0xfa, 0x9c, 0x5a, 0x87, 0xd0, 0xeb, 0x10, 0xf3, 0x87, 0x76, 0x8d, - 0x06, 0x6b, 0xb0, 0x66, 0x13, 0x2f, 0x50, 0x2b, 0xb1, 0x7f, 0xc9, 0xd1, - 0x0a, 0x9d, 0xed, 0x69, 0xa6, 0xf3, 0x9e, 0x08, 0xd4, 0x79, 0x83, 0x72, - 0xa4, 0xcc, 0x80, 0x1c, 0x29, 0x37, 0x0e, 0x75, 0x17, 0x0e, 0xe3, 0x2e, - 0x2e, 0x30, 0xc0, 0xdc, 0xb9, 0x8b, 0xf1, 0x04, 0xee, 0x1c, 0xa5, 0xd0, - 0x07, 0x6e, 0xee, 0xec, 0xf7, 0x13, 0x49, 0x5c, 0xfe, 0xdb, 0xdc, 0xa9, - 0xa0, 0x7e, 0x27, 0x7c, 0xfd, 0x86, 0x1c, 0x9f, 0x6c, 0xc8, 0x13, 0x82, - 0x38, 0xfe, 0x4e, 0xf7, 0xd3, 0xbb, 0xf6, 0xd1, 0xa6, 0x09, 0xfd, 0x70, - 0x74, 0xb1, 0xba, 0xee, 0x5f, 0xf0, 0xd9, 0xb9, 0xc1, 0x67, 0x43, 0xc2, - 0x27, 0xd7, 0x25, 0xf6, 0x90, 0x9d, 0x93, 0x61, 0x9d, 0x1e, 0x19, 0x66, - 0xf7, 0xd4, 0xec, 0xfc, 0x88, 0x21, 0xec, 0x73, 0x74, 0x0e, 0xb9, 0xef, - 0x14, 0x1a, 0xc6, 0xa5, 0xe2, 0x3b, 0xe9, 0x1b, 0x38, 0x77, 0x04, 0xb2, - 0x1b, 0xf2, 0xfc, 0xf4, 0x6c, 0xd8, 0x34, 0x1c, 0x1f, 0x03, 0xfc, 0x08, - 0xc0, 0xa9, 0x7a, 0x7e, 0x90, 0x0d, 0x3d, 0x68, 0x0e, 0x87, 0x7c, 0x73, - 0x28, 0xf1, 0x06, 0x6e, 0x8f, 0x58, 0xbc, 0x83, 0x9e, 0x38, 0xc5, 0x9d, - 0x18, 0x93, 0xee, 0x80, 0x78, 0x41, 0xc4, 0xfa, 0xf9, 0xfa, 0xcb, 0xef, - 0x7c, 0x51, 0xf3, 0xaf, 0xad, 0x49, 0x6d, 0xba, 0x3c, 0xad, 0x4d, 0x15, - 0x51, 0xee, 0xa2, 0x56, 0xdb, 0x97, 0x36, 0x5d, 0x1c, 0x11, 0x7c, 0x30, - 0x79, 0xad, 0x42, 0x78, 0x4f, 0xdb, 0xbe, 0x25, 0xb8, 0xed, 0x80, 0x0f, - 0xab, 0x8a, 0x73, 0x18, 0x2d, 0xbc, 0x97, 0xb4, 0xbd, 0xb8, 0xb9, 0x8e, - 0x5b, 0xbe, 0x3f, 0x1d, 0x20, 0xdf, 0x9b, 0xd9, 0x0a, 0x91, 0xbf, 0x29, - 0xe2, 0xb2, 0xa9, 0x68, 0x21, 0xde, 0xf1, 0x30, 0xe2, 0x7b, 0xe1, 0xd7, - 0xa8, 0x62, 0xe1, 0x6e, 0x30, 0x16, 0xaa, 0xf6, 0x60, 0x1d, 0xb9, 0xa3, - 0x2c, 0x8b, 0xc3, 0xe9, 0x5e, 0x0a, 0x99, 0x28, 0xff, 0x6c, 0xe2, 0x3e, - 0x1d, 0x73, 0x78, 0x09, 0xfc, 0x3c, 0xb2, 0xde, 0x4c, 0x0b, 0x76, 0xe1, - 0x60, 0x7f, 0x46, 0x84, 0x65, 0xf3, 0x67, 0xbd, 0xad, 0xf9, 0x33, 0x54, - 0x39, 0xd4, 0xed, 0xa2, 0x35, 0x0b, 0x71, 0x92, 0xf0, 0x2f, 0x75, 0x77, - 0xb4, 0x9b, 0x41, 0xf2, 0x4f, 0xc5, 0x7e, 0x82, 0x1f, 0xc9, 0xb9, 0xba, - 0x41, 0x98, 0x3b, 0x9b, 0xbe, 0x6f, 0x30, 0x57, 0xdb, 0xb1, 0x29, 0x37, - 0x9f, 0x2b, 0xc3, 0x33, 0x57, 0xd8, 0x8b, 0x9a, 0xcd, 0x95, 0xf2, 0x43, - 0x2a, 0xdf, 0xdc, 0x51, 0xc8, 0x93, 0x45, 0xf7, 0x5c, 0xed, 0x8c, 0x7f, - 0x4e, 0xce, 0xd9, 0x4e, 0xfb, 0xe0, 0x1a, 0x8f, 0x43, 0x34, 0xd0, 0x76, - 0x12, 0x2c, 0x33, 0xfc, 0x6b, 0xeb, 0x86, 0x5c, 0x5b, 0xcc, 0x2b, 0x9e, - 0x6f, 0xb8, 0xb6, 0xb0, 0x0f, 0x5c, 0x70, 0xf6, 0x81, 0xd3, 0x3e, 0x7d, - 0x51, 0xd9, 0xbc, 0xff, 0xab, 0xed, 0x0d, 0xcf, 0x7d, 0x22, 0xce, 0xe9, - 0xc8, 0x91, 0xdc, 0x47, 0xce, 0x37, 0xe4, 0x61, 0x3d, 0xdb, 0x5c, 0xa7, - 0x6a, 0xee, 0x91, 0x73, 0x01, 0x79, 0x99, 0xa5, 0xf3, 0xf9, 0xc7, 0x06, - 0x75, 0xf7, 0x53, 0xa4, 0x1a, 0xd3, 0x72, 0x40, 0xf0, 0x61, 0xb7, 0xbe, - 0xbc, 0xec, 0xe4, 0x28, 0xe6, 0x5c, 0x63, 0xb0, 0x9c, 0xcf, 0x36, 0x89, - 0xa7, 0x6f, 0x25, 0x9e, 0x63, 0xc0, 0x23, 0x37, 0xbd, 0x73, 0x35, 0xa1, - 0x65, 0xf2, 0xa8, 0xb3, 0x87, 0xce, 0xea, 0x9f, 0xf0, 0x18, 0x3d, 0xb1, - 0x23, 0xe2, 0x9c, 0x11, 0xe0, 0xd2, 0xb6, 0x97, 0xcd, 0x0e, 0x5a, 0x94, - 0x7e, 0x46, 0x9a, 0xfa, 0xf8, 0x12, 0x15, 0x85, 0x7f, 0x0b, 0xb9, 0x51, - 0xb0, 0x71, 0xc3, 0x47, 0x87, 0xe7, 0xf0, 0xf7, 0x1b, 0x13, 0x8e, 0xcc, - 0xfd, 0x93, 0x31, 0x8c, 0x7a, 0x38, 0x0b, 0x01, 0xeb, 0x9d, 0x34, 0xc9, - 0x31, 0xb9, 0x1d, 0x71, 0x4e, 0x80, 0x8c, 0xcd, 0xbb, 0x5d, 0xde, 0x8e, - 0x4f, 0xa1, 0x55, 0xbd, 0xe4, 0xeb, 0x68, 0xd8, 0xfc, 0x72, 0xcf, 0xf6, - 0x7d, 0x0a, 0x2a, 0x77, 0x5f, 0x71, 0x58, 0x75, 0x2d, 0x73, 0x69, 0xc1, - 0x99, 0xe7, 0xd7, 0x55, 0xde, 0x6d, 0x77, 0x40, 0xde, 0x6d, 0x88, 0xe6, - 0x84, 0xaf, 0x2e, 0x44, 0x39, 0x47, 0x37, 0x93, 0x9c, 0x5a, 0xd9, 0x6a, - 0x23, 0x4e, 0xfc, 0x29, 0xee, 0xdd, 0x39, 0xf9, 0x7c, 0x5f, 0x04, 0xcf, - 0x46, 0x4e, 0xb5, 0x2d, 0x62, 0xf1, 0x33, 0xa2, 0x5c, 0xa7, 0xa7, 0x1c, - 0xdf, 0x17, 0xd5, 0x33, 0x3b, 0xb9, 0x7c, 0x8a, 0x64, 0x0e, 0x7d, 0x27, - 0xcd, 0x15, 0x9b, 0xf5, 0x6b, 0x1f, 0xe2, 0x81, 0xe3, 0xf0, 0x95, 0x0a, - 0xbf, 0x95, 0xa1, 0xfa, 0x80, 0x3e, 0xb5, 0x57, 0xfb, 0x04, 0xf9, 0x14, - 0x12, 0x7e, 0x05, 0xbe, 0x76, 0xda, 0x99, 0x23, 0x77, 0xbf, 0xc2, 0xdc, - 0x2f, 0x3c, 0xa7, 0xd3, 0x55, 0xb6, 0xd3, 0x55, 0xb6, 0x36, 0x5e, 0x3a, - 0xeb, 0x54, 0x0b, 0xe5, 0x1f, 0x59, 0x2f, 0xfd, 0x56, 0xd8, 0xe6, 0xe6, - 0xb3, 0x06, 0x2d, 0xac, 0xf7, 0xf2, 0x27, 0xc6, 0x1f, 0x94, 0xdb, 0xcb, - 0xff, 0xdd, 0x9c, 0xa2, 0x5f, 0xc4, 0x02, 0xb6, 0xce, 0x07, 0x83, 0xf1, - 0x1f, 0xbc, 0x6e, 0x13, 0x01, 0xeb, 0xb6, 0xf9, 0xbe, 0x22, 0xf7, 0x93, - 0xe4, 0x95, 0x8a, 0x23, 0xaf, 0x36, 0x69, 0xd0, 0x27, 0xa7, 0x82, 0xd6, - 0x29, 0xfa, 0x78, 0xca, 0xe9, 0xe3, 0x9b, 0xa2, 0x3f, 0xe3, 0x54, 0xa8, - 0xe6, 0x0d, 0x1f, 0xe1, 0xeb, 0x98, 0xb2, 0xd1, 0x35, 0x90, 0xab, 0xdf, - 0x6c, 0x43, 0xc6, 0x04, 0x71, 0xb2, 0x03, 0x01, 0xfa, 0x80, 0xee, 0xd2, - 0x07, 0xe2, 0x55, 0x7d, 0x60, 0x45, 0xe8, 0x09, 0xbb, 0x1c, 0x1d, 0x34, - 0xd8, 0x16, 0x97, 0xcb, 0xe3, 0xcc, 0x1b, 0xd8, 0xf8, 0xa4, 0x1d, 0x7d, - 0xda, 0xaa, 0x9e, 0x99, 0xc3, 0xba, 0x65, 0x8d, 0x4b, 0xfb, 0xe5, 0x09, - 0xce, 0xac, 0xa8, 0xcc, 0x3e, 0x30, 0xa3, 0xa4, 0xa5, 0x93, 0xf1, 0xa9, - 0x50, 0x84, 0x16, 0xac, 0x28, 0x15, 0xac, 0x14, 0x73, 0x70, 0xf0, 0xe3, - 0xd0, 0x80, 0x46, 0x11, 0x96, 0x35, 0x11, 0x2a, 0x95, 0x94, 0x4e, 0x76, - 0x86, 0xc8, 0x2c, 0xc6, 0xa4, 0x0d, 0x9b, 0x71, 0x9a, 0x1f, 0x33, 0xe6, - 0x49, 0x43, 0xcc, 0x8b, 0x93, 0xa3, 0x0e, 0x0c, 0x8a, 0x38, 0x4b, 0xfd, - 0xe5, 0x91, 0x28, 0xb5, 0xa7, 0xa5, 0xcd, 0x68, 0x86, 0xdb, 0xf8, 0xc2, - 0x8a, 0xd1, 0x95, 0x7c, 0xd2, 0x38, 0xc1, 0xed, 0x64, 0xac, 0x64, 0x62, - 0x92, 0x9f, 0x5d, 0x2c, 0x45, 0x28, 0x67, 0x45, 0xa8, 0x50, 0x4a, 0x19, - 0x43, 0x6d, 0xa2, 0xcd, 0x18, 0xda, 0x7c, 0x49, 0x1f, 0x33, 0x4e, 0x92, - 0xbb, 0xcd, 0xaf, 0x9c, 0x36, 0xbd, 0x6d, 0xfd, 0x61, 0xe3, 0xfe, 0x44, - 0xa8, 0x32, 0x7b, 0x9f, 0xf1, 0x92, 0x5b, 0x9d, 0x60, 0xd9, 0x14, 0x13, - 0x67, 0xdb, 0x68, 0xe9, 0x34, 0xcb, 0x1d, 0x9c, 0x6d, 0x61, 0xd0, 0x62, - 0x39, 0x4e, 0xef, 0x57, 0xed, 0x07, 0x12, 0x43, 0x39, 0x91, 0x43, 0x84, - 0x33, 0x17, 0x2a, 0xb3, 0xbf, 0x9b, 0x5e, 0x7f, 0x3f, 0xeb, 0x5b, 0x1f, - 0xc5, 0x28, 0x72, 0x15, 0x71, 0xdd, 0x36, 0x5d, 0x1b, 0x4f, 0x5e, 0xd9, - 0x14, 0x79, 0x68, 0x09, 0x5a, 0x33, 0xa5, 0x3c, 0xcd, 0x71, 0xf9, 0x15, - 0x94, 0x5b, 0x4b, 0xd0, 0x3d, 0x91, 0x8f, 0xd6, 0x4e, 0x77, 0xf4, 0x18, - 0x85, 0x6e, 0x9a, 0xc6, 0xbc, 0xf0, 0x0b, 0x57, 0x66, 0x87, 0x86, 0x0d, - 0xd2, 0xae, 0xa2, 0x1e, 0xff, 0xbf, 0x89, 0xfb, 0x28, 0x61, 0x7e, 0x66, - 0xac, 0x31, 0x5e, 0x49, 0xc3, 0xf1, 0x12, 0x64, 0xf3, 0x41, 0x89, 0xa5, - 0x39, 0x23, 0x42, 0xd0, 0x5f, 0x61, 0x7b, 0xeb, 0x35, 0x27, 0x7b, 0xa4, - 0xfe, 0xe4, 0x3b, 0x9b, 0x43, 0x9f, 0x19, 0x71, 0x9f, 0xcf, 0x51, 0x7b, - 0x66, 0xc6, 0x92, 0xef, 0xb9, 0x52, 0xee, 0xa5, 0x25, 0x6e, 0x7b, 0x64, - 0xf8, 0x8c, 0x73, 0xa6, 0x0f, 0xff, 0xd9, 0x8b, 0x7b, 0x85, 0xb7, 0x7d, - 0x7d, 0x14, 0xc5, 0x3d, 0x0d, 0xe8, 0x3c, 0xc7, 0xb0, 0xe9, 0x87, 0xc5, - 0xb8, 0xa7, 0xe2, 0x98, 0xcb, 0xb9, 0xb8, 0x3a, 0x97, 0x08, 0x65, 0xba, - 0xe9, 0x91, 0xd5, 0x45, 0x3f, 0x8b, 0xf3, 0x47, 0xf8, 0xba, 0x84, 0x9c, - 0xa3, 0x36, 0xca, 0x64, 0xbb, 0x69, 0xb3, 0x14, 0x66, 0x71, 0x05, 0xec, - 0x44, 0xb9, 0x4c, 0x81, 0xa6, 0xd6, 0x5f, 0xeb, 0x83, 0x1f, 0x66, 0x52, - 0xab, 0x61, 0xe9, 0x51, 0x00, 0x96, 0x7e, 0xa9, 0xc3, 0xd2, 0xd1, 0xbe, - 0xe6, 0x58, 0xea, 0x77, 0x62, 0xd6, 0xa3, 0x14, 0x71, 0x70, 0xf4, 0x39, - 0xe3, 0xe8, 0x3d, 0xc6, 0xd1, 0xf1, 0x06, 0x38, 0xd2, 0x3c, 0x38, 0x3a, - 0x51, 0x87, 0xa3, 0x6c, 0x5f, 0x33, 0x1c, 0x1d, 0x0f, 0xa1, 0xff, 0xcd, - 0xd6, 0x32, 0xfa, 0xb0, 0x9f, 0x39, 0xbd, 0x49, 0xa5, 0xd5, 0xe4, 0xf8, - 0x24, 0x55, 0x90, 0x73, 0x92, 0x58, 0xa2, 0xb4, 0xe0, 0x76, 0x05, 0x81, - 0xbf, 0x2c, 0x8f, 0xc9, 0xae, 0x06, 0xe7, 0xaa, 0x24, 0x9c, 0x79, 0x93, - 0x73, 0x99, 0xc9, 0x57, 0x66, 0x1f, 0x32, 0x36, 0xee, 0x6d, 0xe8, 0x3a, - 0x7e, 0x0b, 0xb1, 0x8c, 0xbc, 0xbb, 0x81, 0x73, 0x5b, 0xe2, 0x74, 0xdf, - 0x1a, 0xa0, 0x7b, 0xd6, 0x7e, 0xba, 0x6b, 0x0d, 0xd2, 0x03, 0x0b, 0x6d, - 0x60, 0x0e, 0xf8, 0x5e, 0xcc, 0x81, 0x46, 0x33, 0x31, 0x2e, 0x53, 0xda, - 0x4f, 0x95, 0x92, 0xc2, 0x35, 0xb0, 0x03, 0x0c, 0x35, 0xc6, 0x4e, 0xa6, - 0x0e, 0x3b, 0xb2, 0x0e, 0x30, 0xb3, 0xe4, 0xb7, 0xad, 0xed, 0x32, 0xf8, - 0x5d, 0x0d, 0xc6, 0x56, 0x58, 0xc4, 0x91, 0x24, 0x47, 0x67, 0x42, 0x90, - 0x59, 0xb7, 0x18, 0x53, 0x3c, 0x17, 0x3c, 0x7e, 0xda, 0xf5, 0x41, 0x96, - 0x39, 0x4f, 0x09, 0x1b, 0xf4, 0x94, 0xa9, 0xc7, 0x33, 0x64, 0x5f, 0xd6, - 0xcc, 0x31, 0x91, 0xeb, 0xb6, 0x54, 0xf6, 0x9e, 0x31, 0x91, 0xe1, 0xb1, - 0x57, 0x78, 0xf4, 0xca, 0xa1, 0x76, 0xaa, 0x38, 0x31, 0x4c, 0x85, 0x55, - 0xdb, 0x7e, 0xc8, 0xfc, 0x7f, 0xcd, 0x84, 0xcc, 0xfe, 0xdb, 0xae, 0xc4, - 0x74, 0x5a, 0x36, 0x55, 0xdf, 0xee, 0x08, 0x7c, 0x31, 0x47, 0xa4, 0x77, - 0x37, 0xaa, 0xaf, 0xc4, 0xbf, 0xe3, 0xbb, 0xbf, 0x04, 0x97, 0x59, 0xab, - 0x96, 0x85, 0xed, 0xf8, 0xd2, 0xd8, 0xc2, 0x2a, 0xce, 0x7e, 0x7b, 0xfc, - 0xea, 0xf9, 0xd5, 0x5c, 0x1f, 0x4b, 0xd8, 0x94, 0x4e, 0x76, 0x68, 0x79, - 0x3c, 0xf7, 0x5c, 0x98, 0x86, 0x19, 0x97, 0x38, 0x83, 0x6b, 0x6c, 0x34, - 0x2c, 0xce, 0x38, 0xd9, 0xcd, 0x78, 0xc8, 0x0a, 0x3b, 0xfd, 0xd4, 0x91, - 0x09, 0x9a, 0x2c, 0xa7, 0xf9, 0x53, 0x3f, 0x7e, 0xb5, 0xb9, 0xe3, 0xe1, - 0x48, 0xe3, 0x37, 0x37, 0xff, 0xa8, 0xd5, 0x9d, 0xe6, 0xba, 0x33, 0x5b, - 0xd6, 0x55, 0xe7, 0x12, 0xfd, 0x03, 0x69, 0xae, 0x1b, 0xa3, 0xbc, 0x57, - 0x00, 0x00, 0x00 }; +static u32 bnx2_COM_b06FwText[(0x57bc/4) + 1] = { + 0x0a00022d, 0x00000000, 0x00000000, 0x0000000d, 0x636f6d20, 0x322e352e, + 0x38000000, 0x02050802, 0x00000000, 0x00000003, 0x00000014, 0x00000032, + 0x00000003, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000010, 0x000003e8, 0x0000ea60, 0x00000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000ffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000002, 0x00000020, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c020800, 0x24425840, + 0x3c030800, 0x246358e8, 0xac400000, 0x0043202b, 0x1480fffd, 0x24420004, + 0x3c1d0800, 0x37bd7ffc, 0x03a0f021, 0x3c100800, 0x261008b4, 0x3c1c0800, + 0x279c5840, 0x0e0002f7, 0x00000000, 0x0000000d, 0x27bdffe8, 0x3c1a8000, + 0x3c020008, 0x0342d825, 0x3c036010, 0xafbf0010, 0x8c655000, 0x3c020800, + 0x24470f30, 0x3c040800, 0x24865860, 0x2402ff7f, 0x00a22824, 0x34a5380c, + 0xac655000, 0x00002821, 0x24020037, 0x24030c80, 0xaf420008, 0xaf430024, + 0xacc70000, 0x24a50001, 0x2ca20016, 0x1440fffc, 0x24c60004, 0x24845860, + 0x3c020800, 0x24420f3c, 0x3c030800, 0x24630e2c, 0xac820004, 0x3c020800, + 0x24420a2c, 0x3c050800, 0x24a51268, 0xac82000c, 0x3c020800, 0x244243dc, + 0xac830008, 0x3c030800, 0x24633698, 0xac820014, 0x3c020800, 0x24423c24, + 0xac830018, 0xac83001c, 0x3c030800, 0x24630f44, 0xac820024, 0x3c020800, + 0x244243ac, 0xac83002c, 0x3c030800, 0x246343cc, 0xac820030, 0x3c020800, + 0x244242f0, 0xac830034, 0x3c030800, 0x24633d78, 0xac82003c, 0x3c020800, + 0x24420fd4, 0xac850010, 0xac850020, 0xac830040, 0x0e0010b7, 0xac820050, + 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x27bdffe0, 0xafb00010, 0x27500100, + 0xafbf0018, 0xafb10014, 0x9203000b, 0x24020003, 0x1462005b, 0x96110008, + 0x32220001, 0x10400009, 0x27430080, 0x8e020000, 0x96040014, 0x000211c2, + 0x00021040, 0x00621821, 0xa4640000, 0x0a0002d0, 0x3c020800, 0x3c020800, + 0x8c430020, 0x1060002a, 0x3c030800, 0x0e00148e, 0x00000000, 0x97420108, + 0x8f850018, 0x9743010c, 0x3042003e, 0x00021400, 0x00621825, 0xaca30000, + 0x8f840018, 0x8f420100, 0xac820004, 0x97430116, 0x9742010e, 0x8f840018, + 0x00031c00, 0x00431025, 0xac820008, 0x97430110, 0x97440112, 0x8f850018, + 0x00031c00, 0x00832025, 0xaca4000c, 0x97420114, 0x8f840018, 0x3042ffff, + 0xac820010, 0x8f830018, 0xac600014, 0x8f820018, 0x3c030800, 0xac400018, + 0x946258ce, 0x8f840018, 0x3c032000, 0x00431025, 0xac82001c, 0x0e0014cc, + 0x24040001, 0x3c030800, 0x8c620040, 0x24420001, 0xac620040, 0x3c020800, + 0x8c430044, 0x32240004, 0x24630001, 0x10800017, 0xac430044, 0x8f4202b8, + 0x04430007, 0x8e020020, 0x3c040800, 0x8c830060, 0x24020001, 0x24630001, + 0x0a0002f2, 0xac830060, 0x3c060800, 0x8cc4005c, 0xaf420280, 0x96030016, + 0x00001021, 0xa7430284, 0x8e050004, 0x24840001, 0x3c031000, 0xaf450288, + 0xaf4302b8, 0x0a0002f2, 0xacc4005c, 0x32220002, 0x0a0002f2, 0x0002102b, + 0x3c026000, 0xac400808, 0x0000000d, 0x00001021, 0x8fbf0018, 0x8fb10014, + 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffc8, 0xafbf0034, 0xafbe0030, + 0xafb7002c, 0xafb60028, 0xafb50024, 0xafb40020, 0xafb3001c, 0xafb20018, + 0xafb10014, 0x0e000244, 0xafb00010, 0x3c170800, 0x3c160800, 0x24110020, + 0x24150030, 0x2794000c, 0x27930008, 0x3c124000, 0x3c1e0800, 0x8f820004, + 0x3c040800, 0x8c830020, 0x10430005, 0x8ee200a4, 0xaf830004, 0x0e001593, + 0x00000000, 0x8ee200a4, 0x8ec300a0, 0x10430004, 0x26c400a0, 0x94820002, + 0xa742009e, 0xaee300a4, 0x8f500000, 0x32020007, 0x1040ffee, 0x32020001, + 0x1040002c, 0x32020002, 0x8f420100, 0xaf420020, 0x8f430104, 0xaf4300a8, + 0x9342010b, 0x93630000, 0x306300ff, 0x10710005, 0x304400ff, 0x10750006, + 0x2c820016, 0x0a000333, 0x00000000, 0xaf940000, 0x0a000334, 0x2c820016, + 0xaf930000, 0x0a000334, 0x00000000, 0xaf800000, 0x14400005, 0x00041880, + 0x0e0003cc, 0x00000000, 0x0a000340, 0x00000000, 0x3c020800, 0x24425860, + 0x00621821, 0x8c620000, 0x0040f809, 0x00000000, 0x10400005, 0x3c030800, + 0x8f420104, 0x3c016020, 0xac220014, 0x3c030800, 0x8c620034, 0xaf520138, + 0x24420001, 0xac620034, 0x32020002, 0x1040001a, 0x32020004, 0x8f420140, + 0xaf420020, 0x93630000, 0x306300ff, 0x10710005, 0x00000000, 0x10750006, + 0x00000000, 0x0a00035d, 0x00000000, 0xaf940000, 0x0a00035e, 0x00000000, + 0xaf930000, 0x0a00035e, 0x00000000, 0xaf800000, 0x0e000c7b, 0x00000000, + 0x3c040800, 0x8c820038, 0xaf520178, 0x24420001, 0xac820038, 0x32020004, + 0x1040ffa4, 0x00000000, 0x8f420180, 0xaf420020, 0x93630000, 0x306300ff, + 0x10710005, 0x00000000, 0x10750006, 0x00000000, 0x0a000378, 0x00000000, + 0xaf940000, 0x0a000379, 0x00000000, 0xaf930000, 0x0a000379, 0x00000000, + 0xaf800000, 0x8f430180, 0x24020f00, 0x14620005, 0x00000000, 0x8f420188, + 0xa742009c, 0x0a000387, 0x8fc2003c, 0x93620000, 0x14510004, 0x8fc2003c, + 0x0e000bad, 0x00000000, 0x8fc2003c, 0xaf5201b8, 0x24420001, 0x0a00030b, + 0xafc2003c, 0x27bdffe8, 0xafbf0010, 0x97420108, 0x24033000, 0x30447000, + 0x10830016, 0x28823001, 0x10400007, 0x24024000, 0x1080000b, 0x24022000, + 0x1082000c, 0x00000000, 0x0a0003b3, 0x00000000, 0x10820010, 0x24025000, + 0x10820012, 0x00000000, 0x0a0003b3, 0x00000000, 0x0000000d, 0x0a0003b5, + 0x00001021, 0x0e000442, 0x00000000, 0x0a0003b6, 0x8fbf0010, 0x0e00041a, + 0x00000000, 0x0a0003b5, 0x00001021, 0x0e000669, 0x00000000, 0x0a0003b5, + 0x00001021, 0x0e001467, 0x00000000, 0x0a0003b5, 0x00001021, 0x0000000d, + 0x00001021, 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x93620000, 0x24030020, + 0x304400ff, 0x10830005, 0x24020030, 0x10820007, 0x00000000, 0x0a0003c9, + 0x00000000, 0x2782000c, 0xaf820000, 0x03e00008, 0x00000000, 0x27820008, + 0xaf820000, 0x03e00008, 0x00000000, 0xaf800000, 0x03e00008, 0x00000000, + 0x0000000d, 0x03e00008, 0x00001021, 0x03e00008, 0x00001021, 0x27440100, + 0x94830008, 0x30620004, 0x10400017, 0x30620002, 0x8f4202b8, 0x04430007, + 0x8c820020, 0x3c040800, 0x8c830060, 0x24020001, 0x24630001, 0x03e00008, + 0xac830060, 0xaf420280, 0x94830016, 0x3c060800, 0xa7430284, 0x8c850004, + 0x8cc4005c, 0x00001021, 0x3c031000, 0x24840001, 0xaf450288, 0xaf4302b8, + 0x03e00008, 0xacc4005c, 0x14400003, 0x3c040800, 0x03e00008, 0x00001021, + 0x8c830084, 0x24020001, 0x24630001, 0x03e00008, 0xac830084, 0x27450100, + 0x3c040800, 0x8c820088, 0x94a3000c, 0x24420001, 0x007a1821, 0xac820088, + 0x8ca40018, 0x90664000, 0xaf440038, 0x8ca2001c, 0x2403fff8, 0x00063600, + 0x00431024, 0x34420004, 0x3c030005, 0xaf42003c, 0xaf430030, 0x00000000, + 0x00000000, 0x00000000, 0xaf460404, 0x00000000, 0x00000000, 0x00000000, + 0x3c020006, 0x34420001, 0xaf420030, 0x00000000, 0x00000000, 0x00000000, + 0x8f420000, 0x30420010, 0x1040fffd, 0x00001021, 0x03e00008, 0x00000000, + 0x3c020800, 0x8c430020, 0x27bdffe8, 0xafb00010, 0x27500100, 0x1060001e, + 0xafbf0014, 0x0e00148e, 0x00000000, 0x8f830018, 0x8e020018, 0xac620000, + 0x8f840018, 0x9602000c, 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, + 0xac40000c, 0x8f830018, 0xac600010, 0x8f820018, 0xac400014, 0x8f840018, + 0x3c026000, 0x8c434448, 0xac830018, 0x96020008, 0x3c030800, 0x946458ce, + 0x8f850018, 0x00021400, 0x00441025, 0x24040001, 0x0e0014cc, 0xaca2001c, + 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x27bdffe8, 0xafb00010, + 0x27500100, 0xafbf0014, 0x92020009, 0x14400003, 0x3c020800, 0x0a00046c, + 0x24020001, 0x8c430020, 0x1060001f, 0x00001021, 0x0e00148e, 0x00000000, + 0x8f830018, 0x8e020018, 0xac620000, 0x8f840018, 0x9602000c, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f820018, 0xac400014, 0x8f840018, 0x3c026000, 0x8c434448, 0xac830018, + 0x96020008, 0x3c030800, 0x946458ce, 0x8f850018, 0x00021400, 0x00441025, + 0x24040001, 0x0e0014cc, 0xaca2001c, 0x00001021, 0x8fbf0014, 0x8fb00010, + 0x03e00008, 0x27bd0018, 0x3c0b0800, 0x8d6808b0, 0x3c070800, 0x24e700b0, + 0x00084900, 0x01271821, 0xac640000, 0x93620005, 0x97660008, 0x00e95021, + 0x93630023, 0x9364003f, 0x25080001, 0x00021600, 0x00063400, 0x00461025, + 0x00031a00, 0x00431025, 0x00822025, 0xad440004, 0x9362007e, 0x9366007f, + 0x8f630178, 0x9364007a, 0x00021600, 0x00063400, 0x00461025, 0x00031a00, + 0x00431025, 0x00822025, 0xad440008, 0x93620080, 0x9363007d, 0x3108007f, + 0x01403821, 0xad6808b0, 0x00021600, 0x00031c00, 0x00431025, 0x00451025, + 0x03e00008, 0xace2000c, 0x27bdffb8, 0xafb3002c, 0x00009821, 0xafbe0040, + 0x0000f021, 0xafb50034, 0x27550100, 0xafbf0044, 0xafb7003c, 0xafb60038, + 0xafb40030, 0xafb20028, 0xafb10024, 0xafb00020, 0xafa00010, 0xafa00014, + 0x96a20008, 0x8f540100, 0x8eb10018, 0x30420001, 0x10400037, 0x02a0b821, + 0x8f630054, 0x2622ffff, 0x00431023, 0x18400006, 0x00000000, 0x0000000d, + 0x00000000, 0x2400015c, 0x0a0004e5, 0x00002021, 0x8f62004c, 0x02221023, + 0x18400028, 0x00002021, 0x93650120, 0x93640121, 0x3c030800, 0x8c62008c, + 0x308400ff, 0x24420001, 0x30a500ff, 0x00803821, 0x1485000b, 0xac62008c, + 0x3c040800, 0x8c830090, 0x24630001, 0xac830090, 0x93620122, 0x30420001, + 0x00021023, 0x30420005, 0x0a0004e5, 0x34440004, 0x27660100, 0x00041080, + 0x00c21021, 0x8c430000, 0x02231823, 0x04600004, 0x24820001, 0x30440007, + 0x1485fff9, 0x00041080, 0x10870007, 0x3c030800, 0xa3640121, 0x8c620094, + 0x24040005, 0x24420001, 0x0a0004e5, 0xac620094, 0x24040004, 0x00809821, + 0x9362003f, 0x304400ff, 0x38830016, 0x2c630001, 0x38820010, 0x2c420001, + 0x00621825, 0x1460000c, 0x24020001, 0x38830008, 0x2c630001, 0x38820014, + 0x2c420001, 0x00621825, 0x14600005, 0x24020001, 0x24020012, 0x14820002, + 0x00001021, 0x24020001, 0x10400009, 0x00000000, 0x8ea20020, 0x8f630040, + 0x0040b021, 0x00431023, 0x5c400010, 0x8f760040, 0x0a000511, 0x00000000, + 0x9343010b, 0x24020004, 0x1462000a, 0x8eb60020, 0x8f630040, 0x3c021000, + 0x00761823, 0x0043102a, 0x10400004, 0x00000000, 0x0000000d, 0x00000000, + 0x240002fa, 0x9343010b, 0x24020004, 0x5462000b, 0x96a20008, 0x24020001, + 0xafa20010, 0x96a20008, 0x24030001, 0xafa30018, 0x8eb2001c, 0x36730002, + 0x30420020, 0x0a000526, 0xafa20014, 0x36730080, 0x30420002, 0x10400003, + 0xafa00018, 0x0a000526, 0x8eb2001c, 0x8eb20014, 0x2402fffb, 0x02628024, + 0x1200002a, 0x3c030800, 0x8c620030, 0x02021024, 0x10400026, 0x3c020800, + 0x8c430020, 0x10600024, 0x32620004, 0x0e00148e, 0x00000000, 0x8f830018, + 0x8f420100, 0xac620000, 0x8f840018, 0x02401821, 0x32620002, 0xac900004, + 0x8f840018, 0x54400001, 0x02c01821, 0xac830008, 0x8f830018, 0x8ee20020, + 0xac62000c, 0x8f840018, 0x8f620040, 0xac820010, 0x8f830018, 0x8ee20018, + 0xac620014, 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, + 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024010, 0x00621825, 0x0e0014cc, + 0xaca3001c, 0x32620004, 0x10400063, 0x00003821, 0x3c029000, 0x34420001, + 0x3c038000, 0x02821025, 0xa360007c, 0xaf420020, 0x8f420020, 0x00431024, + 0x1440fffd, 0x00000000, 0x93620023, 0x30420080, 0x10400011, 0x00000000, + 0x8f65005c, 0x8f63004c, 0x9764003c, 0x8f620064, 0x00a32823, 0x00852821, + 0x00a2102b, 0x54400006, 0x3c023fff, 0x93620023, 0x3042007f, 0xa3620023, + 0xaf710064, 0x3c023fff, 0x0a000580, 0x3442ffff, 0x8f62005c, 0x02221023, + 0x04400011, 0x00000000, 0x8f65005c, 0x8f630064, 0x9764003c, 0x3c023fff, + 0x3442ffff, 0xaf710064, 0x00a32823, 0x00852821, 0x0045102b, 0x10400004, + 0x02251021, 0x3c053fff, 0x34a5ffff, 0x02251021, 0xaf62005c, 0x24070001, + 0xaf71004c, 0x8f620054, 0x16220005, 0x00000000, 0x93620023, 0x30420040, + 0x10400017, 0x24020001, 0x9762006a, 0x00022880, 0x50a00001, 0x24050001, + 0x97630068, 0x93640081, 0x3c020800, 0x8c46004c, 0x00652821, 0x00852804, + 0x00c5102b, 0x54400001, 0x00a03021, 0x3c020800, 0x8c440050, 0x00c4182b, + 0x54600001, 0x00c02021, 0x8f420074, 0x2403fffe, 0x00832824, 0x00a21021, + 0xaf62000c, 0x93620082, 0x30420080, 0x50400001, 0xa3600081, 0x3c028000, + 0x34420001, 0x02821025, 0xaf420020, 0x9363007e, 0x9362007a, 0x10620004, + 0x00000000, 0x0e0013c4, 0x00000000, 0x00403821, 0x54e00001, 0x241e0001, + 0x8f700040, 0x8f620040, 0x14520003, 0x00521023, 0x0a0005bf, 0x00001021, + 0x28420001, 0x10400041, 0x8fa20010, 0x0e000fae, 0x02402021, 0xaf720040, + 0x9362003e, 0x30420001, 0x1440000b, 0x3c029000, 0x93620022, 0x24420001, + 0xa3620022, 0x93630022, 0x3c020800, 0x8c440098, 0x0064182b, 0x14600027, + 0x3c020800, 0x3c029000, 0x34420001, 0x02821025, 0xaf420020, 0x3c038000, + 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, + 0x34420001, 0xa362007d, 0x8f640074, 0x34630001, 0x02831825, 0xaf430020, + 0x04810006, 0x3c038000, 0x02802021, 0x0e000470, 0x24050273, 0x0a0005f2, + 0x24050001, 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, + 0xaf5401c0, 0xa34201c4, 0xaf4301f8, 0x24050001, 0x24020001, 0xa7620012, + 0xa3600022, 0x0a0005fe, 0x2ca20001, 0x9743007a, 0x9444002a, 0x00002821, + 0x00641821, 0x3063fffe, 0xa7630012, 0x2ca20001, 0x00021023, 0x03c2f024, + 0x8fa20010, 0x10400004, 0x8fa30014, 0x0e0013c1, 0x00000000, 0x8fa30014, + 0x10600003, 0x00000000, 0x0e0010eb, 0x00000000, 0x13c0001f, 0x3c029000, + 0x34420001, 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, + 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, 0xa362007d, 0x8f640074, + 0x34630001, 0x02831825, 0xaf430020, 0x04810006, 0x3c038000, 0x02802021, + 0x0e000470, 0x2405036c, 0x0a00062b, 0x8fa20018, 0x8f4201f8, 0x00431024, + 0x1440fffd, 0x24020002, 0x3c031000, 0xaf5401c0, 0xa34201c4, 0xaf4301f8, + 0x8fa20018, 0x5040002f, 0x96a20008, 0x8f620048, 0x8f630024, 0x00761821, + 0xaf630048, 0x9764003c, 0x00501023, 0x0044102b, 0x10400025, 0x3c029000, + 0x34420001, 0x3c040800, 0x8c830080, 0x8f450100, 0x3c068000, 0x24630001, + 0x00a21025, 0xac830080, 0xaf420020, 0x8f420020, 0x00461024, 0x1440fffd, + 0x00000000, 0x9362007d, 0x3c038000, 0x34420004, 0xa362007d, 0x8f640074, + 0x34630001, 0x00a31825, 0xaf430020, 0x04810006, 0x3c038000, 0x00a02021, + 0x0e000470, 0x2405038a, 0x0a00065b, 0x96a20008, 0x8f4201f8, 0x00431024, + 0x1440fffd, 0x24020002, 0x3c031000, 0xaf4501c0, 0xa34201c4, 0xaf4301f8, + 0x96a20008, 0x8fbf0044, 0x8fbe0040, 0x8fb7003c, 0x8fb60038, 0x8fb50034, + 0x8fb40030, 0x8fb3002c, 0x8fb20028, 0x8fb10024, 0x8fb00020, 0x00021042, + 0x30420001, 0x03e00008, 0x27bd0048, 0x27bdffe0, 0xafbf0018, 0x97420108, + 0x24030019, 0x304400ff, 0x10830065, 0x2882001a, 0x1040001a, 0x2882000a, + 0x1040000f, 0x28820008, 0x10400040, 0x24020001, 0x1082003a, 0x28820002, + 0x50400005, 0x24020006, 0x10800032, 0x3c026000, 0x0a0006fb, 0x00000000, + 0x1082003d, 0x00000000, 0x0a0006fb, 0x00000000, 0x2402000b, 0x10820044, + 0x2882000b, 0x1440004b, 0x2402000e, 0x10820045, 0x00000000, 0x0a0006fb, + 0x00000000, 0x24020020, 0x10820062, 0x28820021, 0x1040000e, 0x2402001c, + 0x1082004c, 0x2882001d, 0x10400005, 0x2402001b, 0x10820043, 0x00000000, + 0x0a0006fb, 0x00000000, 0x2402001f, 0x10820050, 0x00000000, 0x0a0006fb, + 0x00000000, 0x240200c1, 0x10820042, 0x288200c2, 0x10400005, 0x24020080, + 0x10820021, 0x00000000, 0x0a0006fb, 0x00000000, 0x240200c2, 0x1082003d, + 0x240200c9, 0x50820049, 0xafa00010, 0x0a0006fb, 0x00000000, 0x0e001163, + 0xac400808, 0x0a0006fd, 0x8fbf0018, 0x3c026000, 0x8c444448, 0x3c030800, + 0xac640064, 0x0e001163, 0x00000000, 0x3c026000, 0x8c444448, 0x3c030800, + 0x0a0006fc, 0xac640068, 0x8f440100, 0x0e0006ff, 0x00000000, 0x3c026000, + 0x8c444448, 0x3c030800, 0x0a0006fc, 0xac64006c, 0x0e001191, 0x00000000, + 0x0a0006fd, 0x8fbf0018, 0x8f440100, 0x0e0011bb, 0x00000000, 0x0a0006fd, + 0x8fbf0018, 0x0e001202, 0x00000000, 0x0a0006fd, 0x8fbf0018, 0x0000000d, + 0x0a0006fd, 0x8fbf0018, 0x0e000826, 0x00000000, 0x0a0006fd, 0x8fbf0018, + 0x8f440100, 0x0e001264, 0x00000000, 0x0a0006fd, 0x8fbf0018, 0x0e00134e, + 0x00000000, 0x0a0006fd, 0x8fbf0018, 0x0e00087c, 0x27440100, 0x0a0006fd, + 0x8fbf0018, 0x8f640040, 0x0e000fae, 0x00000000, 0x0a0006fd, 0x8fbf0018, + 0x8f440100, 0x0e001059, 0x00000000, 0x0a0006fd, 0x8fbf0018, 0x0e001417, + 0x00000000, 0x0a0006fd, 0x8fbf0018, 0xafa00014, 0x8f440100, 0x8f450118, + 0x8f46011c, 0x0e001439, 0x8f470120, 0x0a0006fd, 0x8fbf0018, 0x0000000d, + 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x27bdffe8, 0xafbf0010, 0x9742010c, + 0x1440005e, 0x00803821, 0x3c029000, 0x34420001, 0x00e21025, 0xaf420020, + 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x93620023, + 0x30420010, 0x14400026, 0x3c030800, 0x8f630074, 0x3c027fff, 0x3442ffff, + 0x00621824, 0xaf630074, 0x93620005, 0x34420001, 0xa3620005, 0x8f63004c, + 0x8f620054, 0x10620021, 0x24040001, 0x9762006a, 0x00022880, 0x50a00001, + 0x24050001, 0x97630068, 0x93640081, 0x3c020800, 0x8c46004c, 0x00652821, + 0x00852804, 0x00c5102b, 0x54400001, 0x00a03021, 0x3c020800, 0x8c440050, + 0x00c4182b, 0x54600001, 0x00c02021, 0x8f420074, 0x2403fffe, 0x00832824, + 0x00a21021, 0xaf62000c, 0x0a00073d, 0x24040001, 0x8c6200a8, 0x00002021, + 0x24420001, 0xac6200a8, 0x0000000d, 0x00000000, 0x2400044d, 0x3c028000, + 0x34420001, 0x00e21025, 0xaf420020, 0x1080001f, 0x3c029000, 0x34420001, + 0x00e21025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x9362007d, 0x3c038000, 0xa362007d, 0x8f640074, 0x34630001, + 0x00e31825, 0xaf430020, 0x04810006, 0x3c038000, 0x00e02021, 0x0e000470, + 0x24050455, 0x0a000761, 0x00000000, 0x8f4201f8, 0x00431024, 0x1440fffd, + 0x24020002, 0x3c031000, 0xaf4701c0, 0xa34201c4, 0xaf4301f8, 0x0e001163, + 0x00000000, 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x27bdffd8, 0xafbf0024, + 0xafb40020, 0xafb3001c, 0xafb20018, 0xafb10014, 0xafb00010, 0x93630005, + 0x00809821, 0x24020030, 0x30630030, 0x146200ac, 0x00a0a021, 0x3c020800, + 0x8c430020, 0x106000a6, 0x00000000, 0x0e00148e, 0x00000000, 0x8f830018, + 0xac730000, 0x936200c4, 0x30420002, 0x10400004, 0x24020001, 0x8f830018, + 0x0a000784, 0x00000000, 0x8f830018, 0x24020003, 0xac620004, 0x8f6200dc, + 0x8f630040, 0x00431023, 0x18400004, 0x00000000, 0x0000000d, 0x00000000, + 0x24000509, 0x8f840018, 0x8f6200dc, 0xac820008, 0x8f830018, 0xac60000c, + 0x8f820018, 0xac400010, 0x8f830018, 0x8f62004c, 0x3c100800, 0xac620014, + 0x8f850018, 0x3c026000, 0x8c434448, 0x261258c0, 0x00002021, 0xaca30018, + 0x9642000e, 0x8f850018, 0x3c034010, 0x00431025, 0x0e0014cc, 0xaca2001c, + 0x8f830018, 0xac730000, 0x9362003e, 0x9363003f, 0x8f840018, 0x00021200, + 0x00621825, 0xac830004, 0x93620081, 0x93630082, 0x8f840018, 0x00021600, + 0x00031c00, 0x00431025, 0xac820008, 0x8f830018, 0x8f620040, 0xac62000c, + 0x8f840018, 0x8f620048, 0xac820010, 0x8f71004c, 0x8f820018, 0xac510014, + 0x8f620050, 0x8f850018, 0x00401821, 0x02221023, 0x5c400001, 0x02201821, + 0x00002021, 0xaca30018, 0x9642000e, 0x8f850018, 0x3c03c00b, 0x00431025, + 0x0e0014cc, 0xaca2001c, 0x8f620054, 0x8f840018, 0x00401821, 0x02221023, + 0x5c400001, 0x02201821, 0xac830000, 0x8f840018, 0x8f630058, 0xac830004, + 0x93620023, 0x30420010, 0x10400004, 0x00000000, 0x8f830018, 0x0a0007dd, + 0x8f620148, 0x8f830018, 0x8f62005c, 0xac620008, 0x8f830018, 0x8f620060, + 0xac62000c, 0x8f840018, 0x8f620064, 0xac820010, 0x97630068, 0x9762006a, + 0x8f840018, 0x00031c00, 0x00431025, 0xac820014, 0x8f850018, 0x00002021, + 0x2402ffff, 0x260358c0, 0xaca20018, 0x9462000e, 0x8f850018, 0x3c03c00c, + 0x00431025, 0x0e0014cc, 0xaca2001c, 0x8f840018, 0x8f630018, 0xac830000, + 0x936200c4, 0x30420002, 0x10400006, 0x00000000, 0x976200c8, 0x8f830018, + 0x3042ffff, 0x0a000803, 0xac620004, 0x8f820018, 0xac400004, 0x8f830018, + 0x8f62006c, 0xac620008, 0x8f840018, 0x8f6200dc, 0xac82000c, 0x8f830018, + 0xac600010, 0x93620005, 0x8f830018, 0x00021600, 0x00541025, 0xac620014, + 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x260258c0, 0xaca30018, + 0x9443000e, 0x8f850018, 0x3c02400d, 0x00621825, 0x0e0014cc, 0xaca3001c, + 0x0e00122e, 0x02602021, 0x8fbf0024, 0x8fb40020, 0x8fb3001c, 0x8fb20018, + 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0028, 0x27bdffe0, 0xafb00010, + 0x27500100, 0xafbf0018, 0xafb10014, 0x9603000c, 0x240200c1, 0x54620024, + 0x8e040000, 0x3c029000, 0x8f450100, 0x34420001, 0x3c038000, 0x00a21025, + 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x9362007d, + 0x3c038000, 0x34420004, 0xa362007d, 0x8f640074, 0x34630001, 0x00a31825, + 0xaf430020, 0x04810006, 0x3c038000, 0x00a02021, 0x0e000470, 0x240505b2, + 0x0a000878, 0x8fbf0018, 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, + 0x3c031000, 0xaf4501c0, 0xa34201c4, 0xaf4301f8, 0x0a000878, 0x8fbf0018, + 0x8f65004c, 0x24060001, 0x0e0012a3, 0x240705be, 0x3c020800, 0x8c430020, + 0x9611000c, 0x1060001d, 0x8e100000, 0x0e00148e, 0x00000000, 0x8f820018, + 0xac500000, 0x8f840018, 0x00111400, 0xac820004, 0x8f830018, 0xac600008, + 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, 0x8f840018, 0x240205c1, + 0xac820014, 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, + 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024019, 0x00621825, 0x0e0014cc, + 0xaca3001c, 0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, + 0x27bdffb0, 0xafb5003c, 0x0000a821, 0xafbe0048, 0x0000f021, 0xafb70044, + 0x0000b821, 0xafb30034, 0x00009821, 0xafb60040, 0x0080b021, 0xafbf004c, + 0xafb40038, 0xafb20030, 0xafb1002c, 0xafb00028, 0xafa00010, 0x8f620040, + 0x8ec30014, 0x96d1000c, 0x00431023, 0x04410025, 0x8ed40000, 0x32220401, + 0x1040030c, 0x3c029000, 0x34420001, 0x02821025, 0xaf420020, 0x3c038000, + 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, + 0x34420004, 0xa362007d, 0x8f640074, 0x34630001, 0x02831825, 0xaf430020, + 0x04810006, 0x3c038000, 0x02802021, 0x0e000470, 0x24050664, 0x0a000ba2, + 0x8fbf004c, 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, + 0xaf5401c0, 0xa34201c4, 0xaf4301f8, 0x0a000ba2, 0x8fbf004c, 0x32220010, + 0x1040006b, 0x00003021, 0x9362003f, 0x92c6000f, 0x304500ff, 0x24c3fff8, + 0x2c62000f, 0x10400057, 0x3c020800, 0x244257c0, 0x00031880, 0x00621821, + 0x8c640000, 0x00800008, 0x00000000, 0x38a20012, 0x0a000924, 0x0002a82b, + 0x2402000e, 0x14a20004, 0x2402000c, 0x24150001, 0x0a000924, 0x24060010, + 0x10a20049, 0x38a30010, 0x2c630001, 0x38a20016, 0x2c420001, 0x00621825, + 0x1460004d, 0x0000a821, 0x24020014, 0x10a2004a, 0x00000000, 0x0000000d, + 0x00000000, 0x2400069c, 0x0a000924, 0x0000a821, 0x24020016, 0x14a20005, + 0x2402000c, 0x24150001, 0x24060010, 0x0a000924, 0x3231fffd, 0x10a20032, + 0x38a30010, 0x2c630001, 0x38a2000e, 0x2c420001, 0x00621825, 0x14600036, + 0x0000a821, 0x24020014, 0x14a20003, 0x24150001, 0x0a000924, 0x24060012, + 0x0000000d, 0x00000000, 0x240006bc, 0x0a000924, 0x0000a821, 0x2402000e, + 0x14a20004, 0x24020016, 0x24150001, 0x0a000924, 0x3231fffb, 0x14a20004, + 0x24020014, 0x24150001, 0x0a000924, 0x3231fffd, 0x54a20013, 0x92c2000e, + 0x24150001, 0x24060012, 0x0a000924, 0x3231fffd, 0x2402000c, 0x54a2000c, + 0x92c2000e, 0x92c3000e, 0x2402000a, 0x10620005, 0x24150001, 0x0000000d, + 0x00000000, 0x240006e8, 0x24150001, 0x0a000924, 0x24060014, 0x92c2000e, + 0x14a20003, 0x00000000, 0x0a000924, 0x24150001, 0x10a6ffc1, 0x24020012, + 0x10a20005, 0x0000a821, 0x0000000d, 0x00000000, 0x24000704, 0x0000a821, + 0x12a00022, 0x32220004, 0x10400002, 0x24020001, 0xafa20010, 0x32230102, + 0x24020002, 0x1462000f, 0x00000000, 0x92c2000a, 0x30420020, 0x1440000b, + 0x00000000, 0x8f630048, 0x8f620040, 0x14620004, 0x00000000, 0x8f620048, + 0x24420001, 0xaf620048, 0x8f620040, 0x24420001, 0xaf620040, 0xa366003f, + 0x38c30012, 0x2c630001, 0x38c20010, 0x2c420001, 0x00621825, 0x10600005, + 0x3c030800, 0x8c620074, 0x24420001, 0x0e00140d, 0xac620074, 0x32220040, + 0x32230020, 0xafa30020, 0x32230080, 0xafa30024, 0x32230001, 0xafa30018, + 0x32230008, 0xafa3001c, 0x32230100, 0x104000c4, 0xafa30014, 0x8ec60010, + 0x8f630054, 0x24c2ffff, 0x00431023, 0x18400006, 0x00000000, 0x0000000d, + 0x00000000, 0x2400015c, 0x0a000989, 0x00009021, 0x8f62004c, 0x00c21023, + 0x18400028, 0x00009021, 0x93650120, 0x93640121, 0x3c030800, 0x8c62008c, + 0x308400ff, 0x24420001, 0x30a500ff, 0x00804021, 0x1485000b, 0xac62008c, + 0x3c040800, 0x8c830090, 0x24630001, 0xac830090, 0x93620122, 0x30420001, + 0x00021023, 0x30420005, 0x0a000989, 0x34520004, 0x27670100, 0x00041080, + 0x00e21021, 0x8c430000, 0x00c31823, 0x04600004, 0x24820001, 0x30440007, + 0x1485fff9, 0x00041080, 0x10880007, 0x3c030800, 0xa3640121, 0x8c620094, + 0x24120005, 0x24420001, 0x0a000989, 0xac620094, 0x24120004, 0x32420001, + 0x10400021, 0x3c020800, 0x8c430020, 0x8ed00000, 0x1060001c, 0x8ed30010, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac500000, 0x8f840018, 0x24020001, + 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f820018, 0xac530014, 0x8f850018, 0x3c026000, 0x8c434448, + 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024010, + 0x00621825, 0x0e0014cc, 0xaca3001c, 0x24130001, 0x32420004, 0x10400068, + 0x00003821, 0x3c029000, 0x8ec60010, 0x34420001, 0x3c038000, 0x02821025, + 0xa360007c, 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, + 0x93620023, 0x30420080, 0x10400011, 0x00000000, 0x8f65005c, 0x8f63004c, + 0x9764003c, 0x8f620064, 0x00a32823, 0x00852821, 0x00a2102b, 0x54400006, + 0x3c023fff, 0x93620023, 0x3042007f, 0xa3620023, 0xaf660064, 0x3c023fff, + 0x0a0009da, 0x3442ffff, 0x8f62005c, 0x00c21023, 0x04400011, 0x00000000, + 0x8f65005c, 0x8f630064, 0x9764003c, 0x3c023fff, 0x3442ffff, 0xaf660064, + 0x00a32823, 0x00852821, 0x0045102b, 0x10400004, 0x00c51021, 0x3c053fff, + 0x34a5ffff, 0x00c51021, 0xaf62005c, 0x24070001, 0xaf66004c, 0x8fa20010, + 0x10400003, 0x00000000, 0xaf660050, 0xaf660054, 0x8f620054, 0x14c20005, + 0x00000000, 0x93620023, 0x30420040, 0x10400017, 0x24020001, 0x9762006a, + 0x00022880, 0x50a00001, 0x24050001, 0x97630068, 0x93640081, 0x3c020800, + 0x8c46004c, 0x00652821, 0x00852804, 0x00c5102b, 0x54400001, 0x00a03021, + 0x3c020800, 0x8c440050, 0x00c4182b, 0x54600001, 0x00c02021, 0x8f420074, + 0x2403fffe, 0x00832824, 0x00a21021, 0xaf62000c, 0x93620082, 0x30420080, + 0x50400001, 0xa3600081, 0x3c028000, 0x34420001, 0x02821025, 0xaf420020, + 0x9363007e, 0x9362007a, 0x10620005, 0x00e0b821, 0x0e0013c4, 0x00000000, + 0x00403821, 0x00e0b821, 0x8fa30020, 0x10600009, 0x8fa20010, 0x8ec20018, + 0xaf620018, 0x8ec3001c, 0xaf63001c, 0x8ec20020, 0x24170001, 0xaf620058, + 0x8fa20010, 0x10400057, 0x8fa30024, 0x93620023, 0x30420040, 0x10400053, + 0x00000000, 0x16600021, 0x3c120800, 0x8e420020, 0x8f70004c, 0x1040001e, + 0x24130001, 0x0e00148e, 0x00000000, 0x8f820018, 0xac540000, 0x8f840018, + 0x24020001, 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, + 0x8f830018, 0xac600010, 0x8f820018, 0xac500014, 0x8f850018, 0x3c026000, + 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, + 0x3c024010, 0x00621825, 0xaca3001c, 0x0e0014cc, 0x24130001, 0x8e420020, + 0x1040001c, 0x8ed00000, 0x0e00148e, 0x00000000, 0x8f820018, 0xac500000, + 0x8f830018, 0xac600004, 0x8f820018, 0xac400008, 0x8f830018, 0xac60000c, + 0x8f820018, 0xac400010, 0x8f830018, 0x24020798, 0xac620014, 0x8f850018, + 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, + 0x8f850018, 0x3c024019, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x3c029000, + 0x34420001, 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, + 0x1440fffd, 0x24020001, 0xaf62000c, 0x93630023, 0x3c028000, 0x34420001, + 0x02821025, 0x306300bf, 0xa3630023, 0xaf420020, 0x8fa30024, 0x10600012, + 0x8fa30018, 0x9362007c, 0x24420001, 0xa362007c, 0x9363007e, 0x9362007a, + 0x1462000b, 0x8fa30018, 0x9362007c, 0x3c030800, 0x8c640024, 0x0044102b, + 0x14400005, 0x8fa30018, 0x0e0013c4, 0x00000000, 0x02e2b825, 0x8fa30018, + 0x3062ffff, 0x10400003, 0x32220200, 0x0a000a94, 0x241e0004, 0x10400003, + 0x00000000, 0x241e0040, 0x24170001, 0x12a000d0, 0x32220002, 0x104000cf, + 0x8fa2001c, 0x92c2000a, 0x30420002, 0x5040003b, 0x92c2000a, 0x93620023, + 0x30420008, 0x54400037, 0x92c2000a, 0x3c020800, 0x8c430020, 0x10600023, + 0x3c029000, 0x0e00148e, 0x00000000, 0x8f840018, 0x8ec30000, 0xac830000, + 0x92c2000a, 0x8f830018, 0x00021600, 0xac620004, 0x8f840018, 0x8f620040, + 0xac820008, 0x8f850018, 0x8f63004c, 0xaca3000c, 0x9362003f, 0x8f840018, + 0x304200ff, 0xac820010, 0x8f830018, 0x3c026000, 0xac600014, 0x8f850018, + 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, + 0x3c02401a, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x3c029000, 0x34420001, + 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x93630023, 0x3c028000, 0x34420001, 0x02821025, 0x34630008, + 0xa3630023, 0xaf420020, 0x92c2000a, 0x30420020, 0x1040008e, 0x8fa2001c, + 0x93620023, 0x30420001, 0x14400035, 0x3c020800, 0x8c430020, 0x10600023, + 0x3c029000, 0x0e00148e, 0x00000000, 0x8f840018, 0x8ec30000, 0xac830000, + 0x92c2000a, 0x8f830018, 0x00021600, 0xac620004, 0x8f840018, 0x8f620040, + 0xac820008, 0x8f850018, 0x8f63004c, 0xaca3000c, 0x9362003f, 0x8f840018, + 0x304200ff, 0xac820010, 0x8f830018, 0x3c026000, 0xac600014, 0x8f850018, + 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, + 0x3c02401a, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x3c029000, 0x34420001, + 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x93630023, 0x3c028000, 0x34420001, 0x02821025, 0x34630001, + 0xa3630023, 0xaf420020, 0x93620023, 0x30420040, 0x10400052, 0x8fa2001c, + 0x16600020, 0x3c120800, 0x8e420020, 0x8f70004c, 0x1040003c, 0x3c029000, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac540000, 0x8f840018, 0x24020001, + 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f820018, 0xac500014, 0x8f850018, 0x3c026000, 0x8c434448, + 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024010, + 0x00621825, 0x0e0014cc, 0xaca3001c, 0x8e420020, 0x1040001e, 0x3c029000, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac540000, 0x8f840018, 0x3c02008d, + 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f840018, 0x240207ee, 0xac820014, 0x8f850018, 0x3c026000, + 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, + 0x3c024019, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x3c029000, 0x34420001, + 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x93630023, 0x3c028000, 0x34420001, 0x02821025, 0x306300bf, + 0xa3630023, 0xaf420020, 0x8fa2001c, 0x1040000e, 0x8fa20014, 0x92c2000a, + 0xa3620082, 0x57c00005, 0x37de0008, 0x8fa30014, 0x10600004, 0x00000000, + 0x37de0008, 0x0a000b75, 0x24170001, 0x0e0012cf, 0x02802021, 0x8fa20014, + 0x10400003, 0x00000000, 0x37de0010, 0x24170001, 0x12e00020, 0x3c029000, + 0x34420001, 0x02821025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, + 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, 0x03c21025, 0xa362007d, + 0x8f640074, 0x34630001, 0x02831825, 0xaf430020, 0x04810006, 0x3c038000, + 0x02802021, 0x0e000470, 0x2405082a, 0x0a000b9b, 0x00000000, 0x8f4201f8, + 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, 0xaf5401c0, 0xa34201c4, + 0xaf4301f8, 0x9363003f, 0x24020012, 0x14620004, 0x8fbf004c, 0x0e00140d, + 0x00000000, 0x8fbf004c, 0x8fbe0048, 0x8fb70044, 0x8fb60040, 0x8fb5003c, + 0x8fb40038, 0x8fb30034, 0x8fb20030, 0x8fb1002c, 0x8fb00028, 0x03e00008, + 0x27bd0050, 0x27bdffe8, 0xafbf0014, 0xafb00010, 0x8f500180, 0x97420184, + 0x30420200, 0x14400015, 0x00000000, 0x8f430188, 0x3c02ff00, 0x00621824, + 0x3c020200, 0x10620031, 0x0043102b, 0x14400007, 0x3c020300, 0x1060000b, + 0x3c020100, 0x1062000d, 0x00000000, 0x0a000c2c, 0x00000000, 0x10620027, + 0x3c020400, 0x1062003e, 0x02002021, 0x0a000c2c, 0x00000000, 0x0e000c31, + 0x02002021, 0x0a000c2e, 0x8fbf0014, 0x93620005, 0x30420020, 0x1440005e, + 0x8fbf0014, 0x3c029000, 0x34420001, 0x02021025, 0xaf420020, 0x3c038000, + 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x93620005, 0x3c038000, + 0x34630001, 0x02031825, 0x34420020, 0xa3620005, 0xaf430020, 0x93620005, + 0x30420020, 0x14400003, 0x02002021, 0x0000000d, 0x02002021, 0x0e000766, + 0x24055854, 0x0a000c2e, 0x8fbf0014, 0x93620005, 0x30420001, 0x1040003f, + 0x3c029000, 0x34420001, 0x02021025, 0xaf420020, 0x3c038000, 0x8f420020, + 0x00431024, 0x1440fffd, 0x00000000, 0x93620023, 0x34420004, 0xa3620023, + 0x93630005, 0x3c048000, 0x3c020800, 0x306300fe, 0xa3630005, 0x8c430020, + 0x34840001, 0x02042025, 0x0a000c0a, 0xaf440020, 0x00002821, 0x00003021, + 0x0e000fb1, 0x240708d9, 0x3c020800, 0x8c430020, 0x10600023, 0x8fbf0014, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac500000, 0x93630082, 0x9362003f, + 0x8f840018, 0x00031a00, 0x00431025, 0xac820004, 0x8f830018, 0xac600008, + 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, 0x8f820018, 0xac400014, + 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, + 0x944358ce, 0x8f850018, 0x3c02400a, 0x00621825, 0x0e0014cc, 0xaca3001c, + 0x0a000c2e, 0x8fbf0014, 0x0000000d, 0x8fbf0014, 0x8fb00010, 0x03e00008, + 0x27bd0018, 0x27bdffe8, 0xafbf0010, 0x8f420188, 0x00803021, 0x93640000, + 0x24030020, 0x00021402, 0x10830008, 0x304500ff, 0x3c036018, 0x8c625000, + 0x34420400, 0xac625000, 0x0000000d, 0x00000000, 0x24000955, 0x9363003f, + 0x24020012, 0x14620023, 0x3c029000, 0x34420001, 0x3c038000, 0x00c21025, + 0xaf650178, 0xa365007a, 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x9362007d, 0x3c038000, 0xa362007d, 0x8f640074, 0x34630001, + 0x00c31825, 0xaf430020, 0x04810006, 0x3c038000, 0x00c02021, 0x0e000470, + 0x24050963, 0x0a000c79, 0x8fbf0010, 0x8f4201f8, 0x00431024, 0x1440fffd, + 0x24020002, 0x3c031000, 0xaf4601c0, 0xa34201c4, 0xaf4301f8, 0x0a000c79, + 0x8fbf0010, 0x9362007e, 0x1445000e, 0x00000000, 0x8f620178, 0x1045000b, + 0x00000000, 0x8f820000, 0xaf650178, 0x8f660178, 0x8f440180, 0x8f65004c, + 0x8c430000, 0x0060f809, 0x30c600ff, 0x0a000c79, 0x8fbf0010, 0xaf650178, + 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x27bdffe8, 0xafbf0010, 0x93630000, + 0x24020020, 0x10620005, 0x00000000, 0x93630000, 0x24020030, 0x1462004d, + 0x8fbf0010, 0x93420148, 0x2444ffff, 0x2c830005, 0x10600047, 0x3c020800, + 0x24425800, 0x00041880, 0x00621821, 0x8c640000, 0x00800008, 0x00000000, + 0x8f430144, 0x8f62000c, 0x14620006, 0x24020001, 0xaf62000c, 0x0e000d59, + 0x00000000, 0x0a000cd1, 0x8fbf0010, 0x8f62000c, 0x0a000cca, 0x00000000, + 0x97630010, 0x8f420144, 0x14430006, 0x24020001, 0xa7620010, 0x0e00137a, + 0x00000000, 0x0a000cd1, 0x8fbf0010, 0x97620010, 0x0a000cca, 0x00000000, + 0x97630012, 0x8f420144, 0x14430006, 0x24020001, 0xa7620012, 0x0e001395, + 0x00000000, 0x0a000cd1, 0x8fbf0010, 0x97620012, 0x0a000cca, 0x00000000, + 0x97630014, 0x8f420144, 0x14430006, 0x24020001, 0xa7620014, 0x0e0013bb, + 0x00000000, 0x0a000cd1, 0x8fbf0010, 0x97620014, 0x0a000cca, 0x00000000, + 0x97630016, 0x8f420144, 0x14430006, 0x24020001, 0xa7620016, 0x0e0013be, + 0x00000000, 0x0a000cd1, 0x8fbf0010, 0x97620016, 0x14400006, 0x8fbf0010, + 0x3c030800, 0x8c620070, 0x24420001, 0xac620070, 0x8fbf0010, 0x03e00008, + 0x27bd0018, 0x27bdffe0, 0x3c029000, 0xafbf001c, 0xafb20018, 0xafb10014, + 0xafb00010, 0x8f500140, 0x34420001, 0x3c038000, 0x02021025, 0xaf420020, + 0x8f420020, 0x00431024, 0x1440fffd, 0x24020012, 0x24030080, 0xa362003f, + 0xa3630082, 0x93620023, 0x30420040, 0x10400007, 0x00008821, 0x93620023, + 0x24110001, 0x304200bf, 0xa3620023, 0x0a000cf0, 0x3c028000, 0x3c028000, + 0x34420001, 0x3c039000, 0x34630001, 0x3c048000, 0x02021025, 0x02031825, + 0xaf420020, 0xaf430020, 0x8f420020, 0x00441024, 0x1440fffd, 0x00000000, + 0x9362007d, 0x3c038000, 0x34420020, 0xa362007d, 0x8f640074, 0x34630001, + 0x02031825, 0xaf430020, 0x04810006, 0x3c038000, 0x02002021, 0x0e000470, + 0x24050a63, 0x0a000d13, 0x00000000, 0x8f4201f8, 0x00431024, 0x1440fffd, + 0x24020002, 0x3c031000, 0xaf5001c0, 0xa34201c4, 0xaf4301f8, 0x1220003f, + 0x3c120800, 0x8e420020, 0x8f71004c, 0x1040003c, 0x8fbf001c, 0x0e00148e, + 0x00000000, 0x8f820018, 0xac500000, 0x8f840018, 0x24020001, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f820018, 0xac510014, 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, + 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024010, 0x00621825, + 0x0e0014cc, 0xaca3001c, 0x8e420020, 0x1040001e, 0x8fbf001c, 0x0e00148e, + 0x00000000, 0x8f820018, 0xac500000, 0x8f840018, 0x3c02008d, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f840018, 0x24020a6a, 0xac820014, 0x8f850018, 0x3c026000, 0x8c434448, + 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c024019, + 0x00621825, 0x0e0014cc, 0xaca3001c, 0x8fbf001c, 0x8fb20018, 0x8fb10014, + 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe8, 0xafbf0010, 0x93620081, + 0x3c030800, 0x8c640048, 0x0044102b, 0x14400005, 0x00000000, 0x0e000cd3, + 0x00000000, 0x0a000da4, 0x8fbf0010, 0x93620081, 0x24420001, 0x0e0013c4, + 0xa3620081, 0x9763006a, 0x00032880, 0x14a00002, 0x00403821, 0x24050001, + 0x97630068, 0x93640081, 0x3c020800, 0x8c46004c, 0x00652821, 0x00852804, + 0x00c5102b, 0x54400001, 0x00a03021, 0x3c020800, 0x8c440050, 0x00c4182b, + 0x54600001, 0x00c02021, 0x8f420074, 0x2403fffe, 0x00832824, 0x00a21021, + 0xaf62000c, 0x10e00021, 0x3c029000, 0x8f450140, 0x34420001, 0x3c038000, + 0x00a21025, 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, + 0x9362007d, 0x3c038000, 0x34420004, 0xa362007d, 0x8f640074, 0x34630001, + 0x00a31825, 0xaf430020, 0x04810006, 0x3c038000, 0x00a02021, 0x0e000470, + 0x24050a92, 0x0a000da4, 0x8fbf0010, 0x8f4201f8, 0x00431024, 0x1440fffd, + 0x24020002, 0x3c031000, 0xaf4501c0, 0xa34201c4, 0xaf4301f8, 0x8fbf0010, + 0x03e00008, 0x27bd0018, 0x27bdffd8, 0xafb3001c, 0x27530100, 0xafbf0024, + 0xafb40020, 0xafb20018, 0xafb10014, 0xafb00010, 0x96620008, 0x3c140800, + 0x8f520100, 0x30420001, 0x104000da, 0x00000000, 0x8e700018, 0x8f630054, + 0x2602ffff, 0x00431023, 0x18400006, 0x00000000, 0x0000000d, 0x00000000, + 0x2400015c, 0x0a000dea, 0x00008821, 0x8f62004c, 0x02021023, 0x18400028, + 0x00008821, 0x93650120, 0x93640121, 0x3c030800, 0x8c62008c, 0x308400ff, + 0x24420001, 0x30a500ff, 0x00803821, 0x1485000b, 0xac62008c, 0x3c040800, + 0x8c830090, 0x24630001, 0xac830090, 0x93620122, 0x30420001, 0x00021023, + 0x30420005, 0x0a000dea, 0x34510004, 0x27660100, 0x00041080, 0x00c21021, + 0x8c430000, 0x02031823, 0x04600004, 0x24820001, 0x30440007, 0x1485fff9, + 0x00041080, 0x10870007, 0x3c030800, 0xa3640121, 0x8c620094, 0x24110005, + 0x24420001, 0x0a000dea, 0xac620094, 0x24110004, 0x32220001, 0x1040001e, + 0x8e820020, 0x1040001d, 0x32220004, 0x0e00148e, 0x00000000, 0x8f820018, + 0xac520000, 0x8f840018, 0x24020001, 0xac820004, 0x8f830018, 0xac600008, + 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, 0x8f820018, 0xac500014, + 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, + 0x944358ce, 0x8f850018, 0x3c024010, 0x00621825, 0x0e0014cc, 0xaca3001c, + 0x32220004, 0x10400081, 0x00003821, 0x3c029000, 0x34420001, 0x3c038000, + 0x02421025, 0xa360007c, 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x93620023, 0x30420080, 0x10400011, 0x00000000, 0x8f65005c, + 0x8f63004c, 0x9764003c, 0x8f620064, 0x00a32823, 0x00852821, 0x00a2102b, + 0x54400006, 0x3c023fff, 0x93620023, 0x3042007f, 0xa3620023, 0xaf700064, + 0x3c023fff, 0x0a000e37, 0x3442ffff, 0x8f62005c, 0x02021023, 0x04400011, + 0x00000000, 0x8f65005c, 0x8f630064, 0x9764003c, 0x3c023fff, 0x3442ffff, + 0xaf700064, 0x00a32823, 0x00852821, 0x0045102b, 0x10400004, 0x02051021, + 0x3c053fff, 0x34a5ffff, 0x02051021, 0xaf62005c, 0x24070001, 0xaf70004c, + 0x8f620054, 0x16020005, 0x00000000, 0x93620023, 0x30420040, 0x10400017, + 0x24020001, 0x9762006a, 0x00022880, 0x50a00001, 0x24050001, 0x97630068, + 0x93640081, 0x3c020800, 0x8c46004c, 0x00652821, 0x00852804, 0x00c5102b, + 0x54400001, 0x00a03021, 0x3c020800, 0x8c440050, 0x00c4182b, 0x54600001, + 0x00c02021, 0x8f420074, 0x2403fffe, 0x00832824, 0x00a21021, 0xaf62000c, + 0x93620082, 0x30420080, 0x50400001, 0xa3600081, 0x3c028000, 0x34420001, + 0x02421025, 0xaf420020, 0x9363007e, 0x9362007a, 0x10620004, 0x00000000, + 0x0e0013c4, 0x00000000, 0x00403821, 0x10e0001f, 0x3c029000, 0x34420001, + 0x02421025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x9362007d, 0x3c038000, 0xa362007d, 0x8f640074, 0x34630001, + 0x02431825, 0xaf430020, 0x04810006, 0x3c038000, 0x02402021, 0x0e000470, + 0x24050b3d, 0x0a000e8d, 0x00000000, 0x8f4201f8, 0x00431024, 0x1440fffd, + 0x24020002, 0x3c031000, 0xaf5201c0, 0xa34201c4, 0xaf4301f8, 0x9342010b, + 0x9343010b, 0x8e820020, 0x27500100, 0x38630006, 0x10400029, 0x2c710001, + 0x0e00148e, 0x00000000, 0x8f830018, 0x8e020000, 0xac620000, 0x8f840018, + 0x96020008, 0xac820004, 0x8f830018, 0x8e020014, 0xac620008, 0x8f850018, + 0x3c026000, 0x8c434448, 0xaca3000c, 0x8f840018, 0x96020012, 0xac820010, + 0x8f850018, 0x8e030020, 0xaca30014, 0x9602000c, 0x9603000e, 0x8f840018, + 0x00021400, 0x00431025, 0xac820018, 0x12200005, 0x3c020800, 0x944358ce, + 0x8f840018, 0x0a000eb8, 0x3c024013, 0x944358ce, 0x8f840018, 0x3c024014, + 0x00621825, 0xac83001c, 0x0e0014cc, 0x24040001, 0x8e700014, 0x8f620040, + 0x14500003, 0x00501023, 0x0a000ec3, 0x00001021, 0x28420001, 0x1040003a, + 0x00000000, 0x0e000fae, 0x02002021, 0xaf700040, 0x9362003e, 0x30420001, + 0x1440000b, 0x3c029000, 0x93620022, 0x24420001, 0xa3620022, 0x93630022, + 0x3c020800, 0x8c440098, 0x0064182b, 0x14600025, 0x3c020800, 0x3c029000, + 0x34420001, 0x02421025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, + 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, 0x34420001, 0xa362007d, + 0x8f640074, 0x34630001, 0x02431825, 0xaf430020, 0x04810006, 0x3c038000, + 0x02402021, 0x0e000470, 0x24050273, 0x0a000ef6, 0x24020001, 0x8f4201f8, + 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, 0xaf5201c0, 0xa34201c4, + 0xaf4301f8, 0x24020001, 0xa7620012, 0x0a000efe, 0xa3600022, 0x9743007a, + 0x9444002a, 0x00641821, 0x3063fffe, 0xa7630012, 0x97420108, 0x8fbf0024, + 0x8fb40020, 0x8fb3001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x00021042, + 0x30420001, 0x03e00008, 0x27bd0028, 0x27bdffe0, 0xafb20018, 0x3c120800, + 0x8e420020, 0xafb00010, 0x27500100, 0xafbf001c, 0x10400046, 0xafb10014, + 0x0e00148e, 0x00000000, 0x8f840018, 0x8e020000, 0xac820000, 0x936300b1, + 0x936200c5, 0x8f850018, 0x00031e00, 0x00021400, 0x34420100, 0x00621825, + 0xaca30004, 0x8f840018, 0x8e02001c, 0xac820008, 0x8f830018, 0x8f620048, + 0xac62000c, 0x8f840018, 0x96020012, 0xac820010, 0x8f830018, 0x8f620040, + 0x24040001, 0xac620014, 0x8f850018, 0x3c026000, 0x8c434448, 0x3c020800, + 0x245158c0, 0xaca30018, 0x9623000e, 0x8f850018, 0x3c024016, 0x00621825, + 0x0e0014cc, 0xaca3001c, 0x96030008, 0x30630010, 0x1060001c, 0x8e420020, + 0x1040001a, 0x8e100000, 0x0e00148e, 0x00000000, 0x8f820018, 0xac500000, + 0x8f830018, 0xac600004, 0x8f820018, 0xac400008, 0x8f830018, 0xac60000c, + 0x8f820018, 0xac400010, 0x8f830018, 0xac600014, 0x8f850018, 0x3c036000, + 0x8c634448, 0x24040001, 0xaca30018, 0x9622000e, 0x8f850018, 0x3c034015, + 0x00431025, 0x0e0014cc, 0xaca2001c, 0x00001021, 0x8fbf001c, 0x8fb20018, + 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe0, 0xafb20018, + 0x3c120800, 0x8e420020, 0xafb00010, 0x27500100, 0xafbf001c, 0x10400041, + 0xafb10014, 0x0e00148e, 0x00000000, 0x8f830018, 0x8e020000, 0xac620000, + 0x8f840018, 0x24020100, 0xac820004, 0x8f830018, 0x8e02001c, 0xac620008, + 0x8f840018, 0x8e020018, 0xac82000c, 0x8f830018, 0x96020012, 0xac620010, + 0x8f840018, 0x96020008, 0xac820014, 0x8f850018, 0x3c026000, 0x8c434448, + 0x24040001, 0x3c020800, 0x245158c0, 0xaca30018, 0x9623000e, 0x8f850018, + 0x3c024017, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x96030008, 0x30630010, + 0x1060001c, 0x8e420020, 0x1040001a, 0x8e100000, 0x0e00148e, 0x00000000, + 0x8f820018, 0xac500000, 0x8f830018, 0xac600004, 0x8f820018, 0xac400008, + 0x8f830018, 0xac60000c, 0x8f820018, 0xac400010, 0x8f830018, 0xac600014, + 0x8f850018, 0x3c036000, 0x8c634448, 0x24040001, 0xaca30018, 0x9622000e, + 0x8f850018, 0x3c034015, 0x00431025, 0x0e0014cc, 0xaca2001c, 0x00001021, + 0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, + 0x27bdfff0, 0x03e00008, 0x27bd0010, 0x27bdffd0, 0xafb10014, 0x00808821, + 0xafb40020, 0x00c0a021, 0xafbf0028, 0xafb50024, 0xafb3001c, 0xafb20018, + 0xafb00010, 0x93620023, 0x00e0a821, 0x30420040, 0x1040003e, 0x30b3ffff, + 0x3c120800, 0x8e420020, 0x1040003a, 0x8f70004c, 0x0e00148e, 0x00000000, + 0x8f820018, 0xac510000, 0x8f840018, 0x24020001, 0xac820004, 0x8f830018, + 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, 0x8f820018, + 0x24040001, 0xac500014, 0x8f850018, 0x3c026000, 0x8c434448, 0x3c020800, + 0x245058c0, 0xaca30018, 0x9603000e, 0x8f850018, 0x3c024010, 0x00621825, + 0x0e0014cc, 0xaca3001c, 0x8e430020, 0x1060001b, 0x00000000, 0x0e00148e, + 0x00000000, 0x8f820018, 0xac510000, 0x8f840018, 0x3c02008d, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f820018, 0xac550014, 0x8f850018, 0x3c036000, 0x8c634448, 0x24040001, + 0xaca30018, 0x9602000e, 0x8f850018, 0x3c034019, 0x00431025, 0x0e0014cc, + 0xaca2001c, 0x93620023, 0x30420020, 0x14400003, 0x3c120800, 0x1280003f, + 0x3c029000, 0x8e420020, 0x8f70004c, 0x1040003b, 0x3c029000, 0x0e00148e, + 0x00000000, 0x8f820018, 0xac510000, 0x8f840018, 0x24020001, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f820018, 0x24040001, 0xac500014, 0x8f850018, 0x3c026000, 0x8c434448, + 0x3c020800, 0x245058c0, 0xaca30018, 0x9603000e, 0x8f850018, 0x3c024010, + 0x00621825, 0x0e0014cc, 0xaca3001c, 0x8e430020, 0x1060001c, 0x3c029000, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac510000, 0x8f840018, 0x00131400, + 0xac820004, 0x8f830018, 0xac750008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f820018, 0xac400014, 0x8f850018, 0x3c036000, 0x8c634448, + 0x24040001, 0xaca30018, 0x9602000e, 0x8f850018, 0x3c03401b, 0x00431025, + 0x0e0014cc, 0xaca2001c, 0x3c029000, 0x34420001, 0x02221025, 0xaf420020, + 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x93630023, + 0x3c028000, 0x34420001, 0x02221025, 0x8fbf0028, 0x8fb50024, 0x8fb40020, + 0x8fb3001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x3063009f, 0xa3630023, + 0xaf420020, 0x03e00008, 0x27bd0030, 0x27bdffe0, 0xafb10014, 0x27510100, + 0x3c029000, 0x34420001, 0xafb00010, 0x00808021, 0x02021025, 0x3c038000, + 0xafbf0018, 0xaf420020, 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, + 0xa7600008, 0x8f63005c, 0x3c028000, 0x34420001, 0xaf630148, 0x8f640050, + 0x02021025, 0x3c039000, 0xaf64017c, 0xaf420020, 0x8f450100, 0x34630001, + 0x3c048000, 0x00a31825, 0xaf430020, 0x8f420020, 0x00441024, 0x1440fffd, + 0x00000000, 0x9362007d, 0x3c038000, 0x34420001, 0xa362007d, 0x8f640074, + 0x34630001, 0x00a31825, 0xaf430020, 0x04810006, 0x3c038000, 0x00a02021, + 0x0e000470, 0x24050de5, 0x0a001093, 0x3c020800, 0x8f4201f8, 0x00431024, + 0x1440fffd, 0x24020002, 0x3c031000, 0xaf4501c0, 0xa34201c4, 0xaf4301f8, + 0x3c020800, 0x8c430020, 0x1060001e, 0x8fbf0018, 0x0e00148e, 0x00000000, + 0x8f830018, 0xac700000, 0x9622000c, 0x8f840018, 0x00021400, 0xac820004, + 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, + 0x8f820018, 0xac400014, 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, + 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c02401f, 0x00621825, + 0x0e0014cc, 0xaca3001c, 0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x03e00008, + 0x27bd0020, 0x3c020800, 0x24424c3c, 0xaf82000c, 0x03e00008, 0x00000000, + 0x27bdffe8, 0xafb00010, 0x27500100, 0xafbf0014, 0x8e02001c, 0x14400003, + 0x3c020800, 0x0000000d, 0x3c020800, 0x8c430020, 0x10600020, 0x00001021, + 0x0e00148e, 0x00000000, 0x8f830018, 0x8e020000, 0xac620000, 0x8f840018, + 0x8e02001c, 0xac820004, 0x8f830018, 0xac600008, 0x8f840018, 0x8e020018, + 0xac82000c, 0x8f850018, 0x96020012, 0xaca20010, 0x8f830018, 0x3c026000, + 0xac600014, 0x8f840018, 0x8c434448, 0x3c020800, 0xac830018, 0x944358ce, + 0x8f840018, 0x3c024012, 0x00621825, 0xac83001c, 0x0e0014cc, 0x24040001, + 0x00001021, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x3c020800, + 0x97430078, 0x9444002e, 0x00001021, 0x00641821, 0x3063fffe, 0x03e00008, + 0xa7630010, 0x27bdfff0, 0x00001021, 0x03e00008, 0x27bd0010, 0x8f420100, + 0x34420001, 0xaf4200a4, 0x03e00008, 0x00001021, 0x27bdffe0, 0xafbf0018, + 0xafb10014, 0xafb00010, 0x9362007e, 0x30d000ff, 0x16020031, 0x00808821, + 0x8f620178, 0x1602002e, 0x00000000, 0x9362007f, 0x1602002b, 0x00000000, + 0x9362007a, 0x16020004, 0x00000000, 0x0000000d, 0x00000000, 0x240009d2, + 0x0e0013e6, 0x00000000, 0x3c039000, 0x34630001, 0x3c048000, 0x02231825, + 0xa370007a, 0xaf430020, 0x8f420020, 0x00441024, 0x1440fffd, 0x00000000, + 0x9362007d, 0x3c038000, 0xa362007d, 0x8f640074, 0x34630001, 0x02231825, + 0xaf430020, 0x04810006, 0x3c038000, 0x02202021, 0x0e000470, 0x240509dd, + 0x0a001138, 0x8fbf0018, 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, + 0x3c031000, 0xaf5101c0, 0xa34201c4, 0xaf4301f8, 0x0a001138, 0x8fbf0018, + 0x0000000d, 0x00000000, 0x240009e2, 0x8fbf0018, 0x8fb10014, 0x8fb00010, + 0x03e00008, 0x27bd0020, 0x27bdffe8, 0x30a500ff, 0x3c029000, 0x34420001, + 0x00803821, 0x00e21025, 0x3c038000, 0xafbf0010, 0xaf420020, 0x8f420020, + 0x00431024, 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, 0x00a21025, + 0xa362007d, 0x8f640074, 0x34630001, 0x00e31825, 0xaf430020, 0x04810006, + 0x3c038000, 0x00e02021, 0x0e000470, 0x00c02821, 0x0a001161, 0x8fbf0010, + 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, 0xaf4701c0, + 0xa34201c4, 0xaf4301f8, 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x3c020800, + 0x8c430020, 0x27bdffe8, 0xafb00010, 0x27500100, 0x10600024, 0xafbf0014, + 0x0e00148e, 0x00000000, 0x8f830018, 0x8e020000, 0xac620000, 0x8f840018, + 0x8e020004, 0xac820004, 0x8f830018, 0x8e020018, 0xac620008, 0x8f840018, + 0x8e03001c, 0xac83000c, 0x9602000c, 0x9203000a, 0x8f840018, 0x00021400, + 0x00431025, 0xac820010, 0x8f830018, 0x3c026000, 0xac600014, 0x8f840018, + 0x8c434448, 0xac830018, 0x96020008, 0x3c030800, 0x946458ce, 0x8f850018, + 0x00021400, 0x00441025, 0x24040001, 0x0e0014cc, 0xaca2001c, 0x8fbf0014, + 0x8fb00010, 0x03e00008, 0x27bd0018, 0x3c020800, 0x8c430020, 0x27bdffe8, + 0xafb00010, 0x27500100, 0x10600020, 0xafbf0014, 0x0e00148e, 0x00000000, + 0x8f820018, 0xac400000, 0x8f830018, 0xac600004, 0x8f820018, 0xac400008, + 0x8f830018, 0xac60000c, 0x9602000c, 0x9603000e, 0x8f840018, 0x00021400, + 0x00431025, 0xac820010, 0x8f830018, 0x3c026000, 0xac600014, 0x8f840018, + 0x8c434448, 0xac830018, 0x96020008, 0x3c030800, 0x946458ce, 0x8f850018, + 0x00021400, 0x00441025, 0x24040001, 0x0e0014cc, 0xaca2001c, 0x8fbf0014, + 0x8fb00010, 0x03e00008, 0x27bd0018, 0x27bdffe8, 0xafb00010, 0x27500100, + 0xafbf0014, 0x9602000c, 0x10400024, 0x00802821, 0x3c020800, 0x8c430020, + 0x1060003a, 0x8fbf0014, 0x0e00148e, 0x00000000, 0x8f840018, 0x8e030000, + 0xac830000, 0x9602000c, 0x8f840018, 0x00021400, 0xac820004, 0x8f830018, + 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, 0xac600010, 0x8f820018, + 0xac400014, 0x8f850018, 0x3c026000, 0x8c434448, 0x24040001, 0x3c020800, + 0xaca30018, 0x944358ce, 0x8f850018, 0x3c02400b, 0x00621825, 0x0e0014cc, + 0xaca3001c, 0x0a0011ff, 0x8fbf0014, 0x93620005, 0x30420010, 0x14400015, + 0x3c029000, 0x34420001, 0x00a21025, 0xaf420020, 0x3c038000, 0x8f420020, + 0x00431024, 0x1440fffd, 0x00000000, 0x3c038000, 0x93620005, 0x34630001, + 0x00a02021, 0x00a31825, 0x24055852, 0x34420010, 0xa3620005, 0x0e000766, + 0xaf430020, 0x0a0011ff, 0x8fbf0014, 0x0000000d, 0x8fbf0014, 0x8fb00010, + 0x03e00008, 0x27bd0018, 0x3c020800, 0x8c430020, 0x27bdffe8, 0xafb00010, + 0x27500100, 0x10600022, 0xafbf0014, 0x0e00148e, 0x00000000, 0x8f840018, + 0x8e020004, 0xac820000, 0x9603000c, 0x9762002c, 0x8f840018, 0x00031c00, + 0x00431025, 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, + 0x8f830018, 0xac600010, 0x8f820018, 0xac400014, 0x8f850018, 0x3c026000, + 0x8c434448, 0x24040001, 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, + 0x3c02400e, 0x00621825, 0x0e0014cc, 0xaca3001c, 0x0e00122e, 0x8e040000, + 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x3c038000, 0x8f420278, + 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, 0xaf440240, 0xa3420244, + 0x03e00008, 0xaf430278, 0x3c020800, 0x8c430020, 0x27bdffe0, 0xafb10014, + 0x00808821, 0xafb20018, 0x00c09021, 0xafb00010, 0x30b0ffff, 0x1060001c, + 0xafbf001c, 0x0e00148e, 0x00000000, 0x8f820018, 0xac510000, 0x8f840018, + 0x00101400, 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, + 0x8f830018, 0xac600010, 0x8f820018, 0xac520014, 0x8f840018, 0x3c026000, + 0x8c434448, 0x3c020800, 0xac830018, 0x944358ce, 0x8f840018, 0x3c024019, + 0x00621825, 0xac83001c, 0x0e0014cc, 0x24040001, 0x8fbf001c, 0x8fb20018, + 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe8, 0x27450100, + 0xafbf0010, 0x94a3000c, 0x240200c1, 0x14620031, 0x00803021, 0x3c029000, + 0x34420001, 0x00c21025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, + 0x1440fffd, 0x3c028000, 0x34420001, 0x3c049000, 0x34840001, 0x3c058000, + 0x24030012, 0x00c21025, 0x00c42025, 0xa363003f, 0xaf420020, 0xaf440020, + 0x8f420020, 0x00451024, 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, + 0x34420020, 0xa362007d, 0x8f640074, 0x34630001, 0x00c31825, 0xaf430020, + 0x04810006, 0x3c038000, 0x00c02021, 0x0e000470, 0x24050906, 0x0a0012a1, + 0x8fbf0010, 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, + 0xaf4601c0, 0xa34201c4, 0xaf4301f8, 0x0a0012a1, 0x8fbf0010, 0x00c02021, + 0x94a5000c, 0x24060001, 0x0e000fb1, 0x2407090e, 0x8fbf0010, 0x03e00008, + 0x27bd0018, 0x3c020800, 0x8c430020, 0x27bdffe0, 0xafb00010, 0x00808021, + 0xafb20018, 0x00a09021, 0xafb10014, 0x30d100ff, 0x1060001c, 0xafbf001c, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac500000, 0x8f840018, 0x24020001, + 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f820018, 0xac520014, 0x8f840018, 0x3c026000, 0x8c434448, + 0x3c020800, 0xac830018, 0x944358ce, 0x8f840018, 0x3c024010, 0x00621825, + 0xac83001c, 0x0e0014cc, 0x02202021, 0x8fbf001c, 0x8fb20018, 0x8fb10014, + 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe8, 0xafbf0014, 0xafb00010, + 0x93620005, 0x30420001, 0x10400036, 0x00808021, 0x3c029000, 0x34420001, + 0x02021025, 0xaf420020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x93620023, 0x34420004, 0xa3620023, 0x93630005, 0x3c048000, + 0x3c020800, 0x306300fe, 0xa3630005, 0x8c430020, 0x34840001, 0x02042025, + 0xaf440020, 0x10600020, 0x8fbf0014, 0x0e00148e, 0x00000000, 0x8f820018, + 0xac500000, 0x93630082, 0x9362003f, 0x8f840018, 0x00031a00, 0x00431025, + 0xac820004, 0x8f830018, 0xac600008, 0x8f820018, 0xac40000c, 0x8f830018, + 0xac600010, 0x8f820018, 0xac400014, 0x8f840018, 0x3c026000, 0x8c434448, + 0x3c020800, 0xac830018, 0x944358ce, 0x8f840018, 0x3c02400a, 0x00621825, + 0xac83001c, 0x0e0014cc, 0x24040001, 0x8fbf0014, 0x8fb00010, 0x03e00008, + 0x27bd0018, 0x3c020800, 0x8c430020, 0x27bdffe0, 0xafb10014, 0x00808821, + 0xafb20018, 0x00a09021, 0xafb00010, 0x30d000ff, 0x1060002f, 0xafbf001c, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac510000, 0x8f830018, 0xac700004, + 0x8f820018, 0xac520008, 0x8f830018, 0xac60000c, 0x8f820018, 0xac400010, + 0x9763006a, 0x00032880, 0x50a00001, 0x24050001, 0x97630068, 0x93640081, + 0x3c020800, 0x8c46004c, 0x00652821, 0x00852804, 0x00c5102b, 0x54400001, + 0x00a03021, 0x3c020800, 0x8c440050, 0x00c4182b, 0x54600001, 0x00c02021, + 0x8f830018, 0x2402fffe, 0x00822824, 0x3c026000, 0xac650014, 0x8f840018, + 0x8c434448, 0x3c020800, 0xac830018, 0x944358ce, 0x8f840018, 0x3c024011, + 0x00621825, 0xac83001c, 0x0e0014cc, 0x24040001, 0x8fbf001c, 0x8fb20018, + 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe8, 0xafbf0014, + 0xafb00010, 0x8f440100, 0x27500100, 0x8f650050, 0x0e0010fc, 0x9206001b, + 0x3c020800, 0x8c430020, 0x1060001d, 0x8e100018, 0x0e00148e, 0x00000000, + 0x8f840018, 0x8f420100, 0xac820000, 0x8f830018, 0xac700004, 0x8f840018, + 0x8f620050, 0xac820008, 0x8f830018, 0xac60000c, 0x8f820018, 0xac400010, + 0x8f830018, 0x3c026000, 0xac600014, 0x8f850018, 0x8c434448, 0x24040001, + 0x3c020800, 0xaca30018, 0x944358ce, 0x8f850018, 0x3c02401c, 0x00621825, + 0x0e0014cc, 0xaca3001c, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, + 0x8f430238, 0x3c020800, 0x04610013, 0x8c44009c, 0x2406fffe, 0x3c050800, + 0x3c038000, 0x2484ffff, 0x14800009, 0x00000000, 0x97420078, 0x8ca3007c, + 0x24420001, 0x00461024, 0x24630001, 0xa7620010, 0x03e00008, 0xaca3007c, + 0x8f420238, 0x00431024, 0x1440fff3, 0x2484ffff, 0x8f420140, 0x3c031000, + 0xaf420200, 0x03e00008, 0xaf430238, 0x27bdffe8, 0x3c029000, 0xafbf0010, + 0x8f450140, 0x34420001, 0x3c038000, 0x00a21025, 0xaf420020, 0x8f420020, + 0x00431024, 0x1440fffd, 0x00000000, 0x9362007d, 0x3c038000, 0x34420001, + 0xa362007d, 0x8f640074, 0x34630001, 0x00a31825, 0xaf430020, 0x04810006, + 0x3c038000, 0x00a02021, 0x0e000470, 0x24050ac7, 0x0a0013b9, 0x8fbf0010, + 0x8f4201f8, 0x00431024, 0x1440fffd, 0x24020002, 0x3c031000, 0xaf4501c0, + 0xa34201c4, 0xaf4301f8, 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x0000000d, + 0x03e00008, 0x00000000, 0x0000000d, 0x03e00008, 0x00000000, 0x24020001, + 0x03e00008, 0xa7620010, 0x9362003f, 0x304400ff, 0x3883000e, 0x2c630001, + 0x38820010, 0x2c420001, 0x00621825, 0x14600003, 0x24020012, 0x14820003, + 0x00000000, 0x03e00008, 0x00001021, 0x9363007e, 0x9362007a, 0x14620006, + 0x00000000, 0x9363007e, 0x24020001, 0x24630001, 0x03e00008, 0xa363007e, + 0x9362007e, 0x8f630178, 0x304200ff, 0x14430006, 0x00000000, 0x9363000b, + 0x24020001, 0x24630001, 0x03e00008, 0xa363000b, 0x03e00008, 0x00001021, + 0x9362000b, 0x10400023, 0x00001021, 0xa360000b, 0x9362003f, 0x304400ff, + 0x3883000e, 0x2c630001, 0x38820010, 0x2c420001, 0x00621825, 0x14600017, + 0x00001821, 0x24020012, 0x10820014, 0x00000000, 0x9363007e, 0x9362007a, + 0x14620007, 0x00000000, 0x9362007e, 0x24030001, 0x24420001, 0xa362007e, + 0x03e00008, 0x00601021, 0x9362007e, 0x8f630178, 0x304200ff, 0x14430005, + 0x00001821, 0x9362000b, 0x24030001, 0x24420001, 0xa362000b, 0x03e00008, + 0x00601021, 0x03e00008, 0x00000000, 0x24040001, 0xaf64000c, 0x8f6300dc, + 0x8f6200cc, 0x50620001, 0xa7640010, 0xa7640012, 0xa7640014, 0x03e00008, + 0xa7640016, 0x3c020800, 0x8c430020, 0x27bdffe8, 0x1060001b, 0xafbf0010, + 0x0e00148e, 0x00000000, 0x8f820018, 0xac400000, 0x8f830018, 0xac600004, + 0x8f820018, 0xac400008, 0x8f830018, 0xac60000c, 0x8f820018, 0xac400010, + 0x8f830018, 0x3c026000, 0xac600014, 0x8f840018, 0x8c434448, 0x3c020800, + 0xac830018, 0x944358ce, 0x8f840018, 0x3c024020, 0x00621825, 0xac83001c, + 0x0e0014cc, 0x24040001, 0x8fbf0010, 0x03e00008, 0x27bd0018, 0x3c020800, + 0x8c430020, 0x27bdffe0, 0xafb00010, 0x00a08021, 0xafb10014, 0x00c08821, + 0xafb20018, 0x00e09021, 0x1060001e, 0xafbf001c, 0x0e00148e, 0x00000000, + 0x8f840018, 0x8f420100, 0xac820000, 0x8f830018, 0xac700004, 0x8f820018, + 0xac510008, 0x8f830018, 0xac72000c, 0x8f840018, 0x8fa20030, 0xac820010, + 0x8f830018, 0x8fa20034, 0xac620014, 0x8f840018, 0x3c026000, 0x8c434448, + 0x3c020800, 0xac830018, 0x944358ce, 0x8f840018, 0x3c0240c9, 0x00621825, + 0xac83001c, 0x0e0014cc, 0x24040001, 0x8fbf001c, 0x8fb20018, 0x8fb10014, + 0x8fb00010, 0x03e00008, 0x27bd0020, 0x3c020800, 0x8c430020, 0x27bdffe8, + 0xafb00010, 0x27500100, 0x1060001d, 0xafbf0014, 0x0e00148e, 0x00000000, + 0x8f830018, 0x8e020004, 0xac620000, 0x8f840018, 0x8e020018, 0xac820004, + 0x8f850018, 0x8e020000, 0xaca20008, 0x8f830018, 0xac60000c, 0x8f820018, + 0xac400010, 0x8f830018, 0xac600014, 0x8f820018, 0xac400018, 0x96030008, + 0x3c020800, 0x944458ce, 0x8f850018, 0x00031c00, 0x00641825, 0x24040001, + 0x0e0014cc, 0xaca3001c, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, + 0x3c060800, 0x24c558c0, 0x3c02000a, 0x03421821, 0x94640006, 0x94a2000a, + 0x00441023, 0x00021400, 0x00021c03, 0x04610006, 0xa4a40006, 0x0000000d, + 0x00000000, 0x2400005a, 0x0a0014a3, 0x24020001, 0x8f820014, 0x0062102b, + 0x14400002, 0x00001021, 0x24020001, 0x304200ff, 0x1040001c, 0x274a0400, + 0x3c07000a, 0x3c020800, 0x244558c0, 0x94a9000a, 0x8f880014, 0x03471021, + 0x94430006, 0x00402021, 0xa4a30006, 0x94820006, 0xa4a20006, 0x01221023, + 0x00021400, 0x00021403, 0x04410006, 0x0048102b, 0x0000000d, 0x00000000, + 0x2400005a, 0x0a0014be, 0x24020001, 0x14400002, 0x00001021, 0x24020001, + 0x304200ff, 0x1440ffec, 0x03471021, 0x24c458c0, 0x8c820010, 0xaf420038, + 0x8c830014, 0x3c020005, 0xaf43003c, 0xaf420030, 0xaf800010, 0xaf8a0018, + 0x03e00008, 0x00000000, 0x27bdffe0, 0x8f820010, 0x8f850018, 0x3c070800, + 0x24e858c0, 0xafbf001c, 0xafb20018, 0xafb10014, 0xafb00010, 0x9503000a, + 0x8d060014, 0x00009021, 0x309000ff, 0x00e08821, 0x24420001, 0x24a50020, + 0x24630001, 0xaf820010, 0xaf850018, 0xa503000a, 0x24c30020, 0x3c028000, + 0x04c10007, 0xad030014, 0x00621024, 0x14400005, 0x262258c0, 0x8d020010, + 0x24420001, 0xad020010, 0x262258c0, 0x9444000a, 0x94450018, 0x0010102b, + 0x00a41826, 0x2c630001, 0x00621825, 0x1060001c, 0x3c030006, 0x8f820010, + 0x24120001, 0x00021140, 0x00431025, 0xaf420030, 0x00000000, 0x00000000, + 0x00000000, 0x27450400, 0x8f420000, 0x30420010, 0x1040fffd, 0x262258c0, + 0x9444000a, 0x94430018, 0xaf800010, 0xaf850018, 0x14830012, 0x262758c0, + 0x0e00155a, 0x00000000, 0x1600000e, 0x262758c0, 0x0e00148e, 0x00000000, + 0x0a001517, 0x262758c0, 0x00041c00, 0x00031c03, 0x00051400, 0x00021403, + 0x00621823, 0x18600002, 0x3c026000, 0xac400808, 0x262758c0, 0x94e2000e, + 0x94e3000c, 0x24420001, 0xa4e2000e, 0x3042ffff, 0x50430001, 0xa4e0000e, + 0x12000005, 0x3c02000a, 0x94e2000a, 0xa74200a2, 0x0a001554, 0x02401021, + 0x03421821, 0x94640006, 0x94e2000a, 0x00441023, 0x00021400, 0x00021c03, + 0x04610006, 0xa4e40006, 0x0000000d, 0x00000000, 0x2400005a, 0x0a001536, + 0x24020001, 0x8f820014, 0x0062102b, 0x14400002, 0x00001021, 0x24020001, + 0x304200ff, 0x1040001b, 0x3c020800, 0x3c06000a, 0x244558c0, 0x94a8000a, + 0x8f870014, 0x03461021, 0x94430006, 0x00402021, 0xa4a30006, 0x94820006, + 0xa4a20006, 0x01021023, 0x00021400, 0x00021403, 0x04410006, 0x0047102b, + 0x0000000d, 0x00000000, 0x2400005a, 0x0a001550, 0x24020001, 0x14400002, + 0x00001021, 0x24020001, 0x304200ff, 0x1440ffec, 0x03461021, 0x02401021, + 0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, + 0x3c020800, 0x244558c0, 0x94a3001a, 0x8ca40024, 0x00403021, 0x000318c0, + 0x00832021, 0xaf44003c, 0x8ca20020, 0xaf420038, 0x3c020050, 0x34420008, + 0xaf420030, 0x00000000, 0x00000000, 0x00000000, 0x8f420000, 0x30420020, + 0x1040fffd, 0x00000000, 0x8f430400, 0x24c658c0, 0xacc30010, 0x8f420404, + 0x3c030020, 0xacc20014, 0xaf430030, 0x94c40018, 0x94c3001c, 0x94c2001a, + 0x94c5001e, 0x00832021, 0x24420001, 0xa4c2001a, 0x3042ffff, 0x14450002, + 0xa4c40018, 0xa4c0001a, 0x03e00008, 0x00000000, 0x8f820010, 0x3c030006, + 0x00021140, 0x00431025, 0xaf420030, 0x00000000, 0x00000000, 0x00000000, + 0x27430400, 0x8f420000, 0x30420010, 0x1040fffd, 0x00000000, 0xaf800010, + 0xaf830018, 0x03e00008, 0x00000000, 0x27bdffe8, 0xafb00010, 0x3c100800, + 0x261058c0, 0x3c05000a, 0x02002021, 0x03452821, 0xafbf0014, 0x0e0015b0, + 0x2406000a, 0x96020002, 0x9603001e, 0x3042000f, 0x24420003, 0x00431804, + 0x24027fff, 0x0043102b, 0xaf830014, 0x10400004, 0x00000000, 0x0000000d, + 0x00000000, 0x24000043, 0x0e00155a, 0x00000000, 0x8fbf0014, 0x8fb00010, + 0x03e00008, 0x27bd0018, 0x10c00007, 0x00000000, 0x8ca20000, 0x24c6ffff, + 0x24a50004, 0xac820000, 0x14c0fffb, 0x24840004, 0x03e00008, 0x00000000, + 0x0a0015c1, 0x00a01021, 0xac860000, 0x00000000, 0x00000000, 0x24840004, + 0x00a01021, 0x1440fffa, 0x24a5ffff, 0x03e00008, 0x00000000, 0x3c036000, + 0x8c642b7c, 0x3c036010, 0x8c6553fc, 0x00041582, 0x00042302, 0x308403ff, + 0x00052d82, 0x00441026, 0x0002102b, 0x0005282b, 0x00451025, 0x1440000d, + 0x3c020050, 0x34420004, 0xaf400038, 0xaf40003c, 0xaf420030, 0x00000000, + 0x00000000, 0x8f420000, 0x30420020, 0x1040fffd, 0x3c020020, 0xaf420030, + 0x0000000d, 0x03e00008, 0x00000000, 0x3c020050, 0x34420004, 0xaf440038, + 0xaf45003c, 0xaf420030, 0x00000000, 0x00000000, 0x8f420000, 0x30420020, + 0x1040fffd, 0x3c020020, 0xaf420030, 0x03e00008, 0x00000000, 0x00000000}; static u32 bnx2_COM_b06FwData[(0x0/4) + 1] = { 0x0 }; static u32 bnx2_COM_b06FwRodata[(0x58/4) + 1] = { @@ -687,368 +989,952 @@ static u32 bnx2_RXP_b06FwBssAddr = 0x08005900; static int bnx2_RXP_b06FwBssLen = 0x13a4; static u32 bnx2_RXP_b06FwSbssAddr = 0x080058e0; static int bnx2_RXP_b06FwSbssLen = 0x1c; -static u8 bnx2_RXP_b06FwText[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x07, 0x87, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xed, 0x5c, 0x5d, 0x6c, - 0x1c, 0xd7, 0x75, 0x3e, 0xf3, 0x43, 0x71, 0x49, 0x91, 0xd4, 0x70, 0xb9, - 0x62, 0x57, 0x12, 0x65, 0xed, 0x8a, 0x43, 0x71, 0x6d, 0x31, 0xce, 0x50, - 0x58, 0xdb, 0x82, 0xb1, 0x48, 0xc7, 0xb3, 0xa4, 0xc8, 0x24, 0x02, 0x42, - 0x1b, 0x42, 0xab, 0xa4, 0xa9, 0xc1, 0x90, 0x72, 0x91, 0x22, 0x2c, 0xa0, - 0x1a, 0x79, 0xf0, 0x43, 0x10, 0x2f, 0x56, 0x3f, 0xa6, 0xd1, 0x8d, 0x96, - 0xb6, 0x1c, 0x53, 0x08, 0x82, 0x82, 0xe5, 0x52, 0x52, 0x0b, 0x2c, 0xb4, - 0x96, 0xed, 0x36, 0x7e, 0xa8, 0x23, 0x9a, 0x92, 0x8d, 0xa6, 0x68, 0x81, - 0x22, 0xad, 0xd1, 0xf4, 0x4d, 0x95, 0x9a, 0x4a, 0x75, 0x5f, 0xd4, 0xa2, - 0x48, 0xda, 0x46, 0xcd, 0xf4, 0xfb, 0xee, 0xcc, 0x88, 0xd4, 0x9a, 0xb2, - 0x2c, 0x3b, 0x0d, 0x62, 0x74, 0x0e, 0x30, 0xd8, 0xb9, 0x7f, 0xe7, 0xef, - 0x9e, 0x73, 0xee, 0x39, 0x77, 0x28, 0x7d, 0xa5, 0x43, 0xda, 0x25, 0x84, - 0x4e, 0x3c, 0x99, 0xc3, 0xcf, 0x3c, 0xfd, 0xe0, 0xc3, 0x0f, 0xee, 0xc1, - 0xeb, 0xb0, 0xa1, 0x6d, 0xd0, 0xa3, 0xfe, 0x18, 0x62, 0x88, 0x21, 0x86, - 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, - 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, - 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, - 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0x18, 0x62, 0x88, - 0x21, 0x86, 0x18, 0x62, 0x88, 0x21, 0x86, 0xff, 0xef, 0x60, 0x88, 0x58, - 0xfc, 0xed, 0x0c, 0x1f, 0x49, 0xe8, 0x85, 0xcb, 0x07, 0x3d, 0x5b, 0x12, - 0x46, 0x61, 0x69, 0x66, 0xda, 0x16, 0x71, 0xeb, 0xbb, 0x33, 0x45, 0xf9, - 0x1f, 0xbf, 0x94, 0x32, 0x85, 0xfd, 0xdb, 0x0b, 0x37, 0x9f, 0x7d, 0xf3, - 0x91, 0xec, 0x8d, 0x05, 0x43, 0x12, 0x56, 0xe1, 0xe8, 0xb0, 0xb5, 0x4b, - 0x12, 0x7d, 0x58, 0xf3, 0xdd, 0xc1, 0xcf, 0x59, 0xd2, 0x15, 0xe1, 0xba, - 0xee, 0xbf, 0x39, 0x68, 0xc9, 0x2b, 0x8d, 0x94, 0x5c, 0x68, 0x6c, 0xdf, - 0x24, 0x5d, 0xd9, 0x52, 0x09, 0xfd, 0x6e, 0x8a, 0xe3, 0x96, 0x94, 0xab, - 0x2d, 0xe2, 0x2a, 0xba, 0x7d, 0x5a, 0x71, 0xfe, 0x3e, 0xcd, 0x9b, 0x7f, - 0x9e, 0xff, 0x1e, 0x24, 0xa5, 0xcb, 0x7d, 0x68, 0xf7, 0xa1, 0xcd, 0xf7, - 0x81, 0xf4, 0x94, 0x98, 0x72, 0xa4, 0x91, 0x90, 0xa3, 0xd5, 0x8c, 0xe8, - 0x05, 0x71, 0xbd, 0xbc, 0x9d, 0x2e, 0xa3, 0x6f, 0xea, 0x00, 0xdb, 0x29, - 0xe0, 0xf9, 0x0e, 0xd7, 0x59, 0x5e, 0x5e, 0x4a, 0xb7, 0xc6, 0x14, 0x0d, - 0x8e, 0xb1, 0x0f, 0xbf, 0x58, 0x5f, 0xae, 0x76, 0x00, 0x6f, 0xd6, 0x71, - 0x41, 0xdc, 0x73, 0x2c, 0xd0, 0xf6, 0xfd, 0xdf, 0x75, 0x32, 0xb2, 0xe2, - 0x74, 0x81, 0xa7, 0x16, 0x69, 0xb5, 0xc5, 0xd2, 0x0b, 0xb6, 0xb5, 0x22, - 0x6d, 0x1c, 0xeb, 0x34, 0x0a, 0xbe, 0x3f, 0x9d, 0x97, 0xae, 0xa0, 0x6f, - 0xb7, 0xe2, 0x63, 0x72, 0x42, 0xc3, 0xbc, 0x57, 0x49, 0x0f, 0x3a, 0xe2, - 0x3b, 0x7f, 0xf3, 0x52, 0xac, 0x6c, 0x97, 0xc9, 0x54, 0xf6, 0xa0, 0x1b, - 0xd0, 0x74, 0x3d, 0x67, 0x2b, 0x70, 0x6a, 0xe0, 0x4f, 0xdb, 0x81, 0xf5, - 0xee, 0x0a, 0x68, 0x1a, 0x85, 0xcd, 0x62, 0x6c, 0x66, 0x9f, 0xe8, 0x3b, - 0x87, 0x93, 0xe1, 0x78, 0x97, 0x36, 0x32, 0x6f, 0x88, 0x6e, 0xff, 0x81, - 0xe6, 0xd5, 0x7a, 0xe5, 0xd8, 0xbc, 0x8e, 0x77, 0x5d, 0xae, 0xe6, 0x4b, - 0x9a, 0xdb, 0xa8, 0x68, 0xde, 0xd9, 0x59, 0xad, 0x78, 0xd6, 0x94, 0xa3, - 0xb6, 0x7f, 0xe1, 0xb4, 0x73, 0x42, 0x1b, 0x39, 0x7b, 0x46, 0x1b, 0x3d, - 0xfb, 0x86, 0x36, 0xde, 0xd8, 0xb2, 0x49, 0xda, 0xb3, 0xd0, 0x1e, 0x71, - 0x90, 0xbf, 0x4f, 0x87, 0xba, 0xec, 0xa2, 0xde, 0x4a, 0xe4, 0x7d, 0x9f, - 0xf3, 0x86, 0xe6, 0x55, 0x6d, 0x8b, 0xfb, 0xe6, 0xa6, 0x22, 0x1a, 0xed, - 0x72, 0x74, 0xde, 0x94, 0x63, 0xd5, 0x94, 0x3c, 0x57, 0x2d, 0x29, 0x5a, - 0x86, 0x5d, 0xd2, 0xbc, 0x06, 0xc7, 0x2b, 0xa0, 0x75, 0x42, 0xdb, 0x07, - 0x9a, 0xde, 0x59, 0x29, 0x5d, 0x71, 0xe6, 0x40, 0xaf, 0x03, 0x78, 0xff, - 0x58, 0x1b, 0x6d, 0xf4, 0x6a, 0xde, 0xc9, 0x9b, 0xe2, 0x39, 0x59, 0xeb, - 0x4b, 0x62, 0xba, 0xb0, 0x01, 0xc8, 0x0c, 0xfd, 0x38, 0xd0, 0x49, 0xca, - 0xf7, 0xf5, 0x82, 0xff, 0x2c, 0x74, 0x6f, 0x5d, 0xa1, 0xfc, 0x8d, 0x5e, - 0x29, 0xcf, 0x53, 0xd7, 0xa6, 0x36, 0x52, 0xf5, 0x2f, 0x78, 0x8e, 0xf4, - 0x19, 0xe2, 0xfb, 0x47, 0x9d, 0x81, 0xf4, 0x21, 0x39, 0x03, 0xdc, 0x75, - 0xad, 0xd8, 0xa0, 0xae, 0xc1, 0xdf, 0x2d, 0x39, 0x02, 0xbd, 0x15, 0x9d, - 0x5e, 0x99, 0xb4, 0xb2, 0x2e, 0xf6, 0x68, 0x53, 0x20, 0x57, 0x32, 0xb4, - 0x17, 0xd2, 0xe7, 0xde, 0x67, 0xd3, 0x9e, 0xa1, 0xcb, 0x53, 0x2f, 0x3d, - 0xdf, 0xb3, 0x38, 0xb4, 0x91, 0x32, 0x43, 0xff, 0xf2, 0x45, 0xcf, 0xf6, - 0xb6, 0xb4, 0x48, 0x29, 0x6d, 0x48, 0x16, 0xfb, 0xb4, 0x43, 0x4e, 0x3b, - 0x22, 0x87, 0x2a, 0xd0, 0x8d, 0x6d, 0x5a, 0x8b, 0x62, 0x67, 0xca, 0x32, - 0x50, 0x32, 0x75, 0x74, 0x26, 0x49, 0x97, 0x3a, 0xd2, 0xe5, 0x7a, 0x9e, - 0x7a, 0xa2, 0x3d, 0x7f, 0x28, 0x5d, 0x69, 0xab, 0xba, 0x5a, 0xd5, 0xd3, - 0xf8, 0x2f, 0x5d, 0x4f, 0xd4, 0xc9, 0x72, 0x28, 0xb7, 0x03, 0xdc, 0x8f, - 0x40, 0x5f, 0xe2, 0xea, 0xc3, 0x0f, 0xb1, 0x6f, 0x93, 0x51, 0xb0, 0xd3, - 0x17, 0x61, 0x14, 0x7a, 0x61, 0x37, 0x64, 0x19, 0xa6, 0xee, 0xe0, 0xc3, - 0x1f, 0x49, 0x5e, 0xf9, 0xd5, 0x90, 0x97, 0xfc, 0xdb, 0x32, 0x55, 0x49, - 0x80, 0x06, 0x65, 0xd4, 0xe5, 0xbd, 0x7c, 0x64, 0x1b, 0x7b, 0x20, 0x5f, - 0x5e, 0xa6, 0xbe, 0x45, 0x7f, 0xa2, 0xfd, 0xf3, 0x9d, 0xb2, 0xfe, 0xcc, - 0xbf, 0xee, 0x7c, 0x92, 0xf6, 0x96, 0x7c, 0x27, 0xe4, 0x78, 0x35, 0xc9, - 0x3d, 0xd4, 0x56, 0x54, 0x6c, 0x8a, 0x64, 0x14, 0xdd, 0x28, 0x74, 0x48, - 0x51, 0xed, 0xf7, 0x5e, 0xd0, 0x43, 0x2c, 0xa8, 0xf2, 0xbd, 0xa0, 0x64, - 0x9b, 0xb6, 0xed, 0xcc, 0x11, 0xc9, 0xc2, 0xbe, 0x45, 0x8e, 0xcc, 0x99, - 0x32, 0x6d, 0xff, 0x63, 0xa7, 0xb4, 0x2f, 0xdf, 0x6f, 0xa8, 0xb8, 0xae, - 0xf7, 0x6e, 0x90, 0x4d, 0xe0, 0x77, 0xf9, 0x7e, 0x5d, 0xe4, 0xa6, 0x59, - 0xc8, 0x5a, 0x23, 0x08, 0xf6, 0x46, 0x81, 0xb1, 0x4c, 0x43, 0x2c, 0x93, - 0x44, 0x8b, 0x4d, 0x7d, 0xf9, 0xfe, 0xf8, 0xf0, 0xdd, 0xf5, 0x75, 0x64, - 0x9e, 0xb4, 0xa9, 0x2f, 0xc6, 0xa8, 0x12, 0xf4, 0xc1, 0xf8, 0x74, 0xbb, - 0xae, 0x8a, 0xa1, 0xae, 0x46, 0xfe, 0xef, 0xed, 0xc2, 0xf5, 0xaa, 0xa2, - 0x79, 0xce, 0xbb, 0xa1, 0x2f, 0xd8, 0x32, 0x02, 0x7f, 0x37, 0xec, 0x4f, - 0xcb, 0x91, 0x54, 0x76, 0xc2, 0x95, 0xc0, 0xe6, 0xaf, 0xad, 0xb1, 0xf9, - 0xd1, 0xbb, 0xc8, 0x75, 0x3c, 0x94, 0xcb, 0x0d, 0xe5, 0x1a, 0x85, 0x5c, - 0x63, 0x90, 0x6b, 0xe5, 0x23, 0xc8, 0xb5, 0xf2, 0x91, 0xe5, 0xd2, 0xa4, - 0xec, 0x3c, 0x08, 0x5a, 0xa6, 0xfc, 0xab, 0x13, 0xd8, 0xf2, 0xbf, 0x38, - 0x9f, 0x14, 0x19, 0x7c, 0x7f, 0x70, 0xd8, 0x16, 0xef, 0x5b, 0xe0, 0xd5, - 0x71, 0x40, 0x8b, 0xef, 0xef, 0x97, 0xe1, 0x6e, 0xfe, 0x38, 0x8b, 0x7d, - 0x5d, 0xcf, 0x1f, 0x29, 0x87, 0x3e, 0x7c, 0xef, 0xfe, 0xa8, 0x6b, 0x1f, - 0x55, 0x0e, 0xc6, 0x9c, 0x4f, 0x35, 0x9d, 0xab, 0x1f, 0x56, 0x86, 0xf5, - 0x63, 0xca, 0x2f, 0x4f, 0x86, 0xc7, 0x64, 0x72, 0x33, 0xed, 0xa9, 0xa4, - 0x8d, 0x0c, 0x92, 0xef, 0xb5, 0xfc, 0x4a, 0x26, 0xe0, 0x0d, 0x39, 0xd1, - 0xd2, 0x46, 0x39, 0xb2, 0x60, 0x49, 0x69, 0xe9, 0x4e, 0x71, 0x57, 0x03, - 0x6f, 0xb4, 0x47, 0xf6, 0x7d, 0xd2, 0x7c, 0x2a, 0xc8, 0x2b, 0x2e, 0x54, - 0x91, 0x83, 0x56, 0x13, 0x72, 0xd9, 0x48, 0xcb, 0x9b, 0x83, 0x87, 0xe5, - 0xf3, 0xd5, 0x24, 0xe8, 0x31, 0x9f, 0x2c, 0xe7, 0x10, 0x17, 0xb5, 0xb2, - 0x63, 0x08, 0x79, 0xaf, 0xd9, 0x9c, 0x13, 0xc4, 0x96, 0x72, 0x10, 0x83, - 0x5d, 0x6f, 0x50, 0xe5, 0x14, 0x90, 0x4f, 0x64, 0x0c, 0xb1, 0xb7, 0x66, - 0xb3, 0xcd, 0xfe, 0xa0, 0xef, 0xb3, 0x95, 0x5e, 0xad, 0xc8, 0xbc, 0x64, - 0xf0, 0xa6, 0x4c, 0x3b, 0x41, 0xdf, 0xe7, 0x2a, 0xa3, 0x9b, 0x98, 0x1f, - 0x1a, 0x05, 0xc9, 0x94, 0x9d, 0xf7, 0x7c, 0xd7, 0xba, 0x7d, 0xcd, 0xfa, - 0x78, 0xb2, 0x13, 0x81, 0xce, 0x45, 0xfb, 0xaa, 0xad, 0xf7, 0xb6, 0x4a, - 0x09, 0x27, 0x5d, 0xd6, 0x1a, 0x47, 0xe7, 0xbe, 0x4a, 0x79, 0x5b, 0xab, - 0xdc, 0x34, 0x80, 0x3f, 0x6d, 0x68, 0x62, 0x1e, 0xaa, 0x94, 0xbb, 0xd9, - 0xa6, 0xbe, 0x74, 0x4d, 0x12, 0xa3, 0x15, 0x5f, 0xae, 0x3a, 0x41, 0xee, - 0x63, 0x68, 0x7a, 0x6f, 0x5b, 0xb8, 0x56, 0xd7, 0x76, 0x39, 0x97, 0x44, - 0x3a, 0x0e, 0x55, 0xc4, 0x2a, 0x56, 0x76, 0x39, 0x6f, 0x4b, 0xb9, 0xa7, - 0x6d, 0x75, 0x5d, 0x8a, 0xeb, 0x76, 0x0e, 0xaf, 0x9d, 0xbb, 0xcb, 0xb9, - 0x28, 0xe5, 0x2d, 0x6d, 0xab, 0xb4, 0xd2, 0x58, 0xdb, 0x17, 0xac, 0xe5, - 0xf8, 0x66, 0x71, 0xbb, 0x39, 0x47, 0xef, 0x6d, 0xbf, 0x45, 0x43, 0x32, - 0xc5, 0x4a, 0xb9, 0xa7, 0x7d, 0x15, 0xaf, 0x4d, 0xbc, 0xde, 0x1a, 0xbc, - 0xc4, 0xd9, 0xbe, 0x8a, 0x33, 0x07, 0x9c, 0x43, 0xab, 0x38, 0x39, 0x7e, - 0x58, 0x8a, 0x38, 0xd3, 0x5a, 0x0a, 0x32, 0xbc, 0x54, 0xc9, 0x48, 0x79, - 0x28, 0x01, 0xdd, 0xf7, 0x1f, 0xfc, 0x9a, 0xaa, 0x43, 0xcc, 0x61, 0x0f, - 0xba, 0x32, 0x55, 0x5e, 0x87, 0xd8, 0x08, 0xdb, 0xf8, 0x5a, 0x5d, 0x86, - 0x17, 0xeb, 0xa6, 0x1c, 0x6f, 0x70, 0xbf, 0x98, 0xe3, 0x05, 0x75, 0xc6, - 0x85, 0x46, 0x4e, 0xdb, 0x87, 0xbd, 0x66, 0x9d, 0xb0, 0xaf, 0x61, 0x6a, - 0xa3, 0x3c, 0x1f, 0x80, 0x97, 0x76, 0x7e, 0xac, 0x41, 0xdb, 0x79, 0x03, - 0xb6, 0x41, 0xce, 0xa3, 0x9c, 0xbd, 0x95, 0xb9, 0x53, 0x66, 0xd1, 0x51, - 0x75, 0x88, 0x56, 0xcb, 0x77, 0x20, 0x07, 0x4d, 0xa0, 0xd6, 0x80, 0xcd, - 0xdb, 0x78, 0x6f, 0x70, 0xde, 0x32, 0xe6, 0x6d, 0xe0, 0x3c, 0xec, 0xcd, - 0x25, 0xe5, 0x0f, 0xa6, 0xcd, 0xf1, 0x77, 0xb1, 0xc7, 0x68, 0xd7, 0x59, - 0x57, 0x58, 0x02, 0x5f, 0xc1, 0x3e, 0xa2, 0x6e, 0x48, 0xed, 0x60, 0x7e, - 0x8f, 0xb9, 0x19, 0xcc, 0xcd, 0x66, 0x18, 0xcf, 0x3d, 0xfb, 0x99, 0x0e, - 0xe9, 0x42, 0xbb, 0xce, 0x35, 0xd9, 0x0c, 0x72, 0x5b, 0xdf, 0xcb, 0xb7, - 0xc9, 0x4a, 0xca, 0xbf, 0x60, 0xd8, 0xd1, 0xdc, 0x08, 0x6f, 0xf3, 0x5c, - 0xe6, 0xc5, 0xc4, 0xbd, 0x21, 0xcc, 0x83, 0xc7, 0xc5, 0x6d, 0xfc, 0x49, - 0xb7, 0x74, 0xb9, 0xf8, 0x8d, 0xe6, 0x4c, 0x6f, 0x0e, 0x6a, 0x2e, 0xbe, - 0xb7, 0x50, 0x3e, 0x17, 0xe7, 0xa1, 0x56, 0xac, 0x66, 0x26, 0x59, 0x1f, - 0x15, 0xeb, 0x6c, 0xef, 0x85, 0x3f, 0x04, 0x75, 0xd7, 0x85, 0x5b, 0xbe, - 0x70, 0x19, 0x7a, 0x4b, 0x43, 0x6f, 0x29, 0x39, 0xdf, 0x60, 0x9d, 0xe6, - 0x42, 0x5f, 0x19, 0xf1, 0x1a, 0xe3, 0x58, 0x2b, 0x87, 0x81, 0x03, 0x3a, - 0x17, 0x47, 0x2f, 0x64, 0x65, 0xca, 0xda, 0x1d, 0xf1, 0x00, 0x5c, 0x88, - 0x1f, 0x85, 0x36, 0xf4, 0xf1, 0x1d, 0x9a, 0x53, 0xff, 0x86, 0x7f, 0x94, - 0xed, 0x09, 0xbd, 0x30, 0xd6, 0xd4, 0xbf, 0x6e, 0xfc, 0xa1, 0x1c, 0x68, - 0x33, 0x06, 0x31, 0xfe, 0xe8, 0xa8, 0xf3, 0x18, 0x8b, 0x48, 0xd7, 0x92, - 0x23, 0x4b, 0x23, 0xdc, 0x37, 0x8b, 0xf1, 0xa7, 0x5c, 0xe7, 0x9e, 0x29, - 0x5c, 0xc0, 0x19, 0xad, 0xf1, 0xfd, 0x11, 0x87, 0x6b, 0x7c, 0x99, 0x70, - 0x3a, 0xc4, 0x48, 0x96, 0xb4, 0xc7, 0x07, 0x11, 0x7b, 0x1e, 0xe0, 0x3e, - 0x32, 0x06, 0x6d, 0x17, 0xb0, 0xea, 0xb4, 0x3c, 0x3c, 0xc8, 0x75, 0xa0, - 0xdd, 0x2a, 0x7a, 0x92, 0x34, 0xf3, 0x21, 0x4f, 0x43, 0xdd, 0x81, 0xbe, - 0x06, 0xac, 0x40, 0x7f, 0x9f, 0xe9, 0x5e, 0xd5, 0x1f, 0xd7, 0x35, 0xf3, - 0xcb, 0x18, 0x96, 0x90, 0x81, 0x33, 0x1b, 0x65, 0xe7, 0xa2, 0x25, 0xf6, - 0x99, 0x55, 0xfe, 0x76, 0x9e, 0x5b, 0xcb, 0x5f, 0xf4, 0x7f, 0x15, 0x5c, - 0xd0, 0xc5, 0x8e, 0xfa, 0x1e, 0x4b, 0x05, 0xb8, 0xa3, 0xf6, 0x7b, 0xe1, - 0x5e, 0xf1, 0xfd, 0x99, 0x70, 0x4f, 0xb0, 0x07, 0x88, 0x95, 0xe7, 0x6f, - 0xc5, 0xa9, 0x0c, 0xf6, 0x06, 0xb6, 0xa7, 0xe2, 0x11, 0xe3, 0x18, 0xed, - 0xbb, 0x63, 0xd2, 0x2c, 0xb0, 0x8e, 0xe6, 0x3e, 0xc9, 0x44, 0xb9, 0x22, - 0xa5, 0xad, 0x85, 0x67, 0x7d, 0xd8, 0xcf, 0xa4, 0xa5, 0x6c, 0xaf, 0x63, - 0xaf, 0x97, 0x37, 0xa0, 0x1b, 0x8c, 0xc1, 0x26, 0xf5, 0x42, 0x42, 0x8a, - 0x8d, 0x44, 0xc2, 0x3c, 0x31, 0xf0, 0x23, 0xcf, 0x48, 0x24, 0xf4, 0x13, - 0x81, 0x9d, 0x4d, 0xd6, 0x6f, 0x20, 0x56, 0x6a, 0x72, 0x74, 0xe8, 0x86, - 0xcf, 0x1a, 0xd8, 0xdb, 0x0b, 0x9b, 0x1b, 0x82, 0xcf, 0x80, 0x8f, 0x72, - 0xa3, 0xa3, 0x37, 0xe0, 0xed, 0x2b, 0x11, 0x8f, 0xa6, 0x8e, 0xdc, 0xd3, - 0xcb, 0xfb, 0xbe, 0x51, 0xd8, 0x90, 0x98, 0xce, 0x8f, 0x6f, 0xd1, 0xcf, - 0xed, 0xdf, 0x62, 0x9c, 0x2b, 0x6d, 0x01, 0x3e, 0xdd, 0xcb, 0xe3, 0xf7, - 0x9c, 0xc8, 0x44, 0x15, 0x3a, 0xdf, 0x03, 0x3d, 0x59, 0xf0, 0xc5, 0x3d, - 0xa6, 0xca, 0xd1, 0xf5, 0x3d, 0x2f, 0x6e, 0x0a, 0x70, 0xf0, 0xfd, 0x27, - 0x7e, 0x70, 0x86, 0x5e, 0x0e, 0xfb, 0x7e, 0x3f, 0xdc, 0x87, 0x5f, 0x45, - 0xb9, 0x78, 0x5e, 0x44, 0xb2, 0xad, 0x3d, 0x37, 0xb2, 0xe3, 0x25, 0x9c, - 0x33, 0xa7, 0x1d, 0xdf, 0x7f, 0x07, 0xcf, 0x35, 0xa7, 0xd9, 0x46, 0xde, - 0x7f, 0xf6, 0x31, 0x07, 0xf8, 0x2c, 0xce, 0xbd, 0xd1, 0xa6, 0xb3, 0xff, - 0x5e, 0xcf, 0xbd, 0x7b, 0x3f, 0xfb, 0xc9, 0xf3, 0x1d, 0x7d, 0xef, 0x03, - 0xce, 0xfe, 0x0f, 0x5c, 0x77, 0x0f, 0x3e, 0x1b, 0xd8, 0x6d, 0xb1, 0xd1, - 0x1c, 0x5f, 0xee, 0xd5, 0x7f, 0x7f, 0xad, 0xfb, 0x76, 0xff, 0xb5, 0xbb, - 0x6f, 0xf7, 0xdf, 0xcd, 0xdd, 0xbf, 0x18, 0xff, 0xcd, 0x01, 0x0f, 0x7d, - 0x70, 0xad, 0xff, 0xae, 0xe7, 0x93, 0xd4, 0xf7, 0xf3, 0x3d, 0xe5, 0xa1, - 0xce, 0x30, 0x1f, 0x52, 0xe7, 0xf5, 0x17, 0xa7, 0x6d, 0xef, 0x7e, 0x53, - 0x4a, 0xb9, 0x16, 0xc9, 0xe6, 0x6a, 0xb2, 0x43, 0x8e, 0x3b, 0x22, 0x4b, - 0xaa, 0x16, 0x31, 0x51, 0x8b, 0x0f, 0xa0, 0x3e, 0x0b, 0xf4, 0xba, 0xa4, - 0xf4, 0xf2, 0x02, 0x78, 0x89, 0xf0, 0x74, 0xdd, 0x05, 0x0f, 0x71, 0x10, - 0x17, 0xf1, 0x0c, 0xe2, 0x7c, 0xb7, 0xd7, 0xc1, 0x85, 0x73, 0xea, 0x25, - 0xd4, 0x64, 0xb6, 0xde, 0xa3, 0x07, 0x67, 0xb2, 0x5b, 0x96, 0xdd, 0xe9, - 0xeb, 0xf2, 0x05, 0x9e, 0x59, 0x0a, 0xae, 0xce, 0x21, 0x56, 0x0f, 0x8d, - 0x85, 0x75, 0xd2, 0xdc, 0x41, 0xcf, 0x8e, 0xee, 0x49, 0x78, 0x47, 0x92, - 0x90, 0x92, 0x9a, 0xb5, 0x04, 0x1d, 0x68, 0x72, 0x0d, 0x67, 0xd0, 0xd5, - 0xb9, 0x76, 0xe0, 0x45, 0xee, 0x77, 0x20, 0xbb, 0x57, 0xb4, 0x7e, 0xab, - 0x55, 0x6b, 0x87, 0x2f, 0x65, 0xc4, 0x55, 0x6d, 0x9e, 0xd3, 0xa7, 0x66, - 0x16, 0x2b, 0xc8, 0x03, 0x6d, 0x9c, 0xaf, 0x79, 0xbc, 0xd7, 0x49, 0x43, - 0x93, 0x2b, 0x73, 0xba, 0xfc, 0xd3, 0x9c, 0x21, 0xff, 0x8c, 0x3a, 0xf4, - 0x9a, 0x7d, 0x6a, 0xe6, 0xb4, 0x2d, 0xf7, 0x81, 0xd5, 0xf0, 0x0e, 0x4f, - 0x76, 0x9a, 0x42, 0x5b, 0x1d, 0x48, 0xff, 0x8e, 0x20, 0xff, 0xc1, 0x9a, - 0x2b, 0x73, 0xa4, 0xb5, 0x76, 0x8d, 0xf4, 0x22, 0x1f, 0x83, 0x5d, 0x0f, - 0x30, 0x27, 0xe2, 0x7c, 0xd4, 0xab, 0x03, 0xd6, 0x3e, 0xc5, 0x5b, 0x42, - 0x16, 0xeb, 0x9c, 0x6f, 0x82, 0xb7, 0x2e, 0x9c, 0x31, 0x59, 0x6b, 0x52, - 0xfe, 0xb0, 0x5b, 0xe5, 0xaa, 0x1a, 0xfb, 0x0d, 0xb5, 0xc7, 0xef, 0xef, - 0xe7, 0xde, 0x1b, 0x32, 0x95, 0x62, 0x9b, 0x63, 0x59, 0xd4, 0x9c, 0xc4, - 0x97, 0xdd, 0xeb, 0x0a, 0x79, 0x0e, 0xde, 0xaf, 0x08, 0x65, 0xdb, 0x6d, - 0x5d, 0x97, 0xd7, 0x7d, 0xf7, 0x00, 0xe5, 0x89, 0x72, 0x8b, 0x39, 0x9f, - 0xb1, 0xd8, 0x28, 0xcc, 0xc0, 0x8e, 0xbf, 0x2a, 0xdf, 0x6f, 0x1c, 0x92, - 0xef, 0x35, 0x26, 0xe5, 0xcf, 0x1a, 0x5f, 0x96, 0x3f, 0x6d, 0x1c, 0x94, - 0xd7, 0x1b, 0x07, 0xe4, 0xb5, 0xc6, 0x84, 0xbc, 0xda, 0xd8, 0x0f, 0x1b, - 0x1f, 0x87, 0x8d, 0x9f, 0x9a, 0x99, 0xac, 0xf7, 0xcb, 0xd4, 0x49, 0xc4, - 0x20, 0xe7, 0x1b, 0xba, 0xba, 0xe3, 0xb3, 0xe9, 0xe7, 0x2d, 0x32, 0xad, - 0xee, 0xaf, 0x34, 0xe4, 0x89, 0x2d, 0xbc, 0x2b, 0x7c, 0xc5, 0x33, 0x2e, - 0x87, 0xf1, 0xe8, 0xe1, 0x94, 0xb4, 0x03, 0xbf, 0xca, 0x4b, 0x4d, 0x9e, - 0xdb, 0x62, 0x86, 0xf7, 0x9c, 0x87, 0x24, 0xc9, 0xfb, 0xb0, 0x9c, 0x67, - 0xa0, 0xde, 0x5e, 0xd7, 0x27, 0x73, 0xb4, 0x65, 0xe8, 0xc6, 0x95, 0x43, - 0xb0, 0x53, 0xc3, 0x7e, 0xcb, 0xa5, 0x1e, 0x16, 0x97, 0x28, 0xf7, 0x46, - 0x59, 0x5c, 0xa0, 0x6f, 0xff, 0x1b, 0x64, 0x6c, 0x97, 0xda, 0x82, 0x89, - 0xb9, 0x6e, 0x98, 0xab, 0x6c, 0xa7, 0x3d, 0x00, 0x1f, 0xf1, 0x7e, 0x10, - 0x4e, 0xab, 0x09, 0x27, 0xf1, 0x24, 0x54, 0x0c, 0x08, 0x70, 0x5b, 0x52, - 0x5b, 0x4a, 0xca, 0xc2, 0x42, 0x0f, 0x9e, 0x94, 0x2c, 0xd4, 0x6d, 0x3c, - 0x39, 0x3c, 0x43, 0x78, 0xd2, 0xb0, 0x53, 0xca, 0xc8, 0xd8, 0x12, 0xc9, - 0x88, 0x78, 0x5c, 0xed, 0x0d, 0x6b, 0x2a, 0xf2, 0xa3, 0x85, 0xfc, 0x74, - 0x87, 0x7d, 0x1d, 0x52, 0xab, 0x38, 0x32, 0x55, 0xfd, 0x94, 0x3e, 0xa5, - 0x74, 0x07, 0xfc, 0x95, 0x21, 0xb4, 0xef, 0x0f, 0xdb, 0x8f, 0xca, 0xf4, - 0xbc, 0xc8, 0xca, 0xcb, 0x03, 0x7a, 0x51, 0xb5, 0xf7, 0xa2, 0xad, 0xa3, - 0x9d, 0x0d, 0xdb, 0xcc, 0x8f, 0x0e, 0xe0, 0x71, 0xd5, 0xf3, 0xf5, 0xea, - 0xb8, 0x3c, 0x55, 0xed, 0x77, 0x5e, 0x87, 0xcd, 0xbd, 0x65, 0x46, 0xf7, - 0xd2, 0x04, 0x24, 0x79, 0xf6, 0x56, 0x75, 0xf7, 0xf1, 0x04, 0xe2, 0xad, - 0x9b, 0x34, 0xe5, 0x6f, 0x4f, 0x64, 0xad, 0xa7, 0xf5, 0x5c, 0x52, 0xda, - 0x7d, 0xff, 0x71, 0x3b, 0x3b, 0x3b, 0xa9, 0x77, 0xca, 0xdf, 0xbf, 0x98, - 0x91, 0x85, 0xb3, 0x5b, 0x65, 0xa1, 0x06, 0x99, 0x1a, 0xbf, 0x8e, 0x7d, - 0x35, 0xe5, 0xea, 0x9e, 0x47, 0xb1, 0x27, 0x8c, 0x5d, 0x49, 0xe4, 0x6c, - 0x1b, 0xc4, 0xec, 0x25, 0x5d, 0x49, 0x98, 0x85, 0x9c, 0x1c, 0x81, 0xdf, - 0x4f, 0xdb, 0xb9, 0x1e, 0x69, 0xc7, 0x7b, 0x7d, 0x04, 0x7c, 0x5b, 0x32, - 0xd5, 0x6b, 0xc9, 0x99, 0xc1, 0x68, 0xff, 0xb6, 0x62, 0x6e, 0x46, 0x16, - 0xcf, 0x66, 0xf0, 0x9b, 0x83, 0xfd, 0xec, 0x94, 0x57, 0x6a, 0xfd, 0xb2, - 0x54, 0xdb, 0x2a, 0x8b, 0xb5, 0xe6, 0x7d, 0xe8, 0xec, 0x09, 0xe2, 0x1d, - 0xf1, 0xf4, 0x5b, 0x53, 0xfa, 0x56, 0x71, 0xcd, 0x7e, 0xeb, 0x29, 0xfd, - 0x1f, 0xe4, 0x31, 0x33, 0xa0, 0xa9, 0x17, 0x7e, 0xa4, 0xee, 0x84, 0x26, - 0x79, 0xf6, 0x2a, 0xbc, 0x4f, 0x26, 0x49, 0xfb, 0xf5, 0xc6, 0x07, 0xd1, - 0x59, 0xcb, 0xcf, 0x9d, 0x68, 0x52, 0x06, 0xe2, 0xec, 0xbf, 0x71, 0x52, - 0xef, 0x95, 0xe5, 0x6d, 0x0f, 0x58, 0x4f, 0xea, 0xad, 0x88, 0x01, 0x3f, - 0x97, 0x9f, 0xee, 0xd9, 0x24, 0x3f, 0xfc, 0xcd, 0xec, 0xa9, 0x6f, 0x22, - 0xd9, 0xbf, 0xb2, 0xa7, 0x83, 0x71, 0x01, 0xef, 0xec, 0xcf, 0xde, 0x70, - 0x75, 0xea, 0xe1, 0x2f, 0xa0, 0x87, 0xec, 0x9c, 0xba, 0x9b, 0x56, 0x3c, - 0x90, 0x3e, 0xf5, 0x52, 0x06, 0x6f, 0x18, 0xab, 0xf7, 0x03, 0x57, 0x59, - 0xe9, 0xf9, 0x09, 0x27, 0x7b, 0x03, 0xe9, 0xb0, 0xbf, 0x68, 0xf7, 0xa7, - 0x77, 0xea, 0x3b, 0x64, 0x32, 0xfd, 0x80, 0xf5, 0xb4, 0x6c, 0x21, 0xce, - 0xd9, 0x05, 0xc1, 0xda, 0x79, 0xe2, 0xfb, 0x2b, 0xe0, 0x0b, 0x70, 0x28, - 0xff, 0x51, 0x38, 0x77, 0x59, 0x5f, 0xd7, 0x79, 0xc6, 0x63, 0x0c, 0x71, - 0xe1, 0xe2, 0x10, 0x65, 0x40, 0x82, 0x95, 0xca, 0xa6, 0x5d, 0xfd, 0xc3, - 0xc8, 0x47, 0xfc, 0xfd, 0x56, 0x51, 0x27, 0x0f, 0xe7, 0xc0, 0xcb, 0x4f, - 0xc0, 0x7f, 0x3f, 0x70, 0xa2, 0xf6, 0x48, 0x47, 0x74, 0xff, 0x4e, 0xd1, - 0x7d, 0xad, 0x21, 0xe6, 0x2a, 0x5d, 0xf4, 0xd5, 0x75, 0xc8, 0xdd, 0x07, - 0x7b, 0xb5, 0xf0, 0xcb, 0xbd, 0xe9, 0x0c, 0xf7, 0x98, 0xeb, 0x22, 0xba, - 0x11, 0xbf, 0x5c, 0x73, 0x27, 0x1e, 0xee, 0x75, 0x3e, 0xea, 0xd4, 0x03, - 0x09, 0x79, 0xf7, 0x44, 0xb4, 0x37, 0x07, 0x64, 0xba, 0x0a, 0xdd, 0xed, - 0xea, 0x0f, 0xfc, 0x27, 0x1d, 0xf1, 0x40, 0xde, 0xff, 0x06, 0xbc, 0x07, - 0xb8, 0x5b, 0x0b, 0xcd, 0xba, 0xc3, 0x58, 0x3d, 0xa0, 0x31, 0xb6, 0x0e, - 0x4f, 0x57, 0xf6, 0x44, 0xbe, 0x98, 0x84, 0x5f, 0xed, 0xb6, 0x9e, 0x10, - 0xd6, 0x63, 0xc4, 0x9b, 0x94, 0x1f, 0xbe, 0x0c, 0x1e, 0x92, 0xf4, 0x93, - 0x7f, 0x5f, 0xe3, 0x27, 0x1c, 0xdb, 0x2a, 0x35, 0xd4, 0xd4, 0x5e, 0xde, - 0x94, 0x69, 0x25, 0x03, 0xda, 0x35, 0xfa, 0x77, 0x29, 0xf4, 0xef, 0x47, - 0x80, 0xa3, 0x5d, 0x8c, 0x47, 0x1f, 0xc7, 0x59, 0x9d, 0xcd, 0x2c, 0xeb, - 0xcc, 0x03, 0x76, 0x4b, 0x51, 0xdd, 0x4f, 0xdf, 0x8b, 0xee, 0xa2, 0xd8, - 0x94, 0x96, 0x8b, 0x95, 0x28, 0x2e, 0xa5, 0x71, 0x9e, 0xb4, 0xcb, 0xa5, - 0xb9, 0x28, 0xe6, 0xb5, 0xcb, 0x12, 0xf2, 0x9a, 0x95, 0x97, 0x2c, 0x8c, - 0x25, 0xe5, 0xe2, 0x5c, 0x12, 0x31, 0xab, 0x47, 0x56, 0xe6, 0x7a, 0x30, - 0x96, 0xc2, 0xba, 0x14, 0xe6, 0xdb, 0xb2, 0x52, 0xb1, 0x81, 0x27, 0x87, - 0x76, 0x0e, 0xed, 0x21, 0xb9, 0xa4, 0xbe, 0x17, 0x30, 0x2f, 0x18, 0x42, - 0xdc, 0x62, 0x5e, 0x30, 0x82, 0x18, 0x32, 0x81, 0x27, 0x8a, 0x5d, 0xa7, - 0x66, 0xa6, 0x2a, 0xbc, 0x73, 0x84, 0x0e, 0xac, 0x53, 0x33, 0xd3, 0xb6, - 0x89, 0xba, 0xed, 0x1b, 0xda, 0x54, 0x83, 0x72, 0x41, 0xb7, 0x43, 0x1d, - 0xa2, 0x3f, 0x4a, 0x9b, 0xe4, 0x79, 0x67, 0x20, 0xc6, 0x77, 0x01, 0x9f, - 0x23, 0xfa, 0x6f, 0xd0, 0x17, 0xa0, 0xc3, 0x27, 0xba, 0xe4, 0xd2, 0xcb, - 0x8c, 0x35, 0xae, 0xbc, 0x7a, 0x96, 0x3a, 0x2c, 0xf6, 0xac, 0xea, 0x90, - 0x63, 0x0f, 0xe1, 0x8c, 0xd8, 0x0f, 0x7b, 0x32, 0x33, 0x87, 0x90, 0xcb, - 0x7c, 0x1b, 0xf6, 0x59, 0x66, 0xcd, 0x9d, 0x0e, 0x6a, 0x84, 0x20, 0x06, - 0xa0, 0xdd, 0x47, 0x5d, 0xb1, 0xdd, 0x07, 0xbb, 0xe3, 0x58, 0x9f, 0x1a, - 0x5b, 0x04, 0x8e, 0x60, 0x8c, 0xed, 0xcd, 0xb2, 0xa8, 0xc6, 0x0e, 0xaa, - 0xb1, 0xb2, 0xb2, 0x0f, 0x8e, 0x1d, 0x52, 0xb1, 0xe9, 0x7c, 0x23, 0xea, - 0xdf, 0x88, 0x58, 0xc2, 0x7e, 0xf6, 0xe5, 0x61, 0xeb, 0x7b, 0x71, 0xae, - 0x15, 0x64, 0xa9, 0x81, 0x3a, 0x30, 0xff, 0x7b, 0x98, 0xcb, 0x3d, 0xc8, - 0x9e, 0x2a, 0xe9, 0xe4, 0xf1, 0x20, 0xce, 0x83, 0xfd, 0x21, 0xad, 0xb6, - 0x90, 0xaf, 0x03, 0x61, 0xbb, 0x25, 0xa4, 0x4d, 0x3c, 0x36, 0x70, 0x1c, - 0xc3, 0x5a, 0x17, 0x38, 0x18, 0x63, 0x11, 0x23, 0x52, 0x29, 0xe8, 0x82, - 0x34, 0xdb, 0xa4, 0xac, 0xde, 0xf7, 0xc3, 0x76, 0xb9, 0x16, 0x3a, 0xb4, - 0xa2, 0x75, 0xa5, 0x70, 0xcf, 0x53, 0xea, 0x9c, 0xd1, 0x93, 0x9b, 0xc3, - 0x9c, 0x10, 0x7a, 0x45, 0x9c, 0xd5, 0x93, 0x8c, 0x37, 0xef, 0x84, 0x76, - 0xda, 0x8b, 0xbe, 0x87, 0x44, 0xef, 0x65, 0xdf, 0x51, 0xe0, 0x61, 0xed, - 0x3c, 0x0c, 0x99, 0xd9, 0xe6, 0xfa, 0x6c, 0xd3, 0xfa, 0xc4, 0x3a, 0xeb, - 0x3b, 0x9a, 0xfa, 0x32, 0x52, 0x9b, 0xef, 0x52, 0xf1, 0xf2, 0x7c, 0x18, - 0x2f, 0x17, 0x6b, 0x94, 0x05, 0x7e, 0x96, 0x7f, 0x5b, 0xe9, 0xa2, 0x76, - 0x36, 0xb0, 0xf5, 0xa5, 0x93, 0x3c, 0x17, 0x57, 0xe7, 0xd5, 0xd4, 0xbc, - 0xdf, 0x06, 0xff, 0xba, 0x1c, 0x55, 0x32, 0x70, 0x3e, 0xe6, 0xd5, 0x02, - 0xbf, 0x31, 0x6c, 0xce, 0xa1, 0x8f, 0x44, 0x6b, 0x38, 0xff, 0xe7, 0xa8, - 0x55, 0xbe, 0xac, 0xd6, 0xac, 0xfa, 0x0c, 0xf9, 0x71, 0x42, 0x9e, 0x7b, - 0xc0, 0x5f, 0x67, 0x28, 0x43, 0x7b, 0x28, 0x03, 0xf1, 0xfd, 0x27, 0x70, - 0xb7, 0x61, 0x1e, 0x79, 0xdd, 0x86, 0x3e, 0xbe, 0xff, 0x17, 0xfa, 0x76, - 0x23, 0xff, 0x23, 0x6f, 0x89, 0x26, 0xde, 0xfe, 0x03, 0x63, 0x3d, 0x4a, - 0xb7, 0x35, 0xd4, 0x26, 0x53, 0xbc, 0xef, 0x48, 0xe1, 0x1c, 0x38, 0xb9, - 0x4d, 0xd1, 0xad, 0x9d, 0xbd, 0x86, 0xf1, 0x5e, 0xac, 0x89, 0xda, 0xcd, - 0xb2, 0xe9, 0x58, 0xfb, 0x53, 0x25, 0xcf, 0x62, 0xed, 0x4e, 0xf2, 0x6f, - 0x5b, 0x23, 0x3b, 0xe5, 0x26, 0x4f, 0xe4, 0xa7, 0x1f, 0x4f, 0x2b, 0x72, - 0x21, 0xd8, 0x6d, 0xd2, 0x90, 0xd1, 0x7c, 0x9a, 0xdf, 0xf9, 0x12, 0xbc, - 0x17, 0x1d, 0x19, 0xe4, 0x9e, 0xa1, 0xdd, 0x60, 0x4e, 0x47, 0x7f, 0x4b, - 0xc8, 0x31, 0xd4, 0x24, 0xe5, 0x85, 0x8c, 0x56, 0x3c, 0x99, 0x45, 0x16, - 0xad, 0xbe, 0xd5, 0xc9, 0x8b, 0x4b, 0xb6, 0x7c, 0x1b, 0x7e, 0x7a, 0xb2, - 0x9e, 0x4d, 0x7f, 0x13, 0xf9, 0xc1, 0x91, 0x25, 0xe6, 0x13, 0x3d, 0x29, - 0x65, 0x9b, 0xf3, 0x9a, 0x6c, 0x60, 0x4c, 0x9b, 0x47, 0x7e, 0x6a, 0xdd, - 0x2d, 0x47, 0x82, 0x9f, 0x57, 0xd7, 0xc6, 0x0c, 0xca, 0xb1, 0x36, 0x66, - 0x10, 0x0f, 0x63, 0xc6, 0x4e, 0xec, 0x13, 0x63, 0x06, 0xf6, 0xff, 0x24, - 0x63, 0x86, 0x8d, 0x75, 0x8c, 0x19, 0x79, 0x59, 0xac, 0x32, 0x66, 0xec, - 0x45, 0x9b, 0x31, 0xa3, 0x80, 0x76, 0x10, 0x2f, 0x16, 0x55, 0xbc, 0xc8, - 0x5a, 0xcb, 0xc2, 0x38, 0x81, 0x3c, 0xb1, 0x8a, 0x3c, 0xb1, 0x8a, 0x3c, - 0xb1, 0x8a, 0x3c, 0xb1, 0x8a, 0x3c, 0x11, 0xb6, 0xfe, 0x5a, 0x15, 0x79, - 0x22, 0xfc, 0xe7, 0x3c, 0x72, 0x92, 0xa0, 0xa6, 0x38, 0x8c, 0x9a, 0xc2, - 0xd5, 0xc6, 0xaa, 0xe3, 0xda, 0xbe, 0x2a, 0x6a, 0x43, 0xf5, 0x9d, 0x58, - 0x1f, 0xda, 0x80, 0xba, 0xa8, 0xe6, 0x6c, 0x01, 0x5f, 0xd7, 0xe0, 0x1b, - 0xd4, 0xd3, 0x56, 0x99, 0xca, 0xed, 0x80, 0x7c, 0xd8, 0x7f, 0xfb, 0xfb, - 0xe8, 0x43, 0x3e, 0x9f, 0x63, 0x0d, 0xc2, 0x78, 0xb5, 0x0f, 0x6d, 0x1d, - 0x6d, 0xec, 0xe9, 0x04, 0x7c, 0xc4, 0x7e, 0x90, 0xf9, 0x62, 0x7a, 0x41, - 0x9e, 0xdc, 0x1c, 0xd8, 0xf4, 0x6f, 0x31, 0x27, 0x5e, 0xd3, 0xde, 0x88, - 0x39, 0xf0, 0x17, 0xd8, 0x97, 0x5a, 0x03, 0x5c, 0xba, 0xfd, 0xe7, 0xc4, - 0xd1, 0xb7, 0xe1, 0xd6, 0x1c, 0xda, 0xd5, 0xf7, 0x9a, 0xfa, 0xb2, 0x98, - 0xcf, 0xef, 0xe2, 0x3b, 0xf0, 0xfb, 0x16, 0x7e, 0x61, 0x77, 0xf6, 0x05, - 0xcc, 0xe9, 0xc3, 0xef, 0x77, 0x9a, 0xe6, 0x42, 0x0a, 0xfb, 0x2f, 0xd1, - 0x77, 0x31, 0xa4, 0xc1, 0x6f, 0x89, 0x5f, 0x6a, 0xe2, 0xe3, 0x07, 0xe8, - 0xfb, 0x6b, 0xf4, 0xf9, 0xfe, 0xdb, 0x4e, 0xd4, 0x27, 0xa5, 0x96, 0x70, - 0xef, 0x46, 0xd5, 0xde, 0x69, 0xca, 0xe6, 0x8f, 0x2c, 0xe9, 0xaa, 0x0e, - 0x7a, 0xae, 0x8e, 0xea, 0x08, 0x71, 0xbe, 0xbc, 0x10, 0xd4, 0xad, 0xc7, - 0x51, 0x73, 0x16, 0xab, 0xb4, 0x91, 0x1c, 0xfa, 0x6d, 0x9c, 0x69, 0x32, - 0x69, 0xdc, 0xaa, 0x63, 0x13, 0x89, 0xc9, 0x7a, 0x9b, 0x48, 0x37, 0x69, - 0x32, 0x4f, 0x22, 0x8e, 0xd9, 0x99, 0xe2, 0xc2, 0xec, 0x8c, 0x07, 0x9c, - 0x63, 0x75, 0xae, 0xe5, 0x3c, 0x93, 0xf7, 0x63, 0x4d, 0x74, 0x69, 0x13, - 0x60, 0x06, 0xf4, 0x9e, 0xab, 0x93, 0x7e, 0x40, 0xb3, 0xac, 0x68, 0xda, - 0xe8, 0x8f, 0xea, 0xc7, 0x1c, 0x6a, 0x5d, 0x99, 0x64, 0xed, 0x5c, 0x0c, - 0x69, 0xba, 0x75, 0x49, 0x24, 0x0a, 0xcd, 0xf8, 0x82, 0x8c, 0xf3, 0xb9, - 0xfa, 0xec, 0x8c, 0xfe, 0x42, 0x36, 0xc7, 0x3b, 0x11, 0xd7, 0x9a, 0x9d, - 0x69, 0x1d, 0x48, 0xc8, 0x8f, 0x91, 0xbb, 0x1d, 0x53, 0x34, 0x66, 0x67, - 0x8c, 0x17, 0x02, 0x5b, 0x0c, 0xe8, 0xe0, 0x3c, 0xc9, 0xb7, 0x43, 0x4e, - 0xd2, 0x62, 0x4d, 0x1d, 0x8c, 0x4f, 0xaa, 0x7a, 0xd1, 0x94, 0x2b, 0x15, - 0x45, 0x3b, 0xac, 0xdb, 0xc9, 0xc3, 0xec, 0x8c, 0xfc, 0xd1, 0x2d, 0x1e, - 0xd6, 0x91, 0x87, 0x78, 0x49, 0x27, 0xd0, 0x5b, 0xc0, 0x7f, 0x12, 0xf5, - 0x7b, 0x54, 0xab, 0xfb, 0xfe, 0x8a, 0x93, 0x43, 0x5c, 0xe0, 0x3e, 0xb6, - 0xa8, 0x3c, 0xd7, 0x73, 0x32, 0xbc, 0xef, 0x9b, 0xe3, 0xdf, 0x39, 0x78, - 0xf9, 0x01, 0xd4, 0x4d, 0xbc, 0x1b, 0xa4, 0x7f, 0xe1, 0xf7, 0x36, 0xff, - 0xe2, 0x7c, 0xf6, 0x93, 0xe7, 0x81, 0xf4, 0x55, 0xf0, 0xe7, 0xe5, 0xd1, - 0x87, 0x58, 0x51, 0x6c, 0x44, 0xb8, 0x78, 0xc7, 0xce, 0x39, 0x2a, 0xff, - 0x6e, 0xf2, 0xd1, 0x96, 0xf0, 0xdc, 0xa5, 0x8e, 0xc8, 0x27, 0xf9, 0xe9, - 0x84, 0x4d, 0x90, 0x17, 0xce, 0x8f, 0xee, 0x25, 0xd8, 0xfe, 0xb8, 0x36, - 0x12, 0xdd, 0xa9, 0x7d, 0x9c, 0x3d, 0x8f, 0x74, 0x76, 0x37, 0x7e, 0x88, - 0x83, 0xb4, 0x23, 0xbe, 0x22, 0x9e, 0x88, 0x8f, 0xfc, 0x44, 0xbc, 0x28, - 0x1b, 0x5d, 0x97, 0x9f, 0x60, 0x5d, 0xc0, 0x4f, 0x69, 0x21, 0x0d, 0x9d, - 0x90, 0xa7, 0x11, 0x6d, 0xa4, 0xba, 0xde, 0x1d, 0xc7, 0x0f, 0x5c, 0xc6, - 0xd5, 0xb1, 0x06, 0xef, 0xa1, 0x48, 0x97, 0x7f, 0x3b, 0xb2, 0xa4, 0x8d, - 0x34, 0xf8, 0x9d, 0xa9, 0xae, 0xb9, 0x8d, 0x88, 0xde, 0x5a, 0x9d, 0x46, - 0xbf, 0xbc, 0x2b, 0xff, 0x0c, 0xf6, 0xa9, 0x3b, 0xf8, 0xbb, 0x14, 0x55, - 0x47, 0xb1, 0x6f, 0xb9, 0xd5, 0x73, 0xa2, 0xbf, 0xd3, 0xd9, 0x1f, 0xe6, - 0x43, 0x51, 0x6d, 0x1c, 0xd5, 0x59, 0xea, 0x9e, 0x7d, 0xaf, 0xe7, 0x68, - 0xc8, 0x4f, 0x99, 0x33, 0x05, 0x3a, 0x08, 0xf1, 0xde, 0x91, 0xcf, 0x91, - 0x26, 0x3e, 0x47, 0xc1, 0xe7, 0x3e, 0xf0, 0x39, 0x76, 0x8b, 0xcf, 0x5b, - 0xb6, 0x97, 0x29, 0xc3, 0xf6, 0x46, 0xd6, 0xb5, 0xbd, 0x55, 0x3a, 0xab, - 0x73, 0x83, 0xfb, 0x9a, 0x91, 0x86, 0x2f, 0xc7, 0x9d, 0x8f, 0x53, 0x37, - 0xb7, 0xcb, 0x99, 0x85, 0xbb, 0xd5, 0xb7, 0x11, 0xaf, 0x2a, 0x77, 0x94, - 0x4b, 0xf5, 0x80, 0x9f, 0x1f, 0x2f, 0xb1, 0x3d, 0x12, 0xea, 0x8a, 0x3a, - 0xcb, 0x3a, 0x25, 0xb9, 0x1b, 0x2f, 0xbf, 0xf8, 0x9c, 0x76, 0xa5, 0x12, - 0x9d, 0x4f, 0x5a, 0x78, 0xc6, 0xae, 0xe5, 0x29, 0xfa, 0x6e, 0x32, 0x66, - 0x45, 0xf7, 0x67, 0x22, 0xfc, 0xfe, 0xc0, 0xef, 0x75, 0x6b, 0xbf, 0x13, - 0xf0, 0x7c, 0x8a, 0x78, 0xd7, 0x53, 0x3c, 0x9f, 0xc6, 0x9c, 0x66, 0x19, - 0x5c, 0xd8, 0xa4, 0x9e, 0xe4, 0x98, 0xe7, 0xd0, 0x2f, 0x4c, 0xd0, 0x0c, - 0xee, 0xdd, 0x6a, 0x4b, 0xbe, 0x5c, 0x74, 0x36, 0x06, 0xe7, 0x28, 0x64, - 0xba, 0x6c, 0xf1, 0xfe, 0x0a, 0x31, 0x8c, 0x67, 0x83, 0xb2, 0xb5, 0x16, - 0xf5, 0x5c, 0x39, 0xd0, 0x0e, 0x1d, 0xb3, 0xdd, 0xd6, 0xcb, 0xfb, 0x0a, - 0xca, 0xbc, 0xa0, 0xf6, 0x21, 0xd2, 0x71, 0xf4, 0x7d, 0xae, 0x55, 0x96, - 0xc3, 0xbb, 0xad, 0xc5, 0x8a, 0xef, 0xbf, 0x83, 0x3c, 0xfc, 0x34, 0x74, - 0x5f, 0xae, 0xff, 0xcc, 0x5f, 0x4e, 0xf1, 0x6f, 0xa5, 0x22, 0x9b, 0xd8, - 0xd1, 0xcb, 0x7b, 0x20, 0xf8, 0x96, 0x1c, 0xaf, 0x87, 0x65, 0xbf, 0x70, - 0x9c, 0x7d, 0xff, 0x0d, 0xbe, 0x7d, 0xff, 0xf4, 0xaa, 0x9d, 0x02, 0xfe, - 0x17, 0x33, 0xe1, 0x9b, 0xdd, 0x90, 0x58, 0x00, 0x00, 0x00 }; +static u32 bnx2_RXP_b06FwText[(0x588c/4) + 1] = { + 0x0a000c61, 0x00000000, 0x00000000, 0x0000000d, 0x72787020, 0x322e362e, + 0x31000000, 0x02060103, 0x00000000, 0x0000000d, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, + 0x3c020800, 0x244258e0, 0x3c030800, 0x24636ca4, 0xac400000, 0x0043202b, + 0x1480fffd, 0x24420004, 0x3c1d0800, 0x37bd7ffc, 0x03a0f021, 0x3c100800, + 0x26103184, 0x3c1c0800, 0x279c58e0, 0x0e00104a, 0x00000000, 0x0000000d, + 0x27bdffe8, 0xafb00010, 0xafbf0014, 0x0e000f1d, 0x00808021, 0x1440000d, + 0x00000000, 0x8f820010, 0x10400005, 0x00000000, 0x9743011c, 0x9742011e, + 0x0a000c89, 0x00021400, 0x9743011e, 0x9742011c, 0x00021400, 0x00621825, + 0xaf830004, 0x8f840008, 0x3c020020, 0x34424000, 0x00821824, 0x54620004, + 0x3c020020, 0x8f820014, 0x0a000c9a, 0x34421000, 0x34428000, 0x00821824, + 0x14620004, 0x00000000, 0x8f820014, 0x34428000, 0xaf820014, 0x8f820008, + 0x9743010c, 0x00403021, 0x30421000, 0x10400010, 0x3069ffff, 0x30c20020, + 0x1440000e, 0x24070005, 0x3c021000, 0x00c21024, 0x10400009, 0x3c030dff, + 0x3463ffff, 0x3c020e00, 0x00c21024, 0x0062182b, 0x50600004, 0x24070001, + 0x0a000cb2, 0x3c020800, 0x24070001, 0x3c020800, 0x8c430034, 0x1460001d, + 0x00405821, 0x8f820014, 0x30424000, 0x1440001a, 0x3c020001, 0x3c021f01, + 0x00c24024, 0x3c031000, 0x15030015, 0x3c020001, 0x31220200, 0x14400012, + 0x3c020001, 0x9744010e, 0x24020003, 0xa342018b, 0x97850016, 0x24020002, + 0x34e30002, 0xaf400180, 0xa742018c, 0xa7430188, 0x24840004, 0x30a5bfff, + 0xa744018e, 0xa74501a6, 0xaf4801b8, 0x0a000f19, 0x00001021, 0x3c020001, + 0x00c21024, 0x1040002f, 0x00000000, 0x9742010e, 0x3c038000, 0x3046ffff, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, 0xa342018b, 0x9784000a, + 0x8f850004, 0x8f870014, 0x24020080, 0x24030002, 0xaf420180, 0x24020003, + 0xa743018c, 0xa746018e, 0xa7420188, 0x30e28000, 0xa7440190, 0x1040000c, + 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, 0x24424004, 0x8c430000, + 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, 0x00e21024, 0xaf820014, + 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, 0x00031c00, 0x3084ffff, + 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, 0xaf4201b8, 0x0a000f19, + 0x00001021, 0x8f820014, 0x30434000, 0x10600016, 0x00404021, 0x3c020f00, + 0x00c21024, 0x14400012, 0x00000000, 0x93420116, 0x34424000, 0x03421821, + 0x94650002, 0x2ca21389, 0x1040000b, 0x3c020800, 0x24425900, 0x00051942, + 0x00031880, 0x00621821, 0x30a5001f, 0x8c640000, 0x24020001, 0x00a21004, + 0x00822024, 0x02048025, 0x12000030, 0x3c021000, 0x9742010e, 0x34e80002, + 0x3c038000, 0x24420004, 0x3046ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x24020003, 0xa342018b, 0x9784000a, 0x8f850004, 0x8f870014, 0x24020180, + 0x24030002, 0xaf420180, 0xa743018c, 0xa746018e, 0xa7480188, 0x30e28000, + 0xa7440190, 0x1040000c, 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, + 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, + 0x00e21024, 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, + 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, + 0xaf4201b8, 0x0a000f19, 0x00001021, 0x00c21024, 0x104000c0, 0x3c020800, + 0x8c430030, 0x10600037, 0x31024000, 0x10400035, 0x3c030f00, 0x00c31824, + 0x3c020100, 0x0043102b, 0x14400031, 0x3c030800, 0x9742010e, 0x34e80002, + 0x3c038000, 0x24420004, 0x3046ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x24020003, 0xa342018b, 0x9784000a, 0x8f850004, 0x8f870014, 0x24020080, + 0x24030002, 0xaf420180, 0xa743018c, 0xa746018e, 0xa7480188, 0x30e28000, + 0xa7440190, 0x1040000c, 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, + 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, + 0x00e21024, 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, + 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, + 0xaf4201b8, 0x0a000f19, 0x00001021, 0x3c030800, 0x8c620024, 0x30420008, + 0x10400035, 0x34ea0002, 0x3c020f00, 0x00c21024, 0x14400032, 0x8d620034, + 0x31220200, 0x1040002f, 0x8d620034, 0x9742010e, 0x30e8fffb, 0x3c038000, + 0x24420004, 0x3046ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, + 0xa342018b, 0x9784000a, 0x8f850004, 0x8f870014, 0x24020180, 0x24030002, + 0xaf420180, 0xa743018c, 0xa746018e, 0xa7480188, 0x30e28000, 0xa7440190, + 0x1040000c, 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, 0x24424004, + 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, 0x00e21024, + 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, 0x00031c00, + 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, 0xaf4201b8, + 0x8d620034, 0x8f860008, 0x10400012, 0x30c20100, 0x10400010, 0x3c020f00, + 0x00c21024, 0x3c030200, 0x1043000c, 0x3c020800, 0x8c430038, 0x8f840004, + 0x3c020800, 0x2442003c, 0x2463ffff, 0x00832024, 0x00822021, 0x90830000, + 0x24630004, 0x0a000de1, 0x000329c0, 0x00000000, 0x00061602, 0x3042000f, + 0x000229c0, 0x3c04fc00, 0x00441021, 0x3c030300, 0x0062182b, 0x50600001, + 0x24050800, 0x9742010e, 0x3148ffff, 0x3c038000, 0x24420004, 0x3046ffff, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, 0xa342018b, 0x9783000a, + 0x8f840004, 0x8f870014, 0x24020002, 0xaf450180, 0xa742018c, 0xa746018e, + 0xa7480188, 0x30e28000, 0xa7430190, 0x1040000c, 0xaf4401a8, 0x93420116, + 0x304200fc, 0x005a1021, 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, + 0x3c02ffff, 0x34427fff, 0x00e21024, 0xaf820014, 0x97820016, 0x9743010c, + 0x8f440104, 0x3042bfff, 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, + 0xaf4301ac, 0x3c021000, 0xaf4201b8, 0x0a000f19, 0x00001021, 0x8f424000, + 0x30420100, 0x104000d5, 0x3c020800, 0x8c440024, 0x24030001, 0x1483002f, + 0x00405021, 0x9742010e, 0x34e70002, 0x3c038000, 0x24420004, 0x3045ffff, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, 0xa342018b, 0x9783000a, + 0x8f840004, 0x8f860014, 0x24020002, 0xaf400180, 0xa742018c, 0xa745018e, + 0xa7470188, 0x30c28000, 0xa7430190, 0x1040000c, 0xaf4401a8, 0x93420116, + 0x304200fc, 0x005a1021, 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, + 0x3c02ffff, 0x34427fff, 0x00c21024, 0xaf820014, 0x97820016, 0x9743010c, + 0x8f440104, 0x3042bfff, 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, + 0xaf4301ac, 0x3c021000, 0xaf4201b8, 0x0a000f19, 0x00001021, 0x30820001, + 0x1040002e, 0x30eb0004, 0x9742010e, 0x30e9fffb, 0x3c038000, 0x24420004, + 0x3045ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, 0xa342018b, + 0x9783000a, 0x8f840004, 0x8f860014, 0x24020002, 0xaf400180, 0xa742018c, + 0xa745018e, 0xa7470188, 0x30c28000, 0xa7430190, 0x1040000c, 0xaf4401a8, + 0x93420116, 0x304200fc, 0x005a1021, 0x24424004, 0x8c430000, 0x3063ffff, + 0x14600004, 0x3c02ffff, 0x34427fff, 0x00c21024, 0xaf820014, 0x97820016, + 0x9743010c, 0x8f440104, 0x3042bfff, 0x00031c00, 0x3084ffff, 0x00641825, + 0xa74201a6, 0xaf4301ac, 0x3c021000, 0xaf4201b8, 0x3127ffff, 0x8d420024, + 0x30420004, 0x10400030, 0x8d420024, 0x9742010e, 0x30e9fffb, 0x3c038000, + 0x24420004, 0x3046ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, + 0xa342018b, 0x9784000a, 0x8f850004, 0x8f880014, 0x24020100, 0x24030002, + 0xaf420180, 0xa743018c, 0xa746018e, 0xa7470188, 0x31028000, 0xa7440190, + 0x1040000c, 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, 0x24424004, + 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, 0x01021024, + 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, 0x00031c00, + 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, 0xaf4201b8, + 0x3127ffff, 0x8d420024, 0x30420008, 0x1040002d, 0x00000000, 0x9742010e, + 0x3c038000, 0x24420004, 0x3046ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x24020003, 0xa342018b, 0x9784000a, 0x8f850004, 0x8f880014, 0x24020180, + 0x24030002, 0xaf420180, 0xa743018c, 0xa746018e, 0xa7470188, 0x31028000, + 0xa7440190, 0x1040000c, 0xaf4501a8, 0x93420116, 0x304200fc, 0x005a1021, + 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, + 0x01021024, 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, + 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, + 0xaf4201b8, 0x15600041, 0x00001021, 0x27440180, 0x3c038000, 0x8f4201b8, + 0x00431024, 0x1440fffd, 0x24022000, 0x24030002, 0xa4820008, 0xa083000b, + 0xa4800010, 0x3c021000, 0xaf4201b8, 0x0a000f19, 0x00001021, 0x3c030800, + 0x8c620024, 0x30420001, 0x1040002e, 0x00001021, 0x9742010e, 0x34e70002, + 0x3c038000, 0x24420004, 0x3045ffff, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x24020003, 0xa342018b, 0x9783000a, 0x8f840004, 0x8f860014, 0x24020002, + 0xaf400180, 0xa742018c, 0xa745018e, 0xa7470188, 0x30c28000, 0xa7430190, + 0x1040000c, 0xaf4401a8, 0x93420116, 0x304200fc, 0x005a1021, 0x24424004, + 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, 0x34427fff, 0x00c21024, + 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, 0x3042bfff, 0x00031c00, + 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, 0x3c021000, 0xaf4201b8, + 0x00001021, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x8f4b0070, + 0x93420112, 0x8f840008, 0x00022882, 0x30820100, 0x14400003, 0x24a30003, + 0x03e00008, 0x00001021, 0x30824000, 0x10400010, 0x27424000, 0x00031880, + 0x00431021, 0x8c470000, 0x24a30004, 0x00031880, 0x27424000, 0x00431021, + 0x8c490000, 0x93430116, 0x27424000, 0x306300fc, 0x00431021, 0x8c4a0000, + 0x0a000f45, 0x3c030800, 0x30822000, 0x1040ffea, 0x00031880, 0x27424000, + 0x00431021, 0x8c470000, 0x24a30004, 0x00031880, 0x27424000, 0x00431021, + 0x8c490000, 0x00005021, 0x3c030800, 0x24680100, 0x00071602, 0x00021080, + 0x00481021, 0x8c460000, 0x00071b82, 0x306303fc, 0x01031821, 0x8c640400, + 0x00071182, 0x304203fc, 0x01021021, 0x8c450800, 0x30e300ff, 0x00031880, + 0x01031821, 0x00091602, 0x00021080, 0x01021021, 0x00c43026, 0x8c640c00, + 0x8c431000, 0x00c53026, 0x00091382, 0x304203fc, 0x01021021, 0x8c451400, + 0x312200ff, 0x00021080, 0x01021021, 0x00c43026, 0x00c33026, 0x00091982, + 0x306303fc, 0x01031821, 0x8c641800, 0x8c431c00, 0x00c53026, 0x00c43026, + 0x11400015, 0x00c33026, 0x000a1602, 0x00021080, 0x01021021, 0x8c432000, + 0x000a1382, 0x304203fc, 0x01021021, 0x8c452400, 0x314200ff, 0x00021080, + 0x01021021, 0x00c33026, 0x000a1982, 0x306303fc, 0x01031821, 0x8c642800, + 0x8c432c00, 0x00c53026, 0x00c43026, 0x00c33026, 0x8f430070, 0x3c050800, + 0x8ca43100, 0x2c820020, 0x10400008, 0x006b5823, 0x3c020800, 0x24423104, + 0x00041880, 0x00621821, 0x24820001, 0xac6b0000, 0xaca23100, 0xaf860004, + 0x03e00008, 0x24020001, 0x27bdffe8, 0xafbf0010, 0x8f460128, 0x8f840010, + 0xaf460020, 0x8f450104, 0x8f420100, 0x24030800, 0xaf850008, 0xaf820014, + 0xaf4301b8, 0x1080000a, 0x3c020800, 0x8c430034, 0x10600007, 0x30a22000, + 0x10400005, 0x34a30100, 0x8f82000c, 0xaf830008, 0x24420001, 0xaf82000c, + 0x3c020800, 0x8c4300c0, 0x10600006, 0x3c030800, 0x8c6200c4, 0x24040001, + 0x24420001, 0x0a000fd5, 0xac6200c4, 0x8f820008, 0x3c030010, 0x00431024, + 0x14400009, 0x3c02001f, 0x3c030800, 0x8c620020, 0x00002021, 0x24420001, + 0x0e000c78, 0xac620020, 0x0a000fd5, 0x00402021, 0x3442ff00, 0x14c20009, + 0x2403bfff, 0x3c030800, 0x8c620020, 0x24040001, 0x24420001, 0x0e000c78, + 0xac620020, 0x0a000fd5, 0x00402021, 0x8f820014, 0x00431024, 0x14400006, + 0x00000000, 0xaf400048, 0x0e0011a9, 0xaf400040, 0x0a000fd5, 0x00402021, + 0x0e001563, 0x00000000, 0x00402021, 0x10800005, 0x3c024000, 0x8f430124, + 0x3c026020, 0xac430014, 0x3c024000, 0xaf420138, 0x00000000, 0x8fbf0010, + 0x03e00008, 0x27bd0018, 0x27bdffe0, 0xafbf0018, 0xafb10014, 0xafb00010, + 0x8f420140, 0xaf420020, 0x8f430148, 0x3c027000, 0x00621824, 0x3c023000, + 0x10620021, 0x0043102b, 0x14400006, 0x3c024000, 0x3c022000, 0x10620009, + 0x3c024000, 0x0a001040, 0x00000000, 0x10620045, 0x3c025000, 0x10620047, + 0x3c024000, 0x0a001040, 0x00000000, 0x27440180, 0x3c038000, 0x8f4201b8, + 0x00431024, 0x1440fffd, 0x00000000, 0x8f420148, 0x24030002, 0xa083000b, + 0x00021402, 0xa4820008, 0x8f430148, 0xa4830010, 0x8f420144, 0x3c031000, + 0xac820024, 0xaf4301b8, 0x0a001040, 0x3c024000, 0x8f420148, 0x24030002, + 0x3044ffff, 0x00021402, 0x305000ff, 0x1203000c, 0x27510180, 0x2a020003, + 0x10400005, 0x24020003, 0x0600001d, 0x36053000, 0x0a001027, 0x3c038000, + 0x12020007, 0x00000000, 0x0a001034, 0x00000000, 0x0e00112c, 0x00000000, + 0x0a001025, 0x00402021, 0x0e00113e, 0x00000000, 0x00402021, 0x36053000, + 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020002, 0xa6250008, + 0xa222000b, 0xa6240010, 0x8f420144, 0x3c031000, 0xae220024, 0xaf4301b8, + 0x0a001040, 0x3c024000, 0x0000000d, 0x00000000, 0x240002bf, 0x0a001040, + 0x3c024000, 0x0e001441, 0x00000000, 0x0a001040, 0x3c024000, 0x0e0015ea, + 0x00000000, 0x3c024000, 0xaf420178, 0x00000000, 0x8fbf0018, 0x8fb10014, + 0x8fb00010, 0x03e00008, 0x27bd0020, 0x24020800, 0x03e00008, 0xaf4201b8, + 0x27bdffe8, 0x3c04600c, 0xafbf0014, 0xafb00010, 0x8c825000, 0x3c1a8000, + 0x2403ff7f, 0x3c106000, 0x00431024, 0x3442380c, 0x24030003, 0xac825000, + 0x3c020008, 0xaf430008, 0x8e040808, 0x0342d825, 0x8e020808, 0x3c030800, + 0xac600020, 0x3084fff0, 0x2c840001, 0x3042fff0, 0x38420010, 0x2c420001, + 0xaf840010, 0xaf820000, 0x0e00160c, 0x00000000, 0x0e001561, 0x00000000, + 0x3c020400, 0x3442000c, 0x3c03ffff, 0x34630806, 0xae021948, 0xae03194c, + 0x8e021980, 0x34420200, 0xae021980, 0x8f500000, 0x32020003, 0x1040fffd, + 0x32020001, 0x10400004, 0x32020002, 0x0e000f92, 0x00000000, 0x32020002, + 0x1040fff6, 0x00000000, 0x0e000fe0, 0x00000000, 0x0a001071, 0x00000000, + 0x27bdffe8, 0x3c04600c, 0xafbf0014, 0xafb00010, 0x8c825000, 0x3c1a8000, + 0x2403ff7f, 0x3c106000, 0x00431024, 0x3442380c, 0x24030003, 0xac825000, + 0x3c020008, 0xaf430008, 0x8e040808, 0x0342d825, 0x8e020808, 0x3c030800, + 0xac600020, 0x3084fff0, 0x2c840001, 0x3042fff0, 0x38420010, 0x2c420001, + 0xaf840010, 0xaf820000, 0x0e00160c, 0x00000000, 0x0e001561, 0x00000000, + 0x3c020400, 0x3442000c, 0x3c03ffff, 0x34630806, 0xae021948, 0xae03194c, + 0x8e021980, 0x8fbf0014, 0x34420200, 0xae021980, 0x8fb00010, 0x03e00008, + 0x27bd0018, 0x00804821, 0x30a5ffff, 0x30c6ffff, 0x30e7ffff, 0x3c038000, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020003, 0xa342018b, 0x9783000a, + 0x8f840004, 0x8f880014, 0xaf490180, 0xa745018c, 0xa746018e, 0xa7470188, + 0x31028000, 0xa7430190, 0x1040000c, 0xaf4401a8, 0x93420116, 0x304200fc, + 0x005a1021, 0x24424004, 0x8c430000, 0x3063ffff, 0x14600004, 0x3c02ffff, + 0x34427fff, 0x01021024, 0xaf820014, 0x97820016, 0x9743010c, 0x8f440104, + 0x3042bfff, 0x00031c00, 0x3084ffff, 0x00641825, 0xa74201a6, 0xaf4301ac, + 0x3c021000, 0xaf4201b8, 0x03e00008, 0x00000000, 0x27440180, 0x3c038000, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24022000, 0x24030002, 0xa4820008, + 0xa083000b, 0xa4800010, 0x3c021000, 0xaf4201b8, 0x03e00008, 0x00000000, + 0x27440180, 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, + 0x8f420148, 0x24030002, 0xa083000b, 0x00021402, 0xa4820008, 0x8f430148, + 0xa4830010, 0x8f420144, 0x3c031000, 0xac820024, 0x03e00008, 0xaf4301b8, + 0x27bdffe0, 0xafbf0018, 0xafb10014, 0xafb00010, 0x8f420148, 0x24030002, + 0x3044ffff, 0x00021402, 0x305000ff, 0x1203000c, 0x27510180, 0x2a020003, + 0x10400005, 0x24020003, 0x0600001d, 0x36053000, 0x0a001117, 0x3c038000, + 0x12020007, 0x00000000, 0x0a001124, 0x00000000, 0x0e00112c, 0x00000000, + 0x0a001115, 0x00402021, 0x0e00113e, 0x00000000, 0x00402021, 0x36053000, + 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020002, 0xa6250008, + 0xa222000b, 0xa6240010, 0x8f420144, 0x3c031000, 0xae220024, 0xaf4301b8, + 0x0a001128, 0x8fbf0018, 0x0000000d, 0x00000000, 0x240002bf, 0x8fbf0018, + 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x3084ffff, 0x2c821389, + 0x1040000d, 0x00001021, 0x3c030800, 0x24635900, 0x00042942, 0x00052880, + 0x00a32821, 0x3086001f, 0x8ca40000, 0x24030001, 0x00c31804, 0x00832025, + 0x03e00008, 0xaca40000, 0x03e00008, 0x24020091, 0x3084ffff, 0x2c821389, + 0x1040000e, 0x00001021, 0x3c030800, 0x24635900, 0x00042942, 0x00052880, + 0x00a32821, 0x3086001f, 0x24030001, 0x8ca40000, 0x00c31804, 0x00031827, + 0x00832024, 0x03e00008, 0xaca40000, 0x03e00008, 0x24020091, 0x9482000c, + 0x24870014, 0x00021302, 0x00021080, 0x00824021, 0x00e8182b, 0x1060004f, + 0x00000000, 0x90e30000, 0x2c620009, 0x10400047, 0x3c020800, 0x24425890, + 0x00031880, 0x00621821, 0x8c640000, 0x00800008, 0x00000000, 0x0a0011a4, + 0x24e70001, 0x90e30001, 0x2402000a, 0x54620024, 0x01003821, 0x01071023, + 0x2c42000a, 0x54400020, 0x01003821, 0x3c050800, 0x8ca26c98, 0x24e70002, + 0x34420100, 0xaca26c98, 0x90e30000, 0x90e20001, 0x90e40002, 0x90e60003, + 0x24e70004, 0x24a56c98, 0x00031e00, 0x00021400, 0x00621825, 0x00042200, + 0x00641825, 0x00661825, 0xaca30004, 0x90e20000, 0x90e30001, 0x90e40002, + 0x90e60003, 0x24e70004, 0x00021600, 0x00031c00, 0x00431025, 0x00042200, + 0x00441025, 0x00461025, 0x0a0011a4, 0xaca20008, 0x90e30001, 0x24020004, + 0x1062000e, 0x00601021, 0x0a00119e, 0x01001021, 0x90e30001, 0x24020003, + 0x10620008, 0x00601021, 0x0a00119e, 0x01001021, 0x90e30001, 0x24020002, + 0x14620003, 0x01001021, 0x00601021, 0x00e21021, 0x0a0011a4, 0x00403821, + 0x90e20001, 0x0a0011a4, 0x00e23821, 0x01003821, 0x00e8102b, 0x5440ffb4, + 0x90e30000, 0x03e00008, 0x24020001, 0x27bdff90, 0x3c030800, 0xafbf006c, + 0xafbe0068, 0xafb70064, 0xafb60060, 0xafb5005c, 0xafb40058, 0xafb30054, + 0xafb20050, 0xafb1004c, 0xafb00048, 0xac606c98, 0x93620023, 0x30420010, + 0x1440027c, 0x24020001, 0x93420116, 0x93630005, 0x34424000, 0x30630001, + 0x14600005, 0x0342b021, 0x0e0015e0, 0x00000000, 0x0a001436, 0x8fbf006c, + 0x93420112, 0x8f430104, 0x3c040020, 0x34424000, 0x00641824, 0x10600012, + 0x03422821, 0x27450180, 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x00000000, 0x8f420128, 0xaca20000, 0x8f640040, 0x24030008, 0x240240c1, + 0xa4a20008, 0x24020002, 0xa0a2000b, 0x3c021000, 0x0a0011f1, 0xa0a3000a, + 0x8f420104, 0x3c030040, 0x00431024, 0x1040001d, 0x3c038000, 0x27450180, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x8f420128, 0xaca20000, + 0x8f640040, 0x24030010, 0x240240c1, 0xa4a20008, 0x24020002, 0xa0a3000a, + 0x24030008, 0xa0a2000b, 0x3c021000, 0xa4a30010, 0xa0a00012, 0xa0a00013, + 0xaca00014, 0xaca00024, 0xaca00028, 0xaca0002c, 0xaca40018, 0x0e0015e0, + 0xaf4201b8, 0x0a001436, 0x8fbf006c, 0x8f820000, 0x10400016, 0x00000000, + 0x8f420104, 0x3c030001, 0x00431024, 0x10400011, 0x00000000, 0x8ca3000c, + 0x8f620030, 0x1462022d, 0x24020001, 0x8ca30010, 0x8f62002c, 0x14620229, + 0x24020001, 0x9763003a, 0x96c20000, 0x14430225, 0x24020001, 0x97630038, + 0x96c20002, 0x14430221, 0x24020001, 0xaf400048, 0xaf400054, 0xaf400040, + 0x8f740040, 0x8f650048, 0x00b43023, 0x04c10004, 0x00000000, 0x0000000d, + 0x00000000, 0x240001af, 0x9742011a, 0x3052ffff, 0x12400004, 0x8ed30004, + 0x02721021, 0x0a001228, 0x2451ffff, 0x02608821, 0x92d7000d, 0xa7a00020, + 0xa3a0001a, 0xafa00028, 0x9362003f, 0x32e30004, 0x1060003a, 0x305000ff, + 0x24040012, 0x16040006, 0x24020001, 0x3c040800, 0x8c830028, 0x24630001, + 0x0a001328, 0xac830028, 0x8f620044, 0x16620010, 0x27a60010, 0x27450180, + 0x3c038000, 0x2402001a, 0xa7a20020, 0x24020020, 0xafb40028, 0xa3b00022, + 0xa3a40023, 0xa3a2001a, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, + 0x0a00130d, 0x00000000, 0x8f620044, 0x02621023, 0x0440001a, 0x02651023, + 0x044100d9, 0x24020001, 0x3c020800, 0x8c4300d8, 0x10600004, 0x24020001, + 0xa7a20020, 0x0a00125e, 0xafb40028, 0x2402001a, 0xa7a20020, 0x24020020, + 0xafb40028, 0xa3b00022, 0xa3a40023, 0xa3a2001a, 0x27a60010, 0x27450180, + 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x0a00130d, + 0x00000000, 0x0a001328, 0x24020001, 0x0293f023, 0x1bc00016, 0x025e102a, + 0x54400007, 0x32f700fe, 0x57d2000f, 0x027e9821, 0x32e20001, 0x5440000c, + 0x027e9821, 0x32f700fe, 0x0240f021, 0x3c040800, 0x8c8300c8, 0x00009021, + 0x24020001, 0xa7a20020, 0xafb40028, 0x24630001, 0x0a001282, 0xac8300c8, + 0x025e1023, 0x0a001282, 0x3052ffff, 0x0000f021, 0x24a2ffff, 0x02221823, + 0x1860001f, 0x0072102a, 0x54400019, 0x00a08821, 0x97a20020, 0x3c040800, + 0x8c8300cc, 0xafb40028, 0x34420001, 0x24630001, 0xa7a20020, 0x02741026, + 0x2c420001, 0xac8300cc, 0x2cc30001, 0x00431024, 0x1440000a, 0x02401821, + 0x27a60010, 0x27450180, 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, + 0x00000000, 0x0a00130d, 0x00000000, 0x00a08821, 0x02431023, 0x3052ffff, + 0x0a0012ae, 0x32f700f6, 0x02741023, 0x18400008, 0x97a20020, 0x3c040800, + 0x8c8300d4, 0xafb30028, 0x34420400, 0x24630001, 0xa7a20020, 0xac8300d4, + 0x32e20002, 0x1040001c, 0x32e20010, 0x8f620044, 0x1662000d, 0x27a60010, + 0x97a20020, 0x27450180, 0x3c038000, 0xafb40028, 0x34420001, 0xa7a20020, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x0a00130d, 0x00000000, + 0x97a20020, 0x27450180, 0x3c038000, 0xafb40028, 0x34420001, 0xa7a20020, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x0a00130d, 0x00000000, + 0x54400003, 0x8ed50008, 0x0a001328, 0x24020001, 0x8f630054, 0x26a2ffff, + 0x00431023, 0x18400011, 0x27a60010, 0x97a20020, 0x3c040800, 0x8c8300d0, + 0x27450180, 0x3c078000, 0xafb40028, 0x34420001, 0x24630001, 0xa7a20020, + 0xac8300d0, 0x8f4201b8, 0x00471024, 0x1440fffd, 0x00000000, 0x0a00130d, + 0x00000000, 0x32e20020, 0x10400011, 0x00000000, 0x96c20012, 0x0052102b, + 0x10400008, 0x97a20020, 0x96d20012, 0x12400003, 0x02721021, 0x0a0012f2, + 0x2451ffff, 0x02608821, 0x97a20020, 0x93a3001a, 0x34420008, 0x34630004, + 0xa7a20020, 0xa3a3001a, 0x8f420104, 0x3c030080, 0x00431024, 0x10400037, + 0x3a03000a, 0x0e001151, 0x02c02021, 0x24030002, 0x1443002b, 0x3c030800, + 0x27a60010, 0x97a20020, 0x27450180, 0x3c038000, 0xafb40028, 0x34420001, + 0xa7a20020, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x8f420128, + 0xaca20000, 0x8cc30018, 0x240240c1, 0xa4a20008, 0xaca30018, 0x90c4000a, + 0x24020002, 0xa0a2000b, 0xa0a4000a, 0x94c20010, 0xa4a20010, 0x90c30012, + 0xa0a30012, 0x90c20013, 0xa0a20013, 0x8cc30014, 0xaca30014, 0x8cc20024, + 0xaca20024, 0x8cc30028, 0xaca30028, 0x8cc4002c, 0x24020001, 0x3c031000, + 0xaca4002c, 0xaf4301b8, 0xaf400044, 0xaf400050, 0x0a001436, 0x8fbf006c, + 0x8c626c98, 0x30420100, 0x10400003, 0x24636c98, 0x8c620004, 0xaf62017c, + 0x3a03000a, 0x2c630001, 0x3a02000c, 0x2c420001, 0x00621825, 0x14600003, + 0x2402000e, 0x56020030, 0x00009021, 0x52400008, 0x96c4000e, 0x12400004, + 0xa7b20040, 0x02721021, 0x0a001343, 0x2451ffff, 0x02608821, 0x96c4000e, + 0x93630035, 0x8f62004c, 0x00642004, 0x00952021, 0x00821023, 0x18400015, + 0x00000000, 0x8f620018, 0x02621023, 0x1c400015, 0x97a20020, 0x8f620018, + 0x1662001c, 0x00000000, 0x8f62001c, 0x02a21023, 0x1c40000e, 0x97a20020, + 0x8f62001c, 0x16a20015, 0x00000000, 0x8f620058, 0x00821023, 0x18400011, + 0x97a20020, 0x0a001364, 0xafb10028, 0x8f620058, 0x00821023, 0x0441000b, + 0x97a20020, 0xafb10028, 0xafb30034, 0xafb50038, 0xafa4003c, 0x34420020, + 0x0a00136d, 0xa7a20020, 0x02809821, 0x02608821, 0x8f640058, 0x8f62004c, + 0x02a21023, 0x18400009, 0x00000000, 0x8f620054, 0x02a21023, 0x1c400005, + 0x97a20020, 0xafb10028, 0xafb50024, 0x0a001385, 0x34420040, 0x9742011a, + 0x1440000c, 0x24020014, 0x8f620058, 0x14820009, 0x24020014, 0x8f63004c, + 0x8f620054, 0x10620004, 0x97a20020, 0xafb10028, 0x34420080, 0xa7a20020, + 0x24020014, 0x1202000a, 0x2a020015, 0x10400005, 0x2402000c, 0x12020006, + 0x32e20001, 0x0a0013c6, 0x00000000, 0x24020016, 0x16020035, 0x32e20001, + 0x8f620084, 0x24420001, 0x16a20031, 0x32e20001, 0x24020014, 0x12020021, + 0x2a020015, 0x10400005, 0x2402000c, 0x12020008, 0x32e20001, 0x0a0013c6, + 0x00000000, 0x24020016, 0x1202000c, 0x32e20001, 0x0a0013c6, 0x00000000, + 0x97a30020, 0x2402000e, 0xafb10028, 0xa3b00022, 0xa3a20023, 0xafb50024, + 0x34630054, 0x0a0013c5, 0xa7a30020, 0x97a20020, 0x93a4001a, 0x24030010, + 0xafb10028, 0xa3b00022, 0xa3a30023, 0xafb50024, 0x3442005d, 0x34840002, + 0xa7a20020, 0x0a0013c5, 0xa3a4001a, 0x97a20020, 0x24030012, 0xa3a30023, + 0x93a3001a, 0xafb10028, 0xa3b00022, 0xafb50024, 0x3042fffe, 0x3442005c, + 0x34630002, 0xa7a20020, 0xa3a3001a, 0x32e20001, 0x10400030, 0x2402000c, + 0x12020013, 0x2a02000d, 0x10400005, 0x2402000a, 0x12020008, 0x97a20020, + 0x0a0013f8, 0x32e20009, 0x2402000e, 0x1202001b, 0x32e20009, 0x0a0013f9, + 0x0002102b, 0x93a4001a, 0x24030008, 0xafb10028, 0xa3b00022, 0xa3a30023, + 0x0a0013f4, 0x34420013, 0x97a30020, 0x30620004, 0x14400005, 0x93a2001a, + 0x3463001b, 0xa7a30020, 0x0a0013e7, 0x24030016, 0x3463001b, 0xa7a30020, + 0x24030010, 0xafb10028, 0xa3b00022, 0xa3a30023, 0x34420002, 0x0a0013f7, + 0xa3a2001a, 0x97a20020, 0x93a4001a, 0x24030010, 0xafb10028, 0xa3b00022, + 0xa3a30023, 0x3442001b, 0x34840002, 0xa7a20020, 0xa3a4001a, 0x32e20009, + 0x0002102b, 0x00021023, 0x30420007, 0x12400015, 0x34450003, 0x8f820018, + 0x24030800, 0x27440180, 0x24420001, 0xaf820018, 0x24020004, 0xaf4301b8, + 0xa4850008, 0xa082000b, 0x93430120, 0x00003021, 0x3c021000, 0xa492000e, + 0xac950024, 0xac930028, 0x007e1821, 0xa483000c, 0xaf4201b8, 0x0a001413, + 0x97a20020, 0x24060001, 0x97a20020, 0x10400020, 0x27450180, 0x3c038000, + 0x8f4201b8, 0x00431024, 0x1440fffd, 0x00000000, 0x8f420128, 0xaca20000, + 0x8fa30028, 0x240240c1, 0xa4a20008, 0xaca30018, 0x93a4001a, 0x24020002, + 0xa0a2000b, 0xa0a4000a, 0x97a20020, 0xa4a20010, 0x93a30022, 0xa0a30012, + 0x93a20023, 0xa0a20013, 0x8fa30024, 0xaca30014, 0x8fa20034, 0xaca20024, + 0x8fa30038, 0xaca30028, 0x8fa2003c, 0x3c031000, 0xaca2002c, 0xaf4301b8, + 0x00c01021, 0x8fbf006c, 0x8fbe0068, 0x8fb70064, 0x8fb60060, 0x8fb5005c, + 0x8fb40058, 0x8fb30054, 0x8fb20050, 0x8fb1004c, 0x8fb00048, 0x03e00008, + 0x27bd0070, 0x8f470140, 0x8f460148, 0x3c028000, 0x00c24024, 0x00062c02, + 0x30a300ff, 0x24020019, 0x106200e7, 0x27440180, 0x2862001a, 0x1040001f, + 0x24020008, 0x106200be, 0x28620009, 0x1040000d, 0x24020001, 0x10620046, + 0x28620002, 0x50400005, 0x24020006, 0x1060002e, 0x00a01821, 0x0a00155e, + 0x00000000, 0x1062005b, 0x00a01821, 0x0a00155e, 0x00000000, 0x2402000b, + 0x10620084, 0x2862000c, 0x10400005, 0x24020009, 0x106200bc, 0x00061c02, + 0x0a00155e, 0x00000000, 0x2402000e, 0x106200b7, 0x00061c02, 0x0a00155e, + 0x00000000, 0x28620021, 0x10400009, 0x2862001f, 0x104000c1, 0x2402001b, + 0x106200bf, 0x2402001c, 0x1062009a, 0x00061c02, 0x0a00155e, 0x00000000, + 0x240200c2, 0x106200ca, 0x286200c3, 0x10400005, 0x24020080, 0x1062005a, + 0x00a01821, 0x0a00155e, 0x00000000, 0x240200c9, 0x106200cd, 0x30c5ffff, + 0x0a00155e, 0x00000000, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, + 0x24020001, 0xa4830008, 0x24030002, 0xac870000, 0xac800004, 0xa082000a, + 0xa083000b, 0xa4860010, 0x8f430144, 0x3c021000, 0xac800028, 0xac830024, + 0x3c036000, 0xaf4201b8, 0x03e00008, 0xac600808, 0x11000009, 0x00a01821, + 0x3c020800, 0x24030002, 0xa0436c88, 0x24426c88, 0xac470008, 0x8f430144, + 0x03e00008, 0xac430004, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, + 0x24020002, 0xac800000, 0xac870004, 0xa4830008, 0xa082000a, 0xa082000b, + 0xa4860010, 0xac800024, 0x8f420144, 0x3c031000, 0xac820028, 0x3c026000, + 0xaf4301b8, 0x03e00008, 0xac400808, 0x3c080800, 0x3c058000, 0x8f4201b8, + 0x00451024, 0x1440fffd, 0x00000000, 0xac870000, 0x91026c88, 0x00002821, + 0x10400002, 0x25076c88, 0x8ce50008, 0xac850004, 0xa4830008, 0x91036c88, + 0x24020002, 0xa082000b, 0xa4860010, 0x34630001, 0xa083000a, 0x8f420144, + 0xac820024, 0x91036c88, 0x10600002, 0x00001021, 0x8ce20004, 0xac820028, + 0x3c021000, 0xaf4201b8, 0x3c026000, 0xa1006c88, 0x03e00008, 0xac400808, + 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, 0x24020002, 0xa082000b, + 0xa4830008, 0xa4860010, 0x8f420144, 0x3c031000, 0xa4820012, 0x03e00008, + 0xaf4301b8, 0x30c2ffff, 0x14400028, 0x00061c02, 0x93620005, 0x30420004, + 0x14400020, 0x3c029000, 0x34420001, 0x00e21025, 0xaf420020, 0x3c038000, + 0x8f420020, 0x00431024, 0x1440fffd, 0x00000000, 0x93620005, 0x3c038000, + 0x34630001, 0x00e31825, 0x34420004, 0xa3620005, 0xaf430020, 0x93620005, + 0x30420004, 0x14400003, 0x3c038000, 0x0000000d, 0x3c038000, 0x8f4201b8, + 0x00431024, 0x1440fffd, 0x24020005, 0x3c031000, 0xac870000, 0xa082000b, + 0xaf4301b8, 0x0a00150d, 0x00061c02, 0x0000000d, 0x03e00008, 0x00000000, + 0x00061c02, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, 0x24020001, + 0xa4830008, 0x24030002, 0xac870000, 0xac800004, 0xa082000a, 0xa083000b, + 0xa4860010, 0x8f430144, 0x3c021000, 0xac800028, 0xac830024, 0x03e00008, + 0xaf4201b8, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, 0x24020002, + 0xac800000, 0xac870004, 0xa4830008, 0xa082000a, 0xa082000b, 0xa4860010, + 0xac800024, 0x8f420144, 0x3c031000, 0xac820028, 0x03e00008, 0xaf4301b8, + 0x00061c02, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, 0x24020001, + 0xa4830008, 0x24030002, 0xa082000a, 0x3c021000, 0xac870000, 0xac800004, + 0xa083000b, 0xa4860010, 0xac800024, 0xac800028, 0x03e00008, 0xaf4201b8, + 0x00a01821, 0x3c058000, 0x8f4201b8, 0x00451024, 0x1440fffd, 0x24020002, + 0xac870000, 0xac800004, 0xa4830008, 0xa080000a, 0x0a001518, 0xa082000b, + 0x8f440144, 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020002, + 0x240340c9, 0xaf470180, 0xa342018b, 0x3c021000, 0xa7430188, 0xaf4401a4, + 0xaf4501a8, 0xaf4001ac, 0x03e00008, 0xaf4201b8, 0x0000000d, 0x03e00008, + 0x00000000, 0x03e00008, 0x00000000, 0x8f420100, 0x3042003e, 0x14400011, + 0x24020001, 0xaf400048, 0x8f420100, 0x304207c0, 0x10400005, 0x00000000, + 0xaf40004c, 0xaf400050, 0x03e00008, 0x24020001, 0xaf400054, 0xaf400040, + 0x8f420100, 0x30423800, 0x54400001, 0xaf400044, 0x24020001, 0x03e00008, + 0x00000000, 0x3c038000, 0x8f4201b8, 0x00431024, 0x1440fffd, 0x24020002, + 0x240340c9, 0xaf440180, 0xa342018b, 0x3c021000, 0xa7430188, 0xaf4501a4, + 0xaf4601a8, 0xaf4701ac, 0x03e00008, 0xaf4201b8, 0x3c029000, 0x34420001, + 0x00822025, 0xaf440020, 0x3c038000, 0x8f420020, 0x00431024, 0x1440fffd, + 0x00000000, 0x03e00008, 0x00000000, 0x3c028000, 0x34420001, 0x00822025, + 0x03e00008, 0xaf440020, 0x308600ff, 0x27450180, 0x3c038000, 0x8f4201b8, + 0x00431024, 0x1440fffd, 0x00000000, 0x8f420128, 0xaca20000, 0x8f640040, + 0x24030008, 0x240240c1, 0xa4a20008, 0x24020002, 0xa0a2000b, 0x3c021000, + 0xa0a6000a, 0xa4a30010, 0xa0a00012, 0xa0a00013, 0xaca00014, 0xaca00024, + 0xaca00028, 0xaca0002c, 0xaca40018, 0x03e00008, 0xaf4201b8, 0x24020001, + 0xacc40000, 0x03e00008, 0xa4e50000, 0x24020001, 0xaf400044, 0x03e00008, + 0xaf400050, 0x00803021, 0x27450180, 0x3c038000, 0x8f4201b8, 0x00431024, + 0x1440fffd, 0x00000000, 0x8f420128, 0xaca20000, 0x8cc30018, 0x240240c1, + 0xa4a20008, 0xaca30018, 0x90c4000a, 0x24020002, 0xa0a2000b, 0xa0a4000a, + 0x94c20010, 0xa4a20010, 0x90c30012, 0xa0a30012, 0x90c20013, 0xa0a20013, + 0x8cc30014, 0xaca30014, 0x8cc20024, 0xaca20024, 0x8cc30028, 0xaca30028, + 0x8cc2002c, 0x3c031000, 0xaca2002c, 0x24020001, 0xaf4301b8, 0xaf400044, + 0x03e00008, 0xaf400050, 0x27bdffe8, 0xafbf0010, 0x0e001047, 0x00000000, + 0x00002021, 0x0e000c78, 0xaf400180, 0x8fbf0010, 0x03e00008, 0x27bd0018, + 0x8f460148, 0x27450180, 0x3c038000, 0x00061402, 0x304700ff, 0x8f4201b8, + 0x00431024, 0x1440fffd, 0x00000000, 0x8f440140, 0x00061202, 0x304200ff, + 0x00061c02, 0xaca20004, 0x24020002, 0xa4a30008, 0x30c300ff, 0xa0a2000b, + 0xaca30024, 0x10e0000a, 0xaca40000, 0x28e20004, 0x14400005, 0x24020001, + 0x24020005, 0x54e20005, 0xa0a0000a, 0x24020001, 0x0a001609, 0xa0a2000a, + 0xa0a0000a, 0x3c021000, 0x03e00008, 0xaf4201b8, 0x03e00008, 0x00001021, + 0x10c00007, 0x00000000, 0x8ca20000, 0x24c6ffff, 0x24a50004, 0xac820000, + 0x14c0fffb, 0x24840004, 0x03e00008, 0x00000000, 0x0a00161f, 0x00a01021, + 0xac860000, 0x00000000, 0x00000000, 0x24840004, 0x00a01021, 0x1440fffa, + 0x24a5ffff, 0x03e00008, 0x00000000, 0x00000000 }; static u32 bnx2_RXP_b06FwData[(0x0/4) + 1] = { 0x0 }; static u32 bnx2_RXP_b06FwRodata[(0x28/4) + 1] = { @@ -1057,264 +1943,387 @@ static u32 bnx2_RXP_b06FwRodata[(0x28/4) + 1] = { static u32 bnx2_RXP_b06FwBss[(0x13a4/4) + 1] = { 0x0 }; static u32 bnx2_RXP_b06FwSbss[(0x1c/4) + 1] = { 0x0 }; -static u8 bnx2_rv2p_proc1[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x5e, 0xd0, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xc5, 0x56, 0xcf, 0x6b, - 0x13, 0x51, 0x10, 0x9e, 0xec, 0x6e, 0xb2, 0xdb, 0x74, 0xbb, 0x1b, 0x2b, - 0xda, 0xa0, 0xb1, 0x8d, 0x51, 0x6a, 0x7f, 0xa4, 0xb4, 0x11, 0x0f, 0x82, - 0x42, 0x25, 0x3d, 0x04, 0x54, 0x44, 0x7a, 0x28, 0x22, 0x82, 0x36, 0x8a, - 0xfe, 0x1b, 0xa1, 0x3f, 0xd2, 0x4b, 0x10, 0x7a, 0xb0, 0x58, 0xf1, 0x50, - 0x10, 0x2a, 0x68, 0x0f, 0xc9, 0xa1, 0x20, 0x52, 0x11, 0xda, 0x8b, 0x07, - 0x2f, 0x42, 0x0f, 0x7a, 0x69, 0xbd, 0xa8, 0xff, 0x82, 0x08, 0x4d, 0x7c, - 0x6f, 0x66, 0x9e, 0xee, 0x6e, 0xb2, 0x4d, 0x15, 0xc1, 0x85, 0xf6, 0xe3, - 0xbd, 0x9d, 0x79, 0x33, 0xf3, 0xcd, 0x37, 0xfb, 0x62, 0x01, 0x40, 0x04, - 0x60, 0xcd, 0x46, 0x2c, 0x8d, 0x26, 0x04, 0x1a, 0x30, 0x7e, 0x52, 0x62, - 0x16, 0xde, 0xa6, 0x25, 0x4e, 0x44, 0xc6, 0xd3, 0x49, 0x81, 0x7b, 0x0d, - 0x28, 0xc9, 0x75, 0x4f, 0xf5, 0x55, 0xad, 0x53, 0xa0, 0x06, 0xbb, 0xa3, - 0x80, 0xcf, 0x47, 0x9d, 0xf0, 0x7c, 0xd6, 0x42, 0x2c, 0x31, 0xc2, 0x48, - 0x02, 0x61, 0x7b, 0x51, 0xae, 0xad, 0x48, 0x69, 0xc4, 0x42, 0x3f, 0xd0, - 0x68, 0x7f, 0x67, 0xd1, 0x15, 0xff, 0x53, 0xf0, 0x39, 0x2f, 0xd7, 0x56, - 0x7c, 0x0e, 0xed, 0xaa, 0xec, 0x2f, 0xfe, 0xd0, 0xfe, 0xba, 0xf0, 0x03, - 0x7e, 0x94, 0x5f, 0x02, 0xcf, 0x29, 0x66, 0x65, 0x5e, 0xdd, 0x22, 0xa0, - 0xca, 0xc7, 0x46, 0x2c, 0xf5, 0x91, 0xb5, 0x89, 0xef, 0xbf, 0x8a, 0xbc, - 0x55, 0xdc, 0x76, 0xf1, 0x82, 0xf9, 0x06, 0xe3, 0x26, 0x91, 0x1f, 0x28, - 0xf9, 0xe3, 0x00, 0xc8, 0xfd, 0x4f, 0x8d, 0x5f, 0xfb, 0x83, 0xfe, 0xf7, - 0xbb, 0x43, 0xf2, 0xbc, 0x28, 0xc0, 0x90, 0xb4, 0xdb, 0xe6, 0x7c, 0xc6, - 0xe0, 0xb4, 0x96, 0xc4, 0xf7, 0x06, 0xfa, 0x1f, 0x11, 0xe7, 0x4a, 0xec, - 0x61, 0x3c, 0xce, 0x78, 0x95, 0xb1, 0xc2, 0xe8, 0x32, 0x3a, 0x8c, 0x5d, - 0x8c, 0x36, 0xe3, 0x26, 0x63, 0x9c, 0xb1, 0x83, 0xd1, 0x62, 0xdc, 0x63, - 0x8c, 0x31, 0x46, 0x19, 0x1b, 0x8c, 0x46, 0x84, 0x50, 0xe3, 0xf5, 0x63, - 0x46, 0xe0, 0xba, 0x23, 0x81, 0xba, 0x5f, 0xb3, 0x2e, 0x24, 0x6f, 0xfc, - 0x7e, 0x50, 0xd9, 0x31, 0xef, 0x58, 0xf7, 0x3a, 0xdb, 0x75, 0x57, 0x57, - 0x02, 0xfa, 0x49, 0xef, 0xab, 0x9b, 0x54, 0x8b, 0x3e, 0xb8, 0x58, 0xcf, - 0x9d, 0x82, 0x8b, 0x71, 0x9c, 0x18, 0xed, 0xab, 0xb4, 0x6e, 0xb8, 0x84, - 0xf7, 0xe2, 0x84, 0x5f, 0x18, 0xef, 0x77, 0x12, 0x4e, 0x77, 0xc9, 0x7c, - 0x0e, 0x8b, 0x80, 0xea, 0x1c, 0x95, 0x4f, 0xbb, 0x3c, 0xc2, 0xe2, 0xa9, - 0xbc, 0xda, 0xc5, 0x25, 0x2c, 0x6a, 0xfe, 0xfa, 0x9f, 0x8c, 0x11, 0x1a, - 0x39, 0x22, 0x75, 0xc9, 0x16, 0x3d, 0x83, 0x46, 0x63, 0xd9, 0x36, 0xe4, - 0xfa, 0xdc, 0xf2, 0x7b, 0xd4, 0xfb, 0xd9, 0xa5, 0x1a, 0xe7, 0xe7, 0x2a, - 0x9e, 0x69, 0x0e, 0x32, 0x40, 0xeb, 0x49, 0xe4, 0x1d, 0x04, 0x5a, 0xb8, - 0x86, 0x8c, 0xbf, 0x5f, 0xa4, 0x43, 0x9d, 0xfb, 0x31, 0xcb, 0xfd, 0x38, - 0x11, 0xd2, 0x8f, 0xb0, 0xb9, 0x68, 0x9e, 0xc7, 0xdb, 0xe9, 0x20, 0x6f, - 0x61, 0xf3, 0xa3, 0xf8, 0xa6, 0xdd, 0x3f, 0xe5, 0xf1, 0x01, 0xf3, 0x58, - 0x24, 0x1e, 0x93, 0xdf, 0x5a, 0xf2, 0x94, 0xf6, 0xf0, 0x24, 0xeb, 0xec, - 0x0d, 0xe9, 0x73, 0x58, 0x7d, 0xd9, 0xbf, 0xee, 0x73, 0x20, 0x3f, 0xb8, - 0x8b, 0xdf, 0x9b, 0x04, 0x14, 0x0b, 0x2a, 0x5f, 0x3f, 0xcf, 0xc7, 0xa8, - 0xdf, 0x30, 0x97, 0x93, 0xfb, 0x62, 0xfe, 0x36, 0x35, 0x5c, 0x1b, 0xf9, - 0x88, 0x04, 0xab, 0x98, 0x23, 0x7f, 0x47, 0xd3, 0x78, 0x7d, 0x50, 0x5d, - 0xa8, 0xbe, 0x4b, 0x8c, 0x41, 0x7e, 0x9a, 0xeb, 0xcc, 0x50, 0x3c, 0xd2, - 0x81, 0xc1, 0x3a, 0xc8, 0xf3, 0xf7, 0x28, 0xc8, 0x87, 0x55, 0x5d, 0x59, - 0xf4, 0xce, 0x75, 0x12, 0x8a, 0x39, 0xd2, 0x55, 0x73, 0x5f, 0x59, 0x6f, - 0x6b, 0xea, 0xbb, 0x84, 0xdb, 0xd5, 0x92, 0xee, 0xab, 0xf7, 0x12, 0x64, - 0xbd, 0x3c, 0x47, 0x5a, 0xe8, 0xa3, 0x5d, 0x1c, 0xdf, 0x79, 0x0e, 0x64, - 0x5b, 0x7d, 0x6f, 0x4c, 0xae, 0xeb, 0x0c, 0xeb, 0xfb, 0x68, 0x93, 0xbe, - 0xd5, 0x7d, 0xf5, 0xef, 0x74, 0xce, 0xf5, 0x9b, 0x68, 0x97, 0xda, 0x59, - 0xf7, 0xde, 0x4f, 0x71, 0xcf, 0xfd, 0x44, 0x6e, 0xa6, 0xca, 0xbb, 0xcf, - 0x7b, 0xaf, 0x1c, 0x0a, 0xe9, 0x83, 0xf7, 0x3e, 0x0a, 0xd6, 0xeb, 0xd7, - 0x23, 0xf5, 0x35, 0xce, 0xf5, 0x9b, 0x0d, 0xee, 0xc3, 0x54, 0xff, 0x0c, - 0xe9, 0x3f, 0x53, 0x90, 0xfa, 0x71, 0xc1, 0x31, 0xe9, 0x7c, 0x42, 0x71, - 0x8e, 0x66, 0x62, 0xde, 0xf3, 0x1a, 0xad, 0xe7, 0x67, 0xd0, 0x2f, 0x3e, - 0xa7, 0xf6, 0xf3, 0x48, 0xd8, 0xe4, 0x8b, 0x2d, 0xe2, 0xbd, 0xa6, 0xab, - 0xb9, 0x70, 0x91, 0xef, 0x01, 0x97, 0xec, 0xcc, 0x2b, 0x8a, 0x2f, 0xb9, - 0xaf, 0xc3, 0x12, 0xcd, 0xc5, 0xad, 0x47, 0x84, 0x37, 0xe1, 0x32, 0x9d, - 0xfb, 0xfb, 0xfb, 0x66, 0x21, 0x42, 0x97, 0x57, 0xc7, 0x51, 0xa1, 0x63, - 0x9c, 0x63, 0x25, 0x57, 0x78, 0xae, 0x11, 0x9f, 0xf3, 0xa4, 0x73, 0x8d, - 0xf3, 0xc3, 0xab, 0x45, 0x3e, 0xab, 0xba, 0xac, 0xf7, 0x9a, 0xd2, 0x1d, - 0x0c, 0x9b, 0x38, 0x3f, 0xa9, 0xca, 0x02, 0x2e, 0x7b, 0x1d, 0x46, 0xbb, - 0x4c, 0x18, 0xc3, 0xfc, 0x75, 0x78, 0x58, 0x93, 0x7e, 0x05, 0xbe, 0xdf, - 0x7e, 0xb0, 0x5e, 0x74, 0xa8, 0xf0, 0xef, 0x8b, 0x05, 0x7c, 0x3f, 0x01, - 0xcd, 0xf7, 0x1b, 0xc5, 0x29, 0x0f, 0x11, 0xda, 0xa7, 0xb8, 0xaf, 0xc3, - 0xd2, 0xce, 0x11, 0x7e, 0xdc, 0x3f, 0xec, 0xc3, 0x05, 0x8f, 0x3f, 0x42, - 0xe5, 0xc3, 0x40, 0x98, 0xbf, 0xb4, 0xff, 0xde, 0xe2, 0x3e, 0xa5, 0xf7, - 0x2f, 0xc9, 0x7e, 0xaa, 0xff, 0x19, 0xd7, 0x3f, 0xec, 0xd5, 0xbd, 0x8a, - 0xf7, 0xae, 0xbe, 0xff, 0x7d, 0xdc, 0xc1, 0x76, 0x5b, 0xfb, 0xd8, 0xd1, - 0xf1, 0xf9, 0x41, 0xef, 0xfd, 0xfd, 0xa6, 0x4e, 0x3c, 0x6d, 0xd4, 0xd5, - 0x5c, 0x6d, 0x84, 0xcc, 0xd5, 0xc5, 0xff, 0x3a, 0x57, 0x10, 0x98, 0xab, - 0xd5, 0xfa, 0xc1, 0xe6, 0x0a, 0xb8, 0x7e, 0x08, 0x99, 0xab, 0x18, 0xf3, - 0xf0, 0x94, 0xcf, 0x33, 0x20, 0xaa, 0xc7, 0xb0, 0x7d, 0xc6, 0x2c, 0xeb, - 0x92, 0xf4, 0x68, 0x47, 0xcb, 0xa8, 0x3f, 0xc7, 0x2e, 0x93, 0x9d, 0x41, - 0xfb, 0x49, 0x85, 0x0b, 0xb3, 0xf4, 0x7b, 0x4a, 0x83, 0x9f, 0x94, 0x15, - 0x12, 0x3d, 0x80, 0x0b, 0x00, 0x00, 0x00 }; +static u32 bnx2_rv2p_proc1[] = { + 0x00000008, 0xac000001, 0x0000000c, 0x2f800001, 0x00000010, 0x213f0004, + 0x00000010, 0x20bf002c, 0x00000010, 0x203f0143, 0x00000018, 0x8000fffd, + 0x00000010, 0xb1b8b017, 0x0000000b, 0x2fdf0002, 0x00000000, 0x03d80000, + 0x00000000, 0x2c380000, 0x00000008, 0x2c800000, 0x00000008, 0x2d000000, + 0x00000010, 0x91d40000, 0x00000008, 0x2d800108, 0x00000008, 0x02000002, + 0x00000010, 0x91de0000, 0x0000000f, 0x42e0001c, 0x00000010, 0x91840a08, + 0x00000008, 0x2c8000b0, 0x00000008, 0x2d000008, 0x00000008, 0x2d800150, + 0x00000000, 0x00000000, 0x00000010, 0x91de0000, 0x00000010, 0x2c620002, + 0x00000018, 0x80000012, 0x0000000b, 0x2fdf0002, 0x0000000c, 0x1f800002, + 0x00000000, 0x2c070000, 0x00000018, 0x8000ffe6, 0x00000008, 0x02000002, + 0x0000000f, 0x42e0001c, 0x00000010, 0x91840a08, 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, 0x00000010, 0x91d40000, 0x00000008, 0x2d800108, + 0x00000000, 0x00000000, 0x00000010, 0x91de0000, 0x00000018, 0x80000004, + 0x0000000c, 0x1f800002, 0x00000000, 0x00000000, 0x00000018, 0x8000ffd9, + 0x0000000c, 0x29800002, 0x0000000c, 0x1f800002, 0x00000000, 0x2adf0000, + 0x00000008, 0x2a000005, 0x00000018, 0x8000ffd4, 0x00000008, 0x02240030, + 0x00000018, 0x00040000, 0x00000018, 0x80000015, 0x00000018, 0x80000017, + 0x00000018, 0x8000001b, 0x00000018, 0x8000004c, 0x00000018, 0x8000008c, + 0x00000018, 0x8000000f, 0x00000018, 0x8000000e, 0x00000018, 0x8000000d, + 0x00000018, 0x8000000c, 0x00000018, 0x800000c2, 0x00000018, 0x8000000a, + 0x00000018, 0x80000009, 0x00000018, 0x80000008, 0x00000018, 0x800000fd, + 0x00000018, 0x80000006, 0x00000018, 0x80000005, 0x00000018, 0x800000ff, + 0x00000018, 0x80000104, 0x00000018, 0x80000002, 0x00000018, 0x80000098, + 0x00000018, 0x80000000, 0x0000000c, 0x1f800001, 0x00000000, 0x00000000, + 0x00000018, 0x8000ffba, 0x00000010, 0x91d40000, 0x0000000c, 0x29800001, + 0x0000000c, 0x1f800001, 0x00000008, 0x2a000002, 0x00000018, 0x8000ffb5, + 0x00000010, 0xb1a0b012, 0x0000000b, 0x2fdf0002, 0x00000000, 0x2c200000, + 0x00000008, 0x2c800000, 0x00000008, 0x2d000000, 0x00000010, 0x91d40000, + 0x00000008, 0x2d80011c, 0x00000000, 0x00000000, 0x00000010, 0x91de0000, + 0x0000000f, 0x47600008, 0x0000000f, 0x060e0001, 0x00000010, 0x001f0000, + 0x00000000, 0x0f580000, 0x00000000, 0x0a640000, 0x00000000, 0x0ae50000, + 0x00000000, 0x0b660000, 0x00000000, 0x0d610000, 0x00000018, 0x80000013, + 0x0000000f, 0x47600008, 0x0000000b, 0x2fdf0002, 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, 0x00000010, 0x91d40000, 0x00000008, 0x2d80011c, + 0x0000000f, 0x060e0001, 0x00000010, 0x001f0000, 0x00000000, 0x0f580000, + 0x00000010, 0x91de0000, 0x00000000, 0x0a640000, 0x00000000, 0x0ae50000, + 0x00000000, 0x0b660000, 0x00000000, 0x0d610000, 0x00000000, 0x02620000, + 0x0000000b, 0x2fdf0002, 0x00000000, 0x309a0000, 0x00000000, 0x31040000, + 0x00000000, 0x0c961800, 0x00000009, 0x0c99ffff, 0x00000004, 0xcc993400, + 0x00000010, 0xb1963202, 0x00000008, 0x0f800000, 0x0000000c, 0x29800001, + 0x00000010, 0x00220002, 0x0000000c, 0x29520001, 0x0000000c, 0x29520000, + 0x00000008, 0x22000001, 0x0000000c, 0x1f800001, 0x00000000, 0x2adf0000, + 0x00000008, 0x2a000003, 0x00000018, 0x8000ff83, 0x00000010, 0xb1a0b01d, + 0x0000000b, 0x2fdf0002, 0x00000000, 0x2c200000, 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, 0x00000010, 0x91d40000, 0x00000008, 0x2d800150, + 0x00000000, 0x00000000, 0x00000010, 0x205f0000, 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, 0x00000008, 0x2d800108, 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, 0x0000000f, 0x47600008, 0x00000000, 0x060e0000, + 0x00000010, 0x001f0000, 0x00000000, 0x0f580000, 0x00000010, 0x91de0000, + 0x00000000, 0x0a640000, 0x00000000, 0x0ae50000, 0x00000000, 0x0b670000, + 0x00000000, 0x0d620000, 0x00000000, 0x0ce71800, 0x00000009, 0x0c99ffff, + 0x00000004, 0xcc993400, 0x00000010, 0xb1963220, 0x00000008, 0x0f800000, + 0x00000018, 0x8000001e, 0x0000000f, 0x47600008, 0x0000000b, 0x2fdf0002, + 0x00000008, 0x2c8000b0, 0x00000008, 0x2d000008, 0x00000010, 0x91d40000, + 0x00000008, 0x2d80012c, 0x0000000f, 0x060e0001, 0x00000010, 0x001f0000, + 0x00000000, 0x0f580000, 0x00000010, 0x91de0000, 0x00000000, 0x0a640000, + 0x00000000, 0x0ae50000, 0x00000000, 0x0b670000, 0x00000000, 0x0d620000, + 0x00000000, 0x02630000, 0x0000000f, 0x47620010, 0x00000000, 0x0ce71800, + 0x0000000b, 0x2fdf0002, 0x00000000, 0x311a0000, 0x00000000, 0x31840000, + 0x0000000b, 0xc20000ff, 0x00000002, 0x42040000, 0x00000001, 0x31620800, + 0x0000000f, 0x020e0010, 0x00000002, 0x31620800, 0x00000009, 0x0c99ffff, + 0x00000004, 0xcc993400, 0x00000010, 0xb1963202, 0x00000008, 0x0f800000, + 0x0000000c, 0x29800001, 0x0000000c, 0x1f800001, 0x0000000c, 0x61420006, + 0x00000008, 0x22000008, 0x00000000, 0x2adf0000, 0x00000008, 0x2a000004, + 0x00000018, 0x8000ff42, 0x00000008, 0x2c8000b0, 0x00000008, 0x2d000008, + 0x00000010, 0x91a0b008, 0x00000010, 0x91d40000, 0x0000000c, 0x31620018, + 0x00000008, 0x2d800001, 0x00000000, 0x00000000, 0x00000010, 0x91de0000, + 0x00000008, 0xac000001, 0x00000018, 0x8000000e, 0x00000000, 0x0380b000, + 0x0000000b, 0x2fdf0002, 0x00000000, 0x2c004000, 0x00000010, 0x91d40000, + 0x00000008, 0x2d800101, 0x00000000, 0x00000000, 0x00000010, 0x91de0000, + 0x0000000c, 0x31620018, 0x00000008, 0x2d800001, 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, 0x0000000b, 0x2fdf0002, 0x00000000, 0x2c000e00, + 0x0000000c, 0x29800001, 0x0000000c, 0x1f800001, 0x00000008, 0x2a000007, + 0x00000018, 0x8000ff27, 0x00000010, 0xb1a0b016, 0x0000000b, 0x2fdf0002, + 0x00000000, 0x03d80000, 0x00000000, 0x2c200000, 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, 0x00000010, 0x91d40000, 0x00000008, 0x2d800150, + 0x00000000, 0x00000000, 0x00000010, 0x205f0000, 0x00000008, 0x2c800000, + 0x00000008, 0x2d000000, 0x00000008, 0x2d800108, 0x00000008, 0x07000001, + 0x00000010, 0xb5de1c00, 0x00000010, 0x2c620002, 0x00000018, 0x8000000a, + 0x0000000b, 0x2fdf0002, 0x00000000, 0x2c070000, 0x0000000c, 0x1f800001, + 0x00000010, 0x91de0000, 0x00000018, 0x8000ff11, 0x00000008, 0x2c8000b0, + 0x00000008, 0x2d000008, 0x00000010, 0x91d40000, 0x00000008, 0x2d800108, + 0x0000000c, 0x29800001, 0x0000000c, 0x1f800001, 0x00000010, 0x91de0000, + 0x00000000, 0x2adf0000, 0x00000008, 0x2a00000a, 0x00000018, 0x8000ff07, + 0x00000000, 0x82265600, 0x0000000f, 0x47220008, 0x00000009, 0x070e000f, + 0x00000008, 0x070e0008, 0x00000008, 0x02800001, 0x00000007, 0x02851c00, + 0x00000008, 0x82850001, 0x00000000, 0x02840a00, 0x00000007, 0x42851c00, + 0x00000003, 0xc3aa5200, 0x00000000, 0x03b10e00, 0x00000010, 0x001f0000, + 0x0000000f, 0x0f280007, 0x00000007, 0x4b071c00, 0x00000000, 0x00000000, + 0x0000000f, 0x0a960003, 0x00000000, 0x0a955c00, 0x00000000, 0x4a005a00, + 0x00000000, 0x0c960a00, 0x00000009, 0x0c99ffff, 0x00000008, 0x0d00ffff, + 0x00000010, 0xb1963202, 0x00000008, 0x0f800005, 0x00000010, 0x00220020, + 0x00000000, 0x02a70000, 0x00000010, 0xb1850002, 0x00000008, 0x82850200, + 0x00000000, 0x02000000, 0x00000000, 0x03a60000, 0x00000018, 0x8000004e, + 0x00000000, 0x072b0000, 0x00000001, 0x878c1c00, 0x00000000, 0x870e1e00, + 0x00000000, 0x860c1e00, 0x00000000, 0x03061e00, 0x00000010, 0xb18e0003, + 0x00000018, 0x80000047, 0x00000018, 0x8000fffa, 0x00000010, 0x918c0003, + 0x00000010, 0xb1870002, 0x00000018, 0x80000043, 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, 0x00000000, 0x2a860000, 0x00000000, 0x230c0000, + 0x00000000, 0x2b070000, 0x00000010, 0xb187000e, 0x00000008, 0x2a000008, + 0x00000018, 0x8000003b, 0x00000010, 0x91d40000, 0x00000000, 0x28d18c00, + 0x00000000, 0x2a860000, 0x00000000, 0x230c0000, 0x00000000, 0x2b070000, + 0x00000018, 0x8000fff8, 0x00000010, 0x91d40000, 0x0000000c, 0x29800001, + 0x00000000, 0x2aab0000, 0x00000000, 0xa3265600, 0x00000000, 0x2b000000, + 0x0000000c, 0x1f800001, 0x00000008, 0x2a000008, 0x00000018, 0x8000fec8, + 0x00000010, 0x91d40000, 0x0000000c, 0x29800001, 0x0000000c, 0x1f800001, + 0x00000008, 0x2a000009, 0x00000018, 0x8000fec3, 0x00000010, 0x91d40000, + 0x0000000c, 0x29800001, 0x0000000c, 0x1f800001, 0x00000000, 0x29420000, + 0x00000008, 0x2a000002, 0x00000018, 0x8000febd, 0x00000018, 0x8000febc, + 0x00000010, 0xb1bcb016, 0x0000000b, 0x2fdf0002, 0x00000000, 0x03d80000, + 0x00000000, 0x2c3c0000, 0x00000008, 0x2c8000b0, 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, 0x00000008, 0x2d800150, 0x00000000, 0x00000000, + 0x00000010, 0x205f0000, 0x00000008, 0x2c800000, 0x00000008, 0x2d000000, + 0x00000008, 0x2d800108, 0x00000008, 0x07000001, 0x00000010, 0xb5de1c00, + 0x00000010, 0x2c620002, 0x00000018, 0x8000000a, 0x0000000b, 0x2fdf0002, + 0x00000000, 0x2c070000, 0x0000000c, 0x1f800000, 0x00000010, 0x91de0000, + 0x00000018, 0x8000fea6, 0x00000008, 0x2c8000b0, 0x00000008, 0x2d000008, + 0x00000010, 0x91d40000, 0x00000008, 0x2d800108, 0x0000000c, 0x29800000, + 0x0000000c, 0x1f800000, 0x00000010, 0x91de0000, 0x00000000, 0x2adf0000, + 0x00000008, 0x2a000006, 0x00000018, 0x8000fe9c, 0x00000008, 0x03050004, + 0x00000006, 0x83040c00, 0x00000008, 0x02850200, 0x00000000, 0x86050c00, + 0x00000001, 0x860c0e00, 0x00000008, 0x02040004, 0x00000000, 0x02041800, + 0x00000000, 0x83871800, 0x00000018, 0x00020000 }; -static u8 bnx2_rv2p_proc2[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x7e, 0xd1, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xcd, 0x58, 0x5b, 0x6c, - 0x54, 0x55, 0x14, 0x3d, 0xf3, 0xe8, 0xcc, 0x9d, 0xe9, 0xed, 0x9d, 0xf2, - 0xb2, 0x03, 0xad, 0x08, 0xe5, 0xd1, 0x56, 0x29, 0xe8, 0x54, 0xab, 0x18, - 0x15, 0x2c, 0x5a, 0x8c, 0x26, 0x68, 0xf0, 0xf9, 0x63, 0x14, 0x04, 0xda, - 0x9a, 0x56, 0x9b, 0x16, 0xfb, 0x81, 0xaf, 0x09, 0x14, 0x6a, 0x4c, 0x25, - 0xd6, 0x08, 0xc5, 0x47, 0xa0, 0x11, 0x1f, 0x84, 0xf0, 0xd3, 0x1f, 0x3b, - 0x8d, 0x7f, 0x0a, 0x24, 0x6a, 0x88, 0xc4, 0xa8, 0x9f, 0x24, 0x68, 0xa0, - 0x21, 0x0a, 0x58, 0x8b, 0x63, 0x4c, 0xb4, 0xf5, 0xec, 0xbd, 0xf6, 0xb9, - 0x73, 0xef, 0x6d, 0x8b, 0x1a, 0xf9, 0x70, 0x3e, 0xba, 0x7b, 0xce, 0xd9, - 0x67, 0x3f, 0xd6, 0xde, 0x67, 0x9f, 0x7d, 0xae, 0x52, 0xfc, 0xbb, 0xb6, - 0x94, 0xc9, 0x37, 0x83, 0x96, 0xfe, 0x1b, 0x51, 0x0f, 0x85, 0xd3, 0x3c, - 0x8e, 0x2a, 0xa2, 0x49, 0xa5, 0xb2, 0x5e, 0xea, 0x08, 0x7d, 0x44, 0xe8, - 0x70, 0x08, 0xf4, 0xb4, 0xd0, 0x77, 0x84, 0xfe, 0x2e, 0xf4, 0x80, 0xd0, - 0x0f, 0x85, 0xea, 0x5f, 0xd6, 0xd6, 0x7f, 0xf4, 0xb0, 0x46, 0x89, 0x7e, - 0x1b, 0xd3, 0x35, 0xb0, 0xe3, 0xc1, 0x05, 0xc4, 0x77, 0x61, 0xa2, 0xc0, - 0x87, 0xf9, 0x53, 0x7d, 0xa0, 0xd7, 0x60, 0xd7, 0xe1, 0xec, 0x0a, 0xb3, - 0x1f, 0x64, 0x43, 0x09, 0xe8, 0xc6, 0x08, 0xe8, 0xea, 0x65, 0x4c, 0x7a, - 0x9f, 0x0a, 0x63, 0xdc, 0xb8, 0x94, 0xf6, 0x87, 0x55, 0x83, 0x22, 0x3f, - 0x67, 0xaa, 0x68, 0x98, 0xc6, 0xf5, 0x56, 0x6c, 0x18, 0xeb, 0x8f, 0xa5, - 0x40, 0x37, 0x25, 0x41, 0xcf, 0x08, 0xdd, 0x52, 0x2c, 0x7a, 0x6c, 0x31, - 0xbf, 0x98, 0xf6, 0x25, 0x5c, 0x39, 0xc7, 0x6d, 0xe0, 0x96, 0x95, 0xfd, - 0x4a, 0xc1, 0xce, 0x03, 0xb2, 0x3e, 0xa3, 0x0a, 0xb3, 0xaf, 0x6f, 0xc1, - 0xb8, 0xfc, 0x20, 0xf9, 0xa7, 0xff, 0xcf, 0x62, 0x7e, 0xfa, 0xfd, 0xf8, - 0x15, 0xf6, 0x83, 0x96, 0x2f, 0xa2, 0x75, 0x27, 0xd3, 0x3f, 0x88, 0xf1, - 0xde, 0x25, 0x32, 0x1f, 0x36, 0xf8, 0x18, 0x79, 0x41, 0x5c, 0x99, 0x58, - 0xc7, 0x2a, 0x7d, 0xf2, 0x2b, 0x15, 0xe4, 0x2f, 0xc8, 0x2e, 0x35, 0xf2, - 0x81, 0xfb, 0xfa, 0x16, 0xb2, 0x73, 0x4c, 0xc7, 0x01, 0xb8, 0xcd, 0x0a, - 0x95, 0xb2, 0xdc, 0x7d, 0x83, 0x5e, 0x3d, 0x51, 0xad, 0x07, 0xfa, 0x54, - 0xa5, 0xc5, 0x20, 0x65, 0x97, 0x81, 0xaa, 0x5a, 0xbf, 0x1f, 0x7b, 0x97, - 0x18, 0x7b, 0x30, 0x9e, 0x9d, 0x01, 0xdd, 0x23, 0xf4, 0xaa, 0x3a, 0x26, - 0xcb, 0x7f, 0xb8, 0xc1, 0x62, 0x0c, 0xb2, 0xb5, 0xde, 0x7c, 0x38, 0x32, - 0x61, 0xf0, 0x52, 0x8b, 0x40, 0xce, 0x2e, 0x21, 0x3e, 0x1d, 0x9c, 0x4a, - 0xc8, 0x5d, 0xdf, 0x32, 0x55, 0x1e, 0x7d, 0x30, 0x45, 0x1e, 0x61, 0xff, - 0xb7, 0x2b, 0x7c, 0xf9, 0xa4, 0xda, 0x25, 0x4f, 0x36, 0x22, 0x8f, 0xac, - 0xa7, 0x3e, 0x91, 0x85, 0x6b, 0x13, 0xfa, 0xcf, 0x84, 0x7a, 0x32, 0x4e, - 0x01, 0x8a, 0x2b, 0x87, 0xfd, 0x53, 0xe2, 0xe7, 0x26, 0xed, 0x27, 0xd1, - 0x8a, 0x50, 0xb6, 0x36, 0xc1, 0x38, 0x35, 0xc4, 0xa0, 0xaf, 0x61, 0x03, - 0xb6, 0xaf, 0x46, 0x5c, 0x7b, 0x4f, 0x86, 0x8d, 0xfd, 0x51, 0xfa, 0x3b, - 0xd0, 0xb6, 0x9d, 0x47, 0x03, 0xd1, 0x1d, 0x4c, 0xed, 0x63, 0x95, 0x58, - 0xee, 0x8a, 0xf0, 0x7a, 0x72, 0x97, 0xcc, 0xf7, 0xec, 0xf0, 0xdb, 0xfd, - 0x02, 0xf2, 0xdb, 0x7e, 0x7e, 0x47, 0x88, 0xa8, 0x13, 0x73, 0xf9, 0x98, - 0x3a, 0x3b, 0xb7, 0x13, 0xff, 0x55, 0x6a, 0xd7, 0x20, 0x29, 0x4e, 0xab, - 0x0d, 0x6b, 0xb1, 0x6f, 0x77, 0x2c, 0xc5, 0xb8, 0x36, 0xad, 0x05, 0xfd, - 0x1e, 0xf3, 0xf3, 0x9d, 0x1e, 0xe2, 0x2f, 0x9d, 0xe7, 0x0c, 0x71, 0x5e, - 0xa9, 0x11, 0xce, 0xc7, 0x04, 0x65, 0x06, 0xff, 0xda, 0xaa, 0xc1, 0xdf, - 0xbc, 0x99, 0x15, 0xbf, 0xd9, 0x9a, 0xe7, 0x3c, 0x18, 0xe8, 0x18, 0x26, - 0x3f, 0xe7, 0xaa, 0x91, 0x4e, 0xa2, 0x51, 0xd5, 0xb0, 0x90, 0xf0, 0x5e, - 0x15, 0x36, 0x71, 0x3a, 0x7f, 0x33, 0xcd, 0xcf, 0xd3, 0xeb, 0x26, 0x1e, - 0x24, 0xd7, 0x92, 0x78, 0x45, 0x5d, 0x7c, 0xf2, 0x61, 0xf8, 0xdb, 0xcd, - 0x76, 0x5f, 0x97, 0xec, 0xe6, 0xfc, 0x4a, 0xaa, 0x26, 0x8e, 0x7f, 0xd4, - 0x6a, 0x1b, 0xc6, 0xfa, 0xf9, 0x8f, 0x8d, 0x5c, 0xd2, 0x53, 0x23, 0x75, - 0x44, 0xb9, 0x72, 0xa2, 0x37, 0x83, 0xee, 0x34, 0x7a, 0xeb, 0x88, 0x6f, - 0xb1, 0x42, 0xfe, 0x26, 0x26, 0xc9, 0x69, 0x03, 0xce, 0xf6, 0x33, 0xec, - 0xf7, 0x35, 0xf6, 0x85, 0x3e, 0x63, 0x2f, 0xe6, 0x2f, 0xfa, 0xf4, 0x95, - 0x7b, 0xf4, 0x11, 0x7f, 0x51, 0xf2, 0x02, 0xef, 0x9b, 0x63, 0x3d, 0x3b, - 0xcc, 0xb8, 0x58, 0xcf, 0x0c, 0x41, 0xfe, 0xc5, 0x21, 0xe2, 0x9f, 0x23, - 0x7a, 0xed, 0xff, 0x88, 0xe7, 0x9c, 0x30, 0xe4, 0x4c, 0x8f, 0x5f, 0xc1, - 0x6f, 0xe3, 0x17, 0xcb, 0xb5, 0x47, 0x73, 0x69, 0xe6, 0x33, 0xf1, 0xe8, - 0x0e, 0x73, 0x02, 0xa6, 0x1b, 0x16, 0xfa, 0x71, 0x33, 0xf6, 0x9c, 0xdf, - 0xcc, 0x79, 0x3e, 0xd1, 0x26, 0x75, 0x40, 0x71, 0x9d, 0xb9, 0x5d, 0xe2, - 0xa1, 0xf3, 0x3a, 0x04, 0xff, 0x46, 0x73, 0x2c, 0x3f, 0xd9, 0xc5, 0x79, - 0xb9, 0xd2, 0x8e, 0xe6, 0x38, 0x5e, 0xd6, 0xd9, 0x21, 0x6c, 0x2b, 0xd4, - 0x4f, 0xc8, 0x6b, 0xb6, 0x41, 0x9b, 0xa4, 0x8e, 0x9e, 0x15, 0xda, 0x6d, - 0x33, 0x3e, 0xba, 0x8e, 0x59, 0x2c, 0x3f, 0x9b, 0x32, 0xf7, 0x0c, 0xd6, - 0x9f, 0x16, 0x39, 0x3f, 0x0a, 0x55, 0x22, 0xa7, 0x55, 0xf6, 0x9f, 0xf3, - 0xc9, 0x89, 0x04, 0xe4, 0x84, 0x94, 0xc1, 0xcd, 0x9c, 0xef, 0x5d, 0x52, - 0xbf, 0xf7, 0xc5, 0xa6, 0xab, 0xb7, 0x7c, 0x0e, 0xdc, 0xba, 0x5a, 0x8e, - 0x3a, 0x53, 0x1f, 0x0d, 0xb3, 0xbf, 0x03, 0xdd, 0x3b, 0x80, 0x53, 0x8f, - 0xe0, 0x14, 0x07, 0x4e, 0xf3, 0x0a, 0xf5, 0x59, 0x14, 0xd4, 0x90, 0xfe, - 0x53, 0x21, 0xe3, 0xc7, 0xbe, 0x98, 0xaf, 0xfe, 0xf6, 0x9a, 0xfa, 0x5b, - 0xa8, 0xd3, 0xc4, 0xff, 0xb3, 0xa9, 0x6f, 0x5a, 0x9f, 0xd1, 0xff, 0x6f, - 0xf5, 0x72, 0x9c, 0x92, 0xdd, 0x7d, 0x26, 0xce, 0x98, 0x2e, 0xd4, 0xd9, - 0x22, 0x22, 0xcb, 0x46, 0x3a, 0x99, 0x5e, 0xdf, 0xbc, 0x15, 0xf3, 0x65, - 0x7c, 0x4e, 0x6e, 0x09, 0x01, 0xaf, 0xa8, 0x3a, 0xde, 0x87, 0xba, 0xae, - 0xe2, 0x2c, 0xaf, 0xe2, 0x28, 0xc7, 0x3f, 0xaa, 0xe5, 0x12, 0xdf, 0x67, - 0xa1, 0x42, 0x3e, 0x7a, 0xfd, 0xd9, 0xad, 0xf3, 0x84, 0xec, 0x88, 0xe9, - 0xbc, 0xa5, 0xb1, 0x3e, 0x47, 0xb6, 0xe4, 0xf9, 0x1a, 0xe6, 0xb3, 0xc7, - 0x22, 0x34, 0xff, 0x80, 0xd5, 0xd3, 0x87, 0xf9, 0x9f, 0x1a, 0x69, 0xbc, - 0xce, 0x7e, 0x0d, 0xe7, 0xcc, 0x7e, 0x0d, 0xf5, 0xcb, 0x2a, 0x3a, 0x88, - 0xba, 0xd6, 0x78, 0x10, 0xf2, 0x71, 0x4f, 0x7b, 0xfd, 0xf2, 0xe2, 0x47, - 0xe7, 0xe1, 0xb2, 0x38, 0xd9, 0xcf, 0x09, 0x4e, 0x97, 0x7c, 0xf1, 0x39, - 0x6c, 0xe2, 0xd3, 0x1b, 0x93, 0xf3, 0xd2, 0x7c, 0x29, 0xe8, 0x17, 0xf1, - 0x9d, 0x71, 0xef, 0x9d, 0xae, 0x95, 0xa0, 0xdd, 0x2b, 0xe5, 0x9c, 0xd6, - 0xf9, 0xf3, 0x6b, 0x3e, 0xea, 0xf2, 0xb8, 0x7b, 0x4f, 0x20, 0xbf, 0xac, - 0x9d, 0xf0, 0x4b, 0xbd, 0x28, 0x79, 0x3c, 0x2e, 0xf4, 0x65, 0xc9, 0xdf, - 0x6d, 0xd2, 0xb7, 0x98, 0xfe, 0xe2, 0x0f, 0xcc, 0x3b, 0xfd, 0x6e, 0x5f, - 0x60, 0xea, 0x36, 0x8d, 0x43, 0xca, 0x89, 0x13, 0x83, 0x36, 0xeb, 0x33, - 0x24, 0x4a, 0xcf, 0x1a, 0xe0, 0x35, 0x52, 0x07, 0xbe, 0xdd, 0x91, 0xb0, - 0x8c, 0x21, 0x6f, 0xac, 0xda, 0x77, 0x0f, 0xd7, 0x4f, 0xc6, 0x93, 0xe4, - 0xc6, 0xdc, 0xfa, 0x24, 0x79, 0xaf, 0x26, 0x84, 0x96, 0x2f, 0xbe, 0x2c, - 0xbe, 0x85, 0xfe, 0x64, 0xa9, 0x17, 0xdf, 0x97, 0x34, 0xbe, 0xbc, 0xaf, - 0xbe, 0xf9, 0x12, 0xa6, 0x4b, 0x6f, 0x05, 0xed, 0xbb, 0x95, 0xe7, 0x17, - 0xa3, 0xee, 0x11, 0x7e, 0x9c, 0x5f, 0xf5, 0x6f, 0x0c, 0x9a, 0x7e, 0x42, - 0xf0, 0x08, 0xf4, 0x41, 0x65, 0x77, 0x80, 0xbe, 0x29, 0x74, 0xce, 0x2a, - 0xd0, 0xbd, 0xab, 0xfc, 0x71, 0x88, 0xa5, 0x7c, 0x71, 0xac, 0x47, 0x1c, - 0x8f, 0x4c, 0x04, 0xeb, 0x81, 0xc4, 0x4b, 0xc7, 0x27, 0x70, 0xbf, 0x1b, - 0xfd, 0xe2, 0xce, 0xdf, 0xc5, 0xed, 0x4a, 0xc7, 0xab, 0x7b, 0x25, 0xee, - 0x93, 0x0e, 0xe9, 0x4b, 0xc7, 0xdc, 0xfb, 0xe2, 0x9f, 0xc4, 0x31, 0x7e, - 0x85, 0xe3, 0x78, 0xf7, 0xff, 0x2c, 0x8e, 0x9d, 0x12, 0xc7, 0x22, 0xb9, - 0x57, 0x4d, 0xbf, 0xd9, 0x2e, 0x7d, 0x18, 0xf5, 0x8d, 0x7e, 0xbd, 0x4f, - 0x70, 0x1f, 0x78, 0xb5, 0x5b, 0x8f, 0xe7, 0x33, 0x7f, 0x4e, 0xf6, 0x95, - 0xca, 0xbe, 0x7b, 0x26, 0xed, 0x3b, 0xc5, 0xf5, 0xee, 0xf1, 0xf1, 0xc9, - 0xef, 0x15, 0x9f, 0x9d, 0x59, 0x95, 0x02, 0xee, 0xa8, 0xe3, 0xb1, 0x29, - 0xde, 0x37, 0x86, 0x1f, 0xf9, 0xb5, 0x36, 0x85, 0xba, 0x05, 0xfe, 0xb9, - 0x9e, 0x7a, 0x4a, 0xe3, 0xfb, 0xc7, 0xa7, 0xef, 0x57, 0x8d, 0x3c, 0xc4, - 0x6d, 0x43, 0xb8, 0x84, 0xf9, 0x4e, 0xb7, 0xf3, 0x7d, 0xe7, 0xfa, 0xb7, - 0x9a, 0xfd, 0x3a, 0x2a, 0xfe, 0x55, 0x88, 0x7f, 0x7a, 0xb9, 0x96, 0xeb, - 0xbe, 0x75, 0xba, 0xdd, 0xeb, 0xdf, 0x9d, 0x97, 0xd1, 0xf7, 0x4f, 0xfb, - 0x63, 0xd1, 0x9b, 0x32, 0xfa, 0x49, 0x5e, 0xb9, 0xf4, 0x7d, 0xd4, 0x4f, - 0x62, 0x7e, 0x72, 0x9f, 0x41, 0xfa, 0x5b, 0x34, 0x5e, 0x72, 0xdf, 0x70, - 0x3e, 0x47, 0xac, 0xa3, 0x6c, 0x57, 0x5e, 0xf9, 0x71, 0x39, 0x23, 0x7c, - 0x53, 0xc5, 0x8d, 0xd6, 0x8b, 0x64, 0x7d, 0x2a, 0xbf, 0xc5, 0x4e, 0x37, - 0x1f, 0x64, 0x1f, 0xf3, 0x35, 0x0b, 0x5f, 0x34, 0x34, 0x39, 0xfe, 0x18, - 0xe5, 0xab, 0x38, 0xaf, 0xf7, 0x6f, 0xcb, 0x11, 0x9f, 0x76, 0x9e, 0xf3, - 0xf0, 0xfb, 0x80, 0x7d, 0xe9, 0x2b, 0x80, 0x23, 0xf1, 0xcd, 0x50, 0x4d, - 0xce, 0x74, 0x78, 0xe1, 0xdd, 0x30, 0x9a, 0x33, 0x78, 0xdb, 0xec, 0xe7, - 0x48, 0x27, 0xe9, 0x5f, 0x1d, 0xc0, 0x31, 0x2c, 0x38, 0x9e, 0x50, 0x7f, - 0x9f, 0xf7, 0xc6, 0x0f, 0x6f, 0x5e, 0x8c, 0xff, 0x19, 0xcc, 0xe3, 0x87, - 0xe5, 0x5d, 0xdd, 0x18, 0x03, 0xfd, 0x2e, 0x62, 0xec, 0x46, 0x5e, 0xdf, - 0xc3, 0xe7, 0xb5, 0x4a, 0xf5, 0xf2, 0xbb, 0xc3, 0x52, 0x0d, 0x6b, 0xc9, - 0xee, 0x94, 0xae, 0x7f, 0xc8, 0x77, 0x27, 0xee, 0xbd, 0xb7, 0x75, 0x0d, - 0x4c, 0xc4, 0x69, 0x58, 0x31, 0x33, 0xc1, 0x82, 0xde, 0xf8, 0xe2, 0x4b, - 0x5e, 0x7e, 0xaf, 0xbf, 0x18, 0xf3, 0x65, 0xf7, 0x91, 0x9c, 0x88, 0xda, - 0x8b, 0xba, 0xfb, 0xee, 0x1e, 0xd0, 0xb7, 0xd5, 0xbd, 0xd8, 0x3f, 0x73, - 0x3b, 0xd7, 0x51, 0xab, 0x4c, 0xf2, 0x2b, 0x0d, 0x5c, 0xd3, 0xa8, 0xc3, - 0x13, 0x13, 0xaa, 0x04, 0xf7, 0x9a, 0x79, 0x07, 0xab, 0x1a, 0xd1, 0x8b, - 0xfa, 0x68, 0x17, 0xde, 0xc1, 0x44, 0x8b, 0x83, 0x7d, 0x9f, 0x55, 0xe8, - 0xaf, 0x08, 0x8f, 0xf7, 0x5d, 0x1c, 0xd3, 0xe1, 0x60, 0x5d, 0xf2, 0xfa, - 0x15, 0x93, 0x73, 0xfd, 0xab, 0xfb, 0x6e, 0xee, 0xe1, 0x7e, 0x2a, 0x19, - 0xac, 0xcb, 0x01, 0xf9, 0xfb, 0x24, 0x7e, 0x49, 0x89, 0x5f, 0x54, 0xc7, - 0x0f, 0xef, 0xed, 0x4f, 0x7d, 0xef, 0x7a, 0xaa, 0x1b, 0xde, 0xbc, 0xfb, - 0xfc, 0x4f, 0x63, 0xd7, 0xf6, 0x98, 0xb7, 0x0e, 0x57, 0xbb, 0xe7, 0xae, - 0x43, 0xde, 0x8b, 0x5d, 0x87, 0x30, 0xce, 0x73, 0xbf, 0xbc, 0x38, 0xd3, - 0x21, 0x79, 0x74, 0x57, 0x44, 0xf2, 0x41, 0xec, 0xfb, 0x22, 0x62, 0xee, - 0x1b, 0x8c, 0xbf, 0x92, 0xfb, 0xee, 0x97, 0x2a, 0xf4, 0xd9, 0x17, 0x87, - 0xcc, 0xfb, 0xc4, 0xbc, 0x57, 0xb0, 0xbe, 0x3e, 0xae, 0x04, 0x67, 0xbe, - 0xff, 0xb5, 0x3f, 0x9c, 0xaf, 0x99, 0x8e, 0x61, 0x1f, 0x5e, 0x2a, 0x16, - 0x78, 0xbf, 0xc4, 0xe5, 0xfb, 0x45, 0xbf, 0xe0, 0xe1, 0xf0, 0xf9, 0x29, - 0xd5, 0xf6, 0x13, 0x4d, 0x65, 0x3a, 0x73, 0xb0, 0xa7, 0xd5, 0xed, 0x23, - 0xc1, 0x27, 0xd4, 0x79, 0x4b, 0xde, 0xc1, 0xf2, 0x5e, 0xd6, 0xef, 0x61, - 0xf4, 0x73, 0xad, 0x79, 0x8c, 0xc7, 0xd0, 0xb7, 0x39, 0xbf, 0xca, 0xbd, - 0xb5, 0x75, 0x9b, 0xe9, 0x4b, 0xa7, 0xde, 0x67, 0xee, 0xb9, 0xb6, 0x6a, - 0xd0, 0x16, 0xee, 0x5b, 0x1f, 0xb2, 0xf3, 0x92, 0x1f, 0x85, 0x77, 0x89, - 0xff, 0x3d, 0x62, 0xfa, 0x85, 0x73, 0xc5, 0xb8, 0x67, 0xf3, 0xbd, 0x34, - 0xa1, 0xdf, 0x23, 0x09, 0x6f, 0x9e, 0x25, 0x32, 0x65, 0x82, 0xfb, 0xec, - 0x9b, 0x40, 0xf7, 0xdc, 0x84, 0xbe, 0xbc, 0xb5, 0x4b, 0x70, 0xb8, 0x91, - 0x71, 0x5b, 0x3e, 0x9a, 0x0b, 0x7e, 0x67, 0x21, 0x5c, 0x7f, 0x73, 0xfb, - 0xd1, 0x73, 0x6c, 0xd7, 0xbc, 0x81, 0x3c, 0xf3, 0xcd, 0x55, 0xb3, 0xf8, - 0xfc, 0xa6, 0x9d, 0x51, 0xd8, 0x99, 0xe9, 0x17, 0xbf, 0xda, 0x6f, 0x01, - 0xed, 0x92, 0x3a, 0x73, 0xd2, 0x7d, 0x97, 0xc3, 0x4e, 0x53, 0x4f, 0x26, - 0xbf, 0x13, 0x30, 0x9e, 0x5b, 0xc7, 0x63, 0xd5, 0xbc, 0x95, 0xe4, 0x97, - 0x4c, 0x7a, 0xcf, 0x16, 0xe2, 0x6e, 0xf2, 0xc1, 0xe4, 0x8f, 0xf7, 0x1d, - 0x7b, 0x9b, 0xa7, 0x5e, 0xfa, 0xe3, 0xef, 0x70, 0xbe, 0x84, 0x65, 0x3d, - 0x96, 0xe9, 0xef, 0xbb, 0x3c, 0x3e, 0x6f, 0x01, 0x9f, 0x8c, 0xd8, 0x6d, - 0xb7, 0xf0, 0x3b, 0x74, 0x96, 0xda, 0x25, 0xf1, 0x39, 0x57, 0x2d, 0x75, - 0x50, 0xec, 0xfb, 0x49, 0xfa, 0x1f, 0xc4, 0x31, 0x6e, 0x6f, 0xc9, 0x49, - 0xdc, 0x24, 0x8f, 0x9e, 0x16, 0xbf, 0x7f, 0x84, 0xdf, 0xb6, 0xf1, 0xbb, - 0xc5, 0xf5, 0xdb, 0xd4, 0x59, 0xaf, 0x9c, 0x99, 0x3a, 0x1f, 0xb8, 0x5e, - 0xdb, 0x27, 0xf9, 0xdd, 0x53, 0x24, 0xe7, 0xa1, 0x42, 0xbe, 0x3b, 0x38, - 0xe2, 0x4f, 0x89, 0x6a, 0x5a, 0xee, 0xdd, 0x57, 0x2c, 0xfb, 0x92, 0x7a, - 0x1f, 0xe6, 0x71, 0xfe, 0xec, 0x29, 0xf0, 0x34, 0xdf, 0x11, 0x8c, 0xdc, - 0xe0, 0x39, 0xf2, 0xe2, 0xc7, 0x37, 0x13, 0xff, 0x50, 0x07, 0x74, 0x9c, - 0x6a, 0xcd, 0xf7, 0x07, 0xcc, 0xe3, 0xfc, 0x26, 0xf7, 0xb7, 0xa1, 0xaf, - 0xdc, 0xdf, 0x76, 0x48, 0xfa, 0x08, 0xc1, 0xe5, 0x81, 0x21, 0xb2, 0x43, - 0xc7, 0xae, 0xd2, 0x7f, 0xfe, 0x61, 0x47, 0x54, 0xec, 0x28, 0xf7, 0xd8, - 0x11, 0xd0, 0x7b, 0x1d, 0xcd, 0xaf, 0x50, 0x5f, 0x73, 0x1e, 0x2e, 0x57, - 0xeb, 0x29, 0x47, 0xf4, 0xbd, 0xb0, 0xae, 0x88, 0xc6, 0xcb, 0xd4, 0xab, - 0xf0, 0xb7, 0x37, 0x59, 0x84, 0x3a, 0x96, 0xdc, 0x49, 0xf3, 0x35, 0xea, - 0xd5, 0x3e, 0x0e, 0xc4, 0x2b, 0xea, 0x18, 0xea, 0x73, 0xe3, 0x41, 0xb6, - 0x47, 0x1d, 0x1f, 0x34, 0xf5, 0x7a, 0xca, 0xef, 0x98, 0xbd, 0xeb, 0xa4, - 0x5e, 0x9c, 0xc0, 0x77, 0x51, 0xfd, 0x5e, 0x23, 0xfe, 0xd9, 0xe6, 0x3d, - 0xb8, 0xfb, 0x98, 0xa1, 0x8b, 0x7c, 0xe3, 0xfd, 0x27, 0x96, 0x0a, 0xad, - 0xf2, 0x8d, 0x07, 0xd6, 0x55, 0x09, 0xad, 0x36, 0xe3, 0xe9, 0xbe, 0x2b, - 0x5e, 0x29, 0xf9, 0x62, 0xf7, 0x7b, 0xe2, 0xcf, 0x47, 0xe2, 0xcf, 0x59, - 0xe0, 0x9f, 0xdc, 0x28, 0x78, 0x2c, 0x0a, 0xea, 0x17, 0xbb, 0xdc, 0x73, - 0x63, 0xd6, 0x11, 0x8f, 0x47, 0xd5, 0x5f, 0x3f, 0x97, 0x8f, 0x31, 0xd8, - 0x17, 0x00, 0x00, 0x00 }; +static u32 bnx2_rv2p_proc2[] = { + 0x00000000, 0x2a000000, 0x00000010, 0xb1d40000, 0x00000008, 0x02540003, + 0x00000018, 0x00040000, 0x00000018, 0x8000000a, 0x00000018, 0x8000000a, + 0x00000018, 0x8000000e, 0x00000018, 0x80000056, 0x00000018, 0x800001b9, + 0x00000018, 0x800001e1, 0x00000018, 0x8000019b, 0x00000018, 0x800001f9, + 0x00000018, 0x8000019f, 0x00000018, 0x800001a6, 0x00000018, 0x80000000, + 0x0000000c, 0x29800001, 0x00000000, 0x2a000000, 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, 0x00000018, 0x8000ffee, 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, 0x00000010, 0x001f0000, 0x00000000, 0x2f80aa00, + 0x00000000, 0x2a000000, 0x00000000, 0x0d610000, 0x00000000, 0x03620000, + 0x00000000, 0x2c400000, 0x00000000, 0x02638c00, 0x00000000, 0x26460000, + 0x00000010, 0x00420002, 0x00000008, 0x02040012, 0x00000010, 0xb9060836, + 0x00000000, 0x0f580000, 0x00000000, 0x0a640000, 0x00000000, 0x0ae50000, + 0x00000000, 0x0b660000, 0x00000000, 0x0c000000, 0x00000000, 0x0b800000, + 0x00000010, 0x00420009, 0x00000008, 0x0cc60012, 0x00000008, 0x0f800003, + 0x00000000, 0x00000000, 0x00000010, 0x009f0000, 0x00000008, 0x27110012, + 0x00000000, 0x66900000, 0x00000008, 0xa31b0012, 0x00000018, 0x80000008, + 0x00000000, 0x0cc60000, 0x00000008, 0x0f800003, 0x00000000, 0x00000000, + 0x00000010, 0x009f0000, 0x00000000, 0x27110000, 0x00000000, 0x66900000, + 0x00000000, 0x231b0000, 0x00000010, 0xb197320e, 0x00000000, 0x25960000, + 0x00000000, 0x021b0000, 0x00000010, 0x001f0000, 0x00000008, 0x0f800003, + 0x0000000c, 0x29800000, 0x00000010, 0x20530000, 0x00000000, 0x22c50800, + 0x00000010, 0x009f0000, 0x00000000, 0x27002200, 0x00000000, 0x26802000, + 0x00000000, 0x231b0000, 0x0000000c, 0x69520001, 0x00000018, 0x8000fff3, + 0x00000010, 0x01130002, 0x00000010, 0xb1980003, 0x00000010, 0x001f0000, + 0x00000008, 0x0f800004, 0x00000008, 0x22000003, 0x00000008, 0x2c80000c, + 0x00000008, 0x2d00000c, 0x00000010, 0x009f0000, 0x00000000, 0x25960000, + 0x0000000c, 0x29800000, 0x00000000, 0x32140000, 0x00000000, 0x32950000, + 0x00000000, 0x33160000, 0x00000000, 0x31e32e00, 0x00000008, 0x2d800010, + 0x00000010, 0x20530000, 0x00000018, 0x8000ffac, 0x00000000, 0x23000000, + 0x00000000, 0x25e60000, 0x00000008, 0x2200000b, 0x0000000c, 0x69520000, + 0x0000000c, 0x29800000, 0x00000010, 0x20530000, 0x00000018, 0x8000ffa5, + 0x0000000c, 0x29800001, 0x00000010, 0x91de0000, 0x00000000, 0x2fd50000, + 0x00000010, 0x001f0000, 0x00000000, 0x02700000, 0x00000000, 0x0d620000, + 0x00000000, 0xbb630800, 0x00000000, 0x2a000000, 0x00000009, 0x076000ff, + 0x0000000f, 0x2c0e0007, 0x00000008, 0x2c800000, 0x00000008, 0x2d000064, + 0x00000008, 0x2d80011c, 0x00000009, 0x06420002, 0x0000000c, 0x61420001, + 0x00000000, 0x0f400000, 0x00000000, 0x02d08c00, 0x00000000, 0x23000000, + 0x00000004, 0x826da000, 0x00000000, 0x8304a000, 0x00000000, 0x22c50c00, + 0x00000000, 0x03760000, 0x00000004, 0x83860a00, 0x00000000, 0x83870c00, + 0x00000010, 0x91de0000, 0x00000000, 0x037c0000, 0x00000000, 0x837b0c00, + 0x00000001, 0x83060e00, 0x00000000, 0x83870c00, 0x00000000, 0x82850e00, + 0x00000010, 0xb1860016, 0x0000000f, 0x47610018, 0x00000000, 0x068e0000, + 0x0000000f, 0x47670010, 0x0000000f, 0x47e20010, 0x00000000, 0x870e1e00, + 0x00000010, 0xb70e1a10, 0x00000010, 0x0ce7000e, 0x00000008, 0x22000009, + 0x00000000, 0x286d0000, 0x0000000f, 0x65680010, 0x00000003, 0xf66c9400, + 0x00000010, 0xb972a003, 0x0000000c, 0x73e70019, 0x0000000c, 0x21420004, + 0x00000018, 0x8000023f, 0x00000000, 0x37ed0000, 0x0000000c, 0x73e7001a, + 0x00000010, 0x20530000, 0x00000008, 0x22000008, 0x0000000c, 0x61420004, + 0x00000000, 0x02f60000, 0x00000004, 0x82840a00, 0x00000010, 0xb1840a2b, + 0x00000010, 0x2d67000a, 0x00000010, 0xb96d0804, 0x00000004, 0xb6ed0a00, + 0x00000000, 0x37ed0000, 0x00000018, 0x80000029, 0x0000000c, 0x61420000, + 0x00000000, 0x37040000, 0x00000000, 0x37850000, 0x0000000c, 0x33e7001a, + 0x00000018, 0x80000024, 0x00000010, 0xb96d0809, 0x00000004, 0xb6ed0a00, + 0x00000000, 0x036d0000, 0x00000004, 0xb76e0c00, 0x00000010, 0x91ee0c1f, + 0x0000000c, 0x73e7001a, 0x00000004, 0xb6ef0c00, 0x00000000, 0x37ed0000, + 0x00000018, 0x8000001b, 0x0000000c, 0x61420000, 0x00000010, 0xb7ee0a05, + 0x00000010, 0xb96f0815, 0x00000003, 0xb76e0800, 0x00000004, 0xb7ef0a00, + 0x00000018, 0x80000015, 0x00000010, 0x0ce7000c, 0x00000008, 0x22000009, + 0x00000000, 0x286d0000, 0x0000000f, 0x65680010, 0x00000003, 0xf66c9400, + 0x00000010, 0xb972a003, 0x0000000c, 0x73e70019, 0x0000000c, 0x21420004, + 0x00000018, 0x80000215, 0x00000010, 0x20530000, 0x00000008, 0x22000008, + 0x0000000c, 0x61420004, 0x00000000, 0x37040000, 0x00000000, 0x37850000, + 0x00000000, 0x036d0000, 0x00000003, 0xb8f10c00, 0x00000018, 0x80000004, + 0x00000000, 0x02840000, 0x00000002, 0x21421800, 0x0000000c, 0x61420000, + 0x00000000, 0x286d0000, 0x0000000f, 0x65ed0010, 0x00000009, 0x266dffff, + 0x00000000, 0x23000000, 0x00000010, 0xb1840a3d, 0x00000010, 0x01420002, + 0x00000004, 0xb8f10a00, 0x00000003, 0x83760a00, 0x00000010, 0xb8040c39, + 0x00000010, 0xb7e6080a, 0x00000000, 0x0a640000, 0x00000000, 0x0ae50000, + 0x00000009, 0x0c68ffff, 0x00000009, 0x0b67ffff, 0x00000000, 0x0be60000, + 0x00000000, 0x0c840000, 0x00000010, 0xb197320c, 0x00000008, 0x0f800002, + 0x00000018, 0x8000000a, 0x00000000, 0x0a6a0000, 0x00000000, 0x0aeb0000, + 0x00000000, 0x0c000000, 0x00000009, 0x0b6cffff, 0x00000000, 0x0be90000, + 0x00000000, 0x0c840000, 0x00000010, 0xb1973203, 0x00000008, 0x0f800002, + 0x00000018, 0x80000001, 0x00000010, 0x001f0000, 0x00000000, 0x0c860000, + 0x00000000, 0x06980000, 0x00000008, 0x0f800003, 0x00000000, 0x00000000, + 0x00000010, 0x009f0000, 0x00000010, 0xb1973210, 0x00000000, 0x231b0000, + 0x00000000, 0x02043600, 0x00000003, 0x8384a000, 0x0000000f, 0x65870010, + 0x00000009, 0x2607ffff, 0x00000000, 0x27111a00, 0x00000000, 0x66900000, + 0x0000000c, 0x29000000, 0x00000018, 0x800001de, 0x00000000, 0x06980000, + 0x00000010, 0x20530000, 0x00000000, 0x22c58c00, 0x00000010, 0x001f0000, + 0x00000008, 0x0f800003, 0x00000018, 0x8000fff0, 0x00000000, 0x02043600, + 0x00000000, 0x231b0000, 0x00000003, 0x8384a000, 0x0000000f, 0x65870010, + 0x00000009, 0x2607ffff, 0x00000000, 0x27111a00, 0x00000000, 0x66900000, + 0x0000000c, 0x29000000, 0x00000010, 0x91840a02, 0x00000002, 0x21421800, + 0x00000000, 0x32140000, 0x00000000, 0x32950000, 0x00000005, 0x73e72c00, + 0x00000005, 0x74683000, 0x00000000, 0x33170000, 0x00000018, 0x80000138, + 0x00000010, 0x91c60004, 0x00000008, 0x07000004, 0x00000010, 0xb1c41c02, + 0x00000010, 0x91840a04, 0x00000018, 0x800001c3, 0x00000010, 0x20530000, + 0x00000000, 0x22c58c00, 0x00000010, 0xb1840a8e, 0x0000000c, 0x21420006, + 0x00000010, 0x0ce7001a, 0x0000000f, 0x43680010, 0x00000000, 0x03f30c00, + 0x00000010, 0x91870850, 0x0000000f, 0x46ec0010, 0x00000010, 0xb68d0c4e, + 0x00000000, 0x838d0c00, 0x00000000, 0xa3050800, 0x00000001, 0xa3460e00, + 0x00000000, 0x02048c00, 0x00000010, 0x91840a02, 0x00000002, 0x21421800, + 0x00000010, 0x001f0000, 0x00000008, 0x22000008, 0x00000003, 0x8384a000, + 0x0000000f, 0x65870010, 0x00000009, 0x2607ffff, 0x00000000, 0x27750c00, + 0x00000000, 0x66f40000, 0x0000000c, 0x29000000, 0x00000018, 0x800001aa, + 0x00000000, 0x03068c00, 0x00000003, 0xf4680c00, 0x00000010, 0x20530000, + 0x00000000, 0x22c58c00, 0x00000018, 0x8000ffe5, 0x00000000, 0x39760000, + 0x00000000, 0x39840000, 0x0000000c, 0x33e70019, 0x00000010, 0x001f0000, + 0x00000000, 0x031e0000, 0x00000000, 0x0760fe00, 0x0000000f, 0x0f0e0007, + 0x00000000, 0x83850800, 0x00000000, 0x0a7d0000, 0x00000000, 0x0afe0000, + 0x00000000, 0x0b7f0000, 0x00000000, 0x0d7a0000, 0x00000000, 0x0c000000, + 0x00000000, 0x0bfc0000, 0x00000000, 0x0c970e00, 0x00000008, 0x0f800003, + 0x0000000f, 0x47670010, 0x00000008, 0x070e0001, 0x0000000b, 0xc38000ff, + 0x00000002, 0x43870000, 0x00000001, 0x33e70e00, 0x0000000f, 0x038e0010, + 0x00000002, 0x33e70e00, 0x00000000, 0x28f30000, 0x00000010, 0x009f0000, + 0x00000000, 0x02043600, 0x00000010, 0x91840a02, 0x00000002, 0x21421800, + 0x00000008, 0x22000006, 0x00000000, 0x231b0000, 0x00000000, 0x23ff0000, + 0x00000000, 0x241b0000, 0x00000003, 0x8384a000, 0x0000000f, 0x65870010, + 0x00000009, 0x2607ffff, 0x00000000, 0x27110000, 0x00000000, 0x26900000, + 0x0000000c, 0x29000000, 0x00000018, 0x8000017e, 0x00000003, 0xf4683600, + 0x00000000, 0x3a100000, 0x00000000, 0x3a910000, 0x00000003, 0xf66c2400, + 0x00000010, 0x001f0000, 0x00000010, 0xb1923604, 0x00000008, 0x0f800004, + 0x00000000, 0x00000000, 0x00000010, 0x009f0000, 0x00000000, 0x3e170000, + 0x00000000, 0x3e940000, 0x00000000, 0x3f150000, 0x00000000, 0x3f960000, + 0x00000010, 0x001f0000, 0x00000000, 0x0f060000, 0x00000010, 0x20530000, + 0x00000000, 0x22c53600, 0x00000018, 0x8000ffac, 0x00000010, 0x001f0000, + 0x00000000, 0x031e0000, 0x00000000, 0x83850800, 0x00000009, 0x076000ff, + 0x0000000f, 0x0f0e0007, 0x00000000, 0x0c000000, 0x00000000, 0x0a7d0000, + 0x00000000, 0x0afe0000, 0x00000000, 0x0b7f0000, 0x00000000, 0x0d7a0000, + 0x00000000, 0x0bfc0000, 0x00000000, 0x0c970e00, 0x00000008, 0x0f800003, + 0x0000000f, 0x47670010, 0x00000008, 0x070e0001, 0x0000000b, 0xc38000ff, + 0x00000002, 0x43870000, 0x00000001, 0x33e70e00, 0x0000000f, 0x038e0010, + 0x00000002, 0x33e70e00, 0x00000000, 0x39840000, 0x00000003, 0xb9720800, + 0x00000000, 0x28f30000, 0x0000000f, 0x65680010, 0x00000010, 0x009f0000, + 0x00000000, 0x02043600, 0x00000010, 0x91840a02, 0x00000002, 0x21421800, + 0x00000008, 0x22000007, 0x00000000, 0x231b0000, 0x00000000, 0x23ff0000, + 0x00000000, 0x241b0000, 0x00000003, 0x8384a000, 0x0000000f, 0x65870010, + 0x00000009, 0x2607ffff, 0x00000000, 0x27110000, 0x00000000, 0x26900000, + 0x0000000c, 0x29000000, 0x00000018, 0x80000145, 0x00000003, 0xf4683600, + 0x00000000, 0x3a100000, 0x00000000, 0x3a910000, 0x00000003, 0xf66c2400, + 0x00000010, 0x001f0000, 0x00000010, 0xb1923604, 0x00000008, 0x0f800004, + 0x00000000, 0x00000000, 0x00000010, 0x009f0000, 0x00000000, 0x3e170000, + 0x00000000, 0x3e940000, 0x00000000, 0x3f150000, 0x00000000, 0x3f960000, + 0x00000010, 0x001f0000, 0x00000000, 0x0f060000, 0x00000010, 0x20530000, + 0x00000000, 0x22c53600, 0x00000018, 0x8000ff73, 0x00000010, 0x0ce70005, + 0x00000008, 0x2c80000c, 0x00000008, 0x2d000070, 0x00000008, 0x2d800010, + 0x00000000, 0x00000000, 0x00000010, 0x205f0000, 0x00000018, 0x8000011d, + 0x00000000, 0x2c1e0000, 0x00000008, 0x2c8000b8, 0x00000008, 0x2d000010, + 0x00000008, 0x2d800048, 0x00000000, 0x00000000, 0x00000010, 0x91de0000, + 0x00000018, 0x8000fe5d, 0x0000000c, 0x29800001, 0x00000000, 0x2a000000, + 0x00000010, 0x001f0000, 0x00000000, 0x0f008000, 0x00000008, 0x0f800007, + 0x00000018, 0x80000006, 0x0000000c, 0x29800001, 0x00000000, 0x2a000000, + 0x00000010, 0x001f0000, 0x0000000f, 0x0f470007, 0x00000008, 0x0f800008, + 0x00000018, 0x80000119, 0x00000010, 0x20530000, 0x00000018, 0x8000fe4f, + 0x0000000c, 0x29800001, 0x00000010, 0x91de0000, 0x00000000, 0x2fd50000, + 0x00000000, 0x2a000000, 0x00000009, 0x0261ffff, 0x0000000d, 0x70e10001, + 0x00000018, 0x80000101, 0x00000000, 0x2c400000, 0x00000008, 0x2c8000c4, + 0x00000008, 0x2d00001c, 0x00000008, 0x2d800001, 0x00000005, 0x70e10800, + 0x00000010, 0x91de0000, 0x00000018, 0x8000fe41, 0x0000000c, 0x29800001, + 0x00000010, 0x91de0000, 0x00000000, 0x2fd50000, 0x00000010, 0x001f0000, + 0x00000000, 0x02700000, 0x00000000, 0x0d620000, 0x00000000, 0xbb630800, + 0x00000000, 0x2a000000, 0x00000000, 0x0f400000, 0x00000000, 0x2c400000, + 0x0000000c, 0x73e7001b, 0x00000010, 0x0ce7000e, 0x00000000, 0x286d0000, + 0x0000000f, 0x65ed0010, 0x00000009, 0x266dffff, 0x00000018, 0x80000069, + 0x00000008, 0x02000004, 0x00000010, 0x91c40803, 0x00000018, 0x800000f6, + 0x00000010, 0x20530000, 0x00000018, 0x800000e5, 0x00000008, 0x2c8000b8, + 0x00000008, 0x2d000010, 0x00000008, 0x2d800048, 0x00000018, 0x80000005, + 0x00000008, 0x2c8000c4, 0x00000008, 0x2d00001c, 0x00000008, 0x2d800001, + 0x00000000, 0x00000000, 0x00000010, 0x205f0000, 0x00000008, 0x2c800048, + 0x00000008, 0x2d000068, 0x00000008, 0x2d800104, 0x00000000, 0x00000000, + 0x00000010, 0x91de0000, 0x00000000, 0x27f60000, 0x00000010, 0xb87a9e04, + 0x00000008, 0x2200000d, 0x00000018, 0x800000e2, 0x00000010, 0x20530000, + 0x00000018, 0x8000fe18, 0x0000000c, 0x29800001, 0x00000010, 0x91de0000, + 0x00000000, 0x2fd50000, 0x00000010, 0x001f0000, 0x00000000, 0x02700000, + 0x00000000, 0x0d620000, 0x00000000, 0xbb630800, 0x00000000, 0x2a000000, + 0x00000010, 0x0e670011, 0x00000000, 0x286d0000, 0x0000000f, 0x65ed0010, + 0x00000009, 0x266dffff, 0x00000004, 0xb8f1a000, 0x00000000, 0x0f400000, + 0x0000000c, 0x73e7001c, 0x00000018, 0x80000040, 0x00000008, 0x02000004, + 0x00000010, 0x91c40802, 0x00000018, 0x800000cd, 0x00000000, 0x2c1e0000, + 0x00000008, 0x2c8000b8, 0x00000008, 0x2d000010, 0x00000008, 0x2d800048, + 0x00000010, 0x20530000, 0x00000010, 0x91de0000, 0x00000018, 0x8000fdfe, + 0x0000000c, 0x29800001, 0x00000000, 0x03550000, 0x00000000, 0x06460000, + 0x00000000, 0x03d60000, 0x00000000, 0x2a000000, 0x0000000f, 0x0f480007, + 0x00000010, 0xb18c0027, 0x0000000f, 0x47420008, 0x00000009, 0x070e000f, + 0x00000008, 0x070e0008, 0x00000010, 0x001f0000, 0x00000008, 0x09000001, + 0x00000007, 0x09121c00, 0x00000003, 0xcbca9200, 0x00000000, 0x0b97a200, + 0x00000007, 0x4b171c00, 0x0000000f, 0x0a960003, 0x00000000, 0x0a959c00, + 0x00000000, 0x4a009a00, 0x00000008, 0x82120001, 0x00000001, 0x0c170800, + 0x00000000, 0x02180000, 0x00000000, 0x0c971800, 0x00000008, 0x0d00ffff, + 0x00000008, 0x0f800006, 0x0000000c, 0x29000000, 0x00000008, 0x22000001, + 0x00000000, 0x22c50c00, 0x00000010, 0x009f0000, 0x00000010, 0xb197320b, + 0x00000000, 0x231b0000, 0x00000000, 0x27110800, 0x00000000, 0x66900000, + 0x00000018, 0x800000a4, 0x00000000, 0x02180000, 0x00000010, 0x20530000, + 0x00000000, 0x22c53600, 0x00000010, 0x001f0000, 0x00000008, 0x0f800006, + 0x00000018, 0x8000fff5, 0x00000010, 0x91870002, 0x00000008, 0x2200000a, + 0x00000000, 0x231b0000, 0x00000000, 0x27110800, 0x00000000, 0x66900000, + 0x00000018, 0x80000098, 0x00000008, 0x0200000a, 0x00000010, 0x91c40804, + 0x00000010, 0x02c20003, 0x00000010, 0x001f0000, 0x00000008, 0x0f800008, + 0x00000010, 0x20530000, 0x00000018, 0x8000fdc9, 0x00000000, 0x06820000, + 0x00000010, 0x001f0000, 0x00000010, 0x0ce70028, 0x00000000, 0x03720000, + 0x00000000, 0xa8760c00, 0x00000000, 0x0cf60000, 0x00000010, 0xb8723224, + 0x00000000, 0x03440000, 0x00000008, 0x22000010, 0x00000000, 0x03ca0000, + 0x0000000f, 0x65680010, 0x00000000, 0x0bcf0000, 0x00000000, 0x27f20000, + 0x00000010, 0xb7ef3203, 0x0000000c, 0x21420004, 0x0000000c, 0x73e70019, + 0x00000000, 0x07520000, 0x00000000, 0x29000000, 0x00000018, 0x8000007e, + 0x00000004, 0xb9723200, 0x00000010, 0x20530000, 0x00000000, 0x22060000, + 0x0000000c, 0x61420004, 0x00000000, 0x25070000, 0x00000000, 0x27970000, + 0x00000000, 0x290e0000, 0x00000010, 0x0ce70010, 0x00000010, 0xb873320f, + 0x0000000f, 0x436c0010, 0x00000000, 0x03f30c00, 0x00000000, 0x03f30000, + 0x00000000, 0x83990e00, 0x00000001, 0x83860e00, 0x00000000, 0x83060e00, + 0x00000003, 0xf66c0c00, 0x00000000, 0x39f30e00, 0x00000000, 0x3af50e00, + 0x00000000, 0x7a740000, 0x0000000f, 0x43680010, 0x00000001, 0x83860e00, + 0x00000000, 0x83060e00, 0x00000003, 0xf4680c00, 0x00000000, 0x286d0000, + 0x00000000, 0x03690000, 0x00000010, 0xb1f60c54, 0x00000000, 0x0a6a0000, + 0x00000000, 0x0aeb0000, 0x00000009, 0x0b6cffff, 0x00000000, 0x0c000000, + 0x00000000, 0x0be90000, 0x00000003, 0x8cf6a000, 0x0000000c, 0x09800002, + 0x00000010, 0x009f0000, 0x00000010, 0xb8173209, 0x00000000, 0x35140000, + 0x00000000, 0x35950000, 0x00000005, 0x766c2c00, 0x00000000, 0x34970000, + 0x00000004, 0xb8f12e00, 0x00000010, 0x001f0000, 0x00000008, 0x0f800004, + 0x00000018, 0x8000fff7, 0x00000000, 0x03e90000, 0x00000010, 0xb8f6a01a, + 0x00000010, 0x20130019, 0x00000010, 0xb1f10e18, 0x00000000, 0x83973200, + 0x00000000, 0x38700e00, 0x00000000, 0xbb760e00, 0x00000000, 0x37d00000, + 0x0000000c, 0x73e7001a, 0x00000003, 0xb8f1a000, 0x00000000, 0x32140000, + 0x00000000, 0x32950000, 0x00000005, 0x73e72c00, 0x00000000, 0x33190000, + 0x00000005, 0x74680000, 0x00000010, 0x0ce7000d, 0x00000008, 0x22000009, + 0x00000000, 0x07520000, 0x00000000, 0x29000000, 0x0000000c, 0x73e70019, + 0x0000000f, 0x65680010, 0x0000000c, 0x21420004, 0x00000018, 0x8000003c, + 0x00000010, 0x20530000, 0x0000000c, 0x61420004, 0x00000000, 0x290e0000, + 0x00000018, 0x80000002, 0x00000010, 0x91973206, 0x00000000, 0x35140000, + 0x00000000, 0x35950000, 0x00000005, 0x766c2c00, 0x00000000, 0x34990000, + 0x00000004, 0xb8f13200, 0x00000000, 0x83690c00, 0x00000010, 0xb1860013, + 0x00000000, 0x28e90000, 0x00000008, 0x22000004, 0x00000000, 0x23ec0000, + 0x00000000, 0x03690000, 0x00000010, 0xb8660c07, 0x00000009, 0x036cffff, + 0x00000000, 0x326a0000, 0x00000000, 0x32eb0000, 0x00000005, 0x73e70c00, + 0x00000000, 0x33690000, 0x00000005, 0x74680000, 0x0000000c, 0x73e7001c, + 0x00000000, 0x03690000, 0x00000010, 0xb1f60c12, 0x00000010, 0xb1d00c11, + 0x0000000c, 0x21420005, 0x0000000c, 0x33e7001c, 0x00000018, 0x8000000e, + 0x00000010, 0x2e67000d, 0x00000000, 0x03690000, 0x00000010, 0xb1f60c0b, + 0x00000010, 0xb1d00c0a, 0x00000000, 0x03440000, 0x00000008, 0x2200000c, + 0x00000000, 0x07520000, 0x00000000, 0x29000000, 0x00000018, 0x80000015, + 0x0000000c, 0x33e7001c, 0x00000010, 0x20530000, 0x00000000, 0x22060000, + 0x00000000, 0x290e0000, 0x00000018, 0x000d0000, 0x00000000, 0x06820000, + 0x00000010, 0x2de7000d, 0x00000010, 0x0ce7000c, 0x00000000, 0x27f20000, + 0x00000010, 0xb96d9e0a, 0x00000000, 0xa86d9e00, 0x00000009, 0x0361ffff, + 0x00000010, 0xb7500c07, 0x00000008, 0x2200000f, 0x0000000f, 0x65680010, + 0x00000000, 0x29000000, 0x00000018, 0x80000004, 0x0000000c, 0x33e7001b, + 0x00000010, 0x20530000, 0x00000018, 0x000d0000, 0x00000000, 0x2b820000, + 0x00000010, 0x20d2002f, 0x00000010, 0x0052002e, 0x00000009, 0x054e0007, + 0x00000010, 0xb18a002c, 0x00000000, 0x050a8c00, 0x00000008, 0x850a0008, + 0x00000010, 0x918a0029, 0x00000003, 0xc5008800, 0x00000008, 0xa3460001, + 0x00000010, 0xb1c60007, 0x00000008, 0x22000001, 0x0000000c, 0x29800000, + 0x00000010, 0x20530000, 0x00000000, 0x274e8c00, 0x00000000, 0x66cd0000, + 0x00000000, 0x22c58c00, 0x00000008, 0x22000014, 0x00000003, 0x22c58e00, + 0x00000003, 0x23c58e00, 0x00000003, 0x22c58e00, 0x00000003, 0x26cd9e00, + 0x00000003, 0x27cd9e00, 0x00000003, 0x26cd9e00, 0x00000003, 0x274ea000, + 0x00000003, 0x284ea000, 0x00000003, 0x274ea000, 0x0000000c, 0x69520000, + 0x0000000c, 0x29800000, 0x00000010, 0x20530000, 0x00000003, 0x22c58e00, + 0x00000003, 0x23c58e00, 0x00000003, 0x22c58e00, 0x00000003, 0x26cd9e00, + 0x00000003, 0x27cd9e00, 0x00000003, 0x26cd9e00, 0x00000003, 0x274ea000, + 0x00000003, 0x284ea000, 0x00000003, 0x274ea000, 0x00000000, 0xa2c58c00, + 0x00000000, 0xa74e8c00, 0x00000000, 0xe6cd0000, 0x0000000f, 0x620a0010, + 0x00000008, 0x23460001, 0x0000000c, 0x29800000, 0x00000010, 0x20530000, + 0x0000000c, 0x29520000, 0x00000018, 0x80000002, 0x0000000c, 0x29800000, + 0x00000018, 0x00570000 }; static const int bnx2_TPAT_b06FwReleaseMajor = 0x1; static const int bnx2_TPAT_b06FwReleaseMinor = 0x0; @@ -1330,199 +2339,201 @@ static const u32 bnx2_TPAT_b06FwBssAddr = 0x08001aa0; static const int bnx2_TPAT_b06FwBssLen = 0x250; static const u32 bnx2_TPAT_b06FwSbssAddr = 0x08001a60; static const int bnx2_TPAT_b06FwSbssLen = 0x34; -static u8 bnx2_TPAT_b06FwText[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x47, 0xd2, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xc5, 0x57, 0x4d, 0x68, - 0x1c, 0xe7, 0x19, 0x7e, 0xe7, 0x77, 0x47, 0x62, 0x25, 0x8d, 0x93, 0x3d, - 0xac, 0x5d, 0xa5, 0x99, 0x91, 0x46, 0x3f, 0x54, 0x26, 0x9e, 0x84, 0xa5, - 0x56, 0x61, 0x20, 0xe3, 0x99, 0x95, 0x2c, 0x0c, 0x05, 0x07, 0x42, 0x08, - 0xe4, 0xb2, 0x1d, 0x49, 0x36, 0x85, 0x1e, 0x5a, 0x9a, 0x43, 0xa0, 0x05, - 0x0f, 0x33, 0xeb, 0x34, 0x87, 0xc5, 0xdb, 0xaa, 0xc5, 0xbe, 0x94, 0xd6, - 0x95, 0xea, 0xe8, 0xb2, 0x68, 0xe2, 0x53, 0x0f, 0xc5, 0xd8, 0xb4, 0x54, - 0xd0, 0x53, 0x7b, 0x0a, 0x85, 0x5c, 0x4c, 0x69, 0x20, 0x85, 0x12, 0x44, - 0x0f, 0x21, 0xd4, 0xad, 0xa7, 0xcf, 0xfb, 0xcd, 0x8c, 0xbc, 0xbb, 0x95, - 0x5b, 0x1f, 0x02, 0x15, 0xac, 0x66, 0xe6, 0xfb, 0xde, 0xf7, 0xfb, 0x79, - 0x9f, 0xe7, 0x79, 0xbf, 0xf7, 0x6b, 0xca, 0x34, 0x49, 0xe5, 0xdf, 0x14, - 0x7e, 0x6f, 0x7f, 0xe3, 0xdb, 0x6f, 0x7f, 0xf5, 0xa5, 0x57, 0x2c, 0xa2, - 0x57, 0x5e, 0x92, 0x64, 0x5d, 0xa6, 0x2f, 0xe0, 0x4f, 0x21, 0x32, 0xab, - 0xf1, 0xf9, 0x47, 0x86, 0xec, 0x75, 0xce, 0x04, 0x0e, 0x19, 0x8a, 0x77, - 0x34, 0xbb, 0xe9, 0x10, 0xf9, 0x83, 0x15, 0x2b, 0xa4, 0x7f, 0xe5, 0x71, - 0x43, 0x25, 0x6e, 0x7f, 0xc1, 0xfb, 0xe7, 0xb9, 0x7b, 0xe7, 0xed, 0xa3, - 0xdb, 0x0a, 0x19, 0xa6, 0xd7, 0x31, 0xcc, 0x45, 0x32, 0x66, 0xe1, 0xf3, - 0xd3, 0xa5, 0x75, 0x8d, 0xa6, 0xab, 0xb1, 0x4c, 0x4a, 0xfa, 0x06, 0xad, - 0xf5, 0x30, 0x8e, 0xf3, 0x8e, 0x14, 0x66, 0xaa, 0x14, 0xde, 0x32, 0x48, - 0xf6, 0x7c, 0x29, 0xc8, 0x1c, 0xf4, 0x49, 0x14, 0xb8, 0x35, 0xf2, 0xcd, - 0x3c, 0xff, 0xa6, 0x2b, 0x93, 0xec, 0x3c, 0xce, 0xe7, 0x17, 0xd6, 0xa5, - 0x60, 0x7f, 0x43, 0x0a, 0xf7, 0x03, 0xde, 0x37, 0xd6, 0xb1, 0x2e, 0xf9, - 0xfb, 0xfc, 0xf4, 0x8c, 0xb0, 0x37, 0x4d, 0x9d, 0x06, 0xcd, 0xc8, 0x0e, - 0xfb, 0x5a, 0x14, 0xba, 0x2b, 0x4d, 0x85, 0xe6, 0xf1, 0x9b, 0xa0, 0x6d, - 0x97, 0xea, 0x81, 0x4b, 0xaa, 0xe2, 0xc8, 0x14, 0x36, 0x24, 0xfa, 0x65, - 0x4b, 0xc3, 0xef, 0x92, 0xd4, 0xde, 0xdf, 0x2a, 0xc7, 0x69, 0x50, 0x8a, - 0xb5, 0x44, 0x0d, 0x5e, 0x5b, 0xe1, 0x1f, 0xb8, 0x2b, 0xa6, 0x4c, 0xf3, - 0xf8, 0x4d, 0xe1, 0x3d, 0x82, 0x9d, 0x46, 0x41, 0x6b, 0xbc, 0x6f, 0x02, - 0xef, 0x58, 0x27, 0xc6, 0x0a, 0xc4, 0x3a, 0x2c, 0xac, 0xc3, 0xa1, 0x6e, - 0x7f, 0x03, 0xfb, 0x58, 0x68, 0x46, 0xa4, 0x53, 0x57, 0xac, 0x7d, 0x8a, - 0x12, 0x53, 0xa1, 0xe4, 0xac, 0x46, 0xfe, 0x65, 0x15, 0xdf, 0xcf, 0x51, - 0x6c, 0x4a, 0xb0, 0xe9, 0x96, 0xf8, 0xd5, 0xd0, 0xaf, 0xa3, 0x7d, 0x86, - 0x92, 0xc6, 0x29, 0x49, 0xf6, 0xbe, 0x8f, 0xf6, 0x05, 0x33, 0xa2, 0xef, - 0xe1, 0x29, 0xe1, 0xfb, 0x14, 0x8f, 0x87, 0x6f, 0x89, 0x14, 0x87, 0xcc, - 0x20, 0xb3, 0x28, 0xcd, 0x2a, 0x5f, 0x6e, 0x2f, 0xda, 0xe2, 0x6c, 0x1c, - 0x3b, 0xd8, 0xf5, 0x5f, 0xa5, 0x8e, 0x49, 0xb1, 0xea, 0xc1, 0xa6, 0xef, - 0x98, 0x6d, 0xe0, 0xe4, 0x0b, 0x3c, 0xbf, 0xc6, 0xed, 0xfc, 0x87, 0x76, - 0x8b, 0x14, 0xcf, 0x31, 0x43, 0x6a, 0x51, 0xd1, 0xd7, 0x30, 0x83, 0x5b, - 0x2f, 0x93, 0x2f, 0xe2, 0x61, 0xe0, 0xdd, 0xc4, 0x9e, 0x74, 0x60, 0x9b, - 0xf8, 0x32, 0xc5, 0x4d, 0x83, 0xec, 0xd5, 0x2d, 0xf4, 0x7c, 0xdc, 0x53, - 0x10, 0x67, 0xc6, 0x49, 0x2d, 0xfd, 0x18, 0xd7, 0xdf, 0x62, 0x5d, 0xb1, - 0x69, 0xd0, 0x0c, 0x75, 0x5e, 0xcf, 0xf3, 0x3b, 0x6e, 0x9e, 0xeb, 0x9e, - 0xb3, 0xfc, 0x3e, 0xad, 0x34, 0x35, 0x5a, 0x34, 0xf1, 0x44, 0xdc, 0x1c, - 0xc4, 0x46, 0x2d, 0xe7, 0x9f, 0x2a, 0xd7, 0xfa, 0x48, 0x42, 0xe8, 0xe9, - 0xcf, 0xbd, 0xdf, 0xf0, 0xde, 0x97, 0xd7, 0x85, 0x7d, 0x9e, 0xef, 0xae, - 0x3e, 0xcd, 0x5e, 0x93, 0x0b, 0xfb, 0x3c, 0x5f, 0x6b, 0xf1, 0x7c, 0x36, - 0xf6, 0xc6, 0x9c, 0x24, 0x5a, 0x1b, 0xb8, 0x46, 0xd4, 0xc3, 0xba, 0x1c, - 0x3c, 0x07, 0x4d, 0xac, 0xdd, 0x5e, 0xb6, 0x24, 0x83, 0x12, 0x27, 0x7f, - 0x11, 0x3c, 0xf0, 0x43, 0xc7, 0xfe, 0x53, 0xa8, 0xd4, 0x68, 0xcf, 0xad, - 0x53, 0x37, 0x6b, 0x52, 0x92, 0x75, 0x29, 0xc8, 0x64, 0x8c, 0x5f, 0xa3, - 0x5d, 0xe7, 0xf3, 0x7c, 0xcd, 0x75, 0x81, 0x33, 0xb1, 0x5f, 0x73, 0x8d, - 0x66, 0xd1, 0xbf, 0x62, 0x6e, 0x91, 0x8b, 0x98, 0xcb, 0x88, 0xc9, 0xbc, - 0x78, 0x4f, 0x32, 0x17, 0xfd, 0x14, 0xcb, 0x2d, 0xdb, 0x4c, 0xc8, 0x6e, - 0x06, 0x0a, 0x99, 0xb2, 0x67, 0xc2, 0x26, 0xa6, 0x76, 0x66, 0xd0, 0x43, - 0xe5, 0x1d, 0xc1, 0xe3, 0xb4, 0xff, 0x30, 0xbf, 0xb7, 0xd4, 0xa4, 0xfb, - 0x59, 0x83, 0xee, 0x66, 0x24, 0x47, 0x1c, 0xab, 0x86, 0x49, 0x1f, 0x64, - 0xd5, 0x3e, 0xc0, 0x65, 0x27, 0x39, 0xa3, 0x40, 0x67, 0x9b, 0xee, 0x03, - 0xb0, 0xc4, 0x06, 0x0e, 0x31, 0xf6, 0x5c, 0x3d, 0x79, 0x4f, 0xb7, 0xcf, - 0x6c, 0x3a, 0xf6, 0x7b, 0x21, 0xb3, 0xf3, 0x86, 0x8a, 0xd6, 0xe1, 0x38, - 0x7c, 0x1d, 0xfe, 0x26, 0x5d, 0x87, 0x5e, 0x64, 0xc4, 0x63, 0xee, 0xc0, - 0xa0, 0xfd, 0x5e, 0x8d, 0xac, 0x5d, 0x95, 0xa2, 0x7e, 0x83, 0xdc, 0x45, - 0xdb, 0x22, 0x59, 0x6e, 0xc8, 0x88, 0xdf, 0xdc, 0x6e, 0x4e, 0xeb, 0xae, - 0x46, 0x87, 0xce, 0x77, 0x75, 0x9a, 0x4e, 0x5c, 0x9d, 0xd8, 0xc6, 0xa0, - 0xb9, 0xf7, 0x0d, 0x29, 0xec, 0xf3, 0xfa, 0x39, 0xce, 0x46, 0x19, 0x67, - 0x55, 0x0a, 0x6e, 0xd5, 0x68, 0x7e, 0xe7, 0x6f, 0x79, 0xe0, 0x20, 0xc6, - 0xe0, 0xf1, 0x66, 0xcb, 0x56, 0x68, 0x12, 0x6d, 0xbb, 0xdc, 0x77, 0x54, - 0xb6, 0xf3, 0x18, 0x79, 0x1e, 0xb8, 0xcf, 0x53, 0xc0, 0xfc, 0x7e, 0x9d, - 0x7d, 0x6a, 0x34, 0xb7, 0xc3, 0xba, 0xc0, 0x73, 0x97, 0xbf, 0x79, 0x6d, - 0x13, 0x14, 0x61, 0x37, 0xd1, 0x72, 0x03, 0xfb, 0x97, 0x85, 0x06, 0x22, - 0xec, 0x56, 0x76, 0x26, 0xf1, 0x14, 0x71, 0x50, 0x0a, 0x3e, 0x73, 0x5e, - 0xa8, 0x53, 0x08, 0x5c, 0x55, 0xac, 0x67, 0x8b, 0x16, 0x9a, 0xdb, 0xa2, - 0x0f, 0x6d, 0x03, 0xee, 0x33, 0xc7, 0xfa, 0xf0, 0x3d, 0xa8, 0xd6, 0x20, - 0x03, 0xf3, 0x14, 0xb3, 0x68, 0x62, 0xaf, 0x6b, 0x2e, 0xdb, 0xb3, 0x6d, - 0xbc, 0xac, 0x91, 0xbd, 0xbc, 0x8b, 0xd1, 0xf7, 0x7b, 0xd8, 0xef, 0x4d, - 0xce, 0x35, 0x8e, 0xf5, 0x17, 0x62, 0xfb, 0x79, 0xec, 0x79, 0x61, 0x35, - 0xe5, 0xbe, 0x81, 0x46, 0xce, 0x4e, 0x6c, 0xaa, 0x88, 0xbd, 0x8c, 0xc0, - 0x87, 0x3f, 0xfc, 0x2c, 0xd7, 0x3c, 0x70, 0xb8, 0x35, 0x03, 0x6c, 0x6c, - 0x2b, 0x85, 0x9e, 0x1d, 0x8c, 0x9b, 0xb8, 0x0a, 0xfc, 0x0a, 0x8c, 0xd8, - 0x6e, 0xbd, 0x97, 0x53, 0x2a, 0xe6, 0xba, 0xc6, 0x73, 0x21, 0xe7, 0x38, - 0xab, 0xbf, 0x03, 0x27, 0x22, 0xaa, 0xd3, 0xe2, 0x41, 0x9d, 0xae, 0x0e, - 0xea, 0x34, 0x77, 0x43, 0x47, 0x1c, 0xf2, 0xbc, 0xdb, 0x62, 0x0d, 0x02, - 0x6b, 0x87, 0xed, 0xec, 0xa6, 0x22, 0xf3, 0x3a, 0xd0, 0x7f, 0x40, 0xb4, - 0x35, 0xd0, 0x11, 0x37, 0x75, 0x68, 0x6c, 0x99, 0x2e, 0xfe, 0x84, 0xe8, - 0xe2, 0x80, 0x7d, 0x79, 0xfc, 0xc2, 0x27, 0xc2, 0x9e, 0x65, 0x60, 0x7e, - 0x75, 0x20, 0x23, 0x1f, 0x20, 0x5f, 0xee, 0x07, 0xc8, 0x83, 0x6d, 0xfc, - 0xd6, 0x91, 0x1b, 0x19, 0x1b, 0xce, 0x13, 0x8f, 0x81, 0xcf, 0x06, 0xfa, - 0x2e, 0xa1, 0x8d, 0xf3, 0x16, 0xdb, 0xea, 0xd4, 0x76, 0xa7, 0x28, 0xad, - 0x72, 0x91, 0xc9, 0xb9, 0xe8, 0x14, 0xf8, 0x34, 0x81, 0xfc, 0x72, 0x47, - 0x19, 0xcd, 0x45, 0xc8, 0x59, 0x8d, 0xd3, 0xc8, 0x3d, 0x3f, 0x47, 0x3b, - 0x8f, 0xf7, 0x33, 0x3c, 0x27, 0xf0, 0x7d, 0x1a, 0xb6, 0xc3, 0x79, 0xa8, - 0xf2, 0x7b, 0x5a, 0x0e, 0x02, 0xef, 0x76, 0x0c, 0xd8, 0x5b, 0xd0, 0x0b, - 0xc7, 0xbb, 0x86, 0x7c, 0xc1, 0x31, 0xaf, 0x21, 0xa6, 0x3a, 0xe6, 0x36, - 0x69, 0xfe, 0x80, 0x62, 0xa5, 0xcc, 0x4f, 0xe1, 0x71, 0x7e, 0x6a, 0x0a, - 0x1e, 0x24, 0x99, 0x09, 0x1f, 0xd6, 0x6d, 0xa5, 0x53, 0xc6, 0x8e, 0xfc, - 0x00, 0x1a, 0x0e, 0x94, 0x3c, 0xdf, 0xc4, 0x19, 0x11, 0x01, 0x77, 0x1f, - 0xda, 0x8d, 0xa0, 0xdd, 0x70, 0x48, 0xbb, 0xe1, 0xff, 0xd4, 0x2e, 0x74, - 0x09, 0x8d, 0xdc, 0x05, 0xa7, 0x3e, 0xe8, 0x9f, 0xa4, 0x63, 0xd6, 0x30, - 0x6b, 0xd9, 0xa2, 0x7b, 0x4b, 0xcf, 0xa2, 0xe5, 0xbf, 0x3e, 0xab, 0x96, - 0x63, 0xd6, 0xb2, 0xca, 0x5a, 0x6e, 0x0c, 0x6b, 0xf9, 0x53, 0xf8, 0x17, - 0x9a, 0xbc, 0xa0, 0x36, 0x48, 0x5b, 0x04, 0x0e, 0x3b, 0x75, 0x52, 0x6e, - 0x3c, 0xe1, 0x1b, 0x73, 0x38, 0x1c, 0xe0, 0xdf, 0x81, 0x86, 0x3e, 0x69, - 0xb4, 0x1d, 0x39, 0x4f, 0xf5, 0xec, 0xe6, 0x96, 0xb0, 0x51, 0x49, 0x47, - 0xdc, 0xbf, 0xb3, 0x64, 0x5b, 0x96, 0x3c, 0xac, 0x79, 0xa8, 0x7e, 0x27, - 0xbf, 0xa6, 0x79, 0x3c, 0x4f, 0x6c, 0x81, 0xeb, 0xd6, 0x8f, 0x80, 0x51, - 0xda, 0x63, 0x9e, 0x3b, 0xe6, 0x9a, 0xe0, 0x17, 0xbe, 0xa1, 0x05, 0x0d, - 0x7c, 0xad, 0xc1, 0x4e, 0xdd, 0x29, 0xf4, 0x73, 0x17, 0xe3, 0xee, 0xf5, - 0x98, 0x5f, 0x06, 0xe9, 0x37, 0x9d, 0xe6, 0x55, 0x91, 0x73, 0xe7, 0xcd, - 0x75, 0x62, 0xed, 0xf1, 0x79, 0x87, 0xfe, 0x41, 0x8d, 0x14, 0xa1, 0xf7, - 0xc9, 0x52, 0xef, 0x2f, 0x20, 0x46, 0x93, 0xf8, 0x66, 0xcd, 0x9f, 0x2e, - 0x35, 0x3f, 0x8d, 0x27, 0xb7, 0x5d, 0x54, 0x0b, 0xee, 0x80, 0x87, 0x3b, - 0x8c, 0x6b, 0x1d, 0xf9, 0x8d, 0xe7, 0xff, 0x7b, 0xbe, 0xe9, 0x30, 0xb6, - 0x8e, 0xf5, 0x03, 0x5a, 0x80, 0xee, 0xd0, 0x7e, 0xc0, 0xb6, 0xec, 0x53, - 0xd9, 0x9a, 0xa5, 0xed, 0xa7, 0x63, 0xb6, 0x68, 0x3f, 0x60, 0x3b, 0xd6, - 0xc5, 0x73, 0xa4, 0xdc, 0xe4, 0xf3, 0x38, 0x60, 0x5d, 0xc0, 0xaf, 0x8d, - 0x36, 0xae, 0x19, 0xd8, 0x9f, 0xcf, 0x66, 0x5e, 0x27, 0xd7, 0x13, 0x7c, - 0x7e, 0x8f, 0x9d, 0xd3, 0xc7, 0xda, 0xb8, 0x00, 0xbe, 0x7f, 0x4b, 0xfd, - 0x4f, 0x6d, 0xbc, 0x06, 0x2d, 0x5c, 0x51, 0x0b, 0x6d, 0x6c, 0xe3, 0x79, - 0x01, 0xdf, 0xaf, 0x8d, 0x69, 0xa3, 0xf2, 0x7b, 0xfa, 0xf9, 0x9c, 0xf4, - 0x9b, 0xe2, 0x6c, 0xe5, 0xf9, 0x94, 0x1d, 0x8a, 0xb5, 0x52, 0x07, 0x6b, - 0xc7, 0x3a, 0x98, 0x44, 0xae, 0x18, 0xe1, 0xb8, 0x12, 0xba, 0xb6, 0x99, - 0x12, 0x6b, 0x62, 0xf8, 0xfc, 0xfa, 0x7f, 0xe9, 0x82, 0xc0, 0x23, 0x31, - 0x37, 0x6a, 0x0c, 0x3e, 0x0f, 0xf2, 0xfc, 0x8a, 0x8b, 0xfe, 0xaa, 0xd6, - 0x10, 0xd8, 0xf3, 0x59, 0xcb, 0x78, 0xa0, 0xbe, 0x73, 0xe6, 0xa1, 0x05, - 0xce, 0x01, 0x8f, 0xf3, 0x3d, 0x27, 0x40, 0x5b, 0x1b, 0xf1, 0x67, 0x4c, - 0x36, 0xa4, 0xf5, 0x7d, 0x83, 0xfd, 0xa0, 0xb3, 0x93, 0x6a, 0x2c, 0x1d, - 0x9a, 0x7a, 0x82, 0x13, 0xf3, 0x28, 0x1a, 0xc2, 0xa9, 0x23, 0x70, 0xfa, - 0xf0, 0x18, 0xa7, 0xa8, 0xc4, 0x29, 0x12, 0x38, 0xfd, 0xb1, 0xc4, 0xe9, - 0x0f, 0x4f, 0xc1, 0xe9, 0xc3, 0x67, 0xc0, 0xc9, 0xa0, 0x3d, 0xa7, 0x89, - 0x73, 0x56, 0x17, 0x35, 0xe9, 0xa1, 0x7b, 0x52, 0x4d, 0x75, 0x52, 0xdc, - 0x6d, 0x73, 0x8f, 0x86, 0xeb, 0x0e, 0xdb, 0x7a, 0x80, 0xf5, 0xa5, 0xc0, - 0xee, 0xfa, 0x58, 0xed, 0x91, 0xc0, 0xbe, 0x5d, 0xe2, 0x74, 0x1d, 0x38, - 0xb5, 0x4b, 0x9c, 0xb6, 0x87, 0x70, 0xda, 0x1e, 0xc1, 0x89, 0xf3, 0x49, - 0xcb, 0xd8, 0xee, 0x55, 0x18, 0x55, 0xf8, 0xe8, 0x74, 0xdb, 0x9c, 0xc6, - 0xfe, 0xcf, 0x51, 0xfa, 0x63, 0x95, 0xeb, 0x5a, 0x60, 0xf7, 0xaa, 0x2a, - 0x8b, 0xf3, 0x80, 0xdf, 0x9f, 0xd4, 0x27, 0x98, 0xcb, 0x0f, 0x5c, 0x8e, - 0x23, 0xea, 0x57, 0xa7, 0xca, 0x43, 0xcf, 0xab, 0xa8, 0xad, 0xf0, 0xcd, - 0x36, 0xaa, 0xd4, 0x86, 0xde, 0x15, 0xd4, 0xe5, 0xe1, 0x71, 0x5d, 0x5e, - 0xc4, 0xe0, 0x7a, 0x59, 0x97, 0xef, 0x39, 0x5c, 0x97, 0x2f, 0x6a, 0x34, - 0xb9, 0x51, 0x62, 0xc9, 0x9c, 0x9e, 0x42, 0xdf, 0x25, 0x81, 0x79, 0x8a, - 0xfc, 0xbd, 0x89, 0xfd, 0x47, 0x82, 0x9b, 0xa8, 0xb1, 0x4a, 0xde, 0xa2, - 0x86, 0xa5, 0x30, 0x2b, 0x62, 0xf5, 0xc5, 0xd6, 0x5d, 0x9f, 0x20, 0x4f, - 0x1b, 0x1d, 0x15, 0x75, 0xfd, 0xfd, 0x8c, 0xf3, 0x33, 0x5d, 0x4e, 0x7a, - 0x14, 0x9f, 0xf1, 0xae, 0xe5, 0xc0, 0xdc, 0x7f, 0xeb, 0x3c, 0x9f, 0x33, - 0xf5, 0xd5, 0xa0, 0x85, 0xf6, 0x81, 0x41, 0xa8, 0x7d, 0x70, 0x4f, 0xa1, - 0x38, 0x38, 0x2f, 0xa1, 0xc6, 0xc1, 0x37, 0x7c, 0x92, 0x6c, 0xb6, 0x23, - 0x7b, 0x4d, 0x70, 0x21, 0x26, 0x1f, 0xeb, 0xf4, 0x33, 0x71, 0x57, 0xe9, - 0x28, 0x9e, 0x81, 0xda, 0x92, 0x0c, 0x9c, 0xf3, 0x88, 0x89, 0x65, 0xa4, - 0x03, 0xd4, 0x41, 0x38, 0xfb, 0x83, 0x55, 0xc4, 0xe5, 0x2c, 0x70, 0xcb, - 0x54, 0xf8, 0xbe, 0xa9, 0x17, 0xf7, 0x1c, 0x54, 0x35, 0x22, 0x5e, 0x8f, - 0x4a, 0x7e, 0x88, 0x3a, 0x4b, 0x6a, 0xf7, 0xc9, 0x8a, 0x5c, 0xf0, 0x1c, - 0xe7, 0x48, 0x37, 0xe3, 0xda, 0xf9, 0xac, 0x21, 0xdf, 0xe0, 0x5c, 0x7e, - 0x88, 0x18, 0xe2, 0xfd, 0x80, 0xcf, 0x16, 0x85, 0xeb, 0x6f, 0xdc, 0x67, - 0x96, 0x90, 0x6b, 0x68, 0x0a, 0x79, 0x0f, 0x79, 0x77, 0x96, 0x71, 0xf2, - 0x23, 0xc6, 0x4b, 0x9c, 0x1b, 0xe7, 0xe4, 0x62, 0x9e, 0x5f, 0x6b, 0x05, - 0x7f, 0x71, 0x87, 0x41, 0xfc, 0x36, 0xfb, 0x2e, 0xe7, 0xdb, 0x2f, 0x2b, - 0x74, 0x44, 0x82, 0x8f, 0xe6, 0xcb, 0xc8, 0xc3, 0xe7, 0xe0, 0xe3, 0x0b, - 0x2d, 0x16, 0xf5, 0x56, 0xe5, 0xf3, 0xc9, 0xd8, 0x18, 0x1f, 0x29, 0xa3, - 0xdf, 0x3e, 0xf8, 0xbc, 0x52, 0xce, 0x57, 0xf1, 0xe3, 0x57, 0xe0, 0xc7, - 0x61, 0xd9, 0xcf, 0x77, 0x16, 0x1d, 0x36, 0xbc, 0x3e, 0xe6, 0x11, 0xdb, - 0x9b, 0xda, 0xe8, 0x18, 0x5f, 0x1a, 0xf3, 0xff, 0xfd, 0x90, 0xff, 0x34, - 0xef, 0xc9, 0x8c, 0x0a, 0x0e, 0xe2, 0xef, 0x3d, 0x7d, 0xd4, 0xf7, 0x17, - 0x6a, 0xf1, 0x7d, 0xb6, 0xe0, 0x9e, 0x83, 0x67, 0x76, 0x38, 0xb4, 0x36, - 0x75, 0x6c, 0xec, 0x87, 0x18, 0x7b, 0x15, 0x79, 0x84, 0x7c, 0x05, 0x77, - 0xa6, 0x90, 0xf0, 0x9e, 0x5d, 0xa9, 0xe2, 0x03, 0x4e, 0xd0, 0xe5, 0xb4, - 0xe4, 0x82, 0x5c, 0x70, 0x81, 0xeb, 0xb4, 0xd5, 0x4d, 0x70, 0x21, 0x05, - 0x17, 0xe0, 0xd7, 0xd1, 0xbc, 0x59, 0xe0, 0xcc, 0x39, 0x07, 0xdf, 0x19, - 0xf3, 0x82, 0x79, 0xc0, 0x9c, 0x78, 0xc2, 0x85, 0x2b, 0x3d, 0xc3, 0xd8, - 0xfd, 0x2f, 0x3c, 0x78, 0x57, 0xf0, 0x80, 0xf9, 0x58, 0xe4, 0x85, 0x2e, - 0x70, 0x48, 0xca, 0xbc, 0x50, 0xe8, 0x9c, 0xeb, 0x1b, 0xd6, 0x78, 0xa1, - 0x8d, 0x2d, 0x68, 0xa3, 0xad, 0x70, 0xbd, 0xc3, 0xba, 0x60, 0x3f, 0xd6, - 0xc6, 0x49, 0x7e, 0x85, 0x46, 0xd2, 0xbe, 0x6d, 0x55, 0xf9, 0x21, 0x85, - 0x2e, 0xba, 0xa5, 0x46, 0xd2, 0x52, 0x23, 0xb0, 0x89, 0x95, 0x16, 0xe7, - 0x7a, 0xdb, 0x0a, 0x91, 0x17, 0xba, 0x62, 0xcc, 0x98, 0x8a, 0x3b, 0x09, - 0xeb, 0x96, 0xf3, 0xe9, 0x50, 0x1e, 0x2d, 0xef, 0xa5, 0x1d, 0x71, 0x2f, - 0xfd, 0x8a, 0x3e, 0x9a, 0x47, 0x67, 0x90, 0x43, 0xf8, 0x5e, 0x3a, 0xa7, - 0xf3, 0xbd, 0x14, 0xba, 0xd3, 0x87, 0xef, 0xa5, 0xc9, 0xc8, 0xbd, 0xb4, - 0xf2, 0xe5, 0xf6, 0x93, 0xf2, 0x69, 0x15, 0x13, 0xce, 0xa9, 0x02, 0xf3, - 0x13, 0x6a, 0xbf, 0xca, 0x86, 0xf3, 0x0d, 0x6b, 0xb9, 0xcc, 0x51, 0xa8, - 0xb5, 0xee, 0x67, 0x15, 0xe7, 0xdf, 0xc0, 0x3c, 0xf8, 0xee, 0x9f, 0xc4, - 0x79, 0xa3, 0xe4, 0xfc, 0x54, 0xe1, 0xd3, 0x1f, 0xe6, 0xfd, 0x1b, 0xfa, - 0x28, 0xef, 0xab, 0x71, 0x2a, 0xde, 0x17, 0x63, 0x3e, 0x54, 0x9a, 0x38, - 0xdb, 0x96, 0x91, 0x6b, 0x66, 0xf8, 0xbe, 0x85, 0x5c, 0xe0, 0xd5, 0x71, - 0xef, 0x98, 0xe1, 0xb1, 0xd3, 0x0c, 0xe7, 0x4d, 0x03, 0xbc, 0x17, 0x9c, - 0x3d, 0x12, 0xf7, 0x01, 0xac, 0x7b, 0x86, 0xab, 0xab, 0x51, 0x2e, 0xbe, - 0x88, 0x0b, 0x45, 0xb5, 0x97, 0xaa, 0xcd, 0x19, 0x6a, 0x5b, 0x2e, 0xb1, - 0x2e, 0x62, 0xfd, 0xa0, 0xb8, 0x8f, 0xd3, 0x2e, 0x6a, 0xb1, 0x43, 0xd4, - 0x39, 0x77, 0x70, 0x9f, 0x4b, 0x06, 0x8f, 0xf2, 0x07, 0x0d, 0x95, 0xba, - 0xc7, 0x3e, 0x5d, 0xac, 0xd7, 0x36, 0x6f, 0xe3, 0xed, 0xdd, 0x41, 0x15, - 0x53, 0xee, 0xe7, 0xb6, 0x7f, 0xe0, 0xbc, 0x45, 0x1d, 0x37, 0x32, 0x67, - 0xf5, 0xce, 0x7f, 0xff, 0x06, 0x63, 0xe1, 0x4b, 0x7b, 0x30, 0x12, 0x00, - 0x00, 0x00 }; +static u32 bnx2_TPAT_b06FwText[(0x122c/4) + 1] = { + 0x0a000218, 0x00000000, 0x00000000, 0x0000000d, 0x74706174, 0x20322e35, + 0x2e313100, 0x02050b01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c020800, + 0x24421a60, 0x3c030800, 0x24631cf0, 0xac400000, 0x0043202b, 0x1480fffd, + 0x24420004, 0x3c1d0800, 0x37bd2ffc, 0x03a0f021, 0x3c100800, 0x26100860, + 0x3c1c0800, 0x279c1a60, 0x0e000546, 0x00000000, 0x0000000d, 0x8f820010, + 0x8c450008, 0x24030800, 0xaf430178, 0x97430104, 0x3c020008, 0xaf420140, + 0x8f820024, 0x30420001, 0x10400007, 0x3069ffff, 0x24020002, 0x2523fffe, + 0xa7420146, 0xa7430148, 0x0a000242, 0x3c020800, 0xa7400146, 0x3c020800, + 0x8c43083c, 0x1460000e, 0x24020f00, 0x8f820024, 0x30430020, 0x0003182b, + 0x00031823, 0x30650009, 0x30420c00, 0x24030400, 0x14430002, 0x34a40001, + 0x34a40005, 0xa744014a, 0x0a000264, 0x3c020800, 0x8f830014, 0x14620008, + 0x00000000, 0x8f820024, 0x30420020, 0x0002102b, 0x00021023, 0x3042000d, + 0x0a000262, 0x34420005, 0x8f820024, 0x30420020, 0x0002102b, 0x00021023, + 0x30420009, 0x34420001, 0xa742014a, 0x3c020800, 0x8c430820, 0x8f840024, + 0x3c020048, 0x00621825, 0x30840006, 0x24020002, 0x1082000d, 0x2c820003, + 0x50400005, 0x24020004, 0x10800012, 0x3c020001, 0x0a000284, 0x00000000, + 0x10820007, 0x24020006, 0x1482000f, 0x3c020111, 0x0a00027c, 0x00621025, + 0x0a00027b, 0x3c020101, 0x3c020011, 0x00621025, 0x24030001, 0xaf421000, + 0xaf830020, 0x0a000284, 0x00000000, 0x00621025, 0xaf421000, 0xaf800020, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8f830020, 0x1060003f, + 0x3c048000, 0x8f421000, 0x00441024, 0x1040fffd, 0x00000000, 0x10600039, + 0x00000000, 0x8f421000, 0x3c030020, 0x00431024, 0x10400034, 0x00000000, + 0x97421014, 0x14400031, 0x00000000, 0x97421008, 0x8f840010, 0x24420006, + 0x00024082, 0x00081880, 0x00643821, 0x8ce50000, 0x30430003, 0x30420001, + 0x10400004, 0x00000000, 0x0000000d, 0x0a0002c3, 0x00081080, 0x5460000f, + 0x30a5ffff, 0x3c06ffff, 0x00a62824, 0x0005182b, 0x00a61026, 0x0002102b, + 0x00621824, 0x10600004, 0x00000000, 0x0000000d, 0x00000000, 0x240001fb, + 0x8ce20000, 0x0a0002c2, 0x00462825, 0x0005182b, 0x38a2ffff, 0x0002102b, + 0x00621824, 0x10600004, 0x00000000, 0x0000000d, 0x00000000, 0x24000205, + 0x8ce20000, 0x3445ffff, 0x00081080, 0x00441021, 0x3c030800, 0xac450000, + 0x8c620830, 0x24420001, 0xac620830, 0x8f840018, 0x01202821, 0x24820008, + 0x30421fff, 0x24434000, 0x0343d821, 0x30a30007, 0xaf84000c, 0xaf820018, + 0xaf420084, 0x10600002, 0x24a20007, 0x3045fff8, 0x8f820030, 0x8f840000, + 0x00451821, 0xaf82001c, 0x0064102b, 0xaf830030, 0x14400002, 0x00641023, + 0xaf820030, 0x8f840030, 0x34028000, 0x00821021, 0x03421821, 0x3c021000, + 0xaf830010, 0xaf440080, 0x03e00008, 0xaf420178, 0x8f830024, 0x27bdffe0, + 0xafbf0018, 0xafb10014, 0x30620200, 0x14400004, 0xafb00010, 0x0000000d, + 0x00000000, 0x24000242, 0x00031a82, 0x30630003, 0x000310c0, 0x00431021, + 0x00021080, 0x00431021, 0x00021080, 0x3c030800, 0x24631aa0, 0x00438821, + 0x8e240000, 0x10800004, 0x00000000, 0x0000000d, 0x00000000, 0x2400024d, + 0x8f850010, 0x24020001, 0xae220000, 0x8ca70008, 0xa2200007, 0x8f620004, + 0x26300014, 0x02002021, 0x00021402, 0xa2220004, 0x304600ff, 0x24c60005, + 0x0e000673, 0x00063082, 0x8f620004, 0xa6220008, 0x8f430108, 0x3c021000, + 0x00621824, 0x10600008, 0x00000000, 0x97420104, 0x92230007, 0x2442ffec, + 0x3045ffff, 0x34630002, 0x0a000321, 0xa2230007, 0x97420104, 0x2442fff0, + 0x3045ffff, 0x8f620004, 0x3042ffff, 0x2c420013, 0x54400005, 0x92230007, + 0x92220007, 0x34420001, 0xa2220007, 0x92230007, 0x24020001, 0x10620009, + 0x28620002, 0x14400014, 0x24020002, 0x10620012, 0x24020003, 0x1062000a, + 0x00000000, 0x0a000342, 0x00000000, 0x8f820010, 0x8c43000c, 0x3c04ffff, + 0x00641824, 0x00651825, 0x0a000342, 0xac43000c, 0x8f820010, 0x8c430010, + 0x3c04ffff, 0x00641824, 0x00651825, 0xac430010, 0x8f620004, 0x3042ffff, + 0x24420002, 0x00021083, 0xa2220005, 0x304500ff, 0x8f820010, 0x3c04ffff, + 0x00052880, 0x00a22821, 0x8ca70000, 0x96220008, 0x97430104, 0x00e42024, + 0x24420002, 0x00621823, 0x00833825, 0xaca70000, 0x92240005, 0x00041080, + 0x02021021, 0x90430000, 0x3c05fff6, 0x34a5ffff, 0x3063000f, 0x00832021, + 0xa2240006, 0x308200ff, 0x24420003, 0x00021080, 0x02021021, 0x8c460000, + 0x308300ff, 0x8f820010, 0x3c04ff3f, 0x00031880, 0x00c53824, 0x00621821, + 0xae26000c, 0xac67000c, 0x8e22000c, 0x92230006, 0x3484ffff, 0x00441024, + 0x24630003, 0x00031880, 0x02031821, 0x00e42024, 0xae22000c, 0xac640000, + 0x92220006, 0x24420004, 0x00021080, 0x02021021, 0x94470002, 0xac470000, + 0x92230006, 0x8f820010, 0x00031880, 0x00621821, 0x24020010, 0xac670010, + 0x24030002, 0xa7420140, 0xa7400142, 0xa7400144, 0xa7430146, 0x97420104, + 0x24030001, 0x2442fffe, 0xa7420148, 0xa743014a, 0x8f820024, 0x24030002, + 0x30440006, 0x1083000d, 0x2c820003, 0x10400005, 0x24020004, 0x10800011, + 0x3c020009, 0x0a0003a5, 0x00000000, 0x10820007, 0x24020006, 0x1482000d, + 0x3c020119, 0x0a00039f, 0x24030001, 0x0a00039e, 0x3c020109, 0x3c020019, + 0x24030001, 0xaf421000, 0xaf830020, 0x0a0003a5, 0x00000000, 0xaf421000, + 0xaf800020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x92220004, + 0x24030008, 0x8f840020, 0x24420002, 0x30420007, 0x00621823, 0x30630007, + 0x10800006, 0xae230010, 0x3c038000, 0x8f421000, 0x00431024, 0x1040fffd, + 0x00000000, 0x8f820018, 0xaf82000c, 0x24420010, 0x30421fff, 0xaf820018, + 0xaf420084, 0x97430104, 0x24424000, 0x0342d821, 0x3063ffff, 0x30620007, + 0x10400002, 0x24620007, 0x3043fff8, 0x8f820030, 0x8f840000, 0x00431821, + 0xaf82001c, 0x0064102b, 0xaf830030, 0x14400002, 0x00641023, 0xaf820030, + 0x8f840030, 0x34028000, 0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x00821021, + 0x03421821, 0x3c021000, 0xaf830010, 0xaf440080, 0xaf420178, 0x03e00008, + 0x27bd0020, 0x8f830024, 0x27bdffe0, 0xafbf0018, 0xafb10014, 0x30620200, + 0x14400004, 0xafb00010, 0x0000000d, 0x00000000, 0x240002e4, 0x00031a82, + 0x30630003, 0x000310c0, 0x00431021, 0x00021080, 0x00431021, 0x00021080, + 0x3c030800, 0x24631aa0, 0x00438021, 0x8e040000, 0x14800004, 0x00000000, + 0x0000000d, 0x00000000, 0x240002e9, 0x8f620004, 0x04410008, 0x26050014, + 0x92020006, 0x8e03000c, 0x24420003, 0x00021080, 0x00a21021, 0xac430000, + 0xae000000, 0x92020005, 0x24420001, 0x00021080, 0x00a21021, 0x8c430000, + 0x3c040001, 0x00641821, 0xac430000, 0x92060004, 0x27710008, 0x02202021, + 0x24c60005, 0x0e000673, 0x00063082, 0x92040006, 0x3c057fff, 0x8f620004, + 0x00042080, 0x00912021, 0x8c830004, 0x34a5ffff, 0x00451024, 0x00621821, + 0xac830004, 0x92050005, 0x3c07ffff, 0x92040004, 0x00052880, 0x00b12821, + 0x8ca30000, 0x97420104, 0x96060008, 0x00671824, 0x00441021, 0x00461023, + 0x3042ffff, 0x00621825, 0xaca30000, 0x92030007, 0x24020001, 0x1062000a, + 0x28620002, 0x1440001d, 0x2402000a, 0x24020002, 0x10620019, 0x24020003, + 0x1062000e, 0x2402000a, 0x0a000447, 0x00000000, 0x92020004, 0x97430104, + 0x8e24000c, 0x00621821, 0x2463fff2, 0x3063ffff, 0x00872024, 0x00832025, + 0xae24000c, 0x0a000447, 0x2402000a, 0x92020004, 0x97430104, 0x8e240010, + 0x00621821, 0x2463ffee, 0x3063ffff, 0x00872024, 0x00832025, 0xae240010, + 0x2402000a, 0xa7420140, 0x96030012, 0x8f840024, 0xa7430142, 0x92020004, + 0xa7420144, 0xa7400146, 0x97430104, 0x30840006, 0x24020001, 0xa7430148, + 0xa742014a, 0x24020002, 0x1082000d, 0x2c820003, 0x10400005, 0x24020004, + 0x10800011, 0x3c020041, 0x0a00046c, 0x00000000, 0x10820007, 0x24020006, + 0x1482000d, 0x3c020151, 0x0a000466, 0x24030001, 0x0a000465, 0x3c020141, + 0x3c020051, 0x24030001, 0xaf421000, 0xaf830020, 0x0a00046c, 0x00000000, + 0xaf421000, 0xaf800020, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x8f820020, 0x8f840018, 0x10400006, 0x92030004, 0x3c058000, 0x8f421000, + 0x00451024, 0x1040fffd, 0x00000000, 0x2463000a, 0x30620007, 0x10400002, + 0x24620007, 0x304303f8, 0x00831021, 0x30421fff, 0xaf84000c, 0xaf820018, + 0xaf420084, 0x97430104, 0x24424000, 0x0342d821, 0x3063ffff, 0x30620007, + 0x10400002, 0x24620007, 0x3043fff8, 0x8f820030, 0x8f840000, 0x00431821, + 0xaf82001c, 0x0064102b, 0xaf830030, 0x14400002, 0x00641023, 0xaf820030, + 0x8f840030, 0x34028000, 0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x00821021, + 0x03421821, 0x3c021000, 0xaf830010, 0xaf440080, 0xaf420178, 0x03e00008, + 0x27bd0020, 0x8f620000, 0x97430104, 0x3c048000, 0x3045ffff, 0x3066ffff, + 0x8f420178, 0x00441024, 0x1440fffd, 0x2402000a, 0x30a30007, 0xa7420140, + 0x24020008, 0x00431023, 0x30420007, 0x24a3fffe, 0xa7420142, 0xa7430144, + 0xa7400146, 0xa7460148, 0x8f420108, 0x8f830024, 0x30420020, 0x0002102b, + 0x00021023, 0x30420009, 0x34420001, 0x30630006, 0xa742014a, 0x24020002, + 0x1062000d, 0x2c620003, 0x10400005, 0x24020004, 0x10600011, 0x3c020041, + 0x0a0004d6, 0x00000000, 0x10620007, 0x24020006, 0x1462000d, 0x3c020151, + 0x0a0004d0, 0x24030001, 0x0a0004cf, 0x3c020141, 0x3c020051, 0x24030001, + 0xaf421000, 0xaf830020, 0x0a0004d6, 0x00000000, 0xaf421000, 0xaf800020, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8f820020, 0x24a30008, + 0x8f850018, 0x10400006, 0x30c6ffff, 0x3c048000, 0x8f421000, 0x00441024, + 0x1040fffd, 0x00000000, 0x3063ffff, 0x30620007, 0x10400002, 0x24620007, + 0x3043fff8, 0x00a31021, 0x30421fff, 0x24434000, 0x0343d821, 0x00c02021, + 0x30830007, 0xaf85000c, 0xaf820018, 0xaf420084, 0x10600002, 0x24820007, + 0x3044fff8, 0x8f820030, 0x8f850000, 0x00441821, 0xaf82001c, 0x0065102b, + 0xaf830030, 0x14400002, 0x00651023, 0xaf820030, 0x8f840030, 0x34028000, + 0x3c030800, 0x8c650834, 0x00821021, 0x03421821, 0xaf830010, 0xaf440080, + 0x10a00006, 0x2402000e, 0x9383002f, 0x14620004, 0x3c021000, 0x2402043f, + 0xa7420148, 0x3c021000, 0x03e00008, 0xaf420178, 0x8f820024, 0x30424000, + 0x10400005, 0x24020800, 0x0000000d, 0x00000000, 0x2400040e, 0x24020800, + 0xaf420178, 0x97440104, 0x3c030008, 0xaf430140, 0x8f820024, 0x30420001, + 0x10400006, 0x3085ffff, 0x24020002, 0x24a3fffe, 0xa7420146, 0x0a000526, + 0xa7430148, 0xa7400146, 0x8f840018, 0x2402000d, 0xa742014a, 0x24830008, + 0x30631fff, 0x24624000, 0x0342d821, 0x30a20007, 0xaf84000c, 0xaf830018, + 0xaf430084, 0x10400002, 0x24a20007, 0x3045fff8, 0x8f820030, 0x8f840000, + 0x00451821, 0xaf82001c, 0x0064102b, 0xaf830030, 0x14400002, 0x00641023, + 0xaf820030, 0x8f840030, 0x34028000, 0x00821021, 0x03421821, 0x3c021000, + 0xaf830010, 0xaf440080, 0x03e00008, 0xaf420178, 0x27bdffe8, 0x3c046008, + 0xafbf0014, 0xafb00010, 0x8c825000, 0x3c1a8000, 0x2403ff7f, 0x375b4000, + 0x00431024, 0x3442380c, 0xac825000, 0x8f430008, 0x3c100800, 0x37428000, + 0x34630001, 0xaf430008, 0xaf820010, 0x3c02601c, 0xaf800018, 0xaf400080, + 0xaf400084, 0x8c450008, 0x3c036000, 0x8c620808, 0x3c040800, 0x3c030080, + 0xac830820, 0x3042fff0, 0x38420010, 0x2c420001, 0xaf850000, 0xaf820004, + 0x0e000658, 0x00000000, 0x8f420000, 0x30420001, 0x1040fffb, 0x00000000, + 0x8f430108, 0x8f440100, 0x30622000, 0xaf830024, 0xaf840014, 0x10400004, + 0x8e02082c, 0x24420001, 0x0a0005c6, 0xae02082c, 0x30620200, 0x14400003, + 0x24020f00, 0x14820027, 0x24020d00, 0x97420104, 0x1040001c, 0x30624000, + 0x14400005, 0x00000000, 0x0e00022f, 0x00000000, 0x0a0005bb, 0x00000000, + 0x8f620008, 0x8f630000, 0x24020030, 0x00031e02, 0x306300f0, 0x10620007, + 0x28620031, 0x1440002f, 0x24020040, 0x10620007, 0x00000000, 0x0a0005bb, + 0x00000000, 0x0e0002e8, 0x00000000, 0x0a0005bb, 0x00000000, 0x0e0003db, + 0x00000000, 0x0a0005bb, 0x00000000, 0x30620040, 0x1440002b, 0x00000000, + 0x0000000d, 0x00000000, 0x240004b2, 0x0a0005c6, 0x00000000, 0x1482000f, + 0x30620006, 0x97420104, 0x10400005, 0x30620040, 0x0e000510, 0x00000000, + 0x0a0005bb, 0x00000000, 0x1440001b, 0x00000000, 0x0000000d, 0x00000000, + 0x240004c4, 0x0a0005c6, 0x00000000, 0x1040000e, 0x30621000, 0x10400005, + 0x00000000, 0x0e000688, 0x00000000, 0x0a0005bb, 0x00000000, 0x0e0004a1, + 0x00000000, 0x8f82002c, 0x24420001, 0xaf82002c, 0x0a0005c6, 0x00000000, + 0x30620040, 0x14400004, 0x00000000, 0x0000000d, 0x00000000, 0x240004db, + 0x8f420138, 0x3c034000, 0x00431025, 0xaf420138, 0x0a000566, 0x00000000, + 0x3c046008, 0x8c835000, 0x3c1a8000, 0x2402ff7f, 0x375b4000, 0x00621824, + 0x3463380c, 0xac835000, 0x8f420008, 0x3c056000, 0x3c03601c, 0x34420001, + 0xaf420008, 0x37428000, 0xaf800018, 0xaf820010, 0xaf400080, 0xaf400084, + 0x8c660008, 0x8ca20808, 0x3c040800, 0x3c030080, 0xac830820, 0x3042fff0, + 0x38420010, 0x2c420001, 0xaf860000, 0xaf820004, 0x03e00008, 0x00000000, + 0x3084ffff, 0x30820007, 0x10400002, 0x24820007, 0x3044fff8, 0x8f820018, + 0x00441821, 0x30631fff, 0x24644000, 0x0344d821, 0xaf82000c, 0xaf830018, + 0x03e00008, 0xaf430084, 0x3084ffff, 0x30820007, 0x10400002, 0x24820007, + 0x3044fff8, 0x8f820030, 0x8f830000, 0x00442021, 0xaf82001c, 0x0083102b, + 0xaf840030, 0x14400002, 0x00831023, 0xaf820030, 0x8f820030, 0x34038000, + 0x00431821, 0x03432021, 0xaf840010, 0x03e00008, 0xaf420080, 0x8f830024, + 0x24020002, 0x30630006, 0x1062000d, 0x2c620003, 0x50400005, 0x24020004, + 0x10600012, 0x3c020001, 0x0a00062a, 0x00000000, 0x10620007, 0x24020006, + 0x1462000f, 0x3c020111, 0x0a000622, 0x00821025, 0x0a000621, 0x3c020101, + 0x3c020011, 0x00821025, 0x24030001, 0xaf421000, 0xaf830020, 0x0a00062a, + 0x00000000, 0x00821025, 0xaf421000, 0xaf800020, 0x00000000, 0x00000000, + 0x00000000, 0x03e00008, 0x00000000, 0x8f820020, 0x10400005, 0x3c038000, + 0x8f421000, 0x00431024, 0x1040fffd, 0x00000000, 0x03e00008, 0x00000000, + 0x8f820024, 0x27bdffe8, 0x30424000, 0x14400005, 0xafbf0010, 0x0e00022f, + 0x00000000, 0x0a000656, 0x8fbf0010, 0x8f620008, 0x8f630000, 0x24020030, + 0x00031e02, 0x306300f0, 0x10620008, 0x28620031, 0x1440000d, 0x8fbf0010, + 0x24020040, 0x10620007, 0x00000000, 0x0a000656, 0x00000000, 0x0e0002e8, + 0x00000000, 0x0a000656, 0x8fbf0010, 0x0e0003db, 0x00000000, 0x8fbf0010, + 0x03e00008, 0x27bd0018, 0x8f840028, 0x1080000f, 0x3c026000, 0x8c430c3c, + 0x30630fff, 0xaf830008, 0x14600011, 0x3082000f, 0x10400005, 0x308200f0, + 0x10400003, 0x30820f00, 0x14400006, 0x00000000, 0x0000000d, 0x00000000, + 0x2400051a, 0x03e00008, 0x00000000, 0x0000000d, 0x00000000, 0x2400051f, + 0x03e00008, 0x00000000, 0xaf830028, 0x03e00008, 0x00000000, 0x10c00007, + 0x00000000, 0x8ca20000, 0x24c6ffff, 0x24a50004, 0xac820000, 0x14c0fffb, + 0x24840004, 0x03e00008, 0x00000000, 0x0a000684, 0x00a01021, 0xac860000, + 0x00000000, 0x00000000, 0x24840004, 0x00a01021, 0x1440fffa, 0x24a5ffff, + 0x03e00008, 0x00000000, 0x0000000d, 0x03e00008, 0x00000000, 0x00000000}; static u32 bnx2_TPAT_b06FwData[(0x0/4) + 1] = { 0x0 }; static u32 bnx2_TPAT_b06FwRodata[(0x0/4) + 1] = { 0x0 }; @@ -1543,422 +2554,939 @@ static const u32 bnx2_TXP_b06FwBssAddr = 0x080057a0; static const int bnx2_TXP_b06FwBssLen = 0x1c4; static const u32 bnx2_TXP_b06FwSbssAddr = 0x08005760; static const int bnx2_TXP_b06FwSbssLen = 0x38; -static u8 bnx2_TXP_b06FwText[] = { - 0x1f, 0x8b, 0x08, 0x08, 0x21, 0xd3, 0x41, 0x44, 0x00, 0x03, 0x74, 0x65, - 0x73, 0x74, 0x31, 0x2e, 0x62, 0x69, 0x6e, 0x00, 0xed, 0x5c, 0x6d, 0x6c, - 0x1b, 0xf7, 0x79, 0x7f, 0xee, 0x85, 0xd2, 0x51, 0x96, 0xe9, 0x93, 0xc2, - 0x78, 0x6c, 0xc0, 0xa6, 0x77, 0xd6, 0x51, 0x66, 0x20, 0xb5, 0xa0, 0x05, - 0x36, 0x55, 0x87, 0x43, 0x73, 0x3e, 0x52, 0x2f, 0x4e, 0x5c, 0x57, 0x71, - 0x94, 0x86, 0x6e, 0x0d, 0x8c, 0xa0, 0xec, 0xd8, 0xeb, 0x5a, 0x2c, 0x1f, - 0x8c, 0xd5, 0x68, 0xd1, 0x99, 0xa1, 0x68, 0xc7, 0xc9, 0x68, 0x51, 0xa9, - 0xe5, 0xa8, 0x43, 0x57, 0x80, 0x95, 0x64, 0xcb, 0x29, 0x4e, 0x3a, 0x65, - 0xcb, 0x16, 0x0c, 0x58, 0x16, 0xcd, 0x2f, 0x5d, 0x3f, 0x74, 0x80, 0x3f, - 0xec, 0x43, 0x3a, 0xec, 0x83, 0x91, 0x14, 0xad, 0x11, 0x6c, 0x59, 0xb0, - 0x2f, 0x33, 0xd6, 0x26, 0xb7, 0xdf, 0x73, 0x77, 0x94, 0x95, 0xc4, 0x4e, - 0xab, 0x7d, 0xbe, 0x07, 0x20, 0xee, 0x7f, 0xff, 0xd7, 0xe7, 0xfd, 0xe5, - 0x7f, 0x90, 0x06, 0xb7, 0x53, 0x17, 0x85, 0xb0, 0x1d, 0x3f, 0xed, 0x99, - 0x93, 0x27, 0x3e, 0xf7, 0xf9, 0xcf, 0x0d, 0xa1, 0x39, 0x4c, 0x4a, 0x4c, - 0xe4, 0xc1, 0x5b, 0x12, 0x51, 0xf9, 0x1d, 0x8a, 0x20, 0x82, 0x08, 0x22, - 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, - 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, - 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, - 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, - 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, 0x88, 0x20, 0x82, 0x08, 0x22, - 0xf8, 0x9d, 0x20, 0x11, 0xa9, 0xfc, 0xdc, 0x1e, 0xfe, 0x48, 0x11, 0xcd, - 0xf2, 0x53, 0xb6, 0x41, 0x8a, 0x64, 0x1e, 0x39, 0x34, 0x65, 0x10, 0x59, - 0xce, 0x80, 0x56, 0xa0, 0xf7, 0xbd, 0x6a, 0x52, 0x26, 0xee, 0xff, 0xb4, - 0xf9, 0xdb, 0x53, 0xaf, 0x7f, 0x41, 0x7f, 0xaf, 0x25, 0x91, 0xa2, 0x9a, - 0x6b, 0x79, 0xb5, 0x9f, 0x94, 0x34, 0xd6, 0xfc, 0xd5, 0xee, 0xaf, 0xef, - 0xa0, 0x44, 0x7b, 0xaf, 0x24, 0xd5, 0x9b, 0xb7, 0xbc, 0xd7, 0x77, 0x27, - 0xe9, 0x15, 0x57, 0xa5, 0x35, 0x57, 0x16, 0x46, 0x9b, 0x0a, 0x4d, 0x37, - 0x1d, 0x3a, 0xdd, 0xa8, 0x52, 0xc1, 0xbd, 0x4c, 0xb5, 0x39, 0x35, 0x61, - 0x2f, 0xff, 0x84, 0xa6, 0xe7, 0x7a, 0x13, 0x85, 0x65, 0x87, 0x6a, 0x8d, - 0x54, 0xc2, 0x76, 0xd5, 0x44, 0x61, 0x3e, 0x89, 0xf7, 0xde, 0x84, 0x3d, - 0xaf, 0x57, 0x89, 0x76, 0x62, 0x4e, 0x2a, 0x51, 0x68, 0xea, 0x65, 0xa2, - 0xbe, 0xdc, 0x75, 0x4a, 0x27, 0x0a, 0xee, 0x82, 0xb0, 0xae, 0x0a, 0x54, - 0xfb, 0x2c, 0xa9, 0x09, 0xf3, 0xb6, 0xf7, 0x29, 0x43, 0xa5, 0x1e, 0x83, - 0x76, 0xec, 0x30, 0xe8, 0xd9, 0x94, 0xa9, 0x50, 0xe5, 0x7c, 0x9c, 0x2c, - 0x9f, 0x26, 0x95, 0x2a, 0xf3, 0x03, 0xea, 0x15, 0x8a, 0x91, 0x95, 0x6c, - 0xbf, 0x7b, 0x9e, 0x9d, 0xfb, 0x16, 0xff, 0x9d, 0x16, 0xce, 0xa2, 0xc4, - 0xa8, 0x4b, 0x64, 0x03, 0x2f, 0x3b, 0xf7, 0xbe, 0x17, 0xac, 0x51, 0x70, - 0xae, 0x9c, 0x18, 0x69, 0x7a, 0x5e, 0x31, 0x87, 0x33, 0x72, 0xed, 0xb5, - 0x31, 0x6a, 0x25, 0xad, 0xd6, 0x74, 0x2e, 0xbf, 0x23, 0xf8, 0x1b, 0x2f, - 0xa6, 0x91, 0xdf, 0x2d, 0x12, 0x8d, 0xaf, 0x50, 0x25, 0x49, 0xad, 0x5a, - 0xee, 0x61, 0x7a, 0x21, 0xd7, 0x4d, 0x67, 0xb1, 0xdf, 0xf3, 0x39, 0xf0, - 0xd1, 0x38, 0x29, 0xd8, 0xae, 0x9e, 0x22, 0xe1, 0x05, 0xb2, 0xe7, 0xfb, - 0xd4, 0x02, 0xe1, 0x6c, 0xc3, 0xfb, 0x8c, 0x9d, 0xc3, 0x79, 0x83, 0xff, - 0xeb, 0x59, 0x49, 0xbd, 0xdc, 0xa2, 0x14, 0xd5, 0x9a, 0x7d, 0xb9, 0x9f, - 0x93, 0x40, 0x9d, 0x06, 0xf3, 0xc7, 0xa3, 0xc7, 0x70, 0xae, 0x6d, 0xa0, - 0xdf, 0x25, 0x4b, 0xcc, 0xc4, 0xe8, 0x4f, 0x55, 0x5d, 0xb3, 0xa5, 0x5e, - 0xaa, 0x9d, 0xef, 0x04, 0x9e, 0x56, 0xaf, 0x88, 0xb9, 0x63, 0x79, 0x4a, - 0x6e, 0x23, 0x12, 0x24, 0x33, 0x83, 0x7d, 0x89, 0x6a, 0x4e, 0x0a, 0x6b, - 0x33, 0xc3, 0xef, 0xd0, 0x0e, 0xd2, 0x7a, 0x64, 0x9a, 0x76, 0xba, 0xc0, - 0xc7, 0x6e, 0xc8, 0x20, 0x33, 0xfc, 0x2e, 0x84, 0x22, 0x1a, 0x99, 0xd4, - 0x49, 0x2a, 0x0b, 0x05, 0xb7, 0x83, 0xa6, 0x33, 0x0a, 0xd5, 0x81, 0x47, - 0x3d, 0xf7, 0x35, 0xc1, 0x5e, 0x2e, 0x09, 0x85, 0x65, 0xcc, 0x73, 0x5f, - 0x0b, 0xff, 0x76, 0xad, 0x1b, 0xfb, 0x88, 0x54, 0xcb, 0x94, 0x30, 0xa6, - 0xd0, 0x14, 0xe6, 0x4d, 0x81, 0xa6, 0x69, 0x77, 0x07, 0xad, 0x4f, 0x26, - 0x13, 0xcc, 0xab, 0x1a, 0xc6, 0xbf, 0x32, 0x21, 0x90, 0x6a, 0x58, 0xf4, - 0xeb, 0x3c, 0x64, 0x38, 0xdf, 0xcb, 0x32, 0xa3, 0xd3, 0x4d, 0x4a, 0x8a, - 0x94, 0x49, 0x55, 0xe8, 0x32, 0x2d, 0x3a, 0x2c, 0x7f, 0xc8, 0x13, 0xf2, - 0xae, 0x39, 0xbc, 0x0e, 0x72, 0x6b, 0x16, 0xc1, 0x8f, 0x71, 0xe0, 0x70, - 0x50, 0x78, 0x6c, 0x71, 0x52, 0x18, 0x73, 0x7f, 0x93, 0xa0, 0xae, 0x93, - 0xc2, 0x01, 0xf7, 0xa8, 0x10, 0xf2, 0x1e, 0xb2, 0x53, 0xc8, 0x9a, 0x50, - 0xe8, 0x92, 0x1b, 0xc8, 0x6e, 0x01, 0xfa, 0x69, 0xa9, 0x16, 0xe4, 0x70, - 0x78, 0x63, 0x0e, 0x8f, 0xd5, 0x97, 0x65, 0x3a, 0xed, 0xf2, 0xfc, 0x3f, - 0x82, 0x7c, 0x14, 0x72, 0x76, 0x77, 0x53, 0x19, 0xfd, 0xb5, 0x79, 0xb2, - 0xec, 0x9c, 0x88, 0x35, 0x09, 0x92, 0x8c, 0x9d, 0xf8, 0x75, 0xd1, 0xd4, - 0x62, 0xa7, 0x25, 0x19, 0x49, 0x9a, 0x72, 0x99, 0x87, 0x78, 0x36, 0xdb, - 0x7c, 0x64, 0x5c, 0xb9, 0x9f, 0xd7, 0x71, 0xbf, 0x8a, 0xfe, 0xcd, 0x7d, - 0xac, 0x17, 0x09, 0xe0, 0xa3, 0x67, 0x59, 0x9f, 0x2b, 0xcd, 0x8c, 0x7a, - 0x80, 0x9f, 0x2e, 0xf3, 0xb6, 0xcd, 0x53, 0x19, 0x73, 0x45, 0xaa, 0x2c, - 0xe2, 0x9c, 0xf3, 0xbf, 0xf5, 0x62, 0x79, 0xbc, 0x1b, 0x1d, 0xa0, 0x8b, - 0xcf, 0x95, 0x81, 0x93, 0x48, 0xe5, 0x45, 0xde, 0x8b, 0xc7, 0x09, 0xb2, - 0xaf, 0xf5, 0x88, 0x94, 0x85, 0x7c, 0x75, 0x9c, 0x13, 0xc7, 0x9c, 0x6e, - 0xf0, 0x0f, 0xb4, 0x2e, 0xa3, 0x0d, 0xda, 0x45, 0x43, 0xc4, 0xfa, 0x4e, - 0x9a, 0xca, 0xb1, 0xbe, 0x30, 0x9e, 0xdb, 0xb0, 0x77, 0x9c, 0x8e, 0x9c, - 0x67, 0x7e, 0xc8, 0xf4, 0x3c, 0x70, 0x9c, 0x9e, 0xd7, 0xd5, 0x22, 0xe9, - 0xe0, 0x8d, 0x85, 0x79, 0x9d, 0x54, 0x56, 0x3d, 0x6f, 0x24, 0x37, 0xa0, - 0xbe, 0xec, 0xeb, 0xf9, 0x80, 0x9a, 0x11, 0xa8, 0xda, 0x61, 0xfe, 0x21, - 0x70, 0xd0, 0x4b, 0x44, 0xfc, 0xfe, 0xcf, 0x64, 0x4d, 0xb2, 0xfd, 0x24, - 0xf9, 0x2c, 0xd8, 0xd3, 0x4e, 0xe0, 0xcf, 0x36, 0x97, 0x86, 0x5c, 0x52, - 0xbe, 0x1d, 0x8c, 0xdc, 0xd5, 0x0e, 0xf4, 0xf1, 0x16, 0x6c, 0xa6, 0xb6, - 0x2c, 0xb3, 0xfd, 0xe5, 0xa0, 0x6e, 0xb4, 0xcd, 0x80, 0x6e, 0xf9, 0xb2, - 0xd9, 0x8f, 0xfd, 0x3d, 0xef, 0xcb, 0xb9, 0x00, 0xa7, 0xda, 0xbc, 0x85, - 0xb5, 0x32, 0xf8, 0xae, 0x1f, 0xd7, 0xfc, 0xf3, 0xf7, 0x87, 0xe7, 0xab, - 0x34, 0x05, 0xbc, 0x6b, 0x4d, 0x89, 0x0a, 0x2a, 0xef, 0xf1, 0x2e, 0xf7, - 0x97, 0x83, 0xbd, 0xa0, 0xb7, 0xe7, 0xfa, 0xd4, 0x7d, 0xb0, 0x25, 0xb6, - 0xb1, 0xda, 0x0a, 0xf3, 0x18, 0xfb, 0xe4, 0x99, 0xc7, 0xaa, 0x8f, 0xa3, - 0x3d, 0xcf, 0x7a, 0x44, 0x69, 0x89, 0x58, 0xcf, 0x2f, 0xb3, 0x2e, 0x41, - 0x3f, 0x03, 0xbd, 0xaa, 0x38, 0x2c, 0xff, 0x2f, 0x85, 0xf6, 0x29, 0x52, - 0x7f, 0x86, 0xf5, 0xfd, 0x05, 0x2a, 0xc0, 0xc6, 0xa7, 0x70, 0xd2, 0x22, - 0x68, 0x5a, 0x68, 0xf6, 0x81, 0x57, 0x6d, 0xbb, 0x83, 0x7c, 0x07, 0xff, - 0xc7, 0x0b, 0xe6, 0x77, 0x03, 0x27, 0xb6, 0x99, 0x9a, 0x2a, 0x52, 0x15, - 0x3f, 0xe8, 0x8d, 0xa1, 0x67, 0x6d, 0x49, 0x9f, 0x28, 0x03, 0x37, 0xe8, - 0x3d, 0xd9, 0x7b, 0x58, 0x9f, 0x31, 0xc7, 0xa5, 0xa1, 0xb6, 0x9d, 0x2d, - 0x38, 0x2c, 0xa7, 0x2e, 0x9c, 0xdb, 0xc6, 0x49, 0x46, 0x1f, 0xef, 0xa3, - 0x40, 0xe7, 0xdb, 0x3a, 0xc3, 0xfa, 0xa7, 0x5b, 0xeb, 0xd4, 0x41, 0xd9, - 0x0c, 0x7c, 0xd9, 0xbc, 0x08, 0xf9, 0xa5, 0xe1, 0x53, 0x64, 0x7a, 0xba, - 0x99, 0xa4, 0x63, 0x4d, 0xc6, 0xaf, 0x08, 0xbb, 0x83, 0x6f, 0x9b, 0x1f, - 0x85, 0x9d, 0x8d, 0x0b, 0x23, 0xb0, 0x89, 0x47, 0x17, 0x19, 0x27, 0x8f, - 0xd8, 0x2e, 0x8b, 0xcb, 0x65, 0x61, 0xd4, 0x2d, 0x09, 0xe3, 0xcb, 0x6c, - 0x27, 0x6c, 0x23, 0xba, 0xfa, 0x38, 0x31, 0x0d, 0x98, 0xe3, 0xfe, 0x22, - 0xc1, 0xb6, 0x5a, 0x3b, 0x17, 0x07, 0x1e, 0xdb, 0x80, 0x4f, 0x37, 0x6c, - 0x0f, 0xfa, 0x65, 0xe8, 0x13, 0xac, 0x33, 0xc5, 0x8c, 0xa1, 0xfd, 0x25, - 0x7d, 0x9c, 0x0f, 0x23, 0x1b, 0x7c, 0x18, 0x00, 0x4f, 0x3e, 0xcc, 0x87, - 0xfa, 0xc7, 0xf9, 0x60, 0x55, 0xc1, 0x87, 0x3a, 0xfc, 0x50, 0xdd, 0x65, - 0x9a, 0x3d, 0x12, 0xf7, 0x10, 0xb4, 0x93, 0xf6, 0x8a, 0x26, 0xeb, 0x28, - 0xdb, 0x49, 0x46, 0x9b, 0xc6, 0x0e, 0x4b, 0x4e, 0xb7, 0x6f, 0x1b, 0xa3, - 0x3e, 0x2f, 0x7e, 0x17, 0xbd, 0x4c, 0xdf, 0x1d, 0x9a, 0xc7, 0x17, 0xd9, - 0xdf, 0x40, 0xcf, 0x33, 0x86, 0x7a, 0x88, 0xee, 0xd0, 0xbd, 0xef, 0x0e, - 0xdd, 0x38, 0xa7, 0xed, 0x83, 0x98, 0xe6, 0xb6, 0x3f, 0x66, 0x5d, 0x79, - 0xc3, 0x93, 0x0c, 0x03, 0x32, 0x60, 0x7d, 0x61, 0x1c, 0x74, 0xf5, 0xcb, - 0xa0, 0xa7, 0x02, 0xbf, 0xc0, 0xb6, 0x54, 0xf6, 0xe7, 0x75, 0x50, 0xb9, - 0x27, 0x98, 0x3f, 0xd5, 0xf4, 0xfe, 0x4b, 0x34, 0x3f, 0xf0, 0xec, 0xbc, - 0x11, 0xda, 0xb8, 0x42, 0x7f, 0xb2, 0xa8, 0x97, 0x35, 0xa1, 0x9b, 0xaa, - 0xf7, 0xc3, 0xaf, 0x34, 0xd9, 0x3e, 0x76, 0xde, 0xc3, 0x97, 0xa5, 0x43, - 0x5f, 0xf6, 0x3e, 0x78, 0xcf, 0xb1, 0xe7, 0xe8, 0x07, 0xeb, 0x49, 0x7e, - 0x66, 0xd4, 0x09, 0x2a, 0x71, 0xbc, 0xd9, 0x21, 0xfa, 0xfe, 0xbb, 0x8f, - 0x63, 0x41, 0x55, 0x36, 0xe3, 0x54, 0xed, 0xa1, 0xaa, 0x64, 0xb2, 0x1d, - 0xb1, 0x6d, 0xb4, 0xf1, 0xde, 0x1e, 0xc6, 0xdd, 0x41, 0x89, 0x0c, 0x1e, - 0x47, 0x8c, 0x68, 0x32, 0x0d, 0xef, 0x87, 0xf2, 0x60, 0x7f, 0x4a, 0xb1, - 0x40, 0xdf, 0xf6, 0xc3, 0x5f, 0x32, 0x3f, 0x37, 0xeb, 0x0a, 0xfb, 0x51, - 0xd2, 0x44, 0x83, 0xfd, 0x28, 0xa9, 0x92, 0x79, 0x50, 0xb0, 0x16, 0xbf, - 0x26, 0x58, 0xe0, 0x9b, 0x05, 0xbe, 0x59, 0xe0, 0x9b, 0x0d, 0xbe, 0x15, - 0x5c, 0xc6, 0x85, 0xf1, 0x08, 0xf6, 0x2f, 0x06, 0xfb, 0x03, 0xc7, 0x9d, - 0x54, 0xf1, 0xed, 0x9b, 0x69, 0x85, 0x3f, 0xf6, 0x7d, 0xc1, 0xa8, 0x10, - 0xf8, 0x02, 0xde, 0x6f, 0x1c, 0xeb, 0x1f, 0x47, 0x8c, 0xb3, 0x44, 0xd1, - 0xb8, 0xc3, 0x8f, 0xfa, 0x26, 0x7e, 0x4c, 0x3b, 0xcc, 0x1f, 0x9e, 0xcf, - 0x76, 0xec, 0x40, 0xe6, 0x6d, 0x9e, 0xec, 0x07, 0x0e, 0x9d, 0x4c, 0x77, - 0x48, 0x07, 0xef, 0xdf, 0x1b, 0xee, 0x7f, 0x00, 0x7b, 0xb2, 0xdd, 0xde, - 0xed, 0x5c, 0x3e, 0x93, 0xe3, 0xe8, 0x27, 0xd1, 0x83, 0x3c, 0x02, 0x7e, - 0x66, 0x0d, 0x76, 0x76, 0x53, 0x4a, 0xd1, 0xeb, 0xbb, 0x6f, 0x20, 0xb7, - 0xa0, 0xea, 0x03, 0xa6, 0xa7, 0xc9, 0xe6, 0xfb, 0x5e, 0x3d, 0x0f, 0xdf, - 0x69, 0xea, 0x29, 0x5b, 0x1a, 0xa4, 0x37, 0xdc, 0x2c, 0xfd, 0x9d, 0x6b, - 0xd0, 0xdf, 0xba, 0x1a, 0xbd, 0xea, 0xa6, 0xe9, 0x6f, 0xdc, 0x14, 0xfd, - 0xb5, 0xdb, 0xce, 0x43, 0x92, 0xac, 0x47, 0x89, 0xa2, 0x7b, 0xb7, 0x5c, - 0x08, 0x3a, 0x8e, 0xbd, 0xec, 0xbc, 0x5c, 0x96, 0x4d, 0x3f, 0x3f, 0x98, - 0x98, 0x6e, 0x90, 0xb2, 0xd3, 0xa0, 0xed, 0xf7, 0x23, 0xef, 0x49, 0x9a, - 0xb4, 0xe3, 0x3e, 0x3c, 0x7b, 0x4d, 0xb2, 0x7a, 0xcc, 0x53, 0x9e, 0x68, - 0xb0, 0x1e, 0x75, 0x0f, 0x4f, 0xe5, 0xe3, 0x8c, 0xfb, 0xc4, 0x34, 0xfc, - 0x91, 0x8d, 0xb3, 0xaa, 0xd0, 0xc5, 0xaa, 0x7b, 0xe8, 0xfe, 0x20, 0x17, - 0x7a, 0x2f, 0xcc, 0x89, 0x38, 0xaf, 0x5a, 0x7f, 0x6a, 0xc2, 0x60, 0x3f, - 0x2b, 0x6c, 0xf2, 0xb3, 0x24, 0x14, 0x41, 0x53, 0x1d, 0xb8, 0x16, 0x41, - 0xe7, 0x57, 0x5d, 0x45, 0x28, 0x9c, 0xef, 0xa5, 0xe9, 0x45, 0x8e, 0x55, - 0x3c, 0x4f, 0x09, 0x73, 0x19, 0x7e, 0xef, 0xc0, 0x3b, 0x21, 0x7e, 0x14, - 0xb6, 0x53, 0x42, 0x7f, 0x73, 0x82, 0x9c, 0x30, 0x17, 0x89, 0xd1, 0x05, - 0x5f, 0x77, 0xb8, 0xdf, 0x2a, 0xfd, 0xb0, 0xff, 0x4e, 0xff, 0xf9, 0x8d, - 0xfe, 0x72, 0xe9, 0xeb, 0x1b, 0xfd, 0xef, 0xa8, 0x01, 0x4e, 0xc3, 0xc2, - 0xe3, 0xee, 0xf3, 0x61, 0xdf, 0x6d, 0xf0, 0xd3, 0xf3, 0xea, 0x88, 0x27, - 0x35, 0xe3, 0x36, 0x72, 0x1f, 0xf6, 0x29, 0x5b, 0xf1, 0x21, 0x1f, 0xf2, - 0x1f, 0xaa, 0x2d, 0xb1, 0x9c, 0x14, 0x0a, 0xf6, 0xe4, 0xf1, 0x4e, 0xf8, - 0x92, 0xdb, 0x68, 0x73, 0xec, 0x6a, 0xfb, 0x31, 0x9e, 0xc3, 0xeb, 0x6f, - 0xdd, 0x43, 0x96, 0x2a, 0x64, 0xb9, 0x35, 0x79, 0xd5, 0x1a, 0xa7, 0x42, - 0x9f, 0xd0, 0x3d, 0x6c, 0x43, 0x2e, 0x12, 0xe4, 0x52, 0x83, 0x5c, 0x0a, - 0xf7, 0x94, 0x0b, 0xce, 0xd8, 0xd0, 0x29, 0xc6, 0xa3, 0x2b, 0x3c, 0x9b, - 0x14, 0xd9, 0xac, 0x96, 0xea, 0xc6, 0xa7, 0x28, 0x66, 0x30, 0x1e, 0x06, - 0xf0, 0x38, 0x8a, 0xb5, 0x1c, 0xc3, 0x48, 0x89, 0x99, 0x2c, 0xcf, 0xdc, - 0x13, 0xb6, 0x71, 0xab, 0xb4, 0xe0, 0xdc, 0x2a, 0x5d, 0x34, 0xf8, 0xfd, - 0xf6, 0x64, 0x90, 0x37, 0x77, 0x3f, 0x89, 0xbc, 0x19, 0xeb, 0xd9, 0x1f, - 0x72, 0xff, 0x30, 0xe6, 0x71, 0x7c, 0xa0, 0x43, 0x35, 0xfc, 0xea, 0xfe, - 0xdc, 0x6b, 0x4f, 0xf0, 0xdc, 0x4e, 0x53, 0x9e, 0xfc, 0x35, 0x9e, 0x1d, - 0xa6, 0xf6, 0xe4, 0x4f, 0x0d, 0xde, 0x77, 0x78, 0xf2, 0xa2, 0xbf, 0x07, - 0x62, 0xa6, 0xbf, 0x36, 0xfb, 0x24, 0xaf, 0x7d, 0x0e, 0x3e, 0xf6, 0x0c, - 0xe2, 0xcb, 0x69, 0x47, 0x3b, 0x54, 0xc1, 0x6f, 0x8a, 0x71, 0x6a, 0xf2, - 0xb8, 0x85, 0x71, 0x19, 0xb1, 0x90, 0xdb, 0x0a, 0x1d, 0xc3, 0xbc, 0xa7, - 0x31, 0xef, 0xa8, 0x33, 0x8e, 0xbc, 0xbd, 0x4d, 0xd7, 0xbf, 0xc5, 0x0b, - 0xf3, 0xec, 0xcf, 0x91, 0xed, 0xaf, 0xfc, 0x7b, 0xdc, 0x86, 0x5f, 0x16, - 0x57, 0x6e, 0xc6, 0x0b, 0xa0, 0x5b, 0x5a, 0xf9, 0x45, 0xbc, 0x08, 0x3d, - 0x13, 0x0d, 0x09, 0x7e, 0xf9, 0x33, 0x54, 0x53, 0x3d, 0x7a, 0x19, 0xf1, - 0xab, 0x96, 0x85, 0xbf, 0x82, 0x34, 0x45, 0x03, 0x7e, 0x4c, 0x25, 0xa5, - 0xcb, 0x3c, 0xa9, 0x52, 0x57, 0x3e, 0x6e, 0x23, 0xde, 0xd4, 0x54, 0x09, - 0xfd, 0xfd, 0x78, 0x6e, 0xee, 0xff, 0x65, 0x1c, 0x7e, 0x0b, 0x3e, 0x82, - 0x14, 0x3b, 0xdf, 0x8d, 0xfd, 0xbf, 0x8d, 0x7e, 0x4c, 0xc8, 0x6c, 0xf4, - 0x3f, 0x1b, 0xf4, 0xdf, 0x02, 0x2e, 0xbc, 0x8e, 0xe3, 0x27, 0x29, 0x53, - 0x79, 0x15, 0x38, 0xf0, 0xdc, 0xa4, 0x3f, 0xb7, 0x38, 0xcf, 0x3c, 0xa8, - 0x96, 0x16, 0x8c, 0x34, 0x15, 0xe6, 0x92, 0x34, 0x3a, 0xa7, 0xd2, 0xd8, - 0x9c, 0x3e, 0xd1, 0x62, 0xfb, 0x01, 0xcd, 0x84, 0x1c, 0x41, 0x5c, 0x21, - 0x50, 0xac, 0xa7, 0x9e, 0xa6, 0xbe, 0xd4, 0x31, 0xfa, 0x6f, 0x0f, 0xb1, - 0x08, 0x71, 0xa8, 0x9b, 0x64, 0x7f, 0x9f, 0x54, 0xfb, 0x4c, 0x96, 0xd1, - 0x87, 0xce, 0x2d, 0xce, 0xdf, 0x6b, 0x5f, 0x28, 0xf1, 0x4a, 0xea, 0x23, - 0xfb, 0xbe, 0x1b, 0xee, 0xab, 0x62, 0xdf, 0x34, 0xf6, 0x64, 0x1a, 0xf5, - 0xf8, 0xc8, 0x79, 0xb2, 0x3a, 0x81, 0x5f, 0x31, 0x83, 0x98, 0x8f, 0x7d, - 0xce, 0xcc, 0xb1, 0xde, 0xd3, 0x4e, 0xfc, 0x06, 0x63, 0x94, 0xc9, 0x2e, - 0x23, 0x27, 0x18, 0xf1, 0xf7, 0x08, 0xf2, 0x05, 0x71, 0x65, 0x10, 0xf9, - 0xda, 0x3b, 0xc0, 0x87, 0xe3, 0x18, 0xd3, 0x2c, 0x83, 0xde, 0x41, 0xe4, - 0x09, 0x9c, 0xe3, 0x7b, 0xa7, 0xec, 0x1c, 0xda, 0xcb, 0x5a, 0xbc, 0x00, - 0xdb, 0x16, 0x4d, 0x7a, 0x50, 0xf2, 0x7d, 0x2c, 0xcb, 0x65, 0x10, 0x72, - 0x62, 0xbc, 0x73, 0x90, 0x13, 0xf3, 0x68, 0x38, 0x5e, 0x6c, 0x32, 0x8f, - 0x08, 0xf8, 0x68, 0xb0, 0x27, 0xd9, 0xcf, 0xf3, 0xc5, 0x15, 0x0b, 0xf3, - 0x7e, 0xac, 0x72, 0x2e, 0x66, 0x1b, 0xdc, 0x86, 0xed, 0xac, 0x8c, 0x63, - 0x2e, 0xb7, 0x1f, 0xc6, 0xbe, 0x7d, 0xb9, 0x1a, 0x75, 0xe4, 0x9e, 0x86, - 0xdd, 0x8a, 0xf9, 0x01, 0xc4, 0x68, 0x01, 0xb9, 0xa0, 0xe7, 0x75, 0xe4, - 0xbf, 0x00, 0x7a, 0x98, 0x0e, 0xe8, 0xf5, 0x2c, 0xf3, 0x95, 0xfe, 0x40, - 0xe4, 0x5c, 0x2d, 0xdf, 0xce, 0x6b, 0x38, 0x9e, 0xf3, 0xf9, 0x88, 0x23, - 0x8d, 0x3d, 0x88, 0xa5, 0xfe, 0xd9, 0xd0, 0xb1, 0x71, 0x2a, 0x34, 0x3e, - 0x8b, 0x9c, 0x93, 0x6d, 0x67, 0x9b, 0x60, 0x9f, 0x67, 0x1a, 0x09, 0xb1, - 0x66, 0x8d, 0x2a, 0x0d, 0x39, 0x6c, 0xbf, 0x8a, 0xb6, 0x12, 0xb6, 0xd7, - 0xd1, 0xee, 0x0e, 0xdb, 0xd7, 0xd0, 0x56, 0xc3, 0xf6, 0xcf, 0xd0, 0x4e, - 0x86, 0xed, 0x9f, 0xa3, 0x9d, 0x0a, 0xdb, 0x37, 0xd1, 0x4e, 0x87, 0xed, - 0x5b, 0x68, 0x6b, 0x61, 0xfb, 0x3d, 0xb4, 0x13, 0xb0, 0x73, 0x03, 0xef, - 0x37, 0x50, 0x2b, 0x66, 0xf1, 0xfc, 0x57, 0xe0, 0x36, 0x08, 0xde, 0x64, - 0xc1, 0x8f, 0x5e, 0x8c, 0xe5, 0xd0, 0x87, 0x1c, 0xb1, 0x91, 0xc7, 0xd3, - 0xc1, 0x18, 0x95, 0x61, 0x7b, 0x18, 0x1f, 0x2f, 0x16, 0x1a, 0x26, 0x9e, - 0x6c, 0x0f, 0xba, 0x4a, 0xc2, 0x65, 0xd8, 0xb9, 0xef, 0x63, 0x72, 0xb6, - 0x34, 0x09, 0xdb, 0x9e, 0xa0, 0x7f, 0x74, 0xf7, 0xd3, 0x6b, 0xee, 0x38, - 0xe2, 0x46, 0x11, 0x71, 0xc3, 0x42, 0xdc, 0x30, 0x11, 0x37, 0x86, 0x11, - 0x37, 0xf2, 0x88, 0x1b, 0x39, 0xc4, 0x0d, 0xa2, 0x33, 0x7e, 0x8c, 0x4a, - 0x2a, 0xa8, 0x51, 0x15, 0xcb, 0x2d, 0x82, 0xbf, 0x13, 0x90, 0xcd, 0x24, - 0x78, 0x7d, 0x38, 0x3e, 0xd2, 0xcc, 0xc3, 0x9f, 0x69, 0xf0, 0x11, 0x69, - 0xf8, 0xf2, 0x1c, 0x6a, 0x13, 0xa2, 0x2b, 0xb3, 0x1a, 0xfc, 0x8f, 0x47, - 0x45, 0xc4, 0xfe, 0x69, 0x15, 0xb8, 0x19, 0xbb, 0x7c, 0x9b, 0x91, 0xcc, - 0x2f, 0xf6, 0x50, 0xd7, 0x20, 0xe8, 0x39, 0x8b, 0xbe, 0x14, 0xf6, 0x63, - 0xbe, 0xde, 0x2a, 0xd9, 0x86, 0x46, 0x0b, 0x6e, 0x1c, 0xfe, 0x9f, 0xdf, - 0xe3, 0xcc, 0xe3, 0x43, 0x4f, 0x19, 0x4c, 0x03, 0xea, 0x3c, 0x23, 0xad, - 0x14, 0x1c, 0x81, 0x24, 0x93, 0x9f, 0xed, 0x1c, 0xe2, 0xcf, 0x90, 0x43, - 0x74, 0x41, 0x06, 0x55, 0xc4, 0x05, 0x9d, 0xf3, 0x0b, 0xe8, 0xf2, 0x27, - 0xcd, 0xff, 0x1e, 0xe6, 0xef, 0xc5, 0xd9, 0x3c, 0x8f, 0xcf, 0x39, 0x85, - 0xfa, 0xc1, 0xea, 0x91, 0x68, 0x3d, 0x25, 0xa1, 0x9e, 0x28, 0xd0, 0x59, - 0x2a, 0x00, 0x9f, 0x82, 0xdb, 0xbe, 0x07, 0xb0, 0x0e, 0x05, 0xfe, 0x6c, - 0xe2, 0xd0, 0xb7, 0x0d, 0x0b, 0xeb, 0x18, 0x3f, 0xd6, 0x5b, 0xe0, 0xbe, - 0xb1, 0xe7, 0x05, 0xec, 0xf9, 0x4f, 0x49, 0xea, 0x9a, 0x0c, 0xfc, 0x91, - 0x5f, 0xf3, 0xca, 0xc2, 0x48, 0xf3, 0x2c, 0xf8, 0xd3, 0x87, 0x1a, 0x05, - 0x7e, 0xa4, 0xd4, 0x02, 0x9f, 0xda, 0xf3, 0x5f, 0xc1, 0x7c, 0x7e, 0xf7, - 0xef, 0x0e, 0x4a, 0xd2, 0xea, 0x12, 0xe6, 0x69, 0xac, 0x3f, 0x25, 0xb9, - 0xff, 0x86, 0xf7, 0xa2, 0x91, 0xa7, 0x5d, 0xab, 0xbc, 0x2e, 0x4b, 0x7d, - 0xab, 0x37, 0xbc, 0x9a, 0xa3, 0xd1, 0x62, 0x93, 0xc0, 0xab, 0xf8, 0x6d, - 0x8b, 0xf4, 0x35, 0x12, 0xf5, 0x59, 0x0b, 0x7a, 0x5a, 0x1c, 0x12, 0xc9, - 0x1e, 0xea, 0x84, 0x8f, 0x32, 0x68, 0x09, 0x7c, 0xdf, 0x35, 0x63, 0xd1, - 0x13, 0x43, 0xed, 0x7c, 0x10, 0x51, 0x0f, 0xb8, 0xee, 0x5a, 0xd5, 0x30, - 0x87, 0x73, 0x71, 0xa6, 0x45, 0x03, 0x2f, 0x85, 0x60, 0x8d, 0x1f, 0xb3, - 0xb8, 0x8e, 0x05, 0xdf, 0xdc, 0xb5, 0xd2, 0xd5, 0x19, 0xd4, 0x1a, 0x90, - 0xf3, 0xae, 0x19, 0xae, 0x85, 0xb6, 0x81, 0x2f, 0x31, 0xd8, 0x06, 0xe7, - 0xf1, 0x08, 0xf4, 0xf0, 0x87, 0x27, 0xe0, 0xf1, 0x6b, 0xcd, 0x13, 0xd0, - 0xfb, 0x2e, 0x2a, 0xcb, 0x3e, 0x11, 0x9f, 0xc0, 0xe3, 0xff, 0xe4, 0xbc, - 0x0e, 0xf3, 0xbf, 0x4b, 0xc5, 0xd9, 0x2e, 0xec, 0xb5, 0x9b, 0xa6, 0x93, - 0x8c, 0x9b, 0x3e, 0x8c, 0x41, 0x2d, 0x06, 0x7e, 0xc6, 0xcd, 0x8f, 0xe6, - 0x7d, 0x6b, 0xa5, 0x2b, 0x33, 0x6b, 0xa5, 0x6b, 0xa0, 0xbf, 0x6e, 0x70, - 0x8d, 0x0c, 0x5d, 0x6a, 0x70, 0x6d, 0xcf, 0x79, 0xd1, 0x18, 0x74, 0x64, - 0xbf, 0x5f, 0x33, 0xdb, 0x8b, 0x39, 0xea, 0x3b, 0x47, 0xaa, 0x68, 0x96, - 0x84, 0x31, 0xe4, 0x45, 0x23, 0xee, 0x49, 0x7f, 0xee, 0x99, 0x06, 0xd7, - 0x2b, 0x18, 0x5b, 0x61, 0x5d, 0x18, 0x03, 0x3e, 0x49, 0xba, 0xe8, 0xb2, - 0x4f, 0x0a, 0xec, 0x78, 0x0c, 0xfc, 0x5a, 0xf0, 0xe9, 0x4a, 0x71, 0x1c, - 0x47, 0xbe, 0xc1, 0xf2, 0xf9, 0x21, 0xc7, 0x41, 0xa1, 0xd3, 0x6c, 0xfb, - 0xdb, 0x89, 0x5e, 0xe6, 0x59, 0xa1, 0x01, 0xdf, 0x3f, 0x34, 0x11, 0xe6, - 0x1c, 0x7f, 0x8f, 0x39, 0x8c, 0x3b, 0xcd, 0x4a, 0x26, 0xce, 0xc8, 0x33, - 0xcf, 0x38, 0xa7, 0xe4, 0x7d, 0xc1, 0x5b, 0xf0, 0x7d, 0x53, 0x6e, 0xe9, - 0xc3, 0x74, 0x33, 0x46, 0x95, 0x59, 0xf0, 0x2e, 0x8f, 0x27, 0x9c, 0x6b, - 0x1d, 0x7c, 0x03, 0x2d, 0xd5, 0x20, 0x9f, 0x3d, 0xc1, 0x31, 0x0d, 0xfe, - 0x06, 0x36, 0xcd, 0x31, 0x6b, 0xe3, 0xde, 0xc9, 0xf7, 0x25, 0x32, 0x19, - 0x41, 0xce, 0x2a, 0xe2, 0x2c, 0x3b, 0xcf, 0x7e, 0x10, 0xf8, 0xb8, 0xdf, - 0xa5, 0xfa, 0x2c, 0xd3, 0x05, 0x1b, 0x4f, 0xb2, 0x2e, 0xfe, 0x7f, 0xf9, - 0x38, 0xba, 0x45, 0x3e, 0x8e, 0x6e, 0x99, 0x8f, 0x12, 0xf8, 0x58, 0xd9, - 0xe0, 0xa3, 0x82, 0x3d, 0xf8, 0x3e, 0xe1, 0xab, 0x64, 0x4d, 0x3c, 0x02, - 0x3f, 0x0c, 0xff, 0xd1, 0x3c, 0x05, 0x9f, 0x70, 0x52, 0xb8, 0xda, 0xf0, - 0x68, 0x1c, 0xb5, 0xb2, 0x74, 0xff, 0x66, 0xfa, 0x33, 0xa0, 0xff, 0xcf, - 0x31, 0x5e, 0xa5, 0x6b, 0xb3, 0x94, 0x56, 0xa8, 0x7d, 0x2e, 0xed, 0x92, - 0xe9, 0x3b, 0x74, 0x75, 0xb6, 0x8b, 0xae, 0xcf, 0x66, 0xc0, 0xeb, 0x2c, - 0xc5, 0x7a, 0x32, 0xc3, 0x15, 0x18, 0xf1, 0xcf, 0x5a, 0xba, 0xc5, 0xba, - 0xf8, 0xfb, 0xf3, 0x82, 0xf9, 0x70, 0xd0, 0xe7, 0xc3, 0xd8, 0x47, 0xf8, - 0x30, 0x7e, 0x4f, 0x3e, 0x1c, 0xfc, 0x18, 0x1f, 0xc6, 0x3f, 0xc6, 0x07, - 0xe6, 0x01, 0xf3, 0xe2, 0xd1, 0xde, 0xf0, 0xff, 0x1f, 0x7d, 0x82, 0x7d, - 0x7c, 0x09, 0x74, 0x22, 0xa7, 0xd8, 0x19, 0xe4, 0x50, 0x9c, 0x63, 0xd5, - 0x0c, 0xe6, 0x57, 0x60, 0xbf, 0x32, 0x72, 0xea, 0x23, 0xa1, 0xfd, 0x16, - 0x1c, 0xe8, 0x65, 0x23, 0xe6, 0xdb, 0xaf, 0x64, 0xe6, 0xe1, 0x03, 0xaa, - 0xa5, 0x96, 0xc3, 0xfe, 0x07, 0x6d, 0x87, 0x79, 0xda, 0x0b, 0x5a, 0x12, - 0x54, 0x99, 0x54, 0x10, 0x5f, 0x87, 0xa1, 0xb7, 0x71, 0xdf, 0x07, 0x4a, - 0x26, 0xeb, 0xe1, 0x7e, 0xcc, 0x3f, 0x1c, 0xe6, 0x45, 0x88, 0x73, 0x38, - 0xa3, 0xd6, 0x38, 0x0d, 0xfc, 0xf8, 0x9c, 0x6a, 0xa9, 0xec, 0xf0, 0x9a, - 0x34, 0x62, 0x21, 0x3f, 0x37, 0xeb, 0xb7, 0xaf, 0xef, 0xf7, 0xd2, 0x71, - 0xe8, 0x26, 0xeb, 0xb4, 0x82, 0xdc, 0x78, 0x02, 0xf1, 0xc5, 0xd7, 0xd3, - 0xec, 0x02, 0xb1, 0xdf, 0x7f, 0x06, 0x75, 0xd1, 0x61, 0xfc, 0x34, 0x1a, - 0x71, 0x03, 0x9b, 0x5a, 0xf2, 0xcf, 0xfc, 0xb0, 0x4f, 0xaa, 0x39, 0xeb, - 0xc8, 0xdf, 0x0d, 0xec, 0xcb, 0xe7, 0x56, 0xc1, 0x1b, 0x09, 0xe7, 0x72, - 0x5f, 0x37, 0xe2, 0x00, 0xf8, 0xe4, 0xfe, 0x07, 0xfa, 0x97, 0xe0, 0x1f, - 0x39, 0x2f, 0x68, 0xe3, 0x8e, 0x1c, 0xc2, 0xe1, 0x78, 0x9d, 0x07, 0xcd, - 0x9c, 0x63, 0x73, 0x2e, 0x81, 0xfc, 0x63, 0xe9, 0x4d, 0xf4, 0x0d, 0xd3, - 0xe9, 0xa1, 0x2c, 0xe4, 0xc3, 0x7d, 0x0f, 0x84, 0x7d, 0x3c, 0x8f, 0x94, - 0x07, 0x4d, 0xfd, 0x07, 0x55, 0xdf, 0xaf, 0x43, 0x0f, 0x51, 0xf7, 0xd5, - 0x96, 0x90, 0x63, 0x00, 0xa7, 0xca, 0x6a, 0x16, 0xb9, 0x3c, 0xdf, 0xab, - 0xe9, 0x97, 0x91, 0x07, 0x83, 0x27, 0x0a, 0xf5, 0x1a, 0xa5, 0xd0, 0x0f, - 0xe7, 0x40, 0x1f, 0xdf, 0x3d, 0xf5, 0x21, 0xf7, 0x91, 0xc0, 0x08, 0xd8, - 0xe9, 0xaa, 0x44, 0x7b, 0xe5, 0x01, 0xb5, 0x46, 0xff, 0x80, 0xb9, 0x32, - 0x95, 0x57, 0x39, 0x87, 0x90, 0xe9, 0xc8, 0x2a, 0xd1, 0x5b, 0x33, 0xec, - 0x97, 0x19, 0xd8, 0x2f, 0xb3, 0x7f, 0x7d, 0xd0, 0x1f, 0x7b, 0x6b, 0x06, - 0x35, 0xf8, 0xcc, 0x00, 0xc7, 0xb0, 0x75, 0x11, 0xbc, 0x44, 0xee, 0xc3, - 0xf9, 0xf9, 0x5d, 0xee, 0x98, 0xda, 0xf7, 0x4b, 0x0a, 0x55, 0x66, 0xf8, - 0x6e, 0x49, 0xc6, 0xf9, 0x5c, 0x5b, 0x6c, 0x03, 0x7e, 0x02, 0xa1, 0xee, - 0x12, 0x38, 0xa6, 0x09, 0xd0, 0xa1, 0x5d, 0x90, 0x3d, 0xf8, 0x1f, 0xb6, - 0xdb, 0xfa, 0xf4, 0x2f, 0xd0, 0x27, 0x9e, 0x27, 0x6f, 0xc2, 0x25, 0x33, - 0x6b, 0x8b, 0x1c, 0x1f, 0x3e, 0x0d, 0xdb, 0xb3, 0xe2, 0x63, 0xcd, 0x0e, - 0x6a, 0xf5, 0xb2, 0x3d, 0xb0, 0x5e, 0x5c, 0x66, 0x9d, 0xc0, 0x19, 0xd0, - 0xa1, 0x19, 0xae, 0xe7, 0x65, 0xcc, 0xbb, 0x2f, 0x9c, 0xc7, 0xfc, 0xfe, - 0x1e, 0x4d, 0x0f, 0xa9, 0x42, 0x59, 0x0d, 0xe2, 0x45, 0x6d, 0xa8, 0x03, - 0x63, 0x22, 0x1d, 0x7c, 0x38, 0x8f, 0xb5, 0x9c, 0x53, 0xc5, 0x85, 0xc0, - 0x6f, 0x71, 0x1f, 0xdf, 0xd7, 0xa9, 0x54, 0xbe, 0xd4, 0x4b, 0x95, 0x4b, - 0x0a, 0xf8, 0x02, 0x44, 0x17, 0x82, 0x7d, 0xd8, 0x17, 0x1c, 0x87, 0xdc, - 0xc4, 0x73, 0x0a, 0xc5, 0xce, 0x21, 0x87, 0xbc, 0xd0, 0x45, 0x1d, 0x17, - 0xfa, 0x49, 0xba, 0xa0, 0x73, 0x7e, 0xa8, 0x9d, 0x81, 0x0c, 0x8f, 0x50, - 0x9e, 0x9e, 0x73, 0x07, 0x39, 0xc7, 0xc3, 0x39, 0x5c, 0xe7, 0x25, 0x49, - 0x42, 0xf2, 0x2f, 0xbe, 0x68, 0xd1, 0x8b, 0x43, 0xc0, 0x2b, 0x8f, 0xf6, - 0x8f, 0x91, 0xc7, 0xbb, 0x23, 0xf7, 0x71, 0xcc, 0x96, 0xcd, 0x3e, 0xc8, - 0x16, 0x74, 0xe5, 0x1e, 0xf2, 0xef, 0x44, 0x5f, 0x1c, 0x62, 0x7a, 0x34, - 0xd0, 0x52, 0x87, 0xae, 0xf3, 0x3d, 0x57, 0x17, 0xd9, 0x32, 0xeb, 0x32, - 0xf2, 0xaa, 0x0b, 0x75, 0x9a, 0x6a, 0xe8, 0x90, 0x59, 0x1f, 0xf4, 0x02, - 0x32, 0x4b, 0x73, 0x3f, 0xef, 0x2d, 0x84, 0xfb, 0xde, 0xd1, 0xf7, 0x17, - 0xef, 0xad, 0xef, 0x3e, 0xd4, 0x9b, 0x8f, 0xc0, 0x67, 0xa3, 0x2e, 0x32, - 0xe0, 0xd3, 0x55, 0xe4, 0x72, 0x06, 0xbf, 0x07, 0x77, 0x95, 0x15, 0xe4, - 0x85, 0xfc, 0x5e, 0x6b, 0xdd, 0xcd, 0x77, 0x07, 0xf6, 0x7d, 0x06, 0x3c, - 0xba, 0x32, 0xf7, 0x00, 0x5d, 0x9d, 0x53, 0xe8, 0x5a, 0x43, 0xcf, 0x16, - 0xa8, 0x83, 0xaa, 0xc9, 0x34, 0x5d, 0x5f, 0x6a, 0xe7, 0x93, 0x22, 0xf4, - 0xc4, 0x22, 0xce, 0xcd, 0xaf, 0x2c, 0x55, 0x4b, 0x37, 0x76, 0xa7, 0x49, - 0x7e, 0x09, 0xb6, 0xfd, 0x92, 0xae, 0xd5, 0xc0, 0xe7, 0xba, 0xe1, 0xa2, - 0x56, 0xe3, 0x3a, 0x32, 0x05, 0xbb, 0xd3, 0x53, 0x2d, 0xca, 0x90, 0xb4, - 0xa0, 0xd0, 0xaf, 0x66, 0x74, 0x8d, 0x75, 0xee, 0xa2, 0x81, 0x7e, 0x37, - 0x7e, 0x7b, 0x3d, 0xd0, 0x43, 0xf4, 0xf5, 0xa3, 0xbe, 0xd5, 0xb3, 0x9a, - 0xd8, 0x4d, 0x6f, 0x43, 0x27, 0xca, 0x7e, 0xdf, 0x47, 0xf7, 0xbc, 0x1e, - 0xee, 0x59, 0x2d, 0x5d, 0xe1, 0x3a, 0x68, 0x86, 0x75, 0xbe, 0x17, 0xfe, - 0x03, 0xef, 0x6e, 0x07, 0x95, 0x27, 0x11, 0xa3, 0x66, 0x1e, 0xa5, 0xc2, - 0x90, 0x18, 0xd0, 0xed, 0xf3, 0x82, 0xfb, 0xf8, 0x7e, 0xb2, 0x76, 0x1f, - 0xdb, 0xb2, 0xb8, 0x0a, 0xbd, 0x3a, 0xc8, 0x7a, 0x80, 0xdc, 0x0e, 0x39, - 0x04, 0xfb, 0x4e, 0x09, 0x39, 0x44, 0xc1, 0x0d, 0x74, 0xa3, 0x75, 0x30, - 0x49, 0xc7, 0x5e, 0x62, 0x19, 0x61, 0x6c, 0x43, 0xef, 0x36, 0xee, 0xc4, - 0x31, 0x66, 0xd0, 0xf1, 0xef, 0xb7, 0x73, 0x4a, 0xb6, 0xbd, 0x34, 0xe4, - 0xa1, 0xa3, 0xf6, 0xe8, 0x53, 0x2b, 0xbe, 0x4f, 0x81, 0x4e, 0xa4, 0x02, - 0x19, 0xd4, 0x30, 0x36, 0xed, 0x4e, 0xc2, 0x27, 0xc6, 0xe8, 0xe6, 0xa4, - 0x05, 0x9d, 0x68, 0x01, 0x87, 0xc3, 0x71, 0xbe, 0x4b, 0xb8, 0x39, 0x59, - 0xc4, 0xfb, 0x61, 0x3f, 0xf7, 0x97, 0xf6, 0x40, 0x97, 0xdc, 0x07, 0xc2, - 0xfc, 0x9c, 0xcf, 0xd3, 0x84, 0xda, 0xac, 0x2e, 0x4c, 0xcf, 0x7a, 0x34, - 0x9a, 0xeb, 0x4b, 0x5d, 0xa5, 0x4e, 0xff, 0xce, 0xd8, 0xf7, 0x9b, 0xfe, - 0x9c, 0x5d, 0x18, 0xff, 0x00, 0x3a, 0x85, 0x27, 0xe2, 0xf5, 0xe9, 0x66, - 0x35, 0xd5, 0x41, 0xac, 0x53, 0x24, 0x2c, 0x18, 0xec, 0x3b, 0x04, 0xba, - 0xea, 0xdf, 0x47, 0x13, 0x15, 0x9d, 0xd7, 0x99, 0x6e, 0x61, 0xb1, 0xc5, - 0x6b, 0x58, 0xce, 0xbc, 0x46, 0xa2, 0x9b, 0x49, 0xd8, 0xe5, 0x9e, 0x3d, - 0x7e, 0xbd, 0xf8, 0xf8, 0x10, 0xe3, 0xda, 0x0d, 0x99, 0x42, 0xbf, 0x50, - 0xdb, 0x94, 0x83, 0xbe, 0x59, 0xae, 0x4d, 0xa7, 0xf9, 0xde, 0x23, 0xef, - 0xeb, 0x5a, 0xa8, 0x1f, 0x1f, 0xd7, 0xb5, 0xe7, 0xb0, 0xf6, 0x2d, 0xf6, - 0xab, 0x90, 0x75, 0xe0, 0x23, 0xbe, 0x41, 0x6f, 0xcd, 0x55, 0xb3, 0xfc, - 0xcd, 0xa3, 0x35, 0x21, 0xa0, 0x16, 0x3f, 0x4e, 0x6f, 0xcf, 0x3d, 0x4b, - 0xbf, 0x9c, 0x65, 0xdd, 0x31, 0x68, 0x14, 0xfa, 0x74, 0x94, 0xe4, 0xec, - 0x69, 0x1a, 0x50, 0xaf, 0xfb, 0xb5, 0x8d, 0x9e, 0xf3, 0x6b, 0x3a, 0x33, - 0x4b, 0xc5, 0xc6, 0x40, 0xea, 0x1a, 0xfa, 0xca, 0x93, 0xba, 0xb6, 0x8e, - 0xdc, 0xa3, 0xd0, 0xfc, 0x80, 0xef, 0x6c, 0xb2, 0x35, 0xd8, 0xde, 0x22, - 0x6a, 0x9b, 0xb7, 0x9d, 0xbb, 0xe9, 0x2c, 0xd7, 0x56, 0x81, 0xff, 0x5e, - 0x33, 0x50, 0x63, 0xac, 0xaa, 0xa1, 0x0e, 0x31, 0x70, 0x9d, 0xc1, 0xf1, - 0x07, 0x4f, 0x37, 0x06, 0x9f, 0xb2, 0x1f, 0x7c, 0x67, 0xd9, 0x42, 0xfe, - 0xab, 0xfc, 0x8d, 0x0a, 0xf2, 0x5f, 0x5d, 0xfe, 0x40, 0xeb, 0x65, 0x3f, - 0x6b, 0x80, 0x96, 0x41, 0x3a, 0x33, 0xcf, 0xf2, 0x47, 0xec, 0xf5, 0xed, - 0x34, 0x0d, 0xfe, 0x72, 0x7c, 0x19, 0xa4, 0x5f, 0x2d, 0x15, 0xfd, 0xfb, - 0x6b, 0x1b, 0xb9, 0xd6, 0x11, 0x67, 0x12, 0xf5, 0xfa, 0x77, 0x40, 0x2f, - 0xce, 0x1e, 0xda, 0x8d, 0xa7, 0x0a, 0x9b, 0xdc, 0x72, 0x9e, 0x23, 0x07, - 0x79, 0xce, 0xde, 0x2d, 0xe6, 0x39, 0x7b, 0xb7, 0x92, 0xe7, 0xc8, 0x9d, - 0xe0, 0xab, 0xd6, 0xbb, 0x65, 0xdc, 0xa4, 0x00, 0xb7, 0x03, 0x5b, 0xc4, - 0xed, 0xc0, 0x56, 0x70, 0x93, 0x3a, 0xcd, 0xbf, 0x40, 0x8c, 0x35, 0x10, - 0xdb, 0xe0, 0xd7, 0x86, 0xfa, 0x59, 0x7f, 0x80, 0xa3, 0x8f, 0xeb, 0xef, - 0x8b, 0xa7, 0x18, 0xe0, 0xf9, 0xd8, 0x16, 0xf1, 0x7c, 0x6c, 0x2b, 0x78, - 0x8a, 0x9d, 0x26, 0xe3, 0x28, 0xc3, 0xd7, 0x70, 0x6d, 0x83, 0xd8, 0x3c, - 0x24, 0x87, 0xba, 0x2e, 0x87, 0x75, 0x0e, 0x03, 0x7c, 0x50, 0xaf, 0x46, - 0x4b, 0x4c, 0xcb, 0x46, 0xdf, 0x9d, 0x3a, 0x4b, 0x32, 0x5b, 0xa5, 0x4a, - 0x83, 0xef, 0x95, 0xfb, 0xb0, 0x0f, 0xf7, 0xf1, 0x37, 0x2a, 0x8b, 0x64, - 0xc4, 0xf7, 0xe7, 0x9a, 0x77, 0xa7, 0xf5, 0x2a, 0x68, 0x9d, 0x0a, 0x69, - 0xad, 0xf8, 0xb9, 0xe0, 0xbe, 0x4d, 0xb9, 0x60, 0x40, 0xe3, 0x08, 0x68, - 0x2c, 0x86, 0x34, 0x3e, 0xdd, 0x60, 0xda, 0xf6, 0xf9, 0xb4, 0x2d, 0x6d, - 0xa2, 0x6d, 0xe4, 0x9e, 0xf9, 0x1f, 0xe3, 0x81, 0x5a, 0x1a, 0xb9, 0xd7, - 0x6b, 0x4d, 0xd4, 0xd2, 0x4d, 0xd4, 0xd2, 0xd0, 0xf7, 0x57, 0x9b, 0xa8, - 0xa5, 0x9b, 0xa8, 0xa5, 0x61, 0x07, 0xaf, 0xc0, 0x56, 0x82, 0x3b, 0xdc, - 0x12, 0x71, 0x0d, 0xee, 0xd7, 0xe3, 0x14, 0xe4, 0x39, 0x05, 0xc4, 0xf0, - 0xa3, 0xc8, 0xf1, 0xd8, 0x6e, 0x4f, 0x13, 0xc7, 0x04, 0x3d, 0x87, 0x9a, - 0x2f, 0x5b, 0x25, 0x33, 0x5e, 0x9c, 0x1f, 0x50, 0x97, 0x02, 0xfb, 0xd6, - 0x5a, 0xc4, 0x71, 0x70, 0x20, 0x85, 0x08, 0xa9, 0xb2, 0x5f, 0xb0, 0x73, - 0x4c, 0xe7, 0x76, 0xf0, 0x10, 0xbe, 0xdb, 0x60, 0x1f, 0xc6, 0xbe, 0xb4, - 0x4e, 0x0b, 0x8d, 0xf0, 0x1b, 0x9a, 0xcc, 0xfd, 0xfc, 0xce, 0x31, 0xb7, - 0xcf, 0xf7, 0x69, 0x76, 0xb6, 0x0f, 0x71, 0x80, 0xfb, 0x15, 0xf8, 0x35, - 0xe8, 0xca, 0x52, 0x1b, 0x17, 0x19, 0xeb, 0x55, 0xaa, 0xcf, 0x07, 0x31, - 0x7c, 0xca, 0xe0, 0x38, 0x87, 0xf8, 0xbe, 0xc4, 0xdf, 0xb0, 0x10, 0xeb, - 0x97, 0xae, 0x68, 0x32, 0x6a, 0xc7, 0x3a, 0x7f, 0xa3, 0x1d, 0xec, 0xc3, - 0xf9, 0x1d, 0xfe, 0x1d, 0xed, 0x51, 0xff, 0xae, 0xcd, 0xa0, 0x23, 0xad, - 0x80, 0x16, 0xdb, 0xc8, 0xd0, 0xc8, 0x2c, 0xdf, 0x35, 0x51, 0x8f, 0x68, - 0xca, 0x54, 0x75, 0xf8, 0x7e, 0x68, 0xe3, 0xbb, 0x49, 0x76, 0x91, 0xeb, - 0x4f, 0x23, 0xb8, 0xff, 0x3c, 0xed, 0xbc, 0xc9, 0xf7, 0x9f, 0xe1, 0x3a, - 0x8d, 0xde, 0x70, 0x33, 0x34, 0x8e, 0xf8, 0x5a, 0x6c, 0x68, 0xf0, 0x6f, - 0xbe, 0x3c, 0x39, 0xa7, 0xad, 0xc6, 0x42, 0x99, 0x8e, 0x84, 0x32, 0xad, - 0x34, 0xd6, 0x80, 0xdf, 0x0d, 0xef, 0x8f, 0x43, 0x99, 0xee, 0x3a, 0x47, - 0xda, 0xd5, 0x1c, 0xcb, 0x95, 0x65, 0x19, 0xc8, 0x75, 0x7c, 0xb1, 0x24, - 0x14, 0x21, 0xd3, 0x51, 0x5f, 0xa6, 0x32, 0xc7, 0x05, 0xec, 0x95, 0x83, - 0xfc, 0xd9, 0x8f, 0xe1, 0xe9, 0xb0, 0x8c, 0xb9, 0xde, 0xe0, 0x58, 0x98, - 0xa4, 0x4b, 0x9b, 0xe4, 0x5c, 0xbc, 0xa7, 0x0e, 0xe7, 0xa9, 0xff, 0x9c, - 0x16, 0xde, 0x9b, 0x66, 0x21, 0xc7, 0x76, 0x2e, 0xf6, 0x23, 0x81, 0x8c, - 0xf6, 0x9d, 0x6e, 0xbb, 0xef, 0xe5, 0x4d, 0x7d, 0xed, 0x67, 0x9b, 0x56, - 0xc4, 0xb7, 0x0d, 0xde, 0xf3, 0x1d, 0xe4, 0x9d, 0x7e, 0xc9, 0x1f, 0x53, - 0x31, 0xd6, 0x4b, 0x85, 0x25, 0x83, 0xac, 0x16, 0xcf, 0x91, 0x49, 0x34, - 0xda, 0x72, 0xea, 0xa4, 0xf5, 0x30, 0xc6, 0x2d, 0x34, 0x3c, 0xef, 0xa7, - 0xd0, 0x9d, 0x8b, 0x5c, 0x77, 0x3b, 0xbf, 0xf1, 0xd6, 0x93, 0xc8, 0x21, - 0x37, 0xce, 0xfc, 0xe6, 0xfd, 0xd4, 0xa5, 0xab, 0x88, 0x09, 0x74, 0xc6, - 0x09, 0x51, 0x22, 0x1e, 0xe7, 0x3e, 0xfe, 0x06, 0xef, 0x79, 0x17, 0x8d, - 0x3b, 0x78, 0x75, 0x99, 0xc7, 0x69, 0xdf, 0x39, 0xf6, 0xff, 0x3f, 0xd0, - 0x2e, 0x1a, 0xd6, 0x9e, 0x38, 0xf2, 0xe7, 0xeb, 0xc4, 0xb1, 0x4f, 0x4e, - 0x14, 0x9b, 0xba, 0x7a, 0x09, 0x6b, 0x8b, 0x8e, 0xc2, 0xdf, 0xd6, 0xf9, - 0xfb, 0xa8, 0x76, 0x89, 0xda, 0xf7, 0x65, 0x90, 0xa7, 0xa3, 0xf2, 0x77, - 0x52, 0xb5, 0x8a, 0xd8, 0x52, 0x70, 0x92, 0x98, 0xaf, 0x62, 0x2e, 0xc7, - 0x05, 0x8f, 0x14, 0xd8, 0x50, 0xc1, 0x49, 0x27, 0xc6, 0x9a, 0x9e, 0xa7, - 0x7c, 0x5e, 0xa0, 0x87, 0x32, 0x29, 0x1a, 0x73, 0xf8, 0xfe, 0xf7, 0x9b, - 0xf4, 0x36, 0xec, 0xac, 0x78, 0x9e, 0x6b, 0x26, 0xf6, 0x29, 0x78, 0x77, - 0xf8, 0xbe, 0xea, 0x14, 0x3d, 0xb4, 0x47, 0xcf, 0x5e, 0x22, 0xe0, 0xb3, - 0x42, 0xfd, 0x48, 0x72, 0x53, 0xc7, 0xfd, 0xef, 0x6d, 0x8c, 0x6b, 0x9a, - 0x96, 0xc0, 0x1b, 0xa7, 0x99, 0xa4, 0x95, 0x66, 0x8a, 0x56, 0xa1, 0x1f, - 0xdb, 0xcc, 0x32, 0x7d, 0x03, 0x78, 0x2b, 0x66, 0x95, 0x94, 0x8c, 0xb5, - 0xaf, 0x0b, 0x78, 0x67, 0x05, 0x3d, 0x15, 0x17, 0x18, 0x77, 0x5d, 0x2d, - 0x03, 0x6f, 0xd6, 0xd1, 0x51, 0xa7, 0x9b, 0x8e, 0x61, 0xed, 0x7e, 0xe4, - 0x1f, 0xdf, 0x72, 0xa8, 0x2c, 0x99, 0x29, 0x3a, 0x80, 0xf3, 0x8e, 0x36, - 0x38, 0x57, 0x3b, 0x02, 0x5f, 0x23, 0xd0, 0xa3, 0x19, 0x8f, 0x1e, 0xdd, - 0xa3, 0x5b, 0x71, 0x01, 0x7b, 0xae, 0xb0, 0x9e, 0xa0, 0xdf, 0x09, 0xce, - 0x8d, 0xad, 0xf8, 0xba, 0x08, 0x7f, 0xfa, 0x0c, 0x65, 0xce, 0xad, 0xe5, - 0xa6, 0x90, 0x9f, 0x8f, 0x36, 0xe9, 0x8b, 0x31, 0x9c, 0xf7, 0x36, 0xf8, - 0x34, 0xea, 0xc8, 0x02, 0xf3, 0xe9, 0x58, 0xc0, 0x27, 0x8c, 0xf1, 0xb7, - 0x23, 0xce, 0xd1, 0xf8, 0xec, 0x13, 0x74, 0xb6, 0xc1, 0x77, 0xdd, 0x27, - 0xe8, 0x4a, 0xe3, 0x11, 0xba, 0x98, 0xe3, 0x5c, 0x07, 0xfb, 0xf8, 0x67, - 0xa0, 0xcf, 0x3f, 0xa3, 0x9b, 0x8e, 0xfb, 0x72, 0xfa, 0x3f, 0xc3, 0x06, - 0xd0, 0x70, 0x4c, 0x57, 0x00, 0x00, 0x00 }; +static u32 bnx2_TXP_b06FwText[(0x5748/4) + 1] = { + 0x0a000d2c, 0x00000000, 0x00000000, 0x0000000d, 0x74787020, 0x322e352e, + 0x38000000, 0x02050800, 0x0000000a, 0x000003e8, 0x0000ea60, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c020800, + 0x24425760, 0x3c030800, 0x24635964, 0xac400000, 0x0043202b, 0x1480fffd, + 0x24420004, 0x3c1d0800, 0x37bd7ffc, 0x03a0f021, 0x3c100800, 0x261034b0, + 0x3c1c0800, 0x279c5760, 0x0e000f5b, 0x00000000, 0x0000000d, 0x8f840014, + 0x27bdffe8, 0xafb10014, 0xafb00010, 0x8f460104, 0x8f830008, 0x8c8500ac, + 0xaf430080, 0x948200a8, 0xa7420e10, 0x948300aa, 0xa7430e12, 0x8c8200ac, + 0xaf420e18, 0x97430e10, 0xa7430e14, 0x97420e12, 0x00008021, 0xa7420e16, + 0x8f430e18, 0x00006021, 0x00c53023, 0xaf430e1c, 0x10c001a2, 0x2d820001, + 0x3c0e1000, 0x2419fff8, 0x24110010, 0x240f0f00, 0x3c188100, 0x93620008, + 0x10400009, 0x00000000, 0x97620010, 0x00c2102b, 0x14400005, 0x00000000, + 0x97620010, 0x3042ffff, 0x0a000d6d, 0xaf420e00, 0xaf460e00, 0x8f420000, + 0x30420008, 0x1040fffd, 0x00000000, 0x97420e08, 0x8f450e04, 0x3044ffff, + 0x30820001, 0x14400005, 0x00000000, 0x14a00005, 0x3083a040, 0x0a000f34, + 0x00000000, 0x0000000d, 0x3083a040, 0x24020040, 0x1462004f, 0x3082a000, + 0x308a0036, 0x8f88000c, 0x30890008, 0x24020800, 0xaf420178, 0x01001821, + 0x9742008a, 0x00431023, 0x2442ffff, 0x30421fff, 0x2c420008, 0x1440fffa, + 0x00a06021, 0x8f820018, 0x00cc3023, 0x24070001, 0x8f830008, 0x304b00ff, + 0x24420001, 0xaf820018, 0x25024000, 0x106f0005, 0x03422021, 0x93820012, + 0x30420007, 0x00021240, 0x34470001, 0x000b1400, 0x3c030100, 0x00431025, + 0xac820000, 0x8f830018, 0x00ea3825, 0x1120000f, 0xac830004, 0x97430e0a, + 0x8f84000c, 0x00ee3825, 0x2402000e, 0x00781825, 0xaf430160, 0x25830006, + 0x24840008, 0x30841fff, 0xa742015a, 0xa7430158, 0xaf84000c, 0x0a000db7, + 0x00000000, 0x8f83000c, 0x25820002, 0xa7420158, 0x24630008, 0x30631fff, + 0xaf83000c, 0x54c0000f, 0x8f420e14, 0x8f820008, 0x504f0002, 0x24100001, + 0x34e70040, 0x97420e10, 0x97430e12, 0x8f850014, 0x00021400, 0x00621825, + 0xaca300a8, 0x8f840014, 0x8f420e18, 0xac8200ac, 0x8f420e14, 0x8f430e1c, + 0xaf420144, 0xaf430148, 0xa34b0152, 0xaf470154, 0x0a000efb, 0xaf4e0178, + 0x10400165, 0x00000000, 0x93620008, 0x50400008, 0xafa60008, 0x97620010, + 0x00a2102b, 0x10400003, 0x30820040, 0x1040015c, 0x00000000, 0xafa60008, + 0xa7840010, 0xaf850004, 0x93620008, 0x1440005f, 0x27ac0008, 0xaf60000c, + 0x97820010, 0x30424000, 0x10400002, 0x2403000e, 0x24030016, 0xa363000a, + 0x24034007, 0xaf630014, 0x93820012, 0x8f630014, 0x30420007, 0x00021240, + 0x00621825, 0xaf630014, 0x97820010, 0x8f630014, 0x30420010, 0x00621825, + 0xaf630014, 0x97820010, 0x30420008, 0x5040000e, 0x00002821, 0x8f620014, + 0x004e1025, 0xaf620014, 0x97430e0a, 0x2402000e, 0x00781825, 0xaf630004, + 0xa3620002, 0x9363000a, 0x3405fffc, 0x24630004, 0x0a000e06, 0xa363000a, + 0xaf600004, 0xa3600002, 0x97820010, 0x9363000a, 0x30421f00, 0x00021182, + 0x24420028, 0x00621821, 0xa3630009, 0x97420e0c, 0xa7620010, 0x93630009, + 0x24020008, 0x24630002, 0x30630007, 0x00431023, 0x30420007, 0xa362000b, + 0x93640009, 0x97620010, 0x8f890004, 0x97830010, 0x00441021, 0x00a21021, + 0x30630040, 0x10600007, 0x3045ffff, 0x00a9102b, 0x14400005, 0x0125102b, + 0x3c068000, 0x0a000e3a, 0x00005821, 0x0125102b, 0x544000c7, 0x00006021, + 0x97420e14, 0xa7420e10, 0x97430e16, 0xa7430e12, 0x8f420e1c, 0xaf420e18, + 0xaf450e00, 0x8f420000, 0x30420008, 0x1040fffd, 0x00000000, 0x97420e08, + 0x00a04821, 0xa7820010, 0x8f430e04, 0x00003021, 0x240b0001, 0xaf830004, + 0x97620010, 0x0a000e4c, 0x304dffff, 0x8f890004, 0x97820010, 0x30420040, + 0x10400004, 0x01206821, 0x3c068000, 0x0a000e4c, 0x00005821, 0x97630010, + 0x8f820004, 0x10430003, 0x00003021, 0x0a000eee, 0x00006021, 0x240b0001, + 0x8d820000, 0x00491023, 0x1440000d, 0xad820000, 0x8f620014, 0x34420040, + 0xaf620014, 0x97430e10, 0x97420e12, 0x8f840014, 0x00031c00, 0x00431025, + 0xac8200a8, 0x8f830014, 0x8f420e18, 0xac6200ac, 0x93620008, 0x1440003e, + 0x00000000, 0x25260002, 0x8f84000c, 0x9743008a, 0x3063ffff, 0xafa30000, + 0x8fa20000, 0x00441023, 0x2442ffff, 0x30421fff, 0x2c420010, 0x1440fff7, + 0x00000000, 0x8f82000c, 0x8f830018, 0x00021082, 0x00021080, 0x24424000, + 0x03422821, 0x00605021, 0x24630001, 0x314200ff, 0x00021400, 0xaf830018, + 0x3c033200, 0x00431025, 0xaca20000, 0x93630009, 0x9362000a, 0x00031c00, + 0x00431025, 0xaca20004, 0x8f830018, 0xaca30008, 0x97820010, 0x30420008, + 0x10400002, 0x00c04021, 0x25280006, 0x97430e14, 0x93640002, 0x8f450e1c, + 0x8f660004, 0x8f670014, 0x3063ffff, 0xa7430144, 0x97420e16, 0xa7420146, + 0xaf450148, 0xa34a0152, 0x8f82000c, 0x308400ff, 0xa744015a, 0xaf460160, + 0xa7480158, 0xaf470154, 0xaf4e0178, 0x00511021, 0x30421fff, 0xaf82000c, + 0x0a000ed9, 0x8d820000, 0x93620009, 0x9363000b, 0x8f85000c, 0x2463000a, + 0x00435021, 0x25440007, 0x00992024, 0x9743008a, 0x3063ffff, 0xafa30000, + 0x8fa20000, 0x00451023, 0x2442ffff, 0x30421fff, 0x0044102b, 0x1440fff7, + 0x00000000, 0x8f82000c, 0x8f840018, 0x00021082, 0x00021080, 0x24424000, + 0x03422821, 0x00804021, 0x24840001, 0xaf840018, 0x93630009, 0x310200ff, + 0x00022400, 0x3c024100, 0x24630002, 0x00621825, 0x00832025, 0xaca40000, + 0x8f62000c, 0x00461025, 0xaca20004, 0x97430e14, 0x93640002, 0x8f450e1c, + 0x8f660004, 0x8f670014, 0x3063ffff, 0xa7430144, 0x97420e16, 0x308400ff, + 0xa7420146, 0xaf450148, 0xa3480152, 0x8f83000c, 0x25420007, 0x00591024, + 0xa744015a, 0xaf460160, 0xa7490158, 0xaf470154, 0xaf4e0178, 0x00621821, + 0x30631fff, 0xaf83000c, 0x8d820000, 0x14400005, 0x00000000, 0x8f620014, + 0x2403ffbf, 0x00431024, 0xaf620014, 0x8f62000c, 0x004d1021, 0xaf62000c, + 0x93630008, 0x14600008, 0x00000000, 0x11600006, 0x00000000, 0x8f630014, + 0x3c02efff, 0x3442fffe, 0x00621824, 0xaf630014, 0xa36b0008, 0x01206021, + 0x1580000c, 0x8fa60008, 0x97420e14, 0x97430e16, 0x8f850014, 0x00021400, + 0x00621825, 0xaca300a8, 0x8f840014, 0x8f420e1c, 0xac8200ac, 0x0a000efd, + 0x2d820001, 0x14c0fe65, 0x2d820001, 0x00501025, 0x10400058, 0x24020f00, + 0x8f830008, 0x14620023, 0x3c048000, 0x11800009, 0x3c038000, 0x97420e08, + 0x30420040, 0x14400005, 0x00000000, 0x0000000d, 0x00000000, 0x2400032c, + 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, 0x00000000, 0x97420e10, + 0x3c030500, 0x00431025, 0xaf42014c, 0x97430e14, 0xa7430144, 0x97420e16, + 0xa7420146, 0x8f430e1c, 0x24022000, 0xaf430148, 0x3c031000, 0xa3400152, + 0xa740015a, 0xaf400160, 0xa7400158, 0xaf420154, 0xaf430178, 0x8f830008, + 0x3c048000, 0x8f420178, 0x00441024, 0x1440fffd, 0x24020f00, 0x10620016, + 0x00000000, 0x97420e14, 0xa7420144, 0x97430e16, 0xa7430146, 0x8f420e1c, + 0x3c031000, 0xaf420148, 0x0a000f51, 0x24020240, 0x97420e14, 0x97430e16, + 0x8f840014, 0x00021400, 0x00621825, 0xac8300a8, 0x8f850014, 0x8f420e1c, + 0x00006021, 0xaca200ac, 0x0a000efd, 0x2d820001, 0xaf40014c, 0x11800007, + 0x00000000, 0x97420e10, 0xa7420144, 0x97430e12, 0xa7430146, 0x0a000f4e, + 0x8f420e18, 0x97420e14, 0xa7420144, 0x97430e16, 0xa7430146, 0x8f420e1c, + 0xaf420148, 0x24020040, 0x3c031000, 0xa3400152, 0xa740015a, 0xaf400160, + 0xa7400158, 0xaf420154, 0xaf430178, 0x8fb10014, 0x8fb00010, 0x03e00008, + 0x27bd0018, 0x27bdffd0, 0x3c1a8000, 0x3c0420ff, 0x3484fffd, 0x3c020008, + 0x03421821, 0xafbf002c, 0xafb60028, 0xafb50024, 0xafb40020, 0xafb3001c, + 0xafb20018, 0xafb10014, 0xafb00010, 0xaf830014, 0xaf440e00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3c0200ff, 0x3442fffd, + 0x3c046004, 0xaf420e00, 0x8c835000, 0x24160800, 0x24150d00, 0x3c140800, + 0x24130f00, 0x3c120800, 0x3c114000, 0x2402ff7f, 0x00621824, 0x3463380c, + 0x24020009, 0xac835000, 0xaf420008, 0xaf800018, 0xaf80000c, 0x0e001559, + 0x00000000, 0x0e000ff0, 0x00000000, 0x3c020800, 0x245057c0, 0x8f420000, + 0x30420001, 0x1040fffd, 0x00000000, 0x8f440100, 0xaf840008, 0xaf440020, + 0xaf560178, 0x93430108, 0xa3830012, 0x93820012, 0x30420001, 0x10400008, + 0x00000000, 0x93820012, 0x30420006, 0x00021100, 0x0e000d43, 0x0050d821, + 0x0a000fac, 0x00000000, 0x14950005, 0x00000000, 0x0e000d43, 0x269b5840, + 0x0a000fac, 0x00000000, 0x14930005, 0x00000000, 0x0e000d43, 0x265b5860, + 0x0a000fac, 0x00000000, 0x0e0010ea, 0x00000000, 0xaf510138, 0x0a000f89, + 0x00000000, 0x27bdfff8, 0x3084ffff, 0x24820007, 0x3044fff8, 0x8f85000c, + 0x9743008a, 0x3063ffff, 0xafa30000, 0x8fa20000, 0x00451023, 0x2442ffff, + 0x30421fff, 0x0044102b, 0x1440fff7, 0x00000000, 0x8f82000c, 0x00021082, + 0x00021080, 0x24424000, 0x03421021, 0x03e00008, 0x27bd0008, 0x3084ffff, + 0x8f82000c, 0x24840007, 0x3084fff8, 0x00441021, 0x30421fff, 0xaf82000c, + 0x03e00008, 0x00000000, 0x27bdffe8, 0x3c1a8000, 0x3c0420ff, 0x3484fffd, + 0x3c020008, 0x03421821, 0xafbf0010, 0xaf830014, 0xaf440e00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3c0200ff, 0x3442fffd, + 0x3c046004, 0xaf420e00, 0x8c825000, 0x2403ff7f, 0x00431024, 0x3442380c, + 0x24030009, 0xac825000, 0xaf430008, 0xaf800018, 0xaf80000c, 0x0e001559, + 0x00000000, 0x0e000ff0, 0x00000000, 0x8fbf0010, 0x03e00008, 0x27bd0018, + 0x27bdffe8, 0x3c02000a, 0x03421821, 0x3c040800, 0x24845880, 0x24050019, + 0xafbf0010, 0xaf830024, 0x0e001565, 0x00003021, 0x3c050800, 0x3c020800, + 0x24425330, 0xaca258e8, 0x24a558e8, 0x3c020800, 0x244254f8, 0x3c030800, + 0x2463550c, 0x3c040800, 0xaca20004, 0x3c020800, 0x24425338, 0xaca30008, + 0xac825900, 0x24845900, 0x3c020800, 0x244253c4, 0x3c070800, 0x24e75404, + 0x3c060800, 0x24c65520, 0x3c050800, 0x24a55438, 0x3c030800, 0xac820004, + 0x3c020800, 0x24425528, 0xac870008, 0xac86000c, 0xac850010, 0xac625920, + 0x24635920, 0x8fbf0010, 0x3c020800, 0x24425540, 0xac620004, 0x3c020800, + 0xac670008, 0xac66000c, 0xac650010, 0xac400048, 0x03e00008, 0x27bd0018, + 0x974309da, 0x00804021, 0xad030000, 0x8f4209dc, 0xad020004, 0x8f4309e0, + 0xad030008, 0x934409d9, 0x24020001, 0x30840003, 0x1082001f, 0x30a900ff, + 0x28820002, 0x10400005, 0x24020002, 0x10800009, 0x3c0a0800, 0x0a001078, + 0x93420934, 0x1082000b, 0x24020003, 0x10820026, 0x3c0a0800, 0x0a001078, + 0x93420934, 0x974209e4, 0x00021400, 0x34420800, 0xad02000c, 0x0a001077, + 0x25080010, 0x974209e4, 0x00021400, 0x34428100, 0xad02000c, 0x974309e8, + 0x3c0a0800, 0x00031c00, 0x34630800, 0xad030010, 0x0a001077, 0x25080014, + 0x974409e4, 0x3c050800, 0x24a25880, 0x9443001c, 0x94460014, 0x94470010, + 0x00a05021, 0x24020800, 0xad000010, 0xad020014, 0x00042400, 0x00661821, + 0x00671823, 0x2463fff2, 0x00832025, 0xad04000c, 0x0a001077, 0x25080018, + 0x974209e4, 0x3c050800, 0x00021400, 0x34428100, 0xad02000c, 0x974409e8, + 0x24a25880, 0x9443001c, 0x94460014, 0x94470010, 0x00a05021, 0x24020800, + 0xad000014, 0xad020018, 0x00042400, 0x00661821, 0x00671823, 0x2463ffee, + 0x00832025, 0xad040010, 0x2508001c, 0x93420934, 0x93450921, 0x3c074000, + 0x25445880, 0x94830018, 0x94860014, 0x00021082, 0x00021600, 0x00052c00, + 0x00a72825, 0x00451025, 0x00661821, 0x00431025, 0xad020000, 0x9783002c, + 0x974209ea, 0x00621821, 0x00031c00, 0xad030004, 0x9782002c, 0x24420001, + 0x30427fff, 0xa782002c, 0x93430920, 0x3c020006, 0x00031e00, 0x00621825, + 0xad030008, 0x8f42092c, 0xad02000c, 0x8f430930, 0xad030010, 0x8f440938, + 0x25080014, 0xad040000, 0x8f820020, 0x11200004, 0xad020004, 0x8f420940, + 0x0a0010a1, 0x2442ffff, 0x8f420940, 0xad020008, 0x8f440948, 0x8f420940, + 0x93430936, 0x00823023, 0x00663006, 0x3402ffff, 0x0046102b, 0x54400001, + 0x3406ffff, 0x93420937, 0x25445880, 0x90830024, 0xad000010, 0x00021700, + 0x34630010, 0x00031c00, 0x00431025, 0x00461025, 0xad02000c, 0x8c830008, + 0x14600031, 0x25080014, 0x3c020800, 0x8c430048, 0x1060002d, 0x00000000, + 0x9342010b, 0xad020000, 0x8f830000, 0x8c6200b0, 0xad020004, 0x8f830000, + 0x8c6200b4, 0xad020008, 0x8f830000, 0x8c6200c0, 0xad02000c, 0x8f830000, + 0x8c6200c4, 0xad020010, 0x8f830000, 0x8c6200c8, 0xad020014, 0x8f830000, + 0x8c6200cc, 0xad020018, 0x8f830000, 0x8c6200e0, 0xad02001c, 0x8f830000, + 0x8c6200e8, 0xad020020, 0x8f830000, 0x8c6200f0, 0x3c04600e, 0xad020024, + 0x8c8200d0, 0xad020028, 0x8c8300d4, 0xad03002c, 0x8f820028, 0x3c046012, + 0xad020030, 0x8c8200a8, 0xad020034, 0x8c8300ac, 0x3c026000, 0xad030038, + 0x8c434448, 0xad03003c, 0x03e00008, 0x01001021, 0x27bdffa8, 0x3c020008, + 0x03423021, 0xafbf0054, 0xafbe0050, 0xafb7004c, 0xafb60048, 0xafb50044, + 0xafb40040, 0xafb3003c, 0xafb20038, 0xafb10034, 0xafb00030, 0xaf860000, + 0x24020040, 0xaf420814, 0xaf400810, 0x8f420944, 0x8f430950, 0x8f440954, + 0x8f45095c, 0xaf820034, 0xaf830020, 0xaf84001c, 0xaf850030, 0x90c20000, + 0x24030020, 0x304400ff, 0x10830005, 0x24020030, 0x10820022, 0x3c030800, + 0x0a001139, 0x8c62002c, 0x24020088, 0xaf420818, 0x3c020800, 0x244258e8, + 0xafa20020, 0x93430109, 0x3c020800, 0x10600009, 0x24575900, 0x3c026000, + 0x24030100, 0xac43081c, 0x3c030001, 0xac43081c, 0x0000000d, 0x00000000, + 0x24000376, 0x9342010a, 0x30420080, 0x14400021, 0x24020800, 0x3c026000, + 0x24030100, 0xac43081c, 0x3c030001, 0xac43081c, 0x0000000d, 0x00000000, + 0x2400037d, 0x0a001141, 0x24020800, 0x93430109, 0x3063007f, 0x00031140, + 0x000318c0, 0x00431021, 0x24430088, 0xaf430818, 0x0000000d, 0x3c020800, + 0x24425940, 0x3c030800, 0x24775950, 0x0a001140, 0xafa20020, 0x24420001, + 0xac62002c, 0x0000000d, 0x00000000, 0x24000395, 0x0a0014c1, 0x8fbf0054, + 0x24020800, 0xaf420178, 0x8f450104, 0x8f420988, 0x00a21023, 0x58400005, + 0x8f4309a0, 0x0000000d, 0x00000000, 0x240003b1, 0x8f4309a0, 0x3c100800, + 0xae0358b0, 0x8f4209a4, 0x8f830020, 0x260458b0, 0x2491ffd0, 0xae220034, + 0x00a21023, 0xae230028, 0xac82ffd0, 0x8fa30020, 0x8c620000, 0x0040f809, + 0x0200b021, 0x00409021, 0x32440010, 0x32420002, 0x10400007, 0xafa40024, + 0x8e220020, 0x32530040, 0x2403ffbf, 0x00431024, 0x0a001493, 0xae220020, + 0x32420020, 0x10400002, 0x3c020800, 0x24575920, 0x32420001, 0x14400007, + 0x00000000, 0x8f820008, 0xaf420080, 0x8ec358b0, 0xaf430e10, 0x8e220034, + 0xaf420e18, 0x9343010b, 0x93420905, 0x30420008, 0x1040003c, 0x307400ff, + 0x8f820000, 0x8c430074, 0x0460000a, 0x00000000, 0x3c026000, 0x24030100, + 0xac43081c, 0x3c030001, 0xac43081c, 0x0000000d, 0x00000000, 0x240003ed, + 0x8f820000, 0x9044007b, 0x9343010a, 0x14830027, 0x32530040, 0x00003821, + 0x24052000, 0x3c090800, 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, + 0x8ec258b0, 0x26c458b0, 0x2484ffd0, 0xaf420144, 0x8c820034, 0x3c030100, + 0xaf420148, 0x24020047, 0xaf43014c, 0xa3420152, 0x8d230030, 0x3c021000, + 0xa7470158, 0xaf450154, 0xaf420178, 0x8c860034, 0x24630001, 0xad230030, + 0x9342010a, 0x3c030047, 0xafa50014, 0x00021600, 0x00431025, 0x00471025, + 0xafa20010, 0x9343010b, 0xafa30018, 0x8f440100, 0x8f450104, 0x0e00159b, + 0x3c070100, 0x3c050800, 0x24a25880, 0x0a001250, 0x8c430020, 0x32820002, + 0x10400050, 0x00000000, 0x0e0015b9, 0x32530040, 0x3c039000, 0x34630001, + 0x8f820008, 0x3c048000, 0x00431025, 0xaf420020, 0x8f420020, 0x00441024, + 0x1440fffd, 0x00000000, 0x8f830000, 0x90620005, 0x34420008, 0xa0620005, + 0x8f840000, 0x8c820074, 0x3c038000, 0x00431025, 0xac820074, 0x90830000, + 0x24020020, 0x10620004, 0x00000000, 0x0000000d, 0x00000000, 0x2400040b, + 0x8f830008, 0x3c028000, 0x34420001, 0x00621825, 0xaf430020, 0x9084007b, + 0x9342010a, 0x14820028, 0x3c030800, 0x00003821, 0x24052000, 0x3c090800, + 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, 0x8ec258b0, 0x26c458b0, + 0x2484ffd0, 0xaf420144, 0x8c820034, 0x3c030100, 0xaf420148, 0x24020046, + 0xaf43014c, 0xa3420152, 0x8d230030, 0x3c021000, 0xa7470158, 0xaf450154, + 0xaf420178, 0x8c860034, 0x24630001, 0xad230030, 0x9342010a, 0x3c030046, + 0xafa50014, 0x00021600, 0x00431025, 0x00471025, 0xafa20010, 0x9343010b, + 0xafa30018, 0x8f440100, 0x8f450104, 0x0e00159b, 0x3c070100, 0x3c030800, + 0x24625880, 0x0a001250, 0x8c430020, 0x93420108, 0x30420010, 0x50400056, + 0x9343093f, 0x8f860000, 0x90c2007f, 0x8cc30178, 0x304800ff, 0x15030004, + 0x00000000, 0x0000000d, 0x00000000, 0x24000425, 0x90c2007e, 0x90c40080, + 0x00081c00, 0x00021600, 0x00431025, 0x00042200, 0x90c3007a, 0x90c5000a, + 0x00441025, 0x11050028, 0x00623825, 0xa0c8000a, 0x00004021, 0x24056000, + 0x3c090800, 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, 0x8ec258b0, + 0x26c458b0, 0x2484ffd0, 0xaf420144, 0x8c820034, 0xaf420148, 0x24020052, + 0xaf47014c, 0xa3420152, 0x8d230030, 0x3c021000, 0xa7480158, 0xaf450154, + 0xaf420178, 0x8c860034, 0x24630001, 0xad230030, 0x9342010a, 0x3c030052, + 0xafa50014, 0x00021600, 0x00431025, 0x00481025, 0xafa20010, 0x9343010b, + 0xafa30018, 0x8f440100, 0x0e00159b, 0x8f450104, 0x0a00124a, 0x00000000, + 0x3c026000, 0x24030100, 0xac43081c, 0x3c030001, 0xac43081c, 0x0000000d, + 0x00000000, 0x2400043e, 0x16800009, 0x3c050800, 0x3c040800, 0x24825880, + 0x8c430020, 0x32530040, 0x2404ffbf, 0x00641824, 0x0a001493, 0xac430020, + 0x8ca25880, 0x10400005, 0x3c030800, 0x8c620034, 0xaca05880, 0x24420001, + 0xac620034, 0x9343093f, 0x24020012, 0x5462000e, 0x97420908, 0x32820038, + 0x14400009, 0x3c030800, 0x8f830000, 0x8c62004c, 0xac62005c, 0x3c020800, + 0x24445880, 0x8c820020, 0x0a001285, 0x32530040, 0xac605880, 0x97420908, + 0x5440001c, 0x97420908, 0x3c039000, 0x34630001, 0x8f820008, 0x32530040, + 0x3c048000, 0x00431025, 0xaf420020, 0x8f420020, 0x00441024, 0x1440fffd, + 0x3c028000, 0x8f840000, 0x8f850008, 0x8c830050, 0x34420001, 0x00a22825, + 0xaf830020, 0xac830070, 0xac83005c, 0xaf450020, 0x3c050800, 0x24a45880, + 0x8c820020, 0x2403ffbf, 0x00431024, 0x0a001493, 0xac820020, 0x000211c0, + 0xaf420024, 0x97420908, 0x3c030080, 0x34630003, 0x000211c0, 0xaf42080c, + 0xaf43081c, 0x974209ec, 0x8f4309a4, 0xa782002c, 0x3c020800, 0x24445880, + 0xac83002c, 0x93420937, 0x93430934, 0x00021080, 0x00621821, 0xa4830018, + 0x934209d8, 0x32850038, 0xafa50028, 0x00621821, 0xa483001a, 0x934209d8, + 0x93430934, 0x3c1e0800, 0x00809821, 0x00431021, 0x24420010, 0xa4820016, + 0x24020006, 0xae620020, 0x8fa20028, 0x10400003, 0x0000a821, 0x0a0012f0, + 0x24120008, 0x8f420958, 0x8f830020, 0x8f840030, 0x00431023, 0x00832023, + 0x04800003, 0xae620004, 0x04410003, 0x0082102b, 0x0a0012bc, 0xae600004, + 0x54400001, 0xae640004, 0x8ee20000, 0x0040f809, 0x00000000, 0x00409021, + 0x32420001, 0x5440001e, 0x8ee20004, 0x8e630008, 0x1060002b, 0x3c02c000, + 0x00621025, 0xaf420e00, 0x8f420000, 0x30420008, 0x1040fffd, 0x00000000, + 0x97420e08, 0xa7820010, 0x8f430e04, 0x8e620008, 0xaf830004, 0x8f840004, + 0x0044102b, 0x1040000b, 0x24150001, 0x24020100, 0x3c016000, 0xac22081c, + 0x3c020001, 0x3c016000, 0xac22081c, 0x0000000d, 0x00000000, 0x240004cd, + 0x24150001, 0x8ee20004, 0x0040f809, 0x00000000, 0x02429025, 0x32420002, + 0x5040001d, 0x8f470940, 0x12a00006, 0x8ec258b0, 0x8f830000, 0xac6200a8, + 0x8f840000, 0x8e620034, 0xac8200ac, 0x32420004, 0x50400013, 0x8f470940, + 0x3c020800, 0x3283007d, 0x10600110, 0x24575920, 0x32820001, 0x50400006, + 0x36520002, 0x8f830034, 0x8f420940, 0x10620109, 0x00000000, 0x36520002, + 0x24020008, 0xa6600010, 0xa6620012, 0xae600008, 0xa2600024, 0x8f470940, + 0x3c030800, 0x24685880, 0x8d02002c, 0x8d050008, 0x95040010, 0x9506000a, + 0x95030026, 0x00451021, 0x00862021, 0x00641821, 0xaf870034, 0xad02002c, + 0x32820030, 0x10400008, 0xa5030014, 0x91020024, 0x32910040, 0x34420004, + 0xa1020024, 0xaf400048, 0x0a001345, 0x3c040800, 0x93420923, 0x30420002, + 0x10400029, 0x32910040, 0x8f830000, 0x8f840020, 0x8c620084, 0x00441023, + 0x0442000a, 0x3c039000, 0x95020014, 0x8c630084, 0x00821021, 0x00621823, + 0x1c600004, 0x3c039000, 0x91020024, 0x34420001, 0xa1020024, 0x34630001, + 0x8f820008, 0x32910040, 0x3c048000, 0x00431025, 0xaf420020, 0x8f420020, + 0x00441024, 0x1440fffd, 0x00000000, 0x8f840000, 0x9083003f, 0x2402000a, + 0x10620005, 0x2402000c, 0x9083003f, 0x24020008, 0x14620002, 0x24020014, + 0xa082003f, 0x8f830008, 0x3c028000, 0x34420001, 0x00621825, 0xaf430020, + 0x3c040800, 0x24865880, 0x94c20010, 0x94c3001a, 0x8cc40008, 0x00432821, + 0x14800006, 0xa4c5001c, 0x3c020800, 0x8c430048, 0x10600002, 0x24a20040, + 0xa4c2001c, 0x27d05880, 0x9604001c, 0x96020012, 0x00822021, 0x24840002, + 0x0e000faf, 0x3084ffff, 0x8f850018, 0x00a01821, 0xa2030025, 0x8ee60008, + 0x00402021, 0x24a50001, 0xaf850018, 0x00c0f809, 0x00000000, 0x00402021, + 0x0e001026, 0x02202821, 0x8ee3000c, 0x0060f809, 0x00402021, 0x9604001c, + 0x96020012, 0x00822021, 0x24840002, 0x0e000fc5, 0x3084ffff, 0x8fc25880, + 0x8e030008, 0x00431023, 0x14400012, 0xafc25880, 0x54600006, 0x8e020020, + 0x3243004a, 0x24020002, 0x14620005, 0x00000000, 0x8e020020, 0x34420040, + 0x0a001382, 0xae020020, 0x52a00006, 0x36520002, 0x8e020030, 0xaf420e10, + 0x8e030034, 0xaf430e18, 0x36520002, 0x52a00008, 0x96670014, 0x8f830000, + 0x8f420e10, 0xac6200a8, 0x8f840000, 0x8f420e18, 0xac8200ac, 0x96670014, + 0x92680024, 0x24020040, 0xaf420814, 0x8f830020, 0x8f82001c, 0x00671821, + 0x00621023, 0xaf830020, 0x18400008, 0x00000000, 0x8f820000, 0xaf83001c, + 0xac430054, 0x54e00005, 0xaf400040, 0x0a0013a0, 0x8f42095c, 0x54e00001, + 0xaf400044, 0x8f42095c, 0x31030008, 0xaf820030, 0x1060001a, 0x00000000, + 0x8f840000, 0x90820120, 0x90830121, 0x304600ff, 0x00c31823, 0x30630007, + 0x24020007, 0x1062000e, 0x00000000, 0x90820122, 0x304200fe, 0xa0820122, + 0x8f850000, 0x00061880, 0x8f840020, 0x24a20100, 0x00431021, 0x24c30001, + 0x30630007, 0xac440000, 0x0a0013bd, 0xa0a30120, 0x90820122, 0x34420001, + 0xa0820122, 0x14e00003, 0x31020001, 0x10400031, 0x32510002, 0x8f820000, + 0x8c43000c, 0x30630001, 0x1060002c, 0x32510002, 0x3c029000, 0x8f830008, + 0x34420001, 0x3c048000, 0x00621825, 0xaf430020, 0x8f420020, 0x00441024, + 0x1440fffd, 0x00000000, 0x8f870000, 0x8ce2000c, 0x30420001, 0x10400018, + 0x00000000, 0x94e2006a, 0x00022880, 0x50a00001, 0x24050001, 0x94e30068, + 0x90e40081, 0x3c020800, 0x8c460024, 0x00652821, 0x00852804, 0x00c5102b, + 0x54400001, 0x00a03021, 0x3c020800, 0x8c440028, 0x00c4182b, 0x54600001, + 0x00c02021, 0x8f430074, 0x2402fffe, 0x00822824, 0x00a31821, 0xace3000c, + 0x8f830008, 0x3c028000, 0x34420001, 0x00621825, 0xaf430020, 0x8f820020, + 0x3c050800, 0x24b05880, 0xae020028, 0x8ee30010, 0x0060f809, 0x00000000, + 0x8f820028, 0x24420001, 0xaf820028, 0x12a00005, 0xaf40004c, 0x8f420e10, + 0xae020030, 0x8f430e18, 0xae030034, 0x1220fea7, 0x24020006, 0x8f870024, + 0x9786002c, 0x8f830000, 0x8f820034, 0x8f840020, 0x8f85001c, 0x32530040, + 0xa4e6002c, 0xac620044, 0x32420008, 0xac640050, 0xac650054, 0x1040007a, + 0x32820020, 0x10400027, 0x32910010, 0x00003821, 0x24052000, 0x3c090800, + 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, 0x8ec258b0, 0x26c458b0, + 0x2484ffd0, 0xaf420144, 0x8c820034, 0x3c030400, 0xaf420148, 0x24020041, + 0xaf43014c, 0xa3420152, 0x8d230030, 0x3c021000, 0xa7470158, 0xaf450154, + 0xaf420178, 0x8c860034, 0x24630001, 0xad230030, 0x9342010a, 0x3c030041, + 0xafa50014, 0x00021600, 0x00431025, 0x00471025, 0xafa20010, 0x9343010b, + 0xafa30018, 0x8f440100, 0x8f450104, 0x0e00159b, 0x3c070400, 0x12200028, + 0x00003821, 0x24052000, 0x3c090800, 0x3c038000, 0x8f420178, 0x00431024, + 0x1440fffd, 0x8ec258b0, 0x26c458b0, 0x2484ffd0, 0xaf420144, 0x8c820034, + 0x3c030300, 0xaf420148, 0x2402004e, 0xaf43014c, 0xa3420152, 0x8d230030, + 0x3c021000, 0xa7470158, 0xaf450154, 0xaf420178, 0x8c860034, 0x24630001, + 0xad230030, 0x9342010a, 0x3c03004e, 0xafa50014, 0x00021600, 0x00431025, + 0x00471025, 0xafa20010, 0x9343010b, 0xafa30018, 0x8f440100, 0x8f450104, + 0x0e00159b, 0x3c070300, 0x0a00148b, 0x8fa20024, 0x32820008, 0x10400026, + 0x24052000, 0x00003821, 0x3c090800, 0x3c038000, 0x8f420178, 0x00431024, + 0x1440fffd, 0x8ec258b0, 0x26c458b0, 0x2484ffd0, 0xaf420144, 0x8c820034, + 0x3c030200, 0xaf420148, 0x2402004b, 0xaf43014c, 0xa3420152, 0x8d230030, + 0x3c021000, 0xa7470158, 0xaf450154, 0xaf420178, 0x8c860034, 0x24630001, + 0xad230030, 0x9342010a, 0x3c03004b, 0xafa50014, 0x00021600, 0x00431025, + 0x00471025, 0xafa20010, 0x9343010b, 0xafa30018, 0x8f440100, 0x8f450104, + 0x0e00159b, 0x3c070200, 0x8fa20024, 0x14400004, 0x8fa30020, 0x32420010, + 0x10400004, 0x00000000, 0x8c620004, 0x0040f809, 0x00000000, 0x12600006, + 0x8fa40020, 0x8c820008, 0x0040f809, 0x00000000, 0x0a0014c1, 0x8fbf0054, + 0x3c030800, 0x8c6258a0, 0x30420040, 0x14400023, 0x8fbf0054, 0x00002821, + 0x24040040, 0x8f870020, 0x3c038000, 0x8f420178, 0x00431024, 0x1440fffd, + 0x8ec258b0, 0x26c358b0, 0x2463ffd0, 0xaf420144, 0x8c620034, 0xaf420148, + 0x24020049, 0xaf47014c, 0xa3420152, 0x3c021000, 0xa7450158, 0xaf440154, + 0xaf420178, 0x8c660034, 0x9342010a, 0x3c030049, 0xafa40014, 0x00021600, + 0x00431025, 0x00451025, 0xafa20010, 0x9343010b, 0xafa30018, 0x8f440100, + 0x0e00159b, 0x8f450104, 0x8fbf0054, 0x8fbe0050, 0x8fb7004c, 0x8fb60048, + 0x8fb50044, 0x8fb40040, 0x8fb3003c, 0x8fb20038, 0x8fb10034, 0x8fb00030, + 0x03e00008, 0x27bd0058, 0x03e00008, 0x00001021, 0x3c020800, 0x24435880, + 0x8c650004, 0x8c445880, 0x0085182b, 0x10600002, 0x00403021, 0x00802821, + 0x9744093c, 0x00a4102b, 0x54400001, 0x00a02021, 0x93420923, 0x0004182b, + 0x00021042, 0x30420001, 0x00431024, 0x1040000d, 0x24c25880, 0x8f850000, + 0x8f830020, 0x8ca20084, 0x00431023, 0x04420007, 0x24c25880, 0x8ca20084, + 0x00641821, 0x00431023, 0x28420001, 0x00822023, 0x24c25880, 0xac440008, + 0xa4400026, 0x03e00008, 0x00001021, 0x8f850004, 0x97840010, 0x3c030800, + 0x24635880, 0x24020008, 0xa4620012, 0x8f820004, 0xa4600010, 0x000420c2, + 0x30840008, 0x2c420001, 0x00021023, 0x30420006, 0xac650008, 0x03e00008, + 0xa0640024, 0x3c020800, 0x24425880, 0x90450025, 0x9443001c, 0x3c021100, + 0xac800004, 0x00052c00, 0x24630002, 0x00621825, 0x00a32825, 0x24820008, + 0x03e00008, 0xac850000, 0x27bdffd8, 0x3c020800, 0x24425880, 0xafbf0020, + 0x90480025, 0x8c440008, 0x8c460020, 0x8f870020, 0x3c030800, 0x3c058000, + 0x8f420178, 0x00451024, 0x1440fffd, 0x8c6258b0, 0x246358b0, 0x2469ffd0, + 0xaf420144, 0x8d220034, 0x30c32000, 0xaf420148, 0x3c021000, 0xaf47014c, + 0xa3480152, 0xa7440158, 0xaf460154, 0xaf420178, 0x10600004, 0x3c030800, + 0x8c620030, 0x24420001, 0xac620030, 0x9342010a, 0x00081c00, 0x3084ffff, + 0xafa60014, 0x00021600, 0x00431025, 0x00441025, 0xafa20010, 0x9343010b, + 0xafa30018, 0x8f440100, 0x8f450104, 0x0e00159b, 0x8d260034, 0x8fbf0020, + 0x03e00008, 0x27bd0028, 0x0000000d, 0x00000000, 0x2400019d, 0x03e00008, + 0x00000000, 0x0000000d, 0x00000000, 0x240001a9, 0x03e00008, 0x00000000, + 0x03e00008, 0x00000000, 0x3c020800, 0x24425880, 0xac400008, 0xa4400026, + 0x03e00008, 0x24020001, 0x3c020800, 0x24425880, 0x24030008, 0xac400008, + 0xa4400010, 0xa4430012, 0xa0400024, 0x03e00008, 0x24020004, 0x03e00008, + 0x00001021, 0x10c00007, 0x00000000, 0x8ca20000, 0x24c6ffff, 0x24a50004, + 0xac820000, 0x14c0fffb, 0x24840004, 0x03e00008, 0x00000000, 0x0a00156c, + 0x00a01021, 0xac860000, 0x00000000, 0x00000000, 0x24840004, 0x00a01021, + 0x1440fffa, 0x24a5ffff, 0x03e00008, 0x00000000, 0x3c0a0800, 0x8d490068, + 0x3c050800, 0x24a52098, 0x00093140, 0x00c51021, 0xac440000, 0x8f440e04, + 0x00a61021, 0xac440004, 0x97430e08, 0x97420e0c, 0x00a62021, 0x00031c00, + 0x00431025, 0xac820008, 0x8f430e10, 0x00801021, 0xac43000c, 0x8f440e14, + 0xac440010, 0x8f430e18, 0x3c0800ff, 0xac430014, 0x8f470e1c, 0x3508ffff, + 0x25290001, 0xac470018, 0x3c070800, 0x8ce3006c, 0x9344010a, 0x3c026000, + 0x24630001, 0xace3006c, 0x8c434448, 0x3129007f, 0x00a62821, 0xad490068, + 0x00042600, 0x00681824, 0x00832025, 0x03e00008, 0xaca4001c, 0x8fac0010, + 0x8fad0014, 0x8fae0018, 0x3c0b0800, 0x8d6a0060, 0x3c080800, 0x25080080, + 0x000a4940, 0x01281021, 0x01091821, 0xac440000, 0x00601021, 0xac650004, + 0xac460008, 0xac67000c, 0xac4c0010, 0xac6d0014, 0x3c036000, 0xac4e0018, + 0x8c654448, 0x3c040800, 0x8c820064, 0x254a0001, 0x314a00ff, 0x01094021, + 0xad6a0060, 0x24420001, 0xac820064, 0x03e00008, 0xad05001c, 0x3c030800, + 0x3c090800, 0x8d250070, 0x246330b0, 0x8f460100, 0x00053900, 0x00e31021, + 0xac460000, 0x8f440104, 0x00671021, 0xac440004, 0x8f460108, 0x8f840014, + 0x24a50001, 0xac460008, 0x8c880074, 0x3c060800, 0x8cc20074, 0x30a5003f, + 0x00671821, 0xad250070, 0x24420001, 0xacc20074, 0x03e00008, 0xac68000c, + 0x00000000 }; static u32 bnx2_TXP_b06FwData[(0x0/4) + 1] = { 0x0 }; static u32 bnx2_TXP_b06FwRodata[(0x0/4) + 1] = { 0x0 }; diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index cf906d73c..8171cae06 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -33,6 +33,7 @@ //#define BONDING_DEBUG 1 +#include #include #include #include @@ -3547,7 +3548,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd mii->val_out = 0; read_lock_bh(&bond->lock); read_lock(&bond->curr_slave_lock); - if (netif_carrier_ok(bond->dev)) { + if (bond->curr_active_slave) { mii->val_out = BMSR_LSTATUS; } read_unlock(&bond->curr_slave_lock); @@ -4532,8 +4533,6 @@ static int bond_check_params(struct bond_params *params) return 0; } -static struct lock_class_key bonding_netdev_xmit_lock_key; - /* Create a new bond based on the specified name and bonding parameters. * Caller must NOT hold rtnl_lock; we need to release it here before we * set up our sysfs entries. @@ -4569,9 +4568,6 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond if (res < 0) { goto out_bond; } - - lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); - if (newbond) *newbond = bond_dev->priv; diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index cfe4dc3a9..5a9bd9588 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -20,6 +20,7 @@ * file called LICENSE. * */ +#include #include #include #include diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index a31544ccb..ac48f7543 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -66,6 +66,7 @@ * by default, the selective clear mask is set up to process rx packets. */ +#include #include #include @@ -2914,7 +2915,8 @@ static int cas_start_xmit(struct sk_buff *skb, struct net_device *dev) */ static int ring; - if (skb_padto(skb, cp->min_frame_size)) + skb = skb_padto(skb, cp->min_frame_size); + if (!skb) return 0; /* XXX: we need some higher-level QoS hooks to steer packets to @@ -4349,7 +4351,7 @@ static int cas_open(struct net_device *dev) * mapping to expose them */ if (request_irq(cp->pdev->irq, cas_interrupt, - IRQF_SHARED, dev->name, (void *) dev)) { + SA_SHIRQ, dev->name, (void *) dev)) { printk(KERN_ERR "%s: failed to request irq !\n", cp->dev->name); err = -EAGAIN; @@ -4875,7 +4877,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { static int cas_version_printed = 0; - unsigned long casreg_len; + unsigned long casreg_base, casreg_len; struct net_device *dev; struct cas *cp; int i, err, pci_using_dac; @@ -4887,12 +4889,13 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_enable_device(pdev); if (err) { - dev_err(&pdev->dev, "Cannot enable PCI device, aborting.\n"); + printk(KERN_ERR PFX "Cannot enable PCI device, " + "aborting.\n"); return err; } if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { - dev_err(&pdev->dev, "Cannot find proper PCI device " + printk(KERN_ERR PFX "Cannot find proper PCI device " "base address, aborting.\n"); err = -ENODEV; goto err_out_disable_pdev; @@ -4900,7 +4903,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, dev = alloc_etherdev(sizeof(*cp)); if (!dev) { - dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n"); + printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n"); err = -ENOMEM; goto err_out_disable_pdev; } @@ -4909,7 +4912,8 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_request_regions(pdev, dev->name); if (err) { - dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n"); + printk(KERN_ERR PFX "Cannot obtain PCI resources, " + "aborting.\n"); goto err_out_free_netdev; } pci_set_master(pdev); @@ -4939,7 +4943,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, if (pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, cas_cacheline_size)) { - dev_err(&pdev->dev, "Could not set PCI cache " + printk(KERN_ERR PFX "Could not set PCI cache " "line size\n"); goto err_write_cacheline; } @@ -4953,7 +4957,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); if (err < 0) { - dev_err(&pdev->dev, "Unable to obtain 64-bit DMA " + printk(KERN_ERR PFX "Unable to obtain 64-bit DMA " "for consistent allocations\n"); goto err_out_free_res; } @@ -4961,13 +4965,14 @@ static int __devinit cas_init_one(struct pci_dev *pdev, } else { err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (err) { - dev_err(&pdev->dev, "No usable DMA configuration, " + printk(KERN_ERR PFX "No usable DMA configuration, " "aborting.\n"); goto err_out_free_res; } pci_using_dac = 0; } + casreg_base = pci_resource_start(pdev, 0); casreg_len = pci_resource_len(pdev, 0); cp = netdev_priv(dev); @@ -5019,9 +5024,10 @@ static int __devinit cas_init_one(struct pci_dev *pdev, cp->timer_ticks = 0; /* give us access to cassini registers */ - cp->regs = pci_iomap(pdev, 0, casreg_len); + cp->regs = ioremap(casreg_base, casreg_len); if (cp->regs == 0UL) { - dev_err(&pdev->dev, "Cannot map device registers, aborting.\n"); + printk(KERN_ERR PFX "Cannot map device registers, " + "aborting.\n"); goto err_out_free_res; } cp->casreg_len = casreg_len; @@ -5037,7 +5043,8 @@ static int __devinit cas_init_one(struct pci_dev *pdev, pci_alloc_consistent(pdev, sizeof(struct cas_init_block), &cp->block_dvma); if (!cp->init_block) { - dev_err(&pdev->dev, "Cannot allocate init block, aborting.\n"); + printk(KERN_ERR PFX "Cannot allocate init block, " + "aborting.\n"); goto err_out_iounmap; } @@ -5081,7 +5088,8 @@ static int __devinit cas_init_one(struct pci_dev *pdev, dev->features |= NETIF_F_HIGHDMA; if (register_netdev(dev)) { - dev_err(&pdev->dev, "Cannot register net device, aborting.\n"); + printk(KERN_ERR PFX "Cannot register net device, " + "aborting.\n"); goto err_out_free_consistent; } @@ -5115,7 +5123,7 @@ err_out_iounmap: cas_shutdown(cp); mutex_unlock(&cp->pm_mutex); - pci_iounmap(pdev, cp->regs); + iounmap(cp->regs); err_out_free_res: @@ -5163,7 +5171,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev) #endif pci_free_consistent(pdev, sizeof(struct cas_init_block), cp->init_block, cp->block_dvma); - pci_iounmap(pdev, cp->regs); + iounmap(cp->regs); free_netdev(dev); pci_release_regions(pdev); pci_disable_device(pdev); diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index 5d9dd1442..bf3e7b6a7 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h @@ -39,6 +39,7 @@ #ifndef _CXGB_COMMON_H_ #define _CXGB_COMMON_H_ +#include #include #include #include diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index e67872433..7fe2638ae 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c @@ -37,6 +37,7 @@ ****************************************************************************/ #include "common.h" +#include #include #include #include @@ -218,7 +219,7 @@ static int cxgb_up(struct adapter *adapter) t1_interrupts_clear(adapter); if ((err = request_irq(adapter->pdev->irq, - t1_select_intr_handler(adapter), IRQF_SHARED, + t1_select_intr_handler(adapter), SA_SHIRQ, adapter->name, adapter))) { goto out_err; } diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 61b3754f5..722be62f3 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c @@ -39,6 +39,7 @@ #include "common.h" +#include #include #include #include diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 0eb1f8787..64105e4ea 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c @@ -218,6 +218,7 @@ * */ +#include #include @@ -671,7 +672,7 @@ e100_open(struct net_device *dev) /* allocate the irq corresponding to the receiving DMA */ if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt, - IRQF_SAMPLE_RANDOM, cardname, (void *)dev)) { + SA_SAMPLE_RANDOM, cardname, (void *)dev)) { goto grace_exit0; } diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 2dcca79b1..ef54ebeb2 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -100,6 +100,7 @@ /* Always include 'config.h' first in case the user wants to turn on or override something. */ +#include #include /* @@ -1905,7 +1906,8 @@ MODULE_LICENSE("GPL"); */ -int __init init_module(void) +int +init_module(void) { struct net_device *dev = alloc_etherdev(sizeof(struct net_local)); struct net_local *lp; diff --git a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h index 968fe11a0..bd954aaa6 100644 --- a/drivers/net/cs89x0.h +++ b/drivers/net/cs89x0.h @@ -14,6 +14,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ /* offset 2h -> Model/Product Number */ diff --git a/drivers/net/declance.c b/drivers/net/declance.c index 6ad579612..f130bdab3 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -42,6 +42,7 @@ * bits. macro */ +#include #include #include #include @@ -703,8 +704,8 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id, return IRQ_HANDLED; } -static irqreturn_t lance_interrupt(const int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t +lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; struct lance_private *lp = netdev_priv(dev); @@ -884,7 +885,8 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) len = skblen; if (len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; len = ETH_ZLEN; } @@ -1253,7 +1255,7 @@ static int __init dec_lance_init(const int type, const int slot) return 0; err_out_free_dev: - free_netdev(dev); + kfree(dev); err_out: return ret; @@ -1299,7 +1301,6 @@ static void __exit dec_lance_cleanup(void) while (root_lance_dev) { struct net_device *dev = root_lance_dev; struct lance_private *lp = netdev_priv(dev); - unregister_netdev(dev); #ifdef CONFIG_TC if (lp->slot >= 0) diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c index 91cc8cbdd..5acd35c31 100644 --- a/drivers/net/defxx.c +++ b/drivers/net/defxx.c @@ -1228,7 +1228,7 @@ static int dfx_open(struct net_device *dev) /* Register IRQ - support shared interrupts by passing device ptr */ - ret = request_irq(dev->irq, dfx_interrupt, IRQF_SHARED, dev->name, dev); + ret = request_irq(dev->irq, dfx_interrupt, SA_SHIRQ, dev->name, dev); if (ret) { printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); return ret; diff --git a/drivers/net/depca.c b/drivers/net/depca.c index b1cbe9924..0941d40f0 100644 --- a/drivers/net/depca.c +++ b/drivers/net/depca.c @@ -235,6 +235,7 @@ ========================================================================= */ +#include #include #include #include @@ -937,8 +938,11 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev) if (skb->len < 1) goto out; - if (skb_padto(skb, ETH_ZLEN)) - goto out; + if (skb->len < ETH_ZLEN) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + goto out; + } netif_stop_queue(dev); diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index fa4f09432..e175d4876 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c @@ -1191,7 +1191,7 @@ dgrs_probe1(struct net_device *dev) if (priv->plxreg) OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1); - rc = request_irq(dev->irq, &dgrs_intr, IRQF_SHARED, "RightSwitch", dev); + rc = request_irq(dev->irq, &dgrs_intr, SA_SHIRQ, "RightSwitch", dev); if (rc) goto err_out; diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 402961e68..038447fb5 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -9,10 +9,49 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ +/* + Rev Date Description + ========================================================================== + 0.01 2001/05/03 Created DL2000-based linux driver + 0.02 2001/05/21 Added VLAN and hardware checksum support. + 1.00 2001/06/26 Added jumbo frame support. + 1.01 2001/08/21 Added two parameters, rx_coalesce and rx_timeout. + 1.02 2001/10/08 Supported fiber media. + Added flow control parameters. + 1.03 2001/10/12 Changed the default media to 1000mbps_fd for + the fiber devices. + 1.04 2001/11/08 Fixed Tx stopped when tx very busy. + 1.05 2001/11/22 Fixed Tx stopped when unidirectional tx busy. + 1.06 2001/12/13 Fixed disconnect bug at 10Mbps mode. + Fixed tx_full flag incorrect. + Added tx_coalesce paramter. + 1.07 2002/01/03 Fixed miscount of RX frame error. + 1.08 2002/01/17 Fixed the multicast bug. + 1.09 2002/03/07 Move rx-poll-now to re-fill loop. + Added rio_timer() to watch rx buffers. + 1.10 2002/04/16 Fixed miscount of carrier error. + 1.11 2002/05/23 Added ISR schedule scheme + Fixed miscount of rx frame error for DGE-550SX. + Fixed VLAN bug. + 1.12 2002/06/13 Lock tx_coalesce=1 on 10/100Mbps mode. + 1.13 2002/08/13 1. Fix disconnection (many tx:carrier/rx:frame + errs) with some mainboards. + 2. Use definition "DRV_NAME" "DRV_VERSION" + "DRV_RELDATE" for flexibility. + 1.14 2002/08/14 Support ethtool. + 1.15 2002/08/27 Changed the default media to Auto-Negotiation + for the fiber devices. + 1.16 2002/09/04 More power down time for fiber devices auto- + negotiation. + Fix disconnect bug after ifup and ifdown. + 1.17 2002/10/03 Fix RMON statistics overflow. + Always use I/O mapping to access eeprom, + avoid system freezing with some chipsets. +*/ #define DRV_NAME "D-Link DL2000-based linux driver" -#define DRV_VERSION "v1.18" -#define DRV_RELDATE "2006/06/27" +#define DRV_VERSION "v1.17b" +#define DRV_RELDATE "2006/03/10" #include "dl2k.h" #include @@ -351,7 +390,7 @@ parse_eeprom (struct net_device *dev) for (i = 0; i < 6; i++) dev->dev_addr[i] = psrom->mac_addr[i]; - /* Parse Software Information Block */ + /* Parse Software Infomation Block */ i = 0x30; psib = (u8 *) sromdata; do { @@ -401,7 +440,7 @@ rio_open (struct net_device *dev) int i; u16 macctrl; - i = request_irq (dev->irq, &rio_interrupt, IRQF_SHARED, dev->name, dev); + i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev); if (i) return i; diff --git a/drivers/net/dl2k.h b/drivers/net/dl2k.h index 53449207e..6e75482d7 100644 --- a/drivers/net/dl2k.h +++ b/drivers/net/dl2k.h @@ -683,6 +683,11 @@ struct netdev_private { }; /* The station address location in the EEPROM. */ +#ifdef MEM_MAPPING +#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1) +#else +#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0) +#endif /* The struct pci_device_id consist of: vendor, device Vendor and device ID to match (or PCI_ANY_ID) subvendor, subdevice Subsystem vendor and device ID to match (or PCI_ANY_ID) @@ -690,10 +695,9 @@ struct netdev_private { class_mask of the class are honored during the comparison. driver_data Data private to the driver. */ - -static const struct pci_device_id rio_pci_tbl[] = { - {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, }, - { } +static struct pci_device_id rio_pci_tbl[] = { + {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {0,} }; MODULE_DEVICE_TABLE (pci, rio_pci_tbl); #define TX_TIMEOUT (4*HZ) diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index a860ebbbf..24996da4c 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -339,17 +339,6 @@ static void dm9000_timeout(struct net_device *dev) spin_unlock_irqrestore(&db->lock,flags); } -#ifdef CONFIG_NET_POLL_CONTROLLER -/* - *Used by netconsole - */ -static void dm9000_poll_controller(struct net_device *dev) -{ - disable_irq(dev->irq); - dm9000_interrupt(dev->irq,dev,NULL); - enable_irq(dev->irq); -} -#endif /* dm9000_release_board * @@ -377,8 +366,8 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db) kfree(db->data_req); } - if (db->addr_req != NULL) { - release_resource(db->addr_req); + if (db->addr_res != NULL) { + release_resource(db->addr_res); kfree(db->addr_req); } } @@ -421,7 +410,10 @@ dm9000_probe(struct platform_device *pdev) if (pdev->num_resources < 2) { ret = -ENODEV; goto out; - } else if (pdev->num_resources == 2) { + } + + switch (pdev->num_resources) { + case 2: base = pdev->resource[0].start; if (!request_mem_region(base, 4, ndev->name)) { @@ -431,16 +423,17 @@ dm9000_probe(struct platform_device *pdev) ndev->base_addr = base; ndev->irq = pdev->resource[1].start; - db->io_addr = (void __iomem *)base; - db->io_data = (void __iomem *)(base + 4); + db->io_addr = (void *)base; + db->io_data = (void *)(base + 4); - } else { + break; + + case 3: db->addr_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); db->data_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); db->irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (db->addr_res == NULL || db->data_res == NULL || - db->irq_res == NULL) { + if (db->addr_res == NULL || db->data_res == NULL) { printk(KERN_ERR PFX "insufficient resources\n"); ret = -ENOENT; goto out; @@ -489,6 +482,7 @@ dm9000_probe(struct platform_device *pdev) /* ensure at least we have a default set of IO routines */ dm9000_set_io(db, iosize); + } /* check to see if anything is being over-ridden */ @@ -549,9 +543,6 @@ dm9000_probe(struct platform_device *pdev) ndev->stop = &dm9000_stop; ndev->get_stats = &dm9000_get_stats; ndev->set_multicast_list = &dm9000_hash_table; -#ifdef CONFIG_NET_POLL_CONTROLLER - ndev->poll_controller = &dm9000_poll_controller; -#endif #ifdef DM9000_PROGRAM_EEPROM program_eeprom(db); @@ -573,13 +564,6 @@ dm9000_probe(struct platform_device *pdev) for (i = 0; i < 6; i++) ndev->dev_addr[i] = db->srom[i]; - if (!is_valid_ether_addr(ndev->dev_addr)) { - /* try reading from mac */ - - for (i = 0; i < 6; i++) - ndev->dev_addr[i] = ior(db, i+DM9000_PAR); - } - if (!is_valid_ether_addr(ndev->dev_addr)) printk("%s: Invalid ethernet MAC address. Please " "set using ifconfig\n", ndev->name); @@ -617,7 +601,7 @@ dm9000_open(struct net_device *dev) PRINTK2("entering dm9000_open\n"); - if (request_irq(dev->irq, &dm9000_interrupt, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, &dm9000_interrupt, SA_SHIRQ, dev->name, dev)) return -EAGAIN; /* Initialize DM9000 board */ @@ -679,6 +663,7 @@ dm9000_init_dm9000(struct net_device *dev) db->tx_pkt_cnt = 0; db->queue_pkt_len = 0; dev->trans_start = 0; + spin_lock_init(&db->lock); } /* @@ -782,7 +767,7 @@ dm9000_stop(struct net_device *ndev) * receive the packet to upper layer, free the transmitted packet */ -static void +void dm9000_tx_done(struct net_device *dev, board_info_t * db) { int tx_status = ior(db, DM9000_NSR); /* Got TX status */ @@ -1202,14 +1187,13 @@ dm9000_drv_remove(struct platform_device *pdev) } static struct platform_driver dm9000_driver = { - .driver = { - .name = "dm9000", - .owner = THIS_MODULE, - }, .probe = dm9000_probe, .remove = dm9000_drv_remove, .suspend = dm9000_drv_suspend, .resume = dm9000_drv_resume, + .driver = { + .name = "dm9000", + }, }; static int __init diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index 2146cf744..dd8c15ac5 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -28,6 +28,7 @@ Alan Cox, 30th May 1994 */ +#include #include #include #include @@ -132,7 +133,6 @@ static int __init dummy_init_module(void) for (i = 0; i < numdummies && !err; i++) err = dummy_init_one(i); if (err) { - i--; while (--i >= 0) dummy_free_one(i); } diff --git a/drivers/net/e100.c b/drivers/net/e100.c index ce850f107..31ac001f5 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -138,6 +138,7 @@ * - Stratus87247: protect MDI control register manipulations */ +#include #include #include #include @@ -173,11 +174,8 @@ MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); static int debug = 3; -static int eeprom_bad_csum_allow = 0; module_param(debug, int, 0); -module_param(eeprom_bad_csum_allow, int, 0); MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); -MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums"); #define DPRINTK(nlevel, klevel, fmt, args...) \ (void)((NETIF_MSG_##nlevel & nic->msg_enable) && \ printk(KERN_##klevel PFX "%s: %s: " fmt, nic->netdev->name, \ @@ -759,8 +757,7 @@ static int e100_eeprom_load(struct nic *nic) checksum = le16_to_cpu(0xBABA - checksum); if(checksum != nic->eeprom[nic->eeprom_wc - 1]) { DPRINTK(PROBE, ERR, "EEPROM corrupted\n"); - if (!eeprom_bad_csum_allow) - return -EAGAIN; + return -EAGAIN; } return 0; @@ -2067,7 +2064,7 @@ static int e100_up(struct nic *nic) e100_set_multicast_list(nic->netdev); e100_start_receiver(nic, NULL); mod_timer(&nic->watchdog, jiffies); - if((err = request_irq(nic->pdev->irq, e100_intr, IRQF_SHARED, + if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, nic->netdev->name, nic->netdev))) goto err_no_irq; netif_wake_queue(nic->netdev); @@ -2681,9 +2678,9 @@ static int __devinit e100_probe(struct pci_dev *pdev, goto err_out_free; } - DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, " + DPRINTK(PROBE, INFO, "addr 0x%lx, irq %d, " "MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n", - (unsigned long long)pci_resource_start(pdev, 0), pdev->irq, + pci_resource_start(pdev, 0), pdev->irq, netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2], netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]); @@ -2783,80 +2780,6 @@ static void e100_shutdown(struct pci_dev *pdev) DPRINTK(PROBE,ERR, "Error enabling wake\n"); } -/* ------------------ PCI Error Recovery infrastructure -------------- */ -/** - * e100_io_error_detected - called when PCI error is detected. - * @pdev: Pointer to PCI device - * @state: The current pci conneection state - */ -static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - - /* Similar to calling e100_down(), but avoids adpater I/O. */ - netdev->stop(netdev); - - /* Detach; put netif into state similar to hotplug unplug. */ - netif_poll_enable(netdev); - netif_device_detach(netdev); - - /* Request a slot reset. */ - return PCI_ERS_RESULT_NEED_RESET; -} - -/** - * e100_io_slot_reset - called after the pci bus has been reset. - * @pdev: Pointer to PCI device - * - * Restart the card from scratch. - */ -static pci_ers_result_t e100_io_slot_reset(struct pci_dev *pdev) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - struct nic *nic = netdev_priv(netdev); - - if (pci_enable_device(pdev)) { - printk(KERN_ERR "e100: Cannot re-enable PCI device after reset.\n"); - return PCI_ERS_RESULT_DISCONNECT; - } - pci_set_master(pdev); - - /* Only one device per card can do a reset */ - if (0 != PCI_FUNC(pdev->devfn)) - return PCI_ERS_RESULT_RECOVERED; - e100_hw_reset(nic); - e100_phy_init(nic); - - return PCI_ERS_RESULT_RECOVERED; -} - -/** - * e100_io_resume - resume normal operations - * @pdev: Pointer to PCI device - * - * Resume normal operations after an error recovery - * sequence has been completed. - */ -static void e100_io_resume(struct pci_dev *pdev) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - struct nic *nic = netdev_priv(netdev); - - /* ack any pending wake events, disable PME */ - pci_enable_wake(pdev, 0, 0); - - netif_device_attach(netdev); - if (netif_running(netdev)) { - e100_open(netdev); - mod_timer(&nic->watchdog, jiffies); - } -} - -static struct pci_error_handlers e100_err_handler = { - .error_detected = e100_io_error_detected, - .slot_reset = e100_io_slot_reset, - .resume = e100_io_resume, -}; static struct pci_driver e100_driver = { .name = DRV_NAME, @@ -2868,7 +2791,6 @@ static struct pci_driver e100_driver = { .resume = e100_resume, #endif .shutdown = e100_shutdown, - .err_handler = &e100_err_handler, }; static int __init e100_init_module(void) diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index 5dea2b7de..ca9f89552 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -1,7 +1,7 @@ ################################################################################ # # -# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. +# Copyright(c) 1999 - 2003 Intel Corporation. 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 @@ -22,7 +22,6 @@ # # Contact Information: # Linux NICS -# e1000-devel Mailing List # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 # ################################################################################ diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index d304297c4..281de41d0 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -34,6 +33,7 @@ #define _E1000_H_ #include +#include #include #include #include @@ -68,6 +68,7 @@ #ifdef NETIF_F_TSO #include #endif +#include #include #include #include @@ -110,14 +111,9 @@ struct e1000_adapter; #define E1000_MIN_RXD 80 #define E1000_MAX_82544_RXD 4096 -/* this is the size past which hardware will drop packets when setting LPE=0 */ -#define MAXIMUM_ETHERNET_VLAN_SIZE 1522 - /* Supported Rx Buffer Sizes */ #define E1000_RXBUFFER_128 128 /* Used for packet split */ #define E1000_RXBUFFER_256 256 /* Used for packet split */ -#define E1000_RXBUFFER_512 512 -#define E1000_RXBUFFER_1024 1024 #define E1000_RXBUFFER_2048 2048 #define E1000_RXBUFFER_4096 4096 #define E1000_RXBUFFER_8192 8192 @@ -145,7 +141,6 @@ struct e1000_adapter; #define AUTO_ALL_MODES 0 #define E1000_EEPROM_82544_APM 0x0004 -#define E1000_EEPROM_ICH8_APME 0x0004 #define E1000_EEPROM_APME 0x0400 #ifndef E1000_MASTER_SLAVE @@ -257,6 +252,7 @@ struct e1000_adapter { spinlock_t tx_queue_lock; #endif atomic_t irq_sem; + struct work_struct watchdog_task; struct work_struct reset_task; uint8_t fc_autoneg; @@ -338,17 +334,12 @@ struct e1000_adapter { boolean_t have_msi; #endif /* to not mess up cache alignment, always add to the bottom */ + boolean_t txb2b; #ifdef NETIF_F_TSO boolean_t tso_force; #endif - boolean_t smart_power_down; /* phy smart power down */ - unsigned long flags; }; -enum e1000_state_t { - __E1000_DRIVER_TESTING, - __E1000_RESETTING, -}; /* e1000_main.c */ extern char e1000_driver_name[]; @@ -356,7 +347,6 @@ extern char e1000_driver_version[]; int e1000_up(struct e1000_adapter *adapter); void e1000_down(struct e1000_adapter *adapter); void e1000_reset(struct e1000_adapter *adapter); -void e1000_reinit_locked(struct e1000_adapter *adapter); int e1000_setup_all_tx_resources(struct e1000_adapter *adapter); void e1000_free_all_tx_resources(struct e1000_adapter *adapter); int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 88a82ba88..d1c705b41 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -109,8 +108,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) SUPPORTED_1000baseT_Full| SUPPORTED_Autoneg | SUPPORTED_TP); - if (hw->phy_type == e1000_phy_ife) - ecmd->supported &= ~SUPPORTED_1000baseT_Full; + ecmd->advertising = ADVERTISED_TP; if (hw->autoneg == 1) { @@ -204,9 +202,11 @@ e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) /* reset the link */ - if (netif_running(adapter->netdev)) - e1000_reinit_locked(adapter); - else + if (netif_running(adapter->netdev)) { + e1000_down(adapter); + e1000_reset(adapter); + e1000_up(adapter); + } else e1000_reset(adapter); return 0; @@ -253,9 +253,10 @@ e1000_set_pauseparam(struct net_device *netdev, hw->original_fc = hw->fc; if (adapter->fc_autoneg == AUTONEG_ENABLE) { - if (netif_running(adapter->netdev)) - e1000_reinit_locked(adapter); - else + if (netif_running(adapter->netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } else e1000_reset(adapter); } else return ((hw->media_type == e1000_media_type_fiber) ? @@ -277,9 +278,10 @@ e1000_set_rx_csum(struct net_device *netdev, uint32_t data) struct e1000_adapter *adapter = netdev_priv(netdev); adapter->rx_csum = data; - if (netif_running(netdev)) - e1000_reinit_locked(adapter); - else + if (netif_running(netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } else e1000_reset(adapter); return 0; } @@ -574,7 +576,6 @@ e1000_get_drvinfo(struct net_device *netdev, case e1000_82572: case e1000_82573: case e1000_80003es2lan: - case e1000_ich8lan: sprintf(firmware_version, "%d.%d-%d", (eeprom_data & 0xF000) >> 12, (eeprom_data & 0x0FF0) >> 4, @@ -629,9 +630,6 @@ e1000_set_ringparam(struct net_device *netdev, tx_ring_size = sizeof(struct e1000_tx_ring) * adapter->num_tx_queues; rx_ring_size = sizeof(struct e1000_rx_ring) * adapter->num_rx_queues; - while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) - msleep(1); - if (netif_running(adapter->netdev)) e1000_down(adapter); @@ -692,11 +690,9 @@ e1000_set_ringparam(struct net_device *netdev, adapter->rx_ring = rx_new; adapter->tx_ring = tx_new; if ((err = e1000_up(adapter))) - goto err_setup; + return err; } - clear_bit(__E1000_RESETTING, &adapter->flags); - return 0; err_setup_tx: e1000_free_all_rx_resources(adapter); @@ -704,8 +700,6 @@ err_setup_rx: adapter->rx_ring = rx_old; adapter->tx_ring = tx_old; e1000_up(adapter); -err_setup: - clear_bit(__E1000_RESETTING, &adapter->flags); return err; } @@ -759,7 +753,6 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) toggle = 0x7FFFF3FF; break; case e1000_82573: - case e1000_ich8lan: toggle = 0x7FFFF033; break; default: @@ -779,12 +772,11 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) } /* restore previous status */ E1000_WRITE_REG(&adapter->hw, STATUS, before); - if (adapter->hw.mac_type != e1000_ich8lan) { - REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); - REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); - REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); - REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); - } + + REG_PATTERN_TEST(FCAL, 0xFFFFFFFF, 0xFFFFFFFF); + REG_PATTERN_TEST(FCAH, 0x0000FFFF, 0xFFFFFFFF); + REG_PATTERN_TEST(FCT, 0x0000FFFF, 0xFFFFFFFF); + REG_PATTERN_TEST(VET, 0x0000FFFF, 0xFFFFFFFF); REG_PATTERN_TEST(RDTR, 0x0000FFFF, 0xFFFFFFFF); REG_PATTERN_TEST(RDBAH, 0xFFFFFFFF, 0xFFFFFFFF); REG_PATTERN_TEST(RDLEN, 0x000FFF80, 0x000FFFFF); @@ -797,22 +789,20 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) REG_PATTERN_TEST(TDLEN, 0x000FFF80, 0x000FFFFF); REG_SET_AND_CHECK(RCTL, 0xFFFFFFFF, 0x00000000); - before = (adapter->hw.mac_type == e1000_ich8lan ? - 0x06C3B33E : 0x06DFB3FE); - REG_SET_AND_CHECK(RCTL, before, 0x003FFFFB); + REG_SET_AND_CHECK(RCTL, 0x06DFB3FE, 0x003FFFFB); REG_SET_AND_CHECK(TCTL, 0xFFFFFFFF, 0x00000000); if (adapter->hw.mac_type >= e1000_82543) { - REG_SET_AND_CHECK(RCTL, before, 0xFFFFFFFF); + REG_SET_AND_CHECK(RCTL, 0x06DFB3FE, 0xFFFFFFFF); REG_PATTERN_TEST(RDBAL, 0xFFFFFFF0, 0xFFFFFFFF); - if (adapter->hw.mac_type != e1000_ich8lan) - REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF); + REG_PATTERN_TEST(TXCW, 0xC000FFFF, 0x0000FFFF); REG_PATTERN_TEST(TDBAL, 0xFFFFFFF0, 0xFFFFFFFF); REG_PATTERN_TEST(TIDV, 0x0000FFFF, 0x0000FFFF); - value = (adapter->hw.mac_type == e1000_ich8lan ? - E1000_RAR_ENTRIES_ICH8LAN : E1000_RAR_ENTRIES); - for (i = 0; i < value; i++) { + + for (i = 0; i < E1000_RAR_ENTRIES; i++) { + REG_PATTERN_TEST(RA + ((i << 1) << 2), 0xFFFFFFFF, + 0xFFFFFFFF); REG_PATTERN_TEST(RA + (((i << 1) + 1) << 2), 0x8003FFFF, 0xFFFFFFFF); } @@ -826,9 +816,7 @@ e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) } - value = (adapter->hw.mac_type == e1000_ich8lan ? - E1000_MC_TBL_SIZE_ICH8LAN : E1000_MC_TBL_SIZE); - for (i = 0; i < value; i++) + for (i = 0; i < E1000_MC_TBL_SIZE; i++) REG_PATTERN_TEST(MTA + (i << 2), 0xFFFFFFFF, 0xFFFFFFFF); *data = 0; @@ -876,16 +864,16 @@ static int e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) { struct net_device *netdev = adapter->netdev; - uint32_t mask, i=0, shared_int = TRUE; - uint32_t irq = adapter->pdev->irq; + uint32_t mask, i=0, shared_int = TRUE; + uint32_t irq = adapter->pdev->irq; *data = 0; /* Hook up test interrupt handler just for this test */ - if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, - netdev->name, netdev)) { + if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name, + netdev)) { shared_int = FALSE; - } else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED, + } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, netdev->name, netdev)){ *data = 1; return -1; @@ -900,27 +888,25 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) /* Test each interrupt */ for (; i < 10; i++) { - if (adapter->hw.mac_type == e1000_ich8lan && i == 8) - continue; /* Interrupt to test */ mask = 1 << i; - if (!shared_int) { - /* Disable the interrupt to be reported in - * the cause register and then force the same - * interrupt and see if one gets posted. If - * an interrupt was posted to the bus, the - * test failed. - */ - adapter->test_icr = 0; - E1000_WRITE_REG(&adapter->hw, IMC, mask); - E1000_WRITE_REG(&adapter->hw, ICS, mask); - msec_delay(10); - - if (adapter->test_icr & mask) { - *data = 3; - break; - } + if (!shared_int) { + /* Disable the interrupt to be reported in + * the cause register and then force the same + * interrupt and see if one gets posted. If + * an interrupt was posted to the bus, the + * test failed. + */ + adapter->test_icr = 0; + E1000_WRITE_REG(&adapter->hw, IMC, mask); + E1000_WRITE_REG(&adapter->hw, ICS, mask); + msec_delay(10); + + if (adapter->test_icr & mask) { + *data = 3; + break; + } } /* Enable the interrupt to be reported in @@ -939,7 +925,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) break; } - if (!shared_int) { + if (!shared_int) { /* Disable the other interrupts to be reported in * the cause register and then force the other * interrupts and see if any get posted. If @@ -1259,33 +1245,18 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter) } else if (adapter->hw.phy_type == e1000_phy_gg82563) { e1000_write_phy_reg(&adapter->hw, GG82563_PHY_KMRN_MODE_CTRL, - 0x1CC); + 0x1CE); } + /* force 1000, set loopback */ + e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x4140); + /* Now set up the MAC to the same speed/duplex as the PHY. */ ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL); - - if (adapter->hw.phy_type == e1000_phy_ife) { - /* force 100, set loopback */ - e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x6100); - - /* Now set up the MAC to the same speed/duplex as the PHY. */ - ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ - ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ - E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ - E1000_CTRL_SPD_100 |/* Force Speed to 100 */ - E1000_CTRL_FD); /* Force Duplex to FULL */ - } else { - /* force 1000, set loopback */ - e1000_write_phy_reg(&adapter->hw, PHY_CTRL, 0x4140); - - /* Now set up the MAC to the same speed/duplex as the PHY. */ - ctrl_reg = E1000_READ_REG(&adapter->hw, CTRL); - ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ - ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ - E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ - E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ - E1000_CTRL_FD); /* Force Duplex to FULL */ - } + ctrl_reg &= ~E1000_CTRL_SPD_SEL; /* Clear the speed sel bits */ + ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ + E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ + E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ + E1000_CTRL_FD); /* Force Duplex to FULL */ if (adapter->hw.media_type == e1000_media_type_copper && adapter->hw.phy_type == e1000_phy_m88) { @@ -1345,7 +1316,6 @@ e1000_set_phy_loopback(struct e1000_adapter *adapter) case e1000_82572: case e1000_82573: case e1000_80003es2lan: - case e1000_ich8lan: return e1000_integrated_phy_loopback(adapter); break; @@ -1597,7 +1567,6 @@ e1000_diag_test(struct net_device *netdev, struct e1000_adapter *adapter = netdev_priv(netdev); boolean_t if_running = netif_running(netdev); - set_bit(__E1000_DRIVER_TESTING, &adapter->flags); if (eth_test->flags == ETH_TEST_FL_OFFLINE) { /* Offline tests */ @@ -1612,8 +1581,7 @@ e1000_diag_test(struct net_device *netdev, eth_test->flags |= ETH_TEST_FL_FAILED; if (if_running) - /* indicate we're in test mode */ - dev_close(netdev); + e1000_down(adapter); else e1000_reset(adapter); @@ -1638,9 +1606,8 @@ e1000_diag_test(struct net_device *netdev, adapter->hw.autoneg = autoneg; e1000_reset(adapter); - clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); if (if_running) - dev_open(netdev); + e1000_up(adapter); } else { /* Online tests */ if (e1000_link_test(adapter, &data[4])) @@ -1651,8 +1618,6 @@ e1000_diag_test(struct net_device *netdev, data[1] = 0; data[2] = 0; data[3] = 0; - - clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); } msleep_interruptible(4 * 1000); } @@ -1812,18 +1777,21 @@ e1000_phys_id(struct net_device *netdev, uint32_t data) mod_timer(&adapter->blink_timer, jiffies); msleep_interruptible(data * 1000); del_timer_sync(&adapter->blink_timer); - } else if (adapter->hw.phy_type == e1000_phy_ife) { - if (!adapter->blink_timer.function) { - init_timer(&adapter->blink_timer); - adapter->blink_timer.function = e1000_led_blink_callback; - adapter->blink_timer.data = (unsigned long) adapter; - } - mod_timer(&adapter->blink_timer, jiffies); + } else if (adapter->hw.mac_type < e1000_82573) { + E1000_WRITE_REG(&adapter->hw, LEDCTL, + (E1000_LEDCTL_LED2_BLINK_RATE | + E1000_LEDCTL_LED0_BLINK | E1000_LEDCTL_LED2_BLINK | + (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | + (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED0_MODE_SHIFT) | + (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED1_MODE_SHIFT))); msleep_interruptible(data * 1000); - del_timer_sync(&adapter->blink_timer); - e1000_write_phy_reg(&(adapter->hw), IFE_PHY_SPECIAL_CONTROL_LED, 0); } else { - e1000_blink_led_start(&adapter->hw); + E1000_WRITE_REG(&adapter->hw, LEDCTL, + (E1000_LEDCTL_LED2_BLINK_RATE | + E1000_LEDCTL_LED1_BLINK | E1000_LEDCTL_LED2_BLINK | + (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED2_MODE_SHIFT) | + (E1000_LEDCTL_MODE_LINK_ACTIVITY << E1000_LEDCTL_LED1_MODE_SHIFT) | + (E1000_LEDCTL_MODE_LED_OFF << E1000_LEDCTL_LED0_MODE_SHIFT))); msleep_interruptible(data * 1000); } @@ -1838,8 +1806,10 @@ static int e1000_nway_reset(struct net_device *netdev) { struct e1000_adapter *adapter = netdev_priv(netdev); - if (netif_running(netdev)) - e1000_reinit_locked(adapter); + if (netif_running(netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } return 0; } diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index b3b919116..c5e702349 100644 --- a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -101,37 +100,9 @@ static void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, #define E1000_WRITE_REG_IO(a, reg, val) \ e1000_write_reg_io((a), E1000_##reg, val) -static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, - uint16_t duplex); +static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw); static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); -static int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, - uint32_t segment); -static int32_t e1000_get_software_flag(struct e1000_hw *hw); -static int32_t e1000_get_software_semaphore(struct e1000_hw *hw); -static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw); -static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); -static int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, - uint16_t words, uint16_t *data); -static int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, - uint8_t* data); -static int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, - uint16_t *data); -static int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, - uint16_t *data); -static void e1000_release_software_flag(struct e1000_hw *hw); -static void e1000_release_software_semaphore(struct e1000_hw *hw); -static int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, - uint32_t no_snoop); -static int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, - uint32_t index, uint8_t byte); -static int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, - uint16_t words, uint16_t *data); -static int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, - uint8_t data); -static int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, - uint16_t data); - /* IGP cable length table */ static const uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] = @@ -184,14 +155,6 @@ e1000_set_phy_type(struct e1000_hw *hw) hw->phy_type = e1000_phy_igp; break; } - case IGP03E1000_E_PHY_ID: - hw->phy_type = e1000_phy_igp_3; - break; - case IFE_E_PHY_ID: - case IFE_PLUS_E_PHY_ID: - case IFE_C_E_PHY_ID: - hw->phy_type = e1000_phy_ife; - break; case GG82563_E_PHY_ID: if (hw->mac_type == e1000_80003es2lan) { hw->phy_type = e1000_phy_gg82563; @@ -368,7 +331,6 @@ e1000_set_mac_type(struct e1000_hw *hw) break; case E1000_DEV_ID_82541EI: case E1000_DEV_ID_82541EI_MOBILE: - case E1000_DEV_ID_82541ER_LOM: hw->mac_type = e1000_82541; break; case E1000_DEV_ID_82541ER: @@ -378,7 +340,6 @@ e1000_set_mac_type(struct e1000_hw *hw) hw->mac_type = e1000_82541_rev_2; break; case E1000_DEV_ID_82547EI: - case E1000_DEV_ID_82547EI_MOBILE: hw->mac_type = e1000_82547; break; case E1000_DEV_ID_82547GI: @@ -400,29 +361,16 @@ e1000_set_mac_type(struct e1000_hw *hw) case E1000_DEV_ID_82573L: hw->mac_type = e1000_82573; break; - case E1000_DEV_ID_80003ES2LAN_COPPER_SPT: - case E1000_DEV_ID_80003ES2LAN_SERDES_SPT: case E1000_DEV_ID_80003ES2LAN_COPPER_DPT: case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: hw->mac_type = e1000_80003es2lan; break; - case E1000_DEV_ID_ICH8_IGP_M_AMT: - case E1000_DEV_ID_ICH8_IGP_AMT: - case E1000_DEV_ID_ICH8_IGP_C: - case E1000_DEV_ID_ICH8_IFE: - case E1000_DEV_ID_ICH8_IGP_M: - hw->mac_type = e1000_ich8lan; - break; default: /* Should never have loaded on this device */ return -E1000_ERR_MAC_TYPE; } switch(hw->mac_type) { - case e1000_ich8lan: - hw->swfwhw_semaphore_present = TRUE; - hw->asf_firmware_present = TRUE; - break; case e1000_80003es2lan: hw->swfw_sync_present = TRUE; /* fall through */ @@ -475,7 +423,6 @@ e1000_set_media_type(struct e1000_hw *hw) case e1000_82542_rev2_1: hw->media_type = e1000_media_type_fiber; break; - case e1000_ich8lan: case e1000_82573: /* The STATUS_TBIMODE bit is reserved or reused for the this * device. @@ -580,14 +527,6 @@ e1000_reset_hw(struct e1000_hw *hw) } while(timeout); } - /* Workaround for ICH8 bit corruption issue in FIFO memory */ - if (hw->mac_type == e1000_ich8lan) { - /* Set Tx and Rx buffer allocation to 8k apiece. */ - E1000_WRITE_REG(hw, PBA, E1000_PBA_8K); - /* Set Packet Buffer Size to 16k. */ - E1000_WRITE_REG(hw, PBS, E1000_PBS_16K); - } - /* Issue a global reset to the MAC. This will reset the chip's * transmit, receive, DMA, and link units. It will not effect * the current PCI configuration. The global reset bit is self- @@ -611,20 +550,6 @@ e1000_reset_hw(struct e1000_hw *hw) /* Reset is performed on a shadow of the control register */ E1000_WRITE_REG(hw, CTRL_DUP, (ctrl | E1000_CTRL_RST)); break; - case e1000_ich8lan: - if (!hw->phy_reset_disable && - e1000_check_phy_reset_block(hw) == E1000_SUCCESS) { - /* e1000_ich8lan PHY HW reset requires MAC CORE reset - * at the same time to make sure the interface between - * MAC and the external PHY is reset. - */ - ctrl |= E1000_CTRL_PHY_RST; - } - - e1000_get_software_flag(hw); - E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST)); - msec_delay(5); - break; default: E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST)); break; @@ -666,7 +591,6 @@ e1000_reset_hw(struct e1000_hw *hw) /* fall through */ case e1000_82571: case e1000_82572: - case e1000_ich8lan: case e1000_80003es2lan: ret_val = e1000_get_auto_rd_done(hw); if(ret_val) @@ -709,12 +633,6 @@ e1000_reset_hw(struct e1000_hw *hw) e1000_pci_set_mwi(hw); } - if (hw->mac_type == e1000_ich8lan) { - uint32_t kab = E1000_READ_REG(hw, KABGTXD); - kab |= E1000_KABGTXD_BGSQLBIAS; - E1000_WRITE_REG(hw, KABGTXD, kab); - } - return E1000_SUCCESS; } @@ -757,12 +675,9 @@ e1000_init_hw(struct e1000_hw *hw) /* Disabling VLAN filtering. */ DEBUGOUT("Initializing the IEEE VLAN\n"); - /* VET hardcoded to standard value and VFTA removed in ICH8 LAN */ - if (hw->mac_type != e1000_ich8lan) { - if (hw->mac_type < e1000_82545_rev_3) - E1000_WRITE_REG(hw, VET, 0); - e1000_clear_vfta(hw); - } + if (hw->mac_type < e1000_82545_rev_3) + E1000_WRITE_REG(hw, VET, 0); + e1000_clear_vfta(hw); /* For 82542 (rev 2.0), disable MWI and put the receiver into reset */ if(hw->mac_type == e1000_82542_rev2_0) { @@ -790,14 +705,8 @@ e1000_init_hw(struct e1000_hw *hw) /* Zero out the Multicast HASH table */ DEBUGOUT("Zeroing the MTA\n"); mta_size = E1000_MC_TBL_SIZE; - if (hw->mac_type == e1000_ich8lan) - mta_size = E1000_MC_TBL_SIZE_ICH8LAN; - for(i = 0; i < mta_size; i++) { + for(i = 0; i < mta_size; i++) E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); - /* use write flush to prevent Memory Write Block (MWB) from - * occuring when accessing our register space */ - E1000_WRITE_FLUSH(hw); - } /* Set the PCI priority bit correctly in the CTRL register. This * determines if the adapter gives priority to receives, or if it @@ -835,10 +744,6 @@ e1000_init_hw(struct e1000_hw *hw) break; } - /* More time needed for PHY to initialize */ - if (hw->mac_type == e1000_ich8lan) - msec_delay(15); - /* Call a subroutine to configure the link and setup flow control. */ ret_val = e1000_setup_link(hw); @@ -852,7 +757,6 @@ e1000_init_hw(struct e1000_hw *hw) case e1000_82571: case e1000_82572: case e1000_82573: - case e1000_ich8lan: case e1000_80003es2lan: ctrl |= E1000_TXDCTL_COUNT_DESC; break; @@ -861,7 +765,7 @@ e1000_init_hw(struct e1000_hw *hw) } if (hw->mac_type == e1000_82573) { - e1000_enable_tx_pkt_filtering(hw); + e1000_enable_tx_pkt_filtering(hw); } switch (hw->mac_type) { @@ -891,7 +795,6 @@ e1000_init_hw(struct e1000_hw *hw) /* Fall through */ case e1000_82571: case e1000_82572: - case e1000_ich8lan: ctrl = E1000_READ_REG(hw, TXDCTL1); ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB; if(hw->mac_type >= e1000_82571) @@ -915,11 +818,6 @@ e1000_init_hw(struct e1000_hw *hw) */ e1000_clear_hw_cntrs(hw); - /* ICH8 No-snoop bits are opposite polarity. - * Set to snoop by default after reset. */ - if (hw->mac_type == e1000_ich8lan) - e1000_set_pci_ex_no_snoop(hw, PCI_EX_82566_SNOOP_ALL); - if (hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER || hw->device_id == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3) { ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); @@ -963,7 +861,7 @@ e1000_adjust_serdes_amplitude(struct e1000_hw *hw) if(eeprom_data != EEPROM_RESERVED_WORD) { /* Adjust SERDES output amplitude only. */ - eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; + eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, eeprom_data); if(ret_val) return ret_val; @@ -1007,7 +905,6 @@ e1000_setup_link(struct e1000_hw *hw) */ if (hw->fc == e1000_fc_default) { switch (hw->mac_type) { - case e1000_ich8lan: case e1000_82573: hw->fc = e1000_fc_full; break; @@ -1074,12 +971,9 @@ e1000_setup_link(struct e1000_hw *hw) */ DEBUGOUT("Initializing the Flow Control address, type and timer regs\n"); - /* FCAL/H and FCT are hardcoded to standard values in e1000_ich8lan. */ - if (hw->mac_type != e1000_ich8lan) { - E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE); - E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH); - E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW); - } + E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW); + E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH); + E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE); E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time); @@ -1334,7 +1228,7 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) if (hw->phy_reset_disable) return E1000_SUCCESS; - + ret_val = e1000_phy_reset(hw); if (ret_val) { DEBUGOUT("Error Resetting the PHY\n"); @@ -1343,13 +1237,12 @@ e1000_copper_link_igp_setup(struct e1000_hw *hw) /* Wait 10ms for MAC to configure PHY from eeprom settings */ msec_delay(15); - if (hw->mac_type != e1000_ich8lan) { + /* Configure activity LED after PHY reset */ led_ctrl = E1000_READ_REG(hw, LEDCTL); led_ctrl &= IGP_ACTIVITY_LED_MASK; led_ctrl |= (IGP_ACTIVITY_LED_ENABLE | IGP_LED3_MODE); E1000_WRITE_REG(hw, LEDCTL, led_ctrl); - } /* disable lplu d3 during driver init */ ret_val = e1000_set_d3_lplu_state(hw, FALSE); @@ -1477,7 +1370,7 @@ e1000_copper_link_ggp_setup(struct e1000_hw *hw) DEBUGFUNC("e1000_copper_link_ggp_setup"); if(!hw->phy_reset_disable) { - + /* Enable CRS on TX for half-duplex operation. */ ret_val = e1000_read_phy_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); @@ -1585,7 +1478,8 @@ e1000_copper_link_ggp_setup(struct e1000_hw *hw) if (ret_val) return ret_val; - phy_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; + /* Enable Pass False Carrier on the PHY */ + phy_data |= GG82563_KMCR_PASS_FALSE_CARRIER; ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, phy_data); @@ -1625,7 +1519,7 @@ e1000_copper_link_mgp_setup(struct e1000_hw *hw) if(hw->phy_reset_disable) return E1000_SUCCESS; - + /* Enable CRS on TX. This must be set for half-duplex operation. */ ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); if(ret_val) @@ -1667,40 +1561,28 @@ e1000_copper_link_mgp_setup(struct e1000_hw *hw) phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL; if(hw->disable_polarity_correction == 1) phy_data |= M88E1000_PSCR_POLARITY_REVERSAL; - ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); - if (ret_val) - return ret_val; - - if (hw->phy_revision < M88E1011_I_REV_4) { - /* Force TX_CLK in the Extended PHY Specific Control Register - * to 25MHz clock. - */ - ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data); - if (ret_val) + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); + if(ret_val) return ret_val; - phy_data |= M88E1000_EPSCR_TX_CLK_25; + /* Force TX_CLK in the Extended PHY Specific Control Register + * to 25MHz clock. + */ + ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_data); + if(ret_val) + return ret_val; - if ((hw->phy_revision == E1000_REVISION_2) && - (hw->phy_id == M88E1111_I_PHY_ID)) { - /* Vidalia Phy, set the downshift counter to 5x */ - phy_data &= ~(M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK); - phy_data |= M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X; - ret_val = e1000_write_phy_reg(hw, - M88E1000_EXT_PHY_SPEC_CTRL, phy_data); - if (ret_val) - return ret_val; - } else { - /* Configure Master and Slave downshift values */ - phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | + phy_data |= M88E1000_EPSCR_TX_CLK_25; + + if (hw->phy_revision < M88E1011_I_REV_4) { + /* Configure Master and Slave downshift values */ + phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); - phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | + phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X); - ret_val = e1000_write_phy_reg(hw, - M88E1000_EXT_PHY_SPEC_CTRL, phy_data); - if (ret_val) - return ret_val; - } + ret_val = e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_data); + if(ret_val) + return ret_val; } /* SW Reset the PHY so all changes take effect */ @@ -1738,10 +1620,6 @@ e1000_copper_link_autoneg(struct e1000_hw *hw) if(hw->autoneg_advertised == 0) hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT; - /* IFE phy only supports 10/100 */ - if (hw->phy_type == e1000_phy_ife) - hw->autoneg_advertised &= AUTONEG_ADVERTISE_10_100_ALL; - DEBUGOUT("Reconfiguring auto-neg advertisement params\n"); ret_val = e1000_phy_setup_autoneg(hw); if(ret_val) { @@ -1787,7 +1665,7 @@ e1000_copper_link_autoneg(struct e1000_hw *hw) * collision distance in the Transmit Control Register. * 2) Set up flow control on the MAC to that established with * the link partner. -* 3) Config DSP to improve Gigabit link quality for some PHY revisions. +* 3) Config DSP to improve Gigabit link quality for some PHY revisions. * * hw - Struct containing variables accessed by shared code ******************************************************************************/ @@ -1796,7 +1674,7 @@ e1000_copper_link_postconfig(struct e1000_hw *hw) { int32_t ret_val; DEBUGFUNC("e1000_copper_link_postconfig"); - + if(hw->mac_type >= e1000_82544) { e1000_config_collision_dist(hw); } else { @@ -1820,7 +1698,7 @@ e1000_copper_link_postconfig(struct e1000_hw *hw) return ret_val; } } - + return E1000_SUCCESS; } @@ -1839,26 +1717,6 @@ e1000_setup_copper_link(struct e1000_hw *hw) DEBUGFUNC("e1000_setup_copper_link"); - switch (hw->mac_type) { - case e1000_80003es2lan: - case e1000_ich8lan: - /* Set the mac to wait the maximum time between each - * iteration and increase the max iterations when - * polling the phy; this fixes erroneous timeouts at 10Mbps. */ - ret_val = e1000_write_kmrn_reg(hw, GG82563_REG(0x34, 4), 0xFFFF); - if (ret_val) - return ret_val; - ret_val = e1000_read_kmrn_reg(hw, GG82563_REG(0x34, 9), ®_data); - if (ret_val) - return ret_val; - reg_data |= 0x3F; - ret_val = e1000_write_kmrn_reg(hw, GG82563_REG(0x34, 9), reg_data); - if (ret_val) - return ret_val; - default: - break; - } - /* Check if it is a valid PHY and set PHY mode if necessary. */ ret_val = e1000_copper_link_preconfig(hw); if(ret_val) @@ -1866,8 +1724,10 @@ e1000_setup_copper_link(struct e1000_hw *hw) switch (hw->mac_type) { case e1000_80003es2lan: - /* Kumeran registers are written-only */ - reg_data = E1000_KUMCTRLSTA_INB_CTRL_LINK_STATUS_TX_TIMEOUT_DEFAULT; + ret_val = e1000_read_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL, + ®_data); + if (ret_val) + return ret_val; reg_data |= E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING; ret_val = e1000_write_kmrn_reg(hw, E1000_KUMCTRLSTA_OFFSET_INB_CTRL, reg_data); @@ -1879,7 +1739,6 @@ e1000_setup_copper_link(struct e1000_hw *hw) } if (hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || hw->phy_type == e1000_phy_igp_2) { ret_val = e1000_copper_link_igp_setup(hw); if(ret_val) @@ -1895,11 +1754,11 @@ e1000_setup_copper_link(struct e1000_hw *hw) } if(hw->autoneg) { - /* Setup autoneg and flow control advertisement - * and perform autonegotiation */ + /* Setup autoneg and flow control advertisement + * and perform autonegotiation */ ret_val = e1000_copper_link_autoneg(hw); if(ret_val) - return ret_val; + return ret_val; } else { /* PHY will be set to 10H, 10F, 100H,or 100F * depending on value from forced_speed_duplex. */ @@ -1927,7 +1786,7 @@ e1000_setup_copper_link(struct e1000_hw *hw) ret_val = e1000_copper_link_postconfig(hw); if(ret_val) return ret_val; - + DEBUGOUT("Valid link established!!!\n"); return E1000_SUCCESS; } @@ -1944,7 +1803,7 @@ e1000_setup_copper_link(struct e1000_hw *hw) * hw - Struct containing variables accessed by shared code ******************************************************************************/ static int32_t -e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, uint16_t duplex) +e1000_configure_kmrn_for_10_100(struct e1000_hw *hw) { int32_t ret_val = E1000_SUCCESS; uint32_t tipg; @@ -1964,18 +1823,6 @@ e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, uint16_t duplex) tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_10_100; E1000_WRITE_REG(hw, TIPG, tipg); - ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); - - if (ret_val) - return ret_val; - - if (duplex == HALF_DUPLEX) - reg_data |= GG82563_KMCR_PASS_FALSE_CARRIER; - else - reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - - ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); - return ret_val; } @@ -2000,14 +1847,6 @@ e1000_configure_kmrn_for_1000(struct e1000_hw *hw) tipg |= DEFAULT_80003ES2LAN_TIPG_IPGT_1000; E1000_WRITE_REG(hw, TIPG, tipg); - ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); - - if (ret_val) - return ret_val; - - reg_data &= ~GG82563_KMCR_PASS_FALSE_CARRIER; - ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); - return ret_val; } @@ -2030,13 +1869,10 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw) if(ret_val) return ret_val; - if (hw->phy_type != e1000_phy_ife) { - /* Read the MII 1000Base-T Control Register (Address 9). */ - ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg); - if (ret_val) - return ret_val; - } else - mii_1000t_ctrl_reg=0; + /* Read the MII 1000Base-T Control Register (Address 9). */ + ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg); + if(ret_val) + return ret_val; /* Need to parse both autoneg_advertised and fc and set up * the appropriate PHY registers. First we will parse for @@ -2087,9 +1923,6 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw) if(hw->autoneg_advertised & ADVERTISE_1000_FULL) { DEBUGOUT("Advertise 1000mb Full duplex\n"); mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS; - if (hw->phy_type == e1000_phy_ife) { - DEBUGOUT("e1000_phy_ife is a 10/100 PHY. Gigabit speed is not supported.\n"); - } } /* Check for a software override of the flow control settings, and @@ -2151,11 +1984,9 @@ e1000_phy_setup_autoneg(struct e1000_hw *hw) DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); - if (hw->phy_type != e1000_phy_ife) { - ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); - if (ret_val) - return ret_val; - } + ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); + if(ret_val) + return ret_val; return E1000_SUCCESS; } @@ -2258,18 +2089,6 @@ e1000_phy_force_speed_duplex(struct e1000_hw *hw) /* Need to reset the PHY or these changes will be ignored */ mii_ctrl_reg |= MII_CR_RESET; - /* Disable MDI-X support for 10/100 */ - } else if (hw->phy_type == e1000_phy_ife) { - ret_val = e1000_read_phy_reg(hw, IFE_PHY_MDIX_CONTROL, &phy_data); - if (ret_val) - return ret_val; - - phy_data &= ~IFE_PMC_AUTO_MDIX; - phy_data &= ~IFE_PMC_FORCE_MDIX; - - ret_val = e1000_write_phy_reg(hw, IFE_PHY_MDIX_CONTROL, phy_data); - if (ret_val) - return ret_val; } else { /* Clear Auto-Crossover to force MDI manually. IGP requires MDI * forced whenever speed or duplex are forced. @@ -2454,7 +2273,7 @@ e1000_config_mac_to_phy(struct e1000_hw *hw) DEBUGFUNC("e1000_config_mac_to_phy"); - /* 82544 or newer MAC, Auto Speed Detection takes care of + /* 82544 or newer MAC, Auto Speed Detection takes care of * MAC speed/duplex configuration.*/ if (hw->mac_type >= e1000_82544) return E1000_SUCCESS; @@ -2473,9 +2292,9 @@ e1000_config_mac_to_phy(struct e1000_hw *hw) if(ret_val) return ret_val; - if(phy_data & M88E1000_PSSR_DPLX) + if(phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; - else + else ctrl &= ~E1000_CTRL_FD; e1000_config_collision_dist(hw); @@ -2674,10 +2493,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) */ if(hw->original_fc == e1000_fc_full) { hw->fc = e1000_fc_full; - DEBUGOUT("Flow Control = FULL.\n"); + DEBUGOUT("Flow Control = FULL.\r\n"); } else { hw->fc = e1000_fc_rx_pause; - DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); + DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); } } /* For receiving PAUSE frames ONLY. @@ -2693,7 +2512,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { hw->fc = e1000_fc_tx_pause; - DEBUGOUT("Flow Control = TX PAUSE frames only.\n"); + DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n"); } /* For transmitting PAUSE frames ONLY. * @@ -2708,7 +2527,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { hw->fc = e1000_fc_rx_pause; - DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); + DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); } /* Per the IEEE spec, at this point flow control should be * disabled. However, we want to consider that we could @@ -2734,10 +2553,10 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) hw->original_fc == e1000_fc_tx_pause) || hw->fc_strict_ieee) { hw->fc = e1000_fc_none; - DEBUGOUT("Flow Control = NONE.\n"); + DEBUGOUT("Flow Control = NONE.\r\n"); } else { hw->fc = e1000_fc_rx_pause; - DEBUGOUT("Flow Control = RX PAUSE frames only.\n"); + DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); } /* Now we need to do one last check... If we auto- @@ -2762,7 +2581,7 @@ e1000_config_fc_after_link_up(struct e1000_hw *hw) return ret_val; } } else { - DEBUGOUT("Copper PHY and Auto Neg has not completed.\n"); + DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n"); } } return E1000_SUCCESS; @@ -2902,12 +2721,8 @@ e1000_check_for_link(struct e1000_hw *hw) */ if(hw->tbi_compatibility_en) { uint16_t speed, duplex; - ret_val = e1000_get_speed_and_duplex(hw, &speed, &duplex); - if (ret_val) { - DEBUGOUT("Error getting link speed and duplex\n"); - return ret_val; - } - if (speed != SPEED_1000) { + e1000_get_speed_and_duplex(hw, &speed, &duplex); + if(speed != SPEED_1000) { /* If link speed is not set to gigabit speed, we do not need * to enable TBI compatibility. */ @@ -2949,7 +2764,7 @@ e1000_check_for_link(struct e1000_hw *hw) hw->autoneg_failed = 1; return 0; } - DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\n"); + DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n"); /* Disable auto-negotiation in the TXCW register */ E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); @@ -2974,7 +2789,7 @@ e1000_check_for_link(struct e1000_hw *hw) else if(((hw->media_type == e1000_media_type_fiber) || (hw->media_type == e1000_media_type_internal_serdes)) && (ctrl & E1000_CTRL_SLU) && (rxcw & E1000_RXCW_C)) { - DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\n"); + DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n"); E1000_WRITE_REG(hw, TXCW, hw->txcw); E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); @@ -3037,13 +2852,13 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw, if(status & E1000_STATUS_FD) { *duplex = FULL_DUPLEX; - DEBUGOUT("Full Duplex\n"); + DEBUGOUT("Full Duplex\r\n"); } else { *duplex = HALF_DUPLEX; - DEBUGOUT(" Half Duplex\n"); + DEBUGOUT(" Half Duplex\r\n"); } } else { - DEBUGOUT("1000 Mbs, Full Duplex\n"); + DEBUGOUT("1000 Mbs, Full Duplex\r\n"); *speed = SPEED_1000; *duplex = FULL_DUPLEX; } @@ -3069,18 +2884,12 @@ e1000_get_speed_and_duplex(struct e1000_hw *hw, } } - if ((hw->mac_type == e1000_80003es2lan) && + if ((hw->mac_type == e1000_80003es2lan) && (hw->media_type == e1000_media_type_copper)) { if (*speed == SPEED_1000) ret_val = e1000_configure_kmrn_for_1000(hw); else - ret_val = e1000_configure_kmrn_for_10_100(hw, *duplex); - if (ret_val) - return ret_val; - } - - if ((hw->phy_type == e1000_phy_igp_3) && (*speed == SPEED_1000)) { - ret_val = e1000_kumeran_lock_loss_workaround(hw); + ret_val = e1000_configure_kmrn_for_10_100(hw); if (ret_val) return ret_val; } @@ -3260,7 +3069,7 @@ e1000_shift_in_mdi_bits(struct e1000_hw *hw) return data; } -static int32_t +int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) { uint32_t swfw_sync = 0; @@ -3270,9 +3079,6 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) DEBUGFUNC("e1000_swfw_sync_acquire"); - if (hw->swfwhw_semaphore_present) - return e1000_get_software_flag(hw); - if (!hw->swfw_sync_present) return e1000_get_hw_eeprom_semaphore(hw); @@ -3304,7 +3110,7 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) return E1000_SUCCESS; } -static void +void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) { uint32_t swfw_sync; @@ -3312,11 +3118,6 @@ e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) DEBUGFUNC("e1000_swfw_sync_release"); - if (hw->swfwhw_semaphore_present) { - e1000_release_software_flag(hw); - return; - } - if (!hw->swfw_sync_present) { e1000_put_hw_eeprom_semaphore(hw); return; @@ -3359,8 +3160,7 @@ e1000_read_phy_reg(struct e1000_hw *hw, if (e1000_swfw_sync_acquire(hw, swfw)) return -E1000_ERR_SWFW_SYNC; - if ((hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || + if((hw->phy_type == e1000_phy_igp || hw->phy_type == e1000_phy_igp_2) && (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, @@ -3499,8 +3299,7 @@ e1000_write_phy_reg(struct e1000_hw *hw, if (e1000_swfw_sync_acquire(hw, swfw)) return -E1000_ERR_SWFW_SYNC; - if ((hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || + if((hw->phy_type == e1000_phy_igp || hw->phy_type == e1000_phy_igp_2) && (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, @@ -3602,7 +3401,7 @@ e1000_write_phy_reg_ex(struct e1000_hw *hw, return E1000_SUCCESS; } -static int32_t +int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data) @@ -3635,7 +3434,7 @@ e1000_read_kmrn_reg(struct e1000_hw *hw, return E1000_SUCCESS; } -static int32_t +int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data) @@ -3698,24 +3497,24 @@ e1000_phy_hw_reset(struct e1000_hw *hw) } /* Read the device control register and assert the E1000_CTRL_PHY_RST * bit. Then, take it out of reset. - * For pre-e1000_82571 hardware, we delay for 10ms between the assert + * For pre-e1000_82571 hardware, we delay for 10ms between the assert * and deassert. For e1000_82571 hardware and later, we instead delay * for 50us between and 10ms after the deassertion. */ ctrl = E1000_READ_REG(hw, CTRL); E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); E1000_WRITE_FLUSH(hw); - - if (hw->mac_type < e1000_82571) + + if (hw->mac_type < e1000_82571) msec_delay(10); else udelay(100); - + E1000_WRITE_REG(hw, CTRL, ctrl); E1000_WRITE_FLUSH(hw); - + if (hw->mac_type >= e1000_82571) - msec_delay_irq(10); + msec_delay(10); e1000_swfw_sync_release(hw, swfw); } else { /* Read the Extended Device Control Register, assert the PHY_RESET_DIR @@ -3745,12 +3544,6 @@ e1000_phy_hw_reset(struct e1000_hw *hw) ret_val = e1000_get_phy_cfg_done(hw); e1000_release_software_semaphore(hw); - if ((hw->mac_type == e1000_ich8lan) && - (hw->phy_type == e1000_phy_igp_3)) { - ret_val = e1000_init_lcd_from_nvm(hw); - if (ret_val) - return ret_val; - } return ret_val; } @@ -3779,11 +3572,9 @@ e1000_phy_reset(struct e1000_hw *hw) case e1000_82541_rev_2: case e1000_82571: case e1000_82572: - case e1000_ich8lan: ret_val = e1000_phy_hw_reset(hw); if(ret_val) return ret_val; - break; default: ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data); @@ -3805,121 +3596,12 @@ e1000_phy_reset(struct e1000_hw *hw) return E1000_SUCCESS; } -/****************************************************************************** -* Work-around for 82566 power-down: on D3 entry- -* 1) disable gigabit link -* 2) write VR power-down enable -* 3) read it back -* if successful continue, else issue LCD reset and repeat -* -* hw - struct containing variables accessed by shared code -******************************************************************************/ -void -e1000_phy_powerdown_workaround(struct e1000_hw *hw) -{ - int32_t reg; - uint16_t phy_data; - int32_t retry = 0; - - DEBUGFUNC("e1000_phy_powerdown_workaround"); - - if (hw->phy_type != e1000_phy_igp_3) - return; - - do { - /* Disable link */ - reg = E1000_READ_REG(hw, PHY_CTRL); - E1000_WRITE_REG(hw, PHY_CTRL, reg | E1000_PHY_CTRL_GBE_DISABLE | - E1000_PHY_CTRL_NOND0A_GBE_DISABLE); - - /* Write VR power-down enable */ - e1000_read_phy_reg(hw, IGP3_VR_CTRL, &phy_data); - e1000_write_phy_reg(hw, IGP3_VR_CTRL, phy_data | - IGP3_VR_CTRL_MODE_SHUT); - - /* Read it back and test */ - e1000_read_phy_reg(hw, IGP3_VR_CTRL, &phy_data); - if ((phy_data & IGP3_VR_CTRL_MODE_SHUT) || retry) - break; - - /* Issue PHY reset and repeat at most one more time */ - reg = E1000_READ_REG(hw, CTRL); - E1000_WRITE_REG(hw, CTRL, reg | E1000_CTRL_PHY_RST); - retry++; - } while (retry); - - return; - -} - -/****************************************************************************** -* Work-around for 82566 Kumeran PCS lock loss: -* On link status change (i.e. PCI reset, speed change) and link is up and -* speed is gigabit- -* 0) if workaround is optionally disabled do nothing -* 1) wait 1ms for Kumeran link to come up -* 2) check Kumeran Diagnostic register PCS lock loss bit -* 3) if not set the link is locked (all is good), otherwise... -* 4) reset the PHY -* 5) repeat up to 10 times -* Note: this is only called for IGP3 copper when speed is 1gb. -* -* hw - struct containing variables accessed by shared code -******************************************************************************/ -static int32_t -e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) -{ - int32_t ret_val; - int32_t reg; - int32_t cnt; - uint16_t phy_data; - - if (hw->kmrn_lock_loss_workaround_disabled) - return E1000_SUCCESS; - - /* Make sure link is up before proceeding. If not just return. - * Attempting this while link is negotiating fouls up link - * stability */ - ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data); - ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data); - - if (phy_data & MII_SR_LINK_STATUS) { - for (cnt = 0; cnt < 10; cnt++) { - /* read once to clear */ - ret_val = e1000_read_phy_reg(hw, IGP3_KMRN_DIAG, &phy_data); - if (ret_val) - return ret_val; - /* and again to get new status */ - ret_val = e1000_read_phy_reg(hw, IGP3_KMRN_DIAG, &phy_data); - if (ret_val) - return ret_val; - - /* check for PCS lock */ - if (!(phy_data & IGP3_KMRN_DIAG_PCS_LOCK_LOSS)) - return E1000_SUCCESS; - - /* Issue PHY reset */ - e1000_phy_hw_reset(hw); - msec_delay_irq(5); - } - /* Disable GigE link negotiation */ - reg = E1000_READ_REG(hw, PHY_CTRL); - E1000_WRITE_REG(hw, PHY_CTRL, reg | E1000_PHY_CTRL_GBE_DISABLE | - E1000_PHY_CTRL_NOND0A_GBE_DISABLE); - - /* unable to acquire PCS lock */ - return E1000_ERR_PHY; - } - - return E1000_SUCCESS; -} - /****************************************************************************** * Probes the expected PHY address for known PHY IDs * * hw - Struct containing variables accessed by shared code ******************************************************************************/ -int32_t +static int32_t e1000_detect_gig_phy(struct e1000_hw *hw) { int32_t phy_init_status, ret_val; @@ -3931,8 +3613,8 @@ e1000_detect_gig_phy(struct e1000_hw *hw) /* The 82571 firmware may still be configuring the PHY. In this * case, we cannot access the PHY until the configuration is done. So * we explicitly set the PHY values. */ - if (hw->mac_type == e1000_82571 || - hw->mac_type == e1000_82572) { + if(hw->mac_type == e1000_82571 || + hw->mac_type == e1000_82572) { hw->phy_id = IGP01E1000_I_PHY_ID; hw->phy_type = e1000_phy_igp_2; return E1000_SUCCESS; @@ -3949,7 +3631,7 @@ e1000_detect_gig_phy(struct e1000_hw *hw) /* Read the PHY ID Registers to identify which PHY is onboard. */ ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high); - if (ret_val) + if(ret_val) return ret_val; hw->phy_id = (uint32_t) (phy_id_high << 16); @@ -3987,12 +3669,6 @@ e1000_detect_gig_phy(struct e1000_hw *hw) case e1000_80003es2lan: if (hw->phy_id == GG82563_E_PHY_ID) match = TRUE; break; - case e1000_ich8lan: - if (hw->phy_id == IGP03E1000_E_PHY_ID) match = TRUE; - if (hw->phy_id == IFE_E_PHY_ID) match = TRUE; - if (hw->phy_id == IFE_PLUS_E_PHY_ID) match = TRUE; - if (hw->phy_id == IFE_C_E_PHY_ID) match = TRUE; - break; default: DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); return -E1000_ERR_CONFIG; @@ -4107,53 +3783,6 @@ e1000_phy_igp_get_info(struct e1000_hw *hw, return E1000_SUCCESS; } -/****************************************************************************** -* Get PHY information from various PHY registers for ife PHY only. -* -* hw - Struct containing variables accessed by shared code -* phy_info - PHY information structure -******************************************************************************/ -static int32_t -e1000_phy_ife_get_info(struct e1000_hw *hw, - struct e1000_phy_info *phy_info) -{ - int32_t ret_val; - uint16_t phy_data, polarity; - - DEBUGFUNC("e1000_phy_ife_get_info"); - - phy_info->downshift = (e1000_downshift)hw->speed_downgraded; - phy_info->extended_10bt_distance = e1000_10bt_ext_dist_enable_normal; - - ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data); - if (ret_val) - return ret_val; - phy_info->polarity_correction = - (phy_data & IFE_PSC_AUTO_POLARITY_DISABLE) >> - IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT; - - if (phy_info->polarity_correction == e1000_polarity_reversal_enabled) { - ret_val = e1000_check_polarity(hw, &polarity); - if (ret_val) - return ret_val; - } else { - /* Polarity is forced. */ - polarity = (phy_data & IFE_PSC_FORCE_POLARITY) >> - IFE_PSC_FORCE_POLARITY_SHIFT; - } - phy_info->cable_polarity = polarity; - - ret_val = e1000_read_phy_reg(hw, IFE_PHY_MDIX_CONTROL, &phy_data); - if (ret_val) - return ret_val; - - phy_info->mdix_mode = - (phy_data & (IFE_PMC_AUTO_MDIX | IFE_PMC_FORCE_MDIX)) >> - IFE_PMC_MDIX_MODE_SHIFT; - - return E1000_SUCCESS; -} - /****************************************************************************** * Get PHY information from various PHY registers fot m88 PHY only. * @@ -4187,7 +3816,7 @@ e1000_phy_m88_get_info(struct e1000_hw *hw, /* Check polarity status */ ret_val = e1000_check_polarity(hw, &polarity); if(ret_val) - return ret_val; + return ret_val; phy_info->cable_polarity = polarity; ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); @@ -4269,12 +3898,9 @@ e1000_phy_get_info(struct e1000_hw *hw, return -E1000_ERR_CONFIG; } - if (hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || + if(hw->phy_type == e1000_phy_igp || hw->phy_type == e1000_phy_igp_2) return e1000_phy_igp_get_info(hw, phy_info); - else if (hw->phy_type == e1000_phy_ife) - return e1000_phy_ife_get_info(hw, phy_info); else return e1000_phy_m88_get_info(hw, phy_info); } @@ -4423,35 +4049,6 @@ e1000_init_eeprom_params(struct e1000_hw *hw) eeprom->use_eerd = TRUE; eeprom->use_eewr = FALSE; break; - case e1000_ich8lan: - { - int32_t i = 0; - uint32_t flash_size = E1000_READ_ICH8_REG(hw, ICH8_FLASH_GFPREG); - - eeprom->type = e1000_eeprom_ich8; - eeprom->use_eerd = FALSE; - eeprom->use_eewr = FALSE; - eeprom->word_size = E1000_SHADOW_RAM_WORDS; - - /* Zero the shadow RAM structure. But don't load it from NVM - * so as to save time for driver init */ - if (hw->eeprom_shadow_ram != NULL) { - for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) { - hw->eeprom_shadow_ram[i].modified = FALSE; - hw->eeprom_shadow_ram[i].eeprom_word = 0xFFFF; - } - } - - hw->flash_base_addr = (flash_size & ICH8_GFPREG_BASE_MASK) * - ICH8_FLASH_SECTOR_SIZE; - - hw->flash_bank_size = ((flash_size >> 16) & ICH8_GFPREG_BASE_MASK) + 1; - hw->flash_bank_size -= (flash_size & ICH8_GFPREG_BASE_MASK); - hw->flash_bank_size *= ICH8_FLASH_SECTOR_SIZE; - hw->flash_bank_size /= 2 * sizeof(uint16_t); - - break; - } default: break; } @@ -4872,10 +4469,7 @@ e1000_read_eeprom(struct e1000_hw *hw, return ret_val; } - if (eeprom->type == e1000_eeprom_ich8) - return e1000_read_eeprom_ich8(hw, offset, words, data); - - if (eeprom->type == e1000_eeprom_spi) { + if(eeprom->type == e1000_eeprom_spi) { uint16_t word_in; uint8_t read_opcode = EEPROM_READ_OPCODE_SPI; @@ -4947,14 +4541,14 @@ e1000_read_eeprom_eerd(struct e1000_hw *hw, E1000_WRITE_REG(hw, EERD, eerd); error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_READ); - + if(error) { break; } data[i] = (E1000_READ_REG(hw, EERD) >> E1000_EEPROM_RW_REG_DATA); - + } - + return error; } @@ -4980,24 +4574,24 @@ e1000_write_eeprom_eewr(struct e1000_hw *hw, return -E1000_ERR_SWFW_SYNC; for (i = 0; i < words; i++) { - register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | - ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | + register_value = (data[i] << E1000_EEPROM_RW_REG_DATA) | + ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) | E1000_EEPROM_RW_REG_START; error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); if(error) { break; - } + } E1000_WRITE_REG(hw, EEWR, register_value); - + error = e1000_poll_eerd_eewr_done(hw, E1000_EEPROM_POLL_WRITE); - + if(error) { break; - } + } } - + e1000_swfw_sync_release(hw, E1000_SWFW_EEP_SM); return error; } @@ -5017,7 +4611,7 @@ e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) for(i = 0; i < attempts; i++) { if(eerd == E1000_EEPROM_POLL_READ) reg = E1000_READ_REG(hw, EERD); - else + else reg = E1000_READ_REG(hw, EEWR); if(reg & E1000_EEPROM_RW_REG_DONE) { @@ -5042,10 +4636,7 @@ e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) DEBUGFUNC("e1000_is_onboard_nvm_eeprom"); - if (hw->mac_type == e1000_ich8lan) - return FALSE; - - if (hw->mac_type == e1000_82573) { + if(hw->mac_type == e1000_82573) { eecd = E1000_READ_REG(hw, EECD); /* Isolate bits 15 & 16 */ @@ -5095,22 +4686,8 @@ e1000_validate_eeprom_checksum(struct e1000_hw *hw) } } - if (hw->mac_type == e1000_ich8lan) { - /* Drivers must allocate the shadow ram structure for the - * EEPROM checksum to be updated. Otherwise, this bit as well - * as the checksum must both be set correctly for this - * validation to pass. - */ - e1000_read_eeprom(hw, 0x19, 1, &eeprom_data); - if ((eeprom_data & 0x40) == 0) { - eeprom_data |= 0x40; - e1000_write_eeprom(hw, 0x19, 1, &eeprom_data); - e1000_update_eeprom_checksum(hw); - } - } - - for (i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) { - if (e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) { + for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) { + if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) { DEBUGOUT("EEPROM Read Error\n"); return -E1000_ERR_EEPROM; } @@ -5136,7 +4713,6 @@ e1000_validate_eeprom_checksum(struct e1000_hw *hw) int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw) { - uint32_t ctrl_ext; uint16_t checksum = 0; uint16_t i, eeprom_data; @@ -5155,14 +4731,6 @@ e1000_update_eeprom_checksum(struct e1000_hw *hw) return -E1000_ERR_EEPROM; } else if (hw->eeprom.type == e1000_eeprom_flash) { e1000_commit_shadow_ram(hw); - } else if (hw->eeprom.type == e1000_eeprom_ich8) { - e1000_commit_shadow_ram(hw); - /* Reload the EEPROM, or else modifications will not appear - * until after next adapter reset. */ - ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); - ctrl_ext |= E1000_CTRL_EXT_EE_RST; - E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); - msec_delay(10); } return E1000_SUCCESS; } @@ -5202,9 +4770,6 @@ e1000_write_eeprom(struct e1000_hw *hw, if(eeprom->use_eewr == TRUE) return e1000_write_eeprom_eewr(hw, offset, words, data); - if (eeprom->type == e1000_eeprom_ich8) - return e1000_write_eeprom_ich8(hw, offset, words, data); - /* Prepare the EEPROM for writing */ if (e1000_acquire_eeprom(hw) != E1000_SUCCESS) return -E1000_ERR_EEPROM; @@ -5392,17 +4957,11 @@ e1000_commit_shadow_ram(struct e1000_hw *hw) uint32_t flop = 0; uint32_t i = 0; int32_t error = E1000_SUCCESS; - uint32_t old_bank_offset = 0; - uint32_t new_bank_offset = 0; - uint32_t sector_retries = 0; - uint8_t low_byte = 0; - uint8_t high_byte = 0; - uint8_t temp_byte = 0; - boolean_t sector_write_failed = FALSE; + + /* The flop register will be used to determine if flash type is STM */ + flop = E1000_READ_REG(hw, FLOP); if (hw->mac_type == e1000_82573) { - /* The flop register will be used to determine if flash type is STM */ - flop = E1000_READ_REG(hw, FLOP); for (i=0; i < attempts; i++) { eecd = E1000_READ_REG(hw, EECD); if ((eecd & E1000_EECD_FLUPD) == 0) { @@ -5436,108 +4995,8 @@ e1000_commit_shadow_ram(struct e1000_hw *hw) } } - if (hw->mac_type == e1000_ich8lan && hw->eeprom_shadow_ram != NULL) { - /* We're writing to the opposite bank so if we're on bank 1, - * write to bank 0 etc. We also need to erase the segment that - * is going to be written */ - if (!(E1000_READ_REG(hw, EECD) & E1000_EECD_SEC1VAL)) { - new_bank_offset = hw->flash_bank_size * 2; - old_bank_offset = 0; - e1000_erase_ich8_4k_segment(hw, 1); - } else { - old_bank_offset = hw->flash_bank_size * 2; - new_bank_offset = 0; - e1000_erase_ich8_4k_segment(hw, 0); - } - - do { - sector_write_failed = FALSE; - /* Loop for every byte in the shadow RAM, - * which is in units of words. */ - for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) { - /* Determine whether to write the value stored - * in the other NVM bank or a modified value stored - * in the shadow RAM */ - if (hw->eeprom_shadow_ram[i].modified == TRUE) { - low_byte = (uint8_t)hw->eeprom_shadow_ram[i].eeprom_word; - e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset, - &temp_byte); - udelay(100); - error = e1000_verify_write_ich8_byte(hw, - (i << 1) + new_bank_offset, - low_byte); - if (error != E1000_SUCCESS) - sector_write_failed = TRUE; - high_byte = - (uint8_t)(hw->eeprom_shadow_ram[i].eeprom_word >> 8); - e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset + 1, - &temp_byte); - udelay(100); - } else { - e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset, - &low_byte); - udelay(100); - error = e1000_verify_write_ich8_byte(hw, - (i << 1) + new_bank_offset, low_byte); - if (error != E1000_SUCCESS) - sector_write_failed = TRUE; - e1000_read_ich8_byte(hw, (i << 1) + old_bank_offset + 1, - &high_byte); - } - - /* If the word is 0x13, then make sure the signature bits - * (15:14) are 11b until the commit has completed. - * This will allow us to write 10b which indicates the - * signature is valid. We want to do this after the write - * has completed so that we don't mark the segment valid - * while the write is still in progress */ - if (i == E1000_ICH8_NVM_SIG_WORD) - high_byte = E1000_ICH8_NVM_SIG_MASK | high_byte; - - error = e1000_verify_write_ich8_byte(hw, - (i << 1) + new_bank_offset + 1, high_byte); - if (error != E1000_SUCCESS) - sector_write_failed = TRUE; - - if (sector_write_failed == FALSE) { - /* Clear the now not used entry in the cache */ - hw->eeprom_shadow_ram[i].modified = FALSE; - hw->eeprom_shadow_ram[i].eeprom_word = 0xFFFF; - } - } - - /* Don't bother writing the segment valid bits if sector - * programming failed. */ - if (sector_write_failed == FALSE) { - /* Finally validate the new segment by setting bit 15:14 - * to 10b in word 0x13 , this can be done without an - * erase as well since these bits are 11 to start with - * and we need to change bit 14 to 0b */ - e1000_read_ich8_byte(hw, - E1000_ICH8_NVM_SIG_WORD * 2 + 1 + new_bank_offset, - &high_byte); - high_byte &= 0xBF; - error = e1000_verify_write_ich8_byte(hw, - E1000_ICH8_NVM_SIG_WORD * 2 + 1 + new_bank_offset, - high_byte); - if (error != E1000_SUCCESS) - sector_write_failed = TRUE; - - /* And invalidate the previously valid segment by setting - * its signature word (0x13) high_byte to 0b. This can be - * done without an erase because flash erase sets all bits - * to 1's. We can write 1's to 0's without an erase */ - error = e1000_verify_write_ich8_byte(hw, - E1000_ICH8_NVM_SIG_WORD * 2 + 1 + old_bank_offset, - 0); - if (error != E1000_SUCCESS) - sector_write_failed = TRUE; - } - } while (++sector_retries < 10 && sector_write_failed == TRUE); - } - - return error; -} + return error; +} /****************************************************************************** * Reads the adapter's part number from the EEPROM @@ -5643,19 +5102,15 @@ e1000_init_rx_addrs(struct e1000_hw *hw) * the other port. */ if ((hw->mac_type == e1000_82571) && (hw->laa_is_present == TRUE)) rar_num -= 1; - if (hw->mac_type == e1000_ich8lan) - rar_num = E1000_RAR_ENTRIES_ICH8LAN; - /* Zero out the other 15 receive addresses. */ DEBUGOUT("Clearing RAR[1-15]\n"); for(i = 1; i < rar_num; i++) { E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); - E1000_WRITE_FLUSH(hw); } } +#if 0 /****************************************************************************** * Updates the MAC's list of multicast addresses. * @@ -5670,7 +5125,6 @@ e1000_init_rx_addrs(struct e1000_hw *hw) * for the first 15 multicast addresses, and hashes the rest into the * multicast table. *****************************************************************************/ -#if 0 void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t *mc_addr_list, @@ -5682,7 +5136,7 @@ e1000_mc_addr_list_update(struct e1000_hw *hw, uint32_t i; uint32_t num_rar_entry; uint32_t num_mta_entry; - + DEBUGFUNC("e1000_mc_addr_list_update"); /* Set the new number of MC addresses that we are being requested to use. */ @@ -5691,8 +5145,6 @@ e1000_mc_addr_list_update(struct e1000_hw *hw, /* Clear RAR[1-15] */ DEBUGOUT(" Clearing RAR[1-15]\n"); num_rar_entry = E1000_RAR_ENTRIES; - if (hw->mac_type == e1000_ich8lan) - num_rar_entry = E1000_RAR_ENTRIES_ICH8LAN; /* Reserve a spot for the Locally Administered Address to work around * an 82571 issue in which a reset on one port will reload the MAC on * the other port. */ @@ -5701,19 +5153,14 @@ e1000_mc_addr_list_update(struct e1000_hw *hw, for(i = rar_used_count; i < num_rar_entry; i++) { E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); - E1000_WRITE_FLUSH(hw); } /* Clear the MTA */ DEBUGOUT(" Clearing MTA\n"); num_mta_entry = E1000_NUM_MTA_REGISTERS; - if (hw->mac_type == e1000_ich8lan) - num_mta_entry = E1000_NUM_MTA_REGISTERS_ICH8LAN; for(i = 0; i < num_mta_entry; i++) { E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); - E1000_WRITE_FLUSH(hw); } /* Add the new addresses */ @@ -5770,46 +5217,24 @@ e1000_hash_mc_addr(struct e1000_hw *hw, * LSB MSB */ case 0: - if (hw->mac_type == e1000_ich8lan) { - /* [47:38] i.e. 0x158 for above example address */ - hash_value = ((mc_addr[4] >> 6) | (((uint16_t) mc_addr[5]) << 2)); - } else { - /* [47:36] i.e. 0x563 for above example address */ - hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); - } + /* [47:36] i.e. 0x563 for above example address */ + hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); break; case 1: - if (hw->mac_type == e1000_ich8lan) { - /* [46:37] i.e. 0x2B1 for above example address */ - hash_value = ((mc_addr[4] >> 5) | (((uint16_t) mc_addr[5]) << 3)); - } else { - /* [46:35] i.e. 0xAC6 for above example address */ - hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5)); - } + /* [46:35] i.e. 0xAC6 for above example address */ + hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5)); break; case 2: - if (hw->mac_type == e1000_ich8lan) { - /*[45:36] i.e. 0x163 for above example address */ - hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); - } else { - /* [45:34] i.e. 0x5D8 for above example address */ - hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); - } + /* [45:34] i.e. 0x5D8 for above example address */ + hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); break; case 3: - if (hw->mac_type == e1000_ich8lan) { - /* [43:34] i.e. 0x18D for above example address */ - hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); - } else { - /* [43:32] i.e. 0x634 for above example address */ - hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8)); - } + /* [43:32] i.e. 0x634 for above example address */ + hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8)); break; } hash_value &= 0xFFF; - if (hw->mac_type == e1000_ich8lan) - hash_value &= 0x3FF; return hash_value; } @@ -5837,8 +5262,6 @@ e1000_mta_set(struct e1000_hw *hw, * register are determined by the lower 5 bits of the value. */ hash_reg = (hash_value >> 5) & 0x7F; - if (hw->mac_type == e1000_ich8lan) - hash_reg &= 0x1F; hash_bit = hash_value & 0x1F; mta = E1000_READ_REG_ARRAY(hw, MTA, hash_reg); @@ -5852,12 +5275,9 @@ e1000_mta_set(struct e1000_hw *hw, if((hw->mac_type == e1000_82544) && ((hash_reg & 0x1) == 1)) { temp = E1000_READ_REG_ARRAY(hw, MTA, (hash_reg - 1)); E1000_WRITE_REG_ARRAY(hw, MTA, hash_reg, mta); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, MTA, (hash_reg - 1), temp); - E1000_WRITE_FLUSH(hw); } else { E1000_WRITE_REG_ARRAY(hw, MTA, hash_reg, mta); - E1000_WRITE_FLUSH(hw); } } @@ -5914,9 +5334,7 @@ e1000_rar_set(struct e1000_hw *hw, } E1000_WRITE_REG_ARRAY(hw, RA, (index << 1), rar_low); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, RA, ((index << 1) + 1), rar_high); - E1000_WRITE_FLUSH(hw); } /****************************************************************************** @@ -5933,18 +5351,12 @@ e1000_write_vfta(struct e1000_hw *hw, { uint32_t temp; - if (hw->mac_type == e1000_ich8lan) - return; - - if ((hw->mac_type == e1000_82544) && ((offset & 0x1) == 1)) { + if((hw->mac_type == e1000_82544) && ((offset & 0x1) == 1)) { temp = E1000_READ_REG_ARRAY(hw, VFTA, (offset - 1)); E1000_WRITE_REG_ARRAY(hw, VFTA, offset, value); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, VFTA, (offset - 1), temp); - E1000_WRITE_FLUSH(hw); } else { E1000_WRITE_REG_ARRAY(hw, VFTA, offset, value); - E1000_WRITE_FLUSH(hw); } } @@ -5961,9 +5373,6 @@ e1000_clear_vfta(struct e1000_hw *hw) uint32_t vfta_offset = 0; uint32_t vfta_bit_in_reg = 0; - if (hw->mac_type == e1000_ich8lan) - return; - if (hw->mac_type == e1000_82573) { if (hw->mng_cookie.vlan_id != 0) { /* The VFTA is a 4096b bit-field, each identifying a single VLAN @@ -5983,7 +5392,6 @@ e1000_clear_vfta(struct e1000_hw *hw) * manageability unit */ vfta_value = (offset == vfta_offset) ? vfta_bit_in_reg : 0; E1000_WRITE_REG_ARRAY(hw, VFTA, offset, vfta_value); - E1000_WRITE_FLUSH(hw); } } @@ -6013,18 +5421,9 @@ e1000_id_led_init(struct e1000_hw * hw) DEBUGOUT("EEPROM Read Error\n"); return -E1000_ERR_EEPROM; } - - if ((hw->mac_type == e1000_82573) && - (eeprom_data == ID_LED_RESERVED_82573)) - eeprom_data = ID_LED_DEFAULT_82573; - else if ((eeprom_data == ID_LED_RESERVED_0000) || - (eeprom_data == ID_LED_RESERVED_FFFF)) { - if (hw->mac_type == e1000_ich8lan) - eeprom_data = ID_LED_DEFAULT_ICH8LAN; - else - eeprom_data = ID_LED_DEFAULT; - } - for (i = 0; i < 4; i++) { + if((eeprom_data== ID_LED_RESERVED_0000) || + (eeprom_data == ID_LED_RESERVED_FFFF)) eeprom_data = ID_LED_DEFAULT; + for(i = 0; i < 4; i++) { temp = (eeprom_data >> (i << 2)) & led_mask; switch(temp) { case ID_LED_ON1_DEF2: @@ -6119,44 +5518,6 @@ e1000_setup_led(struct e1000_hw *hw) return E1000_SUCCESS; } -/****************************************************************************** - * Used on 82571 and later Si that has LED blink bits. - * Callers must use their own timer and should have already called - * e1000_id_led_init() - * Call e1000_cleanup led() to stop blinking - * - * hw - Struct containing variables accessed by shared code - *****************************************************************************/ -int32_t -e1000_blink_led_start(struct e1000_hw *hw) -{ - int16_t i; - uint32_t ledctl_blink = 0; - - DEBUGFUNC("e1000_id_led_blink_on"); - - if (hw->mac_type < e1000_82571) { - /* Nothing to do */ - return E1000_SUCCESS; - } - if (hw->media_type == e1000_media_type_fiber) { - /* always blink LED0 for PCI-E fiber */ - ledctl_blink = E1000_LEDCTL_LED0_BLINK | - (E1000_LEDCTL_MODE_LED_ON << E1000_LEDCTL_LED0_MODE_SHIFT); - } else { - /* set the blink bit for each LED that's "on" (0x0E) in ledctl_mode2 */ - ledctl_blink = hw->ledctl_mode2; - for (i=0; i < 4; i++) - if (((hw->ledctl_mode2 >> (i * 8)) & 0xFF) == - E1000_LEDCTL_MODE_LED_ON) - ledctl_blink |= (E1000_LEDCTL_LED0_BLINK << (i * 8)); - } - - E1000_WRITE_REG(hw, LEDCTL, ledctl_blink); - - return E1000_SUCCESS; -} - /****************************************************************************** * Restores the saved state of the SW controlable LED. * @@ -6187,10 +5548,6 @@ e1000_cleanup_led(struct e1000_hw *hw) return ret_val; /* Fall Through */ default: - if (hw->phy_type == e1000_phy_ife) { - e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED, 0); - break; - } /* Restore LEDCTL settings */ E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_default); break; @@ -6235,10 +5592,7 @@ e1000_led_on(struct e1000_hw *hw) /* Clear SW Defineable Pin 0 to turn on the LED */ ctrl &= ~E1000_CTRL_SWDPIN0; ctrl |= E1000_CTRL_SWDPIO0; - } else if (hw->phy_type == e1000_phy_ife) { - e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED, - (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_ON)); - } else if (hw->media_type == e1000_media_type_copper) { + } else if(hw->media_type == e1000_media_type_copper) { E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_mode2); return E1000_SUCCESS; } @@ -6286,10 +5640,7 @@ e1000_led_off(struct e1000_hw *hw) /* Set SW Defineable Pin 0 to turn off the LED */ ctrl |= E1000_CTRL_SWDPIN0; ctrl |= E1000_CTRL_SWDPIO0; - } else if (hw->phy_type == e1000_phy_ife) { - e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL_LED, - (IFE_PSCL_PROBE_MODE | IFE_PSCL_PROBE_LEDS_OFF)); - } else if (hw->media_type == e1000_media_type_copper) { + } else if(hw->media_type == e1000_media_type_copper) { E1000_WRITE_REG(hw, LEDCTL, hw->ledctl_mode1); return E1000_SUCCESS; } @@ -6327,16 +5678,12 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw) temp = E1000_READ_REG(hw, XOFFRXC); temp = E1000_READ_REG(hw, XOFFTXC); temp = E1000_READ_REG(hw, FCRUC); - - if (hw->mac_type != e1000_ich8lan) { temp = E1000_READ_REG(hw, PRC64); temp = E1000_READ_REG(hw, PRC127); temp = E1000_READ_REG(hw, PRC255); temp = E1000_READ_REG(hw, PRC511); temp = E1000_READ_REG(hw, PRC1023); temp = E1000_READ_REG(hw, PRC1522); - } - temp = E1000_READ_REG(hw, GPRC); temp = E1000_READ_REG(hw, BPRC); temp = E1000_READ_REG(hw, MPRC); @@ -6356,16 +5703,12 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw) temp = E1000_READ_REG(hw, TOTH); temp = E1000_READ_REG(hw, TPR); temp = E1000_READ_REG(hw, TPT); - - if (hw->mac_type != e1000_ich8lan) { temp = E1000_READ_REG(hw, PTC64); temp = E1000_READ_REG(hw, PTC127); temp = E1000_READ_REG(hw, PTC255); temp = E1000_READ_REG(hw, PTC511); temp = E1000_READ_REG(hw, PTC1023); temp = E1000_READ_REG(hw, PTC1522); - } - temp = E1000_READ_REG(hw, MPTC); temp = E1000_READ_REG(hw, BPTC); @@ -6388,9 +5731,6 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw) temp = E1000_READ_REG(hw, IAC); temp = E1000_READ_REG(hw, ICRXOC); - - if (hw->mac_type == e1000_ich8lan) return; - temp = E1000_READ_REG(hw, ICRXPTC); temp = E1000_READ_REG(hw, ICRXATC); temp = E1000_READ_REG(hw, ICTXPTC); @@ -6571,7 +5911,6 @@ e1000_get_bus_info(struct e1000_hw *hw) hw->bus_width = e1000_bus_width_pciex_1; break; case e1000_82571: - case e1000_ich8lan: case e1000_80003es2lan: hw->bus_type = e1000_bus_type_pci_express; hw->bus_speed = e1000_bus_speed_2500; @@ -6609,6 +5948,8 @@ e1000_get_bus_info(struct e1000_hw *hw) break; } } + +#if 0 /****************************************************************************** * Reads a value from one of the devices registers using port I/O (as opposed * memory mapped I/O). Only 82544 and newer devices support port I/O. @@ -6616,7 +5957,6 @@ e1000_get_bus_info(struct e1000_hw *hw) * hw - Struct containing variables accessed by shared code * offset - offset to read from *****************************************************************************/ -#if 0 uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset) @@ -6672,6 +6012,8 @@ e1000_get_cable_length(struct e1000_hw *hw, { int32_t ret_val; uint16_t agc_value = 0; + uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE; + uint16_t max_agc = 0; uint16_t i, phy_data; uint16_t cable_length; @@ -6744,8 +6086,6 @@ e1000_get_cable_length(struct e1000_hw *hw, break; } } else if(hw->phy_type == e1000_phy_igp) { /* For IGP PHY */ - uint16_t cur_agc_value; - uint16_t min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE; uint16_t agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {IGP01E1000_PHY_AGC_A, IGP01E1000_PHY_AGC_B, @@ -6758,23 +6098,23 @@ e1000_get_cable_length(struct e1000_hw *hw, if(ret_val) return ret_val; - cur_agc_value = phy_data >> IGP01E1000_AGC_LENGTH_SHIFT; + cur_agc = phy_data >> IGP01E1000_AGC_LENGTH_SHIFT; - /* Value bound check. */ - if ((cur_agc_value >= IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1) || - (cur_agc_value == 0)) + /* Array bound check. */ + if((cur_agc >= IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1) || + (cur_agc == 0)) return -E1000_ERR_PHY; - agc_value += cur_agc_value; + agc_value += cur_agc; /* Update minimal AGC value. */ - if (min_agc_value > cur_agc_value) - min_agc_value = cur_agc_value; + if(min_agc > cur_agc) + min_agc = cur_agc; } /* Remove the minimal AGC result for length < 50m */ - if (agc_value < IGP01E1000_PHY_CHANNEL_NUM * e1000_igp_cable_length_50) { - agc_value -= min_agc_value; + if(agc_value < IGP01E1000_PHY_CHANNEL_NUM * e1000_igp_cable_length_50) { + agc_value -= min_agc; /* Get the average length of the remaining 3 channels */ agc_value /= (IGP01E1000_PHY_CHANNEL_NUM - 1); @@ -6790,10 +6130,7 @@ e1000_get_cable_length(struct e1000_hw *hw, IGP01E1000_AGC_RANGE) : 0; *max_length = e1000_igp_cable_length_table[agc_value] + IGP01E1000_AGC_RANGE; - } else if (hw->phy_type == e1000_phy_igp_2 || - hw->phy_type == e1000_phy_igp_3) { - uint16_t cur_agc_index, max_agc_index = 0; - uint16_t min_agc_index = IGP02E1000_AGC_LENGTH_TABLE_SIZE - 1; + } else if (hw->phy_type == e1000_phy_igp_2) { uint16_t agc_reg_array[IGP02E1000_PHY_CHANNEL_NUM] = {IGP02E1000_PHY_AGC_A, IGP02E1000_PHY_AGC_B, @@ -6808,27 +6145,19 @@ e1000_get_cable_length(struct e1000_hw *hw, /* Getting bits 15:9, which represent the combination of course and * fine gain values. The result is a number that can be put into * the lookup table to obtain the approximate cable length. */ - cur_agc_index = (phy_data >> IGP02E1000_AGC_LENGTH_SHIFT) & - IGP02E1000_AGC_LENGTH_MASK; - - /* Array index bound check. */ - if ((cur_agc_index >= IGP02E1000_AGC_LENGTH_TABLE_SIZE) || - (cur_agc_index == 0)) - return -E1000_ERR_PHY; + cur_agc = (phy_data >> IGP02E1000_AGC_LENGTH_SHIFT) & + IGP02E1000_AGC_LENGTH_MASK; /* Remove min & max AGC values from calculation. */ - if (e1000_igp_2_cable_length_table[min_agc_index] > - e1000_igp_2_cable_length_table[cur_agc_index]) - min_agc_index = cur_agc_index; - if (e1000_igp_2_cable_length_table[max_agc_index] < - e1000_igp_2_cable_length_table[cur_agc_index]) - max_agc_index = cur_agc_index; - - agc_value += e1000_igp_2_cable_length_table[cur_agc_index]; + if (e1000_igp_2_cable_length_table[min_agc] > e1000_igp_2_cable_length_table[cur_agc]) + min_agc = cur_agc; + if (e1000_igp_2_cable_length_table[max_agc] < e1000_igp_2_cable_length_table[cur_agc]) + max_agc = cur_agc; + + agc_value += e1000_igp_2_cable_length_table[cur_agc]; } - agc_value -= (e1000_igp_2_cable_length_table[min_agc_index] + - e1000_igp_2_cable_length_table[max_agc_index]); + agc_value -= (e1000_igp_2_cable_length_table[min_agc] + e1000_igp_2_cable_length_table[max_agc]); agc_value /= (IGP02E1000_PHY_CHANNEL_NUM - 2); /* Calculate cable length with the error range of +/- 10 meters. */ @@ -6874,8 +6203,7 @@ e1000_check_polarity(struct e1000_hw *hw, return ret_val; *polarity = (phy_data & M88E1000_PSSR_REV_POLARITY) >> M88E1000_PSSR_REV_POLARITY_SHIFT; - } else if (hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || + } else if(hw->phy_type == e1000_phy_igp || hw->phy_type == e1000_phy_igp_2) { /* Read the Status register to check the speed */ ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS, @@ -6901,13 +6229,6 @@ e1000_check_polarity(struct e1000_hw *hw, * 100 Mbps this bit is always 0) */ *polarity = phy_data & IGP01E1000_PSSR_POLARITY_REVERSED; } - } else if (hw->phy_type == e1000_phy_ife) { - ret_val = e1000_read_phy_reg(hw, IFE_PHY_EXTENDED_STATUS_CONTROL, - &phy_data); - if (ret_val) - return ret_val; - *polarity = (phy_data & IFE_PESC_POLARITY_REVERSED) >> - IFE_PESC_POLARITY_REVERSED_SHIFT; } return E1000_SUCCESS; } @@ -6920,7 +6241,7 @@ e1000_check_polarity(struct e1000_hw *hw, * 1 - Downshift ocured. * * returns: - E1000_ERR_XXX - * E1000_SUCCESS + * E1000_SUCCESS * * For phy's older then IGP, this function reads the Downshift bit in the Phy * Specific Status register. For IGP phy's, it reads the Downgrade bit in the @@ -6935,8 +6256,7 @@ e1000_check_downshift(struct e1000_hw *hw) DEBUGFUNC("e1000_check_downshift"); - if (hw->phy_type == e1000_phy_igp || - hw->phy_type == e1000_phy_igp_3 || + if(hw->phy_type == e1000_phy_igp || hw->phy_type == e1000_phy_igp_2) { ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_LINK_HEALTH, &phy_data); @@ -6953,9 +6273,6 @@ e1000_check_downshift(struct e1000_hw *hw) hw->speed_downgraded = (phy_data & M88E1000_PSSR_DOWNSHIFT) >> M88E1000_PSSR_DOWNSHIFT_SHIFT; - } else if (hw->phy_type == e1000_phy_ife) { - /* e1000_phy_ife supports 10/100 speed only */ - hw->speed_downgraded = FALSE; } return E1000_SUCCESS; @@ -7000,9 +6317,7 @@ e1000_config_dsp_after_link_change(struct e1000_hw *hw, if(speed == SPEED_1000) { - ret_val = e1000_get_cable_length(hw, &min_length, &max_length); - if (ret_val) - return ret_val; + e1000_get_cable_length(hw, &min_length, &max_length); if((hw->dsp_config_state == e1000_dsp_config_enabled) && min_length >= e1000_igp_cable_length_50) { @@ -7210,27 +6525,20 @@ static int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active) { - uint32_t phy_ctrl = 0; int32_t ret_val; uint16_t phy_data; DEBUGFUNC("e1000_set_d3_lplu_state"); - if (hw->phy_type != e1000_phy_igp && hw->phy_type != e1000_phy_igp_2 - && hw->phy_type != e1000_phy_igp_3) + if(hw->phy_type != e1000_phy_igp && hw->phy_type != e1000_phy_igp_2) return E1000_SUCCESS; /* During driver activity LPLU should not be used or it will attain link * from the lowest speeds starting from 10Mbps. The capability is used for * Dx transitions and states */ - if (hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) { + if(hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) { ret_val = e1000_read_phy_reg(hw, IGP01E1000_GMII_FIFO, &phy_data); - if (ret_val) + if(ret_val) return ret_val; - } else if (hw->mac_type == e1000_ich8lan) { - /* MAC writes into PHY register based on the state transition - * and start auto-negotiation. SW driver can overwrite the settings - * in CSR PHY power control E1000_PHY_CTRL register. */ - phy_ctrl = E1000_READ_REG(hw, PHY_CTRL); } else { ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, &phy_data); if(ret_val) @@ -7245,16 +6553,11 @@ e1000_set_d3_lplu_state(struct e1000_hw *hw, if(ret_val) return ret_val; } else { - if (hw->mac_type == e1000_ich8lan) { - phy_ctrl &= ~E1000_PHY_CTRL_NOND0A_LPLU; - E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl); - } else { phy_data &= ~IGP02E1000_PM_D3_LPLU; ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); if (ret_val) return ret_val; - } } /* LPLU and SmartSpeed are mutually exclusive. LPLU is used during @@ -7290,22 +6593,17 @@ e1000_set_d3_lplu_state(struct e1000_hw *hw, (hw->autoneg_advertised == AUTONEG_ADVERTISE_10_100_ALL)) { if(hw->mac_type == e1000_82541_rev_2 || - hw->mac_type == e1000_82547_rev_2) { + hw->mac_type == e1000_82547_rev_2) { phy_data |= IGP01E1000_GMII_FLEX_SPD; ret_val = e1000_write_phy_reg(hw, IGP01E1000_GMII_FIFO, phy_data); if(ret_val) return ret_val; } else { - if (hw->mac_type == e1000_ich8lan) { - phy_ctrl |= E1000_PHY_CTRL_NOND0A_LPLU; - E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl); - } else { phy_data |= IGP02E1000_PM_D3_LPLU; ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); if (ret_val) return ret_val; - } } /* When LPLU is enabled we should disable SmartSpeed */ @@ -7340,7 +6638,6 @@ static int32_t e1000_set_d0_lplu_state(struct e1000_hw *hw, boolean_t active) { - uint32_t phy_ctrl = 0; int32_t ret_val; uint16_t phy_data; DEBUGFUNC("e1000_set_d0_lplu_state"); @@ -7348,24 +6645,15 @@ e1000_set_d0_lplu_state(struct e1000_hw *hw, if(hw->mac_type <= e1000_82547_rev_2) return E1000_SUCCESS; - if (hw->mac_type == e1000_ich8lan) { - phy_ctrl = E1000_READ_REG(hw, PHY_CTRL); - } else { ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, &phy_data); if(ret_val) return ret_val; - } if (!active) { - if (hw->mac_type == e1000_ich8lan) { - phy_ctrl &= ~E1000_PHY_CTRL_D0A_LPLU; - E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl); - } else { phy_data &= ~IGP02E1000_PM_D0_LPLU; ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); if (ret_val) return ret_val; - } /* LPLU and SmartSpeed are mutually exclusive. LPLU is used during * Dx states where the power conservation is most important. During @@ -7397,16 +6685,11 @@ e1000_set_d0_lplu_state(struct e1000_hw *hw, } else { - - if (hw->mac_type == e1000_ich8lan) { - phy_ctrl |= E1000_PHY_CTRL_D0A_LPLU; - E1000_WRITE_REG(hw, PHY_CTRL, phy_ctrl); - } else { - phy_data |= IGP02E1000_PM_D0_LPLU; + + phy_data |= IGP02E1000_PM_D0_LPLU; ret_val = e1000_write_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, phy_data); if (ret_val) return ret_val; - } /* When LPLU is enabled we should disable SmartSpeed */ ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &phy_data); @@ -7495,7 +6778,7 @@ int32_t e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) { uint8_t i; - uint32_t offset = E1000_MNG_DHCP_COOKIE_OFFSET; + uint32_t offset = E1000_MNG_DHCP_COOKIE_OFFSET; uint8_t length = E1000_MNG_DHCP_COOKIE_LENGTH; length = (length >> 2); @@ -7514,7 +6797,7 @@ e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) * and also checks whether the previous command is completed. * It busy waits in case of previous command is not completed. * - * returns: - E1000_ERR_HOST_INTERFACE_COMMAND in case if is not ready or + * returns: - E1000_ERR_HOST_INTERFACE_COMMAND in case if is not ready or * timeout * - E1000_SUCCESS for success. ****************************************************************************/ @@ -7538,7 +6821,7 @@ e1000_mng_enable_host_if(struct e1000_hw * hw) msec_delay_irq(1); } - if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { + if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) { DEBUGOUT("Previous command timeout failed .\n"); return -E1000_ERR_HOST_INTERFACE_COMMAND; } @@ -7645,10 +6928,8 @@ e1000_mng_write_cmd_header(struct e1000_hw * hw, length >>= 2; /* The device driver writes the relevant command block into the ram area. */ - for (i = 0; i < length; i++) { + for (i = 0; i < length; i++) E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((uint32_t *) hdr + i)); - E1000_WRITE_FLUSH(hw); - } return E1000_SUCCESS; } @@ -7680,18 +6961,15 @@ e1000_mng_write_commit( * returns - TRUE when the mode is IAMT or FALSE. ****************************************************************************/ boolean_t -e1000_check_mng_mode(struct e1000_hw *hw) +e1000_check_mng_mode( + struct e1000_hw *hw) { uint32_t fwsm; fwsm = E1000_READ_REG(hw, FWSM); - if (hw->mac_type == e1000_ich8lan) { - if ((fwsm & E1000_FWSM_MODE_MASK) == - (E1000_MNG_ICH_IAMT_MODE << E1000_FWSM_MODE_SHIFT)) - return TRUE; - } else if ((fwsm & E1000_FWSM_MODE_MASK) == - (E1000_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT)) + if((fwsm & E1000_FWSM_MODE_MASK) == + (E1000_MNG_IAMT_MODE << E1000_FWSM_MODE_SHIFT)) return TRUE; return FALSE; @@ -7931,6 +7209,7 @@ e1000_set_pci_express_master_disable(struct e1000_hw *hw) E1000_WRITE_REG(hw, CTRL, ctrl); } +#if 0 /*************************************************************************** * * Enables PCI-Express master access. @@ -7940,7 +7219,6 @@ e1000_set_pci_express_master_disable(struct e1000_hw *hw) * returns: - none. * ***************************************************************************/ -#if 0 void e1000_enable_pciex_master(struct e1000_hw *hw) { @@ -8021,10 +7299,8 @@ e1000_get_auto_rd_done(struct e1000_hw *hw) case e1000_82572: case e1000_82573: case e1000_80003es2lan: - case e1000_ich8lan: - while (timeout) { - if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD) - break; + while(timeout) { + if (E1000_READ_REG(hw, EECD) & E1000_EECD_AUTO_RD) break; else msec_delay(1); timeout--; } @@ -8064,7 +7340,7 @@ e1000_get_phy_cfg_done(struct e1000_hw *hw) switch (hw->mac_type) { default: - msec_delay_irq(10); + msec_delay(10); break; case e1000_80003es2lan: /* Separate *_CFG_DONE_* bit for each port */ @@ -8181,7 +7457,7 @@ e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) * E1000_SUCCESS at any other case. * ***************************************************************************/ -static int32_t +int32_t e1000_get_software_semaphore(struct e1000_hw *hw) { int32_t timeout = hw->eeprom.word_size + 1; @@ -8216,7 +7492,7 @@ e1000_get_software_semaphore(struct e1000_hw *hw) * hw: Struct containing variables accessed by shared code * ***************************************************************************/ -static void +void e1000_release_software_semaphore(struct e1000_hw *hw) { uint32_t swsm; @@ -8247,13 +7523,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw) { uint32_t manc = 0; - uint32_t fwsm = 0; - - if (hw->mac_type == e1000_ich8lan) { - fwsm = E1000_READ_REG(hw, FWSM); - return (fwsm & E1000_FWSM_RSPCIPHY) ? E1000_SUCCESS - : E1000_BLK_PHY_RESET; - } if (hw->mac_type > e1000_82547_rev_2) manc = E1000_READ_REG(hw, MANC); @@ -8280,8 +7549,6 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw) if((fwsm & E1000_FWSM_MODE_MASK) != 0) return TRUE; break; - case e1000_ich8lan: - return TRUE; default: break; } @@ -8289,854 +7556,4 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw) } -/****************************************************************************** - * Configure PCI-Ex no-snoop - * - * hw - Struct containing variables accessed by shared code. - * no_snoop - Bitmap of no-snoop events. - * - * returns: E1000_SUCCESS - * - *****************************************************************************/ -static int32_t -e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop) -{ - uint32_t gcr_reg = 0; - - DEBUGFUNC("e1000_set_pci_ex_no_snoop"); - - if (hw->bus_type == e1000_bus_type_unknown) - e1000_get_bus_info(hw); - - if (hw->bus_type != e1000_bus_type_pci_express) - return E1000_SUCCESS; - - if (no_snoop) { - gcr_reg = E1000_READ_REG(hw, GCR); - gcr_reg &= ~(PCI_EX_NO_SNOOP_ALL); - gcr_reg |= no_snoop; - E1000_WRITE_REG(hw, GCR, gcr_reg); - } - if (hw->mac_type == e1000_ich8lan) { - uint32_t ctrl_ext; - - E1000_WRITE_REG(hw, GCR, PCI_EX_82566_SNOOP_ALL); - - ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); - ctrl_ext |= E1000_CTRL_EXT_RO_DIS; - E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); - } - - return E1000_SUCCESS; -} - -/*************************************************************************** - * - * Get software semaphore FLAG bit (SWFLAG). - * SWFLAG is used to synchronize the access to all shared resource between - * SW, FW and HW. - * - * hw: Struct containing variables accessed by shared code - * - ***************************************************************************/ -static int32_t -e1000_get_software_flag(struct e1000_hw *hw) -{ - int32_t timeout = PHY_CFG_TIMEOUT; - uint32_t extcnf_ctrl; - - DEBUGFUNC("e1000_get_software_flag"); - - if (hw->mac_type == e1000_ich8lan) { - while (timeout) { - extcnf_ctrl = E1000_READ_REG(hw, EXTCNF_CTRL); - extcnf_ctrl |= E1000_EXTCNF_CTRL_SWFLAG; - E1000_WRITE_REG(hw, EXTCNF_CTRL, extcnf_ctrl); - - extcnf_ctrl = E1000_READ_REG(hw, EXTCNF_CTRL); - if (extcnf_ctrl & E1000_EXTCNF_CTRL_SWFLAG) - break; - msec_delay_irq(1); - timeout--; - } - - if (!timeout) { - DEBUGOUT("FW or HW locks the resource too long.\n"); - return -E1000_ERR_CONFIG; - } - } - - return E1000_SUCCESS; -} - -/*************************************************************************** - * - * Release software semaphore FLAG bit (SWFLAG). - * SWFLAG is used to synchronize the access to all shared resource between - * SW, FW and HW. - * - * hw: Struct containing variables accessed by shared code - * - ***************************************************************************/ -static void -e1000_release_software_flag(struct e1000_hw *hw) -{ - uint32_t extcnf_ctrl; - - DEBUGFUNC("e1000_release_software_flag"); - - if (hw->mac_type == e1000_ich8lan) { - extcnf_ctrl= E1000_READ_REG(hw, EXTCNF_CTRL); - extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG; - E1000_WRITE_REG(hw, EXTCNF_CTRL, extcnf_ctrl); - } - - return; -} - -/*************************************************************************** - * - * Disable dynamic power down mode in ife PHY. - * It can be used to workaround band-gap problem. - * - * hw: Struct containing variables accessed by shared code - * - ***************************************************************************/ -#if 0 -int32_t -e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw) -{ - uint16_t phy_data; - int32_t ret_val = E1000_SUCCESS; - - DEBUGFUNC("e1000_ife_disable_dynamic_power_down"); - - if (hw->phy_type == e1000_phy_ife) { - ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data); - if (ret_val) - return ret_val; - - phy_data |= IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN; - ret_val = e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, phy_data); - } - - return ret_val; -} -#endif /* 0 */ - -/*************************************************************************** - * - * Enable dynamic power down mode in ife PHY. - * It can be used to workaround band-gap problem. - * - * hw: Struct containing variables accessed by shared code - * - ***************************************************************************/ -#if 0 -int32_t -e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw) -{ - uint16_t phy_data; - int32_t ret_val = E1000_SUCCESS; - - DEBUGFUNC("e1000_ife_enable_dynamic_power_down"); - - if (hw->phy_type == e1000_phy_ife) { - ret_val = e1000_read_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, &phy_data); - if (ret_val) - return ret_val; - - phy_data &= ~IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN; - ret_val = e1000_write_phy_reg(hw, IFE_PHY_SPECIAL_CONTROL, phy_data); - } - - return ret_val; -} -#endif /* 0 */ - -/****************************************************************************** - * Reads a 16 bit word or words from the EEPROM using the ICH8's flash access - * register. - * - * hw - Struct containing variables accessed by shared code - * offset - offset of word in the EEPROM to read - * data - word read from the EEPROM - * words - number of words to read - *****************************************************************************/ -static int32_t -e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, - uint16_t *data) -{ - int32_t error = E1000_SUCCESS; - uint32_t flash_bank = 0; - uint32_t act_offset = 0; - uint32_t bank_offset = 0; - uint16_t word = 0; - uint16_t i = 0; - - /* We need to know which is the valid flash bank. In the event - * that we didn't allocate eeprom_shadow_ram, we may not be - * managing flash_bank. So it cannot be trusted and needs - * to be updated with each read. - */ - /* Value of bit 22 corresponds to the flash bank we're on. */ - flash_bank = (E1000_READ_REG(hw, EECD) & E1000_EECD_SEC1VAL) ? 1 : 0; - - /* Adjust offset appropriately if we're on bank 1 - adjust for word size */ - bank_offset = flash_bank * (hw->flash_bank_size * 2); - - error = e1000_get_software_flag(hw); - if (error != E1000_SUCCESS) - return error; - - for (i = 0; i < words; i++) { - if (hw->eeprom_shadow_ram != NULL && - hw->eeprom_shadow_ram[offset+i].modified == TRUE) { - data[i] = hw->eeprom_shadow_ram[offset+i].eeprom_word; - } else { - /* The NVM part needs a byte offset, hence * 2 */ - act_offset = bank_offset + ((offset + i) * 2); - error = e1000_read_ich8_word(hw, act_offset, &word); - if (error != E1000_SUCCESS) - break; - data[i] = word; - } - } - - e1000_release_software_flag(hw); - - return error; -} - -/****************************************************************************** - * Writes a 16 bit word or words to the EEPROM using the ICH8's flash access - * register. Actually, writes are written to the shadow ram cache in the hw - * structure hw->e1000_shadow_ram. e1000_commit_shadow_ram flushes this to - * the NVM, which occurs when the NVM checksum is updated. - * - * hw - Struct containing variables accessed by shared code - * offset - offset of word in the EEPROM to write - * words - number of words to write - * data - words to write to the EEPROM - *****************************************************************************/ -static int32_t -e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, - uint16_t *data) -{ - uint32_t i = 0; - int32_t error = E1000_SUCCESS; - - error = e1000_get_software_flag(hw); - if (error != E1000_SUCCESS) - return error; - - /* A driver can write to the NVM only if it has eeprom_shadow_ram - * allocated. Subsequent reads to the modified words are read from - * this cached structure as well. Writes will only go into this - * cached structure unless it's followed by a call to - * e1000_update_eeprom_checksum() where it will commit the changes - * and clear the "modified" field. - */ - if (hw->eeprom_shadow_ram != NULL) { - for (i = 0; i < words; i++) { - if ((offset + i) < E1000_SHADOW_RAM_WORDS) { - hw->eeprom_shadow_ram[offset+i].modified = TRUE; - hw->eeprom_shadow_ram[offset+i].eeprom_word = data[i]; - } else { - error = -E1000_ERR_EEPROM; - break; - } - } - } else { - /* Drivers have the option to not allocate eeprom_shadow_ram as long - * as they don't perform any NVM writes. An attempt in doing so - * will result in this error. - */ - error = -E1000_ERR_EEPROM; - } - - e1000_release_software_flag(hw); - - return error; -} - -/****************************************************************************** - * This function does initial flash setup so that a new read/write/erase cycle - * can be started. - * - * hw - The pointer to the hw structure - ****************************************************************************/ -static int32_t -e1000_ich8_cycle_init(struct e1000_hw *hw) -{ - union ich8_hws_flash_status hsfsts; - int32_t error = E1000_ERR_EEPROM; - int32_t i = 0; - - DEBUGFUNC("e1000_ich8_cycle_init"); - - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - - /* May be check the Flash Des Valid bit in Hw status */ - if (hsfsts.hsf_status.fldesvalid == 0) { - DEBUGOUT("Flash descriptor invalid. SW Sequencing must be used."); - return error; - } - - /* Clear FCERR in Hw status by writing 1 */ - /* Clear DAEL in Hw status by writing a 1 */ - hsfsts.hsf_status.flcerr = 1; - hsfsts.hsf_status.dael = 1; - - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval); - - /* Either we should have a hardware SPI cycle in progress bit to check - * against, in order to start a new cycle or FDONE bit should be changed - * in the hardware so that it is 1 after harware reset, which can then be - * used as an indication whether a cycle is in progress or has been - * completed .. we should also have some software semaphore mechanism to - * guard FDONE or the cycle in progress bit so that two threads access to - * those bits can be sequentiallized or a way so that 2 threads dont - * start the cycle at the same time */ - - if (hsfsts.hsf_status.flcinprog == 0) { - /* There is no cycle running at present, so we can start a cycle */ - /* Begin by setting Flash Cycle Done. */ - hsfsts.hsf_status.flcdone = 1; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval); - error = E1000_SUCCESS; - } else { - /* otherwise poll for sometime so the current cycle has a chance - * to end before giving up. */ - for (i = 0; i < ICH8_FLASH_COMMAND_TIMEOUT; i++) { - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - if (hsfsts.hsf_status.flcinprog == 0) { - error = E1000_SUCCESS; - break; - } - udelay(1); - } - if (error == E1000_SUCCESS) { - /* Successful in waiting for previous cycle to timeout, - * now set the Flash Cycle Done. */ - hsfsts.hsf_status.flcdone = 1; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFSTS, hsfsts.regval); - } else { - DEBUGOUT("Flash controller busy, cannot get access"); - } - } - return error; -} - -/****************************************************************************** - * This function starts a flash cycle and waits for its completion - * - * hw - The pointer to the hw structure - ****************************************************************************/ -static int32_t -e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout) -{ - union ich8_hws_flash_ctrl hsflctl; - union ich8_hws_flash_status hsfsts; - int32_t error = E1000_ERR_EEPROM; - uint32_t i = 0; - - /* Start a cycle by writing 1 in Flash Cycle Go in Hw Flash Control */ - hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL); - hsflctl.hsf_ctrl.flcgo = 1; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval); - - /* wait till FDONE bit is set to 1 */ - do { - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - if (hsfsts.hsf_status.flcdone == 1) - break; - udelay(1); - i++; - } while (i < timeout); - if (hsfsts.hsf_status.flcdone == 1 && hsfsts.hsf_status.flcerr == 0) { - error = E1000_SUCCESS; - } - return error; -} - -/****************************************************************************** - * Reads a byte or word from the NVM using the ICH8 flash access registers. - * - * hw - The pointer to the hw structure - * index - The index of the byte or word to read. - * size - Size of data to read, 1=byte 2=word - * data - Pointer to the word to store the value read. - *****************************************************************************/ -static int32_t -e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, - uint32_t size, uint16_t* data) -{ - union ich8_hws_flash_status hsfsts; - union ich8_hws_flash_ctrl hsflctl; - uint32_t flash_linear_address; - uint32_t flash_data = 0; - int32_t error = -E1000_ERR_EEPROM; - int32_t count = 0; - - DEBUGFUNC("e1000_read_ich8_data"); - - if (size < 1 || size > 2 || data == 0x0 || - index > ICH8_FLASH_LINEAR_ADDR_MASK) - return error; - - flash_linear_address = (ICH8_FLASH_LINEAR_ADDR_MASK & index) + - hw->flash_base_addr; - - do { - udelay(1); - /* Steps */ - error = e1000_ich8_cycle_init(hw); - if (error != E1000_SUCCESS) - break; - - hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL); - /* 0b/1b corresponds to 1 or 2 byte size, respectively. */ - hsflctl.hsf_ctrl.fldbcount = size - 1; - hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_READ; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval); - - /* Write the last 24 bits of index into Flash Linear address field in - * Flash Address */ - /* TODO: TBD maybe check the index against the size of flash */ - - E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address); - - error = e1000_ich8_flash_cycle(hw, ICH8_FLASH_COMMAND_TIMEOUT); - - /* Check if FCERR is set to 1, if set to 1, clear it and try the whole - * sequence a few more times, else read in (shift in) the Flash Data0, - * the order is least significant byte first msb to lsb */ - if (error == E1000_SUCCESS) { - flash_data = E1000_READ_ICH8_REG(hw, ICH8_FLASH_FDATA0); - if (size == 1) { - *data = (uint8_t)(flash_data & 0x000000FF); - } else if (size == 2) { - *data = (uint16_t)(flash_data & 0x0000FFFF); - } - break; - } else { - /* If we've gotten here, then things are probably completely hosed, - * but if the error condition is detected, it won't hurt to give - * it another try...ICH8_FLASH_CYCLE_REPEAT_COUNT times. - */ - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - if (hsfsts.hsf_status.flcerr == 1) { - /* Repeat for some time before giving up. */ - continue; - } else if (hsfsts.hsf_status.flcdone == 0) { - DEBUGOUT("Timeout error - flash cycle did not complete."); - break; - } - } - } while (count++ < ICH8_FLASH_CYCLE_REPEAT_COUNT); - - return error; -} - -/****************************************************************************** - * Writes One /two bytes to the NVM using the ICH8 flash access registers. - * - * hw - The pointer to the hw structure - * index - The index of the byte/word to read. - * size - Size of data to read, 1=byte 2=word - * data - The byte(s) to write to the NVM. - *****************************************************************************/ -static int32_t -e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, - uint16_t data) -{ - union ich8_hws_flash_status hsfsts; - union ich8_hws_flash_ctrl hsflctl; - uint32_t flash_linear_address; - uint32_t flash_data = 0; - int32_t error = -E1000_ERR_EEPROM; - int32_t count = 0; - - DEBUGFUNC("e1000_write_ich8_data"); - - if (size < 1 || size > 2 || data > size * 0xff || - index > ICH8_FLASH_LINEAR_ADDR_MASK) - return error; - - flash_linear_address = (ICH8_FLASH_LINEAR_ADDR_MASK & index) + - hw->flash_base_addr; - - do { - udelay(1); - /* Steps */ - error = e1000_ich8_cycle_init(hw); - if (error != E1000_SUCCESS) - break; - - hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL); - /* 0b/1b corresponds to 1 or 2 byte size, respectively. */ - hsflctl.hsf_ctrl.fldbcount = size -1; - hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_WRITE; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval); - - /* Write the last 24 bits of index into Flash Linear address field in - * Flash Address */ - E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address); - - if (size == 1) - flash_data = (uint32_t)data & 0x00FF; - else - flash_data = (uint32_t)data; - - E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FDATA0, flash_data); - - /* check if FCERR is set to 1 , if set to 1, clear it and try the whole - * sequence a few more times else done */ - error = e1000_ich8_flash_cycle(hw, ICH8_FLASH_COMMAND_TIMEOUT); - if (error == E1000_SUCCESS) { - break; - } else { - /* If we're here, then things are most likely completely hosed, - * but if the error condition is detected, it won't hurt to give - * it another try...ICH8_FLASH_CYCLE_REPEAT_COUNT times. - */ - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - if (hsfsts.hsf_status.flcerr == 1) { - /* Repeat for some time before giving up. */ - continue; - } else if (hsfsts.hsf_status.flcdone == 0) { - DEBUGOUT("Timeout error - flash cycle did not complete."); - break; - } - } - } while (count++ < ICH8_FLASH_CYCLE_REPEAT_COUNT); - - return error; -} - -/****************************************************************************** - * Reads a single byte from the NVM using the ICH8 flash access registers. - * - * hw - pointer to e1000_hw structure - * index - The index of the byte to read. - * data - Pointer to a byte to store the value read. - *****************************************************************************/ -static int32_t -e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data) -{ - int32_t status = E1000_SUCCESS; - uint16_t word = 0; - - status = e1000_read_ich8_data(hw, index, 1, &word); - if (status == E1000_SUCCESS) { - *data = (uint8_t)word; - } - - return status; -} - -/****************************************************************************** - * Writes a single byte to the NVM using the ICH8 flash access registers. - * Performs verification by reading back the value and then going through - * a retry algorithm before giving up. - * - * hw - pointer to e1000_hw structure - * index - The index of the byte to write. - * byte - The byte to write to the NVM. - *****************************************************************************/ -static int32_t -e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte) -{ - int32_t error = E1000_SUCCESS; - int32_t program_retries; - uint8_t temp_byte; - - e1000_write_ich8_byte(hw, index, byte); - udelay(100); - - for (program_retries = 0; program_retries < 100; program_retries++) { - e1000_read_ich8_byte(hw, index, &temp_byte); - if (temp_byte == byte) - break; - udelay(10); - e1000_write_ich8_byte(hw, index, byte); - udelay(100); - } - if (program_retries == 100) - error = E1000_ERR_EEPROM; - - return error; -} - -/****************************************************************************** - * Writes a single byte to the NVM using the ICH8 flash access registers. - * - * hw - pointer to e1000_hw structure - * index - The index of the byte to read. - * data - The byte to write to the NVM. - *****************************************************************************/ -static int32_t -e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data) -{ - int32_t status = E1000_SUCCESS; - uint16_t word = (uint16_t)data; - - status = e1000_write_ich8_data(hw, index, 1, word); - - return status; -} - -/****************************************************************************** - * Reads a word from the NVM using the ICH8 flash access registers. - * - * hw - pointer to e1000_hw structure - * index - The starting byte index of the word to read. - * data - Pointer to a word to store the value read. - *****************************************************************************/ -static int32_t -e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data) -{ - int32_t status = E1000_SUCCESS; - status = e1000_read_ich8_data(hw, index, 2, data); - return status; -} - -/****************************************************************************** - * Writes a word to the NVM using the ICH8 flash access registers. - * - * hw - pointer to e1000_hw structure - * index - The starting byte index of the word to read. - * data - The word to write to the NVM. - *****************************************************************************/ -#if 0 -int32_t -e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data) -{ - int32_t status = E1000_SUCCESS; - status = e1000_write_ich8_data(hw, index, 2, data); - return status; -} -#endif /* 0 */ - -/****************************************************************************** - * Erases the bank specified. Each bank is a 4k block. Segments are 0 based. - * segment N is 4096 * N + flash_reg_addr. - * - * hw - pointer to e1000_hw structure - * segment - 0 for first segment, 1 for second segment, etc. - *****************************************************************************/ -static int32_t -e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment) -{ - union ich8_hws_flash_status hsfsts; - union ich8_hws_flash_ctrl hsflctl; - uint32_t flash_linear_address; - int32_t count = 0; - int32_t error = E1000_ERR_EEPROM; - int32_t iteration, seg_size; - int32_t sector_size; - int32_t j = 0; - int32_t error_flag = 0; - - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - - /* Determine HW Sector size: Read BERASE bits of Hw flash Status register */ - /* 00: The Hw sector is 256 bytes, hence we need to erase 16 - * consecutive sectors. The start index for the nth Hw sector can be - * calculated as = segment * 4096 + n * 256 - * 01: The Hw sector is 4K bytes, hence we need to erase 1 sector. - * The start index for the nth Hw sector can be calculated - * as = segment * 4096 - * 10: Error condition - * 11: The Hw sector size is much bigger than the size asked to - * erase...error condition */ - if (hsfsts.hsf_status.berasesz == 0x0) { - /* Hw sector size 256 */ - sector_size = seg_size = ICH8_FLASH_SEG_SIZE_256; - iteration = ICH8_FLASH_SECTOR_SIZE / ICH8_FLASH_SEG_SIZE_256; - } else if (hsfsts.hsf_status.berasesz == 0x1) { - sector_size = seg_size = ICH8_FLASH_SEG_SIZE_4K; - iteration = 1; - } else if (hsfsts.hsf_status.berasesz == 0x3) { - sector_size = seg_size = ICH8_FLASH_SEG_SIZE_64K; - iteration = 1; - } else { - return error; - } - - for (j = 0; j < iteration ; j++) { - do { - count++; - /* Steps */ - error = e1000_ich8_cycle_init(hw); - if (error != E1000_SUCCESS) { - error_flag = 1; - break; - } - - /* Write a value 11 (block Erase) in Flash Cycle field in Hw flash - * Control */ - hsflctl.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFCTL); - hsflctl.hsf_ctrl.flcycle = ICH8_CYCLE_ERASE; - E1000_WRITE_ICH8_REG16(hw, ICH8_FLASH_HSFCTL, hsflctl.regval); - - /* Write the last 24 bits of an index within the block into Flash - * Linear address field in Flash Address. This probably needs to - * be calculated here based off the on-chip segment size and the - * software segment size assumed (4K) */ - /* TBD */ - flash_linear_address = segment * sector_size + j * seg_size; - flash_linear_address &= ICH8_FLASH_LINEAR_ADDR_MASK; - flash_linear_address += hw->flash_base_addr; - - E1000_WRITE_ICH8_REG(hw, ICH8_FLASH_FADDR, flash_linear_address); - - error = e1000_ich8_flash_cycle(hw, 1000000); - /* Check if FCERR is set to 1. If 1, clear it and try the whole - * sequence a few more times else Done */ - if (error == E1000_SUCCESS) { - break; - } else { - hsfsts.regval = E1000_READ_ICH8_REG16(hw, ICH8_FLASH_HSFSTS); - if (hsfsts.hsf_status.flcerr == 1) { - /* repeat for some time before giving up */ - continue; - } else if (hsfsts.hsf_status.flcdone == 0) { - error_flag = 1; - break; - } - } - } while ((count < ICH8_FLASH_CYCLE_REPEAT_COUNT) && !error_flag); - if (error_flag == 1) - break; - } - if (error_flag != 1) - error = E1000_SUCCESS; - return error; -} - -/****************************************************************************** - * - * Reverse duplex setting without breaking the link. - * - * hw: Struct containing variables accessed by shared code - * - *****************************************************************************/ -#if 0 -int32_t -e1000_duplex_reversal(struct e1000_hw *hw) -{ - int32_t ret_val; - uint16_t phy_data; - - if (hw->phy_type != e1000_phy_igp_3) - return E1000_SUCCESS; - - ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data); - if (ret_val) - return ret_val; - - phy_data ^= MII_CR_FULL_DUPLEX; - - ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data); - if (ret_val) - return ret_val; - - ret_val = e1000_read_phy_reg(hw, IGP3E1000_PHY_MISC_CTRL, &phy_data); - if (ret_val) - return ret_val; - - phy_data |= IGP3_PHY_MISC_DUPLEX_MANUAL_SET; - ret_val = e1000_write_phy_reg(hw, IGP3E1000_PHY_MISC_CTRL, phy_data); - - return ret_val; -} -#endif /* 0 */ - -static int32_t -e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, - uint32_t cnf_base_addr, uint32_t cnf_size) -{ - uint32_t ret_val = E1000_SUCCESS; - uint16_t word_addr, reg_data, reg_addr; - uint16_t i; - - /* cnf_base_addr is in DWORD */ - word_addr = (uint16_t)(cnf_base_addr << 1); - - /* cnf_size is returned in size of dwords */ - for (i = 0; i < cnf_size; i++) { - ret_val = e1000_read_eeprom(hw, (word_addr + i*2), 1, ®_data); - if (ret_val) - return ret_val; - - ret_val = e1000_read_eeprom(hw, (word_addr + i*2 + 1), 1, ®_addr); - if (ret_val) - return ret_val; - - ret_val = e1000_get_software_flag(hw); - if (ret_val != E1000_SUCCESS) - return ret_val; - - ret_val = e1000_write_phy_reg_ex(hw, (uint32_t)reg_addr, reg_data); - - e1000_release_software_flag(hw); - } - - return ret_val; -} - - -static int32_t -e1000_init_lcd_from_nvm(struct e1000_hw *hw) -{ - uint32_t reg_data, cnf_base_addr, cnf_size, ret_val, loop; - - if (hw->phy_type != e1000_phy_igp_3) - return E1000_SUCCESS; - - /* Check if SW needs configure the PHY */ - reg_data = E1000_READ_REG(hw, FEXTNVM); - if (!(reg_data & FEXTNVM_SW_CONFIG)) - return E1000_SUCCESS; - - /* Wait for basic configuration completes before proceeding*/ - loop = 0; - do { - reg_data = E1000_READ_REG(hw, STATUS) & E1000_STATUS_LAN_INIT_DONE; - udelay(100); - loop++; - } while ((!reg_data) && (loop < 50)); - - /* Clear the Init Done bit for the next init event */ - reg_data = E1000_READ_REG(hw, STATUS); - reg_data &= ~E1000_STATUS_LAN_INIT_DONE; - E1000_WRITE_REG(hw, STATUS, reg_data); - - /* Make sure HW does not configure LCD from PHY extended configuration - before SW configuration */ - reg_data = E1000_READ_REG(hw, EXTCNF_CTRL); - if ((reg_data & E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE) == 0x0000) { - reg_data = E1000_READ_REG(hw, EXTCNF_SIZE); - cnf_size = reg_data & E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH; - cnf_size >>= 16; - if (cnf_size) { - reg_data = E1000_READ_REG(hw, EXTCNF_CTRL); - cnf_base_addr = reg_data & E1000_EXTCNF_CTRL_EXT_CNF_POINTER; - /* cnf_base_addr is in DWORD */ - cnf_base_addr >>= 16; - - /* Configure LCD from extended configuration region. */ - ret_val = e1000_init_lcd_from_nvm_config_region(hw, cnf_base_addr, - cnf_size); - if (ret_val) - return ret_val; - } - } - - return E1000_SUCCESS; -} - - diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h index 375b95518..c01e5d2e5 100644 --- a/drivers/net/e1000/e1000_hw.h +++ b/drivers/net/e1000/e1000_hw.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -62,7 +61,6 @@ typedef enum { e1000_82572, e1000_82573, e1000_80003es2lan, - e1000_ich8lan, e1000_num_macs } e1000_mac_type; @@ -71,7 +69,6 @@ typedef enum { e1000_eeprom_spi, e1000_eeprom_microwire, e1000_eeprom_flash, - e1000_eeprom_ich8, e1000_eeprom_none, /* No NVM support */ e1000_num_eeprom_types } e1000_eeprom_type; @@ -100,11 +97,6 @@ typedef enum { e1000_fc_default = 0xFF } e1000_fc_type; -struct e1000_shadow_ram { - uint16_t eeprom_word; - boolean_t modified; -}; - /* PCI bus types */ typedef enum { e1000_bus_type_unknown = 0, @@ -225,8 +217,6 @@ typedef enum { e1000_phy_igp, e1000_phy_igp_2, e1000_phy_gg82563, - e1000_phy_igp_3, - e1000_phy_ife, e1000_phy_undefined = 0xFF } e1000_phy_type; @@ -322,9 +312,10 @@ int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); int32_t e1000_phy_hw_reset(struct e1000_hw *hw); int32_t e1000_phy_reset(struct e1000_hw *hw); -void e1000_phy_powerdown_workaround(struct e1000_hw *hw); int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); +int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data); +int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); /* EEPROM Functions */ int32_t e1000_init_eeprom_params(struct e1000_hw *hw); @@ -339,7 +330,6 @@ uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw); #define E1000_MNG_DHCP_COOKIE_OFFSET 0x6F0 /* Cookie offset */ #define E1000_MNG_DHCP_COOKIE_LENGTH 0x10 /* Cookie length */ #define E1000_MNG_IAMT_MODE 0x3 -#define E1000_MNG_ICH_IAMT_MODE 0x2 #define E1000_IAMT_SIGNATURE 0x544D4149 /* Intel(R) Active Management Technology signature */ #define E1000_MNG_DHCP_COOKIE_STATUS_PARSING_SUPPORT 0x1 /* DHCP parsing enabled */ @@ -384,7 +374,7 @@ struct e1000_host_mng_dhcp_cookie{ }; #endif -int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, +int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, uint16_t length); boolean_t e1000_check_mng_mode(struct e1000_hw *hw); boolean_t e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); @@ -395,8 +385,11 @@ int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); int32_t e1000_read_mac_addr(struct e1000_hw * hw); +int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask); +void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask); /* Filters (multicast, vlan, receive) */ +void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t * mc_addr_list, uint32_t mc_addr_count, uint32_t pad, uint32_t rar_used_count); uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index); @@ -407,7 +400,6 @@ int32_t e1000_setup_led(struct e1000_hw *hw); int32_t e1000_cleanup_led(struct e1000_hw *hw); int32_t e1000_led_on(struct e1000_hw *hw); int32_t e1000_led_off(struct e1000_hw *hw); -int32_t e1000_blink_led_start(struct e1000_hw *hw); /* Adaptive IFS Functions */ @@ -421,16 +413,15 @@ void e1000_pci_clear_mwi(struct e1000_hw *hw); void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); /* Port I/O is only supported on 82544 and newer */ +uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port); +uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset); void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); +void e1000_enable_pciex_master(struct e1000_hw *hw); int32_t e1000_disable_pciex_master(struct e1000_hw *hw); +int32_t e1000_get_software_semaphore(struct e1000_hw *hw); +void e1000_release_software_semaphore(struct e1000_hw *hw); int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); - -#define E1000_READ_REG_IO(a, reg) \ - e1000_read_reg_io((a), E1000_##reg) -#define E1000_WRITE_REG_IO(a, reg, val) \ - e1000_write_reg_io((a), E1000_##reg, val) - /* PCI Device IDs */ #define E1000_DEV_ID_82542 0x1000 #define E1000_DEV_ID_82543GC_FIBER 0x1001 @@ -454,7 +445,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); #define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D #define E1000_DEV_ID_82541EI 0x1013 #define E1000_DEV_ID_82541EI_MOBILE 0x1018 -#define E1000_DEV_ID_82541ER_LOM 0x1014 #define E1000_DEV_ID_82541ER 0x1078 #define E1000_DEV_ID_82547GI 0x1075 #define E1000_DEV_ID_82541GI 0x1076 @@ -466,7 +456,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); #define E1000_DEV_ID_82546GB_PCIE 0x108A #define E1000_DEV_ID_82546GB_QUAD_COPPER 0x1099 #define E1000_DEV_ID_82547EI 0x1019 -#define E1000_DEV_ID_82547EI_MOBILE 0x101A #define E1000_DEV_ID_82571EB_COPPER 0x105E #define E1000_DEV_ID_82571EB_FIBER 0x105F #define E1000_DEV_ID_82571EB_SERDES 0x1060 @@ -480,14 +469,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 0x10B5 #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096 #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098 -#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA -#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB - -#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049 -#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A -#define E1000_DEV_ID_ICH8_IGP_C 0x104B -#define E1000_DEV_ID_ICH8_IFE 0x104C -#define E1000_DEV_ID_ICH8_IGP_M 0x104D #define NODE_ADDRESS_SIZE 6 @@ -558,14 +539,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); E1000_IMS_RXSEQ | \ E1000_IMS_LSC) -/* Additional interrupts need to be handled for e1000_ich8lan: - DSW = The FW changed the status of the DISSW bit in FWSM - PHYINT = The LAN connected device generates an interrupt - EPRST = Manageability reset event */ -#define IMS_ICH8LAN_ENABLE_MASK (\ - E1000_IMS_DSW | \ - E1000_IMS_PHYINT | \ - E1000_IMS_EPRST) /* Number of high/low register pairs in the RAR. The RAR (Receive Address * Registers) holds the directed and multicast addresses that we monitor. We @@ -573,7 +546,6 @@ int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); * E1000_RAR_ENTRIES - 1 multicast addresses. */ #define E1000_RAR_ENTRIES 15 -#define E1000_RAR_ENTRIES_ICH8LAN 7 #define MIN_NUMBER_OF_DESCRIPTORS 8 #define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 @@ -795,9 +767,6 @@ struct e1000_data_desc { #define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ #define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ -#define E1000_NUM_UNICAST_ICH8LAN 7 -#define E1000_MC_TBL_SIZE_ICH8LAN 32 - /* Receive Address Register */ struct e1000_rar { @@ -807,7 +776,6 @@ struct e1000_rar { /* Number of entries in the Multicast Table Array (MTA). */ #define E1000_NUM_MTA_REGISTERS 128 -#define E1000_NUM_MTA_REGISTERS_ICH8LAN 32 /* IPv4 Address Table Entry */ struct e1000_ipv4_at_entry { @@ -818,7 +786,6 @@ struct e1000_ipv4_at_entry { /* Four wakeup IP addresses are supported */ #define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4 #define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX -#define E1000_IP4AT_SIZE_ICH8LAN 3 #define E1000_IP6AT_SIZE 1 /* IPv6 Address Table Entry */ @@ -877,7 +844,6 @@ struct e1000_ffvt_entry { #define E1000_FLA 0x0001C /* Flash Access - RW */ #define E1000_MDIC 0x00020 /* MDI Control - RW */ #define E1000_SCTL 0x00024 /* SerDes Control - RW */ -#define E1000_FEXTNVM 0x00028 /* Future Extended NVM register */ #define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ #define E1000_FCAH 0x0002C /* Flow Control Address High -RW */ #define E1000_FCT 0x00030 /* Flow Control Type - RW */ @@ -906,8 +872,6 @@ struct e1000_ffvt_entry { #define E1000_LEDCTL 0x00E00 /* LED Control - RW */ #define E1000_EXTCNF_CTRL 0x00F00 /* Extended Configuration Control */ #define E1000_EXTCNF_SIZE 0x00F08 /* Extended Configuration Size */ -#define E1000_PHY_CTRL 0x00F10 /* PHY Control Register in CSR */ -#define FEXTNVM_SW_CONFIG 0x0001 #define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ #define E1000_PBS 0x01008 /* Packet Buffer Size */ #define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */ @@ -935,13 +899,11 @@ struct e1000_ffvt_entry { #define E1000_RDH0 E1000_RDH /* RX Desc Head (0) - RW */ #define E1000_RDT0 E1000_RDT /* RX Desc Tail (0) - RW */ #define E1000_RDTR0 E1000_RDTR /* RX Delay Timer (0) - RW */ -#define E1000_RXDCTL 0x02828 /* RX Descriptor Control queue 0 - RW */ -#define E1000_RXDCTL1 0x02928 /* RX Descriptor Control queue 1 - RW */ +#define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ #define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ #define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ #define E1000_RAID 0x02C08 /* Receive Ack Interrupt Delay - RW */ #define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ -#define E1000_KABGTXD 0x03004 /* AFE Band Gap Transmit Ref Data */ #define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ #define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ #define E1000_TDFHS 0x03420 /* TX Data FIFO Head Saved - RW */ @@ -1088,7 +1050,6 @@ struct e1000_ffvt_entry { #define E1000_82542_FLA E1000_FLA #define E1000_82542_MDIC E1000_MDIC #define E1000_82542_SCTL E1000_SCTL -#define E1000_82542_FEXTNVM E1000_FEXTNVM #define E1000_82542_FCAL E1000_FCAL #define E1000_82542_FCAH E1000_FCAH #define E1000_82542_FCT E1000_FCT @@ -1112,19 +1073,6 @@ struct e1000_ffvt_entry { #define E1000_82542_RDLEN0 E1000_82542_RDLEN #define E1000_82542_RDH0 E1000_82542_RDH #define E1000_82542_RDT0 E1000_82542_RDT -#define E1000_82542_SRRCTL(_n) (0x280C + ((_n) << 8)) /* Split and Replication - * RX Control - RW */ -#define E1000_82542_DCA_RXCTRL(_n) (0x02814 + ((_n) << 8)) -#define E1000_82542_RDBAH3 0x02B04 /* RX Desc Base High Queue 3 - RW */ -#define E1000_82542_RDBAL3 0x02B00 /* RX Desc Low Queue 3 - RW */ -#define E1000_82542_RDLEN3 0x02B08 /* RX Desc Length Queue 3 - RW */ -#define E1000_82542_RDH3 0x02B10 /* RX Desc Head Queue 3 - RW */ -#define E1000_82542_RDT3 0x02B18 /* RX Desc Tail Queue 3 - RW */ -#define E1000_82542_RDBAL2 0x02A00 /* RX Desc Base Low Queue 2 - RW */ -#define E1000_82542_RDBAH2 0x02A04 /* RX Desc Base High Queue 2 - RW */ -#define E1000_82542_RDLEN2 0x02A08 /* RX Desc Length Queue 2 - RW */ -#define E1000_82542_RDH2 0x02A10 /* RX Desc Head Queue 2 - RW */ -#define E1000_82542_RDT2 0x02A18 /* RX Desc Tail Queue 2 - RW */ #define E1000_82542_RDTR1 0x00130 #define E1000_82542_RDBAL1 0x00138 #define E1000_82542_RDBAH1 0x0013C @@ -1162,14 +1110,11 @@ struct e1000_ffvt_entry { #define E1000_82542_FLOP E1000_FLOP #define E1000_82542_EXTCNF_CTRL E1000_EXTCNF_CTRL #define E1000_82542_EXTCNF_SIZE E1000_EXTCNF_SIZE -#define E1000_82542_PHY_CTRL E1000_PHY_CTRL #define E1000_82542_ERT E1000_ERT #define E1000_82542_RXDCTL E1000_RXDCTL -#define E1000_82542_RXDCTL1 E1000_RXDCTL1 #define E1000_82542_RADV E1000_RADV #define E1000_82542_RSRPD E1000_RSRPD #define E1000_82542_TXDMAC E1000_TXDMAC -#define E1000_82542_KABGTXD E1000_KABGTXD #define E1000_82542_TDFHS E1000_TDFHS #define E1000_82542_TDFTS E1000_TDFTS #define E1000_82542_TDFPC E1000_TDFPC @@ -1365,16 +1310,13 @@ struct e1000_hw_stats { /* Structure containing variables used by the shared code (e1000_hw.c) */ struct e1000_hw { - uint8_t *hw_addr; + uint8_t __iomem *hw_addr; uint8_t *flash_address; e1000_mac_type mac_type; e1000_phy_type phy_type; uint32_t phy_init_script; e1000_media_type media_type; void *back; - struct e1000_shadow_ram *eeprom_shadow_ram; - uint32_t flash_bank_size; - uint32_t flash_base_addr; e1000_fc_type fc; e1000_bus_speed bus_speed; e1000_bus_width bus_width; @@ -1386,7 +1328,6 @@ struct e1000_hw { uint32_t asf_firmware_present; uint32_t eeprom_semaphore_present; uint32_t swfw_sync_present; - uint32_t swfwhw_semaphore_present; unsigned long io_base; uint32_t phy_id; uint32_t phy_revision; @@ -1446,7 +1387,6 @@ struct e1000_hw { boolean_t in_ifs_mode; boolean_t mng_reg_access_disabled; boolean_t leave_av_bit_off; - boolean_t kmrn_lock_loss_workaround_disabled; }; @@ -1495,7 +1435,6 @@ struct e1000_hw { #define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */ #define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */ #define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */ -#define E1000_CTRL_SW2FW_INT 0x02000000 /* Initiate an interrupt to manageability engine */ /* Device Status */ #define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ @@ -1510,8 +1449,6 @@ struct e1000_hw { #define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */ #define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ #define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ -#define E1000_STATUS_LAN_INIT_DONE 0x00000200 /* Lan Init Completion - by EEPROM/Flash */ #define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ #define E1000_STATUS_DOCK_CI 0x00000800 /* Change in Dock/Undock state. Clear on write '0'. */ #define E1000_STATUS_GIO_MASTER_ENABLE 0x00080000 /* Status of Master requests. */ @@ -1569,10 +1506,6 @@ struct e1000_hw { #define E1000_STM_OPCODE 0xDB00 #define E1000_HICR_FW_RESET 0xC0 -#define E1000_SHADOW_RAM_WORDS 2048 -#define E1000_ICH8_NVM_SIG_WORD 0x13 -#define E1000_ICH8_NVM_SIG_MASK 0xC0 - /* EEPROM Read */ #define E1000_EERD_START 0x00000001 /* Start Read */ #define E1000_EERD_DONE 0x00000010 /* Read Done */ @@ -1618,6 +1551,7 @@ struct e1000_hw { #define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 #define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 #define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 +#define E1000_CTRL_EXT_CANC 0x04000000 /* Interrupt delay cancellation */ #define E1000_CTRL_EXT_DRV_LOAD 0x10000000 /* Driver loaded bit for FW */ #define E1000_CTRL_EXT_IAME 0x08000000 /* Interrupt acknowledge Auto-mask */ #define E1000_CTRL_EXT_INT_TIMER_CLR 0x20000000 /* Clear Interrupt timers after IMS clear */ @@ -1657,31 +1591,12 @@ struct e1000_hw { #define E1000_KUMCTRLSTA_FIFO_CTRL_TX_BYPASS 0x00000800 /* In-Band Control */ -#define E1000_KUMCTRLSTA_INB_CTRL_LINK_STATUS_TX_TIMEOUT_DEFAULT 0x00000500 #define E1000_KUMCTRLSTA_INB_CTRL_DIS_PADDING 0x00000010 /* Half-Duplex Control */ #define E1000_KUMCTRLSTA_HD_CTRL_10_100_DEFAULT 0x00000004 #define E1000_KUMCTRLSTA_HD_CTRL_1000_DEFAULT 0x00000000 -#define E1000_KUMCTRLSTA_OFFSET_K0S_CTRL 0x0000001E - -#define E1000_KUMCTRLSTA_DIAG_FELPBK 0x2000 -#define E1000_KUMCTRLSTA_DIAG_NELPBK 0x1000 - -#define E1000_KUMCTRLSTA_K0S_100_EN 0x2000 -#define E1000_KUMCTRLSTA_K0S_GBE_EN 0x1000 -#define E1000_KUMCTRLSTA_K0S_ENTRY_LATENCY_MASK 0x0003 - -#define E1000_KABGTXD_BGSQLBIAS 0x00050000 - -#define E1000_PHY_CTRL_SPD_EN 0x00000001 -#define E1000_PHY_CTRL_D0A_LPLU 0x00000002 -#define E1000_PHY_CTRL_NOND0A_LPLU 0x00000004 -#define E1000_PHY_CTRL_NOND0A_GBE_DISABLE 0x00000008 -#define E1000_PHY_CTRL_GBE_DISABLE 0x00000040 -#define E1000_PHY_CTRL_B2B_EN 0x00000080 - /* LED Control */ #define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F #define E1000_LEDCTL_LED0_MODE_SHIFT 0 @@ -1751,9 +1666,6 @@ struct e1000_hw { #define E1000_ICR_RXD_FIFO_PAR1 0x01000000 /* queue 1 Rx descriptor FIFO parity error */ #define E1000_ICR_TXD_FIFO_PAR1 0x02000000 /* queue 1 Tx descriptor FIFO parity error */ #define E1000_ICR_ALL_PARITY 0x03F00000 /* all parity error bits */ -#define E1000_ICR_DSW 0x00000020 /* FW changed the status of DISSW bit in the FWSM */ -#define E1000_ICR_PHYINT 0x00001000 /* LAN connected device generates an interrupt */ -#define E1000_ICR_EPRST 0x00100000 /* ME handware reset occurs */ /* Interrupt Cause Set */ #define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ @@ -1780,9 +1692,6 @@ struct e1000_hw { #define E1000_ICS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ #define E1000_ICS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ #define E1000_ICS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ -#define E1000_ICS_DSW E1000_ICR_DSW -#define E1000_ICS_PHYINT E1000_ICR_PHYINT -#define E1000_ICS_EPRST E1000_ICR_EPRST /* Interrupt Mask Set */ #define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ @@ -1809,9 +1718,6 @@ struct e1000_hw { #define E1000_IMS_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ #define E1000_IMS_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ #define E1000_IMS_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ -#define E1000_IMS_DSW E1000_ICR_DSW -#define E1000_IMS_PHYINT E1000_ICR_PHYINT -#define E1000_IMS_EPRST E1000_ICR_EPRST /* Interrupt Mask Clear */ #define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ @@ -1838,9 +1744,6 @@ struct e1000_hw { #define E1000_IMC_PB_PAR E1000_ICR_PB_PAR /* packet buffer parity error */ #define E1000_IMC_RXD_FIFO_PAR1 E1000_ICR_RXD_FIFO_PAR1 /* queue 1 Rx descriptor FIFO parity error */ #define E1000_IMC_TXD_FIFO_PAR1 E1000_ICR_TXD_FIFO_PAR1 /* queue 1 Tx descriptor FIFO parity error */ -#define E1000_IMC_DSW E1000_ICR_DSW -#define E1000_IMC_PHYINT E1000_ICR_PHYINT -#define E1000_IMC_EPRST E1000_ICR_EPRST /* Receive Control */ #define E1000_RCTL_RST 0x00000001 /* Software reset */ @@ -1899,7 +1802,7 @@ struct e1000_hw { * value2 = [0..64512], default=4096 * value3 = [0..64512], default=0 */ - + #define E1000_PSRCTL_BSIZE0_MASK 0x0000007F #define E1000_PSRCTL_BSIZE1_MASK 0x00003F00 #define E1000_PSRCTL_BSIZE2_MASK 0x003F0000 @@ -2015,10 +1918,9 @@ struct e1000_hw { #define E1000_MRQC_RSS_FIELD_MASK 0xFFFF0000 #define E1000_MRQC_RSS_FIELD_IPV4_TCP 0x00010000 #define E1000_MRQC_RSS_FIELD_IPV4 0x00020000 -#define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX 0x00040000 +#define E1000_MRQC_RSS_FIELD_IPV6_TCP 0x00040000 #define E1000_MRQC_RSS_FIELD_IPV6_EX 0x00080000 #define E1000_MRQC_RSS_FIELD_IPV6 0x00100000 -#define E1000_MRQC_RSS_FIELD_IPV6_TCP 0x00200000 /* Definitions for power management and wakeup registers */ /* Wake Up Control */ @@ -2108,15 +2010,6 @@ struct e1000_hw { #define E1000_FWSM_MODE_SHIFT 1 #define E1000_FWSM_FW_VALID 0x00008000 /* FW established a valid mode */ -#define E1000_FWSM_RSPCIPHY 0x00000040 /* Reset PHY on PCI reset */ -#define E1000_FWSM_DISSW 0x10000000 /* FW disable SW Write Access */ -#define E1000_FWSM_SKUSEL_MASK 0x60000000 /* LAN SKU select */ -#define E1000_FWSM_SKUEL_SHIFT 29 -#define E1000_FWSM_SKUSEL_EMB 0x0 /* Embedded SKU */ -#define E1000_FWSM_SKUSEL_CONS 0x1 /* Consumer SKU */ -#define E1000_FWSM_SKUSEL_PERF_100 0x2 /* Perf & Corp 10/100 SKU */ -#define E1000_FWSM_SKUSEL_PERF_GBE 0x3 /* Perf & Copr GbE SKU */ - /* FFLT Debug Register */ #define E1000_FFLT_DBG_INVC 0x00100000 /* Invalid /C/ code handling */ @@ -2189,8 +2082,6 @@ struct e1000_host_command_info { E1000_GCR_TXDSCW_NO_SNOOP | \ E1000_GCR_TXDSCR_NO_SNOOP) -#define PCI_EX_82566_SNOOP_ALL PCI_EX_NO_SNOOP_ALL - #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000 /* Function Active and Power State to MNG */ #define E1000_FACTPS_FUNC0_POWER_STATE_MASK 0x00000003 @@ -2249,10 +2140,8 @@ struct e1000_host_command_info { #define EEPROM_PHY_CLASS_WORD 0x0007 #define EEPROM_INIT_CONTROL1_REG 0x000A #define EEPROM_INIT_CONTROL2_REG 0x000F -#define EEPROM_SWDEF_PINS_CTRL_PORT_1 0x0010 #define EEPROM_INIT_CONTROL3_PORT_B 0x0014 #define EEPROM_INIT_3GIO_3 0x001A -#define EEPROM_SWDEF_PINS_CTRL_PORT_0 0x0020 #define EEPROM_INIT_CONTROL3_PORT_A 0x0024 #define EEPROM_CFG 0x0012 #define EEPROM_FLASH_VERSION 0x0032 @@ -2264,16 +2153,10 @@ struct e1000_host_command_info { /* Word definitions for ID LED Settings */ #define ID_LED_RESERVED_0000 0x0000 #define ID_LED_RESERVED_FFFF 0xFFFF -#define ID_LED_RESERVED_82573 0xF746 -#define ID_LED_DEFAULT_82573 0x1811 #define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \ (ID_LED_OFF1_OFF2 << 8) | \ (ID_LED_DEF1_DEF2 << 4) | \ (ID_LED_DEF1_DEF2)) -#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \ - (ID_LED_DEF1_OFF2 << 8) | \ - (ID_LED_DEF1_ON2 << 4) | \ - (ID_LED_DEF1_DEF2)) #define ID_LED_DEF1_DEF2 0x1 #define ID_LED_DEF1_ON2 0x2 #define ID_LED_DEF1_OFF2 0x3 @@ -2308,11 +2191,6 @@ struct e1000_host_command_info { #define EEPROM_WORD0F_ASM_DIR 0x2000 #define EEPROM_WORD0F_ANE 0x0800 #define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 -#define EEPROM_WORD0F_LPLU 0x0001 - -/* Mask bits for fields in Word 0x10/0x20 of the EEPROM */ -#define EEPROM_WORD1020_GIGA_DISABLE 0x0010 -#define EEPROM_WORD1020_GIGA_DISABLE_NON_D0A 0x0008 /* Mask bits for fields in Word 0x1a of the EEPROM */ #define EEPROM_WORD1A_ASPM_MASK 0x000C @@ -2387,29 +2265,23 @@ struct e1000_host_command_info { #define E1000_EXTCNF_CTRL_D_UD_OWNER 0x00000010 #define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020 #define E1000_EXTCNF_CTRL_MDIO_HW_OWNERSHIP 0x00000040 -#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER 0x0FFF0000 +#define E1000_EXTCNF_CTRL_EXT_CNF_POINTER 0x1FFF0000 #define E1000_EXTCNF_SIZE_EXT_PHY_LENGTH 0x000000FF #define E1000_EXTCNF_SIZE_EXT_DOCK_LENGTH 0x0000FF00 #define E1000_EXTCNF_SIZE_EXT_PCIE_LENGTH 0x00FF0000 -#define E1000_EXTCNF_CTRL_LCD_WRITE_ENABLE 0x00000001 -#define E1000_EXTCNF_CTRL_SWFLAG 0x00000020 /* PBA constants */ -#define E1000_PBA_8K 0x0008 /* 8KB, default Rx allocation */ #define E1000_PBA_12K 0x000C /* 12KB, default Rx allocation */ #define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ #define E1000_PBA_22K 0x0016 #define E1000_PBA_24K 0x0018 #define E1000_PBA_30K 0x001E #define E1000_PBA_32K 0x0020 -#define E1000_PBA_34K 0x0022 #define E1000_PBA_38K 0x0026 #define E1000_PBA_40K 0x0028 #define E1000_PBA_48K 0x0030 /* 48KB, default RX allocation */ -#define E1000_PBS_16K E1000_PBA_16K - /* Flow Control Constants */ #define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 #define FLOW_CONTROL_ADDRESS_HIGH 0x00000100 @@ -2464,7 +2336,7 @@ struct e1000_host_command_info { /* Number of milliseconds we wait for Eeprom auto read bit done after MAC reset */ #define AUTO_READ_DONE_TIMEOUT 10 /* Number of milliseconds we wait for PHY configuration done after MAC reset */ -#define PHY_CFG_TIMEOUT 100 +#define PHY_CFG_TIMEOUT 40 #define E1000_TX_BUFFER_SIZE ((uint32_t)1514) @@ -2892,17 +2764,6 @@ struct e1000_host_command_info { #define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ #define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ -/* M88EC018 Rev 2 specific DownShift settings */ -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK 0x0E00 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_1X 0x0000 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_2X 0x0200 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_3X 0x0400 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_4X 0x0600 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X 0x0800 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_6X 0x0A00 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_7X 0x0C00 -#define M88EC018_EPSCR_DOWNSHIFT_COUNTER_8X 0x0E00 - /* IGP01E1000 Specific Port Config Register - R/W */ #define IGP01E1000_PSCFR_AUTO_MDIX_PAR_DETECT 0x0010 #define IGP01E1000_PSCFR_PRE_EN 0x0020 @@ -3129,221 +2990,6 @@ struct e1000_host_command_info { #define L1LXT971A_PHY_ID 0x001378E0 #define GG82563_E_PHY_ID 0x01410CA0 - -/* Bits... - * 15-5: page - * 4-0: register offset - */ -#define PHY_PAGE_SHIFT 5 -#define PHY_REG(page, reg) \ - (((page) << PHY_PAGE_SHIFT) | ((reg) & MAX_PHY_REG_ADDRESS)) - -#define IGP3_PHY_PORT_CTRL \ - PHY_REG(769, 17) /* Port General Configuration */ -#define IGP3_PHY_RATE_ADAPT_CTRL \ - PHY_REG(769, 25) /* Rate Adapter Control Register */ - -#define IGP3_KMRN_FIFO_CTRL_STATS \ - PHY_REG(770, 16) /* KMRN FIFO's control/status register */ -#define IGP3_KMRN_POWER_MNG_CTRL \ - PHY_REG(770, 17) /* KMRN Power Management Control Register */ -#define IGP3_KMRN_INBAND_CTRL \ - PHY_REG(770, 18) /* KMRN Inband Control Register */ -#define IGP3_KMRN_DIAG \ - PHY_REG(770, 19) /* KMRN Diagnostic register */ -#define IGP3_KMRN_DIAG_PCS_LOCK_LOSS 0x0002 /* RX PCS is not synced */ -#define IGP3_KMRN_ACK_TIMEOUT \ - PHY_REG(770, 20) /* KMRN Acknowledge Timeouts register */ - -#define IGP3_VR_CTRL \ - PHY_REG(776, 18) /* Voltage regulator control register */ -#define IGP3_VR_CTRL_MODE_SHUT 0x0200 /* Enter powerdown, shutdown VRs */ - -#define IGP3_CAPABILITY \ - PHY_REG(776, 19) /* IGP3 Capability Register */ - -/* Capabilities for SKU Control */ -#define IGP3_CAP_INITIATE_TEAM 0x0001 /* Able to initiate a team */ -#define IGP3_CAP_WFM 0x0002 /* Support WoL and PXE */ -#define IGP3_CAP_ASF 0x0004 /* Support ASF */ -#define IGP3_CAP_LPLU 0x0008 /* Support Low Power Link Up */ -#define IGP3_CAP_DC_AUTO_SPEED 0x0010 /* Support AC/DC Auto Link Speed */ -#define IGP3_CAP_SPD 0x0020 /* Support Smart Power Down */ -#define IGP3_CAP_MULT_QUEUE 0x0040 /* Support 2 tx & 2 rx queues */ -#define IGP3_CAP_RSS 0x0080 /* Support RSS */ -#define IGP3_CAP_8021PQ 0x0100 /* Support 802.1Q & 802.1p */ -#define IGP3_CAP_AMT_CB 0x0200 /* Support active manageability and circuit breaker */ - -#define IGP3_PPC_JORDAN_EN 0x0001 -#define IGP3_PPC_JORDAN_GIGA_SPEED 0x0002 - -#define IGP3_KMRN_PMC_EE_IDLE_LINK_DIS 0x0001 -#define IGP3_KMRN_PMC_K0S_ENTRY_LATENCY_MASK 0x001E -#define IGP3_KMRN_PMC_K0S_MODE1_EN_GIGA 0x0020 -#define IGP3_KMRN_PMC_K0S_MODE1_EN_100 0x0040 - -#define IGP3E1000_PHY_MISC_CTRL 0x1B /* Misc. Ctrl register */ -#define IGP3_PHY_MISC_DUPLEX_MANUAL_SET 0x1000 /* Duplex Manual Set */ - -#define IGP3_KMRN_EXT_CTRL PHY_REG(770, 18) -#define IGP3_KMRN_EC_DIS_INBAND 0x0080 - -#define IGP03E1000_E_PHY_ID 0x02A80390 -#define IFE_E_PHY_ID 0x02A80330 /* 10/100 PHY */ -#define IFE_PLUS_E_PHY_ID 0x02A80320 -#define IFE_C_E_PHY_ID 0x02A80310 - -#define IFE_PHY_EXTENDED_STATUS_CONTROL 0x10 /* 100BaseTx Extended Status, Control and Address */ -#define IFE_PHY_SPECIAL_CONTROL 0x11 /* 100BaseTx PHY special control register */ -#define IFE_PHY_RCV_FALSE_CARRIER 0x13 /* 100BaseTx Receive False Carrier Counter */ -#define IFE_PHY_RCV_DISCONNECT 0x14 /* 100BaseTx Receive Disconnet Counter */ -#define IFE_PHY_RCV_ERROT_FRAME 0x15 /* 100BaseTx Receive Error Frame Counter */ -#define IFE_PHY_RCV_SYMBOL_ERR 0x16 /* Receive Symbol Error Counter */ -#define IFE_PHY_PREM_EOF_ERR 0x17 /* 100BaseTx Receive Premature End Of Frame Error Counter */ -#define IFE_PHY_RCV_EOF_ERR 0x18 /* 10BaseT Receive End Of Frame Error Counter */ -#define IFE_PHY_TX_JABBER_DETECT 0x19 /* 10BaseT Transmit Jabber Detect Counter */ -#define IFE_PHY_EQUALIZER 0x1A /* PHY Equalizer Control and Status */ -#define IFE_PHY_SPECIAL_CONTROL_LED 0x1B /* PHY special control and LED configuration */ -#define IFE_PHY_MDIX_CONTROL 0x1C /* MDI/MDI-X Control register */ -#define IFE_PHY_HWI_CONTROL 0x1D /* Hardware Integrity Control (HWI) */ - -#define IFE_PESC_REDUCED_POWER_DOWN_DISABLE 0x2000 /* Defaut 1 = Disable auto reduced power down */ -#define IFE_PESC_100BTX_POWER_DOWN 0x0400 /* Indicates the power state of 100BASE-TX */ -#define IFE_PESC_10BTX_POWER_DOWN 0x0200 /* Indicates the power state of 10BASE-T */ -#define IFE_PESC_POLARITY_REVERSED 0x0100 /* Indicates 10BASE-T polarity */ -#define IFE_PESC_PHY_ADDR_MASK 0x007C /* Bit 6:2 for sampled PHY address */ -#define IFE_PESC_SPEED 0x0002 /* Auto-negotiation speed result 1=100Mbs, 0=10Mbs */ -#define IFE_PESC_DUPLEX 0x0001 /* Auto-negotiation duplex result 1=Full, 0=Half */ -#define IFE_PESC_POLARITY_REVERSED_SHIFT 8 - -#define IFE_PSC_DISABLE_DYNAMIC_POWER_DOWN 0x0100 /* 1 = Dyanmic Power Down disabled */ -#define IFE_PSC_FORCE_POLARITY 0x0020 /* 1=Reversed Polarity, 0=Normal */ -#define IFE_PSC_AUTO_POLARITY_DISABLE 0x0010 /* 1=Auto Polarity Disabled, 0=Enabled */ -#define IFE_PSC_JABBER_FUNC_DISABLE 0x0001 /* 1=Jabber Disabled, 0=Normal Jabber Operation */ -#define IFE_PSC_FORCE_POLARITY_SHIFT 5 -#define IFE_PSC_AUTO_POLARITY_DISABLE_SHIFT 4 - -#define IFE_PMC_AUTO_MDIX 0x0080 /* 1=enable MDI/MDI-X feature, default 0=disabled */ -#define IFE_PMC_FORCE_MDIX 0x0040 /* 1=force MDIX-X, 0=force MDI */ -#define IFE_PMC_MDIX_STATUS 0x0020 /* 1=MDI-X, 0=MDI */ -#define IFE_PMC_AUTO_MDIX_COMPLETE 0x0010 /* Resolution algorthm is completed */ -#define IFE_PMC_MDIX_MODE_SHIFT 6 -#define IFE_PHC_MDIX_RESET_ALL_MASK 0x0000 /* Disable auto MDI-X */ - -#define IFE_PHC_HWI_ENABLE 0x8000 /* Enable the HWI feature */ -#define IFE_PHC_ABILITY_CHECK 0x4000 /* 1= Test Passed, 0=failed */ -#define IFE_PHC_TEST_EXEC 0x2000 /* PHY launch test pulses on the wire */ -#define IFE_PHC_HIGHZ 0x0200 /* 1 = Open Circuit */ -#define IFE_PHC_LOWZ 0x0400 /* 1 = Short Circuit */ -#define IFE_PHC_LOW_HIGH_Z_MASK 0x0600 /* Mask for indication type of problem on the line */ -#define IFE_PHC_DISTANCE_MASK 0x01FF /* Mask for distance to the cable problem, in 80cm granularity */ -#define IFE_PHC_RESET_ALL_MASK 0x0000 /* Disable HWI */ -#define IFE_PSCL_PROBE_MODE 0x0020 /* LED Probe mode */ -#define IFE_PSCL_PROBE_LEDS_OFF 0x0006 /* Force LEDs 0 and 2 off */ -#define IFE_PSCL_PROBE_LEDS_ON 0x0007 /* Force LEDs 0 and 2 on */ - -#define ICH8_FLASH_COMMAND_TIMEOUT 500 /* 500 ms , should be adjusted */ -#define ICH8_FLASH_CYCLE_REPEAT_COUNT 10 /* 10 cycles , should be adjusted */ -#define ICH8_FLASH_SEG_SIZE_256 256 -#define ICH8_FLASH_SEG_SIZE_4K 4096 -#define ICH8_FLASH_SEG_SIZE_64K 65536 - -#define ICH8_CYCLE_READ 0x0 -#define ICH8_CYCLE_RESERVED 0x1 -#define ICH8_CYCLE_WRITE 0x2 -#define ICH8_CYCLE_ERASE 0x3 - -#define ICH8_FLASH_GFPREG 0x0000 -#define ICH8_FLASH_HSFSTS 0x0004 -#define ICH8_FLASH_HSFCTL 0x0006 -#define ICH8_FLASH_FADDR 0x0008 -#define ICH8_FLASH_FDATA0 0x0010 -#define ICH8_FLASH_FRACC 0x0050 -#define ICH8_FLASH_FREG0 0x0054 -#define ICH8_FLASH_FREG1 0x0058 -#define ICH8_FLASH_FREG2 0x005C -#define ICH8_FLASH_FREG3 0x0060 -#define ICH8_FLASH_FPR0 0x0074 -#define ICH8_FLASH_FPR1 0x0078 -#define ICH8_FLASH_SSFSTS 0x0090 -#define ICH8_FLASH_SSFCTL 0x0092 -#define ICH8_FLASH_PREOP 0x0094 -#define ICH8_FLASH_OPTYPE 0x0096 -#define ICH8_FLASH_OPMENU 0x0098 - -#define ICH8_FLASH_REG_MAPSIZE 0x00A0 -#define ICH8_FLASH_SECTOR_SIZE 4096 -#define ICH8_GFPREG_BASE_MASK 0x1FFF -#define ICH8_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF - -/* ICH8 GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ -/* Offset 04h HSFSTS */ -union ich8_hws_flash_status { - struct ich8_hsfsts { -#ifdef E1000_BIG_ENDIAN - uint16_t reserved2 :6; - uint16_t fldesvalid :1; - uint16_t flockdn :1; - uint16_t flcdone :1; - uint16_t flcerr :1; - uint16_t dael :1; - uint16_t berasesz :2; - uint16_t flcinprog :1; - uint16_t reserved1 :2; -#else - uint16_t flcdone :1; /* bit 0 Flash Cycle Done */ - uint16_t flcerr :1; /* bit 1 Flash Cycle Error */ - uint16_t dael :1; /* bit 2 Direct Access error Log */ - uint16_t berasesz :2; /* bit 4:3 Block/Sector Erase Size */ - uint16_t flcinprog :1; /* bit 5 flash SPI cycle in Progress */ - uint16_t reserved1 :2; /* bit 13:6 Reserved */ - uint16_t reserved2 :6; /* bit 13:6 Reserved */ - uint16_t fldesvalid :1; /* bit 14 Flash Descriptor Valid */ - uint16_t flockdn :1; /* bit 15 Flash Configuration Lock-Down */ -#endif - } hsf_status; - uint16_t regval; -}; - -/* ICH8 GbE Flash Hardware Sequencing Flash control Register bit breakdown */ -/* Offset 06h FLCTL */ -union ich8_hws_flash_ctrl { - struct ich8_hsflctl { -#ifdef E1000_BIG_ENDIAN - uint16_t fldbcount :2; - uint16_t flockdn :6; - uint16_t flcgo :1; - uint16_t flcycle :2; - uint16_t reserved :5; -#else - uint16_t flcgo :1; /* 0 Flash Cycle Go */ - uint16_t flcycle :2; /* 2:1 Flash Cycle */ - uint16_t reserved :5; /* 7:3 Reserved */ - uint16_t fldbcount :2; /* 9:8 Flash Data Byte Count */ - uint16_t flockdn :6; /* 15:10 Reserved */ -#endif - } hsf_ctrl; - uint16_t regval; -}; - -/* ICH8 Flash Region Access Permissions */ -union ich8_hws_flash_regacc { - struct ich8_flracc { -#ifdef E1000_BIG_ENDIAN - uint32_t gmwag :8; - uint32_t gmrag :8; - uint32_t grwa :8; - uint32_t grra :8; -#else - uint32_t grra :8; /* 0:7 GbE region Read Access */ - uint32_t grwa :8; /* 8:15 GbE region Write Access */ - uint32_t gmrag :8; /* 23:16 GbE Master Read Access Grant */ - uint32_t gmwag :8; /* 31:24 GbE Master Write Access Grant */ -#endif - } hsf_flregacc; - uint16_t regval; -}; - /* Miscellaneous PHY bit definitions. */ #define PHY_PREAMBLE 0xFFFFFFFF #define PHY_SOF 0x01 diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index aefcba701..43e647284 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,13 +22,51 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ #include "e1000.h" +/* Change Log + * 7.0.33 3-Feb-2006 + * o Added another fix for the pass false carrier bit + * 7.0.32 24-Jan-2006 + * o Need to rebuild with noew version number for the pass false carrier + * fix in e1000_hw.c + * 7.0.30 18-Jan-2006 + * o fixup for tso workaround to disable it for pci-x + * o fix mem leak on 82542 + * o fixes for 10 Mb/s connections and incorrect stats + * 7.0.28 01/06/2006 + * o hardware workaround to only set "speed mode" bit for 1G link. + * 7.0.26 12/23/2005 + * o wake on lan support modified for device ID 10B5 + * o fix dhcp + vlan issue not making it to the iAMT firmware + * 7.0.24 12/9/2005 + * o New hardware support for the Gigabit NIC embedded in the south bridge + * o Fixes to the recycling logic (skb->tail) from IBM LTC + * 6.3.9 12/16/2005 + * o incorporate fix for recycled skbs from IBM LTC + * 6.3.7 11/18/2005 + * o Honor eeprom setting for enabling/disabling Wake On Lan + * 6.3.5 11/17/2005 + * o Fix memory leak in rx ring handling for PCI Express adapters + * 6.3.4 11/8/05 + * o Patch from Jesper Juhl to remove redundant NULL checks for kfree + * 6.3.2 9/20/05 + * o Render logic that sets/resets DRV_LOAD as inline functions to + * avoid code replication. If f/w is AMT then set DRV_LOAD only when + * network interface is open. + * o Handle DRV_LOAD set/reset in cases where AMT uses VLANs. + * o Adjust PBA partioning for Jumbo frames using MTU size and not + * rx_buffer_len + * 6.3.1 9/19/05 + * o Use adapter->tx_timeout_factor in Tx Hung Detect logic + * (e1000_clean_tx_irq) + * o Support for 8086:10B5 device (Quad Port) + */ + char e1000_driver_name[] = "e1000"; static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; #ifndef CONFIG_E1000_NAPI @@ -36,9 +74,9 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; #else #define DRIVERNAPI "-NAPI" #endif -#define DRV_VERSION "7.1.9-k4"DRIVERNAPI +#define DRV_VERSION "7.0.33-k2"DRIVERNAPI char e1000_driver_version[] = DRV_VERSION; -static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; +static char e1000_copyright[] = "Copyright (c) 1999-2005 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table * @@ -73,11 +111,6 @@ static struct pci_device_id e1000_pci_tbl[] = { INTEL_E1000_ETHERNET_DEVICE(0x1026), INTEL_E1000_ETHERNET_DEVICE(0x1027), INTEL_E1000_ETHERNET_DEVICE(0x1028), - INTEL_E1000_ETHERNET_DEVICE(0x1049), - INTEL_E1000_ETHERNET_DEVICE(0x104A), - INTEL_E1000_ETHERNET_DEVICE(0x104B), - INTEL_E1000_ETHERNET_DEVICE(0x104C), - INTEL_E1000_ETHERNET_DEVICE(0x104D), INTEL_E1000_ETHERNET_DEVICE(0x105E), INTEL_E1000_ETHERNET_DEVICE(0x105F), INTEL_E1000_ETHERNET_DEVICE(0x1060), @@ -101,8 +134,6 @@ static struct pci_device_id e1000_pci_tbl[] = { INTEL_E1000_ETHERNET_DEVICE(0x109A), INTEL_E1000_ETHERNET_DEVICE(0x10B5), INTEL_E1000_ETHERNET_DEVICE(0x10B9), - INTEL_E1000_ETHERNET_DEVICE(0x10BA), - INTEL_E1000_ETHERNET_DEVICE(0x10BB), /* required last entry */ {0,} }; @@ -140,6 +171,7 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter, static void e1000_set_multi(struct net_device *netdev); static void e1000_update_phy_info(unsigned long data); static void e1000_watchdog(unsigned long data); +static void e1000_watchdog_task(struct e1000_adapter *adapter); static void e1000_82547_tx_fifo_stall(unsigned long data); static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev); static struct net_device_stats * e1000_get_stats(struct net_device *netdev); @@ -176,16 +208,16 @@ static void e1000_leave_82542_rst(struct e1000_adapter *adapter); static void e1000_tx_timeout(struct net_device *dev); static void e1000_reset_task(struct net_device *dev); static void e1000_smartspeed(struct e1000_adapter *adapter); -static int e1000_82547_fifo_workaround(struct e1000_adapter *adapter, - struct sk_buff *skb); +static inline int e1000_82547_fifo_workaround(struct e1000_adapter *adapter, + struct sk_buff *skb); static void e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp); static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); static void e1000_restore_vlan(struct e1000_adapter *adapter); -static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); #ifdef CONFIG_PM +static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); static int e1000_resume(struct pci_dev *pdev); #endif static void e1000_shutdown(struct pci_dev *pdev); @@ -195,16 +227,6 @@ static void e1000_shutdown(struct pci_dev *pdev); static void e1000_netpoll (struct net_device *netdev); #endif -static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, - pci_channel_state_t state); -static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev); -static void e1000_io_resume(struct pci_dev *pdev); - -static struct pci_error_handlers e1000_err_handler = { - .error_detected = e1000_io_error_detected, - .slot_reset = e1000_io_slot_reset, - .resume = e1000_io_resume, -}; static struct pci_driver e1000_driver = { .name = e1000_driver_name, @@ -212,12 +234,11 @@ static struct pci_driver e1000_driver = { .probe = e1000_probe, .remove = __devexit_p(e1000_remove), /* Power Managment Hooks */ - .suspend = e1000_suspend, #ifdef CONFIG_PM + .suspend = e1000_suspend, .resume = e1000_resume, #endif - .shutdown = e1000_shutdown, - .err_handler = &e1000_err_handler + .shutdown = e1000_shutdown }; MODULE_AUTHOR("Intel Corporation, "); @@ -267,50 +288,12 @@ e1000_exit_module(void) module_exit(e1000_exit_module); -static int e1000_request_irq(struct e1000_adapter *adapter) -{ - struct net_device *netdev = adapter->netdev; - int flags, err = 0; - - flags = IRQF_SHARED; -#ifdef CONFIG_PCI_MSI - if (adapter->hw.mac_type > e1000_82547_rev_2) { - adapter->have_msi = TRUE; - if ((err = pci_enable_msi(adapter->pdev))) { - DPRINTK(PROBE, ERR, - "Unable to allocate MSI interrupt Error: %d\n", err); - adapter->have_msi = FALSE; - } - } - if (adapter->have_msi) - flags &= ~IRQF_SHARED; -#endif - if ((err = request_irq(adapter->pdev->irq, &e1000_intr, flags, - netdev->name, netdev))) - DPRINTK(PROBE, ERR, - "Unable to allocate interrupt Error: %d\n", err); - - return err; -} - -static void e1000_free_irq(struct e1000_adapter *adapter) -{ - struct net_device *netdev = adapter->netdev; - - free_irq(adapter->pdev->irq, netdev); - -#ifdef CONFIG_PCI_MSI - if (adapter->have_msi) - pci_disable_msi(adapter->pdev); -#endif -} - /** * e1000_irq_disable - Mask off interrupt generation on the NIC * @adapter: board private structure **/ -static void +static inline void e1000_irq_disable(struct e1000_adapter *adapter) { atomic_inc(&adapter->irq_sem); @@ -324,7 +307,7 @@ e1000_irq_disable(struct e1000_adapter *adapter) * @adapter: board private structure **/ -static void +static inline void e1000_irq_enable(struct e1000_adapter *adapter) { if (likely(atomic_dec_and_test(&adapter->irq_sem))) { @@ -365,21 +348,19 @@ e1000_update_mng_vlan(struct e1000_adapter *adapter) * For ASF and Pass Through versions of f/w this means that the * driver is no longer loaded. For AMT version (only with 82573) i * of the f/w this means that the netowrk i/f is closed. - * + * **/ -static void +static inline void e1000_release_hw_control(struct e1000_adapter *adapter) { uint32_t ctrl_ext; uint32_t swsm; - uint32_t extcnf; /* Let firmware taken over control of h/w */ switch (adapter->hw.mac_type) { case e1000_82571: case e1000_82572: - case e1000_80003es2lan: ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); E1000_WRITE_REG(&adapter->hw, CTRL_EXT, ctrl_ext & ~E1000_CTRL_EXT_DRV_LOAD); @@ -388,11 +369,6 @@ e1000_release_hw_control(struct e1000_adapter *adapter) swsm = E1000_READ_REG(&adapter->hw, SWSM); E1000_WRITE_REG(&adapter->hw, SWSM, swsm & ~E1000_SWSM_DRV_LOAD); - case e1000_ich8lan: - extcnf = E1000_READ_REG(&adapter->hw, CTRL_EXT); - E1000_WRITE_REG(&adapter->hw, CTRL_EXT, - extcnf & ~E1000_CTRL_EXT_DRV_LOAD); - break; default: break; } @@ -403,23 +379,21 @@ e1000_release_hw_control(struct e1000_adapter *adapter) * @adapter: address of board private structure * * e1000_get_hw_control sets {CTRL_EXT|FWSM}:DRV_LOAD bit. - * For ASF and Pass Through versions of f/w this means that - * the driver is loaded. For AMT version (only with 82573) + * For ASF and Pass Through versions of f/w this means that + * the driver is loaded. For AMT version (only with 82573) * of the f/w this means that the netowrk i/f is open. - * + * **/ -static void +static inline void e1000_get_hw_control(struct e1000_adapter *adapter) { uint32_t ctrl_ext; uint32_t swsm; - uint32_t extcnf; /* Let firmware know the driver has taken over */ switch (adapter->hw.mac_type) { case e1000_82571: case e1000_82572: - case e1000_80003es2lan: ctrl_ext = E1000_READ_REG(&adapter->hw, CTRL_EXT); E1000_WRITE_REG(&adapter->hw, CTRL_EXT, ctrl_ext | E1000_CTRL_EXT_DRV_LOAD); @@ -429,11 +403,6 @@ e1000_get_hw_control(struct e1000_adapter *adapter) E1000_WRITE_REG(&adapter->hw, SWSM, swsm | E1000_SWSM_DRV_LOAD); break; - case e1000_ich8lan: - extcnf = E1000_READ_REG(&adapter->hw, EXTCNF_CTRL); - E1000_WRITE_REG(&adapter->hw, EXTCNF_CTRL, - extcnf | E1000_EXTCNF_CTRL_SWFLAG); - break; default: break; } @@ -443,10 +412,18 @@ int e1000_up(struct e1000_adapter *adapter) { struct net_device *netdev = adapter->netdev; - int i; + int i, err; /* hardware has been reset, we need to reload some things */ + /* Reset the PHY if it was previously powered down */ + if (adapter->hw.media_type == e1000_media_type_copper) { + uint16_t mii_reg; + e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); + if (mii_reg & MII_CR_POWER_DOWN) + e1000_phy_reset(&adapter->hw); + } + e1000_set_multi(netdev); e1000_restore_vlan(adapter); @@ -463,6 +440,24 @@ e1000_up(struct e1000_adapter *adapter) E1000_DESC_UNUSED(ring)); } +#ifdef CONFIG_PCI_MSI + if (adapter->hw.mac_type > e1000_82547_rev_2) { + adapter->have_msi = TRUE; + if ((err = pci_enable_msi(adapter->pdev))) { + DPRINTK(PROBE, ERR, + "Unable to allocate MSI interrupt Error: %d\n", err); + adapter->have_msi = FALSE; + } + } +#endif + if ((err = request_irq(adapter->pdev->irq, &e1000_intr, + SA_SHIRQ | SA_SAMPLE_RANDOM, + netdev->name, netdev))) { + DPRINTK(PROBE, ERR, + "Unable to allocate interrupt Error: %d\n", err); + return err; + } + adapter->tx_queue_len = netdev->tx_queue_len; mod_timer(&adapter->watchdog_timer, jiffies); @@ -475,60 +470,21 @@ e1000_up(struct e1000_adapter *adapter) return 0; } -/** - * e1000_power_up_phy - restore link in case the phy was powered down - * @adapter: address of board private structure - * - * The phy may be powered down to save power and turn off link when the - * driver is unloaded and wake on lan is not enabled (among others) - * *** this routine MUST be followed by a call to e1000_reset *** - * - **/ - -static void e1000_power_up_phy(struct e1000_adapter *adapter) -{ - uint16_t mii_reg = 0; - - /* Just clear the power down bit to wake the phy back up */ - if (adapter->hw.media_type == e1000_media_type_copper) { - /* according to the manual, the phy will retain its - * settings across a power-down/up cycle */ - e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); - mii_reg &= ~MII_CR_POWER_DOWN; - e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg); - } -} - -static void e1000_power_down_phy(struct e1000_adapter *adapter) -{ - boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) && - e1000_check_mng_mode(&adapter->hw); - /* Power down the PHY so no link is implied when interface is down - * The PHY cannot be powered down if any of the following is TRUE - * (a) WoL is enabled - * (b) AMT is active - * (c) SoL/IDER session is active */ - if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 && - adapter->hw.mac_type != e1000_ich8lan && - adapter->hw.media_type == e1000_media_type_copper && - !(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) && - !mng_mode_enabled && - !e1000_check_phy_reset_block(&adapter->hw)) { - uint16_t mii_reg = 0; - e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); - mii_reg |= MII_CR_POWER_DOWN; - e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg); - mdelay(1); - } -} - void e1000_down(struct e1000_adapter *adapter) { struct net_device *netdev = adapter->netdev; + boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) && + e1000_check_mng_mode(&adapter->hw); e1000_irq_disable(adapter); + free_irq(adapter->pdev->irq, netdev); +#ifdef CONFIG_PCI_MSI + if (adapter->hw.mac_type > e1000_82547_rev_2 && + adapter->have_msi == TRUE) + pci_disable_msi(adapter->pdev); +#endif del_timer_sync(&adapter->tx_fifo_stall_timer); del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->phy_info_timer); @@ -545,17 +501,23 @@ e1000_down(struct e1000_adapter *adapter) e1000_reset(adapter); e1000_clean_all_tx_rings(adapter); e1000_clean_all_rx_rings(adapter); -} -void -e1000_reinit_locked(struct e1000_adapter *adapter) -{ - WARN_ON(in_interrupt()); - while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) - msleep(1); - e1000_down(adapter); - e1000_up(adapter); - clear_bit(__E1000_RESETTING, &adapter->flags); + /* Power down the PHY so no link is implied when interface is down * + * The PHY cannot be powered down if any of the following is TRUE * + * (a) WoL is enabled + * (b) AMT is active + * (c) SoL/IDER session is active */ + if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 && + adapter->hw.media_type == e1000_media_type_copper && + !(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) && + !mng_mode_enabled && + !e1000_check_phy_reset_block(&adapter->hw)) { + uint16_t mii_reg; + e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); + mii_reg |= MII_CR_POWER_DOWN; + e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg); + mdelay(1); + } } void @@ -581,9 +543,6 @@ e1000_reset(struct e1000_adapter *adapter) case e1000_82573: pba = E1000_PBA_12K; break; - case e1000_ich8lan: - pba = E1000_PBA_8K; - break; default: pba = E1000_PBA_48K; break; @@ -608,12 +567,6 @@ e1000_reset(struct e1000_adapter *adapter) /* Set the FC high water mark to 90% of the FIFO size. * Required to clear last 3 LSB */ fc_high_water_mark = ((pba * 9216)/10) & 0xFFF8; - /* We can't use 90% on small FIFOs because the remainder - * would be less than 1 full frame. In this case, we size - * it to allow at least a full frame above the high water - * mark. */ - if (pba < E1000_PBA_16K) - fc_high_water_mark = (pba * 1024) - 1600; adapter->hw.fc_high_water = fc_high_water_mark; adapter->hw.fc_low_water = fc_high_water_mark - 8; @@ -636,23 +589,6 @@ e1000_reset(struct e1000_adapter *adapter) e1000_reset_adaptive(&adapter->hw); e1000_phy_get_info(&adapter->hw, &adapter->phy_info); - - if (!adapter->smart_power_down && - (adapter->hw.mac_type == e1000_82571 || - adapter->hw.mac_type == e1000_82572)) { - uint16_t phy_data = 0; - /* speed up time to link by disabling smart power down, ignore - * the return value of this function because there is nothing - * different we would do if it failed */ - e1000_read_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT, - &phy_data); - phy_data &= ~IGP02E1000_PM_SPD; - e1000_write_phy_reg(&adapter->hw, IGP02E1000_PHY_POWER_MGMT, - phy_data); - } - - if (adapter->hw.mac_type < e1000_ich8lan) - /* FIXME: this code is duplicate and wrong for PCI Express */ if (adapter->en_mng_pt) { manc = E1000_READ_REG(&adapter->hw, MANC); manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); @@ -679,7 +615,6 @@ e1000_probe(struct pci_dev *pdev, struct net_device *netdev; struct e1000_adapter *adapter; unsigned long mmio_start, mmio_len; - unsigned long flash_start, flash_len; static int cards_found = 0; static int e1000_ksp3_port_a = 0; /* global ksp3 port a indication */ @@ -689,12 +624,10 @@ e1000_probe(struct pci_dev *pdev, if ((err = pci_enable_device(pdev))) return err; - if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && - !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { + if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { pci_using_dac = 1; } else { - if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) && - (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { + if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { E1000_ERR("No usable DMA configuration, aborting\n"); return err; } @@ -774,25 +707,12 @@ e1000_probe(struct pci_dev *pdev, if ((err = e1000_sw_init(adapter))) goto err_sw_init; - /* Flash BAR mapping must happen after e1000_sw_init - * because it depends on mac_type */ - if ((adapter->hw.mac_type == e1000_ich8lan) && - (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { - flash_start = pci_resource_start(pdev, 1); - flash_len = pci_resource_len(pdev, 1); - adapter->hw.flash_address = ioremap(flash_start, flash_len); - if (!adapter->hw.flash_address) { - err = -EIO; - goto err_flashmap; - } - } - if ((err = e1000_check_phy_reset_block(&adapter->hw))) DPRINTK(PROBE, INFO, "PHY reset is blocked due to SOL/IDER session.\n"); /* if ksp3, indicate if it's port a being setup */ - if (pdev->device == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 && - e1000_ksp3_port_a == 0) + if (pdev->device == E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3 && + e1000_ksp3_port_a == 0) adapter->ksp3_port_a = 1; e1000_ksp3_port_a++; /* Reset for multiple KP3 adapters */ @@ -805,8 +725,6 @@ e1000_probe(struct pci_dev *pdev, NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; - if (adapter->hw.mac_type == e1000_ich8lan) - netdev->features &= ~NETIF_F_HW_VLAN_FILTER; } #ifdef NETIF_F_TSO @@ -822,17 +740,11 @@ e1000_probe(struct pci_dev *pdev, if (pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; - netdev->features |= NETIF_F_LLTX; - + /* hard_start_xmit is safe against parallel locking */ + netdev->features |= NETIF_F_LLTX; + adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); - /* initialize eeprom parameters */ - - if (e1000_init_eeprom_params(&adapter->hw)) { - E1000_ERR("EEPROM initialization failed\n"); - return -EIO; - } - /* before reading the EEPROM, reset the controller to * put the device in a known good starting state */ @@ -871,6 +783,9 @@ e1000_probe(struct pci_dev *pdev, adapter->watchdog_timer.function = &e1000_watchdog; adapter->watchdog_timer.data = (unsigned long) adapter; + INIT_WORK(&adapter->watchdog_task, + (void (*)(void *))e1000_watchdog_task, adapter); + init_timer(&adapter->phy_info_timer); adapter->phy_info_timer.function = &e1000_update_phy_info; adapter->phy_info_timer.data = (unsigned long) adapter; @@ -900,11 +815,6 @@ e1000_probe(struct pci_dev *pdev, EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data); eeprom_apme_mask = E1000_EEPROM_82544_APM; break; - case e1000_ich8lan: - e1000_read_eeprom(&adapter->hw, - EEPROM_INIT_CONTROL1_REG, 1, &eeprom_data); - eeprom_apme_mask = E1000_EEPROM_ICH8_APME; - break; case e1000_82546: case e1000_82546_rev_3: case e1000_82571: @@ -964,9 +874,6 @@ e1000_probe(struct pci_dev *pdev, return 0; err_register: - if (adapter->hw.flash_address) - iounmap(adapter->hw.flash_address); -err_flashmap: err_sw_init: err_eeprom: iounmap(adapter->hw.hw_addr); @@ -1000,7 +907,6 @@ e1000_remove(struct pci_dev *pdev) flush_scheduled_work(); if (adapter->hw.mac_type >= e1000_82540 && - adapter->hw.mac_type != e1000_ich8lan && adapter->hw.media_type == e1000_media_type_copper) { manc = E1000_READ_REG(&adapter->hw, MANC); if (manc & E1000_MANC_SMBUS_EN) { @@ -1029,8 +935,6 @@ e1000_remove(struct pci_dev *pdev) #endif iounmap(adapter->hw.hw_addr); - if (adapter->hw.flash_address) - iounmap(adapter->hw.flash_address); pci_release_regions(pdev); free_netdev(netdev); @@ -1068,8 +972,8 @@ e1000_sw_init(struct e1000_adapter *adapter) pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); - adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE; - adapter->rx_ps_bsize0 = E1000_RXBUFFER_128; + adapter->rx_buffer_len = E1000_RXBUFFER_2048; + adapter->rx_ps_bsize0 = E1000_RXBUFFER_256; hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE; hw->min_frame_size = MINIMUM_ETHERNET_FRAME_SIZE; @@ -1081,6 +985,13 @@ e1000_sw_init(struct e1000_adapter *adapter) return -EIO; } + /* initialize eeprom parameters */ + + if (e1000_init_eeprom_params(hw)) { + E1000_ERR("EEPROM initialization failed\n"); + return -EIO; + } + switch (hw->mac_type) { default: break; @@ -1192,10 +1103,6 @@ e1000_open(struct net_device *netdev) struct e1000_adapter *adapter = netdev_priv(netdev); int err; - /* disallow open during test */ - if (test_bit(__E1000_DRIVER_TESTING, &adapter->flags)) - return -EBUSY; - /* allocate transmit descriptors */ if ((err = e1000_setup_all_tx_resources(adapter))) @@ -1206,12 +1113,6 @@ e1000_open(struct net_device *netdev) if ((err = e1000_setup_all_rx_resources(adapter))) goto err_setup_rx; - err = e1000_request_irq(adapter); - if (err) - goto err_up; - - e1000_power_up_phy(adapter); - if ((err = e1000_up(adapter))) goto err_up; adapter->mng_vlan_id = E1000_MNG_VLAN_NONE; @@ -1255,10 +1156,7 @@ e1000_close(struct net_device *netdev) { struct e1000_adapter *adapter = netdev_priv(netdev); - WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); e1000_down(adapter); - e1000_power_down_phy(adapter); - e1000_free_irq(adapter); e1000_free_all_tx_resources(adapter); e1000_free_all_rx_resources(adapter); @@ -1283,7 +1181,7 @@ e1000_close(struct net_device *netdev) * @start: address of beginning of memory * @len: length of memory **/ -static boolean_t +static inline boolean_t e1000_check_64k_bound(struct e1000_adapter *adapter, void *start, unsigned long len) { @@ -1316,7 +1214,8 @@ e1000_setup_tx_resources(struct e1000_adapter *adapter, int size; size = sizeof(struct e1000_buffer) * txdr->count; - txdr->buffer_info = vmalloc(size); + + txdr->buffer_info = vmalloc_node(size, pcibus_to_node(pdev->bus)); if (!txdr->buffer_info) { DPRINTK(PROBE, ERR, "Unable to allocate memory for the transmit descriptor ring\n"); @@ -1428,13 +1327,13 @@ e1000_configure_tx(struct e1000_adapter *adapter) tdba = adapter->tx_ring[0].dma; tdlen = adapter->tx_ring[0].count * sizeof(struct e1000_tx_desc); - E1000_WRITE_REG(hw, TDLEN, tdlen); - E1000_WRITE_REG(hw, TDBAH, (tdba >> 32)); E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL)); - E1000_WRITE_REG(hw, TDT, 0); + E1000_WRITE_REG(hw, TDBAH, (tdba >> 32)); + E1000_WRITE_REG(hw, TDLEN, tdlen); E1000_WRITE_REG(hw, TDH, 0); - adapter->tx_ring[0].tdh = ((hw->mac_type >= e1000_82543) ? E1000_TDH : E1000_82542_TDH); - adapter->tx_ring[0].tdt = ((hw->mac_type >= e1000_82543) ? E1000_TDT : E1000_82542_TDT); + E1000_WRITE_REG(hw, TDT, 0); + adapter->tx_ring[0].tdh = E1000_TDH; + adapter->tx_ring[0].tdt = E1000_TDT; break; } @@ -1544,7 +1443,7 @@ e1000_setup_rx_resources(struct e1000_adapter *adapter, int size, desc_len; size = sizeof(struct e1000_buffer) * rxdr->count; - rxdr->buffer_info = vmalloc(size); + rxdr->buffer_info = vmalloc_node(size, pcibus_to_node(pdev->bus)); if (!rxdr->buffer_info) { DPRINTK(PROBE, ERR, "Unable to allocate memory for the receive descriptor ring\n"); @@ -1686,6 +1585,9 @@ e1000_setup_rctl(struct e1000_adapter *adapter) E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (adapter->hw.mc_filter_type << E1000_RCTL_MO_SHIFT); + if (adapter->hw.mac_type > e1000_82543) + rctl |= E1000_RCTL_SECRC; + if (adapter->hw.tbi_compatibility_on == 1) rctl |= E1000_RCTL_SBP; else @@ -1697,21 +1599,14 @@ e1000_setup_rctl(struct e1000_adapter *adapter) rctl |= E1000_RCTL_LPE; /* Setup buffer sizes */ - rctl &= ~E1000_RCTL_SZ_4096; - rctl |= E1000_RCTL_BSEX; - switch (adapter->rx_buffer_len) { - case E1000_RXBUFFER_256: - rctl |= E1000_RCTL_SZ_256; - rctl &= ~E1000_RCTL_BSEX; - break; - case E1000_RXBUFFER_512: - rctl |= E1000_RCTL_SZ_512; - rctl &= ~E1000_RCTL_BSEX; - break; - case E1000_RXBUFFER_1024: - rctl |= E1000_RCTL_SZ_1024; - rctl &= ~E1000_RCTL_BSEX; - break; + if (adapter->hw.mac_type >= e1000_82571) { + /* We can now specify buffers in 1K increments. + * BSIZE and BSEX are ignored in this case. */ + rctl |= adapter->rx_buffer_len << 0x11; + } else { + rctl &= ~E1000_RCTL_SZ_4096; + rctl |= E1000_RCTL_BSEX; + switch (adapter->rx_buffer_len) { case E1000_RXBUFFER_2048: default: rctl |= E1000_RCTL_SZ_2048; @@ -1726,6 +1621,7 @@ e1000_setup_rctl(struct e1000_adapter *adapter) case E1000_RXBUFFER_16384: rctl |= E1000_RCTL_SZ_16384; break; + } } #ifndef CONFIG_E1000_DISABLE_PACKET_SPLIT @@ -1751,7 +1647,7 @@ e1000_setup_rctl(struct e1000_adapter *adapter) rfctl |= E1000_RFCTL_IPV6_DIS; E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl); - rctl |= E1000_RCTL_DTYP_PS; + rctl |= E1000_RCTL_DTYP_PS | E1000_RCTL_SECRC; psrctl |= adapter->rx_ps_bsize0 >> E1000_PSRCTL_BSIZE0_SHIFT; @@ -1819,7 +1715,7 @@ e1000_configure_rx(struct e1000_adapter *adapter) if (hw->mac_type >= e1000_82571) { ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); /* Reset delay timers after every interrupt */ - ctrl_ext |= E1000_CTRL_EXT_INT_TIMER_CLR; + ctrl_ext |= E1000_CTRL_EXT_CANC; #ifdef CONFIG_E1000_NAPI /* Auto-Mask interrupts upon ICR read. */ ctrl_ext |= E1000_CTRL_EXT_IAME; @@ -1835,13 +1731,13 @@ e1000_configure_rx(struct e1000_adapter *adapter) case 1: default: rdba = adapter->rx_ring[0].dma; - E1000_WRITE_REG(hw, RDLEN, rdlen); - E1000_WRITE_REG(hw, RDBAH, (rdba >> 32)); E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL)); - E1000_WRITE_REG(hw, RDT, 0); + E1000_WRITE_REG(hw, RDBAH, (rdba >> 32)); + E1000_WRITE_REG(hw, RDLEN, rdlen); E1000_WRITE_REG(hw, RDH, 0); - adapter->rx_ring[0].rdh = ((hw->mac_type >= e1000_82543) ? E1000_RDH : E1000_82542_RDH); - adapter->rx_ring[0].rdt = ((hw->mac_type >= e1000_82543) ? E1000_RDT : E1000_82542_RDT); + E1000_WRITE_REG(hw, RDT, 0); + adapter->rx_ring[0].rdh = E1000_RDH; + adapter->rx_ring[0].rdt = E1000_RDT; break; } @@ -1864,6 +1760,9 @@ e1000_configure_rx(struct e1000_adapter *adapter) E1000_WRITE_REG(hw, RXCSUM, rxcsum); } + if (hw->mac_type == e1000_82573) + E1000_WRITE_REG(hw, ERT, 0x0100); + /* Enable Receives */ E1000_WRITE_REG(hw, RCTL, rctl); } @@ -1908,7 +1807,7 @@ e1000_free_all_tx_resources(struct e1000_adapter *adapter) e1000_free_tx_resources(adapter, &adapter->tx_ring[i]); } -static void +static inline void e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter, struct e1000_buffer *buffer_info) { @@ -2203,12 +2102,6 @@ e1000_set_multi(struct net_device *netdev) uint32_t rctl; uint32_t hash_value; int i, rar_entries = E1000_RAR_ENTRIES; - int mta_reg_count = (hw->mac_type == e1000_ich8lan) ? - E1000_NUM_MTA_REGISTERS_ICH8LAN : - E1000_NUM_MTA_REGISTERS; - - if (adapter->hw.mac_type == e1000_ich8lan) - rar_entries = E1000_RAR_ENTRIES_ICH8LAN; /* reserve RAR[14] for LAA over-write work-around */ if (adapter->hw.mac_type == e1000_82571) @@ -2247,18 +2140,14 @@ e1000_set_multi(struct net_device *netdev) mc_ptr = mc_ptr->next; } else { E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0); - E1000_WRITE_FLUSH(hw); E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0); - E1000_WRITE_FLUSH(hw); } } /* clear the old settings from the multicast hash table */ - for (i = 0; i < mta_reg_count; i++) { + for (i = 0; i < E1000_NUM_MTA_REGISTERS; i++) E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); - E1000_WRITE_FLUSH(hw); - } /* load any remaining addresses into the hash table */ @@ -2331,19 +2220,19 @@ static void e1000_watchdog(unsigned long data) { struct e1000_adapter *adapter = (struct e1000_adapter *) data; + + /* Do the rest outside of interrupt context */ + schedule_work(&adapter->watchdog_task); +} + +static void +e1000_watchdog_task(struct e1000_adapter *adapter) +{ struct net_device *netdev = adapter->netdev; struct e1000_tx_ring *txdr = adapter->tx_ring; uint32_t link, tctl; - int32_t ret_val; - - ret_val = e1000_check_for_link(&adapter->hw); - if ((ret_val == E1000_ERR_PHY) && - (adapter->hw.phy_type == e1000_phy_igp_3) && - (E1000_READ_REG(&adapter->hw, CTRL) & E1000_PHY_CTRL_GBE_DISABLE)) { - /* See e1000_kumeran_lock_loss_workaround() */ - DPRINTK(LINK, INFO, - "Gigabit has been disabled, downgrading speed\n"); - } + + e1000_check_for_link(&adapter->hw); if (adapter->hw.mac_type == e1000_82573) { e1000_enable_tx_pkt_filtering(&adapter->hw); if (adapter->mng_vlan_id != adapter->hw.mng_cookie.vlan_id) @@ -2358,7 +2247,6 @@ e1000_watchdog(unsigned long data) if (link) { if (!netif_carrier_ok(netdev)) { - boolean_t txb2b = 1; e1000_get_speed_and_duplex(&adapter->hw, &adapter->link_speed, &adapter->link_duplex); @@ -2372,22 +2260,23 @@ e1000_watchdog(unsigned long data) * and adjust the timeout factor */ netdev->tx_queue_len = adapter->tx_queue_len; adapter->tx_timeout_factor = 1; + adapter->txb2b = 1; switch (adapter->link_speed) { case SPEED_10: - txb2b = 0; + adapter->txb2b = 0; netdev->tx_queue_len = 10; adapter->tx_timeout_factor = 8; break; case SPEED_100: - txb2b = 0; + adapter->txb2b = 0; netdev->tx_queue_len = 100; /* maybe add some timeout factor ? */ break; } - if ((adapter->hw.mac_type == e1000_82571 || + if ((adapter->hw.mac_type == e1000_82571 || adapter->hw.mac_type == e1000_82572) && - txb2b == 0) { + adapter->txb2b == 0) { #define SPEED_MODE_BIT (1 << 21) uint32_t tarc0; tarc0 = E1000_READ_REG(&adapter->hw, TARC0); @@ -2511,7 +2400,7 @@ e1000_watchdog(unsigned long data) #define E1000_TX_FLAGS_VLAN_MASK 0xffff0000 #define E1000_TX_FLAGS_VLAN_SHIFT 16 -static int +static inline int e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, struct sk_buff *skb) { @@ -2533,7 +2422,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); mss = skb_shinfo(skb)->gso_size; - if (skb->protocol == htons(ETH_P_IP)) { + if (skb->protocol == ntohs(ETH_P_IP)) { skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; skb->h.th->check = @@ -2591,7 +2480,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, return FALSE; } -static boolean_t +static inline boolean_t e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, struct sk_buff *skb) { @@ -2627,7 +2516,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, #define E1000_MAX_TXD_PWR 12 #define E1000_MAX_DATA_PER_TXD (1<tx_fifo_size - adapter->tx_fifo_head; @@ -2827,7 +2716,7 @@ no_fifo_stall_required: } #define MINIMUM_DHCP_PACKET_SIZE 282 -static int +static inline int e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb) { struct e1000_hw *hw = &adapter->hw; @@ -2875,7 +2764,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) unsigned int nr_frags = 0; unsigned int mss = 0; int count = 0; - int tso; + int tso; unsigned int f; len -= skb->data_len; @@ -2888,7 +2777,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) #ifdef NETIF_F_TSO mss = skb_shinfo(skb)->gso_size; - /* The controller does a simple calculation to + /* The controller does a simple calculation to * make sure there is enough room in the FIFO before * initiating the DMA for each buffer. The calc is: * 4 = ceil(buffer len/mss). To make sure we don't @@ -2909,10 +2798,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) case e1000_82571: case e1000_82572: case e1000_82573: - case e1000_ich8lan: pull_size = min((unsigned int)4, skb->data_len); if (!__pskb_pull_tail(skb, pull_size)) { - DPRINTK(DRV, ERR, + printk(KERN_ERR "__pskb_pull_tail failed.\n"); dev_kfree_skb_any(skb); return NETDEV_TX_OK; @@ -3012,7 +2900,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) /* Old method was to assume IPv4 packet by default if TSO was enabled. * 82571 hardware supports TSO capabilities for IPv6 as well... * no longer assume, we must. */ - if (likely(skb->protocol == htons(ETH_P_IP))) + if (likely(skb->protocol == ntohs(ETH_P_IP))) tx_flags |= E1000_TX_FLAGS_IPV4; e1000_tx_queue(adapter, tx_ring, tx_flags, @@ -3049,7 +2937,8 @@ e1000_reset_task(struct net_device *netdev) { struct e1000_adapter *adapter = netdev_priv(netdev); - e1000_reinit_locked(adapter); + e1000_down(adapter); + e1000_up(adapter); } /** @@ -3092,8 +2981,8 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu) /* Adapter-specific max frame size limits. */ switch (adapter->hw.mac_type) { - case e1000_undefined ... e1000_82542_rev2_1: - case e1000_ich8lan: + case e1000_82542_rev2_0: + case e1000_82542_rev2_1: if (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE) { DPRINTK(PROBE, ERR, "Jumbo Frames not supported.\n"); return -EINVAL; @@ -3127,36 +3016,34 @@ e1000_change_mtu(struct net_device *netdev, int new_mtu) break; } - /* NOTE: netdev_alloc_skb reserves 16 bytes, and typically NET_IP_ALIGN - * means we reserve 2 more, this pushes us to allocate from the next - * larger slab size - * i.e. RXBUFFER_2048 --> size-4096 slab */ - - if (max_frame <= E1000_RXBUFFER_256) - adapter->rx_buffer_len = E1000_RXBUFFER_256; - else if (max_frame <= E1000_RXBUFFER_512) - adapter->rx_buffer_len = E1000_RXBUFFER_512; - else if (max_frame <= E1000_RXBUFFER_1024) - adapter->rx_buffer_len = E1000_RXBUFFER_1024; - else if (max_frame <= E1000_RXBUFFER_2048) - adapter->rx_buffer_len = E1000_RXBUFFER_2048; - else if (max_frame <= E1000_RXBUFFER_4096) - adapter->rx_buffer_len = E1000_RXBUFFER_4096; - else if (max_frame <= E1000_RXBUFFER_8192) - adapter->rx_buffer_len = E1000_RXBUFFER_8192; - else if (max_frame <= E1000_RXBUFFER_16384) - adapter->rx_buffer_len = E1000_RXBUFFER_16384; - - /* adjust allocation if LPE protects us, and we aren't using SBP */ - if (!adapter->hw.tbi_compatibility_on && - ((max_frame == MAXIMUM_ETHERNET_FRAME_SIZE) || - (max_frame == MAXIMUM_ETHERNET_VLAN_SIZE))) - adapter->rx_buffer_len = MAXIMUM_ETHERNET_VLAN_SIZE; + + if (adapter->hw.mac_type > e1000_82547_rev_2) { + adapter->rx_buffer_len = max_frame; + E1000_ROUNDUP(adapter->rx_buffer_len, 1024); + } else { + if(unlikely((adapter->hw.mac_type < e1000_82543) && + (max_frame > MAXIMUM_ETHERNET_FRAME_SIZE))) { + DPRINTK(PROBE, ERR, "Jumbo Frames not supported " + "on 82542\n"); + return -EINVAL; + } else { + if(max_frame <= E1000_RXBUFFER_2048) + adapter->rx_buffer_len = E1000_RXBUFFER_2048; + else if(max_frame <= E1000_RXBUFFER_4096) + adapter->rx_buffer_len = E1000_RXBUFFER_4096; + else if(max_frame <= E1000_RXBUFFER_8192) + adapter->rx_buffer_len = E1000_RXBUFFER_8192; + else if(max_frame <= E1000_RXBUFFER_16384) + adapter->rx_buffer_len = E1000_RXBUFFER_16384; + } + } netdev->mtu = new_mtu; - if (netif_running(netdev)) - e1000_reinit_locked(adapter); + if (netif_running(netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } adapter->hw.max_frame_size = max_frame; @@ -3172,21 +3059,11 @@ void e1000_update_stats(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - struct pci_dev *pdev = adapter->pdev; unsigned long flags; uint16_t phy_tmp; #define PHY_IDLE_ERROR_COUNT_MASK 0x00FF - /* - * Prevent stats update while adapter is being reset, or if the pci - * connection is down. - */ - if (adapter->link_speed == 0) - return; - if (pdev->error_state && pdev->error_state != pci_channel_io_normal) - return; - spin_lock_irqsave(&adapter->stats_lock, flags); /* these counters are modified from e1000_adjust_tbi_stats, @@ -3201,15 +3078,12 @@ e1000_update_stats(struct e1000_adapter *adapter) adapter->stats.bprc += E1000_READ_REG(hw, BPRC); adapter->stats.mprc += E1000_READ_REG(hw, MPRC); adapter->stats.roc += E1000_READ_REG(hw, ROC); - - if (adapter->hw.mac_type != e1000_ich8lan) { adapter->stats.prc64 += E1000_READ_REG(hw, PRC64); adapter->stats.prc127 += E1000_READ_REG(hw, PRC127); adapter->stats.prc255 += E1000_READ_REG(hw, PRC255); adapter->stats.prc511 += E1000_READ_REG(hw, PRC511); adapter->stats.prc1023 += E1000_READ_REG(hw, PRC1023); adapter->stats.prc1522 += E1000_READ_REG(hw, PRC1522); - } adapter->stats.symerrs += E1000_READ_REG(hw, SYMERRS); adapter->stats.mpc += E1000_READ_REG(hw, MPC); @@ -3237,16 +3111,12 @@ e1000_update_stats(struct e1000_adapter *adapter) adapter->stats.totl += E1000_READ_REG(hw, TOTL); adapter->stats.toth += E1000_READ_REG(hw, TOTH); adapter->stats.tpr += E1000_READ_REG(hw, TPR); - - if (adapter->hw.mac_type != e1000_ich8lan) { adapter->stats.ptc64 += E1000_READ_REG(hw, PTC64); adapter->stats.ptc127 += E1000_READ_REG(hw, PTC127); adapter->stats.ptc255 += E1000_READ_REG(hw, PTC255); adapter->stats.ptc511 += E1000_READ_REG(hw, PTC511); adapter->stats.ptc1023 += E1000_READ_REG(hw, PTC1023); adapter->stats.ptc1522 += E1000_READ_REG(hw, PTC1522); - } - adapter->stats.mptc += E1000_READ_REG(hw, MPTC); adapter->stats.bptc += E1000_READ_REG(hw, BPTC); @@ -3268,8 +3138,6 @@ e1000_update_stats(struct e1000_adapter *adapter) if (hw->mac_type > e1000_82547_rev_2) { adapter->stats.iac += E1000_READ_REG(hw, IAC); adapter->stats.icrxoc += E1000_READ_REG(hw, ICRXOC); - - if (adapter->hw.mac_type != e1000_ich8lan) { adapter->stats.icrxptc += E1000_READ_REG(hw, ICRXPTC); adapter->stats.icrxatc += E1000_READ_REG(hw, ICRXATC); adapter->stats.ictxptc += E1000_READ_REG(hw, ICTXPTC); @@ -3277,7 +3145,6 @@ e1000_update_stats(struct e1000_adapter *adapter) adapter->stats.ictxqec += E1000_READ_REG(hw, ICTXQEC); adapter->stats.ictxqmtc += E1000_READ_REG(hw, ICTXQMTC); adapter->stats.icrxdmtc += E1000_READ_REG(hw, ICRXDMTC); - } } /* Fill out the OS statistics structure */ @@ -3297,6 +3164,7 @@ e1000_update_stats(struct e1000_adapter *adapter) adapter->stats.crcerrs + adapter->stats.algnerrc + adapter->stats.ruc + adapter->stats.roc + adapter->stats.cexterr; + adapter->net_stats.rx_dropped = 0; adapter->net_stats.rx_length_errors = adapter->stats.ruc + adapter->stats.roc; adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; @@ -3386,8 +3254,8 @@ e1000_intr(int irq, void *data, struct pt_regs *regs) E1000_WRITE_REG(hw, IMC, ~0); E1000_WRITE_FLUSH(hw); } - if (likely(netif_rx_schedule_prep(netdev))) - __netif_rx_schedule(netdev); + if (likely(netif_rx_schedule_prep(&adapter->polling_netdev[0]))) + __netif_rx_schedule(&adapter->polling_netdev[0]); else e1000_irq_enable(adapter); #else @@ -3430,26 +3298,34 @@ e1000_clean(struct net_device *poll_dev, int *budget) { struct e1000_adapter *adapter; int work_to_do = min(*budget, poll_dev->quota); - int tx_cleaned = 0, work_done = 0; + int tx_cleaned = 0, i = 0, work_done = 0; /* Must NOT use netdev_priv macro here. */ adapter = poll_dev->priv; /* Keep link state information with original netdev */ - if (!netif_carrier_ok(poll_dev)) + if (!netif_carrier_ok(adapter->netdev)) goto quit_polling; - /* e1000_clean is called per-cpu. This lock protects - * tx_ring[0] from being cleaned by multiple cpus - * simultaneously. A failure obtaining the lock means - * tx_ring[0] is currently being cleaned anyway. */ - if (spin_trylock(&adapter->tx_queue_lock)) { - tx_cleaned = e1000_clean_tx_irq(adapter, - &adapter->tx_ring[0]); - spin_unlock(&adapter->tx_queue_lock); + while (poll_dev != &adapter->polling_netdev[i]) { + i++; + BUG_ON(i == adapter->num_rx_queues); } - adapter->clean_rx(adapter, &adapter->rx_ring[0], + if (likely(adapter->num_tx_queues == 1)) { + /* e1000_clean is called per-cpu. This lock protects + * tx_ring[0] from being cleaned by multiple cpus + * simultaneously. A failure obtaining the lock means + * tx_ring[0] is currently being cleaned anyway. */ + if (spin_trylock(&adapter->tx_queue_lock)) { + tx_cleaned = e1000_clean_tx_irq(adapter, + &adapter->tx_ring[0]); + spin_unlock(&adapter->tx_queue_lock); + } + } else + tx_cleaned = e1000_clean_tx_irq(adapter, &adapter->tx_ring[i]); + + adapter->clean_rx(adapter, &adapter->rx_ring[i], &work_done, work_to_do); *budget -= work_done; @@ -3457,7 +3333,7 @@ e1000_clean(struct net_device *poll_dev, int *budget) /* If no Tx and not enough Rx work done, exit the polling mode */ if ((!tx_cleaned && (work_done == 0)) || - !netif_running(poll_dev)) { + !netif_running(adapter->netdev)) { quit_polling: netif_rx_complete(poll_dev); e1000_irq_enable(adapter); @@ -3514,15 +3390,13 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, tx_ring->next_to_clean = i; -#define TX_WAKE_THRESHOLD 32 + spin_lock(&tx_ring->tx_lock); + if (unlikely(cleaned && netif_queue_stopped(netdev) && - netif_carrier_ok(netdev))) { - spin_lock(&tx_ring->tx_lock); - if (netif_queue_stopped(netdev) && - (E1000_DESC_UNUSED(tx_ring) >= TX_WAKE_THRESHOLD)) - netif_wake_queue(netdev); - spin_unlock(&tx_ring->tx_lock); - } + netif_carrier_ok(netdev))) + netif_wake_queue(netdev); + + spin_unlock(&tx_ring->tx_lock); if (adapter->detect_tx_hung) { /* Detect a transmit hang in hardware, this serializes the @@ -3570,7 +3444,7 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, * @sk_buff: socket buffer with received data **/ -static void +static inline void e1000_rx_checksum(struct e1000_adapter *adapter, uint32_t status_err, uint32_t csum, struct sk_buff *skb) @@ -3672,15 +3546,11 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, length = le16_to_cpu(rx_desc->length); - /* adjust length to remove Ethernet CRC */ - length -= 4; - if (unlikely(!(status & E1000_RXD_STAT_EOP))) { /* All receives must fit into a single buffer */ E1000_DBG("%s: Receive packet consumed multiple" " buffers\n", netdev->name); - /* recycle */ - buffer_info-> skb = skb; + dev_kfree_skb_irq(skb); goto next_desc; } @@ -3696,8 +3566,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, flags); length--; } else { - /* recycle */ - buffer_info->skb = skb; + dev_kfree_skb_irq(skb); goto next_desc; } } @@ -3708,7 +3577,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, #define E1000_CB_LENGTH 256 if (length < E1000_CB_LENGTH) { struct sk_buff *new_skb = - netdev_alloc_skb(netdev, length + NET_IP_ALIGN); + dev_alloc_skb(length + NET_IP_ALIGN); if (new_skb) { skb_reserve(new_skb, NET_IP_ALIGN); new_skb->dev = netdev; @@ -3805,9 +3674,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, i = rx_ring->next_to_clean; rx_desc = E1000_RX_DESC_PS(*rx_ring, i); staterr = le32_to_cpu(rx_desc->wb.middle.status_error); - buffer_info = &rx_ring->buffer_info[i]; while (staterr & E1000_RXD_STAT_DD) { + buffer_info = &rx_ring->buffer_info[i]; ps_page = &rx_ring->ps_page[i]; ps_page_dma = &rx_ring->ps_page_dma[i]; #ifdef CONFIG_E1000_NAPI @@ -3863,9 +3732,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, /* page alloc/put takes too long and effects small packet * throughput, so unsplit small packets and save the alloc/put*/ - if (l1 && ((length + l1) <= adapter->rx_ps_bsize0)) { + if (l1 && ((length + l1) < E1000_CB_LENGTH)) { u8 *vaddr; - /* there is no documentation about how to call + /* there is no documentation about how to call * kmap_atomic, so we can't hold the mapping * very long */ pci_dma_sync_single_for_cpu(pdev, @@ -3879,9 +3748,8 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, pci_dma_sync_single_for_device(pdev, ps_page_dma->ps_page_dma[0], PAGE_SIZE, PCI_DMA_FROMDEVICE); - /* remove the CRC */ - l1 -= 4; skb_put(skb, l1); + length += l1; goto copydone; } /* if */ } @@ -3900,10 +3768,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, skb->truesize += length; } - /* strip the ethernet crc, problem is we're using pages now so - * this whole operation can get a little cpu intensive */ - pskb_trim(skb, skb->len - 4); - copydone: e1000_rx_checksum(adapter, staterr, le16_to_cpu(rx_desc->wb.lower.hi_dword.csum_ip.csum), skb); @@ -3979,7 +3843,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter, while (cleaned_count--) { if (!(skb = buffer_info->skb)) - skb = netdev_alloc_skb(netdev, bufsz); + skb = dev_alloc_skb(bufsz); else { skb_trim(skb, 0); goto map_skb; @@ -3997,7 +3861,7 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter, DPRINTK(RX_ERR, ERR, "skb align check failed: %u bytes " "at %p\n", bufsz, skb->data); /* Try again, without freeing the previous */ - skb = netdev_alloc_skb(netdev, bufsz); + skb = dev_alloc_skb(bufsz); /* Failed allocation, critical failure */ if (!skb) { dev_kfree_skb(oldskb); @@ -4121,8 +3985,7 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, rx_desc->read.buffer_addr[j+1] = ~0; } - skb = netdev_alloc_skb(netdev, - adapter->rx_ps_bsize0 + NET_IP_ALIGN); + skb = dev_alloc_skb(adapter->rx_ps_bsize0 + NET_IP_ALIGN); if (unlikely(!skb)) { adapter->alloc_rx_buff_failed++; @@ -4291,7 +4154,7 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) spin_unlock_irqrestore(&adapter->stats_lock, flags); return -EIO; } - if (adapter->hw.media_type == e1000_media_type_copper) { + if (adapter->hw.phy_type == e1000_media_type_copper) { switch (data->reg_num) { case PHY_CTRL: if (mii_reg & MII_CR_POWER_DOWN) @@ -4318,9 +4181,10 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) return retval; } } - if (netif_running(adapter->netdev)) - e1000_reinit_locked(adapter); - else + if (netif_running(adapter->netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } else e1000_reset(adapter); break; case M88E1000_PHY_SPEC_CTRL: @@ -4337,9 +4201,10 @@ e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) case PHY_CTRL: if (mii_reg & MII_CR_POWER_DOWN) break; - if (netif_running(adapter->netdev)) - e1000_reinit_locked(adapter); - else + if (netif_running(adapter->netdev)) { + e1000_down(adapter); + e1000_up(adapter); + } else e1000_reset(adapter); break; } @@ -4386,13 +4251,11 @@ e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value) pci_write_config_word(adapter->pdev, reg, *value); } -#if 0 uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port) { return inl(port); } -#endif /* 0 */ void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) @@ -4415,21 +4278,18 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) ctrl |= E1000_CTRL_VME; E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); - if (adapter->hw.mac_type != e1000_ich8lan) { /* enable VLAN receive filtering */ rctl = E1000_READ_REG(&adapter->hw, RCTL); rctl |= E1000_RCTL_VFE; rctl &= ~E1000_RCTL_CFIEN; E1000_WRITE_REG(&adapter->hw, RCTL, rctl); e1000_update_mng_vlan(adapter); - } } else { /* disable VLAN tag insert/strip */ ctrl = E1000_READ_REG(&adapter->hw, CTRL); ctrl &= ~E1000_CTRL_VME; E1000_WRITE_REG(&adapter->hw, CTRL, ctrl); - if (adapter->hw.mac_type != e1000_ich8lan) { /* disable VLAN filtering */ rctl = E1000_READ_REG(&adapter->hw, RCTL); rctl &= ~E1000_RCTL_VFE; @@ -4438,7 +4298,6 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) e1000_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id); adapter->mng_vlan_id = E1000_MNG_VLAN_NONE; } - } } e1000_irq_enable(adapter); @@ -4600,16 +4459,12 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state) struct e1000_adapter *adapter = netdev_priv(netdev); uint32_t ctrl, ctrl_ext, rctl, manc, status; uint32_t wufc = adapter->wol; -#ifdef CONFIG_PM int retval = 0; -#endif netif_device_detach(netdev); - if (netif_running(netdev)) { - WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); + if (netif_running(netdev)) e1000_down(adapter); - } #ifdef CONFIG_PM /* Implement our own version of pci_save_state(pdev) because pci- @@ -4658,41 +4513,48 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state) E1000_WRITE_REG(&adapter->hw, WUC, E1000_WUC_PME_EN); E1000_WRITE_REG(&adapter->hw, WUFC, wufc); - pci_enable_wake(pdev, PCI_D3hot, 1); - pci_enable_wake(pdev, PCI_D3cold, 1); + retval = pci_enable_wake(pdev, PCI_D3hot, 1); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 wake\n"); + retval = pci_enable_wake(pdev, PCI_D3cold, 1); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 cold wake\n"); } else { E1000_WRITE_REG(&adapter->hw, WUC, 0); E1000_WRITE_REG(&adapter->hw, WUFC, 0); - pci_enable_wake(pdev, PCI_D3hot, 0); - pci_enable_wake(pdev, PCI_D3cold, 0); + retval = pci_enable_wake(pdev, PCI_D3hot, 0); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 wake\n"); + retval = pci_enable_wake(pdev, PCI_D3cold, 0); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 cold wake\n"); } - /* FIXME: this code is incorrect for PCI Express */ if (adapter->hw.mac_type >= e1000_82540 && - adapter->hw.mac_type != e1000_ich8lan && adapter->hw.media_type == e1000_media_type_copper) { manc = E1000_READ_REG(&adapter->hw, MANC); if (manc & E1000_MANC_SMBUS_EN) { manc |= E1000_MANC_ARP_EN; E1000_WRITE_REG(&adapter->hw, MANC, manc); - pci_enable_wake(pdev, PCI_D3hot, 1); - pci_enable_wake(pdev, PCI_D3cold, 1); + retval = pci_enable_wake(pdev, PCI_D3hot, 1); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 wake\n"); + retval = pci_enable_wake(pdev, PCI_D3cold, 1); + if (retval) + DPRINTK(PROBE, ERR, + "Error enabling D3 cold wake\n"); } } - if (adapter->hw.phy_type == e1000_phy_igp_3) - e1000_phy_powerdown_workaround(&adapter->hw); - - if (netif_running(netdev)) - e1000_free_irq(adapter); - /* Release control of h/w to f/w. If f/w is AMT enabled, this * would have already happened in close and is redundant. */ e1000_release_hw_control(adapter); pci_disable_device(pdev); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); + retval = pci_set_power_state(pdev, pci_choose_state(pdev, state)); + if (retval) + DPRINTK(PROBE, ERR, "Error in setting power state\n"); return 0; } @@ -4703,20 +4565,23 @@ e1000_resume(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct e1000_adapter *adapter = netdev_priv(netdev); + int retval; uint32_t manc, ret_val; - pci_set_power_state(pdev, PCI_D0); + retval = pci_set_power_state(pdev, PCI_D0); + if (retval) + DPRINTK(PROBE, ERR, "Error in setting power state\n"); e1000_pci_restore_state(adapter); ret_val = pci_enable_device(pdev); pci_set_master(pdev); - pci_enable_wake(pdev, PCI_D3hot, 0); - pci_enable_wake(pdev, PCI_D3cold, 0); - - if (netif_running(netdev) && (ret_val = e1000_request_irq(adapter))) - return ret_val; + retval = pci_enable_wake(pdev, PCI_D3hot, 0); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 wake\n"); + retval = pci_enable_wake(pdev, PCI_D3cold, 0); + if (retval) + DPRINTK(PROBE, ERR, "Error enabling D3 cold wake\n"); - e1000_power_up_phy(adapter); e1000_reset(adapter); E1000_WRITE_REG(&adapter->hw, WUS, ~0); @@ -4725,9 +4590,7 @@ e1000_resume(struct pci_dev *pdev) netif_device_attach(netdev); - /* FIXME: this code is incorrect for PCI Express */ if (adapter->hw.mac_type >= e1000_82540 && - adapter->hw.mac_type != e1000_ich8lan && adapter->hw.media_type == e1000_media_type_copper) { manc = E1000_READ_REG(&adapter->hw, MANC); manc &= ~(E1000_MANC_ARP_EN); @@ -4761,7 +4624,6 @@ static void e1000_netpoll(struct net_device *netdev) { struct e1000_adapter *adapter = netdev_priv(netdev); - disable_irq(adapter->pdev->irq); e1000_intr(adapter->pdev->irq, netdev, NULL); e1000_clean_tx_irq(adapter, adapter->tx_ring); @@ -4772,101 +4634,4 @@ e1000_netpoll(struct net_device *netdev) } #endif -/** - * e1000_io_error_detected - called when PCI error is detected - * @pdev: Pointer to PCI device - * @state: The current pci conneection state - * - * This function is called after a PCI bus error affecting - * this device has been detected. - */ -static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - struct e1000_adapter *adapter = netdev->priv; - - netif_device_detach(netdev); - - if (netif_running(netdev)) - e1000_down(adapter); - - /* Request a slot slot reset. */ - return PCI_ERS_RESULT_NEED_RESET; -} - -/** - * e1000_io_slot_reset - called after the pci bus has been reset. - * @pdev: Pointer to PCI device - * - * Restart the card from scratch, as if from a cold-boot. Implementation - * resembles the first-half of the e1000_resume routine. - */ -static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - struct e1000_adapter *adapter = netdev->priv; - - if (pci_enable_device(pdev)) { - printk(KERN_ERR "e1000: Cannot re-enable PCI device after reset.\n"); - return PCI_ERS_RESULT_DISCONNECT; - } - pci_set_master(pdev); - - pci_enable_wake(pdev, 3, 0); - pci_enable_wake(pdev, 4, 0); /* 4 == D3 cold */ - - /* Perform card reset only on one instance of the card */ - if (PCI_FUNC (pdev->devfn) != 0) - return PCI_ERS_RESULT_RECOVERED; - - e1000_reset(adapter); - E1000_WRITE_REG(&adapter->hw, WUS, ~0); - - return PCI_ERS_RESULT_RECOVERED; -} - -/** - * e1000_io_resume - called when traffic can start flowing again. - * @pdev: Pointer to PCI device - * - * This callback is called when the error recovery driver tells us that - * its OK to resume normal operation. Implementation resembles the - * second-half of the e1000_resume routine. - */ -static void e1000_io_resume(struct pci_dev *pdev) -{ - struct net_device *netdev = pci_get_drvdata(pdev); - struct e1000_adapter *adapter = netdev->priv; - uint32_t manc, swsm; - - if (netif_running(netdev)) { - if (e1000_up(adapter)) { - printk("e1000: can't bring device back up after reset\n"); - return; - } - } - - netif_device_attach(netdev); - - if (adapter->hw.mac_type >= e1000_82540 && - adapter->hw.media_type == e1000_media_type_copper) { - manc = E1000_READ_REG(&adapter->hw, MANC); - manc &= ~(E1000_MANC_ARP_EN); - E1000_WRITE_REG(&adapter->hw, MANC, manc); - } - - switch (adapter->hw.mac_type) { - case e1000_82573: - swsm = E1000_READ_REG(&adapter->hw, SWSM); - E1000_WRITE_REG(&adapter->hw, SWSM, - swsm | E1000_SWSM_DRV_LOAD); - break; - default: - break; - } - - if (netif_running(netdev)) - mod_timer(&adapter->watchdog_timer, jiffies); -} - /* e1000_main.c */ diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h index 2d3e8b06c..9790db974 100644 --- a/drivers/net/e1000/e1000_osdep.h +++ b/drivers/net/e1000/e1000_osdep.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -127,17 +126,4 @@ typedef enum { #define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS) -#define E1000_WRITE_ICH8_REG(a, reg, value) ( \ - writel((value), ((a)->flash_address + reg))) - -#define E1000_READ_ICH8_REG(a, reg) ( \ - readl((a)->flash_address + reg)) - -#define E1000_WRITE_ICH8_REG16(a, reg, value) ( \ - writew((value), ((a)->flash_address + reg))) - -#define E1000_READ_ICH8_REG16(a, reg) ( \ - readw((a)->flash_address + reg)) - - #endif /* _E1000_OSDEP_H_ */ diff --git a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c index 0ef413172..e0a4d37d1 100644 --- a/drivers/net/e1000/e1000_param.c +++ b/drivers/net/e1000/e1000_param.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -22,7 +22,6 @@ Contact Information: Linux NICS - e1000-devel Mailing List Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 *******************************************************************************/ @@ -45,16 +44,6 @@ */ #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } -/* Module Parameters are always initialized to -1, so that the driver - * can tell the difference between no user specified value or the - * user asking for the default value. - * The true default values are loaded in when e1000_check_options is called. - * - * This is a GCC extension to ANSI C. - * See the item "Labeled Elements in Initializers" in the section - * "Extensions to the C Language Family" of the GCC documentation. - */ - #define E1000_PARAM(X, desc) \ static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ static int num_##X = 0; \ @@ -193,24 +182,6 @@ E1000_PARAM(RxAbsIntDelay, "Receive Absolute Interrupt Delay"); E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate"); -/* Enable Smart Power Down of the PHY - * - * Valid Range: 0, 1 - * - * Default Value: 0 (disabled) - */ - -E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down"); - -/* Enable Kumeran Lock Loss workaround - * - * Valid Range: 0, 1 - * - * Default Value: 1 (enabled) - */ - -E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); - #define AUTONEG_ADV_DEFAULT 0x2F #define AUTONEG_ADV_MASK 0x2F #define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL @@ -324,7 +295,6 @@ e1000_check_options(struct e1000_adapter *adapter) DPRINTK(PROBE, NOTICE, "Warning: no configuration for board #%i\n", bd); DPRINTK(PROBE, NOTICE, "Using defaults for all values\n"); - bd = E1000_MAX_NIC; } { /* Transmit Descriptor Count */ @@ -342,9 +312,14 @@ e1000_check_options(struct e1000_adapter *adapter) opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD; - tx_ring->count = TxDescriptors[bd]; - e1000_validate_option(&tx_ring->count, &opt, adapter); - E1000_ROUNDUP(tx_ring->count, REQ_TX_DESCRIPTOR_MULTIPLE); + if (num_TxDescriptors > bd) { + tx_ring->count = TxDescriptors[bd]; + e1000_validate_option(&tx_ring->count, &opt, adapter); + E1000_ROUNDUP(tx_ring->count, + REQ_TX_DESCRIPTOR_MULTIPLE); + } else { + tx_ring->count = opt.def; + } for (i = 0; i < adapter->num_tx_queues; i++) tx_ring[i].count = tx_ring->count; } @@ -363,9 +338,14 @@ e1000_check_options(struct e1000_adapter *adapter) opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD; - rx_ring->count = RxDescriptors[bd]; - e1000_validate_option(&rx_ring->count, &opt, adapter); - E1000_ROUNDUP(rx_ring->count, REQ_RX_DESCRIPTOR_MULTIPLE); + if (num_RxDescriptors > bd) { + rx_ring->count = RxDescriptors[bd]; + e1000_validate_option(&rx_ring->count, &opt, adapter); + E1000_ROUNDUP(rx_ring->count, + REQ_RX_DESCRIPTOR_MULTIPLE); + } else { + rx_ring->count = opt.def; + } for (i = 0; i < adapter->num_rx_queues; i++) rx_ring[i].count = rx_ring->count; } @@ -377,9 +357,13 @@ e1000_check_options(struct e1000_adapter *adapter) .def = OPTION_ENABLED }; - int rx_csum = XsumRX[bd]; - e1000_validate_option(&rx_csum, &opt, adapter); - adapter->rx_csum = rx_csum; + if (num_XsumRX > bd) { + int rx_csum = XsumRX[bd]; + e1000_validate_option(&rx_csum, &opt, adapter); + adapter->rx_csum = rx_csum; + } else { + adapter->rx_csum = opt.def; + } } { /* Flow Control */ @@ -399,9 +383,13 @@ e1000_check_options(struct e1000_adapter *adapter) .p = fc_list }} }; - int fc = FlowControl[bd]; - e1000_validate_option(&fc, &opt, adapter); - adapter->hw.fc = adapter->hw.original_fc = fc; + if (num_FlowControl > bd) { + int fc = FlowControl[bd]; + e1000_validate_option(&fc, &opt, adapter); + adapter->hw.fc = adapter->hw.original_fc = fc; + } else { + adapter->hw.fc = adapter->hw.original_fc = opt.def; + } } { /* Transmit Interrupt Delay */ struct e1000_option opt = { @@ -413,8 +401,13 @@ e1000_check_options(struct e1000_adapter *adapter) .max = MAX_TXDELAY }} }; - adapter->tx_int_delay = TxIntDelay[bd]; - e1000_validate_option(&adapter->tx_int_delay, &opt, adapter); + if (num_TxIntDelay > bd) { + adapter->tx_int_delay = TxIntDelay[bd]; + e1000_validate_option(&adapter->tx_int_delay, &opt, + adapter); + } else { + adapter->tx_int_delay = opt.def; + } } { /* Transmit Absolute Interrupt Delay */ struct e1000_option opt = { @@ -426,9 +419,13 @@ e1000_check_options(struct e1000_adapter *adapter) .max = MAX_TXABSDELAY }} }; - adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; - e1000_validate_option(&adapter->tx_abs_int_delay, &opt, - adapter); + if (num_TxAbsIntDelay > bd) { + adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; + e1000_validate_option(&adapter->tx_abs_int_delay, &opt, + adapter); + } else { + adapter->tx_abs_int_delay = opt.def; + } } { /* Receive Interrupt Delay */ struct e1000_option opt = { @@ -440,8 +437,13 @@ e1000_check_options(struct e1000_adapter *adapter) .max = MAX_RXDELAY }} }; - adapter->rx_int_delay = RxIntDelay[bd]; - e1000_validate_option(&adapter->rx_int_delay, &opt, adapter); + if (num_RxIntDelay > bd) { + adapter->rx_int_delay = RxIntDelay[bd]; + e1000_validate_option(&adapter->rx_int_delay, &opt, + adapter); + } else { + adapter->rx_int_delay = opt.def; + } } { /* Receive Absolute Interrupt Delay */ struct e1000_option opt = { @@ -453,9 +455,13 @@ e1000_check_options(struct e1000_adapter *adapter) .max = MAX_RXABSDELAY }} }; - adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; - e1000_validate_option(&adapter->rx_abs_int_delay, &opt, - adapter); + if (num_RxAbsIntDelay > bd) { + adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; + e1000_validate_option(&adapter->rx_abs_int_delay, &opt, + adapter); + } else { + adapter->rx_abs_int_delay = opt.def; + } } { /* Interrupt Throttling Rate */ struct e1000_option opt = { @@ -467,44 +473,26 @@ e1000_check_options(struct e1000_adapter *adapter) .max = MAX_ITR }} }; - adapter->itr = InterruptThrottleRate[bd]; - switch (adapter->itr) { - case 0: - DPRINTK(PROBE, INFO, "%s turned off\n", opt.name); - break; - case 1: - DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", - opt.name); - break; - default: - e1000_validate_option(&adapter->itr, &opt, adapter); - break; + if (num_InterruptThrottleRate > bd) { + adapter->itr = InterruptThrottleRate[bd]; + switch (adapter->itr) { + case 0: + DPRINTK(PROBE, INFO, "%s turned off\n", + opt.name); + break; + case 1: + DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", + opt.name); + break; + default: + e1000_validate_option(&adapter->itr, &opt, + adapter); + break; + } + } else { + adapter->itr = opt.def; } } - { /* Smart Power Down */ - struct e1000_option opt = { - .type = enable_option, - .name = "PHY Smart Power Down", - .err = "defaulting to Disabled", - .def = OPTION_DISABLED - }; - - int spd = SmartPowerDownEnable[bd]; - e1000_validate_option(&spd, &opt, adapter); - adapter->smart_power_down = spd; - } - { /* Kumeran Lock Loss Workaround */ - struct e1000_option opt = { - .type = enable_option, - .name = "Kumeran Lock Loss Workaround", - .err = "defaulting to Enabled", - .def = OPTION_ENABLED - }; - - int kmrn_lock_loss = KumeranLockLoss[bd]; - e1000_validate_option(&kmrn_lock_loss, &opt, adapter); - adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss; - } switch (adapter->hw.media_type) { case e1000_media_type_fiber: @@ -530,18 +518,17 @@ static void __devinit e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; - if ((Speed[bd] != OPTION_UNSET)) { + if (num_Speed > bd) { DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, " "parameter ignored\n"); } - if ((Duplex[bd] != OPTION_UNSET)) { + if (num_Duplex > bd) { DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, " "parameter ignored\n"); } - if ((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) { + if ((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) { DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is " "not valid for fiber adapters, " "parameter ignored\n"); @@ -560,7 +547,6 @@ e1000_check_copper_options(struct e1000_adapter *adapter) { int speed, dplx, an; int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; { /* Speed */ struct e1000_opt_list speed_list[] = {{ 0, "" }, @@ -577,8 +563,12 @@ e1000_check_copper_options(struct e1000_adapter *adapter) .p = speed_list }} }; - speed = Speed[bd]; - e1000_validate_option(&speed, &opt, adapter); + if (num_Speed > bd) { + speed = Speed[bd]; + e1000_validate_option(&speed, &opt, adapter); + } else { + speed = opt.def; + } } { /* Duplex */ struct e1000_opt_list dplx_list[] = {{ 0, "" }, @@ -600,11 +590,15 @@ e1000_check_copper_options(struct e1000_adapter *adapter) "Speed/Duplex/AutoNeg parameter ignored.\n"); return; } - dplx = Duplex[bd]; - e1000_validate_option(&dplx, &opt, adapter); + if (num_Duplex > bd) { + dplx = Duplex[bd]; + e1000_validate_option(&dplx, &opt, adapter); + } else { + dplx = opt.def; + } } - if (AutoNeg[bd] != OPTION_UNSET && (speed != 0 || dplx != 0)) { + if ((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { DPRINTK(PROBE, INFO, "AutoNeg specified along with Speed or Duplex, " "parameter ignored\n"); @@ -653,15 +647,19 @@ e1000_check_copper_options(struct e1000_adapter *adapter) .p = an_list }} }; - an = AutoNeg[bd]; - e1000_validate_option(&an, &opt, adapter); + if (num_AutoNeg > bd) { + an = AutoNeg[bd]; + e1000_validate_option(&an, &opt, adapter); + } else { + an = opt.def; + } adapter->hw.autoneg_advertised = an; } switch (speed + dplx) { case 0: adapter->hw.autoneg = adapter->fc_autoneg = 1; - if (Speed[bd] != OPTION_UNSET || Duplex[bd] != OPTION_UNSET) + if ((num_Speed > bd) && (speed != 0 || dplx != 0)) DPRINTK(PROBE, INFO, "Speed and duplex autonegotiation enabled\n"); break; diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c index e4e733a38..e5c5cd2a2 100644 --- a/drivers/net/e2100.c +++ b/drivers/net/e2100.c @@ -425,8 +425,8 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ - -int __init init_module(void) +int +init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 8dc61d65d..a806dfe54 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c @@ -920,7 +920,7 @@ static int eepro_grab_irq(struct net_device *dev) eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */ - if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != EBUSY) { + if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != EBUSY) { unsigned long irq_mask; /* Twinkle the interrupt, and check if it's seen */ irq_mask = probe_irq_on(); @@ -1154,7 +1154,8 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev) printk(KERN_DEBUG "%s: entering eepro_send_packet routine.\n", dev->name); if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } @@ -1807,7 +1808,8 @@ MODULE_PARM_DESC(irq, "EtherExpress Pro/10 IRQ number(s)"); MODULE_PARM_DESC(mem, "EtherExpress Pro/10 Rx buffer size(es) in kB (3-29)"); MODULE_PARM_DESC(autodetect, "EtherExpress Pro/10 force board(s) detection (0-1)"); -int __init init_module(void) +int +init_module(void) { struct net_device *dev; int i; diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index e445988c9..467fc8613 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -87,6 +87,7 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1}; /* Size of an pre-allocated Rx buffer: + slack.*/ #define PKT_BUF_SZ 1536 +#include #include #include @@ -277,6 +278,11 @@ having to sign an Intel NDA when I'm helping Intel sell their own product! static int speedo_found1(struct pci_dev *pdev, void __iomem *ioaddr, int fnd_cnt, int acpi_idle_state); +enum pci_flags_bit { + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + PCI_ADDR0=0x10<<0, PCI_ADDR1=0x10<<1, PCI_ADDR2=0x10<<2, PCI_ADDR3=0x10<<3, +}; + /* Offsets to the various registers. All accesses need not be longword aligned. */ enum speedo_offsets { @@ -555,12 +561,12 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev, if (!request_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1), "eepro100")) { - dev_err(&pdev->dev, "eepro100: cannot reserve I/O ports\n"); + printk (KERN_ERR "eepro100: cannot reserve I/O ports\n"); goto err_out_none; } if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), "eepro100")) { - dev_err(&pdev->dev, "eepro100: cannot reserve MMIO region\n"); + printk (KERN_ERR "eepro100: cannot reserve MMIO region\n"); goto err_out_free_pio_region; } @@ -573,7 +579,7 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev, ioaddr = pci_iomap(pdev, pci_bar, 0); if (!ioaddr) { - dev_err(&pdev->dev, "eepro100: cannot remap IO\n"); + printk (KERN_ERR "eepro100: cannot remap IO\n"); goto err_out_free_mmio_region; } @@ -977,7 +983,7 @@ speedo_open(struct net_device *dev) sp->in_interrupt = 0; /* .. we can safely take handler calls during init. */ - retval = request_irq(dev->irq, &speedo_interrupt, IRQF_SHARED, dev->name, dev); + retval = request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ, dev->name, dev); if (retval) { return retval; } diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 0701c1d81..82bd356e4 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c @@ -97,6 +97,7 @@ #define LOCKUP16 0 #endif +#include #include #include #include @@ -676,7 +677,8 @@ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) #endif if (buf->len < ETH_ZLEN) { - if (skb_padto(buf, ETH_ZLEN)) + buf = skb_padto(buf, ETH_ZLEN); + if (buf == NULL) return 0; length = ETH_ZLEN; } @@ -1698,7 +1700,7 @@ MODULE_LICENSE("GPL"); * are specified, we verify and then use them. If no parameters are given, we * autoprobe for one card only. */ -int __init init_module(void) +int init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index a67650ccf..2f7b86837 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c @@ -19,15 +19,62 @@ Information and updates available at http://www.scyld.com/network/epic100.html - [this link no longer provides anything useful -jgarzik] --------------------------------------------------------------------- + + Linux kernel-specific changes: + + LK1.1.2 (jgarzik): + * Merge becker version 1.09 (4/08/2000) + + LK1.1.3: + * Major bugfix to 1.09 driver (Francis Romieu) + + LK1.1.4 (jgarzik): + * Merge becker test version 1.09 (5/29/2000) + + LK1.1.5: + * Fix locking (jgarzik) + * Limit 83c175 probe to ethernet-class PCI devices (rgooch) + + LK1.1.6: + * Merge becker version 1.11 + * Move pci_enable_device before any PCI BAR len checks + + LK1.1.7: + * { fill me in } + + LK1.1.8: + * ethtool driver info support (jgarzik) + + LK1.1.9: + * ethtool media get/set support (jgarzik) + + LK1.1.10: + * revert MII transceiver init change (jgarzik) + + LK1.1.11: + * implement ETHTOOL_[GS]SET, _NWAY_RST, _[GS]MSGLVL, _GLINK (jgarzik) + * replace some MII-related magic numbers with constants + + LK1.1.12: + * fix power-up sequence + + LK1.1.13: + * revert version 1.1.12, power-up sequence "fix" + + LK1.1.14 (Kryzsztof Halasa): + * fix spurious bad initializations + * pound phy a la SMSC's app note on the subject + + AC1.1.14ac + * fix power up/down for ethtool that broke in 1.11 */ #define DRV_NAME "epic100" -#define DRV_VERSION "2.0" -#define DRV_RELDATE "June 27, 2006" +#define DRV_VERSION "1.11+LK1.1.14+AC1.1.14" +#define DRV_RELDATE "June 2, 2004" /* The user-configurable values. These may be modified when a driver module is loaded.*/ @@ -67,6 +114,7 @@ static int rx_copybreak; #define TX_FIFO_THRESH 256 #define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */ +#include #include #include #include @@ -143,10 +191,23 @@ IVc. Errata */ +enum pci_id_flags_bits { + /* Set PCI command register bits before calling probe1(). */ + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + /* Read and map the single following PCI BAR. */ + PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, + PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, +}; + enum chip_capability_flags { MII_PWRDWN=1, TYPE2_INTR=2, NO_MII=4 }; #define EPIC_TOTAL_SIZE 0x100 #define USE_IO_OPS 1 +#ifdef USE_IO_OPS +#define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_IO|PCI_ADDR0 +#else +#define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_MEM|PCI_ADDR1 +#endif typedef enum { SMSC_83C170_0, @@ -157,15 +218,20 @@ typedef enum { struct epic_chip_info { const char *name; + enum pci_id_flags_bits pci_flags; + int io_size; /* Needed for I/O region check or ioremap(). */ int drv_flags; /* Driver use, intended as capability flags. */ }; /* indexed by chip_t */ static const struct epic_chip_info pci_id_tbl[] = { - { "SMSC EPIC/100 83c170", TYPE2_INTR | NO_MII | MII_PWRDWN }, - { "SMSC EPIC/100 83c170", TYPE2_INTR }, - { "SMSC EPIC/C 83c175", TYPE2_INTR | MII_PWRDWN }, + { "SMSC EPIC/100 83c170", + EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, + { "SMSC EPIC/100 83c170", + EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR }, + { "SMSC EPIC/C 83c175", + EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN }, }; @@ -178,7 +244,7 @@ static struct pci_device_id epic_pci_tbl[] = { }; MODULE_DEVICE_TABLE (pci, epic_pci_tbl); - + #ifndef USE_IO_OPS #undef inb #undef inw @@ -304,7 +370,7 @@ static int epic_close(struct net_device *dev); static struct net_device_stats *epic_get_stats(struct net_device *dev); static void set_rx_mode(struct net_device *dev); - + static int __devinit epic_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) @@ -326,20 +392,20 @@ static int __devinit epic_init_one (struct pci_dev *pdev, printk (KERN_INFO "%s" KERN_INFO "%s" KERN_INFO "%s", version, version2, version3); #endif - + card_idx++; - + ret = pci_enable_device(pdev); if (ret) goto out; irq = pdev->irq; - if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) { - dev_err(&pdev->dev, "no PCI region space\n"); + if (pci_resource_len(pdev, 0) < pci_id_tbl[chip_idx].io_size) { + printk (KERN_ERR "card %d: no PCI region space\n", card_idx); ret = -ENODEV; goto err_out_disable; } - + pci_set_master(pdev); ret = pci_request_regions(pdev, DRV_NAME); @@ -350,7 +416,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, dev = alloc_etherdev(sizeof (*ep)); if (!dev) { - dev_err(&pdev->dev, "no memory for eth device\n"); + printk (KERN_ERR "card %d: no memory for eth device\n", card_idx); goto err_out_free_res; } SET_MODULE_OWNER(dev); @@ -362,7 +428,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, ioaddr = pci_resource_start (pdev, 1); ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); if (!ioaddr) { - dev_err(&pdev->dev, "ioremap failed\n"); + printk (KERN_ERR DRV_NAME " %d: ioremap failed\n", card_idx); goto err_out_free_netdev; } #endif @@ -422,7 +488,8 @@ static int __devinit epic_init_one (struct pci_dev *pdev, ((u16 *)dev->dev_addr)[i] = le16_to_cpu(inw(ioaddr + LAN0 + i*4)); if (debug > 2) { - dev_printk(KERN_DEBUG, &pdev->dev, "EEPROM contents:\n"); + printk(KERN_DEBUG DRV_NAME "(%s): EEPROM contents\n", + pci_name(pdev)); for (i = 0; i < 64; i++) printk(" %4.4x%s", read_eeprom(ioaddr, i), i % 16 == 15 ? "\n" : ""); @@ -431,7 +498,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, ep->pci_dev = pdev; ep->chip_id = chip_idx; ep->chip_flags = pci_id_tbl[chip_idx].drv_flags; - ep->irq_mask = + ep->irq_mask = (ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) | CntFull | TxUnderrun | EpicNapiEvent; @@ -444,23 +511,21 @@ static int __devinit epic_init_one (struct pci_dev *pdev, int mii_status = mdio_read(dev, phy, MII_BMSR); if (mii_status != 0xffff && mii_status != 0x0000) { ep->phys[phy_idx++] = phy; - dev_info(&pdev->dev, - "MII transceiver #%d control " - "%4.4x status %4.4x.\n", - phy, mdio_read(dev, phy, 0), mii_status); + printk(KERN_INFO DRV_NAME "(%s): MII transceiver #%d control " + "%4.4x status %4.4x.\n", + pci_name(pdev), phy, mdio_read(dev, phy, 0), mii_status); } } ep->mii_phy_cnt = phy_idx; if (phy_idx != 0) { phy = ep->phys[0]; ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); - dev_info(&pdev->dev, - "Autonegotiation advertising %4.4x link " + printk(KERN_INFO DRV_NAME "(%s): Autonegotiation advertising %4.4x link " "partner %4.4x.\n", - ep->mii.advertising, mdio_read(dev, phy, 5)); + pci_name(pdev), ep->mii.advertising, mdio_read(dev, phy, 5)); } else if ( ! (ep->chip_flags & NO_MII)) { - dev_warn(&pdev->dev, - "***WARNING***: No MII transceiver found!\n"); + printk(KERN_WARNING DRV_NAME "(%s): ***WARNING***: No MII transceiver found!\n", + pci_name(pdev)); /* Use the known PHY address of the EPII. */ ep->phys[0] = 3; } @@ -475,7 +540,8 @@ static int __devinit epic_init_one (struct pci_dev *pdev, /* The lower four bits are the media type. */ if (duplex) { ep->mii.force_media = ep->mii.full_duplex = 1; - dev_info(&pdev->dev, "Forced full duplex requested.\n"); + printk(KERN_INFO DRV_NAME "(%s): Forced full duplex operation requested.\n", + pci_name(pdev)); } dev->if_port = ep->default_port = option; @@ -521,7 +587,7 @@ err_out_disable: pci_disable_device(pdev); goto out; } - + /* Serial EEPROM section. */ /* EEPROM_Ctrl bits. */ @@ -643,7 +709,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) outw(value, ioaddr + MIIData); outl((phy_id << 9) | (loc << 4) | MII_WRITEOP, ioaddr + MIICtrl); - for (i = 10000; i > 0; i--) { + for (i = 10000; i > 0; i--) { barrier(); if ((inl(ioaddr + MIICtrl) & MII_WRITEOP) == 0) break; @@ -651,7 +717,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int loc, int value) return; } - + static int epic_open(struct net_device *dev) { struct epic_private *ep = dev->priv; @@ -662,7 +728,7 @@ static int epic_open(struct net_device *dev) /* Soft reset the chip. */ outl(0x4001, ioaddr + GENCTL); - if ((retval = request_irq(dev->irq, &epic_interrupt, IRQF_SHARED, dev->name, dev))) + if ((retval = request_irq(dev->irq, &epic_interrupt, SA_SHIRQ, dev->name, dev))) return retval; epic_init_ring(dev); @@ -694,7 +760,7 @@ static int epic_open(struct net_device *dev) #endif udelay(20); /* Looks like EPII needs that if you want reliable RX init. FIXME: pci posting bug? */ - + for (i = 0; i < 3; i++) outl(cpu_to_le16(((u16*)dev->dev_addr)[i]), ioaddr + LAN0 + i*4); @@ -737,7 +803,7 @@ static int epic_open(struct net_device *dev) /* Enable interrupts by setting the interrupt mask. */ outl((ep->chip_flags & TYPE2_INTR ? PCIBusErr175 : PCIBusErr170) - | CntFull | TxUnderrun + | CntFull | TxUnderrun | RxError | RxHeader | EpicNapiEvent, ioaddr + INTMASK); if (debug > 1) @@ -765,7 +831,7 @@ static void epic_pause(struct net_device *dev) struct epic_private *ep = dev->priv; netif_stop_queue (dev); - + /* Disable interrupts by clearing the interrupt mask. */ outl(0x00000000, ioaddr + INTMASK); /* Stop the chip's Tx and Rx DMA processes. */ @@ -921,7 +987,7 @@ static void epic_init_ring(struct net_device *dev) for (i = 0; i < RX_RING_SIZE; i++) { ep->rx_ring[i].rxstatus = 0; ep->rx_ring[i].buflength = cpu_to_le32(ep->rx_buf_sz); - ep->rx_ring[i].next = ep->rx_ring_dma + + ep->rx_ring[i].next = ep->rx_ring_dma + (i+1)*sizeof(struct epic_rx_desc); ep->rx_skbuff[i] = NULL; } @@ -936,7 +1002,7 @@ static void epic_init_ring(struct net_device *dev) break; skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* 16 byte align the IP header. */ - ep->rx_ring[i].bufaddr = pci_map_single(ep->pci_dev, + ep->rx_ring[i].bufaddr = pci_map_single(ep->pci_dev, skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE); ep->rx_ring[i].rxstatus = cpu_to_le32(DescOwn); } @@ -947,7 +1013,7 @@ static void epic_init_ring(struct net_device *dev) for (i = 0; i < TX_RING_SIZE; i++) { ep->tx_skbuff[i] = NULL; ep->tx_ring[i].txstatus = 0x0000; - ep->tx_ring[i].next = ep->tx_ring_dma + + ep->tx_ring[i].next = ep->tx_ring_dma + (i+1)*sizeof(struct epic_tx_desc); } ep->tx_ring[i-1].next = ep->tx_ring_dma; @@ -960,9 +1026,12 @@ static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev) int entry, free_count; u32 ctrl_word; unsigned long flags; - - if (skb_padto(skb, ETH_ZLEN)) - return 0; + + if (skb->len < ETH_ZLEN) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; + } /* Caution: the write order is important here, set the field with the "ownership" bit last. */ @@ -973,7 +1042,7 @@ static int epic_start_xmit(struct sk_buff *skb, struct net_device *dev) entry = ep->cur_tx % TX_RING_SIZE; ep->tx_skbuff[entry] = skb; - ep->tx_ring[entry].bufaddr = pci_map_single(ep->pci_dev, skb->data, + ep->tx_ring[entry].bufaddr = pci_map_single(ep->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); if (free_count < TX_QUEUE_LEN/2) {/* Typical path */ ctrl_word = cpu_to_le32(0x100000); /* No interrupt */ @@ -1057,7 +1126,7 @@ static void epic_tx(struct net_device *dev, struct epic_private *ep) /* Free the original skb. */ skb = ep->tx_skbuff[entry]; - pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, + pci_unmap_single(ep->pci_dev, ep->tx_ring[entry].bufaddr, skb->len, PCI_DMA_TODEVICE); dev_kfree_skb_irq(skb); ep->tx_skbuff[entry] = NULL; @@ -1212,8 +1281,8 @@ static int epic_rx(struct net_device *dev, int budget) ep->rx_buf_sz, PCI_DMA_FROMDEVICE); } else { - pci_unmap_single(ep->pci_dev, - ep->rx_ring[entry].bufaddr, + pci_unmap_single(ep->pci_dev, + ep->rx_ring[entry].bufaddr, ep->rx_buf_sz, PCI_DMA_FROMDEVICE); skb_put(skb = ep->rx_skbuff[entry], pkt_len); ep->rx_skbuff[entry] = NULL; @@ -1238,7 +1307,7 @@ static int epic_rx(struct net_device *dev, int budget) break; skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - ep->rx_ring[entry].bufaddr = pci_map_single(ep->pci_dev, + ep->rx_ring[entry].bufaddr = pci_map_single(ep->pci_dev, skb->data, ep->rx_buf_sz, PCI_DMA_FROMDEVICE); work_done++; } @@ -1334,7 +1403,7 @@ static int epic_close(struct net_device *dev) ep->rx_ring[i].rxstatus = 0; /* Not owned by Epic chip. */ ep->rx_ring[i].buflength = 0; if (skb) { - pci_unmap_single(ep->pci_dev, ep->rx_ring[i].bufaddr, + pci_unmap_single(ep->pci_dev, ep->rx_ring[i].bufaddr, ep->rx_buf_sz, PCI_DMA_FROMDEVICE); dev_kfree_skb(skb); } @@ -1345,7 +1414,7 @@ static int epic_close(struct net_device *dev) ep->tx_skbuff[i] = NULL; if (!skb) continue; - pci_unmap_single(ep->pci_dev, ep->tx_ring[i].bufaddr, + pci_unmap_single(ep->pci_dev, ep->tx_ring[i].bufaddr, skb->len, PCI_DMA_TODEVICE); dev_kfree_skb(skb); } @@ -1538,7 +1607,7 @@ static void __devexit epic_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct epic_private *ep = dev->priv; - + pci_free_consistent(pdev, TX_TOTAL_SIZE, ep->tx_ring, ep->tx_ring_dma); pci_free_consistent(pdev, RX_TOTAL_SIZE, ep->rx_ring, ep->rx_ring_dma); unregister_netdev(dev); diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c index fd7b32a24..6b0ab1eac 100644 --- a/drivers/net/es3210.c +++ b/drivers/net/es3210.c @@ -421,7 +421,8 @@ MODULE_PARM_DESC(mem, "memory base address(es)"); MODULE_DESCRIPTION("Racal-Interlan ES3210 EISA ethernet driver"); MODULE_LICENSE("GPL"); -int __init init_module(void) +int +init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index ca42efa91..b67545be2 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c @@ -1064,7 +1064,8 @@ static int eth16i_tx(struct sk_buff *skb, struct net_device *dev) unsigned long flags; if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } @@ -1434,7 +1435,7 @@ MODULE_PARM_DESC(mediatype, "eth16i media type of interface(s) (bnc,tp,dix,auto, module_param(debug, int, 0); MODULE_PARM_DESC(debug, "eth16i debug level (0-6)"); -int __init init_module(void) +int init_module(void) { int this_dev, found = 0; struct net_device *dev; diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 567e27413..a8449265e 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c @@ -92,7 +92,7 @@ static int full_duplex[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; #include /* These identify the driver base version and may not be removed. */ -static char version[] = +static char version[] __devinitdata = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE "\n"; @@ -124,8 +124,16 @@ MODULE_PARM_DESC(multicast_filter_limit, "fealnx maximum number of filtered mult MODULE_PARM_DESC(options, "fealnx: Bits 0-3: media type, bit 17: full duplex"); MODULE_PARM_DESC(full_duplex, "fealnx full duplex setting(s) (1)"); -enum { - MIN_REGION_SIZE = 136, +#define MIN_REGION_SIZE 136 + +enum pci_flags_bit { + PCI_USES_IO = 1, + PCI_USES_MEM = 2, + PCI_USES_MASTER = 4, + PCI_ADDR0 = 0x10 << 0, + PCI_ADDR1 = 0x10 << 1, + PCI_ADDR2 = 0x10 << 2, + PCI_ADDR3 = 0x10 << 3, }; /* A chip capabilities table, matching the entries in pci_tbl[] above. */ @@ -148,13 +156,14 @@ enum phy_type_flags { struct chip_info { char *chip_name; + int io_size; int flags; }; -static const struct chip_info skel_netdrv_tbl[] __devinitdata = { - { "100/10M Ethernet PCI Adapter", HAS_MII_XCVR }, - { "100/10M Ethernet PCI Adapter", HAS_CHIP_XCVR }, - { "1000/100/10M Ethernet PCI Adapter", HAS_MII_XCVR }, +static const struct chip_info skel_netdrv_tbl[] = { + {"100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, + {"100/10M Ethernet PCI Adapter", 136, HAS_CHIP_XCVR}, + {"1000/100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, }; /* Offsets to the Command and Status Registers. */ @@ -505,14 +514,13 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, len = pci_resource_len(pdev, bar); if (len < MIN_REGION_SIZE) { - dev_err(&pdev->dev, - "region size %ld too small, aborting\n", len); + printk(KERN_ERR "%s: region size %ld too small, aborting\n", + boardname, len); return -ENODEV; } i = pci_request_regions(pdev, boardname); - if (i) - return i; + if (i) return i; irq = pdev->irq; @@ -578,9 +586,9 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, if (mii_status != 0xffff && mii_status != 0x0000) { np->phys[phy_idx++] = phy; - dev_info(&pdev->dev, - "MII PHY found at address %d, status " - "0x%4.4x.\n", phy, mii_status); + printk(KERN_INFO + "%s: MII PHY found at address %d, status " + "0x%4.4x.\n", dev->name, phy, mii_status); /* get phy type */ { unsigned int data; @@ -603,10 +611,10 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, } np->mii_cnt = phy_idx; - if (phy_idx == 0) - dev_warn(&pdev->dev, - "MII PHY not found -- this device may " - "not operate correctly.\n"); + if (phy_idx == 0) { + printk(KERN_WARNING "%s: MII PHY not found -- this device may " + "not operate correctly.\n", dev->name); + } } else { np->phys[0] = 32; /* 89/6/23 add, (begin) */ @@ -632,7 +640,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, np->mii.full_duplex = full_duplex[card_idx]; if (np->mii.full_duplex) { - dev_info(&pdev->dev, "Media type forced to Full Duplex.\n"); + printk(KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name); /* 89/6/13 add, (begin) */ // if (np->PHYType==MarvellPHY) if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) { @@ -836,7 +844,7 @@ static int netdev_open(struct net_device *dev) iowrite32(0x00000001, ioaddr + BCR); /* Reset */ - if (request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev)) return -EAGAIN; for (i = 0; i < 3; i++) diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 9b4030031..bd6983d1a 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -22,9 +22,10 @@ * Copyright (c) 2001-2005 Greg Ungerer (gerg@snapgear.com) * * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be) - * Copyright (c) 2004-2006 Macq Electronique SA. + * Copyright (c) 2004-2005 Macq Electronique SA. */ +#include #include #include #include @@ -50,7 +51,7 @@ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \ defined(CONFIG_M5272) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) + defined(CONFIG_M520x) #include #include #include "fec.h" @@ -79,8 +80,6 @@ static unsigned int fec_hw[] = { (MCF_MBAR + 0x1000), #elif defined(CONFIG_M520x) (MCF_MBAR+0x30000), -#elif defined(CONFIG_M532x) - (MCF_MBAR+0xfc030000), #else &(((immap_t *)IMAP_ADDR)->im_cpm.cp_fec), #endif @@ -144,7 +143,7 @@ typedef struct { #define TX_RING_MOD_MASK 15 /* for this to work */ #if (((RX_RING_SIZE + TX_RING_SIZE) * 8) > PAGE_SIZE) -#error "FEC: descriptor ring size constants too large" +#error "FEC: descriptor ring size contants too large" #endif /* Interrupt events/masks. @@ -168,12 +167,12 @@ typedef struct { /* - * The 5270/5271/5280/5282/532x RX control register also contains maximum frame + * The 5270/5271/5280/5282 RX control register also contains maximum frame * size bits. Other FEC hardware does not, so we need to take that into * account when setting it. */ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) + defined(CONFIG_M520x) #define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16) #else #define OPT_FRAME_SIZE 0 @@ -309,7 +308,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) struct fec_enet_private *fep; volatile fec_t *fecp; volatile cbd_t *bdp; - unsigned short status; fep = netdev_priv(dev); fecp = (volatile fec_t*)dev->base_addr; @@ -322,9 +320,8 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Fill in a Tx ring entry */ bdp = fep->cur_tx; - status = bdp->cbd_sc; #ifndef final_version - if (status & BD_ENET_TX_READY) { + if (bdp->cbd_sc & BD_ENET_TX_READY) { /* Ooops. All transmit buffers are full. Bail out. * This should not happen, since dev->tbusy should be set. */ @@ -335,7 +332,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Clear all of the status flags. */ - status &= ~BD_ENET_TX_STATS; + bdp->cbd_sc &= ~BD_ENET_TX_STATS; /* Set buffer length and buffer pointer. */ @@ -369,22 +366,21 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) spin_lock_irq(&fep->lock); - /* Send it on its way. Tell FEC it's ready, interrupt when done, - * it's the last BD of the frame, and to put the CRC on the end. + /* Send it on its way. Tell FEC its ready, interrupt when done, + * its the last BD of the frame, and to put the CRC on the end. */ - status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR + bdp->cbd_sc |= (BD_ENET_TX_READY | BD_ENET_TX_INTR | BD_ENET_TX_LAST | BD_ENET_TX_TC); - bdp->cbd_sc = status; dev->trans_start = jiffies; /* Trigger transmission start */ - fecp->fec_x_des_active = 0; + fecp->fec_x_des_active = 0x01000000; /* If this was the last BD in the ring, start at the beginning again. */ - if (status & BD_ENET_TX_WRAP) { + if (bdp->cbd_sc & BD_ENET_TX_WRAP) { bdp = fep->tx_bd_base; } else { bdp++; @@ -495,44 +491,43 @@ fec_enet_tx(struct net_device *dev) { struct fec_enet_private *fep; volatile cbd_t *bdp; - unsigned short status; struct sk_buff *skb; fep = netdev_priv(dev); spin_lock(&fep->lock); bdp = fep->dirty_tx; - while (((status = bdp->cbd_sc) & BD_ENET_TX_READY) == 0) { + while ((bdp->cbd_sc&BD_ENET_TX_READY) == 0) { if (bdp == fep->cur_tx && fep->tx_full == 0) break; skb = fep->tx_skbuff[fep->skb_dirty]; /* Check for errors. */ - if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC | + if (bdp->cbd_sc & (BD_ENET_TX_HB | BD_ENET_TX_LC | BD_ENET_TX_RL | BD_ENET_TX_UN | BD_ENET_TX_CSL)) { fep->stats.tx_errors++; - if (status & BD_ENET_TX_HB) /* No heartbeat */ + if (bdp->cbd_sc & BD_ENET_TX_HB) /* No heartbeat */ fep->stats.tx_heartbeat_errors++; - if (status & BD_ENET_TX_LC) /* Late collision */ + if (bdp->cbd_sc & BD_ENET_TX_LC) /* Late collision */ fep->stats.tx_window_errors++; - if (status & BD_ENET_TX_RL) /* Retrans limit */ + if (bdp->cbd_sc & BD_ENET_TX_RL) /* Retrans limit */ fep->stats.tx_aborted_errors++; - if (status & BD_ENET_TX_UN) /* Underrun */ + if (bdp->cbd_sc & BD_ENET_TX_UN) /* Underrun */ fep->stats.tx_fifo_errors++; - if (status & BD_ENET_TX_CSL) /* Carrier lost */ + if (bdp->cbd_sc & BD_ENET_TX_CSL) /* Carrier lost */ fep->stats.tx_carrier_errors++; } else { fep->stats.tx_packets++; } #ifndef final_version - if (status & BD_ENET_TX_READY) + if (bdp->cbd_sc & BD_ENET_TX_READY) printk("HEY! Enet xmit interrupt and TX_READY.\n"); #endif /* Deferred means some collisions occurred during transmit, * but we eventually sent the packet OK. */ - if (status & BD_ENET_TX_DEF) + if (bdp->cbd_sc & BD_ENET_TX_DEF) fep->stats.collisions++; /* Free the sk buffer associated with this last transmit. @@ -543,7 +538,7 @@ fec_enet_tx(struct net_device *dev) /* Update pointer to next buffer descriptor to be transmitted. */ - if (status & BD_ENET_TX_WRAP) + if (bdp->cbd_sc & BD_ENET_TX_WRAP) bdp = fep->tx_bd_base; else bdp++; @@ -573,14 +568,9 @@ fec_enet_rx(struct net_device *dev) struct fec_enet_private *fep; volatile fec_t *fecp; volatile cbd_t *bdp; - unsigned short status; struct sk_buff *skb; ushort pkt_len; __u8 *data; - -#ifdef CONFIG_M532x - flush_cache_all(); -#endif fep = netdev_priv(dev); fecp = (volatile fec_t*)dev->base_addr; @@ -590,13 +580,13 @@ fec_enet_rx(struct net_device *dev) */ bdp = fep->cur_rx; -while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { +while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) { #ifndef final_version /* Since we have allocated space to hold a complete frame, * the last indicator should be set. */ - if ((status & BD_ENET_RX_LAST) == 0) + if ((bdp->cbd_sc & BD_ENET_RX_LAST) == 0) printk("FEC ENET: rcv is not +last\n"); #endif @@ -604,26 +594,26 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { goto rx_processing_done; /* Check for errors. */ - if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO | + if (bdp->cbd_sc & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO | BD_ENET_RX_CR | BD_ENET_RX_OV)) { fep->stats.rx_errors++; - if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH)) { + if (bdp->cbd_sc & (BD_ENET_RX_LG | BD_ENET_RX_SH)) { /* Frame too long or too short. */ fep->stats.rx_length_errors++; } - if (status & BD_ENET_RX_NO) /* Frame alignment */ + if (bdp->cbd_sc & BD_ENET_RX_NO) /* Frame alignment */ fep->stats.rx_frame_errors++; - if (status & BD_ENET_RX_CR) /* CRC Error */ + if (bdp->cbd_sc & BD_ENET_RX_CR) /* CRC Error */ + fep->stats.rx_crc_errors++; + if (bdp->cbd_sc & BD_ENET_RX_OV) /* FIFO overrun */ fep->stats.rx_crc_errors++; - if (status & BD_ENET_RX_OV) /* FIFO overrun */ - fep->stats.rx_fifo_errors++; } /* Report late collisions as a frame error. * On this error, the BD is closed, but we don't know what we * have in the buffer. So, just drop this frame on the floor. */ - if (status & BD_ENET_RX_CL) { + if (bdp->cbd_sc & BD_ENET_RX_CL) { fep->stats.rx_errors++; fep->stats.rx_frame_errors++; goto rx_processing_done; @@ -649,7 +639,9 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { } else { skb->dev = dev; skb_put(skb,pkt_len-4); /* Make room */ - eth_copy_and_sum(skb, data, pkt_len-4, 0); + eth_copy_and_sum(skb, + (unsigned char *)__va(bdp->cbd_bufaddr), + pkt_len-4, 0); skb->protocol=eth_type_trans(skb,dev); netif_rx(skb); } @@ -657,16 +649,15 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { /* Clear the status flags for this buffer. */ - status &= ~BD_ENET_RX_STATS; + bdp->cbd_sc &= ~BD_ENET_RX_STATS; /* Mark the buffer empty. */ - status |= BD_ENET_RX_EMPTY; - bdp->cbd_sc = status; + bdp->cbd_sc |= BD_ENET_RX_EMPTY; /* Update BD pointer to next entry. */ - if (status & BD_ENET_RX_WRAP) + if (bdp->cbd_sc & BD_ENET_RX_WRAP) bdp = fep->rx_bd_base; else bdp++; @@ -676,9 +667,9 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { * incoming frames. On a heavily loaded network, we should be * able to keep up at the expense of system resources. */ - fecp->fec_r_des_active = 0; + fecp->fec_r_des_active = 0x01000000; #endif - } /* while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) */ + } /* while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) */ fep->cur_rx = (cbd_t *)bdp; #if 0 @@ -689,12 +680,11 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) { * our way back to the interrupt return only to come right back * here. */ - fecp->fec_r_des_active = 0; + fecp->fec_r_des_active = 0x01000000; #endif } -/* called from interrupt context */ static void fec_enet_mii(struct net_device *dev) { @@ -706,12 +696,10 @@ fec_enet_mii(struct net_device *dev) fep = netdev_priv(dev); ep = fep->hwp; mii_reg = ep->fec_mii_data; - - spin_lock(&fep->lock); if ((mip = mii_head) == NULL) { printk("MII and no head!\n"); - goto unlock; + return; } if (mip->mii_func != NULL) @@ -723,9 +711,6 @@ fec_enet_mii(struct net_device *dev) if ((mip = mii_head) != NULL) ep->fec_mii_data = mip->mii_regval; - -unlock: - spin_unlock(&fep->lock); } static int @@ -743,7 +728,8 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi retval = 0; - spin_lock_irqsave(&fep->lock,flags); + save_flags(flags); + cli(); if ((mip = mii_free) != NULL) { mii_free = mip->mii_next; @@ -763,7 +749,7 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi retval = 1; } - spin_unlock_irqrestore(&fep->lock,flags); + restore_flags(flags); return(retval); } @@ -1230,7 +1216,7 @@ static phy_info_t const * const phy_info[] = { }; /* ------------------------------------------------------------------------- */ -#if !defined(CONFIG_M532x) + #ifdef CONFIG_RPXCLASSIC static void mii_link_interrupt(void *dev_id); @@ -1238,7 +1224,6 @@ mii_link_interrupt(void *dev_id); static irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs); #endif -#endif #if defined(CONFIG_M5272) @@ -1399,13 +1384,13 @@ static void __inline__ fec_request_intrs(struct net_device *dev) { volatile unsigned char *icrp; volatile unsigned long *imrp; - int i, ilip; + int i; b = (fep->index) ? MCFICM_INTC1 : MCFICM_INTC0; icrp = (volatile unsigned char *) (MCF_IPSBAR + b + MCFINTC_ICR0); - for (i = 23, ilip = 0x28; (i < 36); i++) - icrp[i] = ilip--; + for (i = 23; (i < 36); i++) + icrp[i] = 0x23; imrp = (volatile unsigned long *) (MCF_IPSBAR + b + MCFINTC_IMRH); @@ -1633,159 +1618,6 @@ static void __inline__ fec_uncache(unsigned long addr) /* ------------------------------------------------------------------------- */ -#elif defined(CONFIG_M532x) -/* - * Code specific for M532x - */ -static void __inline__ fec_request_intrs(struct net_device *dev) -{ - struct fec_enet_private *fep; - int b; - static const struct idesc { - char *name; - unsigned short irq; - } *idp, id[] = { - { "fec(TXF)", 36 }, - { "fec(TXB)", 37 }, - { "fec(TXFIFO)", 38 }, - { "fec(TXCR)", 39 }, - { "fec(RXF)", 40 }, - { "fec(RXB)", 41 }, - { "fec(MII)", 42 }, - { "fec(LC)", 43 }, - { "fec(HBERR)", 44 }, - { "fec(GRA)", 45 }, - { "fec(EBERR)", 46 }, - { "fec(BABT)", 47 }, - { "fec(BABR)", 48 }, - { NULL }, - }; - - fep = netdev_priv(dev); - b = (fep->index) ? 128 : 64; - - /* Setup interrupt handlers. */ - for (idp = id; idp->name; idp++) { - if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0) - printk("FEC: Could not allocate %s IRQ(%d)!\n", - idp->name, b+idp->irq); - } - - /* Unmask interrupts */ - MCF_INTC0_ICR36 = 0x2; - MCF_INTC0_ICR37 = 0x2; - MCF_INTC0_ICR38 = 0x2; - MCF_INTC0_ICR39 = 0x2; - MCF_INTC0_ICR40 = 0x2; - MCF_INTC0_ICR41 = 0x2; - MCF_INTC0_ICR42 = 0x2; - MCF_INTC0_ICR43 = 0x2; - MCF_INTC0_ICR44 = 0x2; - MCF_INTC0_ICR45 = 0x2; - MCF_INTC0_ICR46 = 0x2; - MCF_INTC0_ICR47 = 0x2; - MCF_INTC0_ICR48 = 0x2; - - MCF_INTC0_IMRH &= ~( - MCF_INTC_IMRH_INT_MASK36 | - MCF_INTC_IMRH_INT_MASK37 | - MCF_INTC_IMRH_INT_MASK38 | - MCF_INTC_IMRH_INT_MASK39 | - MCF_INTC_IMRH_INT_MASK40 | - MCF_INTC_IMRH_INT_MASK41 | - MCF_INTC_IMRH_INT_MASK42 | - MCF_INTC_IMRH_INT_MASK43 | - MCF_INTC_IMRH_INT_MASK44 | - MCF_INTC_IMRH_INT_MASK45 | - MCF_INTC_IMRH_INT_MASK46 | - MCF_INTC_IMRH_INT_MASK47 | - MCF_INTC_IMRH_INT_MASK48 ); - - /* Set up gpio outputs for MII lines */ - MCF_GPIO_PAR_FECI2C |= (0 | - MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC | - MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO); - MCF_GPIO_PAR_FEC = (0 | - MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC | - MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC); -} - -static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) -{ - volatile fec_t *fecp; - - fecp = fep->hwp; - fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04; - fecp->fec_x_cntrl = 0x00; - - /* - * Set MII speed to 2.5 MHz - */ - fep->phy_speed = ((((MCF_CLK / 2) / (2500000 / 10)) + 5) / 10) * 2; - fecp->fec_mii_speed = fep->phy_speed; - - fec_restart(dev, 0); -} - -static void __inline__ fec_get_mac(struct net_device *dev) -{ - struct fec_enet_private *fep = netdev_priv(dev); - volatile fec_t *fecp; - unsigned char *iap, tmpaddr[ETH_ALEN]; - - fecp = fep->hwp; - - if (FEC_FLASHMAC) { - /* - * Get MAC address from FLASH. - * If it is all 1's or 0's, use the default. - */ - iap = FEC_FLASHMAC; - if ((iap[0] == 0) && (iap[1] == 0) && (iap[2] == 0) && - (iap[3] == 0) && (iap[4] == 0) && (iap[5] == 0)) - iap = fec_mac_default; - if ((iap[0] == 0xff) && (iap[1] == 0xff) && (iap[2] == 0xff) && - (iap[3] == 0xff) && (iap[4] == 0xff) && (iap[5] == 0xff)) - iap = fec_mac_default; - } else { - *((unsigned long *) &tmpaddr[0]) = fecp->fec_addr_low; - *((unsigned short *) &tmpaddr[4]) = (fecp->fec_addr_high >> 16); - iap = &tmpaddr[0]; - } - - memcpy(dev->dev_addr, iap, ETH_ALEN); - - /* Adjust MAC if using default MAC address */ - if (iap == fec_mac_default) - dev->dev_addr[ETH_ALEN-1] = fec_mac_default[ETH_ALEN-1] + fep->index; -} - -static void __inline__ fec_enable_phy_intr(void) -{ -} - -static void __inline__ fec_disable_phy_intr(void) -{ -} - -static void __inline__ fec_phy_ack_intr(void) -{ -} - -static void __inline__ fec_localhw_setup(void) -{ -} - -/* - * Do not need to make region uncached on 532x. - */ -static void __inline__ fec_uncache(unsigned long addr) -{ -} - -/* ------------------------------------------------------------------------- */ - - #else /* @@ -2153,12 +1985,9 @@ fec_enet_open(struct net_device *dev) mii_do_cmd(dev, fep->phy->config); mii_do_cmd(dev, phy_cmd_config); /* display configuration */ - /* Poll until the PHY tells us its configuration - * (not link state). - * Request is initiated by mii_do_cmd above, but answer - * comes by interrupt. - * This should take about 25 usec per register at 2.5 MHz, - * and we read approximately 5 registers. + /* FIXME: use netif_carrier_{on,off} ; this polls + * until link is up which is wrong... could be + * 30 seconds or more we are trapped in here. -jgarzik */ while(!fep->sequence_done) schedule(); @@ -2424,11 +2253,15 @@ int __init fec_enet_init(struct net_device *dev) */ fec_request_intrs(dev); + /* Clear and enable interrupts */ + fecp->fec_ievent = 0xffc00000; + fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB | + FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII); fecp->fec_hash_table_high = 0; fecp->fec_hash_table_low = 0; fecp->fec_r_buff_size = PKT_MAXBLR_SIZE; fecp->fec_ecntrl = 2; - fecp->fec_r_des_active = 0; + fecp->fec_r_des_active = 0x01000000; dev->base_addr = (unsigned long)fecp; @@ -2448,11 +2281,6 @@ int __init fec_enet_init(struct net_device *dev) /* setup MII interface */ fec_set_mii(dev, fep); - /* Clear and enable interrupts */ - fecp->fec_ievent = 0xffc00000; - fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB | - FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII); - /* Queue up command to detect the PHY and initialize the * remainder of the interface. */ @@ -2484,6 +2312,11 @@ fec_restart(struct net_device *dev, int duplex) fecp->fec_ecntrl = 1; udelay(10); + /* Enable interrupts we wish to service. + */ + fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB | + FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII); + /* Clear any outstanding interrupt. */ fecp->fec_ievent = 0xffc00000; @@ -2575,12 +2408,7 @@ fec_restart(struct net_device *dev, int duplex) /* And last, enable the transmit and receive processing. */ fecp->fec_ecntrl = 2; - fecp->fec_r_des_active = 0; - - /* Enable interrupts we wish to service. - */ - fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB | - FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII); + fecp->fec_r_des_active = 0x01000000; } static void @@ -2592,16 +2420,9 @@ fec_stop(struct net_device *dev) fep = netdev_priv(dev); fecp = fep->hwp; - /* - ** We cannot expect a graceful transmit stop without link !!! - */ - if (fep->link) - { - fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ - udelay(10); - if (!(fecp->fec_ievent & FEC_ENET_GRA)) - printk("fec_stop : Graceful transmit stop did not complete !\n"); - } + fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ + + while(!(fecp->fec_ievent & FEC_ENET_GRA)); /* Whack a reset. We should wait for this. */ diff --git a/drivers/net/fec.h b/drivers/net/fec.h index 1d4216069..965c5c49f 100644 --- a/drivers/net/fec.h +++ b/drivers/net/fec.h @@ -14,7 +14,7 @@ /****************************************************************************/ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) + defined(CONFIG_M520x) /* * Just figures, Motorola would have to change the offsets for * registers in the same peripheral device on different models diff --git a/drivers/net/fec_8xx/fec_8xx-netta.c b/drivers/net/fec_8xx/fec_8xx-netta.c index 790d9dbe4..29c275e1d 100644 --- a/drivers/net/fec_8xx/fec_8xx-netta.c +++ b/drivers/net/fec_8xx/fec_8xx-netta.c @@ -2,6 +2,7 @@ * FEC instantatiation file for NETTA */ +#include #include #include #include diff --git a/drivers/net/fec_8xx/fec_main.c b/drivers/net/fec_8xx/fec_main.c index 282b1452c..7e4338097 100644 --- a/drivers/net/fec_8xx/fec_main.c +++ b/drivers/net/fec_8xx/fec_main.c @@ -10,6 +10,7 @@ * Released under the GPL */ +#include #include #include #include diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c index d3c16b85d..3b44ac1a7 100644 --- a/drivers/net/fec_8xx/fec_mii.c +++ b/drivers/net/fec_8xx/fec_mii.c @@ -10,6 +10,7 @@ * Released under the GPL */ +#include #include #include #include diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index c7605867e..1a556957d 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -107,8 +107,6 @@ * 0.52: 20 Jan 2006: Add MSI/MSIX support. * 0.53: 19 Mar 2006: Fix init from low power mode and add hw reset. * 0.54: 21 Mar 2006: Fix spin locks for multi irqs and cleanup. - * 0.55: 22 Mar 2006: Add flow control (pause frame). - * 0.56: 22 Mar 2006: Additional ethtool config and moduleparam support. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -120,7 +118,7 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.56" +#define FORCEDETH_VERSION "0.54" #define DRV_NAME "forcedeth" #include @@ -165,9 +163,6 @@ #define DEV_HAS_MSI 0x0040 /* device supports MSI */ #define DEV_HAS_MSI_X 0x0080 /* device supports MSI-X */ #define DEV_HAS_POWER_CNTRL 0x0100 /* device supports power savings */ -#define DEV_HAS_PAUSEFRAME_TX 0x0200 /* device supports tx pause frames */ -#define DEV_HAS_STATISTICS 0x0400 /* device supports hw statistics */ -#define DEV_HAS_TEST_EXTENDED 0x0800 /* device supports extended diagnostic test */ enum { NvRegIrqStatus = 0x000, @@ -208,7 +203,6 @@ enum { NvRegMSIIrqMask = 0x030, #define NVREG_MSI_VECTOR_0_ENABLED 0x01 NvRegMisc1 = 0x080, -#define NVREG_MISC1_PAUSE_TX 0x01 #define NVREG_MISC1_HD 0x02 #define NVREG_MISC1_FORCE 0x3b0f3c @@ -220,11 +214,9 @@ enum { #define NVREG_XMITSTAT_BUSY 0x01 NvRegPacketFilterFlags = 0x8c, -#define NVREG_PFF_PAUSE_RX 0x08 -#define NVREG_PFF_ALWAYS 0x7F0000 +#define NVREG_PFF_ALWAYS 0x7F0008 #define NVREG_PFF_PROMISC 0x80 #define NVREG_PFF_MYADDR 0x20 -#define NVREG_PFF_LOOPBACK 0x10 NvRegOffloadConfig = 0x90, #define NVREG_OFFLOAD_HOMEPHY 0x601 @@ -240,12 +232,10 @@ enum { #define NVREG_RNDSEED_FORCE2 0x2d00 #define NVREG_RNDSEED_FORCE3 0x7400 - NvRegTxDeferral = 0xA0, -#define NVREG_TX_DEFERRAL_DEFAULT 0x15050f -#define NVREG_TX_DEFERRAL_RGMII_10_100 0x16070f -#define NVREG_TX_DEFERRAL_RGMII_1000 0x14050f - NvRegRxDeferral = 0xA4, -#define NVREG_RX_DEFERRAL_DEFAULT 0x16 + NvRegUnknownSetupReg1 = 0xA0, +#define NVREG_UNKSETUP1_VAL 0x16070f + NvRegUnknownSetupReg2 = 0xA4, +#define NVREG_UNKSETUP2_VAL 0x16 NvRegMacAddrA = 0xA8, NvRegMacAddrB = 0xAC, NvRegMulticastAddrA = 0xB0, @@ -271,10 +261,8 @@ enum { #define NVREG_LINKSPEED_MASK (0xFFF) NvRegUnknownSetupReg5 = 0x130, #define NVREG_UNKSETUP5_BIT31 (1<<31) - NvRegTxWatermark = 0x13c, -#define NVREG_TX_WM_DESC1_DEFAULT 0x0200010 -#define NVREG_TX_WM_DESC2_3_DEFAULT 0x1e08000 -#define NVREG_TX_WM_DESC2_3_1000 0xfe08000 + NvRegUnknownSetupReg3 = 0x13c, +#define NVREG_UNKSETUP3_VAL1 0x200010 NvRegTxRxControl = 0x144, #define NVREG_TXRXCTL_KICK 0x0001 #define NVREG_TXRXCTL_BIT1 0x0002 @@ -289,9 +277,6 @@ enum { #define NVREG_TXRXCTL_VLANINS 0x00080 NvRegTxRingPhysAddrHigh = 0x148, NvRegRxRingPhysAddrHigh = 0x14C, - NvRegTxPauseFrame = 0x170, -#define NVREG_TX_PAUSEFRAME_DISABLE 0x1ff0080 -#define NVREG_TX_PAUSEFRAME_ENABLE 0x0c00030 NvRegMIIStatus = 0x180, #define NVREG_MIISTAT_ERROR 0x0001 #define NVREG_MIISTAT_LINKCHANGE 0x0008 @@ -341,33 +326,6 @@ enum { #define NVREG_POWERSTATE_D1 0x0001 #define NVREG_POWERSTATE_D2 0x0002 #define NVREG_POWERSTATE_D3 0x0003 - NvRegTxCnt = 0x280, - NvRegTxZeroReXmt = 0x284, - NvRegTxOneReXmt = 0x288, - NvRegTxManyReXmt = 0x28c, - NvRegTxLateCol = 0x290, - NvRegTxUnderflow = 0x294, - NvRegTxLossCarrier = 0x298, - NvRegTxExcessDef = 0x29c, - NvRegTxRetryErr = 0x2a0, - NvRegRxFrameErr = 0x2a4, - NvRegRxExtraByte = 0x2a8, - NvRegRxLateCol = 0x2ac, - NvRegRxRunt = 0x2b0, - NvRegRxFrameTooLong = 0x2b4, - NvRegRxOverflow = 0x2b8, - NvRegRxFCSErr = 0x2bc, - NvRegRxFrameAlignErr = 0x2c0, - NvRegRxLenErr = 0x2c4, - NvRegRxUnicast = 0x2c8, - NvRegRxMulticast = 0x2cc, - NvRegRxBroadcast = 0x2d0, - NvRegTxDef = 0x2d4, - NvRegTxFrame = 0x2d8, - NvRegRxCnt = 0x2dc, - NvRegTxPause = 0x2e0, - NvRegRxPause = 0x2e4, - NvRegRxDropFrame = 0x2e8, NvRegVlanControl = 0x300, #define NVREG_VLANCONTROL_ENABLE 0x2000 NvRegMSIXMap0 = 0x3e0, @@ -491,18 +449,16 @@ typedef union _ring_type { /* General driver defaults */ #define NV_WATCHDOG_TIMEO (5*HZ) -#define RX_RING_DEFAULT 128 -#define TX_RING_DEFAULT 256 -#define RX_RING_MIN 128 -#define TX_RING_MIN 64 -#define RING_MAX_DESC_VER_1 1024 -#define RING_MAX_DESC_VER_2_3 16384 -/* - * Difference between the get and put pointers for the tx ring. - * This is used to throttle the amount of data outstanding in the - * tx ring. +#define RX_RING 128 +#define TX_RING 256 +/* + * If your nic mysteriously hangs then try to reduce the limits + * to 1/0: It might be required to set NV_TX_LASTPACKET in the + * last valid ring entry. But this would be impossible to + * implement - probably a disassembly error. */ -#define TX_LIMIT_DIFFERENCE 1 +#define TX_LIMIT_STOP 255 +#define TX_LIMIT_START 254 /* rx/tx mac addr + type + vlan + align + slack*/ #define NV_RX_HEADERS (64) @@ -516,9 +472,8 @@ typedef union _ring_type { #define OOM_REFILL (1+HZ/20) #define POLL_WAIT (1+HZ/100) #define LINK_TIMEOUT (3*HZ) -#define STATS_INTERVAL (10*HZ) -/* +/* * desc_ver values: * The nic supports three different descriptor types: * - DESC_VER_1: Original @@ -551,13 +506,13 @@ typedef union _ring_type { #define PHY_1000 0x2 #define PHY_HALF 0x100 -#define NV_PAUSEFRAME_RX_CAPABLE 0x0001 -#define NV_PAUSEFRAME_TX_CAPABLE 0x0002 -#define NV_PAUSEFRAME_RX_ENABLE 0x0004 -#define NV_PAUSEFRAME_TX_ENABLE 0x0008 -#define NV_PAUSEFRAME_RX_REQ 0x0010 -#define NV_PAUSEFRAME_TX_REQ 0x0020 -#define NV_PAUSEFRAME_AUTONEG 0x0040 +/* FIXME: MII defines that should be added to */ +#define MII_1000BT_CR 0x09 +#define MII_1000BT_SR 0x0a +#define ADVERTISE_1000FULL 0x0200 +#define ADVERTISE_1000HALF 0x0100 +#define LPA_1000FULL 0x0800 +#define LPA_1000HALF 0x0400 /* MSI/MSI-X defines */ #define NV_MSI_X_MAX_VECTORS 8 @@ -572,101 +527,6 @@ typedef union _ring_type { #define NV_MSI_X_VECTOR_TX 0x1 #define NV_MSI_X_VECTOR_OTHER 0x2 -/* statistics */ -struct nv_ethtool_str { - char name[ETH_GSTRING_LEN]; -}; - -static const struct nv_ethtool_str nv_estats_str[] = { - { "tx_bytes" }, - { "tx_zero_rexmt" }, - { "tx_one_rexmt" }, - { "tx_many_rexmt" }, - { "tx_late_collision" }, - { "tx_fifo_errors" }, - { "tx_carrier_errors" }, - { "tx_excess_deferral" }, - { "tx_retry_error" }, - { "tx_deferral" }, - { "tx_packets" }, - { "tx_pause" }, - { "rx_frame_error" }, - { "rx_extra_byte" }, - { "rx_late_collision" }, - { "rx_runt" }, - { "rx_frame_too_long" }, - { "rx_over_errors" }, - { "rx_crc_errors" }, - { "rx_frame_align_error" }, - { "rx_length_error" }, - { "rx_unicast" }, - { "rx_multicast" }, - { "rx_broadcast" }, - { "rx_bytes" }, - { "rx_pause" }, - { "rx_drop_frame" }, - { "rx_packets" }, - { "rx_errors_total" } -}; - -struct nv_ethtool_stats { - u64 tx_bytes; - u64 tx_zero_rexmt; - u64 tx_one_rexmt; - u64 tx_many_rexmt; - u64 tx_late_collision; - u64 tx_fifo_errors; - u64 tx_carrier_errors; - u64 tx_excess_deferral; - u64 tx_retry_error; - u64 tx_deferral; - u64 tx_packets; - u64 tx_pause; - u64 rx_frame_error; - u64 rx_extra_byte; - u64 rx_late_collision; - u64 rx_runt; - u64 rx_frame_too_long; - u64 rx_over_errors; - u64 rx_crc_errors; - u64 rx_frame_align_error; - u64 rx_length_error; - u64 rx_unicast; - u64 rx_multicast; - u64 rx_broadcast; - u64 rx_bytes; - u64 rx_pause; - u64 rx_drop_frame; - u64 rx_packets; - u64 rx_errors_total; -}; - -/* diagnostics */ -#define NV_TEST_COUNT_BASE 3 -#define NV_TEST_COUNT_EXTENDED 4 - -static const struct nv_ethtool_str nv_etests_str[] = { - { "link (online/offline)" }, - { "register (offline) " }, - { "interrupt (offline) " }, - { "loopback (offline) " } -}; - -struct register_test { - u32 reg; - u32 mask; -}; - -static const struct register_test nv_registers_test[] = { - { NvRegUnknownSetupReg6, 0x01 }, - { NvRegMisc1, 0x03c }, - { NvRegOffloadConfig, 0x03ff }, - { NvRegMulticastAddrA, 0xffffffff }, - { NvRegTxWatermark, 0x0ff }, - { NvRegWakeUpFlags, 0x07777 }, - { 0,0 } -}; - /* * SMP locking: * All hardware access under dev->priv->lock, except the performance @@ -685,7 +545,6 @@ struct fe_priv { /* General data: * Locking: spin_lock(&np->lock); */ struct net_device_stats stats; - struct nv_ethtool_stats estats; int in_shutdown; u32 linkspeed; int duplex; @@ -695,7 +554,6 @@ struct fe_priv { int wolenabled; unsigned int phy_oui; u16 gigabit; - int intr_test; /* General data: RO fields */ dma_addr_t ring_addr; @@ -715,15 +573,13 @@ struct fe_priv { */ ring_type rx_ring; unsigned int cur_rx, refill_rx; - struct sk_buff **rx_skbuff; - dma_addr_t *rx_dma; + struct sk_buff *rx_skbuff[RX_RING]; + dma_addr_t rx_dma[RX_RING]; unsigned int rx_buf_sz; unsigned int pkt_limit; struct timer_list oom_kick; struct timer_list nic_poll; - struct timer_list stats_poll; u32 nic_poll_irq; - int rx_ring_size; /* media detection workaround. * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); @@ -735,13 +591,10 @@ struct fe_priv { */ ring_type tx_ring; unsigned int next_tx, nic_tx; - struct sk_buff **tx_skbuff; - dma_addr_t *tx_dma; - unsigned int *tx_dma_len; + struct sk_buff *tx_skbuff[TX_RING]; + dma_addr_t tx_dma[TX_RING]; + unsigned int tx_dma_len[TX_RING]; u32 tx_flags; - int tx_ring_size; - int tx_limit_start; - int tx_limit_stop; /* vlan fields */ struct vlan_group *vlangrp; @@ -749,9 +602,6 @@ struct fe_priv { /* msi/msi-x fields */ u32 msi_flags; struct msix_entry msi_x_entry[NV_MSI_X_MAX_VECTORS]; - - /* flow control */ - u32 pause_flags; }; /* @@ -762,14 +612,12 @@ static int max_interrupt_work = 5; /* * Optimization can be either throuput mode or cpu mode - * + * * Throughput Mode: Every tx and rx packet will generate an interrupt. * CPU Mode: Interrupts are controlled by a timer. */ -enum { - NV_OPTIMIZATION_MODE_THROUGHPUT, - NV_OPTIMIZATION_MODE_CPU -}; +#define NV_OPTIMIZATION_MODE_THROUGHPUT 0 +#define NV_OPTIMIZATION_MODE_CPU 1 static int optimization_mode = NV_OPTIMIZATION_MODE_THROUGHPUT; /* @@ -782,31 +630,14 @@ static int optimization_mode = NV_OPTIMIZATION_MODE_THROUGHPUT; static int poll_interval = -1; /* - * MSI interrupts - */ -enum { - NV_MSI_INT_DISABLED, - NV_MSI_INT_ENABLED -}; -static int msi = NV_MSI_INT_ENABLED; - -/* - * MSIX interrupts + * Disable MSI interrupts */ -enum { - NV_MSIX_INT_DISABLED, - NV_MSIX_INT_ENABLED -}; -static int msix = NV_MSIX_INT_ENABLED; +static int disable_msi = 0; /* - * DMA 64bit + * Disable MSIX interrupts */ -enum { - NV_DMA_64BIT_DISABLED, - NV_DMA_64BIT_ENABLED -}; -static int dma_64bit = NV_DMA_64BIT_ENABLED; +static int disable_msix = 0; static inline struct fe_priv *get_nvpriv(struct net_device *dev) { @@ -866,7 +697,7 @@ static void setup_hw_rings(struct net_device *dev, int rxtx_flags) writel((u32) cpu_to_le64(np->ring_addr), base + NvRegRxRingPhysAddr); } if (rxtx_flags & NV_SETUP_TX_RING) { - writel((u32) cpu_to_le64(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); + writel((u32) cpu_to_le64(np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); } } else { if (rxtx_flags & NV_SETUP_RX_RING) { @@ -874,37 +705,12 @@ static void setup_hw_rings(struct net_device *dev, int rxtx_flags) writel((u32) (cpu_to_le64(np->ring_addr) >> 32), base + NvRegRxRingPhysAddrHigh); } if (rxtx_flags & NV_SETUP_TX_RING) { - writel((u32) cpu_to_le64(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc_ex)), base + NvRegTxRingPhysAddr); - writel((u32) (cpu_to_le64(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc_ex)) >> 32), base + NvRegTxRingPhysAddrHigh); + writel((u32) cpu_to_le64(np->ring_addr + RX_RING*sizeof(struct ring_desc_ex)), base + NvRegTxRingPhysAddr); + writel((u32) (cpu_to_le64(np->ring_addr + RX_RING*sizeof(struct ring_desc_ex)) >> 32), base + NvRegTxRingPhysAddrHigh); } } } -static void free_rings(struct net_device *dev) -{ - struct fe_priv *np = get_nvpriv(dev); - - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - if(np->rx_ring.orig) - pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (np->rx_ring_size + np->tx_ring_size), - np->rx_ring.orig, np->ring_addr); - } else { - if (np->rx_ring.ex) - pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (np->rx_ring_size + np->tx_ring_size), - np->rx_ring.ex, np->ring_addr); - } - if (np->rx_skbuff) - kfree(np->rx_skbuff); - if (np->rx_dma) - kfree(np->rx_dma); - if (np->tx_skbuff) - kfree(np->tx_skbuff); - if (np->tx_dma) - kfree(np->tx_dma); - if (np->tx_dma_len) - kfree(np->tx_dma_len); -} - static int using_multi_irqs(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); @@ -1054,7 +860,7 @@ static int phy_init(struct net_device *dev) /* set advertise register */ reg = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - reg |= (ADVERTISE_10HALF|ADVERTISE_10FULL|ADVERTISE_100HALF|ADVERTISE_100FULL|ADVERTISE_PAUSE_ASYM|ADVERTISE_PAUSE_CAP); + reg |= (ADVERTISE_10HALF|ADVERTISE_10FULL|ADVERTISE_100HALF|ADVERTISE_100FULL|0x800|0x400); if (mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg)) { printk(KERN_INFO "%s: phy write to advertise failed.\n", pci_name(np->pci_dev)); return PHY_ERROR; @@ -1067,14 +873,14 @@ static int phy_init(struct net_device *dev) mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); if (mii_status & PHY_GIGABIT) { np->gigabit = PHY_GIGABIT; - mii_control_1000 = mii_rw(dev, np->phyaddr, MII_CTRL1000, MII_READ); + mii_control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); mii_control_1000 &= ~ADVERTISE_1000HALF; if (phyinterface & PHY_RGMII) mii_control_1000 |= ADVERTISE_1000FULL; else mii_control_1000 &= ~ADVERTISE_1000FULL; - if (mii_rw(dev, np->phyaddr, MII_CTRL1000, mii_control_1000)) { + if (mii_rw(dev, np->phyaddr, MII_1000BT_CR, mii_control_1000)) { printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); return PHY_ERROR; } @@ -1112,8 +918,6 @@ static int phy_init(struct net_device *dev) return PHY_ERROR; } } - /* some phys clear out pause advertisment on reset, set it back */ - mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg); /* restart auto negotiation */ mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); @@ -1243,7 +1047,7 @@ static int nv_alloc_rx(struct net_device *dev) while (np->cur_rx != refill_rx) { struct sk_buff *skb; - nr = refill_rx % np->rx_ring_size; + nr = refill_rx % RX_RING; if (np->rx_skbuff[nr] == NULL) { skb = dev_alloc_skb(np->rx_buf_sz + NV_RX_ALLOC_PAD); @@ -1272,7 +1076,7 @@ static int nv_alloc_rx(struct net_device *dev) refill_rx++; } np->refill_rx = refill_rx; - if (np->cur_rx - refill_rx == np->rx_ring_size) + if (np->cur_rx - refill_rx == RX_RING) return 1; return 0; } @@ -1306,14 +1110,14 @@ static void nv_do_rx_refill(unsigned long data) } } -static void nv_init_rx(struct net_device *dev) +static void nv_init_rx(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); int i; - np->cur_rx = np->rx_ring_size; + np->cur_rx = RX_RING; np->refill_rx = 0; - for (i = 0; i < np->rx_ring_size; i++) + for (i = 0; i < RX_RING; i++) if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) np->rx_ring.orig[i].FlagLen = 0; else @@ -1326,7 +1130,7 @@ static void nv_init_tx(struct net_device *dev) int i; np->next_tx = np->nic_tx = 0; - for (i = 0; i < np->tx_ring_size; i++) { + for (i = 0; i < TX_RING; i++) { if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) np->tx_ring.orig[i].FlagLen = 0; else @@ -1370,8 +1174,8 @@ static void nv_drain_tx(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); unsigned int i; - - for (i = 0; i < np->tx_ring_size; i++) { + + for (i = 0; i < TX_RING; i++) { if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) np->tx_ring.orig[i].FlagLen = 0; else @@ -1385,7 +1189,7 @@ static void nv_drain_rx(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); int i; - for (i = 0; i < np->rx_ring_size; i++) { + for (i = 0; i < RX_RING; i++) { if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) np->rx_ring.orig[i].FlagLen = 0; else @@ -1417,8 +1221,8 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) u32 tx_flags = 0; u32 tx_flags_extra = (np->desc_ver == DESC_VER_1 ? NV_TX_LASTPACKET : NV_TX2_LASTPACKET); unsigned int fragments = skb_shinfo(skb)->nr_frags; - unsigned int nr = (np->next_tx - 1) % np->tx_ring_size; - unsigned int start_nr = np->next_tx % np->tx_ring_size; + unsigned int nr = (np->next_tx - 1) % TX_RING; + unsigned int start_nr = np->next_tx % TX_RING; unsigned int i; u32 offset = 0; u32 bcnt; @@ -1434,7 +1238,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) spin_lock_irq(&np->lock); - if ((np->next_tx - np->nic_tx + entries - 1) > np->tx_limit_stop) { + if ((np->next_tx - np->nic_tx + entries - 1) > TX_LIMIT_STOP) { spin_unlock_irq(&np->lock); netif_stop_queue(dev); return NETDEV_TX_BUSY; @@ -1443,7 +1247,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) /* setup the header buffer */ do { bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; - nr = (nr + 1) % np->tx_ring_size; + nr = (nr + 1) % TX_RING; np->tx_dma[nr] = pci_map_single(np->pci_dev, skb->data + offset, bcnt, PCI_DMA_TODEVICE); @@ -1470,7 +1274,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) do { bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; - nr = (nr + 1) % np->tx_ring_size; + nr = (nr + 1) % TX_RING; np->tx_dma[nr] = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, PCI_DMA_TODEVICE); @@ -1516,7 +1320,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) } else { np->tx_ring.ex[start_nr].TxVlan = cpu_to_le32(tx_flags_vlan); np->tx_ring.ex[start_nr].FlagLen |= cpu_to_le32(tx_flags | tx_flags_extra); - } + } dprintk(KERN_DEBUG "%s: nv_start_xmit: packet %d (entries %d) queued for transmission. tx_flags_extra: %x\n", dev->name, np->next_tx, entries, tx_flags_extra); @@ -1552,7 +1356,7 @@ static void nv_tx_done(struct net_device *dev) struct sk_buff *skb; while (np->nic_tx != np->next_tx) { - i = np->nic_tx % np->tx_ring_size; + i = np->nic_tx % TX_RING; if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) Flags = le32_to_cpu(np->tx_ring.orig[i].FlagLen); @@ -1591,13 +1395,13 @@ static void nv_tx_done(struct net_device *dev) } else { np->stats.tx_packets++; np->stats.tx_bytes += skb->len; - } + } } } nv_release_txskb(dev, i); np->nic_tx++; } - if (np->next_tx - np->nic_tx < np->tx_limit_start) + if (np->next_tx - np->nic_tx < TX_LIMIT_START) netif_wake_queue(dev); } @@ -1634,10 +1438,10 @@ static void nv_tx_timeout(struct net_device *dev) readl(base + i + 24), readl(base + i + 28)); } printk(KERN_INFO "%s: Dumping tx ring\n", dev->name); - for (i=0;itx_ring_size;i+= 4) { + for (i=0;idesc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { printk(KERN_INFO "%03x: %08x %08x // %08x %08x // %08x %08x // %08x %08x\n", - i, + i, le32_to_cpu(np->tx_ring.orig[i].PacketBuffer), le32_to_cpu(np->tx_ring.orig[i].FlagLen), le32_to_cpu(np->tx_ring.orig[i+1].PacketBuffer), @@ -1648,7 +1452,7 @@ static void nv_tx_timeout(struct net_device *dev) le32_to_cpu(np->tx_ring.orig[i+3].FlagLen)); } else { printk(KERN_INFO "%03x: %08x %08x %08x // %08x %08x %08x // %08x %08x %08x // %08x %08x %08x\n", - i, + i, le32_to_cpu(np->tx_ring.ex[i].PacketBufferHigh), le32_to_cpu(np->tx_ring.ex[i].PacketBufferLow), le32_to_cpu(np->tx_ring.ex[i].FlagLen), @@ -1746,14 +1550,15 @@ static void nv_rx_process(struct net_device *dev) u32 Flags; u32 vlanflags = 0; + for (;;) { struct sk_buff *skb; int len; int i; - if (np->cur_rx - np->refill_rx >= np->rx_ring_size) + if (np->cur_rx - np->refill_rx >= RX_RING) break; /* we scanned the whole ring - do not continue */ - i = np->cur_rx % np->rx_ring_size; + i = np->cur_rx % RX_RING; if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { Flags = le32_to_cpu(np->rx_ring.orig[i].FlagLen); len = nv_descr_getlength(&np->rx_ring.orig[i], np->desc_ver); @@ -1860,16 +1665,14 @@ static void nv_rx_process(struct net_device *dev) } } } - if (np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) { - Flags &= NV_RX2_CHECKSUMMASK; - if (Flags == NV_RX2_CHECKSUMOK1 || - Flags == NV_RX2_CHECKSUMOK2 || - Flags == NV_RX2_CHECKSUMOK3) { - dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name); - np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY; - } else { - dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name); - } + Flags &= NV_RX2_CHECKSUMMASK; + if (Flags == NV_RX2_CHECKSUMOK1 || + Flags == NV_RX2_CHECKSUMOK2 || + Flags == NV_RX2_CHECKSUMOK3) { + dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name); + np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY; + } else { + dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name); } } /* got a valid packet - forward it to the network core */ @@ -1933,7 +1736,7 @@ static int nv_change_mtu(struct net_device *dev, int new_mtu) * guessed, there is probably a simpler approach. * Changing the MTU is a rare event, it shouldn't matter. */ - nv_disable_irq(dev); + disable_irq(dev->irq); netif_tx_lock_bh(dev); spin_lock(&np->lock); /* stop engines */ @@ -1944,15 +1747,18 @@ static int nv_change_mtu(struct net_device *dev, int new_mtu) nv_drain_rx(dev); nv_drain_tx(dev); /* reinit driver view of the rx queue */ + nv_init_rx(dev); + nv_init_tx(dev); + /* alloc new rx buffers */ set_bufsize(dev); - if (nv_init_ring(dev)) { + if (nv_alloc_rx(dev)) { if (!np->in_shutdown) mod_timer(&np->oom_kick, jiffies + OOM_REFILL); } /* reinit nic view of the rx queue */ writel(np->rx_buf_sz, base + NvRegOffloadConfig); setup_hw_rings(dev, NV_SETUP_RX_RING | NV_SETUP_TX_RING); - writel( ((np->rx_ring_size-1) << NVREG_RINGSZ_RXSHIFT) + ((np->tx_ring_size-1) << NVREG_RINGSZ_TXSHIFT), + writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), base + NvRegRingSizes); pci_push(base); writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); @@ -1963,7 +1769,7 @@ static int nv_change_mtu(struct net_device *dev, int new_mtu) nv_start_tx(dev); spin_unlock(&np->lock); netif_tx_unlock_bh(dev); - nv_enable_irq(dev); + enable_irq(dev->irq); } return 0; } @@ -2026,16 +1832,16 @@ static void nv_set_multicast(struct net_device *dev) u8 __iomem *base = get_hwbase(dev); u32 addr[2]; u32 mask[2]; - u32 pff = readl(base + NvRegPacketFilterFlags) & NVREG_PFF_PAUSE_RX; + u32 pff; memset(addr, 0, sizeof(addr)); memset(mask, 0, sizeof(mask)); if (dev->flags & IFF_PROMISC) { printk(KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name); - pff |= NVREG_PFF_PROMISC; + pff = NVREG_PFF_PROMISC; } else { - pff |= NVREG_PFF_MYADDR; + pff = NVREG_PFF_MYADDR; if (dev->flags & IFF_ALLMULTI || dev->mc_list) { u32 alwaysOff[2]; @@ -2080,35 +1886,6 @@ static void nv_set_multicast(struct net_device *dev) spin_unlock_irq(&np->lock); } -static void nv_update_pause(struct net_device *dev, u32 pause_flags) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - - np->pause_flags &= ~(NV_PAUSEFRAME_TX_ENABLE | NV_PAUSEFRAME_RX_ENABLE); - - if (np->pause_flags & NV_PAUSEFRAME_RX_CAPABLE) { - u32 pff = readl(base + NvRegPacketFilterFlags) & ~NVREG_PFF_PAUSE_RX; - if (pause_flags & NV_PAUSEFRAME_RX_ENABLE) { - writel(pff|NVREG_PFF_PAUSE_RX, base + NvRegPacketFilterFlags); - np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - } else { - writel(pff, base + NvRegPacketFilterFlags); - } - } - if (np->pause_flags & NV_PAUSEFRAME_TX_CAPABLE) { - u32 regmisc = readl(base + NvRegMisc1) & ~NVREG_MISC1_PAUSE_TX; - if (pause_flags & NV_PAUSEFRAME_TX_ENABLE) { - writel(NVREG_TX_PAUSEFRAME_ENABLE, base + NvRegTxPauseFrame); - writel(regmisc|NVREG_MISC1_PAUSE_TX, base + NvRegMisc1); - np->pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - } else { - writel(NVREG_TX_PAUSEFRAME_DISABLE, base + NvRegTxPauseFrame); - writel(regmisc, base + NvRegMisc1); - } - } -} - /** * nv_update_linkspeed: Setup the MAC according to the link partner * @dev: Network device to be configured @@ -2124,14 +1901,12 @@ static int nv_update_linkspeed(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); u8 __iomem *base = get_hwbase(dev); - int adv = 0; - int lpa = 0; - int adv_lpa, adv_pause, lpa_pause; + int adv, lpa; int newls = np->linkspeed; int newdup = np->duplex; int mii_status; int retval = 0; - u32 control_1000, status_1000, phyreg, pause_flags, txreg; + u32 control_1000, status_1000, phyreg; /* BMSR_LSTATUS is latched, read it twice: * we want the current value. @@ -2177,15 +1952,10 @@ static int nv_update_linkspeed(struct net_device *dev) goto set_speed; } - adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ); - dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n", - dev->name, adv, lpa); - retval = 1; if (np->gigabit == PHY_GIGABIT) { - control_1000 = mii_rw(dev, np->phyaddr, MII_CTRL1000, MII_READ); - status_1000 = mii_rw(dev, np->phyaddr, MII_STAT1000, MII_READ); + control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + status_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_SR, MII_READ); if ((control_1000 & ADVERTISE_1000FULL) && (status_1000 & LPA_1000FULL)) { @@ -2197,22 +1967,27 @@ static int nv_update_linkspeed(struct net_device *dev) } } + adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); + lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ); + dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n", + dev->name, adv, lpa); + /* FIXME: handle parallel detection properly */ - adv_lpa = lpa & adv; - if (adv_lpa & LPA_100FULL) { + lpa = lpa & adv; + if (lpa & LPA_100FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100; newdup = 1; - } else if (adv_lpa & LPA_100HALF) { + } else if (lpa & LPA_100HALF) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100; newdup = 0; - } else if (adv_lpa & LPA_10FULL) { + } else if (lpa & LPA_10FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 1; - } else if (adv_lpa & LPA_10HALF) { + } else if (lpa & LPA_10HALF) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0; } else { - dprintk(KERN_DEBUG "%s: bad ability %04x - falling back to 10HD.\n", dev->name, adv_lpa); + dprintk(KERN_DEBUG "%s: bad ability %04x - falling back to 10HD.\n", dev->name, lpa); newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0; } @@ -2249,72 +2024,12 @@ set_speed: phyreg |= PHY_1000; writel(phyreg, base + NvRegPhyInterface); - if (phyreg & PHY_RGMII) { - if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_1000) - txreg = NVREG_TX_DEFERRAL_RGMII_1000; - else - txreg = NVREG_TX_DEFERRAL_RGMII_10_100; - } else { - txreg = NVREG_TX_DEFERRAL_DEFAULT; - } - writel(txreg, base + NvRegTxDeferral); - - if (np->desc_ver == DESC_VER_1) { - txreg = NVREG_TX_WM_DESC1_DEFAULT; - } else { - if ((np->linkspeed & NVREG_LINKSPEED_MASK) == NVREG_LINKSPEED_1000) - txreg = NVREG_TX_WM_DESC2_3_1000; - else - txreg = NVREG_TX_WM_DESC2_3_DEFAULT; - } - writel(txreg, base + NvRegTxWatermark); - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), base + NvRegMisc1); pci_push(base); writel(np->linkspeed, base + NvRegLinkSpeed); pci_push(base); - pause_flags = 0; - /* setup pause frame */ - if (np->duplex != 0) { - if (np->autoneg && np->pause_flags & NV_PAUSEFRAME_AUTONEG) { - adv_pause = adv & (ADVERTISE_PAUSE_CAP| ADVERTISE_PAUSE_ASYM); - lpa_pause = lpa & (LPA_PAUSE_CAP| LPA_PAUSE_ASYM); - - switch (adv_pause) { - case (ADVERTISE_PAUSE_CAP): - if (lpa_pause & LPA_PAUSE_CAP) { - pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) - pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - } - break; - case (ADVERTISE_PAUSE_ASYM): - if (lpa_pause == (LPA_PAUSE_CAP| LPA_PAUSE_ASYM)) - { - pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - } - break; - case (ADVERTISE_PAUSE_CAP| ADVERTISE_PAUSE_ASYM): - if (lpa_pause & LPA_PAUSE_CAP) - { - pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) - pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - } - if (lpa_pause == LPA_PAUSE_ASYM) - { - pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - } - break; - } - } else { - pause_flags = np->pause_flags; - } - } - nv_update_pause(dev, pause_flags); - return retval; } @@ -2375,7 +2090,7 @@ static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs) spin_lock(&np->lock); nv_tx_done(dev); spin_unlock(&np->lock); - + nv_rx_process(dev); if (nv_alloc_rx(dev)) { spin_lock(&np->lock); @@ -2383,7 +2098,7 @@ static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs) mod_timer(&np->oom_kick, jiffies + OOM_REFILL); spin_unlock(&np->lock); } - + if (events & NVREG_IRQ_LINK) { spin_lock(&np->lock); nv_link_irq(dev); @@ -2434,7 +2149,6 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data, struct pt_regs *regs) u8 __iomem *base = get_hwbase(dev); u32 events; int i; - unsigned long flags; dprintk(KERN_DEBUG "%s: nv_nic_irq_tx\n", dev->name); @@ -2446,16 +2160,16 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data, struct pt_regs *regs) if (!(events & np->irqmask)) break; - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); nv_tx_done(dev); - spin_unlock_irqrestore(&np->lock, flags); - + spin_unlock_irq(&np->lock); + if (events & (NVREG_IRQ_TX_ERR)) { dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n", dev->name, events); } if (i > max_interrupt_work) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); /* disable interrupts on the nic */ writel(NVREG_IRQ_TX_ALL, base + NvRegIrqMask); pci_push(base); @@ -2465,7 +2179,7 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data, struct pt_regs *regs) mod_timer(&np->nic_poll, jiffies + POLL_WAIT); } printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); break; } @@ -2482,7 +2196,6 @@ static irqreturn_t nv_nic_irq_rx(int foo, void *data, struct pt_regs *regs) u8 __iomem *base = get_hwbase(dev); u32 events; int i; - unsigned long flags; dprintk(KERN_DEBUG "%s: nv_nic_irq_rx\n", dev->name); @@ -2493,17 +2206,17 @@ static irqreturn_t nv_nic_irq_rx(int foo, void *data, struct pt_regs *regs) dprintk(KERN_DEBUG "%s: rx irq: %08x\n", dev->name, events); if (!(events & np->irqmask)) break; - + nv_rx_process(dev); if (nv_alloc_rx(dev)) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); if (!np->in_shutdown) mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); } - + if (i > max_interrupt_work) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); /* disable interrupts on the nic */ writel(NVREG_IRQ_RX_ALL, base + NvRegIrqMask); pci_push(base); @@ -2513,7 +2226,7 @@ static irqreturn_t nv_nic_irq_rx(int foo, void *data, struct pt_regs *regs) mod_timer(&np->nic_poll, jiffies + POLL_WAIT); } printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); break; } @@ -2530,7 +2243,6 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data, struct pt_regs *regs) u8 __iomem *base = get_hwbase(dev); u32 events; int i; - unsigned long flags; dprintk(KERN_DEBUG "%s: nv_nic_irq_other\n", dev->name); @@ -2541,16 +2253,16 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data, struct pt_regs *regs) dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, events); if (!(events & np->irqmask)) break; - + if (events & NVREG_IRQ_LINK) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); nv_link_irq(dev); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); } if (np->need_linktimer && time_after(jiffies, np->link_timeout)) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); nv_linkchange(dev); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); np->link_timeout = jiffies + LINK_TIMEOUT; } if (events & (NVREG_IRQ_UNKNOWN)) { @@ -2558,7 +2270,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data, struct pt_regs *regs) dev->name, events); } if (i > max_interrupt_work) { - spin_lock_irqsave(&np->lock, flags); + spin_lock_irq(&np->lock); /* disable interrupts on the nic */ writel(NVREG_IRQ_OTHER, base + NvRegIrqMask); pci_push(base); @@ -2568,7 +2280,7 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data, struct pt_regs *regs) mod_timer(&np->nic_poll, jiffies + POLL_WAIT); } printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i); - spin_unlock_irqrestore(&np->lock, flags); + spin_unlock_irq(&np->lock); break; } @@ -2578,178 +2290,6 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data, struct pt_regs *regs) return IRQ_RETVAL(i); } -static irqreturn_t nv_nic_irq_test(int foo, void *data, struct pt_regs *regs) -{ - struct net_device *dev = (struct net_device *) data; - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - u32 events; - - dprintk(KERN_DEBUG "%s: nv_nic_irq_test\n", dev->name); - - if (!(np->msi_flags & NV_MSI_X_ENABLED)) { - events = readl(base + NvRegIrqStatus) & NVREG_IRQSTAT_MASK; - writel(NVREG_IRQ_TIMER, base + NvRegIrqStatus); - } else { - events = readl(base + NvRegMSIXIrqStatus) & NVREG_IRQSTAT_MASK; - writel(NVREG_IRQ_TIMER, base + NvRegMSIXIrqStatus); - } - pci_push(base); - dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, events); - if (!(events & NVREG_IRQ_TIMER)) - return IRQ_RETVAL(0); - - spin_lock(&np->lock); - np->intr_test = 1; - spin_unlock(&np->lock); - - dprintk(KERN_DEBUG "%s: nv_nic_irq_test completed\n", dev->name); - - return IRQ_RETVAL(1); -} - -static void set_msix_vector_map(struct net_device *dev, u32 vector, u32 irqmask) -{ - u8 __iomem *base = get_hwbase(dev); - int i; - u32 msixmap = 0; - - /* Each interrupt bit can be mapped to a MSIX vector (4 bits). - * MSIXMap0 represents the first 8 interrupts and MSIXMap1 represents - * the remaining 8 interrupts. - */ - for (i = 0; i < 8; i++) { - if ((irqmask >> i) & 0x1) { - msixmap |= vector << (i << 2); - } - } - writel(readl(base + NvRegMSIXMap0) | msixmap, base + NvRegMSIXMap0); - - msixmap = 0; - for (i = 0; i < 8; i++) { - if ((irqmask >> (i + 8)) & 0x1) { - msixmap |= vector << (i << 2); - } - } - writel(readl(base + NvRegMSIXMap1) | msixmap, base + NvRegMSIXMap1); -} - -static int nv_request_irq(struct net_device *dev, int intr_test) -{ - struct fe_priv *np = get_nvpriv(dev); - u8 __iomem *base = get_hwbase(dev); - int ret = 1; - int i; - - if (np->msi_flags & NV_MSI_X_CAPABLE) { - for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) { - np->msi_x_entry[i].entry = i; - } - if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) { - np->msi_flags |= NV_MSI_X_ENABLED; - if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { - /* Request irq for rx handling */ - if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) { - printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); - pci_disable_msix(np->pci_dev); - np->msi_flags &= ~NV_MSI_X_ENABLED; - goto out_err; - } - /* Request irq for tx handling */ - if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) { - printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); - pci_disable_msix(np->pci_dev); - np->msi_flags &= ~NV_MSI_X_ENABLED; - goto out_free_rx; - } - /* Request irq for link and timer handling */ - if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) { - printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); - pci_disable_msix(np->pci_dev); - np->msi_flags &= ~NV_MSI_X_ENABLED; - goto out_free_tx; - } - /* map interrupts to their respective vector */ - writel(0, base + NvRegMSIXMap0); - writel(0, base + NvRegMSIXMap1); - set_msix_vector_map(dev, NV_MSI_X_VECTOR_RX, NVREG_IRQ_RX_ALL); - set_msix_vector_map(dev, NV_MSI_X_VECTOR_TX, NVREG_IRQ_TX_ALL); - set_msix_vector_map(dev, NV_MSI_X_VECTOR_OTHER, NVREG_IRQ_OTHER); - } else { - /* Request irq for all interrupts */ - if ((!intr_test && - request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || - (intr_test && - request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) { - printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); - pci_disable_msix(np->pci_dev); - np->msi_flags &= ~NV_MSI_X_ENABLED; - goto out_err; - } - - /* map interrupts to vector 0 */ - writel(0, base + NvRegMSIXMap0); - writel(0, base + NvRegMSIXMap1); - } - } - } - if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { - if ((ret = pci_enable_msi(np->pci_dev)) == 0) { - pci_intx(np->pci_dev, 0); - np->msi_flags |= NV_MSI_ENABLED; - if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || - (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) { - printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); - pci_disable_msi(np->pci_dev); - pci_intx(np->pci_dev, 1); - np->msi_flags &= ~NV_MSI_ENABLED; - goto out_err; - } - - /* map interrupts to vector 0 */ - writel(0, base + NvRegMSIMap0); - writel(0, base + NvRegMSIMap1); - /* enable msi vector 0 */ - writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask); - } - } - if (ret != 0) { - if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || - (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) - goto out_err; - - } - - return 0; -out_free_tx: - free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, dev); -out_free_rx: - free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, dev); -out_err: - return 1; -} - -static void nv_free_irq(struct net_device *dev) -{ - struct fe_priv *np = get_nvpriv(dev); - int i; - - if (np->msi_flags & NV_MSI_X_ENABLED) { - for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) { - free_irq(np->msi_x_entry[i].vector, dev); - } - pci_disable_msix(np->pci_dev); - np->msi_flags &= ~NV_MSI_X_ENABLED; - } else { - free_irq(np->pci_dev->irq, dev); - if (np->msi_flags & NV_MSI_ENABLED) { - pci_disable_msi(np->pci_dev); - pci_intx(np->pci_dev, 1); - np->msi_flags &= ~NV_MSI_ENABLED; - } - } -} - static void nv_do_nic_poll(unsigned long data) { struct net_device *dev = (struct net_device *) data; @@ -2765,49 +2305,49 @@ static void nv_do_nic_poll(unsigned long data) if (!using_multi_irqs(dev)) { if (np->msi_flags & NV_MSI_X_ENABLED) - disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); + disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); else - disable_irq_lockdep(dev->irq); + disable_irq(dev->irq); mask = np->irqmask; } else { if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { - disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); + disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); mask |= NVREG_IRQ_RX_ALL; } if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { - disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); + disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); mask |= NVREG_IRQ_TX_ALL; } if (np->nic_poll_irq & NVREG_IRQ_OTHER) { - disable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); + disable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); mask |= NVREG_IRQ_OTHER; } } np->nic_poll_irq = 0; /* FIXME: Do we need synchronize_irq(dev->irq) here? */ - + writel(mask, base + NvRegIrqMask); pci_push(base); if (!using_multi_irqs(dev)) { - nv_nic_irq(0, dev, NULL); + nv_nic_irq((int) 0, (void *) data, (struct pt_regs *) NULL); if (np->msi_flags & NV_MSI_X_ENABLED) - enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); + enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector); else - enable_irq_lockdep(dev->irq); + enable_irq(dev->irq); } else { if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { - nv_nic_irq_rx(0, dev, NULL); - enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); + nv_nic_irq_rx((int) 0, (void *) data, (struct pt_regs *) NULL); + enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); } if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { - nv_nic_irq_tx(0, dev, NULL); - enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); + nv_nic_irq_tx((int) 0, (void *) data, (struct pt_regs *) NULL); + enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); } if (np->nic_poll_irq & NVREG_IRQ_OTHER) { - nv_nic_irq_other(0, dev, NULL); - enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); + nv_nic_irq_other((int) 0, (void *) data, (struct pt_regs *) NULL); + enable_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); } } } @@ -2819,57 +2359,7 @@ static void nv_poll_controller(struct net_device *dev) } #endif -static void nv_do_stats_poll(unsigned long data) -{ - struct net_device *dev = (struct net_device *) data; - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - - np->estats.tx_bytes += readl(base + NvRegTxCnt); - np->estats.tx_zero_rexmt += readl(base + NvRegTxZeroReXmt); - np->estats.tx_one_rexmt += readl(base + NvRegTxOneReXmt); - np->estats.tx_many_rexmt += readl(base + NvRegTxManyReXmt); - np->estats.tx_late_collision += readl(base + NvRegTxLateCol); - np->estats.tx_fifo_errors += readl(base + NvRegTxUnderflow); - np->estats.tx_carrier_errors += readl(base + NvRegTxLossCarrier); - np->estats.tx_excess_deferral += readl(base + NvRegTxExcessDef); - np->estats.tx_retry_error += readl(base + NvRegTxRetryErr); - np->estats.tx_deferral += readl(base + NvRegTxDef); - np->estats.tx_packets += readl(base + NvRegTxFrame); - np->estats.tx_pause += readl(base + NvRegTxPause); - np->estats.rx_frame_error += readl(base + NvRegRxFrameErr); - np->estats.rx_extra_byte += readl(base + NvRegRxExtraByte); - np->estats.rx_late_collision += readl(base + NvRegRxLateCol); - np->estats.rx_runt += readl(base + NvRegRxRunt); - np->estats.rx_frame_too_long += readl(base + NvRegRxFrameTooLong); - np->estats.rx_over_errors += readl(base + NvRegRxOverflow); - np->estats.rx_crc_errors += readl(base + NvRegRxFCSErr); - np->estats.rx_frame_align_error += readl(base + NvRegRxFrameAlignErr); - np->estats.rx_length_error += readl(base + NvRegRxLenErr); - np->estats.rx_unicast += readl(base + NvRegRxUnicast); - np->estats.rx_multicast += readl(base + NvRegRxMulticast); - np->estats.rx_broadcast += readl(base + NvRegRxBroadcast); - np->estats.rx_bytes += readl(base + NvRegRxCnt); - np->estats.rx_pause += readl(base + NvRegRxPause); - np->estats.rx_drop_frame += readl(base + NvRegRxDropFrame); - np->estats.rx_packets = - np->estats.rx_unicast + - np->estats.rx_multicast + - np->estats.rx_broadcast; - np->estats.rx_errors_total = - np->estats.rx_crc_errors + - np->estats.rx_over_errors + - np->estats.rx_frame_error + - (np->estats.rx_frame_align_error - np->estats.rx_extra_byte) + - np->estats.rx_late_collision + - np->estats.rx_runt + - np->estats.rx_frame_too_long; - - if (!np->in_shutdown) - mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL); -} - -static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct fe_priv *np = netdev_priv(dev); strcpy(info->driver, "forcedeth"); @@ -2892,19 +2382,17 @@ static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo) { struct fe_priv *np = netdev_priv(dev); u8 __iomem *base = get_hwbase(dev); - u32 flags = 0; + spin_lock_irq(&np->lock); if (wolinfo->wolopts == 0) { + writel(0, base + NvRegWakeUpFlags); np->wolenabled = 0; - } else if (wolinfo->wolopts & WAKE_MAGIC) { - np->wolenabled = 1; - flags = NVREG_WAKEUPFLAGS_ENABLE; } - if (netif_running(dev)) { - spin_lock_irq(&np->lock); - writel(flags, base + NvRegWakeUpFlags); - spin_unlock_irq(&np->lock); + if (wolinfo->wolopts & WAKE_MAGIC) { + writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags); + np->wolenabled = 1; } + spin_unlock_irq(&np->lock); return 0; } @@ -2918,17 +2406,9 @@ static int nv_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) if (!netif_running(dev)) { /* We do not track link speed / duplex setting if the * interface is disabled. Force a link check */ - if (nv_update_linkspeed(dev)) { - if (!netif_carrier_ok(dev)) - netif_carrier_on(dev); - } else { - if (netif_carrier_ok(dev)) - netif_carrier_off(dev); - } + nv_update_linkspeed(dev); } - - if (netif_carrier_ok(dev)) { - switch(np->linkspeed & (NVREG_LINKSPEED_MASK)) { + switch(np->linkspeed & (NVREG_LINKSPEED_MASK)) { case NVREG_LINKSPEED_10: ecmd->speed = SPEED_10; break; @@ -2938,14 +2418,10 @@ static int nv_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) case NVREG_LINKSPEED_1000: ecmd->speed = SPEED_1000; break; - } - ecmd->duplex = DUPLEX_HALF; - if (np->duplex) - ecmd->duplex = DUPLEX_FULL; - } else { - ecmd->speed = -1; - ecmd->duplex = -1; } + ecmd->duplex = DUPLEX_HALF; + if (np->duplex) + ecmd->duplex = DUPLEX_FULL; ecmd->autoneg = np->autoneg; @@ -2953,20 +2429,23 @@ static int nv_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) if (np->autoneg) { ecmd->advertising |= ADVERTISED_Autoneg; adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - if (adv & ADVERTISE_10HALF) - ecmd->advertising |= ADVERTISED_10baseT_Half; - if (adv & ADVERTISE_10FULL) - ecmd->advertising |= ADVERTISED_10baseT_Full; - if (adv & ADVERTISE_100HALF) - ecmd->advertising |= ADVERTISED_100baseT_Half; - if (adv & ADVERTISE_100FULL) - ecmd->advertising |= ADVERTISED_100baseT_Full; - if (np->gigabit == PHY_GIGABIT) { - adv = mii_rw(dev, np->phyaddr, MII_CTRL1000, MII_READ); - if (adv & ADVERTISE_1000FULL) - ecmd->advertising |= ADVERTISED_1000baseT_Full; - } + } else { + adv = np->fixed_mode; + } + if (adv & ADVERTISE_10HALF) + ecmd->advertising |= ADVERTISED_10baseT_Half; + if (adv & ADVERTISE_10FULL) + ecmd->advertising |= ADVERTISED_10baseT_Full; + if (adv & ADVERTISE_100HALF) + ecmd->advertising |= ADVERTISED_100baseT_Half; + if (adv & ADVERTISE_100FULL) + ecmd->advertising |= ADVERTISED_100baseT_Full; + if (np->autoneg && np->gigabit == PHY_GIGABIT) { + adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + if (adv & ADVERTISE_1000FULL) + ecmd->advertising |= ADVERTISED_1000baseT_Full; } + ecmd->supported = (SUPPORTED_Autoneg | SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | @@ -3018,18 +2497,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) return -EINVAL; } - netif_carrier_off(dev); - if (netif_running(dev)) { - nv_disable_irq(dev); - netif_tx_lock_bh(dev); - spin_lock(&np->lock); - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - spin_unlock(&np->lock); - netif_tx_unlock_bh(dev); - } - + spin_lock_irq(&np->lock); if (ecmd->autoneg == AUTONEG_ENABLE) { int adv, bmcr; @@ -3037,7 +2505,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) /* advertise only what has been requested */ adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); if (ecmd->advertising & ADVERTISED_10baseT_Half) adv |= ADVERTISE_10HALF; if (ecmd->advertising & ADVERTISED_10baseT_Full) @@ -3046,22 +2514,16 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) adv |= ADVERTISE_100HALF; if (ecmd->advertising & ADVERTISED_100baseT_Full) adv |= ADVERTISE_100FULL; - if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ - adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; - if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) - adv |= ADVERTISE_PAUSE_ASYM; mii_rw(dev, np->phyaddr, MII_ADVERTISE, adv); if (np->gigabit == PHY_GIGABIT) { - adv = mii_rw(dev, np->phyaddr, MII_CTRL1000, MII_READ); + adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); adv &= ~ADVERTISE_1000FULL; if (ecmd->advertising & ADVERTISED_1000baseT_Full) adv |= ADVERTISE_1000FULL; - mii_rw(dev, np->phyaddr, MII_CTRL1000, adv); + mii_rw(dev, np->phyaddr, MII_1000BT_CR, adv); } - if (netif_running(dev)) - printk(KERN_INFO "%s: link down.\n", dev->name); bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); @@ -3072,7 +2534,7 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) np->autoneg = 0; adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4 | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); + adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); if (ecmd->speed == SPEED_10 && ecmd->duplex == DUPLEX_HALF) adv |= ADVERTISE_10HALF; if (ecmd->speed == SPEED_10 && ecmd->duplex == DUPLEX_FULL) @@ -3081,758 +2543,89 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) adv |= ADVERTISE_100HALF; if (ecmd->speed == SPEED_100 && ecmd->duplex == DUPLEX_FULL) adv |= ADVERTISE_100FULL; - np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE); - if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) {/* for rx we set both advertisments but disable tx pause */ - adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; - np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - } - if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) { - adv |= ADVERTISE_PAUSE_ASYM; - np->pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - } mii_rw(dev, np->phyaddr, MII_ADVERTISE, adv); np->fixed_mode = adv; if (np->gigabit == PHY_GIGABIT) { - adv = mii_rw(dev, np->phyaddr, MII_CTRL1000, MII_READ); + adv = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); adv &= ~ADVERTISE_1000FULL; - mii_rw(dev, np->phyaddr, MII_CTRL1000, adv); + mii_rw(dev, np->phyaddr, MII_1000BT_CR, adv); } bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); - bmcr &= ~(BMCR_ANENABLE|BMCR_SPEED100|BMCR_SPEED1000|BMCR_FULLDPLX); - if (np->fixed_mode & (ADVERTISE_10FULL|ADVERTISE_100FULL)) + bmcr |= ~(BMCR_ANENABLE|BMCR_SPEED100|BMCR_FULLDPLX); + if (adv & (ADVERTISE_10FULL|ADVERTISE_100FULL)) bmcr |= BMCR_FULLDPLX; - if (np->fixed_mode & (ADVERTISE_100HALF|ADVERTISE_100FULL)) + if (adv & (ADVERTISE_100HALF|ADVERTISE_100FULL)) bmcr |= BMCR_SPEED100; mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); - if (np->phy_oui == PHY_OUI_MARVELL) { - /* reset the phy */ - if (phy_reset(dev)) { - printk(KERN_INFO "%s: phy reset failed\n", dev->name); - return -EINVAL; - } - } else if (netif_running(dev)) { + + if (netif_running(dev)) { /* Wait a bit and then reconfigure the nic. */ udelay(10); nv_linkchange(dev); } } + spin_unlock_irq(&np->lock); - if (netif_running(dev)) { - nv_start_rx(dev); - nv_start_tx(dev); - nv_enable_irq(dev); - } - - return 0; -} - -#define FORCEDETH_REGS_VER 1 - -static int nv_get_regs_len(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - return np->register_size; -} - -static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - u32 *rbuf = buf; - int i; - - regs->version = FORCEDETH_REGS_VER; - spin_lock_irq(&np->lock); - for (i = 0;i <= np->register_size/sizeof(u32); i++) - rbuf[i] = readl(base + i*sizeof(u32)); - spin_unlock_irq(&np->lock); -} - -static int nv_nway_reset(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - int ret; - - if (np->autoneg) { - int bmcr; - - netif_carrier_off(dev); - if (netif_running(dev)) { - nv_disable_irq(dev); - netif_tx_lock_bh(dev); - spin_lock(&np->lock); - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - spin_unlock(&np->lock); - netif_tx_unlock_bh(dev); - printk(KERN_INFO "%s: link down.\n", dev->name); - } - - bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); - bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); - mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); - - if (netif_running(dev)) { - nv_start_rx(dev); - nv_start_tx(dev); - nv_enable_irq(dev); - } - ret = 0; - } else { - ret = -EINVAL; - } - - return ret; -} - -static int nv_set_tso(struct net_device *dev, u32 value) -{ - struct fe_priv *np = netdev_priv(dev); - - if ((np->driver_data & DEV_HAS_CHECKSUM)) - return ethtool_op_set_tso(dev, value); - else - return -EOPNOTSUPP; -} - -static void nv_get_ringparam(struct net_device *dev, struct ethtool_ringparam* ring) -{ - struct fe_priv *np = netdev_priv(dev); - - ring->rx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3; - ring->rx_mini_max_pending = 0; - ring->rx_jumbo_max_pending = 0; - ring->tx_max_pending = (np->desc_ver == DESC_VER_1) ? RING_MAX_DESC_VER_1 : RING_MAX_DESC_VER_2_3; - - ring->rx_pending = np->rx_ring_size; - ring->rx_mini_pending = 0; - ring->rx_jumbo_pending = 0; - ring->tx_pending = np->tx_ring_size; -} - -static int nv_set_ringparam(struct net_device *dev, struct ethtool_ringparam* ring) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - u8 *rxtx_ring, *rx_skbuff, *tx_skbuff, *rx_dma, *tx_dma, *tx_dma_len; - dma_addr_t ring_addr; - - if (ring->rx_pending < RX_RING_MIN || - ring->tx_pending < TX_RING_MIN || - ring->rx_mini_pending != 0 || - ring->rx_jumbo_pending != 0 || - (np->desc_ver == DESC_VER_1 && - (ring->rx_pending > RING_MAX_DESC_VER_1 || - ring->tx_pending > RING_MAX_DESC_VER_1)) || - (np->desc_ver != DESC_VER_1 && - (ring->rx_pending > RING_MAX_DESC_VER_2_3 || - ring->tx_pending > RING_MAX_DESC_VER_2_3))) { - return -EINVAL; - } - - /* allocate new rings */ - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - rxtx_ring = pci_alloc_consistent(np->pci_dev, - sizeof(struct ring_desc) * (ring->rx_pending + ring->tx_pending), - &ring_addr); - } else { - rxtx_ring = pci_alloc_consistent(np->pci_dev, - sizeof(struct ring_desc_ex) * (ring->rx_pending + ring->tx_pending), - &ring_addr); - } - rx_skbuff = kmalloc(sizeof(struct sk_buff*) * ring->rx_pending, GFP_KERNEL); - rx_dma = kmalloc(sizeof(dma_addr_t) * ring->rx_pending, GFP_KERNEL); - tx_skbuff = kmalloc(sizeof(struct sk_buff*) * ring->tx_pending, GFP_KERNEL); - tx_dma = kmalloc(sizeof(dma_addr_t) * ring->tx_pending, GFP_KERNEL); - tx_dma_len = kmalloc(sizeof(unsigned int) * ring->tx_pending, GFP_KERNEL); - if (!rxtx_ring || !rx_skbuff || !rx_dma || !tx_skbuff || !tx_dma || !tx_dma_len) { - /* fall back to old rings */ - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - if(rxtx_ring) - pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (ring->rx_pending + ring->tx_pending), - rxtx_ring, ring_addr); - } else { - if (rxtx_ring) - pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (ring->rx_pending + ring->tx_pending), - rxtx_ring, ring_addr); - } - if (rx_skbuff) - kfree(rx_skbuff); - if (rx_dma) - kfree(rx_dma); - if (tx_skbuff) - kfree(tx_skbuff); - if (tx_dma) - kfree(tx_dma); - if (tx_dma_len) - kfree(tx_dma_len); - goto exit; - } - - if (netif_running(dev)) { - nv_disable_irq(dev); - netif_tx_lock_bh(dev); - spin_lock(&np->lock); - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - nv_txrx_reset(dev); - /* drain queues */ - nv_drain_rx(dev); - nv_drain_tx(dev); - /* delete queues */ - free_rings(dev); - } - - /* set new values */ - np->rx_ring_size = ring->rx_pending; - np->tx_ring_size = ring->tx_pending; - np->tx_limit_stop = ring->tx_pending - TX_LIMIT_DIFFERENCE; - np->tx_limit_start = ring->tx_pending - TX_LIMIT_DIFFERENCE - 1; - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - np->rx_ring.orig = (struct ring_desc*)rxtx_ring; - np->tx_ring.orig = &np->rx_ring.orig[np->rx_ring_size]; - } else { - np->rx_ring.ex = (struct ring_desc_ex*)rxtx_ring; - np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size]; - } - np->rx_skbuff = (struct sk_buff**)rx_skbuff; - np->rx_dma = (dma_addr_t*)rx_dma; - np->tx_skbuff = (struct sk_buff**)tx_skbuff; - np->tx_dma = (dma_addr_t*)tx_dma; - np->tx_dma_len = (unsigned int*)tx_dma_len; - np->ring_addr = ring_addr; - - memset(np->rx_skbuff, 0, sizeof(struct sk_buff*) * np->rx_ring_size); - memset(np->rx_dma, 0, sizeof(dma_addr_t) * np->rx_ring_size); - memset(np->tx_skbuff, 0, sizeof(struct sk_buff*) * np->tx_ring_size); - memset(np->tx_dma, 0, sizeof(dma_addr_t) * np->tx_ring_size); - memset(np->tx_dma_len, 0, sizeof(unsigned int) * np->tx_ring_size); - - if (netif_running(dev)) { - /* reinit driver view of the queues */ - set_bufsize(dev); - if (nv_init_ring(dev)) { - if (!np->in_shutdown) - mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - } - - /* reinit nic view of the queues */ - writel(np->rx_buf_sz, base + NvRegOffloadConfig); - setup_hw_rings(dev, NV_SETUP_RX_RING | NV_SETUP_TX_RING); - writel( ((np->rx_ring_size-1) << NVREG_RINGSZ_RXSHIFT) + ((np->tx_ring_size-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - pci_push(base); - writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); - pci_push(base); - - /* restart engines */ - nv_start_rx(dev); - nv_start_tx(dev); - spin_unlock(&np->lock); - netif_tx_unlock_bh(dev); - nv_enable_irq(dev); - } - return 0; -exit: - return -ENOMEM; -} - -static void nv_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam* pause) -{ - struct fe_priv *np = netdev_priv(dev); - - pause->autoneg = (np->pause_flags & NV_PAUSEFRAME_AUTONEG) != 0; - pause->rx_pause = (np->pause_flags & NV_PAUSEFRAME_RX_ENABLE) != 0; - pause->tx_pause = (np->pause_flags & NV_PAUSEFRAME_TX_ENABLE) != 0; -} - -static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam* pause) -{ - struct fe_priv *np = netdev_priv(dev); - int adv, bmcr; - - if ((!np->autoneg && np->duplex == 0) || - (np->autoneg && !pause->autoneg && np->duplex == 0)) { - printk(KERN_INFO "%s: can not set pause settings when forced link is in half duplex.\n", - dev->name); - return -EINVAL; - } - if (pause->tx_pause && !(np->pause_flags & NV_PAUSEFRAME_TX_CAPABLE)) { - printk(KERN_INFO "%s: hardware does not support tx pause frames.\n", dev->name); - return -EINVAL; - } - - netif_carrier_off(dev); - if (netif_running(dev)) { - nv_disable_irq(dev); - netif_tx_lock_bh(dev); - spin_lock(&np->lock); - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - spin_unlock(&np->lock); - netif_tx_unlock_bh(dev); - } - - np->pause_flags &= ~(NV_PAUSEFRAME_RX_REQ|NV_PAUSEFRAME_TX_REQ); - if (pause->rx_pause) - np->pause_flags |= NV_PAUSEFRAME_RX_REQ; - if (pause->tx_pause) - np->pause_flags |= NV_PAUSEFRAME_TX_REQ; - - if (np->autoneg && pause->autoneg) { - np->pause_flags |= NV_PAUSEFRAME_AUTONEG; - - adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); - adv &= ~(ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); - if (np->pause_flags & NV_PAUSEFRAME_RX_REQ) /* for rx we set both advertisments but disable tx pause */ - adv |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; - if (np->pause_flags & NV_PAUSEFRAME_TX_REQ) - adv |= ADVERTISE_PAUSE_ASYM; - mii_rw(dev, np->phyaddr, MII_ADVERTISE, adv); - - if (netif_running(dev)) - printk(KERN_INFO "%s: link down.\n", dev->name); - bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); - bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); - mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); - } else { - np->pause_flags &= ~(NV_PAUSEFRAME_AUTONEG|NV_PAUSEFRAME_RX_ENABLE|NV_PAUSEFRAME_TX_ENABLE); - if (pause->rx_pause) - np->pause_flags |= NV_PAUSEFRAME_RX_ENABLE; - if (pause->tx_pause) - np->pause_flags |= NV_PAUSEFRAME_TX_ENABLE; - - if (!netif_running(dev)) - nv_update_linkspeed(dev); - else - nv_update_pause(dev, np->pause_flags); - } - - if (netif_running(dev)) { - nv_start_rx(dev); - nv_start_tx(dev); - nv_enable_irq(dev); - } - return 0; -} - -static u32 nv_get_rx_csum(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - return (np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) != 0; -} - -static int nv_set_rx_csum(struct net_device *dev, u32 data) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - int retcode = 0; - - if (np->driver_data & DEV_HAS_CHECKSUM) { - - if (((np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) && data) || - (!(np->txrxctl_bits & NVREG_TXRXCTL_RXCHECK) && !data)) { - /* already set or unset */ - return 0; - } - - if (data) { - np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; - } else if (!(np->vlanctl_bits & NVREG_VLANCONTROL_ENABLE)) { - np->txrxctl_bits &= ~NVREG_TXRXCTL_RXCHECK; - } else { - printk(KERN_INFO "Can not disable rx checksum if vlan is enabled\n"); - return -EINVAL; - } - - if (netif_running(dev)) { - spin_lock_irq(&np->lock); - writel(np->txrxctl_bits, base + NvRegTxRxControl); - spin_unlock_irq(&np->lock); - } - } else { - return -EINVAL; - } - - return retcode; -} - -static int nv_set_tx_csum(struct net_device *dev, u32 data) -{ - struct fe_priv *np = netdev_priv(dev); - - if (np->driver_data & DEV_HAS_CHECKSUM) - return ethtool_op_set_tx_hw_csum(dev, data); - else - return -EOPNOTSUPP; -} - -static int nv_set_sg(struct net_device *dev, u32 data) -{ - struct fe_priv *np = netdev_priv(dev); - - if (np->driver_data & DEV_HAS_CHECKSUM) - return ethtool_op_set_sg(dev, data); - else - return -EOPNOTSUPP; -} - -static int nv_get_stats_count(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - - if (np->driver_data & DEV_HAS_STATISTICS) - return (sizeof(struct nv_ethtool_stats)/sizeof(u64)); - else - return 0; -} - -static void nv_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *estats, u64 *buffer) -{ - struct fe_priv *np = netdev_priv(dev); - - /* update stats */ - nv_do_stats_poll((unsigned long)dev); - - memcpy(buffer, &np->estats, nv_get_stats_count(dev)*sizeof(u64)); -} - -static int nv_self_test_count(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - - if (np->driver_data & DEV_HAS_TEST_EXTENDED) - return NV_TEST_COUNT_EXTENDED; - else - return NV_TEST_COUNT_BASE; -} - -static int nv_link_test(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - int mii_status; - - mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - - /* check phy link status */ - if (!(mii_status & BMSR_LSTATUS)) - return 0; - else - return 1; -} - -static int nv_register_test(struct net_device *dev) -{ - u8 __iomem *base = get_hwbase(dev); - int i = 0; - u32 orig_read, new_read; - - do { - orig_read = readl(base + nv_registers_test[i].reg); - - /* xor with mask to toggle bits */ - orig_read ^= nv_registers_test[i].mask; - - writel(orig_read, base + nv_registers_test[i].reg); - - new_read = readl(base + nv_registers_test[i].reg); - - if ((new_read & nv_registers_test[i].mask) != (orig_read & nv_registers_test[i].mask)) - return 0; - - /* restore original value */ - orig_read ^= nv_registers_test[i].mask; - writel(orig_read, base + nv_registers_test[i].reg); - - } while (nv_registers_test[++i].reg != 0); - - return 1; -} - -static int nv_interrupt_test(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - int ret = 1; - int testcnt; - u32 save_msi_flags, save_poll_interval = 0; - - if (netif_running(dev)) { - /* free current irq */ - nv_free_irq(dev); - save_poll_interval = readl(base+NvRegPollingInterval); - } - - /* flag to test interrupt handler */ - np->intr_test = 0; - - /* setup test irq */ - save_msi_flags = np->msi_flags; - np->msi_flags &= ~NV_MSI_X_VECTORS_MASK; - np->msi_flags |= 0x001; /* setup 1 vector */ - if (nv_request_irq(dev, 1)) - return 0; - - /* setup timer interrupt */ - writel(NVREG_POLL_DEFAULT_CPU, base + NvRegPollingInterval); - writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); - - nv_enable_hw_interrupts(dev, NVREG_IRQ_TIMER); - - /* wait for at least one interrupt */ - msleep(100); - - spin_lock_irq(&np->lock); - - /* flag should be set within ISR */ - testcnt = np->intr_test; - if (!testcnt) - ret = 2; - - nv_disable_hw_interrupts(dev, NVREG_IRQ_TIMER); - if (!(np->msi_flags & NV_MSI_X_ENABLED)) - writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); - else - writel(NVREG_IRQSTAT_MASK, base + NvRegMSIXIrqStatus); - - spin_unlock_irq(&np->lock); - - nv_free_irq(dev); - - np->msi_flags = save_msi_flags; - - if (netif_running(dev)) { - writel(save_poll_interval, base + NvRegPollingInterval); - writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); - /* restore original irq */ - if (nv_request_irq(dev, 0)) - return 0; - } - - return ret; -} - -static int nv_loopback_test(struct net_device *dev) -{ - struct fe_priv *np = netdev_priv(dev); - u8 __iomem *base = get_hwbase(dev); - struct sk_buff *tx_skb, *rx_skb; - dma_addr_t test_dma_addr; - u32 tx_flags_extra = (np->desc_ver == DESC_VER_1 ? NV_TX_LASTPACKET : NV_TX2_LASTPACKET); - u32 Flags; - int len, i, pkt_len; - u8 *pkt_data; - u32 filter_flags = 0; - u32 misc1_flags = 0; - int ret = 1; - - if (netif_running(dev)) { - nv_disable_irq(dev); - filter_flags = readl(base + NvRegPacketFilterFlags); - misc1_flags = readl(base + NvRegMisc1); - } else { - nv_txrx_reset(dev); - } - - /* reinit driver view of the rx queue */ - set_bufsize(dev); - nv_init_ring(dev); - - /* setup hardware for loopback */ - writel(NVREG_MISC1_FORCE, base + NvRegMisc1); - writel(NVREG_PFF_ALWAYS | NVREG_PFF_LOOPBACK, base + NvRegPacketFilterFlags); - - /* reinit nic view of the rx queue */ - writel(np->rx_buf_sz, base + NvRegOffloadConfig); - setup_hw_rings(dev, NV_SETUP_RX_RING | NV_SETUP_TX_RING); - writel( ((np->rx_ring_size-1) << NVREG_RINGSZ_RXSHIFT) + ((np->tx_ring_size-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - pci_push(base); - - /* restart rx engine */ - nv_start_rx(dev); - nv_start_tx(dev); - - /* setup packet for tx */ - pkt_len = ETH_DATA_LEN; - tx_skb = dev_alloc_skb(pkt_len); - pkt_data = skb_put(tx_skb, pkt_len); - for (i = 0; i < pkt_len; i++) - pkt_data[i] = (u8)(i & 0xff); - test_dma_addr = pci_map_single(np->pci_dev, tx_skb->data, - tx_skb->end-tx_skb->data, PCI_DMA_FROMDEVICE); - - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - np->tx_ring.orig[0].PacketBuffer = cpu_to_le32(test_dma_addr); - np->tx_ring.orig[0].FlagLen = cpu_to_le32((pkt_len-1) | np->tx_flags | tx_flags_extra); - } else { - np->tx_ring.ex[0].PacketBufferHigh = cpu_to_le64(test_dma_addr) >> 32; - np->tx_ring.ex[0].PacketBufferLow = cpu_to_le64(test_dma_addr) & 0x0FFFFFFFF; - np->tx_ring.ex[0].FlagLen = cpu_to_le32((pkt_len-1) | np->tx_flags | tx_flags_extra); - } - writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); - pci_push(get_hwbase(dev)); - - msleep(500); - - /* check for rx of the packet */ - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { - Flags = le32_to_cpu(np->rx_ring.orig[0].FlagLen); - len = nv_descr_getlength(&np->rx_ring.orig[0], np->desc_ver); - - } else { - Flags = le32_to_cpu(np->rx_ring.ex[0].FlagLen); - len = nv_descr_getlength_ex(&np->rx_ring.ex[0], np->desc_ver); - } - - if (Flags & NV_RX_AVAIL) { - ret = 0; - } else if (np->desc_ver == DESC_VER_1) { - if (Flags & NV_RX_ERROR) - ret = 0; - } else { - if (Flags & NV_RX2_ERROR) { - ret = 0; - } - } - - if (ret) { - if (len != pkt_len) { - ret = 0; - dprintk(KERN_DEBUG "%s: loopback len mismatch %d vs %d\n", - dev->name, len, pkt_len); - } else { - rx_skb = np->rx_skbuff[0]; - for (i = 0; i < pkt_len; i++) { - if (rx_skb->data[i] != (u8)(i & 0xff)) { - ret = 0; - dprintk(KERN_DEBUG "%s: loopback pattern check failed on byte %d\n", - dev->name, i); - break; - } - } - } - } else { - dprintk(KERN_DEBUG "%s: loopback - did not receive test packet\n", dev->name); - } - - pci_unmap_page(np->pci_dev, test_dma_addr, - tx_skb->end-tx_skb->data, - PCI_DMA_TODEVICE); - dev_kfree_skb_any(tx_skb); - - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - nv_txrx_reset(dev); - /* drain rx queue */ - nv_drain_rx(dev); - nv_drain_tx(dev); + return 0; +} - if (netif_running(dev)) { - writel(misc1_flags, base + NvRegMisc1); - writel(filter_flags, base + NvRegPacketFilterFlags); - nv_enable_irq(dev); - } +#define FORCEDETH_REGS_VER 1 - return ret; +static int nv_get_regs_len(struct net_device *dev) +{ + struct fe_priv *np = netdev_priv(dev); + return np->register_size; } -static void nv_self_test(struct net_device *dev, struct ethtool_test *test, u64 *buffer) +static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf) { struct fe_priv *np = netdev_priv(dev); u8 __iomem *base = get_hwbase(dev); - int result; - memset(buffer, 0, nv_self_test_count(dev)*sizeof(u64)); - - if (!nv_link_test(dev)) { - test->flags |= ETH_TEST_FL_FAILED; - buffer[0] = 1; - } + u32 *rbuf = buf; + int i; - if (test->flags & ETH_TEST_FL_OFFLINE) { - if (netif_running(dev)) { - netif_stop_queue(dev); - netif_tx_lock_bh(dev); - spin_lock_irq(&np->lock); - nv_disable_hw_interrupts(dev, np->irqmask); - if (!(np->msi_flags & NV_MSI_X_ENABLED)) { - writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); - } else { - writel(NVREG_IRQSTAT_MASK, base + NvRegMSIXIrqStatus); - } - /* stop engines */ - nv_stop_rx(dev); - nv_stop_tx(dev); - nv_txrx_reset(dev); - /* drain rx queue */ - nv_drain_rx(dev); - nv_drain_tx(dev); - spin_unlock_irq(&np->lock); - netif_tx_unlock_bh(dev); - } + regs->version = FORCEDETH_REGS_VER; + spin_lock_irq(&np->lock); + for (i = 0;i <= np->register_size/sizeof(u32); i++) + rbuf[i] = readl(base + i*sizeof(u32)); + spin_unlock_irq(&np->lock); +} - if (!nv_register_test(dev)) { - test->flags |= ETH_TEST_FL_FAILED; - buffer[1] = 1; - } +static int nv_nway_reset(struct net_device *dev) +{ + struct fe_priv *np = netdev_priv(dev); + int ret; - result = nv_interrupt_test(dev); - if (result != 1) { - test->flags |= ETH_TEST_FL_FAILED; - buffer[2] = 1; - } - if (result == 0) { - /* bail out */ - return; - } + spin_lock_irq(&np->lock); + if (np->autoneg) { + int bmcr; - if (!nv_loopback_test(dev)) { - test->flags |= ETH_TEST_FL_FAILED; - buffer[3] = 1; - } + bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); + mii_rw(dev, np->phyaddr, MII_BMCR, bmcr); - if (netif_running(dev)) { - /* reinit driver view of the rx queue */ - set_bufsize(dev); - if (nv_init_ring(dev)) { - if (!np->in_shutdown) - mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - } - /* reinit nic view of the rx queue */ - writel(np->rx_buf_sz, base + NvRegOffloadConfig); - setup_hw_rings(dev, NV_SETUP_RX_RING | NV_SETUP_TX_RING); - writel( ((np->rx_ring_size-1) << NVREG_RINGSZ_RXSHIFT) + ((np->tx_ring_size-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - pci_push(base); - writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); - pci_push(base); - /* restart rx engine */ - nv_start_rx(dev); - nv_start_tx(dev); - netif_start_queue(dev); - nv_enable_hw_interrupts(dev, np->irqmask); - } + ret = 0; + } else { + ret = -EINVAL; } + spin_unlock_irq(&np->lock); + + return ret; } -static void nv_get_strings(struct net_device *dev, u32 stringset, u8 *buffer) +#ifdef NETIF_F_TSO +static int nv_set_tso(struct net_device *dev, u32 value) { - switch (stringset) { - case ETH_SS_STATS: - memcpy(buffer, &nv_estats_str, nv_get_stats_count(dev)*sizeof(struct nv_ethtool_str)); - break; - case ETH_SS_TEST: - memcpy(buffer, &nv_etests_str, nv_self_test_count(dev)*sizeof(struct nv_ethtool_str)); - break; - } + struct fe_priv *np = netdev_priv(dev); + + if ((np->driver_data & DEV_HAS_CHECKSUM)) + return ethtool_op_set_tso(dev, value); + else + return value ? -EOPNOTSUPP : 0; } +#endif static struct ethtool_ops ops = { .get_drvinfo = nv_get_drvinfo, @@ -3845,23 +2638,10 @@ static struct ethtool_ops ops = { .get_regs = nv_get_regs, .nway_reset = nv_nway_reset, .get_perm_addr = ethtool_op_get_perm_addr, +#ifdef NETIF_F_TSO .get_tso = ethtool_op_get_tso, - .set_tso = nv_set_tso, - .get_ringparam = nv_get_ringparam, - .set_ringparam = nv_set_ringparam, - .get_pauseparam = nv_get_pauseparam, - .set_pauseparam = nv_set_pauseparam, - .get_rx_csum = nv_get_rx_csum, - .set_rx_csum = nv_set_rx_csum, - .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = nv_set_tx_csum, - .get_sg = ethtool_op_get_sg, - .set_sg = nv_set_sg, - .get_strings = nv_get_strings, - .get_stats_count = nv_get_stats_count, - .get_ethtool_stats = nv_get_ethtool_stats, - .self_test_count = nv_self_test_count, - .self_test = nv_self_test, + .set_tso = nv_set_tso +#endif }; static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) @@ -3892,6 +2672,139 @@ static void nv_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) /* nothing to do */ }; +static void set_msix_vector_map(struct net_device *dev, u32 vector, u32 irqmask) +{ + u8 __iomem *base = get_hwbase(dev); + int i; + u32 msixmap = 0; + + /* Each interrupt bit can be mapped to a MSIX vector (4 bits). + * MSIXMap0 represents the first 8 interrupts and MSIXMap1 represents + * the remaining 8 interrupts. + */ + for (i = 0; i < 8; i++) { + if ((irqmask >> i) & 0x1) { + msixmap |= vector << (i << 2); + } + } + writel(readl(base + NvRegMSIXMap0) | msixmap, base + NvRegMSIXMap0); + + msixmap = 0; + for (i = 0; i < 8; i++) { + if ((irqmask >> (i + 8)) & 0x1) { + msixmap |= vector << (i << 2); + } + } + writel(readl(base + NvRegMSIXMap1) | msixmap, base + NvRegMSIXMap1); +} + +static int nv_request_irq(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u8 __iomem *base = get_hwbase(dev); + int ret = 1; + int i; + + if (np->msi_flags & NV_MSI_X_CAPABLE) { + for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) { + np->msi_x_entry[i].entry = i; + } + if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) { + np->msi_flags |= NV_MSI_X_ENABLED; + if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT) { + /* Request irq for rx handling */ + if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) { + printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); + pci_disable_msix(np->pci_dev); + np->msi_flags &= ~NV_MSI_X_ENABLED; + goto out_err; + } + /* Request irq for tx handling */ + if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) { + printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); + pci_disable_msix(np->pci_dev); + np->msi_flags &= ~NV_MSI_X_ENABLED; + goto out_free_rx; + } + /* Request irq for link and timer handling */ + if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) { + printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); + pci_disable_msix(np->pci_dev); + np->msi_flags &= ~NV_MSI_X_ENABLED; + goto out_free_tx; + } + /* map interrupts to their respective vector */ + writel(0, base + NvRegMSIXMap0); + writel(0, base + NvRegMSIXMap1); + set_msix_vector_map(dev, NV_MSI_X_VECTOR_RX, NVREG_IRQ_RX_ALL); + set_msix_vector_map(dev, NV_MSI_X_VECTOR_TX, NVREG_IRQ_TX_ALL); + set_msix_vector_map(dev, NV_MSI_X_VECTOR_OTHER, NVREG_IRQ_OTHER); + } else { + /* Request irq for all interrupts */ + if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) { + printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); + pci_disable_msix(np->pci_dev); + np->msi_flags &= ~NV_MSI_X_ENABLED; + goto out_err; + } + + /* map interrupts to vector 0 */ + writel(0, base + NvRegMSIXMap0); + writel(0, base + NvRegMSIXMap1); + } + } + } + if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { + if ((ret = pci_enable_msi(np->pci_dev)) == 0) { + np->msi_flags |= NV_MSI_ENABLED; + if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) { + printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); + pci_disable_msi(np->pci_dev); + np->msi_flags &= ~NV_MSI_ENABLED; + goto out_err; + } + + /* map interrupts to vector 0 */ + writel(0, base + NvRegMSIMap0); + writel(0, base + NvRegMSIMap1); + /* enable msi vector 0 */ + writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask); + } + } + if (ret != 0) { + if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) + goto out_err; + } + + return 0; +out_free_tx: + free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, dev); +out_free_rx: + free_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, dev); +out_err: + return 1; +} + +static void nv_free_irq(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + int i; + + if (np->msi_flags & NV_MSI_X_ENABLED) { + for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) { + free_irq(np->msi_x_entry[i].vector, dev); + } + pci_disable_msix(np->pci_dev); + np->msi_flags &= ~NV_MSI_X_ENABLED; + } else { + free_irq(np->pci_dev->irq, dev); + if (np->msi_flags & NV_MSI_ENABLED) { + pci_disable_msi(np->pci_dev); + np->msi_flags &= ~NV_MSI_ENABLED; + } + } +} + static int nv_open(struct net_device *dev) { struct fe_priv *np = netdev_priv(dev); @@ -3916,9 +2829,6 @@ static int nv_open(struct net_device *dev) writel(0, base + NvRegAdapterControl); - if (np->pause_flags & NV_PAUSEFRAME_TX_CAPABLE) - writel(NVREG_TX_PAUSEFRAME_DISABLE, base + NvRegTxPauseFrame); - /* 2) initialize descriptor rings */ set_bufsize(dev); oom = nv_init_ring(dev); @@ -3935,15 +2845,12 @@ static int nv_open(struct net_device *dev) /* 4) give hw rings */ setup_hw_rings(dev, NV_SETUP_RX_RING | NV_SETUP_TX_RING); - writel( ((np->rx_ring_size-1) << NVREG_RINGSZ_RXSHIFT) + ((np->tx_ring_size-1) << NVREG_RINGSZ_TXSHIFT), + writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), base + NvRegRingSizes); /* 5) continue setup */ writel(np->linkspeed, base + NvRegLinkSpeed); - if (np->desc_ver == DESC_VER_1) - writel(NVREG_TX_WM_DESC1_DEFAULT, base + NvRegTxWatermark); - else - writel(NVREG_TX_WM_DESC2_3_DEFAULT, base + NvRegTxWatermark); + writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); writel(np->txrxctl_bits, base + NvRegTxRxControl); writel(np->vlanctl_bits, base + NvRegVlanControl); pci_push(base); @@ -3965,8 +2872,8 @@ static int nv_open(struct net_device *dev) writel(readl(base + NvRegReceiverStatus), base + NvRegReceiverStatus); get_random_bytes(&i, sizeof(i)); writel(NVREG_RNDSEED_FORCE | (i&NVREG_RNDSEED_MASK), base + NvRegRandomSeed); - writel(NVREG_TX_DEFERRAL_DEFAULT, base + NvRegTxDeferral); - writel(NVREG_RX_DEFERRAL_DEFAULT, base + NvRegRxDeferral); + writel(NVREG_UNKSETUP1_VAL, base + NvRegUnknownSetupReg1); + writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); if (poll_interval == -1) { if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT) writel(NVREG_POLL_DEFAULT_THROUGHPUT, base + NvRegPollingInterval); @@ -3980,8 +2887,7 @@ static int nv_open(struct net_device *dev) base + NvRegAdapterControl); writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); - if (np->wolenabled) - writel(NVREG_WAKEUPFLAGS_ENABLE , base + NvRegWakeUpFlags); + writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); i = readl(base + NvRegPowerState); if ( (i & NVREG_POWERSTATE_POWEREDUP) == 0) @@ -3997,7 +2903,7 @@ static int nv_open(struct net_device *dev) writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); pci_push(base); - if (nv_request_irq(dev, 0)) { + if (nv_request_irq(dev)) { goto out_drain; } @@ -4034,11 +2940,6 @@ static int nv_open(struct net_device *dev) } if (oom) mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - - /* start statistics timer */ - if (np->driver_data & DEV_HAS_STATISTICS) - mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL); - spin_unlock_irq(&np->lock); return 0; @@ -4059,7 +2960,6 @@ static int nv_close(struct net_device *dev) del_timer_sync(&np->oom_kick); del_timer_sync(&np->nic_poll); - del_timer_sync(&np->stats_poll); netif_stop_queue(dev); spin_lock_irq(&np->lock); @@ -4119,9 +3019,6 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i init_timer(&np->nic_poll); np->nic_poll.data = (unsigned long) dev; np->nic_poll.function = &nv_do_nic_poll; /* timer handler */ - init_timer(&np->stats_poll); - np->stats_poll.data = (unsigned long) dev; - np->stats_poll.function = &nv_do_stats_poll; /* timer handler */ err = pci_enable_device(pci_dev); if (err) { @@ -4136,7 +3033,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i if (err < 0) goto out_disable; - if (id->driver_data & (DEV_HAS_VLAN|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL|DEV_HAS_STATISTICS)) + if (id->driver_data & (DEV_HAS_VLAN|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL)) np->register_size = NV_PCI_REGSZ_VER2; else np->register_size = NV_PCI_REGSZ_VER1; @@ -4168,18 +3065,16 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i /* packet format 3: supports 40-bit addressing */ np->desc_ver = DESC_VER_3; np->txrxctl_bits = NVREG_TXRXCTL_DESC_3; - if (dma_64bit) { - if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) { - printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n", - pci_name(pci_dev)); - } else { - dev->features |= NETIF_F_HIGHDMA; - printk(KERN_INFO "forcedeth: using HIGHDMA\n"); - } - if (pci_set_consistent_dma_mask(pci_dev, DMA_39BIT_MASK)) { - printk(KERN_INFO "forcedeth: 64-bit DMA (consistent) failed, using 32-bit ring buffers for device %s.\n", - pci_name(pci_dev)); - } + if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) { + printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n", + pci_name(pci_dev)); + } else { + dev->features |= NETIF_F_HIGHDMA; + printk(KERN_INFO "forcedeth: using HIGHDMA\n"); + } + if (pci_set_consistent_dma_mask(pci_dev, 0x0000007fffffffffULL)) { + printk(KERN_INFO "forcedeth: 64-bit DMA (consistent) failed for device %s.\n", + pci_name(pci_dev)); } } else if (id->driver_data & DEV_HAS_LARGEDESC) { /* packet format 2: supports jumbo frames */ @@ -4212,19 +3107,13 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i } np->msi_flags = 0; - if ((id->driver_data & DEV_HAS_MSI) && msi) { + if ((id->driver_data & DEV_HAS_MSI) && !disable_msi) { np->msi_flags |= NV_MSI_CAPABLE; } - if ((id->driver_data & DEV_HAS_MSI_X) && msix) { + if ((id->driver_data & DEV_HAS_MSI_X) && !disable_msix) { np->msi_flags |= NV_MSI_X_CAPABLE; } - np->pause_flags = NV_PAUSEFRAME_RX_CAPABLE | NV_PAUSEFRAME_RX_REQ | NV_PAUSEFRAME_AUTONEG; - if (id->driver_data & DEV_HAS_PAUSEFRAME_TX) { - np->pause_flags |= NV_PAUSEFRAME_TX_CAPABLE | NV_PAUSEFRAME_TX_REQ; - } - - err = -ENOMEM; np->base = ioremap(addr, np->register_size); if (!np->base) @@ -4233,38 +3122,21 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i dev->irq = pci_dev->irq; - np->rx_ring_size = RX_RING_DEFAULT; - np->tx_ring_size = TX_RING_DEFAULT; - np->tx_limit_stop = np->tx_ring_size - TX_LIMIT_DIFFERENCE; - np->tx_limit_start = np->tx_ring_size - TX_LIMIT_DIFFERENCE - 1; - if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { np->rx_ring.orig = pci_alloc_consistent(pci_dev, - sizeof(struct ring_desc) * (np->rx_ring_size + np->tx_ring_size), + sizeof(struct ring_desc) * (RX_RING + TX_RING), &np->ring_addr); if (!np->rx_ring.orig) goto out_unmap; - np->tx_ring.orig = &np->rx_ring.orig[np->rx_ring_size]; + np->tx_ring.orig = &np->rx_ring.orig[RX_RING]; } else { np->rx_ring.ex = pci_alloc_consistent(pci_dev, - sizeof(struct ring_desc_ex) * (np->rx_ring_size + np->tx_ring_size), + sizeof(struct ring_desc_ex) * (RX_RING + TX_RING), &np->ring_addr); if (!np->rx_ring.ex) goto out_unmap; - np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size]; + np->tx_ring.ex = &np->rx_ring.ex[RX_RING]; } - np->rx_skbuff = kmalloc(sizeof(struct sk_buff*) * np->rx_ring_size, GFP_KERNEL); - np->rx_dma = kmalloc(sizeof(dma_addr_t) * np->rx_ring_size, GFP_KERNEL); - np->tx_skbuff = kmalloc(sizeof(struct sk_buff*) * np->tx_ring_size, GFP_KERNEL); - np->tx_dma = kmalloc(sizeof(dma_addr_t) * np->tx_ring_size, GFP_KERNEL); - np->tx_dma_len = kmalloc(sizeof(unsigned int) * np->tx_ring_size, GFP_KERNEL); - if (!np->rx_skbuff || !np->rx_dma || !np->tx_skbuff || !np->tx_dma || !np->tx_dma_len) - goto out_freering; - memset(np->rx_skbuff, 0, sizeof(struct sk_buff*) * np->rx_ring_size); - memset(np->rx_dma, 0, sizeof(dma_addr_t) * np->rx_ring_size); - memset(np->tx_skbuff, 0, sizeof(struct sk_buff*) * np->tx_ring_size); - memset(np->tx_dma, 0, sizeof(dma_addr_t) * np->tx_ring_size); - memset(np->tx_dma_len, 0, sizeof(unsigned int) * np->tx_ring_size); dev->open = nv_open; dev->stop = nv_close; @@ -4386,9 +3258,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i if (i == 33) { printk(KERN_INFO "%s: open: Could not find a valid PHY.\n", pci_name(pci_dev)); - goto out_error; + goto out_freering; } - + /* reset it */ phy_init(dev); @@ -4400,7 +3272,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i err = register_netdev(dev); if (err) { printk(KERN_INFO "forcedeth: unable to register netdev: %d\n", err); - goto out_error; + goto out_freering; } printk(KERN_INFO "%s: forcedeth.c: subsystem: %05x:%04x bound to %s\n", dev->name, pci_dev->subsystem_vendor, pci_dev->subsystem_device, @@ -4408,10 +3280,14 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i return 0; -out_error: - pci_set_drvdata(pci_dev, NULL); out_freering: - free_rings(dev); + if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) + pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (RX_RING + TX_RING), + np->rx_ring.orig, np->ring_addr); + else + pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (RX_RING + TX_RING), + np->rx_ring.ex, np->ring_addr); + pci_set_drvdata(pci_dev, NULL); out_unmap: iounmap(get_hwbase(dev)); out_relreg: @@ -4427,11 +3303,15 @@ out: static void __devexit nv_remove(struct pci_dev *pci_dev) { struct net_device *dev = pci_get_drvdata(pci_dev); + struct fe_priv *np = netdev_priv(dev); unregister_netdev(dev); /* free all structures */ - free_rings(dev); + if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) + pci_free_consistent(np->pci_dev, sizeof(struct ring_desc) * (RX_RING + TX_RING), np->rx_ring.orig, np->ring_addr); + else + pci_free_consistent(np->pci_dev, sizeof(struct ring_desc_ex) * (RX_RING + TX_RING), np->rx_ring.ex, np->ring_addr); iounmap(get_hwbase(dev)); pci_release_regions(pci_dev); pci_disable_device(pci_dev); @@ -4439,50 +3319,6 @@ static void __devexit nv_remove(struct pci_dev *pci_dev) pci_set_drvdata(pci_dev, NULL); } - -#ifdef CONFIG_PM - -static int nv_suspend(struct pci_dev *pdev, pm_message_t state) -{ - struct net_device *dev = pci_get_drvdata(pdev); - struct fe_priv *np = netdev_priv(dev); - - if (!netif_running(dev)) - goto out; - - netif_device_detach(dev); - - // Gross. - nv_close(dev); - - pci_save_state(pdev); - pci_enable_wake(pdev, pci_choose_state(pdev, state), np->wolenabled); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); -out: - return 0; -} - -static int nv_resume(struct pci_dev *pdev) -{ - struct net_device *dev = pci_get_drvdata(pdev); - int rc = 0; - - if (!netif_running(dev)) - goto out; - - netif_device_attach(dev); - - pci_set_power_state(pdev, PCI_D0); - pci_restore_state(pdev); - pci_enable_wake(pdev, PCI_D0, 0); - - rc = nv_open(dev); -out: - return rc; -} - -#endif /* CONFIG_PM */ - static struct pci_device_id pci_tbl[] = { { /* nForce Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_1), @@ -4538,43 +3374,11 @@ static struct pci_device_id pci_tbl[] = { }, { /* MCP55 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_14), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_VLAN|DEV_HAS_MSI|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_VLAN|DEV_HAS_MSI|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL, }, { /* MCP55 Ethernet Controller */ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_15), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_VLAN|DEV_HAS_MSI|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP61 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_16), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP61 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_17), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP61 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_18), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP61 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_19), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP65 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_20), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP65 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_21), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP65 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_22), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, - }, - { /* MCP65 Ethernet Controller */ - PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_23), - .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS|DEV_HAS_TEST_EXTENDED, + .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_VLAN|DEV_HAS_MSI|DEV_HAS_MSI_X|DEV_HAS_POWER_CNTRL, }, {0,}, }; @@ -4584,10 +3388,6 @@ static struct pci_driver driver = { .id_table = pci_tbl, .probe = nv_probe, .remove = __devexit_p(nv_remove), -#ifdef CONFIG_PM - .suspend = nv_suspend, - .resume = nv_resume, -#endif }; @@ -4608,12 +3408,10 @@ module_param(optimization_mode, int, 0); MODULE_PARM_DESC(optimization_mode, "In throughput mode (0), every tx & rx packet will generate an interrupt. In CPU mode (1), interrupts are controlled by a timer."); module_param(poll_interval, int, 0); MODULE_PARM_DESC(poll_interval, "Interval determines how frequent timer interrupt is generated by [(time_in_micro_secs * 100) / (2^10)]. Min is 0 and Max is 65535."); -module_param(msi, int, 0); -MODULE_PARM_DESC(msi, "MSI interrupts are enabled by setting to 1 and disabled by setting to 0."); -module_param(msix, int, 0); -MODULE_PARM_DESC(msix, "MSIX interrupts are enabled by setting to 1 and disabled by setting to 0."); -module_param(dma_64bit, int, 0); -MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); +module_param(disable_msi, int, 0); +MODULE_PARM_DESC(disable_msi, "Disable MSI interrupts by setting to 1."); +module_param(disable_msix, int, 0); +MODULE_PARM_DESC(disable_msix, "Disable MSIX interrupts by setting to 1."); MODULE_AUTHOR("Manfred Spraul "); MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile index 02d4dc18b..d6dd3f2fb 100644 --- a/drivers/net/fs_enet/Makefile +++ b/drivers/net/fs_enet/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_FS_ENET) += fs_enet.o -obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o -obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o +obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o +obj-$(CONFIG_8260) += mac-fcc.o -fs_enet-objs := fs_enet-main.o +fs_enet-objs := fs_enet-main.o fs_enet-mii.o mii-bitbang.o mii-fixed.o diff --git a/drivers/net/fs_enet/fec.h b/drivers/net/fs_enet/fec.h deleted file mode 100644 index e980527e2..000000000 --- a/drivers/net/fs_enet/fec.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef FS_ENET_FEC_H -#define FS_ENET_FEC_H - -/* CRC polynomium used by the FEC for the multicast group filtering */ -#define FEC_CRC_POLY 0x04C11DB7 - -#define FEC_MAX_MULTICAST_ADDRS 64 - -/* Interrupt events/masks. -*/ -#define FEC_ENET_HBERR 0x80000000U /* Heartbeat error */ -#define FEC_ENET_BABR 0x40000000U /* Babbling receiver */ -#define FEC_ENET_BABT 0x20000000U /* Babbling transmitter */ -#define FEC_ENET_GRA 0x10000000U /* Graceful stop complete */ -#define FEC_ENET_TXF 0x08000000U /* Full frame transmitted */ -#define FEC_ENET_TXB 0x04000000U /* A buffer was transmitted */ -#define FEC_ENET_RXF 0x02000000U /* Full frame received */ -#define FEC_ENET_RXB 0x01000000U /* A buffer was received */ -#define FEC_ENET_MII 0x00800000U /* MII interrupt */ -#define FEC_ENET_EBERR 0x00400000U /* SDMA bus error */ - -#define FEC_ECNTRL_PINMUX 0x00000004 -#define FEC_ECNTRL_ETHER_EN 0x00000002 -#define FEC_ECNTRL_RESET 0x00000001 - -#define FEC_RCNTRL_BC_REJ 0x00000010 -#define FEC_RCNTRL_PROM 0x00000008 -#define FEC_RCNTRL_MII_MODE 0x00000004 -#define FEC_RCNTRL_DRT 0x00000002 -#define FEC_RCNTRL_LOOP 0x00000001 - -#define FEC_TCNTRL_FDEN 0x00000004 -#define FEC_TCNTRL_HBC 0x00000002 -#define FEC_TCNTRL_GTS 0x00000001 - - - -/* - * Delay to wait for FEC reset command to complete (in us) - */ -#define FEC_RESET_DELAY 50 -#endif diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index df62506a1..196298f33 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -15,6 +15,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include #include @@ -672,7 +672,7 @@ static int fs_request_irq(struct net_device *dev, int irq, const char *name, struct fs_enet_private *fep = netdev_priv(dev); (*fep->ops->pre_request_irq)(dev, irq); - return request_irq(irq, irqf, IRQF_SHARED, name, dev); + return request_irq(irq, irqf, SA_SHIRQ, name, dev); } static void fs_free_irq(struct net_device *dev, int irq) @@ -683,6 +683,35 @@ static void fs_free_irq(struct net_device *dev, int irq) (*fep->ops->post_free_irq)(dev, irq); } +/**********************************************************************************/ + +/* This interrupt occurs when the PHY detects a link change. */ +static irqreturn_t +fs_mii_link_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + struct net_device *dev = dev_id; + struct fs_enet_private *fep; + const struct fs_platform_info *fpi; + + fep = netdev_priv(dev); + fpi = fep->fpi; + + /* + * Acknowledge the interrupt if possible. If we have not + * found the PHY yet we can't process or acknowledge the + * interrupt now. Instead we ignore this interrupt for now, + * which we can do since it is edge triggered. It will be + * acknowledged later by fs_enet_open(). + */ + if (!fep->phy) + return IRQ_NONE; + + fs_mii_ack_int(dev); + fs_mii_link_status_change_check(dev, 0); + + return IRQ_HANDLED; +} + static void fs_timeout(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); @@ -694,13 +723,10 @@ static void fs_timeout(struct net_device *dev) spin_lock_irqsave(&fep->lock, flags); if (dev->flags & IFF_UP) { - phy_stop(fep->phydev); (*fep->ops->stop)(dev); (*fep->ops->restart)(dev); - phy_start(fep->phydev); } - phy_start(fep->phydev); wake = fep->tx_free && !(CBDR_SC(fep->cur_tx) & BD_ENET_TX_READY); spin_unlock_irqrestore(&fep->lock, flags); @@ -708,112 +734,35 @@ static void fs_timeout(struct net_device *dev) netif_wake_queue(dev); } -/*----------------------------------------------------------------------------- - * generic link-change handler - should be sufficient for most cases - *-----------------------------------------------------------------------------*/ -static void generic_adjust_link(struct net_device *dev) -{ - struct fs_enet_private *fep = netdev_priv(dev); - struct phy_device *phydev = fep->phydev; - int new_state = 0; - - if (phydev->link) { - - /* adjust to duplex mode */ - if (phydev->duplex != fep->oldduplex){ - new_state = 1; - fep->oldduplex = phydev->duplex; - } - - if (phydev->speed != fep->oldspeed) { - new_state = 1; - fep->oldspeed = phydev->speed; - } - - if (!fep->oldlink) { - new_state = 1; - fep->oldlink = 1; - netif_schedule(dev); - netif_carrier_on(dev); - netif_start_queue(dev); - } - - if (new_state) - fep->ops->restart(dev); - - } else if (fep->oldlink) { - new_state = 1; - fep->oldlink = 0; - fep->oldspeed = 0; - fep->oldduplex = -1; - netif_carrier_off(dev); - netif_stop_queue(dev); - } - - if (new_state && netif_msg_link(fep)) - phy_print_status(phydev); -} - - -static void fs_adjust_link(struct net_device *dev) -{ - struct fs_enet_private *fep = netdev_priv(dev); - unsigned long flags; - - spin_lock_irqsave(&fep->lock, flags); - - if(fep->ops->adjust_link) - fep->ops->adjust_link(dev); - else - generic_adjust_link(dev); - - spin_unlock_irqrestore(&fep->lock, flags); -} - -static int fs_init_phy(struct net_device *dev) -{ - struct fs_enet_private *fep = netdev_priv(dev); - struct phy_device *phydev; - - fep->oldlink = 0; - fep->oldspeed = 0; - fep->oldduplex = -1; - if(fep->fpi->bus_id) - phydev = phy_connect(dev, fep->fpi->bus_id, &fs_adjust_link, 0); - else { - printk("No phy bus ID specified in BSP code\n"); - return -EINVAL; - } - if (IS_ERR(phydev)) { - printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); - return PTR_ERR(phydev); - } - - fep->phydev = phydev; - - return 0; -} - - static int fs_enet_open(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); + const struct fs_platform_info *fpi = fep->fpi; int r; - int err; /* Install our interrupt handler. */ r = fs_request_irq(dev, fep->interrupt, "fs_enet-mac", fs_enet_interrupt); if (r != 0) { printk(KERN_ERR DRV_MODULE_NAME - ": %s Could not allocate FS_ENET IRQ!", dev->name); + ": %s Could not allocate FEC IRQ!", dev->name); return -EINVAL; } - err = fs_init_phy(dev); - if(err) - return err; + /* Install our phy interrupt handler */ + if (fpi->phy_irq != -1) { + + r = fs_request_irq(dev, fpi->phy_irq, "fs_enet-phy", fs_mii_link_interrupt); + if (r != 0) { + printk(KERN_ERR DRV_MODULE_NAME + ": %s Could not allocate PHY IRQ!", dev->name); + fs_free_irq(dev, fep->interrupt); + return -EINVAL; + } + } - phy_start(fep->phydev); + fs_mii_startup(dev); + netif_carrier_off(dev); + fs_mii_link_status_change_check(dev, 1); return 0; } @@ -821,19 +770,20 @@ static int fs_enet_open(struct net_device *dev) static int fs_enet_close(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); + const struct fs_platform_info *fpi = fep->fpi; unsigned long flags; netif_stop_queue(dev); netif_carrier_off(dev); - phy_stop(fep->phydev); + fs_mii_shutdown(dev); spin_lock_irqsave(&fep->lock, flags); (*fep->ops->stop)(dev); spin_unlock_irqrestore(&fep->lock, flags); /* release any irqs */ - phy_disconnect(fep->phydev); - fep->phydev = NULL; + if (fpi->phy_irq != -1) + fs_free_irq(dev, fpi->phy_irq); fs_free_irq(dev, fep->interrupt); return 0; @@ -881,19 +831,33 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs, static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct fs_enet_private *fep = netdev_priv(dev); - return phy_ethtool_gset(fep->phydev, cmd); + unsigned long flags; + int rc; + + spin_lock_irqsave(&fep->lock, flags); + rc = mii_ethtool_gset(&fep->mii_if, cmd); + spin_unlock_irqrestore(&fep->lock, flags); + + return rc; } static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct fs_enet_private *fep = netdev_priv(dev); - phy_ethtool_sset(fep->phydev, cmd); - return 0; + unsigned long flags; + int rc; + + spin_lock_irqsave(&fep->lock, flags); + rc = mii_ethtool_sset(&fep->mii_if, cmd); + spin_unlock_irqrestore(&fep->lock, flags); + + return rc; } static int fs_nway_reset(struct net_device *dev) { - return 0; + struct fs_enet_private *fep = netdev_priv(dev); + return mii_nway_restart(&fep->mii_if); } static u32 fs_get_msglevel(struct net_device *dev) @@ -935,7 +899,7 @@ static int fs_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) return -EINVAL; spin_lock_irqsave(&fep->lock, flags); - rc = phy_mii_ioctl(fep->phydev, mii, cmd); + rc = generic_mii_ioctl(&fep->mii_if, mii, cmd, NULL); spin_unlock_irqrestore(&fep->lock, flags); return rc; } @@ -1067,6 +1031,12 @@ static struct net_device *fs_init_instance(struct device *dev, } registered = 1; + err = fs_mii_connect(ndev); + if (err != 0) { + printk(KERN_ERR DRV_MODULE_NAME + ": %s fs_mii_connect failed.\n", ndev->name); + goto err; + } return ndev; @@ -1104,6 +1074,8 @@ static int fs_cleanup_instance(struct net_device *ndev) fpi = fep->fpi; + fs_mii_disconnect(ndev); + unregister_netdev(ndev); dma_free_coherent(fep->dev, (fpi->tx_ring + fpi->rx_ring) * sizeof(cbd_t), @@ -1225,39 +1197,17 @@ static int __init fs_init(void) r = setup_immap(); if (r != 0) return r; - -#ifdef CONFIG_FS_ENET_HAS_FCC - /* let's insert mii stuff */ - r = fs_enet_mdio_bb_init(); - - if (r != 0) { - printk(KERN_ERR DRV_MODULE_NAME - "BB PHY init failed.\n"); - return r; - } - r = driver_register(&fs_enet_fcc_driver); + r = driver_register(&fs_enet_fec_driver); if (r != 0) goto err; -#endif -#ifdef CONFIG_FS_ENET_HAS_FEC - r = fs_enet_mdio_fec_init(); - if (r != 0) { - printk(KERN_ERR DRV_MODULE_NAME - "FEC PHY init failed.\n"); - return r; - } - - r = driver_register(&fs_enet_fec_driver); + r = driver_register(&fs_enet_fcc_driver); if (r != 0) goto err; -#endif -#ifdef CONFIG_FS_ENET_HAS_SCC r = driver_register(&fs_enet_scc_driver); if (r != 0) goto err; -#endif return 0; err: diff --git a/drivers/net/fs_enet/fs_enet-mii.c b/drivers/net/fs_enet/fs_enet-mii.c new file mode 100644 index 000000000..c6770377e --- /dev/null +++ b/drivers/net/fs_enet/fs_enet-mii.c @@ -0,0 +1,507 @@ +/* + * Combined Ethernet driver for Motorola MPC8xx and MPC82xx. + * + * Copyright (c) 2003 Intracom S.A. + * by Pantelis Antoniou + * + * 2005 (c) MontaVista Software, Inc. + * Vitaly Bordug + * + * Heavily based on original FEC driver by Dan Malek + * and modifications by Joakim Tjernlund + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "fs_enet.h" + +/*************************************************/ + +/* + * Generic PHY support. + * Should work for all PHYs, but link change is detected by polling + */ + +static void generic_timer_callback(unsigned long data) +{ + struct net_device *dev = (struct net_device *)data; + struct fs_enet_private *fep = netdev_priv(dev); + + fep->phy_timer_list.expires = jiffies + HZ / 2; + + add_timer(&fep->phy_timer_list); + + fs_mii_link_status_change_check(dev, 0); +} + +static void generic_startup(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + fep->phy_timer_list.expires = jiffies + HZ / 2; /* every 500ms */ + fep->phy_timer_list.data = (unsigned long)dev; + fep->phy_timer_list.function = generic_timer_callback; + add_timer(&fep->phy_timer_list); +} + +static void generic_shutdown(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + del_timer_sync(&fep->phy_timer_list); +} + +/* ------------------------------------------------------------------------- */ +/* The Davicom DM9161 is used on the NETTA board */ + +/* register definitions */ + +#define MII_DM9161_ANAR 4 /* Aux. Config Register */ +#define MII_DM9161_ACR 16 /* Aux. Config Register */ +#define MII_DM9161_ACSR 17 /* Aux. Config/Status Register */ +#define MII_DM9161_10TCSR 18 /* 10BaseT Config/Status Reg. */ +#define MII_DM9161_INTR 21 /* Interrupt Register */ +#define MII_DM9161_RECR 22 /* Receive Error Counter Reg. */ +#define MII_DM9161_DISCR 23 /* Disconnect Counter Register */ + +static void dm9161_startup(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + fs_mii_write(dev, fep->mii_if.phy_id, MII_DM9161_INTR, 0x0000); + /* Start autonegotiation */ + fs_mii_write(dev, fep->mii_if.phy_id, MII_BMCR, 0x1200); + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ*8); +} + +static void dm9161_ack_int(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + fs_mii_read(dev, fep->mii_if.phy_id, MII_DM9161_INTR); +} + +static void dm9161_shutdown(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + fs_mii_write(dev, fep->mii_if.phy_id, MII_DM9161_INTR, 0x0f00); +} + +/**********************************************************************************/ + +static const struct phy_info phy_info[] = { + { + .id = 0x00181b88, + .name = "DM9161", + .startup = dm9161_startup, + .ack_int = dm9161_ack_int, + .shutdown = dm9161_shutdown, + }, { + .id = 0, + .name = "GENERIC", + .startup = generic_startup, + .shutdown = generic_shutdown, + }, +}; + +/**********************************************************************************/ + +static int phy_id_detect(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + const struct fs_platform_info *fpi = fep->fpi; + struct fs_enet_mii_bus *bus = fep->mii_bus; + int i, r, start, end, phytype, physubtype; + const struct phy_info *phy; + int phy_hwid, phy_id; + + phy_hwid = -1; + fep->phy = NULL; + + /* auto-detect? */ + if (fpi->phy_addr == -1) { + start = 1; + end = 32; + } else { /* direct */ + start = fpi->phy_addr; + end = start + 1; + } + + for (phy_id = start; phy_id < end; phy_id++) { + /* skip already used phy addresses on this bus */ + if (bus->usage_map & (1 << phy_id)) + continue; + r = fs_mii_read(dev, phy_id, MII_PHYSID1); + if (r == -1 || (phytype = (r & 0xffff)) == 0xffff) + continue; + r = fs_mii_read(dev, phy_id, MII_PHYSID2); + if (r == -1 || (physubtype = (r & 0xffff)) == 0xffff) + continue; + phy_hwid = (phytype << 16) | physubtype; + if (phy_hwid != -1) + break; + } + + if (phy_hwid == -1) { + printk(KERN_ERR DRV_MODULE_NAME + ": %s No PHY detected! range=0x%02x-0x%02x\n", + dev->name, start, end); + return -1; + } + + for (i = 0, phy = phy_info; i < ARRAY_SIZE(phy_info); i++, phy++) + if (phy->id == (phy_hwid >> 4) || phy->id == 0) + break; + + if (i >= ARRAY_SIZE(phy_info)) { + printk(KERN_ERR DRV_MODULE_NAME + ": %s PHY id 0x%08x is not supported!\n", + dev->name, phy_hwid); + return -1; + } + + fep->phy = phy; + + /* mark this address as used */ + bus->usage_map |= (1 << phy_id); + + printk(KERN_INFO DRV_MODULE_NAME + ": %s Phy @ 0x%x, type %s (0x%08x)%s\n", + dev->name, phy_id, fep->phy->name, phy_hwid, + fpi->phy_addr == -1 ? " (auto-detected)" : ""); + + return phy_id; +} + +void fs_mii_startup(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + if (fep->phy->startup) + (*fep->phy->startup) (dev); +} + +void fs_mii_shutdown(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + if (fep->phy->shutdown) + (*fep->phy->shutdown) (dev); +} + +void fs_mii_ack_int(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + + if (fep->phy->ack_int) + (*fep->phy->ack_int) (dev); +} + +#define MII_LINK 0x0001 +#define MII_HALF 0x0002 +#define MII_FULL 0x0004 +#define MII_BASE4 0x0008 +#define MII_10M 0x0010 +#define MII_100M 0x0020 +#define MII_1G 0x0040 +#define MII_10G 0x0080 + +/* return full mii info at one gulp, with a usable form */ +static unsigned int mii_full_status(struct mii_if_info *mii) +{ + unsigned int status; + int bmsr, adv, lpa, neg; + struct fs_enet_private* fep = netdev_priv(mii->dev); + + /* first, a dummy read, needed to latch some MII phys */ + (void)mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR); + bmsr = mii->mdio_read(mii->dev, mii->phy_id, MII_BMSR); + + /* no link */ + if ((bmsr & BMSR_LSTATUS) == 0) + return 0; + + status = MII_LINK; + + /* Lets look what ANEG says if it's supported - otherwize we shall + take the right values from the platform info*/ + if(!mii->force_media) { + /* autoneg not completed; don't bother */ + if ((bmsr & BMSR_ANEGCOMPLETE) == 0) + return 0; + + adv = (*mii->mdio_read)(mii->dev, mii->phy_id, MII_ADVERTISE); + lpa = (*mii->mdio_read)(mii->dev, mii->phy_id, MII_LPA); + + neg = lpa & adv; + } else { + neg = fep->fpi->bus_info->lpa; + } + + if (neg & LPA_100FULL) + status |= MII_FULL | MII_100M; + else if (neg & LPA_100BASE4) + status |= MII_FULL | MII_BASE4 | MII_100M; + else if (neg & LPA_100HALF) + status |= MII_HALF | MII_100M; + else if (neg & LPA_10FULL) + status |= MII_FULL | MII_10M; + else + status |= MII_HALF | MII_10M; + + return status; +} + +void fs_mii_link_status_change_check(struct net_device *dev, int init_media) +{ + struct fs_enet_private *fep = netdev_priv(dev); + struct mii_if_info *mii = &fep->mii_if; + unsigned int mii_status; + int ok_to_print, link, duplex, speed; + unsigned long flags; + + ok_to_print = netif_msg_link(fep); + + mii_status = mii_full_status(mii); + + if (!init_media && mii_status == fep->last_mii_status) + return; + + fep->last_mii_status = mii_status; + + link = !!(mii_status & MII_LINK); + duplex = !!(mii_status & MII_FULL); + speed = (mii_status & MII_100M) ? 100 : 10; + + if (link == 0) { + netif_carrier_off(mii->dev); + netif_stop_queue(dev); + if (!init_media) { + spin_lock_irqsave(&fep->lock, flags); + (*fep->ops->stop)(dev); + spin_unlock_irqrestore(&fep->lock, flags); + } + + if (ok_to_print) + printk(KERN_INFO "%s: link down\n", mii->dev->name); + + } else { + + mii->full_duplex = duplex; + + netif_carrier_on(mii->dev); + + spin_lock_irqsave(&fep->lock, flags); + fep->duplex = duplex; + fep->speed = speed; + (*fep->ops->restart)(dev); + spin_unlock_irqrestore(&fep->lock, flags); + + netif_start_queue(dev); + + if (ok_to_print) + printk(KERN_INFO "%s: link up, %dMbps, %s-duplex\n", + dev->name, speed, duplex ? "full" : "half"); + } +} + +/**********************************************************************************/ + +int fs_mii_read(struct net_device *dev, int phy_id, int location) +{ + struct fs_enet_private *fep = netdev_priv(dev); + struct fs_enet_mii_bus *bus = fep->mii_bus; + + unsigned long flags; + int ret; + + spin_lock_irqsave(&bus->mii_lock, flags); + ret = (*bus->mii_read)(bus, phy_id, location); + spin_unlock_irqrestore(&bus->mii_lock, flags); + + return ret; +} + +void fs_mii_write(struct net_device *dev, int phy_id, int location, int value) +{ + struct fs_enet_private *fep = netdev_priv(dev); + struct fs_enet_mii_bus *bus = fep->mii_bus; + unsigned long flags; + + spin_lock_irqsave(&bus->mii_lock, flags); + (*bus->mii_write)(bus, phy_id, location, value); + spin_unlock_irqrestore(&bus->mii_lock, flags); +} + +/*****************************************************************************/ + +/* list of all registered mii buses */ +static LIST_HEAD(fs_mii_bus_list); + +static struct fs_enet_mii_bus *lookup_bus(int method, int id) +{ + struct list_head *ptr; + struct fs_enet_mii_bus *bus; + + list_for_each(ptr, &fs_mii_bus_list) { + bus = list_entry(ptr, struct fs_enet_mii_bus, list); + if (bus->bus_info->method == method && + bus->bus_info->id == id) + return bus; + } + return NULL; +} + +static struct fs_enet_mii_bus *create_bus(const struct fs_mii_bus_info *bi) +{ + struct fs_enet_mii_bus *bus; + int ret = 0; + + bus = kmalloc(sizeof(*bus), GFP_KERNEL); + if (bus == NULL) { + ret = -ENOMEM; + goto err; + } + memset(bus, 0, sizeof(*bus)); + spin_lock_init(&bus->mii_lock); + bus->bus_info = bi; + bus->refs = 0; + bus->usage_map = 0; + + /* perform initialization */ + switch (bi->method) { + + case fsmii_fixed: + ret = fs_mii_fixed_init(bus); + if (ret != 0) + goto err; + break; + + case fsmii_bitbang: + ret = fs_mii_bitbang_init(bus); + if (ret != 0) + goto err; + break; +#ifdef CONFIG_FS_ENET_HAS_FEC + case fsmii_fec: + ret = fs_mii_fec_init(bus); + if (ret != 0) + goto err; + break; +#endif + default: + ret = -EINVAL; + goto err; + } + + list_add(&bus->list, &fs_mii_bus_list); + + return bus; + +err: + if (bus) + kfree(bus); + return ERR_PTR(ret); +} + +static void destroy_bus(struct fs_enet_mii_bus *bus) +{ + /* remove from bus list */ + list_del(&bus->list); + + /* nothing more needed */ + kfree(bus); +} + +int fs_mii_connect(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + const struct fs_platform_info *fpi = fep->fpi; + struct fs_enet_mii_bus *bus = NULL; + + /* check method validity */ + switch (fpi->bus_info->method) { + case fsmii_fixed: + case fsmii_bitbang: + break; +#ifdef CONFIG_FS_ENET_HAS_FEC + case fsmii_fec: + break; +#endif + default: + printk(KERN_ERR DRV_MODULE_NAME + ": %s Unknown MII bus method (%d)!\n", + dev->name, fpi->bus_info->method); + return -EINVAL; + } + + bus = lookup_bus(fpi->bus_info->method, fpi->bus_info->id); + + /* if not found create new bus */ + if (bus == NULL) { + bus = create_bus(fpi->bus_info); + if (IS_ERR(bus)) { + printk(KERN_ERR DRV_MODULE_NAME + ": %s MII bus creation failure!\n", dev->name); + return PTR_ERR(bus); + } + } + + bus->refs++; + + fep->mii_bus = bus; + + fep->mii_if.dev = dev; + fep->mii_if.phy_id_mask = 0x1f; + fep->mii_if.reg_num_mask = 0x1f; + fep->mii_if.mdio_read = fs_mii_read; + fep->mii_if.mdio_write = fs_mii_write; + fep->mii_if.force_media = fpi->bus_info->disable_aneg; + fep->mii_if.phy_id = phy_id_detect(dev); + + return 0; +} + +void fs_mii_disconnect(struct net_device *dev) +{ + struct fs_enet_private *fep = netdev_priv(dev); + struct fs_enet_mii_bus *bus = NULL; + + bus = fep->mii_bus; + fep->mii_bus = NULL; + + if (--bus->refs <= 0) + destroy_bus(bus); +} diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h index 95022c005..e7ec96c96 100644 --- a/drivers/net/fs_enet/fs_enet.h +++ b/drivers/net/fs_enet/fs_enet.h @@ -5,7 +5,6 @@ #include #include #include -#include #include @@ -13,30 +12,12 @@ #ifdef CONFIG_CPM1 #include - -struct fec_info { - fec_t* fecp; - u32 mii_speed; -}; #endif #ifdef CONFIG_CPM2 #include #endif -/* This is used to operate with pins. - Note that the actual port size may - be different; cpm(s) handle it OK */ -struct bb_info { - u8 mdio_dat_msk; - u8 mdio_dir_msk; - u8 *mdio_dir; - u8 *mdio_dat; - u8 mdc_msk; - u8 *mdc_dat; - int delay; -}; - /* hw driver ops */ struct fs_ops { int (*setup_data)(struct net_device *dev); @@ -44,7 +25,6 @@ struct fs_ops { void (*free_bd)(struct net_device *dev); void (*cleanup_data)(struct net_device *dev); void (*set_multicast_list)(struct net_device *dev); - void (*adjust_link)(struct net_device *dev); void (*restart)(struct net_device *dev); void (*stop)(struct net_device *dev); void (*pre_request_irq)(struct net_device *dev, int irq); @@ -120,6 +100,10 @@ struct fs_enet_mii_bus { }; }; +int fs_mii_bitbang_init(struct fs_enet_mii_bus *bus); +int fs_mii_fixed_init(struct fs_enet_mii_bus *bus); +int fs_mii_fec_init(struct fs_enet_mii_bus *bus); + struct fs_enet_private { struct device *dev; /* pointer back to the device (must be initialized first) */ spinlock_t lock; /* during all ops except TX pckt processing */ @@ -146,8 +130,7 @@ struct fs_enet_private { struct fs_enet_mii_bus *mii_bus; int interrupt; - struct phy_device *phydev; - int oldduplex, oldspeed, oldlink; /* current settings */ + int duplex, speed; /* current settings */ /* event masks */ u32 ev_napi_rx; /* mask of NAPI rx events */ @@ -185,9 +168,15 @@ struct fs_enet_private { }; /***************************************************************************/ -int fs_enet_mdio_bb_init(void); -int fs_mii_fixed_init(struct fs_enet_mii_bus *bus); -int fs_enet_mdio_fec_init(void); + +int fs_mii_read(struct net_device *dev, int phy_id, int location); +void fs_mii_write(struct net_device *dev, int phy_id, int location, int value); + +void fs_mii_startup(struct net_device *dev); +void fs_mii_shutdown(struct net_device *dev); +void fs_mii_ack_int(struct net_device *dev); + +void fs_mii_link_status_change_check(struct net_device *dev, int init_media); void fs_init_bds(struct net_device *dev); void fs_cleanup_bds(struct net_device *dev); @@ -205,6 +194,7 @@ int fs_enet_platform_init(void); void fs_enet_platform_cleanup(void); /***************************************************************************/ + /* buffer descriptor access macros */ /* access macros */ diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 1ff2597b8..95e2bb8dd 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c @@ -12,6 +12,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include @@ -123,32 +123,22 @@ static int do_pd_setup(struct fs_enet_private *fep) /* Attach the memory for the FCC Parameter RAM */ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_pram"); - fep->fcc.ep = (void *)ioremap(r->start, r->end - r->start + 1); + fep->fcc.ep = (void *)r->start; + if (fep->fcc.ep == NULL) return -EINVAL; r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_regs"); - fep->fcc.fccp = (void *)ioremap(r->start, r->end - r->start + 1); + fep->fcc.fccp = (void *)r->start; + if (fep->fcc.fccp == NULL) return -EINVAL; - if (fep->fpi->fcc_regs_c) { - - fep->fcc.fcccp = (void *)fep->fpi->fcc_regs_c; - } else { - r = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "fcc_regs_c"); - fep->fcc.fcccp = (void *)ioremap(r->start, - r->end - r->start + 1); - } + fep->fcc.fcccp = (void *)fep->fpi->fcc_regs_c; if (fep->fcc.fcccp == NULL) return -EINVAL; - fep->fcc.mem = (void *)fep->fpi->mem_offset; - if (fep->fcc.mem == NULL) - return -EINVAL; - return 0; } @@ -166,6 +156,8 @@ static int setup_data(struct net_device *dev) if ((unsigned int)fep->fcc.idx >= 3) /* max 3 FCCs */ return -EINVAL; + fep->fcc.mem = (void *)fpi->mem_offset; + if (do_pd_setup(fep) != 0) return -EINVAL; @@ -403,7 +395,7 @@ static void restart(struct net_device *dev) /* adjust to speed (for RMII mode) */ if (fpi->use_rmii) { - if (fep->phydev->speed == 100) + if (fep->speed == 100) C8(fcccp, fcc_gfemr, 0x20); else S8(fcccp, fcc_gfemr, 0x20); @@ -429,7 +421,7 @@ static void restart(struct net_device *dev) S32(fccp, fcc_fpsmr, FCC_PSMR_RMII); /* adjust to duplex mode */ - if (fep->phydev->duplex) + if (fep->duplex) S32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB); else C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB); @@ -495,10 +487,7 @@ static void rx_bd_done(struct net_device *dev) static void tx_kickstart(struct net_device *dev) { - struct fs_enet_private *fep = netdev_priv(dev); - fcc_t *fccp = fep->fcc.fccp; - - S32(fccp, fcc_ftodr, 0x80); + /* nothing */ } static u32 get_int_events(struct net_device *dev) diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index c2c5fd419..3dad69dfd 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c @@ -12,6 +12,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -46,7 +47,6 @@ #endif #include "fs_enet.h" -#include "fec.h" /*************************************************/ @@ -76,8 +76,50 @@ /* clear bits */ #define FC(_fecp, _reg, _v) FW(_fecp, _reg, FR(_fecp, _reg) & ~(_v)) + +/* CRC polynomium used by the FEC for the multicast group filtering */ +#define FEC_CRC_POLY 0x04C11DB7 + +#define FEC_MAX_MULTICAST_ADDRS 64 + +/* Interrupt events/masks. +*/ +#define FEC_ENET_HBERR 0x80000000U /* Heartbeat error */ +#define FEC_ENET_BABR 0x40000000U /* Babbling receiver */ +#define FEC_ENET_BABT 0x20000000U /* Babbling transmitter */ +#define FEC_ENET_GRA 0x10000000U /* Graceful stop complete */ +#define FEC_ENET_TXF 0x08000000U /* Full frame transmitted */ +#define FEC_ENET_TXB 0x04000000U /* A buffer was transmitted */ +#define FEC_ENET_RXF 0x02000000U /* Full frame received */ +#define FEC_ENET_RXB 0x01000000U /* A buffer was received */ +#define FEC_ENET_MII 0x00800000U /* MII interrupt */ +#define FEC_ENET_EBERR 0x00400000U /* SDMA bus error */ + +#define FEC_ECNTRL_PINMUX 0x00000004 +#define FEC_ECNTRL_ETHER_EN 0x00000002 +#define FEC_ECNTRL_RESET 0x00000001 + +#define FEC_RCNTRL_BC_REJ 0x00000010 +#define FEC_RCNTRL_PROM 0x00000008 +#define FEC_RCNTRL_MII_MODE 0x00000004 +#define FEC_RCNTRL_DRT 0x00000002 +#define FEC_RCNTRL_LOOP 0x00000001 + +#define FEC_TCNTRL_FDEN 0x00000004 +#define FEC_TCNTRL_HBC 0x00000002 +#define FEC_TCNTRL_GTS 0x00000001 + + +/* Make MII read/write commands for the FEC. +*/ +#define mk_mii_read(REG) (0x60020000 | ((REG & 0x1f) << 18)) +#define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | (VAL & 0xffff)) +#define mk_mii_end 0 + +#define FEC_MII_LOOPS 10000 + /* - * Delay to wait for FEC reset command to complete (in us) + * Delay to wait for FEC reset command to complete (in us) */ #define FEC_RESET_DELAY 50 @@ -262,15 +304,13 @@ static void restart(struct net_device *dev) int r; u32 addrhi, addrlo; - struct mii_bus* mii = fep->phydev->bus; - struct fec_info* fec_inf = mii->priv; - r = whack_reset(fep->fec.fecp); if (r != 0) printk(KERN_ERR DRV_MODULE_NAME ": %s FEC Reset FAILED!\n", dev->name); + /* - * Set station address. + * Set station address. */ addrhi = ((u32) dev->dev_addr[0] << 24) | ((u32) dev->dev_addr[1] << 16) | @@ -311,12 +351,12 @@ static void restart(struct net_device *dev) FW(fecp, fun_code, 0x78000000); /* - * Set MII speed. + * Set MII speed. */ - FW(fecp, mii_speed, fec_inf->mii_speed); + FW(fecp, mii_speed, fep->mii_bus->fec.mii_speed); /* - * Clear any outstanding interrupt. + * Clear any outstanding interrupt. */ FW(fecp, ievent, 0xffc0); FW(fecp, ivec, (fep->interrupt / 2) << 29); @@ -351,12 +391,11 @@ static void restart(struct net_device *dev) } #endif - FW(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ /* - * adjust to duplex mode + * adjust to duplex mode */ - if (fep->phydev->duplex) { + if (fep->duplex) { FC(fecp, r_cntrl, FEC_RCNTRL_DRT); FS(fecp, x_cntrl, FEC_TCNTRL_FDEN); /* FD enable */ } else { @@ -380,11 +419,9 @@ static void restart(struct net_device *dev) static void stop(struct net_device *dev) { struct fs_enet_private *fep = netdev_priv(dev); - const struct fs_platform_info *fpi = fep->fpi; fec_t *fecp = fep->fec.fecp; - - struct fec_info* feci= fep->phydev->bus->priv; - + struct fs_enet_mii_bus *bus = fep->mii_bus; + const struct fs_mii_bus_info *bi = bus->bus_info; int i; if ((FR(fecp, ecntrl) & FEC_ECNTRL_ETHER_EN) == 0) @@ -408,11 +445,11 @@ static void stop(struct net_device *dev) fs_cleanup_bds(dev); /* shut down FEC1? that's where the mii bus is */ - if (fpi->has_phy) { + if (fep->fec.idx == 0 && bus->refs > 1 && bi->method == fsmii_fec) { FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); FW(fecp, ievent, FEC_ENET_MII); - FW(fecp, mii_speed, feci->mii_speed); + FW(fecp, mii_speed, bus->fec.mii_speed); } } @@ -547,3 +584,73 @@ const struct fs_ops fs_fec_ops = { .free_bd = free_bd, }; +/***********************************************************************/ + +static int mii_read(struct fs_enet_mii_bus *bus, int phy_id, int location) +{ + fec_t *fecp = bus->fec.fecp; + int i, ret = -1; + + if ((FR(fecp, r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) + BUG(); + + /* Add PHY address to register command. */ + FW(fecp, mii_data, (phy_id << 23) | mk_mii_read(location)); + + for (i = 0; i < FEC_MII_LOOPS; i++) + if ((FR(fecp, ievent) & FEC_ENET_MII) != 0) + break; + + if (i < FEC_MII_LOOPS) { + FW(fecp, ievent, FEC_ENET_MII); + ret = FR(fecp, mii_data) & 0xffff; + } + + return ret; +} + +static void mii_write(struct fs_enet_mii_bus *bus, int phy_id, int location, int value) +{ + fec_t *fecp = bus->fec.fecp; + int i; + + /* this must never happen */ + if ((FR(fecp, r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) + BUG(); + + /* Add PHY address to register command. */ + FW(fecp, mii_data, (phy_id << 23) | mk_mii_write(location, value)); + + for (i = 0; i < FEC_MII_LOOPS; i++) + if ((FR(fecp, ievent) & FEC_ENET_MII) != 0) + break; + + if (i < FEC_MII_LOOPS) + FW(fecp, ievent, FEC_ENET_MII); +} + +int fs_mii_fec_init(struct fs_enet_mii_bus *bus) +{ + bd_t *bd = (bd_t *)__res; + const struct fs_mii_bus_info *bi = bus->bus_info; + fec_t *fecp; + + if (bi->id != 0) + return -1; + + bus->fec.fecp = &((immap_t *)fs_enet_immap)->im_cpm.cp_fec; + bus->fec.mii_speed = ((((bd->bi_intfreq + 4999999) / 2500000) / 2) + & 0x3F) << 1; + + fecp = bus->fec.fecp; + + FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ + FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); + FW(fecp, ievent, FEC_ENET_MII); + FW(fecp, mii_speed, bus->fec.mii_speed); + + bus->mii_read = mii_read; + bus->mii_write = mii_write; + + return 0; +} diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 95ec5872c..a772b286f 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c @@ -12,6 +12,7 @@ * kind, whether express or implied. */ +#include #include #include #include @@ -369,7 +370,7 @@ static void restart(struct net_device *dev) W16(sccp, scc_psmr, SCC_PSMR_ENCRC | SCC_PSMR_NIB22); /* Set full duplex mode if needed */ - if (fep->phydev->duplex) + if (fep->duplex) S16(sccp, scc_psmr, SCC_PSMR_LPB | SCC_PSMR_FDE); S32(sccp, scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); @@ -500,8 +501,6 @@ static void tx_restart(struct net_device *dev) scc_cr_cmd(fep, CPM_CR_RESTART_TX); } - - /*************************************************************************/ const struct fs_ops fs_scc_ops = { diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 0b9b8b5c8..24a5e2e23 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c @@ -13,6 +13,7 @@ */ +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include @@ -41,25 +41,129 @@ #include "fs_enet.h" -static int bitbang_prep_bit(u8 **datp, u8 *mskp, - struct fs_mii_bit *mii_bit) +#ifdef CONFIG_8xx +static int bitbang_prep_bit(u8 **dirp, u8 **datp, u8 *mskp, int port, int bit) { - void *dat; + immap_t *im = (immap_t *)fs_enet_immap; + void *dir, *dat, *ppar; int adv; u8 msk; - dat = (void*) mii_bit->offset; + switch (port) { + case fsiop_porta: + dir = &im->im_ioport.iop_padir; + dat = &im->im_ioport.iop_padat; + ppar = &im->im_ioport.iop_papar; + break; + + case fsiop_portb: + dir = &im->im_cpm.cp_pbdir; + dat = &im->im_cpm.cp_pbdat; + ppar = &im->im_cpm.cp_pbpar; + break; + + case fsiop_portc: + dir = &im->im_ioport.iop_pcdir; + dat = &im->im_ioport.iop_pcdat; + ppar = &im->im_ioport.iop_pcpar; + break; + + case fsiop_portd: + dir = &im->im_ioport.iop_pddir; + dat = &im->im_ioport.iop_pddat; + ppar = &im->im_ioport.iop_pdpar; + break; + + case fsiop_porte: + dir = &im->im_cpm.cp_pedir; + dat = &im->im_cpm.cp_pedat; + ppar = &im->im_cpm.cp_pepar; + break; + + default: + printk(KERN_ERR DRV_MODULE_NAME + "Illegal port value %d!\n", port); + return -EINVAL; + } + + adv = bit >> 3; + dir = (char *)dir + adv; + dat = (char *)dat + adv; + ppar = (char *)ppar + adv; + + msk = 1 << (7 - (bit & 7)); + if ((in_8(ppar) & msk) != 0) { + printk(KERN_ERR DRV_MODULE_NAME + "pin %d on port %d is not general purpose!\n", bit, port); + return -EINVAL; + } + + *dirp = dir; + *datp = dat; + *mskp = msk; + + return 0; +} +#endif + +#ifdef CONFIG_8260 +static int bitbang_prep_bit(u8 **dirp, u8 **datp, u8 *mskp, int port, int bit) +{ + iop_cpm2_t *io = &((cpm2_map_t *)fs_enet_immap)->im_ioport; + void *dir, *dat, *ppar; + int adv; + u8 msk; + + switch (port) { + case fsiop_porta: + dir = &io->iop_pdira; + dat = &io->iop_pdata; + ppar = &io->iop_ppara; + break; + + case fsiop_portb: + dir = &io->iop_pdirb; + dat = &io->iop_pdatb; + ppar = &io->iop_pparb; + break; + + case fsiop_portc: + dir = &io->iop_pdirc; + dat = &io->iop_pdatc; + ppar = &io->iop_pparc; + break; + + case fsiop_portd: + dir = &io->iop_pdird; + dat = &io->iop_pdatd; + ppar = &io->iop_ppard; + break; + + default: + printk(KERN_ERR DRV_MODULE_NAME + "Illegal port value %d!\n", port); + return -EINVAL; + } - adv = mii_bit->bit >> 3; + adv = bit >> 3; + dir = (char *)dir + adv; dat = (char *)dat + adv; + ppar = (char *)ppar + adv; - msk = 1 << (7 - (mii_bit->bit & 7)); + msk = 1 << (7 - (bit & 7)); + if ((in_8(ppar) & msk) != 0) { + printk(KERN_ERR DRV_MODULE_NAME + "pin %d on port %d is not general purpose!\n", bit, port); + return -EINVAL; + } + *dirp = dir; *datp = dat; *mskp = msk; return 0; } +#endif static inline void bb_set(u8 *p, u8 m) { @@ -76,44 +180,44 @@ static inline int bb_read(u8 *p, u8 m) return (in_8(p) & m) != 0; } -static inline void mdio_active(struct bb_info *bitbang) +static inline void mdio_active(struct fs_enet_mii_bus *bus) { - bb_set(bitbang->mdio_dir, bitbang->mdio_dir_msk); + bb_set(bus->bitbang.mdio_dir, bus->bitbang.mdio_msk); } -static inline void mdio_tristate(struct bb_info *bitbang ) +static inline void mdio_tristate(struct fs_enet_mii_bus *bus) { - bb_clr(bitbang->mdio_dir, bitbang->mdio_dir_msk); + bb_clr(bus->bitbang.mdio_dir, bus->bitbang.mdio_msk); } -static inline int mdio_read(struct bb_info *bitbang ) +static inline int mdio_read(struct fs_enet_mii_bus *bus) { - return bb_read(bitbang->mdio_dat, bitbang->mdio_dat_msk); + return bb_read(bus->bitbang.mdio_dat, bus->bitbang.mdio_msk); } -static inline void mdio(struct bb_info *bitbang , int what) +static inline void mdio(struct fs_enet_mii_bus *bus, int what) { if (what) - bb_set(bitbang->mdio_dat, bitbang->mdio_dat_msk); + bb_set(bus->bitbang.mdio_dat, bus->bitbang.mdio_msk); else - bb_clr(bitbang->mdio_dat, bitbang->mdio_dat_msk); + bb_clr(bus->bitbang.mdio_dat, bus->bitbang.mdio_msk); } -static inline void mdc(struct bb_info *bitbang , int what) +static inline void mdc(struct fs_enet_mii_bus *bus, int what) { if (what) - bb_set(bitbang->mdc_dat, bitbang->mdc_msk); + bb_set(bus->bitbang.mdc_dat, bus->bitbang.mdc_msk); else - bb_clr(bitbang->mdc_dat, bitbang->mdc_msk); + bb_clr(bus->bitbang.mdc_dat, bus->bitbang.mdc_msk); } -static inline void mii_delay(struct bb_info *bitbang ) +static inline void mii_delay(struct fs_enet_mii_bus *bus) { - udelay(bitbang->delay); + udelay(bus->bus_info->i.bitbang.delay); } /* Utility to send the preamble, address, and register (common to read and write). */ -static void bitbang_pre(struct bb_info *bitbang , int read, u8 addr, u8 reg) +static void bitbang_pre(struct fs_enet_mii_bus *bus, int read, u8 addr, u8 reg) { int j; @@ -125,284 +229,177 @@ static void bitbang_pre(struct bb_info *bitbang , int read, u8 addr, u8 reg) * but it is safer and will be much more robust. */ - mdio_active(bitbang); - mdio(bitbang, 1); + mdio_active(bus); + mdio(bus, 1); for (j = 0; j < 32; j++) { - mdc(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); } /* send the start bit (01) and the read opcode (10) or write (10) */ - mdc(bitbang, 0); - mdio(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 0); - mdio(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 0); - mdio(bitbang, read); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 0); - mdio(bitbang, !read); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); + mdc(bus, 0); + mdio(bus, 1); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); + mdc(bus, 0); + mdio(bus, read); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); + mdc(bus, 0); + mdio(bus, !read); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); /* send the PHY address */ for (j = 0; j < 5; j++) { - mdc(bitbang, 0); - mdio(bitbang, (addr & 0x10) != 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio(bus, (addr & 0x10) != 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); addr <<= 1; } /* send the register address */ for (j = 0; j < 5; j++) { - mdc(bitbang, 0); - mdio(bitbang, (reg & 0x10) != 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio(bus, (reg & 0x10) != 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); reg <<= 1; } } -static int fs_enet_mii_bb_read(struct mii_bus *bus , int phy_id, int location) +static int mii_read(struct fs_enet_mii_bus *bus, int phy_id, int location) { u16 rdreg; int ret, j; u8 addr = phy_id & 0xff; u8 reg = location & 0xff; - struct bb_info* bitbang = bus->priv; - bitbang_pre(bitbang, 1, addr, reg); + bitbang_pre(bus, 1, addr, reg); /* tri-state our MDIO I/O pin so we can read */ - mdc(bitbang, 0); - mdio_tristate(bitbang); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio_tristate(bus); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); /* check the turnaround bit: the PHY should be driving it to zero */ - if (mdio_read(bitbang) != 0) { + if (mdio_read(bus) != 0) { /* PHY didn't drive TA low */ for (j = 0; j < 32; j++) { - mdc(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); } ret = -1; goto out; } - mdc(bitbang, 0); - mii_delay(bitbang); + mdc(bus, 0); + mii_delay(bus); /* read 16 bits of register data, MSB first */ rdreg = 0; for (j = 0; j < 16; j++) { - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 1); + mii_delay(bus); rdreg <<= 1; - rdreg |= mdio_read(bitbang); - mdc(bitbang, 0); - mii_delay(bitbang); + rdreg |= mdio_read(bus); + mdc(bus, 0); + mii_delay(bus); } - mdc(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 1); + mii_delay(bus); + mdc(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); ret = rdreg; out: return ret; } -static int fs_enet_mii_bb_write(struct mii_bus *bus, int phy_id, int location, u16 val) +static void mii_write(struct fs_enet_mii_bus *bus, int phy_id, int location, int val) { int j; - struct bb_info* bitbang = bus->priv; - u8 addr = phy_id & 0xff; u8 reg = location & 0xff; u16 value = val & 0xffff; - bitbang_pre(bitbang, 0, addr, reg); + bitbang_pre(bus, 0, addr, reg); /* send the turnaround (10) */ - mdc(bitbang, 0); - mdio(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); - mdc(bitbang, 0); - mdio(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio(bus, 1); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); + mdc(bus, 0); + mdio(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); /* write 16 bits of register data, MSB first */ for (j = 0; j < 16; j++) { - mdc(bitbang, 0); - mdio(bitbang, (value & 0x8000) != 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); + mdc(bus, 0); + mdio(bus, (value & 0x8000) != 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); value <<= 1; } /* * Tri-state the MDIO line. */ - mdio_tristate(bitbang); - mdc(bitbang, 0); - mii_delay(bitbang); - mdc(bitbang, 1); - mii_delay(bitbang); - return 0; + mdio_tristate(bus); + mdc(bus, 0); + mii_delay(bus); + mdc(bus, 1); + mii_delay(bus); } -static int fs_enet_mii_bb_reset(struct mii_bus *bus) -{ - /*nothing here - dunno how to reset it*/ - return 0; -} - -static int fs_mii_bitbang_init(struct bb_info *bitbang, struct fs_mii_bb_platform_info* fmpi) +int fs_mii_bitbang_init(struct fs_enet_mii_bus *bus) { + const struct fs_mii_bus_info *bi = bus->bus_info; int r; - bitbang->delay = fmpi->delay; - - r = bitbang_prep_bit(&bitbang->mdio_dir, - &bitbang->mdio_dir_msk, - &fmpi->mdio_dir); + r = bitbang_prep_bit(&bus->bitbang.mdio_dir, + &bus->bitbang.mdio_dat, + &bus->bitbang.mdio_msk, + bi->i.bitbang.mdio_port, + bi->i.bitbang.mdio_bit); if (r != 0) return r; - r = bitbang_prep_bit(&bitbang->mdio_dat, - &bitbang->mdio_dat_msk, - &fmpi->mdio_dat); + r = bitbang_prep_bit(&bus->bitbang.mdc_dir, + &bus->bitbang.mdc_dat, + &bus->bitbang.mdc_msk, + bi->i.bitbang.mdc_port, + bi->i.bitbang.mdc_bit); if (r != 0) return r; - r = bitbang_prep_bit(&bitbang->mdc_dat, - &bitbang->mdc_msk, - &fmpi->mdc_dat); - if (r != 0) - return r; + bus->mii_read = mii_read; + bus->mii_write = mii_write; return 0; } - - -static int __devinit fs_enet_mdio_probe(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct fs_mii_bb_platform_info *pdata; - struct mii_bus *new_bus; - struct bb_info *bitbang; - int err = 0; - - if (NULL == dev) - return -EINVAL; - - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); - - if (NULL == new_bus) - return -ENOMEM; - - bitbang = kzalloc(sizeof(struct bb_info), GFP_KERNEL); - - if (NULL == bitbang) - return -ENOMEM; - - new_bus->name = "BB MII Bus", - new_bus->read = &fs_enet_mii_bb_read, - new_bus->write = &fs_enet_mii_bb_write, - new_bus->reset = &fs_enet_mii_bb_reset, - new_bus->id = pdev->id; - - new_bus->phy_mask = ~0x9; - pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data; - - if (NULL == pdata) { - printk(KERN_ERR "gfar mdio %d: Missing platform data!\n", pdev->id); - return -ENODEV; - } - - /*set up workspace*/ - fs_mii_bitbang_init(bitbang, pdata); - - new_bus->priv = bitbang; - - new_bus->irq = pdata->irq; - - new_bus->dev = dev; - dev_set_drvdata(dev, new_bus); - - err = mdiobus_register(new_bus); - - if (0 != err) { - printk (KERN_ERR "%s: Cannot register as MDIO bus\n", - new_bus->name); - goto bus_register_fail; - } - - return 0; - -bus_register_fail: - kfree(bitbang); - kfree(new_bus); - - return err; -} - - -static int fs_enet_mdio_remove(struct device *dev) -{ - struct mii_bus *bus = dev_get_drvdata(dev); - - mdiobus_unregister(bus); - - dev_set_drvdata(dev, NULL); - - iounmap((void *) (&bus->priv)); - bus->priv = NULL; - kfree(bus); - - return 0; -} - -static struct device_driver fs_enet_bb_mdio_driver = { - .name = "fsl-bb-mdio", - .bus = &platform_bus_type, - .probe = fs_enet_mdio_probe, - .remove = fs_enet_mdio_remove, -}; - -int fs_enet_mdio_bb_init(void) -{ - return driver_register(&fs_enet_bb_mdio_driver); -} - -void fs_enet_mdio_bb_exit(void) -{ - driver_unregister(&fs_enet_bb_mdio_driver); -} - diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c deleted file mode 100644 index 1328e10ca..000000000 --- a/drivers/net/fs_enet/mii-fec.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Combined Ethernet driver for Motorola MPC8xx and MPC82xx. - * - * Copyright (c) 2003 Intracom S.A. - * by Pantelis Antoniou - * - * 2005 (c) MontaVista Software, Inc. - * Vitaly Bordug - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "fs_enet.h" -#include "fec.h" - -/* Make MII read/write commands for the FEC. -*/ -#define mk_mii_read(REG) (0x60020000 | ((REG & 0x1f) << 18)) -#define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | (VAL & 0xffff)) -#define mk_mii_end 0 - -#define FEC_MII_LOOPS 10000 - -static int match_has_phy (struct device *dev, void* data) -{ - struct platform_device* pdev = container_of(dev, struct platform_device, dev); - struct fs_platform_info* fpi; - if(strcmp(pdev->name, (char*)data)) - { - return 0; - } - - fpi = pdev->dev.platform_data; - if((fpi)&&(fpi->has_phy)) - return 1; - return 0; -} - -static int fs_mii_fec_init(struct fec_info* fec, struct fs_mii_fec_platform_info *fmpi) -{ - struct resource *r; - fec_t *fecp; - char* name = "fsl-cpm-fec"; - - /* we need fec in order to be useful */ - struct platform_device *fec_pdev = - container_of(bus_find_device(&platform_bus_type, NULL, name, match_has_phy), - struct platform_device, dev); - - if(fec_pdev == NULL) { - printk(KERN_ERR"Unable to find PHY for %s", name); - return -ENODEV; - } - - r = platform_get_resource_byname(fec_pdev, IORESOURCE_MEM, "regs"); - - fec->fecp = fecp = (fec_t*)ioremap(r->start,sizeof(fec_t)); - fec->mii_speed = fmpi->mii_speed; - - setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ - setbits32(&fecp->fec_ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); - out_be32(&fecp->fec_ievent, FEC_ENET_MII); - out_be32(&fecp->fec_mii_speed, fec->mii_speed); - - return 0; -} - -static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location) -{ - struct fec_info* fec = bus->priv; - fec_t *fecp = fec->fecp; - int i, ret = -1; - - if ((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) - BUG(); - - /* Add PHY address to register command. */ - out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_read(location)); - - for (i = 0; i < FEC_MII_LOOPS; i++) - if ((in_be32(&fecp->fec_ievent) & FEC_ENET_MII) != 0) - break; - - if (i < FEC_MII_LOOPS) { - out_be32(&fecp->fec_ievent, FEC_ENET_MII); - ret = in_be32(&fecp->fec_mii_data) & 0xffff; - } - - return ret; - -} - -static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val) -{ - struct fec_info* fec = bus->priv; - fec_t *fecp = fec->fecp; - int i; - - /* this must never happen */ - if ((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) - BUG(); - - /* Add PHY address to register command. */ - out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_write(location, val)); - - for (i = 0; i < FEC_MII_LOOPS; i++) - if ((in_be32(&fecp->fec_ievent) & FEC_ENET_MII) != 0) - break; - - if (i < FEC_MII_LOOPS) - out_be32(&fecp->fec_ievent, FEC_ENET_MII); - - return 0; - -} - -static int fs_enet_fec_mii_reset(struct mii_bus *bus) -{ - /* nothing here - for now */ - return 0; -} - -static int __devinit fs_enet_fec_mdio_probe(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct fs_mii_fec_platform_info *pdata; - struct mii_bus *new_bus; - struct fec_info *fec; - int err = 0; - if (NULL == dev) - return -EINVAL; - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); - - if (NULL == new_bus) - return -ENOMEM; - - fec = kzalloc(sizeof(struct fec_info), GFP_KERNEL); - - if (NULL == fec) - return -ENOMEM; - - new_bus->name = "FEC MII Bus", - new_bus->read = &fs_enet_fec_mii_read, - new_bus->write = &fs_enet_fec_mii_write, - new_bus->reset = &fs_enet_fec_mii_reset, - new_bus->id = pdev->id; - - pdata = (struct fs_mii_fec_platform_info *)pdev->dev.platform_data; - - if (NULL == pdata) { - printk(KERN_ERR "fs_enet FEC mdio %d: Missing platform data!\n", pdev->id); - return -ENODEV; - } - - /*set up workspace*/ - - fs_mii_fec_init(fec, pdata); - new_bus->priv = fec; - - new_bus->irq = pdata->irq; - - new_bus->dev = dev; - dev_set_drvdata(dev, new_bus); - - err = mdiobus_register(new_bus); - - if (0 != err) { - printk (KERN_ERR "%s: Cannot register as MDIO bus\n", - new_bus->name); - goto bus_register_fail; - } - - return 0; - -bus_register_fail: - kfree(new_bus); - - return err; -} - - -static int fs_enet_fec_mdio_remove(struct device *dev) -{ - struct mii_bus *bus = dev_get_drvdata(dev); - - mdiobus_unregister(bus); - - dev_set_drvdata(dev, NULL); - kfree(bus->priv); - - bus->priv = NULL; - kfree(bus); - - return 0; -} - -static struct device_driver fs_enet_fec_mdio_driver = { - .name = "fsl-cpm-fec-mdio", - .bus = &platform_bus_type, - .probe = fs_enet_fec_mdio_probe, - .remove = fs_enet_fec_mdio_remove, -}; - -int fs_enet_mdio_fec_init(void) -{ - return driver_register(&fs_enet_fec_mdio_driver); -} - -void fs_enet_mdio_fec_exit(void) -{ - driver_unregister(&fs_enet_fec_mdio_driver); -} - diff --git a/drivers/net/fs_enet/mii-fixed.c b/drivers/net/fs_enet/mii-fixed.c new file mode 100644 index 000000000..b3e192d61 --- /dev/null +++ b/drivers/net/fs_enet/mii-fixed.c @@ -0,0 +1,92 @@ +/* + * Combined Ethernet driver for Motorola MPC8xx and MPC82xx. + * + * Copyright (c) 2003 Intracom S.A. + * by Pantelis Antoniou + * + * 2005 (c) MontaVista Software, Inc. + * Vitaly Bordug + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "fs_enet.h" + +static const u16 mii_regs[7] = { + 0x3100, + 0x786d, + 0x0fff, + 0x0fff, + 0x01e1, + 0x45e1, + 0x0003, +}; + +static int mii_read(struct fs_enet_mii_bus *bus, int phy_id, int location) +{ + int ret = 0; + + if ((unsigned int)location >= ARRAY_SIZE(mii_regs)) + return -1; + + if (location != 5) + ret = mii_regs[location]; + else + ret = bus->fixed.lpa; + + return ret; +} + +static void mii_write(struct fs_enet_mii_bus *bus, int phy_id, int location, int val) +{ + /* do nothing */ +} + +int fs_mii_fixed_init(struct fs_enet_mii_bus *bus) +{ + const struct fs_mii_bus_info *bi = bus->bus_info; + + bus->fixed.lpa = 0x45e1; /* default 100Mb, full duplex */ + + /* if speed is fixed at 10Mb, remove 100Mb modes */ + if (bi->i.fixed.speed == 10) + bus->fixed.lpa &= ~LPA_100; + + /* if duplex is half, remove full duplex modes */ + if (bi->i.fixed.duplex == 0) + bus->fixed.lpa &= ~LPA_DUPLEX; + + bus->mii_read = mii_read; + bus->mii_write = mii_write; + + return 0; +} diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index ebbbd6ca6..218d31764 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -64,6 +64,7 @@ * The driver then cleans up the buffer. */ +#include #include #include #include diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index f87bbc408..127c98cf3 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h @@ -22,6 +22,7 @@ #ifndef __GIANFAR_H #define __GIANFAR_H +#include #include #include #include diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index e0f505285..d69698c69 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c @@ -15,6 +15,7 @@ * by reference. */ +#include #include #include #include diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index c92e65984..c6b725529 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c @@ -16,6 +16,7 @@ * */ +#include #include #include #include diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index e8a18f18d..a6d5c4319 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c @@ -19,6 +19,7 @@ * Sysfs file creation and management */ +#include #include #include #include diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c index 2b4db7414..2d2435404 100644 --- a/drivers/net/gt96100eth.c +++ b/drivers/net/gt96100eth.c @@ -699,6 +699,7 @@ static int __init gt96100_probe1(struct pci_dev *pci, int port_num) memset(gp, 0, sizeof(*gp)); // clear it gp->port_num = port_num; + gp->io_size = GT96100_ETH_IO_SIZE; gp->port_offset = port_num * GT96100_ETH_IO_SIZE; gp->phy_addr = phy_addr; gp->chip_rev = chip_rev; @@ -1029,7 +1030,7 @@ gt96100_open(struct net_device *dev) } if ((retval = request_irq(dev->irq, >96100_interrupt, - IRQF_SHARED, dev->name, dev))) { + SA_SHIRQ, dev->name, dev))) { err("unable to get IRQ %d\n", dev->irq); return retval; } @@ -1530,7 +1531,7 @@ static void gt96100_cleanup_module(void) + sizeof(gt96100_td_t) * TX_RING_SIZE, gp->rx_ring); free_netdev(gtif->dev); - release_region(gtif->iobase, GT96100_ETH_IO_SIZE); + release_region(gtif->iobase, gp->io_size); } } } diff --git a/drivers/net/gt96100eth.h b/drivers/net/gt96100eth.h index 3b62a87c7..395869c5e 100644 --- a/drivers/net/gt96100eth.h +++ b/drivers/net/gt96100eth.h @@ -27,6 +27,7 @@ #ifndef _GT96100ETH_H #define _GT96100ETH_H +#include #include #define dbg(lvl, format, arg...) \ @@ -331,6 +332,7 @@ struct gt96100_private { mib_counters_t mib; struct net_device_stats stats; + int io_size; int port_num; // 0 or 1 int chip_rev; u32 port_offset; @@ -339,6 +341,7 @@ struct gt96100_private { u32 last_psr; // last value of the port status register int options; /* User-settable misc. driver options. */ + int drv_flags; struct timer_list timer; spinlock_t lock; /* Serialise access to device */ }; diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 409c6aab0..0ea4cb4a0 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c @@ -20,15 +20,22 @@ Support and updates available at http://www.scyld.com/network/hamachi.html - [link no longer provides useful info -jgarzik] or http://www.parl.clemson.edu/~keithu/hamachi.html + + + Linux kernel changelog: + + LK1.0.1: + - fix lack of pci_dev<->dev association + - ethtool support (jgarzik) + */ #define DRV_NAME "hamachi" -#define DRV_VERSION "2.0" -#define DRV_RELDATE "June 27, 2006" +#define DRV_VERSION "1.01+LK1.0.1" +#define DRV_RELDATE "5/18/2001" /* A few user-configurable values. */ @@ -601,8 +608,7 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev, pci_set_master(pdev); i = pci_request_regions(pdev, DRV_NAME); - if (i) - return i; + if (i) return i; irq = pdev->irq; ioaddr = ioremap(base, 0x400); @@ -865,7 +871,7 @@ static int hamachi_open(struct net_device *dev) u32 rx_int_var, tx_int_var; u16 fifo_info; - i = request_irq(dev->irq, &hamachi_interrupt, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &hamachi_interrupt, SA_SHIRQ, dev->name, dev); if (i) return i; diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 86b3bb9be..d12605f0a 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -12,6 +12,7 @@ * Fred N. van Kempen, */ +#include #include #include #include diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c index 55906c7b4..232793d2c 100644 --- a/drivers/net/hamradio/baycom_ser_fdx.c +++ b/drivers/net/hamradio/baycom_ser_fdx.c @@ -434,7 +434,7 @@ static int ser12_open(struct net_device *dev) outb(0, FCR(dev->base_addr)); /* disable FIFOs */ outb(0x0d, MCR(dev->base_addr)); outb(0, IER(dev->base_addr)); - if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, "baycom_ser_fdx", dev)) { release_region(dev->base_addr, SER12_EXTENT); return -EBUSY; diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c index de95de898..be596a3eb 100644 --- a/drivers/net/hamradio/baycom_ser_hdx.c +++ b/drivers/net/hamradio/baycom_ser_hdx.c @@ -488,7 +488,7 @@ static int ser12_open(struct net_device *dev) outb(0, FCR(dev->base_addr)); /* disable FIFOs */ outb(0x0d, MCR(dev->base_addr)); outb(0, IER(dev->base_addr)); - if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, "baycom_ser12", dev)) { release_region(dev->base_addr, SER12_EXTENT); return -EBUSY; diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 889f33813..cb43a9d28 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c @@ -54,6 +54,7 @@ * BPQ 004 Joerg(DL1BKE) Fixed to not lock up on ifconfig. */ +#include #include #include #include @@ -122,12 +123,6 @@ struct bpqdev { static LIST_HEAD(bpq_devices); -/* - * bpqether network devices are paired with ethernet devices below them, so - * form a special "super class" of normal ethernet devices; split their locks - * off into a separate class since they always nest. - */ -static struct lock_class_key bpq_netdev_xmit_lock_key; /* ------------------------------------------------------------------------ */ @@ -534,7 +529,6 @@ static int bpq_new_device(struct net_device *edev) err = register_netdevice(ndev); if (err) goto error; - lockdep_set_class(&ndev->_xmit_lock, &bpq_netdev_xmit_lock_key); /* List protected by RTNL */ list_add_rcu(&bpq->bpq_list, &bpq_devices); diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index c9a46b899..0d5fccc98 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c @@ -436,7 +436,7 @@ static int __init dmascc_init(void) module_init(dmascc_init); module_exit(dmascc_exit); -static void __init dev_setup(struct net_device *dev) +static void dev_setup(struct net_device *dev) { dev->type = ARPHRD_AX25; dev->hard_header_len = AX25_MAX_HEADER_LEN; diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index d8715b200..3ebbbe56b 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -16,6 +16,7 @@ * Copyright (C) 2004, 05 Ralf Baechle DL5RB * Copyright (C) 2004, 05 Thomas Osterried DL9SAU */ +#include #include #include #include diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index df4b68142..5927784df 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c @@ -148,6 +148,7 @@ /* ----------------------------------------------------------------------- */ +#include #include #include #include @@ -1736,7 +1737,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (!Ivec[hwcfg.irq].used && hwcfg.irq) { - if (request_irq(hwcfg.irq, scc_isr, IRQF_DISABLED, "AX.25 SCC", NULL)) + if (request_irq(hwcfg.irq, scc_isr, SA_INTERRUPT, "AX.25 SCC", NULL)) printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq); else Ivec[hwcfg.irq].used = 1; diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index f98f5777d..b49884048 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -42,6 +42,7 @@ /*****************************************************************************/ +#include #include #include #include @@ -873,7 +874,7 @@ static int yam_open(struct net_device *dev) goto out_release_base; } outb(0, IER(dev->base_addr)); - if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, dev->name, dev)) { + if (request_irq(dev->irq, yam_interrupt, SA_INTERRUPT | SA_SHIRQ, dev->name, dev)) { printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq); ret = -EBUSY; goto out_release_base; diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index e26a3e407..0d7a6250e 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c @@ -446,7 +446,7 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int __init +int init_module(void) { struct net_device *dev; diff --git a/drivers/net/hp.c b/drivers/net/hp.c index 551a71b3c..cf9fb3698 100644 --- a/drivers/net/hp.c +++ b/drivers/net/hp.c @@ -384,7 +384,7 @@ hp_block_output(struct net_device *dev, int count, } /* This function resets the ethercard if something screws up. */ -static void __init +static void hp_init_card(struct net_device *dev) { int irq = dev->irq; @@ -409,7 +409,7 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int __init +int init_module(void) { struct net_device *dev; diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index ff5a67d61..247c8ca86 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c @@ -111,6 +111,7 @@ #include #include #include +#include /* for CONFIG_PCI */ #include #include #include @@ -1078,7 +1079,7 @@ static int hp100_open(struct net_device *dev) /* New: if bus is PCI or EISA, interrupts might be shared interrupts */ if (request_irq(dev->irq, hp100_interrupt, lp->bus == HP100_BUS_PCI || lp->bus == - HP100_BUS_EISA ? IRQF_SHARED : IRQF_DISABLED, + HP100_BUS_EISA ? SA_SHIRQ : SA_INTERRUPT, "hp100", dev)) { printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq); return -EAGAIN; @@ -1486,8 +1487,11 @@ static int hp100_start_xmit_bm(struct sk_buff *skb, struct net_device *dev) if (skb->len <= 0) return 0; - if (lp->chip == HP100_CHIPID_SHASTA && skb_padto(skb, ETH_ZLEN)) - return 0; + if (skb->len < ETH_ZLEN && lp->chip == HP100_CHIPID_SHASTA) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; + } /* Get Tx ring tail pointer */ if (lp->txrtail->next == lp->txrhead) { diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index 91326ea3e..d9fb8e74e 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c @@ -117,7 +117,7 @@ static int __devinit hydra_init(struct zorro_dev *z) dev->irq = IRQ_AMIGA_PORTS; /* Install the Interrupt handler */ - if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, "Hydra Ethernet", + if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, "Hydra Ethernet", dev)) { free_netdev(dev); return -EAGAIN; diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h index 97ed22bb4..c2dae6092 100644 --- a/drivers/net/ibm_emac/ibm_emac.h +++ b/drivers/net/ibm_emac/ibm_emac.h @@ -20,6 +20,7 @@ #ifndef __IBM_EMAC_H_ #define __IBM_EMAC_H_ +#include #include /* This is a simple check to prevent use of this driver on non-tested SoCs */ diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 82468e2dc..7e49522b8 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h index dabb94afe..f61273b2e 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.h +++ b/drivers/net/ibm_emac/ibm_emac_core.h @@ -20,6 +20,7 @@ #ifndef __IBM_EMAC_CORE_H_ #define __IBM_EMAC_CORE_H_ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_debug.c b/drivers/net/ibm_emac/ibm_emac_debug.c index c36459080..c7e1ecfa0 100644 --- a/drivers/net/ibm_emac/ibm_emac_debug.c +++ b/drivers/net/ibm_emac/ibm_emac_debug.c @@ -12,6 +12,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_debug.h b/drivers/net/ibm_emac/ibm_emac_debug.h index 576138949..e85fbe0a8 100644 --- a/drivers/net/ibm_emac/ibm_emac_debug.h +++ b/drivers/net/ibm_emac/ibm_emac_debug.h @@ -15,6 +15,7 @@ #ifndef __IBM_EMAC_DEBUG_H_ #define __IBM_EMAC_DEBUG_H_ +#include #include #include "ibm_emac_core.h" #include "ibm_emac_mal.h" diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c index af50e7b2e..da88d4308 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.c +++ b/drivers/net/ibm_emac/ibm_emac_mal.c @@ -19,6 +19,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h index f73f10a0a..2a2d3b24b 100644 --- a/drivers/net/ibm_emac/ibm_emac_mal.h +++ b/drivers/net/ibm_emac/ibm_emac_mal.h @@ -19,6 +19,7 @@ #ifndef __IBM_EMAC_MAL_H_ #define __IBM_EMAC_MAL_H_ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c index 4a9702406..67935dd33 100644 --- a/drivers/net/ibm_emac/ibm_emac_phy.c +++ b/drivers/net/ibm_emac/ibm_emac_phy.c @@ -12,6 +12,7 @@ * (c) 2004-2005, Eugene Surovegin * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.c b/drivers/net/ibm_emac/ibm_emac_rgmii.c index 53d281cb9..f0b1ffb2d 100644 --- a/drivers/net/ibm_emac/ibm_emac_rgmii.c +++ b/drivers/net/ibm_emac/ibm_emac_rgmii.c @@ -16,6 +16,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.h b/drivers/net/ibm_emac/ibm_emac_rgmii.h index 94abde55e..7f03d536c 100644 --- a/drivers/net/ibm_emac/ibm_emac_rgmii.h +++ b/drivers/net/ibm_emac/ibm_emac_rgmii.h @@ -21,6 +21,7 @@ #ifndef _IBM_EMAC_RGMII_H_ #define _IBM_EMAC_RGMII_H_ +#include /* RGMII bridge */ struct rgmii_regs { diff --git a/drivers/net/ibm_emac/ibm_emac_tah.c b/drivers/net/ibm_emac/ibm_emac_tah.c index e287b451b..af08afc22 100644 --- a/drivers/net/ibm_emac/ibm_emac_tah.c +++ b/drivers/net/ibm_emac/ibm_emac_tah.c @@ -13,6 +13,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ +#include #include #include "ibm_emac_core.h" diff --git a/drivers/net/ibm_emac/ibm_emac_tah.h b/drivers/net/ibm_emac/ibm_emac_tah.h index 38153945a..9299b5dd7 100644 --- a/drivers/net/ibm_emac/ibm_emac_tah.h +++ b/drivers/net/ibm_emac/ibm_emac_tah.h @@ -17,6 +17,7 @@ #ifndef _IBM_EMAC_TAH_H #define _IBM_EMAC_TAH_H +#include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.c b/drivers/net/ibm_emac/ibm_emac_zmii.c index 37dc8f342..e129e0aaa 100644 --- a/drivers/net/ibm_emac/ibm_emac_zmii.c +++ b/drivers/net/ibm_emac/ibm_emac_zmii.c @@ -16,6 +16,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.h b/drivers/net/ibm_emac/ibm_emac_zmii.h index 972e3a44a..92c854410 100644 --- a/drivers/net/ibm_emac/ibm_emac_zmii.h +++ b/drivers/net/ibm_emac/ibm_emac_zmii.h @@ -19,6 +19,7 @@ #ifndef _IBM_EMAC_ZMII_H_ #define _IBM_EMAC_ZMII_H_ +#include #include #include diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index 2a95d72fa..01ad90421 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c @@ -1,4 +1,4 @@ -/* +/* net-3-driver for the IBM LAN Adapter/A This is an extension to the Linux operating system, and is covered by the @@ -11,9 +11,9 @@ This driver is based both on the SK_MCA driver, which is itself based on the SK_G16 and 3C523 driver. paper sources: - 'PC Hardware: Aufbau, Funktionsweise, Programmierung' by + 'PC Hardware: Aufbau, Funktionsweise, Programmierung' by Hans-Peter Messmer for the basic Microchannel stuff - + 'Linux Geraetetreiber' by Allesandro Rubini, Kalle Dalheimer for help on Ethernet driver programming @@ -27,14 +27,14 @@ paper sources: special acknowledgements to: - Bob Eager for helping me out with documentation from IBM - - Jim Shorney for his endless patience with me while I was using + - Jim Shorney for his endless patience with me while I was using him as a beta tester to trace down the address filter bug ;-) Missing things: -> set debug level via ioctl instead of compile-time switches -> I didn't follow the development of the 2.1.x kernels, so my - assumptions about which things changed with which kernel version + assumptions about which things changed with which kernel version are probably nonsense History: @@ -275,7 +275,7 @@ static void InitDscrs(struct net_device *dev) priv->rrastart = raddr = priv->txbufstart + (TXBUFCNT * PKTSIZE); priv->rdastart = addr = priv->rrastart + (priv->rxbufcnt * sizeof(rra_t)); priv->rxbufstart = baddr = priv->rdastart + (priv->rxbufcnt * sizeof(rda_t)); - + for (z = 0; z < priv->rxbufcnt; z++) { rra.startlo = baddr; rra.starthi = 0; @@ -570,7 +570,7 @@ static void irqrx_handler(struct net_device *dev) lrdaaddr = priv->rdastart + (priv->lastrxdescr * sizeof(rda_t)); memcpy_fromio(&rda, priv->base + rdaaddr, sizeof(rda_t)); - /* iron out upper word halves of fields we use - SONIC will duplicate + /* iron out upper word halves of fields we use - SONIC will duplicate bits 0..15 to 16..31 */ rda.status &= 0xffff; @@ -782,7 +782,7 @@ static int ibmlana_open(struct net_device *dev) /* register resources - only necessary for IRQ */ - result = request_irq(priv->realirq, irq_handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); + result = request_irq(priv->realirq, irq_handler, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); if (result != 0) { printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq); return result; @@ -836,9 +836,9 @@ static int ibmlana_tx(struct sk_buff *skb, struct net_device *dev) baddr = priv->txbufstart + (priv->nexttxdescr * PKTSIZE); memcpy_toio(priv->base + baddr, skb->data, skb->len); - /* copy filler into RAM - in case we're filling up... + /* copy filler into RAM - in case we're filling up... we're filling a bit more than necessary, but that doesn't harm - since the buffer is far larger... + since the buffer is far larger... Sorry Linus for the filler string but I couldn't resist ;-) */ if (tmplen > skb->len) { @@ -952,7 +952,7 @@ static int ibmlana_probe(struct net_device *dev) priv->realirq = irq; priv->medium = medium; spin_lock_init(&priv->lock); - + /* set base + irq for this device (irq not allocated so far) */ diff --git a/drivers/net/ibmlana.h b/drivers/net/ibmlana.h index 6b58bab9e..458ee226e 100644 --- a/drivers/net/ibmlana.h +++ b/drivers/net/ibmlana.h @@ -17,7 +17,7 @@ /* media enumeration - defined in a way that it fits onto the LAN/A's POS registers... */ -typedef enum { +typedef enum { Media_10BaseT, Media_10Base5, Media_Unknown, Media_10Base2, Media_Count } ibmlana_medium; @@ -27,7 +27,7 @@ typedef enum { typedef struct { unsigned int slot; /* MCA-Slot-# */ struct net_device_stats stat; /* packet statistics */ - int realirq; /* memorizes actual IRQ, even when + int realirq; /* memorizes actual IRQ, even when currently not allocated */ ibmlana_medium medium; /* physical cannector */ u32 tdastart, txbufstart, /* addresses */ @@ -41,7 +41,7 @@ typedef struct { spinlock_t lock; } ibmlana_priv; -/* this card uses quite a lot of I/O ports...luckily the MCA bus decodes +/* this card uses quite a lot of I/O ports...luckily the MCA bus decodes a full 64K I/O range... */ #define IBM_LANA_IORANGE 0xa0 diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 0464e78f7..52d01027d 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c @@ -24,7 +24,7 @@ /* 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: @@ -33,6 +33,7 @@ - possibly remove procfs support */ +#include #include #include #include @@ -60,7 +61,7 @@ #undef DEBUG #define ibmveth_printk(fmt, args...) \ - printk(KERN_DEBUG "%s: " fmt, __FILE__, ## args) + printk(KERN_INFO "%s: " fmt, __FILE__, ## args) #define ibmveth_error_printk(fmt, args...) \ printk(KERN_ERR "(%s:%3.3d ua:%x) ERROR: " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args) @@ -78,7 +79,7 @@ #else #define ibmveth_debug_printk_no_adapter(fmt, args...) #define ibmveth_debug_printk(fmt, args...) -#define ibmveth_assert(expr) +#define ibmveth_assert(expr) #endif static int ibmveth_open(struct net_device *dev); @@ -95,7 +96,6 @@ static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter); static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter); static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static inline void ibmveth_rxq_harvest_buffer(struct ibmveth_adapter *adapter); -static struct kobj_type ktype_veth_pool; #ifdef CONFIG_PROC_FS #define IBMVETH_PROC_DIR "net/ibmveth" @@ -133,13 +133,12 @@ static inline int ibmveth_rxq_frame_length(struct ibmveth_adapter *adapter) } /* 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, u32 pool_active) +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; - pool->active = pool_active; } /* allocate and setup an buffer pool - called during open */ @@ -147,13 +146,13 @@ static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool) { int i; - pool->free_map = kmalloc(sizeof(u16) * pool->size, GFP_KERNEL); + pool->free_map = kmalloc(sizeof(u16) * pool->size, GFP_KERNEL); if(!pool->free_map) { return -1; } - pool->dma_addr = kmalloc(sizeof(dma_addr_t) * pool->size, GFP_KERNEL); + pool->dma_addr = kmalloc(sizeof(dma_addr_t) * pool->size, GFP_KERNEL); if(!pool->dma_addr) { kfree(pool->free_map); pool->free_map = NULL; @@ -181,6 +180,7 @@ static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool) atomic_set(&pool->available, 0); pool->producer_index = 0; pool->consumer_index = 0; + pool->active = 0; return 0; } @@ -214,7 +214,7 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc free_index = pool->consumer_index++ % pool->size; index = pool->free_map[free_index]; - + ibmveth_assert(index != IBM_VETH_INVALID_MAP); ibmveth_assert(pool->skbuff[index] == NULL); @@ -231,10 +231,10 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc desc.desc = 0; desc.fields.valid = 1; desc.fields.length = pool->buff_size; - desc.fields.address = dma_addr; + desc.fields.address = dma_addr; lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); - + if(lpar_rc != H_SUCCESS) { pool->free_map[free_index] = index; pool->skbuff[index] = NULL; @@ -250,13 +250,13 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc adapter->replenish_add_buff_success++; } } - + mb(); atomic_add(buffers_added, &(pool->available)); } /* replenish routine */ -static void ibmveth_replenish_task(struct ibmveth_adapter *adapter) +static void ibmveth_replenish_task(struct ibmveth_adapter *adapter) { int i; @@ -264,7 +264,7 @@ static void ibmveth_replenish_task(struct ibmveth_adapter *adapter) for(i = 0; i < IbmVethNumBufferPools; i++) if(adapter->rx_buff_pool[i].active) - ibmveth_replenish_buffer_pool(adapter, + ibmveth_replenish_buffer_pool(adapter, &adapter->rx_buff_pool[i]); adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8); @@ -301,6 +301,7 @@ static void ibmveth_free_buffer_pool(struct ibmveth_adapter *adapter, struct ibm kfree(pool->skbuff); pool->skbuff = NULL; } + pool->active = 0; } /* remove a buffer from a pool */ @@ -371,7 +372,7 @@ static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) 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); @@ -406,7 +407,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter) } free_page((unsigned long)adapter->buffer_list_addr); adapter->buffer_list_addr = NULL; - } + } if(adapter->filter_list_addr != NULL) { if(!dma_mapping_error(adapter->filter_list_dma)) { @@ -432,9 +433,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter) } for(i = 0; irx_buff_pool[i].active) - ibmveth_free_buffer_pool(adapter, - &adapter->rx_buff_pool[i]); + ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[i]); } static int ibmveth_open(struct net_device *netdev) @@ -451,10 +450,10 @@ static int ibmveth_open(struct net_device *netdev) for(i = 0; irx_buff_pool[i].size; - + 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); @@ -490,6 +489,9 @@ static int ibmveth_open(struct net_device *netdev) adapter->rx_queue.num_slots = rxq_entries; adapter->rx_queue.toggle = 1; + /* call change_mtu to init the buffer pools based in initial mtu */ + ibmveth_change_mtu(netdev, netdev->mtu); + memcpy(&mac_address, netdev->dev_addr, netdev->addr_len); mac_address = mac_address >> 16; @@ -502,7 +504,7 @@ static int ibmveth_open(struct net_device *netdev) 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, @@ -517,18 +519,7 @@ static int ibmveth_open(struct net_device *netdev) rxq_desc.desc, mac_address); ibmveth_cleanup(adapter); - return -ENONET; - } - - for(i = 0; irx_buff_pool[i].active) - continue; - if (ibmveth_alloc_buffer_pool(&adapter->rx_buff_pool[i])) { - ibmveth_error_printk("unable to alloc pool\n"); - adapter->rx_buff_pool[i].active = 0; - ibmveth_cleanup(adapter); - return -ENOMEM ; - } + return -ENONET; } ibmveth_debug_printk("registering irq 0x%x\n", netdev->irq); @@ -556,11 +547,10 @@ static int ibmveth_close(struct net_device *netdev) { struct ibmveth_adapter *adapter = netdev->priv; long lpar_rc; - + ibmveth_debug_printk("close starting\n"); - if (!adapter->pool_config) - netif_stop_queue(netdev); + netif_stop_queue(netdev); free_irq(netdev->irq, netdev); @@ -704,7 +694,7 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev) desc[5].desc, correlator); } while ((lpar_rc == H_BUSY) && (retry_count--)); - + 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); @@ -790,7 +780,7 @@ static int ibmveth_poll(struct net_device *netdev, int *budget) /* more work to do - return that we are not done yet */ netdev->quota -= frames_processed; *budget -= frames_processed; - return 1; + return 1; } /* we think we are done - reenable interrupts, then check once more to make sure we are done */ @@ -816,7 +806,7 @@ static int ibmveth_poll(struct net_device *netdev, int *budget) } 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; @@ -872,7 +862,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev) 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, @@ -886,22 +876,46 @@ static void ibmveth_set_multicast_list(struct net_device *netdev) static int ibmveth_change_mtu(struct net_device *dev, int new_mtu) { struct ibmveth_adapter *adapter = dev->priv; - int new_mtu_oh = new_mtu + IBMVETH_BUFF_OH; int i; + int prev_smaller = 1; - if (new_mtu < IBMVETH_MAX_MTU) + if ((new_mtu < 68) || + (new_mtu > (pool_size[IbmVethNumBufferPools-1]) - IBMVETH_BUFF_OH)) return -EINVAL; - /* Look for an active buffer pool that can hold the new MTU */ for(i = 0; irx_buff_pool[i].active) - continue; - if (new_mtu_oh < adapter->rx_buff_pool[i].buff_size) { - dev->mtu = new_mtu; - return 0; + int activate = 0; + if (new_mtu > (pool_size[i] - IBMVETH_BUFF_OH)) { + activate = 1; + prev_smaller= 1; + } else { + if (prev_smaller) + activate = 1; + prev_smaller= 0; } + + if (activate && !adapter->rx_buff_pool[i].active) { + struct ibmveth_buff_pool *pool = + &adapter->rx_buff_pool[i]; + if(ibmveth_alloc_buffer_pool(pool)) { + ibmveth_error_printk("unable to alloc pool\n"); + return -ENOMEM; + } + adapter->rx_buff_pool[i].active = 1; + } else if (!activate && adapter->rx_buff_pool[i].active) { + adapter->rx_buff_pool[i].active = 0; + h_free_logical_lan_buffer(adapter->vdev->unit_address, + (u64)pool_size[i]); + } + } - return -EINVAL; + + /* kick the interrupt handler so that the new buffer pools get + replenished or deallocated */ + ibmveth_interrupt(dev->irq, dev, NULL); + + dev->mtu = new_mtu; + return 0; } static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id) @@ -914,7 +928,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ unsigned int *mcastFilterSize_p; - ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n", + ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n", dev->unit_address); mac_addr_p = (unsigned char *) vio_get_attribute(dev, VETH_MAC_ADDR, 0); @@ -923,7 +937,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ "attribute\n", __FILE__, __LINE__); return 0; } - + mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0); if(!mcastFilterSize_p) { printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find " @@ -931,7 +945,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ __FILE__, __LINE__); return 0; } - + netdev = alloc_etherdev(sizeof(struct ibmveth_adapter)); if(!netdev) @@ -946,14 +960,13 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ adapter->vdev = dev; adapter->netdev = netdev; adapter->mcastFilterSize= *mcastFilterSize_p; - adapter->pool_config = 0; - + /* Some older boxes running PHYP non-natively have an OF that - returns a 8-byte local-mac-address field (and the first + 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 + 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 + 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 */ if ((*mac_addr_p & 0x3) != 0x02) @@ -963,7 +976,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ memcpy(&adapter->mac_addr, mac_addr_p, 6); adapter->liobn = dev->iommu_table->it_index; - + netdev->irq = dev->irq; netdev->open = ibmveth_open; netdev->poll = ibmveth_poll; @@ -976,21 +989,14 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ netdev->ethtool_ops = &netdev_ethtool_ops; netdev->change_mtu = ibmveth_change_mtu; SET_NETDEV_DEV(netdev, &dev->dev); - netdev->features |= NETIF_F_LLTX; + netdev->features |= NETIF_F_LLTX; spin_lock_init(&adapter->stats_lock); memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len); - for(i = 0; irx_buff_pool[i].kobj; - ibmveth_init_buffer_pool(&adapter->rx_buff_pool[i], i, - pool_count[i], pool_size[i], - pool_active[i]); - kobj->parent = &dev->dev.kobj; - sprintf(kobj->name, "pool%d", i); - kobj->ktype = &ktype_veth_pool; - kobject_register(kobj); - } + for(i = 0; irx_buff_pool[i], i, + pool_count[i], pool_size[i]); ibmveth_debug_printk("adapter @ 0x%p\n", adapter); @@ -1019,10 +1025,6 @@ static int __devexit ibmveth_remove(struct vio_dev *dev) { struct net_device *netdev = dev->dev.driver_data; struct ibmveth_adapter *adapter = netdev->priv; - int i; - - for(i = 0; irx_buff_pool[i].kobj); unregister_netdev(netdev); @@ -1046,7 +1048,7 @@ static void ibmveth_proc_unregister_driver(void) remove_proc_entry(IBMVETH_PROC_DIR, NULL); } -static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos) +static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos) { if (*pos == 0) { return (void *)1; @@ -1061,18 +1063,18 @@ static void *ibmveth_seq_next(struct seq_file *seq, void *v, loff_t *pos) return NULL; } -static void ibmveth_seq_stop(struct seq_file *seq, void *v) +static void ibmveth_seq_stop(struct seq_file *seq, void *v) { } -static int ibmveth_seq_show(struct seq_file *seq, void *v) +static int ibmveth_seq_show(struct seq_file *seq, void *v) { struct ibmveth_adapter *adapter = seq->private; char *current_mac = ((char*) &adapter->netdev->dev_addr); char *firmware_mac = ((char*) &adapter->mac_addr) ; seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version); - + seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address); seq_printf(seq, "LIOBN: 0x%lx\n", adapter->liobn); seq_printf(seq, "Current MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", @@ -1081,7 +1083,7 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v) seq_printf(seq, "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]); - + seq_printf(seq, "\nAdapter Statistics:\n"); seq_printf(seq, " TX: skbuffs linearized: %ld\n", adapter->tx_linearized); seq_printf(seq, " multi-descriptor sends: %ld\n", adapter->tx_multidesc_send); @@ -1093,7 +1095,7 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v) seq_printf(seq, " add buffer failures: %ld\n", adapter->replenish_add_buff_failure); seq_printf(seq, " invalid buffers: %ld\n", adapter->rx_invalid_buffer); seq_printf(seq, " no buffers: %ld\n", adapter->rx_no_buffer); - + return 0; } static struct seq_operations ibmveth_seq_ops = { @@ -1151,11 +1153,11 @@ static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter) } #else /* CONFIG_PROC_FS */ -static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter) +static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter) { } -static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter) +static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter) { } static void ibmveth_proc_register_driver(void) @@ -1167,132 +1169,6 @@ static void ibmveth_proc_unregister_driver(void) } #endif /* CONFIG_PROC_FS */ -static struct attribute veth_active_attr; -static struct attribute veth_num_attr; -static struct attribute veth_size_attr; - -static ssize_t veth_pool_show(struct kobject * kobj, - struct attribute * attr, char * buf) -{ - struct ibmveth_buff_pool *pool = container_of(kobj, - struct ibmveth_buff_pool, - kobj); - - if (attr == &veth_active_attr) - return sprintf(buf, "%d\n", pool->active); - else if (attr == &veth_num_attr) - return sprintf(buf, "%d\n", pool->size); - else if (attr == &veth_size_attr) - return sprintf(buf, "%d\n", pool->buff_size); - return 0; -} - -static ssize_t veth_pool_store(struct kobject * kobj, struct attribute * attr, -const char * buf, size_t count) -{ - struct ibmveth_buff_pool *pool = container_of(kobj, - struct ibmveth_buff_pool, - kobj); - struct net_device *netdev = - container_of(kobj->parent, struct device, kobj)->driver_data; - struct ibmveth_adapter *adapter = netdev->priv; - long value = simple_strtol(buf, NULL, 10); - long rc; - - if (attr == &veth_active_attr) { - if (value && !pool->active) { - if(ibmveth_alloc_buffer_pool(pool)) { - ibmveth_error_printk("unable to alloc pool\n"); - return -ENOMEM; - } - pool->active = 1; - adapter->pool_config = 1; - ibmveth_close(netdev); - adapter->pool_config = 0; - if ((rc = ibmveth_open(netdev))) - return rc; - } else if (!value && pool->active) { - int mtu = netdev->mtu + IBMVETH_BUFF_OH; - int i; - /* Make sure there is a buffer pool with buffers that - can hold a packet of the size of the MTU */ - for(i = 0; irx_buff_pool[i]) - continue; - if (!adapter->rx_buff_pool[i].active) - continue; - if (mtu < adapter->rx_buff_pool[i].buff_size) { - pool->active = 0; - h_free_logical_lan_buffer(adapter-> - vdev-> - unit_address, - pool-> - buff_size); - } - } - if (pool->active) { - ibmveth_error_printk("no active pool >= MTU\n"); - return -EPERM; - } - } - } else if (attr == &veth_num_attr) { - if (value <= 0 || value > IBMVETH_MAX_POOL_COUNT) - return -EINVAL; - else { - adapter->pool_config = 1; - ibmveth_close(netdev); - adapter->pool_config = 0; - pool->size = value; - if ((rc = ibmveth_open(netdev))) - return rc; - } - } else if (attr == &veth_size_attr) { - if (value <= IBMVETH_BUFF_OH || value > IBMVETH_MAX_BUF_SIZE) - return -EINVAL; - else { - adapter->pool_config = 1; - ibmveth_close(netdev); - adapter->pool_config = 0; - pool->buff_size = value; - if ((rc = ibmveth_open(netdev))) - return rc; - } - } - - /* kick the interrupt handler to allocate/deallocate pools */ - ibmveth_interrupt(netdev->irq, netdev, NULL); - return count; -} - - -#define ATTR(_name, _mode) \ - struct attribute veth_##_name##_attr = { \ - .name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE \ - }; - -static ATTR(active, 0644); -static ATTR(num, 0644); -static ATTR(size, 0644); - -static struct attribute * veth_pool_attrs[] = { - &veth_active_attr, - &veth_num_attr, - &veth_size_attr, - NULL, -}; - -static struct sysfs_ops veth_pool_ops = { - .show = veth_pool_show, - .store = veth_pool_store, -}; - -static struct kobj_type ktype_veth_pool = { - .release = NULL, - .sysfs_ops = &veth_pool_ops, - .default_attrs = veth_pool_attrs, -}; - - static struct vio_device_id ibmveth_device_table[] __devinitdata= { { "network", "IBM,l-lan"}, { "", "" } @@ -1322,7 +1198,7 @@ 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 index 8385bf836..46919a814 100644 --- a/drivers/net/ibmveth.h +++ b/drivers/net/ibmveth.h @@ -75,13 +75,10 @@ #define IbmVethNumBufferPools 5 #define IBMVETH_BUFF_OH 22 /* Overhead: 14 ethernet header + 8 opaque handle */ -#define IBMVETH_MAX_MTU 68 -#define IBMVETH_MAX_POOL_COUNT 4096 -#define IBMVETH_MAX_BUF_SIZE (1024 * 128) +/* pool_size should be sorted */ static int pool_size[] = { 512, 1024 * 2, 1024 * 16, 1024 * 32, 1024 * 64 }; static int pool_count[] = { 256, 768, 256, 256, 256 }; -static int pool_active[] = { 1, 1, 0, 0, 0}; #define IBM_VETH_INVALID_MAP ((u16)0xffff) @@ -97,7 +94,6 @@ struct ibmveth_buff_pool { dma_addr_t *dma_addr; struct sk_buff **skbuff; int active; - struct kobject kobj; }; struct ibmveth_rx_q { @@ -122,7 +118,6 @@ struct ibmveth_adapter { dma_addr_t filter_list_dma; struct ibmveth_buff_pool rx_buff_pool[IbmVethNumBufferPools]; struct ibmveth_rx_q rx_queue; - int pool_config; /* adapter specific stats */ u64 replenish_task_cycles; @@ -139,7 +134,7 @@ struct ibmveth_adapter { spinlock_t stats_lock; }; -struct ibmveth_buf_desc_fields { +struct ibmveth_buf_desc_fields { u32 valid : 1; u32 toggle : 1; u32 reserved : 6; @@ -148,7 +143,7 @@ struct ibmveth_buf_desc_fields { }; union ibmveth_buf_desc { - u64 desc; + u64 desc; struct ibmveth_buf_desc_fields fields; }; diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 43e3f33ed..2e222ef91 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -27,6 +27,7 @@ */ +#include #include #include #include @@ -271,7 +272,6 @@ static int __init ifb_init_module(void) for (i = 0; i < numifbs && !err; i++) err = ifb_init_one(i); if (err) { - i--; while (--i >= 0) ifb_free_one(i); } diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 68d8af7df..ae71ed57c 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c @@ -30,6 +30,7 @@ #define IOC3_NAME "ioc3-eth" #define IOC3_VERSION "2.6.3-3" +#include #include #include #include @@ -144,7 +145,7 @@ static inline struct sk_buff * ioc3_alloc_skb(unsigned long length, static inline unsigned long ioc3_map(void *ptr, unsigned long vdev) { #ifdef CONFIG_SGI_IP27 - vdev <<= 57; /* Shift to PCI64_ATTR_VIRTUAL */ + vdev <<= 58; /* Shift to PCI64_ATTR_VIRTUAL */ return vdev | (0xaUL << PCI64_ATTR_TARG_SHFT) | PCI64_ATTR_PREF | ((unsigned long)ptr & TO_PHYS_MASK); @@ -1063,7 +1064,7 @@ static int ioc3_open(struct net_device *dev) { struct ioc3_private *ip = netdev_priv(dev); - if (request_irq(dev->irq, ioc3_interrupt, IRQF_SHARED, ioc3_str, dev)) { + if (request_irq(dev->irq, ioc3_interrupt, SA_SHIRQ, ioc3_str, dev)) { printk(KERN_ERR "%s: Can't get irq %d\n", dev->name, dev->irq); return -EAGAIN; diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index e9e6d99a9..cff8598aa 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig @@ -350,7 +350,7 @@ config TOSHIBA_FIR config AU1000_FIR tristate "Alchemy Au1000 SIR/FIR" - depends on SOC_AU1000 && IRDA + depends on MIPS_AU1000 && IRDA config SMC_IRCC_FIR tristate "SMSC IrCC (EXPERIMENTAL)" @@ -417,20 +417,5 @@ config PXA_FICP available capabilities may vary from one PXA2xx target to another. -config MCS_FIR - tristate "MosChip MCS7780 IrDA-USB dongle" - depends on IRDA && USB && EXPERIMENTAL - help - Say Y or M here if you want to build support for the MosChip - MCS7780 IrDA-USB bridge device driver. - - USB bridge based on the MosChip MCS7780 don't conform to the - IrDA-USB device class specification, and therefore need their - own specific driver. Those dongles support SIR and FIR (4Mbps) - speeds. - - To compile it as a module, choose M here: the module will be called - mcs7780. - endmenu diff --git a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile index 5be09f1b9..c1ce2398e 100644 --- a/drivers/net/irda/Makefile +++ b/drivers/net/irda/Makefile @@ -19,7 +19,6 @@ obj-$(CONFIG_ALI_FIR) += ali-ircc.o obj-$(CONFIG_VLSI_FIR) += vlsi_ir.o obj-$(CONFIG_VIA_FIR) += via-ircc.o obj-$(CONFIG_PXA_FICP) += pxaficp_ir.o -obj-$(CONFIG_MCS_FIR) += mcs7780.o # Old dongle drivers for old SIR drivers obj-$(CONFIG_ESI_DONGLE_OLD) += esi.o obj-$(CONFIG_TEKRAM_DONGLE_OLD) += tekram.o diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index e3c8cd5ec..2e7882eb7 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c @@ -34,12 +34,14 @@ #include #include #include -#include #include #include #include +#include +#include + #include #include #include @@ -49,19 +51,7 @@ #define CHIP_IO_EXTENT 8 #define BROKEN_DONGLE_ID -#define ALI_IRCC_DRIVER_NAME "ali-ircc" - -/* Power Management */ -static int ali_ircc_suspend(struct platform_device *dev, pm_message_t state); -static int ali_ircc_resume(struct platform_device *dev); - -static struct platform_driver ali_ircc_driver = { - .suspend = ali_ircc_suspend, - .resume = ali_ircc_resume, - .driver = { - .name = ALI_IRCC_DRIVER_NAME, - }, -}; +static char *driver_name = "ali-ircc"; /* Module parameters */ static int qos_mtt_bits = 0x07; /* 1 ms or more */ @@ -107,7 +97,10 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self); static int ali_ircc_net_open(struct net_device *dev); static int ali_ircc_net_close(struct net_device *dev); static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); +static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data); static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud); +static void ali_ircc_suspend(struct ali_ircc_cb *self); +static void ali_ircc_wakeup(struct ali_ircc_cb *self); static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev); /* SIR function */ @@ -146,21 +139,12 @@ static int __init ali_ircc_init(void) { ali_chip_t *chip; chipio_t info; - int ret; + int ret = -ENODEV; int cfg, cfg_base; int reg, revision; int i = 0; IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); - - ret = platform_driver_register(&ali_ircc_driver); - if (ret) { - IRDA_ERROR("%s, Can't register driver!\n", - ALI_IRCC_DRIVER_NAME); - return ret; - } - - ret = -ENODEV; /* Probe for all the ALi chipsets we know about */ for (chip= chips; chip->name; chip++, i++) @@ -230,10 +214,6 @@ static int __init ali_ircc_init(void) } IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); - - if (ret) - platform_driver_unregister(&ali_ircc_driver); - return ret; } @@ -248,14 +228,14 @@ static void __exit ali_ircc_cleanup(void) int i; IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); + + pm_unregister_all(ali_ircc_pmproc); for (i=0; i < 4; i++) { if (dev_self[i]) ali_ircc_close(dev_self[i]); } - platform_driver_unregister(&ali_ircc_driver); - IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); } @@ -269,6 +249,7 @@ static int ali_ircc_open(int i, chipio_t *info) { struct net_device *dev; struct ali_ircc_cb *self; + struct pm_dev *pmdev; int dongle_id; int err; @@ -303,8 +284,7 @@ static int ali_ircc_open(int i, chipio_t *info) self->io.fifo_size = 16; /* SIR: 16, FIR: 32 Benjamin 2000/11/1 */ /* Reserve the ioports that we need */ - if (!request_region(self->io.fir_base, self->io.fir_ext, - ALI_IRCC_DRIVER_NAME)) { + if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) { IRDA_WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, self->io.fir_base); err = -ENODEV; @@ -374,10 +354,13 @@ static int ali_ircc_open(int i, chipio_t *info) /* Check dongle id */ dongle_id = ali_ircc_read_dongle_id(i, info); - IRDA_MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, - ALI_IRCC_DRIVER_NAME, dongle_types[dongle_id]); + IRDA_MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, driver_name, dongle_types[dongle_id]); self->io.dongle_id = dongle_id; + + pmdev = pm_register(PM_SYS_DEV, PM_SYS_IRDA, ali_ircc_pmproc); + if (pmdev) + pmdev->data = self; IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__); @@ -565,11 +548,12 @@ static int ali_ircc_setup(chipio_t *info) /* Should be 0x00 in the M1535/M1535D */ if(version != 0x00) { - IRDA_ERROR("%s, Wrong chip version %02x\n", - ALI_IRCC_DRIVER_NAME, version); + IRDA_ERROR("%s, Wrong chip version %02x\n", driver_name, version); return -1; } + // IRDA_MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, info->cfg_base); + /* Set FIR FIFO Threshold Register */ switch_bank(iobase, BANK1); outb(RX_FIFO_Threshold, iobase+FIR_FIFO_TR); @@ -599,8 +583,7 @@ static int ali_ircc_setup(chipio_t *info) /* Switch to SIR space */ FIR2SIR(iobase); - IRDA_MESSAGE("%s, driver loaded (Benjamin Kong)\n", - ALI_IRCC_DRIVER_NAME); + IRDA_MESSAGE("%s, driver loaded (Benjamin Kong)\n", driver_name); /* Enable receive interrupts */ // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM @@ -664,8 +647,7 @@ static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id, IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); if (!dev) { - IRDA_WARNING("%s: irq %d for unknown device.\n", - ALI_IRCC_DRIVER_NAME, irq); + IRDA_WARNING("%s: irq %d for unknown device.\n", driver_name, irq); return IRQ_NONE; } @@ -1346,8 +1328,7 @@ static int ali_ircc_net_open(struct net_device *dev) /* Request IRQ and install Interrupt Handler */ if (request_irq(self->io.irq, ali_ircc_interrupt, 0, dev->name, dev)) { - IRDA_WARNING("%s, unable to allocate irq=%d\n", - ALI_IRCC_DRIVER_NAME, + IRDA_WARNING("%s, unable to allocate irq=%d\n", driver_name, self->io.irq); return -EAGAIN; } @@ -1357,8 +1338,7 @@ static int ali_ircc_net_open(struct net_device *dev) * failure. */ if (request_dma(self->io.dma, dev->name)) { - IRDA_WARNING("%s, unable to allocate dma=%d\n", - ALI_IRCC_DRIVER_NAME, + IRDA_WARNING("%s, unable to allocate dma=%d\n", driver_name, self->io.dma); free_irq(self->io.irq, self); return -EAGAIN; @@ -2128,38 +2108,61 @@ static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev) return &self->stats; } -static int ali_ircc_suspend(struct platform_device *dev, pm_message_t state) +static void ali_ircc_suspend(struct ali_ircc_cb *self) { - struct ali_ircc_cb *self = platform_get_drvdata(dev); + IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); - IRDA_MESSAGE("%s, Suspending\n", ALI_IRCC_DRIVER_NAME); + IRDA_MESSAGE("%s, Suspending\n", driver_name); if (self->io.suspended) - return 0; + return; ali_ircc_net_close(self->netdev); self->io.suspended = 1; - return 0; + IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); } -static int ali_ircc_resume(struct platform_device *dev) +static void ali_ircc_wakeup(struct ali_ircc_cb *self) { - struct ali_ircc_cb *self = platform_get_drvdata(dev); + IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); if (!self->io.suspended) - return 0; + return; ali_ircc_net_open(self->netdev); - IRDA_MESSAGE("%s, Waking up\n", ALI_IRCC_DRIVER_NAME); + IRDA_MESSAGE("%s, Waking up\n", driver_name); self->io.suspended = 0; + + IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); +} +static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data) +{ + struct ali_ircc_cb *self = (struct ali_ircc_cb*) dev->data; + + IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ ); + + if (self) { + switch (rqst) { + case PM_SUSPEND: + ali_ircc_suspend(self); + break; + case PM_RESUME: + ali_ircc_wakeup(self); + break; + } + } + + IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ ); + return 0; } + /* ALi Chip Function */ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable) diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c index 7b2b4135b..e6b198576 100644 --- a/drivers/net/irda/au1k_ir.c +++ b/drivers/net/irda/au1k_ir.c @@ -18,6 +18,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include #include diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 33c07d527..910c0cab3 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c @@ -1372,7 +1372,7 @@ toshoboe_net_open (struct net_device *dev) return 0; if (request_irq (self->io.irq, toshoboe_interrupt, - IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) + SA_SHIRQ | SA_INTERRUPT, dev->name, (void *) self)) { return -EAGAIN; } @@ -1573,7 +1573,7 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) self->io.fir_base = self->base; self->io.fir_ext = OBOE_IO_EXTENT; self->io.irq = pci_dev->irq; - self->io.irqflags = IRQF_SHARED | IRQF_DISABLED; + self->io.irqflags = SA_SHIRQ | SA_INTERRUPT; self->speed = self->io.speed = 9600; self->async = 0; diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 2a0d538b3..cd87593e4 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -83,9 +83,9 @@ static struct usb_device_id dongles[] = { /* Extended Systems, Inc., XTNDAccess IrDA USB (ESI-9685) */ { USB_DEVICE(0x8e9, 0x100), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW }, /* SigmaTel STIR4210/4220/4116 USB IrDA (VFIR) Bridge */ - { USB_DEVICE(0x66f, 0x4210), .driver_info = IUC_STIR421X | IUC_SPEED_BUG }, - { USB_DEVICE(0x66f, 0x4220), .driver_info = IUC_STIR421X | IUC_SPEED_BUG }, - { USB_DEVICE(0x66f, 0x4116), .driver_info = IUC_STIR421X | IUC_SPEED_BUG }, + { USB_DEVICE(0x66f, 0x4210), .driver_info = IUC_STIR_4210 | IUC_SPEED_BUG }, + { USB_DEVICE(0x66f, 0x4220), .driver_info = IUC_STIR_4210 | IUC_SPEED_BUG }, + { USB_DEVICE(0x66f, 0x4116), .driver_info = IUC_STIR_4210 | IUC_SPEED_BUG }, { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS, .bInterfaceClass = USB_CLASS_APP_SPEC, @@ -154,7 +154,7 @@ static void irda_usb_build_header(struct irda_usb_cb *self, * and if either speed or xbofs (or both) needs * to be changed. */ - if (self->capability & IUC_STIR421X && + if (self->capability & IUC_STIR_4210 && ((self->new_speed != -1) || (self->new_xbofs != -1))) { /* With STIR421x, speed and xBOFs must be set at the same @@ -318,7 +318,7 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self) /* Set the new speed and xbofs in this fake frame */ irda_usb_build_header(self, frame, 1); - if (self->capability & IUC_STIR421X) { + if ( self->capability & IUC_STIR_4210 ) { if (frame[0] == 0) return ; // do nothing if no change frame[1] = 0; // other parameters don't change here frame[2] = 0; @@ -455,7 +455,7 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) /* Change setting for next frame */ - if (self->capability & IUC_STIR421X) { + if ( self->capability & IUC_STIR_4210 ) { __u8 turnaround_time; __u8* frame; turnaround_time = get_turnaround_time( skb ); @@ -897,13 +897,10 @@ static void irda_usb_receive(struct urb *urb, struct pt_regs *regs) docopy = (urb->actual_length < IRDA_RX_COPY_THRESHOLD); /* Allocate a new skb */ - if (self->capability & IUC_STIR421X) - newskb = dev_alloc_skb(docopy ? urb->actual_length : - IRDA_SKB_MAX_MTU + - USB_IRDA_STIR421X_HEADER); + if ( self->capability & IUC_STIR_4210 ) + newskb = dev_alloc_skb(docopy ? urb->actual_length : IRDA_SKB_MAX_MTU + USB_IRDA_SIGMATEL_HEADER); else - newskb = dev_alloc_skb(docopy ? urb->actual_length : - IRDA_SKB_MAX_MTU); + newskb = dev_alloc_skb(docopy ? urb->actual_length : IRDA_SKB_MAX_MTU); if (!newskb) { self->stats.rx_dropped++; @@ -1025,140 +1022,188 @@ static int irda_usb_is_receiving(struct irda_usb_cb *self) return 0; /* For now */ } -#define STIR421X_PATCH_PRODUCT_VER "Product Version: " -#define STIR421X_PATCH_STMP_TAG "STMP" -#define STIR421X_PATCH_CODE_OFFSET 512 /* patch image starts before here */ -/* marks end of patch file header (PC DOS text file EOF character) */ -#define STIR421X_PATCH_END_OF_HDR_TAG 0x1A -#define STIR421X_PATCH_BLOCK_SIZE 1023 + +#define STIR421X_PATCH_PRODUCT_VERSION_STR "Product Version: " +#define STIR421X_PATCH_COMPONENT_VERSION_STR "Component Version: " +#define STIR421X_PATCH_DATA_TAG_STR "STMP" +#define STIR421X_PATCH_FILE_VERSION_MAX_OFFSET 512 /* version info is before here */ +#define STIR421X_PATCH_FILE_IMAGE_MAX_OFFSET 512 /* patch image starts before here */ +#define STIR421X_PATCH_FILE_END_OF_HEADER_TAG 0x1A /* marks end of patch file header (PC DOS text file EOF character) */ /* - * Function stir421x_fwupload (struct irda_usb_cb *self, - * unsigned char *patch, - * const unsigned int patch_len) - * - * Upload firmware code to SigmaTel 421X IRDA-USB dongle + * Known firmware patches for STIR421x dongles */ -static int stir421x_fw_upload(struct irda_usb_cb *self, - unsigned char *patch, - const unsigned int patch_len) +static char * stir421x_patches[] = { + "42101001.sb", + "42101002.sb", +}; + +static int stir421x_get_patch_version(unsigned char * patch, const unsigned long patch_len) { - int ret = -ENOMEM; - int actual_len = 0; - unsigned int i; - unsigned int block_size = 0; - unsigned char *patch_block; - - patch_block = kzalloc(STIR421X_PATCH_BLOCK_SIZE, GFP_KERNEL); - if (patch_block == NULL) - return -ENOMEM; - - /* break up patch into 1023-byte sections */ - for (i = 0; i < patch_len; i += block_size) { - block_size = patch_len - i; - - if (block_size > STIR421X_PATCH_BLOCK_SIZE) - block_size = STIR421X_PATCH_BLOCK_SIZE; - - /* upload the patch section */ - memcpy(patch_block, patch + i, block_size); - - ret = usb_bulk_msg(self->usbdev, - usb_sndbulkpipe(self->usbdev, - self->bulk_out_ep), - patch_block, block_size, - &actual_len, msecs_to_jiffies(500)); - IRDA_DEBUG(3,"%s(): Bulk send %u bytes, ret=%d\n", - __FUNCTION__, actual_len, ret); - - if (ret < 0) - break; + unsigned int version_offset; + unsigned long version_major, version_minor, version_build; + unsigned char * version_start; + int version_found = 0; + + for (version_offset = 0; + version_offset < STIR421X_PATCH_FILE_END_OF_HEADER_TAG; + version_offset++) { + if (!memcmp(patch + version_offset, + STIR421X_PATCH_PRODUCT_VERSION_STR, + sizeof(STIR421X_PATCH_PRODUCT_VERSION_STR) - 1)) { + version_found = 1; + version_start = patch + + version_offset + + sizeof(STIR421X_PATCH_PRODUCT_VERSION_STR) - 1; + break; + } } - kfree(patch_block); + /* We couldn't find a product version on this patch */ + if (!version_found) + return -EINVAL; + + /* Let's check if the product version is dotted */ + if (version_start[3] != '.' || + version_start[7] != '.') + return -EINVAL; + + version_major = simple_strtoul(version_start, NULL, 10); + version_minor = simple_strtoul(version_start + 4, NULL, 10); + version_build = simple_strtoul(version_start + 8, NULL, 10); + + IRDA_DEBUG(2, "%s(), Major: %ld Minor: %ld Build: %ld\n", + __FUNCTION__, + version_major, version_minor, version_build); + + return (((version_major) << 12) + + ((version_minor) << 8) + + ((version_build / 10) << 4) + + (version_build % 10)); + +} + + +static int stir421x_upload_patch (struct irda_usb_cb *self, + unsigned char * patch, + const unsigned int patch_len) +{ + int retval = 0; + int actual_len; + unsigned int i = 0, download_amount = 0; + unsigned char * patch_chunk; + + IRDA_DEBUG (2, "%s(), Uploading STIR421x Patch\n", __FUNCTION__); + + patch_chunk = kzalloc(STIR421X_MAX_PATCH_DOWNLOAD_SIZE, GFP_KERNEL); + if (patch_chunk == NULL) + return -ENOMEM; + + /* break up patch into 1023-byte sections */ + for (i = 0; retval >= 0 && i < patch_len; i += download_amount) { + download_amount = patch_len - i; + if (download_amount > STIR421X_MAX_PATCH_DOWNLOAD_SIZE) + download_amount = STIR421X_MAX_PATCH_DOWNLOAD_SIZE; + + /* download the patch section */ + memcpy(patch_chunk, patch + i, download_amount); + + retval = usb_bulk_msg (self->usbdev, + usb_sndbulkpipe (self->usbdev, + self->bulk_out_ep), + patch_chunk, download_amount, + &actual_len, msecs_to_jiffies (500)); + IRDA_DEBUG (2, "%s(), Sent %u bytes\n", __FUNCTION__, + actual_len); + if (retval == 0) + mdelay(10); + } + + kfree(patch_chunk); + + if (i != patch_len) { + IRDA_ERROR ("%s(), Pushed %d bytes (!= patch_len (%d))\n", + __FUNCTION__, i, patch_len); + retval = -EIO; + } + + if (retval < 0) + /* todo - mark device as not ready */ + IRDA_ERROR ("%s(), STIR421x patch upload failed (%d)\n", + __FUNCTION__, retval); + + return retval; +} - return ret; - } -/* - * Function stir421x_patch_device(struct irda_usb_cb *self) - * - * Get a firmware code from userspase using hotplug request_firmware() call - */ static int stir421x_patch_device(struct irda_usb_cb *self) { - unsigned int i; - int ret; - char stir421x_fw_name[11]; - const struct firmware *fw; - unsigned char *fw_version_ptr; /* pointer to version string */ - unsigned long fw_version = 0; - - /* - * Known firmware patch file names for STIR421x dongles - * are "42101001.sb" or "42101002.sb" - */ - sprintf(stir421x_fw_name, "4210%4X.sb", - self->usbdev->descriptor.bcdDevice); - ret = request_firmware(&fw, stir421x_fw_name, &self->usbdev->dev); - if (ret < 0) - return ret; - - /* We get a patch from userspace */ - IRDA_MESSAGE("%s(): Received firmware %s (%zu bytes)\n", - __FUNCTION__, stir421x_fw_name, fw->size); - - ret = -EINVAL; - - /* Get the bcd product version */ - if (!memcmp(fw->data, STIR421X_PATCH_PRODUCT_VER, - sizeof(STIR421X_PATCH_PRODUCT_VER) - 1)) { - fw_version_ptr = fw->data + - sizeof(STIR421X_PATCH_PRODUCT_VER) - 1; - - /* Let's check if the product version is dotted */ - if (fw_version_ptr[3] == '.' && - fw_version_ptr[7] == '.') { - unsigned long major, minor, build; - major = simple_strtoul(fw_version_ptr, NULL, 10); - minor = simple_strtoul(fw_version_ptr + 4, NULL, 10); - build = simple_strtoul(fw_version_ptr + 8, NULL, 10); - - fw_version = (major << 12) - + (minor << 8) - + ((build / 10) << 4) - + (build % 10); - - IRDA_DEBUG(3, "%s(): Firmware Product version %ld\n", - __FUNCTION__, fw_version); - } - } - - if (self->usbdev->descriptor.bcdDevice == fw_version) { - /* - * If we're here, we've found a correct patch - * The actual image starts after the "STMP" keyword - * so forward to the firmware header tag - */ - for (i = 0; (fw->data[i] != STIR421X_PATCH_END_OF_HDR_TAG) - && (i < fw->size); i++) ; - /* here we check for the out of buffer case */ - if ((STIR421X_PATCH_END_OF_HDR_TAG == fw->data[i]) - && (i < STIR421X_PATCH_CODE_OFFSET)) { - if (!memcmp(fw->data + i + 1, STIR421X_PATCH_STMP_TAG, - sizeof(STIR421X_PATCH_STMP_TAG) - 1)) { - - /* We can upload the patch to the target */ - i += sizeof(STIR421X_PATCH_STMP_TAG); - ret = stir421x_fw_upload(self, &fw->data[i], - fw->size - i); - } - } - } - - release_firmware(fw); - - return ret; + unsigned int i, patch_found = 0, data_found = 0, data_offset; + int patch_version, ret = 0; + const struct firmware *fw_entry; + + for (i = 0; i < ARRAY_SIZE(stir421x_patches); i++) { + if(request_firmware(&fw_entry, stir421x_patches[i], &self->usbdev->dev) != 0) { + IRDA_ERROR( "%s(), Patch %s is not available\n", __FUNCTION__, stir421x_patches[i]); + continue; + } + + /* We found a patch from userspace */ + patch_version = stir421x_get_patch_version (fw_entry->data, fw_entry->size); + + if (patch_version < 0) { + /* Couldn't fetch a version, let's move on to the next file */ + IRDA_ERROR("%s(), version parsing failed\n", __FUNCTION__); + ret = patch_version; + release_firmware(fw_entry); + continue; + } + + if (patch_version != self->usbdev->descriptor.bcdDevice) { + /* Patch version and device don't match */ + IRDA_ERROR ("%s(), wrong patch version (%d <-> %d)\n", + __FUNCTION__, + patch_version, self->usbdev->descriptor.bcdDevice); + ret = -EINVAL; + release_firmware(fw_entry); + continue; + } + + /* If we're here, we've found a correct patch */ + patch_found = 1; + break; + + } + + /* We couldn't find a valid firmware, let's leave */ + if (!patch_found) + return ret; + + /* The actual image starts after the "STMP" keyword */ + for (data_offset = 0; data_offset < STIR421X_PATCH_FILE_IMAGE_MAX_OFFSET; data_offset++) { + if (!memcmp(fw_entry->data + data_offset, + STIR421X_PATCH_DATA_TAG_STR, + sizeof(STIR421X_PATCH_FILE_IMAGE_MAX_OFFSET))) { + IRDA_DEBUG(2, "%s(), found patch data for STIR421x at offset %d\n", + __FUNCTION__, data_offset); + data_found = 1; + break; + } + } + + /* We couldn't find "STMP" from the header */ + if (!data_found) + return -EINVAL; + + /* Let's upload the patch to the target */ + ret = stir421x_upload_patch(self, + &fw_entry->data[data_offset + sizeof(STIR421X_PATCH_FILE_IMAGE_MAX_OFFSET)], + fw_entry->size - (data_offset + sizeof(STIR421X_PATCH_FILE_IMAGE_MAX_OFFSET))); + + release_firmware(fw_entry); + + return ret; + } @@ -1657,12 +1702,12 @@ static int irda_usb_probe(struct usb_interface *intf, init_timer(&self->rx_defer_timer); self->capability = id->driver_info; - self->needspatch = ((self->capability & IUC_STIR421X) != 0); + self->needspatch = ((self->capability & IUC_STIR_4210) != 0) ; /* Create all of the needed urbs */ - if (self->capability & IUC_STIR421X) { + if (self->capability & IUC_STIR_4210) { self->max_rx_urb = IU_SIGMATEL_MAX_RX_URBS; - self->header_length = USB_IRDA_STIR421X_HEADER; + self->header_length = USB_IRDA_SIGMATEL_HEADER; } else { self->max_rx_urb = IU_MAX_RX_URBS; self->header_length = USB_IRDA_HEADER; @@ -1768,8 +1813,8 @@ static int irda_usb_probe(struct usb_interface *intf, /* Now we fetch and upload the firmware patch */ ret = stir421x_patch_device(self); self->needspatch = (ret < 0); - if (self->needspatch) { - IRDA_ERROR("STIR421X: Couldn't upload patch\n"); + if (ret < 0) { + printk("patch_device failed\n"); goto err_out_5; } diff --git a/drivers/net/irda/irda-usb.h b/drivers/net/irda/irda-usb.h index 6b2271f18..d833db52c 100644 --- a/drivers/net/irda/irda-usb.h +++ b/drivers/net/irda/irda-usb.h @@ -34,6 +34,9 @@ #include #include /* struct irlap_cb */ +#define PATCH_FILE_SIZE_MAX 65536 +#define PATCH_FILE_SIZE_MIN 80 + #define RX_COPY_THRESHOLD 200 #define IRDA_USB_MAX_MTU 2051 #define IRDA_USB_SPEED_MTU 64 /* Weird, but work like this */ @@ -104,15 +107,14 @@ #define IUC_SMALL_PKT 0x10 /* Device doesn't behave with big Rx packets */ #define IUC_MAX_WINDOW 0x20 /* Device underestimate the Rx window */ #define IUC_MAX_XBOFS 0x40 /* Device need more xbofs than advertised */ -#define IUC_STIR421X 0x80 /* SigmaTel 4210/4220/4116 VFIR */ +#define IUC_STIR_4210 0x80 /* SigmaTel 4210/4220/4116 VFIR */ /* USB class definitions */ #define USB_IRDA_HEADER 0x01 #define USB_CLASS_IRDA 0x02 /* USB_CLASS_APP_SPEC subclass */ #define USB_DT_IRDA 0x21 -#define USB_IRDA_STIR421X_HEADER 0x03 -#define IU_SIGMATEL_MAX_RX_URBS (IU_MAX_ACTIVE_RX_URBS + \ - USB_IRDA_STIR421X_HEADER) +#define USB_IRDA_SIGMATEL_HEADER 0x03 +#define IU_SIGMATEL_MAX_RX_URBS (IU_MAX_ACTIVE_RX_URBS + USB_IRDA_SIGMATEL_HEADER) struct irda_class_desc { __u8 bLength; diff --git a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c index 44efd49bf..98fa5319e 100644 --- a/drivers/net/irda/irport.c +++ b/drivers/net/irda/irport.c @@ -386,7 +386,7 @@ static int __irport_change_speed(struct irda_task *task) /* Locking notes : this function may be called from irq context with * spinlock, via irport_write_wakeup(), or from non-interrupt without * spinlock (from the task timer). Yuck ! - * This is ugly, and unsafe is the spinlock is not already acquired. + * This is ugly, and unsafe is the spinlock is not already aquired. * This will be fixed when irda-task get rewritten. * Jean II */ if (!spin_is_locked(&self->lock)) { diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c deleted file mode 100644 index 415ba8dc9..000000000 --- a/drivers/net/irda/mcs7780.c +++ /dev/null @@ -1,1008 +0,0 @@ -/***************************************************************************** -* -* Filename: mcs7780.c -* Version: 0.4-alpha -* Description: Irda MosChip USB Dongle Driver -* Authors: Lukasz Stelmach -* Brian Pugh -* Judy Fischbach -* -* Based on stir4200 driver, but some things done differently. -* Based on earlier driver by Paul Stewart -* -* Copyright (C) 2000, Roman Weissgaerber -* Copyright (C) 2001, Dag Brattli -* Copyright (C) 2001, Jean Tourrilhes -* Copyright (C) 2004, Stephen Hemminger -* Copyright (C) 2005, Lukasz Stelmach -* Copyright (C) 2005, Brian Pugh -* Copyright (C) 2005, Judy Fischbach -* -* 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. -* -*****************************************************************************/ - -/* - * MCS7780 is a simple USB to IrDA bridge by MosChip. It is neither - * compatibile with irda-usb nor with stir4200. Although it is quite - * similar to the later as far as general idea of operation is concerned. - * That is it requires the software to do all the framing job at SIR speeds. - * The hardware does take care of the framing at MIR and FIR speeds. - * It supports all speeds from 2400 through 4Mbps - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "mcs7780.h" - -#define MCS_VENDOR_ID 0x9710 -#define MCS_PRODUCT_ID 0x7780 - -static struct usb_device_id mcs_table[] = { - /* MosChip Corp., MCS7780 FIR-USB Adapter */ - {USB_DEVICE(MCS_VENDOR_ID, MCS_PRODUCT_ID)}, - {}, -}; - -MODULE_AUTHOR("Brian Pugh "); -MODULE_DESCRIPTION("IrDA-USB Dongle Driver for MosChip MCS7780"); -MODULE_VERSION("0.3alpha"); -MODULE_LICENSE("GPL"); - -MODULE_DEVICE_TABLE(usb, mcs_table); - -static int qos_mtt_bits = 0x07 /* > 1ms */ ; -module_param(qos_mtt_bits, int, 0); -MODULE_PARM_DESC(qos_mtt_bits, "Minimum Turn Time"); - -static int receive_mode = 0x1; -module_param(receive_mode, int, 0); -MODULE_PARM_DESC(receive_mode, - "Receive mode of the device (1:fast, 0:slow, default:1)"); - -static int sir_tweak = 1; -module_param(sir_tweak, int, 0444); -MODULE_PARM_DESC(sir_tweak, - "Default pulse width (1:1.6us, 0:3/16 bit, default:1)."); - -static int transceiver_type = MCS_TSC_VISHAY; -module_param(transceiver_type, int, 0444); -MODULE_PARM_DESC(transceiver_type, "IR transceiver type, see mcs7780.h."); - -static struct usb_driver mcs_driver = { - .name = "mcs7780", - .probe = mcs_probe, - .disconnect = mcs_disconnect, - .id_table = mcs_table, -}; - -/* speed flag selection by direct addressing. -addr = (speed >> 8) & 0x0f - -0x1 57600 0x2 115200 0x4 1152000 0x5 9600 -0x6 38400 0x9 2400 0xa 576000 0xb 19200 - -4Mbps (or 2400) must be checked separately. Since it also has -to be programmed in a different manner that is not a big problem. -*/ -static __u16 mcs_speed_set[16] = { 0, - MCS_SPEED_57600, - MCS_SPEED_115200, - 0, - MCS_SPEED_1152000, - MCS_SPEED_9600, - MCS_SPEED_38400, - 0, 0, - MCS_SPEED_2400, - MCS_SPEED_576000, - MCS_SPEED_19200, - 0, 0, 0, -}; - -/* Set given 16 bit register with a 16 bit value. Send control message - * to set dongle register. */ -static int mcs_set_reg(struct mcs_cb *mcs, __u16 reg, __u16 val) -{ - struct usb_device *dev = mcs->usbdev; - return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), MCS_WRREQ, - MCS_WR_RTYPE, val, reg, NULL, 0, - msecs_to_jiffies(MCS_CTRL_TIMEOUT)); -} - -/* Get 16 bit register value. Send contol message to read dongle register. */ -static int mcs_get_reg(struct mcs_cb *mcs, __u16 reg, __u16 * val) -{ - struct usb_device *dev = mcs->usbdev; - int ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), MCS_RDREQ, - MCS_RD_RTYPE, 0, reg, val, 2, - msecs_to_jiffies(MCS_CTRL_TIMEOUT)); - - return ret; -} - -/* Setup a communication between mcs7780 and TFDU chips. It is described - * in more detail in the data sheet. The setup sequence puts the the - * vishay tranceiver into high speed mode. It will also receive SIR speed - * packets but at reduced sensitivity. - */ - -/* 0: OK 1:ERROR */ -static inline int mcs_setup_transceiver_vishay(struct mcs_cb *mcs) -{ - int ret = 0; - __u16 rval; - - /* mcs_get_reg should read exactly two bytes from the dongle */ - ret = mcs_get_reg(mcs, MCS_XCVR_REG, &rval); - if (unlikely(ret != 2)) { - ret = -EIO; - goto error; - } - - /* The MCS_XCVR_CONF bit puts the transceiver into configuration - * mode. The MCS_MODE0 bit must start out high (1) and then - * transition to low and the MCS_STFIR and MCS_MODE1 bits must - * be low. - */ - rval |= (MCS_MODE0 | MCS_XCVR_CONF); - rval &= ~MCS_STFIR; - rval &= ~MCS_MODE1; - ret = mcs_set_reg(mcs, MCS_XCVR_REG, rval); - if (unlikely(ret)) - goto error; - - rval &= ~MCS_MODE0; - ret = mcs_set_reg(mcs, MCS_XCVR_REG, rval); - if (unlikely(ret)) - goto error; - - rval &= ~MCS_XCVR_CONF; - ret = mcs_set_reg(mcs, MCS_XCVR_REG, rval); - if (unlikely(ret)) - goto error; - - ret = 0; - error: - return ret; -} - -/* Setup a communication between mcs7780 and agilent chip. */ -static inline int mcs_setup_transceiver_agilent(struct mcs_cb *mcs) -{ - IRDA_WARNING("This transceiver type is not supported yet."); - return 1; -} - -/* Setup a communication between mcs7780 and sharp chip. */ -static inline int mcs_setup_transceiver_sharp(struct mcs_cb *mcs) -{ - IRDA_WARNING("This transceiver type is not supported yet."); - return 1; -} - -/* Common setup for all transceivers */ -static inline int mcs_setup_transceiver(struct mcs_cb *mcs) -{ - int ret = 0; - __u16 rval; - char *msg; - - msg = "Basic transceiver setup error."; - - /* read value of MODE Register, set the DRIVER and RESET bits - * and write value back out to MODE Register - */ - ret = mcs_get_reg(mcs, MCS_MODE_REG, &rval); - if(unlikely(ret != 2)) - goto error; - rval |= MCS_DRIVER; /* put the mcs7780 into configuration mode. */ - ret = mcs_set_reg(mcs, MCS_MODE_REG, rval); - if(unlikely(ret)) - goto error; - - rval = 0; /* set min pulse width to 0 initially. */ - ret = mcs_set_reg(mcs, MCS_MINRXPW_REG, rval); - if(unlikely(ret)) - goto error; - - ret = mcs_get_reg(mcs, MCS_MODE_REG, &rval); - if(unlikely(ret != 2)) - goto error; - - rval &= ~MCS_FIR; /* turn off fir mode. */ - if(mcs->sir_tweak) - rval |= MCS_SIR16US; /* 1.6us pulse width */ - else - rval &= ~MCS_SIR16US; /* 3/16 bit time pulse width */ - - /* make sure ask mode and back to back packets are off. */ - rval &= ~(MCS_BBTG | MCS_ASK); - - rval &= ~MCS_SPEED_MASK; - rval |= MCS_SPEED_9600; /* make sure initial speed is 9600. */ - mcs->speed = 9600; - mcs->new_speed = 0; /* new_speed is set to 0 */ - rval &= ~MCS_PLLPWDN; /* disable power down. */ - - /* make sure device determines direction and that the auto send sip - * pulse are on. - */ - rval |= MCS_DTD | MCS_SIPEN; - - ret = mcs_set_reg(mcs, MCS_MODE_REG, rval); - if(unlikely(ret)) - goto error; - - msg = "transceiver model specific setup error."; - switch (mcs->transceiver_type) { - case MCS_TSC_VISHAY: - ret = mcs_setup_transceiver_vishay(mcs); - break; - - case MCS_TSC_SHARP: - ret = mcs_setup_transceiver_sharp(mcs); - break; - - case MCS_TSC_AGILENT: - ret = mcs_setup_transceiver_agilent(mcs); - break; - - default: - IRDA_WARNING("Unknown transceiver type: %d", - mcs->transceiver_type); - ret = 1; - } - if (unlikely(ret)) - goto error; - - /* If transceiver is not SHARP, then if receive mode set - * on the RXFAST bit in the XCVR Register otherwise unset it - */ - if (mcs->transceiver_type != MCS_TSC_SHARP) { - - ret = mcs_get_reg(mcs, MCS_XCVR_REG, &rval); - if (unlikely(ret != 2)) - goto error; - if (mcs->receive_mode) - rval |= MCS_RXFAST; - else - rval &= ~MCS_RXFAST; - ret = mcs_set_reg(mcs, MCS_XCVR_REG, rval); - if (unlikely(ret)) - goto error; - } - - msg = "transceiver reset."; - - ret = mcs_get_reg(mcs, MCS_MODE_REG, &rval); - if (unlikely(ret != 2)) - goto error; - - /* reset the mcs7780 so all changes take effect. */ - rval &= ~MCS_RESET; - ret = mcs_set_reg(mcs, MCS_MODE_REG, rval); - if (unlikely(ret)) - goto error; - else - return ret; - -error: - IRDA_ERROR("%s", msg); - return ret; -} - -/* Wraps the data in format for SIR */ -static inline int mcs_wrap_sir_skb(struct sk_buff *skb, __u8 * buf) -{ - int wraplen; - - /* 2: full frame length, including "the length" */ - wraplen = async_wrap_skb(skb, buf + 2, 4094); - - wraplen += 2; - buf[0] = wraplen & 0xff; - buf[1] = (wraplen >> 8) & 0xff; - - return wraplen; -} - -/* Wraps the data in format for FIR */ -static unsigned mcs_wrap_fir_skb(const struct sk_buff *skb, __u8 *buf) -{ - unsigned int len = 0; - __u32 fcs = ~(crc32_le(~0, skb->data, skb->len)); - - /* add 2 bytes for length value and 4 bytes for fcs. */ - len = skb->len + 6; - - /* The mcs7780 requires that the first two bytes are the packet - * length in little endian order. Note: the length value includes - * the two bytes for the length value itself. - */ - buf[0] = len & 0xff; - buf[1] = (len >> 8) & 0xff; - /* copy the data into the tx buffer. */ - memcpy(buf+2, skb->data, skb->len); - /* put the fcs in the last four bytes in little endian order. */ - buf[len - 4] = fcs & 0xff; - buf[len - 3] = (fcs >> 8) & 0xff; - buf[len - 2] = (fcs >> 16) & 0xff; - buf[len - 1] = (fcs >> 24) & 0xff; - - return len; -} - -/* Wraps the data in format for MIR */ -static unsigned mcs_wrap_mir_skb(const struct sk_buff *skb, __u8 *buf) -{ - __u16 fcs = 0; - int len = skb->len + 4; - - fcs = ~(irda_calc_crc16(~fcs, skb->data, skb->len)); - /* put the total packet length in first. Note: packet length - * value includes the two bytes that hold the packet length - * itself. - */ - buf[0] = len & 0xff; - buf[1] = (len >> 8) & 0xff; - /* copy the data */ - memcpy(buf+2, skb->data, skb->len); - /* put the fcs in last two bytes in little endian order. */ - buf[len - 2] = fcs & 0xff; - buf[len - 1] = (fcs >> 8) & 0xff; - - return len; -} - -/* Unwrap received packets at MIR speed. A 16 bit crc_ccitt checksum is - * used for the fcs. When performed over the entire packet the result - * should be GOOD_FCS = 0xf0b8. Hands the unwrapped data off to the IrDA - * layer via a sk_buff. - */ -static void mcs_unwrap_mir(struct mcs_cb *mcs, __u8 *buf, int len) -{ - __u16 fcs; - int new_len; - struct sk_buff *skb; - - /* Assume that the frames are going to fill a single packet - * rather than span multiple packets. - */ - - new_len = len - 2; - if(unlikely(new_len <= 0)) { - IRDA_ERROR("%s short frame length %d\n", - mcs->netdev->name, new_len); - ++mcs->stats.rx_errors; - ++mcs->stats.rx_length_errors; - return; - } - fcs = 0; - fcs = irda_calc_crc16(~fcs, buf, len); - - if(fcs != GOOD_FCS) { - IRDA_ERROR("crc error calc 0x%x len %d\n", - fcs, new_len); - mcs->stats.rx_errors++; - mcs->stats.rx_crc_errors++; - return; - } - - skb = dev_alloc_skb(new_len + 1); - if(unlikely(!skb)) { - ++mcs->stats.rx_dropped; - return; - } - - skb_reserve(skb, 1); - memcpy(skb->data, buf, new_len); - skb_put(skb, new_len); - skb->mac.raw = skb->data; - skb->protocol = htons(ETH_P_IRDA); - skb->dev = mcs->netdev; - - netif_rx(skb); - - mcs->stats.rx_packets++; - mcs->stats.rx_bytes += new_len; - - return; -} - -/* Unwrap received packets at FIR speed. A 32 bit crc_ccitt checksum is - * used for the fcs. Hands the unwrapped data off to the IrDA - * layer via a sk_buff. - */ -static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len) -{ - __u32 fcs; - int new_len; - struct sk_buff *skb; - - /* Assume that the frames are going to fill a single packet - * rather than span multiple packets. This is most likely a false - * assumption. - */ - - new_len = len - 4; - if(unlikely(new_len <= 0)) { - IRDA_ERROR("%s short frame length %d\n", - mcs->netdev->name, new_len); - ++mcs->stats.rx_errors; - ++mcs->stats.rx_length_errors; - return; - } - - fcs = ~(crc32_le(~0, buf, new_len)); - if(fcs != le32_to_cpu(get_unaligned((u32 *)(buf+new_len)))) { - IRDA_ERROR("crc error calc 0x%x len %d\n", fcs, new_len); - mcs->stats.rx_errors++; - mcs->stats.rx_crc_errors++; - return; - } - - skb = dev_alloc_skb(new_len + 1); - if(unlikely(!skb)) { - ++mcs->stats.rx_dropped; - return; - } - - skb_reserve(skb, 1); - memcpy(skb->data, buf, new_len); - skb_put(skb, new_len); - skb->mac.raw = skb->data; - skb->protocol = htons(ETH_P_IRDA); - skb->dev = mcs->netdev; - - netif_rx(skb); - - mcs->stats.rx_packets++; - mcs->stats.rx_bytes += new_len; - - return; -} - - -/* Allocates urbs for both receive and transmit. - * If alloc fails return error code 0 (fail) otherwise - * return error code 1 (success). - */ -static inline int mcs_setup_urbs(struct mcs_cb *mcs) -{ - mcs->rx_urb = NULL; - - mcs->tx_urb = usb_alloc_urb(0, GFP_KERNEL); - if (!mcs->tx_urb) - return 0; - - mcs->rx_urb = usb_alloc_urb(0, GFP_KERNEL); - if (!mcs->rx_urb) - return 0; - - return 1; -} - -/* Sets up state to be initially outside frame, gets receive urb, - * sets status to successful and then submits the urb to start - * receiving the data. - */ -static inline int mcs_receive_start(struct mcs_cb *mcs) -{ - mcs->rx_buff.in_frame = FALSE; - mcs->rx_buff.state = OUTSIDE_FRAME; - - usb_fill_bulk_urb(mcs->rx_urb, mcs->usbdev, - usb_rcvbulkpipe(mcs->usbdev, mcs->ep_in), - mcs->in_buf, 4096, mcs_receive_irq, mcs); - - mcs->rx_urb->status = 0; - return usb_submit_urb(mcs->rx_urb, GFP_KERNEL); -} - -/* Finds the in and out endpoints for the mcs control block */ -static inline int mcs_find_endpoints(struct mcs_cb *mcs, - struct usb_host_endpoint *ep, int epnum) -{ - int i; - int ret = 0; - - /* If no place to store the endpoints just return */ - if (!ep) - return ret; - - /* cycle through all endpoints, find the first two that are DIR_IN */ - for (i = 0; i < epnum; i++) { - if (ep[i].desc.bEndpointAddress & USB_DIR_IN) - mcs->ep_in = ep[i].desc.bEndpointAddress; - else - mcs->ep_out = ep[i].desc.bEndpointAddress; - - /* MosChip says that the chip has only two bulk - * endpoints. Find one for each direction and move on. - */ - if ((mcs->ep_in != 0) && (mcs->ep_out != 0)) { - ret = 1; - break; - } - } - - return ret; -} - -static void mcs_speed_work(void *arg) -{ - struct mcs_cb *mcs = arg; - struct net_device *netdev = mcs->netdev; - - mcs_speed_change(mcs); - netif_wake_queue(netdev); -} - -/* Function to change the speed of the mcs7780. Fully supports SIR, - * MIR, and FIR speeds. - */ -static int mcs_speed_change(struct mcs_cb *mcs) -{ - int ret = 0; - int rst = 0; - int cnt = 0; - __u16 nspeed; - __u16 rval; - - nspeed = mcs_speed_set[(mcs->new_speed >> 8) & 0x0f]; - - do { - mcs_get_reg(mcs, MCS_RESV_REG, &rval); - } while(cnt++ < 100 && (rval & MCS_IRINTX)); - - if(cnt >= 100) { - IRDA_ERROR("unable to change speed"); - ret = -EIO; - goto error; - } - - mcs_get_reg(mcs, MCS_MODE_REG, &rval); - - /* MINRXPW values recomended by MosChip */ - if (mcs->new_speed <= 115200) { - rval &= ~MCS_FIR; - - if ((rst = (mcs->speed > 115200))) - mcs_set_reg(mcs, MCS_MINRXPW_REG, 0); - - } else if (mcs->new_speed <= 1152000) { - rval &= ~MCS_FIR; - - if ((rst = !(mcs->speed == 576000 || mcs->speed == 1152000))) - mcs_set_reg(mcs, MCS_MINRXPW_REG, 5); - - } else { - rval |= MCS_FIR; - - if ((rst = (mcs->speed != 4000000))) - mcs_set_reg(mcs, MCS_MINRXPW_REG, 5); - - } - - rval &= ~MCS_SPEED_MASK; - rval |= nspeed; - - ret = mcs_set_reg(mcs, MCS_MODE_REG, rval); - if (unlikely(ret)) - goto error; - - if (rst) - switch (mcs->transceiver_type) { - case MCS_TSC_VISHAY: - ret = mcs_setup_transceiver_vishay(mcs); - break; - - case MCS_TSC_SHARP: - ret = mcs_setup_transceiver_sharp(mcs); - break; - - case MCS_TSC_AGILENT: - ret = mcs_setup_transceiver_agilent(mcs); - break; - - default: - ret = 1; - IRDA_WARNING("Unknown transceiver type: %d", - mcs->transceiver_type); - } - if (unlikely(ret)) - goto error; - - mcs_get_reg(mcs, MCS_MODE_REG, &rval); - rval &= ~MCS_RESET; - ret = mcs_set_reg(mcs, MCS_MODE_REG, rval); - - mcs->speed = mcs->new_speed; - error: - mcs->new_speed = 0; - return ret; -} - -/* Ioctl calls not supported at this time. Can be an area of future work. */ -static int mcs_net_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) -{ - /* struct if_irda_req *irq = (struct if_irda_req *)rq; */ - /* struct mcs_cb *mcs = netdev_priv(netdev); */ - int ret = 0; - - switch (cmd) { - default: - ret = -EOPNOTSUPP; - } - - return ret; -} - -/* Network device is taken down, done by "ifconfig irda0 down" */ -static int mcs_net_close(struct net_device *netdev) -{ - int ret = 0; - struct mcs_cb *mcs = netdev_priv(netdev); - - /* Stop transmit processing */ - netif_stop_queue(netdev); - - /* kill and free the receive and transmit URBs */ - usb_kill_urb(mcs->rx_urb); - usb_free_urb(mcs->rx_urb); - usb_kill_urb(mcs->tx_urb); - usb_free_urb(mcs->tx_urb); - - /* Stop and remove instance of IrLAP */ - if (mcs->irlap) - irlap_close(mcs->irlap); - - mcs->irlap = NULL; - return ret; -} - -/* Network device is taken up, done by "ifconfig irda0 up" */ -static int mcs_net_open(struct net_device *netdev) -{ - struct mcs_cb *mcs = netdev_priv(netdev); - char hwname[16]; - int ret = 0; - - ret = usb_clear_halt(mcs->usbdev, - usb_sndbulkpipe(mcs->usbdev, mcs->ep_in)); - if (ret) - goto error1; - ret = usb_clear_halt(mcs->usbdev, - usb_rcvbulkpipe(mcs->usbdev, mcs->ep_out)); - if (ret) - goto error1; - - ret = mcs_setup_transceiver(mcs); - if (ret) - goto error1; - - ret = -ENOMEM; - - /* Initialize for SIR/FIR to copy data directly into skb. */ - mcs->receiving = 0; - mcs->rx_buff.truesize = IRDA_SKB_MAX_MTU; - mcs->rx_buff.skb = dev_alloc_skb(IRDA_SKB_MAX_MTU); - if (!mcs->rx_buff.skb) - goto error1; - - skb_reserve(mcs->rx_buff.skb, 1); - mcs->rx_buff.head = mcs->rx_buff.skb->data; - do_gettimeofday(&mcs->rx_time); - - /* - * Now that everything should be initialized properly, - * Open new IrLAP layer instance to take care of us... - * Note : will send immediately a speed change... - */ - sprintf(hwname, "usb#%d", mcs->usbdev->devnum); - mcs->irlap = irlap_open(netdev, &mcs->qos, hwname); - if (!mcs->irlap) { - IRDA_ERROR("mcs7780: irlap_open failed"); - goto error2; - } - - if (!mcs_setup_urbs(mcs)) - goto error3; - - ret = mcs_receive_start(mcs); - if (ret) - goto error3; - - netif_start_queue(netdev); - return 0; - - error3: - irlap_close(mcs->irlap); - error2: - kfree_skb(mcs->rx_buff.skb); - error1: - return ret; -} - - -/* Get device stats for /proc/net/dev and ifconfig */ -static struct net_device_stats *mcs_net_get_stats(struct net_device *netdev) -{ - struct mcs_cb *mcs = netdev_priv(netdev); - return &mcs->stats; -} - -/* Receive callback function. */ -static void mcs_receive_irq(struct urb *urb, struct pt_regs *regs) -{ - __u8 *bytes; - struct mcs_cb *mcs = urb->context; - int i; - int ret; - - if (!netif_running(mcs->netdev)) - return; - - if (urb->status) - return; - - if (urb->actual_length > 0) { - bytes = urb->transfer_buffer; - - /* MCS returns frames without BOF and EOF - * I assume it returns whole frames. - */ - /* SIR speed */ - if(mcs->speed < 576000) { - async_unwrap_char(mcs->netdev, &mcs->stats, - &mcs->rx_buff, 0xc0); - - for (i = 0; i < urb->actual_length; i++) - async_unwrap_char(mcs->netdev, &mcs->stats, - &mcs->rx_buff, bytes[i]); - - async_unwrap_char(mcs->netdev, &mcs->stats, - &mcs->rx_buff, 0xc1); - } - /* MIR speed */ - else if(mcs->speed == 576000 || mcs->speed == 1152000) { - mcs_unwrap_mir(mcs, urb->transfer_buffer, - urb->actual_length); - } - /* FIR speed */ - else { - mcs_unwrap_fir(mcs, urb->transfer_buffer, - urb->actual_length); - } - mcs->netdev->last_rx = jiffies; - do_gettimeofday(&mcs->rx_time); - } - - ret = usb_submit_urb(urb, GFP_ATOMIC); -} - -/* Transmit callback funtion. */ -static void mcs_send_irq(struct urb *urb, struct pt_regs *regs) -{ - struct mcs_cb *mcs = urb->context; - struct net_device *ndev = mcs->netdev; - - if (unlikely(mcs->new_speed)) - schedule_work(&mcs->work); - else - netif_wake_queue(ndev); -} - -/* Transmit callback funtion. */ -static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *ndev) -{ - unsigned long flags; - struct mcs_cb *mcs; - int wraplen; - int ret = 0; - - - if (skb == NULL || ndev == NULL) - return -EINVAL; - - netif_stop_queue(ndev); - mcs = netdev_priv(ndev); - - spin_lock_irqsave(&mcs->lock, flags); - - mcs->new_speed = irda_get_next_speed(skb); - if (likely(mcs->new_speed == mcs->speed)) - mcs->new_speed = 0; - - /* SIR speed */ - if(mcs->speed < 576000) { - wraplen = mcs_wrap_sir_skb(skb, mcs->out_buf); - } - /* MIR speed */ - else if(mcs->speed == 576000 || mcs->speed == 1152000) { - wraplen = mcs_wrap_mir_skb(skb, mcs->out_buf); - } - /* FIR speed */ - else { - wraplen = mcs_wrap_fir_skb(skb, mcs->out_buf); - } - usb_fill_bulk_urb(mcs->tx_urb, mcs->usbdev, - usb_sndbulkpipe(mcs->usbdev, mcs->ep_out), - mcs->out_buf, wraplen, mcs_send_irq, mcs); - - if ((ret = usb_submit_urb(mcs->tx_urb, GFP_ATOMIC))) { - IRDA_ERROR("failed tx_urb: %d", ret); - switch (ret) { - case -ENODEV: - case -EPIPE: - break; - default: - mcs->stats.tx_errors++; - netif_start_queue(ndev); - } - } else { - mcs->stats.tx_packets++; - mcs->stats.tx_bytes += skb->len; - } - - dev_kfree_skb(skb); - spin_unlock_irqrestore(&mcs->lock, flags); - return ret; -} - -/* - * This function is called by the USB subsystem for each new device in the - * system. Need to verify the device and if it is, then start handling it. - */ -static int mcs_probe(struct usb_interface *intf, - const struct usb_device_id *id) -{ - struct usb_device *udev = interface_to_usbdev(intf); - struct net_device *ndev = NULL; - struct mcs_cb *mcs; - int ret = -ENOMEM; - - ndev = alloc_irdadev(sizeof(*mcs)); - if (!ndev) - goto error1; - - IRDA_DEBUG(1, "MCS7780 USB-IrDA bridge found at %d.", udev->devnum); - - /* what is it realy for? */ - SET_MODULE_OWNER(ndev); - SET_NETDEV_DEV(ndev, &intf->dev); - - ret = usb_reset_configuration(udev); - if (ret != 0) { - IRDA_ERROR("mcs7780: usb reset configuration failed"); - goto error2; - } - - mcs = netdev_priv(ndev); - mcs->usbdev = udev; - mcs->netdev = ndev; - spin_lock_init(&mcs->lock); - - /* Initialize QoS for this device */ - irda_init_max_qos_capabilies(&mcs->qos); - - /* That's the Rx capability. */ - mcs->qos.baud_rate.bits &= - IR_2400 | IR_9600 | IR_19200 | IR_38400 | IR_57600 | IR_115200 - | IR_576000 | IR_1152000 | (IR_4000000 << 8); - - - mcs->qos.min_turn_time.bits &= qos_mtt_bits; - irda_qos_bits_to_value(&mcs->qos); - - /* Speed change work initialisation*/ - INIT_WORK(&mcs->work, mcs_speed_work, mcs); - - /* Override the network functions we need to use */ - ndev->hard_start_xmit = mcs_hard_xmit; - ndev->open = mcs_net_open; - ndev->stop = mcs_net_close; - ndev->get_stats = mcs_net_get_stats; - ndev->do_ioctl = mcs_net_ioctl; - - if (!intf->cur_altsetting) - goto error2; - - ret = mcs_find_endpoints(mcs, intf->cur_altsetting->endpoint, - intf->cur_altsetting->desc.bNumEndpoints); - if (!ret) { - ret = -ENODEV; - goto error2; - } - - ret = register_netdev(ndev); - if (ret != 0) - goto error2; - - IRDA_DEBUG(1, "IrDA: Registered MosChip MCS7780 device as %s", - ndev->name); - - mcs->transceiver_type = transceiver_type; - mcs->sir_tweak = sir_tweak; - mcs->receive_mode = receive_mode; - - usb_set_intfdata(intf, mcs); - return 0; - - error2: - free_netdev(ndev); - - error1: - return ret; -} - -/* The current device is removed, the USB layer tells us to shut down. */ -static void mcs_disconnect(struct usb_interface *intf) -{ - struct mcs_cb *mcs = usb_get_intfdata(intf); - - if (!mcs) - return; - - flush_scheduled_work(); - - unregister_netdev(mcs->netdev); - free_netdev(mcs->netdev); - - usb_set_intfdata(intf, NULL); - IRDA_DEBUG(0, "MCS7780 now disconnected."); -} - -/* Module insertion */ -static int __init mcs_init(void) -{ - int result; - - /* register this driver with the USB subsystem */ - result = usb_register(&mcs_driver); - if (result) - IRDA_ERROR("usb_register failed. Error number %d", result); - - return result; -} -module_init(mcs_init); - -/* Module removal */ -static void __exit mcs_exit(void) -{ - /* deregister this driver with the USB subsystem */ - usb_deregister(&mcs_driver); -} -module_exit(mcs_exit); - diff --git a/drivers/net/irda/mcs7780.h b/drivers/net/irda/mcs7780.h deleted file mode 100644 index 1a723d725..000000000 --- a/drivers/net/irda/mcs7780.h +++ /dev/null @@ -1,167 +0,0 @@ -/***************************************************************************** -* -* Filename: mcs7780.h -* Version: 0.2-alpha -* Description: Irda MosChip USB Dongle -* Status: Experimental -* Authors: Lukasz Stelmach -* Brian Pugh -* -* Copyright (C) 2005, Lukasz Stelmach -* Copyright (C) 2005, Brian Pugh -* -* 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 _MCS7780_H -#define _MCS7780_H - -#define MCS_MODE_SIR 0 -#define MCS_MODE_MIR 1 -#define MCS_MODE_FIR 2 - -#define MCS_CTRL_TIMEOUT 500 -#define MCS_XMIT_TIMEOUT 500 -/* Possible transceiver types */ -#define MCS_TSC_VISHAY 0 /* Vishay TFD, default choice */ -#define MCS_TSC_AGILENT 1 /* Agilent 3602/3600 */ -#define MCS_TSC_SHARP 2 /* Sharp GP2W1000YP */ - -/* Requests */ -#define MCS_RD_RTYPE 0xC0 -#define MCS_WR_RTYPE 0x40 -#define MCS_RDREQ 0x0F -#define MCS_WRREQ 0x0E - -/* Register 0x00 */ -#define MCS_MODE_REG 0 -#define MCS_FIR ((__u16)0x0001) -#define MCS_SIR16US ((__u16)0x0002) -#define MCS_BBTG ((__u16)0x0004) -#define MCS_ASK ((__u16)0x0008) -#define MCS_PARITY ((__u16)0x0010) - -/* SIR/MIR speed constants */ -#define MCS_SPEED_SHIFT 5 -#define MCS_SPEED_MASK ((__u16)0x00E0) -#define MCS_SPEED(x) ((x & MCS_SPEED_MASK) >> MCS_SPEED_SHIFT) -#define MCS_SPEED_2400 ((0 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_9600 ((1 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_19200 ((2 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_38400 ((3 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_57600 ((4 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_115200 ((5 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_576000 ((6 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) -#define MCS_SPEED_1152000 ((7 << MCS_SPEED_SHIFT) & MCS_SPEED_MASK) - -#define MCS_PLLPWDN ((__u16)0x0100) -#define MCS_DRIVER ((__u16)0x0200) -#define MCS_DTD ((__u16)0x0400) -#define MCS_DIR ((__u16)0x0800) -#define MCS_SIPEN ((__u16)0x1000) -#define MCS_SENDSIP ((__u16)0x2000) -#define MCS_CHGDIR ((__u16)0x4000) -#define MCS_RESET ((__u16)0x8000) - -/* Register 0x02 */ -#define MCS_XCVR_REG 2 -#define MCS_MODE0 ((__u16)0x0001) -#define MCS_STFIR ((__u16)0x0002) -#define MCS_XCVR_CONF ((__u16)0x0004) -#define MCS_RXFAST ((__u16)0x0008) -/* TXCUR [6:4] */ -#define MCS_TXCUR_SHIFT 4 -#define MCS_TXCUR_MASK ((__u16)0x0070) -#define MCS_TXCUR(x) ((x & MCS_TXCUR_MASK) >> MCS_TXCUR_SHIFT) -#define MCS_SETTXCUR(x,y) \ - ((x & ~MCS_TXCUR_MASK) | (y << MCS_TXCUR_SHIFT) & MCS_TXCUR_MASK) - -#define MCS_MODE1 ((__u16)0x0080) -#define MCS_SMODE0 ((__u16)0x0100) -#define MCS_SMODE1 ((__u16)0x0200) -#define MCS_INVTX ((__u16)0x0400) -#define MCS_INVRX ((__u16)0x0800) - -#define MCS_MINRXPW_REG 4 - -#define MCS_RESV_REG 7 -#define MCS_IRINTX ((__u16)0x0001) -#define MCS_IRINRX ((__u16)0x0002) - -struct mcs_cb { - struct usb_device *usbdev; /* init: probe_irda */ - struct net_device *netdev; /* network layer */ - struct irlap_cb *irlap; /* The link layer we are binded to */ - struct net_device_stats stats; /* network statistics */ - struct qos_info qos; - unsigned int speed; /* Current speed */ - unsigned int new_speed; /* new speed */ - - struct work_struct work; /* Change speed work */ - - struct sk_buff *tx_pending; - char in_buf[4096]; /* transmit/receive buffer */ - char out_buf[4096]; /* transmit/receive buffer */ - __u8 *fifo_status; - - iobuff_t rx_buff; /* receive unwrap state machine */ - struct timeval rx_time; - spinlock_t lock; - int receiving; - - __u8 ep_in; - __u8 ep_out; - - struct urb *rx_urb; - struct urb *tx_urb; - - int transceiver_type; - int sir_tweak; - int receive_mode; -}; - -static int mcs_set_reg(struct mcs_cb *mcs, __u16 reg, __u16 val); -static int mcs_get_reg(struct mcs_cb *mcs, __u16 reg, __u16 * val); - -static inline int mcs_setup_transceiver_vishay(struct mcs_cb *mcs); -static inline int mcs_setup_transceiver_agilent(struct mcs_cb *mcs); -static inline int mcs_setup_transceiver_sharp(struct mcs_cb *mcs); -static inline int mcs_setup_transceiver(struct mcs_cb *mcs); -static inline int mcs_wrap_sir_skb(struct sk_buff *skb, __u8 * buf); -static unsigned mcs_wrap_fir_skb(const struct sk_buff *skb, __u8 *buf); -static unsigned mcs_wrap_mir_skb(const struct sk_buff *skb, __u8 *buf); -static void mcs_unwrap_mir(struct mcs_cb *mcs, __u8 *buf, int len); -static void mcs_unwrap_fir(struct mcs_cb *mcs, __u8 *buf, int len); -static inline int mcs_setup_urbs(struct mcs_cb *mcs); -static inline int mcs_receive_start(struct mcs_cb *mcs); -static inline int mcs_find_endpoints(struct mcs_cb *mcs, - struct usb_host_endpoint *ep, int epnum); - -static int mcs_speed_change(struct mcs_cb *mcs); - -static int mcs_net_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd); -static int mcs_net_close(struct net_device *netdev); -static int mcs_net_open(struct net_device *netdev); -static struct net_device_stats *mcs_net_get_stats(struct net_device *netdev); - -static void mcs_receive_irq(struct urb *urb, struct pt_regs *regs); -static void mcs_send_irq(struct urb *urb, struct pt_regs *regs); -static int mcs_hard_xmit(struct sk_buff *skb, struct net_device *netdev); - -static int mcs_probe(struct usb_interface *intf, - const struct usb_device_id *id); -static void mcs_disconnect(struct usb_interface *intf); - -#endif /* _MCS7780_H */ diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index cb62f2a96..cc7ff8f00 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c @@ -115,12 +115,8 @@ static nsc_chip_t chips[] = { /* Contributed by Jan Frey - IBM A30/A31 */ { "PC8739x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xea, 0xff, nsc_ircc_probe_39x, nsc_ircc_init_39x }, - /* IBM ThinkPads using PC8738x (T60/X60/Z60) */ - { "IBM-PC8738x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff, - nsc_ircc_probe_39x, nsc_ircc_init_39x }, - /* IBM ThinkPads using PC8394T (T43/R52/?) */ - { "IBM-PC8394T", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf9, 0xff, - nsc_ircc_probe_39x, nsc_ircc_init_39x }, + { "IBM", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff, + nsc_ircc_probe_39x, nsc_ircc_init_39x }, { NULL } }; diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index afb19e8d9..e1aa99105 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c @@ -12,6 +12,7 @@ * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor * */ +#include #include #include #include diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index 8d5a288d7..f530686bd 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c @@ -18,6 +18,7 @@ * power_leve:level - set the transmitter power level * tx_lpm:0|1 - set transmit low power mode */ +#include #include #include #include diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 2eff45bed..a4674044b 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -2353,7 +2353,7 @@ static int __init smsc_superio_lpc(unsigned short cfg_base) #ifdef CONFIG_PCI #define PCIID_VENDOR_INTEL 0x8086 #define PCIID_VENDOR_ALI 0x10b9 -static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __initdata = { +static struct smsc_ircc_subsystem_configuration subsystem_configurations[] __devinitdata = { { .vendor = PCIID_VENDOR_INTEL, /* Intel 82801DBM LPC bridge */ .device = 0x24cc, diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index d61b208b5..31867e4b8 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -174,7 +173,9 @@ struct stir_cb { struct qos_info qos; unsigned speed; /* Current speed */ - struct task_struct *thread; /* transmit thread */ + wait_queue_head_t thr_wait; /* transmit thread wakeup */ + struct completion thr_exited; + pid_t thr_pid; struct sk_buff *tx_pending; void *io_buf; /* transmit/receive buffer */ @@ -576,7 +577,7 @@ static int stir_hard_xmit(struct sk_buff *skb, struct net_device *netdev) SKB_LINEAR_ASSERT(skb); skb = xchg(&stir->tx_pending, skb); - wake_up_process(stir->thread); + wake_up(&stir->thr_wait); /* this should never happen unless stop/wakeup problem */ if (unlikely(skb)) { @@ -752,7 +753,13 @@ static int stir_transmit_thread(void *arg) struct net_device *dev = stir->netdev; struct sk_buff *skb; - while (!kthread_should_stop()) { + daemonize("%s", dev->name); + allow_signal(SIGTERM); + + while (netif_running(dev) + && netif_device_present(dev) + && !signal_pending(current)) + { #ifdef CONFIG_PM /* if suspending, then power off and wait */ if (unlikely(freezing(current))) { @@ -806,11 +813,10 @@ static int stir_transmit_thread(void *arg) } /* sleep if nothing to send */ - set_current_state(TASK_INTERRUPTIBLE); - schedule(); - + wait_event_interruptible(stir->thr_wait, stir->tx_pending); } - return 0; + + complete_and_exit (&stir->thr_exited, 0); } @@ -853,7 +859,7 @@ static void stir_rcv_irq(struct urb *urb, struct pt_regs *regs) warn("%s: usb receive submit error: %d", stir->netdev->name, err); stir->receiving = 0; - wake_up_process(stir->thread); + wake_up(&stir->thr_wait); } } @@ -922,10 +928,10 @@ static int stir_net_open(struct net_device *netdev) } /** Start kernel thread for transmit. */ - stir->thread = kthread_run(stir_transmit_thread, stir, - "%s", stir->netdev->name); - if (IS_ERR(stir->thread)) { - err = PTR_ERR(stir->thread); + stir->thr_pid = kernel_thread(stir_transmit_thread, stir, + CLONE_FS|CLONE_FILES); + if (stir->thr_pid < 0) { + err = stir->thr_pid; err("stir4200: unable to start kernel thread"); goto err_out6; } @@ -962,7 +968,8 @@ static int stir_net_close(struct net_device *netdev) netif_stop_queue(netdev); /* Kill transmit thread */ - kthread_stop(stir->thread); + kill_proc(stir->thr_pid, SIGTERM, 1); + wait_for_completion(&stir->thr_exited); kfree(stir->fifo_status); /* Mop up receive urb's */ @@ -1077,6 +1084,9 @@ static int stir_probe(struct usb_interface *intf, stir->qos.min_turn_time.bits &= qos_mtt_bits; irda_qos_bits_to_value(&stir->qos); + init_completion (&stir->thr_exited); + init_waitqueue_head (&stir->thr_wait); + /* Override the network functions we need to use */ net->hard_start_xmit = stir_hard_xmit; net->open = stir_net_open; diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 92d646cc9..d70b9e8d6 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c @@ -21,6 +21,7 @@ * ********************************************************************/ +#include #include #define DRIVER_NAME "vlsi_ir" @@ -1517,7 +1518,7 @@ static int vlsi_open(struct net_device *ndev) outb(IRINTR_INT_MASK, ndev->base_addr+VLSI_PIO_IRINTR); - if (request_irq(ndev->irq, vlsi_interrupt, IRQF_SHARED, + if (request_irq(ndev->irq, vlsi_interrupt, SA_SHIRQ, drivername, ndev)) { IRDA_WARNING("%s: couldn't get IRQ: %d\n", __FUNCTION__, ndev->irq); diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h index c37f0bc4c..a82a4ba8d 100644 --- a/drivers/net/irda/vlsi_ir.h +++ b/drivers/net/irda/vlsi_ir.h @@ -58,7 +58,7 @@ typedef void irqreturn_t; /* PDE() introduced in 2.5.4 */ #ifdef CONFIG_PROC_FS -#define PDE(inode) ((inode)->i_private) +#define PDE(inode) ((inode)->u.generic_ip) #endif /* irda crc16 calculation exported in 2.5.42 */ diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index b69776e00..0ea65c4c6 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c @@ -40,6 +40,7 @@ ********************************************************************/ #include +#include #include #include #include diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index cdc14401c..f0f04be98 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c @@ -56,6 +56,7 @@ * number of packets outstanding to a remote partition at a time. */ +#include #include #include #include @@ -68,7 +69,6 @@ #include #include #include -#include #include #include @@ -1035,22 +1035,11 @@ static struct ethtool_ops ops = { .get_link = veth_get_link, }; -static struct net_device * __init veth_probe_one(int vlan, - struct vio_dev *vio_dev) +static struct net_device * __init veth_probe_one(int vlan, struct device *vdev) { struct net_device *dev; struct veth_port *port; - struct device *vdev = &vio_dev->dev; int i, rc; - const unsigned char *mac_addr; - - mac_addr = vio_get_attribute(vio_dev, "local-mac-address", NULL); - if (mac_addr == NULL) - mac_addr = vio_get_attribute(vio_dev, "mac-address", NULL); - if (mac_addr == NULL) { - veth_error("Unable to fetch MAC address from device tree.\n"); - return NULL; - } dev = alloc_etherdev(sizeof (struct veth_port)); if (! dev) { @@ -1075,11 +1064,16 @@ static struct net_device * __init veth_probe_one(int vlan, } port->dev = vdev; - memcpy(dev->dev_addr, mac_addr, ETH_ALEN); + dev->dev_addr[0] = 0x02; + dev->dev_addr[1] = 0x01; + dev->dev_addr[2] = 0xff; + dev->dev_addr[3] = vlan; + dev->dev_addr[4] = 0xff; + dev->dev_addr[5] = this_lp; dev->mtu = VETH_MAX_MTU; - memcpy(&port->mac_addr, mac_addr, ETH_ALEN); + memcpy(&port->mac_addr, dev->dev_addr, 6); dev->open = veth_open; dev->hard_start_xmit = veth_start_xmit; @@ -1614,7 +1608,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id) struct net_device *dev; struct veth_port *port; - dev = veth_probe_one(i, vdev); + dev = veth_probe_one(i, &vdev->dev); if (dev == NULL) { veth_remove(vdev); return 1; @@ -1647,7 +1641,7 @@ static int veth_probe(struct vio_dev *vdev, const struct vio_device_id *id) * support. */ static struct vio_device_id veth_device_table[] __devinitdata = { - { "network", "IBM,iSeries-l-lan" }, + { "vlan", "" }, { "", "" } }; MODULE_DEVICE_TABLE(vio, veth_device_table); diff --git a/drivers/net/ixgb/Makefile b/drivers/net/ixgb/Makefile index a8a2d3d03..7c7aff1ea 100644 --- a/drivers/net/ixgb/Makefile +++ b/drivers/net/ixgb/Makefile @@ -1,7 +1,7 @@ ################################################################################ # # -# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. +# Copyright(c) 1999 - 2002 Intel Corporation. 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 diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index 82b67af54..c83271b38 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -30,6 +30,7 @@ #define _IXGB_H_ #include +#include #include #include #include @@ -83,12 +84,7 @@ struct ixgb_adapter; #define IXGB_DBG(args...) #endif -#define PFX "ixgb: " -#define DPRINTK(nlevel, klevel, fmt, args...) \ - (void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ - printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \ - __FUNCTION__ , ## args)) - +#define IXGB_ERR(args...) printk(KERN_ERR "ixgb: " args) /* TX/RX descriptor defines */ #define DEFAULT_TXD 256 @@ -179,7 +175,6 @@ struct ixgb_adapter { uint64_t hw_csum_tx_good; uint64_t hw_csum_tx_error; uint32_t tx_int_delay; - uint32_t tx_timeout_count; boolean_t tx_int_delay_enable; boolean_t detect_tx_hung; @@ -197,9 +192,7 @@ struct ixgb_adapter { /* structs defined in ixgb_hw.h */ struct ixgb_hw hw; - u16 msg_enable; struct ixgb_hw_stats stats; - uint32_t alloc_rx_buff_failed; #ifdef CONFIG_PCI_MSI boolean_t have_msi; #endif diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c index 8357c5590..661a46b95 100644 --- a/drivers/net/ixgb/ixgb_ee.c +++ b/drivers/net/ixgb/ixgb_ee.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff --git a/drivers/net/ixgb/ixgb_ee.h b/drivers/net/ixgb/ixgb_ee.h index bf6fa220f..5190aa876 100644 --- a/drivers/net/ixgb/ixgb_ee.h +++ b/drivers/net/ixgb/ixgb_ee.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index cf19b898b..d38ade5f2 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -44,8 +44,6 @@ extern void ixgb_free_rx_resources(struct ixgb_adapter *adapter); extern void ixgb_free_tx_resources(struct ixgb_adapter *adapter); extern void ixgb_update_stats(struct ixgb_adapter *adapter); -#define IXGB_ALL_RAR_ENTRIES 16 - struct ixgb_stats { char stat_string[ETH_GSTRING_LEN]; int sizeof_stat; @@ -78,7 +76,6 @@ static struct ixgb_stats ixgb_gstrings_stats[] = { {"tx_heartbeat_errors", IXGB_STAT(net_stats.tx_heartbeat_errors)}, {"tx_window_errors", IXGB_STAT(net_stats.tx_window_errors)}, {"tx_deferred_ok", IXGB_STAT(stats.dc)}, - {"tx_timeout_count", IXGB_STAT(tx_timeout_count) }, {"rx_long_length_errors", IXGB_STAT(stats.roc)}, {"rx_short_length_errors", IXGB_STAT(stats.ruc)}, #ifdef NETIF_F_TSO @@ -120,16 +117,6 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) return 0; } -static void ixgb_set_speed_duplex(struct net_device *netdev) -{ - struct ixgb_adapter *adapter = netdev_priv(netdev); - /* be optimistic about our link, since we were up before */ - adapter->link_speed = 10000; - adapter->link_duplex = FULL_DUPLEX; - netif_carrier_on(netdev); - netif_wake_queue(netdev); -} - static int ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { @@ -143,7 +130,12 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ixgb_down(adapter, TRUE); ixgb_reset(adapter); ixgb_up(adapter); - ixgb_set_speed_duplex(netdev); + /* be optimistic about our link, since we were up before */ + adapter->link_speed = 10000; + adapter->link_duplex = FULL_DUPLEX; + netif_carrier_on(netdev); + netif_wake_queue(netdev); + } else ixgb_reset(adapter); @@ -191,7 +183,11 @@ ixgb_set_pauseparam(struct net_device *netdev, if(netif_running(adapter->netdev)) { ixgb_down(adapter, TRUE); ixgb_up(adapter); - ixgb_set_speed_duplex(netdev); + /* be optimistic about our link, since we were up before */ + adapter->link_speed = 10000; + adapter->link_duplex = FULL_DUPLEX; + netif_carrier_on(netdev); + netif_wake_queue(netdev); } else ixgb_reset(adapter); @@ -216,7 +212,11 @@ ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) if(netif_running(netdev)) { ixgb_down(adapter,TRUE); ixgb_up(adapter); - ixgb_set_speed_duplex(netdev); + /* be optimistic about our link, since we were up before */ + adapter->link_speed = 10000; + adapter->link_duplex = FULL_DUPLEX; + netif_carrier_on(netdev); + netif_wake_queue(netdev); } else ixgb_reset(adapter); return 0; @@ -251,19 +251,6 @@ ixgb_set_tso(struct net_device *netdev, uint32_t data) } #endif /* NETIF_F_TSO */ -static uint32_t -ixgb_get_msglevel(struct net_device *netdev) -{ - struct ixgb_adapter *adapter = netdev_priv(netdev); - return adapter->msg_enable; -} - -static void -ixgb_set_msglevel(struct net_device *netdev, uint32_t data) -{ - struct ixgb_adapter *adapter = netdev_priv(netdev); - adapter->msg_enable = data; -} #define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_ static int @@ -316,7 +303,7 @@ ixgb_get_regs(struct net_device *netdev, *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ /* there are 16 RAR entries in hardware, we only use 3 */ - for(i = 0; i < IXGB_ALL_RAR_ENTRIES; i++) { + for(i = 0; i < 16; i++) { *reg++ = IXGB_READ_REG_ARRAY(hw, RAL, (i << 1)); /*21,...,51 */ *reg++ = IXGB_READ_REG_ARRAY(hw, RAH, (i << 1)); /*22,...,52 */ } @@ -606,7 +593,11 @@ ixgb_set_ringparam(struct net_device *netdev, adapter->tx_ring = tx_new; if((err = ixgb_up(adapter))) return err; - ixgb_set_speed_duplex(netdev); + /* be optimistic about our link, since we were up before */ + adapter->link_speed = 10000; + adapter->link_duplex = FULL_DUPLEX; + netif_carrier_on(netdev); + netif_wake_queue(netdev); } return 0; @@ -723,8 +714,6 @@ static struct ethtool_ops ixgb_ethtool_ops = { .set_tx_csum = ixgb_set_tx_csum, .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, - .get_msglevel = ixgb_get_msglevel, - .set_msglevel = ixgb_set_msglevel, #ifdef NETIF_F_TSO .get_tso = ethtool_op_get_tso, .set_tso = ixgb_set_tso, diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index f7fa10e47..620cad48b 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff --git a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h index cb4568915..382c6300c 100644 --- a/drivers/net/ixgb/ixgb_hw.h +++ b/drivers/net/ixgb/ixgb_hw.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -57,7 +57,6 @@ typedef enum { typedef enum { ixgb_media_type_unknown = 0, ixgb_media_type_fiber = 1, - ixgb_media_type_copper = 2, ixgb_num_media_types } ixgb_media_type; diff --git a/drivers/net/ixgb/ixgb_ids.h b/drivers/net/ixgb/ixgb_ids.h index 40a085f94..aee207eaa 100644 --- a/drivers/net/ixgb/ixgb_ids.h +++ b/drivers/net/ixgb/ixgb_ids.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -43,8 +43,6 @@ #define IXGB_SUBDEVICE_ID_A11F 0xA11F #define IXGB_SUBDEVICE_ID_A01F 0xA01F -#define IXGB_DEVICE_ID_82597EX_CX4 0x109E -#define IXGB_SUBDEVICE_ID_A00C 0xA00C - #endif /* #ifndef _IXGB_IDS_H_ */ + /* End of File */ diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 7bbd44728..83852450a 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -28,6 +28,22 @@ #include "ixgb.h" +/* Change Log + * 1.0.96 04/19/05 + * - Make needlessly global code static -- bunk@stusta.de + * - ethtool cleanup -- shemminger@osdl.org + * - Support for MODULE_VERSION -- linville@tuxdriver.com + * - add skb_header_cloned check to the tso path -- herbert@apana.org.au + * 1.0.88 01/05/05 + * - include fix to the condition that determines when to quit NAPI - Robert Olsson + * - use netif_poll_{disable/enable} to synchronize between NAPI and i/f up/down + * 1.0.84 10/26/04 + * - reset buffer_info->dma in Tx resource cleanup logic + * 1.0.83 10/12/04 + * - sparse cleanup - shemminger@osdl.org + * - fix tx resource cleanup logic + */ + char ixgb_driver_name[] = "ixgb"; static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; @@ -36,9 +52,9 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; #else #define DRIVERNAPI "-NAPI" #endif -#define DRV_VERSION "1.0.109-k2"DRIVERNAPI +#define DRV_VERSION "1.0.100-k2"DRIVERNAPI char ixgb_driver_version[] = DRV_VERSION; -static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; +static char ixgb_copyright[] = "Copyright (c) 1999-2005 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table * @@ -51,8 +67,6 @@ static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; static struct pci_device_id ixgb_pci_tbl[] = { {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_CX4, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_SR, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_LR, @@ -134,11 +148,6 @@ MODULE_DESCRIPTION("Intel(R) PRO/10GbE Network Driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); -#define DEFAULT_DEBUG_LEVEL_SHIFT 3 -static int debug = DEFAULT_DEBUG_LEVEL_SHIFT; -module_param(debug, int, 0); -MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); - /* some defines for controlling descriptor fetches in h/w */ #define RXDCTL_WTHRESH_DEFAULT 16 /* chip writes back at this many or RXT0 */ #define RXDCTL_PTHRESH_DEFAULT 0 /* chip considers prefech below @@ -187,7 +196,7 @@ module_exit(ixgb_exit_module); * @adapter: board private structure **/ -static void +static inline void ixgb_irq_disable(struct ixgb_adapter *adapter) { atomic_inc(&adapter->irq_sem); @@ -201,7 +210,7 @@ ixgb_irq_disable(struct ixgb_adapter *adapter) * @adapter: board private structure **/ -static void +static inline void ixgb_irq_enable(struct ixgb_adapter *adapter) { if(atomic_dec_and_test(&adapter->irq_sem)) { @@ -222,7 +231,6 @@ ixgb_up(struct ixgb_adapter *adapter) /* hardware has been reset, we need to reload some things */ - ixgb_rar_set(hw, netdev->dev_addr, 0); ixgb_set_multi(netdev); ixgb_restore_vlan(adapter); @@ -232,9 +240,6 @@ ixgb_up(struct ixgb_adapter *adapter) ixgb_configure_rx(adapter); ixgb_alloc_rx_buffers(adapter); - /* disable interrupts and get the hardware into a known state */ - IXGB_WRITE_REG(&adapter->hw, IMC, 0xffffffff); - #ifdef CONFIG_PCI_MSI { boolean_t pcix = (IXGB_READ_REG(&adapter->hw, STATUS) & @@ -244,7 +249,7 @@ ixgb_up(struct ixgb_adapter *adapter) if (!pcix) adapter->have_msi = FALSE; else if((err = pci_enable_msi(adapter->pdev))) { - DPRINTK(PROBE, ERR, + printk (KERN_ERR "Unable to allocate MSI interrupt Error: %d\n", err); adapter->have_msi = FALSE; /* proceed to try to request regular interrupt */ @@ -253,12 +258,12 @@ ixgb_up(struct ixgb_adapter *adapter) #endif if((err = request_irq(adapter->pdev->irq, &ixgb_intr, - IRQF_SHARED | IRQF_SAMPLE_RANDOM, - netdev->name, netdev))) { - DPRINTK(PROBE, ERR, - "Unable to allocate interrupt Error: %d\n", err); + SA_SHIRQ | SA_SAMPLE_RANDOM, + netdev->name, netdev))) return err; - } + + /* disable interrupts and get the hardware into a known state */ + IXGB_WRITE_REG(&adapter->hw, IMC, 0xffffffff); if((hw->max_frame_size != max_frame) || (hw->max_frame_size != @@ -280,12 +285,11 @@ ixgb_up(struct ixgb_adapter *adapter) } mod_timer(&adapter->watchdog_timer, jiffies); + ixgb_irq_enable(adapter); #ifdef CONFIG_IXGB_NAPI netif_poll_enable(netdev); #endif - ixgb_irq_enable(adapter); - return 0; } @@ -322,7 +326,7 @@ ixgb_reset(struct ixgb_adapter *adapter) ixgb_adapter_stop(&adapter->hw); if(!ixgb_init_hw(&adapter->hw)) - DPRINTK(PROBE, ERR, "ixgb_init_hw failed.\n"); + IXGB_DBG("ixgb_init_hw failed.\n"); } /** @@ -359,8 +363,7 @@ ixgb_probe(struct pci_dev *pdev, } else { if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { - printk(KERN_ERR - "ixgb: No usable DMA configuration, aborting\n"); + IXGB_ERR("No usable DMA configuration, aborting\n"); goto err_dma_mask; } pci_using_dac = 0; @@ -385,7 +388,6 @@ ixgb_probe(struct pci_dev *pdev, adapter->netdev = netdev; adapter->pdev = pdev; adapter->hw.back = adapter; - adapter->msg_enable = netif_msg_init(debug, DEFAULT_DEBUG_LEVEL_SHIFT); mmio_start = pci_resource_start(pdev, BAR_0); mmio_len = pci_resource_len(pdev, BAR_0); @@ -414,7 +416,7 @@ ixgb_probe(struct pci_dev *pdev, netdev->change_mtu = &ixgb_change_mtu; ixgb_set_ethtool_ops(netdev); netdev->tx_timeout = &ixgb_tx_timeout; - netdev->watchdog_timeo = 5 * HZ; + netdev->watchdog_timeo = HZ; #ifdef CONFIG_IXGB_NAPI netdev->poll = &ixgb_clean; netdev->weight = 64; @@ -426,7 +428,6 @@ ixgb_probe(struct pci_dev *pdev, netdev->poll_controller = ixgb_netpoll; #endif - strcpy(netdev->name, pci_name(pdev)); netdev->mem_start = mmio_start; netdev->mem_end = mmio_start + mmio_len; netdev->base_addr = adapter->hw.io_base; @@ -448,9 +449,6 @@ ixgb_probe(struct pci_dev *pdev, #ifdef NETIF_F_TSO netdev->features |= NETIF_F_TSO; #endif -#ifdef NETIF_F_LLTX - netdev->features |= NETIF_F_LLTX; -#endif if(pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; @@ -458,7 +456,7 @@ ixgb_probe(struct pci_dev *pdev, /* make sure the EEPROM is good */ if(!ixgb_validate_eeprom_checksum(&adapter->hw)) { - DPRINTK(PROBE, ERR, "The EEPROM Checksum Is Not Valid\n"); + printk(KERN_ERR "The EEPROM Checksum Is Not Valid\n"); err = -EIO; goto err_eeprom; } @@ -467,7 +465,6 @@ ixgb_probe(struct pci_dev *pdev, memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len); if(!is_valid_ether_addr(netdev->perm_addr)) { - DPRINTK(PROBE, ERR, "Invalid MAC Address\n"); err = -EIO; goto err_eeprom; } @@ -481,7 +478,6 @@ ixgb_probe(struct pci_dev *pdev, INIT_WORK(&adapter->tx_timeout_task, (void (*)(void *))ixgb_tx_timeout_task, netdev); - strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) goto err_register; @@ -490,7 +486,8 @@ ixgb_probe(struct pci_dev *pdev, netif_carrier_off(netdev); netif_stop_queue(netdev); - DPRINTK(PROBE, INFO, "Intel(R) PRO/10GbE Network Connection\n"); + printk(KERN_INFO "%s: Intel(R) PRO/10GbE Network Connection\n", + netdev->name); ixgb_check_options(adapter); /* reset the hardware with the new settings */ @@ -560,17 +557,17 @@ ixgb_sw_init(struct ixgb_adapter *adapter) hw->subsystem_vendor_id = pdev->subsystem_vendor; hw->subsystem_id = pdev->subsystem_device; + adapter->rx_buffer_len = IXGB_RXBUFFER_2048; + hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; - adapter->rx_buffer_len = hw->max_frame_size; if((hw->device_id == IXGB_DEVICE_ID_82597EX) - || (hw->device_id == IXGB_DEVICE_ID_82597EX_CX4) - || (hw->device_id == IXGB_DEVICE_ID_82597EX_LR) - || (hw->device_id == IXGB_DEVICE_ID_82597EX_SR)) + ||(hw->device_id == IXGB_DEVICE_ID_82597EX_LR) + ||(hw->device_id == IXGB_DEVICE_ID_82597EX_SR)) hw->mac_type = ixgb_82597; else { /* should never have loaded on this device */ - DPRINTK(PROBE, ERR, "unsupported device id\n"); + printk(KERN_ERR "ixgb: unsupported device id\n"); } /* enable flow control to be programmed */ @@ -668,8 +665,6 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter) size = sizeof(struct ixgb_buffer) * txdr->count; txdr->buffer_info = vmalloc(size); if(!txdr->buffer_info) { - DPRINTK(PROBE, ERR, - "Unable to allocate transmit descriptor ring memory\n"); return -ENOMEM; } memset(txdr->buffer_info, 0, size); @@ -682,8 +677,6 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter) txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); if(!txdr->desc) { vfree(txdr->buffer_info); - DPRINTK(PROBE, ERR, - "Unable to allocate transmit descriptor memory\n"); return -ENOMEM; } memset(txdr->desc, 0, txdr->size); @@ -757,8 +750,6 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter) size = sizeof(struct ixgb_buffer) * rxdr->count; rxdr->buffer_info = vmalloc(size); if(!rxdr->buffer_info) { - DPRINTK(PROBE, ERR, - "Unable to allocate receive descriptor ring\n"); return -ENOMEM; } memset(rxdr->buffer_info, 0, size); @@ -772,8 +763,6 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter) if(!rxdr->desc) { vfree(rxdr->buffer_info); - DPRINTK(PROBE, ERR, - "Unable to allocate receive descriptors\n"); return -ENOMEM; } memset(rxdr->desc, 0, rxdr->size); @@ -805,14 +794,21 @@ ixgb_setup_rctl(struct ixgb_adapter *adapter) rctl |= IXGB_RCTL_SECRC; - if (adapter->rx_buffer_len <= IXGB_RXBUFFER_2048) + switch (adapter->rx_buffer_len) { + case IXGB_RXBUFFER_2048: + default: rctl |= IXGB_RCTL_BSIZE_2048; - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_4096) + break; + case IXGB_RXBUFFER_4096: rctl |= IXGB_RCTL_BSIZE_4096; - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_8192) + break; + case IXGB_RXBUFFER_8192: rctl |= IXGB_RCTL_BSIZE_8192; - else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_16384) + break; + case IXGB_RXBUFFER_16384: rctl |= IXGB_RCTL_BSIZE_16384; + break; + } IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); } @@ -902,25 +898,22 @@ ixgb_free_tx_resources(struct ixgb_adapter *adapter) adapter->tx_ring.desc = NULL; } -static void +static inline void ixgb_unmap_and_free_tx_resource(struct ixgb_adapter *adapter, struct ixgb_buffer *buffer_info) { struct pci_dev *pdev = adapter->pdev; - - if (buffer_info->dma) - pci_unmap_page(pdev, buffer_info->dma, buffer_info->length, - PCI_DMA_TODEVICE); - - if (buffer_info->skb) + if(buffer_info->dma) { + pci_unmap_page(pdev, + buffer_info->dma, + buffer_info->length, + PCI_DMA_TODEVICE); + buffer_info->dma = 0; + } + if(buffer_info->skb) { dev_kfree_skb_any(buffer_info->skb); - - buffer_info->skb = NULL; - buffer_info->dma = 0; - buffer_info->time_stamp = 0; - /* these fields must always be initialized in tx - * buffer_info->length = 0; - * buffer_info->next_to_watch = 0; */ + buffer_info->skb = NULL; + } } /** @@ -1119,8 +1112,8 @@ ixgb_watchdog(unsigned long data) if(adapter->hw.link_up) { if(!netif_carrier_ok(netdev)) { - DPRINTK(LINK, INFO, - "NIC Link is Up 10000 Mbps Full Duplex\n"); + printk(KERN_INFO "ixgb: %s NIC Link is Up %d Mbps %s\n", + netdev->name, 10000, "Full Duplex"); adapter->link_speed = 10000; adapter->link_duplex = FULL_DUPLEX; netif_carrier_on(netdev); @@ -1130,7 +1123,9 @@ ixgb_watchdog(unsigned long data) if(netif_carrier_ok(netdev)) { adapter->link_speed = 0; adapter->link_duplex = 0; - DPRINTK(LINK, INFO, "NIC Link is Down\n"); + printk(KERN_INFO + "ixgb: %s NIC Link is Down\n", + netdev->name); netif_carrier_off(netdev); netif_stop_queue(netdev); @@ -1163,7 +1158,7 @@ ixgb_watchdog(unsigned long data) #define IXGB_TX_FLAGS_VLAN 0x00000002 #define IXGB_TX_FLAGS_TSO 0x00000004 -static int +static inline int ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) { #ifdef NETIF_F_TSO @@ -1225,7 +1220,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) return 0; } -static boolean_t +static inline boolean_t ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) { struct ixgb_context_desc *context_desc; @@ -1263,7 +1258,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) #define IXGB_MAX_TXD_PWR 14 #define IXGB_MAX_DATA_PER_TXD (1<buffer_info[i]; - size = min(len, IXGB_MAX_DATA_PER_TXD); + size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE); buffer_info->length = size; buffer_info->dma = pci_map_single(adapter->pdev, @@ -1289,7 +1284,6 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, size, PCI_DMA_TODEVICE); buffer_info->time_stamp = jiffies; - buffer_info->next_to_watch = 0; len -= size; offset += size; @@ -1306,7 +1300,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, while(len) { buffer_info = &tx_ring->buffer_info[i]; - size = min(len, IXGB_MAX_DATA_PER_TXD); + size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE); buffer_info->length = size; buffer_info->dma = pci_map_page(adapter->pdev, @@ -1315,7 +1309,6 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, size, PCI_DMA_TODEVICE); buffer_info->time_stamp = jiffies; - buffer_info->next_to_watch = 0; len -= size; offset += size; @@ -1330,7 +1323,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, return count; } -static void +static inline void ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; @@ -1402,26 +1395,13 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) return 0; } -#ifdef NETIF_F_LLTX - local_irq_save(flags); - if (!spin_trylock(&adapter->tx_lock)) { - /* Collision - tell upper layer to requeue */ - local_irq_restore(flags); - return NETDEV_TX_LOCKED; - } -#else spin_lock_irqsave(&adapter->tx_lock, flags); -#endif - if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) { netif_stop_queue(netdev); spin_unlock_irqrestore(&adapter->tx_lock, flags); - return NETDEV_TX_BUSY; + return 1; } - -#ifndef NETIF_F_LLTX spin_unlock_irqrestore(&adapter->tx_lock, flags); -#endif if(adapter->vlgrp && vlan_tx_tag_present(skb)) { tx_flags |= IXGB_TX_FLAGS_VLAN; @@ -1433,13 +1413,10 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) tso = ixgb_tso(adapter, skb); if (tso < 0) { dev_kfree_skb_any(skb); -#ifdef NETIF_F_LLTX - spin_unlock_irqrestore(&adapter->tx_lock, flags); -#endif return NETDEV_TX_OK; } - if (likely(tso)) + if (tso) tx_flags |= IXGB_TX_FLAGS_TSO; else if(ixgb_tx_csum(adapter, skb)) tx_flags |= IXGB_TX_FLAGS_CSUM; @@ -1449,15 +1426,7 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) netdev->trans_start = jiffies; -#ifdef NETIF_F_LLTX - /* Make sure there is space in the ring for the next send. */ - if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) - netif_stop_queue(netdev); - - spin_unlock_irqrestore(&adapter->tx_lock, flags); - -#endif - return NETDEV_TX_OK; + return 0; } /** @@ -1479,7 +1448,6 @@ ixgb_tx_timeout_task(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev_priv(netdev); - adapter->tx_timeout_count++; ixgb_down(adapter, TRUE); ixgb_up(adapter); } @@ -1518,15 +1486,28 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu) if((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { - DPRINTK(PROBE, ERR, "Invalid MTU setting %d\n", new_mtu); + IXGB_ERR("Invalid MTU setting\n"); return -EINVAL; } - adapter->rx_buffer_len = max_frame; + if((max_frame <= IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) + || (max_frame <= IXGB_RXBUFFER_2048)) { + adapter->rx_buffer_len = IXGB_RXBUFFER_2048; + + } else if(max_frame <= IXGB_RXBUFFER_4096) { + adapter->rx_buffer_len = IXGB_RXBUFFER_4096; + + } else if(max_frame <= IXGB_RXBUFFER_8192) { + adapter->rx_buffer_len = IXGB_RXBUFFER_8192; + + } else { + adapter->rx_buffer_len = IXGB_RXBUFFER_16384; + } netdev->mtu = new_mtu; - if ((old_max_frame != max_frame) && netif_running(netdev)) { + if(old_max_frame != max_frame && netif_running(netdev)) { + ixgb_down(adapter, TRUE); ixgb_up(adapter); } @@ -1784,43 +1765,23 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) tx_ring->next_to_clean = i; - if (unlikely(netif_queue_stopped(netdev))) { - spin_lock(&adapter->tx_lock); - if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev) && - (IXGB_DESC_UNUSED(tx_ring) > IXGB_TX_QUEUE_WAKE)) - netif_wake_queue(netdev); - spin_unlock(&adapter->tx_lock); + spin_lock(&adapter->tx_lock); + if(cleaned && netif_queue_stopped(netdev) && netif_carrier_ok(netdev) && + (IXGB_DESC_UNUSED(tx_ring) > IXGB_TX_QUEUE_WAKE)) { + + netif_wake_queue(netdev); } + spin_unlock(&adapter->tx_lock); if(adapter->detect_tx_hung) { /* detect a transmit hang in hardware, this serializes the * check with the clearing of time_stamp and movement of i */ adapter->detect_tx_hung = FALSE; - if (tx_ring->buffer_info[eop].dma && - time_after(jiffies, tx_ring->buffer_info[eop].time_stamp + HZ) + if(tx_ring->buffer_info[i].dma && + time_after(jiffies, tx_ring->buffer_info[i].time_stamp + HZ) && !(IXGB_READ_REG(&adapter->hw, STATUS) & - IXGB_STATUS_TXOFF)) { - /* detected Tx unit hang */ - DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n" - " TDH <%x>\n" - " TDT <%x>\n" - " next_to_use <%x>\n" - " next_to_clean <%x>\n" - "buffer_info[next_to_clean]\n" - " time_stamp <%lx>\n" - " next_to_watch <%x>\n" - " jiffies <%lx>\n" - " next_to_watch.status <%x>\n", - IXGB_READ_REG(&adapter->hw, TDH), - IXGB_READ_REG(&adapter->hw, TDT), - tx_ring->next_to_use, - tx_ring->next_to_clean, - tx_ring->buffer_info[eop].time_stamp, - eop, - jiffies, - eop_desc->status); + IXGB_STATUS_TXOFF)) netif_stop_queue(netdev); - } } return cleaned; @@ -1833,7 +1794,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) * @sk_buff: socket buffer with received data **/ -static void +static inline void ixgb_rx_checksum(struct ixgb_adapter *adapter, struct ixgb_rx_desc *rx_desc, struct sk_buff *skb) @@ -1897,7 +1858,6 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) #endif status = rx_desc->status; skb = buffer_info->skb; - buffer_info->skb = NULL; prefetch(skb->data); @@ -1942,26 +1902,6 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) goto rxdesc_done; } - /* code added for copybreak, this should improve - * performance for small packets with large amounts - * of reassembly being done in the stack */ -#define IXGB_CB_LENGTH 256 - if (length < IXGB_CB_LENGTH) { - struct sk_buff *new_skb = - dev_alloc_skb(length + NET_IP_ALIGN); - if (new_skb) { - skb_reserve(new_skb, NET_IP_ALIGN); - new_skb->dev = netdev; - memcpy(new_skb->data - NET_IP_ALIGN, - skb->data - NET_IP_ALIGN, - length + NET_IP_ALIGN); - /* save the skb in buffer_info as good */ - buffer_info->skb = skb; - skb = new_skb; - } - } - /* end copybreak code */ - /* Good Receive */ skb_put(skb, length); @@ -1991,6 +1931,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) rxdesc_done: /* clean up descriptor, might be written over by hw */ rx_desc->status = 0; + buffer_info->skb = NULL; /* use prefetched values */ rx_desc = next_rxd; @@ -2030,18 +1971,12 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) /* leave three descriptors unused */ while(--cleancount > 2) { - /* recycle! its good for you */ - if (!(skb = buffer_info->skb)) - skb = dev_alloc_skb(adapter->rx_buffer_len - + NET_IP_ALIGN); - else { - skb_trim(skb, 0); - goto map_skb; - } + rx_desc = IXGB_RX_DESC(*rx_ring, i); - if (unlikely(!skb)) { + skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN); + + if(unlikely(!skb)) { /* Better luck next round */ - adapter->alloc_rx_buff_failed++; break; } @@ -2055,36 +1990,33 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) buffer_info->skb = skb; buffer_info->length = adapter->rx_buffer_len; -map_skb: - buffer_info->dma = pci_map_single(pdev, - skb->data, - adapter->rx_buffer_len, - PCI_DMA_FROMDEVICE); + buffer_info->dma = + pci_map_single(pdev, + skb->data, + adapter->rx_buffer_len, + PCI_DMA_FROMDEVICE); - rx_desc = IXGB_RX_DESC(*rx_ring, i); rx_desc->buff_addr = cpu_to_le64(buffer_info->dma); /* guarantee DD bit not set now before h/w gets descriptor * this is the rest of the workaround for h/w double * writeback. */ rx_desc->status = 0; + if((i & ~(num_group_tail_writes- 1)) == i) { + /* Force memory writes to complete before letting h/w + * know there are new descriptors to fetch. (Only + * applicable for weak-ordered memory model archs, + * such as IA-64). */ + wmb(); + + IXGB_WRITE_REG(&adapter->hw, RDT, i); + } if(++i == rx_ring->count) i = 0; buffer_info = &rx_ring->buffer_info[i]; } - if (likely(rx_ring->next_to_use != i)) { - rx_ring->next_to_use = i; - if (unlikely(i-- == 0)) - i = (rx_ring->count - 1); - - /* Force memory writes to complete before letting h/w - * know there are new descriptors to fetch. (Only - * applicable for weak-ordered memory model archs, such - * as IA-64). */ - wmb(); - IXGB_WRITE_REG(&adapter->hw, RDT, i); - } + rx_ring->next_to_use = i; } /** diff --git a/drivers/net/ixgb/ixgb_osdep.h b/drivers/net/ixgb/ixgb_osdep.h index ee982feac..dba20481e 100644 --- a/drivers/net/ixgb/ixgb_osdep.h +++ b/drivers/net/ixgb/ixgb_osdep.h @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c index 39fbed29a..8a83dfdf7 100644 --- a/drivers/net/ixgb/ixgb_param.c +++ b/drivers/net/ixgb/ixgb_param.c @@ -1,7 +1,7 @@ /******************************************************************************* - Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved. + Copyright(c) 1999 - 2005 Intel Corporation. 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 @@ -76,7 +76,7 @@ IXGB_PARAM(RxDescriptors, "Number of receive descriptors"); * - 2 - Tx only, generate PAUSE frames but ignore them on receive * - 3 - Full Flow Control Support * - * Default Value: 2 - Tx only (silicon bug avoidance) + * Default Value: Read flow control settings from the EEPROM */ IXGB_PARAM(FlowControl, "Flow Control setting"); @@ -137,7 +137,7 @@ IXGB_PARAM(RxFCLowThresh, "Receive Flow Control Low Threshold"); * * Valid Range: 1 - 65535 * - * Default Value: 65535 (0xffff) (we'll send an xon if we recover) + * Default Value: 256 (0x100) */ IXGB_PARAM(FCReqTimeout, "Flow Control Request Timeout"); @@ -165,6 +165,8 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); #define XSUMRX_DEFAULT OPTION_ENABLED +#define FLOW_CONTROL_FULL ixgb_fc_full +#define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL #define DEFAULT_FCRTL 0x28000 #define DEFAULT_FCRTH 0x30000 #define MIN_FCRTL 0 @@ -172,9 +174,9 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); #define MIN_FCRTH 8 #define MAX_FCRTH 0x3FFF0 +#define DEFAULT_FCPAUSE 0x100 /* this may be too long */ #define MIN_FCPAUSE 1 #define MAX_FCPAUSE 0xffff -#define DEFAULT_FCPAUSE 0xFFFF /* this may be too long */ struct ixgb_option { enum { enable_option, range_option, list_option } type; @@ -334,7 +336,7 @@ ixgb_check_options(struct ixgb_adapter *adapter) .type = list_option, .name = "Flow Control", .err = "reading default settings from EEPROM", - .def = ixgb_fc_tx_pause, + .def = ixgb_fc_full, .arg = { .l = { .nr = LIST_LEN(fc_list), .p = fc_list }} }; @@ -363,8 +365,8 @@ ixgb_check_options(struct ixgb_adapter *adapter) } else { adapter->hw.fc.high_water = opt.def; } - if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) - printk (KERN_INFO + if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO "Ignoring RxFCHighThresh when no RxFC\n"); } { /* Receive Flow Control Low Threshold */ @@ -383,8 +385,8 @@ ixgb_check_options(struct ixgb_adapter *adapter) } else { adapter->hw.fc.low_water = opt.def; } - if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) - printk (KERN_INFO + if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO "Ignoring RxFCLowThresh when no RxFC\n"); } { /* Flow Control Pause Time Request*/ @@ -404,12 +406,12 @@ ixgb_check_options(struct ixgb_adapter *adapter) } else { adapter->hw.fc.pause_time = opt.def; } - if (!(adapter->hw.fc.type & ixgb_fc_tx_pause) ) - printk (KERN_INFO + if(!(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO "Ignoring FCReqTimeout when no RxFC\n"); } /* high low and spacing check for rx flow control thresholds */ - if (adapter->hw.fc.type & ixgb_fc_tx_pause) { + if (adapter->hw.fc.type & ixgb_fc_rx_pause) { /* high must be greater than low */ if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { /* set defaults */ diff --git a/drivers/net/ixp2000/caleb.c b/drivers/net/ixp2000/caleb.c index 7dea5b950..3595e107d 100644 --- a/drivers/net/ixp2000/caleb.c +++ b/drivers/net/ixp2000/caleb.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c index d3f4235c5..b67f586d7 100644 --- a/drivers/net/ixp2000/enp2611.c +++ b/drivers/net/ixp2000/enp2611.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/net/ixp2000/ixp2400-msf.c b/drivers/net/ixp2000/ixp2400-msf.c index 9ec38eebf..48a3a891d 100644 --- a/drivers/net/ixp2000/ixp2400-msf.c +++ b/drivers/net/ixp2000/ixp2400-msf.c @@ -11,6 +11,7 @@ * License, or (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index 6eeb965b4..fbc2d2102 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -235,7 +236,7 @@ static int ixpdev_open(struct net_device *dev) if (!nds_open++) { err = request_irq(IRQ_IXP2000_THDA0, ixpdev_interrupt, - IRQF_SHARED, "ixp2000_eth", nds); + SA_SHIRQ, "ixp2000_eth", nds); if (err) { nds_open--; return err; diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c index e08d3f986..5224651c9 100644 --- a/drivers/net/ixp2000/pm3386.c +++ b/drivers/net/ixp2000/pm3386.c @@ -9,6 +9,7 @@ * (at your option) any later version. */ +#include #include #include #include diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 661d75b4c..272d331d2 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c @@ -260,7 +260,7 @@ MODULE_DESCRIPTION("Jazz SONIC ethernet driver"); module_param(sonic_debug, int, 0); MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); -#define SONIC_IRQ_FLAG IRQF_DISABLED +#define SONIC_IRQ_FLAG SA_INTERRUPT #include "sonic.c" diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 5b4dbfe5f..bb5ad4792 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c @@ -326,7 +326,7 @@ MODULE_PARM_DESC(dma, "LANCE/PCnet ISA DMA channel (ignored for some devices)"); MODULE_PARM_DESC(irq, "LANCE/PCnet IRQ number (ignored for some devices)"); MODULE_PARM_DESC(lance_debug, "LANCE/PCnet debug level (0-7)"); -int __init init_module(void) +int init_module(void) { struct net_device *dev; int this_dev, found = 0; @@ -968,7 +968,8 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) /* The old LANCE chips doesn't automatically pad buffers to min. size. */ if (chip_table[lp->chip_version].flags & LANCE_MUST_PAD) { if (skb->len < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) goto out; lp->tx_ring[entry].length = -ETH_ZLEN; } diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index 1ab09447b..957888de3 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c @@ -1083,7 +1083,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) skb->len, skb->data)); if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c index c0ec7f6ab..646e89fc3 100644 --- a/drivers/net/lne390.c +++ b/drivers/net/lne390.c @@ -406,7 +406,7 @@ MODULE_PARM_DESC(mem, "memory base address(es)"); MODULE_DESCRIPTION("Mylex LNE390A/B EISA Ethernet driver"); MODULE_LICENSE("GPL"); -int __init init_module(void) +int init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index 393aba95c..94d5ea1ce 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c @@ -442,16 +442,16 @@ init_rx_bufs(struct net_device *dev, int num) { if (rbd) { rbd->pad = 0; rbd->count = 0; - rbd->skb = dev_alloc_skb(RX_SKBSIZE); + rbd->skb = dev_alloc_skb(RX_SKB_SIZE); if (!rbd->skb) { printk("dev_alloc_skb failed"); } rbd->next = rfd->rbd; if (i) { rfd->rbd->prev = rbd; - rbd->size = RX_SKBSIZE; + rbd->size = RX_SKB_SIZE; } else { - rbd->size = (RX_SKBSIZE | RBD_EL); + rbd->size = (RX_SKB_SIZE | RBD_EL); lp->rbd_tail = rbd; } @@ -851,7 +851,7 @@ static int i596_open(struct net_device *dev) { int i; - i = request_irq(dev->irq, &i596_interrupt, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &i596_interrupt, SA_SHIRQ, dev->name, dev); if (i) { printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq); return i; @@ -877,7 +877,8 @@ static int i596_start_xmit (struct sk_buff *skb, struct net_device *dev) { length = skb->len; if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 29e4b5aa6..77792b286 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c @@ -5,6 +5,7 @@ * Copyright (C) 1996 Paul Mackerras. */ +#include #include #include #include @@ -242,12 +243,12 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i } rc = request_irq(mp->tx_dma_intr, mace_txdma_intr, 0, "MACE-txdma", dev); if (rc) { - printk(KERN_ERR "MACE: can't get irq %d\n", mp->tx_dma_intr); + printk(KERN_ERR "MACE: can't get irq %d\n", mace->intrs[1].line); goto err_free_irq; } rc = request_irq(mp->rx_dma_intr, mace_rxdma_intr, 0, "MACE-rxdma", dev); if (rc) { - printk(KERN_ERR "MACE: can't get irq %d\n", mp->rx_dma_intr); + printk(KERN_ERR "MACE: can't get irq %d\n", mace->intrs[2].line); goto err_free_tx_irq; } diff --git a/drivers/net/mambonet.c b/drivers/net/mambonet.c index 9ea039286..1ef4b6a90 100644 --- a/drivers/net/mambonet.c +++ b/drivers/net/mambonet.c @@ -57,6 +57,7 @@ #include /* For ARPHRD_ETHER */ #include #include +#include #include #define MAMBO_BOGUS_NET_PROBE 119 diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c index 07e58f4a2..bbffb585b 100644 --- a/drivers/net/mipsnet.c +++ b/drivers/net/mipsnet.c @@ -179,7 +179,7 @@ static int mipsnet_open(struct net_device *dev) pr_debug("%s: mipsnet_open\n", dev->name); err = request_irq(dev->irq, &mipsnet_interrupt, - IRQF_SHARED, dev->name, (void *) dev); + SA_SHIRQ, dev->name, (void *) dev); if (err) { pr_debug("%s: %s(): can't get irq %d\n", diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 59de3e74d..625ff61c9 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -385,8 +385,6 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget) struct pkt_info pkt_info; while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) { - dma_unmap_single(NULL, pkt_info.buf_ptr, ETH_RX_SKB_SIZE, - DMA_FROM_DEVICE); mp->rx_desc_count--; received_packets++; @@ -780,7 +778,7 @@ static int mv643xx_eth_open(struct net_device *dev) int err; err = request_irq(dev->irq, mv643xx_eth_int_handler, - IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); + SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); if (err) { printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n", port_num); diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 33c5fafdb..4262c1da6 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h @@ -258,7 +258,7 @@ struct pkt_info { struct sk_buff *return_info; /* User resource return information */ }; -/* Ethernet port specific information */ +/* Ethernet port specific infomation */ struct mv643xx_mib_counters { u64 good_octets_received; diff --git a/drivers/net/myri10ge/Makefile b/drivers/net/myri10ge/Makefile deleted file mode 100644 index 5df891647..000000000 --- a/drivers/net/myri10ge/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# -# Makefile for the Myricom Myri-10G ethernet driver -# - -obj-$(CONFIG_MYRI10GE) += myri10ge.o diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c deleted file mode 100644 index 9bdd43ab3..000000000 --- a/drivers/net/myri10ge/myri10ge.c +++ /dev/null @@ -1,2866 +0,0 @@ -/************************************************************************* - * myri10ge.c: Myricom Myri-10G Ethernet driver. - * - * Copyright (C) 2005, 2006 Myricom, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Myricom, Inc. nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * - * If the eeprom on your board is not recent enough, you will need to get a - * newer firmware image at: - * http://www.myri.com/scs/download-Myri10GE.html - * - * Contact Information: - * - * Myricom, Inc., 325N Santa Anita Avenue, Arcadia, CA 91006 - *************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_MTRR -#include -#endif - -#include "myri10ge_mcp.h" -#include "myri10ge_mcp_gen_header.h" - -#define MYRI10GE_VERSION_STR "1.0.0" - -MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); -MODULE_AUTHOR("Maintainer: help@myri.com"); -MODULE_VERSION(MYRI10GE_VERSION_STR); -MODULE_LICENSE("Dual BSD/GPL"); - -#define MYRI10GE_MAX_ETHER_MTU 9014 - -#define MYRI10GE_ETH_STOPPED 0 -#define MYRI10GE_ETH_STOPPING 1 -#define MYRI10GE_ETH_STARTING 2 -#define MYRI10GE_ETH_RUNNING 3 -#define MYRI10GE_ETH_OPEN_FAILED 4 - -#define MYRI10GE_EEPROM_STRINGS_SIZE 256 -#define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2) - -#define MYRI10GE_NO_CONFIRM_DATA 0xffffffff -#define MYRI10GE_NO_RESPONSE_RESULT 0xffffffff - -struct myri10ge_rx_buffer_state { - struct sk_buff *skb; - DECLARE_PCI_UNMAP_ADDR(bus) - DECLARE_PCI_UNMAP_LEN(len) -}; - -struct myri10ge_tx_buffer_state { - struct sk_buff *skb; - int last; - DECLARE_PCI_UNMAP_ADDR(bus) - DECLARE_PCI_UNMAP_LEN(len) -}; - -struct myri10ge_cmd { - u32 data0; - u32 data1; - u32 data2; -}; - -struct myri10ge_rx_buf { - struct mcp_kreq_ether_recv __iomem *lanai; /* lanai ptr for recv ring */ - u8 __iomem *wc_fifo; /* w/c rx dma addr fifo address */ - struct mcp_kreq_ether_recv *shadow; /* host shadow of recv ring */ - struct myri10ge_rx_buffer_state *info; - int cnt; - int alloc_fail; - int mask; /* number of rx slots -1 */ -}; - -struct myri10ge_tx_buf { - struct mcp_kreq_ether_send __iomem *lanai; /* lanai ptr for sendq */ - u8 __iomem *wc_fifo; /* w/c send fifo address */ - struct mcp_kreq_ether_send *req_list; /* host shadow of sendq */ - char *req_bytes; - struct myri10ge_tx_buffer_state *info; - int mask; /* number of transmit slots -1 */ - int boundary; /* boundary transmits cannot cross */ - int req ____cacheline_aligned; /* transmit slots submitted */ - int pkt_start; /* packets started */ - int done ____cacheline_aligned; /* transmit slots completed */ - int pkt_done; /* packets completed */ -}; - -struct myri10ge_rx_done { - struct mcp_slot *entry; - dma_addr_t bus; - int cnt; - int idx; -}; - -struct myri10ge_priv { - int running; /* running? */ - int csum_flag; /* rx_csums? */ - struct myri10ge_tx_buf tx; /* transmit ring */ - struct myri10ge_rx_buf rx_small; - struct myri10ge_rx_buf rx_big; - struct myri10ge_rx_done rx_done; - int small_bytes; - struct net_device *dev; - struct net_device_stats stats; - u8 __iomem *sram; - int sram_size; - unsigned long board_span; - unsigned long iomem_base; - u32 __iomem *irq_claim; - u32 __iomem *irq_deassert; - char *mac_addr_string; - struct mcp_cmd_response *cmd; - dma_addr_t cmd_bus; - struct mcp_irq_data *fw_stats; - dma_addr_t fw_stats_bus; - struct pci_dev *pdev; - int msi_enabled; - unsigned int link_state; - unsigned int rdma_tags_available; - int intr_coal_delay; - u32 __iomem *intr_coal_delay_ptr; - int mtrr; - int wake_queue; - int stop_queue; - int down_cnt; - wait_queue_head_t down_wq; - struct work_struct watchdog_work; - struct timer_list watchdog_timer; - int watchdog_tx_done; - int watchdog_tx_req; - int watchdog_resets; - int tx_linearized; - int pause; - char *fw_name; - char eeprom_strings[MYRI10GE_EEPROM_STRINGS_SIZE]; - char fw_version[128]; - u8 mac_addr[6]; /* eeprom mac address */ - unsigned long serial_number; - int vendor_specific_offset; - u32 devctl; - u16 msi_flags; - u32 read_dma; - u32 write_dma; - u32 read_write_dma; -}; - -static char *myri10ge_fw_unaligned = "myri10ge_ethp_z8e.dat"; -static char *myri10ge_fw_aligned = "myri10ge_eth_z8e.dat"; - -static char *myri10ge_fw_name = NULL; -module_param(myri10ge_fw_name, charp, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(myri10ge_fw_name, "Firmware image name\n"); - -static int myri10ge_ecrc_enable = 1; -module_param(myri10ge_ecrc_enable, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_ecrc_enable, "Enable Extended CRC on PCI-E\n"); - -static int myri10ge_max_intr_slots = 1024; -module_param(myri10ge_max_intr_slots, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_max_intr_slots, "Interrupt queue slots\n"); - -static int myri10ge_small_bytes = -1; /* -1 == auto */ -module_param(myri10ge_small_bytes, int, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(myri10ge_small_bytes, "Threshold of small packets\n"); - -static int myri10ge_msi = 1; /* enable msi by default */ -module_param(myri10ge_msi, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_msi, "Enable Message Signalled Interrupts\n"); - -static int myri10ge_intr_coal_delay = 25; -module_param(myri10ge_intr_coal_delay, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_intr_coal_delay, "Interrupt coalescing delay\n"); - -static int myri10ge_flow_control = 1; -module_param(myri10ge_flow_control, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_flow_control, "Pause parameter\n"); - -static int myri10ge_deassert_wait = 1; -module_param(myri10ge_deassert_wait, int, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(myri10ge_deassert_wait, - "Wait when deasserting legacy interrupts\n"); - -static int myri10ge_force_firmware = 0; -module_param(myri10ge_force_firmware, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_force_firmware, - "Force firmware to assume aligned completions\n"); - -static int myri10ge_skb_cross_4k = 0; -module_param(myri10ge_skb_cross_4k, int, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(myri10ge_skb_cross_4k, - "Can a small skb cross a 4KB boundary?\n"); - -static int myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; -module_param(myri10ge_initial_mtu, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_initial_mtu, "Initial MTU\n"); - -static int myri10ge_napi_weight = 64; -module_param(myri10ge_napi_weight, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_napi_weight, "Set NAPI weight\n"); - -static int myri10ge_watchdog_timeout = 1; -module_param(myri10ge_watchdog_timeout, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_watchdog_timeout, "Set watchdog timeout\n"); - -static int myri10ge_max_irq_loops = 1048576; -module_param(myri10ge_max_irq_loops, int, S_IRUGO); -MODULE_PARM_DESC(myri10ge_max_irq_loops, - "Set stuck legacy IRQ detection threshold\n"); - -#define MYRI10GE_FW_OFFSET 1024*1024 -#define MYRI10GE_HIGHPART_TO_U32(X) \ -(sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0) -#define MYRI10GE_LOWPART_TO_U32(X) ((u32)(X)) - -#define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8) - -static int -myri10ge_send_cmd(struct myri10ge_priv *mgp, u32 cmd, - struct myri10ge_cmd *data, int atomic) -{ - struct mcp_cmd *buf; - char buf_bytes[sizeof(*buf) + 8]; - struct mcp_cmd_response *response = mgp->cmd; - char __iomem *cmd_addr = mgp->sram + MXGEFW_CMD_OFFSET; - u32 dma_low, dma_high, result, value; - int sleep_total = 0; - - /* ensure buf is aligned to 8 bytes */ - buf = (struct mcp_cmd *)ALIGN((unsigned long)buf_bytes, 8); - - buf->data0 = htonl(data->data0); - buf->data1 = htonl(data->data1); - buf->data2 = htonl(data->data2); - buf->cmd = htonl(cmd); - dma_low = MYRI10GE_LOWPART_TO_U32(mgp->cmd_bus); - dma_high = MYRI10GE_HIGHPART_TO_U32(mgp->cmd_bus); - - buf->response_addr.low = htonl(dma_low); - buf->response_addr.high = htonl(dma_high); - response->result = MYRI10GE_NO_RESPONSE_RESULT; - mb(); - myri10ge_pio_copy(cmd_addr, buf, sizeof(*buf)); - - /* wait up to 15ms. Longest command is the DMA benchmark, - * which is capped at 5ms, but runs from a timeout handler - * that runs every 7.8ms. So a 15ms timeout leaves us with - * a 2.2ms margin - */ - if (atomic) { - /* if atomic is set, do not sleep, - * and try to get the completion quickly - * (1ms will be enough for those commands) */ - for (sleep_total = 0; - sleep_total < 1000 - && response->result == MYRI10GE_NO_RESPONSE_RESULT; - sleep_total += 10) - udelay(10); - } else { - /* use msleep for most command */ - for (sleep_total = 0; - sleep_total < 15 - && response->result == MYRI10GE_NO_RESPONSE_RESULT; - sleep_total++) - msleep(1); - } - - result = ntohl(response->result); - value = ntohl(response->data); - if (result != MYRI10GE_NO_RESPONSE_RESULT) { - if (result == 0) { - data->data0 = value; - return 0; - } else { - dev_err(&mgp->pdev->dev, - "command %d failed, result = %d\n", - cmd, result); - return -ENXIO; - } - } - - dev_err(&mgp->pdev->dev, "command %d timed out, result = %d\n", - cmd, result); - return -EAGAIN; -} - -/* - * The eeprom strings on the lanaiX have the format - * SN=x\0 - * MAC=x:x:x:x:x:x\0 - * PT:ddd mmm xx xx:xx:xx xx\0 - * PV:ddd mmm xx xx:xx:xx xx\0 - */ -static int myri10ge_read_mac_addr(struct myri10ge_priv *mgp) -{ - char *ptr, *limit; - int i; - - ptr = mgp->eeprom_strings; - limit = mgp->eeprom_strings + MYRI10GE_EEPROM_STRINGS_SIZE; - - while (*ptr != '\0' && ptr < limit) { - if (memcmp(ptr, "MAC=", 4) == 0) { - ptr += 4; - mgp->mac_addr_string = ptr; - for (i = 0; i < 6; i++) { - if ((ptr + 2) > limit) - goto abort; - mgp->mac_addr[i] = - simple_strtoul(ptr, &ptr, 16); - ptr += 1; - } - } - if (memcmp((const void *)ptr, "SN=", 3) == 0) { - ptr += 3; - mgp->serial_number = simple_strtoul(ptr, &ptr, 10); - } - while (ptr < limit && *ptr++) ; - } - - return 0; - -abort: - dev_err(&mgp->pdev->dev, "failed to parse eeprom_strings\n"); - return -ENXIO; -} - -/* - * Enable or disable periodic RDMAs from the host to make certain - * chipsets resend dropped PCIe messages - */ - -static void myri10ge_dummy_rdma(struct myri10ge_priv *mgp, int enable) -{ - char __iomem *submit; - u32 buf[16]; - u32 dma_low, dma_high; - int i; - - /* clear confirmation addr */ - mgp->cmd->data = 0; - mb(); - - /* send a rdma command to the PCIe engine, and wait for the - * response in the confirmation address. The firmware should - * write a -1 there to indicate it is alive and well - */ - dma_low = MYRI10GE_LOWPART_TO_U32(mgp->cmd_bus); - dma_high = MYRI10GE_HIGHPART_TO_U32(mgp->cmd_bus); - - buf[0] = htonl(dma_high); /* confirm addr MSW */ - buf[1] = htonl(dma_low); /* confirm addr LSW */ - buf[2] = htonl(MYRI10GE_NO_CONFIRM_DATA); /* confirm data */ - buf[3] = htonl(dma_high); /* dummy addr MSW */ - buf[4] = htonl(dma_low); /* dummy addr LSW */ - buf[5] = htonl(enable); /* enable? */ - - submit = mgp->sram + 0xfc01c0; - - myri10ge_pio_copy(submit, &buf, sizeof(buf)); - for (i = 0; mgp->cmd->data != MYRI10GE_NO_CONFIRM_DATA && i < 20; i++) - msleep(1); - if (mgp->cmd->data != MYRI10GE_NO_CONFIRM_DATA) - dev_err(&mgp->pdev->dev, "dummy rdma %s failed\n", - (enable ? "enable" : "disable")); -} - -static int -myri10ge_validate_firmware(struct myri10ge_priv *mgp, - struct mcp_gen_header *hdr) -{ - struct device *dev = &mgp->pdev->dev; - int major, minor; - - /* check firmware type */ - if (ntohl(hdr->mcp_type) != MCP_TYPE_ETH) { - dev_err(dev, "Bad firmware type: 0x%x\n", ntohl(hdr->mcp_type)); - return -EINVAL; - } - - /* save firmware version for ethtool */ - strncpy(mgp->fw_version, hdr->version, sizeof(mgp->fw_version)); - - sscanf(mgp->fw_version, "%d.%d", &major, &minor); - - if (!(major == MXGEFW_VERSION_MAJOR && minor == MXGEFW_VERSION_MINOR)) { - dev_err(dev, "Found firmware version %s\n", mgp->fw_version); - dev_err(dev, "Driver needs %d.%d\n", MXGEFW_VERSION_MAJOR, - MXGEFW_VERSION_MINOR); - return -EINVAL; - } - return 0; -} - -static int myri10ge_load_hotplug_firmware(struct myri10ge_priv *mgp, u32 * size) -{ - unsigned crc, reread_crc; - const struct firmware *fw; - struct device *dev = &mgp->pdev->dev; - struct mcp_gen_header *hdr; - size_t hdr_offset; - int status; - unsigned i; - - if ((status = request_firmware(&fw, mgp->fw_name, dev)) < 0) { - dev_err(dev, "Unable to load %s firmware image via hotplug\n", - mgp->fw_name); - status = -EINVAL; - goto abort_with_nothing; - } - - /* check size */ - - if (fw->size >= mgp->sram_size - MYRI10GE_FW_OFFSET || - fw->size < MCP_HEADER_PTR_OFFSET + 4) { - dev_err(dev, "Firmware size invalid:%d\n", (int)fw->size); - status = -EINVAL; - goto abort_with_fw; - } - - /* check id */ - hdr_offset = ntohl(*(u32 *) (fw->data + MCP_HEADER_PTR_OFFSET)); - if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > fw->size) { - dev_err(dev, "Bad firmware file\n"); - status = -EINVAL; - goto abort_with_fw; - } - hdr = (void *)(fw->data + hdr_offset); - - status = myri10ge_validate_firmware(mgp, hdr); - if (status != 0) - goto abort_with_fw; - - crc = crc32(~0, fw->data, fw->size); - for (i = 0; i < fw->size; i += 256) { - myri10ge_pio_copy(mgp->sram + MYRI10GE_FW_OFFSET + i, - fw->data + i, - min(256U, (unsigned)(fw->size - i))); - mb(); - readb(mgp->sram); - } - /* corruption checking is good for parity recovery and buggy chipset */ - memcpy_fromio(fw->data, mgp->sram + MYRI10GE_FW_OFFSET, fw->size); - reread_crc = crc32(~0, fw->data, fw->size); - if (crc != reread_crc) { - dev_err(dev, "CRC failed(fw-len=%u), got 0x%x (expect 0x%x)\n", - (unsigned)fw->size, reread_crc, crc); - status = -EIO; - goto abort_with_fw; - } - *size = (u32) fw->size; - -abort_with_fw: - release_firmware(fw); - -abort_with_nothing: - return status; -} - -static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) -{ - struct mcp_gen_header *hdr; - struct device *dev = &mgp->pdev->dev; - const size_t bytes = sizeof(struct mcp_gen_header); - size_t hdr_offset; - int status; - - /* find running firmware header */ - hdr_offset = ntohl(__raw_readl(mgp->sram + MCP_HEADER_PTR_OFFSET)); - - if ((hdr_offset & 3) || hdr_offset + sizeof(*hdr) > mgp->sram_size) { - dev_err(dev, "Running firmware has bad header offset (%d)\n", - (int)hdr_offset); - return -EIO; - } - - /* copy header of running firmware from SRAM to host memory to - * validate firmware */ - hdr = kmalloc(bytes, GFP_KERNEL); - if (hdr == NULL) { - dev_err(dev, "could not malloc firmware hdr\n"); - return -ENOMEM; - } - memcpy_fromio(hdr, mgp->sram + hdr_offset, bytes); - status = myri10ge_validate_firmware(mgp, hdr); - kfree(hdr); - return status; -} - -static int myri10ge_load_firmware(struct myri10ge_priv *mgp) -{ - char __iomem *submit; - u32 buf[16]; - u32 dma_low, dma_high, size; - int status, i; - - size = 0; - status = myri10ge_load_hotplug_firmware(mgp, &size); - if (status) { - dev_warn(&mgp->pdev->dev, "hotplug firmware loading failed\n"); - - /* Do not attempt to adopt firmware if there - * was a bad crc */ - if (status == -EIO) - return status; - - status = myri10ge_adopt_running_firmware(mgp); - if (status != 0) { - dev_err(&mgp->pdev->dev, - "failed to adopt running firmware\n"); - return status; - } - dev_info(&mgp->pdev->dev, - "Successfully adopted running firmware\n"); - if (mgp->tx.boundary == 4096) { - dev_warn(&mgp->pdev->dev, - "Using firmware currently running on NIC" - ". For optimal\n"); - dev_warn(&mgp->pdev->dev, - "performance consider loading optimized " - "firmware\n"); - dev_warn(&mgp->pdev->dev, "via hotplug\n"); - } - - mgp->fw_name = "adopted"; - mgp->tx.boundary = 2048; - return status; - } - - /* clear confirmation addr */ - mgp->cmd->data = 0; - mb(); - - /* send a reload command to the bootstrap MCP, and wait for the - * response in the confirmation address. The firmware should - * write a -1 there to indicate it is alive and well - */ - dma_low = MYRI10GE_LOWPART_TO_U32(mgp->cmd_bus); - dma_high = MYRI10GE_HIGHPART_TO_U32(mgp->cmd_bus); - - buf[0] = htonl(dma_high); /* confirm addr MSW */ - buf[1] = htonl(dma_low); /* confirm addr LSW */ - buf[2] = htonl(MYRI10GE_NO_CONFIRM_DATA); /* confirm data */ - - /* FIX: All newest firmware should un-protect the bottom of - * the sram before handoff. However, the very first interfaces - * do not. Therefore the handoff copy must skip the first 8 bytes - */ - buf[3] = htonl(MYRI10GE_FW_OFFSET + 8); /* where the code starts */ - buf[4] = htonl(size - 8); /* length of code */ - buf[5] = htonl(8); /* where to copy to */ - buf[6] = htonl(0); /* where to jump to */ - - submit = mgp->sram + 0xfc0000; - - myri10ge_pio_copy(submit, &buf, sizeof(buf)); - mb(); - msleep(1); - mb(); - i = 0; - while (mgp->cmd->data != MYRI10GE_NO_CONFIRM_DATA && i < 20) { - msleep(1); - i++; - } - if (mgp->cmd->data != MYRI10GE_NO_CONFIRM_DATA) { - dev_err(&mgp->pdev->dev, "handoff failed\n"); - return -ENXIO; - } - dev_info(&mgp->pdev->dev, "handoff confirmed\n"); - myri10ge_dummy_rdma(mgp, 1); - - return 0; -} - -static int myri10ge_update_mac_address(struct myri10ge_priv *mgp, u8 * addr) -{ - struct myri10ge_cmd cmd; - int status; - - cmd.data0 = ((addr[0] << 24) | (addr[1] << 16) - | (addr[2] << 8) | addr[3]); - - cmd.data1 = ((addr[4] << 8) | (addr[5])); - - status = myri10ge_send_cmd(mgp, MXGEFW_SET_MAC_ADDRESS, &cmd, 0); - return status; -} - -static int myri10ge_change_pause(struct myri10ge_priv *mgp, int pause) -{ - struct myri10ge_cmd cmd; - int status, ctl; - - ctl = pause ? MXGEFW_ENABLE_FLOW_CONTROL : MXGEFW_DISABLE_FLOW_CONTROL; - status = myri10ge_send_cmd(mgp, ctl, &cmd, 0); - - if (status) { - printk(KERN_ERR - "myri10ge: %s: Failed to set flow control mode\n", - mgp->dev->name); - return status; - } - mgp->pause = pause; - return 0; -} - -static void -myri10ge_change_promisc(struct myri10ge_priv *mgp, int promisc, int atomic) -{ - struct myri10ge_cmd cmd; - int status, ctl; - - ctl = promisc ? MXGEFW_ENABLE_PROMISC : MXGEFW_DISABLE_PROMISC; - status = myri10ge_send_cmd(mgp, ctl, &cmd, atomic); - if (status) - printk(KERN_ERR "myri10ge: %s: Failed to set promisc mode\n", - mgp->dev->name); -} - -static int myri10ge_reset(struct myri10ge_priv *mgp) -{ - struct myri10ge_cmd cmd; - int status; - size_t bytes; - u32 len; - - /* try to send a reset command to the card to see if it - * is alive */ - memset(&cmd, 0, sizeof(cmd)); - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_RESET, &cmd, 0); - if (status != 0) { - dev_err(&mgp->pdev->dev, "failed reset\n"); - return -ENXIO; - } - - /* Now exchange information about interrupts */ - - bytes = myri10ge_max_intr_slots * sizeof(*mgp->rx_done.entry); - memset(mgp->rx_done.entry, 0, bytes); - cmd.data0 = (u32) bytes; - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_INTRQ_SIZE, &cmd, 0); - cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); - cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); - status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_INTRQ_DMA, &cmd, 0); - - status |= - myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_IRQ_ACK_OFFSET, &cmd, 0); - mgp->irq_claim = (__iomem u32 *) (mgp->sram + cmd.data0); - if (!mgp->msi_enabled) { - status |= myri10ge_send_cmd - (mgp, MXGEFW_CMD_GET_IRQ_DEASSERT_OFFSET, &cmd, 0); - mgp->irq_deassert = (__iomem u32 *) (mgp->sram + cmd.data0); - - } - status |= myri10ge_send_cmd - (mgp, MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, &cmd, 0); - mgp->intr_coal_delay_ptr = (__iomem u32 *) (mgp->sram + cmd.data0); - if (status != 0) { - dev_err(&mgp->pdev->dev, "failed set interrupt parameters\n"); - return status; - } - __raw_writel(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); - - /* Run a small DMA test. - * The magic multipliers to the length tell the firmware - * to do DMA read, write, or read+write tests. The - * results are returned in cmd.data0. The upper 16 - * bits or the return is the number of transfers completed. - * The lower 16 bits is the time in 0.5us ticks that the - * transfers took to complete. - */ - - len = mgp->tx.boundary; - - cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); - cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); - cmd.data2 = len * 0x10000; - status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); - if (status == 0) - mgp->read_dma = ((cmd.data0 >> 16) * len * 2) / - (cmd.data0 & 0xffff); - else - dev_warn(&mgp->pdev->dev, "DMA read benchmark failed: %d\n", - status); - cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); - cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); - cmd.data2 = len * 0x1; - status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); - if (status == 0) - mgp->write_dma = ((cmd.data0 >> 16) * len * 2) / - (cmd.data0 & 0xffff); - else - dev_warn(&mgp->pdev->dev, "DMA write benchmark failed: %d\n", - status); - - cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->rx_done.bus); - cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->rx_done.bus); - cmd.data2 = len * 0x10001; - status = myri10ge_send_cmd(mgp, MXGEFW_DMA_TEST, &cmd, 0); - if (status == 0) - mgp->read_write_dma = ((cmd.data0 >> 16) * len * 2 * 2) / - (cmd.data0 & 0xffff); - else - dev_warn(&mgp->pdev->dev, - "DMA read/write benchmark failed: %d\n", status); - - memset(mgp->rx_done.entry, 0, bytes); - - /* reset mcp/driver shared state back to 0 */ - mgp->tx.req = 0; - mgp->tx.done = 0; - mgp->tx.pkt_start = 0; - mgp->tx.pkt_done = 0; - mgp->rx_big.cnt = 0; - mgp->rx_small.cnt = 0; - mgp->rx_done.idx = 0; - mgp->rx_done.cnt = 0; - status = myri10ge_update_mac_address(mgp, mgp->dev->dev_addr); - myri10ge_change_promisc(mgp, 0, 0); - myri10ge_change_pause(mgp, mgp->pause); - return status; -} - -static inline void -myri10ge_submit_8rx(struct mcp_kreq_ether_recv __iomem * dst, - struct mcp_kreq_ether_recv *src) -{ - u32 low; - - low = src->addr_low; - src->addr_low = DMA_32BIT_MASK; - myri10ge_pio_copy(dst, src, 8 * sizeof(*src)); - mb(); - src->addr_low = low; - __raw_writel(low, &dst->addr_low); - mb(); -} - -/* - * Set of routines to get a new receive buffer. Any buffer which - * crosses a 4KB boundary must start on a 4KB boundary due to PCIe - * wdma restrictions. We also try to align any smaller allocation to - * at least a 16 byte boundary for efficiency. We assume the linux - * memory allocator works by powers of 2, and will not return memory - * smaller than 2KB which crosses a 4KB boundary. If it does, we fall - * back to allocating 2x as much space as required. - * - * We intend to replace large (>4KB) skb allocations by using - * pages directly and building a fraglist in the near future. - */ - -static inline struct sk_buff *myri10ge_alloc_big(int bytes) -{ - struct sk_buff *skb; - unsigned long data, roundup; - - skb = dev_alloc_skb(bytes + 4096 + MXGEFW_PAD); - if (skb == NULL) - return NULL; - - /* Correct skb->truesize so that socket buffer - * accounting is not confused the rounding we must - * do to satisfy alignment constraints. - */ - skb->truesize -= 4096; - - data = (unsigned long)(skb->data); - roundup = (-data) & (4095); - skb_reserve(skb, roundup); - return skb; -} - -/* Allocate 2x as much space as required and use whichever portion - * does not cross a 4KB boundary */ -static inline struct sk_buff *myri10ge_alloc_small_safe(unsigned int bytes) -{ - struct sk_buff *skb; - unsigned long data, boundary; - - skb = dev_alloc_skb(2 * (bytes + MXGEFW_PAD) - 1); - if (unlikely(skb == NULL)) - return NULL; - - /* Correct skb->truesize so that socket buffer - * accounting is not confused the rounding we must - * do to satisfy alignment constraints. - */ - skb->truesize -= bytes + MXGEFW_PAD; - - data = (unsigned long)(skb->data); - boundary = (data + 4095UL) & ~4095UL; - if ((boundary - data) >= (bytes + MXGEFW_PAD)) - return skb; - - skb_reserve(skb, boundary - data); - return skb; -} - -/* Allocate just enough space, and verify that the allocated - * space does not cross a 4KB boundary */ -static inline struct sk_buff *myri10ge_alloc_small(int bytes) -{ - struct sk_buff *skb; - unsigned long roundup, data, end; - - skb = dev_alloc_skb(bytes + 16 + MXGEFW_PAD); - if (unlikely(skb == NULL)) - return NULL; - - /* Round allocated buffer to 16 byte boundary */ - data = (unsigned long)(skb->data); - roundup = (-data) & 15UL; - skb_reserve(skb, roundup); - /* Verify that the data buffer does not cross a page boundary */ - data = (unsigned long)(skb->data); - end = data + bytes + MXGEFW_PAD - 1; - if (unlikely(((end >> 12) != (data >> 12)) && (data & 4095UL))) { - printk(KERN_NOTICE - "myri10ge_alloc_small: small skb crossed 4KB boundary\n"); - myri10ge_skb_cross_4k = 1; - dev_kfree_skb_any(skb); - skb = myri10ge_alloc_small_safe(bytes); - } - return skb; -} - -static inline int -myri10ge_getbuf(struct myri10ge_rx_buf *rx, struct pci_dev *pdev, int bytes, - int idx) -{ - struct sk_buff *skb; - dma_addr_t bus; - int len, retval = 0; - - bytes += VLAN_HLEN; /* account for 802.1q vlan tag */ - - if ((bytes + MXGEFW_PAD) > (4096 - 16) /* linux overhead */ ) - skb = myri10ge_alloc_big(bytes); - else if (myri10ge_skb_cross_4k) - skb = myri10ge_alloc_small_safe(bytes); - else - skb = myri10ge_alloc_small(bytes); - - if (unlikely(skb == NULL)) { - rx->alloc_fail++; - retval = -ENOBUFS; - goto done; - } - - /* set len so that it only covers the area we - * need mapped for DMA */ - len = bytes + MXGEFW_PAD; - - bus = pci_map_single(pdev, skb->data, len, PCI_DMA_FROMDEVICE); - rx->info[idx].skb = skb; - pci_unmap_addr_set(&rx->info[idx], bus, bus); - pci_unmap_len_set(&rx->info[idx], len, len); - rx->shadow[idx].addr_low = htonl(MYRI10GE_LOWPART_TO_U32(bus)); - rx->shadow[idx].addr_high = htonl(MYRI10GE_HIGHPART_TO_U32(bus)); - -done: - /* copy 8 descriptors (64-bytes) to the mcp at a time */ - if ((idx & 7) == 7) { - if (rx->wc_fifo == NULL) - myri10ge_submit_8rx(&rx->lanai[idx - 7], - &rx->shadow[idx - 7]); - else { - mb(); - myri10ge_pio_copy(rx->wc_fifo, - &rx->shadow[idx - 7], 64); - } - } - return retval; -} - -static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, u16 hw_csum) -{ - struct vlan_hdr *vh = (struct vlan_hdr *)(skb->data); - - if ((skb->protocol == ntohs(ETH_P_8021Q)) && - (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) || - vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) { - skb->csum = hw_csum; - skb->ip_summed = CHECKSUM_HW; - } -} - -static inline unsigned long -myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, - int bytes, int len, int csum) -{ - dma_addr_t bus; - struct sk_buff *skb; - int idx, unmap_len; - - idx = rx->cnt & rx->mask; - rx->cnt++; - - /* save a pointer to the received skb */ - skb = rx->info[idx].skb; - bus = pci_unmap_addr(&rx->info[idx], bus); - unmap_len = pci_unmap_len(&rx->info[idx], len); - - /* try to replace the received skb */ - if (myri10ge_getbuf(rx, mgp->pdev, bytes, idx)) { - /* drop the frame -- the old skbuf is re-cycled */ - mgp->stats.rx_dropped += 1; - return 0; - } - - /* unmap the recvd skb */ - pci_unmap_single(mgp->pdev, bus, unmap_len, PCI_DMA_FROMDEVICE); - - /* mcp implicitly skips 1st bytes so that packet is properly - * aligned */ - skb_reserve(skb, MXGEFW_PAD); - - /* set the length of the frame */ - skb_put(skb, len); - - skb->protocol = eth_type_trans(skb, mgp->dev); - skb->dev = mgp->dev; - if (mgp->csum_flag) { - if ((skb->protocol == ntohs(ETH_P_IP)) || - (skb->protocol == ntohs(ETH_P_IPV6))) { - skb->csum = ntohs((u16) csum); - skb->ip_summed = CHECKSUM_HW; - } else - myri10ge_vlan_ip_csum(skb, ntohs((u16) csum)); - } - - netif_receive_skb(skb); - mgp->dev->last_rx = jiffies; - return 1; -} - -static inline void myri10ge_tx_done(struct myri10ge_priv *mgp, int mcp_index) -{ - struct pci_dev *pdev = mgp->pdev; - struct myri10ge_tx_buf *tx = &mgp->tx; - struct sk_buff *skb; - int idx, len; - int limit = 0; - - while (tx->pkt_done != mcp_index) { - idx = tx->done & tx->mask; - skb = tx->info[idx].skb; - - /* Mark as free */ - tx->info[idx].skb = NULL; - if (tx->info[idx].last) { - tx->pkt_done++; - tx->info[idx].last = 0; - } - tx->done++; - len = pci_unmap_len(&tx->info[idx], len); - pci_unmap_len_set(&tx->info[idx], len, 0); - if (skb) { - mgp->stats.tx_bytes += skb->len; - mgp->stats.tx_packets++; - dev_kfree_skb_irq(skb); - if (len) - pci_unmap_single(pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - } else { - if (len) - pci_unmap_page(pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - } - - /* limit potential for livelock by only handling - * 2 full tx rings per call */ - if (unlikely(++limit > 2 * tx->mask)) - break; - } - /* start the queue if we've stopped it */ - if (netif_queue_stopped(mgp->dev) - && tx->req - tx->done < (tx->mask >> 1)) { - mgp->wake_queue++; - netif_wake_queue(mgp->dev); - } -} - -static inline void myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int *limit) -{ - struct myri10ge_rx_done *rx_done = &mgp->rx_done; - unsigned long rx_bytes = 0; - unsigned long rx_packets = 0; - unsigned long rx_ok; - - int idx = rx_done->idx; - int cnt = rx_done->cnt; - u16 length; - u16 checksum; - - while (rx_done->entry[idx].length != 0 && *limit != 0) { - length = ntohs(rx_done->entry[idx].length); - rx_done->entry[idx].length = 0; - checksum = ntohs(rx_done->entry[idx].checksum); - if (length <= mgp->small_bytes) - rx_ok = myri10ge_rx_done(mgp, &mgp->rx_small, - mgp->small_bytes, - length, checksum); - else - rx_ok = myri10ge_rx_done(mgp, &mgp->rx_big, - mgp->dev->mtu + ETH_HLEN, - length, checksum); - rx_packets += rx_ok; - rx_bytes += rx_ok * (unsigned long)length; - cnt++; - idx = cnt & (myri10ge_max_intr_slots - 1); - - /* limit potential for livelock by only handling a - * limited number of frames. */ - (*limit)--; - } - rx_done->idx = idx; - rx_done->cnt = cnt; - mgp->stats.rx_packets += rx_packets; - mgp->stats.rx_bytes += rx_bytes; -} - -static inline void myri10ge_check_statblock(struct myri10ge_priv *mgp) -{ - struct mcp_irq_data *stats = mgp->fw_stats; - - if (unlikely(stats->stats_updated)) { - if (mgp->link_state != stats->link_up) { - mgp->link_state = stats->link_up; - if (mgp->link_state) { - printk(KERN_INFO "myri10ge: %s: link up\n", - mgp->dev->name); - netif_carrier_on(mgp->dev); - } else { - printk(KERN_INFO "myri10ge: %s: link down\n", - mgp->dev->name); - netif_carrier_off(mgp->dev); - } - } - if (mgp->rdma_tags_available != - ntohl(mgp->fw_stats->rdma_tags_available)) { - mgp->rdma_tags_available = - ntohl(mgp->fw_stats->rdma_tags_available); - printk(KERN_WARNING "myri10ge: %s: RDMA timed out! " - "%d tags left\n", mgp->dev->name, - mgp->rdma_tags_available); - } - mgp->down_cnt += stats->link_down; - if (stats->link_down) - wake_up(&mgp->down_wq); - } -} - -static int myri10ge_poll(struct net_device *netdev, int *budget) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - struct myri10ge_rx_done *rx_done = &mgp->rx_done; - int limit, orig_limit, work_done; - - /* process as many rx events as NAPI will allow */ - limit = min(*budget, netdev->quota); - orig_limit = limit; - myri10ge_clean_rx_done(mgp, &limit); - work_done = orig_limit - limit; - *budget -= work_done; - netdev->quota -= work_done; - - if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) { - netif_rx_complete(netdev); - __raw_writel(htonl(3), mgp->irq_claim); - return 0; - } - return 1; -} - -static irqreturn_t myri10ge_intr(int irq, void *arg, struct pt_regs *regs) -{ - struct myri10ge_priv *mgp = arg; - struct mcp_irq_data *stats = mgp->fw_stats; - struct myri10ge_tx_buf *tx = &mgp->tx; - u32 send_done_count; - int i; - - /* make sure it is our IRQ, and that the DMA has finished */ - if (unlikely(!stats->valid)) - return (IRQ_NONE); - - /* low bit indicates receives are present, so schedule - * napi poll handler */ - if (stats->valid & 1) - netif_rx_schedule(mgp->dev); - - if (!mgp->msi_enabled) { - __raw_writel(0, mgp->irq_deassert); - if (!myri10ge_deassert_wait) - stats->valid = 0; - mb(); - } else - stats->valid = 0; - - /* Wait for IRQ line to go low, if using INTx */ - i = 0; - while (1) { - i++; - /* check for transmit completes and receives */ - send_done_count = ntohl(stats->send_done_count); - if (send_done_count != tx->pkt_done) - myri10ge_tx_done(mgp, (int)send_done_count); - if (unlikely(i > myri10ge_max_irq_loops)) { - printk(KERN_WARNING "myri10ge: %s: irq stuck?\n", - mgp->dev->name); - stats->valid = 0; - schedule_work(&mgp->watchdog_work); - } - if (likely(stats->valid == 0)) - break; - cpu_relax(); - barrier(); - } - - myri10ge_check_statblock(mgp); - - __raw_writel(htonl(3), mgp->irq_claim + 1); - return (IRQ_HANDLED); -} - -static int -myri10ge_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd) -{ - cmd->autoneg = AUTONEG_DISABLE; - cmd->speed = SPEED_10000; - cmd->duplex = DUPLEX_FULL; - return 0; -} - -static void -myri10ge_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *info) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - - strlcpy(info->driver, "myri10ge", sizeof(info->driver)); - strlcpy(info->version, MYRI10GE_VERSION_STR, sizeof(info->version)); - strlcpy(info->fw_version, mgp->fw_version, sizeof(info->fw_version)); - strlcpy(info->bus_info, pci_name(mgp->pdev), sizeof(info->bus_info)); -} - -static int -myri10ge_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coal) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - coal->rx_coalesce_usecs = mgp->intr_coal_delay; - return 0; -} - -static int -myri10ge_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coal) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - - mgp->intr_coal_delay = coal->rx_coalesce_usecs; - __raw_writel(htonl(mgp->intr_coal_delay), mgp->intr_coal_delay_ptr); - return 0; -} - -static void -myri10ge_get_pauseparam(struct net_device *netdev, - struct ethtool_pauseparam *pause) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - - pause->autoneg = 0; - pause->rx_pause = mgp->pause; - pause->tx_pause = mgp->pause; -} - -static int -myri10ge_set_pauseparam(struct net_device *netdev, - struct ethtool_pauseparam *pause) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - - if (pause->tx_pause != mgp->pause) - return myri10ge_change_pause(mgp, pause->tx_pause); - if (pause->rx_pause != mgp->pause) - return myri10ge_change_pause(mgp, pause->tx_pause); - if (pause->autoneg != 0) - return -EINVAL; - return 0; -} - -static void -myri10ge_get_ringparam(struct net_device *netdev, - struct ethtool_ringparam *ring) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - - ring->rx_mini_max_pending = mgp->rx_small.mask + 1; - ring->rx_max_pending = mgp->rx_big.mask + 1; - ring->rx_jumbo_max_pending = 0; - ring->tx_max_pending = mgp->rx_small.mask + 1; - ring->rx_mini_pending = ring->rx_mini_max_pending; - ring->rx_pending = ring->rx_max_pending; - ring->rx_jumbo_pending = ring->rx_jumbo_max_pending; - ring->tx_pending = ring->tx_max_pending; -} - -static u32 myri10ge_get_rx_csum(struct net_device *netdev) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - if (mgp->csum_flag) - return 1; - else - return 0; -} - -static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - if (csum_enabled) - mgp->csum_flag = MXGEFW_FLAGS_CKSUM; - else - mgp->csum_flag = 0; - return 0; -} - -static const char myri10ge_gstrings_stats[][ETH_GSTRING_LEN] = { - "rx_packets", "tx_packets", "rx_bytes", "tx_bytes", "rx_errors", - "tx_errors", "rx_dropped", "tx_dropped", "multicast", "collisions", - "rx_length_errors", "rx_over_errors", "rx_crc_errors", - "rx_frame_errors", "rx_fifo_errors", "rx_missed_errors", - "tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors", - "tx_heartbeat_errors", "tx_window_errors", - /* device-specific stats */ - "tx_boundary", "WC", "irq", "MSI", - "read_dma_bw_MBs", "write_dma_bw_MBs", "read_write_dma_bw_MBs", - "serial_number", "tx_pkt_start", "tx_pkt_done", - "tx_req", "tx_done", "rx_small_cnt", "rx_big_cnt", - "wake_queue", "stop_queue", "watchdog_resets", "tx_linearized", - "link_up", "dropped_link_overflow", "dropped_link_error_or_filtered", - "dropped_runt", "dropped_overrun", "dropped_no_small_buffer", - "dropped_no_big_buffer" -}; - -#define MYRI10GE_NET_STATS_LEN 21 -#define MYRI10GE_STATS_LEN sizeof(myri10ge_gstrings_stats) / ETH_GSTRING_LEN - -static void -myri10ge_get_strings(struct net_device *netdev, u32 stringset, u8 * data) -{ - switch (stringset) { - case ETH_SS_STATS: - memcpy(data, *myri10ge_gstrings_stats, - sizeof(myri10ge_gstrings_stats)); - break; - } -} - -static int myri10ge_get_stats_count(struct net_device *netdev) -{ - return MYRI10GE_STATS_LEN; -} - -static void -myri10ge_get_ethtool_stats(struct net_device *netdev, - struct ethtool_stats *stats, u64 * data) -{ - struct myri10ge_priv *mgp = netdev_priv(netdev); - int i; - - for (i = 0; i < MYRI10GE_NET_STATS_LEN; i++) - data[i] = ((unsigned long *)&mgp->stats)[i]; - - data[i++] = (unsigned int)mgp->tx.boundary; - data[i++] = (unsigned int)(mgp->mtrr >= 0); - data[i++] = (unsigned int)mgp->pdev->irq; - data[i++] = (unsigned int)mgp->msi_enabled; - data[i++] = (unsigned int)mgp->read_dma; - data[i++] = (unsigned int)mgp->write_dma; - data[i++] = (unsigned int)mgp->read_write_dma; - data[i++] = (unsigned int)mgp->serial_number; - data[i++] = (unsigned int)mgp->tx.pkt_start; - data[i++] = (unsigned int)mgp->tx.pkt_done; - data[i++] = (unsigned int)mgp->tx.req; - data[i++] = (unsigned int)mgp->tx.done; - data[i++] = (unsigned int)mgp->rx_small.cnt; - data[i++] = (unsigned int)mgp->rx_big.cnt; - data[i++] = (unsigned int)mgp->wake_queue; - data[i++] = (unsigned int)mgp->stop_queue; - data[i++] = (unsigned int)mgp->watchdog_resets; - data[i++] = (unsigned int)mgp->tx_linearized; - data[i++] = (unsigned int)ntohl(mgp->fw_stats->link_up); - data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_link_overflow); - data[i++] = - (unsigned int)ntohl(mgp->fw_stats->dropped_link_error_or_filtered); - data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_runt); - data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_overrun); - data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_no_small_buffer); - data[i++] = (unsigned int)ntohl(mgp->fw_stats->dropped_no_big_buffer); -} - -static struct ethtool_ops myri10ge_ethtool_ops = { - .get_settings = myri10ge_get_settings, - .get_drvinfo = myri10ge_get_drvinfo, - .get_coalesce = myri10ge_get_coalesce, - .set_coalesce = myri10ge_set_coalesce, - .get_pauseparam = myri10ge_get_pauseparam, - .set_pauseparam = myri10ge_set_pauseparam, - .get_ringparam = myri10ge_get_ringparam, - .get_rx_csum = myri10ge_get_rx_csum, - .set_rx_csum = myri10ge_set_rx_csum, - .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = ethtool_op_set_tx_hw_csum, - .get_sg = ethtool_op_get_sg, - .set_sg = ethtool_op_set_sg, -#ifdef NETIF_F_TSO - .get_tso = ethtool_op_get_tso, - .set_tso = ethtool_op_set_tso, -#endif - .get_strings = myri10ge_get_strings, - .get_stats_count = myri10ge_get_stats_count, - .get_ethtool_stats = myri10ge_get_ethtool_stats -}; - -static int myri10ge_allocate_rings(struct net_device *dev) -{ - struct myri10ge_priv *mgp; - struct myri10ge_cmd cmd; - int tx_ring_size, rx_ring_size; - int tx_ring_entries, rx_ring_entries; - int i, status; - size_t bytes; - - mgp = netdev_priv(dev); - - /* get ring sizes */ - - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_RING_SIZE, &cmd, 0); - tx_ring_size = cmd.data0; - status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_RX_RING_SIZE, &cmd, 0); - rx_ring_size = cmd.data0; - - tx_ring_entries = tx_ring_size / sizeof(struct mcp_kreq_ether_send); - rx_ring_entries = rx_ring_size / sizeof(struct mcp_dma_addr); - mgp->tx.mask = tx_ring_entries - 1; - mgp->rx_small.mask = mgp->rx_big.mask = rx_ring_entries - 1; - - /* allocate the host shadow rings */ - - bytes = 8 + (MYRI10GE_MAX_SEND_DESC_TSO + 4) - * sizeof(*mgp->tx.req_list); - mgp->tx.req_bytes = kzalloc(bytes, GFP_KERNEL); - if (mgp->tx.req_bytes == NULL) - goto abort_with_nothing; - - /* ensure req_list entries are aligned to 8 bytes */ - mgp->tx.req_list = (struct mcp_kreq_ether_send *) - ALIGN((unsigned long)mgp->tx.req_bytes, 8); - - bytes = rx_ring_entries * sizeof(*mgp->rx_small.shadow); - mgp->rx_small.shadow = kzalloc(bytes, GFP_KERNEL); - if (mgp->rx_small.shadow == NULL) - goto abort_with_tx_req_bytes; - - bytes = rx_ring_entries * sizeof(*mgp->rx_big.shadow); - mgp->rx_big.shadow = kzalloc(bytes, GFP_KERNEL); - if (mgp->rx_big.shadow == NULL) - goto abort_with_rx_small_shadow; - - /* allocate the host info rings */ - - bytes = tx_ring_entries * sizeof(*mgp->tx.info); - mgp->tx.info = kzalloc(bytes, GFP_KERNEL); - if (mgp->tx.info == NULL) - goto abort_with_rx_big_shadow; - - bytes = rx_ring_entries * sizeof(*mgp->rx_small.info); - mgp->rx_small.info = kzalloc(bytes, GFP_KERNEL); - if (mgp->rx_small.info == NULL) - goto abort_with_tx_info; - - bytes = rx_ring_entries * sizeof(*mgp->rx_big.info); - mgp->rx_big.info = kzalloc(bytes, GFP_KERNEL); - if (mgp->rx_big.info == NULL) - goto abort_with_rx_small_info; - - /* Fill the receive rings */ - - for (i = 0; i <= mgp->rx_small.mask; i++) { - status = myri10ge_getbuf(&mgp->rx_small, mgp->pdev, - mgp->small_bytes, i); - if (status) { - printk(KERN_ERR - "myri10ge: %s: alloced only %d small bufs\n", - dev->name, i); - goto abort_with_rx_small_ring; - } - } - - for (i = 0; i <= mgp->rx_big.mask; i++) { - status = - myri10ge_getbuf(&mgp->rx_big, mgp->pdev, - dev->mtu + ETH_HLEN, i); - if (status) { - printk(KERN_ERR - "myri10ge: %s: alloced only %d big bufs\n", - dev->name, i); - goto abort_with_rx_big_ring; - } - } - - return 0; - -abort_with_rx_big_ring: - for (i = 0; i <= mgp->rx_big.mask; i++) { - if (mgp->rx_big.info[i].skb != NULL) - dev_kfree_skb_any(mgp->rx_big.info[i].skb); - if (pci_unmap_len(&mgp->rx_big.info[i], len)) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&mgp->rx_big.info[i], - bus), - pci_unmap_len(&mgp->rx_big.info[i], - len), - PCI_DMA_FROMDEVICE); - } - -abort_with_rx_small_ring: - for (i = 0; i <= mgp->rx_small.mask; i++) { - if (mgp->rx_small.info[i].skb != NULL) - dev_kfree_skb_any(mgp->rx_small.info[i].skb); - if (pci_unmap_len(&mgp->rx_small.info[i], len)) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&mgp->rx_small.info[i], - bus), - pci_unmap_len(&mgp->rx_small.info[i], - len), - PCI_DMA_FROMDEVICE); - } - kfree(mgp->rx_big.info); - -abort_with_rx_small_info: - kfree(mgp->rx_small.info); - -abort_with_tx_info: - kfree(mgp->tx.info); - -abort_with_rx_big_shadow: - kfree(mgp->rx_big.shadow); - -abort_with_rx_small_shadow: - kfree(mgp->rx_small.shadow); - -abort_with_tx_req_bytes: - kfree(mgp->tx.req_bytes); - mgp->tx.req_bytes = NULL; - mgp->tx.req_list = NULL; - -abort_with_nothing: - return status; -} - -static void myri10ge_free_rings(struct net_device *dev) -{ - struct myri10ge_priv *mgp; - struct sk_buff *skb; - struct myri10ge_tx_buf *tx; - int i, len, idx; - - mgp = netdev_priv(dev); - - for (i = 0; i <= mgp->rx_big.mask; i++) { - if (mgp->rx_big.info[i].skb != NULL) - dev_kfree_skb_any(mgp->rx_big.info[i].skb); - if (pci_unmap_len(&mgp->rx_big.info[i], len)) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&mgp->rx_big.info[i], - bus), - pci_unmap_len(&mgp->rx_big.info[i], - len), - PCI_DMA_FROMDEVICE); - } - - for (i = 0; i <= mgp->rx_small.mask; i++) { - if (mgp->rx_small.info[i].skb != NULL) - dev_kfree_skb_any(mgp->rx_small.info[i].skb); - if (pci_unmap_len(&mgp->rx_small.info[i], len)) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&mgp->rx_small.info[i], - bus), - pci_unmap_len(&mgp->rx_small.info[i], - len), - PCI_DMA_FROMDEVICE); - } - - tx = &mgp->tx; - while (tx->done != tx->req) { - idx = tx->done & tx->mask; - skb = tx->info[idx].skb; - - /* Mark as free */ - tx->info[idx].skb = NULL; - tx->done++; - len = pci_unmap_len(&tx->info[idx], len); - pci_unmap_len_set(&tx->info[idx], len, 0); - if (skb) { - mgp->stats.tx_dropped++; - dev_kfree_skb_any(skb); - if (len) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - } else { - if (len) - pci_unmap_page(mgp->pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - } - } - kfree(mgp->rx_big.info); - - kfree(mgp->rx_small.info); - - kfree(mgp->tx.info); - - kfree(mgp->rx_big.shadow); - - kfree(mgp->rx_small.shadow); - - kfree(mgp->tx.req_bytes); - mgp->tx.req_bytes = NULL; - mgp->tx.req_list = NULL; -} - -static int myri10ge_open(struct net_device *dev) -{ - struct myri10ge_priv *mgp; - struct myri10ge_cmd cmd; - int status, big_pow2; - - mgp = netdev_priv(dev); - - if (mgp->running != MYRI10GE_ETH_STOPPED) - return -EBUSY; - - mgp->running = MYRI10GE_ETH_STARTING; - status = myri10ge_reset(mgp); - if (status != 0) { - printk(KERN_ERR "myri10ge: %s: failed reset\n", dev->name); - mgp->running = MYRI10GE_ETH_STOPPED; - return -ENXIO; - } - - /* decide what small buffer size to use. For good TCP rx - * performance, it is important to not receive 1514 byte - * frames into jumbo buffers, as it confuses the socket buffer - * accounting code, leading to drops and erratic performance. - */ - - if (dev->mtu <= ETH_DATA_LEN) - mgp->small_bytes = 128; /* enough for a TCP header */ - else - mgp->small_bytes = ETH_FRAME_LEN; /* enough for an ETH_DATA_LEN frame */ - - /* Override the small buffer size? */ - if (myri10ge_small_bytes > 0) - mgp->small_bytes = myri10ge_small_bytes; - - /* If the user sets an obscenely small MTU, adjust the small - * bytes down to nearly nothing */ - if (mgp->small_bytes >= (dev->mtu + ETH_HLEN)) - mgp->small_bytes = 64; - - /* get the lanai pointers to the send and receive rings */ - - status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SEND_OFFSET, &cmd, 0); - mgp->tx.lanai = - (struct mcp_kreq_ether_send __iomem *)(mgp->sram + cmd.data0); - - status |= - myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_SMALL_RX_OFFSET, &cmd, 0); - mgp->rx_small.lanai = - (struct mcp_kreq_ether_recv __iomem *)(mgp->sram + cmd.data0); - - status |= myri10ge_send_cmd(mgp, MXGEFW_CMD_GET_BIG_RX_OFFSET, &cmd, 0); - mgp->rx_big.lanai = - (struct mcp_kreq_ether_recv __iomem *)(mgp->sram + cmd.data0); - - if (status != 0) { - printk(KERN_ERR - "myri10ge: %s: failed to get ring sizes or locations\n", - dev->name); - mgp->running = MYRI10GE_ETH_STOPPED; - return -ENXIO; - } - - if (mgp->mtrr >= 0) { - mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram + 0x200000; - mgp->rx_small.wc_fifo = (u8 __iomem *) mgp->sram + 0x300000; - mgp->rx_big.wc_fifo = (u8 __iomem *) mgp->sram + 0x340000; - } else { - mgp->tx.wc_fifo = NULL; - mgp->rx_small.wc_fifo = NULL; - mgp->rx_big.wc_fifo = NULL; - } - - status = myri10ge_allocate_rings(dev); - if (status != 0) - goto abort_with_nothing; - - /* Firmware needs the big buff size as a power of 2. Lie and - * tell him the buffer is larger, because we only use 1 - * buffer/pkt, and the mtu will prevent overruns. - */ - big_pow2 = dev->mtu + ETH_HLEN + MXGEFW_PAD; - while ((big_pow2 & (big_pow2 - 1)) != 0) - big_pow2++; - - /* now give firmware buffers sizes, and MTU */ - cmd.data0 = dev->mtu + ETH_HLEN + VLAN_HLEN; - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_MTU, &cmd, 0); - cmd.data0 = mgp->small_bytes; - status |= - myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_SMALL_BUFFER_SIZE, &cmd, 0); - cmd.data0 = big_pow2; - status |= - myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_BIG_BUFFER_SIZE, &cmd, 0); - if (status) { - printk(KERN_ERR "myri10ge: %s: Couldn't set buffer sizes\n", - dev->name); - goto abort_with_rings; - } - - cmd.data0 = MYRI10GE_LOWPART_TO_U32(mgp->fw_stats_bus); - cmd.data1 = MYRI10GE_HIGHPART_TO_U32(mgp->fw_stats_bus); - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_STATS_DMA, &cmd, 0); - if (status) { - printk(KERN_ERR "myri10ge: %s: Couldn't set stats DMA\n", - dev->name); - goto abort_with_rings; - } - - mgp->link_state = -1; - mgp->rdma_tags_available = 15; - - netif_poll_enable(mgp->dev); /* must happen prior to any irq */ - - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_UP, &cmd, 0); - if (status) { - printk(KERN_ERR "myri10ge: %s: Couldn't bring up link\n", - dev->name); - goto abort_with_rings; - } - - mgp->wake_queue = 0; - mgp->stop_queue = 0; - mgp->running = MYRI10GE_ETH_RUNNING; - mgp->watchdog_timer.expires = jiffies + myri10ge_watchdog_timeout * HZ; - add_timer(&mgp->watchdog_timer); - netif_wake_queue(dev); - return 0; - -abort_with_rings: - myri10ge_free_rings(dev); - -abort_with_nothing: - mgp->running = MYRI10GE_ETH_STOPPED; - return -ENOMEM; -} - -static int myri10ge_close(struct net_device *dev) -{ - struct myri10ge_priv *mgp; - struct myri10ge_cmd cmd; - int status, old_down_cnt; - - mgp = netdev_priv(dev); - - if (mgp->running != MYRI10GE_ETH_RUNNING) - return 0; - - if (mgp->tx.req_bytes == NULL) - return 0; - - del_timer_sync(&mgp->watchdog_timer); - mgp->running = MYRI10GE_ETH_STOPPING; - netif_poll_disable(mgp->dev); - netif_carrier_off(dev); - netif_stop_queue(dev); - old_down_cnt = mgp->down_cnt; - mb(); - status = myri10ge_send_cmd(mgp, MXGEFW_CMD_ETHERNET_DOWN, &cmd, 0); - if (status) - printk(KERN_ERR "myri10ge: %s: Couldn't bring down link\n", - dev->name); - - wait_event_timeout(mgp->down_wq, old_down_cnt != mgp->down_cnt, HZ); - if (old_down_cnt == mgp->down_cnt) - printk(KERN_ERR "myri10ge: %s never got down irq\n", dev->name); - - netif_tx_disable(dev); - - myri10ge_free_rings(dev); - - mgp->running = MYRI10GE_ETH_STOPPED; - return 0; -} - -/* copy an array of struct mcp_kreq_ether_send's to the mcp. Copy - * backwards one at a time and handle ring wraps */ - -static inline void -myri10ge_submit_req_backwards(struct myri10ge_tx_buf *tx, - struct mcp_kreq_ether_send *src, int cnt) -{ - int idx, starting_slot; - starting_slot = tx->req; - while (cnt > 1) { - cnt--; - idx = (starting_slot + cnt) & tx->mask; - myri10ge_pio_copy(&tx->lanai[idx], &src[cnt], sizeof(*src)); - mb(); - } -} - -/* - * copy an array of struct mcp_kreq_ether_send's to the mcp. Copy - * at most 32 bytes at a time, so as to avoid involving the software - * pio handler in the nic. We re-write the first segment's flags - * to mark them valid only after writing the entire chain. - */ - -static inline void -myri10ge_submit_req(struct myri10ge_tx_buf *tx, struct mcp_kreq_ether_send *src, - int cnt) -{ - int idx, i; - struct mcp_kreq_ether_send __iomem *dstp, *dst; - struct mcp_kreq_ether_send *srcp; - u8 last_flags; - - idx = tx->req & tx->mask; - - last_flags = src->flags; - src->flags = 0; - mb(); - dst = dstp = &tx->lanai[idx]; - srcp = src; - - if ((idx + cnt) < tx->mask) { - for (i = 0; i < (cnt - 1); i += 2) { - myri10ge_pio_copy(dstp, srcp, 2 * sizeof(*src)); - mb(); /* force write every 32 bytes */ - srcp += 2; - dstp += 2; - } - } else { - /* submit all but the first request, and ensure - * that it is submitted below */ - myri10ge_submit_req_backwards(tx, src, cnt); - i = 0; - } - if (i < cnt) { - /* submit the first request */ - myri10ge_pio_copy(dstp, srcp, sizeof(*src)); - mb(); /* barrier before setting valid flag */ - } - - /* re-write the last 32-bits with the valid flags */ - src->flags = last_flags; - __raw_writel(*((u32 *) src + 3), (u32 __iomem *) dst + 3); - tx->req += cnt; - mb(); -} - -static inline void -myri10ge_submit_req_wc(struct myri10ge_tx_buf *tx, - struct mcp_kreq_ether_send *src, int cnt) -{ - tx->req += cnt; - mb(); - while (cnt >= 4) { - myri10ge_pio_copy(tx->wc_fifo, src, 64); - mb(); - src += 4; - cnt -= 4; - } - if (cnt > 0) { - /* pad it to 64 bytes. The src is 64 bytes bigger than it - * needs to be so that we don't overrun it */ - myri10ge_pio_copy(tx->wc_fifo + (cnt << 18), src, 64); - mb(); - } -} - -/* - * Transmit a packet. We need to split the packet so that a single - * segment does not cross myri10ge->tx.boundary, so this makes segment - * counting tricky. So rather than try to count segments up front, we - * just give up if there are too few segments to hold a reasonably - * fragmented packet currently available. If we run - * out of segments while preparing a packet for DMA, we just linearize - * it and try again. - */ - -static int myri10ge_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct myri10ge_priv *mgp = netdev_priv(dev); - struct mcp_kreq_ether_send *req; - struct myri10ge_tx_buf *tx = &mgp->tx; - struct skb_frag_struct *frag; - dma_addr_t bus; - u32 low, high_swapped; - unsigned int len; - int idx, last_idx, avail, frag_cnt, frag_idx, count, mss, max_segments; - u16 pseudo_hdr_offset, cksum_offset; - int cum_len, seglen, boundary, rdma_count; - u8 flags, odd_flag; - -again: - req = tx->req_list; - avail = tx->mask - 1 - (tx->req - tx->done); - - mss = 0; - max_segments = MXGEFW_MAX_SEND_DESC; - -#ifdef NETIF_F_TSO - if (skb->len > (dev->mtu + ETH_HLEN)) { - mss = skb_shinfo(skb)->gso_size; - if (mss != 0) - max_segments = MYRI10GE_MAX_SEND_DESC_TSO; - } -#endif /*NETIF_F_TSO */ - - if ((unlikely(avail < max_segments))) { - /* we are out of transmit resources */ - mgp->stop_queue++; - netif_stop_queue(dev); - return 1; - } - - /* Setup checksum offloading, if needed */ - cksum_offset = 0; - pseudo_hdr_offset = 0; - odd_flag = 0; - flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST); - if (likely(skb->ip_summed == CHECKSUM_HW)) { - cksum_offset = (skb->h.raw - skb->data); - pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data; - /* If the headers are excessively large, then we must - * fall back to a software checksum */ - if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) { - if (skb_checksum_help(skb, 0)) - goto drop; - cksum_offset = 0; - pseudo_hdr_offset = 0; - } else { - pseudo_hdr_offset = htons(pseudo_hdr_offset); - odd_flag = MXGEFW_FLAGS_ALIGN_ODD; - flags |= MXGEFW_FLAGS_CKSUM; - } - } - - cum_len = 0; - -#ifdef NETIF_F_TSO - if (mss) { /* TSO */ - /* this removes any CKSUM flag from before */ - flags = (MXGEFW_FLAGS_TSO_HDR | MXGEFW_FLAGS_FIRST); - - /* negative cum_len signifies to the - * send loop that we are still in the - * header portion of the TSO packet. - * TSO header must be at most 134 bytes long */ - cum_len = -((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); - - /* for TSO, pseudo_hdr_offset holds mss. - * The firmware figures out where to put - * the checksum by parsing the header. */ - pseudo_hdr_offset = htons(mss); - } else -#endif /*NETIF_F_TSO */ - /* Mark small packets, and pad out tiny packets */ - if (skb->len <= MXGEFW_SEND_SMALL_SIZE) { - flags |= MXGEFW_FLAGS_SMALL; - - /* pad frames to at least ETH_ZLEN bytes */ - if (unlikely(skb->len < ETH_ZLEN)) { - if (skb_padto(skb, ETH_ZLEN)) { - /* The packet is gone, so we must - * return 0 */ - mgp->stats.tx_dropped += 1; - return 0; - } - /* adjust the len to account for the zero pad - * so that the nic can know how long it is */ - skb->len = ETH_ZLEN; - } - } - - /* map the skb for DMA */ - len = skb->len - skb->data_len; - idx = tx->req & tx->mask; - tx->info[idx].skb = skb; - bus = pci_map_single(mgp->pdev, skb->data, len, PCI_DMA_TODEVICE); - pci_unmap_addr_set(&tx->info[idx], bus, bus); - pci_unmap_len_set(&tx->info[idx], len, len); - - frag_cnt = skb_shinfo(skb)->nr_frags; - frag_idx = 0; - count = 0; - rdma_count = 0; - - /* "rdma_count" is the number of RDMAs belonging to the - * current packet BEFORE the current send request. For - * non-TSO packets, this is equal to "count". - * For TSO packets, rdma_count needs to be reset - * to 0 after a segment cut. - * - * The rdma_count field of the send request is - * the number of RDMAs of the packet starting at - * that request. For TSO send requests with one ore more cuts - * in the middle, this is the number of RDMAs starting - * after the last cut in the request. All previous - * segments before the last cut implicitly have 1 RDMA. - * - * Since the number of RDMAs is not known beforehand, - * it must be filled-in retroactively - after each - * segmentation cut or at the end of the entire packet. - */ - - while (1) { - /* Break the SKB or Fragment up into pieces which - * do not cross mgp->tx.boundary */ - low = MYRI10GE_LOWPART_TO_U32(bus); - high_swapped = htonl(MYRI10GE_HIGHPART_TO_U32(bus)); - while (len) { - u8 flags_next; - int cum_len_next; - - if (unlikely(count == max_segments)) - goto abort_linearize; - - boundary = (low + tx->boundary) & ~(tx->boundary - 1); - seglen = boundary - low; - if (seglen > len) - seglen = len; - flags_next = flags & ~MXGEFW_FLAGS_FIRST; - cum_len_next = cum_len + seglen; -#ifdef NETIF_F_TSO - if (mss) { /* TSO */ - (req - rdma_count)->rdma_count = rdma_count + 1; - - if (likely(cum_len >= 0)) { /* payload */ - int next_is_first, chop; - - chop = (cum_len_next > mss); - cum_len_next = cum_len_next % mss; - next_is_first = (cum_len_next == 0); - flags |= chop * MXGEFW_FLAGS_TSO_CHOP; - flags_next |= next_is_first * - MXGEFW_FLAGS_FIRST; - rdma_count |= -(chop | next_is_first); - rdma_count += chop & !next_is_first; - } else if (likely(cum_len_next >= 0)) { /* header ends */ - int small; - - rdma_count = -1; - cum_len_next = 0; - seglen = -cum_len; - small = (mss <= MXGEFW_SEND_SMALL_SIZE); - flags_next = MXGEFW_FLAGS_TSO_PLD | - MXGEFW_FLAGS_FIRST | - (small * MXGEFW_FLAGS_SMALL); - } - } -#endif /* NETIF_F_TSO */ - req->addr_high = high_swapped; - req->addr_low = htonl(low); - req->pseudo_hdr_offset = pseudo_hdr_offset; - req->pad = 0; /* complete solid 16-byte block; does this matter? */ - req->rdma_count = 1; - req->length = htons(seglen); - req->cksum_offset = cksum_offset; - req->flags = flags | ((cum_len & 1) * odd_flag); - - low += seglen; - len -= seglen; - cum_len = cum_len_next; - flags = flags_next; - req++; - count++; - rdma_count++; - if (unlikely(cksum_offset > seglen)) - cksum_offset -= seglen; - else - cksum_offset = 0; - } - if (frag_idx == frag_cnt) - break; - - /* map next fragment for DMA */ - idx = (count + tx->req) & tx->mask; - frag = &skb_shinfo(skb)->frags[frag_idx]; - frag_idx++; - len = frag->size; - bus = pci_map_page(mgp->pdev, frag->page, frag->page_offset, - len, PCI_DMA_TODEVICE); - pci_unmap_addr_set(&tx->info[idx], bus, bus); - pci_unmap_len_set(&tx->info[idx], len, len); - } - - (req - rdma_count)->rdma_count = rdma_count; -#ifdef NETIF_F_TSO - if (mss) - do { - req--; - req->flags |= MXGEFW_FLAGS_TSO_LAST; - } while (!(req->flags & (MXGEFW_FLAGS_TSO_CHOP | - MXGEFW_FLAGS_FIRST))); -#endif - idx = ((count - 1) + tx->req) & tx->mask; - tx->info[idx].last = 1; - if (tx->wc_fifo == NULL) - myri10ge_submit_req(tx, tx->req_list, count); - else - myri10ge_submit_req_wc(tx, tx->req_list, count); - tx->pkt_start++; - if ((avail - count) < MXGEFW_MAX_SEND_DESC) { - mgp->stop_queue++; - netif_stop_queue(dev); - } - dev->trans_start = jiffies; - return 0; - -abort_linearize: - /* Free any DMA resources we've alloced and clear out the skb - * slot so as to not trip up assertions, and to avoid a - * double-free if linearizing fails */ - - last_idx = (idx + 1) & tx->mask; - idx = tx->req & tx->mask; - tx->info[idx].skb = NULL; - do { - len = pci_unmap_len(&tx->info[idx], len); - if (len) { - if (tx->info[idx].skb != NULL) - pci_unmap_single(mgp->pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - else - pci_unmap_page(mgp->pdev, - pci_unmap_addr(&tx->info[idx], - bus), len, - PCI_DMA_TODEVICE); - pci_unmap_len_set(&tx->info[idx], len, 0); - tx->info[idx].skb = NULL; - } - idx = (idx + 1) & tx->mask; - } while (idx != last_idx); - if (skb_is_gso(skb)) { - printk(KERN_ERR - "myri10ge: %s: TSO but wanted to linearize?!?!?\n", - mgp->dev->name); - goto drop; - } - - if (skb_linearize(skb)) - goto drop; - - mgp->tx_linearized++; - goto again; - -drop: - dev_kfree_skb_any(skb); - mgp->stats.tx_dropped += 1; - return 0; - -} - -static struct net_device_stats *myri10ge_get_stats(struct net_device *dev) -{ - struct myri10ge_priv *mgp = netdev_priv(dev); - return &mgp->stats; -} - -static void myri10ge_set_multicast_list(struct net_device *dev) -{ - /* can be called from atomic contexts, - * pass 1 to force atomicity in myri10ge_send_cmd() */ - myri10ge_change_promisc(netdev_priv(dev), dev->flags & IFF_PROMISC, 1); -} - -static int myri10ge_set_mac_address(struct net_device *dev, void *addr) -{ - struct sockaddr *sa = addr; - struct myri10ge_priv *mgp = netdev_priv(dev); - int status; - - if (!is_valid_ether_addr(sa->sa_data)) - return -EADDRNOTAVAIL; - - status = myri10ge_update_mac_address(mgp, sa->sa_data); - if (status != 0) { - printk(KERN_ERR - "myri10ge: %s: changing mac address failed with %d\n", - dev->name, status); - return status; - } - - /* change the dev structure */ - memcpy(dev->dev_addr, sa->sa_data, 6); - return 0; -} - -static int myri10ge_change_mtu(struct net_device *dev, int new_mtu) -{ - struct myri10ge_priv *mgp = netdev_priv(dev); - int error = 0; - - if ((new_mtu < 68) || (ETH_HLEN + new_mtu > MYRI10GE_MAX_ETHER_MTU)) { - printk(KERN_ERR "myri10ge: %s: new mtu (%d) is not valid\n", - dev->name, new_mtu); - return -EINVAL; - } - printk(KERN_INFO "%s: changing mtu from %d to %d\n", - dev->name, dev->mtu, new_mtu); - if (mgp->running) { - /* if we change the mtu on an active device, we must - * reset the device so the firmware sees the change */ - myri10ge_close(dev); - dev->mtu = new_mtu; - myri10ge_open(dev); - } else - dev->mtu = new_mtu; - - return error; -} - -/* - * Enable ECRC to align PCI-E Completion packets on an 8-byte boundary. - * Only do it if the bridge is a root port since we don't want to disturb - * any other device, except if forced with myri10ge_ecrc_enable > 1. - */ - -static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp) -{ - struct pci_dev *bridge = mgp->pdev->bus->self; - struct device *dev = &mgp->pdev->dev; - unsigned cap; - unsigned err_cap; - u16 val; - u8 ext_type; - int ret; - - if (!myri10ge_ecrc_enable || !bridge) - return; - - /* check that the bridge is a root port */ - cap = pci_find_capability(bridge, PCI_CAP_ID_EXP); - pci_read_config_word(bridge, cap + PCI_CAP_FLAGS, &val); - ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4; - if (ext_type != PCI_EXP_TYPE_ROOT_PORT) { - if (myri10ge_ecrc_enable > 1) { - struct pci_dev *old_bridge = bridge; - - /* Walk the hierarchy up to the root port - * where ECRC has to be enabled */ - do { - bridge = bridge->bus->self; - if (!bridge) { - dev_err(dev, - "Failed to find root port" - " to force ECRC\n"); - return; - } - cap = - pci_find_capability(bridge, PCI_CAP_ID_EXP); - pci_read_config_word(bridge, - cap + PCI_CAP_FLAGS, &val); - ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4; - } while (ext_type != PCI_EXP_TYPE_ROOT_PORT); - - dev_info(dev, - "Forcing ECRC on non-root port %s" - " (enabling on root port %s)\n", - pci_name(old_bridge), pci_name(bridge)); - } else { - dev_err(dev, - "Not enabling ECRC on non-root port %s\n", - pci_name(bridge)); - return; - } - } - - cap = pci_find_ext_capability(bridge, PCI_EXT_CAP_ID_ERR); - if (!cap) - return; - - ret = pci_read_config_dword(bridge, cap + PCI_ERR_CAP, &err_cap); - if (ret) { - dev_err(dev, "failed reading ext-conf-space of %s\n", - pci_name(bridge)); - dev_err(dev, "\t pci=nommconf in use? " - "or buggy/incomplete/absent ACPI MCFG attr?\n"); - return; - } - if (!(err_cap & PCI_ERR_CAP_ECRC_GENC)) - return; - - err_cap |= PCI_ERR_CAP_ECRC_GENE; - pci_write_config_dword(bridge, cap + PCI_ERR_CAP, err_cap); - dev_info(dev, "Enabled ECRC on upstream bridge %s\n", pci_name(bridge)); - mgp->tx.boundary = 4096; - mgp->fw_name = myri10ge_fw_aligned; -} - -/* - * The Lanai Z8E PCI-E interface achieves higher Read-DMA throughput - * when the PCI-E Completion packets are aligned on an 8-byte - * boundary. Some PCI-E chip sets always align Completion packets; on - * the ones that do not, the alignment can be enforced by enabling - * ECRC generation (if supported). - * - * When PCI-E Completion packets are not aligned, it is actually more - * efficient to limit Read-DMA transactions to 2KB, rather than 4KB. - * - * If the driver can neither enable ECRC nor verify that it has - * already been enabled, then it must use a firmware image which works - * around unaligned completion packets (myri10ge_ethp_z8e.dat), and it - * should also ensure that it never gives the device a Read-DMA which is - * larger than 2KB by setting the tx.boundary to 2KB. If ECRC is - * enabled, then the driver should use the aligned (myri10ge_eth_z8e.dat) - * firmware image, and set tx.boundary to 4KB. - */ - -#define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 - -static void myri10ge_select_firmware(struct myri10ge_priv *mgp) -{ - struct pci_dev *bridge = mgp->pdev->bus->self; - - mgp->tx.boundary = 2048; - mgp->fw_name = myri10ge_fw_unaligned; - - if (myri10ge_force_firmware == 0) { - myri10ge_enable_ecrc(mgp); - - /* Check to see if the upstream bridge is known to - * provide aligned completions */ - if (bridge - /* ServerWorks HT2000/HT1000 */ - && bridge->vendor == PCI_VENDOR_ID_SERVERWORKS - && bridge->device == - PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE) { - dev_info(&mgp->pdev->dev, - "Assuming aligned completions (0x%x:0x%x)\n", - bridge->vendor, bridge->device); - mgp->tx.boundary = 4096; - mgp->fw_name = myri10ge_fw_aligned; - } - } else { - if (myri10ge_force_firmware == 1) { - dev_info(&mgp->pdev->dev, - "Assuming aligned completions (forced)\n"); - mgp->tx.boundary = 4096; - mgp->fw_name = myri10ge_fw_aligned; - } else { - dev_info(&mgp->pdev->dev, - "Assuming unaligned completions (forced)\n"); - mgp->tx.boundary = 2048; - mgp->fw_name = myri10ge_fw_unaligned; - } - } - if (myri10ge_fw_name != NULL) { - dev_info(&mgp->pdev->dev, "overriding firmware to %s\n", - myri10ge_fw_name); - mgp->fw_name = myri10ge_fw_name; - } -} - -static void myri10ge_save_state(struct myri10ge_priv *mgp) -{ - struct pci_dev *pdev = mgp->pdev; - int cap; - - pci_save_state(pdev); - /* now save PCIe and MSI state that Linux will not - * save for us */ - cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); - pci_read_config_dword(pdev, cap + PCI_EXP_DEVCTL, &mgp->devctl); - cap = pci_find_capability(pdev, PCI_CAP_ID_MSI); - pci_read_config_word(pdev, cap + PCI_MSI_FLAGS, &mgp->msi_flags); -} - -static void myri10ge_restore_state(struct myri10ge_priv *mgp) -{ - struct pci_dev *pdev = mgp->pdev; - int cap; - - /* restore PCIe and MSI state that linux will not */ - cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); - pci_write_config_dword(pdev, cap + PCI_CAP_ID_EXP, mgp->devctl); - cap = pci_find_capability(pdev, PCI_CAP_ID_MSI); - pci_write_config_word(pdev, cap + PCI_MSI_FLAGS, mgp->msi_flags); - - pci_restore_state(pdev); -} - -#ifdef CONFIG_PM - -static int myri10ge_suspend(struct pci_dev *pdev, pm_message_t state) -{ - struct myri10ge_priv *mgp; - struct net_device *netdev; - - mgp = pci_get_drvdata(pdev); - if (mgp == NULL) - return -EINVAL; - netdev = mgp->dev; - - netif_device_detach(netdev); - if (netif_running(netdev)) { - printk(KERN_INFO "myri10ge: closing %s\n", netdev->name); - rtnl_lock(); - myri10ge_close(netdev); - rtnl_unlock(); - } - myri10ge_dummy_rdma(mgp, 0); - free_irq(pdev->irq, mgp); - myri10ge_save_state(mgp); - pci_disable_device(pdev); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); - return 0; -} - -static int myri10ge_resume(struct pci_dev *pdev) -{ - struct myri10ge_priv *mgp; - struct net_device *netdev; - int status; - u16 vendor; - - mgp = pci_get_drvdata(pdev); - if (mgp == NULL) - return -EINVAL; - netdev = mgp->dev; - pci_set_power_state(pdev, 0); /* zeros conf space as a side effect */ - msleep(5); /* give card time to respond */ - pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor); - if (vendor == 0xffff) { - printk(KERN_ERR "myri10ge: %s: device disappeared!\n", - mgp->dev->name); - return -EIO; - } - myri10ge_restore_state(mgp); - - status = pci_enable_device(pdev); - if (status < 0) { - dev_err(&pdev->dev, "failed to enable device\n"); - return -EIO; - } - - pci_set_master(pdev); - - status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED, - netdev->name, mgp); - if (status != 0) { - dev_err(&pdev->dev, "failed to allocate IRQ\n"); - goto abort_with_enabled; - } - - myri10ge_reset(mgp); - myri10ge_dummy_rdma(mgp, 1); - - /* Save configuration space to be restored if the - * nic resets due to a parity error */ - myri10ge_save_state(mgp); - - if (netif_running(netdev)) { - rtnl_lock(); - myri10ge_open(netdev); - rtnl_unlock(); - } - netif_device_attach(netdev); - - return 0; - -abort_with_enabled: - pci_disable_device(pdev); - return -EIO; - -} - -#endif /* CONFIG_PM */ - -static u32 myri10ge_read_reboot(struct myri10ge_priv *mgp) -{ - struct pci_dev *pdev = mgp->pdev; - int vs = mgp->vendor_specific_offset; - u32 reboot; - - /*enter read32 mode */ - pci_write_config_byte(pdev, vs + 0x10, 0x3); - - /*read REBOOT_STATUS (0xfffffff0) */ - pci_write_config_dword(pdev, vs + 0x18, 0xfffffff0); - pci_read_config_dword(pdev, vs + 0x14, &reboot); - return reboot; -} - -/* - * This watchdog is used to check whether the board has suffered - * from a parity error and needs to be recovered. - */ -static void myri10ge_watchdog(void *arg) -{ - struct myri10ge_priv *mgp = arg; - u32 reboot; - int status; - u16 cmd, vendor; - - mgp->watchdog_resets++; - pci_read_config_word(mgp->pdev, PCI_COMMAND, &cmd); - if ((cmd & PCI_COMMAND_MASTER) == 0) { - /* Bus master DMA disabled? Check to see - * if the card rebooted due to a parity error - * For now, just report it */ - reboot = myri10ge_read_reboot(mgp); - printk(KERN_ERR - "myri10ge: %s: NIC rebooted (0x%x), resetting\n", - mgp->dev->name, reboot); - /* - * A rebooted nic will come back with config space as - * it was after power was applied to PCIe bus. - * Attempt to restore config space which was saved - * when the driver was loaded, or the last time the - * nic was resumed from power saving mode. - */ - myri10ge_restore_state(mgp); - } else { - /* if we get back -1's from our slot, perhaps somebody - * powered off our card. Don't try to reset it in - * this case */ - if (cmd == 0xffff) { - pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor); - if (vendor == 0xffff) { - printk(KERN_ERR - "myri10ge: %s: device disappeared!\n", - mgp->dev->name); - return; - } - } - /* Perhaps it is a software error. Try to reset */ - - printk(KERN_ERR "myri10ge: %s: device timeout, resetting\n", - mgp->dev->name); - printk(KERN_INFO "myri10ge: %s: %d %d %d %d %d\n", - mgp->dev->name, mgp->tx.req, mgp->tx.done, - mgp->tx.pkt_start, mgp->tx.pkt_done, - (int)ntohl(mgp->fw_stats->send_done_count)); - msleep(2000); - printk(KERN_INFO "myri10ge: %s: %d %d %d %d %d\n", - mgp->dev->name, mgp->tx.req, mgp->tx.done, - mgp->tx.pkt_start, mgp->tx.pkt_done, - (int)ntohl(mgp->fw_stats->send_done_count)); - } - rtnl_lock(); - myri10ge_close(mgp->dev); - status = myri10ge_load_firmware(mgp); - if (status != 0) - printk(KERN_ERR "myri10ge: %s: failed to load firmware\n", - mgp->dev->name); - else - myri10ge_open(mgp->dev); - rtnl_unlock(); -} - -/* - * We use our own timer routine rather than relying upon - * netdev->tx_timeout because we have a very large hardware transmit - * queue. Due to the large queue, the netdev->tx_timeout function - * cannot detect a NIC with a parity error in a timely fashion if the - * NIC is lightly loaded. - */ -static void myri10ge_watchdog_timer(unsigned long arg) -{ - struct myri10ge_priv *mgp; - - mgp = (struct myri10ge_priv *)arg; - if (mgp->tx.req != mgp->tx.done && - mgp->tx.done == mgp->watchdog_tx_done && - mgp->watchdog_tx_req != mgp->watchdog_tx_done) - /* nic seems like it might be stuck.. */ - schedule_work(&mgp->watchdog_work); - else - /* rearm timer */ - mod_timer(&mgp->watchdog_timer, - jiffies + myri10ge_watchdog_timeout * HZ); - - mgp->watchdog_tx_done = mgp->tx.done; - mgp->watchdog_tx_req = mgp->tx.req; -} - -static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) -{ - struct net_device *netdev; - struct myri10ge_priv *mgp; - struct device *dev = &pdev->dev; - size_t bytes; - int i; - int status = -ENXIO; - int cap; - int dac_enabled; - u16 val; - - netdev = alloc_etherdev(sizeof(*mgp)); - if (netdev == NULL) { - dev_err(dev, "Could not allocate ethernet device\n"); - return -ENOMEM; - } - - mgp = netdev_priv(netdev); - memset(mgp, 0, sizeof(*mgp)); - mgp->dev = netdev; - mgp->pdev = pdev; - mgp->csum_flag = MXGEFW_FLAGS_CKSUM; - mgp->pause = myri10ge_flow_control; - mgp->intr_coal_delay = myri10ge_intr_coal_delay; - init_waitqueue_head(&mgp->down_wq); - - if (pci_enable_device(pdev)) { - dev_err(&pdev->dev, "pci_enable_device call failed\n"); - status = -ENODEV; - goto abort_with_netdev; - } - myri10ge_select_firmware(mgp); - - /* Find the vendor-specific cap so we can check - * the reboot register later on */ - mgp->vendor_specific_offset - = pci_find_capability(pdev, PCI_CAP_ID_VNDR); - - /* Set our max read request to 4KB */ - cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); - if (cap < 64) { - dev_err(&pdev->dev, "Bad PCI_CAP_ID_EXP location %d\n", cap); - goto abort_with_netdev; - } - status = pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &val); - if (status != 0) { - dev_err(&pdev->dev, "Error %d reading PCI_EXP_DEVCTL\n", - status); - goto abort_with_netdev; - } - val = (val & ~PCI_EXP_DEVCTL_READRQ) | (5 << 12); - status = pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, val); - if (status != 0) { - dev_err(&pdev->dev, "Error %d writing PCI_EXP_DEVCTL\n", - status); - goto abort_with_netdev; - } - - pci_set_master(pdev); - dac_enabled = 1; - status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); - if (status != 0) { - dac_enabled = 0; - dev_err(&pdev->dev, - "64-bit pci address mask was refused, trying 32-bit"); - status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); - } - if (status != 0) { - dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); - goto abort_with_netdev; - } - mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd), - &mgp->cmd_bus, GFP_KERNEL); - if (mgp->cmd == NULL) - goto abort_with_netdev; - - mgp->fw_stats = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->fw_stats), - &mgp->fw_stats_bus, GFP_KERNEL); - if (mgp->fw_stats == NULL) - goto abort_with_cmd; - - mgp->board_span = pci_resource_len(pdev, 0); - mgp->iomem_base = pci_resource_start(pdev, 0); - mgp->mtrr = -1; -#ifdef CONFIG_MTRR - mgp->mtrr = mtrr_add(mgp->iomem_base, mgp->board_span, - MTRR_TYPE_WRCOMB, 1); -#endif - /* Hack. need to get rid of these magic numbers */ - mgp->sram_size = - 2 * 1024 * 1024 - (2 * (48 * 1024) + (32 * 1024)) - 0x100; - if (mgp->sram_size > mgp->board_span) { - dev_err(&pdev->dev, "board span %ld bytes too small\n", - mgp->board_span); - goto abort_with_wc; - } - mgp->sram = ioremap(mgp->iomem_base, mgp->board_span); - if (mgp->sram == NULL) { - dev_err(&pdev->dev, "ioremap failed for %ld bytes at 0x%lx\n", - mgp->board_span, mgp->iomem_base); - status = -ENXIO; - goto abort_with_wc; - } - memcpy_fromio(mgp->eeprom_strings, - mgp->sram + mgp->sram_size - MYRI10GE_EEPROM_STRINGS_SIZE, - MYRI10GE_EEPROM_STRINGS_SIZE); - memset(mgp->eeprom_strings + MYRI10GE_EEPROM_STRINGS_SIZE - 2, 0, 2); - status = myri10ge_read_mac_addr(mgp); - if (status) - goto abort_with_ioremap; - - for (i = 0; i < ETH_ALEN; i++) - netdev->dev_addr[i] = mgp->mac_addr[i]; - - /* allocate rx done ring */ - bytes = myri10ge_max_intr_slots * sizeof(*mgp->rx_done.entry); - mgp->rx_done.entry = dma_alloc_coherent(&pdev->dev, bytes, - &mgp->rx_done.bus, GFP_KERNEL); - if (mgp->rx_done.entry == NULL) - goto abort_with_ioremap; - memset(mgp->rx_done.entry, 0, bytes); - - status = myri10ge_load_firmware(mgp); - if (status != 0) { - dev_err(&pdev->dev, "failed to load firmware\n"); - goto abort_with_rx_done; - } - - status = myri10ge_reset(mgp); - if (status != 0) { - dev_err(&pdev->dev, "failed reset\n"); - goto abort_with_firmware; - } - - if (myri10ge_msi) { - status = pci_enable_msi(pdev); - if (status != 0) - dev_err(&pdev->dev, - "Error %d setting up MSI; falling back to xPIC\n", - status); - else - mgp->msi_enabled = 1; - } - - status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED, - netdev->name, mgp); - if (status != 0) { - dev_err(&pdev->dev, "failed to allocate IRQ\n"); - goto abort_with_firmware; - } - - pci_set_drvdata(pdev, mgp); - if ((myri10ge_initial_mtu + ETH_HLEN) > MYRI10GE_MAX_ETHER_MTU) - myri10ge_initial_mtu = MYRI10GE_MAX_ETHER_MTU - ETH_HLEN; - if ((myri10ge_initial_mtu + ETH_HLEN) < 68) - myri10ge_initial_mtu = 68; - netdev->mtu = myri10ge_initial_mtu; - netdev->open = myri10ge_open; - netdev->stop = myri10ge_close; - netdev->hard_start_xmit = myri10ge_xmit; - netdev->get_stats = myri10ge_get_stats; - netdev->base_addr = mgp->iomem_base; - netdev->irq = pdev->irq; - netdev->change_mtu = myri10ge_change_mtu; - netdev->set_multicast_list = myri10ge_set_multicast_list; - netdev->set_mac_address = myri10ge_set_mac_address; - netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO; - if (dac_enabled) - netdev->features |= NETIF_F_HIGHDMA; - netdev->poll = myri10ge_poll; - netdev->weight = myri10ge_napi_weight; - - /* Save configuration space to be restored if the - * nic resets due to a parity error */ - myri10ge_save_state(mgp); - - /* Setup the watchdog timer */ - setup_timer(&mgp->watchdog_timer, myri10ge_watchdog_timer, - (unsigned long)mgp); - - SET_ETHTOOL_OPS(netdev, &myri10ge_ethtool_ops); - INIT_WORK(&mgp->watchdog_work, myri10ge_watchdog, mgp); - status = register_netdev(netdev); - if (status != 0) { - dev_err(&pdev->dev, "register_netdev failed: %d\n", status); - goto abort_with_irq; - } - dev_info(dev, "%s IRQ %d, tx bndry %d, fw %s, WC %s\n", - (mgp->msi_enabled ? "MSI" : "xPIC"), - pdev->irq, mgp->tx.boundary, mgp->fw_name, - (mgp->mtrr >= 0 ? "Enabled" : "Disabled")); - - return 0; - -abort_with_irq: - free_irq(pdev->irq, mgp); - if (mgp->msi_enabled) - pci_disable_msi(pdev); - -abort_with_firmware: - myri10ge_dummy_rdma(mgp, 0); - -abort_with_rx_done: - bytes = myri10ge_max_intr_slots * sizeof(*mgp->rx_done.entry); - dma_free_coherent(&pdev->dev, bytes, - mgp->rx_done.entry, mgp->rx_done.bus); - -abort_with_ioremap: - iounmap(mgp->sram); - -abort_with_wc: -#ifdef CONFIG_MTRR - if (mgp->mtrr >= 0) - mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span); -#endif - dma_free_coherent(&pdev->dev, sizeof(*mgp->fw_stats), - mgp->fw_stats, mgp->fw_stats_bus); - -abort_with_cmd: - dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd), - mgp->cmd, mgp->cmd_bus); - -abort_with_netdev: - - free_netdev(netdev); - return status; -} - -/* - * myri10ge_remove - * - * Does what is necessary to shutdown one Myrinet device. Called - * once for each Myrinet card by the kernel when a module is - * unloaded. - */ -static void myri10ge_remove(struct pci_dev *pdev) -{ - struct myri10ge_priv *mgp; - struct net_device *netdev; - size_t bytes; - - mgp = pci_get_drvdata(pdev); - if (mgp == NULL) - return; - - flush_scheduled_work(); - netdev = mgp->dev; - unregister_netdev(netdev); - free_irq(pdev->irq, mgp); - if (mgp->msi_enabled) - pci_disable_msi(pdev); - - myri10ge_dummy_rdma(mgp, 0); - - bytes = myri10ge_max_intr_slots * sizeof(*mgp->rx_done.entry); - dma_free_coherent(&pdev->dev, bytes, - mgp->rx_done.entry, mgp->rx_done.bus); - - iounmap(mgp->sram); - -#ifdef CONFIG_MTRR - if (mgp->mtrr >= 0) - mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span); -#endif - dma_free_coherent(&pdev->dev, sizeof(*mgp->fw_stats), - mgp->fw_stats, mgp->fw_stats_bus); - - dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd), - mgp->cmd, mgp->cmd_bus); - - free_netdev(netdev); - pci_set_drvdata(pdev, NULL); -} - -#define PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E 0x0008 - -static struct pci_device_id myri10ge_pci_tbl[] = { - {PCI_DEVICE(PCI_VENDOR_ID_MYRICOM, PCI_DEVICE_ID_MYRICOM_MYRI10GE_Z8E)}, - {0}, -}; - -static struct pci_driver myri10ge_driver = { - .name = "myri10ge", - .probe = myri10ge_probe, - .remove = myri10ge_remove, - .id_table = myri10ge_pci_tbl, -#ifdef CONFIG_PM - .suspend = myri10ge_suspend, - .resume = myri10ge_resume, -#endif -}; - -static __init int myri10ge_init_module(void) -{ - printk(KERN_INFO "%s: Version %s\n", myri10ge_driver.name, - MYRI10GE_VERSION_STR); - return pci_register_driver(&myri10ge_driver); -} - -module_init(myri10ge_init_module); - -static __exit void myri10ge_cleanup_module(void) -{ - pci_unregister_driver(&myri10ge_driver); -} - -module_exit(myri10ge_cleanup_module); diff --git a/drivers/net/myri10ge/myri10ge_mcp.h b/drivers/net/myri10ge/myri10ge_mcp.h deleted file mode 100644 index 0a6cae6cb..000000000 --- a/drivers/net/myri10ge/myri10ge_mcp.h +++ /dev/null @@ -1,205 +0,0 @@ -#ifndef __MYRI10GE_MCP_H__ -#define __MYRI10GE_MCP_H__ - -#define MXGEFW_VERSION_MAJOR 1 -#define MXGEFW_VERSION_MINOR 4 - -/* 8 Bytes */ -struct mcp_dma_addr { - u32 high; - u32 low; -}; - -/* 4 Bytes */ -struct mcp_slot { - u16 checksum; - u16 length; -}; - -/* 64 Bytes */ -struct mcp_cmd { - u32 cmd; - u32 data0; /* will be low portion if data > 32 bits */ - /* 8 */ - u32 data1; /* will be high portion if data > 32 bits */ - u32 data2; /* currently unused.. */ - /* 16 */ - struct mcp_dma_addr response_addr; - /* 24 */ - u8 pad[40]; -}; - -/* 8 Bytes */ -struct mcp_cmd_response { - u32 data; - u32 result; -}; - -/* - * flags used in mcp_kreq_ether_send_t: - * - * The SMALL flag is only needed in the first segment. It is raised - * for packets that are total less or equal 512 bytes. - * - * The CKSUM flag must be set in all segments. - * - * The PADDED flags is set if the packet needs to be padded, and it - * must be set for all segments. - * - * The MXGEFW_FLAGS_ALIGN_ODD must be set if the cumulative - * length of all previous segments was odd. - */ - -#define MXGEFW_FLAGS_SMALL 0x1 -#define MXGEFW_FLAGS_TSO_HDR 0x1 -#define MXGEFW_FLAGS_FIRST 0x2 -#define MXGEFW_FLAGS_ALIGN_ODD 0x4 -#define MXGEFW_FLAGS_CKSUM 0x8 -#define MXGEFW_FLAGS_TSO_LAST 0x8 -#define MXGEFW_FLAGS_NO_TSO 0x10 -#define MXGEFW_FLAGS_TSO_CHOP 0x10 -#define MXGEFW_FLAGS_TSO_PLD 0x20 - -#define MXGEFW_SEND_SMALL_SIZE 1520 -#define MXGEFW_MAX_MTU 9400 - -union mcp_pso_or_cumlen { - u16 pseudo_hdr_offset; - u16 cum_len; -}; - -#define MXGEFW_MAX_SEND_DESC 12 -#define MXGEFW_PAD 2 - -/* 16 Bytes */ -struct mcp_kreq_ether_send { - u32 addr_high; - u32 addr_low; - u16 pseudo_hdr_offset; - u16 length; - u8 pad; - u8 rdma_count; - u8 cksum_offset; /* where to start computing cksum */ - u8 flags; /* as defined above */ -}; - -/* 8 Bytes */ -struct mcp_kreq_ether_recv { - u32 addr_high; - u32 addr_low; -}; - -/* Commands */ - -#define MXGEFW_CMD_OFFSET 0xf80000 - -enum myri10ge_mcp_cmd_type { - MXGEFW_CMD_NONE = 0, - /* Reset the mcp, it is left in a safe state, waiting - * for the driver to set all its parameters */ - MXGEFW_CMD_RESET, - - /* get the version number of the current firmware.. - * (may be available in the eeprom strings..? */ - MXGEFW_GET_MCP_VERSION, - - /* Parameters which must be set by the driver before it can - * issue MXGEFW_CMD_ETHERNET_UP. They persist until the next - * MXGEFW_CMD_RESET is issued */ - - MXGEFW_CMD_SET_INTRQ_DMA, - MXGEFW_CMD_SET_BIG_BUFFER_SIZE, /* in bytes, power of 2 */ - MXGEFW_CMD_SET_SMALL_BUFFER_SIZE, /* in bytes */ - - /* Parameters which refer to lanai SRAM addresses where the - * driver must issue PIO writes for various things */ - - MXGEFW_CMD_GET_SEND_OFFSET, - MXGEFW_CMD_GET_SMALL_RX_OFFSET, - MXGEFW_CMD_GET_BIG_RX_OFFSET, - MXGEFW_CMD_GET_IRQ_ACK_OFFSET, - MXGEFW_CMD_GET_IRQ_DEASSERT_OFFSET, - - /* Parameters which refer to rings stored on the MCP, - * and whose size is controlled by the mcp */ - - MXGEFW_CMD_GET_SEND_RING_SIZE, /* in bytes */ - MXGEFW_CMD_GET_RX_RING_SIZE, /* in bytes */ - - /* Parameters which refer to rings stored in the host, - * and whose size is controlled by the host. Note that - * all must be physically contiguous and must contain - * a power of 2 number of entries. */ - - MXGEFW_CMD_SET_INTRQ_SIZE, /* in bytes */ - - /* command to bring ethernet interface up. Above parameters - * (plus mtu & mac address) must have been exchanged prior - * to issuing this command */ - MXGEFW_CMD_ETHERNET_UP, - - /* command to bring ethernet interface down. No further sends - * or receives may be processed until an MXGEFW_CMD_ETHERNET_UP - * is issued, and all interrupt queues must be flushed prior - * to ack'ing this command */ - - MXGEFW_CMD_ETHERNET_DOWN, - - /* commands the driver may issue live, without resetting - * the nic. Note that increasing the mtu "live" should - * only be done if the driver has already supplied buffers - * sufficiently large to handle the new mtu. Decreasing - * the mtu live is safe */ - - MXGEFW_CMD_SET_MTU, - MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, /* in microseconds */ - MXGEFW_CMD_SET_STATS_INTERVAL, /* in microseconds */ - MXGEFW_CMD_SET_STATS_DMA, - - MXGEFW_ENABLE_PROMISC, - MXGEFW_DISABLE_PROMISC, - MXGEFW_SET_MAC_ADDRESS, - - MXGEFW_ENABLE_FLOW_CONTROL, - MXGEFW_DISABLE_FLOW_CONTROL, - - /* do a DMA test - * data0,data1 = DMA address - * data2 = RDMA length (MSH), WDMA length (LSH) - * command return data = repetitions (MSH), 0.5-ms ticks (LSH) - */ - MXGEFW_DMA_TEST -}; - -enum myri10ge_mcp_cmd_status { - MXGEFW_CMD_OK = 0, - MXGEFW_CMD_UNKNOWN, - MXGEFW_CMD_ERROR_RANGE, - MXGEFW_CMD_ERROR_BUSY, - MXGEFW_CMD_ERROR_EMPTY, - MXGEFW_CMD_ERROR_CLOSED, - MXGEFW_CMD_ERROR_HASH_ERROR, - MXGEFW_CMD_ERROR_BAD_PORT, - MXGEFW_CMD_ERROR_RESOURCES -}; - -/* 40 Bytes */ -struct mcp_irq_data { - u32 send_done_count; - - u32 link_up; - u32 dropped_link_overflow; - u32 dropped_link_error_or_filtered; - u32 dropped_runt; - u32 dropped_overrun; - u32 dropped_no_small_buffer; - u32 dropped_no_big_buffer; - u32 rdma_tags_available; - - u8 tx_stopped; - u8 link_down; - u8 stats_updated; - u8 valid; -}; - -#endif /* __MYRI10GE_MCP_H__ */ diff --git a/drivers/net/myri10ge/myri10ge_mcp_gen_header.h b/drivers/net/myri10ge/myri10ge_mcp_gen_header.h deleted file mode 100644 index 487f7792f..000000000 --- a/drivers/net/myri10ge/myri10ge_mcp_gen_header.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef __MYRI10GE_MCP_GEN_HEADER_H__ -#define __MYRI10GE_MCP_GEN_HEADER_H__ - -/* this file define a standard header used as a first entry point to - * exchange information between firmware/driver and driver. The - * header structure can be anywhere in the mcp. It will usually be in - * the .data section, because some fields needs to be initialized at - * compile time. - * The 32bit word at offset MX_HEADER_PTR_OFFSET in the mcp must - * contains the location of the header. - * - * Typically a MCP will start with the following: - * .text - * .space 52 ! to help catch MEMORY_INT errors - * bt start ! jump to real code - * nop - * .long _gen_mcp_header - * - * The source will have a definition like: - * - * mcp_gen_header_t gen_mcp_header = { - * .header_length = sizeof(mcp_gen_header_t), - * .mcp_type = MCP_TYPE_XXX, - * .version = "something $Id: mcp_gen_header.h,v 1.2 2006/05/13 10:04:35 bgoglin Exp $", - * .mcp_globals = (unsigned)&Globals - * }; - */ - -#define MCP_HEADER_PTR_OFFSET 0x3c - -#define MCP_TYPE_MX 0x4d582020 /* "MX " */ -#define MCP_TYPE_PCIE 0x70636965 /* "PCIE" pcie-only MCP */ -#define MCP_TYPE_ETH 0x45544820 /* "ETH " */ -#define MCP_TYPE_MCP0 0x4d435030 /* "MCP0" */ - -struct mcp_gen_header { - /* the first 4 fields are filled at compile time */ - unsigned header_length; - unsigned mcp_type; - char version[128]; - unsigned mcp_globals; /* pointer to mcp-type specific structure */ - - /* filled by the MCP at run-time */ - unsigned sram_size; - unsigned string_specs; /* either the original STRING_SPECS or a superset */ - unsigned string_specs_len; - - /* Fields above this comment are guaranteed to be present. - * - * Fields below this comment are extensions added in later versions - * of this struct, drivers should compare the header_length against - * offsetof(field) to check wether a given MCP implements them. - * - * Never remove any field. Keep everything naturally align. - */ -}; - -#endif /* __MYRI10GE_MCP_GEN_HEADER_H__ */ diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 1b965a2b5..6c86dca62 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c @@ -1,12 +1,13 @@ -/* myri_sbus.c: MyriCOM MyriNET SBUS card driver. +/* myri_sbus.h: MyriCOM MyriNET SBUS card driver. * - * Copyright (C) 1996, 1999, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1996, 1999 David S. Miller (davem@redhat.com) */ static char version[] = - "myri_sbus.c:v2.0 June 23, 2006 David S. Miller (davem@davemloft.net)\n"; + "myri_sbus.c:v1.9 12/Sep/99 David S. Miller (davem@redhat.com)\n"; #include +#include #include #include #include @@ -80,6 +81,10 @@ static char version[] = #define DHDR(x) #endif +#ifdef MODULE +static struct myri_eth *root_myri_dev; +#endif + static void myri_reset_off(void __iomem *lp, void __iomem *cregs) { /* Clear IRQ mask. */ @@ -891,9 +896,8 @@ static void dump_eeprom(struct myri_eth *mp) } #endif -static int __init myri_ether_init(struct sbus_dev *sdev) +static int __init myri_ether_init(struct sbus_dev *sdev, int num) { - static int num; static unsigned version_printed; struct net_device *dev; struct myri_eth *mp; @@ -909,9 +913,6 @@ static int __init myri_ether_init(struct sbus_dev *sdev) if (version_printed++ == 0) printk(version); - SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, &sdev->ofdev.dev); - mp = (struct myri_eth *) dev->priv; spin_lock_init(&mp->irq_lock); mp->myri_sdev = sdev; @@ -1069,7 +1070,7 @@ static int __init myri_ether_init(struct sbus_dev *sdev) /* Register interrupt handler now. */ DET(("Requesting MYRIcom IRQ line.\n")); if (request_irq(dev->irq, &myri_interrupt, - IRQF_SHARED, "MyriCOM Ethernet", (void *) dev)) { + SA_SHIRQ, "MyriCOM Ethernet", (void *) dev)) { printk("MyriCOM: Cannot register interrupt handler.\n"); goto err; } @@ -1091,9 +1092,10 @@ static int __init myri_ether_init(struct sbus_dev *sdev) goto err_free_irq; } - dev_set_drvdata(&sdev->ofdev.dev, mp); - - num++; +#ifdef MODULE + mp->next_module = root_myri_dev; + root_myri_dev = mp; +#endif printk("%s: MyriCOM MyriNET Ethernet ", dev->name); @@ -1112,68 +1114,61 @@ err: return -ENODEV; } - -static int __devinit myri_sbus_probe(struct of_device *dev, const struct of_device_id *match) +static int __init myri_sbus_match(struct sbus_dev *sdev) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); + char *name = sdev->prom_name; + + if (!strcmp(name, "MYRICOM,mlanai") || + !strcmp(name, "myri")) + return 1; - return myri_ether_init(sdev); + return 0; } -static int __devexit myri_sbus_remove(struct of_device *dev) +static int __init myri_sbus_probe(void) { - struct myri_eth *mp = dev_get_drvdata(&dev->dev); - struct net_device *net_dev = mp->dev; + struct sbus_bus *bus; + struct sbus_dev *sdev = NULL; + static int called; + int cards = 0, v; - unregister_netdevice(net_dev); - - free_irq(net_dev->irq, net_dev); +#ifdef MODULE + root_myri_dev = NULL; +#endif - if (mp->eeprom.cpuvers < CPUVERS_4_0) { - sbus_iounmap(mp->regs, mp->reg_size); - } else { - sbus_iounmap(mp->cregs, PAGE_SIZE); - sbus_iounmap(mp->lregs, (256 * 1024)); - sbus_iounmap(mp->lanai, (512 * 1024)); + if (called) + return -ENODEV; + called++; + + for_each_sbus(bus) { + for_each_sbusdev(sdev, bus) { + if (myri_sbus_match(sdev)) { + cards++; + DET(("Found myricom myrinet as %s\n", sdev->prom_name)); + if ((v = myri_ether_init(sdev, (cards - 1)))) + return v; + } + } } - - free_netdev(net_dev); - - dev_set_drvdata(&dev->dev, NULL); - + if (!cards) + return -ENODEV; return 0; } -static struct of_device_id myri_sbus_match[] = { - { - .name = "MYRICOM,mlanai", - }, - { - .name = "myri", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, myri_sbus_match); - -static struct of_platform_driver myri_sbus_driver = { - .name = "myri", - .match_table = myri_sbus_match, - .probe = myri_sbus_probe, - .remove = __devexit_p(myri_sbus_remove), -}; - -static int __init myri_sbus_init(void) -{ - return of_register_driver(&myri_sbus_driver, &sbus_bus_type); -} - -static void __exit myri_sbus_exit(void) +static void __exit myri_sbus_cleanup(void) { - of_unregister_driver(&myri_sbus_driver); +#ifdef MODULE + while (root_myri_dev) { + struct myri_eth *next = root_myri_dev->next_module; + + unregister_netdev(root_myri_dev->dev); + /* this will also free the co-allocated 'root_myri_dev' */ + free_netdev(root_myri_dev->dev); + root_myri_dev = next; + } +#endif /* MODULE */ } -module_init(myri_sbus_init); -module_exit(myri_sbus_exit); - +module_init(myri_sbus_probe); +module_exit(myri_sbus_cleanup); MODULE_LICENSE("GPL"); diff --git a/drivers/net/myri_sbus.h b/drivers/net/myri_sbus.h index 2f69ef7cd..47722f708 100644 --- a/drivers/net/myri_sbus.h +++ b/drivers/net/myri_sbus.h @@ -290,6 +290,7 @@ struct myri_eth { unsigned int reg_size; /* Size of register space. */ unsigned int shmem_base; /* Offset to shared ram. */ struct sbus_dev *myri_sdev; /* Our SBUS device struct. */ + struct myri_eth *next_module; /* Next in adapter chain. */ }; /* We use this to acquire receive skb's that we can DMA directly into. */ diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index db0475a11..2e4ecedba 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c @@ -20,13 +20,125 @@ Support information and updates available at http://www.scyld.com/network/netsemi.html - [link no longer provides useful info -jgarzik] + Linux kernel modifications: + + Version 1.0.1: + - Spinlock fixes + - Bug fixes and better intr performance (Tjeerd) + Version 1.0.2: + - Now reads correct MAC address from eeprom + Version 1.0.3: + - Eliminate redundant priv->tx_full flag + - Call netif_start_queue from dev->tx_timeout + - wmb() in start_tx() to flush data + - Update Tx locking + - Clean up PCI enable (davej) + Version 1.0.4: + - Merge Donald Becker's natsemi.c version 1.07 + Version 1.0.5: + - { fill me in } + Version 1.0.6: + * ethtool support (jgarzik) + * Proper initialization of the card (which sometimes + fails to occur and leaves the card in a non-functional + state). (uzi) + + * Some documented register settings to optimize some + of the 100Mbit autodetection circuitry in rev C cards. (uzi) + + * Polling of the PHY intr for stuff like link state + change and auto- negotiation to finally work properly. (uzi) + + * One-liner removal of a duplicate declaration of + netdev_error(). (uzi) + + Version 1.0.7: (Manfred Spraul) + * pci dma + * SMP locking update + * full reset added into tx_timeout + * correct multicast hash generation (both big and little endian) + [copied from a natsemi driver version + from Myrio Corporation, Greg Smith] + * suspend/resume + + version 1.0.8 (Tim Hockin ) + * ETHTOOL_* support + * Wake on lan support (Erik Gilling) + * MXDMA fixes for serverworks + * EEPROM reload + + version 1.0.9 (Manfred Spraul) + * Main change: fix lack of synchronize + netif_close/netif_suspend against a last interrupt + or packet. + * do not enable superflous interrupts (e.g. the + drivers relies on TxDone - TxIntr not needed) + * wait that the hardware has really stopped in close + and suspend. + * workaround for the (at least) gcc-2.95.1 compiler + problem. Also simplifies the code a bit. + * disable_irq() in tx_timeout - needed to protect + against rx interrupts. + * stop the nic before switching into silent rx mode + for wol (required according to docu). + + version 1.0.10: + * use long for ee_addr (various) + * print pointers properly (DaveM) + * include asm/irq.h (?) + + version 1.0.11: + * check and reset if PHY errors appear (Adrian Sun) + * WoL cleanup (Tim Hockin) + * Magic number cleanup (Tim Hockin) + * Don't reload EEPROM on every reset (Tim Hockin) + * Save and restore EEPROM state across reset (Tim Hockin) + * MDIO Cleanup (Tim Hockin) + * Reformat register offsets/bits (jgarzik) + + version 1.0.12: + * ETHTOOL_* further support (Tim Hockin) + + version 1.0.13: + * ETHTOOL_[G]EEPROM support (Tim Hockin) + + version 1.0.13: + * crc cleanup (Matt Domsch ) + + version 1.0.14: + * Cleanup some messages and autoneg in ethtool (Tim Hockin) + + version 1.0.15: + * Get rid of cable_magic flag + * use new (National provided) solution for cable magic issue + + version 1.0.16: + * call netdev_rx() for RxErrors (Manfred Spraul) + * formatting and cleanups + * change options and full_duplex arrays to be zero + initialized + * enable only the WoL and PHY interrupts in wol mode + + version 1.0.17: + * only do cable_magic on 83815 and early 83816 (Tim Hockin) + * create a function for rx refill (Manfred Spraul) + * combine drain_ring and init_ring (Manfred Spraul) + * oom handling (Manfred Spraul) + * hands_off instead of playing with netif_device_{de,a}ttach + (Manfred Spraul) + * be sure to write the MAC back to the chip (Manfred Spraul) + * lengthen EEPROM timeout, and always warn about timeouts + (Manfred Spraul) + * comments update (Manfred) + * do the right thing on a phy-reset (Manfred and Tim) + TODO: * big endian support with CFG:BEM instead of cpu_to_le32 */ +#include #include #include #include @@ -54,8 +166,8 @@ #include #define DRV_NAME "natsemi" -#define DRV_VERSION "2.0" -#define DRV_RELDATE "June 27, 2006" +#define DRV_VERSION "1.07+LK1.0.17" +#define DRV_RELDATE "Sep 27, 2002" #define RX_OFFSET 2 @@ -114,6 +226,7 @@ static int full_duplex[MAX_UNITS]; NATSEMI_PG1_NREGS) #define NATSEMI_REGS_VER 1 /* v1 added RFDR registers */ #define NATSEMI_REGS_SIZE (NATSEMI_NREGS * sizeof(u32)) +#define NATSEMI_DEF_EEPROM_SIZE 24 /* 12 16-bit values */ /* Buffer sizes: * The nic writes 32-bit values, even if the upper bytes of @@ -231,6 +344,18 @@ None characterised. +enum pcistuff { + PCI_USES_IO = 0x01, + PCI_USES_MEM = 0x02, + PCI_USES_MASTER = 0x04, + PCI_ADDR0 = 0x08, + PCI_ADDR1 = 0x10, +}; + +/* MMIO operations required */ +#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1) + + /* * Support for fibre connections on Am79C874: * This phy needs a special setup when connected to a fibre cable. @@ -238,25 +363,22 @@ None characterised. */ #define PHYID_AM79C874 0x0022561b -enum { - MII_MCTRL = 0x15, /* mode control register */ - MII_FX_SEL = 0x0001, /* 100BASE-FX (fiber) */ - MII_EN_SCRM = 0x0004, /* enable scrambler (tp) */ -}; +#define MII_MCTRL 0x15 /* mode control register */ +#define MII_FX_SEL 0x0001 /* 100BASE-FX (fiber) */ +#define MII_EN_SCRM 0x0004 /* enable scrambler (tp) */ /* array of board data directly indexed by pci_tbl[x].driver_data */ static const struct { const char *name; unsigned long flags; - unsigned int eeprom_size; } natsemi_pci_info[] __devinitdata = { - { "NatSemi DP8381[56]", 0, 24 }, + { "NatSemi DP8381[56]", PCI_IOTYPE }, }; -static const struct pci_device_id natsemi_pci_tbl[] __devinitdata = { - { PCI_VENDOR_ID_NS, 0x0020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - { } /* terminate list */ +static struct pci_device_id natsemi_pci_tbl[] = { + { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_83815, PCI_ANY_ID, PCI_ANY_ID, }, + { 0, }, }; MODULE_DEVICE_TABLE(pci, natsemi_pci_tbl); @@ -691,42 +813,6 @@ static void move_int_phy(struct net_device *dev, int addr) udelay(1); } -static void __devinit natsemi_init_media (struct net_device *dev) -{ - struct netdev_private *np = netdev_priv(dev); - u32 tmp; - - netif_carrier_off(dev); - - /* get the initial settings from hardware */ - tmp = mdio_read(dev, MII_BMCR); - np->speed = (tmp & BMCR_SPEED100)? SPEED_100 : SPEED_10; - np->duplex = (tmp & BMCR_FULLDPLX)? DUPLEX_FULL : DUPLEX_HALF; - np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE; - np->advertising= mdio_read(dev, MII_ADVERTISE); - - if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL - && netif_msg_probe(np)) { - printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s " - "10%s %s duplex.\n", - pci_name(np->pci_dev), - (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE)? - "enabled, advertise" : "disabled, force", - (np->advertising & - (ADVERTISE_100FULL|ADVERTISE_100HALF))? - "0" : "", - (np->advertising & - (ADVERTISE_100FULL|ADVERTISE_10FULL))? - "full" : "half"); - } - if (netif_msg_probe(np)) - printk(KERN_INFO - "natsemi %s: Transceiver status %#04x advertising %#04x.\n", - pci_name(np->pci_dev), mdio_read(dev, MII_BMSR), - np->advertising); - -} - static int __devinit natsemi_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -766,7 +852,8 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, iosize = pci_resource_len(pdev, pcibar); irq = pdev->irq; - pci_set_master(pdev); + if (natsemi_pci_info[chip_idx].flags & PCI_USES_MASTER) + pci_set_master(pdev); dev = alloc_etherdev(sizeof (struct netdev_private)); if (!dev) @@ -805,7 +892,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, np->msg_enable = (debug >= 0) ? (1<hands_off = 0; np->intr_status = 0; - np->eeprom_size = natsemi_pci_info[chip_idx].eeprom_size; + np->eeprom_size = NATSEMI_DEF_EEPROM_SIZE; /* Initial port: * - If the nic was configured to use an external phy and if find_mii @@ -870,7 +957,34 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, if (mtu) dev->mtu = mtu; - natsemi_init_media(dev); + netif_carrier_off(dev); + + /* get the initial settings from hardware */ + tmp = mdio_read(dev, MII_BMCR); + np->speed = (tmp & BMCR_SPEED100)? SPEED_100 : SPEED_10; + np->duplex = (tmp & BMCR_FULLDPLX)? DUPLEX_FULL : DUPLEX_HALF; + np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE; + np->advertising= mdio_read(dev, MII_ADVERTISE); + + if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL + && netif_msg_probe(np)) { + printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s " + "10%s %s duplex.\n", + pci_name(np->pci_dev), + (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE)? + "enabled, advertise" : "disabled, force", + (np->advertising & + (ADVERTISE_100FULL|ADVERTISE_100HALF))? + "0" : "", + (np->advertising & + (ADVERTISE_100FULL|ADVERTISE_10FULL))? + "full" : "half"); + } + if (netif_msg_probe(np)) + printk(KERN_INFO + "natsemi %s: Transceiver status %#04x advertising %#04x.\n", + pci_name(np->pci_dev), mdio_read(dev, MII_BMSR), + np->advertising); /* save the silicon revision for later querying */ np->srr = readl(ioaddr + SiliconRev); @@ -1463,7 +1577,7 @@ static int netdev_open(struct net_device *dev) /* Reset the chip, just in case. */ natsemi_reset(dev); - i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); if (i) return i; if (netif_msg_ifup(np)) diff --git a/drivers/net/ne.c b/drivers/net/ne.c index 963a11fa9..b32765215 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c @@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 based probe to take place (as it is at boot) and so the probe will get confused by any other 8390 cards. ISA device autoprobes on a running machine are not recommended anyway. */ -int __init init_module(void) +int init_module(void) { int this_dev, found = 0; diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c index eebf5f02b..2aa7b77f8 100644 --- a/drivers/net/ne2.c +++ b/drivers/net/ne2.c @@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)"); /* Module code fixed by David Weinehall */ -int __init init_module(void) +int init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index 34bdba9ee..ced9fdb83 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c @@ -231,12 +231,12 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, irq = pdev->irq; if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) { - dev_err(&pdev->dev, "no I/O resource at PCI BAR #0\n"); + printk (KERN_ERR PFX "no I/O resource at PCI BAR #0\n"); return -ENODEV; } if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) { - dev_err(&pdev->dev, "I/O resource 0x%x @ 0x%lx busy\n", + printk (KERN_ERR PFX "I/O resource 0x%x @ 0x%lx busy\n", NE_IO_EXTENT, ioaddr); return -EBUSY; } @@ -263,7 +263,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */ dev = alloc_ei_netdev(); if (!dev) { - dev_err(&pdev->dev, "cannot allocate ethernet device\n"); + printk (KERN_ERR PFX "cannot allocate ethernet device\n"); goto err_out_free_res; } SET_MODULE_OWNER(dev); @@ -281,8 +281,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0) /* Limit wait: '2' avoids jiffy roll-over. */ if (jiffies - reset_start_time > 2) { - dev_err(&pdev->dev, - "Card failure (no reset ack).\n"); + printk(KERN_ERR PFX "Card failure (no reset ack).\n"); goto err_out_free_netdev; } @@ -421,7 +420,7 @@ static int ne2k_pci_set_fdx(struct net_device *dev) static int ne2k_pci_open(struct net_device *dev) { - int ret = request_irq(dev->irq, ei_interrupt, IRQF_SHARED, dev->name, dev); + int ret = request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev); if (ret) return ret; diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c deleted file mode 100644 index 30ed9a5a4..000000000 --- a/drivers/net/netx-eth.c +++ /dev/null @@ -1,515 +0,0 @@ -/* - * drivers/net/netx-eth.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -/* XC Fifo Offsets */ -#define EMPTY_PTR_FIFO(xcno) (0 + ((xcno) << 3)) /* Index of the empty pointer FIFO */ -#define IND_FIFO_PORT_HI(xcno) (1 + ((xcno) << 3)) /* Index of the FIFO where received */ - /* Data packages are indicated by XC */ -#define IND_FIFO_PORT_LO(xcno) (2 + ((xcno) << 3)) /* Index of the FIFO where received */ - /* Data packages are indicated by XC */ -#define REQ_FIFO_PORT_HI(xcno) (3 + ((xcno) << 3)) /* Index of the FIFO where Data packages */ - /* have to be indicated by ARM which */ - /* shall be sent */ -#define REQ_FIFO_PORT_LO(xcno) (4 + ((xcno) << 3)) /* Index of the FIFO where Data packages */ - /* have to be indicated by ARM which shall */ - /* be sent */ -#define CON_FIFO_PORT_HI(xcno) (5 + ((xcno) << 3)) /* Index of the FIFO where sent Data packages */ - /* are confirmed */ -#define CON_FIFO_PORT_LO(xcno) (6 + ((xcno) << 3)) /* Index of the FIFO where sent Data */ - /* packages are confirmed */ -#define PFIFO_MASK(xcno) (0x7f << (xcno*8)) - -#define FIFO_PTR_FRAMELEN_SHIFT 0 -#define FIFO_PTR_FRAMELEN_MASK (0x7ff << 0) -#define FIFO_PTR_FRAMELEN(len) (((len) << 0) & FIFO_PTR_FRAMELEN_MASK) -#define FIFO_PTR_TIMETRIG (1<<11) -#define FIFO_PTR_MULTI_REQ -#define FIFO_PTR_ORIGIN (1<<14) -#define FIFO_PTR_VLAN (1<<15) -#define FIFO_PTR_FRAMENO_SHIFT 16 -#define FIFO_PTR_FRAMENO_MASK (0x3f << 16) -#define FIFO_PTR_FRAMENO(no) (((no) << 16) & FIFO_PTR_FRAMENO_MASK) -#define FIFO_PTR_SEGMENT_SHIFT 22 -#define FIFO_PTR_SEGMENT_MASK (0xf << 22) -#define FIFO_PTR_SEGMENT(seg) (((seg) & 0xf) << 22) -#define FIFO_PTR_ERROR_SHIFT 28 -#define FIFO_PTR_ERROR_MASK (0xf << 28) - -#define ISR_LINK_STATUS_CHANGE (1<<4) -#define ISR_IND_LO (1<<3) -#define ISR_CON_LO (1<<2) -#define ISR_IND_HI (1<<1) -#define ISR_CON_HI (1<<0) - -#define ETH_MAC_LOCAL_CONFIG 0x1560 -#define ETH_MAC_4321 0x1564 -#define ETH_MAC_65 0x1568 - -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_SHIFT 16 -#define MAC_TRAFFIC_CLASS_ARRANGEMENT_MASK (0xf<data; - unsigned int len = skb->len; - - spin_lock_irq(&priv->lock); - memcpy_toio(priv->sram_base + 1560, (void *)buf, len); - if (len < 60) { - memset_io(priv->sram_base + 1560 + len, 0, 60 - len); - len = 60; - } - - pfifo_push(REQ_FIFO_PORT_LO(priv->id), - FIFO_PTR_SEGMENT(priv->id) | - FIFO_PTR_FRAMENO(1) | - FIFO_PTR_FRAMELEN(len)); - - ndev->trans_start = jiffies; - priv->stats.tx_packets++; - priv->stats.tx_bytes += skb->len; - - netif_stop_queue(ndev); - spin_unlock_irq(&priv->lock); - dev_kfree_skb(skb); - - return 0; -} - -static void netx_eth_receive(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - unsigned int val, frameno, seg, len; - unsigned char *data; - struct sk_buff *skb; - - val = pfifo_pop(IND_FIFO_PORT_LO(priv->id)); - - frameno = (val & FIFO_PTR_FRAMENO_MASK) >> FIFO_PTR_FRAMENO_SHIFT; - seg = (val & FIFO_PTR_SEGMENT_MASK) >> FIFO_PTR_SEGMENT_SHIFT; - len = (val & FIFO_PTR_FRAMELEN_MASK) >> FIFO_PTR_FRAMELEN_SHIFT; - - skb = dev_alloc_skb(len); - if (unlikely(skb == NULL)) { - printk(KERN_NOTICE "%s: Low memory, packet dropped.\n", - ndev->name); - priv->stats.rx_dropped++; - return; - } - - data = skb_put(skb, len); - - memcpy_fromio(data, priv->sram_base + frameno * 1560, len); - - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_SEGMENT(seg) | FIFO_PTR_FRAMENO(frameno)); - - ndev->last_rx = jiffies; - skb->dev = ndev; - skb->protocol = eth_type_trans(skb, ndev); - netif_rx(skb); - priv->stats.rx_packets++; - priv->stats.rx_bytes += len; -} - -static irqreturn_t -netx_eth_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - struct net_device *ndev = dev_id; - struct netx_eth_priv *priv = netdev_priv(ndev); - int status; - unsigned long flags; - - spin_lock_irqsave(&priv->lock, flags); - - status = readl(NETX_PFIFO_XPEC_ISR(priv->id)); - while (status) { - int fill_level; - writel(status, NETX_PFIFO_XPEC_ISR(priv->id)); - - if ((status & ISR_CON_HI) || (status & ISR_IND_HI)) - printk("%s: unexpected status: 0x%08x\n", - __FUNCTION__, status); - - fill_level = - readl(NETX_PFIFO_FILL_LEVEL(IND_FIFO_PORT_LO(priv->id))); - while (fill_level--) - netx_eth_receive(ndev); - - if (status & ISR_CON_LO) - netif_wake_queue(ndev); - - if (status & ISR_LINK_STATUS_CHANGE) - mii_check_media(&priv->mii, netif_msg_link(priv), 1); - - status = readl(NETX_PFIFO_XPEC_ISR(priv->id)); - } - spin_unlock_irqrestore(&priv->lock, flags); - return IRQ_HANDLED; -} - -static struct net_device_stats *netx_eth_query_statistics(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - return &priv->stats; -} - -static int netx_eth_open(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - - if (request_irq - (ndev->irq, &netx_eth_interrupt, IRQF_SHARED, ndev->name, ndev)) - return -EAGAIN; - - writel(ndev->dev_addr[0] | - ndev->dev_addr[1]<<8 | - ndev->dev_addr[2]<<16 | - ndev->dev_addr[3]<<24, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_4321); - writel(ndev->dev_addr[4] | - ndev->dev_addr[5]<<8, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_65); - - writel(LOCAL_CONFIG_LINK_STATUS_IRQ_EN | - LOCAL_CONFIG_CON_LO_IRQ_EN | - LOCAL_CONFIG_CON_HI_IRQ_EN | - LOCAL_CONFIG_IND_LO_IRQ_EN | - LOCAL_CONFIG_IND_HI_IRQ_EN, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + - ETH_MAC_LOCAL_CONFIG); - - mii_check_media(&priv->mii, netif_msg_link(priv), 1); - netif_start_queue(ndev); - - return 0; -} - -static int netx_eth_close(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - - netif_stop_queue(ndev); - - writel(0, - priv->xpec_base + NETX_XPEC_RAM_START_OFS + ETH_MAC_LOCAL_CONFIG); - - free_irq(ndev->irq, ndev); - - return 0; -} - -static void netx_eth_timeout(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - int i; - - printk(KERN_ERR "%s: transmit timed out, resetting\n", ndev->name); - - spin_lock_irq(&priv->lock); - - xc_reset(priv->xc); - xc_start(priv->xc); - - for (i=2; i<=18; i++) - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_FRAMENO(i) | FIFO_PTR_SEGMENT(priv->id)); - - spin_unlock_irq(&priv->lock); - - netif_wake_queue(ndev); -} - -static int -netx_eth_phy_read(struct net_device *ndev, int phy_id, int reg) -{ - unsigned int val; - - val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES; - - writel(val, NETX_MIIMU); - while (readl(NETX_MIIMU) & MIIMU_SNRDY); - - return readl(NETX_MIIMU) >> 16; - -} - -static void -netx_eth_phy_write(struct net_device *ndev, int phy_id, int reg, int value) -{ - unsigned int val; - - val = MIIMU_SNRDY | MIIMU_PREAMBLE | MIIMU_PHYADDR(phy_id) | - MIIMU_REGADDR(reg) | MIIMU_PHY_NRES | MIIMU_OPMODE_WRITE | - MIIMU_DATA(value); - - writel(val, NETX_MIIMU); - while (readl(NETX_MIIMU) & MIIMU_SNRDY); -} - -static int netx_eth_enable(struct net_device *ndev) -{ - struct netx_eth_priv *priv = netdev_priv(ndev); - unsigned int mac4321, mac65; - int running, i; - - ether_setup(ndev); - - ndev->open = netx_eth_open; - ndev->stop = netx_eth_close; - ndev->hard_start_xmit = netx_eth_hard_start_xmit; - ndev->tx_timeout = netx_eth_timeout; - ndev->watchdog_timeo = msecs_to_jiffies(5000); - ndev->get_stats = netx_eth_query_statistics; - ndev->set_multicast_list = netx_eth_set_multicast_list; - - priv->msg_enable = NETIF_MSG_LINK; - priv->mii.phy_id_mask = 0x1f; - priv->mii.reg_num_mask = 0x1f; - priv->mii.force_media = 0; - priv->mii.full_duplex = 0; - priv->mii.dev = ndev; - priv->mii.mdio_read = netx_eth_phy_read; - priv->mii.mdio_write = netx_eth_phy_write; - priv->mii.phy_id = INTERNAL_PHY_ADR + priv->id; - - running = xc_running(priv->xc); - xc_stop(priv->xc); - - /* if the xc engine is already running, assume the bootloader has - * loaded the firmware for us - */ - if (running) { - /* get Node Address from hardware */ - mac4321 = readl(priv->xpec_base + - NETX_XPEC_RAM_START_OFS + ETH_MAC_4321); - mac65 = readl(priv->xpec_base + - NETX_XPEC_RAM_START_OFS + ETH_MAC_65); - - ndev->dev_addr[0] = mac4321 & 0xff; - ndev->dev_addr[1] = (mac4321 >> 8) & 0xff; - ndev->dev_addr[2] = (mac4321 >> 16) & 0xff; - ndev->dev_addr[3] = (mac4321 >> 24) & 0xff; - ndev->dev_addr[4] = mac65 & 0xff; - ndev->dev_addr[5] = (mac65 >> 8) & 0xff; - } else { - if (xc_request_firmware(priv->xc)) { - printk(CARDNAME ": requesting firmware failed\n"); - return -ENODEV; - } - } - - xc_reset(priv->xc); - xc_start(priv->xc); - - if (!is_valid_ether_addr(ndev->dev_addr)) - printk("%s: Invalid ethernet MAC address. Please " - "set using ifconfig\n", ndev->name); - - for (i=2; i<=18; i++) - pfifo_push(EMPTY_PTR_FIFO(priv->id), - FIFO_PTR_FRAMENO(i) | FIFO_PTR_SEGMENT(priv->id)); - - return register_netdev(ndev); - -} - -static int netx_eth_drv_probe(struct platform_device *pdev) -{ - struct netx_eth_priv *priv; - struct net_device *ndev; - struct netxeth_platform_data *pdata; - int ret; - - ndev = alloc_etherdev(sizeof (struct netx_eth_priv)); - if (!ndev) { - printk("%s: could not allocate device.\n", CARDNAME); - ret = -ENOMEM; - goto exit; - } - SET_MODULE_OWNER(ndev); - SET_NETDEV_DEV(ndev, &pdev->dev); - - platform_set_drvdata(pdev, ndev); - - priv = netdev_priv(ndev); - - pdata = (struct netxeth_platform_data *)pdev->dev.platform_data; - priv->xc = request_xc(pdata->xcno, &pdev->dev); - if (!priv->xc) { - dev_err(&pdev->dev, "unable to request xc engine\n"); - ret = -ENODEV; - goto exit_free_netdev; - } - - ndev->irq = priv->xc->irq; - priv->id = pdev->id; - priv->xpec_base = priv->xc->xpec_base; - priv->xmac_base = priv->xc->xmac_base; - priv->sram_base = priv->xc->sram_base; - - ret = pfifo_request(PFIFO_MASK(priv->id)); - if (ret) { - printk("unable to request PFIFO\n"); - goto exit_free_xc; - } - - ret = netx_eth_enable(ndev); - if (ret) - goto exit_free_pfifo; - - return 0; -exit_free_pfifo: - pfifo_free(PFIFO_MASK(priv->id)); -exit_free_xc: - free_xc(priv->xc); -exit_free_netdev: - platform_set_drvdata(pdev, NULL); - free_netdev(ndev); -exit: - return ret; -} - -static int netx_eth_drv_remove(struct platform_device *pdev) -{ - struct net_device *ndev = dev_get_drvdata(&pdev->dev); - struct netx_eth_priv *priv = netdev_priv(ndev); - - platform_set_drvdata(pdev, NULL); - - unregister_netdev(ndev); - xc_stop(priv->xc); - free_xc(priv->xc); - free_netdev(ndev); - pfifo_free(PFIFO_MASK(priv->id)); - - return 0; -} - -static int netx_eth_drv_suspend(struct platform_device *pdev, pm_message_t state) -{ - dev_err(&pdev->dev, "suspend not implemented\n"); - return 0; -} - -static int netx_eth_drv_resume(struct platform_device *pdev) -{ - dev_err(&pdev->dev, "resume not implemented\n"); - return 0; -} - -static struct platform_driver netx_eth_driver = { - .probe = netx_eth_drv_probe, - .remove = netx_eth_drv_remove, - .suspend = netx_eth_drv_suspend, - .resume = netx_eth_drv_resume, - .driver = { - .name = CARDNAME, - .owner = THIS_MODULE, - }, -}; - -static int __init netx_eth_init(void) -{ - unsigned int phy_control, val; - - printk("NetX Ethernet driver\n"); - - phy_control = PHY_CONTROL_PHY_ADDRESS(INTERNAL_PHY_ADR>>1) | - PHY_CONTROL_PHY1_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY1_AUTOMDIX | - PHY_CONTROL_PHY1_EN | - PHY_CONTROL_PHY0_MODE(PHY_MODE_ALL) | - PHY_CONTROL_PHY0_AUTOMDIX | - PHY_CONTROL_PHY0_EN | - PHY_CONTROL_CLK_XLATIN; - - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(phy_control | PHY_CONTROL_RESET, NETX_SYSTEM_PHY_CONTROL); - udelay(100); - - val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); - writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); - - writel(phy_control, NETX_SYSTEM_PHY_CONTROL); - - return platform_driver_register(&netx_eth_driver); -} - -static void __exit netx_eth_cleanup(void) -{ - platform_driver_unregister(&netx_eth_driver); -} - -module_init(netx_eth_init); -module_exit(netx_eth_cleanup); - -MODULE_AUTHOR("Sascha Hauer, Pengutronix"); -MODULE_LICENSE("GPL"); - diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c index d4be207d3..a68bf474f 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c @@ -1,12 +1,17 @@ /* ni5010.c: A network driver for the MiCom-Interlan NI5010 ethercard. * - * Copyright 1996,1997,2006 Jan-Pascal van Best and Andreas Mohr. + * Copyright 1996,1997 Jan-Pascal van Best and Andreas Mohr. * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * * The authors may be reached as: - * janpascal@vanbest.org andi@lisas.de + * jvbest@wi.leidenuniv.nl a.mohr@mailto.de + * or by snail mail as + * Jan-Pascal van Best Andreas Mohr + * Klikspaanweg 58-4 Stauferstr. 6 + * 2324 LZ Leiden D-71272 Renningen + * The Netherlands Germany * * Sources: * Donald Becker's "skeleton.c" @@ -22,9 +27,8 @@ * 970503 v0.93: Fixed auto-irq failure on warm reboot (JB) * 970623 v1.00: First kernel version (AM) * 970814 v1.01: Added detection of onboard receive buffer size (AM) - * 060611 v1.02: slight cleanup: email addresses, driver modernization. * Bugs: - * - not SMP-safe (no locking of I/O accesses) + * - None known... * - Note that you have to patch ifconfig for the new /proc/net/dev * format. It gives incorrect stats otherwise. * @@ -35,7 +39,7 @@ * Complete merge with Andreas' driver * Implement ring buffers (Is this useful? You can't squeeze * too many packet in a 2k buffer!) - * Implement DMA (Again, is this useful? Some docs say DMA is + * Implement DMA (Again, is this useful? Some docs says DMA is * slower than programmed I/O) * * Compile with: @@ -43,7 +47,7 @@ * -DMODULE -c ni5010.c * * Insert with e.g.: - * insmod ni5010.ko io=0x300 irq=5 + * insmod ni5010.o io=0x300 irq=5 */ #include @@ -65,15 +69,15 @@ #include "ni5010.h" -static const char boardname[] = "NI5010"; -static char version[] __initdata = - "ni5010.c: v1.02 20060611 Jan-Pascal van Best and Andreas Mohr\n"; +static const char *boardname = "NI5010"; +static char *version = + "ni5010.c: v1.00 06/23/97 Jan-Pascal van Best and Andreas Mohr\n"; /* bufsize_rcv == 0 means autoprobing */ static unsigned int bufsize_rcv; -#define JUMPERED_INTERRUPTS /* IRQ line jumpered on board */ -#undef JUMPERED_DMA /* No DMA used */ +#define jumpered_interrupts /* IRQ line jumpered on board */ +#undef jumpered_dma /* No DMA used */ #undef FULL_IODETECT /* Only detect in portlist */ #ifndef FULL_IODETECT @@ -277,7 +281,7 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name)); -#ifdef JUMPERED_INTERRUPTS +#ifdef jumpered_interrupts if (dev->irq == 0xff) ; else if (dev->irq < 2) { @@ -301,7 +305,7 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) } else if (dev->irq == 2) { dev->irq = 9; } -#endif /* JUMPERED_INTERRUPTS */ +#endif /* jumpered_irq */ PRINTK2((KERN_DEBUG "%s: I/O #9 passed!\n", dev->name)); /* DMA is not supported (yet?), so no use detecting it */ @@ -330,7 +334,7 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) outw(0, IE_GP); /* Point GP at start of packet */ outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ } - printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); + printk("// bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); memset(dev->priv, 0, sizeof(struct ni5010_local)); dev->open = ni5010_open; @@ -350,9 +354,11 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr) outb(0xff, EDLC_XCLR); /* Kill all pending xmt interrupts */ printk(KERN_INFO "%s: NI5010 found at 0x%x, using IRQ %d", dev->name, ioaddr, dev->irq); - if (dev->dma) - printk(" & DMA %d", dev->dma); + if (dev->dma) printk(" & DMA %d", dev->dma); printk(".\n"); + + printk(KERN_INFO "Join the NI5010 driver development team!\n"); + printk(KERN_INFO "Mail to a.mohr@mailto.de or jvbest@wi.leidenuniv.nl\n"); return 0; out: release_region(dev->base_addr, NI5010_IO_EXTENT); @@ -365,7 +371,7 @@ out: * * This routine should set everything up anew at each open, even * registers that "should" only need to be set once at boot, so that - * there is a non-reboot way to recover if something goes wrong. + * there is non-reboot way to recover if something goes wrong. */ static int ni5010_open(struct net_device *dev) @@ -384,13 +390,13 @@ static int ni5010_open(struct net_device *dev) * Always allocate the DMA channel after the IRQ, * and clean up on failure. */ -#ifdef JUMPERED_DMA +#ifdef jumpered_dma if (request_dma(dev->dma, cardname)) { printk(KERN_WARNING "%s: Cannot get dma %#2x\n", dev->name, dev->dma); free_irq(dev->irq, NULL); return -EAGAIN; } -#endif /* JUMPERED_DMA */ +#endif /* jumpered_dma */ PRINTK3((KERN_DEBUG "%s: passed open() #2\n", dev->name)); /* Reset the hardware here. Don't forget to set the station address. */ @@ -627,7 +633,7 @@ static int ni5010_close(struct net_device *dev) int ioaddr = dev->base_addr; PRINTK2((KERN_DEBUG "%s: entering ni5010_close\n", dev->name)); -#ifdef JUMPERED_INTERRUPTS +#ifdef jumpered_interrupts free_irq(dev->irq, NULL); #endif /* Put card in held-RESET state */ @@ -765,7 +771,7 @@ module_param(irq, int, 0); MODULE_PARM_DESC(io, "ni5010 I/O base address"); MODULE_PARM_DESC(irq, "ni5010 IRQ number"); -static int __init ni5010_init_module(void) +int init_module(void) { PRINTK2((KERN_DEBUG "%s: entering init_module\n", boardname)); /* @@ -786,15 +792,13 @@ static int __init ni5010_init_module(void) return 0; } -static void __exit ni5010_cleanup_module(void) +void cleanup_module(void) { PRINTK2((KERN_DEBUG "%s: entering cleanup_module\n", boardname)); unregister_netdev(dev_ni5010); release_region(dev_ni5010->base_addr, NI5010_IO_EXTENT); free_netdev(dev_ni5010); } -module_init(ni5010_init_module); -module_exit(ni5010_cleanup_module); #endif /* MODULE */ MODULE_LICENSE("GPL"); diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index 4d52ecf8a..fa854c8fd 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c @@ -1323,7 +1323,7 @@ MODULE_PARM_DESC(irq, "NI5210 IRQ number,required"); MODULE_PARM_DESC(memstart, "NI5210 memory base address,required"); MODULE_PARM_DESC(memend, "NI5210 memory end address,required"); -int __init init_module(void) +int init_module(void) { if(io <= 0x0 || !memend || !memstart || irq < 2) { printk("ni52: Autoprobing not allowed for modules.\nni52: Set symbols 'io' 'irq' 'memstart' and 'memend'\n"); diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c index 810cc572f..bb42ff218 100644 --- a/drivers/net/ni65.c +++ b/drivers/net/ni65.c @@ -1253,7 +1253,7 @@ MODULE_PARM_DESC(irq, "ni6510 IRQ number (ignored for some cards)"); MODULE_PARM_DESC(io, "ni6510 I/O base address"); MODULE_PARM_DESC(dma, "ni6510 ISA DMA channel (ignored for some cards)"); -int __init init_module(void) +int init_module(void) { dev_ni65 = ni65_probe(-1); return IS_ERR(dev_ni65) ? PTR_ERR(dev_ni65) : 0; diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 23397f994..b6427a81b 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c @@ -96,6 +96,7 @@ //#define dprintk printk #define dprintk(x...) do { } while (0) +#include #include #include #include @@ -803,7 +804,7 @@ static int ns83820_setup_rx(struct net_device *ndev) writel(dev->IMR_cache, dev->base + IMR); writel(1, dev->base + IER); - spin_unlock(&dev->misc_lock); + spin_unlock_irq(&dev->misc_lock); kick_rx(ndev); @@ -1012,6 +1013,8 @@ static void do_tx_done(struct net_device *ndev) struct ns83820 *dev = PRIV(ndev); u32 cmdsts, tx_done_idx, *desc; + spin_lock_irq(&dev->tx_lock); + dprintk("do_tx_done(%p)\n", ndev); tx_done_idx = dev->tx_done_idx; desc = dev->tx_descs + (tx_done_idx * DESC_SIZE); @@ -1067,6 +1070,7 @@ static void do_tx_done(struct net_device *ndev) netif_start_queue(ndev); netif_wake_queue(ndev); } + spin_unlock_irq(&dev->tx_lock); } static void ns83820_cleanup_tx(struct ns83820 *dev) @@ -1278,13 +1282,11 @@ static struct ethtool_ops ops = { .get_link = ns83820_get_link }; -/* this function is called in irq context from the ISR */ static void ns83820_mib_isr(struct ns83820 *dev) { - unsigned long flags; - spin_lock_irqsave(&dev->misc_lock, flags); + spin_lock(&dev->misc_lock); ns83820_update_stats(dev); - spin_unlock_irqrestore(&dev->misc_lock, flags); + spin_unlock(&dev->misc_lock); } static void ns83820_do_isr(struct net_device *ndev, u32 isr); @@ -1306,8 +1308,6 @@ static irqreturn_t ns83820_irq(int foo, void *data, struct pt_regs *regs) static void ns83820_do_isr(struct net_device *ndev, u32 isr) { struct ns83820 *dev = PRIV(ndev); - unsigned long flags; - #ifdef DEBUG if (isr & ~(ISR_PHY | ISR_RXDESC | ISR_RXEARLY | ISR_RXOK | ISR_RXERR | ISR_TXIDLE | ISR_TXOK | ISR_TXDESC)) Dprintk("odd isr? 0x%08x\n", isr); @@ -1322,10 +1322,10 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr) if ((ISR_RXDESC | ISR_RXOK) & isr) { prefetch(dev->rx_info.next_rx_desc); - spin_lock_irqsave(&dev->misc_lock, flags); + spin_lock_irq(&dev->misc_lock); dev->IMR_cache &= ~(ISR_RXDESC | ISR_RXOK); writel(dev->IMR_cache, dev->base + IMR); - spin_unlock_irqrestore(&dev->misc_lock, flags); + spin_unlock_irq(&dev->misc_lock); tasklet_schedule(&dev->rx_tasklet); //rx_irq(ndev); @@ -1371,18 +1371,16 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr) * work has accumulated */ if ((ISR_TXDESC | ISR_TXIDLE | ISR_TXOK | ISR_TXERR) & isr) { - spin_lock_irqsave(&dev->tx_lock, flags); do_tx_done(ndev); - spin_unlock_irqrestore(&dev->tx_lock, flags); /* Disable TxOk if there are no outstanding tx packets. */ if ((dev->tx_done_idx == dev->tx_free_idx) && (dev->IMR_cache & ISR_TXOK)) { - spin_lock_irqsave(&dev->misc_lock, flags); + spin_lock_irq(&dev->misc_lock); dev->IMR_cache &= ~ISR_TXOK; writel(dev->IMR_cache, dev->base + IMR); - spin_unlock_irqrestore(&dev->misc_lock, flags); + spin_unlock_irq(&dev->misc_lock); } } @@ -1393,10 +1391,10 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr) * nature are expected, we must enable TxOk. */ if ((ISR_TXIDLE & isr) && (dev->tx_done_idx != dev->tx_free_idx)) { - spin_lock_irqsave(&dev->misc_lock, flags); + spin_lock_irq(&dev->misc_lock); dev->IMR_cache |= ISR_TXOK; writel(dev->IMR_cache, dev->base + IMR); - spin_unlock_irqrestore(&dev->misc_lock, flags); + spin_unlock_irq(&dev->misc_lock); } /* MIB interrupt: one of the statistics counters is about to overflow */ @@ -1458,7 +1456,7 @@ static void ns83820_tx_timeout(struct net_device *ndev) u32 tx_done_idx, *desc; unsigned long flags; - spin_lock_irqsave(&dev->tx_lock, flags); + local_irq_save(flags); tx_done_idx = dev->tx_done_idx; desc = dev->tx_descs + (tx_done_idx * DESC_SIZE); @@ -1485,7 +1483,7 @@ static void ns83820_tx_timeout(struct net_device *ndev) ndev->name, tx_done_idx, dev->tx_free_idx, le32_to_cpu(desc[DESC_CMDSTS])); - spin_unlock_irqrestore(&dev->tx_lock, flags); + local_irq_restore(flags); } static void ns83820_tx_watch(unsigned long data) @@ -1835,7 +1833,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { using_dac = 0; } else { - dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n"); + printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); return -ENODEV; } @@ -1858,7 +1856,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ err = pci_enable_device(pci_dev); if (err) { - dev_info(&pci_dev->dev, "pci_enable_dev failed: %d\n", err); + printk(KERN_INFO "ns83820: pci_enable_dev failed: %d\n", err); goto out_free; } @@ -1884,11 +1882,11 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ dev->IMR_cache = 0; - err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, + err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, DRV_NAME, ndev); if (err) { - dev_info(&pci_dev->dev, "unable to register irq %d, err %d\n", - pci_dev->irq, err); + printk(KERN_INFO "ns83820: unable to register irq %d\n", + pci_dev->irq); goto out_disable; } @@ -1902,7 +1900,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ rtnl_lock(); err = dev_alloc_name(ndev, ndev->name); if (err < 0) { - dev_info(&pci_dev->dev, "unable to get netdev name: %d\n", err); + printk(KERN_INFO "ns83820: unable to get netdev name: %d\n", err); goto out_free_irq; } diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index e0e293964..a7bb54df7 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c @@ -85,6 +85,7 @@ IVc. Errata */ +#include #include #include #include @@ -601,7 +602,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, /* dev zeroed in alloc_etherdev */ dev = alloc_etherdev (sizeof (*tp)); if (dev == NULL) { - dev_err(&pdev->dev, "unable to alloc new ethernet\n"); + printk (KERN_ERR PFX "unable to alloc new ethernet\n"); DPRINTK ("EXIT, returning -ENOMEM\n"); return -ENOMEM; } @@ -631,14 +632,14 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, /* make sure PCI base addr 0 is PIO */ if (!(pio_flags & IORESOURCE_IO)) { - dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n"); + printk (KERN_ERR PFX "region #0 not a PIO resource, aborting\n"); rc = -ENODEV; goto err_out; } /* make sure PCI base addr 1 is MMIO */ if (!(mmio_flags & IORESOURCE_MEM)) { - dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n"); + printk (KERN_ERR PFX "region #1 not an MMIO resource, aborting\n"); rc = -ENODEV; goto err_out; } @@ -646,12 +647,12 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, /* check for weird/broken PCI region reporting */ if ((pio_len < NETDRV_MIN_IO_SIZE) || (mmio_len < NETDRV_MIN_IO_SIZE)) { - dev_err(&pdev->dev, "Invalid PCI region size(s), aborting\n"); + printk (KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); rc = -ENODEV; goto err_out; } - rc = pci_request_regions (pdev, MODNAME); + rc = pci_request_regions (pdev, "pci-skeleton"); if (rc) goto err_out; @@ -663,7 +664,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, /* ioremap MMIO region */ ioaddr = ioremap (mmio_start, mmio_len); if (ioaddr == NULL) { - dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); + printk (KERN_ERR PFX "cannot remap MMIO, aborting\n"); rc = -EIO; goto err_out_free_res; } @@ -699,10 +700,9 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, } /* if unknown chip, assume array element #0, original RTL-8139 in this case */ - dev_printk (KERN_DEBUG, &pdev->dev, - "unknown chip version, assuming RTL-8139\n"); - dev_printk (KERN_DEBUG, &pdev->dev, "TxConfig = 0x%lx\n", - NETDRV_R32 (TxConfig)); + printk (KERN_DEBUG PFX "PCI device %s: unknown chip version, assuming RTL-8139\n", + pci_name(pdev)); + printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n", pci_name(pdev), NETDRV_R32 (TxConfig)); tp->chipset = 0; match: @@ -1076,7 +1076,7 @@ static int netdrv_open (struct net_device *dev) DPRINTK ("ENTER\n"); - retval = request_irq (dev->irq, netdrv_interrupt, IRQF_SHARED, dev->name, dev); + retval = request_irq (dev->irq, netdrv_interrupt, SA_SHIRQ, dev->name, dev); if (retval) { DPRINTK ("EXIT, returning %d\n", retval); return retval; diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 297e9f805..2ea66aca6 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c @@ -535,7 +535,7 @@ static int axnet_open(struct net_device *dev) link->open++; - request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); + request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, "axnet_cs", dev); info->link_status = 0x00; init_timer(&info->watchdog); diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index 48434d792..441de824a 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c @@ -387,10 +387,7 @@ static int com20020_resume(struct pcmcia_device *link) } static struct pcmcia_device_id com20020_ids[] = { - PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.", - "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf), - PCMCIA_DEVICE_PROD_ID12("SoHard AG", - "SH ARC PCMCIA", 0xf8991729, 0x69dff0c7), + PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.", "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf), PCMCIA_DEVICE_NULL }; MODULE_DEVICE_TABLE(pcmcia, com20020_ids); diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index ea93b8f18..09b11761c 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c @@ -831,7 +831,8 @@ static int fjn_start_xmit(struct sk_buff *skb, struct net_device *dev) if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 0ecebfc31..d090df413 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c @@ -12,7 +12,7 @@ Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net pcnet_cs.c 1.153 2003/11/09 18:53:09 - + The network driver code is based on Donald Becker's NE2000 code: Written 1992,1993 by Donald Becker. @@ -146,7 +146,7 @@ typedef struct hw_info_t { #define MII_PHYID_REG2 0x03 static hw_info_t hw_info[] = { - { /* Accton EN2212 */ 0x0ff0, 0x00, 0x00, 0xe8, DELAY_OUTPUT }, + { /* Accton EN2212 */ 0x0ff0, 0x00, 0x00, 0xe8, DELAY_OUTPUT }, { /* Allied Telesis LA-PCM */ 0x0ff0, 0x00, 0x00, 0xf4, 0 }, { /* APEX MultiCard */ 0x03f4, 0x00, 0x20, 0xe5, 0 }, { /* ASANTE FriendlyNet */ 0x4910, 0x00, 0x00, 0x94, @@ -193,7 +193,7 @@ static hw_info_t hw_info[] = { { /* NE2000 Compatible */ 0x0ff0, 0x00, 0xa0, 0x0c, 0 }, { /* Network General Sniffer */ 0x0ff0, 0x00, 0x00, 0x65, HAS_MISC_REG | HAS_IBM_MISC }, - { /* Panasonic VEL211 */ 0x0ff0, 0x00, 0x80, 0x45, + { /* Panasonic VEL211 */ 0x0ff0, 0x00, 0x80, 0x45, HAS_MISC_REG | HAS_IBM_MISC }, { /* PreMax PE-200 */ 0x07f0, 0x00, 0x20, 0xe0, 0 }, { /* RPTI EP400 */ 0x0110, 0x00, 0x40, 0x95, 0 }, @@ -330,7 +330,7 @@ static hw_info_t *get_hwinfo(struct pcmcia_device *link) for (j = 0; j < 6; j++) dev->dev_addr[j] = readb(base + (j<<1)); } - + iounmap(virt); j = pcmcia_release_window(link->win); if (j != CS_SUCCESS) @@ -490,7 +490,7 @@ static int try_io_port(struct pcmcia_device *link) if (link->io.NumPorts2 > 0) { /* for master/slave multifunction cards */ link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; - link->irq.Attributes = + link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; } } else { @@ -543,19 +543,19 @@ static int pcnet_config(struct pcmcia_device *link) manfid = le16_to_cpu(buf[0]); prodid = le16_to_cpu(buf[1]); } - + tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; tuple.Attributes = 0; CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); while (last_ret == CS_SUCCESS) { cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); cistpl_io_t *io = &(parse.cftable_entry.io); - + if (pcmcia_get_tuple_data(link, &tuple) != 0 || pcmcia_parse_tuple(link, &tuple, &parse) != 0 || cfg->index == 0 || cfg->io.nwin == 0) goto next_entry; - + link->conf.ConfigIndex = cfg->index; /* For multifunction cards, by convention, we configure the network function with window 0, and serial with window 1 */ @@ -584,7 +584,7 @@ static int pcnet_config(struct pcmcia_device *link) } CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); - + if (link->io.NumPorts2 == 8) { link->conf.Attributes |= CONF_ENABLE_SPKR; link->conf.Status = CCSR_AUDIO_ENA; @@ -592,7 +592,7 @@ static int pcnet_config(struct pcmcia_device *link) if ((manfid == MANFID_IBM) && (prodid == PRODID_IBM_HOME_AND_AWAY)) link->conf.ConfigIndex |= 0x10; - + CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); dev->irq = link->irq.AssignedIRQ; dev->base_addr = link->io.BasePort1; @@ -614,7 +614,7 @@ static int pcnet_config(struct pcmcia_device *link) hw_info = get_ax88190(link); if (hw_info == NULL) hw_info = get_hwired(link); - + if (hw_info == NULL) { printk(KERN_NOTICE "pcnet_cs: unable to read hardware net" " address for io base %#3lx\n", dev->base_addr); @@ -631,7 +631,7 @@ static int pcnet_config(struct pcmcia_device *link) info->flags &= ~USE_BIG_BUF; if (!use_big_buf) info->flags &= ~USE_BIG_BUF; - + if (info->flags & USE_BIG_BUF) { start_pg = SOCKET_START_PG; stop_pg = SOCKET_STOP_PG; @@ -929,7 +929,7 @@ static void set_misc_reg(struct net_device *dev) kio_addr_t nic_base = dev->base_addr; pcnet_dev_t *info = PRIV(dev); u_char tmp; - + if (info->flags & HAS_MISC_REG) { tmp = inb_p(nic_base + PCNET_MISC) & ~3; if (dev->if_port == 2) @@ -998,7 +998,7 @@ static int pcnet_open(struct net_device *dev) link->open++; set_misc_reg(dev); - request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); + request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev); info->phy_id = info->eth_phy; info->link_status = 0x00; @@ -1022,7 +1022,7 @@ static int pcnet_close(struct net_device *dev) ei_close(dev); free_irq(dev->irq, dev); - + link->open--; netif_stop_queue(dev); del_timer_sync(&info->watchdog); @@ -1054,12 +1054,12 @@ static void pcnet_reset_8390(struct net_device *dev) udelay(100); } outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ - + if (i == 100) printk(KERN_ERR "%s: pcnet_reset_8390() did not complete.\n", dev->name); set_misc_reg(dev); - + } /* pcnet_reset_8390 */ /*====================================================================*/ @@ -1233,7 +1233,7 @@ static void dma_get_8390_hdr(struct net_device *dev, dev->name, ei_status.dmaing, ei_status.irqlock); return; } - + ei_status.dmaing |= 0x01; outb_p(E8390_NODMA+E8390_PAGE0+E8390_START, nic_base + PCNET_CMD); outb_p(sizeof(struct e8390_pkt_hdr), nic_base + EN0_RCNTLO); @@ -1458,7 +1458,7 @@ static void shmem_get_8390_hdr(struct net_device *dev, void __iomem *xfer_start = ei_status.mem + (TX_PAGES<<8) + (ring_page << 8) - (ei_status.rx_start_page << 8); - + copyin(hdr, xfer_start, sizeof(struct e8390_pkt_hdr)); /* Fix for big endian systems */ hdr->count = le16_to_cpu(hdr->count); @@ -1473,7 +1473,7 @@ static void shmem_block_input(struct net_device *dev, int count, unsigned long offset = (TX_PAGES<<8) + ring_offset - (ei_status.rx_start_page << 8); char *buf = skb->data; - + if (offset + count > ei_status.priv) { /* We must wrap the input move. */ int semi_count = ei_status.priv - offset; @@ -1541,7 +1541,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg, info->base = NULL; link->win = NULL; goto failed; } - + ei_status.mem = info->base + offset; ei_status.priv = req.Size; dev->mem_start = (u_long)ei_status.mem; @@ -1768,8 +1768,6 @@ static struct pcmcia_device_id pcnet_ids[] = { PCMCIA_DEVICE_CIS_PROD_ID12("NDC", "Ethernet", 0x01c43ae1, 0x00b2e941, "NE2K.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("PMX ", "PE-200", 0x34f3f1c8, 0x10b59f8c, "PE-200.cis"), PCMCIA_DEVICE_CIS_PROD_ID12("TAMARACK", "Ethernet", 0xcf434fba, 0x00b2e941, "tamarack.cis"), - PCMCIA_DEVICE_PROD_ID123("Fast Ethernet", "CF Size PC Card", "1.0", - 0xb4be14e3, 0x43ac239b, 0x0877b627), PCMCIA_DEVICE_NULL }; MODULE_DEVICE_TABLE(pcmcia, pcnet_ids); diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index a73d54553..e74bf5014 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c @@ -1883,7 +1883,7 @@ static void smc_reset(struct net_device *dev) /* Set the Window 1 control, configuration and station addr registers. No point in writing the I/O base register ;-> */ SMC_SELECT_BANK(1); - /* Automatically release successfully transmitted packets, + /* Automatically release succesfully transmitted packets, Accept link errors, counter and Tx error interrupts. */ outw(CTL_AUTO_RELEASE | CTL_TE_ENABLE | CTL_CR_ENABLE, ioaddr + CONTROL); diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 4122bb46f..71f45056a 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c @@ -345,7 +345,6 @@ typedef struct local_info_t { void __iomem *dingo_ccr; /* only used for CEM56 cards */ unsigned last_ptr_value; /* last packets transmitted value */ const char *manf_str; - struct work_struct tx_timeout_task; } local_info_t; /**************** @@ -353,7 +352,6 @@ typedef struct local_info_t { */ static int do_start_xmit(struct sk_buff *skb, struct net_device *dev); static void do_tx_timeout(struct net_device *dev); -static void xirc2ps_tx_timeout_task(void *data); static struct net_device_stats *do_get_stats(struct net_device *dev); static void set_addresses(struct net_device *dev); static void set_multicast_list(struct net_device *dev); @@ -591,7 +589,6 @@ xirc2ps_probe(struct pcmcia_device *link) #ifdef HAVE_TX_TIMEOUT dev->tx_timeout = do_tx_timeout; dev->watchdog_timeo = TX_TIMEOUT; - INIT_WORK(&local->tx_timeout_task, xirc2ps_tx_timeout_task, dev); #endif return xirc2ps_config(link); @@ -1344,24 +1341,17 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs) /*====================================================================*/ static void -xirc2ps_tx_timeout_task(void *data) +do_tx_timeout(struct net_device *dev) { - struct net_device *dev = data; + local_info_t *lp = netdev_priv(dev); + printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); + lp->stats.tx_errors++; /* reset the card */ do_reset(dev,1); dev->trans_start = jiffies; netif_wake_queue(dev); } -static void -do_tx_timeout(struct net_device *dev) -{ - local_info_t *lp = netdev_priv(dev); - lp->stats.tx_errors++; - printk(KERN_NOTICE "%s: transmit timed out\n", dev->name); - schedule_work(&lp->tx_timeout_task); -} - static int do_start_xmit(struct sk_buff *skb, struct net_device *dev) { @@ -1369,7 +1359,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev) kio_addr_t ioaddr = dev->base_addr; int okay; unsigned freespace; - unsigned pktlen = skb->len; + unsigned pktlen = skb? skb->len : 0; DEBUG(1, "do_start_xmit(skb=%p, dev=%p) len=%u\n", skb, dev, pktlen); @@ -1384,7 +1374,8 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev) */ if (pktlen < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; pktlen = ETH_ZLEN; } diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index d50bcb89d..fc08c4af5 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -58,15 +58,18 @@ static const char *const version = * PCI device identifiers for "new style" Linux PCI Device Drivers */ static struct pci_device_id pcnet32_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE_HOME), }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE), }, + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE_HOME, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, /* * Adapters that were sold with IBM's RS/6000 or pSeries hardware have * the incorrect vendor id. */ - { PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_AMD_LANCE), - .class = (PCI_CLASS_NETWORK_ETHERNET << 8), .class_mask = 0xffff00, }, + { PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_AMD_LANCE, + PCI_ANY_ID, PCI_ANY_ID, + PCI_CLASS_NETWORK_ETHERNET << 8, 0xffff00, 0}, { } /* terminate list */ }; @@ -185,25 +188,6 @@ static int homepna[MAX_UNITS]; #define PCNET32_TOTAL_SIZE 0x20 -#define CSR0 0 -#define CSR0_INIT 0x1 -#define CSR0_START 0x2 -#define CSR0_STOP 0x4 -#define CSR0_TXPOLL 0x8 -#define CSR0_INTEN 0x40 -#define CSR0_IDON 0x0100 -#define CSR0_NORMAL (CSR0_START | CSR0_INTEN) -#define PCNET32_INIT_LOW 1 -#define PCNET32_INIT_HIGH 2 -#define CSR3 3 -#define CSR4 4 -#define CSR5 5 -#define CSR5_SUSPEND 0x0001 -#define CSR15 15 -#define PCNET32_MC_FILTER 8 - -#define PCNET32_79C970A 0x2621 - /* The PCNET32 Rx and Tx ring descriptors. */ struct pcnet32_rx_head { u32 base; @@ -291,9 +275,9 @@ struct pcnet32_private { /* each bit indicates an available PHY */ u32 phymask; - unsigned short chip_version; /* which variant this is */ }; +static void pcnet32_probe_vlbus(void); static int pcnet32_probe_pci(struct pci_dev *, const struct pci_device_id *); static int pcnet32_probe1(unsigned long, int, struct pci_dev *); static int pcnet32_open(struct net_device *); @@ -325,6 +309,12 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name); static void pcnet32_free_ring(struct net_device *dev); static void pcnet32_check_media(struct net_device *dev, int verbose); +enum pci_flags_bit { + PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4, + PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 = + 0x10 << 2, PCI_ADDR3 = 0x10 << 3, +}; + static u16 pcnet32_wio_read_csr(unsigned long addr, int index) { outw(index, addr + PCNET32_WIO_RAP); @@ -435,238 +425,6 @@ static struct pcnet32_access pcnet32_dwio = { .reset = pcnet32_dwio_reset }; -static void pcnet32_netif_stop(struct net_device *dev) -{ - dev->trans_start = jiffies; - netif_poll_disable(dev); - netif_tx_disable(dev); -} - -static void pcnet32_netif_start(struct net_device *dev) -{ - netif_wake_queue(dev); - netif_poll_enable(dev); -} - -/* - * Allocate space for the new sized tx ring. - * Free old resources - * Save new resources. - * Any failure keeps old resources. - * Must be called with lp->lock held. - */ -static void pcnet32_realloc_tx_ring(struct net_device *dev, - struct pcnet32_private *lp, - unsigned int size) -{ - dma_addr_t new_ring_dma_addr; - dma_addr_t *new_dma_addr_list; - struct pcnet32_tx_head *new_tx_ring; - struct sk_buff **new_skb_list; - - pcnet32_purge_tx_ring(dev); - - new_tx_ring = pci_alloc_consistent(lp->pci_dev, - sizeof(struct pcnet32_tx_head) * - (1 << size), - &new_ring_dma_addr); - if (new_tx_ring == NULL) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Consistent memory allocation failed.\n", - dev->name); - return; - } - memset(new_tx_ring, 0, sizeof(struct pcnet32_tx_head) * (1 << size)); - - new_dma_addr_list = kcalloc((1 << size), sizeof(dma_addr_t), - GFP_ATOMIC); - if (!new_dma_addr_list) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Memory allocation failed.\n", dev->name); - goto free_new_tx_ring; - } - - new_skb_list = kcalloc((1 << size), sizeof(struct sk_buff *), - GFP_ATOMIC); - if (!new_skb_list) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Memory allocation failed.\n", dev->name); - goto free_new_lists; - } - - kfree(lp->tx_skbuff); - kfree(lp->tx_dma_addr); - pci_free_consistent(lp->pci_dev, - sizeof(struct pcnet32_tx_head) * - lp->tx_ring_size, lp->tx_ring, - lp->tx_ring_dma_addr); - - lp->tx_ring_size = (1 << size); - lp->tx_mod_mask = lp->tx_ring_size - 1; - lp->tx_len_bits = (size << 12); - lp->tx_ring = new_tx_ring; - lp->tx_ring_dma_addr = new_ring_dma_addr; - lp->tx_dma_addr = new_dma_addr_list; - lp->tx_skbuff = new_skb_list; - return; - - free_new_lists: - kfree(new_dma_addr_list); - free_new_tx_ring: - pci_free_consistent(lp->pci_dev, - sizeof(struct pcnet32_tx_head) * - (1 << size), - new_tx_ring, - new_ring_dma_addr); - return; -} - -/* - * Allocate space for the new sized rx ring. - * Re-use old receive buffers. - * alloc extra buffers - * free unneeded buffers - * free unneeded buffers - * Save new resources. - * Any failure keeps old resources. - * Must be called with lp->lock held. - */ -static void pcnet32_realloc_rx_ring(struct net_device *dev, - struct pcnet32_private *lp, - unsigned int size) -{ - dma_addr_t new_ring_dma_addr; - dma_addr_t *new_dma_addr_list; - struct pcnet32_rx_head *new_rx_ring; - struct sk_buff **new_skb_list; - int new, overlap; - - new_rx_ring = pci_alloc_consistent(lp->pci_dev, - sizeof(struct pcnet32_rx_head) * - (1 << size), - &new_ring_dma_addr); - if (new_rx_ring == NULL) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Consistent memory allocation failed.\n", - dev->name); - return; - } - memset(new_rx_ring, 0, sizeof(struct pcnet32_rx_head) * (1 << size)); - - new_dma_addr_list = kcalloc((1 << size), sizeof(dma_addr_t), - GFP_ATOMIC); - if (!new_dma_addr_list) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Memory allocation failed.\n", dev->name); - goto free_new_rx_ring; - } - - new_skb_list = kcalloc((1 << size), sizeof(struct sk_buff *), - GFP_ATOMIC); - if (!new_skb_list) { - if (netif_msg_drv(lp)) - printk("\n" KERN_ERR - "%s: Memory allocation failed.\n", dev->name); - goto free_new_lists; - } - - /* first copy the current receive buffers */ - overlap = min(size, lp->rx_ring_size); - for (new = 0; new < overlap; new++) { - new_rx_ring[new] = lp->rx_ring[new]; - new_dma_addr_list[new] = lp->rx_dma_addr[new]; - new_skb_list[new] = lp->rx_skbuff[new]; - } - /* now allocate any new buffers needed */ - for (; new < size; new++ ) { - struct sk_buff *rx_skbuff; - new_skb_list[new] = dev_alloc_skb(PKT_BUF_SZ); - if (!(rx_skbuff = new_skb_list[new])) { - /* keep the original lists and buffers */ - if (netif_msg_drv(lp)) - printk(KERN_ERR - "%s: pcnet32_realloc_rx_ring dev_alloc_skb failed.\n", - dev->name); - goto free_all_new; - } - skb_reserve(rx_skbuff, 2); - - new_dma_addr_list[new] = - pci_map_single(lp->pci_dev, rx_skbuff->data, - PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); - new_rx_ring[new].base = (u32) le32_to_cpu(new_dma_addr_list[new]); - new_rx_ring[new].buf_length = le16_to_cpu(2 - PKT_BUF_SZ); - new_rx_ring[new].status = le16_to_cpu(0x8000); - } - /* and free any unneeded buffers */ - for (; new < lp->rx_ring_size; new++) { - if (lp->rx_skbuff[new]) { - pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[new], - PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); - dev_kfree_skb(lp->rx_skbuff[new]); - } - } - - kfree(lp->rx_skbuff); - kfree(lp->rx_dma_addr); - pci_free_consistent(lp->pci_dev, - sizeof(struct pcnet32_rx_head) * - lp->rx_ring_size, lp->rx_ring, - lp->rx_ring_dma_addr); - - lp->rx_ring_size = (1 << size); - lp->rx_mod_mask = lp->rx_ring_size - 1; - lp->rx_len_bits = (size << 4); - lp->rx_ring = new_rx_ring; - lp->rx_ring_dma_addr = new_ring_dma_addr; - lp->rx_dma_addr = new_dma_addr_list; - lp->rx_skbuff = new_skb_list; - return; - - free_all_new: - for (; --new >= lp->rx_ring_size; ) { - if (new_skb_list[new]) { - pci_unmap_single(lp->pci_dev, new_dma_addr_list[new], - PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); - dev_kfree_skb(new_skb_list[new]); - } - } - kfree(new_skb_list); - free_new_lists: - kfree(new_dma_addr_list); - free_new_rx_ring: - pci_free_consistent(lp->pci_dev, - sizeof(struct pcnet32_rx_head) * - (1 << size), - new_rx_ring, - new_ring_dma_addr); - return; -} - -static void pcnet32_purge_rx_ring(struct net_device *dev) -{ - struct pcnet32_private *lp = dev->priv; - int i; - - /* free all allocated skbuffs */ - for (i = 0; i < lp->rx_ring_size; i++) { - lp->rx_ring[i].status = 0; /* CPU owns buffer */ - wmb(); /* Make sure adapter sees owner change */ - if (lp->rx_skbuff[i]) { - pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i], - PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); - dev_kfree_skb_any(lp->rx_skbuff[i]); - } - lp->rx_skbuff[i] = NULL; - lp->rx_dma_addr[i] = 0; - } -} - #ifdef CONFIG_NET_POLL_CONTROLLER static void pcnet32_poll_controller(struct net_device *dev) { @@ -727,11 +485,9 @@ static u32 pcnet32_get_link(struct net_device *dev) spin_lock_irqsave(&lp->lock, flags); if (lp->mii) { r = mii_link_ok(&lp->mii_if); - } else if (lp->chip_version >= PCNET32_79C970A) { + } else { ulong ioaddr = dev->base_addr; /* card base I/O address */ r = (lp->a.read_bcr(ioaddr, 4) != 0xc0); - } else { /* can not detect link on really old chips */ - r = 1; } spin_unlock_irqrestore(&lp->lock, flags); @@ -769,10 +525,10 @@ static void pcnet32_get_ringparam(struct net_device *dev, { struct pcnet32_private *lp = dev->priv; - ering->tx_max_pending = TX_MAX_RING_SIZE; - ering->tx_pending = lp->tx_ring_size; - ering->rx_max_pending = RX_MAX_RING_SIZE; - ering->rx_pending = lp->rx_ring_size; + ering->tx_max_pending = TX_MAX_RING_SIZE - 1; + ering->tx_pending = lp->tx_ring_size - 1; + ering->rx_max_pending = RX_MAX_RING_SIZE - 1; + ering->rx_pending = lp->rx_ring_size - 1; } static int pcnet32_set_ringparam(struct net_device *dev, @@ -780,53 +536,56 @@ static int pcnet32_set_ringparam(struct net_device *dev, { struct pcnet32_private *lp = dev->priv; unsigned long flags; - unsigned int size; - ulong ioaddr = dev->base_addr; int i; if (ering->rx_mini_pending || ering->rx_jumbo_pending) return -EINVAL; if (netif_running(dev)) - pcnet32_netif_stop(dev); + pcnet32_close(dev); spin_lock_irqsave(&lp->lock, flags); - lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); /* stop the chip */ - - size = min(ering->tx_pending, (unsigned int)TX_MAX_RING_SIZE); + pcnet32_free_ring(dev); + lp->tx_ring_size = + min(ering->tx_pending, (unsigned int)TX_MAX_RING_SIZE); + lp->rx_ring_size = + min(ering->rx_pending, (unsigned int)RX_MAX_RING_SIZE); /* set the minimum ring size to 4, to allow the loopback test to work * unchanged. */ for (i = 2; i <= PCNET32_LOG_MAX_TX_BUFFERS; i++) { - if (size <= (1 << i)) + if (lp->tx_ring_size <= (1 << i)) break; } - if ((1 << i) != lp->tx_ring_size) - pcnet32_realloc_tx_ring(dev, lp, i); - - size = min(ering->rx_pending, (unsigned int)RX_MAX_RING_SIZE); + lp->tx_ring_size = (1 << i); + lp->tx_mod_mask = lp->tx_ring_size - 1; + lp->tx_len_bits = (i << 12); + for (i = 2; i <= PCNET32_LOG_MAX_RX_BUFFERS; i++) { - if (size <= (1 << i)) + if (lp->rx_ring_size <= (1 << i)) break; } - if ((1 << i) != lp->rx_ring_size) - pcnet32_realloc_rx_ring(dev, lp, i); - - dev->weight = lp->rx_ring_size / 2; + lp->rx_ring_size = (1 << i); + lp->rx_mod_mask = lp->rx_ring_size - 1; + lp->rx_len_bits = (i << 4); - if (netif_running(dev)) { - pcnet32_netif_start(dev); - pcnet32_restart(dev, CSR0_NORMAL); + if (pcnet32_alloc_ring(dev, dev->name)) { + pcnet32_free_ring(dev); + spin_unlock_irqrestore(&lp->lock, flags); + return -ENOMEM; } spin_unlock_irqrestore(&lp->lock, flags); - if (netif_msg_drv(lp)) - printk(KERN_INFO + if (pcnet32_debug & NETIF_MSG_DRV) + printk(KERN_INFO PFX "%s: Ring Param Settings: RX: %d, TX: %d\n", dev->name, lp->rx_ring_size, lp->tx_ring_size); + if (netif_running(dev)) + pcnet32_open(dev); + return 0; } @@ -880,27 +639,29 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) unsigned long flags; unsigned long ticks; + *data1 = 1; /* status of test, default to fail */ rc = 1; /* default to fail */ if (netif_running(dev)) pcnet32_close(dev); spin_lock_irqsave(&lp->lock, flags); - lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); /* stop the chip */ - - numbuffs = min(numbuffs, (int)min(lp->rx_ring_size, lp->tx_ring_size)); /* Reset the PCNET32 */ lp->a.reset(ioaddr); - lp->a.write_csr(ioaddr, CSR4, 0x0915); /* switch pcnet32 to 32bit mode */ lp->a.write_bcr(ioaddr, 20, 2); + lp->init_block.mode = + le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7); + lp->init_block.filter[0] = 0; + lp->init_block.filter[1] = 0; + /* purge & init rings but don't actually restart */ pcnet32_restart(dev, 0x0000); - lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); /* Set STOP bit */ + lp->a.write_csr(ioaddr, 0, 0x0004); /* Set STOP bit */ /* Initialize Transmit buffers. */ size = data_len + 15; @@ -942,15 +703,14 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) } } - x = a->read_bcr(ioaddr, 32); /* set internal loopback in BCR32 */ - a->write_bcr(ioaddr, 32, x | 0x0002); + x = a->read_bcr(ioaddr, 32); /* set internal loopback in BSR32 */ + x = x | 0x0002; + a->write_bcr(ioaddr, 32, x); - /* set int loopback in CSR15 */ - x = a->read_csr(ioaddr, CSR15) & 0xfffc; - lp->a.write_csr(ioaddr, CSR15, x | 0x0044); + lp->a.write_csr(ioaddr, 15, 0x0044); /* set int loopback in CSR15 */ teststatus = le16_to_cpu(0x8000); - lp->a.write_csr(ioaddr, CSR0, CSR0_START); /* Set STRT bit */ + lp->a.write_csr(ioaddr, 0, 0x0002); /* Set STRT bit */ /* Check status of descriptors */ for (x = 0; x < numbuffs; x++) { @@ -958,7 +718,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) rmb(); while ((lp->rx_ring[x].status & teststatus) && (ticks < 200)) { spin_unlock_irqrestore(&lp->lock, flags); - msleep(1); + mdelay(1); spin_lock_irqsave(&lp->lock, flags); rmb(); ticks++; @@ -971,7 +731,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) } } - lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); /* Set STOP bit */ + lp->a.write_csr(ioaddr, 0, 0x0004); /* Set STOP bit */ wmb(); if (netif_msg_hw(lp) && netif_msg_pktdata(lp)) { printk(KERN_DEBUG "%s: RX loopback packets:\n", dev->name); @@ -1004,24 +764,25 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t * data1) } x++; } + if (!rc) { + *data1 = 0; + } clean_up: - *data1 = rc; pcnet32_purge_tx_ring(dev); - - x = a->read_csr(ioaddr, CSR15); - a->write_csr(ioaddr, CSR15, (x & ~0x0044)); /* reset bits 6 and 2 */ + x = a->read_csr(ioaddr, 15) & 0xFFFF; + a->write_csr(ioaddr, 15, (x & ~0x0044)); /* reset bits 6 and 2 */ x = a->read_bcr(ioaddr, 32); /* reset internal loopback */ - a->write_bcr(ioaddr, 32, (x & ~0x0002)); + x = x & ~0x0002; + a->write_bcr(ioaddr, 32, x); + + spin_unlock_irqrestore(&lp->lock, flags); if (netif_running(dev)) { - spin_unlock_irqrestore(&lp->lock, flags); pcnet32_open(dev); } else { - pcnet32_purge_rx_ring(dev); lp->a.write_bcr(ioaddr, 20, 4); /* return to 16bit mode */ - spin_unlock_irqrestore(&lp->lock, flags); } return (rc); @@ -1084,47 +845,6 @@ static int pcnet32_phys_id(struct net_device *dev, u32 data) return 0; } -/* - * lp->lock must be held. - */ -static int pcnet32_suspend(struct net_device *dev, unsigned long *flags, - int can_sleep) -{ - int csr5; - struct pcnet32_private *lp = dev->priv; - struct pcnet32_access *a = &lp->a; - ulong ioaddr = dev->base_addr; - int ticks; - - /* really old chips have to be stopped. */ - if (lp->chip_version < PCNET32_79C970A) - return 0; - - /* set SUSPEND (SPND) - CSR5 bit 0 */ - csr5 = a->read_csr(ioaddr, CSR5); - a->write_csr(ioaddr, CSR5, csr5 | CSR5_SUSPEND); - - /* poll waiting for bit to be set */ - ticks = 0; - while (!(a->read_csr(ioaddr, CSR5) & CSR5_SUSPEND)) { - spin_unlock_irqrestore(&lp->lock, *flags); - if (can_sleep) - msleep(1); - else - mdelay(1); - spin_lock_irqsave(&lp->lock, *flags); - ticks++; - if (ticks > 200) { - if (netif_msg_hw(lp)) - printk(KERN_DEBUG - "%s: Error getting into suspend!\n", - dev->name); - return 0; - } - } - return 1; -} - #define PCNET32_REGS_PER_PHY 32 #define PCNET32_MAX_PHYS 32 static int pcnet32_get_regs_len(struct net_device *dev) @@ -1143,13 +863,32 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs, struct pcnet32_private *lp = dev->priv; struct pcnet32_access *a = &lp->a; ulong ioaddr = dev->base_addr; + int ticks; unsigned long flags; spin_lock_irqsave(&lp->lock, flags); - csr0 = a->read_csr(ioaddr, CSR0); - if (!(csr0 & CSR0_STOP)) /* If not stopped */ - pcnet32_suspend(dev, &flags, 1); + csr0 = a->read_csr(ioaddr, 0); + if (!(csr0 & 0x0004)) { /* If not stopped */ + /* set SUSPEND (SPND) - CSR5 bit 0 */ + a->write_csr(ioaddr, 5, 0x0001); + + /* poll waiting for bit to be set */ + ticks = 0; + while (!(a->read_csr(ioaddr, 5) & 0x0001)) { + spin_unlock_irqrestore(&lp->lock, flags); + mdelay(1); + spin_lock_irqsave(&lp->lock, flags); + ticks++; + if (ticks > 200) { + if (netif_msg_hw(lp)) + printk(KERN_DEBUG + "%s: Error getting into suspend!\n", + dev->name); + break; + } + } + } /* read address PROM */ for (i = 0; i < 16; i += 2) @@ -1186,12 +925,9 @@ static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs, } } - if (!(csr0 & CSR0_STOP)) { /* If not stopped */ - int csr5; - + if (!(csr0 & 0x0004)) { /* If not stopped */ /* clear SUSPEND (SPND) - CSR5 bit 0 */ - csr5 = a->read_csr(ioaddr, CSR5); - a->write_csr(ioaddr, CSR5, csr5 & (~CSR5_SUSPEND)); + a->write_csr(ioaddr, 5, 0x0000); } spin_unlock_irqrestore(&lp->lock, flags); @@ -1222,7 +958,7 @@ static struct ethtool_ops pcnet32_ethtool_ops = { /* only probes for non-PCI devices, the rest are handled by * pci_register_driver via pcnet32_probe_pci */ -static void __devinit pcnet32_probe_vlbus(unsigned int *pcnet32_portlist) +static void __devinit pcnet32_probe_vlbus(void) { unsigned int *port, ioaddr; @@ -1538,7 +1274,6 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) lp->mii_if.reg_num_mask = 0x1f; lp->dxsuflo = dxsuflo; lp->mii = mii; - lp->chip_version = chip_version; lp->msg_enable = pcnet32_debug; if ((cards_found >= MAX_UNITS) || (options[cards_found] > sizeof(options_mapping))) @@ -1707,7 +1442,7 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name) lp->tx_ring_size, &lp->tx_ring_dma_addr); if (lp->tx_ring == NULL) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Consistent memory allocation failed.\n", name); @@ -1719,48 +1454,52 @@ static int pcnet32_alloc_ring(struct net_device *dev, char *name) lp->rx_ring_size, &lp->rx_ring_dma_addr); if (lp->rx_ring == NULL) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Consistent memory allocation failed.\n", name); return -ENOMEM; } - lp->tx_dma_addr = kcalloc(lp->tx_ring_size, sizeof(dma_addr_t), + lp->tx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->tx_ring_size, GFP_ATOMIC); if (!lp->tx_dma_addr) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name); return -ENOMEM; } + memset(lp->tx_dma_addr, 0, sizeof(dma_addr_t) * lp->tx_ring_size); - lp->rx_dma_addr = kcalloc(lp->rx_ring_size, sizeof(dma_addr_t), + lp->rx_dma_addr = kmalloc(sizeof(dma_addr_t) * lp->rx_ring_size, GFP_ATOMIC); if (!lp->rx_dma_addr) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name); return -ENOMEM; } + memset(lp->rx_dma_addr, 0, sizeof(dma_addr_t) * lp->rx_ring_size); - lp->tx_skbuff = kcalloc(lp->tx_ring_size, sizeof(struct sk_buff *), + lp->tx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->tx_ring_size, GFP_ATOMIC); if (!lp->tx_skbuff) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name); return -ENOMEM; } + memset(lp->tx_skbuff, 0, sizeof(struct sk_buff *) * lp->tx_ring_size); - lp->rx_skbuff = kcalloc(lp->rx_ring_size, sizeof(struct sk_buff *), + lp->rx_skbuff = kmalloc(sizeof(struct sk_buff *) * lp->rx_ring_size, GFP_ATOMIC); if (!lp->rx_skbuff) { - if (netif_msg_drv(lp)) + if (pcnet32_debug & NETIF_MSG_DRV) printk("\n" KERN_ERR PFX "%s: Memory allocation failed.\n", name); return -ENOMEM; } + memset(lp->rx_skbuff, 0, sizeof(struct sk_buff *) * lp->rx_ring_size); return 0; } @@ -1808,7 +1547,7 @@ static int pcnet32_open(struct net_device *dev) unsigned long flags; if (request_irq(dev->irq, &pcnet32_interrupt, - lp->shared_irq ? IRQF_SHARED : 0, dev->name, + lp->shared_irq ? SA_SHIRQ : 0, dev->name, (void *)dev)) { return -EAGAIN; } @@ -1849,7 +1588,10 @@ static int pcnet32_open(struct net_device *dev) val |= 2; } else if (lp->options & PCNET32_PORT_ASEL) { /* workaround of xSeries250, turn on for 79C975 only */ - if (lp->chip_version == 0x2627) + i = ((lp->a.read_csr(ioaddr, 88) | + (lp->a. + read_csr(ioaddr, 89) << 16)) >> 12) & 0xffff; + if (i == 0x2627) val |= 3; } lp->a.write_bcr(ioaddr, 9, val); @@ -1993,11 +1735,9 @@ static int pcnet32_open(struct net_device *dev) netif_start_queue(dev); - if (lp->chip_version >= PCNET32_79C970A) { - /* Print the link status and start the watchdog */ - pcnet32_check_media(dev, 1); - mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); - } + /* Print the link status and start the watchdog */ + pcnet32_check_media(dev, 1); + mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); i = 0; while (i++ < 100) @@ -2023,7 +1763,16 @@ static int pcnet32_open(struct net_device *dev) err_free_ring: /* free any allocated skbuffs */ - pcnet32_purge_rx_ring(dev); + for (i = 0; i < lp->rx_ring_size; i++) { + lp->rx_ring[i].status = 0; + if (lp->rx_skbuff[i]) { + pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i], + PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); + dev_kfree_skb(lp->rx_skbuff[i]); + } + lp->rx_skbuff[i] = NULL; + lp->rx_dma_addr[i] = 0; + } /* * Switch back to 16bit mode to avoid problems with dumb @@ -2605,6 +2354,7 @@ static int pcnet32_close(struct net_device *dev) { unsigned long ioaddr = dev->base_addr; struct pcnet32_private *lp = dev->priv; + int i; unsigned long flags; del_timer_sync(&lp->watchdog_timer); @@ -2635,8 +2385,31 @@ static int pcnet32_close(struct net_device *dev) spin_lock_irqsave(&lp->lock, flags); - pcnet32_purge_rx_ring(dev); - pcnet32_purge_tx_ring(dev); + /* free all allocated skbuffs */ + for (i = 0; i < lp->rx_ring_size; i++) { + lp->rx_ring[i].status = 0; + wmb(); /* Make sure adapter sees owner change */ + if (lp->rx_skbuff[i]) { + pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i], + PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); + dev_kfree_skb(lp->rx_skbuff[i]); + } + lp->rx_skbuff[i] = NULL; + lp->rx_dma_addr[i] = 0; + } + + for (i = 0; i < lp->tx_ring_size; i++) { + lp->tx_ring[i].status = 0; /* CPU owns buffer */ + wmb(); /* Make sure adapter sees owner change */ + if (lp->tx_skbuff[i]) { + pci_unmap_single(lp->pci_dev, lp->tx_dma_addr[i], + lp->tx_skbuff[i]->len, + PCI_DMA_TODEVICE); + dev_kfree_skb(lp->tx_skbuff[i]); + } + lp->tx_skbuff[i] = NULL; + lp->tx_dma_addr[i] = 0; + } spin_unlock_irqrestore(&lp->lock, flags); @@ -2666,7 +2439,6 @@ static void pcnet32_load_multicast(struct net_device *dev) volatile struct pcnet32_init_block *ib = &lp->init_block; volatile u16 *mcast_table = (u16 *) & ib->filter; struct dev_mc_list *dmi = dev->mc_list; - unsigned long ioaddr = dev->base_addr; char *addrs; int i; u32 crc; @@ -2675,10 +2447,6 @@ static void pcnet32_load_multicast(struct net_device *dev) if (dev->flags & IFF_ALLMULTI) { ib->filter[0] = 0xffffffff; ib->filter[1] = 0xffffffff; - lp->a.write_csr(ioaddr, PCNET32_MC_FILTER, 0xffff); - lp->a.write_csr(ioaddr, PCNET32_MC_FILTER+1, 0xffff); - lp->a.write_csr(ioaddr, PCNET32_MC_FILTER+2, 0xffff); - lp->a.write_csr(ioaddr, PCNET32_MC_FILTER+3, 0xffff); return; } /* clear the multicast filter */ @@ -2700,9 +2468,6 @@ static void pcnet32_load_multicast(struct net_device *dev) le16_to_cpu(le16_to_cpu(mcast_table[crc >> 4]) | (1 << (crc & 0xf))); } - for (i = 0; i < 4; i++) - lp->a.write_csr(ioaddr, PCNET32_MC_FILTER + i, - le16_to_cpu(mcast_table[i])); return; } @@ -2713,11 +2478,8 @@ static void pcnet32_set_multicast_list(struct net_device *dev) { unsigned long ioaddr = dev->base_addr, flags; struct pcnet32_private *lp = dev->priv; - int csr15, suspended; spin_lock_irqsave(&lp->lock, flags); - suspended = pcnet32_suspend(dev, &flags, 0); - csr15 = lp->a.read_csr(ioaddr, CSR15); if (dev->flags & IFF_PROMISC) { /* Log any net taps. */ if (netif_msg_hw(lp)) @@ -2726,24 +2488,15 @@ static void pcnet32_set_multicast_list(struct net_device *dev) lp->init_block.mode = le16_to_cpu(0x8000 | (lp->options & PCNET32_PORT_PORTSEL) << 7); - lp->a.write_csr(ioaddr, CSR15, csr15 | 0x8000); } else { lp->init_block.mode = le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7); - lp->a.write_csr(ioaddr, CSR15, csr15 & 0x7fff); pcnet32_load_multicast(dev); } - if (suspended) { - int csr5; - /* clear SUSPEND (SPND) - CSR5 bit 0 */ - csr5 = lp->a.read_csr(ioaddr, CSR5); - lp->a.write_csr(ioaddr, CSR5, csr5 & (~CSR5_SUSPEND)); - } else { - lp->a.write_csr(ioaddr, CSR0, CSR0_STOP); - pcnet32_restart(dev, CSR0_NORMAL); - netif_wake_queue(dev); - } + lp->a.write_csr(ioaddr, 0, 0x0004); /* Temporarily stop the lance. */ + pcnet32_restart(dev, 0x0042); /* Resume normal operation */ + netif_wake_queue(dev); spin_unlock_irqrestore(&lp->lock, flags); } @@ -2983,7 +2736,7 @@ static int __init pcnet32_init_module(void) /* should we find any remaining VLbus devices ? */ if (pcnet32vlb) - pcnet32_probe_vlbus(pcnet32_portlist); + pcnet32_probe_vlbus(); if (cards_found && (pcnet32_debug & NETIF_MSG_PROBE)) printk(KERN_INFO PFX "%d cards_found.\n", cards_found); diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index b79ec0d74..fa39b944b 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -44,34 +44,6 @@ config CICADA_PHY depends on PHYLIB ---help--- Currently supports the cis8204 -config VITESSE_PHY - tristate "Drivers for the Vitesse PHYs" - depends on PHYLIB - ---help--- - Currently supports the vsc8244 - -config SMSC_PHY - tristate "Drivers for SMSC PHYs" - depends on PHYLIB - ---help--- - Currently supports the LAN83C185 PHY - -config FIXED_PHY - tristate "Drivers for PHY emulation on fixed speed/link" - depends on PHYLIB - ---help--- - Adds the driver to PHY layer to cover the boards that do not have any PHY bound, - but with the ability to manipulate with speed/link in software. The relavant MII - speed/duplex parameters could be effectively handled in user-specified fuction. - Currently tested with mpc866ads. - -config FIXED_MII_10_FDX - bool "Emulation for 10M Fdx fixed PHY behavior" - depends on FIXED_PHY - -config FIXED_MII_100_FDX - bool "Emulation for 100M Fdx fixed PHY behavior" - depends on FIXED_PHY endmenu diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 320f83231..e4116a5fb 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -8,6 +8,3 @@ obj-$(CONFIG_DAVICOM_PHY) += davicom.o obj-$(CONFIG_CICADA_PHY) += cicada.o obj-$(CONFIG_LXT_PHY) += lxt.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o -obj-$(CONFIG_SMSC_PHY) += smsc.o -obj-$(CONFIG_VITESSE_PHY) += vitesse.o -obj-$(CONFIG_FIXED_PHY) += fixed.o diff --git a/drivers/net/phy/cicada.c b/drivers/net/phy/cicada.c index ae60e6e41..7d8d53425 100644 --- a/drivers/net/phy/cicada.c +++ b/drivers/net/phy/cicada.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include @@ -103,22 +104,7 @@ static int cis820x_config_intr(struct phy_device *phydev) return err; } -/* Cicada 8201, a.k.a Vitesse VSC8201 */ -static struct phy_driver cis8201_driver = { - .phy_id = 0x000fc410, - .name = "Cicada Cis8201", - .phy_id_mask = 0x000ffff0, - .features = PHY_GBIT_FEATURES, - .flags = PHY_HAS_INTERRUPT, - .config_init = &cis820x_config_init, - .config_aneg = &genphy_config_aneg, - .read_status = &genphy_read_status, - .ack_interrupt = &cis820x_ack_interrupt, - .config_intr = &cis820x_config_intr, - .driver = { .owner = THIS_MODULE,}, -}; - -/* Cicada 8204 */ +/* Cicada 820x */ static struct phy_driver cis8204_driver = { .phy_id = 0x000fc440, .name = "Cicada Cis8204", @@ -133,30 +119,15 @@ static struct phy_driver cis8204_driver = { .driver = { .owner = THIS_MODULE,}, }; -static int __init cicada_init(void) +static int __init cis8204_init(void) { - int ret; - - ret = phy_driver_register(&cis8204_driver); - if (ret) - goto err1; - - ret = phy_driver_register(&cis8201_driver); - if (ret) - goto err2; - return 0; - -err2: - phy_driver_unregister(&cis8204_driver); -err1: - return ret; + return phy_driver_register(&cis8204_driver); } -static void __exit cicada_exit(void) +static void __exit cis8204_exit(void) { phy_driver_unregister(&cis8204_driver); - phy_driver_unregister(&cis8201_driver); } -module_init(cicada_init); -module_exit(cicada_exit); +module_init(cis8204_init); +module_exit(cis8204_exit); diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index aa7983f55..5e9002e44 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c deleted file mode 100644 index 7e3364f55..000000000 --- a/drivers/net/phy/fixed.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * drivers/net/phy/fixed.c - * - * Driver for fixed PHYs, when transceiver is able to operate in one fixed mode. - * - * Author: Vitaly Bordug - * - * Copyright (c) 2006 MontaVista Software, 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. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define MII_REGS_NUM 7 - -/* - The idea is to emulate normal phy behavior by responding with - pre-defined values to mii BMCR read, so that read_status hook could - take all the needed info. -*/ - -struct fixed_phy_status { - u8 link; - u16 speed; - u8 duplex; -}; - -/*----------------------------------------------------------------------------- - * Private information hoder for mii_bus - *-----------------------------------------------------------------------------*/ -struct fixed_info { - u16 *regs; - u8 regs_num; - struct fixed_phy_status phy_status; - struct phy_device *phydev; /* pointer to the container */ - /* link & speed cb */ - int(*link_update)(struct net_device*, struct fixed_phy_status*); - -}; - -/*----------------------------------------------------------------------------- - * If something weird is required to be done with link/speed, - * network driver is able to assign a function to implement this. - * May be useful for PHY's that need to be software-driven. - *-----------------------------------------------------------------------------*/ -int fixed_mdio_set_link_update(struct phy_device* phydev, - int(*link_update)(struct net_device*, struct fixed_phy_status*)) -{ - struct fixed_info *fixed; - - if(link_update == NULL) - return -EINVAL; - - if(phydev) { - if(phydev->bus) { - fixed = phydev->bus->priv; - fixed->link_update = link_update; - return 0; - } - } - return -EINVAL; -} -EXPORT_SYMBOL(fixed_mdio_set_link_update); - -/*----------------------------------------------------------------------------- - * This is used for updating internal mii regs from the status - *-----------------------------------------------------------------------------*/ -static int fixed_mdio_update_regs(struct fixed_info *fixed) -{ - u16 *regs = fixed->regs; - u16 bmsr = 0; - u16 bmcr = 0; - - if(!regs) { - printk(KERN_ERR "%s: regs not set up", __FUNCTION__); - return -EINVAL; - } - - if(fixed->phy_status.link) - bmsr |= BMSR_LSTATUS; - - if(fixed->phy_status.duplex) { - bmcr |= BMCR_FULLDPLX; - - switch ( fixed->phy_status.speed ) { - case 100: - bmsr |= BMSR_100FULL; - bmcr |= BMCR_SPEED100; - break; - - case 10: - bmsr |= BMSR_10FULL; - break; - } - } else { - switch ( fixed->phy_status.speed ) { - case 100: - bmsr |= BMSR_100HALF; - bmcr |= BMCR_SPEED100; - break; - - case 10: - bmsr |= BMSR_100HALF; - break; - } - } - - regs[MII_BMCR] = bmcr; - regs[MII_BMSR] = bmsr | 0x800; /*we are always capable of 10 hdx*/ - - return 0; -} - -static int fixed_mii_read(struct mii_bus *bus, int phy_id, int location) -{ - struct fixed_info *fixed = bus->priv; - - /* if user has registered link update callback, use it */ - if(fixed->phydev) - if(fixed->phydev->attached_dev) { - if(fixed->link_update) { - fixed->link_update(fixed->phydev->attached_dev, - &fixed->phy_status); - fixed_mdio_update_regs(fixed); - } - } - - if ((unsigned int)location >= fixed->regs_num) - return -1; - return fixed->regs[location]; -} - -static int fixed_mii_write(struct mii_bus *bus, int phy_id, int location, u16 val) -{ - /* do nothing for now*/ - return 0; -} - -static int fixed_mii_reset(struct mii_bus *bus) -{ - /*nothing here - no way/need to reset it*/ - return 0; -} - -static int fixed_config_aneg(struct phy_device *phydev) -{ - /* :TODO:03/13/2006 09:45:37 PM:: - The full autoneg funcionality can be emulated, - but no need to have anything here for now - */ - return 0; -} - -/*----------------------------------------------------------------------------- - * the manual bind will do the magic - with phy_id_mask == 0 - * match will never return true... - *-----------------------------------------------------------------------------*/ -static struct phy_driver fixed_mdio_driver = { - .name = "Fixed PHY", - .features = PHY_BASIC_FEATURES, - .config_aneg = fixed_config_aneg, - .read_status = genphy_read_status, - .driver = { .owner = THIS_MODULE,}, -}; - -/*----------------------------------------------------------------------------- - * This func is used to create all the necessary stuff, bind - * the fixed phy driver and register all it on the mdio_bus_type. - * speed is either 10 or 100, duplex is boolean. - * number is used to create multiple fixed PHYs, so that several devices can - * utilize them simultaneously. - *-----------------------------------------------------------------------------*/ -static int fixed_mdio_register_device(int number, int speed, int duplex) -{ - struct mii_bus *new_bus; - struct fixed_info *fixed; - struct phy_device *phydev; - int err = 0; - - struct device* dev = kzalloc(sizeof(struct device), GFP_KERNEL); - - if (NULL == dev) - return -ENOMEM; - - new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); - - if (NULL == new_bus) { - kfree(dev); - return -ENOMEM; - } - fixed = kzalloc(sizeof(struct fixed_info), GFP_KERNEL); - - if (NULL == fixed) { - kfree(dev); - kfree(new_bus); - return -ENOMEM; - } - - fixed->regs = kzalloc(MII_REGS_NUM*sizeof(int), GFP_KERNEL); - fixed->regs_num = MII_REGS_NUM; - fixed->phy_status.speed = speed; - fixed->phy_status.duplex = duplex; - fixed->phy_status.link = 1; - - new_bus->name = "Fixed MII Bus", - new_bus->read = &fixed_mii_read, - new_bus->write = &fixed_mii_write, - new_bus->reset = &fixed_mii_reset, - - /*set up workspace*/ - fixed_mdio_update_regs(fixed); - new_bus->priv = fixed; - - new_bus->dev = dev; - dev_set_drvdata(dev, new_bus); - - /* create phy_device and register it on the mdio bus */ - phydev = phy_device_create(new_bus, 0, 0); - - /* - Put the phydev pointer into the fixed pack so that bus read/write code could - be able to access for instance attached netdev. Well it doesn't have to do - so, only in case of utilizing user-specified link-update... - */ - fixed->phydev = phydev; - - if(NULL == phydev) { - err = -ENOMEM; - goto device_create_fail; - } - - phydev->irq = -1; - phydev->dev.bus = &mdio_bus_type; - - if(number) - snprintf(phydev->dev.bus_id, BUS_ID_SIZE, - "fixed_%d@%d:%d", number, speed, duplex); - else - snprintf(phydev->dev.bus_id, BUS_ID_SIZE, - "fixed@%d:%d", speed, duplex); - phydev->bus = new_bus; - - err = device_register(&phydev->dev); - if(err) { - printk(KERN_ERR "Phy %s failed to register\n", - phydev->dev.bus_id); - goto bus_register_fail; - } - - /* - the mdio bus has phy_id match... In order not to do it - artificially, we are binding the driver here by hand; - it will be the same for all the fixed phys anyway. - */ - down_write(&phydev->dev.bus->subsys.rwsem); - - phydev->dev.driver = &fixed_mdio_driver.driver; - - err = phydev->dev.driver->probe(&phydev->dev); - if(err < 0) { - printk(KERN_ERR "Phy %s: problems with fixed driver\n",phydev->dev.bus_id); - up_write(&phydev->dev.bus->subsys.rwsem); - goto probe_fail; - } - - device_bind_driver(&phydev->dev); - up_write(&phydev->dev.bus->subsys.rwsem); - - return 0; - -probe_fail: - device_unregister(&phydev->dev); -bus_register_fail: - kfree(phydev); -device_create_fail: - kfree(dev); - kfree(new_bus); - kfree(fixed); - - return err; -} - - -MODULE_DESCRIPTION("Fixed PHY device & driver for PAL"); -MODULE_AUTHOR("Vitaly Bordug"); -MODULE_LICENSE("GPL"); - -static int __init fixed_init(void) -{ - int ret; - int duplex = 0; - - /* register on the bus... Not expected to be matched with anything there... */ - phy_driver_register(&fixed_mdio_driver); - - /* So let the fun begin... - We will create several mdio devices here, and will bound the upper - driver to them. - - Then the external software can lookup the phy bus by searching - fixed@speed:duplex, e.g. fixed@100:1, to be connected to the - virtual 100M Fdx phy. - - In case several virtual PHYs required, the bus_id will be in form - fixed_@:, which make it able even to define - driver-specific link control callback, if for instance PHY is completely - SW-driven. - - */ - -#ifdef CONFIG_FIXED_MII_DUPLEX - duplex = 1; -#endif - -#ifdef CONFIG_FIXED_MII_100_FDX - fixed_mdio_register_device(0, 100, 1); -#endif - -#ifdef CONFIX_FIXED_MII_10_FDX - fixed_mdio_register_device(0, 10, 1); -#endif - return 0; -} - -static void __exit fixed_exit(void) -{ - phy_driver_unregister(&fixed_mdio_driver); - /* :WARNING:02/18/2006 04:32:40 AM:: Cleanup all the created stuff */ -} - -module_init(fixed_init); -module_exit(fixed_exit); diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 69d2325f8..bef79e454 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include @@ -122,9 +123,9 @@ static int lxt971_config_intr(struct phy_device *phydev) } static struct phy_driver lxt970_driver = { - .phy_id = 0x78100000, + .phy_id = 0x07810000, .name = "LXT970", - .phy_id_mask = 0xfffffff0, + .phy_id_mask = 0x0fffffff, .features = PHY_BASIC_FEATURES, .flags = PHY_HAS_INTERRUPT, .config_init = lxt970_config_init, @@ -136,9 +137,9 @@ static struct phy_driver lxt970_driver = { }; static struct phy_driver lxt971_driver = { - .phy_id = 0x001378e0, + .phy_id = 0x0001378e, .name = "LXT971", - .phy_id_mask = 0xfffffff0, + .phy_id_mask = 0x0fffffff, .features = PHY_BASIC_FEATURES, .flags = PHY_HAS_INTERRUPT, .config_aneg = genphy_config_aneg, diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 0ad253282..a2d6386d1 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index cf6660c93..1b236bdf6 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include @@ -159,7 +160,6 @@ struct bus_type mdio_bus_type = { .suspend = mdio_bus_suspend, .resume = mdio_bus_resume, }; -EXPORT_SYMBOL(mdio_bus_type); int __init mdio_bus_init(void) { diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index f5aad7728..33cec2dab 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -14,6 +14,7 @@ * option) any later version. * */ +#include #include #include #include @@ -419,8 +420,9 @@ void phy_start_machine(struct phy_device *phydev, /* phy_stop_machine * - * description: Stops the state machine timer, sets the state to UP - * (unless it wasn't up yet). This function must be called BEFORE + * description: Stops the state machine timer, sets the state to + * UP (unless it wasn't up yet), and then frees the interrupt, + * if it is in use. This function must be called BEFORE * phy_detach. */ void phy_stop_machine(struct phy_device *phydev) @@ -432,6 +434,9 @@ void phy_stop_machine(struct phy_device *phydev) phydev->state = PHY_UP; spin_unlock(&phydev->lock); + if (phydev->irq != PHY_POLL) + phy_stop_interrupts(phydev); + phydev->adjust_state = NULL; } @@ -552,7 +557,7 @@ int phy_start_interrupts(struct phy_device *phydev) INIT_WORK(&phydev->phy_queue, phy_change, phydev); if (request_irq(phydev->irq, phy_interrupt, - IRQF_SHARED, + SA_SHIRQ, "phy_interrupt", phydev) < 0) { printk(KERN_WARNING "%s: Can't get IRQ %d (PHY)\n", diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 2d1ecfdc8..7da0e3dd5 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -14,6 +14,7 @@ * option) any later version. * */ +#include #include #include #include @@ -45,35 +46,6 @@ static struct phy_driver genphy_driver; extern int mdio_bus_init(void); extern void mdio_bus_exit(void); -struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id) -{ - struct phy_device *dev; - /* We allocate the device, and initialize the - * default values */ - dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); - - if (NULL == dev) - return (struct phy_device*) PTR_ERR((void*)-ENOMEM); - - dev->speed = 0; - dev->duplex = -1; - dev->pause = dev->asym_pause = 0; - dev->link = 1; - - dev->autoneg = AUTONEG_ENABLE; - - dev->addr = addr; - dev->phy_id = phy_id; - dev->bus = bus; - - dev->state = PHY_DOWN; - - spin_lock_init(&dev->lock); - - return dev; -} -EXPORT_SYMBOL(phy_device_create); - /* get_phy_device * * description: Reads the ID registers of the PHY at addr on the @@ -107,7 +79,27 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr) if (0xffffffff == phy_id) return NULL; - dev = phy_device_create(bus, addr, phy_id); + /* Otherwise, we allocate the device, and initialize the + * default values */ + dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); + + if (NULL == dev) + return ERR_PTR(-ENOMEM); + + dev->speed = 0; + dev->duplex = -1; + dev->pause = dev->asym_pause = 0; + dev->link = 1; + + dev->autoneg = AUTONEG_ENABLE; + + dev->addr = addr; + dev->phy_id = phy_id; + dev->bus = bus; + + dev->state = PHY_DOWN; + + spin_lock_init(&dev->lock); return dev; } diff --git a/drivers/net/phy/qsemi.c b/drivers/net/phy/qsemi.c index 2b50e1739..65d995b02 100644 --- a/drivers/net/phy/qsemi.c +++ b/drivers/net/phy/qsemi.c @@ -13,6 +13,7 @@ * option) any later version. * */ +#include #include #include #include diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c deleted file mode 100644 index b1d8ed40a..000000000 --- a/drivers/net/phy/smsc.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * drivers/net/phy/smsc.c - * - * Driver for SMSC PHYs - * - * Author: Herbert Valerio Riedel - * - * Copyright (c) 2006 Herbert Valerio Riedel - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include -#include -#include -#include -#include - -#define MII_LAN83C185_ISF 29 /* Interrupt Source Flags */ -#define MII_LAN83C185_IM 30 /* Interrupt Mask */ - -#define MII_LAN83C185_ISF_INT1 (1<<1) /* Auto-Negotiation Page Received */ -#define MII_LAN83C185_ISF_INT2 (1<<2) /* Parallel Detection Fault */ -#define MII_LAN83C185_ISF_INT3 (1<<3) /* Auto-Negotiation LP Ack */ -#define MII_LAN83C185_ISF_INT4 (1<<4) /* Link Down */ -#define MII_LAN83C185_ISF_INT5 (1<<5) /* Remote Fault Detected */ -#define MII_LAN83C185_ISF_INT6 (1<<6) /* Auto-Negotiation complete */ -#define MII_LAN83C185_ISF_INT7 (1<<7) /* ENERGYON */ - -#define MII_LAN83C185_ISF_INT_ALL (0x0e) - -#define MII_LAN83C185_ISF_INT_PHYLIB_EVENTS \ - (MII_LAN83C185_ISF_INT6 | MII_LAN83C185_ISF_INT4) - - -static int lan83c185_config_intr(struct phy_device *phydev) -{ - int rc = phy_write (phydev, MII_LAN83C185_IM, - ((PHY_INTERRUPT_ENABLED == phydev->interrupts) - ? MII_LAN83C185_ISF_INT_PHYLIB_EVENTS - : 0)); - - return rc < 0 ? rc : 0; -} - -static int lan83c185_ack_interrupt(struct phy_device *phydev) -{ - int rc = phy_read (phydev, MII_LAN83C185_ISF); - - return rc < 0 ? rc : 0; -} - -static int lan83c185_config_init(struct phy_device *phydev) -{ - return lan83c185_ack_interrupt (phydev); -} - - -static struct phy_driver lan83c185_driver = { - .phy_id = 0x0007c0a0, /* OUI=0x00800f, Model#=0x0a */ - .phy_id_mask = 0xfffffff0, - .name = "SMSC LAN83C185", - - .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause - | SUPPORTED_Asym_Pause), - .flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG, - - /* basic functions */ - .config_aneg = genphy_config_aneg, - .read_status = genphy_read_status, - .config_init = lan83c185_config_init, - - /* IRQ related */ - .ack_interrupt = lan83c185_ack_interrupt, - .config_intr = lan83c185_config_intr, - - .driver = { .owner = THIS_MODULE, } -}; - -static int __init smsc_init(void) -{ - return phy_driver_register (&lan83c185_driver); -} - -static void __exit smsc_exit(void) -{ - phy_driver_unregister (&lan83c185_driver); -} - -MODULE_DESCRIPTION("SMSC PHY driver"); -MODULE_AUTHOR("Herbert Valerio Riedel"); -MODULE_LICENSE("GPL"); - -module_init(smsc_init); -module_exit(smsc_exit); diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c deleted file mode 100644 index 792716beb..000000000 --- a/drivers/net/phy/vitesse.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Driver for Vitesse PHYs - * - * Author: Kriston Carson - * - * Copyright (c) 2005 Freescale Semiconductor, 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. - * - */ - -#include -#include -#include -#include -#include - -/* Vitesse Extended Control Register 1 */ -#define MII_VSC8244_EXT_CON1 0x17 -#define MII_VSC8244_EXTCON1_INIT 0x0000 - -/* Vitesse Interrupt Mask Register */ -#define MII_VSC8244_IMASK 0x19 -#define MII_VSC8244_IMASK_IEN 0x8000 -#define MII_VSC8244_IMASK_SPEED 0x4000 -#define MII_VSC8244_IMASK_LINK 0x2000 -#define MII_VSC8244_IMASK_DUPLEX 0x1000 -#define MII_VSC8244_IMASK_MASK 0xf000 - -/* Vitesse Interrupt Status Register */ -#define MII_VSC8244_ISTAT 0x1a -#define MII_VSC8244_ISTAT_STATUS 0x8000 -#define MII_VSC8244_ISTAT_SPEED 0x4000 -#define MII_VSC8244_ISTAT_LINK 0x2000 -#define MII_VSC8244_ISTAT_DUPLEX 0x1000 - -/* Vitesse Auxiliary Control/Status Register */ -#define MII_VSC8244_AUX_CONSTAT 0x1c -#define MII_VSC8244_AUXCONSTAT_INIT 0x0004 -#define MII_VSC8244_AUXCONSTAT_DUPLEX 0x0020 -#define MII_VSC8244_AUXCONSTAT_SPEED 0x0018 -#define MII_VSC8244_AUXCONSTAT_GBIT 0x0010 -#define MII_VSC8244_AUXCONSTAT_100 0x0008 - -MODULE_DESCRIPTION("Vitesse PHY driver"); -MODULE_AUTHOR("Kriston Carson"); -MODULE_LICENSE("GPL"); - -static int vsc824x_config_init(struct phy_device *phydev) -{ - int err; - - err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, - MII_VSC8244_AUXCONSTAT_INIT); - if (err < 0) - return err; - - err = phy_write(phydev, MII_VSC8244_EXT_CON1, - MII_VSC8244_EXTCON1_INIT); - return err; -} - -static int vsc824x_ack_interrupt(struct phy_device *phydev) -{ - int err = phy_read(phydev, MII_VSC8244_ISTAT); - - return (err < 0) ? err : 0; -} - -static int vsc824x_config_intr(struct phy_device *phydev) -{ - int err; - - if (phydev->interrupts == PHY_INTERRUPT_ENABLED) - err = phy_write(phydev, MII_VSC8244_IMASK, - MII_VSC8244_IMASK_MASK); - else - err = phy_write(phydev, MII_VSC8244_IMASK, 0); - return err; -} - -/* Vitesse 824x */ -static struct phy_driver vsc8244_driver = { - .phy_id = 0x000fc6c2, - .name = "Vitesse VSC8244", - .phy_id_mask = 0x000fffc0, - .features = PHY_GBIT_FEATURES, - .flags = PHY_HAS_INTERRUPT, - .config_init = &vsc824x_config_init, - .config_aneg = &genphy_config_aneg, - .read_status = &genphy_read_status, - .ack_interrupt = &vsc824x_ack_interrupt, - .config_intr = &vsc824x_config_intr, - .driver = { .owner = THIS_MODULE,}, -}; - -static int __init vsc8244_init(void) -{ - return phy_driver_register(&vsc8244_driver); -} - -static void __exit vsc8244_exit(void) -{ - phy_driver_unregister(&vsc8244_driver); -} - -module_init(vsc8244_init); -module_exit(vsc8244_exit); diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index c872f7c6c..b2073fce8 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -22,11 +22,13 @@ * ==FILEVERSION 20041108== */ +#include #include #include #include #include #include +#include #include #include #include @@ -192,7 +194,7 @@ struct cardmap { void *ptr[CARDMAP_WIDTH]; }; static void *cardmap_get(struct cardmap *map, unsigned int nr); -static int cardmap_set(struct cardmap **map, unsigned int nr, void *ptr); +static void cardmap_set(struct cardmap **map, unsigned int nr, void *ptr); static unsigned int cardmap_find_first_free(struct cardmap *map); static void cardmap_destroy(struct cardmap **map); @@ -861,6 +863,10 @@ static int __init ppp_init(void) goto out_chrdev; } class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); + err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), + S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); + if (err) + goto out_class; } out: @@ -868,6 +874,9 @@ out: printk(KERN_ERR "failed to register PPP device (%d)\n", err); return err; +out_class: + class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0)); + class_destroy(ppp_class); out_chrdev: unregister_chrdev(PPP_MAJOR, "ppp"); goto out; @@ -1600,6 +1609,8 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb) kfree_skb(skb); skb = ns; } + else if (!pskb_may_pull(skb, skb->len)) + goto err; else skb->ip_summed = CHECKSUM_NONE; @@ -1995,9 +2006,10 @@ ppp_register_channel(struct ppp_channel *chan) { struct channel *pch; - pch = kzalloc(sizeof(struct channel), GFP_KERNEL); + pch = kmalloc(sizeof(struct channel), GFP_KERNEL); if (pch == 0) return -ENOMEM; + memset(pch, 0, sizeof(struct channel)); pch->ppp = NULL; pch->chan = chan; chan->ppp = pch; @@ -2407,12 +2419,13 @@ ppp_create_interface(int unit, int *retp) int ret = -ENOMEM; int i; - ppp = kzalloc(sizeof(struct ppp), GFP_KERNEL); + ppp = kmalloc(sizeof(struct ppp), GFP_KERNEL); if (!ppp) goto out; dev = alloc_netdev(0, "", ppp_setup); if (!dev) goto out1; + memset(ppp, 0, sizeof(struct ppp)); ppp->mru = PPP_MRU; init_ppp_file(&ppp->file, INTERFACE); @@ -2452,16 +2465,11 @@ ppp_create_interface(int unit, int *retp) } atomic_inc(&ppp_unit_count); - ret = cardmap_set(&all_ppp_units, unit, ppp); - if (ret != 0) - goto out3; - + cardmap_set(&all_ppp_units, unit, ppp); mutex_unlock(&all_ppp_mutex); *retp = 0; return ppp; -out3: - atomic_dec(&ppp_unit_count); out2: mutex_unlock(&all_ppp_mutex); free_netdev(dev); @@ -2572,7 +2580,8 @@ ppp_find_channel(int unit) list_for_each_entry(pch, &new_channels, list) { if (pch->file.index == unit) { - list_move(&pch->list, &all_channels); + list_del(&pch->list); + list_add(&pch->list, &all_channels); return pch; } } @@ -2675,6 +2684,7 @@ static void __exit ppp_cleanup(void) cardmap_destroy(&all_ppp_units); if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) printk(KERN_ERR "PPP: failed to unregister PPP device\n"); + devfs_remove("ppp"); class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); class_destroy(ppp_class); } @@ -2698,7 +2708,7 @@ static void *cardmap_get(struct cardmap *map, unsigned int nr) return NULL; } -static int cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) +static void cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) { struct cardmap *p; int i; @@ -2707,9 +2717,8 @@ static int cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) if (p == NULL || (nr >> p->shift) >= CARDMAP_WIDTH) { do { /* need a new top level */ - struct cardmap *np = kzalloc(sizeof(*np), GFP_KERNEL); - if (!np) - goto enomem; + struct cardmap *np = kmalloc(sizeof(*np), GFP_KERNEL); + memset(np, 0, sizeof(*np)); np->ptr[0] = p; if (p != NULL) { np->shift = p->shift + CARDMAP_ORDER; @@ -2723,9 +2732,8 @@ static int cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) while (p->shift > 0) { i = (nr >> p->shift) & CARDMAP_MASK; if (p->ptr[i] == NULL) { - struct cardmap *np = kzalloc(sizeof(*np), GFP_KERNEL); - if (!np) - goto enomem; + struct cardmap *np = kmalloc(sizeof(*np), GFP_KERNEL); + memset(np, 0, sizeof(*np)); np->shift = p->shift - CARDMAP_ORDER; np->parent = p; p->ptr[i] = np; @@ -2740,9 +2748,6 @@ static int cardmap_set(struct cardmap **pmap, unsigned int nr, void *ptr) set_bit(i, &p->inuse); else clear_bit(i, &p->inuse); - return 0; - enomem: - return -ENOMEM; } static unsigned int cardmap_find_first_free(struct cardmap *map) diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index 51ff9a9d1..1985d1b57 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c @@ -43,6 +43,7 @@ * deprecated in 2.6 */ +#include #include #include #include diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 4c2f575fa..43641dd2c 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -184,7 +184,6 @@ static const struct { static struct pci_device_id rtl8169_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), }, - { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), }, { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), }, { PCI_DEVICE(0x16ec, 0x0116), }, { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, }, @@ -1406,7 +1405,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, dev = alloc_etherdev(sizeof (*tp)); if (dev == NULL) { if (netif_msg_drv(&debug)) - dev_err(&pdev->dev, "unable to alloc new ethernet\n"); + printk(KERN_ERR PFX "unable to alloc new ethernet\n"); goto err_out; } @@ -1418,8 +1417,10 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, /* enable device (incl. PCI PM wakeup and hotplug setup) */ rc = pci_enable_device(pdev); if (rc < 0) { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, "enable failure\n"); + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "%s: enable failure\n", + pci_name(pdev)); + } goto err_out_free_dev; } @@ -1435,32 +1436,37 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, pci_read_config_word(pdev, pm_cap + PCI_PM_CTRL, &pwr_command); acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK; } else { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "PowerManagement capability not found.\n"); + } } /* make sure PCI base addr 1 is MMIO */ if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "region #1 not an MMIO resource, aborting\n"); + } rc = -ENODEV; goto err_out_mwi; } /* check for weird/broken PCI region reporting */ if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); + } rc = -ENODEV; goto err_out_mwi; } rc = pci_request_regions(pdev, MODULENAME); if (rc < 0) { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, "could not request regions.\n"); + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "%s: could not request regions.\n", + pci_name(pdev)); + } goto err_out_mwi; } @@ -1473,9 +1479,10 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, } else { rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (rc < 0) { - if (netif_msg_probe(tp)) - dev_err(&pdev->dev, + if (netif_msg_probe(tp)) { + printk(KERN_ERR PFX "DMA configuration failed.\n"); + } goto err_out_free_res; } } @@ -1486,7 +1493,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE); if (ioaddr == NULL) { if (netif_msg_probe(tp)) - dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); + printk(KERN_ERR PFX "cannot remap MMIO, aborting\n"); rc = -EIO; goto err_out_free_res; } @@ -1518,9 +1525,9 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, if (i < 0) { /* Unknown chip: assume array element #0, original RTL-8169 */ if (netif_msg_probe(tp)) { - dev_printk(KERN_DEBUG, &pdev->dev, + printk(KERN_DEBUG PFX "PCI device %s: " "unknown chip version, assuming %s\n", - rtl_chip_info[0].name); + pci_name(pdev), rtl_chip_info[0].name); } i++; } @@ -1718,7 +1725,7 @@ static int rtl8169_open(struct net_device *dev) rtl8169_set_rxbufsize(tp, dev); retval = - request_irq(dev->irq, rtl8169_interrupt, IRQF_SHARED, dev->name, dev); + request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev); if (retval < 0) goto out; @@ -2214,7 +2221,8 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) len = skb->len; if (unlikely(len < ETH_ZLEN)) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (!skb) goto err_update_stats; len = ETH_ZLEN; } diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index c3ed734cb..19c2df9c8 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c @@ -28,6 +28,7 @@ #define RX_DMA_SKBUFF 1 #define PKT_COPY_THRESHOLD 512 +#include #include #include #include @@ -1252,7 +1253,7 @@ static int rr_open(struct net_device *dev) readl(®s->HostCtrl); spin_unlock_irqrestore(&rrpriv->lock, flags); - if (request_irq(dev->irq, rr_interrupt, IRQF_SHARED, dev->name, dev)) { + if (request_irq(dev->irq, rr_interrupt, SA_SHIRQ, dev->name, dev)) { printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); ecode = -EAGAIN; diff --git a/drivers/net/rrunner.h b/drivers/net/rrunner.h index 2c3c91ebd..10baae559 100644 --- a/drivers/net/rrunner.h +++ b/drivers/net/rrunner.h @@ -1,6 +1,7 @@ #ifndef _RRUNNER_H_ #define _RRUNNER_H_ +#include #include #if ((BITS_PER_LONG != 32) && (BITS_PER_LONG != 64)) diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h index 0ef525899..00179bc34 100644 --- a/drivers/net/s2io-regs.h +++ b/drivers/net/s2io-regs.h @@ -167,7 +167,6 @@ typedef struct _XENA_dev_config { u8 unused4[0x08]; u64 gpio_int_reg; -#define GPIO_INT_REG_DP_ERR_INT BIT(0) #define GPIO_INT_REG_LINK_DOWN BIT(1) #define GPIO_INT_REG_LINK_UP BIT(2) u64 gpio_int_mask; @@ -188,7 +187,7 @@ typedef struct _XENA_dev_config { /* PIC Control registers */ u64 pic_control; #define PIC_CNTL_RX_ALARM_MAP_1 BIT(0) -#define PIC_CNTL_SHARED_SPLITS(n) vBIT(n,11,5) +#define PIC_CNTL_SHARED_SPLITS(n) vBIT(n,11,4) u64 swapper_ctrl; #define SWAPPER_CTRL_PIF_R_FE BIT(0) @@ -268,21 +267,6 @@ typedef struct _XENA_dev_config { /* General Configuration */ u64 mdio_control; -#define MDIO_MMD_INDX_ADDR(val) vBIT(val, 0, 16) -#define MDIO_MMD_DEV_ADDR(val) vBIT(val, 19, 5) -#define MDIO_MMD_PMA_DEV_ADDR 0x1 -#define MDIO_MMD_PMD_DEV_ADDR 0x1 -#define MDIO_MMD_WIS_DEV_ADDR 0x2 -#define MDIO_MMD_PCS_DEV_ADDR 0x3 -#define MDIO_MMD_PHYXS_DEV_ADDR 0x4 -#define MDIO_MMS_PRT_ADDR(val) vBIT(val, 27, 5) -#define MDIO_CTRL_START_TRANS(val) vBIT(val, 56, 4) -#define MDIO_OP(val) vBIT(val, 60, 2) -#define MDIO_OP_ADDR_TRANS 0x0 -#define MDIO_OP_WRITE_TRANS 0x1 -#define MDIO_OP_READ_POST_INC_TRANS 0x2 -#define MDIO_OP_READ_TRANS 0x3 -#define MDIO_MDIO_DATA(val) vBIT(val, 32, 16) u64 dtx_control; @@ -300,13 +284,9 @@ typedef struct _XENA_dev_config { u64 gpio_control; #define GPIO_CTRL_GPIO_0 BIT(8) u64 misc_control; -#define EXT_REQ_EN BIT(1) #define MISC_LINK_STABILITY_PRD(val) vBIT(val,29,3) - u8 unused7_1[0x230 - 0x208]; - - u64 pic_control2; - u64 ini_dperr_ctrl; + u8 unused7_1[0x240 - 0x208]; u64 wreq_split_mask; #define WREQ_SPLIT_MASK_SET_MASK(val) vBIT(val, 52, 12) @@ -513,7 +493,6 @@ typedef struct _XENA_dev_config { #define PRC_CTRL_NO_SNOOP_DESC BIT(22) #define PRC_CTRL_NO_SNOOP_BUFF BIT(23) #define PRC_CTRL_BIMODAL_INTERRUPT BIT(37) -#define PRC_CTRL_GROUP_READS BIT(38) #define PRC_CTRL_RXD_BACKOFF_INTERVAL(val) vBIT(val,40,24) u64 prc_alarm_action; @@ -562,12 +541,7 @@ typedef struct _XENA_dev_config { #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) #define RX_PA_CFG_IGNORE_L2_ERR BIT(6) - u64 unused_11_1; - - u64 ring_bump_counter1; - u64 ring_bump_counter2; - - u8 unused12[0x700 - 0x1F0]; + u8 unused12[0x700 - 0x1D8]; u64 rxdma_debug_ctrl; diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index e72e0e099..0ad01f07e 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -26,24 +26,18 @@ * * The module loadable parameters that are supported by the driver and a brief * explaination of all the variables. - * * rx_ring_num : This can be used to program the number of receive rings used * in the driver. - * rx_ring_sz: This defines the number of receive blocks each ring can have. - * This is also an array of size 8. + * rx_ring_sz: This defines the number of descriptors each ring can have. This + * is also an array of size 8. * rx_ring_mode: This defines the operation mode of all 8 rings. The valid * values are 1, 2 and 3. * tx_fifo_num: This defines the number of Tx FIFOs thats used int the driver. * tx_fifo_len: This too is an array of 8. Each element defines the number of * Tx descriptors that can be associated with each corresponding FIFO. - * intr_type: This defines the type of interrupt. The values can be 0(INTA), - * 1(MSI), 2(MSI_X). Default value is '0(INTA)' - * lro: Specifies whether to enable Large Receive Offload (LRO) or not. - * Possible values '1' for enable '0' for disable. Default is '0' - * lro_max_pkts: This parameter defines maximum number of packets can be - * aggregated as a single large packet ************************************************************************/ +#include #include #include #include @@ -71,13 +65,12 @@ #include #include #include -#include /* local include */ #include "s2io.h" #include "s2io-regs.h" -#define DRV_VERSION "2.0.15.2" +#define DRV_VERSION "2.0.11.2" /* S2io Driver name & version. */ static char s2io_driver_name[] = "Neterion"; @@ -113,14 +106,18 @@ static inline int RXD_IS_UP2DT(RxD_t *rxdp) #define LOW 2 static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) { + int level = 0; mac_info_t *mac_control; mac_control = &sp->mac_control; - if (rxb_size <= rxd_count[sp->rxd_mode]) - return PANIC; - else if ((mac_control->rings[ring].pkt_cnt - rxb_size) > 16) - return LOW; - return 0; + if ((mac_control->rings[ring].pkt_cnt - rxb_size) > 16) { + level = LOW; + if (rxb_size <= rxd_count[sp->rxd_mode]) { + level = PANIC; + } + } + + return level; } /* Ethtool related variables and Macros. */ @@ -139,11 +136,7 @@ static char ethtool_stats_keys[][ETH_GSTRING_LEN] = { {"tmac_mcst_frms"}, {"tmac_bcst_frms"}, {"tmac_pause_ctrl_frms"}, - {"tmac_ttl_octets"}, - {"tmac_ucst_frms"}, - {"tmac_nucst_frms"}, {"tmac_any_err_frms"}, - {"tmac_ttl_less_fb_octets"}, {"tmac_vld_ip_octets"}, {"tmac_vld_ip"}, {"tmac_drop_ip"}, @@ -158,27 +151,13 @@ static char ethtool_stats_keys[][ETH_GSTRING_LEN] = { {"rmac_vld_mcst_frms"}, {"rmac_vld_bcst_frms"}, {"rmac_in_rng_len_err_frms"}, - {"rmac_out_rng_len_err_frms"}, {"rmac_long_frms"}, {"rmac_pause_ctrl_frms"}, - {"rmac_unsup_ctrl_frms"}, - {"rmac_ttl_octets"}, - {"rmac_accepted_ucst_frms"}, - {"rmac_accepted_nucst_frms"}, {"rmac_discarded_frms"}, - {"rmac_drop_events"}, - {"rmac_ttl_less_fb_octets"}, - {"rmac_ttl_frms"}, {"rmac_usized_frms"}, {"rmac_osized_frms"}, {"rmac_frag_frms"}, {"rmac_jabber_frms"}, - {"rmac_ttl_64_frms"}, - {"rmac_ttl_65_127_frms"}, - {"rmac_ttl_128_255_frms"}, - {"rmac_ttl_256_511_frms"}, - {"rmac_ttl_512_1023_frms"}, - {"rmac_ttl_1024_1518_frms"}, {"rmac_ip"}, {"rmac_ip_octets"}, {"rmac_hdr_err_ip"}, @@ -187,82 +166,12 @@ static char ethtool_stats_keys[][ETH_GSTRING_LEN] = { {"rmac_tcp"}, {"rmac_udp"}, {"rmac_err_drp_udp"}, - {"rmac_xgmii_err_sym"}, - {"rmac_frms_q0"}, - {"rmac_frms_q1"}, - {"rmac_frms_q2"}, - {"rmac_frms_q3"}, - {"rmac_frms_q4"}, - {"rmac_frms_q5"}, - {"rmac_frms_q6"}, - {"rmac_frms_q7"}, - {"rmac_full_q0"}, - {"rmac_full_q1"}, - {"rmac_full_q2"}, - {"rmac_full_q3"}, - {"rmac_full_q4"}, - {"rmac_full_q5"}, - {"rmac_full_q6"}, - {"rmac_full_q7"}, {"rmac_pause_cnt"}, - {"rmac_xgmii_data_err_cnt"}, - {"rmac_xgmii_ctrl_err_cnt"}, {"rmac_accepted_ip"}, {"rmac_err_tcp"}, - {"rd_req_cnt"}, - {"new_rd_req_cnt"}, - {"new_rd_req_rtry_cnt"}, - {"rd_rtry_cnt"}, - {"wr_rtry_rd_ack_cnt"}, - {"wr_req_cnt"}, - {"new_wr_req_cnt"}, - {"new_wr_req_rtry_cnt"}, - {"wr_rtry_cnt"}, - {"wr_disc_cnt"}, - {"rd_rtry_wr_ack_cnt"}, - {"txp_wr_cnt"}, - {"txd_rd_cnt"}, - {"txd_wr_cnt"}, - {"rxd_rd_cnt"}, - {"rxd_wr_cnt"}, - {"txf_rd_cnt"}, - {"rxf_wr_cnt"}, - {"rmac_ttl_1519_4095_frms"}, - {"rmac_ttl_4096_8191_frms"}, - {"rmac_ttl_8192_max_frms"}, - {"rmac_ttl_gt_max_frms"}, - {"rmac_osized_alt_frms"}, - {"rmac_jabber_alt_frms"}, - {"rmac_gt_max_alt_frms"}, - {"rmac_vlan_frms"}, - {"rmac_len_discard"}, - {"rmac_fcs_discard"}, - {"rmac_pf_discard"}, - {"rmac_da_discard"}, - {"rmac_red_discard"}, - {"rmac_rts_discard"}, - {"rmac_ingm_full_discard"}, - {"link_fault_cnt"}, {"\n DRIVER STATISTICS"}, {"single_bit_ecc_errs"}, {"double_bit_ecc_errs"}, - {"parity_err_cnt"}, - {"serious_err_cnt"}, - {"soft_reset_cnt"}, - {"fifo_full_cnt"}, - {"ring_full_cnt"}, - ("alarm_transceiver_temp_high"), - ("alarm_transceiver_temp_low"), - ("alarm_laser_bias_current_high"), - ("alarm_laser_bias_current_low"), - ("alarm_laser_output_power_high"), - ("alarm_laser_output_power_low"), - ("warn_transceiver_temp_high"), - ("warn_transceiver_temp_low"), - ("warn_laser_bias_current_high"), - ("warn_laser_bias_current_low"), - ("warn_laser_output_power_high"), - ("warn_laser_output_power_low"), ("lro_aggregated_pkts"), ("lro_flush_both_count"), ("lro_out_of_sequence_pkts"), @@ -311,7 +220,9 @@ static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid) * the XAUI. */ +#define SWITCH_SIGN 0xA5A5A5A5A5A5A5A5ULL #define END_SIGN 0x0 + static const u64 herc_act_dtx_cfg[] = { /* Set address */ 0x8000051536750000ULL, 0x80000515367500E0ULL, @@ -333,19 +244,37 @@ static const u64 herc_act_dtx_cfg[] = { END_SIGN }; +static const u64 xena_mdio_cfg[] = { + /* Reset PMA PLL */ + 0xC001010000000000ULL, 0xC0010100000000E0ULL, + 0xC0010100008000E4ULL, + /* Remove Reset from PMA PLL */ + 0xC001010000000000ULL, 0xC0010100000000E0ULL, + 0xC0010100000000E4ULL, + END_SIGN +}; + static const u64 xena_dtx_cfg[] = { - /* Set address */ 0x8000051500000000ULL, 0x80000515000000E0ULL, - /* Write data */ - 0x80000515D9350004ULL, 0x80000515D93500E4ULL, - /* Set address */ - 0x8001051500000000ULL, 0x80010515000000E0ULL, - /* Write data */ - 0x80010515001E0004ULL, 0x80010515001E00E4ULL, - /* Set address */ + 0x80000515D93500E4ULL, 0x8001051500000000ULL, + 0x80010515000000E0ULL, 0x80010515001E00E4ULL, 0x8002051500000000ULL, 0x80020515000000E0ULL, - /* Write data */ - 0x80020515F2100004ULL, 0x80020515F21000E4ULL, + 0x80020515F21000E4ULL, + /* Set PADLOOPBACKN */ + 0x8002051500000000ULL, 0x80020515000000E0ULL, + 0x80020515B20000E4ULL, 0x8003051500000000ULL, + 0x80030515000000E0ULL, 0x80030515B20000E4ULL, + 0x8004051500000000ULL, 0x80040515000000E0ULL, + 0x80040515B20000E4ULL, 0x8005051500000000ULL, + 0x80050515000000E0ULL, 0x80050515B20000E4ULL, + SWITCH_SIGN, + /* Remove PADLOOPBACKN */ + 0x8002051500000000ULL, 0x80020515000000E0ULL, + 0x80020515F20000E4ULL, 0x8003051500000000ULL, + 0x80030515000000E0ULL, 0x80030515F20000E4ULL, + 0x8004051500000000ULL, 0x80040515000000E0ULL, + 0x80040515F20000E4ULL, 0x8005051500000000ULL, + 0x80050515000000E0ULL, 0x80050515F20000E4ULL, END_SIGN }; @@ -371,50 +300,38 @@ static const u64 fix_mac[] = { END_SIGN }; -MODULE_AUTHOR("Raghavendra Koushik "); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); - - /* Module Loadable parameters. */ -S2IO_PARM_INT(tx_fifo_num, 1); -S2IO_PARM_INT(rx_ring_num, 1); - - -S2IO_PARM_INT(rx_ring_mode, 1); -S2IO_PARM_INT(use_continuous_tx_intrs, 1); -S2IO_PARM_INT(rmac_pause_time, 0x100); -S2IO_PARM_INT(mc_pause_threshold_q0q3, 187); -S2IO_PARM_INT(mc_pause_threshold_q4q7, 187); -S2IO_PARM_INT(shared_splits, 0); -S2IO_PARM_INT(tmac_util_period, 5); -S2IO_PARM_INT(rmac_util_period, 5); -S2IO_PARM_INT(bimodal, 0); -S2IO_PARM_INT(l3l4hdr_size, 128); +static unsigned int tx_fifo_num = 1; +static unsigned int tx_fifo_len[MAX_TX_FIFOS] = + {[0 ...(MAX_TX_FIFOS - 1)] = 0 }; +static unsigned int rx_ring_num = 1; +static unsigned int rx_ring_sz[MAX_RX_RINGS] = + {[0 ...(MAX_RX_RINGS - 1)] = 0 }; +static unsigned int rts_frm_len[MAX_RX_RINGS] = + {[0 ...(MAX_RX_RINGS - 1)] = 0 }; +static unsigned int rx_ring_mode = 1; +static unsigned int use_continuous_tx_intrs = 1; +static unsigned int rmac_pause_time = 65535; +static unsigned int mc_pause_threshold_q0q3 = 187; +static unsigned int mc_pause_threshold_q4q7 = 187; +static unsigned int shared_splits; +static unsigned int tmac_util_period = 5; +static unsigned int rmac_util_period = 5; +static unsigned int bimodal = 0; +static unsigned int l3l4hdr_size = 128; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif /* Frequency of Rx desc syncs expressed as power of 2 */ -S2IO_PARM_INT(rxsync_frequency, 3); +static unsigned int rxsync_frequency = 3; /* Interrupt type. Values can be 0(INTA), 1(MSI), 2(MSI_X) */ -S2IO_PARM_INT(intr_type, 0); +static unsigned int intr_type = 0; /* Large receive offload feature */ -S2IO_PARM_INT(lro, 0); +static unsigned int lro = 0; /* Max pkts to be aggregated by LRO at one time. If not specified, * aggregation happens until we hit max IP pkt size(64K) */ -S2IO_PARM_INT(lro_max_pkts, 0xFFFF); -#ifndef CONFIG_S2IO_NAPI -S2IO_PARM_INT(indicate_max_pkts, 0); -#endif - -static unsigned int tx_fifo_len[MAX_TX_FIFOS] = - {DEFAULT_FIFO_0_LEN, [1 ...(MAX_TX_FIFOS - 1)] = DEFAULT_FIFO_1_7_LEN}; -static unsigned int rx_ring_sz[MAX_RX_RINGS] = - {[0 ...(MAX_RX_RINGS - 1)] = SMALL_BLK_CNT}; -static unsigned int rts_frm_len[MAX_RX_RINGS] = - {[0 ...(MAX_RX_RINGS - 1)] = 0 }; - -module_param_array(tx_fifo_len, uint, NULL, 0); -module_param_array(rx_ring_sz, uint, NULL, 0); -module_param_array(rts_frm_len, uint, NULL, 0); +static unsigned int lro_max_pkts = 0xFFFF; /* * S2IO device table. @@ -477,9 +394,10 @@ static int init_shared_mem(struct s2io_nic *nic) size += config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { - DBG_PRINT(ERR_DBG, "s2io: Requested TxDs too high, "); + DBG_PRINT(ERR_DBG, "%s: Requested TxDs too high, ", + __FUNCTION__); DBG_PRINT(ERR_DBG, "Requested: %d, max supported: 8192\n", size); - return -EINVAL; + return FAILURE; } lst_size = (sizeof(TxD_t) * config->max_txds); @@ -559,7 +477,6 @@ static int init_shared_mem(struct s2io_nic *nic) nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL); if (!nic->ufo_in_band_v) return -ENOMEM; - memset(nic->ufo_in_band_v, 0, size); /* Allocation and initialization of RXDs in Rings */ size = 0; @@ -632,6 +549,11 @@ static int init_shared_mem(struct s2io_nic *nic) rx_blocks->block_dma_addr + (rxd_size[nic->rxd_mode] * l); } + + mac_control->rings[i].rx_blocks[j].block_virt_addr = + tmp_v_addr; + mac_control->rings[i].rx_blocks[j].block_dma_addr = + tmp_p_addr; } /* Interlinking all Rx Blocks */ for (j = 0; j < blk_cnt; j++) { @@ -850,21 +772,7 @@ static int s2io_verify_pci_mode(nic_t *nic) return mode; } -#define NEC_VENID 0x1033 -#define NEC_DEVID 0x0125 -static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) -{ - struct pci_dev *tdev = NULL; - while ((tdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { - if ((tdev->vendor == NEC_VENID) && (tdev->device == NEC_DEVID)){ - if (tdev->bus == s2io_pdev->bus->parent) - return 1; - } - } - return 0; -} -static int bus_speed[8] = {33, 133, 133, 200, 266, 133, 200, 266}; /** * s2io_print_pci_mode - */ @@ -881,14 +789,6 @@ static int s2io_print_pci_mode(nic_t *nic) if ( val64 & PCI_MODE_UNKNOWN_MODE) return -1; /* Unknown PCI mode */ - config->bus_speed = bus_speed[mode]; - - if (s2io_on_nec_bridge(nic->pdev)) { - DBG_PRINT(ERR_DBG, "%s: Device is on PCI-E bus\n", - nic->dev->name); - return mode; - } - if (val64 & PCI_MODE_32_BITS) { DBG_PRINT(ERR_DBG, "%s: Device is on 32 bit ", nic->dev->name); } else { @@ -898,27 +798,35 @@ static int s2io_print_pci_mode(nic_t *nic) switch(mode) { case PCI_MODE_PCI_33: DBG_PRINT(ERR_DBG, "33MHz PCI bus\n"); + config->bus_speed = 33; break; case PCI_MODE_PCI_66: DBG_PRINT(ERR_DBG, "66MHz PCI bus\n"); + config->bus_speed = 133; break; case PCI_MODE_PCIX_M1_66: DBG_PRINT(ERR_DBG, "66MHz PCIX(M1) bus\n"); + config->bus_speed = 133; /* Herc doubles the clock rate */ break; case PCI_MODE_PCIX_M1_100: DBG_PRINT(ERR_DBG, "100MHz PCIX(M1) bus\n"); + config->bus_speed = 200; break; case PCI_MODE_PCIX_M1_133: DBG_PRINT(ERR_DBG, "133MHz PCIX(M1) bus\n"); + config->bus_speed = 266; break; case PCI_MODE_PCIX_M2_66: DBG_PRINT(ERR_DBG, "133MHz PCIX(M2) bus\n"); + config->bus_speed = 133; break; case PCI_MODE_PCIX_M2_100: DBG_PRINT(ERR_DBG, "200MHz PCIX(M2) bus\n"); + config->bus_speed = 200; break; case PCI_MODE_PCIX_M2_133: DBG_PRINT(ERR_DBG, "266MHz PCIX(M2) bus\n"); + config->bus_speed = 266; break; default: return -1; /* Unsupported bus speed */ @@ -946,7 +854,7 @@ static int init_nic(struct s2io_nic *nic) int i, j; mac_info_t *mac_control; struct config_param *config; - int dtx_cnt = 0; + int mdio_cnt = 0, dtx_cnt = 0; unsigned long long mem_share; int mem_size; @@ -993,6 +901,20 @@ static int init_nic(struct s2io_nic *nic) val64 = dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); + /* + * Configuring the XAUI Interface of Xena. + * *************************************** + * To Configure the Xena's XAUI, one has to write a series + * of 64 bit values into two registers in a particular + * sequence. Hence a macro 'SWITCH_SIGN' has been defined + * which will be defined in the array of configuration values + * (xena_dtx_cfg & xena_mdio_cfg) at appropriate places + * to switch writing from one regsiter to another. We continue + * writing these values until we encounter the 'END_SIGN' macro. + * For example, After making a series of 21 writes into + * dtx_control register the 'SWITCH_SIGN' appears and hence we + * start writing into mdio_control until we encounter END_SIGN. + */ if (nic->device_type & XFRAME_II_DEVICE) { while (herc_act_dtx_cfg[dtx_cnt] != END_SIGN) { SPECIAL_REG_WRITE(herc_act_dtx_cfg[dtx_cnt], @@ -1002,11 +924,35 @@ static int init_nic(struct s2io_nic *nic) dtx_cnt++; } } else { - while (xena_dtx_cfg[dtx_cnt] != END_SIGN) { - SPECIAL_REG_WRITE(xena_dtx_cfg[dtx_cnt], - &bar0->dtx_control, UF); - val64 = readq(&bar0->dtx_control); - dtx_cnt++; + while (1) { + dtx_cfg: + while (xena_dtx_cfg[dtx_cnt] != END_SIGN) { + if (xena_dtx_cfg[dtx_cnt] == SWITCH_SIGN) { + dtx_cnt++; + goto mdio_cfg; + } + SPECIAL_REG_WRITE(xena_dtx_cfg[dtx_cnt], + &bar0->dtx_control, UF); + val64 = readq(&bar0->dtx_control); + dtx_cnt++; + } + mdio_cfg: + while (xena_mdio_cfg[mdio_cnt] != END_SIGN) { + if (xena_mdio_cfg[mdio_cnt] == SWITCH_SIGN) { + mdio_cnt++; + goto dtx_cfg; + } + SPECIAL_REG_WRITE(xena_mdio_cfg[mdio_cnt], + &bar0->mdio_control, UF); + val64 = readq(&bar0->mdio_control); + mdio_cnt++; + } + if ((xena_dtx_cfg[dtx_cnt] == END_SIGN) && + (xena_mdio_cfg[mdio_cnt] == END_SIGN)) { + break; + } else { + goto dtx_cfg; + } } } @@ -1048,6 +994,11 @@ static int init_nic(struct s2io_nic *nic) } } + /* Enable Tx FIFO partition 0. */ + val64 = readq(&bar0->tx_fifo_partition_0); + val64 |= BIT(0); /* To enable the FIFO partition. */ + writeq(val64, &bar0->tx_fifo_partition_0); + /* * Disable 4 PCCs for Xena1, 2 and 3 as per H/W bug * SXE-008 TRANSMIT DMA ARBITRATION ISSUE. @@ -1226,11 +1177,6 @@ static int init_nic(struct s2io_nic *nic) break; } - /* Enable all configured Tx FIFO partitions */ - val64 = readq(&bar0->tx_fifo_partition_0); - val64 |= (TX_FIFO_PARTITION_EN); - writeq(val64, &bar0->tx_fifo_partition_0); - /* Filling the Rx round robin registers as per the * number of Rings and steering based on QoS. */ @@ -1599,26 +1545,19 @@ static int init_nic(struct s2io_nic *nic) val64 |= PIC_CNTL_SHARED_SPLITS(shared_splits); writeq(val64, &bar0->pic_control); - if (nic->config.bus_speed == 266) { - writeq(TXREQTO_VAL(0x7f) | TXREQTO_EN, &bar0->txreqtimeout); - writeq(0x0, &bar0->read_retry_delay); - writeq(0x0, &bar0->write_retry_delay); - } - /* * Programming the Herc to split every write transaction * that does not start on an ADB to reduce disconnects. */ if (nic->device_type == XFRAME_II_DEVICE) { - val64 = EXT_REQ_EN | MISC_LINK_STABILITY_PRD(3); - writeq(val64, &bar0->misc_control); - val64 = readq(&bar0->pic_control2); - val64 &= ~(BIT(13)|BIT(14)|BIT(15)); - writeq(val64, &bar0->pic_control2); + val64 = WREQ_SPLIT_MASK_SET_MASK(255); + writeq(val64, &bar0->wreq_split_mask); } - if (strstr(nic->product_name, "CX4")) { - val64 = TMAC_AVG_IPG(0x17); - writeq(val64, &bar0->tmac_avg_ipg); + + /* Setting Link stability period to 64 ms */ + if (nic->device_type == XFRAME_II_DEVICE) { + val64 = MISC_LINK_STABILITY_PRD(3); + writeq(val64, &bar0->misc_control); } return SUCCESS; @@ -1663,7 +1602,7 @@ static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int flag) writeq(temp64, &bar0->general_int_mask); /* * If Hercules adapter enable GPIO otherwise - * disable all PCIX, Flash, MDIO, IIC and GPIO + * disabled all PCIX, Flash, MDIO, IIC and GPIO * interrupts for now. * TODO */ @@ -1989,6 +1928,7 @@ static int start_nic(struct s2io_nic *nic) XENA_dev_config_t __iomem *bar0 = nic->bar0; struct net_device *dev = nic->dev; register u64 val64 = 0; + u16 interruptible; u16 subid, i; mac_info_t *mac_control; struct config_param *config; @@ -2008,10 +1948,6 @@ static int start_nic(struct s2io_nic *nic) val64 |= PRC_CTRL_RC_ENABLED; else val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3; - if (nic->device_type == XFRAME_II_DEVICE) - val64 |= PRC_CTRL_GROUP_READS; - val64 &= ~PRC_CTRL_RXD_BACKOFF_INTERVAL(0xFFFFFF); - val64 |= PRC_CTRL_RXD_BACKOFF_INTERVAL(0x1000); writeq(val64, &bar0->prc_ctrl_n[i]); } @@ -2059,6 +1995,16 @@ static int start_nic(struct s2io_nic *nic) return FAILURE; } + /* Enable select interrupts */ + if (nic->intr_type != INTA) + en_dis_able_nic_intrs(nic, ENA_ALL_INTRS, DISABLE_INTRS); + else { + interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; + interruptible |= TX_PIC_INTR | RX_PIC_INTR; + interruptible |= TX_MAC_INTR | RX_MAC_INTR; + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); + } + /* * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser, @@ -2072,13 +2018,6 @@ static int start_nic(struct s2io_nic *nic) val64 |= ADAPTER_EOI_TX_ON; writeq(val64, &bar0->adapter_control); - if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) { - /* - * Dont see link state interrupts initally on some switches, - * so directly scheduling the link state task here. - */ - schedule_work(&nic->set_link_task); - } /* SXE-002: Initialize link and activity LED */ subid = nic->pdev->subsystem_device; if (((subid & 0xFF) >= 0x07) && @@ -2090,6 +2029,12 @@ static int start_nic(struct s2io_nic *nic) writeq(val64, (void __iomem *)bar0 + 0x2700); } + /* + * Don't see link state interrupts on certain switches, so + * directly scheduling a link state task from here. + */ + schedule_work(&nic->set_link_task); + return SUCCESS; } /** @@ -2132,7 +2077,7 @@ static struct sk_buff *s2io_txdl_getskb(fifo_info_t *fifo_data, TxD_t *txdlp, in frag->size, PCI_DMA_TODEVICE); } } - memset(txdlp,0, (sizeof(TxD_t) * fifo_data->max_txds)); + txdlp->Host_Control = 0; return(skb); } @@ -2189,7 +2134,7 @@ static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t __iomem *bar0 = nic->bar0; register u64 val64 = 0; - u16 interruptible; + u16 interruptible, i; mac_info_t *mac_control; struct config_param *config; @@ -2202,10 +2147,12 @@ static void stop_nic(struct s2io_nic *nic) interruptible |= TX_MAC_INTR | RX_MAC_INTR; en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); - /* Clearing Adapter_En bit of ADAPTER_CONTROL Register */ - val64 = readq(&bar0->adapter_control); - val64 &= ~(ADAPTER_CNTL_EN); - writeq(val64, &bar0->adapter_control); + /* Disable PRCs */ + for (i = 0; i < config->rx_ring_num; i++) { + val64 = readq(&bar0->prc_ctrl_n[i]); + val64 &= ~((u64) PRC_CTRL_RC_ENABLED); + writeq(val64, &bar0->prc_ctrl_n[i]); + } } static int fill_rxd_3buf(nic_t *nic, RxD_t *rxdp, struct sk_buff *skb) @@ -2284,12 +2231,13 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) alloc_cnt = mac_control->rings[ring_no].pkt_cnt - atomic_read(&nic->rx_bufs_left[ring_no]); - block_no1 = mac_control->rings[ring_no].rx_curr_get_info.block_index; - off1 = mac_control->rings[ring_no].rx_curr_get_info.offset; while (alloc_tab < alloc_cnt) { block_no = mac_control->rings[ring_no].rx_curr_put_info. block_index; + block_no1 = mac_control->rings[ring_no].rx_curr_get_info. + block_index; off = mac_control->rings[ring_no].rx_curr_put_info.offset; + off1 = mac_control->rings[ring_no].rx_curr_get_info.offset; rxdp = mac_control->rings[ring_no]. rx_blocks[block_no].rxds[off].virt_addr; @@ -2359,9 +2307,9 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) memset(rxdp, 0, sizeof(RxD1_t)); skb_reserve(skb, NET_IP_ALIGN); ((RxD1_t*)rxdp)->Buffer0_ptr = pci_map_single - (nic->pdev, skb->data, size - NET_IP_ALIGN, - PCI_DMA_FROMDEVICE); - rxdp->Control_2 = SET_BUFFER0_SIZE_1(size - NET_IP_ALIGN); + (nic->pdev, skb->data, size, PCI_DMA_FROMDEVICE); + rxdp->Control_2 &= (~MASK_BUFFER0_SIZE_1); + rxdp->Control_2 |= SET_BUFFER0_SIZE_1(size); } else if (nic->rxd_mode >= RXD_MODE_3A) { /* @@ -2384,14 +2332,9 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) skb->data = (void *) (unsigned long)tmp; skb->tail = (void *) (unsigned long)tmp; - if (!(((RxD3_t*)rxdp)->Buffer0_ptr)) - ((RxD3_t*)rxdp)->Buffer0_ptr = - pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, + ((RxD3_t*)rxdp)->Buffer0_ptr = + pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, PCI_DMA_FROMDEVICE); - else - pci_dma_sync_single_for_device(nic->pdev, - (dma_addr_t) ((RxD3_t*)rxdp)->Buffer0_ptr, - BUF0_LEN, PCI_DMA_FROMDEVICE); rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN); if (nic->rxd_mode == RXD_MODE_3B) { /* Two buffer mode */ @@ -2404,13 +2347,10 @@ static int fill_rx_buffers(struct s2io_nic *nic, int ring_no) (nic->pdev, skb->data, dev->mtu + 4, PCI_DMA_FROMDEVICE); - /* Buffer-1 will be dummy buffer. Not used */ - if (!(((RxD3_t*)rxdp)->Buffer1_ptr)) { - ((RxD3_t*)rxdp)->Buffer1_ptr = - pci_map_single(nic->pdev, - ba->ba_1, BUF1_LEN, - PCI_DMA_FROMDEVICE); - } + /* Buffer-1 will be dummy buffer not used */ + ((RxD3_t*)rxdp)->Buffer1_ptr = + pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, + PCI_DMA_FROMDEVICE); rxdp->Control_2 |= SET_BUFFER1_SIZE_3(1); rxdp->Control_2 |= SET_BUFFER2_SIZE_3 (dev->mtu + 4); @@ -2576,7 +2516,7 @@ static int s2io_poll(struct net_device *dev, int *budget) mac_info_t *mac_control; struct config_param *config; XENA_dev_config_t __iomem *bar0 = nic->bar0; - u64 val64 = 0xFFFFFFFFFFFFFFFFULL; + u64 val64; int i; atomic_inc(&nic->isr_cnt); @@ -2588,8 +2528,8 @@ static int s2io_poll(struct net_device *dev, int *budget) nic->pkts_to_process = dev->quota; org_pkts_to_process = nic->pkts_to_process; + val64 = readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); - val64 = readl(&bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { rx_intr_handler(&mac_control->rings[i]); @@ -2614,8 +2554,7 @@ static int s2io_poll(struct net_device *dev, int *budget) } } /* Re enable the Rx interrupts. */ - writeq(0x0, &bar0->rx_traffic_mask); - val64 = readl(&bar0->rx_traffic_mask); + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); atomic_dec(&nic->isr_cnt); return 0; @@ -2635,58 +2574,6 @@ no_rx: } #endif -#ifdef CONFIG_NET_POLL_CONTROLLER -/** - * s2io_netpoll - netpoll event handler entry point - * @dev : pointer to the device structure. - * Description: - * This function will be called by upper layer to check for events on the - * interface in situations where interrupts are disabled. It is used for - * specific in-kernel networking tasks, such as remote consoles and kernel - * debugging over the network (example netdump in RedHat). - */ -static void s2io_netpoll(struct net_device *dev) -{ - nic_t *nic = dev->priv; - mac_info_t *mac_control; - struct config_param *config; - XENA_dev_config_t __iomem *bar0 = nic->bar0; - u64 val64 = 0xFFFFFFFFFFFFFFFFULL; - int i; - - disable_irq(dev->irq); - - atomic_inc(&nic->isr_cnt); - mac_control = &nic->mac_control; - config = &nic->config; - - writeq(val64, &bar0->rx_traffic_int); - writeq(val64, &bar0->tx_traffic_int); - - /* we need to free up the transmitted skbufs or else netpoll will - * run out of skbs and will fail and eventually netpoll application such - * as netdump will fail. - */ - for (i = 0; i < config->tx_fifo_num; i++) - tx_intr_handler(&mac_control->fifos[i]); - - /* check for received packet and indicate up to network */ - for (i = 0; i < config->rx_ring_num; i++) - rx_intr_handler(&mac_control->rings[i]); - - for (i = 0; i < config->rx_ring_num; i++) { - if (fill_rx_buffers(nic, i) == -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); - DBG_PRINT(ERR_DBG, " in Rx Netpoll!!\n"); - break; - } - } - atomic_dec(&nic->isr_cnt); - enable_irq(dev->irq); - return; -} -#endif - /** * rx_intr_handler - Rx interrupt handler * @nic: device private variable. @@ -2737,7 +2624,7 @@ static void rx_intr_handler(ring_info_t *ring_data) /* If your are next to put index then it's FIFO full condition */ if ((get_block == put_block) && (get_info.offset + 1) == put_info.offset) { - DBG_PRINT(INTR_DBG, "%s: Ring Full\n",dev->name); + DBG_PRINT(ERR_DBG, "%s: Ring Full\n",dev->name); break; } skb = (struct sk_buff *) ((unsigned long)rxdp->Host_Control); @@ -2757,15 +2644,18 @@ static void rx_intr_handler(ring_info_t *ring_data) HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); } else if (nic->rxd_mode == RXD_MODE_3B) { - pci_dma_sync_single_for_cpu(nic->pdev, (dma_addr_t) + pci_unmap_single(nic->pdev, (dma_addr_t) ((RxD3_t*)rxdp)->Buffer0_ptr, BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + ((RxD3_t*)rxdp)->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) ((RxD3_t*)rxdp)->Buffer2_ptr, dev->mtu + 4, PCI_DMA_FROMDEVICE); } else { - pci_dma_sync_single_for_cpu(nic->pdev, (dma_addr_t) + pci_unmap_single(nic->pdev, (dma_addr_t) ((RxD3_t*)rxdp)->Buffer0_ptr, BUF0_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) @@ -2776,7 +2666,6 @@ static void rx_intr_handler(ring_info_t *ring_data) ((RxD3_t*)rxdp)->Buffer2_ptr, dev->mtu, PCI_DMA_FROMDEVICE); } - prefetch(skb->data); rx_osm_handler(ring_data, rxdp); get_info.offset++; ring_data->rx_curr_get_info.offset = get_info.offset; @@ -2848,10 +2737,6 @@ static void tx_intr_handler(fifo_info_t *fifo_data) if (txdlp->Control_1 & TXD_T_CODE) { unsigned long long err; err = txdlp->Control_1 & TXD_T_CODE; - if (err & 0x1) { - nic->mac_control.stats_info->sw_stat. - parity_err_cnt++; - } if ((err >> 48) == 0xA) { DBG_PRINT(TX_DBG, "TxD returned due \ to loss of link\n"); @@ -2875,8 +2760,7 @@ to loss of link\n"); dev_kfree_skb_irq(skb); get_info.offset++; - if (get_info.offset == get_info.fifo_len + 1) - get_info.offset = 0; + get_info.offset %= get_info.fifo_len + 1; txdlp = (TxD_t *) fifo_data->list_info [get_info.offset].list_virt_addr; fifo_data->tx_curr_get_info.offset = @@ -2889,256 +2773,6 @@ to loss of link\n"); spin_unlock(&nic->tx_lock); } -/** - * s2io_mdio_write - Function to write in to MDIO registers - * @mmd_type : MMD type value (PMA/PMD/WIS/PCS/PHYXS) - * @addr : address value - * @value : data value - * @dev : pointer to net_device structure - * Description: - * This function is used to write values to the MDIO registers - * NONE - */ -static void s2io_mdio_write(u32 mmd_type, u64 addr, u16 value, struct net_device *dev) -{ - u64 val64 = 0x0; - nic_t *sp = dev->priv; - XENA_dev_config_t *bar0 = (XENA_dev_config_t *)sp->bar0; - - //address transaction - val64 = val64 | MDIO_MMD_INDX_ADDR(addr) - | MDIO_MMD_DEV_ADDR(mmd_type) - | MDIO_MMS_PRT_ADDR(0x0); - writeq(val64, &bar0->mdio_control); - val64 = val64 | MDIO_CTRL_START_TRANS(0xE); - writeq(val64, &bar0->mdio_control); - udelay(100); - - //Data transaction - val64 = 0x0; - val64 = val64 | MDIO_MMD_INDX_ADDR(addr) - | MDIO_MMD_DEV_ADDR(mmd_type) - | MDIO_MMS_PRT_ADDR(0x0) - | MDIO_MDIO_DATA(value) - | MDIO_OP(MDIO_OP_WRITE_TRANS); - writeq(val64, &bar0->mdio_control); - val64 = val64 | MDIO_CTRL_START_TRANS(0xE); - writeq(val64, &bar0->mdio_control); - udelay(100); - - val64 = 0x0; - val64 = val64 | MDIO_MMD_INDX_ADDR(addr) - | MDIO_MMD_DEV_ADDR(mmd_type) - | MDIO_MMS_PRT_ADDR(0x0) - | MDIO_OP(MDIO_OP_READ_TRANS); - writeq(val64, &bar0->mdio_control); - val64 = val64 | MDIO_CTRL_START_TRANS(0xE); - writeq(val64, &bar0->mdio_control); - udelay(100); - -} - -/** - * s2io_mdio_read - Function to write in to MDIO registers - * @mmd_type : MMD type value (PMA/PMD/WIS/PCS/PHYXS) - * @addr : address value - * @dev : pointer to net_device structure - * Description: - * This function is used to read values to the MDIO registers - * NONE - */ -static u64 s2io_mdio_read(u32 mmd_type, u64 addr, struct net_device *dev) -{ - u64 val64 = 0x0; - u64 rval64 = 0x0; - nic_t *sp = dev->priv; - XENA_dev_config_t *bar0 = (XENA_dev_config_t *)sp->bar0; - - /* address transaction */ - val64 = val64 | MDIO_MMD_INDX_ADDR(addr) - | MDIO_MMD_DEV_ADDR(mmd_type) - | MDIO_MMS_PRT_ADDR(0x0); - writeq(val64, &bar0->mdio_control); - val64 = val64 | MDIO_CTRL_START_TRANS(0xE); - writeq(val64, &bar0->mdio_control); - udelay(100); - - /* Data transaction */ - val64 = 0x0; - val64 = val64 | MDIO_MMD_INDX_ADDR(addr) - | MDIO_MMD_DEV_ADDR(mmd_type) - | MDIO_MMS_PRT_ADDR(0x0) - | MDIO_OP(MDIO_OP_READ_TRANS); - writeq(val64, &bar0->mdio_control); - val64 = val64 | MDIO_CTRL_START_TRANS(0xE); - writeq(val64, &bar0->mdio_control); - udelay(100); - - /* Read the value from regs */ - rval64 = readq(&bar0->mdio_control); - rval64 = rval64 & 0xFFFF0000; - rval64 = rval64 >> 16; - return rval64; -} -/** - * s2io_chk_xpak_counter - Function to check the status of the xpak counters - * @counter : couter value to be updated - * @flag : flag to indicate the status - * @type : counter type - * Description: - * This function is to check the status of the xpak counters value - * NONE - */ - -static void s2io_chk_xpak_counter(u64 *counter, u64 * regs_stat, u32 index, u16 flag, u16 type) -{ - u64 mask = 0x3; - u64 val64; - int i; - for(i = 0; i 0) - { - *counter = *counter + 1; - val64 = *regs_stat & mask; - val64 = val64 >> (index * 0x2); - val64 = val64 + 1; - if(val64 == 3) - { - switch(type) - { - case 1: - DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " - "service. Excessive temperatures may " - "result in premature transceiver " - "failure \n"); - break; - case 2: - DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " - "service Excessive bias currents may " - "indicate imminent laser diode " - "failure \n"); - break; - case 3: - DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " - "service Excessive laser output " - "power may saturate far-end " - "receiver\n"); - break; - default: - DBG_PRINT(ERR_DBG, "Incorrect XPAK Alarm " - "type \n"); - } - val64 = 0x0; - } - val64 = val64 << (index * 0x2); - *regs_stat = (*regs_stat & (~mask)) | (val64); - - } else { - *regs_stat = *regs_stat & (~mask); - } -} - -/** - * s2io_updt_xpak_counter - Function to update the xpak counters - * @dev : pointer to net_device struct - * Description: - * This function is to upate the status of the xpak counters value - * NONE - */ -static void s2io_updt_xpak_counter(struct net_device *dev) -{ - u16 flag = 0x0; - u16 type = 0x0; - u16 val16 = 0x0; - u64 val64 = 0x0; - u64 addr = 0x0; - - nic_t *sp = dev->priv; - StatInfo_t *stat_info = sp->mac_control.stats_info; - - /* Check the communication with the MDIO slave */ - addr = 0x0000; - val64 = 0x0; - val64 = s2io_mdio_read(MDIO_MMD_PMA_DEV_ADDR, addr, dev); - if((val64 == 0xFFFF) || (val64 == 0x0000)) - { - DBG_PRINT(ERR_DBG, "ERR: MDIO slave access failed - " - "Returned %llx\n", (unsigned long long)val64); - return; - } - - /* Check for the expecte value of 2040 at PMA address 0x0000 */ - if(val64 != 0x2040) - { - DBG_PRINT(ERR_DBG, "Incorrect value at PMA address 0x0000 - "); - DBG_PRINT(ERR_DBG, "Returned: %llx- Expected: 0x2040\n", - (unsigned long long)val64); - return; - } - - /* Loading the DOM register to MDIO register */ - addr = 0xA100; - s2io_mdio_write(MDIO_MMD_PMA_DEV_ADDR, addr, val16, dev); - val64 = s2io_mdio_read(MDIO_MMD_PMA_DEV_ADDR, addr, dev); - - /* Reading the Alarm flags */ - addr = 0xA070; - val64 = 0x0; - val64 = s2io_mdio_read(MDIO_MMD_PMA_DEV_ADDR, addr, dev); - - flag = CHECKBIT(val64, 0x7); - type = 1; - s2io_chk_xpak_counter(&stat_info->xpak_stat.alarm_transceiver_temp_high, - &stat_info->xpak_stat.xpak_regs_stat, - 0x0, flag, type); - - if(CHECKBIT(val64, 0x6)) - stat_info->xpak_stat.alarm_transceiver_temp_low++; - - flag = CHECKBIT(val64, 0x3); - type = 2; - s2io_chk_xpak_counter(&stat_info->xpak_stat.alarm_laser_bias_current_high, - &stat_info->xpak_stat.xpak_regs_stat, - 0x2, flag, type); - - if(CHECKBIT(val64, 0x2)) - stat_info->xpak_stat.alarm_laser_bias_current_low++; - - flag = CHECKBIT(val64, 0x1); - type = 3; - s2io_chk_xpak_counter(&stat_info->xpak_stat.alarm_laser_output_power_high, - &stat_info->xpak_stat.xpak_regs_stat, - 0x4, flag, type); - - if(CHECKBIT(val64, 0x0)) - stat_info->xpak_stat.alarm_laser_output_power_low++; - - /* Reading the Warning flags */ - addr = 0xA074; - val64 = 0x0; - val64 = s2io_mdio_read(MDIO_MMD_PMA_DEV_ADDR, addr, dev); - - if(CHECKBIT(val64, 0x7)) - stat_info->xpak_stat.warn_transceiver_temp_high++; - - if(CHECKBIT(val64, 0x6)) - stat_info->xpak_stat.warn_transceiver_temp_low++; - - if(CHECKBIT(val64, 0x3)) - stat_info->xpak_stat.warn_laser_bias_current_high++; - - if(CHECKBIT(val64, 0x2)) - stat_info->xpak_stat.warn_laser_bias_current_low++; - - if(CHECKBIT(val64, 0x1)) - stat_info->xpak_stat.warn_laser_output_power_high++; - - if(CHECKBIT(val64, 0x0)) - stat_info->xpak_stat.warn_laser_output_power_low++; -} - /** * alarm_intr_handler - Alarm Interrrupt handler * @nic: device private variable @@ -3156,18 +2790,6 @@ static void alarm_intr_handler(struct s2io_nic *nic) struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t __iomem *bar0 = nic->bar0; register u64 val64 = 0, err_reg = 0; - u64 cnt; - int i; - nic->mac_control.stats_info->sw_stat.ring_full_cnt = 0; - /* Handling the XPAK counters update */ - if(nic->mac_control.stats_info->xpak_stat.xpak_timer_count < 72000) { - /* waiting for an hour */ - nic->mac_control.stats_info->xpak_stat.xpak_timer_count++; - } else { - s2io_updt_xpak_counter(dev); - /* reset the count to zero */ - nic->mac_control.stats_info->xpak_stat.xpak_timer_count = 0; - } /* Handling link status change error Intr */ if (s2io_link_fault_indication(nic) == MAC_RMAC_ERR_TIMER) { @@ -3194,8 +2816,6 @@ static void alarm_intr_handler(struct s2io_nic *nic) MC_ERR_REG_MIRI_ECC_DB_ERR_1)) { netif_stop_queue(dev); schedule_work(&nic->rst_timer_task); - nic->mac_control.stats_info->sw_stat. - soft_reset_cnt++; } } } else { @@ -3207,13 +2827,11 @@ static void alarm_intr_handler(struct s2io_nic *nic) /* In case of a serious error, the device will be Reset. */ val64 = readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { - nic->mac_control.stats_info->sw_stat.serious_err_cnt++; DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error %llx!!\n", (unsigned long long)val64); netif_stop_queue(dev); schedule_work(&nic->rst_timer_task); - nic->mac_control.stats_info->sw_stat.soft_reset_cnt++; } /* @@ -3231,35 +2849,6 @@ static void alarm_intr_handler(struct s2io_nic *nic) ac = readq(&bar0->adapter_control); schedule_work(&nic->set_link_task); } - /* Check for data parity error */ - val64 = readq(&bar0->pic_int_status); - if (val64 & PIC_INT_GPIO) { - val64 = readq(&bar0->gpio_int_reg); - if (val64 & GPIO_INT_REG_DP_ERR_INT) { - nic->mac_control.stats_info->sw_stat.parity_err_cnt++; - schedule_work(&nic->rst_timer_task); - nic->mac_control.stats_info->sw_stat.soft_reset_cnt++; - } - } - - /* Check for ring full counter */ - if (nic->device_type & XFRAME_II_DEVICE) { - val64 = readq(&bar0->ring_bump_counter1); - for (i=0; i<4; i++) { - cnt = ( val64 & vBIT(0xFFFF,(i*16),16)); - cnt >>= 64 - ((i+1)*16); - nic->mac_control.stats_info->sw_stat.ring_full_cnt - += cnt; - } - - val64 = readq(&bar0->ring_bump_counter2); - for (i=0; i<4; i++) { - cnt = ( val64 & vBIT(0xFFFF,(i*16),16)); - cnt >>= 64 - ((i+1)*16); - nic->mac_control.stats_info->sw_stat.ring_full_cnt - += cnt; - } - } /* Other type of interrupts are not being handled now, TODO */ } @@ -3275,26 +2864,23 @@ static void alarm_intr_handler(struct s2io_nic *nic) * SUCCESS on success and FAILURE on failure. */ -static int wait_for_cmd_complete(void *addr, u64 busy_bit) +static int wait_for_cmd_complete(nic_t * sp) { + XENA_dev_config_t __iomem *bar0 = sp->bar0; int ret = FAILURE, cnt = 0; u64 val64; while (TRUE) { - val64 = readq(addr); - if (!(val64 & busy_bit)) { + val64 = readq(&bar0->rmac_addr_cmd_mem); + if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { ret = SUCCESS; break; } - - if(in_interrupt()) - mdelay(50); - else - msleep(50); - + msleep(50); if (cnt++ > 10) break; } + return ret; } @@ -3333,9 +2919,6 @@ static void s2io_reset(nic_t * sp) * PCI write to sw_reset register is done by this time. */ msleep(250); - if (strstr(sp->product_name, "CX4")) { - msleep(750); - } /* Restore the PCI state saved during initialization. */ pci_restore_state(sp->pdev); @@ -3353,7 +2936,7 @@ static void s2io_reset(nic_t * sp) /* Clear certain PCI/PCI-X fields after reset */ if (sp->device_type == XFRAME_II_DEVICE) { - /* Clear "detected parity error" bit */ + /* Clear parity err detect bit */ pci_write_config_word(sp->pdev, PCI_STATUS, 0x8000); /* Clearing PCIX Ecc status register */ @@ -3554,7 +3137,7 @@ static void restore_xmsi_data(nic_t *nic) u64 val64; int i; - for (i=0; i < MAX_REQUESTED_MSI_X; i++) { + for (i=0; i< MAX_REQUESTED_MSI_X; i++) { writeq(nic->msix_info[i].addr, &bar0->xmsi_address); writeq(nic->msix_info[i].data, &bar0->xmsi_data); val64 = (BIT(7) | BIT(15) | vBIT(i, 26, 6)); @@ -3573,7 +3156,7 @@ static void store_xmsi_data(nic_t *nic) int i; /* Store and display */ - for (i=0; i < MAX_REQUESTED_MSI_X; i++) { + for (i=0; i< MAX_REQUESTED_MSI_X; i++) { val64 = (BIT(15) | vBIT(i, 26, 6)); writeq(val64, &bar0->xmsi_access); if (wait_for_msix_trans(nic, i)) { @@ -3701,24 +3284,15 @@ static int s2io_enable_msi_x(nic_t *nic) writeq(tx_mat, &bar0->tx_mat0_n[7]); } - nic->avail_msix_vectors = 0; ret = pci_enable_msix(nic->pdev, nic->entries, MAX_REQUESTED_MSI_X); - /* We fail init if error or we get less vectors than min required */ - if (ret >= (nic->config.tx_fifo_num + nic->config.rx_ring_num + 1)) { - nic->avail_msix_vectors = ret; - ret = pci_enable_msix(nic->pdev, nic->entries, ret); - } if (ret) { DBG_PRINT(ERR_DBG, "%s: Enabling MSIX failed\n", nic->dev->name); kfree(nic->entries); kfree(nic->s2io_entries); nic->entries = NULL; nic->s2io_entries = NULL; - nic->avail_msix_vectors = 0; return -ENOMEM; } - if (!nic->avail_msix_vectors) - nic->avail_msix_vectors = MAX_REQUESTED_MSI_X; /* * To enable MSI-X, MSI also needs to be enabled, due to a bug @@ -3751,6 +3325,8 @@ static int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; int err = 0; + int i; + u16 msi_control; /* Temp variable */ /* * Make sure you have link off by default every time @@ -3760,25 +3336,100 @@ static int s2io_open(struct net_device *dev) sp->last_link_state = 0; /* Initialize H/W and enable interrupts */ - err = s2io_card_up(sp); - if (err) { + if (s2io_card_up(sp)) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); - goto hw_init_failed; - } - - if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) { - DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n"); - s2io_card_down(sp); err = -ENODEV; goto hw_init_failed; } - netif_start_queue(dev); - return 0; + /* Store the values of the MSIX table in the nic_t structure */ + store_xmsi_data(sp); -hw_init_failed: - if (sp->intr_type == MSI_X) { + /* After proper initialization of H/W, register ISR */ + if (sp->intr_type == MSI) { + err = request_irq((int) sp->pdev->irq, s2io_msi_handle, + SA_SHIRQ, sp->name, dev); + if (err) { + DBG_PRINT(ERR_DBG, "%s: MSI registration \ +failed\n", dev->name); + goto isr_registration_failed; + } + } + if (sp->intr_type == MSI_X) { + for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { + if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) { + sprintf(sp->desc1, "%s:MSI-X-%d-TX", + dev->name, i); + err = request_irq(sp->entries[i].vector, + s2io_msix_fifo_handle, 0, sp->desc1, + sp->s2io_entries[i].arg); + DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc1, + (unsigned long long)sp->msix_info[i].addr); + } else { + sprintf(sp->desc2, "%s:MSI-X-%d-RX", + dev->name, i); + err = request_irq(sp->entries[i].vector, + s2io_msix_ring_handle, 0, sp->desc2, + sp->s2io_entries[i].arg); + DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc2, + (unsigned long long)sp->msix_info[i].addr); + } + if (err) { + DBG_PRINT(ERR_DBG, "%s: MSI-X-%d registration \ +failed\n", dev->name, i); + DBG_PRINT(ERR_DBG, "Returned: %d\n", err); + goto isr_registration_failed; + } + sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS; + } + } + if (sp->intr_type == INTA) { + err = request_irq((int) sp->pdev->irq, s2io_isr, SA_SHIRQ, + sp->name, dev); + if (err) { + DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", + dev->name); + goto isr_registration_failed; + } + } + + if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) { + DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n"); + err = -ENODEV; + goto setting_mac_address_failed; + } + + netif_start_queue(dev); + return 0; + +setting_mac_address_failed: + if (sp->intr_type != MSI_X) + free_irq(sp->pdev->irq, dev); +isr_registration_failed: + del_timer_sync(&sp->alarm_timer); + if (sp->intr_type == MSI_X) { + if (sp->device_type == XFRAME_II_DEVICE) { + for (i=1; (sp->s2io_entries[i].in_use == + MSIX_REGISTERED_SUCCESS); i++) { + int vector = sp->entries[i].vector; + void *arg = sp->s2io_entries[i].arg; + + free_irq(vector, arg); + } + pci_disable_msix(sp->pdev); + + /* Temp */ + pci_read_config_word(sp->pdev, 0x42, &msi_control); + msi_control &= 0xFFFE; /* Disable MSI */ + pci_write_config_word(sp->pdev, 0x42, msi_control); + } + } + else if (sp->intr_type == MSI) + pci_disable_msi(sp->pdev); + s2io_reset(sp); +hw_init_failed: + if (sp->intr_type == MSI_X) { if (sp->entries) kfree(sp->entries); if (sp->s2io_entries) @@ -3803,12 +3454,35 @@ hw_init_failed: static int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; + int i; + u16 msi_control; flush_scheduled_work(); netif_stop_queue(dev); /* Reset card, kill tasklet and free Tx and Rx buffers. */ s2io_card_down(sp); + if (sp->intr_type == MSI_X) { + if (sp->device_type == XFRAME_II_DEVICE) { + for (i=1; (sp->s2io_entries[i].in_use == + MSIX_REGISTERED_SUCCESS); i++) { + int vector = sp->entries[i].vector; + void *arg = sp->s2io_entries[i].arg; + + free_irq(vector, arg); + } + pci_read_config_word(sp->pdev, 0x42, &msi_control); + msi_control &= 0xFFFE; /* Disable MSI */ + pci_write_config_word(sp->pdev, 0x42, msi_control); + + pci_disable_msix(sp->pdev); + } + } + else { + free_irq(sp->pdev->irq, dev); + if (sp->intr_type == MSI) + pci_disable_msi(sp->pdev); + } sp->device_close_flag = TRUE; /* Device is shut down. */ return 0; } @@ -3834,11 +3508,13 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) TxD_t *txdp; TxFIFO_element_t __iomem *tx_fifo; unsigned long flags; +#ifdef NETIF_F_TSO + int mss; +#endif u16 vlan_tag = 0; int vlan_priority = 0; mac_info_t *mac_control; struct config_param *config; - int offload_type; mac_control = &sp->mac_control; config = &sp->config; @@ -3869,8 +3545,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) queue_len = mac_control->fifos[queue].tx_curr_put_info.fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ - if (txdp->Host_Control || - ((put_off+1) == queue_len ? 0 : (put_off+1)) == get_off) { + if (txdp->Host_Control || (((put_off + 1) % queue_len) == get_off)) { DBG_PRINT(TX_DBG, "Error in xmit, No free TXDs.\n"); netif_stop_queue(dev); dev_kfree_skb(skb); @@ -3886,11 +3561,13 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) return 0; } - offload_type = s2io_offload_type(skb); + txdp->Control_1 = 0; + txdp->Control_2 = 0; #ifdef NETIF_F_TSO - if (offload_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) { + mss = skb_shinfo(skb)->gso_size; + if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { txdp->Control_1 |= TXD_TCP_LSO_EN; - txdp->Control_1 |= TXD_TCP_LSO_MSS(s2io_tcp_mss(skb)); + txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); } #endif if (skb->ip_summed == CHECKSUM_HW) { @@ -3908,10 +3585,10 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) } frg_len = skb->len - skb->data_len; - if (offload_type == SKB_GSO_UDP) { + if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { int ufo_size; - ufo_size = s2io_udp_mss(skb); + ufo_size = skb_shinfo(skb)->gso_size; ufo_size &= ~7; txdp->Control_1 |= TXD_UFO_EN; txdp->Control_1 |= TXD_UFO_MSS(ufo_size); @@ -3928,13 +3605,16 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) sp->ufo_in_band_v, sizeof(u64), PCI_DMA_TODEVICE); txdp++; + txdp->Control_1 = 0; + txdp->Control_2 = 0; } txdp->Buffer_Pointer = pci_map_single (sp->pdev, skb->data, frg_len, PCI_DMA_TODEVICE); txdp->Host_Control = (unsigned long) skb; txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); - if (offload_type == SKB_GSO_UDP) + + if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) txdp->Control_1 |= TXD_UFO_EN; frg_cnt = skb_shinfo(skb)->nr_frags; @@ -3949,12 +3629,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) (sp->pdev, frag->page, frag->page_offset, frag->size, PCI_DMA_TODEVICE); txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); - if (offload_type == SKB_GSO_UDP) + if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) txdp->Control_1 |= TXD_UFO_EN; } txdp->Control_1 |= TXD_GATHER_CODE_LAST; - if (offload_type == SKB_GSO_UDP) + if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) frg_cnt++; /* as Txd0 was used for inband header */ tx_fifo = mac_control->tx_FIFO_start[queue]; @@ -3963,21 +3643,23 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev) val64 = (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST | TX_FIFO_LAST_LIST); - if (offload_type) - val64 |= TX_FIFO_SPECIAL_FUNC; +#ifdef NETIF_F_TSO + if (mss) + val64 |= TX_FIFO_SPECIAL_FUNC; +#endif + if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) + val64 |= TX_FIFO_SPECIAL_FUNC; writeq(val64, &tx_fifo->List_Control); mmiowb(); put_off++; - if (put_off == mac_control->fifos[queue].tx_curr_put_info.fifo_len + 1) - put_off = 0; + put_off %= mac_control->fifos[queue].tx_curr_put_info.fifo_len + 1; mac_control->fifos[queue].tx_curr_put_info.offset = put_off; /* Avoid "put" pointer going beyond "get" pointer */ - if (((put_off+1) == queue_len ? 0 : (put_off+1)) == get_off) { - sp->mac_control.stats_info->sw_stat.fifo_full_cnt++; + if (((put_off + 1) % queue_len) == get_off) { DBG_PRINT(TX_DBG, "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", put_off, get_off); @@ -3999,41 +3681,13 @@ s2io_alarm_handle(unsigned long data) mod_timer(&sp->alarm_timer, jiffies + HZ / 2); } -static int s2io_chk_rx_buffers(nic_t *sp, int rng_n) -{ - int rxb_size, level; - - if (!sp->lro) { - rxb_size = atomic_read(&sp->rx_bufs_left[rng_n]); - level = rx_buffer_level(sp, rxb_size, rng_n); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; - DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", __FUNCTION__); - DBG_PRINT(INTR_DBG, "PANIC levels\n"); - if ((ret = fill_rx_buffers(sp, rng_n)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, "Out of memory in %s", - __FUNCTION__); - clear_bit(0, (&sp->tasklet_status)); - return -1; - } - clear_bit(0, (&sp->tasklet_status)); - } else if (level == LOW) - tasklet_schedule(&sp->task); - - } else if (fill_rx_buffers(sp, rng_n) == -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", sp->dev->name); - DBG_PRINT(ERR_DBG, " in Rx Intr!!\n"); - } - return 0; -} - static irqreturn_t s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; int i; + int ret; mac_info_t *mac_control; struct config_param *config; @@ -4055,8 +3709,35 @@ s2io_msi_handle(int irq, void *dev_id, struct pt_regs *regs) * reallocate the buffers from the interrupt handler itself, * else schedule a tasklet to reallocate the buffers. */ - for (i = 0; i < config->rx_ring_num; i++) - s2io_chk_rx_buffers(sp, i); + for (i = 0; i < config->rx_ring_num; i++) { + if (!sp->lro) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); + + if ((level == PANIC) && (!TASKLET_IN_USE)) { + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", + dev->name); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + clear_bit(0, (&sp->tasklet_status)); + atomic_dec(&sp->isr_cnt); + return IRQ_HANDLED; + } + clear_bit(0, (&sp->tasklet_status)); + } else if (level == LOW) { + tasklet_schedule(&sp->task); + } + } + else if (fill_rx_buffers(sp, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in Rx Intr!!\n"); + break; + } + } atomic_dec(&sp->isr_cnt); return IRQ_HANDLED; @@ -4067,13 +3748,39 @@ s2io_msix_ring_handle(int irq, void *dev_id, struct pt_regs *regs) { ring_info_t *ring = (ring_info_t *)dev_id; nic_t *sp = ring->nic; + struct net_device *dev = (struct net_device *) dev_id; + int rxb_size, level, rng_n; atomic_inc(&sp->isr_cnt); - rx_intr_handler(ring); - s2io_chk_rx_buffers(sp, ring->ring_no); + + rng_n = ring->ring_no; + if (!sp->lro) { + rxb_size = atomic_read(&sp->rx_bufs_left[rng_n]); + level = rx_buffer_level(sp, rxb_size, rng_n); + + if ((level == PANIC) && (!TASKLET_IN_USE)) { + int ret; + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", __FUNCTION__); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, rng_n)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "Out of memory in %s", + __FUNCTION__); + clear_bit(0, (&sp->tasklet_status)); + return IRQ_HANDLED; + } + clear_bit(0, (&sp->tasklet_status)); + } else if (level == LOW) { + tasklet_schedule(&sp->task); + } + } + else if (fill_rx_buffers(sp, rng_n) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Intr!!\n"); + } atomic_dec(&sp->isr_cnt); + return IRQ_HANDLED; } @@ -4088,6 +3795,7 @@ s2io_msix_fifo_handle(int irq, void *dev_id, struct pt_regs *regs) atomic_dec(&sp->isr_cnt); return IRQ_HANDLED; } + static void s2io_txpic_intr_handle(nic_t *sp) { XENA_dev_config_t __iomem *bar0 = sp->bar0; @@ -4098,56 +3806,41 @@ static void s2io_txpic_intr_handle(nic_t *sp) val64 = readq(&bar0->gpio_int_reg); if ((val64 & GPIO_INT_REG_LINK_DOWN) && (val64 & GPIO_INT_REG_LINK_UP)) { - /* - * This is unstable state so clear both up/down - * interrupt and adapter to re-evaluate the link state. - */ val64 |= GPIO_INT_REG_LINK_DOWN; val64 |= GPIO_INT_REG_LINK_UP; writeq(val64, &bar0->gpio_int_reg); + goto masking; + } + + if (((sp->last_link_state == LINK_UP) && + (val64 & GPIO_INT_REG_LINK_DOWN)) || + ((sp->last_link_state == LINK_DOWN) && + (val64 & GPIO_INT_REG_LINK_UP))) { val64 = readq(&bar0->gpio_int_mask); - val64 &= ~(GPIO_INT_MASK_LINK_UP | - GPIO_INT_MASK_LINK_DOWN); + val64 |= GPIO_INT_MASK_LINK_DOWN; + val64 |= GPIO_INT_MASK_LINK_UP; writeq(val64, &bar0->gpio_int_mask); + s2io_set_link((unsigned long)sp); } - else if (val64 & GPIO_INT_REG_LINK_UP) { - val64 = readq(&bar0->adapter_status); - if (verify_xena_quiescence(sp, val64, - sp->device_enabled_once)) { - /* Enable Adapter */ - val64 = readq(&bar0->adapter_control); - val64 |= ADAPTER_CNTL_EN; - writeq(val64, &bar0->adapter_control); - val64 |= ADAPTER_LED_ON; - writeq(val64, &bar0->adapter_control); - if (!sp->device_enabled_once) - sp->device_enabled_once = 1; - - s2io_link(sp, LINK_UP); - /* - * unmask link down interrupt and mask link-up - * intr - */ - val64 = readq(&bar0->gpio_int_mask); - val64 &= ~GPIO_INT_MASK_LINK_DOWN; - val64 |= GPIO_INT_MASK_LINK_UP; - writeq(val64, &bar0->gpio_int_mask); - - } - }else if (val64 & GPIO_INT_REG_LINK_DOWN) { - val64 = readq(&bar0->adapter_status); - if (verify_xena_quiescence(sp, val64, - sp->device_enabled_once)) { - s2io_link(sp, LINK_DOWN); - /* Link is down so unmaks link up interrupt */ - val64 = readq(&bar0->gpio_int_mask); - val64 &= ~GPIO_INT_MASK_LINK_UP; - val64 |= GPIO_INT_MASK_LINK_DOWN; - writeq(val64, &bar0->gpio_int_mask); - } +masking: + if (sp->last_link_state == LINK_UP) { + /*enable down interrupt */ + val64 = readq(&bar0->gpio_int_mask); + /* unmasks link down intr */ + val64 &= ~GPIO_INT_MASK_LINK_DOWN; + /* masks link up intr */ + val64 |= GPIO_INT_MASK_LINK_UP; + writeq(val64, &bar0->gpio_int_mask); + } else { + /*enable UP Interrupt */ + val64 = readq(&bar0->gpio_int_mask); + /* unmasks link up interrupt */ + val64 &= ~GPIO_INT_MASK_LINK_UP; + /* masks link down interrupt */ + val64 |= GPIO_INT_MASK_LINK_DOWN; + writeq(val64, &bar0->gpio_int_mask); } } - val64 = readq(&bar0->gpio_int_mask); } /** @@ -4170,7 +3863,7 @@ static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs) nic_t *sp = dev->priv; XENA_dev_config_t __iomem *bar0 = sp->bar0; int i; - u64 reason = 0, val64, org_mask; + u64 reason = 0, val64; mac_info_t *mac_control; struct config_param *config; @@ -4194,41 +3887,43 @@ static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs) return IRQ_NONE; } - val64 = 0xFFFFFFFFFFFFFFFFULL; - /* Store current mask before masking all interrupts */ - org_mask = readq(&bar0->general_int_mask); - writeq(val64, &bar0->general_int_mask); - #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - writeq(val64, &bar0->rx_traffic_mask); + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); __netif_rx_schedule(dev); } } #else - /* - * Rx handler is called by default, without checking for the - * cause of interrupt. - * rx_traffic_int reg is an R1 register, writing all 1's - * will ensure that the actual interrupt causing bit get's - * cleared and hence a read can be avoided. - */ - writeq(val64, &bar0->rx_traffic_int); - for (i = 0; i < config->rx_ring_num; i++) { - rx_intr_handler(&mac_control->rings[i]); + /* If Intr is because of Rx Traffic */ + if (reason & GEN_INTR_RXTRAFFIC) { + /* + * rx_traffic_int reg is an R1 register, writing all 1's + * will ensure that the actual interrupt causing bit get's + * cleared and hence a read can be avoided. + */ + val64 = 0xFFFFFFFFFFFFFFFFULL; + writeq(val64, &bar0->rx_traffic_int); + for (i = 0; i < config->rx_ring_num; i++) { + rx_intr_handler(&mac_control->rings[i]); + } } #endif - /* - * tx_traffic_int reg is an R1 register, writing all 1's - * will ensure that the actual interrupt causing bit get's - * cleared and hence a read can be avoided. - */ - writeq(val64, &bar0->tx_traffic_int); + /* If Intr is because of Tx Traffic */ + if (reason & GEN_INTR_TXTRAFFIC) { + /* + * tx_traffic_int reg is an R1 register, writing all 1's + * will ensure that the actual interrupt causing bit get's + * cleared and hence a read can be avoided. + */ + val64 = 0xFFFFFFFFFFFFFFFFULL; + writeq(val64, &bar0->tx_traffic_int); - for (i = 0; i < config->tx_fifo_num; i++) - tx_intr_handler(&mac_control->fifos[i]); + for (i = 0; i < config->tx_fifo_num; i++) + tx_intr_handler(&mac_control->fifos[i]); + } if (reason & GEN_INTR_TXPIC) s2io_txpic_intr_handle(sp); @@ -4238,10 +3933,38 @@ static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs) * else schedule a tasklet to reallocate the buffers. */ #ifndef CONFIG_S2IO_NAPI - for (i = 0; i < config->rx_ring_num; i++) - s2io_chk_rx_buffers(sp, i); + for (i = 0; i < config->rx_ring_num; i++) { + if (!sp->lro) { + int ret; + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); + + if ((level == PANIC) && (!TASKLET_IN_USE)) { + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", + dev->name); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + clear_bit(0, (&sp->tasklet_status)); + atomic_dec(&sp->isr_cnt); + return IRQ_HANDLED; + } + clear_bit(0, (&sp->tasklet_status)); + } else if (level == LOW) { + tasklet_schedule(&sp->task); + } + } + else if (fill_rx_buffers(sp, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in Rx intr!!\n"); + break; + } + } #endif - writeq(org_mask, &bar0->general_int_mask); + atomic_dec(&sp->isr_cnt); return IRQ_HANDLED; } @@ -4269,8 +3992,6 @@ static void s2io_updt_stats(nic_t *sp) if (cnt == 5) break; /* Updt failed */ } while(1); - } else { - memset(sp->mac_control.stats_info, 0, sizeof(StatInfo_t)); } } @@ -4346,8 +4067,7 @@ static void s2io_set_multicast(struct net_device *dev) RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING); + wait_for_cmd_complete(sp); sp->m_cast_flg = 1; sp->all_multi_pos = MAC_MC_ALL_MC_ADDR_OFFSET; @@ -4362,8 +4082,7 @@ static void s2io_set_multicast(struct net_device *dev) RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING); + wait_for_cmd_complete(sp); sp->m_cast_flg = 0; sp->all_multi_pos = 0; @@ -4428,8 +4147,7 @@ static void s2io_set_multicast(struct net_device *dev) writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -4459,8 +4177,7 @@ static void s2io_set_multicast(struct net_device *dev) writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -4505,8 +4222,7 @@ static int s2io_set_mac_addr(struct net_device *dev, u8 * addr) RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -4903,50 +4619,6 @@ static int write_eeprom(nic_t * sp, int off, u64 data, int cnt) } return ret; } -static void s2io_vpd_read(nic_t *nic) -{ - u8 *vpd_data; - u8 data; - int i=0, cnt, fail = 0; - int vpd_addr = 0x80; - - if (nic->device_type == XFRAME_II_DEVICE) { - strcpy(nic->product_name, "Xframe II 10GbE network adapter"); - vpd_addr = 0x80; - } - else { - strcpy(nic->product_name, "Xframe I 10GbE network adapter"); - vpd_addr = 0x50; - } - - vpd_data = kmalloc(256, GFP_KERNEL); - if (!vpd_data) - return; - - for (i = 0; i < 256; i +=4 ) { - pci_write_config_byte(nic->pdev, (vpd_addr + 2), i); - pci_read_config_byte(nic->pdev, (vpd_addr + 2), &data); - pci_write_config_byte(nic->pdev, (vpd_addr + 3), 0); - for (cnt = 0; cnt <5; cnt++) { - msleep(2); - pci_read_config_byte(nic->pdev, (vpd_addr + 3), &data); - if (data == 0x80) - break; - } - if (cnt >= 5) { - DBG_PRINT(ERR_DBG, "Read of VPD data failed\n"); - fail = 1; - break; - } - pci_read_config_dword(nic->pdev, (vpd_addr + 4), - (u32 *)&vpd_data[i]); - } - if ((!fail) && (vpd_data[1] < VPD_PRODUCT_NAME_LEN)) { - memset(nic->product_name, 0, vpd_data[1]); - memcpy(nic->product_name, &vpd_data[3], vpd_data[1]); - } - kfree(vpd_data); -} /** * s2io_ethtool_geeprom - reads the value stored in the Eeprom. @@ -5259,12 +4931,10 @@ static int s2io_link_test(nic_t * sp, uint64_t * data) u64 val64; val64 = readq(&bar0->adapter_status); - if(!(LINK_IS_UP(val64))) + if (val64 & ADAPTER_STATUS_RMAC_LOCAL_FAULT) *data = 1; - else - *data = 0; - return *data; + return 0; } /** @@ -5442,6 +5112,7 @@ static void s2io_get_ethtool_stats(struct net_device *dev, int i = 0; nic_t *sp = dev->priv; StatInfo_t *stat_info = sp->mac_control.stats_info; + u64 tmp; s2io_updt_stats(sp); tmp_stats[i++] = @@ -5458,19 +5129,9 @@ static void s2io_get_ethtool_stats(struct net_device *dev, (u64)le32_to_cpu(stat_info->tmac_bcst_frms_oflow) << 32 | le32_to_cpu(stat_info->tmac_bcst_frms); tmp_stats[i++] = le64_to_cpu(stat_info->tmac_pause_ctrl_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->tmac_ttl_octets_oflow) << 32 | - le32_to_cpu(stat_info->tmac_ttl_octets); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->tmac_ucst_frms_oflow) << 32 | - le32_to_cpu(stat_info->tmac_ucst_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->tmac_nucst_frms_oflow) << 32 | - le32_to_cpu(stat_info->tmac_nucst_frms); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->tmac_any_err_frms_oflow) << 32 | le32_to_cpu(stat_info->tmac_any_err_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->tmac_ttl_less_fb_octets); tmp_stats[i++] = le64_to_cpu(stat_info->tmac_vld_ip_octets); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->tmac_vld_ip_oflow) << 32 | @@ -5502,27 +5163,11 @@ static void s2io_get_ethtool_stats(struct net_device *dev, (u64)le32_to_cpu(stat_info->rmac_vld_bcst_frms_oflow) << 32 | le32_to_cpu(stat_info->rmac_vld_bcst_frms); tmp_stats[i++] = le32_to_cpu(stat_info->rmac_in_rng_len_err_frms); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_out_rng_len_err_frms); tmp_stats[i++] = le64_to_cpu(stat_info->rmac_long_frms); tmp_stats[i++] = le64_to_cpu(stat_info->rmac_pause_ctrl_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_unsup_ctrl_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_ttl_octets_oflow) << 32 | - le32_to_cpu(stat_info->rmac_ttl_octets); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_accepted_ucst_frms_oflow) - << 32 | le32_to_cpu(stat_info->rmac_accepted_ucst_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_accepted_nucst_frms_oflow) - << 32 | le32_to_cpu(stat_info->rmac_accepted_nucst_frms); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_discarded_frms_oflow) << 32 | le32_to_cpu(stat_info->rmac_discarded_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_drop_events_oflow) - << 32 | le32_to_cpu(stat_info->rmac_drop_events); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_less_fb_octets); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_frms); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_usized_frms_oflow) << 32 | le32_to_cpu(stat_info->rmac_usized_frms); @@ -5535,129 +5180,40 @@ static void s2io_get_ethtool_stats(struct net_device *dev, tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_jabber_frms_oflow) << 32 | le32_to_cpu(stat_info->rmac_jabber_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_64_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_65_127_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_128_255_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_256_511_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_512_1023_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_1024_1518_frms); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_ip_oflow) << 32 | + tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_ip_oflow) << 32 | le32_to_cpu(stat_info->rmac_ip); tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ip_octets); tmp_stats[i++] = le32_to_cpu(stat_info->rmac_hdr_err_ip); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_drop_ip_oflow) << 32 | + tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_drop_ip_oflow) << 32 | le32_to_cpu(stat_info->rmac_drop_ip); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_icmp_oflow) << 32 | + tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_icmp_oflow) << 32 | le32_to_cpu(stat_info->rmac_icmp); tmp_stats[i++] = le64_to_cpu(stat_info->rmac_tcp); - tmp_stats[i++] = - (u64)le32_to_cpu(stat_info->rmac_udp_oflow) << 32 | + tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_udp_oflow) << 32 | le32_to_cpu(stat_info->rmac_udp); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_err_drp_udp_oflow) << 32 | le32_to_cpu(stat_info->rmac_err_drp_udp); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_xgmii_err_sym); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q0); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q1); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q2); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q3); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q4); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q5); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q6); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_frms_q7); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q0); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q1); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q2); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q3); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q4); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q5); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q6); - tmp_stats[i++] = le16_to_cpu(stat_info->rmac_full_q7); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_pause_cnt_oflow) << 32 | le32_to_cpu(stat_info->rmac_pause_cnt); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_xgmii_data_err_cnt); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_xgmii_ctrl_err_cnt); tmp_stats[i++] = (u64)le32_to_cpu(stat_info->rmac_accepted_ip_oflow) << 32 | le32_to_cpu(stat_info->rmac_accepted_ip); tmp_stats[i++] = le32_to_cpu(stat_info->rmac_err_tcp); - tmp_stats[i++] = le32_to_cpu(stat_info->rd_req_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->new_rd_req_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->new_rd_req_rtry_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->rd_rtry_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->wr_rtry_rd_ack_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->wr_req_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->new_wr_req_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->new_wr_req_rtry_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->wr_rtry_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->wr_disc_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->rd_rtry_wr_ack_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->txp_wr_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->txd_rd_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->txd_wr_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->rxd_rd_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->rxd_wr_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->txf_rd_cnt); - tmp_stats[i++] = le32_to_cpu(stat_info->rxf_wr_cnt); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_1519_4095_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_4096_8191_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_8192_max_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_ttl_gt_max_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_osized_alt_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_jabber_alt_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_gt_max_alt_frms); - tmp_stats[i++] = le64_to_cpu(stat_info->rmac_vlan_frms); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_len_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_fcs_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_pf_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_da_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_red_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_rts_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->rmac_ingm_full_discard); - tmp_stats[i++] = le32_to_cpu(stat_info->link_fault_cnt); tmp_stats[i++] = 0; tmp_stats[i++] = stat_info->sw_stat.single_ecc_errs; tmp_stats[i++] = stat_info->sw_stat.double_ecc_errs; - tmp_stats[i++] = stat_info->sw_stat.parity_err_cnt; - tmp_stats[i++] = stat_info->sw_stat.serious_err_cnt; - tmp_stats[i++] = stat_info->sw_stat.soft_reset_cnt; - tmp_stats[i++] = stat_info->sw_stat.fifo_full_cnt; - tmp_stats[i++] = stat_info->sw_stat.ring_full_cnt; - tmp_stats[i++] = stat_info->xpak_stat.alarm_transceiver_temp_high; - tmp_stats[i++] = stat_info->xpak_stat.alarm_transceiver_temp_low; - tmp_stats[i++] = stat_info->xpak_stat.alarm_laser_bias_current_high; - tmp_stats[i++] = stat_info->xpak_stat.alarm_laser_bias_current_low; - tmp_stats[i++] = stat_info->xpak_stat.alarm_laser_output_power_high; - tmp_stats[i++] = stat_info->xpak_stat.alarm_laser_output_power_low; - tmp_stats[i++] = stat_info->xpak_stat.warn_transceiver_temp_high; - tmp_stats[i++] = stat_info->xpak_stat.warn_transceiver_temp_low; - tmp_stats[i++] = stat_info->xpak_stat.warn_laser_bias_current_high; - tmp_stats[i++] = stat_info->xpak_stat.warn_laser_bias_current_low; - tmp_stats[i++] = stat_info->xpak_stat.warn_laser_output_power_high; - tmp_stats[i++] = stat_info->xpak_stat.warn_laser_output_power_low; tmp_stats[i++] = stat_info->sw_stat.clubbed_frms_cnt; tmp_stats[i++] = stat_info->sw_stat.sending_both; tmp_stats[i++] = stat_info->sw_stat.outof_sequence_pkts; tmp_stats[i++] = stat_info->sw_stat.flush_max_pkts; + tmp = 0; if (stat_info->sw_stat.num_aggregations) { - u64 tmp = stat_info->sw_stat.sum_avg_pkts_aggregated; - int count = 0; - /* - * Since 64-bit divide does not work on all platforms, - * do repeated subtraction. - */ - while (tmp >= stat_info->sw_stat.num_aggregations) { - tmp -= stat_info->sw_stat.num_aggregations; - count++; - } - tmp_stats[i++] = count; + tmp = stat_info->sw_stat.sum_avg_pkts_aggregated; + do_div(tmp, stat_info->sw_stat.num_aggregations); } - else - tmp_stats[i++] = 0; + tmp_stats[i++] = tmp; } static int s2io_ethtool_get_regs_len(struct net_device *dev) @@ -5722,19 +5278,6 @@ static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) return 0; } -static u32 s2io_ethtool_op_get_tso(struct net_device *dev) -{ - return (dev->features & NETIF_F_TSO) != 0; -} -static int s2io_ethtool_op_set_tso(struct net_device *dev, u32 data) -{ - if (data) - dev->features |= (NETIF_F_TSO | NETIF_F_TSO6); - else - dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6); - - return 0; -} static struct ethtool_ops netdev_ethtool_ops = { .get_settings = s2io_ethtool_gset, @@ -5755,8 +5298,8 @@ static struct ethtool_ops netdev_ethtool_ops = { .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO - .get_tso = s2io_ethtool_op_get_tso, - .set_tso = s2io_ethtool_op_set_tso, + .get_tso = ethtool_op_get_tso, + .set_tso = ethtool_op_set_tso, #endif .get_ufo = ethtool_op_get_ufo, .set_ufo = ethtool_op_set_ufo, @@ -5946,277 +5489,6 @@ static void s2io_set_link(unsigned long data) clear_bit(0, &(nic->link_state)); } -static int set_rxd_buffer_pointer(nic_t *sp, RxD_t *rxdp, buffAdd_t *ba, - struct sk_buff **skb, u64 *temp0, u64 *temp1, - u64 *temp2, int size) -{ - struct net_device *dev = sp->dev; - struct sk_buff *frag_list; - - if ((sp->rxd_mode == RXD_MODE_1) && (rxdp->Host_Control == 0)) { - /* allocate skb */ - if (*skb) { - DBG_PRINT(INFO_DBG, "SKB is not NULL\n"); - /* - * As Rx frame are not going to be processed, - * using same mapped address for the Rxd - * buffer pointer - */ - ((RxD1_t*)rxdp)->Buffer0_ptr = *temp0; - } else { - *skb = dev_alloc_skb(size); - if (!(*skb)) { - DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); - DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n"); - return -ENOMEM ; - } - /* storing the mapped addr in a temp variable - * such it will be used for next rxd whose - * Host Control is NULL - */ - ((RxD1_t*)rxdp)->Buffer0_ptr = *temp0 = - pci_map_single( sp->pdev, (*skb)->data, - size - NET_IP_ALIGN, - PCI_DMA_FROMDEVICE); - rxdp->Host_Control = (unsigned long) (*skb); - } - } else if ((sp->rxd_mode == RXD_MODE_3B) && (rxdp->Host_Control == 0)) { - /* Two buffer Mode */ - if (*skb) { - ((RxD3_t*)rxdp)->Buffer2_ptr = *temp2; - ((RxD3_t*)rxdp)->Buffer0_ptr = *temp0; - ((RxD3_t*)rxdp)->Buffer1_ptr = *temp1; - } else { - *skb = dev_alloc_skb(size); - ((RxD3_t*)rxdp)->Buffer2_ptr = *temp2 = - pci_map_single(sp->pdev, (*skb)->data, - dev->mtu + 4, - PCI_DMA_FROMDEVICE); - ((RxD3_t*)rxdp)->Buffer0_ptr = *temp0 = - pci_map_single( sp->pdev, ba->ba_0, BUF0_LEN, - PCI_DMA_FROMDEVICE); - rxdp->Host_Control = (unsigned long) (*skb); - - /* Buffer-1 will be dummy buffer not used */ - ((RxD3_t*)rxdp)->Buffer1_ptr = *temp1 = - pci_map_single(sp->pdev, ba->ba_1, BUF1_LEN, - PCI_DMA_FROMDEVICE); - } - } else if ((rxdp->Host_Control == 0)) { - /* Three buffer mode */ - if (*skb) { - ((RxD3_t*)rxdp)->Buffer0_ptr = *temp0; - ((RxD3_t*)rxdp)->Buffer1_ptr = *temp1; - ((RxD3_t*)rxdp)->Buffer2_ptr = *temp2; - } else { - *skb = dev_alloc_skb(size); - - ((RxD3_t*)rxdp)->Buffer0_ptr = *temp0 = - pci_map_single(sp->pdev, ba->ba_0, BUF0_LEN, - PCI_DMA_FROMDEVICE); - /* Buffer-1 receives L3/L4 headers */ - ((RxD3_t*)rxdp)->Buffer1_ptr = *temp1 = - pci_map_single( sp->pdev, (*skb)->data, - l3l4hdr_size + 4, - PCI_DMA_FROMDEVICE); - /* - * skb_shinfo(skb)->frag_list will have L4 - * data payload - */ - skb_shinfo(*skb)->frag_list = dev_alloc_skb(dev->mtu + - ALIGN_SIZE); - if (skb_shinfo(*skb)->frag_list == NULL) { - DBG_PRINT(ERR_DBG, "%s: dev_alloc_skb \ - failed\n ", dev->name); - return -ENOMEM ; - } - frag_list = skb_shinfo(*skb)->frag_list; - frag_list->next = NULL; - /* - * Buffer-2 receives L4 data payload - */ - ((RxD3_t*)rxdp)->Buffer2_ptr = *temp2 = - pci_map_single( sp->pdev, frag_list->data, - dev->mtu, PCI_DMA_FROMDEVICE); - } - } - return 0; -} -static void set_rxd_buffer_size(nic_t *sp, RxD_t *rxdp, int size) -{ - struct net_device *dev = sp->dev; - if (sp->rxd_mode == RXD_MODE_1) { - rxdp->Control_2 = SET_BUFFER0_SIZE_1( size - NET_IP_ALIGN); - } else if (sp->rxd_mode == RXD_MODE_3B) { - rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN); - rxdp->Control_2 |= SET_BUFFER1_SIZE_3(1); - rxdp->Control_2 |= SET_BUFFER2_SIZE_3( dev->mtu + 4); - } else { - rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN); - rxdp->Control_2 |= SET_BUFFER1_SIZE_3(l3l4hdr_size + 4); - rxdp->Control_2 |= SET_BUFFER2_SIZE_3(dev->mtu); - } -} - -static int rxd_owner_bit_reset(nic_t *sp) -{ - int i, j, k, blk_cnt = 0, size; - mac_info_t * mac_control = &sp->mac_control; - struct config_param *config = &sp->config; - struct net_device *dev = sp->dev; - RxD_t *rxdp = NULL; - struct sk_buff *skb = NULL; - buffAdd_t *ba = NULL; - u64 temp0_64 = 0, temp1_64 = 0, temp2_64 = 0; - - /* Calculate the size based on ring mode */ - size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE + - HEADER_802_2_SIZE + HEADER_SNAP_SIZE; - if (sp->rxd_mode == RXD_MODE_1) - size += NET_IP_ALIGN; - else if (sp->rxd_mode == RXD_MODE_3B) - size = dev->mtu + ALIGN_SIZE + BUF0_LEN + 4; - else - size = l3l4hdr_size + ALIGN_SIZE + BUF0_LEN + 4; - - for (i = 0; i < config->rx_ring_num; i++) { - blk_cnt = config->rx_cfg[i].num_rxd / - (rxd_count[sp->rxd_mode] +1); - - for (j = 0; j < blk_cnt; j++) { - for (k = 0; k < rxd_count[sp->rxd_mode]; k++) { - rxdp = mac_control->rings[i]. - rx_blocks[j].rxds[k].virt_addr; - if(sp->rxd_mode >= RXD_MODE_3A) - ba = &mac_control->rings[i].ba[j][k]; - set_rxd_buffer_pointer(sp, rxdp, ba, - &skb,(u64 *)&temp0_64, - (u64 *)&temp1_64, - (u64 *)&temp2_64, size); - - set_rxd_buffer_size(sp, rxdp, size); - wmb(); - /* flip the Ownership bit to Hardware */ - rxdp->Control_1 |= RXD_OWN_XENA; - } - } - } - return 0; - -} - -static int s2io_add_isr(nic_t * sp) -{ - int ret = 0; - struct net_device *dev = sp->dev; - int err = 0; - - if (sp->intr_type == MSI) - ret = s2io_enable_msi(sp); - else if (sp->intr_type == MSI_X) - ret = s2io_enable_msi_x(sp); - if (ret) { - DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name); - sp->intr_type = INTA; - } - - /* Store the values of the MSIX table in the nic_t structure */ - store_xmsi_data(sp); - - /* After proper initialization of H/W, register ISR */ - if (sp->intr_type == MSI) { - err = request_irq((int) sp->pdev->irq, s2io_msi_handle, - IRQF_SHARED, sp->name, dev); - if (err) { - pci_disable_msi(sp->pdev); - DBG_PRINT(ERR_DBG, "%s: MSI registration failed\n", - dev->name); - return -1; - } - } - if (sp->intr_type == MSI_X) { - int i; - - for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { - if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) { - sprintf(sp->desc[i], "%s:MSI-X-%d-TX", - dev->name, i); - err = request_irq(sp->entries[i].vector, - s2io_msix_fifo_handle, 0, sp->desc[i], - sp->s2io_entries[i].arg); - DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc[i], - (unsigned long long)sp->msix_info[i].addr); - } else { - sprintf(sp->desc[i], "%s:MSI-X-%d-RX", - dev->name, i); - err = request_irq(sp->entries[i].vector, - s2io_msix_ring_handle, 0, sp->desc[i], - sp->s2io_entries[i].arg); - DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc[i], - (unsigned long long)sp->msix_info[i].addr); - } - if (err) { - DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration " - "failed\n", dev->name, i); - DBG_PRINT(ERR_DBG, "Returned: %d\n", err); - return -1; - } - sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS; - } - } - if (sp->intr_type == INTA) { - err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, - sp->name, dev); - if (err) { - DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", - dev->name); - return -1; - } - } - return 0; -} -static void s2io_rem_isr(nic_t * sp) -{ - int cnt = 0; - struct net_device *dev = sp->dev; - - if (sp->intr_type == MSI_X) { - int i; - u16 msi_control; - - for (i=1; (sp->s2io_entries[i].in_use == - MSIX_REGISTERED_SUCCESS); i++) { - int vector = sp->entries[i].vector; - void *arg = sp->s2io_entries[i].arg; - - free_irq(vector, arg); - } - pci_read_config_word(sp->pdev, 0x42, &msi_control); - msi_control &= 0xFFFE; /* Disable MSI */ - pci_write_config_word(sp->pdev, 0x42, msi_control); - - pci_disable_msix(sp->pdev); - } else { - free_irq(sp->pdev->irq, dev); - if (sp->intr_type == MSI) { - u16 val; - - pci_disable_msi(sp->pdev); - pci_read_config_word(sp->pdev, 0x4c, &val); - val ^= 0x1; - pci_write_config_word(sp->pdev, 0x4c, val); - } - } - /* Waiting till all Interrupt handlers are complete */ - cnt = 0; - do { - msleep(10); - if (!atomic_read(&sp->isr_cnt)) - break; - cnt++; - } while(cnt < 5); -} - static void s2io_card_down(nic_t * sp) { int cnt = 0; @@ -6234,22 +5506,11 @@ static void s2io_card_down(nic_t * sp) /* disable Tx and Rx traffic on the NIC */ stop_nic(sp); - s2io_rem_isr(sp); - /* Kill tasklet. */ tasklet_kill(&sp->task); /* Check if the device is Quiescent and then Reset the NIC */ do { - /* As per the HW requirement we need to replenish the - * receive buffer to avoid the ring bump. Since there is - * no intention of processing the Rx frame at this pointwe are - * just settting the ownership bit of rxd in Each Rx - * ring to HW and set the appropriate buffer size - * based on the ring mode - */ - rxd_owner_bit_reset(sp); - val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(sp, val64, sp->device_enabled_once)) { break; @@ -6267,6 +5528,15 @@ static void s2io_card_down(nic_t * sp) } while (1); s2io_reset(sp); + /* Waiting till all Interrupt handlers are complete */ + cnt = 0; + do { + msleep(10); + if (!atomic_read(&sp->isr_cnt)) + break; + cnt++; + } while(cnt < 5); + spin_lock_irqsave(&sp->tx_lock, flags); /* Free all Tx buffers */ free_tx_buffers(sp); @@ -6286,16 +5556,23 @@ static int s2io_card_up(nic_t * sp) mac_info_t *mac_control; struct config_param *config; struct net_device *dev = (struct net_device *) sp->dev; - u16 interruptible; /* Initialize the H/W I/O registers */ if (init_nic(sp) != 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); - s2io_reset(sp); return -ENODEV; } + if (sp->intr_type == MSI) + ret = s2io_enable_msi(sp); + else if (sp->intr_type == MSI_X) + ret = s2io_enable_msi_x(sp); + if (ret) { + DBG_PRINT(ERR_DBG, "%s: Defaulting to INTA\n", dev->name); + sp->intr_type = INTA; + } + /* * Initializing the Rx buffers. For now we are considering only 1 * Rx ring and initializing buffers into 30 Rx blocks @@ -6319,46 +5596,28 @@ static int s2io_card_up(nic_t * sp) s2io_set_multicast(dev); if (sp->lro) { - /* Initialize max aggregatable pkts per session based on MTU */ + /* Initialize max aggregatable pkts based on MTU */ sp->lro_max_aggr_per_sess = ((1<<16) - 1) / dev->mtu; /* Check if we can use(if specified) user provided value */ if (lro_max_pkts < sp->lro_max_aggr_per_sess) sp->lro_max_aggr_per_sess = lro_max_pkts; } + /* Enable tasklet for the device */ + tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); + /* Enable Rx Traffic and interrupts on the NIC */ if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); + tasklet_kill(&sp->task); s2io_reset(sp); - free_rx_buffers(sp); - return -ENODEV; - } - - /* Add interrupt service routine */ - if (s2io_add_isr(sp) != 0) { - if (sp->intr_type == MSI_X) - s2io_rem_isr(sp); - s2io_reset(sp); + free_irq(dev->irq, dev); free_rx_buffers(sp); return -ENODEV; } S2IO_TIMER_CONF(sp->alarm_timer, s2io_alarm_handle, sp, (HZ/2)); - /* Enable tasklet for the device */ - tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); - - /* Enable select interrupts */ - if (sp->intr_type != INTA) - en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS); - else { - interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; - interruptible |= TX_PIC_INTR | RX_PIC_INTR; - interruptible |= TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_nic_intrs(sp, interruptible, ENABLE_INTRS); - } - - atomic_set(&sp->card_state, CARD_UP); return 0; } @@ -6408,7 +5667,6 @@ static void s2io_tx_watchdog(struct net_device *dev) if (netif_carrier_ok(dev)) { schedule_work(&sp->rst_timer_task); - sp->mac_control.stats_info->sw_stat.soft_reset_cnt++; } } @@ -6420,7 +5678,7 @@ static void s2io_tx_watchdog(struct net_device *dev) * @cksum : FCS checksum of the frame. * @ring_no : the ring from which this RxD was extracted. * Description: - * This function is called by the Rx interrupt serivce routine to perform + * This function is called by the Tx interrupt serivce routine to perform * some OS related operations on the SKB before passing it to the upper * layers. It mainly checks if the checksum is OK, if so adds it to the * SKBs cksum variable, increments the Rx packet count and passes the SKB @@ -6437,33 +5695,18 @@ static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp) ((unsigned long) rxdp->Host_Control); int ring_no = ring_data->ring_no; u16 l3_csum, l4_csum; - unsigned long long err = rxdp->Control_1 & RXD_T_CODE; lro_t *lro; skb->dev = dev; - - if (err) { - /* Check for parity error */ - if (err & 0x1) { - sp->mac_control.stats_info->sw_stat.parity_err_cnt++; - } - - /* - * Drop the packet if bad transfer code. Exception being - * 0x5, which could be due to unsupported IPv6 extension header. - * In this case, we let stack handle the packet. - * Note that in this case, since checksum will be incorrect, - * stack will validate the same. - */ - if (err && ((err >> 48) != 0x5)) { - DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", - dev->name, err); - sp->stats.rx_crc_errors++; - dev_kfree_skb(skb); - atomic_dec(&sp->rx_bufs_left[ring_no]); - rxdp->Host_Control = 0; - return 0; - } + if (rxdp->Control_1 & RXD_T_CODE) { + unsigned long long err = rxdp->Control_1 & RXD_T_CODE; + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", + dev->name, err); + dev_kfree_skb(skb); + sp->stats.rx_crc_errors++; + atomic_dec(&sp->rx_bufs_left[ring_no]); + rxdp->Host_Control = 0; + return 0; } /* Updating statistics */ @@ -6549,9 +5792,6 @@ static int rx_osm_handler(ring_info_t *ring_data, RxD_t * rxdp) clear_lro_session(lro); goto send_up; case 0: /* sessions exceeded */ - case -1: /* non-TCP or not - * L2 aggregatable - */ case 5: /* * First pkt in session not * L3/L4 aggregatable @@ -6678,56 +5918,41 @@ static void s2io_init_pci(nic_t * sp) pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); + + /* Forcibly disabling relaxed ordering capability of the card. */ + pcix_cmd &= 0xfffd; + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + pcix_cmd); + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + &(pcix_cmd)); } -static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type) -{ - if ( tx_fifo_num > 8) { - DBG_PRINT(ERR_DBG, "s2io: Requested number of Tx fifos not " - "supported\n"); - DBG_PRINT(ERR_DBG, "s2io: Default to 8 Tx fifos\n"); - tx_fifo_num = 8; - } - if ( rx_ring_num > 8) { - DBG_PRINT(ERR_DBG, "s2io: Requested number of Rx rings not " - "supported\n"); - DBG_PRINT(ERR_DBG, "s2io: Default to 8 Rx rings\n"); - rx_ring_num = 8; - } -#ifdef CONFIG_S2IO_NAPI - if (*dev_intr_type != INTA) { - DBG_PRINT(ERR_DBG, "s2io: NAPI cannot be enabled when " - "MSI/MSI-X is enabled. Defaulting to INTA\n"); - *dev_intr_type = INTA; - } -#endif -#ifndef CONFIG_PCI_MSI - if (*dev_intr_type != INTA) { - DBG_PRINT(ERR_DBG, "s2io: This kernel does not support" - "MSI/MSI-X. Defaulting to INTA\n"); - *dev_intr_type = INTA; - } -#else - if (*dev_intr_type > MSI_X) { - DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. " - "Defaulting to INTA\n"); - *dev_intr_type = INTA; - } +MODULE_AUTHOR("Raghavendra Koushik "); +MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); + +module_param(tx_fifo_num, int, 0); +module_param(rx_ring_num, int, 0); +module_param(rx_ring_mode, int, 0); +module_param_array(tx_fifo_len, uint, NULL, 0); +module_param_array(rx_ring_sz, uint, NULL, 0); +module_param_array(rts_frm_len, uint, NULL, 0); +module_param(use_continuous_tx_intrs, int, 1); +module_param(rmac_pause_time, int, 0); +module_param(mc_pause_threshold_q0q3, int, 0); +module_param(mc_pause_threshold_q4q7, int, 0); +module_param(shared_splits, int, 0); +module_param(tmac_util_period, int, 0); +module_param(rmac_util_period, int, 0); +module_param(bimodal, bool, 0); +module_param(l3l4hdr_size, int , 0); +#ifndef CONFIG_S2IO_NAPI +module_param(indicate_max_pkts, int, 0); #endif - if ((*dev_intr_type == MSI_X) && - ((pdev->device != PCI_DEVICE_ID_HERC_WIN) && - (pdev->device != PCI_DEVICE_ID_HERC_UNI))) { - DBG_PRINT(ERR_DBG, "s2io: Xframe I does not support MSI_X. " - "Defaulting to INTA\n"); - *dev_intr_type = INTA; - } - if (rx_ring_mode > 3) { - DBG_PRINT(ERR_DBG, "s2io: Requested ring mode not supported\n"); - DBG_PRINT(ERR_DBG, "s2io: Defaulting to 3-buffer mode\n"); - rx_ring_mode = 3; - } - return SUCCESS; -} +module_param(rxsync_frequency, int, 0); +module_param(intr_type, int, 0); +module_param(lro, int, 0); +module_param(lro_max_pkts, int, 0); /** * s2io_init_nic - Initialization of the adapter . @@ -6759,8 +5984,15 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) int mode; u8 dev_intr_type = intr_type; - if ((ret = s2io_verify_parm(pdev, &dev_intr_type))) - return ret; +#ifdef CONFIG_S2IO_NAPI + if (dev_intr_type != INTA) { + DBG_PRINT(ERR_DBG, "NAPI cannot be enabled when MSI/MSI-X \ +is enabled. Defaulting to INTA\n"); + dev_intr_type = INTA; + } + else + DBG_PRINT(ERR_DBG, "NAPI support has been enabled\n"); +#endif if ((ret = pci_enable_device(pdev))) { DBG_PRINT(ERR_DBG, @@ -6785,10 +6017,18 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) pci_disable_device(pdev); return -ENOMEM; } + + if ((dev_intr_type == MSI_X) && + ((pdev->device != PCI_DEVICE_ID_HERC_WIN) && + (pdev->device != PCI_DEVICE_ID_HERC_UNI))) { + DBG_PRINT(ERR_DBG, "Xframe I does not support MSI_X. \ +Defaulting to INTA\n"); + dev_intr_type = INTA; + } if (dev_intr_type != MSI_X) { if (pci_request_regions(pdev, s2io_driver_name)) { - DBG_PRINT(ERR_DBG, "Request Regions failed\n"); - pci_disable_device(pdev); + DBG_PRINT(ERR_DBG, "Request Regions failed\n"), + pci_disable_device(pdev); return -ENODEV; } } @@ -6860,6 +6100,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) config = &sp->config; /* Tx side parameters. */ + if (tx_fifo_len[0] == 0) + tx_fifo_len[0] = DEFAULT_FIFO_LEN; /* Default value. */ config->tx_fifo_num = tx_fifo_num; for (i = 0; i < MAX_TX_FIFOS; i++) { config->tx_cfg[i].fifo_len = tx_fifo_len[i]; @@ -6883,6 +6125,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) config->max_txds = MAX_SKB_FRAGS + 2; /* Rx side parameters. */ + if (rx_ring_sz[0] == 0) + rx_ring_sz[0] = SMALL_BLK_CNT; /* Default value. */ config->rx_ring_num = rx_ring_num; for (i = 0; i < MAX_RX_RINGS; i++) { config->rx_cfg[i].num_rxd = rx_ring_sz[i] * @@ -6912,7 +6156,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) /* initialize the shared memory used by the NIC and the host */ if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", - dev->name); + __FUNCTION__); ret = -ENOMEM; goto mem_alloc_failed; } @@ -6966,18 +6210,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) dev->weight = 32; #endif -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = s2io_netpoll; -#endif - dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; if (sp->high_dma_flag == TRUE) dev->features |= NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO dev->features |= NETIF_F_TSO; -#endif -#ifdef NETIF_F_TSO6 - dev->features |= NETIF_F_TSO6; #endif if (sp->device_type & XFRAME_II_DEVICE) { dev->features |= NETIF_F_UFO; @@ -7030,8 +6267,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) val64 = RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, - RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING); + wait_for_cmd_complete(sp); + tmp64 = readq(&bar0->rmac_addr_data0_mem); mac_down = (u32) tmp64; mac_up = (u32) (tmp64 >> 32); @@ -7049,9 +6286,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) dev->addr_len = ETH_ALEN; memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); - /* reset Nic and bring it to known state */ - s2io_reset(sp); - /* * Initialize the tasklet status and link state flags * and the card state parameter @@ -7088,63 +6322,82 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) ret = -ENODEV; goto register_failed; } - s2io_vpd_read(sp); - DBG_PRINT(ERR_DBG, "Copyright(c) 2002-2005 Neterion Inc.\n"); - DBG_PRINT(ERR_DBG, "%s: Neterion %s (rev %d)\n",dev->name, - sp->product_name, get_xena_rev_id(sp->pdev)); - DBG_PRINT(ERR_DBG, "%s: Driver version %s\n", dev->name, - s2io_driver_version); - DBG_PRINT(ERR_DBG, "%s: MAC ADDR: " - "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, + + if (sp->device_type & XFRAME_II_DEVICE) { + DBG_PRINT(ERR_DBG, "%s: Neterion Xframe II 10GbE adapter ", + dev->name); + DBG_PRINT(ERR_DBG, "(rev %d), Version %s", + get_xena_rev_id(sp->pdev), + s2io_driver_version); + switch(sp->intr_type) { + case INTA: + DBG_PRINT(ERR_DBG, ", Intr type INTA"); + break; + case MSI: + DBG_PRINT(ERR_DBG, ", Intr type MSI"); + break; + case MSI_X: + DBG_PRINT(ERR_DBG, ", Intr type MSI-X"); + break; + } + + DBG_PRINT(ERR_DBG, "\nCopyright(c) 2002-2005 Neterion Inc.\n"); + DBG_PRINT(ERR_DBG, "MAC ADDR: %02x:%02x:%02x:%02x:%02x:%02x\n", sp->def_mac_addr[0].mac_addr[0], sp->def_mac_addr[0].mac_addr[1], sp->def_mac_addr[0].mac_addr[2], sp->def_mac_addr[0].mac_addr[3], sp->def_mac_addr[0].mac_addr[4], sp->def_mac_addr[0].mac_addr[5]); - if (sp->device_type & XFRAME_II_DEVICE) { mode = s2io_print_pci_mode(sp); if (mode < 0) { - DBG_PRINT(ERR_DBG, " Unsupported PCI bus mode\n"); + DBG_PRINT(ERR_DBG, " Unsupported PCI bus mode "); ret = -EBADSLT; - unregister_netdev(dev); goto set_swap_failed; } + } else { + DBG_PRINT(ERR_DBG, "%s: Neterion Xframe I 10GbE adapter ", + dev->name); + DBG_PRINT(ERR_DBG, "(rev %d), Version %s", + get_xena_rev_id(sp->pdev), + s2io_driver_version); + switch(sp->intr_type) { + case INTA: + DBG_PRINT(ERR_DBG, ", Intr type INTA"); + break; + case MSI: + DBG_PRINT(ERR_DBG, ", Intr type MSI"); + break; + case MSI_X: + DBG_PRINT(ERR_DBG, ", Intr type MSI-X"); + break; + } + DBG_PRINT(ERR_DBG, "\nCopyright(c) 2002-2005 Neterion Inc.\n"); + DBG_PRINT(ERR_DBG, "MAC ADDR: %02x:%02x:%02x:%02x:%02x:%02x\n", + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); } - switch(sp->rxd_mode) { - case RXD_MODE_1: - DBG_PRINT(ERR_DBG, "%s: 1-Buffer receive mode enabled\n", - dev->name); - break; - case RXD_MODE_3B: - DBG_PRINT(ERR_DBG, "%s: 2-Buffer receive mode enabled\n", - dev->name); - break; - case RXD_MODE_3A: - DBG_PRINT(ERR_DBG, "%s: 3-Buffer receive mode enabled\n", - dev->name); - break; - } -#ifdef CONFIG_S2IO_NAPI - DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); -#endif - switch(sp->intr_type) { - case INTA: - DBG_PRINT(ERR_DBG, "%s: Interrupt type INTA\n", dev->name); - break; - case MSI: - DBG_PRINT(ERR_DBG, "%s: Interrupt type MSI\n", dev->name); - break; - case MSI_X: - DBG_PRINT(ERR_DBG, "%s: Interrupt type MSI-X\n", dev->name); - break; - } + if (sp->rxd_mode == RXD_MODE_3B) + DBG_PRINT(ERR_DBG, "%s: 2-Buffer mode support has been " + "enabled\n",dev->name); + if (sp->rxd_mode == RXD_MODE_3A) + DBG_PRINT(ERR_DBG, "%s: 3-Buffer mode support has been " + "enabled\n",dev->name); + if (sp->lro) DBG_PRINT(ERR_DBG, "%s: Large receive offload enabled\n", - dev->name); + dev->name); /* Initialize device name */ - sprintf(sp->name, "%s Neterion %s", dev->name, sp->product_name); + strcpy(sp->name, dev->name); + if (sp->device_type & XFRAME_II_DEVICE) + strcat(sp->name, ": Neterion Xframe II 10GbE adapter"); + else + strcat(sp->name, ": Neterion Xframe I 10GbE adapter"); /* Initialize bimodal Interrupts */ sp->config.bimodal = bimodal; @@ -7394,13 +6647,8 @@ static int verify_l3_l4_lro_capable(lro_t *l_lro, struct iphdr *ip, if (ip->ihl != 5) /* IP has options */ return -1; - /* If we see CE codepoint in IP header, packet is not mergeable */ - if (INET_ECN_is_ce(ipv4_get_dsfield(ip))) - return -1; - - /* If we see ECE or CWR flags in TCP header, packet is not mergeable */ if (tcp->urg || tcp->psh || tcp->rst || tcp->syn || tcp->fin || - tcp->ece || tcp->cwr || !tcp->ack) { + !tcp->ack) { /* * Currently recognize only the ack control word and * any other control field being set would result in @@ -7554,16 +6802,18 @@ static void queue_rx_frame(struct sk_buff *skb) static void lro_append_pkt(nic_t *sp, lro_t *lro, struct sk_buff *skb, u32 tcp_len) { - struct sk_buff *first = lro->parent; + struct sk_buff *tmp, *first = lro->parent; first->len += tcp_len; first->data_len = lro->frags_len; skb_pull(skb, (skb->len - tcp_len)); - if (skb_shinfo(first)->frag_list) - lro->last_frag->next = skb; + if ((tmp = skb_shinfo(first)->frag_list)) { + while (tmp->next) + tmp = tmp->next; + tmp->next = skb; + } else skb_shinfo(first)->frag_list = skb; - lro->last_frag = skb; sp->mac_control.stats_info->sw_stat.clubbed_frms_cnt++; return; } diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 5ed49c3be..0a0b5b29d 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h @@ -31,8 +31,6 @@ #define SUCCESS 0 #define FAILURE -1 -#define CHECKBIT(value, nbit) (value & (1 << nbit)) - /* Maximum time to flicker LED when asked to identify NIC using ethtool */ #define MAX_FLICKER_TIME 60000 /* 60 Secs */ @@ -80,11 +78,6 @@ static int debug_level = ERR_DBG; typedef struct { unsigned long long single_ecc_errs; unsigned long long double_ecc_errs; - unsigned long long parity_err_cnt; - unsigned long long serious_err_cnt; - unsigned long long soft_reset_cnt; - unsigned long long fifo_full_cnt; - unsigned long long ring_full_cnt; /* LRO statistics */ unsigned long long clubbed_frms_cnt; unsigned long long sending_both; @@ -94,25 +87,6 @@ typedef struct { unsigned long long num_aggregations; } swStat_t; -/* Xpak releated alarm and warnings */ -typedef struct { - u64 alarm_transceiver_temp_high; - u64 alarm_transceiver_temp_low; - u64 alarm_laser_bias_current_high; - u64 alarm_laser_bias_current_low; - u64 alarm_laser_output_power_high; - u64 alarm_laser_output_power_low; - u64 warn_transceiver_temp_high; - u64 warn_transceiver_temp_low; - u64 warn_laser_bias_current_high; - u64 warn_laser_bias_current_low; - u64 warn_laser_output_power_high; - u64 warn_laser_output_power_low; - u64 xpak_regs_stat; - u32 xpak_timer_count; -} xpakStat_t; - - /* The statistics block of Xena */ typedef struct stat_block { /* Tx MAC statistics counters. */ @@ -289,9 +263,7 @@ typedef struct stat_block { u32 rmac_accepted_ip_oflow; u32 reserved_14; u32 link_fault_cnt; - u8 buffer[20]; swStat_t sw_stat; - xpakStat_t xpak_stat; } StatInfo_t; /* @@ -652,7 +624,7 @@ typedef struct fifo_info { nic_t *nic; }fifo_info_t; -/* Information related to the Tx and Rx FIFOs and Rings of Xena +/* Infomation related to the Tx and Rx FIFOs and Rings of Xena * is maintained in this structure. */ typedef struct mac_info { @@ -687,8 +659,7 @@ typedef struct { } usr_addr_t; /* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_0_LEN 4096 -#define DEFAULT_FIFO_1_7_LEN 512 +#define DEFAULT_FIFO_LEN 4096 #define SMALL_BLK_CNT 30 #define LARGE_BLK_CNT 100 @@ -719,7 +690,6 @@ struct msix_info_st { /* Data structure to represent a LRO session */ typedef struct lro { struct sk_buff *parent; - struct sk_buff *last_frag; u8 *l2h; struct iphdr *iph; struct tcphdr *tcph; @@ -762,7 +732,7 @@ struct s2io_nic { int device_close_flag; int device_enabled_once; - char name[60]; + char name[50]; struct tasklet_struct task; volatile unsigned long tasklet_status; @@ -830,9 +800,8 @@ struct s2io_nic { #define MSIX_FLG 0xA5 struct msix_entry *entries; struct s2io_msix_entry *s2io_entries; - char desc[MAX_REQUESTED_MSI_X][25]; - - int avail_msix_vectors; /* No. of MSI-X vectors granted by system */ + char desc1[35]; + char desc2[35]; struct msix_info_st msix_info[0x3f]; @@ -855,8 +824,6 @@ struct s2io_nic { spinlock_t rx_lock; atomic_t isr_cnt; u64 *ufo_in_band_v; -#define VPD_PRODUCT_NAME_LEN 50 - u8 product_name[VPD_PRODUCT_NAME_LEN]; }; #define RESET_ERROR 1; @@ -881,32 +848,28 @@ static inline void writeq(u64 val, void __iomem *addr) writel((u32) (val), addr); writel((u32) (val >> 32), (addr + 4)); } -#endif -/* - * Some registers have to be written in a particular order to - * expect correct hardware operation. The macro SPECIAL_REG_WRITE - * is used to perform such ordered writes. Defines UF (Upper First) - * and LF (Lower First) will be used to specify the required write order. +/* In 32 bit modes, some registers have to be written in a + * particular order to expect correct hardware operation. The + * macro SPECIAL_REG_WRITE is used to perform such ordered + * writes. Defines UF (Upper First) and LF (Lower First) will + * be used to specify the required write order. */ #define UF 1 #define LF 2 static inline void SPECIAL_REG_WRITE(u64 val, void __iomem *addr, int order) { - u32 ret; - if (order == LF) { writel((u32) (val), addr); - ret = readl(addr); writel((u32) (val >> 32), (addr + 4)); - ret = readl(addr + 4); } else { writel((u32) (val >> 32), (addr + 4)); - ret = readl(addr + 4); writel((u32) (val), addr); - ret = readl(addr); } } +#else +#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr) +#endif /* Interrupt related values of Xena */ @@ -1012,13 +975,4 @@ static void clear_lro_session(lro_t *lro); static void queue_rx_frame(struct sk_buff *skb); static void update_L3L4_header(nic_t *sp, lro_t *lro); static void lro_append_pkt(nic_t *sp, lro_t *lro, struct sk_buff *skb, u32 tcp_len); - -#define s2io_tcp_mss(skb) skb_shinfo(skb)->gso_size -#define s2io_udp_mss(skb) skb_shinfo(skb)->gso_size -#define s2io_offload_type(skb) skb_shinfo(skb)->gso_type - -#define S2IO_PARM_INT(X, def_val) \ - static unsigned int X = def_val;\ - module_param(X , uint, 0); - #endif /* _S2IO_H */ diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 9ab1618e8..f2be9f83f 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include /* Processor type for cache alignment. */ #include @@ -2450,7 +2451,7 @@ static int sbmac_open(struct net_device *dev) */ __raw_readq(sc->sbm_isr); - if (request_irq(dev->irq, &sbmac_intr, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, &sbmac_intr, SA_SHIRQ, dev->name, dev)) return -EBUSY; /* diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c index 01392bca0..bcef03feb 100644 --- a/drivers/net/seeq8005.c +++ b/drivers/net/seeq8005.c @@ -396,7 +396,8 @@ static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev) unsigned char *buf; if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } @@ -742,7 +743,7 @@ module_param(irq, int, 0); MODULE_PARM_DESC(io, "SEEQ 8005 I/O base address"); MODULE_PARM_DESC(irq, "SEEQ 8005 IRQ number"); -int __init init_module(void) +int init_module(void) { dev_seeq = seeq8005_probe(-1); if (IS_ERR(dev_seeq)) diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c index c7832e69f..88e212043 100644 --- a/drivers/net/shaper.c +++ b/drivers/net/shaper.c @@ -69,6 +69,7 @@ * 2000/03 Andi Kleen */ +#include #include #include #include diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index df0cbebb3..31dd3f036 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -1054,7 +1054,7 @@ static int sis190_open(struct net_device *dev) sis190_request_timer(dev); - rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev); + rc = request_irq(dev->irq, sis190_interrupt, SA_SHIRQ, dev->name, dev); if (rc < 0) goto err_release_timer_2; @@ -1156,7 +1156,8 @@ static int sis190_start_xmit(struct sk_buff *skb, struct net_device *dev) dma_addr_t mapping; if (unlikely(skb->len < ETH_ZLEN)) { - if (skb_padto(skb, ETH_ZLEN)) { + skb = skb_padto(skb, ETH_ZLEN); + if (!skb) { tp->stats.tx_dropped++; goto out; } diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 29ee7ffed..f5a3bf4d9 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -1,6 +1,6 @@ /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux. Copyright 1999 Silicon Integrated System Corporation - Revision: 1.08.10 Apr. 2 2006 + Revision: 1.08.09 Sep. 19 2005 Modified from the driver which is originally written by Donald Becker. @@ -17,10 +17,9 @@ SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution, preliminary Rev. 1.0 Jan. 18, 1998 - Rev 1.08.10 Apr. 2 2006 Daniele Venzano add vlan (jumbo packets) support Rev 1.08.09 Sep. 19 2005 Daniele Venzano add Wake on LAN support Rev 1.08.08 Jan. 22 2005 Daniele Venzano use netif_msg for debugging messages - Rev 1.08.07 Nov. 2 2003 Daniele Venzano add suspend/resume support + Rev 1.08.07 Nov. 2 2003 Daniele Venzano 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.04 Apr. 25 2002 Mufasa Yang added SiS962 support @@ -78,7 +77,7 @@ #include "sis900.h" #define SIS900_MODULE_NAME "sis900" -#define SIS900_DRV_VERSION "v1.08.10 Apr. 2 2006" +#define SIS900_DRV_VERSION "v1.08.09 Sep. 19 2005" static char version[] __devinitdata = KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n"; @@ -1013,7 +1012,7 @@ sis900_open(struct net_device *net_dev) /* Equalizer workaround Rule */ sis630_set_eq(net_dev, sis_priv->chipset_rev); - ret = request_irq(net_dev->irq, &sis900_interrupt, IRQF_SHARED, + ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->name, net_dev); if (ret) return ret; @@ -1403,11 +1402,6 @@ static void sis900_set_mode (long ioaddr, int speed, int duplex) rx_flags |= RxATX; } -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) - /* Can accept Jumbo packet */ - rx_flags |= RxAJAB; -#endif - outl (tx_flags, ioaddr + txcfg); outl (rx_flags, ioaddr + rxcfg); } @@ -1720,26 +1714,18 @@ static int sis900_rx(struct net_device *net_dev) while (rx_status & OWN) { unsigned int rx_size; - unsigned int data_size; if (--rx_work_limit < 0) break; - data_size = rx_status & DSIZE; - rx_size = data_size - CRC_SIZE; - -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) - /* ``TOOLONG'' flag means jumbo packet recived. */ - if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE) - rx_status &= (~ ((unsigned int)TOOLONG)); -#endif + rx_size = (rx_status & DSIZE) - CRC_SIZE; if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { /* corrupted packet received */ if (netif_msg_rx_err(sis_priv)) printk(KERN_DEBUG "%s: Corrupted packet " - "received, buffer status = 0x%8.8x/%d.\n", - net_dev->name, rx_status, data_size); + "received, buffer status = 0x%8.8x.\n", + net_dev->name, rx_status); sis_priv->stats.rx_errors++; if (rx_status & OVERRUN) sis_priv->stats.rx_over_errors++; diff --git a/drivers/net/sis900.h b/drivers/net/sis900.h index 4834e3a15..50323941e 100644 --- a/drivers/net/sis900.h +++ b/drivers/net/sis900.h @@ -310,14 +310,8 @@ enum sis630_revision_id { #define CRC_SIZE 4 #define MAC_HEADER_SIZE 14 -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) -#define MAX_FRAME_SIZE (1518 + 4) -#else -#define MAX_FRAME_SIZE 1518 -#endif /* CONFIG_VLAN_802_1Q */ - -#define TX_BUF_SIZE (MAX_FRAME_SIZE+18) -#define RX_BUF_SIZE (MAX_FRAME_SIZE+18) +#define TX_BUF_SIZE 1536 +#define RX_BUF_SIZE 1536 #define NUM_TX_DESC 16 /* Number of Tx descriptor registers. */ #define NUM_RX_DESC 16 /* Number of Rx descriptor registers. */ diff --git a/drivers/net/sk98lin/h/xmac_ii.h b/drivers/net/sk98lin/h/xmac_ii.h index 7f8e6d008..2b19f8ad0 100644 --- a/drivers/net/sk98lin/h/xmac_ii.h +++ b/drivers/net/sk98lin/h/xmac_ii.h @@ -1473,7 +1473,7 @@ extern "C" { #define GM_TXCR_FORCE_JAM (1<<15) /* Bit 15: Force Jam / Flow-Control */ #define GM_TXCR_CRC_DIS (1<<14) /* Bit 14: Disable insertion of CRC */ #define GM_TXCR_PAD_DIS (1<<13) /* Bit 13: Disable padding of packets */ -#define GM_TXCR_COL_THR_MSK (7<<10) /* Bit 12..10: Collision Threshold */ +#define GM_TXCR_COL_THR_MSK (1<<10) /* Bit 12..10: Collision Threshold */ #define TX_COL_THR(x) (SHIFT10(x) & GM_TXCR_COL_THR_MSK) diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index ee62845d3..38a26df40 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c @@ -570,9 +570,9 @@ SK_BOOL DualNet; spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); if (pAC->GIni.GIMacsFound == 2) { - Ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev); + Ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); } else if (pAC->GIni.GIMacsFound == 1) { - Ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, + Ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, "sk98lin", dev); } else { printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n", @@ -1525,7 +1525,7 @@ struct sk_buff *pMessage) /* pointer to send-message */ ** This is to resolve faulty padding by the HW with 0xaa bytes. */ if (BytesSend < C_LEN_ETHERNET_MINSIZE) { - if (skb_padto(pMessage, C_LEN_ETHERNET_MINSIZE)) { + if ((pMessage = skb_padto(pMessage, C_LEN_ETHERNET_MINSIZE)) == NULL) { spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags); return 0; } @@ -5073,9 +5073,9 @@ static int skge_resume(struct pci_dev *pdev) pci_enable_device(pdev); pci_set_master(pdev); if (pAC->GIni.GIMacsFound == 2) - ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev); + ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); else - ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev); + ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, "sk98lin", dev); if (ret) { printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); pAC->AllocFlag &= ~SK_ALLOC_IRQ; diff --git a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c index 1e662aaeb..17786056c 100644 --- a/drivers/net/sk98lin/skvpd.c +++ b/drivers/net/sk98lin/skvpd.c @@ -22,7 +22,7 @@ ******************************************************************************/ /* - Please refer skvpd.txt for information how to include this module + Please refer skvpd.txt for infomation how to include this module */ static const char SysKonnectFileId[] = "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK"; diff --git a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c index 799e09801..e5d6d9596 100644 --- a/drivers/net/sk_mca.c +++ b/drivers/net/sk_mca.c @@ -824,7 +824,7 @@ static int skmca_open(struct net_device *dev) /* register resources - only necessary for IRQ */ result = request_irq(priv->realirq, irq_handler, - IRQF_SHARED | IRQF_SAMPLE_RANDOM, "sk_mca", dev); + SA_SHIRQ | SA_SAMPLE_RANDOM, "sk_mca", dev); if (result != 0) { printk("%s: failed to register irq %d\n", dev->name, dev->irq); diff --git a/drivers/net/skfp/h/sba.h b/drivers/net/skfp/h/sba.h index 638cf0283..df716cd57 100644 --- a/drivers/net/skfp/h/sba.h +++ b/drivers/net/skfp/h/sba.h @@ -13,7 +13,7 @@ ******************************************************************************/ /* - * Synchronous Bandwidth Allocation (SBA) structs + * Synchronous Bandwith Allocation (SBA) structs */ #ifndef _SBA_ diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index b5714a602..c7fb61330 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c @@ -497,7 +497,7 @@ static int skfp_open(struct net_device *dev) PRINTK(KERN_INFO "entering skfp_open\n"); /* Register IRQ - support shared interrupts by passing device ptr */ - err = request_irq(dev->irq, (void *) skfp_interrupt, IRQF_SHARED, + err = request_irq(dev->irq, (void *) skfp_interrupt, SA_SHIRQ, dev->name, dev); if (err) return err; diff --git a/drivers/net/skge.c b/drivers/net/skge.c index ad878dfdd..5ca5a1b54 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c @@ -24,6 +24,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -43,13 +44,12 @@ #include "skge.h" #define DRV_NAME "skge" -#define DRV_VERSION "1.6" +#define DRV_VERSION "1.5" #define PFX DRV_NAME " " #define DEFAULT_TX_RING_SIZE 128 #define DEFAULT_RX_RING_SIZE 512 #define MAX_TX_RING_SIZE 1024 -#define TX_LOW_WATER (MAX_SKB_FRAGS + 1) #define MAX_RX_RING_SIZE 4096 #define RX_COPY_THRESHOLD 128 #define RX_BUF_SIZE 1536 @@ -401,7 +401,7 @@ static int skge_set_ring_param(struct net_device *dev, int err; if (p->rx_pending == 0 || p->rx_pending > MAX_RX_RING_SIZE || - p->tx_pending < TX_LOW_WATER || p->tx_pending > MAX_TX_RING_SIZE) + p->tx_pending < MAX_SKB_FRAGS+1 || p->tx_pending > MAX_TX_RING_SIZE) return -EINVAL; skge->rx_ring.count = p->rx_pending; @@ -516,7 +516,10 @@ static int skge_set_pauseparam(struct net_device *dev, /* Chip internal frequency for clock calculations */ static inline u32 hwkhz(const struct skge_hw *hw) { - return (hw->chip_id == CHIP_ID_GENESIS) ? 53125 : 78125; + if (hw->chip_id == CHIP_ID_GENESIS) + return 53215; /* or: 53.125 MHz */ + else + return 78215; /* or: 78.125 MHz */ } /* Chip HZ to microseconds */ @@ -600,7 +603,7 @@ static void skge_led(struct skge_port *skge, enum led_mode mode) struct skge_hw *hw = skge->hw; int port = skge->port; - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); if (hw->chip_id == CHIP_ID_GENESIS) { switch (mode) { case LED_MODE_OFF: @@ -660,7 +663,7 @@ static void skge_led(struct skge_port *skge, enum led_mode mode) PHY_M_LED_MO_RX(MO_LED_ON)); } } - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); } /* blink LED's for finding board */ @@ -2035,7 +2038,7 @@ static void skge_phy_reset(struct skge_port *skge) netif_stop_queue(skge->netdev); netif_carrier_off(skge->netdev); - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); if (hw->chip_id == CHIP_ID_GENESIS) { genesis_reset(hw, port); genesis_mac_init(hw, port); @@ -2043,7 +2046,7 @@ static void skge_phy_reset(struct skge_port *skge) yukon_reset(hw, port); yukon_init(hw, port); } - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); } /* Basic MII support */ @@ -2064,12 +2067,12 @@ static int skge_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /* fallthru */ case SIOCGMIIREG: { u16 val = 0; - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); if (hw->chip_id == CHIP_ID_GENESIS) err = __xm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val); else err = __gm_phy_read(hw, skge->port, data->reg_num & 0x1f, &val); - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); data->val_out = val; break; } @@ -2078,14 +2081,14 @@ static int skge_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (!capable(CAP_NET_ADMIN)) return -EPERM; - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); if (hw->chip_id == CHIP_ID_GENESIS) err = xm_phy_write(hw, skge->port, data->reg_num & 0x1f, data->val_in); else err = gm_phy_write(hw, skge->port, data->reg_num & 0x1f, data->val_in); - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); break; } return err; @@ -2188,12 +2191,12 @@ static int skge_up(struct net_device *dev) goto free_rx_ring; /* Initialize MAC */ - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); if (hw->chip_id == CHIP_ID_GENESIS) genesis_mac_init(hw, port); else yukon_mac_init(hw, port); - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); /* Configure RAMbuffers */ chunk = hw->ram_size / ((hw->ports + 1)*2); @@ -2211,7 +2214,6 @@ static int skge_up(struct net_device *dev) skge_write8(hw, Q_ADDR(rxqaddr[port], Q_CSR), CSR_START | CSR_IRQ_CL_F); skge_led(skge, LED_MODE_ON); - netif_poll_enable(dev); return 0; free_rx_ring: @@ -2280,7 +2282,6 @@ static int skge_down(struct net_device *dev) skge_led(skge, LED_MODE_OFF); - netif_poll_disable(dev); skge_tx_clean(skge); skge_rx_clean(skge); @@ -2301,19 +2302,21 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) { struct skge_port *skge = netdev_priv(dev); struct skge_hw *hw = skge->hw; + struct skge_ring *ring = &skge->tx_ring; struct skge_element *e; struct skge_tx_desc *td; int i; u32 control, len; u64 map; - unsigned long flags; - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (!skb) return NETDEV_TX_OK; - if (!spin_trylock_irqsave(&skge->tx_lock, flags)) + if (!spin_trylock(&skge->tx_lock)) { /* Collision - tell upper layer to requeue */ return NETDEV_TX_LOCKED; + } if (unlikely(skge_avail(&skge->tx_ring) < skb_shinfo(skb)->nr_frags + 1)) { if (!netif_queue_stopped(dev)) { @@ -2322,13 +2325,12 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) printk(KERN_WARNING PFX "%s: ring full when queue awake!\n", dev->name); } - spin_unlock_irqrestore(&skge->tx_lock, flags); + spin_unlock(&skge->tx_lock); return NETDEV_TX_BUSY; } - e = skge->tx_ring.to_use; + e = ring->to_use; td = e->desc; - BUG_ON(td->control & BMU_OWN); e->skb = skb; len = skb_headlen(skb); map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE); @@ -2369,10 +2371,8 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) frag->size, PCI_DMA_TODEVICE); e = e->next; - e->skb = skb; + e->skb = NULL; tf = e->desc; - BUG_ON(tf->control & BMU_OWN); - tf->dma_lo = map; tf->dma_hi = (u64) map >> 32; pci_unmap_addr_set(e, mapaddr, map); @@ -2389,68 +2389,56 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) skge_write8(hw, Q_ADDR(txqaddr[skge->port], Q_CSR), CSR_START); - if (unlikely(netif_msg_tx_queued(skge))) + if (netif_msg_tx_queued(skge)) printk(KERN_DEBUG "%s: tx queued, slot %td, len %d\n", - dev->name, e - skge->tx_ring.start, skb->len); + dev->name, e - ring->start, skb->len); - skge->tx_ring.to_use = e->next; - if (skge_avail(&skge->tx_ring) <= TX_LOW_WATER) { + ring->to_use = e->next; + if (skge_avail(&skge->tx_ring) <= MAX_SKB_FRAGS + 1) { pr_debug("%s: transmit queue full\n", dev->name); netif_stop_queue(dev); } - spin_unlock_irqrestore(&skge->tx_lock, flags); + mmiowb(); + spin_unlock(&skge->tx_lock); dev->trans_start = jiffies; return NETDEV_TX_OK; } - -/* Free resources associated with this reing element */ -static void skge_tx_free(struct skge_port *skge, struct skge_element *e, - u32 control) +static void skge_tx_complete(struct skge_port *skge, struct skge_element *last) { struct pci_dev *pdev = skge->hw->pdev; + struct skge_element *e; - BUG_ON(!e->skb); + for (e = skge->tx_ring.to_clean; e != last; e = e->next) { + struct sk_buff *skb = e->skb; + int i; - /* skb header vs. fragment */ - if (control & BMU_STF) + e->skb = NULL; pci_unmap_single(pdev, pci_unmap_addr(e, mapaddr), - pci_unmap_len(e, maplen), - PCI_DMA_TODEVICE); - else - pci_unmap_page(pdev, pci_unmap_addr(e, mapaddr), - pci_unmap_len(e, maplen), - PCI_DMA_TODEVICE); + skb_headlen(skb), PCI_DMA_TODEVICE); - if (control & BMU_EOF) { - if (unlikely(netif_msg_tx_done(skge))) - printk(KERN_DEBUG PFX "%s: tx done slot %td\n", - skge->netdev->name, e - skge->tx_ring.start); + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + e = e->next; + pci_unmap_page(pdev, pci_unmap_addr(e, mapaddr), + skb_shinfo(skb)->frags[i].size, + PCI_DMA_TODEVICE); + } - dev_kfree_skb_any(e->skb); + dev_kfree_skb(skb); } - e->skb = NULL; + skge->tx_ring.to_clean = e; } -/* Free all buffers in transmit ring */ static void skge_tx_clean(struct skge_port *skge) { - struct skge_element *e; - unsigned long flags; - - spin_lock_irqsave(&skge->tx_lock, flags); - for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) { - struct skge_tx_desc *td = e->desc; - skge_tx_free(skge, e, td->control); - td->control = 0; - } - skge->tx_ring.to_clean = e; + spin_lock_bh(&skge->tx_lock); + skge_tx_complete(skge, skge->tx_ring.to_use); netif_wake_queue(skge->netdev); - spin_unlock_irqrestore(&skge->tx_lock, flags); + spin_unlock_bh(&skge->tx_lock); } static void skge_tx_timeout(struct net_device *dev) @@ -2676,28 +2664,32 @@ resubmit: return NULL; } -/* Free all buffers in Tx ring which are no longer owned by device */ -static void skge_txirq(struct net_device *dev) +static void skge_tx_done(struct skge_port *skge) { - struct skge_port *skge = netdev_priv(dev); struct skge_ring *ring = &skge->tx_ring; - struct skge_element *e; - - rmb(); + struct skge_element *e, *last; spin_lock(&skge->tx_lock); + last = ring->to_clean; for (e = ring->to_clean; e != ring->to_use; e = e->next) { struct skge_tx_desc *td = e->desc; if (td->control & BMU_OWN) break; - skge_tx_free(skge, e, td->control); + if (td->control & BMU_EOF) { + last = e->next; + if (unlikely(netif_msg_tx_done(skge))) + printk(KERN_DEBUG PFX "%s: tx done slot %td\n", + skge->netdev->name, e - ring->start); + } } - skge->tx_ring.to_clean = e; - if (netif_queue_stopped(skge->netdev) - && skge_avail(&skge->tx_ring) > TX_LOW_WATER) + skge_tx_complete(skge, last); + + skge_write8(skge->hw, Q_ADDR(txqaddr[skge->port], Q_CSR), CSR_IRQ_CL_F); + + if (skge_avail(&skge->tx_ring) > MAX_SKB_FRAGS + 1) netif_wake_queue(skge->netdev); spin_unlock(&skge->tx_lock); @@ -2712,6 +2704,8 @@ static int skge_poll(struct net_device *dev, int *budget) int to_do = min(dev->quota, *budget); int work_done = 0; + skge_tx_done(skge); + for (e = ring->to_clean; prefetch(e->next), work_done < to_do; e = e->next) { struct skge_rx_desc *rd = e->desc; struct sk_buff *skb; @@ -2743,12 +2737,10 @@ static int skge_poll(struct net_device *dev, int *budget) return 1; /* not done */ netif_rx_complete(dev); + mmiowb(); - spin_lock_irq(&hw->hw_lock); - hw->intr_mask |= rxirqmask[skge->port]; + hw->intr_mask |= skge->port == 0 ? (IS_R1_F|IS_XA1_F) : (IS_R2_F|IS_XA2_F); skge_write32(hw, B0_IMSK, hw->intr_mask); - mmiowb(); - spin_unlock_irq(&hw->hw_lock); return 0; } @@ -2855,16 +2847,16 @@ static void skge_error_irq(struct skge_hw *hw) } /* - * Interrupt from PHY are handled in work queue + * Interrupt from PHY are handled in tasklet (soft irq) * because accessing phy registers requires spin wait which might * cause excess interrupt latency. */ -static void skge_extirq(void *arg) +static void skge_extirq(unsigned long data) { - struct skge_hw *hw = arg; + struct skge_hw *hw = (struct skge_hw *) data; int port; - mutex_lock(&hw->phy_mutex); + spin_lock(&hw->phy_lock); for (port = 0; port < hw->ports; port++) { struct net_device *dev = hw->dev[port]; struct skge_port *skge = netdev_priv(dev); @@ -2876,12 +2868,10 @@ static void skge_extirq(void *arg) bcom_phy_intr(skge); } } - mutex_unlock(&hw->phy_mutex); + spin_unlock(&hw->phy_lock); - spin_lock_irq(&hw->hw_lock); hw->intr_mask |= IS_EXT_REG; skge_write32(hw, B0_IMSK, hw->intr_mask); - spin_unlock_irq(&hw->hw_lock); } static irqreturn_t skge_intr(int irq, void *dev_id, struct pt_regs *regs) @@ -2894,68 +2884,54 @@ static irqreturn_t skge_intr(int irq, void *dev_id, struct pt_regs *regs) if (status == 0) return IRQ_NONE; - spin_lock(&hw->hw_lock); - status &= hw->intr_mask; if (status & IS_EXT_REG) { hw->intr_mask &= ~IS_EXT_REG; - schedule_work(&hw->phy_work); - } - - if (status & IS_XA1_F) { - skge_write8(hw, Q_ADDR(Q_XA1, Q_CSR), CSR_IRQ_CL_F); - skge_txirq(hw->dev[0]); + tasklet_schedule(&hw->ext_tasklet); } - if (status & IS_R1_F) { + if (status & (IS_R1_F|IS_XA1_F)) { skge_write8(hw, Q_ADDR(Q_R1, Q_CSR), CSR_IRQ_CL_F); - hw->intr_mask &= ~IS_R1_F; + hw->intr_mask &= ~(IS_R1_F|IS_XA1_F); netif_rx_schedule(hw->dev[0]); } - if (status & IS_PA_TO_TX1) - skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_TX1); + if (status & (IS_R2_F|IS_XA2_F)) { + skge_write8(hw, Q_ADDR(Q_R2, Q_CSR), CSR_IRQ_CL_F); + hw->intr_mask &= ~(IS_R2_F|IS_XA2_F); + netif_rx_schedule(hw->dev[1]); + } + + if (likely((status & hw->intr_mask) == 0)) + return IRQ_HANDLED; if (status & IS_PA_TO_RX1) { struct skge_port *skge = netdev_priv(hw->dev[0]); - ++skge->net_stats.rx_over_errors; skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_RX1); } + if (status & IS_PA_TO_RX2) { + struct skge_port *skge = netdev_priv(hw->dev[1]); + ++skge->net_stats.rx_over_errors; + skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_RX2); + } - if (status & IS_MAC1) - skge_mac_intr(hw, 0); - - if (hw->dev[1]) { - if (status & IS_XA2_F) { - skge_write8(hw, Q_ADDR(Q_XA2, Q_CSR), CSR_IRQ_CL_F); - skge_txirq(hw->dev[1]); - } - - if (status & IS_R2_F) { - skge_write8(hw, Q_ADDR(Q_R2, Q_CSR), CSR_IRQ_CL_F); - hw->intr_mask &= ~IS_R2_F; - netif_rx_schedule(hw->dev[1]); - } + if (status & IS_PA_TO_TX1) + skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_TX1); - if (status & IS_PA_TO_RX2) { - struct skge_port *skge = netdev_priv(hw->dev[1]); - ++skge->net_stats.rx_over_errors; - skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_RX2); - } + if (status & IS_PA_TO_TX2) + skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_TX2); - if (status & IS_PA_TO_TX2) - skge_write16(hw, B3_PA_CTRL, PA_CLR_TO_TX2); + if (status & IS_MAC1) + skge_mac_intr(hw, 0); - if (status & IS_MAC2) - skge_mac_intr(hw, 1); - } + if (status & IS_MAC2) + skge_mac_intr(hw, 1); if (status & IS_HW_ERR) skge_error_irq(hw); skge_write32(hw, B0_IMSK, hw->intr_mask); - spin_unlock(&hw->hw_lock); return IRQ_HANDLED; } @@ -2981,7 +2957,7 @@ static int skge_set_mac_address(struct net_device *dev, void *p) if (!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL; - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); memcpy_toio(hw->regs + B2_MAC_1 + port*8, dev->dev_addr, ETH_ALEN); @@ -2994,7 +2970,7 @@ static int skge_set_mac_address(struct net_device *dev, void *p) gma_set_addr(hw, port, GM_SRC_ADDR_1L, dev->dev_addr); gma_set_addr(hw, port, GM_SRC_ADDR_2L, dev->dev_addr); } - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); return 0; } @@ -3106,7 +3082,6 @@ static int skge_reset(struct skge_hw *hw) else hw->ram_size = t8 * 4096; - spin_lock_init(&hw->hw_lock); hw->intr_mask = IS_HW_ERR | IS_EXT_REG | IS_PORT_1; if (hw->ports > 1) hw->intr_mask |= IS_PORT_2; @@ -3175,14 +3150,14 @@ static int skge_reset(struct skge_hw *hw) skge_write32(hw, B0_IMSK, hw->intr_mask); - mutex_lock(&hw->phy_mutex); + spin_lock_bh(&hw->phy_lock); for (i = 0; i < hw->ports; i++) { if (hw->chip_id == CHIP_ID_GENESIS) genesis_reset(hw, i); else yukon_reset(hw, i); } - mutex_unlock(&hw->phy_mutex); + spin_unlock_bh(&hw->phy_lock); return 0; } @@ -3330,8 +3305,8 @@ static int __devinit skge_probe(struct pci_dev *pdev, } hw->pdev = pdev; - mutex_init(&hw->phy_mutex); - INIT_WORK(&hw->phy_work, skge_extirq, hw); + spin_lock_init(&hw->phy_lock); + tasklet_init(&hw->ext_tasklet, skge_extirq, (unsigned long) hw); hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000); if (!hw->regs) { @@ -3340,7 +3315,7 @@ static int __devinit skge_probe(struct pci_dev *pdev, goto err_out_free_hw; } - err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, DRV_NAME, hw); + err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw); if (err) { printk(KERN_ERR PFX "%s: cannot assign irq %d\n", pci_name(pdev), pdev->irq); @@ -3352,21 +3327,13 @@ static int __devinit skge_probe(struct pci_dev *pdev, if (err) goto err_out_free_irq; - printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n", - (unsigned long long)pci_resource_start(pdev, 0), pdev->irq, + printk(KERN_INFO PFX DRV_VERSION " addr 0x%lx irq %d chip %s rev %d\n", + pci_resource_start(pdev, 0), pdev->irq, skge_board_name(hw), hw->chip_rev); if ((dev = skge_devinit(hw, 0, using_dac)) == NULL) goto err_out_led_off; - if (!is_valid_ether_addr(dev->dev_addr)) { - printk(KERN_ERR PFX "%s: bad (zero?) ethernet address in rom\n", - pci_name(pdev)); - err = -EIO; - goto err_out_free_netdev; - } - - err = register_netdev(dev); if (err) { printk(KERN_ERR PFX "%s: cannot register net device\n", @@ -3421,15 +3388,11 @@ static void __devexit skge_remove(struct pci_dev *pdev) dev0 = hw->dev[0]; unregister_netdev(dev0); - spin_lock_irq(&hw->hw_lock); - hw->intr_mask = 0; skge_write32(hw, B0_IMSK, 0); - spin_unlock_irq(&hw->hw_lock); - skge_write16(hw, B0_LED, LED_STAT_OFF); skge_write8(hw, B0_CTST, CS_RST_SET); - flush_scheduled_work(); + tasklet_kill(&hw->ext_tasklet); free_irq(pdev->irq, hw); pci_release_regions(pdev); diff --git a/drivers/net/skge.h b/drivers/net/skge.h index 593387b3c..1f1ce88c8 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h @@ -1734,11 +1734,11 @@ enum { GM_TXCR_FORCE_JAM = 1<<15, /* Bit 15: Force Jam / Flow-Control */ GM_TXCR_CRC_DIS = 1<<14, /* Bit 14: Disable insertion of CRC */ GM_TXCR_PAD_DIS = 1<<13, /* Bit 13: Disable padding of packets */ - GM_TXCR_COL_THR_MSK = 7<<10, /* Bit 12..10: Collision Threshold */ + GM_TXCR_COL_THR_MSK = 1<<10, /* Bit 12..10: Collision Threshold */ }; #define TX_COL_THR(x) (((x)<<10) & GM_TXCR_COL_THR_MSK) -#define TX_COL_DEF 0x04 /* late collision after 64 byte */ +#define TX_COL_DEF 0x04 /* GM_RX_CTRL 16 bit r/w Receive Control Register */ enum { @@ -2388,7 +2388,6 @@ struct skge_ring { struct skge_hw { void __iomem *regs; struct pci_dev *pdev; - spinlock_t hw_lock; u32 intr_mask; struct net_device *dev[2]; @@ -2400,8 +2399,9 @@ struct skge_hw { u32 ram_size; u32 ram_offset; u16 phy_addr; - struct work_struct phy_work; - struct mutex phy_mutex; + + struct tasklet_struct ext_tasklet; + spinlock_t phy_lock; }; enum { diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index ebe7e2599..4103e304f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -23,6 +23,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -50,7 +51,7 @@ #include "sky2.h" #define DRV_NAME "sky2" -#define DRV_VERSION "1.5" +#define DRV_VERSION "1.6.1" #define PFX DRV_NAME " " /* @@ -65,7 +66,6 @@ #define RX_MAX_PENDING (RX_LE_SIZE/2 - 2) #define RX_DEF_PENDING RX_MAX_PENDING #define RX_SKB_ALIGN 8 -#define RX_BUF_WRITE 16 #define TX_RING_SIZE 512 #define TX_DEF_PENDING (TX_RING_SIZE - 1) @@ -106,7 +106,6 @@ static const struct pci_device_id sky2_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, /* DGE-560T */ - { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4001) }, /* DGE-550SX */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4340) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4341) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4342) }, @@ -118,17 +117,10 @@ static const struct pci_device_id sky2_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4350) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4351) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4352) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4360) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4365) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, - { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4369) }, { 0 } }; @@ -245,6 +237,7 @@ static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state) udelay(100); if (hw->chip_id == CHIP_ID_YUKON_EC_U) { + sky2_write16(hw, B0_CTST, Y2_HW_WOL_ON); sky2_pci_write32(hw, PCI_DEV_REG3, 0); reg1 = sky2_pci_read32(hw, PCI_DEV_REG4); reg1 &= P_ASPM_CONTROL_MSK; @@ -263,7 +256,6 @@ static void sky2_set_power_state(struct sky2_hw *hw, pci_power_t state) else reg1 |= (PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); sky2_pci_write32(hw, PCI_DEV_REG1, reg1); - udelay(100); if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) sky2_write8(hw, B2_Y2_CLK_GATE, 0); @@ -329,7 +321,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) } ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); - if (hw->copper) { + if (sky2_is_copper(hw)) { if (hw->chip_id == CHIP_ID_YUKON_FE) { /* enable automatic crossover */ ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO) >> 1; @@ -346,25 +338,37 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA; } } - gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); } else { /* workaround for deviation #4.88 (CRC errors) */ /* disable Automatic Crossover */ ctrl &= ~PHY_M_PC_MDIX_MSK; - gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); + } - if (hw->chip_id == CHIP_ID_YUKON_XL) { - /* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */ - gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2); - ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); - ctrl &= ~PHY_M_MAC_MD_MSK; - ctrl |= PHY_M_MAC_MODE_SEL(PHY_M_MAC_MD_1000BX); - gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); + gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); + + /* special setup for PHY 88E1112 Fiber */ + if (hw->chip_id == CHIP_ID_YUKON_XL && !sky2_is_copper(hw)) { + pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); + + /* Fiber: select 1000BASE-X only mode MAC Specific Ctrl Reg. */ + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2); + ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); + ctrl &= ~PHY_M_MAC_MD_MSK; + ctrl |= PHY_M_MAC_MODE_SEL(PHY_M_MAC_MD_1000BX); + gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); + if (hw->pmd_type == 'P') { /* select page 1 to access Fiber registers */ gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 1); + + /* for SFP-module set SIGDET polarity to low */ + ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); + ctrl |= PHY_M_FIB_SIGD_POL; + gm_phy_write(hw, port, PHY_MARV_CTRL, ctrl); } + + gm_phy_write(hw, port, PHY_MARV_EXT_ADR, pg); } ctrl = gm_phy_read(hw, port, PHY_MARV_CTRL); @@ -381,7 +385,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) adv = PHY_AN_CSMA; if (sky2->autoneg == AUTONEG_ENABLE) { - if (hw->copper) { + if (sky2_is_copper(hw)) { if (sky2->advertising & ADVERTISED_1000baseT_Full) ct1000 |= PHY_M_1000C_AFD; if (sky2->advertising & ADVERTISED_1000baseT_Half) @@ -394,8 +398,12 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) adv |= PHY_M_AN_10_FD; if (sky2->advertising & ADVERTISED_10baseT_Half) adv |= PHY_M_AN_10_HD; - } else /* special defines for FIBER (88E1011S only) */ - adv |= PHY_M_AN_1000X_AHD | PHY_M_AN_1000X_AFD; + } else { /* special defines for FIBER (88E1040S only) */ + if (sky2->advertising & ADVERTISED_1000baseT_Full) + adv |= PHY_M_AN_1000X_AFD; + if (sky2->advertising & ADVERTISED_1000baseT_Half) + adv |= PHY_M_AN_1000X_AHD; + } /* Set Flow-control capabilities */ if (sky2->tx_pause && sky2->rx_pause) @@ -678,7 +686,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) sky2_write16(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_OPER_ON); if (hw->chip_id == CHIP_ID_YUKON_EC_U) { - sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 512/8); + sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); if (hw->dev[port]->mtu > ETH_DATA_LEN) { /* set Tx GMAC FIFO Almost Empty Threshold */ @@ -690,10 +698,16 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) } -/* Assign Ram Buffer allocation in units of 64bit (8 bytes) */ -static void sky2_ramset(struct sky2_hw *hw, u16 q, u32 start, u32 end) +/* Assign Ram Buffer allocation. + * start and end are in units of 4k bytes + * ram registers are in units of 64bit words + */ +static void sky2_ramset(struct sky2_hw *hw, u16 q, u8 startk, u8 endk) { - pr_debug(PFX "q %d %#x %#x\n", q, start, end); + u32 start, end; + + start = startk * 4096/8; + end = (endk * 4096/8) - 1; sky2_write8(hw, RB_ADDR(q, RB_CTRL), RB_RST_CLR); sky2_write32(hw, RB_ADDR(q, RB_START), start); @@ -702,7 +716,7 @@ static void sky2_ramset(struct sky2_hw *hw, u16 q, u32 start, u32 end) sky2_write32(hw, RB_ADDR(q, RB_RP), start); if (q == Q_R1 || q == Q_R2) { - u32 space = end - start + 1; + u32 space = (endk - startk) * 4096/8; u32 tp = space - space/4; /* On receive queue's set the thresholds @@ -951,14 +965,14 @@ static void sky2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) /* * It appears the hardware has a bug in the FIFO logic that * cause it to hang if the FIFO gets overrun and the receive buffer - * is not aligned. ALso alloc_skb() won't align properly if slab + * is not aligned. Also dev_alloc_skb() won't align properly if slab * debugging is enabled. */ static inline struct sk_buff *sky2_alloc_skb(unsigned int size, gfp_t gfp_mask) { struct sk_buff *skb; - skb = alloc_skb(size + RX_SKB_ALIGN, gfp_mask); + skb = __dev_alloc_skb(size + RX_SKB_ALIGN, gfp_mask); if (likely(skb)) { unsigned long p = (unsigned long) skb->data; skb_reserve(skb, ALIGN(p, RX_SKB_ALIGN) - p); @@ -1084,16 +1098,19 @@ static int sky2_up(struct net_device *dev) sky2_mac_init(hw, port); - /* Determine available ram buffer space in qwords. */ - ramsize = sky2_read8(hw, B2_E_0) * 4096/8; - - if (ramsize > 6*1024/8) - rxspace = ramsize - (ramsize + 2) / 3; + /* Determine available ram buffer space (in 4K blocks). + * Note: not sure about the FE setting below yet + */ + if (hw->chip_id == CHIP_ID_YUKON_FE) + ramsize = 4; else - rxspace = ramsize / 2; + ramsize = sky2_read8(hw, B2_E_0); + + /* Give transmitter one third (rounded up) */ + rxspace = ramsize - (ramsize + 2) / 3; - sky2_ramset(hw, rxqaddr[port], 0, rxspace-1); - sky2_ramset(hw, txqaddr[port], rxspace, ramsize-1); + sky2_ramset(hw, rxqaddr[port], 0, rxspace); + sky2_ramset(hw, txqaddr[port], rxspace, ramsize); /* Make sure SyncQ is disabled */ sky2_write8(hw, RB_ADDR(port == 0 ? Q_XS1 : Q_XS2, RB_CTRL), @@ -1389,7 +1406,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done) } sky2->tx_cons = put; - if (tx_avail(sky2) > MAX_SKB_TX_LE + 4) + if (tx_avail(sky2) > MAX_SKB_TX_LE) netif_wake_queue(dev); } @@ -1420,11 +1437,6 @@ static int sky2_down(struct net_device *dev) /* Stop more packets from being queued */ netif_stop_queue(dev); - /* Disable port IRQ */ - imask = sky2_read32(hw, B0_IMSK); - imask &= ~portirq_msk[port]; - sky2_write32(hw, B0_IMSK, imask); - sky2_phy_reset(hw, port); /* Stop transmitter */ @@ -1468,6 +1480,11 @@ static int sky2_down(struct net_device *dev) sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET); + /* Disable port IRQ */ + imask = sky2_read32(hw, B0_IMSK); + imask &= ~portirq_msk[port]; + sky2_write32(hw, B0_IMSK, imask); + /* turn off LED's */ sky2_write16(hw, B0_Y2LED, LED_STAT_OFF); @@ -1496,7 +1513,7 @@ static int sky2_down(struct net_device *dev) static u16 sky2_phy_speed(const struct sky2_hw *hw, u16 aux) { - if (!hw->copper) + if (!sky2_is_copper(hw)) return SPEED_1000; if (hw->chip_id == CHIP_ID_YUKON_FE) @@ -1678,13 +1695,13 @@ static void sky2_phy_intr(struct sky2_hw *hw, unsigned port) struct sky2_port *sky2 = netdev_priv(dev); u16 istatus, phystat; - if (!netif_running(dev)) - return; - spin_lock(&sky2->phy_lock); istatus = gm_phy_read(hw, port, PHY_MARV_INT_STAT); phystat = gm_phy_read(hw, port, PHY_MARV_PHY_STAT); + if (!netif_running(dev)) + goto out; + if (netif_msg_intr(sky2)) printk(KERN_INFO PFX "%s: phy interrupt status 0x%x 0x%x\n", sky2->netdev->name, istatus, phystat); @@ -1854,7 +1871,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2, goto oversize; if (length < copybreak) { - skb = alloc_skb(length + 2, GFP_ATOMIC); + skb = dev_alloc_skb(length + 2); if (!skb) goto resubmit; @@ -1888,6 +1905,9 @@ resubmit: re->skb->ip_summed = CHECKSUM_NONE; sky2_rx_add(sky2, re->mapaddr); + /* Tell receiver about new buffers. */ + sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put); + return skb; oversize: @@ -1934,9 +1954,7 @@ static inline int sky2_more_work(const struct sky2_hw *hw) /* Process status response ring */ static int sky2_status_intr(struct sky2_hw *hw, int to_do) { - struct sky2_port *sky2; int work_done = 0; - unsigned buf_write[2] = { 0, 0 }; u16 hwidx = sky2_read16(hw, STAT_PUT_IDX); rmb(); @@ -1944,6 +1962,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do) while (hw->st_idx != hwidx) { struct sky2_status_le *le = hw->st_le + hw->st_idx; struct net_device *dev; + struct sky2_port *sky2; struct sk_buff *skb; u32 status; u16 length; @@ -1976,14 +1995,6 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do) #endif netif_receive_skb(skb); - /* Update receiver after 16 frames */ - if (++buf_write[le->link] == RX_BUF_WRITE) { - sky2_put_idx(hw, rxqaddr[le->link], - sky2->rx_put); - buf_write[le->link] = 0; - } - - /* Stop after net poll weight */ if (++work_done >= to_do) goto exit_loop; break; @@ -2021,17 +2032,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do) } } -exit_loop: - if (buf_write[0]) { - sky2 = netdev_priv(hw->dev[0]); - sky2_put_idx(hw, Q_R1, sky2->rx_put); - } - - if (buf_write[1]) { - sky2 = netdev_priv(hw->dev[1]); - sky2_put_idx(hw, Q_R2, sky2->rx_put); - } + /* Fully processed status ring so clear irq */ + sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); +exit_loop: return work_done; } @@ -2233,9 +2237,6 @@ static int sky2_poll(struct net_device *dev0, int *budget) *budget -= work_done; dev0->quota -= work_done; - if (status & Y2_IS_STAT_BMU) - sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); - if (sky2_more_work(hw)) return 1; @@ -2299,10 +2300,10 @@ static inline u32 sky2_clk2us(const struct sky2_hw *hw, u32 clk) } -static int sky2_reset(struct sky2_hw *hw) +static int __devinit sky2_reset(struct sky2_hw *hw) { u16 status; - u8 t8, pmd_type; + u8 t8; int i; sky2_write8(hw, B0_CTST, CS_RST_CLR); @@ -2348,9 +2349,7 @@ static int sky2_reset(struct sky2_hw *hw) sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 0xffffffffUL); - pmd_type = sky2_read8(hw, B2_PMD_TYP); - hw->copper = !(pmd_type == 'L' || pmd_type == 'S'); - + hw->pmd_type = sky2_read8(hw, B2_PMD_TYP); hw->ports = 1; t8 = sky2_read8(hw, B2_Y2_HW_RES); if ((t8 & CFG_DUAL_MAC_MSK) == CFG_DUAL_MAC_MSK) { @@ -2447,21 +2446,22 @@ static int sky2_reset(struct sky2_hw *hw) static u32 sky2_supported_modes(const struct sky2_hw *hw) { - u32 modes; - if (hw->copper) { - modes = SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full - | SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full - | SUPPORTED_Autoneg | SUPPORTED_TP; + if (sky2_is_copper(hw)) { + u32 modes = SUPPORTED_10baseT_Half + | SUPPORTED_10baseT_Full + | SUPPORTED_100baseT_Half + | SUPPORTED_100baseT_Full + | SUPPORTED_Autoneg | SUPPORTED_TP; if (hw->chip_id != CHIP_ID_YUKON_FE) modes |= SUPPORTED_1000baseT_Half - | SUPPORTED_1000baseT_Full; + | SUPPORTED_1000baseT_Full; + return modes; } else - modes = SUPPORTED_1000baseT_Full | SUPPORTED_FIBRE - | SUPPORTED_Autoneg; - return modes; + return SUPPORTED_1000baseT_Half + | SUPPORTED_1000baseT_Full + | SUPPORTED_Autoneg + | SUPPORTED_FIBRE; } static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) @@ -2472,7 +2472,7 @@ static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) ecmd->transceiver = XCVR_INTERNAL; ecmd->supported = sky2_supported_modes(hw); ecmd->phy_address = PHY_ADDR_MARV; - if (hw->copper) { + if (sky2_is_copper(hw)) { ecmd->supported = SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half @@ -2481,12 +2481,14 @@ static int sky2_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | SUPPORTED_TP; ecmd->port = PORT_TP; - } else + ecmd->speed = sky2->speed; + } else { + ecmd->speed = SPEED_1000; ecmd->port = PORT_FIBRE; + } ecmd->advertising = sky2->advertising; ecmd->autoneg = sky2->autoneg; - ecmd->speed = sky2->speed; ecmd->duplex = sky2->duplex; return 0; } @@ -2736,14 +2738,6 @@ static int sky2_set_mac_address(struct net_device *dev, void *p) return 0; } -static void inline sky2_add_filter(u8 filter[8], const u8 *addr) -{ - u32 bit; - - bit = ether_crc(ETH_ALEN, addr) & 63; - filter[bit >> 3] |= 1 << (bit & 7); -} - static void sky2_set_multicast(struct net_device *dev) { struct sky2_port *sky2 = netdev_priv(dev); @@ -2752,7 +2746,6 @@ static void sky2_set_multicast(struct net_device *dev) struct dev_mc_list *list = dev->mc_list; u16 reg; u8 filter[8]; - static const u8 pause_mc_addr[ETH_ALEN] = { 0x1, 0x80, 0xc2, 0x0, 0x0, 0x1 }; memset(filter, 0, sizeof(filter)); @@ -2763,17 +2756,16 @@ static void sky2_set_multicast(struct net_device *dev) reg &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA); else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > 16) /* all multicast */ memset(filter, 0xff, sizeof(filter)); - else if (dev->mc_count == 0 && !sky2->rx_pause) + else if (dev->mc_count == 0) /* no multicast */ reg &= ~GM_RXCR_MCF_ENA; else { int i; reg |= GM_RXCR_MCF_ENA; - if (sky2->rx_pause) - sky2_add_filter(filter, pause_mc_addr); - - for (i = 0; list && i < dev->mc_count; i++, list = list->next) - sky2_add_filter(filter, list->dmi_addr); + for (i = 0; list && i < dev->mc_count; i++, list = list->next) { + u32 bit = ether_crc(ETH_ALEN, list->dmi_addr) & 0x3f; + filter[bit / 8] |= 1 << (bit % 8); + } } gma_write16(hw, port, GM_MC_ADDR_H1, @@ -3213,7 +3205,7 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw) sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW); - err = request_irq(pdev->irq, sky2_test_intr, IRQF_SHARED, DRV_NAME, hw); + err = request_irq(pdev->irq, sky2_test_intr, SA_SHIRQ, DRV_NAME, hw); if (err) { printk(KERN_ERR PFX "%s: cannot assign irq %d\n", pci_name(pdev), pdev->irq); @@ -3227,8 +3219,9 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw) if (!hw->msi_detected) { /* MSI test failed, go back to INTx mode */ - printk(KERN_INFO PFX "%s: No interrupt generated using MSI, " - "switching to INTx mode.\n", + printk(KERN_WARNING PFX "%s: No interrupt was generated using MSI, " + "switching to INTx mode. Please report this failure to " + "the PCI maintainer and include system chipset information.\n", pci_name(pdev)); err = -EOPNOTSUPP; @@ -3236,7 +3229,6 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw) } sky2_write32(hw, B0_IMSK, 0); - sky2_read32(hw, B0_IMSK); free_irq(pdev->irq, hw); @@ -3333,9 +3325,9 @@ static int __devinit sky2_probe(struct pci_dev *pdev, if (err) goto err_out_iounmap; - printk(KERN_INFO PFX "v%s addr 0x%llx irq %d Yukon-%s (0x%x) rev %d\n", - DRV_VERSION, (unsigned long long)pci_resource_start(pdev, 0), - pdev->irq, yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL], + printk(KERN_INFO PFX "v%s addr 0x%lx irq %d Yukon-%s (0x%x) rev %d\n", + DRV_VERSION, pci_resource_start(pdev, 0), pdev->irq, + yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL], hw->chip_id, hw->chip_rev); dev = sky2_init_netdev(hw, 0, using_dac); @@ -3371,7 +3363,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, goto err_out_unregister; } - err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, DRV_NAME, hw); + err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw); if (err) { printk(KERN_ERR PFX "%s: cannot assign irq %d\n", pci_name(pdev), pdev->irq); @@ -3460,14 +3452,17 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state) return -EINVAL; del_timer_sync(&hw->idle_timer); - netif_poll_disable(hw->dev[0]); for (i = 0; i < hw->ports; i++) { struct net_device *dev = hw->dev[i]; - if (netif_running(dev)) { + if (dev) { + if (!netif_running(dev)) + continue; + sky2_down(dev); netif_device_detach(dev); + netif_poll_disable(dev); } } @@ -3494,8 +3489,9 @@ static int sky2_resume(struct pci_dev *pdev) for (i = 0; i < hw->ports; i++) { struct net_device *dev = hw->dev[i]; - if (netif_running(dev)) { + if (dev && netif_running(dev)) { netif_device_attach(dev); + netif_poll_enable(dev); err = sky2_up(dev); if (err) { @@ -3507,7 +3503,6 @@ static int sky2_resume(struct pci_dev *pdev) } } - netif_poll_enable(hw->dev[0]); sky2_idle_start(hw); out: return err; diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 7af549970..9516c1f39 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h @@ -1317,6 +1317,14 @@ enum { PHY_M_FESC_SEL_CL_A = 1<<0, /* Select Class A driver (100B-TX) */ }; +/* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */ +/***** PHY_MARV_PHY_CTRL (page 1) 16 bit r/w Fiber Specific Ctrl *****/ +enum { + PHY_M_FIB_FORCE_LNK = 1<<10,/* Force Link Good */ + PHY_M_FIB_SIGD_POL = 1<<9, /* SIGDET Polarity */ + PHY_M_FIB_TX_DIS = 1<<3, /* Transmitter Disable */ +}; + /* for Yukon-2 Gigabit Ethernet PHY (88E1112 only) */ /***** PHY_MARV_PHY_CTRL (page 2) 16 bit r/w MAC Specific Ctrl *****/ enum { @@ -1480,7 +1488,7 @@ enum { GM_TXCR_FORCE_JAM = 1<<15, /* Bit 15: Force Jam / Flow-Control */ GM_TXCR_CRC_DIS = 1<<14, /* Bit 14: Disable insertion of CRC */ GM_TXCR_PAD_DIS = 1<<13, /* Bit 13: Disable padding of packets */ - GM_TXCR_COL_THR_MSK = 7<<10, /* Bit 12..10: Collision Threshold */ + GM_TXCR_COL_THR_MSK = 1<<10, /* Bit 12..10: Collision Threshold */ }; #define TX_COL_THR(x) (((x)<<10) & GM_TXCR_COL_THR_MSK) @@ -1566,7 +1574,7 @@ enum { GMR_FS_ANY_ERR = GMR_FS_RX_FF_OV | GMR_FS_CRC_ERR | GMR_FS_FRAGMENT | GMR_FS_LONG_ERR | - GMR_FS_MII_ERR | GMR_FS_GOOD_FC | GMR_FS_BAD_FC | + GMR_FS_MII_ERR | GMR_FS_BAD_FC | GMR_FS_UN_SIZE | GMR_FS_JABBER, }; @@ -1879,7 +1887,7 @@ struct sky2_hw { int pm_cap; u8 chip_id; u8 chip_rev; - u8 copper; + u8 pmd_type; u8 ports; struct sky2_status_le *st_le; @@ -1891,6 +1899,11 @@ struct sky2_hw { wait_queue_head_t msi_wait; }; +static inline int sky2_is_copper(const struct sky2_hw *hw) +{ + return !(hw->pmd_type == 'L' || hw->pmd_type == 'S' || hw->pmd_type == 'P'); +} + /* Register accessor for memory mapped device */ static inline u32 sky2_read32(const struct sky2_hw *hw, unsigned reg) { diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c index 3a1b71316..c6fbb1ede 100644 --- a/drivers/net/slhc.c +++ b/drivers/net/slhc.c @@ -50,6 +50,7 @@ * driver code belonging close to PPP and SLIP */ +#include #include #include #include diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 1588cb7f6..b2e18d288 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -55,6 +55,7 @@ */ #define SL_CHECK_TRANSMIT +#include #include #include diff --git a/drivers/net/slip.h b/drivers/net/slip.h index 29d87dd45..ab3efe66a 100644 --- a/drivers/net/slip.h +++ b/drivers/net/slip.h @@ -22,6 +22,7 @@ #ifndef _LINUX_SLIP_H #define _LINUX_SLIP_H +#include #if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED) # define SL_INCLUDE_CSLIP diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index 45449353a..3db30cd06 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c @@ -57,6 +57,7 @@ static const char version[] = "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; +#include #include #include #include @@ -552,7 +553,7 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int __init +int init_module(void) { struct net_device *dev; diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c index 85be22a05..b3e397d7c 100644 --- a/drivers/net/smc-ultra32.c +++ b/drivers/net/smc-ultra32.c @@ -290,7 +290,7 @@ out: static int ultra32_open(struct net_device *dev) { int ioaddr = dev->base_addr - ULTRA32_NIC_OFFSET; /* ASIC addr */ - int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : IRQF_SHARED; + int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : SA_SHIRQ; int retval; retval = request_irq(dev->irq, ei_interrupt, irq_flags, dev->name, dev); @@ -421,7 +421,7 @@ static struct net_device *dev_ultra[MAX_ULTRA32_CARDS]; MODULE_DESCRIPTION("SMC Ultra32 EISA ethernet driver"); MODULE_LICENSE("GPL"); -int __init init_module(void) +int init_module(void) { int this_dev, found = 0; diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c deleted file mode 100644 index 4438fe8c9..000000000 --- a/drivers/net/smc911x.c +++ /dev/null @@ -1,2306 +0,0 @@ -/* - * smc911x.c - * This is a driver for SMSC's LAN911{5,6,7,8} single-chip Ethernet devices. - * - * Copyright (C) 2005 Sensoria Corp - * Derived from the unified SMC91x driver by Nicolas Pitre - * and the smsc911x.c reference driver by SMSC - * - * 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 - * - * Arguments: - * watchdog = TX watchdog timeout - * tx_fifo_kb = Size of TX FIFO in KB - * - * History: - * 04/16/05 Dustin McIntire Initial version - */ -static const char version[] = - "smc911x.c: v1.0 04-16-2005 by Dustin McIntire \n"; - -/* Debugging options */ -#define ENABLE_SMC_DEBUG_RX 0 -#define ENABLE_SMC_DEBUG_TX 0 -#define ENABLE_SMC_DEBUG_DMA 0 -#define ENABLE_SMC_DEBUG_PKTS 0 -#define ENABLE_SMC_DEBUG_MISC 0 -#define ENABLE_SMC_DEBUG_FUNC 0 - -#define SMC_DEBUG_RX ((ENABLE_SMC_DEBUG_RX ? 1 : 0) << 0) -#define SMC_DEBUG_TX ((ENABLE_SMC_DEBUG_TX ? 1 : 0) << 1) -#define SMC_DEBUG_DMA ((ENABLE_SMC_DEBUG_DMA ? 1 : 0) << 2) -#define SMC_DEBUG_PKTS ((ENABLE_SMC_DEBUG_PKTS ? 1 : 0) << 3) -#define SMC_DEBUG_MISC ((ENABLE_SMC_DEBUG_MISC ? 1 : 0) << 4) -#define SMC_DEBUG_FUNC ((ENABLE_SMC_DEBUG_FUNC ? 1 : 0) << 5) - -#ifndef SMC_DEBUG -#define SMC_DEBUG ( SMC_DEBUG_RX | \ - SMC_DEBUG_TX | \ - SMC_DEBUG_DMA | \ - SMC_DEBUG_PKTS | \ - SMC_DEBUG_MISC | \ - SMC_DEBUG_FUNC \ - ) -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include "smc911x.h" - -/* - * Transmit timeout, default 5 seconds. - */ -static int watchdog = 5000; -module_param(watchdog, int, 0400); -MODULE_PARM_DESC(watchdog, "transmit timeout in milliseconds"); - -static int tx_fifo_kb=8; -module_param(tx_fifo_kb, int, 0400); -MODULE_PARM_DESC(tx_fifo_kb,"transmit FIFO size in KB (1 0 -#define DBG(n, args...) \ - do { \ - if (SMC_DEBUG & (n)) \ - printk(args); \ - } while (0) - -#define PRINTK(args...) printk(args) -#else -#define DBG(n, args...) do { } while (0) -#define PRINTK(args...) printk(KERN_DEBUG args) -#endif - -#if SMC_DEBUG_PKTS > 0 -static void PRINT_PKT(u_char *buf, int length) -{ - int i; - int remainder; - int lines; - - lines = length / 16; - remainder = length % 16; - - for (i = 0; i < lines ; i ++) { - int cur; - for (cur = 0; cur < 8; cur++) { - u_char a, b; - a = *buf++; - b = *buf++; - printk("%02x%02x ", a, b); - } - printk("\n"); - } - for (i = 0; i < remainder/2 ; i++) { - u_char a, b; - a = *buf++; - b = *buf++; - printk("%02x%02x ", a, b); - } - printk("\n"); -} -#else -#define PRINT_PKT(x...) do { } while (0) -#endif - - -/* this enables an interrupt in the interrupt mask register */ -#define SMC_ENABLE_INT(x) do { \ - unsigned int __mask; \ - unsigned long __flags; \ - spin_lock_irqsave(&lp->lock, __flags); \ - __mask = SMC_GET_INT_EN(); \ - __mask |= (x); \ - SMC_SET_INT_EN(__mask); \ - spin_unlock_irqrestore(&lp->lock, __flags); \ -} while (0) - -/* this disables an interrupt from the interrupt mask register */ -#define SMC_DISABLE_INT(x) do { \ - unsigned int __mask; \ - unsigned long __flags; \ - spin_lock_irqsave(&lp->lock, __flags); \ - __mask = SMC_GET_INT_EN(); \ - __mask &= ~(x); \ - SMC_SET_INT_EN(__mask); \ - spin_unlock_irqrestore(&lp->lock, __flags); \ -} while (0) - -/* - * this does a soft reset on the device - */ -static void smc911x_reset(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned int reg, timeout=0, resets=1; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - /* Take out of PM setting first */ - if ((SMC_GET_PMT_CTRL() & PMT_CTRL_READY_) == 0) { - /* Write to the bytetest will take out of powerdown */ - SMC_SET_BYTE_TEST(0); - timeout=10; - do { - udelay(10); - reg = SMC_GET_PMT_CTRL() & PMT_CTRL_READY_; - } while ( timeout-- && !reg); - if (timeout == 0) { - PRINTK("%s: smc911x_reset timeout waiting for PM restore\n", dev->name); - return; - } - } - - /* Disable all interrupts */ - spin_lock_irqsave(&lp->lock, flags); - SMC_SET_INT_EN(0); - spin_unlock_irqrestore(&lp->lock, flags); - - while (resets--) { - SMC_SET_HW_CFG(HW_CFG_SRST_); - timeout=10; - do { - udelay(10); - reg = SMC_GET_HW_CFG(); - /* If chip indicates reset timeout then try again */ - if (reg & HW_CFG_SRST_TO_) { - PRINTK("%s: chip reset timeout, retrying...\n", dev->name); - resets++; - break; - } - } while ( timeout-- && (reg & HW_CFG_SRST_)); - } - if (timeout == 0) { - PRINTK("%s: smc911x_reset timeout waiting for reset\n", dev->name); - return; - } - - /* make sure EEPROM has finished loading before setting GPIO_CFG */ - timeout=1000; - while ( timeout-- && (SMC_GET_E2P_CMD() & E2P_CMD_EPC_BUSY_)) { - udelay(10); - } - if (timeout == 0){ - PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); - return; - } - - /* Initialize interrupts */ - SMC_SET_INT_EN(0); - SMC_ACK_INT(-1); - - /* Reset the FIFO level and flow control settings */ - SMC_SET_HW_CFG((lp->tx_fifo_kb & 0xF) << 16); -//TODO: Figure out what appropriate pause time is - SMC_SET_FLOW(FLOW_FCPT_ | FLOW_FCEN_); - SMC_SET_AFC_CFG(lp->afc_cfg); - - - /* Set to LED outputs */ - SMC_SET_GPIO_CFG(0x70070000); - - /* - * Deassert IRQ for 1*10us for edge type interrupts - * and drive IRQ pin push-pull - */ - SMC_SET_IRQ_CFG( (1 << 24) | INT_CFG_IRQ_EN_ | INT_CFG_IRQ_TYPE_ ); - - /* clear anything saved */ - if (lp->pending_tx_skb != NULL) { - dev_kfree_skb (lp->pending_tx_skb); - lp->pending_tx_skb = NULL; - lp->stats.tx_errors++; - lp->stats.tx_aborted_errors++; - } -} - -/* - * Enable Interrupts, Receive, and Transmit - */ -static void smc911x_enable(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned mask, cfg, cr; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - SMC_SET_MAC_ADDR(dev->dev_addr); - - /* Enable TX */ - cfg = SMC_GET_HW_CFG(); - cfg &= HW_CFG_TX_FIF_SZ_ | 0xFFF; - cfg |= HW_CFG_SF_; - SMC_SET_HW_CFG(cfg); - SMC_SET_FIFO_TDA(0xFF); - /* Update TX stats on every 64 packets received or every 1 sec */ - SMC_SET_FIFO_TSL(64); - SMC_SET_GPT_CFG(GPT_CFG_TIMER_EN_ | 10000); - - spin_lock_irqsave(&lp->lock, flags); - SMC_GET_MAC_CR(cr); - cr |= MAC_CR_TXEN_ | MAC_CR_HBDIS_; - SMC_SET_MAC_CR(cr); - SMC_SET_TX_CFG(TX_CFG_TX_ON_); - spin_unlock_irqrestore(&lp->lock, flags); - - /* Add 2 byte padding to start of packets */ - SMC_SET_RX_CFG((2<<8) & RX_CFG_RXDOFF_); - - /* Turn on receiver and enable RX */ - if (cr & MAC_CR_RXEN_) - DBG(SMC_DEBUG_RX, "%s: Receiver already enabled\n", dev->name); - - spin_lock_irqsave(&lp->lock, flags); - SMC_SET_MAC_CR( cr | MAC_CR_RXEN_ ); - spin_unlock_irqrestore(&lp->lock, flags); - - /* Interrupt on every received packet */ - SMC_SET_FIFO_RSA(0x01); - SMC_SET_FIFO_RSL(0x00); - - /* now, enable interrupts */ - mask = INT_EN_TDFA_EN_ | INT_EN_TSFL_EN_ | INT_EN_RSFL_EN_ | - INT_EN_GPT_INT_EN_ | INT_EN_RXDFH_INT_EN_ | INT_EN_RXE_EN_ | - INT_EN_PHY_INT_EN_; - if (IS_REV_A(lp->revision)) - mask|=INT_EN_RDFL_EN_; - else { - mask|=INT_EN_RDFO_EN_; - } - SMC_ENABLE_INT(mask); -} - -/* - * this puts the device in an inactive state - */ -static void smc911x_shutdown(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned cr; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", CARDNAME, __FUNCTION__); - - /* Disable IRQ's */ - SMC_SET_INT_EN(0); - - /* Turn of Rx and TX */ - spin_lock_irqsave(&lp->lock, flags); - SMC_GET_MAC_CR(cr); - cr &= ~(MAC_CR_TXEN_ | MAC_CR_RXEN_ | MAC_CR_HBDIS_); - SMC_SET_MAC_CR(cr); - SMC_SET_TX_CFG(TX_CFG_STOP_TX_); - spin_unlock_irqrestore(&lp->lock, flags); -} - -static inline void smc911x_drop_pkt(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - unsigned int fifo_count, timeout, reg; - - DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", CARDNAME, __FUNCTION__); - fifo_count = SMC_GET_RX_FIFO_INF() & 0xFFFF; - if (fifo_count <= 4) { - /* Manually dump the packet data */ - while (fifo_count--) - SMC_GET_RX_FIFO(); - } else { - /* Fast forward through the bad packet */ - SMC_SET_RX_DP_CTRL(RX_DP_CTRL_FFWD_BUSY_); - timeout=50; - do { - udelay(10); - reg = SMC_GET_RX_DP_CTRL() & RX_DP_CTRL_FFWD_BUSY_; - } while ( timeout-- && reg); - if (timeout == 0) { - PRINTK("%s: timeout waiting for RX fast forward\n", dev->name); - } - } -} - -/* - * This is the procedure to handle the receipt of a packet. - * It should be called after checking for packet presence in - * the RX status FIFO. It must be called with the spin lock - * already held. - */ -static inline void smc911x_rcv(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - unsigned int pkt_len, status; - struct sk_buff *skb; - unsigned char *data; - - DBG(SMC_DEBUG_FUNC | SMC_DEBUG_RX, "%s: --> %s\n", - dev->name, __FUNCTION__); - status = SMC_GET_RX_STS_FIFO(); - DBG(SMC_DEBUG_RX, "%s: Rx pkt len %d status 0x%08x \n", - dev->name, (status & 0x3fff0000) >> 16, status & 0xc000ffff); - pkt_len = (status & RX_STS_PKT_LEN_) >> 16; - if (status & RX_STS_ES_) { - /* Deal with a bad packet */ - lp->stats.rx_errors++; - if (status & RX_STS_CRC_ERR_) - lp->stats.rx_crc_errors++; - else { - if (status & RX_STS_LEN_ERR_) - lp->stats.rx_length_errors++; - if (status & RX_STS_MCAST_) - lp->stats.multicast++; - } - /* Remove the bad packet data from the RX FIFO */ - smc911x_drop_pkt(dev); - } else { - /* Receive a valid packet */ - /* Alloc a buffer with extra room for DMA alignment */ - skb=dev_alloc_skb(pkt_len+32); - if (unlikely(skb == NULL)) { - PRINTK( "%s: Low memory, rcvd packet dropped.\n", - dev->name); - lp->stats.rx_dropped++; - smc911x_drop_pkt(dev); - return; - } - /* Align IP header to 32 bits - * Note that the device is configured to add a 2 - * byte padding to the packet start, so we really - * want to write to the orignal data pointer */ - data = skb->data; - skb_reserve(skb, 2); - skb_put(skb,pkt_len-4); -#ifdef SMC_USE_DMA - { - unsigned int fifo; - /* Lower the FIFO threshold if possible */ - fifo = SMC_GET_FIFO_INT(); - if (fifo & 0xFF) fifo--; - DBG(SMC_DEBUG_RX, "%s: Setting RX stat FIFO threshold to %d\n", - dev->name, fifo & 0xff); - SMC_SET_FIFO_INT(fifo); - /* Setup RX DMA */ - SMC_SET_RX_CFG(RX_CFG_RX_END_ALGN16_ | ((2<<8) & RX_CFG_RXDOFF_)); - lp->rxdma_active = 1; - lp->current_rx_skb = skb; - SMC_PULL_DATA(data, (pkt_len+2+15) & ~15); - /* Packet processing deferred to DMA RX interrupt */ - } -#else - SMC_SET_RX_CFG(RX_CFG_RX_END_ALGN4_ | ((2<<8) & RX_CFG_RXDOFF_)); - SMC_PULL_DATA(data, pkt_len+2+3); - - DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name,); - PRINT_PKT(data, ((pkt_len - 4) <= 64) ? pkt_len - 4 : 64); - dev->last_rx = jiffies; - skb->dev = dev; - skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); - lp->stats.rx_packets++; - lp->stats.rx_bytes += pkt_len-4; -#endif - } -} - -/* - * This is called to actually send a packet to the chip. - */ -static void smc911x_hardware_send_pkt(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - struct sk_buff *skb; - unsigned int cmdA, cmdB, len; - unsigned char *buf; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", dev->name, __FUNCTION__); - BUG_ON(lp->pending_tx_skb == NULL); - - skb = lp->pending_tx_skb; - lp->pending_tx_skb = NULL; - - /* cmdA {25:24] data alignment [20:16] start offset [10:0] buffer length */ - /* cmdB {31:16] pkt tag [10:0] length */ -#ifdef SMC_USE_DMA - /* 16 byte buffer alignment mode */ - buf = (char*)((u32)(skb->data) & ~0xF); - len = (skb->len + 0xF + ((u32)skb->data & 0xF)) & ~0xF; - cmdA = (1<<24) | (((u32)skb->data & 0xF)<<16) | - TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ | - skb->len; -#else - buf = (char*)((u32)skb->data & ~0x3); - len = (skb->len + 3 + ((u32)skb->data & 3)) & ~0x3; - cmdA = (((u32)skb->data & 0x3) << 16) | - TX_CMD_A_INT_FIRST_SEG_ | TX_CMD_A_INT_LAST_SEG_ | - skb->len; -#endif - /* tag is packet length so we can use this in stats update later */ - cmdB = (skb->len << 16) | (skb->len & 0x7FF); - - DBG(SMC_DEBUG_TX, "%s: TX PKT LENGTH 0x%04x (%d) BUF 0x%p CMDA 0x%08x CMDB 0x%08x\n", - dev->name, len, len, buf, cmdA, cmdB); - SMC_SET_TX_FIFO(cmdA); - SMC_SET_TX_FIFO(cmdB); - - DBG(SMC_DEBUG_PKTS, "%s: Transmitted packet\n", dev->name); - PRINT_PKT(buf, len <= 64 ? len : 64); - - /* Send pkt via PIO or DMA */ -#ifdef SMC_USE_DMA - lp->current_tx_skb = skb; - SMC_PUSH_DATA(buf, len); - /* DMA complete IRQ will free buffer and set jiffies */ -#else - SMC_PUSH_DATA(buf, len); - dev->trans_start = jiffies; - dev_kfree_skb(skb); -#endif - spin_lock_irqsave(&lp->lock, flags); - if (!lp->tx_throttle) { - netif_wake_queue(dev); - } - spin_unlock_irqrestore(&lp->lock, flags); - SMC_ENABLE_INT(INT_EN_TDFA_EN_ | INT_EN_TSFL_EN_); -} - -/* - * Since I am not sure if I will have enough room in the chip's ram - * to store the packet, I call this routine which either sends it - * now, or set the card to generates an interrupt when ready - * for the packet. - */ -static int smc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - unsigned int free; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", - dev->name, __FUNCTION__); - - BUG_ON(lp->pending_tx_skb != NULL); - - free = SMC_GET_TX_FIFO_INF() & TX_FIFO_INF_TDFREE_; - DBG(SMC_DEBUG_TX, "%s: TX free space %d\n", dev->name, free); - - /* Turn off the flow when running out of space in FIFO */ - if (free <= SMC911X_TX_FIFO_LOW_THRESHOLD) { - DBG(SMC_DEBUG_TX, "%s: Disabling data flow due to low FIFO space (%d)\n", - dev->name, free); - spin_lock_irqsave(&lp->lock, flags); - /* Reenable when at least 1 packet of size MTU present */ - SMC_SET_FIFO_TDA((SMC911X_TX_FIFO_LOW_THRESHOLD)/64); - lp->tx_throttle = 1; - netif_stop_queue(dev); - spin_unlock_irqrestore(&lp->lock, flags); - } - - /* Drop packets when we run out of space in TX FIFO - * Account for overhead required for: - * - * Tx command words 8 bytes - * Start offset 15 bytes - * End padding 15 bytes - */ - if (unlikely(free < (skb->len + 8 + 15 + 15))) { - printk("%s: No Tx free space %d < %d\n", - dev->name, free, skb->len); - lp->pending_tx_skb = NULL; - lp->stats.tx_errors++; - lp->stats.tx_dropped++; - dev_kfree_skb(skb); - return 0; - } - -#ifdef SMC_USE_DMA - { - /* If the DMA is already running then defer this packet Tx until - * the DMA IRQ starts it - */ - spin_lock_irqsave(&lp->lock, flags); - if (lp->txdma_active) { - DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: Tx DMA running, deferring packet\n", dev->name); - lp->pending_tx_skb = skb; - netif_stop_queue(dev); - spin_unlock_irqrestore(&lp->lock, flags); - return 0; - } else { - DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: Activating Tx DMA\n", dev->name); - lp->txdma_active = 1; - } - spin_unlock_irqrestore(&lp->lock, flags); - } -#endif - lp->pending_tx_skb = skb; - smc911x_hardware_send_pkt(dev); - - return 0; -} - -/* - * This handles a TX status interrupt, which is only called when: - * - a TX error occurred, or - * - TX of a packet completed. - */ -static void smc911x_tx(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned int tx_status; - - DBG(SMC_DEBUG_FUNC | SMC_DEBUG_TX, "%s: --> %s\n", - dev->name, __FUNCTION__); - - /* Collect the TX status */ - while (((SMC_GET_TX_FIFO_INF() & TX_FIFO_INF_TSUSED_) >> 16) != 0) { - DBG(SMC_DEBUG_TX, "%s: Tx stat FIFO used 0x%04x\n", - dev->name, - (SMC_GET_TX_FIFO_INF() & TX_FIFO_INF_TSUSED_) >> 16); - tx_status = SMC_GET_TX_STS_FIFO(); - lp->stats.tx_packets++; - lp->stats.tx_bytes+=tx_status>>16; - DBG(SMC_DEBUG_TX, "%s: Tx FIFO tag 0x%04x status 0x%04x\n", - dev->name, (tx_status & 0xffff0000) >> 16, - tx_status & 0x0000ffff); - /* count Tx errors, but ignore lost carrier errors when in - * full-duplex mode */ - if ((tx_status & TX_STS_ES_) && !(lp->ctl_rfduplx && - !(tx_status & 0x00000306))) { - lp->stats.tx_errors++; - } - if (tx_status & TX_STS_MANY_COLL_) { - lp->stats.collisions+=16; - lp->stats.tx_aborted_errors++; - } else { - lp->stats.collisions+=(tx_status & TX_STS_COLL_CNT_) >> 3; - } - /* carrier error only has meaning for half-duplex communication */ - if ((tx_status & (TX_STS_LOC_ | TX_STS_NO_CARR_)) && - !lp->ctl_rfduplx) { - lp->stats.tx_carrier_errors++; - } - if (tx_status & TX_STS_LATE_COLL_) { - lp->stats.collisions++; - lp->stats.tx_aborted_errors++; - } - } -} - - -/*---PHY CONTROL AND CONFIGURATION-----------------------------------------*/ -/* - * Reads a register from the MII Management serial interface - */ - -static int smc911x_phy_read(struct net_device *dev, int phyaddr, int phyreg) -{ - unsigned long ioaddr = dev->base_addr; - unsigned int phydata; - - SMC_GET_MII(phyreg, phyaddr, phydata); - - DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%02x, phydata=0x%04x\n", - __FUNCTION__, phyaddr, phyreg, phydata); - return phydata; -} - - -/* - * Writes a register to the MII Management serial interface - */ -static void smc911x_phy_write(struct net_device *dev, int phyaddr, int phyreg, - int phydata) -{ - unsigned long ioaddr = dev->base_addr; - - DBG(SMC_DEBUG_MISC, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n", - __FUNCTION__, phyaddr, phyreg, phydata); - - SMC_SET_MII(phyreg, phyaddr, phydata); -} - -/* - * Finds and reports the PHY address (115 and 117 have external - * PHY interface 118 has internal only - */ -static void smc911x_phy_detect(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - int phyaddr; - unsigned int cfg, id1, id2; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - lp->phy_type = 0; - - /* - * Scan all 32 PHY addresses if necessary, starting at - * PHY#1 to PHY#31, and then PHY#0 last. - */ - switch(lp->version) { - case 0x115: - case 0x117: - cfg = SMC_GET_HW_CFG(); - if (cfg & HW_CFG_EXT_PHY_DET_) { - cfg &= ~HW_CFG_PHY_CLK_SEL_; - cfg |= HW_CFG_PHY_CLK_SEL_CLK_DIS_; - SMC_SET_HW_CFG(cfg); - udelay(10); /* Wait for clocks to stop */ - - cfg |= HW_CFG_EXT_PHY_EN_; - SMC_SET_HW_CFG(cfg); - udelay(10); /* Wait for clocks to stop */ - - cfg &= ~HW_CFG_PHY_CLK_SEL_; - cfg |= HW_CFG_PHY_CLK_SEL_EXT_PHY_; - SMC_SET_HW_CFG(cfg); - udelay(10); /* Wait for clocks to stop */ - - cfg |= HW_CFG_SMI_SEL_; - SMC_SET_HW_CFG(cfg); - - for (phyaddr = 1; phyaddr < 32; ++phyaddr) { - - /* Read the PHY identifiers */ - SMC_GET_PHY_ID1(phyaddr & 31, id1); - SMC_GET_PHY_ID2(phyaddr & 31, id2); - - /* Make sure it is a valid identifier */ - if (id1 != 0x0000 && id1 != 0xffff && - id1 != 0x8000 && id2 != 0x0000 && - id2 != 0xffff && id2 != 0x8000) { - /* Save the PHY's address */ - lp->mii.phy_id = phyaddr & 31; - lp->phy_type = id1 << 16 | id2; - break; - } - } - } - default: - /* Internal media only */ - SMC_GET_PHY_ID1(1, id1); - SMC_GET_PHY_ID2(1, id2); - /* Save the PHY's address */ - lp->mii.phy_id = 1; - lp->phy_type = id1 << 16 | id2; - } - - DBG(SMC_DEBUG_MISC, "%s: phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n", - dev->name, id1, id2, lp->mii.phy_id); -} - -/* - * Sets the PHY to a configuration as determined by the user. - * Called with spin_lock held. - */ -static int smc911x_phy_fixed(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int phyaddr = lp->mii.phy_id; - int bmcr; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - /* Enter Link Disable state */ - SMC_GET_PHY_BMCR(phyaddr, bmcr); - bmcr |= BMCR_PDOWN; - SMC_SET_PHY_BMCR(phyaddr, bmcr); - - /* - * Set our fixed capabilities - * Disable auto-negotiation - */ - bmcr &= ~BMCR_ANENABLE; - if (lp->ctl_rfduplx) - bmcr |= BMCR_FULLDPLX; - - if (lp->ctl_rspeed == 100) - bmcr |= BMCR_SPEED100; - - /* Write our capabilities to the phy control register */ - SMC_SET_PHY_BMCR(phyaddr, bmcr); - - /* Re-Configure the Receive/Phy Control register */ - bmcr &= ~BMCR_PDOWN; - SMC_SET_PHY_BMCR(phyaddr, bmcr); - - return 1; -} - -/* - * smc911x_phy_reset - reset the phy - * @dev: net device - * @phy: phy address - * - * Issue a software reset for the specified PHY and - * wait up to 100ms for the reset to complete. We should - * not access the PHY for 50ms after issuing the reset. - * - * The time to wait appears to be dependent on the PHY. - * - */ -static int smc911x_phy_reset(struct net_device *dev, int phy) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int timeout; - unsigned long flags; - unsigned int reg; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); - - spin_lock_irqsave(&lp->lock, flags); - reg = SMC_GET_PMT_CTRL(); - reg &= ~0xfffff030; - reg |= PMT_CTRL_PHY_RST_; - SMC_SET_PMT_CTRL(reg); - spin_unlock_irqrestore(&lp->lock, flags); - for (timeout = 2; timeout; timeout--) { - msleep(50); - spin_lock_irqsave(&lp->lock, flags); - reg = SMC_GET_PMT_CTRL(); - spin_unlock_irqrestore(&lp->lock, flags); - if (!(reg & PMT_CTRL_PHY_RST_)) { - /* extra delay required because the phy may - * not be completed with its reset - * when PHY_BCR_RESET_ is cleared. 256us - * should suffice, but use 500us to be safe - */ - udelay(500); - break; - } - } - - return reg & PMT_CTRL_PHY_RST_; -} - -/* - * smc911x_phy_powerdown - powerdown phy - * @dev: net device - * @phy: phy address - * - * Power down the specified PHY - */ -static void smc911x_phy_powerdown(struct net_device *dev, int phy) -{ - unsigned long ioaddr = dev->base_addr; - unsigned int bmcr; - - /* Enter Link Disable state */ - SMC_GET_PHY_BMCR(phy, bmcr); - bmcr |= BMCR_PDOWN; - SMC_SET_PHY_BMCR(phy, bmcr); -} - -/* - * smc911x_phy_check_media - check the media status and adjust BMCR - * @dev: net device - * @init: set true for initialisation - * - * Select duplex mode depending on negotiation state. This - * also updates our carrier state. - */ -static void smc911x_phy_check_media(struct net_device *dev, int init) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int phyaddr = lp->mii.phy_id; - unsigned int bmcr, cr; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { - /* duplex state has changed */ - SMC_GET_PHY_BMCR(phyaddr, bmcr); - SMC_GET_MAC_CR(cr); - if (lp->mii.full_duplex) { - DBG(SMC_DEBUG_MISC, "%s: Configuring for full-duplex mode\n", dev->name); - bmcr |= BMCR_FULLDPLX; - cr |= MAC_CR_RCVOWN_; - } else { - DBG(SMC_DEBUG_MISC, "%s: Configuring for half-duplex mode\n", dev->name); - bmcr &= ~BMCR_FULLDPLX; - cr &= ~MAC_CR_RCVOWN_; - } - SMC_SET_PHY_BMCR(phyaddr, bmcr); - SMC_SET_MAC_CR(cr); - } -} - -/* - * Configures the specified PHY through the MII management interface - * using Autonegotiation. - * Calls smc911x_phy_fixed() if the user has requested a certain config. - * If RPC ANEG bit is set, the media selection is dependent purely on - * the selection by the MII (either in the MII BMCR reg or the result - * of autonegotiation.) If the RPC ANEG bit is cleared, the selection - * is controlled by the RPC SPEED and RPC DPLX bits. - */ -static void smc911x_phy_configure(void *data) -{ - struct net_device *dev = data; - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int phyaddr = lp->mii.phy_id; - int my_phy_caps; /* My PHY capabilities */ - int my_ad_caps; /* My Advertised capabilities */ - int status; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__); - - /* - * We should not be called if phy_type is zero. - */ - if (lp->phy_type == 0) - goto smc911x_phy_configure_exit; - - if (smc911x_phy_reset(dev, phyaddr)) { - printk("%s: PHY reset timed out\n", dev->name); - goto smc911x_phy_configure_exit; - } - spin_lock_irqsave(&lp->lock, flags); - - /* - * Enable PHY Interrupts (for register 18) - * Interrupts listed here are enabled - */ - SMC_SET_PHY_INT_MASK(phyaddr, PHY_INT_MASK_ENERGY_ON_ | - PHY_INT_MASK_ANEG_COMP_ | PHY_INT_MASK_REMOTE_FAULT_ | - PHY_INT_MASK_LINK_DOWN_); - - /* If the user requested no auto neg, then go set his request */ - if (lp->mii.force_media) { - smc911x_phy_fixed(dev); - goto smc911x_phy_configure_exit; - } - - /* Copy our capabilities from MII_BMSR to MII_ADVERTISE */ - SMC_GET_PHY_BMSR(phyaddr, my_phy_caps); - if (!(my_phy_caps & BMSR_ANEGCAPABLE)) { - printk(KERN_INFO "Auto negotiation NOT supported\n"); - smc911x_phy_fixed(dev); - goto smc911x_phy_configure_exit; - } - - /* CSMA capable w/ both pauses */ - my_ad_caps = ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; - - if (my_phy_caps & BMSR_100BASE4) - my_ad_caps |= ADVERTISE_100BASE4; - if (my_phy_caps & BMSR_100FULL) - my_ad_caps |= ADVERTISE_100FULL; - if (my_phy_caps & BMSR_100HALF) - my_ad_caps |= ADVERTISE_100HALF; - if (my_phy_caps & BMSR_10FULL) - my_ad_caps |= ADVERTISE_10FULL; - if (my_phy_caps & BMSR_10HALF) - my_ad_caps |= ADVERTISE_10HALF; - - /* Disable capabilities not selected by our user */ - if (lp->ctl_rspeed != 100) - my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF); - - if (!lp->ctl_rfduplx) - my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL); - - /* Update our Auto-Neg Advertisement Register */ - SMC_SET_PHY_MII_ADV(phyaddr, my_ad_caps); - lp->mii.advertising = my_ad_caps; - - /* - * Read the register back. Without this, it appears that when - * auto-negotiation is restarted, sometimes it isn't ready and - * the link does not come up. - */ - udelay(10); - SMC_GET_PHY_MII_ADV(phyaddr, status); - - DBG(SMC_DEBUG_MISC, "%s: phy caps=0x%04x\n", dev->name, my_phy_caps); - DBG(SMC_DEBUG_MISC, "%s: phy advertised caps=0x%04x\n", dev->name, my_ad_caps); - - /* Restart auto-negotiation process in order to advertise my caps */ - SMC_SET_PHY_BMCR(phyaddr, BMCR_ANENABLE | BMCR_ANRESTART); - - smc911x_phy_check_media(dev, 1); - -smc911x_phy_configure_exit: - spin_unlock_irqrestore(&lp->lock, flags); - lp->work_pending = 0; -} - -/* - * smc911x_phy_interrupt - * - * Purpose: Handle interrupts relating to PHY register 18. This is - * called from the "hard" interrupt handler under our private spinlock. - */ -static void smc911x_phy_interrupt(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int phyaddr = lp->mii.phy_id; - int status; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - if (lp->phy_type == 0) - return; - - smc911x_phy_check_media(dev, 0); - /* read to clear status bits */ - SMC_GET_PHY_INT_SRC(phyaddr,status); - DBG(SMC_DEBUG_MISC, "%s: PHY interrupt status 0x%04x\n", - dev->name, status & 0xffff); - DBG(SMC_DEBUG_MISC, "%s: AFC_CFG 0x%08x\n", - dev->name, SMC_GET_AFC_CFG()); -} - -/*--- END PHY CONTROL AND CONFIGURATION-------------------------------------*/ - -/* - * This is the main routine of the driver, to handle the device when - * it needs some attention. - */ -static irqreturn_t smc911x_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - struct net_device *dev = dev_id; - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned int status, mask, timeout; - unsigned int rx_overrun=0, cr, pkts; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - spin_lock_irqsave(&lp->lock, flags); - - /* Spurious interrupt check */ - if ((SMC_GET_IRQ_CFG() & (INT_CFG_IRQ_INT_ | INT_CFG_IRQ_EN_)) != - (INT_CFG_IRQ_INT_ | INT_CFG_IRQ_EN_)) { - spin_unlock_irqrestore(&lp->lock, flags); - return IRQ_NONE; - } - - mask = SMC_GET_INT_EN(); - SMC_SET_INT_EN(0); - - /* set a timeout value, so I don't stay here forever */ - timeout = 8; - - - do { - status = SMC_GET_INT(); - - DBG(SMC_DEBUG_MISC, "%s: INT 0x%08x MASK 0x%08x OUTSIDE MASK 0x%08x\n", - dev->name, status, mask, status & ~mask); - - status &= mask; - if (!status) - break; - - /* Handle SW interrupt condition */ - if (status & INT_STS_SW_INT_) { - SMC_ACK_INT(INT_STS_SW_INT_); - mask &= ~INT_EN_SW_INT_EN_; - } - /* Handle various error conditions */ - if (status & INT_STS_RXE_) { - SMC_ACK_INT(INT_STS_RXE_); - lp->stats.rx_errors++; - } - if (status & INT_STS_RXDFH_INT_) { - SMC_ACK_INT(INT_STS_RXDFH_INT_); - lp->stats.rx_dropped+=SMC_GET_RX_DROP(); - } - /* Undocumented interrupt-what is the right thing to do here? */ - if (status & INT_STS_RXDF_INT_) { - SMC_ACK_INT(INT_STS_RXDF_INT_); - } - - /* Rx Data FIFO exceeds set level */ - if (status & INT_STS_RDFL_) { - if (IS_REV_A(lp->revision)) { - rx_overrun=1; - SMC_GET_MAC_CR(cr); - cr &= ~MAC_CR_RXEN_; - SMC_SET_MAC_CR(cr); - DBG(SMC_DEBUG_RX, "%s: RX overrun\n", dev->name); - lp->stats.rx_errors++; - lp->stats.rx_fifo_errors++; - } - SMC_ACK_INT(INT_STS_RDFL_); - } - if (status & INT_STS_RDFO_) { - if (!IS_REV_A(lp->revision)) { - SMC_GET_MAC_CR(cr); - cr &= ~MAC_CR_RXEN_; - SMC_SET_MAC_CR(cr); - rx_overrun=1; - DBG(SMC_DEBUG_RX, "%s: RX overrun\n", dev->name); - lp->stats.rx_errors++; - lp->stats.rx_fifo_errors++; - } - SMC_ACK_INT(INT_STS_RDFO_); - } - /* Handle receive condition */ - if ((status & INT_STS_RSFL_) || rx_overrun) { - unsigned int fifo; - DBG(SMC_DEBUG_RX, "%s: RX irq\n", dev->name); - fifo = SMC_GET_RX_FIFO_INF(); - pkts = (fifo & RX_FIFO_INF_RXSUSED_) >> 16; - DBG(SMC_DEBUG_RX, "%s: Rx FIFO pkts %d, bytes %d\n", - dev->name, pkts, fifo & 0xFFFF ); - if (pkts != 0) { -#ifdef SMC_USE_DMA - unsigned int fifo; - if (lp->rxdma_active){ - DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, - "%s: RX DMA active\n", dev->name); - /* The DMA is already running so up the IRQ threshold */ - fifo = SMC_GET_FIFO_INT() & ~0xFF; - fifo |= pkts & 0xFF; - DBG(SMC_DEBUG_RX, - "%s: Setting RX stat FIFO threshold to %d\n", - dev->name, fifo & 0xff); - SMC_SET_FIFO_INT(fifo); - } else -#endif - smc911x_rcv(dev); - } - SMC_ACK_INT(INT_STS_RSFL_); - } - /* Handle transmit FIFO available */ - if (status & INT_STS_TDFA_) { - DBG(SMC_DEBUG_TX, "%s: TX data FIFO space available irq\n", dev->name); - SMC_SET_FIFO_TDA(0xFF); - lp->tx_throttle = 0; -#ifdef SMC_USE_DMA - if (!lp->txdma_active) -#endif - netif_wake_queue(dev); - SMC_ACK_INT(INT_STS_TDFA_); - } - /* Handle transmit done condition */ -#if 1 - if (status & (INT_STS_TSFL_ | INT_STS_GPT_INT_)) { - DBG(SMC_DEBUG_TX | SMC_DEBUG_MISC, - "%s: Tx stat FIFO limit (%d) /GPT irq\n", - dev->name, (SMC_GET_FIFO_INT() & 0x00ff0000) >> 16); - smc911x_tx(dev); - SMC_SET_GPT_CFG(GPT_CFG_TIMER_EN_ | 10000); - SMC_ACK_INT(INT_STS_TSFL_); - SMC_ACK_INT(INT_STS_TSFL_ | INT_STS_GPT_INT_); - } -#else - if (status & INT_STS_TSFL_) { - DBG(SMC_DEBUG_TX, "%s: TX status FIFO limit (%d) irq \n", dev->name, ); - smc911x_tx(dev); - SMC_ACK_INT(INT_STS_TSFL_); - } - - if (status & INT_STS_GPT_INT_) { - DBG(SMC_DEBUG_RX, "%s: IRQ_CFG 0x%08x FIFO_INT 0x%08x RX_CFG 0x%08x\n", - dev->name, - SMC_GET_IRQ_CFG(), - SMC_GET_FIFO_INT(), - SMC_GET_RX_CFG()); - DBG(SMC_DEBUG_RX, "%s: Rx Stat FIFO Used 0x%02x " - "Data FIFO Used 0x%04x Stat FIFO 0x%08x\n", - dev->name, - (SMC_GET_RX_FIFO_INF() & 0x00ff0000) >> 16, - SMC_GET_RX_FIFO_INF() & 0xffff, - SMC_GET_RX_STS_FIFO_PEEK()); - SMC_SET_GPT_CFG(GPT_CFG_TIMER_EN_ | 10000); - SMC_ACK_INT(INT_STS_GPT_INT_); - } -#endif - - /* Handle PHY interupt condition */ - if (status & INT_STS_PHY_INT_) { - DBG(SMC_DEBUG_MISC, "%s: PHY irq\n", dev->name); - smc911x_phy_interrupt(dev); - SMC_ACK_INT(INT_STS_PHY_INT_); - } - } while (--timeout); - - /* restore mask state */ - SMC_SET_INT_EN(mask); - - DBG(SMC_DEBUG_MISC, "%s: Interrupt done (%d loops)\n", - dev->name, 8-timeout); - - spin_unlock_irqrestore(&lp->lock, flags); - - DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout); - - return IRQ_HANDLED; -} - -#ifdef SMC_USE_DMA -static void -smc911x_tx_dma_irq(int dma, void *data, struct pt_regs *regs) -{ - struct net_device *dev = (struct net_device *)data; - struct smc911x_local *lp = netdev_priv(dev); - struct sk_buff *skb = lp->current_tx_skb; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, "%s: TX DMA irq handler\n", dev->name); - /* Clear the DMA interrupt sources */ - SMC_DMA_ACK_IRQ(dev, dma); - BUG_ON(skb == NULL); - dma_unmap_single(NULL, tx_dmabuf, tx_dmalen, DMA_TO_DEVICE); - dev->trans_start = jiffies; - dev_kfree_skb_irq(skb); - lp->current_tx_skb = NULL; - if (lp->pending_tx_skb != NULL) - smc911x_hardware_send_pkt(dev); - else { - DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, - "%s: No pending Tx packets. DMA disabled\n", dev->name); - spin_lock_irqsave(&lp->lock, flags); - lp->txdma_active = 0; - if (!lp->tx_throttle) { - netif_wake_queue(dev); - } - spin_unlock_irqrestore(&lp->lock, flags); - } - - DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, - "%s: TX DMA irq completed\n", dev->name); -} -static void -smc911x_rx_dma_irq(int dma, void *data, struct pt_regs *regs) -{ - struct net_device *dev = (struct net_device *)data; - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - struct sk_buff *skb = lp->current_rx_skb; - unsigned long flags; - unsigned int pkts; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, "%s: RX DMA irq handler\n", dev->name); - /* Clear the DMA interrupt sources */ - SMC_DMA_ACK_IRQ(dev, dma); - dma_unmap_single(NULL, rx_dmabuf, rx_dmalen, DMA_FROM_DEVICE); - BUG_ON(skb == NULL); - lp->current_rx_skb = NULL; - PRINT_PKT(skb->data, skb->len); - dev->last_rx = jiffies; - skb->dev = dev; - skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); - lp->stats.rx_packets++; - lp->stats.rx_bytes += skb->len; - - spin_lock_irqsave(&lp->lock, flags); - pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16; - if (pkts != 0) { - smc911x_rcv(dev); - }else { - lp->rxdma_active = 0; - } - spin_unlock_irqrestore(&lp->lock, flags); - DBG(SMC_DEBUG_RX | SMC_DEBUG_DMA, - "%s: RX DMA irq completed. DMA RX FIFO PKTS %d\n", - dev->name, pkts); -} -#endif /* SMC_USE_DMA */ - -#ifdef CONFIG_NET_POLL_CONTROLLER -/* - * Polling receive - used by netconsole and other diagnostic tools - * to allow network i/o with interrupts disabled. - */ -static void smc911x_poll_controller(struct net_device *dev) -{ - disable_irq(dev->irq); - smc911x_interrupt(dev->irq, dev, NULL); - enable_irq(dev->irq); -} -#endif - -/* Our watchdog timed out. Called by the networking layer */ -static void smc911x_timeout(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int status, mask; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - spin_lock_irqsave(&lp->lock, flags); - status = SMC_GET_INT(); - mask = SMC_GET_INT_EN(); - spin_unlock_irqrestore(&lp->lock, flags); - DBG(SMC_DEBUG_MISC, "%s: INT 0x%02x MASK 0x%02x \n", - dev->name, status, mask); - - /* Dump the current TX FIFO contents and restart */ - mask = SMC_GET_TX_CFG(); - SMC_SET_TX_CFG(mask | TX_CFG_TXS_DUMP_ | TX_CFG_TXD_DUMP_); - /* - * Reconfiguring the PHY doesn't seem like a bad idea here, but - * smc911x_phy_configure() calls msleep() which calls schedule_timeout() - * which calls schedule(). Hence we use a work queue. - */ - if (lp->phy_type != 0) { - if (schedule_work(&lp->phy_configure)) { - lp->work_pending = 1; - } - } - - /* We can accept TX packets again */ - dev->trans_start = jiffies; - netif_wake_queue(dev); -} - -/* - * This routine will, depending on the values passed to it, - * either make it accept multicast packets, go into - * promiscuous mode (for TCPDUMP and cousins) or accept - * a select set of multicast packets - */ -static void smc911x_set_multicast_list(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - unsigned int multicast_table[2]; - unsigned int mcr, update_multicast = 0; - unsigned long flags; - /* table for flipping the order of 5 bits */ - static const unsigned char invert5[] = - {0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0C, 0x1C, - 0x02, 0x12, 0x0A, 0x1A, 0x06, 0x16, 0x0E, 0x1E, - 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0D, 0x1D, - 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F}; - - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - spin_lock_irqsave(&lp->lock, flags); - SMC_GET_MAC_CR(mcr); - spin_unlock_irqrestore(&lp->lock, flags); - - if (dev->flags & IFF_PROMISC) { - - DBG(SMC_DEBUG_MISC, "%s: RCR_PRMS\n", dev->name); - mcr |= MAC_CR_PRMS_; - } - /* - * Here, I am setting this to accept all multicast packets. - * I don't need to zero the multicast table, because the flag is - * checked before the table is - */ - else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) { - DBG(SMC_DEBUG_MISC, "%s: RCR_ALMUL\n", dev->name); - mcr |= MAC_CR_MCPAS_; - } - - /* - * This sets the internal hardware table to filter out unwanted - * multicast packets before they take up memory. - * - * The SMC chip uses a hash table where the high 6 bits of the CRC of - * address are the offset into the table. If that bit is 1, then the - * multicast packet is accepted. Otherwise, it's dropped silently. - * - * To use the 6 bits as an offset into the table, the high 1 bit is - * the number of the 32 bit register, while the low 5 bits are the bit - * within that register. - */ - else if (dev->mc_count) { - int i; - struct dev_mc_list *cur_addr; - - /* Set the Hash perfec mode */ - mcr |= MAC_CR_HPFILT_; - - /* start with a table of all zeros: reject all */ - memset(multicast_table, 0, sizeof(multicast_table)); - - cur_addr = dev->mc_list; - for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { - int position; - - /* do we have a pointer here? */ - if (!cur_addr) - break; - /* make sure this is a multicast address - - shouldn't this be a given if we have it here ? */ - if (!(*cur_addr->dmi_addr & 1)) - continue; - - /* only use the low order bits */ - position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f; - - /* do some messy swapping to put the bit in the right spot */ - multicast_table[invert5[position&0x1F]&0x1] |= - (1<>1)&0x1F]); - } - - /* be sure I get rid of flags I might have set */ - mcr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_); - - /* now, the table can be loaded into the chipset */ - update_multicast = 1; - } else { - DBG(SMC_DEBUG_MISC, "%s: ~(MAC_CR_PRMS_|MAC_CR_MCPAS_)\n", - dev->name); - mcr &= ~(MAC_CR_PRMS_ | MAC_CR_MCPAS_); - - /* - * since I'm disabling all multicast entirely, I need to - * clear the multicast list - */ - memset(multicast_table, 0, sizeof(multicast_table)); - update_multicast = 1; - } - - spin_lock_irqsave(&lp->lock, flags); - SMC_SET_MAC_CR(mcr); - if (update_multicast) { - DBG(SMC_DEBUG_MISC, - "%s: update mcast hash table 0x%08x 0x%08x\n", - dev->name, multicast_table[0], multicast_table[1]); - SMC_SET_HASHL(multicast_table[0]); - SMC_SET_HASHH(multicast_table[1]); - } - spin_unlock_irqrestore(&lp->lock, flags); -} - - -/* - * Open and Initialize the board - * - * Set up everything, reset the card, etc.. - */ -static int -smc911x_open(struct net_device *dev) -{ - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - /* - * Check that the address is valid. If its not, refuse - * to bring the device up. The user must specify an - * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx - */ - if (!is_valid_ether_addr(dev->dev_addr)) { - PRINTK("%s: no valid ethernet hw addr\n", __FUNCTION__); - return -EINVAL; - } - - /* reset the hardware */ - smc911x_reset(dev); - - /* Configure the PHY, initialize the link state */ - smc911x_phy_configure(dev); - - /* Turn on Tx + Rx */ - smc911x_enable(dev); - - netif_start_queue(dev); - - return 0; -} - -/* - * smc911x_close - * - * this makes the board clean up everything that it can - * and not talk to the outside world. Caused by - * an 'ifconfig ethX down' - */ -static int smc911x_close(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - netif_stop_queue(dev); - netif_carrier_off(dev); - - /* clear everything */ - smc911x_shutdown(dev); - - if (lp->phy_type != 0) { - /* We need to ensure that no calls to - * smc911x_phy_configure are pending. - - * flush_scheduled_work() cannot be called because we - * are running with the netlink semaphore held (from - * devinet_ioctl()) and the pending work queue - * contains linkwatch_event() (scheduled by - * netif_carrier_off() above). linkwatch_event() also - * wants the netlink semaphore. - */ - while (lp->work_pending) - schedule(); - smc911x_phy_powerdown(dev, lp->mii.phy_id); - } - - if (lp->pending_tx_skb) { - dev_kfree_skb(lp->pending_tx_skb); - lp->pending_tx_skb = NULL; - } - - return 0; -} - -/* - * Get the current statistics. - * This may be called with the card open or closed. - */ -static struct net_device_stats *smc911x_query_statistics(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - - return &lp->stats; -} - -/* - * Ethtool support - */ -static int -smc911x_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - struct smc911x_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; - int ret, status; - unsigned long flags; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - cmd->maxtxpkt = 1; - cmd->maxrxpkt = 1; - - if (lp->phy_type != 0) { - spin_lock_irqsave(&lp->lock, flags); - ret = mii_ethtool_gset(&lp->mii, cmd); - spin_unlock_irqrestore(&lp->lock, flags); - } else { - cmd->supported = SUPPORTED_10baseT_Half | - SUPPORTED_10baseT_Full | - SUPPORTED_TP | SUPPORTED_AUI; - - if (lp->ctl_rspeed == 10) - cmd->speed = SPEED_10; - else if (lp->ctl_rspeed == 100) - cmd->speed = SPEED_100; - - cmd->autoneg = AUTONEG_DISABLE; - if (lp->mii.phy_id==1) - cmd->transceiver = XCVR_INTERNAL; - else - cmd->transceiver = XCVR_EXTERNAL; - cmd->port = 0; - SMC_GET_PHY_SPECIAL(lp->mii.phy_id, status); - cmd->duplex = - (status & (PHY_SPECIAL_SPD_10FULL_ | PHY_SPECIAL_SPD_100FULL_)) ? - DUPLEX_FULL : DUPLEX_HALF; - ret = 0; - } - - return ret; -} - -static int -smc911x_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - struct smc911x_local *lp = netdev_priv(dev); - int ret; - unsigned long flags; - - if (lp->phy_type != 0) { - spin_lock_irqsave(&lp->lock, flags); - ret = mii_ethtool_sset(&lp->mii, cmd); - spin_unlock_irqrestore(&lp->lock, flags); - } else { - if (cmd->autoneg != AUTONEG_DISABLE || - cmd->speed != SPEED_10 || - (cmd->duplex != DUPLEX_HALF && cmd->duplex != DUPLEX_FULL) || - (cmd->port != PORT_TP && cmd->port != PORT_AUI)) - return -EINVAL; - - lp->ctl_rfduplx = cmd->duplex == DUPLEX_FULL; - - ret = 0; - } - - return ret; -} - -static void -smc911x_ethtool_getdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) -{ - strncpy(info->driver, CARDNAME, sizeof(info->driver)); - strncpy(info->version, version, sizeof(info->version)); - strncpy(info->bus_info, dev->class_dev.dev->bus_id, sizeof(info->bus_info)); -} - -static int smc911x_ethtool_nwayreset(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - int ret = -EINVAL; - unsigned long flags; - - if (lp->phy_type != 0) { - spin_lock_irqsave(&lp->lock, flags); - ret = mii_nway_restart(&lp->mii); - spin_unlock_irqrestore(&lp->lock, flags); - } - - return ret; -} - -static u32 smc911x_ethtool_getmsglevel(struct net_device *dev) -{ - struct smc911x_local *lp = netdev_priv(dev); - return lp->msg_enable; -} - -static void smc911x_ethtool_setmsglevel(struct net_device *dev, u32 level) -{ - struct smc911x_local *lp = netdev_priv(dev); - lp->msg_enable = level; -} - -static int smc911x_ethtool_getregslen(struct net_device *dev) -{ - /* System regs + MAC regs + PHY regs */ - return (((E2P_CMD - ID_REV)/4 + 1) + - (WUCSR - MAC_CR)+1 + 32) * sizeof(u32); -} - -static void smc911x_ethtool_getregs(struct net_device *dev, - struct ethtool_regs* regs, void *buf) -{ - unsigned long ioaddr = dev->base_addr; - struct smc911x_local *lp = netdev_priv(dev); - unsigned long flags; - u32 reg,i,j=0; - u32 *data = (u32*)buf; - - regs->version = lp->version; - for(i=ID_REV;i<=E2P_CMD;i+=4) { - data[j++] = SMC_inl(ioaddr,i); - } - for(i=MAC_CR;i<=WUCSR;i++) { - spin_lock_irqsave(&lp->lock, flags); - SMC_GET_MAC_CSR(i, reg); - spin_unlock_irqrestore(&lp->lock, flags); - data[j++] = reg; - } - for(i=0;i<=31;i++) { - spin_lock_irqsave(&lp->lock, flags); - SMC_GET_MII(i, lp->mii.phy_id, reg); - spin_unlock_irqrestore(&lp->lock, flags); - data[j++] = reg & 0xFFFF; - } -} - -static int smc911x_ethtool_wait_eeprom_ready(struct net_device *dev) -{ - unsigned long ioaddr = dev->base_addr; - unsigned int timeout; - int e2p_cmd; - - e2p_cmd = SMC_GET_E2P_CMD(); - for(timeout=10;(e2p_cmd & E2P_CMD_EPC_BUSY_) && timeout; timeout--) { - if (e2p_cmd & E2P_CMD_EPC_TIMEOUT_) { - PRINTK("%s: %s timeout waiting for EEPROM to respond\n", - dev->name, __FUNCTION__); - return -EFAULT; - } - mdelay(1); - e2p_cmd = SMC_GET_E2P_CMD(); - } - if (timeout == 0) { - PRINTK("%s: %s timeout waiting for EEPROM CMD not busy\n", - dev->name, __FUNCTION__); - return -ETIMEDOUT; - } - return 0; -} - -static inline int smc911x_ethtool_write_eeprom_cmd(struct net_device *dev, - int cmd, int addr) -{ - unsigned long ioaddr = dev->base_addr; - int ret; - - if ((ret = smc911x_ethtool_wait_eeprom_ready(dev))!=0) - return ret; - SMC_SET_E2P_CMD(E2P_CMD_EPC_BUSY_ | - ((cmd) & (0x7<<28)) | - ((addr) & 0xFF)); - return 0; -} - -static inline int smc911x_ethtool_read_eeprom_byte(struct net_device *dev, - u8 *data) -{ - unsigned long ioaddr = dev->base_addr; - int ret; - - if ((ret = smc911x_ethtool_wait_eeprom_ready(dev))!=0) - return ret; - *data = SMC_GET_E2P_DATA(); - return 0; -} - -static inline int smc911x_ethtool_write_eeprom_byte(struct net_device *dev, - u8 data) -{ - unsigned long ioaddr = dev->base_addr; - int ret; - - if ((ret = smc911x_ethtool_wait_eeprom_ready(dev))!=0) - return ret; - SMC_SET_E2P_DATA(data); - return 0; -} - -static int smc911x_ethtool_geteeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) -{ - u8 eebuf[SMC911X_EEPROM_LEN]; - int i, ret; - - for(i=0;ioffset, eeprom->len); - return 0; -} - -static int smc911x_ethtool_seteeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) -{ - int i, ret; - - /* Enable erase */ - if ((ret=smc911x_ethtool_write_eeprom_cmd(dev, E2P_CMD_EPC_CMD_EWEN_, 0 ))!=0) - return ret; - for(i=eeprom->offset;i<(eeprom->offset+eeprom->len);i++) { - /* erase byte */ - if ((ret=smc911x_ethtool_write_eeprom_cmd(dev, E2P_CMD_EPC_CMD_ERASE_, i ))!=0) - return ret; - /* write byte */ - if ((ret=smc911x_ethtool_write_eeprom_byte(dev, *data))!=0) - return ret; - if ((ret=smc911x_ethtool_write_eeprom_cmd(dev, E2P_CMD_EPC_CMD_WRITE_, i ))!=0) - return ret; - } - return 0; -} - -static int smc911x_ethtool_geteeprom_len(struct net_device *dev) -{ - return SMC911X_EEPROM_LEN; -} - -static struct ethtool_ops smc911x_ethtool_ops = { - .get_settings = smc911x_ethtool_getsettings, - .set_settings = smc911x_ethtool_setsettings, - .get_drvinfo = smc911x_ethtool_getdrvinfo, - .get_msglevel = smc911x_ethtool_getmsglevel, - .set_msglevel = smc911x_ethtool_setmsglevel, - .nway_reset = smc911x_ethtool_nwayreset, - .get_link = ethtool_op_get_link, - .get_regs_len = smc911x_ethtool_getregslen, - .get_regs = smc911x_ethtool_getregs, - .get_eeprom_len = smc911x_ethtool_geteeprom_len, - .get_eeprom = smc911x_ethtool_geteeprom, - .set_eeprom = smc911x_ethtool_seteeprom, -}; - -/* - * smc911x_findirq - * - * This routine has a simple purpose -- make the SMC chip generate an - * interrupt, so an auto-detect routine can detect it, and find the IRQ, - */ -static int __init smc911x_findirq(unsigned long ioaddr) -{ - int timeout = 20; - unsigned long cookie; - - DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); - - cookie = probe_irq_on(); - - /* - * Force a SW interrupt - */ - - SMC_SET_INT_EN(INT_EN_SW_INT_EN_); - - /* - * Wait until positive that the interrupt has been generated - */ - do { - int int_status; - udelay(10); - int_status = SMC_GET_INT_EN(); - if (int_status & INT_EN_SW_INT_EN_) - break; /* got the interrupt */ - } while (--timeout); - - /* - * there is really nothing that I can do here if timeout fails, - * as autoirq_report will return a 0 anyway, which is what I - * want in this case. Plus, the clean up is needed in both - * cases. - */ - - /* and disable all interrupts again */ - SMC_SET_INT_EN(0); - - /* and return what I found */ - return probe_irq_off(cookie); -} - -/* - * Function: smc911x_probe(unsigned long ioaddr) - * - * Purpose: - * Tests to see if a given ioaddr points to an SMC911x chip. - * Returns a 0 on success - * - * Algorithm: - * (1) see if the endian word is OK - * (1) see if I recognize the chip ID in the appropriate register - * - * Here I do typical initialization tasks. - * - * o Initialize the structure if needed - * o print out my vanity message if not done so already - * o print out what type of hardware is detected - * o print out the ethernet address - * o find the IRQ - * o set up my private data - * o configure the dev structure with my subroutines - * o actually GRAB the irq. - * o GRAB the region - */ -static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr) -{ - struct smc911x_local *lp = netdev_priv(dev); - int i, retval; - unsigned int val, chip_id, revision; - const char *version_string; - - DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__); - - /* First, see if the endian word is recognized */ - val = SMC_GET_BYTE_TEST(); - DBG(SMC_DEBUG_MISC, "%s: endian probe returned 0x%04x\n", CARDNAME, val); - if (val != 0x87654321) { - printk(KERN_ERR "Invalid chip endian 0x08%x\n",val); - retval = -ENODEV; - goto err_out; - } - - /* - * check if the revision register is something that I - * recognize. These might need to be added to later, - * as future revisions could be added. - */ - chip_id = SMC_GET_PN(); - DBG(SMC_DEBUG_MISC, "%s: id probe returned 0x%04x\n", CARDNAME, chip_id); - for(i=0;chip_ids[i].id != 0; i++) { - if (chip_ids[i].id == chip_id) break; - } - if (!chip_ids[i].id) { - printk(KERN_ERR "Unknown chip ID %04x\n", chip_id); - retval = -ENODEV; - goto err_out; - } - version_string = chip_ids[i].name; - - revision = SMC_GET_REV(); - DBG(SMC_DEBUG_MISC, "%s: revision = 0x%04x\n", CARDNAME, revision); - - /* At this point I'll assume that the chip is an SMC911x. */ - DBG(SMC_DEBUG_MISC, "%s: Found a %s\n", CARDNAME, chip_ids[i].name); - - /* Validate the TX FIFO size requested */ - if ((tx_fifo_kb < 2) || (tx_fifo_kb > 14)) { - printk(KERN_ERR "Invalid TX FIFO size requested %d\n", tx_fifo_kb); - retval = -EINVAL; - goto err_out; - } - - /* fill in some of the fields */ - dev->base_addr = ioaddr; - lp->version = chip_ids[i].id; - lp->revision = revision; - lp->tx_fifo_kb = tx_fifo_kb; - /* Reverse calculate the RX FIFO size from the TX */ - lp->tx_fifo_size=(lp->tx_fifo_kb<<10) - 512; - lp->rx_fifo_size= ((0x4000 - 512 - lp->tx_fifo_size) / 16) * 15; - - /* Set the automatic flow control values */ - switch(lp->tx_fifo_kb) { - /* - * AFC_HI is about ((Rx Data Fifo Size)*2/3)/64 - * AFC_LO is AFC_HI/2 - * BACK_DUR is about 5uS*(AFC_LO) rounded down - */ - case 2:/* 13440 Rx Data Fifo Size */ - lp->afc_cfg=0x008C46AF;break; - case 3:/* 12480 Rx Data Fifo Size */ - lp->afc_cfg=0x0082419F;break; - case 4:/* 11520 Rx Data Fifo Size */ - lp->afc_cfg=0x00783C9F;break; - case 5:/* 10560 Rx Data Fifo Size */ - lp->afc_cfg=0x006E374F;break; - case 6:/* 9600 Rx Data Fifo Size */ - lp->afc_cfg=0x0064328F;break; - case 7:/* 8640 Rx Data Fifo Size */ - lp->afc_cfg=0x005A2D7F;break; - case 8:/* 7680 Rx Data Fifo Size */ - lp->afc_cfg=0x0050287F;break; - case 9:/* 6720 Rx Data Fifo Size */ - lp->afc_cfg=0x0046236F;break; - case 10:/* 5760 Rx Data Fifo Size */ - lp->afc_cfg=0x003C1E6F;break; - case 11:/* 4800 Rx Data Fifo Size */ - lp->afc_cfg=0x0032195F;break; - /* - * AFC_HI is ~1520 bytes less than RX Data Fifo Size - * AFC_LO is AFC_HI/2 - * BACK_DUR is about 5uS*(AFC_LO) rounded down - */ - case 12:/* 3840 Rx Data Fifo Size */ - lp->afc_cfg=0x0024124F;break; - case 13:/* 2880 Rx Data Fifo Size */ - lp->afc_cfg=0x0015073F;break; - case 14:/* 1920 Rx Data Fifo Size */ - lp->afc_cfg=0x0006032F;break; - default: - PRINTK("%s: ERROR -- no AFC_CFG setting found", - dev->name); - break; - } - - DBG(SMC_DEBUG_MISC | SMC_DEBUG_TX | SMC_DEBUG_RX, - "%s: tx_fifo %d rx_fifo %d afc_cfg 0x%08x\n", CARDNAME, - lp->tx_fifo_size, lp->rx_fifo_size, lp->afc_cfg); - - spin_lock_init(&lp->lock); - - /* Get the MAC address */ - SMC_GET_MAC_ADDR(dev->dev_addr); - - /* now, reset the chip, and put it into a known state */ - smc911x_reset(dev); - - /* - * If dev->irq is 0, then the device has to be banged on to see - * what the IRQ is. - * - * Specifying an IRQ is done with the assumption that the user knows - * what (s)he is doing. No checking is done!!!! - */ - if (dev->irq < 1) { - int trials; - - trials = 3; - while (trials--) { - dev->irq = smc911x_findirq(ioaddr); - if (dev->irq) - break; - /* kick the card and try again */ - smc911x_reset(dev); - } - } - if (dev->irq == 0) { - printk("%s: Couldn't autodetect your IRQ. Use irq=xx.\n", - dev->name); - retval = -ENODEV; - goto err_out; - } - dev->irq = irq_canonicalize(dev->irq); - - /* Fill in the fields of the device structure with ethernet values. */ - ether_setup(dev); - - dev->open = smc911x_open; - dev->stop = smc911x_close; - dev->hard_start_xmit = smc911x_hard_start_xmit; - dev->tx_timeout = smc911x_timeout; - dev->watchdog_timeo = msecs_to_jiffies(watchdog); - dev->get_stats = smc911x_query_statistics; - dev->set_multicast_list = smc911x_set_multicast_list; - dev->ethtool_ops = &smc911x_ethtool_ops; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = smc911x_poll_controller; -#endif - - INIT_WORK(&lp->phy_configure, smc911x_phy_configure, dev); - lp->mii.phy_id_mask = 0x1f; - lp->mii.reg_num_mask = 0x1f; - lp->mii.force_media = 0; - lp->mii.full_duplex = 0; - lp->mii.dev = dev; - lp->mii.mdio_read = smc911x_phy_read; - lp->mii.mdio_write = smc911x_phy_write; - - /* - * Locate the phy, if any. - */ - smc911x_phy_detect(dev); - - /* Set default parameters */ - lp->msg_enable = NETIF_MSG_LINK; - lp->ctl_rfduplx = 1; - lp->ctl_rspeed = 100; - - /* Grab the IRQ */ - retval = request_irq(dev->irq, &smc911x_interrupt, IRQF_SHARED, dev->name, dev); - if (retval) - goto err_out; - - set_irq_type(dev->irq, IRQT_FALLING); - -#ifdef SMC_USE_DMA - lp->rxdma = SMC_DMA_REQUEST(dev, smc911x_rx_dma_irq); - lp->txdma = SMC_DMA_REQUEST(dev, smc911x_tx_dma_irq); - lp->rxdma_active = 0; - lp->txdma_active = 0; - dev->dma = lp->rxdma; -#endif - - retval = register_netdev(dev); - if (retval == 0) { - /* now, print out the card info, in a short format.. */ - printk("%s: %s (rev %d) at %#lx IRQ %d", - dev->name, version_string, lp->revision, - dev->base_addr, dev->irq); - -#ifdef SMC_USE_DMA - if (lp->rxdma != -1) - printk(" RXDMA %d ", lp->rxdma); - - if (lp->txdma != -1) - printk("TXDMA %d", lp->txdma); -#endif - printk("\n"); - if (!is_valid_ether_addr(dev->dev_addr)) { - printk("%s: Invalid ethernet MAC address. Please " - "set using ifconfig\n", dev->name); - } else { - /* Print the Ethernet address */ - printk("%s: Ethernet addr: ", dev->name); - for (i = 0; i < 5; i++) - printk("%2.2x:", dev->dev_addr[i]); - printk("%2.2x\n", dev->dev_addr[5]); - } - - if (lp->phy_type == 0) { - PRINTK("%s: No PHY found\n", dev->name); - } else if ((lp->phy_type & ~0xff) == LAN911X_INTERNAL_PHY_ID) { - PRINTK("%s: LAN911x Internal PHY\n", dev->name); - } else { - PRINTK("%s: External PHY 0x%08x\n", dev->name, lp->phy_type); - } - } - -err_out: -#ifdef SMC_USE_DMA - if (retval) { - if (lp->rxdma != -1) { - SMC_DMA_FREE(dev, lp->rxdma); - } - if (lp->txdma != -1) { - SMC_DMA_FREE(dev, lp->txdma); - } - } -#endif - return retval; -} - -/* - * smc911x_init(void) - * - * Output: - * 0 --> there is a device - * anything else, error - */ -static int smc911x_drv_probe(struct platform_device *pdev) -{ - struct net_device *ndev; - struct resource *res; - unsigned int *addr; - int ret; - - DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - ret = -ENODEV; - goto out; - } - - /* - * Request the regions. - */ - if (!request_mem_region(res->start, SMC911X_IO_EXTENT, CARDNAME)) { - ret = -EBUSY; - goto out; - } - - ndev = alloc_etherdev(sizeof(struct smc911x_local)); - if (!ndev) { - printk("%s: could not allocate device.\n", CARDNAME); - ret = -ENOMEM; - goto release_1; - } - SET_MODULE_OWNER(ndev); - SET_NETDEV_DEV(ndev, &pdev->dev); - - ndev->dma = (unsigned char)-1; - ndev->irq = platform_get_irq(pdev, 0); - - addr = ioremap(res->start, SMC911X_IO_EXTENT); - if (!addr) { - ret = -ENOMEM; - goto release_both; - } - - platform_set_drvdata(pdev, ndev); - ret = smc911x_probe(ndev, (unsigned long)addr); - if (ret != 0) { - platform_set_drvdata(pdev, NULL); - iounmap(addr); -release_both: - free_netdev(ndev); -release_1: - release_mem_region(res->start, SMC911X_IO_EXTENT); -out: - printk("%s: not found (%d).\n", CARDNAME, ret); - } -#ifdef SMC_USE_DMA - else { - struct smc911x_local *lp = netdev_priv(ndev); - lp->physaddr = res->start; - lp->dev = &pdev->dev; - } -#endif - - return ret; -} - -static int smc911x_drv_remove(struct platform_device *pdev) -{ - struct net_device *ndev = platform_get_drvdata(pdev); - struct resource *res; - - DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); - platform_set_drvdata(pdev, NULL); - - unregister_netdev(ndev); - - free_irq(ndev->irq, ndev); - -#ifdef SMC_USE_DMA - { - struct smc911x_local *lp = netdev_priv(ndev); - if (lp->rxdma != -1) { - SMC_DMA_FREE(dev, lp->rxdma); - } - if (lp->txdma != -1) { - SMC_DMA_FREE(dev, lp->txdma); - } - } -#endif - iounmap((void *)ndev->base_addr); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - release_mem_region(res->start, SMC911X_IO_EXTENT); - - free_netdev(ndev); - return 0; -} - -static int smc911x_drv_suspend(struct platform_device *dev, pm_message_t state) -{ - struct net_device *ndev = platform_get_drvdata(dev); - unsigned long ioaddr = ndev->base_addr; - - DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); - if (ndev) { - if (netif_running(ndev)) { - netif_device_detach(ndev); - smc911x_shutdown(ndev); -#if POWER_DOWN - /* Set D2 - Energy detect only setting */ - SMC_SET_PMT_CTRL(2<<12); -#endif - } - } - return 0; -} - -static int smc911x_drv_resume(struct platform_device *dev) -{ - struct net_device *ndev = platform_get_drvdata(dev); - - DBG(SMC_DEBUG_FUNC, "--> %s\n", __FUNCTION__); - if (ndev) { - struct smc911x_local *lp = netdev_priv(ndev); - - if (netif_running(ndev)) { - smc911x_reset(ndev); - smc911x_enable(ndev); - if (lp->phy_type != 0) - smc911x_phy_configure(ndev); - netif_device_attach(ndev); - } - } - return 0; -} - -static struct platform_driver smc911x_driver = { - .probe = smc911x_drv_probe, - .remove = smc911x_drv_remove, - .suspend = smc911x_drv_suspend, - .resume = smc911x_drv_resume, - .driver = { - .name = CARDNAME, - }, -}; - -static int __init smc911x_init(void) -{ - return platform_driver_register(&smc911x_driver); -} - -static void __exit smc911x_cleanup(void) -{ - platform_driver_unregister(&smc911x_driver); -} - -module_init(smc911x_init); -module_exit(smc911x_cleanup); diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h deleted file mode 100644 index 962a71045..000000000 --- a/drivers/net/smc911x.h +++ /dev/null @@ -1,835 +0,0 @@ -/*------------------------------------------------------------------------ - . smc911x.h - macros for SMSC's LAN911{5,6,7,8} single-chip Ethernet device. - . - . Copyright (C) 2005 Sensoria Corp. - . Derived from the unified SMC91x driver by Nicolas Pitre - . - . 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 - . - . Information contained in this file was obtained from the LAN9118 - . manual from SMC. To get a copy, if you really want one, you can find - . information under www.smsc.com. - . - . Authors - . Dustin McIntire - . - ---------------------------------------------------------------------------*/ -#ifndef _SMC911X_H_ -#define _SMC911X_H_ - -/* - * Use the DMA feature on PXA chips - */ -#ifdef CONFIG_ARCH_PXA - #define SMC_USE_PXA_DMA 1 - #define SMC_USE_16BIT 0 - #define SMC_USE_32BIT 1 -#endif - - -/* - * Define the bus width specific IO macros - */ - -#if SMC_USE_16BIT -#define SMC_inb(a, r) readb((a) + (r)) -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_inl(a, r) ((SMC_inw(a, r) & 0xFFFF)+(SMC_inw(a+2, r)<<16)) -#define SMC_outb(v, a, r) writeb(v, (a) + (r)) -#define SMC_outw(v, a, r) writew(v, (a) + (r)) -#define SMC_outl(v, a, r) \ - do{ \ - writel(v & 0xFFFF, (a) + (r)); \ - writel(v >> 16, (a) + (r) + 2); \ - } while (0) -#define SMC_insl(a, r, p, l) readsw((short*)((a) + (r)), p, l*2) -#define SMC_outsl(a, r, p, l) writesw((short*)((a) + (r)), p, l*2) - -#elif SMC_USE_32BIT -#define SMC_inb(a, r) readb((a) + (r)) -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_inl(a, r) readl((a) + (r)) -#define SMC_outb(v, a, r) writeb(v, (a) + (r)) -#define SMC_outl(v, a, r) writel(v, (a) + (r)) -#define SMC_insl(a, r, p, l) readsl((int*)((a) + (r)), p, l) -#define SMC_outsl(a, r, p, l) writesl((int*)((a) + (r)), p, l) - -#endif /* SMC_USE_16BIT */ - - - -#if SMC_USE_PXA_DMA -#define SMC_USE_DMA - -/* - * Define the request and free functions - * These are unfortunately architecture specific as no generic allocation - * mechanism exits - */ -#define SMC_DMA_REQUEST(dev, handler) \ - pxa_request_dma(dev->name, DMA_PRIO_LOW, handler, dev) - -#define SMC_DMA_FREE(dev, dma) \ - pxa_free_dma(dma) - -#define SMC_DMA_ACK_IRQ(dev, dma) \ -{ \ - if (DCSR(dma) & DCSR_BUSERR) { \ - printk("%s: DMA %d bus error!\n", dev->name, dma); \ - } \ - DCSR(dma) = DCSR_STARTINTR|DCSR_ENDINTR|DCSR_BUSERR; \ -} - -/* - * Use a DMA for RX and TX packets. - */ -#include -#include -#include - -static dma_addr_t rx_dmabuf, tx_dmabuf; -static int rx_dmalen, tx_dmalen; - -#ifdef SMC_insl -#undef SMC_insl -#define SMC_insl(a, r, p, l) \ - smc_pxa_dma_insl(lp->dev, a, lp->physaddr, r, lp->rxdma, p, l) - -static inline void -smc_pxa_dma_insl(struct device *dev, u_long ioaddr, u_long physaddr, - int reg, int dma, u_char *buf, int len) -{ - /* 64 bit alignment is required for memory to memory DMA */ - if ((long)buf & 4) { - *((u32 *)buf) = SMC_inl(ioaddr, reg); - buf += 4; - len--; - } - - len *= 4; - rx_dmabuf = dma_map_single(dev, buf, len, DMA_FROM_DEVICE); - rx_dmalen = len; - DCSR(dma) = DCSR_NODESC; - DTADR(dma) = rx_dmabuf; - DSADR(dma) = physaddr + reg; - DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 | - DCMD_WIDTH4 | DCMD_ENDIRQEN | (DCMD_LENGTH & rx_dmalen)); - DCSR(dma) = DCSR_NODESC | DCSR_RUN; -} -#endif - -#ifdef SMC_insw -#undef SMC_insw -#define SMC_insw(a, r, p, l) \ - smc_pxa_dma_insw(lp->dev, a, lp->physaddr, r, lp->rxdma, p, l) - -static inline void -smc_pxa_dma_insw(struct device *dev, u_long ioaddr, u_long physaddr, - int reg, int dma, u_char *buf, int len) -{ - /* 64 bit alignment is required for memory to memory DMA */ - while ((long)buf & 6) { - *((u16 *)buf) = SMC_inw(ioaddr, reg); - buf += 2; - len--; - } - - len *= 2; - rx_dmabuf = dma_map_single(dev, buf, len, DMA_FROM_DEVICE); - rx_dmalen = len; - DCSR(dma) = DCSR_NODESC; - DTADR(dma) = rx_dmabuf; - DSADR(dma) = physaddr + reg; - DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 | - DCMD_WIDTH2 | DCMD_ENDIRQEN | (DCMD_LENGTH & rx_dmalen)); - DCSR(dma) = DCSR_NODESC | DCSR_RUN; -} -#endif - -#ifdef SMC_outsl -#undef SMC_outsl -#define SMC_outsl(a, r, p, l) \ - smc_pxa_dma_outsl(lp->dev, a, lp->physaddr, r, lp->txdma, p, l) - -static inline void -smc_pxa_dma_outsl(struct device *dev, u_long ioaddr, u_long physaddr, - int reg, int dma, u_char *buf, int len) -{ - /* 64 bit alignment is required for memory to memory DMA */ - if ((long)buf & 4) { - SMC_outl(*((u32 *)buf), ioaddr, reg); - buf += 4; - len--; - } - - len *= 4; - tx_dmabuf = dma_map_single(dev, buf, len, DMA_TO_DEVICE); - tx_dmalen = len; - DCSR(dma) = DCSR_NODESC; - DSADR(dma) = tx_dmabuf; - DTADR(dma) = physaddr + reg; - DCMD(dma) = (DCMD_INCSRCADDR | DCMD_BURST32 | - DCMD_WIDTH4 | DCMD_ENDIRQEN | (DCMD_LENGTH & tx_dmalen)); - DCSR(dma) = DCSR_NODESC | DCSR_RUN; -} -#endif - -#ifdef SMC_outsw -#undef SMC_outsw -#define SMC_outsw(a, r, p, l) \ - smc_pxa_dma_outsw(lp->dev, a, lp->physaddr, r, lp->txdma, p, l) - -static inline void -smc_pxa_dma_outsw(struct device *dev, u_long ioaddr, u_long physaddr, - int reg, int dma, u_char *buf, int len) -{ - /* 64 bit alignment is required for memory to memory DMA */ - while ((long)buf & 6) { - SMC_outw(*((u16 *)buf), ioaddr, reg); - buf += 2; - len--; - } - - len *= 2; - tx_dmabuf = dma_map_single(dev, buf, len, DMA_TO_DEVICE); - tx_dmalen = len; - DCSR(dma) = DCSR_NODESC; - DSADR(dma) = tx_dmabuf; - DTADR(dma) = physaddr + reg; - DCMD(dma) = (DCMD_INCSRCADDR | DCMD_BURST32 | - DCMD_WIDTH2 | DCMD_ENDIRQEN | (DCMD_LENGTH & tx_dmalen)); - DCSR(dma) = DCSR_NODESC | DCSR_RUN; -} -#endif - -#endif /* SMC_USE_PXA_DMA */ - - -/* Chip Parameters and Register Definitions */ - -#define SMC911X_TX_FIFO_LOW_THRESHOLD (1536*2) - -#define SMC911X_IO_EXTENT 0x100 - -#define SMC911X_EEPROM_LEN 7 - -/* Below are the register offsets and bit definitions - * of the Lan911x memory space - */ -#define RX_DATA_FIFO (0x00) - -#define TX_DATA_FIFO (0x20) -#define TX_CMD_A_INT_ON_COMP_ (0x80000000) -#define TX_CMD_A_INT_BUF_END_ALGN_ (0x03000000) -#define TX_CMD_A_INT_4_BYTE_ALGN_ (0x00000000) -#define TX_CMD_A_INT_16_BYTE_ALGN_ (0x01000000) -#define TX_CMD_A_INT_32_BYTE_ALGN_ (0x02000000) -#define TX_CMD_A_INT_DATA_OFFSET_ (0x001F0000) -#define TX_CMD_A_INT_FIRST_SEG_ (0x00002000) -#define TX_CMD_A_INT_LAST_SEG_ (0x00001000) -#define TX_CMD_A_BUF_SIZE_ (0x000007FF) -#define TX_CMD_B_PKT_TAG_ (0xFFFF0000) -#define TX_CMD_B_ADD_CRC_DISABLE_ (0x00002000) -#define TX_CMD_B_DISABLE_PADDING_ (0x00001000) -#define TX_CMD_B_PKT_BYTE_LENGTH_ (0x000007FF) - -#define RX_STATUS_FIFO (0x40) -#define RX_STS_PKT_LEN_ (0x3FFF0000) -#define RX_STS_ES_ (0x00008000) -#define RX_STS_BCST_ (0x00002000) -#define RX_STS_LEN_ERR_ (0x00001000) -#define RX_STS_RUNT_ERR_ (0x00000800) -#define RX_STS_MCAST_ (0x00000400) -#define RX_STS_TOO_LONG_ (0x00000080) -#define RX_STS_COLL_ (0x00000040) -#define RX_STS_ETH_TYPE_ (0x00000020) -#define RX_STS_WDOG_TMT_ (0x00000010) -#define RX_STS_MII_ERR_ (0x00000008) -#define RX_STS_DRIBBLING_ (0x00000004) -#define RX_STS_CRC_ERR_ (0x00000002) -#define RX_STATUS_FIFO_PEEK (0x44) -#define TX_STATUS_FIFO (0x48) -#define TX_STS_TAG_ (0xFFFF0000) -#define TX_STS_ES_ (0x00008000) -#define TX_STS_LOC_ (0x00000800) -#define TX_STS_NO_CARR_ (0x00000400) -#define TX_STS_LATE_COLL_ (0x00000200) -#define TX_STS_MANY_COLL_ (0x00000100) -#define TX_STS_COLL_CNT_ (0x00000078) -#define TX_STS_MANY_DEFER_ (0x00000004) -#define TX_STS_UNDERRUN_ (0x00000002) -#define TX_STS_DEFERRED_ (0x00000001) -#define TX_STATUS_FIFO_PEEK (0x4C) -#define ID_REV (0x50) -#define ID_REV_CHIP_ID_ (0xFFFF0000) /* RO */ -#define ID_REV_REV_ID_ (0x0000FFFF) /* RO */ - -#define INT_CFG (0x54) -#define INT_CFG_INT_DEAS_ (0xFF000000) /* R/W */ -#define INT_CFG_INT_DEAS_CLR_ (0x00004000) -#define INT_CFG_INT_DEAS_STS_ (0x00002000) -#define INT_CFG_IRQ_INT_ (0x00001000) /* RO */ -#define INT_CFG_IRQ_EN_ (0x00000100) /* R/W */ -#define INT_CFG_IRQ_POL_ (0x00000010) /* R/W Not Affected by SW Reset */ -#define INT_CFG_IRQ_TYPE_ (0x00000001) /* R/W Not Affected by SW Reset */ - -#define INT_STS (0x58) -#define INT_STS_SW_INT_ (0x80000000) /* R/WC */ -#define INT_STS_TXSTOP_INT_ (0x02000000) /* R/WC */ -#define INT_STS_RXSTOP_INT_ (0x01000000) /* R/WC */ -#define INT_STS_RXDFH_INT_ (0x00800000) /* R/WC */ -#define INT_STS_RXDF_INT_ (0x00400000) /* R/WC */ -#define INT_STS_TX_IOC_ (0x00200000) /* R/WC */ -#define INT_STS_RXD_INT_ (0x00100000) /* R/WC */ -#define INT_STS_GPT_INT_ (0x00080000) /* R/WC */ -#define INT_STS_PHY_INT_ (0x00040000) /* RO */ -#define INT_STS_PME_INT_ (0x00020000) /* R/WC */ -#define INT_STS_TXSO_ (0x00010000) /* R/WC */ -#define INT_STS_RWT_ (0x00008000) /* R/WC */ -#define INT_STS_RXE_ (0x00004000) /* R/WC */ -#define INT_STS_TXE_ (0x00002000) /* R/WC */ -//#define INT_STS_ERX_ (0x00001000) /* R/WC */ -#define INT_STS_TDFU_ (0x00000800) /* R/WC */ -#define INT_STS_TDFO_ (0x00000400) /* R/WC */ -#define INT_STS_TDFA_ (0x00000200) /* R/WC */ -#define INT_STS_TSFF_ (0x00000100) /* R/WC */ -#define INT_STS_TSFL_ (0x00000080) /* R/WC */ -//#define INT_STS_RXDF_ (0x00000040) /* R/WC */ -#define INT_STS_RDFO_ (0x00000040) /* R/WC */ -#define INT_STS_RDFL_ (0x00000020) /* R/WC */ -#define INT_STS_RSFF_ (0x00000010) /* R/WC */ -#define INT_STS_RSFL_ (0x00000008) /* R/WC */ -#define INT_STS_GPIO2_INT_ (0x00000004) /* R/WC */ -#define INT_STS_GPIO1_INT_ (0x00000002) /* R/WC */ -#define INT_STS_GPIO0_INT_ (0x00000001) /* R/WC */ - -#define INT_EN (0x5C) -#define INT_EN_SW_INT_EN_ (0x80000000) /* R/W */ -#define INT_EN_TXSTOP_INT_EN_ (0x02000000) /* R/W */ -#define INT_EN_RXSTOP_INT_EN_ (0x01000000) /* R/W */ -#define INT_EN_RXDFH_INT_EN_ (0x00800000) /* R/W */ -//#define INT_EN_RXDF_INT_EN_ (0x00400000) /* R/W */ -#define INT_EN_TIOC_INT_EN_ (0x00200000) /* R/W */ -#define INT_EN_RXD_INT_EN_ (0x00100000) /* R/W */ -#define INT_EN_GPT_INT_EN_ (0x00080000) /* R/W */ -#define INT_EN_PHY_INT_EN_ (0x00040000) /* R/W */ -#define INT_EN_PME_INT_EN_ (0x00020000) /* R/W */ -#define INT_EN_TXSO_EN_ (0x00010000) /* R/W */ -#define INT_EN_RWT_EN_ (0x00008000) /* R/W */ -#define INT_EN_RXE_EN_ (0x00004000) /* R/W */ -#define INT_EN_TXE_EN_ (0x00002000) /* R/W */ -//#define INT_EN_ERX_EN_ (0x00001000) /* R/W */ -#define INT_EN_TDFU_EN_ (0x00000800) /* R/W */ -#define INT_EN_TDFO_EN_ (0x00000400) /* R/W */ -#define INT_EN_TDFA_EN_ (0x00000200) /* R/W */ -#define INT_EN_TSFF_EN_ (0x00000100) /* R/W */ -#define INT_EN_TSFL_EN_ (0x00000080) /* R/W */ -//#define INT_EN_RXDF_EN_ (0x00000040) /* R/W */ -#define INT_EN_RDFO_EN_ (0x00000040) /* R/W */ -#define INT_EN_RDFL_EN_ (0x00000020) /* R/W */ -#define INT_EN_RSFF_EN_ (0x00000010) /* R/W */ -#define INT_EN_RSFL_EN_ (0x00000008) /* R/W */ -#define INT_EN_GPIO2_INT_ (0x00000004) /* R/W */ -#define INT_EN_GPIO1_INT_ (0x00000002) /* R/W */ -#define INT_EN_GPIO0_INT_ (0x00000001) /* R/W */ - -#define BYTE_TEST (0x64) -#define FIFO_INT (0x68) -#define FIFO_INT_TX_AVAIL_LEVEL_ (0xFF000000) /* R/W */ -#define FIFO_INT_TX_STS_LEVEL_ (0x00FF0000) /* R/W */ -#define FIFO_INT_RX_AVAIL_LEVEL_ (0x0000FF00) /* R/W */ -#define FIFO_INT_RX_STS_LEVEL_ (0x000000FF) /* R/W */ - -#define RX_CFG (0x6C) -#define RX_CFG_RX_END_ALGN_ (0xC0000000) /* R/W */ -#define RX_CFG_RX_END_ALGN4_ (0x00000000) /* R/W */ -#define RX_CFG_RX_END_ALGN16_ (0x40000000) /* R/W */ -#define RX_CFG_RX_END_ALGN32_ (0x80000000) /* R/W */ -#define RX_CFG_RX_DMA_CNT_ (0x0FFF0000) /* R/W */ -#define RX_CFG_RX_DUMP_ (0x00008000) /* R/W */ -#define RX_CFG_RXDOFF_ (0x00001F00) /* R/W */ -//#define RX_CFG_RXBAD_ (0x00000001) /* R/W */ - -#define TX_CFG (0x70) -//#define TX_CFG_TX_DMA_LVL_ (0xE0000000) /* R/W */ -//#define TX_CFG_TX_DMA_CNT_ (0x0FFF0000) /* R/W Self Clearing */ -#define TX_CFG_TXS_DUMP_ (0x00008000) /* Self Clearing */ -#define TX_CFG_TXD_DUMP_ (0x00004000) /* Self Clearing */ -#define TX_CFG_TXSAO_ (0x00000004) /* R/W */ -#define TX_CFG_TX_ON_ (0x00000002) /* R/W */ -#define TX_CFG_STOP_TX_ (0x00000001) /* Self Clearing */ - -#define HW_CFG (0x74) -#define HW_CFG_TTM_ (0x00200000) /* R/W */ -#define HW_CFG_SF_ (0x00100000) /* R/W */ -#define HW_CFG_TX_FIF_SZ_ (0x000F0000) /* R/W */ -#define HW_CFG_TR_ (0x00003000) /* R/W */ -#define HW_CFG_PHY_CLK_SEL_ (0x00000060) /* R/W */ -#define HW_CFG_PHY_CLK_SEL_INT_PHY_ (0x00000000) /* R/W */ -#define HW_CFG_PHY_CLK_SEL_EXT_PHY_ (0x00000020) /* R/W */ -#define HW_CFG_PHY_CLK_SEL_CLK_DIS_ (0x00000040) /* R/W */ -#define HW_CFG_SMI_SEL_ (0x00000010) /* R/W */ -#define HW_CFG_EXT_PHY_DET_ (0x00000008) /* RO */ -#define HW_CFG_EXT_PHY_EN_ (0x00000004) /* R/W */ -#define HW_CFG_32_16_BIT_MODE_ (0x00000004) /* RO */ -#define HW_CFG_SRST_TO_ (0x00000002) /* RO */ -#define HW_CFG_SRST_ (0x00000001) /* Self Clearing */ - -#define RX_DP_CTRL (0x78) -#define RX_DP_CTRL_RX_FFWD_ (0x80000000) /* R/W */ -#define RX_DP_CTRL_FFWD_BUSY_ (0x80000000) /* RO */ - -#define RX_FIFO_INF (0x7C) -#define RX_FIFO_INF_RXSUSED_ (0x00FF0000) /* RO */ -#define RX_FIFO_INF_RXDUSED_ (0x0000FFFF) /* RO */ - -#define TX_FIFO_INF (0x80) -#define TX_FIFO_INF_TSUSED_ (0x00FF0000) /* RO */ -#define TX_FIFO_INF_TDFREE_ (0x0000FFFF) /* RO */ - -#define PMT_CTRL (0x84) -#define PMT_CTRL_PM_MODE_ (0x00003000) /* Self Clearing */ -#define PMT_CTRL_PHY_RST_ (0x00000400) /* Self Clearing */ -#define PMT_CTRL_WOL_EN_ (0x00000200) /* R/W */ -#define PMT_CTRL_ED_EN_ (0x00000100) /* R/W */ -#define PMT_CTRL_PME_TYPE_ (0x00000040) /* R/W Not Affected by SW Reset */ -#define PMT_CTRL_WUPS_ (0x00000030) /* R/WC */ -#define PMT_CTRL_WUPS_NOWAKE_ (0x00000000) /* R/WC */ -#define PMT_CTRL_WUPS_ED_ (0x00000010) /* R/WC */ -#define PMT_CTRL_WUPS_WOL_ (0x00000020) /* R/WC */ -#define PMT_CTRL_WUPS_MULTI_ (0x00000030) /* R/WC */ -#define PMT_CTRL_PME_IND_ (0x00000008) /* R/W */ -#define PMT_CTRL_PME_POL_ (0x00000004) /* R/W */ -#define PMT_CTRL_PME_EN_ (0x00000002) /* R/W Not Affected by SW Reset */ -#define PMT_CTRL_READY_ (0x00000001) /* RO */ - -#define GPIO_CFG (0x88) -#define GPIO_CFG_LED3_EN_ (0x40000000) /* R/W */ -#define GPIO_CFG_LED2_EN_ (0x20000000) /* R/W */ -#define GPIO_CFG_LED1_EN_ (0x10000000) /* R/W */ -#define GPIO_CFG_GPIO2_INT_POL_ (0x04000000) /* R/W */ -#define GPIO_CFG_GPIO1_INT_POL_ (0x02000000) /* R/W */ -#define GPIO_CFG_GPIO0_INT_POL_ (0x01000000) /* R/W */ -#define GPIO_CFG_EEPR_EN_ (0x00700000) /* R/W */ -#define GPIO_CFG_GPIOBUF2_ (0x00040000) /* R/W */ -#define GPIO_CFG_GPIOBUF1_ (0x00020000) /* R/W */ -#define GPIO_CFG_GPIOBUF0_ (0x00010000) /* R/W */ -#define GPIO_CFG_GPIODIR2_ (0x00000400) /* R/W */ -#define GPIO_CFG_GPIODIR1_ (0x00000200) /* R/W */ -#define GPIO_CFG_GPIODIR0_ (0x00000100) /* R/W */ -#define GPIO_CFG_GPIOD4_ (0x00000010) /* R/W */ -#define GPIO_CFG_GPIOD3_ (0x00000008) /* R/W */ -#define GPIO_CFG_GPIOD2_ (0x00000004) /* R/W */ -#define GPIO_CFG_GPIOD1_ (0x00000002) /* R/W */ -#define GPIO_CFG_GPIOD0_ (0x00000001) /* R/W */ - -#define GPT_CFG (0x8C) -#define GPT_CFG_TIMER_EN_ (0x20000000) /* R/W */ -#define GPT_CFG_GPT_LOAD_ (0x0000FFFF) /* R/W */ - -#define GPT_CNT (0x90) -#define GPT_CNT_GPT_CNT_ (0x0000FFFF) /* RO */ - -#define ENDIAN (0x98) -#define FREE_RUN (0x9C) -#define RX_DROP (0xA0) -#define MAC_CSR_CMD (0xA4) -#define MAC_CSR_CMD_CSR_BUSY_ (0x80000000) /* Self Clearing */ -#define MAC_CSR_CMD_R_NOT_W_ (0x40000000) /* R/W */ -#define MAC_CSR_CMD_CSR_ADDR_ (0x000000FF) /* R/W */ - -#define MAC_CSR_DATA (0xA8) -#define AFC_CFG (0xAC) -#define AFC_CFG_AFC_HI_ (0x00FF0000) /* R/W */ -#define AFC_CFG_AFC_LO_ (0x0000FF00) /* R/W */ -#define AFC_CFG_BACK_DUR_ (0x000000F0) /* R/W */ -#define AFC_CFG_FCMULT_ (0x00000008) /* R/W */ -#define AFC_CFG_FCBRD_ (0x00000004) /* R/W */ -#define AFC_CFG_FCADD_ (0x00000002) /* R/W */ -#define AFC_CFG_FCANY_ (0x00000001) /* R/W */ - -#define E2P_CMD (0xB0) -#define E2P_CMD_EPC_BUSY_ (0x80000000) /* Self Clearing */ -#define E2P_CMD_EPC_CMD_ (0x70000000) /* R/W */ -#define E2P_CMD_EPC_CMD_READ_ (0x00000000) /* R/W */ -#define E2P_CMD_EPC_CMD_EWDS_ (0x10000000) /* R/W */ -#define E2P_CMD_EPC_CMD_EWEN_ (0x20000000) /* R/W */ -#define E2P_CMD_EPC_CMD_WRITE_ (0x30000000) /* R/W */ -#define E2P_CMD_EPC_CMD_WRAL_ (0x40000000) /* R/W */ -#define E2P_CMD_EPC_CMD_ERASE_ (0x50000000) /* R/W */ -#define E2P_CMD_EPC_CMD_ERAL_ (0x60000000) /* R/W */ -#define E2P_CMD_EPC_CMD_RELOAD_ (0x70000000) /* R/W */ -#define E2P_CMD_EPC_TIMEOUT_ (0x00000200) /* RO */ -#define E2P_CMD_MAC_ADDR_LOADED_ (0x00000100) /* RO */ -#define E2P_CMD_EPC_ADDR_ (0x000000FF) /* R/W */ - -#define E2P_DATA (0xB4) -#define E2P_DATA_EEPROM_DATA_ (0x000000FF) /* R/W */ -/* end of LAN register offsets and bit definitions */ - -/* - **************************************************************************** - **************************************************************************** - * MAC Control and Status Register (Indirect Address) - * Offset (through the MAC_CSR CMD and DATA port) - **************************************************************************** - **************************************************************************** - * - */ -#define MAC_CR (0x01) /* R/W */ - -/* MAC_CR - MAC Control Register */ -#define MAC_CR_RXALL_ (0x80000000) -// TODO: delete this bit? It is not described in the data sheet. -#define MAC_CR_HBDIS_ (0x10000000) -#define MAC_CR_RCVOWN_ (0x00800000) -#define MAC_CR_LOOPBK_ (0x00200000) -#define MAC_CR_FDPX_ (0x00100000) -#define MAC_CR_MCPAS_ (0x00080000) -#define MAC_CR_PRMS_ (0x00040000) -#define MAC_CR_INVFILT_ (0x00020000) -#define MAC_CR_PASSBAD_ (0x00010000) -#define MAC_CR_HFILT_ (0x00008000) -#define MAC_CR_HPFILT_ (0x00002000) -#define MAC_CR_LCOLL_ (0x00001000) -#define MAC_CR_BCAST_ (0x00000800) -#define MAC_CR_DISRTY_ (0x00000400) -#define MAC_CR_PADSTR_ (0x00000100) -#define MAC_CR_BOLMT_MASK_ (0x000000C0) -#define MAC_CR_DFCHK_ (0x00000020) -#define MAC_CR_TXEN_ (0x00000008) -#define MAC_CR_RXEN_ (0x00000004) - -#define ADDRH (0x02) /* R/W mask 0x0000FFFFUL */ -#define ADDRL (0x03) /* R/W mask 0xFFFFFFFFUL */ -#define HASHH (0x04) /* R/W */ -#define HASHL (0x05) /* R/W */ - -#define MII_ACC (0x06) /* R/W */ -#define MII_ACC_PHY_ADDR_ (0x0000F800) -#define MII_ACC_MIIRINDA_ (0x000007C0) -#define MII_ACC_MII_WRITE_ (0x00000002) -#define MII_ACC_MII_BUSY_ (0x00000001) - -#define MII_DATA (0x07) /* R/W mask 0x0000FFFFUL */ - -#define FLOW (0x08) /* R/W */ -#define FLOW_FCPT_ (0xFFFF0000) -#define FLOW_FCPASS_ (0x00000004) -#define FLOW_FCEN_ (0x00000002) -#define FLOW_FCBSY_ (0x00000001) - -#define VLAN1 (0x09) /* R/W mask 0x0000FFFFUL */ -#define VLAN1_VTI1_ (0x0000ffff) - -#define VLAN2 (0x0A) /* R/W mask 0x0000FFFFUL */ -#define VLAN2_VTI2_ (0x0000ffff) - -#define WUFF (0x0B) /* WO */ - -#define WUCSR (0x0C) /* R/W */ -#define WUCSR_GUE_ (0x00000200) -#define WUCSR_WUFR_ (0x00000040) -#define WUCSR_MPR_ (0x00000020) -#define WUCSR_WAKE_EN_ (0x00000004) -#define WUCSR_MPEN_ (0x00000002) - -/* - **************************************************************************** - * Chip Specific MII Defines - **************************************************************************** - * - * Phy register offsets and bit definitions - * - */ - -#define PHY_MODE_CTRL_STS ((u32)17) /* Mode Control/Status Register */ -//#define MODE_CTRL_STS_FASTRIP_ ((u16)0x4000) -#define MODE_CTRL_STS_EDPWRDOWN_ ((u16)0x2000) -//#define MODE_CTRL_STS_LOWSQEN_ ((u16)0x0800) -//#define MODE_CTRL_STS_MDPREBP_ ((u16)0x0400) -//#define MODE_CTRL_STS_FARLOOPBACK_ ((u16)0x0200) -//#define MODE_CTRL_STS_FASTEST_ ((u16)0x0100) -//#define MODE_CTRL_STS_REFCLKEN_ ((u16)0x0010) -//#define MODE_CTRL_STS_PHYADBP_ ((u16)0x0008) -//#define MODE_CTRL_STS_FORCE_G_LINK_ ((u16)0x0004) -#define MODE_CTRL_STS_ENERGYON_ ((u16)0x0002) - -#define PHY_INT_SRC ((u32)29) -#define PHY_INT_SRC_ENERGY_ON_ ((u16)0x0080) -#define PHY_INT_SRC_ANEG_COMP_ ((u16)0x0040) -#define PHY_INT_SRC_REMOTE_FAULT_ ((u16)0x0020) -#define PHY_INT_SRC_LINK_DOWN_ ((u16)0x0010) -#define PHY_INT_SRC_ANEG_LP_ACK_ ((u16)0x0008) -#define PHY_INT_SRC_PAR_DET_FAULT_ ((u16)0x0004) -#define PHY_INT_SRC_ANEG_PGRX_ ((u16)0x0002) - -#define PHY_INT_MASK ((u32)30) -#define PHY_INT_MASK_ENERGY_ON_ ((u16)0x0080) -#define PHY_INT_MASK_ANEG_COMP_ ((u16)0x0040) -#define PHY_INT_MASK_REMOTE_FAULT_ ((u16)0x0020) -#define PHY_INT_MASK_LINK_DOWN_ ((u16)0x0010) -#define PHY_INT_MASK_ANEG_LP_ACK_ ((u16)0x0008) -#define PHY_INT_MASK_PAR_DET_FAULT_ ((u16)0x0004) -#define PHY_INT_MASK_ANEG_PGRX_ ((u16)0x0002) - -#define PHY_SPECIAL ((u32)31) -#define PHY_SPECIAL_ANEG_DONE_ ((u16)0x1000) -#define PHY_SPECIAL_RES_ ((u16)0x0040) -#define PHY_SPECIAL_RES_MASK_ ((u16)0x0FE1) -#define PHY_SPECIAL_SPD_ ((u16)0x001C) -#define PHY_SPECIAL_SPD_10HALF_ ((u16)0x0004) -#define PHY_SPECIAL_SPD_10FULL_ ((u16)0x0014) -#define PHY_SPECIAL_SPD_100HALF_ ((u16)0x0008) -#define PHY_SPECIAL_SPD_100FULL_ ((u16)0x0018) - -#define LAN911X_INTERNAL_PHY_ID (0x0007C000) - -/* Chip ID values */ -#define CHIP_9115 0x115 -#define CHIP_9116 0x116 -#define CHIP_9117 0x117 -#define CHIP_9118 0x118 - -struct chip_id { - u16 id; - char *name; -}; - -static const struct chip_id chip_ids[] = { - { CHIP_9115, "LAN9115" }, - { CHIP_9116, "LAN9116" }, - { CHIP_9117, "LAN9117" }, - { CHIP_9118, "LAN9118" }, - { 0, NULL }, -}; - -#define IS_REV_A(x) ((x & 0xFFFF)==0) - -/* - * Macros to abstract register access according to the data bus - * capabilities. Please use those and not the in/out primitives. - */ -/* FIFO read/write macros */ -#define SMC_PUSH_DATA(p, l) SMC_outsl( ioaddr, TX_DATA_FIFO, p, (l) >> 2 ) -#define SMC_PULL_DATA(p, l) SMC_insl ( ioaddr, RX_DATA_FIFO, p, (l) >> 2 ) -#define SMC_SET_TX_FIFO(x) SMC_outl( x, ioaddr, TX_DATA_FIFO ) -#define SMC_GET_RX_FIFO() SMC_inl( ioaddr, RX_DATA_FIFO ) - - -/* I/O mapped register read/write macros */ -#define SMC_GET_TX_STS_FIFO() SMC_inl( ioaddr, TX_STATUS_FIFO ) -#define SMC_GET_RX_STS_FIFO() SMC_inl( ioaddr, RX_STATUS_FIFO ) -#define SMC_GET_RX_STS_FIFO_PEEK() SMC_inl( ioaddr, RX_STATUS_FIFO_PEEK ) -#define SMC_GET_PN() (SMC_inl( ioaddr, ID_REV ) >> 16) -#define SMC_GET_REV() (SMC_inl( ioaddr, ID_REV ) & 0xFFFF) -#define SMC_GET_IRQ_CFG() SMC_inl( ioaddr, INT_CFG ) -#define SMC_SET_IRQ_CFG(x) SMC_outl( x, ioaddr, INT_CFG ) -#define SMC_GET_INT() SMC_inl( ioaddr, INT_STS ) -#define SMC_ACK_INT(x) SMC_outl( x, ioaddr, INT_STS ) -#define SMC_GET_INT_EN() SMC_inl( ioaddr, INT_EN ) -#define SMC_SET_INT_EN(x) SMC_outl( x, ioaddr, INT_EN ) -#define SMC_GET_BYTE_TEST() SMC_inl( ioaddr, BYTE_TEST ) -#define SMC_SET_BYTE_TEST(x) SMC_outl( x, ioaddr, BYTE_TEST ) -#define SMC_GET_FIFO_INT() SMC_inl( ioaddr, FIFO_INT ) -#define SMC_SET_FIFO_INT(x) SMC_outl( x, ioaddr, FIFO_INT ) -#define SMC_SET_FIFO_TDA(x) \ - do { \ - unsigned long __flags; \ - int __mask; \ - local_irq_save(__flags); \ - __mask = SMC_GET_FIFO_INT() & ~(0xFF<<24); \ - SMC_SET_FIFO_INT( __mask | (x)<<24 ); \ - local_irq_restore(__flags); \ - } while (0) -#define SMC_SET_FIFO_TSL(x) \ - do { \ - unsigned long __flags; \ - int __mask; \ - local_irq_save(__flags); \ - __mask = SMC_GET_FIFO_INT() & ~(0xFF<<16); \ - SMC_SET_FIFO_INT( __mask | (((x) & 0xFF)<<16)); \ - local_irq_restore(__flags); \ - } while (0) -#define SMC_SET_FIFO_RSA(x) \ - do { \ - unsigned long __flags; \ - int __mask; \ - local_irq_save(__flags); \ - __mask = SMC_GET_FIFO_INT() & ~(0xFF<<8); \ - SMC_SET_FIFO_INT( __mask | (((x) & 0xFF)<<8)); \ - local_irq_restore(__flags); \ - } while (0) -#define SMC_SET_FIFO_RSL(x) \ - do { \ - unsigned long __flags; \ - int __mask; \ - local_irq_save(__flags); \ - __mask = SMC_GET_FIFO_INT() & ~0xFF; \ - SMC_SET_FIFO_INT( __mask | ((x) & 0xFF)); \ - local_irq_restore(__flags); \ - } while (0) -#define SMC_GET_RX_CFG() SMC_inl( ioaddr, RX_CFG ) -#define SMC_SET_RX_CFG(x) SMC_outl( x, ioaddr, RX_CFG ) -#define SMC_GET_TX_CFG() SMC_inl( ioaddr, TX_CFG ) -#define SMC_SET_TX_CFG(x) SMC_outl( x, ioaddr, TX_CFG ) -#define SMC_GET_HW_CFG() SMC_inl( ioaddr, HW_CFG ) -#define SMC_SET_HW_CFG(x) SMC_outl( x, ioaddr, HW_CFG ) -#define SMC_GET_RX_DP_CTRL() SMC_inl( ioaddr, RX_DP_CTRL ) -#define SMC_SET_RX_DP_CTRL(x) SMC_outl( x, ioaddr, RX_DP_CTRL ) -#define SMC_GET_PMT_CTRL() SMC_inl( ioaddr, PMT_CTRL ) -#define SMC_SET_PMT_CTRL(x) SMC_outl( x, ioaddr, PMT_CTRL ) -#define SMC_GET_GPIO_CFG() SMC_inl( ioaddr, GPIO_CFG ) -#define SMC_SET_GPIO_CFG(x) SMC_outl( x, ioaddr, GPIO_CFG ) -#define SMC_GET_RX_FIFO_INF() SMC_inl( ioaddr, RX_FIFO_INF ) -#define SMC_SET_RX_FIFO_INF(x) SMC_outl( x, ioaddr, RX_FIFO_INF ) -#define SMC_GET_TX_FIFO_INF() SMC_inl( ioaddr, TX_FIFO_INF ) -#define SMC_SET_TX_FIFO_INF(x) SMC_outl( x, ioaddr, TX_FIFO_INF ) -#define SMC_GET_GPT_CFG() SMC_inl( ioaddr, GPT_CFG ) -#define SMC_SET_GPT_CFG(x) SMC_outl( x, ioaddr, GPT_CFG ) -#define SMC_GET_RX_DROP() SMC_inl( ioaddr, RX_DROP ) -#define SMC_SET_RX_DROP(x) SMC_outl( x, ioaddr, RX_DROP ) -#define SMC_GET_MAC_CMD() SMC_inl( ioaddr, MAC_CSR_CMD ) -#define SMC_SET_MAC_CMD(x) SMC_outl( x, ioaddr, MAC_CSR_CMD ) -#define SMC_GET_MAC_DATA() SMC_inl( ioaddr, MAC_CSR_DATA ) -#define SMC_SET_MAC_DATA(x) SMC_outl( x, ioaddr, MAC_CSR_DATA ) -#define SMC_GET_AFC_CFG() SMC_inl( ioaddr, AFC_CFG ) -#define SMC_SET_AFC_CFG(x) SMC_outl( x, ioaddr, AFC_CFG ) -#define SMC_GET_E2P_CMD() SMC_inl( ioaddr, E2P_CMD ) -#define SMC_SET_E2P_CMD(x) SMC_outl( x, ioaddr, E2P_CMD ) -#define SMC_GET_E2P_DATA() SMC_inl( ioaddr, E2P_DATA ) -#define SMC_SET_E2P_DATA(x) SMC_outl( x, ioaddr, E2P_DATA ) - -/* MAC register read/write macros */ -#define SMC_GET_MAC_CSR(a,v) \ - do { \ - while (SMC_GET_MAC_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - SMC_SET_MAC_CMD(MAC_CSR_CMD_CSR_BUSY_ | \ - MAC_CSR_CMD_R_NOT_W_ | (a) ); \ - while (SMC_GET_MAC_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - v = SMC_GET_MAC_DATA(); \ - } while (0) -#define SMC_SET_MAC_CSR(a,v) \ - do { \ - while (SMC_GET_MAC_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - SMC_SET_MAC_DATA(v); \ - SMC_SET_MAC_CMD(MAC_CSR_CMD_CSR_BUSY_ | (a) ); \ - while (SMC_GET_MAC_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - } while (0) -#define SMC_GET_MAC_CR(x) SMC_GET_MAC_CSR( MAC_CR, x ) -#define SMC_SET_MAC_CR(x) SMC_SET_MAC_CSR( MAC_CR, x ) -#define SMC_GET_ADDRH(x) SMC_GET_MAC_CSR( ADDRH, x ) -#define SMC_SET_ADDRH(x) SMC_SET_MAC_CSR( ADDRH, x ) -#define SMC_GET_ADDRL(x) SMC_GET_MAC_CSR( ADDRL, x ) -#define SMC_SET_ADDRL(x) SMC_SET_MAC_CSR( ADDRL, x ) -#define SMC_GET_HASHH(x) SMC_GET_MAC_CSR( HASHH, x ) -#define SMC_SET_HASHH(x) SMC_SET_MAC_CSR( HASHH, x ) -#define SMC_GET_HASHL(x) SMC_GET_MAC_CSR( HASHL, x ) -#define SMC_SET_HASHL(x) SMC_SET_MAC_CSR( HASHL, x ) -#define SMC_GET_MII_ACC(x) SMC_GET_MAC_CSR( MII_ACC, x ) -#define SMC_SET_MII_ACC(x) SMC_SET_MAC_CSR( MII_ACC, x ) -#define SMC_GET_MII_DATA(x) SMC_GET_MAC_CSR( MII_DATA, x ) -#define SMC_SET_MII_DATA(x) SMC_SET_MAC_CSR( MII_DATA, x ) -#define SMC_GET_FLOW(x) SMC_GET_MAC_CSR( FLOW, x ) -#define SMC_SET_FLOW(x) SMC_SET_MAC_CSR( FLOW, x ) -#define SMC_GET_VLAN1(x) SMC_GET_MAC_CSR( VLAN1, x ) -#define SMC_SET_VLAN1(x) SMC_SET_MAC_CSR( VLAN1, x ) -#define SMC_GET_VLAN2(x) SMC_GET_MAC_CSR( VLAN2, x ) -#define SMC_SET_VLAN2(x) SMC_SET_MAC_CSR( VLAN2, x ) -#define SMC_SET_WUFF(x) SMC_SET_MAC_CSR( WUFF, x ) -#define SMC_GET_WUCSR(x) SMC_GET_MAC_CSR( WUCSR, x ) -#define SMC_SET_WUCSR(x) SMC_SET_MAC_CSR( WUCSR, x ) - -/* PHY register read/write macros */ -#define SMC_GET_MII(a,phy,v) \ - do { \ - u32 __v; \ - do { \ - SMC_GET_MII_ACC(__v); \ - } while ( __v & MII_ACC_MII_BUSY_ ); \ - SMC_SET_MII_ACC( ((phy)<<11) | ((a)<<6) | \ - MII_ACC_MII_BUSY_); \ - do { \ - SMC_GET_MII_ACC(__v); \ - } while ( __v & MII_ACC_MII_BUSY_ ); \ - SMC_GET_MII_DATA(v); \ - } while (0) -#define SMC_SET_MII(a,phy,v) \ - do { \ - u32 __v; \ - do { \ - SMC_GET_MII_ACC(__v); \ - } while ( __v & MII_ACC_MII_BUSY_ ); \ - SMC_SET_MII_DATA(v); \ - SMC_SET_MII_ACC( ((phy)<<11) | ((a)<<6) | \ - MII_ACC_MII_BUSY_ | \ - MII_ACC_MII_WRITE_ ); \ - do { \ - SMC_GET_MII_ACC(__v); \ - } while ( __v & MII_ACC_MII_BUSY_ ); \ - } while (0) -#define SMC_GET_PHY_BMCR(phy,x) SMC_GET_MII( MII_BMCR, phy, x ) -#define SMC_SET_PHY_BMCR(phy,x) SMC_SET_MII( MII_BMCR, phy, x ) -#define SMC_GET_PHY_BMSR(phy,x) SMC_GET_MII( MII_BMSR, phy, x ) -#define SMC_GET_PHY_ID1(phy,x) SMC_GET_MII( MII_PHYSID1, phy, x ) -#define SMC_GET_PHY_ID2(phy,x) SMC_GET_MII( MII_PHYSID2, phy, x ) -#define SMC_GET_PHY_MII_ADV(phy,x) SMC_GET_MII( MII_ADVERTISE, phy, x ) -#define SMC_SET_PHY_MII_ADV(phy,x) SMC_SET_MII( MII_ADVERTISE, phy, x ) -#define SMC_GET_PHY_MII_LPA(phy,x) SMC_GET_MII( MII_LPA, phy, x ) -#define SMC_SET_PHY_MII_LPA(phy,x) SMC_SET_MII( MII_LPA, phy, x ) -#define SMC_GET_PHY_CTRL_STS(phy,x) SMC_GET_MII( PHY_MODE_CTRL_STS, phy, x ) -#define SMC_SET_PHY_CTRL_STS(phy,x) SMC_SET_MII( PHY_MODE_CTRL_STS, phy, x ) -#define SMC_GET_PHY_INT_SRC(phy,x) SMC_GET_MII( PHY_INT_SRC, phy, x ) -#define SMC_SET_PHY_INT_SRC(phy,x) SMC_SET_MII( PHY_INT_SRC, phy, x ) -#define SMC_GET_PHY_INT_MASK(phy,x) SMC_GET_MII( PHY_INT_MASK, phy, x ) -#define SMC_SET_PHY_INT_MASK(phy,x) SMC_SET_MII( PHY_INT_MASK, phy, x ) -#define SMC_GET_PHY_SPECIAL(phy,x) SMC_GET_MII( PHY_SPECIAL, phy, x ) - - - -/* Misc read/write macros */ - -#ifndef SMC_GET_MAC_ADDR -#define SMC_GET_MAC_ADDR(addr) \ - do { \ - unsigned int __v; \ - \ - SMC_GET_MAC_CSR(ADDRL, __v); \ - addr[0] = __v; addr[1] = __v >> 8; \ - addr[2] = __v >> 16; addr[3] = __v >> 24; \ - SMC_GET_MAC_CSR(ADDRH, __v); \ - addr[4] = __v; addr[5] = __v >> 8; \ - } while (0) -#endif - -#define SMC_SET_MAC_ADDR(addr) \ - do { \ - SMC_SET_MAC_CSR(ADDRL, \ - addr[0] | \ - (addr[1] << 8) | \ - (addr[2] << 16) | \ - (addr[3] << 24)); \ - SMC_SET_MAC_CSR(ADDRH, addr[4]|(addr[5] << 8));\ - } while (0) - - -#define SMC_WRITE_EEPROM_CMD(cmd, addr) \ - do { \ - while (SMC_GET_E2P_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - SMC_SET_MAC_CMD(MAC_CSR_CMD_R_NOT_W_ | a ); \ - while (SMC_GET_MAC_CMD() & MAC_CSR_CMD_CSR_BUSY_); \ - } while (0) - -#endif /* _SMC911X_H_ */ diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index 8b0321f19..f86697da0 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c @@ -523,7 +523,8 @@ static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * de length = skb->len; if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) { netif_wake_queue(dev); return 0; } @@ -731,9 +732,12 @@ static int ifport; struct net_device * __init smc_init(int unit) { struct net_device *dev = alloc_etherdev(sizeof(struct smc_local)); - struct devlist *smcdev = smc_devlist; + static struct devlist *smcdev = smc_devlist; int err = 0; +#ifndef NO_AUTOPROBE + smcdev = smc_devlist; +#endif if (!dev) return ERR_PTR(-ENODEV); @@ -1603,7 +1607,7 @@ MODULE_PARM_DESC(io, "SMC 99194 I/O base address"); MODULE_PARM_DESC(irq, "SMC 99194 IRQ number"); MODULE_PARM_DESC(ifport, "SMC 99194 interface port (0-default, 1-TP, 2-AUI)"); -int __init init_module(void) +int init_module(void) { if (io == 0) printk(KERN_WARNING diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index cf62373b8..0e9833adf 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -66,6 +66,7 @@ static const char version[] = #endif +#include #include #include #include @@ -321,12 +322,12 @@ static void smc_reset(struct net_device *dev) DBG(2, "%s: %s\n", dev->name, __FUNCTION__); /* Disable all interrupts, block TX tasklet */ - spin_lock_irq(&lp->lock); + spin_lock(&lp->lock); SMC_SELECT_BANK(2); SMC_SET_INT_MASK(0); pending_skb = lp->pending_tx_skb; lp->pending_tx_skb = NULL; - spin_unlock_irq(&lp->lock); + spin_unlock(&lp->lock); /* free any pending tx skb */ if (pending_skb) { @@ -448,12 +449,12 @@ static void smc_shutdown(struct net_device *dev) DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__); /* no more interrupts for me */ - spin_lock_irq(&lp->lock); + spin_lock(&lp->lock); SMC_SELECT_BANK(2); SMC_SET_INT_MASK(0); pending_skb = lp->pending_tx_skb; lp->pending_tx_skb = NULL; - spin_unlock_irq(&lp->lock); + spin_unlock(&lp->lock); if (pending_skb) dev_kfree_skb(pending_skb); diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 7aa7fbac8..e1be1af51 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h @@ -129,19 +129,6 @@ #define SMC_insb(a, r, p, l) readsb((a) + (r), p, (l)) #define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) -#elif defined(CONFIG_MACH_LOGICPD_PXA270) - -#define SMC_CAN_USE_8BIT 0 -#define SMC_CAN_USE_16BIT 1 -#define SMC_CAN_USE_32BIT 0 -#define SMC_IO_SHIFT 0 -#define SMC_NOWAIT 1 - -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_outw(v, a, r) writew(v, (a) + (r)) -#define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) -#define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) - #elif defined(CONFIG_ARCH_INNOKOM) || \ defined(CONFIG_MACH_MAINSTONE) || \ defined(CONFIG_ARCH_PXA_IDP) || \ @@ -184,10 +171,16 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) #define SMC_IO_SHIFT 0 #define SMC_NOWAIT 1 +#define SMC_inb(a, r) readb((a) + (r)) +#define SMC_outb(v, a, r) writeb(v, (a) + (r)) #define SMC_inw(a, r) readw((a) + (r)) #define SMC_outw(v, a, r) writew(v, (a) + (r)) #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) +#define SMC_inl(a, r) readl((a) + (r)) +#define SMC_outl(v, a, r) writel(v, (a) + (r)) +#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) +#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) #include #include @@ -196,7 +189,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) machine_is_omap_h2() \ || machine_is_omap_h3() \ || (machine_is_omap_innovator() && !cpu_is_omap1510()) \ - ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING) + ) ? SA_TRIGGER_FALLING : SA_TRIGGER_RISING) #elif defined(CONFIG_SH_SH4202_MICRODEV) @@ -249,17 +242,15 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) #define RPC_LSA_DEFAULT RPC_LED_TX_RX #define RPC_LSB_DEFAULT RPC_LED_100_10 -#elif defined(CONFIG_MACH_LPD79520) \ - || defined(CONFIG_MACH_LPD7A400) \ - || defined(CONFIG_MACH_LPD7A404) +#elif defined(CONFIG_MACH_LPD7A400) || defined(CONFIG_MACH_LPD7A404) -/* The LPD7X_IOBARRIER is necessary to overcome a mismatch between the - * way that the CPU handles chip selects and the way that the SMC chip - * expects the chip select to operate. Refer to +/* The LPD7A40X_IOBARRIER is necessary to overcome a mismatch between + * the way that the CPU handles chip selects and the way that the SMC + * chip expects the chip select to operate. Refer to * Documentation/arm/Sharp-LH/IOBarrier for details. The read from - * IOBARRIER is a byte, in order that we read the least-common - * denominator. It would be wasteful to read 32 bits from an 8-bit - * accessible region. + * IOBARRIER is a byte as a least-common denominator of possible + * regions to use as the barrier. It would be wasteful to read 32 + * bits from a byte oriented region. * * There is no explicit protection against interrupts intervening * between the writew and the IOBARRIER. In SMC ISR there is a @@ -278,35 +269,25 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) #define SMC_CAN_USE_16BIT 1 #define SMC_CAN_USE_32BIT 0 #define SMC_NOWAIT 0 -#define LPD7X_IOBARRIER readb (IOBARRIER_VIRT) +#define LPD7A40X_IOBARRIER readb (IOBARRIER_VIRT) -#define SMC_inw(a,r)\ - ({ unsigned short v = readw ((void*) ((a) + (r))); LPD7X_IOBARRIER; v; }) -#define SMC_outw(v,a,r) ({ writew ((v), (a) + (r)); LPD7X_IOBARRIER; }) +#define SMC_inw(a,r) readw ((void*) ((a) + (r))) +#define SMC_insw(a,r,p,l) readsw ((void*) ((a) + (r)), p, l) +#define SMC_outw(v,a,r) ({ writew ((v), (a) + (r)); LPD7A40X_IOBARRIER; }) -#define SMC_insw LPD7_SMC_insw -static inline void LPD7_SMC_insw (unsigned char* a, int r, - unsigned char* p, int l) -{ - unsigned short* ps = (unsigned short*) p; - while (l-- > 0) { - *ps++ = readw (a + r); - LPD7X_IOBARRIER; - } -} +#define SMC_outsw LPD7A40X_SMC_outsw -#define SMC_outsw LPD7_SMC_outsw -static inline void LPD7_SMC_outsw (unsigned char* a, int r, - unsigned char* p, int l) +static inline void LPD7A40X_SMC_outsw(unsigned long a, int r, + unsigned char* p, int l) { unsigned short* ps = (unsigned short*) p; while (l-- > 0) { writew (*ps++, a + r); - LPD7X_IOBARRIER; + LPD7A40X_IOBARRIER; } } -#define SMC_INTERRUPT_PREAMBLE LPD7X_IOBARRIER +#define SMC_INTERRUPT_PREAMBLE LPD7A40X_IOBARRIER #define RPC_LSA_DEFAULT RPC_LED_TX_RX #define RPC_LSB_DEFAULT RPC_LED_100_10 @@ -343,42 +324,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r, #define SMC_IRQ_FLAGS (0) -#elif defined(CONFIG_ARCH_VERSATILE) - -#define SMC_CAN_USE_8BIT 1 -#define SMC_CAN_USE_16BIT 1 -#define SMC_CAN_USE_32BIT 1 -#define SMC_NOWAIT 1 - -#define SMC_inb(a, r) readb((a) + (r)) -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_inl(a, r) readl((a) + (r)) -#define SMC_outb(v, a, r) writeb(v, (a) + (r)) -#define SMC_outw(v, a, r) writew(v, (a) + (r)) -#define SMC_outl(v, a, r) writel(v, (a) + (r)) -#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) -#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) - -#define SMC_IRQ_FLAGS (0) - -#elif defined(CONFIG_ARCH_VERSATILE) - -#define SMC_CAN_USE_8BIT 1 -#define SMC_CAN_USE_16BIT 1 -#define SMC_CAN_USE_32BIT 1 -#define SMC_NOWAIT 1 - -#define SMC_inb(a, r) readb((a) + (r)) -#define SMC_inw(a, r) readw((a) + (r)) -#define SMC_inl(a, r) readl((a) + (r)) -#define SMC_outb(v, a, r) writeb(v, (a) + (r)) -#define SMC_outw(v, a, r) writew(v, (a) + (r)) -#define SMC_outl(v, a, r) writel(v, (a) + (r)) -#define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) -#define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) - -#define SMC_IRQ_FLAGS (0) - #else #define SMC_CAN_USE_8BIT 1 @@ -565,7 +510,7 @@ smc_pxa_dma_irq(int dma, void *dummy, struct pt_regs *regs) #endif #ifndef SMC_IRQ_FLAGS -#define SMC_IRQ_FLAGS IRQF_TRIGGER_RISING +#define SMC_IRQ_FLAGS SA_TRIGGER_RISING #endif #ifndef SMC_INTERRUPT_PREAMBLE diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index cab0dd958..90b818a8d 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c @@ -231,7 +231,8 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) length = skb->len; if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/sonic.h b/drivers/net/sonic.h index 7f5c4ebcc..cede969a8 100644 --- a/drivers/net/sonic.h +++ b/drivers/net/sonic.h @@ -22,6 +22,7 @@ #ifndef SONIC_H #define SONIC_H +#include /* * SONIC register offsets diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 889072184..394339d5e 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -21,6 +21,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -84,7 +85,7 @@ MODULE_DEVICE_TABLE(pci, spider_net_pci_tbl); * * returns the content of the specified SMMIO register. */ -static inline u32 +static u32 spider_net_read_reg(struct spider_net_card *card, u32 reg) { u32 value; @@ -101,7 +102,7 @@ spider_net_read_reg(struct spider_net_card *card, u32 reg) * @reg: register to write to * @value: value to write into the specified SMMIO register */ -static inline void +static void spider_net_write_reg(struct spider_net_card *card, u32 reg, u32 value) { value = cpu_to_le32(value); @@ -259,10 +260,39 @@ spider_net_get_mac_address(struct net_device *netdev) * * returns the status as in the dmac_cmd_status field of the descriptor */ -static inline int +static enum spider_net_descr_status spider_net_get_descr_status(struct spider_net_descr *descr) { - return descr->dmac_cmd_status & SPIDER_NET_DESCR_IND_PROC_MASK; + u32 cmd_status; + + cmd_status = descr->dmac_cmd_status; + cmd_status >>= SPIDER_NET_DESCR_IND_PROC_SHIFT; + /* no need to mask out any bits, as cmd_status is 32 bits wide only + * (and unsigned) */ + return cmd_status; +} + +/** + * spider_net_set_descr_status -- sets the status of a descriptor + * @descr: descriptor to change + * @status: status to set in the descriptor + * + * changes the status to the specified value. Doesn't change other bits + * in the status + */ +static void +spider_net_set_descr_status(struct spider_net_descr *descr, + enum spider_net_descr_status status) +{ + u32 cmd_status; + /* read the status */ + cmd_status = descr->dmac_cmd_status; + /* clean the upper 4 bits */ + cmd_status &= SPIDER_NET_DESCR_IND_PROC_MASKO; + /* add the status to it */ + cmd_status |= ((u32)status)<dmac_cmd_status = cmd_status; } /** @@ -299,23 +329,24 @@ spider_net_free_chain(struct spider_net_card *card, static int spider_net_init_chain(struct spider_net_card *card, struct spider_net_descr_chain *chain, - struct spider_net_descr *start_descr, - int direction, int no) + struct spider_net_descr *start_descr, int no) { int i; struct spider_net_descr *descr; dma_addr_t buf; + atomic_set(&card->rx_chain_refill,0); + descr = start_descr; memset(descr, 0, sizeof(*descr) * no); /* set up the hardware pointers in each descriptor */ for (i=0; idmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; + spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE); buf = pci_map_single(card->pdev, descr, SPIDER_NET_DESCR_SIZE, - direction); + PCI_DMA_BIDIRECTIONAL); if (buf == DMA_ERROR_CODE) goto iommu_error; @@ -330,11 +361,10 @@ spider_net_init_chain(struct spider_net_card *card, start_descr->prev = descr-1; descr = start_descr; - if (direction == PCI_DMA_FROMDEVICE) - for (i=0; i < no; i++, descr++) - descr->next_descr_addr = descr->next->bus_addr; + for (i=0; i < no; i++, descr++) { + descr->next_descr_addr = descr->next->bus_addr; + } - spin_lock_init(&chain->lock); chain->head = start_descr; chain->tail = start_descr; @@ -346,7 +376,7 @@ iommu_error: if (descr->bus_addr) pci_unmap_single(card->pdev, descr->bus_addr, SPIDER_NET_DESCR_SIZE, - direction); + PCI_DMA_BIDIRECTIONAL); return -ENOMEM; } @@ -367,7 +397,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) dev_kfree_skb(descr->skb); pci_unmap_single(card->pdev, descr->buf_addr, SPIDER_NET_MAX_FRAME, - PCI_DMA_FROMDEVICE); + PCI_DMA_BIDIRECTIONAL); } descr = descr->next; } @@ -417,16 +447,15 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset); /* io-mmu-map the skb */ buf = pci_map_single(card->pdev, descr->skb->data, - SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); + SPIDER_NET_MAX_FRAME, PCI_DMA_BIDIRECTIONAL); descr->buf_addr = buf; if (buf == DMA_ERROR_CODE) { dev_kfree_skb_any(descr->skb); if (netif_msg_rx_err(card) && net_ratelimit()) pr_err("Could not iommu-map rx buffer\n"); - descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; + spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE); } else { - descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | - SPIDER_NET_DMAC_NOINTR_COMPLETE; + descr->dmac_cmd_status = SPIDER_NET_DMAC_RX_CARDOWNED; } return error; @@ -440,7 +469,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, * chip by writing to the appropriate register. DMA is enabled in * spider_net_enable_rxdmac. */ -static inline void +static void spider_net_enable_rxchtails(struct spider_net_card *card) { /* assume chain is aligned correctly */ @@ -455,7 +484,7 @@ spider_net_enable_rxchtails(struct spider_net_card *card) * spider_net_enable_rxdmac enables the DMA controller by setting RX_DMA_EN * in the GDADMACCNTR register */ -static inline void +static void spider_net_enable_rxdmac(struct spider_net_card *card) { wmb(); @@ -472,24 +501,23 @@ spider_net_enable_rxdmac(struct spider_net_card *card) static void spider_net_refill_rx_chain(struct spider_net_card *card) { - struct spider_net_descr_chain *chain = &card->rx_chain; - unsigned long flags; + struct spider_net_descr_chain *chain; + + chain = &card->rx_chain; /* one context doing the refill (and a second context seeing that * and omitting it) is ok. If called by NAPI, we'll be called again * as spider_net_decode_one_descr is called several times. If some * interrupt calls us, the NAPI is about to clean up anyway. */ - if (!spin_trylock_irqsave(&chain->lock, flags)) - return; - - while (spider_net_get_descr_status(chain->head) == - SPIDER_NET_DESCR_NOT_IN_USE) { - if (spider_net_prepare_rx_descr(card, chain->head)) - break; - chain->head = chain->head->next; - } + if (atomic_inc_return(&card->rx_chain_refill) == 1) + while (spider_net_get_descr_status(chain->head) == + SPIDER_NET_DESCR_NOT_IN_USE) { + if (spider_net_prepare_rx_descr(card, chain->head)) + break; + chain->head = chain->head->next; + } - spin_unlock_irqrestore(&chain->lock, flags); + atomic_dec(&card->rx_chain_refill); } /** @@ -526,6 +554,111 @@ error: return result; } +/** + * spider_net_release_tx_descr - processes a used tx descriptor + * @card: card structure + * @descr: descriptor to release + * + * releases a used tx descriptor (unmapping, freeing of skb) + */ +static void +spider_net_release_tx_descr(struct spider_net_card *card, + struct spider_net_descr *descr) +{ + struct sk_buff *skb; + + /* unmap the skb */ + skb = descr->skb; + pci_unmap_single(card->pdev, descr->buf_addr, skb->len, + PCI_DMA_BIDIRECTIONAL); + + dev_kfree_skb_any(skb); + + /* set status to not used */ + spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE); +} + +/** + * spider_net_release_tx_chain - processes sent tx descriptors + * @card: adapter structure + * @brutal: if set, don't care about whether descriptor seems to be in use + * + * returns 0 if the tx ring is empty, otherwise 1. + * + * spider_net_release_tx_chain releases the tx descriptors that spider has + * finished with (if non-brutal) or simply release tx descriptors (if brutal). + * If some other context is calling this function, we return 1 so that we're + * scheduled again (if we were scheduled) and will not loose initiative. + */ +static int +spider_net_release_tx_chain(struct spider_net_card *card, int brutal) +{ + struct spider_net_descr_chain *tx_chain = &card->tx_chain; + enum spider_net_descr_status status; + + if (atomic_inc_return(&card->tx_chain_release) != 1) { + atomic_dec(&card->tx_chain_release); + return 1; + } + + for (;;) { + status = spider_net_get_descr_status(tx_chain->tail); + switch (status) { + case SPIDER_NET_DESCR_CARDOWNED: + if (!brutal) + goto out; + /* fallthrough, if we release the descriptors + * brutally (then we don't care about + * SPIDER_NET_DESCR_CARDOWNED) */ + case SPIDER_NET_DESCR_RESPONSE_ERROR: + case SPIDER_NET_DESCR_PROTECTION_ERROR: + case SPIDER_NET_DESCR_FORCE_END: + if (netif_msg_tx_err(card)) + pr_err("%s: forcing end of tx descriptor " + "with status x%02x\n", + card->netdev->name, status); + card->netdev_stats.tx_dropped++; + break; + + case SPIDER_NET_DESCR_COMPLETE: + card->netdev_stats.tx_packets++; + card->netdev_stats.tx_bytes += + tx_chain->tail->skb->len; + break; + + default: /* any other value (== SPIDER_NET_DESCR_NOT_IN_USE) */ + goto out; + } + spider_net_release_tx_descr(card, tx_chain->tail); + tx_chain->tail = tx_chain->tail->next; + } +out: + atomic_dec(&card->tx_chain_release); + + netif_wake_queue(card->netdev); + + if (status == SPIDER_NET_DESCR_CARDOWNED) + return 1; + return 0; +} + +/** + * spider_net_cleanup_tx_ring - cleans up the TX ring + * @card: card structure + * + * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use + * interrupts to cleanup our TX ring) and returns sent packets to the stack + * by freeing them + */ +static void +spider_net_cleanup_tx_ring(struct spider_net_card *card) +{ + if ( (spider_net_release_tx_chain(card, 0)) && + (card->netdev->flags & IFF_UP) ) { + mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER); + } +} + /** * spider_net_get_multicast_hash - generates hash for multicast filter table * @addr: multicast address @@ -629,128 +762,129 @@ spider_net_disable_rxdmac(struct spider_net_card *card) } /** - * spider_net_prepare_tx_descr - fill tx descriptor with skb data - * @card: card structure - * @descr: descriptor structure to fill out - * @skb: packet to use - * - * returns 0 on success, <0 on failure. + * spider_net_stop - called upon ifconfig down + * @netdev: interface device structure * - * fills out the descriptor structure with skb data and len. Copies data, - * if needed (32bit DMA!) + * always returns 0 */ -static int -spider_net_prepare_tx_descr(struct spider_net_card *card, - struct sk_buff *skb) +int +spider_net_stop(struct net_device *netdev) { - struct spider_net_descr *descr = card->tx_chain.head; - dma_addr_t buf; + struct spider_net_card *card = netdev_priv(netdev); - buf = pci_map_single(card->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); - if (buf == DMA_ERROR_CODE) { - if (netif_msg_tx_err(card) && net_ratelimit()) - pr_err("could not iommu-map packet (%p, %i). " - "Dropping packet\n", skb->data, skb->len); - return -ENOMEM; - } + tasklet_kill(&card->rxram_full_tl); + netif_poll_disable(netdev); + netif_carrier_off(netdev); + netif_stop_queue(netdev); + del_timer_sync(&card->tx_timer); - descr->buf_addr = buf; - descr->buf_size = skb->len; - descr->next_descr_addr = 0; - descr->skb = skb; - descr->data_status = 0; + /* disable/mask all interrupts */ + spider_net_write_reg(card, SPIDER_NET_GHIINT0MSK, 0); + spider_net_write_reg(card, SPIDER_NET_GHIINT1MSK, 0); + spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK, 0); - descr->dmac_cmd_status = - SPIDER_NET_DESCR_CARDOWNED | SPIDER_NET_DMAC_NOCS; - if (skb->protocol == htons(ETH_P_IP)) - switch (skb->nh.iph->protocol) { - case IPPROTO_TCP: - descr->dmac_cmd_status |= SPIDER_NET_DMAC_TCP; - break; - case IPPROTO_UDP: - descr->dmac_cmd_status |= SPIDER_NET_DMAC_UDP; - break; - } + /* free_irq(netdev->irq, netdev);*/ + free_irq(to_pci_dev(netdev->class_dev.dev)->irq, netdev); - descr->prev->next_descr_addr = descr->bus_addr; + spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR, + SPIDER_NET_DMA_TX_FEND_VALUE); + + /* turn off DMA, force end */ + spider_net_disable_rxdmac(card); + + /* release chains */ + spider_net_release_tx_chain(card, 1); + + spider_net_free_chain(card, &card->tx_chain); + spider_net_free_chain(card, &card->rx_chain); return 0; } /** - * spider_net_release_tx_descr - processes a used tx descriptor - * @card: card structure - * @descr: descriptor to release + * spider_net_get_next_tx_descr - returns the next available tx descriptor + * @card: device structure to get descriptor from * - * releases a used tx descriptor (unmapping, freeing of skb) + * returns the address of the next descriptor, or NULL if not available. */ -static inline void -spider_net_release_tx_descr(struct spider_net_card *card) +static struct spider_net_descr * +spider_net_get_next_tx_descr(struct spider_net_card *card) { - struct spider_net_descr *descr = card->tx_chain.tail; - struct sk_buff *skb; + /* check, if head points to not-in-use descr */ + if ( spider_net_get_descr_status(card->tx_chain.head) == + SPIDER_NET_DESCR_NOT_IN_USE ) { + return card->tx_chain.head; + } else { + return NULL; + } +} - card->tx_chain.tail = card->tx_chain.tail->next; - descr->dmac_cmd_status |= SPIDER_NET_DESCR_NOT_IN_USE; +/** + * spider_net_set_txdescr_cmdstat - sets the tx descriptor command field + * @descr: descriptor structure to fill out + * @skb: packet to consider + * + * fills out the command and status field of the descriptor structure, + * depending on hardware checksum settings. + */ +static void +spider_net_set_txdescr_cmdstat(struct spider_net_descr *descr, + struct sk_buff *skb) +{ + /* make sure the other fields in the descriptor are written */ + wmb(); - /* unmap the skb */ - skb = descr->skb; - pci_unmap_single(card->pdev, descr->buf_addr, skb->len, - PCI_DMA_TODEVICE); - dev_kfree_skb_any(skb); + if (skb->ip_summed != CHECKSUM_HW) { + descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_NOCS; + return; + } + + /* is packet ip? + * if yes: tcp? udp? */ + if (skb->protocol == htons(ETH_P_IP)) { + if (skb->nh.iph->protocol == IPPROTO_TCP) + descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_TCPCS; + else if (skb->nh.iph->protocol == IPPROTO_UDP) + descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_UDPCS; + else /* the stack should checksum non-tcp and non-udp + packets on his own: NETIF_F_IP_CSUM */ + descr->dmac_cmd_status = SPIDER_NET_DMAC_CMDSTAT_NOCS; + } } /** - * spider_net_release_tx_chain - processes sent tx descriptors - * @card: adapter structure - * @brutal: if set, don't care about whether descriptor seems to be in use + * spider_net_prepare_tx_descr - fill tx descriptor with skb data + * @card: card structure + * @descr: descriptor structure to fill out + * @skb: packet to use * - * returns 0 if the tx ring is empty, otherwise 1. + * returns 0 on success, <0 on failure. * - * spider_net_release_tx_chain releases the tx descriptors that spider has - * finished with (if non-brutal) or simply release tx descriptors (if brutal). - * If some other context is calling this function, we return 1 so that we're - * scheduled again (if we were scheduled) and will not loose initiative. + * fills out the descriptor structure with skb data and len. Copies data, + * if needed (32bit DMA!) */ static int -spider_net_release_tx_chain(struct spider_net_card *card, int brutal) +spider_net_prepare_tx_descr(struct spider_net_card *card, + struct spider_net_descr *descr, + struct sk_buff *skb) { - struct spider_net_descr_chain *chain = &card->tx_chain; - int status; - - spider_net_read_reg(card, SPIDER_NET_GDTDMACCNTR); - - while (chain->tail != chain->head) { - status = spider_net_get_descr_status(chain->tail); - switch (status) { - case SPIDER_NET_DESCR_COMPLETE: - card->netdev_stats.tx_packets++; - card->netdev_stats.tx_bytes += chain->tail->skb->len; - break; + dma_addr_t buf; - case SPIDER_NET_DESCR_CARDOWNED: - if (!brutal) - return 1; - /* fallthrough, if we release the descriptors - * brutally (then we don't care about - * SPIDER_NET_DESCR_CARDOWNED) */ + buf = pci_map_single(card->pdev, skb->data, + skb->len, PCI_DMA_BIDIRECTIONAL); + if (buf == DMA_ERROR_CODE) { + if (netif_msg_tx_err(card) && net_ratelimit()) + pr_err("could not iommu-map packet (%p, %i). " + "Dropping packet\n", skb->data, skb->len); + return -ENOMEM; + } - case SPIDER_NET_DESCR_RESPONSE_ERROR: - case SPIDER_NET_DESCR_PROTECTION_ERROR: - case SPIDER_NET_DESCR_FORCE_END: - if (netif_msg_tx_err(card)) - pr_err("%s: forcing end of tx descriptor " - "with status x%02x\n", - card->netdev->name, status); - card->netdev_stats.tx_errors++; - break; + descr->buf_addr = buf; + descr->buf_size = skb->len; + descr->skb = skb; + descr->data_status = 0; - default: - card->netdev_stats.tx_dropped++; - return 1; - } - spider_net_release_tx_descr(card); - } + spider_net_set_txdescr_cmdstat(descr,skb); return 0; } @@ -763,32 +897,18 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal) * spider_net_kick_tx_dma writes the current tx chain head as start address * of the tx descriptor chain and enables the transmission DMA engine */ -static inline void -spider_net_kick_tx_dma(struct spider_net_card *card) +static void +spider_net_kick_tx_dma(struct spider_net_card *card, + struct spider_net_descr *descr) { - struct spider_net_descr *descr; - - if (spider_net_read_reg(card, SPIDER_NET_GDTDMACCNTR) & - SPIDER_NET_TX_DMA_EN) - goto out; + /* this is the only descriptor in the output chain. + * Enable TX DMA */ - descr = card->tx_chain.tail; - for (;;) { - if (spider_net_get_descr_status(descr) == - SPIDER_NET_DESCR_CARDOWNED) { - spider_net_write_reg(card, SPIDER_NET_GDTDCHA, - descr->bus_addr); - spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR, - SPIDER_NET_DMA_TX_VALUE); - break; - } - if (descr == card->tx_chain.head) - break; - descr = descr->next; - } + spider_net_write_reg(card, SPIDER_NET_GDTDCHA, + descr->bus_addr); -out: - mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER); + spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR, + SPIDER_NET_DMA_TX_VALUE); } /** @@ -796,69 +916,47 @@ out: * @skb: packet to send out * @netdev: interface device structure * - * returns 0 on success, !0 on failure + * returns 0 on success, <0 on failure */ static int spider_net_xmit(struct sk_buff *skb, struct net_device *netdev) { struct spider_net_card *card = netdev_priv(netdev); - struct spider_net_descr_chain *chain = &card->tx_chain; - struct spider_net_descr *descr = chain->head; - unsigned long flags; + struct spider_net_descr *descr; int result; - spin_lock_irqsave(&chain->lock, flags); - spider_net_release_tx_chain(card, 0); - if (chain->head->next == chain->tail->prev) { - card->netdev_stats.tx_dropped++; - result = NETDEV_TX_LOCKED; - goto out; - } + descr = spider_net_get_next_tx_descr(card); - if (spider_net_get_descr_status(descr) != SPIDER_NET_DESCR_NOT_IN_USE) { - result = NETDEV_TX_LOCKED; - goto out; - } - - if (spider_net_prepare_tx_descr(card, skb) != 0) { - card->netdev_stats.tx_dropped++; - result = NETDEV_TX_BUSY; - goto out; - } + if (!descr) + goto error; - result = NETDEV_TX_OK; + result = spider_net_prepare_tx_descr(card, descr, skb); + if (result) + goto error; - spider_net_kick_tx_dma(card); card->tx_chain.head = card->tx_chain.head->next; -out: - spin_unlock_irqrestore(&chain->lock, flags); - netif_wake_queue(netdev); - return result; -} - -/** - * spider_net_cleanup_tx_ring - cleans up the TX ring - * @card: card structure - * - * spider_net_cleanup_tx_ring is called by the tx_timer (as we don't use - * interrupts to cleanup our TX ring) and returns sent packets to the stack - * by freeing them - */ -static void -spider_net_cleanup_tx_ring(struct spider_net_card *card) -{ - unsigned long flags; + if (spider_net_get_descr_status(descr->prev) != + SPIDER_NET_DESCR_CARDOWNED) { + /* make sure the current descriptor is in memory. Then + * kicking it on again makes sense, if the previous is not + * card-owned anymore. Check the previous descriptor twice + * to omit an mb() in heavy traffic cases */ + mb(); + if (spider_net_get_descr_status(descr->prev) != + SPIDER_NET_DESCR_CARDOWNED) + spider_net_kick_tx_dma(card, descr); + } - spin_lock_irqsave(&card->tx_chain.lock, flags); + mod_timer(&card->tx_timer, jiffies + SPIDER_NET_TX_TIMER); - if ((spider_net_release_tx_chain(card, 0) != 0) && - (card->netdev->flags & IFF_UP)) - spider_net_kick_tx_dma(card); + return NETDEV_TX_OK; - spin_unlock_irqrestore(&card->tx_chain.lock, flags); +error: + card->netdev_stats.tx_dropped++; + return NETDEV_TX_BUSY; } /** @@ -905,7 +1003,7 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, /* unmap descriptor */ pci_unmap_single(card->pdev, descr->buf_addr, SPIDER_NET_MAX_FRAME, - PCI_DMA_FROMDEVICE); + PCI_DMA_BIDIRECTIONAL); /* the cases we'll throw away the packet immediately */ if (data_error & SPIDER_NET_DESTROY_RX_FLAGS) { @@ -970,11 +1068,14 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, static int spider_net_decode_one_descr(struct spider_net_card *card, int napi) { - struct spider_net_descr_chain *chain = &card->rx_chain; - struct spider_net_descr *descr = chain->tail; - int status; + enum spider_net_descr_status status; + struct spider_net_descr *descr; + struct spider_net_descr_chain *chain; int result; + chain = &card->rx_chain; + descr = chain->tail; + status = spider_net_get_descr_status(descr); if (status == SPIDER_NET_DESCR_CARDOWNED) { @@ -1003,7 +1104,7 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi) card->netdev->name, status); card->netdev_stats.rx_dropped++; pci_unmap_single(card->pdev, descr->buf_addr, - SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); + SPIDER_NET_MAX_FRAME, PCI_DMA_BIDIRECTIONAL); dev_kfree_skb_irq(descr->skb); goto refill; } @@ -1019,7 +1120,7 @@ spider_net_decode_one_descr(struct spider_net_card *card, int napi) /* ok, we've got a packet in descr */ result = spider_net_pass_skb_up(descr, card, napi); refill: - descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; + spider_net_set_descr_status(descr, SPIDER_NET_DESCR_NOT_IN_USE); /* change the descriptor state: */ if (!napi) spider_net_refill_rx_chain(card); @@ -1190,6 +1291,21 @@ spider_net_set_mac(struct net_device *netdev, void *p) return 0; } +/** + * spider_net_enable_txdmac - enables a TX DMA controller + * @card: card structure + * + * spider_net_enable_txdmac enables the TX DMA controller by setting the + * descriptor chain tail address + */ +static void +spider_net_enable_txdmac(struct spider_net_card *card) +{ + /* assume chain is aligned correctly */ + spider_net_write_reg(card, SPIDER_NET_GDTDCHA, + card->tx_chain.tail->bus_addr); +} + /** * spider_net_handle_rxram_full - cleans up RX ring upon RX RAM full interrupt * @card: card structure @@ -1538,6 +1654,7 @@ spider_net_enable_card(struct spider_net_card *card) { SPIDER_NET_GMRWOLCTRL, 0 }, { SPIDER_NET_GTESTMD, 0x10000000 }, { SPIDER_NET_GTTQMSK, 0x00400040 }, + { SPIDER_NET_GTESTMD, 0 }, { SPIDER_NET_GMACINTEN, 0 }, @@ -1576,6 +1693,9 @@ spider_net_enable_card(struct spider_net_card *card) spider_net_write_reg(card, SPIDER_NET_GRXDMAEN, SPIDER_NET_WOL_VALUE); + /* set chain tail adress for TX chain */ + spider_net_enable_txdmac(card); + spider_net_write_reg(card, SPIDER_NET_GMACLENLMT, SPIDER_NET_LENLMT_VALUE); spider_net_write_reg(card, SPIDER_NET_GMACMODE, @@ -1590,9 +1710,6 @@ spider_net_enable_card(struct spider_net_card *card) SPIDER_NET_INT1_MASK_VALUE); spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK, SPIDER_NET_INT2_MASK_VALUE); - - spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR, - SPIDER_NET_GDTDCEIDIS); } /** @@ -1611,12 +1728,11 @@ spider_net_open(struct net_device *netdev) int result; result = -ENOMEM; - if (spider_net_init_chain(card, &card->tx_chain, card->descr, - PCI_DMA_TODEVICE, card->tx_desc)) + if (spider_net_init_chain(card, &card->tx_chain, + card->descr, tx_descriptors)) goto alloc_tx_failed; if (spider_net_init_chain(card, &card->rx_chain, - card->descr + card->rx_desc, - PCI_DMA_FROMDEVICE, card->rx_desc)) + card->descr + tx_descriptors, rx_descriptors)) goto alloc_rx_failed; /* allocate rx skbs */ @@ -1629,7 +1745,7 @@ spider_net_open(struct net_device *netdev) result = -EBUSY; if (request_irq(netdev->irq, spider_net_interrupt, - IRQF_SHARED, netdev->name, netdev)) + SA_SHIRQ, netdev->name, netdev)) goto register_int_failed; spider_net_enable_card(card); @@ -1823,7 +1939,7 @@ spider_net_workaround_rxramfull(struct spider_net_card *card) /* empty sequencer data */ for (sequencer = 0; sequencer < SPIDER_NET_FIRMWARE_SEQS; sequencer++) { - spider_net_write_reg(card, SPIDER_NET_GSnPRGADR + + spider_net_write_reg(card, SPIDER_NET_GSnPRGDAT + sequencer * 8, 0x0); for (i = 0; i < SPIDER_NET_FIRMWARE_SEQWORDS; i++) { spider_net_write_reg(card, SPIDER_NET_GSnPRGDAT + @@ -1839,49 +1955,6 @@ spider_net_workaround_rxramfull(struct spider_net_card *card) SPIDER_NET_CKRCTRL_STOP_VALUE); } -/** - * spider_net_stop - called upon ifconfig down - * @netdev: interface device structure - * - * always returns 0 - */ -int -spider_net_stop(struct net_device *netdev) -{ - struct spider_net_card *card = netdev_priv(netdev); - - tasklet_kill(&card->rxram_full_tl); - netif_poll_disable(netdev); - netif_carrier_off(netdev); - netif_stop_queue(netdev); - del_timer_sync(&card->tx_timer); - - /* disable/mask all interrupts */ - spider_net_write_reg(card, SPIDER_NET_GHIINT0MSK, 0); - spider_net_write_reg(card, SPIDER_NET_GHIINT1MSK, 0); - spider_net_write_reg(card, SPIDER_NET_GHIINT2MSK, 0); - - /* free_irq(netdev->irq, netdev);*/ - free_irq(to_pci_dev(netdev->class_dev.dev)->irq, netdev); - - spider_net_write_reg(card, SPIDER_NET_GDTDMACCNTR, - SPIDER_NET_DMA_TX_FEND_VALUE); - - /* turn off DMA, force end */ - spider_net_disable_rxdmac(card); - - /* release chains */ - if (spin_trylock(&card->tx_chain.lock)) { - spider_net_release_tx_chain(card, 1); - spin_unlock(&card->tx_chain.lock); - } - - spider_net_free_chain(card, &card->tx_chain); - spider_net_free_chain(card, &card->rx_chain); - - return 0; -} - /** * spider_net_tx_timeout_task - task scheduled by the watchdog timeout * function (to be called not under interrupt status) @@ -1910,7 +1983,7 @@ spider_net_tx_timeout_task(void *data) goto out; spider_net_open(netdev); - spider_net_kick_tx_dma(card); + spider_net_kick_tx_dma(card, card->tx_chain.head); netif_device_attach(netdev); out: @@ -1993,6 +2066,7 @@ spider_net_setup_netdev(struct spider_net_card *card) pci_set_drvdata(card->pdev, netdev); + atomic_set(&card->tx_chain_release,0); card->rxram_full_tl.data = (unsigned long) card; card->rxram_full_tl.func = (void (*)(unsigned long)) spider_net_handle_rxram_full; @@ -2004,12 +2078,9 @@ spider_net_setup_netdev(struct spider_net_card *card) card->options.rx_csum = SPIDER_NET_RX_CSUM_DEFAULT; - card->tx_desc = tx_descriptors; - card->rx_desc = rx_descriptors; - spider_net_setup_netdev_ops(netdev); - netdev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX; + netdev->features = NETIF_F_HW_CSUM; /* some time: NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | * NETIF_F_HW_VLAN_FILTER */ diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h index 30407cdf0..3b8d951cf 100644 --- a/drivers/net/spider_net.h +++ b/drivers/net/spider_net.h @@ -208,10 +208,7 @@ extern char spider_net_driver_name[]; #define SPIDER_NET_DMA_RX_VALUE 0x80000000 #define SPIDER_NET_DMA_RX_FEND_VALUE 0x00030003 /* to set TX_DMA_EN */ -#define SPIDER_NET_TX_DMA_EN 0x80000000 -#define SPIDER_NET_GDTDCEIDIS 0x00000002 -#define SPIDER_NET_DMA_TX_VALUE SPIDER_NET_TX_DMA_EN | \ - SPIDER_NET_GDTDCEIDIS +#define SPIDER_NET_DMA_TX_VALUE 0x80000000 #define SPIDER_NET_DMA_TX_FEND_VALUE 0x00030003 /* SPIDER_NET_UA_DESCR_VALUE is OR'ed with the unicast address */ @@ -332,23 +329,55 @@ enum spider_net_int2_status { (~SPIDER_NET_TXINT) & \ (~SPIDER_NET_RXINT) ) -#define SPIDER_NET_GPREXEC 0x80000000 -#define SPIDER_NET_GPRDAT_MASK 0x0000ffff +#define SPIDER_NET_GPREXEC 0x80000000 +#define SPIDER_NET_GPRDAT_MASK 0x0000ffff -#define SPIDER_NET_DMAC_NOINTR_COMPLETE 0x00800000 -#define SPIDER_NET_DMAC_NOCS 0x00040000 -#define SPIDER_NET_DMAC_TCP 0x00020000 -#define SPIDER_NET_DMAC_UDP 0x00030000 -#define SPIDER_NET_TXDCEST 0x08000000 - -#define SPIDER_NET_DESCR_IND_PROC_MASK 0xF0000000 -#define SPIDER_NET_DESCR_COMPLETE 0x00000000 /* used in rx and tx */ -#define SPIDER_NET_DESCR_RESPONSE_ERROR 0x10000000 /* used in rx and tx */ -#define SPIDER_NET_DESCR_PROTECTION_ERROR 0x20000000 /* used in rx and tx */ -#define SPIDER_NET_DESCR_FRAME_END 0x40000000 /* used in rx */ -#define SPIDER_NET_DESCR_FORCE_END 0x50000000 /* used in rx and tx */ -#define SPIDER_NET_DESCR_CARDOWNED 0xA0000000 /* used in rx and tx */ -#define SPIDER_NET_DESCR_NOT_IN_USE 0xF0000000 +/* descriptor bits + * + * 1010 descriptor ready + * 0 descr in middle of chain + * 000 fixed to 0 + * + * 0 no interrupt on completion + * 000 fixed to 0 + * 1 no ipsec processing + * 1 last descriptor for this frame + * 00 no checksum + * 10 tcp checksum + * 11 udp checksum + * + * 00 fixed to 0 + * 0 fixed to 0 + * 0 no interrupt on response errors + * 0 no interrupt on invalid descr + * 0 no interrupt on dma process termination + * 0 no interrupt on descr chain end + * 0 no interrupt on descr complete + * + * 000 fixed to 0 + * 0 response error interrupt status + * 0 invalid descr status + * 0 dma termination status + * 0 descr chain end status + * 0 descr complete status */ +#define SPIDER_NET_DMAC_CMDSTAT_NOCS 0xa00c0000 +#define SPIDER_NET_DMAC_CMDSTAT_TCPCS 0xa00e0000 +#define SPIDER_NET_DMAC_CMDSTAT_UDPCS 0xa00f0000 +#define SPIDER_NET_DESCR_IND_PROC_SHIFT 28 +#define SPIDER_NET_DESCR_IND_PROC_MASKO 0x0fffffff + +/* descr ready, descr is in middle of chain, get interrupt on completion */ +#define SPIDER_NET_DMAC_RX_CARDOWNED 0xa0800000 + +enum spider_net_descr_status { + SPIDER_NET_DESCR_COMPLETE = 0x00, /* used in rx and tx */ + SPIDER_NET_DESCR_RESPONSE_ERROR = 0x01, /* used in rx and tx */ + SPIDER_NET_DESCR_PROTECTION_ERROR = 0x02, /* used in rx and tx */ + SPIDER_NET_DESCR_FRAME_END = 0x04, /* used in rx */ + SPIDER_NET_DESCR_FORCE_END = 0x05, /* used in rx and tx */ + SPIDER_NET_DESCR_CARDOWNED = 0x0a, /* used in rx and tx */ + SPIDER_NET_DESCR_NOT_IN_USE /* any other value */ +}; struct spider_net_descr { /* as defined by the hardware */ @@ -369,7 +398,7 @@ struct spider_net_descr { } __attribute__((aligned(32))); struct spider_net_descr_chain { - spinlock_t lock; + /* we walk from tail to head */ struct spider_net_descr *head; struct spider_net_descr *tail; }; @@ -424,6 +453,8 @@ struct spider_net_card { struct spider_net_descr_chain tx_chain; struct spider_net_descr_chain rx_chain; + atomic_t rx_chain_refill; + atomic_t tx_chain_release; struct net_device_stats netdev_stats; @@ -440,9 +471,6 @@ struct spider_net_card { /* for ethtool */ int msg_enable; - int rx_desc; - int tx_desc; - struct spider_net_descr descr[0]; }; diff --git a/drivers/net/spider_net_ethtool.c b/drivers/net/spider_net_ethtool.c index 02209222b..a5bb0b763 100644 --- a/drivers/net/spider_net_ethtool.c +++ b/drivers/net/spider_net_ethtool.c @@ -130,18 +130,6 @@ spider_net_ethtool_set_tx_csum(struct net_device *netdev, uint32_t data) return 0; } -static void -spider_net_ethtool_get_ringparam(struct net_device *netdev, - struct ethtool_ringparam *ering) -{ - struct spider_net_card *card = netdev->priv; - - ering->tx_max_pending = SPIDER_NET_TX_DESCRIPTORS_MAX; - ering->tx_pending = card->tx_desc; - ering->rx_max_pending = SPIDER_NET_RX_DESCRIPTORS_MAX; - ering->rx_pending = card->rx_desc; -} - struct ethtool_ops spider_net_ethtool_ops = { .get_settings = spider_net_ethtool_get_settings, .get_drvinfo = spider_net_ethtool_get_drvinfo, @@ -153,6 +141,5 @@ struct ethtool_ops spider_net_ethtool_ops = { .set_rx_csum = spider_net_ethtool_set_rx_csum, .get_tx_csum = spider_net_ethtool_get_tx_csum, .set_tx_csum = spider_net_ethtool_set_tx_csum, - .get_ringparam = spider_net_ethtool_get_ringparam, }; diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index c0a62b00f..9b7805be2 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c @@ -22,14 +22,131 @@ Support and updates available at http://www.scyld.com/network/starfire.html - [link no longer provides useful info -jgarzik] + ----------------------------------------------------------- + + Linux kernel-specific changes: + + LK1.1.1 (jgarzik): + - Use PCI driver interface + - Fix MOD_xxx races + - softnet fixups + + LK1.1.2 (jgarzik): + - Merge Becker version 0.15 + + LK1.1.3 (Andrew Morton) + - Timer cleanups + + LK1.1.4 (jgarzik): + - Merge Becker version 1.03 + + LK1.2.1 (Ion Badulescu ) + - Support hardware Rx/Tx checksumming + - Use the GFP firmware taken from Adaptec's Netware driver + + LK1.2.2 (Ion Badulescu) + - Backported to 2.2.x + + LK1.2.3 (Ion Badulescu) + - Fix the flaky mdio interface + - More compat clean-ups + + LK1.2.4 (Ion Badulescu) + - More 2.2.x initialization fixes + + LK1.2.5 (Ion Badulescu) + - Several fixes from Manfred Spraul + + LK1.2.6 (Ion Badulescu) + - Fixed ifup/ifdown/ifup problem in 2.4.x + + LK1.2.7 (Ion Badulescu) + - Removed unused code + - Made more functions static and __init + + LK1.2.8 (Ion Badulescu) + - Quell bogus error messages, inform about the Tx threshold + - Removed #ifdef CONFIG_PCI, this driver is PCI only + + LK1.2.9 (Ion Badulescu) + - Merged Jeff Garzik's changes from 2.4.4-pre5 + - Added 2.2.x compatibility stuff required by the above changes + + LK1.2.9a (Ion Badulescu) + - More updates from Jeff Garzik + + LK1.3.0 (Ion Badulescu) + - Merged zerocopy support + + LK1.3.1 (Ion Badulescu) + - Added ethtool support + - Added GPIO (media change) interrupt support + + LK1.3.2 (Ion Badulescu) + - Fixed 2.2.x compatibility issues introduced in 1.3.1 + - Fixed ethtool ioctl returning uninitialized memory + + LK1.3.3 (Ion Badulescu) + - Initialize the TxMode register properly + - Don't dereference dev->priv after freeing it + + LK1.3.4 (Ion Badulescu) + - Fixed initialization timing problems + - Fixed interrupt mask definitions + + LK1.3.5 (jgarzik) + - ethtool NWAY_RST, GLINK, [GS]MSGLVL support + + LK1.3.6: + - Sparc64 support and fixes (Ion Badulescu) + - Better stats and error handling (Ion Badulescu) + - Use new pci_set_mwi() PCI API function (jgarzik) + + LK1.3.7 (Ion Badulescu) + - minimal implementation of tx_timeout() + - correctly shutdown the Rx/Tx engines in netdev_close() + - added calls to netif_carrier_on/off + (patch from Stefan Rompf ) + - VLAN support + + LK1.3.8 (Ion Badulescu) + - adjust DMA burst size on sparc64 + - 64-bit support + - reworked zerocopy support for 64-bit buffers + - working and usable interrupt mitigation/latency + - reduced Tx interrupt frequency for lower interrupt overhead + + LK1.3.9 (Ion Badulescu) + - bugfix for mcast filter + - enable the right kind of Tx interrupts (TxDMADone, not TxDone) + + LK1.4.0 (Ion Badulescu) + - NAPI support + + LK1.4.1 (Ion Badulescu) + - flush PCI posting buffers after disabling Rx interrupts + - put the chip to a D3 slumber on driver unload + - added config option to enable/disable NAPI + + LK1.4.2 (Ion Badulescu) + - finally added firmware (GPL'ed by Adaptec) + - removed compatibility code for 2.2.x + + LK1.4.2.1 (Ion Badulescu) + - fixed 32/64 bit issues on i386 + CONFIG_HIGHMEM + - added 32-bit padding to outgoing skb's, removed previous workaround + +TODO: - fix forced speed/duplexing code (broken a long time ago, when + somebody converted the driver to use the generic MII code) + - fix VLAN support */ #define DRV_NAME "starfire" -#define DRV_VERSION "2.0" -#define DRV_RELDATE "June 27, 2006" +#define DRV_VERSION "1.03+LK1.4.2.1" +#define DRV_RELDATE "October 3, 2005" +#include #include #include #include @@ -730,6 +847,7 @@ static int __devinit starfire_init_one(struct pci_dev *pdev, goto err_out_free_netdev; } + /* ioremap is borken in Linux-2.2.x/sparc64 */ base = ioremap(ioaddr, io_size); if (!base) { printk(KERN_ERR DRV_NAME " %d: cannot remap %#x @ %#lx, aborting\n", @@ -953,7 +1071,7 @@ static int netdev_open(struct net_device *dev) /* Do we ever need to reset the chip??? */ - retval = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); + retval = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); if (retval) return retval; @@ -1231,7 +1349,8 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) if (skb->ip_summed == CHECKSUM_HW) { - if (skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK)) + skb = skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK); + if (skb == NULL) return NETDEV_TX_OK; } #endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */ diff --git a/drivers/net/stnic.c b/drivers/net/stnic.c index 742283489..b6dfdf8f4 100644 --- a/drivers/net/stnic.c +++ b/drivers/net/stnic.c @@ -7,6 +7,7 @@ * Copyright (C) 1999 kaz Kojima */ +#include #include #include #include diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 2dcadb169..d4c0002b4 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c @@ -55,7 +55,7 @@ static char *version = "sun3lance.c: v1.2 1/12/2001 Sam Creasey (sammy@sammy.ne /* sun3/60 addr/irq for the lance chip. If your sun is different, change this. */ #define LANCE_OBIO 0x120000 -#define LANCE_IRQ IRQ_AUTO_3 +#define LANCE_IRQ IRQ3 /* Debug level: * 0 = silent, print only serious errors @@ -341,7 +341,7 @@ static int __init lance_probe( struct net_device *dev) REGA(CSR0) = CSR0_STOP; - request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev); + request_irq(LANCE_IRQ, lance_interrupt, SA_INTERRUPT, "SUN3 Lance", dev); dev->irq = (unsigned short)LANCE_IRQ; diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index d46891510..cfaf47c63 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c @@ -72,6 +72,8 @@ MODULE_LICENSE("GPL"); #define DIRQ(x) #endif +static struct bigmac *root_bigmac_dev; + #define DEFAULT_JAMSIZE 4 /* Toe jam */ #define QEC_RESET_TRIES 200 @@ -489,7 +491,7 @@ static void bigmac_tcvr_init(struct bigmac *bp) } } -static int bigmac_init_hw(struct bigmac *, int); +static int bigmac_init(struct bigmac *, int); static int try_next_permutation(struct bigmac *bp, void __iomem *tregs) { @@ -549,7 +551,7 @@ static void bigmac_timer(unsigned long data) if (ret == -1) { printk(KERN_ERR "%s: Link down, cable problem?\n", bp->dev->name); - ret = bigmac_init_hw(bp, 0); + ret = bigmac_init(bp, 0); if (ret) { printk(KERN_ERR "%s: Error, cannot re-init the " "BigMAC.\n", bp->dev->name); @@ -619,7 +621,7 @@ static void bigmac_begin_auto_negotiation(struct bigmac *bp) add_timer(&bp->bigmac_timer); } -static int bigmac_init_hw(struct bigmac *bp, int from_irq) +static int bigmac_init(struct bigmac *bp, int from_irq) { void __iomem *gregs = bp->gregs; void __iomem *cregs = bp->creg; @@ -750,7 +752,7 @@ static void bigmac_is_medium_rare(struct bigmac *bp, u32 qec_status, u32 bmac_st } printk(" RESET\n"); - bigmac_init_hw(bp, 1); + bigmac_init(bp, 1); } /* BigMAC transmit complete service routines. */ @@ -918,13 +920,13 @@ static int bigmac_open(struct net_device *dev) struct bigmac *bp = (struct bigmac *) dev->priv; int ret; - ret = request_irq(dev->irq, &bigmac_interrupt, IRQF_SHARED, dev->name, bp); + ret = request_irq(dev->irq, &bigmac_interrupt, SA_SHIRQ, dev->name, bp); if (ret) { printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq); return ret; } init_timer(&bp->bigmac_timer); - ret = bigmac_init_hw(bp, 0); + ret = bigmac_init(bp, 0); if (ret) free_irq(dev->irq, bp); return ret; @@ -948,7 +950,7 @@ static void bigmac_tx_timeout(struct net_device *dev) { struct bigmac *bp = (struct bigmac *) dev->priv; - bigmac_init_hw(bp, 0); + bigmac_init(bp, 0); netif_wake_queue(dev); } @@ -1102,8 +1104,6 @@ static int __init bigmac_ether_init(struct sbus_dev *qec_sdev) bp->qec_sdev = qec_sdev; bp->bigmac_sdev = qec_sdev->child; - SET_NETDEV_DEV(dev, &bp->bigmac_sdev->ofdev.dev); - spin_lock_init(&bp->lock); /* Verify the registers we expect, are actually there. */ @@ -1226,7 +1226,11 @@ static int __init bigmac_ether_init(struct sbus_dev *qec_sdev) goto fail_and_cleanup; } - dev_set_drvdata(&bp->bigmac_sdev->ofdev.dev, bp); + /* Put us into the list of instances attached for later driver + * exit. + */ + bp->next_module = root_bigmac_dev; + root_bigmac_dev = bp; printk(KERN_INFO "%s: BigMAC 100baseT Ethernet ", dev->name); for (i = 0; i < 6; i++) @@ -1262,68 +1266,69 @@ fail_and_cleanup: /* QEC can be the parent of either QuadEthernet or * a BigMAC. We want the latter. */ -static int __devinit bigmac_sbus_probe(struct of_device *dev, const struct of_device_id *match) +static int __init bigmac_match(struct sbus_dev *sdev) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - struct device_node *dp = dev->node; - - if (!strcmp(dp->name, "be")) - sdev = sdev->parent; - - return bigmac_ether_init(sdev); -} - -static int __devexit bigmac_sbus_remove(struct of_device *dev) -{ - struct bigmac *bp = dev_get_drvdata(&dev->dev); - struct net_device *net_dev = bp->dev; - - unregister_netdevice(net_dev); + struct sbus_dev *child = sdev->child; - sbus_iounmap(bp->gregs, GLOB_REG_SIZE); - sbus_iounmap(bp->creg, CREG_REG_SIZE); - sbus_iounmap(bp->bregs, BMAC_REG_SIZE); - sbus_iounmap(bp->tregs, TCVR_REG_SIZE); - sbus_free_consistent(bp->bigmac_sdev, - PAGE_SIZE, - bp->bmac_block, - bp->bblock_dvma); + if (strcmp(sdev->prom_name, "qec") != 0) + return 0; - free_netdev(net_dev); + if (child == NULL) + return 0; - dev_set_drvdata(&dev->dev, NULL); + if (strcmp(child->prom_name, "be") != 0) + return 0; - return 0; + return 1; } -static struct of_device_id bigmac_sbus_match[] = { - { - .name = "qec", - }, - { - .name = "be", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, bigmac_sbus_match); - -static struct of_platform_driver bigmac_sbus_driver = { - .name = "sunbmac", - .match_table = bigmac_sbus_match, - .probe = bigmac_sbus_probe, - .remove = __devexit_p(bigmac_sbus_remove), -}; - -static int __init bigmac_init(void) +static int __init bigmac_probe(void) { - return of_register_driver(&bigmac_sbus_driver, &sbus_bus_type); + struct sbus_bus *sbus; + struct sbus_dev *sdev = NULL; + static int called; + int cards = 0, v; + + root_bigmac_dev = NULL; + + if (called) + return -ENODEV; + called++; + + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if (bigmac_match(sdev)) { + cards++; + if ((v = bigmac_ether_init(sdev))) + return v; + } + } + } + if (!cards) + return -ENODEV; + return 0; } -static void __exit bigmac_exit(void) +static void __exit bigmac_cleanup(void) { - of_unregister_driver(&bigmac_sbus_driver); + while (root_bigmac_dev) { + struct bigmac *bp = root_bigmac_dev; + struct bigmac *bp_nxt = root_bigmac_dev->next_module; + + sbus_iounmap(bp->gregs, GLOB_REG_SIZE); + sbus_iounmap(bp->creg, CREG_REG_SIZE); + sbus_iounmap(bp->bregs, BMAC_REG_SIZE); + sbus_iounmap(bp->tregs, TCVR_REG_SIZE); + sbus_free_consistent(bp->bigmac_sdev, + PAGE_SIZE, + bp->bmac_block, + bp->bblock_dvma); + + unregister_netdev(bp->dev); + free_netdev(bp->dev); + root_bigmac_dev = bp_nxt; + } } -module_init(bigmac_init); -module_exit(bigmac_exit); +module_init(bigmac_probe); +module_exit(bigmac_cleanup); diff --git a/drivers/net/sunbmac.h b/drivers/net/sunbmac.h index b563d3c29..b0dbc5187 100644 --- a/drivers/net/sunbmac.h +++ b/drivers/net/sunbmac.h @@ -332,6 +332,7 @@ struct bigmac { struct sbus_dev *qec_sdev; struct sbus_dev *bigmac_sdev; struct net_device *dev; + struct bigmac *next_module; }; /* We use this to acquire receive skb's that we can DMA directly into. */ diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index 698568e75..406b46c48 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c @@ -16,13 +16,89 @@ Support and updates available at http://www.scyld.com/network/sundance.html - [link no longer provides useful info -jgarzik] + + + Version LK1.01a (jgarzik): + - Replace some MII-related magic numbers with constants + + Version LK1.02 (D-Link): + - Add new board to PCI ID list + - Fix multicast bug + + Version LK1.03 (D-Link): + - New Rx scheme, reduce Rx congestion + - Option to disable flow control + + Version LK1.04 (D-Link): + - Tx timeout recovery + - More support for ethtool. + + Version LK1.04a: + - Remove unused/constant members from struct pci_id_info + (which then allows removal of 'drv_flags' from private struct) + (jgarzik) + - If no phy is found, fail to load that board (jgarzik) + - Always start phy id scan at id 1 to avoid problems (Donald Becker) + - Autodetect where mii_preable_required is needed, + default to not needed. (Donald Becker) + + Version LK1.04b: + - Remove mii_preamble_required module parameter (Donald Becker) + - Add per-interface mii_preamble_required (setting is autodetected) + (Donald Becker) + - Remove unnecessary cast from void pointer (jgarzik) + - Re-align comments in private struct (jgarzik) + + Version LK1.04c (jgarzik): + - Support bitmapped message levels (NETIF_MSG_xxx), and the + two ethtool ioctls that get/set them + - Don't hand-code MII ethtool support, use standard API/lib + + Version LK1.04d: + - Merge from Donald Becker's sundance.c: (Jason Lunz) + * proper support for variably-sized MTUs + * default to PIO, to fix chip bugs + - Add missing unregister_netdev (Jason Lunz) + - Add CONFIG_SUNDANCE_MMIO config option (jgarzik) + - Better rx buf size calculation (Donald Becker) + + Version LK1.05 (D-Link): + - Fix DFE-580TX packet drop issue (for DL10050C) + - Fix reset_tx logic + + Version LK1.06 (D-Link): + - Fix crash while unloading driver + + Versin LK1.06b (D-Link): + - New tx scheme, adaptive tx_coalesce + + Version LK1.07 (D-Link): + - Fix tx bugs in big-endian machines + - Remove unused max_interrupt_work module parameter, the new + NAPI-like rx scheme doesn't need it. + - Remove redundancy get_stats() in intr_handler(), those + I/O access could affect performance in ARM-based system + - Add Linux software VLAN support + + Version LK1.08 (Philippe De Muyter phdm@macqel.be): + - Fix bug of custom mac address + (StationAddr register only accept word write) + + Version LK1.09 (D-Link): + - Fix the flowctrl bug. + - Set Pause bit in MII ANAR if flow control enabled. + + Version LK1.09a (ICPlus): + - Add the delay time in reading the contents of EEPROM + + Version LK1.10 (Philippe De Muyter phdm@macqel.be): + - Make 'unblock interface after Tx underrun' work */ #define DRV_NAME "sundance" -#define DRV_VERSION "1.1" -#define DRV_RELDATE "27-Jun-2006" +#define DRV_VERSION "1.01+LK1.10" +#define DRV_RELDATE "28-Oct-2005" /* The user-configurable values. @@ -107,7 +183,7 @@ static char *media[MAX_UNITS]; #endif /* These identify the driver base version and may not be removed. */ -static char version[] = +static char version[] __devinitdata = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Written by Donald Becker\n" KERN_INFO " http://www.scyld.com/network/sundance.html\n"; @@ -204,15 +280,15 @@ IVc. Errata #define USE_IO_OPS 1 #endif -static const struct pci_device_id sundance_pci_tbl[] = { - { 0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0 }, - { 0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1 }, - { 0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2 }, - { 0x1186, 0x1002, 0x1186, 0x1040, 0, 0, 3 }, - { 0x1186, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, - { 0x13F0, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, - { 0x13F0, 0x0200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 }, - { } +static struct pci_device_id sundance_pci_tbl[] = { + {0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0}, + {0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1}, + {0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2}, + {0x1186, 0x1002, 0x1186, 0x1040, 0, 0, 3}, + {0x1186, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, + {0x13F0, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, + {0x13F0, 0x0200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, + {0,} }; MODULE_DEVICE_TABLE(pci, sundance_pci_tbl); @@ -223,15 +299,15 @@ enum { struct pci_id_info { const char *name; }; -static const struct pci_id_info pci_id_tbl[] __devinitdata = { +static const struct pci_id_info pci_id_tbl[] = { {"D-Link DFE-550TX FAST Ethernet Adapter"}, {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, {"D-Link DFE-580TX 4 port Server Adapter"}, {"D-Link DFE-530TXS FAST Ethernet Adapter"}, {"D-Link DL10050-based FAST Ethernet Adapter"}, - {"Sundance Technology Alta"}, - {"IC Plus Corporation IP100A FAST Ethernet Adapter"}, - { } /* terminate list. */ + {"IC Plus IP100 Fast Ethernet Adapter"}, + {"IC Plus IP100A Fast Ethernet Adapter" }, + {NULL,}, /* 0 terminated list. */ }; /* This driver was written to use PCI memory space, however x86-oriented @@ -792,7 +868,7 @@ static int netdev_open(struct net_device *dev) /* Do we need to reset the chip??? */ - i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); if (i) return i; diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index b70bbd748..38cd30cb7 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -2220,7 +2220,7 @@ static int gem_do_start(struct net_device *dev) spin_unlock_irqrestore(&gp->lock, flags); if (request_irq(gp->pdev->irq, gem_interrupt, - IRQF_SHARED, dev->name, (void *)dev)) { + SA_SHIRQ, dev->name, (void *)dev)) { printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name); spin_lock_irqsave(&gp->lock, flags); @@ -2880,20 +2880,17 @@ static int __devinit gem_get_device_address(struct gem *gp) #if defined(__sparc__) struct pci_dev *pdev = gp->pdev; struct pcidev_cookie *pcp = pdev->sysdata; - int use_idprom = 1; + int node = -1; if (pcp != NULL) { - unsigned char *addr; - int len; - - addr = of_get_property(pcp->prom_node, "local-mac-address", - &len); - if (addr && len == 6) { - use_idprom = 0; - memcpy(dev->dev_addr, addr, 6); - } + node = pcp->prom_node; + if (prom_getproplen(node, "local-mac-address") == 6) + prom_getproperty(node, "local-mac-address", + dev->dev_addr, 6); + else + node = -1; } - if (use_idprom) + if (node == -1) memcpy(dev->dev_addr, idprom->id_ethaddr, 6); #elif defined(CONFIG_PPC_PMAC) unsigned char *addr; diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 278c7cb22..b2ddd5e79 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c @@ -19,6 +19,7 @@ * of darwin, still need to reverse engineer that */ +#include #include @@ -344,9 +345,9 @@ static int bcm5421_enable_fiber(struct mii_phy* phy) static int bcm5461_enable_fiber(struct mii_phy* phy) { - phy_write(phy, MII_NCONFIG, 0xfc0c); - phy_write(phy, MII_BMCR, 0x4140); - phy_write(phy, MII_NCONFIG, 0xfc0b); + phy_write(phy, MII_NCONFIG, 0xfc0c); + phy_write(phy, MII_BMCR, 0x4140); + phy_write(phy, MII_NCONFIG, 0xfc0b); phy_write(phy, MII_BMCR, 0x0140); return 0; diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 3bbf0c80b..9f046cae2 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c @@ -1,9 +1,9 @@ -/* sunhme.c: Sparc HME/BigMac 10/100baseT half/full duplex auto switching, +/* $Id: sunhme.c,v 1.124 2002/01/15 06:25:51 davem Exp $ + * sunhme.c: Sparc HME/BigMac 10/100baseT half/full duplex auto switching, * auto carrier detecting ethernet driver. Also known as the * "Happy Meal Ethernet" found on SunSwift SBUS cards. * - * Copyright (C) 1996, 1998, 1999, 2002, 2003, - 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1996, 1998, 1999, 2002, 2003 David S. Miller (davem@redhat.com) * * Changes : * 2000/11/11 Willy Tarreau @@ -13,6 +13,7 @@ * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 */ +#include #include #include #include @@ -39,13 +40,15 @@ #include #include -#ifdef CONFIG_SPARC +#ifdef __sparc__ #include #include #include #include -#include #include +#ifndef __sparc_v9__ +#include +#endif #endif #include @@ -54,7 +57,7 @@ #ifdef CONFIG_PCI #include -#ifdef CONFIG_SPARC +#ifdef __sparc__ #include #endif #endif @@ -62,9 +65,9 @@ #include "sunhme.h" #define DRV_NAME "sunhme" -#define DRV_VERSION "3.00" -#define DRV_RELDATE "June 23, 2006" -#define DRV_AUTHOR "David S. Miller (davem@davemloft.net)" +#define DRV_VERSION "2.02" +#define DRV_RELDATE "8/24/03" +#define DRV_AUTHOR "David S. Miller (davem@redhat.com)" static char version[] = DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; @@ -80,6 +83,8 @@ static int macaddr[6]; module_param_array(macaddr, int, NULL, 0); MODULE_PARM_DESC(macaddr, "Happy Meal MAC address to set"); +static struct happy_meal *root_happy_dev; + #ifdef CONFIG_SBUS static struct quattro *qfe_sbus_list; #endif @@ -176,6 +181,26 @@ static __inline__ void tx_dump_ring(struct happy_meal *hp) #define DEFAULT_IPG2 4 /* For all modes */ #define DEFAULT_JAMSIZE 4 /* Toe jam */ +#if defined(CONFIG_PCI) && defined(MODULE) +/* This happy_pci_ids is declared __initdata because it is only used + as an advisory to depmod. If this is ported to the new PCI interface + where it could be referenced at any time due to hot plugging, + the __initdata reference should be removed. */ + +static struct pci_device_id happymeal_pci_ids[] = { + { + .vendor = PCI_VENDOR_ID_SUN, + .device = PCI_DEVICE_ID_SUN_HAPPYMEAL, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + }, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE(pci, happymeal_pci_ids); + +#endif + /* NOTE: In the descriptor writes one _must_ write the address * member _first_. The card must not be allowed to see * the updated descriptor flags until the address is @@ -1585,7 +1610,7 @@ static int happy_meal_init(struct happy_meal *hp) HMD(("happy_meal_init: old[%08x] bursts<", hme_read32(hp, gregs + GREG_CFG))); -#ifndef CONFIG_SPARC +#ifndef __sparc__ /* It is always PCI and can handle 64byte bursts. */ hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST64); #else @@ -1622,7 +1647,7 @@ static int happy_meal_init(struct happy_meal *hp) HMD(("XXX>")); hme_write32(hp, gregs + GREG_CFG, 0); } -#endif /* CONFIG_SPARC */ +#endif /* __sparc__ */ /* Turn off interrupts we do not want to hear. */ HMD((", enable global interrupts, ")); @@ -2194,10 +2219,15 @@ static int happy_meal_open(struct net_device *dev) */ if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { if (request_irq(dev->irq, &happy_meal_interrupt, - IRQF_SHARED, dev->name, (void *)dev)) { + SA_SHIRQ, dev->name, (void *)dev)) { HMD(("EAGAIN\n")); +#ifdef __sparc__ + printk(KERN_ERR "happy_meal(SBUS): Can't order irq %s to go.\n", + __irq_itoa(dev->irq)); +#else printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", dev->irq); +#endif return -EAGAIN; } @@ -2522,7 +2552,7 @@ static struct ethtool_ops hme_ethtool_ops = { static int hme_version_printed; #ifdef CONFIG_SBUS -void __devinit quattro_get_ranges(struct quattro *qp) +void __init quattro_get_ranges(struct quattro *qp) { struct sbus_dev *sdev = qp->quattro_dev; int err; @@ -2538,7 +2568,7 @@ void __devinit quattro_get_ranges(struct quattro *qp) qp->nranges = (err / sizeof(struct linux_prom_ranges)); } -static void __devinit quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp) +static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *hp) { struct sbus_dev *sdev = hp->happy_dev; int rng; @@ -2565,12 +2595,16 @@ static void __devinit quattro_apply_ranges(struct quattro *qp, struct happy_meal * * Return NULL on failure. */ -static struct quattro * __devinit quattro_sbus_find(struct sbus_dev *goal_sdev) +static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev) { + struct sbus_bus *sbus; struct sbus_dev *sdev; struct quattro *qp; int i; + if (qfe_sbus_list == NULL) + goto found; + for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { for (i = 0, sdev = qp->quattro_dev; (sdev != NULL) && (i < 4); @@ -2579,7 +2613,17 @@ static struct quattro * __devinit quattro_sbus_find(struct sbus_dev *goal_sdev) return qp; } } + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if (sdev == goal_sdev) + goto found; + } + } + /* Cannot find quattro parent, fail. */ + return NULL; + +found: qp = kmalloc(sizeof(struct quattro), GFP_KERNEL); if (qp != NULL) { int i; @@ -2608,7 +2652,7 @@ static void __init quattro_sbus_register_irqs(void) err = request_irq(sdev->irqs[0], quattro_sbus_interrupt, - IRQF_SHARED, "Quattro", + SA_SHIRQ, "Quattro", qp); if (err != 0) { printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err); @@ -2616,17 +2660,6 @@ static void __init quattro_sbus_register_irqs(void) } } } - -static void quattro_sbus_free_irqs(void) -{ - struct quattro *qp; - - for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { - struct sbus_dev *sdev = qp->quattro_dev; - - free_irq(sdev->irqs[0], qp); - } -} #endif /* CONFIG_SBUS */ #ifdef CONFIG_PCI @@ -2661,9 +2694,8 @@ static struct quattro * __init quattro_pci_find(struct pci_dev *pdev) #endif /* CONFIG_PCI */ #ifdef CONFIG_SBUS -static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe) +static int __init happy_meal_sbus_init(struct sbus_dev *sdev, int is_qfe) { - struct device_node *dp = sdev->ofdev.node; struct quattro *qp = NULL; struct happy_meal *hp; struct net_device *dev; @@ -2686,7 +2718,6 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe if (!dev) goto err_out; SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, &sdev->ofdev.dev); if (hme_version_printed++ == 0) printk(KERN_INFO "%s", version); @@ -2702,16 +2733,13 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe for (i = 0; i < 6; i++) dev->dev_addr[i] = macaddr[i]; macaddr[5]++; + } else if (qfe_slot != -1 && + prom_getproplen(sdev->prom_node, + "local-mac-address") == 6) { + prom_getproperty(sdev->prom_node, "local-mac-address", + dev->dev_addr, 6); } else { - unsigned char *addr; - int len; - - addr = of_get_property(dp, "local-mac-address", &len); - - if (qfe_slot != -1 && addr && len == 6) - memcpy(dev->dev_addr, addr, 6); - else - memcpy(dev->dev_addr, idprom->id_ethaddr, 6); + memcpy(dev->dev_addr, idprom->id_ethaddr, 6); } hp = dev->priv; @@ -2722,8 +2750,9 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe err = -ENODEV; if (sdev->num_registers != 5) { - printk(KERN_ERR "happymeal: Device needs 5 regs, has %d.\n", + printk(KERN_ERR "happymeal: Device does not have 5 regs, it has %d.\n", sdev->num_registers); + printk(KERN_ERR "happymeal: Would you like that for here or to go?\n"); goto err_out_free_netdev; } @@ -2737,39 +2766,39 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe hp->gregs = sbus_ioremap(&sdev->resource[0], 0, GREG_REG_SIZE, "HME Global Regs"); if (!hp->gregs) { - printk(KERN_ERR "happymeal: Cannot map global registers.\n"); + printk(KERN_ERR "happymeal: Cannot map Happy Meal global registers.\n"); goto err_out_free_netdev; } hp->etxregs = sbus_ioremap(&sdev->resource[1], 0, ETX_REG_SIZE, "HME TX Regs"); if (!hp->etxregs) { - printk(KERN_ERR "happymeal: Cannot map MAC TX registers.\n"); + printk(KERN_ERR "happymeal: Cannot map Happy Meal MAC Transmit registers.\n"); goto err_out_iounmap; } hp->erxregs = sbus_ioremap(&sdev->resource[2], 0, ERX_REG_SIZE, "HME RX Regs"); if (!hp->erxregs) { - printk(KERN_ERR "happymeal: Cannot map MAC RX registers.\n"); + printk(KERN_ERR "happymeal: Cannot map Happy Meal MAC Receive registers.\n"); goto err_out_iounmap; } hp->bigmacregs = sbus_ioremap(&sdev->resource[3], 0, BMAC_REG_SIZE, "HME BIGMAC Regs"); if (!hp->bigmacregs) { - printk(KERN_ERR "happymeal: Cannot map BIGMAC registers.\n"); + printk(KERN_ERR "happymeal: Cannot map Happy Meal BIGMAC registers.\n"); goto err_out_iounmap; } hp->tcvregs = sbus_ioremap(&sdev->resource[4], 0, TCVR_REG_SIZE, "HME Tranceiver Regs"); if (!hp->tcvregs) { - printk(KERN_ERR "happymeal: Cannot map TCVR registers.\n"); + printk(KERN_ERR "happymeal: Cannot map Happy Meal Tranceiver registers.\n"); goto err_out_iounmap; } - hp->hm_revision = of_getintprop_default(dp, "hm-rev", 0xff); + hp->hm_revision = prom_getintdefault(sdev->prom_node, "hm-rev", 0xff); if (hp->hm_revision == 0xff) hp->hm_revision = 0xa0; @@ -2783,8 +2812,8 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe hp->happy_flags |= HFLAG_QUATTRO; /* Get the supported DVMA burst sizes from our Happy SBUS. */ - hp->happy_bursts = of_getintprop_default(sdev->bus->ofdev.node, - "burst-sizes", 0x00); + hp->happy_bursts = prom_getintdefault(sdev->bus->prom_node, + "burst-sizes", 0x00); hp->happy_block = sbus_alloc_consistent(hp->happy_dev, PAGE_SIZE, @@ -2847,8 +2876,6 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe goto err_out_free_consistent; } - dev_set_drvdata(&sdev->ofdev.dev, hp); - if (qfe_slot != -1) printk(KERN_INFO "%s: Quattro HME slot %d (SBUS) 10/100baseT Ethernet ", dev->name, qfe_slot); @@ -2861,6 +2888,12 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe dev->dev_addr[i], i == 5 ? ' ' : ':'); printk("\n"); + /* We are home free at this point, link us in to the happy + * device list. + */ + hp->next_module = root_happy_dev; + root_happy_dev = hp; + return 0; err_out_free_consistent: @@ -2890,7 +2923,7 @@ err_out: #endif #ifdef CONFIG_PCI -#ifndef CONFIG_SPARC +#ifndef __sparc__ static int is_quattro_p(struct pci_dev *pdev) { struct pci_dev *busdev = pdev->bus->self; @@ -2978,14 +3011,14 @@ static void get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr) get_random_bytes(&dev_addr[3], 3); return; } -#endif /* !(CONFIG_SPARC) */ +#endif /* !(__sparc__) */ -static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int __init happy_meal_pci_init(struct pci_dev *pdev) { struct quattro *qp = NULL; -#ifdef CONFIG_SPARC +#ifdef __sparc__ struct pcidev_cookie *pcp; + int node; #endif struct happy_meal *hp; struct net_device *dev; @@ -2996,14 +3029,15 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, int err; /* Now make sure pci_dev cookie is there. */ -#ifdef CONFIG_SPARC +#ifdef __sparc__ pcp = pdev->sysdata; - if (pcp == NULL) { + if (pcp == NULL || pcp->prom_node == -1) { printk(KERN_ERR "happymeal(PCI): Some PCI device info missing\n"); return -ENODEV; } + node = pcp->prom_node; - strcpy(prom_name, pcp->prom_node->name); + prom_getstring(node, "name", prom_name, sizeof(prom_name)); #else if (is_quattro_p(pdev)) strcpy(prom_name, "SUNW,qfe"); @@ -3012,11 +3046,6 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, #endif err = -ENODEV; - - if (pci_enable_device(pdev)) - goto err_out; - pci_set_master(pdev); - if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) { qp = quattro_pci_find(pdev); if (qp == NULL) @@ -3079,15 +3108,11 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, dev->dev_addr[i] = macaddr[i]; macaddr[5]++; } else { -#ifdef CONFIG_SPARC - unsigned char *addr; - int len; - +#ifdef __sparc__ if (qfe_slot != -1 && - (addr = of_get_property(pcp->prom_node, - "local-mac-address", &len)) != NULL - && len == 6) { - memcpy(dev->dev_addr, addr, 6); + prom_getproplen(node, "local-mac-address") == 6) { + prom_getproperty(node, "local-mac-address", + dev->dev_addr, 6); } else { memcpy(dev->dev_addr, idprom->id_ethaddr, 6); } @@ -3103,8 +3128,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, hp->bigmacregs = (hpreg_base + 0x6000UL); hp->tcvregs = (hpreg_base + 0x7000UL); -#ifdef CONFIG_SPARC - hp->hm_revision = of_getintprop_default(pcp->prom_node, "hm-rev", 0xff); +#ifdef __sparc__ + hp->hm_revision = prom_getintdefault(node, "hm-rev", 0xff); if (hp->hm_revision == 0xff) { unsigned char prev; @@ -3128,7 +3153,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, /* And of course, indicate this is PCI. */ hp->happy_flags |= HFLAG_PCI; -#ifdef CONFIG_SPARC +#ifdef __sparc__ /* Assume PCI happy meals can handle all burst sizes. */ hp->happy_bursts = DMA_BURSTBITS; #endif @@ -3191,8 +3216,6 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, goto err_out_iounmap; } - dev_set_drvdata(&pdev->dev, hp); - if (!qfe_slot) { struct pci_dev *qpdev = qp->quattro_dev; @@ -3222,6 +3245,12 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, printk("\n"); + /* We are home free at this point, link us in to the happy + * device list. + */ + hp->next_module = root_happy_dev; + root_happy_dev = hp; + return 0; err_out_iounmap: @@ -3239,141 +3268,136 @@ err_out_clear_quattro: err_out: return err; } +#endif -static void __devexit happy_meal_pci_remove(struct pci_dev *pdev) -{ - struct happy_meal *hp = dev_get_drvdata(&pdev->dev); - struct net_device *net_dev = hp->dev; - - unregister_netdev(net_dev); - - pci_free_consistent(hp->happy_dev, - PAGE_SIZE, - hp->happy_block, - hp->hblock_dvma); - iounmap(hp->gregs); - pci_release_regions(hp->happy_dev); - - free_netdev(net_dev); - - dev_set_drvdata(&pdev->dev, NULL); -} - -static struct pci_device_id happymeal_pci_ids[] = { - { PCI_DEVICE(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_HAPPYMEAL) }, - { } /* Terminating entry */ -}; - -MODULE_DEVICE_TABLE(pci, happymeal_pci_ids); - -static struct pci_driver hme_pci_driver = { - .name = "hme", - .id_table = happymeal_pci_ids, - .probe = happy_meal_pci_probe, - .remove = __devexit_p(happy_meal_pci_remove), -}; - -static int __init happy_meal_pci_init(void) -{ - return pci_register_driver(&hme_pci_driver); -} - -static void happy_meal_pci_exit(void) +#ifdef CONFIG_SBUS +static int __init happy_meal_sbus_probe(void) { - pci_unregister_driver(&hme_pci_driver); - - while (qfe_pci_list) { - struct quattro *qfe = qfe_pci_list; - struct quattro *next = qfe->next; - - kfree(qfe); - - qfe_pci_list = next; + struct sbus_bus *sbus; + struct sbus_dev *sdev; + int cards = 0; + char model[128]; + + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + char *name = sdev->prom_name; + + if (!strcmp(name, "SUNW,hme")) { + cards++; + prom_getstring(sdev->prom_node, "model", + model, sizeof(model)); + if (!strcmp(model, "SUNW,sbus-qfe")) + happy_meal_sbus_init(sdev, 1); + else + happy_meal_sbus_init(sdev, 0); + } else if (!strcmp(name, "qfe") || + !strcmp(name, "SUNW,qfe")) { + cards++; + happy_meal_sbus_init(sdev, 1); + } + } } + if (cards != 0) + quattro_sbus_register_irqs(); + return cards; } - #endif -#ifdef CONFIG_SBUS -static int __devinit hme_sbus_probe(struct of_device *dev, const struct of_device_id *match) +#ifdef CONFIG_PCI +static int __init happy_meal_pci_probe(void) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - struct device_node *dp = dev->node; - char *model = of_get_property(dp, "model", NULL); - int is_qfe = (match->data != NULL); - - if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) - is_qfe = 1; + struct pci_dev *pdev = NULL; + int cards = 0; - return happy_meal_sbus_probe_one(sdev, is_qfe); + while ((pdev = pci_find_device(PCI_VENDOR_ID_SUN, + PCI_DEVICE_ID_SUN_HAPPYMEAL, pdev)) != NULL) { + if (pci_enable_device(pdev)) + continue; + pci_set_master(pdev); + cards++; + happy_meal_pci_init(pdev); + } + return cards; } +#endif -static int __devexit hme_sbus_remove(struct of_device *dev) +static int __init happy_meal_probe(void) { - struct happy_meal *hp = dev_get_drvdata(&dev->dev); - struct net_device *net_dev = hp->dev; - - unregister_netdevice(net_dev); + static int called = 0; + int cards; - /* XXX qfe parent interrupt... */ + root_happy_dev = NULL; - sbus_iounmap(hp->gregs, GREG_REG_SIZE); - sbus_iounmap(hp->etxregs, ETX_REG_SIZE); - sbus_iounmap(hp->erxregs, ERX_REG_SIZE); - sbus_iounmap(hp->bigmacregs, BMAC_REG_SIZE); - sbus_iounmap(hp->tcvregs, TCVR_REG_SIZE); - sbus_free_consistent(hp->happy_dev, - PAGE_SIZE, - hp->happy_block, - hp->hblock_dvma); - - free_netdev(net_dev); - - dev_set_drvdata(&dev->dev, NULL); + if (called) + return -ENODEV; + called++; + cards = 0; +#ifdef CONFIG_SBUS + cards += happy_meal_sbus_probe(); +#endif +#ifdef CONFIG_PCI + cards += happy_meal_pci_probe(); +#endif + if (!cards) + return -ENODEV; return 0; } -static struct of_device_id hme_sbus_match[] = { - { - .name = "SUNW,hme", - }, - { - .name = "SUNW,qfe", - .data = (void *) 1, - }, - { - .name = "qfe", - .data = (void *) 1, - }, - {}, -}; -MODULE_DEVICE_TABLE(of, hme_sbus_match); +static void __exit happy_meal_cleanup_module(void) +{ +#ifdef CONFIG_SBUS + struct quattro *last_seen_qfe = NULL; +#endif -static struct of_platform_driver hme_sbus_driver = { - .name = "hme", - .match_table = hme_sbus_match, - .probe = hme_sbus_probe, - .remove = __devexit_p(hme_sbus_remove), -}; + while (root_happy_dev) { + struct happy_meal *hp = root_happy_dev; + struct happy_meal *next = root_happy_dev->next_module; + struct net_device *dev = hp->dev; -static int __init happy_meal_sbus_init(void) -{ - int err; + /* Unregister netdev before unmapping registers as this + * call can end up trying to access those registers. + */ + unregister_netdev(dev); - err = of_register_driver(&hme_sbus_driver, &sbus_bus_type); - if (!err) - quattro_sbus_register_irqs(); +#ifdef CONFIG_SBUS + if (!(hp->happy_flags & HFLAG_PCI)) { + if (hp->happy_flags & HFLAG_QUATTRO) { + if (hp->qfe_parent != last_seen_qfe) { + free_irq(dev->irq, hp->qfe_parent); + last_seen_qfe = hp->qfe_parent; + } + } - return err; -} + sbus_iounmap(hp->gregs, GREG_REG_SIZE); + sbus_iounmap(hp->etxregs, ETX_REG_SIZE); + sbus_iounmap(hp->erxregs, ERX_REG_SIZE); + sbus_iounmap(hp->bigmacregs, BMAC_REG_SIZE); + sbus_iounmap(hp->tcvregs, TCVR_REG_SIZE); + sbus_free_consistent(hp->happy_dev, + PAGE_SIZE, + hp->happy_block, + hp->hblock_dvma); + } +#endif +#ifdef CONFIG_PCI + if ((hp->happy_flags & HFLAG_PCI)) { + pci_free_consistent(hp->happy_dev, + PAGE_SIZE, + hp->happy_block, + hp->hblock_dvma); + iounmap(hp->gregs); + pci_release_regions(hp->happy_dev); + } +#endif + free_netdev(dev); -static void happy_meal_sbus_exit(void) -{ - of_unregister_driver(&hme_sbus_driver); - quattro_sbus_free_irqs(); + root_happy_dev = next; + } + /* Now cleanup the quattro lists. */ +#ifdef CONFIG_SBUS while (qfe_sbus_list) { struct quattro *qfe = qfe_sbus_list; struct quattro *next = qfe->next; @@ -3382,39 +3406,18 @@ static void happy_meal_sbus_exit(void) qfe_sbus_list = next; } -} -#endif - -static int __init happy_meal_probe(void) -{ - int err = 0; - -#ifdef CONFIG_SBUS - err = happy_meal_sbus_init(); #endif #ifdef CONFIG_PCI - if (!err) { - err = happy_meal_pci_init(); -#ifdef CONFIG_SBUS - if (err) - happy_meal_sbus_exit(); -#endif - } -#endif - - return err; -} + while (qfe_pci_list) { + struct quattro *qfe = qfe_pci_list; + struct quattro *next = qfe->next; + kfree(qfe); -static void __exit happy_meal_exit(void) -{ -#ifdef CONFIG_SBUS - happy_meal_sbus_exit(); -#endif -#ifdef CONFIG_PCI - happy_meal_pci_exit(); + qfe_pci_list = next; + } #endif } module_init(happy_meal_probe); -module_exit(happy_meal_exit); +module_exit(happy_meal_cleanup_module); diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h index 90f446db9..34e9f953c 100644 --- a/drivers/net/sunhme.h +++ b/drivers/net/sunhme.h @@ -8,6 +8,7 @@ #ifndef _SUNHME_H #define _SUNHME_H +#include #include /* Happy Meal global registers. */ @@ -460,6 +461,7 @@ struct happy_meal { struct net_device *dev; /* Backpointer */ struct quattro *qfe_parent; /* For Quattro cards */ int qfe_ent; /* Which instance on quattro */ + struct happy_meal *next_module; }; /* Here are the happy flags. */ diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index ec0413609..b7d87d469 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c @@ -71,6 +71,7 @@ static char lancestr[] = "LANCE"; +#include #include #include #include @@ -265,6 +266,7 @@ struct lance_private { char *name; dma_addr_t init_block_dvma; struct net_device *dev; /* Backpointer */ + struct lance_private *next_module; struct sbus_dev *sdev; struct timer_list multicast_timer; }; @@ -296,6 +298,8 @@ int sparc_lance_debug = 2; #define LANCE_ADDR(x) ((long)(x) & ~0xff000000) +static struct lance_private *root_lance_dev; + /* Load the CSR registers */ static void load_csrs(struct lance_private *lp) { @@ -930,9 +934,9 @@ static int lance_open(struct net_device *dev) STOP_LANCE(lp); - if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED, + if (request_irq(dev->irq, &lance_interrupt, SA_SHIRQ, lancestr, (void *) dev)) { - printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq); + printk(KERN_ERR "Lance: Can't get irq %s\n", __irq_itoa(dev->irq)); return -EAGAIN; } @@ -1323,9 +1327,9 @@ static struct ethtool_ops sparc_lance_ethtool_ops = { .get_link = sparc_lance_get_link, }; -static int __init sparc_lance_probe_one(struct sbus_dev *sdev, - struct sbus_dma *ledma, - struct sbus_dev *lebuffer) +static int __init sparc_lance_init(struct sbus_dev *sdev, + struct sbus_dma *ledma, + struct sbus_dev *lebuffer) { static unsigned version_printed; struct net_device *dev; @@ -1469,7 +1473,6 @@ no_link_test: lp->dev = dev; SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, &sdev->ofdev.dev); dev->open = &lance_open; dev->stop = &lance_close; dev->hard_start_xmit = &lance_start_xmit; @@ -1497,7 +1500,8 @@ no_link_test: goto fail; } - dev_set_drvdata(&sdev->ofdev.dev, lp); + lp->next_module = root_lance_dev; + root_lance_dev = lp; printk(KERN_INFO "%s: LANCE ", dev->name); @@ -1532,107 +1536,88 @@ static inline struct sbus_dma *find_ledma(struct sbus_dev *sdev) #include /* Find all the lance cards on the system and initialize them */ -static struct sbus_dev sun4_sdev; -static int __init sparc_lance_init(void) +static int __init sparc_lance_probe(void) { + static struct sbus_dev sdev; + static int called; + + root_lance_dev = NULL; + + if (called) + return -ENODEV; + called++; + if ((idprom->id_machtype == (SM_SUN4|SM_4_330)) || (idprom->id_machtype == (SM_SUN4|SM_4_470))) { - memset(&sun4_sdev, 0, sizeof(struct sbus_dev)); - sun4_sdev.reg_addrs[0].phys_addr = sun4_eth_physaddr; - sun4_sdev.irqs[0] = 6; - return sparc_lance_probe_one(&sun4_sdev, NULL, NULL); + memset(&sdev, 0, sizeof(sdev)); + sdev.reg_addrs[0].phys_addr = sun4_eth_physaddr; + sdev.irqs[0] = 6; + return sparc_lance_init(&sdev, NULL, NULL); } return -ENODEV; } -static int __exit sunlance_sun4_remove(void) -{ - struct lance_private *lp = dev_get_drvdata(&sun4_sdev.ofdev.dev); - struct net_device *net_dev = lp->dev; - - unregister_netdevice(net_dev); - - lance_free_hwresources(lp); - - free_netdev(net_dev); - - dev_set_drvdata(&sun4_sdev.ofdev.dev, NULL); - - return 0; -} - #else /* !CONFIG_SUN4 */ -static int __devinit sunlance_sbus_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - int err; - - if (sdev->parent) { - struct of_device *parent = &sdev->parent->ofdev; - - if (!strcmp(parent->node->name, "ledma")) { - struct sbus_dma *ledma = find_ledma(to_sbus_device(&parent->dev)); - - err = sparc_lance_probe_one(sdev, ledma, NULL); - } else if (!strcmp(parent->node->name, "lebuffer")) { - err = sparc_lance_probe_one(sdev, NULL, to_sbus_device(&parent->dev)); - } else - err = sparc_lance_probe_one(sdev, NULL, NULL); - } else - err = sparc_lance_probe_one(sdev, NULL, NULL); - - return err; -} - -static int __devexit sunlance_sbus_remove(struct of_device *dev) -{ - struct lance_private *lp = dev_get_drvdata(&dev->dev); - struct net_device *net_dev = lp->dev; - - unregister_netdevice(net_dev); - - lance_free_hwresources(lp); - - free_netdev(net_dev); - - dev_set_drvdata(&dev->dev, NULL); - - return 0; -} - -static struct of_device_id sunlance_sbus_match[] = { - { - .name = "le", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, sunlance_sbus_match); - -static struct of_platform_driver sunlance_sbus_driver = { - .name = "sunlance", - .match_table = sunlance_sbus_match, - .probe = sunlance_sbus_probe, - .remove = __devexit_p(sunlance_sbus_remove), -}; - - /* Find all the lance cards on the system and initialize them */ -static int __init sparc_lance_init(void) +static int __init sparc_lance_probe(void) { - return of_register_driver(&sunlance_sbus_driver, &sbus_bus_type); + struct sbus_bus *bus; + struct sbus_dev *sdev = NULL; + struct sbus_dma *ledma = NULL; + static int called; + int cards = 0, v; + + root_lance_dev = NULL; + + if (called) + return -ENODEV; + called++; + + for_each_sbus (bus) { + for_each_sbusdev (sdev, bus) { + if (strcmp(sdev->prom_name, "le") == 0) { + cards++; + if ((v = sparc_lance_init(sdev, NULL, NULL))) + return v; + continue; + } + if (strcmp(sdev->prom_name, "ledma") == 0) { + cards++; + ledma = find_ledma(sdev); + if ((v = sparc_lance_init(sdev->child, + ledma, NULL))) + return v; + continue; + } + if (strcmp(sdev->prom_name, "lebuffer") == 0){ + cards++; + if ((v = sparc_lance_init(sdev->child, + NULL, sdev))) + return v; + continue; + } + } /* for each sbusdev */ + } /* for each sbus */ + if (!cards) + return -ENODEV; + return 0; } #endif /* !CONFIG_SUN4 */ -static void __exit sparc_lance_exit(void) +static void __exit sparc_lance_cleanup(void) { -#ifdef CONFIG_SUN4 - sunlance_sun4_remove(); -#else - of_unregister_driver(&sunlance_sbus_driver); -#endif + struct lance_private *lp; + + while (root_lance_dev) { + lp = root_lance_dev->next_module; + + unregister_netdev(root_lance_dev->dev); + lance_free_hwresources(root_lance_dev); + free_netdev(root_lance_dev->dev); + root_lance_dev = lp; + } } -module_init(sparc_lance_init); -module_exit(sparc_lance_exit); +module_init(sparc_lance_probe); +module_exit(sparc_lance_cleanup); diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 817a40b66..1f2323be6 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c @@ -1,9 +1,10 @@ -/* sunqe.c: Sparc QuadEthernet 10baseT SBUS card driver. +/* $Id: sunqe.c,v 1.55 2002/01/15 06:48:55 davem Exp $ + * sunqe.c: Sparc QuadEthernet 10baseT SBUS card driver. * Once again I am out to prove that every ethernet * controller out there can be most efficiently programmed * if you make it look like a LANCE. * - * Copyright (C) 1996, 1999, 2003, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1996, 1999, 2003 David S. Miller (davem@redhat.com) */ #include @@ -40,9 +41,9 @@ #include "sunqe.h" #define DRV_NAME "sunqe" -#define DRV_VERSION "4.0" -#define DRV_RELDATE "June 23, 2006" -#define DRV_AUTHOR "David S. Miller (davem@davemloft.net)" +#define DRV_VERSION "3.0" +#define DRV_RELDATE "8/24/03" +#define DRV_AUTHOR "David S. Miller (davem@redhat.com)" static char version[] = DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " " DRV_AUTHOR "\n"; @@ -754,269 +755,298 @@ static inline void qec_init_once(struct sunqec *qecp, struct sbus_dev *qsdev) qecp->gregs + GLOB_RSIZE); } -static u8 __init qec_get_burst(struct device_node *dp) +/* Four QE's per QEC card. */ +static int __init qec_ether_init(struct net_device *dev, struct sbus_dev *sdev) { + static unsigned version_printed; + struct net_device *qe_devs[4]; + struct sunqe *qeps[4]; + struct sbus_dev *qesdevs[4]; + struct sbus_dev *child; + struct sunqec *qecp = NULL; u8 bsizes, bsizes_more; + int i, j, res = -ENOMEM; - /* Find and set the burst sizes for the QEC, since it - * does the actual dma for all 4 channels. - */ - bsizes = of_getintprop_default(dp, "burst-sizes", 0xff); - bsizes &= 0xff; - bsizes_more = of_getintprop_default(dp->parent, "burst-sizes", 0xff); + for (i = 0; i < 4; i++) { + qe_devs[i] = alloc_etherdev(sizeof(struct sunqe)); + if (!qe_devs[i]) + goto out; + } - if (bsizes_more != 0xff) - bsizes &= bsizes_more; - if (bsizes == 0xff || (bsizes & DMA_BURST16) == 0 || - (bsizes & DMA_BURST32)==0) - bsizes = (DMA_BURST32 - 1); + if (version_printed++ == 0) + printk(KERN_INFO "%s", version); - return bsizes; -} + for (i = 0; i < 4; i++) { + qeps[i] = (struct sunqe *) qe_devs[i]->priv; + for (j = 0; j < 6; j++) + qe_devs[i]->dev_addr[j] = idprom->id_ethaddr[j]; + qeps[i]->channel = i; + spin_lock_init(&qeps[i]->lock); + } -static struct sunqec * __init get_qec(struct sbus_dev *child_sdev) -{ - struct sbus_dev *qec_sdev = child_sdev->parent; - struct sunqec *qecp; + qecp = kmalloc(sizeof(struct sunqec), GFP_KERNEL); + if (qecp == NULL) + goto out1; + qecp->qec_sdev = sdev; - for (qecp = root_qec_dev; qecp; qecp = qecp->next_module) { - if (qecp->qec_sdev == qec_sdev) - break; + for (i = 0; i < 4; i++) { + qecp->qes[i] = qeps[i]; + qeps[i]->dev = qe_devs[i]; + qeps[i]->parent = qecp; } - if (!qecp) { - qecp = kzalloc(sizeof(struct sunqec), GFP_KERNEL); - if (qecp) { - u32 ctrl; - - qecp->qec_sdev = qec_sdev; - qecp->gregs = sbus_ioremap(&qec_sdev->resource[0], 0, - GLOB_REG_SIZE, - "QEC Global Registers"); - if (!qecp->gregs) - goto fail; - - /* Make sure the QEC is in MACE mode. */ - ctrl = sbus_readl(qecp->gregs + GLOB_CTRL); - ctrl &= 0xf0000000; - if (ctrl != GLOB_CTRL_MMODE) { - printk(KERN_ERR "qec: Not in MACE mode!\n"); - goto fail; - } - if (qec_global_reset(qecp->gregs)) - goto fail; + res = -ENODEV; - qecp->qec_bursts = qec_get_burst(qec_sdev->ofdev.node); + for (i = 0, child = sdev->child; i < 4; i++, child = child->next) { + /* Link in channel */ + j = prom_getintdefault(child->prom_node, "channel#", -1); + if (j == -1) + goto out2; + qesdevs[j] = child; + } - qec_init_once(qecp, qec_sdev); + for (i = 0; i < 4; i++) + qeps[i]->qe_sdev = qesdevs[i]; - if (request_irq(qec_sdev->irqs[0], &qec_interrupt, - IRQF_SHARED, "qec", (void *) qecp)) { - printk(KERN_ERR "qec: Can't register irq.\n"); - goto fail; - } + /* Now map in the registers, QEC globals first. */ + qecp->gregs = sbus_ioremap(&sdev->resource[0], 0, + GLOB_REG_SIZE, "QEC Global Registers"); + if (!qecp->gregs) { + printk(KERN_ERR "QuadEther: Cannot map QEC global registers.\n"); + goto out2; + } - qecp->next_module = root_qec_dev; - root_qec_dev = qecp; - } + /* Make sure the QEC is in MACE mode. */ + if ((sbus_readl(qecp->gregs + GLOB_CTRL) & 0xf0000000) != GLOB_CTRL_MMODE) { + printk(KERN_ERR "QuadEther: AIEEE, QEC is not in MACE mode!\n"); + goto out3; } - return qecp; + /* Reset the QEC. */ + if (qec_global_reset(qecp->gregs)) + goto out3; -fail: - if (qecp->gregs) - sbus_iounmap(qecp->gregs, GLOB_REG_SIZE); - kfree(qecp); - return NULL; -} + /* Find and set the burst sizes for the QEC, since it does + * the actual dma for all 4 channels. + */ + bsizes = prom_getintdefault(sdev->prom_node, "burst-sizes", 0xff); + bsizes &= 0xff; + bsizes_more = prom_getintdefault(sdev->bus->prom_node, "burst-sizes", 0xff); -static int __init qec_ether_init(struct sbus_dev *sdev) -{ - static unsigned version_printed; - struct net_device *dev; - struct sunqe *qe; - struct sunqec *qecp; - int i, res; + if (bsizes_more != 0xff) + bsizes &= bsizes_more; + if (bsizes == 0xff || (bsizes & DMA_BURST16) == 0 || + (bsizes & DMA_BURST32)==0) + bsizes = (DMA_BURST32 - 1); - if (version_printed++ == 0) - printk(KERN_INFO "%s", version); + qecp->qec_bursts = bsizes; - dev = alloc_etherdev(sizeof(struct sunqe)); - if (!dev) - return -ENOMEM; + /* Perform one time QEC initialization, we never touch the QEC + * globals again after this. + */ + qec_init_once(qecp, sdev); + + for (i = 0; i < 4; i++) { + struct sunqe *qe = qeps[i]; + /* Map in QEC per-channel control registers. */ + qe->qcregs = sbus_ioremap(&qe->qe_sdev->resource[0], 0, + CREG_REG_SIZE, "QEC Channel Registers"); + if (!qe->qcregs) { + printk(KERN_ERR "QuadEther: Cannot map QE %d's channel registers.\n", i); + goto out4; + } - qe = netdev_priv(dev); + /* Map in per-channel AMD MACE registers. */ + qe->mregs = sbus_ioremap(&qe->qe_sdev->resource[1], 0, + MREGS_REG_SIZE, "QE MACE Registers"); + if (!qe->mregs) { + printk(KERN_ERR "QuadEther: Cannot map QE %d's MACE registers.\n", i); + goto out4; + } - i = of_getintprop_default(sdev->ofdev.node, "channel#", -1); - if (i == -1) { - struct sbus_dev *td = sdev->parent->child; - i = 0; - while (td != sdev) { - td = td->next; - i++; + qe->qe_block = sbus_alloc_consistent(qe->qe_sdev, + PAGE_SIZE, + &qe->qblock_dvma); + qe->buffers = sbus_alloc_consistent(qe->qe_sdev, + sizeof(struct sunqe_buffers), + &qe->buffers_dvma); + if (qe->qe_block == NULL || qe->qblock_dvma == 0 || + qe->buffers == NULL || qe->buffers_dvma == 0) { + goto out4; } + + /* Stop this QE. */ + qe_stop(qe); } - qe->channel = i; - spin_lock_init(&qe->lock); - - res = -ENODEV; - qecp = get_qec(sdev); - if (!qecp) - goto fail; - qecp->qes[qe->channel] = qe; - qe->dev = dev; - qe->parent = qecp; - qe->qe_sdev = sdev; + for (i = 0; i < 4; i++) { + SET_MODULE_OWNER(qe_devs[i]); + qe_devs[i]->open = qe_open; + qe_devs[i]->stop = qe_close; + qe_devs[i]->hard_start_xmit = qe_start_xmit; + qe_devs[i]->get_stats = qe_get_stats; + qe_devs[i]->set_multicast_list = qe_set_multicast; + qe_devs[i]->tx_timeout = qe_tx_timeout; + qe_devs[i]->watchdog_timeo = 5*HZ; + qe_devs[i]->irq = sdev->irqs[0]; + qe_devs[i]->dma = 0; + qe_devs[i]->ethtool_ops = &qe_ethtool_ops; + } - res = -ENOMEM; - qe->qcregs = sbus_ioremap(&qe->qe_sdev->resource[0], 0, - CREG_REG_SIZE, "QEC Channel Registers"); - if (!qe->qcregs) { - printk(KERN_ERR "qe: Cannot map channel registers.\n"); - goto fail; + /* QEC receives interrupts from each QE, then it sends the actual + * IRQ to the cpu itself. Since QEC is the single point of + * interrupt for all QE channels we register the IRQ handler + * for it now. + */ + if (request_irq(sdev->irqs[0], &qec_interrupt, + SA_SHIRQ, "QuadEther", (void *) qecp)) { + printk(KERN_ERR "QuadEther: Can't register QEC master irq handler.\n"); + res = -EAGAIN; + goto out4; } - qe->mregs = sbus_ioremap(&qe->qe_sdev->resource[1], 0, - MREGS_REG_SIZE, "QE MACE Registers"); - if (!qe->mregs) { - printk(KERN_ERR "qe: Cannot map MACE registers.\n"); - goto fail; + for (i = 0; i < 4; i++) { + if (register_netdev(qe_devs[i]) != 0) + goto out5; } - qe->qe_block = sbus_alloc_consistent(qe->qe_sdev, - PAGE_SIZE, - &qe->qblock_dvma); - qe->buffers = sbus_alloc_consistent(qe->qe_sdev, - sizeof(struct sunqe_buffers), - &qe->buffers_dvma); - if (qe->qe_block == NULL || qe->qblock_dvma == 0 || - qe->buffers == NULL || qe->buffers_dvma == 0) - goto fail; - - /* Stop this QE. */ - qe_stop(qe); - - SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, &sdev->ofdev.dev); - - dev->open = qe_open; - dev->stop = qe_close; - dev->hard_start_xmit = qe_start_xmit; - dev->get_stats = qe_get_stats; - dev->set_multicast_list = qe_set_multicast; - dev->tx_timeout = qe_tx_timeout; - dev->watchdog_timeo = 5*HZ; - dev->irq = sdev->irqs[0]; - dev->dma = 0; - dev->ethtool_ops = &qe_ethtool_ops; - - res = register_netdev(dev); - if (res) - goto fail; - - dev_set_drvdata(&sdev->ofdev.dev, qe); - - printk(KERN_INFO "%s: qe channel[%d] ", dev->name, qe->channel); - for (i = 0; i < 6; i++) - printk ("%2.2x%c", - dev->dev_addr[i], - i == 5 ? ' ': ':'); - printk("\n"); + /* Report the QE channels. */ + for (i = 0; i < 4; i++) { + printk(KERN_INFO "%s: QuadEthernet channel[%d] ", qe_devs[i]->name, i); + for (j = 0; j < 6; j++) + printk ("%2.2x%c", + qe_devs[i]->dev_addr[j], + j == 5 ? ' ': ':'); + printk("\n"); + } + /* We are home free at this point, link the qe's into + * the master list for later driver exit. + */ + qecp->next_module = root_qec_dev; + root_qec_dev = qecp; return 0; -fail: - if (qe->qcregs) - sbus_iounmap(qe->qcregs, CREG_REG_SIZE); - if (qe->mregs) - sbus_iounmap(qe->mregs, MREGS_REG_SIZE); - if (qe->qe_block) - sbus_free_consistent(qe->qe_sdev, - PAGE_SIZE, - qe->qe_block, - qe->qblock_dvma); - if (qe->buffers) - sbus_free_consistent(qe->qe_sdev, - sizeof(struct sunqe_buffers), - qe->buffers, - qe->buffers_dvma); - - free_netdev(dev); - +out5: + while (i--) + unregister_netdev(qe_devs[i]); + free_irq(sdev->irqs[0], (void *)qecp); +out4: + for (i = 0; i < 4; i++) { + struct sunqe *qe = (struct sunqe *)qe_devs[i]->priv; + + if (qe->qcregs) + sbus_iounmap(qe->qcregs, CREG_REG_SIZE); + if (qe->mregs) + sbus_iounmap(qe->mregs, MREGS_REG_SIZE); + if (qe->qe_block) + sbus_free_consistent(qe->qe_sdev, + PAGE_SIZE, + qe->qe_block, + qe->qblock_dvma); + if (qe->buffers) + sbus_free_consistent(qe->qe_sdev, + sizeof(struct sunqe_buffers), + qe->buffers, + qe->buffers_dvma); + } +out3: + sbus_iounmap(qecp->gregs, GLOB_REG_SIZE); +out2: + kfree(qecp); +out1: + i = 4; +out: + while (i--) + free_netdev(qe_devs[i]); return res; } -static int __devinit qec_sbus_probe(struct of_device *dev, const struct of_device_id *match) +static int __init qec_match(struct sbus_dev *sdev) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - - return qec_ether_init(sdev); -} - -static int __devexit qec_sbus_remove(struct of_device *dev) -{ - struct sunqe *qp = dev_get_drvdata(&dev->dev); - struct net_device *net_dev = qp->dev; - - unregister_netdevice(net_dev); - - sbus_iounmap(qp->qcregs, CREG_REG_SIZE); - sbus_iounmap(qp->mregs, MREGS_REG_SIZE); - sbus_free_consistent(qp->qe_sdev, - PAGE_SIZE, - qp->qe_block, - qp->qblock_dvma); - sbus_free_consistent(qp->qe_sdev, - sizeof(struct sunqe_buffers), - qp->buffers, - qp->buffers_dvma); - - free_netdev(net_dev); + struct sbus_dev *sibling; + int i; - dev_set_drvdata(&dev->dev, NULL); + if (strcmp(sdev->prom_name, "qec") != 0) + return 0; - return 0; + /* QEC can be parent of either QuadEthernet or BigMAC + * children. Do not confuse this with qfe/SUNW,qfe + * which is a quad-happymeal card and handled by + * a different driver. + */ + sibling = sdev->child; + for (i = 0; i < 4; i++) { + if (sibling == NULL) + return 0; + if (strcmp(sibling->prom_name, "qe") != 0) + return 0; + sibling = sibling->next; + } + return 1; } -static struct of_device_id qec_sbus_match[] = { - { - .name = "qe", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, qec_sbus_match); - -static struct of_platform_driver qec_sbus_driver = { - .name = "qec", - .match_table = qec_sbus_match, - .probe = qec_sbus_probe, - .remove = __devexit_p(qec_sbus_remove), -}; - -static int __init qec_init(void) +static int __init qec_probe(void) { - return of_register_driver(&qec_sbus_driver, &sbus_bus_type); + struct net_device *dev = NULL; + struct sbus_bus *bus; + struct sbus_dev *sdev = NULL; + static int called; + int cards = 0, v; + + root_qec_dev = NULL; + + if (called) + return -ENODEV; + called++; + + for_each_sbus(bus) { + for_each_sbusdev(sdev, bus) { + if (cards) + dev = NULL; + + if (qec_match(sdev)) { + cards++; + if ((v = qec_ether_init(dev, sdev))) + return v; + } + } + } + if (!cards) + return -ENODEV; + return 0; } -static void __exit qec_exit(void) +static void __exit qec_cleanup(void) { - of_unregister_driver(&qec_sbus_driver); + struct sunqec *next_qec; + int i; while (root_qec_dev) { - struct sunqec *next = root_qec_dev->next_module; - - free_irq(root_qec_dev->qec_sdev->irqs[0], - (void *) root_qec_dev); + next_qec = root_qec_dev->next_module; + + /* Release all four QE channels, then the QEC itself. */ + for (i = 0; i < 4; i++) { + unregister_netdev(root_qec_dev->qes[i]->dev); + sbus_iounmap(root_qec_dev->qes[i]->qcregs, CREG_REG_SIZE); + sbus_iounmap(root_qec_dev->qes[i]->mregs, MREGS_REG_SIZE); + sbus_free_consistent(root_qec_dev->qes[i]->qe_sdev, + PAGE_SIZE, + root_qec_dev->qes[i]->qe_block, + root_qec_dev->qes[i]->qblock_dvma); + sbus_free_consistent(root_qec_dev->qes[i]->qe_sdev, + sizeof(struct sunqe_buffers), + root_qec_dev->qes[i]->buffers, + root_qec_dev->qes[i]->buffers_dvma); + free_netdev(root_qec_dev->qes[i]->dev); + } + free_irq(root_qec_dev->qec_sdev->irqs[0], (void *)root_qec_dev); sbus_iounmap(root_qec_dev->gregs, GLOB_REG_SIZE); - kfree(root_qec_dev); - - root_qec_dev = next; + root_qec_dev = next_qec; } } -module_init(qec_init); -module_exit(qec_exit); +module_init(qec_probe); +module_exit(qec_cleanup); diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 8b53ded66..c2ec9fd8c 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c @@ -880,7 +880,7 @@ tc35815_open(struct net_device *dev) */ if (dev->irq == 0 || - request_irq(dev->irq, &tc35815_interrupt, IRQF_SHARED, cardname, dev)) { + request_irq(dev->irq, &tc35815_interrupt, SA_SHIRQ, cardname, dev)) { return -EAGAIN; } diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index fa620aeb7..09a6b8e6d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -15,6 +15,7 @@ * notice is accompanying it. */ +#include #include #include @@ -68,8 +69,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.65" -#define DRV_MODULE_RELDATE "August 07, 2006" +#define DRV_MODULE_VERSION "3.59.1" +#define DRV_MODULE_RELDATE "August 25, 2006" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -123,6 +124,9 @@ TG3_RX_RCB_RING_SIZE(tp)) #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ TG3_TX_RING_SIZE) +#define TX_BUFFS_AVAIL(TP) \ + ((TP)->tx_pending - \ + (((TP)->tx_prod - (TP)->tx_cons) & (TG3_TX_RING_SIZE - 1))) #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) @@ -225,8 +229,6 @@ 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_5755M, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, - { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5786, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5787M, @@ -2963,34 +2965,6 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset) return err; } -/* This is called whenever we suspect that the system chipset is re- - * ordering the sequence of MMIO to the tx send mailbox. The symptom - * is bogus tx completions. We try to recover by setting the - * TG3_FLAG_MBOX_WRITE_REORDER flag and resetting the chip later - * in the workqueue. - */ -static void tg3_tx_recover(struct tg3 *tp) -{ - BUG_ON((tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) || - tp->write32_tx_mbox == tg3_write_indirect_mbox); - - printk(KERN_WARNING PFX "%s: The system may be re-ordering memory-" - "mapped I/O cycles to the network device, attempting to " - "recover. Please report the problem to the driver maintainer " - "and include system chipset information.\n", tp->dev->name); - - spin_lock(&tp->lock); - tp->tg3_flags |= TG3_FLAG_TX_RECOVERY_PENDING; - spin_unlock(&tp->lock); -} - -static inline u32 tg3_tx_avail(struct tg3 *tp) -{ - smp_mb(); - return (tp->tx_pending - - ((tp->tx_prod - tp->tx_cons) & (TG3_TX_RING_SIZE - 1))); -} - /* Tigon3 never reports partial packet sends. So we do not * need special logic to handle SKBs that have not had all * of their frags sent yet, like SunGEM does. @@ -3003,13 +2977,9 @@ static void tg3_tx(struct tg3 *tp) while (sw_idx != hw_idx) { struct tx_ring_info *ri = &tp->tx_buffers[sw_idx]; struct sk_buff *skb = ri->skb; - int i, tx_bug = 0; - - if (unlikely(skb == NULL)) { - tg3_tx_recover(tp); - return; - } + int i; + BUG_ON(skb == NULL); pci_unmap_single(tp->pdev, pci_unmap_addr(ri, mapping), skb_headlen(skb), @@ -3020,9 +2990,10 @@ static void tg3_tx(struct tg3 *tp) sw_idx = NEXT_TX(sw_idx); for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + BUG_ON(sw_idx == hw_idx); + ri = &tp->tx_buffers[sw_idx]; - if (unlikely(ri->skb != NULL || sw_idx == hw_idx)) - tx_bug = 1; + BUG_ON(ri->skb != NULL); pci_unmap_page(tp->pdev, pci_unmap_addr(ri, mapping), @@ -3033,29 +3004,16 @@ static void tg3_tx(struct tg3 *tp) } dev_kfree_skb(skb); - - if (unlikely(tx_bug)) { - tg3_tx_recover(tp); - return; - } } tp->tx_cons = sw_idx; - /* Need to make the tx_cons update visible to tg3_start_xmit() - * before checking for netif_queue_stopped(). Without the - * memory barrier, there is a small possibility that tg3_start_xmit() - * will miss it and cause the queue to be stopped forever. - */ - smp_mb(); - - if (unlikely(netif_queue_stopped(tp->dev) && - (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH))) { - netif_tx_lock(tp->dev); + if (unlikely(netif_queue_stopped(tp->dev))) { + spin_lock(&tp->tx_lock); if (netif_queue_stopped(tp->dev) && - (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH)) + (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) netif_wake_queue(tp->dev); - netif_tx_unlock(tp->dev); + spin_unlock(&tp->tx_lock); } } @@ -3109,10 +3067,11 @@ static int tg3_alloc_rx_skb(struct tg3 *tp, u32 opaque_key, * Callers depend upon this behavior and assume that * we leave everything unchanged if we fail. */ - skb = netdev_alloc_skb(tp->dev, skb_size); + skb = dev_alloc_skb(skb_size); if (skb == NULL) return -ENOMEM; + skb->dev = tp->dev; skb_reserve(skb, tp->rx_offset); mapping = pci_map_single(tp->pdev, skb->data, @@ -3205,7 +3164,7 @@ static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag) */ static int tg3_rx(struct tg3 *tp, int budget) { - u32 work_mask, rx_std_posted = 0; + u32 work_mask; u32 sw_idx = tp->rx_rcb_ptr; u16 hw_idx; int received; @@ -3232,7 +3191,6 @@ static int tg3_rx(struct tg3 *tp, int budget) mapping); skb = tp->rx_std_buffers[desc_idx].skb; post_ptr = &tp->rx_std_ptr; - rx_std_posted++; } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) { dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx], mapping); @@ -3281,10 +3239,11 @@ static int tg3_rx(struct tg3 *tp, int budget) tg3_recycle_rx(tp, opaque_key, desc_idx, *post_ptr); - copy_skb = netdev_alloc_skb(tp->dev, len + 2); + copy_skb = dev_alloc_skb(len + 2); if (copy_skb == NULL) goto drop_it_no_recycle; + copy_skb->dev = tp->dev; skb_reserve(copy_skb, 2); skb_put(copy_skb, len); pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); @@ -3319,15 +3278,6 @@ static int tg3_rx(struct tg3 *tp, int budget) next_pkt: (*post_ptr)++; - - if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { - u32 idx = *post_ptr % TG3_RX_RING_SIZE; - - tw32_rx_mbox(MAILBOX_RCV_STD_PROD_IDX + - TG3_64BIT_REG_LOW, idx); - work_mask &= ~RXD_OPAQUE_RING_STD; - rx_std_posted = 0; - } next_pkt_nopost: sw_idx++; sw_idx %= TG3_RX_RCB_RING_SIZE(tp); @@ -3381,11 +3331,6 @@ static int tg3_poll(struct net_device *netdev, int *budget) /* run TX completion thread */ if (sblk->idx[0].tx_consumer != tp->tx_cons) { tg3_tx(tp); - if (unlikely(tp->tg3_flags & TG3_FLAG_TX_RECOVERY_PENDING)) { - netif_rx_complete(netdev); - schedule_work(&tp->reset_task); - return 0; - } } /* run RX thread, within the bounds set by NAPI. @@ -3446,10 +3391,12 @@ static inline void tg3_full_lock(struct tg3 *tp, int irq_sync) if (irq_sync) tg3_irq_quiesce(tp); spin_lock_bh(&tp->lock); + spin_lock(&tp->tx_lock); } static inline void tg3_full_unlock(struct tg3 *tp) { + spin_unlock(&tp->tx_lock); spin_unlock_bh(&tp->lock); } @@ -3600,28 +3547,6 @@ static irqreturn_t tg3_test_isr(int irq, void *dev_id, static int tg3_init_hw(struct tg3 *, int); static int tg3_halt(struct tg3 *, int, int); -/* Restart hardware after configuration changes, self-test, etc. - * Invoked with tp->lock held. - */ -static int tg3_restart_hw(struct tg3 *tp, int reset_phy) -{ - int err; - - err = tg3_init_hw(tp, reset_phy); - if (err) { - printk(KERN_ERR PFX "%s: Failed to re-initialize device, " - "aborting.\n", tp->dev->name); - tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - tg3_full_unlock(tp); - del_timer_sync(&tp->timer); - tp->irq_sync = 0; - netif_poll_enable(tp->dev); - dev_close(tp->dev); - tg3_full_lock(tp, 0); - } - return err; -} - #ifdef CONFIG_NET_POLL_CONTROLLER static void tg3_poll_controller(struct net_device *dev) { @@ -3654,23 +3579,14 @@ static void tg3_reset_task(void *_data) restart_timer = tp->tg3_flags2 & TG3_FLG2_RESTART_TIMER; tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER; - if (tp->tg3_flags & TG3_FLAG_TX_RECOVERY_PENDING) { - tp->write32_tx_mbox = tg3_write32_tx_mbox; - tp->write32_rx_mbox = tg3_write_flush_reg32; - tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER; - tp->tg3_flags &= ~TG3_FLAG_TX_RECOVERY_PENDING; - } - tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); - if (tg3_init_hw(tp, 1)) - goto out; + tg3_init_hw(tp, 1); tg3_netif_start(tp); if (restart_timer) mod_timer(&tp->timer, jiffies + 1); -out: tp->tg3_flags &= ~TG3_FLAG_IN_RESET_TASK; tg3_full_unlock(tp); @@ -3802,12 +3718,15 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) len = skb_headlen(skb); - /* We are running in BH disabled context with netif_tx_lock - * and TX reclaim runs via tp->poll inside of a software + /* No BH disabling for tx_lock here. We are running in BH disabled + * context and TX reclaim runs via tp->poll inside of a software * interrupt. Furthermore, IRQ processing runs lockless so we have * no IRQ context deadlocks to worry about either. Rejoice! */ - if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { + if (!spin_trylock(&tp->tx_lock)) + return NETDEV_TX_LOCKED; + + if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { if (!netif_queue_stopped(dev)) { netif_stop_queue(dev); @@ -3815,6 +3734,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) printk(KERN_ERR PFX "%s: BUG! Tx Ring full when " "queue awake!\n", dev->name); } + spin_unlock(&tp->tx_lock); return NETDEV_TX_BUSY; } @@ -3832,24 +3752,18 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) goto out_unlock; } - if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) - mss |= (skb_headlen(skb) - ETH_HLEN) << 9; - else { - tcp_opt_len = ((skb->h.th->doff - 5) * 4); - ip_tcp_len = (skb->nh.iph->ihl * 4) + - sizeof(struct tcphdr); - - skb->nh.iph->check = 0; - skb->nh.iph->tot_len = htons(mss + ip_tcp_len + - tcp_opt_len); - mss |= (ip_tcp_len + tcp_opt_len) << 9; - } + tcp_opt_len = ((skb->h.th->doff - 5) * 4); + ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); base_flags |= (TXD_FLAG_CPU_PRE_DMA | TXD_FLAG_CPU_POST_DMA); + skb->nh.iph->check = 0; + skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); + skb->h.th->check = 0; + mss |= (ip_tcp_len + tcp_opt_len) << 9; } else if (skb->ip_summed == CHECKSUM_HW) base_flags |= TXD_FLAG_TCPUDP_CSUM; @@ -3903,54 +3817,21 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); tp->tx_prod = entry; - if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { + if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) { netif_stop_queue(dev); - if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) + if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) netif_wake_queue(tp->dev); } out_unlock: mmiowb(); + spin_unlock(&tp->tx_lock); dev->trans_start = jiffies; return NETDEV_TX_OK; } -#if TG3_TSO_SUPPORT != 0 -static int tg3_start_xmit_dma_bug(struct sk_buff *, struct net_device *); - -/* Use GSO to workaround a rare TSO bug that may be triggered when the - * TSO header is greater than 80 bytes. - */ -static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb) -{ - struct sk_buff *segs, *nskb; - - /* Estimate the number of fragments in the worst case */ - if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->gso_segs * 3))) { - netif_stop_queue(tp->dev); - return NETDEV_TX_BUSY; - } - - segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO); - if (unlikely(IS_ERR(segs))) - goto tg3_tso_bug_end; - - do { - nskb = segs; - segs = segs->next; - nskb->next = NULL; - tg3_start_xmit_dma_bug(nskb, tp->dev); - } while (segs); - -tg3_tso_bug_end: - dev_kfree_skb(skb); - - return NETDEV_TX_OK; -} -#endif - /* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and * support TG3_FLG2_HW_TSO_1 or firmware TSO only. */ @@ -3963,12 +3844,15 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) len = skb_headlen(skb); - /* We are running in BH disabled context with netif_tx_lock - * and TX reclaim runs via tp->poll inside of a software + /* No BH disabling for tx_lock here. We are running in BH disabled + * context and TX reclaim runs via tp->poll inside of a software * interrupt. Furthermore, IRQ processing runs lockless so we have * no IRQ context deadlocks to worry about either. Rejoice! */ - if (unlikely(tg3_tx_avail(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { + if (!spin_trylock(&tp->tx_lock)) + return NETDEV_TX_LOCKED; + + if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { if (!netif_queue_stopped(dev)) { netif_stop_queue(dev); @@ -3976,6 +3860,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) printk(KERN_ERR PFX "%s: BUG! Tx Ring full when " "queue awake!\n", dev->name); } + spin_unlock(&tp->tx_lock); return NETDEV_TX_BUSY; } @@ -3987,7 +3872,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) mss = 0; if (skb->len > (tp->dev->mtu + ETH_HLEN) && (mss = skb_shinfo(skb)->gso_size) != 0) { - int tcp_opt_len, ip_tcp_len, hdr_len; + int tcp_opt_len, ip_tcp_len; if (skb_header_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { @@ -3998,16 +3883,11 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) tcp_opt_len = ((skb->h.th->doff - 5) * 4); ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); - hdr_len = ip_tcp_len + tcp_opt_len; - if (unlikely((ETH_HLEN + hdr_len) > 80) && - (tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG)) - return (tg3_tso_bug(tp, skb)); - base_flags |= (TXD_FLAG_CPU_PRE_DMA | TXD_FLAG_CPU_POST_DMA); skb->nh.iph->check = 0; - skb->nh.iph->tot_len = htons(mss + hdr_len); + skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { skb->h.th->check = 0; base_flags &= ~TXD_FLAG_TCPUDP_CSUM; @@ -4118,14 +3998,15 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); tp->tx_prod = entry; - if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { + if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) { netif_stop_queue(dev); - if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) + if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) netif_wake_queue(tp->dev); } out_unlock: mmiowb(); + spin_unlock(&tp->tx_lock); dev->trans_start = jiffies; @@ -4154,7 +4035,6 @@ static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp, static int tg3_change_mtu(struct net_device *dev, int new_mtu) { struct tg3 *tp = netdev_priv(dev); - int err; if (new_mtu < TG3_MIN_MTU || new_mtu > TG3_MAX_MTU(tp)) return -EINVAL; @@ -4175,14 +4055,13 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu) tg3_set_mtu(dev, tp, new_mtu); - err = tg3_restart_hw(tp, 0); + tg3_init_hw(tp, 0); - if (!err) - tg3_netif_start(tp); + tg3_netif_start(tp); tg3_full_unlock(tp); - return err; + return 0; } /* Free up pending packets in all rx/tx rings. @@ -4264,7 +4143,7 @@ static void tg3_free_rings(struct tg3 *tp) * end up in the driver. tp->{tx,}lock are held and thus * we may not sleep. */ -static int tg3_init_rings(struct tg3 *tp) +static void tg3_init_rings(struct tg3 *tp) { u32 i; @@ -4313,38 +4192,18 @@ static int tg3_init_rings(struct tg3 *tp) /* Now allocate fresh SKBs for each rx ring. */ for (i = 0; i < tp->rx_pending; i++) { - if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_STD, -1, i) < 0) { - printk(KERN_WARNING PFX - "%s: Using a smaller RX standard ring, " - "only %d out of %d buffers were allocated " - "successfully.\n", - tp->dev->name, i, tp->rx_pending); - if (i == 0) - return -ENOMEM; - tp->rx_pending = i; + if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_STD, + -1, i) < 0) break; - } } if (tp->tg3_flags & TG3_FLAG_JUMBO_RING_ENABLE) { for (i = 0; i < tp->rx_jumbo_pending; i++) { if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_JUMBO, - -1, i) < 0) { - printk(KERN_WARNING PFX - "%s: Using a smaller RX jumbo ring, " - "only %d out of %d buffers were " - "allocated successfully.\n", - tp->dev->name, i, tp->rx_jumbo_pending); - if (i == 0) { - tg3_free_rings(tp); - return -ENOMEM; - } - tp->rx_jumbo_pending = i; + -1, i) < 0) break; - } } } - return 0; } /* @@ -5867,7 +5726,6 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) { struct tg3 *tp = netdev_priv(dev); struct sockaddr *addr = p; - int err = 0; if (!is_valid_ether_addr(addr->sa_data)) return -EINVAL; @@ -5885,9 +5743,9 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) tg3_full_lock(tp, 1); tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - err = tg3_restart_hw(tp, 0); - if (!err) - tg3_netif_start(tp); + tg3_init_hw(tp, 0); + + tg3_netif_start(tp); tg3_full_unlock(tp); } else { spin_lock_bh(&tp->lock); @@ -5895,7 +5753,7 @@ static int tg3_set_mac_addr(struct net_device *dev, void *p) spin_unlock_bh(&tp->lock); } - return err; + return 0; } /* tp->lock is held. */ @@ -5995,9 +5853,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) * can only do this after the hardware has been * successfully reset. */ - err = tg3_init_rings(tp); - if (err) - return err; + tg3_init_rings(tp); /* This value is determined during the probe time DMA * engine test, tg3_test_dma. @@ -6090,13 +5946,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) } /* Setup replenish threshold. */ - val = tp->rx_pending / 8; - if (val == 0) - val = 1; - else if (val > tp->rx_std_max_post) - val = tp->rx_std_max_post; - - tw32(RCVBDI_STD_THRESH, val); + tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8); /* Initialize TG3_BDINFO's at: * RCVDBDI_STD_BD: standard eth size rx ring @@ -6256,12 +6106,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) #endif /* Receive/send statistics. */ - if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) { - val = tr32(RCVLPC_STATS_ENABLE); - val &= ~RCVLPC_STATSENAB_DACK_FIX; - tw32(RCVLPC_STATS_ENABLE, val); - } else if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) && - (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) { + if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) && + (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) { val = tr32(RCVLPC_STATS_ENABLE); val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX; tw32(RCVLPC_STATS_ENABLE, val); @@ -6763,12 +6609,12 @@ static int tg3_request_irq(struct tg3 *tp) fn = tg3_msi; if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) fn = tg3_msi_1shot; - flags = IRQF_SAMPLE_RANDOM; + flags = SA_SAMPLE_RANDOM; } else { fn = tg3_interrupt; if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) fn = tg3_interrupt_tagged; - flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM; + flags = SA_SHIRQ | SA_SAMPLE_RANDOM; } return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev)); } @@ -6787,7 +6633,7 @@ static int tg3_test_interrupt(struct tg3 *tp) free_irq(tp->pdev->irq, dev); err = request_irq(tp->pdev->irq, tg3_test_isr, - IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); + SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); if (err) return err; @@ -6889,10 +6735,8 @@ static int tg3_open(struct net_device *dev) tg3_full_lock(tp, 0); err = tg3_set_power_state(tp, PCI_D0); - if (err) { - tg3_full_unlock(tp); + if (err) return err; - } tg3_disable_ints(tp); tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; @@ -7950,12 +7794,6 @@ static int tg3_set_tso(struct net_device *dev, u32 value) return -EINVAL; return 0; } - if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) { - if (value) - dev->features |= NETIF_F_TSO6; - else - dev->features &= ~NETIF_F_TSO6; - } return ethtool_op_set_tso(dev, value); } #endif @@ -8013,7 +7851,7 @@ static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam * static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering) { struct tg3 *tp = netdev_priv(dev); - int irq_sync = 0, err = 0; + int irq_sync = 0; if ((ering->rx_pending > TG3_RX_RING_SIZE - 1) || (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) || @@ -8037,14 +7875,13 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e if (netif_running(dev)) { tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - err = tg3_restart_hw(tp, 1); - if (!err) - tg3_netif_start(tp); + tg3_init_hw(tp, 1); + tg3_netif_start(tp); } tg3_full_unlock(tp); - return err; + return 0; } static void tg3_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause) @@ -8059,7 +7896,7 @@ static void tg3_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause) { struct tg3 *tp = netdev_priv(dev); - int irq_sync = 0, err = 0; + int irq_sync = 0; if (netif_running(dev)) { tg3_netif_stop(tp); @@ -8083,14 +7920,13 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam if (netif_running(dev)) { tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - err = tg3_restart_hw(tp, 1); - if (!err) - tg3_netif_start(tp); + tg3_init_hw(tp, 1); + tg3_netif_start(tp); } tg3_full_unlock(tp); - return err; + return 0; } static u32 tg3_get_rx_csum(struct net_device *dev) @@ -8626,7 +8462,7 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode) err = -EIO; tx_len = 1514; - skb = netdev_alloc_skb(tp->dev, tx_len); + skb = dev_alloc_skb(tx_len); if (!skb) return -ENOMEM; @@ -8725,9 +8561,7 @@ static int tg3_test_loopback(struct tg3 *tp) if (!netif_running(tp->dev)) return TG3_LOOPBACK_FAILED; - err = tg3_reset_hw(tp, 1); - if (err) - return TG3_LOOPBACK_FAILED; + tg3_reset_hw(tp, 1); if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) err |= TG3_MAC_LOOPBACK_FAILED; @@ -8801,8 +8635,8 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); if (netif_running(dev)) { tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - if (!tg3_restart_hw(tp, 1)) - tg3_netif_start(tp); + tg3_init_hw(tp, 1); + tg3_netif_start(tp); } tg3_full_unlock(tp); @@ -8869,9 +8703,6 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) { struct tg3 *tp = netdev_priv(dev); - if (netif_running(dev)) - tg3_netif_stop(tp); - tg3_full_lock(tp, 0); tp->vlgrp = grp; @@ -8880,25 +8711,16 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) __tg3_set_rx_mode(dev); tg3_full_unlock(tp); - - if (netif_running(dev)) - tg3_netif_start(tp); } static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { struct tg3 *tp = netdev_priv(dev); - if (netif_running(dev)) - tg3_netif_stop(tp); - tg3_full_lock(tp, 0); if (tp->vlgrp) tp->vlgrp->vlan_devices[vid] = NULL; tg3_full_unlock(tp); - - if (netif_running(dev)) - tg3_netif_start(tp); } #endif @@ -10139,8 +9961,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) static struct pci_device_id write_reorder_chipsets[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, - PCI_DEVICE_ID_AMD_8131_BRIDGE) }, { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8385_0) }, { }, @@ -10305,14 +10125,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; - } else { - tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 | - TG3_FLG2_HW_TSO_1_BUG; - if (GET_ASIC_REV(tp->pci_chip_rev_id) == - ASIC_REV_5750 && - tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2) - tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_1_BUG; - } + } else + tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1; } if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && @@ -10684,16 +10498,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) tp->rx_offset = 0; - tp->rx_std_max_post = TG3_RX_RING_SIZE; - - /* Increment the rx prod index on the rx std ring by at most - * 8 for these chips to workaround hw errata. - */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 || - GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) - tp->rx_std_max_post = 8; - /* By default, disable wake-on-lan. User can change this * using ETHTOOL_SWOL. */ @@ -10710,13 +10514,11 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp) struct pcidev_cookie *pcp = pdev->sysdata; if (pcp != NULL) { - unsigned char *addr; - int len; + int node = pcp->prom_node; - addr = of_get_property(pcp->prom_node, "local-mac-address", - &len); - if (addr && len == 6) { - memcpy(dev->dev_addr, addr, 6); + if (prom_getproplen(node, "local-mac-address") == 6) { + prom_getproperty(node, "local-mac-address", + dev->dev_addr, 6); memcpy(dev->perm_addr, dev->dev_addr, 6); return 0; } @@ -11441,6 +11243,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); + dev->features |= NETIF_F_LLTX; #if TG3_VLAN_TAG_USED dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->vlan_rx_register = tg3_vlan_rx_register; @@ -11482,6 +11285,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; #endif spin_lock_init(&tp->lock); + spin_lock_init(&tp->tx_lock); spin_lock_init(&tp->indirect_lock); INIT_WORK(&tp->reset_task, tg3_reset_task, tp); @@ -11577,15 +11381,16 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE; } - /* TSO is on by default on chips that support hardware TSO. + /* TSO is on by default on chips that support HW_TSO_2. + * Some HW_TSO_1 capable chips have bugs that can lead to + * tx timeouts in some cases when TSO is enabled. * Firmware TSO on older chips gives lower performance, so it * is off by default, but can be enabled using ethtool. */ - if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { + if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 && + tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2)) dev->features |= NETIF_F_TSO; - if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2) - dev->features |= NETIF_F_TSO6; - } #endif @@ -11759,8 +11564,7 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) tg3_full_lock(tp, 0); tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - if (tg3_restart_hw(tp, 1)) - goto out; + tg3_init_hw(tp, 1); tp->timer.expires = jiffies + tp->timer_offset; add_timer(&tp->timer); @@ -11768,7 +11572,6 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) netif_device_attach(dev); tg3_netif_start(tp); -out: tg3_full_unlock(tp); } @@ -11795,19 +11598,16 @@ static int tg3_resume(struct pci_dev *pdev) tg3_full_lock(tp, 0); tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - err = tg3_restart_hw(tp, 1); - if (err) - goto out; + tg3_init_hw(tp, 1); tp->timer.expires = jiffies + tp->timer_offset; add_timer(&tp->timer); tg3_netif_start(tp); -out: tg3_full_unlock(tp); - return err; + return 0; } static struct pci_driver tg3_driver = { diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 3ecf356cf..cd68f4688 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -761,7 +761,6 @@ #define RCVLPC_STATSCTRL_ENABLE 0x00000001 #define RCVLPC_STATSCTRL_FASTUPD 0x00000002 #define RCVLPC_STATS_ENABLE 0x00002018 -#define RCVLPC_STATSENAB_DACK_FIX 0x00040000 #define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 #define RCVLPC_STATS_INCMASK 0x0000201c /* 0x2020 --> 0x2100 unused */ @@ -2076,22 +2075,12 @@ struct tg3 { /* SMP locking strategy: * - * lock: Held during reset, PHY access, timer, and when - * updating tg3_flags and tg3_flags2. + * lock: Held during all operations except TX packet + * processing. * - * netif_tx_lock: Held during tg3_start_xmit. tg3_tx holds - * netif_tx_lock when it needs to call - * netif_wake_queue. + * tx_lock: Held during tg3_start_xmit and tg3_tx * * Both of these locks are to be held with BH safety. - * - * Because the IRQ handler, tg3_poll, and tg3_start_xmit - * are running lockless, it is necessary to completely - * quiesce the chip with tg3_netif_stop and tg3_full_lock - * before reconfiguring the device. - * - * indirect_lock: Held when accessing registers indirectly - * with IRQ disabling. */ spinlock_t lock; spinlock_t indirect_lock; @@ -2118,6 +2107,8 @@ struct tg3 { u32 tx_cons; u32 tx_pending; + spinlock_t tx_lock; + struct tg3_tx_buffer_desc *tx_ring; struct tx_ring_info *tx_buffers; dma_addr_t tx_desc_mapping; @@ -2137,7 +2128,6 @@ struct tg3 { struct tg3_rx_buffer_desc *rx_std; struct ring_info *rx_std_buffers; dma_addr_t rx_std_mapping; - u32 rx_std_max_post; struct tg3_rx_buffer_desc *rx_jumbo; struct ring_info *rx_jumbo_buffers; @@ -2166,7 +2156,11 @@ struct tg3 { #define TG3_FLAG_ENABLE_ASF 0x00000020 #define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040 #define TG3_FLAG_POLL_SERDES 0x00000080 +#if defined(CONFIG_X86) #define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 +#else +#define TG3_FLAG_MBOX_WRITE_REORDER 0 /* disables code too */ +#endif #define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 #define TG3_FLAG_WOL_SPEED_100MB 0x00000400 #define TG3_FLAG_WOL_ENABLE 0x00000800 @@ -2179,7 +2173,6 @@ struct tg3 { #define TG3_FLAG_PCI_HIGH_SPEED 0x00040000 #define TG3_FLAG_PCI_32BIT 0x00080000 #define TG3_FLAG_SRAM_USE_CONFIG 0x00100000 -#define TG3_FLAG_TX_RECOVERY_PENDING 0x00200000 #define TG3_FLAG_SERDES_WOL_CAP 0x00400000 #define TG3_FLAG_JUMBO_RING_ENABLE 0x00800000 #define TG3_FLAG_10_100_ONLY 0x01000000 @@ -2192,7 +2185,7 @@ struct tg3 { #define TG3_FLAG_INIT_COMPLETE 0x80000000 u32 tg3_flags2; #define TG3_FLG2_RESTART_TIMER 0x00000001 -#define TG3_FLG2_HW_TSO_1_BUG 0x00000002 +/* 0x00000002 available */ #define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 #define TG3_FLG2_IS_5788 0x00000008 #define TG3_FLG2_MAX_RXPEND_64 0x00000010 diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 23c0017f2..12076f8f9 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c @@ -943,7 +943,7 @@ static int TLan_Open( struct net_device *dev ) int err; priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); - err = request_irq( dev->irq, TLan_HandleInterrupt, IRQF_SHARED, TLanSignature, dev ); + err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); if ( err ) { printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 465921e38..41e0cd8f4 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c @@ -42,6 +42,7 @@ #define XL_DEBUG 0 +#include #include #include #include @@ -576,7 +577,7 @@ static int xl_open(struct net_device *dev) u16 switchsettings, switchsettings_eeprom ; - if(request_irq(dev->irq, &xl_interrupt, IRQF_SHARED , "3c359", dev)) { + if(request_irq(dev->irq, &xl_interrupt, SA_SHIRQ , "3c359", dev)) { return -EAGAIN; } diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c index 1bdd3beef..649d8ea35 100644 --- a/drivers/net/tokenring/abyss.c +++ b/drivers/net/tokenring/abyss.c @@ -123,7 +123,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_ goto err_out_trdev; } - ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, + ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, dev->name, dev); if (ret) goto err_out_region; diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index 84f943e21..5cffb1765 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c @@ -140,7 +140,7 @@ in the event that chatty debug messages are desired - jjs 12/30/98 */ /* version and credits */ #ifndef PCMCIA -static char version[] __devinitdata = +static char version[] __initdata = "\nibmtr.c: v1.3.57 8/ 7/94 Peter De Schrijver and Mark Swanson\n" " v2.1.125 10/20/98 Paul Norton \n" " v2.2.0 12/30/98 Joel Sloan \n" @@ -216,7 +216,7 @@ static int __devinitdata turbo_irq[IBMTR_MAX_ADAPTERS] = {0}; static int __devinitdata turbo_searched = 0; #ifndef PCMCIA -static __u32 ibmtr_mem_base __devinitdata = 0xd0000; +static __u32 ibmtr_mem_base __initdata = 0xd0000; #endif static void __devinit PrtChanID(char *pcid, short stride) diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 28d968ffd..c58a4c31d 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c @@ -100,6 +100,7 @@ #define STREAMER_IOCTL 0 +#include #include #include #include @@ -601,7 +602,7 @@ static int streamer_open(struct net_device *dev) rc=streamer_reset(dev); } - if (request_irq(dev->irq, &streamer_interrupt, IRQF_SHARED, "lanstreamer", dev)) { + if (request_irq(dev->irq, &streamer_interrupt, SA_SHIRQ, "lanstreamer", dev)) { return -EAGAIN; } #if STREAMER_DEBUG diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 666bbaaae..19e6f4dfd 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c @@ -311,7 +311,7 @@ static int __devinit madgemc_probe(struct device *device) */ outb(0, dev->base_addr + MC_CONTROL_REG0); /* sanity */ madgemc_setsifsel(dev, 1); - if (request_irq(dev->irq, madgemc_interrupt, IRQF_SHARED, + if (request_irq(dev->irq, madgemc_interrupt, SA_SHIRQ, "madgemc", dev)) { ret = -EBUSY; goto getout3; diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index 85831484b..23032a7bc 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c @@ -80,6 +80,7 @@ #define OLYMPIC_DEBUG 0 +#include #include #include #include @@ -216,7 +217,7 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device dev = alloc_trdev(sizeof(struct olympic_private)) ; if (!dev) { i = -ENOMEM; - goto op_release_dev; + goto op_free_dev; } olympic_priv = dev->priv ; @@ -281,8 +282,8 @@ op_free_iomap: if (olympic_priv->olympic_lap) iounmap(olympic_priv->olympic_lap); +op_free_dev: free_netdev(dev); -op_release_dev: pci_release_regions(pdev); op_disable_dev: @@ -445,7 +446,7 @@ static int olympic_open(struct net_device *dev) olympic_init(dev); - if(request_irq(dev->irq, &olympic_interrupt, IRQF_SHARED , "olympic", dev)) { + if(request_irq(dev->irq, &olympic_interrupt, SA_SHIRQ , "olympic", dev)) { return -EAGAIN; } diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 85a7f797d..67d2b596c 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c @@ -29,6 +29,7 @@ */ #include +#include #include #include #include @@ -531,7 +532,7 @@ static int __init smctr_chk_mca(struct net_device *dev) dev->irq = 15; break; } - if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev)) { + if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) { release_region(dev->base_addr, SMCTR_IO_EXTENT); return -ENODEV; } @@ -1061,7 +1062,7 @@ static int __init smctr_chk_isa(struct net_device *dev) goto out2; } - if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev)) + if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) goto out2; /* Get 58x Rom Base */ @@ -5666,7 +5667,7 @@ module_param_array(io, int, NULL, 0); module_param_array(irq, int, NULL, 0); module_param(ringspeed, int, 0); -static struct net_device * __init setup_card(int n) +static struct net_device *setup_card(int n) { struct net_device *dev = alloc_trdev(sizeof(struct net_local)); int err; @@ -5696,8 +5697,9 @@ out: free_netdev(dev); return ERR_PTR(err); } + -int __init init_module(void) +int init_module(void) { int i, found = 0; struct net_device *dev; diff --git a/drivers/net/tokenring/smctr_firmware.h b/drivers/net/tokenring/smctr_firmware.h index 292e50ddf..48994b043 100644 --- a/drivers/net/tokenring/smctr_firmware.h +++ b/drivers/net/tokenring/smctr_firmware.h @@ -17,6 +17,7 @@ * - Jay Schulist */ +#include #if defined(CONFIG_SMCTR) || defined(CONFIG_SMCTR_MODULE) diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index 7d3e270c4..ab47c0547 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c @@ -122,7 +122,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic goto err_out_trdev; } - ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, + ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, dev->name, dev); if (ret) goto err_out_region; diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d05c5aa25..e3dd144d3 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c @@ -31,6 +31,7 @@ #define DRV_VERSION "0.7" #define DRV_RELDATE "Mar 17, 2004" +#include #include #include #include @@ -226,12 +227,12 @@ enum { SROMC0InfoLeaf = 27, MediaBlockMask = 0x3f, MediaCustomCSRs = (1 << 6), - + /* PCIPM bits */ PM_Sleep = (1 << 31), PM_Snooze = (1 << 30), PM_Mask = PM_Sleep | PM_Snooze, - + /* SIAStatus bits */ NWayState = (1 << 14) | (1 << 13) | (1 << 12), NWayRestart = (1 << 12), @@ -857,7 +858,7 @@ static void de_stop_rxtx (struct de_private *de) return; cpu_relax(); } - + printk(KERN_WARNING "%s: timeout expired stopping DMA\n", de->dev->name); } @@ -930,7 +931,7 @@ static void de_set_media (struct de_private *de) macmode |= FullDuplex; else macmode &= ~FullDuplex; - + if (netif_msg_link(de)) { printk(KERN_INFO "%s: set link %s\n" KERN_INFO "%s: mode 0x%x, sia 0x%x,0x%x,0x%x,0x%x\n" @@ -965,9 +966,9 @@ static void de21040_media_timer (unsigned long data) u32 status = dr32(SIAStatus); unsigned int carrier; unsigned long flags; - + carrier = (status & NetCxnErr) ? 0 : 1; - + if (carrier) { if (de->media_type != DE_MEDIA_AUI && (status & LinkFailStatus)) goto no_link_yet; @@ -984,7 +985,7 @@ static void de21040_media_timer (unsigned long data) return; } - de_link_down(de); + de_link_down(de); if (de->media_lock) return; @@ -1038,7 +1039,7 @@ static unsigned int de_ok_to_advertise (struct de_private *de, u32 new_media) return 0; break; } - + return 1; } @@ -1049,9 +1050,9 @@ static void de21041_media_timer (unsigned long data) u32 status = dr32(SIAStatus); unsigned int carrier; unsigned long flags; - + carrier = (status & NetCxnErr) ? 0 : 1; - + if (carrier) { if ((de->media_type == DE_MEDIA_TP_AUTO || de->media_type == DE_MEDIA_TP || @@ -1071,7 +1072,7 @@ static void de21041_media_timer (unsigned long data) return; } - de_link_down(de); + de_link_down(de); /* if media type locked, don't switch media */ if (de->media_lock) @@ -1123,7 +1124,7 @@ static void de21041_media_timer (unsigned long data) u32 next_states[] = { DE_MEDIA_AUI, DE_MEDIA_BNC, DE_MEDIA_TP_AUTO }; de_next_media(de, next_states, ARRAY_SIZE(next_states)); } - + set_media: spin_lock_irqsave(&de->lock, flags); de_stop_rxtx(de); @@ -1147,7 +1148,7 @@ static void de_media_interrupt (struct de_private *de, u32 status) mod_timer(&de->media_timer, jiffies + DE_TIMER_LINK); return; } - + BUG_ON(!(status & LinkFail)); if (netif_carrier_ok(de->dev)) { @@ -1226,7 +1227,7 @@ static int de_init_hw (struct de_private *de) int rc; de_adapter_wake(de); - + macmode = dr32(MacMode) & ~MacModeClear; rc = de_reset_mac(de); @@ -1371,7 +1372,7 @@ static int de_open (struct net_device *dev) dw32(IntrMask, 0); - rc = request_irq(dev->irq, de_interrupt, IRQF_SHARED, dev->name, dev); + rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev); if (rc) { printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", dev->name, dev->irq, rc); @@ -1412,7 +1413,7 @@ static int de_close (struct net_device *dev) netif_stop_queue(dev); netif_carrier_off(dev); spin_unlock_irqrestore(&de->lock, flags); - + free_irq(dev->irq, dev); de_free_rings(de); @@ -1440,7 +1441,7 @@ static void de_tx_timeout (struct net_device *dev) spin_unlock_irq(&de->lock); enable_irq(dev->irq); - + /* Update the error counts. */ __de_get_stats(de); @@ -1450,7 +1451,7 @@ static void de_tx_timeout (struct net_device *dev) de_init_rings(de); de_init_hw(de); - + netif_wake_queue(dev); } @@ -1458,7 +1459,7 @@ static void __de_get_regs(struct de_private *de, u8 *buf) { int i; u32 *rbuf = (u32 *)buf; - + /* read all CSRs */ for (i = 0; i < DE_NUM_REGS; i++) rbuf[i] = dr32(i * 8); @@ -1473,7 +1474,7 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd) ecmd->transceiver = XCVR_INTERNAL; ecmd->phy_address = 0; ecmd->advertising = de->media_advertise; - + switch (de->media_type) { case DE_MEDIA_AUI: ecmd->port = PORT_AUI; @@ -1488,7 +1489,7 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd) ecmd->speed = SPEED_10; break; } - + if (dr32(MacMode) & FullDuplex) ecmd->duplex = DUPLEX_FULL; else @@ -1528,7 +1529,7 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd) if (ecmd->autoneg == AUTONEG_ENABLE && (!(ecmd->advertising & ADVERTISED_Autoneg))) return -EINVAL; - + switch (ecmd->port) { case PORT_AUI: new_media = DE_MEDIA_AUI; @@ -1553,22 +1554,22 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd) return -EINVAL; break; } - + media_lock = (ecmd->autoneg == AUTONEG_ENABLE) ? 0 : 1; - + if ((new_media == de->media_type) && (media_lock == de->media_lock) && (ecmd->advertising == de->media_advertise)) return 0; /* nothing to change */ - + de_link_down(de); de_stop_rxtx(de); - + de->media_type = new_media; de->media_lock = media_lock; de->media_advertise = ecmd->advertising; de_set_media(de); - + return 0; } @@ -1816,7 +1817,7 @@ static void __init de21041_get_srom_info (struct de_private *de) case 0x0204: de->media_type = DE_MEDIA_TP_FD; break; default: de->media_type = DE_MEDIA_TP_AUTO; break; } - + if (netif_msg_probe(de)) printk(KERN_INFO "de%d: SROM leaf offset %u, default media %s\n", de->board_idx, ofs, @@ -1885,7 +1886,7 @@ static void __init de21041_get_srom_info (struct de_private *de) de->media[idx].csr13, de->media[idx].csr14, de->media[idx].csr15); - + } else if (netif_msg_probe(de)) printk("\n"); @@ -2006,8 +2007,8 @@ static int __init de_init_one (struct pci_dev *pdev, } if (pci_resource_len(pdev, 1) < DE_REGS_SIZE) { rc = -EIO; - printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n", - (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev)); + printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", + pci_resource_len(pdev, 1), pci_name(pdev)); goto err_out_res; } @@ -2015,9 +2016,8 @@ static int __init de_init_one (struct pci_dev *pdev, regs = ioremap_nocache(pciaddr, DE_REGS_SIZE); if (!regs) { rc = -EIO; - printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%lx) on pci dev %s\n", - (unsigned long long)pci_resource_len(pdev, 1), - pciaddr, pci_name(pdev)); + printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", + pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); goto err_out_res; } dev->base_addr = (unsigned long) regs; @@ -2118,7 +2118,7 @@ static int de_suspend (struct pci_dev *pdev, pm_message_t state) spin_unlock_irq(&de->lock); enable_irq(dev->irq); - + /* Update the error counts. */ __de_get_stats(de); diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 75ff14a55..f56094102 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -41,11 +41,11 @@ Digital Semiconductor SROM Specification. The driver currently recognises the following chips: - DC21040 (no SROM) - DC21041[A] - DC21140[A] - DC21142 - DC21143 + DC21040 (no SROM) + DC21041[A] + DC21140[A] + DC21142 + DC21143 So far the driver is known to work with the following cards: @@ -55,7 +55,7 @@ SMC8432 SMC9332 (w/new SROM) ZNYX31[45] - ZNYX346 10/100 4 port (can act as a 10/100 bridge!) + ZNYX346 10/100 4 port (can act as a 10/100 bridge!) The driver has been tested on a relatively busy network using the DE425, DE434, DE435 and DE500 cards and benchmarked with 'ttcp': it transferred @@ -106,7 +106,7 @@ loading by: insmod de4x5 io=0xghh where g = bus number - hh = device number + hh = device number NB: autoprobing for modules is now supported by default. You may just use: @@ -120,11 +120,11 @@ 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a kernel with the de4x5 configuration turned off and reboot. 5) insmod de4x5 [io=0xghh] - 6) run the net startup bits for your new eth?? interface(s) manually - (usually /etc/rc.inet[12] at boot time). + 6) run the net startup bits for your new eth?? interface(s) manually + (usually /etc/rc.inet[12] at boot time). 7) enjoy! - To unload a module, turn off the associated interface(s) + To unload a module, turn off the associated interface(s) 'ifconfig eth?? down' then 'rmmod de4x5'. Automedia detection is included so that in principal you can disconnect @@ -135,7 +135,7 @@ By default, the driver will now autodetect any DECchip based card. Should you have a need to restrict the driver to DIGITAL only cards, you can compile with a DEC_ONLY define, or if loading as a module, use the - 'dec_only=1' parameter. + 'dec_only=1' parameter. I've changed the timing routines to use the kernel timer and scheduling functions so that the hangs and other assorted problems that occurred @@ -204,7 +204,7 @@ following parameters are allowed: fdx for full duplex - autosense to set the media/speed; with the following + autosense to set the media/speed; with the following sub-parameters: TP, TP_NW, BNC, AUI, BNC_AUI, 100Mb, 10Mb, AUTO @@ -235,14 +235,14 @@ this automatically or include #define DE4X5_FORCE_EISA on or before line 1040 in the driver. - TO DO: + TO DO: ------ Revision History ---------------- Version Date Description - + 0.1 17-Nov-94 Initial writing. ALPHA code release. 0.2 13-Jan-95 Added PCI support for DE435's. 0.21 19-Jan-95 Added auto media detection. @@ -251,7 +251,7 @@ Add request/release_region code. Add loadable modules support for PCI. Clean up loadable modules support. - 0.23 28-Feb-95 Added DC21041 and DC21140 support. + 0.23 28-Feb-95 Added DC21041 and DC21140 support. Fix missed frame counter value and initialisation. Fixed EISA probe. 0.24 11-Apr-95 Change delay routine to use . @@ -280,7 +280,7 @@ Add kernel timer code (h/w is too flaky). Add MII based PHY autosense. Add new multicasting code. - Add new autosense algorithms for media/mode + Add new autosense algorithms for media/mode selection using kernel scheduling/timing. Re-formatted. Made changes suggested by : @@ -292,7 +292,7 @@ 0.41 21-Mar-96 Don't check for get_hw_addr checksum unless DEC card only Fix for multiple PCI cards reported by - Duh, put the IRQF_SHARED flag into request_interrupt(). + Duh, put the SA_SHIRQ flag into request_interrupt(). Fix SMC ethernet address in enet_det[]. Print chip name instead of "UNKNOWN" during boot. 0.42 26-Apr-96 Fix MII write TA bit error. @@ -307,10 +307,10 @@ Add Accton to the list of broken cards. Fix TX under-run bug for non DC21140 chips. Fix boot command probe bug in alloc_device() as - reported by and + reported by and . Add cache locks to prevent a race condition as - reported by and + reported by and . Upgraded alloc_device() code. 0.431 28-Jun-96 Fix potential bug in queue_pkt() from discussion @@ -322,7 +322,7 @@ with a loopback packet. 0.442 9-Sep-96 Include AUI in dc21041 media printout. Bug reported by - 0.45 8-Dec-96 Include endian functions for PPC use, from work + 0.45 8-Dec-96 Include endian functions for PPC use, from work by and . 0.451 28-Dec-96 Added fix to allow autoprobe for modules after suggestion from . @@ -346,14 +346,14 @@ . 0.52 26-Apr-97 Some changes may not credit the right people - a disk crash meant I lost some mail. - Change RX interrupt routine to drop rather than - defer packets to avoid hang reported by + Change RX interrupt routine to drop rather than + defer packets to avoid hang reported by . Fix srom_exec() to return for COMPACT and type 1 infoblocks. Added DC21142 and DC21143 functions. Added byte counters from - Added IRQF_DISABLED temporary fix from + Added SA_INTERRUPT temporary fix from . 0.53 12-Nov-97 Fix the *_probe() to include 'eth??' name during module load: bug reported by @@ -363,10 +363,10 @@ Make above search independent of BIOS device scan direction. Completed DC2114[23] autosense functions. - 0.531 21-Dec-97 Fix DE500-XA 100Mb/s bug reported by + 0.531 21-Dec-97 Fix DE500-XA 100Mb/s bug reported by and . Added argument list to set up each board from either @@ -374,7 +374,7 @@ Added generic MII PHY functionality to deal with newer PHY chips. Fix the mess in 2.1.67. - 0.532 5-Jan-98 Fix bug in mii_get_phy() reported by + 0.532 5-Jan-98 Fix bug in mii_get_phy() reported by . Fix bug in pci_probe() for 64 bit systems reported by . @@ -398,7 +398,7 @@ version. I hope nothing is broken... Add TX done interrupt modification from suggestion by . - Fix is_anc_capable() bug reported by + Fix is_anc_capable() bug reported by . Fix type[13]_infoblock() bug: during MII search, PHY lp->rst not run because lp->ibn not initialised - @@ -413,7 +413,7 @@ Add an_exception() for old ZYNX346 and fix compile warning on PPC & SPARC, from . Fix lastPCI to correctly work with compiled in - kernels and modules from bug report by + kernels and modules from bug report by et al. 0.542 15-Sep-98 Fix dc2114x_autoconf() to stop multiple messages when media is unconnected. @@ -425,7 +425,7 @@ 0.544 8-May-99 Fix for buggy SROM in Motorola embedded boards using a 21143 by . Change PCI/EISA bus probing order. - 0.545 28-Nov-99 Further Moto SROM bug fix from + 0.545 28-Nov-99 Further Moto SROM bug fix from Remove double checking for DEBUG_RX in de4x5_dbg_rx() from report by @@ -434,8 +434,8 @@ variable 'pb', on a non de4x5 PCI device, in this case a PCI bridge (DEC chip 21152). The value of 'pb' is now only initialized if a de4x5 chip is - present. - + present. + 0.547 08-Nov-01 Use library crc32 functions by 0.548 30-Aug-03 Big 2.6 cleanup. Ported to PCI/EISA probing and generic DMA APIs. Fixed DE425 support on Alpha. @@ -443,6 +443,7 @@ ========================================================================= */ +#include #include #include #include @@ -583,7 +584,7 @@ static int de4x5_debug = (DEBUG_MEDIA | DEBUG_VERSION); /* ** Allow per adapter set up. For modules this is simply a command line -** parameter, e.g.: +** parameter, e.g.: ** insmod de4x5 args='eth1:fdx autosense=BNC eth0:autosense=100Mb'. ** ** For a compiled in driver, place e.g. @@ -654,7 +655,7 @@ static c_char *de4x5_signatures[] = DE4X5_SIGNATURE; ** Memory Alignment. Each descriptor is 4 longwords long. To force a ** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and ** DESC_ALIGN. ALIGN aligns the start address of the private memory area -** and hence the RX descriptor ring's first entry. +** and hence the RX descriptor ring's first entry. */ #define DE4X5_ALIGN4 ((u_long)4 - 1) /* 1 longword align */ #define DE4X5_ALIGN8 ((u_long)8 - 1) /* 2 longword align */ @@ -1080,8 +1081,8 @@ static int (*dc_infoblock[])(struct net_device *dev, u_char, u_char *) = { mdelay(2); /* Wait for 2ms */\ } - -static int __devinit + +static int __devinit de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) { char name[DE4X5_NAME_LENGTH + 1]; @@ -1101,12 +1102,12 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) mdelay(10); RESET_DE4X5; - + if ((inl(DE4X5_STS) & (STS_TS | STS_RS)) != 0) { return -ENXIO; /* Hardware could not reset */ } - - /* + + /* ** Now find out what kind of DC21040/DC21041/DC21140 board we have. */ lp->useSROM = FALSE; @@ -1115,21 +1116,21 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) } else { EISA_signature(name, gendev); } - + if (*name == '\0') { /* Not found a board signature */ return -ENXIO; } - + dev->base_addr = iobase; printk ("%s: %s at 0x%04lx", gendev->bus_id, name, iobase); - + printk(", h/w address "); status = get_hw_addr(dev); for (i = 0; i < ETH_ALEN - 1; i++) { /* get the ethernet addr. */ printk("%2.2x:", dev->dev_addr[i]); } printk("%2.2x,\n", dev->dev_addr[i]); - + if (status != 0) { printk(" which has an Ethernet PROM CRC error.\n"); return -ENXIO; @@ -1170,10 +1171,10 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) } lp->tx_ring = lp->rx_ring + NUM_RX_DESC; - + /* ** Set up the RX descriptor ring (Intels) - ** Allocate contiguous receive buffers, long word aligned (Alphas) + ** Allocate contiguous receive buffers, long word aligned (Alphas) */ #if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) for (i=0; irxRingSize = NUM_RX_DESC; lp->txRingSize = NUM_TX_DESC; - + /* Write the end of list marker to the descriptor lists */ lp->rx_ring[lp->rxRingSize - 1].des1 |= cpu_to_le32(RD_RER); lp->tx_ring[lp->txRingSize - 1].des1 |= cpu_to_le32(TD_TER); @@ -1218,7 +1219,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) outl(lp->dma_rings, DE4X5_RRBA); outl(lp->dma_rings + NUM_RX_DESC * sizeof(struct de4x5_desc), DE4X5_TRBA); - + /* Initialise the IRQ mask and Enable/Disable */ lp->irq_mask = IMR_RIM | IMR_TIM | IMR_TUM | IMR_UNM; lp->irq_en = IMR_NIM | IMR_AIM; @@ -1251,7 +1252,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) if ((lp->chipset != DC21040) && (lp->chipset != DC21041)) { mii_get_phy(dev); } - + #ifndef __sparc_v9__ printk(" and requires IRQ%d (provided by %s).\n", dev->irq, #else @@ -1259,11 +1260,11 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) #endif ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG")); } - + if (de4x5_debug & DEBUG_VERSION) { printk(version); } - + /* The DE4X5-specific entries in the device structure. */ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, gendev); @@ -1273,23 +1274,23 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) dev->get_stats = &de4x5_get_stats; dev->set_multicast_list = &set_multicast_list; dev->do_ioctl = &de4x5_ioctl; - + dev->mem_start = 0; - + /* Fill in the generic fields of the device structure. */ if ((status = register_netdev (dev))) { dma_free_coherent (gendev, lp->dma_size, lp->rx_ring, lp->dma_rings); return status; } - + /* Let the adapter sleep to save power */ yawn(dev, SLEEP); - + return status; } - + static int de4x5_open(struct net_device *dev) { @@ -1311,18 +1312,18 @@ de4x5_open(struct net_device *dev) */ yawn(dev, WAKEUP); - /* - ** Re-initialize the DE4X5... + /* + ** Re-initialize the DE4X5... */ status = de4x5_init(dev); spin_lock_init(&lp->lock); lp->state = OPEN; de4x5_dbg_open(dev); - - if (request_irq(dev->irq, (void *)de4x5_interrupt, IRQF_SHARED, + + if (request_irq(dev->irq, (void *)de4x5_interrupt, SA_SHIRQ, lp->adapter_name, dev)) { printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq); - if (request_irq(dev->irq, de4x5_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq(dev->irq, de4x5_interrupt, SA_INTERRUPT | SA_SHIRQ, lp->adapter_name, dev)) { printk("\n Cannot get IRQ- reconfigure your hardware.\n"); disable_ast(dev); @@ -1339,11 +1340,11 @@ de4x5_open(struct net_device *dev) lp->interrupt = UNMASK_INTERRUPTS; dev->trans_start = jiffies; - + START_DE4X5; - + de4x5_setup_intr(dev); - + if (de4x5_debug & DEBUG_OPEN) { printk("\tsts: 0x%08x\n", inl(DE4X5_STS)); printk("\tbmr: 0x%08x\n", inl(DE4X5_BMR)); @@ -1354,7 +1355,7 @@ de4x5_open(struct net_device *dev) printk("\tstrr: 0x%08x\n", inl(DE4X5_STRR)); printk("\tsigr: 0x%08x\n", inl(DE4X5_SIGR)); } - + return status; } @@ -1368,15 +1369,15 @@ de4x5_open(struct net_device *dev) */ static int de4x5_init(struct net_device *dev) -{ +{ /* Lock out other processes whilst setting up the hardware */ netif_stop_queue(dev); - + de4x5_sw_reset(dev); - + /* Autoconfigure the connected port */ autoconf_media(dev); - + return 0; } @@ -1387,7 +1388,7 @@ de4x5_sw_reset(struct net_device *dev) u_long iobase = dev->base_addr; int i, j, status = 0; s32 bmr, omr; - + /* Select the MII or SRL port now and RESET the MAC */ if (!lp->useSROM) { if (lp->phy[lp->active].id != 0) { @@ -1398,7 +1399,7 @@ de4x5_sw_reset(struct net_device *dev) de4x5_switch_mac_port(dev); } - /* + /* ** Set the programmable burst length to 8 longwords for all the DC21140 ** Fasternet chips and 4 longwords for all others: DMA errors result ** without these values. Cache align 16 long. @@ -1415,23 +1416,23 @@ de4x5_sw_reset(struct net_device *dev) outl(lp->dma_rings, DE4X5_RRBA); outl(lp->dma_rings + NUM_RX_DESC * sizeof(struct de4x5_desc), DE4X5_TRBA); - + lp->rx_new = lp->rx_old = 0; lp->tx_new = lp->tx_old = 0; - + for (i = 0; i < lp->rxRingSize; i++) { lp->rx_ring[i].status = cpu_to_le32(R_OWN); } - + for (i = 0; i < lp->txRingSize; i++) { lp->tx_ring[i].status = cpu_to_le32(0); } - + barrier(); /* Build the setup frame depending on filtering mode */ SetMulticastFilter(dev); - + load_packet(dev, lp->setup_frame, PERFECT_F|TD_SET|SETUP_FRAME_LEN, (struct sk_buff *)1); outl(omr|OMR_ST, DE4X5_OMR); @@ -1444,18 +1445,18 @@ de4x5_sw_reset(struct net_device *dev) outl(omr, DE4X5_OMR); /* Stop everything! */ if (j == 0) { - printk("%s: Setup frame timed out, status %08x\n", dev->name, + printk("%s: Setup frame timed out, status %08x\n", dev->name, inl(DE4X5_STS)); status = -EIO; } - + lp->tx_new = (++lp->tx_new) % lp->txRingSize; lp->tx_old = lp->tx_new; return status; } -/* +/* ** Writes a socket buffer address to the next available transmit descriptor. */ static int @@ -1468,9 +1469,9 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) netif_stop_queue(dev); if (lp->tx_enable == NO) { /* Cannot send for now */ - return -1; + return -1; } - + /* ** Clean out the TX ring asynchronously to interrupts - sometimes the ** interrupts are lost by delayed descriptor status updates relative to @@ -1481,7 +1482,7 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) spin_unlock_irqrestore(&lp->lock, flags); /* Test if cache is already locked - requeue skb if so */ - if (test_and_set_bit(0, (void *)&lp->cache.lock) && !lp->interrupt) + if (test_and_set_bit(0, (void *)&lp->cache.lock) && !lp->interrupt) return -1; /* Transmit descriptor ring full or stale skb */ @@ -1508,10 +1509,10 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) load_packet(dev, skb->data, TD_IC | TD_LS | TD_FS | skb->len, skb); lp->stats.tx_bytes += skb->len; outl(POLL_DEMAND, DE4X5_TPD);/* Start the TX */ - + lp->tx_new = (++lp->tx_new) % lp->txRingSize; dev->trans_start = jiffies; - + if (TX_BUFFS_AVAIL) { netif_start_queue(dev); /* Another pkt may be queued */ } @@ -1520,15 +1521,15 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) } if (skb) de4x5_putb_cache(dev, skb); } - + lp->cache.lock = 0; return status; } /* -** The DE4X5 interrupt handler. -** +** The DE4X5 interrupt handler. +** ** I/O Read/Writes through intermediate PCI bridges are never 'posted', ** so that the asserted interrupt always has some real data to work with - ** if these I/O accesses are ever changed to memory accesses, ensure the @@ -1545,7 +1546,7 @@ de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs) s32 imr, omr, sts, limit; u_long iobase; unsigned int handled = 0; - + if (dev == NULL) { printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq); return IRQ_NONE; @@ -1553,35 +1554,35 @@ de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs) lp = netdev_priv(dev); spin_lock(&lp->lock); iobase = dev->base_addr; - + DISABLE_IRQs; /* Ensure non re-entrancy */ if (test_and_set_bit(MASK_INTERRUPTS, (void*) &lp->interrupt)) printk("%s: Re-entering the interrupt handler.\n", dev->name); synchronize_irq(dev->irq); - + for (limit=0; limit<8; limit++) { sts = inl(DE4X5_STS); /* Read IRQ status */ outl(sts, DE4X5_STS); /* Reset the board interrupts */ - + if (!(sts & lp->irq_mask)) break;/* All done */ handled = 1; - + if (sts & (STS_RI | STS_RU)) /* Rx interrupt (packet[s] arrived) */ de4x5_rx(dev); - + if (sts & (STS_TI | STS_TU)) /* Tx interrupt (packet sent) */ - de4x5_tx(dev); - + de4x5_tx(dev); + if (sts & STS_LNF) { /* TP Link has failed */ lp->irq_mask &= ~IMR_LFM; } - + if (sts & STS_UNF) { /* Transmit underrun */ de4x5_txur(dev); } - + if (sts & STS_SE) { /* Bus Error */ STOP_DE4X5; printk("%s: Fatal bus error occurred, sts=%#8x, device stopped.\n", @@ -1602,7 +1603,7 @@ de4x5_interrupt(int irq, void *dev_id, struct pt_regs *regs) lp->interrupt = UNMASK_INTERRUPTS; ENABLE_IRQs; spin_unlock(&lp->lock); - + return IRQ_RETVAL(handled); } @@ -1613,11 +1614,11 @@ de4x5_rx(struct net_device *dev) u_long iobase = dev->base_addr; int entry; s32 status; - + for (entry=lp->rx_new; (s32)le32_to_cpu(lp->rx_ring[entry].status)>=0; entry=lp->rx_new) { status = (s32)le32_to_cpu(lp->rx_ring[entry].status); - + if (lp->rx_ovf) { if (inl(DE4X5_MFC) & MFC_FOCM) { de4x5_rx_ovfc(dev); @@ -1628,7 +1629,7 @@ de4x5_rx(struct net_device *dev) if (status & RD_FS) { /* Remember the start of frame */ lp->rx_old = entry; } - + if (status & RD_LS) { /* Valid frame status */ if (lp->tx_enable) lp->linkOK++; if (status & RD_ES) { /* There was an error. */ @@ -1645,9 +1646,9 @@ de4x5_rx(struct net_device *dev) struct sk_buff *skb; short pkt_len = (short)(le32_to_cpu(lp->rx_ring[entry].status) >> 16) - 4; - + if ((skb = de4x5_alloc_rx_buff(dev, entry, pkt_len)) == NULL) { - printk("%s: Insufficient memory; nuking packet.\n", + printk("%s: Insufficient memory; nuking packet.\n", dev->name); lp->stats.rx_dropped++; } else { @@ -1657,14 +1658,14 @@ de4x5_rx(struct net_device *dev) skb->protocol=eth_type_trans(skb,dev); de4x5_local_stats(dev, skb->data, pkt_len); netif_rx(skb); - + /* Update stats */ dev->last_rx = jiffies; lp->stats.rx_packets++; lp->stats.rx_bytes += pkt_len; } } - + /* Change buffer ownership for this frame, back to the adapter */ for (;lp->rx_old!=entry;lp->rx_old=(++lp->rx_old)%lp->rxRingSize) { lp->rx_ring[lp->rx_old].status = cpu_to_le32(R_OWN); @@ -1673,13 +1674,13 @@ de4x5_rx(struct net_device *dev) lp->rx_ring[entry].status = cpu_to_le32(R_OWN); barrier(); } - + /* ** Update entry information */ lp->rx_new = (++lp->rx_new) % lp->rxRingSize; } - + return 0; } @@ -1704,20 +1705,20 @@ de4x5_tx(struct net_device *dev) u_long iobase = dev->base_addr; int entry; s32 status; - + for (entry = lp->tx_old; entry != lp->tx_new; entry = lp->tx_old) { status = (s32)le32_to_cpu(lp->tx_ring[entry].status); if (status < 0) { /* Buffer not sent yet */ break; } else if (status != 0x7fffffff) { /* Not setup frame */ if (status & TD_ES) { /* An error happened */ - lp->stats.tx_errors++; + lp->stats.tx_errors++; if (status & TD_NC) lp->stats.tx_carrier_errors++; if (status & TD_LC) lp->stats.tx_window_errors++; if (status & TD_UF) lp->stats.tx_fifo_errors++; if (status & TD_EC) lp->pktStats.excessive_collisions++; if (status & TD_DE) lp->stats.tx_aborted_errors++; - + if (TX_PKT_PENDING) { outl(POLL_DEMAND, DE4X5_TPD);/* Restart a stalled TX */ } @@ -1726,14 +1727,14 @@ de4x5_tx(struct net_device *dev) if (lp->tx_enable) lp->linkOK++; } /* Update the collision counter */ - lp->stats.collisions += ((status & TD_EC) ? 16 : + lp->stats.collisions += ((status & TD_EC) ? 16 : ((status & TD_CC) >> 3)); /* Free the buffer. */ if (lp->tx_skb[entry] != NULL) de4x5_free_tx_buff(lp, entry); } - + /* Update all the pointers */ lp->tx_old = (++lp->tx_old) % lp->txRingSize; } @@ -1745,7 +1746,7 @@ de4x5_tx(struct net_device *dev) else netif_start_queue(dev); } - + return 0; } @@ -1754,9 +1755,9 @@ de4x5_ast(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); int next_tick = DE4X5_AUTOSENSE_MS; - + disable_ast(dev); - + if (lp->useSROM) { next_tick = srom_autoconf(dev); } else if (lp->chipset == DC21140) { @@ -1768,7 +1769,7 @@ de4x5_ast(struct net_device *dev) } lp->linkOK = 0; enable_ast(dev, next_tick); - + return 0; } @@ -1791,11 +1792,11 @@ de4x5_txur(struct net_device *dev) } outl(omr | OMR_ST | OMR_SR, DE4X5_OMR); } - + return 0; } -static int +static int de4x5_rx_ovfc(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); @@ -1812,7 +1813,7 @@ de4x5_rx_ovfc(struct net_device *dev) } outl(omr, DE4X5_OMR); - + return 0; } @@ -1822,22 +1823,22 @@ de4x5_close(struct net_device *dev) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 imr, omr; - + disable_ast(dev); netif_stop_queue(dev); - + if (de4x5_debug & DEBUG_CLOSE) { printk("%s: Shutting down ethercard, status was %8.8x.\n", dev->name, inl(DE4X5_STS)); } - - /* + + /* ** We stop the DE4X5 here... mask interrupts and stop TX & RX */ DISABLE_IRQs; STOP_DE4X5; - + /* Free the associated irq */ free_irq(dev->irq, dev); lp->state = CLOSED; @@ -1845,10 +1846,10 @@ de4x5_close(struct net_device *dev) /* Free any socket buffers */ de4x5_free_rx_buffs(dev); de4x5_free_tx_buffs(dev); - + /* Put the adapter to sleep to save power */ yawn(dev, SLEEP); - + return 0; } @@ -1857,9 +1858,9 @@ de4x5_get_stats(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; - + lp->stats.rx_missed_errors = (int)(inl(DE4X5_MFC) & (MFC_OVFL | MFC_CNTR)); - + return &lp->stats; } @@ -1885,7 +1886,7 @@ de4x5_local_stats(struct net_device *dev, char *buf, int pkt_len) (*(s16 *)&buf[4] == *(s16 *)&dev->dev_addr[4])) { lp->pktStats.unicast++; } - + lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ if (lp->pktStats.bins[0] == 0) { /* Reset counters */ memset((char *)&lp->pktStats, 0, sizeof(lp->pktStats)); @@ -1936,11 +1937,11 @@ set_multicast_list(struct net_device *dev) omr = inl(DE4X5_OMR); omr |= OMR_PR; outl(omr, DE4X5_OMR); - } else { + } else { SetMulticastFilter(dev); - load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | + load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | SETUP_FRAME_LEN, (struct sk_buff *)1); - + lp->tx_new = (++lp->tx_new) % lp->txRingSize; outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */ dev->trans_start = jiffies; @@ -1968,20 +1969,20 @@ SetMulticastFilter(struct net_device *dev) omr = inl(DE4X5_OMR); omr &= ~(OMR_PR | OMR_PM); pa = build_setup_frame(dev, ALL); /* Build the basic frame */ - + if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 14)) { omr |= OMR_PM; /* Pass all multicasts */ } else if (lp->setup_f == HASH_PERF) { /* Hash Filtering */ for (i=0;imc_count;i++) { /* for each address in the list */ addrs=dmi->dmi_addr; dmi=dmi->next; - if ((*addrs & 0x01) == 1) { /* multicast address? */ + if ((*addrs & 0x01) == 1) { /* multicast address? */ crc = ether_crc_le(ETH_ALEN, addrs); hashcode = crc & HASH_BITS; /* hashcode is 9 LSb of CRC */ - + byte = hashcode >> 3; /* bit[3-8] -> byte in filter */ bit = 1 << (hashcode & 0x07);/* bit[0-2] -> bit in byte */ - + byte <<= 1; /* calc offset into setup frame */ if (byte & 0x02) { byte -= 1; @@ -1993,14 +1994,14 @@ SetMulticastFilter(struct net_device *dev) for (j=0; jmc_count; j++) { addrs=dmi->dmi_addr; dmi=dmi->next; - for (i=0; icfrv = (u_short) inl(PCI_CFRV); device = (cfid >> 8) & 0x00ffff00; vendor = (u_short) cfid; - + /* Read the EISA Configuration Registers */ regval = inb(EISA_REG0) & (ER0_INTL | ER0_INTT); #ifdef CONFIG_ALPHA @@ -2049,7 +2050,7 @@ static int __init de4x5_eisa_probe (struct device *gendev) * care about the EISA configuration, and thus doesn't * configure the PLX bridge properly. Oh well... Simply mimic * the EISA config file to sort it out. */ - + /* EISA REG1: Assert DecChip 21040 HW Reset */ outb (ER1_IAM | 1, EISA_REG1); mdelay (1); @@ -2060,12 +2061,12 @@ static int __init de4x5_eisa_probe (struct device *gendev) /* EISA REG3: R/W Burst Transfer Enable */ outb (ER3_BWE | ER3_BRE, EISA_REG3); - + /* 32_bit slave/master, Preempt Time=23 bclks, Unlatched Interrupt */ outb (ER0_BSW | ER0_BMW | ER0_EPT | regval, EISA_REG0); #endif irq = de4x5_irq[(regval >> 1) & 0x03]; - + if (is_DC2114x) { device = ((lp->cfrv & CFRV_RN) < DC2114x_BRK ? DC21142 : DC21143); } @@ -2076,7 +2077,7 @@ static int __init de4x5_eisa_probe (struct device *gendev) outl(PCI_COMMAND_IO | PCI_COMMAND_MASTER, PCI_CFCS); outl(0x00006000, PCI_CFLT); outl(iobase, PCI_CBIO); - + DevicePresent(dev, EISA_APROM); dev->irq = irq; @@ -2101,7 +2102,7 @@ static int __devexit de4x5_eisa_remove (struct device *device) dev = device->driver_data; iobase = dev->base_addr; - + unregister_netdev (dev); free_netdev (dev); release_region (iobase + DE4X5_EISA_IO_PORTS, DE4X5_EISA_TOTAL_SIZE); @@ -2130,11 +2131,11 @@ MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); /* ** This function searches the current bus (which is >0) for a DECchip with an -** SROM, so that in multiport cards that have one SROM shared between multiple +** SROM, so that in multiport cards that have one SROM shared between multiple ** DECchips, we can find the base SROM irrespective of the BIOS scan direction. ** For single port cards this is a time waster... */ -static void __devinit +static void __devinit srom_search(struct net_device *dev, struct pci_dev *pdev) { u_char pb; @@ -2162,7 +2163,7 @@ srom_search(struct net_device *dev, struct pci_dev *pdev) /* Set the device number information */ lp->device = PCI_SLOT(this_dev->devfn); lp->bus_num = pb; - + /* Set the chipset information */ if (is_DC2114x) { device = ((cfrv & CFRV_RN) < DC2114x_BRK ? DC21142 : DC21143); @@ -2175,7 +2176,7 @@ srom_search(struct net_device *dev, struct pci_dev *pdev) /* Fetch the IRQ to be used */ irq = this_dev->irq; if ((irq == 0) || (irq == 0xff) || ((int)irq == -1)) continue; - + /* Check if I/O accesses are enabled */ pci_read_config_word(this_dev, PCI_COMMAND, &status); if (!(status & PCI_COMMAND_IO)) continue; @@ -2253,7 +2254,7 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, lp = netdev_priv(dev); lp->bus = PCI; lp->bus_num = 0; - + /* Search for an SROM on this bus */ if (lp->bus_num != pb) { lp->bus_num = pb; @@ -2266,7 +2267,7 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, /* Set the device number information */ lp->device = dev_num; lp->bus_num = pb; - + /* Set the chipset information */ if (is_DC2114x) { device = ((lp->cfrv & CFRV_RN) < DC2114x_BRK ? DC21142 : DC21143); @@ -2282,7 +2283,7 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, error = -ENODEV; goto free_dev; } - + /* Check if I/O accesses and Bus Mastering are enabled */ pci_read_config_word(pdev, PCI_COMMAND, &status); #ifdef __powerpc__ @@ -2321,7 +2322,7 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, } dev->irq = irq; - + if ((error = de4x5_hw_init(dev, iobase, &pdev->dev))) { goto release; } @@ -2376,7 +2377,7 @@ static struct pci_driver de4x5_pci_driver = { ** Auto configure the media here rather than setting the port at compile ** time. This routine is called by de4x5_init() and when a loss of media is ** detected (excessive collisions, loss of carrier, no carrier or link fail -** [TP] or no recent receive activity) to check whether the user has been +** [TP] or no recent receive activity) to check whether the user has been ** sneaky and changed the port on us. */ static int @@ -2404,7 +2405,7 @@ autoconf_media(struct net_device *dev) } enable_ast(dev, next_tick); - + return (lp->media); } @@ -2427,7 +2428,7 @@ dc21040_autoconf(struct net_device *dev) u_long iobase = dev->base_addr; int next_tick = DE4X5_AUTOSENSE_MS; s32 imr; - + switch (lp->media) { case INIT: DISABLE_IRQs; @@ -2446,36 +2447,36 @@ dc21040_autoconf(struct net_device *dev) lp->local_state = 0; next_tick = dc21040_autoconf(dev); break; - + case TP: - next_tick = dc21040_state(dev, 0x8f01, 0xffff, 0x0000, 3000, BNC_AUI, + next_tick = dc21040_state(dev, 0x8f01, 0xffff, 0x0000, 3000, BNC_AUI, TP_SUSPECT, test_tp); break; - + case TP_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, TP, test_tp, dc21040_autoconf); break; - + case BNC: case AUI: case BNC_AUI: - next_tick = dc21040_state(dev, 0x8f09, 0x0705, 0x0006, 3000, EXT_SIA, + next_tick = dc21040_state(dev, 0x8f09, 0x0705, 0x0006, 3000, EXT_SIA, BNC_AUI_SUSPECT, ping_media); break; - + case BNC_AUI_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, BNC_AUI, ping_media, dc21040_autoconf); break; - + case EXT_SIA: - next_tick = dc21040_state(dev, 0x3041, 0x0000, 0x0006, 3000, + next_tick = dc21040_state(dev, 0x3041, 0x0000, 0x0006, 3000, NC, EXT_SIA_SUSPECT, ping_media); break; - + case EXT_SIA_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, EXT_SIA, ping_media, dc21040_autoconf); break; - + case NC: /* default to TP for all */ reset_init_sia(dev, 0x8f01, 0xffff, 0x0000); @@ -2487,13 +2488,13 @@ dc21040_autoconf(struct net_device *dev) lp->tx_enable = NO; break; } - + return next_tick; } static int dc21040_state(struct net_device *dev, int csr13, int csr14, int csr15, int timeout, - int next_state, int suspect_state, + int next_state, int suspect_state, int (*fn)(struct net_device *, int)) { struct de4x5_private *lp = netdev_priv(dev); @@ -2506,7 +2507,7 @@ dc21040_state(struct net_device *dev, int csr13, int csr14, int csr15, int timeo lp->local_state++; next_tick = 500; break; - + case 1: if (!lp->tx_enable) { linkBad = fn(dev, timeout); @@ -2526,7 +2527,7 @@ dc21040_state(struct net_device *dev, int csr13, int csr14, int csr15, int timeo } break; } - + return next_tick; } @@ -2581,7 +2582,7 @@ dc21041_autoconf(struct net_device *dev) u_long iobase = dev->base_addr; s32 sts, irqs, irq_mask, imr, omr; int next_tick = DE4X5_AUTOSENSE_MS; - + switch (lp->media) { case INIT: DISABLE_IRQs; @@ -2602,7 +2603,7 @@ dc21041_autoconf(struct net_device *dev) lp->local_state = 0; next_tick = dc21041_autoconf(dev); break; - + case TP_NW: if (lp->timeout < 0) { omr = inl(DE4X5_OMR);/* Set up full duplex for the autonegotiate */ @@ -2622,7 +2623,7 @@ dc21041_autoconf(struct net_device *dev) next_tick = dc21041_autoconf(dev); } break; - + case ANS: if (!lp->tx_enable) { irqs = STS_LNP; @@ -2644,11 +2645,11 @@ dc21041_autoconf(struct net_device *dev) next_tick = 3000; } break; - + case ANS_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, ANS, test_tp, dc21041_autoconf); break; - + case TP: if (!lp->tx_enable) { if (lp->timeout < 0) { @@ -2678,11 +2679,11 @@ dc21041_autoconf(struct net_device *dev) next_tick = 3000; } break; - + case TP_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, TP, test_tp, dc21041_autoconf); break; - + case AUI: if (!lp->tx_enable) { if (lp->timeout < 0) { @@ -2708,11 +2709,11 @@ dc21041_autoconf(struct net_device *dev) next_tick = 3000; } break; - + case AUI_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, AUI, ping_media, dc21041_autoconf); break; - + case BNC: switch (lp->local_state) { case 0: @@ -2730,7 +2731,7 @@ dc21041_autoconf(struct net_device *dev) next_tick = dc21041_autoconf(dev); } break; - + case 1: if (!lp->tx_enable) { if ((sts = ping_media(dev, 3000)) < 0) { @@ -2750,11 +2751,11 @@ dc21041_autoconf(struct net_device *dev) break; } break; - + case BNC_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, BNC, ping_media, dc21041_autoconf); break; - + case NC: omr = inl(DE4X5_OMR); /* Set up full duplex for the autonegotiate */ outl(omr | OMR_FDX, DE4X5_OMR); @@ -2767,7 +2768,7 @@ dc21041_autoconf(struct net_device *dev) lp->tx_enable = NO; break; } - + return next_tick; } @@ -2783,9 +2784,9 @@ dc21140m_autoconf(struct net_device *dev) int ana, anlpa, cap, cr, slnk, sr; int next_tick = DE4X5_AUTOSENSE_MS; u_long imr, omr, iobase = dev->base_addr; - + switch(lp->media) { - case INIT: + case INIT: if (lp->timeout < 0) { DISABLE_IRQs; lp->tx_enable = FALSE; @@ -2812,7 +2813,7 @@ dc21140m_autoconf(struct net_device *dev) lp->media = _100Mb; } else if (lp->autosense == _10Mb) { lp->media = _10Mb; - } else if ((lp->autosense == AUTO) && + } else if ((lp->autosense == AUTO) && ((sr=is_anc_capable(dev)) & MII_SR_ANC)) { ana = (((sr >> 6) & MII_ANA_TAF) | MII_ANA_CSMA); ana &= (lp->fdx ? ~0 : ~MII_ANA_FDAM); @@ -2830,7 +2831,7 @@ dc21140m_autoconf(struct net_device *dev) next_tick = dc21140m_autoconf(dev); } break; - + case ANS: switch (lp->local_state) { case 0: @@ -2850,7 +2851,7 @@ dc21140m_autoconf(struct net_device *dev) next_tick = dc21140m_autoconf(dev); } break; - + case 1: if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, TRUE, 2000)) < 0) { next_tick = sr & ~TIMER_CB; @@ -2861,7 +2862,7 @@ dc21140m_autoconf(struct net_device *dev) lp->tmp = MII_SR_ASSC; anlpa = mii_rd(MII_ANLPA, lp->phy[lp->active].addr, DE4X5_MII); ana = mii_rd(MII_ANA, lp->phy[lp->active].addr, DE4X5_MII); - if (!(anlpa & MII_ANLPA_RF) && + if (!(anlpa & MII_ANLPA_RF) && (cap = anlpa & MII_ANLPA_TAF & ana)) { if (cap & MII_ANA_100M) { lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) ? TRUE : FALSE); @@ -2878,10 +2879,10 @@ dc21140m_autoconf(struct net_device *dev) break; } break; - + case SPD_DET: /* Choose 10Mb/s or 100Mb/s */ if (lp->timeout < 0) { - lp->tmp = (lp->phy[lp->active].id ? MII_SR_LKS : + lp->tmp = (lp->phy[lp->active].id ? MII_SR_LKS : (~gep_rd(dev) & GEP_LNP)); SET_100Mb_PDET; } @@ -2898,7 +2899,7 @@ dc21140m_autoconf(struct net_device *dev) next_tick = dc21140m_autoconf(dev); } break; - + case _100Mb: /* Set 100Mb/s */ next_tick = 3000; if (!lp->tx_enable) { @@ -2932,7 +2933,7 @@ dc21140m_autoconf(struct net_device *dev) } } break; - + case NC: if (lp->media != lp->c_media) { de4x5_dbg_media(dev); @@ -2942,7 +2943,7 @@ dc21140m_autoconf(struct net_device *dev) lp->tx_enable = FALSE; break; } - + return next_tick; } @@ -3001,7 +3002,7 @@ dc2114x_autoconf(struct net_device *dev) lp->media = AUI; } else { lp->media = SPD_DET; - if ((lp->infoblock_media == ANS) && + if ((lp->infoblock_media == ANS) && ((sr=is_anc_capable(dev)) & MII_SR_ANC)) { ana = (((sr >> 6) & MII_ANA_TAF) | MII_ANA_CSMA); ana &= (lp->fdx ? ~0 : ~MII_ANA_FDAM); @@ -3013,7 +3014,7 @@ dc2114x_autoconf(struct net_device *dev) next_tick = dc2114x_autoconf(dev); } break; - + case ANS: switch (lp->local_state) { case 0: @@ -3033,7 +3034,7 @@ dc2114x_autoconf(struct net_device *dev) next_tick = dc2114x_autoconf(dev); } break; - + case 1: if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, TRUE, 2000)) < 0) { next_tick = sr & ~TIMER_CB; @@ -3044,7 +3045,7 @@ dc2114x_autoconf(struct net_device *dev) lp->tmp = MII_SR_ASSC; anlpa = mii_rd(MII_ANLPA, lp->phy[lp->active].addr, DE4X5_MII); ana = mii_rd(MII_ANA, lp->phy[lp->active].addr, DE4X5_MII); - if (!(anlpa & MII_ANLPA_RF) && + if (!(anlpa & MII_ANLPA_RF) && (cap = anlpa & MII_ANLPA_TAF & ana)) { if (cap & MII_ANA_100M) { lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) ? TRUE : FALSE); @@ -3086,11 +3087,11 @@ dc2114x_autoconf(struct net_device *dev) next_tick = 3000; } break; - + case AUI_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, AUI, ping_media, dc2114x_autoconf); break; - + case BNC: switch (lp->local_state) { case 0: @@ -3108,7 +3109,7 @@ dc2114x_autoconf(struct net_device *dev) next_tick = dc2114x_autoconf(dev); } break; - + case 1: if (!lp->tx_enable) { if ((sts = ping_media(dev, 3000)) < 0) { @@ -3129,11 +3130,11 @@ dc2114x_autoconf(struct net_device *dev) break; } break; - + case BNC_SUSPECT: next_tick = de4x5_suspect_state(dev, 1000, BNC, ping_media, dc2114x_autoconf); break; - + case SPD_DET: /* Choose 10Mb/s or 100Mb/s */ if (srom_map_media(dev) < 0) { lp->tcount++; @@ -3160,7 +3161,7 @@ dc2114x_autoconf(struct net_device *dev) next_tick = dc2114x_autoconf(dev); } else if (((lp->media == _100Mb) && is_100_up(dev)) || (((lp->media == _10Mb) || (lp->media == TP) || - (lp->media == BNC) || (lp->media == AUI)) && + (lp->media == BNC) || (lp->media == AUI)) && is_10_up(dev))) { next_tick = dc2114x_autoconf(dev); } else { @@ -3168,7 +3169,7 @@ dc2114x_autoconf(struct net_device *dev) lp->media = INIT; } break; - + case _10Mb: next_tick = 3000; if (!lp->tx_enable) { @@ -3207,7 +3208,7 @@ printk("Huh?: media:%02x\n", lp->media); lp->media = INIT; break; } - + return next_tick; } @@ -3230,7 +3231,7 @@ srom_map_media(struct net_device *dev) struct de4x5_private *lp = netdev_priv(dev); lp->fdx = 0; - if (lp->infoblock_media == lp->media) + if (lp->infoblock_media == lp->media) return 0; switch(lp->infoblock_media) { @@ -3269,7 +3270,7 @@ srom_map_media(struct net_device *dev) case SROM_100BASEFF: if (!lp->params.fdx) return -1; lp->fdx = TRUE; - case SROM_100BASEF: + case SROM_100BASEF: if (lp->params.fdx && !lp->fdx) return -1; lp->media = _100Mb; break; @@ -3279,8 +3280,8 @@ srom_map_media(struct net_device *dev) lp->fdx = lp->params.fdx; break; - default: - printk("%s: Bad media code [%d] detected in SROM!\n", dev->name, + default: + printk("%s: Bad media code [%d] detected in SROM!\n", dev->name, lp->infoblock_media); return -1; break; @@ -3358,7 +3359,7 @@ test_media(struct net_device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 sts, csr12; - + if (lp->timeout < 0) { lp->timeout = msec/100; if (!lp->useSROM) { /* Already done if by SROM, else dc2104[01] */ @@ -3371,22 +3372,22 @@ test_media(struct net_device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, /* clear all pending interrupts */ sts = inl(DE4X5_STS); outl(sts, DE4X5_STS); - + /* clear csr12 NRA and SRA bits */ if ((lp->chipset == DC21041) || lp->useSROM) { csr12 = inl(DE4X5_SISR); outl(csr12, DE4X5_SISR); } } - + sts = inl(DE4X5_STS) & ~TIMER_CB; - + if (!(sts & irqs) && --lp->timeout) { sts = 100 | TIMER_CB; } else { lp->timeout = -1; } - + return sts; } @@ -3396,11 +3397,11 @@ test_tp(struct net_device *dev, s32 msec) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int sisr; - + if (lp->timeout < 0) { lp->timeout = msec/100; } - + sisr = (inl(DE4X5_SISR) & ~TIMER_CB) & (SISR_LKF | SISR_NCR); if (sisr && --lp->timeout) { @@ -3408,7 +3409,7 @@ test_tp(struct net_device *dev, s32 msec) } else { lp->timeout = -1; } - + return sisr; } @@ -3435,7 +3436,7 @@ test_for_100Mb(struct net_device *dev, int msec) lp->timeout = msec/SAMPLE_INTERVAL; } } - + if (lp->phy[lp->active].id || lp->useSROM) { gep = is_100_up(dev) | is_spd_100(dev); } else { @@ -3446,7 +3447,7 @@ test_for_100Mb(struct net_device *dev, int msec) } else { lp->timeout = -1; } - + return gep; } @@ -3458,13 +3459,13 @@ wait_for_link(struct net_device *dev) if (lp->timeout < 0) { lp->timeout = 1; } - + if (lp->timeout--) { return TIMER_CB; } else { lp->timeout = -1; } - + return 0; } @@ -3478,21 +3479,21 @@ test_mii_reg(struct net_device *dev, int reg, int mask, int pol, long msec) struct de4x5_private *lp = netdev_priv(dev); int test; u_long iobase = dev->base_addr; - + if (lp->timeout < 0) { lp->timeout = msec/100; } - + if (pol) pol = ~0; reg = mii_rd((u_char)reg, lp->phy[lp->active].addr, DE4X5_MII) & mask; test = (reg ^ pol) & mask; - + if (test && --lp->timeout) { reg = 100 | TIMER_CB; } else { lp->timeout = -1; } - + return reg; } @@ -3502,7 +3503,7 @@ is_spd_100(struct net_device *dev) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int spd; - + if (lp->useMII) { spd = mii_rd(lp->phy[lp->active].spd.reg, lp->phy[lp->active].addr, DE4X5_MII); spd = ~(spd ^ lp->phy[lp->active].spd.value); @@ -3516,7 +3517,7 @@ is_spd_100(struct net_device *dev) spd = (lp->asBitValid & (lp->asPolarity ^ (gep_rd(dev) & lp->asBit))) | (lp->linkOK & ~lp->asBitValid); } - + return spd; } @@ -3525,7 +3526,7 @@ is_100_up(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; - + if (lp->useMII) { /* Double read for sticky bits & temporary drops */ mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII); @@ -3546,7 +3547,7 @@ is_10_up(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; - + if (lp->useMII) { /* Double read for sticky bits & temporary drops */ mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII); @@ -3569,7 +3570,7 @@ is_anc_capable(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; - + if (lp->phy[lp->active].id && (!lp->useSROM || lp->useMII)) { return (mii_rd(MII_SR, lp->phy[lp->active].addr, DE4X5_MII)); } else if ((lp->chipset & ~0x00ff) == DC2114x) { @@ -3589,24 +3590,24 @@ ping_media(struct net_device *dev, int msec) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; int sisr; - + if (lp->timeout < 0) { lp->timeout = msec/100; - + lp->tmp = lp->tx_new; /* Remember the ring position */ load_packet(dev, lp->frame, TD_LS | TD_FS | sizeof(lp->frame), (struct sk_buff *)1); lp->tx_new = (++lp->tx_new) % lp->txRingSize; outl(POLL_DEMAND, DE4X5_TPD); } - + sisr = inl(DE4X5_SISR); - if ((!(sisr & SISR_NCR)) && - ((s32)le32_to_cpu(lp->tx_ring[lp->tmp].status) < 0) && + if ((!(sisr & SISR_NCR)) && + ((s32)le32_to_cpu(lp->tx_ring[lp->tmp].status) < 0) && (--lp->timeout)) { sisr = 100 | TIMER_CB; } else { - if ((!(sisr & SISR_NCR)) && + if ((!(sisr & SISR_NCR)) && !(le32_to_cpu(lp->tx_ring[lp->tmp].status) & (T_OWN | TD_ES)) && lp->timeout) { sisr = 0; @@ -3615,7 +3616,7 @@ ping_media(struct net_device *dev, int msec) } lp->timeout = -1; } - + return sisr; } @@ -3667,7 +3668,7 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len) } else { /* Linear buffer */ memcpy(skb_put(p,len),lp->rx_bufs + lp->rx_old * RX_BUFF_SZ,len); } - + return p; #endif } @@ -3750,23 +3751,23 @@ de4x5_rst_desc_ring(struct net_device *dev) outl(lp->dma_rings, DE4X5_RRBA); outl(lp->dma_rings + NUM_RX_DESC * sizeof(struct de4x5_desc), DE4X5_TRBA); - + lp->rx_new = lp->rx_old = 0; lp->tx_new = lp->tx_old = 0; - + for (i = 0; i < lp->rxRingSize; i++) { lp->rx_ring[i].status = cpu_to_le32(R_OWN); } - + for (i = 0; i < lp->txRingSize; i++) { lp->tx_ring[i].status = cpu_to_le32(0); } - + barrier(); lp->cache.save_cnt--; START_DE4X5; } - + return; } @@ -3791,7 +3792,7 @@ de4x5_cache_state(struct net_device *dev, int flag) gep_wr(lp->cache.gepc, dev); gep_wr(lp->cache.gep, dev); } else { - reset_init_sia(dev, lp->cache.csr13, lp->cache.csr14, + reset_init_sia(dev, lp->cache.csr13, lp->cache.csr14, lp->cache.csr15); } break; @@ -3853,25 +3854,25 @@ test_ans(struct net_device *dev, s32 irqs, s32 irq_mask, s32 msec) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 sts, ans; - + if (lp->timeout < 0) { lp->timeout = msec/100; outl(irq_mask, DE4X5_IMR); - + /* clear all pending interrupts */ sts = inl(DE4X5_STS); outl(sts, DE4X5_STS); } - + ans = inl(DE4X5_SISR) & SISR_ANS; sts = inl(DE4X5_STS) & ~TIMER_CB; - + if (!(sts & irqs) && (ans ^ ANS_NWOK) && --lp->timeout) { sts = 100 | TIMER_CB; } else { lp->timeout = -1; } - + return sts; } @@ -3881,7 +3882,7 @@ de4x5_setup_intr(struct net_device *dev) struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; s32 imr, sts; - + if (inl(DE4X5_OMR) & OMR_SR) { /* Only unmask if TX/RX is enabled */ imr = 0; UNMASK_IRQs; @@ -3889,7 +3890,7 @@ de4x5_setup_intr(struct net_device *dev) outl(sts, DE4X5_STS); ENABLE_IRQs; } - + return; } @@ -3935,17 +3936,17 @@ create_packet(struct net_device *dev, char *frame, int len) { int i; char *buf = frame; - + for (i=0; idev_addr[i]; } for (i=0; idev_addr[i]; } - + *buf++ = 0; /* Packet length (2 bytes) */ *buf++ = 1; - + return; } @@ -3977,7 +3978,7 @@ static int PCI_signature(char *name, struct de4x5_private *lp) { int i, status = 0, siglen = sizeof(de4x5_signatures)/sizeof(c_char *); - + if (lp->chipset == DC21040) { strcpy(name, "DE434/5"); return status; @@ -4006,7 +4007,7 @@ PCI_signature(char *name, struct de4x5_private *lp) } else if ((lp->chipset & ~0x00ff) == DC2114x) { lp->useSROM = TRUE; } - + return status; } @@ -4023,7 +4024,7 @@ DevicePresent(struct net_device *dev, u_long aprom_addr) { int i, j=0; struct de4x5_private *lp = netdev_priv(dev); - + if (lp->chipset == DC21040) { if (lp->bus == EISA) { enet_addr_rst(aprom_addr); /* Reset Ethernet Address ROM Pointer */ @@ -4048,7 +4049,7 @@ DevicePresent(struct net_device *dev, u_long aprom_addr) } de4x5_dbg_srom((struct de4x5_srom *)&lp->srom); } - + return; } @@ -4070,11 +4071,11 @@ enet_addr_rst(u_long aprom_addr) short sigLength=0; s8 data; int i, j; - + dev.llsig.a = ETH_PROM_SIG; dev.llsig.b = ETH_PROM_SIG; sigLength = sizeof(u32) << 1; - + for (i=0,j=0;j 0xffff) k-=0xffff; - + if (lp->bus == PCI) { if (lp->chipset == DC21040) { while ((tmp = inl(DE4X5_APROM)) < 0); @@ -4132,11 +4133,11 @@ get_hw_addr(struct net_device *dev) k += (u_short) ((tmp = inb(EISA_APROM)) << 8); dev->dev_addr[i++] = (u_char) tmp; } - + if (k > 0xffff) k-=0xffff; } if (k == 0xffff) k=0; - + if (lp->bus == PCI) { if (lp->chipset == DC21040) { while ((tmp = inl(DE4X5_APROM)) < 0); @@ -4155,7 +4156,7 @@ get_hw_addr(struct net_device *dev) srom_repair(dev, broken); #ifdef CONFIG_PPC_MULTIPLATFORM - /* + /* ** If the address starts with 00 a0, we have to bit-reverse ** each byte of the address. */ @@ -4244,7 +4245,7 @@ test_bad_enet(struct net_device *dev, int status) for (tmp=0,i=0; idev_addr[i]; if ((tmp == 0) || (tmp == 0x5fa)) { - if ((lp->chipset == last.chipset) && + if ((lp->chipset == last.chipset) && (lp->bus_num == last.bus) && (lp->bus_num > 0)) { for (i=0; idev_addr[i] = last.addr[i]; for (i=ETH_ALEN-1; i>2; --i) { @@ -4274,7 +4275,7 @@ test_bad_enet(struct net_device *dev, int status) static int an_exception(struct de4x5_private *lp) { - if ((*(u_short *)lp->srom.sub_vendor_id == 0x00c0) && + if ((*(u_short *)lp->srom.sub_vendor_id == 0x00c0) && (*(u_short *)lp->srom.sub_system_id == 0x95e0)) { return -1; } @@ -4289,11 +4290,11 @@ static short srom_rd(u_long addr, u_char offset) { sendto_srom(SROM_RD | SROM_SR, addr); - + srom_latch(SROM_RD | SROM_SR | DT_CS, addr); srom_command(SROM_RD | SROM_SR | DT_IN | DT_CS, addr); srom_address(SROM_RD | SROM_SR | DT_CS, addr, offset); - + return srom_data(SROM_RD | SROM_SR | DT_CS, addr); } @@ -4303,7 +4304,7 @@ srom_latch(u_int command, u_long addr) sendto_srom(command, addr); sendto_srom(command | DT_CLK, addr); sendto_srom(command, addr); - + return; } @@ -4313,7 +4314,7 @@ srom_command(u_int command, u_long addr) srom_latch(command, addr); srom_latch(command, addr); srom_latch((command & 0x0000ff00) | DT_CS, addr); - + return; } @@ -4321,15 +4322,15 @@ static void srom_address(u_int command, u_long addr, u_char offset) { int i, a; - + a = offset << 2; for (i=0; i<6; i++, a <<= 1) { srom_latch(command | ((a & 0x80) ? DT_IN : 0), addr); } udelay(1); - + i = (getfrom_srom(addr) >> 3) & 0x01; - + return; } @@ -4339,17 +4340,17 @@ srom_data(u_int command, u_long addr) int i; short word = 0; s32 tmp; - + for (i=0; i<16; i++) { sendto_srom(command | DT_CLK, addr); tmp = getfrom_srom(addr); sendto_srom(command, addr); - + word = (word << 1) | ((tmp >> 3) & 0x01); } - + sendto_srom(command & 0x0000ff00, addr); - + return word; } @@ -4358,13 +4359,13 @@ static void srom_busy(u_int command, u_long addr) { sendto_srom((command & 0x0000ff00) | DT_CS, addr); - + while (!((getfrom_srom(addr) >> 3) & 0x01)) { mdelay(1); } - + sendto_srom(command & 0x0000ff00, addr); - + return; } */ @@ -4374,7 +4375,7 @@ sendto_srom(u_int command, u_long addr) { outl(command, addr); udelay(1); - + return; } @@ -4382,10 +4383,10 @@ static int getfrom_srom(u_long addr) { s32 tmp; - + tmp = inl(addr); udelay(1); - + return tmp; } @@ -4402,7 +4403,7 @@ srom_infoleaf_info(struct net_device *dev) } if (i == INFOLEAF_SIZE) { lp->useSROM = FALSE; - printk("%s: Cannot find correct chipset for SROM decoding!\n", + printk("%s: Cannot find correct chipset for SROM decoding!\n", dev->name); return -ENXIO; } @@ -4419,7 +4420,7 @@ srom_infoleaf_info(struct net_device *dev) } if (i == 0) { lp->useSROM = FALSE; - printk("%s: Cannot find correct PCI device [%d] for SROM decoding!\n", + printk("%s: Cannot find correct PCI device [%d] for SROM decoding!\n", dev->name, lp->device); return -ENXIO; } @@ -4493,9 +4494,9 @@ srom_exec(struct net_device *dev, u_char *p) if (((lp->ibn != 1) && (lp->ibn != 3) && (lp->ibn != 5)) || !count) return; if (lp->chipset != DC21140) RESET_SIA; - + while (count--) { - gep_wr(((lp->chipset==DC21140) && (lp->ibn!=5) ? + gep_wr(((lp->chipset==DC21140) && (lp->ibn!=5) ? *p++ : TWIDDLE(w++)), dev); mdelay(2); /* 2ms per action */ } @@ -4513,13 +4514,13 @@ srom_exec(struct net_device *dev, u_char *p) ** unless I implement the DC21041 SROM functions. There's no need ** since the existing code will be satisfactory for all boards. */ -static int +static int dc21041_infoleaf(struct net_device *dev) { return DE4X5_AUTOSENSE_MS; } -static int +static int dc21140_infoleaf(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); @@ -4557,7 +4558,7 @@ dc21140_infoleaf(struct net_device *dev) return next_tick & ~TIMER_CB; } -static int +static int dc21142_infoleaf(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); @@ -4592,7 +4593,7 @@ dc21142_infoleaf(struct net_device *dev) return next_tick & ~TIMER_CB; } -static int +static int dc21143_infoleaf(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); @@ -4630,7 +4631,7 @@ dc21143_infoleaf(struct net_device *dev) ** The compact infoblock is only designed for DC21140[A] chips, so ** we'll reuse the dc21140m_autoconf function. Non MII media only. */ -static int +static int compact_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4670,7 +4671,7 @@ compact_infoblock(struct net_device *dev, u_char count, u_char *p) /* ** This block describes non MII media for the DC21140[A] only. */ -static int +static int type0_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4710,7 +4711,7 @@ type0_infoblock(struct net_device *dev, u_char count, u_char *p) /* These functions are under construction! */ -static int +static int type1_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4749,7 +4750,7 @@ type1_infoblock(struct net_device *dev, u_char count, u_char *p) return dc21140m_autoconf(dev); } -static int +static int type2_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4790,7 +4791,7 @@ type2_infoblock(struct net_device *dev, u_char count, u_char *p) return dc2114x_autoconf(dev); } -static int +static int type3_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4832,7 +4833,7 @@ type3_infoblock(struct net_device *dev, u_char count, u_char *p) return dc2114x_autoconf(dev); } -static int +static int type4_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4877,7 +4878,7 @@ type4_infoblock(struct net_device *dev, u_char count, u_char *p) ** This block type provides information for resetting external devices ** (chips) through the General Purpose Register. */ -static int +static int type5_infoblock(struct net_device *dev, u_char count, u_char *p) { struct de4x5_private *lp = netdev_priv(dev); @@ -4915,7 +4916,7 @@ mii_rd(u_char phyreg, u_char phyaddr, u_long ioaddr) mii_address(phyaddr, ioaddr); /* PHY address to be accessed */ mii_address(phyreg, ioaddr); /* PHY Register to read */ mii_ta(MII_STRD, ioaddr); /* Turn around time - 2 MDC */ - + return mii_rdata(ioaddr); /* Read data */ } @@ -4930,7 +4931,7 @@ mii_wr(int data, u_char phyreg, u_char phyaddr, u_long ioaddr) mii_ta(MII_STWR, ioaddr); /* Turn around time - 2 MDC */ data = mii_swap(data, 16); /* Swap data bit ordering */ mii_wdata(data, 16, ioaddr); /* Write data */ - + return; } @@ -4939,12 +4940,12 @@ mii_rdata(u_long ioaddr) { int i; s32 tmp = 0; - + for (i=0; i<16; i++) { tmp <<= 1; tmp |= getfrom_mii(MII_MRD | MII_RD, ioaddr); } - + return tmp; } @@ -4952,12 +4953,12 @@ static void mii_wdata(int data, int len, u_long ioaddr) { int i; - + for (i=0; i>= 1; } - + return; } @@ -4965,13 +4966,13 @@ static void mii_address(u_char addr, u_long ioaddr) { int i; - + addr = mii_swap(addr, 5); for (i=0; i<5; i++) { sendto_mii(MII_MWR | MII_WR, addr, ioaddr); addr >>= 1; } - + return; } @@ -4979,12 +4980,12 @@ static void mii_ta(u_long rw, u_long ioaddr) { if (rw == MII_STWR) { - sendto_mii(MII_MWR | MII_WR, 1, ioaddr); - sendto_mii(MII_MWR | MII_WR, 0, ioaddr); + sendto_mii(MII_MWR | MII_WR, 1, ioaddr); + sendto_mii(MII_MWR | MII_WR, 0, ioaddr); } else { getfrom_mii(MII_MRD | MII_RD, ioaddr); /* Tri-state MDIO */ } - + return; } @@ -4992,13 +4993,13 @@ static int mii_swap(int data, int len) { int i, tmp = 0; - + for (i=0; i>= 1; } - + return tmp; } @@ -5006,13 +5007,13 @@ static void sendto_mii(u32 command, int data, u_long ioaddr) { u32 j; - + j = (data & 1) << 17; outl(command | j, ioaddr); udelay(1); outl(command | MII_MDC | j, ioaddr); udelay(1); - + return; } @@ -5023,7 +5024,7 @@ getfrom_mii(u32 command, u_long ioaddr) udelay(1); outl(command | MII_MDC, ioaddr); udelay(1); - + return ((inl(ioaddr) >> 19) & 1); } @@ -5084,7 +5085,7 @@ mii_get_phy(struct net_device *dev) u_long iobase = dev->base_addr; int i, j, k, n, limit=sizeof(phy_info)/sizeof(struct phy_table); int id; - + lp->active = 0; lp->useMII = TRUE; @@ -5093,7 +5094,7 @@ mii_get_phy(struct net_device *dev) lp->phy[lp->active].addr = i; if (i==0) n++; /* Count cycles */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */ - id = mii_get_oui(i, DE4X5_MII); + id = mii_get_oui(i, DE4X5_MII); if ((id == 0) || (id == 65535)) continue; /* Valid ID? */ for (j=0; jphy[k].id && (k < DE4X5_MAX_PHY); k++) { /*For each PHY*/ mii_wr(MII_CR_RST, MII_CR, lp->phy[k].addr, DE4X5_MII); while (mii_rd(MII_CR, lp->phy[k].addr, DE4X5_MII) & MII_CR_RST); - + de4x5_dbg_mii(dev, k); } } @@ -5147,12 +5148,12 @@ build_setup_frame(struct net_device *dev, int mode) struct de4x5_private *lp = netdev_priv(dev); int i; char *pa = lp->setup_frame; - + /* Initialise the setup frame */ if (mode == ALL) { memset(lp->setup_frame, 0, SETUP_FRAME_LEN); } - + if (lp->setup_f == HASH_PERF) { for (pa=lp->setup_frame+IMPERF_PA_OFFSET, i=0; idev_addr[i]; /* Host address */ @@ -5169,7 +5170,7 @@ build_setup_frame(struct net_device *dev, int mode) if (i & 0x01) pa += 4; } } - + return pa; /* Points to the next entry */ } @@ -5177,7 +5178,7 @@ static void enable_ast(struct net_device *dev, u32 time_out) { timeout(dev, (void *)&de4x5_ast, (u_long)dev, time_out); - + return; } @@ -5185,9 +5186,9 @@ static void disable_ast(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); - + del_timer(&lp->timer); - + return; } @@ -5206,10 +5207,10 @@ de4x5_switch_mac_port(struct net_device *dev) omr |= lp->infoblock_csr6; if (omr & OMR_PS) omr |= OMR_HBD; outl(omr, DE4X5_OMR); - + /* Soft Reset */ RESET_DE4X5; - + /* Restore the GEP - especially for COMPACT and Type 0 Infoblocks */ if (lp->chipset == DC21140) { gep_wr(lp->cache.gepc, dev); @@ -5262,21 +5263,21 @@ timeout(struct net_device *dev, void (*fn)(u_long data), u_long data, u_long mse { struct de4x5_private *lp = netdev_priv(dev); int dt; - + /* First, cancel any pending timer events */ del_timer(&lp->timer); - + /* Convert msec to ticks */ dt = (msec * HZ) / 1000; if (dt==0) dt=1; - + /* Set up timer */ init_timer(&lp->timer); lp->timer.expires = jiffies + dt; lp->timer.function = fn; lp->timer.data = data; add_timer(&lp->timer); - + return; } @@ -5374,7 +5375,7 @@ de4x5_dbg_open(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); int i; - + if (de4x5_debug & DEBUG_OPEN) { printk("%s: de4x5 opening with irq %d\n",dev->name,dev->irq); printk("\tphysical address: "); @@ -5412,11 +5413,11 @@ de4x5_dbg_open(struct net_device *dev) } } printk("...0x%8.8x\n", le32_to_cpu(lp->tx_ring[i].buf)); - printk("Ring size: \nRX: %d\nTX: %d\n", - (short)lp->rxRingSize, - (short)lp->txRingSize); + printk("Ring size: \nRX: %d\nTX: %d\n", + (short)lp->rxRingSize, + (short)lp->txRingSize); } - + return; } @@ -5425,7 +5426,7 @@ de4x5_dbg_mii(struct net_device *dev, int k) { struct de4x5_private *lp = netdev_priv(dev); u_long iobase = dev->base_addr; - + if (de4x5_debug & DEBUG_MII) { printk("\nMII device address: %d\n", lp->phy[k].addr); printk("MII CR: %x\n",mii_rd(MII_CR,lp->phy[k].addr,DE4X5_MII)); @@ -5444,7 +5445,7 @@ de4x5_dbg_mii(struct net_device *dev, int k) printk("MII 20: %x\n",mii_rd(0x14,lp->phy[k].addr,DE4X5_MII)); } } - + return; } @@ -5452,17 +5453,17 @@ static void de4x5_dbg_media(struct net_device *dev) { struct de4x5_private *lp = netdev_priv(dev); - + if (lp->media != lp->c_media) { if (de4x5_debug & DEBUG_MEDIA) { printk("%s: media is %s%s\n", dev->name, (lp->media == NC ? "unconnected, link down or incompatible connection" : (lp->media == TP ? "TP" : (lp->media == ANS ? "TP/Nway" : - (lp->media == BNC ? "BNC" : - (lp->media == AUI ? "AUI" : - (lp->media == BNC_AUI ? "BNC/AUI" : - (lp->media == EXT_SIA ? "EXT SIA" : + (lp->media == BNC ? "BNC" : + (lp->media == AUI ? "AUI" : + (lp->media == BNC_AUI ? "BNC/AUI" : + (lp->media == EXT_SIA ? "EXT SIA" : (lp->media == _100Mb ? "100Mb/s" : (lp->media == _10Mb ? "10Mb/s" : "???" @@ -5470,7 +5471,7 @@ de4x5_dbg_media(struct net_device *dev) } lp->c_media = lp->media; } - + return; } @@ -5553,7 +5554,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) u32 lval[36]; } tmp; u_long flags = 0; - + switch(ioc->cmd) { case DE4X5_GET_HWADDR: /* Get the hardware address */ ioc->len = ETH_ALEN; @@ -5574,7 +5575,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } build_setup_frame(dev, PHYS_ADDR_ONLY); /* Set up the descriptor and give ownership to the card */ - load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | + load_packet(dev, lp->setup_frame, TD_IC | PERFECT_F | TD_SET | SETUP_FRAME_LEN, (struct sk_buff *)1); lp->tx_new = (++lp->tx_new) % lp->txRingSize; outl(POLL_DEMAND, DE4X5_TPD); /* Start the TX */ @@ -5616,8 +5617,8 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) spin_lock_irqsave(&lp->lock, flags); memcpy(&statbuf, &lp->pktStats, ioc->len); spin_unlock_irqrestore(&lp->lock, flags); - if (copy_to_user(ioc->data, &statbuf, ioc->len)) - return -EFAULT; + if (copy_to_user(ioc->data, &statbuf, ioc->len)) + return -EFAULT; break; } case DE4X5_CLR_STATS: /* Zero out the driver statistics */ @@ -5651,9 +5652,9 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ioc->len = j; if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; break; - + #define DE4X5_DUMP 0x0f /* Dump the DE4X5 Status */ -/* +/* case DE4X5_DUMP: j = 0; tmp.addr[j++] = dev->irq; @@ -5663,7 +5664,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) tmp.addr[j++] = lp->rxRingSize; tmp.lval[j>>2] = (long)lp->rx_ring; j+=4; tmp.lval[j>>2] = (long)lp->tx_ring; j+=4; - + for (i=0;irxRingSize-1;i++){ if (i < 3) { tmp.lval[j>>2] = (long)&lp->rx_ring[i].status; j+=4; @@ -5676,7 +5677,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } } tmp.lval[j>>2] = (long)&lp->tx_ring[i].status; j+=4; - + for (i=0;irxRingSize-1;i++){ if (i < 3) { tmp.lval[j>>2] = (s32)le32_to_cpu(lp->rx_ring[i].buf); j+=4; @@ -5689,14 +5690,14 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } } tmp.lval[j>>2] = (s32)le32_to_cpu(lp->tx_ring[i].buf); j+=4; - + for (i=0;irxRingSize;i++){ tmp.lval[j>>2] = le32_to_cpu(lp->rx_ring[i].status); j+=4; } for (i=0;itxRingSize;i++){ tmp.lval[j>>2] = le32_to_cpu(lp->tx_ring[i].status); j+=4; } - + tmp.lval[j>>2] = inl(DE4X5_BMR); j+=4; tmp.lval[j>>2] = inl(DE4X5_TPD); j+=4; tmp.lval[j>>2] = inl(DE4X5_RPD); j+=4; @@ -5705,18 +5706,18 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) tmp.lval[j>>2] = inl(DE4X5_STS); j+=4; tmp.lval[j>>2] = inl(DE4X5_OMR); j+=4; tmp.lval[j>>2] = inl(DE4X5_IMR); j+=4; - tmp.lval[j>>2] = lp->chipset; j+=4; + tmp.lval[j>>2] = lp->chipset; j+=4; if (lp->chipset == DC21140) { tmp.lval[j>>2] = gep_rd(dev); j+=4; } else { tmp.lval[j>>2] = inl(DE4X5_SISR); j+=4; tmp.lval[j>>2] = inl(DE4X5_SICR); j+=4; tmp.lval[j>>2] = inl(DE4X5_STRR); j+=4; - tmp.lval[j>>2] = inl(DE4X5_SIGR); j+=4; + tmp.lval[j>>2] = inl(DE4X5_SIGR); j+=4; } - tmp.lval[j>>2] = lp->phy[lp->active].id; j+=4; + tmp.lval[j>>2] = lp->phy[lp->active].id; j+=4; if (lp->phy[lp->active].id && (!lp->useSROM || lp->useMII)) { - tmp.lval[j>>2] = lp->active; j+=4; + tmp.lval[j>>2] = lp->active; j+=4; tmp.lval[j>>2]=mii_rd(MII_CR,lp->phy[lp->active].addr,DE4X5_MII); j+=4; tmp.lval[j>>2]=mii_rd(MII_SR,lp->phy[lp->active].addr,DE4X5_MII); j+=4; tmp.lval[j>>2]=mii_rd(MII_ID0,lp->phy[lp->active].addr,DE4X5_MII); j+=4; @@ -5733,10 +5734,10 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) tmp.lval[j>>2]=mii_rd(0x14,lp->phy[lp->active].addr,DE4X5_MII); j+=4; } } - + tmp.addr[j++] = lp->txRingSize; tmp.addr[j++] = netif_queue_stopped(dev); - + ioc->len = j; if (copy_to_user(ioc->data, tmp.addr, ioc->len)) return -EFAULT; break; @@ -5745,7 +5746,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) default: return -EOPNOTSUPP; } - + return status; } diff --git a/drivers/net/tulip/de4x5.h b/drivers/net/tulip/de4x5.h index 57226e5eb..ad37a4074 100644 --- a/drivers/net/tulip/de4x5.h +++ b/drivers/net/tulip/de4x5.h @@ -38,11 +38,11 @@ /* ** EISA Register Address Map */ -#define EISA_ID iobase+0x0c80 /* EISA ID Registers */ -#define EISA_ID0 iobase+0x0c80 /* EISA ID Register 0 */ -#define EISA_ID1 iobase+0x0c81 /* EISA ID Register 1 */ -#define EISA_ID2 iobase+0x0c82 /* EISA ID Register 2 */ -#define EISA_ID3 iobase+0x0c83 /* EISA ID Register 3 */ +#define EISA_ID iobase+0x0c80 /* EISA ID Registers */ +#define EISA_ID0 iobase+0x0c80 /* EISA ID Register 0 */ +#define EISA_ID1 iobase+0x0c81 /* EISA ID Register 1 */ +#define EISA_ID2 iobase+0x0c82 /* EISA ID Register 2 */ +#define EISA_ID3 iobase+0x0c83 /* EISA ID Register 3 */ #define EISA_CR iobase+0x0c84 /* EISA Control Register */ #define EISA_REG0 iobase+0x0c88 /* EISA Configuration Register 0 */ #define EISA_REG1 iobase+0x0c89 /* EISA Configuration Register 1 */ @@ -1008,8 +1008,8 @@ struct de4x5_ioctl { unsigned char __user *data; /* Pointer to the data buffer */ }; -/* -** Recognised commands for the driver +/* +** Recognised commands for the driver */ #define DE4X5_GET_HWADDR 0x01 /* Get the hardware address */ #define DE4X5_SET_HWADDR 0x02 /* Set the hardware address */ diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 4e5b0f2ac..74e9075d9 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c @@ -50,7 +50,7 @@ forget to unmap PCI mapped skbs. Alan Cox - Added new PCI identifiers provided by Clear Zhang at ALi + Added new PCI identifiers provided by Clear Zhang at ALi for their 1563 ethernet device. TODO @@ -506,7 +506,7 @@ static int dmfe_open(struct DEVICE *dev) DMFE_DBUG(0, "dmfe_open", 0); - ret = request_irq(dev->irq, &dmfe_interrupt, IRQF_SHARED, dev->name, dev); + ret = request_irq(dev->irq, &dmfe_interrupt, SA_SHIRQ, dev->name, dev); if (ret) return ret; diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 5ffbd5b30..fbd9ab60b 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c @@ -96,11 +96,11 @@ static const char *block_name[] __devinitdata = { * tulip_build_fake_mediatable - Build a fake mediatable entry. * @tp: Ptr to the tulip private data. * - * Some cards like the 3x5 HSC cards (J3514A) do not have a standard + * Some cards like the 3x5 HSC cards (J3514A) do not have a standard * srom and can not be handled under the fixup routine. These cards - * still need a valid mediatable entry for correct csr12 setup and + * still need a valid mediatable entry for correct csr12 setup and * mii handling. - * + * * Since this is currently a parisc-linux specific function, the * #ifdef __hppa__ should completely optimize this function away for * non-parisc hardware. @@ -140,7 +140,7 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp) tp->flags |= HAS_PHY_IRQ; tp->csr12_shadow = -1; } -#endif +#endif } void __devinit tulip_parse_eeprom(struct net_device *dev) diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c index 99ccf2ebb..bb3558164 100644 --- a/drivers/net/tulip/interrupt.c +++ b/drivers/net/tulip/interrupt.c @@ -16,6 +16,7 @@ #include #include "tulip.h" +#include #include int tulip_rx_copybreak; @@ -138,22 +139,22 @@ int tulip_poll(struct net_device *dev, int *budget) } /* Acknowledge current RX interrupt sources. */ iowrite32((RxIntr | RxNoBuf), tp->base_addr + CSR5); - - + + /* If we own the next entry, it is a new packet. Send it up. */ while ( ! (tp->rx_ring[entry].status & cpu_to_le32(DescOwned))) { s32 status = le32_to_cpu(tp->rx_ring[entry].status); - - + + if (tp->dirty_rx + RX_RING_SIZE == tp->cur_rx) break; - + if (tulip_debug > 5) printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n", dev->name, entry, status); if (--rx_work_limit < 0) goto not_done; - + if ((status & 0x38008300) != 0x0300) { if ((status & 0x38000300) != 0x0300) { /* Ingore earlier buffers. */ @@ -179,7 +180,7 @@ int tulip_poll(struct net_device *dev, int *budget) /* Omit the four octet CRC from the length. */ short pkt_len = ((status >> 16) & 0x7ff) - 4; struct sk_buff *skb; - + #ifndef final_version if (pkt_len > 1518) { printk(KERN_WARNING "%s: Bogus packet size of %d (%#x).\n", @@ -212,7 +213,7 @@ int tulip_poll(struct net_device *dev, int *budget) } else { /* Pass up the skb already on the Rx ring. */ char *temp = skb_put(skb = tp->rx_buffers[entry].skb, pkt_len); - + #ifndef final_version if (tp->rx_buffers[entry].mapping != le32_to_cpu(tp->rx_ring[entry].buffer1)) { @@ -224,17 +225,17 @@ int tulip_poll(struct net_device *dev, int *budget) skb->head, temp); } #endif - + pci_unmap_single(tp->pdev, tp->rx_buffers[entry].mapping, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); - + tp->rx_buffers[entry].skb = NULL; tp->rx_buffers[entry].mapping = 0; } skb->protocol = eth_type_trans(skb, dev); - + netif_receive_skb(skb); - + dev->last_rx = jiffies; tp->stats.rx_packets++; tp->stats.rx_bytes += pkt_len; @@ -244,12 +245,12 @@ int tulip_poll(struct net_device *dev, int *budget) entry = (++tp->cur_rx) % RX_RING_SIZE; if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/4) tulip_refill_rx(dev); - + } - + /* New ack strategy... irq does not ack Rx any longer hopefully this helps */ - + /* Really bad things can happen here... If new packet arrives * and an irq arrives (tx or just due to occasionally unset * mask), it will be acked by irq handler, but new thread @@ -258,28 +259,28 @@ int tulip_poll(struct net_device *dev, int *budget) * tomorrow (night 011029). If it will not fail, we won * finally: amount of IO did not increase at all. */ } while ((ioread32(tp->base_addr + CSR5) & RxIntr)); - + done: - + #ifdef CONFIG_TULIP_NAPI_HW_MITIGATION - + /* We use this simplistic scheme for IM. It's proven by real life installations. We can have IM enabled - continuesly but this would cause unnecessary latency. - Unfortunely we can't use all the NET_RX_* feedback here. - This would turn on IM for devices that is not contributing - to backlog congestion with unnecessary latency. - + continuesly but this would cause unnecessary latency. + Unfortunely we can't use all the NET_RX_* feedback here. + This would turn on IM for devices that is not contributing + to backlog congestion with unnecessary latency. + We monitor the the device RX-ring and have: - + HW Interrupt Mitigation either ON or OFF. - - ON: More then 1 pkt received (per intr.) OR we are dropping + + ON: More then 1 pkt received (per intr.) OR we are dropping OFF: Only 1 pkt received - + Note. We only use min and max (0, 15) settings from mit_table */ - - + + if( tp->flags & HAS_INTR_MITIGATION) { if( received > 1 ) { if( ! tp->mit_on ) { @@ -296,20 +297,20 @@ done: } #endif /* CONFIG_TULIP_NAPI_HW_MITIGATION */ - + dev->quota -= received; *budget -= received; - + tulip_refill_rx(dev); - + /* If RX ring is not full we are out of memory. */ if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) goto oom; - + /* Remove us from polling list and enable RX intr. */ - + netif_rx_complete(dev); iowrite32(tulip_tbl[tp->chip_id].valid_intrs, tp->base_addr+CSR7); - + /* The last op happens after poll completion. Which means the following: * 1. it can race with disabling irqs in irq handler * 2. it can race with dise/enabling irqs in other poll threads @@ -320,9 +321,9 @@ done: * due to races in masking and due to too late acking of already * processed irqs. But it must not result in losing events. */ - + return 0; - + not_done: if (!received) { @@ -330,29 +331,29 @@ done: } dev->quota -= received; *budget -= received; - + if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/2 || tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) tulip_refill_rx(dev); - + if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) goto oom; - + return 1; - - + + oom: /* Executed with RX ints disabled */ - - + + /* Start timer, stop polling, but do not enable rx interrupts. */ mod_timer(&tp->oom_timer, jiffies+1); - + /* Think: timer_pending() was an explicit signature of bug. * Timer can be pending now but fired and completed * before we did netif_rx_complete(). See? We would lose it. */ - + /* remove ourselves from the polling list */ netif_rx_complete(dev); - + return 0; } @@ -520,9 +521,9 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) /* Let's see whether the interrupt really is for us */ csr5 = ioread32(ioaddr + CSR5); - if (tp->flags & HAS_PHY_IRQ) + if (tp->flags & HAS_PHY_IRQ) handled = phy_interrupt (dev); - + if ((csr5 & (NormalIntr|AbnormalIntr)) == 0) return IRQ_RETVAL(handled); @@ -537,17 +538,17 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) /* Mask RX intrs and add the device to poll list. */ iowrite32(tulip_tbl[tp->chip_id].valid_intrs&~RxPollInt, ioaddr + CSR7); netif_rx_schedule(dev); - + if (!(csr5&~(AbnormalIntr|NormalIntr|RxPollInt|TPLnkPass))) break; } - + /* Acknowledge the interrupt sources we handle here ASAP the poll function does Rx and RxNoBuf acking */ - + iowrite32(csr5 & 0x0001ff3f, ioaddr + CSR5); -#else +#else /* Acknowledge all of the current interrupt sources ASAP. */ iowrite32(csr5 & 0x0001ffff, ioaddr + CSR5); @@ -558,11 +559,11 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) } #endif /* CONFIG_TULIP_NAPI */ - + if (tulip_debug > 4) printk(KERN_DEBUG "%s: interrupt csr5=%#8.8x new csr5=%#8.8x.\n", dev->name, csr5, ioread32(ioaddr + CSR5)); - + if (csr5 & (TxNoBuf | TxDied | TxIntr | TimerInt)) { unsigned int dirty_tx; @@ -736,17 +737,17 @@ irqreturn_t tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) #ifdef CONFIG_TULIP_NAPI if (rxd) csr5 &= ~RxPollInt; - } while ((csr5 & (TxNoBuf | - TxDied | - TxIntr | + } while ((csr5 & (TxNoBuf | + TxDied | + TxIntr | TimerInt | /* Abnormal intr. */ - RxDied | - TxFIFOUnderflow | - TxJabber | - TPLnkFail | + RxDied | + TxFIFOUnderflow | + TxJabber | + TPLnkFail | SytemError )) != 0); -#else +#else } while ((csr5 & (NormalIntr|AbnormalIntr)) != 0); tulip_refill_rx(dev); diff --git a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c index e9bc2a958..f53396fe7 100644 --- a/drivers/net/tulip/media.c +++ b/drivers/net/tulip/media.c @@ -140,7 +140,7 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val) spin_unlock_irqrestore(&tp->mii_lock, flags); return; } - + /* Establish sync by sending 32 logic ones. */ for (i = 32; i >= 0; i--) { iowrite32(MDIO_ENB | MDIO_DATA_WRITE1, mdio_addr); diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h index 3bcfbf3d2..05d2d96f7 100644 --- a/drivers/net/tulip/tulip.h +++ b/drivers/net/tulip/tulip.h @@ -16,6 +16,7 @@ #ifndef __NET_TULIP_H__ #define __NET_TULIP_H__ +#include #include #include #include @@ -258,7 +259,7 @@ enum t21143_csr6_bits { There are no ill effects from too-large receive rings. */ #define TX_RING_SIZE 32 -#define RX_RING_SIZE 128 +#define RX_RING_SIZE 128 #define MEDIA_MASK 31 #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 7351831f5..c67c91251 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c @@ -14,6 +14,7 @@ */ +#include #define DRV_NAME "tulip" #ifdef CONFIG_TULIP_NAPI @@ -489,7 +490,7 @@ tulip_open(struct net_device *dev) { int retval; - if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) + if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) return retval; tulip_init_ring (dev); @@ -1223,7 +1224,7 @@ out: * Chips that have the MRM/reserved bit quirk and the burst quirk. That * is the DM910X and the on chip ULi devices */ - + static int tulip_uli_dm_quirk(struct pci_dev *pdev) { if (pdev->vendor == 0x1282 && pdev->device == 0x9102) @@ -1296,7 +1297,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, */ /* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache - aligned. Aries might need this too. The Saturn errata are not + aligned. Aries might need this too. The Saturn errata are not pretty reading but thankfully it's an old 486 chipset. 2. The dreaded SiS496 486 chipset. Same workaround as Intel @@ -1349,10 +1350,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) { - printk (KERN_ERR PFX "%s: I/O region (0x%llx@0x%llx) too small, " + printk (KERN_ERR PFX "%s: I/O region (0x%lx@0x%lx) too small, " "aborting\n", pci_name(pdev), - (unsigned long long)pci_resource_len (pdev, 0), - (unsigned long long)pci_resource_start (pdev, 0)); + pci_resource_len (pdev, 0), + pci_resource_start (pdev, 0)); goto err_out_free_netdev; } @@ -1482,6 +1483,14 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, sa_offset = 2; /* Grrr, damn Matrox boards. */ multiport_cnt = 4; } +#ifdef CONFIG_DDB5476 + if ((pdev->bus->number == 0) && (PCI_SLOT(pdev->devfn) == 6)) { + /* DDB5476 MAC address in first EEPROM locations. */ + sa_offset = 0; + /* No media table either */ + tp->flags &= ~HAS_MEDIA_TABLE; + } +#endif #ifdef CONFIG_DDB5477 if ((pdev->bus->number == 0) && (PCI_SLOT(pdev->devfn) == 4)) { /* DDB5477 MAC address in first EEPROM locations. */ @@ -1491,7 +1500,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, } #endif #ifdef CONFIG_MIPS_COBALT - if ((pdev->bus->number == 0) && + if ((pdev->bus->number == 0) && ((PCI_SLOT(pdev->devfn) == 7) || (PCI_SLOT(pdev->devfn) == 12))) { /* Cobalt MAC address in first EEPROM locations. */ @@ -1549,14 +1558,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, dev->dev_addr[i] = last_phys_addr[i]; dev->dev_addr[i] = last_phys_addr[i] + 1; #if defined(__sparc__) - if (pcp) { - unsigned char *addr; - int len; - - addr = of_get_property(pcp->prom_node, - "local-mac-address", &len); - if (addr && len == 6) - memcpy(dev->dev_addr, addr, 6); + if ((pcp != NULL) && prom_getproplen(pcp->prom_node, + "local-mac-address") == 6) { + prom_getproperty(pcp->prom_node, "local-mac-address", + dev->dev_addr, 6); } #endif #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ @@ -1770,7 +1775,7 @@ static int tulip_resume(struct pci_dev *pdev) pci_enable_device(pdev); - if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) { + if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) { printk (KERN_ERR "tulip: request_irq failed in resume\n"); return retval; } diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index fd64b2b3e..238e9c72c 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + */ #define DRV_NAME "uli526x" @@ -185,7 +185,7 @@ struct uli526x_board_info { /* NIC SROM data */ unsigned char srom[128]; - u8 init; + u8 init; }; enum uli526x_offsets { @@ -258,7 +258,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, struct uli526x_board_info *db; /* board information structure */ struct net_device *dev; int i, err; - + ULI526X_DBUG(0, "uli526x_init_one()", 0); if (!printed_version++) @@ -316,7 +316,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, err = -ENOMEM; goto err_out_nomem; } - + db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; db->first_tx_desc_dma = db->desc_pool_dma_ptr; db->buf_pool_start = db->buf_pool_ptr; @@ -324,14 +324,14 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, db->chip_id = ent->driver_data; db->ioaddr = pci_resource_start(pdev, 0); - + db->pdev = pdev; db->init = 1; - + dev->base_addr = db->ioaddr; dev->irq = pdev->irq; pci_set_drvdata(pdev, dev); - + /* Register some necessary functions */ dev->open = &uli526x_open; dev->hard_start_xmit = &uli526x_start_xmit; @@ -341,7 +341,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, dev->ethtool_ops = &netdev_ethtool_ops; spin_lock_init(&db->lock); - + /* read 64 word srom data */ for (i = 0; i < 64; i++) ((u16 *) db->srom)[i] = cpu_to_le16(read_srom_word(db->ioaddr, i)); @@ -374,7 +374,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, goto err_out_res; printk(KERN_INFO "%s: ULi M%04lx at pci%s,",dev->name,ent->driver_data >> 16,pci_name(pdev)); - + for (i = 0; i < 6; i++) printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); printk(", irq %d.\n", dev->irq); @@ -389,7 +389,7 @@ err_out_nomem: if(db->desc_pool_ptr) pci_free_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, db->desc_pool_ptr, db->desc_pool_dma_ptr); - + if(db->buf_pool_ptr != NULL) pci_free_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, db->buf_pool_ptr, db->buf_pool_dma_ptr); @@ -433,10 +433,10 @@ static int uli526x_open(struct net_device *dev) { int ret; struct uli526x_board_info *db = netdev_priv(dev); - + ULI526X_DBUG(0, "uli526x_open", 0); - ret = request_irq(dev->irq, &uli526x_interrupt, IRQF_SHARED, dev->name, dev); + ret = request_irq(dev->irq, &uli526x_interrupt, SA_SHIRQ, dev->name, dev); if (ret) return ret; @@ -454,7 +454,7 @@ static int uli526x_open(struct net_device *dev) /* CR6 operation mode decision */ db->cr6_data |= ULI526X_TXTH_256; db->cr0_data = CR0_DEFAULT; - + /* Initialize ULI526X board */ uli526x_init(dev); @@ -604,7 +604,7 @@ static int uli526x_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Restore CR7 to enable interrupt */ spin_unlock_irqrestore(&db->lock, flags); outl(db->cr7_data, dev->base_addr + DCR7); - + /* free this SKB */ dev_kfree_skb(skb); @@ -782,7 +782,7 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info struct sk_buff *skb; int rxlen; u32 rdes0; - + rxptr = db->rx_ready_ptr; while(db->rx_avail_cnt) { @@ -821,7 +821,7 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info if ( !(rdes0 & 0x8000) || ((db->cr6_data & CR6_PM) && (rxlen>6)) ) { skb = rxptr->rx_skb_ptr; - + /* Good packet, send to upper layer */ /* Shorst packet used new SKB */ if ( (rxlen < RX_COPY_SIZE) && @@ -841,7 +841,7 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info dev->last_rx = jiffies; db->stats.rx_packets++; db->stats.rx_bytes += rxlen; - + } else { /* Reuse SKB buffer when the packet is error */ ULI526X_DBUG(0, "Reuse SK buffer, rdes0", rdes0); @@ -911,7 +911,7 @@ ULi_ethtool_gset(struct uli526x_board_info *db, struct ethtool_cmd *ecmd) SUPPORTED_100baseT_Full | SUPPORTED_Autoneg | SUPPORTED_MII); - + ecmd->advertising = (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Half | @@ -924,13 +924,13 @@ ULi_ethtool_gset(struct uli526x_board_info *db, struct ethtool_cmd *ecmd) ecmd->phy_address = db->phy_addr; ecmd->transceiver = XCVR_EXTERNAL; - + ecmd->speed = 10; ecmd->duplex = DUPLEX_HALF; - + if(db->op_mode==ULI526X_100MHF || db->op_mode==ULI526X_100MFD) { - ecmd->speed = 100; + ecmd->speed = 100; } if(db->op_mode==ULI526X_10MFD || db->op_mode==ULI526X_100MFD) { @@ -939,11 +939,11 @@ ULi_ethtool_gset(struct uli526x_board_info *db, struct ethtool_cmd *ecmd) if(db->link_failed) { ecmd->speed = -1; - ecmd->duplex = -1; + ecmd->duplex = -1; } - + if (db->media_mode & ULI526X_AUTO) - { + { ecmd->autoneg = AUTONEG_ENABLE; } } @@ -964,15 +964,15 @@ static void netdev_get_drvinfo(struct net_device *dev, static int netdev_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct uli526x_board_info *np = netdev_priv(dev); - + ULi_ethtool_gset(np, cmd); - + return 0; } static u32 netdev_get_link(struct net_device *dev) { struct uli526x_board_info *np = netdev_priv(dev); - + if(np->link_failed) return 0; else @@ -1005,11 +1005,11 @@ static void uli526x_timer(unsigned long data) struct uli526x_board_info *db = netdev_priv(dev); unsigned long flags; u8 TmpSpeed=10; - + //ULI526X_DBUG(0, "uli526x_timer()", 0); spin_lock_irqsave(&db->lock, flags); - + /* Dynamic reset ULI526X : system error or transmit time-out */ tmp_cr8 = inl(db->ioaddr + DCR8); if ( (db->interval_rx_cnt==0) && (tmp_cr8) ) { @@ -1021,9 +1021,9 @@ static void uli526x_timer(unsigned long data) /* TX polling kick monitor */ if ( db->tx_packet_cnt && time_after(jiffies, dev->trans_start + ULI526X_TX_KICK) ) { - outl(0x1, dev->base_addr + DCR1); // Tx polling again + outl(0x1, dev->base_addr + DCR1); // Tx polling again - // TX Timeout + // TX Timeout if ( time_after(jiffies, dev->trans_start + ULI526X_TX_TIMEOUT) ) { db->reset_TXtimeout++; db->wait_reset = 1; @@ -1073,7 +1073,7 @@ static void uli526x_timer(unsigned long data) uli526x_sense_speed(db) ) db->link_failed = 1; uli526x_process_mode(db); - + if(db->link_failed==0) { if(db->op_mode==ULI526X_100MHF || db->op_mode==ULI526X_100MFD) @@ -1404,7 +1404,7 @@ static u8 uli526x_sense_speed(struct uli526x_board_info * db) phy_mode = phy_read(db->ioaddr, db->phy_addr, 1, db->chip_id); if ( (phy_mode & 0x24) == 0x24 ) { - + phy_mode = ((phy_read(db->ioaddr, db->phy_addr, 5, db->chip_id) & 0x01e0)<<7); if(phy_mode&0x8000) phy_mode = 0x8000; @@ -1414,7 +1414,7 @@ static u8 uli526x_sense_speed(struct uli526x_board_info * db) phy_mode = 0x2000; else phy_mode = 0x1000; - + /* printk(DRV_NAME ": Phy_mode %x ",phy_mode); */ switch (phy_mode) { case 0x1000: db->op_mode = ULI526X_10MHF; break; @@ -1442,7 +1442,7 @@ static u8 uli526x_sense_speed(struct uli526x_board_info * db) static void uli526x_set_phyxcer(struct uli526x_board_info *db) { u16 phy_reg; - + /* Phyxcer capability setting */ phy_reg = phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x01e0; @@ -1457,7 +1457,7 @@ static void uli526x_set_phyxcer(struct uli526x_board_info *db) case ULI526X_100MHF: phy_reg |= 0x80; break; case ULI526X_100MFD: phy_reg |= 0x100; break; } - + } /* Write new capability to Phyxcer Reg4 */ @@ -1556,7 +1556,7 @@ static void phy_write(unsigned long iobase, u8 phy_addr, u8 offset, u16 phy_data /* Write a word data to PHY controller */ for ( i = 0x8000; i > 0; i >>= 1) phy_write_1bit(ioaddr, phy_data & i ? PHY_DATA_1 : PHY_DATA_0, chip_id); - + } @@ -1574,7 +1574,7 @@ static u16 phy_read(unsigned long iobase, u8 phy_addr, u8 offset, u32 chip_id) return phy_readby_cr10(iobase, phy_addr, offset); /* M5261/M5263 Chip */ ioaddr = iobase + DCR9; - + /* Send 33 synchronization clock to Phy controller */ for (i = 0; i < 35; i++) phy_write_1bit(ioaddr, PHY_DATA_1, chip_id); @@ -1610,7 +1610,7 @@ static u16 phy_read(unsigned long iobase, u8 phy_addr, u8 offset, u32 chip_id) static u16 phy_readby_cr10(unsigned long iobase, u8 phy_addr, u8 offset) { unsigned long ioaddr,cr10_value; - + ioaddr = iobase + DCR10; cr10_value = phy_addr; cr10_value = (cr10_value<<5) + offset; @@ -1629,7 +1629,7 @@ static u16 phy_readby_cr10(unsigned long iobase, u8 phy_addr, u8 offset) static void phy_writeby_cr10(unsigned long iobase, u8 phy_addr, u8 offset, u16 phy_data) { unsigned long ioaddr,cr10_value; - + ioaddr = iobase + DCR10; cr10_value = phy_addr; cr10_value = (cr10_value<<5) + offset; @@ -1659,7 +1659,7 @@ static void phy_write_1bit(unsigned long ioaddr, u32 phy_data, u32 chip_id) static u16 phy_read_1bit(unsigned long ioaddr, u32 chip_id) { u16 phy_data; - + outl(0x50000 , ioaddr); udelay(1); phy_data = ( inl(ioaddr) >> 19 ) & 0x1; diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index eba9083da..56d86c7c0 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c @@ -38,12 +38,12 @@ Copyright (C) 2001 Manfred Spraul * ethtool support (jgarzik) * Replace some MII-related magic numbers with constants (jgarzik) - + TODO: * enable pci_power_off * Wake-On-LAN */ - + #define DRV_NAME "winbond-840" #define DRV_VERSION "1.01-d" #define DRV_RELDATE "Nov-17-2001" @@ -57,7 +57,7 @@ c-help-name: Winbond W89c840 PCI Ethernet support c-help-symbol: CONFIG_WINBOND_840 c-help: This driver is for the Winbond W89c840 chip. It also works with c-help: the TX9882 chip on the Compex RL100-ATX board. -c-help: More specific information and updates are available from +c-help: More specific information and updates are available from c-help: http://www.scyld.com/network/drivers.html */ @@ -138,7 +138,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; #include /* These identify the driver base version and may not be removed. */ -static char version[] = +static char version[] __devinitdata = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) " DRV_RELDATE " Donald Becker \n" KERN_INFO " http://www.scyld.com/network/drivers.html\n"; @@ -207,38 +207,53 @@ Test with 'ping -s 10000' on a fast computer. */ - + /* PCI probe table. */ -enum chip_capability_flags { - CanHaveMII=1, HasBrokenTx=2, AlwaysFDX=4, FDXOnNoMII=8, +enum pci_id_flags_bits { + /* Set PCI command register bits before calling probe1(). */ + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + /* Read and map the single following PCI BAR. */ + PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, + PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, }; +enum chip_capability_flags { + CanHaveMII=1, HasBrokenTx=2, AlwaysFDX=4, FDXOnNoMII=8,}; +#ifdef USE_IO_OPS +#define W840_FLAGS (PCI_USES_IO | PCI_ADDR0 | PCI_USES_MASTER) +#else +#define W840_FLAGS (PCI_USES_MEM | PCI_ADDR1 | PCI_USES_MASTER) +#endif -static const struct pci_device_id w840_pci_tbl[] = { +static struct pci_device_id w840_pci_tbl[] = { { 0x1050, 0x0840, PCI_ANY_ID, 0x8153, 0, 0, 0 }, { 0x1050, 0x0840, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, { 0x11f6, 0x2011, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, - { } + { 0, } }; MODULE_DEVICE_TABLE(pci, w840_pci_tbl); -enum { - netdev_res_size = 128, /* size of PCI BAR resource */ -}; - struct pci_id_info { const char *name; - int drv_flags; /* Driver use, intended as capability flags. */ + struct match_info { + int pci, pci_mask, subsystem, subsystem_mask; + int revision, revision_mask; /* Only 8 bits. */ + } id; + enum pci_id_flags_bits pci_flags; + int io_size; /* Needed for I/O region check or ioremap(). */ + int drv_flags; /* Driver use, intended as capability flags. */ }; - -static const struct pci_id_info pci_id_tbl[] __devinitdata = { - { /* Sometime a Level-One switch card. */ - "Winbond W89c840", CanHaveMII | HasBrokenTx | FDXOnNoMII}, - { "Winbond W89c840", CanHaveMII | HasBrokenTx}, - { "Compex RL100-ATX", CanHaveMII | HasBrokenTx}, - { } /* terminate list. */ +static struct pci_id_info pci_id_tbl[] = { + {"Winbond W89c840", /* Sometime a Level-One switch card. */ + { 0x08401050, 0xffffffff, 0x81530000, 0xffff0000 }, + W840_FLAGS, 128, CanHaveMII | HasBrokenTx | FDXOnNoMII}, + {"Winbond W89c840", { 0x08401050, 0xffffffff, }, + W840_FLAGS, 128, CanHaveMII | HasBrokenTx}, + {"Compex RL100-ATX", { 0x201111F6, 0xffffffff,}, + W840_FLAGS, 128, CanHaveMII | HasBrokenTx}, + {NULL,}, /* 0 terminated list. */ }; /* This driver was written to use PCI memory space, however some x86 systems @@ -359,7 +374,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static struct ethtool_ops netdev_ethtool_ops; static int netdev_close(struct net_device *dev); - + static int __devinit w840_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) @@ -396,7 +411,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, #ifdef USE_IO_OPS bar = 0; #endif - ioaddr = pci_iomap(pdev, bar, netdev_res_size); + ioaddr = pci_iomap(pdev, bar, pci_id_tbl[chip_idx].io_size); if (!ioaddr) goto err_out_free_res; @@ -419,7 +434,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, np->mii_if.mdio_read = mdio_read; np->mii_if.mdio_write = mdio_write; np->base_addr = ioaddr; - + pci_set_drvdata(pdev, dev); if (dev->mem_start) @@ -495,7 +510,7 @@ err_out_netdev: return -ENODEV; } - + /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. These are often serial bit streams generated by the host processor. The example below is for the common 93c46 EEPROM, 64 16 bit words. */ @@ -645,7 +660,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val return; } - + static int netdev_open(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); @@ -655,7 +670,7 @@ static int netdev_open(struct net_device *dev) iowrite32(0x00000001, ioaddr + PCIBusCfg); /* Reset */ netif_device_detach(dev); - i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); if (i) goto out_err; @@ -716,7 +731,7 @@ static int update_link(struct net_device *dev) dev->name, np->phys[0]); netif_carrier_on(dev); } - + if ((np->mii & ~0xf) == MII_DAVICOM_DM9101) { /* If the link partner doesn't support autonegotiation * the MII detects it's abilities with the "parallel detection". @@ -746,7 +761,7 @@ static int update_link(struct net_device *dev) result |= 0x20000000; if (result != np->csr6 && debug) printk(KERN_INFO "%s: Setting %dMBit-%s-duplex based on MII#%d\n", - dev->name, fasteth ? 100 : 10, + dev->name, fasteth ? 100 : 10, duplex ? "full" : "half", np->phys[0]); return result; } @@ -932,7 +947,7 @@ static void init_registers(struct net_device *dev) iowrite32(i, ioaddr + PCIBusCfg); np->csr6 = 0; - /* 128 byte Tx threshold; + /* 128 byte Tx threshold; Transmit on; Receive on; */ update_csr6(dev, 0x00022002 | update_link(dev) | __set_rx_mode(dev)); @@ -1569,7 +1584,7 @@ static int netdev_close(struct net_device *dev) static void __devexit w840_remove1 (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - + if (dev) { struct netdev_private *np = netdev_priv(dev); unregister_netdev(dev); diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index cf43390d2..56344103a 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c @@ -1,11 +1,11 @@ /* - * xircom_cb: A driver for the (tulip-like) Xircom Cardbus ethernet cards + * xircom_cb: A driver for the (tulip-like) Xircom Cardbus ethernet cards * * This software is (C) by the respective authors, and licensed under the GPL * License. * * Written by Arjan van de Ven for Red Hat, Inc. - * Based on work by Jeff Garzik, Doug Ledford and Donald Becker + * Based on work by Jeff Garzik, Doug Ledford and Donald Becker * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. @@ -93,7 +93,7 @@ struct xircom_private { unsigned long io_port; int open; - + /* transmit_used is the rotating counter that indicates which transmit descriptor has to be used next */ int transmit_used; @@ -153,10 +153,10 @@ static struct pci_device_id xircom_pci_table[] = { MODULE_DEVICE_TABLE(pci, xircom_pci_table); static struct pci_driver xircom_ops = { - .name = "xircom_cb", - .id_table = xircom_pci_table, - .probe = xircom_probe, - .remove = xircom_remove, + .name = "xircom_cb", + .id_table = xircom_pci_table, + .probe = xircom_probe, + .remove = xircom_remove, .suspend =NULL, .resume =NULL }; @@ -174,7 +174,7 @@ static void print_binary(unsigned int number) buffer[i2++]='1'; else buffer[i2++]='0'; - if ((i&3)==0) + if ((i&3)==0) buffer[i2++]=' '; } printk("%s\n",buffer); @@ -196,10 +196,10 @@ static struct ethtool_ops netdev_ethtool_ops = { /* xircom_probe is the code that gets called on device insertion. it sets up the hardware and registers the device to the networklayer. - + TODO: Send 1 or 2 "dummy" packets here as the card seems to discard the first two packets that get send, and pump hates that. - + */ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_id *id) { @@ -209,7 +209,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ unsigned long flags; unsigned short tmp16; enter("xircom_probe"); - + /* First do the PCI initialisation */ if (pci_enable_device(pdev)) @@ -217,24 +217,24 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ /* disable all powermanagement */ pci_write_config_dword(pdev, PCI_POWERMGMT, 0x0000); - + pci_set_master(pdev); /* Why isn't this done by pci_enable_device ?*/ - /* clear PCI status, if any */ - pci_read_config_word (pdev,PCI_STATUS, &tmp16); + /* clear PCI status, if any */ + pci_read_config_word (pdev,PCI_STATUS, &tmp16); pci_write_config_word (pdev, PCI_STATUS,tmp16); - + pci_read_config_byte(pdev, PCI_REVISION_ID, &chip_rev); - + if (!request_region(pci_resource_start(pdev, 0), 128, "xircom_cb")) { printk(KERN_ERR "xircom_probe: failed to allocate io-region\n"); return -ENODEV; } - /* + /* Before changing the hardware, allocate the memory. This way, we can fail gracefully if not enough memory - is available. + is available. */ dev = alloc_etherdev(sizeof(struct xircom_private)); if (!dev) { @@ -242,13 +242,13 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ goto device_fail; } private = netdev_priv(dev); - + /* Allocate the send/receive buffers */ private->rx_buffer = pci_alloc_consistent(pdev,8192,&private->rx_dma_handle); if (private->rx_buffer == NULL) { printk(KERN_ERR "xircom_probe: no memory for rx buffer \n"); goto rx_buf_fail; - } + } private->tx_buffer = pci_alloc_consistent(pdev,8192,&private->tx_dma_handle); if (private->tx_buffer == NULL) { printk(KERN_ERR "xircom_probe: no memory for tx buffer \n"); @@ -265,11 +265,11 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ spin_lock_init(&private->lock); dev->irq = pdev->irq; dev->base_addr = private->io_port; - + initialize_card(private); read_mac_address(private); setup_descriptors(private); - + dev->open = &xircom_open; dev->hard_start_xmit = &xircom_start_xmit; dev->stop = &xircom_close; @@ -285,19 +285,19 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_ printk(KERN_ERR "xircom_probe: netdevice registration failed.\n"); goto reg_fail; } - + printk(KERN_INFO "%s: Xircom cardbus revision %i at irq %i \n", dev->name, chip_rev, pdev->irq); /* start the transmitter to get a heartbeat */ /* TODO: send 2 dummy packets here */ transceiver_voodoo(private); - + spin_lock_irqsave(&private->lock,flags); activate_transmitter(private); activate_receiver(private); spin_unlock_irqrestore(&private->lock,flags); - + trigger_receive(private); - + leave("xircom_probe"); return 0; @@ -332,7 +332,7 @@ static void __devexit xircom_remove(struct pci_dev *pdev) free_netdev(dev); pci_set_drvdata(pdev, NULL); leave("xircom_remove"); -} +} static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs) { @@ -346,11 +346,11 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs spin_lock(&card->lock); status = inl(card->io_port+CSR5); -#ifdef DEBUG +#ifdef DEBUG print_binary(status); printk("tx status 0x%08x 0x%08x \n",card->tx_buffer[0],card->tx_buffer[4]); printk("rx status 0x%08x 0x%08x \n",card->rx_buffer[0],card->rx_buffer[4]); -#endif +#endif /* Handle shared irq and hotplug */ if (status == 0 || status == 0xffffffff) { spin_unlock(&card->lock); @@ -366,21 +366,21 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs netif_carrier_on(dev); else netif_carrier_off(dev); - + } - /* Clear all remaining interrupts */ + /* Clear all remaining interrupts */ status |= 0xffffffff; /* FIXME: make this clear only the real existing bits */ outl(status,card->io_port+CSR5); + - - for (i=0;ilock); leave("xircom_interrupt"); return IRQ_HANDLED; @@ -393,38 +393,38 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) int nextdescriptor; int desc; enter("xircom_start_xmit"); - + card = netdev_priv(dev); spin_lock_irqsave(&card->lock,flags); - + /* First see if we can free some descriptors */ - for (desc=0;desctransmit_used +1) % (NUMDESCRIPTORS); desc = card->transmit_used; - + /* only send the packet if the descriptor is free */ if (card->tx_buffer[4*desc]==0) { /* Copy the packet data; zero the memory first as the card sometimes sends more than you ask it to. */ - + memset(&card->tx_buffer[bufferoffsets[desc]/4],0,1536); memcpy(&(card->tx_buffer[bufferoffsets[desc]/4]),skb->data,skb->len); - - + + /* FIXME: The specification tells us that the length we send HAS to be a multiple of 4 bytes. */ - + card->tx_buffer[4*desc+1] = skb->len; if (desc == NUMDESCRIPTORS-1) card->tx_buffer[4*desc+1] |= (1<<25); /* bit 25: last descriptor of the ring */ card->tx_buffer[4*desc+1] |= 0xF0000000; - /* 0xF0... means want interrupts*/ + /* 0xF0... means want interrupts*/ card->tx_skb[desc] = skb; - + wmb(); /* This gives the descriptor to the card */ card->tx_buffer[4*desc] = 0x80000000; @@ -433,18 +433,18 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) netif_stop_queue(dev); } card->transmit_used = nextdescriptor; - leave("xircom-start_xmit - sent"); + leave("xircom-start_xmit - sent"); spin_unlock_irqrestore(&card->lock,flags); return 0; } - + /* Uh oh... no free descriptor... drop the packet */ netif_stop_queue(dev); spin_unlock_irqrestore(&card->lock,flags); trigger_transmit(card); - + return -EIO; } @@ -457,12 +457,12 @@ static int xircom_open(struct net_device *dev) int retval; enter("xircom_open"); printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq); - retval = request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev); + retval = request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev); if (retval) { leave("xircom_open - No IRQ"); return retval; } - + xircom_up(xp); xp->open = 1; leave("xircom_open"); @@ -473,31 +473,31 @@ static int xircom_close(struct net_device *dev) { struct xircom_private *card; unsigned long flags; - + enter("xircom_close"); card = netdev_priv(dev); netif_stop_queue(dev); /* we don't want new packets */ - + spin_lock_irqsave(&card->lock,flags); - + disable_all_interrupts(card); -#if 0 +#if 0 /* We can enable this again once we send dummy packets on ifconfig ethX up */ deactivate_receiver(card); deactivate_transmitter(card); -#endif +#endif remove_descriptors(card); - + spin_unlock_irqrestore(&card->lock,flags); - + card->open = 0; free_irq(dev->irq,dev); - + leave("xircom_close"); - + return 0; - + } @@ -506,8 +506,8 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev) { struct xircom_private *card = netdev_priv(dev); return &card->stats; -} - +} + #ifdef CONFIG_NET_POLL_CONTROLLER static void xircom_poll_controller(struct net_device *dev) @@ -540,7 +540,7 @@ static void initialize_card(struct xircom_private *card) outl(val, card->io_port + CSR0); - val = 0; /* Value 0x00 is a safe and conservative value + val = 0; /* Value 0x00 is a safe and conservative value for the PCI configuration settings */ outl(val, card->io_port + CSR0); @@ -617,23 +617,23 @@ static void setup_descriptors(struct xircom_private *card) /* Rx Descr2: address of the buffer we store the buffer at the 2nd half of the page */ - + address = (unsigned long) card->rx_dma_handle; card->rx_buffer[i*4 + 2] = cpu_to_le32(address + bufferoffsets[i]); /* Rx Desc3: address of 2nd buffer -> 0 */ card->rx_buffer[i*4 + 3] = 0; } - + wmb(); /* Write the receive descriptor ring address to the card */ address = (unsigned long) card->rx_dma_handle; - val = cpu_to_le32(address); + val = cpu_to_le32(address); outl(val, card->io_port + CSR3); /* Receive descr list address */ /* transmit descriptors */ memset(card->tx_buffer, 0, 128); /* clear the descriptors */ - + for (i=0;i 0x00000000 */ card->tx_buffer[i*4 + 0] = 0x00000000; @@ -641,7 +641,7 @@ static void setup_descriptors(struct xircom_private *card) card->tx_buffer[i*4 + 1] = 1536; if (i==NUMDESCRIPTORS-1) card->tx_buffer[i*4 + 1] |= (1 << 25); /* bit 25 is "last descriptor" */ - + /* Tx Descr2: address of the buffer we store the buffer at the 2nd half of the page */ address = (unsigned long) card->tx_dma_handle; @@ -748,7 +748,7 @@ static int receive_active(struct xircom_private *card) activate_receiver enables the receiver on the card. Before being allowed to active the receiver, the receiver must be completely de-activated. To achieve this, -this code actually disables the receiver first; then it waits for the +this code actually disables the receiver first; then it waits for the receiver to become inactive, then it activates the receiver and then it waits for the receiver to be active. @@ -762,13 +762,13 @@ static void activate_receiver(struct xircom_private *card) val = inl(card->io_port + CSR6); /* Operation mode */ - + /* If the "active" bit is set and the receiver is already active, no need to do the expensive thing */ if ((val&2) && (receive_active(card))) return; - - + + val = val & ~2; /* disable the receiver */ outl(val, card->io_port + CSR6); @@ -805,7 +805,7 @@ static void activate_receiver(struct xircom_private *card) /* deactivate_receiver disables the receiver on the card. -To achieve this this code disables the receiver first; +To achieve this this code disables the receiver first; then it waits for the receiver to become inactive. must be called with the lock held and interrupts disabled. @@ -840,7 +840,7 @@ static void deactivate_receiver(struct xircom_private *card) activate_transmitter enables the transmitter on the card. Before being allowed to active the transmitter, the transmitter must be completely de-activated. To achieve this, -this code actually disables the transmitter first; then it waits for the +this code actually disables the transmitter first; then it waits for the transmitter to become inactive, then it activates the transmitter and then it waits for the transmitter to be active again. @@ -856,7 +856,7 @@ static void activate_transmitter(struct xircom_private *card) val = inl(card->io_port + CSR6); /* Operation mode */ /* If the "active" bit is set and the receiver is already - active, no need to do the expensive thing */ + active, no need to do the expensive thing */ if ((val&(1<<13)) && (transmit_active(card))) return; @@ -896,7 +896,7 @@ static void activate_transmitter(struct xircom_private *card) /* deactivate_transmitter disables the transmitter on the card. -To achieve this this code disables the transmitter first; +To achieve this this code disables the transmitter first; then it waits for the transmitter to become inactive. must be called with the lock held and interrupts disabled. @@ -990,7 +990,7 @@ static void disable_all_interrupts(struct xircom_private *card) { unsigned int val; enter("enable_all_interrupts"); - + val = 0; /* disable all interrupts */ outl(val, card->io_port + CSR7); @@ -1031,8 +1031,8 @@ static int enable_promisc(struct xircom_private *card) unsigned int val; enter("enable_promisc"); - val = inl(card->io_port + CSR6); - val = val | (1 << 6); + val = inl(card->io_port + CSR6); + val = val | (1 << 6); outl(val, card->io_port + CSR6); leave("enable_promisc"); @@ -1042,7 +1042,7 @@ static int enable_promisc(struct xircom_private *card) -/* +/* link_status() checks the the links status and will return 0 for no link, 10 for 10mbit link and 100 for.. guess what. Must be called in locked state with interrupts disabled @@ -1051,15 +1051,15 @@ static int link_status(struct xircom_private *card) { unsigned int val; enter("link_status"); - + val = inb(card->io_port + CSR12); - + if (!(val&(1<<2))) /* bit 2 is 0 for 10mbit link, 1 for not an 10mbit link */ return 10; if (!(val&(1<<1))) /* bit 1 is 0 for 100mbit link, 1 for not an 100mbit link */ return 100; - - /* If we get here -> no link at all */ + + /* If we get here -> no link at all */ leave("link_status"); return 0; @@ -1071,7 +1071,7 @@ static int link_status(struct xircom_private *card) /* read_mac_address() reads the MAC address from the NIC and stores it in the "dev" structure. - + This function will take the spinlock itself and can, as a result, not be called with the lock helt. */ static void read_mac_address(struct xircom_private *card) @@ -1081,7 +1081,7 @@ static void read_mac_address(struct xircom_private *card) int i; enter("read_mac_address"); - + spin_lock_irqsave(&card->lock, flags); outl(1 << 12, card->io_port + CSR9); /* enable boot rom access */ @@ -1095,7 +1095,7 @@ static void read_mac_address(struct xircom_private *card) outl(i + 3, card->io_port + CSR10); data_count = inl(card->io_port + CSR9) & 0xff; if ((tuple == 0x22) && (data_id == 0x04) && (data_count == 0x06)) { - /* + /* * This is it. We have the data we want. */ for (j = 0; j < 6; j++) { @@ -1136,12 +1136,12 @@ static void transceiver_voodoo(struct xircom_private *card) spin_lock_irqsave(&card->lock, flags); outl(0x0008, card->io_port + CSR15); - udelay(25); + udelay(25); outl(0xa8050000, card->io_port + CSR15); udelay(25); outl(0xa00f0000, card->io_port + CSR15); udelay(25); - + spin_unlock_irqrestore(&card->lock, flags); netif_start_queue(card->dev); @@ -1163,15 +1163,15 @@ static void xircom_up(struct xircom_private *card) spin_lock_irqsave(&card->lock, flags); - + enable_link_interrupt(card); enable_transmit_interrupt(card); enable_receive_interrupt(card); enable_common_interrupts(card); enable_promisc(card); - + /* The card can have received packets already, read them away now */ - for (i=0;idev,card,i,bufferoffsets[i]); @@ -1185,15 +1185,15 @@ static void xircom_up(struct xircom_private *card) /* Bufferoffset is in BYTES */ static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset) { - int status; - + int status; + enter("investigate_read_descriptor"); status = card->rx_buffer[4*descnr]; - + if ((status > 0)) { /* packet received */ - + /* TODO: discard error packets */ - + short pkt_len = ((status >> 16) & 0x7ff) - 4; /* minus 4, we don't want the CRC */ struct sk_buff *skb; @@ -1216,7 +1216,7 @@ static void investigate_read_descriptor(struct net_device *dev,struct xircom_pri dev->last_rx = jiffies; card->stats.rx_packets++; card->stats.rx_bytes += pkt_len; - + out: /* give the buffer back to the card */ card->rx_buffer[4*descnr] = 0x80000000; @@ -1234,9 +1234,9 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p int status; enter("investigate_write_descriptor"); - + status = card->tx_buffer[4*descnr]; -#if 0 +#if 0 if (status & 0x8000) { /* Major error */ printk(KERN_ERR "Major transmit error status %x \n", status); card->tx_buffer[4*descnr] = 0; @@ -1258,20 +1258,21 @@ static void investigate_write_descriptor(struct net_device *dev, struct xircom_p } leave("investigate_write_descriptor"); - + } static int __init xircom_init(void) { - return pci_register_driver(&xircom_ops); + pci_register_driver(&xircom_ops); + return 0; } static void __exit xircom_exit(void) { pci_unregister_driver(&xircom_ops); -} +} -module_init(xircom_init) +module_init(xircom_init) module_exit(xircom_exit) diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c index 17ca7dc42..887d7245f 100644 --- a/drivers/net/tulip/xircom_tulip_cb.c +++ b/drivers/net/tulip/xircom_tulip_cb.c @@ -10,11 +10,26 @@ 410 Severn Ave., Suite 210 Annapolis MD 21403 + ----------------------------------------------------------- + + Linux kernel-specific changes: + + LK1.0 (Ion Badulescu) + - Major cleanup + - Use 2.4 PCI API + - Support ethtool + - Rewrite perfect filter/hash code + - Use interrupts for media changes + + LK1.1 (Ion Badulescu) + - Disallow negotiation of unsupported full-duplex modes */ #define DRV_NAME "xircom_tulip_cb" -#define DRV_VERSION "0.92" -#define DRV_RELDATE "June 27, 2006" +#define DRV_VERSION "0.91+LK1.1" +#define DRV_RELDATE "October 11, 2001" + +#define CARDBUS 1 /* A few user-configurable values. */ @@ -83,6 +98,7 @@ static int csr0 = 0x00A00000 | 0x4800; /* PCI registers */ #define PCI_POWERMGMT 0x40 +#include #include #include #include @@ -291,10 +307,10 @@ struct xircom_private { struct xircom_tx_desc tx_ring[TX_RING_SIZE]; /* The saved address of a sent-in-place packet/buffer, for skfree(). */ struct sk_buff* tx_skbuff[TX_RING_SIZE]; - +#ifdef CARDBUS /* The X3201-3 requires 4-byte aligned tx bufs */ struct sk_buff* tx_aligned_skbuff[TX_RING_SIZE]; - +#endif /* The addresses of receive-in-place skbuffs. */ struct sk_buff* rx_skbuff[RX_RING_SIZE]; u16 setup_frame[PKT_SETUP_SZ / sizeof(u16)]; /* Pseudo-Tx frame to init address table. */ @@ -792,7 +808,7 @@ xircom_open(struct net_device *dev) { struct xircom_private *tp = netdev_priv(dev); - if (request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev)) return -EAGAIN; xircom_up(dev); @@ -893,8 +909,10 @@ static void xircom_init_ring(struct net_device *dev) tp->tx_skbuff[i] = NULL; tp->tx_ring[i].status = 0; tp->tx_ring[i].buffer2 = virt_to_bus(&tp->tx_ring[i+1]); +#ifdef CARDBUS if (tp->chip_id == X3201_3) tp->tx_aligned_skbuff[i] = dev_alloc_skb(PKT_BUF_SZ); +#endif /* CARDBUS */ } tp->tx_ring[i-1].buffer2 = virt_to_bus(&tp->tx_ring[0]); } @@ -914,10 +932,12 @@ xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) entry = tp->cur_tx % TX_RING_SIZE; tp->tx_skbuff[entry] = skb; +#ifdef CARDBUS if (tp->chip_id == X3201_3) { memcpy(tp->tx_aligned_skbuff[entry]->data,skb->data,skb->len); tp->tx_ring[entry].buffer1 = virt_to_bus(tp->tx_aligned_skbuff[entry]->data); } else +#endif tp->tx_ring[entry].buffer1 = virt_to_bus(skb->data); if (tp->cur_tx - tp->dirty_tx < TX_RING_SIZE/2) {/* Typical path */ diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 329d9feb9..a1ed2d983 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -39,6 +39,7 @@ #define DRV_DESCRIPTION "Universal TUN/TAP device driver" #define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky " +#include #include #include #include @@ -489,9 +490,6 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr) err = -EINVAL; - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - /* Set dev type */ if (ifr->ifr_flags & IFF_TUN) { /* TUN device */ @@ -779,6 +777,7 @@ static struct miscdevice tun_miscdev = { .minor = TUN_MINOR, .name = "tun", .fops = &tun_fops, + .devfs_name = "net/tun", }; /* ethtool interface */ diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 4103c3717..389d19fb5 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -2131,7 +2131,7 @@ typhoon_open(struct net_device *dev) goto out_sleep; } - err = request_irq(dev->irq, &typhoon_interrupt, IRQF_SHARED, + err = request_irq(dev->irq, &typhoon_interrupt, SA_SHIRQ, dev->name, dev); if(err < 0) goto out_sleep; @@ -2568,10 +2568,9 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) pci_set_drvdata(pdev, dev); - printk(KERN_INFO "%s: %s at %s 0x%llx, ", + printk(KERN_INFO "%s: %s at %s 0x%lx, ", dev->name, typhoon_card_info[card_id].name, - use_mmio ? "MMIO" : "IO", - (unsigned long long)pci_resource_start(pdev, use_mmio)); + use_mmio ? "MMIO" : "IO", pci_resource_start(pdev, use_mmio)); for(i = 0; i < 5; i++) printk("%2.2x:", dev->dev_addr[i]); printk("%2.2x\n", dev->dev_addr[i]); diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c deleted file mode 100644 index 47f49ef72..000000000 --- a/drivers/net/ucc_geth.c +++ /dev/null @@ -1,4278 +0,0 @@ -/* - * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. - * - * Author: Shlomi Gridish - * - * Description: - * QE UCC Gigabit Ethernet Driver - * - * Changelog: - * Jul 6, 2006 Li Yang - * - Rearrange code and style fixes - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "ucc_geth.h" -#include "ucc_geth_phy.h" - -#undef DEBUG - -#define DRV_DESC "QE UCC Gigabit Ethernet Controller version:June 20, 2006" -#define DRV_NAME "ucc_geth" - -#define ugeth_printk(level, format, arg...) \ - printk(level format "\n", ## arg) - -#define ugeth_dbg(format, arg...) \ - ugeth_printk(KERN_DEBUG , format , ## arg) -#define ugeth_err(format, arg...) \ - ugeth_printk(KERN_ERR , format , ## arg) -#define ugeth_info(format, arg...) \ - ugeth_printk(KERN_INFO , format , ## arg) -#define ugeth_warn(format, arg...) \ - ugeth_printk(KERN_WARNING , format , ## arg) - -#ifdef UGETH_VERBOSE_DEBUG -#define ugeth_vdbg ugeth_dbg -#else -#define ugeth_vdbg(fmt, args...) do { } while (0) -#endif /* UGETH_VERBOSE_DEBUG */ - -static DEFINE_SPINLOCK(ugeth_lock); - -static ucc_geth_info_t ugeth_primary_info = { - .uf_info = { - .bd_mem_part = MEM_PART_SYSTEM, - .rtsm = UCC_FAST_SEND_IDLES_BETWEEN_FRAMES, - .max_rx_buf_length = 1536, -/* FIXME: should be changed in run time for 1G and 100M */ -#ifdef CONFIG_UGETH_HAS_GIGA - .urfs = UCC_GETH_URFS_GIGA_INIT, - .urfet = UCC_GETH_URFET_GIGA_INIT, - .urfset = UCC_GETH_URFSET_GIGA_INIT, - .utfs = UCC_GETH_UTFS_GIGA_INIT, - .utfet = UCC_GETH_UTFET_GIGA_INIT, - .utftt = UCC_GETH_UTFTT_GIGA_INIT, -#else - .urfs = UCC_GETH_URFS_INIT, - .urfet = UCC_GETH_URFET_INIT, - .urfset = UCC_GETH_URFSET_INIT, - .utfs = UCC_GETH_UTFS_INIT, - .utfet = UCC_GETH_UTFET_INIT, - .utftt = UCC_GETH_UTFTT_INIT, -#endif - .ufpt = 256, - .mode = UCC_FAST_PROTOCOL_MODE_ETHERNET, - .ttx_trx = UCC_FAST_GUMR_TRANSPARENT_TTX_TRX_NORMAL, - .tenc = UCC_FAST_TX_ENCODING_NRZ, - .renc = UCC_FAST_RX_ENCODING_NRZ, - .tcrc = UCC_FAST_16_BIT_CRC, - .synl = UCC_FAST_SYNC_LEN_NOT_USED, - }, - .numQueuesTx = 1, - .numQueuesRx = 1, - .extendedFilteringChainPointer = ((uint32_t) NULL), - .typeorlen = 3072 /*1536 */ , - .nonBackToBackIfgPart1 = 0x40, - .nonBackToBackIfgPart2 = 0x60, - .miminumInterFrameGapEnforcement = 0x50, - .backToBackInterFrameGap = 0x60, - .mblinterval = 128, - .nortsrbytetime = 5, - .fracsiz = 1, - .strictpriorityq = 0xff, - .altBebTruncation = 0xa, - .excessDefer = 1, - .maxRetransmission = 0xf, - .collisionWindow = 0x37, - .receiveFlowControl = 1, - .maxGroupAddrInHash = 4, - .maxIndAddrInHash = 4, - .prel = 7, - .maxFrameLength = 1518, - .minFrameLength = 64, - .maxD1Length = 1520, - .maxD2Length = 1520, - .vlantype = 0x8100, - .ecamptr = ((uint32_t) NULL), - .eventRegMask = UCCE_OTHER, - .pausePeriod = 0xf000, - .interruptcoalescingmaxvalue = {1, 1, 1, 1, 1, 1, 1, 1}, - .bdRingLenTx = { - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN, - TX_BD_RING_LEN}, - - .bdRingLenRx = { - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN, - RX_BD_RING_LEN}, - - .numStationAddresses = UCC_GETH_NUM_OF_STATION_ADDRESSES_1, - .largestexternallookupkeysize = - QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_NONE, - .statisticsMode = UCC_GETH_STATISTICS_GATHERING_MODE_NONE, - .vlanOperationTagged = UCC_GETH_VLAN_OPERATION_TAGGED_NOP, - .vlanOperationNonTagged = UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP, - .rxQoSMode = UCC_GETH_QOS_MODE_DEFAULT, - .aufc = UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_NONE, - .padAndCrc = MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC, - .numThreadsTx = UCC_GETH_NUM_OF_THREADS_4, - .numThreadsRx = UCC_GETH_NUM_OF_THREADS_4, - .riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2, - .riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2, -}; - -static ucc_geth_info_t ugeth_info[8]; - -#ifdef DEBUG -static void mem_disp(u8 *addr, int size) -{ - u8 *i; - int size16Aling = (size >> 4) << 4; - int size4Aling = (size >> 2) << 2; - int notAlign = 0; - if (size % 16) - notAlign = 1; - - for (i = addr; (u32) i < (u32) addr + size16Aling; i += 16) - printk("0x%08x: %08x %08x %08x %08x\r\n", - (u32) i, - *((u32 *) (i)), - *((u32 *) (i + 4)), - *((u32 *) (i + 8)), *((u32 *) (i + 12))); - if (notAlign == 1) - printk("0x%08x: ", (u32) i); - for (; (u32) i < (u32) addr + size4Aling; i += 4) - printk("%08x ", *((u32 *) (i))); - for (; (u32) i < (u32) addr + size; i++) - printk("%02x", *((u8 *) (i))); - if (notAlign == 1) - printk("\r\n"); -} -#endif /* DEBUG */ - -#ifdef CONFIG_UGETH_FILTERING -static void enqueue(struct list_head *node, struct list_head *lh) -{ - unsigned long flags; - - spin_lock_irqsave(ugeth_lock, flags); - list_add_tail(node, lh); - spin_unlock_irqrestore(ugeth_lock, flags); -} -#endif /* CONFIG_UGETH_FILTERING */ - -static struct list_head *dequeue(struct list_head *lh) -{ - unsigned long flags; - - spin_lock_irqsave(ugeth_lock, flags); - if (!list_empty(lh)) { - struct list_head *node = lh->next; - list_del(node); - spin_unlock_irqrestore(ugeth_lock, flags); - return node; - } else { - spin_unlock_irqrestore(ugeth_lock, flags); - return NULL; - } -} - -static int get_interface_details(enet_interface_e enet_interface, - enet_speed_e *speed, - int *r10m, - int *rmm, - int *rpm, - int *tbi, int *limited_to_full_duplex) -{ - /* Analyze enet_interface according to Interface Mode - Configuration table */ - switch (enet_interface) { - case ENET_10_MII: - *speed = ENET_SPEED_10BT; - break; - case ENET_10_RMII: - *speed = ENET_SPEED_10BT; - *r10m = 1; - *rmm = 1; - break; - case ENET_10_RGMII: - *speed = ENET_SPEED_10BT; - *rpm = 1; - *r10m = 1; - *limited_to_full_duplex = 1; - break; - case ENET_100_MII: - *speed = ENET_SPEED_100BT; - break; - case ENET_100_RMII: - *speed = ENET_SPEED_100BT; - *rmm = 1; - break; - case ENET_100_RGMII: - *speed = ENET_SPEED_100BT; - *rpm = 1; - *limited_to_full_duplex = 1; - break; - case ENET_1000_GMII: - *speed = ENET_SPEED_1000BT; - *limited_to_full_duplex = 1; - break; - case ENET_1000_RGMII: - *speed = ENET_SPEED_1000BT; - *rpm = 1; - *limited_to_full_duplex = 1; - break; - case ENET_1000_TBI: - *speed = ENET_SPEED_1000BT; - *tbi = 1; - *limited_to_full_duplex = 1; - break; - case ENET_1000_RTBI: - *speed = ENET_SPEED_1000BT; - *rpm = 1; - *tbi = 1; - *limited_to_full_duplex = 1; - break; - default: - return -EINVAL; - break; - } - - return 0; -} - -static struct sk_buff *get_new_skb(ucc_geth_private_t *ugeth, u8 *bd) -{ - struct sk_buff *skb = NULL; - - skb = dev_alloc_skb(ugeth->ug_info->uf_info.max_rx_buf_length + - UCC_GETH_RX_DATA_BUF_ALIGNMENT); - - if (skb == NULL) - return NULL; - - /* We need the data buffer to be aligned properly. We will reserve - * as many bytes as needed to align the data properly - */ - skb_reserve(skb, - UCC_GETH_RX_DATA_BUF_ALIGNMENT - - (((unsigned)skb->data) & (UCC_GETH_RX_DATA_BUF_ALIGNMENT - - 1))); - - skb->dev = ugeth->dev; - - BD_BUFFER_SET(bd, - dma_map_single(NULL, - skb->data, - ugeth->ug_info->uf_info.max_rx_buf_length + - UCC_GETH_RX_DATA_BUF_ALIGNMENT, - DMA_FROM_DEVICE)); - - BD_STATUS_AND_LENGTH_SET(bd, - (R_E | R_I | - (BD_STATUS_AND_LENGTH(bd) & R_W))); - - return skb; -} - -static int rx_bd_buffer_set(ucc_geth_private_t *ugeth, u8 rxQ) -{ - u8 *bd; - u32 bd_status; - struct sk_buff *skb; - int i; - - bd = ugeth->p_rx_bd_ring[rxQ]; - i = 0; - - do { - bd_status = BD_STATUS_AND_LENGTH(bd); - skb = get_new_skb(ugeth, bd); - - if (!skb) /* If can not allocate data buffer, - abort. Cleanup will be elsewhere */ - return -ENOMEM; - - ugeth->rx_skbuff[rxQ][i] = skb; - - /* advance the BD pointer */ - bd += UCC_GETH_SIZE_OF_BD; - i++; - } while (!(bd_status & R_W)); - - return 0; -} - -static int fill_init_enet_entries(ucc_geth_private_t *ugeth, - volatile u32 *p_start, - u8 num_entries, - u32 thread_size, - u32 thread_alignment, - qe_risc_allocation_e risc, - int skip_page_for_first_entry) -{ - u32 init_enet_offset; - u8 i; - int snum; - - for (i = 0; i < num_entries; i++) { - if ((snum = qe_get_snum()) < 0) { - ugeth_err("fill_init_enet_entries: Can not get SNUM."); - return snum; - } - if ((i == 0) && skip_page_for_first_entry) - /* First entry of Rx does not have page */ - init_enet_offset = 0; - else { - init_enet_offset = - qe_muram_alloc(thread_size, thread_alignment); - if (IS_MURAM_ERR(init_enet_offset)) { - ugeth_err - ("fill_init_enet_entries: Can not allocate DPRAM memory."); - qe_put_snum((u8) snum); - return -ENOMEM; - } - } - *(p_start++) = - ((u8) snum << ENET_INIT_PARAM_SNUM_SHIFT) | init_enet_offset - | risc; - } - - return 0; -} - -static int return_init_enet_entries(ucc_geth_private_t *ugeth, - volatile u32 *p_start, - u8 num_entries, - qe_risc_allocation_e risc, - int skip_page_for_first_entry) -{ - u32 init_enet_offset; - u8 i; - int snum; - - for (i = 0; i < num_entries; i++) { - /* Check that this entry was actually valid -- - needed in case failed in allocations */ - if ((*p_start & ENET_INIT_PARAM_RISC_MASK) == risc) { - snum = - (u32) (*p_start & ENET_INIT_PARAM_SNUM_MASK) >> - ENET_INIT_PARAM_SNUM_SHIFT; - qe_put_snum((u8) snum); - if (!((i == 0) && skip_page_for_first_entry)) { - /* First entry of Rx does not have page */ - init_enet_offset = - (in_be32(p_start) & - ENET_INIT_PARAM_PTR_MASK); - qe_muram_free(init_enet_offset); - } - *(p_start++) = 0; /* Just for cosmetics */ - } - } - - return 0; -} - -#ifdef DEBUG -static int dump_init_enet_entries(ucc_geth_private_t *ugeth, - volatile u32 *p_start, - u8 num_entries, - u32 thread_size, - qe_risc_allocation_e risc, - int skip_page_for_first_entry) -{ - u32 init_enet_offset; - u8 i; - int snum; - - for (i = 0; i < num_entries; i++) { - /* Check that this entry was actually valid -- - needed in case failed in allocations */ - if ((*p_start & ENET_INIT_PARAM_RISC_MASK) == risc) { - snum = - (u32) (*p_start & ENET_INIT_PARAM_SNUM_MASK) >> - ENET_INIT_PARAM_SNUM_SHIFT; - qe_put_snum((u8) snum); - if (!((i == 0) && skip_page_for_first_entry)) { - /* First entry of Rx does not have page */ - init_enet_offset = - (in_be32(p_start) & - ENET_INIT_PARAM_PTR_MASK); - ugeth_info("Init enet entry %d:", i); - ugeth_info("Base address: 0x%08x", - (u32) - qe_muram_addr(init_enet_offset)); - mem_disp(qe_muram_addr(init_enet_offset), - thread_size); - } - p_start++; - } - } - - return 0; -} -#endif - -#ifdef CONFIG_UGETH_FILTERING -static enet_addr_container_t *get_enet_addr_container(void) -{ - enet_addr_container_t *enet_addr_cont; - - /* allocate memory */ - enet_addr_cont = kmalloc(sizeof(enet_addr_container_t), GFP_KERNEL); - if (!enet_addr_cont) { - ugeth_err("%s: No memory for enet_addr_container_t object.", - __FUNCTION__); - return NULL; - } - - return enet_addr_cont; -} -#endif /* CONFIG_UGETH_FILTERING */ - -static void put_enet_addr_container(enet_addr_container_t *enet_addr_cont) -{ - kfree(enet_addr_cont); -} - -#ifdef CONFIG_UGETH_FILTERING -static int hw_add_addr_in_paddr(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr, u8 paddr_num) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - - if (!(paddr_num < NUM_OF_PADDRS)) { - ugeth_warn("%s: Illagel paddr_num.", __FUNCTION__); - return -EINVAL; - } - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth->p_rx_glbl_pram-> - addressfiltering; - - /* Ethernet frames are defined in Little Endian mode, */ - /* therefore to insert the address we reverse the bytes. */ - out_be16(&p_82xx_addr_filt->paddr[paddr_num].h, - (u16) (((u16) (((u16) ((*p_enet_addr)[5])) << 8)) | - (u16) (*p_enet_addr)[4])); - out_be16(&p_82xx_addr_filt->paddr[paddr_num].m, - (u16) (((u16) (((u16) ((*p_enet_addr)[3])) << 8)) | - (u16) (*p_enet_addr)[2])); - out_be16(&p_82xx_addr_filt->paddr[paddr_num].l, - (u16) (((u16) (((u16) ((*p_enet_addr)[1])) << 8)) | - (u16) (*p_enet_addr)[0])); - - return 0; -} -#endif /* CONFIG_UGETH_FILTERING */ - -static int hw_clear_addr_in_paddr(ucc_geth_private_t *ugeth, u8 paddr_num) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - - if (!(paddr_num < NUM_OF_PADDRS)) { - ugeth_warn("%s: Illagel paddr_num.", __FUNCTION__); - return -EINVAL; - } - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth->p_rx_glbl_pram-> - addressfiltering; - - /* Writing address ff.ff.ff.ff.ff.ff disables address - recognition for this register */ - out_be16(&p_82xx_addr_filt->paddr[paddr_num].h, 0xffff); - out_be16(&p_82xx_addr_filt->paddr[paddr_num].m, 0xffff); - out_be16(&p_82xx_addr_filt->paddr[paddr_num].l, 0xffff); - - return 0; -} - -static void hw_add_addr_in_hash(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - u32 cecr_subblock; - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth->p_rx_glbl_pram-> - addressfiltering; - - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num); - - /* Ethernet frames are defined in Little Endian mode, - therefor to insert */ - /* the address to the hash (Big Endian mode), we reverse the bytes.*/ - out_be16(&p_82xx_addr_filt->taddr.h, - (u16) (((u16) (((u16) ((*p_enet_addr)[5])) << 8)) | - (u16) (*p_enet_addr)[4])); - out_be16(&p_82xx_addr_filt->taddr.m, - (u16) (((u16) (((u16) ((*p_enet_addr)[3])) << 8)) | - (u16) (*p_enet_addr)[2])); - out_be16(&p_82xx_addr_filt->taddr.l, - (u16) (((u16) (((u16) ((*p_enet_addr)[1])) << 8)) | - (u16) (*p_enet_addr)[0])); - - qe_issue_cmd(QE_SET_GROUP_ADDRESS, cecr_subblock, - (u8) QE_CR_PROTOCOL_ETHERNET, 0); -} - -#ifdef CONFIG_UGETH_MAGIC_PACKET -static void magic_packet_detection_enable(ucc_geth_private_t *ugeth) -{ - ucc_fast_private_t *uccf; - ucc_geth_t *ug_regs; - u32 maccfg2, uccm; - - uccf = ugeth->uccf; - ug_regs = ugeth->ug_regs; - - /* Enable interrupts for magic packet detection */ - uccm = in_be32(uccf->p_uccm); - uccm |= UCCE_MPD; - out_be32(uccf->p_uccm, uccm); - - /* Enable magic packet detection */ - maccfg2 = in_be32(&ug_regs->maccfg2); - maccfg2 |= MACCFG2_MPE; - out_be32(&ug_regs->maccfg2, maccfg2); -} - -static void magic_packet_detection_disable(ucc_geth_private_t *ugeth) -{ - ucc_fast_private_t *uccf; - ucc_geth_t *ug_regs; - u32 maccfg2, uccm; - - uccf = ugeth->uccf; - ug_regs = ugeth->ug_regs; - - /* Disable interrupts for magic packet detection */ - uccm = in_be32(uccf->p_uccm); - uccm &= ~UCCE_MPD; - out_be32(uccf->p_uccm, uccm); - - /* Disable magic packet detection */ - maccfg2 = in_be32(&ug_regs->maccfg2); - maccfg2 &= ~MACCFG2_MPE; - out_be32(&ug_regs->maccfg2, maccfg2); -} -#endif /* MAGIC_PACKET */ - -static inline int compare_addr(enet_addr_t *addr1, enet_addr_t *addr2) -{ - return memcmp(addr1, addr2, ENET_NUM_OCTETS_PER_ADDRESS); -} - -#ifdef DEBUG -static void get_statistics(ucc_geth_private_t *ugeth, - ucc_geth_tx_firmware_statistics_t * - tx_firmware_statistics, - ucc_geth_rx_firmware_statistics_t * - rx_firmware_statistics, - ucc_geth_hardware_statistics_t *hardware_statistics) -{ - ucc_fast_t *uf_regs; - ucc_geth_t *ug_regs; - ucc_geth_tx_firmware_statistics_pram_t *p_tx_fw_statistics_pram; - ucc_geth_rx_firmware_statistics_pram_t *p_rx_fw_statistics_pram; - - ug_regs = ugeth->ug_regs; - uf_regs = (ucc_fast_t *) ug_regs; - p_tx_fw_statistics_pram = ugeth->p_tx_fw_statistics_pram; - p_rx_fw_statistics_pram = ugeth->p_rx_fw_statistics_pram; - - /* Tx firmware only if user handed pointer and driver actually - gathers Tx firmware statistics */ - if (tx_firmware_statistics && p_tx_fw_statistics_pram) { - tx_firmware_statistics->sicoltx = - in_be32(&p_tx_fw_statistics_pram->sicoltx); - tx_firmware_statistics->mulcoltx = - in_be32(&p_tx_fw_statistics_pram->mulcoltx); - tx_firmware_statistics->latecoltxfr = - in_be32(&p_tx_fw_statistics_pram->latecoltxfr); - tx_firmware_statistics->frabortduecol = - in_be32(&p_tx_fw_statistics_pram->frabortduecol); - tx_firmware_statistics->frlostinmactxer = - in_be32(&p_tx_fw_statistics_pram->frlostinmactxer); - tx_firmware_statistics->carriersenseertx = - in_be32(&p_tx_fw_statistics_pram->carriersenseertx); - tx_firmware_statistics->frtxok = - in_be32(&p_tx_fw_statistics_pram->frtxok); - tx_firmware_statistics->txfrexcessivedefer = - in_be32(&p_tx_fw_statistics_pram->txfrexcessivedefer); - tx_firmware_statistics->txpkts256 = - in_be32(&p_tx_fw_statistics_pram->txpkts256); - tx_firmware_statistics->txpkts512 = - in_be32(&p_tx_fw_statistics_pram->txpkts512); - tx_firmware_statistics->txpkts1024 = - in_be32(&p_tx_fw_statistics_pram->txpkts1024); - tx_firmware_statistics->txpktsjumbo = - in_be32(&p_tx_fw_statistics_pram->txpktsjumbo); - } - - /* Rx firmware only if user handed pointer and driver actually - * gathers Rx firmware statistics */ - if (rx_firmware_statistics && p_rx_fw_statistics_pram) { - int i; - rx_firmware_statistics->frrxfcser = - in_be32(&p_rx_fw_statistics_pram->frrxfcser); - rx_firmware_statistics->fraligner = - in_be32(&p_rx_fw_statistics_pram->fraligner); - rx_firmware_statistics->inrangelenrxer = - in_be32(&p_rx_fw_statistics_pram->inrangelenrxer); - rx_firmware_statistics->outrangelenrxer = - in_be32(&p_rx_fw_statistics_pram->outrangelenrxer); - rx_firmware_statistics->frtoolong = - in_be32(&p_rx_fw_statistics_pram->frtoolong); - rx_firmware_statistics->runt = - in_be32(&p_rx_fw_statistics_pram->runt); - rx_firmware_statistics->verylongevent = - in_be32(&p_rx_fw_statistics_pram->verylongevent); - rx_firmware_statistics->symbolerror = - in_be32(&p_rx_fw_statistics_pram->symbolerror); - rx_firmware_statistics->dropbsy = - in_be32(&p_rx_fw_statistics_pram->dropbsy); - for (i = 0; i < 0x8; i++) - rx_firmware_statistics->res0[i] = - p_rx_fw_statistics_pram->res0[i]; - rx_firmware_statistics->mismatchdrop = - in_be32(&p_rx_fw_statistics_pram->mismatchdrop); - rx_firmware_statistics->underpkts = - in_be32(&p_rx_fw_statistics_pram->underpkts); - rx_firmware_statistics->pkts256 = - in_be32(&p_rx_fw_statistics_pram->pkts256); - rx_firmware_statistics->pkts512 = - in_be32(&p_rx_fw_statistics_pram->pkts512); - rx_firmware_statistics->pkts1024 = - in_be32(&p_rx_fw_statistics_pram->pkts1024); - rx_firmware_statistics->pktsjumbo = - in_be32(&p_rx_fw_statistics_pram->pktsjumbo); - rx_firmware_statistics->frlossinmacer = - in_be32(&p_rx_fw_statistics_pram->frlossinmacer); - rx_firmware_statistics->pausefr = - in_be32(&p_rx_fw_statistics_pram->pausefr); - for (i = 0; i < 0x4; i++) - rx_firmware_statistics->res1[i] = - p_rx_fw_statistics_pram->res1[i]; - rx_firmware_statistics->removevlan = - in_be32(&p_rx_fw_statistics_pram->removevlan); - rx_firmware_statistics->replacevlan = - in_be32(&p_rx_fw_statistics_pram->replacevlan); - rx_firmware_statistics->insertvlan = - in_be32(&p_rx_fw_statistics_pram->insertvlan); - } - - /* Hardware only if user handed pointer and driver actually - gathers hardware statistics */ - if (hardware_statistics && (in_be32(&uf_regs->upsmr) & UPSMR_HSE)) { - hardware_statistics->tx64 = in_be32(&ug_regs->tx64); - hardware_statistics->tx127 = in_be32(&ug_regs->tx127); - hardware_statistics->tx255 = in_be32(&ug_regs->tx255); - hardware_statistics->rx64 = in_be32(&ug_regs->rx64); - hardware_statistics->rx127 = in_be32(&ug_regs->rx127); - hardware_statistics->rx255 = in_be32(&ug_regs->rx255); - hardware_statistics->txok = in_be32(&ug_regs->txok); - hardware_statistics->txcf = in_be16(&ug_regs->txcf); - hardware_statistics->tmca = in_be32(&ug_regs->tmca); - hardware_statistics->tbca = in_be32(&ug_regs->tbca); - hardware_statistics->rxfok = in_be32(&ug_regs->rxfok); - hardware_statistics->rxbok = in_be32(&ug_regs->rxbok); - hardware_statistics->rbyt = in_be32(&ug_regs->rbyt); - hardware_statistics->rmca = in_be32(&ug_regs->rmca); - hardware_statistics->rbca = in_be32(&ug_regs->rbca); - } -} - -static void dump_bds(ucc_geth_private_t *ugeth) -{ - int i; - int length; - - for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) { - if (ugeth->p_tx_bd_ring[i]) { - length = - (ugeth->ug_info->bdRingLenTx[i] * - UCC_GETH_SIZE_OF_BD); - ugeth_info("TX BDs[%d]", i); - mem_disp(ugeth->p_tx_bd_ring[i], length); - } - } - for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { - if (ugeth->p_rx_bd_ring[i]) { - length = - (ugeth->ug_info->bdRingLenRx[i] * - UCC_GETH_SIZE_OF_BD); - ugeth_info("RX BDs[%d]", i); - mem_disp(ugeth->p_rx_bd_ring[i], length); - } - } -} - -static void dump_regs(ucc_geth_private_t *ugeth) -{ - int i; - - ugeth_info("UCC%d Geth registers:", ugeth->ug_info->uf_info.ucc_num); - ugeth_info("Base address: 0x%08x", (u32) ugeth->ug_regs); - - ugeth_info("maccfg1 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->maccfg1, - in_be32(&ugeth->ug_regs->maccfg1)); - ugeth_info("maccfg2 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->maccfg2, - in_be32(&ugeth->ug_regs->maccfg2)); - ugeth_info("ipgifg : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->ipgifg, - in_be32(&ugeth->ug_regs->ipgifg)); - ugeth_info("hafdup : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->hafdup, - in_be32(&ugeth->ug_regs->hafdup)); - ugeth_info("miimcfg : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimcfg, - in_be32(&ugeth->ug_regs->miimng.miimcfg)); - ugeth_info("miimcom : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimcom, - in_be32(&ugeth->ug_regs->miimng.miimcom)); - ugeth_info("miimadd : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimadd, - in_be32(&ugeth->ug_regs->miimng.miimadd)); - ugeth_info("miimcon : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimcon, - in_be32(&ugeth->ug_regs->miimng.miimcon)); - ugeth_info("miimstat : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimstat, - in_be32(&ugeth->ug_regs->miimng.miimstat)); - ugeth_info("miimmind : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->miimng.miimind, - in_be32(&ugeth->ug_regs->miimng.miimind)); - ugeth_info("ifctl : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->ifctl, - in_be32(&ugeth->ug_regs->ifctl)); - ugeth_info("ifstat : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->ifstat, - in_be32(&ugeth->ug_regs->ifstat)); - ugeth_info("macstnaddr1: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->macstnaddr1, - in_be32(&ugeth->ug_regs->macstnaddr1)); - ugeth_info("macstnaddr2: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->macstnaddr2, - in_be32(&ugeth->ug_regs->macstnaddr2)); - ugeth_info("uempr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->uempr, - in_be32(&ugeth->ug_regs->uempr)); - ugeth_info("utbipar : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->utbipar, - in_be32(&ugeth->ug_regs->utbipar)); - ugeth_info("uescr : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->ug_regs->uescr, - in_be16(&ugeth->ug_regs->uescr)); - ugeth_info("tx64 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->tx64, - in_be32(&ugeth->ug_regs->tx64)); - ugeth_info("tx127 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->tx127, - in_be32(&ugeth->ug_regs->tx127)); - ugeth_info("tx255 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->tx255, - in_be32(&ugeth->ug_regs->tx255)); - ugeth_info("rx64 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rx64, - in_be32(&ugeth->ug_regs->rx64)); - ugeth_info("rx127 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rx127, - in_be32(&ugeth->ug_regs->rx127)); - ugeth_info("rx255 : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rx255, - in_be32(&ugeth->ug_regs->rx255)); - ugeth_info("txok : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->txok, - in_be32(&ugeth->ug_regs->txok)); - ugeth_info("txcf : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->ug_regs->txcf, - in_be16(&ugeth->ug_regs->txcf)); - ugeth_info("tmca : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->tmca, - in_be32(&ugeth->ug_regs->tmca)); - ugeth_info("tbca : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->tbca, - in_be32(&ugeth->ug_regs->tbca)); - ugeth_info("rxfok : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rxfok, - in_be32(&ugeth->ug_regs->rxfok)); - ugeth_info("rxbok : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rxbok, - in_be32(&ugeth->ug_regs->rxbok)); - ugeth_info("rbyt : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rbyt, - in_be32(&ugeth->ug_regs->rbyt)); - ugeth_info("rmca : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rmca, - in_be32(&ugeth->ug_regs->rmca)); - ugeth_info("rbca : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->rbca, - in_be32(&ugeth->ug_regs->rbca)); - ugeth_info("scar : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->scar, - in_be32(&ugeth->ug_regs->scar)); - ugeth_info("scam : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->ug_regs->scam, - in_be32(&ugeth->ug_regs->scam)); - - if (ugeth->p_thread_data_tx) { - int numThreadsTxNumerical; - switch (ugeth->ug_info->numThreadsTx) { - case UCC_GETH_NUM_OF_THREADS_1: - numThreadsTxNumerical = 1; - break; - case UCC_GETH_NUM_OF_THREADS_2: - numThreadsTxNumerical = 2; - break; - case UCC_GETH_NUM_OF_THREADS_4: - numThreadsTxNumerical = 4; - break; - case UCC_GETH_NUM_OF_THREADS_6: - numThreadsTxNumerical = 6; - break; - case UCC_GETH_NUM_OF_THREADS_8: - numThreadsTxNumerical = 8; - break; - default: - numThreadsTxNumerical = 0; - break; - } - - ugeth_info("Thread data TXs:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_thread_data_tx); - for (i = 0; i < numThreadsTxNumerical; i++) { - ugeth_info("Thread data TX[%d]:", i); - ugeth_info("Base address: 0x%08x", - (u32) & ugeth->p_thread_data_tx[i]); - mem_disp((u8 *) & ugeth->p_thread_data_tx[i], - sizeof(ucc_geth_thread_data_tx_t)); - } - } - if (ugeth->p_thread_data_rx) { - int numThreadsRxNumerical; - switch (ugeth->ug_info->numThreadsRx) { - case UCC_GETH_NUM_OF_THREADS_1: - numThreadsRxNumerical = 1; - break; - case UCC_GETH_NUM_OF_THREADS_2: - numThreadsRxNumerical = 2; - break; - case UCC_GETH_NUM_OF_THREADS_4: - numThreadsRxNumerical = 4; - break; - case UCC_GETH_NUM_OF_THREADS_6: - numThreadsRxNumerical = 6; - break; - case UCC_GETH_NUM_OF_THREADS_8: - numThreadsRxNumerical = 8; - break; - default: - numThreadsRxNumerical = 0; - break; - } - - ugeth_info("Thread data RX:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_thread_data_rx); - for (i = 0; i < numThreadsRxNumerical; i++) { - ugeth_info("Thread data RX[%d]:", i); - ugeth_info("Base address: 0x%08x", - (u32) & ugeth->p_thread_data_rx[i]); - mem_disp((u8 *) & ugeth->p_thread_data_rx[i], - sizeof(ucc_geth_thread_data_rx_t)); - } - } - if (ugeth->p_exf_glbl_param) { - ugeth_info("EXF global param:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_exf_glbl_param); - mem_disp((u8 *) ugeth->p_exf_glbl_param, - sizeof(*ugeth->p_exf_glbl_param)); - } - if (ugeth->p_tx_glbl_pram) { - ugeth_info("TX global param:"); - ugeth_info("Base address: 0x%08x", (u32) ugeth->p_tx_glbl_pram); - ugeth_info("temoder : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_tx_glbl_pram->temoder, - in_be16(&ugeth->p_tx_glbl_pram->temoder)); - ugeth_info("sqptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->sqptr, - in_be32(&ugeth->p_tx_glbl_pram->sqptr)); - ugeth_info("schedulerbasepointer: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->schedulerbasepointer, - in_be32(&ugeth->p_tx_glbl_pram-> - schedulerbasepointer)); - ugeth_info("txrmonbaseptr: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->txrmonbaseptr, - in_be32(&ugeth->p_tx_glbl_pram->txrmonbaseptr)); - ugeth_info("tstate : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->tstate, - in_be32(&ugeth->p_tx_glbl_pram->tstate)); - ugeth_info("iphoffset[0] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[0], - ugeth->p_tx_glbl_pram->iphoffset[0]); - ugeth_info("iphoffset[1] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[1], - ugeth->p_tx_glbl_pram->iphoffset[1]); - ugeth_info("iphoffset[2] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[2], - ugeth->p_tx_glbl_pram->iphoffset[2]); - ugeth_info("iphoffset[3] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[3], - ugeth->p_tx_glbl_pram->iphoffset[3]); - ugeth_info("iphoffset[4] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[4], - ugeth->p_tx_glbl_pram->iphoffset[4]); - ugeth_info("iphoffset[5] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[5], - ugeth->p_tx_glbl_pram->iphoffset[5]); - ugeth_info("iphoffset[6] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[6], - ugeth->p_tx_glbl_pram->iphoffset[6]); - ugeth_info("iphoffset[7] : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_tx_glbl_pram->iphoffset[7], - ugeth->p_tx_glbl_pram->iphoffset[7]); - ugeth_info("vtagtable[0] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[0], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[0])); - ugeth_info("vtagtable[1] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[1], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[1])); - ugeth_info("vtagtable[2] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[2], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[2])); - ugeth_info("vtagtable[3] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[3], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[3])); - ugeth_info("vtagtable[4] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[4], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[4])); - ugeth_info("vtagtable[5] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[5], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[5])); - ugeth_info("vtagtable[6] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[6], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[6])); - ugeth_info("vtagtable[7] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->vtagtable[7], - in_be32(&ugeth->p_tx_glbl_pram->vtagtable[7])); - ugeth_info("tqptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_tx_glbl_pram->tqptr, - in_be32(&ugeth->p_tx_glbl_pram->tqptr)); - } - if (ugeth->p_rx_glbl_pram) { - ugeth_info("RX global param:"); - ugeth_info("Base address: 0x%08x", (u32) ugeth->p_rx_glbl_pram); - ugeth_info("remoder : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->remoder, - in_be32(&ugeth->p_rx_glbl_pram->remoder)); - ugeth_info("rqptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->rqptr, - in_be32(&ugeth->p_rx_glbl_pram->rqptr)); - ugeth_info("typeorlen : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->typeorlen, - in_be16(&ugeth->p_rx_glbl_pram->typeorlen)); - ugeth_info("rxgstpack : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_rx_glbl_pram->rxgstpack, - ugeth->p_rx_glbl_pram->rxgstpack); - ugeth_info("rxrmonbaseptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->rxrmonbaseptr, - in_be32(&ugeth->p_rx_glbl_pram->rxrmonbaseptr)); - ugeth_info("intcoalescingptr: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->intcoalescingptr, - in_be32(&ugeth->p_rx_glbl_pram->intcoalescingptr)); - ugeth_info("rstate : addr - 0x%08x, val - 0x%02x", - (u32) & ugeth->p_rx_glbl_pram->rstate, - ugeth->p_rx_glbl_pram->rstate); - ugeth_info("mrblr : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->mrblr, - in_be16(&ugeth->p_rx_glbl_pram->mrblr)); - ugeth_info("rbdqptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->rbdqptr, - in_be32(&ugeth->p_rx_glbl_pram->rbdqptr)); - ugeth_info("mflr : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->mflr, - in_be16(&ugeth->p_rx_glbl_pram->mflr)); - ugeth_info("minflr : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->minflr, - in_be16(&ugeth->p_rx_glbl_pram->minflr)); - ugeth_info("maxd1 : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->maxd1, - in_be16(&ugeth->p_rx_glbl_pram->maxd1)); - ugeth_info("maxd2 : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->maxd2, - in_be16(&ugeth->p_rx_glbl_pram->maxd2)); - ugeth_info("ecamptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->ecamptr, - in_be32(&ugeth->p_rx_glbl_pram->ecamptr)); - ugeth_info("l2qt : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l2qt, - in_be32(&ugeth->p_rx_glbl_pram->l2qt)); - ugeth_info("l3qt[0] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[0], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[0])); - ugeth_info("l3qt[1] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[1], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[1])); - ugeth_info("l3qt[2] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[2], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[2])); - ugeth_info("l3qt[3] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[3], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[3])); - ugeth_info("l3qt[4] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[4], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[4])); - ugeth_info("l3qt[5] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[5], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[5])); - ugeth_info("l3qt[6] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[6], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[6])); - ugeth_info("l3qt[7] : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->l3qt[7], - in_be32(&ugeth->p_rx_glbl_pram->l3qt[7])); - ugeth_info("vlantype : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->vlantype, - in_be16(&ugeth->p_rx_glbl_pram->vlantype)); - ugeth_info("vlantci : addr - 0x%08x, val - 0x%04x", - (u32) & ugeth->p_rx_glbl_pram->vlantci, - in_be16(&ugeth->p_rx_glbl_pram->vlantci)); - for (i = 0; i < 64; i++) - ugeth_info - ("addressfiltering[%d]: addr - 0x%08x, val - 0x%02x", - i, - (u32) & ugeth->p_rx_glbl_pram->addressfiltering[i], - ugeth->p_rx_glbl_pram->addressfiltering[i]); - ugeth_info("exfGlobalParam : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_glbl_pram->exfGlobalParam, - in_be32(&ugeth->p_rx_glbl_pram->exfGlobalParam)); - } - if (ugeth->p_send_q_mem_reg) { - ugeth_info("Send Q memory registers:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_send_q_mem_reg); - for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) { - ugeth_info("SQQD[%d]:", i); - ugeth_info("Base address: 0x%08x", - (u32) & ugeth->p_send_q_mem_reg->sqqd[i]); - mem_disp((u8 *) & ugeth->p_send_q_mem_reg->sqqd[i], - sizeof(ucc_geth_send_queue_qd_t)); - } - } - if (ugeth->p_scheduler) { - ugeth_info("Scheduler:"); - ugeth_info("Base address: 0x%08x", (u32) ugeth->p_scheduler); - mem_disp((u8 *) ugeth->p_scheduler, - sizeof(*ugeth->p_scheduler)); - } - if (ugeth->p_tx_fw_statistics_pram) { - ugeth_info("TX FW statistics pram:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_tx_fw_statistics_pram); - mem_disp((u8 *) ugeth->p_tx_fw_statistics_pram, - sizeof(*ugeth->p_tx_fw_statistics_pram)); - } - if (ugeth->p_rx_fw_statistics_pram) { - ugeth_info("RX FW statistics pram:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_rx_fw_statistics_pram); - mem_disp((u8 *) ugeth->p_rx_fw_statistics_pram, - sizeof(*ugeth->p_rx_fw_statistics_pram)); - } - if (ugeth->p_rx_irq_coalescing_tbl) { - ugeth_info("RX IRQ coalescing tables:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_rx_irq_coalescing_tbl); - for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { - ugeth_info("RX IRQ coalescing table entry[%d]:", i); - ugeth_info("Base address: 0x%08x", - (u32) & ugeth->p_rx_irq_coalescing_tbl-> - coalescingentry[i]); - ugeth_info - ("interruptcoalescingmaxvalue: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_irq_coalescing_tbl-> - coalescingentry[i].interruptcoalescingmaxvalue, - in_be32(&ugeth->p_rx_irq_coalescing_tbl-> - coalescingentry[i]. - interruptcoalescingmaxvalue)); - ugeth_info - ("interruptcoalescingcounter : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_irq_coalescing_tbl-> - coalescingentry[i].interruptcoalescingcounter, - in_be32(&ugeth->p_rx_irq_coalescing_tbl-> - coalescingentry[i]. - interruptcoalescingcounter)); - } - } - if (ugeth->p_rx_bd_qs_tbl) { - ugeth_info("RX BD QS tables:"); - ugeth_info("Base address: 0x%08x", (u32) ugeth->p_rx_bd_qs_tbl); - for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { - ugeth_info("RX BD QS table[%d]:", i); - ugeth_info("Base address: 0x%08x", - (u32) & ugeth->p_rx_bd_qs_tbl[i]); - ugeth_info - ("bdbaseptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_bd_qs_tbl[i].bdbaseptr, - in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdbaseptr)); - ugeth_info - ("bdptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_bd_qs_tbl[i].bdptr, - in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdptr)); - ugeth_info - ("externalbdbaseptr: addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, - in_be32(&ugeth->p_rx_bd_qs_tbl[i]. - externalbdbaseptr)); - ugeth_info - ("externalbdptr : addr - 0x%08x, val - 0x%08x", - (u32) & ugeth->p_rx_bd_qs_tbl[i].externalbdptr, - in_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdptr)); - ugeth_info("ucode RX Prefetched BDs:"); - ugeth_info("Base address: 0x%08x", - (u32) - qe_muram_addr(in_be32 - (&ugeth->p_rx_bd_qs_tbl[i]. - bdbaseptr))); - mem_disp((u8 *) - qe_muram_addr(in_be32 - (&ugeth->p_rx_bd_qs_tbl[i]. - bdbaseptr)), - sizeof(ucc_geth_rx_prefetched_bds_t)); - } - } - if (ugeth->p_init_enet_param_shadow) { - int size; - ugeth_info("Init enet param shadow:"); - ugeth_info("Base address: 0x%08x", - (u32) ugeth->p_init_enet_param_shadow); - mem_disp((u8 *) ugeth->p_init_enet_param_shadow, - sizeof(*ugeth->p_init_enet_param_shadow)); - - size = sizeof(ucc_geth_thread_rx_pram_t); - if (ugeth->ug_info->rxExtendedFiltering) { - size += - THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING; - if (ugeth->ug_info->largestexternallookupkeysize == - QE_FLTR_TABLE_LOOKUP_KEY_SIZE_8_BYTES) - size += - THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_8; - if (ugeth->ug_info->largestexternallookupkeysize == - QE_FLTR_TABLE_LOOKUP_KEY_SIZE_16_BYTES) - size += - THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_16; - } - - dump_init_enet_entries(ugeth, - &(ugeth->p_init_enet_param_shadow-> - txthread[0]), - ENET_INIT_PARAM_MAX_ENTRIES_TX, - sizeof(ucc_geth_thread_tx_pram_t), - ugeth->ug_info->riscTx, 0); - dump_init_enet_entries(ugeth, - &(ugeth->p_init_enet_param_shadow-> - rxthread[0]), - ENET_INIT_PARAM_MAX_ENTRIES_RX, size, - ugeth->ug_info->riscRx, 1); - } -} -#endif /* DEBUG */ - -static void init_default_reg_vals(volatile u32 *upsmr_register, - volatile u32 *maccfg1_register, - volatile u32 *maccfg2_register) -{ - out_be32(upsmr_register, UCC_GETH_UPSMR_INIT); - out_be32(maccfg1_register, UCC_GETH_MACCFG1_INIT); - out_be32(maccfg2_register, UCC_GETH_MACCFG2_INIT); -} - -static int init_half_duplex_params(int alt_beb, - int back_pressure_no_backoff, - int no_backoff, - int excess_defer, - u8 alt_beb_truncation, - u8 max_retransmissions, - u8 collision_window, - volatile u32 *hafdup_register) -{ - u32 value = 0; - - if ((alt_beb_truncation > HALFDUP_ALT_BEB_TRUNCATION_MAX) || - (max_retransmissions > HALFDUP_MAX_RETRANSMISSION_MAX) || - (collision_window > HALFDUP_COLLISION_WINDOW_MAX)) - return -EINVAL; - - value = (u32) (alt_beb_truncation << HALFDUP_ALT_BEB_TRUNCATION_SHIFT); - - if (alt_beb) - value |= HALFDUP_ALT_BEB; - if (back_pressure_no_backoff) - value |= HALFDUP_BACK_PRESSURE_NO_BACKOFF; - if (no_backoff) - value |= HALFDUP_NO_BACKOFF; - if (excess_defer) - value |= HALFDUP_EXCESSIVE_DEFER; - - value |= (max_retransmissions << HALFDUP_MAX_RETRANSMISSION_SHIFT); - - value |= collision_window; - - out_be32(hafdup_register, value); - return 0; -} - -static int init_inter_frame_gap_params(u8 non_btb_cs_ipg, - u8 non_btb_ipg, - u8 min_ifg, - u8 btb_ipg, - volatile u32 *ipgifg_register) -{ - u32 value = 0; - - /* Non-Back-to-back IPG part 1 should be <= Non-Back-to-back - IPG part 2 */ - if (non_btb_cs_ipg > non_btb_ipg) - return -EINVAL; - - if ((non_btb_cs_ipg > IPGIFG_NON_BACK_TO_BACK_IFG_PART1_MAX) || - (non_btb_ipg > IPGIFG_NON_BACK_TO_BACK_IFG_PART2_MAX) || - /*(min_ifg > IPGIFG_MINIMUM_IFG_ENFORCEMENT_MAX) || */ - (btb_ipg > IPGIFG_BACK_TO_BACK_IFG_MAX)) - return -EINVAL; - - value |= - ((non_btb_cs_ipg << IPGIFG_NON_BACK_TO_BACK_IFG_PART1_SHIFT) & - IPGIFG_NBTB_CS_IPG_MASK); - value |= - ((non_btb_ipg << IPGIFG_NON_BACK_TO_BACK_IFG_PART2_SHIFT) & - IPGIFG_NBTB_IPG_MASK); - value |= - ((min_ifg << IPGIFG_MINIMUM_IFG_ENFORCEMENT_SHIFT) & - IPGIFG_MIN_IFG_MASK); - value |= (btb_ipg & IPGIFG_BTB_IPG_MASK); - - out_be32(ipgifg_register, value); - return 0; -} - -static int init_flow_control_params(u32 automatic_flow_control_mode, - int rx_flow_control_enable, - int tx_flow_control_enable, - u16 pause_period, - u16 extension_field, - volatile u32 *upsmr_register, - volatile u32 *uempr_register, - volatile u32 *maccfg1_register) -{ - u32 value = 0; - - /* Set UEMPR register */ - value = (u32) pause_period << UEMPR_PAUSE_TIME_VALUE_SHIFT; - value |= (u32) extension_field << UEMPR_EXTENDED_PAUSE_TIME_VALUE_SHIFT; - out_be32(uempr_register, value); - - /* Set UPSMR register */ - value = in_be32(upsmr_register); - value |= automatic_flow_control_mode; - out_be32(upsmr_register, value); - - value = in_be32(maccfg1_register); - if (rx_flow_control_enable) - value |= MACCFG1_FLOW_RX; - if (tx_flow_control_enable) - value |= MACCFG1_FLOW_TX; - out_be32(maccfg1_register, value); - - return 0; -} - -static int init_hw_statistics_gathering_mode(int enable_hardware_statistics, - int auto_zero_hardware_statistics, - volatile u32 *upsmr_register, - volatile u16 *uescr_register) -{ - u32 upsmr_value = 0; - u16 uescr_value = 0; - /* Enable hardware statistics gathering if requested */ - if (enable_hardware_statistics) { - upsmr_value = in_be32(upsmr_register); - upsmr_value |= UPSMR_HSE; - out_be32(upsmr_register, upsmr_value); - } - - /* Clear hardware statistics counters */ - uescr_value = in_be16(uescr_register); - uescr_value |= UESCR_CLRCNT; - /* Automatically zero hardware statistics counters on read, - if requested */ - if (auto_zero_hardware_statistics) - uescr_value |= UESCR_AUTOZ; - out_be16(uescr_register, uescr_value); - - return 0; -} - -static int init_firmware_statistics_gathering_mode(int - enable_tx_firmware_statistics, - int enable_rx_firmware_statistics, - volatile u32 *tx_rmon_base_ptr, - u32 tx_firmware_statistics_structure_address, - volatile u32 *rx_rmon_base_ptr, - u32 rx_firmware_statistics_structure_address, - volatile u16 *temoder_register, - volatile u32 *remoder_register) -{ - /* Note: this function does not check if */ - /* the parameters it receives are NULL */ - u16 temoder_value; - u32 remoder_value; - - if (enable_tx_firmware_statistics) { - out_be32(tx_rmon_base_ptr, - tx_firmware_statistics_structure_address); - temoder_value = in_be16(temoder_register); - temoder_value |= TEMODER_TX_RMON_STATISTICS_ENABLE; - out_be16(temoder_register, temoder_value); - } - - if (enable_rx_firmware_statistics) { - out_be32(rx_rmon_base_ptr, - rx_firmware_statistics_structure_address); - remoder_value = in_be32(remoder_register); - remoder_value |= REMODER_RX_RMON_STATISTICS_ENABLE; - out_be32(remoder_register, remoder_value); - } - - return 0; -} - -static int init_mac_station_addr_regs(u8 address_byte_0, - u8 address_byte_1, - u8 address_byte_2, - u8 address_byte_3, - u8 address_byte_4, - u8 address_byte_5, - volatile u32 *macstnaddr1_register, - volatile u32 *macstnaddr2_register) -{ - u32 value = 0; - - /* Example: for a station address of 0x12345678ABCD, */ - /* 0x12 is byte 0, 0x34 is byte 1 and so on and 0xCD is byte 5 */ - - /* MACSTNADDR1 Register: */ - - /* 0 7 8 15 */ - /* station address byte 5 station address byte 4 */ - /* 16 23 24 31 */ - /* station address byte 3 station address byte 2 */ - value |= (u32) ((address_byte_2 << 0) & 0x000000FF); - value |= (u32) ((address_byte_3 << 8) & 0x0000FF00); - value |= (u32) ((address_byte_4 << 16) & 0x00FF0000); - value |= (u32) ((address_byte_5 << 24) & 0xFF000000); - - out_be32(macstnaddr1_register, value); - - /* MACSTNADDR2 Register: */ - - /* 0 7 8 15 */ - /* station address byte 1 station address byte 0 */ - /* 16 23 24 31 */ - /* reserved reserved */ - value = 0; - value |= (u32) ((address_byte_0 << 16) & 0x00FF0000); - value |= (u32) ((address_byte_1 << 24) & 0xFF000000); - - out_be32(macstnaddr2_register, value); - - return 0; -} - -static int init_mac_duplex_mode(int full_duplex, - int limited_to_full_duplex, - volatile u32 *maccfg2_register) -{ - u32 value = 0; - - /* some interfaces must work in full duplex mode */ - if ((full_duplex == 0) && (limited_to_full_duplex == 1)) - return -EINVAL; - - value = in_be32(maccfg2_register); - - if (full_duplex) - value |= MACCFG2_FDX; - else - value &= ~MACCFG2_FDX; - - out_be32(maccfg2_register, value); - return 0; -} - -static int init_check_frame_length_mode(int length_check, - volatile u32 *maccfg2_register) -{ - u32 value = 0; - - value = in_be32(maccfg2_register); - - if (length_check) - value |= MACCFG2_LC; - else - value &= ~MACCFG2_LC; - - out_be32(maccfg2_register, value); - return 0; -} - -static int init_preamble_length(u8 preamble_length, - volatile u32 *maccfg2_register) -{ - u32 value = 0; - - if ((preamble_length < 3) || (preamble_length > 7)) - return -EINVAL; - - value = in_be32(maccfg2_register); - value &= ~MACCFG2_PREL_MASK; - value |= (preamble_length << MACCFG2_PREL_SHIFT); - out_be32(maccfg2_register, value); - return 0; -} - -static int init_mii_management_configuration(int reset_mgmt, - int preamble_supress, - volatile u32 *miimcfg_register, - volatile u32 *miimind_register) -{ - unsigned int timeout = PHY_INIT_TIMEOUT; - u32 value = 0; - - value = in_be32(miimcfg_register); - if (reset_mgmt) { - value |= MIIMCFG_RESET_MANAGEMENT; - out_be32(miimcfg_register, value); - } - - value = 0; - - if (preamble_supress) - value |= MIIMCFG_NO_PREAMBLE; - - value |= UCC_GETH_MIIMCFG_MNGMNT_CLC_DIV_INIT; - out_be32(miimcfg_register, value); - - /* Wait until the bus is free */ - while ((in_be32(miimind_register) & MIIMIND_BUSY) && timeout--) - cpu_relax(); - - if (timeout <= 0) { - ugeth_err("%s: The MII Bus is stuck!", __FUNCTION__); - return -ETIMEDOUT; - } - - return 0; -} - -static int init_rx_parameters(int reject_broadcast, - int receive_short_frames, - int promiscuous, volatile u32 *upsmr_register) -{ - u32 value = 0; - - value = in_be32(upsmr_register); - - if (reject_broadcast) - value |= UPSMR_BRO; - else - value &= ~UPSMR_BRO; - - if (receive_short_frames) - value |= UPSMR_RSH; - else - value &= ~UPSMR_RSH; - - if (promiscuous) - value |= UPSMR_PRO; - else - value &= ~UPSMR_PRO; - - out_be32(upsmr_register, value); - - return 0; -} - -static int init_max_rx_buff_len(u16 max_rx_buf_len, - volatile u16 *mrblr_register) -{ - /* max_rx_buf_len value must be a multiple of 128 */ - if ((max_rx_buf_len == 0) - || (max_rx_buf_len % UCC_GETH_MRBLR_ALIGNMENT)) - return -EINVAL; - - out_be16(mrblr_register, max_rx_buf_len); - return 0; -} - -static int init_min_frame_len(u16 min_frame_length, - volatile u16 *minflr_register, - volatile u16 *mrblr_register) -{ - u16 mrblr_value = 0; - - mrblr_value = in_be16(mrblr_register); - if (min_frame_length >= (mrblr_value - 4)) - return -EINVAL; - - out_be16(minflr_register, min_frame_length); - return 0; -} - -static int adjust_enet_interface(ucc_geth_private_t *ugeth) -{ - ucc_geth_info_t *ug_info; - ucc_geth_t *ug_regs; - ucc_fast_t *uf_regs; - enet_speed_e speed; - int ret_val, rpm = 0, tbi = 0, r10m = 0, rmm = - 0, limited_to_full_duplex = 0; - u32 upsmr, maccfg2, utbipar, tbiBaseAddress; - u16 value; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ug_info = ugeth->ug_info; - ug_regs = ugeth->ug_regs; - uf_regs = ugeth->uccf->uf_regs; - - /* Analyze enet_interface according to Interface Mode Configuration - table */ - ret_val = - get_interface_details(ug_info->enet_interface, &speed, &r10m, &rmm, - &rpm, &tbi, &limited_to_full_duplex); - if (ret_val != 0) { - ugeth_err - ("%s: half duplex not supported in requested configuration.", - __FUNCTION__); - return ret_val; - } - - /* Set MACCFG2 */ - maccfg2 = in_be32(&ug_regs->maccfg2); - maccfg2 &= ~MACCFG2_INTERFACE_MODE_MASK; - if ((speed == ENET_SPEED_10BT) || (speed == ENET_SPEED_100BT)) - maccfg2 |= MACCFG2_INTERFACE_MODE_NIBBLE; - else if (speed == ENET_SPEED_1000BT) - maccfg2 |= MACCFG2_INTERFACE_MODE_BYTE; - maccfg2 |= ug_info->padAndCrc; - out_be32(&ug_regs->maccfg2, maccfg2); - - /* Set UPSMR */ - upsmr = in_be32(&uf_regs->upsmr); - upsmr &= ~(UPSMR_RPM | UPSMR_R10M | UPSMR_TBIM | UPSMR_RMM); - if (rpm) - upsmr |= UPSMR_RPM; - if (r10m) - upsmr |= UPSMR_R10M; - if (tbi) - upsmr |= UPSMR_TBIM; - if (rmm) - upsmr |= UPSMR_RMM; - out_be32(&uf_regs->upsmr, upsmr); - - /* Set UTBIPAR */ - utbipar = in_be32(&ug_regs->utbipar); - utbipar &= ~UTBIPAR_PHY_ADDRESS_MASK; - if (tbi) - utbipar |= - (ug_info->phy_address + - ugeth->ug_info->uf_info. - ucc_num) << UTBIPAR_PHY_ADDRESS_SHIFT; - else - utbipar |= - (0x10 + - ugeth->ug_info->uf_info. - ucc_num) << UTBIPAR_PHY_ADDRESS_SHIFT; - out_be32(&ug_regs->utbipar, utbipar); - - /* Disable autonegotiation in tbi mode, because by default it - comes up in autonegotiation mode. */ - /* Note that this depends on proper setting in utbipar register. */ - if (tbi) { - tbiBaseAddress = in_be32(&ug_regs->utbipar); - tbiBaseAddress &= UTBIPAR_PHY_ADDRESS_MASK; - tbiBaseAddress >>= UTBIPAR_PHY_ADDRESS_SHIFT; - value = - ugeth->mii_info->mdio_read(ugeth->dev, (u8) tbiBaseAddress, - ENET_TBI_MII_CR); - value &= ~0x1000; /* Turn off autonegotiation */ - ugeth->mii_info->mdio_write(ugeth->dev, (u8) tbiBaseAddress, - ENET_TBI_MII_CR, value); - } - - ret_val = init_mac_duplex_mode(1, - limited_to_full_duplex, - &ug_regs->maccfg2); - if (ret_val != 0) { - ugeth_err - ("%s: half duplex not supported in requested configuration.", - __FUNCTION__); - return ret_val; - } - - init_check_frame_length_mode(ug_info->lengthCheckRx, &ug_regs->maccfg2); - - ret_val = init_preamble_length(ug_info->prel, &ug_regs->maccfg2); - if (ret_val != 0) { - ugeth_err - ("%s: Preamble length must be between 3 and 7 inclusive.", - __FUNCTION__); - return ret_val; - } - - return 0; -} - -/* Called every time the controller might need to be made - * aware of new link state. The PHY code conveys this - * information through variables in the ugeth structure, and this - * function converts those variables into the appropriate - * register values, and can bring down the device if needed. - */ -static void adjust_link(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - ucc_geth_t *ug_regs; - u32 tempval; - struct ugeth_mii_info *mii_info = ugeth->mii_info; - - ug_regs = ugeth->ug_regs; - - if (mii_info->link) { - /* Now we make sure that we can be in full duplex mode. - * If not, we operate in half-duplex mode. */ - if (mii_info->duplex != ugeth->oldduplex) { - if (!(mii_info->duplex)) { - tempval = in_be32(&ug_regs->maccfg2); - tempval &= ~(MACCFG2_FDX); - out_be32(&ug_regs->maccfg2, tempval); - - ugeth_info("%s: Half Duplex", dev->name); - } else { - tempval = in_be32(&ug_regs->maccfg2); - tempval |= MACCFG2_FDX; - out_be32(&ug_regs->maccfg2, tempval); - - ugeth_info("%s: Full Duplex", dev->name); - } - - ugeth->oldduplex = mii_info->duplex; - } - - if (mii_info->speed != ugeth->oldspeed) { - switch (mii_info->speed) { - case 1000: -#ifdef CONFIG_MPC836x -/* FIXME: This code is for 100Mbs BUG fixing, -remove this when it is fixed!!! */ - if (ugeth->ug_info->enet_interface == - ENET_1000_GMII) - /* Run the commands which initialize the PHY */ - { - tempval = - (u32) mii_info->mdio_read(ugeth-> - dev, mii_info->mii_id, 0x1b); - tempval |= 0x000f; - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, 0x1b, - (u16) tempval); - tempval = - (u32) mii_info->mdio_read(ugeth-> - dev, mii_info->mii_id, - MII_BMCR); - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, MII_BMCR, - (u16) (tempval | BMCR_RESET)); - } else if (ugeth->ug_info->enet_interface == - ENET_1000_RGMII) - /* Run the commands which initialize the PHY */ - { - tempval = - (u32) mii_info->mdio_read(ugeth-> - dev, mii_info->mii_id, 0x1b); - tempval = (tempval & ~0x000f) | 0x000b; - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, 0x1b, - (u16) tempval); - tempval = - (u32) mii_info->mdio_read(ugeth-> - dev, mii_info->mii_id, - MII_BMCR); - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, MII_BMCR, - (u16) (tempval | BMCR_RESET)); - } - msleep(4000); -#endif /* CONFIG_MPC8360 */ - adjust_enet_interface(ugeth); - break; - case 100: - case 10: -#ifdef CONFIG_MPC836x -/* FIXME: This code is for 100Mbs BUG fixing, -remove this lines when it will be fixed!!! */ - ugeth->ug_info->enet_interface = ENET_100_RGMII; - tempval = - (u32) mii_info->mdio_read(ugeth->dev, - mii_info->mii_id, - 0x1b); - tempval = (tempval & ~0x000f) | 0x000b; - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, 0x1b, - (u16) tempval); - tempval = - (u32) mii_info->mdio_read(ugeth->dev, - mii_info->mii_id, - MII_BMCR); - mii_info->mdio_write(ugeth->dev, - mii_info->mii_id, MII_BMCR, - (u16) (tempval | - BMCR_RESET)); - msleep(4000); -#endif /* CONFIG_MPC8360 */ - adjust_enet_interface(ugeth); - break; - default: - ugeth_warn - ("%s: Ack! Speed (%d) is not 10/100/1000!", - dev->name, mii_info->speed); - break; - } - - ugeth_info("%s: Speed %dBT", dev->name, - mii_info->speed); - - ugeth->oldspeed = mii_info->speed; - } - - if (!ugeth->oldlink) { - ugeth_info("%s: Link is up", dev->name); - ugeth->oldlink = 1; - netif_carrier_on(dev); - netif_schedule(dev); - } - } else { - if (ugeth->oldlink) { - ugeth_info("%s: Link is down", dev->name); - ugeth->oldlink = 0; - ugeth->oldspeed = 0; - ugeth->oldduplex = -1; - netif_carrier_off(dev); - } - } -} - -/* Configure the PHY for dev. - * returns 0 if success. -1 if failure - */ -static int init_phy(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - struct phy_info *curphy; - ucc_mii_mng_t *mii_regs; - struct ugeth_mii_info *mii_info; - int err; - - mii_regs = &ugeth->ug_regs->miimng; - - ugeth->oldlink = 0; - ugeth->oldspeed = 0; - ugeth->oldduplex = -1; - - mii_info = kmalloc(sizeof(struct ugeth_mii_info), GFP_KERNEL); - - if (NULL == mii_info) { - ugeth_err("%s: Could not allocate mii_info", dev->name); - return -ENOMEM; - } - - mii_info->mii_regs = mii_regs; - mii_info->speed = SPEED_1000; - mii_info->duplex = DUPLEX_FULL; - mii_info->pause = 0; - mii_info->link = 0; - - mii_info->advertising = (ADVERTISED_10baseT_Half | - ADVERTISED_10baseT_Full | - ADVERTISED_100baseT_Half | - ADVERTISED_100baseT_Full | - ADVERTISED_1000baseT_Full); - mii_info->autoneg = 1; - - mii_info->mii_id = ugeth->ug_info->phy_address; - - mii_info->dev = dev; - - mii_info->mdio_read = &read_phy_reg; - mii_info->mdio_write = &write_phy_reg; - - ugeth->mii_info = mii_info; - - spin_lock_irq(&ugeth->lock); - - /* Set this UCC to be the master of the MII managment */ - ucc_set_qe_mux_mii_mng(ugeth->ug_info->uf_info.ucc_num); - - if (init_mii_management_configuration(1, - ugeth->ug_info-> - miiPreambleSupress, - &mii_regs->miimcfg, - &mii_regs->miimind)) { - ugeth_err("%s: The MII Bus is stuck!", dev->name); - err = -1; - goto bus_fail; - } - - spin_unlock_irq(&ugeth->lock); - - /* get info for this PHY */ - curphy = get_phy_info(ugeth->mii_info); - - if (curphy == NULL) { - ugeth_err("%s: No PHY found", dev->name); - err = -1; - goto no_phy; - } - - mii_info->phyinfo = curphy; - - /* Run the commands which initialize the PHY */ - if (curphy->init) { - err = curphy->init(ugeth->mii_info); - if (err) - goto phy_init_fail; - } - - return 0; - - phy_init_fail: - no_phy: - bus_fail: - kfree(mii_info); - - return err; -} - -#ifdef CONFIG_UGETH_TX_ON_DEMOND -static int ugeth_transmit_on_demand(ucc_geth_private_t *ugeth) -{ - ucc_fast_transmit_on_demand(ugeth->uccf); - - return 0; -} -#endif - -static int ugeth_graceful_stop_tx(ucc_geth_private_t *ugeth) -{ - ucc_fast_private_t *uccf; - u32 cecr_subblock; - u32 temp; - - uccf = ugeth->uccf; - - /* Mask GRACEFUL STOP TX interrupt bit and clear it */ - temp = in_be32(uccf->p_uccm); - temp &= ~UCCE_GRA; - out_be32(uccf->p_uccm, temp); - out_be32(uccf->p_ucce, UCCE_GRA); /* clear by writing 1 */ - - /* Issue host command */ - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num); - qe_issue_cmd(QE_GRACEFUL_STOP_TX, cecr_subblock, - (u8) QE_CR_PROTOCOL_ETHERNET, 0); - - /* Wait for command to complete */ - do { - temp = in_be32(uccf->p_ucce); - } while (!(temp & UCCE_GRA)); - - uccf->stopped_tx = 1; - - return 0; -} - -static int ugeth_graceful_stop_rx(ucc_geth_private_t * ugeth) -{ - ucc_fast_private_t *uccf; - u32 cecr_subblock; - u8 temp; - - uccf = ugeth->uccf; - - /* Clear acknowledge bit */ - temp = ugeth->p_rx_glbl_pram->rxgstpack; - temp &= ~GRACEFUL_STOP_ACKNOWLEDGE_RX; - ugeth->p_rx_glbl_pram->rxgstpack = temp; - - /* Keep issuing command and checking acknowledge bit until - it is asserted, according to spec */ - do { - /* Issue host command */ - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info. - ucc_num); - qe_issue_cmd(QE_GRACEFUL_STOP_RX, cecr_subblock, - (u8) QE_CR_PROTOCOL_ETHERNET, 0); - - temp = ugeth->p_rx_glbl_pram->rxgstpack; - } while (!(temp & GRACEFUL_STOP_ACKNOWLEDGE_RX)); - - uccf->stopped_rx = 1; - - return 0; -} - -static int ugeth_restart_tx(ucc_geth_private_t *ugeth) -{ - ucc_fast_private_t *uccf; - u32 cecr_subblock; - - uccf = ugeth->uccf; - - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num); - qe_issue_cmd(QE_RESTART_TX, cecr_subblock, (u8) QE_CR_PROTOCOL_ETHERNET, - 0); - uccf->stopped_tx = 0; - - return 0; -} - -static int ugeth_restart_rx(ucc_geth_private_t *ugeth) -{ - ucc_fast_private_t *uccf; - u32 cecr_subblock; - - uccf = ugeth->uccf; - - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num); - qe_issue_cmd(QE_RESTART_RX, cecr_subblock, (u8) QE_CR_PROTOCOL_ETHERNET, - 0); - uccf->stopped_rx = 0; - - return 0; -} - -static int ugeth_enable(ucc_geth_private_t *ugeth, comm_dir_e mode) -{ - ucc_fast_private_t *uccf; - int enabled_tx, enabled_rx; - - uccf = ugeth->uccf; - - /* check if the UCC number is in range. */ - if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { - ugeth_err("%s: ucc_num out of range.", __FUNCTION__); - return -EINVAL; - } - - enabled_tx = uccf->enabled_tx; - enabled_rx = uccf->enabled_rx; - - /* Get Tx and Rx going again, in case this channel was actively - disabled. */ - if ((mode & COMM_DIR_TX) && (!enabled_tx) && uccf->stopped_tx) - ugeth_restart_tx(ugeth); - if ((mode & COMM_DIR_RX) && (!enabled_rx) && uccf->stopped_rx) - ugeth_restart_rx(ugeth); - - ucc_fast_enable(uccf, mode); /* OK to do even if not disabled */ - - return 0; - -} - -static int ugeth_disable(ucc_geth_private_t * ugeth, comm_dir_e mode) -{ - ucc_fast_private_t *uccf; - - uccf = ugeth->uccf; - - /* check if the UCC number is in range. */ - if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { - ugeth_err("%s: ucc_num out of range.", __FUNCTION__); - return -EINVAL; - } - - /* Stop any transmissions */ - if ((mode & COMM_DIR_TX) && uccf->enabled_tx && !uccf->stopped_tx) - ugeth_graceful_stop_tx(ugeth); - - /* Stop any receptions */ - if ((mode & COMM_DIR_RX) && uccf->enabled_rx && !uccf->stopped_rx) - ugeth_graceful_stop_rx(ugeth); - - ucc_fast_disable(ugeth->uccf, mode); /* OK to do even if not enabled */ - - return 0; -} - -static void ugeth_dump_regs(ucc_geth_private_t *ugeth) -{ -#ifdef DEBUG - ucc_fast_dump_regs(ugeth->uccf); - dump_regs(ugeth); - dump_bds(ugeth); -#endif -} - -#ifdef CONFIG_UGETH_FILTERING -static int ugeth_ext_filtering_serialize_tad(ucc_geth_tad_params_t * - p_UccGethTadParams, - qe_fltr_tad_t *qe_fltr_tad) -{ - u16 temp; - - /* Zero serialized TAD */ - memset(qe_fltr_tad, 0, QE_FLTR_TAD_SIZE); - - qe_fltr_tad->serialized[0] |= UCC_GETH_TAD_V; /* Must have this */ - if (p_UccGethTadParams->rx_non_dynamic_extended_features_mode || - (p_UccGethTadParams->vtag_op != UCC_GETH_VLAN_OPERATION_TAGGED_NOP) - || (p_UccGethTadParams->vnontag_op != - UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP) - ) - qe_fltr_tad->serialized[0] |= UCC_GETH_TAD_EF; - if (p_UccGethTadParams->reject_frame) - qe_fltr_tad->serialized[0] |= UCC_GETH_TAD_REJ; - temp = - (u16) (((u16) p_UccGethTadParams-> - vtag_op) << UCC_GETH_TAD_VTAG_OP_SHIFT); - qe_fltr_tad->serialized[0] |= (u8) (temp >> 8); /* upper bits */ - - qe_fltr_tad->serialized[1] |= (u8) (temp & 0x00ff); /* lower bits */ - if (p_UccGethTadParams->vnontag_op == - UCC_GETH_VLAN_OPERATION_NON_TAGGED_Q_TAG_INSERT) - qe_fltr_tad->serialized[1] |= UCC_GETH_TAD_V_NON_VTAG_OP; - qe_fltr_tad->serialized[1] |= - p_UccGethTadParams->rqos << UCC_GETH_TAD_RQOS_SHIFT; - - qe_fltr_tad->serialized[2] |= - p_UccGethTadParams->vpri << UCC_GETH_TAD_V_PRIORITY_SHIFT; - /* upper bits */ - qe_fltr_tad->serialized[2] |= (u8) (p_UccGethTadParams->vid >> 8); - /* lower bits */ - qe_fltr_tad->serialized[3] |= (u8) (p_UccGethTadParams->vid & 0x00ff); - - return 0; -} - -static enet_addr_container_t - *ugeth_82xx_filtering_get_match_addr_in_hash(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr) -{ - enet_addr_container_t *enet_addr_cont; - struct list_head *p_lh; - u16 i, num; - int32_t j; - u8 *p_counter; - - if ((*p_enet_addr)[0] & ENET_GROUP_ADDR) { - p_lh = &ugeth->group_hash_q; - p_counter = &(ugeth->numGroupAddrInHash); - } else { - p_lh = &ugeth->ind_hash_q; - p_counter = &(ugeth->numIndAddrInHash); - } - - if (!p_lh) - return NULL; - - num = *p_counter; - - for (i = 0; i < num; i++) { - enet_addr_cont = - (enet_addr_container_t *) - ENET_ADDR_CONT_ENTRY(dequeue(p_lh)); - for (j = ENET_NUM_OCTETS_PER_ADDRESS - 1; j >= 0; j--) { - if ((*p_enet_addr)[j] != (enet_addr_cont->address)[j]) - break; - if (j == 0) - return enet_addr_cont; /* Found */ - } - enqueue(p_lh, &enet_addr_cont->node); /* Put it back */ - } - return NULL; -} - -static int ugeth_82xx_filtering_add_addr_in_hash(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr) -{ - ucc_geth_enet_address_recognition_location_e location; - enet_addr_container_t *enet_addr_cont; - struct list_head *p_lh; - u8 i; - u32 limit; - u8 *p_counter; - - if ((*p_enet_addr)[0] & ENET_GROUP_ADDR) { - p_lh = &ugeth->group_hash_q; - limit = ugeth->ug_info->maxGroupAddrInHash; - location = - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_GROUP_HASH; - p_counter = &(ugeth->numGroupAddrInHash); - } else { - p_lh = &ugeth->ind_hash_q; - limit = ugeth->ug_info->maxIndAddrInHash; - location = - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_INDIVIDUAL_HASH; - p_counter = &(ugeth->numIndAddrInHash); - } - - if ((enet_addr_cont = - ugeth_82xx_filtering_get_match_addr_in_hash(ugeth, p_enet_addr))) { - list_add(p_lh, &enet_addr_cont->node); /* Put it back */ - return 0; - } - if ((!p_lh) || (!(*p_counter < limit))) - return -EBUSY; - if (!(enet_addr_cont = get_enet_addr_container())) - return -ENOMEM; - for (i = 0; i < ENET_NUM_OCTETS_PER_ADDRESS; i++) - (enet_addr_cont->address)[i] = (*p_enet_addr)[i]; - enet_addr_cont->location = location; - enqueue(p_lh, &enet_addr_cont->node); /* Put it back */ - ++(*p_counter); - - hw_add_addr_in_hash(ugeth, &(enet_addr_cont->address)); - - return 0; -} - -static int ugeth_82xx_filtering_clear_addr_in_hash(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - enet_addr_container_t *enet_addr_cont; - ucc_fast_private_t *uccf; - comm_dir_e comm_dir; - u16 i, num; - struct list_head *p_lh; - u32 *addr_h, *addr_l; - u8 *p_counter; - - uccf = ugeth->uccf; - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth->p_rx_glbl_pram-> - addressfiltering; - - if (! - (enet_addr_cont = - ugeth_82xx_filtering_get_match_addr_in_hash(ugeth, p_enet_addr))) - return -ENOENT; - - /* It's been found and removed from the CQ. */ - /* Now destroy its container */ - put_enet_addr_container(enet_addr_cont); - - if ((*p_enet_addr)[0] & ENET_GROUP_ADDR) { - addr_h = &(p_82xx_addr_filt->gaddr_h); - addr_l = &(p_82xx_addr_filt->gaddr_l); - p_lh = &ugeth->group_hash_q; - p_counter = &(ugeth->numGroupAddrInHash); - } else { - addr_h = &(p_82xx_addr_filt->iaddr_h); - addr_l = &(p_82xx_addr_filt->iaddr_l); - p_lh = &ugeth->ind_hash_q; - p_counter = &(ugeth->numIndAddrInHash); - } - - comm_dir = 0; - if (uccf->enabled_tx) - comm_dir |= COMM_DIR_TX; - if (uccf->enabled_rx) - comm_dir |= COMM_DIR_RX; - if (comm_dir) - ugeth_disable(ugeth, comm_dir); - - /* Clear the hash table. */ - out_be32(addr_h, 0x00000000); - out_be32(addr_l, 0x00000000); - - /* Add all remaining CQ elements back into hash */ - num = --(*p_counter); - for (i = 0; i < num; i++) { - enet_addr_cont = - (enet_addr_container_t *) - ENET_ADDR_CONT_ENTRY(dequeue(p_lh)); - hw_add_addr_in_hash(ugeth, &(enet_addr_cont->address)); - enqueue(p_lh, &enet_addr_cont->node); /* Put it back */ - } - - if (comm_dir) - ugeth_enable(ugeth, comm_dir); - - return 0; -} -#endif /* CONFIG_UGETH_FILTERING */ - -static int ugeth_82xx_filtering_clear_all_addr_in_hash(ucc_geth_private_t * - ugeth, - enet_addr_type_e - enet_addr_type) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - ucc_fast_private_t *uccf; - comm_dir_e comm_dir; - struct list_head *p_lh; - u16 i, num; - u32 *addr_h, *addr_l; - u8 *p_counter; - - uccf = ugeth->uccf; - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth->p_rx_glbl_pram-> - addressfiltering; - - if (enet_addr_type == ENET_ADDR_TYPE_GROUP) { - addr_h = &(p_82xx_addr_filt->gaddr_h); - addr_l = &(p_82xx_addr_filt->gaddr_l); - p_lh = &ugeth->group_hash_q; - p_counter = &(ugeth->numGroupAddrInHash); - } else if (enet_addr_type == ENET_ADDR_TYPE_INDIVIDUAL) { - addr_h = &(p_82xx_addr_filt->iaddr_h); - addr_l = &(p_82xx_addr_filt->iaddr_l); - p_lh = &ugeth->ind_hash_q; - p_counter = &(ugeth->numIndAddrInHash); - } else - return -EINVAL; - - comm_dir = 0; - if (uccf->enabled_tx) - comm_dir |= COMM_DIR_TX; - if (uccf->enabled_rx) - comm_dir |= COMM_DIR_RX; - if (comm_dir) - ugeth_disable(ugeth, comm_dir); - - /* Clear the hash table. */ - out_be32(addr_h, 0x00000000); - out_be32(addr_l, 0x00000000); - - if (!p_lh) - return 0; - - num = *p_counter; - - /* Delete all remaining CQ elements */ - for (i = 0; i < num; i++) - put_enet_addr_container(ENET_ADDR_CONT_ENTRY(dequeue(p_lh))); - - *p_counter = 0; - - if (comm_dir) - ugeth_enable(ugeth, comm_dir); - - return 0; -} - -#ifdef CONFIG_UGETH_FILTERING -static int ugeth_82xx_filtering_add_addr_in_paddr(ucc_geth_private_t *ugeth, - enet_addr_t *p_enet_addr, - u8 paddr_num) -{ - int i; - - if ((*p_enet_addr)[0] & ENET_GROUP_ADDR) - ugeth_warn - ("%s: multicast address added to paddr will have no " - "effect - is this what you wanted?", - __FUNCTION__); - - ugeth->indAddrRegUsed[paddr_num] = 1; /* mark this paddr as used */ - /* store address in our database */ - for (i = 0; i < ENET_NUM_OCTETS_PER_ADDRESS; i++) - ugeth->paddr[paddr_num][i] = (*p_enet_addr)[i]; - /* put in hardware */ - return hw_add_addr_in_paddr(ugeth, p_enet_addr, paddr_num); -} -#endif /* CONFIG_UGETH_FILTERING */ - -static int ugeth_82xx_filtering_clear_addr_in_paddr(ucc_geth_private_t *ugeth, - u8 paddr_num) -{ - ugeth->indAddrRegUsed[paddr_num] = 0; /* mark this paddr as not used */ - return hw_clear_addr_in_paddr(ugeth, paddr_num);/* clear in hardware */ -} - -static void ucc_geth_memclean(ucc_geth_private_t *ugeth) -{ - u16 i, j; - u8 *bd; - - if (!ugeth) - return; - - if (ugeth->uccf) - ucc_fast_free(ugeth->uccf); - - if (ugeth->p_thread_data_tx) { - qe_muram_free(ugeth->thread_dat_tx_offset); - ugeth->p_thread_data_tx = NULL; - } - if (ugeth->p_thread_data_rx) { - qe_muram_free(ugeth->thread_dat_rx_offset); - ugeth->p_thread_data_rx = NULL; - } - if (ugeth->p_exf_glbl_param) { - qe_muram_free(ugeth->exf_glbl_param_offset); - ugeth->p_exf_glbl_param = NULL; - } - if (ugeth->p_rx_glbl_pram) { - qe_muram_free(ugeth->rx_glbl_pram_offset); - ugeth->p_rx_glbl_pram = NULL; - } - if (ugeth->p_tx_glbl_pram) { - qe_muram_free(ugeth->tx_glbl_pram_offset); - ugeth->p_tx_glbl_pram = NULL; - } - if (ugeth->p_send_q_mem_reg) { - qe_muram_free(ugeth->send_q_mem_reg_offset); - ugeth->p_send_q_mem_reg = NULL; - } - if (ugeth->p_scheduler) { - qe_muram_free(ugeth->scheduler_offset); - ugeth->p_scheduler = NULL; - } - if (ugeth->p_tx_fw_statistics_pram) { - qe_muram_free(ugeth->tx_fw_statistics_pram_offset); - ugeth->p_tx_fw_statistics_pram = NULL; - } - if (ugeth->p_rx_fw_statistics_pram) { - qe_muram_free(ugeth->rx_fw_statistics_pram_offset); - ugeth->p_rx_fw_statistics_pram = NULL; - } - if (ugeth->p_rx_irq_coalescing_tbl) { - qe_muram_free(ugeth->rx_irq_coalescing_tbl_offset); - ugeth->p_rx_irq_coalescing_tbl = NULL; - } - if (ugeth->p_rx_bd_qs_tbl) { - qe_muram_free(ugeth->rx_bd_qs_tbl_offset); - ugeth->p_rx_bd_qs_tbl = NULL; - } - if (ugeth->p_init_enet_param_shadow) { - return_init_enet_entries(ugeth, - &(ugeth->p_init_enet_param_shadow-> - rxthread[0]), - ENET_INIT_PARAM_MAX_ENTRIES_RX, - ugeth->ug_info->riscRx, 1); - return_init_enet_entries(ugeth, - &(ugeth->p_init_enet_param_shadow-> - txthread[0]), - ENET_INIT_PARAM_MAX_ENTRIES_TX, - ugeth->ug_info->riscTx, 0); - kfree(ugeth->p_init_enet_param_shadow); - ugeth->p_init_enet_param_shadow = NULL; - } - for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) { - bd = ugeth->p_tx_bd_ring[i]; - for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { - if (ugeth->tx_skbuff[i][j]) { - dma_unmap_single(NULL, - BD_BUFFER_ARG(bd), - (BD_STATUS_AND_LENGTH(bd) & - BD_LENGTH_MASK), - DMA_TO_DEVICE); - dev_kfree_skb_any(ugeth->tx_skbuff[i][j]); - ugeth->tx_skbuff[i][j] = NULL; - } - } - - kfree(ugeth->tx_skbuff[i]); - - if (ugeth->p_tx_bd_ring[i]) { - if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_SYSTEM) - kfree((void *)ugeth->tx_bd_ring_offset[i]); - else if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_MURAM) - qe_muram_free(ugeth->tx_bd_ring_offset[i]); - ugeth->p_tx_bd_ring[i] = NULL; - } - } - for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { - if (ugeth->p_rx_bd_ring[i]) { - /* Return existing data buffers in ring */ - bd = ugeth->p_rx_bd_ring[i]; - for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { - if (ugeth->rx_skbuff[i][j]) { - dma_unmap_single(NULL, BD_BUFFER(bd), - ugeth->ug_info-> - uf_info. - max_rx_buf_length + - UCC_GETH_RX_DATA_BUF_ALIGNMENT, - DMA_FROM_DEVICE); - - dev_kfree_skb_any(ugeth-> - rx_skbuff[i][j]); - ugeth->rx_skbuff[i][j] = NULL; - } - bd += UCC_GETH_SIZE_OF_BD; - } - - kfree(ugeth->rx_skbuff[i]); - - if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_SYSTEM) - kfree((void *)ugeth->rx_bd_ring_offset[i]); - else if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_MURAM) - qe_muram_free(ugeth->rx_bd_ring_offset[i]); - ugeth->p_rx_bd_ring[i] = NULL; - } - } - while (!list_empty(&ugeth->group_hash_q)) - put_enet_addr_container(ENET_ADDR_CONT_ENTRY - (dequeue(&ugeth->group_hash_q))); - while (!list_empty(&ugeth->ind_hash_q)) - put_enet_addr_container(ENET_ADDR_CONT_ENTRY - (dequeue(&ugeth->ind_hash_q))); - -} - -static void ucc_geth_set_multi(struct net_device *dev) -{ - ucc_geth_private_t *ugeth; - struct dev_mc_list *dmi; - ucc_fast_t *uf_regs; - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - enet_addr_t tempaddr; - u8 *mcptr, *tdptr; - int i, j; - - ugeth = netdev_priv(dev); - - uf_regs = ugeth->uccf->uf_regs; - - if (dev->flags & IFF_PROMISC) { - - /* Log any net taps. */ - printk("%s: Promiscuous mode enabled.\n", dev->name); - uf_regs->upsmr |= UPSMR_PRO; - - } else { - - uf_regs->upsmr &= ~UPSMR_PRO; - - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth-> - p_rx_glbl_pram->addressfiltering; - - if (dev->flags & IFF_ALLMULTI) { - /* Catch all multicast addresses, so set the - * filter to all 1's. - */ - out_be32(&p_82xx_addr_filt->gaddr_h, 0xffffffff); - out_be32(&p_82xx_addr_filt->gaddr_l, 0xffffffff); - } else { - /* Clear filter and add the addresses in the list. - */ - out_be32(&p_82xx_addr_filt->gaddr_h, 0x0); - out_be32(&p_82xx_addr_filt->gaddr_l, 0x0); - - dmi = dev->mc_list; - - for (i = 0; i < dev->mc_count; i++, dmi = dmi->next) { - - /* Only support group multicast for now. - */ - if (!(dmi->dmi_addr[0] & 1)) - continue; - - /* The address in dmi_addr is LSB first, - * and taddr is MSB first. We have to - * copy bytes MSB first from dmi_addr. - */ - mcptr = (u8 *) dmi->dmi_addr + 5; - tdptr = (u8 *) & tempaddr; - for (j = 0; j < 6; j++) - *tdptr++ = *mcptr--; - - /* Ask CPM to run CRC and set bit in - * filter mask. - */ - hw_add_addr_in_hash(ugeth, &tempaddr); - - } - } - } -} - -static void ucc_geth_stop(ucc_geth_private_t *ugeth) -{ - ucc_geth_t *ug_regs = ugeth->ug_regs; - u32 tempval; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - /* Disable the controller */ - ugeth_disable(ugeth, COMM_DIR_RX_AND_TX); - - /* Tell the kernel the link is down */ - ugeth->mii_info->link = 0; - adjust_link(ugeth->dev); - - /* Mask all interrupts */ - out_be32(ugeth->uccf->p_ucce, 0x00000000); - - /* Clear all interrupts */ - out_be32(ugeth->uccf->p_ucce, 0xffffffff); - - /* Disable Rx and Tx */ - tempval = in_be32(&ug_regs->maccfg1); - tempval &= ~(MACCFG1_ENABLE_RX | MACCFG1_ENABLE_TX); - out_be32(&ug_regs->maccfg1, tempval); - - if (ugeth->ug_info->board_flags & FSL_UGETH_BRD_HAS_PHY_INTR) { - /* Clear any pending interrupts */ - mii_clear_phy_interrupt(ugeth->mii_info); - - /* Disable PHY Interrupts */ - mii_configure_phy_interrupt(ugeth->mii_info, - MII_INTERRUPT_DISABLED); - } - - free_irq(ugeth->ug_info->uf_info.irq, ugeth->dev); - - if (ugeth->ug_info->board_flags & FSL_UGETH_BRD_HAS_PHY_INTR) { - free_irq(ugeth->ug_info->phy_interrupt, ugeth->dev); - } else { - del_timer_sync(&ugeth->phy_info_timer); - } - - ucc_geth_memclean(ugeth); -} - -static int ucc_geth_startup(ucc_geth_private_t *ugeth) -{ - ucc_geth_82xx_address_filtering_pram_t *p_82xx_addr_filt; - ucc_geth_init_pram_t *p_init_enet_pram; - ucc_fast_private_t *uccf; - ucc_geth_info_t *ug_info; - ucc_fast_info_t *uf_info; - ucc_fast_t *uf_regs; - ucc_geth_t *ug_regs; - int ret_val = -EINVAL; - u32 remoder = UCC_GETH_REMODER_INIT; - u32 init_enet_pram_offset, cecr_subblock, command, maccfg1; - u32 ifstat, i, j, size, l2qt, l3qt, length; - u16 temoder = UCC_GETH_TEMODER_INIT; - u16 test; - u8 function_code = 0; - u8 *bd, *endOfRing; - u8 numThreadsRxNumerical, numThreadsTxNumerical; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ug_info = ugeth->ug_info; - uf_info = &ug_info->uf_info; - - if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || - (uf_info->bd_mem_part == MEM_PART_MURAM))) { - ugeth_err("%s: Bad memory partition value.", __FUNCTION__); - return -EINVAL; - } - - /* Rx BD lengths */ - for (i = 0; i < ug_info->numQueuesRx; i++) { - if ((ug_info->bdRingLenRx[i] < UCC_GETH_RX_BD_RING_SIZE_MIN) || - (ug_info->bdRingLenRx[i] % - UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT)) { - ugeth_err - ("%s: Rx BD ring length must be multiple of 4," - " no smaller than 8.", __FUNCTION__); - return -EINVAL; - } - } - - /* Tx BD lengths */ - for (i = 0; i < ug_info->numQueuesTx; i++) { - if (ug_info->bdRingLenTx[i] < UCC_GETH_TX_BD_RING_SIZE_MIN) { - ugeth_err - ("%s: Tx BD ring length must be no smaller than 2.", - __FUNCTION__); - return -EINVAL; - } - } - - /* mrblr */ - if ((uf_info->max_rx_buf_length == 0) || - (uf_info->max_rx_buf_length % UCC_GETH_MRBLR_ALIGNMENT)) { - ugeth_err - ("%s: max_rx_buf_length must be non-zero multiple of 128.", - __FUNCTION__); - return -EINVAL; - } - - /* num Tx queues */ - if (ug_info->numQueuesTx > NUM_TX_QUEUES) { - ugeth_err("%s: number of tx queues too large.", __FUNCTION__); - return -EINVAL; - } - - /* num Rx queues */ - if (ug_info->numQueuesRx > NUM_RX_QUEUES) { - ugeth_err("%s: number of rx queues too large.", __FUNCTION__); - return -EINVAL; - } - - /* l2qt */ - for (i = 0; i < UCC_GETH_VLAN_PRIORITY_MAX; i++) { - if (ug_info->l2qt[i] >= ug_info->numQueuesRx) { - ugeth_err - ("%s: VLAN priority table entry must not be" - " larger than number of Rx queues.", - __FUNCTION__); - return -EINVAL; - } - } - - /* l3qt */ - for (i = 0; i < UCC_GETH_IP_PRIORITY_MAX; i++) { - if (ug_info->l3qt[i] >= ug_info->numQueuesRx) { - ugeth_err - ("%s: IP priority table entry must not be" - " larger than number of Rx queues.", - __FUNCTION__); - return -EINVAL; - } - } - - if (ug_info->cam && !ug_info->ecamptr) { - ugeth_err("%s: If cam mode is chosen, must supply cam ptr.", - __FUNCTION__); - return -EINVAL; - } - - if ((ug_info->numStationAddresses != - UCC_GETH_NUM_OF_STATION_ADDRESSES_1) - && ug_info->rxExtendedFiltering) { - ugeth_err("%s: Number of station addresses greater than 1 " - "not allowed in extended parsing mode.", - __FUNCTION__); - return -EINVAL; - } - - /* Generate uccm_mask for receive */ - uf_info->uccm_mask = ug_info->eventRegMask & UCCE_OTHER;/* Errors */ - for (i = 0; i < ug_info->numQueuesRx; i++) - uf_info->uccm_mask |= (UCCE_RXBF_SINGLE_MASK << i); - - for (i = 0; i < ug_info->numQueuesTx; i++) - uf_info->uccm_mask |= (UCCE_TXBF_SINGLE_MASK << i); - /* Initialize the general fast UCC block. */ - if (ucc_fast_init(uf_info, &uccf)) { - ugeth_err("%s: Failed to init uccf.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - ugeth->uccf = uccf; - - switch (ug_info->numThreadsRx) { - case UCC_GETH_NUM_OF_THREADS_1: - numThreadsRxNumerical = 1; - break; - case UCC_GETH_NUM_OF_THREADS_2: - numThreadsRxNumerical = 2; - break; - case UCC_GETH_NUM_OF_THREADS_4: - numThreadsRxNumerical = 4; - break; - case UCC_GETH_NUM_OF_THREADS_6: - numThreadsRxNumerical = 6; - break; - case UCC_GETH_NUM_OF_THREADS_8: - numThreadsRxNumerical = 8; - break; - default: - ugeth_err("%s: Bad number of Rx threads value.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -EINVAL; - break; - } - - switch (ug_info->numThreadsTx) { - case UCC_GETH_NUM_OF_THREADS_1: - numThreadsTxNumerical = 1; - break; - case UCC_GETH_NUM_OF_THREADS_2: - numThreadsTxNumerical = 2; - break; - case UCC_GETH_NUM_OF_THREADS_4: - numThreadsTxNumerical = 4; - break; - case UCC_GETH_NUM_OF_THREADS_6: - numThreadsTxNumerical = 6; - break; - case UCC_GETH_NUM_OF_THREADS_8: - numThreadsTxNumerical = 8; - break; - default: - ugeth_err("%s: Bad number of Tx threads value.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -EINVAL; - break; - } - - /* Calculate rx_extended_features */ - ugeth->rx_non_dynamic_extended_features = ug_info->ipCheckSumCheck || - ug_info->ipAddressAlignment || - (ug_info->numStationAddresses != - UCC_GETH_NUM_OF_STATION_ADDRESSES_1); - - ugeth->rx_extended_features = ugeth->rx_non_dynamic_extended_features || - (ug_info->vlanOperationTagged != UCC_GETH_VLAN_OPERATION_TAGGED_NOP) - || (ug_info->vlanOperationNonTagged != - UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP); - - uf_regs = uccf->uf_regs; - ug_regs = (ucc_geth_t *) (uccf->uf_regs); - ugeth->ug_regs = ug_regs; - - init_default_reg_vals(&uf_regs->upsmr, - &ug_regs->maccfg1, &ug_regs->maccfg2); - - /* Set UPSMR */ - /* For more details see the hardware spec. */ - init_rx_parameters(ug_info->bro, - ug_info->rsh, ug_info->pro, &uf_regs->upsmr); - - /* We're going to ignore other registers for now, */ - /* except as needed to get up and running */ - - /* Set MACCFG1 */ - /* For more details see the hardware spec. */ - init_flow_control_params(ug_info->aufc, - ug_info->receiveFlowControl, - 1, - ug_info->pausePeriod, - ug_info->extensionField, - &uf_regs->upsmr, - &ug_regs->uempr, &ug_regs->maccfg1); - - maccfg1 = in_be32(&ug_regs->maccfg1); - maccfg1 |= MACCFG1_ENABLE_RX; - maccfg1 |= MACCFG1_ENABLE_TX; - out_be32(&ug_regs->maccfg1, maccfg1); - - /* Set IPGIFG */ - /* For more details see the hardware spec. */ - ret_val = init_inter_frame_gap_params(ug_info->nonBackToBackIfgPart1, - ug_info->nonBackToBackIfgPart2, - ug_info-> - miminumInterFrameGapEnforcement, - ug_info->backToBackInterFrameGap, - &ug_regs->ipgifg); - if (ret_val != 0) { - ugeth_err("%s: IPGIFG initialization parameter too large.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return ret_val; - } - - /* Set HAFDUP */ - /* For more details see the hardware spec. */ - ret_val = init_half_duplex_params(ug_info->altBeb, - ug_info->backPressureNoBackoff, - ug_info->noBackoff, - ug_info->excessDefer, - ug_info->altBebTruncation, - ug_info->maxRetransmission, - ug_info->collisionWindow, - &ug_regs->hafdup); - if (ret_val != 0) { - ugeth_err("%s: Half Duplex initialization parameter too large.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return ret_val; - } - - /* Set IFSTAT */ - /* For more details see the hardware spec. */ - /* Read only - resets upon read */ - ifstat = in_be32(&ug_regs->ifstat); - - /* Clear UEMPR */ - /* For more details see the hardware spec. */ - out_be32(&ug_regs->uempr, 0); - - /* Set UESCR */ - /* For more details see the hardware spec. */ - init_hw_statistics_gathering_mode((ug_info->statisticsMode & - UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE), - 0, &uf_regs->upsmr, &ug_regs->uescr); - - /* Allocate Tx bds */ - for (j = 0; j < ug_info->numQueuesTx; j++) { - /* Allocate in multiple of - UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT, - according to spec */ - length = ((ug_info->bdRingLenTx[j] * UCC_GETH_SIZE_OF_BD) - / UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT) - * UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT; - if ((ug_info->bdRingLenTx[j] * UCC_GETH_SIZE_OF_BD) % - UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT) - length += UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT; - if (uf_info->bd_mem_part == MEM_PART_SYSTEM) { - u32 align = 4; - if (UCC_GETH_TX_BD_RING_ALIGNMENT > 4) - align = UCC_GETH_TX_BD_RING_ALIGNMENT; - ugeth->tx_bd_ring_offset[j] = - (u32) (kmalloc((u32) (length + align), - GFP_KERNEL)); - if (ugeth->tx_bd_ring_offset[j] != 0) - ugeth->p_tx_bd_ring[j] = - (void*)((ugeth->tx_bd_ring_offset[j] + - align) & ~(align - 1)); - } else if (uf_info->bd_mem_part == MEM_PART_MURAM) { - ugeth->tx_bd_ring_offset[j] = - qe_muram_alloc(length, - UCC_GETH_TX_BD_RING_ALIGNMENT); - if (!IS_MURAM_ERR(ugeth->tx_bd_ring_offset[j])) - ugeth->p_tx_bd_ring[j] = - (u8 *) qe_muram_addr(ugeth-> - tx_bd_ring_offset[j]); - } - if (!ugeth->p_tx_bd_ring[j]) { - ugeth_err - ("%s: Can not allocate memory for Tx bd rings.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - /* Zero unused end of bd ring, according to spec */ - memset(ugeth->p_tx_bd_ring[j] + - ug_info->bdRingLenTx[j] * UCC_GETH_SIZE_OF_BD, 0, - length - ug_info->bdRingLenTx[j] * UCC_GETH_SIZE_OF_BD); - } - - /* Allocate Rx bds */ - for (j = 0; j < ug_info->numQueuesRx; j++) { - length = ug_info->bdRingLenRx[j] * UCC_GETH_SIZE_OF_BD; - if (uf_info->bd_mem_part == MEM_PART_SYSTEM) { - u32 align = 4; - if (UCC_GETH_RX_BD_RING_ALIGNMENT > 4) - align = UCC_GETH_RX_BD_RING_ALIGNMENT; - ugeth->rx_bd_ring_offset[j] = - (u32) (kmalloc((u32) (length + align), GFP_KERNEL)); - if (ugeth->rx_bd_ring_offset[j] != 0) - ugeth->p_rx_bd_ring[j] = - (void*)((ugeth->rx_bd_ring_offset[j] + - align) & ~(align - 1)); - } else if (uf_info->bd_mem_part == MEM_PART_MURAM) { - ugeth->rx_bd_ring_offset[j] = - qe_muram_alloc(length, - UCC_GETH_RX_BD_RING_ALIGNMENT); - if (!IS_MURAM_ERR(ugeth->rx_bd_ring_offset[j])) - ugeth->p_rx_bd_ring[j] = - (u8 *) qe_muram_addr(ugeth-> - rx_bd_ring_offset[j]); - } - if (!ugeth->p_rx_bd_ring[j]) { - ugeth_err - ("%s: Can not allocate memory for Rx bd rings.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - } - - /* Init Tx bds */ - for (j = 0; j < ug_info->numQueuesTx; j++) { - /* Setup the skbuff rings */ - ugeth->tx_skbuff[j] = - (struct sk_buff **)kmalloc(sizeof(struct sk_buff *) * - ugeth->ug_info->bdRingLenTx[j], - GFP_KERNEL); - - if (ugeth->tx_skbuff[j] == NULL) { - ugeth_err("%s: Could not allocate tx_skbuff", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - for (i = 0; i < ugeth->ug_info->bdRingLenTx[j]; i++) - ugeth->tx_skbuff[j][i] = NULL; - - ugeth->skb_curtx[j] = ugeth->skb_dirtytx[j] = 0; - bd = ugeth->confBd[j] = ugeth->txBd[j] = ugeth->p_tx_bd_ring[j]; - for (i = 0; i < ug_info->bdRingLenTx[j]; i++) { - BD_BUFFER_CLEAR(bd); - BD_STATUS_AND_LENGTH_SET(bd, 0); - bd += UCC_GETH_SIZE_OF_BD; - } - bd -= UCC_GETH_SIZE_OF_BD; - BD_STATUS_AND_LENGTH_SET(bd, T_W);/* for last BD set Wrap bit */ - } - - /* Init Rx bds */ - for (j = 0; j < ug_info->numQueuesRx; j++) { - /* Setup the skbuff rings */ - ugeth->rx_skbuff[j] = - (struct sk_buff **)kmalloc(sizeof(struct sk_buff *) * - ugeth->ug_info->bdRingLenRx[j], - GFP_KERNEL); - - if (ugeth->rx_skbuff[j] == NULL) { - ugeth_err("%s: Could not allocate rx_skbuff", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - for (i = 0; i < ugeth->ug_info->bdRingLenRx[j]; i++) - ugeth->rx_skbuff[j][i] = NULL; - - ugeth->skb_currx[j] = 0; - bd = ugeth->rxBd[j] = ugeth->p_rx_bd_ring[j]; - for (i = 0; i < ug_info->bdRingLenRx[j]; i++) { - BD_STATUS_AND_LENGTH_SET(bd, R_I); - BD_BUFFER_CLEAR(bd); - bd += UCC_GETH_SIZE_OF_BD; - } - bd -= UCC_GETH_SIZE_OF_BD; - BD_STATUS_AND_LENGTH_SET(bd, R_W);/* for last BD set Wrap bit */ - } - - /* - * Global PRAM - */ - /* Tx global PRAM */ - /* Allocate global tx parameter RAM page */ - ugeth->tx_glbl_pram_offset = - qe_muram_alloc(sizeof(ucc_geth_tx_global_pram_t), - UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->tx_glbl_pram_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_tx_glbl_pram.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - ugeth->p_tx_glbl_pram = - (ucc_geth_tx_global_pram_t *) qe_muram_addr(ugeth-> - tx_glbl_pram_offset); - /* Zero out p_tx_glbl_pram */ - memset(ugeth->p_tx_glbl_pram, 0, sizeof(ucc_geth_tx_global_pram_t)); - - /* Fill global PRAM */ - - /* TQPTR */ - /* Size varies with number of Tx threads */ - ugeth->thread_dat_tx_offset = - qe_muram_alloc(numThreadsTxNumerical * - sizeof(ucc_geth_thread_data_tx_t) + - 32 * (numThreadsTxNumerical == 1), - UCC_GETH_THREAD_DATA_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->thread_dat_tx_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_thread_data_tx.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_thread_data_tx = - (ucc_geth_thread_data_tx_t *) qe_muram_addr(ugeth-> - thread_dat_tx_offset); - out_be32(&ugeth->p_tx_glbl_pram->tqptr, ugeth->thread_dat_tx_offset); - - /* vtagtable */ - for (i = 0; i < UCC_GETH_TX_VTAG_TABLE_ENTRY_MAX; i++) - out_be32(&ugeth->p_tx_glbl_pram->vtagtable[i], - ug_info->vtagtable[i]); - - /* iphoffset */ - for (i = 0; i < TX_IP_OFFSET_ENTRY_MAX; i++) - ugeth->p_tx_glbl_pram->iphoffset[i] = ug_info->iphoffset[i]; - - /* SQPTR */ - /* Size varies with number of Tx queues */ - ugeth->send_q_mem_reg_offset = - qe_muram_alloc(ug_info->numQueuesTx * - sizeof(ucc_geth_send_queue_qd_t), - UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->send_q_mem_reg_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_send_q_mem_reg.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_send_q_mem_reg = - (ucc_geth_send_queue_mem_region_t *) qe_muram_addr(ugeth-> - send_q_mem_reg_offset); - out_be32(&ugeth->p_tx_glbl_pram->sqptr, ugeth->send_q_mem_reg_offset); - - /* Setup the table */ - /* Assume BD rings are already established */ - for (i = 0; i < ug_info->numQueuesTx; i++) { - endOfRing = - ugeth->p_tx_bd_ring[i] + (ug_info->bdRingLenTx[i] - - 1) * UCC_GETH_SIZE_OF_BD; - if (ugeth->ug_info->uf_info.bd_mem_part == MEM_PART_SYSTEM) { - out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base, - (u32) virt_to_phys(ugeth->p_tx_bd_ring[i])); - out_be32(&ugeth->p_send_q_mem_reg->sqqd[i]. - last_bd_completed_address, - (u32) virt_to_phys(endOfRing)); - } else if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_MURAM) { - out_be32(&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base, - (u32) immrbar_virt_to_phys(ugeth-> - p_tx_bd_ring[i])); - out_be32(&ugeth->p_send_q_mem_reg->sqqd[i]. - last_bd_completed_address, - (u32) immrbar_virt_to_phys(endOfRing)); - } - } - - /* schedulerbasepointer */ - - if (ug_info->numQueuesTx > 1) { - /* scheduler exists only if more than 1 tx queue */ - ugeth->scheduler_offset = - qe_muram_alloc(sizeof(ucc_geth_scheduler_t), - UCC_GETH_SCHEDULER_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->scheduler_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_scheduler.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_scheduler = - (ucc_geth_scheduler_t *) qe_muram_addr(ugeth-> - scheduler_offset); - out_be32(&ugeth->p_tx_glbl_pram->schedulerbasepointer, - ugeth->scheduler_offset); - /* Zero out p_scheduler */ - memset(ugeth->p_scheduler, 0, sizeof(ucc_geth_scheduler_t)); - - /* Set values in scheduler */ - out_be32(&ugeth->p_scheduler->mblinterval, - ug_info->mblinterval); - out_be16(&ugeth->p_scheduler->nortsrbytetime, - ug_info->nortsrbytetime); - ugeth->p_scheduler->fracsiz = ug_info->fracsiz; - ugeth->p_scheduler->strictpriorityq = ug_info->strictpriorityq; - ugeth->p_scheduler->txasap = ug_info->txasap; - ugeth->p_scheduler->extrabw = ug_info->extrabw; - for (i = 0; i < NUM_TX_QUEUES; i++) - ugeth->p_scheduler->weightfactor[i] = - ug_info->weightfactor[i]; - - /* Set pointers to cpucount registers in scheduler */ - ugeth->p_cpucount[0] = &(ugeth->p_scheduler->cpucount0); - ugeth->p_cpucount[1] = &(ugeth->p_scheduler->cpucount1); - ugeth->p_cpucount[2] = &(ugeth->p_scheduler->cpucount2); - ugeth->p_cpucount[3] = &(ugeth->p_scheduler->cpucount3); - ugeth->p_cpucount[4] = &(ugeth->p_scheduler->cpucount4); - ugeth->p_cpucount[5] = &(ugeth->p_scheduler->cpucount5); - ugeth->p_cpucount[6] = &(ugeth->p_scheduler->cpucount6); - ugeth->p_cpucount[7] = &(ugeth->p_scheduler->cpucount7); - } - - /* schedulerbasepointer */ - /* TxRMON_PTR (statistics) */ - if (ug_info-> - statisticsMode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX) { - ugeth->tx_fw_statistics_pram_offset = - qe_muram_alloc(sizeof - (ucc_geth_tx_firmware_statistics_pram_t), - UCC_GETH_TX_STATISTICS_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->tx_fw_statistics_pram_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for" - " p_tx_fw_statistics_pram.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - ugeth->p_tx_fw_statistics_pram = - (ucc_geth_tx_firmware_statistics_pram_t *) - qe_muram_addr(ugeth->tx_fw_statistics_pram_offset); - /* Zero out p_tx_fw_statistics_pram */ - memset(ugeth->p_tx_fw_statistics_pram, - 0, sizeof(ucc_geth_tx_firmware_statistics_pram_t)); - } - - /* temoder */ - /* Already has speed set */ - - if (ug_info->numQueuesTx > 1) - temoder |= TEMODER_SCHEDULER_ENABLE; - if (ug_info->ipCheckSumGenerate) - temoder |= TEMODER_IP_CHECKSUM_GENERATE; - temoder |= ((ug_info->numQueuesTx - 1) << TEMODER_NUM_OF_QUEUES_SHIFT); - out_be16(&ugeth->p_tx_glbl_pram->temoder, temoder); - - test = in_be16(&ugeth->p_tx_glbl_pram->temoder); - - /* Function code register value to be used later */ - function_code = QE_BMR_BYTE_ORDER_BO_MOT | UCC_FAST_FUNCTION_CODE_GBL; - /* Required for QE */ - - /* function code register */ - out_be32(&ugeth->p_tx_glbl_pram->tstate, ((u32) function_code) << 24); - - /* Rx global PRAM */ - /* Allocate global rx parameter RAM page */ - ugeth->rx_glbl_pram_offset = - qe_muram_alloc(sizeof(ucc_geth_rx_global_pram_t), - UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->rx_glbl_pram_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_rx_glbl_pram.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - ugeth->p_rx_glbl_pram = - (ucc_geth_rx_global_pram_t *) qe_muram_addr(ugeth-> - rx_glbl_pram_offset); - /* Zero out p_rx_glbl_pram */ - memset(ugeth->p_rx_glbl_pram, 0, sizeof(ucc_geth_rx_global_pram_t)); - - /* Fill global PRAM */ - - /* RQPTR */ - /* Size varies with number of Rx threads */ - ugeth->thread_dat_rx_offset = - qe_muram_alloc(numThreadsRxNumerical * - sizeof(ucc_geth_thread_data_rx_t), - UCC_GETH_THREAD_DATA_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->thread_dat_rx_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_thread_data_rx.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_thread_data_rx = - (ucc_geth_thread_data_rx_t *) qe_muram_addr(ugeth-> - thread_dat_rx_offset); - out_be32(&ugeth->p_rx_glbl_pram->rqptr, ugeth->thread_dat_rx_offset); - - /* typeorlen */ - out_be16(&ugeth->p_rx_glbl_pram->typeorlen, ug_info->typeorlen); - - /* rxrmonbaseptr (statistics) */ - if (ug_info-> - statisticsMode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) { - ugeth->rx_fw_statistics_pram_offset = - qe_muram_alloc(sizeof - (ucc_geth_rx_firmware_statistics_pram_t), - UCC_GETH_RX_STATISTICS_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->rx_fw_statistics_pram_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for" - " p_rx_fw_statistics_pram.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - ugeth->p_rx_fw_statistics_pram = - (ucc_geth_rx_firmware_statistics_pram_t *) - qe_muram_addr(ugeth->rx_fw_statistics_pram_offset); - /* Zero out p_rx_fw_statistics_pram */ - memset(ugeth->p_rx_fw_statistics_pram, 0, - sizeof(ucc_geth_rx_firmware_statistics_pram_t)); - } - - /* intCoalescingPtr */ - - /* Size varies with number of Rx queues */ - ugeth->rx_irq_coalescing_tbl_offset = - qe_muram_alloc(ug_info->numQueuesRx * - sizeof(ucc_geth_rx_interrupt_coalescing_entry_t), - UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->rx_irq_coalescing_tbl_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for" - " p_rx_irq_coalescing_tbl.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_rx_irq_coalescing_tbl = - (ucc_geth_rx_interrupt_coalescing_table_t *) - qe_muram_addr(ugeth->rx_irq_coalescing_tbl_offset); - out_be32(&ugeth->p_rx_glbl_pram->intcoalescingptr, - ugeth->rx_irq_coalescing_tbl_offset); - - /* Fill interrupt coalescing table */ - for (i = 0; i < ug_info->numQueuesRx; i++) { - out_be32(&ugeth->p_rx_irq_coalescing_tbl->coalescingentry[i]. - interruptcoalescingmaxvalue, - ug_info->interruptcoalescingmaxvalue[i]); - out_be32(&ugeth->p_rx_irq_coalescing_tbl->coalescingentry[i]. - interruptcoalescingcounter, - ug_info->interruptcoalescingmaxvalue[i]); - } - - /* MRBLR */ - init_max_rx_buff_len(uf_info->max_rx_buf_length, - &ugeth->p_rx_glbl_pram->mrblr); - /* MFLR */ - out_be16(&ugeth->p_rx_glbl_pram->mflr, ug_info->maxFrameLength); - /* MINFLR */ - init_min_frame_len(ug_info->minFrameLength, - &ugeth->p_rx_glbl_pram->minflr, - &ugeth->p_rx_glbl_pram->mrblr); - /* MAXD1 */ - out_be16(&ugeth->p_rx_glbl_pram->maxd1, ug_info->maxD1Length); - /* MAXD2 */ - out_be16(&ugeth->p_rx_glbl_pram->maxd2, ug_info->maxD2Length); - - /* l2qt */ - l2qt = 0; - for (i = 0; i < UCC_GETH_VLAN_PRIORITY_MAX; i++) - l2qt |= (ug_info->l2qt[i] << (28 - 4 * i)); - out_be32(&ugeth->p_rx_glbl_pram->l2qt, l2qt); - - /* l3qt */ - for (j = 0; j < UCC_GETH_IP_PRIORITY_MAX; j += 8) { - l3qt = 0; - for (i = 0; i < 8; i++) - l3qt |= (ug_info->l3qt[j + i] << (28 - 4 * i)); - out_be32(&ugeth->p_rx_glbl_pram->l3qt[j], l3qt); - } - - /* vlantype */ - out_be16(&ugeth->p_rx_glbl_pram->vlantype, ug_info->vlantype); - - /* vlantci */ - out_be16(&ugeth->p_rx_glbl_pram->vlantci, ug_info->vlantci); - - /* ecamptr */ - out_be32(&ugeth->p_rx_glbl_pram->ecamptr, ug_info->ecamptr); - - /* RBDQPTR */ - /* Size varies with number of Rx queues */ - ugeth->rx_bd_qs_tbl_offset = - qe_muram_alloc(ug_info->numQueuesRx * - (sizeof(ucc_geth_rx_bd_queues_entry_t) + - sizeof(ucc_geth_rx_prefetched_bds_t)), - UCC_GETH_RX_BD_QUEUES_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->rx_bd_qs_tbl_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_rx_bd_qs_tbl.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_rx_bd_qs_tbl = - (ucc_geth_rx_bd_queues_entry_t *) qe_muram_addr(ugeth-> - rx_bd_qs_tbl_offset); - out_be32(&ugeth->p_rx_glbl_pram->rbdqptr, ugeth->rx_bd_qs_tbl_offset); - /* Zero out p_rx_bd_qs_tbl */ - memset(ugeth->p_rx_bd_qs_tbl, - 0, - ug_info->numQueuesRx * (sizeof(ucc_geth_rx_bd_queues_entry_t) + - sizeof(ucc_geth_rx_prefetched_bds_t))); - - /* Setup the table */ - /* Assume BD rings are already established */ - for (i = 0; i < ug_info->numQueuesRx; i++) { - if (ugeth->ug_info->uf_info.bd_mem_part == MEM_PART_SYSTEM) { - out_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, - (u32) virt_to_phys(ugeth->p_rx_bd_ring[i])); - } else if (ugeth->ug_info->uf_info.bd_mem_part == - MEM_PART_MURAM) { - out_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, - (u32) immrbar_virt_to_phys(ugeth-> - p_rx_bd_ring[i])); - } - /* rest of fields handled by QE */ - } - - /* remoder */ - /* Already has speed set */ - - if (ugeth->rx_extended_features) - remoder |= REMODER_RX_EXTENDED_FEATURES; - if (ug_info->rxExtendedFiltering) - remoder |= REMODER_RX_EXTENDED_FILTERING; - if (ug_info->dynamicMaxFrameLength) - remoder |= REMODER_DYNAMIC_MAX_FRAME_LENGTH; - if (ug_info->dynamicMinFrameLength) - remoder |= REMODER_DYNAMIC_MIN_FRAME_LENGTH; - remoder |= - ug_info->vlanOperationTagged << REMODER_VLAN_OPERATION_TAGGED_SHIFT; - remoder |= - ug_info-> - vlanOperationNonTagged << REMODER_VLAN_OPERATION_NON_TAGGED_SHIFT; - remoder |= ug_info->rxQoSMode << REMODER_RX_QOS_MODE_SHIFT; - remoder |= ((ug_info->numQueuesRx - 1) << REMODER_NUM_OF_QUEUES_SHIFT); - if (ug_info->ipCheckSumCheck) - remoder |= REMODER_IP_CHECKSUM_CHECK; - if (ug_info->ipAddressAlignment) - remoder |= REMODER_IP_ADDRESS_ALIGNMENT; - out_be32(&ugeth->p_rx_glbl_pram->remoder, remoder); - - /* Note that this function must be called */ - /* ONLY AFTER p_tx_fw_statistics_pram */ - /* andp_UccGethRxFirmwareStatisticsPram are allocated ! */ - init_firmware_statistics_gathering_mode((ug_info-> - statisticsMode & - UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX), - (ug_info->statisticsMode & - UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX), - &ugeth->p_tx_glbl_pram->txrmonbaseptr, - ugeth->tx_fw_statistics_pram_offset, - &ugeth->p_rx_glbl_pram->rxrmonbaseptr, - ugeth->rx_fw_statistics_pram_offset, - &ugeth->p_tx_glbl_pram->temoder, - &ugeth->p_rx_glbl_pram->remoder); - - /* function code register */ - ugeth->p_rx_glbl_pram->rstate = function_code; - - /* initialize extended filtering */ - if (ug_info->rxExtendedFiltering) { - if (!ug_info->extendedFilteringChainPointer) { - ugeth_err("%s: Null Extended Filtering Chain Pointer.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -EINVAL; - } - - /* Allocate memory for extended filtering Mode Global - Parameters */ - ugeth->exf_glbl_param_offset = - qe_muram_alloc(sizeof(ucc_geth_exf_global_pram_t), - UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT); - if (IS_MURAM_ERR(ugeth->exf_glbl_param_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for" - " p_exf_glbl_param.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - - ugeth->p_exf_glbl_param = - (ucc_geth_exf_global_pram_t *) qe_muram_addr(ugeth-> - exf_glbl_param_offset); - out_be32(&ugeth->p_rx_glbl_pram->exfGlobalParam, - ugeth->exf_glbl_param_offset); - out_be32(&ugeth->p_exf_glbl_param->l2pcdptr, - (u32) ug_info->extendedFilteringChainPointer); - - } else { /* initialize 82xx style address filtering */ - - /* Init individual address recognition registers to disabled */ - - for (j = 0; j < NUM_OF_PADDRS; j++) - ugeth_82xx_filtering_clear_addr_in_paddr(ugeth, (u8) j); - - /* Create CQs for hash tables */ - if (ug_info->maxGroupAddrInHash > 0) { - INIT_LIST_HEAD(&ugeth->group_hash_q); - } - if (ug_info->maxIndAddrInHash > 0) { - INIT_LIST_HEAD(&ugeth->ind_hash_q); - } - p_82xx_addr_filt = - (ucc_geth_82xx_address_filtering_pram_t *) ugeth-> - p_rx_glbl_pram->addressfiltering; - - ugeth_82xx_filtering_clear_all_addr_in_hash(ugeth, - ENET_ADDR_TYPE_GROUP); - ugeth_82xx_filtering_clear_all_addr_in_hash(ugeth, - ENET_ADDR_TYPE_INDIVIDUAL); - } - - /* - * Initialize UCC at QE level - */ - - command = QE_INIT_TX_RX; - - /* Allocate shadow InitEnet command parameter structure. - * This is needed because after the InitEnet command is executed, - * the structure in DPRAM is released, because DPRAM is a premium - * resource. - * This shadow structure keeps a copy of what was done so that the - * allocated resources can be released when the channel is freed. - */ - if (!(ugeth->p_init_enet_param_shadow = - (ucc_geth_init_pram_t *) kmalloc(sizeof(ucc_geth_init_pram_t), - GFP_KERNEL))) { - ugeth_err - ("%s: Can not allocate memory for" - " p_UccInitEnetParamShadows.", __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - /* Zero out *p_init_enet_param_shadow */ - memset((char *)ugeth->p_init_enet_param_shadow, - 0, sizeof(ucc_geth_init_pram_t)); - - /* Fill shadow InitEnet command parameter structure */ - - ugeth->p_init_enet_param_shadow->resinit1 = - ENET_INIT_PARAM_MAGIC_RES_INIT1; - ugeth->p_init_enet_param_shadow->resinit2 = - ENET_INIT_PARAM_MAGIC_RES_INIT2; - ugeth->p_init_enet_param_shadow->resinit3 = - ENET_INIT_PARAM_MAGIC_RES_INIT3; - ugeth->p_init_enet_param_shadow->resinit4 = - ENET_INIT_PARAM_MAGIC_RES_INIT4; - ugeth->p_init_enet_param_shadow->resinit5 = - ENET_INIT_PARAM_MAGIC_RES_INIT5; - ugeth->p_init_enet_param_shadow->rgftgfrxglobal |= - ((u32) ug_info->numThreadsRx) << ENET_INIT_PARAM_RGF_SHIFT; - ugeth->p_init_enet_param_shadow->rgftgfrxglobal |= - ((u32) ug_info->numThreadsTx) << ENET_INIT_PARAM_TGF_SHIFT; - - ugeth->p_init_enet_param_shadow->rgftgfrxglobal |= - ugeth->rx_glbl_pram_offset | ug_info->riscRx; - if ((ug_info->largestexternallookupkeysize != - QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_NONE) - && (ug_info->largestexternallookupkeysize != - QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_8_BYTES) - && (ug_info->largestexternallookupkeysize != - QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_16_BYTES)) { - ugeth_err("%s: Invalid largest External Lookup Key Size.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -EINVAL; - } - ugeth->p_init_enet_param_shadow->largestexternallookupkeysize = - ug_info->largestexternallookupkeysize; - size = sizeof(ucc_geth_thread_rx_pram_t); - if (ug_info->rxExtendedFiltering) { - size += THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING; - if (ug_info->largestexternallookupkeysize == - QE_FLTR_TABLE_LOOKUP_KEY_SIZE_8_BYTES) - size += - THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_8; - if (ug_info->largestexternallookupkeysize == - QE_FLTR_TABLE_LOOKUP_KEY_SIZE_16_BYTES) - size += - THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_16; - } - - if ((ret_val = fill_init_enet_entries(ugeth, &(ugeth-> - p_init_enet_param_shadow->rxthread[0]), - (u8) (numThreadsRxNumerical + 1) - /* Rx needs one extra for terminator */ - , size, UCC_GETH_THREAD_RX_PRAM_ALIGNMENT, - ug_info->riscRx, 1)) != 0) { - ugeth_err("%s: Can not fill p_init_enet_param_shadow.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return ret_val; - } - - ugeth->p_init_enet_param_shadow->txglobal = - ugeth->tx_glbl_pram_offset | ug_info->riscTx; - if ((ret_val = - fill_init_enet_entries(ugeth, - &(ugeth->p_init_enet_param_shadow-> - txthread[0]), numThreadsTxNumerical, - sizeof(ucc_geth_thread_tx_pram_t), - UCC_GETH_THREAD_TX_PRAM_ALIGNMENT, - ug_info->riscTx, 0)) != 0) { - ugeth_err("%s: Can not fill p_init_enet_param_shadow.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return ret_val; - } - - /* Load Rx bds with buffers */ - for (i = 0; i < ug_info->numQueuesRx; i++) { - if ((ret_val = rx_bd_buffer_set(ugeth, (u8) i)) != 0) { - ugeth_err("%s: Can not fill Rx bds with buffers.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return ret_val; - } - } - - /* Allocate InitEnet command parameter structure */ - init_enet_pram_offset = qe_muram_alloc(sizeof(ucc_geth_init_pram_t), 4); - if (IS_MURAM_ERR(init_enet_pram_offset)) { - ugeth_err - ("%s: Can not allocate DPRAM memory for p_init_enet_pram.", - __FUNCTION__); - ucc_geth_memclean(ugeth); - return -ENOMEM; - } - p_init_enet_pram = - (ucc_geth_init_pram_t *) qe_muram_addr(init_enet_pram_offset); - - /* Copy shadow InitEnet command parameter structure into PRAM */ - p_init_enet_pram->resinit1 = ugeth->p_init_enet_param_shadow->resinit1; - p_init_enet_pram->resinit2 = ugeth->p_init_enet_param_shadow->resinit2; - p_init_enet_pram->resinit3 = ugeth->p_init_enet_param_shadow->resinit3; - p_init_enet_pram->resinit4 = ugeth->p_init_enet_param_shadow->resinit4; - out_be16(&p_init_enet_pram->resinit5, - ugeth->p_init_enet_param_shadow->resinit5); - p_init_enet_pram->largestexternallookupkeysize = - ugeth->p_init_enet_param_shadow->largestexternallookupkeysize; - out_be32(&p_init_enet_pram->rgftgfrxglobal, - ugeth->p_init_enet_param_shadow->rgftgfrxglobal); - for (i = 0; i < ENET_INIT_PARAM_MAX_ENTRIES_RX; i++) - out_be32(&p_init_enet_pram->rxthread[i], - ugeth->p_init_enet_param_shadow->rxthread[i]); - out_be32(&p_init_enet_pram->txglobal, - ugeth->p_init_enet_param_shadow->txglobal); - for (i = 0; i < ENET_INIT_PARAM_MAX_ENTRIES_TX; i++) - out_be32(&p_init_enet_pram->txthread[i], - ugeth->p_init_enet_param_shadow->txthread[i]); - - /* Issue QE command */ - cecr_subblock = - ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num); - qe_issue_cmd(command, cecr_subblock, (u8) QE_CR_PROTOCOL_ETHERNET, - init_enet_pram_offset); - - /* Free InitEnet command parameter */ - qe_muram_free(init_enet_pram_offset); - - return 0; -} - -/* returns a net_device_stats structure pointer */ -static struct net_device_stats *ucc_geth_get_stats(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - - return &(ugeth->stats); -} - -/* ucc_geth_timeout gets called when a packet has not been - * transmitted after a set amount of time. - * For now, assume that clearing out all the structures, and - * starting over will fix the problem. */ -static void ucc_geth_timeout(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ugeth->stats.tx_errors++; - - ugeth_dump_regs(ugeth); - - if (dev->flags & IFF_UP) { - ucc_geth_stop(ugeth); - ucc_geth_startup(ugeth); - } - - netif_schedule(dev); -} - -/* This is called by the kernel when a frame is ready for transmission. */ -/* It is pointed to by the dev->hard_start_xmit function pointer */ -static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - u8 *bd; /* BD pointer */ - u32 bd_status; - u8 txQ = 0; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - spin_lock_irq(&ugeth->lock); - - ugeth->stats.tx_bytes += skb->len; - - /* Start from the next BD that should be filled */ - bd = ugeth->txBd[txQ]; - bd_status = BD_STATUS_AND_LENGTH(bd); - /* Save the skb pointer so we can free it later */ - ugeth->tx_skbuff[txQ][ugeth->skb_curtx[txQ]] = skb; - - /* Update the current skb pointer (wrapping if this was the last) */ - ugeth->skb_curtx[txQ] = - (ugeth->skb_curtx[txQ] + - 1) & TX_RING_MOD_MASK(ugeth->ug_info->bdRingLenTx[txQ]); - - /* set up the buffer descriptor */ - BD_BUFFER_SET(bd, - dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE)); - - //printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); - - bd_status = (bd_status & T_W) | T_R | T_I | T_L | skb->len; - - BD_STATUS_AND_LENGTH_SET(bd, bd_status); - - dev->trans_start = jiffies; - - /* Move to next BD in the ring */ - if (!(bd_status & T_W)) - ugeth->txBd[txQ] = bd + UCC_GETH_SIZE_OF_BD; - else - ugeth->txBd[txQ] = ugeth->p_tx_bd_ring[txQ]; - - /* If the next BD still needs to be cleaned up, then the bds - are full. We need to tell the kernel to stop sending us stuff. */ - if (bd == ugeth->confBd[txQ]) { - if (!netif_queue_stopped(dev)) - netif_stop_queue(dev); - } - - if (ugeth->p_scheduler) { - ugeth->cpucount[txQ]++; - /* Indicate to QE that there are more Tx bds ready for - transmission */ - /* This is done by writing a running counter of the bd - count to the scheduler PRAM. */ - out_be16(ugeth->p_cpucount[txQ], ugeth->cpucount[txQ]); - } - - spin_unlock_irq(&ugeth->lock); - - return 0; -} - -static int ucc_geth_rx(ucc_geth_private_t *ugeth, u8 rxQ, int rx_work_limit) -{ - struct sk_buff *skb; - u8 *bd; - u16 length, howmany = 0; - u32 bd_status; - u8 *bdBuffer; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - spin_lock(&ugeth->lock); - /* collect received buffers */ - bd = ugeth->rxBd[rxQ]; - - bd_status = BD_STATUS_AND_LENGTH(bd); - - /* while there are received buffers and BD is full (~R_E) */ - while (!((bd_status & (R_E)) || (--rx_work_limit < 0))) { - bdBuffer = (u8 *) BD_BUFFER(bd); - length = (u16) ((bd_status & BD_LENGTH_MASK) - 4); - skb = ugeth->rx_skbuff[rxQ][ugeth->skb_currx[rxQ]]; - - /* determine whether buffer is first, last, first and last - (single buffer frame) or middle (not first and not last) */ - if (!skb || - (!(bd_status & (R_F | R_L))) || - (bd_status & R_ERRORS_FATAL)) { - ugeth_vdbg("%s, %d: ERROR!!! skb - 0x%08x", - __FUNCTION__, __LINE__, (u32) skb); - if (skb) - dev_kfree_skb_any(skb); - - ugeth->rx_skbuff[rxQ][ugeth->skb_currx[rxQ]] = NULL; - ugeth->stats.rx_dropped++; - } else { - ugeth->stats.rx_packets++; - howmany++; - - /* Prep the skb for the packet */ - skb_put(skb, length); - - /* Tell the skb what kind of packet this is */ - skb->protocol = eth_type_trans(skb, ugeth->dev); - - ugeth->stats.rx_bytes += length; - /* Send the packet up the stack */ -#ifdef CONFIG_UGETH_NAPI - netif_receive_skb(skb); -#else - netif_rx(skb); -#endif /* CONFIG_UGETH_NAPI */ - } - - ugeth->dev->last_rx = jiffies; - - skb = get_new_skb(ugeth, bd); - if (!skb) { - ugeth_warn("%s: No Rx Data Buffer", __FUNCTION__); - spin_unlock(&ugeth->lock); - ugeth->stats.rx_dropped++; - break; - } - - ugeth->rx_skbuff[rxQ][ugeth->skb_currx[rxQ]] = skb; - - /* update to point at the next skb */ - ugeth->skb_currx[rxQ] = - (ugeth->skb_currx[rxQ] + - 1) & RX_RING_MOD_MASK(ugeth->ug_info->bdRingLenRx[rxQ]); - - if (bd_status & R_W) - bd = ugeth->p_rx_bd_ring[rxQ]; - else - bd += UCC_GETH_SIZE_OF_BD; - - bd_status = BD_STATUS_AND_LENGTH(bd); - } - - ugeth->rxBd[rxQ] = bd; - spin_unlock(&ugeth->lock); - return howmany; -} - -static int ucc_geth_tx(struct net_device *dev, u8 txQ) -{ - /* Start from the next BD that should be filled */ - ucc_geth_private_t *ugeth = netdev_priv(dev); - u8 *bd; /* BD pointer */ - u32 bd_status; - - bd = ugeth->confBd[txQ]; - bd_status = BD_STATUS_AND_LENGTH(bd); - - /* Normal processing. */ - while ((bd_status & T_R) == 0) { - /* BD contains already transmitted buffer. */ - /* Handle the transmitted buffer and release */ - /* the BD to be used with the current frame */ - - if ((bd = ugeth->txBd[txQ]) && (netif_queue_stopped(dev) == 0)) - break; - - ugeth->stats.tx_packets++; - - /* Free the sk buffer associated with this TxBD */ - dev_kfree_skb_irq(ugeth-> - tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]]); - ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]] = NULL; - ugeth->skb_dirtytx[txQ] = - (ugeth->skb_dirtytx[txQ] + - 1) & TX_RING_MOD_MASK(ugeth->ug_info->bdRingLenTx[txQ]); - - /* We freed a buffer, so now we can restart transmission */ - if (netif_queue_stopped(dev)) - netif_wake_queue(dev); - - /* Advance the confirmation BD pointer */ - if (!(bd_status & T_W)) - ugeth->confBd[txQ] += UCC_GETH_SIZE_OF_BD; - else - ugeth->confBd[txQ] = ugeth->p_tx_bd_ring[txQ]; - } - return 0; -} - -#ifdef CONFIG_UGETH_NAPI -static int ucc_geth_poll(struct net_device *dev, int *budget) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - int howmany; - int rx_work_limit = *budget; - u8 rxQ = 0; - - if (rx_work_limit > dev->quota) - rx_work_limit = dev->quota; - - howmany = ucc_geth_rx(ugeth, rxQ, rx_work_limit); - - dev->quota -= howmany; - rx_work_limit -= howmany; - *budget -= howmany; - - if (rx_work_limit >= 0) - netif_rx_complete(dev); - - return (rx_work_limit < 0) ? 1 : 0; -} -#endif /* CONFIG_UGETH_NAPI */ - -static irqreturn_t ucc_geth_irq_handler(int irq, void *info, - struct pt_regs *regs) -{ - struct net_device *dev = (struct net_device *)info; - ucc_geth_private_t *ugeth = netdev_priv(dev); - ucc_fast_private_t *uccf; - ucc_geth_info_t *ug_info; - register u32 ucce = 0; - register u32 bit_mask = UCCE_RXBF_SINGLE_MASK; - register u32 tx_mask = UCCE_TXBF_SINGLE_MASK; - register u8 i; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - if (!ugeth) - return IRQ_NONE; - - uccf = ugeth->uccf; - ug_info = ugeth->ug_info; - - do { - ucce |= (u32) (in_be32(uccf->p_ucce) & in_be32(uccf->p_uccm)); - - /* clear event bits for next time */ - /* Side effect here is to mask ucce variable - for future processing below. */ - out_be32(uccf->p_ucce, ucce); /* Clear with ones, - but only bits in UCCM */ - - /* We ignore Tx interrupts because Tx confirmation is - done inside Tx routine */ - - for (i = 0; i < ug_info->numQueuesRx; i++) { - if (ucce & bit_mask) - ucc_geth_rx(ugeth, i, - (int)ugeth->ug_info-> - bdRingLenRx[i]); - ucce &= ~bit_mask; - bit_mask <<= 1; - } - - for (i = 0; i < ug_info->numQueuesTx; i++) { - if (ucce & tx_mask) - ucc_geth_tx(dev, i); - ucce &= ~tx_mask; - tx_mask <<= 1; - } - - /* Exceptions */ - if (ucce & UCCE_BSY) { - ugeth_vdbg("Got BUSY irq!!!!"); - ugeth->stats.rx_errors++; - ucce &= ~UCCE_BSY; - } - if (ucce & UCCE_OTHER) { - ugeth_vdbg("Got frame with error (ucce - 0x%08x)!!!!", - ucce); - ugeth->stats.rx_errors++; - ucce &= ~ucce; - } - } - while (ucce); - - return IRQ_HANDLED; -} - -static irqreturn_t phy_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - struct net_device *dev = (struct net_device *)dev_id; - ucc_geth_private_t *ugeth = netdev_priv(dev); - - ugeth_vdbg("%s: IN", __FUNCTION__); - - /* Clear the interrupt */ - mii_clear_phy_interrupt(ugeth->mii_info); - - /* Disable PHY interrupts */ - mii_configure_phy_interrupt(ugeth->mii_info, MII_INTERRUPT_DISABLED); - - /* Schedule the phy change */ - schedule_work(&ugeth->tq); - - return IRQ_HANDLED; -} - -/* Scheduled by the phy_interrupt/timer to handle PHY changes */ -static void ugeth_phy_change(void *data) -{ - struct net_device *dev = (struct net_device *)data; - ucc_geth_private_t *ugeth = netdev_priv(dev); - ucc_geth_t *ug_regs; - int result = 0; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ug_regs = ugeth->ug_regs; - - /* Delay to give the PHY a chance to change the - * register state */ - msleep(1); - - /* Update the link, speed, duplex */ - result = ugeth->mii_info->phyinfo->read_status(ugeth->mii_info); - - /* Adjust the known status as long as the link - * isn't still coming up */ - if ((0 == result) || (ugeth->mii_info->link == 0)) - adjust_link(dev); - - /* Reenable interrupts, if needed */ - if (ugeth->ug_info->board_flags & FSL_UGETH_BRD_HAS_PHY_INTR) - mii_configure_phy_interrupt(ugeth->mii_info, - MII_INTERRUPT_ENABLED); -} - -/* Called every so often on systems that don't interrupt - * the core for PHY changes */ -static void ugeth_phy_timer(unsigned long data) -{ - struct net_device *dev = (struct net_device *)data; - ucc_geth_private_t *ugeth = netdev_priv(dev); - - schedule_work(&ugeth->tq); - - mod_timer(&ugeth->phy_info_timer, jiffies + PHY_CHANGE_TIME * HZ); -} - -/* Keep trying aneg for some time - * If, after GFAR_AN_TIMEOUT seconds, it has not - * finished, we switch to forced. - * Either way, once the process has completed, we either - * request the interrupt, or switch the timer over to - * using ugeth_phy_timer to check status */ -static void ugeth_phy_startup_timer(unsigned long data) -{ - struct ugeth_mii_info *mii_info = (struct ugeth_mii_info *)data; - ucc_geth_private_t *ugeth = netdev_priv(mii_info->dev); - static int secondary = UGETH_AN_TIMEOUT; - int result; - - /* Configure the Auto-negotiation */ - result = mii_info->phyinfo->config_aneg(mii_info); - - /* If autonegotiation failed to start, and - * we haven't timed out, reset the timer, and return */ - if (result && secondary--) { - mod_timer(&ugeth->phy_info_timer, jiffies + HZ); - return; - } else if (result) { - /* Couldn't start autonegotiation. - * Try switching to forced */ - mii_info->autoneg = 0; - result = mii_info->phyinfo->config_aneg(mii_info); - - /* Forcing failed! Give up */ - if (result) { - ugeth_err("%s: Forcing failed!", mii_info->dev->name); - return; - } - } - - /* Kill the timer so it can be restarted */ - del_timer_sync(&ugeth->phy_info_timer); - - /* Grab the PHY interrupt, if necessary/possible */ - if (ugeth->ug_info->board_flags & FSL_UGETH_BRD_HAS_PHY_INTR) { - if (request_irq(ugeth->ug_info->phy_interrupt, - phy_interrupt, - SA_SHIRQ, "phy_interrupt", mii_info->dev) < 0) { - ugeth_err("%s: Can't get IRQ %d (PHY)", - mii_info->dev->name, - ugeth->ug_info->phy_interrupt); - } else { - mii_configure_phy_interrupt(ugeth->mii_info, - MII_INTERRUPT_ENABLED); - return; - } - } - - /* Start the timer again, this time in order to - * handle a change in status */ - init_timer(&ugeth->phy_info_timer); - ugeth->phy_info_timer.function = &ugeth_phy_timer; - ugeth->phy_info_timer.data = (unsigned long)mii_info->dev; - mod_timer(&ugeth->phy_info_timer, jiffies + PHY_CHANGE_TIME * HZ); -} - -/* Called when something needs to use the ethernet device */ -/* Returns 0 for success. */ -static int ucc_geth_open(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - int err; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - /* Test station address */ - if (dev->dev_addr[0] & ENET_GROUP_ADDR) { - ugeth_err("%s: Multicast address used for station address" - " - is this what you wanted?", __FUNCTION__); - return -EINVAL; - } - - err = ucc_geth_startup(ugeth); - if (err) { - ugeth_err("%s: Cannot configure net device, aborting.", - dev->name); - return err; - } - - err = adjust_enet_interface(ugeth); - if (err) { - ugeth_err("%s: Cannot configure net device, aborting.", - dev->name); - return err; - } - - /* Set MACSTNADDR1, MACSTNADDR2 */ - /* For more details see the hardware spec. */ - init_mac_station_addr_regs(dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5], - &ugeth->ug_regs->macstnaddr1, - &ugeth->ug_regs->macstnaddr2); - - err = init_phy(dev); - if (err) { - ugeth_err("%s: Cannot initialzie PHY, aborting.", dev->name); - return err; - } -#ifndef CONFIG_UGETH_NAPI - err = - request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, 0, - "UCC Geth", dev); - if (err) { - ugeth_err("%s: Cannot get IRQ for net device, aborting.", - dev->name); - ucc_geth_stop(ugeth); - return err; - } -#endif /* CONFIG_UGETH_NAPI */ - - /* Set up the PHY change work queue */ - INIT_WORK(&ugeth->tq, ugeth_phy_change, dev); - - init_timer(&ugeth->phy_info_timer); - ugeth->phy_info_timer.function = &ugeth_phy_startup_timer; - ugeth->phy_info_timer.data = (unsigned long)ugeth->mii_info; - mod_timer(&ugeth->phy_info_timer, jiffies + HZ); - - err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX); - if (err) { - ugeth_err("%s: Cannot enable net device, aborting.", dev->name); - ucc_geth_stop(ugeth); - return err; - } - - netif_start_queue(dev); - - return err; -} - -/* Stops the kernel queue, and halts the controller */ -static int ucc_geth_close(struct net_device *dev) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ucc_geth_stop(ugeth); - - /* Shutdown the PHY */ - if (ugeth->mii_info->phyinfo->close) - ugeth->mii_info->phyinfo->close(ugeth->mii_info); - - kfree(ugeth->mii_info); - - netif_stop_queue(dev); - - return 0; -} - -struct ethtool_ops ucc_geth_ethtool_ops = { - .get_settings = NULL, - .get_drvinfo = NULL, - .get_regs_len = NULL, - .get_regs = NULL, - .get_link = NULL, - .get_coalesce = NULL, - .set_coalesce = NULL, - .get_ringparam = NULL, - .set_ringparam = NULL, - .get_strings = NULL, - .get_stats_count = NULL, - .get_ethtool_stats = NULL, -}; - -static int ucc_geth_probe(struct device *device) -{ - struct platform_device *pdev = to_platform_device(device); - struct ucc_geth_platform_data *ugeth_pdata; - struct net_device *dev = NULL; - struct ucc_geth_private *ugeth = NULL; - struct ucc_geth_info *ug_info; - int err; - static int mii_mng_configured = 0; - - ugeth_vdbg("%s: IN", __FUNCTION__); - - ugeth_pdata = (struct ucc_geth_platform_data *)pdev->dev.platform_data; - - ug_info = &ugeth_info[pdev->id]; - ug_info->uf_info.ucc_num = pdev->id; - ug_info->uf_info.rx_clock = ugeth_pdata->rx_clock; - ug_info->uf_info.tx_clock = ugeth_pdata->tx_clock; - ug_info->uf_info.regs = ugeth_pdata->phy_reg_addr; - ug_info->uf_info.irq = platform_get_irq(pdev, 0); - ug_info->phy_address = ugeth_pdata->phy_id; - ug_info->enet_interface = ugeth_pdata->phy_interface; - ug_info->board_flags = ugeth_pdata->board_flags; - ug_info->phy_interrupt = ugeth_pdata->phy_interrupt; - - printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d) \n", - ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs, - ug_info->uf_info.irq); - - if (ug_info == NULL) { - ugeth_err("%s: [%d] Missing additional data!", __FUNCTION__, - pdev->id); - return -ENODEV; - } - - if (!mii_mng_configured) { - ucc_set_qe_mux_mii_mng(ug_info->uf_info.ucc_num); - mii_mng_configured = 1; - } - - /* Create an ethernet device instance */ - dev = alloc_etherdev(sizeof(*ugeth)); - - if (dev == NULL) - return -ENOMEM; - - ugeth = netdev_priv(dev); - spin_lock_init(&ugeth->lock); - - dev_set_drvdata(device, dev); - - /* Set the dev->base_addr to the gfar reg region */ - dev->base_addr = (unsigned long)(ug_info->uf_info.regs); - - SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, device); - - /* Fill in the dev structure */ - dev->open = ucc_geth_open; - dev->hard_start_xmit = ucc_geth_start_xmit; - dev->tx_timeout = ucc_geth_timeout; - dev->watchdog_timeo = TX_TIMEOUT; -#ifdef CONFIG_UGETH_NAPI - dev->poll = ucc_geth_poll; - dev->weight = UCC_GETH_DEV_WEIGHT; -#endif /* CONFIG_UGETH_NAPI */ - dev->stop = ucc_geth_close; - dev->get_stats = ucc_geth_get_stats; -// dev->change_mtu = ucc_geth_change_mtu; - dev->mtu = 1500; - dev->set_multicast_list = ucc_geth_set_multi; - dev->ethtool_ops = &ucc_geth_ethtool_ops; - - err = register_netdev(dev); - if (err) { - ugeth_err("%s: Cannot register net device, aborting.", - dev->name); - free_netdev(dev); - return err; - } - - ugeth->ug_info = ug_info; - ugeth->dev = dev; - memcpy(dev->dev_addr, ugeth_pdata->mac_addr, 6); - - return 0; -} - -static int ucc_geth_remove(struct device *device) -{ - struct net_device *dev = dev_get_drvdata(device); - struct ucc_geth_private *ugeth = netdev_priv(dev); - - dev_set_drvdata(device, NULL); - ucc_geth_memclean(ugeth); - free_netdev(dev); - - return 0; -} - -/* Structure for a device driver */ -static struct device_driver ucc_geth_driver = { - .name = DRV_NAME, - .bus = &platform_bus_type, - .probe = ucc_geth_probe, - .remove = ucc_geth_remove, -}; - -static int __init ucc_geth_init(void) -{ - int i; - printk(KERN_INFO "ucc_geth: " DRV_DESC "\n"); - for (i = 0; i < 8; i++) - memcpy(&(ugeth_info[i]), &ugeth_primary_info, - sizeof(ugeth_primary_info)); - - return driver_register(&ucc_geth_driver); -} - -static void __exit ucc_geth_exit(void) -{ - driver_unregister(&ucc_geth_driver); -} - -module_init(ucc_geth_init); -module_exit(ucc_geth_exit); - -MODULE_AUTHOR("Freescale Semiconductor, Inc"); -MODULE_DESCRIPTION(DRV_DESC); -MODULE_LICENSE("GPL"); diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h deleted file mode 100644 index 005965f5d..000000000 --- a/drivers/net/ucc_geth.h +++ /dev/null @@ -1,1339 +0,0 @@ -/* - * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. - * - * Author: Shlomi Gridish - * - * Description: - * Internal header file for UCC Gigabit Ethernet unit routines. - * - * Changelog: - * Jun 28, 2006 Li Yang - * - Rearrange code and style fixes - * - * 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 __UCC_GETH_H__ -#define __UCC_GETH_H__ - -#include -#include -#include - -#include -#include - -#include -#include - -#define NUM_TX_QUEUES 8 -#define NUM_RX_QUEUES 8 -#define NUM_BDS_IN_PREFETCHED_BDS 4 -#define TX_IP_OFFSET_ENTRY_MAX 8 -#define NUM_OF_PADDRS 4 -#define ENET_INIT_PARAM_MAX_ENTRIES_RX 9 -#define ENET_INIT_PARAM_MAX_ENTRIES_TX 8 - -typedef struct ucc_mii_mng { - u32 miimcfg; /* MII management configuration reg */ - u32 miimcom; /* MII management command reg */ - u32 miimadd; /* MII management address reg */ - u32 miimcon; /* MII management control reg */ - u32 miimstat; /* MII management status reg */ - u32 miimind; /* MII management indication reg */ -} __attribute__ ((packed)) ucc_mii_mng_t; - -typedef struct ucc_geth { - ucc_fast_t uccf; - - u32 maccfg1; /* mac configuration reg. 1 */ - u32 maccfg2; /* mac configuration reg. 2 */ - u32 ipgifg; /* interframe gap reg. */ - u32 hafdup; /* half-duplex reg. */ - u8 res1[0x10]; - ucc_mii_mng_t miimng; /* MII management structure */ - u32 ifctl; /* interface control reg */ - u32 ifstat; /* interface statux reg */ - u32 macstnaddr1; /* mac station address part 1 reg */ - u32 macstnaddr2; /* mac station address part 2 reg */ - u8 res2[0x8]; - u32 uempr; /* UCC Ethernet Mac parameter reg */ - u32 utbipar; /* UCC tbi address reg */ - u16 uescr; /* UCC Ethernet statistics control reg */ - u8 res3[0x180 - 0x15A]; - u32 tx64; /* Total number of frames (including bad - frames) transmitted that were exactly of the - minimal length (64 for un tagged, 68 for - tagged, or with length exactly equal to the - parameter MINLength */ - u32 tx127; /* Total number of frames (including bad - frames) transmitted that were between - MINLength (Including FCS length==4) and 127 - octets */ - u32 tx255; /* Total number of frames (including bad - frames) transmitted that were between 128 - (Including FCS length==4) and 255 octets */ - u32 rx64; /* Total number of frames received including - bad frames that were exactly of the mninimal - length (64 bytes) */ - u32 rx127; /* Total number of frames (including bad - frames) received that were between MINLength - (Including FCS length==4) and 127 octets */ - u32 rx255; /* Total number of frames (including bad - frames) received that were between 128 - (Including FCS length==4) and 255 octets */ - u32 txok; /* Total number of octets residing in frames - that where involved in succesfull - transmission */ - u16 txcf; /* Total number of PAUSE control frames - transmitted by this MAC */ - u8 res4[0x2]; - u32 tmca; /* Total number of frames that were transmitted - succesfully with the group address bit set - that are not broadcast frames */ - u32 tbca; /* Total number of frames transmitted - succesfully that had destination address - field equal to the broadcast address */ - u32 rxfok; /* Total number of frames received OK */ - u32 rxbok; /* Total number of octets received OK */ - u32 rbyt; /* Total number of octets received including - octets in bad frames. Must be implemented in - HW because it includes octets in frames that - never even reach the UCC */ - u32 rmca; /* Total number of frames that were received - succesfully with the group address bit set - that are not broadcast frames */ - u32 rbca; /* Total number of frames received succesfully - that had destination address equal to the - broadcast address */ - u32 scar; /* Statistics carry register */ - u32 scam; /* Statistics caryy mask register */ - u8 res5[0x200 - 0x1c4]; -} __attribute__ ((packed)) ucc_geth_t; - -/* UCC GETH TEMODR Register */ -#define TEMODER_TX_RMON_STATISTICS_ENABLE 0x0100 /* enable Tx statistics - */ -#define TEMODER_SCHEDULER_ENABLE 0x2000 /* enable scheduler */ -#define TEMODER_IP_CHECKSUM_GENERATE 0x0400 /* generate IPv4 - checksums */ -#define TEMODER_PERFORMANCE_OPTIMIZATION_MODE1 0x0200 /* enable performance - optimization - enhancement (mode1) */ -#define TEMODER_RMON_STATISTICS 0x0100 /* enable tx statistics - */ -#define TEMODER_NUM_OF_QUEUES_SHIFT (15-15) /* Number of queues << - shift */ - -/* UCC GETH TEMODR Register */ -#define REMODER_RX_RMON_STATISTICS_ENABLE 0x00001000 /* enable Rx - statistics */ -#define REMODER_RX_EXTENDED_FEATURES 0x80000000 /* enable - extended - features */ -#define REMODER_VLAN_OPERATION_TAGGED_SHIFT (31-9 ) /* vlan operation - tagged << shift */ -#define REMODER_VLAN_OPERATION_NON_TAGGED_SHIFT (31-10) /* vlan operation non - tagged << shift */ -#define REMODER_RX_QOS_MODE_SHIFT (31-15) /* rx QoS mode << shift - */ -#define REMODER_RMON_STATISTICS 0x00001000 /* enable rx - statistics */ -#define REMODER_RX_EXTENDED_FILTERING 0x00000800 /* extended - filtering - vs. - mpc82xx-like - filtering */ -#define REMODER_NUM_OF_QUEUES_SHIFT (31-23) /* Number of queues << - shift */ -#define REMODER_DYNAMIC_MAX_FRAME_LENGTH 0x00000008 /* enable - dynamic max - frame length - */ -#define REMODER_DYNAMIC_MIN_FRAME_LENGTH 0x00000004 /* enable - dynamic min - frame length - */ -#define REMODER_IP_CHECKSUM_CHECK 0x00000002 /* check IPv4 - checksums */ -#define REMODER_IP_ADDRESS_ALIGNMENT 0x00000001 /* align ip - address to - 4-byte - boundary */ - -/* UCC GETH Event Register */ -#define UCCE_MPD 0x80000000 /* Magic packet - detection */ -#define UCCE_SCAR 0x40000000 -#define UCCE_GRA 0x20000000 /* Tx graceful - stop - complete */ -#define UCCE_CBPR 0x10000000 -#define UCCE_BSY 0x08000000 -#define UCCE_RXC 0x04000000 -#define UCCE_TXC 0x02000000 -#define UCCE_TXE 0x01000000 -#define UCCE_TXB7 0x00800000 -#define UCCE_TXB6 0x00400000 -#define UCCE_TXB5 0x00200000 -#define UCCE_TXB4 0x00100000 -#define UCCE_TXB3 0x00080000 -#define UCCE_TXB2 0x00040000 -#define UCCE_TXB1 0x00020000 -#define UCCE_TXB0 0x00010000 -#define UCCE_RXB7 0x00008000 -#define UCCE_RXB6 0x00004000 -#define UCCE_RXB5 0x00002000 -#define UCCE_RXB4 0x00001000 -#define UCCE_RXB3 0x00000800 -#define UCCE_RXB2 0x00000400 -#define UCCE_RXB1 0x00000200 -#define UCCE_RXB0 0x00000100 -#define UCCE_RXF7 0x00000080 -#define UCCE_RXF6 0x00000040 -#define UCCE_RXF5 0x00000020 -#define UCCE_RXF4 0x00000010 -#define UCCE_RXF3 0x00000008 -#define UCCE_RXF2 0x00000004 -#define UCCE_RXF1 0x00000002 -#define UCCE_RXF0 0x00000001 - -#define UCCE_RXBF_SINGLE_MASK (UCCE_RXF0) -#define UCCE_TXBF_SINGLE_MASK (UCCE_TXB0) - -#define UCCE_TXB (UCCE_TXB7 | UCCE_TXB6 | UCCE_TXB5 | UCCE_TXB4 |\ - UCCE_TXB3 | UCCE_TXB2 | UCCE_TXB1 | UCCE_TXB0) -#define UCCE_RXB (UCCE_RXB7 | UCCE_RXB6 | UCCE_RXB5 | UCCE_RXB4 |\ - UCCE_RXB3 | UCCE_RXB2 | UCCE_RXB1 | UCCE_RXB0) -#define UCCE_RXF (UCCE_RXF7 | UCCE_RXF6 | UCCE_RXF5 | UCCE_RXF4 |\ - UCCE_RXF3 | UCCE_RXF2 | UCCE_RXF1 | UCCE_RXF0) -#define UCCE_OTHER (UCCE_SCAR | UCCE_GRA | UCCE_CBPR | UCCE_BSY |\ - UCCE_RXC | UCCE_TXC | UCCE_TXE) - -/* UCC GETH UPSMR (Protocol Specific Mode Register) */ -#define UPSMR_ECM 0x04000000 /* Enable CAM - Miss or - Enable - Filtering - Miss */ -#define UPSMR_HSE 0x02000000 /* Hardware - Statistics - Enable */ -#define UPSMR_PRO 0x00400000 /* Promiscuous*/ -#define UPSMR_CAP 0x00200000 /* CAM polarity - */ -#define UPSMR_RSH 0x00100000 /* Receive - Short Frames - */ -#define UPSMR_RPM 0x00080000 /* Reduced Pin - Mode - interfaces */ -#define UPSMR_R10M 0x00040000 /* RGMII/RMII - 10 Mode */ -#define UPSMR_RLPB 0x00020000 /* RMII - Loopback - Mode */ -#define UPSMR_TBIM 0x00010000 /* Ten-bit - Interface - Mode */ -#define UPSMR_RMM 0x00001000 /* RMII/RGMII - Mode */ -#define UPSMR_CAM 0x00000400 /* CAM Address - Matching */ -#define UPSMR_BRO 0x00000200 /* Broadcast - Address */ -#define UPSMR_RES1 0x00002000 /* Reserved - feild - must - be 1 */ - -/* UCC GETH MACCFG1 (MAC Configuration 1 Register) */ -#define MACCFG1_FLOW_RX 0x00000020 /* Flow Control - Rx */ -#define MACCFG1_FLOW_TX 0x00000010 /* Flow Control - Tx */ -#define MACCFG1_ENABLE_SYNCHED_RX 0x00000008 /* Rx Enable - synchronized - to Rx stream - */ -#define MACCFG1_ENABLE_RX 0x00000004 /* Enable Rx */ -#define MACCFG1_ENABLE_SYNCHED_TX 0x00000002 /* Tx Enable - synchronized - to Tx stream - */ -#define MACCFG1_ENABLE_TX 0x00000001 /* Enable Tx */ - -/* UCC GETH MACCFG2 (MAC Configuration 2 Register) */ -#define MACCFG2_PREL_SHIFT (31 - 19) /* Preamble - Length << - shift */ -#define MACCFG2_PREL_MASK 0x0000f000 /* Preamble - Length mask */ -#define MACCFG2_SRP 0x00000080 /* Soft Receive - Preamble */ -#define MACCFG2_STP 0x00000040 /* Soft - Transmit - Preamble */ -#define MACCFG2_RESERVED_1 0x00000020 /* Reserved - - must be set - to 1 */ -#define MACCFG2_LC 0x00000010 /* Length Check - */ -#define MACCFG2_MPE 0x00000008 /* Magic packet - detect */ -#define MACCFG2_FDX 0x00000001 /* Full Duplex */ -#define MACCFG2_FDX_MASK 0x00000001 /* Full Duplex - mask */ -#define MACCFG2_PAD_CRC 0x00000004 -#define MACCFG2_CRC_EN 0x00000002 -#define MACCFG2_PAD_AND_CRC_MODE_NONE 0x00000000 /* Neither - Padding - short frames - nor CRC */ -#define MACCFG2_PAD_AND_CRC_MODE_CRC_ONLY 0x00000002 /* Append CRC - only */ -#define MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC 0x00000004 -#define MACCFG2_INTERFACE_MODE_NIBBLE 0x00000100 /* nibble mode - (MII/RMII/RGMII - 10/100bps) */ -#define MACCFG2_INTERFACE_MODE_BYTE 0x00000200 /* byte mode - (GMII/TBI/RTB/RGMII - 1000bps ) */ -#define MACCFG2_INTERFACE_MODE_MASK 0x00000300 /* mask - covering all - relevant - bits */ - -/* UCC GETH IPGIFG (Inter-frame Gap / Inter-Frame Gap Register) */ -#define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_SHIFT (31 - 7) /* Non - back-to-back - inter frame - gap part 1. - << shift */ -#define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_SHIFT (31 - 15) /* Non - back-to-back - inter frame - gap part 2. - << shift */ -#define IPGIFG_MINIMUM_IFG_ENFORCEMENT_SHIFT (31 - 23) /* Mimimum IFG - Enforcement - << shift */ -#define IPGIFG_BACK_TO_BACK_IFG_SHIFT (31 - 31) /* back-to-back - inter frame - gap << shift - */ -#define IPGIFG_NON_BACK_TO_BACK_IFG_PART1_MAX 127 /* Non back-to-back - inter frame gap part - 1. max val */ -#define IPGIFG_NON_BACK_TO_BACK_IFG_PART2_MAX 127 /* Non back-to-back - inter frame gap part - 2. max val */ -#define IPGIFG_MINIMUM_IFG_ENFORCEMENT_MAX 255 /* Mimimum IFG - Enforcement max val */ -#define IPGIFG_BACK_TO_BACK_IFG_MAX 127 /* back-to-back inter - frame gap max val */ -#define IPGIFG_NBTB_CS_IPG_MASK 0x7F000000 -#define IPGIFG_NBTB_IPG_MASK 0x007F0000 -#define IPGIFG_MIN_IFG_MASK 0x0000FF00 -#define IPGIFG_BTB_IPG_MASK 0x0000007F - -/* UCC GETH HAFDUP (Half Duplex Register) */ -#define HALFDUP_ALT_BEB_TRUNCATION_SHIFT (31 - 11) /* Alternate - Binary - Exponential - Backoff - Truncation - << shift */ -#define HALFDUP_ALT_BEB_TRUNCATION_MAX 0xf /* Alternate Binary - Exponential Backoff - Truncation max val */ -#define HALFDUP_ALT_BEB 0x00080000 /* Alternate - Binary - Exponential - Backoff */ -#define HALFDUP_BACK_PRESSURE_NO_BACKOFF 0x00040000 /* Back - pressure no - backoff */ -#define HALFDUP_NO_BACKOFF 0x00020000 /* No Backoff */ -#define HALFDUP_EXCESSIVE_DEFER 0x00010000 /* Excessive - Defer */ -#define HALFDUP_MAX_RETRANSMISSION_SHIFT (31 - 19) /* Maximum - Retransmission - << shift */ -#define HALFDUP_MAX_RETRANSMISSION_MAX 0xf /* Maximum - Retransmission max - val */ -#define HALFDUP_COLLISION_WINDOW_SHIFT (31 - 31) /* Collision - Window << - shift */ -#define HALFDUP_COLLISION_WINDOW_MAX 0x3f /* Collision Window max - val */ -#define HALFDUP_ALT_BEB_TR_MASK 0x00F00000 -#define HALFDUP_RETRANS_MASK 0x0000F000 -#define HALFDUP_COL_WINDOW_MASK 0x0000003F - -/* UCC GETH UCCS (Ethernet Status Register) */ -#define UCCS_BPR 0x02 /* Back pressure (in - half duplex mode) */ -#define UCCS_PAU 0x02 /* Pause state (in full - duplex mode) */ -#define UCCS_MPD 0x01 /* Magic Packet - Detected */ - -/* UCC GETH MIIMCFG (MII Management Configuration Register) */ -#define MIIMCFG_RESET_MANAGEMENT 0x80000000 /* Reset - management */ -#define MIIMCFG_NO_PREAMBLE 0x00000010 /* Preamble - suppress */ -#define MIIMCFG_CLOCK_DIVIDE_SHIFT (31 - 31) /* clock divide - << shift */ -#define MIIMCFG_CLOCK_DIVIDE_MAX 0xf /* clock divide max val - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_2 0x00000000 /* divide by 2 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_4 0x00000001 /* divide by 4 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_6 0x00000002 /* divide by 6 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_8 0x00000003 /* divide by 8 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_10 0x00000004 /* divide by 10 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_14 0x00000005 /* divide by 14 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_16 0x00000008 /* divide by 16 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_20 0x00000006 /* divide by 20 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_28 0x00000007 /* divide by 28 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_32 0x00000009 /* divide by 32 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_48 0x0000000a /* divide by 48 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_64 0x0000000b /* divide by 64 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_80 0x0000000c /* divide by 80 - */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_112 0x0000000d /* divide by - 112 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_160 0x0000000e /* divide by - 160 */ -#define MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_224 0x0000000f /* divide by - 224 */ - -/* UCC GETH MIIMCOM (MII Management Command Register) */ -#define MIIMCOM_SCAN_CYCLE 0x00000002 /* Scan cycle */ -#define MIIMCOM_READ_CYCLE 0x00000001 /* Read cycle */ - -/* UCC GETH MIIMADD (MII Management Address Register) */ -#define MIIMADD_PHY_ADDRESS_SHIFT (31 - 23) /* PHY Address - << shift */ -#define MIIMADD_PHY_REGISTER_SHIFT (31 - 31) /* PHY Register - << shift */ - -/* UCC GETH MIIMCON (MII Management Control Register) */ -#define MIIMCON_PHY_CONTROL_SHIFT (31 - 31) /* PHY Control - << shift */ -#define MIIMCON_PHY_STATUS_SHIFT (31 - 31) /* PHY Status - << shift */ - -/* UCC GETH MIIMIND (MII Management Indicator Register) */ -#define MIIMIND_NOT_VALID 0x00000004 /* Not valid */ -#define MIIMIND_SCAN 0x00000002 /* Scan in - progress */ -#define MIIMIND_BUSY 0x00000001 - -/* UCC GETH IFSTAT (Interface Status Register) */ -#define IFSTAT_EXCESS_DEFER 0x00000200 /* Excessive - transmission - defer */ - -/* UCC GETH MACSTNADDR1 (Station Address Part 1 Register) */ -#define MACSTNADDR1_OCTET_6_SHIFT (31 - 7) /* Station - address 6th - octet << - shift */ -#define MACSTNADDR1_OCTET_5_SHIFT (31 - 15) /* Station - address 5th - octet << - shift */ -#define MACSTNADDR1_OCTET_4_SHIFT (31 - 23) /* Station - address 4th - octet << - shift */ -#define MACSTNADDR1_OCTET_3_SHIFT (31 - 31) /* Station - address 3rd - octet << - shift */ - -/* UCC GETH MACSTNADDR2 (Station Address Part 2 Register) */ -#define MACSTNADDR2_OCTET_2_SHIFT (31 - 7) /* Station - address 2nd - octet << - shift */ -#define MACSTNADDR2_OCTET_1_SHIFT (31 - 15) /* Station - address 1st - octet << - shift */ - -/* UCC GETH UEMPR (Ethernet Mac Parameter Register) */ -#define UEMPR_PAUSE_TIME_VALUE_SHIFT (31 - 15) /* Pause time - value << - shift */ -#define UEMPR_EXTENDED_PAUSE_TIME_VALUE_SHIFT (31 - 31) /* Extended - pause time - value << - shift */ - -/* UCC GETH UTBIPAR (Ten Bit Interface Physical Address Register) */ -#define UTBIPAR_PHY_ADDRESS_SHIFT (31 - 31) /* Phy address - << shift */ -#define UTBIPAR_PHY_ADDRESS_MASK 0x0000001f /* Phy address - mask */ - -/* UCC GETH UESCR (Ethernet Statistics Control Register) */ -#define UESCR_AUTOZ 0x8000 /* Automatically zero - addressed - statistical counter - values */ -#define UESCR_CLRCNT 0x4000 /* Clear all statistics - counters */ -#define UESCR_MAXCOV_SHIFT (15 - 7) /* Max - Coalescing - Value << - shift */ -#define UESCR_SCOV_SHIFT (15 - 15) /* Status - Coalescing - Value << - shift */ - -/* UCC GETH UDSR (Data Synchronization Register) */ -#define UDSR_MAGIC 0x067E - -typedef struct ucc_geth_thread_data_tx { - u8 res0[104]; -} __attribute__ ((packed)) ucc_geth_thread_data_tx_t; - -typedef struct ucc_geth_thread_data_rx { - u8 res0[40]; -} __attribute__ ((packed)) ucc_geth_thread_data_rx_t; - -/* Send Queue Queue-Descriptor */ -typedef struct ucc_geth_send_queue_qd { - u32 bd_ring_base; /* pointer to BD ring base address */ - u8 res0[0x8]; - u32 last_bd_completed_address;/* initialize to last entry in BD ring */ - u8 res1[0x30]; -} __attribute__ ((packed)) ucc_geth_send_queue_qd_t; - -typedef struct ucc_geth_send_queue_mem_region { - ucc_geth_send_queue_qd_t sqqd[NUM_TX_QUEUES]; -} __attribute__ ((packed)) ucc_geth_send_queue_mem_region_t; - -typedef struct ucc_geth_thread_tx_pram { - u8 res0[64]; -} __attribute__ ((packed)) ucc_geth_thread_tx_pram_t; - -typedef struct ucc_geth_thread_rx_pram { - u8 res0[128]; -} __attribute__ ((packed)) ucc_geth_thread_rx_pram_t; - -#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING 64 -#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_8 64 -#define THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_16 96 - -typedef struct ucc_geth_scheduler { - u16 cpucount0; /* CPU packet counter */ - u16 cpucount1; /* CPU packet counter */ - u16 cecount0; /* QE packet counter */ - u16 cecount1; /* QE packet counter */ - u16 cpucount2; /* CPU packet counter */ - u16 cpucount3; /* CPU packet counter */ - u16 cecount2; /* QE packet counter */ - u16 cecount3; /* QE packet counter */ - u16 cpucount4; /* CPU packet counter */ - u16 cpucount5; /* CPU packet counter */ - u16 cecount4; /* QE packet counter */ - u16 cecount5; /* QE packet counter */ - u16 cpucount6; /* CPU packet counter */ - u16 cpucount7; /* CPU packet counter */ - u16 cecount6; /* QE packet counter */ - u16 cecount7; /* QE packet counter */ - u32 weightstatus[NUM_TX_QUEUES]; /* accumulated weight factor */ - u32 rtsrshadow; /* temporary variable handled by QE */ - u32 time; /* temporary variable handled by QE */ - u32 ttl; /* temporary variable handled by QE */ - u32 mblinterval; /* max burst length interval */ - u16 nortsrbytetime; /* normalized value of byte time in tsr units */ - u8 fracsiz; /* radix 2 log value of denom. of - NorTSRByteTime */ - u8 res0[1]; - u8 strictpriorityq; /* Strict Priority Mask register */ - u8 txasap; /* Transmit ASAP register */ - u8 extrabw; /* Extra BandWidth register */ - u8 oldwfqmask; /* temporary variable handled by QE */ - u8 weightfactor[NUM_TX_QUEUES]; - /**< weight factor for queues */ - u32 minw; /* temporary variable handled by QE */ - u8 res1[0x70 - 0x64]; -} __attribute__ ((packed)) ucc_geth_scheduler_t; - -typedef struct ucc_geth_tx_firmware_statistics_pram { - u32 sicoltx; /* single collision */ - u32 mulcoltx; /* multiple collision */ - u32 latecoltxfr; /* late collision */ - u32 frabortduecol; /* frames aborted due to transmit collision */ - u32 frlostinmactxer; /* frames lost due to internal MAC error - transmission that are not counted on any - other counter */ - u32 carriersenseertx; /* carrier sense error */ - u32 frtxok; /* frames transmitted OK */ - u32 txfrexcessivedefer; /* frames with defferal time greater than - specified threshold */ - u32 txpkts256; /* total packets (including bad) between 256 - and 511 octets */ - u32 txpkts512; /* total packets (including bad) between 512 - and 1023 octets */ - u32 txpkts1024; /* total packets (including bad) between 1024 - and 1518 octets */ - u32 txpktsjumbo; /* total packets (including bad) between 1024 - and MAXLength octets */ -} __attribute__ ((packed)) ucc_geth_tx_firmware_statistics_pram_t; - -typedef struct ucc_geth_rx_firmware_statistics_pram { - u32 frrxfcser; /* frames with crc error */ - u32 fraligner; /* frames with alignment error */ - u32 inrangelenrxer; /* in range length error */ - u32 outrangelenrxer; /* out of range length error */ - u32 frtoolong; /* frame too long */ - u32 runt; /* runt */ - u32 verylongevent; /* very long event */ - u32 symbolerror; /* symbol error */ - u32 dropbsy; /* drop because of BD not ready */ - u8 res0[0x8]; - u32 mismatchdrop; /* drop because of MAC filtering (e.g. address - or type mismatch) */ - u32 underpkts; /* total frames less than 64 octets */ - u32 pkts256; /* total frames (including bad) between 256 and - 511 octets */ - u32 pkts512; /* total frames (including bad) between 512 and - 1023 octets */ - u32 pkts1024; /* total frames (including bad) between 1024 - and 1518 octets */ - u32 pktsjumbo; /* total frames (including bad) between 1024 - and MAXLength octets */ - u32 frlossinmacer; /* frames lost because of internal MAC error - that is not counted in any other counter */ - u32 pausefr; /* pause frames */ - u8 res1[0x4]; - u32 removevlan; /* total frames that had their VLAN tag removed - */ - u32 replacevlan; /* total frames that had their VLAN tag - replaced */ - u32 insertvlan; /* total frames that had their VLAN tag - inserted */ -} __attribute__ ((packed)) ucc_geth_rx_firmware_statistics_pram_t; - -typedef struct ucc_geth_rx_interrupt_coalescing_entry { - u32 interruptcoalescingmaxvalue; /* interrupt coalescing max - value */ - u32 interruptcoalescingcounter; /* interrupt coalescing counter, - initialize to - interruptcoalescingmaxvalue */ -} __attribute__ ((packed)) ucc_geth_rx_interrupt_coalescing_entry_t; - -typedef struct ucc_geth_rx_interrupt_coalescing_table { - ucc_geth_rx_interrupt_coalescing_entry_t coalescingentry[NUM_RX_QUEUES]; - /**< interrupt coalescing entry */ -} __attribute__ ((packed)) ucc_geth_rx_interrupt_coalescing_table_t; - -typedef struct ucc_geth_rx_prefetched_bds { - qe_bd_t bd[NUM_BDS_IN_PREFETCHED_BDS]; /* prefetched bd */ -} __attribute__ ((packed)) ucc_geth_rx_prefetched_bds_t; - -typedef struct ucc_geth_rx_bd_queues_entry { - u32 bdbaseptr; /* BD base pointer */ - u32 bdptr; /* BD pointer */ - u32 externalbdbaseptr; /* external BD base pointer */ - u32 externalbdptr; /* external BD pointer */ -} __attribute__ ((packed)) ucc_geth_rx_bd_queues_entry_t; - -typedef struct ucc_geth_tx_global_pram { - u16 temoder; - u8 res0[0x38 - 0x02]; - u32 sqptr; /* a base pointer to send queue memory region */ - u32 schedulerbasepointer; /* a base pointer to scheduler memory - region */ - u32 txrmonbaseptr; /* base pointer to Tx RMON statistics counter */ - u32 tstate; /* tx internal state. High byte contains - function code */ - u8 iphoffset[TX_IP_OFFSET_ENTRY_MAX]; - u32 vtagtable[0x8]; /* 8 4-byte VLAN tags */ - u32 tqptr; /* a base pointer to the Tx Queues Memory - Region */ - u8 res2[0x80 - 0x74]; -} __attribute__ ((packed)) ucc_geth_tx_global_pram_t; - -/* structure representing Extended Filtering Global Parameters in PRAM */ -typedef struct ucc_geth_exf_global_pram { - u32 l2pcdptr; /* individual address filter, high */ - u8 res0[0x10 - 0x04]; -} __attribute__ ((packed)) ucc_geth_exf_global_pram_t; - -typedef struct ucc_geth_rx_global_pram { - u32 remoder; /* ethernet mode reg. */ - u32 rqptr; /* base pointer to the Rx Queues Memory Region*/ - u32 res0[0x1]; - u8 res1[0x20 - 0xC]; - u16 typeorlen; /* cutoff point less than which, type/len field - is considered length */ - u8 res2[0x1]; - u8 rxgstpack; /* acknowledgement on GRACEFUL STOP RX command*/ - u32 rxrmonbaseptr; /* base pointer to Rx RMON statistics counter */ - u8 res3[0x30 - 0x28]; - u32 intcoalescingptr; /* Interrupt coalescing table pointer */ - u8 res4[0x36 - 0x34]; - u8 rstate; /* rx internal state. High byte contains - function code */ - u8 res5[0x46 - 0x37]; - u16 mrblr; /* max receive buffer length reg. */ - u32 rbdqptr; /* base pointer to RxBD parameter table - description */ - u16 mflr; /* max frame length reg. */ - u16 minflr; /* min frame length reg. */ - u16 maxd1; /* max dma1 length reg. */ - u16 maxd2; /* max dma2 length reg. */ - u32 ecamptr; /* external CAM address */ - u32 l2qt; /* VLAN priority mapping table. */ - u32 l3qt[0x8]; /* IP priority mapping table. */ - u16 vlantype; /* vlan type */ - u16 vlantci; /* default vlan tci */ - u8 addressfiltering[64]; /* address filtering data structure */ - u32 exfGlobalParam; /* base address for extended filtering global - parameters */ - u8 res6[0x100 - 0xC4]; /* Initialize to zero */ -} __attribute__ ((packed)) ucc_geth_rx_global_pram_t; - -#define GRACEFUL_STOP_ACKNOWLEDGE_RX 0x01 - -/* structure representing InitEnet command */ -typedef struct ucc_geth_init_pram { - u8 resinit1; - u8 resinit2; - u8 resinit3; - u8 resinit4; - u16 resinit5; - u8 res1[0x1]; - u8 largestexternallookupkeysize; - u32 rgftgfrxglobal; - u32 rxthread[ENET_INIT_PARAM_MAX_ENTRIES_RX]; /* rx threads */ - u8 res2[0x38 - 0x30]; - u32 txglobal; /* tx global */ - u32 txthread[ENET_INIT_PARAM_MAX_ENTRIES_TX]; /* tx threads */ - u8 res3[0x1]; -} __attribute__ ((packed)) ucc_geth_init_pram_t; - -#define ENET_INIT_PARAM_RGF_SHIFT (32 - 4) -#define ENET_INIT_PARAM_TGF_SHIFT (32 - 8) - -#define ENET_INIT_PARAM_RISC_MASK 0x0000003f -#define ENET_INIT_PARAM_PTR_MASK 0x00ffffc0 -#define ENET_INIT_PARAM_SNUM_MASK 0xff000000 -#define ENET_INIT_PARAM_SNUM_SHIFT 24 - -#define ENET_INIT_PARAM_MAGIC_RES_INIT1 0x06 -#define ENET_INIT_PARAM_MAGIC_RES_INIT2 0x30 -#define ENET_INIT_PARAM_MAGIC_RES_INIT3 0xff -#define ENET_INIT_PARAM_MAGIC_RES_INIT4 0x00 -#define ENET_INIT_PARAM_MAGIC_RES_INIT5 0x0400 - -/* structure representing 82xx Address Filtering Enet Address in PRAM */ -typedef struct ucc_geth_82xx_enet_address { - u8 res1[0x2]; - u16 h; /* address (MSB) */ - u16 m; /* address */ - u16 l; /* address (LSB) */ -} __attribute__ ((packed)) ucc_geth_82xx_enet_address_t; - -/* structure representing 82xx Address Filtering PRAM */ -typedef struct ucc_geth_82xx_address_filtering_pram { - u32 iaddr_h; /* individual address filter, high */ - u32 iaddr_l; /* individual address filter, low */ - u32 gaddr_h; /* group address filter, high */ - u32 gaddr_l; /* group address filter, low */ - ucc_geth_82xx_enet_address_t taddr; - ucc_geth_82xx_enet_address_t paddr[NUM_OF_PADDRS]; - u8 res0[0x40 - 0x38]; -} __attribute__ ((packed)) ucc_geth_82xx_address_filtering_pram_t; - -/* GETH Tx firmware statistics structure, used when calling - UCC_GETH_GetStatistics. */ -typedef struct ucc_geth_tx_firmware_statistics { - u32 sicoltx; /* single collision */ - u32 mulcoltx; /* multiple collision */ - u32 latecoltxfr; /* late collision */ - u32 frabortduecol; /* frames aborted due to transmit collision */ - u32 frlostinmactxer; /* frames lost due to internal MAC error - transmission that are not counted on any - other counter */ - u32 carriersenseertx; /* carrier sense error */ - u32 frtxok; /* frames transmitted OK */ - u32 txfrexcessivedefer; /* frames with defferal time greater than - specified threshold */ - u32 txpkts256; /* total packets (including bad) between 256 - and 511 octets */ - u32 txpkts512; /* total packets (including bad) between 512 - and 1023 octets */ - u32 txpkts1024; /* total packets (including bad) between 1024 - and 1518 octets */ - u32 txpktsjumbo; /* total packets (including bad) between 1024 - and MAXLength octets */ -} __attribute__ ((packed)) ucc_geth_tx_firmware_statistics_t; - -/* GETH Rx firmware statistics structure, used when calling - UCC_GETH_GetStatistics. */ -typedef struct ucc_geth_rx_firmware_statistics { - u32 frrxfcser; /* frames with crc error */ - u32 fraligner; /* frames with alignment error */ - u32 inrangelenrxer; /* in range length error */ - u32 outrangelenrxer; /* out of range length error */ - u32 frtoolong; /* frame too long */ - u32 runt; /* runt */ - u32 verylongevent; /* very long event */ - u32 symbolerror; /* symbol error */ - u32 dropbsy; /* drop because of BD not ready */ - u8 res0[0x8]; - u32 mismatchdrop; /* drop because of MAC filtering (e.g. address - or type mismatch) */ - u32 underpkts; /* total frames less than 64 octets */ - u32 pkts256; /* total frames (including bad) between 256 and - 511 octets */ - u32 pkts512; /* total frames (including bad) between 512 and - 1023 octets */ - u32 pkts1024; /* total frames (including bad) between 1024 - and 1518 octets */ - u32 pktsjumbo; /* total frames (including bad) between 1024 - and MAXLength octets */ - u32 frlossinmacer; /* frames lost because of internal MAC error - that is not counted in any other counter */ - u32 pausefr; /* pause frames */ - u8 res1[0x4]; - u32 removevlan; /* total frames that had their VLAN tag removed - */ - u32 replacevlan; /* total frames that had their VLAN tag - replaced */ - u32 insertvlan; /* total frames that had their VLAN tag - inserted */ -} __attribute__ ((packed)) ucc_geth_rx_firmware_statistics_t; - -/* GETH hardware statistics structure, used when calling - UCC_GETH_GetStatistics. */ -typedef struct ucc_geth_hardware_statistics { - u32 tx64; /* Total number of frames (including bad - frames) transmitted that were exactly of the - minimal length (64 for un tagged, 68 for - tagged, or with length exactly equal to the - parameter MINLength */ - u32 tx127; /* Total number of frames (including bad - frames) transmitted that were between - MINLength (Including FCS length==4) and 127 - octets */ - u32 tx255; /* Total number of frames (including bad - frames) transmitted that were between 128 - (Including FCS length==4) and 255 octets */ - u32 rx64; /* Total number of frames received including - bad frames that were exactly of the mninimal - length (64 bytes) */ - u32 rx127; /* Total number of frames (including bad - frames) received that were between MINLength - (Including FCS length==4) and 127 octets */ - u32 rx255; /* Total number of frames (including bad - frames) received that were between 128 - (Including FCS length==4) and 255 octets */ - u32 txok; /* Total number of octets residing in frames - that where involved in succesfull - transmission */ - u16 txcf; /* Total number of PAUSE control frames - transmitted by this MAC */ - u32 tmca; /* Total number of frames that were transmitted - succesfully with the group address bit set - that are not broadcast frames */ - u32 tbca; /* Total number of frames transmitted - succesfully that had destination address - field equal to the broadcast address */ - u32 rxfok; /* Total number of frames received OK */ - u32 rxbok; /* Total number of octets received OK */ - u32 rbyt; /* Total number of octets received including - octets in bad frames. Must be implemented in - HW because it includes octets in frames that - never even reach the UCC */ - u32 rmca; /* Total number of frames that were received - succesfully with the group address bit set - that are not broadcast frames */ - u32 rbca; /* Total number of frames received succesfully - that had destination address equal to the - broadcast address */ -} __attribute__ ((packed)) ucc_geth_hardware_statistics_t; - -/* UCC GETH Tx errors returned via TxConf callback */ -#define TX_ERRORS_DEF 0x0200 -#define TX_ERRORS_EXDEF 0x0100 -#define TX_ERRORS_LC 0x0080 -#define TX_ERRORS_RL 0x0040 -#define TX_ERRORS_RC_MASK 0x003C -#define TX_ERRORS_RC_SHIFT 2 -#define TX_ERRORS_UN 0x0002 -#define TX_ERRORS_CSL 0x0001 - -/* UCC GETH Rx errors returned via RxStore callback */ -#define RX_ERRORS_CMR 0x0200 -#define RX_ERRORS_M 0x0100 -#define RX_ERRORS_BC 0x0080 -#define RX_ERRORS_MC 0x0040 - -/* Transmit BD. These are in addition to values defined in uccf. */ -#define T_VID 0x003c0000 /* insert VLAN id index mask. */ -#define T_DEF (((u32) TX_ERRORS_DEF ) << 16) -#define T_EXDEF (((u32) TX_ERRORS_EXDEF ) << 16) -#define T_LC (((u32) TX_ERRORS_LC ) << 16) -#define T_RL (((u32) TX_ERRORS_RL ) << 16) -#define T_RC_MASK (((u32) TX_ERRORS_RC_MASK ) << 16) -#define T_UN (((u32) TX_ERRORS_UN ) << 16) -#define T_CSL (((u32) TX_ERRORS_CSL ) << 16) -#define T_ERRORS_REPORT (T_DEF | T_EXDEF | T_LC | T_RL | T_RC_MASK \ - | T_UN | T_CSL) /* transmit errors to report */ - -/* Receive BD. These are in addition to values defined in uccf. */ -#define R_LG 0x00200000 /* Frame length violation. */ -#define R_NO 0x00100000 /* Non-octet aligned frame. */ -#define R_SH 0x00080000 /* Short frame. */ -#define R_CR 0x00040000 /* CRC error. */ -#define R_OV 0x00020000 /* Overrun. */ -#define R_IPCH 0x00010000 /* IP checksum check failed. */ -#define R_CMR (((u32) RX_ERRORS_CMR ) << 16) -#define R_M (((u32) RX_ERRORS_M ) << 16) -#define R_BC (((u32) RX_ERRORS_BC ) << 16) -#define R_MC (((u32) RX_ERRORS_MC ) << 16) -#define R_ERRORS_REPORT (R_CMR | R_M | R_BC | R_MC) /* receive errors to - report */ -#define R_ERRORS_FATAL (R_LG | R_NO | R_SH | R_CR | \ - R_OV | R_IPCH) /* receive errors to discard */ - -/* Alignments */ -#define UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT 256 -#define UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT 128 -#define UCC_GETH_THREAD_RX_PRAM_ALIGNMENT 128 -#define UCC_GETH_THREAD_TX_PRAM_ALIGNMENT 64 -#define UCC_GETH_THREAD_DATA_ALIGNMENT 256 /* spec gives values - based on num of - threads, but always - using the maximum is - easier */ -#define UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT 32 -#define UCC_GETH_SCHEDULER_ALIGNMENT 4 /* This is a guess */ -#define UCC_GETH_TX_STATISTICS_ALIGNMENT 4 /* This is a guess */ -#define UCC_GETH_RX_STATISTICS_ALIGNMENT 4 /* This is a guess */ -#define UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT 4 /* This is a - guess */ -#define UCC_GETH_RX_BD_QUEUES_ALIGNMENT 8 /* This is a guess */ -#define UCC_GETH_RX_PREFETCHED_BDS_ALIGNMENT 128 /* This is a guess */ -#define UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT 4 /* This - is a - guess - */ -#define UCC_GETH_RX_BD_RING_ALIGNMENT 32 -#define UCC_GETH_TX_BD_RING_ALIGNMENT 32 -#define UCC_GETH_MRBLR_ALIGNMENT 128 -#define UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT 4 -#define UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT 32 -#define UCC_GETH_RX_DATA_BUF_ALIGNMENT 64 - -#define UCC_GETH_TAD_EF 0x80 -#define UCC_GETH_TAD_V 0x40 -#define UCC_GETH_TAD_REJ 0x20 -#define UCC_GETH_TAD_VTAG_OP_RIGHT_SHIFT 2 -#define UCC_GETH_TAD_VTAG_OP_SHIFT 6 -#define UCC_GETH_TAD_V_NON_VTAG_OP 0x20 -#define UCC_GETH_TAD_RQOS_SHIFT 0 -#define UCC_GETH_TAD_V_PRIORITY_SHIFT 5 -#define UCC_GETH_TAD_CFI 0x10 - -#define UCC_GETH_VLAN_PRIORITY_MAX 8 -#define UCC_GETH_IP_PRIORITY_MAX 64 -#define UCC_GETH_TX_VTAG_TABLE_ENTRY_MAX 8 -#define UCC_GETH_RX_BD_RING_SIZE_MIN 8 -#define UCC_GETH_TX_BD_RING_SIZE_MIN 2 - -#define UCC_GETH_SIZE_OF_BD QE_SIZEOF_BD - -/* Driver definitions */ -#define TX_BD_RING_LEN 0x10 -#define RX_BD_RING_LEN 0x10 -#define UCC_GETH_DEV_WEIGHT TX_BD_RING_LEN - -#define TX_RING_MOD_MASK(size) (size-1) -#define RX_RING_MOD_MASK(size) (size-1) - -#define ENET_NUM_OCTETS_PER_ADDRESS 6 -#define ENET_GROUP_ADDR 0x01 /* Group address mask - for ethernet - addresses */ - -#define TX_TIMEOUT (1*HZ) -#define SKB_ALLOC_TIMEOUT 100000 -#define PHY_INIT_TIMEOUT 100000 -#define PHY_CHANGE_TIME 2 - -/* Fast Ethernet (10/100 Mbps) */ -#define UCC_GETH_URFS_INIT 512 /* Rx virtual FIFO size - */ -#define UCC_GETH_URFET_INIT 256 /* 1/2 urfs */ -#define UCC_GETH_URFSET_INIT 384 /* 3/4 urfs */ -#define UCC_GETH_UTFS_INIT 512 /* Tx virtual FIFO size - */ -#define UCC_GETH_UTFET_INIT 256 /* 1/2 utfs */ -#define UCC_GETH_UTFTT_INIT 128 -/* Gigabit Ethernet (1000 Mbps) */ -#define UCC_GETH_URFS_GIGA_INIT 4096/*2048*/ /* Rx virtual - FIFO size */ -#define UCC_GETH_URFET_GIGA_INIT 2048/*1024*/ /* 1/2 urfs */ -#define UCC_GETH_URFSET_GIGA_INIT 3072/*1536*/ /* 3/4 urfs */ -#define UCC_GETH_UTFS_GIGA_INIT 8192/*2048*/ /* Tx virtual - FIFO size */ -#define UCC_GETH_UTFET_GIGA_INIT 4096/*1024*/ /* 1/2 utfs */ -#define UCC_GETH_UTFTT_GIGA_INIT 0x400/*0x40*/ /* */ - -#define UCC_GETH_REMODER_INIT 0 /* bits that must be - set */ -#define UCC_GETH_TEMODER_INIT 0xC000 /* bits that must */ -#define UCC_GETH_UPSMR_INIT (UPSMR_RES1) /* Start value - for this - register */ -#define UCC_GETH_MACCFG1_INIT 0 -#define UCC_GETH_MACCFG2_INIT (MACCFG2_RESERVED_1) -#define UCC_GETH_MIIMCFG_MNGMNT_CLC_DIV_INIT \ - (MIIMCFG_MANAGEMENT_CLOCK_DIVIDE_BY_112) - -/* Ethernet speed */ -typedef enum enet_speed { - ENET_SPEED_10BT, /* 10 Base T */ - ENET_SPEED_100BT, /* 100 Base T */ - ENET_SPEED_1000BT /* 1000 Base T */ -} enet_speed_e; - -/* Ethernet Address Type. */ -typedef enum enet_addr_type { - ENET_ADDR_TYPE_INDIVIDUAL, - ENET_ADDR_TYPE_GROUP, - ENET_ADDR_TYPE_BROADCAST -} enet_addr_type_e; - -/* TBI / MII Set Register */ -typedef enum enet_tbi_mii_reg { - ENET_TBI_MII_CR = 0x00, /* Control (CR ) */ - ENET_TBI_MII_SR = 0x01, /* Status (SR ) */ - ENET_TBI_MII_ANA = 0x04, /* AN advertisement (ANA ) */ - ENET_TBI_MII_ANLPBPA = 0x05, /* AN link partner base page ability - (ANLPBPA) */ - ENET_TBI_MII_ANEX = 0x06, /* AN expansion (ANEX ) */ - ENET_TBI_MII_ANNPT = 0x07, /* AN next page transmit (ANNPT ) */ - ENET_TBI_MII_ANLPANP = 0x08, /* AN link partner ability next page - (ANLPANP) */ - ENET_TBI_MII_EXST = 0x0F, /* Extended status (EXST ) */ - ENET_TBI_MII_JD = 0x10, /* Jitter diagnostics (JD ) */ - ENET_TBI_MII_TBICON = 0x11 /* TBI control (TBICON ) */ -} enet_tbi_mii_reg_e; - -/* UCC GETH 82xx Ethernet Address Recognition Location */ -typedef enum ucc_geth_enet_address_recognition_location { - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_STATION_ADDRESS,/* station - address */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR_FIRST, /* additional - station - address - paddr1 */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR2, /* additional - station - address - paddr2 */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR3, /* additional - station - address - paddr3 */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR_LAST, /* additional - station - address - paddr4 */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_GROUP_HASH, /* group hash */ - UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_INDIVIDUAL_HASH /* individual - hash */ -} ucc_geth_enet_address_recognition_location_e; - -/* UCC GETH vlan operation tagged */ -typedef enum ucc_geth_vlan_operation_tagged { - UCC_GETH_VLAN_OPERATION_TAGGED_NOP = 0x0, /* Tagged - nop */ - UCC_GETH_VLAN_OPERATION_TAGGED_REPLACE_VID_PORTION_OF_Q_TAG - = 0x1, /* Tagged - replace vid portion of q tag */ - UCC_GETH_VLAN_OPERATION_TAGGED_IF_VID0_REPLACE_VID_WITH_DEFAULT_VALUE - = 0x2, /* Tagged - if vid0 replace vid with default value */ - UCC_GETH_VLAN_OPERATION_TAGGED_EXTRACT_Q_TAG_FROM_FRAME - = 0x3 /* Tagged - extract q tag from frame */ -} ucc_geth_vlan_operation_tagged_e; - -/* UCC GETH vlan operation non-tagged */ -typedef enum ucc_geth_vlan_operation_non_tagged { - UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP = 0x0, /* Non tagged - nop */ - UCC_GETH_VLAN_OPERATION_NON_TAGGED_Q_TAG_INSERT = 0x1 /* Non tagged - - q tag insert - */ -} ucc_geth_vlan_operation_non_tagged_e; - -/* UCC GETH Rx Quality of Service Mode */ -typedef enum ucc_geth_qos_mode { - UCC_GETH_QOS_MODE_DEFAULT = 0x0, /* default queue */ - UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L2_CRITERIA = 0x1, /* queue - determined - by L2 - criteria */ - UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L3_CRITERIA = 0x2 /* queue - determined - by L3 - criteria */ -} ucc_geth_qos_mode_e; - -/* UCC GETH Statistics Gathering Mode - These are bit flags, 'or' them together - for combined functionality */ -typedef enum ucc_geth_statistics_gathering_mode { - UCC_GETH_STATISTICS_GATHERING_MODE_NONE = 0x00000000, /* No - statistics - gathering */ - UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE = 0x00000001,/* Enable - hardware - statistics - gathering - */ - UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX = 0x00000004,/*Enable - firmware - tx - statistics - gathering - */ - UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX = 0x00000008/* Enable - firmware - rx - statistics - gathering - */ -} ucc_geth_statistics_gathering_mode_e; - -/* UCC GETH Pad and CRC Mode - Note, Padding without CRC is not possible */ -typedef enum ucc_geth_maccfg2_pad_and_crc_mode { - UCC_GETH_PAD_AND_CRC_MODE_NONE - = MACCFG2_PAD_AND_CRC_MODE_NONE, /* Neither Padding - short frames - nor CRC */ - UCC_GETH_PAD_AND_CRC_MODE_CRC_ONLY - = MACCFG2_PAD_AND_CRC_MODE_CRC_ONLY, /* Append - CRC only */ - UCC_GETH_PAD_AND_CRC_MODE_PAD_AND_CRC = - MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC -} ucc_geth_maccfg2_pad_and_crc_mode_e; - -/* UCC GETH upsmr Flow Control Mode */ -typedef enum ucc_geth_flow_control_mode { - UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_NONE = 0x00000000, /* No automatic - flow control - */ - UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_PAUSE_WHEN_EMERGENCY - = 0x00004000 /* Send pause frame when RxFIFO reaches its - emergency threshold */ -} ucc_geth_flow_control_mode_e; - -/* UCC GETH number of threads */ -typedef enum ucc_geth_num_of_threads { - UCC_GETH_NUM_OF_THREADS_1 = 0x1, /* 1 */ - UCC_GETH_NUM_OF_THREADS_2 = 0x2, /* 2 */ - UCC_GETH_NUM_OF_THREADS_4 = 0x0, /* 4 */ - UCC_GETH_NUM_OF_THREADS_6 = 0x3, /* 6 */ - UCC_GETH_NUM_OF_THREADS_8 = 0x4 /* 8 */ -} ucc_geth_num_of_threads_e; - -/* UCC GETH number of station addresses */ -typedef enum ucc_geth_num_of_station_addresses { - UCC_GETH_NUM_OF_STATION_ADDRESSES_1, /* 1 */ - UCC_GETH_NUM_OF_STATION_ADDRESSES_5 /* 5 */ -} ucc_geth_num_of_station_addresses_e; - -typedef u8 enet_addr_t[ENET_NUM_OCTETS_PER_ADDRESS]; - -/* UCC GETH 82xx Ethernet Address Container */ -typedef struct enet_addr_container { - enet_addr_t address; /* ethernet address */ - ucc_geth_enet_address_recognition_location_e location; /* location in - 82xx address - recognition - hardware */ - struct list_head node; -} enet_addr_container_t; - -#define ENET_ADDR_CONT_ENTRY(ptr) list_entry(ptr, enet_addr_container_t, node) - -/* UCC GETH Termination Action Descriptor (TAD) structure. */ -typedef struct ucc_geth_tad_params { - int rx_non_dynamic_extended_features_mode; - int reject_frame; - ucc_geth_vlan_operation_tagged_e vtag_op; - ucc_geth_vlan_operation_non_tagged_e vnontag_op; - ucc_geth_qos_mode_e rqos; - u8 vpri; - u16 vid; -} ucc_geth_tad_params_t; - -/* GETH protocol initialization structure */ -typedef struct ucc_geth_info { - ucc_fast_info_t uf_info; - u8 numQueuesTx; - u8 numQueuesRx; - int ipCheckSumCheck; - int ipCheckSumGenerate; - int rxExtendedFiltering; - u32 extendedFilteringChainPointer; - u16 typeorlen; - int dynamicMaxFrameLength; - int dynamicMinFrameLength; - u8 nonBackToBackIfgPart1; - u8 nonBackToBackIfgPart2; - u8 miminumInterFrameGapEnforcement; - u8 backToBackInterFrameGap; - int ipAddressAlignment; - int lengthCheckRx; - u32 mblinterval; - u16 nortsrbytetime; - u8 fracsiz; - u8 strictpriorityq; - u8 txasap; - u8 extrabw; - int miiPreambleSupress; - u8 altBebTruncation; - int altBeb; - int backPressureNoBackoff; - int noBackoff; - int excessDefer; - u8 maxRetransmission; - u8 collisionWindow; - int pro; - int cap; - int rsh; - int rlpb; - int cam; - int bro; - int ecm; - int receiveFlowControl; - u8 maxGroupAddrInHash; - u8 maxIndAddrInHash; - u8 prel; - u16 maxFrameLength; - u16 minFrameLength; - u16 maxD1Length; - u16 maxD2Length; - u16 vlantype; - u16 vlantci; - u32 ecamptr; - u32 eventRegMask; - u16 pausePeriod; - u16 extensionField; - u8 phy_address; - u32 board_flags; - u32 phy_interrupt; - u8 weightfactor[NUM_TX_QUEUES]; - u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES]; - u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX]; - u8 l3qt[UCC_GETH_IP_PRIORITY_MAX]; - u32 vtagtable[UCC_GETH_TX_VTAG_TABLE_ENTRY_MAX]; - u8 iphoffset[TX_IP_OFFSET_ENTRY_MAX]; - u16 bdRingLenTx[NUM_TX_QUEUES]; - u16 bdRingLenRx[NUM_RX_QUEUES]; - enet_interface_e enet_interface; - ucc_geth_num_of_station_addresses_e numStationAddresses; - qe_fltr_largest_external_tbl_lookup_key_size_e - largestexternallookupkeysize; - ucc_geth_statistics_gathering_mode_e statisticsMode; - ucc_geth_vlan_operation_tagged_e vlanOperationTagged; - ucc_geth_vlan_operation_non_tagged_e vlanOperationNonTagged; - ucc_geth_qos_mode_e rxQoSMode; - ucc_geth_flow_control_mode_e aufc; - ucc_geth_maccfg2_pad_and_crc_mode_e padAndCrc; - ucc_geth_num_of_threads_e numThreadsTx; - ucc_geth_num_of_threads_e numThreadsRx; - qe_risc_allocation_e riscTx; - qe_risc_allocation_e riscRx; -} ucc_geth_info_t; - -/* structure representing UCC GETH */ -typedef struct ucc_geth_private { - ucc_geth_info_t *ug_info; - ucc_fast_private_t *uccf; - struct net_device *dev; - struct net_device_stats stats; /* linux network statistics */ - ucc_geth_t *ug_regs; - ucc_geth_init_pram_t *p_init_enet_param_shadow; - ucc_geth_exf_global_pram_t *p_exf_glbl_param; - u32 exf_glbl_param_offset; - ucc_geth_rx_global_pram_t *p_rx_glbl_pram; - u32 rx_glbl_pram_offset; - ucc_geth_tx_global_pram_t *p_tx_glbl_pram; - u32 tx_glbl_pram_offset; - ucc_geth_send_queue_mem_region_t *p_send_q_mem_reg; - u32 send_q_mem_reg_offset; - ucc_geth_thread_data_tx_t *p_thread_data_tx; - u32 thread_dat_tx_offset; - ucc_geth_thread_data_rx_t *p_thread_data_rx; - u32 thread_dat_rx_offset; - ucc_geth_scheduler_t *p_scheduler; - u32 scheduler_offset; - ucc_geth_tx_firmware_statistics_pram_t *p_tx_fw_statistics_pram; - u32 tx_fw_statistics_pram_offset; - ucc_geth_rx_firmware_statistics_pram_t *p_rx_fw_statistics_pram; - u32 rx_fw_statistics_pram_offset; - ucc_geth_rx_interrupt_coalescing_table_t *p_rx_irq_coalescing_tbl; - u32 rx_irq_coalescing_tbl_offset; - ucc_geth_rx_bd_queues_entry_t *p_rx_bd_qs_tbl; - u32 rx_bd_qs_tbl_offset; - u8 *p_tx_bd_ring[NUM_TX_QUEUES]; - u32 tx_bd_ring_offset[NUM_TX_QUEUES]; - u8 *p_rx_bd_ring[NUM_RX_QUEUES]; - u32 rx_bd_ring_offset[NUM_RX_QUEUES]; - u8 *confBd[NUM_TX_QUEUES]; - u8 *txBd[NUM_TX_QUEUES]; - u8 *rxBd[NUM_RX_QUEUES]; - int badFrame[NUM_RX_QUEUES]; - u16 cpucount[NUM_TX_QUEUES]; - volatile u16 *p_cpucount[NUM_TX_QUEUES]; - int indAddrRegUsed[NUM_OF_PADDRS]; - enet_addr_t paddr[NUM_OF_PADDRS]; - u8 numGroupAddrInHash; - u8 numIndAddrInHash; - u8 numIndAddrInReg; - int rx_extended_features; - int rx_non_dynamic_extended_features; - struct list_head conf_skbs; - struct list_head group_hash_q; - struct list_head ind_hash_q; - u32 saved_uccm; - spinlock_t lock; - /* pointers to arrays of skbuffs for tx and rx */ - struct sk_buff **tx_skbuff[NUM_TX_QUEUES]; - struct sk_buff **rx_skbuff[NUM_RX_QUEUES]; - /* indices pointing to the next free sbk in skb arrays */ - u16 skb_curtx[NUM_TX_QUEUES]; - u16 skb_currx[NUM_RX_QUEUES]; - /* index of the first skb which hasn't been transmitted yet. */ - u16 skb_dirtytx[NUM_TX_QUEUES]; - - struct work_struct tq; - struct timer_list phy_info_timer; - struct ugeth_mii_info *mii_info; - int oldspeed; - int oldduplex; - int oldlink; -} ucc_geth_private_t; - -#endif /* __UCC_GETH_H__ */ diff --git a/drivers/net/ucc_geth_phy.c b/drivers/net/ucc_geth_phy.c deleted file mode 100644 index f91028c53..000000000 --- a/drivers/net/ucc_geth_phy.c +++ /dev/null @@ -1,801 +0,0 @@ -/* - * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. - * - * Author: Shlomi Gridish - * - * Description: - * UCC GETH Driver -- PHY handling - * - * Changelog: - * Jun 28, 2006 Li Yang - * - Rearrange code and style fixes - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "ucc_geth.h" -#include "ucc_geth_phy.h" -#include - -#define ugphy_printk(level, format, arg...) \ - printk(level format "\n", ## arg) - -#define ugphy_dbg(format, arg...) \ - ugphy_printk(KERN_DEBUG, format , ## arg) -#define ugphy_err(format, arg...) \ - ugphy_printk(KERN_ERR, format , ## arg) -#define ugphy_info(format, arg...) \ - ugphy_printk(KERN_INFO, format , ## arg) -#define ugphy_warn(format, arg...) \ - ugphy_printk(KERN_WARNING, format , ## arg) - -#ifdef UGETH_VERBOSE_DEBUG -#define ugphy_vdbg ugphy_dbg -#else -#define ugphy_vdbg(fmt, args...) do { } while (0) -#endif /* UGETH_VERBOSE_DEBUG */ - -static void config_genmii_advert(struct ugeth_mii_info *mii_info); -static void genmii_setup_forced(struct ugeth_mii_info *mii_info); -static void genmii_restart_aneg(struct ugeth_mii_info *mii_info); -static int gbit_config_aneg(struct ugeth_mii_info *mii_info); -static int genmii_config_aneg(struct ugeth_mii_info *mii_info); -static int genmii_update_link(struct ugeth_mii_info *mii_info); -static int genmii_read_status(struct ugeth_mii_info *mii_info); -u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum); -void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val); - -static u8 *bcsr_regs = NULL; - -/* Write value to the PHY for this device to the register at regnum, */ -/* waiting until the write is done before it returns. All PHY */ -/* configuration has to be done through the TSEC1 MIIM regs */ -void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - ucc_mii_mng_t *mii_regs; - enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e) regnum; - u32 tmp_reg; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - spin_lock_irq(&ugeth->lock); - - mii_regs = ugeth->mii_info->mii_regs; - - /* Set this UCC to be the master of the MII managment */ - ucc_set_qe_mux_mii_mng(ugeth->ug_info->uf_info.ucc_num); - - /* Stop the MII management read cycle */ - out_be32(&mii_regs->miimcom, 0); - /* Setting up the MII Mangement Address Register */ - tmp_reg = ((u32) mii_id << MIIMADD_PHY_ADDRESS_SHIFT) | mii_reg; - out_be32(&mii_regs->miimadd, tmp_reg); - - /* Setting up the MII Mangement Control Register with the value */ - out_be32(&mii_regs->miimcon, (u32) value); - - /* Wait till MII management write is complete */ - while ((in_be32(&mii_regs->miimind)) & MIIMIND_BUSY) - cpu_relax(); - - spin_unlock_irq(&ugeth->lock); - - udelay(10000); -} - -/* Reads from register regnum in the PHY for device dev, */ -/* returning the value. Clears miimcom first. All PHY */ -/* configuration has to be done through the TSEC1 MIIM regs */ -int read_phy_reg(struct net_device *dev, int mii_id, int regnum) -{ - ucc_geth_private_t *ugeth = netdev_priv(dev); - ucc_mii_mng_t *mii_regs; - enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e) regnum; - u32 tmp_reg; - u16 value; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - spin_lock_irq(&ugeth->lock); - - mii_regs = ugeth->mii_info->mii_regs; - - /* Setting up the MII Mangement Address Register */ - tmp_reg = ((u32) mii_id << MIIMADD_PHY_ADDRESS_SHIFT) | mii_reg; - out_be32(&mii_regs->miimadd, tmp_reg); - - /* Perform an MII management read cycle */ - out_be32(&mii_regs->miimcom, MIIMCOM_READ_CYCLE); - - /* Wait till MII management write is complete */ - while ((in_be32(&mii_regs->miimind)) & MIIMIND_BUSY) - cpu_relax(); - - udelay(10000); - - /* Read MII management status */ - value = (u16) in_be32(&mii_regs->miimstat); - out_be32(&mii_regs->miimcom, 0); - if (value == 0xffff) - ugphy_warn("read wrong value : mii_id %d,mii_reg %d, base %08x", - mii_id, mii_reg, (u32) & (mii_regs->miimcfg)); - - spin_unlock_irq(&ugeth->lock); - - return (value); -} - -void mii_clear_phy_interrupt(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->phyinfo->ack_interrupt) - mii_info->phyinfo->ack_interrupt(mii_info); -} - -void mii_configure_phy_interrupt(struct ugeth_mii_info *mii_info, - u32 interrupts) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - mii_info->interrupts = interrupts; - if (mii_info->phyinfo->config_intr) - mii_info->phyinfo->config_intr(mii_info); -} - -/* Writes MII_ADVERTISE with the appropriate values, after - * sanitizing advertise to make sure only supported features - * are advertised - */ -static void config_genmii_advert(struct ugeth_mii_info *mii_info) -{ - u32 advertise; - u16 adv; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Only allow advertising what this PHY supports */ - mii_info->advertising &= mii_info->phyinfo->features; - advertise = mii_info->advertising; - - /* Setup standard advertisement */ - adv = phy_read(mii_info, MII_ADVERTISE); - adv &= ~(ADVERTISE_ALL | ADVERTISE_100BASE4); - if (advertise & ADVERTISED_10baseT_Half) - adv |= ADVERTISE_10HALF; - if (advertise & ADVERTISED_10baseT_Full) - adv |= ADVERTISE_10FULL; - if (advertise & ADVERTISED_100baseT_Half) - adv |= ADVERTISE_100HALF; - if (advertise & ADVERTISED_100baseT_Full) - adv |= ADVERTISE_100FULL; - phy_write(mii_info, MII_ADVERTISE, adv); -} - -static void genmii_setup_forced(struct ugeth_mii_info *mii_info) -{ - u16 ctrl; - u32 features = mii_info->phyinfo->features; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - ctrl = phy_read(mii_info, MII_BMCR); - - ctrl &= - ~(BMCR_FULLDPLX | BMCR_SPEED100 | BMCR_SPEED1000 | BMCR_ANENABLE); - ctrl |= BMCR_RESET; - - switch (mii_info->speed) { - case SPEED_1000: - if (features & (SUPPORTED_1000baseT_Half - | SUPPORTED_1000baseT_Full)) { - ctrl |= BMCR_SPEED1000; - break; - } - mii_info->speed = SPEED_100; - case SPEED_100: - if (features & (SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full)) { - ctrl |= BMCR_SPEED100; - break; - } - mii_info->speed = SPEED_10; - case SPEED_10: - if (features & (SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full)) - break; - default: /* Unsupported speed! */ - ugphy_err("%s: Bad speed!", mii_info->dev->name); - break; - } - - phy_write(mii_info, MII_BMCR, ctrl); -} - -/* Enable and Restart Autonegotiation */ -static void genmii_restart_aneg(struct ugeth_mii_info *mii_info) -{ - u16 ctl; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - ctl = phy_read(mii_info, MII_BMCR); - ctl |= (BMCR_ANENABLE | BMCR_ANRESTART); - phy_write(mii_info, MII_BMCR, ctl); -} - -static int gbit_config_aneg(struct ugeth_mii_info *mii_info) -{ - u16 adv; - u32 advertise; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->autoneg) { - /* Configure the ADVERTISE register */ - config_genmii_advert(mii_info); - advertise = mii_info->advertising; - - adv = phy_read(mii_info, MII_1000BASETCONTROL); - adv &= ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | - MII_1000BASETCONTROL_HALFDUPLEXCAP); - if (advertise & SUPPORTED_1000baseT_Half) - adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; - if (advertise & SUPPORTED_1000baseT_Full) - adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; - phy_write(mii_info, MII_1000BASETCONTROL, adv); - - /* Start/Restart aneg */ - genmii_restart_aneg(mii_info); - } else - genmii_setup_forced(mii_info); - - return 0; -} - -static int genmii_config_aneg(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->autoneg) { - config_genmii_advert(mii_info); - genmii_restart_aneg(mii_info); - } else - genmii_setup_forced(mii_info); - - return 0; -} - -static int genmii_update_link(struct ugeth_mii_info *mii_info) -{ - u16 status; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Do a fake read */ - phy_read(mii_info, MII_BMSR); - - /* Read link and autonegotiation status */ - status = phy_read(mii_info, MII_BMSR); - if ((status & BMSR_LSTATUS) == 0) - mii_info->link = 0; - else - mii_info->link = 1; - - /* If we are autonegotiating, and not done, - * return an error */ - if (mii_info->autoneg && !(status & BMSR_ANEGCOMPLETE)) - return -EAGAIN; - - return 0; -} - -static int genmii_read_status(struct ugeth_mii_info *mii_info) -{ - u16 status; - int err; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Update the link, but return if there - * was an error */ - err = genmii_update_link(mii_info); - if (err) - return err; - - if (mii_info->autoneg) { - status = phy_read(mii_info, MII_LPA); - - if (status & (LPA_10FULL | LPA_100FULL)) - mii_info->duplex = DUPLEX_FULL; - else - mii_info->duplex = DUPLEX_HALF; - if (status & (LPA_100FULL | LPA_100HALF)) - mii_info->speed = SPEED_100; - else - mii_info->speed = SPEED_10; - mii_info->pause = 0; - } - /* On non-aneg, we assume what we put in BMCR is the speed, - * though magic-aneg shouldn't prevent this case from occurring - */ - - return 0; -} - -static int marvell_init(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - phy_write(mii_info, 0x14, 0x0cd2); - phy_write(mii_info, MII_BMCR, - phy_read(mii_info, MII_BMCR) | BMCR_RESET); - msleep(4000); - - return 0; -} - -static int marvell_config_aneg(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* The Marvell PHY has an errata which requires - * that certain registers get written in order - * to restart autonegotiation */ - phy_write(mii_info, MII_BMCR, BMCR_RESET); - - phy_write(mii_info, 0x1d, 0x1f); - phy_write(mii_info, 0x1e, 0x200c); - phy_write(mii_info, 0x1d, 0x5); - phy_write(mii_info, 0x1e, 0); - phy_write(mii_info, 0x1e, 0x100); - - gbit_config_aneg(mii_info); - - return 0; -} - -static int marvell_read_status(struct ugeth_mii_info *mii_info) -{ - u16 status; - int err; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Update the link, but return if there - * was an error */ - err = genmii_update_link(mii_info); - if (err) - return err; - - /* If the link is up, read the speed and duplex */ - /* If we aren't autonegotiating, assume speeds - * are as set */ - if (mii_info->autoneg && mii_info->link) { - int speed; - status = phy_read(mii_info, MII_M1011_PHY_SPEC_STATUS); - - /* Get the duplexity */ - if (status & MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX) - mii_info->duplex = DUPLEX_FULL; - else - mii_info->duplex = DUPLEX_HALF; - - /* Get the speed */ - speed = status & MII_M1011_PHY_SPEC_STATUS_SPD_MASK; - switch (speed) { - case MII_M1011_PHY_SPEC_STATUS_1000: - mii_info->speed = SPEED_1000; - break; - case MII_M1011_PHY_SPEC_STATUS_100: - mii_info->speed = SPEED_100; - break; - default: - mii_info->speed = SPEED_10; - break; - } - mii_info->pause = 0; - } - - return 0; -} - -static int marvell_ack_interrupt(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Clear the interrupts by reading the reg */ - phy_read(mii_info, MII_M1011_IEVENT); - - return 0; -} - -static int marvell_config_intr(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->interrupts == MII_INTERRUPT_ENABLED) - phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_INIT); - else - phy_write(mii_info, MII_M1011_IMASK, MII_M1011_IMASK_CLEAR); - - return 0; -} - -static int cis820x_init(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - phy_write(mii_info, MII_CIS8201_AUX_CONSTAT, - MII_CIS8201_AUXCONSTAT_INIT); - phy_write(mii_info, MII_CIS8201_EXT_CON1, MII_CIS8201_EXTCON1_INIT); - - return 0; -} - -static int cis820x_read_status(struct ugeth_mii_info *mii_info) -{ - u16 status; - int err; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Update the link, but return if there - * was an error */ - err = genmii_update_link(mii_info); - if (err) - return err; - - /* If the link is up, read the speed and duplex */ - /* If we aren't autonegotiating, assume speeds - * are as set */ - if (mii_info->autoneg && mii_info->link) { - int speed; - - status = phy_read(mii_info, MII_CIS8201_AUX_CONSTAT); - if (status & MII_CIS8201_AUXCONSTAT_DUPLEX) - mii_info->duplex = DUPLEX_FULL; - else - mii_info->duplex = DUPLEX_HALF; - - speed = status & MII_CIS8201_AUXCONSTAT_SPEED; - - switch (speed) { - case MII_CIS8201_AUXCONSTAT_GBIT: - mii_info->speed = SPEED_1000; - break; - case MII_CIS8201_AUXCONSTAT_100: - mii_info->speed = SPEED_100; - break; - default: - mii_info->speed = SPEED_10; - break; - } - } - - return 0; -} - -static int cis820x_ack_interrupt(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - phy_read(mii_info, MII_CIS8201_ISTAT); - - return 0; -} - -static int cis820x_config_intr(struct ugeth_mii_info *mii_info) -{ - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->interrupts == MII_INTERRUPT_ENABLED) - phy_write(mii_info, MII_CIS8201_IMASK, MII_CIS8201_IMASK_MASK); - else - phy_write(mii_info, MII_CIS8201_IMASK, 0); - - return 0; -} - -#define DM9161_DELAY 10 - -static int dm9161_read_status(struct ugeth_mii_info *mii_info) -{ - u16 status; - int err; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Update the link, but return if there - * was an error */ - err = genmii_update_link(mii_info); - if (err) - return err; - - /* If the link is up, read the speed and duplex */ - /* If we aren't autonegotiating, assume speeds - * are as set */ - if (mii_info->autoneg && mii_info->link) { - status = phy_read(mii_info, MII_DM9161_SCSR); - if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_100H)) - mii_info->speed = SPEED_100; - else - mii_info->speed = SPEED_10; - - if (status & (MII_DM9161_SCSR_100F | MII_DM9161_SCSR_10F)) - mii_info->duplex = DUPLEX_FULL; - else - mii_info->duplex = DUPLEX_HALF; - } - - return 0; -} - -static int dm9161_config_aneg(struct ugeth_mii_info *mii_info) -{ - struct dm9161_private *priv = mii_info->priv; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (0 == priv->resetdone) - return -EAGAIN; - - return 0; -} - -static void dm9161_timer(unsigned long data) -{ - struct ugeth_mii_info *mii_info = (struct ugeth_mii_info *)data; - struct dm9161_private *priv = mii_info->priv; - u16 status = phy_read(mii_info, MII_BMSR); - - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (status & BMSR_ANEGCOMPLETE) { - priv->resetdone = 1; - } else - mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); -} - -static int dm9161_init(struct ugeth_mii_info *mii_info) -{ - struct dm9161_private *priv; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Allocate the private data structure */ - priv = kmalloc(sizeof(struct dm9161_private), GFP_KERNEL); - - if (NULL == priv) - return -ENOMEM; - - mii_info->priv = priv; - - /* Reset is not done yet */ - priv->resetdone = 0; - - phy_write(mii_info, MII_BMCR, - phy_read(mii_info, MII_BMCR) | BMCR_RESET); - - phy_write(mii_info, MII_BMCR, - phy_read(mii_info, MII_BMCR) & ~BMCR_ISOLATE); - - config_genmii_advert(mii_info); - /* Start/Restart aneg */ - genmii_config_aneg(mii_info); - - /* Start a timer for DM9161_DELAY seconds to wait - * for the PHY to be ready */ - init_timer(&priv->timer); - priv->timer.function = &dm9161_timer; - priv->timer.data = (unsigned long)mii_info; - mod_timer(&priv->timer, jiffies + DM9161_DELAY * HZ); - - return 0; -} - -static void dm9161_close(struct ugeth_mii_info *mii_info) -{ - struct dm9161_private *priv = mii_info->priv; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - del_timer_sync(&priv->timer); - kfree(priv); -} - -static int dm9161_ack_interrupt(struct ugeth_mii_info *mii_info) -{ -/* FIXME: This lines are for BUG fixing in the mpc8325. -Remove this from here when it's fixed */ - if (bcsr_regs == NULL) - bcsr_regs = (u8 *) ioremap(BCSR_PHYS_ADDR, BCSR_SIZE); - bcsr_regs[14] |= 0x40; - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Clear the interrupts by reading the reg */ - phy_read(mii_info, MII_DM9161_INTR); - - - return 0; -} - -static int dm9161_config_intr(struct ugeth_mii_info *mii_info) -{ -/* FIXME: This lines are for BUG fixing in the mpc8325. -Remove this from here when it's fixed */ - if (bcsr_regs == NULL) { - bcsr_regs = (u8 *) ioremap(BCSR_PHYS_ADDR, BCSR_SIZE); - bcsr_regs[14] &= ~0x40; - } - ugphy_vdbg("%s: IN", __FUNCTION__); - - if (mii_info->interrupts == MII_INTERRUPT_ENABLED) - phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_INIT); - else - phy_write(mii_info, MII_DM9161_INTR, MII_DM9161_INTR_STOP); - - return 0; -} - -/* Cicada 820x */ -static struct phy_info phy_info_cis820x = { - .phy_id = 0x000fc440, - .name = "Cicada Cis8204", - .phy_id_mask = 0x000fffc0, - .features = MII_GBIT_FEATURES, - .init = &cis820x_init, - .config_aneg = &gbit_config_aneg, - .read_status = &cis820x_read_status, - .ack_interrupt = &cis820x_ack_interrupt, - .config_intr = &cis820x_config_intr, -}; - -static struct phy_info phy_info_dm9161 = { - .phy_id = 0x0181b880, - .phy_id_mask = 0x0ffffff0, - .name = "Davicom DM9161E", - .init = dm9161_init, - .config_aneg = dm9161_config_aneg, - .read_status = dm9161_read_status, - .close = dm9161_close, -}; - -static struct phy_info phy_info_dm9161a = { - .phy_id = 0x0181b8a0, - .phy_id_mask = 0x0ffffff0, - .name = "Davicom DM9161A", - .features = MII_BASIC_FEATURES, - .init = dm9161_init, - .config_aneg = dm9161_config_aneg, - .read_status = dm9161_read_status, - .ack_interrupt = dm9161_ack_interrupt, - .config_intr = dm9161_config_intr, - .close = dm9161_close, -}; - -static struct phy_info phy_info_marvell = { - .phy_id = 0x01410c00, - .phy_id_mask = 0xffffff00, - .name = "Marvell 88E11x1", - .features = MII_GBIT_FEATURES, - .init = &marvell_init, - .config_aneg = &marvell_config_aneg, - .read_status = &marvell_read_status, - .ack_interrupt = &marvell_ack_interrupt, - .config_intr = &marvell_config_intr, -}; - -static struct phy_info phy_info_genmii = { - .phy_id = 0x00000000, - .phy_id_mask = 0x00000000, - .name = "Generic MII", - .features = MII_BASIC_FEATURES, - .config_aneg = genmii_config_aneg, - .read_status = genmii_read_status, -}; - -static struct phy_info *phy_info[] = { - &phy_info_cis820x, - &phy_info_marvell, - &phy_info_dm9161, - &phy_info_dm9161a, - &phy_info_genmii, - NULL -}; - -u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum) -{ - u16 retval; - unsigned long flags; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - spin_lock_irqsave(&mii_info->mdio_lock, flags); - retval = mii_info->mdio_read(mii_info->dev, mii_info->mii_id, regnum); - spin_unlock_irqrestore(&mii_info->mdio_lock, flags); - - return retval; -} - -void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val) -{ - unsigned long flags; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - spin_lock_irqsave(&mii_info->mdio_lock, flags); - mii_info->mdio_write(mii_info->dev, mii_info->mii_id, regnum, val); - spin_unlock_irqrestore(&mii_info->mdio_lock, flags); -} - -/* Use the PHY ID registers to determine what type of PHY is attached - * to device dev. return a struct phy_info structure describing that PHY - */ -struct phy_info *get_phy_info(struct ugeth_mii_info *mii_info) -{ - u16 phy_reg; - u32 phy_ID; - int i; - struct phy_info *theInfo = NULL; - struct net_device *dev = mii_info->dev; - - ugphy_vdbg("%s: IN", __FUNCTION__); - - /* Grab the bits from PHYIR1, and put them in the upper half */ - phy_reg = phy_read(mii_info, MII_PHYSID1); - phy_ID = (phy_reg & 0xffff) << 16; - - /* Grab the bits from PHYIR2, and put them in the lower half */ - phy_reg = phy_read(mii_info, MII_PHYSID2); - phy_ID |= (phy_reg & 0xffff); - - /* loop through all the known PHY types, and find one that */ - /* matches the ID we read from the PHY. */ - for (i = 0; phy_info[i]; i++) - if (phy_info[i]->phy_id == (phy_ID & phy_info[i]->phy_id_mask)){ - theInfo = phy_info[i]; - break; - } - - /* This shouldn't happen, as we have generic PHY support */ - if (theInfo == NULL) { - ugphy_info("%s: PHY id %x is not supported!", dev->name, - phy_ID); - return NULL; - } else { - ugphy_info("%s: PHY is %s (%x)", dev->name, theInfo->name, - phy_ID); - } - - return theInfo; -} diff --git a/drivers/net/ucc_geth_phy.h b/drivers/net/ucc_geth_phy.h deleted file mode 100644 index 2f98b8f1b..000000000 --- a/drivers/net/ucc_geth_phy.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. - * - * Author: Shlomi Gridish - * - * Description: - * UCC GETH Driver -- PHY handling - * - * Changelog: - * Jun 28, 2006 Li Yang - * - Rearrange code and style fixes - * - * 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 __UCC_GETH_PHY_H__ -#define __UCC_GETH_PHY_H__ - -#define MII_end ((u32)-2) -#define MII_read ((u32)-1) - -#define MIIMIND_BUSY 0x00000001 -#define MIIMIND_NOTVALID 0x00000004 - -#define UGETH_AN_TIMEOUT 2000 - -/* 1000BT control (Marvell & BCM54xx at least) */ -#define MII_1000BASETCONTROL 0x09 -#define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200 -#define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100 - -/* Cicada Extended Control Register 1 */ -#define MII_CIS8201_EXT_CON1 0x17 -#define MII_CIS8201_EXTCON1_INIT 0x0000 - -/* Cicada Interrupt Mask Register */ -#define MII_CIS8201_IMASK 0x19 -#define MII_CIS8201_IMASK_IEN 0x8000 -#define MII_CIS8201_IMASK_SPEED 0x4000 -#define MII_CIS8201_IMASK_LINK 0x2000 -#define MII_CIS8201_IMASK_DUPLEX 0x1000 -#define MII_CIS8201_IMASK_MASK 0xf000 - -/* Cicada Interrupt Status Register */ -#define MII_CIS8201_ISTAT 0x1a -#define MII_CIS8201_ISTAT_STATUS 0x8000 -#define MII_CIS8201_ISTAT_SPEED 0x4000 -#define MII_CIS8201_ISTAT_LINK 0x2000 -#define MII_CIS8201_ISTAT_DUPLEX 0x1000 - -/* Cicada Auxiliary Control/Status Register */ -#define MII_CIS8201_AUX_CONSTAT 0x1c -#define MII_CIS8201_AUXCONSTAT_INIT 0x0004 -#define MII_CIS8201_AUXCONSTAT_DUPLEX 0x0020 -#define MII_CIS8201_AUXCONSTAT_SPEED 0x0018 -#define MII_CIS8201_AUXCONSTAT_GBIT 0x0010 -#define MII_CIS8201_AUXCONSTAT_100 0x0008 - -/* 88E1011 PHY Status Register */ -#define MII_M1011_PHY_SPEC_STATUS 0x11 -#define MII_M1011_PHY_SPEC_STATUS_1000 0x8000 -#define MII_M1011_PHY_SPEC_STATUS_100 0x4000 -#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK 0xc000 -#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX 0x2000 -#define MII_M1011_PHY_SPEC_STATUS_RESOLVED 0x0800 -#define MII_M1011_PHY_SPEC_STATUS_LINK 0x0400 - -#define MII_M1011_IEVENT 0x13 -#define MII_M1011_IEVENT_CLEAR 0x0000 - -#define MII_M1011_IMASK 0x12 -#define MII_M1011_IMASK_INIT 0x6400 -#define MII_M1011_IMASK_CLEAR 0x0000 - -#define MII_DM9161_SCR 0x10 -#define MII_DM9161_SCR_INIT 0x0610 - -/* DM9161 Specified Configuration and Status Register */ -#define MII_DM9161_SCSR 0x11 -#define MII_DM9161_SCSR_100F 0x8000 -#define MII_DM9161_SCSR_100H 0x4000 -#define MII_DM9161_SCSR_10F 0x2000 -#define MII_DM9161_SCSR_10H 0x1000 - -/* DM9161 Interrupt Register */ -#define MII_DM9161_INTR 0x15 -#define MII_DM9161_INTR_PEND 0x8000 -#define MII_DM9161_INTR_DPLX_MASK 0x0800 -#define MII_DM9161_INTR_SPD_MASK 0x0400 -#define MII_DM9161_INTR_LINK_MASK 0x0200 -#define MII_DM9161_INTR_MASK 0x0100 -#define MII_DM9161_INTR_DPLX_CHANGE 0x0010 -#define MII_DM9161_INTR_SPD_CHANGE 0x0008 -#define MII_DM9161_INTR_LINK_CHANGE 0x0004 -#define MII_DM9161_INTR_INIT 0x0000 -#define MII_DM9161_INTR_STOP \ -(MII_DM9161_INTR_DPLX_MASK | MII_DM9161_INTR_SPD_MASK \ - | MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK) - -/* DM9161 10BT Configuration/Status */ -#define MII_DM9161_10BTCSR 0x12 -#define MII_DM9161_10BTCSR_INIT 0x7800 - -#define MII_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ - SUPPORTED_10baseT_Full | \ - SUPPORTED_100baseT_Half | \ - SUPPORTED_100baseT_Full | \ - SUPPORTED_Autoneg | \ - SUPPORTED_TP | \ - SUPPORTED_MII) - -#define MII_GBIT_FEATURES (MII_BASIC_FEATURES | \ - SUPPORTED_1000baseT_Half | \ - SUPPORTED_1000baseT_Full) - -#define MII_READ_COMMAND 0x00000001 - -#define MII_INTERRUPT_DISABLED 0x0 -#define MII_INTERRUPT_ENABLED 0x1 -/* Taken from mii_if_info and sungem_phy.h */ -struct ugeth_mii_info { - /* Information about the PHY type */ - /* And management functions */ - struct phy_info *phyinfo; - - ucc_mii_mng_t *mii_regs; - - /* forced speed & duplex (no autoneg) - * partner speed & duplex & pause (autoneg) - */ - int speed; - int duplex; - int pause; - - /* The most recently read link state */ - int link; - - /* Enabled Interrupts */ - u32 interrupts; - - u32 advertising; - int autoneg; - int mii_id; - - /* private data pointer */ - /* For use by PHYs to maintain extra state */ - void *priv; - - /* Provided by host chip */ - struct net_device *dev; - - /* A lock to ensure that only one thing can read/write - * the MDIO bus at a time */ - spinlock_t mdio_lock; - - /* Provided by ethernet driver */ - int (*mdio_read) (struct net_device * dev, int mii_id, int reg); - void (*mdio_write) (struct net_device * dev, int mii_id, int reg, - int val); -}; - -/* struct phy_info: a structure which defines attributes for a PHY - * - * id will contain a number which represents the PHY. During - * startup, the driver will poll the PHY to find out what its - * UID--as defined by registers 2 and 3--is. The 32-bit result - * gotten from the PHY will be ANDed with phy_id_mask to - * discard any bits which may change based on revision numbers - * unimportant to functionality - * - * There are 6 commands which take a ugeth_mii_info structure. - * Each PHY must declare config_aneg, and read_status. - */ -struct phy_info { - u32 phy_id; - char *name; - unsigned int phy_id_mask; - u32 features; - - /* Called to initialize the PHY */ - int (*init) (struct ugeth_mii_info * mii_info); - - /* Called to suspend the PHY for power */ - int (*suspend) (struct ugeth_mii_info * mii_info); - - /* Reconfigures autonegotiation (or disables it) */ - int (*config_aneg) (struct ugeth_mii_info * mii_info); - - /* Determines the negotiated speed and duplex */ - int (*read_status) (struct ugeth_mii_info * mii_info); - - /* Clears any pending interrupts */ - int (*ack_interrupt) (struct ugeth_mii_info * mii_info); - - /* Enables or disables interrupts */ - int (*config_intr) (struct ugeth_mii_info * mii_info); - - /* Clears up any memory if needed */ - void (*close) (struct ugeth_mii_info * mii_info); -}; - -struct phy_info *get_phy_info(struct ugeth_mii_info *mii_info); -void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value); -int read_phy_reg(struct net_device *dev, int mii_id, int regnum); -void mii_clear_phy_interrupt(struct ugeth_mii_info *mii_info); -void mii_configure_phy_interrupt(struct ugeth_mii_info *mii_info, - u32 interrupts); - -struct dm9161_private { - struct timer_list timer; - int resetdone; -}; - -#endif /* __UCC_GETH_PHY_H__ */ diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index ae971080e..fdc21037f 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -25,13 +25,117 @@ version. He may or may not be interested in bug reports on this code. You can find his versions at: http://www.scyld.com/network/via-rhine.html - [link no longer provides useful info -jgarzik] + + + Linux kernel version history: + + LK1.1.0: + - Jeff Garzik: softnet 'n stuff + + LK1.1.1: + - Justin Guyett: softnet and locking fixes + - Jeff Garzik: use PCI interface + + LK1.1.2: + - Urban Widmark: minor cleanups, merges from Becker 1.03a/1.04 versions + + LK1.1.3: + - Urban Widmark: use PCI DMA interface (with thanks to the eepro100.c + code) update "Theory of Operation" with + softnet/locking changes + - Dave Miller: PCI DMA and endian fixups + - Jeff Garzik: MOD_xxx race fixes, updated PCI resource allocation + + LK1.1.4: + - Urban Widmark: fix gcc 2.95.2 problem and + remove writel's to fixed address 0x7c + + LK1.1.5: + - Urban Widmark: mdio locking, bounce buffer changes + merges from Beckers 1.05 version + added netif_running_on/off support + + LK1.1.6: + - Urban Widmark: merges from Beckers 1.08b version (VT6102 + mdio) + set netif_running_on/off on startup, del_timer_sync + + LK1.1.7: + - Manfred Spraul: added reset into tx_timeout + + LK1.1.9: + - Urban Widmark: merges from Beckers 1.10 version + (media selection + eeprom reload) + - David Vrabel: merges from D-Link "1.11" version + (disable WOL and PME on startup) + + LK1.1.10: + - Manfred Spraul: use "singlecopy" for unaligned buffers + don't allocate bounce buffers for !ReqTxAlign cards + + LK1.1.11: + - David Woodhouse: Set dev->base_addr before the first time we call + wait_for_reset(). It's a lot happier that way. + Free np->tx_bufs only if we actually allocated it. + + LK1.1.12: + - Martin Eriksson: Allow Memory-Mapped IO to be enabled. + + LK1.1.13 (jgarzik): + - Add ethtool support + - Replace some MII-related magic numbers with constants + + LK1.1.14 (Ivan G.): + - fixes comments for Rhine-III + - removes W_MAX_TIMEOUT (unused) + - adds HasDavicomPhy for Rhine-I (basis: linuxfet driver; my card + is R-I and has Davicom chip, flag is referenced in kernel driver) + - sends chip_id as a parameter to wait_for_reset since np is not + initialized on first call + - changes mmio "else if (chip_id==VT6102)" to "else" so it will work + for Rhine-III's (documentation says same bit is correct) + - transmit frame queue message is off by one - fixed + - adds IntrNormalSummary to "Something Wicked" exclusion list + so normal interrupts will not trigger the message (src: Donald Becker) + (Roger Luethi) + - show confused chip where to continue after Tx error + - location of collision counter is chip specific + - allow selecting backoff algorithm (module parameter) + + LK1.1.15 (jgarzik): + - Use new MII lib helper generic_mii_ioctl + + LK1.1.16 (Roger Luethi) + - Etherleak fix + - Handle Tx buffer underrun + - Fix bugs in full duplex handling + - New reset code uses "force reset" cmd on Rhine-II + - Various clean ups + + LK1.1.17 (Roger Luethi) + - Fix race in via_rhine_start_tx() + - On errors, wait for Tx engine to turn off before scavenging + - Handle Tx descriptor write-back race on Rhine-II + - Force flushing for PCI posted writes + - More reset code changes + + LK1.1.18 (Roger Luethi) + - No filtering multicast in promisc mode (Edward Peng) + - Fix for Rhine-I Tx timeouts + + LK1.1.19 (Roger Luethi) + - Increase Tx threshold for unspecified errors + + LK1.2.0-2.6 (Roger Luethi) + - Massive clean-up + - Rewrite PHY, media handling (remove options, full_duplex, backoff) + - Fix Tx engine race for good + - Craig Brind: Zero padded aligned buffers for short packets. */ #define DRV_NAME "via-rhine" -#define DRV_VERSION "1.4.1" -#define DRV_RELDATE "July-24-2006" +#define DRV_VERSION "1.2.0-2.6" +#define DRV_RELDATE "June-10-2004" /* A few user-configurable values. @@ -44,10 +148,6 @@ static int max_interrupt_work = 20; Setting to > 1518 effectively disables this feature. */ static int rx_copybreak; -/* Work-around for broken BIOSes: they are unable to get the chip back out of - power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */ -static int avoid_D3; - /* * In case you are looking for 'options[]' or 'full_duplex[]', they * are gone. Use ethtool(8) instead. @@ -67,11 +167,7 @@ static const int multicast_filter_limit = 32; There are no ill effects from too-large receive rings. */ #define TX_RING_SIZE 16 #define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */ -#ifdef CONFIG_VIA_RHINE_NAPI -#define RX_RING_SIZE 64 -#else #define RX_RING_SIZE 16 -#endif /* Operational parameters that usually are not changed. */ @@ -124,11 +220,9 @@ MODULE_LICENSE("GPL"); module_param(max_interrupt_work, int, 0); module_param(debug, int, 0); module_param(rx_copybreak, int, 0); -module_param(avoid_D3, bool, 0); MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt"); MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)"); MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames"); -MODULE_PARM_DESC(avoid_D3, "Avoid power state D3 (work-around for broken BIOSes)"); /* Theory of Operation @@ -262,11 +356,12 @@ enum rhine_quirks { /* Beware of PCI posted writes */ #define IOSYNC do { ioread8(ioaddr + StationAddr); } while (0) -static const struct pci_device_id rhine_pci_tbl[] = { - { 0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, }, /* VT86C100A */ - { 0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, }, /* VT6102 */ - { 0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, }, /* 6105{,L,LOM} */ - { 0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, }, /* VT6105M */ +static struct pci_device_id rhine_pci_tbl[] = +{ + {0x1106, 0x3043, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT86C100A */ + {0x1106, 0x3065, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6102 */ + {0x1106, 0x3106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* 6105{,L,LOM} */ + {0x1106, 0x3053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, }, /* VT6105M */ { } /* terminate list */ }; MODULE_DEVICE_TABLE(pci, rhine_pci_tbl); @@ -406,7 +501,7 @@ static void rhine_tx_timeout(struct net_device *dev); static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev); static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs); static void rhine_tx(struct net_device *dev); -static int rhine_rx(struct net_device *dev, int limit); +static void rhine_rx(struct net_device *dev); static void rhine_error(struct net_device *dev, int intr_status); static void rhine_set_rx_mode(struct net_device *dev); static struct net_device_stats *rhine_get_stats(struct net_device *dev); @@ -574,32 +669,6 @@ static void rhine_poll(struct net_device *dev) } #endif -#ifdef CONFIG_VIA_RHINE_NAPI -static int rhine_napipoll(struct net_device *dev, int *budget) -{ - struct rhine_private *rp = netdev_priv(dev); - void __iomem *ioaddr = rp->base; - int done, limit = min(dev->quota, *budget); - - done = rhine_rx(dev, limit); - *budget -= done; - dev->quota -= done; - - if (done < limit) { - netif_rx_complete(dev); - - iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | - IntrRxDropped | IntrRxNoBuf | IntrTxAborted | - IntrTxDone | IntrTxError | IntrTxUnderrun | - IntrPCIErr | IntrStatsMax | IntrLinkChange, - ioaddr + IntrEnable); - return 0; - } - else - return 1; -} -#endif - static void rhine_hw_init(struct net_device *dev, long pioaddr) { struct rhine_private *rp = netdev_priv(dev); @@ -779,10 +848,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, dev->watchdog_timeo = TX_TIMEOUT; #ifdef CONFIG_NET_POLL_CONTROLLER dev->poll_controller = rhine_poll; -#endif -#ifdef CONFIG_VIA_RHINE_NAPI - dev->poll = rhine_napipoll; - dev->weight = 64; #endif if (rp->quirks & rqRhineI) dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM; @@ -829,9 +894,6 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, } } rp->mii_if.phy_id = phy_id; - if (debug > 1 && avoid_D3) - printk(KERN_INFO "%s: No D3 power state at shutdown.\n", - dev->name); return 0; @@ -1057,8 +1119,6 @@ static void init_registers(struct net_device *dev) rhine_set_rx_mode(dev); - netif_poll_enable(dev); - /* Enable interrupts by setting the interrupt mask. */ iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | IntrRxDropped | IntrRxNoBuf | IntrTxAborted | @@ -1150,7 +1210,7 @@ static int rhine_open(struct net_device *dev) void __iomem *ioaddr = rp->base; int rc; - rc = request_irq(rp->pdev->irq, &rhine_interrupt, IRQF_SHARED, dev->name, + rc = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name, dev); if (rc) return rc; @@ -1224,8 +1284,11 @@ static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev) /* Calculate the next Tx descriptor entry. */ entry = rp->cur_tx % TX_RING_SIZE; - if (skb_padto(skb, ETH_ZLEN)) - return 0; + if (skb->len < ETH_ZLEN) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; + } rp->tx_skbuff[entry] = skb; @@ -1313,18 +1376,8 @@ static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs * dev->name, intr_status); if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped | - IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf)) { -#ifdef CONFIG_VIA_RHINE_NAPI - iowrite16(IntrTxAborted | - IntrTxDone | IntrTxError | IntrTxUnderrun | - IntrPCIErr | IntrStatsMax | IntrLinkChange, - ioaddr + IntrEnable); - - netif_rx_schedule(dev); -#else - rhine_rx(dev, RX_RING_SIZE); -#endif - } + IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf)) + rhine_rx(dev); if (intr_status & (IntrTxErrSummary | IntrTxDone)) { if (intr_status & IntrTxErrSummary) { @@ -1422,12 +1475,13 @@ static void rhine_tx(struct net_device *dev) spin_unlock(&rp->lock); } -/* Process up to limit frames from receive ring */ -static int rhine_rx(struct net_device *dev, int limit) +/* This routine is logically part of the interrupt handler, but isolated + for clarity and better register allocation. */ +static void rhine_rx(struct net_device *dev) { struct rhine_private *rp = netdev_priv(dev); - int count; int entry = rp->cur_rx % RX_RING_SIZE; + int boguscnt = rp->dirty_rx + RX_RING_SIZE - rp->cur_rx; if (debug > 4) { printk(KERN_DEBUG "%s: rhine_rx(), entry %d status %8.8x.\n", @@ -1436,18 +1490,16 @@ static int rhine_rx(struct net_device *dev, int limit) } /* If EOP is set on the next entry, it's a new packet. Send it up. */ - for (count = 0; count < limit; ++count) { + while (!(rp->rx_head_desc->rx_status & cpu_to_le32(DescOwn))) { struct rx_desc *desc = rp->rx_head_desc; u32 desc_status = le32_to_cpu(desc->rx_status); int data_size = desc_status >> 16; - if (desc_status & DescOwn) - break; - if (debug > 4) printk(KERN_DEBUG "rhine_rx() status is %8.8x.\n", desc_status); - + if (--boguscnt < 0) + break; if ((desc_status & (RxWholePkt | RxErr)) != RxWholePkt) { if ((desc_status & RxWholePkt) != RxWholePkt) { printk(KERN_WARNING "%s: Oversized Ethernet " @@ -1516,11 +1568,7 @@ static int rhine_rx(struct net_device *dev, int limit) PCI_DMA_FROMDEVICE); } skb->protocol = eth_type_trans(skb, dev); -#ifdef CONFIG_VIA_RHINE_NAPI - netif_receive_skb(skb); -#else netif_rx(skb); -#endif dev->last_rx = jiffies; rp->stats.rx_bytes += pkt_len; rp->stats.rx_packets++; @@ -1547,8 +1595,6 @@ static int rhine_rx(struct net_device *dev, int limit) } rp->rx_ring[entry].rx_status = cpu_to_le32(DescOwn); } - - return count; } /* @@ -1838,7 +1884,6 @@ static int rhine_close(struct net_device *dev) spin_lock_irq(&rp->lock); netif_stop_queue(dev); - netif_poll_disable(dev); if (debug > 1) printk(KERN_DEBUG "%s: Shutting down ethercard, " @@ -1920,8 +1965,7 @@ static void rhine_shutdown (struct pci_dev *pdev) } /* Hit power state D3 (sleep) */ - if (!avoid_D3) - iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW); + iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW); /* TODO: Check use of pci_enable_wake() */ @@ -1958,7 +2002,7 @@ static int rhine_resume(struct pci_dev *pdev) if (!netif_running(dev)) return 0; - if (request_irq(dev->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev)) + if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev)) printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name); ret = pci_set_power_state(pdev, PCI_D0); diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index aa9cd92f4..09e05fe40 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -64,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -229,8 +231,7 @@ static int rx_copybreak = 200; module_param(rx_copybreak, int, 0644); MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames"); -static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, - const struct velocity_info_tbl *info); +static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info); static int velocity_get_pci_info(struct velocity_info *, struct pci_dev *pdev); static void velocity_print_info(struct velocity_info *vptr); static int velocity_open(struct net_device *dev); @@ -295,9 +296,9 @@ static void velocity_unregister_notifier(void) * Internal board variants. At the moment we have only one */ -static const struct velocity_info_tbl chip_info_table[] __devinitdata = { - {CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 1, 0x00FFFFFFUL}, - { } +static struct velocity_info_tbl chip_info_table[] = { + {CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 256, 1, 0x00FFFFFFUL}, + {0, NULL} }; /* @@ -305,9 +306,10 @@ static const struct velocity_info_tbl chip_info_table[] __devinitdata = { * device driver. Used for hotplug autoloading. */ -static const struct pci_device_id velocity_id_table[] __devinitdata = { - { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_612X) }, - { } +static struct pci_device_id velocity_id_table[] __devinitdata = { + {PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_612X, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) chip_info_table}, + {0, } }; MODULE_DEVICE_TABLE(pci, velocity_id_table); @@ -341,7 +343,7 @@ static char __devinit *get_chip_name(enum chip_type chip_id) static void __devexit velocity_remove1(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; #ifdef CONFIG_PM unsigned long flags; @@ -686,23 +688,21 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi static int first = 1; struct net_device *dev; int i; - const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data]; + struct velocity_info_tbl *info = (struct velocity_info_tbl *) ent->driver_data; struct velocity_info *vptr; struct mac_regs __iomem * regs; int ret = -ENOMEM; - /* FIXME: this driver, like almost all other ethernet drivers, - * can support more than MAX_UNITS. - */ if (velocity_nics >= MAX_UNITS) { - dev_notice(&pdev->dev, "already found %d NICs.\n", - velocity_nics); + printk(KERN_NOTICE VELOCITY_NAME ": already found %d NICs.\n", + velocity_nics); return -ENODEV; } dev = alloc_etherdev(sizeof(struct velocity_info)); - if (!dev) { - dev_err(&pdev->dev, "allocate net device failed.\n"); + + if (dev == NULL) { + printk(KERN_ERR VELOCITY_NAME ": allocate net device failed.\n"); goto out; } @@ -710,7 +710,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - vptr = netdev_priv(dev); + vptr = dev->priv; if (first) { @@ -733,17 +733,17 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi ret = velocity_get_pci_info(vptr, pdev); if (ret < 0) { - /* error message already printed */ + printk(KERN_ERR VELOCITY_NAME ": Failed to find PCI device.\n"); goto err_disable; } ret = pci_request_regions(pdev, VELOCITY_NAME); if (ret < 0) { - dev_err(&pdev->dev, "No PCI resources.\n"); + printk(KERN_ERR VELOCITY_NAME ": Failed to find PCI device.\n"); goto err_disable; } - regs = ioremap(vptr->memaddr, VELOCITY_IO_SIZE); + regs = ioremap(vptr->memaddr, vptr->io_size); if (regs == NULL) { ret = -EIO; goto err_release_res; @@ -861,14 +861,13 @@ static void __devinit velocity_print_info(struct velocity_info *vptr) * discovered. */ -static void __devinit velocity_init_info(struct pci_dev *pdev, - struct velocity_info *vptr, - const struct velocity_info_tbl *info) +static void __devinit velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info) { memset(vptr, 0, sizeof(struct velocity_info)); vptr->pdev = pdev; vptr->chip_id = info->chip_id; + vptr->io_size = info->io_size; vptr->num_txq = info->txqueue; vptr->multicast_limit = MCAM_SIZE; spin_lock_init(&vptr->lock); @@ -886,7 +885,8 @@ static void __devinit velocity_init_info(struct pci_dev *pdev, static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pci_dev *pdev) { - if (pci_read_config_byte(pdev, PCI_REVISION_ID, &vptr->rev_id) < 0) + + if(pci_read_config_byte(pdev, PCI_REVISION_ID, &vptr->rev_id) < 0) return -EIO; pci_set_master(pdev); @@ -894,20 +894,24 @@ static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pc vptr->ioaddr = pci_resource_start(pdev, 0); vptr->memaddr = pci_resource_start(pdev, 1); - if (!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) { - dev_err(&pdev->dev, - "region #0 is not an I/O resource, aborting.\n"); + if(!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) + { + printk(KERN_ERR "%s: region #0 is not an I/O resource, aborting.\n", + pci_name(pdev)); return -EINVAL; } - if ((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) { - dev_err(&pdev->dev, - "region #1 is an I/O resource, aborting.\n"); + if((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) + { + printk(KERN_ERR "%s: region #1 is an I/O resource, aborting.\n", + pci_name(pdev)); return -EINVAL; } - if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) { - dev_err(&pdev->dev, "region #1 is too small.\n"); + if(pci_resource_len(pdev, 1) < 256) + { + printk(KERN_ERR "%s: region #1 is too small.\n", + pci_name(pdev)); return -EINVAL; } vptr->pdev = pdev; @@ -1726,7 +1730,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_ static int velocity_open(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; int ret; vptr->rx_buf_sz = (dev->mtu <= 1504 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1748,7 +1752,7 @@ static int velocity_open(struct net_device *dev) velocity_init_registers(vptr, VELOCITY_INIT_COLD); - ret = request_irq(vptr->pdev->irq, &velocity_intr, IRQF_SHARED, + ret = request_irq(vptr->pdev->irq, &velocity_intr, SA_SHIRQ, dev->name, dev); if (ret < 0) { /* Power down the chip */ @@ -1783,7 +1787,7 @@ err_free_desc_rings: static int velocity_change_mtu(struct net_device *dev, int new_mtu) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; unsigned long flags; int oldmtu = dev->mtu; int ret = 0; @@ -1859,7 +1863,7 @@ static void velocity_shutdown(struct velocity_info *vptr) static int velocity_close(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; netif_stop_queue(dev); velocity_shutdown(vptr); @@ -1892,7 +1896,7 @@ static int velocity_close(struct net_device *dev) static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; int qnum = 0; struct tx_desc *td_ptr; struct velocity_td_info *tdinfo; @@ -2047,7 +2051,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; u32 isr_status; int max_count = 0; @@ -2102,7 +2106,7 @@ static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs) static void velocity_set_multi(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; struct mac_regs __iomem * regs = vptr->mac_regs; u8 rx_mode; int i; @@ -2151,7 +2155,7 @@ static void velocity_set_multi(struct net_device *dev) static struct net_device_stats *velocity_get_stats(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; /* If the hardware is down, don't touch MII */ if(!netif_running(dev)) @@ -2194,7 +2198,7 @@ static struct net_device_stats *velocity_get_stats(struct net_device *dev) static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; int ret; /* If we are asked for information and the device is power @@ -2742,7 +2746,7 @@ static u32 check_connection_type(struct mac_regs __iomem * regs) if (PHYSR0 & PHYSR0_SPDG) status |= VELOCITY_SPEED_1000; - else if (PHYSR0 & PHYSR0_SPD10) + if (PHYSR0 & PHYSR0_SPD10) status |= VELOCITY_SPEED_10; else status |= VELOCITY_SPEED_100; @@ -2823,7 +2827,7 @@ static void enable_flow_control_ability(struct velocity_info *vptr) static int velocity_ethtool_up(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; if (!netif_running(dev)) pci_set_power_state(vptr->pdev, PCI_D0); return 0; @@ -2839,29 +2843,20 @@ static int velocity_ethtool_up(struct net_device *dev) static void velocity_ethtool_down(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; if (!netif_running(dev)) pci_set_power_state(vptr->pdev, PCI_D3hot); } static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; struct mac_regs __iomem * regs = vptr->mac_regs; u32 status; status = check_connection_type(vptr->mac_regs); - cmd->supported = SUPPORTED_TP | - SUPPORTED_Autoneg | - SUPPORTED_10baseT_Half | - SUPPORTED_10baseT_Full | - SUPPORTED_100baseT_Half | - SUPPORTED_100baseT_Full | - SUPPORTED_1000baseT_Half | - SUPPORTED_1000baseT_Full; - if (status & VELOCITY_SPEED_1000) - cmd->speed = SPEED_1000; - else if (status & VELOCITY_SPEED_100) + cmd->supported = SUPPORTED_TP | SUPPORTED_Autoneg | SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full; + if (status & VELOCITY_SPEED_100) cmd->speed = SPEED_100; else cmd->speed = SPEED_10; @@ -2880,7 +2875,7 @@ static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; u32 curr_status; u32 new_status = 0; int ret = 0; @@ -2903,14 +2898,14 @@ static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd static u32 velocity_get_link(struct net_device *dev) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; struct mac_regs __iomem * regs = vptr->mac_regs; - return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, ®s->PHYSR0) ? 1 : 0; + return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, ®s->PHYSR0) ? 0 : 1; } static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; strcpy(info->driver, VELOCITY_NAME); strcpy(info->version, VELOCITY_VERSION); strcpy(info->bus_info, pci_name(vptr->pdev)); @@ -2918,7 +2913,7 @@ static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; wol->supported = WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP; wol->wolopts |= WAKE_MAGIC; /* @@ -2934,7 +2929,7 @@ static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_woli static int velocity_ethtool_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; if (!(wol->wolopts & (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP))) return -EFAULT; @@ -2999,7 +2994,7 @@ static struct ethtool_ops velocity_ethtool_ops = { static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct velocity_info *vptr = netdev_priv(dev); + struct velocity_info *vptr = dev->priv; struct mac_regs __iomem * regs = vptr->mac_regs; unsigned long flags; struct mii_ioctl_data *miidata = if_mii(ifr); diff --git a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h index 496c3d597..d9a774b91 100644 --- a/drivers/net/via-velocity.h +++ b/drivers/net/via-velocity.h @@ -31,8 +31,6 @@ #define VELOCITY_FULL_DRV_NAM "VIA Networking Velocity Family Gigabit Ethernet Adapter Driver" #define VELOCITY_VERSION "1.13" -#define VELOCITY_IO_SIZE 256 - #define PKT_BUF_SZ 1540 #define MAX_UNITS 8 @@ -309,7 +307,7 @@ enum velocity_owner { #define TX_QUEUE_NO 4 #define MAX_HW_MIB_COUNTER 32 -#define VELOCITY_MIN_MTU (64) +#define VELOCITY_MIN_MTU (1514-14) #define VELOCITY_MAX_MTU (9000) /* @@ -1193,6 +1191,7 @@ enum chip_type { struct velocity_info_tbl { enum chip_type chip_id; char *name; + int io_size; int txqueue; u32 flags; }; @@ -1752,6 +1751,7 @@ struct velocity_info { struct mac_regs __iomem * mac_regs; unsigned long memaddr; unsigned long ioaddr; + u32 io_size; u8 rev_id; diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index 54b8e492e..b5328b0ff 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig @@ -134,6 +134,18 @@ config SEALEVEL_4021 The driver will be compiled as a module: the module will be called sealevel. +config SYNCLINK_SYNCPPP + tristate "SyncLink HDLC/SYNCPPP support" + depends on WAN + help + Enables HDLC/SYNCPPP support for the SyncLink WAN driver. + + Normally the SyncLink WAN driver works with the main PPP driver + and pppd program. + HDLC/SYNCPPP support allows use of the Cisco HDLC/PPP driver + . The SyncLink WAN driver (in + character devices) must also be enabled. + # Generic HDLC config HDLC tristate "Generic HDLC layer" diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 316ca6869..823c6d5ab 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_COSA) += syncppp.o cosa.o obj-$(CONFIG_FARSYNC) += syncppp.o farsync.o obj-$(CONFIG_DSCC4) += dscc4.o obj-$(CONFIG_LANMEDIA) += syncppp.o +obj-$(CONFIG_SYNCLINK_SYNCPPP) += syncppp.o obj-$(CONFIG_X25_ASY) += x25_asy.o obj-$(CONFIG_LANMEDIA) += lmc/ diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 6b63b350c..43d854ace 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c @@ -7,7 +7,7 @@ * under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * - * For information see + * For information see http://hq.pm.waw.pl/hdlc/ * * Sources of information: * Hitachi HD64570 SCA User's Manual @@ -116,34 +116,27 @@ static inline void openwin(card_t *card, u8 page) #include "hd6457x.c" -static inline void set_carrier(port_t *port) -{ - if (!(sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD)) - netif_carrier_on(port_to_dev(port)); - else - netif_carrier_off(port_to_dev(port)); -} - - static void sca_msci_intr(port_t *port) { - u8 stat = sca_in(MSCI0_OFFSET + ST1, port); /* read MSCI ST1 status */ + struct net_device *dev = port_to_dev(port); + card_t* card = port_to_card(port); + u8 stat = sca_in(MSCI1_OFFSET + ST1, card); /* read MSCI ST1 status */ - /* Reset MSCI TX underrun and CDCD (ignored) status bit */ - sca_out(stat & (ST1_UDRN | ST1_CDCD), MSCI0_OFFSET + ST1, port); + /* Reset MSCI TX underrun status bit */ + sca_out(stat & ST1_UDRN, MSCI0_OFFSET + ST1, card); if (stat & ST1_UDRN) { - struct net_device_stats *stats = hdlc_stats(port_to_dev(port)); + struct net_device_stats *stats = hdlc_stats(dev); stats->tx_errors++; /* TX Underrun error detected */ stats->tx_fifo_errors++; } - stat = sca_in(MSCI1_OFFSET + ST1, port); /* read MSCI1 ST1 status */ /* Reset MSCI CDCD status bit - uses ch#2 DCD input */ - sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, port); + sca_out(stat & ST1_CDCD, MSCI1_OFFSET + ST1, card); if (stat & ST1_CDCD) - set_carrier(port); + hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, card) & ST3_DCD), + dev); } @@ -197,7 +190,8 @@ static int c101_open(struct net_device *dev) sca_out(IE1_UDRN, MSCI0_OFFSET + IE1, port); sca_out(IE0_TXINT, MSCI0_OFFSET + IE0, port); - set_carrier(port); + hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, port) & ST3_DCD), dev); + printk(KERN_DEBUG "0x%X\n", sca_in(MSCI1_OFFSET + ST3, port)); /* enable MSCI1 CDCD interrupt */ sca_out(IE1_CDCD, MSCI1_OFFSET + IE1, port); @@ -332,21 +326,21 @@ static int __init c101_run(unsigned long irq, unsigned long winbase) if (request_irq(irq, sca_intr, 0, devname, card)) { printk(KERN_ERR "c101: could not allocate IRQ\n"); c101_destroy_card(card); - return -EBUSY; + return(-EBUSY); } card->irq = irq; if (!request_mem_region(winbase, C101_MAPPED_RAM_SIZE, devname)) { printk(KERN_ERR "c101: could not request RAM window\n"); c101_destroy_card(card); - return -EBUSY; + return(-EBUSY); } card->phy_winbase = winbase; card->win0base = ioremap(winbase, C101_MAPPED_RAM_SIZE); if (!card->win0base) { printk(KERN_ERR "c101: could not map I/O address\n"); c101_destroy_card(card); - return -EFAULT; + return -EBUSY; } card->tx_ring_buffers = TX_RING_BUFFERS; @@ -384,7 +378,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase) } sca_init_sync_port(card); /* Set up C101 memory */ - set_carrier(card); + hdlc_set_carrier(!(sca_in(MSCI1_OFFSET + ST3, card) & ST3_DCD), dev); printk(KERN_INFO "%s: Moxa C101 on IRQ%u," " using %u TX + %u RX packets rings\n", @@ -449,5 +443,4 @@ module_exit(c101_cleanup); MODULE_AUTHOR("Krzysztof Halasa "); MODULE_DESCRIPTION("Moxa C101 serial port driver"); MODULE_LICENSE("GPL v2"); -module_param(hw, charp, 0444); -MODULE_PARM_DESC(hw, "irq,ram:irq,..."); +module_param(hw, charp, 0444); /* hw=irq,ram:irq,... */ diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 1f95b4864..e392ee8b3 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -79,11 +79,13 @@ /* ---------- Headers, macros, data structures ---------- */ +#include #include #include #include #include #include +#include #include #include #include @@ -391,6 +393,7 @@ static int __init cosa_init(void) err = -ENODEV; goto out; } + devfs_mk_dir("cosa"); cosa_class = class_create(THIS_MODULE, "cosa"); if (IS_ERR(cosa_class)) { err = PTR_ERR(cosa_class); @@ -399,6 +402,13 @@ static int __init cosa_init(void) for (i=0; inchannels; i++) { diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c index a5e7ce1bd..430b1f630 100644 --- a/drivers/net/wan/cycx_main.c +++ b/drivers/net/wan/cycx_main.c @@ -40,6 +40,7 @@ * 1998/08/08 acme Initial version. */ +#include /* OS configuration options */ #include /* offsetof(), etc. */ #include /* return codes */ #include /* inline memset(), etc. */ diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 736987559..6e1ec5bf2 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -28,6 +28,7 @@ * 2 of the License, or (at your option) any later version. */ +#include /* for CONFIG_DLCI_COUNT */ #include #include #include diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 684af4316..4505540e3 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -732,15 +732,15 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev, ioaddr = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if (!ioaddr) { - printk(KERN_ERR "%s: cannot remap MMIO region %llx @ %llx\n", - DRV_NAME, (unsigned long long)pci_resource_len(pdev, 0), - (unsigned long long)pci_resource_start(pdev, 0)); + printk(KERN_ERR "%s: cannot remap MMIO region %lx @ %lx\n", + DRV_NAME, pci_resource_len(pdev, 0), + pci_resource_start(pdev, 0)); rc = -EIO; goto err_free_mmio_regions_2; } - printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#llx (regs), %#llx (lbi), IRQ %d\n", - (unsigned long long)pci_resource_start(pdev, 0), - (unsigned long long)pci_resource_start(pdev, 1), pdev->irq); + printk(KERN_DEBUG "Siemens DSCC4, MMIO at %#lx (regs), %#lx (lbi), IRQ %d\n", + pci_resource_start(pdev, 0), + pci_resource_start(pdev, 1), pdev->irq); /* Cf errata DS5 p.2 */ pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xf8); @@ -752,7 +752,7 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev, priv = pci_get_drvdata(pdev); - rc = request_irq(pdev->irq, dscc4_irq, IRQF_SHARED, DRV_NAME, priv->root); + rc = request_irq(pdev->irq, dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root); if (rc < 0) { printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq); goto err_release_4; diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 3705db04a..7981a2c79 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -2519,7 +2519,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) dbg(DBG_PCI, "kernel mem %p, ctlmem %p\n", card->mem, card->ctlmem); /* Register the interrupt handler */ - if (request_irq(pdev->irq, fst_intr, IRQF_SHARED, FST_DEV_NAME, card)) { + if (request_irq(pdev->irq, fst_intr, SA_SHIRQ, FST_DEV_NAME, card)) { printk_err("Unable to register interrupt %d\n", card->irq); pci_release_regions(pdev); pci_disable_device(pdev); diff --git a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c index dce2bb317..d3743321a 100644 --- a/drivers/net/wan/hd6457x.c +++ b/drivers/net/wan/hd6457x.c @@ -168,23 +168,6 @@ static inline u32 buffer_offset(port_t *port, u16 desc, int transmit) } -static inline void sca_set_carrier(port_t *port) -{ - if (!(sca_in(get_msci(port) + ST3, port_to_card(port)) & ST3_DCD)) { -#ifdef DEBUG_LINK - printk(KERN_DEBUG "%s: sca_set_carrier on\n", - port_to_dev(port)->name); -#endif - netif_carrier_on(port_to_dev(port)); - } else { -#ifdef DEBUG_LINK - printk(KERN_DEBUG "%s: sca_set_carrier off\n", - port_to_dev(port)->name); -#endif - netif_carrier_off(port_to_dev(port)); - } -} - static void sca_init_sync_port(port_t *port) { @@ -254,7 +237,9 @@ static void sca_init_sync_port(port_t *port) sca_out(DIR_BOFE, DIR_TX(phy_node(port)), card); } } - sca_set_carrier(port); + + hdlc_set_carrier(!(sca_in(get_msci(port) + ST3, card) & ST3_DCD), + port_to_dev(port)); } @@ -277,7 +262,8 @@ static inline void sca_msci_intr(port_t *port) } if (stat & ST1_CDCD) - sca_set_carrier(port); + hdlc_set_carrier(!(sca_in(msci + ST3, card) & ST3_DCD), + port_to_dev(port)); } #endif @@ -580,7 +566,7 @@ static void sca_open(struct net_device *dev) - all DMA interrupts */ - sca_set_carrier(port); + hdlc_set_carrier(!(sca_in(msci + ST3, card) & ST3_DCD), dev); #ifdef __HD64570_H /* MSCI TX INT and RX INT A IRQ enable */ diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index f289daba0..1fd04662c 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c @@ -192,7 +192,9 @@ static int cisco_rx(struct sk_buff *skb) "uptime %ud%uh%um%us)\n", dev->name, days, hrs, min, sec); - netif_dormant_off(dev); +#if 0 + netif_carrier_on(dev); +#endif hdlc->state.cisco.up = 1; } } @@ -225,7 +227,9 @@ static void cisco_timer(unsigned long arg) hdlc->state.cisco.settings.timeout * HZ)) { hdlc->state.cisco.up = 0; printk(KERN_INFO "%s: Link down\n", dev->name); - netif_dormant_on(dev); +#if 0 + netif_carrier_off(dev); +#endif } cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, @@ -261,7 +265,10 @@ static void cisco_stop(struct net_device *dev) { hdlc_device *hdlc = dev_to_hdlc(dev); del_timer_sync(&hdlc->state.cisco.timer); - netif_dormant_on(dev); +#if 0 + if (netif_carrier_ok(dev)) + netif_carrier_off(dev); +#endif hdlc->state.cisco.up = 0; hdlc->state.cisco.request_sent = 0; } @@ -321,7 +328,6 @@ int hdlc_cisco_ioctl(struct net_device *dev, struct ifreq *ifr) dev->type = ARPHRD_CISCO; dev->flags = IFF_POINTOPOINT | IFF_NOARP; dev->addr_len = 0; - netif_dormant_on(dev); return 0; } diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 7bb737bbd..523afe175 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -301,7 +301,7 @@ static int pvc_open(struct net_device *dev) if (pvc->open_count++ == 0) { hdlc_device *hdlc = dev_to_hdlc(pvc->master); if (hdlc->state.fr.settings.lmi == LMI_NONE) - pvc->state.active = netif_carrier_ok(pvc->master); + pvc->state.active = hdlc->carrier; pvc_carrier(pvc->state.active, pvc); hdlc->state.fr.dce_changed = 1; @@ -545,7 +545,11 @@ static void fr_set_link_state(int reliable, struct net_device *dev) hdlc->state.fr.reliable = reliable; if (reliable) { - netif_dormant_off(dev); +#if 0 + if (!netif_carrier_ok(dev)) + netif_carrier_on(dev); +#endif + hdlc->state.fr.n391cnt = 0; /* Request full status */ hdlc->state.fr.dce_changed = 1; @@ -558,7 +562,11 @@ static void fr_set_link_state(int reliable, struct net_device *dev) } } } else { - netif_dormant_on(dev); +#if 0 + if (netif_carrier_ok(dev)) + netif_carrier_off(dev); +#endif + while (pvc) { /* Deactivate all PVCs */ pvc_carrier(0, pvc); pvc->state.exist = pvc->state.active = 0; diff --git a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c index 04ca1f7b6..46cef8f92 100644 --- a/drivers/net/wan/hdlc_generic.c +++ b/drivers/net/wan/hdlc_generic.c @@ -22,6 +22,7 @@ * - proto.start() and stop() are called with spin_lock_irq held. */ +#include #include #include #include @@ -34,11 +35,10 @@ #include #include #include -#include #include -static const char* version = "HDLC support module revision 1.19"; +static const char* version = "HDLC support module revision 1.18"; #undef DEBUG_LINK @@ -74,51 +74,57 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev, -static inline void hdlc_proto_start(struct net_device *dev) +static void __hdlc_set_carrier_on(struct net_device *dev) { hdlc_device *hdlc = dev_to_hdlc(dev); if (hdlc->proto.start) return hdlc->proto.start(dev); +#if 0 +#ifdef DEBUG_LINK + if (netif_carrier_ok(dev)) + printk(KERN_ERR "hdlc_set_carrier_on(): already on\n"); +#endif + netif_carrier_on(dev); +#endif } -static inline void hdlc_proto_stop(struct net_device *dev) +static void __hdlc_set_carrier_off(struct net_device *dev) { hdlc_device *hdlc = dev_to_hdlc(dev); if (hdlc->proto.stop) return hdlc->proto.stop(dev); + +#if 0 +#ifdef DEBUG_LINK + if (!netif_carrier_ok(dev)) + printk(KERN_ERR "hdlc_set_carrier_off(): already off\n"); +#endif + netif_carrier_off(dev); +#endif } -static int hdlc_device_event(struct notifier_block *this, unsigned long event, - void *ptr) +void hdlc_set_carrier(int on, struct net_device *dev) { - struct net_device *dev = ptr; - hdlc_device *hdlc; + hdlc_device *hdlc = dev_to_hdlc(dev); unsigned long flags; - int on; - - if (dev->get_stats != hdlc_get_stats) - return NOTIFY_DONE; /* not an HDLC device */ - - if (event != NETDEV_CHANGE) - return NOTIFY_DONE; /* Only interrested in carrier changes */ - - on = netif_carrier_ok(dev); + on = on ? 1 : 0; #ifdef DEBUG_LINK - printk(KERN_DEBUG "%s: hdlc_device_event NETDEV_CHANGE, carrier %i\n", - dev->name, on); + printk(KERN_DEBUG "hdlc_set_carrier %i\n", on); #endif - hdlc = dev_to_hdlc(dev); spin_lock_irqsave(&hdlc->state_lock, flags); if (hdlc->carrier == on) goto carrier_exit; /* no change in DCD line level */ +#ifdef DEBUG_LINK + printk(KERN_INFO "%s: carrier %s\n", dev->name, on ? "ON" : "off"); +#endif hdlc->carrier = on; if (!hdlc->open) @@ -126,15 +132,14 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event, if (hdlc->carrier) { printk(KERN_INFO "%s: Carrier detected\n", dev->name); - hdlc_proto_start(dev); + __hdlc_set_carrier_on(dev); } else { printk(KERN_INFO "%s: Carrier lost\n", dev->name); - hdlc_proto_stop(dev); + __hdlc_set_carrier_off(dev); } carrier_exit: spin_unlock_irqrestore(&hdlc->state_lock, flags); - return NOTIFY_DONE; } @@ -161,7 +166,7 @@ int hdlc_open(struct net_device *dev) if (hdlc->carrier) { printk(KERN_INFO "%s: Carrier detected\n", dev->name); - hdlc_proto_start(dev); + __hdlc_set_carrier_on(dev); } else printk(KERN_INFO "%s: No carrier\n", dev->name); @@ -186,7 +191,7 @@ void hdlc_close(struct net_device *dev) hdlc->open = 0; if (hdlc->carrier) - hdlc_proto_stop(dev); + __hdlc_set_carrier_off(dev); spin_unlock_irq(&hdlc->state_lock); @@ -254,7 +259,7 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } } -void hdlc_setup(struct net_device *dev) +static void hdlc_setup(struct net_device *dev) { hdlc_device *hdlc = dev_to_hdlc(dev); @@ -283,6 +288,26 @@ struct net_device *alloc_hdlcdev(void *priv) return dev; } +int register_hdlc_device(struct net_device *dev) +{ + int result = dev_alloc_name(dev, "hdlc%d"); + if (result < 0) + return result; + + result = register_netdev(dev); + if (result != 0) + return -EIO; + +#if 0 + if (netif_carrier_ok(dev)) + netif_carrier_off(dev); /* no carrier until DCD goes up */ +#endif + + return 0; +} + + + void unregister_hdlc_device(struct net_device *dev) { rtnl_lock(); @@ -299,9 +324,10 @@ MODULE_LICENSE("GPL v2"); EXPORT_SYMBOL(hdlc_open); EXPORT_SYMBOL(hdlc_close); +EXPORT_SYMBOL(hdlc_set_carrier); EXPORT_SYMBOL(hdlc_ioctl); -EXPORT_SYMBOL(hdlc_setup); EXPORT_SYMBOL(alloc_hdlcdev); +EXPORT_SYMBOL(register_hdlc_device); EXPORT_SYMBOL(unregister_hdlc_device); static struct packet_type hdlc_packet_type = { @@ -310,18 +336,9 @@ static struct packet_type hdlc_packet_type = { }; -static struct notifier_block hdlc_notifier = { - .notifier_call = hdlc_device_event, -}; - - static int __init hdlc_module_init(void) { - int result; - printk(KERN_INFO "%s\n", version); - if ((result = register_netdevice_notifier(&hdlc_notifier)) != 0) - return result; dev_add_pack(&hdlc_packet_type); return 0; } @@ -331,7 +348,6 @@ static int __init hdlc_module_init(void) static void __exit hdlc_module_exit(void) { dev_remove_pack(&hdlc_packet_type); - unregister_netdevice_notifier(&hdlc_notifier); } diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index fbaab5bf7..b81263eae 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -107,7 +107,6 @@ int hdlc_ppp_ioctl(struct net_device *dev, struct ifreq *ifr) dev->hard_header = NULL; dev->type = ARPHRD_PPP; dev->addr_len = 0; - netif_dormant_off(dev); return 0; } diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index f15aa6ba7..9456d31cb 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c @@ -82,7 +82,6 @@ int hdlc_raw_ioctl(struct net_device *dev, struct ifreq *ifr) dev->type = ARPHRD_RAWHDLC; dev->flags = IFF_POINTOPOINT | IFF_NOARP; dev->addr_len = 0; - netif_dormant_off(dev); return 0; } diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index d1884987f..b1285cc8f 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c @@ -100,7 +100,6 @@ int hdlc_raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) dev->tx_queue_len = old_qlen; memcpy(dev->dev_addr, "\x00\x01", 2); get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2); - netif_dormant_off(dev); return 0; } diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index a867fb411..07e5eef1f 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c @@ -212,7 +212,6 @@ int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr) dev->hard_header = NULL; dev->type = ARPHRD_X25; dev->addr_len = 0; - netif_dormant_off(dev); return 0; } diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index a4f735723..cf5c80545 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c @@ -264,7 +264,7 @@ static struct sv11_device *sv11_init(int iobase, int irq) /* We want a fast IRQ for this device. Actually we'd like an even faster IRQ ;) - This is one driver RtLinux is made for */ - if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "Hostess SV11", dev)<0) + if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "Hostess SV11", dev)<0) { printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq); goto fail1; diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 39f44241a..40926d779 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -1058,7 +1058,7 @@ static int lmc_open (struct net_device *dev) /*fold00*/ lmc_softreset (sc); /* Since we have to use PCI bus, this should work on x86,alpha,ppc */ - if (request_irq (dev->irq, &lmc_interrupt, IRQF_SHARED, dev->name, dev)){ + if (request_irq (dev->irq, &lmc_interrupt, SA_SHIRQ, dev->name, dev)){ printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq); lmc_trace(dev, "lmc_open irq failed out"); return -EAGAIN; diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c index ae01555d2..af8b55fdd 100644 --- a/drivers/net/wan/lmc/lmc_media.c +++ b/drivers/net/wan/lmc/lmc_media.c @@ -1,5 +1,6 @@ /* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */ +#include #include #include #include diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index dcf46add3..cd32751b6 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c @@ -7,7 +7,7 @@ * under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * - * For information see + * For information see http://hq.pm.waw.pl/hdlc/ * * Note: integrated CSU/DSU/DDS are not supported by this driver * @@ -387,11 +387,6 @@ static int __init n2_run(unsigned long io, unsigned long irq, } card->phy_winbase = winbase; card->winbase = ioremap(winbase, USE_WINDOWSIZE); - if (!card->winbase) { - printk(KERN_ERR "n2: ioremap() failed\n"); - n2_destroy_card(card); - return -EFAULT; - } outb(0, io + N2_PCR); outb(winbase >> 12, io + N2_BAR); @@ -564,5 +559,4 @@ module_exit(n2_cleanup); MODULE_AUTHOR("Krzysztof Halasa "); MODULE_DESCRIPTION("RISCom/N2 serial port driver"); MODULE_LICENSE("GPL v2"); -module_param(hw, charp, 0444); -MODULE_PARM_DESC(hw, "io,irq,ram,ports:io,irq,..."); +module_param(hw, charp, 0444); /* hw=io,irq,ram,ports:io,irq,... */ diff --git a/drivers/net/wan/pc300.h b/drivers/net/wan/pc300.h index 63e9fcf31..2024b26b9 100644 --- a/drivers/net/wan/pc300.h +++ b/drivers/net/wan/pc300.h @@ -100,7 +100,6 @@ #define _PC300_H #include -#include #include "hd64572.h" #include "pc300-falc-lh.h" diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 567effff4..a3e65d1bc 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c @@ -3445,9 +3445,9 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) card = (pc300_t *) kmalloc(sizeof(pc300_t), GFP_KERNEL); if (card == NULL) { - printk("PC300 found at RAM 0x%016llx, " + printk("PC300 found at RAM 0x%08lx, " "but could not allocate card structure.\n", - (unsigned long long)pci_resource_start(pdev, 3)); + pci_resource_start(pdev, 3)); err = -ENOMEM; goto err_disable_dev; } @@ -3600,7 +3600,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } /* Allocate IRQ */ - if (request_irq(card->hw.irq, cpc_intr, IRQF_SHARED, "Cyclades-PC300", card)) { + if (request_irq(card->hw.irq, cpc_intr, SA_SHIRQ, "Cyclades-PC300", card)) { printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", card->hw.ramphys, card->hw.irq); goto err_io_unmap; diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 4df61fa32..eba8e5cfa 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c @@ -7,7 +7,7 @@ * under the terms of version 2 of the GNU General Public License * as published by the Free Software Foundation. * - * For information see + * For information see http://hq.pm.waw.pl/hdlc/ * * Sources of information: * Hitachi HD64572 SCA-II User's Manual @@ -50,6 +50,10 @@ static const char* devname = "PCI200SYN"; static int pci_clock_freq = 33000000; #define CLOCK_BASE pci_clock_freq +#define PCI_VENDOR_ID_GORAMO 0x10B5 /* uses PLX:9050 ID - this card */ +#define PCI_DEVICE_ID_PCI200SYN 0x9050 /* doesn't have its own ID */ + + /* * PLX PCI9052 local configuration and shared runtime registers. * This structure can be used to access 9052 registers (memory mapped). @@ -258,7 +262,7 @@ static void pci200_pci_remove_one(struct pci_dev *pdev) int i; card_t *card = pci_get_drvdata(pdev); - for (i = 0; i < 2; i++) + for(i = 0; i < 2; i++) if (card->ports[i].card) { struct net_device *dev = port_to_dev(&card->ports[i]); unregister_hdlc_device(dev); @@ -354,7 +358,6 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, card->rambase == NULL) { printk(KERN_ERR "pci200syn: ioremap() failed\n"); pci200_pci_remove_one(pdev); - return -EFAULT; } /* Reset PLX */ @@ -382,15 +385,6 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, " %u RX packets rings\n", ramsize / 1024, ramphys, pdev->irq, card->tx_ring_buffers, card->rx_ring_buffers); - if (pdev->subsystem_device == PCI_DEVICE_ID_PLX_9050) { - printk(KERN_ERR "Detected PCI200SYN card with old " - "configuration data.\n"); - printk(KERN_ERR "See for update.\n"); - printk(KERN_ERR "The card will stop working with" - " future versions of Linux if not updated.\n"); - } - if (card->tx_ring_buffers < 1) { printk(KERN_ERR "pci200syn: RAM test failed\n"); pci200_pci_remove_one(pdev); @@ -402,7 +396,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, writew(readw(p) | 0x0040, p); /* Allocate IRQ */ - if (request_irq(pdev->irq, sca_intr, IRQF_SHARED, devname, card)) { + if(request_irq(pdev->irq, sca_intr, SA_SHIRQ, devname, card)) { printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", pdev->irq); pci200_pci_remove_one(pdev); @@ -412,7 +406,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, sca_init(card, 0); - for (i = 0; i < 2; i++) { + for(i = 0; i < 2; i++) { port_t *port = &card->ports[i]; struct net_device *dev = port_to_dev(port); hdlc_device *hdlc = dev_to_hdlc(dev); @@ -431,7 +425,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, hdlc->xmit = sca_xmit; port->settings.clock_type = CLOCK_EXT; port->card = card; - if (register_hdlc_device(dev)) { + if(register_hdlc_device(dev)) { printk(KERN_ERR "pci200syn: unable to register hdlc " "device\n"); port->card = NULL; @@ -451,10 +445,8 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, static struct pci_device_id pci200_pci_tbl[] __devinitdata = { - { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX, - PCI_DEVICE_ID_PLX_9050, 0, 0, 0 }, - { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, PCI_VENDOR_ID_PLX, - PCI_DEVICE_ID_PLX_PCI200SYN, 0, 0, 0 }, + { PCI_VENDOR_ID_GORAMO, PCI_DEVICE_ID_PCI200SYN, PCI_ANY_ID, + PCI_ANY_ID, 0, 0, 0 }, { 0, } }; diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index fc75bec19..175ba13bc 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c @@ -37,6 +37,7 @@ * Known problem: this driver wasn't tested on multiprocessor machine. */ +#include #include #include #include @@ -1192,7 +1193,7 @@ sbni_open( struct net_device *dev ) } } - if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) { + if( request_irq(dev->irq, sbni_interrupt, SA_SHIRQ, dev->name, dev) ) { printk( KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq ); return -EAGAIN; diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 0ba018f83..22e794071 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c @@ -32,6 +32,7 @@ * 2 of the License, or (at your option) any later version. */ +#include /* for CONFIG_DLCI_MAX */ #include #include #include @@ -59,9 +60,9 @@ static const char* version = "SDLA driver v0.30, 12 Sep 1996, mike.mclagan@linux.org"; -static unsigned int valid_port[] = { 0x250, 0x270, 0x280, 0x300, 0x350, 0x360, 0x380, 0x390}; +static unsigned int valid_port[] __initdata = { 0x250, 0x270, 0x280, 0x300, 0x350, 0x360, 0x380, 0x390}; -static unsigned int valid_mem[] = { +static unsigned int valid_mem[] __initdata = { 0xA0000, 0xA2000, 0xA4000, 0xA6000, 0xA8000, 0xAA000, 0xAC000, 0xAE000, 0xB0000, 0xB2000, 0xB4000, 0xB6000, 0xB8000, 0xBA000, 0xBC000, 0xBE000, 0xC0000, 0xC2000, 0xC4000, 0xC6000, 0xC8000, 0xCA000, 0xCC000, 0xCE000, diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 70fb1b98b..050e854e7 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -322,7 +322,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, /* We want a fast IRQ for this device. Actually we'd like an even faster IRQ ;) - This is one driver RtLinux is made for */ - if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "SeaLevel", dev)<0) + if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "SeaLevel", dev)<0) { printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq); goto fail1_1; diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c index c13b459a0..2d1bba06a 100644 --- a/drivers/net/wan/syncppp.c +++ b/drivers/net/wan/syncppp.c @@ -37,6 +37,7 @@ */ #undef DEBUG +#include #include #include #include diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index b2031dfc4..29a756dd9 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -149,10 +149,7 @@ static inline void wanxl_cable_intr(port_t *port) printk(KERN_INFO "%s: %s%s module, %s cable%s%s\n", port->dev->name, pm, dte, cable, dsr, dcd); - if (value & STATUS_CABLE_DCD) - netif_carrier_on(port->dev); - else - netif_carrier_off(port->dev); + hdlc_set_carrier(value & STATUS_CABLE_DCD, port->dev); } @@ -637,13 +634,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, /* set up PLX mapping */ plx_phy = pci_resource_start(pdev, 0); - card->plx = ioremap_nocache(plx_phy, 0x70); - if (!card->plx) { - printk(KERN_ERR "wanxl: ioremap() failed\n"); - wanxl_pci_remove_one(pdev); - return -EFAULT; - } #if RESET_WHILE_LOADING wanxl_reset(card); @@ -709,12 +700,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, } mem = ioremap_nocache(mem_phy, PDM_OFFSET + sizeof(firmware)); - if (!mem) { - printk(KERN_ERR "wanxl: ioremap() failed\n"); - wanxl_pci_remove_one(pdev); - return -EFAULT; - } - for (i = 0; i < sizeof(firmware); i += 4) writel(htonl(*(u32*)(firmware + i)), mem + PDM_OFFSET + i); @@ -758,7 +743,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); /* Allocate IRQ */ - if (request_irq(pdev->irq, wanxl_intr, IRQF_SHARED, "wanXL", card)) { + if (request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", pci_name(pdev), pdev->irq); wanxl_pci_remove_one(pdev); diff --git a/drivers/net/wd.c b/drivers/net/wd.c index b1ba1872f..7caa8dc88 100644 --- a/drivers/net/wd.c +++ b/drivers/net/wd.c @@ -500,8 +500,8 @@ MODULE_LICENSE("GPL"); /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ - -int __init init_module(void) +int +init_module(void) { struct net_device *dev; int this_dev, found = 0; diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 2e8ac995d..ec37df734 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -235,35 +235,7 @@ config IPW2200_MONITOR promiscuous mode via the Wireless Tool's Monitor mode. While in this mode, no packets can be sent. -config IPW2200_RADIOTAP - bool "Enable radiotap format 802.11 raw packet support" - depends on IPW2200_MONITOR - -config IPW2200_PROMISCUOUS - bool "Enable creation of a RF radiotap promiscuous interface" - depends on IPW2200_MONITOR - select IPW2200_RADIOTAP - ---help--- - Enables the creation of a second interface prefixed 'rtap'. - This second interface will provide every received in radiotap - format. - - This is useful for performing wireless network analysis while - maintaining an active association. - - Example usage: - - % modprobe ipw2200 rtap_iface=1 - % ifconfig rtap0 up - % tethereal -i rtap0 - - If you do not specify 'rtap_iface=1' as a module parameter then - the rtap interface will not be created and you will need to turn - it on via sysfs: - - % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface - -config IPW2200_QOS +config IPW_QOS bool "Enable QoS support" depends on IPW2200 && EXPERIMENTAL @@ -291,6 +263,15 @@ config IPW2200_DEBUG If you are not trying to debug or develop the IPW2200 driver, you most likely want to say N here. +config IPW2200_MONITOR + bool "Enable promiscuous mode" + depends on IPW2200 + ---help--- + Enables promiscuous/monitor mode support for the ipw2200 driver. + With this feature compiled into the driver, you can switch to + promiscuous mode via the Wireless Tool's Monitor mode. While in this + mode, no packets can be sent. + config AIRO tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) @@ -447,7 +428,6 @@ config AIRO_CS tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) select CRYPTO - select CRYPTO_AES ---help--- This is the standard Linux driver to support Cisco/Aironet PCMCIA 802.11 wireless cards. This driver is the same as the Aironet @@ -532,26 +512,8 @@ config PRISM54 say M here and read . The module will be called prism54.ko. -config USB_ZD1201 - tristate "USB ZD1201 based Wireless device support" - depends on USB && NET_RADIO - select FW_LOADER - ---help--- - Say Y if you want to use wireless LAN adapters based on the ZyDAS - ZD1201 chip. - - This driver makes the adapter appear as a normal Ethernet interface, - typically on wlan0. - - The zd1201 device requires external firmware to be loaded. - This can be found at http://linux-lc100020.sourceforge.net/ - - To compile this driver as a module, choose M here: the - module will be called zd1201. - source "drivers/net/wireless/hostap/Kconfig" source "drivers/net/wireless/bcm43xx/Kconfig" -source "drivers/net/wireless/zd1211rw/Kconfig" # yes, this works even when no drivers are selected config NET_WIRELESS diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile index c613af17a..c86779879 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -36,10 +36,7 @@ obj-$(CONFIG_PRISM54) += prism54/ obj-$(CONFIG_HOSTAP) += hostap/ obj-$(CONFIG_BCM43XX) += bcm43xx/ -obj-$(CONFIG_ZD1211RW) += zd1211rw/ # 16-bit wireless PCMCIA client drivers obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o - -obj-$(CONFIG_USB_ZD1201) += zd1201.o diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index a4dd13942..00764ddd7 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -19,6 +19,7 @@ ======================================================================*/ +#include #include #include @@ -46,7 +47,6 @@ #include #include #include -#include #include "airo.h" @@ -467,8 +467,6 @@ static int do8bitIO = 0; #define RID_ECHOTEST_RESULTS 0xFF71 #define RID_BSSLISTFIRST 0xFF72 #define RID_BSSLISTNEXT 0xFF73 -#define RID_WPA_BSSLISTFIRST 0xFF74 -#define RID_WPA_BSSLISTNEXT 0xFF75 typedef struct { u16 cmd; @@ -741,14 +739,6 @@ typedef struct { u16 extSoftCap; } CapabilityRid; - -/* Only present on firmware >= 5.30.17 */ -typedef struct { - u16 unknown[4]; - u8 fixed[12]; /* WLAN management frame */ - u8 iep[624]; -} BSSListRidExtra; - typedef struct { u16 len; u16 index; /* First is 0 and 0xffff means end of list */ @@ -777,9 +767,6 @@ typedef struct { } fh; u16 dsChannel; u16 atimWindow; - - /* Only present on firmware >= 5.30.17 */ - BSSListRidExtra extra; } BSSListRid; typedef struct { @@ -1153,6 +1140,8 @@ struct airo_info { char defindex; // Used with auto wep struct proc_dir_entry *proc_entry; spinlock_t aux_lock; + unsigned long flags; +#define FLAG_PROMISC 8 /* IFF_PROMISC 0x100 - include/linux/if.h */ #define FLAG_RADIO_OFF 0 /* User disabling of MAC */ #define FLAG_RADIO_DOWN 1 /* ifup/ifdown disabling of MAC */ #define FLAG_RADIO_MASK 0x03 @@ -1162,7 +1151,6 @@ struct airo_info { #define FLAG_UPDATE_MULTI 5 #define FLAG_UPDATE_UNI 6 #define FLAG_802_11 7 -#define FLAG_PROMISC 8 /* IFF_PROMISC 0x100 - include/linux/if.h */ #define FLAG_PENDING_XMIT 9 #define FLAG_PENDING_XMIT11 10 #define FLAG_MPI 11 @@ -1170,19 +1158,17 @@ struct airo_info { #define FLAG_COMMIT 13 #define FLAG_RESET 14 #define FLAG_FLASHING 15 -#define FLAG_WPA_CAPABLE 16 - unsigned long flags; -#define JOB_DIE 0 -#define JOB_XMIT 1 -#define JOB_XMIT11 2 -#define JOB_STATS 3 -#define JOB_PROMISC 4 -#define JOB_MIC 5 -#define JOB_EVENT 6 -#define JOB_AUTOWEP 7 -#define JOB_WSTATS 8 -#define JOB_SCAN_RESULTS 9 - unsigned long jobs; +#define JOB_MASK 0x2ff0000 +#define JOB_DIE 16 +#define JOB_XMIT 17 +#define JOB_XMIT11 18 +#define JOB_STATS 19 +#define JOB_PROMISC 20 +#define JOB_MIC 21 +#define JOB_EVENT 22 +#define JOB_AUTOWEP 23 +#define JOB_WSTATS 24 +#define JOB_SCAN_RESULTS 25 int (*bap_read)(struct airo_info*, u16 *pu16Dst, int bytelen, int whichbap); unsigned short *flash; @@ -1222,11 +1208,6 @@ struct airo_info { #define PCI_SHARED_LEN 2*MPI_MAX_FIDS*PKTSIZE+RIDSIZE char proc_name[IFNAMSIZ]; - /* WPA-related stuff */ - unsigned int bssListFirst; - unsigned int bssListNext; - unsigned int bssListRidLen; - struct list_head network_list; struct list_head network_free_list; BSSListElement *networks; @@ -1283,7 +1264,7 @@ static void micinit(struct airo_info *ai) { MICRid mic_rid; - clear_bit(JOB_MIC, &ai->jobs); + clear_bit(JOB_MIC, &ai->flags); PC4500_readrid(ai, RID_MIC, &mic_rid, sizeof(mic_rid), 0); up(&ai->sem); @@ -1724,24 +1705,24 @@ static void emmh32_final(emmh32_context *context, u8 digest[4]) static int readBSSListRid(struct airo_info *ai, int first, BSSListRid *list) { int rc; - Cmd cmd; - Resp rsp; + Cmd cmd; + Resp rsp; if (first == 1) { - if (ai->flags & FLAG_RADIO_MASK) return -ENETDOWN; - memset(&cmd, 0, sizeof(cmd)); - cmd.cmd=CMD_LISTBSS; - if (down_interruptible(&ai->sem)) - return -ERESTARTSYS; - issuecommand(ai, &cmd, &rsp); - up(&ai->sem); - /* Let the command take effect */ - ai->task = current; - ssleep(3); - ai->task = NULL; - } - rc = PC4500_readrid(ai, first ? ai->bssListFirst : ai->bssListNext, - list, ai->bssListRidLen, 1); + if (ai->flags & FLAG_RADIO_MASK) return -ENETDOWN; + memset(&cmd, 0, sizeof(cmd)); + cmd.cmd=CMD_LISTBSS; + if (down_interruptible(&ai->sem)) + return -ERESTARTSYS; + issuecommand(ai, &cmd, &rsp); + up(&ai->sem); + /* Let the command take effect */ + ai->task = current; + ssleep(3); + ai->task = NULL; + } + rc = PC4500_readrid(ai, first ? RID_BSSLISTFIRST : RID_BSSLISTNEXT, + list, sizeof(*list), 1); list->len = le16_to_cpu(list->len); list->index = le16_to_cpu(list->index); @@ -2131,7 +2112,7 @@ static void airo_end_xmit(struct net_device *dev) { int fid = priv->xmit.fid; u32 *fids = priv->fids; - clear_bit(JOB_XMIT, &priv->jobs); + clear_bit(JOB_XMIT, &priv->flags); clear_bit(FLAG_PENDING_XMIT, &priv->flags); status = transmit_802_3_packet (priv, fids[fid], skb->data); up(&priv->sem); @@ -2181,7 +2162,7 @@ static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) { if (down_trylock(&priv->sem) != 0) { set_bit(FLAG_PENDING_XMIT, &priv->flags); netif_stop_queue(dev); - set_bit(JOB_XMIT, &priv->jobs); + set_bit(JOB_XMIT, &priv->flags); wake_up_interruptible(&priv->thr_wait); } else airo_end_xmit(dev); @@ -2196,7 +2177,7 @@ static void airo_end_xmit11(struct net_device *dev) { int fid = priv->xmit11.fid; u32 *fids = priv->fids; - clear_bit(JOB_XMIT11, &priv->jobs); + clear_bit(JOB_XMIT11, &priv->flags); clear_bit(FLAG_PENDING_XMIT11, &priv->flags); status = transmit_802_11_packet (priv, fids[fid], skb->data); up(&priv->sem); @@ -2252,7 +2233,7 @@ static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { if (down_trylock(&priv->sem) != 0) { set_bit(FLAG_PENDING_XMIT11, &priv->flags); netif_stop_queue(dev); - set_bit(JOB_XMIT11, &priv->jobs); + set_bit(JOB_XMIT11, &priv->flags); wake_up_interruptible(&priv->thr_wait); } else airo_end_xmit11(dev); @@ -2263,7 +2244,7 @@ static void airo_read_stats(struct airo_info *ai) { StatsRid stats_rid; u32 *vals = stats_rid.vals; - clear_bit(JOB_STATS, &ai->jobs); + clear_bit(JOB_STATS, &ai->flags); if (ai->power.event) { up(&ai->sem); return; @@ -2291,10 +2272,10 @@ static struct net_device_stats *airo_get_stats(struct net_device *dev) { struct airo_info *local = dev->priv; - if (!test_bit(JOB_STATS, &local->jobs)) { + if (!test_bit(JOB_STATS, &local->flags)) { /* Get stats out of the card if available */ if (down_trylock(&local->sem) != 0) { - set_bit(JOB_STATS, &local->jobs); + set_bit(JOB_STATS, &local->flags); wake_up_interruptible(&local->thr_wait); } else airo_read_stats(local); @@ -2309,7 +2290,7 @@ static void airo_set_promisc(struct airo_info *ai) { memset(&cmd, 0, sizeof(cmd)); cmd.cmd=CMD_SETMODE; - clear_bit(JOB_PROMISC, &ai->jobs); + clear_bit(JOB_PROMISC, &ai->flags); cmd.parm0=(ai->flags&IFF_PROMISC) ? PROMISC : NOPROMISC; issuecommand(ai, &cmd, &rsp); up(&ai->sem); @@ -2321,7 +2302,7 @@ static void airo_set_multicast_list(struct net_device *dev) { if ((dev->flags ^ ai->flags) & IFF_PROMISC) { change_bit(FLAG_PROMISC, &ai->flags); if (down_trylock(&ai->sem) != 0) { - set_bit(JOB_PROMISC, &ai->jobs); + set_bit(JOB_PROMISC, &ai->flags); wake_up_interruptible(&ai->thr_wait); } else airo_set_promisc(ai); @@ -2399,7 +2380,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) } clear_bit(FLAG_REGISTERED, &ai->flags); } - set_bit(JOB_DIE, &ai->jobs); + set_bit(JOB_DIE, &ai->flags); kill_proc(ai->thr_pid, SIGTERM, 1); wait_for_completion(&ai->thr_exited); @@ -2720,14 +2701,14 @@ static int reset_card( struct net_device *dev , int lock) { return 0; } -#define AIRO_MAX_NETWORK_COUNT 64 +#define MAX_NETWORK_COUNT 64 static int airo_networks_allocate(struct airo_info *ai) { if (ai->networks) return 0; ai->networks = - kzalloc(AIRO_MAX_NETWORK_COUNT * sizeof(BSSListElement), + kzalloc(MAX_NETWORK_COUNT * sizeof(BSSListElement), GFP_KERNEL); if (!ai->networks) { airo_print_warn(ai->dev->name, "Out of memory allocating beacons"); @@ -2751,33 +2732,11 @@ static void airo_networks_initialize(struct airo_info *ai) INIT_LIST_HEAD(&ai->network_free_list); INIT_LIST_HEAD(&ai->network_list); - for (i = 0; i < AIRO_MAX_NETWORK_COUNT; i++) + for (i = 0; i < MAX_NETWORK_COUNT; i++) list_add_tail(&ai->networks[i].list, &ai->network_free_list); } -static int airo_test_wpa_capable(struct airo_info *ai) -{ - int status; - CapabilityRid cap_rid; - const char *name = ai->dev->name; - - status = readCapabilityRid(ai, &cap_rid, 1); - if (status != SUCCESS) return 0; - - /* Only firmware versions 5.30.17 or better can do WPA */ - if ((cap_rid.softVer > 0x530) - || ((cap_rid.softVer == 0x530) && (cap_rid.softSubVer >= 17))) { - airo_print_info(name, "WPA is supported."); - return 1; - } - - /* No WPA support */ - airo_print_info(name, "WPA unsupported (only firmware versions 5.30.17" - " and greater support WPA. Detected %s)", cap_rid.prodVer); - return 0; -} - static struct net_device *_init_airo_card( unsigned short irq, int port, int is_pcmcia, struct pci_dev *pci, struct device *dmdev ) @@ -2800,7 +2759,6 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, ai = dev->priv; ai->wifidev = NULL; ai->flags = 0; - ai->jobs = 0; ai->dev = dev; if (pci && (pci->device == 0x5000 || pci->device == 0xa504)) { airo_print_dbg(dev->name, "Found an MPI350 card"); @@ -2848,7 +2806,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, reset_card (dev, 1); msleep(400); - rc = request_irq( dev->irq, airo_interrupt, IRQF_SHARED, dev->name, dev ); + rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev ); if (rc) { airo_print_err(dev->name, "register interrupt %d failed, rc %d", irq, rc); @@ -2880,18 +2838,6 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, set_bit(FLAG_FLASHING, &ai->flags); } - /* Test for WPA support */ - if (airo_test_wpa_capable(ai)) { - set_bit(FLAG_WPA_CAPABLE, &ai->flags); - ai->bssListFirst = RID_WPA_BSSLISTFIRST; - ai->bssListNext = RID_WPA_BSSLISTNEXT; - ai->bssListRidLen = sizeof(BSSListRid); - } else { - ai->bssListFirst = RID_BSSLISTFIRST; - ai->bssListNext = RID_BSSLISTNEXT; - ai->bssListRidLen = sizeof(BSSListRid) - sizeof(BSSListRidExtra); - } - rc = register_netdev(dev); if (rc) { airo_print_err(dev->name, "Couldn't register_netdev"); @@ -2929,7 +2875,7 @@ err_out_irq: err_out_unlink: del_airo_dev(dev); err_out_thr: - set_bit(JOB_DIE, &ai->jobs); + set_bit(JOB_DIE, &ai->flags); kill_proc(ai->thr_pid, SIGTERM, 1); wait_for_completion(&ai->thr_exited); err_out_free: @@ -2987,7 +2933,7 @@ static void airo_send_event(struct net_device *dev) { union iwreq_data wrqu; StatusRid status_rid; - clear_bit(JOB_EVENT, &ai->jobs); + clear_bit(JOB_EVENT, &ai->flags); PC4500_readrid(ai, RID_STATUS, &status_rid, sizeof(status_rid), 0); up(&ai->sem); wrqu.data.length = 0; @@ -3001,7 +2947,7 @@ static void airo_send_event(struct net_device *dev) { static void airo_process_scan_results (struct airo_info *ai) { union iwreq_data wrqu; - BSSListRid bss; + BSSListRid BSSList; int rc; BSSListElement * loop_net; BSSListElement * tmp_net; @@ -3014,15 +2960,15 @@ static void airo_process_scan_results (struct airo_info *ai) { } /* Try to read the first entry of the scan result */ - rc = PC4500_readrid(ai, ai->bssListFirst, &bss, ai->bssListRidLen, 0); - if((rc) || (bss.index == 0xffff)) { + rc = PC4500_readrid(ai, RID_BSSLISTFIRST, &BSSList, sizeof(BSSList), 0); + if((rc) || (BSSList.index == 0xffff)) { /* No scan results */ goto out; } /* Read and parse all entries */ tmp_net = NULL; - while((!rc) && (bss.index != 0xffff)) { + while((!rc) && (BSSList.index != 0xffff)) { /* Grab a network off the free list */ if (!list_empty(&ai->network_free_list)) { tmp_net = list_entry(ai->network_free_list.next, @@ -3031,19 +2977,19 @@ static void airo_process_scan_results (struct airo_info *ai) { } if (tmp_net != NULL) { - memcpy(tmp_net, &bss, sizeof(tmp_net->bss)); + memcpy(tmp_net, &BSSList, sizeof(tmp_net->bss)); list_add_tail(&tmp_net->list, &ai->network_list); tmp_net = NULL; } /* Read next entry */ - rc = PC4500_readrid(ai, ai->bssListNext, - &bss, ai->bssListRidLen, 0); + rc = PC4500_readrid(ai, RID_BSSLISTNEXT, + &BSSList, sizeof(BSSList), 0); } out: ai->scan_timeout = 0; - clear_bit(JOB_SCAN_RESULTS, &ai->jobs); + clear_bit(JOB_SCAN_RESULTS, &ai->flags); up(&ai->sem); /* Send an empty event to user space. @@ -3073,10 +3019,10 @@ static int airo_thread(void *data) { /* make swsusp happy with our thread */ try_to_freeze(); - if (test_bit(JOB_DIE, &ai->jobs)) + if (test_bit(JOB_DIE, &ai->flags)) break; - if (ai->jobs) { + if (ai->flags & JOB_MASK) { locked = down_interruptible(&ai->sem); } else { wait_queue_t wait; @@ -3085,16 +3031,16 @@ static int airo_thread(void *data) { add_wait_queue(&ai->thr_wait, &wait); for (;;) { set_current_state(TASK_INTERRUPTIBLE); - if (ai->jobs) + if (ai->flags & JOB_MASK) break; if (ai->expires || ai->scan_timeout) { if (ai->scan_timeout && time_after_eq(jiffies,ai->scan_timeout)){ - set_bit(JOB_SCAN_RESULTS, &ai->jobs); + set_bit(JOB_SCAN_RESULTS,&ai->flags); break; } else if (ai->expires && time_after_eq(jiffies,ai->expires)){ - set_bit(JOB_AUTOWEP, &ai->jobs); + set_bit(JOB_AUTOWEP,&ai->flags); break; } if (!signal_pending(current)) { @@ -3123,7 +3069,7 @@ static int airo_thread(void *data) { if (locked) continue; - if (test_bit(JOB_DIE, &ai->jobs)) { + if (test_bit(JOB_DIE, &ai->flags)) { up(&ai->sem); break; } @@ -3133,23 +3079,23 @@ static int airo_thread(void *data) { continue; } - if (test_bit(JOB_XMIT, &ai->jobs)) + if (test_bit(JOB_XMIT, &ai->flags)) airo_end_xmit(dev); - else if (test_bit(JOB_XMIT11, &ai->jobs)) + else if (test_bit(JOB_XMIT11, &ai->flags)) airo_end_xmit11(dev); - else if (test_bit(JOB_STATS, &ai->jobs)) + else if (test_bit(JOB_STATS, &ai->flags)) airo_read_stats(ai); - else if (test_bit(JOB_WSTATS, &ai->jobs)) + else if (test_bit(JOB_WSTATS, &ai->flags)) airo_read_wireless_stats(ai); - else if (test_bit(JOB_PROMISC, &ai->jobs)) + else if (test_bit(JOB_PROMISC, &ai->flags)) airo_set_promisc(ai); - else if (test_bit(JOB_MIC, &ai->jobs)) + else if (test_bit(JOB_MIC, &ai->flags)) micinit(ai); - else if (test_bit(JOB_EVENT, &ai->jobs)) + else if (test_bit(JOB_EVENT, &ai->flags)) airo_send_event(dev); - else if (test_bit(JOB_AUTOWEP, &ai->jobs)) + else if (test_bit(JOB_AUTOWEP, &ai->flags)) timer_func(dev); - else if (test_bit(JOB_SCAN_RESULTS, &ai->jobs)) + else if (test_bit(JOB_SCAN_RESULTS, &ai->flags)) airo_process_scan_results(ai); else /* Shouldn't get here, but we make sure to unlock */ up(&ai->sem); @@ -3187,7 +3133,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) if ( status & EV_MIC ) { OUT4500( apriv, EVACK, EV_MIC ); if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) { - set_bit(JOB_MIC, &apriv->jobs); + set_bit(JOB_MIC, &apriv->flags); wake_up_interruptible(&apriv->thr_wait); } } @@ -3241,7 +3187,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs) set_bit(FLAG_UPDATE_MULTI, &apriv->flags); if (down_trylock(&apriv->sem) != 0) { - set_bit(JOB_EVENT, &apriv->jobs); + set_bit(JOB_EVENT, &apriv->flags); wake_up_interruptible(&apriv->thr_wait); } else airo_send_event(dev); @@ -5539,7 +5485,7 @@ static void timer_func( struct net_device *dev ) { up(&apriv->sem); /* Schedule check to see if the change worked */ - clear_bit(JOB_AUTOWEP, &apriv->jobs); + clear_bit(JOB_AUTOWEP, &apriv->flags); apriv->expires = RUN_AT(HZ*3); } @@ -6930,7 +6876,7 @@ static int airo_get_range(struct net_device *dev, } range->num_txpower = i; range->txpower_capa = IW_TXPOW_MWATT; - range->we_version_source = 19; + range->we_version_source = 12; range->we_version_compiled = WIRELESS_EXT; range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME; range->retry_flags = IW_RETRY_LIMIT; @@ -7206,7 +7152,6 @@ static inline char *airo_translate_scan(struct net_device *dev, u16 capabilities; char * current_val; /* For rates */ int i; - char * buf; /* First entry *MUST* be the AP MAC address */ iwe.cmd = SIOCGIWAP; @@ -7293,69 +7238,8 @@ static inline char *airo_translate_scan(struct net_device *dev, if((current_val - current_ev) > IW_EV_LCP_LEN) current_ev = current_val; - /* Beacon interval */ - buf = kmalloc(30, GFP_KERNEL); - if (buf) { - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "bcn_int=%d", bss->beaconInterval); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf); - kfree(buf); - } - - /* Put WPA/RSN Information Elements into the event stream */ - if (test_bit(FLAG_WPA_CAPABLE, &ai->flags)) { - unsigned int num_null_ies = 0; - u16 length = sizeof (bss->extra.iep); - struct ieee80211_info_element *info_element = - (struct ieee80211_info_element *) &bss->extra.iep; - - while ((length >= sizeof(*info_element)) && (num_null_ies < 2)) { - if (sizeof(*info_element) + info_element->len > length) { - /* Invalid element, don't continue parsing IE */ - break; - } - - switch (info_element->id) { - case MFIE_TYPE_SSID: - /* Two zero-length SSID elements - * mean we're done parsing elements */ - if (!info_element->len) - num_null_ies++; - break; - - case MFIE_TYPE_GENERIC: - if (info_element->len >= 4 && - info_element->data[0] == 0x00 && - info_element->data[1] == 0x50 && - info_element->data[2] == 0xf2 && - info_element->data[3] == 0x01) { - iwe.cmd = IWEVGENIE; - iwe.u.data.length = min(info_element->len + 2, - MAX_WPA_IE_LEN); - current_ev = iwe_stream_add_point(current_ev, end_buf, - &iwe, (char *) info_element); - } - break; - - case MFIE_TYPE_RSN: - iwe.cmd = IWEVGENIE; - iwe.u.data.length = min(info_element->len + 2, - MAX_WPA_IE_LEN); - current_ev = iwe_stream_add_point(current_ev, end_buf, - &iwe, (char *) info_element); - break; - - default: - break; - } - - length -= sizeof(*info_element) + info_element->len; - info_element = - (struct ieee80211_info_element *)&info_element-> - data[info_element->len]; - } - } + /* The other data in the scan result are not really + * interesting, so for now drop it - Jean II */ return current_ev; } @@ -7637,7 +7521,7 @@ static void airo_read_wireless_stats(struct airo_info *local) u32 *vals = stats_rid.vals; /* Get stats out of the card */ - clear_bit(JOB_WSTATS, &local->jobs); + clear_bit(JOB_WSTATS, &local->flags); if (local->power.event) { up(&local->sem); return; @@ -7681,10 +7565,10 @@ static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev) { struct airo_info *local = dev->priv; - if (!test_bit(JOB_WSTATS, &local->jobs)) { + if (!test_bit(JOB_WSTATS, &local->flags)) { /* Get stats out of the card if available */ if (down_trylock(&local->sem) != 0) { - set_bit(JOB_WSTATS, &local->jobs); + set_bit(JOB_WSTATS, &local->flags); wake_up_interruptible(&local->thr_wait); } else airo_read_wireless_stats(local); diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index ac9437d49..af0cbb6c5 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c @@ -20,6 +20,7 @@ ======================================================================*/ +#include #ifdef __IN_PCMCIA_PACKAGE__ #include #endif diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c index 38fac3bbc..7b321f7cf 100644 --- a/drivers/net/wireless/airport.c +++ b/drivers/net/wireless/airport.c @@ -14,6 +14,7 @@ #define DRIVER_NAME "airport" #define PFX DRIVER_NAME ": " +#include #include #include #include diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index bb6bea4f3..bed6823d9 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c @@ -5,6 +5,7 @@ * This module provides support for the Arlan 655 card made by Aironet */ +#include #include "arlan.h" #if BITS_PER_LONG != 32 diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c index 5fa985435..a2cca521f 100644 --- a/drivers/net/wireless/arlan-proc.c +++ b/drivers/net/wireless/arlan-proc.c @@ -1,3 +1,4 @@ +#include #include "arlan.h" #include diff --git a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h index 3ed1df759..70a6d7b83 100644 --- a/drivers/net/wireless/arlan.h +++ b/drivers/net/wireless/arlan.h @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 995c7bea5..8606c8888 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -39,6 +39,7 @@ ******************************************************************************/ +#include #include #include @@ -1577,7 +1578,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port, SET_NETDEV_DEV(dev, sys_dev); - if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) { + if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) { printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc); goto err_out_free; } diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 785664090..26bf11275 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c @@ -29,6 +29,7 @@ ******************************************************************************/ +#include #ifdef __IN_PCMCIA_PACKAGE__ #include #endif diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c index d425c3cef..a61b3bc6c 100644 --- a/drivers/net/wireless/atmel_pci.c +++ b/drivers/net/wireless/atmel_pci.c @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ +#include #include #include #include diff --git a/drivers/net/wireless/bcm43xx/Kconfig b/drivers/net/wireless/bcm43xx/Kconfig index 533993f53..25ea4748f 100644 --- a/drivers/net/wireless/bcm43xx/Kconfig +++ b/drivers/net/wireless/bcm43xx/Kconfig @@ -2,7 +2,6 @@ config BCM43XX tristate "Broadcom BCM43xx wireless support" depends on PCI && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL select FW_LOADER - select HW_RANDOM ---help--- This is an experimental driver for the Broadcom 43xx wireless chip, found in the Apple Airport Extreme and various other devices. diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index 6d4ea36bc..2e8308393 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h @@ -1,7 +1,6 @@ #ifndef BCM43xx_H_ #define BCM43xx_H_ -#include #include #include #include @@ -33,18 +32,14 @@ #define BCM43xx_PCICFG_ICR 0x94 /* MMIO offsets */ -#define BCM43xx_MMIO_DMA0_REASON 0x20 -#define BCM43xx_MMIO_DMA0_IRQ_MASK 0x24 -#define BCM43xx_MMIO_DMA1_REASON 0x28 -#define BCM43xx_MMIO_DMA1_IRQ_MASK 0x2C -#define BCM43xx_MMIO_DMA2_REASON 0x30 -#define BCM43xx_MMIO_DMA2_IRQ_MASK 0x34 -#define BCM43xx_MMIO_DMA3_REASON 0x38 -#define BCM43xx_MMIO_DMA3_IRQ_MASK 0x3C -#define BCM43xx_MMIO_DMA4_REASON 0x40 -#define BCM43xx_MMIO_DMA4_IRQ_MASK 0x44 -#define BCM43xx_MMIO_DMA5_REASON 0x48 -#define BCM43xx_MMIO_DMA5_IRQ_MASK 0x4C +#define BCM43xx_MMIO_DMA1_REASON 0x20 +#define BCM43xx_MMIO_DMA1_IRQ_MASK 0x24 +#define BCM43xx_MMIO_DMA2_REASON 0x28 +#define BCM43xx_MMIO_DMA2_IRQ_MASK 0x2C +#define BCM43xx_MMIO_DMA3_REASON 0x30 +#define BCM43xx_MMIO_DMA3_IRQ_MASK 0x34 +#define BCM43xx_MMIO_DMA4_REASON 0x38 +#define BCM43xx_MMIO_DMA4_IRQ_MASK 0x3C #define BCM43xx_MMIO_STATUS_BITFIELD 0x120 #define BCM43xx_MMIO_STATUS2_BITFIELD 0x124 #define BCM43xx_MMIO_GEN_IRQ_REASON 0x128 @@ -60,27 +55,14 @@ #define BCM43xx_MMIO_XMITSTAT_1 0x174 #define BCM43xx_MMIO_REV3PLUS_TSF_LOW 0x180 /* core rev >= 3 only */ #define BCM43xx_MMIO_REV3PLUS_TSF_HIGH 0x184 /* core rev >= 3 only */ - -/* 32-bit DMA */ -#define BCM43xx_MMIO_DMA32_BASE0 0x200 -#define BCM43xx_MMIO_DMA32_BASE1 0x220 -#define BCM43xx_MMIO_DMA32_BASE2 0x240 -#define BCM43xx_MMIO_DMA32_BASE3 0x260 -#define BCM43xx_MMIO_DMA32_BASE4 0x280 -#define BCM43xx_MMIO_DMA32_BASE5 0x2A0 -/* 64-bit DMA */ -#define BCM43xx_MMIO_DMA64_BASE0 0x200 -#define BCM43xx_MMIO_DMA64_BASE1 0x240 -#define BCM43xx_MMIO_DMA64_BASE2 0x280 -#define BCM43xx_MMIO_DMA64_BASE3 0x2C0 -#define BCM43xx_MMIO_DMA64_BASE4 0x300 -#define BCM43xx_MMIO_DMA64_BASE5 0x340 -/* PIO */ +#define BCM43xx_MMIO_DMA1_BASE 0x200 +#define BCM43xx_MMIO_DMA2_BASE 0x220 +#define BCM43xx_MMIO_DMA3_BASE 0x240 +#define BCM43xx_MMIO_DMA4_BASE 0x260 #define BCM43xx_MMIO_PIO1_BASE 0x300 #define BCM43xx_MMIO_PIO2_BASE 0x310 #define BCM43xx_MMIO_PIO3_BASE 0x320 #define BCM43xx_MMIO_PIO4_BASE 0x330 - #define BCM43xx_MMIO_PHY_VER 0x3E0 #define BCM43xx_MMIO_PHY_RADIO 0x3E2 #define BCM43xx_MMIO_ANTENNA 0x3E8 @@ -100,7 +82,6 @@ #define BCM43xx_MMIO_TSF_1 0x634 /* core rev < 3 only */ #define BCM43xx_MMIO_TSF_2 0x636 /* core rev < 3 only */ #define BCM43xx_MMIO_TSF_3 0x638 /* core rev < 3 only */ -#define BCM43xx_MMIO_RNG 0x65A #define BCM43xx_MMIO_POWERUP_DELAY 0x6A8 /* SPROM offsets. */ @@ -250,14 +231,8 @@ #define BCM43xx_SBTMSTATELOW_FORCE_GATE_CLOCK 0x20000 /* sbtmstatehigh state flags */ -#define BCM43xx_SBTMSTATEHIGH_SERROR 0x00000001 -#define BCM43xx_SBTMSTATEHIGH_BUSY 0x00000004 -#define BCM43xx_SBTMSTATEHIGH_TIMEOUT 0x00000020 -#define BCM43xx_SBTMSTATEHIGH_COREFLAGS 0x1FFF0000 -#define BCM43xx_SBTMSTATEHIGH_DMA64BIT 0x10000000 -#define BCM43xx_SBTMSTATEHIGH_GATEDCLK 0x20000000 -#define BCM43xx_SBTMSTATEHIGH_BISTFAILED 0x40000000 -#define BCM43xx_SBTMSTATEHIGH_BISTCOMPLETE 0x80000000 +#define BCM43xx_SBTMSTATEHIGH_SERROR 0x1 +#define BCM43xx_SBTMSTATEHIGH_BUSY 0x4 /* sbimstate flags */ #define BCM43xx_SBIMSTATE_IB_ERROR 0x20000 @@ -306,13 +281,6 @@ #define BCM43xx_SBF_TIME_UPDATE 0x10000000 #define BCM43xx_SBF_80000000 0x80000000 /*FIXME: fix name*/ -/* Microcode */ -#define BCM43xx_UCODE_REVISION 0x0000 -#define BCM43xx_UCODE_PATCHLEVEL 0x0002 -#define BCM43xx_UCODE_DATE 0x0004 -#define BCM43xx_UCODE_TIME 0x0006 -#define BCM43xx_UCODE_STATUS 0x0040 - /* MicrocodeFlagsBitfield (addr + lo-word values?)*/ #define BCM43xx_UCODEFLAGS_OFFSET 0x005E @@ -534,12 +502,6 @@ struct bcm43xx_phyinfo { * This lock is only used by bcm43xx_phy_{un}lock() */ spinlock_t lock; - - /* Firmware. */ - const struct firmware *ucode; - const struct firmware *pcm; - const struct firmware *initvals0; - const struct firmware *initvals1; }; @@ -604,11 +566,8 @@ struct bcm43xx_dma { struct bcm43xx_dmaring *tx_ring1; struct bcm43xx_dmaring *tx_ring2; struct bcm43xx_dmaring *tx_ring3; - struct bcm43xx_dmaring *tx_ring4; - struct bcm43xx_dmaring *tx_ring5; - struct bcm43xx_dmaring *rx_ring0; - struct bcm43xx_dmaring *rx_ring3; /* only available on core.rev < 5 */ + struct bcm43xx_dmaring *rx_ring1; /* only available on core.rev < 5 */ }; /* Data structures for PIO transmission, per 80211 core. */ @@ -632,14 +591,12 @@ struct bcm43xx_coreinfo { u8 available:1, enabled:1, initialized:1; + /** core_id ID number */ + u16 id; /** core_rev revision number */ u8 rev; /** Index number for _switch_core() */ u8 index; - /** core_id ID number */ - u16 id; - /** Core-specific data. */ - void *priv; }; /* Additional information for each 80211 core. */ @@ -679,33 +636,6 @@ struct bcm43xx_key { u8 algorithm; }; -/* Driver initialization status. */ -enum { - BCM43xx_STAT_UNINIT, /* Uninitialized. */ - BCM43xx_STAT_INITIALIZING, /* init_board() in progress. */ - BCM43xx_STAT_INITIALIZED, /* Fully operational. */ - BCM43xx_STAT_SHUTTINGDOWN, /* free_board() in progress. */ - BCM43xx_STAT_RESTARTING, /* controller_restart() called. */ -}; -#define bcm43xx_status(bcm) atomic_read(&(bcm)->init_status) -#define bcm43xx_set_status(bcm, stat) do { \ - atomic_set(&(bcm)->init_status, (stat)); \ - smp_wmb(); \ - } while (0) - -/* *** THEORY OF LOCKING *** - * - * We have two different locks in the bcm43xx driver. - * => bcm->mutex: General sleeping mutex. Protects struct bcm43xx_private - * and the device registers. This mutex does _not_ protect - * against concurrency from the IRQ handler. - * => bcm->irq_lock: IRQ spinlock. Protects against IRQ handler concurrency. - * - * Please note that, if you only take the irq_lock, you are not protected - * against concurrency from the periodic work handlers. - * Most times you want to take _both_ locks. - */ - struct bcm43xx_private { struct ieee80211_device *ieee; struct ieee80211softmac_device *softmac; @@ -715,17 +645,20 @@ struct bcm43xx_private { unsigned int irq; void __iomem *mmio_addr; + unsigned int mmio_len; - spinlock_t irq_lock; - struct mutex mutex; - - /* Driver initialization status BCM43xx_STAT_*** */ - atomic_t init_status; + /* Do not use the lock directly. Use the bcm43xx_lock* helper + * functions, to be MMIO-safe. */ + spinlock_t _lock; - u16 was_initialized:1, /* for PCI suspend/resume. */ + /* Driver status flags. */ + u32 initialized:1, /* init_board() succeed */ + was_initialized:1, /* for PCI suspend/resume. */ + shutting_down:1, /* free_board() in progress */ __using_pio:1, /* Internal, use bcm43xx_using_pio(). */ bad_frames_preempt:1, /* Use "Bad Frames Preemption" (default off) */ reg124_set_0x4:1, /* Some variable to keep track of IRQ stuff. */ + powersaving:1, /* TRUE if we are in PowerSaving mode. FALSE otherwise. */ short_preamble:1, /* TRUE, if short preamble is enabled. */ firmware_norelease:1; /* Do not release the firmware. Used on suspend. */ @@ -747,7 +680,6 @@ struct bcm43xx_private { struct bcm43xx_sprominfo sprom; #define BCM43xx_NR_LEDS 4 struct bcm43xx_led leds[BCM43xx_NR_LEDS]; - spinlock_t leds_lock; /* The currently active core. */ struct bcm43xx_coreinfo *current_core; @@ -765,6 +697,10 @@ struct bcm43xx_private { struct bcm43xx_coreinfo core_80211[ BCM43xx_MAX_80211_CORES ]; /* Additional information, specific to the 80211 cores. */ struct bcm43xx_coreinfo_80211 core_80211_ext[ BCM43xx_MAX_80211_CORES ]; + /* Index of the current 80211 core. If current_core is not + * an 80211 core, this is -1. + */ + int current_80211_core_idx; /* Number of available 80211 cores. */ int nr_80211_available; @@ -772,13 +708,11 @@ struct bcm43xx_private { /* Reason code of the last interrupt. */ u32 irq_reason; - u32 dma_reason[6]; + u32 dma_reason[4]; /* saved irq enable/disable state bitfield. */ u32 irq_savedstate; /* Link Quality calculation context. */ struct bcm43xx_noise_calculation noisecalc; - /* if > 0 MAC is suspended. if == 0 MAC is enabled. */ - int mac_suspended; /* Threshold values. */ //TODO: The RTS thr has to be _used_. Currently, it is only set via WX. @@ -788,7 +722,7 @@ struct bcm43xx_private { struct tasklet_struct isr_tasklet; /* Periodic tasks */ - struct work_struct periodic_work; + struct timer_list periodic_tasks; unsigned int periodic_state; struct work_struct restart_work; @@ -801,9 +735,11 @@ struct bcm43xx_private { struct bcm43xx_key key[54]; u8 default_key_idx; - /* Random Number Generator. */ - struct hwrng rng; - char rng_name[20 + 1]; + /* Firmware. */ + const struct firmware *ucode; + const struct firmware *pcm; + const struct firmware *initvals0; + const struct firmware *initvals1; /* Debugging stuff follows. */ #ifdef CONFIG_BCM43XX_DEBUG @@ -811,6 +747,21 @@ struct bcm43xx_private { #endif }; +/* bcm43xx_(un)lock() protect struct bcm43xx_private. + * Note that _NO_ MMIO writes are allowed. If you want to + * write to the device through MMIO in the critical section, use + * the *_mmio lock functions. + * MMIO read-access is allowed, though. + */ +#define bcm43xx_lock(bcm, flags) spin_lock_irqsave(&(bcm)->_lock, flags) +#define bcm43xx_unlock(bcm, flags) spin_unlock_irqrestore(&(bcm)->_lock, flags) +/* bcm43xx_(un)lock_mmio() protect struct bcm43xx_private and MMIO. + * MMIO write-access to the device is allowed. + * All MMIO writes are flushed on unlock, so it is guaranteed to not + * interfere with other threads writing MMIO registers. + */ +#define bcm43xx_lock_mmio(bcm, flags) bcm43xx_lock(bcm, flags) +#define bcm43xx_unlock_mmio(bcm, flags) do { mmiowb(); bcm43xx_unlock(bcm, flags); } while (0) static inline struct bcm43xx_private * bcm43xx_priv(struct net_device *dev) @@ -863,35 +814,46 @@ int bcm43xx_using_pio(struct bcm43xx_private *bcm) * any of these functions. */ static inline -struct bcm43xx_coreinfo_80211 * -bcm43xx_current_80211_priv(struct bcm43xx_private *bcm) -{ - assert(bcm->current_core->id == BCM43xx_COREID_80211); - return bcm->current_core->priv; -} -static inline struct bcm43xx_pio * bcm43xx_current_pio(struct bcm43xx_private *bcm) { assert(bcm43xx_using_pio(bcm)); - return &(bcm43xx_current_80211_priv(bcm)->pio); + assert(bcm->current_80211_core_idx >= 0); + assert(bcm->current_80211_core_idx < BCM43xx_MAX_80211_CORES); + return &(bcm->core_80211_ext[bcm->current_80211_core_idx].pio); } static inline struct bcm43xx_dma * bcm43xx_current_dma(struct bcm43xx_private *bcm) { assert(!bcm43xx_using_pio(bcm)); - return &(bcm43xx_current_80211_priv(bcm)->dma); + assert(bcm->current_80211_core_idx >= 0); + assert(bcm->current_80211_core_idx < BCM43xx_MAX_80211_CORES); + return &(bcm->core_80211_ext[bcm->current_80211_core_idx].dma); } static inline struct bcm43xx_phyinfo * bcm43xx_current_phy(struct bcm43xx_private *bcm) { - return &(bcm43xx_current_80211_priv(bcm)->phy); + assert(bcm->current_80211_core_idx >= 0); + assert(bcm->current_80211_core_idx < BCM43xx_MAX_80211_CORES); + return &(bcm->core_80211_ext[bcm->current_80211_core_idx].phy); } static inline struct bcm43xx_radioinfo * bcm43xx_current_radio(struct bcm43xx_private *bcm) { - return &(bcm43xx_current_80211_priv(bcm)->radio); + assert(bcm->current_80211_core_idx >= 0); + assert(bcm->current_80211_core_idx < BCM43xx_MAX_80211_CORES); + return &(bcm->core_80211_ext[bcm->current_80211_core_idx].radio); } +/* Are we running in init_board() context? */ +static inline +int bcm43xx_is_initializing(struct bcm43xx_private *bcm) +{ + if (bcm->initialized) + return 0; + if (bcm->shutting_down) + return 0; + return 1; +} static inline struct bcm43xx_lopair * bcm43xx_get_lopair(struct bcm43xx_phyinfo *phy, diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c index b9df06a06..35a4fcb6d 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c @@ -54,7 +54,7 @@ static ssize_t write_file_dummy(struct file *file, const char __user *buf, static int open_file_generic(struct inode *inode, struct file *file) { - file->private_data = inode->i_private; + file->private_data = inode->u.generic_ip; return 0; } @@ -77,9 +77,8 @@ static ssize_t devinfo_read_file(struct file *file, char __user *userbuf, down(&big_buffer_sem); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (!bcm->initialized) { fappend("Board not initialized.\n"); goto out; } @@ -93,7 +92,7 @@ static ssize_t devinfo_read_file(struct file *file, char __user *userbuf, fappend("subsystem_vendor: 0x%04x subsystem_device: 0x%04x\n", pci_dev->subsystem_vendor, pci_dev->subsystem_device); fappend("IRQ: %d\n", bcm->irq); - fappend("mmio_addr: 0x%p\n", bcm->mmio_addr); + fappend("mmio_addr: 0x%p mmio_len: %u\n", bcm->mmio_addr, bcm->mmio_len); fappend("chip_id: 0x%04x chip_rev: 0x%02x\n", bcm->chip_id, bcm->chip_rev); if ((bcm->core_80211[0].rev >= 3) && (bcm43xx_read32(bcm, 0x0158) & (1 << 16))) fappend("Radio disabled by hardware!\n"); @@ -122,8 +121,7 @@ static ssize_t devinfo_read_file(struct file *file, char __user *userbuf, fappend("\n"); out: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); res = simple_read_from_buffer(userbuf, count, ppos, buf, pos); up(&big_buffer_sem); return res; @@ -161,9 +159,8 @@ static ssize_t spromdump_read_file(struct file *file, char __user *userbuf, unsigned long flags; down(&big_buffer_sem); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (!bcm->initialized) { fappend("Board not initialized.\n"); goto out; } @@ -172,8 +169,7 @@ static ssize_t spromdump_read_file(struct file *file, char __user *userbuf, fappend("boardflags: 0x%04x\n", bcm->sprom.boardflags); out: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); res = simple_read_from_buffer(userbuf, count, ppos, buf, pos); up(&big_buffer_sem); return res; @@ -192,9 +188,8 @@ static ssize_t tsf_read_file(struct file *file, char __user *userbuf, u64 tsf; down(&big_buffer_sem); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (!bcm->initialized) { fappend("Board not initialized.\n"); goto out; } @@ -204,8 +199,7 @@ static ssize_t tsf_read_file(struct file *file, char __user *userbuf, (unsigned int)(tsf & 0xFFFFFFFFULL)); out: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); res = simple_read_from_buffer(userbuf, count, ppos, buf, pos); up(&big_buffer_sem); return res; @@ -227,9 +221,8 @@ static ssize_t tsf_write_file(struct file *file, const char __user *user_buf, res = -EFAULT; goto out_up; } - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (!bcm->initialized) { printk(KERN_INFO PFX "debugfs: Board not initialized.\n"); res = -EFAULT; goto out_unlock; @@ -240,12 +233,10 @@ static ssize_t tsf_write_file(struct file *file, const char __user *user_buf, goto out_unlock; } bcm43xx_tsf_write(bcm, tsf); - mmiowb(); res = buf_size; out_unlock: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); out_up: up(&big_buffer_sem); return res; @@ -266,8 +257,7 @@ static ssize_t txstat_read_file(struct file *file, char __user *userbuf, int i, cnt, j = 0; down(&big_buffer_sem); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); fappend("Last %d logged xmitstatus blobs (Latest first):\n\n", BCM43xx_NR_LOGGED_XMITSTATUS); @@ -303,51 +293,14 @@ static ssize_t txstat_read_file(struct file *file, char __user *userbuf, i = BCM43xx_NR_LOGGED_XMITSTATUS - 1; } - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock(bcm, flags); res = simple_read_from_buffer(userbuf, count, ppos, buf, pos); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); if (*ppos == pos) { /* Done. Drop the copied data. */ e->xmitstatus_printing = 0; } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); - up(&big_buffer_sem); - return res; -} - -static ssize_t restart_write_file(struct file *file, const char __user *user_buf, - size_t count, loff_t *ppos) -{ - struct bcm43xx_private *bcm = file->private_data; - char *buf = really_big_buffer; - ssize_t buf_size; - ssize_t res; - unsigned long flags; - - buf_size = min(count, sizeof (really_big_buffer) - 1); - down(&big_buffer_sem); - if (copy_from_user(buf, user_buf, buf_size)) { - res = -EFAULT; - goto out_up; - } - mutex_lock(&(bcm)->mutex); - spin_lock_irqsave(&(bcm)->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { - printk(KERN_INFO PFX "debugfs: Board not initialized.\n"); - res = -EFAULT; - goto out_unlock; - } - if (count > 0 && buf[0] == '1') { - bcm43xx_controller_restart(bcm, "manually restarted"); - res = count; - } else - res = -EINVAL; - -out_unlock: - spin_unlock_irqrestore(&(bcm)->irq_lock, flags); - mutex_unlock(&(bcm)->mutex); -out_up: + bcm43xx_unlock(bcm, flags); up(&big_buffer_sem); return res; } @@ -385,11 +338,6 @@ static struct file_operations txstat_fops = { .open = open_file_generic, }; -static struct file_operations restart_fops = { - .write = restart_write_file, - .open = open_file_generic, -}; - void bcm43xx_debugfs_add_device(struct bcm43xx_private *bcm) { @@ -441,10 +389,6 @@ void bcm43xx_debugfs_add_device(struct bcm43xx_private *bcm) bcm, &txstat_fops); if (!e->dentry_txstat) printk(KERN_ERR PFX "debugfs: creating \"tx_status\" for \"%s\" failed!\n", devdir); - e->dentry_restart = debugfs_create_file("restart", 0222, e->subdir, - bcm, &restart_fops); - if (!e->dentry_restart) - printk(KERN_ERR PFX "debugfs: creating \"restart\" for \"%s\" failed!\n", devdir); } void bcm43xx_debugfs_remove_device(struct bcm43xx_private *bcm) @@ -460,7 +404,6 @@ void bcm43xx_debugfs_remove_device(struct bcm43xx_private *bcm) debugfs_remove(e->dentry_devinfo); debugfs_remove(e->dentry_tsf); debugfs_remove(e->dentry_txstat); - debugfs_remove(e->dentry_restart); debugfs_remove(e->subdir); kfree(e->xmitstatus_buffer); kfree(e->xmitstatus_print_buffer); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h index a40d1af35..50ce267f7 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.h @@ -20,7 +20,6 @@ struct bcm43xx_dfsentry { struct dentry *dentry_spromdump; struct dentry *dentry_tsf; struct dentry *dentry_txstat; - struct dentry *dentry_restart; struct bcm43xx_private *bcm; diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c index 76e3aed4b..d0318e525 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.c @@ -4,7 +4,7 @@ DMA ringbuffer and descriptor allocation/management - Copyright (c) 2005, 2006 Michael Buesch + Copyright (c) 2005 Michael Buesch Some code in this file is derived from the b44.c driver Copyright (C) 2002 David S. Miller @@ -109,35 +109,6 @@ void return_slot(struct bcm43xx_dmaring *ring, int slot) } } -u16 bcm43xx_dmacontroller_base(int dma64bit, int controller_idx) -{ - static const u16 map64[] = { - BCM43xx_MMIO_DMA64_BASE0, - BCM43xx_MMIO_DMA64_BASE1, - BCM43xx_MMIO_DMA64_BASE2, - BCM43xx_MMIO_DMA64_BASE3, - BCM43xx_MMIO_DMA64_BASE4, - BCM43xx_MMIO_DMA64_BASE5, - }; - static const u16 map32[] = { - BCM43xx_MMIO_DMA32_BASE0, - BCM43xx_MMIO_DMA32_BASE1, - BCM43xx_MMIO_DMA32_BASE2, - BCM43xx_MMIO_DMA32_BASE3, - BCM43xx_MMIO_DMA32_BASE4, - BCM43xx_MMIO_DMA32_BASE5, - }; - - if (dma64bit) { - assert(controller_idx >= 0 && - controller_idx < ARRAY_SIZE(map64)); - return map64[controller_idx]; - } - assert(controller_idx >= 0 && - controller_idx < ARRAY_SIZE(map32)); - return map32[controller_idx]; -} - static inline dma_addr_t map_descbuffer(struct bcm43xx_dmaring *ring, unsigned char *buf, @@ -201,6 +172,7 @@ void sync_descbuffer_for_device(struct bcm43xx_dmaring *ring, /* Unmap and free a descriptor buffer. */ static inline void free_descriptor_buffer(struct bcm43xx_dmaring *ring, + struct bcm43xx_dmadesc *desc, struct bcm43xx_dmadesc_meta *meta, int irq_context) { @@ -216,13 +188,23 @@ static int alloc_ringmemory(struct bcm43xx_dmaring *ring) { struct device *dev = &(ring->bcm->pci_dev->dev); - ring->descbase = dma_alloc_coherent(dev, BCM43xx_DMA_RINGMEMSIZE, - &(ring->dmabase), GFP_KERNEL); - if (!ring->descbase) { + ring->vbase = dma_alloc_coherent(dev, BCM43xx_DMA_RINGMEMSIZE, + &(ring->dmabase), GFP_KERNEL); + if (!ring->vbase) { printk(KERN_ERR PFX "DMA ringmemory allocation failed\n"); return -ENOMEM; } - memset(ring->descbase, 0, BCM43xx_DMA_RINGMEMSIZE); + if (ring->dmabase + BCM43xx_DMA_RINGMEMSIZE > BCM43xx_DMA_BUSADDRMAX) { + printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RINGMEMORY >1G " + "(0x%llx, len: %lu)\n", + (unsigned long long)ring->dmabase, + BCM43xx_DMA_RINGMEMSIZE); + dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE, + ring->vbase, ring->dmabase); + return -ENOMEM; + } + assert(!(ring->dmabase & 0x000003FF)); + memset(ring->vbase, 0, BCM43xx_DMA_RINGMEMSIZE); return 0; } @@ -232,34 +214,26 @@ static void free_ringmemory(struct bcm43xx_dmaring *ring) struct device *dev = &(ring->bcm->pci_dev->dev); dma_free_coherent(dev, BCM43xx_DMA_RINGMEMSIZE, - ring->descbase, ring->dmabase); + ring->vbase, ring->dmabase); } /* Reset the RX DMA channel */ int bcm43xx_dmacontroller_rx_reset(struct bcm43xx_private *bcm, - u16 mmio_base, int dma64) + u16 mmio_base) { int i; u32 value; - u16 offset; - offset = dma64 ? BCM43xx_DMA64_RXCTL : BCM43xx_DMA32_RXCTL; - bcm43xx_write32(bcm, mmio_base + offset, 0); + bcm43xx_write32(bcm, + mmio_base + BCM43xx_DMA_RX_CONTROL, + 0x00000000); for (i = 0; i < 1000; i++) { - offset = dma64 ? BCM43xx_DMA64_RXSTATUS : BCM43xx_DMA32_RXSTATUS; - value = bcm43xx_read32(bcm, mmio_base + offset); - if (dma64) { - value &= BCM43xx_DMA64_RXSTAT; - if (value == BCM43xx_DMA64_RXSTAT_DISABLED) { - i = -1; - break; - } - } else { - value &= BCM43xx_DMA32_RXSTATE; - if (value == BCM43xx_DMA32_RXSTAT_DISABLED) { - i = -1; - break; - } + value = bcm43xx_read32(bcm, + mmio_base + BCM43xx_DMA_RX_STATUS); + value &= BCM43xx_DMA_RXSTAT_STAT_MASK; + if (value == BCM43xx_DMA_RXSTAT_STAT_DISABLED) { + i = -1; + break; } udelay(10); } @@ -273,47 +247,31 @@ int bcm43xx_dmacontroller_rx_reset(struct bcm43xx_private *bcm, /* Reset the RX DMA channel */ int bcm43xx_dmacontroller_tx_reset(struct bcm43xx_private *bcm, - u16 mmio_base, int dma64) + u16 mmio_base) { int i; u32 value; - u16 offset; for (i = 0; i < 1000; i++) { - offset = dma64 ? BCM43xx_DMA64_TXSTATUS : BCM43xx_DMA32_TXSTATUS; - value = bcm43xx_read32(bcm, mmio_base + offset); - if (dma64) { - value &= BCM43xx_DMA64_TXSTAT; - if (value == BCM43xx_DMA64_TXSTAT_DISABLED || - value == BCM43xx_DMA64_TXSTAT_IDLEWAIT || - value == BCM43xx_DMA64_TXSTAT_STOPPED) - break; - } else { - value &= BCM43xx_DMA32_TXSTATE; - if (value == BCM43xx_DMA32_TXSTAT_DISABLED || - value == BCM43xx_DMA32_TXSTAT_IDLEWAIT || - value == BCM43xx_DMA32_TXSTAT_STOPPED) - break; - } + value = bcm43xx_read32(bcm, + mmio_base + BCM43xx_DMA_TX_STATUS); + value &= BCM43xx_DMA_TXSTAT_STAT_MASK; + if (value == BCM43xx_DMA_TXSTAT_STAT_DISABLED || + value == BCM43xx_DMA_TXSTAT_STAT_IDLEWAIT || + value == BCM43xx_DMA_TXSTAT_STAT_STOPPED) + break; udelay(10); } - offset = dma64 ? BCM43xx_DMA64_TXCTL : BCM43xx_DMA32_TXCTL; - bcm43xx_write32(bcm, mmio_base + offset, 0); + bcm43xx_write32(bcm, + mmio_base + BCM43xx_DMA_TX_CONTROL, + 0x00000000); for (i = 0; i < 1000; i++) { - offset = dma64 ? BCM43xx_DMA64_TXSTATUS : BCM43xx_DMA32_TXSTATUS; - value = bcm43xx_read32(bcm, mmio_base + offset); - if (dma64) { - value &= BCM43xx_DMA64_TXSTAT; - if (value == BCM43xx_DMA64_TXSTAT_DISABLED) { - i = -1; - break; - } - } else { - value &= BCM43xx_DMA32_TXSTATE; - if (value == BCM43xx_DMA32_TXSTAT_DISABLED) { - i = -1; - break; - } + value = bcm43xx_read32(bcm, + mmio_base + BCM43xx_DMA_TX_STATUS); + value &= BCM43xx_DMA_TXSTAT_STAT_MASK; + if (value == BCM43xx_DMA_TXSTAT_STAT_DISABLED) { + i = -1; + break; } udelay(10); } @@ -327,98 +285,47 @@ int bcm43xx_dmacontroller_tx_reset(struct bcm43xx_private *bcm, return 0; } -static void fill_descriptor(struct bcm43xx_dmaring *ring, - struct bcm43xx_dmadesc_generic *desc, - dma_addr_t dmaaddr, - u16 bufsize, - int start, int end, int irq) -{ - int slot; - - slot = bcm43xx_dma_desc2idx(ring, desc); - assert(slot >= 0 && slot < ring->nr_slots); - - if (ring->dma64) { - u32 ctl0 = 0, ctl1 = 0; - u32 addrlo, addrhi; - u32 addrext; - - addrlo = (u32)(dmaaddr & 0xFFFFFFFF); - addrhi = (((u64)dmaaddr >> 32) & ~BCM43xx_DMA64_ROUTING); - addrext = (((u64)dmaaddr >> 32) >> BCM43xx_DMA64_ROUTING_SHIFT); - addrhi |= ring->routing; - if (slot == ring->nr_slots - 1) - ctl0 |= BCM43xx_DMA64_DCTL0_DTABLEEND; - if (start) - ctl0 |= BCM43xx_DMA64_DCTL0_FRAMESTART; - if (end) - ctl0 |= BCM43xx_DMA64_DCTL0_FRAMEEND; - if (irq) - ctl0 |= BCM43xx_DMA64_DCTL0_IRQ; - ctl1 |= (bufsize - ring->frameoffset) - & BCM43xx_DMA64_DCTL1_BYTECNT; - ctl1 |= (addrext << BCM43xx_DMA64_DCTL1_ADDREXT_SHIFT) - & BCM43xx_DMA64_DCTL1_ADDREXT_MASK; - - desc->dma64.control0 = cpu_to_le32(ctl0); - desc->dma64.control1 = cpu_to_le32(ctl1); - desc->dma64.address_low = cpu_to_le32(addrlo); - desc->dma64.address_high = cpu_to_le32(addrhi); - } else { - u32 ctl; - u32 addr; - u32 addrext; - - addr = (u32)(dmaaddr & ~BCM43xx_DMA32_ROUTING); - addrext = (u32)(dmaaddr & BCM43xx_DMA32_ROUTING) - >> BCM43xx_DMA32_ROUTING_SHIFT; - addr |= ring->routing; - ctl = (bufsize - ring->frameoffset) - & BCM43xx_DMA32_DCTL_BYTECNT; - if (slot == ring->nr_slots - 1) - ctl |= BCM43xx_DMA32_DCTL_DTABLEEND; - if (start) - ctl |= BCM43xx_DMA32_DCTL_FRAMESTART; - if (end) - ctl |= BCM43xx_DMA32_DCTL_FRAMEEND; - if (irq) - ctl |= BCM43xx_DMA32_DCTL_IRQ; - ctl |= (addrext << BCM43xx_DMA32_DCTL_ADDREXT_SHIFT) - & BCM43xx_DMA32_DCTL_ADDREXT_MASK; - - desc->dma32.control = cpu_to_le32(ctl); - desc->dma32.address = cpu_to_le32(addr); - } -} - static int setup_rx_descbuffer(struct bcm43xx_dmaring *ring, - struct bcm43xx_dmadesc_generic *desc, + struct bcm43xx_dmadesc *desc, struct bcm43xx_dmadesc_meta *meta, gfp_t gfp_flags) { struct bcm43xx_rxhdr *rxhdr; - struct bcm43xx_hwxmitstatus *xmitstat; dma_addr_t dmaaddr; + u32 desc_addr; + u32 desc_ctl; + const int slot = (int)(desc - ring->vbase); struct sk_buff *skb; + assert(slot >= 0 && slot < ring->nr_slots); assert(!ring->tx); skb = __dev_alloc_skb(ring->rx_buffersize, gfp_flags); if (unlikely(!skb)) return -ENOMEM; dmaaddr = map_descbuffer(ring, skb->data, ring->rx_buffersize, 0); + if (unlikely(dmaaddr + ring->rx_buffersize > BCM43xx_DMA_BUSADDRMAX)) { + unmap_descbuffer(ring, dmaaddr, ring->rx_buffersize, 0); + dev_kfree_skb_any(skb); + printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA RX SKB >1G " + "(0x%llx, len: %u)\n", + (unsigned long long)dmaaddr, ring->rx_buffersize); + return -ENOMEM; + } meta->skb = skb; meta->dmaaddr = dmaaddr; skb->dev = ring->bcm->net_dev; - - fill_descriptor(ring, desc, dmaaddr, - ring->rx_buffersize, 0, 0, 0); + desc_addr = (u32)(dmaaddr + ring->memoffset); + desc_ctl = (BCM43xx_DMADTOR_BYTECNT_MASK & + (u32)(ring->rx_buffersize - ring->frameoffset)); + if (slot == ring->nr_slots - 1) + desc_ctl |= BCM43xx_DMADTOR_DTABLEEND; + set_desc_addr(desc, desc_addr); + set_desc_ctl(desc, desc_ctl); rxhdr = (struct bcm43xx_rxhdr *)(skb->data); rxhdr->frame_length = 0; rxhdr->flags1 = 0; - xmitstat = (struct bcm43xx_hwxmitstatus *)(skb->data); - xmitstat->cookie = 0; return 0; } @@ -429,17 +336,17 @@ static int setup_rx_descbuffer(struct bcm43xx_dmaring *ring, static int alloc_initial_descbuffers(struct bcm43xx_dmaring *ring) { int i, err = -ENOMEM; - struct bcm43xx_dmadesc_generic *desc; + struct bcm43xx_dmadesc *desc; struct bcm43xx_dmadesc_meta *meta; for (i = 0; i < ring->nr_slots; i++) { - desc = bcm43xx_dma_idx2desc(ring, i, &meta); + desc = ring->vbase + i; + meta = ring->meta + i; err = setup_rx_descbuffer(ring, desc, meta, GFP_KERNEL); if (err) goto err_unwind; } - mb(); ring->used_slots = ring->nr_slots; err = 0; out: @@ -447,7 +354,8 @@ out: err_unwind: for (i--; i >= 0; i--) { - desc = bcm43xx_dma_idx2desc(ring, i, &meta); + desc = ring->vbase + i; + meta = ring->meta + i; unmap_descbuffer(ring, meta->dmaaddr, ring->rx_buffersize, 0); dev_kfree_skb(meta->skb); @@ -463,67 +371,27 @@ static int dmacontroller_setup(struct bcm43xx_dmaring *ring) { int err = 0; u32 value; - u32 addrext; if (ring->tx) { - if (ring->dma64) { - u64 ringbase = (u64)(ring->dmabase); - - addrext = ((ringbase >> 32) >> BCM43xx_DMA64_ROUTING_SHIFT); - value = BCM43xx_DMA64_TXENABLE; - value |= (addrext << BCM43xx_DMA64_TXADDREXT_SHIFT) - & BCM43xx_DMA64_TXADDREXT_MASK; - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXCTL, value); - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXRINGLO, - (ringbase & 0xFFFFFFFF)); - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXRINGHI, - ((ringbase >> 32) & ~BCM43xx_DMA64_ROUTING) - | ring->routing); - } else { - u32 ringbase = (u32)(ring->dmabase); - - addrext = (ringbase >> BCM43xx_DMA32_ROUTING_SHIFT); - value = BCM43xx_DMA32_TXENABLE; - value |= (addrext << BCM43xx_DMA32_TXADDREXT_SHIFT) - & BCM43xx_DMA32_TXADDREXT_MASK; - bcm43xx_dma_write(ring, BCM43xx_DMA32_TXCTL, value); - bcm43xx_dma_write(ring, BCM43xx_DMA32_TXRING, - (ringbase & ~BCM43xx_DMA32_ROUTING) - | ring->routing); - } + /* Set Transmit Control register to "transmit enable" */ + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_CONTROL, + BCM43xx_DMA_TXCTRL_ENABLE); + /* Set Transmit Descriptor ring address. */ + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_DESC_RING, + ring->dmabase + ring->memoffset); } else { err = alloc_initial_descbuffers(ring); if (err) goto out; - if (ring->dma64) { - u64 ringbase = (u64)(ring->dmabase); - - addrext = ((ringbase >> 32) >> BCM43xx_DMA64_ROUTING_SHIFT); - value = (ring->frameoffset << BCM43xx_DMA64_RXFROFF_SHIFT); - value |= BCM43xx_DMA64_RXENABLE; - value |= (addrext << BCM43xx_DMA64_RXADDREXT_SHIFT) - & BCM43xx_DMA64_RXADDREXT_MASK; - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXCTL, value); - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXRINGLO, - (ringbase & 0xFFFFFFFF)); - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXRINGHI, - ((ringbase >> 32) & ~BCM43xx_DMA64_ROUTING) - | ring->routing); - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXINDEX, 200); - } else { - u32 ringbase = (u32)(ring->dmabase); - - addrext = (ringbase >> BCM43xx_DMA32_ROUTING_SHIFT); - value = (ring->frameoffset << BCM43xx_DMA32_RXFROFF_SHIFT); - value |= BCM43xx_DMA32_RXENABLE; - value |= (addrext << BCM43xx_DMA32_RXADDREXT_SHIFT) - & BCM43xx_DMA32_RXADDREXT_MASK; - bcm43xx_dma_write(ring, BCM43xx_DMA32_RXCTL, value); - bcm43xx_dma_write(ring, BCM43xx_DMA32_RXRING, - (ringbase & ~BCM43xx_DMA32_ROUTING) - | ring->routing); - bcm43xx_dma_write(ring, BCM43xx_DMA32_RXINDEX, 200); - } + /* Set Receive Control "receive enable" and frame offset */ + value = (ring->frameoffset << BCM43xx_DMA_RXCTRL_FRAMEOFF_SHIFT); + value |= BCM43xx_DMA_RXCTRL_ENABLE; + bcm43xx_dma_write(ring, BCM43xx_DMA_RX_CONTROL, value); + /* Set Receive Descriptor ring address. */ + bcm43xx_dma_write(ring, BCM43xx_DMA_RX_DESC_RING, + ring->dmabase + ring->memoffset); + /* Init the descriptor pointer. */ + bcm43xx_dma_write(ring, BCM43xx_DMA_RX_DESC_INDEX, 200); } out: @@ -534,32 +402,27 @@ out: static void dmacontroller_cleanup(struct bcm43xx_dmaring *ring) { if (ring->tx) { - bcm43xx_dmacontroller_tx_reset(ring->bcm, ring->mmio_base, ring->dma64); - if (ring->dma64) { - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXRINGLO, 0); - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXRINGHI, 0); - } else - bcm43xx_dma_write(ring, BCM43xx_DMA32_TXRING, 0); + bcm43xx_dmacontroller_tx_reset(ring->bcm, ring->mmio_base); + /* Zero out Transmit Descriptor ring address. */ + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_DESC_RING, 0); } else { - bcm43xx_dmacontroller_rx_reset(ring->bcm, ring->mmio_base, ring->dma64); - if (ring->dma64) { - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXRINGLO, 0); - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXRINGHI, 0); - } else - bcm43xx_dma_write(ring, BCM43xx_DMA32_RXRING, 0); + bcm43xx_dmacontroller_rx_reset(ring->bcm, ring->mmio_base); + /* Zero out Receive Descriptor ring address. */ + bcm43xx_dma_write(ring, BCM43xx_DMA_RX_DESC_RING, 0); } } static void free_all_descbuffers(struct bcm43xx_dmaring *ring) { - struct bcm43xx_dmadesc_generic *desc; + struct bcm43xx_dmadesc *desc; struct bcm43xx_dmadesc_meta *meta; int i; if (!ring->used_slots) return; for (i = 0; i < ring->nr_slots; i++) { - desc = bcm43xx_dma_idx2desc(ring, i, &meta); + desc = ring->vbase + i; + meta = ring->meta + i; if (!meta->skb) { assert(ring->tx); @@ -567,67 +430,62 @@ static void free_all_descbuffers(struct bcm43xx_dmaring *ring) } if (ring->tx) { unmap_descbuffer(ring, meta->dmaaddr, - meta->skb->len, 1); + meta->skb->len, 1); } else { unmap_descbuffer(ring, meta->dmaaddr, - ring->rx_buffersize, 0); + ring->rx_buffersize, 0); } - free_descriptor_buffer(ring, meta, 0); + free_descriptor_buffer(ring, desc, meta, 0); } } /* Main initialization function. */ static struct bcm43xx_dmaring * bcm43xx_setup_dmaring(struct bcm43xx_private *bcm, - int controller_index, - int for_tx, - int dma64) + u16 dma_controller_base, + int nr_descriptor_slots, + int tx) { struct bcm43xx_dmaring *ring; int err; - int nr_slots; ring = kzalloc(sizeof(*ring), GFP_KERNEL); if (!ring) goto out; - nr_slots = BCM43xx_RXRING_SLOTS; - if (for_tx) - nr_slots = BCM43xx_TXRING_SLOTS; - - ring->meta = kcalloc(nr_slots, sizeof(struct bcm43xx_dmadesc_meta), + ring->meta = kzalloc(sizeof(*ring->meta) * nr_descriptor_slots, GFP_KERNEL); if (!ring->meta) goto err_kfree_ring; - ring->routing = BCM43xx_DMA32_CLIENTTRANS; - if (dma64) - ring->routing = BCM43xx_DMA64_CLIENTTRANS; + ring->memoffset = BCM43xx_DMA_DMABUSADDROFFSET; #ifdef CONFIG_BCM947XX if (bcm->pci_dev->bus->number == 0) - ring->routing = dma64 ? BCM43xx_DMA64_NOTRANS : BCM43xx_DMA32_NOTRANS; + ring->memoffset = 0; #endif ring->bcm = bcm; - ring->nr_slots = nr_slots; + ring->nr_slots = nr_descriptor_slots; ring->suspend_mark = ring->nr_slots * BCM43xx_TXSUSPEND_PERCENT / 100; ring->resume_mark = ring->nr_slots * BCM43xx_TXRESUME_PERCENT / 100; assert(ring->suspend_mark < ring->resume_mark); - ring->mmio_base = bcm43xx_dmacontroller_base(dma64, controller_index); - ring->index = controller_index; - ring->dma64 = !!dma64; - if (for_tx) { + ring->mmio_base = dma_controller_base; + if (tx) { ring->tx = 1; ring->current_slot = -1; } else { - if (ring->index == 0) { - ring->rx_buffersize = BCM43xx_DMA0_RX_BUFFERSIZE; - ring->frameoffset = BCM43xx_DMA0_RX_FRAMEOFFSET; - } else if (ring->index == 3) { - ring->rx_buffersize = BCM43xx_DMA3_RX_BUFFERSIZE; - ring->frameoffset = BCM43xx_DMA3_RX_FRAMEOFFSET; - } else + switch (dma_controller_base) { + case BCM43xx_MMIO_DMA1_BASE: + ring->rx_buffersize = BCM43xx_DMA1_RXBUFFERSIZE; + ring->frameoffset = BCM43xx_DMA1_RX_FRAMEOFFSET; + break; + case BCM43xx_MMIO_DMA4_BASE: + ring->rx_buffersize = BCM43xx_DMA4_RXBUFFERSIZE; + ring->frameoffset = BCM43xx_DMA4_RX_FRAMEOFFSET; + break; + default: assert(0); + } } err = alloc_ringmemory(ring); @@ -656,8 +514,7 @@ static void bcm43xx_destroy_dmaring(struct bcm43xx_dmaring *ring) if (!ring) return; - dprintk(KERN_INFO PFX "DMA-%s 0x%04X (%s) max used slots: %d/%d\n", - (ring->dma64) ? "64" : "32", + dprintk(KERN_INFO PFX "DMA 0x%04x (%s) max used slots: %d/%d\n", ring->mmio_base, (ring->tx) ? "TX" : "RX", ring->max_used_slots, ring->nr_slots); @@ -680,15 +537,10 @@ void bcm43xx_dma_free(struct bcm43xx_private *bcm) return; dma = bcm43xx_current_dma(bcm); - bcm43xx_destroy_dmaring(dma->rx_ring3); - dma->rx_ring3 = NULL; + bcm43xx_destroy_dmaring(dma->rx_ring1); + dma->rx_ring1 = NULL; bcm43xx_destroy_dmaring(dma->rx_ring0); dma->rx_ring0 = NULL; - - bcm43xx_destroy_dmaring(dma->tx_ring5); - dma->tx_ring5 = NULL; - bcm43xx_destroy_dmaring(dma->tx_ring4); - dma->tx_ring4 = NULL; bcm43xx_destroy_dmaring(dma->tx_ring3); dma->tx_ring3 = NULL; bcm43xx_destroy_dmaring(dma->tx_ring2); @@ -704,59 +556,48 @@ int bcm43xx_dma_init(struct bcm43xx_private *bcm) struct bcm43xx_dma *dma = bcm43xx_current_dma(bcm); struct bcm43xx_dmaring *ring; int err = -ENOMEM; - int dma64 = 0; - u32 sbtmstatehi; - - sbtmstatehi = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATEHIGH); - if (sbtmstatehi & BCM43xx_SBTMSTATEHIGH_DMA64BIT) - dma64 = 1; /* setup TX DMA channels. */ - ring = bcm43xx_setup_dmaring(bcm, 0, 1, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA1_BASE, + BCM43xx_TXRING_SLOTS, 1); if (!ring) goto out; dma->tx_ring0 = ring; - ring = bcm43xx_setup_dmaring(bcm, 1, 1, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA2_BASE, + BCM43xx_TXRING_SLOTS, 1); if (!ring) goto err_destroy_tx0; dma->tx_ring1 = ring; - ring = bcm43xx_setup_dmaring(bcm, 2, 1, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA3_BASE, + BCM43xx_TXRING_SLOTS, 1); if (!ring) goto err_destroy_tx1; dma->tx_ring2 = ring; - ring = bcm43xx_setup_dmaring(bcm, 3, 1, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA4_BASE, + BCM43xx_TXRING_SLOTS, 1); if (!ring) goto err_destroy_tx2; dma->tx_ring3 = ring; - ring = bcm43xx_setup_dmaring(bcm, 4, 1, dma64); - if (!ring) - goto err_destroy_tx3; - dma->tx_ring4 = ring; - - ring = bcm43xx_setup_dmaring(bcm, 5, 1, dma64); - if (!ring) - goto err_destroy_tx4; - dma->tx_ring5 = ring; - /* setup RX DMA channels. */ - ring = bcm43xx_setup_dmaring(bcm, 0, 0, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA1_BASE, + BCM43xx_RXRING_SLOTS, 0); if (!ring) - goto err_destroy_tx5; + goto err_destroy_tx3; dma->rx_ring0 = ring; if (bcm->current_core->rev < 5) { - ring = bcm43xx_setup_dmaring(bcm, 3, 0, dma64); + ring = bcm43xx_setup_dmaring(bcm, BCM43xx_MMIO_DMA4_BASE, + BCM43xx_RXRING_SLOTS, 0); if (!ring) goto err_destroy_rx0; - dma->rx_ring3 = ring; + dma->rx_ring1 = ring; } - dprintk(KERN_INFO PFX "%s DMA initialized\n", - dma64 ? "64-bit" : "32-bit"); + dprintk(KERN_INFO PFX "DMA initialized\n"); err = 0; out: return err; @@ -764,12 +605,6 @@ out: err_destroy_rx0: bcm43xx_destroy_dmaring(dma->rx_ring0); dma->rx_ring0 = NULL; -err_destroy_tx5: - bcm43xx_destroy_dmaring(dma->tx_ring5); - dma->tx_ring5 = NULL; -err_destroy_tx4: - bcm43xx_destroy_dmaring(dma->tx_ring4); - dma->tx_ring4 = NULL; err_destroy_tx3: bcm43xx_destroy_dmaring(dma->tx_ring3); dma->tx_ring3 = NULL; @@ -789,7 +624,7 @@ err_destroy_tx0: static u16 generate_cookie(struct bcm43xx_dmaring *ring, int slot) { - u16 cookie = 0x1000; + u16 cookie = 0xF000; /* Use the upper 4 bits of the cookie as * DMA controller ID and store the slot number @@ -797,25 +632,21 @@ static u16 generate_cookie(struct bcm43xx_dmaring *ring, * Note that the cookie must never be 0, as this * is a special value used in RX path. */ - switch (ring->index) { - case 0: + switch (ring->mmio_base) { + default: + assert(0); + case BCM43xx_MMIO_DMA1_BASE: cookie = 0xA000; break; - case 1: + case BCM43xx_MMIO_DMA2_BASE: cookie = 0xB000; break; - case 2: + case BCM43xx_MMIO_DMA3_BASE: cookie = 0xC000; break; - case 3: + case BCM43xx_MMIO_DMA4_BASE: cookie = 0xD000; break; - case 4: - cookie = 0xE000; - break; - case 5: - cookie = 0xF000; - break; } assert(((u16)slot & 0xF000) == 0x0000); cookie |= (u16)slot; @@ -844,12 +675,6 @@ struct bcm43xx_dmaring * parse_cookie(struct bcm43xx_private *bcm, case 0xD000: ring = dma->tx_ring3; break; - case 0xE000: - ring = dma->tx_ring4; - break; - case 0xF000: - ring = dma->tx_ring5; - break; default: assert(0); } @@ -862,9 +687,6 @@ struct bcm43xx_dmaring * parse_cookie(struct bcm43xx_private *bcm, static void dmacontroller_poke_tx(struct bcm43xx_dmaring *ring, int slot) { - u16 offset; - int descsize; - /* Everything is ready to start. Buffers are DMA mapped and * associated with slots. * "slot" is the last slot of the new frame we want to transmit. @@ -872,26 +694,25 @@ static void dmacontroller_poke_tx(struct bcm43xx_dmaring *ring, */ wmb(); slot = next_slot(ring, slot); - offset = (ring->dma64) ? BCM43xx_DMA64_TXINDEX : BCM43xx_DMA32_TXINDEX; - descsize = (ring->dma64) ? sizeof(struct bcm43xx_dmadesc64) - : sizeof(struct bcm43xx_dmadesc32); - bcm43xx_dma_write(ring, offset, - (u32)(slot * descsize)); + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_DESC_INDEX, + (u32)(slot * sizeof(struct bcm43xx_dmadesc))); } -static void dma_tx_fragment(struct bcm43xx_dmaring *ring, - struct sk_buff *skb, - u8 cur_frag) +static int dma_tx_fragment(struct bcm43xx_dmaring *ring, + struct sk_buff *skb, + u8 cur_frag) { int slot; - struct bcm43xx_dmadesc_generic *desc; + struct bcm43xx_dmadesc *desc; struct bcm43xx_dmadesc_meta *meta; - dma_addr_t dmaaddr; + u32 desc_ctl; + u32 desc_addr; assert(skb_shinfo(skb)->nr_frags == 0); slot = request_slot(ring); - desc = bcm43xx_dma_idx2desc(ring, slot, &meta); + desc = ring->vbase + slot; + meta = ring->meta + slot; /* Add a device specific TX header. */ assert(skb_headroom(skb) >= sizeof(struct bcm43xx_txhdr)); @@ -908,14 +729,29 @@ static void dma_tx_fragment(struct bcm43xx_dmaring *ring, generate_cookie(ring, slot)); meta->skb = skb; - dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); - meta->dmaaddr = dmaaddr; + meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); + if (unlikely(meta->dmaaddr + skb->len > BCM43xx_DMA_BUSADDRMAX)) { + return_slot(ring, slot); + printk(KERN_ERR PFX ">>>FATAL ERROR<<< DMA TX SKB >1G " + "(0x%llx, len: %u)\n", + (unsigned long long)meta->dmaaddr, skb->len); + return -ENOMEM; + } - fill_descriptor(ring, desc, dmaaddr, - skb->len, 1, 1, 1); + desc_addr = (u32)(meta->dmaaddr + ring->memoffset); + desc_ctl = BCM43xx_DMADTOR_FRAMESTART | BCM43xx_DMADTOR_FRAMEEND; + desc_ctl |= BCM43xx_DMADTOR_COMPIRQ; + desc_ctl |= (BCM43xx_DMADTOR_BYTECNT_MASK & + (u32)(meta->skb->len - ring->frameoffset)); + if (slot == ring->nr_slots - 1) + desc_ctl |= BCM43xx_DMADTOR_DTABLEEND; + set_desc_ctl(desc, desc_ctl); + set_desc_addr(desc, desc_addr); /* Now transfer the whole frame. */ dmacontroller_poke_tx(ring, slot); + + return 0; } int bcm43xx_dma_tx(struct bcm43xx_private *bcm, @@ -945,6 +781,7 @@ int bcm43xx_dma_tx(struct bcm43xx_private *bcm, /* Take skb from ieee80211_txb_free */ txb->fragments[i] = NULL; dma_tx_fragment(ring, skb, i); + //TODO: handle failure of dma_tx_fragment } ieee80211_txb_free(txb); @@ -955,28 +792,23 @@ void bcm43xx_dma_handle_xmitstatus(struct bcm43xx_private *bcm, struct bcm43xx_xmitstatus *status) { struct bcm43xx_dmaring *ring; - struct bcm43xx_dmadesc_generic *desc; + struct bcm43xx_dmadesc *desc; struct bcm43xx_dmadesc_meta *meta; int is_last_fragment; int slot; - u32 tmp; ring = parse_cookie(bcm, status->cookie, &slot); assert(ring); assert(ring->tx); + assert(get_desc_ctl(ring->vbase + slot) & BCM43xx_DMADTOR_FRAMESTART); while (1) { assert(slot >= 0 && slot < ring->nr_slots); - desc = bcm43xx_dma_idx2desc(ring, slot, &meta); + desc = ring->vbase + slot; + meta = ring->meta + slot; - if (ring->dma64) { - tmp = le32_to_cpu(desc->dma64.control0); - is_last_fragment = !!(tmp & BCM43xx_DMA64_DCTL0_FRAMEEND); - } else { - tmp = le32_to_cpu(desc->dma32.control); - is_last_fragment = !!(tmp & BCM43xx_DMA32_DCTL_FRAMEEND); - } + is_last_fragment = !!(get_desc_ctl(desc) & BCM43xx_DMADTOR_FRAMEEND); unmap_descbuffer(ring, meta->dmaaddr, meta->skb->len, 1); - free_descriptor_buffer(ring, meta, 1); + free_descriptor_buffer(ring, desc, meta, 1); /* Everything belonging to the slot is unmapped * and freed, so we can return it. */ @@ -992,7 +824,7 @@ void bcm43xx_dma_handle_xmitstatus(struct bcm43xx_private *bcm, static void dma_rx(struct bcm43xx_dmaring *ring, int *slot) { - struct bcm43xx_dmadesc_generic *desc; + struct bcm43xx_dmadesc *desc; struct bcm43xx_dmadesc_meta *meta; struct bcm43xx_rxhdr *rxhdr; struct sk_buff *skb; @@ -1000,12 +832,13 @@ static void dma_rx(struct bcm43xx_dmaring *ring, int err; dma_addr_t dmaaddr; - desc = bcm43xx_dma_idx2desc(ring, *slot, &meta); + desc = ring->vbase + *slot; + meta = ring->meta + *slot; sync_descbuffer_for_cpu(ring, meta->dmaaddr, ring->rx_buffersize); skb = meta->skb; - if (ring->index == 3) { + if (ring->mmio_base == BCM43xx_MMIO_DMA4_BASE) { /* We received an xmit status. */ struct bcm43xx_hwxmitstatus *hw = (struct bcm43xx_hwxmitstatus *)skb->data; struct bcm43xx_xmitstatus stat; @@ -1061,7 +894,8 @@ static void dma_rx(struct bcm43xx_dmaring *ring, s32 tmp = len; while (1) { - desc = bcm43xx_dma_idx2desc(ring, *slot, &meta); + desc = ring->vbase + *slot; + meta = ring->meta + *slot; /* recycle the descriptor buffer. */ sync_descbuffer_for_device(ring, meta->dmaaddr, ring->rx_buffersize); @@ -1072,8 +906,8 @@ static void dma_rx(struct bcm43xx_dmaring *ring, break; } printkl(KERN_ERR PFX "DMA RX buffer too small " - "(len: %u, buffer: %u, nr-dropped: %d)\n", - len, ring->rx_buffersize, cnt); + "(len: %u, buffer: %u, nr-dropped: %d)\n", + len, ring->rx_buffersize, cnt); goto drop; } len -= IEEE80211_FCS_LEN; @@ -1111,15 +945,9 @@ void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring) #endif assert(!ring->tx); - if (ring->dma64) { - status = bcm43xx_dma_read(ring, BCM43xx_DMA64_RXSTATUS); - descptr = (status & BCM43xx_DMA64_RXSTATDPTR); - current_slot = descptr / sizeof(struct bcm43xx_dmadesc64); - } else { - status = bcm43xx_dma_read(ring, BCM43xx_DMA32_RXSTATUS); - descptr = (status & BCM43xx_DMA32_RXDPTR); - current_slot = descptr / sizeof(struct bcm43xx_dmadesc32); - } + status = bcm43xx_dma_read(ring, BCM43xx_DMA_RX_STATUS); + descptr = (status & BCM43xx_DMA_RXSTAT_DPTR_MASK); + current_slot = descptr / sizeof(struct bcm43xx_dmadesc); assert(current_slot >= 0 && current_slot < ring->nr_slots); slot = ring->current_slot; @@ -1130,13 +958,8 @@ void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring) ring->max_used_slots = used_slots; #endif } - if (ring->dma64) { - bcm43xx_dma_write(ring, BCM43xx_DMA64_RXINDEX, - (u32)(slot * sizeof(struct bcm43xx_dmadesc64))); - } else { - bcm43xx_dma_write(ring, BCM43xx_DMA32_RXINDEX, - (u32)(slot * sizeof(struct bcm43xx_dmadesc32))); - } + bcm43xx_dma_write(ring, BCM43xx_DMA_RX_DESC_INDEX, + (u32)(slot * sizeof(struct bcm43xx_dmadesc))); ring->current_slot = slot; } @@ -1144,28 +967,16 @@ void bcm43xx_dma_tx_suspend(struct bcm43xx_dmaring *ring) { assert(ring->tx); bcm43xx_power_saving_ctl_bits(ring->bcm, -1, 1); - if (ring->dma64) { - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXCTL, - bcm43xx_dma_read(ring, BCM43xx_DMA64_TXCTL) - | BCM43xx_DMA64_TXSUSPEND); - } else { - bcm43xx_dma_write(ring, BCM43xx_DMA32_TXCTL, - bcm43xx_dma_read(ring, BCM43xx_DMA32_TXCTL) - | BCM43xx_DMA32_TXSUSPEND); - } + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_CONTROL, + bcm43xx_dma_read(ring, BCM43xx_DMA_TX_CONTROL) + | BCM43xx_DMA_TXCTRL_SUSPEND); } void bcm43xx_dma_tx_resume(struct bcm43xx_dmaring *ring) { assert(ring->tx); - if (ring->dma64) { - bcm43xx_dma_write(ring, BCM43xx_DMA64_TXCTL, - bcm43xx_dma_read(ring, BCM43xx_DMA64_TXCTL) - & ~BCM43xx_DMA64_TXSUSPEND); - } else { - bcm43xx_dma_write(ring, BCM43xx_DMA32_TXCTL, - bcm43xx_dma_read(ring, BCM43xx_DMA32_TXCTL) - & ~BCM43xx_DMA32_TXSUSPEND); - } + bcm43xx_dma_write(ring, BCM43xx_DMA_TX_CONTROL, + bcm43xx_dma_read(ring, BCM43xx_DMA_TX_CONTROL) + & ~BCM43xx_DMA_TXCTRL_SUSPEND); bcm43xx_power_saving_ctl_bits(ring->bcm, -1, -1); } diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_dma.h b/drivers/net/wireless/bcm43xx/bcm43xx_dma.h index e04bcaddd..b7d77638b 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_dma.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_dma.h @@ -14,179 +14,63 @@ #define BCM43xx_DMAIRQ_NONFATALMASK (1 << 13) #define BCM43xx_DMAIRQ_RX_DONE (1 << 16) - -/*** 32-bit DMA Engine. ***/ - -/* 32-bit DMA controller registers. */ -#define BCM43xx_DMA32_TXCTL 0x00 -#define BCM43xx_DMA32_TXENABLE 0x00000001 -#define BCM43xx_DMA32_TXSUSPEND 0x00000002 -#define BCM43xx_DMA32_TXLOOPBACK 0x00000004 -#define BCM43xx_DMA32_TXFLUSH 0x00000010 -#define BCM43xx_DMA32_TXADDREXT_MASK 0x00030000 -#define BCM43xx_DMA32_TXADDREXT_SHIFT 16 -#define BCM43xx_DMA32_TXRING 0x04 -#define BCM43xx_DMA32_TXINDEX 0x08 -#define BCM43xx_DMA32_TXSTATUS 0x0C -#define BCM43xx_DMA32_TXDPTR 0x00000FFF -#define BCM43xx_DMA32_TXSTATE 0x0000F000 -#define BCM43xx_DMA32_TXSTAT_DISABLED 0x00000000 -#define BCM43xx_DMA32_TXSTAT_ACTIVE 0x00001000 -#define BCM43xx_DMA32_TXSTAT_IDLEWAIT 0x00002000 -#define BCM43xx_DMA32_TXSTAT_STOPPED 0x00003000 -#define BCM43xx_DMA32_TXSTAT_SUSP 0x00004000 -#define BCM43xx_DMA32_TXERROR 0x000F0000 -#define BCM43xx_DMA32_TXERR_NOERR 0x00000000 -#define BCM43xx_DMA32_TXERR_PROT 0x00010000 -#define BCM43xx_DMA32_TXERR_UNDERRUN 0x00020000 -#define BCM43xx_DMA32_TXERR_BUFREAD 0x00030000 -#define BCM43xx_DMA32_TXERR_DESCREAD 0x00040000 -#define BCM43xx_DMA32_TXACTIVE 0xFFF00000 -#define BCM43xx_DMA32_RXCTL 0x10 -#define BCM43xx_DMA32_RXENABLE 0x00000001 -#define BCM43xx_DMA32_RXFROFF_MASK 0x000000FE -#define BCM43xx_DMA32_RXFROFF_SHIFT 1 -#define BCM43xx_DMA32_RXDIRECTFIFO 0x00000100 -#define BCM43xx_DMA32_RXADDREXT_MASK 0x00030000 -#define BCM43xx_DMA32_RXADDREXT_SHIFT 16 -#define BCM43xx_DMA32_RXRING 0x14 -#define BCM43xx_DMA32_RXINDEX 0x18 -#define BCM43xx_DMA32_RXSTATUS 0x1C -#define BCM43xx_DMA32_RXDPTR 0x00000FFF -#define BCM43xx_DMA32_RXSTATE 0x0000F000 -#define BCM43xx_DMA32_RXSTAT_DISABLED 0x00000000 -#define BCM43xx_DMA32_RXSTAT_ACTIVE 0x00001000 -#define BCM43xx_DMA32_RXSTAT_IDLEWAIT 0x00002000 -#define BCM43xx_DMA32_RXSTAT_STOPPED 0x00003000 -#define BCM43xx_DMA32_RXERROR 0x000F0000 -#define BCM43xx_DMA32_RXERR_NOERR 0x00000000 -#define BCM43xx_DMA32_RXERR_PROT 0x00010000 -#define BCM43xx_DMA32_RXERR_OVERFLOW 0x00020000 -#define BCM43xx_DMA32_RXERR_BUFWRITE 0x00030000 -#define BCM43xx_DMA32_RXERR_DESCREAD 0x00040000 -#define BCM43xx_DMA32_RXACTIVE 0xFFF00000 - -/* 32-bit DMA descriptor. */ -struct bcm43xx_dmadesc32 { - __le32 control; - __le32 address; -} __attribute__((__packed__)); -#define BCM43xx_DMA32_DCTL_BYTECNT 0x00001FFF -#define BCM43xx_DMA32_DCTL_ADDREXT_MASK 0x00030000 -#define BCM43xx_DMA32_DCTL_ADDREXT_SHIFT 16 -#define BCM43xx_DMA32_DCTL_DTABLEEND 0x10000000 -#define BCM43xx_DMA32_DCTL_IRQ 0x20000000 -#define BCM43xx_DMA32_DCTL_FRAMEEND 0x40000000 -#define BCM43xx_DMA32_DCTL_FRAMESTART 0x80000000 - -/* Address field Routing value. */ -#define BCM43xx_DMA32_ROUTING 0xC0000000 -#define BCM43xx_DMA32_ROUTING_SHIFT 30 -#define BCM43xx_DMA32_NOTRANS 0x00000000 -#define BCM43xx_DMA32_CLIENTTRANS 0x40000000 - - - -/*** 64-bit DMA Engine. ***/ - -/* 64-bit DMA controller registers. */ -#define BCM43xx_DMA64_TXCTL 0x00 -#define BCM43xx_DMA64_TXENABLE 0x00000001 -#define BCM43xx_DMA64_TXSUSPEND 0x00000002 -#define BCM43xx_DMA64_TXLOOPBACK 0x00000004 -#define BCM43xx_DMA64_TXFLUSH 0x00000010 -#define BCM43xx_DMA64_TXADDREXT_MASK 0x00030000 -#define BCM43xx_DMA64_TXADDREXT_SHIFT 16 -#define BCM43xx_DMA64_TXINDEX 0x04 -#define BCM43xx_DMA64_TXRINGLO 0x08 -#define BCM43xx_DMA64_TXRINGHI 0x0C -#define BCM43xx_DMA64_TXSTATUS 0x10 -#define BCM43xx_DMA64_TXSTATDPTR 0x00001FFF -#define BCM43xx_DMA64_TXSTAT 0xF0000000 -#define BCM43xx_DMA64_TXSTAT_DISABLED 0x00000000 -#define BCM43xx_DMA64_TXSTAT_ACTIVE 0x10000000 -#define BCM43xx_DMA64_TXSTAT_IDLEWAIT 0x20000000 -#define BCM43xx_DMA64_TXSTAT_STOPPED 0x30000000 -#define BCM43xx_DMA64_TXSTAT_SUSP 0x40000000 -#define BCM43xx_DMA64_TXERROR 0x14 -#define BCM43xx_DMA64_TXERRDPTR 0x0001FFFF -#define BCM43xx_DMA64_TXERR 0xF0000000 -#define BCM43xx_DMA64_TXERR_NOERR 0x00000000 -#define BCM43xx_DMA64_TXERR_PROT 0x10000000 -#define BCM43xx_DMA64_TXERR_UNDERRUN 0x20000000 -#define BCM43xx_DMA64_TXERR_TRANSFER 0x30000000 -#define BCM43xx_DMA64_TXERR_DESCREAD 0x40000000 -#define BCM43xx_DMA64_TXERR_CORE 0x50000000 -#define BCM43xx_DMA64_RXCTL 0x20 -#define BCM43xx_DMA64_RXENABLE 0x00000001 -#define BCM43xx_DMA64_RXFROFF_MASK 0x000000FE -#define BCM43xx_DMA64_RXFROFF_SHIFT 1 -#define BCM43xx_DMA64_RXDIRECTFIFO 0x00000100 -#define BCM43xx_DMA64_RXADDREXT_MASK 0x00030000 -#define BCM43xx_DMA64_RXADDREXT_SHIFT 16 -#define BCM43xx_DMA64_RXINDEX 0x24 -#define BCM43xx_DMA64_RXRINGLO 0x28 -#define BCM43xx_DMA64_RXRINGHI 0x2C -#define BCM43xx_DMA64_RXSTATUS 0x30 -#define BCM43xx_DMA64_RXSTATDPTR 0x00001FFF -#define BCM43xx_DMA64_RXSTAT 0xF0000000 -#define BCM43xx_DMA64_RXSTAT_DISABLED 0x00000000 -#define BCM43xx_DMA64_RXSTAT_ACTIVE 0x10000000 -#define BCM43xx_DMA64_RXSTAT_IDLEWAIT 0x20000000 -#define BCM43xx_DMA64_RXSTAT_STOPPED 0x30000000 -#define BCM43xx_DMA64_RXSTAT_SUSP 0x40000000 -#define BCM43xx_DMA64_RXERROR 0x34 -#define BCM43xx_DMA64_RXERRDPTR 0x0001FFFF -#define BCM43xx_DMA64_RXERR 0xF0000000 -#define BCM43xx_DMA64_RXERR_NOERR 0x00000000 -#define BCM43xx_DMA64_RXERR_PROT 0x10000000 -#define BCM43xx_DMA64_RXERR_UNDERRUN 0x20000000 -#define BCM43xx_DMA64_RXERR_TRANSFER 0x30000000 -#define BCM43xx_DMA64_RXERR_DESCREAD 0x40000000 -#define BCM43xx_DMA64_RXERR_CORE 0x50000000 - -/* 64-bit DMA descriptor. */ -struct bcm43xx_dmadesc64 { - __le32 control0; - __le32 control1; - __le32 address_low; - __le32 address_high; -} __attribute__((__packed__)); -#define BCM43xx_DMA64_DCTL0_DTABLEEND 0x10000000 -#define BCM43xx_DMA64_DCTL0_IRQ 0x20000000 -#define BCM43xx_DMA64_DCTL0_FRAMEEND 0x40000000 -#define BCM43xx_DMA64_DCTL0_FRAMESTART 0x80000000 -#define BCM43xx_DMA64_DCTL1_BYTECNT 0x00001FFF -#define BCM43xx_DMA64_DCTL1_ADDREXT_MASK 0x00030000 -#define BCM43xx_DMA64_DCTL1_ADDREXT_SHIFT 16 - -/* Address field Routing value. */ -#define BCM43xx_DMA64_ROUTING 0xC0000000 -#define BCM43xx_DMA64_ROUTING_SHIFT 30 -#define BCM43xx_DMA64_NOTRANS 0x00000000 -#define BCM43xx_DMA64_CLIENTTRANS 0x80000000 - - - -struct bcm43xx_dmadesc_generic { - union { - struct bcm43xx_dmadesc32 dma32; - struct bcm43xx_dmadesc64 dma64; - } __attribute__((__packed__)); -} __attribute__((__packed__)); - +/* DMA controller register offsets. (relative to BCM43xx_DMA#_BASE) */ +#define BCM43xx_DMA_TX_CONTROL 0x00 +#define BCM43xx_DMA_TX_DESC_RING 0x04 +#define BCM43xx_DMA_TX_DESC_INDEX 0x08 +#define BCM43xx_DMA_TX_STATUS 0x0c +#define BCM43xx_DMA_RX_CONTROL 0x10 +#define BCM43xx_DMA_RX_DESC_RING 0x14 +#define BCM43xx_DMA_RX_DESC_INDEX 0x18 +#define BCM43xx_DMA_RX_STATUS 0x1c + +/* DMA controller channel control word values. */ +#define BCM43xx_DMA_TXCTRL_ENABLE (1 << 0) +#define BCM43xx_DMA_TXCTRL_SUSPEND (1 << 1) +#define BCM43xx_DMA_TXCTRL_LOOPBACK (1 << 2) +#define BCM43xx_DMA_TXCTRL_FLUSH (1 << 4) +#define BCM43xx_DMA_RXCTRL_ENABLE (1 << 0) +#define BCM43xx_DMA_RXCTRL_FRAMEOFF_MASK 0x000000fe +#define BCM43xx_DMA_RXCTRL_FRAMEOFF_SHIFT 1 +#define BCM43xx_DMA_RXCTRL_PIO (1 << 8) +/* DMA controller channel status word values. */ +#define BCM43xx_DMA_TXSTAT_DPTR_MASK 0x00000fff +#define BCM43xx_DMA_TXSTAT_STAT_MASK 0x0000f000 +#define BCM43xx_DMA_TXSTAT_STAT_DISABLED 0x00000000 +#define BCM43xx_DMA_TXSTAT_STAT_ACTIVE 0x00001000 +#define BCM43xx_DMA_TXSTAT_STAT_IDLEWAIT 0x00002000 +#define BCM43xx_DMA_TXSTAT_STAT_STOPPED 0x00003000 +#define BCM43xx_DMA_TXSTAT_STAT_SUSP 0x00004000 +#define BCM43xx_DMA_TXSTAT_ERROR_MASK 0x000f0000 +#define BCM43xx_DMA_TXSTAT_FLUSHED (1 << 20) +#define BCM43xx_DMA_RXSTAT_DPTR_MASK 0x00000fff +#define BCM43xx_DMA_RXSTAT_STAT_MASK 0x0000f000 +#define BCM43xx_DMA_RXSTAT_STAT_DISABLED 0x00000000 +#define BCM43xx_DMA_RXSTAT_STAT_ACTIVE 0x00001000 +#define BCM43xx_DMA_RXSTAT_STAT_IDLEWAIT 0x00002000 +#define BCM43xx_DMA_RXSTAT_STAT_RESERVED 0x00003000 +#define BCM43xx_DMA_RXSTAT_STAT_ERRORS 0x00004000 +#define BCM43xx_DMA_RXSTAT_ERROR_MASK 0x000f0000 + +/* DMA descriptor control field values. */ +#define BCM43xx_DMADTOR_BYTECNT_MASK 0x00001fff +#define BCM43xx_DMADTOR_DTABLEEND (1 << 28) /* End of descriptor table */ +#define BCM43xx_DMADTOR_COMPIRQ (1 << 29) /* IRQ on completion request */ +#define BCM43xx_DMADTOR_FRAMEEND (1 << 30) +#define BCM43xx_DMADTOR_FRAMESTART (1 << 31) /* Misc DMA constants */ #define BCM43xx_DMA_RINGMEMSIZE PAGE_SIZE -#define BCM43xx_DMA0_RX_FRAMEOFFSET 30 -#define BCM43xx_DMA3_RX_FRAMEOFFSET 0 - +#define BCM43xx_DMA_BUSADDRMAX 0x3FFFFFFF +#define BCM43xx_DMA_DMABUSADDROFFSET (1 << 30) +#define BCM43xx_DMA1_RX_FRAMEOFFSET 30 +#define BCM43xx_DMA4_RX_FRAMEOFFSET 0 /* DMA engine tuning knobs */ #define BCM43xx_TXRING_SLOTS 512 #define BCM43xx_RXRING_SLOTS 64 -#define BCM43xx_DMA0_RX_BUFFERSIZE (2304 + 100) -#define BCM43xx_DMA3_RX_BUFFERSIZE 16 +#define BCM43xx_DMA1_RXBUFFERSIZE (2304 + 100) +#define BCM43xx_DMA4_RXBUFFERSIZE 16 /* Suspend the tx queue, if less than this percent slots are free. */ #define BCM43xx_TXSUSPEND_PERCENT 20 /* Resume the tx queue, if more than this percent slots are free. */ @@ -202,6 +86,17 @@ struct bcm43xx_private; struct bcm43xx_xmitstatus; +struct bcm43xx_dmadesc { + __le32 _control; + __le32 _address; +} __attribute__((__packed__)); + +/* Macros to access the bcm43xx_dmadesc struct */ +#define get_desc_ctl(desc) le32_to_cpu((desc)->_control) +#define set_desc_ctl(desc, ctl) do { (desc)->_control = cpu_to_le32(ctl); } while (0) +#define get_desc_addr(desc) le32_to_cpu((desc)->_address) +#define set_desc_addr(desc, addr) do { (desc)->_address = cpu_to_le32(addr); } while (0) + struct bcm43xx_dmadesc_meta { /* The kernel DMA-able buffer. */ struct sk_buff *skb; @@ -210,14 +105,15 @@ struct bcm43xx_dmadesc_meta { }; struct bcm43xx_dmaring { + struct bcm43xx_private *bcm; /* Kernel virtual base address of the ring memory. */ - void *descbase; - /* Meta data about all descriptors. */ - struct bcm43xx_dmadesc_meta *meta; - /* DMA Routing value. */ - u32 routing; + struct bcm43xx_dmadesc *vbase; + /* DMA memory offset */ + dma_addr_t memoffset; /* (Unadjusted) DMA base bus-address of the ring memory. */ dma_addr_t dmabase; + /* Meta data about all descriptors. */ + struct bcm43xx_dmadesc_meta *meta; /* Number of descriptor slots in the ring. */ int nr_slots; /* Number of used descriptor slots. */ @@ -231,17 +127,12 @@ struct bcm43xx_dmaring { u32 frameoffset; /* Descriptor buffer size. */ u16 rx_buffersize; - /* The MMIO base register of the DMA controller. */ + /* The MMIO base register of the DMA controller, this + * ring is posted to. + */ u16 mmio_base; - /* DMA controller index number (0-5). */ - int index; - /* Boolean. Is this a TX ring? */ - u8 tx; - /* Boolean. 64bit DMA if true, 32bit DMA otherwise. */ - u8 dma64; - /* Boolean. Are transfers suspended on this ring? */ - u8 suspended; - struct bcm43xx_private *bcm; + u8 tx:1, /* TRUE, if this is a TX ring. */ + suspended:1; /* TRUE, if transfers are suspended on this ring. */ #ifdef CONFIG_BCM43XX_DEBUG /* Maximum number of used slots. */ int max_used_slots; @@ -249,34 +140,6 @@ struct bcm43xx_dmaring { }; -static inline -int bcm43xx_dma_desc2idx(struct bcm43xx_dmaring *ring, - struct bcm43xx_dmadesc_generic *desc) -{ - if (ring->dma64) { - struct bcm43xx_dmadesc64 *dd64 = ring->descbase; - return (int)(&(desc->dma64) - dd64); - } else { - struct bcm43xx_dmadesc32 *dd32 = ring->descbase; - return (int)(&(desc->dma32) - dd32); - } -} - -static inline -struct bcm43xx_dmadesc_generic * bcm43xx_dma_idx2desc(struct bcm43xx_dmaring *ring, - int slot, - struct bcm43xx_dmadesc_meta **meta) -{ - *meta = &(ring->meta[slot]); - if (ring->dma64) { - struct bcm43xx_dmadesc64 *dd64 = ring->descbase; - return (struct bcm43xx_dmadesc_generic *)(&(dd64[slot])); - } else { - struct bcm43xx_dmadesc32 *dd32 = ring->descbase; - return (struct bcm43xx_dmadesc_generic *)(&(dd32[slot])); - } -} - static inline u32 bcm43xx_dma_read(struct bcm43xx_dmaring *ring, u16 offset) @@ -296,13 +159,9 @@ int bcm43xx_dma_init(struct bcm43xx_private *bcm); void bcm43xx_dma_free(struct bcm43xx_private *bcm); int bcm43xx_dmacontroller_rx_reset(struct bcm43xx_private *bcm, - u16 dmacontroller_mmio_base, - int dma64); + u16 dmacontroller_mmio_base); int bcm43xx_dmacontroller_tx_reset(struct bcm43xx_private *bcm, - u16 dmacontroller_mmio_base, - int dma64); - -u16 bcm43xx_dmacontroller_base(int dma64bit, int dmacontroller_idx); + u16 dmacontroller_mmio_base); void bcm43xx_dma_tx_suspend(struct bcm43xx_dmaring *ring); void bcm43xx_dma_tx_resume(struct bcm43xx_dmaring *ring); @@ -314,6 +173,7 @@ int bcm43xx_dma_tx(struct bcm43xx_private *bcm, struct ieee80211_txb *txb); void bcm43xx_dma_rx(struct bcm43xx_dmaring *ring); + #else /* CONFIG_BCM43XX_DMA */ @@ -328,15 +188,13 @@ void bcm43xx_dma_free(struct bcm43xx_private *bcm) } static inline int bcm43xx_dmacontroller_rx_reset(struct bcm43xx_private *bcm, - u16 dmacontroller_mmio_base, - int dma64) + u16 dmacontroller_mmio_base) { return 0; } static inline int bcm43xx_dmacontroller_tx_reset(struct bcm43xx_private *bcm, - u16 dmacontroller_mmio_base, - int dma64) + u16 dmacontroller_mmio_base) { return 0; } diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c b/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c index e386dcc32..b3ffcf501 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c index c3f90c856..4b2c02c0b 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_leds.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_leds.c @@ -51,12 +51,12 @@ static void bcm43xx_led_blink(unsigned long d) struct bcm43xx_private *bcm = led->bcm; unsigned long flags; - spin_lock_irqsave(&bcm->leds_lock, flags); + bcm43xx_lock_mmio(bcm, flags); if (led->blink_interval) { bcm43xx_led_changestate(led); mod_timer(&led->blink_timer, jiffies + led->blink_interval); } - spin_unlock_irqrestore(&bcm->leds_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); } static void bcm43xx_led_blink_start(struct bcm43xx_led *led, @@ -177,9 +177,7 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) int i, turn_on; unsigned long interval = 0; u16 ledctl; - unsigned long flags; - spin_lock_irqsave(&bcm->leds_lock, flags); ledctl = bcm43xx_read16(bcm, BCM43xx_MMIO_GPIO_CONTROL); for (i = 0; i < BCM43xx_NR_LEDS; i++) { led = &(bcm->leds[i]); @@ -268,7 +266,6 @@ void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity) ledctl &= ~(1 << i); } bcm43xx_write16(bcm, BCM43xx_MMIO_GPIO_CONTROL, ledctl); - spin_unlock_irqrestore(&bcm->leds_lock, flags); } void bcm43xx_leds_switch_all(struct bcm43xx_private *bcm, int on) @@ -277,9 +274,7 @@ void bcm43xx_leds_switch_all(struct bcm43xx_private *bcm, int on) u16 ledctl; int i; int bit_on; - unsigned long flags; - spin_lock_irqsave(&bcm->leds_lock, flags); ledctl = bcm43xx_read16(bcm, BCM43xx_MMIO_GPIO_CONTROL); for (i = 0; i < BCM43xx_NR_LEDS; i++) { led = &(bcm->leds[i]); @@ -295,5 +290,4 @@ void bcm43xx_leds_switch_all(struct bcm43xx_private *bcm, int on) ledctl &= ~(1 << i); } bcm43xx_write16(bcm, BCM43xx_MMIO_GPIO_CONTROL, ledctl); - spin_unlock_irqrestore(&bcm->leds_lock, flags); } diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 42eecf252..513fc759f 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c @@ -128,15 +128,13 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for debugging."); static struct pci_device_id bcm43xx_pci_tbl[] = { /* Broadcom 4303 802.11b */ { PCI_VENDOR_ID_BROADCOM, 0x4301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Broadcom 4307 802.11b */ + /* Broadcom 4307 802.11b */ { PCI_VENDOR_ID_BROADCOM, 0x4307, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Broadcom 4318 802.11b/g */ + /* Broadcom 4318 802.11b/g */ { PCI_VENDOR_ID_BROADCOM, 0x4318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Broadcom 4319 802.11a/b/g */ - { PCI_VENDOR_ID_BROADCOM, 0x4319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Broadcom 4306 802.11b/g */ { PCI_VENDOR_ID_BROADCOM, 0x4320, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, - /* Broadcom 4306 802.11a */ + /* Broadcom 4306 802.11a */ // { PCI_VENDOR_ID_BROADCOM, 0x4321, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Broadcom 4309 802.11a/b/g */ { PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, @@ -498,30 +496,22 @@ static inline u32 bcm43xx_interrupt_disable(struct bcm43xx_private *bcm, u32 mas return old_mask; } -/* Synchronize IRQ top- and bottom-half. - * IRQs must be masked before calling this. - * This must not be called with the irq_lock held. - */ -static void bcm43xx_synchronize_irq(struct bcm43xx_private *bcm) -{ - synchronize_irq(bcm->irq); - tasklet_disable(&bcm->isr_tasklet); -} - /* Make sure we don't receive more data from the device. */ -static int bcm43xx_disable_interrupts_sync(struct bcm43xx_private *bcm) +static int bcm43xx_disable_interrupts_sync(struct bcm43xx_private *bcm, u32 *oldstate) { + u32 old; unsigned long flags; - spin_lock_irqsave(&bcm->irq_lock, flags); - if (unlikely(bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED)) { - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); + if (bcm43xx_is_initializing(bcm) || bcm->shutting_down) { + bcm43xx_unlock_mmio(bcm, flags); return -EBUSY; } - bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); - bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_MASK); /* flush */ - spin_unlock_irqrestore(&bcm->irq_lock, flags); - bcm43xx_synchronize_irq(bcm); + old = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); + tasklet_disable(&bcm->isr_tasklet); + bcm43xx_unlock_mmio(bcm, flags); + if (oldstate) + *oldstate = old; return 0; } @@ -534,6 +524,7 @@ static int bcm43xx_read_radioinfo(struct bcm43xx_private *bcm) u16 manufact; u16 version; u8 revision; + s8 i; if (bcm->chip_id == 0x4317) { if (bcm->chip_rev == 0x00) @@ -576,11 +567,20 @@ static int bcm43xx_read_radioinfo(struct bcm43xx_private *bcm) radio->version = version; radio->revision = revision; + /* Set default attenuation values. */ + radio->baseband_atten = bcm43xx_default_baseband_attenuation(bcm); + radio->radio_atten = bcm43xx_default_radio_attenuation(bcm); + radio->txctl1 = bcm43xx_default_txctl1(bcm); + radio->txctl2 = 0xFFFF; if (phy->type == BCM43xx_PHYTYPE_A) radio->txpower_desired = bcm->sprom.maxpower_aphy; else radio->txpower_desired = bcm->sprom.maxpower_bgphy; + /* Initialize the in-memory nrssi Lookup Table. */ + for (i = 0; i < 64; i++) + radio->nrssi_lt[i] = i; + return 0; err_unsupported_radio: @@ -1237,6 +1237,10 @@ int bcm43xx_switch_core(struct bcm43xx_private *bcm, struct bcm43xx_coreinfo *ne goto out; bcm->current_core = new_core; + bcm->current_80211_core_idx = -1; + if (new_core->id == BCM43xx_COREID_80211) + bcm->current_80211_core_idx = (int)(new_core - &(bcm->core_80211[0])); + out: return err; } @@ -1372,7 +1376,6 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy) if ((bcm43xx_core_enabled(bcm)) && !bcm43xx_using_pio(bcm)) { //FIXME: Do we _really_ want #ifndef CONFIG_BCM947XX here? -#if 0 #ifndef CONFIG_BCM947XX /* reset all used DMA controllers. */ bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA1_BASE); @@ -1382,10 +1385,9 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy) bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA1_BASE); if (bcm->current_core->rev < 5) bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA4_BASE); -#endif #endif } - if (bcm43xx_status(bcm) == BCM43xx_STAT_SHUTTINGDOWN) { + if (bcm->shutting_down) { bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD) & ~(BCM43xx_SBF_MAC_ENABLED | 0x00000002)); @@ -1408,23 +1410,43 @@ static void bcm43xx_wireless_core_disable(struct bcm43xx_private *bcm) bcm43xx_core_disable(bcm, 0); } -/* Mark the current 80211 core inactive. */ -static void bcm43xx_wireless_core_mark_inactive(struct bcm43xx_private *bcm) +/* Mark the current 80211 core inactive. + * "active_80211_core" is the other 80211 core, which is used. + */ +static int bcm43xx_wireless_core_mark_inactive(struct bcm43xx_private *bcm, + struct bcm43xx_coreinfo *active_80211_core) { u32 sbtmstatelow; + struct bcm43xx_coreinfo *old_core; + int err = 0; bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); bcm43xx_radio_turn_off(bcm); sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - sbtmstatelow &= 0xDFF5FFFF; - sbtmstatelow |= 0x000A0000; + sbtmstatelow &= ~0x200a0000; + sbtmstatelow |= 0xa0000; bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); udelay(1); sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - sbtmstatelow &= 0xFFF5FFFF; - sbtmstatelow |= 0x00080000; + sbtmstatelow &= ~0xa0000; + sbtmstatelow |= 0x80000; bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); udelay(1); + + if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_G) { + old_core = bcm->current_core; + err = bcm43xx_switch_core(bcm, active_80211_core); + if (err) + goto out; + sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); + sbtmstatelow &= ~0x20000000; + sbtmstatelow |= 0x20000000; + bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); + err = bcm43xx_switch_core(bcm, old_core); + } + +out: + return err; } static void handle_irq_transmit_status(struct bcm43xx_private *bcm) @@ -1463,23 +1485,6 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm) } } -static void drain_txstatus_queue(struct bcm43xx_private *bcm) -{ - u32 dummy; - - if (bcm->current_core->rev < 5) - return; - /* Read all entries from the microcode TXstatus FIFO - * and throw them away. - */ - while (1) { - dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0); - if (!dummy) - break; - dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1); - } -} - static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) { bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); @@ -1529,7 +1534,7 @@ static void handle_irq_noise(struct bcm43xx_private *bcm) goto generate_new; /* Get the noise samples. */ - assert(bcm->noisecalc.nr_samples < 8); + assert(bcm->noisecalc.nr_samples <= 8); i = bcm->noisecalc.nr_samples; noise[0] = limit_value(noise[0], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); noise[1] = limit_value(noise[1], 0, ARRAY_SIZE(radio->nrssi_lt) - 1); @@ -1563,7 +1568,17 @@ static void handle_irq_noise(struct bcm43xx_private *bcm) else average -= 48; - bcm->stats.noise = average; +/* FIXME: This is wrong, but people want fancy stats. well... */ +bcm->stats.noise = average; + if (average > -65) + bcm->stats.link_quality = 0; + else if (average > -75) + bcm->stats.link_quality = 1; + else if (average > -85) + bcm->stats.link_quality = 2; + else + bcm->stats.link_quality = 3; +// dprintk(KERN_INFO PFX "Link Quality: %u (avg was %d)\n", bcm->stats.link_quality, average); drop_calculation: bcm->noisecalc.calculation_running = 0; return; @@ -1681,9 +1696,8 @@ static void handle_irq_beacon(struct bcm43xx_private *bcm) static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) { u32 reason; - u32 dma_reason[6]; - u32 merged_dma_reason = 0; - int i, activity = 0; + u32 dma_reason[4]; + int activity = 0; unsigned long flags; #ifdef CONFIG_BCM43XX_DEBUG @@ -1693,12 +1707,12 @@ static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) # define bcmirq_handled(irq) do { /* nothing */ } while (0) #endif /* CONFIG_BCM43XX_DEBUG*/ - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); reason = bcm->irq_reason; - for (i = 5; i >= 0; i--) { - dma_reason[i] = bcm->dma_reason[i]; - merged_dma_reason |= dma_reason[i]; - } + dma_reason[0] = bcm->dma_reason[0]; + dma_reason[1] = bcm->dma_reason[1]; + dma_reason[2] = bcm->dma_reason[2]; + dma_reason[3] = bcm->dma_reason[3]; if (unlikely(reason & BCM43xx_IRQ_XMIT_ERROR)) { /* TX error. We get this when Template Ram is written in wrong endianess @@ -1709,25 +1723,26 @@ static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) printkl(KERN_ERR PFX "FATAL ERROR: BCM43xx_IRQ_XMIT_ERROR\n"); bcmirq_handled(BCM43xx_IRQ_XMIT_ERROR); } - if (unlikely(merged_dma_reason & BCM43xx_DMAIRQ_FATALMASK)) { + if (unlikely((dma_reason[0] & BCM43xx_DMAIRQ_FATALMASK) | + (dma_reason[1] & BCM43xx_DMAIRQ_FATALMASK) | + (dma_reason[2] & BCM43xx_DMAIRQ_FATALMASK) | + (dma_reason[3] & BCM43xx_DMAIRQ_FATALMASK))) { printkl(KERN_ERR PFX "FATAL ERROR: Fatal DMA error: " - "0x%08X, 0x%08X, 0x%08X, " - "0x%08X, 0x%08X, 0x%08X\n", + "0x%08X, 0x%08X, 0x%08X, 0x%08X\n", dma_reason[0], dma_reason[1], - dma_reason[2], dma_reason[3], - dma_reason[4], dma_reason[5]); + dma_reason[2], dma_reason[3]); bcm43xx_controller_restart(bcm, "DMA error"); - mmiowb(); - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); return; } - if (unlikely(merged_dma_reason & BCM43xx_DMAIRQ_NONFATALMASK)) { + if (unlikely((dma_reason[0] & BCM43xx_DMAIRQ_NONFATALMASK) | + (dma_reason[1] & BCM43xx_DMAIRQ_NONFATALMASK) | + (dma_reason[2] & BCM43xx_DMAIRQ_NONFATALMASK) | + (dma_reason[3] & BCM43xx_DMAIRQ_NONFATALMASK))) { printkl(KERN_ERR PFX "DMA error: " - "0x%08X, 0x%08X, 0x%08X, " - "0x%08X, 0x%08X, 0x%08X\n", + "0x%08X, 0x%08X, 0x%08X, 0x%08X\n", dma_reason[0], dma_reason[1], - dma_reason[2], dma_reason[3], - dma_reason[4], dma_reason[5]); + dma_reason[2], dma_reason[3]); } if (reason & BCM43xx_IRQ_PS) { @@ -1762,6 +1777,8 @@ static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) } /* Check the DMA reason registers for received data. */ + assert(!(dma_reason[1] & BCM43xx_DMAIRQ_RX_DONE)); + assert(!(dma_reason[2] & BCM43xx_DMAIRQ_RX_DONE)); if (dma_reason[0] & BCM43xx_DMAIRQ_RX_DONE) { if (bcm43xx_using_pio(bcm)) bcm43xx_pio_rx(bcm43xx_current_pio(bcm)->queue0); @@ -1769,17 +1786,13 @@ static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) bcm43xx_dma_rx(bcm43xx_current_dma(bcm)->rx_ring0); /* We intentionally don't set "activity" to 1, here. */ } - assert(!(dma_reason[1] & BCM43xx_DMAIRQ_RX_DONE)); - assert(!(dma_reason[2] & BCM43xx_DMAIRQ_RX_DONE)); if (dma_reason[3] & BCM43xx_DMAIRQ_RX_DONE) { if (bcm43xx_using_pio(bcm)) bcm43xx_pio_rx(bcm43xx_current_pio(bcm)->queue3); else - bcm43xx_dma_rx(bcm43xx_current_dma(bcm)->rx_ring3); + bcm43xx_dma_rx(bcm43xx_current_dma(bcm)->rx_ring1); activity = 1; } - assert(!(dma_reason[4] & BCM43xx_DMAIRQ_RX_DONE)); - assert(!(dma_reason[5] & BCM43xx_DMAIRQ_RX_DONE)); bcmirq_handled(BCM43xx_IRQ_RX); if (reason & BCM43xx_IRQ_XMIT_STATUS) { @@ -1806,8 +1819,7 @@ static void bcm43xx_interrupt_tasklet(struct bcm43xx_private *bcm) if (!modparam_noleds) bcm43xx_leds_update(bcm, activity); bcm43xx_interrupt_enable(bcm, bcm->irq_savedstate); - mmiowb(); - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); } static void pio_irq_workaround(struct bcm43xx_private *bcm, @@ -1836,18 +1848,14 @@ static void bcm43xx_interrupt_ack(struct bcm43xx_private *bcm, u32 reason) bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, reason); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA0_REASON, - bcm->dma_reason[0]); bcm43xx_write32(bcm, BCM43xx_MMIO_DMA1_REASON, - bcm->dma_reason[1]); + bcm->dma_reason[0]); bcm43xx_write32(bcm, BCM43xx_MMIO_DMA2_REASON, - bcm->dma_reason[2]); + bcm->dma_reason[1]); bcm43xx_write32(bcm, BCM43xx_MMIO_DMA3_REASON, - bcm->dma_reason[3]); + bcm->dma_reason[2]); bcm43xx_write32(bcm, BCM43xx_MMIO_DMA4_REASON, - bcm->dma_reason[4]); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA5_REASON, - bcm->dma_reason[5]); + bcm->dma_reason[3]); } /* Interrupt handler top-half */ @@ -1860,10 +1868,16 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id, struct pt_re if (!bcm) return IRQ_NONE; - spin_lock(&bcm->irq_lock); + spin_lock(&bcm->_lock); - assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); - assert(bcm->current_core->id == BCM43xx_COREID_80211); + /* Only accept IRQs, if we are initialized properly. + * This avoids an RX race while initializing. + * We should probably not enable IRQs before we are initialized + * completely, but some careful work is needed to fix this. I think it + * is best to stay with this cheap workaround for now... . + */ + if (unlikely(!bcm->initialized)) + goto out; reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); if (reason == 0xffffffff) { @@ -1875,18 +1889,14 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id, struct pt_re if (!reason) goto out; - bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON) - & 0x0001DC00; - bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) - & 0x0000DC00; - bcm->dma_reason[2] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA2_REASON) - & 0x0000DC00; - bcm->dma_reason[3] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA3_REASON) - & 0x0001DC00; - bcm->dma_reason[4] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA4_REASON) - & 0x0000DC00; - bcm->dma_reason[5] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA5_REASON) - & 0x0000DC00; + bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON) + & 0x0001dc00; + bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA2_REASON) + & 0x0000dc00; + bcm->dma_reason[2] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA3_REASON) + & 0x0000dc00; + bcm->dma_reason[3] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA4_REASON) + & 0x0001dc00; bcm43xx_interrupt_ack(bcm, reason); @@ -1895,28 +1905,25 @@ static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id, struct pt_re /* save the reason code and call our bottom half. */ bcm->irq_reason = reason; tasklet_schedule(&bcm->isr_tasklet); - out: mmiowb(); - spin_unlock(&bcm->irq_lock); + spin_unlock(&bcm->_lock); return ret; } static void bcm43xx_release_firmware(struct bcm43xx_private *bcm, int force) { - struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); - if (bcm->firmware_norelease && !force) return; /* Suspending or controller reset. */ - release_firmware(phy->ucode); - phy->ucode = NULL; - release_firmware(phy->pcm); - phy->pcm = NULL; - release_firmware(phy->initvals0); - phy->initvals0 = NULL; - release_firmware(phy->initvals1); - phy->initvals1 = NULL; + release_firmware(bcm->ucode); + bcm->ucode = NULL; + release_firmware(bcm->pcm); + bcm->pcm = NULL; + release_firmware(bcm->initvals0); + bcm->initvals0 = NULL; + release_firmware(bcm->initvals1); + bcm->initvals1 = NULL; } static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) @@ -1927,11 +1934,11 @@ static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) int nr; char buf[22 + sizeof(modparam_fwpostfix) - 1] = { 0 }; - if (!phy->ucode) { + if (!bcm->ucode) { snprintf(buf, ARRAY_SIZE(buf), "bcm43xx_microcode%d%s.fw", (rev >= 5 ? 5 : rev), modparam_fwpostfix); - err = request_firmware(&phy->ucode, buf, &bcm->pci_dev->dev); + err = request_firmware(&bcm->ucode, buf, &bcm->pci_dev->dev); if (err) { printk(KERN_ERR PFX "Error: Microcode \"%s\" not available or load failed.\n", @@ -1940,12 +1947,12 @@ static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) } } - if (!phy->pcm) { + if (!bcm->pcm) { snprintf(buf, ARRAY_SIZE(buf), "bcm43xx_pcm%d%s.fw", (rev < 5 ? 4 : 5), modparam_fwpostfix); - err = request_firmware(&phy->pcm, buf, &bcm->pci_dev->dev); + err = request_firmware(&bcm->pcm, buf, &bcm->pci_dev->dev); if (err) { printk(KERN_ERR PFX "Error: PCM \"%s\" not available or load failed.\n", @@ -1954,7 +1961,7 @@ static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) } } - if (!phy->initvals0) { + if (!bcm->initvals0) { if (rev == 2 || rev == 4) { switch (phy->type) { case BCM43xx_PHYTYPE_A: @@ -1985,20 +1992,20 @@ static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) snprintf(buf, ARRAY_SIZE(buf), "bcm43xx_initval%02d%s.fw", nr, modparam_fwpostfix); - err = request_firmware(&phy->initvals0, buf, &bcm->pci_dev->dev); + err = request_firmware(&bcm->initvals0, buf, &bcm->pci_dev->dev); if (err) { printk(KERN_ERR PFX "Error: InitVals \"%s\" not available or load failed.\n", buf); goto error; } - if (phy->initvals0->size % sizeof(struct bcm43xx_initval)) { + if (bcm->initvals0->size % sizeof(struct bcm43xx_initval)) { printk(KERN_ERR PFX "InitVals fileformat error.\n"); goto error; } } - if (!phy->initvals1) { + if (!bcm->initvals1) { if (rev >= 5) { u32 sbtmstatehigh; @@ -2020,14 +2027,14 @@ static int bcm43xx_request_firmware(struct bcm43xx_private *bcm) snprintf(buf, ARRAY_SIZE(buf), "bcm43xx_initval%02d%s.fw", nr, modparam_fwpostfix); - err = request_firmware(&phy->initvals1, buf, &bcm->pci_dev->dev); + err = request_firmware(&bcm->initvals1, buf, &bcm->pci_dev->dev); if (err) { printk(KERN_ERR PFX "Error: InitVals \"%s\" not available or load failed.\n", buf); goto error; } - if (phy->initvals1->size % sizeof(struct bcm43xx_initval)) { + if (bcm->initvals1->size % sizeof(struct bcm43xx_initval)) { printk(KERN_ERR PFX "InitVals fileformat error.\n"); goto error; } @@ -2047,13 +2054,12 @@ err_noinitval: static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) { - struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); const u32 *data; unsigned int i, len; /* Upload Microcode. */ - data = (u32 *)(phy->ucode->data); - len = phy->ucode->size / sizeof(u32); + data = (u32 *)(bcm->ucode->data); + len = bcm->ucode->size / sizeof(u32); bcm43xx_shm_control_word(bcm, BCM43xx_SHM_UCODE, 0x0000); for (i = 0; i < len; i++) { bcm43xx_write32(bcm, BCM43xx_MMIO_SHM_DATA, @@ -2062,8 +2068,8 @@ static void bcm43xx_upload_microcode(struct bcm43xx_private *bcm) } /* Upload PCM data. */ - data = (u32 *)(phy->pcm->data); - len = phy->pcm->size / sizeof(u32); + data = (u32 *)(bcm->pcm->data); + len = bcm->pcm->size / sizeof(u32); bcm43xx_shm_control_word(bcm, BCM43xx_SHM_PCM, 0x01ea); bcm43xx_write32(bcm, BCM43xx_MMIO_SHM_DATA, 0x00004000); bcm43xx_shm_control_word(bcm, BCM43xx_SHM_PCM, 0x01eb); @@ -2109,16 +2115,15 @@ err_format: static int bcm43xx_upload_initvals(struct bcm43xx_private *bcm) { - struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); int err; - err = bcm43xx_write_initvals(bcm, (struct bcm43xx_initval *)phy->initvals0->data, - phy->initvals0->size / sizeof(struct bcm43xx_initval)); + err = bcm43xx_write_initvals(bcm, (struct bcm43xx_initval *)bcm->initvals0->data, + bcm->initvals0->size / sizeof(struct bcm43xx_initval)); if (err) goto out; - if (phy->initvals1) { - err = bcm43xx_write_initvals(bcm, (struct bcm43xx_initval *)phy->initvals1->data, - phy->initvals1->size / sizeof(struct bcm43xx_initval)); + if (bcm->initvals1) { + err = bcm43xx_write_initvals(bcm, (struct bcm43xx_initval *)bcm->initvals1->data, + bcm->initvals1->size / sizeof(struct bcm43xx_initval)); if (err) goto out; } @@ -2126,38 +2131,49 @@ out: return err; } -#ifdef CONFIG_BCM947XX -static struct pci_device_id bcm43xx_47xx_ids[] = { - { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) }, - { 0 } -}; -#endif - static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm) { - int err; + int res; + unsigned int i; + u32 data; bcm->irq = bcm->pci_dev->irq; #ifdef CONFIG_BCM947XX if (bcm->pci_dev->bus->number == 0) { - struct pci_dev *d; - struct pci_device_id *id; - for (id = bcm43xx_47xx_ids; id->vendor; id++) { - d = pci_get_device(id->vendor, id->device, NULL); - if (d != NULL) { - bcm->irq = d->irq; - pci_dev_put(d); - break; - } + struct pci_dev *d = NULL; + /* FIXME: we will probably need more device IDs here... */ + d = pci_find_device(PCI_VENDOR_ID_BROADCOM, 0x4324, NULL); + if (d != NULL) { + bcm->irq = d->irq; } } #endif - err = request_irq(bcm->irq, bcm43xx_interrupt_handler, - IRQF_SHARED, KBUILD_MODNAME, bcm); - if (err) + res = request_irq(bcm->irq, bcm43xx_interrupt_handler, + SA_SHIRQ, KBUILD_MODNAME, bcm); + if (res) { printk(KERN_ERR PFX "Cannot register IRQ%d\n", bcm->irq); + return -ENODEV; + } + bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, 0xffffffff); + bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, 0x00020402); + i = 0; + while (1) { + data = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); + if (data == BCM43xx_IRQ_READY) + break; + i++; + if (i >= BCM43xx_IRQWAIT_MAX_RETRIES) { + printk(KERN_ERR PFX "Card IRQ register not responding. " + "Giving up.\n"); + free_irq(bcm->irq, bcm); + return -ENODEV; + } + udelay(10); + } + // dummy read + bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); - return err; + return 0; } /* Switch to the core used to write the GPIO register. @@ -2255,17 +2271,13 @@ static int bcm43xx_gpio_cleanup(struct bcm43xx_private *bcm) /* http://bcm-specs.sipsolutions.net/EnableMac */ void bcm43xx_mac_enable(struct bcm43xx_private *bcm) { - bcm->mac_suspended--; - assert(bcm->mac_suspended >= 0); - if (bcm->mac_suspended == 0) { - bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, - bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD) - | BCM43xx_SBF_MAC_ENABLED); - bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, BCM43xx_IRQ_READY); - bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD); /* dummy read */ - bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ - bcm43xx_power_saving_ctl_bits(bcm, -1, -1); - } + bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, + bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD) + | BCM43xx_SBF_MAC_ENABLED); + bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, BCM43xx_IRQ_READY); + bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD); /* dummy read */ + bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ + bcm43xx_power_saving_ctl_bits(bcm, -1, -1); } /* http://bcm-specs.sipsolutions.net/SuspendMAC */ @@ -2274,23 +2286,18 @@ void bcm43xx_mac_suspend(struct bcm43xx_private *bcm) int i; u32 tmp; - assert(bcm->mac_suspended >= 0); - if (bcm->mac_suspended == 0) { - bcm43xx_power_saving_ctl_bits(bcm, -1, 1); - bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, - bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD) - & ~BCM43xx_SBF_MAC_ENABLED); - bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ - for (i = 10000; i; i--) { - tmp = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); - if (tmp & BCM43xx_IRQ_READY) - goto out; - udelay(1); - } - printkl(KERN_ERR PFX "MAC suspend failed\n"); + bcm43xx_power_saving_ctl_bits(bcm, -1, 1); + bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, + bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD) + & ~BCM43xx_SBF_MAC_ENABLED); + bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ + for (i = 100000; i; i--) { + tmp = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); + if (tmp & BCM43xx_IRQ_READY) + return; + udelay(10); } -out: - bcm->mac_suspended++; + printkl(KERN_ERR PFX "MAC suspend failed\n"); } void bcm43xx_set_iwmode(struct bcm43xx_private *bcm, @@ -2360,6 +2367,7 @@ static void bcm43xx_chip_cleanup(struct bcm43xx_private *bcm) if (!modparam_noleds) bcm43xx_leds_exit(bcm); bcm43xx_gpio_cleanup(bcm); + free_irq(bcm->irq, bcm); bcm43xx_release_firmware(bcm, 0); } @@ -2371,7 +2379,7 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm) struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); int err; - int i, tmp; + int tmp; u32 value32; u16 value16; @@ -2384,53 +2392,13 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm) goto out; bcm43xx_upload_microcode(bcm); - bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, 0xFFFFFFFF); - bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, 0x00020402); - i = 0; - while (1) { - value32 = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); - if (value32 == BCM43xx_IRQ_READY) - break; - i++; - if (i >= BCM43xx_IRQWAIT_MAX_RETRIES) { - printk(KERN_ERR PFX "IRQ_READY timeout\n"); - err = -ENODEV; - goto err_release_fw; - } - udelay(10); - } - bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ - - value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_REVISION); - - dprintk(KERN_INFO PFX "Microcode rev 0x%x, pl 0x%x " - "(20%.2i-%.2i-%.2i %.2i:%.2i:%.2i)\n", value16, - bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_PATCHLEVEL), - (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_DATE) >> 12) & 0xf, - (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_DATE) >> 8) & 0xf, - bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_DATE) & 0xff, - (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_TIME) >> 11) & 0x1f, - (bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_TIME) >> 5) & 0x3f, - bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED, - BCM43xx_UCODE_TIME) & 0x1f); - - if ( value16 > 0x128 ) { - dprintk(KERN_ERR PFX - "Firmware: no support for microcode rev > 0x128\n"); - err = -1; + err = bcm43xx_initialize_irq(bcm); + if (err) goto err_release_fw; - } err = bcm43xx_gpio_init(bcm); if (err) - goto err_release_fw; + goto err_free_irq; err = bcm43xx_upload_initvals(bcm); if (err) @@ -2494,12 +2462,10 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm) bcm43xx_write32(bcm, 0x018C, 0x02000000); } bcm43xx_write32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON, 0x00004000); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA0_IRQ_MASK, 0x0001DC00); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA1_IRQ_MASK, 0x0000DC00); + bcm43xx_write32(bcm, BCM43xx_MMIO_DMA1_IRQ_MASK, 0x0001DC00); bcm43xx_write32(bcm, BCM43xx_MMIO_DMA2_IRQ_MASK, 0x0000DC00); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA3_IRQ_MASK, 0x0001DC00); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA4_IRQ_MASK, 0x0000DC00); - bcm43xx_write32(bcm, BCM43xx_MMIO_DMA5_IRQ_MASK, 0x0000DC00); + bcm43xx_write32(bcm, BCM43xx_MMIO_DMA3_IRQ_MASK, 0x0000DC00); + bcm43xx_write32(bcm, BCM43xx_MMIO_DMA4_IRQ_MASK, 0x0001DC00); value32 = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); value32 |= 0x00100000; @@ -2516,6 +2482,8 @@ err_radio_off: bcm43xx_radio_turn_off(bcm); err_gpio_cleanup: bcm43xx_gpio_cleanup(bcm); +err_free_irq: + free_irq(bcm->irq, bcm); err_release_fw: bcm43xx_release_firmware(bcm, 1); goto out; @@ -2555,9 +2523,11 @@ static void bcm43xx_init_struct_phyinfo(struct bcm43xx_phyinfo *phy) { /* Initialize a "phyinfo" structure. The structure is already * zeroed out. - * This is called on insmod time to initialize members. */ + phy->antenna_diversity = 0xFFFF; phy->savedpctlreg = 0xFFFF; + phy->minlowsig[0] = 0xFFFF; + phy->minlowsig[1] = 0xFFFF; spin_lock_init(&phy->lock); } @@ -2565,11 +2535,14 @@ static void bcm43xx_init_struct_radioinfo(struct bcm43xx_radioinfo *radio) { /* Initialize a "radioinfo" structure. The structure is already * zeroed out. - * This is called on insmod time to initialize members. */ radio->interfmode = BCM43xx_RADIO_INTERFMODE_NONE; radio->channel = 0xFF; radio->initial_channel = 0xFF; + radio->lofcal = 0xFFFF; + radio->initval = 0xFFFF; + radio->nrssi[0] = -1000; + radio->nrssi[1] = -1000; } static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) @@ -2587,6 +2560,7 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) * BCM43xx_MAX_80211_CORES); memset(&bcm->core_80211_ext, 0, sizeof(struct bcm43xx_coreinfo_80211) * BCM43xx_MAX_80211_CORES); + bcm->current_80211_core_idx = -1; bcm->nr_80211_available = 0; bcm->current_core = NULL; bcm->active_80211_core = NULL; @@ -2756,7 +2730,6 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) goto out; } bcm->nr_80211_available++; - core->priv = ext_80211; bcm43xx_init_struct_phyinfo(&ext_80211->phy); bcm43xx_init_struct_radioinfo(&ext_80211->radio); break; @@ -2857,8 +2830,7 @@ static void bcm43xx_wireless_core_cleanup(struct bcm43xx_private *bcm) } /* http://bcm-specs.sipsolutions.net/80211Init */ -static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, - int active_wlcore) +static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); @@ -2940,26 +2912,19 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, if (bcm->current_core->rev >= 5) bcm43xx_write16(bcm, 0x043C, 0x000C); - if (active_wlcore) { - if (bcm43xx_using_pio(bcm)) - err = bcm43xx_pio_init(bcm); - else - err = bcm43xx_dma_init(bcm); - if (err) - goto err_chip_cleanup; - } + if (bcm43xx_using_pio(bcm)) + err = bcm43xx_pio_init(bcm); + else + err = bcm43xx_dma_init(bcm); + if (err) + goto err_chip_cleanup; bcm43xx_write16(bcm, 0x0612, 0x0050); bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x0416, 0x0050); bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x0414, 0x01F4); - if (active_wlcore) { - if (radio->initial_channel != 0xFF) - bcm43xx_radio_selectchannel(bcm, radio->initial_channel, 0); - } + bcm43xx_mac_enable(bcm); + bcm43xx_interrupt_enable(bcm, bcm->irq_savedstate); - /* Don't enable MAC/IRQ here, as it will race with the IRQ handler. - * We enable it later. - */ bcm->current_core->initialized = 1; out: return err; @@ -3074,6 +3039,11 @@ out: return err; } +static void bcm43xx_softmac_init(struct bcm43xx_private *bcm) +{ + ieee80211softmac_start(bcm->net_dev); +} + static void bcm43xx_periodic_every120sec(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); @@ -3134,10 +3104,15 @@ static void bcm43xx_periodic_every15sec(struct bcm43xx_private *bcm) //TODO for APHY (temperature?) } -static void do_periodic_work(struct bcm43xx_private *bcm) +static void bcm43xx_periodic_task_handler(unsigned long d) { + struct bcm43xx_private *bcm = (struct bcm43xx_private *)d; + unsigned long flags; unsigned int state; + bcm43xx_lock_mmio(bcm, flags); + + assert(bcm->initialized); state = bcm->periodic_state; if (state % 8 == 0) bcm43xx_periodic_every120sec(bcm); @@ -3145,93 +3120,29 @@ static void do_periodic_work(struct bcm43xx_private *bcm) bcm43xx_periodic_every60sec(bcm); if (state % 2 == 0) bcm43xx_periodic_every30sec(bcm); - if (state % 1 == 0) - bcm43xx_periodic_every15sec(bcm); + bcm43xx_periodic_every15sec(bcm); bcm->periodic_state = state + 1; - schedule_delayed_work(&bcm->periodic_work, HZ * 15); -} - -/* Estimate a "Badness" value based on the periodic work - * state-machine state. "Badness" is worse (bigger), if the - * periodic work will take longer. - */ -static int estimate_periodic_work_badness(unsigned int state) -{ - int badness = 0; - - if (state % 8 == 0) /* every 120 sec */ - badness += 10; - if (state % 4 == 0) /* every 60 sec */ - badness += 5; - if (state % 2 == 0) /* every 30 sec */ - badness += 1; - if (state % 1 == 0) /* every 15 sec */ - badness += 1; - -#define BADNESS_LIMIT 4 - return badness; -} - -static void bcm43xx_periodic_work_handler(void *d) -{ - struct bcm43xx_private *bcm = d; - unsigned long flags; - u32 savedirqs = 0; - int badness; - - badness = estimate_periodic_work_badness(bcm->periodic_state); - mutex_lock(&bcm->mutex); - - /* We must fake a started transmission here, as we are going to - * disable TX. If we wouldn't fake a TX, it would be possible to - * trigger the netdev watchdog, if the last real TX is already - * some time on the past (slightly less than 5secs) - */ - bcm->net_dev->trans_start = jiffies; - netif_tx_disable(bcm->net_dev); - - spin_lock_irqsave(&bcm->irq_lock, flags); - if (badness > BADNESS_LIMIT) { - /* Periodic work will take a long time, so we want it to - * be preemtible. - */ - bcm43xx_mac_suspend(bcm); - if (bcm43xx_using_pio(bcm)) - bcm43xx_pio_freeze_txqueues(bcm); - savedirqs = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - bcm43xx_synchronize_irq(bcm); - } - - do_periodic_work(bcm); + mod_timer(&bcm->periodic_tasks, jiffies + (HZ * 15)); - if (badness > BADNESS_LIMIT) { - spin_lock_irqsave(&bcm->irq_lock, flags); - tasklet_enable(&bcm->isr_tasklet); - bcm43xx_interrupt_enable(bcm, savedirqs); - if (bcm43xx_using_pio(bcm)) - bcm43xx_pio_thaw_txqueues(bcm); - bcm43xx_mac_enable(bcm); - } - mmiowb(); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - netif_wake_queue(bcm->net_dev); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); } -void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm) +static void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm) { - cancel_rearming_delayed_work(&bcm->periodic_work); + del_timer_sync(&bcm->periodic_tasks); } -void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) +static void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) { - struct work_struct *work = &(bcm->periodic_work); + struct timer_list *timer = &(bcm->periodic_tasks); - assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); - INIT_WORK(work, bcm43xx_periodic_work_handler, bcm); - schedule_work(work); + assert(bcm->initialized); + setup_timer(timer, + bcm43xx_periodic_task_handler, + (unsigned long)bcm); + timer->expires = jiffies; + add_timer(timer); } static void bcm43xx_security_init(struct bcm43xx_private *bcm) @@ -3241,363 +3152,143 @@ static void bcm43xx_security_init(struct bcm43xx_private *bcm) bcm43xx_clear_keys(bcm); } -static int bcm43xx_rng_read(struct hwrng *rng, u32 *data) -{ - struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv; - unsigned long flags; - - spin_lock_irqsave(&(bcm)->irq_lock, flags); - *data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG); - spin_unlock_irqrestore(&(bcm)->irq_lock, flags); - - return (sizeof(u16)); -} - -static void bcm43xx_rng_exit(struct bcm43xx_private *bcm) -{ - hwrng_unregister(&bcm->rng); -} - -static int bcm43xx_rng_init(struct bcm43xx_private *bcm) -{ - int err; - - snprintf(bcm->rng_name, ARRAY_SIZE(bcm->rng_name), - "%s_%s", KBUILD_MODNAME, bcm->net_dev->name); - bcm->rng.name = bcm->rng_name; - bcm->rng.data_read = bcm43xx_rng_read; - bcm->rng.priv = (unsigned long)bcm; - err = hwrng_register(&bcm->rng); - if (err) - printk(KERN_ERR PFX "RNG init failed (%d)\n", err); - - return err; -} - -static int bcm43xx_shutdown_all_wireless_cores(struct bcm43xx_private *bcm) -{ - int ret = 0; - int i, err; - struct bcm43xx_coreinfo *core; - - bcm43xx_set_status(bcm, BCM43xx_STAT_SHUTTINGDOWN); - for (i = 0; i < bcm->nr_80211_available; i++) { - core = &(bcm->core_80211[i]); - assert(core->available); - if (!core->initialized) - continue; - err = bcm43xx_switch_core(bcm, core); - if (err) { - dprintk(KERN_ERR PFX "shutdown_all_wireless_cores " - "switch_core failed (%d)\n", err); - ret = err; - continue; - } - bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); - bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */ - bcm43xx_wireless_core_cleanup(bcm); - if (core == bcm->active_80211_core) - bcm->active_80211_core = NULL; - } - free_irq(bcm->irq, bcm); - bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); - - return ret; -} - /* This is the opposite of bcm43xx_init_board() */ static void bcm43xx_free_board(struct bcm43xx_private *bcm) { - bcm43xx_rng_exit(bcm); - bcm43xx_sysfs_unregister(bcm); - bcm43xx_periodic_tasks_delete(bcm); - - mutex_lock(&(bcm)->mutex); - bcm43xx_shutdown_all_wireless_cores(bcm); - bcm43xx_pctl_set_crystal(bcm, 0); - mutex_unlock(&(bcm)->mutex); -} - -static void prepare_phydata_for_init(struct bcm43xx_phyinfo *phy) -{ - phy->antenna_diversity = 0xFFFF; - memset(phy->minlowsig, 0xFF, sizeof(phy->minlowsig)); - memset(phy->minlowsigpos, 0, sizeof(phy->minlowsigpos)); - - /* Flags */ - phy->calibrated = 0; - phy->is_locked = 0; - - if (phy->_lo_pairs) { - memset(phy->_lo_pairs, 0, - sizeof(struct bcm43xx_lopair) * BCM43xx_LO_COUNT); - } - memset(phy->loopback_gain, 0, sizeof(phy->loopback_gain)); -} - -static void prepare_radiodata_for_init(struct bcm43xx_private *bcm, - struct bcm43xx_radioinfo *radio) -{ - int i; - - /* Set default attenuation values. */ - radio->baseband_atten = bcm43xx_default_baseband_attenuation(bcm); - radio->radio_atten = bcm43xx_default_radio_attenuation(bcm); - radio->txctl1 = bcm43xx_default_txctl1(bcm); - radio->txctl2 = 0xFFFF; - radio->txpwr_offset = 0; - - /* NRSSI */ - radio->nrssislope = 0; - for (i = 0; i < ARRAY_SIZE(radio->nrssi); i++) - radio->nrssi[i] = -1000; - for (i = 0; i < ARRAY_SIZE(radio->nrssi_lt); i++) - radio->nrssi_lt[i] = i; - - radio->lofcal = 0xFFFF; - radio->initval = 0xFFFF; - - radio->aci_enable = 0; - radio->aci_wlan_automatic = 0; - radio->aci_hw_rssi = 0; -} - -static void prepare_priv_for_init(struct bcm43xx_private *bcm) -{ - int i; - struct bcm43xx_coreinfo *core; - struct bcm43xx_coreinfo_80211 *wlext; - - assert(!bcm->active_80211_core); + int i, err; + unsigned long flags; - bcm43xx_set_status(bcm, BCM43xx_STAT_INITIALIZING); + bcm43xx_sysfs_unregister(bcm); - /* Flags */ - bcm->was_initialized = 0; - bcm->reg124_set_0x4 = 0; + bcm43xx_periodic_tasks_delete(bcm); - /* Stats */ - memset(&bcm->stats, 0, sizeof(bcm->stats)); + bcm43xx_lock(bcm, flags); + bcm->initialized = 0; + bcm->shutting_down = 1; + bcm43xx_unlock(bcm, flags); - /* Wireless core data */ for (i = 0; i < BCM43xx_MAX_80211_CORES; i++) { - core = &(bcm->core_80211[i]); - wlext = core->priv; - - if (!core->available) + if (!bcm->core_80211[i].available) + continue; + if (!bcm->core_80211[i].initialized) continue; - assert(wlext == &(bcm->core_80211_ext[i])); - prepare_phydata_for_init(&wlext->phy); - prepare_radiodata_for_init(bcm, &wlext->radio); + err = bcm43xx_switch_core(bcm, &bcm->core_80211[i]); + assert(err == 0); + bcm43xx_wireless_core_cleanup(bcm); } - /* IRQ related flags */ - bcm->irq_reason = 0; - memset(bcm->dma_reason, 0, sizeof(bcm->dma_reason)); - bcm->irq_savedstate = BCM43xx_IRQ_INITIAL; - - bcm->mac_suspended = 1; - - /* Noise calculation context */ - memset(&bcm->noisecalc, 0, sizeof(bcm->noisecalc)); - - /* Periodic work context */ - bcm->periodic_state = 0; -} - -static int wireless_core_up(struct bcm43xx_private *bcm, - int active_wlcore) -{ - int err; + bcm43xx_pctl_set_crystal(bcm, 0); - if (!bcm43xx_core_enabled(bcm)) - bcm43xx_wireless_core_reset(bcm, 1); - if (!active_wlcore) - bcm43xx_wireless_core_mark_inactive(bcm); - err = bcm43xx_wireless_core_init(bcm, active_wlcore); - if (err) - goto out; - if (!active_wlcore) - bcm43xx_radio_turn_off(bcm); -out: - return err; + bcm43xx_lock(bcm, flags); + bcm->shutting_down = 0; + bcm43xx_unlock(bcm, flags); } -/* Select and enable the "to be used" wireless core. - * Locking: bcm->mutex must be aquired before calling this. - * bcm->irq_lock must not be aquired. - */ -int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, - int phytype) +static int bcm43xx_init_board(struct bcm43xx_private *bcm) { int i, err; - struct bcm43xx_coreinfo *active_core = NULL; - struct bcm43xx_coreinfo_80211 *active_wlext = NULL; - struct bcm43xx_coreinfo *core; - struct bcm43xx_coreinfo_80211 *wlext; - int adjust_active_sbtmstatelow = 0; + int connect_phy; + unsigned long flags; might_sleep(); - if (phytype < 0) { - /* If no phytype is requested, select the first core. */ - assert(bcm->core_80211[0].available); - wlext = bcm->core_80211[0].priv; - phytype = wlext->phy.type; - } - /* Find the requested core. */ - for (i = 0; i < bcm->nr_80211_available; i++) { - core = &(bcm->core_80211[i]); - wlext = core->priv; - if (wlext->phy.type == phytype) { - active_core = core; - active_wlext = wlext; - break; - } - } - if (!active_core) - return -ESRCH; /* No such PHYTYPE on this board. */ - - if (bcm->active_80211_core) { - /* We already selected a wl core in the past. - * So first clean up everything. - */ - dprintk(KERN_INFO PFX "select_wireless_core: cleanup\n"); - ieee80211softmac_stop(bcm->net_dev); - bcm43xx_set_status(bcm, BCM43xx_STAT_INITIALIZED); - err = bcm43xx_disable_interrupts_sync(bcm); - assert(!err); - tasklet_enable(&bcm->isr_tasklet); - err = bcm43xx_shutdown_all_wireless_cores(bcm); - if (err) - goto error; - /* Ok, everything down, continue to re-initialize. */ - bcm43xx_set_status(bcm, BCM43xx_STAT_INITIALIZING); - } - - /* Reset all data structures. */ - prepare_priv_for_init(bcm); + bcm43xx_lock(bcm, flags); + bcm->initialized = 0; + bcm->shutting_down = 0; + bcm43xx_unlock(bcm, flags); + err = bcm43xx_pctl_set_crystal(bcm, 1); + if (err) + goto out; + err = bcm43xx_pctl_init(bcm); + if (err) + goto err_crystal_off; err = bcm43xx_pctl_set_clock(bcm, BCM43xx_PCTL_CLK_FAST); if (err) - goto error; + goto err_crystal_off; - /* Mark all unused cores "inactive". */ + tasklet_enable(&bcm->isr_tasklet); for (i = 0; i < bcm->nr_80211_available; i++) { - core = &(bcm->core_80211[i]); - wlext = core->priv; + err = bcm43xx_switch_core(bcm, &bcm->core_80211[i]); + assert(err != -ENODEV); + if (err) + goto err_80211_unwind; - if (core == active_core) - continue; - err = bcm43xx_switch_core(bcm, core); - if (err) { - dprintk(KERN_ERR PFX "Could not switch to inactive " - "802.11 core (%d)\n", err); - goto error; - } - err = wireless_core_up(bcm, 0); - if (err) { - dprintk(KERN_ERR PFX "core_up for inactive 802.11 core " - "failed (%d)\n", err); - goto error; + /* Enable the selected wireless core. + * Connect PHY only on the first core. + */ + if (!bcm43xx_core_enabled(bcm)) { + if (bcm->nr_80211_available == 1) { + connect_phy = bcm43xx_current_phy(bcm)->connected; + } else { + if (i == 0) + connect_phy = 1; + else + connect_phy = 0; + } + bcm43xx_wireless_core_reset(bcm, connect_phy); } - adjust_active_sbtmstatelow = 1; - } - /* Now initialize the active 802.11 core. */ - err = bcm43xx_switch_core(bcm, active_core); - if (err) { - dprintk(KERN_ERR PFX "Could not switch to active " - "802.11 core (%d)\n", err); - goto error; - } - if (adjust_active_sbtmstatelow && - active_wlext->phy.type == BCM43xx_PHYTYPE_G) { - u32 sbtmstatelow; + if (i != 0) + bcm43xx_wireless_core_mark_inactive(bcm, &bcm->core_80211[0]); - sbtmstatelow = bcm43xx_read32(bcm, BCM43xx_CIR_SBTMSTATELOW); - sbtmstatelow |= 0x20000000; - bcm43xx_write32(bcm, BCM43xx_CIR_SBTMSTATELOW, sbtmstatelow); + err = bcm43xx_wireless_core_init(bcm); + if (err) + goto err_80211_unwind; + + if (i != 0) { + bcm43xx_mac_suspend(bcm); + bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); + bcm43xx_radio_turn_off(bcm); + } } - err = wireless_core_up(bcm, 1); - if (err) { - dprintk(KERN_ERR PFX "core_up for active 802.11 core " - "failed (%d)\n", err); - goto error; + bcm->active_80211_core = &bcm->core_80211[0]; + if (bcm->nr_80211_available >= 2) { + bcm43xx_switch_core(bcm, &bcm->core_80211[0]); + bcm43xx_mac_enable(bcm); } - err = bcm43xx_pctl_set_clock(bcm, BCM43xx_PCTL_CLK_DYNAMIC); - if (err) - goto error; - bcm->active_80211_core = active_core; - bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); + dprintk(KERN_INFO PFX "80211 cores initialized\n"); bcm43xx_security_init(bcm); - drain_txstatus_queue(bcm); - ieee80211softmac_start(bcm->net_dev); - - /* Let's go! Be careful after enabling the IRQs. - * Don't switch cores, for example. - */ - bcm43xx_mac_enable(bcm); - bcm43xx_set_status(bcm, BCM43xx_STAT_INITIALIZED); - err = bcm43xx_initialize_irq(bcm); - if (err) - goto error; - bcm43xx_interrupt_enable(bcm, bcm->irq_savedstate); - - dprintk(KERN_INFO PFX "Selected 802.11 core (phytype %d)\n", - active_wlext->phy.type); - - return 0; + bcm43xx_softmac_init(bcm); -error: - bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); - bcm43xx_pctl_set_clock(bcm, BCM43xx_PCTL_CLK_SLOW); - return err; -} + bcm43xx_pctl_set_clock(bcm, BCM43xx_PCTL_CLK_DYNAMIC); -static int bcm43xx_init_board(struct bcm43xx_private *bcm) -{ - int err; + if (bcm43xx_current_radio(bcm)->initial_channel != 0xFF) { + bcm43xx_mac_suspend(bcm); + bcm43xx_radio_selectchannel(bcm, bcm43xx_current_radio(bcm)->initial_channel, 0); + bcm43xx_mac_enable(bcm); + } - mutex_lock(&(bcm)->mutex); + /* Initialization of the board is done. Flag it as such. */ + bcm43xx_lock(bcm, flags); + bcm->initialized = 1; + bcm43xx_unlock(bcm, flags); - tasklet_enable(&bcm->isr_tasklet); - err = bcm43xx_pctl_set_crystal(bcm, 1); - if (err) - goto err_tasklet; - err = bcm43xx_pctl_init(bcm); - if (err) - goto err_crystal_off; - err = bcm43xx_select_wireless_core(bcm, -1); - if (err) - goto err_crystal_off; - err = bcm43xx_sysfs_register(bcm); - if (err) - goto err_wlshutdown; - err = bcm43xx_rng_init(bcm); - if (err) - goto err_sysfs_unreg; bcm43xx_periodic_tasks_setup(bcm); + bcm43xx_sysfs_register(bcm); + //FIXME: check for bcm43xx_sysfs_register failure. This function is a bit messy regarding unwinding, though... /*FIXME: This should be handled by softmac instead. */ schedule_work(&bcm->softmac->associnfo.work); + assert(err == 0); out: - mutex_unlock(&(bcm)->mutex); - return err; -err_sysfs_unreg: - bcm43xx_sysfs_unregister(bcm); -err_wlshutdown: - bcm43xx_shutdown_all_wireless_cores(bcm); +err_80211_unwind: + tasklet_disable(&bcm->isr_tasklet); + /* unwind all 80211 initialization */ + for (i = 0; i < bcm->nr_80211_available; i++) { + if (!bcm->core_80211[i].initialized) + continue; + bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); + bcm43xx_wireless_core_cleanup(bcm); + } err_crystal_off: bcm43xx_pctl_set_crystal(bcm, 0); -err_tasklet: - tasklet_disable(&bcm->isr_tasklet); goto out; } @@ -3608,7 +3299,8 @@ static void bcm43xx_detach_board(struct bcm43xx_private *bcm) bcm43xx_chipset_detach(bcm); /* Do _not_ access the chip, after it is detached. */ - pci_iounmap(pci_dev, bcm->mmio_addr); + iounmap(bcm->mmio_addr); + pci_release_regions(pci_dev); pci_disable_device(pci_dev); @@ -3698,26 +3390,40 @@ static int bcm43xx_attach_board(struct bcm43xx_private *bcm) struct net_device *net_dev = bcm->net_dev; int err; int i; + unsigned long mmio_start, mmio_flags, mmio_len; u32 coremask; err = pci_enable_device(pci_dev); if (err) { - printk(KERN_ERR PFX "pci_enable_device() failed\n"); + printk(KERN_ERR PFX "unable to wake up pci device (%i)\n", err); goto out; } + mmio_start = pci_resource_start(pci_dev, 0); + mmio_flags = pci_resource_flags(pci_dev, 0); + mmio_len = pci_resource_len(pci_dev, 0); + if (!(mmio_flags & IORESOURCE_MEM)) { + printk(KERN_ERR PFX + "%s, region #0 not an MMIO resource, aborting\n", + pci_name(pci_dev)); + err = -ENODEV; + goto err_pci_disable; + } err = pci_request_regions(pci_dev, KBUILD_MODNAME); if (err) { - printk(KERN_ERR PFX "pci_request_regions() failed\n"); + printk(KERN_ERR PFX + "could not access PCI resources (%i)\n", err); goto err_pci_disable; } /* enable PCI bus-mastering */ pci_set_master(pci_dev); - bcm->mmio_addr = pci_iomap(pci_dev, 0, ~0UL); + bcm->mmio_addr = ioremap(mmio_start, mmio_len); if (!bcm->mmio_addr) { - printk(KERN_ERR PFX "pci_iomap() failed\n"); + printk(KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", + pci_name(pci_dev)); err = -EIO; goto err_pci_release; } + bcm->mmio_len = mmio_len; net_dev->base_addr = (unsigned long)bcm->mmio_addr; bcm43xx_pci_read_config16(bcm, PCI_SUBSYSTEM_VENDOR_ID, @@ -3811,7 +3517,7 @@ err_80211_unwind: err_chipset_detach: bcm43xx_chipset_detach(bcm); err_iounmap: - pci_iounmap(pci_dev, bcm->mmio_addr); + iounmap(bcm->mmio_addr); err_pci_release: pci_release_regions(pci_dev); err_pci_disable: @@ -3841,9 +3547,8 @@ static void bcm43xx_ieee80211_set_chan(struct net_device *net_dev, struct bcm43xx_radioinfo *radio; unsigned long flags; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (bcm->initialized) { bcm43xx_mac_suspend(bcm); bcm43xx_radio_selectchannel(bcm, channel, 0); bcm43xx_mac_enable(bcm); @@ -3851,8 +3556,7 @@ static void bcm43xx_ieee80211_set_chan(struct net_device *net_dev, radio = bcm43xx_current_radio(bcm); radio->initial_channel = channel; } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); } /* set_security() callback in struct ieee80211_device */ @@ -3864,10 +3568,9 @@ static void bcm43xx_ieee80211_set_security(struct net_device *net_dev, unsigned long flags; int keyidx; - dprintk(KERN_INFO PFX "set security called"); + dprintk(KERN_INFO PFX "set security called\n"); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); for (keyidx = 0; keyidxflags & (1<flags & SEC_ACTIVE_KEY) { secinfo->active_key = sec->active_key; - dprintk(", .active_key = %d", sec->active_key); + dprintk(KERN_INFO PFX " .active_key = %d\n", sec->active_key); } if (sec->flags & SEC_UNICAST_GROUP) { secinfo->unicast_uses_group = sec->unicast_uses_group; - dprintk(", .unicast_uses_group = %d", sec->unicast_uses_group); + dprintk(KERN_INFO PFX " .unicast_uses_group = %d\n", sec->unicast_uses_group); } if (sec->flags & SEC_LEVEL) { secinfo->level = sec->level; - dprintk(", .level = %d", sec->level); + dprintk(KERN_INFO PFX " .level = %d\n", sec->level); } if (sec->flags & SEC_ENABLED) { secinfo->enabled = sec->enabled; - dprintk(", .enabled = %d", sec->enabled); + dprintk(KERN_INFO PFX " .enabled = %d\n", sec->enabled); } if (sec->flags & SEC_ENCRYPT) { secinfo->encrypt = sec->encrypt; - dprintk(", .encrypt = %d", sec->encrypt); - } - if (sec->flags & SEC_AUTH_MODE) { - secinfo->auth_mode = sec->auth_mode; - dprintk(", .auth_mode = %d", sec->auth_mode); + dprintk(KERN_INFO PFX " .encrypt = %d\n", sec->encrypt); } - dprintk("\n"); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED && - !bcm->ieee->host_encrypt) { + if (bcm->initialized && !bcm->ieee->host_encrypt) { if (secinfo->enabled) { /* upload WEP keys to hardware */ char null_address[6] = { 0 }; @@ -3936,8 +3633,7 @@ static void bcm43xx_ieee80211_set_security(struct net_device *net_dev, } else bcm43xx_clear_keys(bcm); } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); } /* hard_start_xmit() callback in struct ieee80211_device */ @@ -3949,14 +3645,12 @@ static int bcm43xx_ieee80211_hard_start_xmit(struct ieee80211_txb *txb, int err = -ENODEV; unsigned long flags; - spin_lock_irqsave(&bcm->irq_lock, flags); - if (likely(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED)) + bcm43xx_lock_mmio(bcm, flags); + if (likely(bcm->initialized)) err = bcm43xx_tx(bcm, txb); - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); - if (unlikely(err)) - return NETDEV_TX_BUSY; - return NETDEV_TX_OK; + return err; } static struct net_device_stats * bcm43xx_net_get_stats(struct net_device *net_dev) @@ -3969,9 +3663,9 @@ static void bcm43xx_net_tx_timeout(struct net_device *net_dev) struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); unsigned long flags; - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); bcm43xx_controller_restart(bcm, "TX timeout"); - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); } #ifdef CONFIG_NET_POLL_CONTROLLER @@ -3981,8 +3675,7 @@ static void bcm43xx_net_poll_controller(struct net_device *net_dev) unsigned long flags; local_irq_save(flags); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) - bcm43xx_interrupt_handler(bcm->irq, bcm, NULL); + bcm43xx_interrupt_handler(bcm->irq, bcm, NULL); local_irq_restore(flags); } #endif /* CONFIG_NET_POLL_CONTROLLER */ @@ -3997,13 +3690,10 @@ static int bcm43xx_net_open(struct net_device *net_dev) static int bcm43xx_net_stop(struct net_device *net_dev) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err; ieee80211softmac_stop(net_dev); - err = bcm43xx_disable_interrupts_sync(bcm); - assert(!err); + bcm43xx_disable_interrupts_sync(bcm, NULL); bcm43xx_free_board(bcm); - flush_scheduled_work(); return 0; } @@ -4014,19 +3704,15 @@ static int bcm43xx_init_private(struct bcm43xx_private *bcm, { int err; - bcm43xx_set_status(bcm, BCM43xx_STAT_UNINIT); bcm->ieee = netdev_priv(net_dev); bcm->softmac = ieee80211_priv(net_dev); bcm->softmac->set_channel = bcm43xx_ieee80211_set_chan; bcm->irq_savedstate = BCM43xx_IRQ_INITIAL; - bcm->mac_suspended = 1; bcm->pci_dev = pci_dev; bcm->net_dev = net_dev; bcm->bad_frames_preempt = modparam_bad_frames_preempt; - spin_lock_init(&bcm->irq_lock); - spin_lock_init(&bcm->leds_lock); - mutex_init(&bcm->mutex); + spin_lock_init(&bcm->_lock); tasklet_init(&bcm->isr_tasklet, (void (*)(unsigned long))bcm43xx_interrupt_tasklet, (unsigned long)bcm); @@ -4144,6 +3830,7 @@ static void __devexit bcm43xx_remove_one(struct pci_dev *pdev) bcm43xx_debugfs_remove_device(bcm); unregister_netdev(net_dev); bcm43xx_detach_board(bcm); + assert(bcm->ucode == NULL); free_ieee80211softmac(net_dev); } @@ -4153,31 +3840,46 @@ static void __devexit bcm43xx_remove_one(struct pci_dev *pdev) static void bcm43xx_chip_reset(void *_bcm) { struct bcm43xx_private *bcm = _bcm; - struct bcm43xx_phyinfo *phy; - int err = -ENODEV; + struct net_device *net_dev = bcm->net_dev; + struct pci_dev *pci_dev = bcm->pci_dev; + int err; + int was_initialized = bcm->initialized; + + netif_stop_queue(bcm->net_dev); + tasklet_disable(&bcm->isr_tasklet); - mutex_lock(&(bcm)->mutex); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { - bcm43xx_periodic_tasks_delete(bcm); - phy = bcm43xx_current_phy(bcm); - err = bcm43xx_select_wireless_core(bcm, phy->type); - if (!err) - bcm43xx_periodic_tasks_setup(bcm); + bcm->firmware_norelease = 1; + if (was_initialized) + bcm43xx_free_board(bcm); + bcm->firmware_norelease = 0; + bcm43xx_detach_board(bcm); + err = bcm43xx_init_private(bcm, net_dev, pci_dev); + if (err) + goto failure; + err = bcm43xx_attach_board(bcm); + if (err) + goto failure; + if (was_initialized) { + err = bcm43xx_init_board(bcm); + if (err) + goto failure; } - mutex_unlock(&(bcm)->mutex); + netif_wake_queue(bcm->net_dev); + printk(KERN_INFO PFX "Controller restarted\n"); - printk(KERN_ERR PFX "Controller restart%s\n", - (err == 0) ? "ed" : " failed"); + return; +failure: + printk(KERN_ERR PFX "Controller restart failed\n"); } /* Hard-reset the chip. * This can be called from interrupt or process context. - * bcm->irq_lock must be locked. - */ + * Make sure to _not_ re-enable device interrupts after this has been called. +*/ void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason) { - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) - return; + bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL); + bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD); /* dummy read */ printk(KERN_ERR PFX "Controller RESET (%s) ...\n", reason); INIT_WORK(&bcm->restart_work, bcm43xx_chip_reset, bcm); schedule_work(&bcm->restart_work); @@ -4189,16 +3891,21 @@ static int bcm43xx_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *net_dev = pci_get_drvdata(pdev); struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); - int err; + unsigned long flags; + int try_to_shutdown = 0, err; dprintk(KERN_INFO PFX "Suspending...\n"); + bcm43xx_lock(bcm, flags); + bcm->was_initialized = bcm->initialized; + if (bcm->initialized) + try_to_shutdown = 1; + bcm43xx_unlock(bcm, flags); + netif_device_detach(net_dev); - bcm->was_initialized = 0; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { - bcm->was_initialized = 1; + if (try_to_shutdown) { ieee80211softmac_stop(net_dev); - err = bcm43xx_disable_interrupts_sync(bcm); + err = bcm43xx_disable_interrupts_sync(bcm, &bcm->irq_savedstate); if (unlikely(err)) { dprintk(KERN_ERR PFX "Suspend failed.\n"); return -EAGAIN; @@ -4231,14 +3938,17 @@ static int bcm43xx_resume(struct pci_dev *pdev) pci_restore_state(pdev); bcm43xx_chipset_attach(bcm); - if (bcm->was_initialized) + if (bcm->was_initialized) { + bcm->irq_savedstate = BCM43xx_IRQ_INITIAL; err = bcm43xx_init_board(bcm); + } if (err) { printk(KERN_ERR PFX "Resume failed!\n"); return err; } - netif_device_attach(net_dev); + netif_device_attach(net_dev); + dprintk(KERN_INFO PFX "Device resumed.\n"); return 0; diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.h b/drivers/net/wireless/bcm43xx/bcm43xx_main.h index f76357178..30a202b25 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.h @@ -112,6 +112,30 @@ int bcm43xx_channel_to_freq(struct bcm43xx_private *bcm, return bcm43xx_channel_to_freq_bg(channel); } +/* Lightweight function to check if a channel number is valid. + * Note that this does _NOT_ check for geographical restrictions! + */ +static inline +int bcm43xx_is_valid_channel_a(u8 channel) +{ + return (channel >= IEEE80211_52GHZ_MIN_CHANNEL + && channel <= IEEE80211_52GHZ_MAX_CHANNEL); +} +static inline +int bcm43xx_is_valid_channel_bg(u8 channel) +{ + return (channel >= IEEE80211_24GHZ_MIN_CHANNEL + && channel <= IEEE80211_24GHZ_MAX_CHANNEL); +} +static inline +int bcm43xx_is_valid_channel(struct bcm43xx_private *bcm, + u8 channel) +{ + if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A) + return bcm43xx_is_valid_channel_a(channel); + return bcm43xx_is_valid_channel_bg(channel); +} + void bcm43xx_tsf_read(struct bcm43xx_private *bcm, u64 *tsf); void bcm43xx_tsf_write(struct bcm43xx_private *bcm, u64 tsf); @@ -133,17 +157,11 @@ void bcm43xx_dummy_transmission(struct bcm43xx_private *bcm); int bcm43xx_switch_core(struct bcm43xx_private *bcm, struct bcm43xx_coreinfo *new_core); -int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, - int phytype); - void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy); void bcm43xx_mac_suspend(struct bcm43xx_private *bcm); void bcm43xx_mac_enable(struct bcm43xx_private *bcm); -void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm); -void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm); - void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason); int bcm43xx_sprom_read(struct bcm43xx_private *bcm, u16 *sprom); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c index 52ce2a933..b0abac515 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c @@ -81,16 +81,6 @@ static const s8 bcm43xx_tssi2dbm_g_table[] = { static void bcm43xx_phy_initg(struct bcm43xx_private *bcm); -static inline -void bcm43xx_voluntary_preempt(void) -{ - assert(!in_atomic() && !in_irq() && - !in_interrupt() && !irqs_disabled()); -#ifndef CONFIG_PREEMPT - cond_resched(); -#endif /* CONFIG_PREEMPT */ -} - void bcm43xx_raw_phy_lock(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); @@ -143,14 +133,22 @@ void bcm43xx_phy_write(struct bcm43xx_private *bcm, u16 offset, u16 val) void bcm43xx_phy_calibrate(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); + unsigned long flags; bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD); /* Dummy read. */ if (phy->calibrated) return; if (phy->type == BCM43xx_PHYTYPE_G && phy->rev == 1) { + /* We do not want to be preempted while calibrating + * the hardware. + */ + local_irq_save(flags); + bcm43xx_wireless_core_reset(bcm, 0); bcm43xx_phy_initg(bcm); bcm43xx_wireless_core_reset(bcm, 1); + + local_irq_restore(flags); } phy->calibrated = 1; } @@ -361,7 +359,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm) if (phy->rev <= 2) for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++) bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg1[i]); - else if ((phy->rev >= 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200)) + else if ((phy->rev == 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200)) for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++) bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg3[i]); else @@ -371,7 +369,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm) if (phy->rev == 2) for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++) bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr1[i]); - else if ((phy->rev > 2) && (phy->rev <= 8)) + else if ((phy->rev > 2) && (phy->rev <= 7)) for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++) bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr2[i]); @@ -1197,7 +1195,7 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm) if (phy->rev == 1) bcm43xx_phy_initb5(bcm); - else + else if (phy->rev >= 2 && phy->rev <= 7) bcm43xx_phy_initb6(bcm); if (phy->rev >= 2 || phy->connected) bcm43xx_phy_inita(bcm); @@ -1241,22 +1239,23 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm) bcm43xx_phy_lo_g_measure(bcm); } else { if (radio->version == 0x2050 && radio->revision == 8) { - bcm43xx_radio_write16(bcm, 0x0052, - (radio->txctl1 << 4) | radio->txctl2); + //FIXME } else { bcm43xx_radio_write16(bcm, 0x0052, (bcm43xx_radio_read16(bcm, 0x0052) & 0xFFF0) | radio->txctl1); } if (phy->rev >= 6) { + /* bcm43xx_phy_write(bcm, 0x0036, (bcm43xx_phy_read(bcm, 0x0036) - & 0xF000) | (radio->txctl2 << 12)); + & 0xF000) | (FIXME << 12)); + */ } if (bcm->sprom.boardflags & BCM43xx_BFL_PACTRL) bcm43xx_phy_write(bcm, 0x002E, 0x8075); else - bcm43xx_phy_write(bcm, 0x002E, 0x807F); + bcm43xx_phy_write(bcm, 0x003E, 0x807F); if (phy->rev < 2) bcm43xx_phy_write(bcm, 0x002F, 0x0101); else @@ -1300,9 +1299,7 @@ static u16 bcm43xx_phy_lo_b_r15_loop(struct bcm43xx_private *bcm) { int i; u16 ret = 0; - unsigned long flags; - local_irq_save(flags); for (i = 0; i < 10; i++){ bcm43xx_phy_write(bcm, 0x0015, 0xAFA0); udelay(1); @@ -1312,8 +1309,6 @@ static u16 bcm43xx_phy_lo_b_r15_loop(struct bcm43xx_private *bcm) udelay(40); ret += bcm43xx_phy_read(bcm, 0x002C); } - local_irq_restore(flags); - bcm43xx_voluntary_preempt(); return ret; } @@ -1415,10 +1410,7 @@ static inline u16 bcm43xx_phy_lo_g_deviation_subval(struct bcm43xx_private *bcm, u16 control) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); - u16 ret; - unsigned long flags; - local_irq_save(flags); if (phy->connected) { bcm43xx_phy_write(bcm, 0x15, 0xE300); control <<= 8; @@ -1438,11 +1430,8 @@ u16 bcm43xx_phy_lo_g_deviation_subval(struct bcm43xx_private *bcm, u16 control) bcm43xx_phy_write(bcm, 0x0015, control | 0xFFE0); udelay(8); } - ret = bcm43xx_phy_read(bcm, 0x002D); - local_irq_restore(flags); - bcm43xx_voluntary_preempt(); - return ret; + return bcm43xx_phy_read(bcm, 0x002D); } static u32 bcm43xx_phy_lo_g_singledeviation(struct bcm43xx_private *bcm, u16 control) @@ -1659,7 +1648,7 @@ void bcm43xx_phy_set_baseband_attenuation(struct bcm43xx_private *bcm, void bcm43xx_phy_lo_g_measure(struct bcm43xx_private *bcm) { static const u8 pairorder[10] = { 3, 1, 5, 7, 9, 2, 0, 4, 6, 8 }; - const int is_initializing = (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZING); + const int is_initializing = bcm43xx_is_initializing(bcm); struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); u16 h, i, oldi = 0, j; @@ -1766,7 +1755,6 @@ void bcm43xx_phy_lo_g_measure(struct bcm43xx_private *bcm) bcm43xx_radio_write16(bcm, 0x43, i); bcm43xx_radio_write16(bcm, 0x52, radio->txctl2); udelay(10); - bcm43xx_voluntary_preempt(); bcm43xx_phy_set_baseband_attenuation(bcm, j * 2); @@ -1810,7 +1798,6 @@ void bcm43xx_phy_lo_g_measure(struct bcm43xx_private *bcm) radio->txctl2 | (3/*txctl1*/ << 4));//FIXME: shouldn't txctl1 be zero here and 3 in the loop above? udelay(10); - bcm43xx_voluntary_preempt(); bcm43xx_phy_set_baseband_attenuation(bcm, j * 2); @@ -1832,7 +1819,6 @@ void bcm43xx_phy_lo_g_measure(struct bcm43xx_private *bcm) bcm43xx_phy_write(bcm, 0x0812, (r27 << 8) | 0xA2); udelay(2); bcm43xx_phy_write(bcm, 0x0812, (r27 << 8) | 0xA3); - bcm43xx_voluntary_preempt(); } else bcm43xx_phy_write(bcm, 0x0015, r27 | 0xEFA0); bcm43xx_phy_lo_adjust(bcm, is_initializing); @@ -2197,6 +2183,12 @@ int bcm43xx_phy_init(struct bcm43xx_private *bcm) { struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); int err = -ENODEV; + unsigned long flags; + + /* We do not want to be preempted while calibrating + * the hardware. + */ + local_irq_save(flags); switch (phy->type) { case BCM43xx_PHYTYPE_A: @@ -2230,6 +2222,7 @@ int bcm43xx_phy_init(struct bcm43xx_private *bcm) err = 0; break; } + local_irq_restore(flags); if (err) printk(KERN_WARNING PFX "Unknown PHYTYPE found!\n"); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_pio.c b/drivers/net/wireless/bcm43xx/bcm43xx_pio.c index c60c1743e..0aa1bd269 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_pio.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_pio.c @@ -262,10 +262,8 @@ static void tx_tasklet(unsigned long d) int err; u16 txctl; - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); - if (queue->tx_frozen) - goto out_unlock; txctl = bcm43xx_pio_read(queue, BCM43xx_PIO_TXCTL); if (txctl & BCM43xx_PIO_TXCTL_SUSPEND) goto out_unlock; @@ -300,7 +298,7 @@ static void tx_tasklet(unsigned long d) continue; } out_unlock: - spin_unlock_irqrestore(&bcm->irq_lock, flags); + bcm43xx_unlock_mmio(bcm, flags); } static void setup_txqueues(struct bcm43xx_pioqueue *queue) @@ -376,6 +374,7 @@ static void cancel_transfers(struct bcm43xx_pioqueue *queue) struct bcm43xx_pio_txpacket *packet, *tmp_packet; netif_tx_disable(queue->bcm->net_dev); + assert(queue->bcm->shutting_down); tasklet_disable(&queue->txtask); list_for_each_entry_safe(packet, tmp_packet, &queue->txrunning, list) @@ -635,40 +634,5 @@ void bcm43xx_pio_tx_resume(struct bcm43xx_pioqueue *queue) bcm43xx_pio_read(queue, BCM43xx_PIO_TXCTL) & ~BCM43xx_PIO_TXCTL_SUSPEND); bcm43xx_power_saving_ctl_bits(queue->bcm, -1, -1); - if (!list_empty(&queue->txqueue)) - tasklet_schedule(&queue->txtask); -} - -void bcm43xx_pio_freeze_txqueues(struct bcm43xx_private *bcm) -{ - struct bcm43xx_pio *pio; - - assert(bcm43xx_using_pio(bcm)); - pio = bcm43xx_current_pio(bcm); - pio->queue0->tx_frozen = 1; - pio->queue1->tx_frozen = 1; - pio->queue2->tx_frozen = 1; - pio->queue3->tx_frozen = 1; -} - -void bcm43xx_pio_thaw_txqueues(struct bcm43xx_private *bcm) -{ - struct bcm43xx_pio *pio; - - assert(bcm43xx_using_pio(bcm)); - pio = bcm43xx_current_pio(bcm); - pio->queue0->tx_frozen = 0; - pio->queue1->tx_frozen = 0; - pio->queue2->tx_frozen = 0; - pio->queue3->tx_frozen = 0; - if (!list_empty(&pio->queue0->txqueue)) - tasklet_schedule(&pio->queue0->txtask); - if (!list_empty(&pio->queue1->txqueue)) - tasklet_schedule(&pio->queue1->txtask); - if (!list_empty(&pio->queue2->txqueue)) - tasklet_schedule(&pio->queue2->txtask); - if (!list_empty(&pio->queue3->txqueue)) - tasklet_schedule(&pio->queue3->txtask); + tasklet_schedule(&queue->txtask); } - - diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_pio.h b/drivers/net/wireless/bcm43xx/bcm43xx_pio.h index bc78a3c2c..dfc78209e 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_pio.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_pio.h @@ -54,7 +54,6 @@ struct bcm43xx_pioqueue { u16 mmio_base; u8 tx_suspended:1, - tx_frozen:1, need_workarounds:1; /* Workarounds needed for core.rev < 3 */ /* Adjusted size of the device internal TX buffer. */ @@ -109,12 +108,8 @@ void bcm43xx_pio_handle_xmitstatus(struct bcm43xx_private *bcm, struct bcm43xx_xmitstatus *status); void bcm43xx_pio_rx(struct bcm43xx_pioqueue *queue); -/* Suspend a TX queue on hardware level. */ void bcm43xx_pio_tx_suspend(struct bcm43xx_pioqueue *queue); void bcm43xx_pio_tx_resume(struct bcm43xx_pioqueue *queue); -/* Suspend (freeze) the TX tasklet (software level). */ -void bcm43xx_pio_freeze_txqueues(struct bcm43xx_private *bcm); -void bcm43xx_pio_thaw_txqueues(struct bcm43xx_private *bcm); #else /* CONFIG_BCM43XX_PIO */ @@ -150,14 +145,6 @@ static inline void bcm43xx_pio_tx_resume(struct bcm43xx_pioqueue *queue) { } -static inline -void bcm43xx_pio_freeze_txqueues(struct bcm43xx_private *bcm) -{ -} -static inline -void bcm43xx_pio_thaw_txqueues(struct bcm43xx_private *bcm) -{ -} #endif /* CONFIG_BCM43XX_PIO */ #endif /* BCM43xx_PIO_H_ */ diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c index bb9c484d7..af5c0bff1 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c @@ -1594,11 +1594,11 @@ int bcm43xx_radio_selectchannel(struct bcm43xx_private *bcm, u16 r8, tmp; u16 freq; - if (!ieee80211_is_valid_channel(bcm->ieee, channel)) - return -EINVAL; if ((radio->manufact == 0x17F) && (radio->version == 0x2060) && (radio->revision == 1)) { + if (channel > 200) + return -EINVAL; freq = channel2freq_a(channel); r8 = bcm43xx_radio_read16(bcm, 0x0008); @@ -1651,6 +1651,9 @@ int bcm43xx_radio_selectchannel(struct bcm43xx_private *bcm, TODO(); //TODO: TSSI2dbm workaround bcm43xx_phy_xmitpower(bcm);//FIXME correct? } else { + if ((channel < 1) || (channel > 14)) + return -EINVAL; + if (synthetic_pu_workaround) bcm43xx_synth_pu_workaround(bcm, channel); diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c index f41d9e7d0..b438f48e8 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c @@ -120,14 +120,12 @@ static ssize_t bcm43xx_attr_sprom_show(struct device *dev, GFP_KERNEL); if (!sprom) return -ENOMEM; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); + assert(bcm->initialized); err = bcm43xx_sprom_read(bcm, sprom); if (!err) err = sprom2hex(sprom, buf, PAGE_SIZE); - mmiowb(); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); kfree(sprom); return err; @@ -152,14 +150,10 @@ static ssize_t bcm43xx_attr_sprom_store(struct device *dev, err = hex2sprom(sprom, buf, count); if (err) goto out_kfree; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - spin_lock(&bcm->leds_lock); + bcm43xx_lock_mmio(bcm, flags); + assert(bcm->initialized); err = bcm43xx_sprom_write(bcm, sprom); - mmiowb(); - spin_unlock(&bcm->leds_lock); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); out_kfree: kfree(sprom); @@ -176,12 +170,15 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev, char *buf) { struct bcm43xx_private *bcm = dev_to_bcm(dev); + unsigned long flags; + int err; ssize_t count = 0; if (!capable(CAP_NET_ADMIN)) return -EPERM; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); + assert(bcm->initialized); switch (bcm43xx_current_radio(bcm)->interfmode) { case BCM43xx_RADIO_INTERFMODE_NONE: @@ -196,10 +193,11 @@ static ssize_t bcm43xx_attr_interfmode_show(struct device *dev, default: assert(0); } + err = 0; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); - return count; + return err ? err : count; } @@ -233,17 +231,16 @@ static ssize_t bcm43xx_attr_interfmode_store(struct device *dev, return -EINVAL; } - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); + assert(bcm->initialized); err = bcm43xx_radio_set_interference_mitigation(bcm, mode); if (err) { printk(KERN_ERR PFX "Interference Mitigation not " "supported by device\n"); } - mmiowb(); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + + bcm43xx_unlock_mmio(bcm, flags); return err ? err : count; } @@ -257,21 +254,25 @@ static ssize_t bcm43xx_attr_preamble_show(struct device *dev, char *buf) { struct bcm43xx_private *bcm = dev_to_bcm(dev); + unsigned long flags; + int err; ssize_t count; if (!capable(CAP_NET_ADMIN)) return -EPERM; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); + assert(bcm->initialized); if (bcm->short_preamble) count = snprintf(buf, PAGE_SIZE, "1 (Short Preamble enabled)\n"); else count = snprintf(buf, PAGE_SIZE, "0 (Short Preamble disabled)\n"); - mutex_unlock(&bcm->mutex); + err = 0; + bcm43xx_unlock(bcm, flags); - return count; + return err ? err : count; } static ssize_t bcm43xx_attr_preamble_store(struct device *dev, @@ -280,6 +281,7 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev, { struct bcm43xx_private *bcm = dev_to_bcm(dev); unsigned long flags; + int err; int value; if (!capable(CAP_NET_ADMIN)) @@ -288,15 +290,15 @@ static ssize_t bcm43xx_attr_preamble_store(struct device *dev, value = get_boolean(buf, count); if (value < 0) return value; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); + assert(bcm->initialized); bcm->short_preamble = !!value; - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + err = 0; + bcm43xx_unlock(bcm, flags); - return count; + return err ? err : count; } static DEVICE_ATTR(shortpreamble, 0644, @@ -308,7 +310,7 @@ int bcm43xx_sysfs_register(struct bcm43xx_private *bcm) struct device *dev = &bcm->pci_dev->dev; int err; - assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); + assert(bcm->initialized); err = device_create_file(dev, &dev_attr_sprom); if (err) diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index ebe2a8469..b45063974 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c @@ -55,12 +55,13 @@ static int bcm43xx_wx_get_name(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; int i; struct bcm43xx_phyinfo *phy; char suffix[7] = { 0 }; int have_a = 0, have_b = 0, have_g = 0; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); for (i = 0; i < bcm->nr_80211_available; i++) { phy = &(bcm->core_80211_ext[i].phy); switch (phy->type) { @@ -76,7 +77,7 @@ static int bcm43xx_wx_get_name(struct net_device *net_dev, assert(0); } } - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); i = 0; if (have_a) { @@ -110,9 +111,7 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, int freq; int err = -EINVAL; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - + bcm43xx_lock_mmio(bcm, flags); if ((data->freq.m >= 0) && (data->freq.m <= 1000)) { channel = data->freq.m; freq = bcm43xx_channel_to_freq(bcm, channel); @@ -120,9 +119,9 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, channel = bcm43xx_freq_to_channel(bcm, data->freq.m); freq = data->freq.m; } - if (!ieee80211_is_valid_channel(bcm->ieee, channel)) + if (!bcm43xx_is_valid_channel(bcm, channel)) goto out_unlock; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { + if (bcm->initialized) { //ieee80211softmac_disassoc(softmac, $REASON); bcm43xx_mac_suspend(bcm); err = bcm43xx_radio_selectchannel(bcm, channel, 0); @@ -132,8 +131,7 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, err = 0; } out_unlock: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); return err; } @@ -145,13 +143,15 @@ static int bcm43xx_wx_get_channelfreq(struct net_device *net_dev, { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); struct bcm43xx_radioinfo *radio; + unsigned long flags; int err = -ENODEV; u16 channel; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); radio = bcm43xx_current_radio(bcm); channel = radio->channel; if (channel == 0xFF) { + assert(!bcm->initialized); channel = radio->initial_channel; if (channel == 0xFF) goto out_unlock; @@ -163,7 +163,7 @@ static int bcm43xx_wx_get_channelfreq(struct net_device *net_dev, err = 0; out_unlock: - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return err; } @@ -181,15 +181,13 @@ static int bcm43xx_wx_set_mode(struct net_device *net_dev, if (mode == IW_MODE_AUTO) mode = BCM43xx_INITIAL_IWMODE; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (bcm->initialized) { if (bcm->ieee->iw_mode != mode) bcm43xx_set_iwmode(bcm, mode); } else bcm->ieee->iw_mode = mode; - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); return 0; } @@ -200,10 +198,11 @@ static int bcm43xx_wx_get_mode(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); data->mode = bcm->ieee->iw_mode; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -216,6 +215,7 @@ static int bcm43xx_wx_get_rangeparams(struct net_device *net_dev, struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); struct iw_range *range = (struct iw_range *)extra; const struct ieee80211_geo *geo; + unsigned long flags; int i, j; struct bcm43xx_phyinfo *phy; @@ -255,7 +255,7 @@ static int bcm43xx_wx_get_rangeparams(struct net_device *net_dev, IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); phy = bcm43xx_current_phy(bcm); range->num_bitrates = 0; @@ -302,7 +302,7 @@ static int bcm43xx_wx_get_rangeparams(struct net_device *net_dev, } range->num_frequency = j; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -313,13 +313,14 @@ static int bcm43xx_wx_set_nick(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; size_t len; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); len = min((size_t)data->data.length, (size_t)IW_ESSID_MAX_SIZE); memcpy(bcm->nick, extra, len); bcm->nick[len] = '\0'; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -330,14 +331,15 @@ static int bcm43xx_wx_get_nick(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; size_t len; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); len = strlen(bcm->nick) + 1; memcpy(extra, bcm->nick, len); data->data.length = (__u16)len; data->data.flags = 1; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -351,8 +353,7 @@ static int bcm43xx_wx_set_rts(struct net_device *net_dev, unsigned long flags; int err = -EINVAL; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); if (data->rts.disabled) { bcm->rts_threshold = BCM43xx_MAX_RTS_THRESHOLD; err = 0; @@ -363,8 +364,7 @@ static int bcm43xx_wx_set_rts(struct net_device *net_dev, err = 0; } } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return err; } @@ -375,12 +375,13 @@ static int bcm43xx_wx_get_rts(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); data->rts.value = bcm->rts_threshold; data->rts.fixed = 0; data->rts.disabled = (bcm->rts_threshold == BCM43xx_MAX_RTS_THRESHOLD); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -394,8 +395,7 @@ static int bcm43xx_wx_set_frag(struct net_device *net_dev, unsigned long flags; int err = -EINVAL; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); if (data->frag.disabled) { bcm->ieee->fts = MAX_FRAG_THRESHOLD; err = 0; @@ -406,8 +406,7 @@ static int bcm43xx_wx_set_frag(struct net_device *net_dev, err = 0; } } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return err; } @@ -418,12 +417,13 @@ static int bcm43xx_wx_get_frag(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); data->frag.value = bcm->ieee->fts; data->frag.fixed = 0; data->frag.disabled = (bcm->ieee->fts == MAX_FRAG_THRESHOLD); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -445,9 +445,8 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev, return -EOPNOTSUPP; } - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) + bcm43xx_lock_mmio(bcm, flags); + if (!bcm->initialized) goto out_unlock; radio = bcm43xx_current_radio(bcm); phy = bcm43xx_current_phy(bcm); @@ -470,8 +469,7 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev, err = 0; out_unlock: - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); return err; } @@ -483,10 +481,11 @@ static int bcm43xx_wx_get_xmitpower(struct net_device *net_dev, { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); struct bcm43xx_radioinfo *radio; + unsigned long flags; int err = -ENODEV; - mutex_lock(&bcm->mutex); - if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) + bcm43xx_lock(bcm, flags); + if (!bcm->initialized) goto out_unlock; radio = bcm43xx_current_radio(bcm); /* desired dBm value is in Q5.2 */ @@ -497,7 +496,7 @@ static int bcm43xx_wx_get_xmitpower(struct net_device *net_dev, err = 0; out_unlock: - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return err; } @@ -584,9 +583,8 @@ static int bcm43xx_wx_set_interfmode(struct net_device *net_dev, return -EINVAL; } - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) { + bcm43xx_lock_mmio(bcm, flags); + if (bcm->initialized) { err = bcm43xx_radio_set_interference_mitigation(bcm, mode); if (err) { printk(KERN_ERR PFX "Interference Mitigation not " @@ -600,8 +598,7 @@ static int bcm43xx_wx_set_interfmode(struct net_device *net_dev, } else bcm43xx_current_radio(bcm)->interfmode = mode; } - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); return err; } @@ -612,11 +609,12 @@ static int bcm43xx_wx_get_interfmode(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; int mode; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); mode = bcm43xx_current_radio(bcm)->interfmode; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); switch (mode) { case BCM43xx_RADIO_INTERFMODE_NONE: @@ -646,11 +644,9 @@ static int bcm43xx_wx_set_shortpreamble(struct net_device *net_dev, int on; on = *((int *)extra); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); bcm->short_preamble = !!on; - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -661,11 +657,12 @@ static int bcm43xx_wx_get_shortpreamble(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; int on; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); on = bcm->short_preamble; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); if (on) strncpy(extra, "1 (Short Preamble enabled)", MAX_WX_STRING); @@ -687,13 +684,11 @@ static int bcm43xx_wx_set_swencryption(struct net_device *net_dev, on = *((int *)extra); - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock(bcm, flags); bcm->ieee->host_encrypt = !!on; bcm->ieee->host_decrypt = !!on; bcm->ieee->host_build_iv = !on; - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); return 0; } @@ -704,11 +699,12 @@ static int bcm43xx_wx_get_swencryption(struct net_device *net_dev, char *extra) { struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); + unsigned long flags; int on; - mutex_lock(&bcm->mutex); + bcm43xx_lock(bcm, flags); on = bcm->ieee->host_encrypt; - mutex_unlock(&bcm->mutex); + bcm43xx_unlock(bcm, flags); if (on) strncpy(extra, "1 (SW encryption enabled) ", MAX_WX_STRING); @@ -771,13 +767,11 @@ static int bcm43xx_wx_sprom_read(struct net_device *net_dev, if (!sprom) goto out; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); + bcm43xx_lock_mmio(bcm, flags); err = -ENODEV; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) + if (bcm->initialized) err = bcm43xx_sprom_read(bcm, sprom); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); if (!err) data->data.length = sprom2hex(sprom, extra); kfree(sprom); @@ -818,15 +812,11 @@ static int bcm43xx_wx_sprom_write(struct net_device *net_dev, if (err) goto out_kfree; - mutex_lock(&bcm->mutex); - spin_lock_irqsave(&bcm->irq_lock, flags); - spin_lock(&bcm->leds_lock); + bcm43xx_lock_mmio(bcm, flags); err = -ENODEV; - if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) + if (bcm->initialized) err = bcm43xx_sprom_write(bcm, sprom); - spin_unlock(&bcm->leds_lock); - spin_unlock_irqrestore(&bcm->irq_lock, flags); - mutex_unlock(&bcm->mutex); + bcm43xx_unlock_mmio(bcm, flags); out_kfree: kfree(sprom); out: diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c index 6dbd855b3..d8ece28c0 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.c @@ -296,14 +296,11 @@ void bcm43xx_generate_txhdr(struct bcm43xx_private *bcm, u16 control = 0; u16 wsec_rate = 0; u16 encrypt_frame; - const u16 ftype = WLAN_FC_GET_TYPE(le16_to_cpu(wireless_header->frame_ctl)); - const int is_mgt = (ftype == IEEE80211_FTYPE_MGMT); /* Now construct the TX header. */ memset(txhdr, 0, sizeof(*txhdr)); - bitrate = ieee80211softmac_suggest_txrate(bcm->softmac, - is_multicast_ether_addr(wireless_header->addr1), is_mgt); + bitrate = bcm->softmac->txrates.default_rate; ofdm_modulation = !(ieee80211_is_cck_rate(bitrate)); fallback_bitrate = bcm43xx_calc_fallback_rate(bitrate); fallback_ofdm_modulation = !(ieee80211_is_cck_rate(fallback_bitrate)); diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c index 29d39105f..346c6febb 100644 --- a/drivers/net/wireless/hermes.c +++ b/drivers/net/wireless/hermes.c @@ -38,6 +38,7 @@ * under either the MPL or the GPL. */ +#include #include #include #include @@ -120,6 +121,12 @@ void hermes_struct_init(hermes_t *hw, void __iomem *address, int reg_spacing) hw->iobase = address; hw->reg_spacing = reg_spacing; hw->inten = 0x0; + +#ifdef HERMES_DEBUG_BUFFER + hw->dbufp = 0; + memset(&hw->dbuf, 0xff, sizeof(hw->dbuf)); + memset(&hw->profile, 0, sizeof(hw->profile)); +#endif } int hermes_init(hermes_t *hw) @@ -340,6 +347,19 @@ static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset) reg = hermes_read_reg(hw, oreg); } +#ifdef HERMES_DEBUG_BUFFER + hw->profile[HERMES_BAP_BUSY_TIMEOUT - k]++; + + if (k < HERMES_BAP_BUSY_TIMEOUT) { + struct hermes_debug_entry *e = + &hw->dbuf[(hw->dbufp++) % HERMES_DEBUG_BUFSIZE]; + e->bap = bap; + e->id = id; + e->offset = offset; + e->cycles = HERMES_BAP_BUSY_TIMEOUT - k; + } +#endif + if (reg & HERMES_OFFSET_BUSY) return -ETIMEDOUT; @@ -399,7 +419,8 @@ int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len, } /* Write a block of data to the chip's buffer, via the - * BAP. Synchronization/serialization is the caller's problem. + * BAP. Synchronization/serialization is the caller's problem. len + * must be even. * * Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware */ @@ -409,7 +430,7 @@ int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; int err = 0; - if (len < 0) + if ( (len < 0) || (len % 2) ) return -EINVAL; err = hermes_bap_seek(hw, bap, id, offset); @@ -417,12 +438,49 @@ int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, goto out; /* Actually do the transfer */ - hermes_write_bytes(hw, dreg, buf, len); + hermes_write_words(hw, dreg, buf, len/2); out: return err; } +/* Write a block of data to the chip's buffer with padding if + * neccessary, via the BAP. Synchronization/serialization is the + * caller's problem. len must be even. + * + * Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware + */ +int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, int len, + u16 id, u16 offset) +{ + int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; + int err = 0; + + if (len < 0 || len % 2 || data_len > len) + return -EINVAL; + + err = hermes_bap_seek(hw, bap, id, offset); + if (err) + goto out; + + /* Transfer all the complete words of data */ + hermes_write_words(hw, dreg, buf, data_len/2); + /* If there is an odd byte left over pad and transfer it */ + if (data_len & 1) { + u8 end[2]; + end[1] = 0; + end[0] = ((unsigned char *)buf)[data_len - 1]; + hermes_write_words(hw, dreg, end, 1); + data_len ++; + } + /* Now send zeros for the padding */ + if (data_len < len) + hermes_clear_words(hw, dreg, (len - data_len) / 2); + /* Complete */ + out: + return err; +} + /* Read a Length-Type-Value record from the card. * * If length is NULL, we ignore the length read from the card, and @@ -495,7 +553,7 @@ int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, count = length - 1; - hermes_write_bytes(hw, dreg, value, count << 1); + hermes_write_words(hw, dreg, value, count); err = hermes_docmd_wait(hw, HERMES_CMD_ACCESS | HERMES_CMD_WRITE, rid, NULL); @@ -510,6 +568,7 @@ EXPORT_SYMBOL(hermes_allocate); EXPORT_SYMBOL(hermes_bap_pread); EXPORT_SYMBOL(hermes_bap_pwrite); +EXPORT_SYMBOL(hermes_bap_pwrite_pad); EXPORT_SYMBOL(hermes_read_ltv); EXPORT_SYMBOL(hermes_write_ltv); diff --git a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h index 8e3f0e3ed..7644f72a9 100644 --- a/drivers/net/wireless/hermes.h +++ b/drivers/net/wireless/hermes.h @@ -328,6 +328,16 @@ struct hermes_multicast { u8 addr[HERMES_MAX_MULTICAST][ETH_ALEN]; } __attribute__ ((packed)); +// #define HERMES_DEBUG_BUFFER 1 +#define HERMES_DEBUG_BUFSIZE 4096 +struct hermes_debug_entry { + int bap; + u16 id, offset; + int cycles; +}; + +#ifdef __KERNEL__ + /* Timeouts */ #define HERMES_BAP_BUSY_TIMEOUT (10000) /* In iterations of ~1us */ @@ -337,7 +347,14 @@ typedef struct hermes { int reg_spacing; #define HERMES_16BIT_REGSPACING 0 #define HERMES_32BIT_REGSPACING 1 + u16 inten; /* Which interrupts should be enabled? */ + +#ifdef HERMES_DEBUG_BUFFER + struct hermes_debug_entry dbuf[HERMES_DEBUG_BUFSIZE]; + unsigned long dbufp; + unsigned long profile[HERMES_BAP_BUSY_TIMEOUT+1]; +#endif } hermes_t; /* Register access convenience macros */ @@ -359,6 +376,8 @@ int hermes_bap_pread(hermes_t *hw, int bap, void *buf, int len, u16 id, u16 offset); int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, int len, u16 id, u16 offset); +int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, + unsigned data_len, int len, u16 id, u16 offset); int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned buflen, u16 *length, void *buf); int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, @@ -406,13 +425,10 @@ static inline void hermes_read_words(struct hermes *hw, int off, void *buf, unsi ioread16_rep(hw->iobase + off, buf, count); } -static inline void hermes_write_bytes(struct hermes *hw, int off, - const char *buf, unsigned count) +static inline void hermes_write_words(struct hermes *hw, int off, const void *buf, unsigned count) { off = off << hw->reg_spacing; - iowrite16_rep(hw->iobase + off, buf, count >> 1); - if (unlikely(count & 1)) - iowrite8(buf[count - 1], hw->iobase + off); + iowrite16_rep(hw->iobase + off, buf, count); } static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count) @@ -446,4 +462,21 @@ static inline int hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word) return HERMES_WRITE_RECORD(hw, bap, rid, &rec); } +#else /* ! __KERNEL__ */ + +/* These are provided for the benefit of userspace drivers and testing programs + which use ioperm() or iopl() */ + +#define hermes_read_reg(base, off) (inw((base) + (off))) +#define hermes_write_reg(base, off, val) (outw((val), (base) + (off))) + +#define hermes_read_regn(base, name) (hermes_read_reg((base), HERMES_##name)) +#define hermes_write_regn(base, name, val) (hermes_write_reg((base), HERMES_##name, (val))) + +/* Note that for the next two, the count is in 16-bit words, not bytes */ +#define hermes_read_data(base, off, buf, count) (insw((base) + (off), (buf), (count))) +#define hermes_write_data(base, off, buf, count) (outsw((base) + (off), (buf), (count))) + +#endif /* ! __KERNEL__ */ + #endif /* _HERMES_H */ diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 4a5be70c0..06a521414 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c @@ -534,4 +534,5 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) } +EXPORT_SYMBOL(hostap_dump_tx_80211); EXPORT_SYMBOL(hostap_master_start_xmit); diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index ba1312502..06c3fa32b 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c @@ -3276,6 +3276,17 @@ EXPORT_SYMBOL(hostap_init_data); EXPORT_SYMBOL(hostap_init_ap_proc); EXPORT_SYMBOL(hostap_free_data); EXPORT_SYMBOL(hostap_check_sta_fw_version); +EXPORT_SYMBOL(hostap_handle_sta_tx); +EXPORT_SYMBOL(hostap_handle_sta_release); EXPORT_SYMBOL(hostap_handle_sta_tx_exc); +EXPORT_SYMBOL(hostap_update_sta_ps); +EXPORT_SYMBOL(hostap_handle_sta_rx); +EXPORT_SYMBOL(hostap_is_sta_assoc); +EXPORT_SYMBOL(hostap_is_sta_authorized); +EXPORT_SYMBOL(hostap_add_sta); +EXPORT_SYMBOL(hostap_update_rates); +EXPORT_SYMBOL(hostap_add_wds_links); +EXPORT_SYMBOL(hostap_wds_link_oper); #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT +EXPORT_SYMBOL(hostap_deauth_all_stas); #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 52e6df5c1..55bed923f 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c @@ -1,5 +1,6 @@ #define PRISM2_PCCARD +#include #include #include #include @@ -843,7 +844,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = { PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001), PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), -/* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */ + PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), @@ -880,12 +881,6 @@ static struct pcmcia_device_id hostap_cs_ids[] = { PCMCIA_DEVICE_PROD_ID12( "ZoomAir 11Mbps High", "Rate wireless Networking", 0x273fe3db, 0x32a1eaee), - PCMCIA_DEVICE_PROD_ID123( - "Pretec", "CompactWLAN Card 802.11b", "2.5", - 0x1cadd3e5, 0xe697636c, 0x7a5bfcf1), - PCMCIA_DEVICE_PROD_ID123( - "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02", - 0xc7b8df9d, 0x1700d087, 0x4b74baa0), PCMCIA_DEVICE_NULL }; MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids); diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index d500012fd..328e9a1d1 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c @@ -30,6 +30,7 @@ */ +#include #include #include @@ -1042,9 +1043,6 @@ static int prism2_reset_port(struct net_device *dev) dev->name, local->fragm_threshold); } - /* Some firmwares lose antenna selection settings on reset */ - (void) hostap_set_antsel(local); - return res; } @@ -3098,14 +3096,6 @@ static void prism2_clear_set_tim_queue(local_info_t *local) } -/* - * HostAP uses two layers of net devices, where the inner - * layer gets called all the time from the outer layer. - * This is a natural nesting, which needs a split lock type. - */ -static struct lock_class_key hostap_netdev_xmit_lock_key; - - static struct net_device * prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, struct device *sdev) @@ -3270,8 +3260,6 @@ while (0) SET_NETDEV_DEV(dev, sdev); if (ret >= 0) ret = register_netdevice(dev); - - lockdep_set_class(&dev->_xmit_lock, &hostap_netdev_xmit_lock_key); rtnl_unlock(); if (ret < 0) { printk(KERN_WARNING "%s: register netdevice failed!\n", diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 53374fcba..8dd4c4446 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c @@ -12,6 +12,7 @@ * more details. */ +#include #include #include #include @@ -1124,9 +1125,11 @@ EXPORT_SYMBOL(hostap_set_auth_algs); EXPORT_SYMBOL(hostap_dump_rx_header); EXPORT_SYMBOL(hostap_dump_tx_header); EXPORT_SYMBOL(hostap_80211_header_parse); +EXPORT_SYMBOL(hostap_80211_prism_header_parse); EXPORT_SYMBOL(hostap_80211_get_hdrlen); EXPORT_SYMBOL(hostap_get_stats); EXPORT_SYMBOL(hostap_setup_dev); +EXPORT_SYMBOL(hostap_proc); EXPORT_SYMBOL(hostap_set_multicast_list_queue); EXPORT_SYMBOL(hostap_set_hostapd); EXPORT_SYMBOL(hostap_set_hostapd_sta); diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index c2fa011be..194f07097 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c @@ -4,6 +4,7 @@ * driver patches from Reyk Floeter and * Andy Warner */ +#include #include #include #include @@ -337,7 +338,7 @@ static int prism2_pci_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, dev); - if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name, + if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, dev)) { printk(KERN_WARNING "%s: request_irq failed\n", dev->name); goto fail; diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 6dfa041be..edaaa943e 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c @@ -7,6 +7,7 @@ */ +#include #include #include #include @@ -66,12 +67,10 @@ static struct pci_device_id prism2_plx_id_table[] __devinitdata = { PLXDEV(0x10b7, 0x7770, "3Com AirConnect PCI 777A"), PLXDEV(0x111a, 0x1023, "Siemens SpeedStream SS1023"), PLXDEV(0x126c, 0x8030, "Nortel emobility"), - PLXDEV(0x1562, 0x0001, "Symbol LA-4123"), PLXDEV(0x1385, 0x4100, "Netgear MA301"), PLXDEV(0x15e8, 0x0130, "National Datacomm NCP130 (PLX9052)"), PLXDEV(0x15e8, 0x0131, "National Datacomm NCP130 (TMD7160)"), PLXDEV(0x1638, 0x1100, "Eumitcom WL11000"), - PLXDEV(0x16ab, 0x1100, "Global Sun Tech GL24110P"), PLXDEV(0x16ab, 0x1101, "Global Sun Tech GL24110P (?)"), PLXDEV(0x16ab, 0x1102, "Linksys WPC11 with WDT11"), PLXDEV(0x16ab, 0x1103, "Longshine 8031"), @@ -552,7 +551,7 @@ static int prism2_plx_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, dev); - if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name, + if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, dev)) { printk(KERN_WARNING "%s: request_irq failed\n", dev->name); goto fail; diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index e955db435..72335c8eb 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -134,6 +134,7 @@ that only one external action is invoked at a time. */ #include +#include #include #include #include @@ -1484,7 +1485,7 @@ static int ipw2100_hw_stop_adapter(struct ipw2100_priv *priv) * * Sending the PREPARE_FOR_POWER_DOWN will restrict the * hardware from going into standby mode and will transition - * out of D0-standby if it is already in that state. + * out of D0-standy if it is already in that state. * * STATUS_PREPARE_POWER_DOWN_COMPLETE will be sent by the * driver upon completion. Once received, the driver can @@ -5357,7 +5358,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv, idx, keylen, len); /* NOTE: We don't check cached values in case the firmware was reset - * or some other problem is occurring. If the user is setting the key, + * or some other problem is occuring. If the user is setting the key, * then we push the change */ wep_key->idx = idx; @@ -6229,7 +6230,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, ipw2100_queues_initialize(priv); err = request_irq(pci_dev->irq, - ipw2100_interrupt, IRQF_SHARED, dev->name, priv); + ipw2100_interrupt, SA_SHIRQ, dev->name, priv); if (err) { printk(KERN_WARNING DRV_NAME "Error calling request_irq: %d.\n", pci_dev->irq); diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index b3300ffe4..bca89cff8 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -33,44 +33,7 @@ #include "ipw2200.h" #include - -#ifndef KBUILD_EXTMOD -#define VK "k" -#else -#define VK -#endif - -#ifdef CONFIG_IPW2200_DEBUG -#define VD "d" -#else -#define VD -#endif - -#ifdef CONFIG_IPW2200_MONITOR -#define VM "m" -#else -#define VM -#endif - -#ifdef CONFIG_IPW2200_PROMISCUOUS -#define VP "p" -#else -#define VP -#endif - -#ifdef CONFIG_IPW2200_RADIOTAP -#define VR "r" -#else -#define VR -#endif - -#ifdef CONFIG_IPW2200_QOS -#define VQ "q" -#else -#define VQ -#endif - -#define IPW2200_VERSION "1.1.2" VK VD VM VP VR VQ +#define IPW2200_VERSION "git-1.1.1" #define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2200/2915 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation" #define DRV_VERSION IPW2200_VERSION @@ -83,9 +46,7 @@ MODULE_AUTHOR(DRV_COPYRIGHT); MODULE_LICENSE("GPL"); static int cmdlog = 0; -#ifdef CONFIG_IPW2200_DEBUG static int debug = 0; -#endif static int channel = 0; static int mode = 0; @@ -100,14 +61,8 @@ static int roaming = 1; static const char ipw_modes[] = { 'a', 'b', 'g', '?' }; -static int antenna = CFG_SYS_ANTENNA_BOTH; - -#ifdef CONFIG_IPW2200_PROMISCUOUS -static int rtap_iface = 0; /* def: 0 -- do not create rtap interface */ -#endif - -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS static int qos_enable = 0; static int qos_burst_enable = 0; static int qos_no_ack_mask = 0; @@ -171,7 +126,7 @@ static int ipw_send_qos_params_command(struct ipw_priv *priv, struct ieee80211_q *qos_param); static int ipw_send_qos_info_command(struct ipw_priv *priv, struct ieee80211_qos_information_element *qos_param); -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev); static void ipw_remove_current_network(struct ipw_priv *priv); @@ -533,7 +488,7 @@ static inline void ipw_clear_bit(struct ipw_priv *priv, u32 reg, u32 mask) ipw_write32(priv, reg, ipw_read32(priv, reg) & ~mask); } -static inline void __ipw_enable_interrupts(struct ipw_priv *priv) +static inline void ipw_enable_interrupts(struct ipw_priv *priv) { if (priv->status & STATUS_INT_ENABLED) return; @@ -541,7 +496,7 @@ static inline void __ipw_enable_interrupts(struct ipw_priv *priv) ipw_write32(priv, IPW_INTA_MASK_R, IPW_INTA_MASK_ALL); } -static inline void __ipw_disable_interrupts(struct ipw_priv *priv) +static inline void ipw_disable_interrupts(struct ipw_priv *priv) { if (!(priv->status & STATUS_INT_ENABLED)) return; @@ -549,24 +504,6 @@ static inline void __ipw_disable_interrupts(struct ipw_priv *priv) ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL); } -static inline void ipw_enable_interrupts(struct ipw_priv *priv) -{ - unsigned long flags; - - spin_lock_irqsave(&priv->irq_lock, flags); - __ipw_enable_interrupts(priv); - spin_unlock_irqrestore(&priv->irq_lock, flags); -} - -static inline void ipw_disable_interrupts(struct ipw_priv *priv) -{ - unsigned long flags; - - spin_lock_irqsave(&priv->irq_lock, flags); - __ipw_disable_interrupts(priv); - spin_unlock_irqrestore(&priv->irq_lock, flags); -} - #ifdef CONFIG_IPW2200_DEBUG static char *ipw_error_desc(u32 val) { @@ -1229,6 +1166,12 @@ static struct ipw_fw_error *ipw_alloc_error_log(struct ipw_priv *priv) return error; } +static void ipw_free_error_log(struct ipw_fw_error *error) +{ + if (error) + kfree(error); +} + static ssize_t show_event_log(struct device *d, struct device_attribute *attr, char *buf) { @@ -1290,9 +1233,10 @@ static ssize_t clear_error(struct device *d, const char *buf, size_t count) { struct ipw_priv *priv = dev_get_drvdata(d); - - kfree(priv->error); - priv->error = NULL; + if (priv->error) { + ipw_free_error_log(priv->error); + priv->error = NULL; + } return count; } @@ -1325,105 +1269,6 @@ static ssize_t show_cmd_log(struct device *d, static DEVICE_ATTR(cmd_log, S_IRUGO, show_cmd_log, NULL); -#ifdef CONFIG_IPW2200_PROMISCUOUS -static void ipw_prom_free(struct ipw_priv *priv); -static int ipw_prom_alloc(struct ipw_priv *priv); -static ssize_t store_rtap_iface(struct device *d, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct ipw_priv *priv = dev_get_drvdata(d); - int rc = 0; - - if (count < 1) - return -EINVAL; - - switch (buf[0]) { - case '0': - if (!rtap_iface) - return count; - - if (netif_running(priv->prom_net_dev)) { - IPW_WARNING("Interface is up. Cannot unregister.\n"); - return count; - } - - ipw_prom_free(priv); - rtap_iface = 0; - break; - - case '1': - if (rtap_iface) - return count; - - rc = ipw_prom_alloc(priv); - if (!rc) - rtap_iface = 1; - break; - - default: - return -EINVAL; - } - - if (rc) { - IPW_ERROR("Failed to register promiscuous network " - "device (error %d).\n", rc); - } - - return count; -} - -static ssize_t show_rtap_iface(struct device *d, - struct device_attribute *attr, - char *buf) -{ - struct ipw_priv *priv = dev_get_drvdata(d); - if (rtap_iface) - return sprintf(buf, "%s", priv->prom_net_dev->name); - else { - buf[0] = '-'; - buf[1] = '1'; - buf[2] = '\0'; - return 3; - } -} - -static DEVICE_ATTR(rtap_iface, S_IWUSR | S_IRUSR, show_rtap_iface, - store_rtap_iface); - -static ssize_t store_rtap_filter(struct device *d, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct ipw_priv *priv = dev_get_drvdata(d); - - if (!priv->prom_priv) { - IPW_ERROR("Attempting to set filter without " - "rtap_iface enabled.\n"); - return -EPERM; - } - - priv->prom_priv->filter = simple_strtol(buf, NULL, 0); - - IPW_DEBUG_INFO("Setting rtap filter to " BIT_FMT16 "\n", - BIT_ARG16(priv->prom_priv->filter)); - - return count; -} - -static ssize_t show_rtap_filter(struct device *d, - struct device_attribute *attr, - char *buf) -{ - struct ipw_priv *priv = dev_get_drvdata(d); - return sprintf(buf, "0x%04X", - priv->prom_priv ? priv->prom_priv->filter : 0); -} - -static DEVICE_ATTR(rtap_filter, S_IWUSR | S_IRUSR, show_rtap_filter, - store_rtap_filter); -#endif - static ssize_t show_scan_age(struct device *d, struct device_attribute *attr, char *buf) { @@ -1867,7 +1712,7 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) unsigned long flags; int rc = 0; - spin_lock_irqsave(&priv->irq_lock, flags); + spin_lock_irqsave(&priv->lock, flags); inta = ipw_read32(priv, IPW_INTA_RW); inta_mask = ipw_read32(priv, IPW_INTA_MASK_R); @@ -1876,10 +1721,6 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) /* Add any cached INTA values that need to be handled */ inta |= priv->isr_inta; - spin_unlock_irqrestore(&priv->irq_lock, flags); - - spin_lock_irqsave(&priv->lock, flags); - /* handle all the justifications for the interrupt */ if (inta & IPW_INTA_BIT_RX_TRANSFER) { ipw_rx(priv); @@ -1963,7 +1804,8 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) struct ipw_fw_error *error = ipw_alloc_error_log(priv); ipw_dump_error_log(priv, error); - kfree(error); + if (error) + ipw_free_error_log(error); } #endif } else { @@ -2007,10 +1849,10 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) IPW_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled); } - spin_unlock_irqrestore(&priv->lock, flags); - /* enable all interrupts */ ipw_enable_interrupts(priv); + + spin_unlock_irqrestore(&priv->lock, flags); } #define IPW_CMD(x) case IPW_CMD_ ## x : return #x @@ -2183,11 +2025,16 @@ static int ipw_send_host_complete(struct ipw_priv *priv) return ipw_send_cmd_simple(priv, IPW_CMD_HOST_COMPLETE); } -static int ipw_send_system_config(struct ipw_priv *priv) +static int ipw_send_system_config(struct ipw_priv *priv, + struct ipw_sys_config *config) { - return ipw_send_cmd_pdu(priv, IPW_CMD_SYSTEM_CONFIG, - sizeof(priv->sys_config), - &priv->sys_config); + if (!priv || !config) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_SYSTEM_CONFIG, sizeof(*config), + config); } static int ipw_send_ssid(struct ipw_priv *priv, u8 * ssid, int len) @@ -3257,10 +3104,10 @@ static int ipw_reset_nic(struct ipw_priv *priv) struct ipw_fw { - __le32 ver; - __le32 boot_size; - __le32 ucode_size; - __le32 fw_size; + u32 ver; + u32 boot_size; + u32 ucode_size; + u32 fw_size; u8 data[0]; }; @@ -3284,8 +3131,8 @@ static int ipw_get_fw(struct ipw_priv *priv, fw = (void *)(*raw)->data; - if ((*raw)->size < sizeof(*fw) + le32_to_cpu(fw->boot_size) + - le32_to_cpu(fw->ucode_size) + le32_to_cpu(fw->fw_size)) { + if ((*raw)->size < sizeof(*fw) + + fw->boot_size + fw->ucode_size + fw->fw_size) { IPW_ERROR("%s is too small or corrupt (%zd)\n", name, (*raw)->size); return -EINVAL; @@ -3390,9 +3237,8 @@ static int ipw_load(struct ipw_priv *priv) fw = (void *)raw->data; boot_img = &fw->data[0]; - ucode_img = &fw->data[le32_to_cpu(fw->boot_size)]; - fw_img = &fw->data[le32_to_cpu(fw->boot_size) + - le32_to_cpu(fw->ucode_size)]; + ucode_img = &fw->data[fw->boot_size]; + fw_img = &fw->data[fw->boot_size + fw->ucode_size]; if (rc < 0) goto error; @@ -3426,7 +3272,7 @@ static int ipw_load(struct ipw_priv *priv) IPW_NIC_SRAM_UPPER_BOUND - IPW_NIC_SRAM_LOWER_BOUND); /* DMA the initial boot firmware into the device */ - rc = ipw_load_firmware(priv, boot_img, le32_to_cpu(fw->boot_size)); + rc = ipw_load_firmware(priv, boot_img, fw->boot_size); if (rc < 0) { IPW_ERROR("Unable to load boot firmware: %d\n", rc); goto error; @@ -3448,7 +3294,7 @@ static int ipw_load(struct ipw_priv *priv) ipw_write32(priv, IPW_INTA_RW, IPW_INTA_BIT_FW_INITIALIZATION_DONE); /* DMA the ucode into the device */ - rc = ipw_load_ucode(priv, ucode_img, le32_to_cpu(fw->ucode_size)); + rc = ipw_load_ucode(priv, ucode_img, fw->ucode_size); if (rc < 0) { IPW_ERROR("Unable to load ucode: %d\n", rc); goto error; @@ -3458,7 +3304,7 @@ static int ipw_load(struct ipw_priv *priv) ipw_stop_nic(priv); /* DMA bss firmware into the device */ - rc = ipw_load_firmware(priv, fw_img, le32_to_cpu(fw->fw_size)); + rc = ipw_load_firmware(priv, fw_img, fw->fw_size); if (rc < 0) { IPW_ERROR("Unable to load firmware: %d\n", rc); goto error; @@ -3854,17 +3700,7 @@ static void ipw_bg_disassociate(void *data) static void ipw_system_config(void *data) { struct ipw_priv *priv = data; - -#ifdef CONFIG_IPW2200_PROMISCUOUS - if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { - priv->sys_config.accept_all_data_frames = 1; - priv->sys_config.accept_non_directed_frames = 1; - priv->sys_config.accept_all_mgmt_bcpr = 1; - priv->sys_config.accept_all_mgmt_frames = 1; - } -#endif - - ipw_send_system_config(priv); + ipw_send_system_config(priv, &priv->sys_config); } struct ipw_status_code { @@ -3935,13 +3771,6 @@ static void inline average_init(struct average *avg) memset(avg, 0, sizeof(*avg)); } -#define DEPTH_RSSI 8 -#define DEPTH_NOISE 16 -static s16 exponential_average(s16 prev_avg, s16 val, u8 depth) -{ - return ((depth-1)*prev_avg + val)/depth; -} - static void average_add(struct average *avg, s16 val) { avg->sum -= avg->entries[avg->pos]; @@ -3971,8 +3800,8 @@ static void ipw_reset_stats(struct ipw_priv *priv) priv->quality = 0; average_init(&priv->average_missed_beacons); - priv->exp_avg_rssi = -60; - priv->exp_avg_noise = -85 + 0x100; + average_init(&priv->average_rssi); + average_init(&priv->average_noise); priv->last_rate = 0; priv->last_missed_beacons = 0; @@ -4179,7 +4008,7 @@ static void ipw_gather_stats(struct ipw_priv *priv) IPW_DEBUG_STATS("Tx quality : %3d%% (%u errors, %u packets)\n", tx_quality, tx_failures_delta, tx_packets_delta); - rssi = priv->exp_avg_rssi; + rssi = average_value(&priv->average_rssi); signal_quality = (100 * (priv->ieee->perfect_rssi - priv->ieee->worst_rssi) * @@ -4356,7 +4185,7 @@ static void ipw_rx_notification(struct ipw_priv *priv, queue_work(priv->workqueue, &priv->system_config); -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS #define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \ le16_to_cpu(((struct ieee80211_hdr *)(x))->frame_ctl)) if ((priv->status & STATUS_AUTH) && @@ -4653,24 +4482,6 @@ static void ipw_rx_notification(struct ipw_priv *priv, && priv->status & STATUS_ASSOCIATED) queue_delayed_work(priv->workqueue, &priv->request_scan, HZ); - - /* Send an empty event to user space. - * We don't send the received data on the event because - * it would require us to do complex transcoding, and - * we want to minimise the work done in the irq handler - * Use a request to extract the data. - * Also, we generate this even for any scan, regardless - * on how the scan was initiated. User space can just - * sync on periodic scan to get fresh data... - * Jean II */ - if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) { - union iwreq_data wrqu; - - wrqu.data.length = 0; - wrqu.data.flags = 0; - wireless_send_event(priv->net_dev, SIOCGIWSCAN, - &wrqu, NULL); - } break; } @@ -4766,10 +4577,11 @@ static void ipw_rx_notification(struct ipw_priv *priv, case HOST_NOTIFICATION_NOISE_STATS:{ if (notif->size == sizeof(u32)) { - priv->exp_avg_noise = - exponential_average(priv->exp_avg_noise, - (u8) (le32_to_cpu(notif->u.noise.value) & 0xff), - DEPTH_NOISE); + priv->last_noise = + (u8) (le32_to_cpu(notif->u.noise.value) & + 0xff); + average_add(&priv->average_noise, + priv->last_noise); break; } @@ -6358,6 +6170,8 @@ static void ipw_wpa_assoc_frame(struct ipw_priv *priv, char *wpa_ie, { /* make sure WPA is enabled */ ipw_wpa_enable(priv, 1); + + ipw_disassociate(priv); } static int ipw_set_rsn_capa(struct ipw_priv *priv, @@ -6551,7 +6365,6 @@ static int ipw_wx_set_auth(struct net_device *dev, case IW_AUTH_WPA_ENABLED: ret = ipw_wpa_enable(priv, param->value); - ipw_disassociate(priv); break; case IW_AUTH_RX_UNENCRYPTED_EAPOL: @@ -6693,7 +6506,7 @@ static int ipw_wx_set_mlme(struct net_device *dev, return 0; } -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS /* QoS */ /* @@ -7040,55 +6853,61 @@ static int ipw_get_tx_queue_number(struct ipw_priv *priv, u16 priority) return from_priority_to_tx_queue[priority] - 1; } -static int ipw_is_qos_active(struct net_device *dev, - struct sk_buff *skb) +/* +* add QoS parameter to the TX command +*/ +static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv, + u16 priority, + struct tfd_data *tfd, u8 unicast) { - struct ipw_priv *priv = ieee80211_priv(dev); + int ret = 0; + int tx_queue_id = 0; struct ieee80211_qos_data *qos_data = NULL; int active, supported; - u8 *daddr = skb->data + ETH_ALEN; - int unicast = !is_multicast_ether_addr(daddr); + unsigned long flags; if (!(priv->status & STATUS_ASSOCIATED)) return 0; qos_data = &priv->assoc_network->qos_data; + spin_lock_irqsave(&priv->ieee->lock, flags); + if (priv->ieee->iw_mode == IW_MODE_ADHOC) { if (unicast == 0) qos_data->active = 0; else qos_data->active = qos_data->supported; } + active = qos_data->active; supported = qos_data->supported; + + spin_unlock_irqrestore(&priv->ieee->lock, flags); + IPW_DEBUG_QOS("QoS %d network is QoS active %d supported %d " "unicast %d\n", priv->qos_data.qos_enable, active, supported, unicast); - if (active && priv->qos_data.qos_enable) - return 1; - - return 0; - -} -/* -* add QoS parameter to the TX command -*/ -static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv, - u16 priority, - struct tfd_data *tfd) -{ - int tx_queue_id = 0; - - - tx_queue_id = from_priority_to_tx_queue[priority] - 1; - tfd->tx_flags_ext |= DCT_FLAG_EXT_QOS_ENABLED; - - if (priv->qos_data.qos_no_ack_mask & (1UL << tx_queue_id)) { - tfd->tx_flags &= ~DCT_FLAG_ACK_REQD; - tfd->tfd.tfd_26.mchdr.qos_ctrl |= CTRL_QOS_NO_ACK; + if (active && priv->qos_data.qos_enable) { + ret = from_priority_to_tx_queue[priority]; + tx_queue_id = ret - 1; + IPW_DEBUG_QOS("QoS packet priority is %d \n", priority); + if (priority <= 7) { + tfd->tx_flags_ext |= DCT_FLAG_EXT_QOS_ENABLED; + tfd->tfd.tfd_26.mchdr.qos_ctrl = priority; + tfd->tfd.tfd_26.mchdr.frame_ctl |= + IEEE80211_STYPE_QOS_DATA; + + if (priv->qos_data.qos_no_ack_mask & + (1UL << tx_queue_id)) { + tfd->tx_flags &= ~DCT_FLAG_ACK_REQD; + tfd->tfd.tfd_26.mchdr.qos_ctrl |= + CTRL_QOS_NO_ACK; + } + } } - return 0; + + return ret; } /* @@ -7158,7 +6977,7 @@ static int ipw_send_qos_info_command(struct ipw_priv *priv, struct ieee80211_qos qos_param); } -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ static int ipw_associate_network(struct ipw_priv *priv, struct ieee80211_network *network, @@ -7297,7 +7116,7 @@ static int ipw_associate_network(struct ipw_priv *priv, else priv->sys_config.answer_broadcast_ssid_probe = 0; - err = ipw_send_system_config(priv); + err = ipw_send_system_config(priv, &priv->sys_config); if (err) { IPW_DEBUG_HC("Attempt to send sys config command failed.\n"); return err; @@ -7322,7 +7141,7 @@ static int ipw_associate_network(struct ipw_priv *priv, priv->assoc_network = network; -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS ipw_qos_association(priv, network); #endif @@ -7596,7 +7415,7 @@ static void ipw_handle_data_packet(struct ipw_priv *priv, } } -#ifdef CONFIG_IPW2200_RADIOTAP +#ifdef CONFIG_IEEE80211_RADIOTAP static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, struct ipw_rx_mem_buffer *rxb, struct ieee80211_rx_stats *stats) @@ -7613,7 +7432,15 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, /* Magic struct that slots into the radiotap header -- no reason * to build this manually element by element, we can write it much * more efficiently than we can parse it. ORDER MATTERS HERE */ - struct ipw_rt_hdr *ipw_rt; + struct ipw_rt_hdr { + struct ieee80211_radiotap_header rt_hdr; + u8 rt_flags; /* radiotap packet flags */ + u8 rt_rate; /* rate in 500kb/s */ + u16 rt_channel; /* channel in mhz */ + u16 rt_chbitmask; /* channel bitfield */ + s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ + u8 rt_antenna; /* antenna number */ + } *ipw_rt; short len = le16_to_cpu(pkt->u.frame.length); @@ -7667,11 +7494,9 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, /* Big bitfield of all the fields we provide in radiotap */ ipw_rt->rt_hdr.it_present = ((1 << IEEE80211_RADIOTAP_FLAGS) | - (1 << IEEE80211_RADIOTAP_TSFT) | (1 << IEEE80211_RADIOTAP_RATE) | (1 << IEEE80211_RADIOTAP_CHANNEL) | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | - (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | (1 << IEEE80211_RADIOTAP_ANTENNA)); /* Zero the flags, we'll add to them as we go */ @@ -7757,217 +7582,6 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, } #endif -#ifdef CONFIG_IPW2200_PROMISCUOUS -#define ieee80211_is_probe_response(fc) \ - ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT && \ - (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP ) - -#define ieee80211_is_management(fc) \ - ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) - -#define ieee80211_is_control(fc) \ - ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) - -#define ieee80211_is_data(fc) \ - ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) - -#define ieee80211_is_assoc_request(fc) \ - ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ) - -#define ieee80211_is_reassoc_request(fc) \ - ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) - -static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, - struct ipw_rx_mem_buffer *rxb, - struct ieee80211_rx_stats *stats) -{ - struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data; - struct ipw_rx_frame *frame = &pkt->u.frame; - struct ipw_rt_hdr *ipw_rt; - - /* First cache any information we need before we overwrite - * the information provided in the skb from the hardware */ - struct ieee80211_hdr *hdr; - u16 channel = frame->received_channel; - u8 phy_flags = frame->antennaAndPhy; - s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; - s8 noise = frame->noise; - u8 rate = frame->rate; - short len = le16_to_cpu(pkt->u.frame.length); - u64 tsf = 0; - struct sk_buff *skb; - int hdr_only = 0; - u16 filter = priv->prom_priv->filter; - - /* If the filter is set to not include Rx frames then return */ - if (filter & IPW_PROM_NO_RX) - return; - - /* We received data from the HW, so stop the watchdog */ - priv->prom_net_dev->trans_start = jiffies; - - if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) { - priv->prom_priv->ieee->stats.rx_errors++; - IPW_DEBUG_DROP("Corruption detected! Oh no!\n"); - return; - } - - /* We only process data packets if the interface is open */ - if (unlikely(!netif_running(priv->prom_net_dev))) { - priv->prom_priv->ieee->stats.rx_dropped++; - IPW_DEBUG_DROP("Dropping packet while interface is not up.\n"); - return; - } - - /* Libpcap 0.9.3+ can handle variable length radiotap, so we'll use - * that now */ - if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) { - /* FIXME: Should alloc bigger skb instead */ - priv->prom_priv->ieee->stats.rx_dropped++; - IPW_DEBUG_DROP("Dropping too large packet in monitor\n"); - return; - } - - hdr = (void *)rxb->skb->data + IPW_RX_FRAME_SIZE; - if (ieee80211_is_management(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_MGMT) - return; - if (filter & IPW_PROM_MGMT_HEADER_ONLY) - hdr_only = 1; - } else if (ieee80211_is_control(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_CTL) - return; - if (filter & IPW_PROM_CTL_HEADER_ONLY) - hdr_only = 1; - } else if (ieee80211_is_data(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_DATA) - return; - if (filter & IPW_PROM_DATA_HEADER_ONLY) - hdr_only = 1; - } - - /* Copy the SKB since this is for the promiscuous side */ - skb = skb_copy(rxb->skb, GFP_ATOMIC); - if (skb == NULL) { - IPW_ERROR("skb_clone failed for promiscuous copy.\n"); - return; - } - - /* copy the frame data to write after where the radiotap header goes */ - ipw_rt = (void *)skb->data; - - if (hdr_only) - len = ieee80211_get_hdrlen(hdr->frame_ctl); - - memcpy(ipw_rt->payload, hdr, len); - - /* Zero the radiotap static buffer ... We only need to zero the bytes - * NOT part of our real header, saves a little time. - * - * No longer necessary since we fill in all our data. Purge before - * merging patch officially. - * memset(rxb->skb->data + sizeof(struct ipw_rt_hdr), 0, - * IEEE80211_RADIOTAP_HDRLEN - sizeof(struct ipw_rt_hdr)); - */ - - ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; - ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ - ipw_rt->rt_hdr.it_len = sizeof(*ipw_rt); /* total header+data */ - - /* Set the size of the skb to the size of the frame */ - skb_put(skb, ipw_rt->rt_hdr.it_len + len); - - /* Big bitfield of all the fields we provide in radiotap */ - ipw_rt->rt_hdr.it_present = - ((1 << IEEE80211_RADIOTAP_FLAGS) | - (1 << IEEE80211_RADIOTAP_TSFT) | - (1 << IEEE80211_RADIOTAP_RATE) | - (1 << IEEE80211_RADIOTAP_CHANNEL) | - (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | - (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | - (1 << IEEE80211_RADIOTAP_ANTENNA)); - - /* Zero the flags, we'll add to them as we go */ - ipw_rt->rt_flags = 0; - - ipw_rt->rt_tsf = tsf; - - /* Convert to DBM */ - ipw_rt->rt_dbmsignal = signal; - ipw_rt->rt_dbmnoise = noise; - - /* Convert the channel data and set the flags */ - ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(channel)); - if (channel > 14) { /* 802.11a */ - ipw_rt->rt_chbitmask = - cpu_to_le16((IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ)); - } else if (phy_flags & (1 << 5)) { /* 802.11b */ - ipw_rt->rt_chbitmask = - cpu_to_le16((IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ)); - } else { /* 802.11g */ - ipw_rt->rt_chbitmask = - (IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ); - } - - /* set the rate in multiples of 500k/s */ - switch (rate) { - case IPW_TX_RATE_1MB: - ipw_rt->rt_rate = 2; - break; - case IPW_TX_RATE_2MB: - ipw_rt->rt_rate = 4; - break; - case IPW_TX_RATE_5MB: - ipw_rt->rt_rate = 10; - break; - case IPW_TX_RATE_6MB: - ipw_rt->rt_rate = 12; - break; - case IPW_TX_RATE_9MB: - ipw_rt->rt_rate = 18; - break; - case IPW_TX_RATE_11MB: - ipw_rt->rt_rate = 22; - break; - case IPW_TX_RATE_12MB: - ipw_rt->rt_rate = 24; - break; - case IPW_TX_RATE_18MB: - ipw_rt->rt_rate = 36; - break; - case IPW_TX_RATE_24MB: - ipw_rt->rt_rate = 48; - break; - case IPW_TX_RATE_36MB: - ipw_rt->rt_rate = 72; - break; - case IPW_TX_RATE_48MB: - ipw_rt->rt_rate = 96; - break; - case IPW_TX_RATE_54MB: - ipw_rt->rt_rate = 108; - break; - default: - ipw_rt->rt_rate = 0; - break; - } - - /* antenna number */ - ipw_rt->rt_antenna = (phy_flags & 3); - - /* set the preamble flag if we have it */ - if (phy_flags & (1 << 6)) - ipw_rt->rt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; - - IPW_DEBUG_RX("Rx packet of %d bytes.\n", skb->len); - - if (!ieee80211_rx(priv->prom_priv->ieee, skb, stats)) { - priv->prom_priv->ieee->stats.rx_errors++; - dev_kfree_skb_any(skb); - } -} -#endif - static int is_network_packet(struct ipw_priv *priv, struct ieee80211_hdr_4addr *header) { @@ -8194,21 +7808,15 @@ static void ipw_rx(struct ipw_priv *priv) priv->rx_packets++; -#ifdef CONFIG_IPW2200_PROMISCUOUS - if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) - ipw_handle_promiscuous_rx(priv, rxb, &stats); -#endif - #ifdef CONFIG_IPW2200_MONITOR if (priv->ieee->iw_mode == IW_MODE_MONITOR) { -#ifdef CONFIG_IPW2200_RADIOTAP - - ipw_handle_data_packet_monitor(priv, - rxb, - &stats); +#ifdef CONFIG_IEEE80211_RADIOTAP + ipw_handle_data_packet_monitor(priv, + rxb, + &stats); #else - ipw_handle_data_packet(priv, rxb, - &stats); + ipw_handle_data_packet(priv, rxb, + &stats); #endif break; } @@ -8229,9 +7837,9 @@ static void ipw_rx(struct ipw_priv *priv) if (network_packet && priv->assoc_network) { priv->assoc_network->stats.rssi = stats.rssi; - priv->exp_avg_rssi = - exponential_average(priv->exp_avg_rssi, - stats.rssi, DEPTH_RSSI); + average_add(&priv->average_rssi, + stats.rssi); + priv->last_rx_rssi = stats.rssi; } IPW_DEBUG_RX("Frame: len=%u\n", @@ -8374,10 +7982,10 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) IPW_DEBUG_INFO("Bind to static channel %d\n", channel); /* TODO: Validate that provided channel is in range */ } -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS ipw_qos_init(priv, qos_enable, qos_burst_enable, burst_duration_CCK, burst_duration_OFDM); -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ switch (mode) { case 1: @@ -8388,7 +7996,7 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) #ifdef CONFIG_IPW2200_MONITOR case 2: priv->ieee->iw_mode = IW_MODE_MONITOR; -#ifdef CONFIG_IPW2200_RADIOTAP +#ifdef CONFIG_IEEE80211_RADIOTAP priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; #else priv->net_dev->type = ARPHRD_IEEE80211; @@ -8643,7 +8251,7 @@ static int ipw_wx_set_mode(struct net_device *dev, priv->net_dev->type = ARPHRD_ETHER; if (wrqu->mode == IW_MODE_MONITOR) -#ifdef CONFIG_IPW2200_RADIOTAP +#ifdef CONFIG_IEEE80211_RADIOTAP priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; #else priv->net_dev->type = ARPHRD_IEEE80211; @@ -8771,8 +8379,7 @@ static int ipw_wx_get_range(struct net_device *dev, /* Event capability (kernel + driver) */ range->event_capa[0] = (IW_EVENT_CAPA_K_0 | IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | - IW_EVENT_CAPA_MASK(SIOCGIWAP) | - IW_EVENT_CAPA_MASK(SIOCGIWSCAN)); + IW_EVENT_CAPA_MASK(SIOCGIWAP)); range->event_capa[1] = IW_EVENT_CAPA_K_1; range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | @@ -9127,7 +8734,6 @@ static int ipw_wx_get_rate(struct net_device *dev, struct ipw_priv *priv = ieee80211_priv(dev); mutex_lock(&priv->mutex); wrqu->bitrate.value = priv->last_rate; - wrqu->bitrate.fixed = (priv->config & CFG_FIXED_RATE) ? 1 : 0; mutex_unlock(&priv->mutex); IPW_DEBUG_WX("GET Rate -> %d \n", wrqu->bitrate.value); return 0; @@ -9745,7 +9351,7 @@ static int ipw_wx_set_monitor(struct net_device *dev, IPW_DEBUG_WX("SET MONITOR: %d %d\n", enable, parms[1]); if (enable) { if (priv->ieee->iw_mode != IW_MODE_MONITOR) { -#ifdef CONFIG_IPW2200_RADIOTAP +#ifdef CONFIG_IEEE80211_RADIOTAP priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; #else priv->net_dev->type = ARPHRD_IEEE80211; @@ -9973,8 +9579,8 @@ static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev) } wstats->qual.qual = priv->quality; - wstats->qual.level = priv->exp_avg_rssi; - wstats->qual.noise = priv->exp_avg_noise; + wstats->qual.level = average_value(&priv->average_rssi); + wstats->qual.noise = average_value(&priv->average_noise); wstats->qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_UPDATED | IW_QUAL_DBM; @@ -10002,9 +9608,7 @@ static void init_sys_config(struct ipw_sys_config *sys_config) sys_config->disable_unicast_decryption = 1; sys_config->exclude_multicast_unencrypted = 0; sys_config->disable_multicast_decryption = 1; - if (antenna < CFG_SYS_ANTENNA_BOTH || antenna > CFG_SYS_ANTENNA_B) - antenna = CFG_SYS_ANTENNA_BOTH; - sys_config->antenna_diversity = antenna; + sys_config->antenna_diversity = CFG_SYS_ANTENNA_SLOW_DIV; sys_config->pass_crc_to_host = 0; /* TODO: See if 1 gives us FCS */ sys_config->dot11g_auto_detection = 0; sys_config->enable_cts_to_self = 0; @@ -10043,11 +9647,11 @@ we need to heavily modify the ieee80211_skb_to_txb. static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, int pri) { - struct ieee80211_hdr_3addrqos *hdr = (struct ieee80211_hdr_3addrqos *) + struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *) txb->fragments[0]->data; int i = 0; struct tfd_frame *tfd; -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS int tx_id = ipw_get_tx_queue_number(priv, pri); struct clx2_tx_queue *txq = &priv->txq[tx_id]; #else @@ -10058,9 +9662,9 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, u16 remaining_bytes; int fc; - hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); switch (priv->ieee->iw_mode) { case IW_MODE_ADHOC: + hdr_len = IEEE80211_3ADDR_LEN; unicast = !is_multicast_ether_addr(hdr->addr1); id = ipw_find_station(priv, hdr->addr1); if (id == IPW_INVALID_STATION) { @@ -10077,6 +9681,7 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, case IW_MODE_INFRA: default: unicast = !is_multicast_ether_addr(hdr->addr3); + hdr_len = IEEE80211_3ADDR_LEN; id = 0; break; } @@ -10154,10 +9759,9 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, /* No hardware encryption */ tfd->u.data.tx_flags |= DCT_FLAG_NO_WEP; -#ifdef CONFIG_IPW2200_QOS - if (fc & IEEE80211_STYPE_QOS_DATA) - ipw_qos_set_tx_queue_command(priv, pri, &(tfd->u.data)); -#endif /* CONFIG_IPW2200_QOS */ +#ifdef CONFIG_IPW_QOS + ipw_qos_set_tx_queue_command(priv, pri, &(tfd->u.data), unicast); +#endif /* CONFIG_IPW_QOS */ /* payload */ tfd->u.data.num_chunks = cpu_to_le32(min((u8) (NUM_TFD_CHUNKS - 2), @@ -10237,12 +9841,12 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb, static int ipw_net_is_queue_full(struct net_device *dev, int pri) { struct ipw_priv *priv = ieee80211_priv(dev); -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS int tx_id = ipw_get_tx_queue_number(priv, pri); struct clx2_tx_queue *txq = &priv->txq[tx_id]; #else struct clx2_tx_queue *txq = &priv->txq[0]; -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ if (ipw_queue_space(&txq->q) < txq->q.high_mark) return 1; @@ -10250,88 +9854,6 @@ static int ipw_net_is_queue_full(struct net_device *dev, int pri) return 0; } -#ifdef CONFIG_IPW2200_PROMISCUOUS -static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, - struct ieee80211_txb *txb) -{ - struct ieee80211_rx_stats dummystats; - struct ieee80211_hdr *hdr; - u8 n; - u16 filter = priv->prom_priv->filter; - int hdr_only = 0; - - if (filter & IPW_PROM_NO_TX) - return; - - memset(&dummystats, 0, sizeof(dummystats)); - - /* Filtering of fragment chains is done agains the first fragment */ - hdr = (void *)txb->fragments[0]->data; - if (ieee80211_is_management(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_MGMT) - return; - if (filter & IPW_PROM_MGMT_HEADER_ONLY) - hdr_only = 1; - } else if (ieee80211_is_control(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_CTL) - return; - if (filter & IPW_PROM_CTL_HEADER_ONLY) - hdr_only = 1; - } else if (ieee80211_is_data(hdr->frame_ctl)) { - if (filter & IPW_PROM_NO_DATA) - return; - if (filter & IPW_PROM_DATA_HEADER_ONLY) - hdr_only = 1; - } - - for(n=0; nnr_frags; ++n) { - struct sk_buff *src = txb->fragments[n]; - struct sk_buff *dst; - struct ieee80211_radiotap_header *rt_hdr; - int len; - - if (hdr_only) { - hdr = (void *)src->data; - len = ieee80211_get_hdrlen(hdr->frame_ctl); - } else - len = src->len; - - dst = alloc_skb( - len + IEEE80211_RADIOTAP_HDRLEN, GFP_ATOMIC); - if (!dst) continue; - - rt_hdr = (void *)skb_put(dst, sizeof(*rt_hdr)); - - rt_hdr->it_version = PKTHDR_RADIOTAP_VERSION; - rt_hdr->it_pad = 0; - rt_hdr->it_present = 0; /* after all, it's just an idea */ - rt_hdr->it_present |= (1 << IEEE80211_RADIOTAP_CHANNEL); - - *(u16*)skb_put(dst, sizeof(u16)) = cpu_to_le16( - ieee80211chan2mhz(priv->channel)); - if (priv->channel > 14) /* 802.11a */ - *(u16*)skb_put(dst, sizeof(u16)) = - cpu_to_le16(IEEE80211_CHAN_OFDM | - IEEE80211_CHAN_5GHZ); - else if (priv->ieee->mode == IEEE_B) /* 802.11b */ - *(u16*)skb_put(dst, sizeof(u16)) = - cpu_to_le16(IEEE80211_CHAN_CCK | - IEEE80211_CHAN_2GHZ); - else /* 802.11g */ - *(u16*)skb_put(dst, sizeof(u16)) = - cpu_to_le16(IEEE80211_CHAN_OFDM | - IEEE80211_CHAN_2GHZ); - - rt_hdr->it_len = dst->len; - - memcpy(skb_put(dst, len), src->data, len); - - if (!ieee80211_rx(priv->prom_priv->ieee, dst, &dummystats)) - dev_kfree_skb_any(dst); - } -} -#endif - static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, struct net_device *dev, int pri) { @@ -10349,11 +9871,6 @@ static int ipw_net_hard_start_xmit(struct ieee80211_txb *txb, goto fail_unlock; } -#ifdef CONFIG_IPW2200_PROMISCUOUS - if (rtap_iface && netif_running(priv->prom_net_dev)) - ipw_handle_promiscuous_tx(priv, txb); -#endif - ret = ipw_tx_skb(priv, txb, pri); if (ret == NETDEV_TX_OK) __ipw_led_activity_on(priv); @@ -10474,7 +9991,7 @@ static irqreturn_t ipw_isr(int irq, void *data, struct pt_regs *regs) if (!priv) return IRQ_NONE; - spin_lock(&priv->irq_lock); + spin_lock(&priv->lock); if (!(priv->status & STATUS_INT_ENABLED)) { /* Shared IRQ */ @@ -10496,7 +10013,7 @@ static irqreturn_t ipw_isr(int irq, void *data, struct pt_regs *regs) } /* tell the device to stop sending interrupts */ - __ipw_disable_interrupts(priv); + ipw_disable_interrupts(priv); /* ack current interrupts */ inta &= (IPW_INTA_MASK_ALL & inta_mask); @@ -10507,11 +10024,11 @@ static irqreturn_t ipw_isr(int irq, void *data, struct pt_regs *regs) tasklet_schedule(&priv->irq_tasklet); - spin_unlock(&priv->irq_lock); + spin_unlock(&priv->lock); return IRQ_HANDLED; none: - spin_unlock(&priv->irq_lock); + spin_unlock(&priv->lock); return IRQ_NONE; } @@ -10652,10 +10169,10 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv) INIT_WORK(&priv->merge_networks, (void (*)(void *))ipw_merge_adhoc_network, priv); -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS INIT_WORK(&priv->qos_activate, (void (*)(void *))ipw_bg_qos_activate, priv); -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) ipw_irq_tasklet, (unsigned long)priv); @@ -10801,21 +10318,12 @@ static int ipw_config(struct ipw_priv *priv) |= CFG_BT_COEXISTENCE_OOB; } -#ifdef CONFIG_IPW2200_PROMISCUOUS - if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { - priv->sys_config.accept_all_data_frames = 1; - priv->sys_config.accept_non_directed_frames = 1; - priv->sys_config.accept_all_mgmt_bcpr = 1; - priv->sys_config.accept_all_mgmt_frames = 1; - } -#endif - if (priv->ieee->iw_mode == IW_MODE_ADHOC) priv->sys_config.answer_broadcast_ssid_probe = 1; else priv->sys_config.answer_broadcast_ssid_probe = 0; - if (ipw_send_system_config(priv)) + if (ipw_send_system_config(priv, &priv->sys_config)) goto error; init_supported_rates(priv, &priv->rates); @@ -10827,10 +10335,10 @@ static int ipw_config(struct ipw_priv *priv) if (ipw_send_rts_threshold(priv, priv->rts_threshold)) goto error; } -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS IPW_DEBUG_QOS("QoS: call ipw_qos_activate\n"); ipw_qos_activate(priv, NULL); -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ if (ipw_set_random_seed(priv)) goto error; @@ -11131,7 +10639,6 @@ static int ipw_up(struct ipw_priv *priv) if (priv->cmdlog == NULL) { IPW_ERROR("Error allocating %d command log entries.\n", cmdlog); - return -ENOMEM; } else { memset(priv->cmdlog, 0, sizeof(*priv->cmdlog) * cmdlog); priv->cmdlog_len = cmdlog; @@ -11353,10 +10860,6 @@ static struct attribute *ipw_sysfs_entries[] = { &dev_attr_led.attr, &dev_attr_speed_scan.attr, &dev_attr_net_stats.attr, -#ifdef CONFIG_IPW2200_PROMISCUOUS - &dev_attr_rtap_iface.attr, - &dev_attr_rtap_filter.attr, -#endif NULL }; @@ -11365,109 +10868,6 @@ static struct attribute_group ipw_attribute_group = { .attrs = ipw_sysfs_entries, }; -#ifdef CONFIG_IPW2200_PROMISCUOUS -static int ipw_prom_open(struct net_device *dev) -{ - struct ipw_prom_priv *prom_priv = ieee80211_priv(dev); - struct ipw_priv *priv = prom_priv->priv; - - IPW_DEBUG_INFO("prom dev->open\n"); - netif_carrier_off(dev); - netif_stop_queue(dev); - - if (priv->ieee->iw_mode != IW_MODE_MONITOR) { - priv->sys_config.accept_all_data_frames = 1; - priv->sys_config.accept_non_directed_frames = 1; - priv->sys_config.accept_all_mgmt_bcpr = 1; - priv->sys_config.accept_all_mgmt_frames = 1; - - ipw_send_system_config(priv); - } - - return 0; -} - -static int ipw_prom_stop(struct net_device *dev) -{ - struct ipw_prom_priv *prom_priv = ieee80211_priv(dev); - struct ipw_priv *priv = prom_priv->priv; - - IPW_DEBUG_INFO("prom dev->stop\n"); - - if (priv->ieee->iw_mode != IW_MODE_MONITOR) { - priv->sys_config.accept_all_data_frames = 0; - priv->sys_config.accept_non_directed_frames = 0; - priv->sys_config.accept_all_mgmt_bcpr = 0; - priv->sys_config.accept_all_mgmt_frames = 0; - - ipw_send_system_config(priv); - } - - return 0; -} - -static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - IPW_DEBUG_INFO("prom dev->xmit\n"); - netif_stop_queue(dev); - return -EOPNOTSUPP; -} - -static struct net_device_stats *ipw_prom_get_stats(struct net_device *dev) -{ - struct ipw_prom_priv *prom_priv = ieee80211_priv(dev); - return &prom_priv->ieee->stats; -} - -static int ipw_prom_alloc(struct ipw_priv *priv) -{ - int rc = 0; - - if (priv->prom_net_dev) - return -EPERM; - - priv->prom_net_dev = alloc_ieee80211(sizeof(struct ipw_prom_priv)); - if (priv->prom_net_dev == NULL) - return -ENOMEM; - - priv->prom_priv = ieee80211_priv(priv->prom_net_dev); - priv->prom_priv->ieee = netdev_priv(priv->prom_net_dev); - priv->prom_priv->priv = priv; - - strcpy(priv->prom_net_dev->name, "rtap%d"); - - priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; - priv->prom_net_dev->open = ipw_prom_open; - priv->prom_net_dev->stop = ipw_prom_stop; - priv->prom_net_dev->get_stats = ipw_prom_get_stats; - priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; - - priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; - - rc = register_netdev(priv->prom_net_dev); - if (rc) { - free_ieee80211(priv->prom_net_dev); - priv->prom_net_dev = NULL; - return rc; - } - - return 0; -} - -static void ipw_prom_free(struct ipw_priv *priv) -{ - if (!priv->prom_net_dev) - return; - - unregister_netdev(priv->prom_net_dev); - free_ieee80211(priv->prom_net_dev); - - priv->prom_net_dev = NULL; -} - -#endif - - static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = 0; @@ -11491,7 +10891,6 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) #ifdef CONFIG_IPW2200_DEBUG ipw_debug_level = debug; #endif - spin_lock_init(&priv->irq_lock); spin_lock_init(&priv->lock); for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) INIT_LIST_HEAD(&priv->ibss_mac_hash[i]); @@ -11545,7 +10944,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ipw_sw_reset(priv, 1); - err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv); + err = request_irq(pdev->irq, ipw_isr, SA_SHIRQ, DRV_NAME, priv); if (err) { IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); goto out_destroy_workqueue; @@ -11560,12 +10959,11 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) priv->ieee->set_security = shim__set_security; priv->ieee->is_queue_full = ipw_net_is_queue_full; -#ifdef CONFIG_IPW2200_QOS - priv->ieee->is_qos_active = ipw_is_qos_active; +#ifdef CONFIG_IPW_QOS priv->ieee->handle_probe_response = ipw_handle_beacon; priv->ieee->handle_beacon = ipw_handle_probe_response; priv->ieee->handle_assoc_response = ipw_handle_assoc_response; -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ priv->ieee->perfect_rssi = -20; priv->ieee->worst_rssi = -85; @@ -11599,18 +10997,6 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto out_remove_sysfs; } -#ifdef CONFIG_IPW2200_PROMISCUOUS - if (rtap_iface) { - err = ipw_prom_alloc(priv); - if (err) { - IPW_ERROR("Failed to register promiscuous network " - "device (error %d).\n", err); - unregister_netdev(priv->net_dev); - goto out_remove_sysfs; - } - } -#endif - printk(KERN_INFO DRV_NAME ": Detected geography %s (%d 802.11bg " "channels, %d 802.11a channels)\n", priv->ieee->geo.name, priv->ieee->geo.bg_channels, @@ -11685,12 +11071,10 @@ static void ipw_pci_remove(struct pci_dev *pdev) } } - kfree(priv->error); - priv->error = NULL; - -#ifdef CONFIG_IPW2200_PROMISCUOUS - ipw_prom_free(priv); -#endif + if (priv->error) { + ipw_free_error_log(priv->error); + priv->error = NULL; + } free_irq(pdev->irq, priv); iounmap(priv->hw_base); @@ -11816,12 +11200,7 @@ MODULE_PARM_DESC(debug, "debug output mask"); module_param(channel, int, 0444); MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])"); -#ifdef CONFIG_IPW2200_PROMISCUOUS -module_param(rtap_iface, int, 0444); -MODULE_PARM_DESC(rtap_iface, "create the rtap interface (1 - create, default 0)"); -#endif - -#ifdef CONFIG_IPW2200_QOS +#ifdef CONFIG_IPW_QOS module_param(qos_enable, int, 0444); MODULE_PARM_DESC(qos_enable, "enable all QoS functionalitis"); @@ -11836,7 +11215,7 @@ MODULE_PARM_DESC(burst_duration_CCK, "set CCK burst value"); module_param(burst_duration_OFDM, int, 0444); MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value"); -#endif /* CONFIG_IPW2200_QOS */ +#endif /* CONFIG_IPW_QOS */ #ifdef CONFIG_IPW2200_MONITOR module_param(mode, int, 0444); @@ -11859,8 +11238,5 @@ MODULE_PARM_DESC(cmdlog, module_param(roaming, int, 0444); MODULE_PARM_DESC(roaming, "enable roaming support (default on)"); -module_param(antenna, int, 0444); -MODULE_PARM_DESC(antenna, "select antenna 1=Main, 3=Aux, default 0 [both], 2=slow_diversity (choose the one with lower background noise)"); - module_exit(ipw_exit); module_init(ipw_init); diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 8b1cd7c74..4b9804900 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -788,7 +789,7 @@ struct ipw_sys_config { u8 bt_coexist_collision_thr; u8 silence_threshold; u8 accept_all_mgmt_bcpr; - u8 accept_all_mgmt_frames; + u8 accept_all_mgtm_frames; u8 pass_noise_stats_to_host; u8 reserved3; } __attribute__ ((packed)); @@ -1121,70 +1122,17 @@ struct ipw_fw_error { u8 payload[0]; } __attribute__ ((packed)); -#ifdef CONFIG_IPW2200_PROMISCUOUS - -enum ipw_prom_filter { - IPW_PROM_CTL_HEADER_ONLY = (1 << 0), - IPW_PROM_MGMT_HEADER_ONLY = (1 << 1), - IPW_PROM_DATA_HEADER_ONLY = (1 << 2), - IPW_PROM_ALL_HEADER_ONLY = 0xf, /* bits 0..3 */ - IPW_PROM_NO_TX = (1 << 4), - IPW_PROM_NO_RX = (1 << 5), - IPW_PROM_NO_CTL = (1 << 6), - IPW_PROM_NO_MGMT = (1 << 7), - IPW_PROM_NO_DATA = (1 << 8), -}; - -struct ipw_priv; -struct ipw_prom_priv { - struct ipw_priv *priv; - struct ieee80211_device *ieee; - enum ipw_prom_filter filter; - int tx_packets; - int rx_packets; -}; -#endif - -#if defined(CONFIG_IPW2200_RADIOTAP) || defined(CONFIG_IPW2200_PROMISCUOUS) -/* Magic struct that slots into the radiotap header -- no reason - * to build this manually element by element, we can write it much - * more efficiently than we can parse it. ORDER MATTERS HERE - * - * When sent to us via the simulated Rx interface in sysfs, the entire - * structure is provided regardless of any bits unset. - */ -struct ipw_rt_hdr { - struct ieee80211_radiotap_header rt_hdr; - u64 rt_tsf; /* TSF */ - u8 rt_flags; /* radiotap packet flags */ - u8 rt_rate; /* rate in 500kb/s */ - u16 rt_channel; /* channel in mhz */ - u16 rt_chbitmask; /* channel bitfield */ - s8 rt_dbmsignal; /* signal in dbM, kluged to signed */ - s8 rt_dbmnoise; - u8 rt_antenna; /* antenna number */ - u8 payload[0]; /* payload... */ -} __attribute__ ((packed)); -#endif - struct ipw_priv { /* ieee device used by generic ieee processing code */ struct ieee80211_device *ieee; spinlock_t lock; - spinlock_t irq_lock; struct mutex mutex; /* basic pci-network driver stuff */ struct pci_dev *pci_dev; struct net_device *net_dev; -#ifdef CONFIG_IPW2200_PROMISCUOUS - /* Promiscuous mode */ - struct ipw_prom_priv *prom_priv; - struct net_device *prom_net_dev; -#endif - /* pci hardware address support */ void __iomem *hw_base; unsigned long hw_len; @@ -1205,9 +1153,11 @@ struct ipw_priv { u32 config; u32 capability; + u8 last_rx_rssi; + u8 last_noise; struct average average_missed_beacons; - s16 exp_avg_rssi; - s16 exp_avg_noise; + struct average average_rssi; + struct average average_noise; u32 port_type; int rx_bufs_min; /**< minimum number of bufs in Rx queue */ int rx_pend_max; /**< maximum pending buffers for one IRQ */ @@ -1358,29 +1308,6 @@ struct ipw_priv { /* debug macros */ -/* Debug and printf string expansion helpers for printing bitfields */ -#define BIT_FMT8 "%c%c%c%c-%c%c%c%c" -#define BIT_FMT16 BIT_FMT8 ":" BIT_FMT8 -#define BIT_FMT32 BIT_FMT16 " " BIT_FMT16 - -#define BITC(x,y) (((x>>y)&1)?'1':'0') -#define BIT_ARG8(x) \ -BITC(x,7),BITC(x,6),BITC(x,5),BITC(x,4),\ -BITC(x,3),BITC(x,2),BITC(x,1),BITC(x,0) - -#define BIT_ARG16(x) \ -BITC(x,15),BITC(x,14),BITC(x,13),BITC(x,12),\ -BITC(x,11),BITC(x,10),BITC(x,9),BITC(x,8),\ -BIT_ARG8(x) - -#define BIT_ARG32(x) \ -BITC(x,31),BITC(x,30),BITC(x,29),BITC(x,28),\ -BITC(x,27),BITC(x,26),BITC(x,25),BITC(x,24),\ -BITC(x,23),BITC(x,22),BITC(x,21),BITC(x,20),\ -BITC(x,19),BITC(x,18),BITC(x,17),BITC(x,16),\ -BIT_ARG16(x) - - #ifdef CONFIG_IPW2200_DEBUG #define IPW_DEBUG(level, fmt, args...) \ do { if (ipw_debug_level & (level)) \ diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 36b5e0043..9343d9705 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c @@ -37,6 +37,7 @@ /* To have statistics (just packets sent) define this */ #undef NETWAVE_STATS +#include #include #include #include diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 317ace7f9..a5fcfcde6 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c @@ -76,6 +76,7 @@ #define DRIVER_NAME "orinoco" +#include #include #include #include @@ -200,12 +201,41 @@ static struct { /* Data types */ /********************************************************************/ -/* Beginning of the Tx descriptor, used in TxExc handling */ -struct hermes_txexc_data { - struct hermes_tx_descriptor desc; +/* Used in Event handling. + * We avoid nested structures as they break on ARM -- Moustafa */ +struct hermes_tx_descriptor_802_11 { + /* hermes_tx_descriptor */ + __le16 status; + __le16 reserved1; + __le16 reserved2; + __le32 sw_support; + u8 retry_count; + u8 tx_rate; + __le16 tx_control; + + /* ieee80211_hdr */ __le16 frame_ctl; __le16 duration_id; u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + __le16 seq_ctl; + u8 addr4[ETH_ALEN]; + + __le16 data_len; + + /* ethhdr */ + u8 h_dest[ETH_ALEN]; /* destination eth addr */ + u8 h_source[ETH_ALEN]; /* source ether addr */ + __be16 h_proto; /* packet type ID field */ + + /* p8022_hdr */ + u8 dsap; + u8 ssap; + u8 ctrl; + u8 oui[3]; + + __be16 ethertype; } __attribute__ ((packed)); /* Rx frame header except compatibility 802.3 header */ @@ -420,39 +450,53 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) hermes_t *hw = &priv->hw; int err = 0; u16 txfid = priv->txfid; + char *p; struct ethhdr *eh; - int data_off; + int len, data_len, data_off; struct hermes_tx_descriptor desc; unsigned long flags; + TRACE_ENTER(dev->name); + if (! netif_running(dev)) { printk(KERN_ERR "%s: Tx on stopped device!\n", dev->name); - return NETDEV_TX_BUSY; + TRACE_EXIT(dev->name); + return 1; } if (netif_queue_stopped(dev)) { printk(KERN_DEBUG "%s: Tx while transmitter busy!\n", dev->name); - return NETDEV_TX_BUSY; + TRACE_EXIT(dev->name); + return 1; } if (orinoco_lock(priv, &flags) != 0) { printk(KERN_ERR "%s: orinoco_xmit() called while hw_unavailable\n", dev->name); - return NETDEV_TX_BUSY; + TRACE_EXIT(dev->name); + return 1; } if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { /* Oops, the firmware hasn't established a connection, silently drop the packet (this seems to be the safest approach). */ - goto drop; + stats->tx_errors++; + orinoco_unlock(priv, &flags); + dev_kfree_skb(skb); + TRACE_EXIT(dev->name); + return 0; } - /* Check packet length */ - if (skb->len < ETH_HLEN) - goto drop; + /* Length of the packet body */ + /* FIXME: what if the skb is smaller than this? */ + len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); + skb = skb_padto(skb, len); + if (skb == NULL) + goto fail; + len -= ETH_HLEN; eh = (struct ethhdr *)skb->data; @@ -463,7 +507,8 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) if (net_ratelimit()) printk(KERN_ERR "%s: Error %d writing Tx descriptor " "to BAP\n", dev->name, err); - goto busy; + stats->tx_errors++; + goto fail; } /* Clear the 802.11 header and data length fields - some @@ -474,38 +519,50 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) /* Encapsulate Ethernet-II frames */ if (ntohs(eh->h_proto) > ETH_DATA_LEN) { /* Ethernet-II frame */ - struct header_struct { - struct ethhdr eth; /* 802.3 header */ - u8 encap[6]; /* 802.2 header */ - } __attribute__ ((packed)) hdr; - - /* Strip destination and source from the data */ - skb_pull(skb, 2 * ETH_ALEN); - data_off = HERMES_802_2_OFFSET + sizeof(encaps_hdr); - - /* And move them to a separate header */ - memcpy(&hdr.eth, eh, 2 * ETH_ALEN); - hdr.eth.h_proto = htons(sizeof(encaps_hdr) + skb->len); - memcpy(hdr.encap, encaps_hdr, sizeof(encaps_hdr)); - - err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr), - txfid, HERMES_802_3_OFFSET); + struct header_struct hdr; + data_len = len; + data_off = HERMES_802_3_OFFSET + sizeof(hdr); + p = skb->data + ETH_HLEN; + + /* 802.3 header */ + memcpy(hdr.dest, eh->h_dest, ETH_ALEN); + memcpy(hdr.src, eh->h_source, ETH_ALEN); + hdr.len = htons(data_len + ENCAPS_OVERHEAD); + + /* 802.2 header */ + memcpy(&hdr.dsap, &encaps_hdr, sizeof(encaps_hdr)); + + hdr.ethertype = eh->h_proto; + err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr), + txfid, HERMES_802_3_OFFSET); if (err) { if (net_ratelimit()) printk(KERN_ERR "%s: Error %d writing packet " "header to BAP\n", dev->name, err); - goto busy; + stats->tx_errors++; + goto fail; } + /* Actual xfer length - allow for padding */ + len = ALIGN(data_len, 2); + if (len < ETH_ZLEN - ETH_HLEN) + len = ETH_ZLEN - ETH_HLEN; } else { /* IEEE 802.3 frame */ + data_len = len + ETH_HLEN; data_off = HERMES_802_3_OFFSET; + p = skb->data; + /* Actual xfer length - round up for odd length packets */ + len = ALIGN(data_len, 2); + if (len < ETH_ZLEN) + len = ETH_ZLEN; } - err = hermes_bap_pwrite(hw, USER_BAP, skb->data, skb->len, + err = hermes_bap_pwrite_pad(hw, USER_BAP, p, data_len, len, txfid, data_off); if (err) { printk(KERN_ERR "%s: Error %d writing packet to BAP\n", dev->name, err); - goto busy; + stats->tx_errors++; + goto fail; } /* Finally, we actually initiate the send */ @@ -518,27 +575,25 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) if (net_ratelimit()) printk(KERN_ERR "%s: Error %d transmitting packet\n", dev->name, err); - goto busy; + stats->tx_errors++; + goto fail; } dev->trans_start = jiffies; - stats->tx_bytes += data_off + skb->len; - goto ok; - - drop: - stats->tx_errors++; - stats->tx_dropped++; + stats->tx_bytes += data_off + data_len; - ok: orinoco_unlock(priv, &flags); + dev_kfree_skb(skb); - return NETDEV_TX_OK; - busy: - if (err == -EIO) - schedule_work(&priv->reset_work); + TRACE_EXIT(dev->name); + + return 0; + fail: + TRACE_EXIT(dev->name); + orinoco_unlock(priv, &flags); - return NETDEV_TX_BUSY; + return err; } static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) @@ -574,7 +629,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) struct net_device_stats *stats = &priv->stats; u16 fid = hermes_read_regn(hw, TXCOMPLFID); u16 status; - struct hermes_txexc_data hdr; + struct hermes_tx_descriptor_802_11 hdr; int err = 0; if (fid == DUMMY_FID) @@ -582,7 +637,8 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) /* Read part of the frame header - we need status and addr1 */ err = hermes_bap_pread(hw, IRQ_BAP, &hdr, - sizeof(struct hermes_txexc_data), + offsetof(struct hermes_tx_descriptor_802_11, + addr2), fid, 0); hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); @@ -602,7 +658,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) * exceeded, because that's the only status that really mean * that this particular node went away. * Other errors means that *we* screwed up. - Jean II */ - status = le16_to_cpu(hdr.desc.status); + status = le16_to_cpu(hdr.status); if (status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) { union iwreq_data wrqu; @@ -1342,12 +1398,16 @@ int __orinoco_down(struct net_device *dev) return 0; } -static int orinoco_allocate_fid(struct net_device *dev) +int orinoco_reinit_firmware(struct net_device *dev) { struct orinoco_private *priv = netdev_priv(dev); struct hermes *hw = &priv->hw; int err; + err = hermes_init(hw); + if (err) + return err; + err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { /* Try workaround for old Symbol firmware bug */ @@ -1366,19 +1426,6 @@ static int orinoco_allocate_fid(struct net_device *dev) return err; } -int orinoco_reinit_firmware(struct net_device *dev) -{ - struct orinoco_private *priv = netdev_priv(dev); - struct hermes *hw = &priv->hw; - int err; - - err = hermes_init(hw); - if (!err) - err = orinoco_allocate_fid(dev); - - return err; -} - static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) { hermes_t *hw = &priv->hw; @@ -2227,12 +2274,14 @@ static int orinoco_init(struct net_device *dev) u16 reclen; int len; + TRACE_ENTER(dev->name); + /* No need to lock, the hw_unavailable flag is already set in * alloc_orinocodev() */ priv->nicbuf_size = IEEE80211_FRAME_LEN + ETH_HLEN; /* Initialize the firmware */ - err = hermes_init(hw); + err = orinoco_reinit_firmware(dev); if (err != 0) { printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n", dev->name, err); @@ -2290,13 +2339,6 @@ static int orinoco_init(struct net_device *dev) printk(KERN_DEBUG "%s: Station name \"%s\"\n", dev->name, priv->nick); - err = orinoco_allocate_fid(dev); - if (err) { - printk(KERN_ERR "%s: failed to allocate NIC buffer!\n", - dev->name); - goto out; - } - /* Get allowed channels */ err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CHANNELLIST, &priv->channel_mask); @@ -2387,6 +2429,7 @@ static int orinoco_init(struct net_device *dev) printk(KERN_DEBUG "%s: ready\n", dev->name); out: + TRACE_EXIT(dev->name); return err; } @@ -2754,6 +2797,8 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, int numrates; int i, k; + TRACE_ENTER(dev->name); + rrq->length = sizeof(struct iw_range); memset(range, 0, sizeof(struct iw_range)); @@ -2843,6 +2888,8 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); IW_EVENT_CAPA_SET(range->event_capa, IWEVTXDROP); + TRACE_EXIT(dev->name); + return 0; } @@ -2875,7 +2922,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev, if (orinoco_lock(priv, &flags) != 0) return -EBUSY; - if (erq->length > 0) { + if (erq->pointer) { if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) index = priv->tx_key; @@ -2918,7 +2965,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev, if (erq->flags & IW_ENCODE_RESTRICTED) restricted = 1; - if (erq->pointer && erq->length > 0) { + if (erq->pointer) { priv->keys[index].len = cpu_to_le16(xlen); memset(priv->keys[index].data, 0, sizeof(priv->keys[index].data)); @@ -3024,6 +3071,8 @@ static int orinoco_ioctl_getessid(struct net_device *dev, int err = 0; unsigned long flags; + TRACE_ENTER(dev->name); + if (netif_running(dev)) { err = orinoco_hw_get_essid(priv, &active, essidbuf); if (err) @@ -3038,6 +3087,8 @@ static int orinoco_ioctl_getessid(struct net_device *dev, erq->flags = 1; erq->length = strlen(essidbuf) + 1; + TRACE_EXIT(dev->name); + return 0; } @@ -4297,6 +4348,69 @@ static struct ethtool_ops orinoco_ethtool_ops = { .get_link = ethtool_op_get_link, }; +/********************************************************************/ +/* Debugging */ +/********************************************************************/ + +#if 0 +static void show_rx_frame(struct orinoco_rxframe_hdr *frame) +{ + printk(KERN_DEBUG "RX descriptor:\n"); + printk(KERN_DEBUG " status = 0x%04x\n", frame->desc.status); + printk(KERN_DEBUG " time = 0x%08x\n", frame->desc.time); + printk(KERN_DEBUG " silence = 0x%02x\n", frame->desc.silence); + printk(KERN_DEBUG " signal = 0x%02x\n", frame->desc.signal); + printk(KERN_DEBUG " rate = 0x%02x\n", frame->desc.rate); + printk(KERN_DEBUG " rxflow = 0x%02x\n", frame->desc.rxflow); + printk(KERN_DEBUG " reserved = 0x%08x\n", frame->desc.reserved); + + printk(KERN_DEBUG "IEEE 802.11 header:\n"); + printk(KERN_DEBUG " frame_ctl = 0x%04x\n", + frame->p80211.frame_ctl); + printk(KERN_DEBUG " duration_id = 0x%04x\n", + frame->p80211.duration_id); + printk(KERN_DEBUG " addr1 = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p80211.addr1[0], frame->p80211.addr1[1], + frame->p80211.addr1[2], frame->p80211.addr1[3], + frame->p80211.addr1[4], frame->p80211.addr1[5]); + printk(KERN_DEBUG " addr2 = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p80211.addr2[0], frame->p80211.addr2[1], + frame->p80211.addr2[2], frame->p80211.addr2[3], + frame->p80211.addr2[4], frame->p80211.addr2[5]); + printk(KERN_DEBUG " addr3 = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p80211.addr3[0], frame->p80211.addr3[1], + frame->p80211.addr3[2], frame->p80211.addr3[3], + frame->p80211.addr3[4], frame->p80211.addr3[5]); + printk(KERN_DEBUG " seq_ctl = 0x%04x\n", + frame->p80211.seq_ctl); + printk(KERN_DEBUG " addr4 = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p80211.addr4[0], frame->p80211.addr4[1], + frame->p80211.addr4[2], frame->p80211.addr4[3], + frame->p80211.addr4[4], frame->p80211.addr4[5]); + printk(KERN_DEBUG " data_len = 0x%04x\n", + frame->p80211.data_len); + + printk(KERN_DEBUG "IEEE 802.3 header:\n"); + printk(KERN_DEBUG " dest = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p8023.h_dest[0], frame->p8023.h_dest[1], + frame->p8023.h_dest[2], frame->p8023.h_dest[3], + frame->p8023.h_dest[4], frame->p8023.h_dest[5]); + printk(KERN_DEBUG " src = %02x:%02x:%02x:%02x:%02x:%02x\n", + frame->p8023.h_source[0], frame->p8023.h_source[1], + frame->p8023.h_source[2], frame->p8023.h_source[3], + frame->p8023.h_source[4], frame->p8023.h_source[5]); + printk(KERN_DEBUG " len = 0x%04x\n", frame->p8023.h_proto); + + printk(KERN_DEBUG "IEEE 802.2 LLC/SNAP header:\n"); + printk(KERN_DEBUG " DSAP = 0x%02x\n", frame->p8022.dsap); + printk(KERN_DEBUG " SSAP = 0x%02x\n", frame->p8022.ssap); + printk(KERN_DEBUG " ctrl = 0x%02x\n", frame->p8022.ctrl); + printk(KERN_DEBUG " OUI = %02x:%02x:%02x\n", + frame->p8022.oui[0], frame->p8022.oui[1], frame->p8022.oui[2]); + printk(KERN_DEBUG " ethertype = 0x%04x\n", frame->ethertype); +} +#endif /* 0 */ + /********************************************************************/ /* Module initialization */ /********************************************************************/ diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h index 16db3e14b..f5d856db9 100644 --- a/drivers/net/wireless/orinoco.h +++ b/drivers/net/wireless/orinoco.h @@ -7,7 +7,7 @@ #ifndef _ORINOCO_H #define _ORINOCO_H -#define DRIVER_VERSION "0.15" +#define DRIVER_VERSION "0.15rc3" #include #include @@ -30,6 +30,20 @@ struct orinoco_key { char data[ORINOCO_MAX_KEY_SIZE]; } __attribute__ ((packed)); +struct header_struct { + /* 802.3 */ + u8 dest[ETH_ALEN]; + u8 src[ETH_ALEN]; + __be16 len; + /* 802.2 */ + u8 dsap; + u8 ssap; + u8 ctrl; + /* SNAP */ + u8 oui[3]; + unsigned short ethertype; +} __attribute__ ((packed)); + typedef enum { FIRMWARE_TYPE_AGERE, FIRMWARE_TYPE_INTERSIL, @@ -118,6 +132,9 @@ extern int orinoco_debug; #define DEBUG(n, args...) do { } while (0) #endif /* ORINOCO_DEBUG */ +#define TRACE_ENTER(devname) DEBUG(2, "%s: -> %s()\n", devname, __FUNCTION__); +#define TRACE_EXIT(devname) DEBUG(2, "%s: <- %s()\n", devname, __FUNCTION__); + /********************************************************************/ /* Exported prototypes */ /********************************************************************/ diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index bc14689cb..434f7d7ad 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c @@ -13,6 +13,7 @@ #define DRIVER_NAME "orinoco_cs" #define PFX DRIVER_NAME ": " +#include #include #include #include @@ -146,11 +147,14 @@ static void orinoco_cs_detach(struct pcmcia_device *link) { struct net_device *dev = link->priv; - if (link->dev_node) - unregister_netdev(dev); - orinoco_cs_release(link); + DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); + if (link->dev_node) { + DEBUG(0, PFX "About to unregister net device %p\n", + dev); + unregister_netdev(dev); + } free_orinocodev(dev); } /* orinoco_cs_detach */ @@ -174,10 +178,13 @@ orinoco_cs_config(struct pcmcia_device *link) int last_fn, last_ret; u_char buf[64]; config_info_t conf; + cisinfo_t info; tuple_t tuple; cisparse_t parse; void __iomem *mem; + CS_CHECK(ValidateCIS, pcmcia_validate_cis(link, &info)); + /* * This reads the card's CONFIG tuple to find its * configuration registers. @@ -227,6 +234,12 @@ orinoco_cs_config(struct pcmcia_device *link) goto next_entry; link->conf.ConfigIndex = cfg->index; + /* Does this card need audio output? */ + if (cfg->flags & CISTPL_CFTABLE_AUDIO) { + link->conf.Attributes |= CONF_ENABLE_SPKR; + link->conf.Status = CCSR_AUDIO_ENA; + } + /* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { @@ -342,10 +355,19 @@ orinoco_cs_config(struct pcmcia_device *link) net_device has been registered */ /* Finally, report what we've done */ - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " - "0x%04x-0x%04x\n", dev->name, dev->class_dev.dev->bus_id, - link->irq.AssignedIRQ, link->io.BasePort1, - link->io.BasePort1 + link->io.NumPorts1 - 1); + printk(KERN_DEBUG "%s: index 0x%02x: ", + dev->name, link->conf.ConfigIndex); + if (link->conf.Vpp) + printk(", Vpp %d.%d", link->conf.Vpp / 10, + link->conf.Vpp % 10); + printk(", irq %d", link->irq.AssignedIRQ); + if (link->io.NumPorts1) + printk(", io 0x%04x-0x%04x", link->io.BasePort1, + link->io.BasePort1 + link->io.NumPorts1 - 1); + if (link->io.NumPorts2) + printk(" & 0x%04x-0x%04x", link->io.BasePort2, + link->io.BasePort2 + link->io.NumPorts2 - 1); + printk("\n"); return 0; @@ -414,6 +436,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link) struct orinoco_private *priv = netdev_priv(dev); struct orinoco_pccard *card = priv->card; int err = 0; + unsigned long flags; if (! test_bit(0, &card->hard_reset_in_progress)) { err = orinoco_reinit_firmware(dev); @@ -423,7 +446,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link) return -EIO; } - spin_lock(&priv->lock); + spin_lock_irqsave(&priv->lock, flags); netif_device_attach(dev); priv->hw_unavailable--; @@ -435,10 +458,10 @@ static int orinoco_cs_resume(struct pcmcia_device *link) dev->name, err); } - spin_unlock(&priv->lock); + spin_unlock_irqrestore(&priv->lock, flags); } - return err; + return 0; } diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index bf05b9077..d1a670b35 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c @@ -1,8 +1,9 @@ /* orinoco_nortel.c - * + * * Driver for Prism II devices which would usually be driven by orinoco_cs, * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. + * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. * * Copyright (C) 2002 Tobias Hoffmann * (C) 2003 Christoph Jungegger @@ -40,6 +41,7 @@ #define DRIVER_NAME "orinoco_nortel" #define PFX DRIVER_NAME ": " +#include #include #include #include @@ -48,62 +50,67 @@ #include #include "orinoco.h" -#include "orinoco_pci.h" #define COR_OFFSET (0xe0) /* COR attribute offset of Prism2 PC card */ #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ +/* Nortel specific data */ +struct nortel_pci_card { + unsigned long iobase1; + unsigned long iobase2; +}; + /* - * Do a soft reset of the card using the Configuration Option Register + * Do a soft reset of the PCI card using the Configuration Option Register * We need this to get going... * This is the part of the code that is strongly inspired from wlan-ng * * Note bis : Don't try to access HERMES_CMD during the reset phase. * It just won't work ! */ -static int orinoco_nortel_cor_reset(struct orinoco_private *priv) +static int nortel_pci_cor_reset(struct orinoco_private *priv) { - struct orinoco_pci_card *card = priv->card; + struct nortel_pci_card *card = priv->card; - /* Assert the reset until the card notices */ - iowrite16(8, card->bridge_io + 2); - ioread16(card->attr_io + COR_OFFSET); - iowrite16(0x80, card->attr_io + COR_OFFSET); + /* Assert the reset until the card notice */ + outw_p(8, card->iobase1 + 2); + inw(card->iobase2 + COR_OFFSET); + outw_p(0x80, card->iobase2 + COR_OFFSET); mdelay(1); /* Give time for the card to recover from this hard effort */ - iowrite16(0, card->attr_io + COR_OFFSET); - iowrite16(0, card->attr_io + COR_OFFSET); + outw_p(0, card->iobase2 + COR_OFFSET); + outw_p(0, card->iobase2 + COR_OFFSET); mdelay(1); - /* Set COR as usual */ - iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); - iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); + /* set COR as usual */ + outw_p(COR_VALUE, card->iobase2 + COR_OFFSET); + outw_p(COR_VALUE, card->iobase2 + COR_OFFSET); mdelay(1); - iowrite16(0x228, card->bridge_io + 2); + outw_p(0x228, card->iobase1 + 2); return 0; } -static int orinoco_nortel_hw_init(struct orinoco_pci_card *card) +static int nortel_pci_hw_init(struct nortel_pci_card *card) { int i; u32 reg; - /* Setup bridge */ - if (ioread16(card->bridge_io) & 1) { + /* setup bridge */ + if (inw(card->iobase1) & 1) { printk(KERN_ERR PFX "brg1 answer1 wrong\n"); return -EBUSY; } - iowrite16(0x118, card->bridge_io + 2); - iowrite16(0x108, card->bridge_io + 2); + outw_p(0x118, card->iobase1 + 2); + outw_p(0x108, card->iobase1 + 2); mdelay(30); - iowrite16(0x8, card->bridge_io + 2); + outw_p(0x8, card->iobase1 + 2); for (i = 0; i < 30; i++) { mdelay(30); - if (ioread16(card->bridge_io) & 0x10) { + if (inw(card->iobase1) & 0x10) { break; } } @@ -111,42 +118,42 @@ static int orinoco_nortel_hw_init(struct orinoco_pci_card *card) printk(KERN_ERR PFX "brg1 timed out\n"); return -EBUSY; } - if (ioread16(card->attr_io + COR_OFFSET) & 1) { + if (inw(card->iobase2 + 0xe0) & 1) { printk(KERN_ERR PFX "brg2 answer1 wrong\n"); return -EBUSY; } - if (ioread16(card->attr_io + COR_OFFSET + 2) & 1) { + if (inw(card->iobase2 + 0xe2) & 1) { printk(KERN_ERR PFX "brg2 answer2 wrong\n"); return -EBUSY; } - if (ioread16(card->attr_io + COR_OFFSET + 4) & 1) { + if (inw(card->iobase2 + 0xe4) & 1) { printk(KERN_ERR PFX "brg2 answer3 wrong\n"); return -EBUSY; } - /* Set the PCMCIA COR register */ - iowrite16(COR_VALUE, card->attr_io + COR_OFFSET); + /* set the PCMCIA COR-Register */ + outw_p(COR_VALUE, card->iobase2 + COR_OFFSET); mdelay(1); - reg = ioread16(card->attr_io + COR_OFFSET); + reg = inw(card->iobase2 + COR_OFFSET); if (reg != COR_VALUE) { printk(KERN_ERR PFX "Error setting COR value (reg=%x)\n", reg); return -EBUSY; } - /* Set LEDs */ - iowrite16(1, card->bridge_io + 10); + /* set leds */ + outw_p(1, card->iobase1 + 10); return 0; } -static int orinoco_nortel_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int nortel_pci_init_one(struct pci_dev *pdev, + const struct pci_device_id *ent) { int err; struct orinoco_private *priv; - struct orinoco_pci_card *card; + struct nortel_pci_card *card; struct net_device *dev; - void __iomem *hermes_io, *bridge_io, *attr_io; + void __iomem *iomem; err = pci_enable_device(pdev); if (err) { @@ -155,34 +162,19 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, } err = pci_request_regions(pdev, DRIVER_NAME); - if (err) { + if (err != 0) { printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); goto fail_resources; } - bridge_io = pci_iomap(pdev, 0, 0); - if (!bridge_io) { - printk(KERN_ERR PFX "Cannot map bridge registers\n"); - err = -EIO; - goto fail_map_bridge; - } - - attr_io = pci_iomap(pdev, 1, 0); - if (!attr_io) { - printk(KERN_ERR PFX "Cannot map PCMCIA attributes\n"); - err = -EIO; - goto fail_map_attr; - } - - hermes_io = pci_iomap(pdev, 2, 0); - if (!hermes_io) { - printk(KERN_ERR PFX "Cannot map chipset registers\n"); - err = -EIO; - goto fail_map_hermes; + iomem = pci_iomap(pdev, 2, 0); + if (!iomem) { + err = -ENOMEM; + goto fail_map_io; } /* Allocate network device */ - dev = alloc_orinocodev(sizeof(*card), orinoco_nortel_cor_reset); + dev = alloc_orinocodev(sizeof(*card), nortel_pci_cor_reset); if (!dev) { printk(KERN_ERR PFX "Cannot allocate network device\n"); err = -ENOMEM; @@ -191,33 +183,39 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, priv = netdev_priv(dev); card = priv->card; - card->bridge_io = bridge_io; - card->attr_io = attr_io; + card->iobase1 = pci_resource_start(pdev, 0); + card->iobase2 = pci_resource_start(pdev, 1); + dev->base_addr = pci_resource_start(pdev, 2); SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); + hermes_struct_init(&priv->hw, iomem, HERMES_16BIT_REGSPACING); - err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, + printk(KERN_DEBUG PFX "Detected Nortel PCI device at %s irq:%d, " + "io addr:0x%lx\n", pci_name(pdev), pdev->irq, dev->base_addr); + + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; goto fail_irq; } + dev->irq = pdev->irq; - err = orinoco_nortel_hw_init(card); + err = nortel_pci_hw_init(card); if (err) { printk(KERN_ERR PFX "Hardware initialization failed\n"); goto fail; } - err = orinoco_nortel_cor_reset(priv); + err = nortel_pci_cor_reset(priv); if (err) { printk(KERN_ERR PFX "Initial reset failed\n"); goto fail; } + err = register_netdev(dev); if (err) { printk(KERN_ERR PFX "Cannot register network device\n"); @@ -225,8 +223,6 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, } pci_set_drvdata(pdev, dev); - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, - pci_name(pdev)); return 0; @@ -238,15 +234,9 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, free_orinocodev(dev); fail_alloc: - pci_iounmap(pdev, hermes_io); + pci_iounmap(pdev, iomem); - fail_map_hermes: - pci_iounmap(pdev, attr_io); - - fail_map_attr: - pci_iounmap(pdev, bridge_io); - - fail_map_bridge: + fail_map_io: pci_release_regions(pdev); fail_resources: @@ -255,27 +245,26 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, return err; } -static void __devexit orinoco_nortel_remove_one(struct pci_dev *pdev) +static void __devexit nortel_pci_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); - struct orinoco_pci_card *card = priv->card; + struct nortel_pci_card *card = priv->card; - /* Clear LEDs */ - iowrite16(0, card->bridge_io + 10); + /* clear leds */ + outw_p(0, card->iobase1 + 10); unregister_netdev(dev); - free_irq(pdev->irq, dev); + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); free_orinocodev(dev); pci_iounmap(pdev, priv->hw.iobase); - pci_iounmap(pdev, card->attr_io); - pci_iounmap(pdev, card->bridge_io); pci_release_regions(pdev); pci_disable_device(pdev); } -static struct pci_device_id orinoco_nortel_id_table[] = { + +static struct pci_device_id nortel_pci_id_table[] = { /* Nortel emobility PCI */ {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, /* Symbol LA-4123 PCI */ @@ -283,15 +272,13 @@ static struct pci_device_id orinoco_nortel_id_table[] = { {0,}, }; -MODULE_DEVICE_TABLE(pci, orinoco_nortel_id_table); +MODULE_DEVICE_TABLE(pci, nortel_pci_id_table); -static struct pci_driver orinoco_nortel_driver = { - .name = DRIVER_NAME, - .id_table = orinoco_nortel_id_table, - .probe = orinoco_nortel_init_one, - .remove = __devexit_p(orinoco_nortel_remove_one), - .suspend = orinoco_pci_suspend, - .resume = orinoco_pci_resume, +static struct pci_driver nortel_pci_driver = { + .name = DRIVER_NAME, + .id_table = nortel_pci_id_table, + .probe = nortel_pci_init_one, + .remove = __devexit_p(nortel_pci_remove_one), }; static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION @@ -301,19 +288,20 @@ MODULE_DESCRIPTION ("Driver for wireless LAN cards using the Nortel PCI bridge"); MODULE_LICENSE("Dual MPL/GPL"); -static int __init orinoco_nortel_init(void) +static int __init nortel_pci_init(void) { printk(KERN_DEBUG "%s\n", version); - return pci_module_init(&orinoco_nortel_driver); + return pci_module_init(&nortel_pci_driver); } -static void __exit orinoco_nortel_exit(void) +static void __exit nortel_pci_exit(void) { - pci_unregister_driver(&orinoco_nortel_driver); + pci_unregister_driver(&nortel_pci_driver); + ssleep(1); } -module_init(orinoco_nortel_init); -module_exit(orinoco_nortel_exit); +module_init(nortel_pci_init); +module_exit(nortel_pci_exit); /* * Local variables: diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c index 1759c543f..5362c214f 100644 --- a/drivers/net/wireless/orinoco_pci.c +++ b/drivers/net/wireless/orinoco_pci.c @@ -1,11 +1,11 @@ /* orinoco_pci.c * - * Driver for Prism 2.5/3 devices that have a direct PCI interface - * (i.e. these are not PCMCIA cards in a PCMCIA-to-PCI bridge). - * The card contains only one PCI region, which contains all the usual - * hermes registers, as well as the COR register. + * Driver for Prism II devices that have a direct PCI interface + * (i.e., not in a Pcmcia or PLX bridge) + * + * Specifically here we're talking about the Linksys WMP11 * - * Current maintainers are: + * Current maintainers (as of 29 September 2003) are: * Pavel Roskin * and David Gibson * @@ -41,9 +41,58 @@ * under either the MPL or the GPL. */ +/* + * Theory of operation... + * ------------------- + * Maybe you had a look in orinoco_plx. Well, this is totally different... + * + * The card contains only one PCI region, which contains all the usual + * hermes registers. + * + * The driver will memory map this region in normal memory. Because + * the hermes registers are mapped in normal memory and not in ISA I/O + * post space, we can't use the usual inw/outw macros and we need to + * use readw/writew. + * This slight difference force us to compile our own version of + * hermes.c with the register access macro changed. That's a bit + * hackish but works fine. + * + * Note that the PCI region is pretty big (4K). That's much more than + * the usual set of hermes register (0x0 -> 0x3E). I've got a strong + * suspicion that the whole memory space of the adapter is in fact in + * this region. Accessing directly the adapter memory instead of going + * through the usual register would speed up significantely the + * operations... + * + * Finally, the card looks like this : +----------------------- + Bus 0, device 14, function 0: + Network controller: PCI device 1260:3873 (Harris Semiconductor) (rev 1). + IRQ 11. + Master Capable. Latency=248. + Prefetchable 32 bit memory at 0xffbcc000 [0xffbccfff]. +----------------------- +00:0e.0 Network controller: Harris Semiconductor: Unknown device 3873 (rev 01) + Subsystem: Unknown device 1737:3874 + Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- + Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- #include #include #include @@ -51,14 +100,12 @@ #include #include "orinoco.h" -#include "orinoco_pci.h" -/* Offset of the COR register of the PCI card */ +/* All the magic there is from wlan-ng */ +/* Magic offset of the reset register of the PCI card */ #define HERMES_PCI_COR (0x26) - -/* Bitmask to reset the card */ +/* Magic bitmask to reset the card */ #define HERMES_PCI_COR_MASK (0x0080) - /* Magic timeouts for doing the reset. * Those times are straight from wlan-ng, and it is claimed that they * are necessary. Alan will kill me. Take your time and grab a coffee. */ @@ -66,8 +113,13 @@ #define HERMES_PCI_COR_OFFT (500) /* ms */ #define HERMES_PCI_COR_BUSYT (500) /* ms */ +/* Orinoco PCI specific data */ +struct orinoco_pci_card { + void __iomem *pci_ioaddr; +}; + /* - * Do a soft reset of the card using the Configuration Option Register + * Do a soft reset of the PCI card using the Configuration Option Register * We need this to get going... * This is the part of the code that is strongly inspired from wlan-ng * @@ -79,13 +131,14 @@ * Note bis : Don't try to access HERMES_CMD during the reset phase. * It just won't work ! */ -static int orinoco_pci_cor_reset(struct orinoco_private *priv) +static int +orinoco_pci_cor_reset(struct orinoco_private *priv) { hermes_t *hw = &priv->hw; - unsigned long timeout; - u16 reg; + unsigned long timeout; + u16 reg; - /* Assert the reset until the card notices */ + /* Assert the reset until the card notice */ hermes_write_regn(hw, PCI_COR, HERMES_PCI_COR_MASK); mdelay(HERMES_PCI_COR_ONT); @@ -110,14 +163,19 @@ static int orinoco_pci_cor_reset(struct orinoco_private *priv) return 0; } +/* + * Initialise a card. Mostly similar to PLX code. + */ static int orinoco_pci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - int err; - struct orinoco_private *priv; + int err = 0; + unsigned long pci_iorange; + u16 __iomem *pci_ioaddr = NULL; + unsigned long pci_iolen; + struct orinoco_private *priv = NULL; struct orinoco_pci_card *card; - struct net_device *dev; - void __iomem *hermes_io; + struct net_device *dev = NULL; err = pci_enable_device(pdev); if (err) { @@ -126,41 +184,50 @@ static int orinoco_pci_init_one(struct pci_dev *pdev, } err = pci_request_regions(pdev, DRIVER_NAME); - if (err) { + if (err != 0) { printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); goto fail_resources; } - hermes_io = pci_iomap(pdev, 0, 0); - if (!hermes_io) { - printk(KERN_ERR PFX "Cannot remap chipset registers\n"); - err = -EIO; - goto fail_map_hermes; + /* Resource 0 is mapped to the hermes registers */ + pci_iorange = pci_resource_start(pdev, 0); + pci_iolen = pci_resource_len(pdev, 0); + pci_ioaddr = ioremap(pci_iorange, pci_iolen); + if (!pci_iorange) { + printk(KERN_ERR PFX "Cannot remap hardware registers\n"); + goto fail_map; } /* Allocate network device */ dev = alloc_orinocodev(sizeof(*card), orinoco_pci_cor_reset); - if (!dev) { - printk(KERN_ERR PFX "Cannot allocate network device\n"); + if (! dev) { err = -ENOMEM; goto fail_alloc; } priv = netdev_priv(dev); card = priv->card; + card->pci_ioaddr = pci_ioaddr; + dev->mem_start = pci_iorange; + dev->mem_end = pci_iorange + pci_iolen - 1; SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING); + hermes_struct_init(&priv->hw, pci_ioaddr, HERMES_32BIT_REGSPACING); + + printk(KERN_DEBUG PFX "Detected device %s, mem:0x%lx-0x%lx, irq %d\n", + pci_name(pdev), dev->mem_start, dev->mem_end, pdev->irq); - err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; goto fail_irq; } + dev->irq = pdev->irq; + /* Perform a COR reset to start the card */ err = orinoco_pci_cor_reset(priv); if (err) { printk(KERN_ERR PFX "Initial reset failed\n"); @@ -169,13 +236,11 @@ static int orinoco_pci_init_one(struct pci_dev *pdev, err = register_netdev(dev); if (err) { - printk(KERN_ERR PFX "Cannot register network device\n"); + printk(KERN_ERR PFX "Failed to register net device\n"); goto fail; } pci_set_drvdata(pdev, dev); - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, - pci_name(pdev)); return 0; @@ -187,9 +252,9 @@ static int orinoco_pci_init_one(struct pci_dev *pdev, free_orinocodev(dev); fail_alloc: - pci_iounmap(pdev, hermes_io); + iounmap(pci_ioaddr); - fail_map_hermes: + fail_map: pci_release_regions(pdev); fail_resources: @@ -202,17 +267,87 @@ static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); + struct orinoco_pci_card *card = priv->card; unregister_netdev(dev); - free_irq(pdev->irq, dev); + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); free_orinocodev(dev); - pci_iounmap(pdev, priv->hw.iobase); + iounmap(card->pci_ioaddr); pci_release_regions(pdev); pci_disable_device(pdev); } -static struct pci_device_id orinoco_pci_id_table[] = { +static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct orinoco_private *priv = netdev_priv(dev); + unsigned long flags; + int err; + + + err = orinoco_lock(priv, &flags); + if (err) { + printk(KERN_ERR "%s: hw_unavailable on orinoco_pci_suspend\n", + dev->name); + return err; + } + + err = __orinoco_down(dev); + if (err) + printk(KERN_WARNING "%s: orinoco_pci_suspend(): Error %d downing interface\n", + dev->name, err); + + netif_device_detach(dev); + + priv->hw_unavailable++; + + orinoco_unlock(priv, &flags); + + pci_save_state(pdev); + pci_set_power_state(pdev, PCI_D3hot); + + return 0; +} + +static int orinoco_pci_resume(struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata(pdev); + struct orinoco_private *priv = netdev_priv(dev); + unsigned long flags; + int err; + + printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name); + + pci_set_power_state(pdev, 0); + pci_restore_state(pdev); + + err = orinoco_reinit_firmware(dev); + if (err) { + printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n", + dev->name, err); + return err; + } + + spin_lock_irqsave(&priv->lock, flags); + + netif_device_attach(dev); + + priv->hw_unavailable--; + + if (priv->open && (! priv->hw_unavailable)) { + err = __orinoco_up(dev); + if (err) + printk(KERN_ERR "%s: Error %d restarting card on orinoco_pci_resume()\n", + dev->name, err); + } + + spin_unlock_irqrestore(&priv->lock, flags); + + return 0; +} + +static struct pci_device_id orinoco_pci_pci_id_table[] = { /* Intersil Prism 3 */ {0x1260, 0x3872, PCI_ANY_ID, PCI_ANY_ID,}, /* Intersil Prism 2.5 */ @@ -222,11 +357,11 @@ static struct pci_device_id orinoco_pci_id_table[] = { {0,}, }; -MODULE_DEVICE_TABLE(pci, orinoco_pci_id_table); +MODULE_DEVICE_TABLE(pci, orinoco_pci_pci_id_table); static struct pci_driver orinoco_pci_driver = { .name = DRIVER_NAME, - .id_table = orinoco_pci_id_table, + .id_table = orinoco_pci_pci_id_table, .probe = orinoco_pci_init_one, .remove = __devexit_p(orinoco_pci_remove_one), .suspend = orinoco_pci_suspend, diff --git a/drivers/net/wireless/orinoco_pci.h b/drivers/net/wireless/orinoco_pci.h deleted file mode 100644 index be1abea4b..000000000 --- a/drivers/net/wireless/orinoco_pci.h +++ /dev/null @@ -1,104 +0,0 @@ -/* orinoco_pci.h - * - * Common code for all Orinoco drivers for PCI devices, including - * both native PCI and PCMCIA-to-PCI bridges. - * - * Copyright (C) 2005, Pavel Roskin. - * See orinoco.c for license. - */ - -#ifndef _ORINOCO_PCI_H -#define _ORINOCO_PCI_H - -#include - -/* Driver specific data */ -struct orinoco_pci_card { - void __iomem *bridge_io; - void __iomem *attr_io; -}; - -#ifdef CONFIG_PM -static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state) -{ - struct net_device *dev = pci_get_drvdata(pdev); - struct orinoco_private *priv = netdev_priv(dev); - unsigned long flags; - int err; - - err = orinoco_lock(priv, &flags); - if (err) { - printk(KERN_ERR "%s: cannot lock hardware for suspend\n", - dev->name); - return err; - } - - err = __orinoco_down(dev); - if (err) - printk(KERN_WARNING "%s: error %d bringing interface down " - "for suspend\n", dev->name, err); - - netif_device_detach(dev); - - priv->hw_unavailable++; - - orinoco_unlock(priv, &flags); - - free_irq(pdev->irq, dev); - pci_save_state(pdev); - pci_disable_device(pdev); - pci_set_power_state(pdev, PCI_D3hot); - - return 0; -} - -static int orinoco_pci_resume(struct pci_dev *pdev) -{ - struct net_device *dev = pci_get_drvdata(pdev); - struct orinoco_private *priv = netdev_priv(dev); - unsigned long flags; - int err; - - pci_set_power_state(pdev, 0); - pci_enable_device(pdev); - pci_restore_state(pdev); - - err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, - dev->name, dev); - if (err) { - printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n", - dev->name); - pci_disable_device(pdev); - return -EBUSY; - } - - err = orinoco_reinit_firmware(dev); - if (err) { - printk(KERN_ERR "%s: error %d re-initializing firmware " - "on resume\n", dev->name, err); - return err; - } - - spin_lock_irqsave(&priv->lock, flags); - - netif_device_attach(dev); - - priv->hw_unavailable--; - - if (priv->open && (! priv->hw_unavailable)) { - err = __orinoco_up(dev); - if (err) - printk(KERN_ERR "%s: Error %d restarting card on resume\n", - dev->name, err); - } - - spin_unlock_irqrestore(&priv->lock, flags); - - return 0; -} -#else -#define orinoco_pci_suspend NULL -#define orinoco_pci_resume NULL -#endif - -#endif /* _ORINOCO_PCI_H */ diff --git a/drivers/net/wireless/orinoco_plx.c b/drivers/net/wireless/orinoco_plx.c index 7f006f624..210e73776 100644 --- a/drivers/net/wireless/orinoco_plx.c +++ b/drivers/net/wireless/orinoco_plx.c @@ -3,7 +3,7 @@ * Driver for Prism II devices which would usually be driven by orinoco_cs, * but are connected to the PCI bus by a PLX9052. * - * Current maintainers are: + * Current maintainers (as of 29 September 2003) are: * Pavel Roskin * and David Gibson * @@ -30,18 +30,38 @@ * other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file * under either the MPL or the GPL. + + * Caution: this is experimental and probably buggy. For success and + * failure reports for different cards and adaptors, see + * orinoco_plx_pci_id_table near the end of the file. If you have a + * card we don't have the PCI id for, and looks like it should work, + * drop me mail with the id and "it works"/"it doesn't work". + * + * Note: if everything gets detected fine but it doesn't actually send + * or receive packets, your first port of call should probably be to + * try newer firmware in the card. Especially if you're doing Ad-Hoc + * modes. + * + * The actual driving is done by orinoco.c, this is just resource + * allocation stuff. The explanation below is courtesy of Ryan Niemi + * on the linux-wlan-ng list at + * http://archives.neohapsis.com/archives/dev/linux-wlan/2001-q1/0026.html * - * Here's the general details on how the PLX9052 adapter works: + * The PLX9052-based cards (WL11000 and several others) are a + * different beast than the usual PCMCIA-based PRISM2 configuration + * expected by wlan-ng. Here's the general details on how the WL11000 + * PCI adapter works: * * - Two PCI I/O address spaces, one 0x80 long which contains the * PLX9052 registers, and one that's 0x40 long mapped to the PCMCIA * slot I/O address space. * - * - One PCI memory address space, mapped to the PCMCIA attribute space + * - One PCI memory address space, mapped to the PCMCIA memory space * (containing the CIS). * - * Using the later, you can read through the CIS data to make sure the - * card is compatible with the driver. Keep in mind that the PCMCIA + * After identifying the I/O and memory space, you can read through + * the memory space to confirm the CIS's device ID or manufacturer ID + * to make sure it's the expected card. qKeep in mind that the PCMCIA * spec specifies the CIS as the lower 8 bits of each word read from * the CIS, so to read the bytes of the CIS, read every other byte * (0,2,4,...). Passing that test, you need to enable the I/O address @@ -51,7 +71,7 @@ * within the PCI memory space. Write 0x41 to the COR register to * enable I/O mode and to select level triggered interrupts. To * confirm you actually succeeded, read the COR register back and make - * sure it actually got set to 0x41, in case you have an unexpected + * sure it actually got set to 0x41, incase you have an unexpected * card inserted. * * Following that, you can treat the second PCI I/O address space (the @@ -81,11 +101,22 @@ * that, I've hot-swapped a number of times during debugging and * driver development for various reasons (stuck WAIT# line after the * radio card's firmware locks up). + * + * Hope this is enough info for someone to add PLX9052 support to the + * wlan-ng card. In the case of the WL11000, the PCI ID's are + * 0x1639/0x0200, with matching subsystem ID's. Other PLX9052-based + * manufacturers other than Eumitcom (or on cards other than the + * WL11000) may have different PCI ID's. + * + * If anyone needs any more specific info, let me know. I haven't had + * time to implement support myself yet, and with the way things are + * going, might not have time for a while.. */ #define DRIVER_NAME "orinoco_plx" #define PFX DRIVER_NAME ": " +#include #include #include #include @@ -94,7 +125,6 @@ #include #include "orinoco.h" -#include "orinoco_pci.h" #define COR_OFFSET (0x3e0) /* COR attribute offset of Prism2 PC card */ #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ @@ -104,20 +134,30 @@ #define PLX_INTCSR 0x4c /* Interrupt Control & Status Register */ #define PLX_INTCSR_INTEN (1<<6) /* Interrupt Enable bit */ +static const u8 cis_magic[] = { + 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67 +}; + +/* Orinoco PLX specific data */ +struct orinoco_plx_card { + void __iomem *attr_mem; +}; + /* * Do a soft reset of the card using the Configuration Option Register */ static int orinoco_plx_cor_reset(struct orinoco_private *priv) { hermes_t *hw = &priv->hw; - struct orinoco_pci_card *card = priv->card; + struct orinoco_plx_card *card = priv->card; + u8 __iomem *attr_mem = card->attr_mem; unsigned long timeout; u16 reg; - iowrite8(COR_VALUE | COR_RESET, card->attr_io + COR_OFFSET); + writeb(COR_VALUE | COR_RESET, attr_mem + COR_OFFSET); mdelay(1); - iowrite8(COR_VALUE, card->attr_io + COR_OFFSET); + writeb(COR_VALUE, attr_mem + COR_OFFSET); mdelay(1); /* Just in case, wait more until the card is no longer busy */ @@ -128,7 +168,7 @@ static int orinoco_plx_cor_reset(struct orinoco_private *priv) reg = hermes_read_regn(hw, CMD); } - /* Still busy? */ + /* Did we timeout ? */ if (reg & HERMES_CMD_BUSY) { printk(KERN_ERR PFX "Busy timeout\n"); return -ETIMEDOUT; @@ -137,55 +177,20 @@ static int orinoco_plx_cor_reset(struct orinoco_private *priv) return 0; } -static int orinoco_plx_hw_init(struct orinoco_pci_card *card) -{ - int i; - u32 csr_reg; - static const u8 cis_magic[] = { - 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67 - }; - - printk(KERN_DEBUG PFX "CIS: "); - for (i = 0; i < 16; i++) { - printk("%02X:", ioread8(card->attr_io + (i << 1))); - } - printk("\n"); - - /* Verify whether a supported PC card is present */ - /* FIXME: we probably need to be smarted about this */ - for (i = 0; i < sizeof(cis_magic); i++) { - if (cis_magic[i] != ioread8(card->attr_io + (i << 1))) { - printk(KERN_ERR PFX "The CIS value of Prism2 PC " - "card is unexpected\n"); - return -ENODEV; - } - } - - /* bjoern: We need to tell the card to enable interrupts, in - case the serial eprom didn't do this already. See the - PLX9052 data book, p8-1 and 8-24 for reference. */ - csr_reg = ioread32(card->bridge_io + PLX_INTCSR); - if (!(csr_reg & PLX_INTCSR_INTEN)) { - csr_reg |= PLX_INTCSR_INTEN; - iowrite32(csr_reg, card->bridge_io + PLX_INTCSR); - csr_reg = ioread32(card->bridge_io + PLX_INTCSR); - if (!(csr_reg & PLX_INTCSR_INTEN)) { - printk(KERN_ERR PFX "Cannot enable interrupts\n"); - return -EIO; - } - } - - return 0; -} static int orinoco_plx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - int err; - struct orinoco_private *priv; - struct orinoco_pci_card *card; - struct net_device *dev; - void __iomem *hermes_io, *attr_io, *bridge_io; + int err = 0; + u8 __iomem *attr_mem = NULL; + u32 csr_reg, plx_addr; + struct orinoco_private *priv = NULL; + struct orinoco_plx_card *card; + unsigned long pccard_ioaddr = 0; + unsigned long pccard_iolen = 0; + struct net_device *dev = NULL; + void __iomem *mem; + int i; err = pci_enable_device(pdev); if (err) { @@ -194,30 +199,30 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, } err = pci_request_regions(pdev, DRIVER_NAME); - if (err) { + if (err != 0) { printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); goto fail_resources; } - bridge_io = pci_iomap(pdev, 1, 0); - if (!bridge_io) { - printk(KERN_ERR PFX "Cannot map bridge registers\n"); - err = -EIO; - goto fail_map_bridge; - } + /* Resource 1 is mapped to PLX-specific registers */ + plx_addr = pci_resource_start(pdev, 1); - attr_io = pci_iomap(pdev, 2, 0); - if (!attr_io) { - printk(KERN_ERR PFX "Cannot map PCMCIA attributes\n"); - err = -EIO; + /* Resource 2 is mapped to the PCMCIA attribute memory */ + attr_mem = ioremap(pci_resource_start(pdev, 2), + pci_resource_len(pdev, 2)); + if (!attr_mem) { + printk(KERN_ERR PFX "Cannot remap PCMCIA space\n"); goto fail_map_attr; } - hermes_io = pci_iomap(pdev, 3, 0); - if (!hermes_io) { - printk(KERN_ERR PFX "Cannot map chipset registers\n"); - err = -EIO; - goto fail_map_hermes; + /* Resource 3 is mapped to the PCMCIA I/O address space */ + pccard_ioaddr = pci_resource_start(pdev, 3); + pccard_iolen = pci_resource_len(pdev, 3); + + mem = pci_iomap(pdev, 3, 0); + if (!mem) { + err = -ENOMEM; + goto fail_map_io; } /* Allocate network device */ @@ -230,25 +235,38 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, priv = netdev_priv(dev); card = priv->card; - card->bridge_io = bridge_io; - card->attr_io = attr_io; + card->attr_mem = attr_mem; + dev->base_addr = pccard_ioaddr; SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); + hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING); - err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, + printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 PLX device " + "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, + pccard_ioaddr); + + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; goto fail_irq; } + dev->irq = pdev->irq; - err = orinoco_plx_hw_init(card); - if (err) { - printk(KERN_ERR PFX "Hardware initialization failed\n"); - goto fail; + /* bjoern: We need to tell the card to enable interrupts, in + case the serial eprom didn't do this already. See the + PLX9052 data book, p8-1 and 8-24 for reference. */ + csr_reg = inl(plx_addr + PLX_INTCSR); + if (!(csr_reg & PLX_INTCSR_INTEN)) { + csr_reg |= PLX_INTCSR_INTEN; + outl(csr_reg, plx_addr + PLX_INTCSR); + csr_reg = inl(plx_addr + PLX_INTCSR); + if (!(csr_reg & PLX_INTCSR_INTEN)) { + printk(KERN_ERR PFX "Cannot enable interrupts\n"); + goto fail; + } } err = orinoco_plx_cor_reset(priv); @@ -257,6 +275,23 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, goto fail; } + printk(KERN_DEBUG PFX "CIS: "); + for (i = 0; i < 16; i++) { + printk("%02X:", readb(attr_mem + 2*i)); + } + printk("\n"); + + /* Verify whether a supported PC card is present */ + /* FIXME: we probably need to be smarted about this */ + for (i = 0; i < sizeof(cis_magic); i++) { + if (cis_magic[i] != readb(attr_mem +2*i)) { + printk(KERN_ERR PFX "The CIS value of Prism2 PC " + "card is unexpected\n"); + err = -EIO; + goto fail; + } + } + err = register_netdev(dev); if (err) { printk(KERN_ERR PFX "Cannot register network device\n"); @@ -264,8 +299,6 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, } pci_set_drvdata(pdev, dev); - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, - pci_name(pdev)); return 0; @@ -277,15 +310,12 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, free_orinocodev(dev); fail_alloc: - pci_iounmap(pdev, hermes_io); + pci_iounmap(pdev, mem); - fail_map_hermes: - pci_iounmap(pdev, attr_io); + fail_map_io: + iounmap(attr_mem); fail_map_attr: - pci_iounmap(pdev, bridge_io); - - fail_map_bridge: pci_release_regions(pdev); fail_resources: @@ -298,20 +328,23 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); - struct orinoco_pci_card *card = priv->card; + struct orinoco_plx_card *card = priv->card; + u8 __iomem *attr_mem = card->attr_mem; + + BUG_ON(! dev); unregister_netdev(dev); - free_irq(pdev->irq, dev); + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); free_orinocodev(dev); pci_iounmap(pdev, priv->hw.iobase); - pci_iounmap(pdev, card->attr_io); - pci_iounmap(pdev, card->bridge_io); + iounmap(attr_mem); pci_release_regions(pdev); pci_disable_device(pdev); } -static struct pci_device_id orinoco_plx_id_table[] = { + +static struct pci_device_id orinoco_plx_pci_id_table[] = { {0x111a, 0x1023, PCI_ANY_ID, PCI_ANY_ID,}, /* Siemens SpeedStream SS1023 */ {0x1385, 0x4100, PCI_ANY_ID, PCI_ANY_ID,}, /* Netgear MA301 */ {0x15e8, 0x0130, PCI_ANY_ID, PCI_ANY_ID,}, /* Correga - does this work? */ @@ -329,15 +362,13 @@ static struct pci_device_id orinoco_plx_id_table[] = { {0,}, }; -MODULE_DEVICE_TABLE(pci, orinoco_plx_id_table); +MODULE_DEVICE_TABLE(pci, orinoco_plx_pci_id_table); static struct pci_driver orinoco_plx_driver = { .name = DRIVER_NAME, - .id_table = orinoco_plx_id_table, + .id_table = orinoco_plx_pci_id_table, .probe = orinoco_plx_init_one, .remove = __devexit_p(orinoco_plx_remove_one), - .suspend = orinoco_pci_suspend, - .resume = orinoco_pci_resume, }; static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION @@ -357,6 +388,7 @@ static int __init orinoco_plx_init(void) static void __exit orinoco_plx_exit(void) { pci_unregister_driver(&orinoco_plx_driver); + ssleep(1); } module_init(orinoco_plx_init); diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c index 0831721e4..5e68b7026 100644 --- a/drivers/net/wireless/orinoco_tmd.c +++ b/drivers/net/wireless/orinoco_tmd.c @@ -1,5 +1,5 @@ /* orinoco_tmd.c - * + * * Driver for Prism II devices which would usually be driven by orinoco_cs, * but are connected to the PCI bus by a TMD7160. * @@ -26,13 +26,25 @@ * other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file * under either the MPL or the GPL. + + * Caution: this is experimental and probably buggy. For success and + * failure reports for different cards and adaptors, see + * orinoco_tmd_pci_id_table near the end of the file. If you have a + * card we don't have the PCI id for, and looks like it should work, + * drop me mail with the id and "it works"/"it doesn't work". + * + * Note: if everything gets detected fine but it doesn't actually send + * or receive packets, your first port of call should probably be to + * try newer firmware in the card. Especially if you're doing Ad-Hoc + * modes * * The actual driving is done by orinoco.c, this is just resource * allocation stuff. * * This driver is modeled after the orinoco_plx driver. The main - * difference is that the TMD chip has only IO port ranges and doesn't - * provide access to the PCMCIA attribute space. + * difference is that the TMD chip has only IO port ranges and no + * memory space, i.e. no access to the CIS. Compared to the PLX chip, + * the io range functionalities are exchanged. * * Pheecom sells cards with the TMD chip as "ASIC version" */ @@ -40,6 +52,7 @@ #define DRIVER_NAME "orinoco_tmd" #define PFX DRIVER_NAME ": " +#include #include #include #include @@ -48,26 +61,32 @@ #include #include "orinoco.h" -#include "orinoco_pci.h" #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ #define COR_RESET (0x80) /* reset bit in the COR register */ #define TMD_RESET_TIME (500) /* milliseconds */ +/* Orinoco TMD specific data */ +struct orinoco_tmd_card { + u32 tmd_io; +}; + + /* * Do a soft reset of the card using the Configuration Option Register */ static int orinoco_tmd_cor_reset(struct orinoco_private *priv) { hermes_t *hw = &priv->hw; - struct orinoco_pci_card *card = priv->card; + struct orinoco_tmd_card *card = priv->card; + u32 addr = card->tmd_io; unsigned long timeout; u16 reg; - iowrite8(COR_VALUE | COR_RESET, card->bridge_io); + outb(COR_VALUE | COR_RESET, addr); mdelay(1); - iowrite8(COR_VALUE, card->bridge_io); + outb(COR_VALUE, addr); mdelay(1); /* Just in case, wait more until the card is no longer busy */ @@ -78,7 +97,7 @@ static int orinoco_tmd_cor_reset(struct orinoco_private *priv) reg = hermes_read_regn(hw, CMD); } - /* Still busy? */ + /* Did we timeout ? */ if (reg & HERMES_CMD_BUSY) { printk(KERN_ERR PFX "Busy timeout\n"); return -ETIMEDOUT; @@ -91,11 +110,11 @@ static int orinoco_tmd_cor_reset(struct orinoco_private *priv) static int orinoco_tmd_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - int err; - struct orinoco_private *priv; - struct orinoco_pci_card *card; - struct net_device *dev; - void __iomem *hermes_io, *bridge_io; + int err = 0; + struct orinoco_private *priv = NULL; + struct orinoco_tmd_card *card; + struct net_device *dev = NULL; + void __iomem *mem; err = pci_enable_device(pdev); if (err) { @@ -104,28 +123,20 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, } err = pci_request_regions(pdev, DRIVER_NAME); - if (err) { + if (err != 0) { printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); goto fail_resources; } - bridge_io = pci_iomap(pdev, 1, 0); - if (!bridge_io) { - printk(KERN_ERR PFX "Cannot map bridge registers\n"); - err = -EIO; - goto fail_map_bridge; - } - - hermes_io = pci_iomap(pdev, 2, 0); - if (!hermes_io) { - printk(KERN_ERR PFX "Cannot map chipset registers\n"); - err = -EIO; - goto fail_map_hermes; + mem = pci_iomap(pdev, 2, 0); + if (! mem) { + err = -ENOMEM; + goto fail_iomap; } /* Allocate network device */ dev = alloc_orinocodev(sizeof(*card), orinoco_tmd_cor_reset); - if (!dev) { + if (! dev) { printk(KERN_ERR PFX "Cannot allocate network device\n"); err = -ENOMEM; goto fail_alloc; @@ -133,19 +144,25 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, priv = netdev_priv(dev); card = priv->card; - card->bridge_io = bridge_io; + card->tmd_io = pci_resource_start(pdev, 1); + dev->base_addr = pci_resource_start(pdev, 2); SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); + hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING); - err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, + printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 TMD device " + "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, + dev->base_addr); + + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; goto fail_irq; } + dev->irq = pdev->irq; err = orinoco_tmd_cor_reset(priv); if (err) { @@ -160,8 +177,6 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, } pci_set_drvdata(pdev, dev); - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s\n", dev->name, - pci_name(pdev)); return 0; @@ -173,12 +188,9 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, free_orinocodev(dev); fail_alloc: - pci_iounmap(pdev, hermes_io); - - fail_map_hermes: - pci_iounmap(pdev, bridge_io); + pci_iounmap(pdev, mem); - fail_map_bridge: + fail_iomap: pci_release_regions(pdev); fail_resources: @@ -191,32 +203,31 @@ static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = dev->priv; - struct orinoco_pci_card *card = priv->card; + + BUG_ON(! dev); unregister_netdev(dev); - free_irq(pdev->irq, dev); + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); free_orinocodev(dev); pci_iounmap(pdev, priv->hw.iobase); - pci_iounmap(pdev, card->bridge_io); pci_release_regions(pdev); pci_disable_device(pdev); } -static struct pci_device_id orinoco_tmd_id_table[] = { + +static struct pci_device_id orinoco_tmd_pci_id_table[] = { {0x15e8, 0x0131, PCI_ANY_ID, PCI_ANY_ID,}, /* NDC and OEMs, e.g. pheecom */ {0,}, }; -MODULE_DEVICE_TABLE(pci, orinoco_tmd_id_table); +MODULE_DEVICE_TABLE(pci, orinoco_tmd_pci_id_table); static struct pci_driver orinoco_tmd_driver = { .name = DRIVER_NAME, - .id_table = orinoco_tmd_id_table, + .id_table = orinoco_tmd_pci_id_table, .probe = orinoco_tmd_init_one, .remove = __devexit_p(orinoco_tmd_remove_one), - .suspend = orinoco_pci_suspend, - .resume = orinoco_pci_resume, }; static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION @@ -234,6 +245,7 @@ static int __init orinoco_tmd_init(void) static void __exit orinoco_tmd_exit(void) { pci_unregister_driver(&orinoco_tmd_driver); + ssleep(1); } module_init(orinoco_tmd_init); diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index 09fc17a0f..bfa0cc319 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c @@ -189,7 +189,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) /* request for the interrupt before uploading the firmware */ rvalue = request_irq(pdev->irq, &islpci_interrupt, - IRQF_SHARED, ndev->name, priv); + SA_SHIRQ, ndev->name, priv); if (rvalue) { /* error, could not hook the handler to the irq */ diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 2e061a80b..6a60c5970 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include diff --git a/drivers/net/wireless/prism54/prismcompat.h b/drivers/net/wireless/prism54/prismcompat.h index d71eca55a..55541c017 100644 --- a/drivers/net/wireless/prism54/prismcompat.h +++ b/drivers/net/wireless/prism54/prismcompat.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 61b83a5e7..879eb4276 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -30,6 +30,7 @@ * =============================================================================*/ +#include #include #include #include @@ -923,7 +924,8 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index bcc703813..54fe4e4ea 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c @@ -1,6 +1,6 @@ /* * Driver for 802.11b cards using RAM-loadable Symbol firmware, such as - * Symbol Wireless Networker LA4137, CompactFlash cards by Socket + * Symbol Wireless Networker LA4100, CompactFlash cards by Socket * Communications and Intel PRO/Wireless 2011B. * * The driver implements Symbol firmware download. The rest is handled @@ -21,6 +21,7 @@ #define DRIVER_NAME "spectrum_cs" #define PFX DRIVER_NAME ": " +#include #include #include #include @@ -34,6 +35,8 @@ #include "orinoco.h" +static unsigned char *primsym; +static unsigned char *secsym; static const char primary_fw_name[] = "symbol_sp24t_prim_fw"; static const char secondary_fw_name[] = "symbol_sp24t_sec_fw"; @@ -117,8 +120,8 @@ static void spectrum_cs_release(struct pcmcia_device *link); * Each block has the following structure. */ struct dblock { - __le32 addr; /* adapter address where to write the block */ - __le16 len; /* length of the data only, in bytes */ + __le32 _addr; /* adapter address where to write the block */ + __le16 _len; /* length of the data only, in bytes */ char data[0]; /* data to be written */ } __attribute__ ((packed)); @@ -128,9 +131,9 @@ struct dblock { * items with matching ID should be written. */ struct pdr { - __le32 id; /* record ID */ - __le32 addr; /* adapter address where to write the data */ - __le32 len; /* expected length of the data, in bytes */ + __le32 _id; /* record ID */ + __le32 _addr; /* adapter address where to write the data */ + __le32 _len; /* expected length of the data, in bytes */ char next[0]; /* next PDR starts here */ } __attribute__ ((packed)); @@ -141,8 +144,8 @@ struct pdr { * be plugged into the secondary firmware. */ struct pdi { - __le16 len; /* length of ID and data, in words */ - __le16 id; /* record ID */ + __le16 _len; /* length of ID and data, in words */ + __le16 _id; /* record ID */ char data[0]; /* plug data */ } __attribute__ ((packed)); @@ -151,44 +154,44 @@ struct pdi { static inline u32 dblock_addr(const struct dblock *blk) { - return le32_to_cpu(blk->addr); + return le32_to_cpu(blk->_addr); } static inline u32 dblock_len(const struct dblock *blk) { - return le16_to_cpu(blk->len); + return le16_to_cpu(blk->_len); } static inline u32 pdr_id(const struct pdr *pdr) { - return le32_to_cpu(pdr->id); + return le32_to_cpu(pdr->_id); } static inline u32 pdr_addr(const struct pdr *pdr) { - return le32_to_cpu(pdr->addr); + return le32_to_cpu(pdr->_addr); } static inline u32 pdr_len(const struct pdr *pdr) { - return le32_to_cpu(pdr->len); + return le32_to_cpu(pdr->_len); } static inline u32 pdi_id(const struct pdi *pdi) { - return le16_to_cpu(pdi->id); + return le16_to_cpu(pdi->_id); } /* Return length of the data only, in bytes */ static inline u32 pdi_len(const struct pdi *pdi) { - return 2 * (le16_to_cpu(pdi->len) - 1); + return 2 * (le16_to_cpu(pdi->_len) - 1); } @@ -340,7 +343,8 @@ spectrum_plug_pdi(hermes_t *hw, struct pdr *first_pdr, struct pdi *pdi) /* do the actual plugging */ spectrum_aux_setaddr(hw, pdr_addr(pdr)); - hermes_write_bytes(hw, HERMES_AUXDATA, pdi->data, pdi_len(pdi)); + hermes_write_words(hw, HERMES_AUXDATA, pdi->data, + pdi_len(pdi) / 2); return 0; } @@ -420,8 +424,8 @@ spectrum_load_blocks(hermes_t *hw, const struct dblock *first_block) while (dblock_addr(blk) != BLOCK_END) { spectrum_aux_setaddr(hw, blkaddr); - hermes_write_bytes(hw, HERMES_AUXDATA, blk->data, - blklen); + hermes_write_words(hw, HERMES_AUXDATA, blk->data, + blklen / 2); blk = (struct dblock *) &blk->data[blklen]; blkaddr = dblock_addr(blk); @@ -438,7 +442,7 @@ spectrum_load_blocks(hermes_t *hw, const struct dblock *first_block) */ static int spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link, - const unsigned char *image, int secondary) + const unsigned char *image) { int ret; const unsigned char *ptr; @@ -453,7 +457,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link, first_block = (const struct dblock *) ptr; /* Read the PDA */ - if (secondary) { + if (image != primsym) { ret = spectrum_read_pda(hw, pda, sizeof(pda)); if (ret) return ret; @@ -470,7 +474,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link, return ret; /* Write the PDA to the adapter */ - if (secondary) { + if (image != primsym) { ret = spectrum_apply_pda(hw, first_block, pda); if (ret) return ret; @@ -485,7 +489,7 @@ spectrum_dl_image(hermes_t *hw, struct pcmcia_device *link, ret = hermes_init(hw); /* hermes_reset() should return 0 with the secondary firmware */ - if (secondary && ret != 0) + if (image != primsym && ret != 0) return -ENODEV; /* And this should work with any firmware */ @@ -507,30 +511,33 @@ spectrum_dl_firmware(hermes_t *hw, struct pcmcia_device *link) const struct firmware *fw_entry; if (request_firmware(&fw_entry, primary_fw_name, - &handle_to_dev(link)) != 0) { + &handle_to_dev(link)) == 0) { + primsym = fw_entry->data; + } else { printk(KERN_ERR PFX "Cannot find firmware: %s\n", primary_fw_name); return -ENOENT; } - /* Load primary firmware */ - ret = spectrum_dl_image(hw, link, fw_entry->data, 0); - release_firmware(fw_entry); - if (ret) { - printk(KERN_ERR PFX "Primary firmware download failed\n"); - return ret; - } - if (request_firmware(&fw_entry, secondary_fw_name, - &handle_to_dev(link)) != 0) { + &handle_to_dev(link)) == 0) { + secsym = fw_entry->data; + } else { printk(KERN_ERR PFX "Cannot find firmware: %s\n", secondary_fw_name); return -ENOENT; } + /* Load primary firmware */ + ret = spectrum_dl_image(hw, link, primsym); + if (ret) { + printk(KERN_ERR PFX "Primary firmware download failed\n"); + return ret; + } + /* Load secondary firmware */ - ret = spectrum_dl_image(hw, link, fw_entry->data, 1); - release_firmware(fw_entry); + ret = spectrum_dl_image(hw, link, secsym); + if (ret) { printk(KERN_ERR PFX "Secondary firmware download failed\n"); } @@ -619,11 +626,14 @@ static void spectrum_cs_detach(struct pcmcia_device *link) { struct net_device *dev = link->priv; - if (link->dev_node) - unregister_netdev(dev); - spectrum_cs_release(link); + DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); + if (link->dev_node) { + DEBUG(0, PFX "About to unregister net device %p\n", + dev); + unregister_netdev(dev); + } free_orinocodev(dev); } /* spectrum_cs_detach */ @@ -643,10 +653,13 @@ spectrum_cs_config(struct pcmcia_device *link) int last_fn, last_ret; u_char buf[64]; config_info_t conf; + cisinfo_t info; tuple_t tuple; cisparse_t parse; void __iomem *mem; + CS_CHECK(ValidateCIS, pcmcia_validate_cis(link, &info)); + /* * This reads the card's CONFIG tuple to find its * configuration registers. @@ -696,6 +709,12 @@ spectrum_cs_config(struct pcmcia_device *link) goto next_entry; link->conf.ConfigIndex = cfg->index; + /* Does this card need audio output? */ + if (cfg->flags & CISTPL_CFTABLE_AUDIO) { + link->conf.Attributes |= CONF_ENABLE_SPKR; + link->conf.Status = CCSR_AUDIO_ENA; + } + /* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { @@ -816,10 +835,19 @@ spectrum_cs_config(struct pcmcia_device *link) net_device has been registered */ /* Finally, report what we've done */ - printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " - "0x%04x-0x%04x\n", dev->name, dev->class_dev.dev->bus_id, - link->irq.AssignedIRQ, link->io.BasePort1, - link->io.BasePort1 + link->io.NumPorts1 - 1); + printk(KERN_DEBUG "%s: index 0x%02x: ", + dev->name, link->conf.ConfigIndex); + if (link->conf.Vpp) + printk(", Vpp %d.%d", link->conf.Vpp / 10, + link->conf.Vpp % 10); + printk(", irq %d", link->irq.AssignedIRQ); + if (link->io.NumPorts1) + printk(", io 0x%04x-0x%04x", link->io.BasePort1, + link->io.BasePort1 + link->io.NumPorts1 - 1); + if (link->io.NumPorts2) + printk(" & 0x%04x-0x%04x", link->io.BasePort2, + link->io.BasePort2 + link->io.NumPorts2 - 1); + printk("\n"); return 0; @@ -860,10 +888,11 @@ spectrum_cs_suspend(struct pcmcia_device *link) { struct net_device *dev = link->priv; struct orinoco_private *priv = netdev_priv(dev); + unsigned long flags; int err = 0; /* Mark the device as stopped, to block IO until later */ - spin_lock(&priv->lock); + spin_lock_irqsave(&priv->lock, flags); err = __orinoco_down(dev); if (err) @@ -873,9 +902,9 @@ spectrum_cs_suspend(struct pcmcia_device *link) netif_device_detach(dev); priv->hw_unavailable++; - spin_unlock(&priv->lock); + spin_unlock_irqrestore(&priv->lock, flags); - return err; + return 0; } static int @@ -903,7 +932,7 @@ static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION " David Gibson , et al)"; static struct pcmcia_device_id spectrum_cs_ids[] = { - PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4137 */ + PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001), /* Symbol Spectrum24 LA4100 */ PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001), /* Socket Communications CF */ PCMCIA_DEVICE_PROD_ID12("Intel", "PRO/Wireless LAN PC Card", 0x816cc815, 0x6fbf459a), /* 2011B, not 2011 */ PCMCIA_DEVICE_NULL, diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index ccaf28e8d..18a44580b 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c @@ -81,6 +81,7 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE"; /************************************************************************/ /* Header files */ +#include #include #include #include @@ -467,7 +468,6 @@ static int arp_query(unsigned char *haddr, u32 paddr, struct net_device *dev) { struct neighbour *neighbor_entry; - int ret = 0; neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev); @@ -475,11 +475,10 @@ static int arp_query(unsigned char *haddr, u32 paddr, neighbor_entry->used = jiffies; if (neighbor_entry->nud_state & NUD_VALID) { memcpy(haddr, neighbor_entry->ha, dev->addr_len); - ret = 1; + return 1; } - neigh_release(neighbor_entry); } - return ret; + return 0; } static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr, diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 5b69befda..dade4b903 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c @@ -1695,8 +1695,8 @@ static int wv_frequency_list(unsigned long ioaddr, /* I/O port of the card */ /* Look in the table if the frequency is allowed */ if (table[9 - (freq / 16)] & (1 << (freq % 16))) { /* Compute approximate channel number */ - while ((c < NELS(channel_bands)) && - (((channel_bands[c] >> 1) - 24) < freq)) + while ((((channel_bands[c] >> 1) - 24) < freq) && + (c < NELS(channel_bands))) c++; list[i].i = c; /* Set the list index */ @@ -2903,7 +2903,6 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) { net_local *lp = (net_local *) dev->priv; unsigned long flags; - char data[ETH_ZLEN]; #ifdef DEBUG_TX_TRACE printk(KERN_DEBUG "%s: ->wavelan_packet_xmit(0x%X)\n", dev->name, @@ -2938,15 +2937,14 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) * able to detect collisions, therefore in theory we don't really * need to pad. Jean II */ if (skb->len < ETH_ZLEN) { - memset(data, 0, ETH_ZLEN); - memcpy(data, skb->data, skb->len); - /* Write packet on the card */ - if(wv_packet_write(dev, data, ETH_ZLEN)) - return 1; /* We failed */ + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; } - else if(wv_packet_write(dev, skb->data, skb->len)) - return 1; /* We failed */ + /* Write packet on the card */ + if(wv_packet_write(dev, skb->data, skb->len)) + return 1; /* We failed */ dev_kfree_skb(skb); diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index 561250f73..f7724eb2f 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c @@ -3194,8 +3194,11 @@ wavelan_packet_xmit(struct sk_buff * skb, * and we don't have the Ethernet specific requirement of beeing * able to detect collisions, therefore in theory we don't really * need to pad. Jean II */ - if (skb_padto(skb, ETH_ZLEN)) - return 0; + if (skb->len < ETH_ZLEN) { + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) + return 0; + } wv_packet_write(dev, skb->data, skb->len); diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h index f34a36b0c..c65fe7a39 100644 --- a/drivers/net/wireless/wavelan_cs.p.h +++ b/drivers/net/wireless/wavelan_cs.p.h @@ -411,6 +411,7 @@ /***************************** INCLUDES *****************************/ /* Linux headers that we need */ +#include #include #include #include diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index c03e400fa..e52a650f6 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c @@ -28,6 +28,7 @@ */ #undef REALLY_SLOW_IO /* most systems can safely undef this */ +#include #include #include #include diff --git a/drivers/net/wireless/zd1211rw/Kconfig b/drivers/net/wireless/zd1211rw/Kconfig deleted file mode 100644 index 66ed55bc5..000000000 --- a/drivers/net/wireless/zd1211rw/Kconfig +++ /dev/null @@ -1,19 +0,0 @@ -config ZD1211RW - tristate "ZyDAS ZD1211/ZD1211B USB-wireless support" - depends on USB && IEEE80211 && IEEE80211_SOFTMAC && NET_RADIO && EXPERIMENTAL - select FW_LOADER - ---help--- - This is an experimental driver for the ZyDAS ZD1211/ZD1211B wireless - chip, present in many USB-wireless adapters. - - Device firmware is required alongside this driver. You can download the - firmware distribution from http://zd1211.ath.cx/get-firmware - -config ZD1211RW_DEBUG - bool "ZyDAS ZD1211 debugging" - depends on ZD1211RW - ---help--- - ZD1211 debugging messages. Choosing Y will result in additional debug - messages being saved to your kernel logs, which may help debug any - problems. - diff --git a/drivers/net/wireless/zd1211rw/Makefile b/drivers/net/wireless/zd1211rw/Makefile deleted file mode 100644 index 500314fc7..000000000 --- a/drivers/net/wireless/zd1211rw/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -obj-$(CONFIG_ZD1211RW) += zd1211rw.o - -zd1211rw-objs := zd_chip.o zd_ieee80211.o \ - zd_mac.o zd_netdev.o \ - zd_rf_al2230.o zd_rf_rf2959.o \ - zd_rf.o zd_usb.o zd_util.o - -ifeq ($(CONFIG_ZD1211RW_DEBUG),y) -EXTRA_CFLAGS += -DDEBUG -endif - diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c deleted file mode 100644 index 4b971a997..000000000 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ /dev/null @@ -1,1646 +0,0 @@ -/* zd_chip.c - * - * 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 file implements all the hardware specific functions for the ZD1211 - * and ZD1211B chips. Support for the ZD1211B was possible after Timothy - * Legge sent me a ZD1211B device. Thank you Tim. -- Uli - */ - -#include -#include - -#include "zd_def.h" -#include "zd_chip.h" -#include "zd_ieee80211.h" -#include "zd_mac.h" -#include "zd_rf.h" -#include "zd_util.h" - -void zd_chip_init(struct zd_chip *chip, - struct net_device *netdev, - struct usb_interface *intf) -{ - memset(chip, 0, sizeof(*chip)); - mutex_init(&chip->mutex); - zd_usb_init(&chip->usb, netdev, intf); - zd_rf_init(&chip->rf); -} - -void zd_chip_clear(struct zd_chip *chip) -{ - mutex_lock(&chip->mutex); - zd_usb_clear(&chip->usb); - zd_rf_clear(&chip->rf); - mutex_unlock(&chip->mutex); - mutex_destroy(&chip->mutex); - memset(chip, 0, sizeof(*chip)); -} - -static int scnprint_mac_oui(const u8 *addr, char *buffer, size_t size) -{ - return scnprintf(buffer, size, "%02x-%02x-%02x", - addr[0], addr[1], addr[2]); -} - -/* Prints an identifier line, which will support debugging. */ -static int scnprint_id(struct zd_chip *chip, char *buffer, size_t size) -{ - int i = 0; - - i = scnprintf(buffer, size, "zd1211%s chip ", - chip->is_zd1211b ? "b" : ""); - i += zd_usb_scnprint_id(&chip->usb, buffer+i, size-i); - i += scnprintf(buffer+i, size-i, " "); - i += scnprint_mac_oui(chip->e2p_mac, buffer+i, size-i); - i += scnprintf(buffer+i, size-i, " "); - i += zd_rf_scnprint_id(&chip->rf, buffer+i, size-i); - i += scnprintf(buffer+i, size-i, " pa%1x %c%c%c", chip->pa_type, - chip->patch_cck_gain ? 'g' : '-', - chip->patch_cr157 ? '7' : '-', - chip->patch_6m_band_edge ? '6' : '-'); - return i; -} - -static void print_id(struct zd_chip *chip) -{ - char buffer[80]; - - scnprint_id(chip, buffer, sizeof(buffer)); - buffer[sizeof(buffer)-1] = 0; - dev_info(zd_chip_dev(chip), "%s\n", buffer); -} - -/* Read a variable number of 32-bit values. Parameter count is not allowed to - * exceed USB_MAX_IOREAD32_COUNT. - */ -int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr, - unsigned int count) -{ - int r; - int i; - zd_addr_t *a16 = (zd_addr_t *)NULL; - u16 *v16; - unsigned int count16; - - if (count > USB_MAX_IOREAD32_COUNT) - return -EINVAL; - - /* Allocate a single memory block for values and addresses. */ - count16 = 2*count; - a16 = (zd_addr_t *)kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), - GFP_NOFS); - if (!a16) { - dev_dbg_f(zd_chip_dev(chip), - "error ENOMEM in allocation of a16\n"); - r = -ENOMEM; - goto out; - } - v16 = (u16 *)(a16 + count16); - - for (i = 0; i < count; i++) { - int j = 2*i; - /* We read the high word always first. */ - a16[j] = zd_inc_word(addr[i]); - a16[j+1] = addr[i]; - } - - r = zd_ioread16v_locked(chip, v16, a16, count16); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error: zd_ioread16v_locked. Error number %d\n", r); - goto out; - } - - for (i = 0; i < count; i++) { - int j = 2*i; - values[i] = (v16[j] << 16) | v16[j+1]; - } - -out: - kfree((void *)a16); - return r; -} - -int _zd_iowrite32v_locked(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, - unsigned int count) -{ - int i, j, r; - struct zd_ioreq16 *ioreqs16; - unsigned int count16; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - - if (count == 0) - return 0; - if (count > USB_MAX_IOWRITE32_COUNT) - return -EINVAL; - - /* Allocate a single memory block for values and addresses. */ - count16 = 2*count; - ioreqs16 = kmalloc(count16 * sizeof(struct zd_ioreq16), GFP_NOFS); - if (!ioreqs16) { - r = -ENOMEM; - dev_dbg_f(zd_chip_dev(chip), - "error %d in ioreqs16 allocation\n", r); - goto out; - } - - for (i = 0; i < count; i++) { - j = 2*i; - /* We write the high word always first. */ - ioreqs16[j].value = ioreqs[i].value >> 16; - ioreqs16[j].addr = zd_inc_word(ioreqs[i].addr); - ioreqs16[j+1].value = ioreqs[i].value; - ioreqs16[j+1].addr = ioreqs[i].addr; - } - - r = zd_usb_iowrite16v(&chip->usb, ioreqs16, count16); -#ifdef DEBUG - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error %d in zd_usb_write16v\n", r); - } -#endif /* DEBUG */ -out: - kfree(ioreqs16); - return r; -} - -int zd_iowrite16a_locked(struct zd_chip *chip, - const struct zd_ioreq16 *ioreqs, unsigned int count) -{ - int r; - unsigned int i, j, t, max; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - for (i = 0; i < count; i += j + t) { - t = 0; - max = count-i; - if (max > USB_MAX_IOWRITE16_COUNT) - max = USB_MAX_IOWRITE16_COUNT; - for (j = 0; j < max; j++) { - if (!ioreqs[i+j].addr) { - t = 1; - break; - } - } - - r = zd_usb_iowrite16v(&chip->usb, &ioreqs[i], j); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error zd_usb_iowrite16v. Error number %d\n", - r); - return r; - } - } - - return 0; -} - -/* Writes a variable number of 32 bit registers. The functions will split - * that in several USB requests. A split can be forced by inserting an IO - * request with an zero address field. - */ -int zd_iowrite32a_locked(struct zd_chip *chip, - const struct zd_ioreq32 *ioreqs, unsigned int count) -{ - int r; - unsigned int i, j, t, max; - - for (i = 0; i < count; i += j + t) { - t = 0; - max = count-i; - if (max > USB_MAX_IOWRITE32_COUNT) - max = USB_MAX_IOWRITE32_COUNT; - for (j = 0; j < max; j++) { - if (!ioreqs[i+j].addr) { - t = 1; - break; - } - } - - r = _zd_iowrite32v_locked(chip, &ioreqs[i], j); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error _zd_iowrite32v_locked." - " Error number %d\n", r); - return r; - } - } - - return 0; -} - -int zd_ioread16(struct zd_chip *chip, zd_addr_t addr, u16 *value) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_ioread16_locked(chip, value, addr); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_ioread32(struct zd_chip *chip, zd_addr_t addr, u32 *value) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_ioread32_locked(chip, value, addr); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_iowrite16(struct zd_chip *chip, zd_addr_t addr, u16 value) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_iowrite16_locked(chip, value, addr); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_iowrite32(struct zd_chip *chip, zd_addr_t addr, u32 value) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_iowrite32_locked(chip, value, addr); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_ioread32v(struct zd_chip *chip, const zd_addr_t *addresses, - u32 *values, unsigned int count) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_ioread32v_locked(chip, values, addresses, count); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_iowrite32a(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, - unsigned int count) -{ - int r; - - ZD_ASSERT(!mutex_is_locked(&chip->mutex)); - mutex_lock(&chip->mutex); - r = zd_iowrite32a_locked(chip, ioreqs, count); - mutex_unlock(&chip->mutex); - return r; -} - -static int read_pod(struct zd_chip *chip, u8 *rf_type) -{ - int r; - u32 value; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_ioread32_locked(chip, &value, E2P_POD); - if (r) - goto error; - dev_dbg_f(zd_chip_dev(chip), "E2P_POD %#010x\n", value); - - /* FIXME: AL2230 handling (Bit 7 in POD) */ - *rf_type = value & 0x0f; - chip->pa_type = (value >> 16) & 0x0f; - chip->patch_cck_gain = (value >> 8) & 0x1; - chip->patch_cr157 = (value >> 13) & 0x1; - chip->patch_6m_band_edge = (value >> 21) & 0x1; - - dev_dbg_f(zd_chip_dev(chip), - "RF %s %#01x PA type %#01x patch CCK %d patch CR157 %d " - "patch 6M %d\n", - zd_rf_name(*rf_type), *rf_type, - chip->pa_type, chip->patch_cck_gain, - chip->patch_cr157, chip->patch_6m_band_edge); - return 0; -error: - *rf_type = 0; - chip->pa_type = 0; - chip->patch_cck_gain = 0; - chip->patch_cr157 = 0; - chip->patch_6m_band_edge = 0; - return r; -} - -static int _read_mac_addr(struct zd_chip *chip, u8 *mac_addr, - const zd_addr_t *addr) -{ - int r; - u32 parts[2]; - - r = zd_ioread32v_locked(chip, parts, (const zd_addr_t *)addr, 2); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error: couldn't read e2p macs. Error number %d\n", r); - return r; - } - - mac_addr[0] = parts[0]; - mac_addr[1] = parts[0] >> 8; - mac_addr[2] = parts[0] >> 16; - mac_addr[3] = parts[0] >> 24; - mac_addr[4] = parts[1]; - mac_addr[5] = parts[1] >> 8; - - return 0; -} - -static int read_e2p_mac_addr(struct zd_chip *chip) -{ - static const zd_addr_t addr[2] = { E2P_MAC_ADDR_P1, E2P_MAC_ADDR_P2 }; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return _read_mac_addr(chip, chip->e2p_mac, (const zd_addr_t *)addr); -} - -/* MAC address: if custom mac addresses are to to be used CR_MAC_ADDR_P1 and - * CR_MAC_ADDR_P2 must be overwritten - */ -void zd_get_e2p_mac_addr(struct zd_chip *chip, u8 *mac_addr) -{ - mutex_lock(&chip->mutex); - memcpy(mac_addr, chip->e2p_mac, ETH_ALEN); - mutex_unlock(&chip->mutex); -} - -static int read_mac_addr(struct zd_chip *chip, u8 *mac_addr) -{ - static const zd_addr_t addr[2] = { CR_MAC_ADDR_P1, CR_MAC_ADDR_P2 }; - return _read_mac_addr(chip, mac_addr, (const zd_addr_t *)addr); -} - -int zd_read_mac_addr(struct zd_chip *chip, u8 *mac_addr) -{ - int r; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - mutex_lock(&chip->mutex); - r = read_mac_addr(chip, mac_addr); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr) -{ - int r; - struct zd_ioreq32 reqs[2] = { - [0] = { .addr = CR_MAC_ADDR_P1 }, - [1] = { .addr = CR_MAC_ADDR_P2 }, - }; - - reqs[0].value = (mac_addr[3] << 24) - | (mac_addr[2] << 16) - | (mac_addr[1] << 8) - | mac_addr[0]; - reqs[1].value = (mac_addr[5] << 8) - | mac_addr[4]; - - dev_dbg_f(zd_chip_dev(chip), - "mac addr " MAC_FMT "\n", MAC_ARG(mac_addr)); - - mutex_lock(&chip->mutex); - r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs)); -#ifdef DEBUG - { - u8 tmp[ETH_ALEN]; - read_mac_addr(chip, tmp); - } -#endif /* DEBUG */ - mutex_unlock(&chip->mutex); - return r; -} - -int zd_read_regdomain(struct zd_chip *chip, u8 *regdomain) -{ - int r; - u32 value; - - mutex_lock(&chip->mutex); - r = zd_ioread32_locked(chip, &value, E2P_SUBID); - mutex_unlock(&chip->mutex); - if (r) - return r; - - *regdomain = value >> 16; - dev_dbg_f(zd_chip_dev(chip), "regdomain: %#04x\n", *regdomain); - - return 0; -} - -static int read_values(struct zd_chip *chip, u8 *values, size_t count, - zd_addr_t e2p_addr, u32 guard) -{ - int r; - int i; - u32 v; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - for (i = 0;;) { - r = zd_ioread32_locked(chip, &v, e2p_addr+i/2); - if (r) - return r; - v -= guard; - if (i+4 < count) { - values[i++] = v; - values[i++] = v >> 8; - values[i++] = v >> 16; - values[i++] = v >> 24; - continue; - } - for (;i < count; i++) - values[i] = v >> (8*(i%3)); - return 0; - } -} - -static int read_pwr_cal_values(struct zd_chip *chip) -{ - return read_values(chip, chip->pwr_cal_values, - E2P_CHANNEL_COUNT, E2P_PWR_CAL_VALUE1, - 0); -} - -static int read_pwr_int_values(struct zd_chip *chip) -{ - return read_values(chip, chip->pwr_int_values, - E2P_CHANNEL_COUNT, E2P_PWR_INT_VALUE1, - E2P_PWR_INT_GUARD); -} - -static int read_ofdm_cal_values(struct zd_chip *chip) -{ - int r; - int i; - static const zd_addr_t addresses[] = { - E2P_36M_CAL_VALUE1, - E2P_48M_CAL_VALUE1, - E2P_54M_CAL_VALUE1, - }; - - for (i = 0; i < 3; i++) { - r = read_values(chip, chip->ofdm_cal_values[i], - E2P_CHANNEL_COUNT, addresses[i], 0); - if (r) - return r; - } - return 0; -} - -static int read_cal_int_tables(struct zd_chip *chip) -{ - int r; - - r = read_pwr_cal_values(chip); - if (r) - return r; - r = read_pwr_int_values(chip); - if (r) - return r; - r = read_ofdm_cal_values(chip); - if (r) - return r; - return 0; -} - -/* phy means physical registers */ -int zd_chip_lock_phy_regs(struct zd_chip *chip) -{ - int r; - u32 tmp; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_ioread32_locked(chip, &tmp, CR_REG1); - if (r) { - dev_err(zd_chip_dev(chip), "error ioread32(CR_REG1): %d\n", r); - return r; - } - - dev_dbg_f(zd_chip_dev(chip), - "CR_REG1: 0x%02x -> 0x%02x\n", tmp, tmp & ~UNLOCK_PHY_REGS); - tmp &= ~UNLOCK_PHY_REGS; - - r = zd_iowrite32_locked(chip, tmp, CR_REG1); - if (r) - dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); - return r; -} - -int zd_chip_unlock_phy_regs(struct zd_chip *chip) -{ - int r; - u32 tmp; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_ioread32_locked(chip, &tmp, CR_REG1); - if (r) { - dev_err(zd_chip_dev(chip), - "error ioread32(CR_REG1): %d\n", r); - return r; - } - - dev_dbg_f(zd_chip_dev(chip), - "CR_REG1: 0x%02x -> 0x%02x\n", tmp, tmp | UNLOCK_PHY_REGS); - tmp |= UNLOCK_PHY_REGS; - - r = zd_iowrite32_locked(chip, tmp, CR_REG1); - if (r) - dev_err(zd_chip_dev(chip), "error iowrite32(CR_REG1): %d\n", r); - return r; -} - -/* CR157 can be optionally patched by the EEPROM */ -static int patch_cr157(struct zd_chip *chip) -{ - int r; - u32 value; - - if (!chip->patch_cr157) - return 0; - - r = zd_ioread32_locked(chip, &value, E2P_PHY_REG); - if (r) - return r; - - dev_dbg_f(zd_chip_dev(chip), "patching value %x\n", value >> 8); - return zd_iowrite32_locked(chip, value >> 8, CR157); -} - -/* - * 6M band edge can be optionally overwritten for certain RF's - * Vendor driver says: for FCC regulation, enabled per HWFeature 6M band edge - * bit (for AL2230, AL2230S) - */ -static int patch_6m_band_edge(struct zd_chip *chip, int channel) -{ - struct zd_ioreq16 ioreqs[] = { - { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, - { CR47, 0x1e }, - }; - - if (!chip->patch_6m_band_edge || !chip->rf.patch_6m_band_edge) - return 0; - - /* FIXME: Channel 11 is not the edge for all regulatory domains. */ - if (channel == 1 || channel == 11) - ioreqs[0].value = 0x12; - - dev_dbg_f(zd_chip_dev(chip), "patching for channel %d\n", channel); - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int zd1211_hw_reset_phy(struct zd_chip *chip) -{ - static const struct zd_ioreq16 ioreqs[] = { - { CR0, 0x0a }, { CR1, 0x06 }, { CR2, 0x26 }, - { CR3, 0x38 }, { CR4, 0x80 }, { CR9, 0xa0 }, - { CR10, 0x81 }, { CR11, 0x00 }, { CR12, 0x7f }, - { CR13, 0x8c }, { CR14, 0x80 }, { CR15, 0x3d }, - { CR16, 0x20 }, { CR17, 0x1e }, { CR18, 0x0a }, - { CR19, 0x48 }, { CR20, 0x0c }, { CR21, 0x0c }, - { CR22, 0x23 }, { CR23, 0x90 }, { CR24, 0x14 }, - { CR25, 0x40 }, { CR26, 0x10 }, { CR27, 0x19 }, - { CR28, 0x7f }, { CR29, 0x80 }, { CR30, 0x4b }, - { CR31, 0x60 }, { CR32, 0x43 }, { CR33, 0x08 }, - { CR34, 0x06 }, { CR35, 0x0a }, { CR36, 0x00 }, - { CR37, 0x00 }, { CR38, 0x38 }, { CR39, 0x0c }, - { CR40, 0x84 }, { CR41, 0x2a }, { CR42, 0x80 }, - { CR43, 0x10 }, { CR44, 0x12 }, { CR46, 0xff }, - { CR47, 0x1E }, { CR48, 0x26 }, { CR49, 0x5b }, - { CR64, 0xd0 }, { CR65, 0x04 }, { CR66, 0x58 }, - { CR67, 0xc9 }, { CR68, 0x88 }, { CR69, 0x41 }, - { CR70, 0x23 }, { CR71, 0x10 }, { CR72, 0xff }, - { CR73, 0x32 }, { CR74, 0x30 }, { CR75, 0x65 }, - { CR76, 0x41 }, { CR77, 0x1b }, { CR78, 0x30 }, - { CR79, 0x68 }, { CR80, 0x64 }, { CR81, 0x64 }, - { CR82, 0x00 }, { CR83, 0x00 }, { CR84, 0x00 }, - { CR85, 0x02 }, { CR86, 0x00 }, { CR87, 0x00 }, - { CR88, 0xff }, { CR89, 0xfc }, { CR90, 0x00 }, - { CR91, 0x00 }, { CR92, 0x00 }, { CR93, 0x08 }, - { CR94, 0x00 }, { CR95, 0x00 }, { CR96, 0xff }, - { CR97, 0xe7 }, { CR98, 0x00 }, { CR99, 0x00 }, - { CR100, 0x00 }, { CR101, 0xae }, { CR102, 0x02 }, - { CR103, 0x00 }, { CR104, 0x03 }, { CR105, 0x65 }, - { CR106, 0x04 }, { CR107, 0x00 }, { CR108, 0x0a }, - { CR109, 0xaa }, { CR110, 0xaa }, { CR111, 0x25 }, - { CR112, 0x25 }, { CR113, 0x00 }, { CR119, 0x1e }, - { CR125, 0x90 }, { CR126, 0x00 }, { CR127, 0x00 }, - { }, - { CR5, 0x00 }, { CR6, 0x00 }, { CR7, 0x00 }, - { CR8, 0x00 }, { CR9, 0x20 }, { CR12, 0xf0 }, - { CR20, 0x0e }, { CR21, 0x0e }, { CR27, 0x10 }, - { CR44, 0x33 }, { CR47, 0x1E }, { CR83, 0x24 }, - { CR84, 0x04 }, { CR85, 0x00 }, { CR86, 0x0C }, - { CR87, 0x12 }, { CR88, 0x0C }, { CR89, 0x00 }, - { CR90, 0x10 }, { CR91, 0x08 }, { CR93, 0x00 }, - { CR94, 0x01 }, { CR95, 0x00 }, { CR96, 0x50 }, - { CR97, 0x37 }, { CR98, 0x35 }, { CR101, 0x13 }, - { CR102, 0x27 }, { CR103, 0x27 }, { CR104, 0x18 }, - { CR105, 0x12 }, { CR109, 0x27 }, { CR110, 0x27 }, - { CR111, 0x27 }, { CR112, 0x27 }, { CR113, 0x27 }, - { CR114, 0x27 }, { CR115, 0x26 }, { CR116, 0x24 }, - { CR117, 0xfc }, { CR118, 0xfa }, { CR120, 0x4f }, - { CR123, 0x27 }, { CR125, 0xaa }, { CR127, 0x03 }, - { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, - { CR131, 0x0C }, { CR136, 0xdf }, { CR137, 0x40 }, - { CR138, 0xa0 }, { CR139, 0xb0 }, { CR140, 0x99 }, - { CR141, 0x82 }, { CR142, 0x54 }, { CR143, 0x1c }, - { CR144, 0x6c }, { CR147, 0x07 }, { CR148, 0x4c }, - { CR149, 0x50 }, { CR150, 0x0e }, { CR151, 0x18 }, - { CR160, 0xfe }, { CR161, 0xee }, { CR162, 0xaa }, - { CR163, 0xfa }, { CR164, 0xfa }, { CR165, 0xea }, - { CR166, 0xbe }, { CR167, 0xbe }, { CR168, 0x6a }, - { CR169, 0xba }, { CR170, 0xba }, { CR171, 0xba }, - /* Note: CR204 must lead the CR203 */ - { CR204, 0x7d }, - { }, - { CR203, 0x30 }, - }; - - int r, t; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - - r = zd_chip_lock_phy_regs(chip); - if (r) - goto out; - - r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) - goto unlock; - - r = patch_cr157(chip); -unlock: - t = zd_chip_unlock_phy_regs(chip); - if (t && !r) - r = t; -out: - return r; -} - -static int zd1211b_hw_reset_phy(struct zd_chip *chip) -{ - static const struct zd_ioreq16 ioreqs[] = { - { CR0, 0x14 }, { CR1, 0x06 }, { CR2, 0x26 }, - { CR3, 0x38 }, { CR4, 0x80 }, { CR9, 0xe0 }, - { CR10, 0x81 }, - /* power control { { CR11, 1 << 6 }, */ - { CR11, 0x00 }, - { CR12, 0xf0 }, { CR13, 0x8c }, { CR14, 0x80 }, - { CR15, 0x3d }, { CR16, 0x20 }, { CR17, 0x1e }, - { CR18, 0x0a }, { CR19, 0x48 }, - { CR20, 0x10 }, /* Org:0x0E, ComTrend:RalLink AP */ - { CR21, 0x0e }, { CR22, 0x23 }, { CR23, 0x90 }, - { CR24, 0x14 }, { CR25, 0x40 }, { CR26, 0x10 }, - { CR27, 0x10 }, { CR28, 0x7f }, { CR29, 0x80 }, - { CR30, 0x4b }, /* ASIC/FWT, no jointly decoder */ - { CR31, 0x60 }, { CR32, 0x43 }, { CR33, 0x08 }, - { CR34, 0x06 }, { CR35, 0x0a }, { CR36, 0x00 }, - { CR37, 0x00 }, { CR38, 0x38 }, { CR39, 0x0c }, - { CR40, 0x84 }, { CR41, 0x2a }, { CR42, 0x80 }, - { CR43, 0x10 }, { CR44, 0x33 }, { CR46, 0xff }, - { CR47, 0x1E }, { CR48, 0x26 }, { CR49, 0x5b }, - { CR64, 0xd0 }, { CR65, 0x04 }, { CR66, 0x58 }, - { CR67, 0xc9 }, { CR68, 0x88 }, { CR69, 0x41 }, - { CR70, 0x23 }, { CR71, 0x10 }, { CR72, 0xff }, - { CR73, 0x32 }, { CR74, 0x30 }, { CR75, 0x65 }, - { CR76, 0x41 }, { CR77, 0x1b }, { CR78, 0x30 }, - { CR79, 0xf0 }, { CR80, 0x64 }, { CR81, 0x64 }, - { CR82, 0x00 }, { CR83, 0x24 }, { CR84, 0x04 }, - { CR85, 0x00 }, { CR86, 0x0c }, { CR87, 0x12 }, - { CR88, 0x0c }, { CR89, 0x00 }, { CR90, 0x58 }, - { CR91, 0x04 }, { CR92, 0x00 }, { CR93, 0x00 }, - { CR94, 0x01 }, - { CR95, 0x20 }, /* ZD1211B */ - { CR96, 0x50 }, { CR97, 0x37 }, { CR98, 0x35 }, - { CR99, 0x00 }, { CR100, 0x01 }, { CR101, 0x13 }, - { CR102, 0x27 }, { CR103, 0x27 }, { CR104, 0x18 }, - { CR105, 0x12 }, { CR106, 0x04 }, { CR107, 0x00 }, - { CR108, 0x0a }, { CR109, 0x27 }, { CR110, 0x27 }, - { CR111, 0x27 }, { CR112, 0x27 }, { CR113, 0x27 }, - { CR114, 0x27 }, { CR115, 0x26 }, { CR116, 0x24 }, - { CR117, 0xfc }, { CR118, 0xfa }, { CR119, 0x1e }, - { CR125, 0x90 }, { CR126, 0x00 }, { CR127, 0x00 }, - { CR128, 0x14 }, { CR129, 0x12 }, { CR130, 0x10 }, - { CR131, 0x0c }, { CR136, 0xdf }, { CR137, 0xa0 }, - { CR138, 0xa8 }, { CR139, 0xb4 }, { CR140, 0x98 }, - { CR141, 0x82 }, { CR142, 0x53 }, { CR143, 0x1c }, - { CR144, 0x6c }, { CR147, 0x07 }, { CR148, 0x40 }, - { CR149, 0x40 }, /* Org:0x50 ComTrend:RalLink AP */ - { CR150, 0x14 }, /* Org:0x0E ComTrend:RalLink AP */ - { CR151, 0x18 }, { CR159, 0x70 }, { CR160, 0xfe }, - { CR161, 0xee }, { CR162, 0xaa }, { CR163, 0xfa }, - { CR164, 0xfa }, { CR165, 0xea }, { CR166, 0xbe }, - { CR167, 0xbe }, { CR168, 0x6a }, { CR169, 0xba }, - { CR170, 0xba }, { CR171, 0xba }, - /* Note: CR204 must lead the CR203 */ - { CR204, 0x7d }, - {}, - { CR203, 0x30 }, - }; - - int r, t; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - - r = zd_chip_lock_phy_regs(chip); - if (r) - goto out; - - r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) - goto unlock; - - r = patch_cr157(chip); -unlock: - t = zd_chip_unlock_phy_regs(chip); - if (t && !r) - r = t; -out: - return r; -} - -static int hw_reset_phy(struct zd_chip *chip) -{ - return chip->is_zd1211b ? zd1211b_hw_reset_phy(chip) : - zd1211_hw_reset_phy(chip); -} - -static int zd1211_hw_init_hmac(struct zd_chip *chip) -{ - static const struct zd_ioreq32 ioreqs[] = { - { CR_ACK_TIMEOUT_EXT, 0x20 }, - { CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, - { CR_ZD1211_RETRY_MAX, 0x2 }, - { CR_SNIFFER_ON, 0 }, - { CR_RX_FILTER, STA_RX_FILTER }, - { CR_GROUP_HASH_P1, 0x00 }, - { CR_GROUP_HASH_P2, 0x80000000 }, - { CR_REG1, 0xa4 }, - { CR_ADDA_PWR_DWN, 0x7f }, - { CR_BCN_PLCP_CFG, 0x00f00401 }, - { CR_PHY_DELAY, 0x00 }, - { CR_ACK_TIMEOUT_EXT, 0x80 }, - { CR_ADDA_PWR_DWN, 0x00 }, - { CR_ACK_TIME_80211, 0x100 }, - { CR_IFS_VALUE, 0x547c032 }, - { CR_RX_PE_DELAY, 0x70 }, - { CR_PS_CTRL, 0x10000000 }, - { CR_RTS_CTS_RATE, 0x02030203 }, - { CR_RX_THRESHOLD, 0x000c0640 }, - { CR_AFTER_PNP, 0x1 }, - { CR_WEP_PROTECT, 0x114 }, - }; - - int r; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -#ifdef DEBUG - if (r) { - dev_err(zd_chip_dev(chip), - "error in zd_iowrite32a_locked. Error number %d\n", r); - } -#endif /* DEBUG */ - return r; -} - -static int zd1211b_hw_init_hmac(struct zd_chip *chip) -{ - static const struct zd_ioreq32 ioreqs[] = { - { CR_ACK_TIMEOUT_EXT, 0x20 }, - { CR_ADDA_MBIAS_WARMTIME, 0x30000808 }, - { CR_ZD1211B_RETRY_MAX, 0x02020202 }, - { CR_ZD1211B_TX_PWR_CTL4, 0x007f003f }, - { CR_ZD1211B_TX_PWR_CTL3, 0x007f003f }, - { CR_ZD1211B_TX_PWR_CTL2, 0x003f001f }, - { CR_ZD1211B_TX_PWR_CTL1, 0x001f000f }, - { CR_ZD1211B_AIFS_CTL1, 0x00280028 }, - { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, - { CR_ZD1211B_TXOP, 0x01800824 }, - { CR_SNIFFER_ON, 0 }, - { CR_RX_FILTER, STA_RX_FILTER }, - { CR_GROUP_HASH_P1, 0x00 }, - { CR_GROUP_HASH_P2, 0x80000000 }, - { CR_REG1, 0xa4 }, - { CR_ADDA_PWR_DWN, 0x7f }, - { CR_BCN_PLCP_CFG, 0x00f00401 }, - { CR_PHY_DELAY, 0x00 }, - { CR_ACK_TIMEOUT_EXT, 0x80 }, - { CR_ADDA_PWR_DWN, 0x00 }, - { CR_ACK_TIME_80211, 0x100 }, - { CR_IFS_VALUE, 0x547c032 }, - { CR_RX_PE_DELAY, 0x70 }, - { CR_PS_CTRL, 0x10000000 }, - { CR_RTS_CTS_RATE, 0x02030203 }, - { CR_RX_THRESHOLD, 0x000c0640 }, - { CR_AFTER_PNP, 0x1 }, - { CR_WEP_PROTECT, 0x114 }, - }; - - int r; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error in zd_iowrite32a_locked. Error number %d\n", r); - } - return r; -} - -static int hw_init_hmac(struct zd_chip *chip) -{ - return chip->is_zd1211b ? - zd1211b_hw_init_hmac(chip) : zd1211_hw_init_hmac(chip); -} - -struct aw_pt_bi { - u32 atim_wnd_period; - u32 pre_tbtt; - u32 beacon_interval; -}; - -static int get_aw_pt_bi(struct zd_chip *chip, struct aw_pt_bi *s) -{ - int r; - static const zd_addr_t aw_pt_bi_addr[] = - { CR_ATIM_WND_PERIOD, CR_PRE_TBTT, CR_BCN_INTERVAL }; - u32 values[3]; - - r = zd_ioread32v_locked(chip, values, (const zd_addr_t *)aw_pt_bi_addr, - ARRAY_SIZE(aw_pt_bi_addr)); - if (r) { - memset(s, 0, sizeof(*s)); - return r; - } - - s->atim_wnd_period = values[0]; - s->pre_tbtt = values[1]; - s->beacon_interval = values[2]; - dev_dbg_f(zd_chip_dev(chip), "aw %u pt %u bi %u\n", - s->atim_wnd_period, s->pre_tbtt, s->beacon_interval); - return 0; -} - -static int set_aw_pt_bi(struct zd_chip *chip, struct aw_pt_bi *s) -{ - struct zd_ioreq32 reqs[3]; - - if (s->beacon_interval <= 5) - s->beacon_interval = 5; - if (s->pre_tbtt < 4 || s->pre_tbtt >= s->beacon_interval) - s->pre_tbtt = s->beacon_interval - 1; - if (s->atim_wnd_period >= s->pre_tbtt) - s->atim_wnd_period = s->pre_tbtt - 1; - - reqs[0].addr = CR_ATIM_WND_PERIOD; - reqs[0].value = s->atim_wnd_period; - reqs[1].addr = CR_PRE_TBTT; - reqs[1].value = s->pre_tbtt; - reqs[2].addr = CR_BCN_INTERVAL; - reqs[2].value = s->beacon_interval; - - dev_dbg_f(zd_chip_dev(chip), - "aw %u pt %u bi %u\n", s->atim_wnd_period, s->pre_tbtt, - s->beacon_interval); - return zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs)); -} - - -static int set_beacon_interval(struct zd_chip *chip, u32 interval) -{ - int r; - struct aw_pt_bi s; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = get_aw_pt_bi(chip, &s); - if (r) - return r; - s.beacon_interval = interval; - return set_aw_pt_bi(chip, &s); -} - -int zd_set_beacon_interval(struct zd_chip *chip, u32 interval) -{ - int r; - - mutex_lock(&chip->mutex); - r = set_beacon_interval(chip, interval); - mutex_unlock(&chip->mutex); - return r; -} - -static int hw_init(struct zd_chip *chip) -{ - int r; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = hw_reset_phy(chip); - if (r) - return r; - - r = hw_init_hmac(chip); - if (r) - return r; - r = set_beacon_interval(chip, 100); - if (r) - return r; - return 0; -} - -#ifdef DEBUG -static int dump_cr(struct zd_chip *chip, const zd_addr_t addr, - const char *addr_string) -{ - int r; - u32 value; - - r = zd_ioread32_locked(chip, &value, addr); - if (r) { - dev_dbg_f(zd_chip_dev(chip), - "error reading %s. Error number %d\n", addr_string, r); - return r; - } - - dev_dbg_f(zd_chip_dev(chip), "%s %#010x\n", - addr_string, (unsigned int)value); - return 0; -} - -static int test_init(struct zd_chip *chip) -{ - int r; - - r = dump_cr(chip, CR_AFTER_PNP, "CR_AFTER_PNP"); - if (r) - return r; - r = dump_cr(chip, CR_GPI_EN, "CR_GPI_EN"); - if (r) - return r; - return dump_cr(chip, CR_INTERRUPT, "CR_INTERRUPT"); -} - -static void dump_fw_registers(struct zd_chip *chip) -{ - static const zd_addr_t addr[4] = { - FW_FIRMWARE_VER, FW_USB_SPEED, FW_FIX_TX_RATE, - FW_LINK_STATUS - }; - - int r; - u16 values[4]; - - r = zd_ioread16v_locked(chip, values, (const zd_addr_t*)addr, - ARRAY_SIZE(addr)); - if (r) { - dev_dbg_f(zd_chip_dev(chip), "error %d zd_ioread16v_locked\n", - r); - return; - } - - dev_dbg_f(zd_chip_dev(chip), "FW_FIRMWARE_VER %#06hx\n", values[0]); - dev_dbg_f(zd_chip_dev(chip), "FW_USB_SPEED %#06hx\n", values[1]); - dev_dbg_f(zd_chip_dev(chip), "FW_FIX_TX_RATE %#06hx\n", values[2]); - dev_dbg_f(zd_chip_dev(chip), "FW_LINK_STATUS %#06hx\n", values[3]); -} -#endif /* DEBUG */ - -static int print_fw_version(struct zd_chip *chip) -{ - int r; - u16 version; - - r = zd_ioread16_locked(chip, &version, FW_FIRMWARE_VER); - if (r) - return r; - - dev_info(zd_chip_dev(chip),"firmware version %04hx\n", version); - return 0; -} - -static int set_mandatory_rates(struct zd_chip *chip, enum ieee80211_std std) -{ - u32 rates; - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - /* This sets the mandatory rates, which only depend from the standard - * that the device is supporting. Until further notice we should try - * to support 802.11g also for full speed USB. - */ - switch (std) { - case IEEE80211B: - rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M; - break; - case IEEE80211G: - rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M| - CR_RATE_6M|CR_RATE_12M|CR_RATE_24M; - break; - default: - return -EINVAL; - } - return zd_iowrite32_locked(chip, rates, CR_MANDATORY_RATE_TBL); -} - -int zd_chip_enable_hwint(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = zd_iowrite32_locked(chip, HWINT_ENABLED, CR_INTERRUPT); - mutex_unlock(&chip->mutex); - return r; -} - -static int disable_hwint(struct zd_chip *chip) -{ - return zd_iowrite32_locked(chip, HWINT_DISABLED, CR_INTERRUPT); -} - -int zd_chip_disable_hwint(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = disable_hwint(chip); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_chip_init_hw(struct zd_chip *chip, u8 device_type) -{ - int r; - u8 rf_type; - - dev_dbg_f(zd_chip_dev(chip), "\n"); - - mutex_lock(&chip->mutex); - chip->is_zd1211b = (device_type == DEVICE_ZD1211B) != 0; - -#ifdef DEBUG - r = test_init(chip); - if (r) - goto out; -#endif - r = zd_iowrite32_locked(chip, 1, CR_AFTER_PNP); - if (r) - goto out; - - r = zd_usb_init_hw(&chip->usb); - if (r) - goto out; - - /* GPI is always disabled, also in the other driver. - */ - r = zd_iowrite32_locked(chip, 0, CR_GPI_EN); - if (r) - goto out; - r = zd_iowrite32_locked(chip, CWIN_SIZE, CR_CWMIN_CWMAX); - if (r) - goto out; - /* Currently we support IEEE 802.11g for full and high speed USB. - * It might be discussed, whether we should suppport pure b mode for - * full speed USB. - */ - r = set_mandatory_rates(chip, IEEE80211G); - if (r) - goto out; - /* Disabling interrupts is certainly a smart thing here. - */ - r = disable_hwint(chip); - if (r) - goto out; - r = read_pod(chip, &rf_type); - if (r) - goto out; - r = hw_init(chip); - if (r) - goto out; - r = zd_rf_init_hw(&chip->rf, rf_type); - if (r) - goto out; - - r = print_fw_version(chip); - if (r) - goto out; - -#ifdef DEBUG - dump_fw_registers(chip); - r = test_init(chip); - if (r) - goto out; -#endif /* DEBUG */ - - r = read_e2p_mac_addr(chip); - if (r) - goto out; - - r = read_cal_int_tables(chip); - if (r) - goto out; - - print_id(chip); -out: - mutex_unlock(&chip->mutex); - return r; -} - -static int update_pwr_int(struct zd_chip *chip, u8 channel) -{ - u8 value = chip->pwr_int_values[channel - 1]; - dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_int %#04x\n", - channel, value); - return zd_iowrite32_locked(chip, value, CR31); -} - -static int update_pwr_cal(struct zd_chip *chip, u8 channel) -{ - u8 value = chip->pwr_cal_values[channel-1]; - dev_dbg_f(zd_chip_dev(chip), "channel %d pwr_cal %#04x\n", - channel, value); - return zd_iowrite32_locked(chip, value, CR68); -} - -static int update_ofdm_cal(struct zd_chip *chip, u8 channel) -{ - struct zd_ioreq32 ioreqs[3]; - - ioreqs[0].addr = CR67; - ioreqs[0].value = chip->ofdm_cal_values[OFDM_36M_INDEX][channel-1]; - ioreqs[1].addr = CR66; - ioreqs[1].value = chip->ofdm_cal_values[OFDM_48M_INDEX][channel-1]; - ioreqs[2].addr = CR65; - ioreqs[2].value = chip->ofdm_cal_values[OFDM_54M_INDEX][channel-1]; - - dev_dbg_f(zd_chip_dev(chip), - "channel %d ofdm_cal 36M %#04x 48M %#04x 54M %#04x\n", - channel, ioreqs[0].value, ioreqs[1].value, ioreqs[2].value); - return zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int update_channel_integration_and_calibration(struct zd_chip *chip, - u8 channel) -{ - int r; - - r = update_pwr_int(chip, channel); - if (r) - return r; - if (chip->is_zd1211b) { - static const struct zd_ioreq32 ioreqs[] = { - { CR69, 0x28 }, - {}, - { CR69, 0x2a }, - }; - - r = update_ofdm_cal(chip, channel); - if (r) - return r; - r = update_pwr_cal(chip, channel); - if (r) - return r; - r = zd_iowrite32a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) - return r; - } - - return 0; -} - -/* The CCK baseband gain can be optionally patched by the EEPROM */ -static int patch_cck_gain(struct zd_chip *chip) -{ - int r; - u32 value; - - if (!chip->patch_cck_gain) - return 0; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_ioread32_locked(chip, &value, E2P_PHY_REG); - if (r) - return r; - dev_dbg_f(zd_chip_dev(chip), "patching value %x\n", value & 0xff); - return zd_iowrite32_locked(chip, value & 0xff, CR47); -} - -int zd_chip_set_channel(struct zd_chip *chip, u8 channel) -{ - int r, t; - - mutex_lock(&chip->mutex); - r = zd_chip_lock_phy_regs(chip); - if (r) - goto out; - r = zd_rf_set_channel(&chip->rf, channel); - if (r) - goto unlock; - r = update_channel_integration_and_calibration(chip, channel); - if (r) - goto unlock; - r = patch_cck_gain(chip); - if (r) - goto unlock; - r = patch_6m_band_edge(chip, channel); - if (r) - goto unlock; - r = zd_iowrite32_locked(chip, 0, CR_CONFIG_PHILIPS); -unlock: - t = zd_chip_unlock_phy_regs(chip); - if (t && !r) - r = t; -out: - mutex_unlock(&chip->mutex); - return r; -} - -u8 zd_chip_get_channel(struct zd_chip *chip) -{ - u8 channel; - - mutex_lock(&chip->mutex); - channel = chip->rf.channel; - mutex_unlock(&chip->mutex); - return channel; -} - -static u16 led_mask(int led) -{ - switch (led) { - case 1: - return LED1; - case 2: - return LED2; - default: - return 0; - } -} - -static int read_led_reg(struct zd_chip *chip, u16 *status) -{ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return zd_ioread16_locked(chip, status, CR_LED); -} - -static int write_led_reg(struct zd_chip *chip, u16 status) -{ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return zd_iowrite16_locked(chip, status, CR_LED); -} - -int zd_chip_led_status(struct zd_chip *chip, int led, enum led_status status) -{ - int r, ret; - u16 mask = led_mask(led); - u16 reg; - - if (!mask) - return -EINVAL; - mutex_lock(&chip->mutex); - r = read_led_reg(chip, ®); - if (r) - return r; - switch (status) { - case LED_STATUS: - return (reg & mask) ? LED_ON : LED_OFF; - case LED_OFF: - reg &= ~mask; - ret = LED_OFF; - break; - case LED_FLIP: - reg ^= mask; - ret = (reg&mask) ? LED_ON : LED_OFF; - break; - case LED_ON: - reg |= mask; - ret = LED_ON; - break; - default: - return -EINVAL; - } - r = write_led_reg(chip, reg); - if (r) { - ret = r; - goto out; - } -out: - mutex_unlock(&chip->mutex); - return r; -} - -int zd_chip_led_flip(struct zd_chip *chip, int led, - const unsigned int *phases_msecs, unsigned int count) -{ - int i, r; - enum led_status status; - - r = zd_chip_led_status(chip, led, LED_STATUS); - if (r) - return r; - status = r; - for (i = 0; i < count; i++) { - r = zd_chip_led_status(chip, led, LED_FLIP); - if (r < 0) - goto out; - msleep(phases_msecs[i]); - } - -out: - zd_chip_led_status(chip, led, status); - return r; -} - -int zd_chip_set_basic_rates(struct zd_chip *chip, u16 cr_rates) -{ - int r; - - if (cr_rates & ~(CR_RATES_80211B|CR_RATES_80211G)) - return -EINVAL; - - mutex_lock(&chip->mutex); - r = zd_iowrite32_locked(chip, cr_rates, CR_BASIC_RATE_TBL); - mutex_unlock(&chip->mutex); - return r; -} - -static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size) -{ - static const u16 constants[] = { - 715, 655, 585, 540, 470, 410, 360, 315, - 270, 235, 205, 175, 150, 125, 105, 85, - 65, 50, 40, 25, 15 - }; - - int i; - u32 x; - - /* It seems that their quality parameter is somehow per signal - * and is now transferred per bit. - */ - switch (rate) { - case ZD_OFDM_RATE_6M: - case ZD_OFDM_RATE_12M: - case ZD_OFDM_RATE_24M: - size *= 2; - break; - case ZD_OFDM_RATE_9M: - case ZD_OFDM_RATE_18M: - case ZD_OFDM_RATE_36M: - case ZD_OFDM_RATE_54M: - size *= 4; - size /= 3; - break; - case ZD_OFDM_RATE_48M: - size *= 3; - size /= 2; - break; - default: - return -EINVAL; - } - - x = (10000 * status_quality)/size; - for (i = 0; i < ARRAY_SIZE(constants); i++) { - if (x > constants[i]) - break; - } - - switch (rate) { - case ZD_OFDM_RATE_6M: - case ZD_OFDM_RATE_9M: - i += 3; - break; - case ZD_OFDM_RATE_12M: - case ZD_OFDM_RATE_18M: - i += 5; - break; - case ZD_OFDM_RATE_24M: - case ZD_OFDM_RATE_36M: - i += 9; - break; - case ZD_OFDM_RATE_48M: - case ZD_OFDM_RATE_54M: - i += 15; - break; - default: - return -EINVAL; - } - - return i; -} - -static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size) -{ - int r; - - r = ofdm_qual_db(status_quality, rate, size); - ZD_ASSERT(r >= 0); - if (r < 0) - r = 0; - - r = (r * 100)/29; - return r <= 100 ? r : 100; -} - -static unsigned int log10times100(unsigned int x) -{ - static const u8 log10[] = { - 0, - 0, 30, 47, 60, 69, 77, 84, 90, 95, 100, - 104, 107, 111, 114, 117, 120, 123, 125, 127, 130, - 132, 134, 136, 138, 139, 141, 143, 144, 146, 147, - 149, 150, 151, 153, 154, 155, 156, 157, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 169, - 170, 171, 172, 173, 174, 174, 175, 176, 177, 177, - 178, 179, 179, 180, 181, 181, 182, 183, 183, 184, - 185, 185, 186, 186, 187, 188, 188, 189, 189, 190, - 190, 191, 191, 192, 192, 193, 193, 194, 194, 195, - 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, - 200, 200, 201, 201, 202, 202, 202, 203, 203, 204, - 204, 204, 205, 205, 206, 206, 206, 207, 207, 207, - 208, 208, 208, 209, 209, 210, 210, 210, 211, 211, - 211, 212, 212, 212, 213, 213, 213, 213, 214, 214, - 214, 215, 215, 215, 216, 216, 216, 217, 217, 217, - 217, 218, 218, 218, 219, 219, 219, 219, 220, 220, - 220, 220, 221, 221, 221, 222, 222, 222, 222, 223, - 223, 223, 223, 224, 224, 224, 224, - }; - - return x < ARRAY_SIZE(log10) ? log10[x] : 225; -} - -enum { - MAX_CCK_EVM_DB = 45, -}; - -static int cck_evm_db(u8 status_quality) -{ - return (20 * log10times100(status_quality)) / 100; -} - -static int cck_snr_db(u8 status_quality) -{ - int r = MAX_CCK_EVM_DB - cck_evm_db(status_quality); - ZD_ASSERT(r >= 0); - return r; -} - -static int cck_qual_percent(u8 status_quality) -{ - int r; - - r = cck_snr_db(status_quality); - r = (100*r)/17; - return r <= 100 ? r : 100; -} - -u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, - const struct rx_status *status) -{ - return (status->frame_status&ZD_RX_OFDM) ? - ofdm_qual_percent(status->signal_quality_ofdm, - zd_ofdm_plcp_header_rate(rx_frame), - size) : - cck_qual_percent(status->signal_quality_cck); -} - -u8 zd_rx_strength_percent(u8 rssi) -{ - int r = (rssi*100) / 41; - if (r > 100) - r = 100; - return (u8) r; -} - -u16 zd_rx_rate(const void *rx_frame, const struct rx_status *status) -{ - static const u16 ofdm_rates[] = { - [ZD_OFDM_RATE_6M] = 60, - [ZD_OFDM_RATE_9M] = 90, - [ZD_OFDM_RATE_12M] = 120, - [ZD_OFDM_RATE_18M] = 180, - [ZD_OFDM_RATE_24M] = 240, - [ZD_OFDM_RATE_36M] = 360, - [ZD_OFDM_RATE_48M] = 480, - [ZD_OFDM_RATE_54M] = 540, - }; - u16 rate; - if (status->frame_status & ZD_RX_OFDM) { - u8 ofdm_rate = zd_ofdm_plcp_header_rate(rx_frame); - rate = ofdm_rates[ofdm_rate & 0xf]; - } else { - u8 cck_rate = zd_cck_plcp_header_rate(rx_frame); - switch (cck_rate) { - case ZD_CCK_SIGNAL_1M: - rate = 10; - break; - case ZD_CCK_SIGNAL_2M: - rate = 20; - break; - case ZD_CCK_SIGNAL_5M5: - rate = 55; - break; - case ZD_CCK_SIGNAL_11M: - rate = 110; - break; - default: - rate = 0; - } - } - - return rate; -} - -int zd_chip_switch_radio_on(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = zd_switch_radio_on(&chip->rf); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_chip_switch_radio_off(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = zd_switch_radio_off(&chip->rf); - mutex_unlock(&chip->mutex); - return r; -} - -int zd_chip_enable_int(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = zd_usb_enable_int(&chip->usb); - mutex_unlock(&chip->mutex); - return r; -} - -void zd_chip_disable_int(struct zd_chip *chip) -{ - mutex_lock(&chip->mutex); - zd_usb_disable_int(&chip->usb); - mutex_unlock(&chip->mutex); -} - -int zd_chip_enable_rx(struct zd_chip *chip) -{ - int r; - - mutex_lock(&chip->mutex); - r = zd_usb_enable_rx(&chip->usb); - mutex_unlock(&chip->mutex); - return r; -} - -void zd_chip_disable_rx(struct zd_chip *chip) -{ - mutex_lock(&chip->mutex); - zd_usb_disable_rx(&chip->usb); - mutex_unlock(&chip->mutex); -} - -int zd_rfwritev_locked(struct zd_chip *chip, - const u32* values, unsigned int count, u8 bits) -{ - int r; - unsigned int i; - - for (i = 0; i < count; i++) { - r = zd_rfwrite_locked(chip, values[i], bits); - if (r) - return r; - } - - return 0; -} diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h deleted file mode 100644 index 069d2b467..000000000 --- a/drivers/net/wireless/zd1211rw/zd_chip.h +++ /dev/null @@ -1,827 +0,0 @@ -/* zd_chip.h - * - * 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 _ZD_CHIP_H -#define _ZD_CHIP_H - -#include "zd_types.h" -#include "zd_rf.h" -#include "zd_usb.h" - -/* Header for the Media Access Controller (MAC) and the Baseband Processor - * (BBP). It appears that the ZD1211 wraps the old ZD1205 with USB glue and - * adds a processor for handling the USB protocol. - */ - -/* 8-bit hardware registers */ -#define CR0 CTL_REG(0x0000) -#define CR1 CTL_REG(0x0004) -#define CR2 CTL_REG(0x0008) -#define CR3 CTL_REG(0x000C) - -#define CR5 CTL_REG(0x0010) -/* bit 5: if set short preamble used - * bit 6: filter band - Japan channel 14 on, else off - */ -#define CR6 CTL_REG(0x0014) -#define CR7 CTL_REG(0x0018) -#define CR8 CTL_REG(0x001C) - -#define CR4 CTL_REG(0x0020) - -#define CR9 CTL_REG(0x0024) -/* bit 2: antenna switch (together with CR10) */ -#define CR10 CTL_REG(0x0028) -/* bit 1: antenna switch (together with CR9) - * RF2959 controls with CR11 radion on and off - */ -#define CR11 CTL_REG(0x002C) -/* bit 6: TX power control for OFDM - * RF2959 controls with CR10 radio on and off - */ -#define CR12 CTL_REG(0x0030) -#define CR13 CTL_REG(0x0034) -#define CR14 CTL_REG(0x0038) -#define CR15 CTL_REG(0x003C) -#define CR16 CTL_REG(0x0040) -#define CR17 CTL_REG(0x0044) -#define CR18 CTL_REG(0x0048) -#define CR19 CTL_REG(0x004C) -#define CR20 CTL_REG(0x0050) -#define CR21 CTL_REG(0x0054) -#define CR22 CTL_REG(0x0058) -#define CR23 CTL_REG(0x005C) -#define CR24 CTL_REG(0x0060) /* CCA threshold */ -#define CR25 CTL_REG(0x0064) -#define CR26 CTL_REG(0x0068) -#define CR27 CTL_REG(0x006C) -#define CR28 CTL_REG(0x0070) -#define CR29 CTL_REG(0x0074) -#define CR30 CTL_REG(0x0078) -#define CR31 CTL_REG(0x007C) /* TX power control for RF in CCK mode */ -#define CR32 CTL_REG(0x0080) -#define CR33 CTL_REG(0x0084) -#define CR34 CTL_REG(0x0088) -#define CR35 CTL_REG(0x008C) -#define CR36 CTL_REG(0x0090) -#define CR37 CTL_REG(0x0094) -#define CR38 CTL_REG(0x0098) -#define CR39 CTL_REG(0x009C) -#define CR40 CTL_REG(0x00A0) -#define CR41 CTL_REG(0x00A4) -#define CR42 CTL_REG(0x00A8) -#define CR43 CTL_REG(0x00AC) -#define CR44 CTL_REG(0x00B0) -#define CR45 CTL_REG(0x00B4) -#define CR46 CTL_REG(0x00B8) -#define CR47 CTL_REG(0x00BC) /* CCK baseband gain - * (patch value might be in EEPROM) - */ -#define CR48 CTL_REG(0x00C0) -#define CR49 CTL_REG(0x00C4) -#define CR50 CTL_REG(0x00C8) -#define CR51 CTL_REG(0x00CC) /* TX power control for RF in 6-36M modes */ -#define CR52 CTL_REG(0x00D0) /* TX power control for RF in 48M mode */ -#define CR53 CTL_REG(0x00D4) /* TX power control for RF in 54M mode */ -#define CR54 CTL_REG(0x00D8) -#define CR55 CTL_REG(0x00DC) -#define CR56 CTL_REG(0x00E0) -#define CR57 CTL_REG(0x00E4) -#define CR58 CTL_REG(0x00E8) -#define CR59 CTL_REG(0x00EC) -#define CR60 CTL_REG(0x00F0) -#define CR61 CTL_REG(0x00F4) -#define CR62 CTL_REG(0x00F8) -#define CR63 CTL_REG(0x00FC) -#define CR64 CTL_REG(0x0100) -#define CR65 CTL_REG(0x0104) /* OFDM 54M calibration */ -#define CR66 CTL_REG(0x0108) /* OFDM 48M calibration */ -#define CR67 CTL_REG(0x010C) /* OFDM 36M calibration */ -#define CR68 CTL_REG(0x0110) /* CCK calibration */ -#define CR69 CTL_REG(0x0114) -#define CR70 CTL_REG(0x0118) -#define CR71 CTL_REG(0x011C) -#define CR72 CTL_REG(0x0120) -#define CR73 CTL_REG(0x0124) -#define CR74 CTL_REG(0x0128) -#define CR75 CTL_REG(0x012C) -#define CR76 CTL_REG(0x0130) -#define CR77 CTL_REG(0x0134) -#define CR78 CTL_REG(0x0138) -#define CR79 CTL_REG(0x013C) -#define CR80 CTL_REG(0x0140) -#define CR81 CTL_REG(0x0144) -#define CR82 CTL_REG(0x0148) -#define CR83 CTL_REG(0x014C) -#define CR84 CTL_REG(0x0150) -#define CR85 CTL_REG(0x0154) -#define CR86 CTL_REG(0x0158) -#define CR87 CTL_REG(0x015C) -#define CR88 CTL_REG(0x0160) -#define CR89 CTL_REG(0x0164) -#define CR90 CTL_REG(0x0168) -#define CR91 CTL_REG(0x016C) -#define CR92 CTL_REG(0x0170) -#define CR93 CTL_REG(0x0174) -#define CR94 CTL_REG(0x0178) -#define CR95 CTL_REG(0x017C) -#define CR96 CTL_REG(0x0180) -#define CR97 CTL_REG(0x0184) -#define CR98 CTL_REG(0x0188) -#define CR99 CTL_REG(0x018C) -#define CR100 CTL_REG(0x0190) -#define CR101 CTL_REG(0x0194) -#define CR102 CTL_REG(0x0198) -#define CR103 CTL_REG(0x019C) -#define CR104 CTL_REG(0x01A0) -#define CR105 CTL_REG(0x01A4) -#define CR106 CTL_REG(0x01A8) -#define CR107 CTL_REG(0x01AC) -#define CR108 CTL_REG(0x01B0) -#define CR109 CTL_REG(0x01B4) -#define CR110 CTL_REG(0x01B8) -#define CR111 CTL_REG(0x01BC) -#define CR112 CTL_REG(0x01C0) -#define CR113 CTL_REG(0x01C4) -#define CR114 CTL_REG(0x01C8) -#define CR115 CTL_REG(0x01CC) -#define CR116 CTL_REG(0x01D0) -#define CR117 CTL_REG(0x01D4) -#define CR118 CTL_REG(0x01D8) -#define CR119 CTL_REG(0x01DC) -#define CR120 CTL_REG(0x01E0) -#define CR121 CTL_REG(0x01E4) -#define CR122 CTL_REG(0x01E8) -#define CR123 CTL_REG(0x01EC) -#define CR124 CTL_REG(0x01F0) -#define CR125 CTL_REG(0x01F4) -#define CR126 CTL_REG(0x01F8) -#define CR127 CTL_REG(0x01FC) -#define CR128 CTL_REG(0x0200) -#define CR129 CTL_REG(0x0204) -#define CR130 CTL_REG(0x0208) -#define CR131 CTL_REG(0x020C) -#define CR132 CTL_REG(0x0210) -#define CR133 CTL_REG(0x0214) -#define CR134 CTL_REG(0x0218) -#define CR135 CTL_REG(0x021C) -#define CR136 CTL_REG(0x0220) -#define CR137 CTL_REG(0x0224) -#define CR138 CTL_REG(0x0228) -#define CR139 CTL_REG(0x022C) -#define CR140 CTL_REG(0x0230) -#define CR141 CTL_REG(0x0234) -#define CR142 CTL_REG(0x0238) -#define CR143 CTL_REG(0x023C) -#define CR144 CTL_REG(0x0240) -#define CR145 CTL_REG(0x0244) -#define CR146 CTL_REG(0x0248) -#define CR147 CTL_REG(0x024C) -#define CR148 CTL_REG(0x0250) -#define CR149 CTL_REG(0x0254) -#define CR150 CTL_REG(0x0258) -#define CR151 CTL_REG(0x025C) -#define CR152 CTL_REG(0x0260) -#define CR153 CTL_REG(0x0264) -#define CR154 CTL_REG(0x0268) -#define CR155 CTL_REG(0x026C) -#define CR156 CTL_REG(0x0270) -#define CR157 CTL_REG(0x0274) -#define CR158 CTL_REG(0x0278) -#define CR159 CTL_REG(0x027C) -#define CR160 CTL_REG(0x0280) -#define CR161 CTL_REG(0x0284) -#define CR162 CTL_REG(0x0288) -#define CR163 CTL_REG(0x028C) -#define CR164 CTL_REG(0x0290) -#define CR165 CTL_REG(0x0294) -#define CR166 CTL_REG(0x0298) -#define CR167 CTL_REG(0x029C) -#define CR168 CTL_REG(0x02A0) -#define CR169 CTL_REG(0x02A4) -#define CR170 CTL_REG(0x02A8) -#define CR171 CTL_REG(0x02AC) -#define CR172 CTL_REG(0x02B0) -#define CR173 CTL_REG(0x02B4) -#define CR174 CTL_REG(0x02B8) -#define CR175 CTL_REG(0x02BC) -#define CR176 CTL_REG(0x02C0) -#define CR177 CTL_REG(0x02C4) -#define CR178 CTL_REG(0x02C8) -#define CR179 CTL_REG(0x02CC) -#define CR180 CTL_REG(0x02D0) -#define CR181 CTL_REG(0x02D4) -#define CR182 CTL_REG(0x02D8) -#define CR183 CTL_REG(0x02DC) -#define CR184 CTL_REG(0x02E0) -#define CR185 CTL_REG(0x02E4) -#define CR186 CTL_REG(0x02E8) -#define CR187 CTL_REG(0x02EC) -#define CR188 CTL_REG(0x02F0) -#define CR189 CTL_REG(0x02F4) -#define CR190 CTL_REG(0x02F8) -#define CR191 CTL_REG(0x02FC) -#define CR192 CTL_REG(0x0300) -#define CR193 CTL_REG(0x0304) -#define CR194 CTL_REG(0x0308) -#define CR195 CTL_REG(0x030C) -#define CR196 CTL_REG(0x0310) -#define CR197 CTL_REG(0x0314) -#define CR198 CTL_REG(0x0318) -#define CR199 CTL_REG(0x031C) -#define CR200 CTL_REG(0x0320) -#define CR201 CTL_REG(0x0324) -#define CR202 CTL_REG(0x0328) -#define CR203 CTL_REG(0x032C) /* I2C bus template value & flash control */ -#define CR204 CTL_REG(0x0330) -#define CR205 CTL_REG(0x0334) -#define CR206 CTL_REG(0x0338) -#define CR207 CTL_REG(0x033C) -#define CR208 CTL_REG(0x0340) -#define CR209 CTL_REG(0x0344) -#define CR210 CTL_REG(0x0348) -#define CR211 CTL_REG(0x034C) -#define CR212 CTL_REG(0x0350) -#define CR213 CTL_REG(0x0354) -#define CR214 CTL_REG(0x0358) -#define CR215 CTL_REG(0x035C) -#define CR216 CTL_REG(0x0360) -#define CR217 CTL_REG(0x0364) -#define CR218 CTL_REG(0x0368) -#define CR219 CTL_REG(0x036C) -#define CR220 CTL_REG(0x0370) -#define CR221 CTL_REG(0x0374) -#define CR222 CTL_REG(0x0378) -#define CR223 CTL_REG(0x037C) -#define CR224 CTL_REG(0x0380) -#define CR225 CTL_REG(0x0384) -#define CR226 CTL_REG(0x0388) -#define CR227 CTL_REG(0x038C) -#define CR228 CTL_REG(0x0390) -#define CR229 CTL_REG(0x0394) -#define CR230 CTL_REG(0x0398) -#define CR231 CTL_REG(0x039C) -#define CR232 CTL_REG(0x03A0) -#define CR233 CTL_REG(0x03A4) -#define CR234 CTL_REG(0x03A8) -#define CR235 CTL_REG(0x03AC) -#define CR236 CTL_REG(0x03B0) - -#define CR240 CTL_REG(0x03C0) -/* bit 7: host-controlled RF register writes - * CR241-CR245: for hardware controlled writing of RF bits, not needed for - * USB - */ -#define CR241 CTL_REG(0x03C4) -#define CR242 CTL_REG(0x03C8) -#define CR243 CTL_REG(0x03CC) -#define CR244 CTL_REG(0x03D0) -#define CR245 CTL_REG(0x03D4) - -#define CR251 CTL_REG(0x03EC) /* only used for activation and deactivation of - * Airoha RFs AL2230 and AL7230B - */ -#define CR252 CTL_REG(0x03F0) -#define CR253 CTL_REG(0x03F4) -#define CR254 CTL_REG(0x03F8) -#define CR255 CTL_REG(0x03FC) - -#define CR_MAX_PHY_REG 255 - -/* Taken from the ZYDAS driver, not all of them are relevant for the ZSD1211 - * driver. - */ - -#define CR_RF_IF_CLK CTL_REG(0x0400) -#define CR_RF_IF_DATA CTL_REG(0x0404) -#define CR_PE1_PE2 CTL_REG(0x0408) -#define CR_PE2_DLY CTL_REG(0x040C) -#define CR_LE1 CTL_REG(0x0410) -#define CR_LE2 CTL_REG(0x0414) -/* Seems to enable/disable GPI (General Purpose IO?) */ -#define CR_GPI_EN CTL_REG(0x0418) -#define CR_RADIO_PD CTL_REG(0x042C) -#define CR_RF2948_PD CTL_REG(0x042C) -#define CR_ENABLE_PS_MANUAL_AGC CTL_REG(0x043C) -#define CR_CONFIG_PHILIPS CTL_REG(0x0440) -#define CR_SA2400_SER_AP CTL_REG(0x0444) -#define CR_I2C_WRITE CTL_REG(0x0444) -#define CR_SA2400_SER_RP CTL_REG(0x0448) -#define CR_RADIO_PE CTL_REG(0x0458) -#define CR_RST_BUS_MASTER CTL_REG(0x045C) -#define CR_RFCFG CTL_REG(0x0464) -#define CR_HSTSCHG CTL_REG(0x046C) -#define CR_PHY_ON CTL_REG(0x0474) -#define CR_RX_DELAY CTL_REG(0x0478) -#define CR_RX_PE_DELAY CTL_REG(0x047C) -#define CR_GPIO_1 CTL_REG(0x0490) -#define CR_GPIO_2 CTL_REG(0x0494) -#define CR_EncryBufMux CTL_REG(0x04A8) -#define CR_PS_CTRL CTL_REG(0x0500) -#define CR_ADDA_PWR_DWN CTL_REG(0x0504) -#define CR_ADDA_MBIAS_WARMTIME CTL_REG(0x0508) -#define CR_MAC_PS_STATE CTL_REG(0x050C) - -#define CR_INTERRUPT CTL_REG(0x0510) -#define INT_TX_COMPLETE 0x00000001 -#define INT_RX_COMPLETE 0x00000002 -#define INT_RETRY_FAIL 0x00000004 -#define INT_WAKEUP 0x00000008 -#define INT_DTIM_NOTIFY 0x00000020 -#define INT_CFG_NEXT_BCN 0x00000040 -#define INT_BUS_ABORT 0x00000080 -#define INT_TX_FIFO_READY 0x00000100 -#define INT_UART 0x00000200 -#define INT_TX_COMPLETE_EN 0x00010000 -#define INT_RX_COMPLETE_EN 0x00020000 -#define INT_RETRY_FAIL_EN 0x00040000 -#define INT_WAKEUP_EN 0x00080000 -#define INT_DTIM_NOTIFY_EN 0x00200000 -#define INT_CFG_NEXT_BCN_EN 0x00400000 -#define INT_BUS_ABORT_EN 0x00800000 -#define INT_TX_FIFO_READY_EN 0x01000000 -#define INT_UART_EN 0x02000000 - -#define CR_TSF_LOW_PART CTL_REG(0x0514) -#define CR_TSF_HIGH_PART CTL_REG(0x0518) - -/* Following three values are in time units (1024us) - * Following condition must be met: - * atim < tbtt < bcn - */ -#define CR_ATIM_WND_PERIOD CTL_REG(0x051C) -#define CR_BCN_INTERVAL CTL_REG(0x0520) -#define CR_PRE_TBTT CTL_REG(0x0524) -/* in units of TU(1024us) */ - -/* for UART support */ -#define CR_UART_RBR_THR_DLL CTL_REG(0x0540) -#define CR_UART_DLM_IER CTL_REG(0x0544) -#define CR_UART_IIR_FCR CTL_REG(0x0548) -#define CR_UART_LCR CTL_REG(0x054c) -#define CR_UART_MCR CTL_REG(0x0550) -#define CR_UART_LSR CTL_REG(0x0554) -#define CR_UART_MSR CTL_REG(0x0558) -#define CR_UART_ECR CTL_REG(0x055c) -#define CR_UART_STATUS CTL_REG(0x0560) - -#define CR_PCI_TX_ADDR_P1 CTL_REG(0x0600) -#define CR_PCI_TX_AddR_P2 CTL_REG(0x0604) -#define CR_PCI_RX_AddR_P1 CTL_REG(0x0608) -#define CR_PCI_RX_AddR_P2 CTL_REG(0x060C) - -/* must be overwritten if custom MAC address will be used */ -#define CR_MAC_ADDR_P1 CTL_REG(0x0610) -#define CR_MAC_ADDR_P2 CTL_REG(0x0614) -#define CR_BSSID_P1 CTL_REG(0x0618) -#define CR_BSSID_P2 CTL_REG(0x061C) -#define CR_BCN_PLCP_CFG CTL_REG(0x0620) -#define CR_GROUP_HASH_P1 CTL_REG(0x0624) -#define CR_GROUP_HASH_P2 CTL_REG(0x0628) -#define CR_RX_TIMEOUT CTL_REG(0x062C) - -/* Basic rates supported by the BSS. When producing ACK or CTS messages, the - * device will use a rate in this table that is less than or equal to the rate - * of the incoming frame which prompted the response */ -#define CR_BASIC_RATE_TBL CTL_REG(0x0630) -#define CR_RATE_1M 0x0001 /* 802.11b */ -#define CR_RATE_2M 0x0002 /* 802.11b */ -#define CR_RATE_5_5M 0x0004 /* 802.11b */ -#define CR_RATE_11M 0x0008 /* 802.11b */ -#define CR_RATE_6M 0x0100 /* 802.11g */ -#define CR_RATE_9M 0x0200 /* 802.11g */ -#define CR_RATE_12M 0x0400 /* 802.11g */ -#define CR_RATE_18M 0x0800 /* 802.11g */ -#define CR_RATE_24M 0x1000 /* 802.11g */ -#define CR_RATE_36M 0x2000 /* 802.11g */ -#define CR_RATE_48M 0x4000 /* 802.11g */ -#define CR_RATE_54M 0x8000 /* 802.11g */ -#define CR_RATES_80211G 0xff00 -#define CR_RATES_80211B 0x000f - -/* Mandatory rates required in the BSS. When producing ACK or CTS messages, if - * the device could not find an appropriate rate in CR_BASIC_RATE_TBL, it will - * look for a rate in this table that is less than or equal to the rate of - * the incoming frame. */ -#define CR_MANDATORY_RATE_TBL CTL_REG(0x0634) -#define CR_RTS_CTS_RATE CTL_REG(0x0638) - -#define CR_WEP_PROTECT CTL_REG(0x063C) -#define CR_RX_THRESHOLD CTL_REG(0x0640) - -/* register for controlling the LEDS */ -#define CR_LED CTL_REG(0x0644) -/* masks for controlling LEDs */ -#define LED1 0x0100 -#define LED2 0x0200 - -/* Seems to indicate that the configuration is over. - */ -#define CR_AFTER_PNP CTL_REG(0x0648) -#define CR_ACK_TIME_80211 CTL_REG(0x0658) - -#define CR_RX_OFFSET CTL_REG(0x065c) - -#define CR_PHY_DELAY CTL_REG(0x066C) -#define CR_BCN_FIFO CTL_REG(0x0670) -#define CR_SNIFFER_ON CTL_REG(0x0674) - -#define CR_ENCRYPTION_TYPE CTL_REG(0x0678) -#define NO_WEP 0 -#define WEP64 1 -#define WEP128 5 -#define WEP256 6 -#define ENC_SNIFFER 8 - -#define CR_ZD1211_RETRY_MAX CTL_REG(0x067C) - -#define CR_REG1 CTL_REG(0x0680) -/* Setting the bit UNLOCK_PHY_REGS disallows the write access to physical - * registers, so one could argue it is a LOCK bit. But calling it - * LOCK_PHY_REGS makes it confusing. - */ -#define UNLOCK_PHY_REGS 0x0080 - -#define CR_DEVICE_STATE CTL_REG(0x0684) -#define CR_UNDERRUN_CNT CTL_REG(0x0688) - -#define CR_RX_FILTER CTL_REG(0x068c) -#define RX_FILTER_ASSOC_RESPONSE 0x0002 -#define RX_FILTER_REASSOC_RESPONSE 0x0008 -#define RX_FILTER_PROBE_RESPONSE 0x0020 -#define RX_FILTER_BEACON 0x0100 -#define RX_FILTER_DISASSOC 0x0400 -#define RX_FILTER_AUTH 0x0800 -#define AP_RX_FILTER 0x0400feff -#define STA_RX_FILTER 0x0000ffff - -/* Monitor mode sets filter to 0xfffff */ - -#define CR_ACK_TIMEOUT_EXT CTL_REG(0x0690) -#define CR_BCN_FIFO_SEMAPHORE CTL_REG(0x0694) -#define CR_IFS_VALUE CTL_REG(0x0698) -#define CR_RX_TIME_OUT CTL_REG(0x069C) -#define CR_TOTAL_RX_FRM CTL_REG(0x06A0) -#define CR_CRC32_CNT CTL_REG(0x06A4) -#define CR_CRC16_CNT CTL_REG(0x06A8) -#define CR_DECRYPTION_ERR_UNI CTL_REG(0x06AC) -#define CR_RX_FIFO_OVERRUN CTL_REG(0x06B0) - -#define CR_DECRYPTION_ERR_MUL CTL_REG(0x06BC) - -#define CR_NAV_CNT CTL_REG(0x06C4) -#define CR_NAV_CCA CTL_REG(0x06C8) -#define CR_RETRY_CNT CTL_REG(0x06CC) - -#define CR_READ_TCB_ADDR CTL_REG(0x06E8) -#define CR_READ_RFD_ADDR CTL_REG(0x06EC) -#define CR_CWMIN_CWMAX CTL_REG(0x06F0) -#define CR_TOTAL_TX_FRM CTL_REG(0x06F4) - -/* CAM: Continuous Access Mode (power management) */ -#define CR_CAM_MODE CTL_REG(0x0700) -#define CR_CAM_ROLL_TB_LOW CTL_REG(0x0704) -#define CR_CAM_ROLL_TB_HIGH CTL_REG(0x0708) -#define CR_CAM_ADDRESS CTL_REG(0x070C) -#define CR_CAM_DATA CTL_REG(0x0710) - -#define CR_ROMDIR CTL_REG(0x0714) - -#define CR_DECRY_ERR_FLG_LOW CTL_REG(0x0714) -#define CR_DECRY_ERR_FLG_HIGH CTL_REG(0x0718) - -#define CR_WEPKEY0 CTL_REG(0x0720) -#define CR_WEPKEY1 CTL_REG(0x0724) -#define CR_WEPKEY2 CTL_REG(0x0728) -#define CR_WEPKEY3 CTL_REG(0x072C) -#define CR_WEPKEY4 CTL_REG(0x0730) -#define CR_WEPKEY5 CTL_REG(0x0734) -#define CR_WEPKEY6 CTL_REG(0x0738) -#define CR_WEPKEY7 CTL_REG(0x073C) -#define CR_WEPKEY8 CTL_REG(0x0740) -#define CR_WEPKEY9 CTL_REG(0x0744) -#define CR_WEPKEY10 CTL_REG(0x0748) -#define CR_WEPKEY11 CTL_REG(0x074C) -#define CR_WEPKEY12 CTL_REG(0x0750) -#define CR_WEPKEY13 CTL_REG(0x0754) -#define CR_WEPKEY14 CTL_REG(0x0758) -#define CR_WEPKEY15 CTL_REG(0x075c) -#define CR_TKIP_MODE CTL_REG(0x0760) - -#define CR_EEPROM_PROTECT0 CTL_REG(0x0758) -#define CR_EEPROM_PROTECT1 CTL_REG(0x075C) - -#define CR_DBG_FIFO_RD CTL_REG(0x0800) -#define CR_DBG_SELECT CTL_REG(0x0804) -#define CR_FIFO_Length CTL_REG(0x0808) - - -#define CR_RSSI_MGC CTL_REG(0x0810) - -#define CR_PON CTL_REG(0x0818) -#define CR_RX_ON CTL_REG(0x081C) -#define CR_TX_ON CTL_REG(0x0820) -#define CR_CHIP_EN CTL_REG(0x0824) -#define CR_LO_SW CTL_REG(0x0828) -#define CR_TXRX_SW CTL_REG(0x082C) -#define CR_S_MD CTL_REG(0x0830) - -#define CR_USB_DEBUG_PORT CTL_REG(0x0888) - -#define CR_ZD1211B_TX_PWR_CTL1 CTL_REG(0x0b00) -#define CR_ZD1211B_TX_PWR_CTL2 CTL_REG(0x0b04) -#define CR_ZD1211B_TX_PWR_CTL3 CTL_REG(0x0b08) -#define CR_ZD1211B_TX_PWR_CTL4 CTL_REG(0x0b0c) -#define CR_ZD1211B_AIFS_CTL1 CTL_REG(0x0b10) -#define CR_ZD1211B_AIFS_CTL2 CTL_REG(0x0b14) -#define CR_ZD1211B_TXOP CTL_REG(0x0b20) -#define CR_ZD1211B_RETRY_MAX CTL_REG(0x0b28) - -#define CWIN_SIZE 0x007f043f - - -#define HWINT_ENABLED 0x004f0000 -#define HWINT_DISABLED 0 - -#define E2P_PWR_INT_GUARD 8 -#define E2P_CHANNEL_COUNT 14 - -/* If you compare this addresses with the ZYDAS orignal driver, please notify - * that we use word mapping for the EEPROM. - */ - -/* - * Upper 16 bit contains the regulatory domain. - */ -#define E2P_SUBID E2P_REG(0x00) -#define E2P_POD E2P_REG(0x02) -#define E2P_MAC_ADDR_P1 E2P_REG(0x04) -#define E2P_MAC_ADDR_P2 E2P_REG(0x06) -#define E2P_PWR_CAL_VALUE1 E2P_REG(0x08) -#define E2P_PWR_CAL_VALUE2 E2P_REG(0x0a) -#define E2P_PWR_CAL_VALUE3 E2P_REG(0x0c) -#define E2P_PWR_CAL_VALUE4 E2P_REG(0x0e) -#define E2P_PWR_INT_VALUE1 E2P_REG(0x10) -#define E2P_PWR_INT_VALUE2 E2P_REG(0x12) -#define E2P_PWR_INT_VALUE3 E2P_REG(0x14) -#define E2P_PWR_INT_VALUE4 E2P_REG(0x16) - -/* Contains a bit for each allowed channel. It gives for Europe (ETSI 0x30) - * also only 11 channels. */ -#define E2P_ALLOWED_CHANNEL E2P_REG(0x18) - -#define E2P_PHY_REG E2P_REG(0x1a) -#define E2P_DEVICE_VER E2P_REG(0x20) -#define E2P_36M_CAL_VALUE1 E2P_REG(0x28) -#define E2P_36M_CAL_VALUE2 E2P_REG(0x2a) -#define E2P_36M_CAL_VALUE3 E2P_REG(0x2c) -#define E2P_36M_CAL_VALUE4 E2P_REG(0x2e) -#define E2P_11A_INT_VALUE1 E2P_REG(0x30) -#define E2P_11A_INT_VALUE2 E2P_REG(0x32) -#define E2P_11A_INT_VALUE3 E2P_REG(0x34) -#define E2P_11A_INT_VALUE4 E2P_REG(0x36) -#define E2P_48M_CAL_VALUE1 E2P_REG(0x38) -#define E2P_48M_CAL_VALUE2 E2P_REG(0x3a) -#define E2P_48M_CAL_VALUE3 E2P_REG(0x3c) -#define E2P_48M_CAL_VALUE4 E2P_REG(0x3e) -#define E2P_48M_INT_VALUE1 E2P_REG(0x40) -#define E2P_48M_INT_VALUE2 E2P_REG(0x42) -#define E2P_48M_INT_VALUE3 E2P_REG(0x44) -#define E2P_48M_INT_VALUE4 E2P_REG(0x46) -#define E2P_54M_CAL_VALUE1 E2P_REG(0x48) /* ??? */ -#define E2P_54M_CAL_VALUE2 E2P_REG(0x4a) -#define E2P_54M_CAL_VALUE3 E2P_REG(0x4c) -#define E2P_54M_CAL_VALUE4 E2P_REG(0x4e) -#define E2P_54M_INT_VALUE1 E2P_REG(0x50) -#define E2P_54M_INT_VALUE2 E2P_REG(0x52) -#define E2P_54M_INT_VALUE3 E2P_REG(0x54) -#define E2P_54M_INT_VALUE4 E2P_REG(0x56) - -/* All 16 bit values */ -#define FW_FIRMWARE_VER FW_REG(0) -/* non-zero if USB high speed connection */ -#define FW_USB_SPEED FW_REG(1) -#define FW_FIX_TX_RATE FW_REG(2) -/* Seems to be able to control LEDs over the firmware */ -#define FW_LINK_STATUS FW_REG(3) -#define FW_SOFT_RESET FW_REG(4) -#define FW_FLASH_CHK FW_REG(5) - -enum { - CR_BASE_OFFSET = 0x9000, - FW_START_OFFSET = 0xee00, - FW_BASE_ADDR_OFFSET = FW_START_OFFSET + 0x1d, - EEPROM_START_OFFSET = 0xf800, - EEPROM_SIZE = 0x800, /* words */ - LOAD_CODE_SIZE = 0xe, /* words */ - LOAD_VECT_SIZE = 0x10000 - 0xfff7, /* words */ - EEPROM_REGS_OFFSET = LOAD_CODE_SIZE + LOAD_VECT_SIZE, - E2P_BASE_OFFSET = EEPROM_START_OFFSET + - EEPROM_REGS_OFFSET, -}; - -#define FW_REG_TABLE_ADDR USB_ADDR(FW_START_OFFSET + 0x1d) - -enum { - /* indices for ofdm_cal_values */ - OFDM_36M_INDEX = 0, - OFDM_48M_INDEX = 1, - OFDM_54M_INDEX = 2, -}; - -struct zd_chip { - struct zd_usb usb; - struct zd_rf rf; - struct mutex mutex; - u8 e2p_mac[ETH_ALEN]; - /* EepSetPoint in the vendor driver */ - u8 pwr_cal_values[E2P_CHANNEL_COUNT]; - /* integration values in the vendor driver */ - u8 pwr_int_values[E2P_CHANNEL_COUNT]; - /* SetPointOFDM in the vendor driver */ - u8 ofdm_cal_values[3][E2P_CHANNEL_COUNT]; - u8 pa_type:4, patch_cck_gain:1, patch_cr157:1, patch_6m_band_edge:1, - is_zd1211b:1; -}; - -static inline struct zd_chip *zd_usb_to_chip(struct zd_usb *usb) -{ - return container_of(usb, struct zd_chip, usb); -} - -static inline struct zd_chip *zd_rf_to_chip(struct zd_rf *rf) -{ - return container_of(rf, struct zd_chip, rf); -} - -#define zd_chip_dev(chip) (&(chip)->usb.intf->dev) - -void zd_chip_init(struct zd_chip *chip, - struct net_device *netdev, - struct usb_interface *intf); -void zd_chip_clear(struct zd_chip *chip); -int zd_chip_init_hw(struct zd_chip *chip, u8 device_type); -int zd_chip_reset(struct zd_chip *chip); - -static inline int zd_ioread16v_locked(struct zd_chip *chip, u16 *values, - const zd_addr_t *addresses, - unsigned int count) -{ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return zd_usb_ioread16v(&chip->usb, values, addresses, count); -} - -static inline int zd_ioread16_locked(struct zd_chip *chip, u16 *value, - const zd_addr_t addr) -{ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return zd_usb_ioread16(&chip->usb, value, addr); -} - -int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, - const zd_addr_t *addresses, unsigned int count); - -static inline int zd_ioread32_locked(struct zd_chip *chip, u32 *value, - const zd_addr_t addr) -{ - return zd_ioread32v_locked(chip, value, (const zd_addr_t *)&addr, 1); -} - -static inline int zd_iowrite16_locked(struct zd_chip *chip, u16 value, - zd_addr_t addr) -{ - struct zd_ioreq16 ioreq; - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - ioreq.addr = addr; - ioreq.value = value; - - return zd_usb_iowrite16v(&chip->usb, &ioreq, 1); -} - -int zd_iowrite16a_locked(struct zd_chip *chip, - const struct zd_ioreq16 *ioreqs, unsigned int count); - -int _zd_iowrite32v_locked(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, - unsigned int count); - -static inline int zd_iowrite32_locked(struct zd_chip *chip, u32 value, - zd_addr_t addr) -{ - struct zd_ioreq32 ioreq; - - ioreq.addr = addr; - ioreq.value = value; - - return _zd_iowrite32v_locked(chip, &ioreq, 1); -} - -int zd_iowrite32a_locked(struct zd_chip *chip, - const struct zd_ioreq32 *ioreqs, unsigned int count); - -static inline int zd_rfwrite_locked(struct zd_chip *chip, u32 value, u8 bits) -{ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - return zd_usb_rfwrite(&chip->usb, value, bits); -} - -int zd_rfwritev_locked(struct zd_chip *chip, - const u32* values, unsigned int count, u8 bits); - -/* Locking functions for reading and writing registers. - * The different parameters are intentional. - */ -int zd_ioread16(struct zd_chip *chip, zd_addr_t addr, u16 *value); -int zd_iowrite16(struct zd_chip *chip, zd_addr_t addr, u16 value); -int zd_ioread32(struct zd_chip *chip, zd_addr_t addr, u32 *value); -int zd_iowrite32(struct zd_chip *chip, zd_addr_t addr, u32 value); -int zd_ioread32v(struct zd_chip *chip, const zd_addr_t *addresses, - u32 *values, unsigned int count); -int zd_iowrite32a(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, - unsigned int count); - -int zd_chip_set_channel(struct zd_chip *chip, u8 channel); -static inline u8 _zd_chip_get_channel(struct zd_chip *chip) -{ - return chip->rf.channel; -} -u8 zd_chip_get_channel(struct zd_chip *chip); -int zd_read_regdomain(struct zd_chip *chip, u8 *regdomain); -void zd_get_e2p_mac_addr(struct zd_chip *chip, u8 *mac_addr); -int zd_read_mac_addr(struct zd_chip *chip, u8 *mac_addr); -int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr); -int zd_chip_switch_radio_on(struct zd_chip *chip); -int zd_chip_switch_radio_off(struct zd_chip *chip); -int zd_chip_enable_int(struct zd_chip *chip); -void zd_chip_disable_int(struct zd_chip *chip); -int zd_chip_enable_rx(struct zd_chip *chip); -void zd_chip_disable_rx(struct zd_chip *chip); -int zd_chip_enable_hwint(struct zd_chip *chip); -int zd_chip_disable_hwint(struct zd_chip *chip); - -static inline int zd_get_encryption_type(struct zd_chip *chip, u32 *type) -{ - return zd_ioread32(chip, CR_ENCRYPTION_TYPE, type); -} - -static inline int zd_set_encryption_type(struct zd_chip *chip, u32 type) -{ - return zd_iowrite32(chip, CR_ENCRYPTION_TYPE, type); -} - -static inline int zd_chip_get_basic_rates(struct zd_chip *chip, u16 *cr_rates) -{ - return zd_ioread16(chip, CR_BASIC_RATE_TBL, cr_rates); -} - -int zd_chip_set_basic_rates(struct zd_chip *chip, u16 cr_rates); - -static inline int zd_chip_set_rx_filter(struct zd_chip *chip, u32 filter) -{ - return zd_iowrite32(chip, CR_RX_FILTER, filter); -} - -int zd_chip_lock_phy_regs(struct zd_chip *chip); -int zd_chip_unlock_phy_regs(struct zd_chip *chip); - -enum led_status { - LED_OFF = 0, - LED_ON = 1, - LED_FLIP = 2, - LED_STATUS = 3, -}; - -int zd_chip_led_status(struct zd_chip *chip, int led, enum led_status status); -int zd_chip_led_flip(struct zd_chip *chip, int led, - const unsigned int *phases_msecs, unsigned int count); - -int zd_set_beacon_interval(struct zd_chip *chip, u32 interval); - -static inline int zd_get_beacon_interval(struct zd_chip *chip, u32 *interval) -{ - return zd_ioread32(chip, CR_BCN_INTERVAL, interval); -} - -struct rx_status; - -u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size, - const struct rx_status *status); -u8 zd_rx_strength_percent(u8 rssi); - -u16 zd_rx_rate(const void *rx_frame, const struct rx_status *status); - -#endif /* _ZD_CHIP_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h deleted file mode 100644 index 465906812..000000000 --- a/drivers/net/wireless/zd1211rw/zd_def.h +++ /dev/null @@ -1,48 +0,0 @@ -/* zd_def.h - * - * 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 _ZD_DEF_H -#define _ZD_DEF_H - -#include -#include -#include -#include - -#define dev_printk_f(level, dev, fmt, args...) \ - dev_printk(level, dev, "%s() " fmt, __func__, ##args) - -#ifdef DEBUG -# define dev_dbg_f(dev, fmt, args...) \ - dev_printk_f(KERN_DEBUG, dev, fmt, ## args) -#else -# define dev_dbg_f(dev, fmt, args...) do { (void)(dev); } while (0) -#endif /* DEBUG */ - -#ifdef DEBUG -# define ZD_ASSERT(x) \ -do { \ - if (!(x)) { \ - pr_debug("%s:%d ASSERT %s VIOLATED!\n", \ - __FILE__, __LINE__, __stringify(x)); \ - } \ -} while (0) -#else -# define ZD_ASSERT(x) do { } while (0) -#endif - -#endif /* _ZD_DEF_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_ieee80211.c b/drivers/net/wireless/zd1211rw/zd_ieee80211.c deleted file mode 100644 index 66905f7b6..000000000 --- a/drivers/net/wireless/zd1211rw/zd_ieee80211.c +++ /dev/null @@ -1,191 +0,0 @@ -/* zd_ieee80211.c - * - * 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 - */ - -/* - * A lot of this code is generic and should be moved into the upper layers - * at some point. - */ - -#include -#include -#include -#include - -#include "zd_def.h" -#include "zd_ieee80211.h" -#include "zd_mac.h" - -static const struct channel_range channel_ranges[] = { - [0] = { 0, 0}, - [ZD_REGDOMAIN_FCC] = { 1, 12}, - [ZD_REGDOMAIN_IC] = { 1, 12}, - [ZD_REGDOMAIN_ETSI] = { 1, 14}, - [ZD_REGDOMAIN_JAPAN] = { 1, 14}, - [ZD_REGDOMAIN_SPAIN] = { 1, 14}, - [ZD_REGDOMAIN_FRANCE] = { 1, 14}, - [ZD_REGDOMAIN_JAPAN_ADD] = {14, 15}, -}; - -const struct channel_range *zd_channel_range(u8 regdomain) -{ - if (regdomain >= ARRAY_SIZE(channel_ranges)) - regdomain = 0; - return &channel_ranges[regdomain]; -} - -int zd_regdomain_supports_channel(u8 regdomain, u8 channel) -{ - const struct channel_range *range = zd_channel_range(regdomain); - return range->start <= channel && channel < range->end; -} - -int zd_regdomain_supported(u8 regdomain) -{ - const struct channel_range *range = zd_channel_range(regdomain); - return range->start != 0; -} - -/* Stores channel frequencies in MHz. */ -static const u16 channel_frequencies[] = { - 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, - 2452, 2457, 2462, 2467, 2472, 2484, -}; - -#define NUM_CHANNELS ARRAY_SIZE(channel_frequencies) - -static int compute_freq(struct iw_freq *freq, u32 mhz, u32 hz) -{ - u32 factor; - - freq->e = 0; - if (mhz >= 1000000000U) { - pr_debug("zd1211 mhz %u to large\n", mhz); - freq->m = 0; - return -EINVAL; - } - - factor = 1000; - while (mhz >= factor) { - - freq->e += 1; - factor *= 10; - } - - factor /= 1000U; - freq->m = mhz * (1000000U/factor) + hz/factor; - - return 0; -} - -int zd_channel_to_freq(struct iw_freq *freq, u8 channel) -{ - if (channel > NUM_CHANNELS) { - freq->m = 0; - freq->e = 0; - return -EINVAL; - } - if (!channel) { - freq->m = 0; - freq->e = 0; - return -EINVAL; - } - return compute_freq(freq, channel_frequencies[channel-1], 0); -} - -static int freq_to_mhz(const struct iw_freq *freq) -{ - u32 factor; - int e; - - /* Such high frequencies are not supported. */ - if (freq->e > 6) - return -EINVAL; - - factor = 1; - for (e = freq->e; e > 0; --e) { - factor *= 10; - } - factor = 1000000U / factor; - - if (freq->m % factor) { - return -EINVAL; - } - - return freq->m / factor; -} - -int zd_find_channel(u8 *channel, const struct iw_freq *freq) -{ - int i, r; - u32 mhz; - - if (!(freq->flags & IW_FREQ_FIXED)) - return 0; - - if (freq->m < 1000) { - if (freq->m > NUM_CHANNELS || freq->m == 0) - return -EINVAL; - *channel = freq->m; - return 1; - } - - r = freq_to_mhz(freq); - if (r < 0) - return r; - mhz = r; - - for (i = 0; i < NUM_CHANNELS; i++) { - if (mhz == channel_frequencies[i]) { - *channel = i+1; - return 1; - } - } - - return -EINVAL; -} - -int zd_geo_init(struct ieee80211_device *ieee, u8 regdomain) -{ - struct ieee80211_geo geo; - const struct channel_range *range; - int i; - u8 channel; - - dev_dbg(zd_mac_dev(zd_netdev_mac(ieee->dev)), - "regdomain %#04x\n", regdomain); - - range = zd_channel_range(regdomain); - if (range->start == 0) { - dev_err(zd_mac_dev(zd_netdev_mac(ieee->dev)), - "zd1211 regdomain %#04x not supported\n", - regdomain); - return -EINVAL; - } - - memset(&geo, 0, sizeof(geo)); - - for (i = 0, channel = range->start; channel < range->end; channel++) { - struct ieee80211_channel *chan = &geo.bg[i++]; - chan->freq = channel_frequencies[channel - 1]; - chan->channel = channel; - } - - geo.bg_channels = i; - memcpy(geo.name, "XX ", 4); - ieee80211_set_geo(ieee, &geo); - return 0; -} diff --git a/drivers/net/wireless/zd1211rw/zd_ieee80211.h b/drivers/net/wireless/zd1211rw/zd_ieee80211.h deleted file mode 100644 index 36329890d..000000000 --- a/drivers/net/wireless/zd1211rw/zd_ieee80211.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef _ZD_IEEE80211_H -#define _ZD_IEEE80211_H - -#include -#include "zd_types.h" - -/* Additional definitions from the standards. - */ - -#define ZD_REGDOMAIN_FCC 0x10 -#define ZD_REGDOMAIN_IC 0x20 -#define ZD_REGDOMAIN_ETSI 0x30 -#define ZD_REGDOMAIN_SPAIN 0x31 -#define ZD_REGDOMAIN_FRANCE 0x32 -#define ZD_REGDOMAIN_JAPAN_ADD 0x40 -#define ZD_REGDOMAIN_JAPAN 0x41 - -enum { - MIN_CHANNEL24 = 1, - MAX_CHANNEL24 = 14, -}; - -struct channel_range { - u8 start; - u8 end; /* exclusive (channel must be less than end) */ -}; - -struct iw_freq; - -int zd_geo_init(struct ieee80211_device *ieee, u8 regdomain); - -const struct channel_range *zd_channel_range(u8 regdomain); -int zd_regdomain_supports_channel(u8 regdomain, u8 channel); -int zd_regdomain_supported(u8 regdomain); - -/* for 2.4 GHz band */ -int zd_channel_to_freq(struct iw_freq *freq, u8 channel); -int zd_find_channel(u8 *channel, const struct iw_freq *freq); - -#define ZD_PLCP_SERVICE_LENGTH_EXTENSION 0x80 - -struct ofdm_plcp_header { - u8 prefix[3]; - __le16 service; -} __attribute__((packed)); - -static inline u8 zd_ofdm_plcp_header_rate( - const struct ofdm_plcp_header *header) -{ - return header->prefix[0] & 0xf; -} - -#define ZD_OFDM_RATE_6M 0xb -#define ZD_OFDM_RATE_9M 0xf -#define ZD_OFDM_RATE_12M 0xa -#define ZD_OFDM_RATE_18M 0xe -#define ZD_OFDM_RATE_24M 0x9 -#define ZD_OFDM_RATE_36M 0xd -#define ZD_OFDM_RATE_48M 0x8 -#define ZD_OFDM_RATE_54M 0xc - -struct cck_plcp_header { - u8 signal; - u8 service; - __le16 length; - __le16 crc16; -} __attribute__((packed)); - -static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header) -{ - return header->signal; -} - -#define ZD_CCK_SIGNAL_1M 0x0a -#define ZD_CCK_SIGNAL_2M 0x14 -#define ZD_CCK_SIGNAL_5M5 0x37 -#define ZD_CCK_SIGNAL_11M 0x6e - -enum ieee80211_std { - IEEE80211B = 0x01, - IEEE80211A = 0x02, - IEEE80211G = 0x04, -}; - -#endif /* _ZD_IEEE80211_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c deleted file mode 100644 index a9bd80a08..000000000 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ /dev/null @@ -1,1084 +0,0 @@ -/* zd_mac.c - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include - -#include "zd_def.h" -#include "zd_chip.h" -#include "zd_mac.h" -#include "zd_ieee80211.h" -#include "zd_netdev.h" -#include "zd_rf.h" -#include "zd_util.h" - -static void ieee_init(struct ieee80211_device *ieee); -static void softmac_init(struct ieee80211softmac_device *sm); - -int zd_mac_init(struct zd_mac *mac, - struct net_device *netdev, - struct usb_interface *intf) -{ - struct ieee80211_device *ieee = zd_netdev_ieee80211(netdev); - - memset(mac, 0, sizeof(*mac)); - spin_lock_init(&mac->lock); - mac->netdev = netdev; - - ieee_init(ieee); - softmac_init(ieee80211_priv(netdev)); - zd_chip_init(&mac->chip, netdev, intf); - return 0; -} - -static int reset_channel(struct zd_mac *mac) -{ - int r; - unsigned long flags; - const struct channel_range *range; - - spin_lock_irqsave(&mac->lock, flags); - range = zd_channel_range(mac->regdomain); - if (!range->start) { - r = -EINVAL; - goto out; - } - mac->requested_channel = range->start; - r = 0; -out: - spin_unlock_irqrestore(&mac->lock, flags); - return r; -} - -int zd_mac_init_hw(struct zd_mac *mac, u8 device_type) -{ - int r; - struct zd_chip *chip = &mac->chip; - u8 addr[ETH_ALEN]; - u8 default_regdomain; - - r = zd_chip_enable_int(chip); - if (r) - goto out; - r = zd_chip_init_hw(chip, device_type); - if (r) - goto disable_int; - - zd_get_e2p_mac_addr(chip, addr); - r = zd_write_mac_addr(chip, addr); - if (r) - goto disable_int; - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&mac->lock); - memcpy(mac->netdev->dev_addr, addr, ETH_ALEN); - spin_unlock_irq(&mac->lock); - - r = zd_read_regdomain(chip, &default_regdomain); - if (r) - goto disable_int; - if (!zd_regdomain_supported(default_regdomain)) { - dev_dbg_f(zd_mac_dev(mac), - "Regulatory Domain %#04x is not supported.\n", - default_regdomain); - r = -EINVAL; - goto disable_int; - } - spin_lock_irq(&mac->lock); - mac->regdomain = mac->default_regdomain = default_regdomain; - spin_unlock_irq(&mac->lock); - r = reset_channel(mac); - if (r) - goto disable_int; - - /* We must inform the device that we are doing encryption/decryption in - * software at the moment. */ - r = zd_set_encryption_type(chip, ENC_SNIFFER); - if (r) - goto disable_int; - - r = zd_geo_init(zd_mac_to_ieee80211(mac), mac->regdomain); - if (r) - goto disable_int; - - r = 0; -disable_int: - zd_chip_disable_int(chip); -out: - return r; -} - -void zd_mac_clear(struct zd_mac *mac) -{ - /* Aquire the lock. */ - spin_lock(&mac->lock); - spin_unlock(&mac->lock); - zd_chip_clear(&mac->chip); - memset(mac, 0, sizeof(*mac)); -} - -static int reset_mode(struct zd_mac *mac) -{ - struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - struct zd_ioreq32 ioreqs[3] = { - { CR_RX_FILTER, STA_RX_FILTER }, - { CR_SNIFFER_ON, 0U }, - }; - - if (ieee->iw_mode == IW_MODE_MONITOR) { - ioreqs[0].value = 0xffffffff; - ioreqs[1].value = 0x1; - ioreqs[2].value = ENC_SNIFFER; - } - - return zd_iowrite32a(&mac->chip, ioreqs, 3); -} - -int zd_mac_open(struct net_device *netdev) -{ - struct zd_mac *mac = zd_netdev_mac(netdev); - struct zd_chip *chip = &mac->chip; - int r; - - r = zd_chip_enable_int(chip); - if (r < 0) - goto out; - - r = zd_chip_set_basic_rates(chip, CR_RATES_80211B | CR_RATES_80211G); - if (r < 0) - goto disable_int; - r = reset_mode(mac); - if (r) - goto disable_int; - r = zd_chip_switch_radio_on(chip); - if (r < 0) - goto disable_int; - r = zd_chip_set_channel(chip, mac->requested_channel); - if (r < 0) - goto disable_radio; - r = zd_chip_enable_rx(chip); - if (r < 0) - goto disable_radio; - r = zd_chip_enable_hwint(chip); - if (r < 0) - goto disable_rx; - - ieee80211softmac_start(netdev); - return 0; -disable_rx: - zd_chip_disable_rx(chip); -disable_radio: - zd_chip_switch_radio_off(chip); -disable_int: - zd_chip_disable_int(chip); -out: - return r; -} - -int zd_mac_stop(struct net_device *netdev) -{ - struct zd_mac *mac = zd_netdev_mac(netdev); - struct zd_chip *chip = &mac->chip; - - netif_stop_queue(netdev); - - /* - * The order here deliberately is a little different from the open() - * method, since we need to make sure there is no opportunity for RX - * frames to be processed by softmac after we have stopped it. - */ - - zd_chip_disable_rx(chip); - ieee80211softmac_stop(netdev); - - zd_chip_disable_hwint(chip); - zd_chip_switch_radio_off(chip); - zd_chip_disable_int(chip); - - return 0; -} - -int zd_mac_set_mac_address(struct net_device *netdev, void *p) -{ - int r; - unsigned long flags; - struct sockaddr *addr = p; - struct zd_mac *mac = zd_netdev_mac(netdev); - struct zd_chip *chip = &mac->chip; - - if (!is_valid_ether_addr(addr->sa_data)) - return -EADDRNOTAVAIL; - - dev_dbg_f(zd_mac_dev(mac), - "Setting MAC to " MAC_FMT "\n", MAC_ARG(addr->sa_data)); - - r = zd_write_mac_addr(chip, addr->sa_data); - if (r) - return r; - - spin_lock_irqsave(&mac->lock, flags); - memcpy(netdev->dev_addr, addr->sa_data, ETH_ALEN); - spin_unlock_irqrestore(&mac->lock, flags); - - return 0; -} - -int zd_mac_set_regdomain(struct zd_mac *mac, u8 regdomain) -{ - int r; - u8 channel; - - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&mac->lock); - if (regdomain == 0) { - regdomain = mac->default_regdomain; - } - if (!zd_regdomain_supported(regdomain)) { - spin_unlock_irq(&mac->lock); - return -EINVAL; - } - mac->regdomain = regdomain; - channel = mac->requested_channel; - spin_unlock_irq(&mac->lock); - - r = zd_geo_init(zd_mac_to_ieee80211(mac), regdomain); - if (r) - return r; - if (!zd_regdomain_supports_channel(regdomain, channel)) { - r = reset_channel(mac); - if (r) - return r; - } - - return 0; -} - -u8 zd_mac_get_regdomain(struct zd_mac *mac) -{ - unsigned long flags; - u8 regdomain; - - spin_lock_irqsave(&mac->lock, flags); - regdomain = mac->regdomain; - spin_unlock_irqrestore(&mac->lock, flags); - return regdomain; -} - -static void set_channel(struct net_device *netdev, u8 channel) -{ - struct zd_mac *mac = zd_netdev_mac(netdev); - - dev_dbg_f(zd_mac_dev(mac), "channel %d\n", channel); - - zd_chip_set_channel(&mac->chip, channel); -} - -/* TODO: Should not work in Managed mode. */ -int zd_mac_request_channel(struct zd_mac *mac, u8 channel) -{ - unsigned long lock_flags; - struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - - if (ieee->iw_mode == IW_MODE_INFRA) - return -EPERM; - - spin_lock_irqsave(&mac->lock, lock_flags); - if (!zd_regdomain_supports_channel(mac->regdomain, channel)) { - spin_unlock_irqrestore(&mac->lock, lock_flags); - return -EINVAL; - } - mac->requested_channel = channel; - spin_unlock_irqrestore(&mac->lock, lock_flags); - if (netif_running(mac->netdev)) - return zd_chip_set_channel(&mac->chip, channel); - else - return 0; -} - -int zd_mac_get_channel(struct zd_mac *mac, u8 *channel, u8 *flags) -{ - struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - - *channel = zd_chip_get_channel(&mac->chip); - if (ieee->iw_mode != IW_MODE_INFRA) { - spin_lock_irq(&mac->lock); - *flags = *channel == mac->requested_channel ? - MAC_FIXED_CHANNEL : 0; - spin_unlock(&mac->lock); - } else { - *flags = 0; - } - dev_dbg_f(zd_mac_dev(mac), "channel %u flags %u\n", *channel, *flags); - return 0; -} - -/* If wrong rate is given, we are falling back to the slowest rate: 1MBit/s */ -static u8 cs_typed_rate(u8 cs_rate) -{ - static const u8 typed_rates[16] = { - [ZD_CS_CCK_RATE_1M] = ZD_CS_CCK|ZD_CS_CCK_RATE_1M, - [ZD_CS_CCK_RATE_2M] = ZD_CS_CCK|ZD_CS_CCK_RATE_2M, - [ZD_CS_CCK_RATE_5_5M] = ZD_CS_CCK|ZD_CS_CCK_RATE_5_5M, - [ZD_CS_CCK_RATE_11M] = ZD_CS_CCK|ZD_CS_CCK_RATE_11M, - [ZD_OFDM_RATE_6M] = ZD_CS_OFDM|ZD_OFDM_RATE_6M, - [ZD_OFDM_RATE_9M] = ZD_CS_OFDM|ZD_OFDM_RATE_9M, - [ZD_OFDM_RATE_12M] = ZD_CS_OFDM|ZD_OFDM_RATE_12M, - [ZD_OFDM_RATE_18M] = ZD_CS_OFDM|ZD_OFDM_RATE_18M, - [ZD_OFDM_RATE_24M] = ZD_CS_OFDM|ZD_OFDM_RATE_24M, - [ZD_OFDM_RATE_36M] = ZD_CS_OFDM|ZD_OFDM_RATE_36M, - [ZD_OFDM_RATE_48M] = ZD_CS_OFDM|ZD_OFDM_RATE_48M, - [ZD_OFDM_RATE_54M] = ZD_CS_OFDM|ZD_OFDM_RATE_54M, - }; - - ZD_ASSERT(ZD_CS_RATE_MASK == 0x0f); - return typed_rates[cs_rate & ZD_CS_RATE_MASK]; -} - -/* Fallback to lowest rate, if rate is unknown. */ -static u8 rate_to_cs_rate(u8 rate) -{ - switch (rate) { - case IEEE80211_CCK_RATE_2MB: - return ZD_CS_CCK_RATE_2M; - case IEEE80211_CCK_RATE_5MB: - return ZD_CS_CCK_RATE_5_5M; - case IEEE80211_CCK_RATE_11MB: - return ZD_CS_CCK_RATE_11M; - case IEEE80211_OFDM_RATE_6MB: - return ZD_OFDM_RATE_6M; - case IEEE80211_OFDM_RATE_9MB: - return ZD_OFDM_RATE_9M; - case IEEE80211_OFDM_RATE_12MB: - return ZD_OFDM_RATE_12M; - case IEEE80211_OFDM_RATE_18MB: - return ZD_OFDM_RATE_18M; - case IEEE80211_OFDM_RATE_24MB: - return ZD_OFDM_RATE_24M; - case IEEE80211_OFDM_RATE_36MB: - return ZD_OFDM_RATE_36M; - case IEEE80211_OFDM_RATE_48MB: - return ZD_OFDM_RATE_48M; - case IEEE80211_OFDM_RATE_54MB: - return ZD_OFDM_RATE_54M; - } - return ZD_CS_CCK_RATE_1M; -} - -int zd_mac_set_mode(struct zd_mac *mac, u32 mode) -{ - struct ieee80211_device *ieee; - - switch (mode) { - case IW_MODE_AUTO: - case IW_MODE_ADHOC: - case IW_MODE_INFRA: - mac->netdev->type = ARPHRD_ETHER; - break; - case IW_MODE_MONITOR: - mac->netdev->type = ARPHRD_IEEE80211_RADIOTAP; - break; - default: - dev_dbg_f(zd_mac_dev(mac), "wrong mode %u\n", mode); - return -EINVAL; - } - - ieee = zd_mac_to_ieee80211(mac); - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&ieee->lock); - ieee->iw_mode = mode; - spin_unlock_irq(&ieee->lock); - - if (netif_running(mac->netdev)) - return reset_mode(mac); - - return 0; -} - -int zd_mac_get_mode(struct zd_mac *mac, u32 *mode) -{ - unsigned long flags; - struct ieee80211_device *ieee; - - ieee = zd_mac_to_ieee80211(mac); - spin_lock_irqsave(&ieee->lock, flags); - *mode = ieee->iw_mode; - spin_unlock_irqrestore(&ieee->lock, flags); - return 0; -} - -int zd_mac_get_range(struct zd_mac *mac, struct iw_range *range) -{ - int i; - const struct channel_range *channel_range; - u8 regdomain; - - memset(range, 0, sizeof(*range)); - - /* FIXME: Not so important and depends on the mode. For 802.11g - * usually this value is used. It seems to be that Bit/s number is - * given here. - */ - range->throughput = 27 * 1000 * 1000; - - range->max_qual.qual = 100; - range->max_qual.level = 100; - - /* FIXME: Needs still to be tuned. */ - range->avg_qual.qual = 71; - range->avg_qual.level = 80; - - /* FIXME: depends on standard? */ - range->min_rts = 256; - range->max_rts = 2346; - - range->min_frag = MIN_FRAG_THRESHOLD; - range->max_frag = MAX_FRAG_THRESHOLD; - - range->max_encoding_tokens = WEP_KEYS; - range->num_encoding_sizes = 2; - range->encoding_size[0] = 5; - range->encoding_size[1] = WEP_KEY_LEN; - - range->we_version_compiled = WIRELESS_EXT; - range->we_version_source = 20; - - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&mac->lock); - regdomain = mac->regdomain; - spin_unlock_irq(&mac->lock); - channel_range = zd_channel_range(regdomain); - - range->num_channels = channel_range->end - channel_range->start; - range->old_num_channels = range->num_channels; - range->num_frequency = range->num_channels; - range->old_num_frequency = range->num_frequency; - - for (i = 0; i < range->num_frequency; i++) { - struct iw_freq *freq = &range->freq[i]; - freq->i = channel_range->start + i; - zd_channel_to_freq(freq, freq->i); - } - - return 0; -} - -static int zd_calc_tx_length_us(u8 *service, u8 cs_rate, u16 tx_length) -{ - static const u8 rate_divisor[] = { - [ZD_CS_CCK_RATE_1M] = 1, - [ZD_CS_CCK_RATE_2M] = 2, - [ZD_CS_CCK_RATE_5_5M] = 11, /* bits must be doubled */ - [ZD_CS_CCK_RATE_11M] = 11, - [ZD_OFDM_RATE_6M] = 6, - [ZD_OFDM_RATE_9M] = 9, - [ZD_OFDM_RATE_12M] = 12, - [ZD_OFDM_RATE_18M] = 18, - [ZD_OFDM_RATE_24M] = 24, - [ZD_OFDM_RATE_36M] = 36, - [ZD_OFDM_RATE_48M] = 48, - [ZD_OFDM_RATE_54M] = 54, - }; - - u32 bits = (u32)tx_length * 8; - u32 divisor; - - divisor = rate_divisor[cs_rate]; - if (divisor == 0) - return -EINVAL; - - switch (cs_rate) { - case ZD_CS_CCK_RATE_5_5M: - bits = (2*bits) + 10; /* round up to the next integer */ - break; - case ZD_CS_CCK_RATE_11M: - if (service) { - u32 t = bits % 11; - *service &= ~ZD_PLCP_SERVICE_LENGTH_EXTENSION; - if (0 < t && t <= 3) { - *service |= ZD_PLCP_SERVICE_LENGTH_EXTENSION; - } - } - bits += 10; /* round up to the next integer */ - break; - } - - return bits/divisor; -} - -enum { - R2M_SHORT_PREAMBLE = 0x01, - R2M_11A = 0x02, -}; - -static u8 cs_rate_to_modulation(u8 cs_rate, int flags) -{ - u8 modulation; - - modulation = cs_typed_rate(cs_rate); - if (flags & R2M_SHORT_PREAMBLE) { - switch (ZD_CS_RATE(modulation)) { - case ZD_CS_CCK_RATE_2M: - case ZD_CS_CCK_RATE_5_5M: - case ZD_CS_CCK_RATE_11M: - modulation |= ZD_CS_CCK_PREA_SHORT; - return modulation; - } - } - if (flags & R2M_11A) { - if (ZD_CS_TYPE(modulation) == ZD_CS_OFDM) - modulation |= ZD_CS_OFDM_MODE_11A; - } - return modulation; -} - -static void cs_set_modulation(struct zd_mac *mac, struct zd_ctrlset *cs, - struct ieee80211_hdr_4addr *hdr) -{ - struct ieee80211softmac_device *softmac = ieee80211_priv(mac->netdev); - u16 ftype = WLAN_FC_GET_TYPE(le16_to_cpu(hdr->frame_ctl)); - u8 rate, cs_rate; - int is_mgt = (ftype == IEEE80211_FTYPE_MGMT) != 0; - - /* FIXME: 802.11a? short preamble? */ - rate = ieee80211softmac_suggest_txrate(softmac, - is_multicast_ether_addr(hdr->addr1), is_mgt); - - cs_rate = rate_to_cs_rate(rate); - cs->modulation = cs_rate_to_modulation(cs_rate, 0); -} - -static void cs_set_control(struct zd_mac *mac, struct zd_ctrlset *cs, - struct ieee80211_hdr_4addr *header) -{ - unsigned int tx_length = le16_to_cpu(cs->tx_length); - u16 fctl = le16_to_cpu(header->frame_ctl); - u16 ftype = WLAN_FC_GET_TYPE(fctl); - u16 stype = WLAN_FC_GET_STYPE(fctl); - - /* - * CONTROL: - * - start at 0x00 - * - if fragment 0, enable bit 0 - * - if backoff needed, enable bit 0 - * - if burst (backoff not needed) disable bit 0 - * - if multicast, enable bit 1 - * - if PS-POLL frame, enable bit 2 - * - if in INDEPENDENT_BSS mode and zd1205_DestPowerSave, then enable - * bit 4 (FIXME: wtf) - * - if frag_len > RTS threshold, set bit 5 as long if it isnt - * multicast or mgt - * - if bit 5 is set, and we are in OFDM mode, unset bit 5 and set bit - * 7 - */ - - cs->control = 0; - - /* First fragment */ - if (WLAN_GET_SEQ_FRAG(le16_to_cpu(header->seq_ctl)) == 0) - cs->control |= ZD_CS_NEED_RANDOM_BACKOFF; - - /* Multicast */ - if (is_multicast_ether_addr(header->addr1)) - cs->control |= ZD_CS_MULTICAST; - - /* PS-POLL */ - if (stype == IEEE80211_STYPE_PSPOLL) - cs->control |= ZD_CS_PS_POLL_FRAME; - - if (!is_multicast_ether_addr(header->addr1) && - ftype != IEEE80211_FTYPE_MGMT && - tx_length > zd_netdev_ieee80211(mac->netdev)->rts) - { - /* FIXME: check the logic */ - if (ZD_CS_TYPE(cs->modulation) == ZD_CS_OFDM) { - /* 802.11g */ - cs->control |= ZD_CS_SELF_CTS; - } else { /* 802.11b */ - cs->control |= ZD_CS_RTS; - } - } - - /* FIXME: Management frame? */ -} - -static int fill_ctrlset(struct zd_mac *mac, - struct ieee80211_txb *txb, - int frag_num) -{ - int r; - struct sk_buff *skb = txb->fragments[frag_num]; - struct ieee80211_hdr_4addr *hdr = - (struct ieee80211_hdr_4addr *) skb->data; - unsigned int frag_len = skb->len + IEEE80211_FCS_LEN; - unsigned int next_frag_len; - unsigned int packet_length; - struct zd_ctrlset *cs = (struct zd_ctrlset *) - skb_push(skb, sizeof(struct zd_ctrlset)); - - if (frag_num+1 < txb->nr_frags) { - next_frag_len = txb->fragments[frag_num+1]->len + - IEEE80211_FCS_LEN; - } else { - next_frag_len = 0; - } - ZD_ASSERT(frag_len <= 0xffff); - ZD_ASSERT(next_frag_len <= 0xffff); - - cs_set_modulation(mac, cs, hdr); - - cs->tx_length = cpu_to_le16(frag_len); - - cs_set_control(mac, cs, hdr); - - packet_length = frag_len + sizeof(struct zd_ctrlset) + 10; - ZD_ASSERT(packet_length <= 0xffff); - /* ZD1211B: Computing the length difference this way, gives us - * flexibility to compute the packet length. - */ - cs->packet_length = cpu_to_le16(mac->chip.is_zd1211b ? - packet_length - frag_len : packet_length); - - /* - * CURRENT LENGTH: - * - transmit frame length in microseconds - * - seems to be derived from frame length - * - see Cal_Us_Service() in zdinlinef.h - * - if macp->bTxBurstEnable is enabled, then multiply by 4 - * - bTxBurstEnable is never set in the vendor driver - * - * SERVICE: - * - "for PLCP configuration" - * - always 0 except in some situations at 802.11b 11M - * - see line 53 of zdinlinef.h - */ - cs->service = 0; - r = zd_calc_tx_length_us(&cs->service, ZD_CS_RATE(cs->modulation), - le16_to_cpu(cs->tx_length)); - if (r < 0) - return r; - cs->current_length = cpu_to_le16(r); - - if (next_frag_len == 0) { - cs->next_frame_length = 0; - } else { - r = zd_calc_tx_length_us(NULL, ZD_CS_RATE(cs->modulation), - next_frag_len); - if (r < 0) - return r; - cs->next_frame_length = cpu_to_le16(r); - } - - return 0; -} - -static int zd_mac_tx(struct zd_mac *mac, struct ieee80211_txb *txb, int pri) -{ - int i, r; - - for (i = 0; i < txb->nr_frags; i++) { - struct sk_buff *skb = txb->fragments[i]; - - r = fill_ctrlset(mac, txb, i); - if (r) - return r; - r = zd_usb_tx(&mac->chip.usb, skb->data, skb->len); - if (r) - return r; - } - - /* FIXME: shouldn't this be handled by the upper layers? */ - mac->netdev->trans_start = jiffies; - - ieee80211_txb_free(txb); - return 0; -} - -struct zd_rt_hdr { - struct ieee80211_radiotap_header rt_hdr; - u8 rt_flags; - u8 rt_rate; - u16 rt_channel; - u16 rt_chbitmask; -} __attribute__((packed)); - -static void fill_rt_header(void *buffer, struct zd_mac *mac, - const struct ieee80211_rx_stats *stats, - const struct rx_status *status) -{ - struct zd_rt_hdr *hdr = buffer; - - hdr->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; - hdr->rt_hdr.it_pad = 0; - hdr->rt_hdr.it_len = cpu_to_le16(sizeof(struct zd_rt_hdr)); - hdr->rt_hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | - (1 << IEEE80211_RADIOTAP_CHANNEL) | - (1 << IEEE80211_RADIOTAP_RATE)); - - hdr->rt_flags = 0; - if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) - hdr->rt_flags |= IEEE80211_RADIOTAP_F_WEP; - - hdr->rt_rate = stats->rate / 5; - - /* FIXME: 802.11a */ - hdr->rt_channel = cpu_to_le16(ieee80211chan2mhz( - _zd_chip_get_channel(&mac->chip))); - hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | - ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == - ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); -} - -/* Returns 1 if the data packet is for us and 0 otherwise. */ -static int is_data_packet_for_us(struct ieee80211_device *ieee, - struct ieee80211_hdr_4addr *hdr) -{ - struct net_device *netdev = ieee->dev; - u16 fc = le16_to_cpu(hdr->frame_ctl); - - ZD_ASSERT(WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA); - - switch (ieee->iw_mode) { - case IW_MODE_ADHOC: - if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) != 0 || - memcmp(hdr->addr3, ieee->bssid, ETH_ALEN) != 0) - return 0; - break; - case IW_MODE_AUTO: - case IW_MODE_INFRA: - if ((fc & (IEEE80211_FCTL_TODS|IEEE80211_FCTL_FROMDS)) != - IEEE80211_FCTL_FROMDS || - memcmp(hdr->addr2, ieee->bssid, ETH_ALEN) != 0) - return 0; - break; - default: - ZD_ASSERT(ieee->iw_mode != IW_MODE_MONITOR); - return 0; - } - - return memcmp(hdr->addr1, netdev->dev_addr, ETH_ALEN) == 0 || - is_multicast_ether_addr(hdr->addr1) || - (netdev->flags & IFF_PROMISC); -} - -/* Filters receiving packets. If it returns 1 send it to ieee80211_rx, if 0 - * return. If an error is detected -EINVAL is returned. ieee80211_rx_mgt() is - * called here. - * - * It has been based on ieee80211_rx_any. - */ -static int filter_rx(struct ieee80211_device *ieee, - const u8 *buffer, unsigned int length, - struct ieee80211_rx_stats *stats) -{ - struct ieee80211_hdr_4addr *hdr; - u16 fc; - - if (ieee->iw_mode == IW_MODE_MONITOR) - return 1; - - hdr = (struct ieee80211_hdr_4addr *)buffer; - fc = le16_to_cpu(hdr->frame_ctl); - if ((fc & IEEE80211_FCTL_VERS) != 0) - return -EINVAL; - - switch (WLAN_FC_GET_TYPE(fc)) { - case IEEE80211_FTYPE_MGMT: - if (length < sizeof(struct ieee80211_hdr_3addr)) - return -EINVAL; - ieee80211_rx_mgt(ieee, hdr, stats); - return 0; - case IEEE80211_FTYPE_CTL: - /* Ignore invalid short buffers */ - return 0; - case IEEE80211_FTYPE_DATA: - if (length < sizeof(struct ieee80211_hdr_3addr)) - return -EINVAL; - return is_data_packet_for_us(ieee, hdr); - } - - return -EINVAL; -} - -static void update_qual_rssi(struct zd_mac *mac, - const u8 *buffer, unsigned int length, - u8 qual_percent, u8 rssi_percent) -{ - unsigned long flags; - struct ieee80211_hdr_3addr *hdr; - int i; - - hdr = (struct ieee80211_hdr_3addr *)buffer; - if (length < offsetof(struct ieee80211_hdr_3addr, addr3)) - return; - if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0) - return; - - spin_lock_irqsave(&mac->lock, flags); - i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE; - mac->qual_buffer[i] = qual_percent; - mac->rssi_buffer[i] = rssi_percent; - mac->stats_count++; - spin_unlock_irqrestore(&mac->lock, flags); -} - -static int fill_rx_stats(struct ieee80211_rx_stats *stats, - const struct rx_status **pstatus, - struct zd_mac *mac, - const u8 *buffer, unsigned int length) -{ - const struct rx_status *status; - - *pstatus = status = zd_tail(buffer, length, sizeof(struct rx_status)); - if (status->frame_status & ZD_RX_ERROR) { - /* FIXME: update? */ - return -EINVAL; - } - memset(stats, 0, sizeof(struct ieee80211_rx_stats)); - stats->len = length - (ZD_PLCP_HEADER_SIZE + IEEE80211_FCS_LEN + - + sizeof(struct rx_status)); - /* FIXME: 802.11a */ - stats->freq = IEEE80211_24GHZ_BAND; - stats->received_channel = _zd_chip_get_channel(&mac->chip); - stats->rssi = zd_rx_strength_percent(status->signal_strength); - stats->signal = zd_rx_qual_percent(buffer, - length - sizeof(struct rx_status), - status); - stats->mask = IEEE80211_STATMASK_RSSI | IEEE80211_STATMASK_SIGNAL; - stats->rate = zd_rx_rate(buffer, status); - if (stats->rate) - stats->mask |= IEEE80211_STATMASK_RATE; - - return 0; -} - -int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length) -{ - int r; - struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); - struct ieee80211_rx_stats stats; - const struct rx_status *status; - struct sk_buff *skb; - - if (length < ZD_PLCP_HEADER_SIZE + IEEE80211_1ADDR_LEN + - IEEE80211_FCS_LEN + sizeof(struct rx_status)) - return -EINVAL; - - r = fill_rx_stats(&stats, &status, mac, buffer, length); - if (r) - return r; - - length -= ZD_PLCP_HEADER_SIZE+IEEE80211_FCS_LEN+ - sizeof(struct rx_status); - buffer += ZD_PLCP_HEADER_SIZE; - - update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi); - - r = filter_rx(ieee, buffer, length, &stats); - if (r <= 0) - return r; - - skb = dev_alloc_skb(sizeof(struct zd_rt_hdr) + length); - if (!skb) - return -ENOMEM; - if (ieee->iw_mode == IW_MODE_MONITOR) - fill_rt_header(skb_put(skb, sizeof(struct zd_rt_hdr)), mac, - &stats, status); - memcpy(skb_put(skb, length), buffer, length); - - r = ieee80211_rx(ieee, skb, &stats); - if (!r) { - ZD_ASSERT(in_irq()); - dev_kfree_skb_irq(skb); - } - return 0; -} - -static int netdev_tx(struct ieee80211_txb *txb, struct net_device *netdev, - int pri) -{ - return zd_mac_tx(zd_netdev_mac(netdev), txb, pri); -} - -static void set_security(struct net_device *netdev, - struct ieee80211_security *sec) -{ - struct ieee80211_device *ieee = zd_netdev_ieee80211(netdev); - struct ieee80211_security *secinfo = &ieee->sec; - int keyidx; - - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), "\n"); - - for (keyidx = 0; keyidxflags & (1<encode_alg[keyidx] = sec->encode_alg[keyidx]; - secinfo->key_sizes[keyidx] = sec->key_sizes[keyidx]; - memcpy(secinfo->keys[keyidx], sec->keys[keyidx], - SCM_KEY_LEN); - } - - if (sec->flags & SEC_ACTIVE_KEY) { - secinfo->active_key = sec->active_key; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .active_key = %d\n", sec->active_key); - } - if (sec->flags & SEC_UNICAST_GROUP) { - secinfo->unicast_uses_group = sec->unicast_uses_group; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .unicast_uses_group = %d\n", - sec->unicast_uses_group); - } - if (sec->flags & SEC_LEVEL) { - secinfo->level = sec->level; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .level = %d\n", sec->level); - } - if (sec->flags & SEC_ENABLED) { - secinfo->enabled = sec->enabled; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .enabled = %d\n", sec->enabled); - } - if (sec->flags & SEC_ENCRYPT) { - secinfo->encrypt = sec->encrypt; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .encrypt = %d\n", sec->encrypt); - } - if (sec->flags & SEC_AUTH_MODE) { - secinfo->auth_mode = sec->auth_mode; - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), - " .auth_mode = %d\n", sec->auth_mode); - } -} - -static void ieee_init(struct ieee80211_device *ieee) -{ - ieee->mode = IEEE_B | IEEE_G; - ieee->freq_band = IEEE80211_24GHZ_BAND; - ieee->modulation = IEEE80211_OFDM_MODULATION | IEEE80211_CCK_MODULATION; - ieee->tx_headroom = sizeof(struct zd_ctrlset); - ieee->set_security = set_security; - ieee->hard_start_xmit = netdev_tx; - - /* Software encryption/decryption for now */ - ieee->host_build_iv = 0; - ieee->host_encrypt = 1; - ieee->host_decrypt = 1; - - /* FIXME: default to managed mode, until ieee80211 and zd1211rw can - * correctly support AUTO */ - ieee->iw_mode = IW_MODE_INFRA; -} - -static void softmac_init(struct ieee80211softmac_device *sm) -{ - sm->set_channel = set_channel; -} - -struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev) -{ - struct zd_mac *mac = zd_netdev_mac(ndev); - struct iw_statistics *iw_stats = &mac->iw_stats; - unsigned int i, count, qual_total, rssi_total; - - memset(iw_stats, 0, sizeof(struct iw_statistics)); - /* We are not setting the status, because ieee->state is not updated - * at all and this driver doesn't track authentication state. - */ - spin_lock_irq(&mac->lock); - count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ? - mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE; - qual_total = rssi_total = 0; - for (i = 0; i < count; i++) { - qual_total += mac->qual_buffer[i]; - rssi_total += mac->rssi_buffer[i]; - } - spin_unlock_irq(&mac->lock); - iw_stats->qual.updated = IW_QUAL_NOISE_INVALID; - if (count > 0) { - iw_stats->qual.qual = qual_total / count; - iw_stats->qual.level = rssi_total / count; - iw_stats->qual.updated |= - IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED; - } else { - iw_stats->qual.updated |= - IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID; - } - /* TODO: update counter */ - return iw_stats; -} - -#ifdef DEBUG -static const char* decryption_types[] = { - [ZD_RX_NO_WEP] = "none", - [ZD_RX_WEP64] = "WEP64", - [ZD_RX_TKIP] = "TKIP", - [ZD_RX_AES] = "AES", - [ZD_RX_WEP128] = "WEP128", - [ZD_RX_WEP256] = "WEP256", -}; - -static const char *decryption_type_string(u8 type) -{ - const char *s; - - if (type < ARRAY_SIZE(decryption_types)) { - s = decryption_types[type]; - } else { - s = NULL; - } - return s ? s : "unknown"; -} - -static int is_ofdm(u8 frame_status) -{ - return (frame_status & ZD_RX_OFDM); -} - -void zd_dump_rx_status(const struct rx_status *status) -{ - const char* modulation; - u8 quality; - - if (is_ofdm(status->frame_status)) { - modulation = "ofdm"; - quality = status->signal_quality_ofdm; - } else { - modulation = "cck"; - quality = status->signal_quality_cck; - } - pr_debug("rx status %s strength %#04x qual %#04x decryption %s\n", - modulation, status->signal_strength, quality, - decryption_type_string(status->decryption_type)); - if (status->frame_status & ZD_RX_ERROR) { - pr_debug("rx error %s%s%s%s%s%s\n", - (status->frame_status & ZD_RX_TIMEOUT_ERROR) ? - "timeout " : "", - (status->frame_status & ZD_RX_FIFO_OVERRUN_ERROR) ? - "fifo " : "", - (status->frame_status & ZD_RX_DECRYPTION_ERROR) ? - "decryption " : "", - (status->frame_status & ZD_RX_CRC32_ERROR) ? - "crc32 " : "", - (status->frame_status & ZD_RX_NO_ADDR1_MATCH_ERROR) ? - "addr1 " : "", - (status->frame_status & ZD_RX_CRC16_ERROR) ? - "crc16" : ""); - } -} -#endif /* DEBUG */ diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h deleted file mode 100644 index b3ba49b84..000000000 --- a/drivers/net/wireless/zd1211rw/zd_mac.h +++ /dev/null @@ -1,193 +0,0 @@ -/* zd_mac.h - * - * 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 _ZD_MAC_H -#define _ZD_MAC_H - -#include -#include -#include -#include - -#include "zd_chip.h" -#include "zd_netdev.h" - -struct zd_ctrlset { - u8 modulation; - __le16 tx_length; - u8 control; - /* stores only the difference to tx_length on ZD1211B */ - __le16 packet_length; - __le16 current_length; - u8 service; - __le16 next_frame_length; -} __attribute__((packed)); - -#define ZD_CS_RESERVED_SIZE 25 - -/* zd_crtlset field modulation */ -#define ZD_CS_RATE_MASK 0x0f -#define ZD_CS_TYPE_MASK 0x10 -#define ZD_CS_RATE(modulation) ((modulation) & ZD_CS_RATE_MASK) -#define ZD_CS_TYPE(modulation) ((modulation) & ZD_CS_TYPE_MASK) - -#define ZD_CS_CCK 0x00 -#define ZD_CS_OFDM 0x10 - -#define ZD_CS_CCK_RATE_1M 0x00 -#define ZD_CS_CCK_RATE_2M 0x01 -#define ZD_CS_CCK_RATE_5_5M 0x02 -#define ZD_CS_CCK_RATE_11M 0x03 -/* The rates for OFDM are encoded as in the PLCP header. Use ZD_OFDM_RATE_*. - */ - -/* bit 5 is preamble (when in CCK mode), or a/g selection (when in OFDM mode) */ -#define ZD_CS_CCK_PREA_LONG 0x00 -#define ZD_CS_CCK_PREA_SHORT 0x20 -#define ZD_CS_OFDM_MODE_11G 0x00 -#define ZD_CS_OFDM_MODE_11A 0x20 - -/* zd_ctrlset control field */ -#define ZD_CS_NEED_RANDOM_BACKOFF 0x01 -#define ZD_CS_MULTICAST 0x02 - -#define ZD_CS_FRAME_TYPE_MASK 0x0c -#define ZD_CS_DATA_FRAME 0x00 -#define ZD_CS_PS_POLL_FRAME 0x04 -#define ZD_CS_MANAGEMENT_FRAME 0x08 -#define ZD_CS_NO_SEQUENCE_CTL_FRAME 0x0c - -#define ZD_CS_WAKE_DESTINATION 0x10 -#define ZD_CS_RTS 0x20 -#define ZD_CS_ENCRYPT 0x40 -#define ZD_CS_SELF_CTS 0x80 - -/* Incoming frames are prepended by a PLCP header */ -#define ZD_PLCP_HEADER_SIZE 5 - -struct rx_length_info { - __le16 length[3]; - __le16 tag; -} __attribute__((packed)); - -#define RX_LENGTH_INFO_TAG 0x697e - -struct rx_status { - u8 signal_quality_cck; - /* rssi */ - u8 signal_strength; - u8 signal_quality_ofdm; - u8 decryption_type; - u8 frame_status; -} __attribute__((packed)); - -/* rx_status field decryption_type */ -#define ZD_RX_NO_WEP 0 -#define ZD_RX_WEP64 1 -#define ZD_RX_TKIP 2 -#define ZD_RX_AES 4 -#define ZD_RX_WEP128 5 -#define ZD_RX_WEP256 6 - -/* rx_status field frame_status */ -#define ZD_RX_FRAME_MODULATION_MASK 0x01 -#define ZD_RX_CCK 0x00 -#define ZD_RX_OFDM 0x01 - -#define ZD_RX_TIMEOUT_ERROR 0x02 -#define ZD_RX_FIFO_OVERRUN_ERROR 0x04 -#define ZD_RX_DECRYPTION_ERROR 0x08 -#define ZD_RX_CRC32_ERROR 0x10 -#define ZD_RX_NO_ADDR1_MATCH_ERROR 0x20 -#define ZD_RX_CRC16_ERROR 0x40 -#define ZD_RX_ERROR 0x80 - -enum mac_flags { - MAC_FIXED_CHANNEL = 0x01, -}; - -#define ZD_MAC_STATS_BUFFER_SIZE 16 - -struct zd_mac { - struct net_device *netdev; - struct zd_chip chip; - spinlock_t lock; - /* Unlocked reading possible */ - struct iw_statistics iw_stats; - unsigned int stats_count; - u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; - u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE]; - u8 regdomain; - u8 default_regdomain; - u8 requested_channel; -}; - -static inline struct ieee80211_device *zd_mac_to_ieee80211(struct zd_mac *mac) -{ - return zd_netdev_ieee80211(mac->netdev); -} - -static inline struct zd_mac *zd_netdev_mac(struct net_device *netdev) -{ - return ieee80211softmac_priv(netdev); -} - -static inline struct zd_mac *zd_chip_to_mac(struct zd_chip *chip) -{ - return container_of(chip, struct zd_mac, chip); -} - -static inline struct zd_mac *zd_usb_to_mac(struct zd_usb *usb) -{ - return zd_chip_to_mac(zd_usb_to_chip(usb)); -} - -#define zd_mac_dev(mac) (zd_chip_dev(&(mac)->chip)) - -int zd_mac_init(struct zd_mac *mac, - struct net_device *netdev, - struct usb_interface *intf); -void zd_mac_clear(struct zd_mac *mac); - -int zd_mac_init_hw(struct zd_mac *mac, u8 device_type); - -int zd_mac_open(struct net_device *netdev); -int zd_mac_stop(struct net_device *netdev); -int zd_mac_set_mac_address(struct net_device *dev, void *p); - -int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length); - -int zd_mac_set_regdomain(struct zd_mac *zd_mac, u8 regdomain); -u8 zd_mac_get_regdomain(struct zd_mac *zd_mac); - -int zd_mac_request_channel(struct zd_mac *mac, u8 channel); -int zd_mac_get_channel(struct zd_mac *mac, u8 *channel, u8 *flags); - -int zd_mac_set_mode(struct zd_mac *mac, u32 mode); -int zd_mac_get_mode(struct zd_mac *mac, u32 *mode); - -int zd_mac_get_range(struct zd_mac *mac, struct iw_range *range); - -struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev); - -#ifdef DEBUG -void zd_dump_rx_status(const struct rx_status *status); -#else -#define zd_dump_rx_status(status) -#endif /* DEBUG */ - -#endif /* _ZD_MAC_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_netdev.c b/drivers/net/wireless/zd1211rw/zd_netdev.c deleted file mode 100644 index 9df232c2c..000000000 --- a/drivers/net/wireless/zd1211rw/zd_netdev.c +++ /dev/null @@ -1,267 +0,0 @@ -/* zd_netdev.c - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "zd_def.h" -#include "zd_netdev.h" -#include "zd_mac.h" -#include "zd_ieee80211.h" - -/* Region 0 means reset regdomain to default. */ -static int zd_set_regdomain(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - const u8 *regdomain = (u8 *)req; - return zd_mac_set_regdomain(zd_netdev_mac(netdev), *regdomain); -} - -static int zd_get_regdomain(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - u8 *regdomain = (u8 *)req; - if (!regdomain) - return -EINVAL; - *regdomain = zd_mac_get_regdomain(zd_netdev_mac(netdev)); - return 0; -} - -static const struct iw_priv_args zd_priv_args[] = { - { - .cmd = ZD_PRIV_SET_REGDOMAIN, - .set_args = IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, - .name = "set_regdomain", - }, - { - .cmd = ZD_PRIV_GET_REGDOMAIN, - .get_args = IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, - .name = "get_regdomain", - }, -}; - -#define PRIV_OFFSET(x) [(x)-SIOCIWFIRSTPRIV] - -static const iw_handler zd_priv_handler[] = { - PRIV_OFFSET(ZD_PRIV_SET_REGDOMAIN) = zd_set_regdomain, - PRIV_OFFSET(ZD_PRIV_GET_REGDOMAIN) = zd_get_regdomain, -}; - -static int iw_get_name(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - /* FIXME: check whether 802.11a will also supported, add also - * zd1211B, if we support it. - */ - strlcpy(req->name, "802.11g zd1211", IFNAMSIZ); - return 0; -} - -static int iw_set_freq(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - int r; - struct zd_mac *mac = zd_netdev_mac(netdev); - struct iw_freq *freq = &req->freq; - u8 channel; - - r = zd_find_channel(&channel, freq); - if (r < 0) - return r; - r = zd_mac_request_channel(mac, channel); - return r; -} - -static int iw_get_freq(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - int r; - struct zd_mac *mac = zd_netdev_mac(netdev); - struct iw_freq *freq = &req->freq; - u8 channel; - u8 flags; - - r = zd_mac_get_channel(mac, &channel, &flags); - if (r) - return r; - - freq->flags = (flags & MAC_FIXED_CHANNEL) ? - IW_FREQ_FIXED : IW_FREQ_AUTO; - dev_dbg_f(zd_mac_dev(mac), "channel %s\n", - (flags & MAC_FIXED_CHANNEL) ? "fixed" : "auto"); - return zd_channel_to_freq(freq, channel); -} - -static int iw_set_mode(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - return zd_mac_set_mode(zd_netdev_mac(netdev), req->mode); -} - -static int iw_get_mode(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - return zd_mac_get_mode(zd_netdev_mac(netdev), &req->mode); -} - -static int iw_get_range(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *req, char *extra) -{ - struct iw_range *range = (struct iw_range *)extra; - - dev_dbg_f(zd_mac_dev(zd_netdev_mac(netdev)), "\n"); - req->data.length = sizeof(*range); - return zd_mac_get_range(zd_netdev_mac(netdev), range); -} - -static int iw_set_encode(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *data, - char *extra) -{ - return ieee80211_wx_set_encode(zd_netdev_ieee80211(netdev), info, - data, extra); -} - -static int iw_get_encode(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *data, - char *extra) -{ - return ieee80211_wx_get_encode(zd_netdev_ieee80211(netdev), info, - data, extra); -} - -static int iw_set_encodeext(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *data, - char *extra) -{ - return ieee80211_wx_set_encodeext(zd_netdev_ieee80211(netdev), info, - data, extra); -} - -static int iw_get_encodeext(struct net_device *netdev, - struct iw_request_info *info, - union iwreq_data *data, - char *extra) -{ - return ieee80211_wx_get_encodeext(zd_netdev_ieee80211(netdev), info, - data, extra); -} - -#define WX(x) [(x)-SIOCIWFIRST] - -static const iw_handler zd_standard_iw_handlers[] = { - WX(SIOCGIWNAME) = iw_get_name, - WX(SIOCSIWFREQ) = iw_set_freq, - WX(SIOCGIWFREQ) = iw_get_freq, - WX(SIOCSIWMODE) = iw_set_mode, - WX(SIOCGIWMODE) = iw_get_mode, - WX(SIOCGIWRANGE) = iw_get_range, - WX(SIOCSIWENCODE) = iw_set_encode, - WX(SIOCGIWENCODE) = iw_get_encode, - WX(SIOCSIWENCODEEXT) = iw_set_encodeext, - WX(SIOCGIWENCODEEXT) = iw_get_encodeext, - WX(SIOCSIWAUTH) = ieee80211_wx_set_auth, - WX(SIOCGIWAUTH) = ieee80211_wx_get_auth, - WX(SIOCSIWSCAN) = ieee80211softmac_wx_trigger_scan, - WX(SIOCGIWSCAN) = ieee80211softmac_wx_get_scan_results, - WX(SIOCSIWESSID) = ieee80211softmac_wx_set_essid, - WX(SIOCGIWESSID) = ieee80211softmac_wx_get_essid, - WX(SIOCSIWAP) = ieee80211softmac_wx_set_wap, - WX(SIOCGIWAP) = ieee80211softmac_wx_get_wap, - WX(SIOCSIWRATE) = ieee80211softmac_wx_set_rate, - WX(SIOCGIWRATE) = ieee80211softmac_wx_get_rate, - WX(SIOCSIWGENIE) = ieee80211softmac_wx_set_genie, - WX(SIOCGIWGENIE) = ieee80211softmac_wx_get_genie, - WX(SIOCSIWMLME) = ieee80211softmac_wx_set_mlme, -}; - -static const struct iw_handler_def iw_handler_def = { - .standard = zd_standard_iw_handlers, - .num_standard = ARRAY_SIZE(zd_standard_iw_handlers), - .private = zd_priv_handler, - .num_private = ARRAY_SIZE(zd_priv_handler), - .private_args = zd_priv_args, - .num_private_args = ARRAY_SIZE(zd_priv_args), - .get_wireless_stats = zd_mac_get_wireless_stats, -}; - -struct net_device *zd_netdev_alloc(struct usb_interface *intf) -{ - int r; - struct net_device *netdev; - struct zd_mac *mac; - - netdev = alloc_ieee80211softmac(sizeof(struct zd_mac)); - if (!netdev) { - dev_dbg_f(&intf->dev, "out of memory\n"); - return NULL; - } - - mac = zd_netdev_mac(netdev); - r = zd_mac_init(mac, netdev, intf); - if (r) { - usb_set_intfdata(intf, NULL); - free_ieee80211(netdev); - return NULL; - } - - SET_MODULE_OWNER(netdev); - SET_NETDEV_DEV(netdev, &intf->dev); - - dev_dbg_f(&intf->dev, "netdev->flags %#06hx\n", netdev->flags); - dev_dbg_f(&intf->dev, "netdev->features %#010lx\n", netdev->features); - - netdev->open = zd_mac_open; - netdev->stop = zd_mac_stop; - /* netdev->get_stats = */ - /* netdev->set_multicast_list = */ - netdev->set_mac_address = zd_mac_set_mac_address; - netdev->wireless_handlers = &iw_handler_def; - /* netdev->ethtool_ops = */ - - return netdev; -} - -void zd_netdev_free(struct net_device *netdev) -{ - if (!netdev) - return; - - zd_mac_clear(zd_netdev_mac(netdev)); - free_ieee80211(netdev); -} - -void zd_netdev_disconnect(struct net_device *netdev) -{ - unregister_netdev(netdev); -} diff --git a/drivers/net/wireless/zd1211rw/zd_netdev.h b/drivers/net/wireless/zd1211rw/zd_netdev.h deleted file mode 100644 index 374a95707..000000000 --- a/drivers/net/wireless/zd1211rw/zd_netdev.h +++ /dev/null @@ -1,45 +0,0 @@ -/* zd_netdev.h: Header for net device related 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. - * - * 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 _ZD_NETDEV_H -#define _ZD_NETDEV_H - -#include -#include -#include - -#define ZD_PRIV_SET_REGDOMAIN (SIOCIWFIRSTPRIV) -#define ZD_PRIV_GET_REGDOMAIN (SIOCIWFIRSTPRIV+1) - -static inline struct ieee80211_device *zd_netdev_ieee80211( - struct net_device *ndev) -{ - return netdev_priv(ndev); -} - -static inline struct net_device *zd_ieee80211_to_netdev( - struct ieee80211_device *ieee) -{ - return ieee->dev; -} - -struct net_device *zd_netdev_alloc(struct usb_interface *intf); -void zd_netdev_free(struct net_device *netdev); - -void zd_netdev_disconnect(struct net_device *netdev); - -#endif /* _ZD_NETDEV_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_rf.c b/drivers/net/wireless/zd1211rw/zd_rf.c deleted file mode 100644 index d3770d2c6..000000000 --- a/drivers/net/wireless/zd1211rw/zd_rf.c +++ /dev/null @@ -1,151 +0,0 @@ -/* zd_rf.c - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include "zd_def.h" -#include "zd_rf.h" -#include "zd_ieee80211.h" -#include "zd_chip.h" - -static const char *rfs[] = { - [0] = "unknown RF0", - [1] = "unknown RF1", - [UW2451_RF] = "UW2451_RF", - [UCHIP_RF] = "UCHIP_RF", - [AL2230_RF] = "AL2230_RF", - [AL7230B_RF] = "AL7230B_RF", - [THETA_RF] = "THETA_RF", - [AL2210_RF] = "AL2210_RF", - [MAXIM_NEW_RF] = "MAXIM_NEW_RF", - [UW2453_RF] = "UW2453_RF", - [AL2230S_RF] = "AL2230S_RF", - [RALINK_RF] = "RALINK_RF", - [INTERSIL_RF] = "INTERSIL_RF", - [RF2959_RF] = "RF2959_RF", - [MAXIM_NEW2_RF] = "MAXIM_NEW2_RF", - [PHILIPS_RF] = "PHILIPS_RF", -}; - -const char *zd_rf_name(u8 type) -{ - if (type & 0xf0) - type = 0; - return rfs[type]; -} - -void zd_rf_init(struct zd_rf *rf) -{ - memset(rf, 0, sizeof(*rf)); -} - -void zd_rf_clear(struct zd_rf *rf) -{ - memset(rf, 0, sizeof(*rf)); -} - -int zd_rf_init_hw(struct zd_rf *rf, u8 type) -{ - int r, t; - struct zd_chip *chip = zd_rf_to_chip(rf); - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - switch (type) { - case RF2959_RF: - r = zd_rf_init_rf2959(rf); - if (r) - return r; - break; - case AL2230_RF: - r = zd_rf_init_al2230(rf); - if (r) - return r; - break; - default: - dev_err(zd_chip_dev(chip), - "RF %s %#x is not supported\n", zd_rf_name(type), type); - rf->type = 0; - return -ENODEV; - } - - rf->type = type; - - r = zd_chip_lock_phy_regs(chip); - if (r) - return r; - t = rf->init_hw(rf); - r = zd_chip_unlock_phy_regs(chip); - if (t) - r = t; - return r; -} - -int zd_rf_scnprint_id(struct zd_rf *rf, char *buffer, size_t size) -{ - return scnprintf(buffer, size, "%s", zd_rf_name(rf->type)); -} - -int zd_rf_set_channel(struct zd_rf *rf, u8 channel) -{ - int r; - - ZD_ASSERT(mutex_is_locked(&zd_rf_to_chip(rf)->mutex)); - if (channel < MIN_CHANNEL24) - return -EINVAL; - if (channel > MAX_CHANNEL24) - return -EINVAL; - dev_dbg_f(zd_chip_dev(zd_rf_to_chip(rf)), "channel: %d\n", channel); - - r = rf->set_channel(rf, channel); - if (r >= 0) - rf->channel = channel; - return r; -} - -int zd_switch_radio_on(struct zd_rf *rf) -{ - int r, t; - struct zd_chip *chip = zd_rf_to_chip(rf); - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_chip_lock_phy_regs(chip); - if (r) - return r; - t = rf->switch_radio_on(rf); - r = zd_chip_unlock_phy_regs(chip); - if (t) - r = t; - return r; -} - -int zd_switch_radio_off(struct zd_rf *rf) -{ - int r, t; - struct zd_chip *chip = zd_rf_to_chip(rf); - - /* TODO: move phy regs handling to zd_chip */ - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_chip_lock_phy_regs(chip); - if (r) - return r; - t = rf->switch_radio_off(rf); - r = zd_chip_unlock_phy_regs(chip); - if (t) - r = t; - return r; -} diff --git a/drivers/net/wireless/zd1211rw/zd_rf.h b/drivers/net/wireless/zd1211rw/zd_rf.h deleted file mode 100644 index ea30f693f..000000000 --- a/drivers/net/wireless/zd1211rw/zd_rf.h +++ /dev/null @@ -1,82 +0,0 @@ -/* zd_rf.h - * - * 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 _ZD_RF_H -#define _ZD_RF_H - -#include "zd_types.h" - -#define UW2451_RF 0x2 -#define UCHIP_RF 0x3 -#define AL2230_RF 0x4 -#define AL7230B_RF 0x5 /* a,b,g */ -#define THETA_RF 0x6 -#define AL2210_RF 0x7 -#define MAXIM_NEW_RF 0x8 -#define UW2453_RF 0x9 -#define AL2230S_RF 0xa -#define RALINK_RF 0xb -#define INTERSIL_RF 0xc -#define RF2959_RF 0xd -#define MAXIM_NEW2_RF 0xe -#define PHILIPS_RF 0xf - -#define RF_CHANNEL(ch) [(ch)-1] - -/* Provides functions of the RF transceiver. */ - -enum { - RF_REG_BITS = 6, - RF_VALUE_BITS = 18, - RF_RV_BITS = RF_REG_BITS + RF_VALUE_BITS, -}; - -struct zd_rf { - u8 type; - - u8 channel; - /* - * Whether this RF should patch the 6M band edge - * (assuming E2P_POD agrees) - */ - u8 patch_6m_band_edge:1; - - /* RF-specific functions */ - int (*init_hw)(struct zd_rf *rf); - int (*set_channel)(struct zd_rf *rf, u8 channel); - int (*switch_radio_on)(struct zd_rf *rf); - int (*switch_radio_off)(struct zd_rf *rf); -}; - -const char *zd_rf_name(u8 type); -void zd_rf_init(struct zd_rf *rf); -void zd_rf_clear(struct zd_rf *rf); -int zd_rf_init_hw(struct zd_rf *rf, u8 type); - -int zd_rf_scnprint_id(struct zd_rf *rf, char *buffer, size_t size); - -int zd_rf_set_channel(struct zd_rf *rf, u8 channel); - -int zd_switch_radio_on(struct zd_rf *rf); -int zd_switch_radio_off(struct zd_rf *rf); - -/* Functions for individual RF chips */ - -int zd_rf_init_rf2959(struct zd_rf *rf); -int zd_rf_init_al2230(struct zd_rf *rf); - -#endif /* _ZD_RF_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c b/drivers/net/wireless/zd1211rw/zd_rf_al2230.c deleted file mode 100644 index 0948b25f6..000000000 --- a/drivers/net/wireless/zd1211rw/zd_rf_al2230.c +++ /dev/null @@ -1,308 +0,0 @@ -/* zd_rf_al2230.c: Functions for the AL2230 RF controller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include "zd_rf.h" -#include "zd_usb.h" -#include "zd_chip.h" - -static const u32 al2230_table[][3] = { - RF_CHANNEL( 1) = { 0x03f790, 0x033331, 0x00000d, }, - RF_CHANNEL( 2) = { 0x03f790, 0x0b3331, 0x00000d, }, - RF_CHANNEL( 3) = { 0x03e790, 0x033331, 0x00000d, }, - RF_CHANNEL( 4) = { 0x03e790, 0x0b3331, 0x00000d, }, - RF_CHANNEL( 5) = { 0x03f7a0, 0x033331, 0x00000d, }, - RF_CHANNEL( 6) = { 0x03f7a0, 0x0b3331, 0x00000d, }, - RF_CHANNEL( 7) = { 0x03e7a0, 0x033331, 0x00000d, }, - RF_CHANNEL( 8) = { 0x03e7a0, 0x0b3331, 0x00000d, }, - RF_CHANNEL( 9) = { 0x03f7b0, 0x033331, 0x00000d, }, - RF_CHANNEL(10) = { 0x03f7b0, 0x0b3331, 0x00000d, }, - RF_CHANNEL(11) = { 0x03e7b0, 0x033331, 0x00000d, }, - RF_CHANNEL(12) = { 0x03e7b0, 0x0b3331, 0x00000d, }, - RF_CHANNEL(13) = { 0x03f7c0, 0x033331, 0x00000d, }, - RF_CHANNEL(14) = { 0x03e7c0, 0x066661, 0x00000d, }, -}; - -static int zd1211_al2230_init_hw(struct zd_rf *rf) -{ - int r; - struct zd_chip *chip = zd_rf_to_chip(rf); - - static const struct zd_ioreq16 ioreqs[] = { - { CR15, 0x20 }, { CR23, 0x40 }, { CR24, 0x20 }, - { CR26, 0x11 }, { CR28, 0x3e }, { CR29, 0x00 }, - { CR44, 0x33 }, { CR106, 0x2a }, { CR107, 0x1a }, - { CR109, 0x09 }, { CR110, 0x27 }, { CR111, 0x2b }, - { CR112, 0x2b }, { CR119, 0x0a }, { CR10, 0x89 }, - /* for newest (3rd cut) AL2300 */ - { CR17, 0x28 }, - { CR26, 0x93 }, { CR34, 0x30 }, - /* for newest (3rd cut) AL2300 */ - { CR35, 0x3e }, - { CR41, 0x24 }, { CR44, 0x32 }, - /* for newest (3rd cut) AL2300 */ - { CR46, 0x96 }, - { CR47, 0x1e }, { CR79, 0x58 }, { CR80, 0x30 }, - { CR81, 0x30 }, { CR87, 0x0a }, { CR89, 0x04 }, - { CR92, 0x0a }, { CR99, 0x28 }, { CR100, 0x00 }, - { CR101, 0x13 }, { CR102, 0x27 }, { CR106, 0x24 }, - { CR107, 0x2a }, { CR109, 0x09 }, { CR110, 0x13 }, - { CR111, 0x1f }, { CR112, 0x1f }, { CR113, 0x27 }, - { CR114, 0x27 }, - /* for newest (3rd cut) AL2300 */ - { CR115, 0x24 }, - { CR116, 0x24 }, { CR117, 0xf4 }, { CR118, 0xfc }, - { CR119, 0x10 }, { CR120, 0x4f }, { CR121, 0x77 }, - { CR122, 0xe0 }, { CR137, 0x88 }, { CR252, 0xff }, - { CR253, 0xff }, - - /* These following happen separately in the vendor driver */ - { }, - - /* shdnb(PLL_ON)=0 */ - { CR251, 0x2f }, - /* shdnb(PLL_ON)=1 */ - { CR251, 0x3f }, - { CR138, 0x28 }, { CR203, 0x06 }, - }; - - static const u32 rv[] = { - /* Channel 1 */ - 0x03f790, - 0x033331, - 0x00000d, - - 0x0b3331, - 0x03b812, - 0x00fff3, - 0x000da4, - 0x0f4dc5, /* fix freq shift, 0x04edc5 */ - 0x0805b6, - 0x011687, - 0x000688, - 0x0403b9, /* external control TX power (CR31) */ - 0x00dbba, - 0x00099b, - 0x0bdffc, - 0x00000d, - 0x00500f, - - /* These writes happen separately in the vendor driver */ - 0x00d00f, - 0x004c0f, - 0x00540f, - 0x00700f, - 0x00500f, - }; - - r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) - return r; - - r = zd_rfwritev_locked(chip, rv, ARRAY_SIZE(rv), RF_RV_BITS); - if (r) - return r; - - return 0; -} - -static int zd1211b_al2230_init_hw(struct zd_rf *rf) -{ - int r; - struct zd_chip *chip = zd_rf_to_chip(rf); - - static const struct zd_ioreq16 ioreqs1[] = { - { CR10, 0x89 }, { CR15, 0x20 }, - { CR17, 0x2B }, /* for newest(3rd cut) AL2230 */ - { CR23, 0x40 }, { CR24, 0x20 }, { CR26, 0x93 }, - { CR28, 0x3e }, { CR29, 0x00 }, - { CR33, 0x28 }, /* 5621 */ - { CR34, 0x30 }, - { CR35, 0x3e }, /* for newest(3rd cut) AL2230 */ - { CR41, 0x24 }, { CR44, 0x32 }, - { CR46, 0x99 }, /* for newest(3rd cut) AL2230 */ - { CR47, 0x1e }, - - /* ZD1211B 05.06.10 */ - { CR48, 0x00 }, { CR49, 0x00 }, { CR51, 0x01 }, - { CR52, 0x80 }, { CR53, 0x7e }, { CR65, 0x00 }, - { CR66, 0x00 }, { CR67, 0x00 }, { CR68, 0x00 }, - { CR69, 0x28 }, - - { CR79, 0x58 }, { CR80, 0x30 }, { CR81, 0x30 }, - { CR87, 0x0a }, { CR89, 0x04 }, - { CR91, 0x00 }, /* 5621 */ - { CR92, 0x0a }, - { CR98, 0x8d }, /* 4804, for 1212 new algorithm */ - { CR99, 0x00 }, /* 5621 */ - { CR101, 0x13 }, { CR102, 0x27 }, - { CR106, 0x24 }, /* for newest(3rd cut) AL2230 */ - { CR107, 0x2a }, - { CR109, 0x13 }, /* 4804, for 1212 new algorithm */ - { CR110, 0x1f }, /* 4804, for 1212 new algorithm */ - { CR111, 0x1f }, { CR112, 0x1f }, { CR113, 0x27 }, - { CR114, 0x27 }, - { CR115, 0x26 }, /* 24->26 at 4902 for newest(3rd cut) AL2230 */ - { CR116, 0x24 }, - { CR117, 0xfa }, /* for 1211b */ - { CR118, 0xfa }, /* for 1211b */ - { CR119, 0x10 }, - { CR120, 0x4f }, - { CR121, 0x6c }, /* for 1211b */ - { CR122, 0xfc }, /* E0->FC at 4902 */ - { CR123, 0x57 }, /* 5623 */ - { CR125, 0xad }, /* 4804, for 1212 new algorithm */ - { CR126, 0x6c }, /* 5614 */ - { CR127, 0x03 }, /* 4804, for 1212 new algorithm */ - { CR137, 0x50 }, /* 5614 */ - { CR138, 0xa8 }, - { CR144, 0xac }, /* 5621 */ - { CR150, 0x0d }, { CR252, 0x00 }, { CR253, 0x00 }, - }; - - static const u32 rv1[] = { - /* channel 1 */ - 0x03f790, - 0x033331, - 0x00000d, - - 0x0b3331, - 0x03b812, - 0x00fff3, - 0x0005a4, - 0x0f4dc5, /* fix freq shift 0x044dc5 */ - 0x0805b6, - 0x0146c7, - 0x000688, - 0x0403b9, /* External control TX power (CR31) */ - 0x00dbba, - 0x00099b, - 0x0bdffc, - 0x00000d, - 0x00580f, - }; - - static const struct zd_ioreq16 ioreqs2[] = { - { CR47, 0x1e }, { CR_RFCFG, 0x03 }, - }; - - static const u32 rv2[] = { - 0x00880f, - 0x00080f, - }; - - static const struct zd_ioreq16 ioreqs3[] = { - { CR_RFCFG, 0x00 }, { CR47, 0x1e }, { CR251, 0x7f }, - }; - - static const u32 rv3[] = { - 0x00d80f, - 0x00780f, - 0x00580f, - }; - - static const struct zd_ioreq16 ioreqs4[] = { - { CR138, 0x28 }, { CR203, 0x06 }, - }; - - r = zd_iowrite16a_locked(chip, ioreqs1, ARRAY_SIZE(ioreqs1)); - if (r) - return r; - r = zd_rfwritev_locked(chip, rv1, ARRAY_SIZE(rv1), RF_RV_BITS); - if (r) - return r; - r = zd_iowrite16a_locked(chip, ioreqs2, ARRAY_SIZE(ioreqs2)); - if (r) - return r; - r = zd_rfwritev_locked(chip, rv2, ARRAY_SIZE(rv2), RF_RV_BITS); - if (r) - return r; - r = zd_iowrite16a_locked(chip, ioreqs3, ARRAY_SIZE(ioreqs3)); - if (r) - return r; - r = zd_rfwritev_locked(chip, rv3, ARRAY_SIZE(rv3), RF_RV_BITS); - if (r) - return r; - return zd_iowrite16a_locked(chip, ioreqs4, ARRAY_SIZE(ioreqs4)); -} - -static int al2230_set_channel(struct zd_rf *rf, u8 channel) -{ - int r; - const u32 *rv = al2230_table[channel-1]; - struct zd_chip *chip = zd_rf_to_chip(rf); - static const struct zd_ioreq16 ioreqs[] = { - { CR138, 0x28 }, - { CR203, 0x06 }, - }; - - r = zd_rfwritev_locked(chip, rv, 3, RF_RV_BITS); - if (r) - return r; - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int zd1211_al2230_switch_radio_on(struct zd_rf *rf) -{ - struct zd_chip *chip = zd_rf_to_chip(rf); - static const struct zd_ioreq16 ioreqs[] = { - { CR11, 0x00 }, - { CR251, 0x3f }, - }; - - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int zd1211b_al2230_switch_radio_on(struct zd_rf *rf) -{ - struct zd_chip *chip = zd_rf_to_chip(rf); - static const struct zd_ioreq16 ioreqs[] = { - { CR11, 0x00 }, - { CR251, 0x7f }, - }; - - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int al2230_switch_radio_off(struct zd_rf *rf) -{ - struct zd_chip *chip = zd_rf_to_chip(rf); - static const struct zd_ioreq16 ioreqs[] = { - { CR11, 0x04 }, - { CR251, 0x2f }, - }; - - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -int zd_rf_init_al2230(struct zd_rf *rf) -{ - struct zd_chip *chip = zd_rf_to_chip(rf); - - rf->set_channel = al2230_set_channel; - rf->switch_radio_off = al2230_switch_radio_off; - if (chip->is_zd1211b) { - rf->init_hw = zd1211b_al2230_init_hw; - rf->switch_radio_on = zd1211b_al2230_switch_radio_on; - } else { - rf->init_hw = zd1211_al2230_init_hw; - rf->switch_radio_on = zd1211_al2230_switch_radio_on; - } - rf->patch_6m_band_edge = 1; - return 0; -} diff --git a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c b/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c deleted file mode 100644 index 58247271c..000000000 --- a/drivers/net/wireless/zd1211rw/zd_rf_rf2959.c +++ /dev/null @@ -1,279 +0,0 @@ -/* zd_rf_rfmd.c: Functions for the RFMD RF controller - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include "zd_rf.h" -#include "zd_usb.h" -#include "zd_chip.h" - -static u32 rf2959_table[][2] = { - RF_CHANNEL( 1) = { 0x181979, 0x1e6666 }, - RF_CHANNEL( 2) = { 0x181989, 0x1e6666 }, - RF_CHANNEL( 3) = { 0x181999, 0x1e6666 }, - RF_CHANNEL( 4) = { 0x1819a9, 0x1e6666 }, - RF_CHANNEL( 5) = { 0x1819b9, 0x1e6666 }, - RF_CHANNEL( 6) = { 0x1819c9, 0x1e6666 }, - RF_CHANNEL( 7) = { 0x1819d9, 0x1e6666 }, - RF_CHANNEL( 8) = { 0x1819e9, 0x1e6666 }, - RF_CHANNEL( 9) = { 0x1819f9, 0x1e6666 }, - RF_CHANNEL(10) = { 0x181a09, 0x1e6666 }, - RF_CHANNEL(11) = { 0x181a19, 0x1e6666 }, - RF_CHANNEL(12) = { 0x181a29, 0x1e6666 }, - RF_CHANNEL(13) = { 0x181a39, 0x1e6666 }, - RF_CHANNEL(14) = { 0x181a60, 0x1c0000 }, -}; - -#if 0 -static int bits(u32 rw, int from, int to) -{ - rw &= ~(0xffffffffU << (to+1)); - rw >>= from; - return rw; -} - -static int bit(u32 rw, int bit) -{ - return bits(rw, bit, bit); -} - -static void dump_regwrite(u32 rw) -{ - int reg = bits(rw, 18, 22); - int rw_flag = bits(rw, 23, 23); - PDEBUG("rf2959 %#010x reg %d rw %d", rw, reg, rw_flag); - - switch (reg) { - case 0: - PDEBUG("reg0 CFG1 ref_sel %d hybernate %d rf_vco_reg_en %d" - " if_vco_reg_en %d if_vga_en %d", - bits(rw, 14, 15), bit(rw, 3), bit(rw, 2), bit(rw, 1), - bit(rw, 0)); - break; - case 1: - PDEBUG("reg1 IFPLL1 pll_en1 %d kv_en1 %d vtc_en1 %d lpf1 %d" - " cpl1 %d pdp1 %d autocal_en1 %d ld_en1 %d ifloopr %d" - " ifloopc %d dac1 %d", - bit(rw, 17), bit(rw, 16), bit(rw, 15), bit(rw, 14), - bit(rw, 13), bit(rw, 12), bit(rw, 11), bit(rw, 10), - bits(rw, 7, 9), bits(rw, 4, 6), bits(rw, 0, 3)); - break; - case 2: - PDEBUG("reg2 IFPLL2 n1 %d num1 %d", - bits(rw, 6, 17), bits(rw, 0, 5)); - break; - case 3: - PDEBUG("reg3 IFPLL3 num %d", bits(rw, 0, 17)); - break; - case 4: - PDEBUG("reg4 IFPLL4 dn1 %#04x ct_def1 %d kv_def1 %d", - bits(rw, 8, 16), bits(rw, 4, 7), bits(rw, 0, 3)); - break; - case 5: - PDEBUG("reg5 RFPLL1 pll_en %d kv_en %d vtc_en %d lpf %d cpl %d" - " pdp %d autocal_en %d ld_en %d rfloopr %d rfloopc %d" - " dac %d", - bit(rw, 17), bit(rw, 16), bit(rw, 15), bit(rw, 14), - bit(rw, 13), bit(rw, 12), bit(rw, 11), bit(rw, 10), - bits(rw, 7, 9), bits(rw, 4, 6), bits(rw, 0,3)); - break; - case 6: - PDEBUG("reg6 RFPLL2 n %d num %d", - bits(rw, 6, 17), bits(rw, 0, 5)); - break; - case 7: - PDEBUG("reg7 RFPLL3 num2 %d", bits(rw, 0, 17)); - break; - case 8: - PDEBUG("reg8 RFPLL4 dn %#06x ct_def %d kv_def %d", - bits(rw, 8, 16), bits(rw, 4, 7), bits(rw, 0, 3)); - break; - case 9: - PDEBUG("reg9 CAL1 tvco %d tlock %d m_ct_value %d ld_window %d", - bits(rw, 13, 17), bits(rw, 8, 12), bits(rw, 3, 7), - bits(rw, 0, 2)); - break; - case 10: - PDEBUG("reg10 TXRX1 rxdcfbbyps %d pcontrol %d txvgc %d" - " rxlpfbw %d txlpfbw %d txdiffmode %d txenmode %d" - " intbiasen %d tybypass %d", - bit(rw, 17), bits(rw, 15, 16), bits(rw, 10, 14), - bits(rw, 7, 9), bits(rw, 4, 6), bit(rw, 3), bit(rw, 2), - bit(rw, 1), bit(rw, 0)); - break; - case 11: - PDEBUG("reg11 PCNT1 mid_bias %d p_desired %d pc_offset %d" - " tx_delay %d", - bits(rw, 15, 17), bits(rw, 9, 14), bits(rw, 3, 8), - bits(rw, 0, 2)); - break; - case 12: - PDEBUG("reg12 PCNT2 max_power %d mid_power %d min_power %d", - bits(rw, 12, 17), bits(rw, 6, 11), bits(rw, 0, 5)); - break; - case 13: - PDEBUG("reg13 VCOT1 rfpll vco comp %d ifpll vco comp %d" - " lobias %d if_biasbuf %d if_biasvco %d rf_biasbuf %d" - " rf_biasvco %d", - bit(rw, 17), bit(rw, 16), bit(rw, 15), - bits(rw, 8, 9), bits(rw, 5, 7), bits(rw, 3, 4), - bits(rw, 0, 2)); - break; - case 14: - PDEBUG("reg14 IQCAL rx_acal %d rx_pcal %d" - " tx_acal %d tx_pcal %d", - bits(rw, 13, 17), bits(rw, 9, 12), bits(rw, 4, 8), - bits(rw, 0, 3)); - break; - } -} -#endif /* 0 */ - -static int rf2959_init_hw(struct zd_rf *rf) -{ - int r; - struct zd_chip *chip = zd_rf_to_chip(rf); - - static const struct zd_ioreq16 ioreqs[] = { - { CR2, 0x1E }, { CR9, 0x20 }, { CR10, 0x89 }, - { CR11, 0x00 }, { CR15, 0xD0 }, { CR17, 0x68 }, - { CR19, 0x4a }, { CR20, 0x0c }, { CR21, 0x0E }, - { CR23, 0x48 }, - /* normal size for cca threshold */ - { CR24, 0x14 }, - /* { CR24, 0x20 }, */ - { CR26, 0x90 }, { CR27, 0x30 }, { CR29, 0x20 }, - { CR31, 0xb2 }, { CR32, 0x43 }, { CR33, 0x28 }, - { CR38, 0x30 }, { CR34, 0x0f }, { CR35, 0xF0 }, - { CR41, 0x2a }, { CR46, 0x7F }, { CR47, 0x1E }, - { CR51, 0xc5 }, { CR52, 0xc5 }, { CR53, 0xc5 }, - { CR79, 0x58 }, { CR80, 0x30 }, { CR81, 0x30 }, - { CR82, 0x00 }, { CR83, 0x24 }, { CR84, 0x04 }, - { CR85, 0x00 }, { CR86, 0x10 }, { CR87, 0x2A }, - { CR88, 0x10 }, { CR89, 0x24 }, { CR90, 0x18 }, - /* { CR91, 0x18 }, */ - /* should solve continous CTS frame problems */ - { CR91, 0x00 }, - { CR92, 0x0a }, { CR93, 0x00 }, { CR94, 0x01 }, - { CR95, 0x00 }, { CR96, 0x40 }, { CR97, 0x37 }, - { CR98, 0x05 }, { CR99, 0x28 }, { CR100, 0x00 }, - { CR101, 0x13 }, { CR102, 0x27 }, { CR103, 0x27 }, - { CR104, 0x18 }, { CR105, 0x12 }, - /* normal size */ - { CR106, 0x1a }, - /* { CR106, 0x22 }, */ - { CR107, 0x24 }, { CR108, 0x0a }, { CR109, 0x13 }, - { CR110, 0x2F }, { CR111, 0x27 }, { CR112, 0x27 }, - { CR113, 0x27 }, { CR114, 0x27 }, { CR115, 0x40 }, - { CR116, 0x40 }, { CR117, 0xF0 }, { CR118, 0xF0 }, - { CR119, 0x16 }, - /* no TX continuation */ - { CR122, 0x00 }, - /* { CR122, 0xff }, */ - { CR127, 0x03 }, { CR131, 0x08 }, { CR138, 0x28 }, - { CR148, 0x44 }, { CR150, 0x10 }, { CR169, 0xBB }, - { CR170, 0xBB }, - }; - - static const u32 rv[] = { - 0x000007, /* REG0(CFG1) */ - 0x07dd43, /* REG1(IFPLL1) */ - 0x080959, /* REG2(IFPLL2) */ - 0x0e6666, - 0x116a57, /* REG4 */ - 0x17dd43, /* REG5 */ - 0x1819f9, /* REG6 */ - 0x1e6666, - 0x214554, - 0x25e7fa, - 0x27fffa, - /* The Zydas driver somehow forgets to set this value. It's - * only set for Japan. We are using internal power control - * for now. - */ - 0x294128, /* internal power */ - /* 0x28252c, */ /* External control TX power */ - /* CR31_CCK, CR51_6-36M, CR52_48M, CR53_54M */ - 0x2c0000, - 0x300000, - 0x340000, /* REG13(0xD) */ - 0x381e0f, /* REG14(0xE) */ - /* Bogus, RF2959's data sheet doesn't know register 27, which is - * actually referenced here. The commented 0x11 is 17. - */ - 0x6c180f, /* REG27(0x11) */ - }; - - r = zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); - if (r) - return r; - - return zd_rfwritev_locked(chip, rv, ARRAY_SIZE(rv), RF_RV_BITS); -} - -static int rf2959_set_channel(struct zd_rf *rf, u8 channel) -{ - int i, r; - u32 *rv = rf2959_table[channel-1]; - struct zd_chip *chip = zd_rf_to_chip(rf); - - for (i = 0; i < 2; i++) { - r = zd_rfwrite_locked(chip, rv[i], RF_RV_BITS); - if (r) - return r; - } - return 0; -} - -static int rf2959_switch_radio_on(struct zd_rf *rf) -{ - static const struct zd_ioreq16 ioreqs[] = { - { CR10, 0x89 }, - { CR11, 0x00 }, - }; - struct zd_chip *chip = zd_rf_to_chip(rf); - - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -static int rf2959_switch_radio_off(struct zd_rf *rf) -{ - static const struct zd_ioreq16 ioreqs[] = { - { CR10, 0x15 }, - { CR11, 0x81 }, - }; - struct zd_chip *chip = zd_rf_to_chip(rf); - - return zd_iowrite16a_locked(chip, ioreqs, ARRAY_SIZE(ioreqs)); -} - -int zd_rf_init_rf2959(struct zd_rf *rf) -{ - struct zd_chip *chip = zd_rf_to_chip(rf); - - if (chip->is_zd1211b) { - dev_err(zd_chip_dev(chip), - "RF2959 is currently not supported for ZD1211B" - " devices\n"); - return -ENODEV; - } - rf->init_hw = rf2959_init_hw; - rf->set_channel = rf2959_set_channel; - rf->switch_radio_on = rf2959_switch_radio_on; - rf->switch_radio_off = rf2959_switch_radio_off; - return 0; -} diff --git a/drivers/net/wireless/zd1211rw/zd_types.h b/drivers/net/wireless/zd1211rw/zd_types.h deleted file mode 100644 index 0155a1584..000000000 --- a/drivers/net/wireless/zd1211rw/zd_types.h +++ /dev/null @@ -1,71 +0,0 @@ -/* zd_types.h - * - * 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 _ZD_TYPES_H -#define _ZD_TYPES_H - -#include - -/* We have three register spaces mapped into the overall USB address space of - * 64K words (16-bit values). There is the control register space of - * double-word registers, the eeprom register space and the firmware register - * space. The control register space is byte mapped, the others are word - * mapped. - * - * For that reason, we are using byte offsets for control registers and word - * offsets for everything else. - */ - -typedef u32 __nocast zd_addr_t; - -enum { - ADDR_BASE_MASK = 0xff000000, - ADDR_OFFSET_MASK = 0x0000ffff, - ADDR_ZERO_MASK = 0x00ff0000, - NULL_BASE = 0x00000000, - USB_BASE = 0x01000000, - CR_BASE = 0x02000000, - CR_MAX_OFFSET = 0x0b30, - E2P_BASE = 0x03000000, - E2P_MAX_OFFSET = 0x007e, - FW_BASE = 0x04000000, - FW_MAX_OFFSET = 0x0005, -}; - -#define ZD_ADDR_BASE(addr) ((u32)(addr) & ADDR_BASE_MASK) -#define ZD_OFFSET(addr) ((u32)(addr) & ADDR_OFFSET_MASK) - -#define ZD_ADDR(base, offset) \ - ((zd_addr_t)(((base) & ADDR_BASE_MASK) | ((offset) & ADDR_OFFSET_MASK))) - -#define ZD_NULL_ADDR ((zd_addr_t)0) -#define USB_REG(offset) ZD_ADDR(USB_BASE, offset) /* word addressing */ -#define CTL_REG(offset) ZD_ADDR(CR_BASE, offset) /* byte addressing */ -#define E2P_REG(offset) ZD_ADDR(E2P_BASE, offset) /* word addressing */ -#define FW_REG(offset) ZD_ADDR(FW_BASE, offset) /* word addressing */ - -static inline zd_addr_t zd_inc_word(zd_addr_t addr) -{ - u32 base = ZD_ADDR_BASE(addr); - u32 offset = ZD_OFFSET(addr); - - offset += base == CR_BASE ? 2 : 1; - - return base | offset; -} - -#endif /* _ZD_TYPES_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c deleted file mode 100644 index 632098412..000000000 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ /dev/null @@ -1,1309 +0,0 @@ -/* zd_usb.c - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "zd_def.h" -#include "zd_netdev.h" -#include "zd_mac.h" -#include "zd_usb.h" -#include "zd_util.h" - -static struct usb_device_id usb_ids[] = { - /* ZD1211 */ - { USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 }, - { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 }, - /* ZD1211B */ - { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, - { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, - {} -}; - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("USB driver for devices with the ZD1211 chip."); -MODULE_AUTHOR("Ulrich Kunitz"); -MODULE_AUTHOR("Daniel Drake"); -MODULE_VERSION("1.0"); -MODULE_DEVICE_TABLE(usb, usb_ids); - -#define FW_ZD1211_PREFIX "zd1211/zd1211_" -#define FW_ZD1211B_PREFIX "zd1211/zd1211b_" - -/* register address handling */ - -#ifdef DEBUG -static int check_addr(struct zd_usb *usb, zd_addr_t addr) -{ - u32 base = ZD_ADDR_BASE(addr); - u32 offset = ZD_OFFSET(addr); - - if ((u32)addr & ADDR_ZERO_MASK) - goto invalid_address; - switch (base) { - case USB_BASE: - break; - case CR_BASE: - if (offset > CR_MAX_OFFSET) { - dev_dbg(zd_usb_dev(usb), - "CR offset %#010x larger than" - " CR_MAX_OFFSET %#10x\n", - offset, CR_MAX_OFFSET); - goto invalid_address; - } - if (offset & 1) { - dev_dbg(zd_usb_dev(usb), - "CR offset %#010x is not a multiple of 2\n", - offset); - goto invalid_address; - } - break; - case E2P_BASE: - if (offset > E2P_MAX_OFFSET) { - dev_dbg(zd_usb_dev(usb), - "E2P offset %#010x larger than" - " E2P_MAX_OFFSET %#010x\n", - offset, E2P_MAX_OFFSET); - goto invalid_address; - } - break; - case FW_BASE: - if (!usb->fw_base_offset) { - dev_dbg(zd_usb_dev(usb), - "ERROR: fw base offset has not been set\n"); - return -EAGAIN; - } - if (offset > FW_MAX_OFFSET) { - dev_dbg(zd_usb_dev(usb), - "FW offset %#10x is larger than" - " FW_MAX_OFFSET %#010x\n", - offset, FW_MAX_OFFSET); - goto invalid_address; - } - break; - default: - dev_dbg(zd_usb_dev(usb), - "address has unsupported base %#010x\n", addr); - goto invalid_address; - } - - return 0; -invalid_address: - dev_dbg(zd_usb_dev(usb), - "ERROR: invalid address: %#010x\n", addr); - return -EINVAL; -} -#endif /* DEBUG */ - -static u16 usb_addr(struct zd_usb *usb, zd_addr_t addr) -{ - u32 base; - u16 offset; - - base = ZD_ADDR_BASE(addr); - offset = ZD_OFFSET(addr); - - ZD_ASSERT(check_addr(usb, addr) == 0); - - switch (base) { - case CR_BASE: - offset += CR_BASE_OFFSET; - break; - case E2P_BASE: - offset += E2P_BASE_OFFSET; - break; - case FW_BASE: - offset += usb->fw_base_offset; - break; - } - - return offset; -} - -/* USB device initialization */ - -static int request_fw_file( - const struct firmware **fw, const char *name, struct device *device) -{ - int r; - - dev_dbg_f(device, "fw name %s\n", name); - - r = request_firmware(fw, name, device); - if (r) - dev_err(device, - "Could not load firmware file %s. Error number %d\n", - name, r); - return r; -} - -static inline u16 get_bcdDevice(const struct usb_device *udev) -{ - return le16_to_cpu(udev->descriptor.bcdDevice); -} - -enum upload_code_flags { - REBOOT = 1, -}; - -/* Ensures that MAX_TRANSFER_SIZE is even. */ -#define MAX_TRANSFER_SIZE (USB_MAX_TRANSFER_SIZE & ~1) - -static int upload_code(struct usb_device *udev, - const u8 *data, size_t size, u16 code_offset, int flags) -{ - u8 *p; - int r; - - /* USB request blocks need "kmalloced" buffers. - */ - p = kmalloc(MAX_TRANSFER_SIZE, GFP_KERNEL); - if (!p) { - dev_err(&udev->dev, "out of memory\n"); - r = -ENOMEM; - goto error; - } - - size &= ~1; - while (size > 0) { - size_t transfer_size = size <= MAX_TRANSFER_SIZE ? - size : MAX_TRANSFER_SIZE; - - dev_dbg_f(&udev->dev, "transfer size %zu\n", transfer_size); - - memcpy(p, data, transfer_size); - r = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - USB_REQ_FIRMWARE_DOWNLOAD, - USB_DIR_OUT | USB_TYPE_VENDOR, - code_offset, 0, p, transfer_size, 1000 /* ms */); - if (r < 0) { - dev_err(&udev->dev, - "USB control request for firmware upload" - " failed. Error number %d\n", r); - goto error; - } - transfer_size = r & ~1; - - size -= transfer_size; - data += transfer_size; - code_offset += transfer_size/sizeof(u16); - } - - if (flags & REBOOT) { - u8 ret; - - r = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), - USB_REQ_FIRMWARE_CONFIRM, - USB_DIR_IN | USB_TYPE_VENDOR, - 0, 0, &ret, sizeof(ret), 5000 /* ms */); - if (r != sizeof(ret)) { - dev_err(&udev->dev, - "control request firmeware confirmation failed." - " Return value %d\n", r); - if (r >= 0) - r = -ENODEV; - goto error; - } - if (ret & 0x80) { - dev_err(&udev->dev, - "Internal error while downloading." - " Firmware confirm return value %#04x\n", - (unsigned int)ret); - r = -ENODEV; - goto error; - } - dev_dbg_f(&udev->dev, "firmware confirm return value %#04x\n", - (unsigned int)ret); - } - - r = 0; -error: - kfree(p); - return r; -} - -static u16 get_word(const void *data, u16 offset) -{ - const __le16 *p = data; - return le16_to_cpu(p[offset]); -} - -static char *get_fw_name(char *buffer, size_t size, u8 device_type, - const char* postfix) -{ - scnprintf(buffer, size, "%s%s", - device_type == DEVICE_ZD1211B ? - FW_ZD1211B_PREFIX : FW_ZD1211_PREFIX, - postfix); - return buffer; -} - -static int upload_firmware(struct usb_device *udev, u8 device_type) -{ - int r; - u16 fw_bcdDevice; - u16 bcdDevice; - const struct firmware *ub_fw = NULL; - const struct firmware *uph_fw = NULL; - char fw_name[128]; - - bcdDevice = get_bcdDevice(udev); - - r = request_fw_file(&ub_fw, - get_fw_name(fw_name, sizeof(fw_name), device_type, "ub"), - &udev->dev); - if (r) - goto error; - - fw_bcdDevice = get_word(ub_fw->data, EEPROM_REGS_OFFSET); - - /* FIXME: do we have any reason to perform the kludge that the vendor - * driver does when there is a version mismatch? (their driver uploads - * different firmwares and stuff) - */ - if (fw_bcdDevice != bcdDevice) { - dev_info(&udev->dev, - "firmware device id %#06x and actual device id " - "%#06x differ, continuing anyway\n", - fw_bcdDevice, bcdDevice); - } else { - dev_dbg_f(&udev->dev, - "firmware device id %#06x is equal to the " - "actual device id\n", fw_bcdDevice); - } - - - r = request_fw_file(&uph_fw, - get_fw_name(fw_name, sizeof(fw_name), device_type, "uphr"), - &udev->dev); - if (r) - goto error; - - r = upload_code(udev, uph_fw->data, uph_fw->size, FW_START_OFFSET, - REBOOT); - if (r) { - dev_err(&udev->dev, - "Could not upload firmware code uph. Error number %d\n", - r); - } - - /* FALL-THROUGH */ -error: - release_firmware(ub_fw); - release_firmware(uph_fw); - return r; -} - -static void disable_read_regs_int(struct zd_usb *usb) -{ - struct zd_usb_interrupt *intr = &usb->intr; - - spin_lock(&intr->lock); - intr->read_regs_enabled = 0; - spin_unlock(&intr->lock); -} - -#define urb_dev(urb) (&(urb)->dev->dev) - -static inline void handle_regs_int(struct urb *urb) -{ - struct zd_usb *usb = urb->context; - struct zd_usb_interrupt *intr = &usb->intr; - int len; - - ZD_ASSERT(in_interrupt()); - spin_lock(&intr->lock); - - if (intr->read_regs_enabled) { - intr->read_regs.length = len = urb->actual_length; - - if (len > sizeof(intr->read_regs.buffer)) - len = sizeof(intr->read_regs.buffer); - memcpy(intr->read_regs.buffer, urb->transfer_buffer, len); - intr->read_regs_enabled = 0; - complete(&intr->read_regs.completion); - goto out; - } - - dev_dbg_f(urb_dev(urb), "regs interrupt ignored\n"); -out: - spin_unlock(&intr->lock); -} - -static inline void handle_retry_failed_int(struct urb *urb) -{ - dev_dbg_f(urb_dev(urb), "retry failed interrupt\n"); -} - - -static void int_urb_complete(struct urb *urb, struct pt_regs *pt_regs) -{ - int r; - struct usb_int_header *hdr; - - switch (urb->status) { - case 0: - break; - case -ESHUTDOWN: - case -EINVAL: - case -ENODEV: - case -ENOENT: - case -ECONNRESET: - case -EPIPE: - goto kfree; - default: - goto resubmit; - } - - if (urb->actual_length < sizeof(hdr)) { - dev_dbg_f(urb_dev(urb), "error: urb %p to small\n", urb); - goto resubmit; - } - - hdr = urb->transfer_buffer; - if (hdr->type != USB_INT_TYPE) { - dev_dbg_f(urb_dev(urb), "error: urb %p wrong type\n", urb); - goto resubmit; - } - - switch (hdr->id) { - case USB_INT_ID_REGS: - handle_regs_int(urb); - break; - case USB_INT_ID_RETRY_FAILED: - handle_retry_failed_int(urb); - break; - default: - dev_dbg_f(urb_dev(urb), "error: urb %p unknown id %x\n", urb, - (unsigned int)hdr->id); - goto resubmit; - } - -resubmit: - r = usb_submit_urb(urb, GFP_ATOMIC); - if (r) { - dev_dbg_f(urb_dev(urb), "resubmit urb %p\n", urb); - goto kfree; - } - return; -kfree: - kfree(urb->transfer_buffer); -} - -static inline int int_urb_interval(struct usb_device *udev) -{ - switch (udev->speed) { - case USB_SPEED_HIGH: - return 4; - case USB_SPEED_LOW: - return 10; - case USB_SPEED_FULL: - default: - return 1; - } -} - -static inline int usb_int_enabled(struct zd_usb *usb) -{ - unsigned long flags; - struct zd_usb_interrupt *intr = &usb->intr; - struct urb *urb; - - spin_lock_irqsave(&intr->lock, flags); - urb = intr->urb; - spin_unlock_irqrestore(&intr->lock, flags); - return urb != NULL; -} - -int zd_usb_enable_int(struct zd_usb *usb) -{ - int r; - struct usb_device *udev; - struct zd_usb_interrupt *intr = &usb->intr; - void *transfer_buffer = NULL; - struct urb *urb; - - dev_dbg_f(zd_usb_dev(usb), "\n"); - - urb = usb_alloc_urb(0, GFP_NOFS); - if (!urb) { - r = -ENOMEM; - goto out; - } - - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&intr->lock); - if (intr->urb) { - spin_unlock_irq(&intr->lock); - r = 0; - goto error_free_urb; - } - intr->urb = urb; - spin_unlock_irq(&intr->lock); - - /* TODO: make it a DMA buffer */ - r = -ENOMEM; - transfer_buffer = kmalloc(USB_MAX_EP_INT_BUFFER, GFP_NOFS); - if (!transfer_buffer) { - dev_dbg_f(zd_usb_dev(usb), - "couldn't allocate transfer_buffer\n"); - goto error_set_urb_null; - } - - udev = zd_usb_to_usbdev(usb); - usb_fill_int_urb(urb, udev, usb_rcvintpipe(udev, EP_INT_IN), - transfer_buffer, USB_MAX_EP_INT_BUFFER, - int_urb_complete, usb, - intr->interval); - - dev_dbg_f(zd_usb_dev(usb), "submit urb %p\n", intr->urb); - r = usb_submit_urb(urb, GFP_NOFS); - if (r) { - dev_dbg_f(zd_usb_dev(usb), - "Couldn't submit urb. Error number %d\n", r); - goto error; - } - - return 0; -error: - kfree(transfer_buffer); -error_set_urb_null: - spin_lock_irq(&intr->lock); - intr->urb = NULL; - spin_unlock_irq(&intr->lock); -error_free_urb: - usb_free_urb(urb); -out: - return r; -} - -void zd_usb_disable_int(struct zd_usb *usb) -{ - unsigned long flags; - struct zd_usb_interrupt *intr = &usb->intr; - struct urb *urb; - - spin_lock_irqsave(&intr->lock, flags); - urb = intr->urb; - if (!urb) { - spin_unlock_irqrestore(&intr->lock, flags); - return; - } - intr->urb = NULL; - spin_unlock_irqrestore(&intr->lock, flags); - - usb_kill_urb(urb); - dev_dbg_f(zd_usb_dev(usb), "urb %p killed\n", urb); - usb_free_urb(urb); -} - -static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer, - unsigned int length) -{ - int i; - struct zd_mac *mac = zd_usb_to_mac(usb); - const struct rx_length_info *length_info; - - if (length < sizeof(struct rx_length_info)) { - /* It's not a complete packet anyhow. */ - return; - } - length_info = (struct rx_length_info *) - (buffer + length - sizeof(struct rx_length_info)); - - /* It might be that three frames are merged into a single URB - * transaction. We have to check for the length info tag. - * - * While testing we discovered that length_info might be unaligned, - * because if USB transactions are merged, the last packet will not - * be padded. Unaligned access might also happen if the length_info - * structure is not present. - */ - if (get_unaligned(&length_info->tag) == cpu_to_le16(RX_LENGTH_INFO_TAG)) - { - unsigned int l, k, n; - for (i = 0, l = 0;; i++) { - k = le16_to_cpu(get_unaligned(&length_info->length[i])); - n = l+k; - if (n > length) - return; - zd_mac_rx(mac, buffer+l, k); - if (i >= 2) - return; - l = (n+3) & ~3; - } - } else { - zd_mac_rx(mac, buffer, length); - } -} - -static void rx_urb_complete(struct urb *urb, struct pt_regs *pt_regs) -{ - struct zd_usb *usb; - struct zd_usb_rx *rx; - const u8 *buffer; - unsigned int length; - - switch (urb->status) { - case 0: - break; - case -ESHUTDOWN: - case -EINVAL: - case -ENODEV: - case -ENOENT: - case -ECONNRESET: - case -EPIPE: - return; - default: - dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status); - goto resubmit; - } - - buffer = urb->transfer_buffer; - length = urb->actual_length; - usb = urb->context; - rx = &usb->rx; - - if (length%rx->usb_packet_size > rx->usb_packet_size-4) { - /* If there is an old first fragment, we don't care. */ - dev_dbg_f(urb_dev(urb), "*** first fragment ***\n"); - ZD_ASSERT(length <= ARRAY_SIZE(rx->fragment)); - spin_lock(&rx->lock); - memcpy(rx->fragment, buffer, length); - rx->fragment_length = length; - spin_unlock(&rx->lock); - goto resubmit; - } - - spin_lock(&rx->lock); - if (rx->fragment_length > 0) { - /* We are on a second fragment, we believe */ - ZD_ASSERT(length + rx->fragment_length <= - ARRAY_SIZE(rx->fragment)); - dev_dbg_f(urb_dev(urb), "*** second fragment ***\n"); - memcpy(rx->fragment+rx->fragment_length, buffer, length); - handle_rx_packet(usb, rx->fragment, - rx->fragment_length + length); - rx->fragment_length = 0; - spin_unlock(&rx->lock); - } else { - spin_unlock(&rx->lock); - handle_rx_packet(usb, buffer, length); - } - -resubmit: - usb_submit_urb(urb, GFP_ATOMIC); -} - -struct urb *alloc_urb(struct zd_usb *usb) -{ - struct usb_device *udev = zd_usb_to_usbdev(usb); - struct urb *urb; - void *buffer; - - urb = usb_alloc_urb(0, GFP_NOFS); - if (!urb) - return NULL; - buffer = usb_buffer_alloc(udev, USB_MAX_RX_SIZE, GFP_NOFS, - &urb->transfer_dma); - if (!buffer) { - usb_free_urb(urb); - return NULL; - } - - usb_fill_bulk_urb(urb, udev, usb_rcvbulkpipe(udev, EP_DATA_IN), - buffer, USB_MAX_RX_SIZE, - rx_urb_complete, usb); - urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; - - return urb; -} - -void free_urb(struct urb *urb) -{ - if (!urb) - return; - usb_buffer_free(urb->dev, urb->transfer_buffer_length, - urb->transfer_buffer, urb->transfer_dma); - usb_free_urb(urb); -} - -int zd_usb_enable_rx(struct zd_usb *usb) -{ - int i, r; - struct zd_usb_rx *rx = &usb->rx; - struct urb **urbs; - - dev_dbg_f(zd_usb_dev(usb), "\n"); - - r = -ENOMEM; - urbs = kcalloc(URBS_COUNT, sizeof(struct urb *), GFP_NOFS); - if (!urbs) - goto error; - for (i = 0; i < URBS_COUNT; i++) { - urbs[i] = alloc_urb(usb); - if (!urbs[i]) - goto error; - } - - ZD_ASSERT(!irqs_disabled()); - spin_lock_irq(&rx->lock); - if (rx->urbs) { - spin_unlock_irq(&rx->lock); - r = 0; - goto error; - } - rx->urbs = urbs; - rx->urbs_count = URBS_COUNT; - spin_unlock_irq(&rx->lock); - - for (i = 0; i < URBS_COUNT; i++) { - r = usb_submit_urb(urbs[i], GFP_NOFS); - if (r) - goto error_submit; - } - - return 0; -error_submit: - for (i = 0; i < URBS_COUNT; i++) { - usb_kill_urb(urbs[i]); - } - spin_lock_irq(&rx->lock); - rx->urbs = NULL; - rx->urbs_count = 0; - spin_unlock_irq(&rx->lock); -error: - if (urbs) { - for (i = 0; i < URBS_COUNT; i++) - free_urb(urbs[i]); - } - return r; -} - -void zd_usb_disable_rx(struct zd_usb *usb) -{ - int i; - unsigned long flags; - struct urb **urbs; - unsigned int count; - struct zd_usb_rx *rx = &usb->rx; - - spin_lock_irqsave(&rx->lock, flags); - urbs = rx->urbs; - count = rx->urbs_count; - spin_unlock_irqrestore(&rx->lock, flags); - if (!urbs) - return; - - for (i = 0; i < count; i++) { - usb_kill_urb(urbs[i]); - free_urb(urbs[i]); - } - kfree(urbs); - - spin_lock_irqsave(&rx->lock, flags); - rx->urbs = NULL; - rx->urbs_count = 0; - spin_unlock_irqrestore(&rx->lock, flags); -} - -static void tx_urb_complete(struct urb *urb, struct pt_regs *pt_regs) -{ - int r; - - switch (urb->status) { - case 0: - break; - case -ESHUTDOWN: - case -EINVAL: - case -ENODEV: - case -ENOENT: - case -ECONNRESET: - case -EPIPE: - dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status); - break; - default: - dev_dbg_f(urb_dev(urb), "urb %p error %d\n", urb, urb->status); - goto resubmit; - } -free_urb: - usb_buffer_free(urb->dev, urb->transfer_buffer_length, - urb->transfer_buffer, urb->transfer_dma); - usb_free_urb(urb); - return; -resubmit: - r = usb_submit_urb(urb, GFP_ATOMIC); - if (r) { - dev_dbg_f(urb_dev(urb), "error resubmit urb %p %d\n", urb, r); - goto free_urb; - } -} - -/* Puts the frame on the USB endpoint. It doesn't wait for - * completion. The frame must contain the control set. - */ -int zd_usb_tx(struct zd_usb *usb, const u8 *frame, unsigned int length) -{ - int r; - struct usb_device *udev = zd_usb_to_usbdev(usb); - struct urb *urb; - void *buffer; - - urb = usb_alloc_urb(0, GFP_ATOMIC); - if (!urb) { - r = -ENOMEM; - goto out; - } - - buffer = usb_buffer_alloc(zd_usb_to_usbdev(usb), length, GFP_ATOMIC, - &urb->transfer_dma); - if (!buffer) { - r = -ENOMEM; - goto error_free_urb; - } - memcpy(buffer, frame, length); - - usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, EP_DATA_OUT), - buffer, length, tx_urb_complete, NULL); - urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; - - r = usb_submit_urb(urb, GFP_ATOMIC); - if (r) - goto error; - return 0; -error: - usb_buffer_free(zd_usb_to_usbdev(usb), length, buffer, - urb->transfer_dma); -error_free_urb: - usb_free_urb(urb); -out: - return r; -} - -static inline void init_usb_interrupt(struct zd_usb *usb) -{ - struct zd_usb_interrupt *intr = &usb->intr; - - spin_lock_init(&intr->lock); - intr->interval = int_urb_interval(zd_usb_to_usbdev(usb)); - init_completion(&intr->read_regs.completion); - intr->read_regs.cr_int_addr = cpu_to_le16(usb_addr(usb, CR_INTERRUPT)); -} - -static inline void init_usb_rx(struct zd_usb *usb) -{ - struct zd_usb_rx *rx = &usb->rx; - spin_lock_init(&rx->lock); - if (interface_to_usbdev(usb->intf)->speed == USB_SPEED_HIGH) { - rx->usb_packet_size = 512; - } else { - rx->usb_packet_size = 64; - } - ZD_ASSERT(rx->fragment_length == 0); -} - -static inline void init_usb_tx(struct zd_usb *usb) -{ - /* FIXME: at this point we will allocate a fixed number of urb's for - * use in a cyclic scheme */ -} - -void zd_usb_init(struct zd_usb *usb, struct net_device *netdev, - struct usb_interface *intf) -{ - memset(usb, 0, sizeof(*usb)); - usb->intf = usb_get_intf(intf); - usb_set_intfdata(usb->intf, netdev); - init_usb_interrupt(usb); - init_usb_tx(usb); - init_usb_rx(usb); -} - -int zd_usb_init_hw(struct zd_usb *usb) -{ - int r; - struct zd_chip *chip = zd_usb_to_chip(usb); - - ZD_ASSERT(mutex_is_locked(&chip->mutex)); - r = zd_ioread16_locked(chip, &usb->fw_base_offset, - USB_REG((u16)FW_BASE_ADDR_OFFSET)); - if (r) - return r; - dev_dbg_f(zd_usb_dev(usb), "fw_base_offset: %#06hx\n", - usb->fw_base_offset); - - return 0; -} - -void zd_usb_clear(struct zd_usb *usb) -{ - usb_set_intfdata(usb->intf, NULL); - usb_put_intf(usb->intf); - memset(usb, 0, sizeof(*usb)); - /* FIXME: usb_interrupt, usb_tx, usb_rx? */ -} - -static const char *speed(enum usb_device_speed speed) -{ - switch (speed) { - case USB_SPEED_LOW: - return "low"; - case USB_SPEED_FULL: - return "full"; - case USB_SPEED_HIGH: - return "high"; - default: - return "unknown speed"; - } -} - -static int scnprint_id(struct usb_device *udev, char *buffer, size_t size) -{ - return scnprintf(buffer, size, "%04hx:%04hx v%04hx %s", - le16_to_cpu(udev->descriptor.idVendor), - le16_to_cpu(udev->descriptor.idProduct), - get_bcdDevice(udev), - speed(udev->speed)); -} - -int zd_usb_scnprint_id(struct zd_usb *usb, char *buffer, size_t size) -{ - struct usb_device *udev = interface_to_usbdev(usb->intf); - return scnprint_id(udev, buffer, size); -} - -#ifdef DEBUG -static void print_id(struct usb_device *udev) -{ - char buffer[40]; - - scnprint_id(udev, buffer, sizeof(buffer)); - buffer[sizeof(buffer)-1] = 0; - dev_dbg_f(&udev->dev, "%s\n", buffer); -} -#else -#define print_id(udev) do { } while (0) -#endif - -static int probe(struct usb_interface *intf, const struct usb_device_id *id) -{ - int r; - struct usb_device *udev = interface_to_usbdev(intf); - struct net_device *netdev = NULL; - - print_id(udev); - - switch (udev->speed) { - case USB_SPEED_LOW: - case USB_SPEED_FULL: - case USB_SPEED_HIGH: - break; - default: - dev_dbg_f(&intf->dev, "Unknown USB speed\n"); - r = -ENODEV; - goto error; - } - - netdev = zd_netdev_alloc(intf); - if (netdev == NULL) { - r = -ENOMEM; - goto error; - } - - r = upload_firmware(udev, id->driver_info); - if (r) { - dev_err(&intf->dev, - "couldn't load firmware. Error number %d\n", r); - goto error; - } - - r = usb_reset_configuration(udev); - if (r) { - dev_dbg_f(&intf->dev, - "couldn't reset configuration. Error number %d\n", r); - goto error; - } - - /* At this point the interrupt endpoint is not generally enabled. We - * save the USB bandwidth until the network device is opened. But - * notify that the initialization of the MAC will require the - * interrupts to be temporary enabled. - */ - r = zd_mac_init_hw(zd_netdev_mac(netdev), id->driver_info); - if (r) { - dev_dbg_f(&intf->dev, - "couldn't initialize mac. Error number %d\n", r); - goto error; - } - - r = register_netdev(netdev); - if (r) { - dev_dbg_f(&intf->dev, - "couldn't register netdev. Error number %d\n", r); - goto error; - } - - dev_dbg_f(&intf->dev, "successful\n"); - dev_info(&intf->dev,"%s\n", netdev->name); - return 0; -error: - usb_reset_device(interface_to_usbdev(intf)); - zd_netdev_free(netdev); - return r; -} - -static void disconnect(struct usb_interface *intf) -{ - struct net_device *netdev = zd_intf_to_netdev(intf); - struct zd_mac *mac = zd_netdev_mac(netdev); - struct zd_usb *usb = &mac->chip.usb; - - dev_dbg_f(zd_usb_dev(usb), "\n"); - - zd_netdev_disconnect(netdev); - - /* Just in case something has gone wrong! */ - zd_usb_disable_rx(usb); - zd_usb_disable_int(usb); - - /* If the disconnect has been caused by a removal of the - * driver module, the reset allows reloading of the driver. If the - * reset will not be executed here, the upload of the firmware in the - * probe function caused by the reloading of the driver will fail. - */ - usb_reset_device(interface_to_usbdev(intf)); - - /* If somebody still waits on this lock now, this is an error. */ - zd_netdev_free(netdev); - dev_dbg(&intf->dev, "disconnected\n"); -} - -static struct usb_driver driver = { - .name = "zd1211rw", - .id_table = usb_ids, - .probe = probe, - .disconnect = disconnect, -}; - -static int __init usb_init(void) -{ - int r; - - pr_debug("usb_init()\n"); - - r = usb_register(&driver); - if (r) { - printk(KERN_ERR "usb_register() failed. Error number %d\n", r); - return r; - } - - pr_debug("zd1211rw initialized\n"); - return 0; -} - -static void __exit usb_exit(void) -{ - pr_debug("usb_exit()\n"); - usb_deregister(&driver); -} - -module_init(usb_init); -module_exit(usb_exit); - -static int usb_int_regs_length(unsigned int count) -{ - return sizeof(struct usb_int_regs) + count * sizeof(struct reg_data); -} - -static void prepare_read_regs_int(struct zd_usb *usb) -{ - struct zd_usb_interrupt *intr = &usb->intr; - - spin_lock(&intr->lock); - intr->read_regs_enabled = 1; - INIT_COMPLETION(intr->read_regs.completion); - spin_unlock(&intr->lock); -} - -static int get_results(struct zd_usb *usb, u16 *values, - struct usb_req_read_regs *req, unsigned int count) -{ - int r; - int i; - struct zd_usb_interrupt *intr = &usb->intr; - struct read_regs_int *rr = &intr->read_regs; - struct usb_int_regs *regs = (struct usb_int_regs *)rr->buffer; - - spin_lock(&intr->lock); - - r = -EIO; - /* The created block size seems to be larger than expected. - * However results appear to be correct. - */ - if (rr->length < usb_int_regs_length(count)) { - dev_dbg_f(zd_usb_dev(usb), - "error: actual length %d less than expected %d\n", - rr->length, usb_int_regs_length(count)); - goto error_unlock; - } - if (rr->length > sizeof(rr->buffer)) { - dev_dbg_f(zd_usb_dev(usb), - "error: actual length %d exceeds buffer size %zu\n", - rr->length, sizeof(rr->buffer)); - goto error_unlock; - } - - for (i = 0; i < count; i++) { - struct reg_data *rd = ®s->regs[i]; - if (rd->addr != req->addr[i]) { - dev_dbg_f(zd_usb_dev(usb), - "rd[%d] addr %#06hx expected %#06hx\n", i, - le16_to_cpu(rd->addr), - le16_to_cpu(req->addr[i])); - goto error_unlock; - } - values[i] = le16_to_cpu(rd->value); - } - - r = 0; -error_unlock: - spin_unlock(&intr->lock); - return r; -} - -int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, - const zd_addr_t *addresses, unsigned int count) -{ - int r; - int i, req_len, actual_req_len; - struct usb_device *udev; - struct usb_req_read_regs *req = NULL; - unsigned long timeout; - - if (count < 1) { - dev_dbg_f(zd_usb_dev(usb), "error: count is zero\n"); - return -EINVAL; - } - if (count > USB_MAX_IOREAD16_COUNT) { - dev_dbg_f(zd_usb_dev(usb), - "error: count %u exceeds possible max %u\n", - count, USB_MAX_IOREAD16_COUNT); - return -EINVAL; - } - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } - if (!usb_int_enabled(usb)) { - dev_dbg_f(zd_usb_dev(usb), - "error: usb interrupt not enabled\n"); - return -EWOULDBLOCK; - } - - req_len = sizeof(struct usb_req_read_regs) + count * sizeof(__le16); - req = kmalloc(req_len, GFP_NOFS); - if (!req) - return -ENOMEM; - req->id = cpu_to_le16(USB_REQ_READ_REGS); - for (i = 0; i < count; i++) - req->addr[i] = cpu_to_le16(usb_addr(usb, addresses[i])); - - udev = zd_usb_to_usbdev(usb); - prepare_read_regs_int(usb); - r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), - req, req_len, &actual_req_len, 1000 /* ms */); - if (r) { - dev_dbg_f(zd_usb_dev(usb), - "error in usb_bulk_msg(). Error number %d\n", r); - goto error; - } - if (req_len != actual_req_len) { - dev_dbg_f(zd_usb_dev(usb), "error in usb_bulk_msg()\n" - " req_len %d != actual_req_len %d\n", - req_len, actual_req_len); - r = -EIO; - goto error; - } - - timeout = wait_for_completion_timeout(&usb->intr.read_regs.completion, - msecs_to_jiffies(1000)); - if (!timeout) { - disable_read_regs_int(usb); - dev_dbg_f(zd_usb_dev(usb), "read timed out\n"); - r = -ETIMEDOUT; - goto error; - } - - r = get_results(usb, values, req, count); -error: - kfree(req); - return r; -} - -int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, - unsigned int count) -{ - int r; - struct usb_device *udev; - struct usb_req_write_regs *req = NULL; - int i, req_len, actual_req_len; - - if (count == 0) - return 0; - if (count > USB_MAX_IOWRITE16_COUNT) { - dev_dbg_f(zd_usb_dev(usb), - "error: count %u exceeds possible max %u\n", - count, USB_MAX_IOWRITE16_COUNT); - return -EINVAL; - } - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } - - req_len = sizeof(struct usb_req_write_regs) + - count * sizeof(struct reg_data); - req = kmalloc(req_len, GFP_NOFS); - if (!req) - return -ENOMEM; - - req->id = cpu_to_le16(USB_REQ_WRITE_REGS); - for (i = 0; i < count; i++) { - struct reg_data *rw = &req->reg_writes[i]; - rw->addr = cpu_to_le16(usb_addr(usb, ioreqs[i].addr)); - rw->value = cpu_to_le16(ioreqs[i].value); - } - - udev = zd_usb_to_usbdev(usb); - r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), - req, req_len, &actual_req_len, 1000 /* ms */); - if (r) { - dev_dbg_f(zd_usb_dev(usb), - "error in usb_bulk_msg(). Error number %d\n", r); - goto error; - } - if (req_len != actual_req_len) { - dev_dbg_f(zd_usb_dev(usb), - "error in usb_bulk_msg()" - " req_len %d != actual_req_len %d\n", - req_len, actual_req_len); - r = -EIO; - goto error; - } - - /* FALL-THROUGH with r == 0 */ -error: - kfree(req); - return r; -} - -int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits) -{ - int r; - struct usb_device *udev; - struct usb_req_rfwrite *req = NULL; - int i, req_len, actual_req_len; - u16 bit_value_template; - - if (in_atomic()) { - dev_dbg_f(zd_usb_dev(usb), - "error: io in atomic context not supported\n"); - return -EWOULDBLOCK; - } - if (bits < USB_MIN_RFWRITE_BIT_COUNT) { - dev_dbg_f(zd_usb_dev(usb), - "error: bits %d are smaller than" - " USB_MIN_RFWRITE_BIT_COUNT %d\n", - bits, USB_MIN_RFWRITE_BIT_COUNT); - return -EINVAL; - } - if (bits > USB_MAX_RFWRITE_BIT_COUNT) { - dev_dbg_f(zd_usb_dev(usb), - "error: bits %d exceed USB_MAX_RFWRITE_BIT_COUNT %d\n", - bits, USB_MAX_RFWRITE_BIT_COUNT); - return -EINVAL; - } -#ifdef DEBUG - if (value & (~0UL << bits)) { - dev_dbg_f(zd_usb_dev(usb), - "error: value %#09x has bits >= %d set\n", - value, bits); - return -EINVAL; - } -#endif /* DEBUG */ - - dev_dbg_f(zd_usb_dev(usb), "value %#09x bits %d\n", value, bits); - - r = zd_usb_ioread16(usb, &bit_value_template, CR203); - if (r) { - dev_dbg_f(zd_usb_dev(usb), - "error %d: Couldn't read CR203\n", r); - goto out; - } - bit_value_template &= ~(RF_IF_LE|RF_CLK|RF_DATA); - - req_len = sizeof(struct usb_req_rfwrite) + bits * sizeof(__le16); - req = kmalloc(req_len, GFP_NOFS); - if (!req) - return -ENOMEM; - - req->id = cpu_to_le16(USB_REQ_WRITE_RF); - /* 1: 3683a, but not used in ZYDAS driver */ - req->value = cpu_to_le16(2); - req->bits = cpu_to_le16(bits); - - for (i = 0; i < bits; i++) { - u16 bv = bit_value_template; - if (value & (1 << (bits-1-i))) - bv |= RF_DATA; - req->bit_values[i] = cpu_to_le16(bv); - } - - udev = zd_usb_to_usbdev(usb); - r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), - req, req_len, &actual_req_len, 1000 /* ms */); - if (r) { - dev_dbg_f(zd_usb_dev(usb), - "error in usb_bulk_msg(). Error number %d\n", r); - goto out; - } - if (req_len != actual_req_len) { - dev_dbg_f(zd_usb_dev(usb), "error in usb_bulk_msg()" - " req_len %d != actual_req_len %d\n", - req_len, actual_req_len); - r = -EIO; - goto out; - } - - /* FALL-THROUGH with r == 0 */ -out: - kfree(req); - return r; -} diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h deleted file mode 100644 index d6420283b..000000000 --- a/drivers/net/wireless/zd1211rw/zd_usb.h +++ /dev/null @@ -1,240 +0,0 @@ -/* zd_usb.h: Header for USB interface implemented by ZD1211 chip - * - * 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 _ZD_USB_H -#define _ZD_USB_H - -#include -#include -#include -#include -#include - -#include "zd_def.h" -#include "zd_types.h" - -enum devicetype { - DEVICE_ZD1211 = 0, - DEVICE_ZD1211B = 1, -}; - -enum endpoints { - EP_CTRL = 0, - EP_DATA_OUT = 1, - EP_DATA_IN = 2, - EP_INT_IN = 3, - EP_REGS_OUT = 4, -}; - -enum { - USB_MAX_TRANSFER_SIZE = 4096, /* bytes */ - /* FIXME: The original driver uses this value. We have to check, - * whether the MAX_TRANSFER_SIZE is sufficient and this needs only be - * used if one combined frame is split over two USB transactions. - */ - USB_MAX_RX_SIZE = 4800, /* bytes */ - USB_MAX_IOWRITE16_COUNT = 15, - USB_MAX_IOWRITE32_COUNT = USB_MAX_IOWRITE16_COUNT/2, - USB_MAX_IOREAD16_COUNT = 15, - USB_MAX_IOREAD32_COUNT = USB_MAX_IOREAD16_COUNT/2, - USB_MIN_RFWRITE_BIT_COUNT = 16, - USB_MAX_RFWRITE_BIT_COUNT = 28, - USB_MAX_EP_INT_BUFFER = 64, - USB_ZD1211B_BCD_DEVICE = 0x4810, -}; - -enum control_requests { - USB_REQ_WRITE_REGS = 0x21, - USB_REQ_READ_REGS = 0x22, - USB_REQ_WRITE_RF = 0x23, - USB_REQ_PROG_FLASH = 0x24, - USB_REQ_EEPROM_START = 0x0128, /* ? request is a byte */ - USB_REQ_EEPROM_MID = 0x28, - USB_REQ_EEPROM_END = 0x0228, /* ? request is a byte */ - USB_REQ_FIRMWARE_DOWNLOAD = 0x30, - USB_REQ_FIRMWARE_CONFIRM = 0x31, - USB_REQ_FIRMWARE_READ_DATA = 0x32, -}; - -struct usb_req_read_regs { - __le16 id; - __le16 addr[0]; -} __attribute__((packed)); - -struct reg_data { - __le16 addr; - __le16 value; -} __attribute__((packed)); - -struct usb_req_write_regs { - __le16 id; - struct reg_data reg_writes[0]; -} __attribute__((packed)); - -enum { - RF_IF_LE = 0x02, - RF_CLK = 0x04, - RF_DATA = 0x08, -}; - -struct usb_req_rfwrite { - __le16 id; - __le16 value; - /* 1: 3683a */ - /* 2: other (default) */ - __le16 bits; - /* RF2595: 24 */ - __le16 bit_values[0]; - /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */ -} __attribute__((packed)); - -/* USB interrupt */ - -enum usb_int_id { - USB_INT_TYPE = 0x01, - USB_INT_ID_REGS = 0x90, - USB_INT_ID_RETRY_FAILED = 0xa0, -}; - -enum usb_int_flags { - USB_INT_READ_REGS_EN = 0x01, -}; - -struct usb_int_header { - u8 type; /* must always be 1 */ - u8 id; -} __attribute__((packed)); - -struct usb_int_regs { - struct usb_int_header hdr; - struct reg_data regs[0]; -} __attribute__((packed)); - -struct usb_int_retry_fail { - struct usb_int_header hdr; - u8 new_rate; - u8 _dummy; - u8 addr[ETH_ALEN]; - u8 ibss_wakeup_dest; -} __attribute__((packed)); - -struct read_regs_int { - struct completion completion; - /* Stores the USB int structure and contains the USB address of the - * first requested register before request. - */ - u8 buffer[USB_MAX_EP_INT_BUFFER]; - int length; - __le16 cr_int_addr; -}; - -struct zd_ioreq16 { - zd_addr_t addr; - u16 value; -}; - -struct zd_ioreq32 { - zd_addr_t addr; - u32 value; -}; - -struct zd_usb_interrupt { - struct read_regs_int read_regs; - spinlock_t lock; - struct urb *urb; - int interval; - u8 read_regs_enabled:1; -}; - -static inline struct usb_int_regs *get_read_regs(struct zd_usb_interrupt *intr) -{ - return (struct usb_int_regs *)intr->read_regs.buffer; -} - -#define URBS_COUNT 5 - -struct zd_usb_rx { - spinlock_t lock; - u8 fragment[2*USB_MAX_RX_SIZE]; - unsigned int fragment_length; - unsigned int usb_packet_size; - struct urb **urbs; - int urbs_count; -}; - -struct zd_usb_tx { - spinlock_t lock; -}; - -/* Contains the usb parts. The structure doesn't require a lock, because intf - * and fw_base_offset, will not be changed after initialization. - */ -struct zd_usb { - struct zd_usb_interrupt intr; - struct zd_usb_rx rx; - struct zd_usb_tx tx; - struct usb_interface *intf; - u16 fw_base_offset; -}; - -#define zd_usb_dev(usb) (&usb->intf->dev) - -static inline struct usb_device *zd_usb_to_usbdev(struct zd_usb *usb) -{ - return interface_to_usbdev(usb->intf); -} - -static inline struct net_device *zd_intf_to_netdev(struct usb_interface *intf) -{ - return usb_get_intfdata(intf); -} - -static inline struct net_device *zd_usb_to_netdev(struct zd_usb *usb) -{ - return zd_intf_to_netdev(usb->intf); -} - -void zd_usb_init(struct zd_usb *usb, struct net_device *netdev, - struct usb_interface *intf); -int zd_usb_init_hw(struct zd_usb *usb); -void zd_usb_clear(struct zd_usb *usb); - -int zd_usb_scnprint_id(struct zd_usb *usb, char *buffer, size_t size); - -int zd_usb_enable_int(struct zd_usb *usb); -void zd_usb_disable_int(struct zd_usb *usb); - -int zd_usb_enable_rx(struct zd_usb *usb); -void zd_usb_disable_rx(struct zd_usb *usb); - -int zd_usb_tx(struct zd_usb *usb, const u8 *frame, unsigned int length); - -int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, - const zd_addr_t *addresses, unsigned int count); - -static inline int zd_usb_ioread16(struct zd_usb *usb, u16 *value, - const zd_addr_t addr) -{ - return zd_usb_ioread16v(usb, value, (const zd_addr_t *)&addr, 1); -} - -int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, - unsigned int count); - -int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits); - -#endif /* _ZD_USB_H */ diff --git a/drivers/net/wireless/zd1211rw/zd_util.c b/drivers/net/wireless/zd1211rw/zd_util.c deleted file mode 100644 index d20036c15..000000000 --- a/drivers/net/wireless/zd1211rw/zd_util.c +++ /dev/null @@ -1,82 +0,0 @@ -/* zd_util.c - * - * 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 - * - * Utility program - */ - -#include "zd_def.h" -#include "zd_util.h" - -#ifdef DEBUG -static char hex(u8 v) -{ - v &= 0xf; - return (v < 10 ? '0' : 'a' - 10) + v; -} - -static char hex_print(u8 c) -{ - return (0x20 <= c && c < 0x7f) ? c : '.'; -} - -static void dump_line(const u8 *bytes, size_t size) -{ - char c; - size_t i; - - size = size <= 8 ? size : 8; - printk(KERN_DEBUG "zd1211 %p ", bytes); - for (i = 0; i < 8; i++) { - switch (i) { - case 1: - case 5: - c = '.'; - break; - case 3: - c = ':'; - break; - default: - c = ' '; - } - if (i < size) { - printk("%c%c%c", hex(bytes[i] >> 4), hex(bytes[i]), c); - } else { - printk(" %c", c); - } - } - - for (i = 0; i < size; i++) - printk("%c", hex_print(bytes[i])); - printk("\n"); -} - -void zd_hexdump(const void *bytes, size_t size) -{ - size_t i = 0; - - do { - dump_line((u8 *)bytes + i, size-i); - i += 8; - } while (i < size); -} -#endif /* DEBUG */ - -void *zd_tail(const void *buffer, size_t buffer_size, size_t tail_size) -{ - if (buffer_size < tail_size) - return NULL; - return (u8 *)buffer + (buffer_size - tail_size); -} diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index 8459a1825..fd0f43b7d 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c @@ -19,13 +19,37 @@ Support and updates available at http://www.scyld.com/network/yellowfin.html - [link no longer provides useful info -jgarzik] + + Linux kernel changelog: + ----------------------- + + LK1.1.1 (jgarzik): Port to 2.4 kernel + + LK1.1.2 (jgarzik): + * Merge in becker version 1.05 + + LK1.1.3 (jgarzik): + * Various cleanups + * Update yellowfin_timer to correctly calculate duplex. + (suggested by Manfred Spraul) + + LK1.1.4 (val@nmt.edu): + * Fix three endian-ness bugs + * Support dual function SYM53C885E ethernet chip + + LK1.1.5 (val@nmt.edu): + * Fix forced full-duplex bug I introduced + + LK1.1.6 (val@nmt.edu): + * Only print warning on truly "oversized" packets + * Fix theoretical bug on gigabit cards - return to 1.1.3 behavior + */ #define DRV_NAME "yellowfin" -#define DRV_VERSION "2.0" -#define DRV_RELDATE "Jun 27, 2006" +#define DRV_VERSION "1.05+LK1.1.6" +#define DRV_RELDATE "Feb 11, 2002" #define PFX DRV_NAME ": " @@ -210,16 +234,26 @@ See Packet Engines confidential appendix (prototype chips only). +enum pci_id_flags_bits { + /* Set PCI command register bits before calling probe1(). */ + PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, + /* Read and map the single following PCI BAR. */ + PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, + PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, + PCI_UNUSED_IRQ=0x800, +}; enum capability_flags { HasMII=1, FullTxStatus=2, IsGigabit=4, HasMulticastBug=8, FullRxStatus=16, HasMACAddrBug=32, /* Only on early revs. */ DontUseEeprom=64, /* Don't read the MAC from the EEPROm. */ }; - /* The PCI I/O space extent. */ -enum { - YELLOWFIN_SIZE = 0x100, -}; +#define YELLOWFIN_SIZE 0x100 +#ifdef USE_IO_OPS +#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0) +#else +#define PCI_IOTYPE (PCI_USES_MASTER | PCI_USES_MEM | PCI_ADDR1) +#endif struct pci_id_info { const char *name; @@ -227,21 +261,24 @@ struct pci_id_info { int pci, pci_mask, subsystem, subsystem_mask; int revision, revision_mask; /* Only 8 bits. */ } id; + enum pci_id_flags_bits pci_flags; + int io_size; /* Needed for I/O region check or ioremap(). */ int drv_flags; /* Driver use, intended as capability flags. */ }; static const struct pci_id_info pci_id_tbl[] = { {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, + PCI_IOTYPE, YELLOWFIN_SIZE, FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, {"Symbios SYM83C885", { 0x07011000, 0xffffffff}, - HasMII | DontUseEeprom }, - { } + PCI_IOTYPE, YELLOWFIN_SIZE, HasMII | DontUseEeprom }, + {NULL,}, }; -static const struct pci_device_id yellowfin_pci_tbl[] = { +static struct pci_device_id yellowfin_pci_tbl[] = { { 0x1000, 0x0702, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0x1000, 0x0701, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, - { } + { 0, } }; MODULE_DEVICE_TABLE (pci, yellowfin_pci_tbl); @@ -579,7 +616,7 @@ static int yellowfin_open(struct net_device *dev) /* Reset the chip. */ iowrite32(0x80000000, ioaddr + DMACtrl); - i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev); + i = request_irq(dev->irq, &yellowfin_interrupt, SA_SHIRQ, dev->name, dev); if (i) return i; if (yellowfin_debug > 1) @@ -825,11 +862,13 @@ static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Fix GX chipset errata. */ if (cacheline_end > 24 || cacheline_end == 0) { len = skb->len + 32 - cacheline_end + 1; - if (skb_padto(skb, len)) { - yp->tx_skbuff[entry] = NULL; - netif_wake_queue(dev); - return 0; - } + if (len != skb->len) + skb = skb_padto(skb, len); + } + if (skb == NULL) { + yp->tx_skbuff[entry] = NULL; + netif_wake_queue(dev); + return 0; } } yp->tx_skbuff[entry] = skb; diff --git a/drivers/net/znet.c b/drivers/net/znet.c index 9f0291f35..3ac047bc7 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c @@ -85,6 +85,7 @@ - Understand why some traffic patterns add a 1s latency... */ +#include #include #include #include @@ -543,7 +544,8 @@ static int znet_send_packet(struct sk_buff *skb, struct net_device *dev) printk(KERN_DEBUG "%s: ZNet_send_packet.\n", dev->name); if (length < ETH_ZLEN) { - if (skb_padto(skb, ETH_ZLEN)) + skb = skb_padto(skb, ETH_ZLEN); + if (skb == NULL) return 0; length = ETH_ZLEN; } diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index df04e050c..8037e5806 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c @@ -201,7 +201,7 @@ static int __devinit zorro8390_init(struct net_device *dev, dev->irq = IRQ_AMIGA_PORTS; /* Install the Interrupt handler */ - i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, DRV_NAME, dev); + i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, DRV_NAME, dev); if (i) return i; for(i = 0; i < ETHER_ADDR_LEN; i++) { diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index 3a0a3a734..14cbe34eb 100644 --- a/drivers/nubus/nubus.c +++ b/drivers/nubus/nubus.c @@ -7,6 +7,7 @@ * and others. */ +#include #include #include #include diff --git a/drivers/nubus/nubus_syms.c b/drivers/nubus/nubus_syms.c index 9204f04fb..22c1dc9f8 100644 --- a/drivers/nubus/nubus_syms.c +++ b/drivers/nubus/nubus_syms.c @@ -2,6 +2,7 @@ (c) 1999 David Huggins-Daines */ +#include #include #include #include diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index 13416adfb..a647d3982 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c @@ -112,10 +112,10 @@ static int module_load_notify(struct notifier_block * self, unsigned long val, v return 0; /* FIXME: should we process all CPU buffers ? */ - mutex_lock(&buffer_mutex); + down(&buffer_sem); add_event_entry(ESCAPE_CODE); add_event_entry(MODULE_LOADED_CODE); - mutex_unlock(&buffer_mutex); + up(&buffer_sem); #endif return 0; } @@ -522,7 +522,7 @@ void sync_buffer(int cpu) unsigned long available; int domain_switch = 0; - mutex_lock(&buffer_mutex); + down(&buffer_sem); add_cpu_switch(cpu); @@ -578,5 +578,5 @@ void sync_buffer(int cpu) mark_done(cpu); - mutex_unlock(&buffer_mutex); + up(&buffer_sem); } diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 04d641714..b80318f03 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c @@ -24,7 +24,7 @@ #include "event_buffer.h" #include "oprofile_stats.h" -DEFINE_MUTEX(buffer_mutex); +DECLARE_MUTEX(buffer_sem); static unsigned long buffer_opened; static DECLARE_WAIT_QUEUE_HEAD(buffer_wait); @@ -32,7 +32,7 @@ static unsigned long * event_buffer; static unsigned long buffer_size; static unsigned long buffer_watershed; static size_t buffer_pos; -/* atomic_t because wait_event checks it outside of buffer_mutex */ +/* atomic_t because wait_event checks it outside of buffer_sem */ static atomic_t buffer_ready = ATOMIC_INIT(0); /* Add an entry to the event buffer. When we @@ -60,10 +60,10 @@ void add_event_entry(unsigned long value) */ void wake_up_buffer_waiter(void) { - mutex_lock(&buffer_mutex); + down(&buffer_sem); atomic_set(&buffer_ready, 1); wake_up(&buffer_wait); - mutex_unlock(&buffer_mutex); + up(&buffer_sem); } @@ -162,7 +162,7 @@ static ssize_t event_buffer_read(struct file * file, char __user * buf, if (!atomic_read(&buffer_ready)) return -EAGAIN; - mutex_lock(&buffer_mutex); + down(&buffer_sem); atomic_set(&buffer_ready, 0); @@ -177,7 +177,7 @@ static ssize_t event_buffer_read(struct file * file, char __user * buf, buffer_pos = 0; out: - mutex_unlock(&buffer_mutex); + up(&buffer_sem); return retval; } diff --git a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h index 6a8878866..0c33ee71e 100644 --- a/drivers/oprofile/event_buffer.h +++ b/drivers/oprofile/event_buffer.h @@ -11,7 +11,7 @@ #define EVENT_BUFFER_H #include -#include +#include int alloc_event_buffer(void); @@ -51,6 +51,6 @@ extern struct file_operations event_buffer_fops; /* mutex between sync_cpu_buffers() and the * file reading code. */ -extern struct mutex buffer_mutex; +extern struct semaphore buffer_sem; #endif /* EVENT_BUFFER_H */ diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c index b82a7b5aa..76bac8dfe 100644 --- a/drivers/oprofile/oprof.c +++ b/drivers/oprofile/oprof.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "oprof.h" #include "event_buffer.h" @@ -29,7 +29,7 @@ struct oprofile_operations oprofile_ops; unsigned long oprofile_started; unsigned long backtrace_depth; static unsigned long is_setup; -static DEFINE_MUTEX(start_mutex); +static DECLARE_MUTEX(start_sem); /* timer 0 - use performance monitoring hardware if available @@ -37,6 +37,7 @@ static DEFINE_MUTEX(start_mutex); */ static int timer = 0; +#ifdef CONFIG_XEN int oprofile_set_active(int active_domains[], unsigned int adomains) { int err; @@ -44,9 +45,9 @@ int oprofile_set_active(int active_domains[], unsigned int adomains) if (!oprofile_ops.set_active) return -EINVAL; - mutex_lock(&start_mutex); + down(&start_sem); err = oprofile_ops.set_active(active_domains, adomains); - mutex_unlock(&start_mutex); + up(&start_sem); return err; } @@ -57,17 +58,18 @@ int oprofile_set_passive(int passive_domains[], unsigned int pdomains) if (!oprofile_ops.set_passive) return -EINVAL; - mutex_lock(&start_mutex); + down(&start_sem); err = oprofile_ops.set_passive(passive_domains, pdomains); - mutex_unlock(&start_mutex); + up(&start_sem); return err; } +#endif int oprofile_setup(void) { int err; - mutex_lock(&start_mutex); + down(&start_sem); if ((err = alloc_cpu_buffers())) goto out; @@ -87,7 +89,7 @@ int oprofile_setup(void) goto out3; is_setup = 1; - mutex_unlock(&start_mutex); + up(&start_sem); return 0; out3: @@ -98,7 +100,7 @@ out2: out1: free_cpu_buffers(); out: - mutex_unlock(&start_mutex); + up(&start_sem); return err; } @@ -108,7 +110,7 @@ int oprofile_start(void) { int err = -EINVAL; - mutex_lock(&start_mutex); + down(&start_sem); if (!is_setup) goto out; @@ -125,7 +127,7 @@ int oprofile_start(void) oprofile_started = 1; out: - mutex_unlock(&start_mutex); + up(&start_sem); return err; } @@ -133,7 +135,7 @@ out: /* echo 0>/dev/oprofile/enable */ void oprofile_stop(void) { - mutex_lock(&start_mutex); + down(&start_sem); if (!oprofile_started) goto out; oprofile_ops.stop(); @@ -141,20 +143,20 @@ void oprofile_stop(void) /* wake up the daemon to read what remains */ wake_up_buffer_waiter(); out: - mutex_unlock(&start_mutex); + up(&start_sem); } void oprofile_shutdown(void) { - mutex_lock(&start_mutex); + down(&start_sem); sync_stop(); if (oprofile_ops.shutdown) oprofile_ops.shutdown(); is_setup = 0; free_event_buffer(); free_cpu_buffers(); - mutex_unlock(&start_mutex); + up(&start_sem); } @@ -162,7 +164,7 @@ int oprofile_set_backtrace(unsigned long val) { int err = 0; - mutex_lock(&start_mutex); + down(&start_sem); if (oprofile_started) { err = -EBUSY; @@ -177,7 +179,7 @@ int oprofile_set_backtrace(unsigned long val) backtrace_depth = val; out: - mutex_unlock(&start_mutex); + up(&start_sem); return err; } diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h index 4ae4ff97b..587db2b0a 100644 --- a/drivers/oprofile/oprof.h +++ b/drivers/oprofile/oprof.h @@ -36,7 +36,9 @@ void oprofile_timer_init(struct oprofile_operations * ops); int oprofile_set_backtrace(unsigned long depth); +#ifdef CONFIG_XEN int oprofile_set_active(int active_domains[], unsigned int adomains); int oprofile_set_passive(int passive_domains[], unsigned int pdomains); - +#endif + #endif /* OPROF_H */ diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index 3bb1e6ff7..388846526 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c @@ -124,10 +124,9 @@ static struct file_operations dump_fops = { .write = dump_write, }; -#ifdef CONFIG_XEN - #define TMPBUFSIZE 512 +#ifdef CONFIG_XEN static unsigned int adomains = 0; static int active_domains[MAX_OPROF_DOMAINS + 1]; static DEFINE_MUTEX(adom_mutex); @@ -314,7 +313,6 @@ static struct file_operations passive_domain_ops = { .read = pdomain_read, .write = pdomain_write, }; - #endif /* CONFIG_XEN */ void oprofile_create_files(struct super_block * sb, struct dentry * root) diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index 5756401fb..b62da9b0c 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c @@ -31,6 +31,7 @@ static struct inode * oprofilefs_get_inode(struct super_block * sb, int mode) inode->i_mode = mode; inode->i_uid = 0; inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; } @@ -109,8 +110,8 @@ static ssize_t ulong_write_file(struct file * file, char const __user * buf, siz static int default_open(struct inode * inode, struct file * filp) { - if (inode->i_private) - filp->private_data = inode->i_private; + if (inode->u.generic_ip) + filp->private_data = inode->u.generic_ip; return 0; } @@ -157,7 +158,7 @@ int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, if (!d) return -EFAULT; - d->d_inode->i_private = val; + d->d_inode->u.generic_ip = val; return 0; } @@ -170,7 +171,7 @@ int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root, if (!d) return -EFAULT; - d->d_inode->i_private = val; + d->d_inode->u.generic_ip = val; return 0; } @@ -196,7 +197,7 @@ int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root, if (!d) return -EFAULT; - d->d_inode->i_private = val; + d->d_inode->u.generic_ip = val; return 0; } @@ -271,10 +272,10 @@ static int oprofilefs_fill_super(struct super_block * sb, void * data, int silen } -static int oprofilefs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *oprofilefs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, oprofilefs_fill_super, mnt); + return get_sb_single(fs_type, flags, data, oprofilefs_fill_super); } diff --git a/drivers/parisc/Kconfig b/drivers/parisc/Kconfig index 1d3b84b4a..3f5de867a 100644 --- a/drivers/parisc/Kconfig +++ b/drivers/parisc/Kconfig @@ -140,37 +140,18 @@ config CHASSIS_LCD_LED If unsure, say Y. config PDC_CHASSIS - bool "PDC chassis state codes support" + bool "PDC chassis State Panel support" default y help - Say Y here if you want to enable support for Chassis codes. - That includes support for 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 driver will also display progress messages on LCD display, - such as "INI", "RUN" and "FLT", and might thus clobber messages - shown by the LED/LCD driver. - This driver updates the state panel (LED and/or LCD) upon system - state change (eg: boot, shutdown or panic). + 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 PDC_CHASSIS_WARN - bool "PDC chassis warnings support" - depends on PROC_FS - default y - help - Say Y here if you want to enable support for Chassis warnings. - This will add a proc entry '/proc/chassis' giving some information - about the overall health state of the system. - This includes NVRAM battery level, overtemp or failures such as - fans or power units. - - If unsure, say Y. - - config PDC_STABLE tristate "PDC Stable Storage support" depends on SYSFS diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 68cb3a080..a5d826237 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -31,6 +31,7 @@ ** the coherency design originally worked out. Only PCX-W does. */ +#include #include #include #include diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 0d96c50ff..6e8ed0c81 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -43,6 +43,7 @@ ** for PCI drivers devices which implement/use MMIO registers. */ +#include #include #include #include @@ -298,7 +299,7 @@ struct pci_port_ops dino_port_ops = { static void dino_disable_irq(unsigned int irq) { - struct dino_device *dino_dev = irq_desc[irq].chip_data; + struct dino_device *dino_dev = irq_desc[irq].handler_data; int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); @@ -310,7 +311,7 @@ static void dino_disable_irq(unsigned int irq) static void dino_enable_irq(unsigned int irq) { - struct dino_device *dino_dev = irq_desc[irq].chip_data; + struct dino_device *dino_dev = irq_desc[irq].handler_data; int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); u32 tmp; diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 884965ced..9d3bd15bf 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c @@ -340,7 +340,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) } pcibios_register_hba(&eisa_dev.hba); - result = request_irq(dev->irq, eisa_irq, IRQF_SHARED, "EISA", &eisa_dev); + result = request_irq(dev->irq, eisa_irq, SA_SHIRQ, "EISA", &eisa_dev); if (result) { printk(KERN_ERR "EISA: request_irq failed!\n"); return result; @@ -350,7 +350,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) irq_desc[2].action = &irq2_action; for (i = 0; i < 16; i++) { - irq_desc[i].chip = &eisa_interrupt_type; + irq_desc[i].handler = &eisa_interrupt_type; } EISA_bus = 1; diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index b45aa5c67..16d40f959 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -108,7 +109,7 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit) static void gsc_asic_disable_irq(unsigned int irq) { - struct gsc_asic *irq_dev = irq_desc[irq].chip_data; + struct gsc_asic *irq_dev = irq_desc[irq].handler_data; int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); u32 imr; @@ -123,7 +124,7 @@ static void gsc_asic_disable_irq(unsigned int irq) static void gsc_asic_enable_irq(unsigned int irq) { - struct gsc_asic *irq_dev = irq_desc[irq].chip_data; + struct gsc_asic *irq_dev = irq_desc[irq].handler_data; int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); u32 imr; @@ -163,8 +164,8 @@ int gsc_assign_irq(struct hw_interrupt_type *type, void *data) if (irq > GSC_IRQ_MAX) return NO_IRQ; - irq_desc[irq].chip = type; - irq_desc[irq].chip_data = data; + irq_desc[irq].handler = type; + irq_desc[irq].handler_data = data; return irq++; } diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 1fbda77ce..7a458d5bc 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -619,7 +619,7 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1) static struct vector_info *iosapic_get_vector(unsigned int irq) { - return irq_desc[irq].chip_data; + return irq_desc[irq].handler_data; } static void iosapic_disable_irq(unsigned int irq) diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index bf00fa253..298f2ddb2 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -23,6 +23,7 @@ * David Pye */ +#include #include #include /* for offsetof() */ #include @@ -410,17 +411,16 @@ static __inline__ int led_get_net_activity(void) static __inline__ int led_get_diskio_activity(void) { static unsigned long last_pgpgin, last_pgpgout; - unsigned long events[NR_VM_EVENT_ITEMS]; + struct page_state pgstat; int changed; - all_vm_events(events); + get_full_page_state(&pgstat); /* get no of sectors in & out */ /* Just use a very simple calculation here. Do not care about overflow, since we only want to know if there was activity or not. */ - changed = (events[PGPGIN] != last_pgpgin) || - (events[PGPGOUT] != last_pgpgout); - last_pgpgin = events[PGPGIN]; - last_pgpgout = events[PGPGOUT]; + changed = (pgstat.pgpgin != last_pgpgin) || (pgstat.pgpgout != last_pgpgout); + last_pgpgin = pgstat.pgpgin; + last_pgpgout = pgstat.pgpgout; return (changed ? LED_DISK_IO : 0); } diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index ea1b7a635..bbeabe3fc 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c @@ -28,15 +28,8 @@ * following code can deal with just 96 bytes of Stable Storage, and all * sizes between 96 and 192 bytes (provided they are multiple of struct * device_path size, eg: 128, 160 and 192) to provide full information. - * One last word: there's one path we can always count on: the primary path. - * Anything above 224 bytes is used for 'osdep2' OS-dependent storage area. - * - * The first OS-dependent area should always be available. Obviously, this is - * not true for the other one. Also bear in mind that reading/writing from/to - * osdep2 is much more expensive than from/to osdep1. - * NOTE: We do not handle the 2 bytes OS-dep area at 0x5D, nor the first - * 2 bytes of storage available right after OSID. That's a total of 4 bytes - * sacrificed: -ETOOLAZY :P + * The code makes no use of data above 192 bytes. One last word: there's one + * path we can always count on: the primary path. * * The current policy wrt file permissions is: * - write: root only @@ -71,18 +64,15 @@ #include #include -#define PDCS_VERSION "0.30" +#define PDCS_VERSION "0.22" #define PDCS_PREFIX "PDC Stable Storage" #define PDCS_ADDR_PPRI 0x00 #define PDCS_ADDR_OSID 0x40 -#define PDCS_ADDR_OSD1 0x48 -#define PDCS_ADDR_DIAG 0x58 #define PDCS_ADDR_FSIZ 0x5C #define PDCS_ADDR_PCON 0x60 #define PDCS_ADDR_PALT 0x80 #define PDCS_ADDR_PKBD 0xA0 -#define PDCS_ADDR_OSD2 0xE0 MODULE_AUTHOR("Thibaut VARENE "); MODULE_DESCRIPTION("sysfs interface to HP PDC Stable Storage data"); @@ -92,9 +82,6 @@ MODULE_VERSION(PDCS_VERSION); /* holds Stable Storage size. Initialized once and for all, no lock needed */ static unsigned long pdcs_size __read_mostly; -/* holds OS ID. Initialized once and for all, hopefully to 0x0006 */ -static u16 pdcs_osid __read_mostly; - /* This struct defines what we need to deal with a parisc pdc path entry */ struct pdcspath_entry { rwlock_t rw_lock; /* to protect path entry access */ @@ -622,64 +609,27 @@ static ssize_t pdcs_osid_read(struct subsystem *entry, char *buf) { char *out = buf; + __u32 result; + char *tmpstr = NULL; if (!entry || !buf) return -EINVAL; - out += sprintf(out, "%s dependent data (0x%.4x)\n", - os_id_to_string(pdcs_osid), pdcs_osid); - - return out - buf; -} - -/** - * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output. - * @entry: An allocated and populated subsytem struct. We don't use it tho. - * @buf: The output buffer to write to. - * - * This can hold 16 bytes of OS-Dependent data. - */ -static ssize_t -pdcs_osdep1_read(struct subsystem *entry, char *buf) -{ - char *out = buf; - u32 result[4]; - - if (!entry || !buf) - return -EINVAL; - - if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK) - return -EIO; - - out += sprintf(out, "0x%.8x\n", result[0]); - out += sprintf(out, "0x%.8x\n", result[1]); - out += sprintf(out, "0x%.8x\n", result[2]); - out += sprintf(out, "0x%.8x\n", result[3]); - - return out - buf; -} - -/** - * pdcs_diagnostic_read - Stable Storage Diagnostic register output. - * @entry: An allocated and populated subsytem struct. We don't use it tho. - * @buf: The output buffer to write to. - * - * I have NFC how to interpret the content of that register ;-). - */ -static ssize_t -pdcs_diagnostic_read(struct subsystem *entry, char *buf) -{ - char *out = buf; - u32 result; - - if (!entry || !buf) - return -EINVAL; - - /* get diagnostic */ - if (pdc_stable_read(PDCS_ADDR_DIAG, &result, sizeof(result)) != PDC_OK) + /* get OSID */ + if (pdc_stable_read(PDCS_ADDR_OSID, &result, sizeof(result)) != PDC_OK) return -EIO; - out += sprintf(out, "0x%.4x\n", (result >> 16)); + /* the actual result is 16 bits away */ + switch (result >> 16) { + case 0x0000: tmpstr = "No OS-dependent data"; break; + case 0x0001: tmpstr = "HP-UX dependent data"; break; + case 0x0002: tmpstr = "MPE-iX dependent data"; break; + case 0x0003: tmpstr = "OSF dependent data"; break; + case 0x0004: tmpstr = "HP-RT dependent data"; break; + case 0x0005: tmpstr = "Novell Netware dependent data"; break; + default: tmpstr = "Unknown"; break; + } + out += sprintf(out, "%s (0x%.4x)\n", tmpstr, (result >> 16)); return out - buf; } @@ -695,7 +645,7 @@ static ssize_t pdcs_fastsize_read(struct subsystem *entry, char *buf) { char *out = buf; - u32 result; + __u32 result; if (!entry || !buf) return -EINVAL; @@ -713,39 +663,6 @@ pdcs_fastsize_read(struct subsystem *entry, char *buf) return out - buf; } -/** - * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output. - * @entry: An allocated and populated subsytem struct. We don't use it tho. - * @buf: The output buffer to write to. - * - * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available. - */ -static ssize_t -pdcs_osdep2_read(struct subsystem *entry, char *buf) -{ - char *out = buf; - unsigned long size; - unsigned short i; - u32 result; - - if (unlikely(pdcs_size <= 224)) - return -ENODATA; - - size = pdcs_size - 224; - - if (!entry || !buf) - return -EINVAL; - - for (i=0; i 16) - return -EMSGSIZE; - - /* We'll use a local copy of buf */ - memset(in, 0, 16); - memcpy(in, buf, count); - - if (pdc_stable_write(PDCS_ADDR_OSD1, &in, sizeof(in)) != PDC_OK) - return -EIO; - - return count; -} - -/** - * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input. - * @entry: An allocated and populated subsytem struct. We don't use it tho. - * @buf: The input buffer to read from. - * @count: The number of bytes to be read. - * - * This can store pdcs_size - 224 bytes of OS-Dependent data. We use a - * byte-by-byte write approach. It's up to userspace to deal with it when - * constructing its input buffer. - */ -static ssize_t -pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count) -{ - unsigned long size; - unsigned short i; - u8 in[4]; - - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - - if (!entry || !buf || !count) - return -EINVAL; - - if (unlikely(pdcs_size <= 224)) - return -ENOSYS; - - if (unlikely(pdcs_osid != OS_ID_LINUX)) - return -EPERM; - - size = pdcs_size - 224; - - if (count > size) - return -EMSGSIZE; - - /* We'll use a local copy of buf */ - - for (i=0; i> 16); - /* For now we'll register the stable subsys within this driver */ if ((rc = firmware_register(&stable_subsys))) goto fail_firmreg; @@ -1068,7 +887,7 @@ pdc_stable_init(void) /* register the paths subsys as a subsystem of stable subsys */ kset_set_kset_s(&paths_subsys, stable_subsys); - if ((rc = subsystem_register(&paths_subsys))) + if ((rc= subsystem_register(&paths_subsys))) goto fail_subsysreg; /* now we create all "files" for the paths subsys */ diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index fad5a33bf..0bcab83b4 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c @@ -35,6 +35,7 @@ * runtime through the "/proc/sys/kernel/power" procfs entry. */ +#include #include #include #include diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 8b4732815..278f32502 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -19,6 +19,7 @@ ** FIXME: add DMA hint support programming in both sba and lba modules. */ +#include #include #include #include @@ -315,10 +316,10 @@ static int reserve_sba_gart = 1; ** ** Superdome (in particular, REO) allows only 64-bit CSR accesses. */ -#define READ_REG32(addr) readl(addr) -#define READ_REG64(addr) readq(addr) -#define WRITE_REG32(val, addr) writel((val), (addr)) -#define WRITE_REG64(val, addr) writeq((val), (addr)) +#define READ_REG32(addr) le32_to_cpu(__raw_readl(addr)) +#define READ_REG64(addr) le64_to_cpu(__raw_readq(addr)) +#define WRITE_REG32(val, addr) __raw_writel(cpu_to_le32(val), addr) +#define WRITE_REG64(val, addr) __raw_writeq(cpu_to_le64(val), addr) #ifdef CONFIG_64BIT #define READ_REG(addr) READ_REG64(addr) @@ -1426,7 +1427,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) iov_order = get_order(iova_space_size >> (IOVP_SHIFT - PAGE_SHIFT)); ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); - DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n", + DBG_INIT("%s() hpa 0x%lx IOV %dMB (%d bits)\n", __FUNCTION__, ioc->ioc_hpa, iova_space_size >> 20, iov_order + PAGE_SHIFT); @@ -1763,7 +1764,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, sba_dev->num_ioc = num_ioc; for (i = 0; i < num_ioc; i++) { - void __iomem *ioc_hpa = sba_dev->ioc[i].ioc_hpa; + unsigned long ioc_hpa = sba_dev->ioc[i].ioc_hpa; unsigned int j; for (j=0; j < sizeof(u64) * ROPES_PER_IOC; j+=sizeof(u64)) { @@ -1775,8 +1776,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, * Improves netperf UDP_STREAM by ~10% for bcm5701. */ if (IS_PLUTO(sba_dev->iodc)) { - void __iomem *rope_cfg; - unsigned long cfg_val; + unsigned long rope_cfg, cfg_val; rope_cfg = ioc_hpa + IOC_ROPE0_CFG + j; cfg_val = READ_REG(rope_cfg); @@ -1902,7 +1902,7 @@ sba_common_init(struct sba_device *sba_dev) * (bit #61, big endian), we have to flush and sync every time * IO-PDIR is changed in Ike/Astro. */ - if (ioc_needs_fdc) { + if (boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC) { printk(KERN_INFO MODULE_NAME " FDC/SYNC required.\n"); } else { printk(KERN_INFO MODULE_NAME " IOC has cache coherent PDIR.\n"); diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 4ee26a6d9..828eb4506 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c @@ -271,7 +271,7 @@ superio_init(struct pci_dev *pcidev) else printk(KERN_ERR PFX "USB regulator not initialized!\n"); - if (request_irq(pdev->irq, superio_interrupt, IRQF_DISABLED, + if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT, SUPERIO, (void *)sio)) { printk(KERN_ERR PFX "could not get irq\n"); @@ -360,7 +360,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) #endif for (i = 0; i < 16; i++) { - irq_desc[i].chip = &superio_interrupt_type; + irq_desc[i].handler = &superio_interrupt_type; } /* diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index c7fa28a28..6c8452ede 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig @@ -85,6 +85,11 @@ config PARPORT_PC_PCMCIA config PARPORT_NOT_PC bool +config PARPORT_ARC + tristate "Archimedes hardware" + depends on ARM && PARPORT + select PARPORT_NOT_PC + config PARPORT_IP32 tristate "SGI IP32 builtin port (EXPERIMENTAL)" depends on SGI_IP32 && PARPORT && EXPERIMENTAL @@ -136,18 +141,6 @@ config PARPORT_SUNBPP found on many Sun machines. Note that many of the newer Ultras actually have pc style hardware instead. -config PARPORT_AX88796 - tristate "AX88796 Parallel Port" - depends on PARPORT - select PARPORT_NOT_PC - help - Say Y here if you need support for the parallel port hardware on - the AX88796 network controller chip. This code is also available - as a module (say M), called parport_ax88796. - - The driver is not dependant on the AX88796 network driver, and - should not interfere with the networking functions of the chip. - config PARPORT_1284 bool "IEEE 1284 transfer modes" depends on PARPORT diff --git a/drivers/parport/Makefile b/drivers/parport/Makefile index 696b8d4ca..a19de35f8 100644 --- a/drivers/parport/Makefile +++ b/drivers/parport/Makefile @@ -17,5 +17,4 @@ obj-$(CONFIG_PARPORT_MFC3) += parport_mfc3.o obj-$(CONFIG_PARPORT_ATARI) += parport_atari.o obj-$(CONFIG_PARPORT_SUNBPP) += parport_sunbpp.o obj-$(CONFIG_PARPORT_GSC) += parport_gsc.o -obj-$(CONFIG_PARPORT_AX88796) += parport_ax88796.o -obj-$(CONFIG_PARPORT_IP32) += parport_ip32.o \ No newline at end of file +obj-$(CONFIG_PARPORT_IP32) += parport_ip32.o diff --git a/drivers/parport/daisy.c b/drivers/parport/daisy.c index fd41e2810..9ee67321b 100644 --- a/drivers/parport/daisy.c +++ b/drivers/parport/daisy.c @@ -283,7 +283,7 @@ void parport_close (struct pardevice *dev) * * This tries to locate a device on the given parallel port, * multiplexor port and daisy chain address, and returns its - * device number or %-ENXIO if no device with those coordinates + * device number or -NXIO if no device with those coordinates * exists. **/ diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c index 7ff09f0f8..690b239ad 100644 --- a/drivers/parport/ieee1284.c +++ b/drivers/parport/ieee1284.c @@ -16,6 +16,7 @@ * Various hacks, Fred Barnes , 04/2000 */ +#include #include #include #include diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index 525312f2f..d6c776582 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -14,6 +14,7 @@ */ +#include #include #include #include diff --git a/drivers/parport/parport_arc.c b/drivers/parport/parport_arc.c new file mode 100644 index 000000000..b35bb4f48 --- /dev/null +++ b/drivers/parport/parport_arc.c @@ -0,0 +1,139 @@ +/* Low-level parallel port routines for Archimedes onboard hardware + * + * Author: Phil Blundell + */ + +/* This driver is for the parallel port hardware found on Acorn's old + * range of Archimedes machines. The A5000 and newer systems have PC-style + * I/O hardware and should use the parport_pc driver instead. + * + * The Acorn printer port hardware is very simple. There is a single 8-bit + * write-only latch for the data port and control/status bits are handled + * with various auxilliary input and output lines. The port is not + * bidirectional, does not support any modes other than SPP, and has only + * a subset of the standard printer control lines connected. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define DATA_ADDRESS 0x3350010 + +/* This is equivalent to the above and only used for request_region. */ +#define PORT_BASE 0x80000000 | ((DATA_ADDRESS - IO_BASE) >> 2) + +/* The hardware can't read from the data latch, so we must use a soft + copy. */ +static unsigned char data_copy; + +/* These are pretty simple. We know the irq is never shared and the + kernel does all the magic that's required. */ +static void arc_enable_irq(struct parport *p) +{ + enable_irq(p->irq); +} + +static void arc_disable_irq(struct parport *p) +{ + disable_irq(p->irq); +} + +static void arc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + parport_generic_irq(irq, (struct parport *) dev_id, regs); +} + +static void arc_write_data(struct parport *p, unsigned char data) +{ + data_copy = data; + outb_t(data, DATA_LATCH); +} + +static unsigned char arc_read_data(struct parport *p) +{ + return data_copy; +} + +static struct parport_operations parport_arc_ops = +{ + .write_data = arc_write_data, + .read_data = arc_read_data, + + .write_control = arc_write_control, + .read_control = arc_read_control, + .frob_control = arc_frob_control, + + .read_status = arc_read_status, + + .enable_irq = arc_enable_irq, + .disable_irq = arc_disable_irq, + + .data_forward = arc_data_forward, + .data_reverse = arc_data_reverse, + + .init_state = arc_init_state, + .save_state = arc_save_state, + .restore_state = arc_restore_state, + + .epp_write_data = parport_ieee1284_epp_write_data, + .epp_read_data = parport_ieee1284_epp_read_data, + .epp_write_addr = parport_ieee1284_epp_write_addr, + .epp_read_addr = parport_ieee1284_epp_read_addr, + + .ecp_write_data = parport_ieee1284_ecp_write_data, + .ecp_read_data = parport_ieee1284_ecp_read_data, + .ecp_write_addr = parport_ieee1284_ecp_write_addr, + + .compat_write_data = parport_ieee1284_write_compat, + .nibble_read_data = parport_ieee1284_read_nibble, + .byte_read_data = parport_ieee1284_read_byte, + + .owner = THIS_MODULE, +}; + +/* --- Initialisation code -------------------------------- */ + +static int parport_arc_init(void) +{ + /* Archimedes hardware provides only one port, at a fixed address */ + struct parport *p; + struct resource res; + char *fake_name = "parport probe"); + + res = request_region(PORT_BASE, 1, fake_name); + if (res == NULL) + return 0; + + p = parport_register_port (PORT_BASE, IRQ_PRINTERACK, + PARPORT_DMA_NONE, &parport_arc_ops); + + if (!p) { + release_region(PORT_BASE, 1); + return 0; + } + + p->modes = PARPORT_MODE_ARCSPP; + p->size = 1; + rename_region(res, p->name); + + printk(KERN_INFO "%s: Archimedes on-board port, using irq %d\n", + p->irq); + + /* Tell the high-level drivers about the port. */ + parport_announce_port (p); + + return 1; +} + +module_init(parport_arc_init) diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c deleted file mode 100644 index 185063259..000000000 --- a/drivers/parport/parport_ax88796.c +++ /dev/null @@ -1,443 +0,0 @@ -/* linux/drivers/parport/parport_ax88796.c - * - * (c) 2005,2006 Simtec Electronics - * Ben Dooks - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include - -#define AX_SPR_BUSY (1<<7) -#define AX_SPR_ACK (1<<6) -#define AX_SPR_PE (1<<5) -#define AX_SPR_SLCT (1<<4) -#define AX_SPR_ERR (1<<3) - -#define AX_CPR_nDOE (1<<5) -#define AX_CPR_SLCTIN (1<<3) -#define AX_CPR_nINIT (1<<2) -#define AX_CPR_ATFD (1<<1) -#define AX_CPR_STRB (1<<0) - -struct ax_drvdata { - struct parport *parport; - struct parport_state suspend; - - struct device *dev; - struct resource *io; - - unsigned char irq_enabled; - - void __iomem *base; - void __iomem *spp_data; - void __iomem *spp_spr; - void __iomem *spp_cpr; -}; - -static inline struct ax_drvdata *pp_to_drv(struct parport *p) -{ - return p->private_data; -} - -static unsigned char -parport_ax88796_read_data(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - - return readb(dd->spp_data); -} - -static void -parport_ax88796_write_data(struct parport *p, unsigned char data) -{ - struct ax_drvdata *dd = pp_to_drv(p); - - writeb(data, dd->spp_data); -} - -static unsigned char -parport_ax88796_read_control(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned int cpr = readb(dd->spp_cpr); - unsigned int ret = 0; - - if (!(cpr & AX_CPR_STRB)) - ret |= PARPORT_CONTROL_STROBE; - - if (!(cpr & AX_CPR_ATFD)) - ret |= PARPORT_CONTROL_AUTOFD; - - if (cpr & AX_CPR_nINIT) - ret |= PARPORT_CONTROL_INIT; - - if (!(cpr & AX_CPR_SLCTIN)) - ret |= PARPORT_CONTROL_SELECT; - - return ret; -} - -static void -parport_ax88796_write_control(struct parport *p, unsigned char control) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned int cpr = readb(dd->spp_cpr); - - cpr &= AX_CPR_nDOE; - - if (!(control & PARPORT_CONTROL_STROBE)) - cpr |= AX_CPR_STRB; - - if (!(control & PARPORT_CONTROL_AUTOFD)) - cpr |= AX_CPR_ATFD; - - if (control & PARPORT_CONTROL_INIT) - cpr |= AX_CPR_nINIT; - - if (!(control & PARPORT_CONTROL_SELECT)) - cpr |= AX_CPR_SLCTIN; - - dev_dbg(dd->dev, "write_control: ctrl=%02x, cpr=%02x\n", control, cpr); - writeb(cpr, dd->spp_cpr); - - if (parport_ax88796_read_control(p) != control) { - dev_err(dd->dev, "write_control: read != set (%02x, %02x)\n", - parport_ax88796_read_control(p), control); - } -} - -static unsigned char -parport_ax88796_read_status(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned int status = readb(dd->spp_spr); - unsigned int ret = 0; - - if (status & AX_SPR_BUSY) - ret |= PARPORT_STATUS_BUSY; - - if (status & AX_SPR_ACK) - ret |= PARPORT_STATUS_ACK; - - if (status & AX_SPR_ERR) - ret |= PARPORT_STATUS_ERROR; - - if (status & AX_SPR_SLCT) - ret |= PARPORT_STATUS_SELECT; - - if (status & AX_SPR_PE) - ret |= PARPORT_STATUS_PAPEROUT; - - return ret; -} - -static unsigned char -parport_ax88796_frob_control(struct parport *p, unsigned char mask, - unsigned char val) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned char old = parport_ax88796_read_control(p); - - dev_dbg(dd->dev, "frob: mask=%02x, val=%02x, old=%02x\n", - mask, val, old); - - parport_ax88796_write_control(p, (old & ~mask) | val); - return old; -} - -static void -parport_ax88796_enable_irq(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned long flags; - - local_irq_save(flags); - if (!dd->irq_enabled) { - enable_irq(p->irq); - dd->irq_enabled = 1; - } - local_irq_restore(flags); -} - -static void -parport_ax88796_disable_irq(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - unsigned long flags; - - local_irq_save(flags); - if (dd->irq_enabled) { - disable_irq(p->irq); - dd->irq_enabled = 0; - } - local_irq_restore(flags); -} - -static void -parport_ax88796_data_forward(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - void __iomem *cpr = dd->spp_cpr; - - writeb((readb(cpr) & ~AX_CPR_nDOE), cpr); -} - -static void -parport_ax88796_data_reverse(struct parport *p) -{ - struct ax_drvdata *dd = pp_to_drv(p); - void __iomem *cpr = dd->spp_cpr; - - writeb(readb(cpr) | AX_CPR_nDOE, cpr); -} - -static void -parport_ax88796_init_state(struct pardevice *d, struct parport_state *s) -{ - struct ax_drvdata *dd = pp_to_drv(d->port); - - memset(s, 0, sizeof(struct parport_state)); - - dev_dbg(dd->dev, "init_state: %p: state=%p\n", d, s); - s->u.ax88796.cpr = readb(dd->spp_cpr); -} - -static void -parport_ax88796_save_state(struct parport *p, struct parport_state *s) -{ - struct ax_drvdata *dd = pp_to_drv(p); - - dev_dbg(dd->dev, "save_state: %p: state=%p\n", p, s); - s->u.ax88796.cpr = readb(dd->spp_cpr); -} - -static void -parport_ax88796_restore_state(struct parport *p, struct parport_state *s) -{ - struct ax_drvdata *dd = pp_to_drv(p); - - dev_dbg(dd->dev, "restore_state: %p: state=%p\n", p, s); - writeb(s->u.ax88796.cpr, dd->spp_cpr); -} - -static irqreturn_t -parport_ax88796_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - parport_generic_irq(irq, dev_id, regs); - return IRQ_HANDLED; -} - - -static struct parport_operations parport_ax88796_ops = { - .write_data = parport_ax88796_write_data, - .read_data = parport_ax88796_read_data, - - .write_control = parport_ax88796_write_control, - .read_control = parport_ax88796_read_control, - .frob_control = parport_ax88796_frob_control, - - .read_status = parport_ax88796_read_status, - - .enable_irq = parport_ax88796_enable_irq, - .disable_irq = parport_ax88796_disable_irq, - - .data_forward = parport_ax88796_data_forward, - .data_reverse = parport_ax88796_data_reverse, - - .init_state = parport_ax88796_init_state, - .save_state = parport_ax88796_save_state, - .restore_state = parport_ax88796_restore_state, - - .epp_write_data = parport_ieee1284_epp_write_data, - .epp_read_data = parport_ieee1284_epp_read_data, - .epp_write_addr = parport_ieee1284_epp_write_addr, - .epp_read_addr = parport_ieee1284_epp_read_addr, - - .ecp_write_data = parport_ieee1284_ecp_write_data, - .ecp_read_data = parport_ieee1284_ecp_read_data, - .ecp_write_addr = parport_ieee1284_ecp_write_addr, - - .compat_write_data = parport_ieee1284_write_compat, - .nibble_read_data = parport_ieee1284_read_nibble, - .byte_read_data = parport_ieee1284_read_byte, - - .owner = THIS_MODULE, -}; - -static int parport_ax88796_probe(struct platform_device *pdev) -{ - struct device *_dev = &pdev->dev; - struct ax_drvdata *dd; - struct parport *pp = NULL; - struct resource *res; - unsigned long size; - int spacing; - int irq; - int ret; - - dd = kzalloc(sizeof(struct ax_drvdata), GFP_KERNEL); - if (dd == NULL) { - dev_err(_dev, "no memory for private data\n"); - return -ENOMEM; - } - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(_dev, "no MEM specified\n"); - ret = -ENXIO; - goto exit_mem; - } - - size = (res->end - res->start) + 1; - spacing = size / 3; - - dd->io = request_mem_region(res->start, size, pdev->name); - if (dd->io == NULL) { - dev_err(_dev, "cannot reserve memory\n"); - ret = -ENXIO; - goto exit_mem; - } - - dd->base = ioremap(res->start, size); - if (dd->base == NULL) { - dev_err(_dev, "cannot ioremap region\n"); - ret = -ENXIO; - goto exit_res; - } - - irq = platform_get_irq(pdev, 0); - if (irq <= 0) - irq = PARPORT_IRQ_NONE; - - pp = parport_register_port((unsigned long)dd->base, irq, - PARPORT_DMA_NONE, - &parport_ax88796_ops); - - if (pp == NULL) { - dev_err(_dev, "failed to register parallel port\n"); - ret = -ENOMEM; - goto exit_unmap; - } - - pp->private_data = dd; - dd->parport = pp; - dd->dev = _dev; - - dd->spp_data = dd->base; - dd->spp_spr = dd->base + (spacing * 1); - dd->spp_cpr = dd->base + (spacing * 2); - - /* initialise the port controls */ - writeb(AX_CPR_STRB, dd->spp_cpr); - - if (irq >= 0) { - /* request irq */ - ret = request_irq(irq, parport_ax88796_interrupt, - IRQF_TRIGGER_FALLING, pdev->name, pp); - - if (ret < 0) - goto exit_port; - - dd->irq_enabled = 1; - } - - platform_set_drvdata(pdev, pp); - - dev_info(_dev, "attached parallel port driver\n"); - parport_announce_port(pp); - - return 0; - - exit_port: - parport_remove_port(pp); - exit_unmap: - iounmap(dd->base); - exit_res: - release_resource(dd->io); - kfree(dd->io); - exit_mem: - kfree(dd); - return ret; -} - -static int parport_ax88796_remove(struct platform_device *pdev) -{ - struct parport *p = platform_get_drvdata(pdev); - struct ax_drvdata *dd = pp_to_drv(p); - - free_irq(p->irq, p); - parport_remove_port(p); - iounmap(dd->base); - release_resource(dd->io); - kfree(dd->io); - kfree(dd); - - return 0; -} - -#ifdef CONFIG_PM - -static int parport_ax88796_suspend(struct platform_device *dev, - pm_message_t state) -{ - struct parport *p = platform_get_drvdata(dev); - struct ax_drvdata *dd = pp_to_drv(p); - - parport_ax88796_save_state(p, &dd->suspend); - writeb(AX_CPR_nDOE | AX_CPR_STRB, dd->spp_cpr); - return 0; -} - -static int parport_ax88796_resume(struct platform_device *dev) -{ - struct parport *p = platform_get_drvdata(dev); - struct ax_drvdata *dd = pp_to_drv(p); - - parport_ax88796_restore_state(p, &dd->suspend); - return 0; -} - -#else -#define parport_ax88796_suspend NULL -#define parport_ax88796_resume NULL -#endif - -static struct platform_driver axdrv = { - .driver = { - .name = "ax88796-pp", - .owner = THIS_MODULE, - }, - .probe = parport_ax88796_probe, - .remove = parport_ax88796_remove, - .suspend = parport_ax88796_suspend, - .resume = parport_ax88796_resume, -}; - -static int __init parport_ax88796_init(void) -{ - return platform_driver_register(&axdrv); -} - -static void __exit parport_ax88796_exit(void) -{ - platform_driver_unregister(&axdrv); -} - -module_init(parport_ax88796_init) -module_exit(parport_ax88796_exit) - -MODULE_AUTHOR("Ben Dooks "); -MODULE_DESCRIPTION("AX88796 Parport parallel port driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 7352104f7..1de52d9fe 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c @@ -15,7 +15,7 @@ * Phil Blundell * Tim Waugh * Jose Renau - * David Campbell + * David Campbell * Andrea Arcangeli */ diff --git a/drivers/parport/parport_gsc.h b/drivers/parport/parport_gsc.h index fc9c37c54..662f6c1fe 100644 --- a/drivers/parport/parport_gsc.h +++ b/drivers/parport/parport_gsc.h @@ -24,7 +24,7 @@ * Phil Blundell * Tim Waugh * Jose Renau - * David Campbell + * David Campbell * Andrea Arcangeli */ diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c index b2b8092a2..c85364765 100644 --- a/drivers/parport/parport_mfc3.c +++ b/drivers/parport/parport_mfc3.c @@ -353,7 +353,7 @@ static int __init parport_mfc3_init(void) if (p->irq != PARPORT_IRQ_NONE) { if (use_cnt++ == 0) - if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, IRQF_SHARED, p->name, &pp_mfc3_ops)) + if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, SA_SHIRQ, p->name, &pp_mfc3_ops)) goto out_irq; } diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index fe800dc0b..48bbf32fd 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -3,7 +3,7 @@ * Authors: Phil Blundell * Tim Waugh * Jose Renau - * David Campbell + * David Campbell * Andrea Arcangeli * * based on work by Grant Guenther and Phil Blundell. @@ -42,6 +42,7 @@ * but rather will start at port->base_hi. */ +#include #include #include #include diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index fac333b27..36a1556e6 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c @@ -1,4 +1,5 @@ -/* parport_sunbpp.c: Parallel-port routines for SBUS +/* $Id: parport_sunbpp.c,v 1.12 2001/05/26 03:01:42 davem Exp $ + * Parallel-port routines for Sun architecture * * Author: Derrick J. Brashear * @@ -13,9 +14,6 @@ * Gus Baldauf (gbaldauf@ix.netcom.com) * Peter Zaitcev * Tom Dyas - * - * Updated to new SBUS device framework: David S. Miller - * */ #include @@ -289,7 +287,14 @@ static struct parport_operations parport_sunbpp_ops = .owner = THIS_MODULE, }; -static int __devinit init_one_port(struct sbus_dev *sdev) +typedef struct { + struct list_head list; + struct parport *port; +} Node; +/* no locks, everything's serialized */ +static LIST_HEAD(port_list); + +static int __init init_one_port(struct sbus_dev *sdev) { struct parport *p; /* at least in theory there may be a "we don't dma" case */ @@ -298,120 +303,109 @@ static int __devinit init_one_port(struct sbus_dev *sdev) int irq, dma, err = 0, size; struct bpp_regs __iomem *regs; unsigned char value_tcr; + Node *node; + + dprintk((KERN_DEBUG "init_one_port(%p): ranges, alloc_io, ", sdev)); + node = kmalloc(sizeof(Node), GFP_KERNEL); + if (!node) + goto out0; irq = sdev->irqs[0]; base = sbus_ioremap(&sdev->resource[0], 0, sdev->reg_addrs[0].reg_size, "sunbpp"); if (!base) - return -ENODEV; + goto out1; size = sdev->reg_addrs[0].reg_size; dma = PARPORT_DMA_NONE; - ops = kmalloc(sizeof(struct parport_operations), GFP_KERNEL); + dprintk(("alloc(ppops), ")); + ops = kmalloc (sizeof (struct parport_operations), GFP_KERNEL); if (!ops) - goto out_unmap; + goto out2; memcpy (ops, &parport_sunbpp_ops, sizeof (struct parport_operations)); dprintk(("register_port\n")); if (!(p = parport_register_port((unsigned long)base, irq, dma, ops))) - goto out_free_ops; + goto out3; p->size = size; + dprintk((KERN_DEBUG "init_one_port: request_irq(%08x:%p:%x:%s:%p) ", + p->irq, parport_sunbpp_interrupt, SA_SHIRQ, p->name, p)); if ((err = request_irq(p->irq, parport_sunbpp_interrupt, - IRQF_SHARED, p->name, p)) != 0) { - goto out_put_port; + SA_SHIRQ, p->name, p)) != 0) { + dprintk(("ERROR %d\n", err)); + goto out4; } - + dprintk(("OK\n")); parport_sunbpp_enable_irq(p); regs = (struct bpp_regs __iomem *)p->base; - + dprintk((KERN_DEBUG "forward\n")); value_tcr = sbus_readb(®s->p_tcr); value_tcr &= ~P_TCR_DIR; sbus_writeb(value_tcr, ®s->p_tcr); printk(KERN_INFO "%s: sunbpp at 0x%lx\n", p->name, p->base); + node->port = p; + list_add(&node->list, &port_list); + parport_announce_port (p); - dev_set_drvdata(&sdev->ofdev.dev, p); - - parport_announce_port(p); - - return 0; + return 1; -out_put_port: +out4: parport_put_port(p); - -out_free_ops: +out3: kfree(ops); - -out_unmap: +out2: sbus_iounmap(base, size); - +out1: + kfree(node); +out0: return err; } -static int __devinit bpp_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - - return init_one_port(sdev); -} - -static int __devexit bpp_remove(struct of_device *dev) -{ - struct parport *p = dev_get_drvdata(&dev->dev); - struct parport_operations *ops = p->ops; - - parport_remove_port(p); - - if (p->irq != PARPORT_IRQ_NONE) { - parport_sunbpp_disable_irq(p); - free_irq(p->irq, p); - } - - sbus_iounmap((void __iomem *) p->base, p->size); - parport_put_port(p); - kfree(ops); - - dev_set_drvdata(&dev->dev, NULL); - - return 0; -} - -static struct of_device_id bpp_match[] = { - { - .name = "SUNW,bpp", - }, - {}, -}; - -MODULE_DEVICE_TABLE(of, bpp_match); - -static struct of_platform_driver bpp_sbus_driver = { - .name = "bpp", - .match_table = bpp_match, - .probe = bpp_probe, - .remove = __devexit_p(bpp_remove), -}; - static int __init parport_sunbpp_init(void) { - return of_register_driver(&bpp_sbus_driver, &sbus_bus_type); + struct sbus_bus *sbus; + struct sbus_dev *sdev; + int count = 0; + + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "SUNW,bpp")) + count += init_one_port(sdev); + } + } + return count ? 0 : -ENODEV; } static void __exit parport_sunbpp_exit(void) { - of_unregister_driver(&bpp_sbus_driver); + while (!list_empty(&port_list)) { + Node *node = list_entry(port_list.next, Node, list); + struct parport *p = node->port; + struct parport_operations *ops = p->ops; + parport_remove_port(p); + + if (p->irq != PARPORT_IRQ_NONE) { + parport_sunbpp_disable_irq(p); + free_irq(p->irq, p); + } + sbus_iounmap((void __iomem *)p->base, p->size); + parport_put_port(p); + kfree (ops); + list_del(&node->list); + kfree (node); + } } MODULE_AUTHOR("Derrick J Brashear"); MODULE_DESCRIPTION("Parport Driver for Sparc bidirectional Port"); MODULE_SUPPORTED_DEVICE("Sparc Bidirectional Parallel Port"); -MODULE_VERSION("2.0"); MODULE_LICENSE("GPL"); module_init(parport_sunbpp_init) diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c index 2e744a274..cbe17184b 100644 --- a/drivers/parport/procfs.c +++ b/drivers/parport/procfs.c @@ -1,6 +1,6 @@ /* Sysctl interface for parport devices. * - * Authors: David Campbell + * Authors: David Campbell * Tim Waugh * Philip Blundell * Andrea Arcangeli @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 94dc506b8..bbbfd79ad 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -17,6 +17,7 @@ #undef PARPORT_DEBUG_SHARING /* undef for production */ +#include #include #include #include @@ -217,7 +218,7 @@ static void free_port (struct parport *port) * parport_get_port - increment a port's reference count * @port: the port * - * This ensures that a struct parport pointer remains valid + * This ensure's that a struct parport pointer remains valid * until the matching parport_put_port() call. **/ diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index f2d152b81..6707df968 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -26,11 +26,7 @@ obj-$(CONFIG_PPC32) += setup-irq.o obj-$(CONFIG_PPC64) += setup-bus.o obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o obj-$(CONFIG_X86_VISWS) += setup-irq.o - -msiobj-y := msi.o msi-apic.o -msiobj-$(CONFIG_IA64_GENERIC) += msi-altix.o -msiobj-$(CONFIG_IA64_SGI_SN2) += msi-altix.o -obj-$(CONFIG_PCI_MSI) += $(msiobj-y) +obj-$(CONFIG_PCI_MSI) += msi.o # # ACPI Related PCI FW Functions diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 5f7db9d24..eed67d9e7 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -34,11 +34,11 @@ */ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - resource_size_t size, resource_size_t align, - resource_size_t min, unsigned int type_mask, - void (*alignf)(void *, struct resource *, resource_size_t, - resource_size_t), - void *alignf_data) + unsigned long size, unsigned long align, unsigned long min, + unsigned int type_mask, + void (*alignf)(void *, struct resource *, + unsigned long, unsigned long), + void *alignf_data) { int i, ret = -ENOMEM; @@ -81,9 +81,9 @@ void __devinit pci_bus_add_device(struct pci_dev *dev) { device_add(&dev->dev); - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_add_tail(&dev->global_list, &pci_devices); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); pci_proc_attach_device(dev); pci_create_sysfs_dev_files(dev); @@ -125,10 +125,10 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus) */ if (dev->subordinate) { if (list_empty(&dev->subordinate->node)) { - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_add_tail(&dev->subordinate->node, &dev->bus->children); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); } pci_bus_add_devices(dev->subordinate); @@ -168,7 +168,7 @@ void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), struct list_head *next; bus = top; - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); next = top->devices.next; for (;;) { if (next == &bus->devices) { @@ -180,19 +180,22 @@ void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), continue; } dev = list_entry(next, struct pci_dev, bus_list); + pci_dev_get(dev); if (dev->subordinate) { /* this is a pci-pci bridge, do its devices next */ next = dev->subordinate->devices.next; bus = dev->subordinate; } else next = dev->bus_list.next; + spin_unlock(&pci_bus_lock); - /* Run device routines with the device locked */ - down(&dev->dev.sem); + /* Run device routines with the bus unlocked */ cb(dev, userdata); - up(&dev->dev.sem); + + spin_lock(&pci_bus_lock); + pci_dev_put(dev); } - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); } EXPORT_SYMBOL_GPL(pci_walk_bus); diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 8a60f391f..222a1cc4a 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig @@ -6,7 +6,8 @@ menu "PCI Hotplug Support" config HOTPLUG_PCI tristate "Support for PCI Hotplug (EXPERIMENTAL)" - depends on PCI && EXPERIMENTAL && HOTPLUG + depends on PCI && EXPERIMENTAL + select HOTPLUG ---help--- Say Y here if you have a motherboard with a PCI Hotplug controller. This allows you to add and remove PCI cards while the machine is @@ -76,7 +77,7 @@ config HOTPLUG_PCI_IBM config HOTPLUG_PCI_ACPI tristate "ACPI PCI Hotplug driver" - depends on (!ACPI_DOCK && ACPI && HOTPLUG_PCI) || (ACPI_DOCK && HOTPLUG_PCI) + depends on ACPI && HOTPLUG_PCI help Say Y here if you have a system that supports PCI Hotplug using ACPI. @@ -153,6 +154,13 @@ config HOTPLUG_PCI_SHPC_POLL_EVENT_MODE When in doubt, say N. +config HOTPLUG_PCI_SHPC_PHPRM_LEGACY + bool "For AMD SHPC only: Use $HRT for resource/configuration" + depends on HOTPLUG_PCI_SHPC && !ACPI + help + Say Y here for AMD SHPC. You have to select this option if you are + using this driver on platform with AMD SHPC. + config HOTPLUG_PCI_RPA tristate "RPA PCI Hotplug driver" depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 && !HOTPLUG_PCI_FAKE diff --git a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile index 34a189119..421cfffb1 100644 --- a/drivers/pci/hotplug/Makefile +++ b/drivers/pci/hotplug/Makefile @@ -40,7 +40,8 @@ ibmphp-objs := ibmphp_core.o \ ibmphp_hpc.o acpiphp-objs := acpiphp_core.o \ - acpiphp_glue.o + acpiphp_glue.o \ + acpiphp_dock.o rpaphp-objs := rpaphp_core.o \ rpaphp_pci.o \ diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 51cb9f817..39af9c325 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c @@ -25,7 +25,6 @@ */ #include -#include #include #include #include @@ -34,184 +33,10 @@ #include #include "pci_hotplug.h" -#define MY_NAME "acpi_pcihp" - -#define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## 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 METHOD_NAME__SUN "_SUN" #define METHOD_NAME__HPP "_HPP" #define METHOD_NAME_OSHP "OSHP" -static int debug_acpi; - -static acpi_status -decode_type0_hpx_record(union acpi_object *record, struct hotplug_params *hpx) -{ - int i; - union acpi_object *fields = record->package.elements; - u32 revision = fields[1].integer.value; - - switch (revision) { - case 1: - if (record->package.count != 6) - return AE_ERROR; - for (i = 2; i < 6; i++) - if (fields[i].type != ACPI_TYPE_INTEGER) - return AE_ERROR; - hpx->t0 = &hpx->type0_data; - hpx->t0->revision = revision; - hpx->t0->cache_line_size = fields[2].integer.value; - hpx->t0->latency_timer = fields[3].integer.value; - hpx->t0->enable_serr = fields[4].integer.value; - hpx->t0->enable_perr = fields[5].integer.value; - break; - default: - printk(KERN_WARNING - "%s: Type 0 Revision %d record not supported\n", - __FUNCTION__, revision); - return AE_ERROR; - } - return AE_OK; -} - -static acpi_status -decode_type1_hpx_record(union acpi_object *record, struct hotplug_params *hpx) -{ - int i; - union acpi_object *fields = record->package.elements; - u32 revision = fields[1].integer.value; - - switch (revision) { - case 1: - if (record->package.count != 5) - return AE_ERROR; - for (i = 2; i < 5; i++) - if (fields[i].type != ACPI_TYPE_INTEGER) - return AE_ERROR; - hpx->t1 = &hpx->type1_data; - hpx->t1->revision = revision; - hpx->t1->max_mem_read = fields[2].integer.value; - hpx->t1->avg_max_split = fields[3].integer.value; - hpx->t1->tot_max_split = fields[4].integer.value; - break; - default: - printk(KERN_WARNING - "%s: Type 1 Revision %d record not supported\n", - __FUNCTION__, revision); - return AE_ERROR; - } - return AE_OK; -} - -static acpi_status -decode_type2_hpx_record(union acpi_object *record, struct hotplug_params *hpx) -{ - int i; - union acpi_object *fields = record->package.elements; - u32 revision = fields[1].integer.value; - - switch (revision) { - case 1: - if (record->package.count != 18) - return AE_ERROR; - for (i = 2; i < 18; i++) - if (fields[i].type != ACPI_TYPE_INTEGER) - return AE_ERROR; - hpx->t2 = &hpx->type2_data; - hpx->t2->revision = revision; - hpx->t2->unc_err_mask_and = fields[2].integer.value; - hpx->t2->unc_err_mask_or = fields[3].integer.value; - hpx->t2->unc_err_sever_and = fields[4].integer.value; - hpx->t2->unc_err_sever_or = fields[5].integer.value; - hpx->t2->cor_err_mask_and = fields[6].integer.value; - hpx->t2->cor_err_mask_or = fields[7].integer.value; - hpx->t2->adv_err_cap_and = fields[8].integer.value; - hpx->t2->adv_err_cap_or = fields[9].integer.value; - hpx->t2->pci_exp_devctl_and = fields[10].integer.value; - hpx->t2->pci_exp_devctl_or = fields[11].integer.value; - hpx->t2->pci_exp_lnkctl_and = fields[12].integer.value; - hpx->t2->pci_exp_lnkctl_or = fields[13].integer.value; - hpx->t2->sec_unc_err_sever_and = fields[14].integer.value; - hpx->t2->sec_unc_err_sever_or = fields[15].integer.value; - hpx->t2->sec_unc_err_mask_and = fields[16].integer.value; - hpx->t2->sec_unc_err_mask_or = fields[17].integer.value; - break; - default: - printk(KERN_WARNING - "%s: Type 2 Revision %d record not supported\n", - __FUNCTION__, revision); - return AE_ERROR; - } - return AE_OK; -} - -static acpi_status -acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx) -{ - acpi_status status; - struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; - union acpi_object *package, *record, *fields; - u32 type; - int i; - - /* Clear the return buffer with zeros */ - memset(hpx, 0, sizeof(struct hotplug_params)); - - status = acpi_evaluate_object(handle, "_HPX", NULL, &buffer); - if (ACPI_FAILURE(status)) - return status; - - package = (union acpi_object *)buffer.pointer; - if (package->type != ACPI_TYPE_PACKAGE) { - status = AE_ERROR; - goto exit; - } - - for (i = 0; i < package->package.count; i++) { - record = &package->package.elements[i]; - if (record->type != ACPI_TYPE_PACKAGE) { - status = AE_ERROR; - goto exit; - } - - fields = record->package.elements; - if (fields[0].type != ACPI_TYPE_INTEGER || - fields[1].type != ACPI_TYPE_INTEGER) { - status = AE_ERROR; - goto exit; - } - - type = fields[0].integer.value; - switch (type) { - case 0: - status = decode_type0_hpx_record(record, hpx); - if (ACPI_FAILURE(status)) - goto exit; - break; - case 1: - status = decode_type1_hpx_record(record, hpx); - if (ACPI_FAILURE(status)) - goto exit; - break; - case 2: - status = decode_type2_hpx_record(record, hpx); - if (ACPI_FAILURE(status)) - goto exit; - break; - default: - printk(KERN_ERR "%s: Type %d record not supported\n", - __FUNCTION__, type); - status = AE_ERROR; - goto exit; - } - } - exit: - kfree(buffer.pointer); - return status; -} static acpi_status acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) @@ -225,9 +50,6 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); - /* Clear the return buffer with zeros */ - memset(hpp, 0, sizeof(struct hotplug_params)); - /* get _hpp */ status = acpi_evaluate_object(handle, METHOD_NAME__HPP, NULL, &ret_buf); switch (status) { @@ -236,7 +58,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) if (!ret_buf.pointer) { printk(KERN_ERR "%s:%s alloc for _HPP fail\n", __FUNCTION__, (char *)string.pointer); - kfree(string.pointer); + acpi_os_free(string.pointer); return AE_NO_MEMORY; } status = acpi_evaluate_object(handle, METHOD_NAME__HPP, @@ -247,7 +69,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) if (ACPI_FAILURE(status)) { pr_debug("%s:%s _HPP fail=0x%x\n", __FUNCTION__, (char *)string.pointer, status); - kfree(string.pointer); + acpi_os_free(string.pointer); return status; } } @@ -276,20 +98,19 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp) } } - hpp->t0 = &hpp->type0_data; - hpp->t0->cache_line_size = nui[0]; - hpp->t0->latency_timer = nui[1]; - hpp->t0->enable_serr = nui[2]; - hpp->t0->enable_perr = nui[3]; + hpp->cache_line_size = nui[0]; + hpp->latency_timer = nui[1]; + hpp->enable_serr = nui[2]; + hpp->enable_perr = nui[3]; - pr_debug(" _HPP: cache_line_size=0x%x\n", hpp->t0->cache_line_size); - pr_debug(" _HPP: latency timer =0x%x\n", hpp->t0->latency_timer); - pr_debug(" _HPP: enable SERR =0x%x\n", hpp->t0->enable_serr); - pr_debug(" _HPP: enable PERR =0x%x\n", hpp->t0->enable_perr); + pr_debug(" _HPP: cache_line_size=0x%x\n", hpp->cache_line_size); + pr_debug(" _HPP: latency timer =0x%x\n", hpp->latency_timer); + pr_debug(" _HPP: enable SERR =0x%x\n", hpp->enable_serr); + pr_debug(" _HPP: enable PERR =0x%x\n", hpp->enable_perr); free_and_return: - kfree(string.pointer); - kfree(ret_buf.pointer); + acpi_os_free(string.pointer); + acpi_os_free(ret_buf.pointer); return status; } @@ -309,17 +130,13 @@ acpi_status acpi_run_oshp(acpi_handle handle) /* run OSHP */ status = acpi_evaluate_object(handle, METHOD_NAME_OSHP, NULL, NULL); if (ACPI_FAILURE(status)) - if (status != AE_NOT_FOUND) - printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", - __FUNCTION__, (char *)string.pointer, status); - else - dbg("%s:%s OSHP not found\n", - __FUNCTION__, (char *)string.pointer); + printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", __FUNCTION__, + (char *)string.pointer, status); else pr_debug("%s:%s OSHP passes\n", __FUNCTION__, (char *)string.pointer); - kfree(string.pointer); + acpi_os_free(string.pointer); return status; } EXPORT_SYMBOL_GPL(acpi_run_oshp); @@ -328,27 +145,14 @@ EXPORT_SYMBOL_GPL(acpi_run_oshp); /* acpi_get_hp_params_from_firmware * - * @bus - the pci_bus of the bus on which the device is newly added + * @dev - the pci_dev of the newly added device * @hpp - allocated by the caller */ -acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, +acpi_status acpi_get_hp_params_from_firmware(struct pci_dev *dev, struct hotplug_params *hpp) { acpi_status status = AE_NOT_FOUND; - acpi_handle handle, phandle; - struct pci_bus *pbus = bus; - struct pci_dev *pdev; - - do { - pdev = pbus->self; - if (!pdev) { - handle = acpi_get_pci_rootbridge_handle( - pci_domain_nr(pbus), pbus->number); - break; - } - handle = DEVICE_ACPI_HANDLE(&(pdev->dev)); - pbus = pbus->parent; - } while (!handle); + struct pci_dev *pdev = dev; /* * _HPP settings apply to all child buses, until another _HPP is @@ -356,19 +160,15 @@ acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, * look for it in the parent device scope since that would apply to * this pci dev. If we don't find any _HPP, use hardcoded defaults */ - while (handle) { - status = acpi_run_hpx(handle, hpp); - if (ACPI_SUCCESS(status)) + while (pdev && (ACPI_FAILURE(status))) { + acpi_handle handle = DEVICE_ACPI_HANDLE(&(pdev->dev)); + if (!handle) break; status = acpi_run_hpp(handle, hpp); - if (ACPI_SUCCESS(status)) + if (!(pdev->bus->parent)) break; - if (acpi_root_bridge(handle)) - break; - status = acpi_get_parent(handle, &phandle); - if (ACPI_FAILURE(status)) - break; - handle = phandle; + /* Check if a parent object supports _HPP */ + pdev = pdev->bus->parent->self; } return status; } @@ -392,23 +192,20 @@ int acpi_root_bridge(acpi_handle handle) if ((info->valid & ACPI_VALID_HID) && !strcmp(PCI_ROOT_HID_STRING, info->hardware_id.value)) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return 1; } if (info->valid & ACPI_VALID_CID) { for (i=0; i < info->compatibility_id.count; i++) { if (!strcmp(PCI_ROOT_HID_STRING, info->compatibility_id.id[i].value)) { - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return 1; } } } - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); } return 0; } EXPORT_SYMBOL_GPL(acpi_root_bridge); - -module_param(debug_acpi, bool, 0644); -MODULE_PARM_DESC(debug_acpi, "Debugging mode for ACPI enabled or not"); diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h index be104eced..467ac70a4 100644 --- a/drivers/pci/hotplug/acpiphp.h +++ b/drivers/pci/hotplug/acpiphp.h @@ -75,10 +75,6 @@ struct acpiphp_bridge { struct list_head list; acpi_handle handle; struct acpiphp_slot *slots; - - /* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */ - struct acpiphp_func *func; - int type; int nr_slots; @@ -126,11 +122,10 @@ struct acpiphp_slot { */ struct acpiphp_func { struct acpiphp_slot *slot; /* parent */ - struct acpiphp_bridge *bridge; /* Ejectable PCI-to-PCI bridge */ struct list_head sibling; struct pci_dev *pci_dev; - struct notifier_block nb; + acpi_handle handle; u8 function; /* pci function# */ @@ -151,6 +146,24 @@ struct acpiphp_attention_info }; +struct dependent_device { + struct list_head device_list; + struct list_head pci_list; + acpi_handle handle; + struct acpiphp_func *func; +}; + + +struct acpiphp_dock_station { + acpi_handle handle; + u32 last_dock_time; + u32 flags; + struct acpiphp_func *dock_bridge; + struct list_head dependent_devices; + struct list_head pci_dependent_devices; +}; + + /* PCI bus bridge HID */ #define ACPI_PCI_HOST_HID "PNP0A03" @@ -189,6 +202,11 @@ struct acpiphp_attention_info #define FUNC_HAS_PS2 (0x00000040) #define FUNC_HAS_PS3 (0x00000080) #define FUNC_HAS_DCK (0x00000100) +#define FUNC_IS_DD (0x00000200) + +/* dock station flags */ +#define DOCK_DOCKING (0x00000001) +#define DOCK_HAS_BRIDGE (0x00000002) /* function prototypes */ @@ -203,6 +221,7 @@ extern int acpiphp_glue_init (void); extern void acpiphp_glue_exit (void); extern int acpiphp_get_num_slots (void); typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); +void handle_hotplug_event_func(acpi_handle, u32, void*); extern int acpiphp_enable_slot (struct acpiphp_slot *slot); extern int acpiphp_disable_slot (struct acpiphp_slot *slot); @@ -212,6 +231,16 @@ extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot); extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot); extern u32 acpiphp_get_address (struct acpiphp_slot *slot); +/* acpiphp_dock.c */ +extern int find_dock_station(void); +extern void remove_dock_station(void); +extern void add_dependent_device(struct dependent_device *new_dd); +extern void add_pci_dependent_device(struct dependent_device *new_dd); +extern struct dependent_device *get_dependent_device(acpi_handle handle); +extern int is_dependent_device(acpi_handle handle); +extern int detect_dependent_devices(acpi_handle *bridge_handle); +extern struct dependent_device *alloc_dependent_device(acpi_handle handle); + /* variables */ extern int acpiphp_debug; diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index e2fef60c2..4f1b0da8e 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c @@ -27,7 +27,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to + * Send feedback to , + * * */ @@ -415,12 +416,27 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot) static int __init acpiphp_init(void) { + int retval; + int docking_station; + info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); acpiphp_debug = debug; + docking_station = find_dock_station(); + /* read all the ACPI info from the system */ - return init_acpi(); + retval = init_acpi(); + + /* if we have found a docking station, we should + * go ahead and load even if init_acpi has found + * no slots. This handles the case when the _DCK + * method not defined under the actual dock bridge + */ + if (docking_station) + return 0; + else + return retval; } @@ -428,6 +444,8 @@ static void __exit acpiphp_exit(void) { /* deallocate internal data structures etc. */ acpiphp_glue_exit(); + + remove_dock_station(); } module_init(acpiphp_init); diff --git a/drivers/pci/hotplug/acpiphp_dock.c b/drivers/pci/hotplug/acpiphp_dock.c new file mode 100644 index 000000000..4f1aaf128 --- /dev/null +++ b/drivers/pci/hotplug/acpiphp_dock.c @@ -0,0 +1,438 @@ +/* + * ACPI PCI HotPlug dock functions to ACPI CA subsystem + * + * Copyright (C) 2006 Kristen Carlson Accardi (kristen.c.accardi@intel.com) + * Copyright (C) 2006 Intel Corporation + * + * 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 + * + */ +#include +#include + +#include +#include +#include +#include + +#include "../pci.h" +#include "pci_hotplug.h" +#include "acpiphp.h" + +static struct acpiphp_dock_station *ds; +#define MY_NAME "acpiphp_dock" + + +int is_dependent_device(acpi_handle handle) +{ + return (get_dependent_device(handle) ? 1 : 0); +} + + +static acpi_status +find_dependent_device(acpi_handle handle, u32 lvl, void *context, void **rv) +{ + int *count = (int *)context; + + if (is_dependent_device(handle)) { + (*count)++; + return AE_CTRL_TERMINATE; + } else { + return AE_OK; + } +} + + + + +void add_dependent_device(struct dependent_device *new_dd) +{ + list_add_tail(&new_dd->device_list, &ds->dependent_devices); +} + + +void add_pci_dependent_device(struct dependent_device *new_dd) +{ + list_add_tail(&new_dd->pci_list, &ds->pci_dependent_devices); +} + + + +struct dependent_device * get_dependent_device(acpi_handle handle) +{ + struct dependent_device *dd; + + if (!ds) + return NULL; + + list_for_each_entry(dd, &ds->dependent_devices, device_list) { + if (handle == dd->handle) + return dd; + } + return NULL; +} + + + +struct dependent_device *alloc_dependent_device(acpi_handle handle) +{ + struct dependent_device *dd; + + dd = kzalloc(sizeof(*dd), GFP_KERNEL); + if (dd) { + INIT_LIST_HEAD(&dd->pci_list); + INIT_LIST_HEAD(&dd->device_list); + dd->handle = handle; + } + return dd; +} + + + +static int is_dock(acpi_handle handle) +{ + acpi_status status; + acpi_handle tmp; + + status = acpi_get_handle(handle, "_DCK", &tmp); + if (ACPI_FAILURE(status)) { + return 0; + } + return 1; +} + + + +static int dock_present(void) +{ + unsigned long sta; + acpi_status status; + + if (ds) { + status = acpi_evaluate_integer(ds->handle, "_STA", NULL, &sta); + if (ACPI_SUCCESS(status) && sta) + return 1; + } + return 0; +} + + + +static void eject_dock(void) +{ + struct acpi_object_list arg_list; + union acpi_object arg; + + arg_list.count = 1; + arg_list.pointer = &arg; + arg.type = ACPI_TYPE_INTEGER; + arg.integer.value = 1; + + if (ACPI_FAILURE(acpi_evaluate_object(ds->handle, "_EJ0", + &arg_list, NULL)) || dock_present()) + warn("%s: failed to eject dock!\n", __FUNCTION__); + + return; +} + + + + +static acpi_status handle_dock(int dock) +{ + acpi_status status; + struct acpi_object_list arg_list; + union acpi_object arg; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + + dbg("%s: %s\n", __FUNCTION__, dock ? "docking" : "undocking"); + + /* _DCK method has one argument */ + arg_list.count = 1; + arg_list.pointer = &arg; + arg.type = ACPI_TYPE_INTEGER; + arg.integer.value = dock; + status = acpi_evaluate_object(ds->handle, "_DCK", + &arg_list, &buffer); + if (ACPI_FAILURE(status)) + err("%s: failed to execute _DCK\n", __FUNCTION__); + acpi_os_free(buffer.pointer); + + return status; +} + + + +static inline void dock(void) +{ + handle_dock(1); +} + + + +static inline void undock(void) +{ + handle_dock(0); +} + + + +/* + * the _DCK method can do funny things... and sometimes not + * hah-hah funny. + * + * TBD - figure out a way to only call fixups for + * systems that require them. + */ +static void post_dock_fixups(void) +{ + struct pci_bus *bus; + u32 buses; + struct dependent_device *dd; + + list_for_each_entry(dd, &ds->pci_dependent_devices, pci_list) { + bus = dd->func->slot->bridge->pci_bus; + + /* fixup bad _DCK function that rewrites + * secondary bridge on slot + */ + pci_read_config_dword(bus->self, + PCI_PRIMARY_BUS, + &buses); + + if (((buses >> 8) & 0xff) != bus->secondary) { + buses = (buses & 0xff000000) + | ((unsigned int)(bus->primary) << 0) + | ((unsigned int)(bus->secondary) << 8) + | ((unsigned int)(bus->subordinate) << 16); + pci_write_config_dword(bus->self, + PCI_PRIMARY_BUS, + buses); + } + } +} + + + +static void hotplug_pci(u32 type) +{ + struct dependent_device *dd; + + list_for_each_entry(dd, &ds->pci_dependent_devices, pci_list) + handle_hotplug_event_func(dd->handle, type, dd->func); +} + + + +static inline void begin_dock(void) +{ + ds->flags |= DOCK_DOCKING; +} + + +static inline void complete_dock(void) +{ + ds->flags &= ~(DOCK_DOCKING); + ds->last_dock_time = jiffies; +} + + +static int dock_in_progress(void) +{ + if (ds->flags & DOCK_DOCKING || + ds->last_dock_time == jiffies) { + dbg("dock in progress\n"); + return 1; + } + return 0; +} + + + +static void +handle_hotplug_event_dock(acpi_handle handle, u32 type, void *context) +{ + dbg("%s: enter\n", __FUNCTION__); + + switch (type) { + case ACPI_NOTIFY_BUS_CHECK: + dbg("BUS Check\n"); + if (!dock_in_progress() && dock_present()) { + begin_dock(); + dock(); + if (!dock_present()) { + err("Unable to dock!\n"); + break; + } + post_dock_fixups(); + hotplug_pci(type); + complete_dock(); + } + break; + case ACPI_NOTIFY_EJECT_REQUEST: + dbg("EJECT request\n"); + if (!dock_in_progress() && dock_present()) { + hotplug_pci(type); + undock(); + eject_dock(); + if (dock_present()) + err("Unable to undock!\n"); + } + break; + } +} + + + + +static acpi_status +find_dock_ejd(acpi_handle handle, u32 lvl, void *context, void **rv) +{ + acpi_status status; + acpi_handle tmp; + acpi_handle dck_handle = (acpi_handle) context; + char objname[64]; + struct acpi_buffer buffer = { .length = sizeof(objname), + .pointer = objname }; + struct acpi_buffer ejd_buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + union acpi_object *ejd_obj; + + status = acpi_get_handle(handle, "_EJD", &tmp); + if (ACPI_FAILURE(status)) + return AE_OK; + + /* make sure we are dependent on the dock device, + * by executing the _EJD method, then getting a handle + * to the device referenced by that name. If that + * device handle is the same handle as the dock station + * handle, then we are a device dependent on the dock station + */ + acpi_get_name(dck_handle, ACPI_FULL_PATHNAME, &buffer); + status = acpi_evaluate_object(handle, "_EJD", NULL, &ejd_buffer); + if (ACPI_FAILURE(status)) { + err("Unable to execute _EJD!\n"); + goto find_ejd_out; + } + ejd_obj = ejd_buffer.pointer; + status = acpi_get_handle(NULL, ejd_obj->string.pointer, &tmp); + if (ACPI_FAILURE(status)) + goto find_ejd_out; + + if (tmp == dck_handle) { + struct dependent_device *dd; + dbg("%s: found device dependent on dock\n", __FUNCTION__); + dd = alloc_dependent_device(handle); + if (!dd) { + err("Can't allocate memory for dependent device!\n"); + goto find_ejd_out; + } + add_dependent_device(dd); + } + +find_ejd_out: + acpi_os_free(ejd_buffer.pointer); + return AE_OK; +} + + + +int detect_dependent_devices(acpi_handle *bridge_handle) +{ + acpi_status status; + int count; + + count = 0; + + status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, + (u32)1, find_dependent_device, + (void *)&count, NULL); + + return count; +} + + + + + +static acpi_status +find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) +{ + int *count = (int *)context; + + if (is_dock(handle)) { + dbg("%s: found dock\n", __FUNCTION__); + ds = kzalloc(sizeof(*ds), GFP_KERNEL); + ds->handle = handle; + INIT_LIST_HEAD(&ds->dependent_devices); + INIT_LIST_HEAD(&ds->pci_dependent_devices); + + /* look for devices dependent on dock station */ + acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, find_dock_ejd, handle, NULL); + + acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, + handle_hotplug_event_dock, ds); + (*count)++; + } + + return AE_OK; +} + + + + +int find_dock_station(void) +{ + int num = 0; + + ds = NULL; + + /* start from the root object, because some laptops define + * _DCK methods outside the scope of PCI (IBM x-series laptop) + */ + acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, find_dock, &num, NULL); + + return num; +} + + + +void remove_dock_station(void) +{ + struct dependent_device *dd, *tmp; + if (ds) { + if (ACPI_FAILURE(acpi_remove_notify_handler(ds->handle, + ACPI_SYSTEM_NOTIFY, handle_hotplug_event_dock))) + err("failed to remove dock notify handler\n"); + + /* free all dependent devices */ + list_for_each_entry_safe(dd, tmp, &ds->dependent_devices, + device_list) + kfree(dd); + + /* no need to touch the pci_dependent_device list, + * cause all memory was freed above + */ + kfree(ds); + } +} + + diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index ae67a8f55..053ee8438 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Send feedback to + * Send feedback to * */ @@ -59,7 +59,6 @@ static LIST_HEAD(bridge_list); static void handle_hotplug_event_bridge (acpi_handle, u32, void *); static void acpiphp_sanitize_bus(struct pci_bus *bus); static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus); -static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context); /* @@ -117,59 +116,6 @@ is_ejectable_slot(acpi_handle handle, u32 lvl, void *context, void **rv) } } -/* callback routine to check for the existance of a pci dock device */ -static acpi_status -is_pci_dock_device(acpi_handle handle, u32 lvl, void *context, void **rv) -{ - int *count = (int *)context; - - if (is_dock_device(handle)) { - (*count)++; - return AE_CTRL_TERMINATE; - } else { - return AE_OK; - } -} - - - - -/* - * the _DCK method can do funny things... and sometimes not - * hah-hah funny. - * - * TBD - figure out a way to only call fixups for - * systems that require them. - */ -static int post_dock_fixups(struct notifier_block *nb, unsigned long val, - void *v) -{ - struct acpiphp_func *func = container_of(nb, struct acpiphp_func, nb); - struct pci_bus *bus = func->slot->bridge->pci_bus; - u32 buses; - - if (!bus->self) - return NOTIFY_OK; - - /* fixup bad _DCK function that rewrites - * secondary bridge on slot - */ - pci_read_config_dword(bus->self, - PCI_PRIMARY_BUS, - &buses); - - if (((buses >> 8) & 0xff) != bus->secondary) { - buses = (buses & 0xff000000) - | ((unsigned int)(bus->primary) << 0) - | ((unsigned int)(bus->secondary) << 8) - | ((unsigned int)(bus->subordinate) << 16); - pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); - } - return NOTIFY_OK; -} - - - /* callback routine to register each ACPI PCI slot object */ static acpi_status @@ -178,6 +124,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) struct acpiphp_bridge *bridge = (struct acpiphp_bridge *)context; struct acpiphp_slot *slot; struct acpiphp_func *newfunc; + struct dependent_device *dd; acpi_handle tmp; acpi_status status = AE_OK; unsigned long adr, sun; @@ -190,7 +137,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) status = acpi_get_handle(handle, "_EJ0", &tmp); - if (ACPI_FAILURE(status) && !(is_dock_device(handle))) + if (ACPI_FAILURE(status) && !(is_dependent_device(handle))) return AE_OK; device = (adr >> 16) & 0xffff; @@ -215,18 +162,23 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &tmp))) newfunc->flags |= FUNC_HAS_PS3; - if (ACPI_SUCCESS(acpi_get_handle(handle, "_DCK", &tmp))) + if (ACPI_SUCCESS(acpi_get_handle(handle, "_DCK", &tmp))) { newfunc->flags |= FUNC_HAS_DCK; - - status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun); - if (ACPI_FAILURE(status)) { - /* - * use the count of the number of slots we've found - * for the number of the slot + /* add to devices dependent on dock station, + * because this may actually be the dock bridge */ - sun = bridge->nr_slots+1; + dd = alloc_dependent_device(handle); + if (!dd) + err("Can't allocate memory for " + "new dependent device!\n"); + else + add_dependent_device(dd); } + status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun); + if (ACPI_FAILURE(status)) + sun = -1; + /* search for objects that share the same slot */ for (slot = bridge->slots; slot; slot = slot->next) if (slot->device == device) { @@ -273,23 +225,20 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); } - if (is_dock_device(handle)) { - /* we don't want to call this device's _EJ0 - * because we want the dock notify handler - * to call it after it calls _DCK + /* if this is a device dependent on a dock station, + * associate the acpiphp_func to the dependent_device + * struct. + */ + if ((dd = get_dependent_device(handle))) { + newfunc->flags |= FUNC_IS_DD; + /* + * we don't want any devices which is dependent + * on the dock to have it's _EJ0 method executed. + * because we need to run _DCK first. */ newfunc->flags &= ~FUNC_HAS_EJ0; - if (register_hotplug_dock_device(handle, - handle_hotplug_event_func, newfunc)) - dbg("failed to register dock device\n"); - - /* we need to be notified when dock events happen - * outside of the hotplug operation, since we may - * need to do fixups before we can hotplug. - */ - newfunc->nb.notifier_call = post_dock_fixups; - if (register_dock_notifier(&newfunc->nb)) - dbg("failed to register a dock notifier"); + dd->func = newfunc; + add_pci_dependent_device(dd); } /* install notify handler */ @@ -328,15 +277,6 @@ static int detect_ejectable_slots(acpi_handle *bridge_handle) status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1, is_ejectable_slot, (void *)&count, NULL); - /* - * we also need to add this bridge if there is a dock bridge or - * other pci device on a dock station (removable) - */ - if (!count) - status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, - (u32)1, is_pci_dock_device, (void *)&count, - NULL); - return count; } @@ -346,19 +286,13 @@ static void decode_hpp(struct acpiphp_bridge *bridge) { acpi_status status; - status = acpi_get_hp_params_from_firmware(bridge->pci_bus, &bridge->hpp); - if (ACPI_FAILURE(status) || - !bridge->hpp.t0 || (bridge->hpp.t0->revision > 1)) { + status = acpi_get_hp_params_from_firmware(bridge->pci_dev, &bridge->hpp); + if (ACPI_FAILURE(status)) { /* use default numbers */ - printk(KERN_WARNING - "%s: Could not get hotplug parameters. Use defaults\n", - __FUNCTION__); - bridge->hpp.t0 = &bridge->hpp.type0_data; - bridge->hpp.t0->revision = 0; - bridge->hpp.t0->cache_line_size = 0x10; - bridge->hpp.t0->latency_timer = 0x40; - bridge->hpp.t0->enable_serr = 0; - bridge->hpp.t0->enable_perr = 0; + bridge->hpp.cache_line_size = 0x10; + bridge->hpp.latency_timer = 0x40; + bridge->hpp.enable_serr = 0; + bridge->hpp.enable_perr = 0; } } @@ -385,13 +319,6 @@ static void init_bridge_misc(struct acpiphp_bridge *bridge) /* install notify handler */ if (bridge->type != BRIDGE_TYPE_HOST) { - if ((bridge->flags & BRIDGE_HAS_EJ0) && bridge->func) { - status = acpi_remove_notify_handler(bridge->func->handle, - ACPI_SYSTEM_NOTIFY, - handle_hotplug_event_func); - if (ACPI_FAILURE(status)) - err("failed to remove notify handler\n"); - } status = acpi_install_notify_handler(bridge->handle, ACPI_SYSTEM_NOTIFY, handle_hotplug_event_bridge, @@ -404,66 +331,6 @@ static void init_bridge_misc(struct acpiphp_bridge *bridge) } -/* find acpiphp_func from acpiphp_bridge */ -static struct acpiphp_func *acpiphp_bridge_handle_to_function(acpi_handle handle) -{ - struct list_head *node, *l; - struct acpiphp_bridge *bridge; - struct acpiphp_slot *slot; - struct acpiphp_func *func; - - list_for_each(node, &bridge_list) { - bridge = list_entry(node, struct acpiphp_bridge, list); - for (slot = bridge->slots; slot; slot = slot->next) { - list_for_each(l, &slot->funcs) { - func = list_entry(l, struct acpiphp_func, - sibling); - if (func->handle == handle) - return func; - } - } - } - - return NULL; -} - - -static inline void config_p2p_bridge_flags(struct acpiphp_bridge *bridge) -{ - acpi_handle dummy_handle; - - if (ACPI_SUCCESS(acpi_get_handle(bridge->handle, - "_STA", &dummy_handle))) - bridge->flags |= BRIDGE_HAS_STA; - - if (ACPI_SUCCESS(acpi_get_handle(bridge->handle, - "_EJ0", &dummy_handle))) - bridge->flags |= BRIDGE_HAS_EJ0; - - if (ACPI_SUCCESS(acpi_get_handle(bridge->handle, - "_PS0", &dummy_handle))) - bridge->flags |= BRIDGE_HAS_PS0; - - if (ACPI_SUCCESS(acpi_get_handle(bridge->handle, - "_PS3", &dummy_handle))) - bridge->flags |= BRIDGE_HAS_PS3; - - /* is this ejectable p2p bridge? */ - if (bridge->flags & BRIDGE_HAS_EJ0) { - struct acpiphp_func *func; - - dbg("found ejectable p2p bridge\n"); - - /* make link between PCI bridge and PCI function */ - func = acpiphp_bridge_handle_to_function(bridge->handle); - if (!func) - return; - bridge->func = func; - func->bridge = bridge; - } -} - - /* allocate and initialize host bridge data structure */ static void add_host_bridge(acpi_handle *handle, struct pci_bus *pci_bus) { @@ -497,7 +364,6 @@ static void add_p2p_bridge(acpi_handle *handle, struct pci_dev *pci_dev) bridge->type = BRIDGE_TYPE_P2P; bridge->handle = handle; - config_p2p_bridge_flags(bridge); bridge->pci_dev = pci_dev_get(pci_dev); bridge->pci_bus = pci_dev->subordinate; @@ -547,7 +413,8 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) goto out; /* check if this bridge has ejectable slots */ - if ((detect_ejectable_slots(handle) > 0)) { + if ((detect_ejectable_slots(handle) > 0) || + (detect_dependent_devices(handle) > 0)) { dbg("found PCI-to-PCI bridge at PCI %s\n", pci_name(dev)); add_p2p_bridge(handle, dev); } @@ -556,7 +423,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1, find_p2p_bridge, dev->subordinate, NULL); if (ACPI_FAILURE(status)) - warn("find_p2p_bridge failed (error code = 0x%x)\n", status); + warn("find_p2p_bridge faied (error code = 0x%x)\n", status); out: pci_dev_put(dev); @@ -611,6 +478,7 @@ static int add_bridge(acpi_handle handle) if (detect_ejectable_slots(handle) > 0) { dbg("found PCI host-bus bridge with hot-pluggable slots\n"); add_host_bridge(handle, pci_bus); + return 0; } /* search P2P bridges under this host bridge */ @@ -618,7 +486,7 @@ static int add_bridge(acpi_handle handle) find_p2p_bridge, pci_bus, NULL); if (ACPI_FAILURE(status)) - warn("find_p2p_bridge failed (error code = 0x%x)\n", status); + warn("find_p2p_bridge faied (error code = 0x%x)\n",status); return 0; } @@ -648,26 +516,12 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge) if (ACPI_FAILURE(status)) err("failed to remove notify handler\n"); - if ((bridge->type != BRIDGE_TYPE_HOST) && - ((bridge->flags & BRIDGE_HAS_EJ0) && bridge->func)) { - status = acpi_install_notify_handler(bridge->func->handle, - ACPI_SYSTEM_NOTIFY, - handle_hotplug_event_func, - bridge->func); - if (ACPI_FAILURE(status)) - err("failed to install interrupt notify handler\n"); - } - slot = bridge->slots; while (slot) { struct acpiphp_slot *next = slot->next; list_for_each_safe (list, tmp, &slot->funcs) { struct acpiphp_func *func; func = list_entry(list, struct acpiphp_func, sibling); - if (is_dock_device(func->handle)) { - unregister_hotplug_dock_device(func->handle); - unregister_dock_notifier(&func->nb); - } if (!(func->flags & FUNC_HAS_DCK)) { status = acpi_remove_notify_handler(func->handle, ACPI_SYSTEM_NOTIFY, @@ -695,11 +549,6 @@ cleanup_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) { struct acpiphp_bridge *bridge; - /* cleanup p2p bridges under this P2P bridge - in a depth-first manner */ - acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1, - cleanup_p2p_bridge, NULL, NULL); - if (!(bridge = acpiphp_handle_to_bridge(handle))) return AE_OK; cleanup_bridge(bridge); @@ -710,14 +559,15 @@ static void remove_bridge(acpi_handle handle) { struct acpiphp_bridge *bridge; - /* cleanup p2p bridges under this host bridge - in a depth-first manner */ - acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, - (u32)1, cleanup_p2p_bridge, NULL, NULL); - bridge = acpiphp_handle_to_bridge(handle); - if (bridge) + if (bridge) { cleanup_bridge(bridge); + } else { + /* clean-up p2p bridges under this host bridge */ + acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, + ACPI_UINT32_MAX, cleanup_p2p_bridge, + NULL, NULL); + } } static struct pci_dev * get_apic_pci_info(acpi_handle handle) @@ -784,7 +634,7 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base) break; } out: - kfree(buffer.pointer); + acpi_os_free(buffer.pointer); return result; } @@ -947,6 +797,36 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) } + +/** + * get_func - get a pointer to acpiphp_func given a slot, device + * @slot: slot to search + * @dev: pci_dev struct to match. + * + * This function will increase the reference count of pci_dev, + * so callers should call pci_dev_put when complete. + * + */ +static struct acpiphp_func * +get_func(struct acpiphp_slot *slot, struct pci_dev *dev) +{ + struct acpiphp_func *func = NULL; + struct pci_bus *bus = slot->bridge->pci_bus; + struct pci_dev *pdev; + + list_for_each_entry(func, &slot->funcs, sibling) { + pdev = pci_get_slot(bus, PCI_DEVFN(slot->device, + func->function)); + if (pdev) { + if (pdev == dev) + break; + pci_dev_put(pdev); + } + } + return func; +} + + /** * acpiphp_bus_add - add a new bus to acpi subsystem * @func: acpiphp_func of the bridge @@ -992,28 +872,6 @@ acpiphp_bus_add_out: } -/** - * acpiphp_bus_trim - trim a bus from acpi subsystem - * @handle: handle to acpi namespace - * - */ -int acpiphp_bus_trim(acpi_handle handle) -{ - struct acpi_device *device; - int retval; - - retval = acpi_bus_get_device(handle, &device); - if (retval) { - dbg("acpi_device not found\n"); - return retval; - } - - retval = acpi_bus_trim(device, 1); - if (retval) - err("cannot remove from acpi list\n"); - - return retval; -} /** * enable_device - enable, configure a slot @@ -1031,7 +889,6 @@ static int enable_device(struct acpiphp_slot *slot) struct acpiphp_func *func; int retval = 0; int num, max, pass; - acpi_status status; if (slot->flags & SLOT_ENABLED) goto err_exit; @@ -1061,17 +918,19 @@ static int enable_device(struct acpiphp_slot *slot) if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) { max = pci_scan_bridge(bus, dev, max, pass); - if (pass && dev->subordinate) + if (pass && dev->subordinate) { pci_bus_size_bridges(dev->subordinate); + func = get_func(slot, dev); + if (func) { + acpiphp_bus_add(func); + /* side effect of get_func */ + pci_dev_put(dev); + } + } } } } - list_for_each (l, &slot->funcs) { - func = list_entry(l, struct acpiphp_func, sibling); - acpiphp_bus_add(func); - } - pci_bus_assign_resources(bus); acpiphp_sanitize_bus(bus); pci_enable_bridges(bus); @@ -1084,17 +943,6 @@ static int enable_device(struct acpiphp_slot *slot) func = list_entry(l, struct acpiphp_func, sibling); func->pci_dev = pci_get_slot(bus, PCI_DEVFN(slot->device, func->function)); - if (!func->pci_dev) - continue; - - if (func->pci_dev->hdr_type != PCI_HEADER_TYPE_BRIDGE && - func->pci_dev->hdr_type != PCI_HEADER_TYPE_CARDBUS) - continue; - - status = find_p2p_bridge(func->handle, (u32)1, bus, NULL); - if (ACPI_FAILURE(status)) - warn("find_p2p_bridge failed (error code = 0x%x)\n", - status); } slot->flags |= SLOT_ENABLED; @@ -1119,18 +967,6 @@ static int disable_device(struct acpiphp_slot *slot) list_for_each (l, &slot->funcs) { func = list_entry(l, struct acpiphp_func, sibling); - - if (func->bridge) { - /* cleanup p2p bridges under this P2P bridge */ - cleanup_p2p_bridge(func->bridge->handle, - (u32)1, NULL, NULL); - func->bridge = NULL; - } - - acpiphp_bus_trim(func->handle); - /* try to remove anyway. - * acpiphp_bus_add might have been failed */ - if (!func->pci_dev) continue; @@ -1275,17 +1111,16 @@ static void program_hpp(struct pci_dev *dev, struct acpiphp_bridge *bridge) (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI))) return; - pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, - bridge->hpp.t0->cache_line_size); + bridge->hpp.cache_line_size); pci_write_config_byte(dev, PCI_LATENCY_TIMER, - bridge->hpp.t0->latency_timer); + bridge->hpp.latency_timer); pci_read_config_word(dev, PCI_COMMAND, &pci_cmd); - if (bridge->hpp.t0->enable_serr) + if (bridge->hpp.enable_serr) pci_cmd |= PCI_COMMAND_SERR; else pci_cmd &= ~PCI_COMMAND_SERR; - if (bridge->hpp.t0->enable_perr) + if (bridge->hpp.enable_perr) pci_cmd |= PCI_COMMAND_PARITY; else pci_cmd &= ~PCI_COMMAND_PARITY; @@ -1294,13 +1129,13 @@ static void program_hpp(struct pci_dev *dev, struct acpiphp_bridge *bridge) /* Program bridge control value and child devices */ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, - bridge->hpp.t0->latency_timer); + bridge->hpp.latency_timer); pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &pci_bctl); - if (bridge->hpp.t0->enable_serr) + if (bridge->hpp.enable_serr) pci_bctl |= PCI_BRIDGE_CTL_SERR; else pci_bctl &= ~PCI_BRIDGE_CTL_SERR; - if (bridge->hpp.t0->enable_perr) + if (bridge->hpp.enable_perr) pci_bctl |= PCI_BRIDGE_CTL_PARITY; else pci_bctl &= ~PCI_BRIDGE_CTL_PARITY; @@ -1320,7 +1155,6 @@ static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus) memset(&bridge, 0, sizeof(bridge)); bridge.handle = handle; - bridge.pci_bus = bus; bridge.pci_dev = bus->self; decode_hpp(&bridge); list_for_each_entry(dev, &bus->devices, bus_list) @@ -1463,13 +1297,6 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont case ACPI_NOTIFY_EJECT_REQUEST: /* request device eject */ dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname); - if ((bridge->type != BRIDGE_TYPE_HOST) && - (bridge->flags & BRIDGE_HAS_EJ0)) { - struct acpiphp_slot *slot; - slot = bridge->func->slot; - if (!acpiphp_disable_slot(slot)) - acpiphp_eject_slot(slot); - } break; case ACPI_NOTIFY_FREQUENCY_MISMATCH: @@ -1503,7 +1330,7 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont * handles ACPI event notification on slots * */ -static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) +void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) { struct acpiphp_func *func; char objname[64]; @@ -1663,15 +1490,9 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) if (retval) goto err_exit; - if (get_slot_status(slot) == ACPI_STA_ALL) { + if (get_slot_status(slot) == ACPI_STA_ALL) /* configure all functions */ retval = enable_device(slot); - if (retval) - power_off_slot(slot); - } else { - dbg("%s: Slot status is not ACPI_STA_ALL\n", __FUNCTION__); - power_off_slot(slot); - } err_exit: mutex_unlock(&slot->crit_sect); diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index d5df5871c..037ce4c91 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c @@ -25,6 +25,7 @@ * Send feedback to */ +#include #include #include #include @@ -347,7 +348,7 @@ cpci_hp_intr(int irq, void *data, struct pt_regs *regs) dbg("entered cpci_hp_intr"); /* Check to see if it was our interrupt */ - if ((controller->irq_flags & IRQF_SHARED) && + if ((controller->irq_flags & SA_SHIRQ) && !controller->ops->check_irq(controller->dev_id)) { dbg("exited cpci_hp_intr, not our interrupt"); return IRQ_NONE; diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index 4afcaffd0..225b5e551 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c @@ -23,6 +23,7 @@ * Send feedback to */ +#include #include #include #include @@ -254,8 +255,8 @@ int cpci_led_off(struct slot* slot) int cpci_configure_slot(struct slot* slot) { - struct pci_bus *parent; - int fn; + unsigned char busnr; + struct pci_bus *child; dbg("%s - enter", __FUNCTION__); @@ -276,53 +277,23 @@ int cpci_configure_slot(struct slot* slot) */ n = pci_scan_slot(slot->bus, slot->devfn); dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n); + if (n > 0) + pci_bus_add_devices(slot->bus); slot->dev = pci_get_slot(slot->bus, slot->devfn); if (slot->dev == NULL) { err("Could not find PCI device for slot %02x", slot->number); - return -ENODEV; + return 1; } } - parent = slot->dev->bus; - - for (fn = 0; fn < 8; fn++) { - struct pci_dev *dev; - - dev = pci_get_slot(parent, PCI_DEVFN(PCI_SLOT(slot->devfn), fn)); - if (!dev) - continue; - if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || - (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { - /* Find an unused bus number for the new bridge */ - struct pci_bus *child; - unsigned char busnr, start = parent->secondary; - unsigned char end = parent->subordinate; - - for (busnr = start; busnr <= end; busnr++) { - if (!pci_find_bus(pci_domain_nr(parent), - busnr)) - break; - } - if (busnr >= end) { - err("No free bus for hot-added bridge\n"); - pci_dev_put(dev); - continue; - } - child = pci_add_new_bus(parent, dev, busnr); - if (!child) { - err("Cannot add new bus for %s\n", - pci_name(dev)); - pci_dev_put(dev); - continue; - } - child->subordinate = pci_do_scan_bus(child); - pci_bus_size_bridges(child); - } - pci_dev_put(dev); + + if (slot->dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { + pci_read_config_byte(slot->dev, PCI_SECONDARY_BUS, &busnr); + child = pci_add_new_bus(slot->dev->bus, slot->dev, busnr); + pci_do_scan_bus(child); + pci_bus_size_bridges(child); } - pci_bus_assign_resources(parent); - pci_bus_add_devices(parent); - pci_enable_bridges(parent); + pci_bus_assign_resources(slot->dev->bus); dbg("%s - exit", __FUNCTION__); return 0; diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c index e847f0d6c..2d4639d68 100644 --- a/drivers/pci/hotplug/cpcihp_generic.c +++ b/drivers/pci/hotplug/cpcihp_generic.c @@ -34,6 +34,7 @@ * Send feedback to */ +#include #include #include #include diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 1c12e9171..f7cb00da3 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c @@ -30,13 +30,13 @@ * Send feedback to */ +#include #include #include #include #include #include -#include -#include /* IRQF_SHARED */ +#include /* SA_SHIRQ */ #include "cpci_hotplug.h" #include "cpcihp_zt5550.h" @@ -95,8 +95,8 @@ static int zt5550_hc_config(struct pci_dev *pdev) hc_dev = pdev; dbg("hc_dev = %p", hc_dev); - dbg("pci resource start %llx", (unsigned long long)pci_resource_start(hc_dev, 1)); - dbg("pci resource len %llx", (unsigned long long)pci_resource_len(hc_dev, 1)); + dbg("pci resource start %lx", pci_resource_start(hc_dev, 1)); + dbg("pci resource len %lx", pci_resource_len(hc_dev, 1)); if(!request_mem_region(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1), MY_NAME)) { @@ -108,9 +108,8 @@ static int zt5550_hc_config(struct pci_dev *pdev) hc_registers = ioremap(pci_resource_start(hc_dev, 1), pci_resource_len(hc_dev, 1)); if(!hc_registers) { - err("cannot remap MMIO region %llx @ %llx", - (unsigned long long)pci_resource_len(hc_dev, 1), - (unsigned long long)pci_resource_start(hc_dev, 1)); + err("cannot remap MMIO region %lx @ %lx", + pci_resource_len(hc_dev, 1), pci_resource_start(hc_dev, 1)); ret = -ENODEV; goto exit_release_region; } @@ -220,7 +219,7 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id zt5550_hpc.ops = &zt5550_hpc_ops; if(!poll) { zt5550_hpc.irq = hc_dev->irq; - zt5550_hpc.irq_flags = IRQF_SHARED; + zt5550_hpc.irq_flags = SA_SHIRQ; zt5550_hpc.dev_id = hc_dev; zt5550_hpc_ops.enable_irq = zt5550_hc_enable_irq; diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 1fc259913..9bc1deb8d 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c @@ -29,6 +29,7 @@ * */ +#include #include #include #include @@ -1088,8 +1089,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } dbg("pdev = %p\n", pdev); - dbg("pci resource start %llx\n", (unsigned long long)pci_resource_start(pdev, 0)); - dbg("pci resource len %llx\n", (unsigned long long)pci_resource_len(pdev, 0)); + dbg("pci resource start %lx\n", pci_resource_start(pdev, 0)); + dbg("pci resource len %lx\n", pci_resource_len(pdev, 0)); if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), MY_NAME)) { @@ -1101,9 +1102,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ctrl->hpc_reg = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if (!ctrl->hpc_reg) { - err("cannot remap MMIO region %llx @ %llx\n", - (unsigned long long)pci_resource_len(pdev, 0), - (unsigned long long)pci_resource_start(pdev, 0)); + 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; } @@ -1188,7 +1189,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* set up the interrupt */ dbg("HPC interrupt = %d \n", ctrl->interrupt); if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr, - IRQF_SHARED, MY_NAME, ctrl)) { + SA_SHIRQ, MY_NAME, ctrl)) { err("Can't get irq %d for the hotplug pci controller\n", ctrl->interrupt); rc = -ENODEV; diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index ae2dd36ef..55d2dc7e3 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c index cf0878917..ac98a11bd 100644 --- a/drivers/pci/hotplug/cpqphp_nvram.c +++ b/drivers/pci/hotplug/cpqphp_nvram.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 0d9688952..00b81a7bd 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c index 5bab666cd..bbfeed767 100644 --- a/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/drivers/pci/hotplug/cpqphp_sysfs.c @@ -26,6 +26,7 @@ * */ +#include #include #include #include @@ -140,7 +141,7 @@ struct ctrl_dbg { static int open(struct inode *inode, struct file *file) { - struct controller *ctrl = inode->i_private; + struct controller *ctrl = inode->u.generic_ip; struct ctrl_dbg *dbg; int retval = -ENOMEM; diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index dd2b76277..71b80c23e 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c @@ -32,6 +32,7 @@ * Enabling PCI devices is left as an exercise for the reader... * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index 59392946c..e13d5b872 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c @@ -285,7 +285,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { memcpy(&myslot, pslot, sizeof(struct slot)); @@ -315,7 +315,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value) debug("get_latch_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { memcpy(&myslot, pslot, sizeof(struct slot)); @@ -342,7 +342,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value) debug("get_power_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { memcpy(&myslot, pslot, sizeof(struct slot)); @@ -369,7 +369,7 @@ static int get_adapter_present(struct hotplug_slot *hotplug_slot, u8 * value) debug("get_adapter_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", (ulong) hotplug_slot, (ulong) value); ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { memcpy(&myslot, pslot, sizeof(struct slot)); @@ -401,7 +401,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { rc = 0; @@ -441,7 +441,7 @@ static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_spe ibmphp_lock_operations(); - if (hotplug_slot) { + if (hotplug_slot && value) { pslot = hotplug_slot->private; if (pslot) { rc = get_cur_bus_info(&pslot); diff --git a/drivers/pci/hotplug/pci_hotplug.h b/drivers/pci/hotplug/pci_hotplug.h index e929b7c11..eb0d01d47 100644 --- a/drivers/pci/hotplug/pci_hotplug.h +++ b/drivers/pci/hotplug/pci_hotplug.h @@ -176,51 +176,11 @@ extern int pci_hp_change_slot_info (struct hotplug_slot *slot, struct hotplug_slot_info *info); extern struct subsystem pci_hotplug_slots_subsys; -/* PCI Setting Record (Type 0) */ -struct hpp_type0 { - u32 revision; - u8 cache_line_size; - u8 latency_timer; - u8 enable_serr; - u8 enable_perr; -}; - -/* PCI-X Setting Record (Type 1) */ -struct hpp_type1 { - u32 revision; - u8 max_mem_read; - u8 avg_max_split; - u16 tot_max_split; -}; - -/* PCI Express Setting Record (Type 2) */ -struct hpp_type2 { - u32 revision; - u32 unc_err_mask_and; - u32 unc_err_mask_or; - u32 unc_err_sever_and; - u32 unc_err_sever_or; - u32 cor_err_mask_and; - u32 cor_err_mask_or; - u32 adv_err_cap_and; - u32 adv_err_cap_or; - u16 pci_exp_devctl_and; - u16 pci_exp_devctl_or; - u16 pci_exp_lnkctl_and; - u16 pci_exp_lnkctl_or; - u32 sec_unc_err_sever_and; - u32 sec_unc_err_sever_or; - u32 sec_unc_err_mask_and; - u32 sec_unc_err_mask_or; -}; - struct hotplug_params { - struct hpp_type0 *t0; /* Type0: NULL if not available */ - struct hpp_type1 *t1; /* Type1: NULL if not available */ - struct hpp_type2 *t2; /* Type2: NULL if not available */ - struct hpp_type0 type0_data; - struct hpp_type1 type1_data; - struct hpp_type2 type2_data; + u8 cache_line_size; + u8 latency_timer; + u8 enable_serr; + u8 enable_perr; }; #ifdef CONFIG_ACPI @@ -228,7 +188,7 @@ struct hotplug_params { #include #include extern acpi_status acpi_run_oshp(acpi_handle handle); -extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, +extern acpi_status acpi_get_hp_params_from_firmware(struct pci_dev *dev, struct hotplug_params *hpp); int acpi_root_bridge(acpi_handle handle); #endif diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index b7b378df8..c4282902c 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index eaea9d36a..92c1f0f1e 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -279,17 +279,12 @@ struct hpc_ops { #ifdef CONFIG_ACPI -#include -#include -#include -#include - #define pciehp_get_hp_hw_control_from_firmware(dev) \ pciehp_acpi_get_hp_hw_control_from_firmware(dev) static inline int pciehp_get_hp_params_from_firmware(struct pci_dev *dev, struct hotplug_params *hpp) { - if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev->bus, hpp))) + if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev, hpp))) return -ENODEV; return 0; } diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index c67b7c3f1..601cf9045 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -69,7 +69,6 @@ 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); -static int get_address (struct hotplug_slot *slot, u32 *value); static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value); static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value); @@ -82,7 +81,6 @@ static struct hotplug_slot_ops pciehp_hotplug_slot_ops = { .get_attention_status = get_attention_status, .get_latch_status = get_latch_status, .get_adapter_status = get_adapter_status, - .get_address = get_address, .get_max_bus_speed = get_max_bus_speed, .get_cur_bus_speed = get_cur_bus_speed, }; @@ -333,18 +331,6 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) return 0; } -static int get_address(struct hotplug_slot *hotplug_slot, u32 *value) -{ - struct slot *slot = hotplug_slot->private; - struct pci_bus *bus = slot->ctrl->pci_dev->subordinate; - - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); - - *value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device; - - return 0; -} - static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) { struct slot *slot = hotplug_slot->private; diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 6ab3b6cd2..6c14d9e46 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -38,6 +38,10 @@ #include "../pci.h" #include "pciehp.h" +#include +#include +#include +#include #ifdef DEBUG #define DBG_K_TRACE_ENTRY ((unsigned int)0x00000001) /* On function entry */ #define DBG_K_TRACE_EXIT ((unsigned int)0x00000002) /* On function exit */ @@ -1284,7 +1288,7 @@ int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev) if (ACPI_SUCCESS(status)) { dbg("Gained control for hotplug HW for pci %s (%s)\n", pci_name(dev), (char *)string.pointer); - kfree(string.pointer); + acpi_os_free(string.pointer); return 0; } if (acpi_root_bridge(handle)) @@ -1298,7 +1302,7 @@ int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev) err("Cannot get control of hotplug hardware for pci %s\n", pci_name(dev)); - kfree(string.pointer); + acpi_os_free(string.pointer); return -1; } #endif @@ -1394,13 +1398,15 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) for ( rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) if (pci_resource_len(pdev, rc) > 0) - dbg("pci resource[%d] start=0x%llx(len=0x%llx)\n", rc, - (unsigned long long)pci_resource_start(pdev, rc), - (unsigned long long)pci_resource_len(pdev, rc)); + dbg("pci resource[%d] start=0x%lx(len=0x%lx)\n", rc, + pci_resource_start(pdev, rc), pci_resource_len(pdev, rc)); info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); + if (pci_enable_device(pdev)) + goto abort_free_ctlr; + mutex_init(&ctrl->crit_sect); /* setup wait queue */ init_waitqueue_head(&ctrl->queue); @@ -1454,7 +1460,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) start_int_poll_timer( php_ctlr, 10 ); /* start with 10 second delay */ } else { /* Installs the interrupt handler */ - rc = request_irq(php_ctlr->irq, pcie_isr, IRQF_SHARED, MY_NAME, (void *) ctrl); + rc = request_irq(php_ctlr->irq, pcie_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); if (rc) { err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); @@ -1468,7 +1474,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) rc = hp_register_read_word(pdev, SLOT_CTRL(ctrl->cap_base), temp_word); if (rc) { err("%s : hp_register_read_word SLOT_CTRL failed\n", __FUNCTION__); - goto abort_free_irq; + goto abort_free_ctlr; } intr_enable = intr_enable | PRSN_DETECT_ENABLE; @@ -1494,19 +1500,19 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) rc = hp_register_write_word(pdev, SLOT_CTRL(ctrl->cap_base), temp_word); if (rc) { err("%s : hp_register_write_word SLOT_CTRL failed\n", __FUNCTION__); - goto abort_free_irq; + goto abort_free_ctlr; } rc = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), slot_status); if (rc) { err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__); - goto abort_disable_intr; + goto abort_free_ctlr; } temp_word = 0x1F; /* Clear all events */ rc = hp_register_write_word(php_ctlr->pci_dev, SLOT_STATUS(ctrl->cap_base), temp_word); if (rc) { err("%s : hp_register_write_word SLOT_STATUS failed\n", __FUNCTION__); - goto abort_disable_intr; + goto abort_free_ctlr; } if (pciehp_force) { @@ -1515,7 +1521,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) } else { rc = pciehp_get_hp_hw_control_from_firmware(ctrl->pci_dev); if (rc) - goto abort_disable_intr; + goto abort_free_ctlr; } /* Add this HPC instance into the HPC list */ @@ -1542,21 +1548,6 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) return 0; /* We end up here for the many possible ways to fail this API. */ -abort_disable_intr: - rc = hp_register_read_word(pdev, SLOT_CTRL(ctrl->cap_base), temp_word); - if (!rc) { - temp_word &= ~(intr_enable | HP_INTR_ENABLE); - rc = hp_register_write_word(pdev, SLOT_CTRL(ctrl->cap_base), temp_word); - } - if (rc) - err("%s : disabling interrupts failed\n", __FUNCTION__); - -abort_free_irq: - if (pciehp_poll_mode) - del_timer_sync(&php_ctlr->int_poll_timer); - else - free_irq(php_ctlr->irq, ctrl); - abort_free_ctlr: pcie_cap_base = saved_cap_base; kfree(php_ctlr); diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 854aaea09..4017fb03a 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c @@ -34,144 +34,6 @@ #include "../pci.h" #include "pciehp.h" -static void program_hpp_type0(struct pci_dev *dev, struct hpp_type0 *hpp) -{ - u16 pci_cmd, pci_bctl; - - if (hpp->revision > 1) { - printk(KERN_WARNING "%s: Rev.%d type0 record not supported\n", - __FUNCTION__, hpp->revision); - return; - } - - pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, hpp->cache_line_size); - pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp->latency_timer); - pci_read_config_word(dev, PCI_COMMAND, &pci_cmd); - if (hpp->enable_serr) - pci_cmd |= PCI_COMMAND_SERR; - else - pci_cmd &= ~PCI_COMMAND_SERR; - if (hpp->enable_perr) - pci_cmd |= PCI_COMMAND_PARITY; - else - pci_cmd &= ~PCI_COMMAND_PARITY; - pci_write_config_word(dev, PCI_COMMAND, pci_cmd); - - /* Program bridge control value */ - if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { - pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, - hpp->latency_timer); - pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &pci_bctl); - if (hpp->enable_serr) - pci_bctl |= PCI_BRIDGE_CTL_SERR; - else - pci_bctl &= ~PCI_BRIDGE_CTL_SERR; - if (hpp->enable_perr) - pci_bctl |= PCI_BRIDGE_CTL_PARITY; - else - pci_bctl &= ~PCI_BRIDGE_CTL_PARITY; - pci_write_config_word(dev, PCI_BRIDGE_CONTROL, pci_bctl); - } -} - -static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp) -{ - int pos; - u16 reg16; - u32 reg32; - - if (hpp->revision > 1) { - printk(KERN_WARNING "%s: Rev.%d type2 record not supported\n", - __FUNCTION__, hpp->revision); - return; - } - - /* Find PCI Express capability */ - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); - if (!pos) - return; - - /* Initialize Device Control Register */ - pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, ®16); - reg16 = (reg16 & hpp->pci_exp_devctl_and) | hpp->pci_exp_devctl_or; - pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, reg16); - - /* Initialize Link Control Register */ - if (dev->subordinate) { - pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, ®16); - reg16 = (reg16 & hpp->pci_exp_lnkctl_and) - | hpp->pci_exp_lnkctl_or; - pci_write_config_word(dev, pos + PCI_EXP_LNKCTL, reg16); - } - - /* Find Advanced Error Reporting Enhanced Capability */ - pos = 256; - do { - pci_read_config_dword(dev, pos, ®32); - if (PCI_EXT_CAP_ID(reg32) == PCI_EXT_CAP_ID_ERR) - break; - } while ((pos = PCI_EXT_CAP_NEXT(reg32))); - if (!pos) - return; - - /* Initialize Uncorrectable Error Mask Register */ - pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, ®32); - reg32 = (reg32 & hpp->unc_err_mask_and) | hpp->unc_err_mask_or; - pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, reg32); - - /* Initialize Uncorrectable Error Severity Register */ - pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, ®32); - reg32 = (reg32 & hpp->unc_err_sever_and) | hpp->unc_err_sever_or; - pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, reg32); - - /* Initialize Correctable Error Mask Register */ - pci_read_config_dword(dev, pos + PCI_ERR_COR_MASK, ®32); - reg32 = (reg32 & hpp->cor_err_mask_and) | hpp->cor_err_mask_or; - pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, reg32); - - /* Initialize Advanced Error Capabilities and Control Register */ - pci_read_config_dword(dev, pos + PCI_ERR_CAP, ®32); - reg32 = (reg32 & hpp->adv_err_cap_and) | hpp->adv_err_cap_or; - pci_write_config_dword(dev, pos + PCI_ERR_CAP, reg32); - - /* - * FIXME: The following two registers are not supported yet. - * - * o Secondary Uncorrectable Error Severity Register - * o Secondary Uncorrectable Error Mask Register - */ -} - -static void program_fw_provided_values(struct pci_dev *dev) -{ - struct pci_dev *cdev; - struct hotplug_params hpp; - - /* Program hpp values for this device */ - if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL || - (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && - (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI))) - return; - - if (pciehp_get_hp_params_from_firmware(dev, &hpp)) { - printk(KERN_WARNING "%s: Could not get hotplug parameters\n", - __FUNCTION__); - return; - } - - if (hpp.t2) - program_hpp_type2(dev, hpp.t2); - if (hpp.t0) - program_hpp_type0(dev, hpp.t0); - - /* Program child devices */ - if (dev->subordinate) { - list_for_each_entry(cdev, &dev->subordinate->devices, - bus_list) - program_fw_provided_values(cdev); - } -} - static int pciehp_add_bridge(struct pci_dev *dev) { struct pci_bus *parent = dev->bus; @@ -204,11 +66,10 @@ int pciehp_configure_device(struct slot *p_slot) struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; int num, fn; - dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); + dev = pci_find_slot(p_slot->bus, PCI_DEVFN(p_slot->device, 0)); if (dev) { err("Device %s already exists at %x:%x, cannot hot-add\n", pci_name(dev), p_slot->bus, p_slot->device); - pci_dev_put(dev); return -EINVAL; } @@ -225,15 +86,14 @@ int pciehp_configure_device(struct slot *p_slot) if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { err("Cannot hot-add display device %s\n", pci_name(dev)); - pci_dev_put(dev); continue; } if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { pciehp_add_bridge(dev); } - program_fw_provided_values(dev); - pci_dev_put(dev); + /* TBD: program firmware provided _HPP values */ + /* program_fw_provided_values(dev); */ } pci_bus_assign_resources(parent); @@ -246,20 +106,18 @@ int pciehp_unconfigure_device(struct slot *p_slot) int rc = 0; int j; u8 bctl = 0; - struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; dbg("%s: bus/dev = %x/%x\n", __FUNCTION__, p_slot->bus, p_slot->device); for (j=0; j<8 ; j++) { - struct pci_dev* temp = pci_get_slot(parent, + struct pci_dev* temp = pci_find_slot(p_slot->bus, (p_slot->device << 3) | j); if (!temp) continue; if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) { err("Cannot remove display device %s\n", pci_name(temp)); - pci_dev_put(temp); continue; } if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { @@ -267,12 +125,10 @@ int pciehp_unconfigure_device(struct slot *p_slot) if (bctl & PCI_BRIDGE_CTL_VGA) { err("Cannot remove display device %s\n", pci_name(temp)); - pci_dev_put(temp); continue; } } pci_remove_bus_device(temp); - pci_dev_put(temp); } /* * Some PCI Express root ports require fixup after hot-plug operation. diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c index 8ad446605..0a46f5496 100644 --- a/drivers/pci/hotplug/pcihp_skeleton.c +++ b/drivers/pci/hotplug/pcihp_skeleton.c @@ -28,6 +28,7 @@ * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 076bd6dca..638004546 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -22,6 +22,7 @@ * Send feedback to * */ +#include #include #include #include diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index f31d83c2c..8cb9abde7 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c @@ -18,13 +18,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include @@ -104,7 +102,8 @@ static struct hotplug_slot_attribute sn_slot_path_attr = __ATTR_RO(path); static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) { struct pcibus_info *pcibus_info; - u16 busnum, segment, ioboard_type; + int bricktype; + int bus_num; pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); @@ -112,14 +111,12 @@ static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) if (!(pcibus_info->pbi_valid_devices & (1 << device))) return -EPERM; - ioboard_type = sn_ioboard_to_pci_bus(pci_bus); - busnum = pcibus_info->pbi_buscommon.bs_persist_busnum; - segment = pci_domain_nr(pci_bus) & 0xf; + bricktype = MODULE_GET_BTYPE(pcibus_info->pbi_moduleid); + bus_num = pcibus_info->pbi_buscommon.bs_persist_busnum & 0xf; /* Do not allow hotplug operations on base I/O cards */ - if ((ioboard_type == L1_BRICKTYPE_IX || - ioboard_type == L1_BRICKTYPE_IA) && - (segment == 1 && busnum == 0 && device != 1)) + if ((bricktype == L1_BRICKTYPE_IX || bricktype == L1_BRICKTYPE_IA) && + (bus_num == 1 && device != 1)) return -EPERM; return 1; @@ -128,23 +125,23 @@ static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) static int sn_pci_bus_valid(struct pci_bus *pci_bus) { struct pcibus_info *pcibus_info; - u32 asic_type; - u16 ioboard_type; + int asic_type; + int bricktype; - /* Don't register slots hanging off the TIOCA bus */ pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); + + /* Don't register slots hanging off the TIOCA bus */ asic_type = pcibus_info->pbi_buscommon.bs_asic_type; if (asic_type == PCIIO_ASIC_TYPE_TIOCA) return -EPERM; /* Only register slots in I/O Bricks that support hotplug */ - ioboard_type = sn_ioboard_to_pci_bus(pci_bus); - switch (ioboard_type) { + bricktype = MODULE_GET_BTYPE(pcibus_info->pbi_moduleid); + switch (bricktype) { case L1_BRICKTYPE_IX: case L1_BRICKTYPE_PX: case L1_BRICKTYPE_IA: case L1_BRICKTYPE_PA: - case L1_BOARDTYPE_PCIX3SLOT: return 1; break; default: @@ -178,11 +175,14 @@ static int sn_hp_slot_private_alloc(struct hotplug_slot *bss_hotplug_slot, slot->pci_bus = pci_bus; sprintf(bss_hotplug_slot->name, "%04x:%02x:%02x", pci_domain_nr(pci_bus), - ((u16)pcibus_info->pbi_buscommon.bs_persist_busnum), + ((int)pcibus_info->pbi_buscommon.bs_persist_busnum) & 0xf, device + 1); - - sn_generate_path(pci_bus, slot->physical_path); - + sprintf(slot->physical_path, "module_%c%c%c%c%.2d", + '0'+RACK_GET_CLASS(MODULE_GET_RACK(pcibus_info->pbi_moduleid)), + '0'+RACK_GET_GROUP(MODULE_GET_RACK(pcibus_info->pbi_moduleid)), + '0'+RACK_GET_NUM(MODULE_GET_RACK(pcibus_info->pbi_moduleid)), + MODULE_GET_BTCHAR(pcibus_info->pbi_moduleid), + MODULE_GET_BPOS(pcibus_info->pbi_moduleid)); slot->hotplug_slot = bss_hotplug_slot; list_add(&slot->hp_list, &sn_hp_list); @@ -461,12 +461,10 @@ static inline int get_power_status(struct hotplug_slot *bss_hotplug_slot, { struct slot *slot = bss_hotplug_slot->private; struct pcibus_info *pcibus_info; - u32 power; pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); mutex_lock(&sn_hotplug_mutex); - power = pcibus_info->pbi_enabled_devices & (1 << slot->device_num); - *value = power ? 1 : 0; + *value = pcibus_info->pbi_enabled_devices & (1 << slot->device_num); mutex_unlock(&sn_hotplug_mutex); return 0; } @@ -555,8 +553,8 @@ static int sn_pci_hotplug_init(void) int rc; int registered = 0; - if (!sn_prom_feature_available(PRF_HOTPLUG_SUPPORT)) { - printk(KERN_ERR "%s: PROM version does not support hotplug.\n", + if (sn_sal_rev() < SGI_HOTPLUG_PROM_REV) { + printk(KERN_ERR "%s: PROM version must be greater than 4.30\n", __FUNCTION__); return -EPERM; } diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 7208b95c6..5c70f4390 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h @@ -168,9 +168,9 @@ struct controller { * error Messages */ #define msg_initialization_err "Initialization failure, error=%d\n" -#define msg_button_on "PCI slot #%s - powering on due to button press.\n" -#define msg_button_off "PCI slot #%s - powering off due to button press.\n" -#define msg_button_cancel "PCI slot #%s - action canceled due to button press.\n" +#define msg_button_on "PCI slot #%d - powering on due to button press.\n" +#define msg_button_off "PCI slot #%d - powering off due to button press.\n" +#define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" /* sysfs functions for the hotplug controller info */ extern void shpchp_create_ctrl_files (struct controller *ctrl); @@ -196,7 +196,7 @@ extern void queue_pushbutton_work(void *data); static inline int get_hp_params_from_firmware(struct pci_dev *dev, struct hotplug_params *hpp) { - if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev->bus, hpp))) + if (ACPI_FAILURE(acpi_get_hp_params_from_firmware(dev, hpp))) return -ENODEV; return 0; } diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index a14e7de19..3be4d492c 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -491,9 +491,16 @@ static int __init shpcd_init(void) shpchp_poll_mode = 1; #endif + shpchp_wq = create_singlethread_workqueue("shpchpd"); + if (!shpchp_wq) + return -ENOMEM; + retval = pci_register_driver(&shpc_driver); dbg("%s: pci_register_driver = %d\n", __FUNCTION__, retval); info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); + if (retval) { + destroy_workqueue(shpchp_wq); + } return retval; } @@ -501,6 +508,7 @@ static void __exit shpcd_cleanup(void) { dbg("unload_shpchpd()\n"); pci_unregister_driver(&shpc_driver); + destroy_workqueue(shpchp_wq); info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); } diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index c39901dbf..4e6381481 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c @@ -72,7 +72,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, void *inst_id) /* * Button pressed - See if need to TAKE ACTION!!! */ - info("Button pressed on Slot(%s)\n", p_slot->name); + info("Button pressed on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_BUTTON_PRESS; queue_interrupt_event(p_slot, event_type); @@ -101,7 +101,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id) /* * Switch opened */ - info("Latch open on Slot(%s)\n", p_slot->name); + info("Latch open on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_SWITCH_OPEN; if (p_slot->pwr_save && p_slot->presence_save) { event_type = INT_POWER_FAULT; @@ -111,7 +111,7 @@ u8 shpchp_handle_switch_change(u8 hp_slot, void *inst_id) /* * Switch closed */ - info("Latch close on Slot(%s)\n", p_slot->name); + info("Latch close on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_SWITCH_CLOSE; } @@ -139,13 +139,13 @@ u8 shpchp_handle_presence_change(u8 hp_slot, void *inst_id) /* * Card Present */ - info("Card present on Slot(%s)\n", p_slot->name); + info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_PRESENCE_ON; } else { /* * Not Present */ - info("Card not present on Slot(%s)\n", p_slot->name); + info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_PRESENCE_OFF; } @@ -169,14 +169,14 @@ u8 shpchp_handle_power_fault(u8 hp_slot, void *inst_id) /* * Power fault Cleared */ - info("Power fault cleared on Slot(%s)\n", p_slot->name); + info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot); p_slot->status = 0x00; event_type = INT_POWER_FAULT_CLEAR; } else { /* * Power fault */ - info("Power fault on Slot(%s)\n", p_slot->name); + info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot); event_type = INT_POWER_FAULT; /* set power fault status for this board */ p_slot->status = 0xFF; @@ -496,10 +496,10 @@ static void handle_button_press_event(struct slot *p_slot) p_slot->hpc_ops->get_power_status(p_slot, &getstatus); if (getstatus) { p_slot->state = BLINKINGOFF_STATE; - info(msg_button_off, p_slot->name); + info(msg_button_off, p_slot->number); } else { p_slot->state = BLINKINGON_STATE; - info(msg_button_on, p_slot->name); + info(msg_button_on, p_slot->number); } /* blink green LED and turn off amber */ p_slot->hpc_ops->green_led_blink(p_slot); @@ -522,7 +522,7 @@ static void handle_button_press_event(struct slot *p_slot) else p_slot->hpc_ops->green_led_off(p_slot); p_slot->hpc_ops->set_attention_status(p_slot, 0); - info(msg_button_cancel, p_slot->name); + info(msg_button_cancel, p_slot->number); p_slot->state = STATIC_STATE; break; case POWEROFF_STATE: @@ -575,17 +575,17 @@ static int shpchp_enable_slot (struct slot *p_slot) mutex_lock(&p_slot->ctrl->crit_sect); rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); if (rc || !getstatus) { - info("No adapter on slot(%s)\n", p_slot->name); + info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); if (rc || getstatus) { - info("Latch open on slot(%s)\n", p_slot->name); + info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); if (rc || getstatus) { - info("Already enabled on slot(%s)\n", p_slot->name); + info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } @@ -634,17 +634,17 @@ static int shpchp_disable_slot (struct slot *p_slot) rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); if (rc || !getstatus) { - info("No adapter on slot(%s)\n", p_slot->name); + info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); if (rc || getstatus) { - info("Latch open on slot(%s)\n", p_slot->name); + info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); if (rc || !getstatus) { - info("Already disabled slot(%s)\n", p_slot->name); + info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number); goto out; } diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 0f9798df4..66123cf4d 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c @@ -90,94 +90,77 @@ #define MRLSENSOR 0x40000000 #define ATTN_BUTTON 0x80000000 -/* - * Interrupt Locator Register definitions - */ -#define CMD_INTR_PENDING (1 << 0) -#define SLOT_INTR_PENDING(i) (1 << (i + 1)) +/* Slot Status Field Definitions */ +/* Slot State */ +#define PWR_ONLY 0x0001 +#define ENABLED 0x0002 +#define DISABLED 0x0003 -/* - * Controller SERR-INT Register - */ -#define GLOBAL_INTR_MASK (1 << 0) -#define GLOBAL_SERR_MASK (1 << 1) -#define COMMAND_INTR_MASK (1 << 2) -#define ARBITER_SERR_MASK (1 << 3) -#define COMMAND_DETECTED (1 << 16) -#define ARBITER_DETECTED (1 << 17) -#define SERR_INTR_RSVDZ_MASK 0xfffc0000 +/* Power Indicator State */ +#define PWR_LED_ON 0x0004 +#define PWR_LED_BLINK 0x0008 +#define PWR_LED_OFF 0x000c -/* - * Logical Slot Register definitions - */ -#define SLOT_REG(i) (SLOT1 + (4 * i)) - -#define SLOT_STATE_SHIFT (0) -#define SLOT_STATE_MASK (3 << 0) -#define SLOT_STATE_PWRONLY (1) -#define SLOT_STATE_ENABLED (2) -#define SLOT_STATE_DISABLED (3) -#define PWR_LED_STATE_SHIFT (2) -#define PWR_LED_STATE_MASK (3 << 2) -#define ATN_LED_STATE_SHIFT (4) -#define ATN_LED_STATE_MASK (3 << 4) -#define ATN_LED_STATE_ON (1) -#define ATN_LED_STATE_BLINK (2) -#define ATN_LED_STATE_OFF (3) -#define POWER_FAULT (1 << 6) -#define ATN_BUTTON (1 << 7) -#define MRL_SENSOR (1 << 8) -#define MHZ66_CAP (1 << 9) -#define PRSNT_SHIFT (10) -#define PRSNT_MASK (3 << 10) -#define PCIX_CAP_SHIFT (12) -#define PCIX_CAP_MASK_PI1 (3 << 12) -#define PCIX_CAP_MASK_PI2 (7 << 12) -#define PRSNT_CHANGE_DETECTED (1 << 16) -#define ISO_PFAULT_DETECTED (1 << 17) -#define BUTTON_PRESS_DETECTED (1 << 18) -#define MRL_CHANGE_DETECTED (1 << 19) -#define CON_PFAULT_DETECTED (1 << 20) -#define PRSNT_CHANGE_INTR_MASK (1 << 24) -#define ISO_PFAULT_INTR_MASK (1 << 25) -#define BUTTON_PRESS_INTR_MASK (1 << 26) -#define MRL_CHANGE_INTR_MASK (1 << 27) -#define CON_PFAULT_INTR_MASK (1 << 28) -#define MRL_CHANGE_SERR_MASK (1 << 29) -#define CON_PFAULT_SERR_MASK (1 << 30) -#define SLOT_REG_RSVDZ_MASK (1 << 15) | (7 << 21) +/* Attention Indicator State */ +#define ATTEN_LED_ON 0x0010 +#define ATTEN_LED_BLINK 0x0020 +#define ATTEN_LED_OFF 0x0030 -/* - * SHPC Command Code definitnions - * - * Slot Operation 00h - 3Fh - * Set Bus Segment Speed/Mode A 40h - 47h - * Power-Only All Slots 48h - * Enable All Slots 49h - * Set Bus Segment Speed/Mode B (PI=2) 50h - 5Fh - * Reserved Command Codes 60h - BFh - * Vendor Specific Commands C0h - FFh - */ -#define SET_SLOT_PWR 0x01 /* Slot Operation */ -#define SET_SLOT_ENABLE 0x02 -#define SET_SLOT_DISABLE 0x03 -#define SET_PWR_ON 0x04 -#define SET_PWR_BLINK 0x08 -#define SET_PWR_OFF 0x0c -#define SET_ATTN_ON 0x10 -#define SET_ATTN_BLINK 0x20 -#define SET_ATTN_OFF 0x30 -#define SETA_PCI_33MHZ 0x40 /* Set Bus Segment Speed/Mode A */ +/* Power Fault */ +#define pwr_fault 0x0040 + +/* Attention Button */ +#define ATTEN_BUTTON 0x0080 + +/* MRL Sensor */ +#define MRL_SENSOR 0x0100 + +/* 66 MHz Capable */ +#define IS_66MHZ_CAP 0x0200 + +/* PRSNT1#/PRSNT2# */ +#define SLOT_EMP 0x0c00 + +/* PCI-X Capability */ +#define NON_PCIX 0x0000 +#define PCIX_66 0x1000 +#define PCIX_133 0x3000 +#define PCIX_266 0x4000 /* For PI = 2 only */ +#define PCIX_533 0x5000 /* For PI = 2 only */ + +/* SHPC 'write' operations/commands */ + +/* Slot operation - 0x00h to 0x3Fh */ + +#define NO_CHANGE 0x00 + +/* Slot state - Bits 0 & 1 of controller command register */ +#define SET_SLOT_PWR 0x01 +#define SET_SLOT_ENABLE 0x02 +#define SET_SLOT_DISABLE 0x03 + +/* Power indicator state - Bits 2 & 3 of controller command register*/ +#define SET_PWR_ON 0x04 +#define SET_PWR_BLINK 0x08 +#define SET_PWR_OFF 0x0C + +/* Attention indicator state - Bits 4 & 5 of controller command register*/ +#define SET_ATTN_ON 0x010 +#define SET_ATTN_BLINK 0x020 +#define SET_ATTN_OFF 0x030 + +/* Set bus speed/mode A - 0x40h to 0x47h */ +#define SETA_PCI_33MHZ 0x40 #define SETA_PCI_66MHZ 0x41 #define SETA_PCIX_66MHZ 0x42 #define SETA_PCIX_100MHZ 0x43 #define SETA_PCIX_133MHZ 0x44 -#define SETA_RESERVED1 0x45 -#define SETA_RESERVED2 0x46 -#define SETA_RESERVED3 0x47 -#define SET_PWR_ONLY_ALL 0x48 /* Power-Only All Slots */ -#define SET_ENABLE_ALL 0x49 /* Enable All Slots */ -#define SETB_PCI_33MHZ 0x50 /* Set Bus Segment Speed/Mode B */ +#define RESERV_1 0x45 +#define RESERV_2 0x46 +#define RESERV_3 0x47 + +/* Set bus speed/mode B - 0x50h to 0x5fh */ +#define SETB_PCI_33MHZ 0x50 #define SETB_PCI_66MHZ 0x51 #define SETB_PCIX_66MHZ_PM 0x52 #define SETB_PCIX_100MHZ_PM 0x53 @@ -191,115 +174,81 @@ #define SETB_PCIX_66MHZ_533 0x5b #define SETB_PCIX_100MHZ_533 0x5c #define SETB_PCIX_133MHZ_533 0x5d -#define SETB_RESERVED1 0x5e -#define SETB_RESERVED2 0x5f -/* - * SHPC controller command error code - */ + +/* Power-on all slots - 0x48h */ +#define SET_PWR_ON_ALL 0x48 + +/* Enable all slots - 0x49h */ +#define SET_ENABLE_ALL 0x49 + +/* SHPC controller command error code */ #define SWITCH_OPEN 0x1 #define INVALID_CMD 0x2 #define INVALID_SPEED_MODE 0x4 -/* - * For accessing SHPC Working Register Set via PCI Configuration Space - */ +/* For accessing SHPC Working Register Set */ #define DWORD_SELECT 0x2 #define DWORD_DATA 0x4 +#define BASE_OFFSET 0x0 /* Field Offset in Logical Slot Register - byte boundary */ #define SLOT_EVENT_LATCH 0x2 #define SLOT_SERR_INT_MASK 0x3 +static spinlock_t hpc_event_lock; + DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */ static struct php_ctlr_state_s *php_ctlr_list_head; /* HPC state linked list */ static int ctlr_seq_num = 0; /* Controller sequenc # */ static spinlock_t list_lock; -static atomic_t shpchp_num_controllers = ATOMIC_INIT(0); +static irqreturn_t shpc_isr(int IRQ, void *dev_id, struct pt_regs *regs); -static irqreturn_t shpc_isr(int irq, void *dev_id, struct pt_regs *regs); -static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int sec); +static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int seconds); static int hpc_check_cmd_status(struct controller *ctrl); -static inline u8 shpc_readb(struct controller *ctrl, int reg) -{ - return readb(ctrl->hpc_ctlr_handle->creg + reg); -} - -static inline void shpc_writeb(struct controller *ctrl, int reg, u8 val) -{ - writeb(val, ctrl->hpc_ctlr_handle->creg + reg); -} - -static inline u16 shpc_readw(struct controller *ctrl, int reg) +/* This is the interrupt polling timeout function. */ +static void int_poll_timeout(unsigned long lphp_ctlr) { - return readw(ctrl->hpc_ctlr_handle->creg + reg); -} + struct php_ctlr_state_s *php_ctlr = (struct php_ctlr_state_s *)lphp_ctlr; -static inline void shpc_writew(struct controller *ctrl, int reg, u16 val) -{ - writew(val, ctrl->hpc_ctlr_handle->creg + reg); -} + DBG_ENTER_ROUTINE -static inline u32 shpc_readl(struct controller *ctrl, int reg) -{ - return readl(ctrl->hpc_ctlr_handle->creg + reg); -} + if ( !php_ctlr ) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return; + } -static inline void shpc_writel(struct controller *ctrl, int reg, u32 val) -{ - writel(val, ctrl->hpc_ctlr_handle->creg + reg); -} + /* Poll for interrupt events. regs == NULL => polling */ + shpc_isr( 0, (void *)php_ctlr, NULL ); -static inline int shpc_indirect_read(struct controller *ctrl, int index, - u32 *value) -{ - int rc; - u32 cap_offset = ctrl->cap_offset; - struct pci_dev *pdev = ctrl->pci_dev; + init_timer(&php_ctlr->int_poll_timer); + if (!shpchp_poll_time) + shpchp_poll_time = 2; /* reset timer to poll in 2 secs if user doesn't specify at module installation*/ - rc = pci_write_config_byte(pdev, cap_offset + DWORD_SELECT, index); - if (rc) - return rc; - return pci_read_config_dword(pdev, cap_offset + DWORD_DATA, value); + start_int_poll_timer(php_ctlr, shpchp_poll_time); + + return; } -/* - * This is the interrupt polling timeout function. - */ -static void int_poll_timeout(unsigned long lphp_ctlr) +/* This function starts the interrupt polling timer. */ +static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int seconds) { - struct php_ctlr_state_s *php_ctlr = - (struct php_ctlr_state_s *)lphp_ctlr; - - DBG_ENTER_ROUTINE - - /* Poll for interrupt events. regs == NULL => polling */ - shpc_isr(0, php_ctlr->callback_instance_id, NULL); - - init_timer(&php_ctlr->int_poll_timer); - if (!shpchp_poll_time) - shpchp_poll_time = 2; /* default polling interval is 2 sec */ + if (!php_ctlr) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return; + } - start_int_poll_timer(php_ctlr, shpchp_poll_time); + if ( ( seconds <= 0 ) || ( seconds > 60 ) ) + seconds = 2; /* Clamp to sane value */ - DBG_LEAVE_ROUTINE -} + php_ctlr->int_poll_timer.function = &int_poll_timeout; + php_ctlr->int_poll_timer.data = (unsigned long)php_ctlr; /* Instance data */ + php_ctlr->int_poll_timer.expires = jiffies + seconds * HZ; + add_timer(&php_ctlr->int_poll_timer); -/* - * This function starts the interrupt polling timer. - */ -static void start_int_poll_timer(struct php_ctlr_state_s *php_ctlr, int sec) -{ - /* Clamp to sane value */ - if ((sec <= 0) || (sec > 60)) - sec = 2; - - php_ctlr->int_poll_timer.function = &int_poll_timeout; - php_ctlr->int_poll_timer.data = (unsigned long)php_ctlr; - php_ctlr->int_poll_timer.expires = jiffies + sec * HZ; - add_timer(&php_ctlr->int_poll_timer); + return; } static inline int shpc_wait_cmd(struct controller *ctrl) @@ -323,7 +272,7 @@ static inline int shpc_wait_cmd(struct controller *ctrl) static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u16 cmd_status; int retval = 0; u16 temp_word; @@ -333,8 +282,14 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) mutex_lock(&slot->ctrl->cmd_lock); + if (!php_ctlr) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + retval = -EINVAL; + goto out; + } + for (i = 0; i < 10; i++) { - cmd_status = shpc_readw(ctrl, CMD_STATUS); + cmd_status = readw(php_ctlr->creg + CMD_STATUS); if (!(cmd_status & 0x1)) break; @@ -342,7 +297,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) msleep(100); } - cmd_status = shpc_readw(ctrl, CMD_STATUS); + cmd_status = readw(php_ctlr->creg + CMD_STATUS); if (cmd_status & 0x1) { /* After 1 sec and and the controller is still busy */ @@ -359,7 +314,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) * command. */ slot->ctrl->cmd_busy = 1; - shpc_writew(ctrl, CMD, temp_word); + writew(temp_word, php_ctlr->creg + CMD); /* * Wait for command completion. @@ -383,12 +338,18 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) static int hpc_check_cmd_status(struct controller *ctrl) { + struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle; u16 cmd_status; int retval = 0; DBG_ENTER_ROUTINE + + if (!ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } - cmd_status = shpc_readw(ctrl, CMD_STATUS) & 0x000F; + cmd_status = readw(php_ctlr->creg + CMD_STATUS) & 0x000F; switch (cmd_status >> 1) { case 0: @@ -417,27 +378,37 @@ static int hpc_check_cmd_status(struct controller *ctrl) static int hpc_get_attention_status(struct slot *slot, u8 *status) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u32 slot_reg; - u8 state; + u16 slot_status; + u8 atten_led_state; DBG_ENTER_ROUTINE - slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); - state = (slot_reg & ATN_LED_STATE_MASK) >> ATN_LED_STATE_SHIFT; + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot)); + slot_status = (u16) slot_reg; + atten_led_state = (slot_status & 0x0030) >> 4; - switch (state) { - case ATN_LED_STATE_ON: + switch (atten_led_state) { + case 0: + *status = 0xFF; /* Reserved */ + break; + case 1: *status = 1; /* On */ break; - case ATN_LED_STATE_BLINK: + case 2: *status = 2; /* Blink */ break; - case ATN_LED_STATE_OFF: + case 3: *status = 0; /* Off */ break; default: - *status = 0xFF; /* Reserved */ + *status = 0xFF; break; } @@ -447,44 +418,64 @@ static int hpc_get_attention_status(struct slot *slot, u8 *status) static int hpc_get_power_status(struct slot * slot, u8 *status) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u32 slot_reg; - u8 state; + u16 slot_status; + u8 slot_state; + int retval = 0; DBG_ENTER_ROUTINE - slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); - state = (slot_reg & SLOT_STATE_MASK) >> SLOT_STATE_SHIFT; + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot)); + slot_status = (u16) slot_reg; + slot_state = (slot_status & 0x0003); - switch (state) { - case SLOT_STATE_PWRONLY: + switch (slot_state) { + case 0: + *status = 0xFF; + break; + case 1: *status = 2; /* Powered only */ break; - case SLOT_STATE_ENABLED: + case 2: *status = 1; /* Enabled */ break; - case SLOT_STATE_DISABLED: + case 3: *status = 0; /* Disabled */ break; default: - *status = 0xFF; /* Reserved */ + *status = 0xFF; break; } DBG_LEAVE_ROUTINE - return 0; + return retval; } static int hpc_get_latch_status(struct slot *slot, u8 *status) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u32 slot_reg; + u16 slot_status; DBG_ENTER_ROUTINE - slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); - *status = !!(slot_reg & MRL_SENSOR); /* 0 -> close; 1 -> open */ + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot)); + slot_status = (u16)slot_reg; + + *status = ((slot_status & 0x0100) == 0) ? 0 : 1; /* 0 -> close; 1 -> open */ + DBG_LEAVE_ROUTINE return 0; @@ -492,15 +483,22 @@ static int hpc_get_latch_status(struct slot *slot, u8 *status) static int hpc_get_adapter_status(struct slot *slot, u8 *status) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u32 slot_reg; - u8 state; + u16 slot_status; + u8 card_state; DBG_ENTER_ROUTINE - slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); - state = (slot_reg & PRSNT_MASK) >> PRSNT_SHIFT; - *status = (state != 0x3) ? 1 : 0; + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot)); + slot_status = (u16)slot_reg; + card_state = (u8)((slot_status & 0x0C00) >> 10); + *status = (card_state != 0x3) ? 1 : 0; DBG_LEAVE_ROUTINE return 0; @@ -508,11 +506,16 @@ static int hpc_get_adapter_status(struct slot *slot, u8 *status) static int hpc_get_prog_int(struct slot *slot, u8 *prog_int) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; DBG_ENTER_ROUTINE + + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } - *prog_int = shpc_readb(ctrl, PROG_INTERFACE); + *prog_int = readb(php_ctlr->creg + PROG_INTERFACE); DBG_LEAVE_ROUTINE return 0; @@ -521,27 +524,13 @@ static int hpc_get_prog_int(struct slot *slot, u8 *prog_int) static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value) { int retval = 0; - struct controller *ctrl = slot->ctrl; - u32 slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); - u8 m66_cap = !!(slot_reg & MHZ66_CAP); - u8 pi, pcix_cap; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u32 slot_reg = readl(php_ctlr->creg + SLOT1 + 4 * slot->hp_slot); + u8 pcix_cap = (slot_reg >> 12) & 7; + u8 m66_cap = (slot_reg >> 9) & 1; DBG_ENTER_ROUTINE - if ((retval = hpc_get_prog_int(slot, &pi))) - return retval; - - switch (pi) { - case 1: - pcix_cap = (slot_reg & PCIX_CAP_MASK_PI1) >> PCIX_CAP_SHIFT; - break; - case 2: - pcix_cap = (slot_reg & PCIX_CAP_MASK_PI2) >> PCIX_CAP_SHIFT; - break; - default: - return -ENODEV; - } - dbg("%s: slot_reg = %x, pcix_cap = %x, m66_cap = %x\n", __FUNCTION__, slot_reg, pcix_cap, m66_cap); @@ -575,15 +564,20 @@ static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value) static int hpc_get_mode1_ECC_cap(struct slot *slot, u8 *mode) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u16 sec_bus_status; u8 pi; int retval = 0; DBG_ENTER_ROUTINE - pi = shpc_readb(ctrl, PROG_INTERFACE); - sec_bus_status = shpc_readw(ctrl, SEC_BUS_CONFIG); + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + pi = readb(php_ctlr->creg + PROG_INTERFACE); + sec_bus_status = readw(php_ctlr->creg + SEC_BUS_CONFIG); if (pi == 2) { *mode = (sec_bus_status & 0x0100) >> 8; @@ -599,53 +593,128 @@ static int hpc_get_mode1_ECC_cap(struct slot *slot, u8 *mode) static int hpc_query_power_fault(struct slot * slot) { - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u32 slot_reg; + u16 slot_status; + u8 pwr_fault_state, status; DBG_ENTER_ROUTINE - slot_reg = shpc_readl(ctrl, SLOT_REG(slot->hp_slot)); + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*(slot->hp_slot)); + slot_status = (u16) slot_reg; + pwr_fault_state = (slot_status & 0x0040) >> 7; + status = (pwr_fault_state == 1) ? 0 : 1; DBG_LEAVE_ROUTINE /* Note: Logic 0 => fault */ - return !(slot_reg & POWER_FAULT); + return status; } static int hpc_set_attention_status(struct slot *slot, u8 value) { + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u8 slot_cmd = 0; + int rc = 0; + + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return -1; + } switch (value) { case 0 : - slot_cmd = SET_ATTN_OFF; /* OFF */ + slot_cmd = 0x30; /* OFF */ break; case 1: - slot_cmd = SET_ATTN_ON; /* ON */ + slot_cmd = 0x10; /* ON */ break; case 2: - slot_cmd = SET_ATTN_BLINK; /* BLINK */ + slot_cmd = 0x20; /* BLINK */ break; default: return -1; } - return shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + + return rc; } static void hpc_set_green_led_on(struct slot *slot) { - shpc_write_cmd(slot, slot->hp_slot, SET_PWR_ON); + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return ; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return ; + } + + slot_cmd = 0x04; + + shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + + return; } static void hpc_set_green_led_off(struct slot *slot) { - shpc_write_cmd(slot, slot->hp_slot, SET_PWR_OFF); + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return ; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return ; + } + + slot_cmd = 0x0C; + + shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + + return; } static void hpc_set_green_led_blink(struct slot *slot) { - shpc_write_cmd(slot, slot->hp_slot, SET_PWR_BLINK); + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return ; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return ; + } + + slot_cmd = 0x08; + + shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + + return; } int shpc_get_ctlr_slot_config(struct controller *ctrl, @@ -655,17 +724,21 @@ int shpc_get_ctlr_slot_config(struct controller *ctrl, int *updown, /* physical_slot_num increament: 1 or -1 */ int *flags) { - u32 slot_config; + struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle; DBG_ENTER_ROUTINE - slot_config = shpc_readl(ctrl, SLOT_CONFIG); - *first_device_num = (slot_config & FIRST_DEV_NUM) >> 8; - *num_ctlr_slots = slot_config & SLOT_NUM; - *physical_slot_num = (slot_config & PSN) >> 16; - *updown = ((slot_config & UPDOWN) >> 29) ? 1 : -1; + if (!ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + *first_device_num = php_ctlr->slot_device_offset; /* Obtained in shpc_init() */ + *num_ctlr_slots = php_ctlr->num_slots; /* Obtained in shpc_init() */ + *physical_slot_num = (readl(php_ctlr->creg + SLOT_CONFIG) & PSN) >> 16; dbg("%s: physical_slot_num = %x\n", __FUNCTION__, *physical_slot_num); + *updown = ((readl(php_ctlr->creg + SLOT_CONFIG) & UPDOWN ) >> 29) ? 1 : -1; DBG_LEAVE_ROUTINE return 0; @@ -676,33 +749,21 @@ static void hpc_release_ctlr(struct controller *ctrl) struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle; struct php_ctlr_state_s *p, *p_prev; int i; - u32 slot_reg, serr_int; DBG_ENTER_ROUTINE - /* - * Mask event interrupts and SERRs of all slots - */ - for (i = 0; i < ctrl->num_slots; i++) { - slot_reg = shpc_readl(ctrl, SLOT_REG(i)); - slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | - BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | - CON_PFAULT_INTR_MASK | MRL_CHANGE_SERR_MASK | - CON_PFAULT_SERR_MASK); - slot_reg &= ~SLOT_REG_RSVDZ_MASK; - shpc_writel(ctrl, SLOT_REG(i), slot_reg); + if (!ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return ; } - cleanup_slots(ctrl); - /* - * Mask SERR and System Interrut generation + * Mask all slot event interrupts */ - serr_int = shpc_readl(ctrl, SERR_INTR_ENABLE); - serr_int |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | - COMMAND_INTR_MASK | ARBITER_SERR_MASK); - serr_int &= ~SERR_INTR_RSVDZ_MASK; - shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); + for (i = 0; i < ctrl->num_slots; i++) + writel(0xffff3fff, php_ctlr->creg + SLOT1 + (4 * i)); + + cleanup_slots(ctrl); if (shpchp_poll_mode) { del_timer(&php_ctlr->int_poll_timer); @@ -739,79 +800,113 @@ static void hpc_release_ctlr(struct controller *ctrl) kfree(php_ctlr); - /* - * If this is the last controller to be released, destroy the - * shpchpd work queue - */ - if (atomic_dec_and_test(&shpchp_num_controllers)) - destroy_workqueue(shpchp_wq); - DBG_LEAVE_ROUTINE } static int hpc_power_on_slot(struct slot * slot) { - int retval; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + int retval = 0; DBG_ENTER_ROUTINE - retval = shpc_write_cmd(slot, slot->hp_slot, SET_SLOT_PWR); + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return -1; + } + slot_cmd = 0x01; + + retval = shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + if (retval) { err("%s: Write command failed!\n", __FUNCTION__); - return retval; + return -1; } DBG_LEAVE_ROUTINE - return 0; + return retval; } static int hpc_slot_enable(struct slot * slot) { - int retval; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + int retval = 0; DBG_ENTER_ROUTINE - /* Slot - Enable, Power Indicator - Blink, Attention Indicator - Off */ - retval = shpc_write_cmd(slot, slot->hp_slot, - SET_SLOT_ENABLE | SET_PWR_BLINK | SET_ATTN_OFF); + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return -1; + } + /* 3A => Slot - Enable, Power Indicator - Blink, Attention Indicator - Off */ + slot_cmd = 0x3A; + + retval = shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + if (retval) { err("%s: Write command failed!\n", __FUNCTION__); - return retval; + return -1; } DBG_LEAVE_ROUTINE - return 0; + return retval; } static int hpc_slot_disable(struct slot * slot) { - int retval; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; + u8 slot_cmd; + int retval = 0; DBG_ENTER_ROUTINE - /* Slot - Disable, Power Indicator - Off, Attention Indicator - On */ - retval = shpc_write_cmd(slot, slot->hp_slot, - SET_SLOT_DISABLE | SET_PWR_OFF | SET_ATTN_ON); + if (!slot->ctrl->hpc_ctlr_handle) { + err("%s: Invalid HPC controller handle!\n", __FUNCTION__); + return -1; + } + + if (slot->hp_slot >= php_ctlr->num_slots) { + err("%s: Invalid HPC slot number!\n", __FUNCTION__); + return -1; + } + + /* 1F => Slot - Disable, Power Indicator - Off, Attention Indicator - On */ + slot_cmd = 0x1F; + + retval = shpc_write_cmd(slot, slot->hp_slot, slot_cmd); + if (retval) { err("%s: Write command failed!\n", __FUNCTION__); - return retval; + return -1; } DBG_LEAVE_ROUTINE - return 0; + return retval; } static int hpc_set_bus_speed_mode(struct slot * slot, enum pci_bus_speed value) { int retval; - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; u8 pi, cmd; DBG_ENTER_ROUTINE - pi = shpc_readb(ctrl, PROG_INTERFACE); + pi = readb(php_ctlr->creg + PROG_INTERFACE); if ((pi == 1) && (value > PCI_SPEED_133MHz_PCIX)) return -EINVAL; @@ -870,86 +965,100 @@ static int hpc_set_bus_speed_mode(struct slot * slot, enum pci_bus_speed value) return retval; } -static irqreturn_t shpc_isr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t shpc_isr(int IRQ, void *dev_id, struct pt_regs *regs) { - struct controller *ctrl = (struct controller *)dev_id; - struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle; - u32 serr_int, slot_reg, intr_loc, intr_loc2; + struct controller *ctrl = NULL; + struct php_ctlr_state_s *php_ctlr; + u8 schedule_flag = 0; + u8 temp_byte; + u32 temp_dword, intr_loc, intr_loc2; int hp_slot; + if (!dev_id) + return IRQ_NONE; + + if (!shpchp_poll_mode) { + ctrl = (struct controller *)dev_id; + php_ctlr = ctrl->hpc_ctlr_handle; + } else { + php_ctlr = (struct php_ctlr_state_s *) dev_id; + ctrl = (struct controller *)php_ctlr->callback_instance_id; + } + + if (!ctrl) + return IRQ_NONE; + + if (!php_ctlr || !php_ctlr->creg) + return IRQ_NONE; + /* Check to see if it was our interrupt */ - intr_loc = shpc_readl(ctrl, INTR_LOC); + intr_loc = readl(php_ctlr->creg + INTR_LOC); + if (!intr_loc) return IRQ_NONE; - dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); if(!shpchp_poll_mode) { - /* - * Mask Global Interrupt Mask - see implementation - * note on p. 139 of SHPC spec rev 1.0 - */ - serr_int = shpc_readl(ctrl, SERR_INTR_ENABLE); - serr_int |= GLOBAL_INTR_MASK; - serr_int &= ~SERR_INTR_RSVDZ_MASK; - shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); + /* Mask Global Interrupt Mask - see implementation note on p. 139 */ + /* of SHPC spec rev 1.0*/ + temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + temp_dword |= 0x00000001; + writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); - intr_loc2 = shpc_readl(ctrl, INTR_LOC); + intr_loc2 = readl(php_ctlr->creg + INTR_LOC); dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); } - if (intr_loc & CMD_INTR_PENDING) { + if (intr_loc & 0x0001) { /* * Command Complete Interrupt Pending * RO only - clear by writing 1 to the Command Completion * Detect bit in Controller SERR-INT register */ - serr_int = shpc_readl(ctrl, SERR_INTR_ENABLE); - serr_int &= ~SERR_INTR_RSVDZ_MASK; - shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); - + temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + temp_dword &= 0xfffdffff; + writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); ctrl->cmd_busy = 0; wake_up_interruptible(&ctrl->queue); } - if (!(intr_loc & ~CMD_INTR_PENDING)) + if ((intr_loc = (intr_loc >> 1)) == 0) goto out; for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { - /* To find out which slot has interrupt pending */ - if (!(intr_loc & SLOT_INTR_PENDING(hp_slot))) - continue; - - slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); - dbg("%s: Slot %x with intr, slot register = %x\n", - __FUNCTION__, hp_slot, slot_reg); - - if (slot_reg & MRL_CHANGE_DETECTED) - php_ctlr->switch_change_callback( - hp_slot, php_ctlr->callback_instance_id); - - if (slot_reg & BUTTON_PRESS_DETECTED) - php_ctlr->attention_button_callback( - hp_slot, php_ctlr->callback_instance_id); - - if (slot_reg & PRSNT_CHANGE_DETECTED) - php_ctlr->presence_change_callback( - hp_slot , php_ctlr->callback_instance_id); - - if (slot_reg & (ISO_PFAULT_DETECTED | CON_PFAULT_DETECTED)) - php_ctlr->power_fault_callback( - hp_slot, php_ctlr->callback_instance_id); - - /* Clear all slot events */ - slot_reg &= ~SLOT_REG_RSVDZ_MASK; - shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg); + /* To find out which slot has interrupt pending */ + if ((intr_loc >> hp_slot) & 0x01) { + temp_dword = readl(php_ctlr->creg + SLOT1 + (4*hp_slot)); + dbg("%s: Slot %x with intr, slot register = %x\n", + __FUNCTION__, hp_slot, temp_dword); + temp_byte = (temp_dword >> 16) & 0xFF; + if ((php_ctlr->switch_change_callback) && (temp_byte & 0x08)) + schedule_flag += php_ctlr->switch_change_callback( + hp_slot, php_ctlr->callback_instance_id); + if ((php_ctlr->attention_button_callback) && (temp_byte & 0x04)) + schedule_flag += php_ctlr->attention_button_callback( + hp_slot, php_ctlr->callback_instance_id); + if ((php_ctlr->presence_change_callback) && (temp_byte & 0x01)) + schedule_flag += php_ctlr->presence_change_callback( + hp_slot , php_ctlr->callback_instance_id); + if ((php_ctlr->power_fault_callback) && (temp_byte & 0x12)) + schedule_flag += php_ctlr->power_fault_callback( + hp_slot, php_ctlr->callback_instance_id); + + /* Clear all slot events */ + temp_dword = 0xe01f3fff; + writel(temp_dword, php_ctlr->creg + SLOT1 + (4*hp_slot)); + + intr_loc2 = readl(php_ctlr->creg + INTR_LOC); + dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); + } } out: if (!shpchp_poll_mode) { /* Unmask Global Interrupt Mask */ - serr_int = shpc_readl(ctrl, SERR_INTR_ENABLE); - serr_int &= ~(GLOBAL_INTR_MASK | SERR_INTR_RSVDZ_MASK); - shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); + temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + temp_dword &= 0xfffffffe; + writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); } return IRQ_HANDLED; @@ -958,11 +1067,11 @@ static irqreturn_t shpc_isr(int irq, void *dev_id, struct pt_regs *regs) static int hpc_get_max_bus_speed (struct slot *slot, enum pci_bus_speed *value) { int retval = 0; - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; enum pci_bus_speed bus_speed = PCI_SPEED_UNKNOWN; - u8 pi = shpc_readb(ctrl, PROG_INTERFACE); - u32 slot_avail1 = shpc_readl(ctrl, SLOT_AVAIL1); - u32 slot_avail2 = shpc_readl(ctrl, SLOT_AVAIL2); + u8 pi = readb(php_ctlr->creg + PROG_INTERFACE); + u32 slot_avail1 = readl(php_ctlr->creg + SLOT_AVAIL1); + u32 slot_avail2 = readl(php_ctlr->creg + SLOT_AVAIL2); DBG_ENTER_ROUTINE @@ -1005,10 +1114,10 @@ static int hpc_get_max_bus_speed (struct slot *slot, enum pci_bus_speed *value) static int hpc_get_cur_bus_speed (struct slot *slot, enum pci_bus_speed *value) { int retval = 0; - struct controller *ctrl = slot->ctrl; + struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; enum pci_bus_speed bus_speed = PCI_SPEED_UNKNOWN; - u16 sec_bus_reg = shpc_readw(ctrl, SEC_BUS_CONFIG); - u8 pi = shpc_readb(ctrl, PROG_INTERFACE); + u16 sec_bus_reg = readw(php_ctlr->creg + SEC_BUS_CONFIG); + u8 pi = readb(php_ctlr->creg + PROG_INTERFACE); u8 speed_mode = (pi == 2) ? (sec_bus_reg & 0xF) : (sec_bus_reg & 0x7); DBG_ENTER_ROUTINE @@ -1097,14 +1206,28 @@ static struct hpc_ops shpchp_hpc_ops = { .release_ctlr = hpc_release_ctlr, }; +inline static int shpc_indirect_creg_read(struct controller *ctrl, int index, + u32 *value) +{ + int rc; + u32 cap_offset = ctrl->cap_offset; + struct pci_dev *pdev = ctrl->pci_dev; + + rc = pci_write_config_byte(pdev, cap_offset + DWORD_SELECT, index); + if (rc) + return rc; + return pci_read_config_dword(pdev, cap_offset + DWORD_DATA, value); +} + int shpc_init(struct controller * ctrl, struct pci_dev * pdev) { struct php_ctlr_state_s *php_ctlr, *p; void *instance_id = ctrl; int rc, num_slots = 0; u8 hp_slot; + static int first = 1; u32 shpc_base_offset; - u32 tempdword, slot_reg, slot_config; + u32 tempdword, slot_reg; u8 i; DBG_ENTER_ROUTINE @@ -1134,13 +1257,13 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) } dbg("%s: cap_offset = %x\n", __FUNCTION__, ctrl->cap_offset); - rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset); + rc = shpc_indirect_creg_read(ctrl, 0, &shpc_base_offset); if (rc) { err("%s: cannot read base_offset\n", __FUNCTION__); goto abort_free_ctlr; } - rc = shpc_indirect_read(ctrl, 3, &tempdword); + rc = shpc_indirect_creg_read(ctrl, 3, &tempdword); if (rc) { err("%s: cannot read slot config\n", __FUNCTION__); goto abort_free_ctlr; @@ -1149,7 +1272,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) dbg("%s: num_slots (indirect) %x\n", __FUNCTION__, num_slots); for (i = 0; i < 9 + num_slots; i++) { - rc = shpc_indirect_read(ctrl, i, &tempdword); + rc = shpc_indirect_creg_read(ctrl, i, &tempdword); if (rc) { err("%s: cannot read creg (index = %d)\n", __FUNCTION__, i); @@ -1164,6 +1287,11 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) ctrl->mmio_size = 0x24 + 0x4 * num_slots; } + if (first) { + spin_lock_init(&hpc_event_lock); + first = 0; + } + info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device); @@ -1198,39 +1326,29 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) php_ctlr->power_fault_callback = shpchp_handle_power_fault; php_ctlr->callback_instance_id = instance_id; - ctrl->hpc_ctlr_handle = php_ctlr; - ctrl->hpc_ops = &shpchp_hpc_ops; - /* Return PCI Controller Info */ - slot_config = shpc_readl(ctrl, SLOT_CONFIG); - php_ctlr->slot_device_offset = (slot_config & FIRST_DEV_NUM) >> 8; - php_ctlr->num_slots = slot_config & SLOT_NUM; + php_ctlr->slot_device_offset = (readl(php_ctlr->creg + SLOT_CONFIG) & FIRST_DEV_NUM ) >> 8; + php_ctlr->num_slots = readl(php_ctlr->creg + SLOT_CONFIG) & SLOT_NUM; dbg("%s: slot_device_offset %x\n", __FUNCTION__, php_ctlr->slot_device_offset); dbg("%s: num_slots %x\n", __FUNCTION__, php_ctlr->num_slots); /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */ - tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); + tempdword = readl(php_ctlr->creg + SERR_INTR_ENABLE); dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); - tempdword |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | - COMMAND_INTR_MASK | ARBITER_SERR_MASK); - tempdword &= ~SERR_INTR_RSVDZ_MASK; - shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); - tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); + tempdword = 0x0003000f; + writel(tempdword, php_ctlr->creg + SERR_INTR_ENABLE); + tempdword = readl(php_ctlr->creg + SERR_INTR_ENABLE); dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); /* Mask the MRL sensor SERR Mask of individual slot in * Slot SERR-INT Mask & clear all the existing event if any */ for (hp_slot = 0; hp_slot < php_ctlr->num_slots; hp_slot++) { - slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*hp_slot ); dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__, hp_slot, slot_reg); - slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | - BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | - CON_PFAULT_INTR_MASK | MRL_CHANGE_SERR_MASK | - CON_PFAULT_SERR_MASK); - slot_reg &= ~SLOT_REG_RSVDZ_MASK; - shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg); + tempdword = 0xffff3fff; + writel(tempdword, php_ctlr->creg + SLOT1 + (4*hp_slot)); } if (shpchp_poll_mode) {/* Install interrupt polling code */ @@ -1246,7 +1364,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) } else php_ctlr->irq = pdev->irq; - rc = request_irq(php_ctlr->irq, shpc_isr, IRQF_SHARED, MY_NAME, (void *) ctrl); + rc = request_irq(php_ctlr->irq, shpc_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); if (rc) { err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); @@ -1274,37 +1392,24 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) } spin_unlock(&list_lock); - ctlr_seq_num++; - /* - * If this is the first controller to be initialized, - * initialize the shpchpd work queue - */ - if (atomic_add_return(1, &shpchp_num_controllers) == 1) { - shpchp_wq = create_singlethread_workqueue("shpchpd"); - if (!shpchp_wq) - return -ENOMEM; - } + ctlr_seq_num++; + ctrl->hpc_ctlr_handle = php_ctlr; + ctrl->hpc_ops = &shpchp_hpc_ops; - /* - * Unmask all event interrupts of all slots - */ for (hp_slot = 0; hp_slot < php_ctlr->num_slots; hp_slot++) { - slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); + slot_reg = readl(php_ctlr->creg + SLOT1 + 4*hp_slot ); dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__, hp_slot, slot_reg); - slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | - BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | - CON_PFAULT_INTR_MASK | SLOT_REG_RSVDZ_MASK); - shpc_writel(ctrl, SLOT_REG(hp_slot), slot_reg); + tempdword = 0xe01f3fff; + writel(tempdword, php_ctlr->creg + SLOT1 + (4*hp_slot)); } if (!shpchp_poll_mode) { /* Unmask all general input interrupts and SERR */ - tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); - tempdword &= ~(GLOBAL_INTR_MASK | COMMAND_INTR_MASK | - SERR_INTR_RSVDZ_MASK); - shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); - tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); + tempdword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + tempdword = 0x0000000a; + writel(tempdword, php_ctlr->creg + SERR_INTR_ENABLE); + tempdword = readl(php_ctlr->creg + SERR_INTR_ENABLE); dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); } diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index 0a6b25ef1..257adc233 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c @@ -47,28 +47,21 @@ static void program_fw_provided_values(struct pci_dev *dev) return; /* use default values if we can't get them from firmware */ - if (get_hp_params_from_firmware(dev, &hpp) || - !hpp.t0 || (hpp.t0->revision > 1)) { - printk(KERN_WARNING - "%s: Could not get hotplug parameters. Use defaults\n", - __FUNCTION__); - hpp.t0 = &hpp.type0_data; - hpp.t0->revision = 0; - hpp.t0->cache_line_size = 8; - hpp.t0->latency_timer = 0x40; - hpp.t0->enable_serr = 0; - hpp.t0->enable_perr = 0; + if (get_hp_params_from_firmware(dev, &hpp)) { + hpp.cache_line_size = 8; + hpp.latency_timer = 0x40; + hpp.enable_serr = 0; + hpp.enable_perr = 0; } - pci_write_config_byte(dev, - PCI_CACHE_LINE_SIZE, hpp.t0->cache_line_size); - pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp.t0->latency_timer); + pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, hpp.cache_line_size); + pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp.latency_timer); pci_read_config_word(dev, PCI_COMMAND, &pci_cmd); - if (hpp.t0->enable_serr) + if (hpp.enable_serr) pci_cmd |= PCI_COMMAND_SERR; else pci_cmd &= ~PCI_COMMAND_SERR; - if (hpp.t0->enable_perr) + if (hpp.enable_perr) pci_cmd |= PCI_COMMAND_PARITY; else pci_cmd &= ~PCI_COMMAND_PARITY; @@ -77,13 +70,13 @@ static void program_fw_provided_values(struct pci_dev *dev) /* Program bridge control value and child devices */ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, - hpp.t0->latency_timer); + hpp.latency_timer); pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &pci_bctl); - if (hpp.t0->enable_serr) + if (hpp.enable_serr) pci_bctl |= PCI_BRIDGE_CTL_SERR; else pci_bctl &= ~PCI_BRIDGE_CTL_SERR; - if (hpp.t0->enable_perr) + if (hpp.enable_perr) pci_bctl |= PCI_BRIDGE_CTL_PARITY; else pci_bctl &= ~PCI_BRIDGE_CTL_PARITY; diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index 620e1139e..f5cfbf2c0 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c @@ -51,10 +51,8 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha res = bus->resource[index]; if (res && (res->flags & IORESOURCE_MEM) && !(res->flags & IORESOURCE_PREFETCH)) { - out += sprintf(out, "start = %8.8llx, " - "length = %8.8llx\n", - (unsigned long long)res->start, - (unsigned long long)(res->end - res->start)); + out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", + res->start, (res->end - res->start)); } } out += sprintf(out, "Free resources: prefetchable memory\n"); @@ -62,20 +60,16 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha res = bus->resource[index]; if (res && (res->flags & IORESOURCE_MEM) && (res->flags & IORESOURCE_PREFETCH)) { - out += sprintf(out, "start = %8.8llx, " - "length = %8.8llx\n", - (unsigned long long)res->start, - (unsigned long long)(res->end - res->start)); + out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", + res->start, (res->end - res->start)); } } out += sprintf(out, "Free resources: IO\n"); for (index = 0; index < PCI_BUS_NUM_RESOURCES; index++) { res = bus->resource[index]; if (res && (res->flags & IORESOURCE_IO)) { - out += sprintf(out, "start = %8.8llx, " - "length = %8.8llx\n", - (unsigned long long)res->start, - (unsigned long long)(res->end - res->start)); + out += sprintf(out, "start = %8.8lx, length = %8.8lx\n", + res->start, (res->end - res->start)); } } out += sprintf(out, "Free resources: bus numbers\n"); diff --git a/drivers/pci/msi-altix.c b/drivers/pci/msi-altix.c deleted file mode 100644 index bed4183a5..000000000 --- a/drivers/pci/msi-altix.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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) 2006 Silicon Graphics, Inc. All Rights Reserved. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "msi.h" - -struct sn_msi_info { - u64 pci_addr; - struct sn_irq_info *sn_irq_info; -}; - -static struct sn_msi_info *sn_msi_info; - -static void -sn_msi_teardown(unsigned int vector) -{ - nasid_t nasid; - int widget; - struct pci_dev *pdev; - struct pcidev_info *sn_pdev; - struct sn_irq_info *sn_irq_info; - struct pcibus_bussoft *bussoft; - struct sn_pcibus_provider *provider; - - sn_irq_info = sn_msi_info[vector].sn_irq_info; - if (sn_irq_info == NULL || sn_irq_info->irq_int_bit >= 0) - return; - - sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo; - pdev = sn_pdev->pdi_linux_pcidev; - provider = SN_PCIDEV_BUSPROVIDER(pdev); - - (*provider->dma_unmap)(pdev, - sn_msi_info[vector].pci_addr, - PCI_DMA_FROMDEVICE); - sn_msi_info[vector].pci_addr = 0; - - bussoft = SN_PCIDEV_BUSSOFT(pdev); - nasid = NASID_GET(bussoft->bs_base); - widget = (nasid & 1) ? - TIO_SWIN_WIDGETNUM(bussoft->bs_base) : - SWIN_WIDGETNUM(bussoft->bs_base); - - sn_intr_free(nasid, widget, sn_irq_info); - sn_msi_info[vector].sn_irq_info = NULL; - - return; -} - -int -sn_msi_setup(struct pci_dev *pdev, unsigned int vector, - u32 *addr_hi, u32 *addr_lo, u32 *data) -{ - int widget; - int status; - nasid_t nasid; - u64 bus_addr; - struct sn_irq_info *sn_irq_info; - struct pcibus_bussoft *bussoft = SN_PCIDEV_BUSSOFT(pdev); - struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); - - if (bussoft == NULL) - return -EINVAL; - - if (provider == NULL || provider->dma_map_consistent == NULL) - return -EINVAL; - - /* - * Set up the vector plumbing. Let the prom (via sn_intr_alloc) - * decide which cpu to direct this msi at by default. - */ - - nasid = NASID_GET(bussoft->bs_base); - widget = (nasid & 1) ? - TIO_SWIN_WIDGETNUM(bussoft->bs_base) : - SWIN_WIDGETNUM(bussoft->bs_base); - - sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL); - if (! sn_irq_info) - return -ENOMEM; - - status = sn_intr_alloc(nasid, widget, sn_irq_info, vector, -1, -1); - if (status) { - kfree(sn_irq_info); - return -ENOMEM; - } - - sn_irq_info->irq_int_bit = -1; /* mark this as an MSI irq */ - sn_irq_fixup(pdev, sn_irq_info); - - /* Prom probably should fill these in, but doesn't ... */ - sn_irq_info->irq_bridge_type = bussoft->bs_asic_type; - sn_irq_info->irq_bridge = (void *)bussoft->bs_base; - - /* - * Map the xio address into bus space - */ - bus_addr = (*provider->dma_map_consistent)(pdev, - sn_irq_info->irq_xtalkaddr, - sizeof(sn_irq_info->irq_xtalkaddr), - SN_DMA_MSI|SN_DMA_ADDR_XIO); - if (! bus_addr) { - sn_intr_free(nasid, widget, sn_irq_info); - kfree(sn_irq_info); - return -ENOMEM; - } - - sn_msi_info[vector].sn_irq_info = sn_irq_info; - sn_msi_info[vector].pci_addr = bus_addr; - - *addr_hi = (u32)(bus_addr >> 32); - *addr_lo = (u32)(bus_addr & 0x00000000ffffffff); - - /* - * In the SN platform, bit 16 is a "send vector" bit which - * must be present in order to move the vector through the system. - */ - *data = 0x100 + (unsigned int)vector; - -#ifdef CONFIG_SMP - set_irq_affinity_info((vector & 0xff), sn_irq_info->irq_cpuid, 0); -#endif - - return 0; -} - -static void -sn_msi_target(unsigned int vector, unsigned int cpu, - u32 *addr_hi, u32 *addr_lo) -{ - int slice; - nasid_t nasid; - u64 bus_addr; - struct pci_dev *pdev; - struct pcidev_info *sn_pdev; - struct sn_irq_info *sn_irq_info; - struct sn_irq_info *new_irq_info; - struct sn_pcibus_provider *provider; - - sn_irq_info = sn_msi_info[vector].sn_irq_info; - if (sn_irq_info == NULL || sn_irq_info->irq_int_bit >= 0) - return; - - /* - * Release XIO resources for the old MSI PCI address - */ - - sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo; - pdev = sn_pdev->pdi_linux_pcidev; - provider = SN_PCIDEV_BUSPROVIDER(pdev); - - bus_addr = (u64)(*addr_hi) << 32 | (u64)(*addr_lo); - (*provider->dma_unmap)(pdev, bus_addr, PCI_DMA_FROMDEVICE); - sn_msi_info[vector].pci_addr = 0; - - nasid = cpuid_to_nasid(cpu); - slice = cpuid_to_slice(cpu); - - new_irq_info = sn_retarget_vector(sn_irq_info, nasid, slice); - sn_msi_info[vector].sn_irq_info = new_irq_info; - if (new_irq_info == NULL) - return; - - /* - * Map the xio address into bus space - */ - - bus_addr = (*provider->dma_map_consistent)(pdev, - new_irq_info->irq_xtalkaddr, - sizeof(new_irq_info->irq_xtalkaddr), - SN_DMA_MSI|SN_DMA_ADDR_XIO); - - sn_msi_info[vector].pci_addr = bus_addr; - *addr_hi = (u32)(bus_addr >> 32); - *addr_lo = (u32)(bus_addr & 0x00000000ffffffff); -} - -struct msi_ops sn_msi_ops = { - .setup = sn_msi_setup, - .teardown = sn_msi_teardown, -#ifdef CONFIG_SMP - .target = sn_msi_target, -#endif -}; - -int -sn_msi_init(void) -{ - sn_msi_info = - kzalloc(sizeof(struct sn_msi_info) * NR_VECTORS, GFP_KERNEL); - if (! sn_msi_info) - return -ENOMEM; - - msi_register(&sn_msi_ops); - return 0; -} diff --git a/drivers/pci/msi-apic.c b/drivers/pci/msi-apic.c deleted file mode 100644 index 5ed798b31..000000000 --- a/drivers/pci/msi-apic.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * MSI hooks for standard x86 apic - */ - -#include -#include -#include - -#include "msi.h" - -/* - * Shifts for APIC-based data - */ - -#define MSI_DATA_VECTOR_SHIFT 0 -#define MSI_DATA_VECTOR(v) (((u8)v) << MSI_DATA_VECTOR_SHIFT) - -#define MSI_DATA_DELIVERY_SHIFT 8 -#define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_SHIFT) -#define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_SHIFT) - -#define MSI_DATA_LEVEL_SHIFT 14 -#define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) -#define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) - -#define MSI_DATA_TRIGGER_SHIFT 15 -#define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) -#define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) - -/* - * Shift/mask fields for APIC-based bus address - */ - -#define MSI_ADDR_HEADER 0xfee00000 - -#define MSI_ADDR_DESTID_MASK 0xfff0000f -#define MSI_ADDR_DESTID_CPU(cpu) ((cpu) << MSI_TARGET_CPU_SHIFT) - -#define MSI_ADDR_DESTMODE_SHIFT 2 -#define MSI_ADDR_DESTMODE_PHYS (0 << MSI_ADDR_DESTMODE_SHIFT) -#define MSI_ADDR_DESTMODE_LOGIC (1 << MSI_ADDR_DESTMODE_SHIFT) - -#define MSI_ADDR_REDIRECTION_SHIFT 3 -#define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) -#define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) - - -static void -msi_target_apic(unsigned int vector, - unsigned int dest_cpu, - u32 *address_hi, /* in/out */ - u32 *address_lo) /* in/out */ -{ - u32 addr = *address_lo; - - addr &= MSI_ADDR_DESTID_MASK; - addr |= MSI_ADDR_DESTID_CPU(cpu_physical_id(dest_cpu)); - - *address_lo = addr; -} - -static int -msi_setup_apic(struct pci_dev *pdev, /* unused in generic */ - unsigned int vector, - u32 *address_hi, - u32 *address_lo, - u32 *data) -{ - unsigned long dest_phys_id; - - dest_phys_id = cpu_physical_id(first_cpu(cpu_online_map)); - - *address_hi = 0; - *address_lo = MSI_ADDR_HEADER | - MSI_ADDR_DESTMODE_PHYS | - MSI_ADDR_REDIRECTION_CPU | - MSI_ADDR_DESTID_CPU(dest_phys_id); - - *data = MSI_DATA_TRIGGER_EDGE | - MSI_DATA_LEVEL_ASSERT | - MSI_DATA_DELIVERY_FIXED | - MSI_DATA_VECTOR(vector); - - return 0; -} - -static void -msi_teardown_apic(unsigned int vector) -{ - return; /* no-op */ -} - -/* - * Generic ops used on most IA archs/platforms. Set with msi_register() - */ - -struct msi_ops msi_apic_ops = { - .setup = msi_setup_apic, - .teardown = msi_teardown_apic, - .target = msi_target_apic, -}; diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index a83c1f573..9855c4c92 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #include "pci.h" #include "msi.h" +#define MSI_TARGET_CPU first_cpu(cpu_online_map) + static DEFINE_SPINLOCK(msi_lock); static struct msi_desc* msi_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = NULL }; static kmem_cache_t* msi_cachep; @@ -34,26 +37,18 @@ static int nr_msix_devices; #ifndef CONFIG_X86_IO_APIC int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1}; +u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 }; #endif -static struct msi_ops *msi_ops; - -int -msi_register(struct msi_ops *ops) -{ - msi_ops = ops; - return 0; -} - static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags) { - memset(p, 0, sizeof(struct msi_desc)); + memset(p, 0, NR_IRQS * sizeof(struct msi_desc)); } static int msi_cache_init(void) { msi_cachep = kmem_cache_create("msi_cache", - sizeof(struct msi_desc), + NR_IRQS * sizeof(struct msi_desc), 0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL); if (!msi_cachep) return -ENOMEM; @@ -97,7 +92,7 @@ static void msi_set_mask_bit(unsigned int vector, int flag) static void set_msi_affinity(unsigned int vector, cpumask_t cpu_mask) { struct msi_desc *entry; - u32 address_hi, address_lo; + struct msg_address address; unsigned int irq = vector; unsigned int dest_cpu = first_cpu(cpu_mask); @@ -113,36 +108,28 @@ static void set_msi_affinity(unsigned int vector, cpumask_t cpu_mask) if (!pos) return; - pci_read_config_dword(entry->dev, msi_upper_address_reg(pos), - &address_hi); pci_read_config_dword(entry->dev, msi_lower_address_reg(pos), - &address_lo); - - msi_ops->target(vector, dest_cpu, &address_hi, &address_lo); - - pci_write_config_dword(entry->dev, msi_upper_address_reg(pos), - address_hi); + &address.lo_address.value); + address.lo_address.value &= MSI_ADDRESS_DEST_ID_MASK; + address.lo_address.value |= (cpu_physical_id(dest_cpu) << + MSI_TARGET_CPU_SHIFT); + entry->msi_attrib.current_cpu = cpu_physical_id(dest_cpu); pci_write_config_dword(entry->dev, msi_lower_address_reg(pos), - address_lo); + address.lo_address.value); set_native_irq_info(irq, cpu_mask); break; } case PCI_CAP_ID_MSIX: { - int offset_hi = - entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET; - int offset_lo = - entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET; - - address_hi = readl(entry->mask_base + offset_hi); - address_lo = readl(entry->mask_base + offset_lo); - - msi_ops->target(vector, dest_cpu, &address_hi, &address_lo); - - writel(address_hi, entry->mask_base + offset_hi); - writel(address_lo, entry->mask_base + offset_lo); + 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); + address.lo_address.value &= MSI_ADDRESS_DEST_ID_MASK; + address.lo_address.value |= (cpu_physical_id(dest_cpu) << + MSI_TARGET_CPU_SHIFT); + entry->msi_attrib.current_cpu = cpu_physical_id(dest_cpu); + writel(address.lo_address.value, entry->mask_base + offset); set_native_irq_info(irq, cpu_mask); break; } @@ -264,6 +251,30 @@ static struct hw_interrupt_type msi_irq_wo_maskbit_type = { .set_affinity = set_msi_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; + unsigned long dest_phys_id = cpu_physical_id(MSI_TARGET_CPU); + + memset(msi_address, 0, sizeof(struct msg_address)); + msi_address->hi_address = (u32)0; + dest_id = (MSI_ADDRESS_HEADER << MSI_ADDRESS_HEADER_SHIFT); + msi_address->lo_address.u.dest_mode = MSI_PHYSICAL_MODE; + msi_address->lo_address.u.redirection_hint = MSI_REDIRECTION_HINT_MODE; + msi_address->lo_address.u.dest_id = dest_id; + msi_address->lo_address.value |= (dest_phys_id << MSI_TARGET_CPU_SHIFT); +} + static int msi_free_vector(struct pci_dev* dev, int vector, int reassign); static int assign_msi_vector(void) { @@ -358,29 +369,13 @@ static int msi_init(void) return status; } - status = msi_arch_init(); - if (status < 0) { - pci_msi_enable = 0; - printk(KERN_WARNING - "PCI: MSI arch init failed. MSI disabled.\n"); - return status; - } - - if (! msi_ops) { - printk(KERN_WARNING - "PCI: MSI ops not registered. MSI disabled.\n"); - status = -EINVAL; - return status; - } - - last_alloc_vector = assign_irq_vector(AUTO_ASSIGN); status = msi_cache_init(); if (status < 0) { pci_msi_enable = 0; printk(KERN_WARNING "PCI: MSI cache init failed\n"); return status; } - + last_alloc_vector = assign_irq_vector(AUTO_ASSIGN); if (last_alloc_vector < 0) { pci_msi_enable = 0; printk(KERN_WARNING "PCI: No interrupt vectors available for MSI\n"); @@ -428,12 +423,12 @@ static void irq_handler_init(int cap_id, int pos, int mask) spin_lock_irqsave(&irq_desc[pos].lock, flags); if (cap_id == PCI_CAP_ID_MSIX) - irq_desc[pos].chip = &msix_irq_type; + irq_desc[pos].handler = &msix_irq_type; else { if (!mask) - irq_desc[pos].chip = &msi_irq_wo_maskbit_type; + irq_desc[pos].handler = &msi_irq_wo_maskbit_type; else - irq_desc[pos].chip = &msi_irq_w_maskbit_type; + irq_desc[pos].handler = &msi_irq_w_maskbit_type; } spin_unlock_irqrestore(&irq_desc[pos].lock, flags); } @@ -447,11 +442,9 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type) /* Set enabled bits to single MSI & enable MSI_enable bit */ msi_enable(control, 1); pci_write_config_word(dev, msi_control_reg(pos), control); - dev->msi_enabled = 1; } else { msix_enable(control); pci_write_config_word(dev, msi_control_reg(pos), control); - dev->msix_enabled = 1; } if (pci_find_capability(dev, PCI_CAP_ID_EXP)) { /* PCI Express Endpoint device detected */ @@ -468,11 +461,9 @@ void disable_msi_mode(struct pci_dev *dev, int pos, int type) /* Set enabled bits to single MSI & enable MSI_enable bit */ msi_disable(control); pci_write_config_word(dev, msi_control_reg(pos), control); - dev->msi_enabled = 0; } else { msix_disable(control); pci_write_config_word(dev, msi_control_reg(pos), control); - dev->msix_enabled = 0; } if (pci_find_capability(dev, PCI_CAP_ID_EXP)) { /* PCI Express Endpoint device detected */ @@ -547,6 +538,7 @@ int pci_save_msi_state(struct pci_dev *dev) pci_read_config_dword(dev, pos + PCI_MSI_DATA_32, &cap[i++]); if (control & PCI_MSI_FLAGS_MASKBIT) pci_read_config_dword(dev, pos + PCI_MSI_MASK_BIT, &cap[i++]); + disable_msi_mode(dev, pos, PCI_CAP_ID_MSI); save_state->cap_nr = PCI_CAP_ID_MSI; pci_add_saved_cap(dev, save_state); return 0; @@ -583,8 +575,6 @@ void pci_restore_msi_state(struct pci_dev *dev) int pci_save_msix_state(struct pci_dev *dev) { int pos; - int temp; - int vector, head, tail = 0; u16 control; struct pci_cap_saved_state *save_state; @@ -592,7 +582,6 @@ int pci_save_msix_state(struct pci_dev *dev) if (pos <= 0 || dev->no_msi) return 0; - /* save the capability */ pci_read_config_word(dev, msi_control_reg(pos), &control); if (!(control & PCI_MSIX_FLAGS_ENABLE)) return 0; @@ -604,38 +593,7 @@ int pci_save_msix_state(struct pci_dev *dev) } *((u16 *)&save_state->data[0]) = control; - /* save the table */ - temp = dev->irq; - if (msi_lookup_vector(dev, PCI_CAP_ID_MSIX)) { - kfree(save_state); - return -EINVAL; - } - - vector = head = dev->irq; - while (head != tail) { - int j; - void __iomem *base; - struct msi_desc *entry; - - entry = msi_desc[vector]; - base = entry->mask_base; - j = entry->msi_attrib.entry_nr; - - entry->address_lo_save = - readl(base + j * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET); - entry->address_hi_save = - readl(base + j * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET); - entry->data_save = - readl(base + j * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_DATA_OFFSET); - - tail = msi_desc[vector]->link.tail; - vector = tail; - } - dev->irq = temp; - + disable_msi_mode(dev, pos, PCI_CAP_ID_MSIX); save_state->cap_nr = PCI_CAP_ID_MSIX; pci_add_saved_cap(dev, save_state); return 0; @@ -648,6 +606,8 @@ void pci_restore_msix_state(struct pci_dev *dev) int vector, head, tail = 0; void __iomem *base; int j; + struct msg_address address; + struct msg_data data; struct msi_desc *entry; int temp; struct pci_cap_saved_state *save_state; @@ -673,13 +633,20 @@ void pci_restore_msix_state(struct pci_dev *dev) base = entry->mask_base; j = entry->msi_attrib.entry_nr; - writel(entry->address_lo_save, + msi_address_init(&address); + msi_data_init(&data, vector); + + address.lo_address.value &= MSI_ADDRESS_DEST_ID_MASK; + address.lo_address.value |= entry->msi_attrib.current_cpu << + MSI_TARGET_CPU_SHIFT; + + writel(address.lo_address.value, base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET); - writel(entry->address_hi_save, + writel(address.hi_address, base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET); - writel(entry->data_save, + writel(*(u32*)&data, base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_DATA_OFFSET); @@ -693,32 +660,30 @@ void pci_restore_msix_state(struct pci_dev *dev) } #endif -static int msi_register_init(struct pci_dev *dev, struct msi_desc *entry) +static void msi_register_init(struct pci_dev *dev, struct msi_desc *entry) { - int status; - u32 address_hi; - u32 address_lo; - u32 data; + struct msg_address address; + struct msg_data data; int pos, vector = dev->irq; u16 control; pos = pci_find_capability(dev, PCI_CAP_ID_MSI); pci_read_config_word(dev, msi_control_reg(pos), &control); - /* Configure MSI capability structure */ - status = msi_ops->setup(dev, vector, &address_hi, &address_lo, &data); - if (status < 0) - return status; - - pci_write_config_dword(dev, msi_lower_address_reg(pos), address_lo); + 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); + pci_write_config_dword(dev, msi_lower_address_reg(pos), + address.lo_address.value); if (is_64bit_address(control)) { pci_write_config_dword(dev, - msi_upper_address_reg(pos), address_hi); + msi_upper_address_reg(pos), address.hi_address); pci_write_config_word(dev, - msi_data_reg(pos, 1), data); + msi_data_reg(pos, 1), *((u32*)&data)); } else pci_write_config_word(dev, - msi_data_reg(pos, 0), data); + msi_data_reg(pos, 0), *((u32*)&data)); if (entry->msi_attrib.maskbit) { unsigned int maskbits, temp; /* All MSIs are unmasked by default, Mask them all */ @@ -732,8 +697,6 @@ static int msi_register_init(struct pci_dev *dev, struct msi_desc *entry) msi_mask_bits_reg(pos, is_64bit_address(control)), maskbits); } - - return 0; } /** @@ -747,7 +710,6 @@ static int msi_register_init(struct pci_dev *dev, struct msi_desc *entry) **/ static int msi_capability_init(struct pci_dev *dev) { - int status; struct msi_desc *entry; int pos, vector; u16 control; @@ -780,12 +742,7 @@ static int msi_capability_init(struct pci_dev *dev) /* Replace with MSI handler */ irq_handler_init(PCI_CAP_ID_MSI, vector, entry->msi_attrib.maskbit); /* Configure MSI capability structure */ - status = msi_register_init(dev, entry); - if (status != 0) { - dev->irq = entry->msi_attrib.default_vector; - kmem_cache_free(msi_cachep, entry); - return status; - } + msi_register_init(dev, entry); attach_msi_entry(entry, vector); /* Set MSI enabled bits */ @@ -808,10 +765,8 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries, int nvec) { struct msi_desc *head = NULL, *tail = NULL, *entry = NULL; - u32 address_hi; - u32 address_lo; - u32 data; - int status; + struct msg_address address; + struct msg_data data; int vector, pos, i, j, nr_entries, temp = 0; unsigned long phys_addr; u32 table_offset; @@ -867,20 +822,18 @@ static int msix_capability_init(struct pci_dev *dev, /* Replace with MSI-X handler */ irq_handler_init(PCI_CAP_ID_MSIX, vector, 1); /* Configure MSI-X capability structure */ - status = msi_ops->setup(dev, vector, - &address_hi, - &address_lo, - &data); - if (status < 0) - break; - - writel(address_lo, + 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 + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET); - writel(address_hi, + writel(address.hi_address, base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET); - writel(data, + writel(*(u32*)&data, base + j * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_DATA_OFFSET); attach_msi_entry(entry, vector); @@ -912,7 +865,6 @@ static int msix_capability_init(struct pci_dev *dev, **/ int pci_enable_msi(struct pci_dev* dev) { - struct pci_bus *bus; int pos, temp, status = -EINVAL; u16 control; @@ -922,9 +874,8 @@ int pci_enable_msi(struct pci_dev* dev) if (dev->no_msi) return status; - for (bus = dev->bus; bus; bus = bus->parent) - if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI) - return -EINVAL; + if (dev->bus->bus_flags & PCI_BUS_FLAGS_NO_MSI) + return -EINVAL; temp = dev->irq; @@ -936,23 +887,23 @@ int pci_enable_msi(struct pci_dev* dev) if (!pos) return -EINVAL; + pci_read_config_word(dev, msi_control_reg(pos), &control); + if (control & PCI_MSI_FLAGS_ENABLE) + return 0; /* Already in MSI mode */ + if (!msi_lookup_vector(dev, PCI_CAP_ID_MSI)) { /* Lookup Sucess */ unsigned long flags; - pci_read_config_word(dev, msi_control_reg(pos), &control); - if (control & PCI_MSI_FLAGS_ENABLE) - return 0; /* Already in MSI mode */ spin_lock_irqsave(&msi_lock, flags); if (!vector_irq[dev->irq]) { msi_desc[dev->irq]->msi_attrib.state = 0; vector_irq[dev->irq] = -1; nr_released_vectors--; spin_unlock_irqrestore(&msi_lock, flags); - status = msi_register_init(dev, msi_desc[dev->irq]); - if (status == 0) - enable_msi_mode(dev, pos, PCI_CAP_ID_MSI); - return status; + msi_register_init(dev, msi_desc[dev->irq]); + enable_msi_mode(dev, pos, PCI_CAP_ID_MSI); + return 0; } spin_unlock_irqrestore(&msi_lock, flags); dev->irq = temp; @@ -1029,8 +980,6 @@ static int msi_free_vector(struct pci_dev* dev, int vector, int reassign) void __iomem *base; unsigned long flags; - msi_ops->teardown(vector); - spin_lock_irqsave(&msi_lock, flags); entry = msi_desc[vector]; if (!entry || entry->dev != dev) { @@ -1059,8 +1008,33 @@ static int msi_free_vector(struct pci_dev* dev, int vector, int reassign) entry_nr * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET); - if (head == vector) + if (head == vector) { + /* + * Detect last MSI-X vector to be released. + * Release the MSI-X memory-mapped table. + */ +#if 0 + int pos, nr_entries; + unsigned long phys_addr; + u32 table_offset; + u16 control; + u8 bir; + + pos = pci_find_capability(dev, PCI_CAP_ID_MSIX); + pci_read_config_word(dev, msi_control_reg(pos), + &control); + nr_entries = multi_msix_capable(control); + pci_read_config_dword(dev, msix_table_offset_reg(pos), + &table_offset); + bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); + table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; + phys_addr = pci_resource_start(dev, bir) + table_offset; +/* + * FIXME! and what did you want to do with phys_addr? + */ +#endif iounmap(base); + } } return 0; @@ -1134,7 +1108,6 @@ static int reroute_msix_table(int head, struct msix_entry *entries, int *nvec) **/ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) { - struct pci_bus *bus; int status, pos, nr_entries, free_vectors; int i, j, temp; u16 control; @@ -1143,13 +1116,6 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) if (!pci_msi_enable || !dev || !entries) return -EINVAL; - if (dev->no_msi) - return -EINVAL; - - for (bus = dev->bus; bus; bus = bus->parent) - if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI) - return -EINVAL; - status = msi_init(); if (status < 0) return status; @@ -1334,6 +1300,24 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) } msi_free_vector(dev, vector, 0); if (warning) { + /* Force to release the MSI-X memory-mapped table */ +#if 0 + unsigned long phys_addr; + u32 table_offset; + u16 control; + u8 bir; + + pci_read_config_word(dev, msi_control_reg(pos), + &control); + pci_read_config_dword(dev, msix_table_offset_reg(pos), + &table_offset); + bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); + table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; + phys_addr = pci_resource_start(dev, bir) + table_offset; +/* + * FIXME! and what did you want to do with phys_addr? + */ +#endif iounmap(base); printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() " "called without free_irq() on all MSI-X vectors\n", diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h index 56951c39d..4ac52d441 100644 --- a/drivers/pci/msi.h +++ b/drivers/pci/msi.h @@ -6,68 +6,6 @@ #ifndef MSI_H #define MSI_H -/* - * MSI operation vector. Used by the msi core code (drivers/pci/msi.c) - * to abstract platform-specific tasks relating to MSI address generation - * and resource management. - */ -struct msi_ops { - /** - * setup - generate an MSI bus address and data for a given vector - * @pdev: PCI device context (in) - * @vector: vector allocated by the msi core (in) - * @addr_hi: upper 32 bits of PCI bus MSI address (out) - * @addr_lo: lower 32 bits of PCI bus MSI address (out) - * @data: MSI data payload (out) - * - * Description: The setup op is used to generate a PCI bus addres and - * data which the msi core will program into the card MSI capability - * registers. The setup routine is responsible for picking an initial - * cpu to target the MSI at. The setup routine is responsible for - * examining pdev to determine the MSI capabilities of the card and - * generating a suitable address/data. The setup routine is - * responsible for allocating and tracking any system resources it - * needs to route the MSI to the cpu it picks, and for associating - * those resources with the passed in vector. - * - * Returns 0 if the MSI address/data was successfully setup. - **/ - - int (*setup) (struct pci_dev *pdev, unsigned int vector, - u32 *addr_hi, u32 *addr_lo, u32 *data); - - /** - * teardown - release resources allocated by setup - * @vector: vector context for resources (in) - * - * Description: The teardown op is used to release any resources - * that were allocated in the setup routine associated with the passed - * in vector. - **/ - - void (*teardown) (unsigned int vector); - - /** - * target - retarget an MSI at a different cpu - * @vector: vector context for resources (in) - * @cpu: new cpu to direct vector at (in) - * @addr_hi: new value of PCI bus upper 32 bits (in/out) - * @addr_lo: new value of PCI bus lower 32 bits (in/out) - * - * Description: The target op is used to redirect an MSI vector - * at a different cpu. addr_hi/addr_lo coming in are the existing - * values that the MSI core has programmed into the card. The - * target code is responsible for freeing any resources (if any) - * associated with the old address, and generating a new PCI bus - * addr_hi/addr_lo that will redirect the vector at the indicated cpu. - **/ - - void (*target) (unsigned int vector, unsigned int cpu, - u32 *addr_hi, u32 *addr_lo); -}; - -extern int msi_register(struct msi_ops *ops); - #include /* @@ -125,6 +63,67 @@ extern int pci_vector_resources(int last, int nr_released); #define msix_mask(address) (address | PCI_MSIX_FLAGS_BITMASK) #define msix_is_pending(address) (address & PCI_MSIX_FLAGS_PENDMASK) +/* + * MSI Defined Data Structures + */ +#define MSI_ADDRESS_HEADER 0xfee +#define MSI_ADDRESS_HEADER_SHIFT 12 +#define MSI_ADDRESS_HEADER_MASK 0xfff000 +#define MSI_ADDRESS_DEST_ID_MASK 0xfff0000f +#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_PHYSICAL_MODE 0 +#define MSI_LOGICAL_MODE 1 +#define MSI_REDIRECTION_HINT_MODE 0 + +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} */ @@ -133,7 +132,7 @@ struct msi_desc { __u8 reserved: 1; /* reserved */ __u8 entry_nr; /* specific enabled entry */ __u8 default_vector; /* default pre-assigned vector */ - __u8 unused; /* formerly unused destination cpu*/ + __u8 current_cpu; /* current destination cpu */ }msi_attrib; struct { @@ -143,14 +142,6 @@ struct msi_desc { void __iomem *mask_base; struct pci_dev *dev; - -#ifdef CONFIG_PM - /* PM save area for MSIX address/data */ - - u32 address_hi_save; - u32 address_lo_save; - u32 data_save; -#endif }; #endif /* MSI_H */ diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index bb7456c1d..c2ecae5ff 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -267,7 +267,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) /* ACPI bus type */ -static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) +static int pci_acpi_find_device(struct device *dev, acpi_handle *handle) { struct pci_dev * pci_dev; acpi_integer addr; @@ -281,7 +281,7 @@ static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) return 0; } -static int acpi_pci_find_root_bridge(struct device *dev, acpi_handle *handle) +static int pci_acpi_find_root_bridge(struct device *dev, acpi_handle *handle) { int num; unsigned int seg, bus; @@ -299,21 +299,21 @@ static int acpi_pci_find_root_bridge(struct device *dev, acpi_handle *handle) return 0; } -static struct acpi_bus_type acpi_pci_bus = { +static struct acpi_bus_type pci_acpi_bus = { .bus = &pci_bus_type, - .find_device = acpi_pci_find_device, - .find_bridge = acpi_pci_find_root_bridge, + .find_device = pci_acpi_find_device, + .find_bridge = pci_acpi_find_root_bridge, }; -static int __init acpi_pci_init(void) +static int __init pci_acpi_init(void) { int ret; - ret = register_acpi_bus_type(&acpi_pci_bus); + ret = register_acpi_bus_type(&pci_acpi_bus); if (ret) return 0; platform_pci_choose_state = acpi_pci_choose_state; platform_pci_set_power_state = acpi_pci_set_power_state; return 0; } -arch_initcall(acpi_pci_init); +arch_initcall(pci_acpi_init); diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 474e9cd0e..10e1a905c 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -139,8 +139,9 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, /** * pci_match_device - Tell if a PCI device structure has a matching * PCI device id structure - * @drv: the PCI driver to match against + * @ids: array of PCI device id structures to search in * @dev: the PCI device structure to match against + * @drv: the PCI driver to match against * * Used by a driver to check whether a PCI device present in the * system is in its list of supported devices. Returns the matching diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a9c7d41d2..56ac2bc00 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -15,6 +15,7 @@ */ +#include #include #include #include @@ -42,29 +43,6 @@ pci_config_attr(subsystem_vendor, "0x%04x\n"); pci_config_attr(subsystem_device, "0x%04x\n"); pci_config_attr(class, "0x%06x\n"); pci_config_attr(irq, "%u\n"); -pci_config_attr(is_enabled, "%u\n"); - -static ssize_t broken_parity_status_show(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - struct pci_dev *pdev = to_pci_dev(dev); - return sprintf (buf, "%u\n", pdev->broken_parity_status); -} - -static ssize_t broken_parity_status_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - struct pci_dev *pdev = to_pci_dev(dev); - ssize_t consumed = -EINVAL; - - if ((count > 0) && (*buf == '0' || *buf == '1')) { - pdev->broken_parity_status = *buf == '1' ? 1 : 0; - consumed = count; - } - return consumed; -} static ssize_t local_cpus_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -86,7 +64,7 @@ resource_show(struct device * dev, struct device_attribute *attr, char * buf) char * str = buf; int i; int max = 7; - resource_size_t start, end; + u64 start, end; if (pci_dev->subordinate) max = DEVICE_COUNT_RESOURCE; @@ -112,25 +90,6 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8), (u8)(pci_dev->class)); } -static ssize_t -is_enabled_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct pci_dev *pdev = to_pci_dev(dev); - - /* this can crash the machine when done on the "wrong" device */ - if (!capable(CAP_SYS_ADMIN)) - return count; - - if (*buf == '0') - pci_disable_device(pdev); - - if (*buf == '1') - pci_enable_device(pdev); - - return count; -} - struct device_attribute pci_dev_attrs[] = { __ATTR_RO(resource), @@ -142,9 +101,6 @@ struct device_attribute pci_dev_attrs[] = { __ATTR_RO(irq), __ATTR_RO(local_cpus), __ATTR_RO(modalias), - __ATTR(enable, 0600, is_enabled_show, is_enabled_store), - __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), - broken_parity_status_show,broken_parity_status_store), __ATTR_NULL, }; @@ -364,7 +320,7 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, struct device, kobj)); struct resource *res = (struct resource *)attr->private; enum pci_mmap_state mmap_type; - resource_size_t start, end; + u64 start, end; int i; for (i = 0; i < PCI_ROM_RESOURCE; i++) @@ -571,9 +527,6 @@ int pci_create_sysfs_dev_files (struct pci_dev *pdev) */ void pci_remove_sysfs_dev_files(struct pci_dev *pdev) { - if (!sysfs_initialized) - return; - if (pdev->cfg_size < 4096) sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); else diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9f79dd6d5..12286275b 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -19,7 +19,6 @@ #include /* isa_dma_bridge_buggy */ #include "pci.h" -unsigned int pci_pm_d3_delay = 10; /** * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children @@ -165,6 +164,7 @@ int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) return __pci_bus_find_cap(bus, devfn, hdr_type & 0x7f, cap); } +#if 0 /** * pci_find_ext_capability - Find an extended capability * @dev: PCI device to query @@ -212,7 +212,7 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap) return 0; } -EXPORT_SYMBOL_GPL(pci_find_ext_capability); +#endif /* 0 */ /** * pci_find_parent_resource - return resource region of parent bus of given region @@ -314,14 +314,6 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) } else if (dev->current_state == state) return 0; /* we're already there */ - /* - * If the device or the parent bridge can't support PCI PM, ignore - * the request if we're doing anything besides putting it into D0 - * (which would only happen on boot). - */ - if ((state == PCI_D1 || state == PCI_D2) && pci_no_d1d2(dev)) - return 0; - /* find PCI PM capability in list */ pm = pci_find_capability(dev, PCI_CAP_ID_PM); @@ -372,13 +364,13 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) /* Mandatory power management transition delays */ /* see PCI PM 1.1 5.6.1 table 18 */ if (state == PCI_D3hot || dev->current_state == PCI_D3hot) - msleep(pci_pm_d3_delay); + msleep(10); else if (state == PCI_D2 || dev->current_state == PCI_D2) udelay(200); /* * Give firmware a chance to be called, such as ACPI _PRx, _PSx - * Firmware method after native method ? + * Firmware method after natice method ? */ if (platform_pci_set_power_state) platform_pci_set_power_state(dev, state); @@ -526,12 +518,7 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) int pci_enable_device(struct pci_dev *dev) { - int err; - - if (dev->is_enabled) - return 0; - - err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); + int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); if (err) return err; pci_fixup_device(pci_fixup_enable, dev); @@ -560,14 +547,7 @@ void pci_disable_device(struct pci_dev *dev) { u16 pci_command; - - if (dev->msi_enabled) - disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI), - PCI_CAP_ID_MSI); - if (dev->msix_enabled) - disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI), - PCI_CAP_ID_MSIX); - + pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; @@ -700,12 +680,10 @@ int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name) return 0; err_out: - printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%llx@%llx " - "for device %s\n", + printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n", pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", bar + 1, /* PCI BAR # */ - (unsigned long long)pci_resource_len(pdev, bar), - (unsigned long long)pci_resource_start(pdev, bar), + pci_resource_len(pdev, bar), pci_resource_start(pdev, bar), pci_name(pdev)); return -EBUSY; } diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 08d58fc78..30630cbe2 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); extern void pci_cleanup_rom(struct pci_dev *dev); extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - resource_size_t size, resource_size_t align, - resource_size_t min, unsigned int type_mask, + unsigned long size, unsigned long align, + unsigned long min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), + unsigned long, unsigned long), void *alignf_data); /* Firmware callbacks */ extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state); @@ -40,14 +40,14 @@ extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int extern void pci_remove_legacy_files(struct pci_bus *bus); /* Lock for read/write access to pci device and bus lists */ -extern struct rw_semaphore pci_bus_sem; +extern spinlock_t pci_bus_lock; #ifdef CONFIG_X86_IO_APIC extern int pci_msi_quirk; #else #define pci_msi_quirk 0 #endif -extern unsigned int pci_pm_d3_delay; + #ifdef CONFIG_PCI_MSI void disable_msi_mode(struct pci_dev *dev, int pos, int type); void pci_no_msi(void); @@ -66,15 +66,7 @@ static inline int pci_save_msix_state(struct pci_dev *dev) { return 0; } static inline void pci_restore_msi_state(struct pci_dev *dev) {} static inline void pci_restore_msix_state(struct pci_dev *dev) {} #endif -static inline int pci_no_d1d2(struct pci_dev *dev) -{ - unsigned int parent_dstates = 0; - if (dev->bus->self) - parent_dstates = dev->bus->self->no_d1d2; - return (dev->no_d1d2 || parent_dstates); - -} extern int pcie_mch_quirk; extern struct device_attribute pci_dev_attrs[]; extern struct class_device_attribute class_device_attr_cpuaffinity; diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 478d0d28f..50bfc1b2f 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -30,6 +30,23 @@ MODULE_LICENSE("GPL"); /* global data */ static const char device_name[] = "pcieport-driver"; +static int pcie_portdrv_save_config(struct pci_dev *dev) +{ + return pci_save_state(dev); +} + +static int pcie_portdrv_restore_config(struct pci_dev *dev) +{ + int retval; + + pci_restore_state(dev); + retval = pci_enable_device(dev); + if (retval) + return retval; + pci_set_master(dev); + return 0; +} + /* * pcie_portdrv_probe - Probe PCI-Express port devices * @dev: PCI-Express port device being probed @@ -56,10 +73,8 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev, "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", __FUNCTION__, dev->device, dev->vendor); } - if (pcie_port_device_register(dev)) { - pci_disable_device(dev); + if (pcie_port_device_register(dev)) return -ENOMEM; - } return 0; } @@ -71,23 +86,6 @@ static void pcie_portdrv_remove (struct pci_dev *dev) } #ifdef CONFIG_PM -static int pcie_portdrv_save_config(struct pci_dev *dev) -{ - return pci_save_state(dev); -} - -static int pcie_portdrv_restore_config(struct pci_dev *dev) -{ - int retval; - - pci_restore_state(dev); - retval = pci_enable_device(dev); - if (retval) - return retval; - pci_set_master(dev); - return 0; -} - static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state) { int ret = pcie_port_device_suspend(dev, state); diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index c5a58d1c6..a10ed9dab 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -180,31 +180,25 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom) res->flags |= pci_calc_resource_flags(l); if ((l & (PCI_BASE_ADDRESS_SPACE | PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64)) { - u32 szhi, lhi; - pci_read_config_dword(dev, reg+4, &lhi); - pci_write_config_dword(dev, reg+4, ~0); - pci_read_config_dword(dev, reg+4, &szhi); - pci_write_config_dword(dev, reg+4, lhi); - szhi = pci_size(lhi, szhi, 0xffffffff); + pci_read_config_dword(dev, reg+4, &l); next++; #if BITS_PER_LONG == 64 - res->start |= ((unsigned long) lhi) << 32; + res->start |= ((unsigned long) l) << 32; res->end = res->start + sz; - if (szhi) { + pci_write_config_dword(dev, reg+4, ~0); + pci_read_config_dword(dev, reg+4, &sz); + pci_write_config_dword(dev, reg+4, l); + sz = pci_size(l, sz, 0xffffffff); + if (sz) { /* This BAR needs > 4GB? Wow. */ - res->end |= (unsigned long)szhi<<32; + res->end |= (unsigned long)sz<<32; } #else - if (szhi) { - printk(KERN_ERR "PCI: Unable to handle 64-bit BAR for device %s\n", pci_name(dev)); + if (l) { + printk(KERN_ERR "PCI: Unable to handle 64-bit address for device %s\n", pci_name(dev)); res->start = 0; res->flags = 0; - } else if (lhi) { - /* 64-bit wide address, treat as disabled */ - pci_write_config_dword(dev, reg, l & ~(u32)PCI_BASE_ADDRESS_MEM_MASK); - pci_write_config_dword(dev, reg+4, 0); - res->start = 0; - res->end = sz; + continue; } #endif } @@ -383,9 +377,9 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de child = pci_alloc_child_bus(parent, dev, busnr); if (child) { - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_add_tail(&child->node, &parent->children); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); } return child; } @@ -815,7 +809,6 @@ pci_scan_device(struct pci_bus *bus, int devfn) dev->vendor = l & 0xffff; dev->device = (l >> 16) & 0xffff; dev->cfg_size = pci_cfg_space_size(dev); - dev->error_state = pci_channel_io_normal; /* Assume 32-bit PCI; let 64-bit PCI cards (which are far rarer) set this higher, assuming the system even supports it. */ @@ -845,9 +838,9 @@ void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) * and the bus list for fixup functions, etc. */ INIT_LIST_HEAD(&dev->global_list); - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_add_tail(&dev->bus_list, &bus->devices); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); } struct pci_dev * __devinit @@ -982,10 +975,9 @@ struct pci_bus * __devinit pci_create_bus(struct device *parent, pr_debug("PCI: Bus %04x:%02x already known\n", pci_domain_nr(b), bus); goto err_out; } - - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_add_tail(&b->node, &pci_root_buses); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); memset(dev, 0, sizeof(*dev)); dev->parent = parent; @@ -1025,9 +1017,9 @@ class_dev_create_file_err: class_dev_reg_err: device_unregister(dev); dev_reg_err: - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_del(&b->node); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); err_out: kfree(dev); kfree(b); diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 99cf33379..54b2ebc9c 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -302,6 +302,12 @@ static struct file_operations proc_bus_pci_operations = { #endif /* HAVE_PCI_MMAP */ }; +#if BITS_PER_LONG == 32 +#define LONG_FORMAT "\t%08lx" +#else +#define LONG_FORMAT "\t%16lx" +#endif + /* iterator */ static void *pci_seq_start(struct seq_file *m, loff_t *pos) { @@ -350,18 +356,18 @@ static int show_device(struct seq_file *m, void *v) dev->irq); /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ for (i=0; i<7; i++) { - resource_size_t start, end; + u64 start, end; pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); - seq_printf(m, "\t%16llx", - (unsigned long long)(start | - (dev->resource[i].flags & PCI_REGION_FLAG_MASK))); + seq_printf(m, LONG_FORMAT, + ((unsigned long)start) | + (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); } for (i=0; i<7; i++) { - resource_size_t start, end; + u64 start, end; pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); - seq_printf(m, "\t%16llx", + seq_printf(m, LONG_FORMAT, dev->resource[i].start < dev->resource[i].end ? - (unsigned long long)(end - start) + 1 : 0); + (unsigned long)(end - start) + 1 : 0); } seq_putc(m, '\t'); if (drv) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 60b31acb7..6e3786f4d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -15,6 +15,7 @@ * use the PowerTweak utility (see http://powertweak.sourceforge.net). */ +#include #include #include #include @@ -23,17 +24,6 @@ #include #include "pci.h" -/* The Mellanox Tavor device gives false positive parity errors - * Mark this device with a broken_parity_status, to allow - * PCI scanning code to "skip" this now blacklisted device. - */ -static void __devinit quirk_mellanox_tavor(struct pci_dev *dev) -{ - dev->broken_parity_status = 1; /* This device gives false positives */ -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor); - /* Deal with broken BIOS'es that neglect to enable passive release, which can cause problems in combination with the 82441FX/PPro MTRRs */ static void __devinit quirk_passive_release(struct pci_dev *dev) @@ -400,7 +390,6 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev) piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20); } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi ); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi ); /* * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at @@ -667,7 +656,6 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_vi DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq); -DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); @@ -891,30 +879,27 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_e * when a PCI-Soundcard is added. The BIOS only gives Options * "Disabled" and "AUTO". This Quirk Sets the corresponding * Register-Value to enable the Soundcard. - * - * FIXME: Presently this quirk will run on anything that has an 8237 - * which isn't correct, we need to check DMI tables or something in - * order to make sure it only runs on the MSI-K8T-Neo2Fir. Because it - * runs everywhere at present we suppress the printk output in most - * irrelevant cases. */ static void __init k8t_sound_hostbridge(struct pci_dev *dev) { unsigned char val; + printk(KERN_INFO "PCI: Quirk-MSI-K8T Soundcard On\n"); pci_read_config_byte(dev, 0x50, &val); if (val == 0x88 || val == 0xc8) { - /* Assume it's probably a MSI-K8T-Neo2Fir */ - printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, attempting to turn soundcard ON\n"); pci_write_config_byte(dev, 0x50, val & (~0x40)); /* Verify the Change for Status output */ pci_read_config_byte(dev, 0x50, &val); if (val & 0x40) - printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, soundcard still off\n"); + printk(KERN_INFO "PCI: MSI-K8T soundcard still off\n"); else - printk(KERN_INFO "PCI: MSI-K8T-Neo2Fir, soundcard on\n"); + printk(KERN_INFO "PCI: MSI-K8T soundcard on\n"); + } else { + printk(KERN_INFO "PCI: Unexpected Value in PCI-Register: " + "no Change!\n"); } + } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge); @@ -965,11 +950,6 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) case 0x8070: /* P4G8X Deluxe */ asus_hides_smbus = 1; } - if (dev->device == PCI_DEVICE_ID_INTEL_E7501_MCH) - switch (dev->subsystem_device) { - case 0x80c9: /* PU-DLS */ - asus_hides_smbus = 1; - } if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) switch (dev->subsystem_device) { case 0x1751: /* M2N notebook */ @@ -1038,7 +1018,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82845G_HB, asu DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82850_HB, asus_hides_smbus_hostbridge ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82865_HB, asus_hides_smbus_hostbridge ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_7205_0, asus_hides_smbus_hostbridge ); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7501_MCH, asus_hides_smbus_hostbridge ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge ); @@ -1062,7 +1041,6 @@ static void __init asus_hides_smbus_lpc(struct pci_dev *dev) } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, asus_hides_smbus_lpc ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asus_hides_smbus_lpc ); -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, asus_hides_smbus_lpc ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); @@ -1183,55 +1161,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_962, quirk_sis_96x_ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_963, quirk_sis_96x_smbus ); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC, quirk_sis_96x_smbus ); -#if defined(CONFIG_SCSI_SATA) || defined(CONFIG_SCSI_SATA_MODULE) - -/* - * If we are using libata we can drive this chip properly but must - * do this early on to make the additional device appear during - * the PCI scanning. - */ - -static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev) -{ - u32 conf; - u8 hdr; - - /* Only poke fn 0 */ - if (PCI_FUNC(pdev->devfn)) - return; - - switch(pdev->device) { - case PCI_DEVICE_ID_JMICRON_JMB365: - case PCI_DEVICE_ID_JMICRON_JMB366: - /* Redirect IDE second PATA port to the right spot */ - pci_read_config_dword(pdev, 0x80, &conf); - conf |= (1 << 24); - /* Fall through */ - pci_write_config_dword(pdev, 0x80, conf); - case PCI_DEVICE_ID_JMICRON_JMB361: - case PCI_DEVICE_ID_JMICRON_JMB363: - pci_read_config_dword(pdev, 0x40, &conf); - /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ - /* Set the class codes correctly and then direct IDE 0 */ - conf &= ~0x000F0200; /* Clear bit 9 and 16-19 */ - conf |= 0x00C20002; /* Set bit 1, 17, 22, 23 */ - pci_write_config_dword(pdev, 0x40, conf); - - /* Reconfigure so that the PCI scanner discovers the - device is now multifunction */ - - pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr); - pdev->hdr_type = hdr & 0x7f; - pdev->multifunction = !!(hdr & 0x80); - - break; - } -} - -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn); - -#endif - #ifdef CONFIG_X86_IO_APIC static void __init quirk_alder_ioapic(struct pci_dev *pdev) { @@ -1399,37 +1328,6 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0, quirk_pc DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh); -/* - * Some Intel PCI Express chipsets have trouble with downstream - * device power management. - */ -static void quirk_intel_pcie_pm(struct pci_dev * dev) -{ - pci_pm_d3_delay = 120; - dev->no_d1d2 = 1; -} - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e2, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e3, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e4, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e5, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e6, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25e7, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f7, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f8, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25f9, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x25fa, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2601, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2602, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2603, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2604, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2605, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2606, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2607, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2608, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2609, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); /* * Fixup the cardbus bridges on the IBM Dock II docking station @@ -1492,63 +1390,6 @@ static void __devinit quirk_netmos(struct pci_dev *dev) } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); -static void __devinit quirk_e100_interrupt(struct pci_dev *dev) -{ - u16 command; - u32 bar; - u8 __iomem *csr; - u8 cmd_hi; - - switch (dev->device) { - /* PCI IDs taken from drivers/net/e100.c */ - case 0x1029: - case 0x1030 ... 0x1034: - case 0x1038 ... 0x103E: - case 0x1050 ... 0x1057: - case 0x1059: - case 0x1064 ... 0x106B: - case 0x1091 ... 0x1095: - case 0x1209: - case 0x1229: - case 0x2449: - case 0x2459: - case 0x245D: - case 0x27DC: - break; - default: - return; - } - - /* - * Some firmware hands off the e100 with interrupts enabled, - * which can cause a flood of interrupts if packets are - * received before the driver attaches to the device. So - * disable all e100 interrupts here. The driver will - * re-enable them when it's ready. - */ - pci_read_config_word(dev, PCI_COMMAND, &command); - pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar); - - if (!(command & PCI_COMMAND_MEMORY) || !bar) - return; - - csr = ioremap(bar, 8); - if (!csr) { - printk(KERN_WARNING "PCI: Can't map %s e100 registers\n", - pci_name(dev)); - return; - } - - cmd_hi = readb(csr + 3); - if (cmd_hi == 0) { - printk(KERN_WARNING "PCI: Firmware left %s e100 interrupts " - "enabled, disabling\n", pci_name(dev)); - writeb(1, csr + 3); - } - - iounmap(csr); -} -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt); static void __devinit fixup_rev1_53c810(struct pci_dev* dev) { @@ -1644,25 +1485,6 @@ static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1460, quirk_p64h2_1k_io); -/* Under some circumstances, AER is not linked with extended capabilities. - * Force it to be linked by setting the corresponding control bit in the - * config space. - */ -static void __devinit quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev) -{ - uint8_t b; - if (pci_read_config_byte(dev, 0xf41, &b) == 0) { - if (!(b & 0x20)) { - pci_write_config_byte(dev, 0xf41, b | 0x20); - printk(KERN_INFO - "PCI: Linking AER extended capability on %s\n", - pci_name(dev)); - } - } -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, - quirk_nvidia_ck804_pcie_aer_ext_cap); - EXPORT_SYMBOL(pcie_mch_quirk); #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pci_fixup_device); diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 99ffbd478..1a6bf9de1 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -22,18 +22,18 @@ static void pci_destroy_dev(struct pci_dev *dev) pci_proc_detach_device(dev); pci_remove_sysfs_dev_files(dev); device_unregister(&dev->dev); - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_del(&dev->global_list); dev->global_list.next = dev->global_list.prev = NULL; - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); } /* Remove the device from the device lists, and prevent any further * list accesses from this device */ - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_del(&dev->bus_list); dev->bus_list.next = dev->bus_list.prev = NULL; - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); pci_free_resources(dev); pci_dev_put(dev); @@ -62,9 +62,9 @@ void pci_remove_bus(struct pci_bus *pci_bus) { pci_proc_detach_bus(pci_bus); - down_write(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_del(&pci_bus->node); - up_write(&pci_bus_sem); + spin_unlock(&pci_bus_lock); pci_remove_legacy_files(pci_bus); class_device_remove_file(&pci_bus->class_dev, &class_device_attr_cpuaffinity); diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index f5ee7ce16..598a115cd 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c @@ -6,6 +6,7 @@ * * PCI ROM access routines */ +#include #include #include #include @@ -79,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) } else { if (res->flags & IORESOURCE_ROM_COPY) { *size = pci_resource_len(pdev, PCI_ROM_RESOURCE); - return (void __iomem *)(unsigned long) - pci_resource_start(pdev, PCI_ROM_RESOURCE); + return (void __iomem *)pci_resource_start(pdev, + PCI_ROM_RESOURCE); } else { /* assign the ROM an address if it doesn't have one */ if (res->parent == NULL && @@ -169,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pci_dev *pdev, size_t *size) return rom; res->end = res->start + *size; - memcpy_fromio((void*)(unsigned long)res->start, rom, *size); + memcpy_fromio((void*)res->start, rom, *size); pci_unmap_rom(pdev, rom); res->flags |= IORESOURCE_ROM_COPY; - return (void __iomem *)(unsigned long)res->start; + return (void __iomem *)res->start; } /** @@ -226,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pdev) { struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; if (res->flags & IORESOURCE_ROM_COPY) { - kfree((void*)(unsigned long)res->start); + kfree((void*)res->start); res->flags &= ~IORESOURCE_ROM_COPY; res->start = 0; res->end = 0; diff --git a/drivers/pci/search.c b/drivers/pci/search.c index d529462d1..ce7dd6e7b 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -13,7 +13,7 @@ #include #include "pci.h" -DECLARE_RWSEM(pci_bus_sem); +DEFINE_SPINLOCK(pci_bus_lock); static struct pci_bus * __devinit pci_do_find_bus(struct pci_bus* bus, unsigned char busnr) @@ -41,7 +41,7 @@ pci_do_find_bus(struct pci_bus* bus, unsigned char busnr) * in the global list of PCI buses. If the bus is found, a pointer to its * data structure is returned. If no bus is found, %NULL is returned. */ -struct pci_bus * pci_find_bus(int domain, int busnr) +struct pci_bus * __devinit pci_find_bus(int domain, int busnr) { struct pci_bus *bus = NULL; struct pci_bus *tmp_bus; @@ -61,7 +61,7 @@ struct pci_bus * pci_find_bus(int domain, int busnr) * @from: Previous PCI bus found, or %NULL for new search. * * Iterates through the list of known PCI busses. A new search is - * initiated by passing %NULL as the @from argument. Otherwise if + * initiated by passing %NULL to the @from argument. Otherwise if * @from is not %NULL, searches continue from next device on the * global list. */ @@ -72,11 +72,11 @@ pci_find_next_bus(const struct pci_bus *from) struct pci_bus *b = NULL; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); n = from ? from->node.next : pci_root_buses.next; if (n != &pci_root_buses) b = pci_bus_b(n); - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); return b; } @@ -124,7 +124,7 @@ struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn) struct pci_dev *dev; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); list_for_each(tmp, &bus->devices) { dev = pci_dev_b(tmp); @@ -135,7 +135,7 @@ struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn) dev = NULL; out: pci_dev_get(dev); - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); return dev; } @@ -148,14 +148,13 @@ struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn) * @from: Previous PCI device found in search, or %NULL for new search. * * Iterates through the list of known PCI devices. If a PCI device is - * found with a matching @vendor, @device, @ss_vendor and @ss_device, a - * pointer to its device structure is returned. Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL as the @from argument. - * Otherwise if @from is not %NULL, searches continue from next device - * on the global list. + * found with a matching @vendor, @device, @ss_vendor and @ss_device, a pointer to its + * device structure is returned. Otherwise, %NULL is returned. + * A new search is initiated by passing %NULL to the @from argument. + * Otherwise if @from is not %NULL, searches continue from next device on the global list. * - * NOTE: Do not use this function any more; use pci_get_subsys() instead, as - * the PCI device returned by this function can disappear at any moment in + * NOTE: Do not use this function anymore, use pci_get_subsys() instead, as + * the pci device returned by this function can disappear at any moment in * time. */ static struct pci_dev * pci_find_subsys(unsigned int vendor, @@ -168,7 +167,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor, struct pci_dev *dev; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); n = from ? from->global_list.next : pci_devices.next; while (n && (n != &pci_devices)) { @@ -182,7 +181,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor, } dev = NULL; exit: - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); return dev; } @@ -192,15 +191,14 @@ exit: * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids * @from: Previous PCI device found in search, or %NULL for new search. * - * Iterates through the list of known PCI devices. If a PCI device is found - * with a matching @vendor and @device, a pointer to its device structure is + * Iterates through the list of known PCI devices. If a PCI device is + * found with a matching @vendor and @device, a pointer to its device structure is * returned. Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL as the @from argument. - * Otherwise if @from is not %NULL, searches continue from next device - * on the global list. + * A new search is initiated by passing %NULL to the @from argument. + * Otherwise if @from is not %NULL, searches continue from next device on the global list. * - * NOTE: Do not use this function any more; use pci_get_device() instead, as - * the PCI device returned by this function can disappear at any moment in + * NOTE: Do not use this function anymore, use pci_get_device() instead, as + * the pci device returned by this function can disappear at any moment in * time. */ struct pci_dev * @@ -217,11 +215,11 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev * * @ss_device: PCI subsystem device id to match, or %PCI_ANY_ID to match all device ids * @from: Previous PCI device found in search, or %NULL for new search. * - * Iterates through the list of known PCI devices. If a PCI device is found - * with a matching @vendor, @device, @ss_vendor and @ss_device, a pointer to its + * Iterates through the list of known PCI devices. If a PCI device is + * found with a matching @vendor, @device, @ss_vendor and @ss_device, a pointer to its * device structure is returned, and the reference count to the device is * incremented. Otherwise, %NULL is returned. A new search is initiated by - * passing %NULL as the @from argument. Otherwise if @from is not %NULL, + * passing %NULL to the @from argument. Otherwise if @from is not %NULL, * searches continue from next device on the global list. * The reference count for @from is always decremented if it is not %NULL. */ @@ -234,7 +232,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device, struct pci_dev *dev; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); n = from ? from->global_list.next : pci_devices.next; while (n && (n != &pci_devices)) { @@ -249,7 +247,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device, dev = NULL; exit: dev = pci_dev_get(dev); - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); pci_dev_put(from); return dev; } @@ -264,7 +262,7 @@ exit: * found with a matching @vendor and @device, the reference count to the * device is incremented and a pointer to its device structure is returned. * Otherwise, %NULL is returned. A new search is initiated by passing %NULL - * as the @from argument. Otherwise if @from is not %NULL, searches continue + * to the @from argument. Otherwise if @from is not %NULL, searches continue * from next device on the global list. The reference count for @from is * always decremented if it is not %NULL. */ @@ -281,13 +279,11 @@ pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from) * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids * @from: Previous PCI device found in search, or %NULL for new search. * - * Iterates through the list of known PCI devices in the reverse order of - * pci_find_device(). + * Iterates through the list of known PCI devices in the reverse order of pci_find_device(). * If a PCI device is found with a matching @vendor and @device, a pointer to * its device structure is returned. Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL as the @from argument. - * Otherwise if @from is not %NULL, searches continue from previous device - * on the global list. + * A new search is initiated by passing %NULL to the @from argument. + * Otherwise if @from is not %NULL, searches continue from previous device on the global list. */ struct pci_dev * pci_find_device_reverse(unsigned int vendor, unsigned int device, const struct pci_dev *from) @@ -296,7 +292,7 @@ pci_find_device_reverse(unsigned int vendor, unsigned int device, const struct p struct pci_dev *dev; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); n = from ? from->global_list.prev : pci_devices.prev; while (n && (n != &pci_devices)) { @@ -308,7 +304,7 @@ pci_find_device_reverse(unsigned int vendor, unsigned int device, const struct p } dev = NULL; exit: - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); return dev; } @@ -321,7 +317,7 @@ exit: * found with a matching @class, the reference count to the device is * incremented and a pointer to its device structure is returned. * Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL as the @from argument. + * A new search is initiated by passing %NULL to the @from argument. * Otherwise if @from is not %NULL, searches continue from next device * on the global list. The reference count for @from is always decremented * if it is not %NULL. @@ -332,7 +328,7 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) struct pci_dev *dev; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); n = from ? from->global_list.next : pci_devices.next; while (n && (n != &pci_devices)) { @@ -344,7 +340,7 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) dev = NULL; exit: dev = pci_dev_get(dev); - up_read(&pci_bus_sem); + spin_unlock(&pci_bus_lock); pci_dev_put(from); return dev; } @@ -366,7 +362,7 @@ int pci_dev_present(const struct pci_device_id *ids) int found = 0; WARN_ON(in_interrupt()); - down_read(&pci_bus_sem); + spin_lock(&pci_bus_lock); while (ids->vendor || ids->subvendor || ids->class_mask) { list_for_each_entry(dev, &pci_devices, global_list) { if (pci_match_one_device(ids, dev)) { @@ -376,8 +372,8 @@ int pci_dev_present(const struct pci_device_id *ids) } ids++; } -exit: - up_read(&pci_bus_sem); +exit: + spin_unlock(&pci_bus_lock); return found; } EXPORT_SYMBOL(pci_dev_present); diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 47c1071ad..28ce3a7ee 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -55,10 +55,9 @@ pbus_assign_resources_sorted(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { u16 class = dev->class >> 8; - /* Don't touch classless devices or host bridges or ioapics. */ + /* Don't touch classless devices and host bridges. */ if (class == PCI_CLASS_NOT_DEFINED || - class == PCI_CLASS_BRIDGE_HOST || - class == PCI_CLASS_SYSTEM_PIC) + class == PCI_CLASS_BRIDGE_HOST) continue; pdev_sort_resources(dev, &head); @@ -357,10 +356,8 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type) order = __ffs(align) - 20; if (order > 11) { printk(KERN_WARNING "PCI: region %s/%d " - "too large: %llx-%llx\n", - pci_name(dev), i, - (unsigned long long)r->start, - (unsigned long long)r->end); + "too large: %lx-%lx\n", + pci_name(dev), i, r->start, r->end); r->flags = 0; continue; } diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 38eade924..ea9277b7f 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -40,9 +40,8 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) pcibios_resource_to_bus(dev, ®ion, res); - pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " - "BAR %d of %s\n", (unsigned long long)res->start, - (unsigned long long)res->end, + pr_debug(" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " + "BAR %d of %s\n", res->start, res->end, region.start, region.end, res->flags, resno, pci_name(dev)); new = region.start | (res->flags & PCI_REGION_FLAG_MASK); @@ -105,12 +104,10 @@ pci_claim_resource(struct pci_dev *dev, int resource) err = insert_resource(root, res); if (err) { - printk(KERN_ERR "PCI: %s region %d of %s %s [%llx:%llx]\n", - root ? "Address space collision on" : - "No parent found for", - resource, dtype, pci_name(dev), - (unsigned long long)res->start, - (unsigned long long)res->end); + printk(KERN_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; @@ -121,7 +118,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) { struct pci_bus *bus = dev->bus; struct resource *res = dev->resource + resno; - resource_size_t size, min, align; + unsigned long size, min, align; int ret; size = res->end - res->start + 1; @@ -148,11 +145,9 @@ int pci_assign_resource(struct pci_dev *dev, int resno) } if (ret) { - printk(KERN_DEBUG "PCI: Failed to allocate %s resource " - "#%d:%llx@%llx for %s\n", - res->flags & IORESOURCE_IO ? "I/O" : "mem", - resno, (unsigned long long)size, - (unsigned long long)res->start, pci_name(dev)); + printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n", + res->flags & IORESOURCE_IO ? "I/O" : "mem", + resno, size, res->start, pci_name(dev)); } else if (resno < PCI_BRIDGE_RESOURCES) { pci_update_resource(dev, res, resno); } @@ -160,46 +155,6 @@ int pci_assign_resource(struct pci_dev *dev, int resno) return ret; } -#ifdef CONFIG_EMBEDDED -int pci_assign_resource_fixed(struct pci_dev *dev, int resno) -{ - struct pci_bus *bus = dev->bus; - struct resource *res = dev->resource + resno; - unsigned int type_mask; - int i, ret = -EBUSY; - - type_mask = IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH; - - for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { - struct resource *r = bus->resource[i]; - if (!r) - continue; - - /* type_mask must match */ - if ((res->flags ^ r->flags) & type_mask) - continue; - - ret = request_resource(r, res); - - if (ret == 0) - break; - } - - if (ret) { - printk(KERN_DEBUG "PCI: Failed to allocate %s resource " - "#%d:%llx@%llx for %s\n", - res->flags & IORESOURCE_IO ? "I/O" : "mem", - resno, (unsigned long long)(res->end - res->start + 1), - (unsigned long long)res->start, pci_name(dev)); - } else if (resno < PCI_BRIDGE_RESOURCES) { - pci_update_resource(dev, res, resno); - } - - return ret; -} -EXPORT_SYMBOL_GPL(pci_assign_resource_fixed); -#endif - /* Sort resources by alignment */ void __devinit pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) @@ -209,7 +164,7 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) for (i = 0; i < PCI_NUM_RESOURCES; i++) { struct resource *r; struct resource_list *list, *tmp; - resource_size_t r_align; + unsigned long r_align; r = &dev->resource[i]; r_align = r->end - r->start; @@ -218,14 +173,13 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) continue; if (!r_align) { printk(KERN_WARNING "PCI: Ignore bogus resource %d " - "[%llx:%llx] of %s\n", - i, (unsigned long long)r->start, - (unsigned long long)r->end, pci_name(dev)); + "[%lx:%lx] of %s\n", + i, r->start, r->end, pci_name(dev)); continue; } r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start; for (list = head; ; list = list->next) { - resource_size_t align = 0; + unsigned long align = 0; struct resource_list *ln = list->next; int idx; diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 35f88649d..61cb4b29f 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -6,7 +6,7 @@ menu "PCCARD (PCMCIA/CardBus) support" config PCCARD tristate "PCCard (PCMCIA/CardBus) support" - depends on HOTPLUG + select HOTPLUG ---help--- Say Y here if you want to attach PCMCIA- or PC-cards to your Linux computer. These are credit-card size devices such as network cards, diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 40569f40e..a4d50940e 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -214,10 +214,11 @@ static struct pccard_operations at91_cf_ops = { /*--------------------------------------------------------------------------*/ -static int __init at91_cf_probe(struct platform_device *pdev) +static int __init at91_cf_probe(struct device *dev) { struct at91_cf_socket *cf; - struct at91_cf_data *board = pdev->dev.platform_data; + struct at91_cf_data *board = dev->platform_data; + struct platform_device *pdev = to_platform_device(dev); struct resource *io; unsigned int csa; int status; @@ -235,7 +236,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) cf->board = board; cf->pdev = pdev; - platform_set_drvdata(pdev, cf); + dev_set_drvdata(dev, cf); /* CF takes over CS4, CS5, CS6 */ csa = at91_sys_read(AT91_EBI_CSA); @@ -267,10 +268,9 @@ static int __init at91_cf_probe(struct platform_device *pdev) /* must be a GPIO; ergo must trigger on both edges */ status = request_irq(board->det_pin, at91_cf_irq, - IRQF_SAMPLE_RANDOM, driver_name, cf); + SA_SAMPLE_RANDOM, driver_name, cf); if (status < 0) goto fail0; - device_init_wakeup(&pdev->dev, 1); /* * The card driver will request this irq later as needed. @@ -280,7 +280,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) */ if (board->irq_pin) { status = request_irq(board->irq_pin, at91_cf_irq, - IRQF_SHARED, driver_name, cf); + SA_SHIRQ, driver_name, cf); if (status < 0) goto fail0a; cf->socket.pci_irq = board->irq_pin; @@ -301,7 +301,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) board->det_pin, board->irq_pin); cf->socket.owner = THIS_MODULE; - cf->socket.dev.dev = &pdev->dev; + cf->socket.dev.dev = dev; cf->socket.ops = &at91_cf_ops; cf->socket.resource_ops = &pccard_static_ops; cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP @@ -323,25 +323,21 @@ fail1: free_irq(board->irq_pin, cf); fail0a: free_irq(board->det_pin, cf); - device_init_wakeup(&pdev->dev, 0); fail0: at91_sys_write(AT91_EBI_CSA, csa); kfree(cf); return status; } -static int __exit at91_cf_remove(struct platform_device *pdev) +static int __exit at91_cf_remove(struct device *dev) { - struct at91_cf_socket *cf = platform_get_drvdata(pdev); - struct at91_cf_data *board = cf->board; + struct at91_cf_socket *cf = dev_get_drvdata(dev); struct resource *io = cf->socket.io[0].res; unsigned int csa; pcmcia_unregister_socket(&cf->socket); - if (board->irq_pin) - free_irq(board->irq_pin, cf); - free_irq(board->det_pin, cf); - device_init_wakeup(&pdev->dev, 0); + free_irq(cf->board->irq_pin, cf); + free_irq(cf->board->det_pin, cf); iounmap((void __iomem *) cf->socket.io_offset); release_mem_region(io->start, io->end + 1 - io->start); @@ -352,65 +348,26 @@ static int __exit at91_cf_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM - -static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) -{ - struct at91_cf_socket *cf = platform_get_drvdata(pdev); - struct at91_cf_data *board = cf->board; - - pcmcia_socket_dev_suspend(&pdev->dev, mesg); - if (device_may_wakeup(&pdev->dev)) - enable_irq_wake(board->det_pin); - else { - disable_irq_wake(board->det_pin); - disable_irq(board->det_pin); - } - if (board->irq_pin) - disable_irq(board->irq_pin); - return 0; -} - -static int at91_cf_resume(struct platform_device *pdev) -{ - struct at91_cf_socket *cf = platform_get_drvdata(pdev); - struct at91_cf_data *board = cf->board; - - if (board->irq_pin) - enable_irq(board->irq_pin); - if (!device_may_wakeup(&pdev->dev)) - enable_irq(board->det_pin); - pcmcia_socket_dev_resume(&pdev->dev); - return 0; -} - -#else -#define at91_cf_suspend NULL -#define at91_cf_resume NULL -#endif - -static struct platform_driver at91_cf_driver = { - .driver = { - .name = (char *) driver_name, - .owner = THIS_MODULE, - }, +static struct device_driver at91_cf_driver = { + .name = (char *) driver_name, + .bus = &platform_bus_type, .probe = at91_cf_probe, .remove = __exit_p(at91_cf_remove), - .suspend = at91_cf_suspend, - .resume = at91_cf_resume, + .suspend = pcmcia_socket_dev_suspend, + .resume = pcmcia_socket_dev_resume, }; /*--------------------------------------------------------------------------*/ static int __init at91_cf_init(void) { - return platform_driver_register(&at91_cf_driver); + return driver_register(&at91_cf_driver); } module_init(at91_cf_init); static void __exit at91_cf_exit(void) { - platform_driver_unregister(&at91_cf_driver); + driver_unregister(&at91_cf_driver); } module_exit(at91_cf_exit); diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c index 74e051535..abc13f28b 100644 --- a/drivers/pcmcia/au1000_db1x00.c +++ b/drivers/pcmcia/au1000_db1x00.c @@ -30,6 +30,7 @@ * */ +#include #include #include #include @@ -295,7 +296,7 @@ struct pcmcia_low_level db1x00_pcmcia_ops = { .socket_suspend = db1x00_socket_suspend }; -int au1x_board_init(struct device *dev) +int __init au1x_board_init(struct device *dev) { int ret = -ENODEV; bcsr->pcmcia = 0; /* turn off power, if it's not already off */ diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index d5dd0ce65..971a35281 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h index 1e467bb54..f2c970b5f 100644 --- a/drivers/pcmcia/au1000_generic.h +++ b/drivers/pcmcia/au1000_generic.h @@ -22,6 +22,7 @@ #define __ASM_AU1000_PCMCIA_H /* include the world */ +#include #include #include diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c index 86c0808d6..fd5522ede 100644 --- a/drivers/pcmcia/au1000_pb1x00.c +++ b/drivers/pcmcia/au1000_pb1x00.c @@ -21,6 +21,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ +#include #include #include #include diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index f9cd831a3..316299857 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -177,7 +176,6 @@ static int pccardd(void *__skt); */ int pcmcia_register_socket(struct pcmcia_socket *socket) { - struct task_struct *tsk; int ret; if (!socket || !socket->ops || !socket->dev.dev || !socket->resource_ops) @@ -241,18 +239,15 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) mutex_init(&socket->skt_mutex); spin_lock_init(&socket->thread_lock); - tsk = kthread_run(pccardd, socket, "pccardd"); - if (IS_ERR(tsk)) { - ret = PTR_ERR(tsk); + ret = kernel_thread(pccardd, socket, CLONE_KERNEL); + if (ret < 0) goto err; - } wait_for_completion(&socket->thread_done); - if (!socket->thread) { + if(!socket->thread) { printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); return -EIO; } - pcmcia_parse_events(socket, SS_DETECT); return 0; @@ -277,8 +272,10 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket) cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); if (socket->thread) { + init_completion(&socket->thread_done); + socket->thread = NULL; wake_up(&socket->thread_wait); - kthread_stop(socket->thread); + wait_for_completion(&socket->thread_done); } release_cis_mem(socket); @@ -633,6 +630,8 @@ static int pccardd(void *__skt) DECLARE_WAITQUEUE(wait, current); int ret; + daemonize("pccardd"); + skt->thread = current; skt->socket = dead_socket; skt->ops->init(skt); @@ -644,8 +643,7 @@ static int pccardd(void *__skt) printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", skt); skt->thread = NULL; - complete(&skt->thread_done); - return 0; + complete_and_exit(&skt->thread_done, 0); } add_wait_queue(&skt->thread_wait, &wait); @@ -676,7 +674,7 @@ static int pccardd(void *__skt) continue; } - if (kthread_should_stop()) + if (!skt->thread) break; schedule(); @@ -690,7 +688,7 @@ static int pccardd(void *__skt) /* remove from the device core */ class_device_unregister(&skt->dev); - return 0; + complete_and_exit(&skt->thread_done, 0); } /* @@ -699,12 +697,11 @@ static int pccardd(void *__skt) */ void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) { - unsigned long flags; cs_dbg(s, 4, "parse_events: events %08x\n", events); if (s->thread) { - spin_lock_irqsave(&s->thread_lock, flags); + spin_lock(&s->thread_lock); s->thread_events |= events; - spin_unlock_irqrestore(&s->thread_lock, flags); + spin_unlock(&s->thread_lock); wake_up(&s->thread_wait); } diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 95d5e880f..74b3124e8 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -1264,11 +1264,6 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev, socket->pcmcia_state.dead = 1; pccard_register_pcmcia(socket, NULL); - /* unregister any unbound devices */ - mutex_lock(&socket->skt_mutex); - pcmcia_card_remove(socket, NULL); - mutex_unlock(&socket->skt_mutex); - pcmcia_put_socket(socket); return; diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c index ad02629c8..b39435bbf 100644 --- a/drivers/pcmcia/hd64465_ss.c +++ b/drivers/pcmcia/hd64465_ss.c @@ -244,8 +244,8 @@ static void hs_map_irq(hs_socket_t *sp, unsigned int irq) hs_mapped_irq[irq].sock = sp; /* insert ourselves as the irq controller */ - hs_mapped_irq[irq].old_handler = irq_desc[irq].chip; - irq_desc[irq].chip = &hd64465_ss_irq_type; + hs_mapped_irq[irq].old_handler = irq_desc[irq].handler; + irq_desc[irq].handler = &hd64465_ss_irq_type; } @@ -260,7 +260,7 @@ static void hs_unmap_irq(hs_socket_t *sp, unsigned int irq) return; /* restore the original irq controller */ - irq_desc[irq].chip = hs_mapped_irq[irq].old_handler; + irq_desc[irq].handler = hs_mapped_irq[irq].old_handler; } /*============================================================*/ @@ -761,7 +761,7 @@ static int hs_init_socket(hs_socket_t *sp, int irq, unsigned long mem_base, hd64465_register_irq_demux(sp->irq, hs_irq_demux, sp); - if ((err = request_irq(sp->irq, hs_interrupt, IRQF_DISABLED, MODNAME, sp)) < 0) + if ((err = request_irq(sp->irq, hs_interrupt, SA_INTERRUPT, MODNAME, sp)) < 0) return err; if (request_mem_region(sp->mem_base, sp->mem_length, MODNAME) == 0) { sp->mem_base = 0; diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index 2163aa75a..d5f03a338 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c @@ -149,7 +149,7 @@ static int __devinit i82092aa_pci_probe(struct pci_dev *dev, const struct pci_de /* Register the interrupt handler */ dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq); - if ((ret = request_irq(dev->irq, i82092aa_interrupt, IRQF_SHARED, "i82092aa", i82092aa_interrupt))) { + if ((ret = request_irq(dev->irq, i82092aa_interrupt, SA_SHIRQ, "i82092aa", i82092aa_interrupt))) { printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq); goto err_out_free_res; } diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index 1cc268239..a2f05f485 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -509,7 +509,7 @@ static irqreturn_t i365_count_irq(int irq, void *dev, struct pt_regs *regs) static u_int __init test_irq(u_short sock, int irq) { debug(2, " testing ISA irq %d\n", irq); - if (request_irq(irq, i365_count_irq, IRQF_PROBE_SHARED, "scan", + if (request_irq(irq, i365_count_irq, SA_PROBEIRQ, "scan", i365_count_irq) != 0) return 1; irq_hits = 0; irq_sock = sock; @@ -562,7 +562,7 @@ static u_int __init isa_scan(u_short sock, u_int mask0) } else { /* Fallback: just find interrupts that aren't in use */ for (i = 0; i < 16; i++) - if ((mask0 & (1 << i)) && (_check_irq(i, IRQF_PROBE_SHARED) == 0)) + if ((mask0 & (1 << i)) && (_check_irq(i, SA_PROBEIRQ) == 0)) mask1 |= (1 << i); printk("default"); /* If scan failed, default to polled status */ @@ -726,7 +726,7 @@ static void __init add_pcic(int ns, int type) u_int cs_mask = mask & ((cs_irq) ? (1< 0; cs_irq--) if ((cs_mask & (1 << cs_irq)) && - (_check_irq(cs_irq, IRQF_PROBE_SHARED) == 0)) + (_check_irq(cs_irq, SA_PROBEIRQ) == 0)) break; if (cs_irq) { grab_irq = 1; @@ -1084,10 +1084,9 @@ static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem) u_short base, i; u_char map; - debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#llx-%#llx, " + debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, %#lx-%#lx, " "%#x)\n", sock, mem->map, mem->flags, mem->speed, - (unsigned long long)mem->res->start, - (unsigned long long)mem->res->end, mem->card_start); + mem->res->start, mem->res->end, mem->card_start); map = mem->map; if ((map > 4) || (mem->card_start > 0x3ffffff) || diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 9e768eaef..071cf485e 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index 61d50b562..70d5f0748 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index d0f68ab8f..0e07d9535 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c @@ -157,7 +157,7 @@ MODULE_LICENSE("Dual MPL/GPL"); static int pcmcia_schlvl = PCMCIA_SCHLVL; -static DEFINE_SPINLOCK(events_lock); +static spinlock_t events_lock = SPIN_LOCK_UNLOCKED; #define PCMCIA_SOCKET_KEY_5V 1 @@ -644,7 +644,7 @@ static struct platform_device m8xx_device = { }; static u32 pending_events[PCMCIA_SOCKETS_NO]; -static DEFINE_SPINLOCK(pending_event_lock); +static spinlock_t pending_event_lock = SPIN_LOCK_UNLOCKED; static irqreturn_t m8xx_interrupt(int irq, void *dev, struct pt_regs *regs) { diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 420e10aec..2c23d7584 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -232,7 +232,7 @@ static int __init omap_cf_probe(struct device *dev) dev_set_drvdata(dev, cf); /* this primarily just shuts up irq handling noise */ - status = request_irq(irq, omap_cf_irq, IRQF_SHARED, + status = request_irq(irq, omap_cf_irq, SA_SHIRQ, driver_name, cf); if (status < 0) goto fail0; diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 9ad18e626..738b1ef59 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -601,8 +601,12 @@ static int ds_ioctl(struct inode * inode, struct file * file, ret = CS_BAD_ARGS; else { struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function); - ret = pccard_get_configuration_info(s, p_dev, &buf->config); - pcmcia_put_dev(p_dev); + if (p_dev == NULL) + ret = CS_BAD_ARGS; + else { + ret = pccard_get_configuration_info(s, p_dev, &buf->config); + pcmcia_put_dev(p_dev); + } } break; case DS_GET_FIRST_TUPLE: @@ -632,8 +636,12 @@ static int ds_ioctl(struct inode * inode, struct file * file, ret = CS_BAD_ARGS; else { struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function); - ret = pccard_get_status(s, p_dev, &buf->status); - pcmcia_put_dev(p_dev); + if (p_dev == NULL) + ret = CS_BAD_ARGS; + else { + ret = pccard_get_status(s, p_dev, &buf->status); + pcmcia_put_dev(p_dev); + } } break; case DS_VALIDATE_CIS: diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index c8323399e..3131bb0a0 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -245,17 +245,10 @@ int pccard_get_configuration_info(struct pcmcia_socket *s, return CS_SUCCESS; } - config->Attributes = c->Attributes | CONF_VALID_CLIENT; - config->Vcc = s->socket.Vcc; - config->Vpp1 = config->Vpp2 = s->socket.Vpp; - config->IntType = c->IntType; - config->ConfigBase = c->ConfigBase; - config->Status = c->Status; - config->Pin = c->Pin; - config->Copy = c->Copy; - config->Option = c->Option; - config->ExtStatus = c->ExtStatus; - config->Present = config->CardValues = c->CardValues; + /* !!! This is a hack !!! */ + memcpy(&config->Attributes, &c->Attributes, sizeof(config_t)); + config->Attributes |= CONF_VALID_CLIENT; + config->CardValues = c->CardValues; config->IRQAttributes = c->irq.Attributes; config->AssignedIRQ = s->irq.AssignedIRQ; config->BasePort1 = c->io.BasePort1; @@ -795,7 +788,6 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) struct pcmcia_socket *s = p_dev->socket; config_t *c; int ret = CS_IN_USE, irq = 0; - int type; if (!(s->state & SOCKET_PRESENT)) return CS_NO_CARD; @@ -805,13 +797,6 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) if (c->state & CONFIG_IRQ_REQ) return CS_IN_USE; - /* Decide what type of interrupt we are registering */ - type = 0; - if (s->functions > 1) /* All of this ought to be handled higher up */ - type = IRQF_SHARED; - if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) - type = IRQF_SHARED; - #ifdef CONFIG_PCMCIA_PROBE if (s->irq.AssignedIRQ != 0) { /* If the interrupt is already assigned, it must be the same */ @@ -837,7 +822,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) * marked as used by the kernel resource management core */ ret = request_irq(irq, (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, - type, + ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || + (s->functions > 1) || + (irq == s->pci_irq)) ? SA_SHIRQ : 0, p_dev->devname, (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); if (!ret) { @@ -852,21 +839,18 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) if (ret && !s->irq.AssignedIRQ) { if (!s->pci_irq) return ret; - type = IRQF_SHARED; irq = s->pci_irq; } - if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) { - if (request_irq(irq, req->Handler, type, p_dev->devname, req->Instance)) + if (ret && req->Attributes & IRQ_HANDLE_PRESENT) { + if (request_irq(irq, req->Handler, + ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || + (s->functions > 1) || + (irq == s->pci_irq)) ? SA_SHIRQ : 0, + p_dev->devname, req->Instance)) return CS_IN_USE; } - /* Make sure the fact the request type was overridden is passed back */ - if (type == IRQF_SHARED && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { - req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; - printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); - printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n"); - } c->irq.Attributes = req->Attributes; s->irq.AssignedIRQ = req->AssignedIRQ = irq; s->irq.Config++; diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 22c5e7427..247ab837f 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c @@ -642,8 +642,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, goto err_out_free_mem; printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " - "at 0x%llx on irq %d\n", - (unsigned long long)pci_resource_start(dev, 0), dev->irq); + "at 0x%lx on irq %d\n", pci_resource_start(dev, 0), dev->irq); /* * Since we have no memory BARs some firmware may not * have had PCI_COMMAND_MEMORY enabled, yet the device needs it. @@ -689,7 +688,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, pci_set_drvdata(dev, socket); if (irq_mode == 1) { /* Register the interrupt handler */ - if ((ret = request_irq(dev->irq, pd6729_interrupt, IRQF_SHARED, + if ((ret = request_irq(dev->irq, pd6729_interrupt, SA_SHIRQ, "pd6729", socket))) { printk(KERN_ERR "pd6729: Failed to register irq %d, " "aborting\n", dev->irq); diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index b3518131e..7fa18fb81 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index c3176b16b..0f8b157c9 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex); ======================================================================*/ static struct resource * -make_resource(resource_size_t b, resource_size_t n, int flags, char *name) +make_resource(unsigned long b, unsigned long n, int flags, char *name) { struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); @@ -86,8 +86,8 @@ make_resource(resource_size_t b, resource_size_t n, int flags, char *name) } static struct resource * -claim_region(struct pcmcia_socket *s, resource_size_t base, - resource_size_t size, int type, char *name) +claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size, + int type, char *name) { struct resource *res, *parent; @@ -519,10 +519,10 @@ struct pcmcia_align_data { static void pcmcia_common_align(void *align_data, struct resource *res, - resource_size_t size, resource_size_t align) + unsigned long size, unsigned long align) { struct pcmcia_align_data *data = align_data; - resource_size_t start; + unsigned long start; /* * Ensure that we have the correct start address */ @@ -533,8 +533,8 @@ pcmcia_common_align(void *align_data, struct resource *res, } static void -pcmcia_align(void *align_data, struct resource *res, resource_size_t size, - resource_size_t align) +pcmcia_align(void *align_data, struct resource *res, + unsigned long size, unsigned long align) { struct pcmcia_align_data *data = align_data; struct resource_map *m; @@ -808,10 +808,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) if (res->flags & IORESOURCE_IO) { if (res == &ioport_resource) continue; - printk(KERN_INFO "pcmcia: parent PCI bridge I/O " - "window: 0x%llx - 0x%llx\n", - (unsigned long long)res->start, - (unsigned long long)res->end); + printk(KERN_INFO "pcmcia: parent PCI bridge I/O window: 0x%lx - 0x%lx\n", + res->start, res->end); if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end)) done |= IORESOURCE_IO; @@ -820,10 +818,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) if (res->flags & IORESOURCE_MEM) { if (res == &iomem_resource) continue; - printk(KERN_INFO "pcmcia: parent PCI bridge Memory " - "window: 0x%llx - 0x%llx\n", - (unsigned long long)res->start, - (unsigned long long)res->end); + printk(KERN_INFO "pcmcia: parent PCI bridge Memory window: 0x%lx - 0x%lx\n", + res->start, res->end); if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end)) done |= IORESOURCE_MEM; } diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c index 19b1e1276..c6b262b65 100644 --- a/drivers/pcmcia/sa1100_badge4.c +++ b/drivers/pcmcia/sa1100_badge4.c @@ -128,8 +128,8 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state static struct pcmcia_low_level badge4_pcmcia_ops = { .owner = THIS_MODULE, - .hw_init = sa1111_pcmcia_hw_init, - .hw_shutdown = sa1111_pcmcia_hw_shutdown, + .init = sa1111_pcmcia_hw_init, + .shutdown = sa1111_pcmcia_hw_shutdown, .socket_state = sa1111_pcmcia_socket_state, .configure_socket = badge4_pcmcia_configure_socket, diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index c5b2a44b4..6d441ec75 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 658cddfbc..81ded52c8 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -5,6 +5,7 @@ * basically means we handle everything except controlling the * power. Power is machine specific... */ +#include #include #include #include diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index 31a7abc55..59c5d968e 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index ecaa132fa..ea7d9ca16 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -31,6 +31,7 @@ ======================================================================*/ +#include #include #include #include @@ -38,12 +39,12 @@ #include #include #include -#include #include #include #include #include +#include #include #include "soc_common.h" @@ -523,7 +524,7 @@ int soc_pcmcia_request_irqs(struct soc_pcmcia_socket *skt, if (irqs[i].sock != skt->nr) continue; res = request_irq(irqs[i].irq, soc_common_pcmcia_interrupt, - IRQF_DISABLED, irqs[i].str, skt); + SA_INTERRUPT, irqs[i].str, skt); if (res) break; set_irq_type(irqs[i].irq, IRQT_NOEDGE); diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index 65a606716..73bad1d5c 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c @@ -756,9 +756,8 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m u_long base, len, mmap; debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, " - "%#llx-%#llx, %#x)\n", psock, mem->map, mem->flags, - mem->speed, (unsigned long long)mem->res->start, - (unsigned long long)mem->res->end, mem->card_start); + "%#lx-%#lx, %#x)\n", psock, mem->map, mem->flags, + mem->speed, mem->res->start, mem->res->end, mem->card_start); if ((mem->map > 3) || (mem->card_start > 0x3ffffff) || (mem->res->start > 0xffffff) || (mem->res->end > 0xffffff) || (mem->res->start > mem->res->end) || (mem->speed > 1000)) diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h index 62e9ebf96..7a3d1b8e1 100644 --- a/drivers/pcmcia/ti113x.h +++ b/drivers/pcmcia/ti113x.h @@ -647,7 +647,6 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket) */ break; - case PCI_DEVICE_ID_TI_XX12: case PCI_DEVICE_ID_TI_X515: case PCI_DEVICE_ID_TI_X420: case PCI_DEVICE_ID_TI_X620: diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c index e076a13db..459e6e194 100644 --- a/drivers/pcmcia/vrc4171_card.c +++ b/drivers/pcmcia/vrc4171_card.c @@ -730,7 +730,7 @@ static int __devinit vrc4171_card_init(void) retval = vrc4171_add_sockets(); if (retval == 0) - retval = request_irq(vrc4171_irq, pccard_interrupt, IRQF_SHARED, + retval = request_irq(vrc4171_irq, pccard_interrupt, SA_SHIRQ, vrc4171_card_name, vrc4171_sockets); if (retval < 0) { diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c index d19a91381..6004196f7 100644 --- a/drivers/pcmcia/vrc4173_cardu.c +++ b/drivers/pcmcia/vrc4173_cardu.c @@ -500,7 +500,7 @@ static int __devinit vrc4173_cardu_probe(struct pci_dev *dev, return -ENOMEM; } - if (request_irq(dev->irq, cardu_interrupt, IRQF_SHARED, socket->name, socket) < 0) { + if (request_irq(dev->irq, cardu_interrupt, SA_SHIRQ, socket->name, socket) < 0) { pcmcia_unregister_socket(socket->pcmcia_socket); socket->pcmcia_socket = NULL; iounmap(socket->base); diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 134474638..4145eb83b 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -287,10 +287,7 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); u16 bridge; - /* if powering down: do it immediately */ - if (state->Vcc == 0) - yenta_set_power(socket, state); - + yenta_set_power(socket, state); socket->io_irq = state->io_irq; bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { @@ -342,10 +339,6 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state) /* Socket event mask: get card insert/remove events.. */ cb_writel(socket, CB_SOCKET_EVENT, -1); cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); - - /* if powering up: do it as the last step when the socket is configured */ - if (state->Vcc != 0) - yenta_set_power(socket, state); return 0; } @@ -923,7 +916,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket) socket->probe_status = 0; - if (request_irq(socket->cb_irq, yenta_probe_handler, IRQF_SHARED, "yenta", socket)) { + if (request_irq(socket->cb_irq, yenta_probe_handler, SA_SHIRQ, "yenta", socket)) { printk(KERN_WARNING "Yenta: request_irq() in yenta_probe_cb_irq() failed!\n"); return -1; } @@ -1005,77 +998,6 @@ static void yenta_config_init(struct yenta_socket *socket) config_writew(socket, CB_BRIDGE_CONTROL, bridge); } -/** - * yenta_fixup_parent_bridge - Fix subordinate bus# of the parent bridge - * @cardbus_bridge: The PCI bus which the CardBus bridge bridges to - * - * Checks if devices on the bus which the CardBus bridge bridges to would be - * invisible during PCI scans because of a misconfigured subordinate number - * of the parent brige - some BIOSes seem to be too lazy to set it right. - * Does the fixup carefully by checking how far it can go without conflicts. - * See http://bugzilla.kernel.org/show_bug.cgi?id=2944 for more information. - */ -static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) -{ - struct list_head *tmp; - unsigned char upper_limit; - /* - * We only check and fix the parent bridge: All systems which need - * this fixup that have been reviewed are laptops and the only bridge - * which needed fixing was the parent bridge of the CardBus bridge: - */ - struct pci_bus *bridge_to_fix = cardbus_bridge->parent; - - /* Check bus numbers are already set up correctly: */ - if (bridge_to_fix->subordinate >= cardbus_bridge->subordinate) - return; /* The subordinate number is ok, nothing to do */ - - if (!bridge_to_fix->parent) - return; /* Root bridges are ok */ - - /* stay within the limits of the bus range of the parent: */ - upper_limit = bridge_to_fix->parent->subordinate; - - /* check the bus ranges of all silbling bridges to prevent overlap */ - list_for_each(tmp, &bridge_to_fix->parent->children) { - struct pci_bus * silbling = pci_bus_b(tmp); - /* - * If the silbling has a higher secondary bus number - * and it's secondary is equal or smaller than our - * current upper limit, set the new upper limit to - * the bus number below the silbling's range: - */ - if (silbling->secondary > bridge_to_fix->subordinate - && silbling->secondary <= upper_limit) - upper_limit = silbling->secondary - 1; - } - - /* Show that the wanted subordinate number is not possible: */ - if (cardbus_bridge->subordinate > upper_limit) - printk(KERN_WARNING "Yenta: Upper limit for fixing this " - "bridge's parent bridge: #%02x\n", upper_limit); - - /* If we have room to increase the bridge's subordinate number, */ - if (bridge_to_fix->subordinate < upper_limit) { - - /* use the highest number of the hidden bus, within limits */ - unsigned char subordinate_to_assign = - min(cardbus_bridge->subordinate, upper_limit); - - printk(KERN_INFO "Yenta: Raising subordinate bus# of parent " - "bus (#%02x) from #%02x to #%02x\n", - bridge_to_fix->number, - bridge_to_fix->subordinate, subordinate_to_assign); - - /* Save the new subordinate in the bus struct of the bridge */ - bridge_to_fix->subordinate = subordinate_to_assign; - - /* and update the PCI config space with the new subordinate */ - pci_write_config_byte(bridge_to_fix->self, - PCI_SUBORDINATE_BUS, bridge_to_fix->subordinate); - } -} - /* * Initialize a cardbus controller. Make sure we have a usable * interrupt, and that we can map the cardbus area. Fill in the @@ -1172,7 +1094,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i /* We must finish initialization here */ - if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) { + if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, "yenta", socket)) { /* No IRQ or request_irq failed. Poll */ socket->cb_irq = 0; /* But zero is a valid IRQ number. */ init_timer(&socket->poll_timer); @@ -1191,8 +1113,6 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i yenta_get_socket_capabilities(socket, isa_interrupts); printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE)); - yenta_fixup_parent_bridge(dev->subordinate); - /* Register it with the pcmcia layer.. */ ret = pcmcia_register_socket(&socket->socket); if (ret == 0) { @@ -1312,7 +1232,6 @@ static struct pci_device_id yenta_table [] = { CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX), CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX), - CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12, TI12XX), CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX), CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX), CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX), diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 227600cd6..bb19c6407 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include @@ -59,34 +60,30 @@ static void card_remove_first(struct pnp_dev * dev) card_remove(dev); } -static int card_probe(struct pnp_card *card, struct pnp_card_driver *drv) +static int card_probe(struct pnp_card * card, struct pnp_card_driver * drv) { - const struct pnp_card_device_id *id; - struct pnp_card_link *clink; - struct pnp_dev *dev; - - if (!drv->probe) - return 0; - id = match_card(drv,card); - if (!id) - return 0; - - clink = pnp_alloc(sizeof(*clink)); - if (!clink) - return 0; - clink->card = card; - clink->driver = drv; - clink->pm_state = PMSG_ON; - - if (drv->probe(clink, id) >= 0) - return 1; - - /* Recovery */ - card_for_each_dev(card, dev) { - if (dev->card_link == clink) - pnp_release_card_device(dev); + const struct pnp_card_device_id *id = match_card(drv,card); + if (id) { + struct pnp_card_link * clink = pnp_alloc(sizeof(struct pnp_card_link)); + if (!clink) + return 0; + clink->card = card; + clink->driver = drv; + clink->pm_state = PMSG_ON; + if (drv->probe) { + if (drv->probe(clink, id)>=0) + return 1; + else { + struct pnp_dev * dev; + card_for_each_dev(card, dev) { + if (dev->card_link == clink) + pnp_release_card_device(dev); + } + kfree(clink); + } + } else + return 1; } - kfree(clink); return 0; } diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index e161423b4..e54c15383 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 9d8b415ec..a2d8ce7fe 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -264,9 +264,9 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED) pnp_printf(buffer," disabled\n"); else - pnp_printf(buffer," 0x%llx-0x%llx\n", - (unsigned long long)pnp_port_start(dev, i), - (unsigned long long)pnp_port_end(dev, i)); + pnp_printf(buffer," 0x%lx-0x%lx\n", + pnp_port_start(dev, i), + pnp_port_end(dev, i)); } } for (i = 0; i < PNP_MAX_MEM; i++) { @@ -275,9 +275,9 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at if (pnp_mem_flags(dev, i) & IORESOURCE_DISABLED) pnp_printf(buffer," disabled\n"); else - pnp_printf(buffer," 0x%llx-0x%llx\n", - (unsigned long long)pnp_mem_start(dev, i), - (unsigned long long)pnp_mem_end(dev, i)); + pnp_printf(buffer," 0x%lx-0x%lx\n", + pnp_mem_start(dev, i), + pnp_mem_end(dev, i)); } } for (i = 0; i < PNP_MAX_IRQ; i++) { @@ -286,8 +286,8 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at if (pnp_irq_flags(dev, i) & IORESOURCE_DISABLED) pnp_printf(buffer," disabled\n"); else - pnp_printf(buffer," %lld\n", - (unsigned long long)pnp_irq(dev, i)); + pnp_printf(buffer," %ld\n", + pnp_irq(dev, i)); } } for (i = 0; i < PNP_MAX_DMA; i++) { @@ -296,8 +296,8 @@ static ssize_t pnp_show_current_resources(struct device *dmdev, struct device_at if (pnp_dma_flags(dev, i) & IORESOURCE_DISABLED) pnp_printf(buffer," disabled\n"); else - pnp_printf(buffer," %lld\n", - (unsigned long long)pnp_dma(dev, i)); + pnp_printf(buffer," %ld\n", + pnp_dma(dev, i)); } } ret = (buffer->curr - buf); diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c index 0697ab88a..3ff7e76b3 100644 --- a/drivers/pnp/isapnp/compat.c +++ b/drivers/pnp/isapnp/compat.c @@ -8,6 +8,7 @@ /* TODO: see if more isapnp functions are needed here */ +#include #include #include #include diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 3ac5b1232..ac7c2bb6c 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -34,6 +34,7 @@ * 2003-08-11 Resource Management Updates - Adam Belay */ +#include #include #include #include @@ -1049,10 +1050,6 @@ static int __init isapnp_init(void) printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n"); return 0; } -#ifdef CONFIG_PPC_MERGE - if (check_legacy_ioport(_PIDXR) || check_legacy_ioport(_PNPWRP)) - return -EINVAL; -#endif #ifdef ISAPNP_REGION_OK if (!request_region(_PIDXR, 1, "isapnp index")) { printk(KERN_ERR "isapnp: Index Register 0x%x already used\n", _PIDXR); diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c index 958c11bed..cf54b0a36 100644 --- a/drivers/pnp/isapnp/proc.c +++ b/drivers/pnp/isapnp/proc.c @@ -19,6 +19,7 @@ * */ +#include #include #include #include diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 5026b345c..6fff109bd 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -19,8 +20,7 @@ DECLARE_MUTEX(pnp_res_mutex); static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) { - resource_size_t *start, *end; - unsigned long *flags; + unsigned long *start, *end, *flags; if (!dev || !rule) return -EINVAL; @@ -63,8 +63,7 @@ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx) static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) { - resource_size_t *start, *end; - unsigned long *flags; + unsigned long *start, *end, *flags; if (!dev || !rule) return -EINVAL; @@ -117,8 +116,7 @@ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx) static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx) { - resource_size_t *start, *end; - unsigned long *flags; + unsigned long *start, *end, *flags; int i; /* IRQ priority: this table is good for i386 */ @@ -170,8 +168,7 @@ static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx) static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx) { - resource_size_t *start, *end; - unsigned long *flags; + unsigned long *start, *end, *flags; int i; /* DMA priority: this table is good for i386 */ @@ -585,8 +582,7 @@ int pnp_disable_dev(struct pnp_dev *dev) * @size: size of region * */ -void pnp_resource_change(struct resource *resource, resource_size_t start, - resource_size_t size) +void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { if (resource == NULL) return; diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 6cf34a63c..f104577f7 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index dc79b0a00..407b4eadd 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -36,13 +36,13 @@ static int irq_flags(int triggering, int polarity) { int flag; if (triggering == ACPI_LEVEL_SENSITIVE) { - if (polarity == ACPI_ACTIVE_LOW) + if(polarity == ACPI_ACTIVE_LOW) flag = IORESOURCE_IRQ_LOWLEVEL; else flag = IORESOURCE_IRQ_HIGHLEVEL; } else { - if (polarity == ACPI_ACTIVE_LOW) + if(polarity == ACPI_ACTIVE_LOW) flag = IORESOURCE_IRQ_LOWEDGE; else flag = IORESOURCE_IRQ_HIGHEDGE; @@ -57,7 +57,7 @@ static void decode_irq_flags(int flag, int *triggering, int *polarity) *triggering = ACPI_LEVEL_SENSITIVE; *polarity = ACPI_ACTIVE_LOW; break; - case IORESOURCE_IRQ_HIGHLEVEL: + case IORESOURCE_IRQ_HIGHLEVEL: *triggering = ACPI_LEVEL_SENSITIVE; *polarity = ACPI_ACTIVE_HIGH; break; @@ -73,8 +73,8 @@ static void decode_irq_flags(int flag, int *triggering, int *polarity) } static void -pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi, - int triggering, int polarity, int shareable) +pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, u32 gsi, + int triggering, int polarity) { int i = 0; int irq; @@ -95,16 +95,13 @@ pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, u32 gsi, return; } - if (shareable) - res->irq_resource[i].flags |= IORESOURCE_IRQ_SHAREABLE; - res->irq_resource[i].start = irq; res->irq_resource[i].end = irq; pcibios_penalize_isa_irq(irq, 1); } static void -pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, u32 dma) +pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table * res, u32 dma) { int i = 0; while (i < PNP_MAX_DMA && @@ -122,8 +119,8 @@ pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, u32 dma) } static void -pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, - u64 io, u64 len) +pnpacpi_parse_allocated_ioresource(struct pnp_resource_table * res, + u32 io, u32 len) { int i = 0; while (!(res->port_resource[i].flags & IORESOURCE_UNSET) && @@ -141,7 +138,7 @@ pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, } static void -pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, +pnpacpi_parse_allocated_memresource(struct pnp_resource_table * res, u64 mem, u64 len) { int i = 0; @@ -159,35 +156,11 @@ pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, } } -static void -pnpacpi_parse_allocated_address_space(struct pnp_resource_table *res_table, - struct acpi_resource *res) -{ - struct acpi_resource_address64 addr, *p = &addr; - acpi_status status; - - status = acpi_resource_to_address64(res, p); - if (!ACPI_SUCCESS(status)) { - pnp_warn("PnPACPI: failed to convert resource type %d", - res->type); - return; - } - - if (p->producer_consumer == ACPI_PRODUCER) - return; - - if (p->resource_type == ACPI_MEMORY_RANGE) - pnpacpi_parse_allocated_memresource(res_table, - p->minimum, p->address_length); - else if (p->resource_type == ACPI_IO_RANGE) - pnpacpi_parse_allocated_ioresource(res_table, - p->minimum, p->address_length); -} static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, void *data) { - struct pnp_resource_table *res_table = (struct pnp_resource_table *)data; + struct pnp_resource_table * res_table = (struct pnp_resource_table *)data; int i; switch (res->type) { @@ -200,8 +173,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, pnpacpi_parse_allocated_irqresource(res_table, res->data.irq.interrupts[i], res->data.irq.triggering, - res->data.irq.polarity, - res->data.irq.sharable); + res->data.irq.polarity); } break; @@ -249,26 +221,30 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, res->data.fixed_memory32.address_length); break; case ACPI_RESOURCE_TYPE_ADDRESS16: + pnpacpi_parse_allocated_memresource(res_table, + res->data.address16.minimum, + res->data.address16.address_length); + break; case ACPI_RESOURCE_TYPE_ADDRESS32: + pnpacpi_parse_allocated_memresource(res_table, + res->data.address32.minimum, + res->data.address32.address_length); + break; case ACPI_RESOURCE_TYPE_ADDRESS64: - pnpacpi_parse_allocated_address_space(res_table, res); + pnpacpi_parse_allocated_memresource(res_table, + res->data.address64.minimum, + res->data.address64.address_length); break; case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: - if (res->data.ext_address64.producer_consumer == ACPI_PRODUCER) - return AE_OK; break; case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: - if (res->data.extended_irq.producer_consumer == ACPI_PRODUCER) - return AE_OK; - for (i = 0; i < res->data.extended_irq.interrupt_count; i++) { pnpacpi_parse_allocated_irqresource(res_table, res->data.extended_irq.interrupts[i], res->data.extended_irq.triggering, - res->data.extended_irq.polarity, - res->data.extended_irq.sharable); + res->data.extended_irq.polarity); } break; @@ -279,11 +255,11 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, pnp_warn("PnPACPI: unknown resource type %d", res->type); return AE_ERROR; } - + return AE_OK; } -acpi_status pnpacpi_parse_allocated_resource(acpi_handle handle, struct pnp_resource_table *res) +acpi_status pnpacpi_parse_allocated_resource(acpi_handle handle, struct pnp_resource_table * res) { /* Blank the resource table values */ pnp_init_resource_table(res); @@ -341,17 +317,17 @@ static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_reso pnp_err("Invalid DMA transfer type"); } - pnp_register_dma_resource(option, dma); + pnp_register_dma_resource(option,dma); return; } - + static void pnpacpi_parse_irq_option(struct pnp_option *option, struct acpi_resource_irq *p) { int i; - struct pnp_irq *irq; - + struct pnp_irq * irq; + if (p->interrupt_count == 0) return; irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); @@ -371,7 +347,7 @@ static void pnpacpi_parse_ext_irq_option(struct pnp_option *option, struct acpi_resource_extended_irq *p) { int i; - struct pnp_irq *irq; + struct pnp_irq * irq; if (p->interrupt_count == 0) return; @@ -392,7 +368,7 @@ static void pnpacpi_parse_port_option(struct pnp_option *option, struct acpi_resource_io *io) { - struct pnp_port *port; + struct pnp_port * port; if (io->address_length == 0) return; @@ -405,7 +381,7 @@ pnpacpi_parse_port_option(struct pnp_option *option, port->size = io->address_length; port->flags = ACPI_DECODE_16 == io->io_decode ? PNP_PORT_FLAG_16BITADDR : 0; - pnp_register_port_resource(option, port); + pnp_register_port_resource(option,port); return; } @@ -413,7 +389,7 @@ static void pnpacpi_parse_fixed_port_option(struct pnp_option *option, struct acpi_resource_fixed_io *io) { - struct pnp_port *port; + struct pnp_port * port; if (io->address_length == 0) return; @@ -424,7 +400,7 @@ pnpacpi_parse_fixed_port_option(struct pnp_option *option, port->size = io->address_length; port->align = 0; port->flags = PNP_PORT_FLAG_FIXED; - pnp_register_port_resource(option, port); + pnp_register_port_resource(option,port); return; } @@ -432,7 +408,7 @@ static void pnpacpi_parse_mem24_option(struct pnp_option *option, struct acpi_resource_memory24 *p) { - struct pnp_mem *mem; + struct pnp_mem * mem; if (p->address_length == 0) return; @@ -447,7 +423,7 @@ pnpacpi_parse_mem24_option(struct pnp_option *option, mem->flags = (ACPI_READ_WRITE_MEMORY == p->write_protect) ? IORESOURCE_MEM_WRITEABLE : 0; - pnp_register_mem_resource(option, mem); + pnp_register_mem_resource(option,mem); return; } @@ -455,7 +431,7 @@ static void pnpacpi_parse_mem32_option(struct pnp_option *option, struct acpi_resource_memory32 *p) { - struct pnp_mem *mem; + struct pnp_mem * mem; if (p->address_length == 0) return; @@ -470,7 +446,7 @@ pnpacpi_parse_mem32_option(struct pnp_option *option, mem->flags = (ACPI_READ_WRITE_MEMORY == p->write_protect) ? IORESOURCE_MEM_WRITEABLE : 0; - pnp_register_mem_resource(option, mem); + pnp_register_mem_resource(option,mem); return; } @@ -478,7 +454,7 @@ static void pnpacpi_parse_fixed_mem32_option(struct pnp_option *option, struct acpi_resource_fixed_memory32 *p) { - struct pnp_mem *mem; + struct pnp_mem * mem; if (p->address_length == 0) return; @@ -492,7 +468,7 @@ pnpacpi_parse_fixed_mem32_option(struct pnp_option *option, mem->flags = (ACPI_READ_WRITE_MEMORY == p->write_protect) ? IORESOURCE_MEM_WRITEABLE : 0; - pnp_register_mem_resource(option, mem); + pnp_register_mem_resource(option,mem); return; } @@ -501,8 +477,8 @@ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r) { struct acpi_resource_address64 addr, *p = &addr; acpi_status status; - struct pnp_mem *mem; - struct pnp_port *port; + struct pnp_mem * mem; + struct pnp_port * port; status = acpi_resource_to_address64(r, p); if (!ACPI_SUCCESS(status)) { @@ -522,7 +498,7 @@ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r) mem->align = 0; mem->flags = (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY) ? IORESOURCE_MEM_WRITEABLE : 0; - pnp_register_mem_resource(option, mem); + pnp_register_mem_resource(option,mem); } else if (p->resource_type == ACPI_IO_RANGE) { port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); if (!port) @@ -531,7 +507,7 @@ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r) port->size = p->address_length; port->align = 0; port->flags = PNP_PORT_FLAG_FIXED; - pnp_register_port_resource(option, port); + pnp_register_port_resource(option,port); } } @@ -555,7 +531,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res, break; case ACPI_RESOURCE_TYPE_DMA: - pnpacpi_parse_dma_option(option, &res->data.dma); + pnpacpi_parse_dma_option(option, &res->data.dma); break; case ACPI_RESOURCE_TYPE_START_DEPENDENT: @@ -563,7 +539,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res, case ACPI_GOOD_CONFIGURATION: priority = PNP_RES_PRIORITY_PREFERRED; break; - + case ACPI_ACCEPTABLE_CONFIGURATION: priority = PNP_RES_PRIORITY_ACCEPTABLE; break; @@ -579,7 +555,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res, option = pnp_register_dependent_option(dev, priority); if (!option) return AE_ERROR; - parse_data->option = option; + parse_data->option = option; break; case ACPI_RESOURCE_TYPE_END_DEPENDENT: @@ -639,7 +615,7 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res, pnp_warn("PnPACPI: unknown resource type %d", res->type); return AE_ERROR; } - + return AE_OK; } @@ -660,8 +636,13 @@ acpi_status pnpacpi_parse_resource_option_data(acpi_handle handle, return status; } -static int pnpacpi_supported_resource(struct acpi_resource *res) +/* + * Set resource + */ +static acpi_status pnpacpi_count_resources(struct acpi_resource *res, + void *data) { + int *res_cnt = (int *)data; switch (res->type) { case ACPI_RESOURCE_TYPE_IRQ: case ACPI_RESOURCE_TYPE_DMA: @@ -674,32 +655,43 @@ static int pnpacpi_supported_resource(struct acpi_resource *res) case ACPI_RESOURCE_TYPE_ADDRESS32: case ACPI_RESOURCE_TYPE_ADDRESS64: case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: - return 1; + (*res_cnt) ++; + case ACPI_RESOURCE_TYPE_START_DEPENDENT: + case ACPI_RESOURCE_TYPE_END_DEPENDENT: + case ACPI_RESOURCE_TYPE_VENDOR: + case ACPI_RESOURCE_TYPE_END_TAG: + case ACPI_RESOURCE_TYPE_GENERIC_REGISTER: + default: + return AE_OK; } - return 0; -} - -/* - * Set resource - */ -static acpi_status pnpacpi_count_resources(struct acpi_resource *res, - void *data) -{ - int *res_cnt = (int *)data; - - if (pnpacpi_supported_resource(res)) - (*res_cnt)++; return AE_OK; } -static acpi_status pnpacpi_type_resources(struct acpi_resource *res, void *data) +static acpi_status pnpacpi_type_resources(struct acpi_resource *res, + void *data) { - struct acpi_resource **resource = (struct acpi_resource **)data; - - if (pnpacpi_supported_resource(res)) { + struct acpi_resource **resource = (struct acpi_resource **)data; + switch (res->type) { + case ACPI_RESOURCE_TYPE_IRQ: + case ACPI_RESOURCE_TYPE_DMA: + case ACPI_RESOURCE_TYPE_IO: + case ACPI_RESOURCE_TYPE_FIXED_IO: + case ACPI_RESOURCE_TYPE_MEMORY24: + case ACPI_RESOURCE_TYPE_MEMORY32: + case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: + case ACPI_RESOURCE_TYPE_ADDRESS16: + case ACPI_RESOURCE_TYPE_ADDRESS32: + case ACPI_RESOURCE_TYPE_ADDRESS64: + case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: (*resource)->type = res->type; - (*resource)->length = sizeof(struct acpi_resource); (*resource)++; + case ACPI_RESOURCE_TYPE_START_DEPENDENT: + case ACPI_RESOURCE_TYPE_END_DEPENDENT: + case ACPI_RESOURCE_TYPE_VENDOR: + case ACPI_RESOURCE_TYPE_END_TAG: + case ACPI_RESOURCE_TYPE_GENERIC_REGISTER: + default: + return AE_OK; } return AE_OK; @@ -743,8 +735,11 @@ static void pnpacpi_encode_irq(struct acpi_resource *resource, struct resource *p) { int triggering, polarity; - - decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); + + decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, + &polarity); + resource->type = ACPI_RESOURCE_TYPE_IRQ; + resource->length = sizeof(struct acpi_resource); resource->data.irq.triggering = triggering; resource->data.irq.polarity = polarity; if (triggering == ACPI_EDGE_SENSITIVE) @@ -759,8 +754,11 @@ static void pnpacpi_encode_ext_irq(struct acpi_resource *resource, struct resource *p) { int triggering, polarity; - - decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); + + decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, + &polarity); + resource->type = ACPI_RESOURCE_TYPE_EXTENDED_IRQ; + resource->length = sizeof(struct acpi_resource); resource->data.extended_irq.producer_consumer = ACPI_CONSUMER; resource->data.extended_irq.triggering = triggering; resource->data.extended_irq.polarity = polarity; @@ -775,6 +773,8 @@ static void pnpacpi_encode_ext_irq(struct acpi_resource *resource, static void pnpacpi_encode_dma(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_DMA; + resource->length = sizeof(struct acpi_resource); /* Note: pnp_assign_dma will copy pnp_dma->flags into p->flags */ if (p->flags & IORESOURCE_DMA_COMPATIBLE) resource->data.dma.type = ACPI_COMPATIBILITY; @@ -798,6 +798,8 @@ static void pnpacpi_encode_dma(struct acpi_resource *resource, static void pnpacpi_encode_io(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_IO; + resource->length = sizeof(struct acpi_resource); /* Note: pnp_assign_port will copy pnp_port->flags into p->flags */ resource->data.io.io_decode = (p->flags & PNP_PORT_FLAG_16BITADDR)? ACPI_DECODE_16 : ACPI_DECODE_10; @@ -810,6 +812,8 @@ static void pnpacpi_encode_io(struct acpi_resource *resource, static void pnpacpi_encode_fixed_io(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_FIXED_IO; + resource->length = sizeof(struct acpi_resource); resource->data.fixed_io.address = p->start; resource->data.fixed_io.address_length = p->end - p->start + 1; } @@ -817,6 +821,8 @@ static void pnpacpi_encode_fixed_io(struct acpi_resource *resource, static void pnpacpi_encode_mem24(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_MEMORY24; + resource->length = sizeof(struct acpi_resource); /* Note: pnp_assign_mem will copy pnp_mem->flags into p->flags */ resource->data.memory24.write_protect = (p->flags & IORESOURCE_MEM_WRITEABLE) ? @@ -830,6 +836,8 @@ static void pnpacpi_encode_mem24(struct acpi_resource *resource, static void pnpacpi_encode_mem32(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_MEMORY32; + resource->length = sizeof(struct acpi_resource); resource->data.memory32.write_protect = (p->flags & IORESOURCE_MEM_WRITEABLE) ? ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; @@ -842,6 +850,8 @@ static void pnpacpi_encode_mem32(struct acpi_resource *resource, static void pnpacpi_encode_fixed_mem32(struct acpi_resource *resource, struct resource *p) { + resource->type = ACPI_RESOURCE_TYPE_FIXED_MEMORY32; + resource->length = sizeof(struct acpi_resource); resource->data.fixed_memory32.write_protect = (p->flags & IORESOURCE_MEM_WRITEABLE) ? ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY; @@ -872,37 +882,37 @@ int pnpacpi_encode_resources(struct pnp_resource_table *res_table, pnp_dbg("Encode dma"); pnpacpi_encode_dma(resource, &res_table->dma_resource[dma]); - dma++; + dma ++; break; case ACPI_RESOURCE_TYPE_IO: pnp_dbg("Encode io"); pnpacpi_encode_io(resource, &res_table->port_resource[port]); - port++; + port ++; break; case ACPI_RESOURCE_TYPE_FIXED_IO: pnp_dbg("Encode fixed io"); pnpacpi_encode_fixed_io(resource, &res_table->port_resource[port]); - port++; + port ++; break; case ACPI_RESOURCE_TYPE_MEMORY24: pnp_dbg("Encode mem24"); pnpacpi_encode_mem24(resource, &res_table->mem_resource[mem]); - mem++; + mem ++; break; case ACPI_RESOURCE_TYPE_MEMORY32: pnp_dbg("Encode mem32"); pnpacpi_encode_mem32(resource, &res_table->mem_resource[mem]); - mem++; + mem ++; break; case ACPI_RESOURCE_TYPE_FIXED_MEMORY32: pnp_dbg("Encode fixed mem32"); pnpacpi_encode_fixed_mem32(resource, &res_table->mem_resource[mem]); - mem++; + mem ++; break; case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: pnp_dbg("Encode ext irq"); @@ -923,8 +933,8 @@ int pnpacpi_encode_resources(struct pnp_resource_table *res_table, pnp_warn("unknown resource type %d", resource->type); return -EINVAL; } - resource++; - i++; + resource ++; + i ++; } return 0; } diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index 551f58e29..b154b3f52 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c @@ -346,7 +346,7 @@ static int insert_device(struct pnp_dev *dev, struct pnp_bios_node * node) dev->flags = node->flags; if (!(dev->flags & PNPBIOS_NO_CONFIG)) dev->capabilities |= PNP_CONFIGURABLE; - if (!(dev->flags & PNPBIOS_NO_DISABLE) && pnpbios_is_dynamic(dev)) + if (!(dev->flags & PNPBIOS_NO_DISABLE)) dev->capabilities |= PNP_DISABLE; dev->capabilities |= PNP_READ; if (pnpbios_is_dynamic(dev)) diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index ef508a4de..c89c98a2c 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c @@ -3,6 +3,7 @@ * */ +#include #include #include #include diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index e97ecefe8..8936b0cb2 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -11,6 +11,7 @@ * Copyright (c) 1999 Martin Mares */ +#include #include #include #include diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 5c8ec21e1..688421de9 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -240,7 +241,7 @@ int pnp_check_port(struct pnp_dev * dev, int idx) { int tmp; struct pnp_dev *tdev; - resource_size_t *port, *end, *tport, *tend; + unsigned long *port, *end, *tport, *tend; port = &dev->res.port_resource[idx].start; end = &dev->res.port_resource[idx].end; @@ -296,7 +297,7 @@ int pnp_check_mem(struct pnp_dev * dev, int idx) { int tmp; struct pnp_dev *tdev; - resource_size_t *addr, *end, *taddr, *tend; + unsigned long *addr, *end, *taddr, *tend; addr = &dev->res.mem_resource[idx].start; end = &dev->res.mem_resource[idx].end; @@ -357,7 +358,7 @@ int pnp_check_irq(struct pnp_dev * dev, int idx) { int tmp; struct pnp_dev *tdev; - resource_size_t * irq = &dev->res.irq_resource[idx].start; + unsigned long * irq = &dev->res.irq_resource[idx].start; /* if the resource doesn't exist, don't complain about it */ if (cannot_compare(dev->res.irq_resource[idx].flags)) @@ -396,7 +397,7 @@ int pnp_check_irq(struct pnp_dev * dev, int idx) * device is active because it itself may be in use */ if(!dev->active) { if (request_irq(*irq, pnp_test_handler, - IRQF_DISABLED|IRQF_PROBE_SHARED, "pnp", NULL)) + SA_INTERRUPT|SA_PROBEIRQ, "pnp", NULL)) return 0; free_irq(*irq, NULL); } @@ -423,7 +424,7 @@ int pnp_check_dma(struct pnp_dev * dev, int idx) #ifndef CONFIG_IA64 int tmp; struct pnp_dev *tdev; - resource_size_t * dma = &dev->res.dma_resource[idx].start; + unsigned long * dma = &dev->res.dma_resource[idx].start; /* if the resource doesn't exist, don't complain about it */ if (cannot_compare(dev->res.dma_resource[idx].flags)) diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c index 946a0dcd6..61fe99894 100644 --- a/drivers/pnp/support.c +++ b/drivers/pnp/support.c @@ -5,6 +5,7 @@ * */ +#include #include #include #include diff --git a/drivers/rapidio/rio-access.c b/drivers/rapidio/rio-access.c index 8b56bbdd0..b9fab2ae3 100644 --- a/drivers/rapidio/rio-access.c +++ b/drivers/rapidio/rio-access.c @@ -17,8 +17,8 @@ * These interrupt-safe spinlocks protect all accesses to RIO * configuration space and doorbell access. */ -static DEFINE_SPINLOCK(rio_config_lock); -static DEFINE_SPINLOCK(rio_doorbell_lock); +static spinlock_t rio_config_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t rio_doorbell_lock = SPIN_LOCK_UNLOCKED; /* * Wrappers for all RIO configuration access functions. They just check diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 7bf7b2c88..94e30fe4b 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c index 5687b8fcb..bef9316e9 100644 --- a/drivers/rapidio/rio-sysfs.c +++ b/drivers/rapidio/rio-sysfs.c @@ -10,6 +10,7 @@ * option) any later version. */ +#include #include #include #include diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index f644807da..5e382470f 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c @@ -11,6 +11,7 @@ * option) any later version. */ +#include #include #include diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7ff1d8809..65d090dbe 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -15,7 +15,7 @@ config RTC_CLASS help Generic RTC class support. If you say yes here, you will be allowed to plug one or more RTCs to your system. You will - probably want to enable one or more of the interfaces below. + probably want to enable one of more of the interfaces below. This driver can also be built as a module. If so, the module will be called rtc-class. @@ -73,13 +73,6 @@ config RTC_INTF_DEV This driver can also be built as a module. If so, the module will be called rtc-dev. -config RTC_INTF_DEV_UIE_EMUL - bool "RTC UIE emulation on dev interface" - depends on RTC_INTF_DEV - help - Provides an emulation for RTC_UIE if the underlaying rtc chip - driver did not provide RTC_UIE ioctls. - comment "RTC drivers" depends on RTC_CLASS @@ -93,44 +86,6 @@ config RTC_DRV_X1205 This driver can also be built as a module. If so, the module will be called rtc-x1205. -config RTC_DRV_DS1307 - tristate "Dallas/Maxim DS1307 and similar I2C RTC chips" - depends on RTC_CLASS && I2C - help - If you say yes here you get support for various compatible RTC - chips (often with battery backup) connected with I2C. This driver - should handle DS1307, DS1337, DS1338, DS1339, DS1340, ST M41T00, - and probably other chips. In some cases the RTC must already - have been initialized (by manufacturing or a bootloader). - - The first seven registers on these chips hold an RTC, and other - registers may add features such as NVRAM, a trickle charger for - the RTC/NVRAM backup power, and alarms. This driver may not - expose all those available chip features. - - This driver can also be built as a module. If so, the module - will be called rtc-ds1307. - -config RTC_DRV_DS1553 - tristate "Dallas DS1553" - depends on RTC_CLASS - help - If you say yes here you get support for the - Dallas DS1553 timekeeping chip. - - This driver can also be built as a module. If so, the module - will be called rtc-ds1553. - -config RTC_DRV_ISL1208 - tristate "Intersil 1208" - depends on RTC_CLASS && I2C - help - If you say yes here you get support for the - Intersil 1208 RTC chip. - - This driver can also be built as a module. If so, the module - will be called rtc-isl1208. - config RTC_DRV_DS1672 tristate "Dallas/Maxim DS1672" depends on RTC_CLASS && I2C @@ -141,16 +96,6 @@ config RTC_DRV_DS1672 This driver can also be built as a module. If so, the module will be called rtc-ds1672. -config RTC_DRV_DS1742 - tristate "Dallas DS1742" - depends on RTC_CLASS - help - If you say yes here you get support for the - Dallas DS1742 timekeeping chip. - - This driver can also be built as a module. If so, the module - will be called rtc-ds1742. - config RTC_DRV_PCF8563 tristate "Philips PCF8563/Epson RTC8564" depends on RTC_CLASS && I2C @@ -162,26 +107,6 @@ config RTC_DRV_PCF8563 This driver can also be built as a module. If so, the module will be called rtc-pcf8563. -config RTC_DRV_PCF8583 - tristate "Philips PCF8583" - depends on RTC_CLASS && I2C - help - If you say yes here you get support for the - Philips PCF8583 RTC chip. - - This driver can also be built as a module. If so, the module - will be called rtc-pcf8583. - -config RTC_DRV_RS5C348 - tristate "Ricoh RS5C348A/B" - depends on RTC_CLASS && SPI - help - If you say yes here you get support for the - Ricoh RS5C348A and RS5C348B RTC chips. - - This driver can also be built as a module. If so, the module - will be called rtc-rs5c348. - config RTC_DRV_RS5C372 tristate "Ricoh RS5C372A/B" depends on RTC_CLASS && I2C @@ -192,22 +117,6 @@ config RTC_DRV_RS5C372 This driver can also be built as a module. If so, the module will be called rtc-rs5c372. -config RTC_DRV_S3C - tristate "Samsung S3C series SoC RTC" - depends on RTC_CLASS && ARCH_S3C2410 - help - RTC (Realtime Clock) driver for the clock inbuilt into the - Samsung S3C24XX series of SoCs. This can provide periodic - interrupt rates from 1Hz to 64Hz for user programs, and - wakeup from Alarm. - - The driver currently supports the common features on all the - S3C24XX range, such as the S3C2410, S3C2412, S3C2413, S3C2440 - and S3C2442. - - This driver can also be build as a module. If so, the module - will be called rtc-s3c. - config RTC_DRV_M48T86 tristate "ST M48T86/Dallas DS12887" depends on RTC_CLASS @@ -248,22 +157,6 @@ config RTC_DRV_VR41XX To compile this driver as a module, choose M here: the module will be called rtc-vr41xx. -config RTC_DRV_PL031 - tristate "ARM AMBA PL031 RTC" - depends on RTC_CLASS && ARM_AMBA - help - If you say Y here you will get access to ARM AMBA - PrimeCell PL031 UART found on certain ARM SOCs. - - To compile this driver as a module, choose M here: the - module will be called rtc-pl031. - -config RTC_DRV_AT91 - tristate "AT91RM9200" - depends on RTC_CLASS && ARCH_AT91RM9200 - help - Driver for the Atmel AT91RM9200's internal RTC (Realtime Clock). - config RTC_DRV_TEST tristate "Test driver/device" depends on RTC_CLASS @@ -279,24 +172,4 @@ config RTC_DRV_TEST This driver can also be built as a module. If so, the module will be called rtc-test. -config RTC_DRV_MAX6902 - tristate "Maxim 6902" - depends on RTC_CLASS && SPI - help - If you say yes here you will get support for the - Maxim MAX6902 spi RTC chip. - - This driver can also be built as a module. If so, the module - will be called rtc-max6902. - -config RTC_DRV_V3020 - tristate "EM Microelectronic V3020" - depends on RTC_CLASS - help - If you say yes here you will get support for the - EM Microelectronic v3020 RTC chip. - - This driver can also be built as a module. If so, the module - will be called rtc-v3020. - endmenu diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index bbcfb09d8..a9ca0f171 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -12,22 +12,11 @@ obj-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o obj-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o obj-$(CONFIG_RTC_DRV_X1205) += rtc-x1205.o -obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o -obj-$(CONFIG_RTC_DRV_DS1307) += rtc-ds1307.o obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o -obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o -obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o -obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o -obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o -obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o obj-$(CONFIG_RTC_DRV_VR41XX) += rtc-vr41xx.o -obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o -obj-$(CONFIG_RTC_DRV_MAX6902) += rtc-max6902.o -obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o -obj-$(CONFIG_RTC_DRV_AT91) += rtc-at91.o diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 1cb61a761..413c7d54e 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -69,7 +69,6 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev, rtc->id = id; rtc->ops = ops; rtc->owner = owner; - rtc->max_user_freq = 64; rtc->class_dev.dev = dev; rtc->class_dev.class = rtc_class; rtc->class_dev.release = rtc_device_release; @@ -94,9 +93,7 @@ exit_kfree: kfree(rtc); exit_idr: - mutex_lock(&idr_lock); idr_remove(&rtc_idr, id); - mutex_unlock(&idr_lock); exit: dev_err(dev, "rtc core: unable to register %s, err = %d\n", diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 579cd667b..56e490709 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -229,9 +229,6 @@ int rtc_irq_set_state(struct class_device *class_dev, struct rtc_task *task, int unsigned long flags; struct rtc_device *rtc = to_rtc_device(class_dev); - if (rtc->ops->irq_set_state == NULL) - return -ENXIO; - spin_lock_irqsave(&rtc->irq_task_lock, flags); if (rtc->irq_task != task) err = -ENXIO; @@ -246,12 +243,25 @@ EXPORT_SYMBOL_GPL(rtc_irq_set_state); int rtc_irq_set_freq(struct class_device *class_dev, struct rtc_task *task, int freq) { - int err = 0; + int err = 0, tmp = 0; unsigned long flags; struct rtc_device *rtc = to_rtc_device(class_dev); - if (rtc->ops->irq_set_freq == NULL) - return -ENXIO; + /* allowed range is 2-8192 */ + if (freq < 2 || freq > 8192) + return -EINVAL; +/* + FIXME: this does not belong here, will move where appropriate + at a later stage. It cannot hurt right now, trust me :) + if ((freq > rtc_max_user_freq) && (!capable(CAP_SYS_RESOURCE))) + return -EACCES; +*/ + /* check if freq is a power of 2 */ + while (freq > (1 << tmp)) + tmp++; + + if (freq != (1 << tmp)) + return -EINVAL; spin_lock_irqsave(&rtc->irq_task_lock, flags); if (rtc->irq_task != task) diff --git a/drivers/rtc/rtc-at91.c b/drivers/rtc/rtc-at91.c deleted file mode 100644 index dfd0ce86f..000000000 --- a/drivers/rtc/rtc-at91.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Real Time Clock interface for Linux on Atmel AT91RM9200 - * - * Copyright (C) 2002 Rick Bronson - * - * Converted to RTC class model by Andrew Victor - * - * Ported to Linux 2.6 by Steven Scholz - * Based on s3c2410-rtc.c Simtec Electronics - * - * Based on sa1100-rtc.c by Nils Faerber - * Based on rtc.c by Paul Gortmaker - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - - -#define AT91_RTC_FREQ 1 -#define AT91_RTC_EPOCH 1900UL /* just like arch/arm/common/rtctime.c */ - -static DECLARE_COMPLETION(at91_rtc_updated); -static unsigned int at91_alarm_year = AT91_RTC_EPOCH; - -/* - * Decode time/date into rtc_time structure - */ -static void at91_rtc_decodetime(unsigned int timereg, unsigned int calreg, - struct rtc_time *tm) -{ - unsigned int time, date; - - /* must read twice in case it changes */ - do { - time = at91_sys_read(timereg); - date = at91_sys_read(calreg); - } while ((time != at91_sys_read(timereg)) || - (date != at91_sys_read(calreg))); - - tm->tm_sec = BCD2BIN((time & AT91_RTC_SEC) >> 0); - tm->tm_min = BCD2BIN((time & AT91_RTC_MIN) >> 8); - tm->tm_hour = BCD2BIN((time & AT91_RTC_HOUR) >> 16); - - /* - * The Calendar Alarm register does not have a field for - * the year - so these will return an invalid value. When an - * alarm is set, at91_alarm_year wille store the current year. - */ - tm->tm_year = BCD2BIN(date & AT91_RTC_CENT) * 100; /* century */ - tm->tm_year += BCD2BIN((date & AT91_RTC_YEAR) >> 8); /* year */ - - tm->tm_wday = BCD2BIN((date & AT91_RTC_DAY) >> 21) - 1; /* day of the week [0-6], Sunday=0 */ - tm->tm_mon = BCD2BIN((date & AT91_RTC_MONTH) >> 16) - 1; - tm->tm_mday = BCD2BIN((date & AT91_RTC_DATE) >> 24); -} - -/* - * Read current time and date in RTC - */ -static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) -{ - at91_rtc_decodetime(AT91_RTC_TIMR, AT91_RTC_CALR, tm); - tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); - tm->tm_year = tm->tm_year - 1900; - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - - return 0; -} - -/* - * Set current time and date in RTC - */ -static int at91_rtc_settime(struct device *dev, struct rtc_time *tm) -{ - unsigned long cr; - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - - /* Stop Time/Calendar from counting */ - cr = at91_sys_read(AT91_RTC_CR); - at91_sys_write(AT91_RTC_CR, cr | AT91_RTC_UPDCAL | AT91_RTC_UPDTIM); - - at91_sys_write(AT91_RTC_IER, AT91_RTC_ACKUPD); - wait_for_completion(&at91_rtc_updated); /* wait for ACKUPD interrupt */ - at91_sys_write(AT91_RTC_IDR, AT91_RTC_ACKUPD); - - at91_sys_write(AT91_RTC_TIMR, - BIN2BCD(tm->tm_sec) << 0 - | BIN2BCD(tm->tm_min) << 8 - | BIN2BCD(tm->tm_hour) << 16); - - at91_sys_write(AT91_RTC_CALR, - BIN2BCD((tm->tm_year + 1900) / 100) /* century */ - | BIN2BCD(tm->tm_year % 100) << 8 /* year */ - | BIN2BCD(tm->tm_mon + 1) << 16 /* tm_mon starts at zero */ - | BIN2BCD(tm->tm_wday + 1) << 21 /* day of the week [0-6], Sunday=0 */ - | BIN2BCD(tm->tm_mday) << 24); - - /* Restart Time/Calendar */ - cr = at91_sys_read(AT91_RTC_CR); - at91_sys_write(AT91_RTC_CR, cr & ~(AT91_RTC_UPDCAL | AT91_RTC_UPDTIM)); - - return 0; -} - -/* - * Read alarm time and date in RTC - */ -static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct rtc_time *tm = &alrm->time; - - at91_rtc_decodetime(AT91_RTC_TIMALR, AT91_RTC_CALALR, tm); - tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); - tm->tm_year = at91_alarm_year - 1900; - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - - return 0; -} - -/* - * Set alarm time and date in RTC - */ -static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct rtc_time tm; - - at91_rtc_decodetime(AT91_RTC_TIMR, AT91_RTC_CALR, &tm); - - at91_alarm_year = tm.tm_year; - - tm.tm_hour = alrm->time.tm_hour; - tm.tm_min = alrm->time.tm_min; - tm.tm_sec = alrm->time.tm_sec; - - at91_sys_write(AT91_RTC_TIMALR, - BIN2BCD(tm.tm_sec) << 0 - | BIN2BCD(tm.tm_min) << 8 - | BIN2BCD(tm.tm_hour) << 16 - | AT91_RTC_HOUREN | AT91_RTC_MINEN | AT91_RTC_SECEN); - at91_sys_write(AT91_RTC_CALALR, - BIN2BCD(tm.tm_mon + 1) << 16 /* tm_mon starts at zero */ - | BIN2BCD(tm.tm_mday) << 24 - | AT91_RTC_DATEEN | AT91_RTC_MTHEN); - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - at91_alarm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, - tm.tm_min, tm.tm_sec); - - return 0; -} - -/* - * Handle commands from user-space - */ -static int at91_rtc_ioctl(struct device *dev, unsigned int cmd, - unsigned long arg) -{ - int ret = 0; - - pr_debug("%s(): cmd=%08x, arg=%08lx.\n", __FUNCTION__, cmd, arg); - - switch (cmd) { - case RTC_AIE_OFF: /* alarm off */ - at91_sys_write(AT91_RTC_IDR, AT91_RTC_ALARM); - break; - case RTC_AIE_ON: /* alarm on */ - at91_sys_write(AT91_RTC_IER, AT91_RTC_ALARM); - break; - case RTC_UIE_OFF: /* update off */ - case RTC_PIE_OFF: /* periodic off */ - at91_sys_write(AT91_RTC_IDR, AT91_RTC_SECEV); - break; - case RTC_UIE_ON: /* update on */ - case RTC_PIE_ON: /* periodic on */ - at91_sys_write(AT91_RTC_IER, AT91_RTC_SECEV); - break; - case RTC_IRQP_READ: /* read periodic alarm frequency */ - ret = put_user(AT91_RTC_FREQ, (unsigned long *) arg); - break; - case RTC_IRQP_SET: /* set periodic alarm frequency */ - if (arg != AT91_RTC_FREQ) - ret = -EINVAL; - break; - default: - ret = -ENOIOCTLCMD; - break; - } - - return ret; -} - -/* - * Provide additional RTC information in /proc/driver/rtc - */ -static int at91_rtc_proc(struct device *dev, struct seq_file *seq) -{ - unsigned long imr = at91_sys_read(AT91_RTC_IMR); - - seq_printf(seq, "alarm_IRQ\t: %s\n", - (imr & AT91_RTC_ALARM) ? "yes" : "no"); - seq_printf(seq, "update_IRQ\t: %s\n", - (imr & AT91_RTC_ACKUPD) ? "yes" : "no"); - seq_printf(seq, "periodic_IRQ\t: %s\n", - (imr & AT91_RTC_SECEV) ? "yes" : "no"); - seq_printf(seq, "periodic_freq\t: %ld\n", - (unsigned long) AT91_RTC_FREQ); - - return 0; -} - -/* - * IRQ handler for the RTC - */ -static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id, - struct pt_regs *regs) -{ - struct platform_device *pdev = dev_id; - struct rtc_device *rtc = platform_get_drvdata(pdev); - unsigned int rtsr; - unsigned long events = 0; - - rtsr = at91_sys_read(AT91_RTC_SR) & at91_sys_read(AT91_RTC_IMR); - if (rtsr) { /* this interrupt is shared! Is it ours? */ - if (rtsr & AT91_RTC_ALARM) - events |= (RTC_AF | RTC_IRQF); - if (rtsr & AT91_RTC_SECEV) - events |= (RTC_UF | RTC_IRQF); - if (rtsr & AT91_RTC_ACKUPD) - complete(&at91_rtc_updated); - - at91_sys_write(AT91_RTC_SCCR, rtsr); /* clear status reg */ - - rtc_update_irq(&rtc->class_dev, 1, events); - - pr_debug("%s(): num=%ld, events=0x%02lx\n", __FUNCTION__, - events >> 8, events & 0x000000FF); - - return IRQ_HANDLED; - } - return IRQ_NONE; /* not handled */ -} - -static struct rtc_class_ops at91_rtc_ops = { - .ioctl = at91_rtc_ioctl, - .read_time = at91_rtc_readtime, - .set_time = at91_rtc_settime, - .read_alarm = at91_rtc_readalarm, - .set_alarm = at91_rtc_setalarm, - .proc = at91_rtc_proc, -}; - -/* - * Initialize and install RTC driver - */ -static int __init at91_rtc_probe(struct platform_device *pdev) -{ - struct rtc_device *rtc; - int ret; - - at91_sys_write(AT91_RTC_CR, 0); - at91_sys_write(AT91_RTC_MR, 0); /* 24 hour mode */ - - /* Disable all interrupts */ - at91_sys_write(AT91_RTC_IDR, AT91_RTC_ACKUPD | AT91_RTC_ALARM | - AT91_RTC_SECEV | AT91_RTC_TIMEV | - AT91_RTC_CALEV); - - ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, - IRQF_SHARED, "at91_rtc", pdev); - if (ret) { - printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n", - AT91_ID_SYS); - return ret; - } - - rtc = rtc_device_register(pdev->name, &pdev->dev, - &at91_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { - free_irq(AT91_ID_SYS, pdev); - return PTR_ERR(rtc); - } - platform_set_drvdata(pdev, rtc); - - printk(KERN_INFO "AT91 Real Time Clock driver.\n"); - return 0; -} - -/* - * Disable and remove the RTC driver - */ -static int __devexit at91_rtc_remove(struct platform_device *pdev) -{ - struct rtc_device *rtc = platform_get_drvdata(pdev); - - /* Disable all interrupts */ - at91_sys_write(AT91_RTC_IDR, AT91_RTC_ACKUPD | AT91_RTC_ALARM | - AT91_RTC_SECEV | AT91_RTC_TIMEV | - AT91_RTC_CALEV); - free_irq(AT91_ID_SYS, pdev); - - rtc_device_unregister(rtc); - platform_set_drvdata(pdev, NULL); - - return 0; -} - -#ifdef CONFIG_PM - -/* AT91RM9200 RTC Power management control */ - -static struct timespec at91_rtc_delta; - -static int at91_rtc_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - - /* calculate time delta for suspend */ - at91_rtc_readtime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - save_time_delta(&at91_rtc_delta, &time); - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - 1900 + tm.tm_year, tm.tm_mon, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec); - - return 0; -} - -static int at91_rtc_resume(struct platform_device *pdev) -{ - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - - at91_rtc_readtime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - restore_time_delta(&at91_rtc_delta, &time); - - pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__, - 1900 + tm.tm_year, tm.tm_mon, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec); - - return 0; -} -#else -#define at91_rtc_suspend NULL -#define at91_rtc_resume NULL -#endif - -static struct platform_driver at91_rtc_driver = { - .probe = at91_rtc_probe, - .remove = at91_rtc_remove, - .suspend = at91_rtc_suspend, - .resume = at91_rtc_resume, - .driver = { - .name = "at91_rtc", - .owner = THIS_MODULE, - }, -}; - -static int __init at91_rtc_init(void) -{ - return platform_driver_register(&at91_rtc_driver); -} - -static void __exit at91_rtc_exit(void) -{ - platform_driver_unregister(&at91_rtc_driver); -} - -module_init(at91_rtc_init); -module_exit(at91_rtc_exit); - -MODULE_AUTHOR("Rick Bronson"); -MODULE_DESCRIPTION("RTC driver for Atmel AT91RM9200"); -MODULE_LICENSE("GPL"); diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 61a58259c..201156700 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -48,93 +48,6 @@ static int rtc_dev_open(struct inode *inode, struct file *file) return err; } -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL -/* - * Routine to poll RTC seconds field for change as often as possible, - * after first RTC_UIE use timer to reduce polling - */ -static void rtc_uie_task(void *data) -{ - struct rtc_device *rtc = data; - struct rtc_time tm; - int num = 0; - int err; - - err = rtc_read_time(&rtc->class_dev, &tm); - spin_lock_irq(&rtc->irq_lock); - if (rtc->stop_uie_polling || err) { - rtc->uie_task_active = 0; - } else if (rtc->oldsecs != tm.tm_sec) { - num = (tm.tm_sec + 60 - rtc->oldsecs) % 60; - rtc->oldsecs = tm.tm_sec; - rtc->uie_timer.expires = jiffies + HZ - (HZ/10); - rtc->uie_timer_active = 1; - rtc->uie_task_active = 0; - add_timer(&rtc->uie_timer); - } else if (schedule_work(&rtc->uie_task) == 0) { - rtc->uie_task_active = 0; - } - spin_unlock_irq(&rtc->irq_lock); - if (num) - rtc_update_irq(&rtc->class_dev, num, RTC_UF | RTC_IRQF); -} - -static void rtc_uie_timer(unsigned long data) -{ - struct rtc_device *rtc = (struct rtc_device *)data; - unsigned long flags; - - spin_lock_irqsave(&rtc->irq_lock, flags); - rtc->uie_timer_active = 0; - rtc->uie_task_active = 1; - if ((schedule_work(&rtc->uie_task) == 0)) - rtc->uie_task_active = 0; - spin_unlock_irqrestore(&rtc->irq_lock, flags); -} - -static void clear_uie(struct rtc_device *rtc) -{ - spin_lock_irq(&rtc->irq_lock); - if (rtc->irq_active) { - rtc->stop_uie_polling = 1; - if (rtc->uie_timer_active) { - spin_unlock_irq(&rtc->irq_lock); - del_timer_sync(&rtc->uie_timer); - spin_lock_irq(&rtc->irq_lock); - rtc->uie_timer_active = 0; - } - if (rtc->uie_task_active) { - spin_unlock_irq(&rtc->irq_lock); - flush_scheduled_work(); - spin_lock_irq(&rtc->irq_lock); - } - rtc->irq_active = 0; - } - spin_unlock_irq(&rtc->irq_lock); -} - -static int set_uie(struct rtc_device *rtc) -{ - struct rtc_time tm; - int err; - - err = rtc_read_time(&rtc->class_dev, &tm); - if (err) - return err; - spin_lock_irq(&rtc->irq_lock); - if (!rtc->irq_active) { - rtc->irq_active = 1; - rtc->stop_uie_polling = 0; - rtc->oldsecs = tm.tm_sec; - rtc->uie_task_active = 1; - if (schedule_work(&rtc->uie_task) == 0) - rtc->uie_task_active = 0; - } - rtc->irq_data = 0; - spin_unlock_irq(&rtc->irq_lock); - return 0; -} -#endif /* CONFIG_RTC_INTF_DEV_UIE_EMUL */ static ssize_t rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) @@ -214,28 +127,6 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, struct rtc_wkalrm alarm; void __user *uarg = (void __user *) arg; - /* check that the calles has appropriate permissions - * for certain ioctls. doing this check here is useful - * to avoid duplicate code in each driver. - */ - switch (cmd) { - case RTC_EPOCH_SET: - case RTC_SET_TIME: - if (!capable(CAP_SYS_TIME)) - return -EACCES; - break; - - case RTC_IRQP_SET: - if (arg > rtc->max_user_freq && !capable(CAP_SYS_RESOURCE)) - return -EACCES; - break; - - case RTC_PIE_ON: - if (!capable(CAP_SYS_RESOURCE)) - return -EACCES; - break; - } - /* avoid conflicting IRQ users */ if (cmd == RTC_PIE_ON || cmd == RTC_PIE_OFF || cmd == RTC_IRQP_SET) { spin_lock(&rtc->irq_task_lock); @@ -294,6 +185,9 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, break; case RTC_SET_TIME: + if (!capable(CAP_SYS_TIME)) + return -EACCES; + if (copy_from_user(&tm, uarg, sizeof(tm))) return -EFAULT; @@ -309,6 +203,10 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, err = -EINVAL; break; } + if (!capable(CAP_SYS_TIME)) { + err = -EACCES; + break; + } rtc_epoch = arg; err = 0; #endif @@ -334,14 +232,6 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, return -EFAULT; break; -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL - case RTC_UIE_OFF: - clear_uie(rtc); - return 0; - - case RTC_UIE_ON: - return set_uie(rtc); -#endif default: err = -ENOTTY; break; @@ -354,9 +244,6 @@ static int rtc_dev_release(struct inode *inode, struct file *file) { struct rtc_device *rtc = to_rtc_device(file->private_data); -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL - clear_uie(rtc); -#endif if (rtc->ops->release) rtc->ops->release(rtc->class_dev.dev); @@ -397,10 +284,6 @@ static int rtc_dev_add_device(struct class_device *class_dev, mutex_init(&rtc->char_lock); spin_lock_init(&rtc->irq_lock); init_waitqueue_head(&rtc->irq_queue); -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL - INIT_WORK(&rtc->uie_task, rtc_uie_task, rtc); - setup_timer(&rtc->uie_timer, rtc_uie_timer, (unsigned long)rtc); -#endif cdev_init(&rtc->char_dev, &rtc_dev_fops); rtc->char_dev.owner = rtc->owner; diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c deleted file mode 100644 index e8afb9384..000000000 --- a/drivers/rtc/rtc-ds1307.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - * rtc-ds1307.c - RTC driver for some mostly-compatible I2C chips. - * - * Copyright (C) 2005 James Chapman (ds1337 core) - * Copyright (C) 2006 David Brownell - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include - - - -/* We can't determine type by probing, but if we expect pre-Linux code - * to have set the chip up as a clock (turning on the oscillator and - * setting the date and time), Linux can ignore the non-clock features. - * That's a natural job for a factory or repair bench. - * - * If the I2C "force" mechanism is used, we assume the chip is a ds1337. - * (Much better would be board-specific tables of I2C devices, along with - * the platform_data drivers would use to sort such issues out.) - */ -enum ds_type { - unknown = 0, - ds_1307, /* or ds1338, ... */ - ds_1337, /* or ds1339, ... */ - ds_1340, /* or st m41t00, ... */ - // rs5c372 too? different address... -}; - -static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END }; - -I2C_CLIENT_INSMOD; - - - -/* RTC registers don't differ much, except for the century flag */ -#define DS1307_REG_SECS 0x00 /* 00-59 */ -# define DS1307_BIT_CH 0x80 -#define DS1307_REG_MIN 0x01 /* 00-59 */ -#define DS1307_REG_HOUR 0x02 /* 00-23, or 1-12{am,pm} */ -# define DS1340_BIT_CENTURY_EN 0x80 /* in REG_HOUR */ -# define DS1340_BIT_CENTURY 0x40 /* in REG_HOUR */ -#define DS1307_REG_WDAY 0x03 /* 01-07 */ -#define DS1307_REG_MDAY 0x04 /* 01-31 */ -#define DS1307_REG_MONTH 0x05 /* 01-12 */ -# define DS1337_BIT_CENTURY 0x80 /* in REG_MONTH */ -#define DS1307_REG_YEAR 0x06 /* 00-99 */ - -/* Other registers (control, status, alarms, trickle charge, NVRAM, etc) - * start at 7, and they differ a lot. Only control and status matter for RTC; - * be careful using them. - */ -#define DS1307_REG_CONTROL 0x07 -# define DS1307_BIT_OUT 0x80 -# define DS1307_BIT_SQWE 0x10 -# define DS1307_BIT_RS1 0x02 -# define DS1307_BIT_RS0 0x01 -#define DS1337_REG_CONTROL 0x0e -# define DS1337_BIT_nEOSC 0x80 -# define DS1337_BIT_RS2 0x10 -# define DS1337_BIT_RS1 0x08 -# define DS1337_BIT_INTCN 0x04 -# define DS1337_BIT_A2IE 0x02 -# define DS1337_BIT_A1IE 0x01 -#define DS1337_REG_STATUS 0x0f -# define DS1337_BIT_OSF 0x80 -# define DS1337_BIT_A2I 0x02 -# define DS1337_BIT_A1I 0x01 -#define DS1339_REG_TRICKLE 0x10 - - - -struct ds1307 { - u8 reg_addr; - u8 regs[8]; - enum ds_type type; - struct i2c_msg msg[2]; - struct i2c_client client; - struct rtc_device *rtc; -}; - - -static int ds1307_get_time(struct device *dev, struct rtc_time *t) -{ - struct ds1307 *ds1307 = dev_get_drvdata(dev); - int tmp; - - /* read the RTC registers all at once */ - ds1307->msg[1].flags = I2C_M_RD; - ds1307->msg[1].len = 7; - - tmp = i2c_transfer(ds1307->client.adapter, ds1307->msg, 2); - if (tmp != 2) { - dev_err(dev, "%s error %d\n", "read", tmp); - return -EIO; - } - - dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n", - "read", - ds1307->regs[0], ds1307->regs[1], - ds1307->regs[2], ds1307->regs[3], - ds1307->regs[4], ds1307->regs[5], - ds1307->regs[6]); - - t->tm_sec = BCD2BIN(ds1307->regs[DS1307_REG_SECS] & 0x7f); - t->tm_min = BCD2BIN(ds1307->regs[DS1307_REG_MIN] & 0x7f); - tmp = ds1307->regs[DS1307_REG_HOUR] & 0x3f; - t->tm_hour = BCD2BIN(tmp); - t->tm_wday = BCD2BIN(ds1307->regs[DS1307_REG_WDAY] & 0x07) - 1; - t->tm_mday = BCD2BIN(ds1307->regs[DS1307_REG_MDAY] & 0x3f); - tmp = ds1307->regs[DS1307_REG_MONTH] & 0x1f; - t->tm_mon = BCD2BIN(tmp) - 1; - - /* assume 20YY not 19YY, and ignore DS1337_BIT_CENTURY */ - t->tm_year = BCD2BIN(ds1307->regs[DS1307_REG_YEAR]) + 100; - - dev_dbg(dev, "%s secs=%d, mins=%d, " - "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", - "read", t->tm_sec, t->tm_min, - t->tm_hour, t->tm_mday, - t->tm_mon, t->tm_year, t->tm_wday); - - return 0; -} - -static int ds1307_set_time(struct device *dev, struct rtc_time *t) -{ - struct ds1307 *ds1307 = dev_get_drvdata(dev); - int result; - int tmp; - u8 *buf = ds1307->regs; - - dev_dbg(dev, "%s secs=%d, mins=%d, " - "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", - "write", dt->tm_sec, dt->tm_min, - dt->tm_hour, dt->tm_mday, - dt->tm_mon, dt->tm_year, dt->tm_wday); - - *buf++ = 0; /* first register addr */ - buf[DS1307_REG_SECS] = BIN2BCD(t->tm_sec); - buf[DS1307_REG_MIN] = BIN2BCD(t->tm_min); - buf[DS1307_REG_HOUR] = BIN2BCD(t->tm_hour); - buf[DS1307_REG_WDAY] = BIN2BCD(t->tm_wday + 1); - buf[DS1307_REG_MDAY] = BIN2BCD(t->tm_mday); - buf[DS1307_REG_MONTH] = BIN2BCD(t->tm_mon + 1); - - /* assume 20YY not 19YY */ - tmp = t->tm_year - 100; - buf[DS1307_REG_YEAR] = BIN2BCD(tmp); - - if (ds1307->type == ds_1337) - buf[DS1307_REG_MONTH] |= DS1337_BIT_CENTURY; - else if (ds1307->type == ds_1340) - buf[DS1307_REG_HOUR] |= DS1340_BIT_CENTURY_EN - | DS1340_BIT_CENTURY; - - ds1307->msg[1].flags = 0; - ds1307->msg[1].len = 8; - - dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x\n", - "write", buf[0], buf[1], buf[2], buf[3], - buf[4], buf[5], buf[6]); - - result = i2c_transfer(ds1307->client.adapter, &ds1307->msg[1], 1); - if (result != 1) { - dev_err(dev, "%s error %d\n", "write", tmp); - return -EIO; - } - return 0; -} - -static struct rtc_class_ops ds13xx_rtc_ops = { - .read_time = ds1307_get_time, - .set_time = ds1307_set_time, -}; - -static struct i2c_driver ds1307_driver; - -static int __devinit -ds1307_detect(struct i2c_adapter *adapter, int address, int kind) -{ - struct ds1307 *ds1307; - int err = -ENODEV; - struct i2c_client *client; - int tmp; - - if (!(ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL))) { - err = -ENOMEM; - goto exit; - } - - client = &ds1307->client; - client->addr = address; - client->adapter = adapter; - client->driver = &ds1307_driver; - client->flags = 0; - - i2c_set_clientdata(client, ds1307); - - ds1307->msg[0].addr = client->addr; - ds1307->msg[0].flags = 0; - ds1307->msg[0].len = 1; - ds1307->msg[0].buf = &ds1307->reg_addr; - - ds1307->msg[1].addr = client->addr; - ds1307->msg[1].flags = I2C_M_RD; - ds1307->msg[1].len = sizeof(ds1307->regs); - ds1307->msg[1].buf = ds1307->regs; - - /* HACK: "force" implies "needs ds1337-style-oscillator setup" */ - if (kind >= 0) { - ds1307->type = ds_1337; - - ds1307->reg_addr = DS1337_REG_CONTROL; - ds1307->msg[1].len = 2; - - tmp = i2c_transfer(client->adapter, ds1307->msg, 2); - if (tmp != 2) { - pr_debug("read error %d\n", tmp); - err = -EIO; - goto exit_free; - } - - ds1307->reg_addr = 0; - ds1307->msg[1].len = sizeof(ds1307->regs); - - /* oscillator is off; need to turn it on */ - if ((ds1307->regs[0] & DS1337_BIT_nEOSC) - || (ds1307->regs[1] & DS1337_BIT_OSF)) { - printk(KERN_ERR "no ds1337 oscillator code\n"); - goto exit_free; - } - } else - ds1307->type = ds_1307; - -read_rtc: - /* read RTC registers */ - - tmp = i2c_transfer(client->adapter, ds1307->msg, 2); - if (tmp != 2) { - pr_debug("read error %d\n", tmp); - err = -EIO; - goto exit_free; - } - - /* minimal sanity checking; some chips (like DS1340) don't - * specify the extra bits as must-be-zero, but there are - * still a few values that are clearly out-of-range. - */ - tmp = ds1307->regs[DS1307_REG_SECS]; - if (tmp & DS1307_BIT_CH) { - if (ds1307->type && ds1307->type != ds_1307) { - pr_debug("not a ds1307?\n"); - goto exit_free; - } - ds1307->type = ds_1307; - - /* this partial initialization should work for ds1307, - * ds1338, ds1340, st m41t00, and more. - */ - dev_warn(&client->dev, "oscillator started; SET TIME!\n"); - i2c_smbus_write_byte_data(client, 0, 0); - goto read_rtc; - } - tmp = BCD2BIN(tmp & 0x7f); - if (tmp > 60) - goto exit_free; - tmp = BCD2BIN(ds1307->regs[DS1307_REG_MIN] & 0x7f); - if (tmp > 60) - goto exit_free; - - tmp = BCD2BIN(ds1307->regs[DS1307_REG_MDAY] & 0x3f); - if (tmp == 0 || tmp > 31) - goto exit_free; - - tmp = BCD2BIN(ds1307->regs[DS1307_REG_MONTH] & 0x1f); - if (tmp == 0 || tmp > 12) - goto exit_free; - - /* force into in 24 hour mode (most chips) or - * disable century bit (ds1340) - */ - tmp = ds1307->regs[DS1307_REG_HOUR]; - if (tmp & (1 << 6)) { - if (tmp & (1 << 5)) - tmp = BCD2BIN(tmp & 0x1f) + 12; - else - tmp = BCD2BIN(tmp); - i2c_smbus_write_byte_data(client, - DS1307_REG_HOUR, - BIN2BCD(tmp)); - } - - /* FIXME chips like 1337 can generate alarm irqs too; those are - * worth exposing through the API (especially when the irq is - * wakeup-capable). - */ - - switch (ds1307->type) { - case unknown: - strlcpy(client->name, "unknown", I2C_NAME_SIZE); - break; - case ds_1307: - strlcpy(client->name, "ds1307", I2C_NAME_SIZE); - break; - case ds_1337: - strlcpy(client->name, "ds1337", I2C_NAME_SIZE); - break; - case ds_1340: - strlcpy(client->name, "ds1340", I2C_NAME_SIZE); - break; - } - - /* Tell the I2C layer a new client has arrived */ - if ((err = i2c_attach_client(client))) - goto exit_free; - - ds1307->rtc = rtc_device_register(client->name, &client->dev, - &ds13xx_rtc_ops, THIS_MODULE); - if (IS_ERR(ds1307->rtc)) { - err = PTR_ERR(ds1307->rtc); - dev_err(&client->dev, - "unable to register the class device\n"); - goto exit_detach; - } - - return 0; - -exit_detach: - i2c_detach_client(client); -exit_free: - kfree(ds1307); -exit: - return err; -} - -static int __devinit -ds1307_attach_adapter(struct i2c_adapter *adapter) -{ - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) - return 0; - return i2c_probe(adapter, &addr_data, ds1307_detect); -} - -static int __devexit ds1307_detach_client(struct i2c_client *client) -{ - int err; - struct ds1307 *ds1307 = i2c_get_clientdata(client); - - rtc_device_unregister(ds1307->rtc); - if ((err = i2c_detach_client(client))) - return err; - kfree(ds1307); - return 0; -} - -static struct i2c_driver ds1307_driver = { - .driver = { - .name = "ds1307", - .owner = THIS_MODULE, - }, - .attach_adapter = ds1307_attach_adapter, - .detach_client = __devexit_p(ds1307_detach_client), -}; - -static int __init ds1307_init(void) -{ - return i2c_add_driver(&ds1307_driver); -} -module_init(ds1307_init); - -static void __exit ds1307_exit(void) -{ - i2c_del_driver(&ds1307_driver); -} -module_exit(ds1307_exit); - -MODULE_DESCRIPTION("RTC driver for DS1307 and similar chips"); -MODULE_LICENSE("GPL"); diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c deleted file mode 100644 index 209001495..000000000 --- a/drivers/rtc/rtc-ds1553.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * An rtc driver for the Dallas DS1553 - * - * Copyright (C) 2006 Atsushi Nemoto - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.1" - -#define RTC_REG_SIZE 0x2000 -#define RTC_OFFSET 0x1ff0 - -#define RTC_FLAGS (RTC_OFFSET + 0) -#define RTC_SECONDS_ALARM (RTC_OFFSET + 2) -#define RTC_MINUTES_ALARM (RTC_OFFSET + 3) -#define RTC_HOURS_ALARM (RTC_OFFSET + 4) -#define RTC_DATE_ALARM (RTC_OFFSET + 5) -#define RTC_INTERRUPTS (RTC_OFFSET + 6) -#define RTC_WATCHDOG (RTC_OFFSET + 7) -#define RTC_CONTROL (RTC_OFFSET + 8) -#define RTC_CENTURY (RTC_OFFSET + 8) -#define RTC_SECONDS (RTC_OFFSET + 9) -#define RTC_MINUTES (RTC_OFFSET + 10) -#define RTC_HOURS (RTC_OFFSET + 11) -#define RTC_DAY (RTC_OFFSET + 12) -#define RTC_DATE (RTC_OFFSET + 13) -#define RTC_MONTH (RTC_OFFSET + 14) -#define RTC_YEAR (RTC_OFFSET + 15) - -#define RTC_CENTURY_MASK 0x3f -#define RTC_SECONDS_MASK 0x7f -#define RTC_DAY_MASK 0x07 - -/* Bits in the Control/Century register */ -#define RTC_WRITE 0x80 -#define RTC_READ 0x40 - -/* Bits in the Seconds register */ -#define RTC_STOP 0x80 - -/* Bits in the Flags register */ -#define RTC_FLAGS_AF 0x40 -#define RTC_FLAGS_BLF 0x10 - -/* Bits in the Interrupts register */ -#define RTC_INTS_AE 0x80 - -struct rtc_plat_data { - struct rtc_device *rtc; - void __iomem *ioaddr; - unsigned long baseaddr; - unsigned long last_jiffies; - int irq; - unsigned int irqen; - int alrm_sec; - int alrm_min; - int alrm_hour; - int alrm_mday; -}; - -static int ds1553_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - u8 century; - - century = BIN2BCD((tm->tm_year + 1900) / 100); - - writeb(RTC_WRITE, pdata->ioaddr + RTC_CONTROL); - - writeb(BIN2BCD(tm->tm_year % 100), ioaddr + RTC_YEAR); - writeb(BIN2BCD(tm->tm_mon + 1), ioaddr + RTC_MONTH); - writeb(BIN2BCD(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); - writeb(BIN2BCD(tm->tm_mday), ioaddr + RTC_DATE); - writeb(BIN2BCD(tm->tm_hour), ioaddr + RTC_HOURS); - writeb(BIN2BCD(tm->tm_min), ioaddr + RTC_MINUTES); - writeb(BIN2BCD(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); - - /* RTC_CENTURY and RTC_CONTROL share same register */ - writeb(RTC_WRITE | (century & RTC_CENTURY_MASK), ioaddr + RTC_CENTURY); - writeb(century & RTC_CENTURY_MASK, ioaddr + RTC_CONTROL); - return 0; -} - -static int ds1553_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - unsigned int year, month, day, hour, minute, second, week; - unsigned int century; - - /* give enough time to update RTC in case of continuous read */ - if (pdata->last_jiffies == jiffies) - msleep(1); - pdata->last_jiffies = jiffies; - writeb(RTC_READ, ioaddr + RTC_CONTROL); - second = readb(ioaddr + RTC_SECONDS) & RTC_SECONDS_MASK; - minute = readb(ioaddr + RTC_MINUTES); - hour = readb(ioaddr + RTC_HOURS); - day = readb(ioaddr + RTC_DATE); - week = readb(ioaddr + RTC_DAY) & RTC_DAY_MASK; - month = readb(ioaddr + RTC_MONTH); - year = readb(ioaddr + RTC_YEAR); - century = readb(ioaddr + RTC_CENTURY) & RTC_CENTURY_MASK; - writeb(0, ioaddr + RTC_CONTROL); - tm->tm_sec = BCD2BIN(second); - tm->tm_min = BCD2BIN(minute); - tm->tm_hour = BCD2BIN(hour); - tm->tm_mday = BCD2BIN(day); - tm->tm_wday = BCD2BIN(week); - tm->tm_mon = BCD2BIN(month) - 1; - /* year is 1900 + tm->tm_year */ - tm->tm_year = BCD2BIN(year) + BCD2BIN(century) * 100 - 1900; - - if (rtc_valid_tm(tm) < 0) { - dev_err(dev, "retrieved date/time is not valid.\n"); - rtc_time_to_tm(0, tm); - } - return 0; -} - -static void ds1553_rtc_update_alarm(struct rtc_plat_data *pdata) -{ - void __iomem *ioaddr = pdata->ioaddr; - unsigned long flags; - - spin_lock_irqsave(&pdata->rtc->irq_lock, flags); - writeb(pdata->alrm_mday < 0 || (pdata->irqen & RTC_UF) ? - 0x80 : BIN2BCD(pdata->alrm_mday), - ioaddr + RTC_DATE_ALARM); - writeb(pdata->alrm_hour < 0 || (pdata->irqen & RTC_UF) ? - 0x80 : BIN2BCD(pdata->alrm_hour), - ioaddr + RTC_HOURS_ALARM); - writeb(pdata->alrm_min < 0 || (pdata->irqen & RTC_UF) ? - 0x80 : BIN2BCD(pdata->alrm_min), - ioaddr + RTC_MINUTES_ALARM); - writeb(pdata->alrm_sec < 0 || (pdata->irqen & RTC_UF) ? - 0x80 : BIN2BCD(pdata->alrm_sec), - ioaddr + RTC_SECONDS_ALARM); - writeb(pdata->irqen ? RTC_INTS_AE : 0, ioaddr + RTC_INTERRUPTS); - readb(ioaddr + RTC_FLAGS); /* clear interrupts */ - spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags); -} - -static int ds1553_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - if (pdata->irq < 0) - return -EINVAL; - pdata->alrm_mday = alrm->time.tm_mday; - pdata->alrm_hour = alrm->time.tm_hour; - pdata->alrm_min = alrm->time.tm_min; - pdata->alrm_sec = alrm->time.tm_sec; - if (alrm->enabled) - pdata->irqen |= RTC_AF; - ds1553_rtc_update_alarm(pdata); - return 0; -} - -static int ds1553_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - if (pdata->irq < 0) - return -EINVAL; - alrm->time.tm_mday = pdata->alrm_mday < 0 ? 0 : pdata->alrm_mday; - alrm->time.tm_hour = pdata->alrm_hour < 0 ? 0 : pdata->alrm_hour; - alrm->time.tm_min = pdata->alrm_min < 0 ? 0 : pdata->alrm_min; - alrm->time.tm_sec = pdata->alrm_sec < 0 ? 0 : pdata->alrm_sec; - alrm->enabled = (pdata->irqen & RTC_AF) ? 1 : 0; - return 0; -} - -static irqreturn_t ds1553_rtc_interrupt(int irq, void *dev_id, - struct pt_regs *regs) -{ - struct platform_device *pdev = dev_id; - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - unsigned long events = RTC_IRQF; - - /* read and clear interrupt */ - if (!(readb(ioaddr + RTC_FLAGS) & RTC_FLAGS_AF)) - return IRQ_NONE; - if (readb(ioaddr + RTC_SECONDS_ALARM) & 0x80) - events |= RTC_UF; - else - events |= RTC_AF; - rtc_update_irq(&pdata->rtc->class_dev, 1, events); - return IRQ_HANDLED; -} - -static void ds1553_rtc_release(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - if (pdata->irq >= 0) { - pdata->irqen = 0; - ds1553_rtc_update_alarm(pdata); - } -} - -static int ds1553_rtc_ioctl(struct device *dev, unsigned int cmd, - unsigned long arg) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - if (pdata->irq < 0) - return -ENOIOCTLCMD; /* fall back into rtc-dev's emulation */ - switch (cmd) { - case RTC_AIE_OFF: - pdata->irqen &= ~RTC_AF; - ds1553_rtc_update_alarm(pdata); - break; - case RTC_AIE_ON: - pdata->irqen |= RTC_AF; - ds1553_rtc_update_alarm(pdata); - break; - case RTC_UIE_OFF: - pdata->irqen &= ~RTC_UF; - ds1553_rtc_update_alarm(pdata); - break; - case RTC_UIE_ON: - pdata->irqen |= RTC_UF; - ds1553_rtc_update_alarm(pdata); - break; - default: - return -ENOIOCTLCMD; - } - return 0; -} - -static struct rtc_class_ops ds1553_rtc_ops = { - .read_time = ds1553_rtc_read_time, - .set_time = ds1553_rtc_set_time, - .read_alarm = ds1553_rtc_read_alarm, - .set_alarm = ds1553_rtc_set_alarm, - .release = ds1553_rtc_release, - .ioctl = ds1553_rtc_ioctl, -}; - -static ssize_t ds1553_nvram_read(struct kobject *kobj, char *buf, - loff_t pos, size_t size) -{ - struct platform_device *pdev = - to_platform_device(container_of(kobj, struct device, kobj)); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - ssize_t count; - - for (count = 0; size > 0 && pos < RTC_OFFSET; count++, size--) - *buf++ = readb(ioaddr + pos++); - return count; -} - -static ssize_t ds1553_nvram_write(struct kobject *kobj, char *buf, - loff_t pos, size_t size) -{ - struct platform_device *pdev = - to_platform_device(container_of(kobj, struct device, kobj)); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - ssize_t count; - - for (count = 0; size > 0 && pos < RTC_OFFSET; count++, size--) - writeb(*buf++, ioaddr + pos++); - return count; -} - -static struct bin_attribute ds1553_nvram_attr = { - .attr = { - .name = "nvram", - .mode = S_IRUGO | S_IWUGO, - .owner = THIS_MODULE, - }, - .size = RTC_OFFSET, - .read = ds1553_nvram_read, - .write = ds1553_nvram_write, -}; - -static int __init ds1553_rtc_probe(struct platform_device *pdev) -{ - struct rtc_device *rtc; - struct resource *res; - unsigned int cen, sec; - struct rtc_plat_data *pdata = NULL; - void __iomem *ioaddr = NULL; - int ret = 0; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return -ENOMEM; - pdata->irq = -1; - if (!request_mem_region(res->start, RTC_REG_SIZE, pdev->name)) { - ret = -EBUSY; - goto out; - } - pdata->baseaddr = res->start; - ioaddr = ioremap(pdata->baseaddr, RTC_REG_SIZE); - if (!ioaddr) { - ret = -ENOMEM; - goto out; - } - pdata->ioaddr = ioaddr; - pdata->irq = platform_get_irq(pdev, 0); - - /* turn RTC on if it was not on */ - sec = readb(ioaddr + RTC_SECONDS); - if (sec & RTC_STOP) { - sec &= RTC_SECONDS_MASK; - cen = readb(ioaddr + RTC_CENTURY) & RTC_CENTURY_MASK; - writeb(RTC_WRITE, ioaddr + RTC_CONTROL); - writeb(sec, ioaddr + RTC_SECONDS); - writeb(cen & RTC_CENTURY_MASK, ioaddr + RTC_CONTROL); - } - if (readb(ioaddr + RTC_FLAGS) & RTC_FLAGS_BLF) - dev_warn(&pdev->dev, "voltage-low detected.\n"); - - if (pdata->irq >= 0) { - writeb(0, ioaddr + RTC_INTERRUPTS); - if (request_irq(pdata->irq, ds1553_rtc_interrupt, IRQF_SHARED, - pdev->name, pdev) < 0) { - dev_warn(&pdev->dev, "interrupt not available.\n"); - pdata->irq = -1; - } - } - - rtc = rtc_device_register(pdev->name, &pdev->dev, - &ds1553_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { - ret = PTR_ERR(rtc); - goto out; - } - pdata->rtc = rtc; - pdata->last_jiffies = jiffies; - platform_set_drvdata(pdev, pdata); - sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); - return 0; - out: - if (pdata->irq >= 0) - free_irq(pdata->irq, pdev); - if (ioaddr) - iounmap(ioaddr); - if (pdata->baseaddr) - release_mem_region(pdata->baseaddr, RTC_REG_SIZE); - kfree(pdata); - return ret; -} - -static int __devexit ds1553_rtc_remove(struct platform_device *pdev) -{ - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - sysfs_remove_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); - rtc_device_unregister(pdata->rtc); - if (pdata->irq >= 0) { - writeb(0, pdata->ioaddr + RTC_INTERRUPTS); - free_irq(pdata->irq, pdev); - } - iounmap(pdata->ioaddr); - release_mem_region(pdata->baseaddr, RTC_REG_SIZE); - kfree(pdata); - return 0; -} - -static struct platform_driver ds1553_rtc_driver = { - .probe = ds1553_rtc_probe, - .remove = __devexit_p(ds1553_rtc_remove), - .driver = { - .name = "ds1553", - .owner = THIS_MODULE, - }, -}; - -static __init int ds1553_init(void) -{ - return platform_driver_register(&ds1553_rtc_driver); -} - -static __exit void ds1553_exit(void) -{ - return platform_driver_unregister(&ds1553_rtc_driver); -} - -module_init(ds1553_init); -module_exit(ds1553_exit); - -MODULE_AUTHOR("Atsushi Nemoto "); -MODULE_DESCRIPTION("Dallas DS1553 RTC driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c deleted file mode 100644 index 8e47e5a06..000000000 --- a/drivers/rtc/rtc-ds1742.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - * An rtc driver for the Dallas DS1742 - * - * Copyright (C) 2006 Atsushi Nemoto - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.1" - -#define RTC_REG_SIZE 0x800 -#define RTC_OFFSET 0x7f8 - -#define RTC_CONTROL (RTC_OFFSET + 0) -#define RTC_CENTURY (RTC_OFFSET + 0) -#define RTC_SECONDS (RTC_OFFSET + 1) -#define RTC_MINUTES (RTC_OFFSET + 2) -#define RTC_HOURS (RTC_OFFSET + 3) -#define RTC_DAY (RTC_OFFSET + 4) -#define RTC_DATE (RTC_OFFSET + 5) -#define RTC_MONTH (RTC_OFFSET + 6) -#define RTC_YEAR (RTC_OFFSET + 7) - -#define RTC_CENTURY_MASK 0x3f -#define RTC_SECONDS_MASK 0x7f -#define RTC_DAY_MASK 0x07 - -/* Bits in the Control/Century register */ -#define RTC_WRITE 0x80 -#define RTC_READ 0x40 - -/* Bits in the Seconds register */ -#define RTC_STOP 0x80 - -/* Bits in the Day register */ -#define RTC_BATT_FLAG 0x80 - -struct rtc_plat_data { - struct rtc_device *rtc; - void __iomem *ioaddr; - unsigned long baseaddr; - unsigned long last_jiffies; -}; - -static int ds1742_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - u8 century; - - century = BIN2BCD((tm->tm_year + 1900) / 100); - - writeb(RTC_WRITE, ioaddr + RTC_CONTROL); - - writeb(BIN2BCD(tm->tm_year % 100), ioaddr + RTC_YEAR); - writeb(BIN2BCD(tm->tm_mon + 1), ioaddr + RTC_MONTH); - writeb(BIN2BCD(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); - writeb(BIN2BCD(tm->tm_mday), ioaddr + RTC_DATE); - writeb(BIN2BCD(tm->tm_hour), ioaddr + RTC_HOURS); - writeb(BIN2BCD(tm->tm_min), ioaddr + RTC_MINUTES); - writeb(BIN2BCD(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); - - /* RTC_CENTURY and RTC_CONTROL share same register */ - writeb(RTC_WRITE | (century & RTC_CENTURY_MASK), ioaddr + RTC_CENTURY); - writeb(century & RTC_CENTURY_MASK, ioaddr + RTC_CONTROL); - return 0; -} - -static int ds1742_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - unsigned int year, month, day, hour, minute, second, week; - unsigned int century; - - /* give enough time to update RTC in case of continuous read */ - if (pdata->last_jiffies == jiffies) - msleep(1); - pdata->last_jiffies = jiffies; - writeb(RTC_READ, ioaddr + RTC_CONTROL); - second = readb(ioaddr + RTC_SECONDS) & RTC_SECONDS_MASK; - minute = readb(ioaddr + RTC_MINUTES); - hour = readb(ioaddr + RTC_HOURS); - day = readb(ioaddr + RTC_DATE); - week = readb(ioaddr + RTC_DAY) & RTC_DAY_MASK; - month = readb(ioaddr + RTC_MONTH); - year = readb(ioaddr + RTC_YEAR); - century = readb(ioaddr + RTC_CENTURY) & RTC_CENTURY_MASK; - writeb(0, ioaddr + RTC_CONTROL); - tm->tm_sec = BCD2BIN(second); - tm->tm_min = BCD2BIN(minute); - tm->tm_hour = BCD2BIN(hour); - tm->tm_mday = BCD2BIN(day); - tm->tm_wday = BCD2BIN(week); - tm->tm_mon = BCD2BIN(month) - 1; - /* year is 1900 + tm->tm_year */ - tm->tm_year = BCD2BIN(year) + BCD2BIN(century) * 100 - 1900; - - if (rtc_valid_tm(tm) < 0) { - dev_err(dev, "retrieved date/time is not valid.\n"); - rtc_time_to_tm(0, tm); - } - return 0; -} - -static struct rtc_class_ops ds1742_rtc_ops = { - .read_time = ds1742_rtc_read_time, - .set_time = ds1742_rtc_set_time, -}; - -static ssize_t ds1742_nvram_read(struct kobject *kobj, char *buf, - loff_t pos, size_t size) -{ - struct platform_device *pdev = - to_platform_device(container_of(kobj, struct device, kobj)); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - ssize_t count; - - for (count = 0; size > 0 && pos < RTC_OFFSET; count++, size--) - *buf++ = readb(ioaddr + pos++); - return count; -} - -static ssize_t ds1742_nvram_write(struct kobject *kobj, char *buf, - loff_t pos, size_t size) -{ - struct platform_device *pdev = - to_platform_device(container_of(kobj, struct device, kobj)); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - void __iomem *ioaddr = pdata->ioaddr; - ssize_t count; - - for (count = 0; size > 0 && pos < RTC_OFFSET; count++, size--) - writeb(*buf++, ioaddr + pos++); - return count; -} - -static struct bin_attribute ds1742_nvram_attr = { - .attr = { - .name = "nvram", - .mode = S_IRUGO | S_IWUGO, - .owner = THIS_MODULE, - }, - .size = RTC_OFFSET, - .read = ds1742_nvram_read, - .write = ds1742_nvram_write, -}; - -static int __init ds1742_rtc_probe(struct platform_device *pdev) -{ - struct rtc_device *rtc; - struct resource *res; - unsigned int cen, sec; - struct rtc_plat_data *pdata = NULL; - void __iomem *ioaddr = NULL; - int ret = 0; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return -ENOMEM; - if (!request_mem_region(res->start, RTC_REG_SIZE, pdev->name)) { - ret = -EBUSY; - goto out; - } - pdata->baseaddr = res->start; - ioaddr = ioremap(pdata->baseaddr, RTC_REG_SIZE); - if (!ioaddr) { - ret = -ENOMEM; - goto out; - } - pdata->ioaddr = ioaddr; - - /* turn RTC on if it was not on */ - sec = readb(ioaddr + RTC_SECONDS); - if (sec & RTC_STOP) { - sec &= RTC_SECONDS_MASK; - cen = readb(ioaddr + RTC_CENTURY) & RTC_CENTURY_MASK; - writeb(RTC_WRITE, ioaddr + RTC_CONTROL); - writeb(sec, ioaddr + RTC_SECONDS); - writeb(cen & RTC_CENTURY_MASK, ioaddr + RTC_CONTROL); - } - if (readb(ioaddr + RTC_DAY) & RTC_BATT_FLAG) - dev_warn(&pdev->dev, "voltage-low detected.\n"); - - rtc = rtc_device_register(pdev->name, &pdev->dev, - &ds1742_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { - ret = PTR_ERR(rtc); - goto out; - } - pdata->rtc = rtc; - pdata->last_jiffies = jiffies; - platform_set_drvdata(pdev, pdata); - sysfs_create_bin_file(&pdev->dev.kobj, &ds1742_nvram_attr); - return 0; - out: - if (ioaddr) - iounmap(ioaddr); - if (pdata->baseaddr) - release_mem_region(pdata->baseaddr, RTC_REG_SIZE); - kfree(pdata); - return ret; -} - -static int __devexit ds1742_rtc_remove(struct platform_device *pdev) -{ - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); - - sysfs_remove_bin_file(&pdev->dev.kobj, &ds1742_nvram_attr); - rtc_device_unregister(pdata->rtc); - iounmap(pdata->ioaddr); - release_mem_region(pdata->baseaddr, RTC_REG_SIZE); - kfree(pdata); - return 0; -} - -static struct platform_driver ds1742_rtc_driver = { - .probe = ds1742_rtc_probe, - .remove = __devexit_p(ds1742_rtc_remove), - .driver = { - .name = "ds1742", - .owner = THIS_MODULE, - }, -}; - -static __init int ds1742_init(void) -{ - return platform_driver_register(&ds1742_rtc_driver); -} - -static __exit void ds1742_exit(void) -{ - return platform_driver_unregister(&ds1742_rtc_driver); -} - -module_init(ds1742_init); -module_exit(ds1742_exit); - -MODULE_AUTHOR("Atsushi Nemoto "); -MODULE_DESCRIPTION("Dallas DS1742 RTC driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c deleted file mode 100644 index f324d0a63..000000000 --- a/drivers/rtc/rtc-isl1208.c +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Intersil ISL1208 rtc class driver - * - * Copyright 2005,2006 Hebert Valerio Riedel - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - */ - -#include -#include -#include -#include - -#define DRV_NAME "isl1208" -#define DRV_VERSION "0.2" - -/* Register map */ -/* rtc section */ -#define ISL1208_REG_SC 0x00 -#define ISL1208_REG_MN 0x01 -#define ISL1208_REG_HR 0x02 -#define ISL1208_REG_HR_MIL (1<<7) /* 24h/12h mode */ -#define ISL1208_REG_HR_PM (1<<5) /* PM/AM bit in 12h mode */ -#define ISL1208_REG_DT 0x03 -#define ISL1208_REG_MO 0x04 -#define ISL1208_REG_YR 0x05 -#define ISL1208_REG_DW 0x06 -#define ISL1208_RTC_SECTION_LEN 7 - -/* control/status section */ -#define ISL1208_REG_SR 0x07 -#define ISL1208_REG_SR_ARST (1<<7) /* auto reset */ -#define ISL1208_REG_SR_XTOSCB (1<<6) /* crystal oscillator */ -#define ISL1208_REG_SR_WRTC (1<<4) /* write rtc */ -#define ISL1208_REG_SR_ALM (1<<2) /* alarm */ -#define ISL1208_REG_SR_BAT (1<<1) /* battery */ -#define ISL1208_REG_SR_RTCF (1<<0) /* rtc fail */ -#define ISL1208_REG_INT 0x08 -#define ISL1208_REG_09 0x09 /* reserved */ -#define ISL1208_REG_ATR 0x0a -#define ISL1208_REG_DTR 0x0b - -/* alarm section */ -#define ISL1208_REG_SCA 0x0c -#define ISL1208_REG_MNA 0x0d -#define ISL1208_REG_HRA 0x0e -#define ISL1208_REG_DTA 0x0f -#define ISL1208_REG_MOA 0x10 -#define ISL1208_REG_DWA 0x11 -#define ISL1208_ALARM_SECTION_LEN 6 - -/* user section */ -#define ISL1208_REG_USR1 0x12 -#define ISL1208_REG_USR2 0x13 -#define ISL1208_USR_SECTION_LEN 2 - -/* i2c configuration */ -#define ISL1208_I2C_ADDR 0xde - -static unsigned short normal_i2c[] = { - ISL1208_I2C_ADDR>>1, I2C_CLIENT_END -}; -I2C_CLIENT_INSMOD; /* defines addr_data */ - -static int isl1208_attach_adapter(struct i2c_adapter *adapter); -static int isl1208_detach_client(struct i2c_client *client); - -static struct i2c_driver isl1208_driver = { - .driver = { - .name = DRV_NAME, - }, - .id = I2C_DRIVERID_ISL1208, - .attach_adapter = &isl1208_attach_adapter, - .detach_client = &isl1208_detach_client, -}; - -/* block read */ -static int -isl1208_i2c_read_regs(struct i2c_client *client, u8 reg, u8 buf[], - unsigned len) -{ - u8 reg_addr[1] = { reg }; - struct i2c_msg msgs[2] = { - { client->addr, client->flags, sizeof(reg_addr), reg_addr }, - { client->addr, client->flags | I2C_M_RD, len, buf } - }; - int ret; - - BUG_ON(len == 0); - BUG_ON(reg > ISL1208_REG_USR2); - BUG_ON(reg + len > ISL1208_REG_USR2 + 1); - - ret = i2c_transfer(client->adapter, msgs, 2); - if (ret > 0) - ret = 0; - return ret; -} - -/* block write */ -static int -isl1208_i2c_set_regs(struct i2c_client *client, u8 reg, u8 const buf[], - unsigned len) -{ - u8 i2c_buf[ISL1208_REG_USR2 + 2]; - struct i2c_msg msgs[1] = { - { client->addr, client->flags, len + 1, i2c_buf } - }; - int ret; - - BUG_ON(len == 0); - BUG_ON(reg > ISL1208_REG_USR2); - BUG_ON(reg + len > ISL1208_REG_USR2 + 1); - - i2c_buf[0] = reg; - memcpy(&i2c_buf[1], &buf[0], len); - - ret = i2c_transfer(client->adapter, msgs, 1); - if (ret > 0) - ret = 0; - return ret; -} - -/* simple check to see wether we have a isl1208 */ -static int isl1208_i2c_validate_client(struct i2c_client *client) -{ - u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, }; - u8 zero_mask[ISL1208_RTC_SECTION_LEN] = { - 0x80, 0x80, 0x40, 0xc0, 0xe0, 0x00, 0xf8 - }; - int i; - int ret; - - ret = isl1208_i2c_read_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); - if (ret < 0) - return ret; - - for (i = 0; i < ISL1208_RTC_SECTION_LEN; ++i) { - if (regs[i] & zero_mask[i]) /* check if bits are cleared */ - return -ENODEV; - } - - return 0; -} - -static int isl1208_i2c_get_sr(struct i2c_client *client) -{ - return i2c_smbus_read_byte_data(client, ISL1208_REG_SR) == -1 ? -EIO:0; -} - -static int isl1208_i2c_get_atr(struct i2c_client *client) -{ - int atr = i2c_smbus_read_byte_data(client, ISL1208_REG_ATR); - - if (atr < 0) - return -EIO; - - /* The 6bit value in the ATR register controls the load - * capacitance C_load * in steps of 0.25pF - * - * bit (1<<5) of the ATR register is inverted - * - * C_load(ATR=0x20) = 4.50pF - * C_load(ATR=0x00) = 12.50pF - * C_load(ATR=0x1f) = 20.25pF - * - */ - - atr &= 0x3f; /* mask out lsb */ - atr ^= 1<<5; /* invert 6th bit */ - atr += 2*9; /* add offset of 4.5pF; unit[atr] = 0.25pF */ - - return atr; -} - -static int isl1208_i2c_get_dtr(struct i2c_client *client) -{ - int dtr = i2c_smbus_read_byte_data(client, ISL1208_REG_DTR); - - if (dtr < 0) - return -EIO; - - /* dtr encodes adjustments of {-60,-40,-20,0,20,40,60} ppm */ - dtr = ((dtr & 0x3) * 20) * (dtr & (1<<2) ? -1 : 1); - - return dtr; -} - -static int isl1208_i2c_get_usr(struct i2c_client *client) -{ - u8 buf[ISL1208_USR_SECTION_LEN] = { 0, }; - int ret; - - ret = isl1208_i2c_read_regs (client, ISL1208_REG_USR1, buf, - ISL1208_USR_SECTION_LEN); - if (ret < 0) - return ret; - - return (buf[1] << 8) | buf[0]; -} - -static int isl1208_i2c_set_usr(struct i2c_client *client, u16 usr) -{ - u8 buf[ISL1208_USR_SECTION_LEN]; - - buf[0] = usr & 0xff; - buf[1] = (usr >> 8) & 0xff; - - return isl1208_i2c_set_regs (client, ISL1208_REG_USR1, buf, - ISL1208_USR_SECTION_LEN); -} - -static int isl1208_rtc_proc(struct device *dev, struct seq_file *seq) -{ - struct i2c_client *const client = to_i2c_client(dev); - int sr, dtr, atr, usr; - - sr = isl1208_i2c_get_sr(client); - if (sr < 0) { - dev_err(&client->dev, "%s: reading SR failed\n", __func__); - return sr; - } - - seq_printf(seq, "status_reg\t:%s%s%s%s%s%s (0x%.2x)\n", - (sr & ISL1208_REG_SR_RTCF) ? " RTCF" : "", - (sr & ISL1208_REG_SR_BAT) ? " BAT" : "", - (sr & ISL1208_REG_SR_ALM) ? " ALM" : "", - (sr & ISL1208_REG_SR_WRTC) ? " WRTC" : "", - (sr & ISL1208_REG_SR_XTOSCB) ? " XTOSCB" : "", - (sr & ISL1208_REG_SR_ARST) ? " ARST" : "", - sr); - - seq_printf(seq, "batt_status\t: %s\n", - (sr & ISL1208_REG_SR_RTCF) ? "bad" : "okay"); - - dtr = isl1208_i2c_get_dtr(client); - if (dtr >= 0 -1) - seq_printf(seq, "digital_trim\t: %d ppm\n", dtr); - - atr = isl1208_i2c_get_atr(client); - if (atr >= 0) - seq_printf(seq, "analog_trim\t: %d.%.2d pF\n", - atr>>2, (atr&0x3)*25); - - usr = isl1208_i2c_get_usr(client); - if (usr >= 0) - seq_printf(seq, "user_data\t: 0x%.4x\n", usr); - - return 0; -} - - -static int isl1208_i2c_read_time(struct i2c_client *client, - struct rtc_time *tm) -{ - int sr; - u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, }; - - sr = isl1208_i2c_get_sr(client); - if (sr < 0) { - dev_err(&client->dev, "%s: reading SR failed\n", __func__); - return -EIO; - } - - sr = isl1208_i2c_read_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); - if (sr < 0) { - dev_err(&client->dev, "%s: reading RTC section failed\n", - __func__); - return sr; - } - - tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SC]); - tm->tm_min = BCD2BIN(regs[ISL1208_REG_MN]); - { /* HR field has a more complex interpretation */ - const u8 _hr = regs[ISL1208_REG_HR]; - if (_hr & ISL1208_REG_HR_MIL) /* 24h format */ - tm->tm_hour = BCD2BIN(_hr & 0x3f); - else { // 12h format - tm->tm_hour = BCD2BIN(_hr & 0x1f); - if (_hr & ISL1208_REG_HR_PM) /* PM flag set */ - tm->tm_hour += 12; - } - } - - tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DT]); - tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */ - tm->tm_year = BCD2BIN(regs[ISL1208_REG_YR]) + 100; - tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DW]); - - return 0; -} - -static int isl1208_i2c_read_alarm(struct i2c_client *client, - struct rtc_wkalrm *alarm) -{ - struct rtc_time *const tm = &alarm->time; - u8 regs[ISL1208_ALARM_SECTION_LEN] = { 0, }; - int sr; - - sr = isl1208_i2c_get_sr(client); - if (sr < 0) { - dev_err(&client->dev, "%s: reading SR failed\n", __func__); - return sr; - } - - sr = isl1208_i2c_read_regs(client, ISL1208_REG_SCA, regs, - ISL1208_ALARM_SECTION_LEN); - if (sr < 0) { - dev_err(&client->dev, "%s: reading alarm section failed\n", - __func__); - return sr; - } - - /* MSB of each alarm register is an enable bit */ - tm->tm_sec = BCD2BIN(regs[ISL1208_REG_SCA-ISL1208_REG_SCA] & 0x7f); - tm->tm_min = BCD2BIN(regs[ISL1208_REG_MNA-ISL1208_REG_SCA] & 0x7f); - tm->tm_hour = BCD2BIN(regs[ISL1208_REG_HRA-ISL1208_REG_SCA] & 0x3f); - tm->tm_mday = BCD2BIN(regs[ISL1208_REG_DTA-ISL1208_REG_SCA] & 0x3f); - tm->tm_mon = BCD2BIN(regs[ISL1208_REG_MOA-ISL1208_REG_SCA] & 0x1f)-1; - tm->tm_wday = BCD2BIN(regs[ISL1208_REG_DWA-ISL1208_REG_SCA] & 0x03); - - return 0; -} - -static int isl1208_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - return isl1208_i2c_read_time(to_i2c_client(dev), tm); -} - -static int isl1208_i2c_set_time(struct i2c_client *client, - struct rtc_time const *tm) -{ - int sr; - u8 regs[ISL1208_RTC_SECTION_LEN] = { 0, }; - - regs[ISL1208_REG_SC] = BIN2BCD(tm->tm_sec); - regs[ISL1208_REG_MN] = BIN2BCD(tm->tm_min); - regs[ISL1208_REG_HR] = BIN2BCD(tm->tm_hour) | ISL1208_REG_HR_MIL; - - regs[ISL1208_REG_DT] = BIN2BCD(tm->tm_mday); - regs[ISL1208_REG_MO] = BIN2BCD(tm->tm_mon + 1); - regs[ISL1208_REG_YR] = BIN2BCD(tm->tm_year - 100); - - regs[ISL1208_REG_DW] = BIN2BCD(tm->tm_wday & 7); - - sr = isl1208_i2c_get_sr(client); - if (sr < 0) { - dev_err(&client->dev, "%s: reading SR failed\n", __func__); - return sr; - } - - /* set WRTC */ - sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR, - sr | ISL1208_REG_SR_WRTC); - if (sr < 0) { - dev_err(&client->dev, "%s: writing SR failed\n", __func__); - return sr; - } - - /* write RTC registers */ - sr = isl1208_i2c_set_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); - if (sr < 0) { - dev_err(&client->dev, "%s: writing RTC section failed\n", - __func__); - return sr; - } - - /* clear WRTC again */ - sr = i2c_smbus_write_byte_data (client, ISL1208_REG_SR, - sr & ~ISL1208_REG_SR_WRTC); - if (sr < 0) { - dev_err(&client->dev, "%s: writing SR failed\n", __func__); - return sr; - } - - return 0; -} - - -static int isl1208_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - return isl1208_i2c_set_time(to_i2c_client(dev), tm); -} - -static int isl1208_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) -{ - return isl1208_i2c_read_alarm(to_i2c_client(dev), alarm); -} - -static struct rtc_class_ops isl1208_rtc_ops = { - .proc = isl1208_rtc_proc, - .read_time = isl1208_rtc_read_time, - .set_time = isl1208_rtc_set_time, - .read_alarm = isl1208_rtc_read_alarm, - //.set_alarm = isl1208_rtc_set_alarm, -}; - -/* sysfs interface */ - -static ssize_t isl1208_sysfs_show_atrim(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - int atr; - - atr = isl1208_i2c_get_atr(to_i2c_client(dev)); - if (atr < 0) - return atr; - - return sprintf(buf, "%d.%.2d pF\n", atr>>2, (atr&0x3)*25); -} -static DEVICE_ATTR(atrim, S_IRUGO, isl1208_sysfs_show_atrim, NULL); - -static ssize_t isl1208_sysfs_show_dtrim(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - int dtr; - - dtr = isl1208_i2c_get_dtr(to_i2c_client(dev)); - if (dtr < 0) - return dtr; - - return sprintf(buf, "%d ppm\n", dtr); -} -static DEVICE_ATTR(dtrim, S_IRUGO, isl1208_sysfs_show_dtrim, NULL); - -static ssize_t isl1208_sysfs_show_usr(struct device *dev, - struct device_attribute *attr, - char *buf) -{ - int usr; - - usr = isl1208_i2c_get_usr(to_i2c_client(dev)); - if (usr < 0) - return usr; - - return sprintf(buf, "0x%.4x\n", usr); -} - -static ssize_t isl1208_sysfs_store_usr(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - int usr = -1; - - if (buf[0] == '0' && (buf[1] == 'x' || buf[1] == 'X')) { - if (sscanf(buf, "%x", &usr) != 1) - return -EINVAL; - } else { - if (sscanf(buf, "%d", &usr) != 1) - return -EINVAL; - } - - if (usr < 0 || usr > 0xffff) - return -EINVAL; - - return isl1208_i2c_set_usr(to_i2c_client(dev), usr) ? -EIO : count; -} -static DEVICE_ATTR(usr, S_IRUGO | S_IWUSR, isl1208_sysfs_show_usr, - isl1208_sysfs_store_usr); - -static int -isl1208_probe(struct i2c_adapter *adapter, int addr, int kind) -{ - int rc = 0; - struct i2c_client *new_client = NULL; - struct rtc_device *rtc = NULL; - - if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) { - rc = -ENODEV; - goto failout; - } - - new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (new_client == NULL) { - rc = -ENOMEM; - goto failout; - } - - new_client->addr = addr; - new_client->adapter = adapter; - new_client->driver = &isl1208_driver; - new_client->flags = 0; - strcpy(new_client->name, DRV_NAME); - - if (kind < 0) { - rc = isl1208_i2c_validate_client(new_client); - if (rc < 0) - goto failout; - } - - rc = i2c_attach_client(new_client); - if (rc < 0) - goto failout; - - dev_info(&new_client->dev, - "chip found, driver version " DRV_VERSION "\n"); - - rtc = rtc_device_register(isl1208_driver.driver.name, - &new_client->dev, - &isl1208_rtc_ops, THIS_MODULE); - - if (IS_ERR(rtc)) { - rc = PTR_ERR(rtc); - goto failout_detach; - } - - i2c_set_clientdata(new_client, rtc); - - rc = isl1208_i2c_get_sr(new_client); - if (rc < 0) { - dev_err(&new_client->dev, "reading status failed\n"); - goto failout_unregister; - } - - if (rc & ISL1208_REG_SR_RTCF) - dev_warn(&new_client->dev, "rtc power failure detected, " - "please set clock.\n"); - - rc = device_create_file(&new_client->dev, &dev_attr_atrim); - if (rc < 0) - goto failout_unregister; - rc = device_create_file(&new_client->dev, &dev_attr_dtrim); - if (rc < 0) - goto failout_atrim; - rc = device_create_file(&new_client->dev, &dev_attr_usr); - if (rc < 0) - goto failout_dtrim; - - return 0; - - failout_dtrim: - device_remove_file(&new_client->dev, &dev_attr_dtrim); - failout_atrim: - device_remove_file(&new_client->dev, &dev_attr_atrim); - failout_unregister: - rtc_device_unregister(rtc); - failout_detach: - i2c_detach_client(new_client); - failout: - kfree(new_client); - return rc; -} - -static int -isl1208_attach_adapter (struct i2c_adapter *adapter) -{ - return i2c_probe(adapter, &addr_data, isl1208_probe); -} - -static int -isl1208_detach_client(struct i2c_client *client) -{ - int rc; - struct rtc_device *const rtc = i2c_get_clientdata(client); - - if (rtc) - rtc_device_unregister(rtc); /* do we need to kfree? */ - - rc = i2c_detach_client(client); - if (rc) - return rc; - - kfree(client); - - return 0; -} - -/* module management */ - -static int __init isl1208_init(void) -{ - return i2c_add_driver(&isl1208_driver); -} - -static void __exit isl1208_exit(void) -{ - i2c_del_driver(&isl1208_driver); -} - -MODULE_AUTHOR("Herbert Valerio Riedel "); -MODULE_DESCRIPTION("Intersil ISL1208 RTC driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); - -module_init(isl1208_init); -module_exit(isl1208_exit); diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c index 9812120f3..cfedc1d28 100644 --- a/drivers/rtc/rtc-lib.c +++ b/drivers/rtc/rtc-lib.c @@ -18,34 +18,15 @@ static const unsigned char rtc_days_in_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; -static const unsigned short rtc_ydays[2][13] = { - /* Normal years */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } -}; - #define LEAPS_THRU_END_OF(y) ((y)/4 - (y)/100 + (y)/400) #define LEAP_YEAR(year) ((!(year % 4) && (year % 100)) || !(year % 400)) -/* - * The number of days in the month. - */ int rtc_month_days(unsigned int month, unsigned int year) { return rtc_days_in_month[month] + (LEAP_YEAR(year) && month == 1); } EXPORT_SYMBOL(rtc_month_days); -/* - * The number of days since January 1. (0 to 365) - */ -int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) -{ - return rtc_ydays[LEAP_YEAR(year)][month] + day-1; -} -EXPORT_SYMBOL(rtc_year_days); - /* * Convert seconds since 01-01-1970 00:00:00 to Gregorian date. */ diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c deleted file mode 100644 index 480ce6cdc..000000000 --- a/drivers/rtc/rtc-max6902.c +++ /dev/null @@ -1,285 +0,0 @@ -/* drivers/char/max6902.c - * - * Copyright (C) 2006 8D Technologies inc. - * Copyright (C) 2004 Compulab Ltd. - * - * 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. - * - * Driver for MAX6902 spi RTC - * - * Changelog: - * - * 24-May-2006: Raphael Assenat - * - Major rework - * Converted to rtc_device and uses the SPI layer. - * - * ??-???-2005: Someone at Compulab - * - Initial driver creation. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define MAX6902_REG_SECONDS 0x01 -#define MAX6902_REG_MINUTES 0x03 -#define MAX6902_REG_HOURS 0x05 -#define MAX6902_REG_DATE 0x07 -#define MAX6902_REG_MONTH 0x09 -#define MAX6902_REG_DAY 0x0B -#define MAX6902_REG_YEAR 0x0D -#define MAX6902_REG_CONTROL 0x0F -#define MAX6902_REG_CENTURY 0x13 - -#undef MAX6902_DEBUG - -struct max6902 { - struct rtc_device *rtc; - u8 buf[9]; /* Burst read cmd + 8 registers */ - u8 tx_buf[2]; - u8 rx_buf[2]; -}; - -static void max6902_set_reg(struct device *dev, unsigned char address, - unsigned char data) -{ - struct spi_device *spi = to_spi_device(dev); - unsigned char buf[2]; - - /* MSB must be '0' to write */ - buf[0] = address & 0x7f; - buf[1] = data; - - spi_write(spi, buf, 2); -} - -static int max6902_get_reg(struct device *dev, unsigned char address, - unsigned char *data) -{ - struct spi_device *spi = to_spi_device(dev); - struct max6902 *chip = dev_get_drvdata(dev); - struct spi_message message; - struct spi_transfer xfer; - int status; - - if (!data) - return -EINVAL; - - /* Build our spi message */ - spi_message_init(&message); - memset(&xfer, 0, sizeof(xfer)); - xfer.len = 2; - /* Can tx_buf and rx_buf be equal? The doc in spi.h is not sure... */ - xfer.tx_buf = chip->tx_buf; - xfer.rx_buf = chip->rx_buf; - - /* Set MSB to indicate read */ - chip->tx_buf[0] = address | 0x80; - - spi_message_add_tail(&xfer, &message); - - /* do the i/o */ - status = spi_sync(spi, &message); - if (status == 0) - status = message.status; - else - return status; - - *data = chip->rx_buf[1]; - - return status; -} - -static int max6902_get_datetime(struct device *dev, struct rtc_time *dt) -{ - unsigned char tmp; - int century; - int err; - struct spi_device *spi = to_spi_device(dev); - struct max6902 *chip = dev_get_drvdata(dev); - struct spi_message message; - struct spi_transfer xfer; - int status; - - err = max6902_get_reg(dev, MAX6902_REG_CENTURY, &tmp); - if (err) - return err; - - /* build the message */ - spi_message_init(&message); - memset(&xfer, 0, sizeof(xfer)); - xfer.len = 1 + 7; /* Burst read command + 7 registers */ - xfer.tx_buf = chip->buf; - xfer.rx_buf = chip->buf; - chip->buf[0] = 0xbf; /* Burst read */ - spi_message_add_tail(&xfer, &message); - - /* do the i/o */ - status = spi_sync(spi, &message); - if (status == 0) - status = message.status; - else - return status; - - /* The chip sends data in this order: - * Seconds, Minutes, Hours, Date, Month, Day, Year */ - dt->tm_sec = BCD2BIN(chip->buf[1]); - dt->tm_min = BCD2BIN(chip->buf[2]); - dt->tm_hour = BCD2BIN(chip->buf[3]); - dt->tm_mday = BCD2BIN(chip->buf[4]); - dt->tm_mon = BCD2BIN(chip->buf[5]) - 1; - dt->tm_wday = BCD2BIN(chip->buf[6]); - dt->tm_year = BCD2BIN(chip->buf[7]); - - century = BCD2BIN(tmp) * 100; - - dt->tm_year += century; - dt->tm_year -= 1900; - -#ifdef MAX6902_DEBUG - printk("\n%s : Read RTC values\n",__FUNCTION__); - printk("tm_hour: %i\n",dt->tm_hour); - printk("tm_min : %i\n",dt->tm_min); - printk("tm_sec : %i\n",dt->tm_sec); - printk("tm_year: %i\n",dt->tm_year); - printk("tm_mon : %i\n",dt->tm_mon); - printk("tm_mday: %i\n",dt->tm_mday); - printk("tm_wday: %i\n",dt->tm_wday); -#endif - - return 0; -} - -static int max6902_set_datetime(struct device *dev, struct rtc_time *dt) -{ - dt->tm_year = dt->tm_year+1900; - -#ifdef MAX6902_DEBUG - printk("\n%s : Setting RTC values\n",__FUNCTION__); - printk("tm_sec : %i\n",dt->tm_sec); - printk("tm_min : %i\n",dt->tm_min); - printk("tm_hour: %i\n",dt->tm_hour); - printk("tm_mday: %i\n",dt->tm_mday); - printk("tm_wday: %i\n",dt->tm_wday); - printk("tm_year: %i\n",dt->tm_year); -#endif - - /* Remove write protection */ - max6902_set_reg(dev, 0xF, 0); - - max6902_set_reg(dev, 0x01, BIN2BCD(dt->tm_sec)); - max6902_set_reg(dev, 0x03, BIN2BCD(dt->tm_min)); - max6902_set_reg(dev, 0x05, BIN2BCD(dt->tm_hour)); - - max6902_set_reg(dev, 0x07, BIN2BCD(dt->tm_mday)); - max6902_set_reg(dev, 0x09, BIN2BCD(dt->tm_mon+1)); - max6902_set_reg(dev, 0x0B, BIN2BCD(dt->tm_wday)); - max6902_set_reg(dev, 0x0D, BIN2BCD(dt->tm_year%100)); - max6902_set_reg(dev, 0x13, BIN2BCD(dt->tm_year/100)); - - /* Compulab used a delay here. However, the datasheet - * does not mention a delay being required anywhere... */ - /* delay(2000); */ - - /* Write protect */ - max6902_set_reg(dev, 0xF, 0x80); - - return 0; -} - -static int max6902_read_time(struct device *dev, struct rtc_time *tm) -{ - return max6902_get_datetime(dev, tm); -} - -static int max6902_set_time(struct device *dev, struct rtc_time *tm) -{ - return max6902_set_datetime(dev, tm); -} - -static struct rtc_class_ops max6902_rtc_ops = { - .read_time = max6902_read_time, - .set_time = max6902_set_time, -}; - -static int __devinit max6902_probe(struct spi_device *spi) -{ - struct rtc_device *rtc; - unsigned char tmp; - struct max6902 *chip; - int res; - - rtc = rtc_device_register("max6902", - &spi->dev, &max6902_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) - return PTR_ERR(rtc); - - spi->mode = SPI_MODE_3; - spi->bits_per_word = 8; - spi_setup(spi); - - chip = kzalloc(sizeof *chip, GFP_KERNEL); - if (!chip) { - rtc_device_unregister(rtc); - return -ENOMEM; - } - chip->rtc = rtc; - dev_set_drvdata(&spi->dev, chip); - - res = max6902_get_reg(&spi->dev, MAX6902_REG_SECONDS, &tmp); - if (res) { - rtc_device_unregister(rtc); - return res; - } - - return 0; -} - -static int __devexit max6902_remove(struct spi_device *spi) -{ - struct max6902 *chip = platform_get_drvdata(spi); - struct rtc_device *rtc = chip->rtc; - - if (rtc) - rtc_device_unregister(rtc); - - kfree(chip); - - return 0; -} - -static struct spi_driver max6902_driver = { - .driver = { - .name = "max6902", - .bus = &spi_bus_type, - .owner = THIS_MODULE, - }, - .probe = max6902_probe, - .remove = __devexit_p(max6902_remove), -}; - -static __init int max6902_init(void) -{ - printk("max6902 spi driver\n"); - return spi_register_driver(&max6902_driver); -} -module_init(max6902_init); - -static __exit void max6902_exit(void) -{ - spi_unregister_driver(&max6902_driver); -} -module_exit(max6902_exit); - -MODULE_DESCRIPTION ("max6902 spi RTC driver"); -MODULE_AUTHOR ("Raphael Assenat"); -MODULE_LICENSE ("GPL"); diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index bd4310643..ba9a583b7 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -95,7 +95,7 @@ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm) tm->tm_wday = buf[PCF8563_REG_DW] & 0x07; tm->tm_mon = BCD2BIN(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ tm->tm_year = BCD2BIN(buf[PCF8563_REG_YR]) - + (buf[PCF8563_REG_MO] & PCF8563_MO_C ? 0 : 100); + + (buf[PCF8563_REG_MO] & PCF8563_MO_C ? 100 : 0); dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, " "mday=%d, mon=%d, year=%d, wday=%d\n", @@ -135,7 +135,7 @@ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm) /* year and century */ buf[PCF8563_REG_YR] = BIN2BCD(tm->tm_year % 100); - if (tm->tm_year < 100) + if (tm->tm_year / 100) buf[PCF8563_REG_MO] |= PCF8563_MO_C; buf[PCF8563_REG_DW] = tm->tm_wday & 0x07; diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c deleted file mode 100644 index b235a30cb..000000000 --- a/drivers/rtc/rtc-pcf8583.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * drivers/rtc/rtc-pcf8583.c - * - * Copyright (C) 2000 Russell King - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Driver for PCF8583 RTC & RAM chip - * - * Converted to the generic RTC susbsystem by G. Liakhovetski (2006) - */ -#include -#include -#include -#include -#include -#include -#include -#include - -struct rtc_mem { - unsigned int loc; - unsigned int nr; - unsigned char *data; -}; - -struct pcf8583 { - struct i2c_client client; - struct rtc_device *rtc; - unsigned char ctrl; -}; - -#define CTRL_STOP 0x80 -#define CTRL_HOLD 0x40 -#define CTRL_32KHZ 0x00 -#define CTRL_MASK 0x08 -#define CTRL_ALARMEN 0x04 -#define CTRL_ALARM 0x02 -#define CTRL_TIMER 0x01 - -static unsigned short normal_i2c[] = { I2C_CLIENT_END }; - -/* Module parameters */ -I2C_CLIENT_INSMOD; - -static struct i2c_driver pcf8583_driver; - -#define get_ctrl(x) ((struct pcf8583 *)i2c_get_clientdata(x))->ctrl -#define set_ctrl(x, v) get_ctrl(x) = v - -#define CMOS_YEAR (64 + 128) -#define CMOS_CHECKSUM (63) - -static int pcf8583_get_datetime(struct i2c_client *client, struct rtc_time *dt) -{ - unsigned char buf[8], addr[1] = { 1 }; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, - .flags = 0, - .len = 1, - .buf = addr, - }, { - .addr = client->addr, - .flags = I2C_M_RD, - .len = 6, - .buf = buf, - } - }; - int ret; - - memset(buf, 0, sizeof(buf)); - - ret = i2c_transfer(client->adapter, msgs, 2); - if (ret == 2) { - dt->tm_year = buf[4] >> 6; - dt->tm_wday = buf[5] >> 5; - - buf[4] &= 0x3f; - buf[5] &= 0x1f; - - dt->tm_sec = BCD_TO_BIN(buf[1]); - dt->tm_min = BCD_TO_BIN(buf[2]); - dt->tm_hour = BCD_TO_BIN(buf[3]); - dt->tm_mday = BCD_TO_BIN(buf[4]); - dt->tm_mon = BCD_TO_BIN(buf[5]); - } - - return ret == 2 ? 0 : -EIO; -} - -static int pcf8583_set_datetime(struct i2c_client *client, struct rtc_time *dt, int datetoo) -{ - unsigned char buf[8]; - int ret, len = 6; - - buf[0] = 0; - buf[1] = get_ctrl(client) | 0x80; - buf[2] = 0; - buf[3] = BIN_TO_BCD(dt->tm_sec); - buf[4] = BIN_TO_BCD(dt->tm_min); - buf[5] = BIN_TO_BCD(dt->tm_hour); - - if (datetoo) { - len = 8; - buf[6] = BIN_TO_BCD(dt->tm_mday) | (dt->tm_year << 6); - buf[7] = BIN_TO_BCD(dt->tm_mon) | (dt->tm_wday << 5); - } - - ret = i2c_master_send(client, (char *)buf, len); - if (ret != len) - return -EIO; - - buf[1] = get_ctrl(client); - ret = i2c_master_send(client, (char *)buf, 2); - - return ret == 2 ? 0 : -EIO; -} - -static int pcf8583_get_ctrl(struct i2c_client *client, unsigned char *ctrl) -{ - *ctrl = get_ctrl(client); - return 0; -} - -static int pcf8583_set_ctrl(struct i2c_client *client, unsigned char *ctrl) -{ - unsigned char buf[2]; - - buf[0] = 0; - buf[1] = *ctrl; - set_ctrl(client, *ctrl); - - return i2c_master_send(client, (char *)buf, 2); -} - -static int pcf8583_read_mem(struct i2c_client *client, struct rtc_mem *mem) -{ - unsigned char addr[1]; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, - .flags = 0, - .len = 1, - .buf = addr, - }, { - .addr = client->addr, - .flags = I2C_M_RD, - .len = mem->nr, - .buf = mem->data, - } - }; - - if (mem->loc < 8) - return -EINVAL; - - addr[0] = mem->loc; - - return i2c_transfer(client->adapter, msgs, 2) == 2 ? 0 : -EIO; -} - -static int pcf8583_write_mem(struct i2c_client *client, struct rtc_mem *mem) -{ - unsigned char addr[1]; - struct i2c_msg msgs[2] = { - { - .addr = client->addr, - .flags = 0, - .len = 1, - .buf = addr, - }, { - .addr = client->addr, - .flags = I2C_M_NOSTART, - .len = mem->nr, - .buf = mem->data, - } - }; - - if (mem->loc < 8) - return -EINVAL; - - addr[0] = mem->loc; - - return i2c_transfer(client->adapter, msgs, 2) == 2 ? 0 : -EIO; -} - -static int pcf8583_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - struct i2c_client *client = to_i2c_client(dev); - unsigned char ctrl, year[2]; - struct rtc_mem mem = { CMOS_YEAR, sizeof(year), year }; - int real_year, year_offset, err; - - /* - * Ensure that the RTC is running. - */ - pcf8583_get_ctrl(client, &ctrl); - if (ctrl & (CTRL_STOP | CTRL_HOLD)) { - unsigned char new_ctrl = ctrl & ~(CTRL_STOP | CTRL_HOLD); - - printk(KERN_WARNING "RTC: resetting control %02x -> %02x\n", - ctrl, new_ctrl); - - if ((err = pcf8583_set_ctrl(client, &new_ctrl)) < 0) - return err; - } - - if (pcf8583_get_datetime(client, tm) || - pcf8583_read_mem(client, &mem)) - return -EIO; - - real_year = year[0]; - - /* - * The RTC year holds the LSB two bits of the current - * year, which should reflect the LSB two bits of the - * CMOS copy of the year. Any difference indicates - * that we have to correct the CMOS version. - */ - year_offset = tm->tm_year - (real_year & 3); - if (year_offset < 0) - /* - * RTC year wrapped. Adjust it appropriately. - */ - year_offset += 4; - - tm->tm_year = real_year + year_offset + year[1] * 100; - - return 0; -} - -static int pcf8583_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - struct i2c_client *client = to_i2c_client(dev); - unsigned char year[2], chk; - struct rtc_mem cmos_year = { CMOS_YEAR, sizeof(year), year }; - struct rtc_mem cmos_check = { CMOS_CHECKSUM, 1, &chk }; - int ret; - - /* - * The RTC's own 2-bit year must reflect the least - * significant two bits of the CMOS year. - */ - - ret = pcf8583_set_datetime(client, tm, 1); - if (ret) - return ret; - - ret = pcf8583_read_mem(client, &cmos_check); - if (ret) - return ret; - - ret = pcf8583_read_mem(client, &cmos_year); - if (ret) - return ret; - - chk -= year[1] + year[0]; - - year[1] = tm->tm_year / 100; - year[0] = tm->tm_year % 100; - - chk += year[1] + year[0]; - - ret = pcf8583_write_mem(client, &cmos_year); - - if (ret) - return ret; - - ret = pcf8583_write_mem(client, &cmos_check); - - return ret; -} - -static struct rtc_class_ops pcf8583_rtc_ops = { - .read_time = pcf8583_rtc_read_time, - .set_time = pcf8583_rtc_set_time, -}; - -static int pcf8583_probe(struct i2c_adapter *adap, int addr, int kind); - -static int pcf8583_attach(struct i2c_adapter *adap) -{ - return i2c_probe(adap, &addr_data, pcf8583_probe); -} - -static int pcf8583_detach(struct i2c_client *client) -{ - int err; - struct pcf8583 *pcf = i2c_get_clientdata(client); - struct rtc_device *rtc = pcf->rtc; - - if (rtc) - rtc_device_unregister(rtc); - - if ((err = i2c_detach_client(client))) - return err; - - kfree(pcf); - return 0; -} - -static struct i2c_driver pcf8583_driver = { - .driver = { - .name = "pcf8583", - }, - .id = I2C_DRIVERID_PCF8583, - .attach_adapter = pcf8583_attach, - .detach_client = pcf8583_detach, -}; - -static int pcf8583_probe(struct i2c_adapter *adap, int addr, int kind) -{ - struct pcf8583 *pcf; - struct i2c_client *client; - struct rtc_device *rtc; - unsigned char buf[1], ad[1] = { 0 }; - int err; - struct i2c_msg msgs[2] = { - { - .addr = addr, - .flags = 0, - .len = 1, - .buf = ad, - }, { - .addr = addr, - .flags = I2C_M_RD, - .len = 1, - .buf = buf, - } - }; - - pcf = kzalloc(sizeof(*pcf), GFP_KERNEL); - if (!pcf) - return -ENOMEM; - - client = &pcf->client; - - client->addr = addr; - client->adapter = adap; - client->driver = &pcf8583_driver; - - strlcpy(client->name, pcf8583_driver.driver.name, I2C_NAME_SIZE); - - if (i2c_transfer(client->adapter, msgs, 2) != 2) { - err = -EIO; - goto exit_kfree; - } - - err = i2c_attach_client(client); - - if (err) - goto exit_kfree; - - rtc = rtc_device_register(pcf8583_driver.driver.name, &client->dev, - &pcf8583_rtc_ops, THIS_MODULE); - - if (IS_ERR(rtc)) { - err = PTR_ERR(rtc); - goto exit_detach; - } - - pcf->rtc = rtc; - i2c_set_clientdata(client, pcf); - set_ctrl(client, buf[0]); - - return 0; - -exit_detach: - i2c_detach_client(client); - -exit_kfree: - kfree(pcf); - - return err; -} - -static __init int pcf8583_init(void) -{ - return i2c_add_driver(&pcf8583_driver); -} - -static __exit void pcf8583_exit(void) -{ - i2c_del_driver(&pcf8583_driver); -} - -module_init(pcf8583_init); -module_exit(pcf8583_exit); - -MODULE_AUTHOR("Russell King"); -MODULE_DESCRIPTION("PCF8583 I2C RTC driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c deleted file mode 100644 index d6d1c5726..000000000 --- a/drivers/rtc/rtc-pl031.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * drivers/rtc/rtc-pl031.c - * - * Real Time Clock interface for ARM AMBA PrimeCell 031 RTC - * - * Author: Deepak Saxena - * - * Copyright 2006 (c) MontaVista Software, 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -/* - * Register definitions - */ -#define RTC_DR 0x00 /* Data read register */ -#define RTC_MR 0x04 /* Match register */ -#define RTC_LR 0x08 /* Data load register */ -#define RTC_CR 0x0c /* Control register */ -#define RTC_IMSC 0x10 /* Interrupt mask and set register */ -#define RTC_RIS 0x14 /* Raw interrupt status register */ -#define RTC_MIS 0x18 /* Masked interrupt status register */ -#define RTC_ICR 0x1c /* Interrupt clear register */ - -struct pl031_local { - struct rtc_device *rtc; - void __iomem *base; -}; - -static irqreturn_t pl031_interrupt(int irq, void *dev_id, struct pt_regs *regs) -{ - struct rtc_device *rtc = dev_id; - - rtc_update_irq(&rtc->class_dev, 1, RTC_AF); - - return IRQ_HANDLED; -} - -static int pl031_open(struct device *dev) -{ - /* - * We request IRQ in pl031_probe, so nothing to do here... - */ - return 0; -} - -static void pl031_release(struct device *dev) -{ -} - -static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) -{ - struct pl031_local *ldata = dev_get_drvdata(dev); - - switch (cmd) { - case RTC_AIE_OFF: - __raw_writel(1, ldata->base + RTC_MIS); - return 0; - case RTC_AIE_ON: - __raw_writel(0, ldata->base + RTC_MIS); - return 0; - } - - return -ENOIOCTLCMD; -} - -static int pl031_read_time(struct device *dev, struct rtc_time *tm) -{ - struct pl031_local *ldata = dev_get_drvdata(dev); - - rtc_time_to_tm(__raw_readl(ldata->base + RTC_DR), tm); - - return 0; -} - -static int pl031_set_time(struct device *dev, struct rtc_time *tm) -{ - unsigned long time; - struct pl031_local *ldata = dev_get_drvdata(dev); - - rtc_tm_to_time(tm, &time); - __raw_writel(time, ldata->base + RTC_LR); - - return 0; -} - -static int pl031_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) -{ - struct pl031_local *ldata = dev_get_drvdata(dev); - - rtc_time_to_tm(__raw_readl(ldata->base + RTC_MR), &alarm->time); - alarm->pending = __raw_readl(ldata->base + RTC_RIS); - alarm->enabled = __raw_readl(ldata->base + RTC_IMSC); - - return 0; -} - -static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) -{ - struct pl031_local *ldata = dev_get_drvdata(dev); - unsigned long time; - - rtc_tm_to_time(&alarm->time, &time); - - __raw_writel(time, ldata->base + RTC_MR); - __raw_writel(!alarm->enabled, ldata->base + RTC_MIS); - - return 0; -} - -static struct rtc_class_ops pl031_ops = { - .open = pl031_open, - .release = pl031_release, - .ioctl = pl031_ioctl, - .read_time = pl031_read_time, - .set_time = pl031_set_time, - .read_alarm = pl031_read_alarm, - .set_alarm = pl031_set_alarm, -}; - -static int pl031_remove(struct amba_device *adev) -{ - struct pl031_local *ldata = dev_get_drvdata(&adev->dev); - - if (ldata) { - dev_set_drvdata(&adev->dev, NULL); - free_irq(adev->irq[0], ldata->rtc); - rtc_device_unregister(ldata->rtc); - iounmap(ldata->base); - kfree(ldata); - } - - return 0; -} - -static int pl031_probe(struct amba_device *adev, void *id) -{ - int ret; - struct pl031_local *ldata; - - - ldata = kmalloc(sizeof(struct pl031_local), GFP_KERNEL); - if (!ldata) { - ret = -ENOMEM; - goto out; - } - dev_set_drvdata(&adev->dev, ldata); - - ldata->base = ioremap(adev->res.start, - adev->res.end - adev->res.start + 1); - if (!ldata->base) { - ret = -ENOMEM; - goto out_no_remap; - } - - if (request_irq(adev->irq[0], pl031_interrupt, IRQF_DISABLED, - "rtc-pl031", ldata->rtc)) { - ret = -EIO; - goto out_no_irq; - } - - ldata->rtc = rtc_device_register("pl031", &adev->dev, &pl031_ops, - THIS_MODULE); - if (IS_ERR(ldata->rtc)) { - ret = PTR_ERR(ldata->rtc); - goto out_no_rtc; - } - - return 0; - -out_no_rtc: - free_irq(adev->irq[0], ldata->rtc); -out_no_irq: - iounmap(ldata->base); -out_no_remap: - dev_set_drvdata(&adev->dev, NULL); - kfree(ldata); -out: - return ret; -} - -static struct amba_id pl031_ids[] __initdata = { - { - .id = 0x00041031, - .mask = 0x000fffff, }, - {0, 0}, -}; - -static struct amba_driver pl031_driver = { - .drv = { - .name = "rtc-pl031", - }, - .id_table = pl031_ids, - .probe = pl031_probe, - .remove = pl031_remove, -}; - -static int __init pl031_init(void) -{ - return amba_driver_register(&pl031_driver); -} - -static void __exit pl031_exit(void) -{ - amba_driver_unregister(&pl031_driver); -} - -module_init(pl031_init); -module_exit(pl031_exit); - -MODULE_AUTHOR("Deepak Saxena - * - * 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. - * - * The board specific init code should provide characteristics of this - * device: - * Mode 1 (High-Active, Shift-Then-Sample), High Avtive CS - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRV_VERSION "0.1" - -#define RS5C348_REG_SECS 0 -#define RS5C348_REG_MINS 1 -#define RS5C348_REG_HOURS 2 -#define RS5C348_REG_WDAY 3 -#define RS5C348_REG_DAY 4 -#define RS5C348_REG_MONTH 5 -#define RS5C348_REG_YEAR 6 -#define RS5C348_REG_CTL1 14 -#define RS5C348_REG_CTL2 15 - -#define RS5C348_SECS_MASK 0x7f -#define RS5C348_MINS_MASK 0x7f -#define RS5C348_HOURS_MASK 0x3f -#define RS5C348_WDAY_MASK 0x03 -#define RS5C348_DAY_MASK 0x3f -#define RS5C348_MONTH_MASK 0x1f - -#define RS5C348_BIT_PM 0x20 /* REG_HOURS */ -#define RS5C348_BIT_Y2K 0x80 /* REG_MONTH */ -#define RS5C348_BIT_24H 0x20 /* REG_CTL1 */ -#define RS5C348_BIT_XSTP 0x10 /* REG_CTL2 */ -#define RS5C348_BIT_VDET 0x40 /* REG_CTL2 */ - -#define RS5C348_CMD_W(addr) (((addr) << 4) | 0x08) /* single write */ -#define RS5C348_CMD_R(addr) (((addr) << 4) | 0x0c) /* single read */ -#define RS5C348_CMD_MW(addr) (((addr) << 4) | 0x00) /* burst write */ -#define RS5C348_CMD_MR(addr) (((addr) << 4) | 0x04) /* burst read */ - -struct rs5c348_plat_data { - struct rtc_device *rtc; - int rtc_24h; -}; - -static int -rs5c348_rtc_set_time(struct device *dev, struct rtc_time *tm) -{ - struct spi_device *spi = to_spi_device(dev); - struct rs5c348_plat_data *pdata = spi->dev.platform_data; - u8 txbuf[5+7], *txp; - int ret; - - /* Transfer 5 bytes before writing SEC. This gives 31us for carry. */ - txp = txbuf; - txbuf[0] = RS5C348_CMD_R(RS5C348_REG_CTL2); /* cmd, ctl2 */ - txbuf[1] = 0; /* dummy */ - txbuf[2] = RS5C348_CMD_R(RS5C348_REG_CTL2); /* cmd, ctl2 */ - txbuf[3] = 0; /* dummy */ - txbuf[4] = RS5C348_CMD_MW(RS5C348_REG_SECS); /* cmd, sec, ... */ - txp = &txbuf[5]; - txp[RS5C348_REG_SECS] = BIN2BCD(tm->tm_sec); - txp[RS5C348_REG_MINS] = BIN2BCD(tm->tm_min); - if (pdata->rtc_24h) { - txp[RS5C348_REG_HOURS] = BIN2BCD(tm->tm_hour); - } else { - /* hour 0 is AM12, noon is PM12 */ - txp[RS5C348_REG_HOURS] = BIN2BCD((tm->tm_hour + 11) % 12 + 1) | - (tm->tm_hour >= 12 ? RS5C348_BIT_PM : 0); - } - txp[RS5C348_REG_WDAY] = BIN2BCD(tm->tm_wday); - txp[RS5C348_REG_DAY] = BIN2BCD(tm->tm_mday); - txp[RS5C348_REG_MONTH] = BIN2BCD(tm->tm_mon + 1) | - (tm->tm_year >= 100 ? RS5C348_BIT_Y2K : 0); - txp[RS5C348_REG_YEAR] = BIN2BCD(tm->tm_year % 100); - /* write in one transfer to avoid data inconsistency */ - ret = spi_write_then_read(spi, txbuf, sizeof(txbuf), NULL, 0); - udelay(62); /* Tcsr 62us */ - return ret; -} - -static int -rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm) -{ - struct spi_device *spi = to_spi_device(dev); - struct rs5c348_plat_data *pdata = spi->dev.platform_data; - u8 txbuf[5], rxbuf[7]; - int ret; - - /* Transfer 5 byte befores reading SEC. This gives 31us for carry. */ - txbuf[0] = RS5C348_CMD_R(RS5C348_REG_CTL2); /* cmd, ctl2 */ - txbuf[1] = 0; /* dummy */ - txbuf[2] = RS5C348_CMD_R(RS5C348_REG_CTL2); /* cmd, ctl2 */ - txbuf[3] = 0; /* dummy */ - txbuf[4] = RS5C348_CMD_MR(RS5C348_REG_SECS); /* cmd, sec, ... */ - - /* read in one transfer to avoid data inconsistency */ - ret = spi_write_then_read(spi, txbuf, sizeof(txbuf), - rxbuf, sizeof(rxbuf)); - udelay(62); /* Tcsr 62us */ - if (ret < 0) - return ret; - - tm->tm_sec = BCD2BIN(rxbuf[RS5C348_REG_SECS] & RS5C348_SECS_MASK); - tm->tm_min = BCD2BIN(rxbuf[RS5C348_REG_MINS] & RS5C348_MINS_MASK); - tm->tm_hour = BCD2BIN(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK); - if (!pdata->rtc_24h) { - tm->tm_hour %= 12; - if (rxbuf[RS5C348_REG_HOURS] & RS5C348_BIT_PM) - tm->tm_hour += 12; - } - tm->tm_wday = BCD2BIN(rxbuf[RS5C348_REG_WDAY] & RS5C348_WDAY_MASK); - tm->tm_mday = BCD2BIN(rxbuf[RS5C348_REG_DAY] & RS5C348_DAY_MASK); - tm->tm_mon = - BCD2BIN(rxbuf[RS5C348_REG_MONTH] & RS5C348_MONTH_MASK) - 1; - /* year is 1900 + tm->tm_year */ - tm->tm_year = BCD2BIN(rxbuf[RS5C348_REG_YEAR]) + - ((rxbuf[RS5C348_REG_MONTH] & RS5C348_BIT_Y2K) ? 100 : 0); - - if (rtc_valid_tm(tm) < 0) { - dev_err(&spi->dev, "retrieved date/time is not valid.\n"); - rtc_time_to_tm(0, tm); - } - - return 0; -} - -static struct rtc_class_ops rs5c348_rtc_ops = { - .read_time = rs5c348_rtc_read_time, - .set_time = rs5c348_rtc_set_time, -}; - -static struct spi_driver rs5c348_driver; - -static int __devinit rs5c348_probe(struct spi_device *spi) -{ - int ret; - struct rtc_device *rtc; - struct rs5c348_plat_data *pdata; - - pdata = kzalloc(sizeof(struct rs5c348_plat_data), GFP_KERNEL); - if (!pdata) - return -ENOMEM; - spi->dev.platform_data = pdata; - - /* Check D7 of SECOND register */ - ret = spi_w8r8(spi, RS5C348_CMD_R(RS5C348_REG_SECS)); - if (ret < 0 || (ret & 0x80)) { - dev_err(&spi->dev, "not found.\n"); - goto kfree_exit; - } - - dev_info(&spi->dev, "chip found, driver version " DRV_VERSION "\n"); - dev_info(&spi->dev, "spiclk %u KHz.\n", - (spi->max_speed_hz + 500) / 1000); - - /* turn RTC on if it was not on */ - ret = spi_w8r8(spi, RS5C348_CMD_R(RS5C348_REG_CTL2)); - if (ret < 0) - goto kfree_exit; - if (ret & (RS5C348_BIT_XSTP | RS5C348_BIT_VDET)) { - u8 buf[2]; - if (ret & RS5C348_BIT_VDET) - dev_warn(&spi->dev, "voltage-low detected.\n"); - buf[0] = RS5C348_CMD_W(RS5C348_REG_CTL2); - buf[1] = 0; - ret = spi_write_then_read(spi, buf, sizeof(buf), NULL, 0); - if (ret < 0) - goto kfree_exit; - } - - ret = spi_w8r8(spi, RS5C348_CMD_R(RS5C348_REG_CTL1)); - if (ret < 0) - goto kfree_exit; - if (ret & RS5C348_BIT_24H) - pdata->rtc_24h = 1; - - rtc = rtc_device_register(rs5c348_driver.driver.name, &spi->dev, - &rs5c348_rtc_ops, THIS_MODULE); - - if (IS_ERR(rtc)) { - ret = PTR_ERR(rtc); - goto kfree_exit; - } - - pdata->rtc = rtc; - - return 0; - kfree_exit: - kfree(pdata); - return ret; -} - -static int __devexit rs5c348_remove(struct spi_device *spi) -{ - struct rs5c348_plat_data *pdata = spi->dev.platform_data; - struct rtc_device *rtc = pdata->rtc; - - if (rtc) - rtc_device_unregister(rtc); - kfree(pdata); - return 0; -} - -static struct spi_driver rs5c348_driver = { - .driver = { - .name = "rs5c348", - .bus = &spi_bus_type, - .owner = THIS_MODULE, - }, - .probe = rs5c348_probe, - .remove = __devexit_p(rs5c348_remove), -}; - -static __init int rs5c348_init(void) -{ - return spi_register_driver(&rs5c348_driver); -} - -static __exit void rs5c348_exit(void) -{ - spi_unregister_driver(&rs5c348_driver); -} - -module_init(rs5c348_init); -module_exit(rs5c348_exit); - -MODULE_AUTHOR("Atsushi Nemoto "); -MODULE_DESCRIPTION("Ricoh RS5C348 RTC driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(DRV_VERSION); diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c deleted file mode 100644 index 2c7de79c8..000000000 --- a/drivers/rtc/rtc-s3c.c +++ /dev/null @@ -1,621 +0,0 @@ -/* drivers/rtc/rtc-s3c.c - * - * Copyright (c) 2004,2006 Simtec Electronics - * Ben Dooks, - * http://armlinux.simtec.co.uk/ - * - * 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. - * - * S3C2410/S3C2440/S3C24XX Internal RTC Driver -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include - -/* I have yet to find an S3C implementation with more than one - * of these rtc blocks in */ - -static struct resource *s3c_rtc_mem; - -static void __iomem *s3c_rtc_base; -static int s3c_rtc_alarmno = NO_IRQ; -static int s3c_rtc_tickno = NO_IRQ; -static int s3c_rtc_freq = 1; - -static DEFINE_SPINLOCK(s3c_rtc_pie_lock); -static unsigned int tick_count; - -/* IRQ Handlers */ - -static irqreturn_t s3c_rtc_alarmirq(int irq, void *id, struct pt_regs *r) -{ - struct rtc_device *rdev = id; - - rtc_update_irq(&rdev->class_dev, 1, RTC_AF | RTC_IRQF); - return IRQ_HANDLED; -} - -static irqreturn_t s3c_rtc_tickirq(int irq, void *id, struct pt_regs *r) -{ - struct rtc_device *rdev = id; - - rtc_update_irq(&rdev->class_dev, tick_count++, RTC_PF | RTC_IRQF); - return IRQ_HANDLED; -} - -/* Update control registers */ -static void s3c_rtc_setaie(int to) -{ - unsigned int tmp; - - pr_debug("%s: aie=%d\n", __FUNCTION__, to); - - tmp = readb(s3c_rtc_base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; - - if (to) - tmp |= S3C2410_RTCALM_ALMEN; - - writeb(tmp, s3c_rtc_base + S3C2410_RTCALM); -} - -static void s3c_rtc_setpie(int to) -{ - unsigned int tmp; - - pr_debug("%s: pie=%d\n", __FUNCTION__, to); - - spin_lock_irq(&s3c_rtc_pie_lock); - tmp = readb(s3c_rtc_base + S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE; - - if (to) - tmp |= S3C2410_TICNT_ENABLE; - - writeb(tmp, s3c_rtc_base + S3C2410_TICNT); - spin_unlock_irq(&s3c_rtc_pie_lock); -} - -static void s3c_rtc_setfreq(int freq) -{ - unsigned int tmp; - - spin_lock_irq(&s3c_rtc_pie_lock); - tmp = readb(s3c_rtc_base + S3C2410_TICNT) & S3C2410_TICNT_ENABLE; - - s3c_rtc_freq = freq; - - tmp |= (128 / freq)-1; - - writeb(tmp, s3c_rtc_base + S3C2410_TICNT); - spin_unlock_irq(&s3c_rtc_pie_lock); -} - -/* Time read/write */ - -static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) -{ - unsigned int have_retried = 0; - void __iomem *base = s3c_rtc_base; - - retry_get_time: - rtc_tm->tm_min = readb(base + S3C2410_RTCMIN); - rtc_tm->tm_hour = readb(base + S3C2410_RTCHOUR); - rtc_tm->tm_mday = readb(base + S3C2410_RTCDATE); - rtc_tm->tm_mon = readb(base + S3C2410_RTCMON); - rtc_tm->tm_year = readb(base + S3C2410_RTCYEAR); - rtc_tm->tm_sec = readb(base + S3C2410_RTCSEC); - - /* the only way to work out wether the system was mid-update - * when we read it is to check the second counter, and if it - * is zero, then we re-try the entire read - */ - - if (rtc_tm->tm_sec == 0 && !have_retried) { - have_retried = 1; - goto retry_get_time; - } - - pr_debug("read time %02x.%02x.%02x %02x/%02x/%02x\n", - rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, - rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); - - BCD_TO_BIN(rtc_tm->tm_sec); - BCD_TO_BIN(rtc_tm->tm_min); - BCD_TO_BIN(rtc_tm->tm_hour); - BCD_TO_BIN(rtc_tm->tm_mday); - BCD_TO_BIN(rtc_tm->tm_mon); - BCD_TO_BIN(rtc_tm->tm_year); - - rtc_tm->tm_year += 100; - rtc_tm->tm_mon -= 1; - - return 0; -} - -static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) -{ - void __iomem *base = s3c_rtc_base; - int year = tm->tm_year - 100; - - pr_debug("set time %02d.%02d.%02d %02d/%02d/%02d\n", - tm->tm_year, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - - /* we get around y2k by simply not supporting it */ - - if (year < 0 || year >= 100) { - dev_err(dev, "rtc only supports 100 years\n"); - return -EINVAL; - } - - writeb(BIN2BCD(tm->tm_sec), base + S3C2410_RTCSEC); - writeb(BIN2BCD(tm->tm_min), base + S3C2410_RTCMIN); - writeb(BIN2BCD(tm->tm_hour), base + S3C2410_RTCHOUR); - writeb(BIN2BCD(tm->tm_mday), base + S3C2410_RTCDATE); - writeb(BIN2BCD(tm->tm_mon + 1), base + S3C2410_RTCMON); - writeb(BIN2BCD(year), base + S3C2410_RTCYEAR); - - return 0; -} - -static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct rtc_time *alm_tm = &alrm->time; - void __iomem *base = s3c_rtc_base; - unsigned int alm_en; - - alm_tm->tm_sec = readb(base + S3C2410_ALMSEC); - alm_tm->tm_min = readb(base + S3C2410_ALMMIN); - alm_tm->tm_hour = readb(base + S3C2410_ALMHOUR); - alm_tm->tm_mon = readb(base + S3C2410_ALMMON); - alm_tm->tm_mday = readb(base + S3C2410_ALMDATE); - alm_tm->tm_year = readb(base + S3C2410_ALMYEAR); - - alm_en = readb(base + S3C2410_RTCALM); - - pr_debug("read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n", - alm_en, - alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, - alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); - - - /* decode the alarm enable field */ - - if (alm_en & S3C2410_RTCALM_SECEN) - BCD_TO_BIN(alm_tm->tm_sec); - else - alm_tm->tm_sec = 0xff; - - if (alm_en & S3C2410_RTCALM_MINEN) - BCD_TO_BIN(alm_tm->tm_min); - else - alm_tm->tm_min = 0xff; - - if (alm_en & S3C2410_RTCALM_HOUREN) - BCD_TO_BIN(alm_tm->tm_hour); - else - alm_tm->tm_hour = 0xff; - - if (alm_en & S3C2410_RTCALM_DAYEN) - BCD_TO_BIN(alm_tm->tm_mday); - else - alm_tm->tm_mday = 0xff; - - if (alm_en & S3C2410_RTCALM_MONEN) { - BCD_TO_BIN(alm_tm->tm_mon); - alm_tm->tm_mon -= 1; - } else { - alm_tm->tm_mon = 0xff; - } - - if (alm_en & S3C2410_RTCALM_YEAREN) - BCD_TO_BIN(alm_tm->tm_year); - else - alm_tm->tm_year = 0xffff; - - return 0; -} - -static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) -{ - struct rtc_time *tm = &alrm->time; - void __iomem *base = s3c_rtc_base; - unsigned int alrm_en; - - pr_debug("s3c_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n", - alrm->enabled, - tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff, - tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec); - - - alrm_en = readb(base + S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; - writeb(0x00, base + S3C2410_RTCALM); - - if (tm->tm_sec < 60 && tm->tm_sec >= 0) { - alrm_en |= S3C2410_RTCALM_SECEN; - writeb(BIN2BCD(tm->tm_sec), base + S3C2410_ALMSEC); - } - - if (tm->tm_min < 60 && tm->tm_min >= 0) { - alrm_en |= S3C2410_RTCALM_MINEN; - writeb(BIN2BCD(tm->tm_min), base + S3C2410_ALMMIN); - } - - if (tm->tm_hour < 24 && tm->tm_hour >= 0) { - alrm_en |= S3C2410_RTCALM_HOUREN; - writeb(BIN2BCD(tm->tm_hour), base + S3C2410_ALMHOUR); - } - - pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en); - - writeb(alrm_en, base + S3C2410_RTCALM); - - if (0) { - alrm_en = readb(base + S3C2410_RTCALM); - alrm_en &= ~S3C2410_RTCALM_ALMEN; - writeb(alrm_en, base + S3C2410_RTCALM); - disable_irq_wake(s3c_rtc_alarmno); - } - - if (alrm->enabled) - enable_irq_wake(s3c_rtc_alarmno); - else - disable_irq_wake(s3c_rtc_alarmno); - - return 0; -} - -static int s3c_rtc_ioctl(struct device *dev, - unsigned int cmd, unsigned long arg) -{ - unsigned int ret = -ENOIOCTLCMD; - - switch (cmd) { - case RTC_AIE_OFF: - case RTC_AIE_ON: - s3c_rtc_setaie((cmd == RTC_AIE_ON) ? 1 : 0); - ret = 0; - break; - - case RTC_PIE_OFF: - case RTC_PIE_ON: - tick_count = 0; - s3c_rtc_setpie((cmd == RTC_PIE_ON) ? 1 : 0); - ret = 0; - break; - - case RTC_IRQP_READ: - ret = put_user(s3c_rtc_freq, (unsigned long __user *)arg); - break; - - case RTC_IRQP_SET: - /* check for power of 2 */ - - if ((arg & (arg-1)) != 0 || arg < 1) { - ret = -EINVAL; - goto exit; - } - - pr_debug("s3c2410_rtc: setting frequency %ld\n", arg); - - s3c_rtc_setfreq(arg); - ret = 0; - break; - - case RTC_UIE_ON: - case RTC_UIE_OFF: - ret = -EINVAL; - } - - exit: - return ret; -} - -static int s3c_rtc_proc(struct device *dev, struct seq_file *seq) -{ - unsigned int rtcalm = readb(s3c_rtc_base + S3C2410_RTCALM); - unsigned int ticnt = readb(s3c_rtc_base + S3C2410_TICNT); - - seq_printf(seq, "alarm_IRQ\t: %s\n", - (rtcalm & S3C2410_RTCALM_ALMEN) ? "yes" : "no" ); - - seq_printf(seq, "periodic_IRQ\t: %s\n", - (ticnt & S3C2410_TICNT_ENABLE) ? "yes" : "no" ); - - seq_printf(seq, "periodic_freq\t: %d\n", s3c_rtc_freq); - - return 0; -} - -static int s3c_rtc_open(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_device *rtc_dev = platform_get_drvdata(pdev); - int ret; - - ret = request_irq(s3c_rtc_alarmno, s3c_rtc_alarmirq, - SA_INTERRUPT, "s3c2410-rtc alarm", rtc_dev); - - if (ret) { - dev_err(dev, "IRQ%d error %d\n", s3c_rtc_alarmno, ret); - return ret; - } - - ret = request_irq(s3c_rtc_tickno, s3c_rtc_tickirq, - SA_INTERRUPT, "s3c2410-rtc tick", rtc_dev); - - if (ret) { - dev_err(dev, "IRQ%d error %d\n", s3c_rtc_tickno, ret); - goto tick_err; - } - - return ret; - - tick_err: - free_irq(s3c_rtc_alarmno, rtc_dev); - return ret; -} - -static void s3c_rtc_release(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct rtc_device *rtc_dev = platform_get_drvdata(pdev); - - /* do not clear AIE here, it may be needed for wake */ - - s3c_rtc_setpie(0); - free_irq(s3c_rtc_alarmno, rtc_dev); - free_irq(s3c_rtc_tickno, rtc_dev); -} - -static struct rtc_class_ops s3c_rtcops = { - .open = s3c_rtc_open, - .release = s3c_rtc_release, - .ioctl = s3c_rtc_ioctl, - .read_time = s3c_rtc_gettime, - .set_time = s3c_rtc_settime, - .read_alarm = s3c_rtc_getalarm, - .set_alarm = s3c_rtc_setalarm, - .proc = s3c_rtc_proc, -}; - -static void s3c_rtc_enable(struct platform_device *pdev, int en) -{ - void __iomem *base = s3c_rtc_base; - unsigned int tmp; - - if (s3c_rtc_base == NULL) - return; - - if (!en) { - tmp = readb(base + S3C2410_RTCCON); - writeb(tmp & ~S3C2410_RTCCON_RTCEN, base + S3C2410_RTCCON); - - tmp = readb(base + S3C2410_TICNT); - writeb(tmp & ~S3C2410_TICNT_ENABLE, base + S3C2410_TICNT); - } else { - /* re-enable the device, and check it is ok */ - - if ((readb(base+S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0){ - dev_info(&pdev->dev, "rtc disabled, re-enabling\n"); - - tmp = readb(base + S3C2410_RTCCON); - writeb(tmp|S3C2410_RTCCON_RTCEN, base+S3C2410_RTCCON); - } - - if ((readb(base + S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)){ - dev_info(&pdev->dev, "removing RTCCON_CNTSEL\n"); - - tmp = readb(base + S3C2410_RTCCON); - writeb(tmp& ~S3C2410_RTCCON_CNTSEL, base+S3C2410_RTCCON); - } - - if ((readb(base + S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)){ - dev_info(&pdev->dev, "removing RTCCON_CLKRST\n"); - - tmp = readb(base + S3C2410_RTCCON); - writeb(tmp & ~S3C2410_RTCCON_CLKRST, base+S3C2410_RTCCON); - } - } -} - -static int s3c_rtc_remove(struct platform_device *dev) -{ - struct rtc_device *rtc = platform_get_drvdata(dev); - - platform_set_drvdata(dev, NULL); - rtc_device_unregister(rtc); - - s3c_rtc_setpie(0); - s3c_rtc_setaie(0); - - iounmap(s3c_rtc_base); - release_resource(s3c_rtc_mem); - kfree(s3c_rtc_mem); - - return 0; -} - -static int s3c_rtc_probe(struct platform_device *pdev) -{ - struct rtc_device *rtc; - struct resource *res; - int ret; - - pr_debug("%s: probe=%p\n", __FUNCTION__, pdev); - - /* find the IRQs */ - - s3c_rtc_tickno = platform_get_irq(pdev, 1); - if (s3c_rtc_tickno < 0) { - dev_err(&pdev->dev, "no irq for rtc tick\n"); - return -ENOENT; - } - - s3c_rtc_alarmno = platform_get_irq(pdev, 0); - if (s3c_rtc_alarmno < 0) { - dev_err(&pdev->dev, "no irq for alarm\n"); - return -ENOENT; - } - - pr_debug("s3c2410_rtc: tick irq %d, alarm irq %d\n", - s3c_rtc_tickno, s3c_rtc_alarmno); - - /* get the memory region */ - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(&pdev->dev, "failed to get memory region resource\n"); - return -ENOENT; - } - - s3c_rtc_mem = request_mem_region(res->start, - res->end-res->start+1, - pdev->name); - - if (s3c_rtc_mem == NULL) { - dev_err(&pdev->dev, "failed to reserve memory region\n"); - ret = -ENOENT; - goto err_nores; - } - - s3c_rtc_base = ioremap(res->start, res->end - res->start + 1); - if (s3c_rtc_base == NULL) { - dev_err(&pdev->dev, "failed ioremap()\n"); - ret = -EINVAL; - goto err_nomap; - } - - /* check to see if everything is setup correctly */ - - s3c_rtc_enable(pdev, 1); - - pr_debug("s3c2410_rtc: RTCCON=%02x\n", - readb(s3c_rtc_base + S3C2410_RTCCON)); - - s3c_rtc_setfreq(s3c_rtc_freq); - - /* register RTC and exit */ - - rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops, - THIS_MODULE); - - if (IS_ERR(rtc)) { - dev_err(&pdev->dev, "cannot attach rtc\n"); - ret = PTR_ERR(rtc); - goto err_nortc; - } - - rtc->max_user_freq = 128; - - platform_set_drvdata(pdev, rtc); - return 0; - - err_nortc: - s3c_rtc_enable(pdev, 0); - iounmap(s3c_rtc_base); - - err_nomap: - release_resource(s3c_rtc_mem); - - err_nores: - return ret; -} - -#ifdef CONFIG_PM - -/* RTC Power management control */ - -static struct timespec s3c_rtc_delta; - -static int ticnt_save; - -static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - - /* save TICNT for anyone using periodic interrupts */ - - ticnt_save = readb(s3c_rtc_base + S3C2410_TICNT); - - /* calculate time delta for suspend */ - - s3c_rtc_gettime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - save_time_delta(&s3c_rtc_delta, &time); - s3c_rtc_enable(pdev, 0); - - return 0; -} - -static int s3c_rtc_resume(struct platform_device *pdev) -{ - struct rtc_time tm; - struct timespec time; - - time.tv_nsec = 0; - - s3c_rtc_enable(pdev, 1); - s3c_rtc_gettime(&pdev->dev, &tm); - rtc_tm_to_time(&tm, &time.tv_sec); - restore_time_delta(&s3c_rtc_delta, &time); - - writeb(ticnt_save, s3c_rtc_base + S3C2410_TICNT); - return 0; -} -#else -#define s3c_rtc_suspend NULL -#define s3c_rtc_resume NULL -#endif - -static struct platform_driver s3c2410_rtcdrv = { - .probe = s3c_rtc_probe, - .remove = s3c_rtc_remove, - .suspend = s3c_rtc_suspend, - .resume = s3c_rtc_resume, - .driver = { - .name = "s3c2410-rtc", - .owner = THIS_MODULE, - }, -}; - -static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics\n"; - -static int __init s3c_rtc_init(void) -{ - printk(banner); - return platform_driver_register(&s3c2410_rtcdrv); -} - -static void __exit s3c_rtc_exit(void) -{ - platform_driver_unregister(&s3c2410_rtcdrv); -} - -module_init(s3c_rtc_init); -module_exit(s3c_rtc_exit); - -MODULE_DESCRIPTION("Samsung S3C RTC Driver"); -MODULE_AUTHOR("Ben Dooks "); -MODULE_LICENSE("GPL"); diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index ee4b61ee6..a997529f8 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c @@ -45,7 +45,7 @@ static unsigned long rtc_freq = 1024; static struct rtc_time rtc_alarm; -static DEFINE_SPINLOCK(sa1100_rtc_lock); +static spinlock_t sa1100_rtc_lock = SPIN_LOCK_UNLOCKED; static int rtc_update_alarm(struct rtc_time *alrm) { @@ -157,19 +157,19 @@ static int sa1100_rtc_open(struct device *dev) { int ret; - ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED, + ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, SA_INTERRUPT, "rtc 1Hz", dev); if (ret) { dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz); goto fail_ui; } - ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, IRQF_DISABLED, + ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, SA_INTERRUPT, "rtc Alrm", dev); if (ret) { dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm); goto fail_ai; } - ret = request_irq(IRQ_OST1, timer1_interrupt, IRQF_DISABLED, + ret = request_irq(IRQ_OST1, timer1_interrupt, SA_INTERRUPT, "rtc timer", dev); if (ret) { dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1); @@ -229,6 +229,8 @@ static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd, spin_unlock_irq(&sa1100_rtc_lock); return 0; case RTC_PIE_ON: + if ((rtc_freq > 64) && !capable(CAP_SYS_RESOURCE)) + return -EACCES; spin_lock_irq(&sa1100_rtc_lock); OSMR1 = TIMER_FREQ/rtc_freq + OSCR; OIER |= OIER_E1; @@ -240,6 +242,8 @@ static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd, case RTC_IRQP_SET: if (arg < 1 || arg > TIMER_FREQ) return -EINVAL; + if ((arg > 64) && (!capable(CAP_SYS_RESOURCE))) + return -EACCES; rtc_freq = arg; return 0; } diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c deleted file mode 100644 index a40f400ac..000000000 --- a/drivers/rtc/rtc-v3020.c +++ /dev/null @@ -1,264 +0,0 @@ -/* drivers/rtc/rtc-v3020.c - * - * Copyright (C) 2006 8D Technologies inc. - * Copyright (C) 2004 Compulab Ltd. - * - * 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. - * - * Driver for the V3020 RTC - * - * Changelog: - * - * 10-May-2006: Raphael Assenat - * - Converted to platform driver - * - Use the generic rtc class - * - * ??-???-2004: Someone at Compulab - * - Initial driver creation. - * - */ -#include -#include -#include -#include -#include -#include -#include - -#include - -#undef DEBUG - -struct v3020 { - void __iomem *ioaddress; - int leftshift; - struct rtc_device *rtc; -}; - -static void v3020_set_reg(struct v3020 *chip, unsigned char address, - unsigned char data) -{ - int i; - unsigned char tmp; - - tmp = address; - for (i = 0; i < 4; i++) { - writel((tmp & 1) << chip->leftshift, chip->ioaddress); - tmp >>= 1; - } - - /* Commands dont have data */ - if (!V3020_IS_COMMAND(address)) { - for (i = 0; i < 8; i++) { - writel((data & 1) << chip->leftshift, chip->ioaddress); - data >>= 1; - } - } -} - -static unsigned char v3020_get_reg(struct v3020 *chip, unsigned char address) -{ - unsigned int data=0; - int i; - - for (i = 0; i < 4; i++) { - writel((address & 1) << chip->leftshift, chip->ioaddress); - address >>= 1; - } - - for (i = 0; i < 8; i++) { - data >>= 1; - if (readl(chip->ioaddress) & (1 << chip->leftshift)) - data |= 0x80; - } - - return data; -} - -static int v3020_read_time(struct device *dev, struct rtc_time *dt) -{ - struct v3020 *chip = dev_get_drvdata(dev); - int tmp; - - /* Copy the current time to ram... */ - v3020_set_reg(chip, V3020_CMD_CLOCK2RAM, 0); - - /* ...and then read constant values. */ - tmp = v3020_get_reg(chip, V3020_SECONDS); - dt->tm_sec = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_MINUTES); - dt->tm_min = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_HOURS); - dt->tm_hour = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_MONTH_DAY); - dt->tm_mday = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_MONTH); - dt->tm_mon = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_WEEK_DAY); - dt->tm_wday = BCD2BIN(tmp); - tmp = v3020_get_reg(chip, V3020_YEAR); - dt->tm_year = BCD2BIN(tmp)+100; - -#ifdef DEBUG - printk("\n%s : Read RTC values\n",__FUNCTION__); - printk("tm_hour: %i\n",dt->tm_hour); - printk("tm_min : %i\n",dt->tm_min); - printk("tm_sec : %i\n",dt->tm_sec); - printk("tm_year: %i\n",dt->tm_year); - printk("tm_mon : %i\n",dt->tm_mon); - printk("tm_mday: %i\n",dt->tm_mday); - printk("tm_wday: %i\n",dt->tm_wday); -#endif - - return 0; -} - - -static int v3020_set_time(struct device *dev, struct rtc_time *dt) -{ - struct v3020 *chip = dev_get_drvdata(dev); - -#ifdef DEBUG - printk("\n%s : Setting RTC values\n",__FUNCTION__); - printk("tm_sec : %i\n",dt->tm_sec); - printk("tm_min : %i\n",dt->tm_min); - printk("tm_hour: %i\n",dt->tm_hour); - printk("tm_mday: %i\n",dt->tm_mday); - printk("tm_wday: %i\n",dt->tm_wday); - printk("tm_year: %i\n",dt->tm_year); -#endif - - /* Write all the values to ram... */ - v3020_set_reg(chip, V3020_SECONDS, BIN2BCD(dt->tm_sec)); - v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min)); - v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour)); - v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday)); - v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon)); - v3020_set_reg(chip, V3020_WEEK_DAY, BIN2BCD(dt->tm_wday)); - v3020_set_reg(chip, V3020_YEAR, BIN2BCD(dt->tm_year % 100)); - - /* ...and set the clock. */ - v3020_set_reg(chip, V3020_CMD_RAM2CLOCK, 0); - - /* Compulab used this delay here. I dont know why, - * the datasheet does not specify a delay. */ - /*mdelay(5);*/ - - return 0; -} - -static struct rtc_class_ops v3020_rtc_ops = { - .read_time = v3020_read_time, - .set_time = v3020_set_time, -}; - -static int rtc_probe(struct platform_device *pdev) -{ - struct v3020_platform_data *pdata = pdev->dev.platform_data; - struct v3020 *chip; - struct rtc_device *rtc; - int retval = -EBUSY; - int i; - int temp; - - if (pdev->num_resources != 1) - return -EBUSY; - - if (pdev->resource[0].flags != IORESOURCE_MEM) - return -EBUSY; - - if (pdev == NULL) - return -EBUSY; - - chip = kzalloc(sizeof *chip, GFP_KERNEL); - if (!chip) - return -ENOMEM; - - chip->leftshift = pdata->leftshift; - chip->ioaddress = ioremap(pdev->resource[0].start, 1); - if (chip->ioaddress == NULL) - goto err_chip; - - /* Make sure the v3020 expects a communication cycle - * by reading 8 times */ - for (i = 0; i < 8; i++) - temp = readl(chip->ioaddress); - - /* Test chip by doing a write/read sequence - * to the chip ram */ - v3020_set_reg(chip, V3020_SECONDS, 0x33); - if(v3020_get_reg(chip, V3020_SECONDS) != 0x33) { - retval = -ENODEV; - goto err_io; - } - - /* Make sure frequency measurment mode, test modes, and lock - * are all disabled */ - v3020_set_reg(chip, V3020_STATUS_0, 0x0); - - dev_info(&pdev->dev, "Chip available at physical address 0x%p," - "data connected to D%d\n", - (void*)pdev->resource[0].start, - chip->leftshift); - - platform_set_drvdata(pdev, chip); - - rtc = rtc_device_register("v3020", - &pdev->dev, &v3020_rtc_ops, THIS_MODULE); - if (IS_ERR(rtc)) { - retval = PTR_ERR(rtc); - goto err_io; - } - chip->rtc = rtc; - - return 0; - -err_io: - iounmap(chip->ioaddress); -err_chip: - kfree(chip); - - return retval; -} - -static int rtc_remove(struct platform_device *dev) -{ - struct v3020 *chip = platform_get_drvdata(dev); - struct rtc_device *rtc = chip->rtc; - - if (rtc) - rtc_device_unregister(rtc); - - iounmap(chip->ioaddress); - kfree(chip); - - return 0; -} - -static struct platform_driver rtc_device_driver = { - .probe = rtc_probe, - .remove = rtc_remove, - .driver = { - .name = "v3020", - .owner = THIS_MODULE, - }, -}; - -static __init int v3020_init(void) -{ - return platform_driver_register(&rtc_device_driver); -} - -static __exit void v3020_exit(void) -{ - platform_driver_unregister(&rtc_device_driver); -} - -module_init(v3020_init); -module_exit(v3020_exit); - -MODULE_DESCRIPTION("V3020 RTC"); -MODULE_AUTHOR("Raphael Assenat"); -MODULE_LICENSE("GPL"); diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 596764fd2..277596c30 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include MODULE_AUTHOR("Yoichi Yuasa "); MODULE_DESCRIPTION("NEC VR4100 series RTC driver"); @@ -81,6 +81,7 @@ MODULE_LICENSE("GPL"); #define RTC_FREQUENCY 32768 #define MAX_PERIODIC_RATE 6553 +#define MAX_USER_PERIODIC_RATE 64 static void __iomem *rtc1_base; static void __iomem *rtc2_base; @@ -93,7 +94,7 @@ static void __iomem *rtc2_base; static unsigned long epoch = 1970; /* Jan 1 1970 00:00:00 */ -static DEFINE_SPINLOCK(rtc_lock); +static spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; static char rtc_name[] = "RTC"; static unsigned long periodic_frequency; static unsigned long periodic_count; @@ -239,6 +240,9 @@ static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long if (arg > MAX_PERIODIC_RATE) return -EINVAL; + if (arg > MAX_USER_PERIODIC_RATE && capable(CAP_SYS_RESOURCE) == 0) + return -EACCES; + periodic_frequency = arg; count = RTC_FREQUENCY; @@ -259,6 +263,10 @@ static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long /* Doesn't support before 1900 */ if (arg < 1900) return -EINVAL; + + if (capable(CAP_SYS_TIME) == 0) + return -EACCES; + epoch = arg; break; default: @@ -345,11 +353,11 @@ static int __devinit rtc_probe(struct platform_device *pdev) spin_unlock_irq(&rtc_lock); irq = ELAPSEDTIME_IRQ; - retval = request_irq(irq, elapsedtime_interrupt, IRQF_DISABLED, + retval = request_irq(irq, elapsedtime_interrupt, SA_INTERRUPT, "elapsed_time", pdev); if (retval == 0) { irq = RTCLONG1_IRQ; - retval = request_irq(irq, rtclong1_interrupt, IRQF_DISABLED, + retval = request_irq(irq, rtclong1_interrupt, SA_INTERRUPT, "rtclong1", pdev); } diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 25c1ef6df..cfb1fff37 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -52,7 +53,7 @@ static void dasd_setup_queue(struct dasd_device * device); static void dasd_free_queue(struct dasd_device * device); static void dasd_flush_request_queue(struct dasd_device *); static void dasd_int_handler(struct ccw_device *, unsigned long, struct irb *); -static int dasd_flush_ccw_queue(struct dasd_device *, int); +static void dasd_flush_ccw_queue(struct dasd_device *, int); static void dasd_tasklet(struct dasd_device *); static void do_kick_device(void *data); @@ -60,7 +61,6 @@ static void do_kick_device(void *data); * SECTION: Operations on the device structure. */ static wait_queue_head_t dasd_init_waitq; -static wait_queue_head_t dasd_flush_wq; /* * Allocate memory for a new device structure. @@ -95,7 +95,7 @@ dasd_alloc_device(void) spin_lock_init(&device->mem_lock); spin_lock_init(&device->request_queue_lock); atomic_set (&device->tasklet_scheduled, 0); - tasklet_init(&device->tasklet, + tasklet_init(&device->tasklet, (void (*)(unsigned long)) dasd_tasklet, (unsigned long) device); INIT_LIST_HEAD(&device->ccw_queue); @@ -122,13 +122,13 @@ dasd_free_device(struct dasd_device *device) /* * Make a new device known to the system. */ -static int +static inline int dasd_state_new_to_known(struct dasd_device *device) { int rc; /* - * As long as the device is not in state DASD_STATE_NEW we want to + * As long as the device is not in state DASD_STATE_NEW we want to * keep the reference count > 0. */ dasd_get_device(device); @@ -146,7 +146,7 @@ dasd_state_new_to_known(struct dasd_device *device) /* * Let the system forget about a device. */ -static int +static inline void dasd_state_known_to_new(struct dasd_device * device) { /* Disable extended error reporting for this device. */ @@ -164,13 +164,12 @@ dasd_state_known_to_new(struct dasd_device * device) /* Give up reference we took in dasd_state_new_to_known. */ dasd_put_device(device); - return 0; } /* * Request the irq line for the device. */ -static int +static inline int dasd_state_known_to_basic(struct dasd_device * device) { int rc; @@ -194,23 +193,17 @@ dasd_state_known_to_basic(struct dasd_device * device) /* * Release the irq line for the device. Terminate any running i/o. */ -static int +static inline void dasd_state_basic_to_known(struct dasd_device * device) { - int rc; - dasd_gendisk_free(device); - rc = dasd_flush_ccw_queue(device, 1); - if (rc) - return rc; - + dasd_flush_ccw_queue(device, 1); DBF_DEV_EVENT(DBF_EMERG, device, "%p debug area deleted", device); if (device->debug_area != NULL) { debug_unregister(device->debug_area); device->debug_area = NULL; } device->state = DASD_STATE_KNOWN; - return 0; } /* @@ -227,7 +220,7 @@ dasd_state_basic_to_known(struct dasd_device * device) * In case the analysis returns an error, the device setup is stopped * (a fake disk was already added to allow formatting). */ -static int +static inline int dasd_state_basic_to_ready(struct dasd_device * device) { int rc; @@ -255,31 +248,25 @@ dasd_state_basic_to_ready(struct dasd_device * device) * Forget format information. Check if the target level is basic * and if it is create fake disk for formatting. */ -static int +static inline void dasd_state_ready_to_basic(struct dasd_device * device) { - int rc; - - rc = dasd_flush_ccw_queue(device, 0); - if (rc) - return rc; + dasd_flush_ccw_queue(device, 0); dasd_destroy_partitions(device); dasd_flush_request_queue(device); device->blocks = 0; device->bp_block = 0; device->s2b_shift = 0; device->state = DASD_STATE_BASIC; - return 0; } /* * Back to basic. */ -static int +static inline void dasd_state_unfmt_to_basic(struct dasd_device * device) { device->state = DASD_STATE_BASIC; - return 0; } /* @@ -287,7 +274,7 @@ dasd_state_unfmt_to_basic(struct dasd_device * device) * the requeueing of requests from the linux request queue to the * ccw queue. */ -static int +static inline int dasd_state_ready_to_online(struct dasd_device * device) { device->state = DASD_STATE_ONLINE; @@ -298,17 +285,16 @@ dasd_state_ready_to_online(struct dasd_device * device) /* * Stop the requeueing of requests again. */ -static int +static inline void dasd_state_online_to_ready(struct dasd_device * device) { device->state = DASD_STATE_READY; - return 0; } /* * Device startup state changes. */ -static int +static inline int dasd_increase_state(struct dasd_device *device) { int rc; @@ -344,37 +330,30 @@ dasd_increase_state(struct dasd_device *device) /* * Device shutdown state changes. */ -static int +static inline int dasd_decrease_state(struct dasd_device *device) { - int rc; - - rc = 0; if (device->state == DASD_STATE_ONLINE && device->target <= DASD_STATE_READY) - rc = dasd_state_online_to_ready(device); - - if (!rc && - device->state == DASD_STATE_READY && + dasd_state_online_to_ready(device); + + if (device->state == DASD_STATE_READY && device->target <= DASD_STATE_BASIC) - rc = dasd_state_ready_to_basic(device); + dasd_state_ready_to_basic(device); - if (!rc && - device->state == DASD_STATE_UNFMT && + if (device->state == DASD_STATE_UNFMT && device->target <= DASD_STATE_BASIC) - rc = dasd_state_unfmt_to_basic(device); + dasd_state_unfmt_to_basic(device); - if (!rc && - device->state == DASD_STATE_BASIC && + if (device->state == DASD_STATE_BASIC && device->target <= DASD_STATE_KNOWN) - rc = dasd_state_basic_to_known(device); - - if (!rc && - device->state == DASD_STATE_KNOWN && + dasd_state_basic_to_known(device); + + if (device->state == DASD_STATE_KNOWN && device->target <= DASD_STATE_NEW) - rc = dasd_state_known_to_new(device); + dasd_state_known_to_new(device); - return rc; + return 0; } /* @@ -723,7 +702,6 @@ dasd_term_IO(struct dasd_ccw_req * cqr) cqr->retries--; cqr->status = DASD_CQR_CLEAR; cqr->stopclk = get_clock(); - cqr->starttime = 0; DBF_DEV_EVENT(DBF_DEBUG, device, "terminate cqr %p successful", cqr); @@ -1001,7 +979,6 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { cqr->status = DASD_CQR_QUEUED; dasd_clear_timer(device); - wake_up(&dasd_flush_wq); dasd_schedule_bh(device); return; } @@ -1017,7 +994,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr); /* Find out the appropriate era_action. */ - if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) + if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) era = dasd_era_fatal; else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && irb->scsw.cstat == 0 && @@ -1027,7 +1004,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, era = dasd_era_fatal; /* don't recover this request */ else if (irb->esw.esw0.erw.cons) era = device->discipline->examine_error(cqr, irb); - else + else era = dasd_era_recover; DBF_DEV_EVENT(DBF_DEBUG, device, "era_code %d", era); @@ -1265,10 +1242,6 @@ __dasd_check_expire(struct dasd_device * device) cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) { if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) { - DEV_MESSAGE(KERN_ERR, device, - "internal error - timeout (%is) expired " - "for cqr %p (%i retries left)", - (cqr->expires/HZ), cqr, cqr->retries); if (device->discipline->term_IO(cqr) != 0) /* Hmpf, try again in 1/10 sec */ dasd_set_timer(device, 10); @@ -1313,100 +1286,46 @@ __dasd_start_head(struct dasd_device * device) dasd_set_timer(device, 50); } -static inline int -_wait_for_clear(struct dasd_ccw_req *cqr) -{ - return (cqr->status == DASD_CQR_QUEUED); -} - /* - * Remove all requests from the ccw queue (all = '1') or only block device - * requests in case all = '0'. - * Take care of the erp-chain (chained via cqr->refers) and remove either - * the whole erp-chain or none of the erp-requests. - * If a request is currently running, term_IO is called and the request - * is re-queued. Prior to removing the terminated request we need to wait - * for the clear-interrupt. - * In case termination is not possible we stop processing and just finishing - * the already moved requests. + * Remove requests from the ccw queue. */ -static int +static void dasd_flush_ccw_queue(struct dasd_device * device, int all) { - struct dasd_ccw_req *cqr, *orig, *n; - int rc, i; - struct list_head flush_queue; + struct list_head *l, *n; + struct dasd_ccw_req *cqr; INIT_LIST_HEAD(&flush_queue); spin_lock_irq(get_ccwdev_lock(device->cdev)); - rc = 0; -restart: - list_for_each_entry_safe(cqr, n, &device->ccw_queue, list) { - /* get original request of erp request-chain */ - for (orig = cqr; orig->refers != NULL; orig = orig->refers); - + list_for_each_safe(l, n, &device->ccw_queue) { + cqr = list_entry(l, struct dasd_ccw_req, list); /* Flush all request or only block device requests? */ - if (all == 0 && cqr->callback != dasd_end_request_cb && - orig->callback != dasd_end_request_cb) { + if (all == 0 && cqr->callback == dasd_end_request_cb) continue; - } - /* Check status and move request to flush_queue */ - switch (cqr->status) { - case DASD_CQR_IN_IO: - rc = device->discipline->term_IO(cqr); - if (rc) { - /* unable to terminate requeust */ - DEV_MESSAGE(KERN_ERR, device, - "dasd flush ccw_queue is unable " - " to terminate request %p", - cqr); - /* stop flush processing */ - goto finished; - } - break; - case DASD_CQR_QUEUED: - case DASD_CQR_ERROR: - /* set request to FAILED */ - cqr->stopclk = get_clock(); - cqr->status = DASD_CQR_FAILED; - break; - default: /* do not touch the others */ - break; - } - /* Rechain request (including erp chain) */ - for (i = 0; cqr != NULL; cqr = cqr->refers, i++) { - cqr->endclk = get_clock(); - list_move_tail(&cqr->list, &flush_queue); - } - if (i > 1) - /* moved more than one request - need to restart */ - goto restart; - } - -finished: - spin_unlock_irq(get_ccwdev_lock(device->cdev)); - /* Now call the callback function of flushed requests */ -restart_cb: - list_for_each_entry_safe(cqr, n, &flush_queue, list) { - if (cqr->status == DASD_CQR_CLEAR) { - /* wait for clear interrupt! */ - wait_event(dasd_flush_wq, _wait_for_clear(cqr)); + if (cqr->status == DASD_CQR_IN_IO) + device->discipline->term_IO(cqr); + if (cqr->status != DASD_CQR_DONE || + cqr->status != DASD_CQR_FAILED) { cqr->status = DASD_CQR_FAILED; + cqr->stopclk = get_clock(); } /* Process finished ERP request. */ if (cqr->refers) { __dasd_process_erp(device, cqr); - /* restart list_for_xx loop since dasd_process_erp - * might remove multiple elements */ - goto restart_cb; + continue; } - /* call the callback function */ + /* Rechain request on device request queue */ cqr->endclk = get_clock(); + list_move_tail(&cqr->list, &flush_queue); + } + spin_unlock_irq(get_ccwdev_lock(device->cdev)); + /* Now call the callback function of flushed requests */ + list_for_each_safe(l, n, &flush_queue) { + cqr = list_entry(l, struct dasd_ccw_req, list); if (cqr->callback != NULL) (cqr->callback)(cqr, cqr->callback_data); } - return rc; } /* @@ -1531,23 +1450,23 @@ dasd_sleep_on(struct dasd_ccw_req * cqr) wait_queue_head_t wait_q; struct dasd_device *device; int rc; - + device = cqr->device; spin_lock_irq(get_ccwdev_lock(device->cdev)); - + init_waitqueue_head (&wait_q); cqr->callback = dasd_wakeup_cb; cqr->callback_data = (void *) &wait_q; cqr->status = DASD_CQR_QUEUED; list_add_tail(&cqr->list, &device->ccw_queue); - + /* let the bh start the request to keep them in order */ dasd_schedule_bh(device); - + spin_unlock_irq(get_ccwdev_lock(device->cdev)); wait_event(wait_q, _wait_for_wakeup(cqr)); - + /* Request status is either done or failed. */ rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; return rc; @@ -1592,8 +1511,10 @@ dasd_sleep_on_interruptible(struct dasd_ccw_req * cqr) if (device->discipline->term_IO) { cqr->retries = -1; device->discipline->term_IO(cqr); - /* wait (non-interruptible) for final status - * because signal ist still pending */ + /*nished = + * wait (non-interruptible) for final status + * because signal ist still pending + */ spin_unlock_irq(get_ccwdev_lock(device->cdev)); wait_event(wait_q, _wait_for_wakeup(cqr)); spin_lock_irq(get_ccwdev_lock(device->cdev)); @@ -1626,11 +1547,19 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device) { struct dasd_ccw_req *cqr; + int rc; if (list_empty(&device->ccw_queue)) return 0; cqr = list_entry(device->ccw_queue.next, struct dasd_ccw_req, list); - return device->discipline->term_IO(cqr); + rc = device->discipline->term_IO(cqr); + if (rc == 0) { + /* termination successful */ + cqr->status = DASD_CQR_QUEUED; + cqr->startclk = cqr->stopclk = 0; + cqr->starttime = 0; + } + return rc; } int @@ -1639,7 +1568,7 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr) wait_queue_head_t wait_q; struct dasd_device *device; int rc; - + device = cqr->device; spin_lock_irq(get_ccwdev_lock(device->cdev)); rc = _dasd_term_running_cqr(device); @@ -1647,20 +1576,20 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr) spin_unlock_irq(get_ccwdev_lock(device->cdev)); return rc; } - + init_waitqueue_head (&wait_q); cqr->callback = dasd_wakeup_cb; cqr->callback_data = (void *) &wait_q; cqr->status = DASD_CQR_QUEUED; list_add(&cqr->list, &device->ccw_queue); - + /* let the bh start the request to keep them in order */ dasd_schedule_bh(device); - + spin_unlock_irq(get_ccwdev_lock(device->cdev)); wait_event(wait_q, _wait_for_wakeup(cqr)); - + /* Request status is either done or failed. */ rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; return rc; @@ -1796,11 +1725,14 @@ dasd_flush_request_queue(struct dasd_device * device) if (!device->request_queue) return; - + spin_lock_irq(&device->request_queue_lock); - while ((req = elv_next_request(device->request_queue))) { - blkdev_dequeue_request(req); + while (!list_empty(&device->request_queue->queue_head)) { + req = elv_next_request(device->request_queue); + if (req == NULL) + break; dasd_end_request(req, 0); + blkdev_dequeue_request(req); } spin_unlock_irq(&device->request_queue_lock); } @@ -1902,6 +1834,7 @@ dasd_exit(void) } dasd_gendisk_exit(); dasd_devmap_exit(); + devfs_remove("dasd"); if (dasd_debug_area != NULL) { debug_unregister(dasd_debug_area); dasd_debug_area = NULL; @@ -1922,34 +1855,15 @@ dasd_generic_probe (struct ccw_device *cdev, { int ret; - ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); - if (ret) { - printk(KERN_WARNING - "dasd_generic_probe: could not set ccw-device options " - "for %s\n", cdev->dev.bus_id); - return ret; - } ret = dasd_add_sysfs_files(cdev); if (ret) { printk(KERN_WARNING "dasd_generic_probe: could not add sysfs entries " "for %s\n", cdev->dev.bus_id); - return ret; + } else { + cdev->handler = &dasd_int_handler; } - cdev->handler = &dasd_int_handler; - /* - * Automatically online either all dasd devices (dasd_autodetect) - * or all devices specified with dasd= parameters during - * initial probe. - */ - if ((dasd_get_feature(cdev, DASD_FEATURE_INITIAL_ONLINE) > 0 ) || - (dasd_autodetect && dasd_busid_known(cdev->dev.bus_id) != 0)) - ret = ccw_device_set_online(cdev); - if (ret) - printk(KERN_WARNING - "dasd_generic_probe: could not initially online " - "ccw-device %s\n", cdev->dev.bus_id); return ret; } @@ -1997,8 +1911,6 @@ dasd_generic_set_online (struct ccw_device *cdev, struct dasd_device *device; int rc; - /* first online clears initial online feature flag */ - dasd_set_feature(cdev, DASD_FEATURE_INITIAL_ONLINE, 0); device = dasd_create_device(cdev); if (IS_ERR(device)) return PTR_ERR(device); @@ -2153,6 +2065,31 @@ dasd_generic_notify(struct ccw_device *cdev, int event) return ret; } +/* + * Automatically online either all dasd devices (dasd_autodetect) or + * all devices specified with dasd= parameters. + */ +static int +__dasd_auto_online(struct device *dev, void *data) +{ + struct ccw_device *cdev; + + cdev = to_ccwdev(dev); + if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) + ccw_device_set_online(cdev); + return 0; +} + +void +dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) +{ + struct device_driver *drv; + + drv = get_driver(&dasd_discipline_driver->driver); + driver_for_each_device(drv, NULL, NULL, __dasd_auto_online); + put_driver(drv); +} + static int __init dasd_init(void) @@ -2160,7 +2097,6 @@ dasd_init(void) int rc; init_waitqueue_head(&dasd_init_waitq); - init_waitqueue_head(&dasd_flush_wq); /* register 'common' DASD debug area, used for all DBF_XXX calls */ dasd_debug_area = debug_register("dasd", 1, 2, 8 * sizeof (long)); @@ -2175,6 +2111,9 @@ dasd_init(void) dasd_diag_discipline_pointer = NULL; + rc = devfs_mk_dir("dasd"); + if (rc) + goto failed; rc = dasd_devmap_init(); if (rc) goto failed; @@ -2231,4 +2170,23 @@ EXPORT_SYMBOL_GPL(dasd_generic_remove); EXPORT_SYMBOL_GPL(dasd_generic_notify); EXPORT_SYMBOL_GPL(dasd_generic_set_online); EXPORT_SYMBOL_GPL(dasd_generic_set_offline); +EXPORT_SYMBOL_GPL(dasd_generic_auto_online); +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_3370_erp.c b/drivers/s390/block/dasd_3370_erp.c index 1ddab8991..1d11c2a95 100644 --- a/drivers/s390/block/dasd_3370_erp.c +++ b/drivers/s390/block/dasd_3370_erp.c @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_3370_erp.c * Author(s)......: Holger Smolinski * Bugreports.to..: @@ -12,10 +12,10 @@ /* - * DASD_3370_ERP_EXAMINE + * DASD_3370_ERP_EXAMINE * * DESCRIPTION - * Checks only for fatal/no/recover error. + * Checks only for fatal/no/recover error. * A detailed examination of the sense data is done later outside * the interrupt handler. * @@ -23,7 +23,7 @@ * 'Chapter 7. 3370 Sense Data'. * * RETURN VALUES - * dasd_era_none no error + * dasd_era_none no error * dasd_era_fatal for all fatal (unrecoverable errors) * dasd_era_recover for all others. */ @@ -82,3 +82,22 @@ dasd_3370_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) return dasd_era_recover; } /* END dasd_3370_erp_examine */ + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 669805d44..2ed515623 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c @@ -1,6 +1,6 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_3990_erp.c - * Author(s)......: Horst Hummel + * Author(s)......: Horst Hummel * Holger Smolinski * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 @@ -25,23 +25,23 @@ struct DCTL_data { } __attribute__ ((packed)); /* - ***************************************************************************** + ***************************************************************************** * SECTION ERP EXAMINATION - ***************************************************************************** + ***************************************************************************** */ /* - * DASD_3990_ERP_EXAMINE_24 + * DASD_3990_ERP_EXAMINE_24 * * DESCRIPTION - * Checks only for fatal (unrecoverable) error. + * Checks only for fatal (unrecoverable) error. * A detailed examination of the sense data is done later outside * the interrupt handler. * * Each bit configuration leading to an action code 2 (Exit with * programming error or unusual condition indication) * are handled as fatal error´s. - * + * * All other configurations are handled as recoverable errors. * * RETURN VALUES @@ -93,15 +93,15 @@ dasd_3990_erp_examine_24(struct dasd_ccw_req * cqr, char *sense) } /* END dasd_3990_erp_examine_24 */ /* - * DASD_3990_ERP_EXAMINE_32 + * DASD_3990_ERP_EXAMINE_32 * * DESCRIPTION - * Checks only for fatal/no/recoverable error. + * Checks only for fatal/no/recoverable error. * A detailed examination of the sense data is done later outside * the interrupt handler. * * RETURN VALUES - * dasd_era_none no error + * dasd_era_none no error * dasd_era_fatal for all fatal (unrecoverable errors) * dasd_era_recover for recoverable others. */ @@ -128,10 +128,10 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense) } /* end dasd_3990_erp_examine_32 */ /* - * DASD_3990_ERP_EXAMINE + * DASD_3990_ERP_EXAMINE * * DESCRIPTION - * Checks only for fatal/no/recover error. + * Checks only for fatal/no/recover error. * A detailed examination of the sense data is done later outside * the interrupt handler. * @@ -139,7 +139,7 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense) * 'Chapter 7. Error Recovery Procedures'. * * RETURN VALUES - * dasd_era_none no error + * dasd_era_none no error * dasd_era_fatal for all fatal (unrecoverable errors) * dasd_era_recover for all others. */ @@ -178,18 +178,18 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) } /* END dasd_3990_erp_examine */ /* - ***************************************************************************** + ***************************************************************************** * SECTION ERP HANDLING - ***************************************************************************** + ***************************************************************************** */ /* - ***************************************************************************** + ***************************************************************************** * 24 and 32 byte sense ERP functions - ***************************************************************************** + ***************************************************************************** */ /* - * DASD_3990_ERP_CLEANUP + * DASD_3990_ERP_CLEANUP * * DESCRIPTION * Removes the already build but not necessary ERP request and sets @@ -197,10 +197,10 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) * * PARAMETER * erp request to be blocked - * final_status either DASD_CQR_DONE or DASD_CQR_FAILED + * final_status either DASD_CQR_DONE or DASD_CQR_FAILED * * RETURN VALUES - * cqr original cqr + * cqr original cqr */ static struct dasd_ccw_req * dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) @@ -214,7 +214,7 @@ dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) } /* end dasd_3990_erp_cleanup */ /* - * DASD_3990_ERP_BLOCK_QUEUE + * DASD_3990_ERP_BLOCK_QUEUE * * DESCRIPTION * Block the given device request queue to prevent from further @@ -237,7 +237,7 @@ dasd_3990_erp_block_queue(struct dasd_ccw_req * erp, int expires) } /* - * DASD_3990_ERP_INT_REQ + * DASD_3990_ERP_INT_REQ * * DESCRIPTION * Handles 'Intervention Required' error. @@ -277,7 +277,7 @@ dasd_3990_erp_int_req(struct dasd_ccw_req * erp) } /* end dasd_3990_erp_int_req */ /* - * DASD_3990_ERP_ALTERNATE_PATH + * DASD_3990_ERP_ALTERNATE_PATH * * DESCRIPTION * Repeat the operation on a different channel path. @@ -330,15 +330,15 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) * DASD_3990_ERP_DCTL * * DESCRIPTION - * Setup cqr to do the Diagnostic Control (DCTL) command with an + * Setup cqr to do the Diagnostic Control (DCTL) command with an * Inhibit Write subcommand (0x20) and the given modifier. * * PARAMETER * erp pointer to the current (failed) ERP * modifier subcommand modifier - * + * * RETURN VALUES - * dctl_cqr pointer to NEW dctl_cqr + * dctl_cqr pointer to NEW dctl_cqr * */ static struct dasd_ccw_req * @@ -386,7 +386,7 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier) } /* end dasd_3990_erp_DCTL */ /* - * DASD_3990_ERP_ACTION_1 + * DASD_3990_ERP_ACTION_1 * * DESCRIPTION * Setup ERP to do the ERP action 1 (see Reference manual). @@ -415,7 +415,7 @@ dasd_3990_erp_action_1(struct dasd_ccw_req * erp) } /* end dasd_3990_erp_action_1 */ /* - * DASD_3990_ERP_ACTION_4 + * DASD_3990_ERP_ACTION_4 * * DESCRIPTION * Setup ERP to do the ERP action 4 (see Reference manual). @@ -453,11 +453,11 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) if (sense[25] == 0x1D) { /* state change pending */ - DEV_MESSAGE(KERN_INFO, device, + DEV_MESSAGE(KERN_INFO, device, "waiting for state change pending " "interrupt, %d retries left", erp->retries); - + dasd_3990_erp_block_queue(erp, 30*HZ); } else if (sense[25] == 0x1E) { /* busy */ @@ -469,9 +469,9 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) } else { /* no state change pending - retry */ - DEV_MESSAGE (KERN_INFO, device, + DEV_MESSAGE (KERN_INFO, device, "redriving request immediately, " - "%d retries left", + "%d retries left", erp->retries); erp->status = DASD_CQR_QUEUED; } @@ -482,13 +482,13 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_action_4 */ /* - ***************************************************************************** + ***************************************************************************** * 24 byte sense ERP functions (only) - ***************************************************************************** + ***************************************************************************** */ /* - * DASD_3990_ERP_ACTION_5 + * DASD_3990_ERP_ACTION_5 * * DESCRIPTION * Setup ERP to do the ERP action 5 (see Reference manual). @@ -523,7 +523,7 @@ dasd_3990_erp_action_5(struct dasd_ccw_req * erp) * * PARAMETER * sense current sense data - * + * * RETURN VALUES * void */ @@ -1150,9 +1150,9 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) * PARAMETER * erp current erp_head * sense current sense data - * + * * RETURN VALUES - * erp 'new' erp_head - pointer to new ERP + * erp 'new' erp_head - pointer to new ERP */ static struct dasd_ccw_req * dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) @@ -1185,7 +1185,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_com_rej */ /* - * DASD_3990_ERP_BUS_OUT + * DASD_3990_ERP_BUS_OUT * * DESCRIPTION * Handles 24 byte 'Bus Out Parity Check' error. @@ -1483,7 +1483,7 @@ dasd_3990_erp_env_data(struct dasd_ccw_req * erp, char *sense) * * PARAMETER * erp already added default ERP - * + * * RETURN VALUES * erp new erp_head - pointer to new ERP */ @@ -1527,11 +1527,11 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp) } /* end dasd_3990_erp_file_prot */ /* - * DASD_3990_ERP_INSPECT_24 + * DASD_3990_ERP_INSPECT_24 * * DESCRIPTION * Does a detailed inspection of the 24 byte sense data - * and sets up a related error recovery action. + * and sets up a related error recovery action. * * PARAMETER * sense sense data of the actual error @@ -1602,13 +1602,13 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense) } /* END dasd_3990_erp_inspect_24 */ /* - ***************************************************************************** + ***************************************************************************** * 32 byte sense ERP functions (only) - ***************************************************************************** + ***************************************************************************** */ /* - * DASD_3990_ERPACTION_10_32 + * DASD_3990_ERPACTION_10_32 * * DESCRIPTION * Handles 32 byte 'Action 10' of Single Program Action Codes. @@ -1616,7 +1616,7 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense) * * PARAMETER * erp current erp_head - * sense current sense data + * sense current sense data * RETURN VALUES * erp modified erp_head */ @@ -1640,18 +1640,18 @@ dasd_3990_erp_action_10_32(struct dasd_ccw_req * erp, char *sense) * * DESCRIPTION * Handles 32 byte 'Action 1B' of Single Program Action Codes. - * A write operation could not be finished because of an unexpected + * A write operation could not be finished because of an unexpected * condition. - * The already created 'default erp' is used to get the link to - * the erp chain, but it can not be used for this recovery + * The already created 'default erp' is used to get the link to + * the erp chain, but it can not be used for this recovery * action because it contains no DE/LO data space. * * PARAMETER * default_erp already added default erp. - * sense current sense data + * sense current sense data * * RETURN VALUES - * erp new erp or + * erp new erp or * default_erp in case of imprecise ending or error */ static struct dasd_ccw_req * @@ -1789,16 +1789,16 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) * DASD_3990_UPDATE_1B * * DESCRIPTION - * Handles the update to the 32 byte 'Action 1B' of Single Program + * Handles the update to the 32 byte 'Action 1B' of Single Program * Action Codes in case the first action was not successful. * The already created 'previous_erp' is the currently not successful - * ERP. + * ERP. * * PARAMETER * previous_erp already created previous erp. - * sense current sense data + * sense current sense data * RETURN VALUES - * erp modified erp + * erp modified erp */ static struct dasd_ccw_req * dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) @@ -1897,7 +1897,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) } /* end dasd_3990_update_1B */ /* - * DASD_3990_ERP_COMPOUND_RETRY + * DASD_3990_ERP_COMPOUND_RETRY * * DESCRIPTION * Handles the compound ERP action retry code. @@ -1943,7 +1943,7 @@ dasd_3990_erp_compound_retry(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound_retry */ /* - * DASD_3990_ERP_COMPOUND_PATH + * DASD_3990_ERP_COMPOUND_PATH * * DESCRIPTION * Handles the compound ERP action for retry on alternate @@ -1965,7 +1965,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense) dasd_3990_erp_alternate_path(erp); if (erp->status == DASD_CQR_FAILED) { - /* reset the lpm and the status to be able to + /* reset the lpm and the status to be able to * try further actions. */ erp->lpm = 0; @@ -1980,7 +1980,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound_path */ /* - * DASD_3990_ERP_COMPOUND_CODE + * DASD_3990_ERP_COMPOUND_CODE * * DESCRIPTION * Handles the compound ERP action for retry code. @@ -2001,18 +2001,18 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense) switch (sense[28]) { case 0x17: - /* issue a Diagnostic Control command with an + /* issue a Diagnostic Control command with an * Inhibit Write subcommand and controler modifier */ erp = dasd_3990_erp_DCTL(erp, 0x20); break; - + case 0x25: /* wait for 5 seconds and retry again */ erp->retries = 1; - + dasd_3990_erp_block_queue (erp, 5*HZ); break; - + default: /* should not happen - continue */ break; @@ -2026,7 +2026,7 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound_code */ /* - * DASD_3990_ERP_COMPOUND_CONFIG + * DASD_3990_ERP_COMPOUND_CONFIG * * DESCRIPTION * Handles the compound ERP action for configruation @@ -2063,10 +2063,10 @@ dasd_3990_erp_compound_config(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound_config */ /* - * DASD_3990_ERP_COMPOUND + * DASD_3990_ERP_COMPOUND * * DESCRIPTION - * Does the further compound program action if + * Does the further compound program action if * compound retry was not successful. * * PARAMETER @@ -2110,11 +2110,11 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_compound */ /* - * DASD_3990_ERP_INSPECT_32 + * DASD_3990_ERP_INSPECT_32 * * DESCRIPTION * Does a detailed inspection of the 32 byte sense data - * and sets up a related error recovery action. + * and sets up a related error recovery action. * * PARAMETER * sense sense data of the actual error @@ -2228,9 +2228,9 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) } /* end dasd_3990_erp_inspect_32 */ /* - ***************************************************************************** + ***************************************************************************** * main ERP control fuctions (24 and 32 byte sense) - ***************************************************************************** + ***************************************************************************** */ /* @@ -2243,7 +2243,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) * PARAMETER * erp pointer to the currently created default ERP * RETURN VALUES - * erp_new contens was possibly modified + * erp_new contens was possibly modified */ static struct dasd_ccw_req * dasd_3990_erp_inspect(struct dasd_ccw_req * erp) @@ -2272,14 +2272,14 @@ dasd_3990_erp_inspect(struct dasd_ccw_req * erp) /* * DASD_3990_ERP_ADD_ERP - * + * * DESCRIPTION * This funtion adds an additional request block (ERP) to the head of * the given cqr (or erp). * This erp is initialized as an default erp (retry TIC) * * PARAMETER - * cqr head of the current ERP-chain (or single cqr if + * cqr head of the current ERP-chain (or single cqr if * first error) * RETURN VALUES * erp pointer to new ERP-chain head @@ -2332,15 +2332,15 @@ dasd_3990_erp_add_erp(struct dasd_ccw_req * cqr) } /* - * DASD_3990_ERP_ADDITIONAL_ERP - * + * DASD_3990_ERP_ADDITIONAL_ERP + * * DESCRIPTION * An additional ERP is needed to handle the current error. * Add ERP to the head of the ERP-chain containing the ERP processing * determined based on the sense data. * * PARAMETER - * cqr head of the current ERP-chain (or single cqr if + * cqr head of the current ERP-chain (or single cqr if * first error) * * RETURN VALUES @@ -2376,7 +2376,7 @@ dasd_3990_erp_additional_erp(struct dasd_ccw_req * cqr) * 24 byte sense byte 25 and 27 is set as well. * * PARAMETER - * cqr1 first cqr, which will be compared with the + * cqr1 first cqr, which will be compared with the * cqr2 second cqr. * * RETURN VALUES @@ -2415,7 +2415,7 @@ dasd_3990_erp_error_match(struct dasd_ccw_req *cqr1, struct dasd_ccw_req *cqr2) * cqr failed cqr (either original cqr or already an erp) * * RETURN VALUES - * erp erp-pointer to the already defined error + * erp erp-pointer to the already defined error * recovery procedure OR * NULL if a 'new' error occurred. */ @@ -2451,10 +2451,10 @@ dasd_3990_erp_in_erp(struct dasd_ccw_req *cqr) * DASD_3990_ERP_FURTHER_ERP (24 & 32 byte sense) * * DESCRIPTION - * No retry is left for the current ERP. Check what has to be done + * No retry is left for the current ERP. Check what has to be done * with the ERP. * - do further defined ERP action or - * - wait for interrupt or + * - wait for interrupt or * - exit with permanent error * * PARAMETER @@ -2485,7 +2485,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) if (!(sense[2] & DASD_SENSE_BIT_0)) { - /* issue a Diagnostic Control command with an + /* issue a Diagnostic Control command with an * Inhibit Write subcommand */ switch (sense[25]) { @@ -2535,14 +2535,14 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) } /* end dasd_3990_erp_further_erp */ /* - * DASD_3990_ERP_HANDLE_MATCH_ERP + * DASD_3990_ERP_HANDLE_MATCH_ERP * * DESCRIPTION * An error occurred again and an ERP has been detected which is already - * used to handle this error (e.g. retries). + * used to handle this error (e.g. retries). * All prior ERP's are asumed to be successful and therefore removed * from queue. - * If retry counter of matching erp is already 0, it is checked if further + * If retry counter of matching erp is already 0, it is checked if further * action is needed (besides retry) or if the ERP has failed. * * PARAMETER @@ -2631,7 +2631,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head, * erp erp-pointer to the head of the ERP action chain. * This means: * - either a ptr to an additional ERP cqr or - * - the original given cqr (which's status might + * - the original given cqr (which's status might * be modified) */ struct dasd_ccw_req * @@ -2723,3 +2723,22 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) return erp; } /* end dasd_3990_erp_action */ + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_9336_erp.c b/drivers/s390/block/dasd_9336_erp.c index 6e0826884..dc861446d 100644 --- a/drivers/s390/block/dasd_9336_erp.c +++ b/drivers/s390/block/dasd_9336_erp.c @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_9336_erp.c * Author(s)......: Holger Smolinski * Bugreports.to..: @@ -12,10 +12,10 @@ /* - * DASD_9336_ERP_EXAMINE + * DASD_9336_ERP_EXAMINE * * DESCRIPTION - * Checks only for fatal/no/recover error. + * Checks only for fatal/no/recover error. * A detailed examination of the sense data is done later outside * the interrupt handler. * @@ -23,7 +23,7 @@ * 'Chapter 7. 9336 Sense Data'. * * RETURN VALUES - * dasd_era_none no error + * dasd_era_none no error * dasd_era_fatal for all fatal (unrecoverable errors) * dasd_era_recover for all others. */ @@ -39,3 +39,22 @@ dasd_9336_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) return dasd_era_recover; } /* END dasd_9336_erp_examine */ + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_9343_erp.c b/drivers/s390/block/dasd_9343_erp.c index ddecb9808..4a5b79569 100644 --- a/drivers/s390/block/dasd_9343_erp.c +++ b/drivers/s390/block/dasd_9343_erp.c @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_9345_erp.c * Author(s)......: Holger Smolinski * Bugreports.to..: diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 9af02c79c..216bc4fba 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -26,7 +27,7 @@ #include "dasd_int.h" kmem_cache_t *dasd_page_cache; -EXPORT_SYMBOL_GPL(dasd_page_cache); +EXPORT_SYMBOL(dasd_page_cache); /* * dasd_devmap_t is used to store the features and the relation @@ -47,22 +48,6 @@ struct dasd_devmap { struct dasd_uid uid; }; -/* - * dasd_server_ssid_map contains a globally unique storage server subsystem ID. - * dasd_server_ssid_list contains the list of all subsystem IDs accessed by - * the DASD device driver. - */ -struct dasd_server_ssid_map { - struct list_head list; - struct system_id { - char vendor[4]; - char serial[15]; - __u16 ssid; - } sid; -}; - -static struct list_head dasd_server_ssid_list; - /* * Parameter parsing functions for dasd= parameter. The syntax is: * : (0x)?[0-9a-fA-F]+ @@ -79,8 +64,6 @@ static struct list_head dasd_server_ssid_list; int dasd_probeonly = 0; /* is true, when probeonly mode is active */ int dasd_autodetect = 0; /* is true, when autodetection is active */ -int dasd_nopav = 0; /* is true, when PAV is disabled */ -EXPORT_SYMBOL_GPL(dasd_nopav); /* * char *dasd[] is intended to hold the ranges supplied by the dasd= statement @@ -91,7 +74,7 @@ static char *dasd[256]; module_param_array(dasd, charp, NULL, 0); /* - * Single spinlock to protect devmap and servermap structures and lists. + * Single spinlock to protect devmap structures and lists. */ static DEFINE_SPINLOCK(dasd_devmap_lock); @@ -140,7 +123,7 @@ static inline int dasd_busid(char **str, int *id0, int *id1, int *devno) { int val, old_style; - + /* check for leading '0x' */ old_style = 0; if ((*str)[0] == '0' && (*str)[1] == 'x') { @@ -196,7 +179,7 @@ dasd_feature_list(char *str, char **endp) features = 0; while (1) { - for (len = 0; + for (len = 0; str[len] && str[len] != ':' && str[len] != ')'; len++); if (len == 2 && !strncmp(str, "ro", 2)) features |= DASD_FEATURE_READONLY; @@ -245,30 +228,24 @@ dasd_parse_keyword( char *parsestring ) { length = strlen(parsestring); residual_str = parsestring + length; } - if (strncmp("autodetect", parsestring, length) == 0) { + if (strncmp ("autodetect", parsestring, length) == 0) { dasd_autodetect = 1; MESSAGE (KERN_INFO, "%s", "turning to autodetection mode"); return residual_str; } - if (strncmp("probeonly", parsestring, length) == 0) { + if (strncmp ("probeonly", parsestring, length) == 0) { dasd_probeonly = 1; MESSAGE(KERN_INFO, "%s", "turning to probeonly mode"); return residual_str; } - if (strncmp("nopav", parsestring, length) == 0) { - dasd_nopav = 1; - MESSAGE(KERN_INFO, "%s", "disable PAV mode"); - return residual_str; - } - if (strncmp("fixedbuffers", parsestring, length) == 0) { + if (strncmp ("fixedbuffers", parsestring, length) == 0) { if (dasd_page_cache) return residual_str; dasd_page_cache = - kmem_cache_create("dasd_page_cache", PAGE_SIZE, - PAGE_SIZE, SLAB_CACHE_DMA, - NULL, NULL ); + kmem_cache_create("dasd_page_cache", PAGE_SIZE, 0, + SLAB_CACHE_DMA, NULL, NULL ); if (!dasd_page_cache) MESSAGE(KERN_WARNING, "%s", "Failed to create slab, " "fixed buffer mode disabled."); @@ -317,8 +294,6 @@ dasd_parse_range( char *parsestring ) { features = dasd_feature_list(str, &str); if (features < 0) return ERR_PTR(-EINVAL); - /* each device in dasd= parameter should be set initially online */ - features |= DASD_FEATURE_INITIAL_ONLINE; while (from <= to) { sprintf(bus_id, "%01x.%01x.%04x", from_id0, from_id1, from++); @@ -384,7 +359,7 @@ dasd_parse(void) * Add a devmap for the device specified by busid. It is possible that * the devmap already exists (dasd= parameter). The order of the devices * added through this function will define the kdevs for the individual - * devices. + * devices. */ static struct dasd_devmap * dasd_add_busid(char *bus_id, int features) @@ -393,11 +368,11 @@ dasd_add_busid(char *bus_id, int features) int hash; new = (struct dasd_devmap *) - kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL); + kmalloc(sizeof(struct dasd_devmap), GFP_KERNEL); if (!new) return ERR_PTR(-ENOMEM); spin_lock(&dasd_devmap_lock); - devmap = NULL; + devmap = 0; hash = dasd_hash_busid(bus_id); list_for_each_entry(tmp, &dasd_hashlists[hash], list) if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) { @@ -409,10 +384,10 @@ dasd_add_busid(char *bus_id, int features) new->devindex = dasd_max_devindex++; strncpy(new->bus_id, bus_id, BUS_ID_SIZE); new->features = features; - new->device = NULL; + new->device = 0; list_add(&new->list, &dasd_hashlists[hash]); devmap = new; - new = NULL; + new = 0; } spin_unlock(&dasd_devmap_lock); kfree(new); @@ -482,7 +457,7 @@ dasd_device_from_devindex(int devindex) int i; spin_lock(&dasd_devmap_lock); - devmap = NULL; + devmap = 0; for (i = 0; (i < 256) && !devmap; i++) list_for_each_entry(tmp, &dasd_hashlists[i], list) if (tmp->devindex == devindex) { @@ -655,8 +630,7 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -dasd_ro_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) +dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct dasd_devmap *devmap; int ro_flag; @@ -684,7 +658,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store); * use_diag controls whether the driver should use diag rather than ssch * to talk to the device */ -static ssize_t +static ssize_t dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dasd_devmap *devmap; @@ -699,8 +673,7 @@ dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) } static ssize_t -dasd_use_diag_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) +dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct dasd_devmap *devmap; ssize_t rc; @@ -724,11 +697,11 @@ dasd_use_diag_store(struct device *dev, struct device_attribute *attr, return rc; } -static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); +static +DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); static ssize_t -dasd_discipline_show(struct device *dev, struct device_attribute *attr, - char *buf) +dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dasd_devmap *devmap; char *dname; @@ -861,6 +834,7 @@ static struct attribute_group dasd_attr_group = { .attrs = dasd_attrs, }; + /* * Return copy of the device unique identifier. */ @@ -880,52 +854,21 @@ dasd_get_uid(struct ccw_device *cdev, struct dasd_uid *uid) /* * Register the given device unique identifier into devmap struct. - * In addition check if the related storage server subsystem ID is already - * contained in the dasd_server_ssid_list. If subsystem ID is not contained, - * create new entry. - * Return 0 if server was already in serverlist, - * 1 if the server was added successful - * <0 in case of error. */ int dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) { struct dasd_devmap *devmap; - struct dasd_server_ssid_map *srv, *tmp; devmap = dasd_find_busid(cdev->dev.bus_id); if (IS_ERR(devmap)) return PTR_ERR(devmap); - - /* generate entry for server_ssid_map */ - srv = (struct dasd_server_ssid_map *) - kzalloc(sizeof(struct dasd_server_ssid_map), GFP_KERNEL); - if (!srv) - return -ENOMEM; - strncpy(srv->sid.vendor, uid->vendor, sizeof(srv->sid.vendor) - 1); - strncpy(srv->sid.serial, uid->serial, sizeof(srv->sid.serial) - 1); - srv->sid.ssid = uid->ssid; - - /* server is already contained ? */ spin_lock(&dasd_devmap_lock); devmap->uid = *uid; - list_for_each_entry(tmp, &dasd_server_ssid_list, list) { - if (!memcmp(&srv->sid, &tmp->sid, - sizeof(struct system_id))) { - kfree(srv); - srv = NULL; - break; - } - } - - /* add servermap to serverlist */ - if (srv) - list_add(&srv->list, &dasd_server_ssid_list); spin_unlock(&dasd_devmap_lock); - - return (srv ? 1 : 0); + return 0; } -EXPORT_SYMBOL_GPL(dasd_set_uid); +EXPORT_SYMBOL(dasd_set_uid); /* * Return value of the specified feature. @@ -937,7 +880,7 @@ dasd_get_feature(struct ccw_device *cdev, int feature) devmap = dasd_find_busid(cdev->dev.bus_id); if (IS_ERR(devmap)) - return PTR_ERR(devmap); + return (int) PTR_ERR(devmap); return ((devmap->features & feature) != 0); } @@ -953,7 +896,7 @@ dasd_set_feature(struct ccw_device *cdev, int feature, int flag) devmap = dasd_find_busid(cdev->dev.bus_id); if (IS_ERR(devmap)) - return PTR_ERR(devmap); + return (int) PTR_ERR(devmap); spin_lock(&dasd_devmap_lock); if (flag) @@ -989,10 +932,8 @@ dasd_devmap_init(void) dasd_max_devindex = 0; for (i = 0; i < 256; i++) INIT_LIST_HEAD(&dasd_hashlists[i]); - - /* Initialize servermap structure. */ - INIT_LIST_HEAD(&dasd_server_ssid_list); return 0; + } void diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 23fa0b289..3f9d704d2 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_diag.c * Author(s)......: Holger Smolinski * Based on.......: linux/drivers/s390/block/mdisk.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -335,7 +336,7 @@ dasd_diag_check_device(struct dasd_device *device) private = (struct dasd_diag_private *) device->private; if (private == NULL) { - private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); + private = kmalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); if (private == NULL) { DEV_MESSAGE(KERN_WARNING, device, "%s", "memory allocation failed for private data"); @@ -526,7 +527,7 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req) datasize, device); if (IS_ERR(cqr)) return cqr; - + dreq = (struct dasd_diag_req *) cqr->data; dreq->block_count = count; dbio = dreq->bio; diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h index b8c78267f..38a4e55f8 100644 --- a/drivers/s390/block/dasd_diag.h +++ b/drivers/s390/block/dasd_diag.h @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_diag.h * Author(s)......: Holger Smolinski * Based on.......: linux/drivers/s390/block/mdisk.h diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index b7a7fac3f..7d5a6cee4 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -1,7 +1,7 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_eckd.c * Author(s)......: Holger Smolinski - * Horst Hummel + * Horst Hummel * Carsten Otte * Martin Schwidefsky * Bugreports.to..: @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include "dasd_int.h" @@ -65,16 +65,16 @@ struct dasd_eckd_private { /* The ccw bus type uses this table to find devices that it sends to * dasd_eckd_probe */ static struct ccw_device_id dasd_eckd_ids[] = { - { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), .driver_info = 0x1}, - { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), .driver_info = 0x2}, - { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), .driver_info = 0x3}, - { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), .driver_info = 0x4}, - { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), .driver_info = 0x5}, - { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), .driver_info = 0x6}, - { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), .driver_info = 0x7}, - { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), .driver_info = 0x8}, - { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), .driver_info = 0x9}, - { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), .driver_info = 0xa}, + { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3390, 0), driver_info: 0x1}, + { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3390, 0), driver_info: 0x2}, + { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3390, 0), driver_info: 0x3}, + { CCW_DEVICE_DEVTYPE (0x3990, 0, 0x3380, 0), driver_info: 0x4}, + { CCW_DEVICE_DEVTYPE (0x2105, 0, 0x3380, 0), driver_info: 0x5}, + { CCW_DEVICE_DEVTYPE (0x9343, 0, 0x9345, 0), driver_info: 0x6}, + { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3390, 0), driver_info: 0x7}, + { CCW_DEVICE_DEVTYPE (0x2107, 0, 0x3380, 0), driver_info: 0x8}, + { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3390, 0), driver_info: 0x9}, + { CCW_DEVICE_DEVTYPE (0x1750, 0, 0x3380, 0), driver_info: 0xa}, { /* end of list */ }, }; @@ -89,22 +89,17 @@ dasd_eckd_probe (struct ccw_device *cdev) { int ret; - /* set ECKD specific ccw-device options */ - ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE); - if (ret) { - printk(KERN_WARNING - "dasd_eckd_probe: could not set ccw-device options " - "for %s\n", cdev->dev.bus_id); + ret = dasd_generic_probe (cdev, &dasd_eckd_discipline); + if (ret) return ret; - } - ret = dasd_generic_probe(cdev, &dasd_eckd_discipline); - return ret; + ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP | CCWDEV_ALLOW_FORCE); + return 0; } static int dasd_eckd_set_online(struct ccw_device *cdev) { - return dasd_generic_set_online(cdev, &dasd_eckd_discipline); + return dasd_generic_set_online (cdev, &dasd_eckd_discipline); } static struct ccw_driver dasd_eckd_driver = { @@ -215,14 +210,14 @@ check_XRC (struct ccw1 *de_ccw, /* switch on System Time Stamp - needed for XRC Support */ if (private->rdc_data.facilities.XRC_supported) { - + data->ga_extended |= 0x08; /* switch on 'Time Stamp Valid' */ data->ga_extended |= 0x02; /* switch on 'Extended Parameter' */ - + data->ep_sys_time = get_clock (); - + de_ccw->count = sizeof (struct DE_eckd_data); - de_ccw->flags |= CCW_FLAG_SLI; + de_ccw->flags |= CCW_FLAG_SLI; } return; @@ -301,8 +296,8 @@ define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk, /* check for sequential prestage - enhance cylinder range */ if (data->attributes.operation == DASD_SEQ_PRESTAGE || data->attributes.operation == DASD_SEQ_ACCESS) { - - if (end.cyl + private->attrib.nr_cyl < geo.cyl) + + if (end.cyl + private->attrib.nr_cyl < geo.cyl) end.cyl += private->attrib.nr_cyl; else end.cyl = (geo.cyl - 1); @@ -322,7 +317,7 @@ locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk, struct dasd_eckd_private *private; int sector; int dn, d; - + private = (struct dasd_eckd_private *) device->private; DBF_DEV_EVENT(DBF_INFO, device, @@ -468,11 +463,11 @@ dasd_eckd_generate_uid(struct dasd_device *device, struct dasd_uid *uid) return -ENODEV; memset(uid, 0, sizeof(struct dasd_uid)); - memcpy(uid->vendor, confdata->ned1.HDA_manufacturer, - sizeof(uid->vendor) - 1); + strncpy(uid->vendor, confdata->ned1.HDA_manufacturer, + sizeof(uid->vendor) - 1); EBCASC(uid->vendor, sizeof(uid->vendor) - 1); - memcpy(uid->serial, confdata->ned1.HDA_location, - sizeof(uid->serial) - 1); + strncpy(uid->serial, confdata->ned1.HDA_location, + sizeof(uid->serial) - 1); EBCASC(uid->serial, sizeof(uid->serial) - 1); uid->ssid = confdata->neq.subsystemID; if (confdata->ned2.sneq.flags == 0x40) { @@ -545,86 +540,6 @@ dasd_eckd_read_conf(struct dasd_device *device) return 0; } -/* - * Build CP for Perform Subsystem Function - SSC. - */ -struct dasd_ccw_req * -dasd_eckd_build_psf_ssc(struct dasd_device *device) -{ - struct dasd_ccw_req *cqr; - struct dasd_psf_ssc_data *psf_ssc_data; - struct ccw1 *ccw; - - cqr = dasd_smalloc_request("ECKD", 1 /* PSF */ , - sizeof(struct dasd_psf_ssc_data), - device); - - if (IS_ERR(cqr)) { - DEV_MESSAGE(KERN_WARNING, device, "%s", - "Could not allocate PSF-SSC request"); - return cqr; - } - psf_ssc_data = (struct dasd_psf_ssc_data *)cqr->data; - psf_ssc_data->order = PSF_ORDER_SSC; - psf_ssc_data->suborder = 0x08; - - ccw = cqr->cpaddr; - ccw->cmd_code = DASD_ECKD_CCW_PSF; - ccw->cda = (__u32)(addr_t)psf_ssc_data; - ccw->count = 66; - - cqr->device = device; - cqr->expires = 10*HZ; - cqr->buildclk = get_clock(); - cqr->status = DASD_CQR_FILLED; - return cqr; -} - -/* - * Perform Subsystem Function. - * It is necessary to trigger CIO for channel revalidation since this - * call might change behaviour of DASD devices. - */ -static int -dasd_eckd_psf_ssc(struct dasd_device *device) -{ - struct dasd_ccw_req *cqr; - int rc; - - cqr = dasd_eckd_build_psf_ssc(device); - if (IS_ERR(cqr)) - return PTR_ERR(cqr); - - rc = dasd_sleep_on(cqr); - if (!rc) - /* trigger CIO to reprobe devices */ - css_schedule_reprobe(); - dasd_sfree_request(cqr, cqr->device); - return rc; -} - -/* - * Valide storage server of current device. - */ -static int -dasd_eckd_validate_server(struct dasd_device *device, struct dasd_uid *uid) -{ - int rc; - - /* Currently PAV is the only reason to 'validate' server on LPAR */ - if (dasd_nopav || MACHINE_IS_VM) - return 0; - - rc = dasd_eckd_psf_ssc(device); - /* may be requested feature is not available on server, - * therefore just report error and go ahead */ - DEV_MESSAGE(KERN_INFO, device, - "PSF-SSC on storage subsystem %s.%s.%04x returned rc=%d", - uid->vendor, uid->serial, uid->ssid, rc); - /* RE-Read Configuration Data */ - return dasd_eckd_read_conf(device); -} - /* * Check device characteristics. * If the device is accessible using ECKD discipline, the device is enabled. @@ -639,7 +554,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) private = (struct dasd_eckd_private *) device->private; if (private == NULL) { - private = kzalloc(sizeof(struct dasd_eckd_private), + private = kmalloc(sizeof(struct dasd_eckd_private), GFP_KERNEL | GFP_DMA); if (private == NULL) { DEV_MESSAGE(KERN_WARNING, device, "%s", @@ -647,6 +562,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) "data"); return -ENOMEM; } + memset(private, 0, sizeof(struct dasd_eckd_private)); device->private = (void *) private; } /* Invalidate status of initial analysis. */ @@ -655,29 +571,16 @@ dasd_eckd_check_characteristics(struct dasd_device *device) private->attrib.operation = DASD_NORMAL_CACHE; private->attrib.nr_cyl = 0; - /* Read Configuration Data */ - rc = dasd_eckd_read_conf(device); - if (rc) - return rc; - - /* Generate device unique id and register in devmap */ - rc = dasd_eckd_generate_uid(device, &uid); - if (rc) - return rc; - rc = dasd_set_uid(device->cdev, &uid); - if (rc == 1) /* new server found */ - rc = dasd_eckd_validate_server(device, &uid); - if (rc) - return rc; - /* Read Device Characteristics */ rdc_data = (void *) &(private->rdc_data); memset(rdc_data, 0, sizeof(rdc_data)); rc = read_dev_chars(device->cdev, &rdc_data, 64); - if (rc) + if (rc) { DEV_MESSAGE(KERN_WARNING, device, - "Read device characteristics returned " - "rc=%d", rc); + "Read device characteristics returned error %d", + rc); + return rc; + } DEV_MESSAGE(KERN_INFO, device, "%04X/%02X(CU:%04X/%02X) Cyl:%d Head:%d Sec:%d", @@ -688,6 +591,19 @@ dasd_eckd_check_characteristics(struct dasd_device *device) private->rdc_data.no_cyl, private->rdc_data.trk_per_cyl, private->rdc_data.sec_per_trk); + + /* Read Configuration Data */ + rc = dasd_eckd_read_conf (device); + if (rc) + return rc; + + /* Generate device unique id and register in devmap */ + rc = dasd_eckd_generate_uid(device, &uid); + if (rc) + return rc; + + rc = dasd_set_uid(device->cdev, &uid); + return rc; } @@ -857,7 +773,7 @@ dasd_eckd_end_analysis(struct dasd_device *device) ((private->rdc_data.no_cyl * private->rdc_data.trk_per_cyl * blk_per_trk * (device->bp_block >> 9)) >> 1), - ((blk_per_trk * device->bp_block) >> 10), + ((blk_per_trk * device->bp_block) >> 10), private->uses_cdl ? "compatible disk layout" : "linux disk layout"); @@ -1054,7 +970,7 @@ dasd_eckd_format_device(struct dasd_device * device, if (i < 3) { ect->kl = 4; ect->dl = sizes_trk0[i] - 4; - } + } } if ((fdata->intensity & 0x08) && fdata->start_unit == 1) { @@ -1354,7 +1270,7 @@ dasd_eckd_fill_info(struct dasd_device * device, /* * Release device ioctl. - * Buils a channel programm to releases a prior reserved + * Buils a channel programm to releases a prior reserved * (see dasd_eckd_reserve) device. */ static int @@ -1394,8 +1310,8 @@ dasd_eckd_release(struct dasd_device *device) /* * Reserve device ioctl. * Options are set to 'synchronous wait for interrupt' and - * 'timeout the request'. This leads to a terminate IO if - * the interrupt is outstanding for a certain time. + * 'timeout the request'. This leads to a terminate IO if + * the interrupt is outstanding for a certain time. */ static int dasd_eckd_reserve(struct dasd_device *device) @@ -1433,7 +1349,7 @@ dasd_eckd_reserve(struct dasd_device *device) /* * Steal lock ioctl - unconditional reserve device. - * Buils a channel programm to break a device's reservation. + * Buils a channel programm to break a device's reservation. * (unconditional reserve) */ static int @@ -1605,40 +1521,6 @@ dasd_eckd_ioctl(struct dasd_device *device, unsigned int cmd, void __user *argp) } } -/* - * Dump the range of CCWs into 'page' buffer - * and return number of printed chars. - */ -static inline int -dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page) -{ - int len, count; - char *datap; - - len = 0; - while (from <= to) { - len += sprintf(page + len, KERN_ERR PRINTK_HEADER - " CCW %p: %08X %08X DAT:", - from, ((int *) from)[0], ((int *) from)[1]); - - /* get pointer to data (consider IDALs) */ - if (from->flags & CCW_FLAG_IDA) - datap = (char *) *((addr_t *) (addr_t) from->cda); - else - datap = (char *) ((addr_t) from->cda); - - /* dump data (max 32 bytes) */ - for (count = 0; count < from->count && count < 32; count++) { - if (count % 8 == 0) len += sprintf(page + len, " "); - if (count % 4 == 0) len += sprintf(page + len, " "); - len += sprintf(page + len, "%02x", datap[count]); - } - len += sprintf(page + len, "\n"); - from++; - } - return len; -} - /* * Print sense data and related channel program. * Parts are printed because printk buffer is only 1024 bytes. @@ -1648,8 +1530,8 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, struct irb *irb) { char *page; - struct ccw1 *first, *last, *fail, *from, *to; - int len, sl, sct; + struct ccw1 *act, *end, *last; + int len, sl, sct, count; page = (char *) get_zeroed_page(GFP_ATOMIC); if (page == NULL) { @@ -1657,8 +1539,7 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, "No memory to dump sense data"); return; } - /* dump the sense data */ - len = sprintf(page, KERN_ERR PRINTK_HEADER + len = sprintf(page, KERN_ERR PRINTK_HEADER " I/O status report for device %s:\n", device->cdev->dev.bus_id); len += sprintf(page + len, KERN_ERR PRINTK_HEADER @@ -1683,55 +1564,87 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, if (irb->ecw[27] & DASD_SENSE_BIT_0) { /* 24 Byte Sense Data */ - sprintf(page + len, KERN_ERR PRINTK_HEADER - " 24 Byte: %x MSG %x, " - "%s MSGb to SYSOP\n", - irb->ecw[7] >> 4, irb->ecw[7] & 0x0f, - irb->ecw[1] & 0x10 ? "" : "no"); + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " 24 Byte: %x MSG %x, " + "%s MSGb to SYSOP\n", + irb->ecw[7] >> 4, irb->ecw[7] & 0x0f, + irb->ecw[1] & 0x10 ? "" : "no"); } else { /* 32 Byte Sense Data */ - sprintf(page + len, KERN_ERR PRINTK_HEADER - " 32 Byte: Format: %x " - "Exception class %x\n", - irb->ecw[6] & 0x0f, irb->ecw[22] >> 4); + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " 32 Byte: Format: %x " + "Exception class %x\n", + irb->ecw[6] & 0x0f, irb->ecw[22] >> 4); } } else { - sprintf(page + len, KERN_ERR PRINTK_HEADER - " SORRY - NO VALID SENSE AVAILABLE\n"); + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " SORRY - NO VALID SENSE AVAILABLE\n"); } - printk("%s", page); - - /* dump the Channel Program (max 140 Bytes per line) */ - /* Count CCW and print first CCWs (maximum 1024 % 140 = 7) */ - first = req->cpaddr; - for (last = first; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++); - to = min(first + 6, last); - len = sprintf(page, KERN_ERR PRINTK_HEADER + MESSAGE_LOG(KERN_ERR, "%s", + page + sizeof(KERN_ERR PRINTK_HEADER)); + + /* dump the Channel Program */ + /* print first CCWs (maximum 8) */ + act = req->cpaddr; + for (last = act; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++); + end = min(act + 8, last); + len = sprintf(page, KERN_ERR PRINTK_HEADER " Related CP in req: %p\n", req); - dasd_eckd_dump_ccw_range(first, to, page + len); - printk("%s", page); + while (act <= end) { + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " CCW %p: %08X %08X DAT:", + act, ((int *) act)[0], ((int *) act)[1]); + for (count = 0; count < 32 && count < act->count; + count += sizeof(int)) + len += sprintf(page + len, " %08X", + ((int *) (addr_t) act->cda) + [(count>>2)]); + len += sprintf(page + len, "\n"); + act++; + } + MESSAGE_LOG(KERN_ERR, "%s", + page + sizeof(KERN_ERR PRINTK_HEADER)); - /* print failing CCW area (maximum 4) */ - /* scsw->cda is either valid or zero */ + /* print failing CCW area */ len = 0; - from = ++to; - fail = (struct ccw1 *)(addr_t) irb->scsw.cpa; /* failing CCW */ - if (from < fail - 2) { - from = fail - 2; /* there is a gap - print header */ - len += sprintf(page, KERN_ERR PRINTK_HEADER "......\n"); + if (act < ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2) { + act = ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2; + len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n"); + } + end = min((struct ccw1 *)(addr_t) irb->scsw.cpa + 2, last); + while (act <= end) { + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " CCW %p: %08X %08X DAT:", + act, ((int *) act)[0], ((int *) act)[1]); + for (count = 0; count < 32 && count < act->count; + count += sizeof(int)) + len += sprintf(page + len, " %08X", + ((int *) (addr_t) act->cda) + [(count>>2)]); + len += sprintf(page + len, "\n"); + act++; } - to = min(fail + 1, last); - len += dasd_eckd_dump_ccw_range(from, to, page + len); - /* print last CCWs (maximum 2) */ - from = max(from, ++to); - if (from < last - 1) { - from = last - 1; /* there is a gap - print header */ + /* print last CCWs */ + if (act < last - 2) { + act = last - 2; len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n"); } - len += dasd_eckd_dump_ccw_range(from, last, page + len); + while (act <= last) { + len += sprintf(page + len, KERN_ERR PRINTK_HEADER + " CCW %p: %08X %08X DAT:", + act, ((int *) act)[0], ((int *) act)[1]); + for (count = 0; count < 32 && count < act->count; + count += sizeof(int)) + len += sprintf(page + len, " %08X", + ((int *) (addr_t) act->cda) + [(count>>2)]); + len += sprintf(page + len, "\n"); + act++; + } if (len > 0) - printk("%s", page); + MESSAGE_LOG(KERN_ERR, "%s", + page + sizeof(KERN_ERR PRINTK_HEADER)); free_page((unsigned long) page); } @@ -1772,8 +1685,14 @@ static struct dasd_discipline dasd_eckd_discipline = { static int __init dasd_eckd_init(void) { + int ret; + ASCEBC(dasd_eckd_discipline.ebcname, 4); - return ccw_driver_register(&dasd_eckd_driver); + + ret = ccw_driver_register(&dasd_eckd_driver); + if (!ret) + dasd_generic_auto_online(&dasd_eckd_driver); + return ret; } static void __exit @@ -1784,3 +1703,22 @@ dasd_eckd_cleanup(void) module_init(dasd_eckd_init); module_exit(dasd_eckd_cleanup); + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h index 712ff1650..d5734e976 100644 --- a/drivers/s390/block/dasd_eckd.h +++ b/drivers/s390/block/dasd_eckd.h @@ -1,7 +1,7 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_eckd.h * Author(s)......: Holger Smolinski - * Horst Hummel + * Horst Hummel * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * @@ -41,10 +41,9 @@ #define DASD_ECKD_CCW_RESERVE 0xB4 /* - * Perform Subsystem Function / Sub-Orders + *Perform Subsystem Function / Sub-Orders */ -#define PSF_ORDER_PRSSD 0x18 -#define PSF_ORDER_SSC 0x1D +#define PSF_ORDER_PRSSD 0x18 /***************************************************************************** * SECTION: Type Definitions @@ -156,7 +155,7 @@ struct dasd_eckd_characteristics { unsigned char reserved2:4; unsigned char reserved3:8; unsigned char defect_wr:1; - unsigned char XRC_supported:1; + unsigned char XRC_supported:1; unsigned char reserved4:1; unsigned char striping:1; unsigned char reserved5:4; @@ -344,7 +343,7 @@ struct dasd_eckd_path { }; /* - * Perform Subsystem Function - Prepare for Read Subsystem Data + * Perform Subsystem Function - Prepare for Read Subsystem Data */ struct dasd_psf_prssd_data { unsigned char order; @@ -354,15 +353,4 @@ struct dasd_psf_prssd_data { unsigned char varies[9]; } __attribute__ ((packed)); -/* - * Perform Subsystem Function - Set Subsystem Characteristics - */ -struct dasd_psf_ssc_data { - unsigned char order; - unsigned char flags; - unsigned char cu_type[4]; - unsigned char suborder; - unsigned char reserved[59]; -} __attribute__((packed)); - #endif /* DASD_ECKD_H */ diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index da65f1b03..2d946b6ca 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c @@ -89,7 +89,7 @@ struct eerbuffer { }; static LIST_HEAD(bufferlist); -static DEFINE_SPINLOCK(bufferlock); +static spinlock_t bufferlock = SPIN_LOCK_UNLOCKED; static DECLARE_WAIT_QUEUE_HEAD(dasd_eer_read_wait_queue); /* @@ -276,7 +276,7 @@ struct dasd_eer_header { __u64 tv_sec; __u64 tv_usec; char busid[DASD_EER_BUSID_SIZE]; -} __attribute__ ((packed)); +}; /* * The following function can be used for those triggers that have @@ -521,8 +521,6 @@ static int dasd_eer_open(struct inode *inp, struct file *filp) unsigned long flags; eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); - if (!eerb) - return -ENOMEM; eerb->buffer_page_count = eer_pages; if (eerb->buffer_page_count < 1 || eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index 58a650979..b842377cb 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c @@ -9,6 +9,7 @@ * */ +#include #include #include @@ -89,7 +90,7 @@ dasd_default_erp_action(struct dasd_ccw_req * cqr) /* just retry - there is nothing to save ... I got no sense data.... */ if (cqr->retries > 0) { - DEV_MESSAGE (KERN_DEBUG, device, + DEV_MESSAGE (KERN_DEBUG, device, "default ERP called (%i retries left)", cqr->retries); cqr->lpm = LPM_ANYPATH; @@ -154,7 +155,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr) /* * Print the hex dump of the memory used by a request. This includes - * all error recovery ccws that have been chained in from of the + * all error recovery ccws that have been chained in from of the * real request. */ static inline void @@ -226,12 +227,12 @@ dasd_log_ccw(struct dasd_ccw_req * cqr, int caller, __u32 cpa) /* * Log bytes arround failed CCW but only if we did * not log the whole CP of the CCW is outside the - * logged CP. + * logged CP. */ if (cplength > 40 || ((addr_t) cpa < (addr_t) lcqr->cpaddr && (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) { - + DEV_MESSAGE(KERN_ERR, device, "Failed CCW (%p) (area):", (void *) (long) cpa); diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index e85015be1..91145698f 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_fba.c * Author(s)......: Holger Smolinski * Bugreports.to..: @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -44,8 +45,8 @@ struct dasd_fba_private { }; static struct ccw_device_id dasd_fba_ids[] = { - { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1}, - { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2}, + { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), driver_info: 0x1}, + { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), driver_info: 0x2}, { /* end of list */ }, }; @@ -55,13 +56,19 @@ static struct ccw_driver dasd_fba_driver; /* see below */ static int dasd_fba_probe(struct ccw_device *cdev) { - return dasd_generic_probe(cdev, &dasd_fba_discipline); + int ret; + + ret = dasd_generic_probe (cdev, &dasd_fba_discipline); + if (ret) + return ret; + ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); + return 0; } static int dasd_fba_set_online(struct ccw_device *cdev) { - return dasd_generic_set_online(cdev, &dasd_fba_discipline); + return dasd_generic_set_online (cdev, &dasd_fba_discipline); } static struct ccw_driver dasd_fba_driver = { @@ -118,13 +125,13 @@ static int dasd_fba_check_characteristics(struct dasd_device *device) { struct dasd_fba_private *private; - struct ccw_device *cdev = device->cdev; + struct ccw_device *cdev = device->cdev; void *rdc_data; int rc; private = (struct dasd_fba_private *) device->private; if (private == NULL) { - private = kzalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); + private = kmalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); if (private == NULL) { DEV_MESSAGE(KERN_WARNING, device, "%s", "memory allocation failed for private " @@ -197,7 +204,7 @@ dasd_fba_examine_error(struct dasd_ccw_req * cqr, struct irb * irb) if (irb->scsw.cstat == 0x00 && irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) return dasd_era_none; - + cdev = device->cdev; switch (cdev->id.dev_type) { case 0x3370: @@ -532,7 +539,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In - * addition we have one define extent ccw + 16 bytes of data and a + * addition we have one define extent ccw + 16 bytes of data and a * locate record ccw for each block (stupid devices!) + 16 bytes of data. * That makes: * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. @@ -562,8 +569,16 @@ static struct dasd_discipline dasd_fba_discipline = { static int __init dasd_fba_init(void) { + int ret; + ASCEBC(dasd_fba_discipline.ebcname, 4); - return ccw_driver_register(&dasd_fba_driver); + + ret = ccw_driver_register(&dasd_fba_driver); + if (ret) + return ret; + + dasd_generic_auto_online(&dasd_fba_driver); + return 0; } static void __exit @@ -574,3 +589,22 @@ dasd_fba_cleanup(void) module_init(dasd_fba_init); module_exit(dasd_fba_cleanup); + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_fba.h b/drivers/s390/block/dasd_fba.h index 14c910baa..da1fa91fc 100644 --- a/drivers/s390/block/dasd_fba.h +++ b/drivers/s390/block/dasd_fba.h @@ -1,4 +1,4 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_fba.h * Author(s)......: Holger Smolinski * Bugreports.to..: diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index d16363210..fce2835e7 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -67,6 +68,8 @@ dasd_gendisk_alloc(struct dasd_device *device) } len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26)); + sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); + if (device->features & DASD_FEATURE_READONLY) set_disk_ro(gdp, 1); gdp->private_data = device; @@ -83,12 +86,10 @@ dasd_gendisk_alloc(struct dasd_device *device) void dasd_gendisk_free(struct dasd_device *device) { - if (device->gdp) { - del_gendisk(device->gdp); - device->gdp->queue = NULL; - put_disk(device->gdp); - device->gdp = NULL; - } + del_gendisk(device->gdp); + device->gdp->queue = 0; + put_disk(device->gdp); + device->gdp = 0; } /* @@ -138,7 +139,7 @@ dasd_destroy_partitions(struct dasd_device * device) * device->bdev to lower the offline open_count limit again. */ bdev = device->bdev; - device->bdev = NULL; + device->bdev = 0; /* * See fs/partition/check.c:delete_partition @@ -147,7 +148,7 @@ dasd_destroy_partitions(struct dasd_device * device) */ memset(&bpart, 0, sizeof(struct blkpg_partition)); memset(&barg, 0, sizeof(struct blkpg_ioctl_arg)); - barg.data = (void __user *) &bpart; + barg.data = &bpart; barg.op = BLKPG_DEL_PARTITION; for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 3ccf06d28..d4b13e300 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -1,7 +1,7 @@ -/* +/* * File...........: linux/drivers/s390/block/dasd_int.h * Author(s)......: Holger Smolinski - * Horst Hummel + * Horst Hummel * Martin Schwidefsky * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -185,7 +186,7 @@ struct dasd_ccw_req { void *callback_data; }; -/* +/* * dasd_ccw_req -> status can be: */ #define DASD_CQR_FILLED 0x00 /* request is ready to be processed */ @@ -247,7 +248,7 @@ struct dasd_discipline { /* * Error recovery functions. examine_error() returns a value that * indicates what to do for an error condition. If examine_error() - * returns 'dasd_era_recover' erp_action() is called to create a + * returns 'dasd_era_recover' erp_action() is called to create a * special error recovery ccw. erp_postaction() is called after * an error recovery ccw has finished its execution. dump_sense * is called for every error condition to print the sense data @@ -301,11 +302,11 @@ struct dasd_device { spinlock_t request_queue_lock; struct block_device *bdev; unsigned int devindex; - unsigned long blocks; /* size of volume in blocks */ - unsigned int bp_block; /* bytes per block */ - unsigned int s2b_shift; /* log2 (bp_block/512) */ - unsigned long flags; /* per device flags */ - unsigned short features; /* copy of devmap-features (read-only!) */ + unsigned long blocks; /* size of volume in blocks */ + unsigned int bp_block; /* bytes per block */ + unsigned int s2b_shift; /* log2 (bp_block/512) */ + unsigned long flags; /* per device flags */ + unsigned short features; /* copy of devmap-features (read-only!) */ /* extended error reporting stuff (eer) */ struct dasd_ccw_req *eer_cqr; @@ -512,12 +513,12 @@ void dasd_generic_remove (struct ccw_device *cdev); int dasd_generic_set_online(struct ccw_device *, struct dasd_discipline *); int dasd_generic_set_offline (struct ccw_device *cdev); int dasd_generic_notify(struct ccw_device *, int); +void dasd_generic_auto_online (struct ccw_driver *); /* externals in dasd_devmap.c */ extern int dasd_max_devindex; extern int dasd_probeonly; extern int dasd_autodetect; -extern int dasd_nopav; int dasd_devmap_init(void); void dasd_devmap_exit(void); @@ -605,3 +606,22 @@ static inline int dasd_eer_enabled(struct dasd_device *device) #endif /* __KERNEL__ */ #endif /* DASD_H */ + +/* + * 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-indent-level: 4 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -4 + * c-argdecl-indent: 4 + * c-label-offset: -4 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: 1 + * tab-width: 8 + * End: + */ diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 8fed3603e..b8c80d28d 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -9,6 +9,7 @@ * * i/o controls for the dasd driver. */ +#include #include #include #include @@ -89,10 +90,10 @@ static int dasd_ioctl_quiesce(struct dasd_device *device) { unsigned long flags; - + if (!capable (CAP_SYS_ADMIN)) return -EACCES; - + DEV_MESSAGE (KERN_DEBUG, device, "%s", "Quiesce IO on device"); spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); @@ -109,13 +110,13 @@ static int dasd_ioctl_resume(struct dasd_device *device) { unsigned long flags; - - if (!capable (CAP_SYS_ADMIN)) + + if (!capable (CAP_SYS_ADMIN)) return -EACCES; DEV_MESSAGE (KERN_DEBUG, device, "%s", "resume IO on device"); - + spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); device->stopped &= ~DASD_STOPPED_QUIESCE; spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); @@ -286,7 +287,7 @@ dasd_ioctl_information(struct dasd_device *device, dasd_info->open_count = atomic_read(&device->open_count); if (!device->bdev) dasd_info->open_count++; - + /* * check if device is really formatted * LDL / CDL was returned by 'fill_info' @@ -345,7 +346,7 @@ dasd_ioctl_set_ro(struct block_device *bdev, void __user *argp) if (bdev != bdev->bd_contains) // ro setting is not allowed for partitions return -EINVAL; - if (get_user(intval, (int __user *)argp)) + if (get_user(intval, (int *)argp)) return -EFAULT; set_disk_ro(bdev->bd_disk, intval); diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index bfa010f6d..ad23aede3 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index ca7d51f7e..54ecd548c 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c @@ -36,6 +36,7 @@ #include /* HDIO_GETGEO */ #include #include +#include #include #define XPRAM_NAME "xpram" @@ -48,6 +49,15 @@ #define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x) +static struct sysdev_class xpram_sysclass = { + set_kset_name("xpram"), +}; + +static struct sys_device xpram_sys_device = { + .id = 0, + .cls = &xpram_sysclass, +}; + typedef struct { unsigned int size; /* size of xpram segment in pages */ unsigned int offset; /* start page of xpram segment */ @@ -62,11 +72,11 @@ static int xpram_devs; /* * Parameter parsing functions. */ -static int __initdata devs = XPRAM_DEVS; -static char __initdata *sizes[XPRAM_MAX_DEVS]; +static int devs = XPRAM_DEVS; +static unsigned int sizes[XPRAM_MAX_DEVS]; module_param(devs, int, 0); -module_param_array(sizes, charp, NULL, 0); +module_param_array(sizes, int, NULL, 0); MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); @@ -77,6 +87,59 @@ MODULE_PARM_DESC(sizes, "list of device (partition) sizes " \ "claimed by explicit sizes\n"); MODULE_LICENSE("GPL"); +#ifndef MODULE +/* + * Parses the kernel parameters given in the kernel parameter line. + * The expected format is + * [","]* + * where + * devices is a positive integer that initializes xpram_devs + * each size is a non-negative integer possibly followed by a + * magnitude (k,K,m,M,g,G), the list of sizes initialises + * xpram_sizes + * + * Arguments + * str: substring of kernel parameter line that contains xprams + * kernel parameters. + * + * Result 0 on success, -EINVAL else -- only for Version > 2.3 + * + * Side effects + * the global variabls devs is set to the value of + * and sizes[i] is set to the i-th + * partition size (if provided). A parsing error of a value + * results in this value being set to -EINVAL. + */ +static int __init xpram_setup (char *str) +{ + char *cp; + int i; + + devs = simple_strtoul(str, &cp, 10); + if (cp <= str || devs > XPRAM_MAX_DEVS) + return 0; + for (i = 0; (i < devs) && (*cp++ == ','); i++) { + sizes[i] = simple_strtoul(cp, &cp, 10); + if (*cp == 'g' || *cp == 'G') { + sizes[i] <<= 20; + cp++; + } else if (*cp == 'm' || *cp == 'M') { + sizes[i] <<= 10; + cp++; + } else if (*cp == 'k' || *cp == 'K') + cp++; + while (isspace(*cp)) cp++; + } + if (*cp == ',' && i >= devs) + PRINT_WARN("partition sizes list has too many entries.\n"); + else if (*cp != 0) + PRINT_WARN("ignored '%s' at end of parameter string.\n", cp); + return 1; +} + +__setup("xpram_parts=", xpram_setup); +#endif + /* * Copy expanded memory page (4kB) into main memory * Arguments @@ -295,7 +358,6 @@ static int __init xpram_setup_sizes(unsigned long pages) { unsigned long mem_needed; unsigned long mem_auto; - unsigned long long size; int mem_auto_no; int i; @@ -313,19 +375,7 @@ static int __init xpram_setup_sizes(unsigned long pages) mem_needed = 0; mem_auto_no = 0; for (i = 0; i < xpram_devs; i++) { - if (sizes[i]) { - size = simple_strtoull(sizes[i], &sizes[i], 0); - switch (sizes[i][0]) { - case 'g': - case 'G': - size <<= 20; - break; - case 'm': - case 'M': - size <<= 10; - } - xpram_sizes[i] = (size + 3) & -4UL; - } + xpram_sizes[i] = (sizes[i] + 3) & -4UL; if (xpram_sizes[i]) mem_needed += xpram_sizes[i]; else @@ -389,6 +439,8 @@ static int __init xpram_setup_blkdev(void) if (rc < 0) goto out; + devfs_mk_dir("slram"); + /* * Assign the other needed values: make request function, sizes and * hardsect size. All the minor devices feature the same value. @@ -417,12 +469,14 @@ static int __init xpram_setup_blkdev(void) disk->private_data = &xpram_devices[i]; disk->queue = xpram_queue; sprintf(disk->disk_name, "slram%d", i); + sprintf(disk->devfs_name, "slram/%d", i); set_capacity(disk, xpram_sizes[i] << 1); add_disk(disk); } return 0; out_unreg: + devfs_remove("slram"); unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); out: while (i--) @@ -441,7 +495,10 @@ static void __exit xpram_exit(void) put_disk(xpram_disks[i]); } unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); + devfs_remove("slram"); blk_cleanup_queue(xpram_queue); + sysdev_unregister(&xpram_sys_device); + sysdev_class_unregister(&xpram_sysclass); } static int __init xpram_init(void) @@ -459,7 +516,19 @@ static int __init xpram_init(void) rc = xpram_setup_sizes(xpram_pages); if (rc) return rc; - return xpram_setup_blkdev(); + rc = sysdev_class_register(&xpram_sysclass); + if (rc) + return rc; + + rc = sysdev_register(&xpram_sys_device); + if (rc) { + sysdev_class_unregister(&xpram_sysclass); + return rc; + } + rc = xpram_setup_blkdev(); + if (rc) + sysdev_unregister(&xpram_sys_device); + return rc; } module_init(xpram_init); diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 2fa566fa6..606f6ad28 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -11,6 +11,7 @@ * Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu) */ +#include #include #include #include @@ -693,7 +694,7 @@ raw3215_probe (struct ccw_device *cdev) GFP_KERNEL|GFP_DMA); if (raw->buffer == NULL) { spin_lock(&raw3215_device_lock); - raw3215[line] = NULL; + raw3215[line] = 0; spin_unlock(&raw3215_device_lock); kfree(raw); return -ENOMEM; diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index 7566be890..ef607a1de 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c @@ -8,6 +8,7 @@ * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation */ +#include #include #include #include diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c index d83eb6358..be463242c 100644 --- a/drivers/s390/char/ctrlchar.c +++ b/drivers/s390/char/ctrlchar.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -23,7 +24,7 @@ ctrlchar_handle_sysrq(void *tty) handle_sysrq(ctrlchar_sysrq_key, NULL, (struct tty_struct *) tty); } -static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, NULL); +static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq, 0); #endif diff --git a/drivers/s390/char/defkeymap.c b/drivers/s390/char/defkeymap.c index 17027d918..ca15adb14 100644 --- a/drivers/s390/char/defkeymap.c +++ b/drivers/s390/char/defkeymap.c @@ -83,8 +83,8 @@ static u_short shift_ctrl_map[NR_KEYS] = { }; ushort *key_maps[MAX_NR_KEYMAPS] = { - plain_map, shift_map, NULL, NULL, - ctrl_map, shift_ctrl_map, NULL, + plain_map, shift_map, 0, 0, + ctrl_map, shift_ctrl_map, 0 }; unsigned int keymap_count = 4; @@ -145,7 +145,7 @@ char *func_table[MAX_NR_FUNC] = { func_buf + 97, func_buf + 103, func_buf + 109, - NULL, + 0, }; struct kbdiacr accent_table[MAX_DIACR] = { diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index d54d5025f..a6415377b 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c @@ -8,6 +8,7 @@ * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation */ +#include #include #include #include @@ -236,7 +237,7 @@ fs3270_irq(struct fs3270 *fp, struct raw3270_request *rq, struct irb *irb) * Process reads from fullscreen 3270. */ static ssize_t -fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off) +fs3270_read(struct file *filp, char *data, size_t count, loff_t *off) { struct fs3270 *fp; struct raw3270_request *rq; @@ -281,7 +282,7 @@ fs3270_read(struct file *filp, char __user *data, size_t count, loff_t *off) * Process writes to fullscreen 3270. */ static ssize_t -fs3270_write(struct file *filp, const char __user *data, size_t count, loff_t *off) +fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off) { struct fs3270 *fp; struct raw3270_request *rq; @@ -338,10 +339,10 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) fp->write_command = arg; break; case TUBGETI: - rc = put_user(fp->read_command, (char __user *) arg); + rc = put_user(fp->read_command, (char *) arg); break; case TUBGETO: - rc = put_user(fp->write_command,(char __user *) arg); + rc = put_user(fp->write_command,(char *) arg); break; case TUBGETMOD: iocb.model = fp->view.model; @@ -350,7 +351,7 @@ fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) iocb.pf_cnt = 24; iocb.re_cnt = 20; iocb.map = 0; - if (copy_to_user((char __user *) arg, &iocb, + if (copy_to_user((char *) arg, &iocb, sizeof(struct raw3270_iocb))) rc = -EFAULT; break; @@ -425,15 +426,11 @@ fs3270_open(struct inode *inode, struct file *filp) minor = iminor(filp->f_dentry->d_inode); /* Check for minor 0 multiplexer. */ if (minor == 0) { - struct tty_struct *tty; - mutex_lock(&tty_mutex); - tty = get_current_tty(); - if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) { - mutex_unlock(&tty_mutex); + if (!current->signal->tty) return -ENODEV; - } - minor = tty->index + RAW3270_FIRSTMINOR; - mutex_unlock(&tty_mutex); + if (current->signal->tty->driver->major != IBM_TTY3270_MAJOR) + return -ENODEV; + minor = current->signal->tty->index + RAW3270_FIRSTMINOR; } /* Check if some other program is already using fullscreen mode. */ fp = (struct fs3270 *) raw3270_find_view(&fs3270_fn, minor); @@ -483,7 +480,7 @@ fs3270_close(struct inode *inode, struct file *filp) struct fs3270 *fp; fp = filp->private_data; - filp->private_data = NULL; + filp->private_data = 0; if (fp) { fp->fs_pid = 0; raw3270_reset(&fp->view); diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 3be065691..d4d2ff0a9 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c @@ -7,6 +7,7 @@ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), */ +#include #include #include #include @@ -103,7 +104,7 @@ out_maps: out_kbd: kfree(kbd); out: - return NULL; + return 0; } void @@ -304,7 +305,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode) if (kbd->sysrq) { if (kbd->sysrq == K(KT_LATIN, '-')) { kbd->sysrq = 0; - handle_sysrq(value, NULL, kbd->tty); + handle_sysrq(value, 0, kbd->tty); return; } if (value == '-') { @@ -363,7 +364,7 @@ do_kdsk_ioctl(struct kbd_data *kbd, struct kbentry __user *user_kbe, /* disallocate map */ key_map = kbd->key_maps[tmp.kb_table]; if (key_map) { - kbd->key_maps[tmp.kb_table] = NULL; + kbd->key_maps[tmp.kb_table] = 0; kfree(key_map); } break; diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index a138b1510..fb7bc9e5e 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c @@ -586,6 +586,7 @@ static struct file_operations mon_fops = { static struct miscdevice mon_dev = { .name = "monreader", + .devfs_name = "monreader", .fops = &mon_fops, .minor = MISC_DYNAMIC_MINOR, }; diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 7a84014f2..eecb2afad 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c @@ -8,6 +8,7 @@ * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation */ +#include #include #include #include @@ -49,9 +50,6 @@ struct raw3270 { unsigned char *ascebc; /* ascii -> ebcdic table */ struct class_device *clttydev; /* 3270-class tty device ptr */ struct class_device *cltubdev; /* 3270-class tub device ptr */ - - struct raw3270_request init_request; - unsigned char init_data[256]; }; /* raw3270->flags */ @@ -486,6 +484,8 @@ struct raw3270_ua { /* Query Reply structure for Usable Area */ } __attribute__ ((packed)) aua; } __attribute__ ((packed)); +static unsigned char raw3270_init_data[256]; +static struct raw3270_request raw3270_init_request; static struct diag210 raw3270_init_diag210; static DECLARE_MUTEX(raw3270_init_sem); @@ -555,7 +555,7 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, #ifdef CONFIG_TN3270_CONSOLE if (raw3270_registered == 0) { spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); - rq->callback = NULL; + rq->callback = 0; rc = __raw3270_start(rp, view, rq); if (rc == 0) while (!raw3270_request_final(rq)) { @@ -644,17 +644,17 @@ __raw3270_size_device(struct raw3270 *rp) * required (3270 device switched to 'stand-by') and command * rejects (old devices that can't do 'read partition'). */ - memset(&rp->init_request, 0, sizeof(rp->init_request)); - memset(&rp->init_data, 0, 256); - /* Store 'read partition' data stream to init_data */ - memcpy(&rp->init_data, wbuf, sizeof(wbuf)); - INIT_LIST_HEAD(&rp->init_request.list); - rp->init_request.ccw.cmd_code = TC_WRITESF; - rp->init_request.ccw.flags = CCW_FLAG_SLI; - rp->init_request.ccw.count = sizeof(wbuf); - rp->init_request.ccw.cda = (__u32) __pa(&rp->init_data); - - rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); + memset(&raw3270_init_request, 0, sizeof(raw3270_init_request)); + memset(raw3270_init_data, 0, sizeof(raw3270_init_data)); + /* Store 'read partition' data stream to raw3270_init_data */ + memcpy(raw3270_init_data, wbuf, sizeof(wbuf)); + INIT_LIST_HEAD(&raw3270_init_request.list); + raw3270_init_request.ccw.cmd_code = TC_WRITESF; + raw3270_init_request.ccw.flags = CCW_FLAG_SLI; + raw3270_init_request.ccw.count = sizeof(wbuf); + raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); + + rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); if (rc) /* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */ return rc; @@ -679,18 +679,18 @@ __raw3270_size_device(struct raw3270 *rp) * The device accepted the 'read partition' command. Now * set up a read ccw and issue it. */ - rp->init_request.ccw.cmd_code = TC_READMOD; - rp->init_request.ccw.flags = CCW_FLAG_SLI; - rp->init_request.ccw.count = sizeof(rp->init_data); - rp->init_request.ccw.cda = (__u32) __pa(rp->init_data); - rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); + raw3270_init_request.ccw.cmd_code = TC_READMOD; + raw3270_init_request.ccw.flags = CCW_FLAG_SLI; + raw3270_init_request.ccw.count = sizeof(raw3270_init_data); + raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); + rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); if (rc) return rc; /* Got a Query Reply */ - count = sizeof(rp->init_data) - rp->init_request.rescnt; - uap = (struct raw3270_ua *) (rp->init_data + 1); + count = sizeof(raw3270_init_data) - raw3270_init_request.rescnt; + uap = (struct raw3270_ua *) (raw3270_init_data + 1); /* Paranoia check. */ - if (rp->init_data[0] != 0x88 || uap->uab.qcode != 0x81) + if (raw3270_init_data[0] != 0x88 || uap->uab.qcode != 0x81) return -EOPNOTSUPP; /* Copy rows/columns of default Usable Area */ rp->rows = uap->uab.h; @@ -719,8 +719,8 @@ raw3270_size_device(struct raw3270 *rp) rc = __raw3270_size_device_vm(rp); else rc = __raw3270_size_device(rp); - raw3270_init_view.dev = NULL; - rp->view = NULL; + raw3270_init_view.dev = 0; + rp->view = 0; up(&raw3270_init_sem); if (rc == 0) { /* Found something. */ /* Try to find a model. */ @@ -749,20 +749,20 @@ raw3270_reset_device(struct raw3270 *rp) int rc; down(&raw3270_init_sem); - memset(&rp->init_request, 0, sizeof(rp->init_request)); - memset(&rp->init_data, 0, sizeof(rp->init_data)); - /* Store reset data stream to init_data/init_request */ - rp->init_data[0] = TW_KR; - INIT_LIST_HEAD(&rp->init_request.list); - rp->init_request.ccw.cmd_code = TC_EWRITEA; - rp->init_request.ccw.flags = CCW_FLAG_SLI; - rp->init_request.ccw.count = 1; - rp->init_request.ccw.cda = (__u32) __pa(rp->init_data); + memset(&raw3270_init_request, 0, sizeof(raw3270_init_request)); + memset(raw3270_init_data, 0, sizeof(raw3270_init_data)); + /* Store reset data stream to raw3270_init_data/raw3270_init_request */ + raw3270_init_data[0] = TW_KR; + INIT_LIST_HEAD(&raw3270_init_request.list); + raw3270_init_request.ccw.cmd_code = TC_EWRITEA; + raw3270_init_request.ccw.flags = CCW_FLAG_SLI; + raw3270_init_request.ccw.count = 1; + raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); rp->view = &raw3270_init_view; raw3270_init_view.dev = rp; - rc = raw3270_start_init(rp, &raw3270_init_view, &rp->init_request); - raw3270_init_view.dev = NULL; - rp->view = NULL; + rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); + raw3270_init_view.dev = 0; + rp->view = 0; up(&raw3270_init_sem); return rc; } @@ -854,7 +854,7 @@ raw3270_setup_console(struct ccw_device *cdev) char *ascebc; int rc; - rp = (struct raw3270 *) alloc_bootmem_low(sizeof(struct raw3270)); + rp = (struct raw3270 *) alloc_bootmem(sizeof(struct raw3270)); ascebc = (char *) alloc_bootmem(256); rc = raw3270_setup_device(cdev, rp, ascebc); if (rc) @@ -895,7 +895,7 @@ raw3270_create_device(struct ccw_device *cdev) char *ascebc; int rc; - rp = kmalloc(sizeof(struct raw3270), GFP_KERNEL | GFP_DMA); + rp = kmalloc(sizeof(struct raw3270), GFP_KERNEL); if (!rp) return ERR_PTR(-ENOMEM); ascebc = kmalloc(256, GFP_KERNEL); @@ -934,7 +934,7 @@ raw3270_activate_view(struct raw3270_view *view) else if (!test_bit(RAW3270_FLAGS_READY, &rp->flags)) rc = -ENODEV; else { - oldview = NULL; + oldview = 0; if (rp->view) { oldview = rp->view; oldview->fn->deactivate(oldview); @@ -951,7 +951,7 @@ raw3270_activate_view(struct raw3270_view *view) rp->view = nv; if (nv->fn->activate(nv) == 0) break; - rp->view = NULL; + rp->view = 0; } } } @@ -975,7 +975,7 @@ raw3270_deactivate_view(struct raw3270_view *view) spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); if (rp->view == view) { view->fn->deactivate(view); - rp->view = NULL; + rp->view = 0; /* Move deactivated view to end of list. */ list_del_init(&view->list); list_add_tail(&view->list, &rp->view_list); @@ -985,7 +985,7 @@ raw3270_deactivate_view(struct raw3270_view *view) rp->view = view; if (view->fn->activate(view) == 0) break; - rp->view = NULL; + rp->view = 0; } } } @@ -1076,7 +1076,7 @@ raw3270_del_view(struct raw3270_view *view) spin_lock_irqsave(get_ccwdev_lock(rp->cdev), flags); if (rp->view == view) { view->fn->deactivate(view); - rp->view = NULL; + rp->view = 0; } list_del_init(&view->list); if (!rp->view && test_bit(RAW3270_FLAGS_READY, &rp->flags)) { @@ -1106,10 +1106,10 @@ raw3270_delete_device(struct raw3270 *rp) /* Remove from device chain. */ mutex_lock(&raw3270_mutex); - if (rp->clttydev && !IS_ERR(rp->clttydev)) + if (rp->clttydev) class_device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); - if (rp->cltubdev && !IS_ERR(rp->cltubdev)) + if (rp->cltubdev) class_device_destroy(class3270, MKDEV(IBM_FS3270_MAJOR, rp->minor)); list_del_init(&rp->list); @@ -1117,9 +1117,9 @@ raw3270_delete_device(struct raw3270 *rp) /* Disconnect from ccw_device. */ cdev = rp->cdev; - rp->cdev = NULL; - cdev->dev.driver_data = NULL; - cdev->handler = NULL; + rp->cdev = 0; + cdev->dev.driver_data = 0; + cdev->handler = 0; /* Put ccw_device structure. */ put_device(&cdev->dev); @@ -1144,7 +1144,7 @@ raw3270_model_show(struct device *dev, struct device_attribute *attr, char *buf) return snprintf(buf, PAGE_SIZE, "%i\n", ((struct raw3270 *) dev->driver_data)->model); } -static DEVICE_ATTR(model, 0444, raw3270_model_show, NULL); +static DEVICE_ATTR(model, 0444, raw3270_model_show, 0); static ssize_t raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -1152,7 +1152,7 @@ raw3270_rows_show(struct device *dev, struct device_attribute *attr, char *buf) return snprintf(buf, PAGE_SIZE, "%i\n", ((struct raw3270 *) dev->driver_data)->rows); } -static DEVICE_ATTR(rows, 0444, raw3270_rows_show, NULL); +static DEVICE_ATTR(rows, 0444, raw3270_rows_show, 0); static ssize_t raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -1160,7 +1160,7 @@ raw3270_columns_show(struct device *dev, struct device_attribute *attr, char *bu return snprintf(buf, PAGE_SIZE, "%i\n", ((struct raw3270 *) dev->driver_data)->cols); } -static DEVICE_ATTR(columns, 0444, raw3270_columns_show, NULL); +static DEVICE_ATTR(columns, 0444, raw3270_columns_show, 0); static struct attribute * raw3270_attrs[] = { &dev_attr_model.attr, @@ -1173,37 +1173,21 @@ static struct attribute_group raw3270_attr_group = { .attrs = raw3270_attrs, }; -static int raw3270_create_attributes(struct raw3270 *rp) +static void +raw3270_create_attributes(struct raw3270 *rp) { - int rc; - - rc = sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group); - if (rc) - goto out; - - rp->clttydev = class_device_create(class3270, NULL, - MKDEV(IBM_TTY3270_MAJOR, rp->minor), - &rp->cdev->dev, "tty%s", - rp->cdev->dev.bus_id); - if (IS_ERR(rp->clttydev)) { - rc = PTR_ERR(rp->clttydev); - goto out_ttydev; - } - - rp->cltubdev = class_device_create(class3270, NULL, - MKDEV(IBM_FS3270_MAJOR, rp->minor), - &rp->cdev->dev, "tub%s", - rp->cdev->dev.bus_id); - if (!IS_ERR(rp->cltubdev)) - goto out; - - rc = PTR_ERR(rp->cltubdev); - class_device_destroy(class3270, MKDEV(IBM_TTY3270_MAJOR, rp->minor)); - -out_ttydev: - sysfs_remove_group(&rp->cdev->dev.kobj, &raw3270_attr_group); -out: - return rc; + //FIXME: check return code + sysfs_create_group(&rp->cdev->dev.kobj, &raw3270_attr_group); + rp->clttydev = + class_device_create(class3270, NULL, + MKDEV(IBM_TTY3270_MAJOR, rp->minor), + &rp->cdev->dev, "tty%s", + rp->cdev->dev.bus_id); + rp->cltubdev = + class_device_create(class3270, NULL, + MKDEV(IBM_FS3270_MAJOR, rp->minor), + &rp->cdev->dev, "tub%s", + rp->cdev->dev.bus_id); } /* @@ -1271,9 +1255,7 @@ raw3270_set_online (struct ccw_device *cdev) rc = raw3270_reset_device(rp); if (rc) goto failure; - rc = raw3270_create_attributes(rp); - if (rc) - goto failure; + raw3270_create_attributes(rp); set_bit(RAW3270_FLAGS_READY, &rp->flags); mutex_lock(&raw3270_mutex); list_for_each_entry(np, &raw3270_notifier, list) @@ -1314,7 +1296,7 @@ raw3270_remove (struct ccw_device *cdev) spin_lock_irqsave(get_ccwdev_lock(cdev), flags); if (rp->view) { rp->view->fn->deactivate(rp->view); - rp->view = NULL; + rp->view = 0; } while (!list_empty(&rp->view_list)) { v = list_entry(rp->view_list.next, struct raw3270_view, list); diff --git a/drivers/s390/char/raw3270.h b/drivers/s390/char/raw3270.h index 90beaa80a..b635bf8e7 100644 --- a/drivers/s390/char/raw3270.h +++ b/drivers/s390/char/raw3270.h @@ -231,7 +231,7 @@ alloc_string(struct list_head *free_list, unsigned long len) INIT_LIST_HEAD(&cs->update); return cs; } - return NULL; + return 0; } static inline unsigned long diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 985d1613b..413856440 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -383,7 +383,6 @@ void sclp_sync_wait(void) { unsigned long psw_mask; - unsigned long flags; unsigned long cr0, cr0_sync; u64 timeout; @@ -396,11 +395,9 @@ sclp_sync_wait(void) sclp_tod_from_jiffies(sclp_request_timer.expires - jiffies); } - local_irq_save(flags); /* Prevent bottom half from executing once we force interrupts open */ local_bh_disable(); /* Enable service-signal interruption, disable timer interrupts */ - trace_hardirqs_on(); __ctl_store(cr0, 0, 0); cr0_sync = cr0; cr0_sync |= 0x00000200; @@ -418,10 +415,11 @@ sclp_sync_wait(void) barrier(); cpu_relax(); } - local_irq_disable(); + /* Restore interrupt settings */ + asm volatile ("SSM 0(%0)" + : : "a" (&psw_mask) : "memory"); __ctl_load(cr0, 0, 0); - _local_bh_enable(); - local_irq_restore(flags); + __local_bh_enable(); } EXPORT_SYMBOL(sclp_sync_wait); diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index 86864f641..10ef22f13 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c @@ -8,6 +8,7 @@ * Martin Schwidefsky */ +#include #include #include #include diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c index 732dfbdb8..80f7f3131 100644 --- a/drivers/s390/char/sclp_cpi.c +++ b/drivers/s390/char/sclp_cpi.c @@ -5,6 +5,7 @@ * SCLP Control-Program Identification. */ +#include #include #include #include diff --git a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c index 32004aae9..56fa69168 100644 --- a/drivers/s390/char/sclp_quiesce.c +++ b/drivers/s390/char/sclp_quiesce.c @@ -7,12 +7,12 @@ * Peter Oberparleiter */ +#include #include #include #include #include #include -#include #include #include #include @@ -66,6 +66,8 @@ do_machine_quiesce(void) } #endif +extern void ctrl_alt_del(void); + /* Handler for quiesce event. Start shutdown procedure. */ static void sclp_quiesce_handler(struct evbuf_header *evbuf) diff --git a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c index 0c92d3909..91e93c78f 100644 --- a/drivers/s390/char/sclp_rw.c +++ b/drivers/s390/char/sclp_rw.c @@ -8,6 +8,7 @@ * Martin Schwidefsky */ +#include #include #include #include diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index f6cf90230..6cbf067f1 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -8,6 +8,7 @@ * Martin Schwidefsky */ +#include #include #include #include diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 54fba6f17..9e02625c8 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -7,6 +7,7 @@ * Author(s): Peter Oberparleiter */ +#include #include #include #include diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index 1f4c89967..cd51ace8b 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index 7b95dab91..d4f2da738 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c @@ -8,6 +8,7 @@ * Martin Schwidefsky */ +#include #include #include #include @@ -1309,9 +1310,9 @@ static struct tape_discipline tape_discipline_34xx = { }; static struct ccw_device_id tape_34xx_ids[] = { - { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), .driver_info = tape_3480}, - { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), .driver_info = tape_3490}, - { /* end of list */ }, + { CCW_DEVICE_DEVTYPE(0x3480, 0, 0x3480, 0), driver_info: tape_3480}, + { CCW_DEVICE_DEVTYPE(0x3490, 0, 0x3490, 0), driver_info: tape_3490}, + { /* end of list */ } }; static int diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 928cbefc4..d71ef1ade 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c @@ -8,6 +8,7 @@ * Martin Schwidefsky */ +#include #include #include #include diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index 3225fcd1d..b70d92690 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index 97f75237b..5ce7ca38a 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c @@ -10,6 +10,7 @@ * Martin Schwidefsky */ +#include #include #include #include diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 56b87618b..a5c68e60f 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -76,22 +76,14 @@ struct tape_class_device *register_tape_dev( device, "%s", tcd->device_name ); - rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0; - if (rc) - goto fail_with_cdev; - rc = sysfs_create_link( + sysfs_create_link( &device->kobj, &tcd->class_device->kobj, tcd->mode_name ); - if (rc) - goto fail_with_class_device; return tcd; -fail_with_class_device: - class_device_destroy(tape_class, tcd->char_device->dev); - fail_with_cdev: cdev_del(tcd->char_device); diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 2826aed91..e6e4086d3 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -11,6 +11,7 @@ * Stefan Bader */ +#include #include #include // for kernel parameters #include // for requesting modules @@ -543,24 +544,20 @@ int tape_generic_probe(struct ccw_device *cdev) { struct tape_device *device; - int ret; device = tape_alloc_device(); if (IS_ERR(device)) return -ENODEV; - ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); - ret = sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); - if (ret) { - tape_put_device(device); - PRINT_ERR("probe failed for tape device %s\n", cdev->dev.bus_id); - return ret; - } + PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); cdev->dev.driver_data = device; - cdev->handler = __tape_do_irq; device->cdev = cdev; device->cdev_id = busid_to_int(cdev->dev.bus_id); - PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); - return ret; + cdev->handler = __tape_do_irq; + + ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); + sysfs_create_group(&cdev->dev.kobj, &tape_attr_group); + + return 0; } static inline void diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c index 655d375ab..5fec0a10c 100644 --- a/drivers/s390/char/tape_proc.c +++ b/drivers/s390/char/tape_proc.c @@ -11,6 +11,7 @@ * PROCFS Functions */ +#include #include #include #include diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 7a76ec413..99cf881f4 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c @@ -11,6 +11,7 @@ * Stefan Bader */ +#include #include #include #include diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 06e2eeec8..9a1417768 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -8,6 +8,7 @@ * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation */ +#include #include #include #include @@ -437,7 +438,7 @@ tty3270_rcl_add(struct tty3270 *tp, char *input, int len) { struct string *s; - tp->rcl_walk = NULL; + tp->rcl_walk = 0; if (len <= 0) return; if (tp->rcl_nr >= tp->rcl_max) { @@ -466,12 +467,12 @@ tty3270_rcl_backward(struct kbd_data *kbd) else if (!list_empty(&tp->rcl_lines)) tp->rcl_walk = tp->rcl_lines.prev; s = tp->rcl_walk ? - list_entry(tp->rcl_walk, struct string, list) : NULL; + list_entry(tp->rcl_walk, struct string, list) : 0; if (tp->rcl_walk) { s = list_entry(tp->rcl_walk, struct string, list); tty3270_update_prompt(tp, s->string, s->len); } else - tty3270_update_prompt(tp, NULL, 0); + tty3270_update_prompt(tp, 0, 0); tty3270_set_timer(tp, 1); } spin_unlock_bh(&tp->view.lock); @@ -553,7 +554,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq) * has to be emitted to the tty and for 0x6d the screen * needs to be redrawn. */ - input = NULL; + input = 0; len = 0; if (tp->input->string[0] == 0x7d) { /* Enter: write input to tty. */ @@ -567,7 +568,7 @@ tty3270_read_tasklet(struct raw3270_request *rrq) tty3270_update_status(tp); } /* Clear input area. */ - tty3270_update_prompt(tp, NULL, 0); + tty3270_update_prompt(tp, 0, 0); tty3270_set_timer(tp, 1); } else if (tp->input->string[0] == 0x6d) { /* Display has been cleared. Redraw. */ @@ -698,6 +699,7 @@ tty3270_alloc_view(void) if (!tp->freemem_pages) goto out_tp; INIT_LIST_HEAD(&tp->freemem); + init_timer(&tp->timer); for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) { tp->freemem_pages[pages] = (void *) __get_free_pages(GFP_KERNEL|GFP_DMA, 0); @@ -807,8 +809,8 @@ tty3270_release(struct raw3270_view *view) tp = (struct tty3270 *) view; tty = tp->tty; if (tty) { - tty->driver_data = NULL; - tp->tty = tp->kbd->tty = NULL; + tty->driver_data = 0; + tp->tty = tp->kbd->tty = 0; tty_hangup(tty); raw3270_put_view(&tp->view); } @@ -947,8 +949,8 @@ tty3270_close(struct tty_struct *tty, struct file * filp) return; tp = (struct tty3270 *) tty->driver_data; if (tp) { - tty->driver_data = NULL; - tp->tty = tp->kbd->tty = NULL; + tty->driver_data = 0; + tp->tty = tp->kbd->tty = 0; raw3270_put_view(&tp->view); } } @@ -1672,7 +1674,7 @@ tty3270_set_termios(struct tty_struct *tty, struct termios *old) new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN; if (new != tp->inattr) { tp->inattr = new; - tty3270_update_prompt(tp, NULL, 0); + tty3270_update_prompt(tp, 0, 0); tty3270_set_timer(tp, 1); } } @@ -1758,7 +1760,7 @@ void tty3270_notifier(int index, int active) { if (active) - tty_register_device(tty3270_driver, index, NULL); + tty_register_device(tty3270_driver, index, 0); else tty_unregister_device(tty3270_driver, index); } @@ -1783,6 +1785,7 @@ tty3270_init(void) * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc */ driver->owner = THIS_MODULE; + driver->devfs_name = "ttyTUB/"; driver->driver_name = "ttyTUB"; driver->name = "ttyTUB"; driver->major = IBM_TTY3270_MAJOR; @@ -1790,7 +1793,7 @@ tty3270_init(void) driver->type = TTY_DRIVER_TYPE_SYSTEM; driver->subtype = SYSTEM_TYPE_TTY; driver->init_termios = tty_std_termios; - driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_DYNAMIC_DEV; + driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_NO_DEVFS; tty_set_operations(driver, &tty3270_ops); ret = tty_register_driver(driver); if (ret) { @@ -1817,7 +1820,7 @@ tty3270_exit(void) raw3270_unregister_notifier(tty3270_notifier); driver = tty3270_driver; - tty3270_driver = NULL; + tty3270_driver = 0; tty_unregister_driver(driver); tty3270_del_views(); } diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 6cb230409..c625b69eb 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -86,8 +86,8 @@ struct vmlogrdr_priv_t { */ static int vmlogrdr_open(struct inode *, struct file *); static int vmlogrdr_release(struct inode *, struct file *); -static ssize_t vmlogrdr_read (struct file *filp, char __user *data, - size_t count, loff_t * ppos); +static ssize_t vmlogrdr_read (struct file *filp, char *data, size_t count, + loff_t * ppos); static struct file_operations vmlogrdr_fops = { .owner = THIS_MODULE, @@ -515,7 +515,7 @@ vmlogrdr_receive_data(struct vmlogrdr_priv_t *priv) { static ssize_t -vmlogrdr_read(struct file *filp, char __user *data, size_t count, loff_t * ppos) +vmlogrdr_read (struct file *filp, char *data, size_t count, loff_t * ppos) { int rc; struct vmlogrdr_priv_t * priv = filp->private_data; diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index 807320a41..5acc0ace3 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c @@ -193,7 +193,7 @@ static int vmwdt_ioctl(struct inode *i, struct file *f, return 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: - return put_user(0, (int __user *)arg); + return put_user(0, (int *)arg); case WDIOC_GETTEMP: return -EINVAL; case WDIOC_SETOPTIONS: diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 12c2d6b74..0960bef7b 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c @@ -9,6 +9,7 @@ * Arnd Bergmann (arndb@de.ibm.com) */ +#include #include #include #include @@ -223,6 +224,39 @@ is_blacklisted (int ssid, int devno) } #ifdef CONFIG_PROC_FS +static int +__s390_redo_validation(struct subchannel_id schid, void *data) +{ + int ret; + struct subchannel *sch; + + sch = get_subchannel_by_schid(schid); + if (sch) { + /* Already known. */ + put_device(&sch->dev); + return 0; + } + ret = css_probe_device(schid); + if (ret == -ENXIO) + return ret; /* We're through. */ + if (ret == -ENOMEM) + /* Stop validation for now. Bad, but no need for a panic. */ + return ret; + return 0; +} + +/* + * Function: s390_redo_validation + * Look for no longer blacklisted devices + * FIXME: there must be a better way to do this */ +static inline void +s390_redo_validation (void) +{ + CIO_TRACE_EVENT (0, "redoval"); + + for_each_subchannel(__s390_redo_validation, NULL); +} + /* * Function: blacklist_parse_proc_parameters * parse the stuff which is piped to /proc/cio_ignore @@ -247,7 +281,7 @@ blacklist_parse_proc_parameters (char *buf) return; } - css_schedule_reprobe(); + s390_redo_validation (); } /* Iterator struct for all devices. */ diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 38954f5cd..bdfee7fba 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -152,6 +152,7 @@ ccwgroup_create(struct device *root, struct ccwgroup_device *gdev; int i; int rc; + int del_drvdata; if (argc > 256) /* disallow dumb users */ return -EINVAL; @@ -162,6 +163,7 @@ ccwgroup_create(struct device *root, atomic_set(&gdev->onoff, 0); + del_drvdata = 0; for (i = 0; i < argc; i++) { gdev->cdev[i] = get_ccwdev_by_busid(cdrv, argv[i]); @@ -178,14 +180,18 @@ ccwgroup_create(struct device *root, rc = -EINVAL; goto free_dev; } - gdev->cdev[i]->dev.driver_data = gdev; } + for (i = 0; i < argc; i++) + gdev->cdev[i]->dev.driver_data = gdev; + del_drvdata = 1; gdev->creator_id = creator_id; gdev->count = argc; - gdev->dev.bus = &ccwgroup_bus_type; - gdev->dev.parent = root; - gdev->dev.release = ccwgroup_release; + gdev->dev = (struct device ) { + .bus = &ccwgroup_bus_type, + .parent = root, + .release = ccwgroup_release, + }; snprintf (gdev->dev.bus_id, BUS_ID_SIZE, "%s", gdev->cdev[0]->dev.bus_id); @@ -220,9 +226,9 @@ error: free_dev: for (i = 0; i < argc; i++) if (gdev->cdev[i]) { - if (gdev->cdev[i]->dev.driver_data == gdev) - gdev->cdev[i]->dev.driver_data = NULL; put_device(&gdev->cdev[i]->dev); + if (del_drvdata) + gdev->cdev[i]->dev.driver_data = NULL; } kfree(gdev); return rc; @@ -313,7 +319,7 @@ ccwgroup_online_store (struct device *dev, struct device_attribute *attr, const if (!try_module_get(gdrv->owner)) return -EINVAL; - value = simple_strtoul(buf, NULL, 0); + value = simple_strtoul(buf, 0, 0); ret = count; if (value == 1) ccwgroup_set_online(gdev); @@ -389,31 +395,30 @@ int ccwgroup_driver_register (struct ccwgroup_driver *cdriver) { /* register our new driver with the core */ - cdriver->driver.bus = &ccwgroup_bus_type; - cdriver->driver.name = cdriver->name; + cdriver->driver = (struct device_driver) { + .bus = &ccwgroup_bus_type, + .name = cdriver->name, + }; return driver_register(&cdriver->driver); } static int -__ccwgroup_match_all(struct device *dev, void *data) +__ccwgroup_driver_unregister_device(struct device *dev, void *data) { - return 1; + __ccwgroup_remove_symlinks(to_ccwgroupdev(dev)); + device_unregister(dev); + put_device(dev); + return 0; } void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver) { - struct device *dev; - /* We don't want ccwgroup devices to live longer than their driver. */ get_driver(&cdriver->driver); - while ((dev = driver_find_device(&cdriver->driver, NULL, NULL, - __ccwgroup_match_all))) { - __ccwgroup_remove_symlinks(to_ccwgroupdev(dev)); - device_unregister(dev); - put_device(dev); - } + driver_for_each_device(&cdriver->driver, NULL, NULL, + __ccwgroup_driver_unregister_device); put_driver(&cdriver->driver); driver_unregister(&cdriver->driver); } diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index c28444af0..72187e54d 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -238,10 +239,13 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) /* Check for single path devices. */ if (sch->schib.pmcw.pim == 0x80) goto out_unreg; + if (sch->vpm == mask) + goto out_unreg; if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) && (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) && - (sch->schib.pmcw.lpum == mask)) { + (sch->schib.pmcw.lpum == mask) && + (sch->vpm == 0)) { int cc; cc = cio_clear(sch); @@ -256,8 +260,6 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) /* trigger path verification. */ if (sch->driver && sch->driver->verify) sch->driver->verify(&sch->dev); - else if (sch->vpm == mask) - goto out_unreg; out_unlock: spin_unlock_irq(&sch->lock); return 0; @@ -916,13 +918,12 @@ chp_measurement_read(struct kobject *kobj, char *buf, loff_t off, size_t count) chp = to_channelpath(container_of(kobj, struct device, kobj)); css = to_css(chp->dev.parent); - size = sizeof(struct cmg_entry); + size = sizeof(struct cmg_chars); /* Only allow single reads. */ if (off || count < size) return 0; chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id); - count = size; return count; } @@ -1391,8 +1392,10 @@ new_channel_path(int chpid) /* fill in status, etc. */ chp->id = chpid; chp->state = 1; - chp->dev.parent = &css[0]->device; - chp->dev.release = chp_release; + chp->dev = (struct device) { + .parent = &css[0]->device, + .release = chp_release, + }; snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp0.%x", chpid); /* Obtain channel path description and fill it in. */ @@ -1462,40 +1465,6 @@ chsc_get_chp_desc(struct subchannel *sch, int chp_no) return desc; } -static int reset_channel_path(struct channel_path *chp) -{ - int cc; - - cc = rchp(chp->id); - switch (cc) { - case 0: - return 0; - case 2: - return -EBUSY; - default: - return -ENODEV; - } -} - -static void reset_channel_paths_css(struct channel_subsystem *css) -{ - int i; - - for (i = 0; i <= __MAX_CHPID; i++) { - if (css->chps[i]) - reset_channel_path(css->chps[i]); - } -} - -void cio_reset_channel_paths(void) -{ - int i; - - for (i = 0; i <= __MAX_CSSID; i++) { - if (css[i] && css[i]->valid) - reset_channel_paths_css(css[i]); - } -} static int __init chsc_alloc_sei_area(void) diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 89320c1ad..5b20d8c9c 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -147,7 +148,7 @@ cio_tpi(void) sch->driver->irq(&sch->dev); spin_unlock(&sch->lock); irq_exit (); - _local_bh_enable(); + __local_bh_enable(); return 1; } @@ -519,7 +520,6 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid) memset(sch, 0, sizeof(struct subchannel)); spin_lock_init(&sch->lock); - mutex_init(&sch->reg_mutex); /* Set a name for the subchannel */ snprintf (sch->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", schid.ssid, @@ -798,7 +798,7 @@ struct subchannel * cio_get_console_subchannel(void) { if (!console_subchannel_in_use) - return NULL; + return 0; return &console_subchannel; } @@ -876,6 +876,5 @@ void reipl(unsigned long devno) { clear_all_subchannels(); - cio_reset_channel_paths(); do_reipl(devno); } diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 4541c1af4..0ca987344 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h @@ -2,7 +2,6 @@ #define S390_CIO_H #include "schid.h" -#include /* * where we put the ssd info @@ -88,7 +87,7 @@ struct orb { struct subchannel { struct subchannel_id schid; spinlock_t lock; /* subchannel lock */ - struct mutex reg_mutex; + enum { SUBCHANNEL_TYPE_IO = 0, SUBCHANNEL_TYPE_CHSC = 1, diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 828b2d334..07ef3f640 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c @@ -3,10 +3,9 @@ * * Linux on zSeries Channel Measurement Facility support * - * Copyright 2000,2006 IBM Corporation + * Copyright 2000,2003 IBM Corporation * - * Authors: Arnd Bergmann - * Cornelia Huck + * Author: Arnd Bergmann * * original idea from Natarajan Krishnaswami * @@ -97,9 +96,9 @@ module_param(format, bool, 0444); /** * struct cmb_operations - functions to use depending on cmb_format * - * Most of these functions operate on a struct ccw_device. There is only - * one instance of struct cmb_operations because the format of the measurement - * data is guaranteed to be the same for every ccw_device. + * all these functions operate on a struct cmf_device. There is only + * one instance of struct cmb_operations because all cmf_device + * objects are guaranteed to be of the same type. * * @alloc: allocate memory for a channel measurement block, * either with the help of a special pool or with kmalloc @@ -108,7 +107,6 @@ module_param(format, bool, 0444); * @readall: read a measurement block in a common format * @reset: clear the data in the associated measurement block and * reset its time stamp - * @align: align an allocated block so that the hardware can use it */ struct cmb_operations { int (*alloc) (struct ccw_device*); @@ -117,19 +115,11 @@ struct cmb_operations { u64 (*read) (struct ccw_device*, int); int (*readall)(struct ccw_device*, struct cmbdata *); void (*reset) (struct ccw_device*); - void * (*align) (void *); struct attribute_group *attr_group; }; static struct cmb_operations *cmbops; -struct cmb_data { - void *hw_block; /* Pointer to block updated by hardware */ - void *last_block; /* Last changed block copied from hardware block */ - int size; /* Size of hw_block and last_block */ - unsigned long long last_update; /* when last_block was updated */ -}; - /* our user interface is designed in terms of nanoseconds, * while the hardware measures total times in its own * unit.*/ @@ -236,229 +226,63 @@ struct set_schib_struct { unsigned long address; wait_queue_head_t wait; int ret; - struct kref kref; }; -static void cmf_set_schib_release(struct kref *kref) -{ - struct set_schib_struct *set_data; - - set_data = container_of(kref, struct set_schib_struct, kref); - kfree(set_data); -} - -#define CMF_PENDING 1 - static int set_schib_wait(struct ccw_device *cdev, u32 mme, int mbfc, unsigned long address) { - struct set_schib_struct *set_data; - int ret; + struct set_schib_struct s = { + .mme = mme, + .mbfc = mbfc, + .address = address, + .wait = __WAIT_QUEUE_HEAD_INITIALIZER(s.wait), + }; spin_lock_irq(cdev->ccwlock); - if (!cdev->private->cmb) { - ret = -ENODEV; - goto out; + s.ret = set_schib(cdev, mme, mbfc, address); + if (s.ret != -EBUSY) { + goto out_nowait; } - set_data = kzalloc(sizeof(struct set_schib_struct), GFP_ATOMIC); - if (!set_data) { - ret = -ENOMEM; - goto out; - } - init_waitqueue_head(&set_data->wait); - kref_init(&set_data->kref); - set_data->mme = mme; - set_data->mbfc = mbfc; - set_data->address = address; - - ret = set_schib(cdev, mme, mbfc, address); - if (ret != -EBUSY) - goto out_put; if (cdev->private->state != DEV_STATE_ONLINE) { + s.ret = -EBUSY; /* if the device is not online, don't even try again */ - ret = -EBUSY; - goto out_put; + goto out_nowait; } - cdev->private->state = DEV_STATE_CMFCHANGE; - set_data->ret = CMF_PENDING; - cdev->private->cmb_wait = set_data; + cdev->private->cmb_wait = &s; + s.ret = 1; spin_unlock_irq(cdev->ccwlock); - if (wait_event_interruptible(set_data->wait, - set_data->ret != CMF_PENDING)) { + if (wait_event_interruptible(s.wait, s.ret != 1)) { spin_lock_irq(cdev->ccwlock); - if (set_data->ret == CMF_PENDING) { - set_data->ret = -ERESTARTSYS; + if (s.ret == 1) { + s.ret = -ERESTARTSYS; + cdev->private->cmb_wait = 0; if (cdev->private->state == DEV_STATE_CMFCHANGE) cdev->private->state = DEV_STATE_ONLINE; } spin_unlock_irq(cdev->ccwlock); } - spin_lock_irq(cdev->ccwlock); - cdev->private->cmb_wait = NULL; - ret = set_data->ret; -out_put: - kref_put(&set_data->kref, cmf_set_schib_release); -out: + return s.ret; + +out_nowait: spin_unlock_irq(cdev->ccwlock); - return ret; + return s.ret; } void retry_set_schib(struct ccw_device *cdev) { - struct set_schib_struct *set_data; - - set_data = cdev->private->cmb_wait; - if (!set_data) { - WARN_ON(1); - return; - } - kref_get(&set_data->kref); - set_data->ret = set_schib(cdev, set_data->mme, set_data->mbfc, - set_data->address); - wake_up(&set_data->wait); - kref_put(&set_data->kref, cmf_set_schib_release); -} - -static int cmf_copy_block(struct ccw_device *cdev) -{ - struct subchannel *sch; - void *reference_buf; - void *hw_block; - struct cmb_data *cmb_data; - - sch = to_subchannel(cdev->dev.parent); - - if (stsch(sch->schid, &sch->schib)) - return -ENODEV; - - if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { - /* Don't copy if a start function is in progress. */ - if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) && - (sch->schib.scsw.actl & - (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && - (!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) - return -EBUSY; - } - cmb_data = cdev->private->cmb; - hw_block = cmbops->align(cmb_data->hw_block); - if (!memcmp(cmb_data->last_block, hw_block, cmb_data->size)) - /* No need to copy. */ - return 0; - reference_buf = kzalloc(cmb_data->size, GFP_ATOMIC); - if (!reference_buf) - return -ENOMEM; - /* Ensure consistency of block copied from hardware. */ - do { - memcpy(cmb_data->last_block, hw_block, cmb_data->size); - memcpy(reference_buf, hw_block, cmb_data->size); - } while (memcmp(cmb_data->last_block, reference_buf, cmb_data->size)); - cmb_data->last_update = get_clock(); - kfree(reference_buf); - return 0; -} - -struct copy_block_struct { - wait_queue_head_t wait; - int ret; - struct kref kref; -}; - -static void cmf_copy_block_release(struct kref *kref) -{ - struct copy_block_struct *copy_block; - - copy_block = container_of(kref, struct copy_block_struct, kref); - kfree(copy_block); -} - -static int cmf_cmb_copy_wait(struct ccw_device *cdev) -{ - struct copy_block_struct *copy_block; - int ret; - unsigned long flags; - - spin_lock_irqsave(cdev->ccwlock, flags); - if (!cdev->private->cmb) { - ret = -ENODEV; - goto out; - } - copy_block = kzalloc(sizeof(struct copy_block_struct), GFP_ATOMIC); - if (!copy_block) { - ret = -ENOMEM; - goto out; - } - init_waitqueue_head(©_block->wait); - kref_init(©_block->kref); - - ret = cmf_copy_block(cdev); - if (ret != -EBUSY) - goto out_put; - - if (cdev->private->state != DEV_STATE_ONLINE) { - ret = -EBUSY; - goto out_put; - } - - cdev->private->state = DEV_STATE_CMFUPDATE; - copy_block->ret = CMF_PENDING; - cdev->private->cmb_wait = copy_block; - - spin_unlock_irqrestore(cdev->ccwlock, flags); - if (wait_event_interruptible(copy_block->wait, - copy_block->ret != CMF_PENDING)) { - spin_lock_irqsave(cdev->ccwlock, flags); - if (copy_block->ret == CMF_PENDING) { - copy_block->ret = -ERESTARTSYS; - if (cdev->private->state == DEV_STATE_CMFUPDATE) - cdev->private->state = DEV_STATE_ONLINE; - } - spin_unlock_irqrestore(cdev->ccwlock, flags); - } - spin_lock_irqsave(cdev->ccwlock, flags); - cdev->private->cmb_wait = NULL; - ret = copy_block->ret; -out_put: - kref_put(©_block->kref, cmf_copy_block_release); -out: - spin_unlock_irqrestore(cdev->ccwlock, flags); - return ret; -} - -void cmf_retry_copy_block(struct ccw_device *cdev) -{ - struct copy_block_struct *copy_block; + struct set_schib_struct *s; - copy_block = cdev->private->cmb_wait; - if (!copy_block) { + s = cdev->private->cmb_wait; + cdev->private->cmb_wait = 0; + if (!s) { WARN_ON(1); return; } - kref_get(©_block->kref); - copy_block->ret = cmf_copy_block(cdev); - wake_up(©_block->wait); - kref_put(©_block->kref, cmf_copy_block_release); -} - -static void cmf_generic_reset(struct ccw_device *cdev) -{ - struct cmb_data *cmb_data; - - spin_lock_irq(cdev->ccwlock); - cmb_data = cdev->private->cmb; - if (cmb_data) { - memset(cmb_data->last_block, 0, cmb_data->size); - /* - * Need to reset hw block as well to make the hardware start - * from 0 again. - */ - memset(cmbops->align(cmb_data->hw_block), 0, cmb_data->size); - cmb_data->last_update = 0; - } - cdev->private->cmb_start_time = get_clock(); - spin_unlock_irq(cdev->ccwlock); + s->ret = set_schib(cdev, s->mme, s->mbfc, s->address); + wake_up(&s->wait); } /** @@ -519,8 +343,8 @@ struct cmb { /* insert a single device into the cmb_area list * called with cmb_area.lock held from alloc_cmb */ -static inline int alloc_cmb_single (struct ccw_device *cdev, - struct cmb_data *cmb_data) +static inline int +alloc_cmb_single (struct ccw_device *cdev) { struct cmb *cmb; struct ccw_device_private *node; @@ -534,12 +358,10 @@ static inline int alloc_cmb_single (struct ccw_device *cdev, /* find first unused cmb in cmb_area.mem. * this is a little tricky: cmb_area.list - * remains sorted by ->cmb->hw_data pointers */ + * remains sorted by ->cmb pointers */ cmb = cmb_area.mem; list_for_each_entry(node, &cmb_area.list, cmb_list) { - struct cmb_data *data; - data = node->cmb; - if ((struct cmb*)data->hw_block > cmb) + if ((struct cmb*)node->cmb > cmb) break; cmb++; } @@ -550,8 +372,7 @@ static inline int alloc_cmb_single (struct ccw_device *cdev, /* insert new cmb */ list_add_tail(&cdev->private->cmb_list, &node->cmb_list); - cmb_data->hw_block = cmb; - cdev->private->cmb = cmb_data; + cdev->private->cmb = cmb; ret = 0; out: spin_unlock_irq(cdev->ccwlock); @@ -564,19 +385,7 @@ alloc_cmb (struct ccw_device *cdev) int ret; struct cmb *mem; ssize_t size; - struct cmb_data *cmb_data; - - /* Allocate private cmb_data. */ - cmb_data = kzalloc(sizeof(struct cmb_data), GFP_KERNEL); - if (!cmb_data) - return -ENOMEM; - cmb_data->last_block = kzalloc(sizeof(struct cmb), GFP_KERNEL); - if (!cmb_data->last_block) { - kfree(cmb_data); - return -ENOMEM; - } - cmb_data->size = sizeof(struct cmb); spin_lock(&cmb_area.lock); if (!cmb_area.mem) { @@ -605,36 +414,29 @@ alloc_cmb (struct ccw_device *cdev) } /* do the actual allocation */ - ret = alloc_cmb_single(cdev, cmb_data); + ret = alloc_cmb_single(cdev); out: spin_unlock(&cmb_area.lock); - if (ret) { - kfree(cmb_data->last_block); - kfree(cmb_data); - } + return ret; } -static void free_cmb(struct ccw_device *cdev) +static void +free_cmb(struct ccw_device *cdev) { struct ccw_device_private *priv; - struct cmb_data *cmb_data; + + priv = cdev->private; spin_lock(&cmb_area.lock); spin_lock_irq(cdev->ccwlock); - priv = cdev->private; - if (list_empty(&priv->cmb_list)) { /* already freed */ goto out; } - cmb_data = priv->cmb; priv->cmb = NULL; - if (cmb_data) - kfree(cmb_data->last_block); - kfree(cmb_data); list_del_init(&priv->cmb_list); if (list_empty(&cmb_area.list)) { @@ -649,97 +451,83 @@ out: spin_unlock(&cmb_area.lock); } -static int set_cmb(struct ccw_device *cdev, u32 mme) +static int +set_cmb(struct ccw_device *cdev, u32 mme) { u16 offset; - struct cmb_data *cmb_data; - unsigned long flags; - spin_lock_irqsave(cdev->ccwlock, flags); - if (!cdev->private->cmb) { - spin_unlock_irqrestore(cdev->ccwlock, flags); + if (!cdev->private->cmb) return -EINVAL; - } - cmb_data = cdev->private->cmb; - offset = mme ? (struct cmb *)cmb_data->hw_block - cmb_area.mem : 0; - spin_unlock_irqrestore(cdev->ccwlock, flags); + + offset = mme ? (struct cmb *)cdev->private->cmb - cmb_area.mem : 0; return set_schib_wait(cdev, mme, 0, offset); } -static u64 read_cmb (struct ccw_device *cdev, int index) +static u64 +read_cmb (struct ccw_device *cdev, int index) { - struct cmb *cmb; - u32 val; - int ret; + /* yes, we have to put it on the stack + * because the cmb must only be accessed + * atomically, e.g. with mvc */ + struct cmb cmb; unsigned long flags; - - ret = cmf_cmb_copy_wait(cdev); - if (ret < 0) - return 0; + u32 val; spin_lock_irqsave(cdev->ccwlock, flags); if (!cdev->private->cmb) { - ret = 0; - goto out; + spin_unlock_irqrestore(cdev->ccwlock, flags); + return 0; } - cmb = ((struct cmb_data *)cdev->private->cmb)->last_block; + + cmb = *(struct cmb*)cdev->private->cmb; + spin_unlock_irqrestore(cdev->ccwlock, flags); switch (index) { case cmb_ssch_rsch_count: - ret = cmb->ssch_rsch_count; - goto out; + return cmb.ssch_rsch_count; case cmb_sample_count: - ret = cmb->sample_count; - goto out; + return cmb.sample_count; case cmb_device_connect_time: - val = cmb->device_connect_time; + val = cmb.device_connect_time; break; case cmb_function_pending_time: - val = cmb->function_pending_time; + val = cmb.function_pending_time; break; case cmb_device_disconnect_time: - val = cmb->device_disconnect_time; + val = cmb.device_disconnect_time; break; case cmb_control_unit_queuing_time: - val = cmb->control_unit_queuing_time; + val = cmb.control_unit_queuing_time; break; case cmb_device_active_only_time: - val = cmb->device_active_only_time; + val = cmb.device_active_only_time; break; default: - ret = 0; - goto out; + return 0; } - ret = time_to_avg_nsec(val, cmb->sample_count); -out: - spin_unlock_irqrestore(cdev->ccwlock, flags); - return ret; + return time_to_avg_nsec(val, cmb.sample_count); } -static int readall_cmb (struct ccw_device *cdev, struct cmbdata *data) +static int +readall_cmb (struct ccw_device *cdev, struct cmbdata *data) { - struct cmb *cmb; - struct cmb_data *cmb_data; - u64 time; + /* yes, we have to put it on the stack + * because the cmb must only be accessed + * atomically, e.g. with mvc */ + struct cmb cmb; unsigned long flags; - int ret; + u64 time; - ret = cmf_cmb_copy_wait(cdev); - if (ret < 0) - return ret; spin_lock_irqsave(cdev->ccwlock, flags); - cmb_data = cdev->private->cmb; - if (!cmb_data) { - ret = -ENODEV; - goto out; - } - if (cmb_data->last_update == 0) { - ret = -EAGAIN; - goto out; + if (!cdev->private->cmb) { + spin_unlock_irqrestore(cdev->ccwlock, flags); + return -ENODEV; } - cmb = cmb_data->last_block; - time = cmb_data->last_update - cdev->private->cmb_start_time; + + cmb = *(struct cmb*)cdev->private->cmb; + time = get_clock() - cdev->private->cmb_start_time; + spin_unlock_irqrestore(cdev->ccwlock, flags); memset(data, 0, sizeof(struct cmbdata)); @@ -750,32 +538,31 @@ static int readall_cmb (struct ccw_device *cdev, struct cmbdata *data) data->elapsed_time = (time * 1000) >> 12; /* copy data to new structure */ - data->ssch_rsch_count = cmb->ssch_rsch_count; - data->sample_count = cmb->sample_count; + data->ssch_rsch_count = cmb.ssch_rsch_count; + data->sample_count = cmb.sample_count; /* time fields are converted to nanoseconds while copying */ - data->device_connect_time = time_to_nsec(cmb->device_connect_time); - data->function_pending_time = time_to_nsec(cmb->function_pending_time); - data->device_disconnect_time = - time_to_nsec(cmb->device_disconnect_time); + data->device_connect_time = time_to_nsec(cmb.device_connect_time); + data->function_pending_time = time_to_nsec(cmb.function_pending_time); + data->device_disconnect_time = time_to_nsec(cmb.device_disconnect_time); data->control_unit_queuing_time - = time_to_nsec(cmb->control_unit_queuing_time); + = time_to_nsec(cmb.control_unit_queuing_time); data->device_active_only_time - = time_to_nsec(cmb->device_active_only_time); - ret = 0; -out: - spin_unlock_irqrestore(cdev->ccwlock, flags); - return ret; -} + = time_to_nsec(cmb.device_active_only_time); -static void reset_cmb(struct ccw_device *cdev) -{ - cmf_generic_reset(cdev); + return 0; } -static void * align_cmb(void *area) +static void +reset_cmb(struct ccw_device *cdev) { - return area; + struct cmb *cmb; + spin_lock_irq(cdev->ccwlock); + cmb = cdev->private->cmb; + if (cmb) + memset (cmb, 0, sizeof (*cmb)); + cdev->private->cmb_start_time = get_clock(); + spin_unlock_irq(cdev->ccwlock); } static struct attribute_group cmf_attr_group; @@ -787,7 +574,6 @@ static struct cmb_operations cmbops_basic = { .read = read_cmb, .readall = readall_cmb, .reset = reset_cmb, - .align = align_cmb, .attr_group = &cmf_attr_group, }; @@ -824,34 +610,22 @@ static inline struct cmbe* cmbe_align(struct cmbe *c) return (struct cmbe*)addr; } -static int alloc_cmbe (struct ccw_device *cdev) +static int +alloc_cmbe (struct ccw_device *cdev) { struct cmbe *cmbe; - struct cmb_data *cmb_data; - int ret; - - cmbe = kzalloc (sizeof (*cmbe) * 2, GFP_KERNEL); + cmbe = kmalloc (sizeof (*cmbe) * 2, GFP_KERNEL); if (!cmbe) return -ENOMEM; - cmb_data = kzalloc(sizeof(struct cmb_data), GFP_KERNEL); - if (!cmb_data) { - ret = -ENOMEM; - goto out_free; - } - cmb_data->last_block = kzalloc(sizeof(struct cmbe), GFP_KERNEL); - if (!cmb_data->last_block) { - ret = -ENOMEM; - goto out_free; - } - cmb_data->size = sizeof(struct cmbe); + spin_lock_irq(cdev->ccwlock); if (cdev->private->cmb) { + kfree(cmbe); spin_unlock_irq(cdev->ccwlock); - ret = -EBUSY; - goto out_free; + return -EBUSY; } - cmb_data->hw_block = cmbe; - cdev->private->cmb = cmb_data; + + cdev->private->cmb = cmbe; spin_unlock_irq(cdev->ccwlock); /* activate global measurement if this is the first channel */ @@ -862,24 +636,14 @@ static int alloc_cmbe (struct ccw_device *cdev) spin_unlock(&cmb_area.lock); return 0; -out_free: - if (cmb_data) - kfree(cmb_data->last_block); - kfree(cmb_data); - kfree(cmbe); - return ret; } -static void free_cmbe (struct ccw_device *cdev) +static void +free_cmbe (struct ccw_device *cdev) { - struct cmb_data *cmb_data; - spin_lock_irq(cdev->ccwlock); - cmb_data = cdev->private->cmb; + kfree(cdev->private->cmb); cdev->private->cmb = NULL; - if (cmb_data) - kfree(cmb_data->last_block); - kfree(cmb_data); spin_unlock_irq(cdev->ccwlock); /* deactivate global measurement if this is the last channel */ @@ -890,105 +654,89 @@ static void free_cmbe (struct ccw_device *cdev) spin_unlock(&cmb_area.lock); } -static int set_cmbe(struct ccw_device *cdev, u32 mme) +static int +set_cmbe(struct ccw_device *cdev, u32 mme) { unsigned long mba; - struct cmb_data *cmb_data; - unsigned long flags; - spin_lock_irqsave(cdev->ccwlock, flags); - if (!cdev->private->cmb) { - spin_unlock_irqrestore(cdev->ccwlock, flags); + if (!cdev->private->cmb) return -EINVAL; - } - cmb_data = cdev->private->cmb; - mba = mme ? (unsigned long) cmbe_align(cmb_data->hw_block) : 0; - spin_unlock_irqrestore(cdev->ccwlock, flags); + mba = mme ? (unsigned long) cmbe_align(cdev->private->cmb) : 0; return set_schib_wait(cdev, mme, 1, mba); } -static u64 read_cmbe (struct ccw_device *cdev, int index) +u64 +read_cmbe (struct ccw_device *cdev, int index) { - struct cmbe *cmb; - struct cmb_data *cmb_data; - u32 val; - int ret; + /* yes, we have to put it on the stack + * because the cmb must only be accessed + * atomically, e.g. with mvc */ + struct cmbe cmb; unsigned long flags; - - ret = cmf_cmb_copy_wait(cdev); - if (ret < 0) - return 0; + u32 val; spin_lock_irqsave(cdev->ccwlock, flags); - cmb_data = cdev->private->cmb; - if (!cmb_data) { - ret = 0; - goto out; + if (!cdev->private->cmb) { + spin_unlock_irqrestore(cdev->ccwlock, flags); + return 0; } - cmb = cmb_data->last_block; + + cmb = *cmbe_align(cdev->private->cmb); + spin_unlock_irqrestore(cdev->ccwlock, flags); switch (index) { case cmb_ssch_rsch_count: - ret = cmb->ssch_rsch_count; - goto out; + return cmb.ssch_rsch_count; case cmb_sample_count: - ret = cmb->sample_count; - goto out; + return cmb.sample_count; case cmb_device_connect_time: - val = cmb->device_connect_time; + val = cmb.device_connect_time; break; case cmb_function_pending_time: - val = cmb->function_pending_time; + val = cmb.function_pending_time; break; case cmb_device_disconnect_time: - val = cmb->device_disconnect_time; + val = cmb.device_disconnect_time; break; case cmb_control_unit_queuing_time: - val = cmb->control_unit_queuing_time; + val = cmb.control_unit_queuing_time; break; case cmb_device_active_only_time: - val = cmb->device_active_only_time; + val = cmb.device_active_only_time; break; case cmb_device_busy_time: - val = cmb->device_busy_time; + val = cmb.device_busy_time; break; case cmb_initial_command_response_time: - val = cmb->initial_command_response_time; + val = cmb.initial_command_response_time; break; default: - ret = 0; - goto out; + return 0; } - ret = time_to_avg_nsec(val, cmb->sample_count); -out: - spin_unlock_irqrestore(cdev->ccwlock, flags); - return ret; + return time_to_avg_nsec(val, cmb.sample_count); } -static int readall_cmbe (struct ccw_device *cdev, struct cmbdata *data) +static int +readall_cmbe (struct ccw_device *cdev, struct cmbdata *data) { - struct cmbe *cmb; - struct cmb_data *cmb_data; - u64 time; + /* yes, we have to put it on the stack + * because the cmb must only be accessed + * atomically, e.g. with mvc */ + struct cmbe cmb; unsigned long flags; - int ret; + u64 time; - ret = cmf_cmb_copy_wait(cdev); - if (ret < 0) - return ret; spin_lock_irqsave(cdev->ccwlock, flags); - cmb_data = cdev->private->cmb; - if (!cmb_data) { - ret = -ENODEV; - goto out; - } - if (cmb_data->last_update == 0) { - ret = -EAGAIN; - goto out; + if (!cdev->private->cmb) { + spin_unlock_irqrestore(cdev->ccwlock, flags); + return -ENODEV; } - time = cmb_data->last_update - cdev->private->cmb_start_time; + + cmb = *cmbe_align(cdev->private->cmb); + time = get_clock() - cdev->private->cmb_start_time; + spin_unlock_irqrestore(cdev->ccwlock, flags); memset (data, 0, sizeof(struct cmbdata)); @@ -998,38 +746,35 @@ static int readall_cmbe (struct ccw_device *cdev, struct cmbdata *data) /* conver to nanoseconds */ data->elapsed_time = (time * 1000) >> 12; - cmb = cmb_data->last_block; /* copy data to new structure */ - data->ssch_rsch_count = cmb->ssch_rsch_count; - data->sample_count = cmb->sample_count; + data->ssch_rsch_count = cmb.ssch_rsch_count; + data->sample_count = cmb.sample_count; /* time fields are converted to nanoseconds while copying */ - data->device_connect_time = time_to_nsec(cmb->device_connect_time); - data->function_pending_time = time_to_nsec(cmb->function_pending_time); - data->device_disconnect_time = - time_to_nsec(cmb->device_disconnect_time); + data->device_connect_time = time_to_nsec(cmb.device_connect_time); + data->function_pending_time = time_to_nsec(cmb.function_pending_time); + data->device_disconnect_time = time_to_nsec(cmb.device_disconnect_time); data->control_unit_queuing_time - = time_to_nsec(cmb->control_unit_queuing_time); + = time_to_nsec(cmb.control_unit_queuing_time); data->device_active_only_time - = time_to_nsec(cmb->device_active_only_time); - data->device_busy_time = time_to_nsec(cmb->device_busy_time); + = time_to_nsec(cmb.device_active_only_time); + data->device_busy_time = time_to_nsec(cmb.device_busy_time); data->initial_command_response_time - = time_to_nsec(cmb->initial_command_response_time); - - ret = 0; -out: - spin_unlock_irqrestore(cdev->ccwlock, flags); - return ret; -} + = time_to_nsec(cmb.initial_command_response_time); -static void reset_cmbe(struct ccw_device *cdev) -{ - cmf_generic_reset(cdev); + return 0; } -static void * align_cmbe(void *area) +static void +reset_cmbe(struct ccw_device *cdev) { - return cmbe_align(area); + struct cmbe *cmb; + spin_lock_irq(cdev->ccwlock); + cmb = cmbe_align(cdev->private->cmb); + if (cmb) + memset (cmb, 0, sizeof (*cmb)); + cdev->private->cmb_start_time = get_clock(); + spin_unlock_irq(cdev->ccwlock); } static struct attribute_group cmf_attr_group_ext; @@ -1041,7 +786,6 @@ static struct cmb_operations cmbops_extended = { .read = read_cmbe, .readall = readall_cmbe, .reset = reset_cmbe, - .align = align_cmbe, .attr_group = &cmf_attr_group_ext, }; @@ -1059,20 +803,14 @@ cmb_show_avg_sample_interval(struct device *dev, struct device_attribute *attr, struct ccw_device *cdev; long interval; unsigned long count; - struct cmb_data *cmb_data; cdev = to_ccwdev(dev); + interval = get_clock() - cdev->private->cmb_start_time; count = cmf_read(cdev, cmb_sample_count); - spin_lock_irq(cdev->ccwlock); - cmb_data = cdev->private->cmb; - if (count) { - interval = cmb_data->last_update - - cdev->private->cmb_start_time; - interval = (interval * 1000) >> 12; + if (count) interval /= count; - } else + else interval = -1; - spin_unlock_irq(cdev->ccwlock); return sprintf(buf, "%ld\n", interval); } @@ -1085,10 +823,7 @@ cmb_show_avg_utilization(struct device *dev, struct device_attribute *attr, char int ret; ret = cmf_readall(to_ccwdev(dev), &data); - if (ret == -EAGAIN || ret == -ENODEV) - /* No data (yet/currently) available to use for calculation. */ - return sprintf(buf, "n/a\n"); - else if (ret) + if (ret) return ret; utilization = data.device_connect_time + @@ -1141,7 +876,7 @@ static struct attribute *cmf_attributes[] = { &dev_attr_avg_device_disconnect_time.attr, &dev_attr_avg_control_unit_queuing_time.attr, &dev_attr_avg_device_active_only_time.attr, - NULL, + 0, }; static struct attribute_group cmf_attr_group = { @@ -1161,7 +896,7 @@ static struct attribute *cmf_attributes_ext[] = { &dev_attr_avg_device_active_only_time.attr, &dev_attr_avg_device_busy_time.attr, &dev_attr_avg_initial_command_response_time.attr, - NULL, + 0, }; static struct attribute_group cmf_attr_group_ext = { @@ -1247,13 +982,6 @@ cmf_readall(struct ccw_device *cdev, struct cmbdata *data) return cmbops->readall(cdev, data); } -/* Reenable cmf when a disconnected device becomes available again. */ -int cmf_reenable(struct ccw_device *cdev) -{ - cmbops->reset(cdev); - return cmbops->set(cdev, 2); -} - static int __init init_cmf(void) { diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 13eeea3d5..74ea8aac4 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -19,11 +19,9 @@ #include "cio_debug.h" #include "ioasm.h" #include "chsc.h" -#include "device.h" int need_rescan = 0; int css_init_done = 0; -static int need_reprobe = 0; static int max_ssid = 0; struct channel_subsystem *css[__MAX_CSSID + 1]; @@ -108,24 +106,6 @@ css_subchannel_release(struct device *dev) extern int css_get_ssd_info(struct subchannel *sch); - -int css_sch_device_register(struct subchannel *sch) -{ - int ret; - - mutex_lock(&sch->reg_mutex); - ret = device_register(&sch->dev); - mutex_unlock(&sch->reg_mutex); - return ret; -} - -void css_sch_device_unregister(struct subchannel *sch) -{ - mutex_lock(&sch->reg_mutex); - device_unregister(&sch->dev); - mutex_unlock(&sch->reg_mutex); -} - static int css_register_subchannel(struct subchannel *sch) { @@ -137,7 +117,7 @@ css_register_subchannel(struct subchannel *sch) sch->dev.release = &css_subchannel_release; /* make it known to the system */ - ret = css_sch_device_register(sch); + ret = device_register(&sch->dev); if (ret) printk (KERN_WARNING "%s: could not register %s\n", __func__, sch->dev.bus_id); @@ -268,7 +248,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow) * The device will be killed automatically. */ cio_disable_subchannel(sch); - css_sch_device_unregister(sch); + device_unregister(&sch->dev); /* Reset intparm to zeroes. */ sch->schib.pmcw.intparm = 0; cio_modify(sch); @@ -282,7 +262,7 @@ css_evaluate_subchannel(struct subchannel_id schid, int slow) * away in any case. */ if (!disc) { - css_sch_device_unregister(sch); + device_unregister(&sch->dev); /* Reset intparm to zeroes. */ sch->schib.pmcw.intparm = 0; cio_modify(sch); @@ -359,67 +339,6 @@ typedef void (*workfunc)(void *); DECLARE_WORK(slow_path_work, (workfunc)css_trigger_slow_path, NULL); struct workqueue_struct *slow_path_wq; -/* Reprobe subchannel if unregistered. */ -static int reprobe_subchannel(struct subchannel_id schid, void *data) -{ - struct subchannel *sch; - int ret; - - CIO_DEBUG(KERN_INFO, 6, "cio: reprobe 0.%x.%04x\n", - schid.ssid, schid.sch_no); - if (need_reprobe) - return -EAGAIN; - - sch = get_subchannel_by_schid(schid); - if (sch) { - /* Already known. */ - put_device(&sch->dev); - return 0; - } - - ret = css_probe_device(schid); - switch (ret) { - case 0: - break; - case -ENXIO: - case -ENOMEM: - /* These should abort looping */ - break; - default: - ret = 0; - } - - return ret; -} - -/* Work function used to reprobe all unregistered subchannels. */ -static void reprobe_all(void *data) -{ - int ret; - - CIO_MSG_EVENT(2, "reprobe start\n"); - - need_reprobe = 0; - /* Make sure initial subchannel scan is done. */ - wait_event(ccw_device_init_wq, - atomic_read(&ccw_device_init_count) == 0); - ret = for_each_subchannel(reprobe_subchannel, NULL); - - CIO_MSG_EVENT(2, "reprobe done (rc=%d, need_reprobe=%d)\n", ret, - need_reprobe); -} - -DECLARE_WORK(css_reprobe_work, reprobe_all, NULL); - -/* Schedule reprobing of all unregistered subchannels. */ -void css_schedule_reprobe(void) -{ - need_reprobe = 1; - queue_work(ccw_device_work, &css_reprobe_work); -} - -EXPORT_SYMBOL_GPL(css_schedule_reprobe); - /* * Rescan for new devices. FIXME: This is slow. * This function is called when we have lost CRWs due to overflows and we have @@ -623,13 +542,9 @@ init_channel_subsystem (void) ret = device_register(&css[i]->device); if (ret) goto out_free; - if (css_characteristics_avail && - css_chsc_characteristics.secm) { - ret = device_create_file(&css[i]->device, - &dev_attr_cm_enable); - if (ret) - goto out_device; - } + if (css_characteristics_avail && css_chsc_characteristics.secm) + device_create_file(&css[i]->device, + &dev_attr_cm_enable); } css_init_done = 1; @@ -637,8 +552,6 @@ init_channel_subsystem (void) for_each_subchannel(__init_channel_subsystem, NULL); return 0; -out_device: - device_unregister(&css[i]->device); out_free: kfree(css[i]); out_unregister: diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 8aabb4ade..e210f89a2 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h @@ -100,7 +100,7 @@ struct ccw_device_private { struct qdio_irq *qdio_data; struct irb irb; /* device status */ struct senseid senseid; /* SenseID info */ - struct pgid pgid[8]; /* path group IDs per chpid*/ + struct pgid pgid; /* path group ID */ struct ccw1 iccws[2]; /* ccws for SNID/SID/SPGID commands */ struct work_struct kick_work; wait_queue_head_t wait_q; @@ -136,8 +136,6 @@ extern struct bus_type css_bus_type; extern struct css_driver io_subchannel_driver; extern int css_probe_device(struct subchannel_id); -extern int css_sch_device_register(struct subchannel *); -extern void css_sch_device_unregister(struct subchannel *); extern struct subchannel * get_subchannel_by_schid(struct subchannel_id); extern int css_init_done; extern int for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *); diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 646da5640..8e3053c2a 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -8,6 +8,7 @@ * Cornelia Huck (cornelia.huck@de.ibm.com) * Martin Schwidefsky (schwidefsky@de.ibm.com) */ +#include #include #include #include @@ -100,7 +101,7 @@ ccw_uevent (struct device *dev, char **envp, int num_envp, if ((buffer_size - length <= 0) || (i >= num_envp)) return -ENOMEM; - envp[i] = NULL; + envp[i] = 0; return 0; } @@ -132,8 +133,8 @@ struct css_driver io_subchannel_driver = { struct workqueue_struct *ccw_device_work; struct workqueue_struct *ccw_device_notify_work; -wait_queue_head_t ccw_device_init_wq; -atomic_t ccw_device_init_count; +static wait_queue_head_t ccw_device_init_wq; +static atomic_t ccw_device_init_count; static int __init init_ccw_bus_type (void) @@ -280,7 +281,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev) * 'throw away device'. */ sch = to_subchannel(cdev->dev.parent); - css_sch_device_unregister(sch); + device_unregister(&sch->dev); /* Reset intparm to zeroes. */ sch->schib.pmcw.intparm = 0; cio_modify(sch); @@ -556,11 +557,12 @@ get_disc_ccwdev_by_devno(unsigned int devno, unsigned int ssid, struct ccw_device *sibling) { struct device *dev; - struct match_data data; + struct match_data data = { + .devno = devno, + .ssid = ssid, + .sibling = sibling, + }; - data.devno = devno; - data.ssid = ssid; - data.sibling = sibling; dev = bus_find_device(&ccw_bus_type, NULL, &data, match_devno); return dev ? to_ccwdev(dev) : NULL; @@ -624,7 +626,7 @@ ccw_device_do_unreg_rereg(void *data) other_sch->schib.pmcw.intparm = 0; cio_modify(other_sch); } - css_sch_device_unregister(other_sch); + device_unregister(&other_sch->dev); } } /* Update ssd info here. */ @@ -708,7 +710,7 @@ ccw_device_call_sch_unregister(void *data) struct subchannel *sch; sch = to_subchannel(cdev->dev.parent); - css_sch_device_unregister(sch); + device_unregister(&sch->dev); /* Reset intparm to zeroes. */ sch->schib.pmcw.intparm = 0; cio_modify(sch); @@ -834,8 +836,10 @@ io_subchannel_probe (struct subchannel *sch) return -ENOMEM; } atomic_set(&cdev->private->onoff, 0); - cdev->dev.parent = &sch->dev; - cdev->dev.release = ccw_device_release; + cdev->dev = (struct device) { + .parent = &sch->dev, + .release = ccw_device_release, + }; INIT_LIST_HEAD(&cdev->private->kick_work.entry); /* Do first half of device_register. */ device_initialize(&cdev->dev); @@ -974,7 +978,9 @@ ccw_device_console_enable (struct ccw_device *cdev, struct subchannel *sch) int rc; /* Initialize the ccw_device structure. */ - cdev->dev.parent= &sch->dev; + cdev->dev = (struct device) { + .parent = &sch->dev, + }; rc = io_subchannel_recog(cdev, sch); if (rc) return rc; @@ -1052,7 +1058,7 @@ get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id) __ccwdev_check_busid); put_driver(drv); - return dev ? to_ccwdev(dev) : NULL; + return dev ? to_ccwdev(dev) : 0; } /************************** device driver handling ************************/ @@ -1077,7 +1083,7 @@ ccw_device_probe (struct device *dev) ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; if (ret) { - cdev->drv = NULL; + cdev->drv = 0; return ret; } @@ -1108,7 +1114,7 @@ ccw_device_remove (struct device *dev) ret, cdev->dev.bus_id); } ccw_device_set_timeout(cdev, 0); - cdev->drv = NULL; + cdev->drv = 0; return 0; } diff --git a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h index 00be9a5b4..11587ebb7 100644 --- a/drivers/s390/cio/device.h +++ b/drivers/s390/cio/device.h @@ -1,10 +1,6 @@ #ifndef S390_DEVICE_H #define S390_DEVICE_H -#include -#include -#include - /* * states of the device statemachine */ @@ -27,7 +23,6 @@ enum dev_state { DEV_STATE_DISCONNECTED, DEV_STATE_DISCONNECTED_SENSE_ID, DEV_STATE_CMFCHANGE, - DEV_STATE_CMFUPDATE, /* last element! */ NR_DEV_STATES }; @@ -72,8 +67,6 @@ dev_fsm_final_state(struct ccw_device *cdev) extern struct workqueue_struct *ccw_device_work; extern struct workqueue_struct *ccw_device_notify_work; -extern wait_queue_head_t ccw_device_init_wq; -extern atomic_t ccw_device_init_count; void io_subchannel_recog_done(struct ccw_device *cdev); @@ -119,8 +112,5 @@ int ccw_device_stlck(struct ccw_device *); void ccw_device_set_timeout(struct ccw_device *, int); extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *); -/* Channel measurement facility related */ void retry_set_schib(struct ccw_device *cdev); -void cmf_retry_copy_block(struct ccw_device *); -int cmf_reenable(struct ccw_device *); #endif diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 35e162ba6..49ec562d7 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -152,8 +153,7 @@ ccw_device_cancel_halt_clear(struct ccw_device *cdev) if (cdev->private->iretry) { cdev->private->iretry--; ret = cio_halt(sch); - if (ret != -EBUSY) - return (ret == 0) ? -EBUSY : ret; + return (ret == 0) ? -EBUSY : ret; } /* halt io unsuccessful. */ cdev->private->iretry = 255; /* 255 clear retries. */ @@ -267,10 +267,12 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) notify = 1; } /* fill out sense information */ - cdev->id.cu_type = cdev->private->senseid.cu_type; - cdev->id.cu_model = cdev->private->senseid.cu_model; - cdev->id.dev_type = cdev->private->senseid.dev_type; - cdev->id.dev_model = cdev->private->senseid.dev_model; + cdev->id = (struct ccw_device_id) { + .cu_type = cdev->private->senseid.cu_type, + .cu_model = cdev->private->senseid.cu_model, + .dev_type = cdev->private->senseid.dev_type, + .dev_model = cdev->private->senseid.dev_model, + }; if (notify) { cdev->private->state = DEV_STATE_OFFLINE; if (same_dev) { @@ -334,11 +336,8 @@ ccw_device_oper_notify(void *data) if (!ret) /* Driver doesn't want device back. */ ccw_device_do_unreg_rereg((void *)cdev); - else { - /* Reenable channel measurements, if needed. */ - cmf_reenable(cdev); + else wake_up(&cdev->private->wait_q); - } } /* @@ -377,56 +376,6 @@ ccw_device_done(struct ccw_device *cdev, int state) put_device (&cdev->dev); } -static inline int cmp_pgid(struct pgid *p1, struct pgid *p2) -{ - char *c1; - char *c2; - - c1 = (char *)p1; - c2 = (char *)p2; - - return memcmp(c1 + 1, c2 + 1, sizeof(struct pgid) - 1); -} - -static void __ccw_device_get_common_pgid(struct ccw_device *cdev) -{ - int i; - int last; - - last = 0; - for (i = 0; i < 8; i++) { - if (cdev->private->pgid[i].inf.ps.state1 == SNID_STATE1_RESET) - /* No PGID yet */ - continue; - if (cdev->private->pgid[last].inf.ps.state1 == - SNID_STATE1_RESET) { - /* First non-zero PGID */ - last = i; - continue; - } - if (cmp_pgid(&cdev->private->pgid[i], - &cdev->private->pgid[last]) == 0) - /* Non-conflicting PGIDs */ - continue; - - /* PGID mismatch, can't pathgroup. */ - CIO_MSG_EVENT(0, "SNID - pgid mismatch for device " - "0.%x.%04x, can't pathgroup\n", - cdev->private->ssid, cdev->private->devno); - cdev->private->options.pgroup = 0; - return; - } - if (cdev->private->pgid[last].inf.ps.state1 == - SNID_STATE1_RESET) - /* No previous pgid found */ - memcpy(&cdev->private->pgid[0], &css[0]->global_pgid, - sizeof(struct pgid)); - else - /* Use existing pgid */ - memcpy(&cdev->private->pgid[0], &cdev->private->pgid[last], - sizeof(struct pgid)); -} - /* * Function called from device_pgid.c after sense path ground has completed. */ @@ -437,26 +386,24 @@ ccw_device_sense_pgid_done(struct ccw_device *cdev, int err) sch = to_subchannel(cdev->dev.parent); switch (err) { - case -EOPNOTSUPP: /* path grouping not supported, use nop instead. */ - cdev->private->options.pgroup = 0; - break; - case 0: /* success */ - case -EACCES: /* partial success, some paths not operational */ - /* Check if all pgids are equal or 0. */ - __ccw_device_get_common_pgid(cdev); + case 0: + /* Start Path Group verification. */ + sch->vpm = 0; /* Start with no path groups set. */ + cdev->private->state = DEV_STATE_VERIFY; + ccw_device_verify_start(cdev); break; case -ETIME: /* Sense path group id stopped by timeout. */ case -EUSERS: /* device is reserved for someone else. */ ccw_device_done(cdev, DEV_STATE_BOXED); - return; + break; + case -EOPNOTSUPP: /* path grouping not supported, just set online. */ + cdev->private->options.pgroup = 0; + ccw_device_done(cdev, DEV_STATE_ONLINE); + break; default: ccw_device_done(cdev, DEV_STATE_NOT_OPER); - return; + break; } - /* Start Path Group verification. */ - sch->vpm = 0; /* Start with no path groups set. */ - cdev->private->state = DEV_STATE_VERIFY; - ccw_device_verify_start(cdev); } /* @@ -564,10 +511,12 @@ ccw_device_verify_done(struct ccw_device *cdev, int err) /* Deliver fake irb to device driver, if needed. */ if (cdev->private->flags.fake_irb) { memset(&cdev->private->irb, 0, sizeof(struct irb)); - cdev->private->irb.scsw.cc = 1; - cdev->private->irb.scsw.fctl = SCSW_FCTL_START_FUNC; - cdev->private->irb.scsw.actl = SCSW_ACTL_START_PEND; - cdev->private->irb.scsw.stctl = SCSW_STCTL_STATUS_PEND; + cdev->private->irb.scsw = (struct scsw) { + .cc = 1, + .fctl = SCSW_FCTL_START_FUNC, + .actl = SCSW_ACTL_START_PEND, + .stctl = SCSW_STCTL_STATUS_PEND, + }; cdev->private->flags.fake_irb = 0; if (cdev->handler) cdev->handler(cdev, cdev->private->intparm, @@ -611,9 +560,8 @@ ccw_device_online(struct ccw_device *cdev) } /* Do we want to do path grouping? */ if (!cdev->private->options.pgroup) { - /* Start initial path verification. */ - cdev->private->state = DEV_STATE_VERIFY; - ccw_device_verify_start(cdev); + /* No, set state online immediately. */ + ccw_device_done(cdev, DEV_STATE_ONLINE); return 0; } /* Do a SensePGID first. */ @@ -659,7 +607,6 @@ ccw_device_offline(struct ccw_device *cdev) /* Are we doing path grouping? */ if (!cdev->private->options.pgroup) { /* No, set state offline immediately. */ - sch->vpm = 0; ccw_device_done(cdev, DEV_STATE_OFFLINE); return 0; } @@ -756,6 +703,8 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event) { struct subchannel *sch; + if (!cdev->private->options.pgroup) + return; if (cdev->private->state == DEV_STATE_W4SENSE) { cdev->private->flags.doverify = 1; return; @@ -768,7 +717,6 @@ ccw_device_online_verify(struct ccw_device *cdev, enum dev_event dev_event) stsch(sch->schid, &sch->schib); if (sch->schib.scsw.actl != 0 || - (sch->schib.scsw.stctl & SCSW_STCTL_STATUS_PEND) || (cdev->private->irb.scsw.stctl & SCSW_STCTL_STATUS_PEND)) { /* * No final status yet or final status not yet delivered @@ -913,8 +861,6 @@ ccw_device_clear_verify(struct ccw_device *cdev, enum dev_event dev_event) irb = (struct irb *) __LC_IRB; /* Accumulate status. We don't do basic sense. */ ccw_device_accumulate_irb(cdev, irb); - /* Remember to clear irb to avoid residuals. */ - memset(&cdev->private->irb, 0, sizeof(struct irb)); /* Try to start delayed device verification. */ ccw_device_online_verify(cdev, 0); /* Note: Don't call handler for cio initiated clear! */ @@ -1045,7 +991,8 @@ static void ccw_device_wait4io_verify(struct ccw_device *cdev, enum dev_event dev_event) { /* When the I/O has terminated, we have to start verification. */ - cdev->private->flags.doverify = 1; + if (cdev->private->options.pgroup) + cdev->private->flags.doverify = 1; } static void @@ -1146,13 +1093,6 @@ ccw_device_change_cmfstate(struct ccw_device *cdev, enum dev_event dev_event) dev_fsm_event(cdev, dev_event); } -static void ccw_device_update_cmfblock(struct ccw_device *cdev, - enum dev_event dev_event) -{ - cmf_retry_copy_block(cdev); - cdev->private->state = DEV_STATE_ONLINE; - dev_fsm_event(cdev, dev_event); -} static void ccw_device_quiesce_done(struct ccw_device *cdev, enum dev_event dev_event) @@ -1307,12 +1247,6 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = { [DEV_EVENT_TIMEOUT] = ccw_device_change_cmfstate, [DEV_EVENT_VERIFY] = ccw_device_change_cmfstate, }, - [DEV_STATE_CMFUPDATE] = { - [DEV_EVENT_NOTOPER] = ccw_device_update_cmfblock, - [DEV_EVENT_INTERRUPT] = ccw_device_update_cmfblock, - [DEV_EVENT_TIMEOUT] = ccw_device_update_cmfblock, - [DEV_EVENT_VERIFY] = ccw_device_update_cmfblock, - }, }; /* diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index 438db4830..e60b2d810 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 9e3de0bd5..795abb5a6 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c @@ -6,6 +6,7 @@ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) * Cornelia Huck (cornelia.huck@de.ibm.com) */ +#include #include #include #include @@ -77,8 +78,7 @@ ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, return -ENODEV; if (cdev->private->state == DEV_STATE_NOT_OPER) return -ENODEV; - if (cdev->private->state == DEV_STATE_VERIFY || - cdev->private->state == DEV_STATE_CLEAR_VERIFY) { + if (cdev->private->state == DEV_STATE_VERIFY) { /* Remember to fake irb when finished. */ if (!cdev->private->flags.fake_irb) { cdev->private->flags.fake_irb = 1; @@ -263,9 +263,6 @@ ccw_device_wake_up(struct ccw_device *cdev, unsigned long ip, struct irb *irb) /* Abuse intparm for error reporting. */ if (IS_ERR(irb)) cdev->private->intparm = -EIO; - else if (irb->scsw.cc == 1) - /* Retry for deferred condition code. */ - cdev->private->intparm = -EAGAIN; else if ((irb->scsw.dstat != (DEV_STAT_CHN_END|DEV_STAT_DEV_END)) || (irb->scsw.cstat != 0)) { @@ -273,8 +270,7 @@ ccw_device_wake_up(struct ccw_device *cdev, unsigned long ip, struct irb *irb) * We didn't get channel end / device end. Check if path * verification has been started; we can retry after it has * finished. We also retry unit checks except for command reject - * or intervention required. Also check for long busy - * conditions. + * or intervention required. */ if (cdev->private->flags.doverify || cdev->private->state == DEV_STATE_VERIFY) @@ -283,10 +279,6 @@ ccw_device_wake_up(struct ccw_device *cdev, unsigned long ip, struct irb *irb) !(irb->ecw[0] & (SNS0_CMD_REJECT | SNS0_INTERVENTION_REQ))) cdev->private->intparm = -EAGAIN; - else if ((irb->scsw.dstat & DEV_STAT_ATTENTION) && - (irb->scsw.dstat & DEV_STAT_DEV_END) && - (irb->scsw.dstat & DEV_STAT_UNIT_EXCEP)) - cdev->private->intparm = -EAGAIN; else cdev->private->intparm = -EIO; diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 1693a102d..85b1020a1 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c @@ -9,6 +9,7 @@ * Path Group ID functions. */ +#include #include #include @@ -23,21 +24,6 @@ #include "device.h" #include "ioasm.h" -/* - * Helper function called from interrupt context to decide whether an - * operation should be tried again. - */ -static int __ccw_device_should_retry(struct scsw *scsw) -{ - /* CC is only valid if start function bit is set. */ - if ((scsw->fctl & SCSW_FCTL_START_FUNC) && scsw->cc == 1) - return 1; - /* No more activity. For sense and set PGID we stubbornly try again. */ - if (!scsw->actl) - return 1; - return 0; -} - /* * Start Sense Path Group ID helper function. Used in ccw_device_recog * and ccw_device_sense_pgid. @@ -48,17 +34,12 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev) struct subchannel *sch; struct ccw1 *ccw; int ret; - int i; sch = to_subchannel(cdev->dev.parent); - /* Return if we already checked on all paths. */ - if (cdev->private->imask == 0) - return (sch->lpm == 0) ? -ENODEV : -EACCES; - i = 8 - ffs(cdev->private->imask); - /* Setup sense path group id channel program. */ ccw = cdev->private->iccws; ccw->cmd_code = CCW_CMD_SENSE_PGID; + ccw->cda = (__u32) __pa (&cdev->private->pgid); ccw->count = sizeof (struct pgid); ccw->flags = CCW_FLAG_SLI; @@ -68,7 +49,6 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev) ret = -ENODEV; while (cdev->private->imask != 0) { /* Try every path multiple times. */ - ccw->cda = (__u32) __pa (&cdev->private->pgid[i]); if (cdev->private->iretry > 0) { cdev->private->iretry--; ret = cio_start (sch, cdev->private->iccws, @@ -85,9 +65,7 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev) } cdev->private->imask >>= 1; cdev->private->iretry = 5; - i++; } - return ret; } @@ -99,7 +77,7 @@ ccw_device_sense_pgid_start(struct ccw_device *cdev) cdev->private->state = DEV_STATE_SENSE_PGID; cdev->private->imask = 0x80; cdev->private->iretry = 5; - memset (&cdev->private->pgid, 0, sizeof (cdev->private->pgid)); + memset (&cdev->private->pgid, 0, sizeof (struct pgid)); ret = __ccw_device_sense_pgid_start(cdev); if (ret && ret != -EBUSY) ccw_device_sense_pgid_done(cdev, ret); @@ -114,7 +92,6 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev) { struct subchannel *sch; struct irb *irb; - int i; sch = to_subchannel(cdev->dev.parent); irb = &cdev->private->irb; @@ -148,8 +125,7 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev) sch->schid.sch_no, sch->orb.lpm); return -EACCES; } - i = 8 - ffs(cdev->private->imask); - if (cdev->private->pgid[i].inf.ps.state2 == SNID_STATE2_RESVD_ELSE) { + if (cdev->private->pgid.inf.ps.state2 == SNID_STATE2_RESVD_ELSE) { CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x " "is reserved by someone else\n", cdev->private->devno, sch->schid.ssid, @@ -170,10 +146,10 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event) int ret; irb = (struct irb *) __LC_IRB; - + /* Retry sense pgid for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (__ccw_device_should_retry(&irb->scsw)) { + if (irb->scsw.cc == 1) { ret = __ccw_device_sense_pgid_start(cdev); if (ret && ret != -EBUSY) ccw_device_sense_pgid_done(cdev, ret); @@ -187,6 +163,12 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event) memset(&cdev->private->irb, 0, sizeof(struct irb)); switch (ret) { /* 0, -ETIME, -EOPNOTSUPP, -EAGAIN, -EACCES or -EUSERS */ + case 0: /* Sense Path Group ID successful. */ + if (cdev->private->pgid.inf.ps.state1 == SNID_STATE1_RESET) + memcpy(&cdev->private->pgid, &css[0]->global_pgid, + sizeof(struct pgid)); + ccw_device_sense_pgid_done(cdev, 0); + break; case -EOPNOTSUPP: /* Sense Path Group ID not supported */ ccw_device_sense_pgid_done(cdev, -EOPNOTSUPP); break; @@ -195,15 +177,13 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event) break; case -EACCES: /* channel is not operational. */ sch->lpm &= ~cdev->private->imask; - /* Fall through. */ - case 0: /* Sense Path Group ID successful. */ cdev->private->imask >>= 1; cdev->private->iretry = 5; /* Fall through. */ case -EAGAIN: /* Try again. */ ret = __ccw_device_sense_pgid_start(cdev); if (ret != 0 && ret != -EBUSY) - ccw_device_sense_pgid_done(cdev, ret); + ccw_device_sense_pgid_done(cdev, -ENODEV); break; case -EUSERS: /* device is reserved for someone else. */ ccw_device_sense_pgid_done(cdev, -EUSERS); @@ -224,20 +204,20 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func) sch = to_subchannel(cdev->dev.parent); /* Setup sense path group id channel program. */ - cdev->private->pgid[0].inf.fc = func; + cdev->private->pgid.inf.fc = func; ccw = cdev->private->iccws; if (!cdev->private->flags.pgid_single) { - cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH; + cdev->private->pgid.inf.fc |= SPID_FUNC_MULTI_PATH; ccw->cmd_code = CCW_CMD_SUSPEND_RECONN; ccw->cda = 0; ccw->count = 0; ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC; ccw++; } else - cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH; + cdev->private->pgid.inf.fc |= SPID_FUNC_SINGLE_PATH; ccw->cmd_code = CCW_CMD_SET_PGID; - ccw->cda = (__u32) __pa (&cdev->private->pgid[0]); + ccw->cda = (__u32) __pa (&cdev->private->pgid); ccw->count = sizeof (struct pgid); ccw->flags = CCW_FLAG_SLI; @@ -264,48 +244,6 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func) return ret; } -/* - * Helper function to send a nop ccw down a path. - */ -static int __ccw_device_do_nop(struct ccw_device *cdev) -{ - struct subchannel *sch; - struct ccw1 *ccw; - int ret; - - sch = to_subchannel(cdev->dev.parent); - - /* Setup nop channel program. */ - ccw = cdev->private->iccws; - ccw->cmd_code = CCW_CMD_NOOP; - ccw->cda = 0; - ccw->count = 0; - ccw->flags = CCW_FLAG_SLI; - - /* Reset device status. */ - memset(&cdev->private->irb, 0, sizeof(struct irb)); - - /* Try multiple times. */ - ret = -ENODEV; - if (cdev->private->iretry > 0) { - cdev->private->iretry--; - ret = cio_start (sch, cdev->private->iccws, - cdev->private->imask); - /* ret is 0, -EBUSY, -EACCES or -ENODEV */ - if ((ret != -EACCES) && (ret != -ENODEV)) - return ret; - } - /* nop command failed on this path. Switch it off. */ - sch->lpm &= ~cdev->private->imask; - sch->vpm &= ~cdev->private->imask; - CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel " - "0.%x.%04x, lpm %02X, became 'not operational'\n", - cdev->private->devno, sch->schid.ssid, - sch->schid.sch_no, cdev->private->imask); - return ret; -} - - /* * Called from interrupt context to check if a valid answer * to Set Path Group ID was received. @@ -345,29 +283,6 @@ __ccw_device_check_pgid(struct ccw_device *cdev) return 0; } -/* - * Called from interrupt context to check the path status after a nop has - * been send. - */ -static int __ccw_device_check_nop(struct ccw_device *cdev) -{ - struct subchannel *sch; - struct irb *irb; - - sch = to_subchannel(cdev->dev.parent); - irb = &cdev->private->irb; - if (irb->scsw.fctl & (SCSW_FCTL_HALT_FUNC | SCSW_FCTL_CLEAR_FUNC)) - return -ETIME; - if (irb->scsw.cc == 3) { - CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel 0.%x.%04x," - " lpm %02X, became 'not operational'\n", - cdev->private->devno, sch->schid.ssid, - sch->schid.sch_no, cdev->private->imask); - return -EACCES; - } - return 0; -} - static void __ccw_device_verify_start(struct ccw_device *cdev) { @@ -382,12 +297,9 @@ __ccw_device_verify_start(struct ccw_device *cdev) if ((sch->vpm & imask) != (sch->lpm & imask)) break; cdev->private->imask = imask; - if (cdev->private->options.pgroup) { - func = (sch->vpm & imask) ? - SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH; - ret = __ccw_device_do_pgid(cdev, func); - } else - ret = __ccw_device_do_nop(cdev); + func = (sch->vpm & imask) ? + SPID_FUNC_RESIGN : SPID_FUNC_ESTABLISH; + ret = __ccw_device_do_pgid(cdev, func); if (ret == 0 || ret == -EBUSY) return; cdev->private->iretry = 5; @@ -406,20 +318,17 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event) int ret; irb = (struct irb *) __LC_IRB; - + /* Retry set pgid for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (__ccw_device_should_retry(&irb->scsw)) + if (irb->scsw.cc == 1) __ccw_device_verify_start(cdev); return; } if (ccw_device_accumulate_and_sense(cdev, irb) != 0) return; sch = to_subchannel(cdev->dev.parent); - if (cdev->private->options.pgroup) - ret = __ccw_device_check_pgid(cdev); - else - ret = __ccw_device_check_nop(cdev); + ret = __ccw_device_check_pgid(cdev); memset(&cdev->private->irb, 0, sizeof(struct irb)); switch (ret) { /* 0, -ETIME, -EAGAIN, -EOPNOTSUPP or -EACCES */ @@ -437,10 +346,11 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event) * One of those strange devices which claim to be able * to do multipathing but not for Set Path Group ID. */ - if (cdev->private->flags.pgid_single) - cdev->private->options.pgroup = 0; - else - cdev->private->flags.pgid_single = 1; + if (cdev->private->flags.pgid_single) { + ccw_device_verify_done(cdev, -EOPNOTSUPP); + break; + } + cdev->private->flags.pgid_single = 1; /* fall through. */ case -EAGAIN: /* Try again. */ __ccw_device_verify_start(cdev); @@ -509,10 +419,10 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event) int ret; irb = (struct irb *) __LC_IRB; - + /* Retry set pgid for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (__ccw_device_should_retry(&irb->scsw)) + if (irb->scsw.cc == 1) __ccw_device_disband_start(cdev); return; } diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index caf148d5c..6c762b43f 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c @@ -9,6 +9,7 @@ * Status accumulation and basic sense functions. */ +#include #include #include @@ -67,7 +68,8 @@ ccw_device_path_notoper(struct ccw_device *cdev) sch->schib.pmcw.pnom); sch->lpm &= ~sch->schib.pmcw.pnom; - cdev->private->flags.doverify = 1; + if (cdev->private->options.pgroup) + cdev->private->flags.doverify = 1; } /* @@ -179,7 +181,7 @@ ccw_device_accumulate_esw(struct ccw_device *cdev, struct irb *irb) cdev_irb->esw.esw0.erw.auth = irb->esw.esw0.erw.auth; /* Copy path verification required flag. */ cdev_irb->esw.esw0.erw.pvrf = irb->esw.esw0.erw.pvrf; - if (irb->esw.esw0.erw.pvrf) + if (irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup) cdev->private->flags.doverify = 1; /* Copy concurrent sense bit. */ cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons; @@ -353,7 +355,7 @@ ccw_device_accumulate_basic_sense(struct ccw_device *cdev, struct irb *irb) } /* Check if path verification is required. */ if (ccw_device_accumulate_esw_valid(irb) && - irb->esw.esw0.erw.pvrf) + irb->esw.esw0.erw.pvrf && cdev->private->options.pgroup) cdev->private->flags.doverify = 1; } diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 7c93a8798..96f519281 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c @@ -30,6 +30,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include @@ -2735,7 +2736,7 @@ qdio_free(struct ccw_device *cdev) QDIO_DBF_TEXT1(0,trace,dbf_text); QDIO_DBF_TEXT0(0,setup,dbf_text); - cdev->private->qdio_data = NULL; + cdev->private->qdio_data = 0; up(&irq_ptr->setting_up_sema); diff --git a/drivers/s390/crypto/z90crypt.h b/drivers/s390/crypto/z90crypt.h index 0ca1d126c..5e6b1f535 100644 --- a/drivers/s390/crypto/z90crypt.h +++ b/drivers/s390/crypto/z90crypt.h @@ -1,7 +1,7 @@ /* * linux/drivers/s390/crypto/z90crypt.h * - * z90crypt 1.3.3 (kernel-private header) + * z90crypt 1.3.3 * * Copyright (C) 2001, 2005 IBM Corporation * Author(s): Robert Burroughs (burrough@us.ibm.com) @@ -27,7 +27,188 @@ #ifndef _Z90CRYPT_H_ #define _Z90CRYPT_H_ -#include +#include + +#define z90crypt_VERSION 1 +#define z90crypt_RELEASE 3 // 2 = PCIXCC, 3 = rewrite for coding standards +#define z90crypt_VARIANT 3 // 3 = CEX2A support + +/** + * struct ica_rsa_modexpo + * + * Requirements: + * - outputdatalength is at least as large as inputdatalength. + * - All key parts are right justified in their fields, padded on + * the left with zeroes. + * - length(b_key) = inputdatalength + * - length(n_modulus) = inputdatalength + */ +struct ica_rsa_modexpo { + char __user * inputdata; + unsigned int inputdatalength; + char __user * outputdata; + unsigned int outputdatalength; + char __user * b_key; + char __user * n_modulus; +}; + +/** + * struct ica_rsa_modexpo_crt + * + * Requirements: + * - inputdatalength is even. + * - outputdatalength is at least as large as inputdatalength. + * - All key parts are right justified in their fields, padded on + * the left with zeroes. + * - length(bp_key) = inputdatalength/2 + 8 + * - length(bq_key) = inputdatalength/2 + * - length(np_key) = inputdatalength/2 + 8 + * - length(nq_key) = inputdatalength/2 + * - length(u_mult_inv) = inputdatalength/2 + 8 + */ +struct ica_rsa_modexpo_crt { + char __user * inputdata; + unsigned int inputdatalength; + char __user * outputdata; + unsigned int outputdatalength; + char __user * bp_key; + char __user * bq_key; + char __user * np_prime; + char __user * nq_prime; + char __user * u_mult_inv; +}; + +#define Z90_IOCTL_MAGIC 'z' // NOTE: Need to allocate from linux folks + +/** + * Interface notes: + * + * The ioctl()s which are implemented (along with relevant details) + * are: + * + * ICARSAMODEXPO + * Perform an RSA operation using a Modulus-Exponent pair + * This takes an ica_rsa_modexpo struct as its arg. + * + * NOTE: please refer to the comments preceding this structure + * for the implementation details for the contents of the + * block + * + * ICARSACRT + * Perform an RSA operation using a Chinese-Remainder Theorem key + * This takes an ica_rsa_modexpo_crt struct as its arg. + * + * NOTE: please refer to the comments preceding this structure + * for the implementation details for the contents of the + * block + * + * Z90STAT_TOTALCOUNT + * Return an integer count of all device types together. + * + * Z90STAT_PCICACOUNT + * Return an integer count of all PCICAs. + * + * Z90STAT_PCICCCOUNT + * Return an integer count of all PCICCs. + * + * Z90STAT_PCIXCCMCL2COUNT + * Return an integer count of all MCL2 PCIXCCs. + * + * Z90STAT_PCIXCCMCL3COUNT + * Return an integer count of all MCL3 PCIXCCs. + * + * Z90STAT_CEX2CCOUNT + * Return an integer count of all CEX2Cs. + * + * Z90STAT_CEX2ACOUNT + * Return an integer count of all CEX2As. + * + * Z90STAT_REQUESTQ_COUNT + * Return an integer count of the number of entries waiting to be + * sent to a device. + * + * Z90STAT_PENDINGQ_COUNT + * Return an integer count of the number of entries sent to a + * device awaiting the reply. + * + * Z90STAT_TOTALOPEN_COUNT + * Return an integer count of the number of open file handles. + * + * Z90STAT_DOMAIN_INDEX + * Return the integer value of the Cryptographic Domain. + * + * Z90STAT_STATUS_MASK + * Return an 64 element array of unsigned chars for the status of + * all devices. + * 0x01: PCICA + * 0x02: PCICC + * 0x03: PCIXCC_MCL2 + * 0x04: PCIXCC_MCL3 + * 0x05: CEX2C + * 0x06: CEX2A + * 0x0d: device is disabled via the proc filesystem + * + * Z90STAT_QDEPTH_MASK + * Return an 64 element array of unsigned chars for the queue + * depth of all devices. + * + * Z90STAT_PERDEV_REQCNT + * Return an 64 element array of unsigned integers for the number + * of successfully completed requests per device since the device + * was detected and made available. + * + * ICAZ90STATUS (deprecated) + * Return some device driver status in a ica_z90_status struct + * This takes an ica_z90_status struct as its arg. + * + * NOTE: this ioctl() is deprecated, and has been replaced with + * single ioctl()s for each type of status being requested + * + * Z90STAT_PCIXCCCOUNT (deprecated) + * Return an integer count of all PCIXCCs (MCL2 + MCL3). + * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from + * MCL2 PCIXCCs. + * + * Z90QUIESCE (not recommended) + * Quiesce the driver. This is intended to stop all new + * requests from being processed. Its use is NOT recommended, + * except in circumstances where there is no other way to stop + * callers from accessing the driver. Its original use was to + * allow the driver to be "drained" of work in preparation for + * a system shutdown. + * + * NOTE: once issued, this ban on new work cannot be undone + * except by unloading and reloading the driver. + */ + +/** + * Supported ioctl calls + */ +#define ICARSAMODEXPO _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x05, 0) +#define ICARSACRT _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x06, 0) + +/* DEPRECATED status calls (bound for removal at some point) */ +#define ICAZ90STATUS _IOR(Z90_IOCTL_MAGIC, 0x10, struct ica_z90_status) +#define Z90STAT_PCIXCCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x43, int) + +/* unrelated to ICA callers */ +#define Z90QUIESCE _IO(Z90_IOCTL_MAGIC, 0x11) + +/* New status calls */ +#define Z90STAT_TOTALCOUNT _IOR(Z90_IOCTL_MAGIC, 0x40, int) +#define Z90STAT_PCICACOUNT _IOR(Z90_IOCTL_MAGIC, 0x41, int) +#define Z90STAT_PCICCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x42, int) +#define Z90STAT_PCIXCCMCL2COUNT _IOR(Z90_IOCTL_MAGIC, 0x4b, int) +#define Z90STAT_PCIXCCMCL3COUNT _IOR(Z90_IOCTL_MAGIC, 0x4c, int) +#define Z90STAT_CEX2CCOUNT _IOR(Z90_IOCTL_MAGIC, 0x4d, int) +#define Z90STAT_CEX2ACOUNT _IOR(Z90_IOCTL_MAGIC, 0x4e, int) +#define Z90STAT_REQUESTQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x44, int) +#define Z90STAT_PENDINGQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x45, int) +#define Z90STAT_TOTALOPEN_COUNT _IOR(Z90_IOCTL_MAGIC, 0x46, int) +#define Z90STAT_DOMAIN_INDEX _IOR(Z90_IOCTL_MAGIC, 0x47, int) +#define Z90STAT_STATUS_MASK _IOR(Z90_IOCTL_MAGIC, 0x48, char[64]) +#define Z90STAT_QDEPTH_MASK _IOR(Z90_IOCTL_MAGIC, 0x49, char[64]) +#define Z90STAT_PERDEV_REQCNT _IOR(Z90_IOCTL_MAGIC, 0x4a, int[64]) /** * local errno definitions diff --git a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c index b2f20ab84..982acc730 100644 --- a/drivers/s390/crypto/z90main.c +++ b/drivers/s390/crypto/z90main.c @@ -411,6 +411,7 @@ static struct miscdevice z90crypt_misc_device = { .minor = Z90CRYPT_MINOR, .name = DEV_NAME, .fops = &z90crypt_fops, + .devfs_name = DEV_NAME }; /** diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig index 1a93fa684..548854754 100644 --- a/drivers/s390/net/Kconfig +++ b/drivers/s390/net/Kconfig @@ -92,6 +92,15 @@ config QETH_VLAN If CONFIG_QETH is switched on, this option will include IEEE 802.1q VLAN support in the qeth device driver. +config QETH_PERF_STATS + bool "Performance statistics in /proc" + depends on QETH + help + When switched on, this option will add a file in the proc-fs + (/proc/qeth_perf_stats) containing performance statistics. It + may slightly impact performance, so this is only recommended for + internal tuning of the device driver. + config CCWGROUP tristate default (LCS || CTC || QETH) diff --git a/drivers/s390/net/Makefile b/drivers/s390/net/Makefile index 4777e36a9..90d4d0ef3 100644 --- a/drivers/s390/net/Makefile +++ b/drivers/s390/net/Makefile @@ -2,7 +2,7 @@ # S/390 network devices # -ctc-objs := ctcmain.o ctcdbug.o +ctc-objs := ctcmain.o ctctty.o ctcdbug.o obj-$(CONFIG_IUCV) += iucv.o obj-$(CONFIG_NETIUCV) += netiucv.o fsm.o diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 95f4e105c..23d53bf9d 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -529,7 +529,7 @@ claw_open(struct net_device *dev) printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); #endif CLAW_DBF_TEXT(4,trace,"open"); - if (!dev || (dev->name[0] == 0x00)) { + if (!dev | (dev->name[0] == 0x00)) { CLAW_DBF_TEXT(2,trace,"BadDev"); printk(KERN_WARNING "claw: Bad device at open failing \n"); return -ENODEV; diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 3257c22dd..fe986af88 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c @@ -6,7 +6,7 @@ * Fixes by : Jochen Röhrig (roehrig@de.ibm.com) * Arnaldo Carvalho de Melo Peter Tiedemann (ptiedem@de.ibm.com) - * Driver Model stuff by : Cornelia Huck + * Driver Model stuff by : Cornelia Huck * * Documentation used: * - Principles of Operation (IBM doc#: SA22-7201-06) @@ -65,6 +65,7 @@ #include +#include "ctctty.h" #include "fsm.h" #include "cu3088.h" @@ -478,7 +479,10 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb) skb->dev = pskb->dev; skb->protocol = pskb->protocol; pskb->ip_summed = CHECKSUM_UNNECESSARY; - netif_rx_ni(skb); + if (ch->protocol == CTC_PROTO_LINUX_TTY) + ctc_tty_netif_rx(skb); + else + netif_rx_ni(skb); /** * Successful rx; reset logflags */ @@ -553,7 +557,8 @@ ccw_unit_check(struct channel *ch, unsigned char sense) DBF_TEXT(trace, 5, __FUNCTION__); if (sense & SNS0_INTERVENTION_REQ) { if (sense & 0x01) { - ctc_pr_debug("%s: Interface disc. or Sel. reset " + if (ch->protocol != CTC_PROTO_LINUX_TTY) + ctc_pr_debug("%s: Interface disc. or Sel. reset " "(remote)\n", ch->id); fsm_event(ch->fsm, CH_EVENT_UC_RCRESET, ch); } else { @@ -1714,9 +1719,6 @@ add_channel(struct ccw_device *cdev, enum channel_types type) kfree(ch); return 0; } - - spin_lock_init(&ch->collect_lock); - fsm_settimer(ch->fsm, &ch->timer); skb_queue_head_init(&ch->io_queue); skb_queue_head_init(&ch->collect_queue); @@ -2032,6 +2034,7 @@ static void dev_action_chup(fsm_instance * fi, int event, void *arg) { struct net_device *dev = (struct net_device *) arg; + struct ctc_priv *privptr = dev->priv; DBF_TEXT(trace, 3, __FUNCTION__); switch (fsm_getstate(fi)) { @@ -2046,6 +2049,8 @@ dev_action_chup(fsm_instance * fi, int event, void *arg) fsm_newstate(fi, DEV_STATE_RUNNING); ctc_pr_info("%s: connected with remote side\n", dev->name); + if (privptr->protocol == CTC_PROTO_LINUX_TTY) + ctc_tty_setcarrier(dev, 1); ctc_clear_busy(dev); } break; @@ -2054,6 +2059,8 @@ dev_action_chup(fsm_instance * fi, int event, void *arg) fsm_newstate(fi, DEV_STATE_RUNNING); ctc_pr_info("%s: connected with remote side\n", dev->name); + if (privptr->protocol == CTC_PROTO_LINUX_TTY) + ctc_tty_setcarrier(dev, 1); ctc_clear_busy(dev); } break; @@ -2079,10 +2086,14 @@ dev_action_chup(fsm_instance * fi, int event, void *arg) static void dev_action_chdown(fsm_instance * fi, int event, void *arg) { + struct net_device *dev = (struct net_device *) arg; + struct ctc_priv *privptr = dev->priv; DBF_TEXT(trace, 3, __FUNCTION__); switch (fsm_getstate(fi)) { case DEV_STATE_RUNNING: + if (privptr->protocol == CTC_PROTO_LINUX_TTY) + ctc_tty_setcarrier(dev, 0); if (event == DEV_EVENT_TXDOWN) fsm_newstate(fi, DEV_STATE_STARTWAIT_TX); else @@ -2386,6 +2397,8 @@ ctc_tx(struct sk_buff *skb, struct net_device * dev) */ if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { fsm_event(privptr->fsm, DEV_EVENT_START, dev); + if (privptr->protocol == CTC_PROTO_LINUX_TTY) + return -EBUSY; dev_kfree_skb(skb); privptr->stats.tx_dropped++; privptr->stats.tx_errors++; @@ -2595,13 +2608,20 @@ ctc_netdev_unregister(struct net_device * dev) if (!dev) return; privptr = (struct ctc_priv *) dev->priv; - unregister_netdev(dev); + if (privptr->protocol != CTC_PROTO_LINUX_TTY) + unregister_netdev(dev); + else + ctc_tty_unregister_netdev(dev); } static int ctc_netdev_register(struct net_device * dev) { - return register_netdev(dev); + struct ctc_priv *privptr = (struct ctc_priv *) dev->priv; + if (privptr->protocol != CTC_PROTO_LINUX_TTY) + return register_netdev(dev); + else + return ctc_tty_register_netdev(dev); } static void @@ -2647,9 +2667,7 @@ ctc_proto_store(struct device *dev, struct device_attribute *attr, const char *b if (!priv) return -ENODEV; sscanf(buf, "%u", &value); - if (!((value == CTC_PROTO_S390) || - (value == CTC_PROTO_LINUX) || - (value == CTC_PROTO_OS390))) + if ((value < 0) || (value > CTC_PROTO_MAX)) return -EINVAL; priv->protocol = value; @@ -2689,17 +2707,9 @@ static struct attribute_group ctc_attr_group = { static int ctc_add_attributes(struct device *dev) { - int rc; - - rc = device_create_file(dev, &dev_attr_loglevel); - if (rc) - goto out; - rc = device_create_file(dev, &dev_attr_stats); - if (!rc) - goto out; - device_remove_file(dev, &dev_attr_loglevel); -out: - return rc; + device_create_file(dev, &dev_attr_loglevel); + device_create_file(dev, &dev_attr_stats); + return 0; } static void @@ -2887,7 +2897,10 @@ ctc_new_device(struct ccwgroup_device *cgdev) goto out; } - strlcpy(dev->name, "ctc%d", IFNAMSIZ); + if (privptr->protocol == CTC_PROTO_LINUX_TTY) + strlcpy(dev->name, "ctctty%d", IFNAMSIZ); + else + strlcpy(dev->name, "ctc%d", IFNAMSIZ); for (direction = READ; direction <= WRITE; direction++) { privptr->channel[direction] = @@ -2912,12 +2925,7 @@ ctc_new_device(struct ccwgroup_device *cgdev) goto out; } - if (ctc_add_attributes(&cgdev->dev)) { - ctc_netdev_unregister(dev); - dev->priv = NULL; - ctc_free_netdevice(dev, 1); - goto out; - } + ctc_add_attributes(&cgdev->dev); strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name)); @@ -3038,6 +3046,7 @@ ctc_exit(void) { DBF_TEXT(setup, 3, __FUNCTION__); unregister_cu3088_discipline(&ctc_group_driver); + ctc_tty_cleanup(); ctc_unregister_dbf_views(); ctc_pr_info("CTC driver unloaded\n"); } @@ -3064,8 +3073,10 @@ ctc_init(void) ctc_pr_crit("ctc_init failed with ctc_register_dbf_views rc = %d\n", ret); return ret; } + ctc_tty_init(); ret = register_cu3088_discipline(&ctc_group_driver); if (ret) { + ctc_tty_cleanup(); ctc_unregister_dbf_views(); } return ret; diff --git a/drivers/s390/net/ctcmain.h b/drivers/s390/net/ctcmain.h index 7f305d119..d2e835c0c 100644 --- a/drivers/s390/net/ctcmain.h +++ b/drivers/s390/net/ctcmain.h @@ -35,9 +35,7 @@ #include #include -#include -#include - +#include "ctctty.h" #include "fsm.h" #include "cu3088.h" @@ -52,7 +50,9 @@ #define CTC_PROTO_S390 0 #define CTC_PROTO_LINUX 1 +#define CTC_PROTO_LINUX_TTY 2 #define CTC_PROTO_OS390 3 +#define CTC_PROTO_MAX 3 #define CTC_BUFSIZE_LIMIT 65535 #define CTC_BUFSIZE_DEFAULT 32768 @@ -257,13 +257,15 @@ static __inline__ void ctc_clear_busy(struct net_device * dev) { clear_bit(0, &(((struct ctc_priv *) dev->priv)->tbusy)); - netif_wake_queue(dev); + if (((struct ctc_priv *)dev->priv)->protocol != CTC_PROTO_LINUX_TTY) + netif_wake_queue(dev); } static __inline__ int ctc_test_and_set_busy(struct net_device * dev) { - netif_stop_queue(dev); + if (((struct ctc_priv *)dev->priv)->protocol != CTC_PROTO_LINUX_TTY) + netif_stop_queue(dev); return test_and_set_bit(0, &((struct ctc_priv *) dev->priv)->tbusy); } diff --git a/drivers/s390/net/ctctty.c b/drivers/s390/net/ctctty.c new file mode 100644 index 000000000..af54d1de0 --- /dev/null +++ b/drivers/s390/net/ctctty.c @@ -0,0 +1,1259 @@ +/* + * CTC / ESCON network driver, tty interface. + * + * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.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, 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include "ctctty.h" +#include "ctcdbug.h" + +#define CTC_TTY_MAJOR 43 +#define CTC_TTY_MAX_DEVICES 64 + +#define CTC_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ +#define CTC_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ +#define CTC_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ +#define CTC_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ +#define CTC_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ +#define CTC_ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */ +#define CTC_ASYNC_HUP_NOTIFY 0x0001 /* Notify tty on hangups/closes */ +#define CTC_ASYNC_NETDEV_OPEN 0x0002 /* Underlying netdev is open */ +#define CTC_ASYNC_TX_LINESTAT 0x0004 /* Must send line status */ +#define CTC_ASYNC_SPLIT_TERMIOS 0x0008 /* Sep. termios for dialin/out */ +#define CTC_TTY_XMIT_SIZE 1024 /* Default bufsize for write */ +#define CTC_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ + +/* Private data (similar to async_struct in ) */ +typedef struct { + int magic; + int flags; /* defined in tty.h */ + int mcr; /* Modem control register */ + int msr; /* Modem status register */ + int lsr; /* Line status register */ + int line; + int count; /* # of fd on device */ + int blocked_open; /* # of blocked opens */ + struct net_device *netdev; + struct sk_buff_head tx_queue; /* transmit queue */ + struct sk_buff_head rx_queue; /* receive queue */ + struct tty_struct *tty; /* Pointer to corresponding tty */ + wait_queue_head_t open_wait; + wait_queue_head_t close_wait; + struct semaphore write_sem; + struct tasklet_struct tasklet; + struct timer_list stoptimer; +} ctc_tty_info; + +/* Description of one CTC-tty */ +typedef struct { + struct tty_driver *ctc_tty_device; /* tty-device */ + ctc_tty_info info[CTC_TTY_MAX_DEVICES]; /* Private data */ +} ctc_tty_driver; + +static ctc_tty_driver *driver; + +/* Leave this unchanged unless you know what you do! */ +#define MODEM_PARANOIA_CHECK +#define MODEM_DO_RESTART + +#define CTC_TTY_NAME "ctctty" + +static __u32 ctc_tty_magic = CTC_ASYNC_MAGIC; +static int ctc_tty_shuttingdown = 0; + +static spinlock_t ctc_tty_lock; + +/* ctc_tty_try_read() is called from within ctc_tty_rcv_skb() + * to stuff incoming data directly into a tty's flip-buffer. If the + * flip buffer is full, the packet gets queued up. + * + * Return: + * 1 = Success + * 0 = Failure, data has to be buffered and later processed by + * ctc_tty_readmodem(). + */ +static int +ctc_tty_try_read(ctc_tty_info * info, struct sk_buff *skb) +{ + int len; + struct tty_struct *tty; + + DBF_TEXT(trace, 5, __FUNCTION__); + if ((tty = info->tty)) { + if (info->mcr & UART_MCR_RTS) { + len = skb->len; + tty_insert_flip_string(tty, skb->data, len); + tty_flip_buffer_push(tty); + kfree_skb(skb); + return 1; + } + } + return 0; +} + +/* ctc_tty_readmodem() is called periodically from within timer-interrupt. + * It tries getting received data from the receive queue an stuff it into + * the tty's flip-buffer. + */ +static int +ctc_tty_readmodem(ctc_tty_info *info) +{ + int ret = 1; + struct tty_struct *tty; + + DBF_TEXT(trace, 5, __FUNCTION__); + if ((tty = info->tty)) { + if (info->mcr & UART_MCR_RTS) { + struct sk_buff *skb; + + if ((skb = skb_dequeue(&info->rx_queue))) { + int len = skb->len; + tty_insert_flip_string(tty, skb->data, len); + skb_pull(skb, len); + tty_flip_buffer_push(tty); + if (skb->len > 0) + skb_queue_head(&info->rx_queue, skb); + else { + kfree_skb(skb); + ret = !skb_queue_empty(&info->rx_queue); + } + } + } + } + return ret; +} + +void +ctc_tty_setcarrier(struct net_device *netdev, int on) +{ + int i; + + DBF_TEXT(trace, 4, __FUNCTION__); + if ((!driver) || ctc_tty_shuttingdown) + return; + for (i = 0; i < CTC_TTY_MAX_DEVICES; i++) + if (driver->info[i].netdev == netdev) { + ctc_tty_info *info = &driver->info[i]; + if (on) + info->msr |= UART_MSR_DCD; + else + info->msr &= ~UART_MSR_DCD; + if ((info->flags & CTC_ASYNC_CHECK_CD) && (!on)) + tty_hangup(info->tty); + } +} + +void +ctc_tty_netif_rx(struct sk_buff *skb) +{ + int i; + ctc_tty_info *info = NULL; + + DBF_TEXT(trace, 5, __FUNCTION__); + if (!skb) + return; + if ((!skb->dev) || (!driver) || ctc_tty_shuttingdown) { + dev_kfree_skb(skb); + return; + } + for (i = 0; i < CTC_TTY_MAX_DEVICES; i++) + if (driver->info[i].netdev == skb->dev) { + info = &driver->info[i]; + break; + } + if (!info) { + dev_kfree_skb(skb); + return; + } + if (skb->len < 6) { + dev_kfree_skb(skb); + return; + } + if (memcmp(skb->data, &ctc_tty_magic, sizeof(__u32))) { + dev_kfree_skb(skb); + return; + } + skb_pull(skb, sizeof(__u32)); + + i = *((int *)skb->data); + skb_pull(skb, sizeof(info->mcr)); + if (i & UART_MCR_RTS) { + info->msr |= UART_MSR_CTS; + if (info->flags & CTC_ASYNC_CTS_FLOW) + info->tty->hw_stopped = 0; + } else { + info->msr &= ~UART_MSR_CTS; + if (info->flags & CTC_ASYNC_CTS_FLOW) + info->tty->hw_stopped = 1; + } + if (i & UART_MCR_DTR) + info->msr |= UART_MSR_DSR; + else + info->msr &= ~UART_MSR_DSR; + if (skb->len <= 0) { + kfree_skb(skb); + return; + } + /* Try to deliver directly via tty-flip-buf if queue is empty */ + if (skb_queue_empty(&info->rx_queue)) + if (ctc_tty_try_read(info, skb)) + return; + /* Direct deliver failed or queue wasn't empty. + * Queue up for later dequeueing via timer-irq. + */ + skb_queue_tail(&info->rx_queue, skb); + /* Schedule dequeuing */ + tasklet_schedule(&info->tasklet); +} + +static int +ctc_tty_tint(ctc_tty_info * info) +{ + struct sk_buff *skb = skb_dequeue(&info->tx_queue); + int stopped = (info->tty->hw_stopped || info->tty->stopped); + int wake = 1; + int rc; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (!info->netdev) { + if (skb) + kfree_skb(skb); + return 0; + } + if (info->flags & CTC_ASYNC_TX_LINESTAT) { + int skb_res = info->netdev->hard_header_len + + sizeof(info->mcr) + sizeof(__u32); + /* If we must update line status, + * create an empty dummy skb and insert it. + */ + if (skb) + skb_queue_head(&info->tx_queue, skb); + + skb = dev_alloc_skb(skb_res); + if (!skb) { + printk(KERN_WARNING + "ctc_tty: Out of memory in %s%d tint\n", + CTC_TTY_NAME, info->line); + return 1; + } + skb_reserve(skb, skb_res); + stopped = 0; + wake = 0; + } + if (!skb) + return 0; + if (stopped) { + skb_queue_head(&info->tx_queue, skb); + return 1; + } +#if 0 + if (skb->len > 0) + printk(KERN_DEBUG "tint: %d %02x\n", skb->len, *(skb->data)); + else + printk(KERN_DEBUG "tint: %d STAT\n", skb->len); +#endif + memcpy(skb_push(skb, sizeof(info->mcr)), &info->mcr, sizeof(info->mcr)); + memcpy(skb_push(skb, sizeof(__u32)), &ctc_tty_magic, sizeof(__u32)); + rc = info->netdev->hard_start_xmit(skb, info->netdev); + if (rc) { + skb_pull(skb, sizeof(info->mcr) + sizeof(__u32)); + if (skb->len > 0) + skb_queue_head(&info->tx_queue, skb); + else + kfree_skb(skb); + } else { + struct tty_struct *tty = info->tty; + + info->flags &= ~CTC_ASYNC_TX_LINESTAT; + if (tty) { + tty_wakeup(tty); + } + } + return (skb_queue_empty(&info->tx_queue) ? 0 : 1); +} + +/************************************************************ + * + * Modem-functions + * + * mostly "stolen" from original Linux-serial.c and friends. + * + ************************************************************/ + +static inline int +ctc_tty_paranoia_check(ctc_tty_info * info, char *name, const char *routine) +{ +#ifdef MODEM_PARANOIA_CHECK + if (!info) { + printk(KERN_WARNING "ctc_tty: null info_struct for %s in %s\n", + name, routine); + return 1; + } + if (info->magic != CTC_ASYNC_MAGIC) { + printk(KERN_WARNING "ctc_tty: bad magic for info struct %s in %s\n", + name, routine); + return 1; + } +#endif + return 0; +} + +static void +ctc_tty_inject(ctc_tty_info *info, char c) +{ + int skb_res; + struct sk_buff *skb; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_shuttingdown) + return; + skb_res = info->netdev->hard_header_len + sizeof(info->mcr) + + sizeof(__u32) + 1; + skb = dev_alloc_skb(skb_res); + if (!skb) { + printk(KERN_WARNING + "ctc_tty: Out of memory in %s%d tx_inject\n", + CTC_TTY_NAME, info->line); + return; + } + skb_reserve(skb, skb_res); + *(skb_put(skb, 1)) = c; + skb_queue_head(&info->tx_queue, skb); + tasklet_schedule(&info->tasklet); +} + +static void +ctc_tty_transmit_status(ctc_tty_info *info) +{ + DBF_TEXT(trace, 5, __FUNCTION__); + if (ctc_tty_shuttingdown) + return; + info->flags |= CTC_ASYNC_TX_LINESTAT; + tasklet_schedule(&info->tasklet); +} + +static void +ctc_tty_change_speed(ctc_tty_info * info) +{ + unsigned int cflag; + unsigned int quot; + int i; + + DBF_TEXT(trace, 3, __FUNCTION__); + if (!info->tty || !info->tty->termios) + return; + cflag = info->tty->termios->c_cflag; + + quot = i = cflag & CBAUD; + if (i & CBAUDEX) { + i &= ~CBAUDEX; + if (i < 1 || i > 2) + info->tty->termios->c_cflag &= ~CBAUDEX; + else + i += 15; + } + if (quot) { + info->mcr |= UART_MCR_DTR; + info->mcr |= UART_MCR_RTS; + ctc_tty_transmit_status(info); + } else { + info->mcr &= ~UART_MCR_DTR; + info->mcr &= ~UART_MCR_RTS; + ctc_tty_transmit_status(info); + return; + } + + /* CTS flow control flag and modem status interrupts */ + if (cflag & CRTSCTS) { + info->flags |= CTC_ASYNC_CTS_FLOW; + } else + info->flags &= ~CTC_ASYNC_CTS_FLOW; + if (cflag & CLOCAL) + info->flags &= ~CTC_ASYNC_CHECK_CD; + else { + info->flags |= CTC_ASYNC_CHECK_CD; + } +} + +static int +ctc_tty_startup(ctc_tty_info * info) +{ + DBF_TEXT(trace, 3, __FUNCTION__); + if (info->flags & CTC_ASYNC_INITIALIZED) + return 0; +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "starting up %s%d ...\n", CTC_TTY_NAME, info->line); +#endif + /* + * Now, initialize the UART + */ + info->mcr = UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2; + if (info->tty) + clear_bit(TTY_IO_ERROR, &info->tty->flags); + /* + * and set the speed of the serial port + */ + ctc_tty_change_speed(info); + + info->flags |= CTC_ASYNC_INITIALIZED; + if (!(info->flags & CTC_ASYNC_NETDEV_OPEN)) + info->netdev->open(info->netdev); + info->flags |= CTC_ASYNC_NETDEV_OPEN; + return 0; +} + +static void +ctc_tty_stopdev(unsigned long data) +{ + ctc_tty_info *info = (ctc_tty_info *)data; + + if ((!info) || (!info->netdev) || + (info->flags & CTC_ASYNC_INITIALIZED)) + return; + info->netdev->stop(info->netdev); + info->flags &= ~CTC_ASYNC_NETDEV_OPEN; +} + +/* + * This routine will shutdown a serial port; interrupts are disabled, and + * DTR is dropped if the hangup on close termio flag is on. + */ +static void +ctc_tty_shutdown(ctc_tty_info * info) +{ + DBF_TEXT(trace, 3, __FUNCTION__); + if (!(info->flags & CTC_ASYNC_INITIALIZED)) + return; +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "Shutting down %s%d ....\n", CTC_TTY_NAME, info->line); +#endif + info->msr &= ~UART_MSR_RI; + if (!info->tty || (info->tty->termios->c_cflag & HUPCL)) + info->mcr &= ~(UART_MCR_DTR | UART_MCR_RTS); + if (info->tty) + set_bit(TTY_IO_ERROR, &info->tty->flags); + mod_timer(&info->stoptimer, jiffies + (10 * HZ)); + skb_queue_purge(&info->tx_queue); + skb_queue_purge(&info->rx_queue); + info->flags &= ~CTC_ASYNC_INITIALIZED; +} + +/* ctc_tty_write() is the main send-routine. It is called from the upper + * levels within the kernel to perform sending data. Depending on the + * online-flag it either directs output to the at-command-interpreter or + * to the lower level. Additional tasks done here: + * - If online, check for escape-sequence (+++) + * - If sending audio-data, call ctc_tty_DLEdown() to parse DLE-codes. + * - If receiving audio-data, call ctc_tty_end_vrx() to abort if needed. + * - If dialing, abort dial. + */ +static int +ctc_tty_write(struct tty_struct *tty, const u_char * buf, int count) +{ + int c; + int total = 0; + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + DBF_TEXT(trace, 5, __FUNCTION__); + if (ctc_tty_shuttingdown) + goto ex; + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_write")) + goto ex; + if (!tty) + goto ex; + if (!info->netdev) { + total = -ENODEV; + goto ex; + } + while (1) { + struct sk_buff *skb; + int skb_res; + + c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE; + if (c <= 0) + break; + + skb_res = info->netdev->hard_header_len + sizeof(info->mcr) + + + sizeof(__u32); + skb = dev_alloc_skb(skb_res + c); + if (!skb) { + printk(KERN_WARNING + "ctc_tty: Out of memory in %s%d write\n", + CTC_TTY_NAME, info->line); + break; + } + skb_reserve(skb, skb_res); + memcpy(skb_put(skb, c), buf, c); + skb_queue_tail(&info->tx_queue, skb); + buf += c; + total += c; + count -= c; + } + if (!skb_queue_empty(&info->tx_queue)) { + info->lsr &= ~UART_LSR_TEMT; + tasklet_schedule(&info->tasklet); + } +ex: + DBF_TEXT(trace, 6, __FUNCTION__); + return total; +} + +static int +ctc_tty_write_room(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_write_room")) + return 0; + return CTC_TTY_XMIT_SIZE; +} + +static int +ctc_tty_chars_in_buffer(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_chars_in_buffer")) + return 0; + return 0; +} + +static void +ctc_tty_flush_buffer(struct tty_struct *tty) +{ + ctc_tty_info *info; + unsigned long flags; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (!tty) + goto ex; + spin_lock_irqsave(&ctc_tty_lock, flags); + info = (ctc_tty_info *) tty->driver_data; + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_buffer")) { + spin_unlock_irqrestore(&ctc_tty_lock, flags); + goto ex; + } + skb_queue_purge(&info->tx_queue); + info->lsr |= UART_LSR_TEMT; + spin_unlock_irqrestore(&ctc_tty_lock, flags); + wake_up_interruptible(&tty->write_wait); + tty_wakeup(tty); +ex: + DBF_TEXT_(trace, 2, "ex: %s ", __FUNCTION__); + return; +} + +static void +ctc_tty_flush_chars(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_shuttingdown) + return; + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_chars")) + return; + if (tty->stopped || tty->hw_stopped || skb_queue_empty(&info->tx_queue)) + return; + tasklet_schedule(&info->tasklet); +} + +/* + * ------------------------------------------------------------ + * ctc_tty_throttle() + * + * This routine is called by the upper-layer tty layer to signal that + * incoming characters should be throttled. + * ------------------------------------------------------------ + */ +static void +ctc_tty_throttle(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_throttle")) + return; + info->mcr &= ~UART_MCR_RTS; + if (I_IXOFF(tty)) + ctc_tty_inject(info, STOP_CHAR(tty)); + ctc_tty_transmit_status(info); +} + +static void +ctc_tty_unthrottle(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_unthrottle")) + return; + info->mcr |= UART_MCR_RTS; + if (I_IXOFF(tty)) + ctc_tty_inject(info, START_CHAR(tty)); + ctc_tty_transmit_status(info); +} + +/* + * ------------------------------------------------------------ + * ctc_tty_ioctl() and friends + * ------------------------------------------------------------ + */ + +/* + * ctc_tty_get_lsr_info - get line status register info + * + * Purpose: Let user call ioctl() to get info when the UART physically + * is emptied. On bus types like RS485, the transmitter must + * release the bus after transmitting. This must be done when + * the transmit shift register is empty, not be done when the + * transmit holding register is empty. This functionality + * allows RS485 driver to be written in user space. + */ +static int +ctc_tty_get_lsr_info(ctc_tty_info * info, uint __user *value) +{ + u_char status; + uint result; + ulong flags; + + DBF_TEXT(trace, 4, __FUNCTION__); + spin_lock_irqsave(&ctc_tty_lock, flags); + status = info->lsr; + spin_unlock_irqrestore(&ctc_tty_lock, flags); + result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0); + put_user(result, value); + return 0; +} + + +static int ctc_tty_tiocmget(struct tty_struct *tty, struct file *file) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + u_char control, + status; + uint result; + ulong flags; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_ioctl")) + return -ENODEV; + if (tty->flags & (1 << TTY_IO_ERROR)) + return -EIO; + + control = info->mcr; + spin_lock_irqsave(&ctc_tty_lock, flags); + status = info->msr; + spin_unlock_irqrestore(&ctc_tty_lock, flags); + result = ((control & UART_MCR_RTS) ? TIOCM_RTS : 0) + | ((control & UART_MCR_DTR) ? TIOCM_DTR : 0) + | ((status & UART_MSR_DCD) ? TIOCM_CAR : 0) + | ((status & UART_MSR_RI) ? TIOCM_RNG : 0) + | ((status & UART_MSR_DSR) ? TIOCM_DSR : 0) + | ((status & UART_MSR_CTS) ? TIOCM_CTS : 0); + return result; +} + +static int +ctc_tty_tiocmset(struct tty_struct *tty, struct file *file, + unsigned int set, unsigned int clear) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_ioctl")) + return -ENODEV; + if (tty->flags & (1 << TTY_IO_ERROR)) + return -EIO; + + if (set & TIOCM_RTS) + info->mcr |= UART_MCR_RTS; + if (set & TIOCM_DTR) + info->mcr |= UART_MCR_DTR; + + if (clear & TIOCM_RTS) + info->mcr &= ~UART_MCR_RTS; + if (clear & TIOCM_DTR) + info->mcr &= ~UART_MCR_DTR; + + if ((set | clear) & (TIOCM_RTS|TIOCM_DTR)) + ctc_tty_transmit_status(info); + return 0; +} + +static int +ctc_tty_ioctl(struct tty_struct *tty, struct file *file, + uint cmd, ulong arg) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + int error; + int retval; + + DBF_TEXT(trace, 4, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_ioctl")) + return -ENODEV; + if (tty->flags & (1 << TTY_IO_ERROR)) + return -EIO; + switch (cmd) { + case TCSBRK: /* SVID version: non-zero arg --> no break */ +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "%s%d ioctl TCSBRK\n", CTC_TTY_NAME, info->line); +#endif + retval = tty_check_change(tty); + if (retval) + return retval; + tty_wait_until_sent(tty, 0); + return 0; + case TCSBRKP: /* support for POSIX tcsendbreak() */ +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "%s%d ioctl TCSBRKP\n", CTC_TTY_NAME, info->line); +#endif + retval = tty_check_change(tty); + if (retval) + return retval; + tty_wait_until_sent(tty, 0); + return 0; + case TIOCGSOFTCAR: +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "%s%d ioctl TIOCGSOFTCAR\n", CTC_TTY_NAME, + info->line); +#endif + error = put_user(C_CLOCAL(tty) ? 1 : 0, (ulong __user *) arg); + return error; + case TIOCSSOFTCAR: +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "%s%d ioctl TIOCSSOFTCAR\n", CTC_TTY_NAME, + info->line); +#endif + error = get_user(arg, (ulong __user *) arg); + if (error) + return error; + tty->termios->c_cflag = + ((tty->termios->c_cflag & ~CLOCAL) | + (arg ? CLOCAL : 0)); + return 0; + case TIOCSERGETLSR: /* Get line status register */ +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "%s%d ioctl TIOCSERGETLSR\n", CTC_TTY_NAME, + info->line); +#endif + if (access_ok(VERIFY_WRITE, (void __user *) arg, sizeof(uint))) + return ctc_tty_get_lsr_info(info, (uint __user *) arg); + else + return -EFAULT; + default: +#ifdef CTC_DEBUG_MODEM_IOCTL + printk(KERN_DEBUG "UNKNOWN ioctl 0x%08x on %s%d\n", cmd, + CTC_TTY_NAME, info->line); +#endif + return -ENOIOCTLCMD; + } + return 0; +} + +static void +ctc_tty_set_termios(struct tty_struct *tty, struct termios *old_termios) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + unsigned int cflag = tty->termios->c_cflag; + + DBF_TEXT(trace, 4, __FUNCTION__); + ctc_tty_change_speed(info); + + /* Handle transition to B0 */ + if ((old_termios->c_cflag & CBAUD) && !(cflag & CBAUD)) { + info->mcr &= ~(UART_MCR_DTR|UART_MCR_RTS); + ctc_tty_transmit_status(info); + } + + /* Handle transition from B0 to other */ + if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { + info->mcr |= UART_MCR_DTR; + if (!(tty->termios->c_cflag & CRTSCTS) || + !test_bit(TTY_THROTTLED, &tty->flags)) { + info->mcr |= UART_MCR_RTS; + } + ctc_tty_transmit_status(info); + } + + /* Handle turning off CRTSCTS */ + if ((old_termios->c_cflag & CRTSCTS) && + !(tty->termios->c_cflag & CRTSCTS)) + tty->hw_stopped = 0; +} + +/* + * ------------------------------------------------------------ + * ctc_tty_open() and friends + * ------------------------------------------------------------ + */ +static int +ctc_tty_block_til_ready(struct tty_struct *tty, struct file *filp, ctc_tty_info *info) +{ + DECLARE_WAITQUEUE(wait, NULL); + int do_clocal = 0; + unsigned long flags; + int retval; + + DBF_TEXT(trace, 4, __FUNCTION__); + /* + * If the device is in the middle of being closed, then block + * until it's done, and then try again. + */ + if (tty_hung_up_p(filp) || + (info->flags & CTC_ASYNC_CLOSING)) { + if (info->flags & CTC_ASYNC_CLOSING) + wait_event(info->close_wait, + !(info->flags & CTC_ASYNC_CLOSING)); +#ifdef MODEM_DO_RESTART + if (info->flags & CTC_ASYNC_HUP_NOTIFY) + return -EAGAIN; + else + return -ERESTARTSYS; +#else + return -EAGAIN; +#endif + } + /* + * If non-blocking mode is set, then make the check up front + * and then exit. + */ + if ((filp->f_flags & O_NONBLOCK) || + (tty->flags & (1 << TTY_IO_ERROR))) { + info->flags |= CTC_ASYNC_NORMAL_ACTIVE; + return 0; + } + if (tty->termios->c_cflag & CLOCAL) + do_clocal = 1; + /* + * Block waiting for the carrier detect and the line to become + * free (i.e., not in use by the callout). While we are in + * this loop, info->count is dropped by one, so that + * ctc_tty_close() knows when to free things. We restore it upon + * exit, either normal or abnormal. + */ + retval = 0; + add_wait_queue(&info->open_wait, &wait); +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_block_til_ready before block: %s%d, count = %d\n", + CTC_TTY_NAME, info->line, info->count); +#endif + spin_lock_irqsave(&ctc_tty_lock, flags); + if (!(tty_hung_up_p(filp))) + info->count--; + spin_unlock_irqrestore(&ctc_tty_lock, flags); + info->blocked_open++; + while (1) { + set_current_state(TASK_INTERRUPTIBLE); + if (tty_hung_up_p(filp) || + !(info->flags & CTC_ASYNC_INITIALIZED)) { +#ifdef MODEM_DO_RESTART + if (info->flags & CTC_ASYNC_HUP_NOTIFY) + retval = -EAGAIN; + else + retval = -ERESTARTSYS; +#else + retval = -EAGAIN; +#endif + break; + } + if (!(info->flags & CTC_ASYNC_CLOSING) && + (do_clocal || (info->msr & UART_MSR_DCD))) { + break; + } + if (signal_pending(current)) { + retval = -ERESTARTSYS; + break; + } +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_block_til_ready blocking: %s%d, count = %d\n", + CTC_TTY_NAME, info->line, info->count); +#endif + schedule(); + } + current->state = TASK_RUNNING; + remove_wait_queue(&info->open_wait, &wait); + if (!tty_hung_up_p(filp)) + info->count++; + info->blocked_open--; +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_block_til_ready after blocking: %s%d, count = %d\n", + CTC_TTY_NAME, info->line, info->count); +#endif + if (retval) + return retval; + info->flags |= CTC_ASYNC_NORMAL_ACTIVE; + return 0; +} + +/* + * This routine is called whenever a serial port is opened. It + * enables interrupts for a serial port, linking in its async structure into + * the IRQ chain. It also performs the serial-specific + * initialization for the tty structure. + */ +static int +ctc_tty_open(struct tty_struct *tty, struct file *filp) +{ + ctc_tty_info *info; + unsigned long saveflags; + int retval, + line; + + DBF_TEXT(trace, 3, __FUNCTION__); + line = tty->index; + if (line < 0 || line > CTC_TTY_MAX_DEVICES) + return -ENODEV; + info = &driver->info[line]; + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_open")) + return -ENODEV; + if (!info->netdev) + return -ENODEV; +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_open %s, count = %d\n", tty->name, + info->count); +#endif + spin_lock_irqsave(&ctc_tty_lock, saveflags); + info->count++; + tty->driver_data = info; + info->tty = tty; + spin_unlock_irqrestore(&ctc_tty_lock, saveflags); + /* + * Start up serial port + */ + retval = ctc_tty_startup(info); + if (retval) { +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_open return after startup\n"); +#endif + return retval; + } + retval = ctc_tty_block_til_ready(tty, filp, info); + if (retval) { +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_open return after ctc_tty_block_til_ready \n"); +#endif + return retval; + } +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_open %s successful...\n", tty->name); +#endif + return 0; +} + +static void +ctc_tty_close(struct tty_struct *tty, struct file *filp) +{ + ctc_tty_info *info = (ctc_tty_info *) tty->driver_data; + ulong flags; + ulong timeout; + DBF_TEXT(trace, 3, __FUNCTION__); + if (!info || ctc_tty_paranoia_check(info, tty->name, "ctc_tty_close")) + return; + spin_lock_irqsave(&ctc_tty_lock, flags); + if (tty_hung_up_p(filp)) { + spin_unlock_irqrestore(&ctc_tty_lock, flags); +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_close return after tty_hung_up_p\n"); +#endif + return; + } + if ((tty->count == 1) && (info->count != 1)) { + /* + * Uh, oh. tty->count is 1, which means that the tty + * structure will be freed. Info->count should always + * be one in these conditions. If it's greater than + * one, we've got real problems, since it means the + * serial port won't be shutdown. + */ + printk(KERN_ERR "ctc_tty_close: bad port count; tty->count is 1, " + "info->count is %d\n", info->count); + info->count = 1; + } + if (--info->count < 0) { + printk(KERN_ERR "ctc_tty_close: bad port count for %s%d: %d\n", + CTC_TTY_NAME, info->line, info->count); + info->count = 0; + } + if (info->count) { + local_irq_restore(flags); +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_close after info->count != 0\n"); +#endif + return; + } + info->flags |= CTC_ASYNC_CLOSING; + tty->closing = 1; + /* + * At this point we stop accepting input. To do this, we + * disable the receive line status interrupts, and tell the + * interrupt driver to stop checking the data ready bit in the + * line status register. + */ + if (info->flags & CTC_ASYNC_INITIALIZED) { + tty_wait_until_sent(tty, 30*HZ); /* 30 seconds timeout */ + /* + * Before we drop DTR, make sure the UART transmitter + * has completely drained; this is especially + * important if there is a transmit FIFO! + */ + timeout = jiffies + HZ; + while (!(info->lsr & UART_LSR_TEMT)) { + spin_unlock_irqrestore(&ctc_tty_lock, flags); + msleep(500); + spin_lock_irqsave(&ctc_tty_lock, flags); + if (time_after(jiffies,timeout)) + break; + } + } + ctc_tty_shutdown(info); + if (tty->driver->flush_buffer) { + skb_queue_purge(&info->tx_queue); + info->lsr |= UART_LSR_TEMT; + } + tty_ldisc_flush(tty); + info->tty = 0; + tty->closing = 0; + if (info->blocked_open) { + msleep_interruptible(500); + wake_up_interruptible(&info->open_wait); + } + info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING); + wake_up_interruptible(&info->close_wait); + spin_unlock_irqrestore(&ctc_tty_lock, flags); +#ifdef CTC_DEBUG_MODEM_OPEN + printk(KERN_DEBUG "ctc_tty_close normal exit\n"); +#endif +} + +/* + * ctc_tty_hangup() --- called by tty_hangup() when a hangup is signaled. + */ +static void +ctc_tty_hangup(struct tty_struct *tty) +{ + ctc_tty_info *info = (ctc_tty_info *)tty->driver_data; + unsigned long saveflags; + DBF_TEXT(trace, 3, __FUNCTION__); + if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_hangup")) + return; + ctc_tty_shutdown(info); + info->count = 0; + info->flags &= ~CTC_ASYNC_NORMAL_ACTIVE; + spin_lock_irqsave(&ctc_tty_lock, saveflags); + info->tty = 0; + spin_unlock_irqrestore(&ctc_tty_lock, saveflags); + wake_up_interruptible(&info->open_wait); +} + + +/* + * For all online tty's, try sending data to + * the lower levels. + */ +static void +ctc_tty_task(unsigned long arg) +{ + ctc_tty_info *info = (void *)arg; + unsigned long saveflags; + int again; + + DBF_TEXT(trace, 3, __FUNCTION__); + spin_lock_irqsave(&ctc_tty_lock, saveflags); + if ((!ctc_tty_shuttingdown) && info) { + again = ctc_tty_tint(info); + if (!again) + info->lsr |= UART_LSR_TEMT; + again |= ctc_tty_readmodem(info); + if (again) { + tasklet_schedule(&info->tasklet); + } + } + spin_unlock_irqrestore(&ctc_tty_lock, saveflags); +} + +static struct tty_operations ctc_ops = { + .open = ctc_tty_open, + .close = ctc_tty_close, + .write = ctc_tty_write, + .flush_chars = ctc_tty_flush_chars, + .write_room = ctc_tty_write_room, + .chars_in_buffer = ctc_tty_chars_in_buffer, + .flush_buffer = ctc_tty_flush_buffer, + .ioctl = ctc_tty_ioctl, + .throttle = ctc_tty_throttle, + .unthrottle = ctc_tty_unthrottle, + .set_termios = ctc_tty_set_termios, + .hangup = ctc_tty_hangup, + .tiocmget = ctc_tty_tiocmget, + .tiocmset = ctc_tty_tiocmset, +}; + +int +ctc_tty_init(void) +{ + int i; + ctc_tty_info *info; + struct tty_driver *device; + + DBF_TEXT(trace, 2, __FUNCTION__); + driver = kmalloc(sizeof(ctc_tty_driver), GFP_KERNEL); + if (driver == NULL) { + printk(KERN_WARNING "Out of memory in ctc_tty_modem_init\n"); + return -ENOMEM; + } + memset(driver, 0, sizeof(ctc_tty_driver)); + device = alloc_tty_driver(CTC_TTY_MAX_DEVICES); + if (!device) { + kfree(driver); + printk(KERN_WARNING "Out of memory in ctc_tty_modem_init\n"); + return -ENOMEM; + } + + device->devfs_name = "ctc/" CTC_TTY_NAME; + device->name = CTC_TTY_NAME; + device->major = CTC_TTY_MAJOR; + device->minor_start = 0; + device->type = TTY_DRIVER_TYPE_SERIAL; + device->subtype = SERIAL_TYPE_NORMAL; + device->init_termios = tty_std_termios; + device->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + device->flags = TTY_DRIVER_REAL_RAW; + device->driver_name = "ctc_tty", + tty_set_operations(device, &ctc_ops); + if (tty_register_driver(device)) { + printk(KERN_WARNING "ctc_tty: Couldn't register serial-device\n"); + put_tty_driver(device); + kfree(driver); + return -1; + } + driver->ctc_tty_device = device; + for (i = 0; i < CTC_TTY_MAX_DEVICES; i++) { + info = &driver->info[i]; + init_MUTEX(&info->write_sem); + tasklet_init(&info->tasklet, ctc_tty_task, + (unsigned long) info); + info->magic = CTC_ASYNC_MAGIC; + info->line = i; + info->tty = 0; + info->count = 0; + info->blocked_open = 0; + init_waitqueue_head(&info->open_wait); + init_waitqueue_head(&info->close_wait); + skb_queue_head_init(&info->tx_queue); + skb_queue_head_init(&info->rx_queue); + init_timer(&info->stoptimer); + info->stoptimer.function = ctc_tty_stopdev; + info->stoptimer.data = (unsigned long)info; + info->mcr = UART_MCR_RTS; + } + return 0; +} + +int +ctc_tty_register_netdev(struct net_device *dev) { + int ttynum; + char *err; + char *p; + + DBF_TEXT(trace, 2, __FUNCTION__); + if ((!dev) || (!dev->name)) { + printk(KERN_WARNING + "ctc_tty_register_netdev called " + "with NULL dev or NULL dev-name\n"); + return -1; + } + + /* + * If the name is a format string the caller wants us to + * do a name allocation : format string must end with %d + */ + if (strchr(dev->name, '%')) + { + int err = dev_alloc_name(dev, dev->name); // dev->name is changed by this + if (err < 0) { + printk(KERN_DEBUG "dev_alloc returned error %d\n", err); + return err; + } + + } + + for (p = dev->name; p && ((*p < '0') || (*p > '9')); p++); + ttynum = simple_strtoul(p, &err, 0); + if ((ttynum < 0) || (ttynum >= CTC_TTY_MAX_DEVICES) || + (err && *err)) { + printk(KERN_WARNING + "ctc_tty_register_netdev called " + "with number in name '%s'\n", dev->name); + return -1; + } + if (driver->info[ttynum].netdev) { + printk(KERN_WARNING + "ctc_tty_register_netdev called " + "for already registered device '%s'\n", + dev->name); + return -1; + } + driver->info[ttynum].netdev = dev; + return 0; +} + +void +ctc_tty_unregister_netdev(struct net_device *dev) { + int i; + unsigned long saveflags; + ctc_tty_info *info = NULL; + + DBF_TEXT(trace, 2, __FUNCTION__); + spin_lock_irqsave(&ctc_tty_lock, saveflags); + for (i = 0; i < CTC_TTY_MAX_DEVICES; i++) + if (driver->info[i].netdev == dev) { + info = &driver->info[i]; + break; + } + if (info) { + info->netdev = NULL; + skb_queue_purge(&info->tx_queue); + skb_queue_purge(&info->rx_queue); + } + spin_unlock_irqrestore(&ctc_tty_lock, saveflags); +} + +void +ctc_tty_cleanup(void) { + unsigned long saveflags; + + DBF_TEXT(trace, 2, __FUNCTION__); + spin_lock_irqsave(&ctc_tty_lock, saveflags); + ctc_tty_shuttingdown = 1; + spin_unlock_irqrestore(&ctc_tty_lock, saveflags); + tty_unregister_driver(driver->ctc_tty_device); + put_tty_driver(driver->ctc_tty_device); + kfree(driver); + driver = NULL; +} diff --git a/drivers/s390/net/ctctty.h b/drivers/s390/net/ctctty.h new file mode 100644 index 000000000..7254dc006 --- /dev/null +++ b/drivers/s390/net/ctctty.h @@ -0,0 +1,35 @@ +/* + * CTC / ESCON network driver, tty interface. + * + * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.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, 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 _CTCTTY_H_ +#define _CTCTTY_H_ + +#include +#include + +extern int ctc_tty_register_netdev(struct net_device *); +extern void ctc_tty_unregister_netdev(struct net_device *); +extern void ctc_tty_netif_rx(struct sk_buff *); +extern int ctc_tty_init(void); +extern void ctc_tty_cleanup(void); +extern void ctc_tty_setcarrier(struct net_device *, int); + +#endif diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c index 2c1db8036..7145e2134 100644 --- a/drivers/s390/net/fsm.c +++ b/drivers/s390/net/fsm.c @@ -4,6 +4,7 @@ */ #include "fsm.h" +#include #include #include diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 821dde86e..e0c7deb98 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -335,8 +336,8 @@ do { \ #else -#define iucv_debug(lvl, fmt, args...) do { } while (0) -#define iucv_dumpit(title, buf, len) do { } while (0) +#define iucv_debug(lvl, fmt, args...) +#define iucv_dumpit(title, buf, len) #endif @@ -692,7 +693,7 @@ iucv_retrieve_buffer (void) iucv_debug(1, "entering"); if (iucv_cpuid != -1) { smp_call_function_on(iucv_retrieve_buffer_cpuid, - NULL, 0, 1, iucv_cpuid); + 0, 0, 1, iucv_cpuid); /* Release the cpu reserved by iucv_declare_buffer. */ smp_put_cpu(iucv_cpuid); iucv_cpuid = -1; diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 16ac68c27..f94419b33 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -670,8 +670,9 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) int index, rc; LCS_DBF_TEXT(5, trace, "rdybuff"); - BUG_ON(buffer->state != BUF_STATE_LOCKED && - buffer->state != BUF_STATE_PROCESSED); + if (buffer->state != BUF_STATE_LOCKED && + buffer->state != BUF_STATE_PROCESSED) + BUG(); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); buffer->state = BUF_STATE_READY; index = buffer - channel->iob; @@ -695,7 +696,8 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) int index, prev, next; LCS_DBF_TEXT(5, trace, "prcsbuff"); - BUG_ON(buffer->state != BUF_STATE_READY); + if (buffer->state != BUF_STATE_READY) + BUG(); buffer->state = BUF_STATE_PROCESSED; index = buffer - channel->iob; prev = (index - 1) & (LCS_NUM_BUFFS - 1); @@ -727,8 +729,9 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) unsigned long flags; LCS_DBF_TEXT(5, trace, "relbuff"); - BUG_ON(buffer->state != BUF_STATE_LOCKED && - buffer->state != BUF_STATE_PROCESSED); + if (buffer->state != BUF_STATE_LOCKED && + buffer->state != BUF_STATE_PROCESSED) + BUG(); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); buffer->state = BUF_STATE_EMPTY; spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); @@ -1137,9 +1140,10 @@ list_modified: } } /* re-insert all entries from the failed_list into ipm_list */ - list_for_each_entry_safe(ipm, tmp, &failed_list, list) - list_move_tail(&ipm->list, &card->ipm_list); - + list_for_each_entry_safe(ipm, tmp, &failed_list, list) { + list_del_init(&ipm->list); + list_add_tail(&ipm->list, &card->ipm_list); + } spin_unlock_irqrestore(&card->ipm_lock, flags); } diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index d7d1cc0a5..b452cc1af 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c @@ -112,12 +112,7 @@ struct iucv_connection { /** * Linked list of all connection structs. */ -struct iucv_connection_struct { - struct iucv_connection *iucv_connections; - rwlock_t iucv_rwlock; -}; - -static struct iucv_connection_struct iucv_conns; +static struct iucv_connection *iucv_connections; /** * Representation of event-data for the @@ -1373,10 +1368,8 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf, struct net_device *ndev = priv->conn->netdev; char *p; char *tmp; - char username[9]; + char username[10]; int i; - struct iucv_connection **clist = &iucv_conns.iucv_connections; - unsigned long flags; IUCV_DBF_TEXT(trace, 3, __FUNCTION__); if (count>9) { @@ -1389,7 +1382,7 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf, tmp = strsep((char **) &buf, "\n"); for (i=0, p=tmp; i<8 && *p; i++, p++) { if (isalnum(*p) || (*p == '$')) - username[i]= toupper(*p); + username[i]= *p; else if (*p == '\n') { /* trailing lf, grr */ break; @@ -1402,11 +1395,11 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf, return -EINVAL; } } - while (i<8) + while (i<9) username[i++] = ' '; - username[8] = '\0'; + username[9] = '\0'; - if (memcmp(username, priv->conn->userid, 9)) { + if (memcmp(username, priv->conn->userid, 8)) { /* username changed */ if (ndev->flags & (IFF_UP | IFF_RUNNING)) { PRINT_WARN( @@ -1417,19 +1410,6 @@ user_write (struct device *dev, struct device_attribute *attr, const char *buf, return -EBUSY; } } - read_lock_irqsave(&iucv_conns.iucv_rwlock, flags); - while (*clist) { - if (!strncmp(username, (*clist)->userid, 9) || - ((*clist)->netdev != ndev)) - break; - clist = &((*clist)->next); - } - read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); - if (*clist) { - PRINT_WARN("netiucv: Connection to %s already exists\n", - username); - return -EEXIST; - } memcpy(priv->conn->userid, username, 9); return count; @@ -1801,15 +1781,13 @@ netiucv_unregister_device(struct device *dev) static struct iucv_connection * netiucv_new_connection(struct net_device *dev, char *username) { - unsigned long flags; - struct iucv_connection **clist = &iucv_conns.iucv_connections; + struct iucv_connection **clist = &iucv_connections; struct iucv_connection *conn = kzalloc(sizeof(struct iucv_connection), GFP_KERNEL); if (conn) { skb_queue_head_init(&conn->collect_queue); skb_queue_head_init(&conn->commit_queue); - spin_lock_init(&conn->collect_lock); conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; conn->netdev = dev; @@ -1844,10 +1822,8 @@ netiucv_new_connection(struct net_device *dev, char *username) fsm_newstate(conn->fsm, CONN_STATE_STOPPED); } - write_lock_irqsave(&iucv_conns.iucv_rwlock, flags); conn->next = *clist; *clist = conn; - write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); } return conn; } @@ -1859,17 +1835,14 @@ netiucv_new_connection(struct net_device *dev, char *username) static void netiucv_remove_connection(struct iucv_connection *conn) { - struct iucv_connection **clist = &iucv_conns.iucv_connections; - unsigned long flags; + struct iucv_connection **clist = &iucv_connections; IUCV_DBF_TEXT(trace, 3, __FUNCTION__); if (conn == NULL) return; - write_lock_irqsave(&iucv_conns.iucv_rwlock, flags); while (*clist) { if (*clist == conn) { *clist = conn->next; - write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); if (conn->handle) { iucv_unregister_program(conn->handle); conn->handle = NULL; @@ -1882,7 +1855,6 @@ netiucv_remove_connection(struct iucv_connection *conn) } clist = &((*clist)->next); } - write_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); } /** @@ -1975,11 +1947,9 @@ static ssize_t conn_write(struct device_driver *drv, const char *buf, size_t count) { char *p; - char username[9]; + char username[10]; int i, ret; struct net_device *dev; - struct iucv_connection **clist = &iucv_conns.iucv_connections; - unsigned long flags; IUCV_DBF_TEXT(trace, 3, __FUNCTION__); if (count>9) { @@ -1990,7 +1960,7 @@ conn_write(struct device_driver *drv, const char *buf, size_t count) for (i=0, p=(char *)buf; i<8 && *p; i++, p++) { if (isalnum(*p) || (*p == '$')) - username[i]= toupper(*p); + username[i]= *p; else if (*p == '\n') { /* trailing lf, grr */ break; @@ -2001,22 +1971,9 @@ conn_write(struct device_driver *drv, const char *buf, size_t count) return -EINVAL; } } - while (i<8) + while (i<9) username[i++] = ' '; - username[8] = '\0'; - - read_lock_irqsave(&iucv_conns.iucv_rwlock, flags); - while (*clist) { - if (!strncmp(username, (*clist)->userid, 9)) - break; - clist = &((*clist)->next); - } - read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); - if (*clist) { - PRINT_WARN("netiucv: Connection to %s already exists\n", - username); - return -EEXIST; - } + username[9] = '\0'; dev = netiucv_init_netdevice(username); if (!dev) { PRINT_WARN( @@ -2058,8 +2015,7 @@ DRIVER_ATTR(connection, 0200, NULL, conn_write); static ssize_t remove_write (struct device_driver *drv, const char *buf, size_t count) { - struct iucv_connection **clist = &iucv_conns.iucv_connections; - unsigned long flags; + struct iucv_connection **clist = &iucv_connections; struct net_device *ndev; struct netiucv_priv *priv; struct device *dev; @@ -2070,10 +2026,10 @@ remove_write (struct device_driver *drv, const char *buf, size_t count) IUCV_DBF_TEXT(trace, 3, __FUNCTION__); if (count >= IFNAMSIZ) - count = IFNAMSIZ - 1;; + count = IFNAMSIZ-1; for (i=0, p=(char *)buf; inetdev; priv = (struct netiucv_priv*)ndev->priv; @@ -2092,7 +2047,6 @@ remove_write (struct device_driver *drv, const char *buf, size_t count) clist = &((*clist)->next); continue; } - read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); if (ndev->flags & (IFF_UP | IFF_RUNNING)) { PRINT_WARN( "netiucv: net device %s active with peer %s\n", @@ -2106,7 +2060,6 @@ remove_write (struct device_driver *drv, const char *buf, size_t count) netiucv_unregister_device(dev); return count; } - read_unlock_irqrestore(&iucv_conns.iucv_rwlock, flags); PRINT_WARN("netiucv: net device %s unknown\n", name); IUCV_DBF_TEXT(data, 2, "remove_write: unknown device\n"); return -EINVAL; @@ -2124,8 +2077,8 @@ static void __exit netiucv_exit(void) { IUCV_DBF_TEXT(trace, 3, __FUNCTION__); - while (iucv_conns.iucv_connections) { - struct net_device *ndev = iucv_conns.iucv_connections->netdev; + while (iucv_connections) { + struct net_device *ndev = iucv_connections->netdev; struct netiucv_priv *priv = (struct netiucv_priv*)ndev->priv; struct device *dev = priv->dev; @@ -2167,7 +2120,6 @@ netiucv_init(void) if (!ret) { ret = driver_create_file(&netiucv_driver, &driver_attr_remove); netiucv_banner(); - rwlock_init(&iucv_conns.iucv_rwlock); } else { PRINT_ERR("NETIUCV: failed to add driver attribute.\n"); IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_create_file\n", ret); diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 821383d8c..619f4a0c7 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h @@ -176,6 +176,7 @@ extern struct ccwgroup_driver qeth_ccwgroup_driver; /** * card stuff */ +#ifdef CONFIG_QETH_PERF_STATS struct qeth_perf_stats { unsigned int bufs_rec; unsigned int bufs_sent; @@ -210,10 +211,8 @@ struct qeth_perf_stats { unsigned int large_send_cnt; unsigned int sg_skbs_sent; unsigned int sg_frags_sent; - /* initial values when measuring starts */ - unsigned long initial_rx_packets; - unsigned long initial_tx_packets; }; +#endif /* CONFIG_QETH_PERF_STATS */ /* Routing stuff */ struct qeth_routing_info { @@ -463,7 +462,6 @@ enum qeth_qdio_info_states { QETH_QDIO_UNINITIALIZED, QETH_QDIO_ALLOCATED, QETH_QDIO_ESTABLISHED, - QETH_QDIO_CLEANING }; struct qeth_buffer_pool_entry { @@ -538,7 +536,7 @@ struct qeth_qdio_out_q { } __attribute__ ((aligned(256))); struct qeth_qdio_info { - atomic_t state; + volatile enum qeth_qdio_info_states state; /* input */ struct qeth_qdio_q *in_q; struct qeth_qdio_buffer_pool in_buf_pool; @@ -769,7 +767,6 @@ struct qeth_card_options { int fake_ll; int layer2; enum qeth_large_send_types large_send; - int performance_stats; }; /* @@ -822,7 +819,9 @@ struct qeth_card { struct list_head cmd_waiter_list; /* QDIO buffer handling */ struct qeth_qdio_info qdio; +#ifdef CONFIG_QETH_PERF_STATS struct qeth_perf_stats perf_stats; +#endif /* CONFIG_QETH_PERF_STATS */ int use_hard_stop; int (*orig_hard_header)(struct sk_buff *,struct net_device *, unsigned short,void *,void *,unsigned); @@ -860,18 +859,23 @@ qeth_get_ipa_adp_type(enum qeth_link_types link_type) } } -static inline struct sk_buff * -qeth_realloc_headroom(struct qeth_card *card, struct sk_buff *skb, int size) +static inline int +qeth_realloc_headroom(struct qeth_card *card, struct sk_buff **skb, int size) { - struct sk_buff *new_skb = skb; - - if (skb_headroom(skb) >= size) - return skb; - new_skb = skb_realloc_headroom(skb, size); - if (!new_skb) - PRINT_ERR("Could not realloc headroom for qeth_hdr " - "on interface %s", QETH_CARD_IFNAME(card)); - return new_skb; + struct sk_buff *new_skb = NULL; + + if (skb_headroom(*skb) < size){ + new_skb = skb_realloc_headroom(*skb, size); + if (!new_skb) { + PRINT_ERR("qeth_prepare_skb: could " + "not realloc headroom for qeth_hdr " + "on interface %s", QETH_CARD_IFNAME(card)); + return -ENOMEM; + } + kfree_skb(*skb); + *skb = new_skb; + } + return 0; } static inline struct sk_buff * @@ -881,15 +885,16 @@ qeth_pskb_unshare(struct sk_buff *skb, int pri) if (!skb_cloned(skb)) return skb; nskb = skb_copy(skb, pri); + kfree_skb(skb); /* free our shared copy */ return nskb; } static inline void * -qeth_push_skb(struct qeth_card *card, struct sk_buff *skb, int size) +qeth_push_skb(struct qeth_card *card, struct sk_buff **skb, int size) { void *hdr; - hdr = (void *) skb_push(skb, size); + hdr = (void *) skb_push(*skb, size); /* * sanity check, the Linux memory allocation scheme should * never present us cases like this one (the qdio header size plus @@ -898,7 +903,8 @@ qeth_push_skb(struct qeth_card *card, struct sk_buff *skb, int size) if ((((unsigned long) hdr) & (~(PAGE_SIZE - 1))) != (((unsigned long) hdr + size + QETH_IP_HEADER_SIZE) & (~(PAGE_SIZE - 1)))) { - PRINT_ERR("Misaligned packet on interface %s. Discarded.", + PRINT_ERR("qeth_prepare_skb: misaligned " + "packet on interface %s. Discarded.", QETH_CARD_IFNAME(card)); return NULL; } @@ -1050,11 +1056,13 @@ qeth_get_arphdr_type(int cardtype, int linktype) } } +#ifdef CONFIG_QETH_PERF_STATS static inline int qeth_get_micros(void) { return (int) (get_clock() >> 12); } +#endif static inline int qeth_get_qdio_q_format(struct qeth_card *card) @@ -1088,11 +1096,10 @@ qeth_string_to_ipaddr4(const char *buf, __u8 *addr) { int count = 0, rc = 0; int in[4]; - char c; - rc = sscanf(buf, "%u.%u.%u.%u%c", - &in[0], &in[1], &in[2], &in[3], &c); - if (rc != 4 && (rc != 5 || c != '\n')) + rc = sscanf(buf, "%d.%d.%d.%d%n", + &in[0], &in[1], &in[2], &in[3], &count); + if (rc != 4 || count<=0) return -EINVAL; for (count = 0; count < 4; count++) { if (in[count] > 255) @@ -1116,28 +1123,24 @@ qeth_ipaddr6_to_string(const __u8 *addr, char *buf) static inline int qeth_string_to_ipaddr6(const char *buf, __u8 *addr) { - const char *end, *end_tmp, *start; + char *end, *start; __u16 *in; char num[5]; int num2, cnt, out, found, save_cnt; unsigned short in_tmp[8] = {0, }; cnt = out = found = save_cnt = num2 = 0; - end = start = buf; + end = start = (char *) buf; in = (__u16 *) addr; memset(in, 0, 16); - while (*end) { - end = strchr(start,':'); + while (end) { + end = strchr(end,':'); if (end == NULL) { - end = buf + strlen(buf); - if ((end_tmp = strchr(start, '\n')) != NULL) - end = end_tmp; - out = 1; + end = (char *)buf + (strlen(buf)); + out = 1; } if ((end - start)) { memset(num, 0, 5); - if ((end - start) > 4) - return -EINVAL; memcpy(num, start, end - start); if (!qeth_isxdigit(num)) return -EINVAL; @@ -1155,8 +1158,6 @@ qeth_string_to_ipaddr6(const char *buf, __u8 *addr) } start = ++end; } - if (cnt + save_cnt > 8) - return -EINVAL; cnt = 7; while (save_cnt) in[cnt--] = in_tmp[--save_cnt]; diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index a363721cf..38aad8321 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c @@ -8,6 +8,7 @@ * Author(s): Thomas Spatzier * */ +#include #include #include #include @@ -179,8 +180,9 @@ out_check: flush_cnt++; } } else { - if (queue->card->options.performance_stats) - queue->card->perf_stats.skbs_sent_pack++; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.skbs_sent_pack++; +#endif QETH_DBF_TEXT(trace, 6, "fillbfpa"); if (buf->next_element_to_fill >= QETH_MAX_BUFFER_ELEMENTS(queue->card)) { diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 5613b4564..290866932 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -27,6 +27,7 @@ */ +#include #include #include #include @@ -84,8 +85,6 @@ static debug_info_t *qeth_dbf_qerr = NULL; DEFINE_PER_CPU(char[256], qeth_dbf_txt_buf); -static struct lock_class_key qdio_out_skb_queue_key; - /** * some more definitions and declarations */ @@ -1073,7 +1072,6 @@ qeth_set_intial_options(struct qeth_card *card) card->options.layer2 = 1; else card->options.layer2 = 0; - card->options.performance_stats = 1; } /** @@ -1709,7 +1707,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) "IP address reset.\n", QETH_CARD_IFNAME(card), card->info.chpid); - netif_carrier_on(card->dev); qeth_schedule_recovery(card); return NULL; case IPA_CMD_MODCCID: @@ -2466,6 +2463,24 @@ qeth_rebuild_skb_fake_ll(struct qeth_card *card, struct sk_buff *skb, qeth_rebuild_skb_fake_ll_eth(card, skb, hdr); } +static inline void +qeth_rebuild_skb_vlan(struct qeth_card *card, struct sk_buff *skb, + struct qeth_hdr *hdr) +{ +#ifdef CONFIG_QETH_VLAN + u16 *vlan_tag; + + if (hdr->hdr.l3.ext_flags & + (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) { + vlan_tag = (u16 *) skb_push(skb, VLAN_HLEN); + *vlan_tag = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)? + hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]); + *(vlan_tag + 1) = skb->protocol; + skb->protocol = __constant_htons(ETH_P_8021Q); + } +#endif /* CONFIG_QETH_VLAN */ +} + static inline __u16 qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, struct qeth_hdr *hdr) @@ -2494,16 +2509,15 @@ qeth_layer2_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, return vlan_id; } -static inline __u16 +static inline void qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, struct qeth_hdr *hdr) { - unsigned short vlan_id = 0; #ifdef CONFIG_QETH_IPV6 if (hdr->hdr.l3.flags & QETH_HDR_PASSTHRU) { skb->pkt_type = PACKET_HOST; skb->protocol = qeth_type_trans(skb, card->dev); - return 0; + return; } #endif /* CONFIG_QETH_IPV6 */ skb->protocol = htons((hdr->hdr.l3.flags & QETH_HDR_IPV6)? ETH_P_IPV6 : @@ -2525,13 +2539,7 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, default: skb->pkt_type = PACKET_HOST; } - - if (hdr->hdr.l3.ext_flags & - (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) { - vlan_id = (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_VLAN_FRAME)? - hdr->hdr.l3.vlan_id : *((u16 *)&hdr->hdr.l3.dest_addr[12]); - } - + qeth_rebuild_skb_vlan(card, skb, hdr); if (card->options.fake_ll) qeth_rebuild_skb_fake_ll(card, skb, hdr); else @@ -2547,7 +2555,6 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, else skb->ip_summed = SW_CHECKSUMMING; } - return vlan_id; } static inline void @@ -2560,20 +2567,20 @@ qeth_process_inbound_buffer(struct qeth_card *card, int offset; int rxrc; __u16 vlan_tag = 0; - __u16 *vlan_addr; /* get first element of current buffer */ element = (struct qdio_buffer_element *)&buf->buffer->element[0]; offset = 0; - if (card->options.performance_stats) - card->perf_stats.bufs_rec++; +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.bufs_rec++; +#endif while((skb = qeth_get_next_skb(card, buf->buffer, &element, &offset, &hdr))) { skb->dev = card->dev; if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) - vlan_tag = qeth_rebuild_skb(card, skb, hdr); + qeth_rebuild_skb(card, skb, hdr); else { /*in case of OSN*/ skb_push(skb, sizeof(struct qeth_hdr)); memcpy(skb->data, hdr, sizeof(struct qeth_hdr)); @@ -2583,19 +2590,14 @@ qeth_process_inbound_buffer(struct qeth_card *card, dev_kfree_skb_any(skb); continue; } - if (card->info.type == QETH_CARD_TYPE_OSN) - rxrc = card->osn_info.data_cb(skb); - else #ifdef CONFIG_QETH_VLAN if (vlan_tag) - if (card->vlangrp) - vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); - else { - dev_kfree_skb_any(skb); - continue; - } + vlan_hwaccel_rx(skb, card->vlangrp, vlan_tag); else #endif + if (card->info.type == QETH_CARD_TYPE_OSN) + rxrc = card->osn_info.data_cb(skb); + else rxrc = netif_rx(skb); card->dev->last_rx = jiffies; card->stats.rx_packets++; @@ -2623,7 +2625,7 @@ qeth_init_input_buffer(struct qeth_card *card, struct qeth_qdio_buffer *buf) { struct qeth_buffer_pool_entry *pool_entry; int i; - + pool_entry = qeth_get_buffer_pool_entry(card); /* * since the buffer is accessed only from the input_tasklet @@ -2697,18 +2699,17 @@ qeth_queue_input_buffer(struct qeth_card *card, int index) * 'index') un-requeued -> this buffer is the first buffer that * will be requeued the next time */ - if (card->options.performance_stats) { - card->perf_stats.inbound_do_qdio_cnt++; - card->perf_stats.inbound_do_qdio_start_time = - qeth_get_micros(); - } +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.inbound_do_qdio_cnt++; + card->perf_stats.inbound_do_qdio_start_time = qeth_get_micros(); +#endif rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT, 0, queue->next_buf_to_init, count, NULL); - if (card->options.performance_stats) - card->perf_stats.inbound_do_qdio_time += - qeth_get_micros() - - card->perf_stats.inbound_do_qdio_start_time; +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.inbound_do_qdio_time += qeth_get_micros() - + card->perf_stats.inbound_do_qdio_start_time; +#endif if (rc){ PRINT_WARN("qeth_queue_input_buffer's do_QDIO " "return %i (device %s).\n", @@ -2744,10 +2745,10 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, QETH_DBF_TEXT(trace, 6, "qdinput"); card = (struct qeth_card *) card_ptr; net_dev = card->dev; - if (card->options.performance_stats) { - card->perf_stats.inbound_cnt++; - card->perf_stats.inbound_start_time = qeth_get_micros(); - } +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.inbound_cnt++; + card->perf_stats.inbound_start_time = qeth_get_micros(); +#endif if (status & QDIO_STATUS_LOOK_FOR_ERROR) { if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION){ QETH_DBF_TEXT(trace, 1,"qdinchk"); @@ -2769,9 +2770,10 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, qeth_put_buffer_pool_entry(card, buffer->pool_entry); qeth_queue_input_buffer(card, index); } - if (card->options.performance_stats) - card->perf_stats.inbound_time += qeth_get_micros() - - card->perf_stats.inbound_start_time; +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.inbound_time += qeth_get_micros() - + card->perf_stats.inbound_start_time; +#endif } static inline int @@ -2861,11 +2863,10 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, } queue->card->dev->trans_start = jiffies; - if (queue->card->options.performance_stats) { - queue->card->perf_stats.outbound_do_qdio_cnt++; - queue->card->perf_stats.outbound_do_qdio_start_time = - qeth_get_micros(); - } +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.outbound_do_qdio_cnt++; + queue->card->perf_stats.outbound_do_qdio_start_time = qeth_get_micros(); +#endif if (under_int) rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT, @@ -2873,10 +2874,10 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, else rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT, queue->queue_no, index, count, NULL); - if (queue->card->options.performance_stats) - queue->card->perf_stats.outbound_do_qdio_time += - qeth_get_micros() - - queue->card->perf_stats.outbound_do_qdio_start_time; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.outbound_do_qdio_time += qeth_get_micros() - + queue->card->perf_stats.outbound_do_qdio_start_time; +#endif if (rc){ QETH_DBF_TEXT(trace, 2, "flushbuf"); QETH_DBF_TEXT_(trace, 2, " err%d", rc); @@ -2888,8 +2889,9 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, return; } atomic_add(count, &queue->used_buffers); - if (queue->card->options.performance_stats) - queue->card->perf_stats.bufs_sent += count; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.bufs_sent += count; +#endif } /* @@ -2904,8 +2906,9 @@ qeth_switch_to_packing_if_needed(struct qeth_qdio_out_q *queue) >= QETH_HIGH_WATERMARK_PACK){ /* switch non-PACKING -> PACKING */ QETH_DBF_TEXT(trace, 6, "np->pack"); - if (queue->card->options.performance_stats) - queue->card->perf_stats.sc_dp_p++; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.sc_dp_p++; +#endif queue->do_pack = 1; } } @@ -2928,8 +2931,9 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue) <= QETH_LOW_WATERMARK_PACK) { /* switch PACKING -> non-PACKING */ QETH_DBF_TEXT(trace, 6, "pack->np"); - if (queue->card->options.performance_stats) - queue->card->perf_stats.sc_p_dp++; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.sc_p_dp++; +#endif queue->do_pack = 0; /* flush packing buffers */ buffer = &queue->bufs[queue->next_buf_to_fill]; @@ -2941,7 +2945,7 @@ qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue) queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % QDIO_MAX_BUFFERS_PER_Q; - } + } } } return flush_count; @@ -2997,10 +3001,11 @@ qeth_check_outbound_queue(struct qeth_qdio_out_q *queue) !atomic_read(&queue->set_pci_flags_count)) flush_cnt += qeth_flush_buffers_on_no_pci(queue); - if (queue->card->options.performance_stats && - q_was_packing) +#ifdef CONFIG_QETH_PERF_STATS + if (q_was_packing) queue->card->perf_stats.bufs_sent_pack += flush_cnt; +#endif if (flush_cnt) qeth_flush_buffers(queue, 1, index, flush_cnt); atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); @@ -3030,11 +3035,10 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, return; } } - if (card->options.performance_stats) { - card->perf_stats.outbound_handler_cnt++; - card->perf_stats.outbound_handler_start_time = - qeth_get_micros(); - } +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.outbound_handler_cnt++; + card->perf_stats.outbound_handler_start_time = qeth_get_micros(); +#endif for(i = first_element; i < (first_element + count); ++i){ buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; /*we only handle the KICK_IT error by doing a recovery */ @@ -3053,9 +3057,10 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, qeth_check_outbound_queue(queue); netif_wake_queue(queue->card->dev); - if (card->options.performance_stats) - card->perf_stats.outbound_handler_time += qeth_get_micros() - - card->perf_stats.outbound_handler_start_time; +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.outbound_handler_time += qeth_get_micros() - + card->perf_stats.outbound_handler_start_time; +#endif } static void @@ -3179,14 +3184,13 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) QETH_DBF_TEXT(setup, 2, "allcqdbf"); - if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED, - QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED) + if (card->qdio.state == QETH_QDIO_ALLOCATED) return 0; card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL|GFP_DMA); if (!card->qdio.in_q) - goto out_nomem; + return - ENOMEM; QETH_DBF_TEXT(setup, 2, "inq"); QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *)); memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q)); @@ -3195,19 +3199,27 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) card->qdio.in_q->bufs[i].buffer = &card->qdio.in_q->qdio_bufs[i]; /* inbound buffer pool */ - if (qeth_alloc_buffer_pool(card)) - goto out_freeinq; + if (qeth_alloc_buffer_pool(card)){ + kfree(card->qdio.in_q); + return -ENOMEM; + } /* outbound */ card->qdio.out_qs = kmalloc(card->qdio.no_out_queues * sizeof(struct qeth_qdio_out_q *), GFP_KERNEL); - if (!card->qdio.out_qs) - goto out_freepool; - for (i = 0; i < card->qdio.no_out_queues; ++i) { + if (!card->qdio.out_qs){ + qeth_free_buffer_pool(card); + return -ENOMEM; + } + for (i = 0; i < card->qdio.no_out_queues; ++i){ card->qdio.out_qs[i] = kmalloc(sizeof(struct qeth_qdio_out_q), GFP_KERNEL|GFP_DMA); - if (!card->qdio.out_qs[i]) - goto out_freeoutq; + if (!card->qdio.out_qs[i]){ + while (i > 0) + kfree(card->qdio.out_qs[--i]); + kfree(card->qdio.out_qs); + return -ENOMEM; + } QETH_DBF_TEXT_(setup, 2, "outq %i", i); QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *)); memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q)); @@ -3218,25 +3230,11 @@ qeth_alloc_qdio_buffers(struct qeth_card *card) &card->qdio.out_qs[i]->qdio_bufs[j]; skb_queue_head_init(&card->qdio.out_qs[i]->bufs[j]. skb_list); - lockdep_set_class( - &card->qdio.out_qs[i]->bufs[j].skb_list.lock, - &qdio_out_skb_queue_key); INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list); } } + card->qdio.state = QETH_QDIO_ALLOCATED; return 0; - -out_freeoutq: - while (i > 0) - kfree(card->qdio.out_qs[--i]); - kfree(card->qdio.out_qs); -out_freepool: - qeth_free_buffer_pool(card); -out_freeinq: - kfree(card->qdio.in_q); -out_nomem: - atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED); - return -ENOMEM; } static void @@ -3245,8 +3243,7 @@ qeth_free_qdio_buffers(struct qeth_card *card) int i, j; QETH_DBF_TEXT(trace, 2, "freeqdbf"); - if (atomic_swap(&card->qdio.state, QETH_QDIO_UNINITIALIZED) == - QETH_QDIO_UNINITIALIZED) + if (card->qdio.state == QETH_QDIO_UNINITIALIZED) return; kfree(card->qdio.in_q); /* inbound buffer pool */ @@ -3259,6 +3256,7 @@ qeth_free_qdio_buffers(struct qeth_card *card) kfree(card->qdio.out_qs[i]); } kfree(card->qdio.out_qs); + card->qdio.state = QETH_QDIO_UNINITIALIZED; } static void @@ -3280,7 +3278,7 @@ static void qeth_init_qdio_info(struct qeth_card *card) { QETH_DBF_TEXT(setup, 4, "intqdinf"); - atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED); + card->qdio.state = QETH_QDIO_UNINITIALIZED; /* inbound */ card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; card->qdio.init_pool.buf_count = QETH_IN_BUF_COUNT_DEFAULT; @@ -3343,7 +3341,7 @@ qeth_qdio_establish(struct qeth_card *card) struct qdio_buffer **in_sbal_ptrs; struct qdio_buffer **out_sbal_ptrs; int i, j, k; - int rc = 0; + int rc; QETH_DBF_TEXT(setup, 2, "qdioest"); @@ -3402,10 +3400,8 @@ qeth_qdio_establish(struct qeth_card *card) init_data.input_sbal_addr_array = (void **) in_sbal_ptrs; init_data.output_sbal_addr_array = (void **) out_sbal_ptrs; - if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED, - QETH_QDIO_ESTABLISHED) == QETH_QDIO_ALLOCATED) - if ((rc = qdio_initialize(&init_data))) - atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); + if (!(rc = qdio_initialize(&init_data))) + card->qdio.state = QETH_QDIO_ESTABLISHED; kfree(out_sbal_ptrs); kfree(in_sbal_ptrs); @@ -3521,20 +3517,13 @@ qeth_qdio_clear_card(struct qeth_card *card, int use_halt) int rc = 0; QETH_DBF_TEXT(trace,3,"qdioclr"); - switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED, - QETH_QDIO_CLEANING)) { - case QETH_QDIO_ESTABLISHED: + if (card->qdio.state == QETH_QDIO_ESTABLISHED){ if ((rc = qdio_cleanup(CARD_DDEV(card), - (card->info.type == QETH_CARD_TYPE_IQD) ? - QDIO_FLAG_CLEANUP_USING_HALT : - QDIO_FLAG_CLEANUP_USING_CLEAR))) + (card->info.type == QETH_CARD_TYPE_IQD) ? + QDIO_FLAG_CLEANUP_USING_HALT : + QDIO_FLAG_CLEANUP_USING_CLEAR))) QETH_DBF_TEXT_(trace, 3, "1err%d", rc); - atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); - break; - case QETH_QDIO_CLEANING: - return rc; - default: - break; + card->qdio.state = QETH_QDIO_ALLOCATED; } if ((rc = qeth_clear_halt_card(card, use_halt))) QETH_DBF_TEXT_(trace, 3, "2err%d", rc); @@ -3694,10 +3683,10 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) /* return OK; otherwise ksoftirqd goes to 100% */ return NETDEV_TX_OK; } - if (card->options.performance_stats) { - card->perf_stats.outbound_cnt++; - card->perf_stats.outbound_start_time = qeth_get_micros(); - } +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.outbound_cnt++; + card->perf_stats.outbound_start_time = qeth_get_micros(); +#endif netif_stop_queue(dev); if ((rc = qeth_send_packet(card, skb))) { if (rc == -EBUSY) { @@ -3711,9 +3700,10 @@ qeth_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) } } netif_wake_queue(dev); - if (card->options.performance_stats) - card->perf_stats.outbound_time += qeth_get_micros() - - card->perf_stats.outbound_start_time; +#ifdef CONFIG_QETH_PERF_STATS + card->perf_stats.outbound_time += qeth_get_micros() - + card->perf_stats.outbound_start_time; +#endif return rc; } @@ -3928,59 +3918,49 @@ qeth_get_ip_version(struct sk_buff *skb) } } -static inline struct qeth_hdr * -__qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, int ipv) +static inline int +qeth_prepare_skb(struct qeth_card *card, struct sk_buff **skb, + struct qeth_hdr **hdr, int ipv) { + int rc = 0; #ifdef CONFIG_QETH_VLAN u16 *tag; - if (card->vlangrp && vlan_tx_tag_present(skb) && +#endif + + QETH_DBF_TEXT(trace, 6, "prepskb"); + if (card->info.type == QETH_CARD_TYPE_OSN) { + *hdr = (struct qeth_hdr *)(*skb)->data; + return rc; + } + rc = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr)); + if (rc) + return rc; +#ifdef CONFIG_QETH_VLAN + if (card->vlangrp && vlan_tx_tag_present(*skb) && ((ipv == 6) || card->options.layer2) ) { /* * Move the mac addresses (6 bytes src, 6 bytes dest) * to the beginning of the new header. We are using three * memcpys instead of one memmove to save cycles. */ - skb_push(skb, VLAN_HLEN); - memcpy(skb->data, skb->data + 4, 4); - memcpy(skb->data + 4, skb->data + 8, 4); - memcpy(skb->data + 8, skb->data + 12, 4); - tag = (u16 *)(skb->data + 12); + skb_push(*skb, VLAN_HLEN); + memcpy((*skb)->data, (*skb)->data + 4, 4); + memcpy((*skb)->data + 4, (*skb)->data + 8, 4); + memcpy((*skb)->data + 8, (*skb)->data + 12, 4); + tag = (u16 *)((*skb)->data + 12); /* * first two bytes = ETH_P_8021Q (0x8100) * second two bytes = VLANID */ *tag = __constant_htons(ETH_P_8021Q); - *(tag + 1) = htons(vlan_tx_tag_get(skb)); + *(tag + 1) = htons(vlan_tx_tag_get(*skb)); } #endif - return ((struct qeth_hdr *) - qeth_push_skb(card, skb, sizeof(struct qeth_hdr))); -} - -static inline void -__qeth_free_new_skb(struct sk_buff *orig_skb, struct sk_buff *new_skb) -{ - if (orig_skb != new_skb) - dev_kfree_skb_any(new_skb); -} - -static inline struct sk_buff * -qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, - struct qeth_hdr **hdr, int ipv) -{ - struct sk_buff *new_skb; - - QETH_DBF_TEXT(trace, 6, "prepskb"); - - new_skb = qeth_realloc_headroom(card, skb, sizeof(struct qeth_hdr)); - if (new_skb == NULL) - return NULL; - *hdr = __qeth_prepare_skb(card, new_skb, ipv); - if (*hdr == NULL) { - __qeth_free_new_skb(skb, new_skb); - return NULL; - } - return new_skb; + *hdr = (struct qeth_hdr *) + qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); + if (*hdr == NULL) + return -EINVAL; + return 0; } static inline u8 @@ -4222,8 +4202,9 @@ qeth_fill_buffer(struct qeth_qdio_out_q *queue, flush_cnt = 1; } else { QETH_DBF_TEXT(trace, 6, "fillbfpa"); - if (queue->card->options.performance_stats) - queue->card->perf_stats.skbs_sent_pack++; +#ifdef CONFIG_QETH_PERF_STATS + queue->card->perf_stats.skbs_sent_pack++; +#endif if (buf->next_element_to_fill >= QETH_MAX_BUFFER_ELEMENTS(queue->card)) { /* @@ -4260,15 +4241,21 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue, * check if buffer is empty to make sure that we do not 'overtake' * ourselves and try to fill a buffer that is already primed */ - if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) - goto out; + if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) { + card->stats.tx_dropped++; + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); + return -EBUSY; + } if (ctx == NULL) queue->next_buf_to_fill = (queue->next_buf_to_fill + 1) % QDIO_MAX_BUFFERS_PER_Q; else { buffers_needed = qeth_eddp_check_buffers_for_context(queue,ctx); - if (buffers_needed < 0) - goto out; + if (buffers_needed < 0) { + card->stats.tx_dropped++; + atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); + return -EBUSY; + } queue->next_buf_to_fill = (queue->next_buf_to_fill + buffers_needed) % QDIO_MAX_BUFFERS_PER_Q; @@ -4283,9 +4270,6 @@ qeth_do_send_packet_fast(struct qeth_card *card, struct qeth_qdio_out_q *queue, qeth_flush_buffers(queue, 0, index, flush_cnt); } return 0; -out: - atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); - return -EBUSY; } static inline int @@ -4311,7 +4295,8 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, * check if buffer is empty to make sure that we do not 'overtake' * ourselves and try to fill a buffer that is already primed */ - if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY) { + if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ + card->stats.tx_dropped++; atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); return -EBUSY; } @@ -4334,6 +4319,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, * again */ if (atomic_read(&buffer->state) != QETH_QDIO_BUF_EMPTY){ + card->stats.tx_dropped++; qeth_flush_buffers(queue, 0, start_index, flush_count); atomic_set(&queue->state, QETH_OUT_Q_UNLOCKED); return -EBUSY; @@ -4344,6 +4330,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, * free buffers) to handle eddp context */ if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){ printk("eddp tx_dropped 1\n"); + card->stats.tx_dropped++; rc = -EBUSY; goto out; } @@ -4355,6 +4342,7 @@ qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, tmp = qeth_eddp_fill_buffer(queue,ctx,queue->next_buf_to_fill); if (tmp < 0) { printk("eddp tx_dropped 2\n"); + card->stats.tx_dropped++; rc = - EBUSY; goto out; } @@ -4388,8 +4376,10 @@ out: qeth_flush_buffers(queue, 0, start_index, flush_count); } /* at this point the queue is UNLOCKED again */ - if (queue->card->options.performance_stats && do_pack) +#ifdef CONFIG_QETH_PERF_STATS + if (do_pack) queue->card->perf_stats.bufs_sent_pack += flush_count; +#endif /* CONFIG_QETH_PERF_STATS */ return rc; } @@ -4400,21 +4390,21 @@ qeth_get_elements_no(struct qeth_card *card, void *hdr, { int elements_needed = 0; - if (skb_shinfo(skb)->nr_frags > 0) + if (skb_shinfo(skb)->nr_frags > 0) { elements_needed = (skb_shinfo(skb)->nr_frags + 1); - if (elements_needed == 0) + } + if (elements_needed == 0 ) elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) + skb->len) >> PAGE_SHIFT); if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)){ - PRINT_ERR("Invalid size of IP packet " - "(Number=%d / Length=%d). Discarded.\n", + PRINT_ERR("qeth_do_send_packet: invalid size of " + "IP packet (Number=%d / Length=%d). Discarded.\n", (elements_needed+elems), skb->len); return 0; } return elements_needed; } - static inline int qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) { @@ -4427,111 +4417,107 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) struct qeth_eddp_context *ctx = NULL; int tx_bytes = skb->len; unsigned short nr_frags = skb_shinfo(skb)->nr_frags; - unsigned short tso_size = skb_shinfo(skb)->gso_size; - struct sk_buff *new_skb, *new_skb2; int rc; QETH_DBF_TEXT(trace, 6, "sendpkt"); - new_skb = skb; - if ((card->info.type == QETH_CARD_TYPE_OSN) && - (skb->protocol == htons(ETH_P_IPV6))) - return -EPERM; - cast_type = qeth_get_cast_type(card, skb); - if ((cast_type == RTN_BROADCAST) && - (card->info.broadcast_capable == 0)) - return -EPERM; - queue = card->qdio.out_qs - [qeth_get_priority_queue(card, skb, ipv, cast_type)]; if (!card->options.layer2) { ipv = qeth_get_ip_version(skb); if ((card->dev->hard_header == qeth_fake_header) && ipv) { - new_skb = qeth_pskb_unshare(skb, GFP_ATOMIC); - if (!new_skb) - return -ENOMEM; + if ((skb = qeth_pskb_unshare(skb,GFP_ATOMIC)) == NULL) { + card->stats.tx_dropped++; + dev_kfree_skb_irq(skb); + return 0; + } if(card->dev->type == ARPHRD_IEEE802_TR){ - skb_pull(new_skb, QETH_FAKE_LL_LEN_TR); + skb_pull(skb, QETH_FAKE_LL_LEN_TR); } else { - skb_pull(new_skb, QETH_FAKE_LL_LEN_ETH); + skb_pull(skb, QETH_FAKE_LL_LEN_ETH); } } } + if ((card->info.type == QETH_CARD_TYPE_OSN) && + (skb->protocol == htons(ETH_P_IPV6))) { + dev_kfree_skb_any(skb); + return 0; + } + cast_type = qeth_get_cast_type(card, skb); + if ((cast_type == RTN_BROADCAST) && + (card->info.broadcast_capable == 0)){ + card->stats.tx_dropped++; + card->stats.tx_errors++; + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; + } + queue = card->qdio.out_qs + [qeth_get_priority_queue(card, skb, ipv, cast_type)]; + if (skb_is_gso(skb)) large_send = card->options.large_send; - /* check on OSN device*/ - if (card->info.type == QETH_CARD_TYPE_OSN) - hdr = (struct qeth_hdr *)new_skb->data; - /*are we able to do TSO ? */ + + /*are we able to do TSO ? If so ,prepare and send it from here */ if ((large_send == QETH_LARGE_SEND_TSO) && (cast_type == RTN_UNSPEC)) { - rc = qeth_tso_prepare_packet(card, new_skb, ipv, cast_type); + rc = qeth_tso_prepare_packet(card, skb, ipv, cast_type); if (rc) { - __qeth_free_new_skb(skb, new_skb); - return rc; + card->stats.tx_dropped++; + card->stats.tx_errors++; + dev_kfree_skb_any(skb); + return NETDEV_TX_OK; } elements_needed++; - } else if (card->info.type != QETH_CARD_TYPE_OSN) { - new_skb2 = qeth_prepare_skb(card, new_skb, &hdr, ipv); - if (!new_skb2) { - __qeth_free_new_skb(skb, new_skb); - return -EINVAL; + } else { + if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { + QETH_DBF_TEXT_(trace, 4, "pskbe%d", rc); + return rc; } - if (new_skb != skb) - __qeth_free_new_skb(new_skb2, new_skb); - new_skb = new_skb2; - qeth_fill_header(card, hdr, new_skb, ipv, cast_type); + if (card->info.type != QETH_CARD_TYPE_OSN) + qeth_fill_header(card, hdr, skb, ipv, cast_type); } + if (large_send == QETH_LARGE_SEND_EDDP) { - ctx = qeth_eddp_create_context(card, new_skb, hdr); + ctx = qeth_eddp_create_context(card, skb, hdr); if (ctx == NULL) { - __qeth_free_new_skb(skb, new_skb); PRINT_WARN("could not create eddp context\n"); return -EINVAL; } } else { - int elems = qeth_get_elements_no(card,(void*) hdr, new_skb, + int elems = qeth_get_elements_no(card,(void*) hdr, skb, elements_needed); - if (!elems) { - __qeth_free_new_skb(skb, new_skb); + if (!elems) return -EINVAL; - } elements_needed += elems; } if (card->info.type != QETH_CARD_TYPE_IQD) - rc = qeth_do_send_packet(card, queue, new_skb, hdr, + rc = qeth_do_send_packet(card, queue, skb, hdr, elements_needed, ctx); else - rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, + rc = qeth_do_send_packet_fast(card, queue, skb, hdr, elements_needed, ctx); - if (!rc) { + if (!rc){ card->stats.tx_packets++; card->stats.tx_bytes += tx_bytes; - if (new_skb != skb) - dev_kfree_skb_any(skb); - if (card->options.performance_stats) { - if (tso_size && - !(large_send == QETH_LARGE_SEND_NO)) { - card->perf_stats.large_send_bytes += tx_bytes; - card->perf_stats.large_send_cnt++; - } - if (nr_frags > 0) { - card->perf_stats.sg_skbs_sent++; - /* nr_frags + skb->data */ - card->perf_stats.sg_frags_sent += - nr_frags + 1; - } +#ifdef CONFIG_QETH_PERF_STATS + if (skb_is_gso(skb) && !(large_send == QETH_LARGE_SEND_NO)) { + card->perf_stats.large_send_bytes += skb->len; + card->perf_stats.large_send_cnt++; } - } else { - card->stats.tx_dropped++; - __qeth_free_new_skb(skb, new_skb); + if (nr_frags > 0){ + card->perf_stats.sg_skbs_sent++; + /* nr_frags + skb->data */ + card->perf_stats.sg_frags_sent += + nr_frags + 1; + } +#endif /* CONFIG_QETH_PERF_STATS */ } if (ctx != NULL) { /* drop creator's reference */ qeth_eddp_put_context(ctx); /* free skb; it's not referenced by a buffer */ - if (!rc) - dev_kfree_skb_any(new_skb); + if (rc == 0) + dev_kfree_skb_any(skb); + } return rc; } @@ -4810,7 +4796,7 @@ static struct qeth_cmd_buffer * qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs, __u16, __u16, enum qeth_prot_versions); static int -qeth_arp_query(struct qeth_card *card, char __user *udata) +qeth_arp_query(struct qeth_card *card, char *udata) { struct qeth_cmd_buffer *iob; struct qeth_arp_query_info qinfo = {0, }; @@ -4943,7 +4929,7 @@ qeth_get_adapter_cmd(struct qeth_card *card, __u32 command, __u32 cmdlen) * function to send SNMP commands to OSA-E card */ static int -qeth_snmp_command(struct qeth_card *card, char __user *udata) +qeth_snmp_command(struct qeth_card *card, char *udata) { struct qeth_cmd_buffer *iob; struct qeth_ipa_cmd *cmd; @@ -5285,7 +5271,6 @@ qeth_free_vlan_buffer(struct qeth_card *card, struct qeth_qdio_out_buffer *buf, struct sk_buff_head tmp_list; skb_queue_head_init(&tmp_list); - lockdep_set_class(&tmp_list.lock, &qdio_out_skb_queue_key); for(i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i){ while ((skb = skb_dequeue(&buf->skb_list))){ if (vlan_tx_tag_present(skb) && @@ -7344,8 +7329,6 @@ qeth_setrouting_v6(struct qeth_card *card) QETH_DBF_TEXT(trace,3,"setrtg6"); #ifdef CONFIG_QETH_IPV6 - if (!qeth_is_supported(card, IPA_IPV6)) - return 0; qeth_correct_routing_type(card, &card->options.route6.type, QETH_PROT_IPV6); @@ -7884,12 +7867,12 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode) QETH_DBF_TEXT_(setup, 2, "5err%d", rc); goto out_remove; } + card->state = CARD_STATE_SOFTSETUP; if ((rc = qeth_init_qdio_queues(card))){ QETH_DBF_TEXT_(setup, 2, "6err%d", rc); goto out_remove; } - card->state = CARD_STATE_SOFTSETUP; netif_carrier_on(card->dev); qeth_set_allowed_threads(card, 0xffffffff, 0); @@ -7917,9 +7900,9 @@ qeth_set_online(struct ccwgroup_device *gdev) } static struct ccw_device_id qeth_ids[] = { - {CCW_DEVICE(0x1731, 0x01), .driver_info = QETH_CARD_TYPE_OSAE}, - {CCW_DEVICE(0x1731, 0x05), .driver_info = QETH_CARD_TYPE_IQD}, - {CCW_DEVICE(0x1731, 0x06), .driver_info = QETH_CARD_TYPE_OSN}, + {CCW_DEVICE(0x1731, 0x01), driver_info:QETH_CARD_TYPE_OSAE}, + {CCW_DEVICE(0x1731, 0x05), driver_info:QETH_CARD_TYPE_IQD}, + {CCW_DEVICE(0x1731, 0x06), driver_info:QETH_CARD_TYPE_OSN}, {}, }; MODULE_DEVICE_TABLE(ccw, qeth_ids); @@ -8388,7 +8371,7 @@ out: static struct notifier_block qeth_ip_notifier = { qeth_ip_event, - NULL, + 0 }; #ifdef CONFIG_QETH_IPV6 @@ -8441,7 +8424,7 @@ out: static struct notifier_block qeth_ip6_notifier = { qeth_ip6_event, - NULL, + 0 }; #endif @@ -8459,17 +8442,16 @@ __qeth_reboot_event_card(struct device *dev, void *data) static int qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) { - int ret; - ret = driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL, - __qeth_reboot_event_card); - return ret ? NOTIFY_BAD : NOTIFY_DONE; + driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL, + __qeth_reboot_event_card); + return NOTIFY_DONE; } static struct notifier_block qeth_reboot_notifier = { qeth_reboot_event, - NULL, + 0 }; static int @@ -8518,9 +8500,9 @@ static int qeth_ipv6_init(void) { qeth_old_arp_constructor = arp_tbl.constructor; - write_lock_bh(&arp_tbl.lock); + write_lock(&arp_tbl.lock); arp_tbl.constructor = qeth_arp_constructor; - write_unlock_bh(&arp_tbl.lock); + write_unlock(&arp_tbl.lock); arp_direct_ops = (struct neigh_ops*) kmalloc(sizeof(struct neigh_ops), GFP_KERNEL); @@ -8536,9 +8518,9 @@ qeth_ipv6_init(void) static void qeth_ipv6_uninit(void) { - write_lock_bh(&arp_tbl.lock); + write_lock(&arp_tbl.lock); arp_tbl.constructor = qeth_old_arp_constructor; - write_unlock_bh(&arp_tbl.lock); + write_unlock(&arp_tbl.lock); kfree(arp_direct_ops); } #endif /* CONFIG_QETH_IPV6 */ @@ -8546,44 +8528,34 @@ qeth_ipv6_uninit(void) static void qeth_sysfs_unregister(void) { - s390_root_dev_unregister(qeth_root_dev); qeth_remove_driver_attributes(); ccw_driver_unregister(&qeth_ccw_driver); ccwgroup_driver_unregister(&qeth_ccwgroup_driver); + s390_root_dev_unregister(qeth_root_dev); } - /** * register qeth at sysfs */ static int qeth_sysfs_register(void) { - int rc; + int rc=0; rc = ccwgroup_driver_register(&qeth_ccwgroup_driver); if (rc) - goto out; - + return rc; rc = ccw_driver_register(&qeth_ccw_driver); if (rc) - goto out_ccw_driver; - + return rc; rc = qeth_create_driver_attributes(); if (rc) - goto out_qeth_attr; - + return rc; qeth_root_dev = s390_root_dev_register("qeth"); - rc = IS_ERR(qeth_root_dev) ? PTR_ERR(qeth_root_dev) : 0; - if (!rc) - goto out; - - qeth_remove_driver_attributes(); -out_qeth_attr: - ccw_driver_unregister(&qeth_ccw_driver); -out_ccw_driver: - ccwgroup_driver_unregister(&qeth_ccwgroup_driver); -out: - return rc; + if (IS_ERR(qeth_root_dev)) { + rc = PTR_ERR(qeth_root_dev); + return rc; + } + return 0; } /*** @@ -8592,7 +8564,7 @@ out: static int __init qeth_init(void) { - int rc; + int rc=0; PRINT_INFO("loading %s\n", version); @@ -8601,26 +8573,20 @@ qeth_init(void) spin_lock_init(&qeth_notify_lock); rwlock_init(&qeth_card_list.rwlock); - rc = qeth_register_dbf_views(); - if (rc) + if (qeth_register_dbf_views()) goto out_err; - - rc = qeth_sysfs_register(); - if (rc) - goto out_dbf; + if (qeth_sysfs_register()) + goto out_sysfs; #ifdef CONFIG_QETH_IPV6 - rc = qeth_ipv6_init(); - if (rc) { - PRINT_ERR("Out of memory during ipv6 init code = %d\n", rc); + if (qeth_ipv6_init()) { + PRINT_ERR("Out of memory during ipv6 init.\n"); goto out_sysfs; } #endif /* QETH_IPV6 */ - rc = qeth_register_notifiers(); - if (rc) + if (qeth_register_notifiers()) goto out_ipv6; - rc = qeth_create_procfs_entries(); - if (rc) + if (qeth_create_procfs_entries()) goto out_notifiers; return rc; @@ -8630,13 +8596,12 @@ out_notifiers: out_ipv6: #ifdef CONFIG_QETH_IPV6 qeth_ipv6_uninit(); -out_sysfs: #endif /* QETH_IPV6 */ +out_sysfs: qeth_sysfs_unregister(); -out_dbf: qeth_unregister_dbf_views(); out_err: - PRINT_ERR("Initialization failed with code %d\n", rc); + PRINT_ERR("Initialization failed"); return rc; } diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index faa768e59..66f2da14e 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c @@ -173,6 +173,7 @@ static struct file_operations qeth_procfile_fops = { #define QETH_PERF_PROCFILE_NAME "qeth_perf" static struct proc_dir_entry *qeth_perf_procfile; +#ifdef CONFIG_QETH_PERF_STATS static int qeth_perf_procfile_seq_show(struct seq_file *s, void *it) { @@ -191,21 +192,14 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) CARD_DDEV_ID(card), QETH_CARD_IFNAME(card) ); - if (!card->options.performance_stats) - seq_printf(s, "Performance statistics are deactivated.\n"); seq_printf(s, " Skb's/buffers received : %lu/%u\n" " Skb's/buffers sent : %lu/%u\n\n", - card->stats.rx_packets - - card->perf_stats.initial_rx_packets, - card->perf_stats.bufs_rec, - card->stats.tx_packets - - card->perf_stats.initial_tx_packets, - card->perf_stats.bufs_sent + card->stats.rx_packets, card->perf_stats.bufs_rec, + card->stats.tx_packets, card->perf_stats.bufs_sent ); seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n" " Skb's/buffers sent with packing : %u/%u\n\n", - card->stats.tx_packets - card->perf_stats.initial_tx_packets - - card->perf_stats.skbs_sent_pack, + card->stats.tx_packets - card->perf_stats.skbs_sent_pack, card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack, card->perf_stats.skbs_sent_pack, card->perf_stats.bufs_sent_pack @@ -281,6 +275,11 @@ static struct file_operations qeth_perf_procfile_fops = { .release = seq_release, }; +#define qeth_perf_procfile_created qeth_perf_procfile +#else +#define qeth_perf_procfile_created 1 +#endif /* CONFIG_QETH_PERF_STATS */ + int __init qeth_create_procfs_entries(void) { @@ -289,13 +288,15 @@ qeth_create_procfs_entries(void) if (qeth_procfile) qeth_procfile->proc_fops = &qeth_procfile_fops; +#ifdef CONFIG_QETH_PERF_STATS qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME, S_IFREG | 0444, NULL); if (qeth_perf_procfile) qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; +#endif /* CONFIG_QETH_PERF_STATS */ if (qeth_procfile && - qeth_perf_procfile) + qeth_perf_procfile_created) return 0; else return -ENOMEM; diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index 5836737ac..185a9cfbc 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c @@ -742,47 +742,6 @@ qeth_dev_layer2_store(struct device *dev, struct device_attribute *attr, const c static DEVICE_ATTR(layer2, 0644, qeth_dev_layer2_show, qeth_dev_layer2_store); -static ssize_t -qeth_dev_performance_stats_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct qeth_card *card = dev->driver_data; - - if (!card) - return -EINVAL; - - return sprintf(buf, "%i\n", card->options.performance_stats ? 1:0); -} - -static ssize_t -qeth_dev_performance_stats_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) -{ - struct qeth_card *card = dev->driver_data; - char *tmp; - int i; - - if (!card) - return -EINVAL; - - i = simple_strtoul(buf, &tmp, 16); - if ((i == 0) || (i == 1)) { - if (i == card->options.performance_stats) - return count; - card->options.performance_stats = i; - if (i == 0) - memset(&card->perf_stats, 0, - sizeof(struct qeth_perf_stats)); - card->perf_stats.initial_rx_packets = card->stats.rx_packets; - card->perf_stats.initial_tx_packets = card->stats.tx_packets; - } else { - PRINT_WARN("performance_stats: write 0 or 1 to this file!\n"); - return -EINVAL; - } - return count; -} - -static DEVICE_ATTR(performance_stats, 0644, qeth_dev_performance_stats_show, - qeth_dev_performance_stats_store); - static ssize_t qeth_dev_large_send_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -969,7 +928,6 @@ static struct device_attribute * qeth_device_attrs[] = { &dev_attr_canonical_macaddr, &dev_attr_layer2, &dev_attr_large_send, - &dev_attr_performance_stats, NULL, }; @@ -1152,12 +1110,12 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto, { const char *start, *end; char *tmp; - char buffer[40] = {0, }; + char buffer[49] = {0, }; start = buf; /* get address string */ end = strchr(start, '/'); - if (!end || (end - start >= 40)){ + if (!end || (end-start >= 49)){ PRINT_WARN("Invalid format for ipato_addx/delx. " "Use /\n"); return -EINVAL; @@ -1169,12 +1127,7 @@ qeth_parse_ipatoe(const char* buf, enum qeth_prot_versions proto, } start = end + 1; *mask_bits = simple_strtoul(start, &tmp, 10); - if (!strlen(start) || - (tmp == start) || - (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) { - PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n"); - return -EINVAL; - } + return 0; } @@ -1745,16 +1698,11 @@ qeth_create_device_attributes(struct device *dev) sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); - return ret; } - if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))){ - sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); - sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); - sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); - sysfs_remove_group(&dev->kobj, &qeth_device_rxip_group); + if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_blkt_group))) return ret; - } - return 0; + + return ret; } void @@ -1807,7 +1755,7 @@ qeth_driver_group_store(struct device_driver *ddrv, const char *buf, } -static DRIVER_ATTR(group, 0200, NULL, qeth_driver_group_store); +static DRIVER_ATTR(group, 0200, 0, qeth_driver_group_store); static ssize_t qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf, @@ -1835,7 +1783,7 @@ qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf, return count; } -static DRIVER_ATTR(notifier_register, 0200, NULL, +static DRIVER_ATTR(notifier_register, 0200, 0, qeth_driver_notifier_register_store); int diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index 14504afb0..593f29814 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h @@ -24,7 +24,7 @@ static inline struct qeth_hdr_tso * qeth_tso_prepare_skb(struct qeth_card *card, struct sk_buff **skb) { QETH_DBF_TEXT(trace, 5, "tsoprsk"); - return qeth_push_skb(card, *skb, sizeof(struct qeth_hdr_tso)); + return qeth_push_skb(card, skb, sizeof(struct qeth_hdr_tso)); } /** diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index b8179c27c..72118ee68 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c @@ -66,7 +66,7 @@ smsg_message_pending(iucv_MessagePending *eib, void *pgm_data) return; } rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls, - msg, len, NULL, NULL, NULL); + msg, len, 0, 0, 0); if (rc == 0) { msg[len] = 0; EBCASC(msg, len); @@ -122,7 +122,7 @@ smsg_unregister_callback(char *prefix, void (*callback)(char *from, char *str)) struct smsg_callback *cb, *tmp; spin_lock(&smsg_list_lock); - cb = NULL; + cb = 0; list_for_each_entry(tmp, &smsg_list, list) if (tmp->callback == callback && strcmp(tmp->prefix, prefix) == 0) { @@ -139,7 +139,7 @@ smsg_exit(void) { if (smsg_handle > 0) { cpcmd("SET SMSG OFF", NULL, 0, NULL); - iucv_sever(smsg_pathid, NULL); + iucv_sever(smsg_pathid, 0); iucv_unregister_program(smsg_handle); driver_unregister(&smsg_driver); } @@ -162,19 +162,19 @@ smsg_init(void) return rc; } smsg_handle = iucv_register_program("SMSGIUCV ", "*MSG ", - pgmmask, &smsg_ops, NULL); + pgmmask, &smsg_ops, 0); if (!smsg_handle) { printk(KERN_ERR "SMSGIUCV: failed to register to iucv"); driver_unregister(&smsg_driver); return -EIO; /* better errno ? */ } - rc = iucv_connect (&smsg_pathid, 255, NULL, "*MSG ", NULL, 0, - NULL, NULL, smsg_handle, NULL); + rc = iucv_connect (&smsg_pathid, 255, 0, "*MSG ", 0, 0, 0, 0, + smsg_handle, 0); if (rc) { printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG"); iucv_unregister_program(smsg_handle); driver_unregister(&smsg_driver); - smsg_handle = NULL; + smsg_handle = 0; return -EIO; } cpcmd("SET SMSG IUCV", NULL, 0, NULL); diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 5399c5d99..f99e55308 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c @@ -8,12 +8,12 @@ * Martin Schwidefsky (schwidefsky@de.ibm.com) */ +#include #include #include #include #include #include -#include #include @@ -56,6 +56,8 @@ s390_collect_crw_info(void *param) unsigned int chain; sem = (struct semaphore *)param; + /* Set a nice name. */ + daemonize("kmcheck"); repeat: down_interruptible(sem); slow = 0; @@ -111,16 +113,6 @@ repeat: break; case CRW_RSC_CPATH: pr_debug("source is channel path %02X\n", crw[0].rsid); - /* - * Check for solicited machine checks. These are - * created by reset channel path and need not be - * reported to the common I/O layer. - */ - if (crw[chain].slct) { - DBG(KERN_INFO"solicited machine check for " - "channel path %02X\n", crw[0].rsid); - break; - } switch (crw[0].erc) { case CRW_ERC_IPARM: /* Path has come. */ ret = chp_process_crw(crw[0].rsid, 1); @@ -388,8 +380,6 @@ s390_do_machine_check(struct pt_regs *regs) struct mcck_struct *mcck; int umode; - lockdep_off(); - mci = (struct mci *) &S390_lowcore.mcck_interruption_code; mcck = &__get_cpu_var(cpu_mcck); umode = user_mode(regs); @@ -494,7 +484,6 @@ s390_do_machine_check(struct pt_regs *regs) mcck->warning = 1; set_thread_flag(TIF_MCCK_PENDING); } - lockdep_on(); } /* @@ -527,7 +516,7 @@ arch_initcall(machine_check_init); static int __init machine_check_crw_init (void) { - kthread_run(s390_collect_crw_info, &m_sem, "kmcheck"); + kernel_thread(s390_collect_crw_info, &m_sem, CLONE_FS|CLONE_FILES); ctl_set_bit(14, 28); /* enable channel report MCH */ return 0; } diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index adc9d8f2c..395cfc6a3 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -1,8 +1,18 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. * - * (C) Copyright IBM Corp. 2002, 2006 + * linux/drivers/s390/scsi/zfcp_aux.c + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 + * + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -19,20 +29,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * Driver authors: - * Martin Peschke (originator of the driver) - * Raimund Schroeder - * Aron Zeh - * Wolfgang Taphorn - * Stefan Bader - * Heiko Carstens (kernel 2.6 port of the driver) - * Andreas Herrmann - * Maxim Shchetynin - * Volker Sameske - * Ralph Wuerthner - */ - #include "zfcp_ext.h" /* accumulated log level (module parameter) */ @@ -79,9 +75,15 @@ static struct miscdevice zfcp_cfdc_misc = { /* declare driver module init/cleanup functions */ module_init(zfcp_module_init); -MODULE_AUTHOR("IBM Deutschland Entwicklung GmbH - linux390@de.ibm.com"); +MODULE_AUTHOR("Heiko Carstens , " + "Andreas Herrman , " + "Martin Peschke , " + "Raimund Schroeder , " + "Wolfgang Taphorn , " + "Aron Zeh , " + "IBM Deutschland Entwicklung GmbH"); MODULE_DESCRIPTION - ("FCP (SCSI over Fibre Channel) HBA driver for IBM System z9 and zSeries"); + ("FCP (SCSI over Fibre Channel) HBA driver for IBM eServer zSeries"); MODULE_LICENSE("GPL"); module_param(device, charp, 0400); @@ -112,105 +114,6 @@ _zfcp_hex_dump(char *addr, int count) printk("\n"); } - -/****************************************************************/ -/****** Functions to handle the request ID hash table ********/ -/****************************************************************/ - -#define ZFCP_LOG_AREA ZFCP_LOG_AREA_FSF - -static int zfcp_reqlist_init(struct zfcp_adapter *adapter) -{ - int i; - - adapter->req_list = kcalloc(REQUEST_LIST_SIZE, sizeof(struct list_head), - GFP_KERNEL); - - if (!adapter->req_list) - return -ENOMEM; - - for (i=0; ireq_list[i]); - - return 0; -} - -static void zfcp_reqlist_free(struct zfcp_adapter *adapter) -{ - struct zfcp_fsf_req *request, *tmp; - unsigned int i; - - for (i=0; ireq_list[i])) - continue; - - list_for_each_entry_safe(request, tmp, - &adapter->req_list[i], list) - list_del(&request->list); - } - - kfree(adapter->req_list); -} - -void zfcp_reqlist_add(struct zfcp_adapter *adapter, - struct zfcp_fsf_req *fsf_req) -{ - unsigned int i; - - i = fsf_req->req_id % REQUEST_LIST_SIZE; - list_add_tail(&fsf_req->list, &adapter->req_list[i]); -} - -void zfcp_reqlist_remove(struct zfcp_adapter *adapter, unsigned long req_id) -{ - struct zfcp_fsf_req *request, *tmp; - unsigned int i, counter; - u64 dbg_tmp[2]; - - i = req_id % REQUEST_LIST_SIZE; - BUG_ON(list_empty(&adapter->req_list[i])); - - counter = 0; - list_for_each_entry_safe(request, tmp, &adapter->req_list[i], list) { - if (request->req_id == req_id) { - dbg_tmp[0] = (u64) atomic_read(&adapter->reqs_active); - dbg_tmp[1] = (u64) counter; - debug_event(adapter->erp_dbf, 4, (void *) dbg_tmp, 16); - list_del(&request->list); - break; - } - counter++; - } -} - -struct zfcp_fsf_req *zfcp_reqlist_ismember(struct zfcp_adapter *adapter, - unsigned long req_id) -{ - struct zfcp_fsf_req *request, *tmp; - unsigned int i; - - i = req_id % REQUEST_LIST_SIZE; - - list_for_each_entry_safe(request, tmp, &adapter->req_list[i], list) - if (request->req_id == req_id) - return request; - - return NULL; -} - -int zfcp_reqlist_isempty(struct zfcp_adapter *adapter) -{ - unsigned int i; - - for (i=0; ireq_list[i])) - return 0; - - return 1; -} - -#undef ZFCP_LOG_AREA - /****************************************************************/ /************** Uncategorised Functions *************************/ /****************************************************************/ @@ -388,11 +291,12 @@ zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, goto out; } - sg_list = kzalloc(sizeof(struct zfcp_sg_list), GFP_KERNEL); + sg_list = kmalloc(sizeof(struct zfcp_sg_list), GFP_KERNEL); if (sg_list == NULL) { retval = -ENOMEM; goto out; } + memset(sg_list, 0, sizeof(*sg_list)); if (command != ZFCP_CFDC_IOC) { ZFCP_LOG_INFO("IOC request code 0x%x invalid\n", command); @@ -574,13 +478,14 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) sg_list->count = size >> PAGE_SHIFT; if (size & ~PAGE_MASK) sg_list->count++; - sg_list->sg = kcalloc(sg_list->count, sizeof(struct scatterlist), + sg_list->sg = kmalloc(sg_list->count * sizeof(struct scatterlist), GFP_KERNEL); if (sg_list->sg == NULL) { sg_list->count = 0; retval = -ENOMEM; goto out; } + memset(sg_list->sg, 0, sg_list->count * sizeof(struct scatterlist)); for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) { sg->length = min(size, PAGE_SIZE); @@ -839,7 +744,7 @@ struct zfcp_unit * zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) { struct zfcp_unit *unit, *tmp_unit; - unsigned int scsi_lun; + scsi_lun_t scsi_lun; int found; /* @@ -853,9 +758,10 @@ zfcp_unit_enqueue(struct zfcp_port *port, fcp_lun_t fcp_lun) if (unit) return NULL; - unit = kzalloc(sizeof (struct zfcp_unit), GFP_KERNEL); + unit = kmalloc(sizeof (struct zfcp_unit), GFP_KERNEL); if (!unit) return NULL; + memset(unit, 0, sizeof (struct zfcp_unit)); /* initialise reference count stuff */ atomic_set(&unit->refcount, 0); @@ -1023,12 +929,13 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) */ /* try to allocate new adapter data structure (zeroed) */ - adapter = kzalloc(sizeof (struct zfcp_adapter), GFP_KERNEL); + adapter = kmalloc(sizeof (struct zfcp_adapter), GFP_KERNEL); if (!adapter) { ZFCP_LOG_INFO("error: allocation of base adapter " "structure failed\n"); goto out; } + memset(adapter, 0, sizeof (struct zfcp_adapter)); ccw_device->handler = NULL; @@ -1060,12 +967,8 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) INIT_LIST_HEAD(&adapter->port_remove_lh); /* initialize list of fsf requests */ - spin_lock_init(&adapter->req_list_lock); - retval = zfcp_reqlist_init(adapter); - if (retval) { - ZFCP_LOG_INFO("request list initialization failed\n"); - goto failed_low_mem_buffers; - } + spin_lock_init(&adapter->fsf_req_list_lock); + INIT_LIST_HEAD(&adapter->fsf_req_list_head); /* initialize debug locks */ @@ -1094,6 +997,12 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) /* intitialise SCSI ER timer */ init_timer(&adapter->scsi_er_timer); + /* set FC service class used per default */ + adapter->fc_service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT; + + sprintf(adapter->name, "%s", zfcp_get_busid_by_adapter(adapter)); + ASCEBC(adapter->name, strlen(adapter->name)); + /* mark adapter unusable as long as sysfs registration is not complete */ atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); @@ -1144,6 +1053,8 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) * !0 - struct zfcp_adapter data structure could not be removed * (e.g. still used) * locks: adapter list write lock is assumed to be held by caller + * adapter->fsf_req_list_lock is taken and released within this + * function and must not be held on entry */ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter) @@ -1155,14 +1066,14 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); dev_set_drvdata(&adapter->ccw_device->dev, NULL); /* sanity check: no pending FSF requests */ - spin_lock_irqsave(&adapter->req_list_lock, flags); - retval = zfcp_reqlist_isempty(adapter); - spin_unlock_irqrestore(&adapter->req_list_lock, flags); - if (!retval) { + spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); + retval = !list_empty(&adapter->fsf_req_list_head); + spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); + if (retval) { ZFCP_LOG_NORMAL("bug: adapter %s (%p) still in use, " "%i requests outstanding\n", zfcp_get_busid_by_adapter(adapter), adapter, - atomic_read(&adapter->reqs_active)); + atomic_read(&adapter->fsf_reqs_active)); retval = -EBUSY; goto out; } @@ -1188,7 +1099,6 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) zfcp_free_low_mem_buffers(adapter); /* free memory of adapter data structure and queues */ zfcp_qdio_free_queues(adapter); - zfcp_reqlist_free(adapter); kfree(adapter->fc_stats); kfree(adapter->stats_reset_data); ZFCP_LOG_TRACE("freeing adapter structure\n"); @@ -1229,9 +1139,10 @@ zfcp_port_enqueue(struct zfcp_adapter *adapter, wwn_t wwpn, u32 status, return NULL; } - port = kzalloc(sizeof (struct zfcp_port), GFP_KERNEL); + port = kmalloc(sizeof (struct zfcp_port), GFP_KERNEL); if (!port) return NULL; + memset(port, 0, sizeof (struct zfcp_port)); /* initialise reference count stuff */ atomic_set(&port->refcount, 0); @@ -1443,19 +1354,18 @@ static void zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter, struct fsf_status_read_buffer *status_buffer) { - struct fsf_plogi *els_plogi; + logi *els_logi = (logi *) status_buffer->payload; struct zfcp_port *port; unsigned long flags; - els_plogi = (struct fsf_plogi *) status_buffer->payload; read_lock_irqsave(&zfcp_data.config_lock, flags); list_for_each_entry(port, &adapter->port_list_head, list) { - if (port->wwpn == (*(wwn_t *) &els_plogi->serv_param.wwpn)) + if (port->wwpn == (*(wwn_t *) & els_logi->nport_wwn)) break; } read_unlock_irqrestore(&zfcp_data.config_lock, flags); - if (!port || (port->wwpn != (*(wwn_t *) &els_plogi->serv_param.wwpn))) { + if (!port || (port->wwpn != (*(wwn_t *) & els_logi->nport_wwn))) { ZFCP_LOG_DEBUG("ignored incoming PLOGI for nonexisting port " "with d_id 0x%08x on adapter %s\n", status_buffer->d_id, @@ -1850,25 +1760,4 @@ zfcp_handle_els_rjt(u32 sq, struct zfcp_ls_rjt_par *rjt_par) return ret; } -/** - * zfcp_plogi_evaluate - evaluate PLOGI playload and copy important fields - * into zfcp_port structure - * @port: zfcp_port structure - * @plogi: plogi payload - */ -void -zfcp_plogi_evaluate(struct zfcp_port *port, struct fsf_plogi *plogi) -{ - port->maxframe_size = plogi->serv_param.common_serv_param[7] | - ((plogi->serv_param.common_serv_param[6] & 0x0F) << 8); - if (plogi->serv_param.class1_serv_param[0] & 0x80) - port->supported_classes |= FC_COS_CLASS1; - if (plogi->serv_param.class2_serv_param[0] & 0x80) - port->supported_classes |= FC_COS_CLASS2; - if (plogi->serv_param.class3_serv_param[0] & 0x80) - port->supported_classes |= FC_COS_CLASS3; - if (plogi->serv_param.class4_serv_param[0] & 0x80) - port->supported_classes |= FC_COS_CLASS4; -} - #undef ZFCP_LOG_AREA diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index fdabadeaa..241136d0c 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c @@ -1,8 +1,16 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_ccw.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * CCW driver related routines + * + * (C) Copyright IBM Corp. 2003, 2004 + * + * Authors: + * Martin Peschke + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -164,11 +172,6 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device) retval = zfcp_adapter_scsi_register(adapter); if (retval) goto out_scsi_register; - - /* initialize request counter */ - BUG_ON(!zfcp_reqlist_isempty(adapter)); - adapter->req_no = 0; - zfcp_erp_modify_adapter_status(adapter, ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET); zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED); diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index c033145d0..a5f2ba9a8 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c @@ -1,8 +1,12 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. * - * (C) Copyright IBM Corp. 2002, 2006 + * linux/drivers/s390/scsi/zfcp_dbf.c + * + * FCP adapter driver for IBM eServer zSeries + * + * Debugging facilities + * + * (C) Copyright IBM Corp. 2005 * * 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 diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 94d1b74db..6eba56cd8 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h @@ -1,8 +1,19 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * + * linux/drivers/s390/scsi/zfcp_def.h + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 * - * (C) Copyright IBM Corp. 2002, 2006 + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * 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 +50,7 @@ #include #include #include +#include "../../fc4/fc.h" #include "zfcp_fsf.h" #include #include @@ -52,7 +64,7 @@ /********************* GENERAL DEFINES *********************************/ /* zfcp version number, it consists of major, minor, and patch-level number */ -#define ZFCP_VERSION "4.8.0" +#define ZFCP_VERSION "4.5.0" /** * zfcp_sg_to_address - determine kernel address from struct scatterlist @@ -77,10 +89,14 @@ zfcp_address_to_sg(void *address, struct scatterlist *list) list->offset = ((unsigned long) address) & (PAGE_SIZE - 1); } -#define REQUEST_LIST_SIZE 128 - /********************* SCSI SPECIFIC DEFINES *********************************/ -#define ZFCP_SCSI_ER_TIMEOUT (10*HZ) + +/* 32 bit for SCSI ID and LUN as long as the SCSI stack uses this type */ +typedef u32 scsi_id_t; +typedef u32 scsi_lun_t; + +#define ZFCP_ERP_SCSI_LOW_MEM_TIMEOUT (100*HZ) +#define ZFCP_SCSI_ER_TIMEOUT (100*HZ) /********************* CIO/QDIO SPECIFIC DEFINES *****************************/ @@ -217,9 +233,8 @@ struct fcp_rsp_iu { #define RSP_CODE_TASKMAN_FAILED 5 /* see fc-fs */ -#define LS_RSCN 0x61040000 -#define LS_LOGO 0x05000000 -#define LS_PLOGI 0x03000000 +#define LS_FAN 0x60000000 +#define LS_RSCN 0x61040000 struct fcp_rscn_head { u8 command; @@ -248,6 +263,13 @@ struct fcp_rscn_element { #define ZFCP_NO_PORTS_PER_DOMAIN 0x10000 #define ZFCP_NO_PORTS_PER_FABRIC 0x1000000 +struct fcp_fan { + u32 command; + u32 fport_did; + wwn_t fport_wwpn; + wwn_t fport_wwname; +} __attribute__((packed)); + /* see fc-ph */ struct fcp_logo { u32 command; @@ -485,6 +507,9 @@ struct zfcp_rc_entry { #define ZFCP_NAME "zfcp" +/* read-only LUN sharing switch initial value */ +#define ZFCP_RO_LUN_SHARING_DEFAULTS 0 + /* independent log areas */ #define ZFCP_LOG_AREA_OTHER 0 #define ZFCP_LOG_AREA_SCSI 1 @@ -583,6 +608,7 @@ do { \ * and unit */ #define ZFCP_COMMON_FLAGS 0xfff00000 +#define ZFCP_SPECIFIC_FLAGS 0x000fffff /* common status bits */ #define ZFCP_STATUS_COMMON_REMOVE 0x80000000 @@ -607,6 +633,11 @@ do { \ #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 #define ZFCP_STATUS_ADAPTER_XPORT_OK 0x00000800 +#define ZFCP_STATUS_ADAPTER_SCSI_UP \ + (ZFCP_STATUS_COMMON_UNBLOCKED | \ + ZFCP_STATUS_ADAPTER_REGISTERED) + + /* FC-PH/FC-GS well-known address identifiers for generic services */ #define ZFCP_DID_MANAGEMENT_SERVICE 0xFFFFFA #define ZFCP_DID_TIME_SERVICE 0xFFFFFB @@ -621,6 +652,7 @@ do { \ #define ZFCP_STATUS_PORT_NO_WWPN 0x00000008 #define ZFCP_STATUS_PORT_NO_SCSI_ID 0x00000010 #define ZFCP_STATUS_PORT_INVALID_WWPN 0x00000020 +#define ZFCP_STATUS_PORT_ACCESS_DENIED 0x00000040 /* for ports with well known addresses */ #define ZFCP_STATUS_PORT_WKA \ @@ -876,21 +908,24 @@ struct zfcp_adapter { wwn_t peer_wwpn; /* P2P peer WWPN */ u32 peer_d_id; /* P2P peer D_ID */ struct ccw_device *ccw_device; /* S/390 ccw device */ + u8 fc_service_class; u32 hydra_version; /* Hydra version */ u32 fsf_lic_version; u32 adapter_features; /* FCP channel features */ u32 connection_features; /* host connection features */ u32 hardware_version; /* of FCP channel */ struct Scsi_Host *scsi_host; /* Pointer to mid-layer */ + unsigned short scsi_host_no; /* Assigned host number */ + unsigned char name[9]; struct list_head port_list_head; /* remote port list */ struct list_head port_remove_lh; /* head of ports to be removed */ u32 ports; /* number of remote ports */ - struct timer_list scsi_er_timer; /* SCSI err recovery watch */ - atomic_t reqs_active; /* # active FSF reqs */ - unsigned long req_no; /* unique FSF req number */ - struct list_head *req_list; /* list of pending reqs */ - spinlock_t req_list_lock; /* request list lock */ + struct timer_list scsi_er_timer; /* SCSI err recovery watch */ + struct list_head fsf_req_list_head; /* head of FSF req list */ + spinlock_t fsf_req_list_lock; /* lock for ops on list of + FSF requests */ + atomic_t fsf_reqs_active; /* # active FSF reqs */ struct zfcp_qdio_queue request_queue; /* request queue */ u32 fsf_req_seq_no; /* FSF cmnd seq number */ wait_queue_head_t request_wq; /* can be used to wait for @@ -959,8 +994,6 @@ struct zfcp_port { u32 handle; /* handle assigned by FSF */ struct zfcp_erp_action erp_action; /* pending error recovery */ atomic_t erp_counter; - u32 maxframe_size; - u32 supported_classes; }; /* the struct device sysfs_device must be at the beginning of this structure. @@ -975,7 +1008,7 @@ struct zfcp_unit { refcount drop to zero */ struct zfcp_port *port; /* remote port of unit */ atomic_t status; /* status of this logical unit */ - unsigned int scsi_lun; /* own SCSI LUN */ + scsi_lun_t scsi_lun; /* own SCSI LUN */ fcp_lun_t fcp_lun; /* own FCP_LUN */ u32 handle; /* handle assigned by FSF */ struct scsi_device *device; /* scsi device struct pointer */ @@ -986,7 +1019,6 @@ struct zfcp_unit { /* FSF request */ struct zfcp_fsf_req { struct list_head list; /* list of FSF requests */ - unsigned long req_id; /* unique request ID */ struct zfcp_adapter *adapter; /* adapter request belongs to */ u8 sbal_number; /* nr of SBALs free for use */ u8 sbal_first; /* first SBAL for this request */ @@ -1020,6 +1052,11 @@ struct zfcp_data { struct list_head adapter_list_head; /* head of adapter list */ struct list_head adapter_remove_lh; /* head of adapters to be removed */ + rwlock_t status_read_lock; /* for status read thread */ + struct list_head status_read_receive_head; + struct list_head status_read_send_head; + struct semaphore status_read_sema; + wait_queue_head_t status_read_thread_wqh; u32 adapters; /* # of adapters in list */ rwlock_t config_lock; /* serialises changes to adapter/port/unit @@ -1058,6 +1095,9 @@ struct zfcp_fsf_req_pool_element { /********************** ZFCP SPECIFIC DEFINES ********************************/ +#define ZFCP_FSFREQ_CLEANUP_TIMEOUT HZ/10 + +#define ZFCP_KNOWN 0x00000001 #define ZFCP_REQ_AUTO_CLEANUP 0x00000002 #define ZFCP_WAIT_FOR_SBAL 0x00000004 #define ZFCP_REQ_NO_QTCB 0x00000008 @@ -1065,6 +1105,9 @@ struct zfcp_fsf_req_pool_element { #define ZFCP_SET 0x00000100 #define ZFCP_CLEAR 0x00000200 +#define ZFCP_INTERRUPTIBLE 1 +#define ZFCP_UNINTERRUPTIBLE 0 + #ifndef atomic_test_mask #define atomic_test_mask(mask, target) \ ((atomic_read(target) & mask) == mask) diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 7f60b6fdf..57cb628a0 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -1,8 +1,18 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. - * - * (C) Copyright IBM Corp. 2002, 2006 + * + * linux/drivers/s390/scsi/zfcp_erp.c + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 + * + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -64,8 +74,8 @@ static int zfcp_erp_strategy_check_action(struct zfcp_erp_action *, int); static int zfcp_erp_adapter_strategy(struct zfcp_erp_action *); static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *, int); static int zfcp_erp_adapter_strategy_close(struct zfcp_erp_action *); -static void zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *); -static void zfcp_erp_adapter_strategy_close_fsf(struct zfcp_erp_action *); +static int zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *); +static int zfcp_erp_adapter_strategy_close_fsf(struct zfcp_erp_action *); static int zfcp_erp_adapter_strategy_open(struct zfcp_erp_action *); static int zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *); static int zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *); @@ -93,9 +103,10 @@ static int zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *); static int zfcp_erp_unit_strategy_close(struct zfcp_erp_action *); static int zfcp_erp_unit_strategy_open(struct zfcp_erp_action *); -static void zfcp_erp_action_dismiss_port(struct zfcp_port *); -static void zfcp_erp_action_dismiss_unit(struct zfcp_unit *); -static void zfcp_erp_action_dismiss(struct zfcp_erp_action *); +static int zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *); +static int zfcp_erp_action_dismiss_port(struct zfcp_port *); +static int zfcp_erp_action_dismiss_unit(struct zfcp_unit *); +static int zfcp_erp_action_dismiss(struct zfcp_erp_action *); static int zfcp_erp_action_enqueue(int, struct zfcp_adapter *, struct zfcp_port *, struct zfcp_unit *); @@ -134,39 +145,29 @@ zfcp_fsf_request_timeout_handler(unsigned long data) zfcp_erp_adapter_reopen(adapter, 0); } -/** - * zfcp_fsf_scsi_er_timeout_handler - timeout handler for scsi eh tasks - * - * This function needs to be called whenever a SCSI error recovery - * action (abort/reset) does not return. Re-opening the adapter means - * that the abort/reset command can be returned by zfcp. It won't complete - * via the adapter anymore (because qdio queues are closed). If ERP is - * already running on this adapter it will be stopped. +/* + * function: zfcp_fsf_scsi_er_timeout_handler + * + * purpose: This function needs to be called whenever a SCSI error recovery + * action (abort/reset) does not return. + * Re-opening the adapter means that the command can be returned + * by zfcp (it is guarranteed that it does not return via the + * adapter anymore). The buffer can then be used again. + * + * returns: sod all */ -void zfcp_fsf_scsi_er_timeout_handler(unsigned long data) +void +zfcp_fsf_scsi_er_timeout_handler(unsigned long data) { struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; - unsigned long flags; ZFCP_LOG_NORMAL("warning: SCSI error recovery timed out. " "Restarting all operations on the adapter %s\n", zfcp_get_busid_by_adapter(adapter)); debug_text_event(adapter->erp_dbf, 1, "eh_lmem_tout"); - - write_lock_irqsave(&adapter->erp_lock, flags); - if (atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_PENDING, - &adapter->status)) { - zfcp_erp_modify_adapter_status(adapter, - ZFCP_STATUS_COMMON_UNBLOCKED|ZFCP_STATUS_COMMON_OPEN, - ZFCP_CLEAR); - zfcp_erp_action_dismiss_adapter(adapter); - write_unlock_irqrestore(&adapter->erp_lock, flags); - /* dismiss all pending requests including requests for ERP */ - zfcp_fsf_req_dismiss_all(adapter); - adapter->fsf_req_seq_no = 0; - } else - write_unlock_irqrestore(&adapter->erp_lock, flags); zfcp_erp_adapter_reopen(adapter, 0); + + return; } /* @@ -176,7 +177,7 @@ void zfcp_fsf_scsi_er_timeout_handler(unsigned long data) * initiates adapter recovery which is done * asynchronously * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ int @@ -212,7 +213,7 @@ zfcp_erp_adapter_reopen_internal(struct zfcp_adapter *adapter, int clear_mask) * purpose: Wrappper for zfcp_erp_adapter_reopen_internal * used to ensure the correct locking * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ int @@ -230,6 +231,13 @@ zfcp_erp_adapter_reopen(struct zfcp_adapter *adapter, int clear_mask) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ int zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear_mask) { @@ -243,6 +251,13 @@ zfcp_erp_adapter_shutdown(struct zfcp_adapter *adapter, int clear_mask) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ int zfcp_erp_port_shutdown(struct zfcp_port *port, int clear_mask) { @@ -256,6 +271,13 @@ zfcp_erp_port_shutdown(struct zfcp_port *port, int clear_mask) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ int zfcp_erp_unit_shutdown(struct zfcp_unit *unit, int clear_mask) { @@ -284,17 +306,20 @@ zfcp_erp_adisc(struct zfcp_port *port) int retval = 0; struct timer_list *timer; - send_els = kzalloc(sizeof(struct zfcp_send_els), GFP_ATOMIC); + send_els = kmalloc(sizeof(struct zfcp_send_els), GFP_ATOMIC); if (send_els == NULL) goto nomem; + memset(send_els, 0, sizeof(*send_els)); - send_els->req = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC); + send_els->req = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC); if (send_els->req == NULL) goto nomem; + memset(send_els->req, 0, sizeof(*send_els->req)); - send_els->resp = kzalloc(sizeof(struct scatterlist), GFP_ATOMIC); + send_els->resp = kmalloc(sizeof(struct scatterlist), GFP_ATOMIC); if (send_els->resp == NULL) goto nomem; + memset(send_els->resp, 0, sizeof(*send_els->resp)); address = (void *) get_zeroed_page(GFP_ATOMIC); if (address == NULL) @@ -478,7 +503,7 @@ zfcp_test_link(struct zfcp_port *port) * initiates Forced Reopen recovery which is done * asynchronously * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ static int @@ -518,7 +543,7 @@ zfcp_erp_port_forced_reopen_internal(struct zfcp_port *port, int clear_mask) * purpose: Wrappper for zfcp_erp_port_forced_reopen_internal * used to ensure the correct locking * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ int @@ -545,7 +570,7 @@ zfcp_erp_port_forced_reopen(struct zfcp_port *port, int clear_mask) * initiates Reopen recovery which is done * asynchronously * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ static int @@ -614,7 +639,7 @@ zfcp_erp_port_reopen(struct zfcp_port *port, int clear_mask) * initiates Reopen recovery which is done * asynchronously * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ static int @@ -679,10 +704,17 @@ zfcp_erp_unit_reopen(struct zfcp_unit *unit, int clear_mask) return retval; } -/** - * zfcp_erp_adapter_block - mark adapter as blocked, block scsi requests +/* + * function: + * + * purpose: disable I/O, + * return any open requests and clean them up, + * aim: no pending and incoming I/O + * + * returns: */ -static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask) +static void +zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask) { debug_text_event(adapter->erp_dbf, 6, "a_bl"); zfcp_erp_modify_adapter_status(adapter, @@ -690,10 +722,15 @@ static void zfcp_erp_adapter_block(struct zfcp_adapter *adapter, int clear_mask) clear_mask, ZFCP_CLEAR); } -/** - * zfcp_erp_adapter_unblock - mark adapter as unblocked, allow scsi requests +/* + * function: + * + * purpose: enable I/O + * + * returns: */ -static void zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) +static void +zfcp_erp_adapter_unblock(struct zfcp_adapter *adapter) { debug_text_event(adapter->erp_dbf, 6, "a_ubl"); atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &adapter->status); @@ -775,6 +812,13 @@ zfcp_erp_unit_unblock(struct zfcp_unit *unit) atomic_set_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status); } +/* + * function: + * + * purpose: + * + * returns: + */ static void zfcp_erp_action_ready(struct zfcp_erp_action *erp_action) { @@ -845,16 +889,18 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) struct zfcp_adapter *adapter = erp_action->adapter; if (erp_action->fsf_req) { - /* take lock to ensure that request is not deleted meanwhile */ - spin_lock(&adapter->req_list_lock); - if ((!zfcp_reqlist_ismember(adapter, - erp_action->fsf_req->req_id)) && - (fsf_req->erp_action == erp_action)) { + /* take lock to ensure that request is not being deleted meanwhile */ + spin_lock(&adapter->fsf_req_list_lock); + /* check whether fsf req does still exist */ + list_for_each_entry(fsf_req, &adapter->fsf_req_list_head, list) + if (fsf_req == erp_action->fsf_req) + break; + if (fsf_req && (fsf_req->erp_action == erp_action)) { /* fsf_req still exists */ debug_text_event(adapter->erp_dbf, 3, "a_ca_req"); debug_event(adapter->erp_dbf, 3, &fsf_req, sizeof (unsigned long)); - /* dismiss fsf_req of timed out/dismissed erp_action */ + /* dismiss fsf_req of timed out or dismissed erp_action */ if (erp_action->status & (ZFCP_STATUS_ERP_DISMISSED | ZFCP_STATUS_ERP_TIMEDOUT)) { debug_text_event(adapter->erp_dbf, 3, @@ -887,22 +933,30 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action) */ erp_action->fsf_req = NULL; } - spin_unlock(&adapter->req_list_lock); + spin_unlock(&adapter->fsf_req_list_lock); } else debug_text_event(adapter->erp_dbf, 3, "a_ca_noreq"); return retval; } -/** - * zfcp_erp_async_handler_nolock - complete erp_action +/* + * purpose: generic handler for asynchronous events related to erp_action events + * (normal completion, time-out, dismissing, retry after + * low memory condition) + * + * note: deletion of timer is not required (e.g. in case of a time-out), + * but a second try does no harm, + * we leave it in here to allow for greater simplification * - * Used for normal completion, time-out, dismissal and failure after - * low memory condition. + * returns: 0 - there was an action to handle + * !0 - otherwise */ -static void zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action, - unsigned long set_mask) +static int +zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action, + unsigned long set_mask) { + int retval; struct zfcp_adapter *adapter = erp_action->adapter; if (zfcp_erp_action_exists(erp_action) == ZFCP_ERP_ACTION_RUNNING) { @@ -913,26 +967,43 @@ static void zfcp_erp_async_handler_nolock(struct zfcp_erp_action *erp_action, del_timer(&erp_action->timer); erp_action->status |= set_mask; zfcp_erp_action_ready(erp_action); + retval = 0; } else { /* action is ready or gone - nothing to do */ debug_text_event(adapter->erp_dbf, 3, "a_asyh_gone"); debug_event(adapter->erp_dbf, 3, &erp_action->action, sizeof (int)); + retval = 1; } + + return retval; } -/** - * zfcp_erp_async_handler - wrapper for erp_async_handler_nolock w/ locking +/* + * purpose: generic handler for asynchronous events related to erp_action + * events (normal completion, time-out, dismissing, retry after + * low memory condition) + * + * note: deletion of timer is not required (e.g. in case of a time-out), + * but a second try does no harm, + * we leave it in here to allow for greater simplification + * + * returns: 0 - there was an action to handle + * !0 - otherwise */ -void zfcp_erp_async_handler(struct zfcp_erp_action *erp_action, - unsigned long set_mask) +int +zfcp_erp_async_handler(struct zfcp_erp_action *erp_action, + unsigned long set_mask) { struct zfcp_adapter *adapter = erp_action->adapter; unsigned long flags; + int retval; write_lock_irqsave(&adapter->erp_lock, flags); - zfcp_erp_async_handler_nolock(erp_action, set_mask); + retval = zfcp_erp_async_handler_nolock(erp_action, set_mask); write_unlock_irqrestore(&adapter->erp_lock, flags); + + return retval; } /* @@ -969,15 +1040,17 @@ zfcp_erp_timeout_handler(unsigned long data) zfcp_erp_async_handler(erp_action, ZFCP_STATUS_ERP_TIMEDOUT); } -/** - * zfcp_erp_action_dismiss - dismiss an erp_action +/* + * purpose: is called for an erp_action which needs to be ended + * though not being done, + * this is usually required if an higher is generated, + * action gets an appropriate flag and will be processed + * accordingly * - * adapter->erp_lock must be held - * - * Dismissal of an erp_action is usually required if an erp_action of - * higher priority is generated. + * locks: erp_lock held (thus we need to call another handler variant) */ -static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action) +static int +zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action) { struct zfcp_adapter *adapter = erp_action->adapter; @@ -985,6 +1058,8 @@ static void zfcp_erp_action_dismiss(struct zfcp_erp_action *erp_action) debug_event(adapter->erp_dbf, 2, &erp_action->action, sizeof (int)); zfcp_erp_async_handler_nolock(erp_action, ZFCP_STATUS_ERP_DISMISSED); + + return 0; } int @@ -1281,6 +1356,13 @@ zfcp_erp_strategy_check_action(struct zfcp_erp_action *erp_action, int retval) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_do_action(struct zfcp_erp_action *erp_action) { @@ -1456,6 +1538,13 @@ zfcp_erp_strategy_check_target(struct zfcp_erp_action *erp_action, int result) return result; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_statechange(int action, u32 status, @@ -1497,6 +1586,13 @@ zfcp_erp_strategy_statechange(int action, return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static inline int zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status) { @@ -1509,6 +1605,13 @@ zfcp_erp_strategy_statechange_detected(atomic_t * target_status, u32 erp_status) !(ZFCP_STATUS_ERP_CLOSE_ONLY & erp_status)); } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result) { @@ -1539,6 +1642,13 @@ zfcp_erp_strategy_check_unit(struct zfcp_unit *unit, int result) return result; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_check_port(struct zfcp_port *port, int result) { @@ -1568,6 +1678,13 @@ zfcp_erp_strategy_check_port(struct zfcp_port *port, int result) return result; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_check_adapter(struct zfcp_adapter *adapter, int result) { @@ -1647,6 +1764,13 @@ zfcp_erp_strategy_followup_actions(int action, return 0; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_strategy_check_queues(struct zfcp_adapter *adapter) { @@ -1685,6 +1809,12 @@ zfcp_erp_wait(struct zfcp_adapter *adapter) return retval; } +/* + * function: zfcp_erp_modify_adapter_status + * + * purpose: + * + */ void zfcp_erp_modify_adapter_status(struct zfcp_adapter *adapter, u32 mask, int set_or_clear) @@ -1771,7 +1901,7 @@ zfcp_erp_modify_unit_status(struct zfcp_unit *unit, u32 mask, int set_or_clear) * purpose: Wrappper for zfcp_erp_port_reopen_all_internal * used to ensure the correct locking * - * returns: 0 - initiated action successfully + * returns: 0 - initiated action succesfully * <0 - failed to initiate action */ int @@ -1789,6 +1919,13 @@ zfcp_erp_port_reopen_all(struct zfcp_adapter *adapter, int clear_mask) return retval; } +/* + * function: + * + * purpose: + * + * returns: FIXME + */ static int zfcp_erp_port_reopen_all_internal(struct zfcp_adapter *adapter, int clear_mask) { @@ -2040,12 +2177,18 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) return retval; } -/** - * zfcp_erp_adapter_strategy_close_qdio - close qdio queues for an adapter +/* + * function: zfcp_qdio_cleanup + * + * purpose: cleans up QDIO operation for the specified adapter + * + * returns: 0 - successful cleanup + * !0 - failed cleanup */ -static void +int zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action) { + int retval = ZFCP_ERP_SUCCEEDED; int first_used; int used_count; struct zfcp_adapter *adapter = erp_action->adapter; @@ -2054,13 +2197,15 @@ zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action) ZFCP_LOG_DEBUG("error: attempt to shut down inactive QDIO " "queues on adapter %s\n", zfcp_get_busid_by_adapter(adapter)); - return; + retval = ZFCP_ERP_FAILED; + goto out; } /* * Get queue_lock and clear QDIOUP flag. Thus it's guaranteed that * do_QDIO won't be called while qdio_shutdown is in progress. */ + write_lock_irq(&adapter->request_queue.queue_lock); atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); write_unlock_irq(&adapter->request_queue.queue_lock); @@ -2092,6 +2237,8 @@ zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action) adapter->request_queue.free_index = 0; atomic_set(&adapter->request_queue.free_count, 0); adapter->request_queue.distance_from_int = 0; + out: + return retval; } static int @@ -2124,9 +2271,9 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) atomic_clear_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, &adapter->status); ZFCP_LOG_DEBUG("Doing exchange config data\n"); - write_lock_irq(&adapter->erp_lock); + write_lock(&adapter->erp_lock); zfcp_erp_action_to_running(erp_action); - write_unlock_irq(&adapter->erp_lock); + write_unlock(&adapter->erp_lock); zfcp_erp_timeout_init(erp_action); if (zfcp_fsf_exchange_config_data(erp_action)) { retval = ZFCP_ERP_FAILED; @@ -2192,9 +2339,9 @@ zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) adapter = erp_action->adapter; atomic_clear_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status); - write_lock_irq(&adapter->erp_lock); + write_lock(&adapter->erp_lock); zfcp_erp_action_to_running(erp_action); - write_unlock_irq(&adapter->erp_lock); + write_unlock(&adapter->erp_lock); zfcp_erp_timeout_init(erp_action); ret = zfcp_fsf_exchange_port_data(erp_action, adapter, NULL); @@ -2214,15 +2361,22 @@ zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) "%s)\n", zfcp_get_busid_by_adapter(adapter)); ret = ZFCP_ERP_FAILED; } - - /* don't treat as error for the sake of compatibility */ - if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status)) - ZFCP_LOG_INFO("warning: exchange port data failed (adapter " + if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status)) { + ZFCP_LOG_INFO("error: exchange port data failed (adapter " "%s\n", zfcp_get_busid_by_adapter(adapter)); + ret = ZFCP_ERP_FAILED; + } return ret; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_adapter_strategy_open_fsf_statusread(struct zfcp_erp_action *erp_action) @@ -2248,12 +2402,18 @@ zfcp_erp_adapter_strategy_open_fsf_statusread(struct zfcp_erp_action return retval; } -/** - * zfcp_erp_adapter_strategy_close_fsf - stop FSF operations for an adapter +/* + * function: zfcp_fsf_cleanup + * + * purpose: cleanup FSF operation for specified adapter + * + * returns: 0 - FSF operation successfully cleaned up + * !0 - failed to cleanup FSF operation for this adapter */ -static void +static int zfcp_erp_adapter_strategy_close_fsf(struct zfcp_erp_action *erp_action) { + int retval = ZFCP_ERP_SUCCEEDED; struct zfcp_adapter *adapter = erp_action->adapter; /* @@ -2267,6 +2427,8 @@ zfcp_erp_adapter_strategy_close_fsf(struct zfcp_erp_action *erp_action) /* all ports and units are closed */ zfcp_erp_modify_adapter_status(adapter, ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); + + return retval; } /* @@ -2383,6 +2545,13 @@ zfcp_erp_port_strategy(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_port_strategy_open(struct zfcp_erp_action *erp_action) { @@ -2397,6 +2566,15 @@ zfcp_erp_port_strategy_open(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + * + * FIXME(design): currently only prepared for fabric (nameserver!) + */ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action) { @@ -2512,6 +2690,13 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_port_strategy_open_nameserver(struct zfcp_erp_action *erp_action) { @@ -2628,6 +2813,13 @@ zfcp_erp_port_forced_strategy_close(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_port_strategy_clearstati(struct zfcp_port *port) { @@ -2830,6 +3022,13 @@ zfcp_erp_unit_strategy(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_unit_strategy_clearstati(struct zfcp_unit *unit) { @@ -2930,6 +3129,13 @@ zfcp_erp_unit_strategy_open(struct zfcp_erp_action *erp_action) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static inline void zfcp_erp_timeout_init(struct zfcp_erp_action *erp_action) { @@ -3125,6 +3331,13 @@ zfcp_erp_action_enqueue(int action, return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ static int zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action) { @@ -3189,13 +3402,9 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, break; case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: case ZFCP_ERP_ACTION_REOPEN_PORT: - if (atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, - &port->status)) { - zfcp_port_put(port); - break; - } - if ((result == ZFCP_ERP_SUCCEEDED) + && !atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, + &port->status) && !port->rport) { struct fc_rport_identifiers ids; ids.node_name = port->wwnn; @@ -3209,30 +3418,12 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, "(adapter %s, wwpn=0x%016Lx)\n", zfcp_get_busid_by_port(port), port->wwpn); - else { + else scsi_flush_work(adapter->scsi_host); - port->rport->maxframe_size = port->maxframe_size; - port->rport->supported_classes = - port->supported_classes; - } - } - if ((result != ZFCP_ERP_SUCCEEDED) && port->rport) { - fc_remote_port_delete(port->rport); - port->rport = NULL; } zfcp_port_put(port); break; case ZFCP_ERP_ACTION_REOPEN_ADAPTER: - if (result != ZFCP_ERP_SUCCEEDED) { - struct zfcp_port *port; - list_for_each_entry(port, &adapter->port_list_head, list) - if (port->rport && - !atomic_test_mask(ZFCP_STATUS_PORT_WKA, - &port->status)) { - fc_remote_port_delete(port->rport); - port->rport = NULL; - } - } zfcp_adapter_put(adapter); break; default: @@ -3241,8 +3432,17 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, } -void zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *adapter) +/* + * function: + * + * purpose: + * + * returns: FIXME + */ +static int +zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *adapter) { + int retval = 0; struct zfcp_port *port; debug_text_event(adapter->erp_dbf, 5, "a_actab"); @@ -3251,10 +3451,21 @@ void zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *adapter) else list_for_each_entry(port, &adapter->port_list_head, list) zfcp_erp_action_dismiss_port(port); + + return retval; } -static void zfcp_erp_action_dismiss_port(struct zfcp_port *port) +/* + * function: + * + * purpose: + * + * returns: FIXME + */ +static int +zfcp_erp_action_dismiss_port(struct zfcp_port *port) { + int retval = 0; struct zfcp_unit *unit; struct zfcp_adapter *adapter = port->adapter; @@ -3265,18 +3476,38 @@ static void zfcp_erp_action_dismiss_port(struct zfcp_port *port) else list_for_each_entry(unit, &port->unit_list_head, list) zfcp_erp_action_dismiss_unit(unit); + + return retval; } -static void zfcp_erp_action_dismiss_unit(struct zfcp_unit *unit) +/* + * function: + * + * purpose: + * + * returns: FIXME + */ +static int +zfcp_erp_action_dismiss_unit(struct zfcp_unit *unit) { + int retval = 0; struct zfcp_adapter *adapter = unit->port->adapter; debug_text_event(adapter->erp_dbf, 5, "u_actab"); debug_event(adapter->erp_dbf, 5, &unit->fcp_lun, sizeof (fcp_lun_t)); if (atomic_test_mask(ZFCP_STATUS_COMMON_ERP_INUSE, &unit->status)) zfcp_erp_action_dismiss(&unit->erp_action); + + return retval; } +/* + * function: + * + * purpose: moves erp_action to 'erp running list' + * + * returns: + */ static inline void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) { @@ -3287,6 +3518,13 @@ zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action) list_move(&erp_action->list, &erp_action->adapter->erp_running_head); } +/* + * function: + * + * purpose: moves erp_action to 'erp ready list' + * + * returns: + */ static inline void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) { @@ -3297,6 +3535,11 @@ zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) list_move(&erp_action->list, &erp_action->adapter->erp_ready_head); } +/* + * function: zfcp_erp_port_boxed + * + * purpose: + */ void zfcp_erp_port_boxed(struct zfcp_port *port) { @@ -3313,6 +3556,11 @@ zfcp_erp_port_boxed(struct zfcp_port *port) zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED); } +/* + * function: zfcp_erp_unit_boxed + * + * purpose: + */ void zfcp_erp_unit_boxed(struct zfcp_unit *unit) { @@ -3326,6 +3574,11 @@ zfcp_erp_unit_boxed(struct zfcp_unit *unit) zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED); } +/* + * function: zfcp_erp_port_access_denied + * + * purpose: + */ void zfcp_erp_port_access_denied(struct zfcp_port *port) { @@ -3342,6 +3595,11 @@ zfcp_erp_port_access_denied(struct zfcp_port *port) read_unlock_irqrestore(&zfcp_data.config_lock, flags); } +/* + * function: zfcp_erp_unit_access_denied + * + * purpose: + */ void zfcp_erp_unit_access_denied(struct zfcp_unit *unit) { @@ -3355,6 +3613,11 @@ zfcp_erp_unit_access_denied(struct zfcp_unit *unit) ZFCP_SET); } +/* + * function: zfcp_erp_adapter_access_changed + * + * purpose: + */ void zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) { @@ -3365,7 +3628,7 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) return; debug_text_event(adapter->erp_dbf, 3, "a_access_recover"); - debug_event(adapter->erp_dbf, 3, zfcp_get_busid_by_adapter(adapter), 8); + debug_event(adapter->erp_dbf, 3, &adapter->name, 8); read_lock_irqsave(&zfcp_data.config_lock, flags); if (adapter->nameserver_port) @@ -3376,6 +3639,11 @@ zfcp_erp_adapter_access_changed(struct zfcp_adapter *adapter) read_unlock_irqrestore(&zfcp_data.config_lock, flags); } +/* + * function: zfcp_erp_port_access_changed + * + * purpose: + */ void zfcp_erp_port_access_changed(struct zfcp_port *port) { @@ -3404,6 +3672,11 @@ zfcp_erp_port_access_changed(struct zfcp_port *port) zfcp_get_busid_by_adapter(adapter), port->wwpn); } +/* + * function: zfcp_erp_unit_access_changed + * + * purpose: + */ void zfcp_erp_unit_access_changed(struct zfcp_unit *unit) { diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 146d7a2b4..700f5402a 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h @@ -1,8 +1,18 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * + * linux/drivers/s390/scsi/zfcp_ext.h + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 * - * (C) Copyright IBM Corp. 2002, 2006 + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -63,6 +73,7 @@ extern int zfcp_qdio_allocate_queues(struct zfcp_adapter *); extern void zfcp_qdio_free_queues(struct zfcp_adapter *); extern int zfcp_qdio_determine_pci(struct zfcp_qdio_queue *, struct zfcp_fsf_req *); +extern int zfcp_qdio_reqid_check(struct zfcp_adapter *, void *); extern volatile struct qdio_buffer_element *zfcp_qdio_sbale_req (struct zfcp_fsf_req *, int, int); @@ -114,7 +125,6 @@ extern int zfcp_nameserver_enqueue(struct zfcp_adapter *); extern int zfcp_ns_gid_pn_request(struct zfcp_erp_action *); extern int zfcp_check_ct_response(struct ct_hdr *); extern int zfcp_handle_els_rjt(u32, struct zfcp_ls_rjt_par *); -extern void zfcp_plogi_evaluate(struct zfcp_port *, struct fsf_plogi *); /******************************* SCSI ****************************************/ extern int zfcp_adapter_scsi_register(struct zfcp_adapter *); @@ -131,6 +141,8 @@ extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *, struct scsi_cmnd *, struct timer_list *); extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, struct timer_list *); +extern void zfcp_set_fc_host_attrs(struct zfcp_adapter *); +extern void zfcp_set_fc_rport_attrs(struct zfcp_port *); extern struct scsi_transport_template *zfcp_transport_template; extern struct fc_function_template zfcp_transport_functions; @@ -139,7 +151,6 @@ extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u32, int); extern int zfcp_erp_adapter_reopen(struct zfcp_adapter *, int); extern int zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int); extern void zfcp_erp_adapter_failed(struct zfcp_adapter *); -extern void zfcp_erp_action_dismiss_adapter(struct zfcp_adapter *); extern void zfcp_erp_modify_port_status(struct zfcp_port *, u32, int); extern int zfcp_erp_port_reopen(struct zfcp_port *, int); @@ -156,7 +167,7 @@ extern void zfcp_erp_unit_failed(struct zfcp_unit *); extern int zfcp_erp_thread_setup(struct zfcp_adapter *); extern int zfcp_erp_thread_kill(struct zfcp_adapter *); extern int zfcp_erp_wait(struct zfcp_adapter *); -extern void zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long); +extern int zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long); extern int zfcp_test_link(struct zfcp_port *); @@ -190,10 +201,5 @@ extern void zfcp_scsi_dbf_event_abort(const char *, struct zfcp_adapter *, struct zfcp_fsf_req *); extern void zfcp_scsi_dbf_event_devreset(const char *, u8, struct zfcp_unit *, struct scsi_cmnd *); -extern void zfcp_reqlist_add(struct zfcp_adapter *, struct zfcp_fsf_req *); -extern void zfcp_reqlist_remove(struct zfcp_adapter *, unsigned long); -extern struct zfcp_fsf_req *zfcp_reqlist_ismember(struct zfcp_adapter *, - unsigned long); -extern int zfcp_reqlist_isempty(struct zfcp_adapter *); #endif /* ZFCP_EXT_H */ diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index ff2eacf5e..662ec571d 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -1,8 +1,19 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. * - * (C) Copyright IBM Corp. 2002, 2006 + * linux/drivers/s390/scsi/zfcp_fsf.c + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 + * + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * 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 @@ -49,6 +60,7 @@ static int zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *); static void zfcp_fsf_link_down_info_eval(struct zfcp_adapter *, struct fsf_link_down_info *); static int zfcp_fsf_req_dispatch(struct zfcp_fsf_req *); +static void zfcp_fsf_req_dismiss(struct zfcp_fsf_req *); /* association between FSF command and FSF QTCB type */ static u32 fsf_qtcb_type[] = { @@ -145,50 +157,49 @@ zfcp_fsf_req_free(struct zfcp_fsf_req *fsf_req) kfree(fsf_req); } -/** - * zfcp_fsf_req_dismiss - dismiss a single fsf request +/* + * function: + * + * purpose: + * + * returns: + * + * note: qdio queues shall be down (no ongoing inbound processing) */ -static void zfcp_fsf_req_dismiss(struct zfcp_adapter *adapter, - struct zfcp_fsf_req *fsf_req, - unsigned int counter) +int +zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) { - u64 dbg_tmp[2]; + struct zfcp_fsf_req *fsf_req, *tmp; + unsigned long flags; + LIST_HEAD(remove_queue); - dbg_tmp[0] = (u64) atomic_read(&adapter->reqs_active); - dbg_tmp[1] = (u64) counter; - debug_event(adapter->erp_dbf, 4, (void *) dbg_tmp, 16); - list_del(&fsf_req->list); - fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; - zfcp_fsf_req_complete(fsf_req); -} + spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); + list_splice_init(&adapter->fsf_req_list_head, &remove_queue); + atomic_set(&adapter->fsf_reqs_active, 0); + spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); -/** - * zfcp_fsf_req_dismiss_all - dismiss all remaining fsf requests - */ -int zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) -{ - struct zfcp_fsf_req *request, *tmp; - unsigned long flags; - unsigned int i, counter; - - spin_lock_irqsave(&adapter->req_list_lock, flags); - atomic_set(&adapter->reqs_active, 0); - for (i=0; ireq_list[i])) - continue; - - counter = 0; - list_for_each_entry_safe(request, tmp, - &adapter->req_list[i], list) { - zfcp_fsf_req_dismiss(adapter, request, counter); - counter++; - } + list_for_each_entry_safe(fsf_req, tmp, &remove_queue, list) { + list_del(&fsf_req->list); + zfcp_fsf_req_dismiss(fsf_req); } - spin_unlock_irqrestore(&adapter->req_list_lock, flags); return 0; } +/* + * function: + * + * purpose: + * + * returns: + */ +static void +zfcp_fsf_req_dismiss(struct zfcp_fsf_req *fsf_req) +{ + fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; + zfcp_fsf_req_complete(fsf_req); +} + /* * function: zfcp_fsf_req_complete * @@ -866,7 +877,6 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) struct zfcp_adapter *adapter = fsf_req->adapter; struct fsf_status_read_buffer *status_buffer = (struct fsf_status_read_buffer *) fsf_req->data; - struct fsf_bit_error_payload *fsf_bit_error; if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { zfcp_hba_dbf_event_fsf_unsol("dism", adapter, status_buffer); @@ -893,37 +903,10 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) break; case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: - fsf_bit_error = (struct fsf_bit_error_payload *) - status_buffer->payload; - ZFCP_LOG_NORMAL("Warning: bit error threshold data " - "received (adapter %s, " - "link failures = %i, loss of sync errors = %i, " - "loss of signal errors = %i, " - "primitive sequence errors = %i, " - "invalid transmission word errors = %i, " - "CRC errors = %i)\n", - zfcp_get_busid_by_adapter(adapter), - fsf_bit_error->link_failure_error_count, - fsf_bit_error->loss_of_sync_error_count, - fsf_bit_error->loss_of_signal_error_count, - fsf_bit_error->primitive_sequence_error_count, - fsf_bit_error->invalid_transmission_word_error_count, - fsf_bit_error->crc_error_count); - ZFCP_LOG_INFO("Additional bit error threshold data " - "(adapter %s, " - "primitive sequence event time-outs = %i, " - "elastic buffer overrun errors = %i, " - "advertised receive buffer-to-buffer credit = %i, " - "current receice buffer-to-buffer credit = %i, " - "advertised transmit buffer-to-buffer credit = %i, " - "current transmit buffer-to-buffer credit = %i)\n", - zfcp_get_busid_by_adapter(adapter), - fsf_bit_error->primitive_sequence_event_timeout_count, - fsf_bit_error->elastic_buffer_overrun_error_count, - fsf_bit_error->advertised_receive_b2b_credit, - fsf_bit_error->current_receive_b2b_credit, - fsf_bit_error->advertised_transmit_b2b_credit, - fsf_bit_error->current_transmit_b2b_credit); + ZFCP_LOG_NORMAL("Bit error threshold data received:\n"); + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, + (char *) status_buffer, + sizeof (struct fsf_status_read_buffer)); break; case FSF_STATUS_READ_LINK_DOWN: @@ -1444,8 +1427,7 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, /* settings in QTCB */ fsf_req->qtcb->header.port_handle = port->handle; - fsf_req->qtcb->bottom.support.service_class = - ZFCP_FC_SERVICE_CLASS_DEFAULT; + fsf_req->qtcb->bottom.support.service_class = adapter->fc_service_class; fsf_req->qtcb->bottom.support.timeout = ct->timeout; fsf_req->data = (unsigned long) ct; @@ -1514,10 +1496,18 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) break; case FSF_SERVICE_CLASS_NOT_SUPPORTED: - ZFCP_LOG_INFO("error: adapter %s does not support fc " - "class %d.\n", - zfcp_get_busid_by_port(port), - ZFCP_FC_SERVICE_CLASS_DEFAULT); + if (adapter->fc_service_class <= 3) { + ZFCP_LOG_INFO("error: adapter %s does not support fc " + "class %d.\n", + zfcp_get_busid_by_port(port), + adapter->fc_service_class); + } else { + ZFCP_LOG_INFO("bug: The fibre channel class at the " + "adapter %s is invalid. " + "(debug info %d)\n", + zfcp_get_busid_by_port(port), + adapter->fc_service_class); + } /* stop operation for this adapter */ debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); zfcp_erp_adapter_shutdown(adapter, 0); @@ -1740,8 +1730,7 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) /* settings in QTCB */ fsf_req->qtcb->bottom.support.d_id = d_id; - fsf_req->qtcb->bottom.support.service_class = - ZFCP_FC_SERVICE_CLASS_DEFAULT; + fsf_req->qtcb->bottom.support.service_class = adapter->fc_service_class; fsf_req->qtcb->bottom.support.timeout = ZFCP_ELS_TIMEOUT; fsf_req->data = (unsigned long) els; @@ -1811,10 +1800,18 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) break; case FSF_SERVICE_CLASS_NOT_SUPPORTED: - ZFCP_LOG_INFO("error: adapter %s does not support fc " - "class %d.\n", - zfcp_get_busid_by_adapter(adapter), - ZFCP_FC_SERVICE_CLASS_DEFAULT); + if (adapter->fc_service_class <= 3) { + ZFCP_LOG_INFO("error: adapter %s does " + "not support fibrechannel class %d.\n", + zfcp_get_busid_by_adapter(adapter), + adapter->fc_service_class); + } else { + ZFCP_LOG_INFO("bug: The fibrechannel class at " + "adapter %s is invalid. " + "(debug info %d)\n", + zfcp_get_busid_by_adapter(adapter), + adapter->fc_service_class); + } /* stop operation for this adapter */ debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); zfcp_erp_adapter_shutdown(adapter, 0); @@ -1943,6 +1940,14 @@ skip_fsfstatus: return retval; } +/* + * function: + * + * purpose: + * + * returns: address of initiated FSF request + * NULL - request could not be initiated + */ int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) { @@ -2227,7 +2232,7 @@ zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action, /* setup new FSF request */ retval = zfcp_fsf_req_create(adapter, FSF_QTCB_EXCHANGE_PORT_DATA, erp_action ? ZFCP_REQ_AUTO_CLEANUP : 0, - NULL, &lock_flags, &fsf_req); + 0, &lock_flags, &fsf_req); if (retval < 0) { ZFCP_LOG_INFO("error: Out of resources. Could not create an " "exchange port data request for" @@ -2560,7 +2565,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) if (!atomic_test_mask(ZFCP_STATUS_PORT_NO_WWPN, &port->status)) { if (fsf_req->qtcb->bottom.support.els1_length < - sizeof (struct fsf_plogi)) { + ((((unsigned long) &plogi->serv_param.wwpn) - + ((unsigned long) plogi)) + sizeof (u64))) { ZFCP_LOG_INFO( "warning: insufficient length of " "PLOGI payload (%i)\n", @@ -2579,10 +2585,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) atomic_clear_mask( ZFCP_STATUS_PORT_DID_DID, &port->status); - } else { + } else port->wwnn = plogi->serv_param.wwnn; - zfcp_plogi_evaluate(port, plogi); - } } } break; @@ -2989,8 +2993,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) erp_action->fsf_req->qtcb->bottom.support.fcp_lun = erp_action->unit->fcp_lun; if (!(erp_action->adapter->connection_features & FSF_FEATURE_NPIV_MODE)) - erp_action->fsf_req->qtcb->bottom.support.option = - FSF_OPEN_LUN_SUPPRESS_BOXING; + erp_action->fsf_req->qtcb->bottom.support.option = + FSF_OPEN_LUN_SUPPRESS_BOXING; atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status); erp_action->fsf_req->data = (unsigned long) erp_action->unit; erp_action->fsf_req->erp_action = erp_action; @@ -3565,7 +3569,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, } /* set FC service class in QTCB (3 per default) */ - fsf_req->qtcb->bottom.io.service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT; + fsf_req->qtcb->bottom.io.service_class = adapter->fc_service_class; /* set FCP_LUN in FCP_CMND IU in QTCB */ fcp_cmnd_iu->fcp_lun = unit->fcp_lun; @@ -3663,6 +3667,18 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, return retval; } +/* + * function: zfcp_fsf_send_fcp_command_task_management + * + * purpose: + * + * returns: + * + * FIXME(design): should be watched by a timeout!!! + * FIXME(design) shouldn't this be modified to return an int + * also...don't know how though + * + */ struct zfcp_fsf_req * zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter, struct zfcp_unit *unit, @@ -3704,7 +3720,7 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter, fsf_req->qtcb->header.lun_handle = unit->handle; fsf_req->qtcb->header.port_handle = unit->port->handle; fsf_req->qtcb->bottom.io.data_direction = FSF_DATADIR_CMND; - fsf_req->qtcb->bottom.io.service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT; + fsf_req->qtcb->bottom.io.service_class = adapter->fc_service_class; fsf_req->qtcb->bottom.io.fcp_cmnd_length = sizeof (struct fcp_cmnd_iu) + sizeof (fcp_dl_t); @@ -3827,10 +3843,18 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) break; case FSF_SERVICE_CLASS_NOT_SUPPORTED: - ZFCP_LOG_INFO("error: adapter %s does not support fc " - "class %d.\n", - zfcp_get_busid_by_unit(unit), - ZFCP_FC_SERVICE_CLASS_DEFAULT); + if (fsf_req->adapter->fc_service_class <= 3) { + ZFCP_LOG_NORMAL("error: The adapter %s does " + "not support fibrechannel class %d.\n", + zfcp_get_busid_by_unit(unit), + fsf_req->adapter->fc_service_class); + } else { + ZFCP_LOG_NORMAL("bug: The fibrechannel class at " + "adapter %s is invalid. " + "(debug info %d)\n", + zfcp_get_busid_by_unit(unit), + fsf_req->adapter->fc_service_class); + } /* stop operation for this adapter */ debug_text_exception(fsf_req->adapter->erp_dbf, 0, "fsf_s_class_nsup"); @@ -4592,14 +4616,12 @@ static inline void zfcp_fsf_req_qtcb_init(struct zfcp_fsf_req *fsf_req) { if (likely(fsf_req->qtcb != NULL)) { - fsf_req->qtcb->prefix.req_seq_no = - fsf_req->adapter->fsf_req_seq_no; - fsf_req->qtcb->prefix.req_id = fsf_req->req_id; + fsf_req->qtcb->prefix.req_seq_no = fsf_req->adapter->fsf_req_seq_no; + fsf_req->qtcb->prefix.req_id = (unsigned long)fsf_req; fsf_req->qtcb->prefix.ulp_info = ZFCP_ULP_INFO_VERSION; - fsf_req->qtcb->prefix.qtcb_type = - fsf_qtcb_type[fsf_req->fsf_command]; + fsf_req->qtcb->prefix.qtcb_type = fsf_qtcb_type[fsf_req->fsf_command]; fsf_req->qtcb->prefix.qtcb_version = ZFCP_QTCB_VERSION; - fsf_req->qtcb->header.req_handle = fsf_req->req_id; + fsf_req->qtcb->header.req_handle = (unsigned long)fsf_req; fsf_req->qtcb->header.fsf_command = fsf_req->fsf_command; } } @@ -4656,7 +4678,6 @@ zfcp_fsf_req_create(struct zfcp_adapter *adapter, u32 fsf_cmd, int req_flags, { volatile struct qdio_buffer_element *sbale; struct zfcp_fsf_req *fsf_req = NULL; - unsigned long flags; int ret = 0; struct zfcp_qdio_queue *req_queue = &adapter->request_queue; @@ -4671,12 +4692,6 @@ zfcp_fsf_req_create(struct zfcp_adapter *adapter, u32 fsf_cmd, int req_flags, fsf_req->adapter = adapter; fsf_req->fsf_command = fsf_cmd; - INIT_LIST_HEAD(&fsf_req->list); - - /* unique request id */ - spin_lock_irqsave(&adapter->req_list_lock, flags); - fsf_req->req_id = adapter->req_no++; - spin_unlock_irqrestore(&adapter->req_list_lock, flags); zfcp_fsf_req_qtcb_init(fsf_req); @@ -4716,7 +4731,7 @@ zfcp_fsf_req_create(struct zfcp_adapter *adapter, u32 fsf_cmd, int req_flags, sbale = zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, 0); /* setup common SBALE fields */ - sbale[0].addr = (void *) fsf_req->req_id; + sbale[0].addr = fsf_req; sbale[0].flags |= SBAL_FLAGS0_COMMAND; if (likely(fsf_req->qtcb != NULL)) { sbale[1].addr = (void *) fsf_req->qtcb; @@ -4756,7 +4771,7 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) volatile struct qdio_buffer_element *sbale; int inc_seq_no; int new_distance_from_int; - u64 dbg_tmp[2]; + unsigned long flags; int retval = 0; adapter = fsf_req->adapter; @@ -4770,10 +4785,10 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, (char *) sbale[1].addr, sbale[1].length); - /* put allocated FSF request into hash table */ - spin_lock(&adapter->req_list_lock); - zfcp_reqlist_add(adapter, fsf_req); - spin_unlock(&adapter->req_list_lock); + /* put allocated FSF request at list tail */ + spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); + list_add_tail(&fsf_req->list, &adapter->fsf_req_list_head); + spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); inc_seq_no = (fsf_req->qtcb != NULL); @@ -4812,10 +4827,6 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) QDIO_FLAG_SYNC_OUTPUT, 0, fsf_req->sbal_first, fsf_req->sbal_number, NULL); - dbg_tmp[0] = (unsigned long) sbale[0].addr; - dbg_tmp[1] = (u64) retval; - debug_event(adapter->erp_dbf, 4, (void *) dbg_tmp, 16); - if (unlikely(retval)) { /* Queues are down..... */ retval = -EIO; @@ -4825,17 +4836,22 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) */ if (timer) del_timer(timer); - spin_lock(&adapter->req_list_lock); - zfcp_reqlist_remove(adapter, fsf_req->req_id); - spin_unlock(&adapter->req_list_lock); - /* undo changes in request queue made for this request */ + spin_lock_irqsave(&adapter->fsf_req_list_lock, flags); + list_del(&fsf_req->list); + spin_unlock_irqrestore(&adapter->fsf_req_list_lock, flags); + /* + * adjust the number of free SBALs in request queue as well as + * position of first one + */ zfcp_qdio_zero_sbals(req_queue->buffer, fsf_req->sbal_first, fsf_req->sbal_number); atomic_add(fsf_req->sbal_number, &req_queue->free_count); - req_queue->free_index -= fsf_req->sbal_number; + req_queue->free_index -= fsf_req->sbal_number; /* increase */ req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q; req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ - zfcp_erp_adapter_reopen(adapter, 0); + ZFCP_LOG_DEBUG + ("error: do_QDIO failed. Buffers could not be enqueued " + "to request queue.\n"); } else { req_queue->distance_from_int = new_distance_from_int; /* @@ -4851,7 +4867,7 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) adapter->fsf_req_seq_no++; /* count FSF requests pending */ - atomic_inc(&adapter->reqs_active); + atomic_inc(&adapter->fsf_reqs_active); } return retval; } diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h index 711866189..e734415ca 100644 --- a/drivers/s390/scsi/zfcp_fsf.h +++ b/drivers/s390/scsi/zfcp_fsf.h @@ -1,8 +1,19 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * + * linux/drivers/s390/scsi/zfcp_fsf.h + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 * - * (C) Copyright IBM Corp. 2002, 2006 + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * 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 @@ -22,7 +33,8 @@ #ifndef FSF_H #define FSF_H -#define FSF_QTCB_CURRENT_VERSION 0x00000001 +#define FSF_QTCB_VERSION1 0x00000001 +#define FSF_QTCB_CURRENT_VERSION FSF_QTCB_VERSION1 /* FSF commands */ #define FSF_QTCB_FCP_CMND 0x00000001 @@ -52,7 +64,7 @@ #define FSF_CFDC_OPTION_FULL_ACCESS 0x00000002 #define FSF_CFDC_OPTION_RESTRICTED_ACCESS 0x00000004 -/* FSF protocol states */ +/* FSF protocol stati */ #define FSF_PROT_GOOD 0x00000001 #define FSF_PROT_QTCB_VERSION_ERROR 0x00000010 #define FSF_PROT_SEQ_NUMB_ERROR 0x00000020 @@ -64,7 +76,7 @@ #define FSF_PROT_REEST_QUEUE 0x00000800 #define FSF_PROT_ERROR_STATE 0x01000000 -/* FSF states */ +/* FSF stati */ #define FSF_GOOD 0x00000000 #define FSF_PORT_ALREADY_OPEN 0x00000001 #define FSF_LUN_ALREADY_OPEN 0x00000002 @@ -257,6 +269,20 @@ #define FSF_UNIT_ACCESS_EXCLUSIVE 0x02000000 #define FSF_UNIT_ACCESS_OUTBOUND_TRANSFER 0x10000000 +struct fsf_queue_designator; +struct fsf_status_read_buffer; +struct fsf_port_closed_payload; +struct fsf_bit_error_payload; +union fsf_prot_status_qual; +struct fsf_qual_version_error; +struct fsf_qual_sequence_error; +struct fsf_qtcb_prefix; +struct fsf_qtcb_header; +struct fsf_qtcb_bottom_config; +struct fsf_qtcb_bottom_support; +struct fsf_qtcb_bottom_io; +union fsf_qtcb_bottom; + struct fsf_queue_designator { u8 cssid; u8 chpid; diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index dbd9f48e8..1c3275163 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c @@ -1,8 +1,18 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_qdio.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * QDIO related routines + * + * (C) Copyright IBM Corp. 2002, 2004 + * + * Authors: + * Martin Peschke + * Raimund Schroeder + * Wolfgang Taphorn + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -168,8 +178,7 @@ zfcp_qdio_allocate(struct zfcp_adapter *adapter) init_data->cdev = adapter->ccw_device; init_data->q_format = QDIO_SCSI_QFMT; - memcpy(init_data->adapter_name, zfcp_get_busid_by_adapter(adapter), 8); - ASCEBC(init_data->adapter_name, 8); + memcpy(init_data->adapter_name, &adapter->name, 8); init_data->qib_param_field_format = 0; init_data->qib_param_field = NULL; init_data->input_slib_elements = NULL; @@ -282,37 +291,6 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device, return; } -/** - * zfcp_qdio_reqid_check - checks for valid reqids or unsolicited status - */ -static int zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, - unsigned long req_id) -{ - struct zfcp_fsf_req *fsf_req; - unsigned long flags; - - debug_long_event(adapter->erp_dbf, 4, req_id); - - spin_lock_irqsave(&adapter->req_list_lock, flags); - fsf_req = zfcp_reqlist_ismember(adapter, req_id); - - if (!fsf_req) { - spin_unlock_irqrestore(&adapter->req_list_lock, flags); - ZFCP_LOG_NORMAL("error: unknown request id (%ld).\n", req_id); - zfcp_erp_adapter_reopen(adapter, 0); - return -EINVAL; - } - - zfcp_reqlist_remove(adapter, req_id); - atomic_dec(&adapter->reqs_active); - spin_unlock_irqrestore(&adapter->req_list_lock, flags); - - /* finish the FSF request */ - zfcp_fsf_req_complete(fsf_req); - - return 0; -} - /* * function: zfcp_qdio_response_handler * @@ -375,7 +353,7 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, /* look for QDIO request identifiers in SB */ buffere = &buffer->element[buffere_index]; retval = zfcp_qdio_reqid_check(adapter, - (unsigned long) buffere->addr); + (void *) buffere->addr); if (retval) { ZFCP_LOG_NORMAL("bug: unexpected inbound " @@ -446,6 +424,51 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, return; } +/* + * function: zfcp_qdio_reqid_check + * + * purpose: checks for valid reqids or unsolicited status + * + * returns: 0 - valid request id or unsolicited status + * !0 - otherwise + */ +int +zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) +{ + struct zfcp_fsf_req *fsf_req; + + /* invalid (per convention used in this driver) */ + if (unlikely(!sbale_addr)) { + ZFCP_LOG_NORMAL("bug: invalid reqid\n"); + return -EINVAL; + } + + /* valid request id and thus (hopefully :) valid fsf_req address */ + fsf_req = (struct zfcp_fsf_req *) sbale_addr; + + /* serialize with zfcp_fsf_req_dismiss_all */ + spin_lock(&adapter->fsf_req_list_lock); + if (list_empty(&adapter->fsf_req_list_head)) { + spin_unlock(&adapter->fsf_req_list_lock); + return 0; + } + list_del(&fsf_req->list); + atomic_dec(&adapter->fsf_reqs_active); + spin_unlock(&adapter->fsf_req_list_lock); + + if (unlikely(adapter != fsf_req->adapter)) { + ZFCP_LOG_NORMAL("bug: invalid reqid (fsf_req=%p, " + "fsf_req->adapter=%p, adapter=%p)\n", + fsf_req, fsf_req->adapter, adapter); + return -EINVAL; + } + + /* finish the FSF request */ + zfcp_fsf_req_complete(fsf_req); + + return 0; +} + /** * zfcp_qdio_sbale_get - return pointer to SBALE of qdio_queue * @queue: queue from which SBALE should be returned diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index c489dece8..9e6d07d7b 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -1,8 +1,18 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * + * linux/drivers/s390/scsi/zfcp_scsi.c + * + * FCP adapter driver for IBM eServer zSeries + * + * (C) Copyright IBM Corp. 2002, 2004 * - * (C) Copyright IBM Corp. 2002, 2006 + * Author(s): Martin Peschke + * Raimund Schroeder + * Aron Zeh + * Wolfgang Taphorn + * Stefan Bader + * Heiko Carstens + * Andreas Herrmann * * 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 @@ -30,12 +40,13 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *, void (*done) (struct scsi_cmnd *)); static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *); static int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *); +static int zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *); static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *); static int zfcp_task_management_function(struct zfcp_unit *, u8, struct scsi_cmnd *); -static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, - unsigned int, unsigned int); +static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, + scsi_lun_t); static struct device_attribute *zfcp_sysfs_sdev_attrs[]; @@ -43,24 +54,33 @@ struct scsi_transport_template *zfcp_transport_template; struct zfcp_data zfcp_data = { .scsi_host_template = { - .name = ZFCP_NAME, - .proc_name = "zfcp", - .slave_alloc = zfcp_scsi_slave_alloc, - .slave_configure = zfcp_scsi_slave_configure, - .slave_destroy = zfcp_scsi_slave_destroy, - .queuecommand = zfcp_scsi_queuecommand, - .eh_abort_handler = zfcp_scsi_eh_abort_handler, - .eh_device_reset_handler = zfcp_scsi_eh_device_reset_handler, - .eh_bus_reset_handler = zfcp_scsi_eh_host_reset_handler, - .eh_host_reset_handler = zfcp_scsi_eh_host_reset_handler, - .can_queue = 4096, - .this_id = -1, - .sg_tablesize = ZFCP_MAX_SBALES_PER_REQ, - .cmd_per_lun = 1, - .use_clustering = 1, - .sdev_attrs = zfcp_sysfs_sdev_attrs, + name: ZFCP_NAME, + proc_name: "zfcp", + proc_info: NULL, + detect: NULL, + slave_alloc: zfcp_scsi_slave_alloc, + slave_configure: zfcp_scsi_slave_configure, + slave_destroy: zfcp_scsi_slave_destroy, + queuecommand: zfcp_scsi_queuecommand, + eh_abort_handler: zfcp_scsi_eh_abort_handler, + eh_device_reset_handler: zfcp_scsi_eh_device_reset_handler, + eh_bus_reset_handler: zfcp_scsi_eh_bus_reset_handler, + eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler, + /* FIXME(openfcp): Tune */ + can_queue: 4096, + this_id: -1, + /* + * FIXME: + * one less? can zfcp_create_sbale cope with it? + */ + sg_tablesize: ZFCP_MAX_SBALES_PER_REQ, + cmd_per_lun: 1, + unchecked_isa_dma: 0, + use_clustering: 1, + sdev_attrs: zfcp_sysfs_sdev_attrs, }, .driver_version = ZFCP_VERSION, + /* rest initialised with zeros */ }; /* Find start of Response Information in FCP response unit*/ @@ -141,6 +161,14 @@ set_driver_byte(u32 * result, char status) set_byte(result, status, 3); } +/* + * function: zfcp_scsi_slave_alloc + * + * purpose: + * + * returns: + */ + static int zfcp_scsi_slave_alloc(struct scsi_device *sdp) { @@ -167,14 +195,16 @@ zfcp_scsi_slave_alloc(struct scsi_device *sdp) return retval; } -/** - * zfcp_scsi_slave_destroy - called when scsi device is removed +/* + * function: zfcp_scsi_slave_destroy + * + * purpose: * - * Remove reference to associated scsi device for an zfcp_unit. - * Mark zfcp_unit as failed. The scsi device might be deleted via sysfs - * or a scan for this device might have failed. + * returns: */ -static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) + +static void +zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) { struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; @@ -182,7 +212,6 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); sdpnt->hostdata = NULL; unit->device = NULL; - zfcp_erp_unit_failed(unit); zfcp_unit_put(unit); } else { ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at " @@ -302,7 +331,7 @@ zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scpnt, struct timer_list *timer) { int ret; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); scpnt->SCp.ptr = (void *) &wait; /* silent re-use */ scpnt->scsi_done = zfcp_scsi_command_sync_handler; @@ -345,9 +374,18 @@ zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt, return zfcp_scsi_command_async(adapter, unit, scpnt, NULL); } +/* + * function: zfcp_unit_lookup + * + * purpose: + * + * returns: + * + * context: + */ static struct zfcp_unit * -zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, unsigned int id, - unsigned int lun) +zfcp_unit_lookup(struct zfcp_adapter *adapter, int channel, scsi_id_t id, + scsi_lun_t lun) { struct zfcp_port *port; struct zfcp_unit *unit, *retval = NULL; @@ -453,6 +491,13 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) return retval; } +/* + * function: zfcp_scsi_eh_device_reset_handler + * + * purpose: + * + * returns: + */ int zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) { @@ -547,42 +592,46 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags, } /** - * zfcp_scsi_eh_host_reset_handler - handler for host and bus reset - * - * If ERP is already running it will be stopped. + * zfcp_scsi_eh_bus_reset_handler - reset bus (reopen adapter) */ -int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) +int +zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) { - struct zfcp_unit *unit; - struct zfcp_adapter *adapter; - unsigned long flags; - - unit = (struct zfcp_unit*) scpnt->device->hostdata; - adapter = unit->port->adapter; + struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata; + struct zfcp_adapter *adapter = unit->port->adapter; - ZFCP_LOG_NORMAL("host/bus reset because of problems with " + ZFCP_LOG_NORMAL("bus reset because of problems with " "unit 0x%016Lx\n", unit->fcp_lun); + zfcp_erp_adapter_reopen(adapter, 0); + zfcp_erp_wait(adapter); - write_lock_irqsave(&adapter->erp_lock, flags); - if (atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_PENDING, - &adapter->status)) { - zfcp_erp_modify_adapter_status(adapter, - ZFCP_STATUS_COMMON_UNBLOCKED|ZFCP_STATUS_COMMON_OPEN, - ZFCP_CLEAR); - zfcp_erp_action_dismiss_adapter(adapter); - write_unlock_irqrestore(&adapter->erp_lock, flags); - zfcp_fsf_req_dismiss_all(adapter); - adapter->fsf_req_seq_no = 0; - zfcp_erp_adapter_reopen(adapter, 0); - } else { - write_unlock_irqrestore(&adapter->erp_lock, flags); - zfcp_erp_adapter_reopen(adapter, 0); - zfcp_erp_wait(adapter); - } + return SUCCESS; +} + +/** + * zfcp_scsi_eh_host_reset_handler - reset host (reopen adapter) + */ +int +zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) +{ + struct zfcp_unit *unit = (struct zfcp_unit*) scpnt->device->hostdata; + struct zfcp_adapter *adapter = unit->port->adapter; + + ZFCP_LOG_NORMAL("host reset because of problems with " + "unit 0x%016Lx\n", unit->fcp_lun); + zfcp_erp_adapter_reopen(adapter, 0); + zfcp_erp_wait(adapter); return SUCCESS; } +/* + * function: + * + * purpose: + * + * returns: + */ int zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) { @@ -608,6 +657,10 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) adapter->scsi_host->unique_id = unique_id++; /* FIXME */ adapter->scsi_host->max_cmd_len = ZFCP_MAX_SCSI_CMND_LENGTH; adapter->scsi_host->transportt = zfcp_transport_template; + /* + * Reverse mapping of the host number to avoid race condition + */ + adapter->scsi_host_no = adapter->scsi_host->host_no; /* * save a pointer to our own adapter data structure within @@ -625,6 +678,13 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) return retval; } +/* + * function: + * + * purpose: + * + * returns: + */ void zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter) { @@ -643,6 +703,7 @@ zfcp_adapter_scsi_unregister(struct zfcp_adapter *adapter) scsi_remove_host(shost); scsi_host_put(shost); adapter->scsi_host = NULL; + adapter->scsi_host_no = 0; atomic_clear_mask(ZFCP_STATUS_ADAPTER_REGISTERED, &adapter->status); return; @@ -756,9 +817,10 @@ zfcp_get_fc_host_stats(struct Scsi_Host *shost) if (!fc_stats) return NULL; - data = kzalloc(sizeof(*data), GFP_KERNEL); + data = kmalloc(sizeof(*data), GFP_KERNEL); if (!data) return NULL; + memset(data, 0, sizeof(*data)); ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); if (ret) { @@ -786,9 +848,10 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost) int ret; adapter = (struct zfcp_adapter *)shost->hostdata[0]; - data = kzalloc(sizeof(*data), GFP_KERNEL); + data = kmalloc(sizeof(*data), GFP_KERNEL); if (!data) return; + memset(data, 0, sizeof(*data)); ret = zfcp_fsf_exchange_port_data(NULL, adapter, data); if (ret == 0) { @@ -800,18 +863,11 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost) } } -static void zfcp_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout) -{ - rport->dev_loss_tmo = timeout; -} - struct fc_function_template zfcp_transport_functions = { .show_starget_port_id = 1, .show_starget_port_name = 1, .show_starget_node_name = 1, .show_rport_supported_classes = 1, - .show_rport_maxframe_size = 1, - .show_rport_dev_loss_tmo = 1, .show_host_node_name = 1, .show_host_port_name = 1, .show_host_permanent_port_name = 1, @@ -821,7 +877,6 @@ struct fc_function_template zfcp_transport_functions = { .show_host_serial_number = 1, .get_fc_host_stats = zfcp_get_fc_host_stats, .reset_fc_host_stats = zfcp_reset_fc_host_stats, - .set_rport_dev_loss_tmo = zfcp_set_rport_dev_loss_tmo, /* no functions registered for following dynamic attributes but directly set by LLDD */ .show_host_port_type = 1, diff --git a/drivers/s390/scsi/zfcp_sysfs_adapter.c b/drivers/s390/scsi/zfcp_sysfs_adapter.c index 705c6d442..b29ac25e0 100644 --- a/drivers/s390/scsi/zfcp_sysfs_adapter.c +++ b/drivers/s390/scsi/zfcp_sysfs_adapter.c @@ -1,8 +1,16 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_sysfs_adapter.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * sysfs adapter related routines + * + * (C) Copyright IBM Corp. 2003, 2004 + * + * Authors: + * Martin Peschke + * Heiko Carstens + * Andreas Herrmann * * 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 diff --git a/drivers/s390/scsi/zfcp_sysfs_driver.c b/drivers/s390/scsi/zfcp_sysfs_driver.c index 005e62f85..6622d55e0 100644 --- a/drivers/s390/scsi/zfcp_sysfs_driver.c +++ b/drivers/s390/scsi/zfcp_sysfs_driver.c @@ -1,8 +1,16 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_sysfs_driver.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * sysfs driver related routines + * + * (C) Copyright IBM Corp. 2003, 2004 + * + * Authors: + * Martin Peschke + * Heiko Carstens + * Andreas Herrmann * * 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 diff --git a/drivers/s390/scsi/zfcp_sysfs_port.c b/drivers/s390/scsi/zfcp_sysfs_port.c index 1320c0591..f401d42db 100644 --- a/drivers/s390/scsi/zfcp_sysfs_port.c +++ b/drivers/s390/scsi/zfcp_sysfs_port.c @@ -1,8 +1,17 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_sysfs_port.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * sysfs port related routines + * + * (C) Copyright IBM Corp. 2003, 2004 + * + * Authors: + * Martin Peschke + * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * 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 diff --git a/drivers/s390/scsi/zfcp_sysfs_unit.c b/drivers/s390/scsi/zfcp_sysfs_unit.c index 81a484175..ad5dfb889 100644 --- a/drivers/s390/scsi/zfcp_sysfs_unit.c +++ b/drivers/s390/scsi/zfcp_sysfs_unit.c @@ -1,8 +1,17 @@ /* - * This file is part of the zfcp device driver for - * FCP adapters for IBM System z9 and zSeries. + * linux/drivers/s390/scsi/zfcp_sysfs_unit.c * - * (C) Copyright IBM Corp. 2002, 2006 + * FCP adapter driver for IBM eServer zSeries + * + * sysfs unit related routines + * + * (C) Copyright IBM Corp. 2003, 2004 + * + * Authors: + * Martin Peschke + * Heiko Carstens + * Andreas Herrmann + * Volker Sameske * * 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 diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c index d1c1e75bf..66da840c9 100644 --- a/drivers/s390/sysinfo.c +++ b/drivers/s390/sysinfo.c @@ -5,6 +5,7 @@ * Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com) */ +#include #include #include #include diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 4fdb2c932..015db40ad 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c @@ -337,19 +337,19 @@ static int aurora_probe(void) printk("intr pri %d\n", grrr); #endif if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) && - !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { + !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { free_irq(bp->irq|0x30, bp); } else if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) && - !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { + !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { free_irq(bp->irq|0x30, bp); } else if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) && - !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { + !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { free_irq(bp->irq|0x30, bp); } else for(grrr=0;grrrirq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { + if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { free_irq(bp->irq|0x30, bp); break; } else { @@ -909,14 +909,14 @@ static int aurora_setup_board(struct Aurora_board * bp) #ifdef AURORA_ALLIRQ int i; for (i = 0; i < AURORA_ALLIRQ; i++) { - error = request_irq(allirq[i]|0x30, aurora_interrupt, IRQF_SHARED, + error = request_irq(allirq[i]|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp); if (error) printk(KERN_ERR "IRQ%d request error %d\n", allirq[i], error); } #else - error = request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, + error = request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp); if (error) { printk(KERN_ERR "IRQ request error %d\n", error); diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 1cc706e11..d89f83f76 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c @@ -575,9 +575,9 @@ int bbc_envctrl_init(void) int devidx = 0; while ((echild = bbc_i2c_getdev(devidx++)) != NULL) { - if (!strcmp(echild->prom_node->name, "temperature")) + if (!strcmp(echild->prom_name, "temperature")) attach_one_temp(echild, temp_index++); - if (!strcmp(echild->prom_node->name, "fan-control")) + if (!strcmp(echild->prom_name, "fan-control")) attach_one_fan(echild, fan_index++); } if (temp_index != 0 && fan_index != 0) { diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 718623559..3e156e005 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c @@ -377,7 +377,7 @@ static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) bp->waiting = 0; init_waitqueue_head(&bp->wq); if (request_irq(edev->irqs[0], bbc_i2c_interrupt, - IRQF_SHARED, "bbc_i2c", bp)) + SA_SHIRQ, "bbc_i2c", bp)) goto fail; bp->index = index; @@ -423,7 +423,7 @@ static int __init bbc_present(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "bbc")) + if (!strcmp(edev->prom_name, "bbc")) return 1; } } @@ -446,7 +446,7 @@ static int __init bbc_i2c_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "i2c")) { + if (!strcmp(edev->prom_name, "i2c")) { if (!attach_one_i2c(edev, index)) index++; } diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index 385f4f768..ccb20a6f5 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -1030,6 +1031,11 @@ static int __init bpp_init(void) instances[idx].opened = 0; probeLptPort(idx); } + devfs_mk_dir("bpp"); + for (idx = 0; idx < BPP_NO; idx++) { + devfs_mk_cdev(MKDEV(BPP_MAJOR, idx), + S_IFCHR | S_IRUSR | S_IWUSR, "bpp/%d", idx); + } return 0; } @@ -1038,6 +1044,9 @@ static void __exit bpp_cleanup(void) { unsigned idx; + for (idx = 0; idx < BPP_NO; idx++) + devfs_remove("bpp/%d", idx); + devfs_remove("bpp"); unregister_chrdev(BPP_MAJOR, dev_name); for (idx = 0; idx < BPP_NO; idx++) { diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c index 836a58bb0..fd2cc7782 100644 --- a/drivers/sbus/char/cpwatchdog.c +++ b/drivers/sbus/char/cpwatchdog.c @@ -301,11 +301,11 @@ static int wd_open(struct inode *inode, struct file *f) { if (request_irq(wd_dev.irq, &wd_interrupt, - IRQF_SHARED, + SA_SHIRQ, WD_OBPNAME, (void *)wd_dev.regs)) { - printk("%s: Cannot register IRQ %d\n", - WD_OBPNAME, wd_dev.irq); + printk("%s: Cannot register IRQ %s\n", + WD_OBPNAME, __irq_itoa(wd_dev.irq)); return(-EBUSY); } wd_dev.initialized = 1; @@ -755,7 +755,7 @@ static int __init wd_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->ofdev.node->name, WD_OBPNAME)) + if (!strcmp(edev->prom_name, WD_OBPNAME)) goto ebus_done; } } diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index d92bc8827..c3a51d1fa 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c @@ -184,7 +184,7 @@ static int __init d7s_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, D7S_OBPNAME)) + if (!strcmp(edev->prom_name, D7S_OBPNAME)) goto ebus_done; } } diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 063e676a3..19e8eddf8 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -22,6 +22,7 @@ #define __KERNEL_SYSCALLS__ static int errno; +#include #include #include #include @@ -767,14 +768,16 @@ static void envctrl_set_mon(struct i2c_child_t *pchild, * decoding tables, monitor type, optional properties. * Return: None. */ -static void envctrl_init_adc(struct i2c_child_t *pchild, struct device_node *dp) +static void envctrl_init_adc(struct i2c_child_t *pchild, int node) { + char chnls_desc[CHANNEL_DESC_SZ]; int i = 0, len; - char *pos; - unsigned int *pval; + char *pos = chnls_desc; /* Firmware describe channels into a stream separated by a '\0'. */ - pos = of_get_property(dp, "channels-description", &len); + len = prom_getproperty(node, "channels-description", chnls_desc, + CHANNEL_DESC_SZ); + chnls_desc[CHANNEL_DESC_SZ - 1] = '\0'; while (len > 0) { int l = strlen(pos) + 1; @@ -784,13 +787,10 @@ static void envctrl_init_adc(struct i2c_child_t *pchild, struct device_node *dp) } /* Get optional properties. */ - pval = of_get_property(dp, "warning-temp", NULL); - if (pval) - warning_temperature = *pval; - - pval = of_get_property(dp, "shutdown-temp", NULL); - if (pval) - shutdown_temperature = *pval; + len = prom_getproperty(node, "warning-temp", (char *)&warning_temperature, + sizeof(warning_temperature)); + len = prom_getproperty(node, "shutdown-temp", (char *)&shutdown_temperature, + sizeof(shutdown_temperature)); } /* Function Description: Initialize child device monitoring fan status. @@ -864,18 +864,21 @@ static void envctrl_init_voltage_status(struct i2c_child_t *pchild) static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child, struct i2c_child_t *pchild) { - int len, i, tbls_size = 0; - struct device_node *dp = edev_child->prom_node; - void *pval; + int node, len, i, tbls_size = 0; + + node = edev_child->prom_node; /* Get device address. */ - pval = of_get_property(dp, "reg", &len); - memcpy(&pchild->addr, pval, len); + len = prom_getproperty(node, "reg", + (char *) &(pchild->addr), + sizeof(pchild->addr)); /* Get tables property. Read firmware temperature tables. */ - pval = of_get_property(dp, "translation", &len); - if (pval && len > 0) { - memcpy(pchild->tblprop_array, pval, len); + len = prom_getproperty(node, "translation", + (char *) pchild->tblprop_array, + (PCF8584_MAX_CHANNELS * + sizeof(struct pcf8584_tblprop))); + if (len > 0) { pchild->total_tbls = len / sizeof(struct pcf8584_tblprop); for (i = 0; i < pchild->total_tbls; i++) { if ((pchild->tblprop_array[i].size + pchild->tblprop_array[i].offset) > tbls_size) { @@ -888,12 +891,12 @@ static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child, printk("envctrl: Failed to allocate table.\n"); return; } - pval = of_get_property(dp, "tables", &len); - if (!pval || len <= 0) { + len = prom_getproperty(node, "tables", + (char *) pchild->tables, tbls_size); + if (len <= 0) { printk("envctrl: Failed to get table.\n"); return; } - memcpy(pchild->tables, pval, len); } /* SPARCengine ASM Reference Manual (ref. SMI doc 805-7581-04) @@ -904,11 +907,12 @@ static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child, * 'NULL' monitor type. */ if (ENVCTRL_CPCI_IGNORED_NODE == pchild->addr) { - struct device_node *root_node; int len; + char prop[56]; - root_node = of_find_node_by_path("/"); - if (!strcmp(root_node->name, "SUNW,UltraSPARC-IIi-cEngine")) { + len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop)); + if (0 < len && (0 == strncmp(prop, "SUNW,UltraSPARC-IIi-cEngine", len))) + { for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) { pchild->mon_type[len] = ENVCTRL_NOMON; } @@ -917,14 +921,16 @@ static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child, } /* Get the monitor channels. */ - pval = of_get_property(dp, "channels-in-use", &len); - memcpy(pchild->chnl_array, pval, len); + len = prom_getproperty(node, "channels-in-use", + (char *) pchild->chnl_array, + (PCF8584_MAX_CHANNELS * + sizeof(struct pcf8584_channel))); pchild->total_chnls = len / sizeof(struct pcf8584_channel); for (i = 0; i < pchild->total_chnls; i++) { switch (pchild->chnl_array[i].type) { case PCF8584_TEMP_TYPE: - envctrl_init_adc(pchild, dp); + envctrl_init_adc(pchild, node); break; case PCF8584_GLOBALADDR_TYPE: @@ -939,7 +945,7 @@ static void envctrl_init_i2c_child(struct linux_ebus_child *edev_child, case PCF8584_VOLTAGE_TYPE: if (pchild->i2ctype == I2C_ADC) { - envctrl_init_adc(pchild,dp); + envctrl_init_adc(pchild,node); } else { envctrl_init_voltage_status(pchild); } @@ -1040,7 +1046,7 @@ static int __init envctrl_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "bbc")) { + if (!strcmp(edev->prom_name, "bbc")) { /* If we find a boot-bus controller node, * then this envctrl driver is not for us. */ @@ -1054,14 +1060,14 @@ static int __init envctrl_init(void) */ for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "i2c")) { + if (!strcmp(edev->prom_name, "i2c")) { i2c = ioremap(edev->resource[0].start, 0x2); for_each_edevchild(edev, edev_child) { - if (!strcmp("gpio", edev_child->prom_node->name)) { + if (!strcmp("gpio", edev_child->prom_name)) { i2c_childlist[i].i2ctype = I2C_GPIO; envctrl_init_i2c_child(edev_child, &(i2c_childlist[i++])); } - if (!strcmp("adc", edev_child->prom_node->name)) { + if (!strcmp("adc", edev_child->prom_name)) { i2c_childlist[i].i2ctype = I2C_ADC; envctrl_init_i2c_child(edev_child, &(i2c_childlist[i++])); } diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index fa2418f7a..2beb3dded 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -4,6 +4,7 @@ * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) */ +#include #include #include #include @@ -70,6 +71,7 @@ flash_mmap(struct file *file, struct vm_area_struct *vma) if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); + vma->vm_flags |= (VM_SHM | VM_LOCKED); vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) @@ -190,11 +192,9 @@ static int __init flash_init(void) } if (!sdev) { #ifdef CONFIG_PCI - struct linux_prom_registers *ebus_regs; - for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "flashprom")) + if (!strcmp(edev->prom_name, "flashprom")) goto ebus_done; } } @@ -202,23 +202,23 @@ static int __init flash_init(void) if (!edev) return -ENODEV; - ebus_regs = of_get_property(edev->prom_node, "reg", &len); - if (!ebus_regs || (len % sizeof(regs[0])) != 0) { + len = prom_getproperty(edev->prom_node, "reg", (void *)regs, sizeof(regs)); + if ((len % sizeof(regs[0])) != 0) { printk("flash: Strange reg property size %d\n", len); return -ENODEV; } - nregs = len / sizeof(ebus_regs[0]); + nregs = len / sizeof(regs[0]); flash.read_base = edev->resource[0].start; - flash.read_size = ebus_regs[0].reg_size; + flash.read_size = regs[0].reg_size; if (nregs == 1) { flash.write_base = edev->resource[0].start; - flash.write_size = ebus_regs[0].reg_size; + flash.write_size = regs[0].reg_size; } else if (nregs == 2) { flash.write_base = edev->resource[1].start; - flash.write_size = ebus_regs[1].reg_size; + flash.write_size = regs[1].reg_size; } else { printk("flash: Strange number of regs %d\n", nregs); return -ENODEV; diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index 2f698763b..239e108b8 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c @@ -29,6 +29,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define PROMLIB_INTERNAL + +#include #include #include #include @@ -36,10 +39,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -48,20 +51,15 @@ #include #endif -MODULE_AUTHOR("Thomas K. Dyas (tdyas@noc.rutgers.edu) and Eddie C. Dost (ecd@skynet.be)"); -MODULE_DESCRIPTION("OPENPROM Configuration Driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION("1.0"); - /* Private data kept by the driver for each descriptor. */ typedef struct openprom_private_data { - struct device_node *current_node; /* Current node for SunOS ioctls. */ - struct device_node *lastnode; /* Last valid node used by BSD ioctls. */ + int current_node; /* Current node for SunOS ioctls. */ + int lastnode; /* Last valid node used by BSD ioctls. */ } DATA; /* ID of the PROM node containing all of the EEPROM options. */ -static struct device_node *options_node; +static int options_node = 0; /* * Copy an openpromio structure into kernel space from user space. @@ -89,8 +87,9 @@ static int copyin(struct openpromio __user *info, struct openpromio **opp_p) if (bufsize > OPROMMAXPARAM) bufsize = OPROMMAXPARAM; - if (!(*opp_p = kzalloc(sizeof(int) + bufsize + 1, GFP_KERNEL))) + if (!(*opp_p = kmalloc(sizeof(int) + bufsize + 1, GFP_KERNEL))) return -ENOMEM; + memset(*opp_p, 0, sizeof(int) + bufsize + 1); if (copy_from_user(&(*opp_p)->oprom_array, &info->oprom_array, bufsize)) { @@ -108,9 +107,10 @@ static int getstrings(struct openpromio __user *info, struct openpromio **opp_p) if (!info || !opp_p) return -EFAULT; - if (!(*opp_p = kzalloc(sizeof(int) + OPROMMAXPARAM + 1, GFP_KERNEL))) + if (!(*opp_p = kmalloc(sizeof(int) + OPROMMAXPARAM + 1, GFP_KERNEL))) return -ENOMEM; + memset(*opp_p, 0, sizeof(int) + OPROMMAXPARAM + 1); (*opp_p)->oprom_size = 0; n = bufsize = 0; @@ -140,171 +140,16 @@ static int copyout(void __user *info, struct openpromio *opp, int len) return 0; } -static int opromgetprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize) -{ - void *pval; - int len; - - if (!dp || - !(pval = of_get_property(dp, op->oprom_array, &len)) || - len <= 0 || len > bufsize) - return copyout(argp, op, sizeof(int)); - - memcpy(op->oprom_array, pval, len); - op->oprom_array[len] = '\0'; - op->oprom_size = len; - - return copyout(argp, op, sizeof(int) + bufsize); -} - -static int opromnxtprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize) -{ - struct property *prop; - int len; - - if (!dp) - return copyout(argp, op, sizeof(int)); - if (op->oprom_array[0] == '\0') { - prop = dp->properties; - if (!prop) - return copyout(argp, op, sizeof(int)); - len = strlen(prop->name); - } else { - prop = of_find_property(dp, op->oprom_array, NULL); - - if (!prop || - !prop->next || - (len = strlen(prop->next->name)) + 1 > bufsize) - return copyout(argp, op, sizeof(int)); - - prop = prop->next; - } - - memcpy(op->oprom_array, prop->name, len); - op->oprom_array[len] = '\0'; - op->oprom_size = ++len; - - return copyout(argp, op, sizeof(int) + bufsize); -} - -static int opromsetopt(struct device_node *dp, struct openpromio *op, int bufsize) -{ - char *buf = op->oprom_array + strlen(op->oprom_array) + 1; - int len = op->oprom_array + bufsize - buf; - - return of_set_property(options_node, op->oprom_array, buf, len); -} - -static int opromnext(void __user *argp, unsigned int cmd, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) -{ - phandle ph; - - BUILD_BUG_ON(sizeof(phandle) != sizeof(int)); - - if (bufsize < sizeof(phandle)) - return -EINVAL; - - ph = *((int *) op->oprom_array); - if (ph) { - dp = of_find_node_by_phandle(ph); - if (!dp) - return -EINVAL; - - switch (cmd) { - case OPROMNEXT: - dp = dp->sibling; - break; - - case OPROMCHILD: - dp = dp->child; - break; - - case OPROMSETCUR: - default: - break; - }; - } else { - /* Sibling of node zero is the root node. */ - if (cmd != OPROMNEXT) - return -EINVAL; - - dp = of_find_node_by_path("/"); - } - - ph = 0; - if (dp) - ph = dp->node; - - data->current_node = dp; - *((int *) op->oprom_array) = ph; - op->oprom_size = sizeof(phandle); - - return copyout(argp, op, bufsize + sizeof(int)); -} - -static int oprompci2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) -{ - int err = -EINVAL; - - if (bufsize >= 2*sizeof(int)) { -#ifdef CONFIG_PCI - struct pci_dev *pdev; - struct pcidev_cookie *pcp; - pdev = pci_find_slot (((int *) op->oprom_array)[0], - ((int *) op->oprom_array)[1]); - - pcp = pdev->sysdata; - if (pcp != NULL) { - dp = pcp->prom_node; - data->current_node = dp; - *((int *)op->oprom_array) = dp->node; - op->oprom_size = sizeof(int); - err = copyout(argp, op, bufsize + sizeof(int)); - } -#endif - } - - return err; -} - -static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) -{ - phandle ph = 0; - - dp = of_find_node_by_path(op->oprom_array); - if (dp) - ph = dp->node; - data->current_node = dp; - *((int *)op->oprom_array) = ph; - op->oprom_size = sizeof(int); - - return copyout(argp, op, bufsize + sizeof(int)); -} - -static int opromgetbootargs(void __user *argp, struct openpromio *op, int bufsize) -{ - char *buf = saved_command_line; - int len = strlen(buf); - - if (len > bufsize) - return -EINVAL; - - strcpy(op->oprom_array, buf); - op->oprom_size = len; - - return copyout(argp, op, bufsize + sizeof(int)); -} - /* * SunOS and Solaris /dev/openprom ioctl calls. */ static int openprom_sunos_ioctl(struct inode * inode, struct file * file, - unsigned int cmd, unsigned long arg, - struct device_node *dp) + unsigned int cmd, unsigned long arg, int node) { - DATA *data = file->private_data; + DATA *data = (DATA *) file->private_data; + char buffer[OPROMMAXPARAM+1], *buf; struct openpromio *opp; - int bufsize, error = 0; + int bufsize, len, error = 0; static int cnt; void __user *argp = (void __user *)arg; @@ -319,35 +164,119 @@ static int openprom_sunos_ioctl(struct inode * inode, struct file * file, switch (cmd) { case OPROMGETOPT: case OPROMGETPROP: - error = opromgetprop(argp, dp, opp, bufsize); + len = prom_getproplen(node, opp->oprom_array); + + if (len <= 0 || len > bufsize) { + error = copyout(argp, opp, sizeof(int)); + break; + } + + len = prom_getproperty(node, opp->oprom_array, buffer, bufsize); + + memcpy(opp->oprom_array, buffer, len); + opp->oprom_array[len] = '\0'; + opp->oprom_size = len; + + error = copyout(argp, opp, sizeof(int) + bufsize); break; case OPROMNXTOPT: case OPROMNXTPROP: - error = opromnxtprop(argp, dp, opp, bufsize); + buf = prom_nextprop(node, opp->oprom_array, buffer); + + len = strlen(buf); + if (len == 0 || len + 1 > bufsize) { + error = copyout(argp, opp, sizeof(int)); + break; + } + + memcpy(opp->oprom_array, buf, len); + opp->oprom_array[len] = '\0'; + opp->oprom_size = ++len; + + error = copyout(argp, opp, sizeof(int) + bufsize); break; case OPROMSETOPT: case OPROMSETOPT2: - error = opromsetopt(dp, opp, bufsize); + buf = opp->oprom_array + strlen(opp->oprom_array) + 1; + len = opp->oprom_array + bufsize - buf; + + error = prom_setprop(options_node, opp->oprom_array, + buf, len); + + if (error < 0) + error = -EINVAL; break; case OPROMNEXT: case OPROMCHILD: case OPROMSETCUR: - error = opromnext(argp, cmd, dp, opp, bufsize, data); + if (bufsize < sizeof(int)) { + error = -EINVAL; + break; + } + + node = *((int *) opp->oprom_array); + + switch (cmd) { + case OPROMNEXT: node = __prom_getsibling(node); break; + case OPROMCHILD: node = __prom_getchild(node); break; + case OPROMSETCUR: break; + } + + data->current_node = node; + *((int *)opp->oprom_array) = node; + opp->oprom_size = sizeof(int); + + error = copyout(argp, opp, bufsize + sizeof(int)); break; case OPROMPCI2NODE: - error = oprompci2node(argp, dp, opp, bufsize, data); + error = -EINVAL; + + if (bufsize >= 2*sizeof(int)) { +#ifdef CONFIG_PCI + struct pci_dev *pdev; + struct pcidev_cookie *pcp; + pdev = pci_find_slot (((int *) opp->oprom_array)[0], + ((int *) opp->oprom_array)[1]); + + pcp = pdev->sysdata; + if (pcp != NULL && pcp->prom_node != -1 && pcp->prom_node) { + node = pcp->prom_node; + data->current_node = node; + *((int *)opp->oprom_array) = node; + opp->oprom_size = sizeof(int); + error = copyout(argp, opp, bufsize + sizeof(int)); + } +#endif + } break; case OPROMPATH2NODE: - error = oprompath2node(argp, dp, opp, bufsize, data); + node = prom_finddevice(opp->oprom_array); + data->current_node = node; + *((int *)opp->oprom_array) = node; + opp->oprom_size = sizeof(int); + + error = copyout(argp, opp, bufsize + sizeof(int)); break; case OPROMGETBOOTARGS: - error = opromgetbootargs(argp, opp, bufsize); + buf = saved_command_line; + + len = strlen(buf); + + if (len > bufsize) { + error = -EINVAL; + break; + } + + strcpy(opp->oprom_array, buf); + opp->oprom_size = len; + + error = copyout(argp, opp, bufsize + sizeof(int)); break; case OPROMU2P: @@ -368,14 +297,25 @@ static int openprom_sunos_ioctl(struct inode * inode, struct file * file, return error; } -static struct device_node *get_node(phandle n, DATA *data) -{ - struct device_node *dp = of_find_node_by_phandle(n); - if (dp) - data->lastnode = dp; +/* Return nonzero if a specific node is in the PROM device tree. */ +static int intree(int root, int node) +{ + for (; root != 0; root = prom_getsibling(root)) + if (root == node || intree(prom_getchild(root),node)) + return 1; + return 0; +} - return dp; +/* Return nonzero if a specific node is "valid". */ +static int goodnode(int n, DATA *data) +{ + if (n == data->lastnode || n == prom_root_node || n == options_node) + return 1; + if (n == 0 || n == -1 || !intree(prom_root_node,n)) + return 0; + data->lastnode = n; + return 1; } /* Copy in a whole string from userspace into kernelspace. */ @@ -390,7 +330,7 @@ static int copyin_string(char __user *user, size_t len, char **ptr) if (!tmp) return -ENOMEM; - if (copy_from_user(tmp, user, len)) { + if(copy_from_user(tmp, user, len)) { kfree(tmp); return -EFAULT; } @@ -405,187 +345,162 @@ static int copyin_string(char __user *user, size_t len, char **ptr) /* * NetBSD /dev/openprom ioctl calls. */ -static int opiocget(void __user *argp, DATA *data) +static int openprom_bsd_ioctl(struct inode * inode, struct file * file, + unsigned int cmd, unsigned long arg) { + DATA *data = (DATA *) file->private_data; + void __user *argp = (void __user *)arg; struct opiocdesc op; - struct device_node *dp; - char *str; - void *pval; - int err, len; - - if (copy_from_user(&op, argp, sizeof(op))) - return -EFAULT; + int error, node, len; + char *str, *tmp; + char buffer[64]; + static int cnt; - dp = get_node(op.op_nodeid, data); + switch (cmd) { + case OPIOCGET: + if (copy_from_user(&op, argp, sizeof(op))) + return -EFAULT; - err = copyin_string(op.op_name, op.op_namelen, &str); - if (err) - return err; + if (!goodnode(op.op_nodeid,data)) + return -EINVAL; - pval = of_get_property(dp, str, &len); - err = 0; - if (!pval || len > op.op_buflen) { - err = -EINVAL; - } else { - op.op_buflen = len; - if (copy_to_user(argp, &op, sizeof(op)) || - copy_to_user(op.op_buf, pval, len)) - err = -EFAULT; - } - kfree(str); + error = copyin_string(op.op_name, op.op_namelen, &str); + if (error) + return error; - return err; -} + len = prom_getproplen(op.op_nodeid,str); -static int opiocnextprop(void __user *argp, DATA *data) -{ - struct opiocdesc op; - struct device_node *dp; - struct property *prop; - char *str; - int err, len; + if (len > op.op_buflen) { + kfree(str); + return -ENOMEM; + } - if (copy_from_user(&op, argp, sizeof(op))) - return -EFAULT; + op.op_buflen = len; - dp = get_node(op.op_nodeid, data); - if (!dp) - return -EINVAL; + if (len <= 0) { + kfree(str); + /* Verified by the above copy_from_user */ + if (__copy_to_user(argp, &op, + sizeof(op))) + return -EFAULT; + return 0; + } - err = copyin_string(op.op_name, op.op_namelen, &str); - if (err) - return err; + tmp = kmalloc(len + 1, GFP_KERNEL); + if (!tmp) { + kfree(str); + return -ENOMEM; + } - if (str[0] == '\0') { - prop = dp->properties; - } else { - prop = of_find_property(dp, str, NULL); - if (prop) - prop = prop->next; - } - kfree(str); + cnt = prom_getproperty(op.op_nodeid, str, tmp, len); + if (cnt <= 0) { + error = -EINVAL; + } else { + tmp[len] = '\0'; - if (!prop) - len = 0; - else - len = prop->length; + if (__copy_to_user(argp, &op, sizeof(op)) != 0 || + copy_to_user(op.op_buf, tmp, len) != 0) + error = -EFAULT; + } - if (len > op.op_buflen) - len = op.op_buflen; + kfree(tmp); + kfree(str); - if (copy_to_user(argp, &op, sizeof(op))) - return -EFAULT; + return error; - if (len && - copy_to_user(op.op_buf, prop->value, len)) - return -EFAULT; + case OPIOCNEXTPROP: + if (copy_from_user(&op, argp, sizeof(op))) + return -EFAULT; - return 0; -} + if (!goodnode(op.op_nodeid,data)) + return -EINVAL; -static int opiocset(void __user *argp, DATA *data) -{ - struct opiocdesc op; - struct device_node *dp; - char *str, *tmp; - int err; + error = copyin_string(op.op_name, op.op_namelen, &str); + if (error) + return error; - if (copy_from_user(&op, argp, sizeof(op))) - return -EFAULT; + tmp = prom_nextprop(op.op_nodeid,str,buffer); - dp = get_node(op.op_nodeid, data); - if (!dp) - return -EINVAL; + if (tmp) { + len = strlen(tmp); + if (len > op.op_buflen) + len = op.op_buflen; + else + op.op_buflen = len; + } else { + len = op.op_buflen = 0; + } - err = copyin_string(op.op_name, op.op_namelen, &str); - if (err) - return err; + if (!access_ok(VERIFY_WRITE, argp, sizeof(op))) { + kfree(str); + return -EFAULT; + } - err = copyin_string(op.op_buf, op.op_buflen, &tmp); - if (err) { - kfree(str); - return err; - } + if (!access_ok(VERIFY_WRITE, op.op_buf, len)) { + kfree(str); + return -EFAULT; + } - err = of_set_property(dp, str, tmp, op.op_buflen); + error = __copy_to_user(argp, &op, sizeof(op)); + if (!error) error = __copy_to_user(op.op_buf, tmp, len); - kfree(str); - kfree(tmp); + kfree(str); - return err; -} + return error; -static int opiocgetnext(unsigned int cmd, void __user *argp) -{ - struct device_node *dp; - phandle nd; + case OPIOCSET: + if (copy_from_user(&op, argp, sizeof(op))) + return -EFAULT; - BUILD_BUG_ON(sizeof(phandle) != sizeof(int)); + if (!goodnode(op.op_nodeid,data)) + return -EINVAL; - if (copy_from_user(&nd, argp, sizeof(phandle))) - return -EFAULT; + error = copyin_string(op.op_name, op.op_namelen, &str); + if (error) + return error; - if (nd == 0) { - if (cmd != OPIOCGETNEXT) - return -EINVAL; - dp = of_find_node_by_path("/"); - } else { - dp = of_find_node_by_phandle(nd); - nd = 0; - if (dp) { - if (cmd == OPIOCGETNEXT) - dp = dp->sibling; - else - dp = dp->child; + error = copyin_string(op.op_buf, op.op_buflen, &tmp); + if (error) { + kfree(str); + return error; } - } - if (dp) - nd = dp->node; - if (copy_to_user(argp, &nd, sizeof(phandle))) - return -EFAULT; - return 0; -} + len = prom_setprop(op.op_nodeid,str,tmp,op.op_buflen+1); -static int openprom_bsd_ioctl(struct inode * inode, struct file * file, - unsigned int cmd, unsigned long arg) -{ - DATA *data = (DATA *) file->private_data; - void __user *argp = (void __user *)arg; - int err; - - switch (cmd) { - case OPIOCGET: - err = opiocget(argp, data); - break; + if (len != op.op_buflen) + return -EINVAL; - case OPIOCNEXTPROP: - err = opiocnextprop(argp, data); - break; + kfree(str); + kfree(tmp); - case OPIOCSET: - err = opiocset(argp, data); - break; + return 0; case OPIOCGETOPTNODE: - BUILD_BUG_ON(sizeof(phandle) != sizeof(int)); - - if (copy_to_user(argp, &options_node->node, sizeof(phandle))) + if (copy_to_user(argp, &options_node, sizeof(int))) return -EFAULT; - return 0; case OPIOCGETNEXT: case OPIOCGETCHILD: - err = opiocgetnext(cmd, argp); - break; + if (copy_from_user(&node, argp, sizeof(int))) + return -EFAULT; + + if (cmd == OPIOCGETNEXT) + node = __prom_getsibling(node); + else + node = __prom_getchild(node); + + if (__copy_to_user(argp, &node, sizeof(int))) + return -EFAULT; + + return 0; default: + if (cnt++ < 10) + printk(KERN_INFO "openprom_bsd_ioctl: cmd 0x%X\n", cmd); return -EINVAL; - }; - - return err; + } } @@ -596,6 +511,7 @@ static int openprom_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg) { DATA *data = (DATA *) file->private_data; + static int cnt; switch (cmd) { case OPROMGETOPT: @@ -647,8 +563,10 @@ static int openprom_ioctl(struct inode * inode, struct file * file, return openprom_bsd_ioctl(inode,file,cmd,arg); default: + if (cnt++ < 10) + printk("openprom_ioctl: cmd 0x%X, arg 0x%lX\n", cmd, arg); return -EINVAL; - }; + } } static long openprom_compat_ioctl(struct file *file, unsigned int cmd, @@ -676,7 +594,9 @@ static long openprom_compat_ioctl(struct file *file, unsigned int cmd, case OPROMSETCUR: case OPROMPCI2NODE: case OPROMPATH2NODE: + lock_kernel(); rval = openprom_ioctl(file->f_dentry->d_inode, file, cmd, arg); + lock_kernel(); break; } @@ -687,13 +607,13 @@ static int openprom_open(struct inode * inode, struct file * file) { DATA *data; - data = kmalloc(sizeof(DATA), GFP_KERNEL); + data = (DATA *) kmalloc(sizeof(DATA), GFP_KERNEL); if (!data) return -ENOMEM; - data->current_node = of_find_node_by_path("/"); - data->lastnode = data->current_node; - file->private_data = (void *) data; + data->current_node = prom_root_node; + data->lastnode = prom_root_node; + file->private_data = (void *)data; return 0; } @@ -714,30 +634,24 @@ static struct file_operations openprom_fops = { }; static struct miscdevice openprom_dev = { - .minor = SUN_OPENPROM_MINOR, - .name = "openprom", - .fops = &openprom_fops, + SUN_OPENPROM_MINOR, "openprom", &openprom_fops }; static int __init openprom_init(void) { - struct device_node *dp; - int err; - - err = misc_register(&openprom_dev); - if (err) - return err; + int error; - dp = of_find_node_by_path("/"); - dp = dp->child; - while (dp) { - if (!strcmp(dp->name, "options")) - break; - dp = dp->sibling; + error = misc_register(&openprom_dev); + if (error) { + printk(KERN_ERR "openprom: unable to get misc minor\n"); + return error; } - options_node = dp; - if (!options_node) { + options_node = prom_getchild(prom_root_node); + options_node = prom_searchsiblings(options_node,"options"); + + if (options_node == 0 || options_node == -1) { + printk(KERN_ERR "openprom: unable to find options node\n"); misc_deregister(&openprom_dev); return -EIO; } @@ -752,3 +666,4 @@ static void __exit openprom_cleanup(void) module_init(openprom_init); module_exit(openprom_cleanup); +MODULE_LICENSE("GPL"); diff --git a/drivers/sbus/char/riowatchdog.c b/drivers/sbus/char/riowatchdog.c index 2a9cc8204..d1babff6a 100644 --- a/drivers/sbus/char/riowatchdog.c +++ b/drivers/sbus/char/riowatchdog.c @@ -211,7 +211,7 @@ static int __init riowd_bbc_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->ofdev.node->name, "bbc")) + if (!strcmp(edev->prom_name, "bbc")) goto found_bbc; } } @@ -238,7 +238,7 @@ static int __init riowd_init(void) for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->ofdev.node->name, RIOWD_NAME)) + if (!strcmp(edev->prom_name, RIOWD_NAME)) goto ebus_done; } } diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 575b1f7ed..e2d9a7c85 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c @@ -400,7 +400,7 @@ static int __init ts102_uctrl_init(void) } driver->regs->uctrl_intr = UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK; - printk("uctrl: 0x%x (irq %d)\n", driver->regs, driver->irq); + printk("uctrl: 0x%x (irq %s)\n", driver->regs, __irq_itoa(driver->irq)); uctrl_get_event_status(); uctrl_get_external_status(); return 0; diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h index 63941a259..8045cd5e7 100644 --- a/drivers/sbus/char/vfc.h +++ b/drivers/sbus/char/vfc.h @@ -1,6 +1,8 @@ #ifndef _LINUX_VFC_H_ #define _LINUX_VFC_H_ +#include + /* * The control register for the vfc is at offset 0x4000 * The first field ram bank is located at offset 0x5000 diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 55b2b31bd..dfdd6be55 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -164,6 +164,10 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance) return -EINVAL; if (init_vfc_hw(dev)) return -EIO; + + devfs_mk_cdev(MKDEV(VFC_MAJOR, instance), + S_IFCHR | S_IRUSR | S_IWUSR, + "vfc/%d", instance); return 0; } @@ -619,7 +623,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) map_size = sizeof(struct vfc_regs); vma->vm_flags |= - (VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE); + (VM_SHM | VM_LOCKED | VM_IO | VM_MAYREAD | VM_MAYWRITE | VM_MAYSHARE); map_offset = (unsigned int) (long)dev->phys_regs; ret = io_remap_pfn_range(vma, vma->vm_start, MK_IOSPACE_PFN(dev->which_io, @@ -673,6 +677,7 @@ static int vfc_probe(void) kfree(vfc_dev_lst); return -EIO; } + devfs_mk_dir("vfc"); instance = 0; for_all_sbusdev(sdev, sbus) { if (strcmp(sdev->prom_name, "vfc") == 0) { @@ -712,6 +717,7 @@ static void deinit_vfc_device(struct vfc_dev *dev) { if(dev == NULL) return; + devfs_remove("vfc/%d", dev->instance); sbus_iounmap(dev->regs, sizeof(struct vfc_regs)); kfree(dev); } @@ -725,6 +731,7 @@ void cleanup_module(void) for (devp = vfc_dev_lst; *devp; devp++) deinit_vfc_device(*devp); + devfs_remove("vfc"); kfree(vfc_dev_lst); return; } diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c index 57e152674..378a1d680 100644 --- a/drivers/sbus/dvma.c +++ b/drivers/sbus/dvma.c @@ -3,6 +3,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c index 935952ef8..5d30a3ebf 100644 --- a/drivers/sbus/sbus.c +++ b/drivers/sbus/sbus.c @@ -1,10 +1,12 @@ -/* sbus.c: SBus support routines. +/* $Id: sbus.c,v 1.100 2002/01/24 15:36:24 davem Exp $ + * sbus.c: SBus support routines. * - * Copyright (C) 1995, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ #include #include +#include #include #include @@ -12,76 +14,237 @@ #include #include #include -#include -#include #include #include -struct sbus_bus *sbus_root; +struct sbus_bus *sbus_root = NULL; -static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sdev) -{ - unsigned long base; - void *pval; - int len; +static struct linux_prom_irqs irqs[PROMINTR_MAX] __initdata = { { 0 } }; +#ifdef CONFIG_SPARC32 +static int interrupts[PROMINTR_MAX] __initdata = { 0 }; +#endif - sdev->prom_node = dp->node; - strcpy(sdev->prom_name, dp->name); +#ifdef CONFIG_PCI +extern int pcic_present(void); +#endif - pval = of_get_property(dp, "reg", &len); - sdev->num_registers = 0; - if (pval) { - memcpy(sdev->reg_addrs, pval, len); +/* Perhaps when I figure out more about the iommu we'll put a + * device registration routine here that probe_sbus() calls to + * setup the iommu for each Sbus. + */ + +/* We call this for each SBus device, and fill the structure based + * upon the prom device tree. We return the start of memory after + * the things we have allocated. + */ - sdev->num_registers = - len / sizeof(struct linux_prom_registers); +/* #define DEBUG_FILL */ - base = (unsigned long) sdev->reg_addrs[0].phys_addr; +static void __init fill_sbus_device(int prom_node, struct sbus_dev *sdev) +{ + unsigned long address, base; + int len; - /* Compute the slot number. */ - if (base >= SUN_SBUS_BVADDR && sparc_cpu_model == sun4m) - sdev->slot = sbus_dev_slot(base); - else - sdev->slot = sdev->reg_addrs[0].which_io; + sdev->prom_node = prom_node; + prom_getstring(prom_node, "name", + sdev->prom_name, sizeof(sdev->prom_name)); + address = prom_getint(prom_node, "address"); + len = prom_getproperty(prom_node, "reg", + (char *) sdev->reg_addrs, + sizeof(sdev->reg_addrs)); + if (len == -1) { + sdev->num_registers = 0; + goto no_regs; } - pval = of_get_property(dp, "ranges", &len); - sdev->num_device_ranges = 0; - if (pval) { - memcpy(sdev->device_ranges, pval, len); - sdev->num_device_ranges = - len / sizeof(struct linux_prom_ranges); + if (len % sizeof(struct linux_prom_registers)) { + prom_printf("fill_sbus_device: proplen for regs of %s " + " was %d, need multiple of %d\n", + sdev->prom_name, len, + (int) sizeof(struct linux_prom_registers)); + prom_halt(); + } + if (len > (sizeof(struct linux_prom_registers) * PROMREG_MAX)) { + prom_printf("fill_sbus_device: Too many register properties " + "for device %s, len=%d\n", + sdev->prom_name, len); + prom_halt(); } + sdev->num_registers = len / sizeof(struct linux_prom_registers); + sdev->ranges_applied = 0; - sbus_fill_device_irq(sdev); + base = (unsigned long) sdev->reg_addrs[0].phys_addr; - sdev->ofdev.node = dp; - if (sdev->parent) - sdev->ofdev.dev.parent = &sdev->parent->ofdev.dev; - else - sdev->ofdev.dev.parent = &sdev->bus->ofdev.dev; - sdev->ofdev.dev.bus = &sbus_bus_type; - strcpy(sdev->ofdev.dev.bus_id, dp->path_component_name); + /* Compute the slot number. */ + if (base >= SUN_SBUS_BVADDR && sparc_cpu_model == sun4m) { + sdev->slot = sbus_dev_slot(base); + } else { + sdev->slot = sdev->reg_addrs[0].which_io; + } - if (of_device_register(&sdev->ofdev) != 0) - printk(KERN_DEBUG "sbus: device registration error for %s!\n", - sdev->ofdev.dev.bus_id); +no_regs: + len = prom_getproperty(prom_node, "ranges", + (char *)sdev->device_ranges, + sizeof(sdev->device_ranges)); + if (len == -1) { + sdev->num_device_ranges = 0; + goto no_ranges; + } + if (len % sizeof(struct linux_prom_ranges)) { + prom_printf("fill_sbus_device: proplen for ranges of %s " + " was %d, need multiple of %d\n", + sdev->prom_name, len, + (int) sizeof(struct linux_prom_ranges)); + prom_halt(); + } + if (len > (sizeof(struct linux_prom_ranges) * PROMREG_MAX)) { + prom_printf("fill_sbus_device: Too many range properties " + "for device %s, len=%d\n", + sdev->prom_name, len); + prom_halt(); + } + sdev->num_device_ranges = + len / sizeof(struct linux_prom_ranges); + +no_ranges: + /* XXX Unfortunately, IRQ issues are very arch specific. + * XXX Pull this crud out into an arch specific area + * XXX at some point. -DaveM + */ +#ifdef CONFIG_SPARC64 + len = prom_getproperty(prom_node, "interrupts", + (char *) irqs, sizeof(irqs)); + if (len == -1 || len == 0) { + sdev->irqs[0] = 0; + sdev->num_irqs = 0; + } else { + unsigned int pri = irqs[0].pri; + + sdev->num_irqs = 1; + if (pri < 0x20) + pri += sdev->slot * 8; + + sdev->irqs[0] = sbus_build_irq(sdev->bus, pri); + } +#endif /* CONFIG_SPARC64 */ + +#ifdef CONFIG_SPARC32 + len = prom_getproperty(prom_node, "intr", + (char *)irqs, sizeof(irqs)); + if (len != -1) { + sdev->num_irqs = len / 8; + if (sdev->num_irqs == 0) { + sdev->irqs[0] = 0; + } else if (sparc_cpu_model == sun4d) { + extern unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq); + + for (len = 0; len < sdev->num_irqs; len++) + sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri); + } else { + for (len = 0; len < sdev->num_irqs; len++) + sdev->irqs[len] = irqs[len].pri; + } + } else { + /* No "intr" node found-- check for "interrupts" node. + * This node contains SBus interrupt levels, not IPLs + * as in "intr", and no vector values. We convert + * SBus interrupt levels to PILs (platform specific). + */ + len = prom_getproperty(prom_node, "interrupts", + (char *)interrupts, sizeof(interrupts)); + if (len == -1) { + sdev->irqs[0] = 0; + sdev->num_irqs = 0; + } else { + sdev->num_irqs = len / sizeof(int); + for (len = 0; len < sdev->num_irqs; len++) { + sdev->irqs[len] = sbint_to_irq(sdev, interrupts[len]); + } + } + } +#endif /* CONFIG_SPARC32 */ } -static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus) +/* This routine gets called from whoever needs the sbus first, to scan + * the SBus device tree. Currently it just prints out the devices + * found on the bus and builds trees of SBUS structs and attached + * devices. + */ + +extern void iommu_init(int iommu_node, struct sbus_bus *sbus); +extern void iounit_init(int sbi_node, int iounit_node, struct sbus_bus *sbus); +void sun4_init(void); +#ifdef CONFIG_SUN_AUXIO +extern void auxio_probe(void); +#endif + +static void __init sbus_do_child_siblings(int start_node, + struct sbus_dev *child, + struct sbus_dev *parent, + struct sbus_bus *sbus) { - void *pval; - int len; + struct sbus_dev *this_dev = child; + int this_node = start_node; + + /* Child already filled in, just need to traverse siblings. */ + child->child = NULL; + child->parent = parent; + while((this_node = prom_getsibling(this_node)) != 0) { + this_dev->next = kmalloc(sizeof(struct sbus_dev), GFP_ATOMIC); + this_dev = this_dev->next; + this_dev->next = NULL; + this_dev->parent = parent; + + this_dev->bus = sbus; + fill_sbus_device(this_node, this_dev); + + if(prom_getchild(this_node)) { + this_dev->child = kmalloc(sizeof(struct sbus_dev), + GFP_ATOMIC); + this_dev->child->bus = sbus; + this_dev->child->next = NULL; + fill_sbus_device(prom_getchild(this_node), this_dev->child); + sbus_do_child_siblings(prom_getchild(this_node), + this_dev->child, this_dev, sbus); + } else { + this_dev->child = NULL; + } + } +} - pval = of_get_property(dp, "ranges", &len); - sbus->num_sbus_ranges = 0; - if (pval) { - memcpy(sbus->sbus_ranges, pval, len); - sbus->num_sbus_ranges = - len / sizeof(struct linux_prom_ranges); +/* + * XXX This functions appears to be a distorted version of + * prom_sbus_ranges_init(), with all sun4d stuff cut away. + * Ask DaveM what is going on here, how is sun4d supposed to work... XXX + */ +/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */ + +static void __init sbus_bus_ranges_init(int parent_node, struct sbus_bus *sbus) +{ + int len; - sbus_arch_bus_ranges_init(dp->parent, sbus); + len = prom_getproperty(sbus->prom_node, "ranges", + (char *) sbus->sbus_ranges, + sizeof(sbus->sbus_ranges)); + if (len == -1 || len == 0) { + sbus->num_sbus_ranges = 0; + return; } + sbus->num_sbus_ranges = len / sizeof(struct linux_prom_ranges); +#ifdef CONFIG_SPARC32 + if (sparc_cpu_model == sun4d) { + struct linux_prom_ranges iounit_ranges[PROMREG_MAX]; + int num_iounit_ranges; + + len = prom_getproperty(parent_node, "ranges", + (char *) iounit_ranges, + sizeof (iounit_ranges)); + if (len != -1) { + num_iounit_ranges = (len/sizeof(struct linux_prom_ranges)); + prom_adjust_ranges (sbus->sbus_ranges, sbus->num_sbus_ranges, iounit_ranges, num_iounit_ranges); + } + } +#endif } static void __init __apply_ranges_to_regs(struct linux_prom_ranges *ranges, @@ -159,127 +322,241 @@ static void __init sbus_fixup_all_regs(struct sbus_dev *first_sdev) } } -/* We preserve the "probe order" of these bus and device lists to give - * the same ordering as the old code. - */ -static void __init sbus_insert(struct sbus_bus *sbus, struct sbus_bus **root) -{ - while (*root) - root = &(*root)->next; - *root = sbus; - sbus->next = NULL; -} +extern void register_proc_sparc_ioport(void); +extern void firetruck_init(void); -static void __init sdev_insert(struct sbus_dev *sdev, struct sbus_dev **root) -{ - while (*root) - root = &(*root)->next; - *root = sdev; - sdev->next = NULL; -} +#ifdef CONFIG_SUN4 +extern void sun4_dvma_init(void); +#endif -static void __init walk_children(struct device_node *dp, struct sbus_dev *parent, struct sbus_bus *sbus) +static int __init sbus_init(void) { - dp = dp->child; - while (dp) { - struct sbus_dev *sdev; - - sdev = kzalloc(sizeof(struct sbus_dev), GFP_ATOMIC); - if (sdev) { - sdev_insert(sdev, &parent->child); - - sdev->bus = sbus; - sdev->parent = parent; + int nd, this_sbus, sbus_devs, topnd, iommund; + unsigned int sbus_clock; + struct sbus_bus *sbus; + struct sbus_dev *this_dev; + int num_sbus = 0; /* How many did we find? */ - fill_sbus_device(dp, sdev); +#ifdef CONFIG_SPARC32 + register_proc_sparc_ioport(); +#endif - walk_children(dp, sdev, sbus); +#ifdef CONFIG_SUN4 + sun4_dvma_init(); + return 0; +#endif + + topnd = prom_getchild(prom_root_node); + + /* Finding the first sbus is a special case... */ + iommund = 0; + if(sparc_cpu_model == sun4u) { + nd = prom_searchsiblings(topnd, "sbus"); + if(nd == 0) { +#ifdef CONFIG_PCI + if (!pcic_present()) { + prom_printf("Neither SBUS nor PCI found.\n"); + prom_halt(); + } else { +#ifdef CONFIG_SPARC64 + firetruck_init(); +#endif + } + return 0; +#else + prom_printf("YEEE, UltraSparc sbus not found\n"); + prom_halt(); +#endif + } + } else if(sparc_cpu_model == sun4d) { + if((iommund = prom_searchsiblings(topnd, "io-unit")) == 0 || + (nd = prom_getchild(iommund)) == 0 || + (nd = prom_searchsiblings(nd, "sbi")) == 0) { + panic("sbi not found"); + } + } else if((nd = prom_searchsiblings(topnd, "sbus")) == 0) { + if((iommund = prom_searchsiblings(topnd, "iommu")) == 0 || + (nd = prom_getchild(iommund)) == 0 || + (nd = prom_searchsiblings(nd, "sbus")) == 0) { +#ifdef CONFIG_PCI + if (!pcic_present()) { + prom_printf("Neither SBUS nor PCI found.\n"); + prom_halt(); + } + return 0; +#else + /* No reason to run further - the data access trap will occur. */ + panic("sbus not found"); +#endif } - dp = dp->sibling; } -} - -static void __init build_one_sbus(struct device_node *dp, int num_sbus) -{ - struct sbus_bus *sbus; - unsigned int sbus_clock; - struct device_node *dev_dp; - - sbus = kzalloc(sizeof(struct sbus_bus), GFP_ATOMIC); - if (!sbus) - return; - - sbus_insert(sbus, &sbus_root); - sbus->prom_node = dp->node; - - sbus_setup_iommu(sbus, dp); - - printk("sbus%d: ", num_sbus); - - sbus_clock = of_getintprop_default(dp, "clock-frequency", - (25*1000*1000)); - sbus->clock_freq = sbus_clock; - - printk("Clock %d.%d MHz\n", (int) ((sbus_clock/1000)/1000), - (int) (((sbus_clock/1000)%1000 != 0) ? - (((sbus_clock/1000)%1000) + 1000) : 0)); - - strcpy(sbus->prom_name, dp->name); - - sbus_setup_arch_props(sbus, dp); - - sbus_bus_ranges_init(dp, sbus); - sbus->ofdev.node = dp; - sbus->ofdev.dev.parent = NULL; - sbus->ofdev.dev.bus = &sbus_bus_type; - sprintf(sbus->ofdev.dev.bus_id, "sbus%d", num_sbus); - - if (of_device_register(&sbus->ofdev) != 0) - printk(KERN_DEBUG "sbus: device registration error for %s!\n", - sbus->ofdev.dev.bus_id); - - dev_dp = dp->child; - while (dev_dp) { - struct sbus_dev *sdev; + /* Ok, we've found the first one, allocate first SBus struct + * and place in chain. + */ + sbus = sbus_root = kmalloc(sizeof(struct sbus_bus), GFP_ATOMIC); + sbus->next = NULL; + sbus->prom_node = nd; + this_sbus = nd; - sdev = kzalloc(sizeof(struct sbus_dev), GFP_ATOMIC); - if (sdev) { - sdev_insert(sdev, &sbus->devices); + if(iommund && sparc_cpu_model != sun4u && sparc_cpu_model != sun4d) + iommu_init(iommund, sbus); - sdev->bus = sbus; - sdev->parent = NULL; - fill_sbus_device(dev_dp, sdev); + /* Loop until we find no more SBUS's */ + while(this_sbus) { +#ifdef CONFIG_SPARC64 + /* IOMMU hides inside SBUS/SYSIO prom node on Ultra. */ + if(sparc_cpu_model == sun4u) { + extern void sbus_iommu_init(int prom_node, struct sbus_bus *sbus); - walk_children(dev_dp, sdev, sbus); + sbus_iommu_init(this_sbus, sbus); + } +#endif /* CONFIG_SPARC64 */ + +#ifdef CONFIG_SPARC32 + if (sparc_cpu_model == sun4d) + iounit_init(this_sbus, iommund, sbus); +#endif /* CONFIG_SPARC32 */ + printk("sbus%d: ", num_sbus); + sbus_clock = prom_getint(this_sbus, "clock-frequency"); + if(sbus_clock == -1) + sbus_clock = (25*1000*1000); + printk("Clock %d.%d MHz\n", (int) ((sbus_clock/1000)/1000), + (int) (((sbus_clock/1000)%1000 != 0) ? + (((sbus_clock/1000)%1000) + 1000) : 0)); + + prom_getstring(this_sbus, "name", + sbus->prom_name, sizeof(sbus->prom_name)); + sbus->clock_freq = sbus_clock; +#ifdef CONFIG_SPARC32 + if (sparc_cpu_model == sun4d) { + sbus->devid = prom_getint(iommund, "device-id"); + sbus->board = prom_getint(iommund, "board#"); + } +#endif + + sbus_bus_ranges_init(iommund, sbus); + + sbus_devs = prom_getchild(this_sbus); + if (!sbus_devs) { + sbus->devices = NULL; + goto next_bus; } - dev_dp = dev_dp->sibling; - } - - sbus_fixup_all_regs(sbus->devices); - - dvma_init(sbus); -} -static int __init sbus_init(void) -{ - struct device_node *dp; - const char *sbus_name = "sbus"; - int num_sbus = 0; + sbus->devices = kmalloc(sizeof(struct sbus_dev), GFP_ATOMIC); + + this_dev = sbus->devices; + this_dev->next = NULL; + + this_dev->bus = sbus; + this_dev->parent = NULL; + fill_sbus_device(sbus_devs, this_dev); + + /* Should we traverse for children? */ + if(prom_getchild(sbus_devs)) { + /* Allocate device node */ + this_dev->child = kmalloc(sizeof(struct sbus_dev), + GFP_ATOMIC); + /* Fill it */ + this_dev->child->bus = sbus; + this_dev->child->next = NULL; + fill_sbus_device(prom_getchild(sbus_devs), + this_dev->child); + sbus_do_child_siblings(prom_getchild(sbus_devs), + this_dev->child, + this_dev, + sbus); + } else { + this_dev->child = NULL; + } - if (sbus_arch_preinit()) - return 0; + while((sbus_devs = prom_getsibling(sbus_devs)) != 0) { + /* Allocate device node */ + this_dev->next = kmalloc(sizeof(struct sbus_dev), + GFP_ATOMIC); + this_dev = this_dev->next; + this_dev->next = NULL; + + /* Fill it */ + this_dev->bus = sbus; + this_dev->parent = NULL; + fill_sbus_device(sbus_devs, this_dev); + + /* Is there a child node hanging off of us? */ + if(prom_getchild(sbus_devs)) { + /* Get new device struct */ + this_dev->child = kmalloc(sizeof(struct sbus_dev), + GFP_ATOMIC); + /* Fill it */ + this_dev->child->bus = sbus; + this_dev->child->next = NULL; + fill_sbus_device(prom_getchild(sbus_devs), + this_dev->child); + sbus_do_child_siblings(prom_getchild(sbus_devs), + this_dev->child, + this_dev, + sbus); + } else { + this_dev->child = NULL; + } + } - if (sparc_cpu_model == sun4d) - sbus_name = "sbi"; + /* Walk all devices and apply parent ranges. */ + sbus_fixup_all_regs(sbus->devices); - for_each_node_by_name(dp, sbus_name) { - build_one_sbus(dp, num_sbus); + dvma_init(sbus); + next_bus: num_sbus++; + if(sparc_cpu_model == sun4u) { + this_sbus = prom_getsibling(this_sbus); + if(!this_sbus) + break; + this_sbus = prom_searchsiblings(this_sbus, "sbus"); + } else if(sparc_cpu_model == sun4d) { + iommund = prom_getsibling(iommund); + if(!iommund) + break; + iommund = prom_searchsiblings(iommund, "io-unit"); + if(!iommund) + break; + this_sbus = prom_searchsiblings(prom_getchild(iommund), "sbi"); + } else { + this_sbus = prom_getsibling(this_sbus); + if(!this_sbus) + break; + this_sbus = prom_searchsiblings(this_sbus, "sbus"); + } + if(this_sbus) { + sbus->next = kmalloc(sizeof(struct sbus_bus), GFP_ATOMIC); + sbus = sbus->next; + sbus->next = NULL; + sbus->prom_node = this_sbus; + } else { + break; + } + } /* while(this_sbus) */ + if (sparc_cpu_model == sun4d) { + extern void sun4d_init_sbi_irq(void); + sun4d_init_sbi_irq(); } - - sbus_arch_postinit(); + +#ifdef CONFIG_SPARC64 + if (sparc_cpu_model == sun4u) { + firetruck_init(); + } +#endif +#ifdef CONFIG_SUN_AUXIO + if (sparc_cpu_model == sun4u) + auxio_probe (); +#endif +#ifdef CONFIG_SPARC64 + if (sparc_cpu_model == sun4u) { + extern void clock_probe(void); + + clock_probe(); + } +#endif return 0; } diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 5a9475e56..caeb6d246 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -1388,7 +1388,7 @@ static int twa_map_scsi_sg_data(TW_Device_Extension *tw_dev, int request_id) if (cmd->use_sg == 0) goto out; - use_sg = pci_map_sg(pdev, cmd->request_buffer, cmd->use_sg, DMA_BIDIRECTIONAL); + use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, DMA_BIDIRECTIONAL); if (use_sg == 0) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1c, "Failed to map scatter gather list"); @@ -2122,7 +2122,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH))); /* Now setup the interrupt handler */ - retval = request_irq(pdev->irq, twa_interrupt, IRQF_SHARED, "3w-9xxx", tw_dev); + retval = request_irq(pdev->irq, twa_interrupt, SA_SHIRQ, "3w-9xxx", tw_dev); if (retval) { TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ"); goto out_remove_host; diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index f3a5f422a..e8e41e6eb 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -405,7 +405,7 @@ static int tw_decode_sense(TW_Device_Extension *tw_dev, int request_id, int fill /* Attempt to return intelligent sense information */ if (fill_sense) { if ((command->status == 0xc7) || (command->status == 0xcb)) { - for (i = 0; i < ARRAY_SIZE(tw_sense_table); i++) { + for (i=0;i<(sizeof(tw_sense_table)/sizeof(tw_sense_table[0]));i++) { if (command->flags == tw_sense_table[i][0]) { /* Valid bit and 'current errors' */ @@ -625,7 +625,7 @@ static int tw_aen_complete(TW_Device_Extension *tw_dev, int request_id) if (aen == 0x0ff) { printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: INFO: AEN queue overflow.\n", tw_dev->host->host_no); } else { - table_max = ARRAY_SIZE(tw_aen_string); + table_max = sizeof(tw_aen_string)/sizeof(char *); if ((aen & 0x0ff) < table_max) { if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: %s%d.\n", tw_dev->host->host_no, tw_aen_string[aen & 0xff], aen >> 8); @@ -786,7 +786,7 @@ static int tw_aen_drain_queue(TW_Device_Extension *tw_dev) if (aen == 0x0ff) { printk(KERN_WARNING "3w-xxxx: AEN: INFO: AEN queue overflow.\n"); } else { - table_max = ARRAY_SIZE(tw_aen_string); + table_max = sizeof(tw_aen_string)/sizeof(char *); if ((aen & 0x0ff) < table_max) { if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { printk(KERN_WARNING "3w-xxxx: AEN: %s%d.\n", tw_aen_string[aen & 0xff], aen >> 8); @@ -1286,7 +1286,7 @@ static int tw_map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd) if (cmd->use_sg == 0) return 0; - use_sg = pci_map_sg(pdev, cmd->request_buffer, cmd->use_sg, DMA_BIDIRECTIONAL); + use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, DMA_BIDIRECTIONAL); if (use_sg == 0) { printk(KERN_WARNING "3w-xxxx: tw_map_scsi_sg_data(): pci_map_sg() failed.\n"); @@ -2397,7 +2397,7 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id * printk(KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n", host->host_no, tw_dev->base_addr, pdev->irq); /* Now setup the interrupt handler */ - retval = request_irq(pdev->irq, tw_interrupt, IRQF_SHARED, "3w-xxxx", tw_dev); + retval = request_irq(pdev->irq, tw_interrupt, SA_SHIRQ, "3w-xxxx", tw_dev); if (retval) { printk(KERN_WARNING "3w-xxxx: Error requesting IRQ."); goto out_remove_host; diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 15ce40a70..6a0f9506e 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c @@ -114,6 +114,7 @@ * */ #define NCR_700_VERSION "2.8" +#include #include #include #include @@ -173,7 +174,6 @@ STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt); STATIC int NCR_700_host_reset(struct scsi_cmnd * SCpnt); STATIC void NCR_700_chip_setup(struct Scsi_Host *host); STATIC void NCR_700_chip_reset(struct Scsi_Host *host); -STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth); @@ -316,7 +316,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, BUG_ON(!dma_is_consistent(pScript) && L1_CACHE_BYTES < dma_get_cache_alignment()); hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET); hostdata->dev = dev; - + pSlots = pScript + SLOTS_OFFSET; /* Fill in the missing routines from the host template */ @@ -330,21 +330,21 @@ NCR_700_detect(struct scsi_host_template *tpnt, tpnt->use_clustering = ENABLE_CLUSTERING; tpnt->slave_configure = NCR_700_slave_configure; tpnt->slave_destroy = NCR_700_slave_destroy; - tpnt->slave_alloc = NCR_700_slave_alloc; tpnt->change_queue_depth = NCR_700_change_queue_depth; tpnt->change_queue_type = NCR_700_change_queue_type; - + if(tpnt->name == NULL) tpnt->name = "53c700"; if(tpnt->proc_name == NULL) tpnt->proc_name = "53c700"; + host = scsi_host_alloc(tpnt, 4); if (!host) return NULL; memset(hostdata->slots, 0, sizeof(struct NCR_700_command_slot) * NCR_700_COMMAND_SLOTS_PER_HOST); - for (j = 0; j < NCR_700_COMMAND_SLOTS_PER_HOST; j++) { + for(j = 0; j < NCR_700_COMMAND_SLOTS_PER_HOST; j++) { dma_addr_t offset = (dma_addr_t)((unsigned long)&hostdata->slots[j].SG[0] - (unsigned long)&hostdata->slots[0].SG[0]); hostdata->slots[j].pSG = (struct NCR_700_SG_List *)((unsigned long)(pSlots + offset)); @@ -355,12 +355,14 @@ NCR_700_detect(struct scsi_host_template *tpnt, hostdata->slots[j].state = NCR_700_SLOT_FREE; } - for (j = 0; j < ARRAY_SIZE(SCRIPT); j++) + for(j = 0; j < sizeof(SCRIPT)/sizeof(SCRIPT[0]); j++) { script[j] = bS_to_host(SCRIPT[j]); + } /* adjust all labels to be bus physical */ - for (j = 0; j < PATCHES; j++) + for(j = 0; j < PATCHES; j++) { script[LABELPATCHES[j]] = bS_to_host(pScript + SCRIPT[LABELPATCHES[j]]); + } /* now patch up fixed addresses. */ script_patch_32(script, MessageLocation, pScript + MSGOUT_OFFSET); @@ -374,7 +376,7 @@ NCR_700_detect(struct scsi_host_template *tpnt, dma_sync_single_for_device(hostdata->dev, pScript, sizeof(SCRIPT), DMA_TO_DEVICE); hostdata->state = NCR_700_HOST_FREE; hostdata->cmd = NULL; - host->max_id = 8; + host->max_id = 7; host->max_lun = NCR_700_MAX_LUNS; BUG_ON(NCR_700_transport_template == NULL); host->transportt = NCR_700_transport_template; @@ -383,17 +385,17 @@ NCR_700_detect(struct scsi_host_template *tpnt, host->hostdata[0] = (unsigned long)hostdata; /* kick the chip */ NCR_700_writeb(0xff, host, CTEST9_REG); - if (hostdata->chip710) + if(hostdata->chip710) hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f; else hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f; hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0); - if (banner == 0) { + if(banner == 0) { printk(KERN_NOTICE "53c700: Version " NCR_700_VERSION " By James.Bottomley@HansenPartnership.com\n"); banner = 1; } printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no, - hostdata->chip710 ? "53c710" : + hostdata->chip710 ? "53c710" : (hostdata->fast ? "53c700-66" : "53c700"), hostdata->rev, hostdata->differential ? "(Differential)" : ""); @@ -538,7 +540,6 @@ find_empty_slot(struct NCR_700_Host_Parameters *hostdata) * finish routine. If we cannot queue the command when it * is properly build, we then change to NCR_700_SLOT_QUEUED */ slot->state = NCR_700_SLOT_BUSY; - slot->flags = 0; hostdata->command_slot_count++; return slot; @@ -588,7 +589,7 @@ NCR_700_unmap(struct NCR_700_Host_Parameters *hostdata, struct scsi_cmnd *SCp, if(SCp->sc_data_direction != DMA_NONE && SCp->sc_data_direction != DMA_BIDIRECTIONAL) { if(SCp->use_sg) { - dma_unmap_sg(hostdata->dev, SCp->request_buffer, + dma_unmap_sg(hostdata->dev, SCp->buffer, SCp->use_sg, SCp->sc_data_direction); } else { dma_unmap_single(hostdata->dev, slot->dma_handle, @@ -609,24 +610,31 @@ NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata, struct NCR_700_command_slot *slot = (struct NCR_700_command_slot *)SCp->host_scribble; + NCR_700_unmap(hostdata, SCp, slot); dma_unmap_single(hostdata->dev, slot->pCmd, sizeof(SCp->cmnd), DMA_TO_DEVICE); - if (slot->flags == NCR_700_FLAG_AUTOSENSE) { - char *cmnd = NCR_700_get_sense_cmnd(SCp->device); + if(SCp->cmnd[0] == REQUEST_SENSE && SCp->cmnd[6] == NCR_700_INTERNAL_SENSE_MAGIC) { #ifdef NCR_700_DEBUG printk(" ORIGINAL CMD %p RETURNED %d, new return is %d sense is\n", SCp, SCp->cmnd[7], result); scsi_print_sense("53c700", SCp); #endif - dma_unmap_single(hostdata->dev, slot->dma_handle, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); /* restore the old result if the request sense was * successful */ if(result == 0) - result = cmnd[7]; - } else - NCR_700_unmap(hostdata, SCp, slot); - + result = SCp->cmnd[7]; + /* now restore the original command */ + memcpy((void *) SCp->cmnd, (void *) SCp->data_cmnd, + sizeof(SCp->data_cmnd)); + SCp->request_buffer = SCp->buffer; + SCp->request_bufflen = SCp->bufflen; + SCp->use_sg = SCp->old_use_sg; + SCp->cmd_len = SCp->old_cmd_len; + SCp->sc_data_direction = SCp->sc_old_data_direction; + SCp->underflow = SCp->old_underflow; + + } free_slot(slot, hostdata); #ifdef NCR_700_DEBUG if(NCR_700_get_depth(SCp->device) == 0 || @@ -967,15 +975,13 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, status_byte(hostdata->status[0]) == COMMAND_TERMINATED) { struct NCR_700_command_slot *slot = (struct NCR_700_command_slot *)SCp->host_scribble; - if(slot->flags == NCR_700_FLAG_AUTOSENSE) { + if(SCp->cmnd[0] == REQUEST_SENSE) { /* OOPS: bad device, returning another * contingent allegiance condition */ scmd_printk(KERN_ERR, SCp, "broken device is looping in contingent allegiance: ignoring\n"); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); } else { - char *cmnd = - NCR_700_get_sense_cmnd(SCp->device); #ifdef NCR_DEBUG scsi_print_command(SCp); printk(" cmd %p has status %d, requesting sense\n", @@ -989,25 +995,27 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, * data associated with the command * here */ NCR_700_unmap(hostdata, SCp, slot); - dma_unmap_single(hostdata->dev, slot->pCmd, - sizeof(SCp->cmnd), - DMA_TO_DEVICE); - - cmnd[0] = REQUEST_SENSE; - cmnd[1] = (SCp->device->lun & 0x7) << 5; - cmnd[2] = 0; - cmnd[3] = 0; - cmnd[4] = sizeof(SCp->sense_buffer); - cmnd[5] = 0; + + SCp->cmnd[0] = REQUEST_SENSE; + SCp->cmnd[1] = (SCp->device->lun & 0x7) << 5; + SCp->cmnd[2] = 0; + SCp->cmnd[3] = 0; + SCp->cmnd[4] = sizeof(SCp->sense_buffer); + SCp->cmnd[5] = 0; + SCp->cmd_len = 6; /* Here's a quiet hack: the * REQUEST_SENSE command is six bytes, * so store a flag indicating that * this was an internal sense request * and the original status at the end * of the command */ - cmnd[6] = NCR_700_INTERNAL_SENSE_MAGIC; - cmnd[7] = hostdata->status[0]; - slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); + SCp->cmnd[6] = NCR_700_INTERNAL_SENSE_MAGIC; + SCp->cmnd[7] = hostdata->status[0]; + SCp->use_sg = 0; + SCp->sc_data_direction = DMA_FROM_DEVICE; + dma_sync_single_for_device(hostdata->dev, slot->pCmd, + SCp->cmd_len, DMA_TO_DEVICE); + SCp->request_bufflen = sizeof(SCp->sense_buffer); slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | sizeof(SCp->sense_buffer)); slot->SG[0].pAddr = bS_to_host(slot->dma_handle); @@ -1019,7 +1027,6 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, /* queue the command for reissue */ slot->state = NCR_700_SLOT_QUEUED; - slot->flags = NCR_700_FLAG_AUTOSENSE; hostdata->state = NCR_700_HOST_FREE; hostdata->cmd = NULL; } @@ -1240,7 +1247,7 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, if(SCp->use_sg) { for(i = 0; i < SCp->use_sg + 1; i++) { - printk(KERN_INFO " SG[%d].length = %d, move_insn=%08x, addr %08x\n", i, ((struct scatterlist *)SCp->request_buffer)[i].length, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].ins, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].pAddr); + printk(KERN_INFO " SG[%d].length = %d, move_insn=%08x, addr %08x\n", i, ((struct scatterlist *)SCp->buffer)[i].length, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].ins, ((struct NCR_700_command_slot *)SCp->host_scribble)->SG[i].pAddr); } } } @@ -1399,14 +1406,12 @@ NCR_700_start_command(struct scsi_cmnd *SCp) /* keep interrupts disabled until we have the command correctly * set up so we cannot take a selection interrupt */ - hostdata->msgout[0] = NCR_700_identify((SCp->cmnd[0] != REQUEST_SENSE && - slot->flags != NCR_700_FLAG_AUTOSENSE), + hostdata->msgout[0] = NCR_700_identify(SCp->cmnd[0] != REQUEST_SENSE, SCp->device->lun); /* for INQUIRY or REQUEST_SENSE commands, we cannot be sure * if the negotiated transfer parameters still hold, so * always renegotiate them */ - if(SCp->cmnd[0] == INQUIRY || SCp->cmnd[0] == REQUEST_SENSE || - slot->flags == NCR_700_FLAG_AUTOSENSE) { + if(SCp->cmnd[0] == INQUIRY || SCp->cmnd[0] == REQUEST_SENSE) { NCR_700_clear_flag(SCp->device, NCR_700_DEV_NEGOTIATED_SYNC); } @@ -1415,8 +1420,7 @@ NCR_700_start_command(struct scsi_cmnd *SCp) * will refuse all tags, so send the request sense as untagged * */ if((hostdata->tag_negotiated & (1<tag != SCSI_NO_TAG && SCp->cmnd[0] != REQUEST_SENSE && - slot->flags != NCR_700_FLAG_AUTOSENSE)) { + && (slot->tag != SCSI_NO_TAG && SCp->cmnd[0] != REQUEST_SENSE)) { count += scsi_populate_tag_msg(SCp, &hostdata->msgout[count]); } @@ -1529,7 +1533,7 @@ NCR_700_intr(int irq, void *dev_id, struct pt_regs *regs) /* clear all the negotiated parameters */ __shost_for_each_device(SDp, host) - NCR_700_clear_flag(SDp, ~0); + SDp->hostdata = NULL; /* clear all the slots and their pending commands */ for(i = 0; i < NCR_700_COMMAND_SLOTS_PER_HOST; i++) { @@ -1862,9 +1866,8 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) __u32 count = 0; if(SCp->use_sg) { - sg_count = dma_map_sg(hostdata->dev, - SCp->request_buffer, SCp->use_sg, - direction); + sg_count = dma_map_sg(hostdata->dev, SCp->buffer, + SCp->use_sg, direction); } else { vPtr = dma_map_single(hostdata->dev, SCp->request_buffer, @@ -1879,7 +1882,7 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) for(i = 0; i < sg_count; i++) { if(SCp->use_sg) { - struct scatterlist *sg = SCp->request_buffer; + struct scatterlist *sg = SCp->buffer; vPtr = sg_dma_address(&sg[i]); count = sg_dma_len(&sg[i]); @@ -1939,7 +1942,7 @@ NCR_700_abort(struct scsi_cmnd * SCp) STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCp) { - DECLARE_COMPLETION_ONSTACK(complete); + DECLARE_COMPLETION(complete); struct NCR_700_Host_Parameters *hostdata = (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; @@ -2034,17 +2037,7 @@ NCR_700_set_offset(struct scsi_target *STp, int offset) spi_flags(STp) |= NCR_700_DEV_PRINT_SYNC_NEGOTIATION; } -STATIC int -NCR_700_slave_alloc(struct scsi_device *SDp) -{ - SDp->hostdata = kzalloc(sizeof(struct NCR_700_Device_Parameters), - GFP_KERNEL); - - if (!SDp->hostdata) - return -ENOMEM; - return 0; -} STATIC int NCR_700_slave_configure(struct scsi_device *SDp) @@ -2075,8 +2068,7 @@ NCR_700_slave_configure(struct scsi_device *SDp) STATIC void NCR_700_slave_destroy(struct scsi_device *SDp) { - kfree(SDp->hostdata); - SDp->hostdata = NULL; + /* to do here: deallocate memory */ } static int diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index 97ebe71b7..a8c83bb03 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h @@ -12,7 +12,7 @@ #include #include -#include + /* Turn on for general debugging---too verbose for normal use */ #undef NCR_700_DEBUG @@ -76,16 +76,11 @@ struct NCR_700_SG_List { #define SCRIPT_RETURN 0x90080000 }; -struct NCR_700_Device_Parameters { - /* space for creating a request sense command. Really, except - * for the annoying SCSI-2 requirement for LUN information in - * cmnd[1], this could be in static storage */ - unsigned char cmnd[MAX_COMMAND_SIZE]; - __u8 depth; -}; - - -/* The SYNC negotiation sequence looks like: +/* We use device->hostdata to store negotiated parameters. This is + * supposed to be a pointer to a device private area, but we cannot + * really use it as such since it will never be freed, so just use the + * 32 bits to cram the information. The SYNC negotiation sequence looks + * like: * * If DEV_NEGOTIATED_SYNC not set, tack and SDTR message on to the * initial identify for the device and set DEV_BEGIN_SYNC_NEGOTATION @@ -103,26 +98,19 @@ struct NCR_700_Device_Parameters { #define NCR_700_DEV_BEGIN_SYNC_NEGOTIATION (1<<17) #define NCR_700_DEV_PRINT_SYNC_NEGOTIATION (1<<19) -static inline char *NCR_700_get_sense_cmnd(struct scsi_device *SDp) -{ - struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; - - return hostdata->cmnd; -} - static inline void NCR_700_set_depth(struct scsi_device *SDp, __u8 depth) { - struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; + long l = (long)SDp->hostdata; - hostdata->depth = depth; + l &= 0xffff00ff; + l |= 0xff00 & (depth << 8); + SDp->hostdata = (void *)l; } static inline __u8 NCR_700_get_depth(struct scsi_device *SDp) { - struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; - - return hostdata->depth; + return ((((unsigned long)SDp->hostdata) & 0xff00)>>8); } static inline int NCR_700_is_flag_set(struct scsi_device *SDp, __u32 flag) @@ -175,8 +163,6 @@ struct NCR_700_command_slot { #define NCR_700_SLOT_BUSY (1|NCR_700_SLOT_MAGIC) /* slot has command active on HA */ #define NCR_700_SLOT_QUEUED (2|NCR_700_SLOT_MAGIC) /* slot has command to be made active on HA */ __u8 state; - #define NCR_700_FLAG_AUTOSENSE 0x01 - __u8 flags; int tag; __u32 resume_offset; struct scsi_cmnd *cmnd; @@ -486,7 +472,8 @@ NCR_700_readl(struct Scsi_Host *host, __u32 reg) ioread32(hostdata->base + reg); #if 1 /* sanity check the register */ - BUG_ON((reg & 0x3) != 0); + if((reg & 0x3) != 0) + BUG(); #endif return value; @@ -509,7 +496,8 @@ NCR_700_writel(__u32 value, struct Scsi_Host *host, __u32 reg) #if 1 /* sanity check the register */ - BUG_ON((reg & 0x3) != 0); + if((reg & 0x3) != 0) + BUG(); #endif bEBus ? iowrite32be(value, hostdata->base + reg): diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index acf292736..7894b8ea8 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c @@ -232,6 +232,7 @@ #include +#include #include #include @@ -360,7 +361,7 @@ int CmdPageStart = (0 - Ent_dsa_zero - sizeof(struct NCR53c7x0_cmd)) & 0xff; static char *setup_strings[] = {"","","","","","","",""}; -#define MAX_SETUP_STRINGS ARRAY_SIZE(setup_strings) +#define MAX_SETUP_STRINGS (sizeof(setup_strings) / sizeof(char *)) #define SETUP_BUFFER_SIZE 200 static char setup_buffer[SETUP_BUFFER_SIZE]; static char setup_used[MAX_SETUP_STRINGS]; @@ -708,7 +709,7 @@ request_synchronous (int host, int target) { printk (KERN_ALERT "target %d is host ID\n", target); return -1; } - else if (target >= h->max_id) { + else if (target > h->max_id) { printk (KERN_ALERT "target %d exceeds maximum of %d\n", target, h->max_id); return -1; @@ -1070,7 +1071,7 @@ NCR53c7x0_init (struct Scsi_Host *host) { NCR53c7x0_driver_init (host); - if (request_irq(host->irq, NCR53c7x0_intr, IRQF_SHARED, "53c7xx", host)) + if (request_irq(host->irq, NCR53c7x0_intr, SA_SHIRQ, "53c7xx", host)) { printk("scsi%d : IRQ%d not free, detaching\n", host->host_no, host->irq); @@ -2189,15 +2190,15 @@ static const struct { */ -static void +static void synchronous (struct Scsi_Host *host, int target, char *msg) { struct NCR53c7x0_hostdata *hostdata = (struct NCR53c7x0_hostdata *) host->hostdata[0]; int desire, divisor, i, limit; unsigned char scntl3, sxfer; /* The diagnostic message fits on one line, even with max. width integers */ - char buf[80]; - + char buf[80]; + /* Desired transfer clock in Hz */ desire = 1000000000L / (msg[3] * 4); /* Scale the available SCSI clock by 10 so we get tenths */ @@ -2208,14 +2209,14 @@ synchronous (struct Scsi_Host *host, int target, char *msg) { msg[4] = 8; if (hostdata->options & OPTION_DEBUG_SDTR) - printk("scsi%d : optimal synchronous divisor of %d.%01d\n", + printk("scsi%d : optimal synchronous divisor of %d.%01d\n", host->host_no, divisor / 10, divisor % 10); - limit = ARRAY_SIZE(syncs) - 1; + limit = (sizeof(syncs) / sizeof(syncs[0]) -1); for (i = 0; (i < limit) && (divisor > syncs[i].div); ++i); if (hostdata->options & OPTION_DEBUG_SDTR) - printk("scsi%d : selected synchronous divisor of %d.%01d\n", + printk("scsi%d : selected synchronous divisor of %d.%01d\n", host->host_no, syncs[i].div / 10, syncs[i].div % 10); msg[3] = ((1000000000L / hostdata->scsi_clock) * syncs[i].div / 10 / 4); @@ -3451,12 +3452,12 @@ create_cmd (Scsi_Cmnd *cmd) { for (i = 0; cmd->use_sg ? (i < cmd->use_sg) : !i; cmd_datain += 4, cmd_dataout += 4, ++i) { u32 vbuf = cmd->use_sg - ? (u32)page_address(((struct scatterlist *)cmd->request_buffer)[i].page)+ - ((struct scatterlist *)cmd->request_buffer)[i].offset + ? (u32)page_address(((struct scatterlist *)cmd->buffer)[i].page)+ + ((struct scatterlist *)cmd->buffer)[i].offset : (u32)(cmd->request_buffer); u32 bbuf = virt_to_bus((void *)vbuf); u32 count = cmd->use_sg ? - ((struct scatterlist *)cmd->request_buffer)[i].length : + ((struct scatterlist *)cmd->buffer)[i].length : cmd->request_bufflen; /* @@ -3621,7 +3622,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) { #ifdef LINUX_1_2 || cmd->device->id > 7 #else - || cmd->device->id >= host->max_id + || cmd->device->id > host->max_id #endif || cmd->device->id == host->this_id || hostdata->state == STATE_DISABLED) { @@ -4232,7 +4233,7 @@ restart: * Purpose : handle NCR53c7x0 interrupts for all NCR devices sharing * the same IRQ line. * - * Inputs : Since we're using the IRQF_DISABLED interrupt handler + * Inputs : Since we're using the SA_INTERRUPT interrupt handler * semantics, irq indicates the interrupt which invoked * this handler. * @@ -5417,7 +5418,7 @@ insn_to_offset (Scsi_Cmnd *cmd, u32 *insn) { if ((buffers = cmd->use_sg)) { for (offset = 0, - segment = (struct scatterlist *) cmd->request_buffer; + segment = (struct scatterlist *) cmd->buffer; buffers && !((found = ((ptr >= (char *)page_address(segment->page)+segment->offset) && (ptr < ((char *)page_address(segment->page)+segment->offset+segment->length))))); --buffers, offset += segment->length, ++segment) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 16a12a3b7..bde3d5834 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -29,6 +29,7 @@ #define BusLogic_DriverVersion "2.1.16" #define BusLogic_DriverDate "18 July 2002" +#include #include #include #include @@ -1844,7 +1845,7 @@ static boolean __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *Hos /* Acquire shared access to the IRQ Channel. */ - if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, IRQF_SHARED, HostAdapter->FullModelName, HostAdapter) < 0) { + if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, SA_SHIRQ, HostAdapter->FullModelName, HostAdapter) < 0) { BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel); return false; } diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h index 9792e5af5..1aaa6569e 100644 --- a/drivers/scsi/BusLogic.h +++ b/drivers/scsi/BusLogic.h @@ -28,6 +28,7 @@ #ifndef _BUSLOGIC_H #define _BUSLOGIC_H +#include #ifndef PACKED #define PACKED __attribute__((packed)) diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index 7c0068049..8e3d949b7 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c @@ -15,6 +15,7 @@ */ +#include #ifndef CONFIG_SCSI_OMIT_FLASHPOINT diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 96a81cd17..a480a3742 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -501,7 +501,7 @@ config SCSI_ATA_PIIX tristate "Intel PIIX/ICH SATA support" depends on SCSI_SATA && PCI help - This option enables support for ICH5/6/7/8 Serial ATA. + This option enables support for ICH5 Serial ATA. If PATA support was enabled previously, this enables support for select Intel PIIX/ICH PATA host controllers. @@ -532,16 +532,6 @@ config SCSI_PDC_ADMA If unsure, say N. -config SCSI_HPTIOP - tristate "HighPoint RocketRAID 3xxx Controller support" - depends on SCSI && PCI - help - This option enables support for HighPoint RocketRAID 3xxx - controllers. - - To compile this driver as a module, choose M here; the module - will be called hptiop. If unsure, say N. - config SCSI_SATA_QSTOR tristate "Pacific Digital SATA QStor support" depends on SCSI_SATA && PCI @@ -1169,7 +1159,7 @@ config SCSI_NCR_Q720 you do not have this SCSI card, so say N. config SCSI_NCR53C8XX_DEFAULT_TAGS - int "default tagged command queue depth" + int " default tagged command queue depth" depends on SCSI_ZALON || SCSI_NCR_Q720 default "8" ---help--- @@ -1195,7 +1185,7 @@ config SCSI_NCR53C8XX_DEFAULT_TAGS There is no safe option other than using good SCSI devices. config SCSI_NCR53C8XX_MAX_TAGS - int "maximum number of queued commands" + int " maximum number of queued commands" depends on SCSI_ZALON || SCSI_NCR_Q720 default "32" ---help--- @@ -1212,7 +1202,7 @@ config SCSI_NCR53C8XX_MAX_TAGS There is no safe option and the default answer is recommended. config SCSI_NCR53C8XX_SYNC - int "synchronous transfers frequency in MHz" + int " synchronous transfers frequency in MHz" depends on SCSI_ZALON || SCSI_NCR_Q720 default "20" ---help--- @@ -1246,7 +1236,7 @@ config SCSI_NCR53C8XX_SYNC terminations and SCSI conformant devices. config SCSI_NCR53C8XX_PROFILE - bool "enable profiling" + bool " enable profiling" depends on SCSI_ZALON || SCSI_NCR_Q720 help This option allows you to enable profiling information gathering. @@ -1257,7 +1247,7 @@ config SCSI_NCR53C8XX_PROFILE The normal answer therefore is N. config SCSI_NCR53C8XX_NO_DISCONNECT - bool "not allow targets to disconnect" + bool " not allow targets to disconnect" depends on (SCSI_ZALON || SCSI_NCR_Q720) && SCSI_NCR53C8XX_DEFAULT_TAGS=0 help This option is only provided for safety if you suspect some SCSI diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index ebd0cf00b..81803a16f 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -33,8 +33,7 @@ obj-$(CONFIG_SCSI_FC_ATTRS) += scsi_transport_fc.o obj-$(CONFIG_SCSI_ISCSI_ATTRS) += scsi_transport_iscsi.o obj-$(CONFIG_SCSI_SAS_ATTRS) += scsi_transport_sas.o -obj-$(CONFIG_ISCSI_TCP) += libiscsi.o iscsi_tcp.o -obj-$(CONFIG_INFINIBAND_ISER) += libiscsi.o +obj-$(CONFIG_ISCSI_TCP) += iscsi_tcp.o obj-$(CONFIG_SCSI_AMIGA7XX) += amiga7xx.o 53c7xx.o obj-$(CONFIG_A3000_SCSI) += a3000.o wd33c93.o obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o @@ -137,7 +136,6 @@ obj-$(CONFIG_SCSI_SATA_NV) += libata.o sata_nv.o obj-$(CONFIG_SCSI_SATA_ULI) += libata.o sata_uli.o obj-$(CONFIG_SCSI_SATA_MV) += libata.o sata_mv.o obj-$(CONFIG_SCSI_PDC_ADMA) += libata.o pdc_adma.o -obj-$(CONFIG_SCSI_HPTIOP) += hptiop.o obj-$(CONFIG_ARM) += arm/ @@ -166,7 +164,7 @@ ncr53c8xx-flags-$(CONFIG_SCSI_ZALON) \ CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags-y) $(ncr53c8xx-flags-m) zalon7xx-objs := zalon.o ncr53c8xx.o NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o -libata-objs := libata-core.o libata-scsi.o libata-bmdma.o libata-eh.o +libata-objs := libata-core.o libata-scsi.o libata-bmdma.o oktagon_esp_mod-objs := oktagon_esp.o oktagon_io.o # Files generated that shall be removed upon make clean diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 616810ad1..9f0ddbe6d 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -296,7 +296,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd * cmd) */ if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; + cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.ptr = page_address(cmd->SCp.buffer->page)+ cmd->SCp.buffer->offset; @@ -500,7 +500,7 @@ static void NCR5380_print_phase(struct Scsi_Host *instance) /* * Function : int should_disconnect (unsigned char cmd) * - * Purpose : decide whether a command would normally disconnect or + * Purpose : decide weather a command would normally disconnect or * not, since if it won't disconnect we should go to sleep. * * Input : cmd - opcode of SCSI command @@ -585,7 +585,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) NCR5380_setup(instance); for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) - if ((mask & possible) && (request_irq(i, &probe_intr, IRQF_DISABLED, "NCR-probe", NULL) == 0)) + if ((mask & possible) && (request_irq(i, &probe_intr, SA_INTERRUPT, "NCR-probe", NULL) == 0)) trying_irqs |= mask; timeout = jiffies + (250 * HZ / 1000); diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c index bdc6bb262..c7dd0154d 100644 --- a/drivers/scsi/NCR53C9x.c +++ b/drivers/scsi/NCR53C9x.c @@ -23,6 +23,7 @@ #include +#include #include #include #include @@ -911,7 +912,7 @@ static void esp_get_dmabufs(struct NCR_ESP *esp, Scsi_Cmnd *sp) sp->SCp.ptr = (char *) virt_to_phys(sp->request_buffer); } else { - sp->SCp.buffer = (struct scatterlist *) sp->request_buffer; + sp->SCp.buffer = (struct scatterlist *) sp->buffer; sp->SCp.buffers_residual = sp->use_sg - 1; sp->SCp.this_residual = sp->SCp.buffer->length; if (esp->dma_mmu_get_scsi_sgl) @@ -2152,23 +2153,29 @@ static int esp_do_data_finale(struct NCR_ESP *esp, */ static int esp_should_clear_sync(Scsi_Cmnd *sp) { - unchar cmd = sp->cmnd[0]; + unchar cmd1 = sp->cmnd[0]; + unchar cmd2 = sp->data_cmnd[0]; /* These cases are for spinning up a disk and * waiting for that spinup to complete. */ - if(cmd == START_STOP) + if(cmd1 == START_STOP || + cmd2 == START_STOP) return 0; - if(cmd == TEST_UNIT_READY) + if(cmd1 == TEST_UNIT_READY || + cmd2 == TEST_UNIT_READY) return 0; /* One more special case for SCSI tape drives, * this is what is used to probe the device for * completion of a rewind or tape load operation. */ - if(sp->device->type == TYPE_TAPE && cmd == MODE_SENSE) - return 0; + if(sp->device->type == TYPE_TAPE) { + if(cmd1 == MODE_SENSE || + cmd2 == MODE_SENSE) + return 0; + } return 1; } diff --git a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h index 481653c97..65a9b377a 100644 --- a/drivers/scsi/NCR53C9x.h +++ b/drivers/scsi/NCR53C9x.h @@ -13,6 +13,7 @@ #ifndef NCR53C9X_H #define NCR53C9X_H +#include #include /* djweis for mac driver */ diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c index 8472c5359..ae37d3ab9 100644 --- a/drivers/scsi/NCR53c406a.c +++ b/drivers/scsi/NCR53c406a.c @@ -213,16 +213,16 @@ static void *addresses[] = { (void *) 0xd8000, (void *) 0xc8000 }; -#define ADDRESS_COUNT ARRAY_SIZE(addresses) +#define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned )) #endif /* USE_BIOS */ /* possible i/o port addresses */ static unsigned short ports[] = { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 }; -#define PORT_COUNT ARRAY_SIZE(ports) +#define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short )) /* possible interrupt channels */ static unsigned short intrs[] = { 10, 11, 12, 15 }; -#define INTR_COUNT ARRAY_SIZE(intrs) +#define INTR_COUNT (sizeof( intrs ) / sizeof( unsigned short )) /* signatures for NCR 53c406a based controllers */ #if USE_BIOS @@ -236,7 +236,7 @@ struct signature { { "Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82},}; -#define SIGNATURE_COUNT ARRAY_SIZE(signatures) +#define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature )) #endif /* USE_BIOS */ /* ============================================================ */ diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c index d05681f9d..577e63499 100644 --- a/drivers/scsi/NCR_D700.c +++ b/drivers/scsi/NCR_D700.c @@ -114,7 +114,7 @@ MODULE_DESCRIPTION("NCR Dual700 SCSI Driver"); MODULE_LICENSE("GPL"); module_param(NCR_D700, charp, 0); -static __u8 __devinitdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = +static __u8 __initdata id_array[2*(MCA_MAX_SLOT_NR + 1)] = { [0 ... 2*(MCA_MAX_SLOT_NR + 1)-1] = 7 }; #ifdef MODULE @@ -173,7 +173,7 @@ struct NCR_D700_private { char pad; }; -static int __devinit +static int NCR_D700_probe_one(struct NCR_D700_private *p, int siop, int irq, int slot, u32 region, int differential) { @@ -243,7 +243,7 @@ NCR_D700_intr(int irq, void *data, struct pt_regs *regs) * essentially connectecd to the MCA bus independently, it is easier * to set them up as two separate host adapters, rather than one * adapter with two channels */ -static int __devinit +static int NCR_D700_probe(struct device *dev) { struct NCR_D700_private *p; @@ -320,7 +320,7 @@ NCR_D700_probe(struct device *dev) memset(p, '\0', sizeof(*p)); p->dev = dev; snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id); - if (request_irq(irq, NCR_D700_intr, IRQF_SHARED, p->name, p)) { + if (request_irq(irq, NCR_D700_intr, SA_SHIRQ, p->name, p)) { printk(KERN_ERR "D700: request_irq failed\n"); kfree(p); return -EBUSY; @@ -329,7 +329,7 @@ NCR_D700_probe(struct device *dev) for (i = 0; i < 2; i++) { int err; - if ((err = NCR_D700_probe_one(p, i, irq, slot, + if ((err = NCR_D700_probe_one(p, i, slot, irq, offset_addr + (0x80 * i), differential)) != 0) printk("D700: SIOP%d: probe failed, error = %d\n", @@ -349,7 +349,7 @@ NCR_D700_probe(struct device *dev) return 0; } -static void __devexit +static void NCR_D700_remove_one(struct Scsi_Host *host) { scsi_remove_host(host); @@ -359,7 +359,7 @@ NCR_D700_remove_one(struct Scsi_Host *host) release_region(host->base, 64); } -static int __devexit +static int NCR_D700_remove(struct device *dev) { struct NCR_D700_private *p = dev_get_drvdata(dev); @@ -380,7 +380,7 @@ static struct mca_driver NCR_D700_driver = { .name = "NCR_D700", .bus = &mca_bus_type, .probe = NCR_D700_probe, - .remove = __devexit_p(NCR_D700_remove), + .remove = NCR_D700_remove, }, }; diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c index c39ffbb86..9d18ec905 100644 --- a/drivers/scsi/NCR_Q720.c +++ b/drivers/scsi/NCR_Q720.c @@ -265,7 +265,7 @@ NCR_Q720_probe(struct device *dev) p->irq = irq; p->siops = siops; - if (request_irq(irq, NCR_Q720_intr, IRQF_SHARED, "NCR_Q720", p)) { + if (request_irq(irq, NCR_Q720_intr, SA_SHIRQ, "NCR_Q720", p)) { printk(KERN_ERR "NCR_Q720: request irq %d failed\n", irq); goto out_release; } diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index d7e9fab54..3dce21c78 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -1120,7 +1120,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev, shost->sg_tablesize = TOTAL_SG_ENTRY; /* Initial orc chip */ - error = request_irq(pdev->irq, inia100_intr, IRQF_SHARED, + error = request_irq(pdev->irq, inia100_intr, SA_SHIRQ, "inia100", shost); if (error < 0) { printk(KERN_WARNING "inia100: unable to get irq %d\n", diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index fddfa2ebc..54996eaae 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c @@ -208,7 +208,7 @@ int __init a2091_detect(struct scsi_host_template *tpnt) regs.SASR = &(DMA(instance)->SASR); regs.SCMD = &(DMA(instance)->SCMD); wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); - request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI", + request_irq(IRQ_AMIGA_PORTS, a2091_intr, SA_SHIRQ, "A2091 SCSI", instance); DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; num_a2091++; diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c index ae9ab4b13..f425d424b 100644 --- a/drivers/scsi/a3000.c +++ b/drivers/scsi/a3000.c @@ -190,7 +190,7 @@ int __init a3000_detect(struct scsi_host_template *tpnt) regs.SASR = &(DMA(a3000_host)->SASR); regs.SCMD = &(DMA(a3000_host)->SCMD); wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15); - if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI", + if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, SA_SHIRQ, "A3000 SCSI", a3000_intr)) goto fail_irq; DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN; diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 83b5c7d08..642a3b4e5 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -148,8 +148,6 @@ static int nondasd = -1; static int dacmode = -1; static int commit = -1; -int startup_timeout = 180; -int aif_timeout = 120; module_param(nondasd, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); @@ -157,10 +155,6 @@ module_param(dacmode, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); module_param(commit, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on"); -module_param(startup_timeout, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(startup_timeout, "The duration of time in seconds to wait for adapter to have it's kernel up and\nrunning. This is typically adjusted for large systems that do not have a BIOS."); -module_param(aif_timeout, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(aif_timeout, "The duration of time in seconds to wait for applications to pick up AIFs before\nderegistering them. This is typically adjusted for heavily burdened systems."); int numacb = -1; module_param(numacb, int, S_IRUGO|S_IWUSR); @@ -396,7 +390,8 @@ static void get_container_name_callback(void *context, struct fib * fibptr) scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; dprintk((KERN_DEBUG "get_container_name_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); - BUG_ON(fibptr == NULL); + if (fibptr == NULL) + BUG(); get_name_reply = (struct aac_get_name_resp *) fib_data(fibptr); /* Failure is irrelevant, using default value instead */ @@ -640,13 +635,13 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex) cp[sizeof(str->pid)] = c; } else { struct aac_driver_ident *mp = aac_get_driver_ident(dev->cardtype); - - inqstrcpy (mp->vname, str->vid); + + inqstrcpy (mp->vname, str->vid); /* last six chars reserved for vol type */ inqstrcpy (mp->model, str->pid); } - if (tindex < ARRAY_SIZE(container_types)){ + if (tindex < (sizeof(container_types)/sizeof(char *))){ char *findit = str->pid; for ( ; *findit != ' '; findit++); /* walk till we find a space */ @@ -955,11 +950,12 @@ static void io_callback(void *context, struct fib * fibptr) smp_processor_id(), (unsigned long long)lba, jiffies); } - BUG_ON(fibptr == NULL); + if (fibptr == NULL) + BUG(); if(scsicmd->use_sg) pci_unmap_sg(dev->pdev, - (struct scatterlist *)scsicmd->request_buffer, + (struct scatterlist *)scsicmd->buffer, scsicmd->use_sg, scsicmd->sc_data_direction); else if(scsicmd->request_bufflen) @@ -1090,7 +1086,8 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) aac_build_sgraw(scsicmd, &readcmd->sg); fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(readcmd->sg.count) - 1) * sizeof (struct sgentryraw)); - BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); + if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) + BUG(); /* * Now send the Fib to the adapter */ @@ -1258,7 +1255,8 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) aac_build_sgraw(scsicmd, &writecmd->sg); fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(writecmd->sg.count) - 1) * sizeof (struct sgentryraw)); - BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); + if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) + BUG(); /* * Now send the Fib to the adapter */ @@ -1572,7 +1570,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) * see: .c i.e. aac.c */ if (scmd_id(scsicmd) == host->this_id) { - setinqstr(dev, (void *) (inq_data.inqd_vid), ARRAY_SIZE(container_types)); + setinqstr(dev, (void *) (inq_data.inqd_vid), (sizeof(container_types)/sizeof(char *))); inq_data.inqd_pdt = INQD_PDT_PROC; /* Processor device */ aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD; @@ -1900,7 +1898,8 @@ static void aac_srb_callback(void *context, struct fib * fibptr) scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; dev = (struct aac_dev *)scsicmd->device->host->hostdata; - BUG_ON(fibptr == NULL); + if (fibptr == NULL) + BUG(); srbreply = (struct aac_srb_reply *) fib_data(fibptr); @@ -1914,7 +1913,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) if(scsicmd->use_sg) pci_unmap_sg(dev->pdev, - (struct scatterlist *)scsicmd->request_buffer, + (struct scatterlist *)scsicmd->buffer, scsicmd->use_sg, scsicmd->sc_data_direction); else if(scsicmd->request_bufflen) @@ -2219,15 +2218,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg) } } else if(scsicmd->request_bufflen) { - u32 addr; - scsicmd->SCp.dma_handle = pci_map_single(dev->pdev, + dma_addr_t addr; + addr = pci_map_single(dev->pdev, scsicmd->request_buffer, scsicmd->request_bufflen, scsicmd->sc_data_direction); - addr = scsicmd->SCp.dma_handle; psg->count = cpu_to_le32(1); psg->sg[0].addr = cpu_to_le32(addr); psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); + scsicmd->SCp.dma_handle = addr; byte_count = scsicmd->request_bufflen; } return byte_count; @@ -2376,7 +2375,7 @@ static struct aac_srb_status_info srb_status_info[] = { { SRB_STATUS_SUCCESS, "Success"}, { SRB_STATUS_ABORTED, "Aborted Command"}, { SRB_STATUS_ABORT_FAILED, "Abort Failed"}, - { SRB_STATUS_ERROR, "Error Event"}, + { SRB_STATUS_ERROR, "Error Event"}, { SRB_STATUS_BUSY, "Device Busy"}, { SRB_STATUS_INVALID_REQUEST, "Invalid Request"}, { SRB_STATUS_INVALID_PATH_ID, "Invalid Path ID"}, @@ -2395,7 +2394,7 @@ static struct aac_srb_status_info srb_status_info[] = { { SRB_STATUS_BAD_SRB_BLOCK_LENGTH,"Bad Srb Block Length"}, { SRB_STATUS_REQUEST_FLUSHED, "Request Flushed"}, { SRB_STATUS_DELAYED_RETRY, "Delayed Retry"}, - { SRB_STATUS_INVALID_LUN, "Invalid LUN"}, + { SRB_STATUS_INVALID_LUN, "Invalid LUN"}, { SRB_STATUS_INVALID_TARGET_ID, "Invalid TARGET ID"}, { SRB_STATUS_BAD_FUNCTION, "Bad Function"}, { SRB_STATUS_ERROR_RECOVERY, "Error Recovery"}, @@ -2410,9 +2409,11 @@ char *aac_get_status_string(u32 status) { int i; - for (i = 0; i < ARRAY_SIZE(srb_status_info); i++) - if (srb_status_info[i].status == status) + for(i=0; i < (sizeof(srb_status_info)/sizeof(struct aac_srb_status_info)); i++ ){ + if(srb_status_info[i].status == status){ return srb_status_info[i].str; + } + } return "Bad Status Code"; } diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index d0eecd4be..f773b0dcf 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -12,7 +12,7 @@ #ifndef AAC_DRIVER_BUILD # define AAC_DRIVER_BUILD 2409 -# define AAC_DRIVER_BRANCH "-mh2" +# define AAC_DRIVER_BRANCH "-mh1" #endif #define MAXIMUM_NUM_CONTAINERS 32 @@ -563,6 +563,7 @@ struct aac_queue { spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */ struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */ /* only valid for command queues which receive entries from the adapter. */ + struct list_head pendingq; /* A queue of outstanding fib's to the adapter. */ u32 numpending; /* Number of entries on outstanding queue. */ struct aac_dev * dev; /* Back pointer to adapter structure */ }; @@ -821,6 +822,11 @@ struct fib { fib_callback callback; void *callback_data; u32 flags; // u32 dmb was ulong + /* + * The following is used to put this fib context onto the + * Outstanding I/O queue. + */ + struct list_head queue; /* * And for the internal issue/reply queues (we may be able * to merge these two) @@ -1809,5 +1815,3 @@ int aac_probe_container(struct aac_dev *dev, int cid); extern int numacb; extern int acbsize; extern char aac_driver_version[]; -extern int startup_timeout; -extern int aif_timeout; diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 255421de9..9f75144e5 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -535,7 +535,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) default: data_dir = DMA_NONE; } - if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) { + if (user_srbcmd->sg.count > (sizeof(sg_list)/sizeof(sg_list[0]))) { dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n", le32_to_cpu(srbcmd->sg.count))); rcode = -EINVAL; diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 1cd3584ba..19397453b 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -92,7 +92,28 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co init->AdapterFibsPhysicalAddress = cpu_to_le32((u32)phys); init->AdapterFibsSize = cpu_to_le32(fibsize); init->AdapterFibAlign = cpu_to_le32(sizeof(struct hw_fib)); - init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); + /* + * number of 4k pages of host physical memory. The aacraid fw needs + * this number to be less than 4gb worth of pages. num_physpages is in + * system page units. New firmware doesn't have any issues with the + * mapping system, but older Firmware did, and had *troubles* dealing + * with the math overloading past 32 bits, thus we must limit this + * field. + * + * This assumes the memory is mapped zero->n, which isnt + * always true on real computers. It also has some slight problems + * with the GART on x86-64. I've btw never tried DMA from PCI space + * on this platform but don't be suprised if its problematic. + */ +#ifndef CONFIG_GART_IOMMU + if ((num_physpages << (PAGE_SHIFT - 12)) <= AAC_MAX_HOSTPHYSMEMPAGES) { + init->HostPhysMemPages = + cpu_to_le32(num_physpages << (PAGE_SHIFT-12)); + } else +#endif + { + init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); + } init->InitFlags = 0; if (dev->new_comm_interface) { @@ -138,6 +159,7 @@ static void aac_queue_init(struct aac_dev * dev, struct aac_queue * q, u32 *mem, { q->numpending = 0; q->dev = dev; + INIT_LIST_HEAD(&q->pendingq); init_waitqueue_head(&q->cmdready); INIT_LIST_HEAD(&q->cmdq); init_waitqueue_head(&q->qfull); diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 3f27419c6..9f9f4aae2 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -229,7 +229,8 @@ void aac_fib_init(struct fib *fibptr) static void fib_dealloc(struct fib * fibptr) { struct hw_fib *hw_fib = fibptr->hw_fib; - BUG_ON(hw_fib->header.StructType != FIB_MAGIC); + if(hw_fib->header.StructType != FIB_MAGIC) + BUG(); hw_fib->header.XferState = 0; } @@ -471,6 +472,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, spin_lock_irqsave(q->lock, qflags); if (dev->new_comm_interface) { unsigned long count = 10000000L; /* 50 seconds */ + list_add_tail(&fibptr->queue, &q->pendingq); q->numpending++; spin_unlock_irqrestore(q->lock, qflags); while (aac_adapter_send(fibptr) != 0) { @@ -479,6 +481,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, spin_unlock_irqrestore(&fibptr->event_lock, flags); spin_lock_irqsave(q->lock, qflags); q->numpending--; + list_del(&fibptr->queue); spin_unlock_irqrestore(q->lock, qflags); return -ETIMEDOUT; } @@ -489,6 +492,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, unsigned long nointr = 0; aac_queue_get( dev, &index, AdapNormCmdQueue, hw_fib, 1, fibptr, &nointr); + list_add_tail(&fibptr->queue, &q->pendingq); q->numpending++; *(q->headers.producer) = cpu_to_le32(index + 1); spin_unlock_irqrestore(q->lock, qflags); @@ -516,6 +520,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, if (--count == 0) { spin_lock_irqsave(q->lock, qflags); q->numpending--; + list_del(&fibptr->queue); spin_unlock_irqrestore(q->lock, qflags); if (wait == -1) { printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n" @@ -529,7 +534,8 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, } } else down(&fibptr->event_wait); - BUG_ON(fibptr->done == 0); + if(fibptr->done == 0) + BUG(); if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ return -ETIMEDOUT; @@ -1208,7 +1214,7 @@ int aac_command_thread(void *data) * since the last read off * the queue? */ - if ((time_now - time_last) > aif_timeout) { + if ((time_now - time_last) > 120) { entry = entry->next; aac_close_fib_context(dev, fibctx); continue; diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index b2a5c7262..f6bcb9486 100644 --- a/drivers/scsi/aacraid/dpcsup.c +++ b/drivers/scsi/aacraid/dpcsup.c @@ -85,9 +85,10 @@ unsigned int aac_response_normal(struct aac_queue * q) * continue. The caller has already been notified that * the fib timed out. */ - if (!(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) + if (!(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) { + list_del(&fib->queue); dev->queues->queue[AdapNormCmdQueue].numpending--; - else { + } else { printk(KERN_WARNING "aacraid: FIB timeout (%x).\n", fib->flags); printk(KERN_DEBUG"aacraid: hwfib=%p fib index=%i fib=%p\n",hwfib, hwfib->header.SenderData,fib); continue; @@ -283,6 +284,7 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index) return 0; } + list_del(&fib->queue); dev->queues->queue[AdapNormCmdQueue].numpending--; if (fast) { diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index e42a479ce..6ef89c99d 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -119,7 +119,7 @@ static struct pci_device_id aac_pci_tbl[] = { { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */ { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ - { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ + { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5085AU (Hurricane) */ { 0x9005, 0x0285, 0x9005, 0x02a4, 0, 0, 30 }, /* ICP9085LI (Marauder-X) */ { 0x9005, 0x0285, 0x9005, 0x02a5, 0, 0, 31 }, /* ICP5085BR (Marauder-E) */ { 0x9005, 0x0286, 0x9005, 0x02a6, 0, 0, 32 }, /* ICP9067MA (Intruder-6) */ @@ -143,7 +143,7 @@ static struct pci_device_id aac_pci_tbl[] = { { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */ { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ - { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800SAS (Hurricane44) */ + { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-4810SAS (Hurricane */ { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ @@ -195,7 +195,7 @@ static struct aac_driver_ident aac_drivers[] = { { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */ { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ - { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ + { aac_rkt_init, "aacraid", "ICP ", "ICP5085AU ", 1 }, /* ICP5085AU (Hurricane) */ { aac_rx_init, "aacraid", "ICP ", "ICP9085LI ", 1 }, /* ICP9085LI (Marauder-X) */ { aac_rx_init, "aacraid", "ICP ", "ICP5085BR ", 1 }, /* ICP5085BR (Marauder-E) */ { aac_rkt_init, "aacraid", "ICP ", "ICP9067MA ", 1 }, /* ICP9067MA (Intruder-6) */ @@ -217,7 +217,7 @@ static struct aac_driver_ident aac_drivers[] = { { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ - { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800SAS ", 1 }, /* ASR-3800SAS (Hurricane44) */ + { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-4810SAS ", 1 }, /* ASR-4810SAS (Hurricane) */ { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ @@ -453,10 +453,15 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", AAC_DRIVERNAME); + + + spin_lock_irq(host->host_lock); + aac = (struct aac_dev *)host->hostdata; if (aac_adapter_check_health(aac)) { printk(KERN_ERR "%s: Host adapter appears dead\n", AAC_DRIVERNAME); + spin_unlock_irq(host->host_lock); return -ENODEV; } /* @@ -482,10 +487,13 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) /* * We can exit If all the commands are complete */ + spin_unlock_irq(host->host_lock); if (active == 0) return SUCCESS; ssleep(1); + spin_lock_irq(host->host_lock); } + spin_unlock_irq(host->host_lock); printk(KERN_ERR "%s: SCSI bus appears hung\n", AAC_DRIVERNAME); return -ETIMEDOUT; } @@ -564,7 +572,7 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long f = compat_alloc_user_space(sizeof(*f)); ret = 0; - if (clear_user(f, sizeof(*f))) + if (clear_user(f, sizeof(*f)) != sizeof(*f)) ret = -EFAULT; if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32))) ret = -EFAULT; diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c index 458ea897f..7a23e027e 100644 --- a/drivers/scsi/aacraid/rkt.c +++ b/drivers/scsi/aacraid/rkt.c @@ -444,16 +444,16 @@ int aac_rkt_init(struct aac_dev *dev) */ while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)) { - if(time_after(jiffies, start+startup_timeout*HZ)) + if(time_after(jiffies, start+180*HZ)) { status = rkt_readl(dev, MUnit.OMRx[0]); printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", dev->name, instance, status); goto error_iounmap; } - msleep(1); + schedule_timeout_uninterruptible(1); } - if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0) + if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) { printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); goto error_iounmap; diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 035018db6..729b9eb26 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -444,16 +444,16 @@ int aac_rx_init(struct aac_dev *dev) while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) || (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))) { - if(time_after(jiffies, start+startup_timeout*HZ)) + if(time_after(jiffies, start+180*HZ)) { status = rx_readl(dev, IndexRegs.Mailbox[7]); printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", dev->name, instance, status); goto error_iounmap; } - msleep(1); + schedule_timeout_uninterruptible(1); } - if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0) + if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) { printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); goto error_iounmap; diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index cd586cc8f..a53454908 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c @@ -66,11 +66,11 @@ static irqreturn_t aac_sa_intr(int irq, void *dev_id, struct pt_regs *regs) sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */ sa_writew(dev, DoorbellReg_s, PrintfDone); } else if (intstat & DOORBELL_1) { // dev -> Host Normal Command Ready - sa_writew(dev, DoorbellClrReg_p, DOORBELL_1); aac_command_normal(&dev->queues->queue[HostNormCmdQueue]); + sa_writew(dev, DoorbellClrReg_p, DOORBELL_1); } else if (intstat & DOORBELL_2) { // dev -> Host Normal Response Ready - sa_writew(dev, DoorbellClrReg_p, DOORBELL_2); aac_response_normal(&dev->queues->queue[HostNormRespQueue]); + sa_writew(dev, DoorbellClrReg_p, DOORBELL_2); } else if (intstat & DOORBELL_3) { // dev -> Host Normal Command Not Full sa_writew(dev, DoorbellClrReg_p, DOORBELL_3); } else if (intstat & DOORBELL_4) { // dev -> Host Normal Response Not Full @@ -318,16 +318,16 @@ int aac_sa_init(struct aac_dev *dev) * Wait for the adapter to be up and running. Wait up to 3 minutes. */ while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) { - if (time_after(jiffies, start+startup_timeout*HZ)) { + if (time_after(jiffies, start+180*HZ)) { status = sa_readl(dev, Mailbox7); printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n", name, instance, status); goto error_iounmap; } - msleep(1); + schedule_timeout_uninterruptible(1); } - if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev ) < 0) { + if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance); goto error_iounmap; } diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 773f02e3b..331c8c55d 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -371,7 +371,7 @@ 1.5 (8/8/96): 1. Add support for ABP-940U (PCI Ultra) adapter. - 2. Add support for IRQ sharing by setting the IRQF_SHARED flag for + 2. Add support for IRQ sharing by setting the SA_SHIRQ flag for request_irq and supplying a dev_id pointer to both request_irq() and free_irq(). 3. In AscSearchIOPortAddr11() restore a call to check_region() which @@ -504,9 +504,9 @@ 3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS access functions. 4. Update board serial number printing. - 5. Try allocating an IRQ both with and without the IRQF_DISABLED + 5. Try allocating an IRQ both with and without the SA_INTERRUPT flag set to allow IRQ sharing with drivers that do not set - the IRQF_DISABLED flag. Also display a more descriptive error + the SA_INTERRUPT flag. Also display a more descriptive error message if request_irq() fails. 6. Update to latest Asc and Adv Libraries. @@ -754,6 +754,7 @@ * --- Linux Include Files */ +#include #include #if defined(CONFIG_X86) && !defined(CONFIG_ISA) @@ -895,14 +896,6 @@ typedef unsigned char uchar; #define ASC_DVCLIB_CALL_FAILED (0) #define ASC_DVCLIB_CALL_ERROR (-1) -#define PCI_VENDOR_ID_ASP 0x10cd -#define PCI_DEVICE_ID_ASP_1200A 0x1100 -#define PCI_DEVICE_ID_ASP_ABP940 0x1200 -#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 -#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 -#define PCI_DEVICE_ID_38C0800_REV1 0x2500 -#define PCI_DEVICE_ID_38C1600_REV1 0x2700 - /* * Enable CC_VERY_LONG_SG_LIST to support up to 64K element SG lists. * The SRB structure will have to be changed and the ASC_SRB2SCSIQ() @@ -5191,19 +5184,19 @@ advansys_detect(struct scsi_host_template *tpnt) /* Register IRQ Number. */ ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); /* - * If request_irq() fails with the IRQF_DISABLED flag set, - * then try again without the IRQF_DISABLED flag set. This + * If request_irq() fails with the SA_INTERRUPT flag set, + * then try again without the SA_INTERRUPT flag set. This * allows IRQ sharing to work even with other drivers that - * do not set the IRQF_DISABLED flag. + * do not set the SA_INTERRUPT flag. * - * If IRQF_DISABLED is not set, then interrupts are enabled + * If SA_INTERRUPT is not set, then interrupts are enabled * before the driver interrupt function is called. */ if (((ret = request_irq(shp->irq, advansys_interrupt, - IRQF_DISABLED | (share_irq == TRUE ? IRQF_SHARED : 0), + SA_INTERRUPT | (share_irq == TRUE ? SA_SHIRQ : 0), "advansys", boardp)) != 0) && ((ret = request_irq(shp->irq, advansys_interrupt, - (share_irq == TRUE ? IRQF_SHARED : 0), + (share_irq == TRUE ? SA_SHIRQ : 0), "advansys", boardp)) != 0)) { if (ret == -EBUSY) { @@ -12362,7 +12355,7 @@ AscInitFromEEP(ASC_DVC_VAR *asc_dvc) ASC_PRINT1( "AscInitFromEEP: Failed to re-write EEPROM with %d errors.\n", i); } else { - ASC_PRINT("AscInitFromEEP: Successfully re-wrote EEPROM.\n"); + ASC_PRINT("AscInitFromEEP: Succesfully re-wrote EEPROM."); } } return (warn_code); @@ -17304,7 +17297,7 @@ AdvWaitEEPCmd(AdvPortAddr iop_base) /* * Write the EEPROM from 'cfg_buf'. */ -void __init +void AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) { ushort *wbuf; @@ -17371,7 +17364,7 @@ AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf) /* * Write the EEPROM from 'cfg_buf'. */ -void __init +void AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf) { @@ -17439,7 +17432,7 @@ AdvSet38C0800EEPConfig(AdvPortAddr iop_base, /* * Write the EEPROM from 'cfg_buf'. */ -void __init +void AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf) { diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index f974869ea..de80cdfb5 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -551,11 +551,6 @@ struct aha152x_hostdata { struct aha152x_scdata { Scsi_Cmnd *next; /* next sc in queue */ struct semaphore *sem; /* semaphore to block on */ - unsigned char cmd_len; - unsigned char cmnd[MAX_COMMAND_SIZE]; - unsigned short use_sg; - unsigned request_bufflen; - void *request_buffer; }; @@ -860,7 +855,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup) SETPORT(SIMODE0, 0); SETPORT(SIMODE1, 0); - if( request_irq(shpnt->irq, swintr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) { + if( request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { printk(KERN_ERR "aha152x%d: irq %d busy.\n", shpnt->host_no, shpnt->irq); goto out_host_put; } @@ -894,7 +889,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup) SETPORT(SSTAT0, 0x7f); SETPORT(SSTAT1, 0xef); - if ( request_irq(shpnt->irq, intr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) { + if ( request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { printk(KERN_ERR "aha152x%d: failed to reassign irq %d.\n", shpnt->host_no, shpnt->irq); goto out_host_put; } @@ -1011,20 +1006,11 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p return FAILED; } } else { - struct aha152x_scdata *sc; - 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; } - - sc = SCDATA(SCpnt); - memcpy(sc->cmnd, SCpnt->cmnd, sizeof(sc->cmnd)); - sc->request_buffer = SCpnt->request_buffer; - sc->request_bufflen = SCpnt->request_bufflen; - sc->use_sg = SCpnt->use_sg; - sc->cmd_len = SCpnt->cmd_len; } SCNEXT(SCpnt) = NULL; @@ -1179,10 +1165,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt) DECLARE_MUTEX_LOCKED(sem); struct timer_list timer; int ret, issued, disconnected; - unsigned char old_cmd_len = SCpnt->cmd_len; - unsigned short old_use_sg = SCpnt->use_sg; - void *old_buffer = SCpnt->request_buffer; - unsigned old_bufflen = SCpnt->request_bufflen; unsigned long flags; #if defined(AHA152X_DEBUG) @@ -1216,11 +1198,11 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt) add_timer(&timer); down(&sem); del_timer(&timer); - - SCpnt->cmd_len = old_cmd_len; - SCpnt->use_sg = old_use_sg; - SCpnt->request_buffer = old_buffer; - SCpnt->request_bufflen = old_bufflen; + + SCpnt->cmd_len = SCpnt->old_cmd_len; + SCpnt->use_sg = SCpnt->old_use_sg; + SCpnt->request_buffer = SCpnt->buffer; + SCpnt->request_bufflen = SCpnt->bufflen; DO_LOCK(flags); @@ -1583,9 +1565,6 @@ static void busfree_run(struct Scsi_Host *shpnt) #endif if(DONE_SC->SCp.phase & check_condition) { - struct scsi_cmnd *cmd = HOSTDATA(shpnt)->done_SC; - struct aha152x_scdata *sc = SCDATA(cmd); - #if 0 if(HOSTDATA(shpnt)->debug & debug_eh) { printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC)); @@ -1594,13 +1573,13 @@ static void busfree_run(struct Scsi_Host *shpnt) #endif /* restore old command */ - memcpy(cmd->cmnd, sc->cmnd, sizeof(sc->cmnd)); - cmd->request_buffer = sc->request_buffer; - cmd->request_bufflen = sc->request_bufflen; - cmd->use_sg = sc->use_sg; - cmd->cmd_len = sc->cmd_len; + 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; - cmd->SCp.Status = 0x02; + DONE_SC->SCp.Status = 0x02; HOSTDATA(shpnt)->commands--; if (!HOSTDATA(shpnt)->commands) diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 24f0f5461..51bad7a1e 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c @@ -25,6 +25,7 @@ * Added proper detection of the AHA-1640 (MCA version of AHA-1540) */ +#include #include #include #include @@ -1010,7 +1011,7 @@ static int __init do_setup(char *str) int count=setup_idx; - get_options(str, ARRAY_SIZE(ints), ints); + get_options(str, sizeof(ints)/sizeof(int), ints); aha1542_setup(str,ints); return count #include #include +#include #include #include #define DRV_NAME "ahci" -#define DRV_VERSION "2.0" +#define DRV_VERSION "1.2" enum { @@ -56,15 +57,12 @@ enum { AHCI_MAX_SG = 168, /* hardware max is 64K */ AHCI_DMA_BOUNDARY = 0xffffffff, AHCI_USE_CLUSTERING = 0, - AHCI_MAX_CMDS = 32, - AHCI_CMD_SZ = 32, - AHCI_CMD_SLOT_SZ = AHCI_MAX_CMDS * AHCI_CMD_SZ, + AHCI_CMD_SLOT_SZ = 32 * 32, AHCI_RX_FIS_SZ = 256, + AHCI_CMD_TBL_HDR = 0x80, AHCI_CMD_TBL_CDB = 0x40, - AHCI_CMD_TBL_HDR_SZ = 0x80, - AHCI_CMD_TBL_SZ = AHCI_CMD_TBL_HDR_SZ + (AHCI_MAX_SG * 16), - AHCI_CMD_TBL_AR_SZ = AHCI_CMD_TBL_SZ * AHCI_MAX_CMDS, - AHCI_PORT_PRIV_DMA_SZ = AHCI_CMD_SLOT_SZ + AHCI_CMD_TBL_AR_SZ + + AHCI_CMD_TBL_SZ = AHCI_CMD_TBL_HDR + (AHCI_MAX_SG * 16), + AHCI_PORT_PRIV_DMA_SZ = AHCI_CMD_SLOT_SZ + AHCI_CMD_TBL_SZ + AHCI_RX_FIS_SZ, AHCI_IRQ_ON_SG = (1 << 31), AHCI_CMD_ATAPI = (1 << 5), @@ -74,10 +72,8 @@ enum { AHCI_CMD_CLR_BUSY = (1 << 10), RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */ - RX_FIS_UNK = 0x60, /* offset of Unknown FIS data */ board_ahci = 0, - board_ahci_vt8251 = 1, /* global controller registers */ HOST_CAP = 0x00, /* host capabilities */ @@ -92,11 +88,10 @@ enum { HOST_AHCI_EN = (1 << 31), /* AHCI enabled */ /* HOST_CAP bits */ - HOST_CAP_SSC = (1 << 14), /* Slumber capable */ - HOST_CAP_CLO = (1 << 24), /* Command List Override support */ - HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */ - HOST_CAP_NCQ = (1 << 30), /* Native Command Queueing */ HOST_CAP_64 = (1 << 31), /* PCI DAC (64-bit DMA) support */ + HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */ + HOST_CAP_CLO = (1 << 24), /* Command List Override support */ + HOST_CAP_SSC = (1 << 14), /* Slumber capable */ /* registers for each SATA port */ PORT_LST_ADDR = 0x00, /* command list DMA addr */ @@ -135,20 +130,19 @@ enum { PORT_IRQ_PIOS_FIS = (1 << 1), /* PIO Setup FIS rx'd */ PORT_IRQ_D2H_REG_FIS = (1 << 0), /* D2H Register FIS rx'd */ - PORT_IRQ_FREEZE = PORT_IRQ_HBUS_ERR | - PORT_IRQ_IF_ERR | - PORT_IRQ_CONNECT | - PORT_IRQ_PHYRDY | - PORT_IRQ_UNK_FIS, - PORT_IRQ_ERROR = PORT_IRQ_FREEZE | - PORT_IRQ_TF_ERR | - PORT_IRQ_HBUS_DATA_ERR, - DEF_PORT_IRQ = PORT_IRQ_ERROR | PORT_IRQ_SG_DONE | - PORT_IRQ_SDB_FIS | PORT_IRQ_DMAS_FIS | - PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS, + PORT_IRQ_FATAL = PORT_IRQ_TF_ERR | + PORT_IRQ_HBUS_ERR | + PORT_IRQ_HBUS_DATA_ERR | + PORT_IRQ_IF_ERR, + DEF_PORT_IRQ = PORT_IRQ_FATAL | PORT_IRQ_PHYRDY | + PORT_IRQ_CONNECT | PORT_IRQ_SG_DONE | + PORT_IRQ_UNK_FIS | PORT_IRQ_SDB_FIS | + PORT_IRQ_DMAS_FIS | PORT_IRQ_PIOS_FIS | + PORT_IRQ_D2H_REG_FIS, /* PORT_CMD bits */ PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */ + PORT_CMD_CPD = (1 << 20), /* Cold presence detection */ PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */ PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */ PORT_CMD_FIS_RX = (1 << 4), /* Enable FIS receive DMA engine */ @@ -164,10 +158,6 @@ enum { /* hpriv->flags bits */ AHCI_FLAG_MSI = (1 << 0), - - /* ap->flags bits */ - AHCI_FLAG_RESET_NEEDS_CLO = (1 << 24), - AHCI_FLAG_NO_NCQ = (1 << 25), }; struct ahci_cmd_hdr { @@ -189,6 +179,7 @@ struct ahci_host_priv { unsigned long flags; u32 cap; /* cache of HOST_CAP register */ u32 port_map; /* cache of HOST_PORTS_IMPL reg */ + u32 dev_map; /* connected devices */ }; struct ahci_port_priv { @@ -196,6 +187,7 @@ struct ahci_port_priv { dma_addr_t cmd_slot_dma; void *cmd_tbl; dma_addr_t cmd_tbl_dma; + struct ahci_sg *cmd_tbl_sg; void *rx_fis; dma_addr_t rx_fis_dma; }; @@ -205,19 +197,29 @@ static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *regs); +static int ahci_start_engine(void __iomem *port_mmio); +static int ahci_stop_engine(void __iomem *port_mmio); +static int ahci_stop_fis_rx(void __iomem *port_mmio); +static void ahci_start_fis_rx(void __iomem *port_mmio, + struct ahci_port_priv *pp, + struct ahci_host_priv *hpriv); +static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes); static void ahci_irq_clear(struct ata_port *ap); +static void ahci_eng_timeout(struct ata_port *ap); static int ahci_port_start(struct ata_port *ap); static void ahci_port_stop(struct ata_port *ap); +static int ahci_port_suspend(struct ata_port *ap, pm_message_t state); +static int ahci_port_resume(struct ata_port *ap); +static int ahci_port_standby(void __iomem *port_mmio, u32 cap); +static int ahci_port_spinup(void __iomem *port_mmio, u32 cap); +static void ahci_port_disable(struct ata_port *ap); static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); static void ahci_qc_prep(struct ata_queued_cmd *qc); static u8 ahci_check_status(struct ata_port *ap); -static void ahci_freeze(struct ata_port *ap); -static void ahci_thaw(struct ata_port *ap); -static void ahci_error_handler(struct ata_port *ap); -static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); -static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg); -static int ahci_port_resume(struct ata_port *ap); -static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); +static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); +static int ahci_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state); +static int ahci_scsi_device_resume(struct scsi_device *sdev); +static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); static int ahci_pci_device_resume(struct pci_dev *pdev); static void ahci_remove_one (struct pci_dev *pdev); @@ -226,8 +228,7 @@ static struct scsi_host_template ahci_sht = { .name = DRV_NAME, .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, - .change_queue_depth = ata_scsi_change_queue_depth, - .can_queue = AHCI_MAX_CMDS - 1, + .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = AHCI_MAX_SG, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, @@ -236,14 +237,13 @@ static struct scsi_host_template ahci_sht = { .proc_name = DRV_NAME, .dma_boundary = AHCI_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, - .suspend = ata_scsi_device_suspend, - .resume = ata_scsi_device_resume, + .resume = ahci_scsi_device_resume, + .suspend = ahci_scsi_device_suspend, }; static const struct ata_port_operations ahci_ops = { - .port_disable = ata_port_disable, + .port_disable = ahci_port_disable, .check_status = ahci_check_status, .check_altstatus = ahci_check_status, @@ -251,24 +251,19 @@ static const struct ata_port_operations ahci_ops = { .tf_read = ahci_tf_read, + .probe_reset = ahci_probe_reset, + .qc_prep = ahci_qc_prep, .qc_issue = ahci_qc_issue, + .eng_timeout = ahci_eng_timeout, + .irq_handler = ahci_interrupt, .irq_clear = ahci_irq_clear, .scr_read = ahci_scr_read, .scr_write = ahci_scr_write, - .freeze = ahci_freeze, - .thaw = ahci_thaw, - - .error_handler = ahci_error_handler, - .post_internal_cmd = ahci_post_internal_cmd, - - .port_suspend = ahci_port_suspend, - .port_resume = ahci_port_resume, - .port_start = ahci_port_start, .port_stop = ahci_port_stop, }; @@ -278,19 +273,7 @@ static const struct ata_port_info ahci_port_info[] = { { .sht = &ahci_sht, .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY, - .pio_mask = 0x1f, /* pio0-4 */ - .udma_mask = 0x7f, /* udma0-6 ; FIXME */ - .port_ops = &ahci_ops, - }, - /* board_ahci_vt8251 */ - { - .sht = &ahci_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY | - AHCI_FLAG_RESET_NEEDS_CLO | AHCI_FLAG_NO_NCQ, + ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ .port_ops = &ahci_ops, @@ -298,7 +281,6 @@ static const struct ata_port_info ahci_port_info[] = { }; static const struct pci_device_id ahci_pci_tbl[] = { - /* Intel */ { PCI_VENDOR_ID_INTEL, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ICH6 */ { PCI_VENDOR_ID_INTEL, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, @@ -329,39 +311,14 @@ static const struct pci_device_id ahci_pci_tbl[] = { board_ahci }, /* ICH8M */ { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ICH8M */ - - /* JMicron */ { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* JMicron JMB360 */ - { 0x197b, 0x2361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* JMicron JMB361 */ { 0x197b, 0x2363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* JMicron JMB363 */ - { 0x197b, 0x2365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* JMicron JMB365 */ - { 0x197b, 0x2366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* JMicron JMB366 */ - - /* ATI */ { PCI_VENDOR_ID_ATI, 0x4380, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ATI SB600 non-raid */ { PCI_VENDOR_ID_ATI, 0x4381, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ATI SB600 raid */ - - /* VIA */ - { PCI_VENDOR_ID_VIA, 0x3349, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci_vt8251 }, /* VIA VT8251 */ - - /* NVIDIA */ - { PCI_VENDOR_ID_NVIDIA, 0x044c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* MCP65 */ - { PCI_VENDOR_ID_NVIDIA, 0x044d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* MCP65 */ - { PCI_VENDOR_ID_NVIDIA, 0x044e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* MCP65 */ - { PCI_VENDOR_ID_NVIDIA, 0x044f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, - board_ahci }, /* MCP65 */ - { } /* terminate list */ }; @@ -370,9 +327,9 @@ static struct pci_driver ahci_pci_driver = { .name = DRV_NAME, .id_table = ahci_pci_tbl, .probe = ahci_init_one, + .remove = ahci_remove_one, .suspend = ahci_pci_device_suspend, .resume = ahci_pci_device_resume, - .remove = ahci_remove_one, }; @@ -386,6 +343,201 @@ static inline void __iomem *ahci_port_base (void __iomem *base, unsigned int por return (void __iomem *) ahci_port_base_ul((unsigned long)base, port); } +static int ahci_port_start(struct ata_port *ap) +{ + struct device *dev = ap->host_set->dev; + struct ahci_host_priv *hpriv = ap->host_set->private_data; + struct ahci_port_priv *pp; + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + void *mem; + dma_addr_t mem_dma; + int rc; + + pp = kmalloc(sizeof(*pp), GFP_KERNEL); + if (!pp) + return -ENOMEM; + memset(pp, 0, sizeof(*pp)); + + rc = ata_pad_alloc(ap, dev); + if (rc) { + kfree(pp); + return rc; + } + + mem = dma_alloc_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, &mem_dma, GFP_KERNEL); + if (!mem) { + ata_pad_free(ap, dev); + kfree(pp); + return -ENOMEM; + } + memset(mem, 0, AHCI_PORT_PRIV_DMA_SZ); + + /* + * First item in chunk of DMA memory: 32-slot command table, + * 32 bytes each in size + */ + pp->cmd_slot = mem; + pp->cmd_slot_dma = mem_dma; + + mem += AHCI_CMD_SLOT_SZ; + mem_dma += AHCI_CMD_SLOT_SZ; + + /* + * Second item: Received-FIS area + */ + pp->rx_fis = mem; + pp->rx_fis_dma = mem_dma; + + mem += AHCI_RX_FIS_SZ; + mem_dma += AHCI_RX_FIS_SZ; + + /* + * Third item: data area for storing a single command + * and its scatter-gather table + */ + pp->cmd_tbl = mem; + pp->cmd_tbl_dma = mem_dma; + + pp->cmd_tbl_sg = mem + AHCI_CMD_TBL_HDR; + + ap->private_data = pp; + + /* + * Driver is setup; initialize the HBA + */ + ahci_start_fis_rx(port_mmio, pp, hpriv); + rc = ahci_port_spinup(port_mmio, hpriv->cap); + if (rc) + printk(KERN_WARNING "ata%d: could not spinup device (%d)\n", + ap->id, rc); + + /* + * Do not enable DMA here; according to the spec + * (section 10.1.1) we should first enable FIS reception, + * then check if the port is enabled before we try to + * switch on DMA. + * And as the port check is done during probe + * we really shouldn't be doing it here. + */ + return 0; +} + + +static void ahci_port_stop(struct ata_port *ap) +{ + struct device *dev = ap->host_set->dev; + struct ahci_port_priv *pp = ap->private_data; + + ahci_port_suspend(ap, PMSG_SUSPEND); + + ap->private_data = NULL; + dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, + pp->cmd_slot, pp->cmd_slot_dma); + ata_pad_free(ap, dev); + kfree(pp); +} + +static int ahci_port_suspend(struct ata_port *ap, pm_message_t state) +{ + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + struct ahci_host_priv *hpriv = ap->host_set->private_data; + int rc; + + /* + * Disable DMA + */ + rc = ahci_stop_engine(port_mmio); + if (rc) { + printk(KERN_WARNING "ata%u: DMA engine busy\n", ap->id); + return rc; + } + + /* + * Disable FIS reception + */ + rc = ahci_stop_fis_rx(port_mmio); + if (rc) + printk(KERN_WARNING "ata%d: FIS RX still running (rc %d)\n", + ap->id, rc); + + /* + * Put device into slumber mode + */ + if (!rc && state.event != PM_EVENT_FREEZE) + ahci_port_standby(port_mmio, hpriv->cap); + + return rc; +} + +static int ahci_port_resume(struct ata_port *ap) +{ + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + struct ahci_host_priv *hpriv = ap->host_set->private_data; + struct ahci_port_priv *pp = ap->private_data; + int rc; + u32 tmp; + + /* + * Enable FIS reception + */ + ahci_start_fis_rx(port_mmio, pp, hpriv); + + rc = ahci_port_spinup(port_mmio, hpriv->cap); + if (rc) + printk(KERN_WARNING "ata%d: could not spinup device (%d)\n", + ap->id, rc); + + /* + * Clear error status + */ + tmp = readl(port_mmio + PORT_SCR_ERR); + writel(tmp, port_mmio + PORT_SCR_ERR); + /* + * Clear interrupt status + */ + tmp = readl(mmio + HOST_CTL); + if (!(tmp & HOST_IRQ_EN)) { + u32 irq_stat; + + /* ack any pending irq events for this port */ + irq_stat = readl(port_mmio + PORT_IRQ_STAT); + if (irq_stat) + writel(irq_stat, port_mmio + PORT_IRQ_STAT); + + /* set irq mask (enables interrupts) */ + writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); + + if ((hpriv->dev_map >> (ap->port_no + 1)) == 0) { + /* + * Enable interrupts if this was the last port + */ + printk(KERN_WARNING "ata%d: enabling interrupts\n", + ap->id); + + irq_stat = readl(mmio + HOST_IRQ_STAT); + if (irq_stat) + writel(irq_stat, mmio + HOST_IRQ_STAT); + + tmp |= HOST_IRQ_EN; + writel(tmp, mmio + HOST_CTL); + (void) readl(mmio + HOST_CTL); + } + } + + /* + * Enable DMA + */ + rc = ahci_start_engine(port_mmio); + if (rc) + printk(KERN_WARNING "ata%d: cannot start DMA engine (rc %d)\n", + ap->id, rc); + + return rc; +} + static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in) { unsigned int sc_reg; @@ -420,255 +572,261 @@ static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg_in, writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); } -static void ahci_start_engine(void __iomem *port_mmio) -{ - u32 tmp; - - /* start DMA */ - tmp = readl(port_mmio + PORT_CMD); - tmp |= PORT_CMD_START; - writel(tmp, port_mmio + PORT_CMD); - readl(port_mmio + PORT_CMD); /* flush */ -} - static int ahci_stop_engine(void __iomem *port_mmio) { + int work; u32 tmp; tmp = readl(port_mmio + PORT_CMD); - - /* check if the HBA is idle */ + /* Check if the HBA is idle */ if ((tmp & (PORT_CMD_START | PORT_CMD_LIST_ON)) == 0) return 0; - /* setting HBA to idle */ + /* Setting HBA to idle */ tmp &= ~PORT_CMD_START; writel(tmp, port_mmio + PORT_CMD); - /* wait for engine to stop. This could be as long as 500 msec */ - tmp = ata_wait_register(port_mmio + PORT_CMD, - PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500); - if (tmp & PORT_CMD_LIST_ON) - return -EIO; + /* + * wait for engine to become idle + */ + work = 1000; + while (work-- > 0) { + tmp = readl(port_mmio + PORT_CMD); + if ((tmp & PORT_CMD_LIST_ON) == 0) + return 0; + udelay(10); + } - return 0; + return -EIO; } -static void ahci_start_fis_rx(void __iomem *port_mmio, u32 cap, - dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma) +static int ahci_start_engine(void __iomem *port_mmio) { u32 tmp; + int work = 1000; - /* set FIS registers */ - if (cap & HOST_CAP_64) - writel((cmd_slot_dma >> 16) >> 16, port_mmio + PORT_LST_ADDR_HI); - writel(cmd_slot_dma & 0xffffffff, port_mmio + PORT_LST_ADDR); + /* + * Get current status + */ + tmp = readl(port_mmio + PORT_CMD); - if (cap & HOST_CAP_64) - writel((rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI); - writel(rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR); + /* + * AHCI rev 1.1 section 10.3.1: + * Software shall not set PxCMD.ST to '1' until it verifies + * that PxCMD.CR is '0' and has set PxCMD.FRE to '1' + */ + if ((tmp & PORT_CMD_FIS_RX) == 0) + return -EPERM; - /* enable FIS reception */ - tmp = readl(port_mmio + PORT_CMD); - tmp |= PORT_CMD_FIS_RX; + /* + * wait for engine to become idle. + */ + while (work-- > 0) { + tmp = readl(port_mmio + PORT_CMD); + if ((tmp & PORT_CMD_LIST_ON) == 0) + break; + udelay(10); + } + + if (!work) { + /* + * We need to do a port reset / HBA reset here + */ + return -EBUSY; + } + + /* + * Start DMA + */ + tmp |= PORT_CMD_START; writel(tmp, port_mmio + PORT_CMD); + readl(port_mmio + PORT_CMD); /* flush */ - /* flush */ - readl(port_mmio + PORT_CMD); + return 0; } static int ahci_stop_fis_rx(void __iomem *port_mmio) { u32 tmp; + int work = 1000; - /* disable FIS reception */ + /* + * Get current status + */ tmp = readl(port_mmio + PORT_CMD); - tmp &= ~PORT_CMD_FIS_RX; + + /* Check if FIS RX is already disabled */ + if ((tmp & PORT_CMD_FIS_RX) == 0) + return 0; + + /* + * AHCI Rev 1.1 section 10.3.2 + * Software shall not clear PxCMD.FRE while + * PxCMD.ST or PxCMD.CR is set to '1' + */ + if (tmp & (PORT_CMD_LIST_ON | PORT_CMD_START)) { + return -EPERM; + } + + /* + * Disable FIS reception + * + * AHCI Rev 1.1 Section 10.1.2: + * If PxCMD.FRE is set to '1', software should clear it + * to '0' and wait at least 500 milliseconds for PxCMD.FR + * to return '0' when read. If PxCMD.FR does not clear + * '0' correctly, then software may attempt a port reset + * of a full HBA reset to recover. + */ + tmp &= ~(PORT_CMD_FIS_RX); writel(tmp, port_mmio + PORT_CMD); - /* wait for completion, spec says 500ms, give it 1000 */ - tmp = ata_wait_register(port_mmio + PORT_CMD, PORT_CMD_FIS_ON, - PORT_CMD_FIS_ON, 10, 1000); - if (tmp & PORT_CMD_FIS_ON) - return -EBUSY; + mdelay(500); + work = 1000; + while (work-- > 0) { + tmp = readl(port_mmio + PORT_CMD); + if ((tmp & PORT_CMD_FIS_ON) == 0) + return 0; + udelay(10); + } - return 0; + return -EBUSY; } -static void ahci_power_up(void __iomem *port_mmio, u32 cap) +static void ahci_start_fis_rx(void __iomem *port_mmio, + struct ahci_port_priv *pp, + struct ahci_host_priv *hpriv) { - u32 cmd; + u32 tmp; - cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK; + /* + * Set FIS registers + */ + if (hpriv->cap & HOST_CAP_64) + writel((pp->cmd_slot_dma >> 16) >> 16, port_mmio + PORT_LST_ADDR_HI); + writel(pp->cmd_slot_dma & 0xffffffff, port_mmio + PORT_LST_ADDR); + readl(port_mmio + PORT_LST_ADDR); /* flush */ - /* spin up device */ - if (cap & HOST_CAP_SSS) { - cmd |= PORT_CMD_SPIN_UP; - writel(cmd, port_mmio + PORT_CMD); - } + if (hpriv->cap & HOST_CAP_64) + writel((pp->rx_fis_dma >> 16) >> 16, port_mmio + PORT_FIS_ADDR_HI); + writel(pp->rx_fis_dma & 0xffffffff, port_mmio + PORT_FIS_ADDR); + readl(port_mmio + PORT_FIS_ADDR); /* flush */ - /* wake up link */ - writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD); + /* + * Enable FIS reception + */ + tmp = readl(port_mmio + PORT_CMD); + tmp |= PORT_CMD_FIS_RX; + writel(tmp, port_mmio + PORT_CMD); + readl(port_mmio + PORT_CMD); /* flush */ } -static void ahci_power_down(void __iomem *port_mmio, u32 cap) +static int ahci_port_standby(void __iomem *port_mmio, u32 cap) { - u32 cmd, scontrol; + u32 tmp, scontrol, sstatus; - cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK; + tmp = readl(port_mmio + PORT_CMD); + /* + * AHCI Rev1.1 Section 5.3.2.3: + * Software is only allowed to program the PxCMD.FRE, + * PxCMD.POD, PxSCTL.DET, and PxCMD.SUD register bits + * when PxCMD.ST is set to '0' + */ + if (tmp & PORT_CMD_START) + return -EBUSY; if (cap & HOST_CAP_SSC) { - /* enable transitions to slumber mode */ + /* + * Enable transitions to slumber mode + */ scontrol = readl(port_mmio + PORT_SCR_CTL); if ((scontrol & 0x0f00) > 0x100) { scontrol &= ~0xf00; writel(scontrol, port_mmio + PORT_SCR_CTL); } - - /* put device into slumber mode */ - writel(cmd | PORT_CMD_ICC_SLUMBER, port_mmio + PORT_CMD); - - /* wait for the transition to complete */ - ata_wait_register(port_mmio + PORT_CMD, PORT_CMD_ICC_SLUMBER, - PORT_CMD_ICC_SLUMBER, 1, 50); - } - - /* put device into listen mode */ - if (cap & HOST_CAP_SSS) { - /* first set PxSCTL.DET to 0 */ - scontrol = readl(port_mmio + PORT_SCR_CTL); - scontrol &= ~0xf; - writel(scontrol, port_mmio + PORT_SCR_CTL); - - /* then set PxCMD.SUD to 0 */ - cmd &= ~PORT_CMD_SPIN_UP; - writel(cmd, port_mmio + PORT_CMD); + /* + * Put device into slumber mode + */ + tmp |= PORT_CMD_ICC_SLUMBER; + writel(tmp, port_mmio + PORT_CMD); + tmp = readl(port_mmio + PORT_CMD); + + /* + * Actually, we should wait for the device to + * enter slumber mode by checking + * sstatus & 0xf00 == 6 + */ + sstatus = readl(port_mmio + PORT_SCR_STAT); } -} - -static void ahci_init_port(void __iomem *port_mmio, u32 cap, - dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma) -{ - /* power up */ - ahci_power_up(port_mmio, cap); - - /* enable FIS reception */ - ahci_start_fis_rx(port_mmio, cap, cmd_slot_dma, rx_fis_dma); - - /* enable DMA */ - ahci_start_engine(port_mmio); -} - -static int ahci_deinit_port(void __iomem *port_mmio, u32 cap, const char **emsg) -{ - int rc; - /* disable DMA */ - rc = ahci_stop_engine(port_mmio); - if (rc) { - *emsg = "failed to stop engine"; - return rc; - } + /* + * Put device into listen mode + */ + scontrol = readl(port_mmio + PORT_SCR_CTL); + scontrol &= ~0xf; + writel(scontrol, port_mmio + PORT_SCR_CTL); - /* disable FIS reception */ - rc = ahci_stop_fis_rx(port_mmio); - if (rc) { - *emsg = "failed stop FIS RX"; - return rc; + tmp = readl(port_mmio + PORT_CMD); + if (cap & HOST_CAP_SSS) { + /* + * Spin down the device for staggered spin-up support + */ + tmp &= ~PORT_CMD_SPIN_UP; + writel(tmp, port_mmio + PORT_CMD); + readl(port_mmio + PORT_CMD); /* flush */ } - /* put device into slumber mode */ - ahci_power_down(port_mmio, cap); - return 0; } -static int ahci_reset_controller(void __iomem *mmio, struct pci_dev *pdev) +static int ahci_port_spinup(void __iomem *port_mmio, u32 cap) { - u32 cap_save, tmp; + u32 tmp; - cap_save = readl(mmio + HOST_CAP); - cap_save &= ( (1<<28) | (1<<17) ); - cap_save |= (1 << 27); + tmp = readl(port_mmio + PORT_CMD); + /* + * AHCI Rev1.1 Section 5.3.2.3: + * Software is only allowed to program the PxCMD.FRE, + * PxCMD.POD, PxSCTL.DET, and PxCMD.SUD register bits + * when PxCMD.ST is set to '0' + */ + if (tmp & PORT_CMD_START) + return -EBUSY; - /* global controller reset */ - tmp = readl(mmio + HOST_CTL); - if ((tmp & HOST_RESET) == 0) { - writel(tmp | HOST_RESET, mmio + HOST_CTL); - readl(mmio + HOST_CTL); /* flush */ + /* + * Power on device if supported + */ + if (tmp & PORT_CMD_CPD) { + tmp |= PORT_CMD_POWER_ON; + writel(tmp, port_mmio + PORT_CMD); + tmp = readl(port_mmio + PORT_CMD); } - /* reset must complete within 1 second, or - * the hardware should be considered fried. + /* + * Spin up device */ - ssleep(1); - - tmp = readl(mmio + HOST_CTL); - if (tmp & HOST_RESET) { - dev_printk(KERN_ERR, &pdev->dev, - "controller reset failed (0x%x)\n", tmp); - return -EIO; + if (cap & HOST_CAP_SSS) { + tmp |= PORT_CMD_SPIN_UP; + writel(tmp, port_mmio + PORT_CMD); + tmp = readl(port_mmio + PORT_CMD); } - writel(HOST_AHCI_EN, mmio + HOST_CTL); - (void) readl(mmio + HOST_CTL); /* flush */ - writel(cap_save, mmio + HOST_CAP); - writel(0xf, mmio + HOST_PORTS_IMPL); - (void) readl(mmio + HOST_PORTS_IMPL); /* flush */ - - if (pdev->vendor == PCI_VENDOR_ID_INTEL) { - u16 tmp16; - - /* configure PCS */ - pci_read_config_word(pdev, 0x92, &tmp16); - tmp16 |= 0xf; - pci_write_config_word(pdev, 0x92, tmp16); + if ((tmp & PORT_CMD_ICC_MASK) != PORT_CMD_ICC_ACTIVE) { + tmp |= PORT_CMD_ICC_ACTIVE; + writel(tmp, port_mmio + PORT_CMD); + tmp = readl(port_mmio + PORT_CMD); } return 0; } -static void ahci_init_controller(void __iomem *mmio, struct pci_dev *pdev, - int n_ports, u32 cap) +static void ahci_port_disable(struct ata_port *ap) { - int i, rc; - u32 tmp; - - for (i = 0; i < n_ports; i++) { - void __iomem *port_mmio = ahci_port_base(mmio, i); - const char *emsg = NULL; - -#if 0 /* BIOSen initialize this incorrectly */ - if (!(hpriv->port_map & (1 << i))) - continue; -#endif - - /* make sure port is not active */ - rc = ahci_deinit_port(port_mmio, cap, &emsg); - if (rc) - dev_printk(KERN_WARNING, &pdev->dev, - "%s (%d)\n", emsg, rc); - - /* clear SError */ - tmp = readl(port_mmio + PORT_SCR_ERR); - VPRINTK("PORT_SCR_ERR 0x%x\n", tmp); - writel(tmp, port_mmio + PORT_SCR_ERR); + struct ahci_host_priv *hpriv = ap->host_set->private_data; - /* clear & turn off port IRQ */ - tmp = readl(port_mmio + PORT_IRQ_STAT); - VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp); - if (tmp) - writel(tmp, port_mmio + PORT_IRQ_STAT); + ata_port_disable(ap); - writel(1 << i, mmio + HOST_IRQ_STAT); - writel(0, port_mmio + PORT_IRQ_MASK); - } - - tmp = readl(mmio + HOST_CTL); - VPRINTK("HOST_CTL 0x%x\n", tmp); - writel(tmp | HOST_IRQ_EN, mmio + HOST_CTL); - tmp = readl(mmio + HOST_CTL); - VPRINTK("HOST_CTL 0x%x\n", tmp); + hpriv->dev_map &= ~(1 << ap->port_no); } static unsigned int ahci_dev_classify(struct ata_port *ap) @@ -686,71 +844,46 @@ static unsigned int ahci_dev_classify(struct ata_port *ap) return ata_dev_classify(&tf); } -static void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, - u32 opts) +static void ahci_fill_cmd_slot(struct ahci_port_priv *pp, u32 opts) { - dma_addr_t cmd_tbl_dma; - - cmd_tbl_dma = pp->cmd_tbl_dma + tag * AHCI_CMD_TBL_SZ; - - pp->cmd_slot[tag].opts = cpu_to_le32(opts); - pp->cmd_slot[tag].status = 0; - pp->cmd_slot[tag].tbl_addr = cpu_to_le32(cmd_tbl_dma & 0xffffffff); - pp->cmd_slot[tag].tbl_addr_hi = cpu_to_le32((cmd_tbl_dma >> 16) >> 16); + pp->cmd_slot[0].opts = cpu_to_le32(opts); + pp->cmd_slot[0].status = 0; + pp->cmd_slot[0].tbl_addr = cpu_to_le32(pp->cmd_tbl_dma & 0xffffffff); + pp->cmd_slot[0].tbl_addr_hi = cpu_to_le32((pp->cmd_tbl_dma >> 16) >> 16); } -static int ahci_clo(struct ata_port *ap) +static int ahci_poll_register(void __iomem *reg, u32 mask, u32 val, + unsigned long interval_msec, + unsigned long timeout_msec) { - void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; - struct ahci_host_priv *hpriv = ap->host_set->private_data; + unsigned long timeout; u32 tmp; - if (!(hpriv->cap & HOST_CAP_CLO)) - return -EOPNOTSUPP; - - tmp = readl(port_mmio + PORT_CMD); - tmp |= PORT_CMD_CLO; - writel(tmp, port_mmio + PORT_CMD); - - tmp = ata_wait_register(port_mmio + PORT_CMD, - PORT_CMD_CLO, PORT_CMD_CLO, 1, 500); - if (tmp & PORT_CMD_CLO) - return -EIO; + timeout = jiffies + (timeout_msec * HZ) / 1000; + do { + tmp = readl(reg); + if ((tmp & mask) == val) + return 0; + msleep(interval_msec); + } while (time_before(jiffies, timeout)); - return 0; + return -1; } -static int ahci_prereset(struct ata_port *ap) -{ - if ((ap->flags & AHCI_FLAG_RESET_NEEDS_CLO) && - (ata_busy_wait(ap, ATA_BUSY, 1000) & ATA_BUSY)) { - /* ATA_BUSY hasn't cleared, so send a CLO */ - ahci_clo(ap); - } - - return ata_std_prereset(ap); -} - -static int ahci_softreset(struct ata_port *ap, unsigned int *class) +static int ahci_softreset(struct ata_port *ap, int verbose, unsigned int *class) { + struct ahci_host_priv *hpriv = ap->host_set->private_data; struct ahci_port_priv *pp = ap->private_data; void __iomem *mmio = ap->host_set->mmio_base; void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); const u32 cmd_fis_len = 5; /* five dwords */ const char *reason = NULL; struct ata_taskfile tf; - u32 tmp; u8 *fis; int rc; DPRINTK("ENTER\n"); - if (ata_port_offline(ap)) { - DPRINTK("PHY reports no device\n"); - *class = ATA_DEV_NONE; - return 0; - } - /* prepare for SRST (AHCI-1.1 10.4.1) */ rc = ahci_stop_engine(port_mmio); if (rc) { @@ -761,13 +894,23 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class) /* check BUSY/DRQ, perform Command List Override if necessary */ ahci_tf_read(ap, &tf); if (tf.command & (ATA_BUSY | ATA_DRQ)) { - rc = ahci_clo(ap); + u32 tmp; - if (rc == -EOPNOTSUPP) { - reason = "port busy but CLO unavailable"; + if (!(hpriv->cap & HOST_CAP_CLO)) { + rc = -EIO; + reason = "port busy but no CLO"; goto fail_restart; - } else if (rc) { - reason = "port busy but CLO failed"; + } + + tmp = readl(port_mmio + PORT_CMD); + tmp |= PORT_CMD_CLO; + writel(tmp, port_mmio + PORT_CMD); + readl(port_mmio + PORT_CMD); /* flush */ + + if (ahci_poll_register(port_mmio + PORT_CMD, PORT_CMD_CLO, 0x0, + 1, 500)) { + rc = -EIO; + reason = "CLO failed"; goto fail_restart; } } @@ -775,21 +918,20 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class) /* restart engine */ ahci_start_engine(port_mmio); - ata_tf_init(ap->device, &tf); + ata_tf_init(ap, &tf, 0); fis = pp->cmd_tbl; /* issue the first D2H Register FIS */ - ahci_fill_cmd_slot(pp, 0, - cmd_fis_len | AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY); + ahci_fill_cmd_slot(pp, cmd_fis_len | AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY); tf.ctl |= ATA_SRST; ata_tf_to_fis(&tf, fis, 0); fis[1] &= ~(1 << 7); /* turn off Command FIS bit */ writel(1, port_mmio + PORT_CMD_ISSUE); + readl(port_mmio + PORT_CMD_ISSUE); /* flush */ - tmp = ata_wait_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x1, 1, 500); - if (tmp & 0x1) { + if (ahci_poll_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x0, 1, 500)) { rc = -EIO; reason = "1st FIS failed"; goto fail; @@ -799,7 +941,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class) msleep(1); /* issue the second D2H Register FIS */ - ahci_fill_cmd_slot(pp, 0, cmd_fis_len); + ahci_fill_cmd_slot(pp, cmd_fis_len); tf.ctl &= ~ATA_SRST; ata_tf_to_fis(&tf, fis, 0); @@ -819,7 +961,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class) msleep(150); *class = ATA_DEV_NONE; - if (ata_port_online(ap)) { + if (sata_dev_present(ap)) { if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { rc = -EIO; reason = "device not ready"; @@ -834,33 +976,28 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class) fail_restart: ahci_start_engine(port_mmio); fail: - ata_port_printk(ap, KERN_ERR, "softreset failed (%s)\n", reason); + if (verbose) + printk(KERN_ERR "ata%u: softreset failed (%s)\n", + ap->id, reason); + else + DPRINTK("EXIT, rc=%d reason=\"%s\"\n", rc, reason); return rc; } -static int ahci_hardreset(struct ata_port *ap, unsigned int *class) +static int ahci_hardreset(struct ata_port *ap, int verbose, unsigned int *class) { - struct ahci_port_priv *pp = ap->private_data; - u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; - struct ata_taskfile tf; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); int rc; + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + DPRINTK("ENTER\n"); ahci_stop_engine(port_mmio); - - /* clear D2H reception area to properly wait for D2H FIS */ - ata_tf_init(ap->device, &tf); - tf.command = 0xff; - ata_tf_to_fis(&tf, d2h_fis, 0); - - rc = sata_std_hardreset(ap, class); - + rc = sata_std_hardreset(ap, verbose, class); ahci_start_engine(port_mmio); - if (rc == 0 && ata_port_online(ap)) + if (rc == 0) *class = ahci_dev_classify(ap); if (*class == ATA_DEV_UNKNOWN) *class = ATA_DEV_NONE; @@ -872,6 +1009,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class) static void ahci_postreset(struct ata_port *ap, unsigned int *class) { void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; + struct ahci_host_priv *hpriv = ap->host_set->private_data; u32 new_tmp, tmp; ata_std_postreset(ap, class); @@ -886,6 +1024,16 @@ static void ahci_postreset(struct ata_port *ap, unsigned int *class) writel(new_tmp, port_mmio + PORT_CMD); readl(port_mmio + PORT_CMD); /* flush */ } + + if (*class != ATA_DEV_NONE) + hpriv->dev_map |= (1 << ap->port_no); +} + +static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes) +{ + return ata_drive_probe_reset(ap, ata_std_probeinit, + ahci_softreset, ahci_hardreset, + ahci_postreset, classes); } static u8 ahci_check_status(struct ata_port *ap) @@ -903,8 +1051,9 @@ static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf) ata_tf_from_fis(d2h_fis, tf); } -static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) +static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc) { + struct ahci_port_priv *pp = qc->ap->private_data; struct scatterlist *sg; struct ahci_sg *ahci_sg; unsigned int n_sg = 0; @@ -914,7 +1063,7 @@ static unsigned int ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) /* * Next, the S/G list. */ - ahci_sg = cmd_tbl + AHCI_CMD_TBL_HDR_SZ; + ahci_sg = pp->cmd_tbl_sg; ata_for_each_sg(sg, qc) { dma_addr_t addr = sg_dma_address(sg); u32 sg_len = sg_dma_len(sg); @@ -935,7 +1084,6 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) struct ata_port *ap = qc->ap; struct ahci_port_priv *pp = ap->private_data; int is_atapi = is_atapi_taskfile(&qc->tf); - void *cmd_tbl; u32 opts; const u32 cmd_fis_len = 5; /* five dwords */ unsigned int n_elem; @@ -944,17 +1092,16 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) * Fill in command table information. First, the header, * a SATA Register - Host to Device command FIS. */ - cmd_tbl = pp->cmd_tbl + qc->tag * AHCI_CMD_TBL_SZ; - - ata_tf_to_fis(&qc->tf, cmd_tbl, 0); + ata_tf_to_fis(&qc->tf, pp->cmd_tbl, 0); if (is_atapi) { - memset(cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); - memcpy(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len); + memset(pp->cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32); + memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, + qc->dev->cdb_len); } n_elem = 0; if (qc->flags & ATA_QCFLAG_DMAMAP) - n_elem = ahci_fill_sg(qc, cmd_tbl); + n_elem = ahci_fill_sg(qc); /* * Fill in command slot information. @@ -965,116 +1112,177 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) if (is_atapi) opts |= AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH; - ahci_fill_cmd_slot(pp, qc->tag, opts); + ahci_fill_cmd_slot(pp, opts); } -static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) +static void ahci_restart_port(struct ata_port *ap, u32 irq_stat) { - struct ahci_port_priv *pp = ap->private_data; - struct ata_eh_info *ehi = &ap->eh_info; - unsigned int err_mask = 0, action = 0; + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + u32 tmp; + + if ((ap->device[0].class != ATA_DEV_ATAPI) || + ((irq_stat & PORT_IRQ_TF_ERR) == 0)) + printk(KERN_WARNING "ata%u: port reset, " + "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n", + ap->id, + irq_stat, + readl(mmio + HOST_IRQ_STAT), + readl(port_mmio + PORT_IRQ_STAT), + readl(port_mmio + PORT_CMD), + readl(port_mmio + PORT_TFDATA), + readl(port_mmio + PORT_SCR_STAT), + readl(port_mmio + PORT_SCR_ERR)); + + /* stop DMA */ + ahci_stop_engine(port_mmio); + + /* clear SATA phy error, if any */ + tmp = readl(port_mmio + PORT_SCR_ERR); + writel(tmp, port_mmio + PORT_SCR_ERR); + + /* if DRQ/BSY is set, device needs to be reset. + * if so, issue COMRESET + */ + tmp = readl(port_mmio + PORT_TFDATA); + if (tmp & (ATA_BUSY | ATA_DRQ)) { + writel(0x301, port_mmio + PORT_SCR_CTL); + readl(port_mmio + PORT_SCR_CTL); /* flush */ + udelay(10); + writel(0x300, port_mmio + PORT_SCR_CTL); + readl(port_mmio + PORT_SCR_CTL); /* flush */ + } + + /* re-start DMA */ + ahci_start_engine(port_mmio); +} + +static void ahci_eng_timeout(struct ata_port *ap) +{ + struct ata_host_set *host_set = ap->host_set; + void __iomem *mmio = host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); struct ata_queued_cmd *qc; - u32 serror; + unsigned long flags; - ata_ehi_clear_desc(ehi); + printk(KERN_WARNING "ata%u: handling error/timeout\n", ap->id); - /* AHCI needs SError cleared; otherwise, it might lock up */ - serror = ahci_scr_read(ap, SCR_ERROR); - ahci_scr_write(ap, SCR_ERROR, serror); + spin_lock_irqsave(&host_set->lock, flags); - /* analyze @irq_stat */ - ata_ehi_push_desc(ehi, "irq_stat 0x%08x", irq_stat); + ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT)); + qc = ata_qc_from_tag(ap, ap->active_tag); + qc->err_mask |= AC_ERR_TIMEOUT; - if (irq_stat & PORT_IRQ_TF_ERR) - err_mask |= AC_ERR_DEV; + spin_unlock_irqrestore(&host_set->lock, flags); - if (irq_stat & (PORT_IRQ_HBUS_ERR | PORT_IRQ_HBUS_DATA_ERR)) { - err_mask |= AC_ERR_HOST_BUS; - action |= ATA_EH_SOFTRESET; - } + ata_eh_qc_complete(qc); +} - if (irq_stat & PORT_IRQ_IF_ERR) { - err_mask |= AC_ERR_ATA_BUS; - action |= ATA_EH_SOFTRESET; - ata_ehi_push_desc(ehi, ", interface fatal error"); - } +int ahci_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) +{ + struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_device *dev = &ap->device[sdev->id]; + int rc; - if (irq_stat & (PORT_IRQ_CONNECT | PORT_IRQ_PHYRDY)) { - ata_ehi_hotplugged(ehi); - ata_ehi_push_desc(ehi, ", %s", irq_stat & PORT_IRQ_CONNECT ? - "connection status changed" : "PHY RDY changed"); - } + rc = ata_device_suspend(ap, dev, state); - if (irq_stat & PORT_IRQ_UNK_FIS) { - u32 *unk = (u32 *)(pp->rx_fis + RX_FIS_UNK); + if (!rc) + rc = ahci_port_suspend(ap, state); - err_mask |= AC_ERR_HSM; - action |= ATA_EH_SOFTRESET; - ata_ehi_push_desc(ehi, ", unknown FIS %08x %08x %08x %08x", - unk[0], unk[1], unk[2], unk[3]); - } + return rc; +} - /* okay, let's hand over to EH */ - ehi->serror |= serror; - ehi->action |= action; +int ahci_scsi_device_resume(struct scsi_device *sdev) +{ + struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_device *dev = &ap->device[sdev->id]; - qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc) - qc->err_mask |= err_mask; - else - ehi->err_mask |= err_mask; + ahci_port_resume(ap); - if (irq_stat & PORT_IRQ_FREEZE) - ata_port_freeze(ap); - else - ata_port_abort(ap); + return ata_device_resume(ap, dev); } -static void ahci_host_intr(struct ata_port *ap) +int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t state) { - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - struct ata_eh_info *ehi = &ap->eh_info; - u32 status, qc_active; - int rc; + struct device *dev = pci_dev_to_dev(pdev); + struct ata_host_set *host_set = dev_get_drvdata(dev); + void __iomem *mmio = host_set->mmio_base; + u32 tmp; - status = readl(port_mmio + PORT_IRQ_STAT); - writel(status, port_mmio + PORT_IRQ_STAT); + /* + * AHCI spec rev1.1 section 8.3.3: + * Software must disable interrupts prior to + * requesting a transition of the HBA to + * D3 state. + */ + tmp = readl(mmio + HOST_CTL); + tmp &= ~HOST_IRQ_EN; + writel(tmp, mmio + HOST_CTL); + tmp = readl(mmio + HOST_CTL); /* flush */ - if (unlikely(status & PORT_IRQ_ERROR)) { - ahci_error_intr(ap, status); - return; - } + return ata_pci_device_suspend(pdev, state); +} - if (ap->sactive) - qc_active = readl(port_mmio + PORT_SCR_ACT); - else - qc_active = readl(port_mmio + PORT_CMD_ISSUE); +int ahci_pci_device_resume(struct pci_dev *pdev) +{ + struct device *dev = pci_dev_to_dev(pdev); + struct ata_host_set *host_set = dev_get_drvdata(dev); + void __iomem *mmio = host_set->mmio_base; + u32 tmp; - rc = ata_qc_complete_multiple(ap, qc_active, NULL); - if (rc > 0) - return; - if (rc < 0) { - ehi->err_mask |= AC_ERR_HSM; - ehi->action |= ATA_EH_SOFTRESET; - ata_port_freeze(ap); - return; + /* + * Enabling AHCI mode + */ + tmp = readl(mmio + HOST_CTL); + if (!(tmp & HOST_AHCI_EN)) { + tmp |= HOST_AHCI_EN; + writel(tmp, mmio + HOST_CTL); + tmp = readl(mmio + HOST_CTL); } - /* hmmm... a spurious interupt */ + return ata_pci_device_resume(pdev); +} + +static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) +{ + void __iomem *mmio = ap->host_set->mmio_base; + void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); + u32 status, serr, ci; + + serr = readl(port_mmio + PORT_SCR_ERR); + writel(serr, port_mmio + PORT_SCR_ERR); + + status = readl(port_mmio + PORT_IRQ_STAT); + writel(status, port_mmio + PORT_IRQ_STAT); - /* some devices send D2H reg with I bit set during NCQ command phase */ - if (ap->sactive && status & PORT_IRQ_D2H_REG_FIS) - return; + ci = readl(port_mmio + PORT_CMD_ISSUE); + if (likely((ci & 0x1) == 0)) { + if (qc) { + WARN_ON(qc->err_mask); + ata_qc_complete(qc); + qc = NULL; + } + } - /* ignore interim PIO setup fis interrupts */ - if (ata_tag_valid(ap->active_tag) && (status & PORT_IRQ_PIOS_FIS)) - return; + if (status & PORT_IRQ_FATAL) { + unsigned int err_mask; + if (status & PORT_IRQ_TF_ERR) + err_mask = AC_ERR_DEV; + else if (status & PORT_IRQ_IF_ERR) + err_mask = AC_ERR_ATA_BUS; + else + err_mask = AC_ERR_HOST_BUS; + + /* command processing has stopped due to error; restart */ + ahci_restart_port(ap, status); + + if (qc) { + qc->err_mask |= err_mask; + ata_qc_complete(qc); + } + } - if (ata_ratelimit()) - ata_port_printk(ap, KERN_INFO, "spurious interrupt " - "(irq_stat 0x%x active_tag %d sactive 0x%x)\n", - status, ap->active_tag, ap->sactive); + return 1; } static void ahci_irq_clear(struct ata_port *ap) @@ -1082,7 +1290,7 @@ static void ahci_irq_clear(struct ata_port *ap) /* TODO */ } -static irqreturn_t ahci_interrupt(int irq, void *dev_instance, struct pt_regs *regs) +static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { struct ata_host_set *host_set = dev_instance; struct ahci_host_priv *hpriv; @@ -1111,7 +1319,14 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance, struct pt_regs *r ap = host_set->ports[i]; if (ap) { - ahci_host_intr(ap); + struct ata_queued_cmd *qc; + qc = ata_qc_from_tag(ap, ap->active_tag); + if (!ahci_host_intr(ap, qc)) + if (ata_ratelimit()) + dev_printk(KERN_WARNING, host_set->dev, + "unhandled interrupt on port %u\n", + i); + VPRINTK("port %u\n", i); } else { VPRINTK("port %u (no irq)\n", i); @@ -1128,7 +1343,7 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance, struct pt_regs *r handled = 1; } - spin_unlock(&host_set->lock); + spin_unlock(&host_set->lock); VPRINTK("EXIT\n"); @@ -1140,229 +1355,12 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc) struct ata_port *ap = qc->ap; void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; - if (qc->tf.protocol == ATA_PROT_NCQ) - writel(1 << qc->tag, port_mmio + PORT_SCR_ACT); - writel(1 << qc->tag, port_mmio + PORT_CMD_ISSUE); + writel(1, port_mmio + PORT_CMD_ISSUE); readl(port_mmio + PORT_CMD_ISSUE); /* flush */ return 0; } -static void ahci_freeze(struct ata_port *ap) -{ - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - - /* turn IRQ off */ - writel(0, port_mmio + PORT_IRQ_MASK); -} - -static void ahci_thaw(struct ata_port *ap) -{ - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - u32 tmp; - - /* clear IRQ */ - tmp = readl(port_mmio + PORT_IRQ_STAT); - writel(tmp, port_mmio + PORT_IRQ_STAT); - writel(1 << ap->id, mmio + HOST_IRQ_STAT); - - /* turn IRQ back on */ - writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); -} - -static void ahci_error_handler(struct ata_port *ap) -{ - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - - if (!(ap->pflags & ATA_PFLAG_FROZEN)) { - /* restart engine */ - ahci_stop_engine(port_mmio); - ahci_start_engine(port_mmio); - } - - /* perform recovery */ - ata_do_eh(ap, ahci_prereset, ahci_softreset, ahci_hardreset, - ahci_postreset); -} - -static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - - if (qc->flags & ATA_QCFLAG_FAILED) - qc->err_mask |= AC_ERR_OTHER; - - if (qc->err_mask) { - /* make DMA engine forget about the failed command */ - ahci_stop_engine(port_mmio); - ahci_start_engine(port_mmio); - } -} - -static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg) -{ - struct ahci_host_priv *hpriv = ap->host_set->private_data; - struct ahci_port_priv *pp = ap->private_data; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - const char *emsg = NULL; - int rc; - - rc = ahci_deinit_port(port_mmio, hpriv->cap, &emsg); - if (rc) { - ata_port_printk(ap, KERN_ERR, "%s (%d)\n", emsg, rc); - ahci_init_port(port_mmio, hpriv->cap, - pp->cmd_slot_dma, pp->rx_fis_dma); - } - - return rc; -} - -static int ahci_port_resume(struct ata_port *ap) -{ - struct ahci_port_priv *pp = ap->private_data; - struct ahci_host_priv *hpriv = ap->host_set->private_data; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - - ahci_init_port(port_mmio, hpriv->cap, pp->cmd_slot_dma, pp->rx_fis_dma); - - return 0; -} - -static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - void __iomem *mmio = host_set->mmio_base; - u32 ctl; - - if (mesg.event == PM_EVENT_SUSPEND) { - /* AHCI spec rev1.1 section 8.3.3: - * Software must disable interrupts prior to requesting a - * transition of the HBA to D3 state. - */ - ctl = readl(mmio + HOST_CTL); - ctl &= ~HOST_IRQ_EN; - writel(ctl, mmio + HOST_CTL); - readl(mmio + HOST_CTL); /* flush */ - } - - return ata_pci_device_suspend(pdev, mesg); -} - -static int ahci_pci_device_resume(struct pci_dev *pdev) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - struct ahci_host_priv *hpriv = host_set->private_data; - void __iomem *mmio = host_set->mmio_base; - int rc; - - ata_pci_device_do_resume(pdev); - - if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { - rc = ahci_reset_controller(mmio, pdev); - if (rc) - return rc; - - ahci_init_controller(mmio, pdev, host_set->n_ports, hpriv->cap); - } - - ata_host_set_resume(host_set); - - return 0; -} - -static int ahci_port_start(struct ata_port *ap) -{ - struct device *dev = ap->host_set->dev; - struct ahci_host_priv *hpriv = ap->host_set->private_data; - struct ahci_port_priv *pp; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - void *mem; - dma_addr_t mem_dma; - int rc; - - pp = kmalloc(sizeof(*pp), GFP_KERNEL); - if (!pp) - return -ENOMEM; - memset(pp, 0, sizeof(*pp)); - - rc = ata_pad_alloc(ap, dev); - if (rc) { - kfree(pp); - return rc; - } - - mem = dma_alloc_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, &mem_dma, GFP_KERNEL); - if (!mem) { - ata_pad_free(ap, dev); - kfree(pp); - return -ENOMEM; - } - memset(mem, 0, AHCI_PORT_PRIV_DMA_SZ); - - /* - * First item in chunk of DMA memory: 32-slot command table, - * 32 bytes each in size - */ - pp->cmd_slot = mem; - pp->cmd_slot_dma = mem_dma; - - mem += AHCI_CMD_SLOT_SZ; - mem_dma += AHCI_CMD_SLOT_SZ; - - /* - * Second item: Received-FIS area - */ - pp->rx_fis = mem; - pp->rx_fis_dma = mem_dma; - - mem += AHCI_RX_FIS_SZ; - mem_dma += AHCI_RX_FIS_SZ; - - /* - * Third item: data area for storing a single command - * and its scatter-gather table - */ - pp->cmd_tbl = mem; - pp->cmd_tbl_dma = mem_dma; - - ap->private_data = pp; - - /* initialize port */ - ahci_init_port(port_mmio, hpriv->cap, pp->cmd_slot_dma, pp->rx_fis_dma); - - return 0; -} - -static void ahci_port_stop(struct ata_port *ap) -{ - struct device *dev = ap->host_set->dev; - struct ahci_host_priv *hpriv = ap->host_set->private_data; - struct ahci_port_priv *pp = ap->private_data; - void __iomem *mmio = ap->host_set->mmio_base; - void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); - const char *emsg = NULL; - int rc; - - /* de-initialize port */ - rc = ahci_deinit_port(port_mmio, hpriv->cap, &emsg); - if (rc) - ata_port_printk(ap, KERN_WARNING, "%s (%d)\n", emsg, rc); - - ap->private_data = NULL; - dma_free_coherent(dev, AHCI_PORT_PRIV_DMA_SZ, - pp->cmd_slot, pp->cmd_slot_dma); - ata_pad_free(ap, dev); - kfree(pp); -} - static void ahci_setup_port(struct ata_ioports *port, unsigned long base, unsigned int port_idx) { @@ -1381,15 +1379,51 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) struct ahci_host_priv *hpriv = probe_ent->private_data; struct pci_dev *pdev = to_pci_dev(probe_ent->dev); void __iomem *mmio = probe_ent->mmio_base; - unsigned int i, using_dac; + u32 tmp, cap_save; + unsigned int i, j, using_dac; int rc; + void __iomem *port_mmio; - rc = ahci_reset_controller(mmio, pdev); - if (rc) - return rc; + cap_save = readl(mmio + HOST_CAP); + cap_save &= ( (1<<28) | (1<<17) ); + cap_save |= (1 << 27); + + /* global controller reset */ + tmp = readl(mmio + HOST_CTL); + if ((tmp & HOST_RESET) == 0) { + writel(tmp | HOST_RESET, mmio + HOST_CTL); + readl(mmio + HOST_CTL); /* flush */ + } + + /* reset must complete within 1 second, or + * the hardware should be considered fried. + */ + ssleep(1); + + tmp = readl(mmio + HOST_CTL); + if (tmp & HOST_RESET) { + dev_printk(KERN_ERR, &pdev->dev, + "controller reset failed (0x%x)\n", tmp); + return -EIO; + } + + writel(HOST_AHCI_EN, mmio + HOST_CTL); + (void) readl(mmio + HOST_CTL); /* flush */ + writel(cap_save, mmio + HOST_CAP); + writel(0xf, mmio + HOST_PORTS_IMPL); + (void) readl(mmio + HOST_PORTS_IMPL); /* flush */ + + if (pdev->vendor == PCI_VENDOR_ID_INTEL) { + u16 tmp16; + + pci_read_config_word(pdev, 0x92, &tmp16); + tmp16 |= 0xf; + pci_write_config_word(pdev, 0x92, tmp16); + } hpriv->cap = readl(mmio + HOST_CAP); hpriv->port_map = readl(mmio + HOST_PORTS_IMPL); + hpriv->dev_map = 0; probe_ent->n_ports = (hpriv->cap & 0x1f) + 1; VPRINTK("cap 0x%x port_map 0x%x n_ports %d\n", @@ -1422,10 +1456,72 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) } } - for (i = 0; i < probe_ent->n_ports; i++) - ahci_setup_port(&probe_ent->port[i], (unsigned long) mmio, i); + for (i = 0; i < probe_ent->n_ports; i++) { +#if 0 /* BIOSen initialize this incorrectly */ + if (!(hpriv->port_map & (1 << i))) + continue; +#endif + + port_mmio = ahci_port_base(mmio, i); + VPRINTK("mmio %p port_mmio %p\n", mmio, port_mmio); + + ahci_setup_port(&probe_ent->port[i], + (unsigned long) mmio, i); + + /* make sure port is not active */ + rc = ahci_stop_engine(port_mmio); + if (rc) + printk(KERN_WARNING "ata%u: DMA engine busy (rc %d)\n", + i, rc); + + rc = ahci_stop_fis_rx(port_mmio); + if (rc) + printk(KERN_WARNING "ata%u: FIS RX not stopped (rc %d)\n", + i, rc); + + /* + * Actually, this is wrong again. + * AHCI spec says that we first should + * enable FIS reception before sending + * SPIN_UP to the device ... + */ + + writel(PORT_CMD_SPIN_UP, port_mmio + PORT_CMD); + + /* + * Wait for the communications link to establish + */ + + j = 0; + while (j < 100) { + msleep(10); + tmp = readl(port_mmio + PORT_SCR_STAT); + if ((tmp & 0xf) == 0x3) + break; + j++; + } + + tmp = readl(port_mmio + PORT_SCR_ERR); + VPRINTK("PORT_SCR_ERR 0x%x\n", tmp); + writel(tmp, port_mmio + PORT_SCR_ERR); + + /* ack any pending irq events for this port */ + tmp = readl(port_mmio + PORT_IRQ_STAT); + VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp); + if (tmp) + writel(tmp, port_mmio + PORT_IRQ_STAT); + + writel(1 << i, mmio + HOST_IRQ_STAT); + + /* set irq mask (enables interrupts) */ + writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); + } - ahci_init_controller(mmio, pdev, probe_ent->n_ports, hpriv->cap); + tmp = readl(mmio + HOST_CTL); + VPRINTK("HOST_CTL 0x%x\n", tmp); + writel(tmp | HOST_IRQ_EN, mmio + HOST_CTL); + tmp = readl(mmio + HOST_CTL); + VPRINTK("HOST_CTL 0x%x\n", tmp); pci_set_master(pdev); @@ -1516,22 +1612,9 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) VPRINTK("ENTER\n"); - WARN_ON(ATA_MAX_QUEUE > AHCI_MAX_CMDS); - if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); - /* JMicron-specific fixup: make sure we're in AHCI mode */ - /* This is protected from races with ata_jmicron by the pci probe - locking */ - if (pdev->vendor == PCI_VENDOR_ID_JMICRON) { - /* AHCI enable, AHCI on function 0 */ - pci_write_config_byte(pdev, 0x41, 0xa1); - /* Function 1 is the PATA controller */ - if (PCI_FUNC(pdev->devfn)) - return -ENODEV; - } - rc = pci_enable_device(pdev); if (rc) return rc; @@ -1580,22 +1663,22 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) probe_ent->port_ops = ahci_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; probe_ent->private_data = hpriv; if (have_msi) hpriv->flags |= AHCI_FLAG_MSI; + /* JMicron-specific fixup: make sure we're in AHCI mode */ + if (pdev->vendor == 0x197b) + pci_write_config_byte(pdev, 0x41, 0xa1); + /* initialize adapter */ rc = ahci_host_init(probe_ent); if (rc) goto err_out_hpriv; - if (!(probe_ent->host_flags & AHCI_FLAG_NO_NCQ) && - (hpriv->cap & HOST_CAP_NCQ)) - probe_ent->host_flags |= ATA_FLAG_NCQ; - ahci_print_info(probe_ent); /* FIXME: check ata_device_add return value */ @@ -1627,17 +1710,21 @@ static void ahci_remove_one (struct pci_dev *pdev) struct device *dev = pci_dev_to_dev(pdev); struct ata_host_set *host_set = dev_get_drvdata(dev); struct ahci_host_priv *hpriv = host_set->private_data; + struct ata_port *ap; unsigned int i; int have_msi; - for (i = 0; i < host_set->n_ports; i++) - ata_port_detach(host_set->ports[i]); + for (i = 0; i < host_set->n_ports; i++) { + ap = host_set->ports[i]; + + scsi_remove_host(ap->host); + } have_msi = hpriv->flags & AHCI_FLAG_MSI; free_irq(host_set->irq, host_set); for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; + ap = host_set->ports[i]; ata_scsi_release(ap->host); scsi_host_put(ap->host); diff --git a/drivers/scsi/aic7xxx/aic7770.c b/drivers/scsi/aic7xxx/aic7770.c index c4d17231c..527efd36f 100644 --- a/drivers/scsi/aic7xxx/aic7770.c +++ b/drivers/scsi/aic7xxx/aic7770.c @@ -107,7 +107,7 @@ struct aic7770_identity aic7770_ident_table[] = ahc_aic7770_EISA_setup } }; -const int ahc_num_aic7770_devs = ARRAY_SIZE(aic7770_ident_table); +const int ahc_num_aic7770_devs = NUM_ELEMENTS(aic7770_ident_table); struct aic7770_identity * aic7770_find_device(uint32_t id) diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 867cbe235..d754b3267 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c @@ -65,7 +65,7 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq) shared = 0; if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0) - shared = IRQF_SHARED; + shared = SA_SHIRQ; error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc); if (error == 0) diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index df3346b5c..bb5166da4 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h @@ -68,6 +68,8 @@ struct scb_platform_data; #define FALSE 0 #endif +#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(*array)) + #define ALL_CHANNELS '\0' #define ALL_TARGETS_MASK 0xFFFF #define INITIATOR_WILDCARD (~0) @@ -1487,7 +1489,6 @@ typedef enum { } ahd_queue_alg; void ahd_set_tags(struct ahd_softc *ahd, - struct scsi_cmnd *cmd, struct ahd_devinfo *devinfo, ahd_queue_alg alg); diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 653818d2f..08771f6f6 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -59,7 +59,7 @@ char *ahd_chip_names[] = "aic7902", "aic7901A" }; -static const u_int num_chip_names = ARRAY_SIZE(ahd_chip_names); +static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. @@ -77,7 +77,7 @@ static struct ahd_hard_error_entry ahd_hard_errors[] = { { MPARERR, "Scratch or SCB Memory Parity Error" }, { CIOPARERR, "CIOBUS Parity Error" }, }; -static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors); +static const u_int num_errors = NUM_ELEMENTS(ahd_hard_errors); static struct ahd_phase_table_entry ahd_phase_table[] = { @@ -97,7 +97,7 @@ static struct ahd_phase_table_entry ahd_phase_table[] = * In most cases we only wish to itterate over real phases, so * exclude the last element from the count. */ -static const u_int num_phases = ARRAY_SIZE(ahd_phase_table) - 1; +static const u_int num_phases = NUM_ELEMENTS(ahd_phase_table) - 1; /* Our Sequencer Program */ #include "aic79xx_seq.h" @@ -1090,7 +1090,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) /* Notify XPT */ ahd_send_async(ahd, devinfo.channel, devinfo.target, - CAM_LUN_WILDCARD, AC_SENT_BDR); + CAM_LUN_WILDCARD, AC_SENT_BDR, NULL); /* * Allow the sequencer to continue with @@ -3062,7 +3062,7 @@ ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, tinfo->curr.ppr_options = ppr_options; ahd_send_async(ahd, devinfo->channel, devinfo->target, - CAM_LUN_WILDCARD, AC_TRANSFER_NEG); + CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL); if (bootverbose) { if (offset != 0) { int options; @@ -3184,7 +3184,7 @@ ahd_set_width(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, tinfo->curr.width = width; ahd_send_async(ahd, devinfo->channel, devinfo->target, - CAM_LUN_WILDCARD, AC_TRANSFER_NEG); + CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL); if (bootverbose) { printf("%s: target %d using %dbit transfers\n", ahd_name(ahd), devinfo->target, @@ -3211,14 +3211,12 @@ ahd_set_width(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, * Update the current state of tagged queuing for a given target. */ void -ahd_set_tags(struct ahd_softc *ahd, struct scsi_cmnd *cmd, - struct ahd_devinfo *devinfo, ahd_queue_alg alg) +ahd_set_tags(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, + ahd_queue_alg alg) { - struct scsi_device *sdev = cmd->device; - - ahd_platform_set_tags(ahd, sdev, devinfo, alg); + ahd_platform_set_tags(ahd, devinfo, alg); ahd_send_async(ahd, devinfo->channel, devinfo->target, - devinfo->lun, AC_TRANSFER_NEG); + devinfo->lun, AC_TRANSFER_NEG, &alg); } static void @@ -4748,7 +4746,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) printf("(%s:%c:%d:%d): refuses tagged commands. " "Performing non-tagged I/O\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); - ahd_set_tags(ahd, scb->io_ctx, devinfo, AHD_QUEUE_NONE); + ahd_set_tags(ahd, devinfo, AHD_QUEUE_NONE); mask = ~0x23; } else { printf("(%s:%c:%d:%d): refuses %s tagged commands. " @@ -4756,7 +4754,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, tag_type == MSG_ORDERED_TASK ? "ordered" : "head of queue"); - ahd_set_tags(ahd, scb->io_ctx, devinfo, AHD_QUEUE_BASIC); + ahd_set_tags(ahd, devinfo, AHD_QUEUE_BASIC); mask = ~0x03; } @@ -5100,7 +5098,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if (status != CAM_SEL_TIMEOUT) ahd_send_async(ahd, devinfo->channel, devinfo->target, - CAM_LUN_WILDCARD, AC_SENT_BDR); + CAM_LUN_WILDCARD, AC_SENT_BDR, NULL); if (message != NULL && bootverbose) printf("%s: %s on %c:%d. %d SCBs aborted\n", ahd_name(ahd), @@ -7261,7 +7259,7 @@ ahd_qinfifo_count(struct ahd_softc *ahd) return (wrap_qinfifonext - wrap_qinpos); else return (wrap_qinfifonext - + ARRAY_SIZE(ahd->qinfifo) - wrap_qinpos); + + NUM_ELEMENTS(ahd->qinfifo) - wrap_qinpos); } void @@ -7289,7 +7287,7 @@ ahd_reset_cmds_pending(struct ahd_softc *ahd) ahd->flags &= ~AHD_UPDATE_PEND_CMDS; } -static void +void ahd_done_with_status(struct ahd_softc *ahd, struct scb *scb, uint32_t status) { cam_status ostat; @@ -7954,7 +7952,7 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset) #endif /* Notify the XPT that a bus reset occurred */ ahd_send_async(ahd, devinfo.channel, CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD, AC_BUS_RESET); + CAM_LUN_WILDCARD, AC_BUS_RESET, NULL); /* * Revert to async/narrow transfers until we renegotiate. @@ -8621,7 +8619,7 @@ ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch, struct patch *last_patch; u_int num_patches; - num_patches = ARRAY_SIZE(patches); + num_patches = sizeof(patches)/sizeof(struct patch); last_patch = &patches[num_patches]; cur_patch = *start_patch; @@ -9398,8 +9396,8 @@ ahd_find_tmode_devs(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb, } else { u_int max_id; - max_id = (ahd->features & AHD_WIDE) ? 16 : 8; - if (ccb->ccb_h.target_id >= max_id) + max_id = (ahd->features & AHD_WIDE) ? 15 : 7; + if (ccb->ccb_h.target_id > max_id) return (CAM_TID_INVALID); if (ccb->ccb_h.target_lun >= AHD_NUM_LUNS) diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 07d51b870..66e4a47bb 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c @@ -242,6 +242,25 @@ ahd_print_path(struct ahd_softc *ahd, struct scb *scb) */ static uint32_t aic79xx_no_reset; +/* + * Certain PCI motherboards will scan PCI devices from highest to lowest, + * others scan from lowest to highest, and they tend to do all kinds of + * strange things when they come into contact with PCI bridge chips. The + * net result of all this is that the PCI card that is actually used to boot + * the machine is very hard to detect. Most motherboards go from lowest + * PCI slot number to highest, and the first SCSI controller found is the + * one you boot from. The only exceptions to this are when a controller + * has its BIOS disabled. So, we by default sort all of our SCSI controllers + * from lowest PCI slot number to highest PCI slot number. We also force + * all controllers with their BIOS disabled to the end of the list. This + * works on *almost* all computers. Where it doesn't work, we have this + * option. Setting this option to non-0 will reverse the order of the sort + * to highest first, then lowest, but will still leave cards with their BIOS + * disabled at the very end. That should fix everyone up unless there are + * really strange cirumstances. + */ +static uint32_t aic79xx_reverse_scan; + /* * Should we force EXTENDED translation on a controller. * 0 == Use whatever is in the SEEPROM or default to off @@ -331,6 +350,7 @@ MODULE_PARM_DESC(aic79xx, " periodically to prevent tag starvation.\n" " This may be required by some older disk\n" " or drives/RAID arrays.\n" +" reverse_scan Sort PCI devices highest Bus/Slot to lowest\n" " tag_info: Set per-target tag depth\n" " global_tag_depth: Global tag depth for all targets on all buses\n" " slewrate:Set the signal slew rate (0-15).\n" @@ -464,6 +484,7 @@ ahd_linux_target_alloc(struct scsi_target *starget) struct seeprom_config *sc = ahd->seep_config; unsigned long flags; struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); + struct ahd_linux_target *targ = scsi_transport_target_data(starget); struct ahd_devinfo devinfo; struct ahd_initiator_tinfo *tinfo; struct ahd_tmode_tstate *tstate; @@ -474,6 +495,7 @@ ahd_linux_target_alloc(struct scsi_target *starget) BUG_ON(*ahd_targp != NULL); *ahd_targp = starget; + memset(targ, 0, sizeof(*targ)); if (sc) { int flags = sc->device_flags[starget->id]; @@ -529,11 +551,15 @@ ahd_linux_slave_alloc(struct scsi_device *sdev) { struct ahd_softc *ahd = *((struct ahd_softc **)sdev->host->hostdata); + struct scsi_target *starget = sdev->sdev_target; + struct ahd_linux_target *targ = scsi_transport_target_data(starget); struct ahd_linux_device *dev; if (bootverbose) printf("%s: Slave Alloc %d\n", ahd_name(ahd), sdev->id); + BUG_ON(targ->sdev[sdev->lun] != NULL); + dev = scsi_transport_device_data(sdev); memset(dev, 0, sizeof(*dev)); @@ -550,6 +576,8 @@ ahd_linux_slave_alloc(struct scsi_device *sdev) */ dev->maxtags = 0; + targ->sdev[sdev->lun] = sdev; + return (0); } @@ -571,6 +599,23 @@ ahd_linux_slave_configure(struct scsi_device *sdev) return 0; } +static void +ahd_linux_slave_destroy(struct scsi_device *sdev) +{ + struct ahd_softc *ahd; + struct ahd_linux_device *dev = scsi_transport_device_data(sdev); + struct ahd_linux_target *targ = scsi_transport_target_data(sdev->sdev_target); + + ahd = *((struct ahd_softc **)sdev->host->hostdata); + if (bootverbose) + printf("%s: Slave Destroy %d\n", ahd_name(ahd), sdev->id); + + BUG_ON(dev->active); + + targ->sdev[sdev->lun] = NULL; + +} + #if defined(__i386__) /* * Return the disk geometry for the given SCSI device. @@ -646,7 +691,7 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd) struct ahd_initiator_tinfo *tinfo; struct ahd_tmode_tstate *tstate; unsigned long flags; - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); reset_scb = NULL; paused = FALSE; @@ -777,6 +822,7 @@ struct scsi_host_template aic79xx_driver_template = { .use_clustering = ENABLE_CLUSTERING, .slave_alloc = ahd_linux_slave_alloc, .slave_configure = ahd_linux_slave_configure, + .slave_destroy = ahd_linux_slave_destroy, .target_alloc = ahd_linux_target_alloc, .target_destroy = ahd_linux_target_destroy, }; @@ -870,7 +916,7 @@ ahd_linux_setup_iocell_info(u_long index, int instance, int targ, int32_t value) { if ((instance >= 0) - && (instance < ARRAY_SIZE(aic79xx_iocell_info))) { + && (instance < NUM_ELEMENTS(aic79xx_iocell_info))) { uint8_t *iocell_info; iocell_info = (uint8_t*)&aic79xx_iocell_info[instance]; @@ -888,7 +934,7 @@ ahd_linux_setup_tag_info_global(char *p) tags = simple_strtoul(p + 1, NULL, 0) & 0xff; printf("Setting Global Tags= %d\n", tags); - for (i = 0; i < ARRAY_SIZE(aic79xx_tag_info); i++) { + for (i = 0; i < NUM_ELEMENTS(aic79xx_tag_info); i++) { for (j = 0; j < AHD_NUM_TARGETS; j++) { aic79xx_tag_info[i].tag_commands[j] = tags; } @@ -900,7 +946,7 @@ ahd_linux_setup_tag_info(u_long arg, int instance, int targ, int32_t value) { if ((instance >= 0) && (targ >= 0) - && (instance < ARRAY_SIZE(aic79xx_tag_info)) + && (instance < NUM_ELEMENTS(aic79xx_tag_info)) && (targ < AHD_NUM_TARGETS)) { aic79xx_tag_info[instance].tag_commands[targ] = value & 0x1FF; if (bootverbose) @@ -1011,6 +1057,7 @@ aic79xx_setup(char *s) #ifdef AHD_DEBUG { "debug", &ahd_debug }, #endif + { "reverse_scan", &aic79xx_reverse_scan }, { "periodic_otag", &aic79xx_periodic_otag }, { "pci_parity", &aic79xx_pci_parity }, { "seltime", &aic79xx_seltime }, @@ -1025,21 +1072,21 @@ aic79xx_setup(char *s) end = strchr(s, '\0'); /* - * XXX ia64 gcc isn't smart enough to know that ARRAY_SIZE + * XXX ia64 gcc isn't smart enough to know that NUM_ELEMENTS * will never be 0 in this case. - */ - n = 0; + */ + n = 0; while ((p = strsep(&s, ",.")) != NULL) { if (*p == '\0') continue; - for (i = 0; i < ARRAY_SIZE(options); i++) { + for (i = 0; i < NUM_ELEMENTS(options); i++) { n = strlen(options[i].name); if (strncmp(options[i].name, p, n) == 0) break; } - if (i == ARRAY_SIZE(options)) + if (i == NUM_ELEMENTS(options)) continue; if (strncmp(p, "global_tag_depth", n) == 0) { @@ -1202,13 +1249,20 @@ void ahd_platform_free(struct ahd_softc *ahd) { struct scsi_target *starget; - int i; + int i, j; if (ahd->platform_data != NULL) { /* destroy all of the device and target objects */ for (i = 0; i < AHD_NUM_TARGETS; i++) { starget = ahd->platform_data->starget[i]; if (starget != NULL) { + for (j = 0; j < AHD_NUM_LUNS; j++) { + struct ahd_linux_target *targ = + scsi_transport_target_data(starget); + if (targ->sdev[j] == NULL) + continue; + targ->sdev[j] = NULL; + } ahd->platform_data->starget[i] = NULL; } } @@ -1240,7 +1294,7 @@ ahd_platform_init(struct ahd_softc *ahd) /* * Lookup and commit any modified IO Cell options. */ - if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { + if (ahd->unit < NUM_ELEMENTS(aic79xx_iocell_info)) { struct ahd_linux_iocell_opts *iocell_opts; iocell_opts = &aic79xx_iocell_info[ahd->unit]; @@ -1264,13 +1318,20 @@ ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb) } void -ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev, - struct ahd_devinfo *devinfo, ahd_queue_alg alg) +ahd_platform_set_tags(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, + ahd_queue_alg alg) { + struct scsi_target *starget; + struct ahd_linux_target *targ; struct ahd_linux_device *dev; + struct scsi_device *sdev; int was_queuing; int now_queuing; + starget = ahd->platform_data->starget[devinfo->target]; + targ = scsi_transport_target_data(starget); + BUG_ON(targ == NULL); + sdev = targ->sdev[devinfo->lun]; if (sdev == NULL) return; @@ -1365,7 +1426,7 @@ ahd_linux_user_tagdepth(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) tags = 0; if ((ahd->user_discenable & devinfo->target_mask) != 0) { - if (ahd->unit >= ARRAY_SIZE(aic79xx_tag_info)) { + if (ahd->unit >= NUM_ELEMENTS(aic79xx_tag_info)) { if (warned_user == 0) { printf(KERN_WARNING @@ -1406,15 +1467,11 @@ ahd_linux_device_queue_depth(struct scsi_device *sdev) tags = ahd_linux_user_tagdepth(ahd, &devinfo); if (tags != 0 && sdev->tagged_supported != 0) { - ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_TAGGED); - ahd_send_async(ahd, devinfo.channel, devinfo.target, - devinfo.lun, AC_TRANSFER_NEG); + ahd_set_tags(ahd, &devinfo, AHD_QUEUE_TAGGED); ahd_print_devinfo(ahd, &devinfo); printf("Tagged Queuing enabled. Depth %d\n", tags); } else { - ahd_platform_set_tags(ahd, sdev, &devinfo, AHD_QUEUE_NONE); - ahd_send_async(ahd, devinfo.channel, devinfo.target, - devinfo.lun, AC_TRANSFER_NEG); + ahd_set_tags(ahd, &devinfo, AHD_QUEUE_NONE); } } @@ -1572,7 +1629,7 @@ ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs) void ahd_send_async(struct ahd_softc *ahd, char channel, - u_int target, u_int lun, ac_code code) + u_int target, u_int lun, ac_code code, void *arg) { switch (code) { case AC_TRANSFER_NEG: @@ -1899,7 +1956,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd, } ahd_set_transaction_status(scb, CAM_REQUEUE_REQ); ahd_set_scsi_status(scb, SCSI_STATUS_OK); - ahd_platform_set_tags(ahd, sdev, &devinfo, + ahd_platform_set_tags(ahd, &devinfo, (dev->flags & AHD_DEV_Q_BASIC) ? AHD_QUEUE_BASIC : AHD_QUEUE_TAGGED); break; @@ -1909,7 +1966,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd, * as if the target returned BUSY SCSI status. */ dev->openings = 1; - ahd_platform_set_tags(ahd, sdev, &devinfo, + ahd_platform_set_tags(ahd, &devinfo, (dev->flags & AHD_DEV_Q_BASIC) ? AHD_QUEUE_BASIC : AHD_QUEUE_TAGGED); ahd_set_scsi_status(scb, SCSI_STATUS_BUSY); @@ -2251,7 +2308,7 @@ done: if (paused) ahd_unpause(ahd); if (wait) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); ahd->platform_data->eh_done = &done; ahd_unlock(ahd, &flags); @@ -2721,6 +2778,8 @@ ahd_linux_init(void) if (!ahd_linux_transport_template) return -ENODEV; + scsi_transport_reserve_target(ahd_linux_transport_template, + sizeof(struct ahd_linux_target)); scsi_transport_reserve_device(ahd_linux_transport_template, sizeof(struct ahd_linux_device)); diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h index 601340d84..2b8331649 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.h +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h @@ -42,6 +42,7 @@ #ifndef _AIC79XX_LINUX_H_ #define _AIC79XX_LINUX_H_ +#include #include #include #include @@ -93,6 +94,7 @@ #endif /********************************** Misc Macros *******************************/ +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #define powerof2(x) ((((x)-1)&(x))==0) /************************* Forward Declarations *******************************/ @@ -261,6 +263,7 @@ typedef enum { AHD_DEV_PERIODIC_OTAG = 0x40, /* Send OTAG to prevent starvation */ } ahd_linux_dev_flags; +struct ahd_linux_target; struct ahd_linux_device { TAILQ_ENTRY(ahd_linux_device) links; @@ -340,6 +343,12 @@ struct ahd_linux_device { #define AHD_OTAG_THRESH 500 }; +struct ahd_linux_target { + struct scsi_device *sdev[AHD_NUM_LUNS]; + struct ahd_transinfo last_tinfo; + struct ahd_softc *ahd; +}; + /********************* Definitions Required by the Core ***********************/ /* * Number of SG segments we require. So long as the S/G segments for @@ -856,7 +865,7 @@ ahd_freeze_scb(struct scb *scb) } } -void ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev, +void ahd_platform_set_tags(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd_queue_alg); int ahd_platform_abort_scbs(struct ahd_softc *ahd, int target, char channel, int lun, u_int tag, @@ -865,7 +874,7 @@ irqreturn_t ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs); void ahd_done(struct ahd_softc*, struct scb*); void ahd_send_async(struct ahd_softc *, char channel, - u_int target, u_int lun, ac_code); + u_int target, u_int lun, ac_code, void *); void ahd_print_path(struct ahd_softc *, struct scb *); #ifdef CONFIG_PCI diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index 50a41eda5..ebbf7e4ff 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c @@ -342,7 +342,7 @@ ahd_pci_map_int(struct ahd_softc *ahd) int error; error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, - IRQF_SHARED, "aic79xx", ahd); + SA_SHIRQ, "aic79xx", ahd); if (!error) ahd->platform_data->irq = ahd->dev_softc->irq; diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index 14850f31a..757242e52 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c @@ -201,7 +201,7 @@ struct ahd_pci_identity ahd_pci_ident_table [] = } }; -const u_int ahd_num_pci_devs = ARRAY_SIZE(ahd_pci_ident_table); +const u_int ahd_num_pci_devs = NUM_ELEMENTS(ahd_pci_ident_table); #define DEVCONFIG 0x40 #define PCIXINITPAT 0x0000E000ul diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c index c5f0ee591..39a27840f 100644 --- a/drivers/scsi/aic7xxx/aic79xx_proc.c +++ b/drivers/scsi/aic7xxx/aic79xx_proc.c @@ -47,7 +47,7 @@ static int copy_info(struct info_str *info, char *fmt, ...); static void ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, u_int our_id, char channel, - u_int target_id); + u_int target_id, u_int target_offset); static void ahd_dump_device_state(struct info_str *info, struct scsi_device *sdev); static int ahd_proc_write_seeprom(struct ahd_softc *ahd, @@ -76,9 +76,11 @@ static u_int ahd_calc_syncsrate(u_int period_factor) { int i; + int num_syncrates; + num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]); /* See if the period is in the "exception" table */ - for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) { + for (i = 0; i < num_syncrates; i++) { if (period_factor == scsi_syncrates[i].period_factor) { /* Period in kHz */ @@ -204,8 +206,10 @@ ahd_format_transinfo(struct info_str *info, struct ahd_transinfo *tinfo) static void ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, - u_int our_id, char channel, u_int target_id) + u_int our_id, char channel, u_int target_id, + u_int target_offset) { + struct ahd_linux_target *targ; struct scsi_target *starget; struct ahd_initiator_tinfo *tinfo; struct ahd_tmode_tstate *tstate; @@ -216,9 +220,10 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, copy_info(info, "Target %d Negotiation Settings\n", target_id); copy_info(info, "\tUser: "); ahd_format_transinfo(info, &tinfo->user); - starget = ahd->platform_data->starget[target_id]; + starget = ahd->platform_data->starget[target_offset]; if (starget == NULL) return; + targ = scsi_transport_target_data(starget); copy_info(info, "\tGoal: "); ahd_format_transinfo(info, &tinfo->goal); @@ -228,7 +233,7 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct info_str *info, for (lun = 0; lun < AHD_NUM_LUNS; lun++) { struct scsi_device *dev; - dev = scsi_device_lookup_by_target(starget, lun); + dev = targ->sdev[lun]; if (dev == NULL) continue; @@ -352,7 +357,7 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, copy_info(&info, "Allocated SCBs: %d, SG List Length: %d\n\n", ahd->scb_data.numscbs, AHD_NSEG); - max_targ = 16; + max_targ = 15; if (ahd->seep_config == NULL) copy_info(&info, "No Serial EEPROM\n"); @@ -370,12 +375,12 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, copy_info(&info, "\n"); if ((ahd->features & AHD_WIDE) == 0) - max_targ = 8; + max_targ = 7; - for (i = 0; i < max_targ; i++) { + for (i = 0; i <= max_targ; i++) { ahd_dump_target_state(ahd, &info, ahd->our_id, 'A', - /*target_id*/i); + /*target_id*/i, /*target_offset*/i); } retval = info.pos > info.offset ? info.pos - info.offset : 0; done: diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index 62ff8c3dc..91d294c63 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h @@ -69,6 +69,8 @@ struct seeprom_descriptor; #define FALSE 0 #endif +#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(*array)) + #define ALL_CHANNELS '\0' #define ALL_TARGETS_MASK 0xFFFF #define INITIATOR_WILDCARD (~0) @@ -231,7 +233,6 @@ typedef enum { AHC_TARGETMODE = 0x20000, /* Has tested target mode support */ AHC_MULTIROLE = 0x40000, /* Space for two roles at a time */ AHC_REMOVABLE = 0x80000, /* Hot-Swap supported */ - AHC_HVD = 0x100000, /* HVD rather than SE */ AHC_AIC7770_FE = AHC_FENONE, /* * The real 7850 does not support Ultra modes, but there are diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index 93e4e4094..d37566978 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -68,7 +68,7 @@ char *ahc_chip_names[] = "aic7892", "aic7899" }; -static const u_int num_chip_names = ARRAY_SIZE(ahc_chip_names); +static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); /* * Hardware error codes. @@ -88,7 +88,7 @@ static struct ahc_hard_error_entry ahc_hard_errors[] = { { PCIERRSTAT, "PCI Error detected" }, { CIOPARERR, "CIOBUS Parity Error" }, }; -static const u_int num_errors = ARRAY_SIZE(ahc_hard_errors); +static const u_int num_errors = NUM_ELEMENTS(ahc_hard_errors); static struct ahc_phase_table_entry ahc_phase_table[] = { @@ -108,7 +108,7 @@ static struct ahc_phase_table_entry ahc_phase_table[] = * In most cases we only wish to itterate over real phases, so * exclude the last element from the count. */ -static const u_int num_phases = ARRAY_SIZE(ahc_phase_table) - 1; +static const u_int num_phases = NUM_ELEMENTS(ahc_phase_table) - 1; /* * Valid SCSIRATE values. (p. 3-17) @@ -6367,7 +6367,7 @@ ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch, struct patch *last_patch; u_int num_patches; - num_patches = ARRAY_SIZE(patches); + num_patches = sizeof(patches)/sizeof(struct patch); last_patch = &patches[num_patches]; cur_patch = *start_patch; @@ -6774,8 +6774,8 @@ ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb, } else { u_int max_id; - max_id = (ahc->features & AHC_WIDE) ? 16 : 8; - if (ccb->ccb_h.target_id >= max_id) + max_id = (ahc->features & AHC_WIDE) ? 15 : 7; + if (ccb->ccb_h.target_id > max_id) return (CAM_TID_INVALID); if (ccb->ccb_h.target_lun >= AHC_NUM_LUNS) diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index b3d35b324..2c801672d 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c @@ -353,6 +353,7 @@ MODULE_PARM_DESC(aic7xxx, " periodically to prevent tag starvation.\n" " This may be required by some older disk\n" " drives or RAID arrays.\n" +" reverse_scan Sort PCI devices highest Bus/Slot to lowest\n" " tag_info: Set per-target tag depth\n" " global_tag_depth: Global tag depth for every target\n" " on every bus\n" @@ -885,7 +886,7 @@ ahc_linux_setup_tag_info_global(char *p) tags = simple_strtoul(p + 1, NULL, 0) & 0xff; printf("Setting Global Tags= %d\n", tags); - for (i = 0; i < ARRAY_SIZE(aic7xxx_tag_info); i++) { + for (i = 0; i < NUM_ELEMENTS(aic7xxx_tag_info); i++) { for (j = 0; j < AHC_NUM_TARGETS; j++) { aic7xxx_tag_info[i].tag_commands[j] = tags; } @@ -897,7 +898,7 @@ ahc_linux_setup_tag_info(u_long arg, int instance, int targ, int32_t value) { if ((instance >= 0) && (targ >= 0) - && (instance < ARRAY_SIZE(aic7xxx_tag_info)) + && (instance < NUM_ELEMENTS(aic7xxx_tag_info)) && (targ < AHC_NUM_TARGETS)) { aic7xxx_tag_info[instance].tag_commands[targ] = value & 0xff; if (bootverbose) @@ -1019,7 +1020,7 @@ aic7xxx_setup(char *s) end = strchr(s, '\0'); /* - * XXX ia64 gcc isn't smart enough to know that ARRAY_SIZE + * XXX ia64 gcc isn't smart enough to know that NUM_ELEMENTS * will never be 0 in this case. */ n = 0; @@ -1027,13 +1028,13 @@ aic7xxx_setup(char *s) while ((p = strsep(&s, ",.")) != NULL) { if (*p == '\0') continue; - for (i = 0; i < ARRAY_SIZE(options); i++) { + for (i = 0; i < NUM_ELEMENTS(options); i++) { n = strlen(options[i].name); if (strncmp(options[i].name, p, n) == 0) break; } - if (i == ARRAY_SIZE(options)) + if (i == NUM_ELEMENTS(options)) continue; if (strncmp(p, "global_tag_depth", n) == 0) { @@ -1359,7 +1360,7 @@ ahc_linux_user_tagdepth(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) tags = 0; if ((ahc->user_discenable & devinfo->target_mask) != 0) { - if (ahc->unit >= ARRAY_SIZE(aic7xxx_tag_info)) { + if (ahc->unit >= NUM_ELEMENTS(aic7xxx_tag_info)) { if (warned_user == 0) { printf(KERN_WARNING @@ -2335,7 +2336,7 @@ done: if (paused) ahc_unpause(ahc); if (wait) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); ahc->platform_data->eh_done = &done; ahc_unlock(ahc, &flags); @@ -2536,35 +2537,6 @@ static void ahc_linux_set_iu(struct scsi_target *starget, int iu) } #endif -static void ahc_linux_get_signalling(struct Scsi_Host *shost) -{ - struct ahc_softc *ahc = *(struct ahc_softc **)shost->hostdata; - unsigned long flags; - u8 mode; - - if (!(ahc->features & AHC_ULTRA2)) { - /* non-LVD chipset, may not have SBLKCTL reg */ - spi_signalling(shost) = - ahc->features & AHC_HVD ? - SPI_SIGNAL_HVD : - SPI_SIGNAL_SE; - return; - } - - ahc_lock(ahc, &flags); - ahc_pause(ahc); - mode = ahc_inb(ahc, SBLKCTL); - ahc_unpause(ahc); - ahc_unlock(ahc, &flags); - - if (mode & ENAB40) - spi_signalling(shost) = SPI_SIGNAL_LVD; - else if (mode & ENAB20) - spi_signalling(shost) = SPI_SIGNAL_SE; - else - spi_signalling(shost) = SPI_SIGNAL_UNKNOWN; -} - static struct spi_function_template ahc_linux_transport_functions = { .set_offset = ahc_linux_set_offset, .show_offset = 1, @@ -2580,7 +2552,6 @@ static struct spi_function_template ahc_linux_transport_functions = { .set_qas = ahc_linux_set_qas, .show_qas = 1, #endif - .get_signalling = ahc_linux_get_signalling, }; diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h index d42a71ee0..a20b08c9f 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.h +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h @@ -59,6 +59,7 @@ #ifndef _AIC7XXX_LINUX_H_ #define _AIC7XXX_LINUX_H_ +#include #include #include #include diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 7e42f07a2..0c9c2f400 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c @@ -375,7 +375,7 @@ ahc_pci_map_int(struct ahc_softc *ahc) int error; error = request_irq(ahc->dev_softc->irq, ahc_linux_isr, - IRQF_SHARED, "aic7xxx", ahc); + SA_SHIRQ, "aic7xxx", ahc); if (error == 0) ahc->platform_data->irq = ahc->dev_softc->irq; diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 63cab2d74..3adecef21 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c @@ -144,22 +144,16 @@ static ahc_device_setup_t ahc_aic785X_setup; static ahc_device_setup_t ahc_aic7860_setup; static ahc_device_setup_t ahc_apa1480_setup; static ahc_device_setup_t ahc_aic7870_setup; -static ahc_device_setup_t ahc_aic7870h_setup; static ahc_device_setup_t ahc_aha394X_setup; -static ahc_device_setup_t ahc_aha394Xh_setup; static ahc_device_setup_t ahc_aha494X_setup; -static ahc_device_setup_t ahc_aha494Xh_setup; static ahc_device_setup_t ahc_aha398X_setup; static ahc_device_setup_t ahc_aic7880_setup; -static ahc_device_setup_t ahc_aic7880h_setup; static ahc_device_setup_t ahc_aha2940Pro_setup; static ahc_device_setup_t ahc_aha394XU_setup; -static ahc_device_setup_t ahc_aha394XUh_setup; static ahc_device_setup_t ahc_aha398XU_setup; static ahc_device_setup_t ahc_aic7890_setup; static ahc_device_setup_t ahc_aic7892_setup; static ahc_device_setup_t ahc_aic7895_setup; -static ahc_device_setup_t ahc_aic7895h_setup; static ahc_device_setup_t ahc_aic7896_setup; static ahc_device_setup_t ahc_aic7899_setup; static ahc_device_setup_t ahc_aha29160C_setup; @@ -231,19 +225,19 @@ struct ahc_pci_identity ahc_pci_ident_table [] = ID_AHA_2944, ID_ALL_MASK, "Adaptec 2944 SCSI adapter", - ahc_aic7870h_setup + ahc_aic7870_setup }, { ID_AHA_3944, ID_ALL_MASK, "Adaptec 3944 SCSI adapter", - ahc_aha394Xh_setup + ahc_aha394X_setup }, { ID_AHA_4944, ID_ALL_MASK, "Adaptec 4944 SCSI adapter", - ahc_aha494Xh_setup + ahc_aha494X_setup }, /* aic7880 based controllers */ { @@ -262,13 +256,13 @@ struct ahc_pci_identity ahc_pci_ident_table [] = ID_AHA_2944U & ID_DEV_VENDOR_MASK, ID_DEV_VENDOR_MASK, "Adaptec 2944 Ultra SCSI adapter", - ahc_aic7880h_setup + ahc_aic7880_setup }, { ID_AHA_3944U & ID_DEV_VENDOR_MASK, ID_DEV_VENDOR_MASK, "Adaptec 3944 Ultra SCSI adapter", - ahc_aha394XUh_setup + ahc_aha394XU_setup }, { ID_AHA_398XU & ID_DEV_VENDOR_MASK, @@ -284,7 +278,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] = ID_AHA_4944U & ID_DEV_VENDOR_MASK, ID_DEV_VENDOR_MASK, "Adaptec 4944 Ultra SCSI adapter", - ahc_aic7880h_setup + ahc_aic7880_setup }, { ID_AHA_2930U & ID_DEV_VENDOR_MASK, @@ -420,7 +414,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] = ID_AHA_3944AU, ID_ALL_MASK, "Adaptec 3944A Ultra SCSI adapter", - ahc_aic7895h_setup + ahc_aic7895_setup }, { ID_AIC7895_ARO, @@ -559,7 +553,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] = } }; -const u_int ahc_num_pci_devs = ARRAY_SIZE(ahc_pci_ident_table); +const u_int ahc_num_pci_devs = NUM_ELEMENTS(ahc_pci_ident_table); #define AHC_394X_SLOT_CHANNEL_A 4 #define AHC_394X_SLOT_CHANNEL_B 5 @@ -2126,16 +2120,6 @@ ahc_aic7870_setup(struct ahc_softc *ahc) return (0); } -static int -ahc_aic7870h_setup(struct ahc_softc *ahc) -{ - int error = ahc_aic7870_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - static int ahc_aha394X_setup(struct ahc_softc *ahc) { @@ -2147,16 +2131,6 @@ ahc_aha394X_setup(struct ahc_softc *ahc) return (error); } -static int -ahc_aha394Xh_setup(struct ahc_softc *ahc) -{ - int error = ahc_aha394X_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - static int ahc_aha398X_setup(struct ahc_softc *ahc) { @@ -2179,16 +2153,6 @@ ahc_aha494X_setup(struct ahc_softc *ahc) return (error); } -static int -ahc_aha494Xh_setup(struct ahc_softc *ahc) -{ - int error = ahc_aha494X_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - static int ahc_aic7880_setup(struct ahc_softc *ahc) { @@ -2210,17 +2174,6 @@ ahc_aic7880_setup(struct ahc_softc *ahc) return (0); } -static int -ahc_aic7880h_setup(struct ahc_softc *ahc) -{ - int error = ahc_aic7880_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - - static int ahc_aha2940Pro_setup(struct ahc_softc *ahc) { @@ -2240,16 +2193,6 @@ ahc_aha394XU_setup(struct ahc_softc *ahc) return (error); } -static int -ahc_aha394XUh_setup(struct ahc_softc *ahc) -{ - int error = ahc_aha394XU_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - static int ahc_aha398XU_setup(struct ahc_softc *ahc) { @@ -2348,16 +2291,6 @@ ahc_aic7895_setup(struct ahc_softc *ahc) return (0); } -static int -ahc_aic7895h_setup(struct ahc_softc *ahc) -{ - int error = ahc_aic7895_setup(ahc); - - ahc->features |= AHC_HVD; - - return error; -} - static int ahc_aic7896_setup(struct ahc_softc *ahc) { diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c index 5914b4aa4..04a3506cf 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_proc.c +++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c @@ -77,9 +77,11 @@ static u_int ahc_calc_syncsrate(u_int period_factor) { int i; + int num_syncrates; + num_syncrates = sizeof(scsi_syncrates) / sizeof(scsi_syncrates[0]); /* See if the period is in the "exception" table */ - for (i = 0; i < ARRAY_SIZE(scsi_syncrates); i++) { + for (i = 0; i < num_syncrates; i++) { if (period_factor == scsi_syncrates[i].period_factor) { /* Period in kHz */ diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile index b98c5c105..8c91fda64 100644 --- a/drivers/scsi/aic7xxx/aicasm/Makefile +++ b/drivers/scsi/aic7xxx/aicasm/Makefile @@ -14,8 +14,6 @@ LIBS= -ldb clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG) # Override default kernel CFLAGS. This is a userland app. AICASM_CFLAGS:= -I/usr/include -I. -LEX= flex -YACC= bison YFLAGS= -d NOMAN= noman diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index ba3bccafe..770f1647e 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c @@ -249,6 +249,8 @@ #include #include /* for kmalloc() */ +#include /* for CONFIG_PCI */ + #define AIC7XXX_C_VERSION "5.2.6" #define ALL_TARGETS -1 @@ -1563,7 +1565,7 @@ aic7xxx_check_patch(struct aic7xxx_host *p, struct sequencer_patch *last_patch; int num_patches; - num_patches = ARRAY_SIZE(sequencer_patches); + num_patches = sizeof(sequencer_patches)/sizeof(struct sequencer_patch); last_patch = &sequencer_patches[num_patches]; cur_patch = *start_patch; @@ -8320,11 +8322,11 @@ aic7xxx_register(struct scsi_host_template *template, struct aic7xxx_host *p, } else { - result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_SHARED, + result = (request_irq(p->irq, do_aic7xxx_isr, SA_SHIRQ, "aic7xxx", p)); if (result < 0) { - result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_DISABLED | IRQF_SHARED, + result = (request_irq(p->irq, do_aic7xxx_isr, SA_INTERRUPT | SA_SHIRQ, "aic7xxx", p)); } } diff --git a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c index b07e4f04f..3bf334931 100644 --- a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c +++ b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c @@ -29,6 +29,7 @@ * $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $ *-M*************************************************************************/ +#include #define BLS (&aic7xxx_buffer[size]) #define HDRB \ diff --git a/drivers/scsi/amiga7xx.c b/drivers/scsi/amiga7xx.c index 9099d531d..c0844fa32 100644 --- a/drivers/scsi/amiga7xx.c +++ b/drivers/scsi/amiga7xx.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig index d006a8cb4..06d7601cd 100644 --- a/drivers/scsi/arm/Kconfig +++ b/drivers/scsi/arm/Kconfig @@ -69,7 +69,6 @@ comment "The following drivers are not fully supported" config SCSI_CUMANA_1 tristate "CumanaSCSI I support (EXPERIMENTAL)" depends on ARCH_ACORN && EXPERIMENTAL && SCSI - select SCSI_SPI_ATTRS help This enables support for the Cumana SCSI I card. If you have an Acorn system with one of these, say Y. If unsure, say N. @@ -77,7 +76,6 @@ config SCSI_CUMANA_1 config SCSI_ECOSCSI tristate "EcoScsi support (EXPERIMENTAL)" depends on ARCH_ACORN && EXPERIMENTAL && (ARCH_ARC || ARCH_A5K) && SCSI - select SCSI_SPI_ATTRS help This enables support for the EcoSCSI card -- a small card that sits in the Econet socket. If you have an Acorn system with one of these, @@ -86,7 +84,6 @@ config SCSI_ECOSCSI config SCSI_OAK1 tristate "Oak SCSI support (EXPERIMENTAL)" depends on ARCH_ACORN && EXPERIMENTAL && SCSI - select SCSI_SPI_ATTRS help This enables support for the Oak SCSI card. If you have an Acorn system with one of these, say Y. If unsure, say N. diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 7621e3fa3..dda5a5f79 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -129,6 +129,7 @@ #define STRx(x) STRINGIFY(x) #define NO_WRITE_STR STRx(NO_WRITE) +#include #include #include #include @@ -3030,7 +3031,7 @@ acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) if (!request_region(host->io_port, 2048, "acornscsi(ram)")) goto err_5; - ret = request_irq(host->irq, acornscsi_intr, IRQF_DISABLED, "acornscsi", ashost); + ret = request_irq(host->irq, acornscsi_intr, SA_INTERRUPT, "acornscsi", ashost); if (ret) { printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n", host->host_no, ashost->scsi.irq, ret); diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 3bdfc3648..e6c9491dc 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c @@ -277,7 +277,7 @@ cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0; outb(0x00, host->io_port - 577); - ret = request_irq(host->irq, cumanascsi_intr, IRQF_DISABLED, + ret = request_irq(host->irq, cumanascsi_intr, SA_INTERRUPT, "CumanaSCSI-1", host); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 719af0dcc..fad210926 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c @@ -460,7 +460,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id) goto out_free; ret = request_irq(ec->irq, cumanascsi_2_intr, - IRQF_DISABLED, "cumanascsi2", info); + SA_INTERRUPT, "cumanascsi2", info); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", host->host_no, ec->irq, ret); diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 4cf7afc31..3e1053f11 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c @@ -2427,7 +2427,7 @@ int fas216_eh_abort(Scsi_Cmnd *SCpnt) info->stats.aborts += 1; printk(KERN_WARNING "scsi%d: abort command ", info->host->host_no); - __scsi_print_command(SCpnt->cmnd); + __scsi_print_command(SCpnt->data_cmnd); print_debug_list(); fas216_dumpstate(info); diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index b2c346a47..3d69f6c45 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c @@ -373,7 +373,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id) goto out_free; ret = request_irq(ec->irq, powertecscsi_intr, - IRQF_DISABLED, "powertec", info); + SA_INTERRUPT, "powertec", info); if (ret) { printk("scsi%d: IRQ%d not free: %d\n", host->host_no, ec->irq, ret); diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index 8caa5903c..b10750bb5 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c @@ -118,7 +118,8 @@ int __queue_add(Queue_t *queue, Scsi_Cmnd *SCpnt, int head) list_del(l); q = list_entry(l, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_FREE)); + if (BAD_MAGIC(q, QUEUE_MAGIC_FREE)) + BUG(); SET_MAGIC(q, QUEUE_MAGIC_USED); q->SCpnt = SCpnt; @@ -143,7 +144,8 @@ static Scsi_Cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) */ list_del(ent); q = list_entry(ent, QE_t, list); - BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_USED)); + if (BAD_MAGIC(q, QUEUE_MAGIC_USED)) + BUG(); SET_MAGIC(q, QUEUE_MAGIC_FREE); list_add(ent, &queue->free); diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h index 8c2600ffc..6dd544a5e 100644 --- a/drivers/scsi/arm/scsi.h +++ b/drivers/scsi/arm/scsi.h @@ -74,7 +74,7 @@ static inline void init_SCp(Scsi_Cmnd *SCpnt) unsigned long len = 0; int buf; - SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer; + SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->buffer; SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1; SCpnt->SCp.ptr = (char *) (page_address(SCpnt->SCp.buffer->page) + diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index a9bb3cb7e..6dc88149f 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c @@ -93,7 +93,7 @@ #include #define DRV_NAME "ata_piix" -#define DRV_VERSION "2.00" +#define DRV_VERSION "1.05" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ @@ -105,6 +105,9 @@ enum { PIIX_FLAG_SCR = (1 << 26), /* SCR available */ PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */ PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */ + PIIX_FLAG_COMBINED = (1 << 29), /* combined mode possible */ + /* ICH6/7 use different scheme for map value */ + PIIX_FLAG_COMBINED_ICH6 = PIIX_FLAG_COMBINED | (1 << 30), /* combined mode. if set, PATA is channel 0. * if clear, PATA is channel 1. @@ -123,8 +126,6 @@ enum { ich6_sata = 4, ich6_sata_ahci = 5, ich6m_sata_ahci = 6, - ich7m_sata_ahci = 7, - ich8_sata_ahci = 8, /* constants for mapping table */ P0 = 0, /* port 0 */ @@ -140,23 +141,16 @@ enum { struct piix_map_db { const u32 mask; - const u16 port_enable; - const int present_shift; const int map[][4]; }; -struct piix_host_priv { - const int *map; - const struct piix_map_db *map_db; -}; - static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); -static void piix_host_stop(struct ata_host_set *host_set); + +static int piix_pata_probe_reset(struct ata_port *ap, unsigned int *classes); +static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes); static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev); static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev); -static void piix_pata_error_handler(struct ata_port *ap); -static void piix_sata_error_handler(struct ata_port *ap); static unsigned int in_module_init = 1; @@ -165,7 +159,6 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x7111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, piix4_pata }, { 0x8086, 0x24db, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata }, { 0x8086, 0x25a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata }, - { 0x8086, 0x27df, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich5_pata }, #endif /* NOTE: The following PCI ids must be kept in sync with the @@ -189,15 +182,15 @@ static const struct pci_device_id piix_pci_tbl[] = { /* 82801GB/GR/GH (ICH7, identical to ICH6) */ { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ - { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci }, + { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, /* Enterprise Southbridge 2 (where's the datasheet?) */ { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ - { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, /* SATA Controller 2 IDE (ICH8, ditto) */ - { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, /* Mobile SATA Controller IDE (ICH8M, ditto) */ - { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, + { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, { } /* terminate list */ }; @@ -225,7 +218,6 @@ static struct scsi_host_template piix_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, .resume = ata_scsi_device_resume, .suspend = ata_scsi_device_suspend, @@ -235,7 +227,6 @@ static const struct ata_port_operations piix_pata_ops = { .port_disable = ata_port_disable, .set_piomode = piix_set_piomode, .set_dmamode = piix_set_dmamode, - .mode_filter = ata_pci_default_filter, .tf_load = ata_tf_load, .tf_read = ata_tf_read, @@ -243,25 +234,23 @@ static const struct ata_port_operations piix_pata_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .probe_reset = piix_pata_probe_reset, + .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = piix_pata_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .port_start = ata_port_start, .port_stop = ata_port_stop, - .host_stop = piix_host_stop, + .host_stop = ata_host_stop, }; static const struct ata_port_operations piix_sata_ops = { @@ -273,31 +262,27 @@ static const struct ata_port_operations piix_sata_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .probe_reset = piix_sata_probe_reset, + .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = piix_sata_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .port_start = ata_port_start, .port_stop = ata_port_stop, - .host_stop = piix_host_stop, + .host_stop = ata_host_stop, }; -static const struct piix_map_db ich5_map_db = { +static struct piix_map_db ich5_map_db = { .mask = 0x7, - .port_enable = 0x3, - .present_shift = 4, .map = { /* PM PS SM SS MAP */ { P0, NA, P1, NA }, /* 000b */ @@ -311,10 +296,8 @@ static const struct piix_map_db ich5_map_db = { }, }; -static const struct piix_map_db ich6_map_db = { +static struct piix_map_db ich6_map_db = { .mask = 0x3, - .port_enable = 0xf, - .present_shift = 4, .map = { /* PM PS SM SS MAP */ { P0, P2, P1, P3 }, /* 00b */ @@ -324,10 +307,8 @@ static const struct piix_map_db ich6_map_db = { }, }; -static const struct piix_map_db ich6m_map_db = { +static struct piix_map_db ich6m_map_db = { .mask = 0x3, - .port_enable = 0x5, - .present_shift = 4, .map = { /* PM PS SM SS MAP */ { P0, P2, RV, RV }, /* 00b */ @@ -337,47 +318,6 @@ static const struct piix_map_db ich6m_map_db = { }, }; -static const struct piix_map_db ich7m_map_db = { - .mask = 0x3, - .port_enable = 0x5, - .present_shift = 4, - - /* Map 01b isn't specified in the doc but some notebooks use - * it anyway. ATM, the only case spotted carries subsystem ID - * 1025:0107. This is the only difference from ich6m. - */ - .map = { - /* PM PS SM SS MAP */ - { P0, P2, RV, RV }, /* 00b */ - { IDE, IDE, P1, P3 }, /* 01b */ - { P0, P2, IDE, IDE }, /* 10b */ - { RV, RV, RV, RV }, - }, -}; - -static const struct piix_map_db ich8_map_db = { - .mask = 0x3, - .port_enable = 0x3, - .present_shift = 8, - .map = { - /* PM PS SM SS MAP */ - { P0, NA, P1, NA }, /* 00b (hardwired) */ - { RV, RV, RV, RV }, - { RV, RV, RV, RV }, /* 10b (never) */ - { RV, RV, RV, RV }, - }, -}; - -static const struct piix_map_db *piix_map_db_table[] = { - [ich5_sata] = &ich5_map_db, - [esb_sata] = &ich5_map_db, - [ich6_sata] = &ich6_map_db, - [ich6_sata_ahci] = &ich6_map_db, - [ich6m_sata_ahci] = &ich6m_map_db, - [ich7m_sata_ahci] = &ich7m_map_db, - [ich8_sata_ahci] = &ich8_map_db, -}; - static struct ata_port_info piix_port_info[] = { /* piix4_pata */ { @@ -410,82 +350,63 @@ static struct ata_port_info piix_port_info[] = { /* ich5_sata */ { .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR | - PIIX_FLAG_IGNORE_PCS, + .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED | + PIIX_FLAG_CHECKINTR, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &piix_sata_ops, + .private_data = &ich5_map_db, }, /* i6300esb_sata */ { .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | + .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR | PIIX_FLAG_IGNORE_PCS, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &piix_sata_ops, + .private_data = &ich5_map_db, }, /* ich6_sata */ { .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | + .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &piix_sata_ops, + .private_data = &ich6_map_db, }, /* ich6_sata_ahci */ { .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | + .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | PIIX_FLAG_AHCI, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &piix_sata_ops, + .private_data = &ich6_map_db, }, /* ich6m_sata_ahci */ { .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | - PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | - PIIX_FLAG_AHCI, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = 0x7f, /* udma0-6 */ - .port_ops = &piix_sata_ops, - }, - - /* ich7m_sata_ahci */ - { - .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | - PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | - PIIX_FLAG_AHCI, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = 0x7f, /* udma0-6 */ - .port_ops = &piix_sata_ops, - }, - - /* ich8_sata_ahci */ - { - .sht = &piix_sht, - .host_flags = ATA_FLAG_SATA | + .host_flags = ATA_FLAG_SATA | PIIX_FLAG_COMBINED_ICH6 | PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR | PIIX_FLAG_AHCI, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &piix_sata_ops, + .private_data = &ich6m_map_db, }, }; @@ -500,11 +421,6 @@ MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, piix_pci_tbl); MODULE_VERSION(DRV_VERSION); -static int force_pcs = 0; -module_param(force_pcs, int, 0444); -MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around " - "device mis-detection (0=default, 1=ignore PCS, 2=honor PCS)"); - /** * piix_pata_cbl_detect - Probe host controller cable detect info * @ap: Port for which cable detect info is desired @@ -539,70 +455,97 @@ cbl40: } /** - * piix_pata_prereset - prereset for PATA host controller + * piix_pata_probeinit - probeinit for PATA host controller * @ap: Target port * - * Prereset including cable detection. + * Probeinit including cable detection. * * LOCKING: * None (inherited from caller). */ -static int piix_pata_prereset(struct ata_port *ap) +static void piix_pata_probeinit(struct ata_port *ap) +{ + piix_pata_cbl_detect(ap); + ata_std_probeinit(ap); +} + +/** + * piix_pata_probe_reset - Perform reset on PATA port and classify + * @ap: Port to reset + * @classes: Resulting classes of attached devices + * + * Reset PATA phy and classify attached devices. + * + * LOCKING: + * None (inherited from caller). + */ +static int piix_pata_probe_reset(struct ata_port *ap, unsigned int *classes) { struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) { - ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); - ap->eh_context.i.action &= ~ATA_EH_RESET_MASK; + printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); return 0; } - piix_pata_cbl_detect(ap); - - return ata_std_prereset(ap); -} - -static void piix_pata_error_handler(struct ata_port *ap) -{ - ata_bmdma_drive_eh(ap, piix_pata_prereset, ata_std_softreset, NULL, - ata_std_postreset); + return ata_drive_probe_reset(ap, piix_pata_probeinit, + ata_std_softreset, NULL, + ata_std_postreset, classes); } /** - * piix_sata_present_mask - determine present mask for SATA host controller - * @ap: Target port + * piix_sata_probe - Probe PCI device for present SATA devices + * @ap: Port associated with the PCI device we wish to probe * - * Reads SATA PCI device's PCI config register Port Configuration - * and Status (PCS) to determine port and device availability. + * Reads and configures SATA PCI device's PCI config register + * Port Configuration and Status (PCS) to determine port and + * device availability. * * LOCKING: * None (inherited from caller). * * RETURNS: - * determined present_mask + * Mask of avaliable devices on the port. */ -static unsigned int piix_sata_present_mask(struct ata_port *ap) +static unsigned int piix_sata_probe (struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); - struct piix_host_priv *hpriv = ap->host_set->private_data; - const unsigned int *map = hpriv->map; + const unsigned int *map = ap->host_set->private_data; int base = 2 * ap->hard_port_no; unsigned int present_mask = 0; int port, i; - u16 pcs; + u8 pcs; - pci_read_config_word(pdev, ICH5_PCS, &pcs); + pci_read_config_byte(pdev, ICH5_PCS, &pcs); DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base); + /* enable all ports on this ap and wait for them to settle */ + for (i = 0; i < 2; i++) { + port = map[base + i]; + if (port >= 0) + pcs |= 1 << port; + } + + pci_write_config_byte(pdev, ICH5_PCS, pcs); + msleep(100); + + /* let's see which devices are present */ + pci_read_config_byte(pdev, ICH5_PCS, &pcs); + for (i = 0; i < 2; i++) { port = map[base + i]; if (port < 0) continue; - if ((ap->flags & PIIX_FLAG_IGNORE_PCS) || - (pcs & 1 << (hpriv->map_db->present_shift + port))) + if (ap->flags & PIIX_FLAG_IGNORE_PCS || pcs & 1 << (4 + port)) present_mask |= 1 << i; + else + pcs &= ~(1 << port); } + /* disable offline ports on non-AHCI controllers */ + if (!(ap->flags & PIIX_FLAG_AHCI)) + pci_write_config_byte(pdev, ICH5_PCS, pcs); + DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n", ap->id, pcs, present_mask); @@ -610,43 +553,25 @@ static unsigned int piix_sata_present_mask(struct ata_port *ap) } /** - * piix_sata_softreset - reset SATA host port via ATA SRST - * @ap: port to reset - * @classes: resulting classes of attached devices + * piix_sata_probe_reset - Perform reset on SATA port and classify + * @ap: Port to reset + * @classes: Resulting classes of attached devices * - * Reset SATA host port via ATA SRST. On controllers with - * reliable PCS present bits, the bits are used to determine - * device presence. + * Reset SATA phy and classify attached devices. * * LOCKING: - * Kernel thread context (may sleep) - * - * RETURNS: - * 0 on success, -errno otherwise. + * None (inherited from caller). */ -static int piix_sata_softreset(struct ata_port *ap, unsigned int *classes) +static int piix_sata_probe_reset(struct ata_port *ap, unsigned int *classes) { - unsigned int present_mask; - int i, rc; - - present_mask = piix_sata_present_mask(ap); - - rc = ata_std_softreset(ap, classes); - if (rc) - return rc; - - for (i = 0; i < ATA_MAX_DEVICES; i++) { - if (!(present_mask & (1 << i))) - classes[i] = ATA_DEV_NONE; + if (!piix_sata_probe(ap)) { + printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id); + return 0; } - return 0; -} - -static void piix_sata_error_handler(struct ata_port *ap) -{ - ata_bmdma_drive_eh(ap, ata_std_prereset, piix_sata_softreset, NULL, - ata_std_postreset); + return ata_drive_probe_reset(ap, ata_std_probeinit, + ata_std_softreset, NULL, + ata_std_postreset, classes); } /** @@ -835,53 +760,23 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev) pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); pci_read_config_word(pdev, 0x41, &cfg); /* Only on the original revision: IDE DMA can hang */ - if (rev == 0x00) + if(rev == 0x00) no_piix_dma = 1; /* On all revisions below 5 PXB bus lock must be disabled for IDE */ - else if (cfg & (1<<14) && rev < 5) + else if(cfg & (1<<14) && rev < 5) no_piix_dma = 2; } - if (no_piix_dma) + if(no_piix_dma) dev_printk(KERN_WARNING, &ata_dev->dev, "450NX errata present, disabling IDE DMA.\n"); - if (no_piix_dma == 2) + if(no_piix_dma == 2) dev_printk(KERN_WARNING, &ata_dev->dev, "A BIOS update may resolve this.\n"); return no_piix_dma; } -static void __devinit piix_init_pcs(struct pci_dev *pdev, - struct ata_port_info *pinfo, - const struct piix_map_db *map_db) -{ - u16 pcs, new_pcs; - - pci_read_config_word(pdev, ICH5_PCS, &pcs); - - new_pcs = pcs | map_db->port_enable; - - if (new_pcs != pcs) { - DPRINTK("updating PCS from 0x%x to 0x%x\n", pcs, new_pcs); - pci_write_config_word(pdev, ICH5_PCS, new_pcs); - msleep(150); - } - - if (force_pcs == 1) { - dev_printk(KERN_INFO, &pdev->dev, - "force ignoring PCS (0x%x)\n", new_pcs); - pinfo[0].host_flags |= PIIX_FLAG_IGNORE_PCS; - pinfo[1].host_flags |= PIIX_FLAG_IGNORE_PCS; - } else if (force_pcs == 2) { - dev_printk(KERN_INFO, &pdev->dev, - "force honoring PCS (0x%x)\n", new_pcs); - pinfo[0].host_flags &= ~PIIX_FLAG_IGNORE_PCS; - pinfo[1].host_flags &= ~PIIX_FLAG_IGNORE_PCS; - } -} - static void __devinit piix_init_sata_map(struct pci_dev *pdev, - struct ata_port_info *pinfo, - const struct piix_map_db *map_db) + struct ata_port_info *pinfo) { - struct piix_host_priv *hpriv = pinfo[0].private_data; + struct piix_map_db *map_db = pinfo[0].private_data; const unsigned int *map; int i, invalid_map = 0; u8 map_value; @@ -905,7 +800,6 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, case IDE: WARN_ON((i & 1) || map[i + 1] != IDE); pinfo[i / 2] = piix_port_info[ich5_pata]; - pinfo[i / 2].private_data = hpriv; i++; printk(" IDE IDE"); break; @@ -923,8 +817,8 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, dev_printk(KERN_ERR, &pdev->dev, "invalid MAP value %u\n", map_value); - hpriv->map = map; - hpriv->map_db = map_db; + pinfo[0].private_data = (void *)map; + pinfo[1].private_data = (void *)map; } /** @@ -947,7 +841,6 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) static int printed_version; struct ata_port_info port_info[2]; struct ata_port_info *ppinfo[2] = { &port_info[0], &port_info[1] }; - struct piix_host_priv *hpriv; unsigned long host_flags; if (!printed_version++) @@ -958,14 +851,8 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if (!in_module_init) return -ENODEV; - hpriv = kzalloc(sizeof(*hpriv), GFP_KERNEL); - if (!hpriv) - return -ENOMEM; - port_info[0] = piix_port_info[ent->driver_data]; port_info[1] = piix_port_info[ent->driver_data]; - port_info[0].private_data = hpriv; - port_info[1].private_data = hpriv; host_flags = port_info[0].host_flags; @@ -980,12 +867,8 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) } /* Initialize SATA map */ - if (host_flags & ATA_FLAG_SATA) { - piix_init_sata_map(pdev, port_info, - piix_map_db_table[ent->driver_data]); - piix_init_pcs(pdev, port_info, - piix_map_db_table[ent->driver_data]); - } + if (host_flags & ATA_FLAG_SATA) + piix_init_sata_map(pdev, port_info); /* On ICH5, some BIOSen disable the interrupt using the * PCI_COMMAND_INTX_DISABLE bit added in PCI 2.3. @@ -1008,13 +891,6 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) return ata_pci_init_one(pdev, ppinfo, 2); } -static void piix_host_stop(struct ata_host_set *host_set) -{ - if (host_set->next == NULL) - kfree(host_set->private_data); - ata_host_stop(host_set); -} - static int __init piix_init(void) { int rc; diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index e397129c9..57295bcea 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c @@ -507,7 +507,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) */ if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; + cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.ptr = (char *)page_address(cmd->SCp.buffer->page)+ cmd->SCp.buffer->offset; @@ -524,6 +524,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) } } +#include #include #if NDEBUG diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index e1be4a438..f677c5a32 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c @@ -65,6 +65,7 @@ +#include #include #define NDEBUG (0) diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index 0ec41f34f..a198d8666 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c @@ -473,7 +473,7 @@ go_42: */ if (workreq->use_sg) { pci_unmap_sg(dev->pdev, - (struct scatterlist *)workreq->request_buffer, + (struct scatterlist *)workreq->buffer, workreq->use_sg, workreq->sc_data_direction); } else if (workreq->request_bufflen && @@ -2625,32 +2625,29 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) unsigned int base_io, tmport, error,n; unsigned char host_id; struct Scsi_Host *shpnt = NULL; - struct atp_unit *atpdev, *p; + struct atp_unit atp_dev, *p; unsigned char setupdata[2][16]; int count = 0; - - atpdev = kzalloc(sizeof(*atpdev), GFP_KERNEL); - if (!atpdev) - return -ENOMEM; - + if (pci_enable_device(pdev)) - goto err_eio; + return -EIO; if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); } else { printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); - goto err_eio; + return -EIO; } + memset(&atp_dev, 0, sizeof atp_dev); /* * It's probably easier to weed out some revisions like * this than via the PCI device table */ if (ent->device == PCI_DEVICE_ID_ARTOP_AEC7610) { - error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atpdev->chip_ver); - if (atpdev->chip_ver < 2) - goto err_eio; + error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atp_dev.chip_ver); + if (atp_dev.chip_ver < 2) + return -EIO; } switch (ent->device) { @@ -2659,15 +2656,15 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) case ATP880_DEVID1: case ATP880_DEVID2: case ATP885_DEVID: - atpdev->chip_ver = 0x04; + atp_dev.chip_ver = 0x04; default: break; } base_io = pci_resource_start(pdev, 0); base_io &= 0xfffffff8; - + if ((ent->device == ATP880_DEVID1)||(ent->device == ATP880_DEVID2)) { - error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atpdev->chip_ver); + error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atp_dev.chip_ver); pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x80);//JCC082803 host_id = inb(base_io + 0x39); @@ -2675,17 +2672,17 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent) printk(KERN_INFO " ACARD AEC-67160 PCI Ultra3 LVD Host Adapter: %d" " IO:%x, IRQ:%d.\n", count, base_io, pdev->irq); - atpdev->ioport[0] = base_io + 0x40; - atpdev->pciport[0] = base_io + 0x28; - atpdev->dev_id = ent->device; - atpdev->host_id[0] = host_id; + atp_dev.ioport[0] = base_io + 0x40; + atp_dev.pciport[0] = base_io + 0x28; + atp_dev.dev_id = ent->device; + atp_dev.host_id[0] = host_id; tmport = base_io + 0x22; - atpdev->scam_on = inb(tmport); + atp_dev.scam_on = inb(tmport); tmport += 0x13; - atpdev->global_map[0] = inb(tmport); + atp_dev.global_map[0] = inb(tmport); tmport += 0x07; - atpdev->ultra_map[0] = inw(tmport); + atp_dev.ultra_map[0] = inw(tmport); n = 0x3f09; next_fblk_880: @@ -2698,63 +2695,63 @@ next_fblk_880: if (inb(base_io + 0x30) == 0xff) goto flash_ok_880; - atpdev->sp[0][m++] = inb(base_io + 0x30); - atpdev->sp[0][m++] = inb(base_io + 0x31); - atpdev->sp[0][m++] = inb(base_io + 0x32); - atpdev->sp[0][m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atpdev->sp[0][m++] = inb(base_io + 0x30); - atpdev->sp[0][m++] = inb(base_io + 0x31); - atpdev->sp[0][m++] = inb(base_io + 0x32); - atpdev->sp[0][m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atpdev->sp[0][m++] = inb(base_io + 0x30); - atpdev->sp[0][m++] = inb(base_io + 0x31); - atpdev->sp[0][m++] = inb(base_io + 0x32); - atpdev->sp[0][m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); outw(n, base_io + 0x34); n += 0x0002; - atpdev->sp[0][m++] = inb(base_io + 0x30); - atpdev->sp[0][m++] = inb(base_io + 0x31); - atpdev->sp[0][m++] = inb(base_io + 0x32); - atpdev->sp[0][m++] = inb(base_io + 0x33); + atp_dev.sp[0][m++] = inb(base_io + 0x30); + atp_dev.sp[0][m++] = inb(base_io + 0x31); + atp_dev.sp[0][m++] = inb(base_io + 0x32); + atp_dev.sp[0][m++] = inb(base_io + 0x33); n += 0x0018; goto next_fblk_880; flash_ok_880: outw(0, base_io + 0x34); - atpdev->ultra_map[0] = 0; - atpdev->async[0] = 0; + atp_dev.ultra_map[0] = 0; + atp_dev.async[0] = 0; for (k = 0; k < 16; k++) { n = 1; n = n << k; - if (atpdev->sp[0][k] > 1) { - atpdev->ultra_map[0] |= n; + if (atp_dev.sp[0][k] > 1) { + atp_dev.ultra_map[0] |= n; } else { - if (atpdev->sp[0][k] == 0) - atpdev->async[0] |= n; + if (atp_dev.sp[0][k] == 0) + atp_dev.async[0] |= n; } } - atpdev->async[0] = ~(atpdev->async[0]); - outb(atpdev->global_map[0], base_io + 0x35); + atp_dev.async[0] = ~(atp_dev.async[0]); + outb(atp_dev.global_map[0], base_io + 0x35); shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); if (!shpnt) - goto err_nomem; + return -ENOMEM; p = (struct atp_unit *)&shpnt->hostdata; - atpdev->host = shpnt; - atpdev->pdev = pdev; + atp_dev.host = shpnt; + atp_dev.pdev = pdev; pci_set_drvdata(pdev, p); - memcpy(p, atpdev, sizeof(*atpdev)); + memcpy(p, &atp_dev, sizeof atp_dev); if (atp870u_init_tables(shpnt) < 0) { printk(KERN_ERR "Unable to allocate tables for Acard controller\n"); goto unregister; } - if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp880i", shpnt)) { + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp880i", shpnt)) { printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); goto free_tables; } @@ -2801,31 +2798,31 @@ flash_ok_880: printk(KERN_INFO " ACARD AEC-67162 PCI Ultra3 LVD Host Adapter: IO:%x, IRQ:%d.\n" , base_io, pdev->irq); - atpdev->pdev = pdev; - atpdev->dev_id = ent->device; - atpdev->baseport = base_io; - atpdev->ioport[0] = base_io + 0x80; - atpdev->ioport[1] = base_io + 0xc0; - atpdev->pciport[0] = base_io + 0x40; - atpdev->pciport[1] = base_io + 0x50; + atp_dev.pdev = pdev; + atp_dev.dev_id = ent->device; + atp_dev.baseport = base_io; + atp_dev.ioport[0] = base_io + 0x80; + atp_dev.ioport[1] = base_io + 0xc0; + atp_dev.pciport[0] = base_io + 0x40; + atp_dev.pciport[1] = base_io + 0x50; shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); if (!shpnt) - goto err_nomem; + return -ENOMEM; p = (struct atp_unit *)&shpnt->hostdata; - atpdev->host = shpnt; - atpdev->pdev = pdev; + atp_dev.host = shpnt; + atp_dev.pdev = pdev; pci_set_drvdata(pdev, p); - memcpy(p, atpdev, sizeof(struct atp_unit)); + memcpy(p, &atp_dev, sizeof(struct atp_unit)); if (atp870u_init_tables(shpnt) < 0) goto unregister; #ifdef ED_DBGP printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); #endif - if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870u", shpnt)) { + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n"); goto free_tables; } @@ -2977,43 +2974,43 @@ flash_ok_885: printk(KERN_INFO " ACARD AEC-671X PCI Ultra/W SCSI-2/3 Host Adapter: %d " "IO:%x, IRQ:%d.\n", count, base_io, pdev->irq); - atpdev->ioport[0] = base_io; - atpdev->pciport[0] = base_io + 0x20; - atpdev->dev_id = ent->device; + atp_dev.ioport[0] = base_io; + atp_dev.pciport[0] = base_io + 0x20; + atp_dev.dev_id = ent->device; host_id &= 0x07; - atpdev->host_id[0] = host_id; + atp_dev.host_id[0] = host_id; tmport = base_io + 0x22; - atpdev->scam_on = inb(tmport); + atp_dev.scam_on = inb(tmport); tmport += 0x0b; - atpdev->global_map[0] = inb(tmport++); - atpdev->ultra_map[0] = inw(tmport); + atp_dev.global_map[0] = inb(tmport++); + atp_dev.ultra_map[0] = inw(tmport); - if (atpdev->ultra_map[0] == 0) { - atpdev->scam_on = 0x00; - atpdev->global_map[0] = 0x20; - atpdev->ultra_map[0] = 0xffff; + if (atp_dev.ultra_map[0] == 0) { + atp_dev.scam_on = 0x00; + atp_dev.global_map[0] = 0x20; + atp_dev.ultra_map[0] = 0xffff; } shpnt = scsi_host_alloc(&atp870u_template, sizeof(struct atp_unit)); if (!shpnt) - goto err_nomem; + return -ENOMEM; p = (struct atp_unit *)&shpnt->hostdata; - atpdev->host = shpnt; - atpdev->pdev = pdev; + atp_dev.host = shpnt; + atp_dev.pdev = pdev; pci_set_drvdata(pdev, p); - memcpy(p, atpdev, sizeof(*atpdev)); + memcpy(p, &atp_dev, sizeof atp_dev); if (atp870u_init_tables(shpnt) < 0) goto unregister; - if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870i", shpnt)) { + if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870i", shpnt)) { printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); goto free_tables; } spin_lock_irqsave(shpnt->host_lock, flags); - if (atpdev->chip_ver > 0x07) { /* check if atp876 chip then enable terminator */ + if (atp_dev.chip_ver > 0x07) { /* check if atp876 chip then enable terminator */ tmport = base_io + 0x3e; outb(0x00, tmport); } @@ -3047,10 +3044,10 @@ flash_ok_885: outb((inb(tmport) & 0xef), tmport); tmport++; outb((inb(tmport) | 0x20), tmport); - if (atpdev->chip_ver == 4) + if (atp_dev.chip_ver == 4) shpnt->max_id = 16; else - shpnt->max_id = 8; + shpnt->max_id = 7; shpnt->this_id = host_id; shpnt->unique_id = base_io; shpnt->io_port = base_io; @@ -3096,12 +3093,6 @@ unregister: printk("atp870u_prob:unregister\n"); scsi_host_put(shpnt); return -1; -err_eio: - kfree(atpdev); - return -EIO; -err_nomem: - kfree(atpdev); - return -ENOMEM; } /* The abort command does not leave the device in a clean state where diff --git a/drivers/scsi/blz1230.c b/drivers/scsi/blz1230.c index 329a8f297..3867ac2de 100644 --- a/drivers/scsi/blz1230.c +++ b/drivers/scsi/blz1230.c @@ -172,7 +172,7 @@ int __init blz1230_esp_detect(struct scsi_host_template *tpnt) esp->irq = IRQ_AMIGA_PORTS; esp->slot = board+REAL_BLZ1230_ESP_ADDR; - if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "Blizzard 1230 SCSI IV", esp->ehost)) goto err_out; diff --git a/drivers/scsi/blz2060.c b/drivers/scsi/blz2060.c index b6c137b97..4ebe69e32 100644 --- a/drivers/scsi/blz2060.c +++ b/drivers/scsi/blz2060.c @@ -146,7 +146,7 @@ int __init blz2060_esp_detect(struct scsi_host_template *tpnt) esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); esp->irq = IRQ_AMIGA_PORTS; - request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "Blizzard 2060 SCSI", esp->ehost); /* Figure out our scsi ID on the bus */ diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index f6caa4307..d9abd1645 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c @@ -7,6 +7,7 @@ #define VERSION "0.25" +#include #include #include #include diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 61f6024b6..30a335349 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c @@ -5,17 +5,17 @@ * Additions for SCSI 3+ (SPC-3 T10/1416-D Rev 07 3 May 2002) * by D. Gilbert and aeb (20020609) * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025 - * Update to SPC-4 T10/1713-D Rev 5a, 14 June 2006, D. Gilbert 20060702 */ +#include #include #include #include #include -#include #include #include +#include #include #include @@ -37,56 +37,55 @@ static const char * cdb_byte0_names[] = { /* 00-03 */ "Test Unit Ready", "Rezero Unit/Rewind", NULL, "Request Sense", /* 04-07 */ "Format Unit/Medium", "Read Block Limits", NULL, "Reasssign Blocks", -/* 08-0d */ "Read(6)", NULL, "Write(6)", "Seek(6)", NULL, NULL, +/* 08-0d */ "Read (6)", NULL, "Write (6)", "Seek (6)", NULL, NULL, /* 0e-12 */ NULL, "Read Reverse", "Write Filemarks", "Space", "Inquiry", -/* 13-16 */ "Verify(6)", "Recover Buffered Data", "Mode Select(6)", - "Reserve(6)", -/* 17-1a */ "Release(6)", "Copy", "Erase", "Mode Sense(6)", +/* 13-16 */ "Verify (6)", "Recover Buffered Data", "Mode Select (6)", + "Reserve (6)", +/* 17-1a */ "Release (6)", "Copy", "Erase", "Mode Sense (6)", /* 1b-1d */ "Start/Stop Unit", "Receive Diagnostic", "Send Diagnostic", /* 1e-1f */ "Prevent/Allow Medium Removal", NULL, /* 20-22 */ NULL, NULL, NULL, /* 23-28 */ "Read Format Capacities", "Set Window", - "Read Capacity(10)", NULL, NULL, "Read(10)", -/* 29-2d */ "Read Generation", "Write(10)", "Seek(10)", "Erase(10)", - "Read updated block", -/* 2e-31 */ "Write Verify(10)", "Verify(10)", "Search High", "Search Equal", + "Read Capacity (10)", NULL, NULL, "Read (10)", +/* 29-2d */ "Read Generation", "Write (10)", "Seek (10)", "Erase (10)", + "Read updated block", +/* 2e-31 */ "Write Verify (10)", "Verify (10)", "Search High", "Search Equal", /* 32-34 */ "Search Low", "Set Limits", "Prefetch/Read Position", -/* 35-37 */ "Synchronize Cache(10)", "Lock/Unlock Cache(10)", +/* 35-37 */ "Synchronize Cache (10)", "Lock/Unlock Cache (10)", "Read Defect Data(10)", /* 38-3c */ "Medium Scan", "Compare", "Copy Verify", "Write Buffer", "Read Buffer", -/* 3d-3f */ "Update Block", "Read Long(10)", "Write Long(10)", -/* 40-41 */ "Change Definition", "Write Same(10)", +/* 3d-3f */ "Update Block", "Read Long (10)", "Write Long (10)", +/* 40-41 */ "Change Definition", "Write Same (10)", /* 42-48 */ "Read sub-channel", "Read TOC/PMA/ATIP", "Read density support", - "Play audio(10)", "Get configuration", "Play audio msf", + "Play audio (10)", "Get configuration", "Play audio msf", "Play audio track/index", -/* 49-4f */ "Play track relative(10)", "Get event status notification", +/* 49-4f */ "Play track relative (10)", "Get event status notification", "Pause/resume", "Log Select", "Log Sense", "Stop play/scan", NULL, /* 50-55 */ "Xdwrite", "Xpwrite, Read disk info", "Xdread, Read track info", - "Reserve track", "Send OPC info", "Mode Select(10)", -/* 56-5b */ "Reserve(10)", "Release(10)", "Repair track", "Read master cue", - "Mode Sense(10)", "Close track/session", + "Reserve track", "Send OPC info", "Mode Select (10)", +/* 56-5b */ "Reserve (10)", "Release (10)", "Repair track", "Read master cue", + "Mode Sense (10)", "Close track/session", /* 5c-5f */ "Read buffer capacity", "Send cue sheet", "Persistent reserve in", "Persistent reserve out", /* 60-67 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 68-6f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 70-77 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 78-7f */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Variable length", -/* 80-84 */ "Xdwrite(16)", "Rebuild(16)", "Regenerate(16)", "Extended copy", +/* 80-84 */ "Xdwrite (16)", "Rebuild (16)", "Regenerate (16)", "Extended copy", "Receive copy results", -/* 85-89 */ "ATA command pass through(16)", "Access control in", - "Access control out", "Read(16)", "Memory Export Out(16)", -/* 8a-8f */ "Write(16)", NULL, "Read attributes", "Write attributes", - "Write and verify(16)", "Verify(16)", -/* 90-94 */ "Pre-fetch(16)", "Synchronize cache(16)", - "Lock/unlock cache(16)", "Write same(16)", NULL, +/* 85-89 */ "Memory Export In (16)", "Access control in", "Access control out", + "Read (16)", "Memory Export Out (16)", +/* 8a-8f */ "Write (16)", NULL, "Read attributes", "Write attributes", + "Write and verify (16)", "Verify (16)", +/* 90-94 */ "Pre-fetch (16)", "Synchronize cache (16)", + "Lock/unlock cache (16)", "Write same (16)", NULL, /* 95-99 */ NULL, NULL, NULL, NULL, NULL, -/* 9a-9f */ NULL, NULL, NULL, NULL, "Service action in(16)", - "Service action out(16)", -/* a0-a5 */ "Report luns", "ATA command pass through(12)/Blank", - "Security protocol in", "Maintenance in", "Maintenance out", - "Move medium/play audio(12)", +/* 9a-9f */ NULL, NULL, NULL, NULL, "Service action in (16)", + "Service action out (16)", +/* a0-a5 */ "Report luns", "Blank", "Send event", "Maintenance in", + "Maintenance out", "Move medium/play audio(12)", /* a6-a9 */ "Exchange medium", "Move medium attached", "Read(12)", "Play track relative(12)", /* aa-ae */ "Write(12)", NULL, "Erase(12), Get Performance", @@ -94,12 +93,12 @@ static const char * cdb_byte0_names[] = { /* af-b1 */ "Verify(12)", "Search data high(12)", "Search data equal(12)", /* b2-b4 */ "Search data low(12)", "Set limits(12)", "Read element status attached", -/* b5-b6 */ "Security protocol out", "Send volume tag, set streaming", +/* b5-b6 */ "Request volume element address", "Send volume tag, set streaming", /* b7-b9 */ "Read defect data(12)", "Read element status", "Read CD msf", /* ba-bc */ "Redundancy group (in), Scan", - "Redundancy group (out), Set cd-rom speed", "Spare (in), Play cd", -/* bd-bf */ "Spare (out), Mechanism status", "Volume set (in), Read cd", - "Volume set (out), Send DVD structure", + "Redundancy group (out), Set cd-rom speed", "Spare in, Play cd", +/* bd-bf */ "Spare out, Mechanism status", "Volume set in, Read cd", + "Volume set out, Send DVD structure", }; struct value_name_pair { @@ -114,40 +113,44 @@ static const struct value_name_pair maint_in_arr[] = { {0xc, "Report supported operation codes"}, {0xd, "Report supported task management functions"}, {0xe, "Report priority"}, - {0xf, "Report timestamp"}, }; -#define MAINT_IN_SZ ARRAY_SIZE(maint_in_arr) +#define MAINT_IN_SZ \ + (int)(sizeof(maint_in_arr) / sizeof(maint_in_arr[0])) static const struct value_name_pair maint_out_arr[] = { {0x6, "Set device identifier"}, {0xa, "Set target port groups"}, {0xb, "Change aliases"}, {0xe, "Set priority"}, - {0xe, "Set timestamp"}, }; -#define MAINT_OUT_SZ ARRAY_SIZE(maint_out_arr) +#define MAINT_OUT_SZ \ + (int)(sizeof(maint_out_arr) / sizeof(maint_out_arr[0])) static const struct value_name_pair serv_in12_arr[] = { {0x1, "Read media serial number"}, }; -#define SERV_IN12_SZ ARRAY_SIZE(serv_in12_arr) +#define SERV_IN12_SZ \ + (int)(sizeof(serv_in12_arr) / sizeof(serv_in12_arr[0])) static const struct value_name_pair serv_out12_arr[] = { {-1, "dummy entry"}, }; -#define SERV_OUT12_SZ ARRAY_SIZE(serv_out12_arr) +#define SERV_OUT12_SZ \ + (int)(sizeof(serv_out12_arr) / sizeof(serv_in12_arr[0])) static const struct value_name_pair serv_in16_arr[] = { {0x10, "Read capacity(16)"}, {0x11, "Read long(16)"}, }; -#define SERV_IN16_SZ ARRAY_SIZE(serv_in16_arr) +#define SERV_IN16_SZ \ + (int)(sizeof(serv_in16_arr) / sizeof(serv_in16_arr[0])) static const struct value_name_pair serv_out16_arr[] = { {0x11, "Write long(16)"}, {0x1f, "Notify data transfer device(16)"}, }; -#define SERV_OUT16_SZ ARRAY_SIZE(serv_out16_arr) +#define SERV_OUT16_SZ \ + (int)(sizeof(serv_out16_arr) / sizeof(serv_in16_arr[0])) static const struct value_name_pair variable_length_arr[] = { {0x1, "Rebuild(32)"}, @@ -187,7 +190,8 @@ static const struct value_name_pair variable_length_arr[] = { {0x8f7e, "Perform SCSI command (osd)"}, {0x8f7f, "Perform task management function (osd)"}, }; -#define VARIABLE_LENGTH_SZ ARRAY_SIZE(variable_length_arr) +#define VARIABLE_LENGTH_SZ \ + (int)(sizeof(variable_length_arr) / sizeof(variable_length_arr[0])) static const char * get_sa_name(const struct value_name_pair * arr, int arr_sz, int service_action) @@ -431,7 +435,6 @@ static struct error_info additional[] = {0x001A, "Rewind operation in progress"}, {0x001B, "Set capacity operation in progress"}, {0x001C, "Verify operation in progress"}, - {0x001D, "ATA pass through information available"}, {0x0100, "No index/sector signal"}, @@ -443,7 +446,7 @@ static struct error_info additional[] = {0x0400, "Logical unit not ready, cause not reportable"}, {0x0401, "Logical unit is in process of becoming ready"}, - {0x0402, "Logical unit not ready, initializing command required"}, + {0x0402, "Logical unit not ready, initializing cmd. required"}, {0x0403, "Logical unit not ready, manual intervention required"}, {0x0404, "Logical unit not ready, format in progress"}, {0x0405, "Logical unit not ready, rebuild in progress"}, @@ -483,9 +486,6 @@ static struct error_info additional[] = {0x0B00, "Warning"}, {0x0B01, "Warning - specified temperature exceeded"}, {0x0B02, "Warning - enclosure degraded"}, - {0x0B03, "Warning - background self-test failed"}, - {0x0B04, "Warning - background pre-scan detected medium error"}, - {0x0B05, "Warning - background medium scan detected medium error"}, {0x0C00, "Write error"}, {0x0C01, "Write error - recovered with auto reallocation"}, @@ -501,7 +501,6 @@ static struct error_info additional[] = {0x0C0B, "Auxiliary memory write error"}, {0x0C0C, "Write error - unexpected unsolicited data"}, {0x0C0D, "Write error - not enough unsolicited data"}, - {0x0C0F, "Defects in error window"}, {0x0D00, "Error detected by third party temporary initiator"}, {0x0D01, "Third party device failure"}, @@ -513,12 +512,11 @@ static struct error_info additional[] = {0x0E00, "Invalid information unit"}, {0x0E01, "Information unit too short"}, {0x0E02, "Information unit too long"}, - {0x0E03, "Invalid field in command information unit"}, {0x1000, "Id CRC or ECC error"}, - {0x1001, "Logical block guard check failed"}, - {0x1002, "Logical block application tag check failed"}, - {0x1003, "Logical block reference tag check failed"}, + {0x1001, "Data block guard check failed"}, + {0x1002, "Data block application tag check failed"}, + {0x1003, "Data block reference tag check failed"}, {0x1100, "Unrecovered read error"}, {0x1101, "Read retries exhausted"}, @@ -540,7 +538,6 @@ static struct error_info additional[] = {0x1111, "Read error - loss of streaming"}, {0x1112, "Auxiliary memory read error"}, {0x1113, "Read error - failed retransmission request"}, - {0x1114, "Read error - lba marked bad by application client"}, {0x1200, "Address mark not found for id field"}, @@ -621,14 +618,11 @@ static struct error_info additional[] = {0x2100, "Logical block address out of range"}, {0x2101, "Invalid element address"}, {0x2102, "Invalid address for write"}, - {0x2103, "Invalid write crossing layer jump"}, {0x2200, "Illegal function (use 20 00, 24 00, or 26 00)"}, {0x2400, "Invalid field in cdb"}, {0x2401, "CDB decryption error"}, - {0x2402, "Obsolete"}, - {0x2403, "Obsolete"}, {0x2404, "Security audit value frozen"}, {0x2405, "Security working key frozen"}, {0x2406, "Nonce not unique"}, @@ -651,10 +645,7 @@ static struct error_info additional[] = {0x260C, "Invalid operation for copy source or destination"}, {0x260D, "Copy segment granularity violation"}, {0x260E, "Invalid parameter while port is enabled"}, - {0x260F, "Invalid data-out buffer integrity check value"}, - {0x2610, "Data decryption key fail limit reached"}, - {0x2611, "Incomplete key-associated data set"}, - {0x2612, "Vendor specific key reference not found"}, + {0x260F, "Invalid data-out buffer integrity"}, {0x2700, "Write protected"}, {0x2701, "Hardware write protected"}, @@ -666,7 +657,6 @@ static struct error_info additional[] = {0x2800, "Not ready to ready change, medium may have changed"}, {0x2801, "Import or export element accessed"}, - {0x2802, "Format-layer may have changed"}, {0x2900, "Power on, reset, or bus device reset occurred"}, {0x2901, "Power on occurred"}, @@ -687,11 +677,6 @@ static struct error_info additional[] = {0x2A07, "Implicit asymmetric access state transition failed"}, {0x2A08, "Priority changed"}, {0x2A09, "Capacity data has changed"}, - {0x2A10, "Timestamp changed"}, - {0x2A11, "Data encryption parameters changed by another i_t nexus"}, - {0x2A12, "Data encryption parameters changed by vendor specific " - "event"}, - {0x2A13, "Data encryption key instance counter has changed"}, {0x2B00, "Copy cannot execute since host cannot disconnect"}, @@ -713,7 +698,6 @@ static struct error_info additional[] = {0x2E00, "Insufficient time for operation"}, {0x2F00, "Commands cleared by another initiator"}, - {0x2F01, "Commands cleared by power loss notification"}, {0x3000, "Incompatible medium installed"}, {0x3001, "Cannot read medium - unknown format"}, @@ -726,8 +710,7 @@ static struct error_info additional[] = {0x3008, "Cannot write - application code mismatch"}, {0x3009, "Current session not fixated for append"}, {0x300A, "Cleaning request rejected"}, - {0x300C, "WORM medium - overwrite attempted"}, - {0x300D, "WORM medium - integrity check"}, + {0x300C, "WORM medium, overwrite attempted"}, {0x3010, "Medium not formatted"}, {0x3100, "Medium format corrupted"}, @@ -815,9 +798,6 @@ static struct error_info additional[] = {0x3F0F, "Echo buffer overwritten"}, {0x3F10, "Medium loadable"}, {0x3F11, "Medium auxiliary memory accessible"}, - {0x3F12, "iSCSI IP address added"}, - {0x3F13, "iSCSI IP address removed"}, - {0x3F14, "iSCSI IP address changed"}, /* * {0x40NN, "Ram failure"}, * {0x40NN, "Diagnostic failure on component nn"}, @@ -827,7 +807,6 @@ static struct error_info additional[] = {0x4300, "Message error"}, {0x4400, "Internal target failure"}, - {0x4471, "ATA device failed set features"}, {0x4500, "Select or reselect failure"}, @@ -836,10 +815,9 @@ static struct error_info additional[] = {0x4700, "Scsi parity error"}, {0x4701, "Data phase CRC error detected"}, {0x4702, "Scsi parity error detected during st data phase"}, - {0x4703, "Information unit iuCRC error detected"}, + {0x4703, "Information unit CRC error detected"}, {0x4704, "Asynchronous information protection error detected"}, {0x4705, "Protocol service CRC error"}, - {0x4706, "Phy test function in progress"}, {0x477f, "Some commands cleared by iSCSI Protocol event"}, {0x4800, "Initiator detected error message received"}, @@ -874,8 +852,6 @@ static struct error_info additional[] = {0x5300, "Media load or eject failed"}, {0x5301, "Unload tape failure"}, {0x5302, "Medium removal prevented"}, - {0x5303, "Medium removal prevented by data transfer element"}, - {0x5304, "Medium thread or unthread failure"}, {0x5400, "Scsi to host system interface failure"}, @@ -887,7 +863,6 @@ static struct error_info additional[] = {0x5505, "Insufficient access control resources"}, {0x5506, "Auxiliary memory out of space"}, {0x5507, "Quota error"}, - {0x5508, "Maximum number of supplemental decryption keys exceeded"}, {0x5700, "Unable to recover table-of-contents"}, @@ -1037,7 +1012,6 @@ static struct error_info additional[] = {0x6708, "Assign failure occurred"}, {0x6709, "Multiply assigned logical unit"}, {0x670A, "Set target port groups command failed"}, - {0x670B, "ATA device feature not enabled"}, {0x6800, "Logical unit not configured"}, @@ -1064,8 +1038,6 @@ static struct error_info additional[] = {0x6F03, "Read of scrambled sector without authentication"}, {0x6F04, "Media region code is mismatched to logical unit region"}, {0x6F05, "Drive region must be permanent/region reset count error"}, - {0x6F06, "Insufficient block count for binding nonce recording"}, - {0x6F07, "Conflict in binding nonce recording"}, /* * {0x70NN, "Decompression exception short algorithm id of nn"}, */ @@ -1077,8 +1049,6 @@ static struct error_info additional[] = {0x7203, "Session fixation error - incomplete track in session"}, {0x7204, "Empty or partially written reserved track"}, {0x7205, "No more track reservations allowed"}, - {0x7206, "RMZ extension is not allowed"}, - {0x7207, "No more test zone extensions are allowed"}, {0x7300, "Cd control error"}, {0x7301, "Power calibration area almost full"}, @@ -1087,18 +1057,6 @@ static struct error_info additional[] = {0x7304, "Program memory area update failure"}, {0x7305, "Program memory area is full"}, {0x7306, "RMA/PMA is almost full"}, - {0x7310, "Current power calibration area almost full"}, - {0x7311, "Current power calibration area is full"}, - {0x7317, "RDZ is full"}, - - {0x7400, "Security error"}, - {0x7401, "Unable to decrypt data"}, - {0x7402, "Unencrypted data encountered while decrypting"}, - {0x7403, "Incorrect data encryption key"}, - {0x7404, "Cryptographic integrity validation failed"}, - {0x7405, "Error decrypting data"}, - {0x7471, "Logical unit access not authorized"}, - {0, NULL} }; @@ -1310,6 +1268,16 @@ void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd) } EXPORT_SYMBOL(scsi_print_sense); +void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq) +{ + const char *name = devclass; + + if (sreq->sr_request->rq_disk) + name = sreq->sr_request->rq_disk->disk_name; + __scsi_print_sense(name, sreq->sr_sense_buffer, SCSI_SENSE_BUFFERSIZE); +} +EXPORT_SYMBOL(scsi_print_req_sense); + void scsi_print_command(struct scsi_cmnd *cmd) { /* Assume appended output (i.e. not at start of line) */ @@ -1322,10 +1290,10 @@ EXPORT_SYMBOL(scsi_print_command); #ifdef CONFIG_SCSI_CONSTANTS static const char * const hostbyte_table[]={ -"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", +"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", "DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR", "DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"}; -#define NUM_HOSTBYTE_STRS ARRAY_SIZE(hostbyte_table) +#define NUM_HOSTBYTE_STRS (sizeof(hostbyte_table) / sizeof(const char *)) void scsi_print_hostbyte(int scsiresult) { @@ -1335,7 +1303,7 @@ void scsi_print_hostbyte(int scsiresult) if (hb < NUM_HOSTBYTE_STRS) printk("(%s) ", hostbyte_table[hb]); else - printk("is invalid "); + printk("is invalid "); } #else void scsi_print_hostbyte(int scsiresult) @@ -1347,14 +1315,14 @@ void scsi_print_hostbyte(int scsiresult) #ifdef CONFIG_SCSI_CONSTANTS static const char * const driverbyte_table[]={ -"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR", +"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR", "DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"}; -#define NUM_DRIVERBYTE_STRS ARRAY_SIZE(driverbyte_table) +#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *)) static const char * const driversuggest_table[]={"SUGGEST_OK", "SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE", "SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"}; -#define NUM_SUGGEST_STRS ARRAY_SIZE(driversuggest_table) +#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *)) void scsi_print_driverbyte(int scsiresult) { diff --git a/drivers/scsi/cyberstorm.c b/drivers/scsi/cyberstorm.c index 7c7cfb54e..a4a4fac5c 100644 --- a/drivers/scsi/cyberstorm.c +++ b/drivers/scsi/cyberstorm.c @@ -172,7 +172,7 @@ int __init cyber_esp_detect(struct scsi_host_template *tpnt) esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); esp->irq = IRQ_AMIGA_PORTS; - request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "CyberStorm SCSI", esp->ehost); /* Figure out our scsi ID on the bus */ /* The DMA cond flag contains a hardcoded jumper bit diff --git a/drivers/scsi/cyberstormII.c b/drivers/scsi/cyberstormII.c index d88cb9cf0..3a803d73b 100644 --- a/drivers/scsi/cyberstormII.c +++ b/drivers/scsi/cyberstormII.c @@ -153,7 +153,7 @@ int __init cyberII_esp_detect(struct scsi_host_template *tpnt) esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); esp->irq = IRQ_AMIGA_PORTS; - request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "CyberStorm SCSI Mk II", esp->ehost); /* Figure out our scsi ID on the bus */ diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index ff2b1796f..cbf825263 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -230,12 +230,13 @@ struct ScsiReqBlk { struct scsi_cmnd *cmd; struct SGentry *segment_x; /* Linear array of hw sg entries (up to 64 entries) */ - dma_addr_t sg_bus_addr; /* Bus address of sg list (ie, of segment_x) */ + u32 sg_bus_addr; /* Bus address of sg list (ie, of segment_x) */ u8 sg_count; /* No of HW sg entries for this request */ u8 sg_index; /* Index of HW sg entry for this request */ - size_t total_xfer_length; /* Total number of bytes remaining to be transfered */ - size_t request_length; /* Total number of bytes in this request */ + u32 total_xfer_length; /* Total number of bytes remaining to be transfered */ + unsigned char *virt_addr; /* Virtual address of current transfer position */ + /* * The sense buffer handling function, request_sense, uses * the first hw sg entry (segment_x[0]) and the transfer @@ -245,7 +246,8 @@ struct ScsiReqBlk { * total_xfer_length in xferred. These values are restored in * pci_unmap_srb_sense. This is the only place xferred is used. */ - size_t xferred; /* Saved copy of total_xfer_length */ + unsigned char *virt_addr_req; /* Saved virtual address of the request buffer */ + u32 xferred; /* Saved copy of total_xfer_length */ u16 state; @@ -975,6 +977,17 @@ static void send_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb) } } +static inline void pio_trigger(void) +{ + static int feedback_requested; + + if (!feedback_requested) { + feedback_requested = 1; + printk(KERN_WARNING "%s: Please, contact " + "to help improve support for your system.\n", __FILE__); + } +} + /* Prepare SRB for being sent to Device DCB w/ command *cmd */ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, struct ScsiReqBlk *srb) @@ -988,6 +1001,7 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, srb->sg_count = 0; srb->total_xfer_length = 0; srb->sg_bus_addr = 0; + srb->virt_addr = NULL; srb->sg_index = 0; srb->adapter_status = 0; srb->target_status = 0; @@ -1018,6 +1032,7 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, reqlen, cmd->request_buffer, cmd->use_sg, srb->sg_count); + srb->virt_addr = page_address(sl->page); for (i = 0; i < srb->sg_count; i++) { u32 busaddr = (u32)sg_dma_address(&sl[i]); u32 seglen = (u32)sl[i].length; @@ -1062,14 +1077,12 @@ static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb, srb->total_xfer_length++; srb->segment_x[0].length = srb->total_xfer_length; - + srb->virt_addr = cmd->request_buffer; dprintkdbg(DBG_0, "build_srb: [1] len=%d buf=%p use_sg=%d map=%08x\n", srb->total_xfer_length, cmd->request_buffer, cmd->use_sg, srb->segment_x[0].address); } - - srb->request_length = srb->total_xfer_length; } @@ -1401,10 +1414,10 @@ static int dc395x_eh_abort(struct scsi_cmnd *cmd) } srb = find_cmd(cmd, &dcb->srb_going_list); if (srb) { - dprintkl(KERN_DEBUG, "eh_abort: Command in progress\n"); + dprintkl(KERN_DEBUG, "eh_abort: Command in progress"); /* XXX: Should abort the command here */ } else { - dprintkl(KERN_DEBUG, "eh_abort: Command not found\n"); + dprintkl(KERN_DEBUG, "eh_abort: Command not found"); } return FAILED; } @@ -1963,11 +1976,14 @@ static void sg_verify_length(struct ScsiReqBlk *srb) /* * Compute the next Scatter Gather list index and adjust its length - * and address if necessary + * and address if necessary; also compute virt_addr */ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) { u8 idx; + struct scatterlist *sg; + struct scsi_cmnd *cmd = srb->cmd; + int segment = cmd->use_sg; u32 xferred = srb->total_xfer_length - left; /* bytes transfered */ struct SGentry *psge = srb->segment_x + srb->sg_index; @@ -2000,6 +2016,29 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) psge++; } sg_verify_length(srb); + + /* we need the corresponding virtual address */ + if (!segment || (srb->flag & AUTO_REQSENSE)) { + srb->virt_addr += xferred; + return; + } + + /* We have to walk the scatterlist to find it */ + sg = (struct scatterlist *)cmd->request_buffer; + while (segment--) { + unsigned long mask = + ~((unsigned long)sg->length - 1) & PAGE_MASK; + if ((sg_dma_address(sg) & mask) == (psge->address & mask)) { + srb->virt_addr = (page_address(sg->page) + + psge->address - + (psge->address & PAGE_MASK)); + return; + } + ++sg; + } + + dprintkl(KERN_ERR, "sg_update_list: sg_to_virt failed\n"); + srb->virt_addr = NULL; } @@ -2011,7 +2050,15 @@ static void sg_update_list(struct ScsiReqBlk *srb, u32 left) */ static void sg_subtract_one(struct ScsiReqBlk *srb) { - sg_update_list(srb, srb->total_xfer_length - 1); + srb->total_xfer_length--; + srb->segment_x[srb->sg_index].length--; + if (srb->total_xfer_length && + !srb->segment_x[srb->sg_index].length) { + if (debug_enabled(DBG_PIO)) + printk(" (next segment)"); + srb->sg_index++; + sg_update_list(srb, srb->total_xfer_length); + } } @@ -2071,7 +2118,7 @@ static void data_out_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, * If we need more data, the DMA SG list will be freshly set up, anyway */ dprintkdbg(DBG_PIO, "data_out_phase0: " - "DMA{fifocnt=0x%02x fifostat=0x%02x} " + "DMA{fifcnt=0x%02x fifostat=0x%02x} " "SCSI{fifocnt=0x%02x cnt=0x%06x status=0x%04x} total=0x%06x\n", DC395x_read8(acb, TRM_S1040_DMA_FIFOCNT), DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT), @@ -2192,11 +2239,12 @@ static void data_out_phase1(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, data_io_transfer(acb, srb, XFERDATAOUT); } + static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, u16 *pscsi_status) { u16 scsi_status = *pscsi_status; - + u32 d_left_counter = 0; dprintkdbg(DBG_0, "data_in_phase0: (pid#%li) <%02i-%i>\n", srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); @@ -2214,9 +2262,6 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, * seem to be a bad idea, actually. */ if (!(srb->state & SRB_XFERPAD)) { - u32 d_left_counter; - unsigned int sc, fc; - if (scsi_status & PARITYERROR) { dprintkl(KERN_INFO, "data_in_phase0: (pid#%li) " "Parity Error\n", srb->cmd->pid); @@ -2253,19 +2298,18 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT)); } /* Now: Check remainig data: The SCSI counters should tell us ... */ - sc = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER); - fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT); - d_left_counter = sc + ((fc & 0x1f) + d_left_counter = DC395x_read32(acb, TRM_S1040_SCSI_COUNTER) + + ((DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) & 0x1f) << ((srb->dcb->sync_period & WIDE_SYNC) ? 1 : 0)); dprintkdbg(DBG_KG, "data_in_phase0: " "SCSI{fifocnt=0x%02x%s ctr=0x%08x} " "DMA{fifocnt=0x%02x fifostat=0x%02x ctr=0x%08x} " "Remain{totxfer=%i scsi_fifo+ctr=%i}\n", - fc, + DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT), (srb->dcb->sync_period & WIDE_SYNC) ? "words" : "bytes", - sc, - fc, + DC395x_read32(acb, TRM_S1040_SCSI_COUNTER), + DC395x_read8(acb, TRM_S1040_DMA_FIFOCNT), DC395x_read8(acb, TRM_S1040_DMA_FIFOSTAT), DC395x_read32(acb, TRM_S1040_DMA_CXCNT), srb->total_xfer_length, d_left_counter); @@ -2273,79 +2317,40 @@ static void data_in_phase0(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb, /* KG: Less than or equal to 4 bytes can not be transfered via DMA, it seems. */ if (d_left_counter && srb->total_xfer_length <= DC395x_LASTPIO) { - size_t left_io = srb->total_xfer_length; - /*u32 addr = (srb->segment_x[srb->sg_index].address); */ /*sg_update_list (srb, d_left_counter); */ - dprintkdbg(DBG_PIO, "data_in_phase0: PIO (%i %s) " - "for remaining %i bytes:", - fc & 0x1f, + dprintkdbg(DBG_PIO, "data_in_phase0: PIO (%i %s) to " + "%p for remaining %i bytes:", + DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) & 0x1f, (srb->dcb->sync_period & WIDE_SYNC) ? "words" : "bytes", + srb->virt_addr, srb->total_xfer_length); if (srb->dcb->sync_period & WIDE_SYNC) DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, CFG2_WIDEFIFO); - while (left_io) { - unsigned char *virt, *base = NULL; - unsigned long flags = 0; - size_t len = left_io; - - if (srb->cmd->use_sg) { - size_t offset = srb->request_length - left_io; - local_irq_save(flags); - /* Assumption: it's inside one page as it's at most 4 bytes and - I just assume it's on a 4-byte boundary */ - base = scsi_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer, - srb->sg_count, &offset, &len); - virt = base + offset; - } else { - virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io; - len = left_io; - } - left_io -= len; - - while (len) { - u8 byte; - byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); - *virt++ = byte; - + while (DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT) != 0x40) { + u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); + pio_trigger(); + *(srb->virt_addr)++ = byte; + if (debug_enabled(DBG_PIO)) + printk(" %02x", byte); + d_left_counter--; + sg_subtract_one(srb); + } + if (srb->dcb->sync_period & WIDE_SYNC) { +#if 1 + /* Read the last byte ... */ + if (srb->total_xfer_length > 0) { + u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); + pio_trigger(); + *(srb->virt_addr)++ = byte; + srb->total_xfer_length--; if (debug_enabled(DBG_PIO)) printk(" %02x", byte); - - d_left_counter--; - sg_subtract_one(srb); - - len--; - - fc = DC395x_read8(acb, TRM_S1040_SCSI_FIFOCNT); - - if (fc == 0x40) { - left_io = 0; - break; - } - } - - WARN_ON((fc != 0x40) == !d_left_counter); - - if (fc == 0x40 && (srb->dcb->sync_period & WIDE_SYNC)) { - /* Read the last byte ... */ - if (srb->total_xfer_length > 0) { - u8 byte = DC395x_read8(acb, TRM_S1040_SCSI_FIFO); - - *virt++ = byte; - srb->total_xfer_length--; - if (debug_enabled(DBG_PIO)) - printk(" %02x", byte); - } - - DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, 0); - } - - if (srb->cmd->use_sg) { - scsi_kunmap_atomic_sg(base); - local_irq_restore(flags); } +#endif + DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, 0); } /*printk(" %08x", *(u32*)(bus_to_virt (addr))); */ /*srb->total_xfer_length = 0; */ @@ -2504,43 +2509,22 @@ static void data_io_transfer(struct AdapterCtlBlk *acb, SCMD_FIFO_IN); } else { /* write */ int ln = srb->total_xfer_length; - size_t left_io = srb->total_xfer_length; - if (srb->dcb->sync_period & WIDE_SYNC) DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2, CFG2_WIDEFIFO); + dprintkdbg(DBG_PIO, + "data_io_transfer: PIO %i bytes from %p:", + srb->total_xfer_length, srb->virt_addr); - while (left_io) { - unsigned char *virt, *base = NULL; - unsigned long flags = 0; - size_t len = left_io; - - if (srb->cmd->use_sg) { - size_t offset = srb->request_length - left_io; - local_irq_save(flags); - /* Again, max 4 bytes */ - base = scsi_kmap_atomic_sg((struct scatterlist *)srb->cmd->request_buffer, - srb->sg_count, &offset, &len); - virt = base + offset; - } else { - virt = srb->cmd->request_buffer + srb->cmd->request_bufflen - left_io; - len = left_io; - } - left_io -= len; - - while (len--) { - if (debug_enabled(DBG_PIO)) - printk(" %02x", *virt); - - DC395x_write8(acb, TRM_S1040_SCSI_FIFO, *virt++); + while (srb->total_xfer_length) { + if (debug_enabled(DBG_PIO)) + printk(" %02x", (unsigned char) *(srb->virt_addr)); - sg_subtract_one(srb); - } + pio_trigger(); + DC395x_write8(acb, TRM_S1040_SCSI_FIFO, + *(srb->virt_addr)++); - if (srb->cmd->use_sg) { - scsi_kunmap_atomic_sg(base); - local_irq_restore(flags); - } + sg_subtract_one(srb); } if (srb->dcb->sync_period & WIDE_SYNC) { if (ln % 2) { @@ -3335,6 +3319,7 @@ static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb, srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].address; srb->segment_x[0].length = srb->segment_x[DC395x_MAX_SG_LISTENTRY - 1].length; + srb->virt_addr = srb->virt_addr_req; } @@ -3347,14 +3332,21 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, { u8 tempcnt, status; struct scsi_cmnd *cmd = srb->cmd; + struct ScsiInqData *ptr; enum dma_data_direction dir = cmd->sc_data_direction; - int ckc_only = 1; + + if (cmd->use_sg) { + struct scatterlist* sg = (struct scatterlist *)cmd->request_buffer; + ptr = (struct ScsiInqData *)(page_address(sg->page) + sg->offset); + } else { + ptr = (struct ScsiInqData *)(cmd->request_buffer); + } dprintkdbg(DBG_1, "srb_done: (pid#%li) <%02i-%i>\n", srb->cmd->pid, srb->cmd->device->id, srb->cmd->device->lun); - dprintkdbg(DBG_SG, "srb_done: srb=%p sg=%i(%i/%i) buf=%p\n", + dprintkdbg(DBG_SG, "srb_done: srb=%p sg=%i(%i/%i) buf=%p addr=%p\n", srb, cmd->use_sg, srb->sg_index, srb->sg_count, - cmd->request_buffer); + cmd->request_buffer, ptr); status = srb->target_status; if (srb->flag & AUTO_REQSENSE) { dprintkdbg(DBG_0, "srb_done: AUTO_REQSENSE1\n"); @@ -3493,47 +3485,29 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, srb->segment_x[0].address, cmd->request_bufflen, dir); } - ckc_only = 0; + + if ((cmd->result & RES_DID) == 0 && cmd->cmnd[0] == INQUIRY + && cmd->cmnd[2] == 0 && cmd->request_bufflen >= 8 + && dir != PCI_DMA_NONE && ptr && (ptr->Vers & 0x07) >= 2) + dcb->inquiry7 = ptr->Flags; /* Check Error Conditions */ ckc_e: - if (cmd->cmnd[0] == INQUIRY) { - unsigned char *base = NULL; - struct ScsiInqData *ptr; - unsigned long flags = 0; - - if (cmd->use_sg) { - struct scatterlist* sg = (struct scatterlist *)cmd->request_buffer; - size_t offset = 0, len = sizeof(struct ScsiInqData); - - local_irq_save(flags); - base = scsi_kmap_atomic_sg(sg, cmd->use_sg, &offset, &len); - ptr = (struct ScsiInqData *)(base + offset); - } else - ptr = (struct ScsiInqData *)(cmd->request_buffer); - - if (!ckc_only && (cmd->result & RES_DID) == 0 - && cmd->cmnd[2] == 0 && cmd->request_bufflen >= 8 - && dir != PCI_DMA_NONE && ptr && (ptr->Vers & 0x07) >= 2) - dcb->inquiry7 = ptr->Flags; - /*if( srb->cmd->cmnd[0] == INQUIRY && */ /* (host_byte(cmd->result) == DID_OK || status_byte(cmd->result) & CHECK_CONDITION) ) */ - if ((cmd->result == (DID_OK << 16) - || status_byte(cmd->result) & - CHECK_CONDITION)) { - if (!dcb->init_tcq_flag) { - add_dev(acb, dcb, ptr); - dcb->init_tcq_flag = 1; - } + if (cmd->cmnd[0] == INQUIRY && (cmd->result == (DID_OK << 16) + || status_byte(cmd-> + result) & + CHECK_CONDITION)) { + + if (!dcb->init_tcq_flag) { + add_dev(acb, dcb, ptr); + dcb->init_tcq_flag = 1; } - if (cmd->use_sg) { - scsi_kunmap_atomic_sg(base); - local_irq_restore(flags); - } } + /* Here is the info for Doug Gilbert's sg3 ... */ cmd->resid = srb->total_xfer_length; /* This may be interpreted by sb. or not ... */ @@ -3739,6 +3713,8 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, srb->xferred = srb->total_xfer_length; /* srb->segment_x : a one entry of S/G list table */ srb->total_xfer_length = sizeof(cmd->sense_buffer); + srb->virt_addr_req = srb->virt_addr; + srb->virt_addr = cmd->sense_buffer; srb->segment_x[0].length = sizeof(cmd->sense_buffer); /* Map sense buffer */ srb->segment_x[0].address = @@ -3771,7 +3747,7 @@ static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, * @target: The target for the new device. * @lun: The lun for the new device. * - * Return the new device if successful or NULL on failure. + * Return the new device if succesfull or NULL on failure. **/ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb, u8 target, u8 lun) @@ -4562,7 +4538,7 @@ static int __devinit adapter_init(struct AdapterCtlBlk *acb, acb->io_port_base = io_port; acb->io_port_len = io_port_len; - if (request_irq(irq, dc395x_interrupt, IRQF_SHARED, DC395X_NAME, acb)) { + if (request_irq(irq, dc395x_interrupt, SA_SHIRQ, DC395X_NAME, acb)) { /* release the region we just claimed */ dprintkl(KERN_INFO, "Failed to register IRQ\n"); goto failed; diff --git a/drivers/scsi/dec_esp.c b/drivers/scsi/dec_esp.c index eb32062f7..a35ee43a4 100644 --- a/drivers/scsi/dec_esp.c +++ b/drivers/scsi/dec_esp.c @@ -202,19 +202,19 @@ static int dec_esp_detect(struct scsi_host_template * tpnt) esp_initialize(esp); - if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, + if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, "ncr53c94", esp->ehost)) goto err_dealloc; if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR], - scsi_dma_merr_int, IRQF_DISABLED, + scsi_dma_merr_int, SA_INTERRUPT, "ncr53c94 error", esp->ehost)) goto err_free_irq; if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR], - scsi_dma_err_int, IRQF_DISABLED, + scsi_dma_err_int, SA_INTERRUPT, "ncr53c94 overrun", esp->ehost)) goto err_free_irq_merr; if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA], - scsi_dma_int, IRQF_DISABLED, + scsi_dma_int, SA_INTERRUPT, "ncr53c94 dma", esp->ehost)) goto err_free_irq_err; @@ -276,7 +276,7 @@ static int dec_esp_detect(struct scsi_host_template * tpnt) esp->dma_mmu_release_scsi_sgl = 0; esp->dma_advance_sg = 0; - if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, + if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, "PMAZ_AA", esp->ehost)) { esp_deallocate(esp); release_tc_card(slot); diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 879a26657..38e4010ef 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c @@ -94,7 +94,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); - if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED, + if (request_irq(pdev->irq, NCR5380_intr, SA_SHIRQ, DMX3191D_DRIVER_NAME, shost)) { /* * Steam powered scsi controllers run without an IRQ anyway diff --git a/drivers/scsi/dpt/dpti_i2o.h b/drivers/scsi/dpt/dpti_i2o.h index d84a281ad..a9585f523 100644 --- a/drivers/scsi/dpt/dpti_i2o.h +++ b/drivers/scsi/dpt/dpti_i2o.h @@ -23,6 +23,7 @@ #include /* Needed for MUTEX init macros */ #include +#include #include #include diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 45806336c..b1b704a42 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -46,6 +46,7 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver"); #include #include /* for kmalloc() */ +#include /* for CONFIG_PCI */ #include /* for PCI support */ #include #include @@ -1008,7 +1009,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size); } - if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) { + if (request_irq (pDev->irq, adpt_isr, SA_SHIRQ, pHba->name, pHba)) { printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); adpt_i2o_delete_hba(pHba); return -EINVAL; diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 0d5713dfa..310d2f488 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c @@ -145,35 +145,35 @@ static struct override { 0, IRQ_AUTO}}; #endif -#define NO_OVERRIDES ARRAY_SIZE(overrides) +#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) static struct base { unsigned long address; int noauto; -} bases[] __initdata = { - { 0xcc000, 0 }, - { 0xc8000, 0 }, - { 0xdc000, 0 }, +} bases[] __initdata = { + { 0xcc000, 0 }, + { 0xc8000, 0 }, + { 0xdc000, 0 }, { 0xd8000, 0 } }; -#define NO_BASES ARRAY_SIZE(bases) +#define NO_BASES (sizeof (bases) / sizeof (struct base)) static const struct signature { const char *string; int offset; -} signatures[] = { +} signatures[] = { {"DATA TECHNOLOGY CORPORATION BIOS", 0x25}, }; -#define NO_SIGNATURES ARRAY_SIZE(signatures) +#define NO_SIGNATURES (sizeof (signatures) / sizeof (struct signature)) #ifndef MODULE /* * Function : dtc_setup(char *str, int *ints) * * Purpose : LILO command line initialization of the overrides array, - * + * * Inputs : str - unused, ints - array of integer parameters with ints[0] * equal to the number of ints. * @@ -280,7 +280,7 @@ found: /* With interrupts enabled, it will sometimes hang when doing heavy * reads. So better not enable them until I finger it out. */ if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) { + if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) { printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; } diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index a5ff43b1b..059eeee4b 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -477,6 +477,7 @@ * the driver sets host->wish_block = 1 for all ISA boards. */ +#include #include #include #include @@ -1221,7 +1222,7 @@ static int port_detect(unsigned long port_base, unsigned int j, /* Board detected, allocate its IRQ */ if (request_irq(irq, do_interrupt_handler, - IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0), + SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), driver_name, (void *)&sha[j])) { printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 771b01984..23beb48c7 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c @@ -46,6 +46,7 @@ * last change: 2002/11/02 OS: Linux 2.5.45 * ************************************************************/ +#include #include #include #include @@ -731,7 +732,7 @@ static int register_pio_HBA(long base, struct get_conf *gc) return 0; if (!reg_IRQ[gc->IRQ]) { /* Interrupt already registered ? */ - if (!request_irq(gc->IRQ, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", sh)) { + if (!request_irq(gc->IRQ, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", sh)) { reg_IRQ[gc->IRQ]++; if (!gc->IRQ_TR) reg_IRQL[gc->IRQ] = 1; /* IRQ is edge triggered */ @@ -965,7 +966,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt) for (i = 0; i <= MAXIRQ; i++) if (reg_IRQ[i]) - request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL); + request_irq(i, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", NULL); HBA_ptr = first_HBA; diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index 5630868c1..87a8c3d20 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c @@ -1,6 +1,7 @@ -/* esp.c: ESP Sun SCSI driver. +/* $Id: esp.c,v 1.101 2002/01/15 06:48:55 davem Exp $ + * esp.c: EnhancedScsiProcessor Sun SCSI driver code. * - * Copyright (C) 1995, 1998, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1995, 1998 David S. Miller (davem@caip.rutgers.edu) */ /* TODO: @@ -12,6 +13,7 @@ * 3) Add tagged queueing. */ +#include #include #include #include @@ -183,6 +185,11 @@ enum { /*5*/ do_intr_end }; +/* The master ring of all esp hosts we are managing in this driver. */ +static struct esp *espchain; +static DEFINE_SPINLOCK(espchain_lock); +static int esps_running = 0; + /* Forward declarations. */ static irqreturn_t esp_intr(int irq, void *dev_id, struct pt_regs *pregs); @@ -687,6 +694,36 @@ static void __init esp_bootup_reset(struct esp *esp) sbus_readb(esp->eregs + ESP_INTRPT); } +static void esp_chain_add(struct esp *esp) +{ + spin_lock_irq(&espchain_lock); + if (espchain) { + struct esp *elink = espchain; + while (elink->next) + elink = elink->next; + elink->next = esp; + } else { + espchain = esp; + } + esp->next = NULL; + spin_unlock_irq(&espchain_lock); +} + +static void esp_chain_del(struct esp *esp) +{ + spin_lock_irq(&espchain_lock); + if (espchain == esp) { + espchain = esp->next; + } else { + struct esp *elink = espchain; + while (elink->next != esp) + elink = elink->next; + elink->next = esp->next; + } + esp->next = NULL; + spin_unlock_irq(&espchain_lock); +} + static int __init esp_find_dvma(struct esp *esp, struct sbus_dev *dma_sdev) { struct sbus_dev *sdev = esp->sdev; @@ -778,14 +815,14 @@ static int __init esp_register_irq(struct esp *esp) * sanely maintain. */ if (request_irq(esp->ehost->irq, esp_intr, - IRQF_SHARED, "ESP SCSI", esp)) { + SA_SHIRQ, "ESP SCSI", esp)) { printk("esp%d: Cannot acquire irq line\n", esp->esp_id); return -1; } - printk("esp%d: IRQ %d ", esp->esp_id, - esp->ehost->irq); + printk("esp%d: IRQ %s ", esp->esp_id, + __irq_itoa(esp->ehost->irq)); return 0; } @@ -793,20 +830,19 @@ static int __init esp_register_irq(struct esp *esp) static void __init esp_get_scsi_id(struct esp *esp) { struct sbus_dev *sdev = esp->sdev; - struct device_node *dp = sdev->ofdev.node; - esp->scsi_id = of_getintprop_default(dp, - "initiator-id", - -1); + esp->scsi_id = prom_getintdefault(esp->prom_node, + "initiator-id", + -1); if (esp->scsi_id == -1) - esp->scsi_id = of_getintprop_default(dp, - "scsi-initiator-id", - -1); + esp->scsi_id = prom_getintdefault(esp->prom_node, + "scsi-initiator-id", + -1); if (esp->scsi_id == -1) esp->scsi_id = (sdev->bus == NULL) ? 7 : - of_getintprop_default(sdev->bus->ofdev.node, - "scsi-initiator-id", - 7); + prom_getintdefault(sdev->bus->prom_node, + "scsi-initiator-id", + 7); esp->ehost->this_id = esp->scsi_id; esp->scsi_id_mask = (1 << esp->scsi_id); @@ -1031,30 +1067,28 @@ static void __init esp_init_swstate(struct esp *esp) esp->prev_hme_dmacsr = 0xffffffff; } -static int __init detect_one_esp(struct scsi_host_template *tpnt, - struct device *dev, - struct sbus_dev *esp_dev, - struct sbus_dev *espdma, - struct sbus_bus *sbus, - int hme) +static int __init detect_one_esp(struct scsi_host_template *tpnt, struct sbus_dev *esp_dev, + struct sbus_dev *espdma, struct sbus_bus *sbus, + int id, int hme) { - static int instance; - struct Scsi_Host *esp_host = scsi_host_alloc(tpnt, sizeof(struct esp)); + struct Scsi_Host *esp_host = scsi_register(tpnt, sizeof(struct esp)); struct esp *esp; - if (!esp_host) - return -ENOMEM; - + if (!esp_host) { + printk("ESP: Cannot register SCSI host\n"); + return -1; + } if (hme) esp_host->max_id = 16; esp = (struct esp *) esp_host->hostdata; esp->ehost = esp_host; esp->sdev = esp_dev; - esp->esp_id = instance; + esp->esp_id = id; esp->prom_node = esp_dev->prom_node; prom_getstring(esp->prom_node, "name", esp->prom_name, sizeof(esp->prom_name)); + esp_chain_add(esp); if (esp_find_dvma(esp, espdma) < 0) goto fail_unlink; if (esp_map_regs(esp, hme) < 0) { @@ -1081,19 +1115,8 @@ static int __init detect_one_esp(struct scsi_host_template *tpnt, esp_bootup_reset(esp); - if (scsi_add_host(esp_host, dev)) - goto fail_free_irq; - - dev_set_drvdata(&esp_dev->ofdev.dev, esp); - - scsi_scan_host(esp_host); - instance++; - return 0; -fail_free_irq: - free_irq(esp->ehost->irq, esp); - fail_unmap_cmdarea: sbus_free_consistent(esp->sdev, 16, (void *) esp->esp_command, @@ -1106,99 +1129,119 @@ fail_dvma_release: esp->dma->allocated = 0; fail_unlink: - scsi_host_put(esp_host); + esp_chain_del(esp); + scsi_unregister(esp_host); return -1; } /* Detecting ESP chips on the machine. This is the simple and easy * version. */ -static int __devexit esp_remove_common(struct esp *esp) -{ - unsigned int irq = esp->ehost->irq; - - scsi_remove_host(esp->ehost); - - ESP_INTSOFF(esp->dregs); -#if 0 - esp_reset_dma(esp); - esp_reset_esp(esp); -#endif - - free_irq(irq, esp); - sbus_free_consistent(esp->sdev, 16, - (void *) esp->esp_command, esp->esp_command_dvma); - sbus_iounmap(esp->eregs, ESP_REG_SIZE); - esp->dma->allocated = 0; - - scsi_host_put(esp->ehost); - - return 0; -} - #ifdef CONFIG_SUN4 #include -static struct sbus_dev sun4_esp_dev; - -static int __init esp_sun4_probe(struct scsi_host_template *tpnt) +static int __init esp_detect(struct scsi_host_template *tpnt) { + static struct sbus_dev esp_dev; + int esps_in_use = 0; + + espchain = NULL; + if (sun4_esp_physaddr) { - memset(&sun4_esp_dev, 0, sizeof(sun4_esp_dev)); - sun4_esp_dev.reg_addrs[0].phys_addr = sun4_esp_physaddr; - sun4_esp_dev.irqs[0] = 4; - sun4_esp_dev.resource[0].start = sun4_esp_physaddr; - sun4_esp_dev.resource[0].end = - sun4_esp_physaddr + ESP_REG_SIZE - 1; - sun4_esp_dev.resource[0].flags = IORESOURCE_IO; - - return detect_one_esp(tpnt, NULL, - &sun4_esp_dev, NULL, NULL, 0); + memset (&esp_dev, 0, sizeof(esp_dev)); + esp_dev.reg_addrs[0].phys_addr = sun4_esp_physaddr; + esp_dev.irqs[0] = 4; + esp_dev.resource[0].start = sun4_esp_physaddr; + esp_dev.resource[0].end = sun4_esp_physaddr + ESP_REG_SIZE - 1; + esp_dev.resource[0].flags = IORESOURCE_IO; + + if (!detect_one_esp(tpnt, &esp_dev, NULL, NULL, 0, 0)) + esps_in_use++; + printk("ESP: Total of 1 ESP hosts found, %d actually in use.\n", esps_in_use); + esps_running = esps_in_use; } - return 0; + return esps_in_use; } -static int __devexit esp_sun4_remove(void) +#else /* !CONFIG_SUN4 */ + +static int __init esp_detect(struct scsi_host_template *tpnt) { - struct of_device *dev = &sun4_esp_dev.ofdev; - struct esp *esp = dev_get_drvdata(&dev->dev); + struct sbus_bus *sbus; + struct sbus_dev *esp_dev, *sbdev_iter; + int nesps = 0, esps_in_use = 0; - return esp_remove_common(esp); + espchain = 0; + if (!sbus_root) { +#ifdef CONFIG_PCI + return 0; +#else + panic("No SBUS in esp_detect()"); +#endif + } + for_each_sbus(sbus) { + for_each_sbusdev(sbdev_iter, sbus) { + struct sbus_dev *espdma = NULL; + int hme = 0; + + /* Is it an esp sbus device? */ + esp_dev = sbdev_iter; + if (strcmp(esp_dev->prom_name, "esp") && + strcmp(esp_dev->prom_name, "SUNW,esp")) { + if (!strcmp(esp_dev->prom_name, "SUNW,fas")) { + hme = 1; + espdma = esp_dev; + } else { + if (!esp_dev->child || + (strcmp(esp_dev->prom_name, "espdma") && + strcmp(esp_dev->prom_name, "dma"))) + continue; /* nope... */ + espdma = esp_dev; + esp_dev = esp_dev->child; + if (strcmp(esp_dev->prom_name, "esp") && + strcmp(esp_dev->prom_name, "SUNW,esp")) + continue; /* how can this happen? */ + } + } + + if (detect_one_esp(tpnt, esp_dev, espdma, sbus, nesps++, hme) < 0) + continue; + + esps_in_use++; + } /* for each sbusdev */ + } /* for each sbus */ + printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, + esps_in_use); + esps_running = esps_in_use; + return esps_in_use; } -#else /* !CONFIG_SUN4 */ +#endif /* !CONFIG_SUN4 */ -static int __devinit esp_sbus_probe(struct of_device *dev, const struct of_device_id *match) +/* + */ +static int esp_release(struct Scsi_Host *host) { - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - struct device_node *dp = dev->node; - struct sbus_dev *dma_sdev = NULL; - int hme = 0; - - if (dp->parent && - (!strcmp(dp->parent->name, "espdma") || - !strcmp(dp->parent->name, "dma"))) - dma_sdev = sdev->parent; - else if (!strcmp(dp->name, "SUNW,fas")) { - dma_sdev = sdev; - hme = 1; - } + struct esp *esp = (struct esp *) host->hostdata; - return detect_one_esp(match->data, &dev->dev, - sdev, dma_sdev, sdev->bus, hme); -} + ESP_INTSOFF(esp->dregs); +#if 0 + esp_reset_dma(esp); + esp_reset_esp(esp); +#endif -static int __devexit esp_sbus_remove(struct of_device *dev) -{ - struct esp *esp = dev_get_drvdata(&dev->dev); + free_irq(esp->ehost->irq, esp); + sbus_free_consistent(esp->sdev, 16, + (void *) esp->esp_command, esp->esp_command_dvma); + sbus_iounmap(esp->eregs, ESP_REG_SIZE); + esp->dma->allocated = 0; + esp_chain_del(esp); - return esp_remove_common(esp); + return 0; } -#endif /* !CONFIG_SUN4 */ - /* The info function will return whatever useful * information the developer sees fit. If not provided, then * the name field will be used instead. @@ -1372,11 +1415,18 @@ static int esp_host_info(struct esp *esp, char *ptr, off_t offset, int len) static int esp_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int inout) { - struct esp *esp = (struct esp *) host->hostdata; + struct esp *esp; if (inout) return -EINVAL; /* not yet */ + for_each_esp(esp) { + if (esp->ehost == host) + break; + } + if (!esp) + return -EINVAL; + if (start) *start = buffer; @@ -1398,7 +1448,7 @@ static void esp_get_dmabufs(struct esp *esp, struct scsi_cmnd *sp) sp->SCp.ptr = NULL; } } else { - sp->SCp.buffer = (struct scatterlist *) sp->request_buffer; + sp->SCp.buffer = (struct scatterlist *) sp->buffer; sp->SCp.buffers_residual = sbus_map_sg(esp->sdev, sp->SCp.buffer, sp->use_sg, @@ -1411,7 +1461,7 @@ static void esp_get_dmabufs(struct esp *esp, struct scsi_cmnd *sp) static void esp_release_dmabufs(struct esp *esp, struct scsi_cmnd *sp) { if (sp->use_sg) { - sbus_unmap_sg(esp->sdev, sp->request_buffer, sp->use_sg, + sbus_unmap_sg(esp->sdev, sp->buffer, sp->use_sg, sp->sc_data_direction); } else if (sp->request_bufflen) { sbus_unmap_single(esp->sdev, @@ -2755,15 +2805,18 @@ static int esp_do_data_finale(struct esp *esp) */ static int esp_should_clear_sync(struct scsi_cmnd *sp) { - u8 cmd = sp->cmnd[0]; + u8 cmd1 = sp->cmnd[0]; + u8 cmd2 = sp->data_cmnd[0]; /* These cases are for spinning up a disk and * waiting for that spinup to complete. */ - if (cmd == START_STOP) + if (cmd1 == START_STOP || + cmd2 == START_STOP) return 0; - if (cmd == TEST_UNIT_READY) + if (cmd1 == TEST_UNIT_READY || + cmd2 == TEST_UNIT_READY) return 0; /* One more special case for SCSI tape drives, @@ -2771,7 +2824,8 @@ static int esp_should_clear_sync(struct scsi_cmnd *sp) * completion of a rewind or tape load operation. */ if (sp->device->type == TYPE_TAPE) { - if (cmd == MODE_SENSE) + if (cmd1 == MODE_SENSE || + cmd2 == MODE_SENSE) return 0; } @@ -4323,12 +4377,15 @@ static void esp_slave_destroy(struct scsi_device *SDptr) SDptr->hostdata = NULL; } -static struct scsi_host_template esp_template = { - .module = THIS_MODULE, - .name = "esp", - .info = esp_info, +static struct scsi_host_template driver_template = { + .proc_name = "esp", + .proc_info = esp_proc_info, + .name = "Sun ESP 100/100a/200", + .detect = esp_detect, .slave_alloc = esp_slave_alloc, .slave_destroy = esp_slave_destroy, + .release = esp_release, + .info = esp_info, .queuecommand = esp_queue, .eh_abort_handler = esp_abort, .eh_bus_reset_handler = esp_reset, @@ -4337,58 +4394,12 @@ static struct scsi_host_template esp_template = { .sg_tablesize = SG_ALL, .cmd_per_lun = 1, .use_clustering = ENABLE_CLUSTERING, - .proc_name = "esp", - .proc_info = esp_proc_info, -}; - -#ifndef CONFIG_SUN4 -static struct of_device_id esp_match[] = { - { - .name = "SUNW,esp", - .data = &esp_template, - }, - { - .name = "SUNW,fas", - .data = &esp_template, - }, - { - .name = "esp", - .data = &esp_template, - }, - {}, -}; -MODULE_DEVICE_TABLE(of, esp_match); - -static struct of_platform_driver esp_sbus_driver = { - .name = "esp", - .match_table = esp_match, - .probe = esp_sbus_probe, - .remove = __devexit_p(esp_sbus_remove), }; -#endif - -static int __init esp_init(void) -{ -#ifdef CONFIG_SUN4 - return esp_sun4_probe(&esp_template); -#else - return of_register_driver(&esp_sbus_driver, &sbus_bus_type); -#endif -} -static void __exit esp_exit(void) -{ -#ifdef CONFIG_SUN4 - esp_sun4_remove(); -#else - of_unregister_driver(&esp_sbus_driver); -#endif -} +#include "scsi_module.c" -MODULE_DESCRIPTION("ESP Sun SCSI driver"); -MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); +MODULE_DESCRIPTION("EnhancedScsiProcessor Sun SCSI driver"); +MODULE_AUTHOR("David S. Miller (davem@redhat.com)"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); -module_init(esp_init); -module_exit(esp_exit); diff --git a/drivers/scsi/esp.h b/drivers/scsi/esp.h index a98cda912..73f7d6968 100644 --- a/drivers/scsi/esp.h +++ b/drivers/scsi/esp.h @@ -403,4 +403,8 @@ struct esp { #define ESP_MHZ_TO_CYCLE(mhertz) ((1000000000) / ((mhertz) / 1000)) #define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000)) +/* For our interrupt engine. */ +#define for_each_esp(esp) \ + for((esp) = espchain; (esp); (esp) = (esp)->next) + #endif /* !(_SPARC_ESP_H) */ diff --git a/drivers/scsi/fastlane.c b/drivers/scsi/fastlane.c index 2a1c5c22b..8ae9c406a 100644 --- a/drivers/scsi/fastlane.c +++ b/drivers/scsi/fastlane.c @@ -210,7 +210,7 @@ int __init fastlane_esp_detect(struct scsi_host_template *tpnt) esp->irq = IRQ_AMIGA_PORTS; esp->slot = board+FASTLANE_ESP_ADDR; - if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "Fastlane SCSI", esp->ehost)) { printk(KERN_WARNING "Fastlane: Could not get IRQ%d, aborting.\n", IRQ_AMIGA_PORTS); goto err_unmap; diff --git a/drivers/scsi/fcal.c b/drivers/scsi/fcal.c index 7f891023a..03416548f 100644 --- a/drivers/scsi/fcal.c +++ b/drivers/scsi/fcal.c @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef CONFIG_KMOD #include #endif diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c index dde3edf35..cca485a2b 100644 --- a/drivers/scsi/fd_mcs.c +++ b/drivers/scsi/fd_mcs.c @@ -279,7 +279,7 @@ static struct fd_mcs_adapters_struct fd_mcs_adapters[] = { 2}, }; -#define FD_BRDS ARRAY_SIZE(fd_mcs_adapters) +#define FD_BRDS sizeof(fd_mcs_adapters)/sizeof(struct fd_mcs_adapters_struct) static irqreturn_t fd_mcs_intr(int irq, void *dev_id, struct pt_regs *regs); @@ -400,7 +400,7 @@ static int fd_mcs_detect(struct scsi_host_template * tpnt) mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name); /* check irq/region */ - if (request_irq(irq, fd_mcs_intr, IRQF_SHARED, "fd_mcs", hosts)) { + if (request_irq(irq, fd_mcs_intr, SA_SHIRQ, "fd_mcs", hosts)) { printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n"); continue; } diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index b0694dcce..733424439 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c @@ -266,6 +266,7 @@ **************************************************************************/ +#include #include #include #include @@ -419,10 +420,10 @@ static unsigned long addresses[] = { 0xd0000, 0xe0000, }; -#define ADDRESS_COUNT ARRAY_SIZE(addresses) - +#define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned )) + static unsigned short ports[] = { 0x140, 0x150, 0x160, 0x170 }; -#define PORT_COUNT ARRAY_SIZE(ports) +#define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short )) static unsigned short ints[] = { 3, 5, 10, 11, 12, 14, 15, 0 }; @@ -501,7 +502,7 @@ static struct signature { geometry location are verified). */ }; -#define SIGNATURE_COUNT ARRAY_SIZE(signatures) +#define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature )) static void print_banner( struct Scsi_Host *shpnt ) { @@ -518,7 +519,7 @@ static void print_banner( struct Scsi_Host *shpnt ) if (bios_minor >= 0) printk("%d", bios_minor); else printk("?."); - + printk( " at 0x%lx using scsi id %d\n", bios_base, shpnt->this_id ); } @@ -949,7 +950,7 @@ struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt ) /* Register the IRQ with the kernel */ retcode = request_irq( interrupt_level, - do_fdomain_16x0_intr, pdev?IRQF_SHARED:0, "fdomain", shpnt); + do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt); if (retcode < 0) { if (retcode == -EINVAL) { diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 67f1100f3..e6bcfe949 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c @@ -91,6 +91,7 @@ #define AUTOPROBE_IRQ #define AUTOSENSE +#include #ifdef CONFIG_SCSI_GENERIC_NCR53C400 #define NCR53C400_PSEUDO_DMA 1 @@ -137,9 +138,10 @@ static struct override { [1] __initdata = { { 0,},}; #endif -#define NO_OVERRIDES ARRAY_SIZE(overrides) -#ifndef MODULE +#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) + +#ifndef MODULE /** * internal_setup - handle lilo command string override @@ -208,7 +210,7 @@ static int __init do_NCR5380_setup(char *str) { int ints[10]; - get_options(str, ARRAY_SIZE(ints), ints); + get_options(str, sizeof(ints) / sizeof(int), ints); internal_setup(BOARD_NCR5380, str, ints); return 1; } @@ -216,7 +218,7 @@ static int __init do_NCR5380_setup(char *str) /** * do_NCR53C400_setup - set up entry point * @str: unused - * @ints: integer parameters from kernel setup code + * @ints: integer parameters from kernel setup code * * Setup function invoked at boot to parse the ncr53c400= command * line. @@ -226,7 +228,7 @@ static int __init do_NCR53C400_setup(char *str) { int ints[10]; - get_options(str, ARRAY_SIZE(ints), ints); + get_options(str, sizeof(ints) / sizeof(int), ints); internal_setup(BOARD_NCR53C400, str, ints); return 1; } @@ -234,7 +236,7 @@ static int __init do_NCR53C400_setup(char *str) /** * do_NCR53C400A_setup - set up entry point * @str: unused - * @ints: integer parameters from kernel setup code + * @ints: integer parameters from kernel setup code * * Setup function invoked at boot to parse the ncr53c400a= command * line. @@ -244,7 +246,7 @@ static int __init do_NCR53C400A_setup(char *str) { int ints[10]; - get_options(str, ARRAY_SIZE(ints), ints); + get_options(str, sizeof(ints) / sizeof(int), ints); internal_setup(BOARD_NCR53C400A, str, ints); return 1; } @@ -252,7 +254,7 @@ static int __init do_NCR53C400A_setup(char *str) /** * do_DTC3181E_setup - set up entry point * @str: unused - * @ints: integer parameters from kernel setup code + * @ints: integer parameters from kernel setup code * * Setup function invoked at boot to parse the dtc3181e= command * line. @@ -262,7 +264,7 @@ static int __init do_DTC3181E_setup(char *str) { int ints[10]; - get_options(str, ARRAY_SIZE(ints), ints); + get_options(str, sizeof(ints) / sizeof(int), ints); internal_setup(BOARD_DTC3181E, str, ints); return 1; } @@ -461,7 +463,7 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) instance->irq = NCR5380_probe_irq(instance, 0xffff); if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, generic_NCR5380_intr, IRQF_DISABLED, "NCR5380", instance)) { + if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", instance)) { printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; } diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h index df0b3f69e..d60a89cb8 100644 --- a/drivers/scsi/g_NCR5380.h +++ b/drivers/scsi/g_NCR5380.h @@ -32,6 +32,7 @@ #ifndef GENERIC_NCR5380_H #define GENERIC_NCR5380_H +#include #define GENERIC_NCR5380_PUBLIC_RELEASE 1 diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 5c0c92716..bd801c1b4 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c @@ -4,9 +4,9 @@ * Intel Corporation: Storage RAID Controllers * * * * gdth.c * - * Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner * + * Copyright (C) 1995-04 ICP vortex GmbH, Achim Leubner * * Copyright (C) 2002-04 Intel Corporation * - * Copyright (C) 2003-06 Adaptec Inc. * + * Copyright (C) 2003-04 Adaptec Inc. * * * * * * Additions/Fixes: * @@ -27,14 +27,9 @@ * along with this kernel; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * - * Linux kernel 2.4.x, 2.6.x supported * + * Linux kernel 2.2.x, 2.4.x, 2.6.x supported * * * * $Log: gdth.c,v $ - * Revision 1.74 2006/04/10 13:44:47 achim - * Community changes for 2.6.x - * Kernel 2.2.x no longer supported - * scsi_request interface removed, thanks to Christoph Hellwig - * * Revision 1.73 2004/03/31 13:33:03 achim * Special command 0xfd implemented to detect 64-bit DMA support * @@ -99,7 +94,7 @@ * Bugfix free_irq() * * Revision 1.56 2001/08/09 11:19:39 achim - * Scsi_Host_Template changes + * struct scsi_host_template changes * * Revision 1.55 2001/08/09 10:11:28 achim * Command HOST_UNFREEZE_IO before cache service init. @@ -393,13 +388,7 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6) #include -#else -#define DMA_32BIT_MASK 0x00000000ffffffffULL -#define DMA_64BIT_MASK 0xffffffffffffffffULL -#endif - #ifdef GDTH_RTC #include #endif @@ -419,8 +408,8 @@ #include "scsi.h" #include -#include "gdth_kcompat.h" #include "gdth.h" +#include "gdth_kcompat.h" static void gdth_delay(int milliseconds); static void gdth_eval_mapping(ulong32 size, ulong32 *cyls, int *heads, int *secs); @@ -475,8 +464,6 @@ static int gdth_ioctl(struct inode *inode, struct file *filep, static void gdth_flush(int hanum); static int gdth_halt(struct notifier_block *nb, ulong event, void *buf); -static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *)); -static void gdth_scsi_done(struct scsi_cmnd *scp); #ifdef DEBUG_GDTH static unchar DebugState = DEBUG_GDTH; @@ -569,8 +556,8 @@ static struct timer_list gdth_timer; #endif #define PTR2USHORT(a) (ushort)(ulong)(a) -#define GDTOFFSOF(a,b) (size_t)&(((a*)0)->b) -#define INDEX_OK(i,t) ((i)b) +#define INDEX_OK(i,t) ((i)hostdata)) #define HADATA(a) (&((gdth_ext_str *)((a)->hostdata))->haext) @@ -656,7 +643,6 @@ static int probe_eisa_isa = 0; static int force_dma32 = 0; /* parameters for modprobe/insmod */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) module_param_array(irq, int, NULL, 0); module_param(disable, int, 0); module_param(reserve_mode, int, 0); @@ -669,20 +655,6 @@ module_param(virt_ctr, int, 0); module_param(shared_access, int, 0); module_param(probe_eisa_isa, int, 0); module_param(force_dma32, int, 0); -#else -MODULE_PARM(irq, "i"); -MODULE_PARM(disable, "i"); -MODULE_PARM(reserve_mode, "i"); -MODULE_PARM(reserve_list, "4-" __MODULE_STRING(MAX_RES_ARGS) "i"); -MODULE_PARM(reverse_scan, "i"); -MODULE_PARM(hdr_channel, "i"); -MODULE_PARM(max_ids, "i"); -MODULE_PARM(rescan, "i"); -MODULE_PARM(virt_ctr, "i"); -MODULE_PARM(shared_access, "i"); -MODULE_PARM(probe_eisa_isa, "i"); -MODULE_PARM(force_dma32, "i"); -#endif MODULE_AUTHOR("Achim Leubner"); MODULE_LICENSE("GPL"); MODULE_VERSION(GDTH_VERSION_STR); @@ -712,91 +684,6 @@ static void gdth_delay(int milliseconds) } } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -static void gdth_scsi_done(struct scsi_cmnd *scp) -{ - TRACE2(("gdth_scsi_done()\n")); - - if (scp->request) - complete((struct completion *)scp->request); -} - -int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, - int timeout, u32 *info) -{ - Scsi_Cmnd *scp; - DECLARE_COMPLETION_ONSTACK(wait); - int rval; - - scp = kmalloc(sizeof(*scp), GFP_KERNEL); - if (!scp) - return -ENOMEM; - memset(scp, 0, sizeof(*scp)); - scp->device = sdev; - /* use request field to save the ptr. to completion struct. */ - scp->request = (struct request *)&wait; - scp->timeout_per_command = timeout*HZ; - scp->request_buffer = gdtcmd; - scp->cmd_len = 12; - memcpy(scp->cmnd, cmnd, 12); - scp->SCp.this_residual = IOCTL_PRI; /* priority */ - scp->done = gdth_scsi_done; /* some fn. test this */ - gdth_queuecommand(scp, gdth_scsi_done); - wait_for_completion(&wait); - - rval = scp->SCp.Status; - if (info) - *info = scp->SCp.Message; - kfree(scp); - return rval; -} -#else -static void gdth_scsi_done(Scsi_Cmnd *scp) -{ - TRACE2(("gdth_scsi_done()\n")); - - scp->request.rq_status = RQ_SCSI_DONE; - if (scp->request.waiting) - complete(scp->request.waiting); -} - -int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, - int timeout, u32 *info) -{ - Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE); - unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0; - DECLARE_COMPLETION_ONSTACK(wait); - int rval; - - if (!scp) - return -ENOMEM; - scp->cmd_len = 12; - scp->use_sg = 0; - scp->SCp.this_residual = IOCTL_PRI; /* priority */ - scp->request.rq_status = RQ_SCSI_BUSY; - scp->request.waiting = &wait; - scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1); - wait_for_completion(&wait); - - rval = scp->SCp.Status; - if (info) - *info = scp->SCp.Message; - - scsi_release_command(scp); - return rval; -} -#endif - -int gdth_execute(struct Scsi_Host *shost, gdth_cmd_str *gdtcmd, char *cmnd, - int timeout, u32 *info) -{ - struct scsi_device *sdev = scsi_get_host_dev(shost); - int rval = __gdth_execute(sdev, gdtcmd, cmnd, timeout, info); - - scsi_free_host_dev(sdev); - return rval; -} - static void gdth_eval_mapping(ulong32 size, ulong32 *cyls, int *heads, int *secs) { *cyls = size /HEADS/SECS; @@ -887,7 +774,7 @@ static struct pci_device_id gdthtable[] __attribute_used__ = { MODULE_DEVICE_TABLE(pci,gdthtable); static void __init gdth_search_dev(gdth_pci_str *pcistr, ushort *cnt, - ushort vendor, ushort device) + ushort vendor, ushort device) { ulong base0, base1, base2; struct pci_dev *pdev; @@ -2362,16 +2249,14 @@ static void gdth_putq(int hanum,Scsi_Cmnd *scp,unchar priority) ha = HADATA(gdth_ctr_tab[hanum]); spin_lock_irqsave(&ha->smp_lock, flags); - if (scp->done != gdth_scsi_done) { - scp->SCp.this_residual = (int)priority; - b = virt_ctr ? NUMDATA(scp->device->host)->busnum:scp->device->channel; - t = scp->device->id; - if (priority >= DEFAULT_PRI) { - if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha,b)].lock) || - (b==ha->virt_bus && thdr[t].lock)) { - TRACE2(("gdth_putq(): locked IO ->update_timeout()\n")); - scp->SCp.buffers_residual = gdth_update_timeout(hanum, scp, 0); - } + scp->SCp.this_residual = (int)priority; + b = virt_ctr ? NUMDATA(scp->device->host)->busnum : scp->device->channel; + t = scp->device->id; + if (priority >= DEFAULT_PRI) { + if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha,b)].lock) || + (b == ha->virt_bus && t < MAX_HDRIVES && ha->hdr[t].lock)) { + TRACE2(("gdth_putq(): locked IO -> update_timeout()\n")); + scp->SCp.buffers_residual = gdth_update_timeout(hanum, scp, 0); } } @@ -2425,18 +2310,14 @@ static void gdth_next(int hanum) for (nscp = pscp = ha->req_first; nscp; nscp = (Scsi_Cmnd *)nscp->SCp.ptr) { if (nscp != pscp && nscp != (Scsi_Cmnd *)pscp->SCp.ptr) pscp = (Scsi_Cmnd *)pscp->SCp.ptr; - if (nscp->done != gdth_scsi_done) { - b = virt_ctr ? - NUMDATA(nscp->device->host)->busnum : nscp->device->channel; - t = nscp->device->id; - l = nscp->device->lun; - if (nscp->SCp.this_residual >= DEFAULT_PRI) { - if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha,b)].lock) || - (b == ha->virt_bus && t < MAX_HDRIVES && ha->hdr[t].lock)) - continue; - } - } else - b = t = l = 0; + b = virt_ctr ? NUMDATA(nscp->device->host)->busnum : nscp->device->channel; + t = nscp->device->id; + l = nscp->device->lun; + if (nscp->SCp.this_residual >= DEFAULT_PRI) { + if ((b != ha->virt_bus && ha->raw[BUS_L2P(ha,b)].lock) || + (b == ha->virt_bus && t < MAX_HDRIVES && ha->hdr[t].lock)) + continue; + } if (firsttime) { if (gdth_test_busy(hanum)) { /* controller busy ? */ @@ -2451,7 +2332,7 @@ static void gdth_next(int hanum) firsttime = FALSE; } - if (nscp->done != gdth_scsi_done) { + if (nscp->done != gdth_scsi_done || nscp->cmnd[0] != 0xff) { if (nscp->SCp.phase == -1) { nscp->SCp.phase = CACHESERVICE; /* default: cache svc. */ if (nscp->cmnd[0] == TEST_UNIT_READY) { @@ -2514,7 +2395,7 @@ static void gdth_next(int hanum) else nscp->scsi_done(nscp); } - } else if (nscp->done == gdth_scsi_done) { + } else if (nscp->done == gdth_scsi_done && nscp->cmnd[0] == 0xff) { if (!(cmd_index=gdth_special_cmd(hanum,nscp))) this_cmd = FALSE; next_cmd = FALSE; @@ -2662,13 +2543,13 @@ static void gdth_copy_internal_data(int hanum,Scsi_Cmnd *scp, gdth_ha_str *ha; char *address; - cpcount = count<=(ushort)scp->request_bufflen ? count:(ushort)scp->request_bufflen; + cpcount = count<=(ushort)scp->bufflen ? count:(ushort)scp->bufflen; ha = HADATA(gdth_ctr_tab[hanum]); if (scp->use_sg) { sl = (struct scatterlist *)scp->request_buffer; for (i=0,cpsum=0; iuse_sg; ++i,++sl) { - unsigned long flags; + unsigned long flags; cpnow = (ushort)sl->length; TRACE(("copy_internal() now %d sum %d count %d %d\n", cpnow,cpsum,cpcount,(ushort)scp->bufflen)); @@ -2680,19 +2561,12 @@ static void gdth_copy_internal_data(int hanum,Scsi_Cmnd *scp, hanum); return; } - local_irq_save(flags); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - address = kmap_atomic(sl->page, KM_BIO_SRC_IRQ) + sl->offset; - memcpy(address,buffer,cpnow); - flush_dcache_page(sl->page); - kunmap_atomic(address, KM_BIO_SRC_IRQ); -#else - address = kmap_atomic(sl->page, KM_BH_IRQ) + sl->offset; + local_irq_save(flags); + address = kmap_atomic(sl->page, KM_BIO_SRC_IRQ) + sl->offset; memcpy(address,buffer,cpnow); - flush_dcache_page(sl->page); - kunmap_atomic(address, KM_BH_IRQ); -#endif - local_irq_restore(flags); + flush_dcache_page(sl->page); + kunmap_atomic(address, KM_BIO_SRC_IRQ); + local_irq_restore(flags); if (cpsum == cpcount) break; buffer += cpnow; @@ -3073,9 +2947,9 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) offset = (ulong)scp->sense_buffer & ~PAGE_MASK; sense_paddr = pci_map_page(ha->pdev,page,offset, 16,PCI_DMA_FROMDEVICE); - *(ulong32 *)&scp->SCp.buffer = (ulong32)sense_paddr; + scp->SCp.buffer = (struct scatterlist *)((ulong32)sense_paddr); /* high part, if 64bit */ - *(ulong32 *)&scp->host_scribble = (ulong32)((ulong64)sense_paddr >> 32); + scp->host_scribble = (char *)(ulong32)((ulong64)sense_paddr >> 32); cmdp->OpCode = GDT_WRITE; /* always */ cmdp->BoardNode = LOCALBOARD; if (mode64) { @@ -3149,7 +3023,7 @@ static int gdth_fill_raw_cmd(int hanum,Scsi_Cmnd *scp,unchar b) } #endif - } else if (scp->request_bufflen) { + } else { scp->SCp.Status = GDTH_MAP_SINGLE; scp->SCp.Message = PCI_DMA_BIDIRECTIONAL; page = virt_to_page(scp->request_buffer); @@ -3436,7 +3310,7 @@ static irqreturn_t gdth_interrupt(int irq,void *dev_id,struct pt_regs *regs) } if (!gdth_polling) - spin_lock_irqsave(&ha2->smp_lock, flags); + spin_lock_irqsave(&ha2->smp_lock, flags); wait_index = 0; /* search controller */ @@ -3769,10 +3643,9 @@ static int gdth_sync_event(int hanum,int service,unchar index,Scsi_Cmnd *scp) scp->request_bufflen,scp->SCp.Message); if (scp->SCp.buffer) { dma_addr_t addr; - addr = (dma_addr_t)*(ulong32 *)&scp->SCp.buffer; + addr = (dma_addr_t)(ulong32)scp->SCp.buffer; if (scp->host_scribble) - addr += (dma_addr_t) - ((ulong64)(*(ulong32 *)&scp->host_scribble) << 32); + addr += (dma_addr_t)((ulong64)(ulong32)scp->host_scribble << 32); pci_unmap_page(ha->pdev,addr,16,PCI_DMA_FROMDEVICE); } @@ -4282,11 +4155,7 @@ int __init option_setup(char *str) return 1; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int __init gdth_detect(struct scsi_host_template *shtp) -#else -static int __init gdth_detect(Scsi_Host_Template *shtp) -#endif { struct Scsi_Host *shp; gdth_pci_str pcistr[MAXHA]; @@ -4320,7 +4189,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) return 0; } - printk("GDT-HA: Storage RAID Controller Driver. Version: %s\n",GDTH_VERSION_STR); + printk("GDT-HA: Storage RAID Controller Driver. Version: %s \n",GDTH_VERSION_STR); /* initializations */ gdth_polling = TRUE; b = 0; gdth_clear_events(); @@ -4351,7 +4220,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) printk("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n", isa_bios,ha->irq,ha->drq); - if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) { + if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { printk("GDT-ISA: Unable to allocate IRQ\n"); scsi_unregister(shp); continue; @@ -4477,7 +4346,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) printk("Configuring GDT-EISA HA at Slot %d IRQ %u\n", eisa_slot>>12,ha->irq); - if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) { + if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { printk("GDT-EISA: Unable to allocate IRQ\n"); scsi_unregister(shp); continue; @@ -4604,7 +4473,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq); if (request_irq(ha->irq, gdth_interrupt, - IRQF_DISABLED|IRQF_SHARED, "gdth", ha)) + SA_INTERRUPT|SA_SHIRQ, "gdth", ha)) { printk("GDT-PCI: Unable to allocate IRQ\n"); scsi_unregister(shp); @@ -4883,7 +4752,7 @@ static int gdth_eh_bus_reset(Scsi_Cmnd *scp) gdth_internal_cmd(hanum, SCSIRAWSERVICE, GDT_RESET_BUS, BUS_L2P(ha,b), 0, 0); gdth_polling = FALSE; - spin_unlock_irqrestore(&ha->smp_lock, flags); + spin_unlock_irqrestore(&ha->smp_lock, flags); } return SUCCESS; } @@ -4951,9 +4820,7 @@ static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *)) priority = DEFAULT_PRI; if (scp->done == gdth_scsi_done) priority = scp->SCp.this_residual; - else - gdth_update_timeout(hanum, scp, scp->timeout_per_command * 6); - + gdth_update_timeout(hanum, scp, scp->timeout_per_command * 6); gdth_putq( hanum, scp, priority ); gdth_next( hanum ); return 0; @@ -5056,7 +4923,11 @@ static int ioc_resetdrv(void __user *arg, char *cmnd) gdth_cmd_str cmd; int hanum; gdth_ha_str *ha; - int rval; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; +#else + Scsi_Cmnd *scp; +#endif if (copy_from_user(&res, arg, sizeof(gdth_ioctl_reset)) || res.ionode >= gdth_ctr_count || res.number >= MAX_HDRIVES) @@ -5073,11 +4944,25 @@ static int ioc_resetdrv(void __user *arg, char *cmnd) cmd.u.cache64.DeviceNo = res.number; else cmd.u.cache.DeviceNo = res.number; - - rval = __gdth_execute(ha->sdev, &cmd, cmnd, 30, NULL); - if (rval < 0) - return rval; - res.status = rval; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + srp = scsi_allocate_request(ha->sdev, GFP_KERNEL); + if (!srp) + return -ENOMEM; + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; + gdth_do_req(srp, &cmd, cmnd, 30); + res.status = (ushort)srp->sr_command->SCp.Status; + scsi_release_request(srp); +#else + scp = scsi_allocate_device(ha->sdev, 1, FALSE); + if (!scp) + return -ENOMEM; + scp->cmd_len = 12; + scp->use_sg = 0; + gdth_do_cmd(scp, &cmd, cmnd, 30); + res.status = (ushort)scp->SCp.Status; + scsi_release_command(scp); +#endif if (copy_to_user(arg, &res, sizeof(gdth_ioctl_reset))) return -EFAULT; @@ -5090,8 +4975,12 @@ static int ioc_general(void __user *arg, char *cmnd) char *buf = NULL; ulong64 paddr; int hanum; - gdth_ha_str *ha; - int rval; + gdth_ha_str *ha; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; +#else + Scsi_Cmnd *scp; +#endif if (copy_from_user(&gen, arg, sizeof(gdth_ioctl_general)) || gen.ionode >= gdth_ctr_count) @@ -5183,10 +5072,27 @@ static int ioc_general(void __user *arg, char *cmnd) } } - rval = __gdth_execute(ha->sdev, &gen.command, cmnd, gen.timeout, &gen.info); - if (rval < 0) - return rval; - gen.status = rval; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + srp = scsi_allocate_request(ha->sdev, GFP_KERNEL); + if (!srp) + return -ENOMEM; + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; + gdth_do_req(srp, &gen.command, cmnd, gen.timeout); + gen.status = srp->sr_command->SCp.Status; + gen.info = srp->sr_command->SCp.Message; + scsi_release_request(srp); +#else + scp = scsi_allocate_device(ha->sdev, 1, FALSE); + if (!scp) + return -ENOMEM; + scp->cmd_len = 12; + scp->use_sg = 0; + gdth_do_cmd(scp, &gen.command, cmnd, gen.timeout); + gen.status = scp->SCp.Status; + gen.info = scp->SCp.Message; + scsi_release_command(scp); +#endif if (copy_to_user(arg + sizeof(gdth_ioctl_general), buf, gen.data_len + gen.sense_len)) { @@ -5209,22 +5115,40 @@ static int ioc_hdrlist(void __user *arg, char *cmnd) gdth_ha_str *ha; unchar i; int hanum, rc = -ENOMEM; - u32 cluster_type = 0; - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; +#else + Scsi_Cmnd *scp; +#endif + rsc = kmalloc(sizeof(*rsc), GFP_KERNEL); cmd = kmalloc(sizeof(*cmd), GFP_KERNEL); if (!rsc || !cmd) - goto free_fail; + goto free_fail; if (copy_from_user(rsc, arg, sizeof(gdth_ioctl_rescan)) || rsc->ionode >= gdth_ctr_count) { rc = -EFAULT; - goto free_fail; + goto free_fail; } hanum = rsc->ionode; ha = HADATA(gdth_ctr_tab[hanum]); memset(cmd, 0, sizeof(gdth_cmd_str)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + srp = scsi_allocate_request(ha->sdev, GFP_KERNEL); + if (!srp) + goto free_fail; + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; +#else + scp = scsi_allocate_device(ha->sdev, 1, FALSE); + if (!scp) + goto free_fail; + scp->cmd_len = 12; + scp->use_sg = 0; +#endif + for (i = 0; i < MAX_HDRIVES; ++i) { if (!ha->hdr[i].present) { rsc->hdr_list[i].bus = 0xff; @@ -5241,15 +5165,27 @@ static int ioc_hdrlist(void __user *arg, char *cmnd) cmd->u.cache64.DeviceNo = i; else cmd->u.cache.DeviceNo = i; - if (__gdth_execute(ha->sdev, cmd, cmnd, 30, &cluster_type) == S_OK) - rsc->hdr_list[i].cluster_type = cluster_type; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + if (srp->sr_command->SCp.Status == S_OK) + rsc->hdr_list[i].cluster_type = srp->sr_command->SCp.Message; +#else + gdth_do_cmd(scp, cmd, cmnd, 30); + if (scp->SCp.Status == S_OK) + rsc->hdr_list[i].cluster_type = scp->SCp.Message; +#endif } } - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scsi_release_request(srp); +#else + scsi_release_command(scp); +#endif + if (copy_to_user(arg, rsc, sizeof(gdth_ioctl_rescan))) rc = -EFAULT; else - rc = 0; + rc = 0; free_fail: kfree(rsc); @@ -5267,21 +5203,40 @@ static int ioc_rescan(void __user *arg, char *cmnd) int rc = -ENOMEM; ulong flags; gdth_ha_str *ha; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; +#else + Scsi_Cmnd *scp; +#endif rsc = kmalloc(sizeof(*rsc), GFP_KERNEL); cmd = kmalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd || !rsc) - goto free_fail; + goto free_fail; if (copy_from_user(rsc, arg, sizeof(gdth_ioctl_rescan)) || rsc->ionode >= gdth_ctr_count) { - rc = -EFAULT; - goto free_fail; + rc = -EFAULT; + goto free_fail; } hanum = rsc->ionode; ha = HADATA(gdth_ctr_tab[hanum]); memset(cmd, 0, sizeof(gdth_cmd_str)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + srp = scsi_allocate_request(ha->sdev, GFP_KERNEL); + if (!srp) + goto free_fail; + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; +#else + scp = scsi_allocate_device(ha->sdev, 1, FALSE); + if (!scp) + goto free_fail; + scp->cmd_len = 12; + scp->use_sg = 0; +#endif + if (rsc->flag == 0) { /* old method: re-init. cache service */ cmd->Service = CACHESERVICE; @@ -5292,8 +5247,19 @@ static int ioc_rescan(void __user *arg, char *cmnd) cmd->OpCode = GDT_INIT; cmd->u.cache.DeviceNo = LINUX_OS; } - - status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + status = (ushort)srp->sr_command->SCp.Status; + info = (ulong32)srp->sr_command->SCp.Message; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + gdth_do_cmd(scp, cmd, cmnd, 30); + status = (ushort)scp->SCp.Status; + info = (ulong32)scp->SCp.Message; +#else + gdth_do_cmd(&scp, cmd, cmnd, 30); + status = (ushort)scp.SCp.Status; + info = (ulong32)scp.SCp.Message; +#endif i = 0; hdr_cnt = (status == S_OK ? (ushort)info : 0); } else { @@ -5308,9 +5274,15 @@ static int ioc_rescan(void __user *arg, char *cmnd) cmd->u.cache64.DeviceNo = i; else cmd->u.cache.DeviceNo = i; - - status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + status = (ushort)srp->sr_command->SCp.Status; + info = (ulong32)srp->sr_command->SCp.Message; +#else + gdth_do_cmd(scp, cmd, cmnd, 30); + status = (ushort)scp->SCp.Status; + info = (ulong32)scp->SCp.Message; +#endif spin_lock_irqsave(&ha->smp_lock, flags); rsc->hdr_list[i].bus = ha->virt_bus; rsc->hdr_list[i].target = i; @@ -5342,9 +5314,15 @@ static int ioc_rescan(void __user *arg, char *cmnd) cmd->u.cache64.DeviceNo = i; else cmd->u.cache.DeviceNo = i; - - status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + status = (ushort)srp->sr_command->SCp.Status; + info = (ulong32)srp->sr_command->SCp.Message; +#else + gdth_do_cmd(scp, cmd, cmnd, 30); + status = (ushort)scp->SCp.Status; + info = (ulong32)scp->SCp.Message; +#endif spin_lock_irqsave(&ha->smp_lock, flags); ha->hdr[i].devtype = (status == S_OK ? (ushort)info : 0); spin_unlock_irqrestore(&ha->smp_lock, flags); @@ -5355,9 +5333,15 @@ static int ioc_rescan(void __user *arg, char *cmnd) cmd->u.cache64.DeviceNo = i; else cmd->u.cache.DeviceNo = i; - - status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + status = (ushort)srp->sr_command->SCp.Status; + info = (ulong32)srp->sr_command->SCp.Message; +#else + gdth_do_cmd(scp, cmd, cmnd, 30); + status = (ushort)scp->SCp.Status; + info = (ulong32)scp->SCp.Message; +#endif spin_lock_irqsave(&ha->smp_lock, flags); ha->hdr[i].cluster_type = ((status == S_OK && !shared_access) ? (ushort)info : 0); @@ -5370,18 +5354,29 @@ static int ioc_rescan(void __user *arg, char *cmnd) cmd->u.cache64.DeviceNo = i; else cmd->u.cache.DeviceNo = i; - - status = __gdth_execute(ha->sdev, cmd, cmnd, 30, &info); - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, cmd, cmnd, 30); + status = (ushort)srp->sr_command->SCp.Status; + info = (ulong32)srp->sr_command->SCp.Message; +#else + gdth_do_cmd(scp, cmd, cmnd, 30); + status = (ushort)scp->SCp.Status; + info = (ulong32)scp->SCp.Message; +#endif spin_lock_irqsave(&ha->smp_lock, flags); ha->hdr[i].rw_attribs = (status == S_OK ? (ushort)info : 0); spin_unlock_irqrestore(&ha->smp_lock, flags); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scsi_release_request(srp); +#else + scsi_release_command(scp); +#endif if (copy_to_user(arg, rsc, sizeof(gdth_ioctl_rescan))) rc = -EFAULT; else - rc = 0; + rc = 0; free_fail: kfree(rsc); @@ -5521,18 +5516,17 @@ static int gdth_ioctl(struct inode *inode, struct file *filep, hanum = res.ionode; ha = HADATA(gdth_ctr_tab[hanum]); + /* Because we need a Scsi_Cmnd struct., we make a scsi_allocate device also for kernels >=2.6.x */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - scp = kmalloc(sizeof(*scp), GFP_KERNEL); + scp = scsi_get_command(ha->sdev, GFP_KERNEL); if (!scp) return -ENOMEM; - memset(scp, 0, sizeof(*scp)); - scp->device = ha->sdev; scp->cmd_len = 12; scp->use_sg = 0; scp->device->channel = virt_ctr ? 0 : res.number; rval = gdth_eh_bus_reset(scp); res.status = (rval == SUCCESS ? S_OK : S_GENERR); - kfree(scp); + scsi_put_command(scp); #else scp = scsi_allocate_device(ha->sdev, 1, FALSE); if (!scp) @@ -5565,12 +5559,34 @@ static void gdth_flush(int hanum) int i; gdth_ha_str *ha; gdth_cmd_str gdtcmd; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; +#else + Scsi_Cmnd *scp; +#endif + struct scsi_device *sdev; char cmnd[MAX_COMMAND_SIZE]; memset(cmnd, 0xff, MAX_COMMAND_SIZE); TRACE2(("gdth_flush() hanum %d\n",hanum)); ha = HADATA(gdth_ctr_tab[hanum]); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]); + srp = scsi_allocate_request(sdev, GFP_KERNEL); + if (!srp) + return; + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; +#else + sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]); + scp = scsi_allocate_device(sdev, 1, FALSE); + if (!scp) + return; + scp->cmd_len = 12; + scp->use_sg = 0; +#endif + for (i = 0; i < MAX_HDRIVES; ++i) { if (ha->hdr[i].present) { gdtcmd.BoardNode = LOCALBOARD; @@ -5586,10 +5602,20 @@ static void gdth_flush(int hanum) gdtcmd.u.cache.sg_canz = 0; } TRACE2(("gdth_flush(): flush ha %d drive %d\n", hanum, i)); - - gdth_execute(gdth_ctr_tab[hanum], &gdtcmd, cmnd, 30, NULL); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(srp, &gdtcmd, cmnd, 30); +#else + gdth_do_cmd(scp, &gdtcmd, cmnd, 30); +#endif } } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scsi_release_request(srp); + scsi_free_host_dev(sdev); +#else + scsi_release_command(scp); + scsi_free_host_dev(sdev); +#endif } /* shutdown routine */ @@ -5598,11 +5624,18 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) int hanum; #ifndef __alpha__ gdth_cmd_str gdtcmd; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *srp; + struct scsi_device *sdev; +#else + Scsi_Cmnd *scp; + struct scsi_device *sdev; +#endif char cmnd[MAX_COMMAND_SIZE]; #endif if (notifier_disabled) - return NOTIFY_OK; + return NOTIFY_OK; TRACE2(("gdth_halt() event %d\n",(int)event)); if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF) @@ -5620,7 +5653,31 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) gdtcmd.Service = CACHESERVICE; gdtcmd.OpCode = GDT_RESET; TRACE2(("gdth_halt(): reset controller %d\n", hanum)); - gdth_execute(gdth_ctr_tab[hanum], &gdtcmd, cmnd, 10, NULL); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]); + srp = scsi_allocate_request(sdev, GFP_KERNEL); + if (!srp) { + unregister_reboot_notifier(&gdth_notifier); + return NOTIFY_OK; + } + srp->sr_cmd_len = 12; + srp->sr_use_sg = 0; + gdth_do_req(srp, &gdtcmd, cmnd, 10); + scsi_release_request(srp); + scsi_free_host_dev(sdev); +#else + sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]); + scp = scsi_allocate_device(sdev, 1, FALSE); + if (!scp) { + unregister_reboot_notifier(&gdth_notifier); + return NOTIFY_OK; + } + scp->cmd_len = 12; + scp->use_sg = 0; + gdth_do_cmd(scp, &gdtcmd, cmnd, 10); + scsi_release_command(scp); + scsi_free_host_dev(sdev); +#endif #endif } printk("Done.\n"); @@ -5631,22 +5688,7 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf) return NOTIFY_OK; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) -/* configure lun */ -static int gdth_slave_configure(struct scsi_device *sdev) -{ - scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); - sdev->skip_ms_page_3f = 1; - sdev->skip_ms_page_8 = 1; - return 0; -} -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static struct scsi_host_template driver_template = { -#else -static Scsi_Host_Template driver_template = { -#endif .proc_name = "gdth", .proc_info = gdth_proc_info, .name = "GDT SCSI Disk Array Controller", @@ -5657,9 +5699,6 @@ static Scsi_Host_Template driver_template = { .eh_bus_reset_handler = gdth_eh_bus_reset, .bios_param = gdth_bios_param, .can_queue = GDTH_MAXCMDS, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .slave_configure = gdth_slave_configure, -#endif .this_id = -1, .sg_tablesize = GDTH_MAXSG, .cmd_per_lun = GDTH_MAXC_P_L, diff --git a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h index 47eae0299..cc4882fb9 100644 --- a/drivers/scsi/gdth.h +++ b/drivers/scsi/gdth.h @@ -4,13 +4,13 @@ /* * Header file for the GDT Disk Array/Storage RAID controllers driver for Linux * - * gdth.h Copyright (C) 1995-06 ICP vortex, Achim Leubner + * gdth.h Copyright (C) 1995-03 ICP vortex, Achim Leubner * See gdth.c for further informations and * below for supported controller types * * * - * $Id: gdth.h,v 1.58 2006/01/11 16:14:09 achim Exp $ + * $Id: gdth.h,v 1.57 2004/03/31 11:52:09 achim Exp $ */ #include @@ -26,9 +26,9 @@ /* defines, macros */ /* driver version */ -#define GDTH_VERSION_STR "3.05" +#define GDTH_VERSION_STR "3.04" #define GDTH_VERSION 3 -#define GDTH_SUBVERSION 5 +#define GDTH_SUBVERSION 4 /* protocol version */ #define PROTOCOL_VERSION 1 diff --git a/drivers/scsi/gdth_kcompat.h b/drivers/scsi/gdth_kcompat.h index 2a302eee6..e6cf0edfa 100644 --- a/drivers/scsi/gdth_kcompat.h +++ b/drivers/scsi/gdth_kcompat.h @@ -1,3 +1,5 @@ + + #ifndef IRQ_HANDLED typedef void irqreturn_t; #define IRQ_NONE @@ -8,18 +10,6 @@ typedef void irqreturn_t; #define MODULE_LICENSE(x) #endif -#ifndef __iomem -#define __iomem -#endif - -#ifndef __attribute_used__ -#define __attribute_used__ __devinitdata -#endif - -#ifndef __user -#define __user -#endif - #ifndef SERVICE_ACTION_IN #define SERVICE_ACTION_IN 0x9e #endif diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index 32982eb75..5e8657f9c 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c @@ -1,5 +1,5 @@ /* gdth_proc.c - * $Id: gdth_proc.c,v 1.43 2006/01/11 16:15:00 achim Exp $ + * $Id: gdth_proc.c,v 1.42 2004/03/05 15:50:20 achim Exp $ */ #include @@ -51,26 +51,57 @@ int gdth_proc_info(char *buffer,char **start,off_t offset,int length,int hostno, static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host, int hanum,int busnum) { - int ret_val = -EINVAL; - + int ret_val = -EINVAL; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *scp; + struct scsi_device *sdev; +#else + Scsi_Cmnd *scp; + struct scsi_device *sdev; +#endif TRACE2(("gdth_set_info() ha %d bus %d\n",hanum,busnum)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + sdev = scsi_get_host_dev(host); + scp = scsi_allocate_request(sdev, GFP_KERNEL); + if (!scp) + return -ENOMEM; + scp->sr_cmd_len = 12; + scp->sr_use_sg = 0; +#else + sdev = scsi_get_host_dev(host); + scp = scsi_allocate_device(sdev, 1, FALSE); + if (!scp) + return -ENOMEM; + scp->cmd_len = 12; + scp->use_sg = 0; +#endif + if (length >= 4) { if (strncmp(buffer,"gdth",4) == 0) { buffer += 5; length -= 5; - ret_val = gdth_set_asc_info(host, buffer, length, hanum); + ret_val = gdth_set_asc_info( buffer, length, hanum, scp ); } } - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scsi_release_request(scp); + scsi_free_host_dev(sdev); +#else + scsi_release_command(scp); + scsi_free_host_dev(sdev); +#endif return ret_val; } -static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, - int length,int hanum) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Request *scp) +#else +static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd *scp) +#endif { - int orig_length, drive, wb_mode; - int i, found; + int orig_length, drive, wb_mode; + int i, found; gdth_ha_str *ha; gdth_cmd_str gdtcmd; gdth_cpar_str *pcpar; @@ -115,8 +146,11 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, gdtcmd.u.cache.DeviceNo = i; gdtcmd.u.cache.BlockNo = 1; } - - gdth_execute(host, &gdtcmd, cmnd, 30, NULL); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, &gdtcmd, cmnd, 30); +#else + gdth_do_cmd(scp, &gdtcmd, cmnd, 30); +#endif } } if (!found) @@ -168,9 +202,11 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, gdtcmd.u.ioctl.subfunc = CACHE_CONFIG; gdtcmd.u.ioctl.channel = INVALID_CHANNEL; pcpar->write_back = wb_mode==1 ? 0:1; - - gdth_execute(host, &gdtcmd, cmnd, 30, NULL); - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, &gdtcmd, cmnd, 30); +#else + gdth_do_cmd(scp, &gdtcmd, cmnd, 30); +#endif gdth_ioctl_free(hanum, GDTH_SCRATCH, ha->pscratch, paddr); printk("Done.\n"); return(orig_length); @@ -194,6 +230,13 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdth_cmd_str *gdtcmd; gdth_evt_str *estr; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + Scsi_Request *scp; + struct scsi_device *sdev; +#else + Scsi_Cmnd *scp; + struct scsi_device *sdev; +#endif char hrec[161]; struct timeval tv; @@ -209,7 +252,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd = kmalloc(sizeof(*gdtcmd), GFP_KERNEL); estr = kmalloc(sizeof(*estr), GFP_KERNEL); if (!gdtcmd || !estr) - goto free_fail; + goto free_fail; memset(cmnd, 0xff, 12); memset(gdtcmd, 0, sizeof(gdth_cmd_str)); @@ -217,6 +260,28 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, TRACE2(("gdth_get_info() ha %d bus %d\n",hanum,busnum)); ha = HADATA(gdth_ctr_tab[hanum]); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + sdev = scsi_get_host_dev(host); + scp = scsi_allocate_request(sdev, GFP_KERNEL); + if (!scp) + goto free_fail; + scp->sr_cmd_len = 12; + scp->sr_use_sg = 0; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + sdev = scsi_get_host_dev(host); + scp = scsi_allocate_device(sdev, 1, FALSE); + if (!scp) + goto free_fail; + scp->cmd_len = 12; + scp->use_sg = 0; +#else + memset(&sdev,0,sizeof(struct scsi_device)); + memset(&scp, 0,sizeof(Scsi_Cmnd)); + sdev.host = scp.host = host; + sdev.id = scp.target = sdev.host->this_id; + scp.device = &sdev; +#endif + /* request is i.e. "cat /proc/scsi/gdth/0" */ /* format: %-15s\t%-10s\t%-15s\t%s */ @@ -321,9 +386,16 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, sizeof(pds->list[0]); if (pds->entries > cnt) pds->entries = cnt; - - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) != S_OK) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status != S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status != S_OK) +#endif + { pds->count = 0; + } /* other IOCTLs must fit into area GDTH_SCRATCH/4 */ for (j = 0; j < ha->raw[i].pdev_cnt; ++j) { @@ -338,8 +410,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd->u.ioctl.subfunc = SCSI_DR_INFO | L_CTRL_PATTERN; gdtcmd->u.ioctl.channel = ha->raw[i].address | ha->raw[i].id_list[j]; - - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) == S_OK) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status == S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status == S_OK) +#endif + { strncpy(hrec,pdi->vendor,8); strncpy(hrec+8,pdi->product,16); strncpy(hrec+24,pdi->revision,4); @@ -388,8 +466,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd->u.ioctl.channel = ha->raw[i].address | ha->raw[i].id_list[j]; pdef->sddc_type = 0x08; - - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) == S_OK) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status == S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status == S_OK) +#endif + { size = sprintf(buffer+len, " Grown Defects:\t%d\n", pdef->sddc_cnt); @@ -435,8 +519,16 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd->u.ioctl.param_size = sizeof(gdth_cdrinfo_str); gdtcmd->u.ioctl.subfunc = CACHE_DRV_INFO; gdtcmd->u.ioctl.channel = drv_no; - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) != S_OK) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status != S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status != S_OK) +#endif + { break; + } pcdi->ld_dtype >>= 16; j++; if (pcdi->ld_dtype > 2) { @@ -537,7 +629,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd->u.ioctl.param_size = sizeof(gdth_arrayinf_str); gdtcmd->u.ioctl.subfunc = ARRAY_INFO | LA_CTRL_PATTERN; gdtcmd->u.ioctl.channel = i; - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) == S_OK) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status == S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status == S_OK) +#endif + { if (pai->ai_state == 0) strcpy(hrec, "idle"); else if (pai->ai_state == 2) @@ -611,7 +710,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, gdtcmd->u.ioctl.channel = i; phg->entries = MAX_HDRIVES; phg->offset = GDTOFFSOF(gdth_hget_str, entry[0]); - if (gdth_execute(host, gdtcmd, cmnd, 30, NULL) == S_OK) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + gdth_do_req(scp, gdtcmd, cmnd, 30); + if (scp->sr_command->SCp.Status != S_OK) +#else + gdth_do_cmd(scp, gdtcmd, cmnd, 30); + if (scp->SCp.Status != S_OK) +#endif + { ha->hdr[i].ldr_no = i; ha->hdr[i].rw_attribs = 0; ha->hdr[i].start_sec = 0; @@ -685,6 +791,13 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, } stop_output: +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scsi_release_request(scp); + scsi_free_host_dev(sdev); +#else + scsi_release_command(scp); + scsi_free_host_dev(sdev); +#endif *start = buffer +(offset-begin); len -= (offset-begin); if (len > length) @@ -699,6 +812,64 @@ free_fail: return rc; } + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +static void gdth_do_req(Scsi_Request *scp, gdth_cmd_str *gdtcmd, + char *cmnd, int timeout) +{ + unsigned bufflen; + DECLARE_COMPLETION(wait); + + TRACE2(("gdth_do_req()\n")); + if (gdtcmd != NULL) { + bufflen = sizeof(gdth_cmd_str); + } else { + bufflen = 0; + } + scp->sr_request->rq_status = RQ_SCSI_BUSY; + scp->sr_request->waiting = &wait; + scsi_do_req(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1); + wait_for_completion(&wait); +} + +#else +static void gdth_do_cmd(Scsi_Cmnd *scp, gdth_cmd_str *gdtcmd, + char *cmnd, int timeout) +{ + unsigned bufflen; + DECLARE_COMPLETION(wait); + + TRACE2(("gdth_do_cmd()\n")); + if (gdtcmd != NULL) { + scp->SCp.this_residual = IOCTL_PRI; + bufflen = sizeof(gdth_cmd_str); + } else { + scp->SCp.this_residual = DEFAULT_PRI; + bufflen = 0; + } + + scp->request.rq_status = RQ_SCSI_BUSY; + scp->request.waiting = &wait; + scsi_do_cmd(scp, cmnd, gdtcmd, bufflen, gdth_scsi_done, timeout*HZ, 1); + wait_for_completion(&wait); +} +#endif + +void gdth_scsi_done(Scsi_Cmnd *scp) +{ + TRACE2(("gdth_scsi_done()\n")); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + scp->request->rq_status = RQ_SCSI_DONE; + if (scp->request->waiting != NULL) + complete(scp->request->waiting); +#else + scp->request.rq_status = RQ_SCSI_DONE; + if (scp->request.waiting != NULL) + complete(scp->request.waiting); +#endif +} + static char *gdth_ioctl_alloc(int hanum, int size, int scratch, ulong64 *paddr) { @@ -805,14 +976,11 @@ static void gdth_stop_timeout(int hanum, int busnum, int id) spin_lock_irqsave(&ha->smp_lock, flags); for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { - if (scp->done != gdth_scsi_done) { - b = virt_ctr ? - NUMDATA(scp->device->host)->busnum : scp->device->channel; - t = scp->device->id; - if (t == (unchar)id && b == (unchar)busnum) { - TRACE2(("gdth_stop_timeout(): update_timeout()\n")); - scp->SCp.buffers_residual = gdth_update_timeout(hanum, scp, 0); - } + b = virt_ctr ? NUMDATA(scp->device->host)->busnum : scp->device->channel; + t = scp->device->id; + if (t == (unchar)id && b == (unchar)busnum) { + TRACE2(("gdth_stop_timeout(): update_timeout()\n")); + scp->SCp.buffers_residual = gdth_update_timeout(hanum, scp, 0); } } spin_unlock_irqrestore(&ha->smp_lock, flags); @@ -829,14 +997,11 @@ static void gdth_start_timeout(int hanum, int busnum, int id) spin_lock_irqsave(&ha->smp_lock, flags); for (scp = ha->req_first; scp; scp = (Scsi_Cmnd *)scp->SCp.ptr) { - if (scp->done != gdth_scsi_done) { - b = virt_ctr ? - NUMDATA(scp->device->host)->busnum : scp->device->channel; - t = scp->device->id; - if (t == (unchar)id && b == (unchar)busnum) { - TRACE2(("gdth_start_timeout(): update_timeout()\n")); - gdth_update_timeout(hanum, scp, scp->SCp.buffers_residual); - } + b = virt_ctr ? NUMDATA(scp->device->host)->busnum : scp->device->channel; + t = scp->device->id; + if (t == (unchar)id && b == (unchar)busnum) { + TRACE2(("gdth_start_timeout(): update_timeout()\n")); + gdth_update_timeout(hanum, scp, scp->SCp.buffers_residual); } } spin_unlock_irqrestore(&ha->smp_lock, flags); diff --git a/drivers/scsi/gdth_proc.h b/drivers/scsi/gdth_proc.h index a679eeb68..295e825e2 100644 --- a/drivers/scsi/gdth_proc.h +++ b/drivers/scsi/gdth_proc.h @@ -5,16 +5,20 @@ * $Id: gdth_proc.h,v 1.16 2004/01/14 13:09:01 achim Exp $ */ -int gdth_execute(struct Scsi_Host *shost, gdth_cmd_str *gdtcmd, char *cmnd, - int timeout, u32 *info); - static int gdth_set_info(char *buffer,int length,struct Scsi_Host *host, int hanum,int busnum); static int gdth_get_info(char *buffer,char **start,off_t offset,int length, struct Scsi_Host *host,int hanum,int busnum); -static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, - int length, int hanum); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +static void gdth_do_req(Scsi_Request *srp, gdth_cmd_str *cmd, + char *cmnd, int timeout); +static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Request *scp); +#else +static void gdth_do_cmd(Scsi_Cmnd *scp, gdth_cmd_str *cmd, + char *cmnd, int timeout); +static int gdth_set_asc_info(char *buffer,int length,int hanum,Scsi_Cmnd *scp); +#endif static char *gdth_ioctl_alloc(int hanum, int size, int scratch, ulong64 *paddr); @@ -24,5 +28,7 @@ static void gdth_stop_timeout(int hanum, int busnum, int id); static void gdth_start_timeout(int hanum, int busnum, int id); static int gdth_update_timeout(int hanum, Scsi_Cmnd *scp, int timeout); +void gdth_scsi_done(Scsi_Cmnd *scp); + #endif diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index a0d831b1b..5b1544980 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c @@ -328,7 +328,7 @@ int __init gvp11_detect(struct scsi_host_template *tpnt) (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 : WD33C93_FS_12_15); - request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI", + request_irq(IRQ_AMIGA_PORTS, gvp11_intr, SA_SHIRQ, "GVP11 SCSI", instance); DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; num_gvp11++; diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c deleted file mode 100644 index 28bfb8f9f..000000000 --- a/drivers/scsi/hptiop.c +++ /dev/null @@ -1,942 +0,0 @@ -/* - * HighPoint RR3xxx controller driver for Linux - * Copyright (C) 2006 HighPoint Technologies, Inc. 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; version 2 of the License. - * - * 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. - * - * Please report bugs/comments/suggestions to linux@highpoint-tech.com - * - * For more information, visit http://www.highpoint-tech.com - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "hptiop.h" - -MODULE_AUTHOR("HighPoint Technologies, Inc."); -MODULE_DESCRIPTION("HighPoint RocketRAID 3xxx SATA Controller Driver"); - -static char driver_name[] = "hptiop"; -static const char driver_name_long[] = "RocketRAID 3xxx SATA Controller driver"; -static const char driver_ver[] = "v1.0 (060426)"; - -static void hptiop_host_request_callback(struct hptiop_hba *hba, u32 tag); -static void hptiop_iop_request_callback(struct hptiop_hba *hba, u32 tag); -static void hptiop_message_callback(struct hptiop_hba *hba, u32 msg); - -static inline void hptiop_pci_posting_flush(struct hpt_iopmu __iomem *iop) -{ - readl(&iop->outbound_intstatus); -} - -static int iop_wait_ready(struct hpt_iopmu __iomem *iop, u32 millisec) -{ - u32 req = 0; - int i; - - for (i = 0; i < millisec; i++) { - req = readl(&iop->inbound_queue); - if (req != IOPMU_QUEUE_EMPTY) - break; - msleep(1); - } - - if (req != IOPMU_QUEUE_EMPTY) { - writel(req, &iop->outbound_queue); - hptiop_pci_posting_flush(iop); - return 0; - } - - return -1; -} - -static void hptiop_request_callback(struct hptiop_hba *hba, u32 tag) -{ - if ((tag & IOPMU_QUEUE_MASK_HOST_BITS) == IOPMU_QUEUE_ADDR_HOST_BIT) - return hptiop_host_request_callback(hba, - tag & ~IOPMU_QUEUE_ADDR_HOST_BIT); - else - return hptiop_iop_request_callback(hba, tag); -} - -static inline void hptiop_drain_outbound_queue(struct hptiop_hba *hba) -{ - u32 req; - - while ((req = readl(&hba->iop->outbound_queue)) != IOPMU_QUEUE_EMPTY) { - - if (req & IOPMU_QUEUE_MASK_HOST_BITS) - hptiop_request_callback(hba, req); - else { - struct hpt_iop_request_header __iomem * p; - - p = (struct hpt_iop_request_header __iomem *) - ((char __iomem *)hba->iop + req); - - if (readl(&p->flags) & IOP_REQUEST_FLAG_SYNC_REQUEST) { - if (readl(&p->context)) - hptiop_request_callback(hba, req); - else - writel(1, &p->context); - } - else - hptiop_request_callback(hba, req); - } - } -} - -static int __iop_intr(struct hptiop_hba *hba) -{ - struct hpt_iopmu __iomem *iop = hba->iop; - u32 status; - int ret = 0; - - status = readl(&iop->outbound_intstatus); - - if (status & IOPMU_OUTBOUND_INT_MSG0) { - u32 msg = readl(&iop->outbound_msgaddr0); - dprintk("received outbound msg %x\n", msg); - writel(IOPMU_OUTBOUND_INT_MSG0, &iop->outbound_intstatus); - hptiop_message_callback(hba, msg); - ret = 1; - } - - if (status & IOPMU_OUTBOUND_INT_POSTQUEUE) { - hptiop_drain_outbound_queue(hba); - ret = 1; - } - - return ret; -} - -static int iop_send_sync_request(struct hptiop_hba *hba, - void __iomem *_req, u32 millisec) -{ - struct hpt_iop_request_header __iomem *req = _req; - u32 i; - - writel(readl(&req->flags) | IOP_REQUEST_FLAG_SYNC_REQUEST, - &req->flags); - - writel(0, &req->context); - - writel((unsigned long)req - (unsigned long)hba->iop, - &hba->iop->inbound_queue); - - hptiop_pci_posting_flush(hba->iop); - - for (i = 0; i < millisec; i++) { - __iop_intr(hba); - if (readl(&req->context)) - return 0; - msleep(1); - } - - return -1; -} - -static int iop_send_sync_msg(struct hptiop_hba *hba, u32 msg, u32 millisec) -{ - u32 i; - - hba->msg_done = 0; - - writel(msg, &hba->iop->inbound_msgaddr0); - - hptiop_pci_posting_flush(hba->iop); - - for (i = 0; i < millisec; i++) { - spin_lock_irq(hba->host->host_lock); - __iop_intr(hba); - spin_unlock_irq(hba->host->host_lock); - if (hba->msg_done) - break; - msleep(1); - } - - return hba->msg_done? 0 : -1; -} - -static int iop_get_config(struct hptiop_hba *hba, - struct hpt_iop_request_get_config *config) -{ - u32 req32; - struct hpt_iop_request_get_config __iomem *req; - - req32 = readl(&hba->iop->inbound_queue); - if (req32 == IOPMU_QUEUE_EMPTY) - return -1; - - req = (struct hpt_iop_request_get_config __iomem *) - ((unsigned long)hba->iop + req32); - - writel(0, &req->header.flags); - writel(IOP_REQUEST_TYPE_GET_CONFIG, &req->header.type); - writel(sizeof(struct hpt_iop_request_get_config), &req->header.size); - writel(IOP_RESULT_PENDING, &req->header.result); - - if (iop_send_sync_request(hba, req, 20000)) { - dprintk("Get config send cmd failed\n"); - return -1; - } - - memcpy_fromio(config, req, sizeof(*config)); - writel(req32, &hba->iop->outbound_queue); - return 0; -} - -static int iop_set_config(struct hptiop_hba *hba, - struct hpt_iop_request_set_config *config) -{ - u32 req32; - struct hpt_iop_request_set_config __iomem *req; - - req32 = readl(&hba->iop->inbound_queue); - if (req32 == IOPMU_QUEUE_EMPTY) - return -1; - - req = (struct hpt_iop_request_set_config __iomem *) - ((unsigned long)hba->iop + req32); - - memcpy_toio((u8 __iomem *)req + sizeof(struct hpt_iop_request_header), - (u8 *)config + sizeof(struct hpt_iop_request_header), - sizeof(struct hpt_iop_request_set_config) - - sizeof(struct hpt_iop_request_header)); - - writel(0, &req->header.flags); - writel(IOP_REQUEST_TYPE_SET_CONFIG, &req->header.type); - writel(sizeof(struct hpt_iop_request_set_config), &req->header.size); - writel(IOP_RESULT_PENDING, &req->header.result); - - if (iop_send_sync_request(hba, req, 20000)) { - dprintk("Set config send cmd failed\n"); - return -1; - } - - writel(req32, &hba->iop->outbound_queue); - return 0; -} - -static int hptiop_initialize_iop(struct hptiop_hba *hba) -{ - struct hpt_iopmu __iomem *iop = hba->iop; - - /* enable interrupts */ - writel(~(IOPMU_OUTBOUND_INT_POSTQUEUE | IOPMU_OUTBOUND_INT_MSG0), - &iop->outbound_intmask); - - hba->initialized = 1; - - /* start background tasks */ - if (iop_send_sync_msg(hba, - IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, 5000)) { - printk(KERN_ERR "scsi%d: fail to start background task\n", - hba->host->host_no); - return -1; - } - return 0; -} - -static int hptiop_map_pci_bar(struct hptiop_hba *hba) -{ - u32 mem_base_phy, length; - void __iomem *mem_base_virt; - struct pci_dev *pcidev = hba->pcidev; - - if (!(pci_resource_flags(pcidev, 0) & IORESOURCE_MEM)) { - printk(KERN_ERR "scsi%d: pci resource invalid\n", - hba->host->host_no); - return -1; - } - - mem_base_phy = pci_resource_start(pcidev, 0); - length = pci_resource_len(pcidev, 0); - mem_base_virt = ioremap(mem_base_phy, length); - - if (!mem_base_virt) { - printk(KERN_ERR "scsi%d: Fail to ioremap memory space\n", - hba->host->host_no); - return -1; - } - - hba->iop = mem_base_virt; - dprintk("hptiop_map_pci_bar: iop=%p\n", hba->iop); - return 0; -} - -static void hptiop_message_callback(struct hptiop_hba *hba, u32 msg) -{ - dprintk("iop message 0x%x\n", msg); - - if (!hba->initialized) - return; - - if (msg == IOPMU_INBOUND_MSG0_RESET) { - atomic_set(&hba->resetting, 0); - wake_up(&hba->reset_wq); - } - else if (msg <= IOPMU_INBOUND_MSG0_MAX) - hba->msg_done = 1; -} - -static inline struct hptiop_request *get_req(struct hptiop_hba *hba) -{ - struct hptiop_request *ret; - - dprintk("get_req : req=%p\n", hba->req_list); - - ret = hba->req_list; - if (ret) - hba->req_list = ret->next; - - return ret; -} - -static inline void free_req(struct hptiop_hba *hba, struct hptiop_request *req) -{ - dprintk("free_req(%d, %p)\n", req->index, req); - req->next = hba->req_list; - hba->req_list = req; -} - -static void hptiop_host_request_callback(struct hptiop_hba *hba, u32 tag) -{ - struct hpt_iop_request_scsi_command *req; - struct scsi_cmnd *scp; - - req = (struct hpt_iop_request_scsi_command *)hba->reqs[tag].req_virt; - dprintk("hptiop_host_request_callback: req=%p, type=%d, " - "result=%d, context=0x%x tag=%d\n", - req, req->header.type, req->header.result, - req->header.context, tag); - - BUG_ON(!req->header.result); - BUG_ON(req->header.type != cpu_to_le32(IOP_REQUEST_TYPE_SCSI_COMMAND)); - - scp = hba->reqs[tag].scp; - - if (HPT_SCP(scp)->mapped) { - if (scp->use_sg) - pci_unmap_sg(hba->pcidev, - (struct scatterlist *)scp->request_buffer, - scp->use_sg, - scp->sc_data_direction - ); - else - pci_unmap_single(hba->pcidev, - HPT_SCP(scp)->dma_handle, - scp->request_bufflen, - scp->sc_data_direction - ); - } - - switch (le32_to_cpu(req->header.result)) { - case IOP_RESULT_SUCCESS: - scp->result = (DID_OK<<16); - break; - case IOP_RESULT_BAD_TARGET: - scp->result = (DID_BAD_TARGET<<16); - break; - case IOP_RESULT_BUSY: - scp->result = (DID_BUS_BUSY<<16); - break; - case IOP_RESULT_RESET: - scp->result = (DID_RESET<<16); - break; - case IOP_RESULT_FAIL: - scp->result = (DID_ERROR<<16); - break; - case IOP_RESULT_INVALID_REQUEST: - scp->result = (DID_ABORT<<16); - break; - case IOP_RESULT_MODE_SENSE_CHECK_CONDITION: - scp->result = SAM_STAT_CHECK_CONDITION; - memset(&scp->sense_buffer, - 0, sizeof(scp->sense_buffer)); - memcpy(&scp->sense_buffer, - &req->sg_list, le32_to_cpu(req->dataxfer_length)); - break; - - default: - scp->result = ((DRIVER_INVALID|SUGGEST_ABORT)<<24) | - (DID_ABORT<<16); - break; - } - - dprintk("scsi_done(%p)\n", scp); - scp->scsi_done(scp); - free_req(hba, &hba->reqs[tag]); -} - -void hptiop_iop_request_callback(struct hptiop_hba *hba, u32 tag) -{ - struct hpt_iop_request_header __iomem *req; - struct hpt_iop_request_ioctl_command __iomem *p; - struct hpt_ioctl_k *arg; - - req = (struct hpt_iop_request_header __iomem *) - ((unsigned long)hba->iop + tag); - dprintk("hptiop_iop_request_callback: req=%p, type=%d, " - "result=%d, context=0x%x tag=%d\n", - req, readl(&req->type), readl(&req->result), - readl(&req->context), tag); - - BUG_ON(!readl(&req->result)); - BUG_ON(readl(&req->type) != IOP_REQUEST_TYPE_IOCTL_COMMAND); - - p = (struct hpt_iop_request_ioctl_command __iomem *)req; - arg = (struct hpt_ioctl_k *)(unsigned long) - (readl(&req->context) | - ((u64)readl(&req->context_hi32)<<32)); - - if (readl(&req->result) == IOP_RESULT_SUCCESS) { - arg->result = HPT_IOCTL_RESULT_OK; - - if (arg->outbuf_size) - memcpy_fromio(arg->outbuf, - &p->buf[(readl(&p->inbuf_size) + 3)& ~3], - arg->outbuf_size); - - if (arg->bytes_returned) - *arg->bytes_returned = arg->outbuf_size; - } - else - arg->result = HPT_IOCTL_RESULT_FAILED; - - arg->done(arg); - writel(tag, &hba->iop->outbound_queue); -} - -static irqreturn_t hptiop_intr(int irq, void *dev_id, struct pt_regs *regs) -{ - struct hptiop_hba *hba = dev_id; - int handled; - unsigned long flags; - - spin_lock_irqsave(hba->host->host_lock, flags); - handled = __iop_intr(hba); - spin_unlock_irqrestore(hba->host->host_lock, flags); - - return handled; -} - -static int hptiop_buildsgl(struct scsi_cmnd *scp, struct hpt_iopsg *psg) -{ - struct Scsi_Host *host = scp->device->host; - struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; - struct scatterlist *sglist = (struct scatterlist *)scp->request_buffer; - - /* - * though we'll not get non-use_sg fields anymore, - * keep use_sg checking anyway - */ - if (scp->use_sg) { - int idx; - - HPT_SCP(scp)->sgcnt = pci_map_sg(hba->pcidev, - sglist, scp->use_sg, - scp->sc_data_direction); - HPT_SCP(scp)->mapped = 1; - BUG_ON(HPT_SCP(scp)->sgcnt > hba->max_sg_descriptors); - - for (idx = 0; idx < HPT_SCP(scp)->sgcnt; idx++) { - psg[idx].pci_address = - cpu_to_le64(sg_dma_address(&sglist[idx])); - psg[idx].size = cpu_to_le32(sg_dma_len(&sglist[idx])); - psg[idx].eot = (idx == HPT_SCP(scp)->sgcnt - 1) ? - cpu_to_le32(1) : 0; - } - - return HPT_SCP(scp)->sgcnt; - } else { - HPT_SCP(scp)->dma_handle = pci_map_single( - hba->pcidev, - scp->request_buffer, - scp->request_bufflen, - scp->sc_data_direction - ); - HPT_SCP(scp)->mapped = 1; - psg->pci_address = cpu_to_le64(HPT_SCP(scp)->dma_handle); - psg->size = cpu_to_le32(scp->request_bufflen); - psg->eot = cpu_to_le32(1); - return 1; - } -} - -static int hptiop_queuecommand(struct scsi_cmnd *scp, - void (*done)(struct scsi_cmnd *)) -{ - struct Scsi_Host *host = scp->device->host; - struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; - struct hpt_iop_request_scsi_command *req; - int sg_count = 0; - struct hptiop_request *_req; - - BUG_ON(!done); - scp->scsi_done = done; - - _req = get_req(hba); - if (_req == NULL) { - dprintk("hptiop_queuecmd : no free req\n"); - return SCSI_MLQUEUE_HOST_BUSY; - } - - _req->scp = scp; - - dprintk("hptiop_queuecmd(scp=%p) %d/%d/%d/%d cdb=(%x-%x-%x) " - "req_index=%d, req=%p\n", - scp, - host->host_no, scp->device->channel, - scp->device->id, scp->device->lun, - *((u32 *)&scp->cmnd), - *((u32 *)&scp->cmnd + 1), - *((u32 *)&scp->cmnd + 2), - _req->index, _req->req_virt); - - scp->result = 0; - - if (scp->device->channel || scp->device->lun || - scp->device->id > hba->max_devices) { - scp->result = DID_BAD_TARGET << 16; - free_req(hba, _req); - goto cmd_done; - } - - req = (struct hpt_iop_request_scsi_command *)_req->req_virt; - - /* build S/G table */ - if (scp->request_bufflen) - sg_count = hptiop_buildsgl(scp, req->sg_list); - else - HPT_SCP(scp)->mapped = 0; - - req->header.flags = cpu_to_le32(IOP_REQUEST_FLAG_OUTPUT_CONTEXT); - req->header.type = cpu_to_le32(IOP_REQUEST_TYPE_SCSI_COMMAND); - req->header.result = cpu_to_le32(IOP_RESULT_PENDING); - req->header.context = cpu_to_le32(IOPMU_QUEUE_ADDR_HOST_BIT | - (u32)_req->index); - req->header.context_hi32 = 0; - req->dataxfer_length = cpu_to_le32(scp->request_bufflen); - req->channel = scp->device->channel; - req->target = scp->device->id; - req->lun = scp->device->lun; - req->header.size = cpu_to_le32( - sizeof(struct hpt_iop_request_scsi_command) - - sizeof(struct hpt_iopsg) - + sg_count * sizeof(struct hpt_iopsg)); - - memcpy(req->cdb, scp->cmnd, sizeof(req->cdb)); - - writel(IOPMU_QUEUE_ADDR_HOST_BIT | _req->req_shifted_phy, - &hba->iop->inbound_queue); - - return 0; - -cmd_done: - dprintk("scsi_done(scp=%p)\n", scp); - scp->scsi_done(scp); - return 0; -} - -static const char *hptiop_info(struct Scsi_Host *host) -{ - return driver_name_long; -} - -static int hptiop_reset_hba(struct hptiop_hba *hba) -{ - if (atomic_xchg(&hba->resetting, 1) == 0) { - atomic_inc(&hba->reset_count); - writel(IOPMU_INBOUND_MSG0_RESET, - &hba->iop->inbound_msgaddr0); - hptiop_pci_posting_flush(hba->iop); - } - - wait_event_timeout(hba->reset_wq, - atomic_read(&hba->resetting) == 0, 60 * HZ); - - if (atomic_read(&hba->resetting)) { - /* IOP is in unkown state, abort reset */ - printk(KERN_ERR "scsi%d: reset failed\n", hba->host->host_no); - return -1; - } - - if (iop_send_sync_msg(hba, - IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, 5000)) { - dprintk("scsi%d: fail to start background task\n", - hba->host->host_no); - } - - return 0; -} - -static int hptiop_reset(struct scsi_cmnd *scp) -{ - struct Scsi_Host * host = scp->device->host; - struct hptiop_hba * hba = (struct hptiop_hba *)host->hostdata; - - printk(KERN_WARNING "hptiop_reset(%d/%d/%d) scp=%p\n", - scp->device->host->host_no, scp->device->channel, - scp->device->id, scp); - - return hptiop_reset_hba(hba)? FAILED : SUCCESS; -} - -static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev, - int queue_depth) -{ - if(queue_depth > 256) - queue_depth = 256; - scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); - return queue_depth; -} - -static ssize_t hptiop_show_version(struct class_device *class_dev, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%s\n", driver_ver); -} - -static ssize_t hptiop_show_fw_version(struct class_device *class_dev, char *buf) -{ - struct Scsi_Host *host = class_to_shost(class_dev); - struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; - - return snprintf(buf, PAGE_SIZE, "%d.%d.%d.%d\n", - hba->firmware_version >> 24, - (hba->firmware_version >> 16) & 0xff, - (hba->firmware_version >> 8) & 0xff, - hba->firmware_version & 0xff); -} - -static struct class_device_attribute hptiop_attr_version = { - .attr = { - .name = "driver-version", - .mode = S_IRUGO, - }, - .show = hptiop_show_version, -}; - -static struct class_device_attribute hptiop_attr_fw_version = { - .attr = { - .name = "firmware-version", - .mode = S_IRUGO, - }, - .show = hptiop_show_fw_version, -}; - -static struct class_device_attribute *hptiop_attrs[] = { - &hptiop_attr_version, - &hptiop_attr_fw_version, - NULL -}; - -static struct scsi_host_template driver_template = { - .module = THIS_MODULE, - .name = driver_name, - .queuecommand = hptiop_queuecommand, - .eh_device_reset_handler = hptiop_reset, - .eh_bus_reset_handler = hptiop_reset, - .info = hptiop_info, - .unchecked_isa_dma = 0, - .emulated = 0, - .use_clustering = ENABLE_CLUSTERING, - .proc_name = driver_name, - .shost_attrs = hptiop_attrs, - .this_id = -1, - .change_queue_depth = hptiop_adjust_disk_queue_depth, -}; - -static int __devinit hptiop_probe(struct pci_dev *pcidev, - const struct pci_device_id *id) -{ - struct Scsi_Host *host = NULL; - struct hptiop_hba *hba; - struct hpt_iop_request_get_config iop_config; - struct hpt_iop_request_set_config set_config; - dma_addr_t start_phy; - void *start_virt; - u32 offset, i, req_size; - - dprintk("hptiop_probe(%p)\n", pcidev); - - if (pci_enable_device(pcidev)) { - printk(KERN_ERR "hptiop: fail to enable pci device\n"); - return -ENODEV; - } - - printk(KERN_INFO "adapter at PCI %d:%d:%d, IRQ %d\n", - pcidev->bus->number, pcidev->devfn >> 3, pcidev->devfn & 7, - pcidev->irq); - - pci_set_master(pcidev); - - /* Enable 64bit DMA if possible */ - if (pci_set_dma_mask(pcidev, DMA_64BIT_MASK)) { - if (pci_set_dma_mask(pcidev, DMA_32BIT_MASK)) { - printk(KERN_ERR "hptiop: fail to set dma_mask\n"); - goto disable_pci_device; - } - } - - if (pci_request_regions(pcidev, driver_name)) { - printk(KERN_ERR "hptiop: pci_request_regions failed\n"); - goto disable_pci_device; - } - - host = scsi_host_alloc(&driver_template, sizeof(struct hptiop_hba)); - if (!host) { - printk(KERN_ERR "hptiop: fail to alloc scsi host\n"); - goto free_pci_regions; - } - - hba = (struct hptiop_hba *)host->hostdata; - - hba->pcidev = pcidev; - hba->host = host; - hba->initialized = 0; - - atomic_set(&hba->resetting, 0); - atomic_set(&hba->reset_count, 0); - - init_waitqueue_head(&hba->reset_wq); - init_waitqueue_head(&hba->ioctl_wq); - - host->max_lun = 1; - host->max_channel = 0; - host->io_port = 0; - host->n_io_port = 0; - host->irq = pcidev->irq; - - if (hptiop_map_pci_bar(hba)) - goto free_scsi_host; - - if (iop_wait_ready(hba->iop, 20000)) { - printk(KERN_ERR "scsi%d: firmware not ready\n", - hba->host->host_no); - goto unmap_pci_bar; - } - - if (iop_get_config(hba, &iop_config)) { - printk(KERN_ERR "scsi%d: get config failed\n", - hba->host->host_no); - goto unmap_pci_bar; - } - - hba->max_requests = min(le32_to_cpu(iop_config.max_requests), - HPTIOP_MAX_REQUESTS); - hba->max_devices = le32_to_cpu(iop_config.max_devices); - hba->max_request_size = le32_to_cpu(iop_config.request_size); - hba->max_sg_descriptors = le32_to_cpu(iop_config.max_sg_count); - hba->firmware_version = le32_to_cpu(iop_config.firmware_version); - hba->sdram_size = le32_to_cpu(iop_config.sdram_size); - - host->max_sectors = le32_to_cpu(iop_config.data_transfer_length) >> 9; - host->max_id = le32_to_cpu(iop_config.max_devices); - host->sg_tablesize = le32_to_cpu(iop_config.max_sg_count); - host->can_queue = le32_to_cpu(iop_config.max_requests); - host->cmd_per_lun = le32_to_cpu(iop_config.max_requests); - host->max_cmd_len = 16; - - set_config.vbus_id = cpu_to_le32(host->host_no); - set_config.iop_id = cpu_to_le32(host->host_no); - - if (iop_set_config(hba, &set_config)) { - printk(KERN_ERR "scsi%d: set config failed\n", - hba->host->host_no); - goto unmap_pci_bar; - } - - pci_set_drvdata(pcidev, host); - - if (request_irq(pcidev->irq, hptiop_intr, IRQF_SHARED, - driver_name, hba)) { - printk(KERN_ERR "scsi%d: request irq %d failed\n", - hba->host->host_no, pcidev->irq); - goto unmap_pci_bar; - } - - /* Allocate request mem */ - req_size = sizeof(struct hpt_iop_request_scsi_command) - + sizeof(struct hpt_iopsg) * (hba->max_sg_descriptors - 1); - if ((req_size& 0x1f) != 0) - req_size = (req_size + 0x1f) & ~0x1f; - - dprintk("req_size=%d, max_requests=%d\n", req_size, hba->max_requests); - - hba->req_size = req_size; - start_virt = dma_alloc_coherent(&pcidev->dev, - hba->req_size*hba->max_requests + 0x20, - &start_phy, GFP_KERNEL); - - if (!start_virt) { - printk(KERN_ERR "scsi%d: fail to alloc request mem\n", - hba->host->host_no); - goto free_request_irq; - } - - hba->dma_coherent = start_virt; - hba->dma_coherent_handle = start_phy; - - if ((start_phy & 0x1f) != 0) - { - offset = ((start_phy + 0x1f) & ~0x1f) - start_phy; - start_phy += offset; - start_virt += offset; - } - - hba->req_list = start_virt; - for (i = 0; i < hba->max_requests; i++) { - hba->reqs[i].next = NULL; - hba->reqs[i].req_virt = start_virt; - hba->reqs[i].req_shifted_phy = start_phy >> 5; - hba->reqs[i].index = i; - free_req(hba, &hba->reqs[i]); - start_virt = (char *)start_virt + hba->req_size; - start_phy = start_phy + hba->req_size; - } - - /* Enable Interrupt and start background task */ - if (hptiop_initialize_iop(hba)) - goto free_request_mem; - - if (scsi_add_host(host, &pcidev->dev)) { - printk(KERN_ERR "scsi%d: scsi_add_host failed\n", - hba->host->host_no); - goto free_request_mem; - } - - - scsi_scan_host(host); - - dprintk("scsi%d: hptiop_probe successfully\n", hba->host->host_no); - return 0; - -free_request_mem: - dma_free_coherent(&hba->pcidev->dev, - hba->req_size*hba->max_requests + 0x20, - hba->dma_coherent, hba->dma_coherent_handle); - -free_request_irq: - free_irq(hba->pcidev->irq, hba); - -unmap_pci_bar: - iounmap(hba->iop); - -free_pci_regions: - pci_release_regions(pcidev) ; - -free_scsi_host: - scsi_host_put(host); - -disable_pci_device: - pci_disable_device(pcidev); - - dprintk("scsi%d: hptiop_probe fail\n", host->host_no); - return -ENODEV; -} - -static void hptiop_shutdown(struct pci_dev *pcidev) -{ - struct Scsi_Host *host = pci_get_drvdata(pcidev); - struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; - struct hpt_iopmu __iomem *iop = hba->iop; - u32 int_mask; - - dprintk("hptiop_shutdown(%p)\n", hba); - - /* stop the iop */ - if (iop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_SHUTDOWN, 60000)) - printk(KERN_ERR "scsi%d: shutdown the iop timeout\n", - hba->host->host_no); - - /* disable all outbound interrupts */ - int_mask = readl(&iop->outbound_intmask); - writel(int_mask | - IOPMU_OUTBOUND_INT_MSG0 | IOPMU_OUTBOUND_INT_POSTQUEUE, - &iop->outbound_intmask); - hptiop_pci_posting_flush(iop); -} - -static void hptiop_remove(struct pci_dev *pcidev) -{ - struct Scsi_Host *host = pci_get_drvdata(pcidev); - struct hptiop_hba *hba = (struct hptiop_hba *)host->hostdata; - - dprintk("scsi%d: hptiop_remove\n", hba->host->host_no); - - scsi_remove_host(host); - - hptiop_shutdown(pcidev); - - free_irq(hba->pcidev->irq, hba); - - dma_free_coherent(&hba->pcidev->dev, - hba->req_size * hba->max_requests + 0x20, - hba->dma_coherent, - hba->dma_coherent_handle); - - iounmap(hba->iop); - - pci_release_regions(hba->pcidev); - pci_set_drvdata(hba->pcidev, NULL); - pci_disable_device(hba->pcidev); - - scsi_host_put(host); -} - -static struct pci_device_id hptiop_id_table[] = { - { PCI_DEVICE(0x1103, 0x3220) }, - { PCI_DEVICE(0x1103, 0x3320) }, - {}, -}; - -MODULE_DEVICE_TABLE(pci, hptiop_id_table); - -static struct pci_driver hptiop_pci_driver = { - .name = driver_name, - .id_table = hptiop_id_table, - .probe = hptiop_probe, - .remove = hptiop_remove, - .shutdown = hptiop_shutdown, -}; - -static int __init hptiop_module_init(void) -{ - printk(KERN_INFO "%s %s\n", driver_name_long, driver_ver); - return pci_register_driver(&hptiop_pci_driver); -} - -static void __exit hptiop_module_exit(void) -{ - pci_unregister_driver(&hptiop_pci_driver); -} - - -module_init(hptiop_module_init); -module_exit(hptiop_module_exit); - -MODULE_LICENSE("GPL"); diff --git a/drivers/scsi/hptiop.h b/drivers/scsi/hptiop.h deleted file mode 100644 index f04f7e81d..000000000 --- a/drivers/scsi/hptiop.h +++ /dev/null @@ -1,465 +0,0 @@ -/* - * HighPoint RR3xxx controller driver for Linux - * Copyright (C) 2006 HighPoint Technologies, Inc. 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; version 2 of the License. - * - * 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. - * - * Please report bugs/comments/suggestions to linux@highpoint-tech.com - * - * For more information, visit http://www.highpoint-tech.com - */ -#ifndef _HPTIOP_H_ -#define _HPTIOP_H_ - -/* - * logical device type. - * Identify array (logical device) and physical device. - */ -#define LDT_ARRAY 1 -#define LDT_DEVICE 2 - -/* - * Array types - */ -#define AT_UNKNOWN 0 -#define AT_RAID0 1 -#define AT_RAID1 2 -#define AT_RAID5 3 -#define AT_RAID6 4 -#define AT_JBOD 7 - -#define MAX_NAME_LENGTH 36 -#define MAX_ARRAYNAME_LEN 16 - -#define MAX_ARRAY_MEMBERS_V1 8 -#define MAX_ARRAY_MEMBERS_V2 16 - -/* keep definition for source code compatiblity */ -#define MAX_ARRAY_MEMBERS MAX_ARRAY_MEMBERS_V1 - -/* - * array flags - */ -#define ARRAY_FLAG_DISABLED 0x00000001 /* The array is disabled */ -#define ARRAY_FLAG_NEEDBUILDING 0x00000002 /* need to be rebuilt */ -#define ARRAY_FLAG_REBUILDING 0x00000004 /* in rebuilding process */ -#define ARRAY_FLAG_BROKEN 0x00000008 /* broken but still working */ -#define ARRAY_FLAG_BOOTDISK 0x00000010 /* has a active partition */ -#define ARRAY_FLAG_BOOTMARK 0x00000040 /* array has boot mark set */ -#define ARRAY_FLAG_NEED_AUTOREBUILD 0x00000080 /* auto-rebuild should start */ -#define ARRAY_FLAG_VERIFYING 0x00000100 /* is being verified */ -#define ARRAY_FLAG_INITIALIZING 0x00000200 /* is being initialized */ -#define ARRAY_FLAG_TRANSFORMING 0x00000400 /* tranform in progress */ -#define ARRAY_FLAG_NEEDTRANSFORM 0x00000800 /* array need tranform */ -#define ARRAY_FLAG_NEEDINITIALIZING 0x00001000 /* initialization not done */ -#define ARRAY_FLAG_BROKEN_REDUNDANT 0x00002000 /* broken but redundant */ - -/* - * device flags - */ -#define DEVICE_FLAG_DISABLED 0x00000001 /* device is disabled */ -#define DEVICE_FLAG_UNINITIALIZED 0x00010000 /* device is not initialized */ -#define DEVICE_FLAG_LEGACY 0x00020000 /* lagacy drive */ -#define DEVICE_FLAG_IS_SPARE 0x80000000 /* is a spare disk */ - -/* - * ioctl codes - */ -#define HPT_CTL_CODE(x) (x+0xFF00) -#define HPT_CTL_CODE_LINUX_TO_IOP(x) ((x)-0xff00) - -#define HPT_IOCTL_GET_CONTROLLER_INFO HPT_CTL_CODE(2) -#define HPT_IOCTL_GET_CHANNEL_INFO HPT_CTL_CODE(3) -#define HPT_IOCTL_GET_LOGICAL_DEVICES HPT_CTL_CODE(4) -#define HPT_IOCTL_GET_DRIVER_CAPABILITIES HPT_CTL_CODE(19) -#define HPT_IOCTL_GET_DEVICE_INFO_V3 HPT_CTL_CODE(46) -#define HPT_IOCTL_GET_CONTROLLER_INFO_V2 HPT_CTL_CODE(47) - -/* - * Controller information. - */ -struct hpt_controller_info { - u8 chip_type; /* chip type */ - u8 interrupt_level; /* IRQ level */ - u8 num_buses; /* bus count */ - u8 chip_flags; - - u8 product_id[MAX_NAME_LENGTH];/* product name */ - u8 vendor_id[MAX_NAME_LENGTH]; /* vendor name */ -} -__attribute__((packed)); - -/* - * Channel information. - */ -struct hpt_channel_info { - __le32 io_port; /* IDE Base Port Address */ - __le32 control_port; /* IDE Control Port Address */ - __le32 devices[2]; /* device connected to this channel */ -} -__attribute__((packed)); - -/* - * Array information. - */ -struct hpt_array_info_v3 { - u8 name[MAX_ARRAYNAME_LEN]; /* array name */ - u8 description[64]; /* array description */ - u8 create_manager[16]; /* who created it */ - __le32 create_time; /* when created it */ - - u8 array_type; /* array type */ - u8 block_size_shift; /* stripe size */ - u8 ndisk; /* Number of ID in Members[] */ - u8 reserved; - - __le32 flags; /* working flags, see ARRAY_FLAG_XXX */ - __le32 members[MAX_ARRAY_MEMBERS_V2]; /* member array/disks */ - - __le32 rebuilding_progress; - __le64 rebuilt_sectors; /* rebuilding point (LBA) for single member */ - - __le32 transform_source; - __le32 transform_target; /* destination device ID */ - __le32 transforming_progress; - __le32 signature; /* persistent identification*/ - __le16 critical_members; /* bit mask of critical members */ - __le16 reserve2; - __le32 reserve; -} -__attribute__((packed)); - -/* - * physical device information. - */ -#define MAX_PARENTS_PER_DISK 8 - -struct hpt_device_info_v2 { - u8 ctlr_id; /* controller id */ - u8 path_id; /* bus */ - u8 target_id; /* id */ - u8 device_mode_setting; /* Current Data Transfer mode: 0-4 PIO0-4 */ - /* 5-7 MW DMA0-2, 8-13 UDMA0-5 */ - u8 device_type; /* device type */ - u8 usable_mode; /* highest usable mode */ - -#ifdef __BIG_ENDIAN_BITFIELD - u8 NCQ_enabled: 1; - u8 NCQ_supported: 1; - u8 TCQ_enabled: 1; - u8 TCQ_supported: 1; - u8 write_cache_enabled: 1; - u8 write_cache_supported: 1; - u8 read_ahead_enabled: 1; - u8 read_ahead_supported: 1; - u8 reserved6: 6; - u8 spin_up_mode: 2; -#else - u8 read_ahead_supported: 1; - u8 read_ahead_enabled: 1; - u8 write_cache_supported: 1; - u8 write_cache_enabled: 1; - u8 TCQ_supported: 1; - u8 TCQ_enabled: 1; - u8 NCQ_supported: 1; - u8 NCQ_enabled: 1; - u8 spin_up_mode: 2; - u8 reserved6: 6; -#endif - - __le32 flags; /* working flags, see DEVICE_FLAG_XXX */ - u8 ident[150]; /* (partitial) Identify Data of this device */ - - __le64 total_free; - __le64 max_free; - __le64 bad_sectors; - __le32 parent_arrays[MAX_PARENTS_PER_DISK]; -} -__attribute__((packed)); - -/* - * Logical device information. - */ -#define INVALID_TARGET_ID 0xFF -#define INVALID_BUS_ID 0xFF - -struct hpt_logical_device_info_v3 { - u8 type; /* LDT_ARRAY or LDT_DEVICE */ - u8 cache_policy; /* refer to CACHE_POLICY_xxx */ - u8 vbus_id; /* vbus sequence in vbus_list */ - u8 target_id; /* OS target id. 0xFF is invalid */ - /* OS name: DISK $VBusId_$TargetId */ - __le64 capacity; /* array capacity */ - __le32 parent_array; /* don't use this field for physical - device. use ParentArrays field in - hpt_device_info_v2 */ - /* reserved statistic fields */ - __le32 stat1; - __le32 stat2; - __le32 stat3; - __le32 stat4; - - union { - struct hpt_array_info_v3 array; - struct hpt_device_info_v2 device; - } __attribute__((packed)) u; - -} -__attribute__((packed)); - -/* - * ioctl structure - */ -#define HPT_IOCTL_MAGIC 0xA1B2C3D4 - -struct hpt_ioctl_u { - u32 magic; /* used to check if it's a valid ioctl packet */ - u32 ioctl_code; /* operation control code */ - void __user *inbuf; /* input data buffer */ - u32 inbuf_size; /* size of input data buffer */ - void __user *outbuf; /* output data buffer */ - u32 outbuf_size; /* size of output data buffer */ - void __user *bytes_returned; /* count of bytes returned */ -} -__attribute__((packed)); - - -struct hpt_iopmu -{ - __le32 resrved0[4]; - __le32 inbound_msgaddr0; - __le32 inbound_msgaddr1; - __le32 outbound_msgaddr0; - __le32 outbound_msgaddr1; - __le32 inbound_doorbell; - __le32 inbound_intstatus; - __le32 inbound_intmask; - __le32 outbound_doorbell; - __le32 outbound_intstatus; - __le32 outbound_intmask; - __le32 reserved1[2]; - __le32 inbound_queue; - __le32 outbound_queue; -}; - -#define IOPMU_QUEUE_EMPTY 0xffffffff -#define IOPMU_QUEUE_MASK_HOST_BITS 0xf0000000 -#define IOPMU_QUEUE_ADDR_HOST_BIT 0x80000000 - -#define IOPMU_OUTBOUND_INT_MSG0 1 -#define IOPMU_OUTBOUND_INT_MSG1 2 -#define IOPMU_OUTBOUND_INT_DOORBELL 4 -#define IOPMU_OUTBOUND_INT_POSTQUEUE 8 -#define IOPMU_OUTBOUND_INT_PCI 0x10 - -#define IOPMU_INBOUND_INT_MSG0 1 -#define IOPMU_INBOUND_INT_MSG1 2 -#define IOPMU_INBOUND_INT_DOORBELL 4 -#define IOPMU_INBOUND_INT_ERROR 8 -#define IOPMU_INBOUND_INT_POSTQUEUE 0x10 - -enum hpt_iopmu_message { - /* host-to-iop messages */ - IOPMU_INBOUND_MSG0_NOP = 0, - IOPMU_INBOUND_MSG0_RESET, - IOPMU_INBOUND_MSG0_FLUSH, - IOPMU_INBOUND_MSG0_SHUTDOWN, - IOPMU_INBOUND_MSG0_STOP_BACKGROUND_TASK, - IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, - IOPMU_INBOUND_MSG0_MAX = 0xff, - /* iop-to-host messages */ - IOPMU_OUTBOUND_MSG0_REGISTER_DEVICE_0 = 0x100, - IOPMU_OUTBOUND_MSG0_REGISTER_DEVICE_MAX = 0x1ff, - IOPMU_OUTBOUND_MSG0_UNREGISTER_DEVICE_0 = 0x200, - IOPMU_OUTBOUND_MSG0_UNREGISTER_DEVICE_MAX = 0x2ff, - IOPMU_OUTBOUND_MSG0_REVALIDATE_DEVICE_0 = 0x300, - IOPMU_OUTBOUND_MSG0_REVALIDATE_DEVICE_MAX = 0x3ff, -}; - -struct hpt_iop_request_header -{ - __le32 size; - __le32 type; - __le32 flags; - __le32 result; - __le32 context; /* host context */ - __le32 context_hi32; -}; - -#define IOP_REQUEST_FLAG_SYNC_REQUEST 1 -#define IOP_REQUEST_FLAG_BIST_REQUEST 2 -#define IOP_REQUEST_FLAG_REMAPPED 4 -#define IOP_REQUEST_FLAG_OUTPUT_CONTEXT 8 - -enum hpt_iop_request_type { - IOP_REQUEST_TYPE_GET_CONFIG = 0, - IOP_REQUEST_TYPE_SET_CONFIG, - IOP_REQUEST_TYPE_BLOCK_COMMAND, - IOP_REQUEST_TYPE_SCSI_COMMAND, - IOP_REQUEST_TYPE_IOCTL_COMMAND, - IOP_REQUEST_TYPE_MAX -}; - -enum hpt_iop_result_type { - IOP_RESULT_PENDING = 0, - IOP_RESULT_SUCCESS, - IOP_RESULT_FAIL, - IOP_RESULT_BUSY, - IOP_RESULT_RESET, - IOP_RESULT_INVALID_REQUEST, - IOP_RESULT_BAD_TARGET, - IOP_RESULT_MODE_SENSE_CHECK_CONDITION, -}; - -struct hpt_iop_request_get_config -{ - struct hpt_iop_request_header header; - __le32 interface_version; - __le32 firmware_version; - __le32 max_requests; - __le32 request_size; - __le32 max_sg_count; - __le32 data_transfer_length; - __le32 alignment_mask; - __le32 max_devices; - __le32 sdram_size; -}; - -struct hpt_iop_request_set_config -{ - struct hpt_iop_request_header header; - __le32 iop_id; - __le32 vbus_id; - __le32 reserve[6]; -}; - -struct hpt_iopsg -{ - __le32 size; - __le32 eot; /* non-zero: end of table */ - __le64 pci_address; -}; - -struct hpt_iop_request_block_command -{ - struct hpt_iop_request_header header; - u8 channel; - u8 target; - u8 lun; - u8 pad1; - __le16 command; /* IOP_BLOCK_COMMAND_{READ,WRITE} */ - __le16 sectors; - __le64 lba; - struct hpt_iopsg sg_list[1]; -}; - -#define IOP_BLOCK_COMMAND_READ 1 -#define IOP_BLOCK_COMMAND_WRITE 2 -#define IOP_BLOCK_COMMAND_VERIFY 3 -#define IOP_BLOCK_COMMAND_FLUSH 4 -#define IOP_BLOCK_COMMAND_SHUTDOWN 5 - -struct hpt_iop_request_scsi_command -{ - struct hpt_iop_request_header header; - u8 channel; - u8 target; - u8 lun; - u8 pad1; - u8 cdb[16]; - __le32 dataxfer_length; - struct hpt_iopsg sg_list[1]; -}; - -struct hpt_iop_request_ioctl_command -{ - struct hpt_iop_request_header header; - __le32 ioctl_code; - __le32 inbuf_size; - __le32 outbuf_size; - __le32 bytes_returned; - u8 buf[1]; - /* out data should be put at buf[(inbuf_size+3)&~3] */ -}; - -#define HPTIOP_MAX_REQUESTS 256u - -struct hptiop_request { - struct hptiop_request * next; - void * req_virt; - u32 req_shifted_phy; - struct scsi_cmnd * scp; - int index; -}; - -struct hpt_scsi_pointer { - int mapped; - int sgcnt; - dma_addr_t dma_handle; -}; - -#define HPT_SCP(scp) ((struct hpt_scsi_pointer *)&(scp)->SCp) - -struct hptiop_hba { - struct hpt_iopmu __iomem * iop; - struct Scsi_Host * host; - struct pci_dev * pcidev; - - struct list_head link; - - /* IOP config info */ - u32 firmware_version; - u32 sdram_size; - u32 max_devices; - u32 max_requests; - u32 max_request_size; - u32 max_sg_descriptors; - - u32 req_size; /* host-allocated request buffer size */ - int initialized; - int msg_done; - - struct hptiop_request * req_list; - struct hptiop_request reqs[HPTIOP_MAX_REQUESTS]; - - /* used to free allocated dma area */ - void * dma_coherent; - dma_addr_t dma_coherent_handle; - - atomic_t reset_count; - atomic_t resetting; - - wait_queue_head_t reset_wq; - wait_queue_head_t ioctl_wq; -}; - -struct hpt_ioctl_k -{ - struct hptiop_hba * hba; - u32 ioctl_code; - u32 inbuf_size; - u32 outbuf_size; - void * inbuf; - void * outbuf; - u32 * bytes_returned; - void (*done)(struct hpt_ioctl_k *); - int result; /* HPT_IOCTL_RESULT_ */ -}; - -#define HPT_IOCTL_RESULT_OK 0 -#define HPT_IOCTL_RESULT_FAILED (-1) - -#if 0 -#define dprintk(fmt, args...) do { printk(fmt, ##args); } while(0) -#else -#define dprintk(fmt, args...) -#endif - -#endif diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 2be1dc5d8..24eb59e14 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c @@ -17,6 +17,7 @@ */ +#include #include #include #include @@ -759,7 +760,7 @@ static int device_inquiry(int host_index, int ldn) while (!got_interrupt(host_index)) barrier(); - /*if command successful, break */ + /*if command succesful, break */ if ((stat_result(host_index) == IM_SCB_CMD_COMPLETED) || (stat_result(host_index) == IM_SCB_CMD_COMPLETED_WITH_RETRIES)) return 1; } @@ -884,7 +885,7 @@ static int immediate_assign(int host_index, unsigned int pun, unsigned int lun, while (!got_interrupt(host_index)) barrier(); - /*if command successful, break */ + /*if command succesful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } @@ -920,7 +921,7 @@ static int immediate_feature(int host_index, unsigned int speed, unsigned int ti return 2; } else global_command_error_excuse = 0; - /*if command successful, break */ + /*if command succesful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } @@ -958,7 +959,7 @@ static int immediate_reset(int host_index, unsigned int ldn) /* did not work, finish */ return 1; } - /*if command successful, break */ + /*if command succesful, break */ if (stat_result(host_index) == IM_IMMEDIATE_CMD_COMPLETED) return 1; } @@ -1440,7 +1441,7 @@ static int ibmmca_getinfo(char *buf, int slot, void *dev_id) struct Scsi_Host *dev = dev_id; spin_lock_irqsave(dev->host_lock, flags); - + shpnt = dev; /* assign host-structure to local pointer */ len = 0; /* set filled text-buffer index to 0 */ /* get the _special contents of the hostdata structure */ @@ -1455,7 +1456,7 @@ static int ibmmca_getinfo(char *buf, int slot, void *dev_id) /* if the integrated subsystem has been found automatically: */ len += sprintf(buf + len, "Adapter category: integrated\n" "Chip revision level: %d\n" "Chip status: %s\n" "8 kByte NVRAM status: %s\n", ((pos[2] & 0xf0) >> 4), (pos[2] & 1) ? "enabled" : "disabled", (pos[2] & 2) ? "locked" : "accessible"); - } else if ((speciale >= 0) && (speciale < ARRAY_SIZE(subsys_list))) { + } else if ((speciale >= 0) && (speciale < (sizeof(subsys_list) / sizeof(struct subsys_list_struct)))) { /* if the subsystem is a slot adapter */ len += sprintf(buf + len, "Adapter category: slot-card\n" "ROM Segment Address: "); if ((pos[2] & 0xf0) == 0xf0) @@ -1476,16 +1477,16 @@ static int ibmmca_getinfo(char *buf, int slot, void *dev_id) while (len % sizeof(int) != (sizeof(int) - 1)) len += sprintf(buf + len, " "); len += sprintf(buf + len, "\n"); - + spin_unlock_irqrestore(shpnt->host_lock, flags); - + return len; } int ibmmca_detect(struct scsi_host_template * scsi_template) { struct Scsi_Host *shpnt; - int port, id, i, j, k, slot; + int port, id, i, j, k, list_size, slot; int devices_on_irq_11 = 0; int devices_on_irq_14 = 0; int IRQ14_registered = 0; @@ -1510,7 +1511,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) #endif /* get interrupt request level */ - if (request_irq(IM_IRQ, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) { + if (request_irq(IM_IRQ, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ); return 0; } else @@ -1602,7 +1603,8 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) /* now look for other adapters in MCA slots, */ /* determine the number of known IBM-SCSI-subsystem types */ /* see the pos[2] dependence to get the adapter port-offset. */ - for (i = 0; i < ARRAY_SIZE(subsys_list); i++) { + list_size = sizeof(subsys_list) / sizeof(struct subsys_list_struct); + for (i = 0; i < list_size; i++) { /* scan each slot for a fitting adapter id */ slot = 0; /* start at slot 0 */ while ((slot = mca_find_adapter(subsys_list[i].mca_id, slot)) @@ -1635,7 +1637,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) /* IRQ11 is used by SCSI-2 F/W Adapter/A */ printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); /* get interrupt request level */ - if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) { + if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); } else IRQ11_registered++; @@ -1667,7 +1669,8 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) /* now check for SCSI-adapters, mapped to the integrated SCSI * area. E.g. a W/Cache in MCA-slot 9(!). Do the check correct here, * as this is a known effect on some models 95xx. */ - for (i = 0; i < ARRAY_SIZE(subsys_list); i++) { + list_size = sizeof(subsys_list) / sizeof(struct subsys_list_struct); + for (i = 0; i < list_size; i++) { /* scan each slot for a fitting adapter id */ slot = mca_find_adapter(subsys_list[i].mca_id, MCA_INTEGSCSI); if (slot != MCA_NOTFOUND) { /* scan through all slots */ @@ -1696,7 +1699,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) /* IRQ11 is used by SCSI-2 F/W Adapter/A */ printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); /* get interrupt request level */ - if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) + if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); else IRQ11_registered++; @@ -2240,7 +2243,8 @@ static int __ibmmca_host_reset(Scsi_Cmnd * cmd) int host_index; unsigned long imm_command; - BUG_ON(cmd == NULL); + if (cmd == NULL) + BUG(); ticks = IM_RESET_DELAY * HZ; shpnt = cmd->device->host; diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 669ea4fff..2e9be83a6 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -121,9 +121,10 @@ static int initialize_event_pool(struct event_pool *pool, pool->size = size; pool->next = 0; - pool->events = kcalloc(pool->size, sizeof(*pool->events), GFP_KERNEL); + pool->events = kmalloc(pool->size * sizeof(*pool->events), GFP_KERNEL); if (!pool->events) return -ENOMEM; + memset(pool->events, 0x00, pool->size * sizeof(*pool->events)); pool->iu_storage = dma_alloc_coherent(hostdata->dev, @@ -535,7 +536,6 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, struct ibmvscsi_host_data *hostdata) { u64 *crq_as_u64 = (u64 *) &evt_struct->crq; - int request_status; int rc; /* If we have exhausted our request limit, just fail this request. @@ -543,18 +543,9 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, * (such as task management requests) that the mid layer may think we * can handle more requests (can_queue) when we actually can't */ - if (evt_struct->crq.format == VIOSRP_SRP_FORMAT) { - request_status = - atomic_dec_if_positive(&hostdata->request_limit); - /* If request limit was -1 when we started, it is now even - * less than that - */ - if (request_status < -1) - goto send_error; - /* Otherwise, if we have run out of requests */ - else if (request_status < 0) - goto send_busy; - } + if ((evt_struct->crq.format == VIOSRP_SRP_FORMAT) && + (atomic_dec_if_positive(&hostdata->request_limit) < 0)) + goto send_error; /* Copy the IU into the transfer area */ *evt_struct->xfer_iu = evt_struct->iu; @@ -577,23 +568,11 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, return 0; - send_busy: - unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); - - free_event_struct(&hostdata->pool, evt_struct); - return SCSI_MLQUEUE_HOST_BUSY; - send_error: unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); - if (evt_struct->cmnd != NULL) { - evt_struct->cmnd->result = DID_ERROR << 16; - evt_struct->cmnd_done(evt_struct->cmnd); - } else if (evt_struct->done) - evt_struct->done(evt_struct); - free_event_struct(&hostdata->pool, evt_struct); - return 0; + return SCSI_MLQUEUE_HOST_BUSY; } /** @@ -1206,37 +1185,27 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq, return; case 0xFF: /* Hypervisor telling us the connection is closed */ scsi_block_requests(hostdata->host); - atomic_set(&hostdata->request_limit, 0); if (crq->format == 0x06) { /* We need to re-setup the interpartition connection */ printk(KERN_INFO "ibmvscsi: Re-enabling adapter!\n"); + atomic_set(&hostdata->request_limit, -1); purge_requests(hostdata, DID_REQUEUE); - if ((ibmvscsi_reenable_crq_queue(&hostdata->queue, - hostdata) == 0) || - (ibmvscsi_send_crq(hostdata, - 0xC001000000000000LL, 0))) { - atomic_set(&hostdata->request_limit, - -1); + if (ibmvscsi_reenable_crq_queue(&hostdata->queue, + hostdata) == 0) + if (ibmvscsi_send_crq(hostdata, + 0xC001000000000000LL, 0)) printk(KERN_ERR - "ibmvscsi: error after" + "ibmvscsi: transmit error after" " enable\n"); - } } else { printk(KERN_INFO "ibmvscsi: Virtual adapter failed rc %d!\n", crq->format); + atomic_set(&hostdata->request_limit, -1); purge_requests(hostdata, DID_ERROR); - if ((ibmvscsi_reset_crq_queue(&hostdata->queue, - hostdata)) || - (ibmvscsi_send_crq(hostdata, - 0xC001000000000000LL, 0))) { - atomic_set(&hostdata->request_limit, - -1); - printk(KERN_ERR - "ibmvscsi: error after reset\n"); - } + ibmvscsi_reset_crq_queue(&hostdata->queue, hostdata); } scsi_unblock_requests(hostdata->host); return; @@ -1499,7 +1468,6 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) struct Scsi_Host *host; struct device *dev = &vdev->dev; unsigned long wait_switch = 0; - int rc; vdev->dev.driver_data = NULL; @@ -1517,8 +1485,8 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) atomic_set(&hostdata->request_limit, -1); hostdata->host->max_sectors = 32 * 8; /* default max I/O 32 pages */ - rc = ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, max_requests); - if (rc != 0 && rc != H_RESOURCE) { + if (ibmvscsi_init_crq_queue(&hostdata->queue, hostdata, + max_requests) != 0) { printk(KERN_ERR "ibmvscsi: couldn't initialize crq\n"); goto init_crq_failed; } @@ -1538,8 +1506,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id) * to fail if the other end is not acive. In that case we don't * want to scan */ - if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0 - || rc == H_RESOURCE) { + if (ibmvscsi_send_crq(hostdata, 0xC001000000000000LL, 0) == 0) { /* * Wait around max init_timeout secs for the adapter to finish * initializing. When we are done initializing, we will have a diff --git a/drivers/scsi/ibmvscsi/iseries_vscsi.c b/drivers/scsi/ibmvscsi/iseries_vscsi.c index 6aeb5f003..7eed0b098 100644 --- a/drivers/scsi/ibmvscsi/iseries_vscsi.c +++ b/drivers/scsi/ibmvscsi/iseries_vscsi.c @@ -81,7 +81,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, int rc; single_host_data = hostdata; - rc = viopath_open(viopath_hostLp, viomajorsubtype_scsi, max_requests); + rc = viopath_open(viopath_hostLp, viomajorsubtype_scsi, 0); if (rc < 0) { printk("viopath_open failed with rc %d in open_event_path\n", rc); diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index ed22b9658..1a9992bdf 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c @@ -208,7 +208,6 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, int max_requests) { int rc; - int retrc; struct vio_dev *vdev = to_vio_dev(hostdata->dev); queue->msgs = (struct viosrp_crq *)get_zeroed_page(GFP_KERNEL); @@ -227,7 +226,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, gather_partition_info(); set_adapter_info(hostdata); - retrc = rc = plpar_hcall_norets(H_REG_CRQ, + rc = plpar_hcall_norets(H_REG_CRQ, vdev->unit_address, queue->msg_token, PAGE_SIZE); if (rc == H_RESOURCE) @@ -238,7 +237,6 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, if (rc == 2) { /* Adapter is good, but other end is not ready */ printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); - retrc = 0; } else if (rc != 0) { printk(KERN_WARNING "ibmvscsi: Error %d opening adapter\n", rc); goto reg_crq_failed; @@ -265,7 +263,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task, (unsigned long)hostdata); - return retrc; + return 0; req_irq_failed: do { diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 94d1de556..39b760a24 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -34,6 +34,7 @@ #define IDESCSI_VERSION "0.92" #include +#include #include #include #include @@ -517,7 +518,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) /* No more interrupts */ if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred); - local_irq_enable_in_hardirq(); + local_irq_enable(); if (status.b.check) rq->errors++; idescsi_end_request (drive, 1, 0); @@ -599,7 +600,8 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) "issuing a packet command\n"); return ide_do_reset (drive); } - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); /* Set the interrupt routine */ ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); /* Send the actual packet */ @@ -689,7 +691,8 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) set_bit(PC_DMA_OK, &pc->flags); if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { - BUG_ON(HWGROUP(drive)->handler != NULL); + if (HWGROUP(drive)->handler != NULL) + BUG(); ide_set_handler(drive, &idescsi_transfer_pc, get_timeout(pc), idescsi_expiry); /* Issue the packet command */ diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 2d95ac9c3..fc0f30ae0 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -3,11 +3,15 @@ * * (The IMM is the embedded controller in the ZIP Plus drive.) * + * Current Maintainer: David Campbell (Perth, Western Australia) + * campbell@torque.net + * * My unoffical company acronym list is 21 pages long: * FLA: Four letter acronym with built in facility for * future expansion to five letters. */ +#include #include #include #include @@ -1115,10 +1119,6 @@ static int device_check(imm_struct *dev) return -ENODEV; } -/* - * imm cannot deal with highmem, so this causes all IO pages for this host - * to reside in low memory (hence mapped) - */ static int imm_adjust_queue(struct scsi_device *device) { blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); @@ -1141,6 +1141,10 @@ static struct scsi_host_template imm_template = { .use_clustering = ENABLE_CLUSTERING, .can_queue = 1, .slave_alloc = imm_adjust_queue, + .unchecked_isa_dma = 1, /* imm cannot deal with highmem, so + * this is an easy trick to ensure + * all io pages for this host reside + * in low memory */ }; /*************************************************************************** diff --git a/drivers/scsi/imm.h b/drivers/scsi/imm.h index 8f6f32fc6..dc3aebf0e 100644 --- a/drivers/scsi/imm.h +++ b/drivers/scsi/imm.h @@ -2,7 +2,7 @@ /* Driver for the Iomega MatchMaker parallel port SCSI HBA embedded in * the Iomega ZIP Plus drive * - * (c) 1998 David Campbell + * (c) 1998 David Campbell campbell@torque.net * * Please note that I live in Perth, Western Australia. GMT+0800 */ @@ -66,6 +66,7 @@ */ /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ +#include #include #include #include diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index 59a4097f1..9c519876f 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c @@ -370,7 +370,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) */ if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; + cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.ptr = (char *) page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset; cmd->SCp.this_residual = cmd->SCp.buffer->length; @@ -1809,7 +1809,7 @@ static int in2000_abort(Scsi_Cmnd * cmd) #define MAX_IN2000_HOSTS 3 -#define MAX_SETUP_ARGS ARRAY_SIZE(setup_args) +#define MAX_SETUP_ARGS (sizeof(setup_args) / sizeof(char *)) #define SETUP_BUFFER_SIZE 200 static char setup_buffer[SETUP_BUFFER_SIZE]; static char setup_used[MAX_SETUP_ARGS]; @@ -2015,7 +2015,7 @@ static int __init in2000_detect(struct scsi_host_template * tpnt) write1_io(0, IO_FIFO_READ); /* start fifo out in read mode */ write1_io(0, IO_INTR_MASK); /* allow all ints */ x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT]; - if (request_irq(x, in2000_intr, IRQF_DISABLED, "in2000", instance)) { + if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", instance)) { printk("in2000_detect: Unable to allocate IRQ.\n"); detect_count--; continue; diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 9e10dac61..0cc7f65b5 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -118,6 +118,7 @@ #include #include #include +#include #include #include #include @@ -153,6 +154,7 @@ static unsigned int i91u_debug = DEBUG_DEFAULT; #endif +#define TULSZ(sz) (sizeof(sz) / sizeof(sz[0])) #define TUL_RDWORD(x,y) (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) )) typedef struct PCI_ID_Struc { @@ -2769,7 +2771,7 @@ static int tul_NewReturnNumberOfAdapters(void) init_i91uAdapter_table(); - for (i = 0; i < ARRAY_SIZE(i91u_pci_devices); i++) + for (i = 0; i < TULSZ(i91u_pci_devices); i++) { while ((pDev = pci_find_device(i91u_pci_devices[i].vendor_id, i91u_pci_devices[i].device_id, pDev)) != NULL) { if (pci_enable_device(pDev)) @@ -2867,7 +2869,7 @@ static int i91u_detect(struct scsi_host_template * tpnt) hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */ /* Initial tulip chip */ - ok = request_irq(pHCB->HCS_Intr, i91u_intr, IRQF_DISABLED | IRQF_SHARED, "i91u", hreg); + ok = request_irq(pHCB->HCS_Intr, i91u_intr, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); if (ok < 0) { printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr); return 0; diff --git a/drivers/scsi/initio.h b/drivers/scsi/initio.h index acb67a4af..3efb1184f 100644 --- a/drivers/scsi/initio.h +++ b/drivers/scsi/initio.h @@ -54,6 +54,7 @@ **************************************************************************/ +#include #include #define ULONG unsigned long @@ -192,13 +193,13 @@ typedef struct { #define TSC_SEL_ATN_DIRECT_OUT 0x15 /* Select With ATN Sequence */ #define TSC_SEL_ATN3_DIRECT_IN 0xB5 /* Select With ATN3 Sequence */ #define TSC_SEL_ATN3_DIRECT_OUT 0x35 /* Select With ATN3 Sequence */ -#define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Information out */ -#define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Information in */ +#define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Infomation out */ +#define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Infomation in */ -#define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Information out */ -#define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Information in */ -#define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Information out */ -#define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Information in */ +#define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Infomation out */ +#define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Infomation in */ +#define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Infomation out */ +#define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Infomation in */ #define TSC_MSG_ACCEPT 0x0F /* Message Accept */ diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 01080b3ac..8b80e59c8 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -54,6 +54,7 @@ * */ +#include #include #include #include @@ -78,6 +79,7 @@ #include #include #include +#include #include "ipr.h" /* @@ -6428,7 +6430,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, ioa_cfg->needs_hard_reset = 1; ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); - rc = request_irq(pdev->irq, ipr_isr, IRQF_SHARED, IPR_NAME, ioa_cfg); + rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); if (rc) { dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n", diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 4d2c29c56..a4c0b04cf 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -196,6 +196,7 @@ #include #include +#include #include #include @@ -555,7 +556,7 @@ ips_setup(char *ips_str) * We now have key/value pairs. * Update the variables */ - for (i = 0; i < ARRAY_SIZE(options); i++) { + for (i = 0; i < (sizeof (options) / sizeof (options[0])); i++) { if (strnicmp (key, options[i].option_name, strlen(options[i].option_name)) == 0) { @@ -4363,7 +4364,7 @@ ips_rdcap(ips_ha_t * ha, ips_scb_t * scb) METHOD_TRACE("ips_rdcap", 1); - if (scb->scsi_cmd->request_bufflen < 8) + if (scb->scsi_cmd->bufflen < 8) return (0); cap.lba = @@ -5014,7 +5015,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (j >= 45) @@ -5040,7 +5041,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (j >= 240) @@ -5058,7 +5059,7 @@ ips_init_copperhead(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (i >= 240) @@ -5108,7 +5109,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (j >= 45) @@ -5134,7 +5135,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (j >= 240) @@ -5152,7 +5153,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (i >= 240) @@ -5204,7 +5205,7 @@ ips_init_morpheus(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (i >= 45) { @@ -5230,7 +5231,7 @@ ips_init_morpheus(ips_ha_t * ha) if (Post != 0x4F00) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (i >= 120) { @@ -5260,7 +5261,7 @@ ips_init_morpheus(ips_ha_t * ha) break; /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); } if (i >= 240) { @@ -5320,12 +5321,12 @@ ips_reset_copperhead(ips_ha_t * ha) outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); outb(0, ha->io_addr + IPS_REG_SCPR); /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); if ((*ha->func.init) (ha)) break; @@ -5365,12 +5366,12 @@ ips_reset_copperhead_memio(ips_ha_t * ha) writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); writeb(0, ha->mem_ptr + IPS_REG_SCPR); /* Delay for 1 Second */ - MDELAY(IPS_ONE_SEC); + msleep(IPS_ONE_SEC); if ((*ha->func.init) (ha)) break; @@ -5411,7 +5412,7 @@ ips_reset_morpheus(ips_ha_t * ha) writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); /* Delay for 5 Seconds */ - MDELAY(5 * IPS_ONE_SEC); + msleep(5 * IPS_ONE_SEC); /* Do a PCI config read to wait for adapter */ pci_read_config_byte(ha->pcidev, 4, &junk); @@ -6437,7 +6438,7 @@ ips_erase_bios(ips_ha_t * ha) /* VPP failure */ return (1); - /* check for successful flash */ + /* check for succesful flash */ if (status & 0x30) /* sequence error */ return (1); @@ -6549,7 +6550,7 @@ ips_erase_bios_memio(ips_ha_t * ha) /* VPP failure */ return (1); - /* check for successful flash */ + /* check for succesful flash */ if (status & 0x30) /* sequence error */ return (1); @@ -7007,7 +7008,7 @@ ips_register_scsi(int index) memcpy(ha, oldha, sizeof (ips_ha_t)); free_irq(oldha->irq, oldha); /* Install the interrupt handler with the new ha */ - if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { + if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { IPS_PRINTK(KERN_WARNING, ha->pcidev, "Unable to install interrupt handler\n"); scsi_host_put(sh); @@ -7419,7 +7420,7 @@ ips_init_phase2(int index) } /* Install the interrupt handler */ - if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { + if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { IPS_PRINTK(KERN_WARNING, ha->pcidev, "Unable to install interrupt handler\n"); return ips_abort_init(ha, index); diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 058f094f9..2068b6682 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -3,8 +3,7 @@ * * Copyright (C) 2004 Dmitry Yusupov * Copyright (C) 2004 Alex Aizman - * Copyright (C) 2005 - 2006 Mike Christie - * Copyright (C) 2006 Red Hat, Inc. All rights reserved. + * Copyright (C) 2005 Mike Christie * maintained by open-iscsi@googlegroups.com * * This program is free software; you can redistribute it and/or modify @@ -37,6 +36,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -47,15 +50,23 @@ MODULE_AUTHOR("Dmitry Yusupov , " "Alex Aizman "); MODULE_DESCRIPTION("iSCSI/TCP data-path"); MODULE_LICENSE("GPL"); +MODULE_VERSION("0:4.445"); /* #define DEBUG_TCP */ +/* #define DEBUG_SCSI */ #define DEBUG_ASSERT #ifdef DEBUG_TCP -#define debug_tcp(fmt...) printk(KERN_INFO "tcp: " fmt) +#define debug_tcp(fmt...) printk(KERN_DEBUG "tcp: " fmt) #else #define debug_tcp(fmt...) #endif +#ifdef DEBUG_SCSI +#define debug_scsi(fmt...) printk(KERN_DEBUG "scsi: " fmt) +#else +#define debug_scsi(fmt...) +#endif + #ifndef DEBUG_ASSERT #ifdef BUG_ON #undef BUG_ON @@ -63,9 +74,22 @@ MODULE_LICENSE("GPL"); #define BUG_ON(expr) #endif +#define INVALID_SN_DELTA 0xffff + static unsigned int iscsi_max_lun = 512; module_param_named(max_lun, iscsi_max_lun, uint, S_IRUGO); +/* global data */ +static kmem_cache_t *taskcache; + +static inline void +iscsi_buf_init_virt(struct iscsi_buf *ibuf, char *vbuf, int size) +{ + sg_init_one(&ibuf->sg, (u8 *)vbuf, size); + ibuf->sent = 0; + ibuf->use_sendmsg = 0; +} + static inline void iscsi_buf_init_iov(struct iscsi_buf *ibuf, char *vbuf, int size) { @@ -106,39 +130,68 @@ static inline void iscsi_hdr_digest(struct iscsi_conn *conn, struct iscsi_buf *buf, u8* crc) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - - crypto_digest_digest(tcp_conn->tx_tfm, &buf->sg, 1, crc); + crypto_digest_digest(conn->tx_tfm, &buf->sg, 1, crc); buf->sg.length += sizeof(uint32_t); } +static void +iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err) +{ + struct iscsi_session *session = conn->session; + unsigned long flags; + + spin_lock_irqsave(&session->lock, flags); + if (session->conn_cnt == 1 || session->leadconn == conn) + session->state = ISCSI_STATE_FAILED; + spin_unlock_irqrestore(&session->lock, flags); + set_bit(SUSPEND_BIT, &conn->suspend_tx); + set_bit(SUSPEND_BIT, &conn->suspend_rx); + iscsi_conn_error(conn->cls_conn, err); +} + static inline int -iscsi_hdr_extract(struct iscsi_tcp_conn *tcp_conn) +iscsi_check_assign_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr) { - struct sk_buff *skb = tcp_conn->in.skb; + uint32_t max_cmdsn = be32_to_cpu(hdr->max_cmdsn); + uint32_t exp_cmdsn = be32_to_cpu(hdr->exp_cmdsn); + + if (max_cmdsn < exp_cmdsn -1 && + max_cmdsn > exp_cmdsn - INVALID_SN_DELTA) + return ISCSI_ERR_MAX_CMDSN; + if (max_cmdsn > session->max_cmdsn || + max_cmdsn < session->max_cmdsn - INVALID_SN_DELTA) + session->max_cmdsn = max_cmdsn; + if (exp_cmdsn > session->exp_cmdsn || + exp_cmdsn < session->exp_cmdsn - INVALID_SN_DELTA) + session->exp_cmdsn = exp_cmdsn; - tcp_conn->in.zero_copy_hdr = 0; + return 0; +} + +static inline int +iscsi_hdr_extract(struct iscsi_conn *conn) +{ + struct sk_buff *skb = conn->in.skb; - if (tcp_conn->in.copy >= tcp_conn->hdr_size && - tcp_conn->in_progress == IN_PROGRESS_WAIT_HEADER) { + if (conn->in.copy >= conn->hdr_size && + conn->in_progress == IN_PROGRESS_WAIT_HEADER) { /* * Zero-copy PDU Header: using connection context * to store header pointer. */ if (skb_shinfo(skb)->frag_list == NULL && - !skb_shinfo(skb)->nr_frags) { - tcp_conn->in.hdr = (struct iscsi_hdr *) - ((char*)skb->data + tcp_conn->in.offset); - tcp_conn->in.zero_copy_hdr = 1; - } else { + !skb_shinfo(skb)->nr_frags) + conn->in.hdr = (struct iscsi_hdr *) + ((char*)skb->data + conn->in.offset); + else { /* ignoring return code since we checked * in.copy before */ - skb_copy_bits(skb, tcp_conn->in.offset, - &tcp_conn->hdr, tcp_conn->hdr_size); - tcp_conn->in.hdr = &tcp_conn->hdr; + skb_copy_bits(skb, conn->in.offset, + &conn->hdr, conn->hdr_size); + conn->in.hdr = &conn->hdr; } - tcp_conn->in.offset += tcp_conn->hdr_size; - tcp_conn->in.copy -= tcp_conn->hdr_size; + conn->in.offset += conn->hdr_size; + conn->in.copy -= conn->hdr_size; } else { int hdr_remains; int copylen; @@ -148,59 +201,118 @@ iscsi_hdr_extract(struct iscsi_tcp_conn *tcp_conn) * copying it... This'll happen quite rarely. */ - if (tcp_conn->in_progress == IN_PROGRESS_WAIT_HEADER) - tcp_conn->in.hdr_offset = 0; + if (conn->in_progress == IN_PROGRESS_WAIT_HEADER) + conn->in.hdr_offset = 0; - hdr_remains = tcp_conn->hdr_size - tcp_conn->in.hdr_offset; + hdr_remains = conn->hdr_size - conn->in.hdr_offset; BUG_ON(hdr_remains <= 0); - copylen = min(tcp_conn->in.copy, hdr_remains); - skb_copy_bits(skb, tcp_conn->in.offset, - (char*)&tcp_conn->hdr + tcp_conn->in.hdr_offset, - copylen); + copylen = min(conn->in.copy, hdr_remains); + skb_copy_bits(skb, conn->in.offset, + (char*)&conn->hdr + conn->in.hdr_offset, copylen); debug_tcp("PDU gather offset %d bytes %d in.offset %d " - "in.copy %d\n", tcp_conn->in.hdr_offset, copylen, - tcp_conn->in.offset, tcp_conn->in.copy); + "in.copy %d\n", conn->in.hdr_offset, copylen, + conn->in.offset, conn->in.copy); - tcp_conn->in.offset += copylen; - tcp_conn->in.copy -= copylen; + conn->in.offset += copylen; + conn->in.copy -= copylen; if (copylen < hdr_remains) { - tcp_conn->in_progress = IN_PROGRESS_HEADER_GATHER; - tcp_conn->in.hdr_offset += copylen; + conn->in_progress = IN_PROGRESS_HEADER_GATHER; + conn->in.hdr_offset += copylen; return -EAGAIN; } - tcp_conn->in.hdr = &tcp_conn->hdr; - tcp_conn->discontiguous_hdr_cnt++; - tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; + conn->in.hdr = &conn->hdr; + conn->discontiguous_hdr_cnt++; + conn->in_progress = IN_PROGRESS_WAIT_HEADER; } return 0; } -/* - * must be called with session lock - */ -static void -iscsi_tcp_cleanup_ctask(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) +static inline void +iscsi_ctask_cleanup(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_r2t_info *r2t; - struct scsi_cmnd *sc; + struct scsi_cmnd *sc = ctask->sc; + struct iscsi_session *session = conn->session; + + spin_lock(&session->lock); + if (unlikely(!sc)) { + spin_unlock(&session->lock); + return; + } + if (sc->sc_data_direction == DMA_TO_DEVICE) { + struct iscsi_data_task *dtask, *n; + /* WRITE: cleanup Data-Out's if any */ + list_for_each_entry_safe(dtask, n, &ctask->dataqueue, item) { + list_del(&dtask->item); + mempool_free(dtask, ctask->datapool); + } + } + ctask->xmstate = XMSTATE_IDLE; + ctask->r2t = NULL; + ctask->sc = NULL; + __kfifo_put(session->cmdpool.queue, (void*)&ctask, sizeof(void*)); + spin_unlock(&session->lock); +} + +/** + * iscsi_cmd_rsp - SCSI Command Response processing + * @conn: iscsi connection + * @ctask: scsi command task + **/ +static int +iscsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) +{ + int rc; + struct iscsi_cmd_rsp *rhdr = (struct iscsi_cmd_rsp *)conn->in.hdr; + struct iscsi_session *session = conn->session; + struct scsi_cmnd *sc = ctask->sc; - /* flush ctask's r2t queues */ - while (__kfifo_get(tcp_ctask->r2tqueue, (void*)&r2t, sizeof(void*))) { - __kfifo_put(tcp_ctask->r2tpool.queue, (void*)&r2t, - sizeof(void*)); - debug_scsi("iscsi_tcp_cleanup_ctask pending r2t dropped\n"); + rc = iscsi_check_assign_cmdsn(session, (struct iscsi_nopin*)rhdr); + if (rc) { + sc->result = (DID_ERROR << 16); + goto out; } - sc = ctask->sc; - if (unlikely(!sc)) - return; + conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1; + + sc->result = (DID_OK << 16) | rhdr->cmd_status; + + if (rhdr->response != ISCSI_STATUS_CMD_COMPLETED) { + sc->result = (DID_ERROR << 16); + goto out; + } + + if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION && conn->senselen) { + int sensecopy = min(conn->senselen, SCSI_SENSE_BUFFERSIZE); - tcp_ctask->xmstate = XMSTATE_IDLE; - tcp_ctask->r2t = NULL; + memcpy(sc->sense_buffer, conn->data + 2, sensecopy); + debug_scsi("copied %d bytes of sense\n", sensecopy); + } + + if (sc->sc_data_direction == DMA_TO_DEVICE) + goto out; + + if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { + int res_count = be32_to_cpu(rhdr->residual_count); + + if (res_count > 0 && res_count <= sc->request_bufflen) + sc->resid = res_count; + else + sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; + } else if (rhdr->flags & ISCSI_FLAG_CMD_BIDI_UNDERFLOW) + sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; + else if (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW) + sc->resid = be32_to_cpu(rhdr->residual_count); + +out: + debug_scsi("done [sc %lx res %d itt 0x%x]\n", + (long)sc, sc->result, ctask->itt); + conn->scsirsp_pdus_cnt++; + iscsi_ctask_cleanup(conn, ctask); + sc->scsi_done(sc); + return rc; } /** @@ -212,9 +324,7 @@ static int iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { int rc; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_data_rsp *rhdr = (struct iscsi_data_rsp *)tcp_conn->in.hdr; + struct iscsi_data_rsp *rhdr = (struct iscsi_data_rsp *)conn->in.hdr; struct iscsi_session *session = conn->session; int datasn = be32_to_cpu(rhdr->datasn); @@ -224,9 +334,9 @@ iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) /* * setup Data-In byte counter (gets decremented..) */ - ctask->data_count = tcp_conn->in.datalen; + ctask->data_count = conn->in.datalen; - if (tcp_conn->in.datalen == 0) + if (conn->in.datalen == 0) return 0; if (ctask->datasn != datasn) @@ -234,8 +344,8 @@ iscsi_data_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) ctask->datasn++; - tcp_ctask->data_offset = be32_to_cpu(rhdr->offset); - if (tcp_ctask->data_offset + tcp_conn->in.datalen > ctask->total_length) + ctask->data_offset = be32_to_cpu(rhdr->offset); + if (ctask->data_offset + conn->in.datalen > ctask->total_length) return ISCSI_ERR_DATA_OFFSET; if (rhdr->flags & ISCSI_FLAG_DATA_STATUS) { @@ -280,17 +390,19 @@ iscsi_solicit_data_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, struct iscsi_r2t_info *r2t) { struct iscsi_data *hdr; + struct iscsi_data_task *dtask; struct scsi_cmnd *sc = ctask->sc; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - hdr = &r2t->dtask.hdr; + dtask = mempool_alloc(ctask->datapool, GFP_ATOMIC); + BUG_ON(!dtask); + hdr = &dtask->hdr; memset(hdr, 0, sizeof(struct iscsi_data)); hdr->ttt = r2t->ttt; hdr->datasn = cpu_to_be32(r2t->solicit_datasn); r2t->solicit_datasn++; hdr->opcode = ISCSI_OP_SCSI_DATA_OUT; - memcpy(hdr->lun, ctask->hdr->lun, sizeof(hdr->lun)); - hdr->itt = ctask->hdr->itt; + memcpy(hdr->lun, ctask->hdr.lun, sizeof(hdr->lun)); + hdr->itt = ctask->hdr.itt; hdr->exp_statsn = r2t->exp_statsn; hdr->offset = cpu_to_be32(r2t->data_offset); if (r2t->data_length > conn->max_xmit_dlength) { @@ -306,9 +418,11 @@ iscsi_solicit_data_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, r2t->sent = 0; - iscsi_buf_init_iov(&r2t->headbuf, (char*)hdr, + iscsi_buf_init_virt(&r2t->headbuf, (char*)hdr, sizeof(struct iscsi_hdr)); + r2t->dtask = dtask; + if (sc->use_sg) { int i, sg_count = 0; struct scatterlist *sg = sc->request_buffer; @@ -337,9 +451,11 @@ iscsi_solicit_data_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, } BUG_ON(r2t->sg == NULL); } else - iscsi_buf_init_iov(&tcp_ctask->sendbuf, + iscsi_buf_init_iov(&ctask->sendbuf, (char*)sc->request_buffer + r2t->data_offset, r2t->data_count); + + list_add(&dtask->item, &ctask->dataqueue); } /** @@ -352,16 +468,17 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { struct iscsi_r2t_info *r2t; struct iscsi_session *session = conn->session; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct iscsi_r2t_rsp *rhdr = (struct iscsi_r2t_rsp *)tcp_conn->in.hdr; + struct iscsi_r2t_rsp *rhdr = (struct iscsi_r2t_rsp *)conn->in.hdr; int r2tsn = be32_to_cpu(rhdr->r2tsn); int rc; - if (tcp_conn->in.datalen) + if (conn->in.ahslen) + return ISCSI_ERR_AHSLEN; + + if (conn->in.datalen) return ISCSI_ERR_DATALEN; - if (tcp_ctask->exp_r2tsn && tcp_ctask->exp_r2tsn != r2tsn) + if (ctask->exp_r2tsn && ctask->exp_r2tsn != r2tsn) return ISCSI_ERR_R2TSN; rc = iscsi_check_assign_cmdsn(session, (struct iscsi_nopin*)rhdr); @@ -379,8 +496,7 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) spin_unlock(&session->lock); return 0; } - - rc = __kfifo_get(tcp_ctask->r2tpool.queue, (void*)&r2t, sizeof(void*)); + rc = __kfifo_get(ctask->r2tpool.queue, (void*)&r2t, sizeof(void*)); BUG_ON(!rc); r2t->exp_statsn = rhdr->statsn; @@ -402,10 +518,10 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) iscsi_solicit_data_init(conn, ctask, r2t); - tcp_ctask->exp_r2tsn = r2tsn + 1; - tcp_ctask->xmstate |= XMSTATE_SOL_HDR; - __kfifo_put(tcp_ctask->r2tqueue, (void*)&r2t, sizeof(void*)); - list_move_tail(&ctask->running, &conn->xmitqueue); + ctask->exp_r2tsn = r2tsn + 1; + ctask->xmstate |= XMSTATE_SOL_HDR; + __kfifo_put(ctask->r2tqueue, (void*)&r2t, sizeof(void*)); + __kfifo_put(conn->writequeue, (void*)&ctask, sizeof(void*)); scsi_queue_work(session->host, &conn->xmitwork); conn->r2t_pdus_cnt++; @@ -415,153 +531,258 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) } static int -iscsi_tcp_hdr_recv(struct iscsi_conn *conn) +iscsi_hdr_recv(struct iscsi_conn *conn) { - int rc = 0, opcode, ahslen; + int rc = 0; struct iscsi_hdr *hdr; + struct iscsi_cmd_task *ctask; struct iscsi_session *session = conn->session; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - uint32_t cdgst, rdgst = 0, itt; + uint32_t cdgst, rdgst = 0; - hdr = tcp_conn->in.hdr; + hdr = conn->in.hdr; /* verify PDU length */ - tcp_conn->in.datalen = ntoh24(hdr->dlength); - if (tcp_conn->in.datalen > conn->max_recv_dlength) { + conn->in.datalen = ntoh24(hdr->dlength); + if (conn->in.datalen > conn->max_recv_dlength) { printk(KERN_ERR "iscsi_tcp: datalen %d > %d\n", - tcp_conn->in.datalen, conn->max_recv_dlength); + conn->in.datalen, conn->max_recv_dlength); return ISCSI_ERR_DATALEN; } - tcp_conn->data_copied = 0; + conn->data_copied = 0; /* read AHS */ - ahslen = hdr->hlength << 2; - tcp_conn->in.offset += ahslen; - tcp_conn->in.copy -= ahslen; - if (tcp_conn->in.copy < 0) { + conn->in.ahslen = hdr->hlength * 4; + conn->in.offset += conn->in.ahslen; + conn->in.copy -= conn->in.ahslen; + if (conn->in.copy < 0) { printk(KERN_ERR "iscsi_tcp: can't handle AHS with length " - "%d bytes\n", ahslen); + "%d bytes\n", conn->in.ahslen); return ISCSI_ERR_AHSLEN; } /* calculate read padding */ - tcp_conn->in.padding = tcp_conn->in.datalen & (ISCSI_PAD_LEN-1); - if (tcp_conn->in.padding) { - tcp_conn->in.padding = ISCSI_PAD_LEN - tcp_conn->in.padding; - debug_scsi("read padding %d bytes\n", tcp_conn->in.padding); + conn->in.padding = conn->in.datalen & (ISCSI_PAD_LEN-1); + if (conn->in.padding) { + conn->in.padding = ISCSI_PAD_LEN - conn->in.padding; + debug_scsi("read padding %d bytes\n", conn->in.padding); } if (conn->hdrdgst_en) { struct scatterlist sg; sg_init_one(&sg, (u8 *)hdr, - sizeof(struct iscsi_hdr) + ahslen); - crypto_digest_digest(tcp_conn->rx_tfm, &sg, 1, (u8 *)&cdgst); + sizeof(struct iscsi_hdr) + conn->in.ahslen); + crypto_digest_digest(conn->rx_tfm, &sg, 1, (u8 *)&cdgst); rdgst = *(uint32_t*)((char*)hdr + sizeof(struct iscsi_hdr) + - ahslen); + conn->in.ahslen); if (cdgst != rdgst) { - printk(KERN_ERR "iscsi_tcp: hdrdgst error " - "recv 0x%x calc 0x%x\n", rdgst, cdgst); + printk(KERN_ERR "iscsi_tcp: itt %x: hdrdgst error " + "recv 0x%x calc 0x%x\n", conn->in.itt, rdgst, + cdgst); return ISCSI_ERR_HDR_DGST; } } - opcode = hdr->opcode & ISCSI_OPCODE_MASK; + /* save opcode for later */ + conn->in.opcode = hdr->opcode & ISCSI_OPCODE_MASK; + /* verify itt (itt encoding: age+cid+itt) */ - rc = iscsi_verify_itt(conn, hdr, &itt); - if (rc == ISCSI_ERR_NO_SCSI_CMD) { - tcp_conn->in.datalen = 0; /* force drop */ - return 0; - } else if (rc) - return rc; + if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) { + if ((hdr->itt & AGE_MASK) != + (session->age << AGE_SHIFT)) { + printk(KERN_ERR "iscsi_tcp: received itt %x expected " + "session age (%x)\n", hdr->itt, + session->age & AGE_MASK); + return ISCSI_ERR_BAD_ITT; + } + + if ((hdr->itt & CID_MASK) != (conn->id << CID_SHIFT)) { + printk(KERN_ERR "iscsi_tcp: received itt %x, expected " + "CID (%x)\n", hdr->itt, conn->id); + return ISCSI_ERR_BAD_ITT; + } + conn->in.itt = hdr->itt & ITT_MASK; + } else + conn->in.itt = hdr->itt; debug_tcp("opcode 0x%x offset %d copy %d ahslen %d datalen %d\n", - opcode, tcp_conn->in.offset, tcp_conn->in.copy, - ahslen, tcp_conn->in.datalen); + hdr->opcode, conn->in.offset, conn->in.copy, + conn->in.ahslen, conn->in.datalen); - switch(opcode) { - case ISCSI_OP_SCSI_DATA_IN: - tcp_conn->in.ctask = session->cmds[itt]; - rc = iscsi_data_rsp(conn, tcp_conn->in.ctask); - if (rc) - return rc; - /* fall through */ - case ISCSI_OP_SCSI_CMD_RSP: - tcp_conn->in.ctask = session->cmds[itt]; - if (tcp_conn->in.datalen) - goto copy_hdr; - - spin_lock(&session->lock); - iscsi_tcp_cleanup_ctask(conn, tcp_conn->in.ctask); - rc = __iscsi_complete_pdu(conn, hdr, NULL, 0); - spin_unlock(&session->lock); - break; - case ISCSI_OP_R2T: - tcp_conn->in.ctask = session->cmds[itt]; - if (ahslen) - rc = ISCSI_ERR_AHSLEN; - else if (tcp_conn->in.ctask->sc->sc_data_direction == - DMA_TO_DEVICE) - rc = iscsi_r2t_rsp(conn, tcp_conn->in.ctask); - else - rc = ISCSI_ERR_PROTO; - break; - case ISCSI_OP_LOGIN_RSP: - case ISCSI_OP_TEXT_RSP: - case ISCSI_OP_REJECT: - case ISCSI_OP_ASYNC_EVENT: - /* - * It is possible that we could get a PDU with a buffer larger - * than 8K, but there are no targets that currently do this. - * For now we fail until we find a vendor that needs it - */ - if (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH < - tcp_conn->in.datalen) { - printk(KERN_ERR "iscsi_tcp: received buffer of len %u " - "but conn buffer is only %u (opcode %0x)\n", - tcp_conn->in.datalen, - DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, opcode); - rc = ISCSI_ERR_PROTO; + if (conn->in.itt < session->cmds_max) { + ctask = (struct iscsi_cmd_task *)session->cmds[conn->in.itt]; + + if (!ctask->sc) { + printk(KERN_INFO "iscsi_tcp: dropping ctask with " + "itt 0x%x\n", ctask->itt); + conn->in.datalen = 0; /* force drop */ + return 0; + } + + if (ctask->sc->SCp.phase != session->age) { + printk(KERN_ERR "iscsi_tcp: ctask's session age %d, " + "expected %d\n", ctask->sc->SCp.phase, + session->age); + return ISCSI_ERR_SESSION_FAILED; + } + + conn->in.ctask = ctask; + + debug_scsi("rsp [op 0x%x cid %d sc %lx itt 0x%x len %d]\n", + hdr->opcode, conn->id, (long)ctask->sc, + ctask->itt, conn->in.datalen); + + switch(conn->in.opcode) { + case ISCSI_OP_SCSI_CMD_RSP: + BUG_ON((void*)ctask != ctask->sc->SCp.ptr); + if (!conn->in.datalen) + rc = iscsi_cmd_rsp(conn, ctask); + else + /* + * got sense or response data; copying PDU + * Header to the connection's header + * placeholder + */ + memcpy(&conn->hdr, hdr, + sizeof(struct iscsi_hdr)); + break; + case ISCSI_OP_SCSI_DATA_IN: + BUG_ON((void*)ctask != ctask->sc->SCp.ptr); + /* save flags for non-exceptional status */ + conn->in.flags = hdr->flags; + /* save cmd_status for sense data */ + conn->in.cmd_status = + ((struct iscsi_data_rsp*)hdr)->cmd_status; + rc = iscsi_data_rsp(conn, ctask); + break; + case ISCSI_OP_R2T: + BUG_ON((void*)ctask != ctask->sc->SCp.ptr); + if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) + rc = iscsi_r2t_rsp(conn, ctask); + else + rc = ISCSI_ERR_PROTO; + break; + default: + rc = ISCSI_ERR_BAD_OPCODE; break; } + } else if (conn->in.itt >= ISCSI_MGMT_ITT_OFFSET && + conn->in.itt < ISCSI_MGMT_ITT_OFFSET + + session->mgmtpool_max) { + struct iscsi_mgmt_task *mtask = (struct iscsi_mgmt_task *) + session->mgmt_cmds[conn->in.itt - + ISCSI_MGMT_ITT_OFFSET]; + + debug_scsi("immrsp [op 0x%x cid %d itt 0x%x len %d]\n", + conn->in.opcode, conn->id, mtask->itt, + conn->in.datalen); + + switch(conn->in.opcode) { + case ISCSI_OP_LOGIN_RSP: + case ISCSI_OP_TEXT_RSP: + case ISCSI_OP_LOGOUT_RSP: + rc = iscsi_check_assign_cmdsn(session, + (struct iscsi_nopin*)hdr); + if (rc) + break; - if (tcp_conn->in.datalen) - goto copy_hdr; - /* fall through */ - case ISCSI_OP_LOGOUT_RSP: - case ISCSI_OP_NOOP_IN: - case ISCSI_OP_SCSI_TMFUNC_RSP: - rc = iscsi_complete_pdu(conn, hdr, NULL, 0); - break; - default: - rc = ISCSI_ERR_BAD_OPCODE; - break; - } + if (!conn->in.datalen) { + rc = iscsi_recv_pdu(conn->cls_conn, hdr, + NULL, 0); + if (conn->login_mtask != mtask) { + spin_lock(&session->lock); + __kfifo_put(session->mgmtpool.queue, + (void*)&mtask, sizeof(void*)); + spin_unlock(&session->lock); + } + } + break; + case ISCSI_OP_SCSI_TMFUNC_RSP: + rc = iscsi_check_assign_cmdsn(session, + (struct iscsi_nopin*)hdr); + if (rc) + break; - return rc; + if (conn->in.datalen || conn->in.ahslen) { + rc = ISCSI_ERR_PROTO; + break; + } + conn->tmfrsp_pdus_cnt++; + spin_lock(&session->lock); + if (conn->tmabort_state == TMABORT_INITIAL) { + __kfifo_put(session->mgmtpool.queue, + (void*)&mtask, sizeof(void*)); + conn->tmabort_state = + ((struct iscsi_tm_rsp *)hdr)-> + response == ISCSI_TMF_RSP_COMPLETE ? + TMABORT_SUCCESS:TMABORT_FAILED; + /* unblock eh_abort() */ + wake_up(&conn->ehwait); + } + spin_unlock(&session->lock); + break; + case ISCSI_OP_NOOP_IN: + if (hdr->ttt != ISCSI_RESERVED_TAG) { + rc = ISCSI_ERR_PROTO; + break; + } + rc = iscsi_check_assign_cmdsn(session, + (struct iscsi_nopin*)hdr); + if (rc) + break; + conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1; + + if (!conn->in.datalen) { + struct iscsi_mgmt_task *mtask; + + rc = iscsi_recv_pdu(conn->cls_conn, hdr, + NULL, 0); + mtask = (struct iscsi_mgmt_task *) + session->mgmt_cmds[conn->in.itt - + ISCSI_MGMT_ITT_OFFSET]; + if (conn->login_mtask != mtask) { + spin_lock(&session->lock); + __kfifo_put(session->mgmtpool.queue, + (void*)&mtask, sizeof(void*)); + spin_unlock(&session->lock); + } + } + break; + default: + rc = ISCSI_ERR_BAD_OPCODE; + break; + } + } else if (conn->in.itt == ISCSI_RESERVED_TAG) { + switch(conn->in.opcode) { + case ISCSI_OP_NOOP_IN: + if (!conn->in.datalen) { + rc = iscsi_check_assign_cmdsn(session, + (struct iscsi_nopin*)hdr); + if (!rc && hdr->ttt != ISCSI_RESERVED_TAG) + rc = iscsi_recv_pdu(conn->cls_conn, + hdr, NULL, 0); + } else + rc = ISCSI_ERR_PROTO; + break; + case ISCSI_OP_REJECT: + /* we need sth like iscsi_reject_rsp()*/ + case ISCSI_OP_ASYNC_EVENT: + /* we need sth like iscsi_async_event_rsp() */ + rc = ISCSI_ERR_BAD_OPCODE; + break; + default: + rc = ISCSI_ERR_BAD_OPCODE; + break; + } + } else + rc = ISCSI_ERR_BAD_ITT; -copy_hdr: - /* - * if we did zero copy for the header but we will need multiple - * skbs to complete the command then we have to copy the header - * for later use - */ - if (tcp_conn->in.zero_copy_hdr && tcp_conn->in.copy <= - (tcp_conn->in.datalen + tcp_conn->in.padding + - (conn->datadgst_en ? 4 : 0))) { - debug_tcp("Copying header for later use. in.copy %d in.datalen" - " %d\n", tcp_conn->in.copy, tcp_conn->in.datalen); - memcpy(&tcp_conn->hdr, tcp_conn->in.hdr, - sizeof(struct iscsi_hdr)); - tcp_conn->in.hdr = &tcp_conn->hdr; - tcp_conn->in.zero_copy_hdr = 0; - } - return 0; + return rc; } /** * iscsi_ctask_copy - copy skb bits to the destanation cmd task - * @conn: iscsi tcp connection + * @conn: iscsi connection * @ctask: scsi command task * @buf: buffer to copy to * @buf_size: size of buffer @@ -583,113 +804,110 @@ copy_hdr: * buf_left left to copy from in progress buffer **/ static inline int -iscsi_ctask_copy(struct iscsi_tcp_conn *tcp_conn, struct iscsi_cmd_task *ctask, +iscsi_ctask_copy(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, void *buf, int buf_size, int offset) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - int buf_left = buf_size - (tcp_conn->data_copied + offset); - int size = min(tcp_conn->in.copy, buf_left); + int buf_left = buf_size - (conn->data_copied + offset); + int size = min(conn->in.copy, buf_left); int rc; size = min(size, ctask->data_count); debug_tcp("ctask_copy %d bytes at offset %d copied %d\n", - size, tcp_conn->in.offset, tcp_conn->in.copied); + size, conn->in.offset, conn->in.copied); BUG_ON(size <= 0); - BUG_ON(tcp_ctask->sent + size > ctask->total_length); + BUG_ON(ctask->sent + size > ctask->total_length); - rc = skb_copy_bits(tcp_conn->in.skb, tcp_conn->in.offset, - (char*)buf + (offset + tcp_conn->data_copied), size); + rc = skb_copy_bits(conn->in.skb, conn->in.offset, + (char*)buf + (offset + conn->data_copied), size); /* must fit into skb->len */ BUG_ON(rc); - tcp_conn->in.offset += size; - tcp_conn->in.copy -= size; - tcp_conn->in.copied += size; - tcp_conn->data_copied += size; - tcp_ctask->sent += size; + conn->in.offset += size; + conn->in.copy -= size; + conn->in.copied += size; + conn->data_copied += size; + ctask->sent += size; ctask->data_count -= size; - BUG_ON(tcp_conn->in.copy < 0); + BUG_ON(conn->in.copy < 0); BUG_ON(ctask->data_count < 0); - if (buf_size != (tcp_conn->data_copied + offset)) { + if (buf_size != (conn->data_copied + offset)) { if (!ctask->data_count) { - BUG_ON(buf_size - tcp_conn->data_copied < 0); + BUG_ON(buf_size - conn->data_copied < 0); /* done with this PDU */ - return buf_size - tcp_conn->data_copied; + return buf_size - conn->data_copied; } return -EAGAIN; } /* done with this buffer or with both - PDU and buffer */ - tcp_conn->data_copied = 0; + conn->data_copied = 0; return 0; } /** * iscsi_tcp_copy - copy skb bits to the destanation buffer - * @conn: iscsi tcp connection + * @conn: iscsi connection + * @buf: buffer to copy to + * @buf_size: number of bytes to copy * * Notes: * The function calls skb_copy_bits() and updates per-connection * byte counters. **/ static inline int -iscsi_tcp_copy(struct iscsi_conn *conn) +iscsi_tcp_copy(struct iscsi_conn *conn, void *buf, int buf_size) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int buf_size = tcp_conn->in.datalen; - int buf_left = buf_size - tcp_conn->data_copied; - int size = min(tcp_conn->in.copy, buf_left); + int buf_left = buf_size - conn->data_copied; + int size = min(conn->in.copy, buf_left); int rc; debug_tcp("tcp_copy %d bytes at offset %d copied %d\n", - size, tcp_conn->in.offset, tcp_conn->data_copied); + size, conn->in.offset, conn->data_copied); BUG_ON(size <= 0); - rc = skb_copy_bits(tcp_conn->in.skb, tcp_conn->in.offset, - (char*)conn->data + tcp_conn->data_copied, size); + rc = skb_copy_bits(conn->in.skb, conn->in.offset, + (char*)buf + conn->data_copied, size); BUG_ON(rc); - tcp_conn->in.offset += size; - tcp_conn->in.copy -= size; - tcp_conn->in.copied += size; - tcp_conn->data_copied += size; + conn->in.offset += size; + conn->in.copy -= size; + conn->in.copied += size; + conn->data_copied += size; - if (buf_size != tcp_conn->data_copied) + if (buf_size != conn->data_copied) return -EAGAIN; return 0; } static inline void -partial_sg_digest_update(struct iscsi_tcp_conn *tcp_conn, - struct scatterlist *sg, int offset, int length) +partial_sg_digest_update(struct iscsi_conn *conn, struct scatterlist *sg, + int offset, int length) { struct scatterlist temp; memcpy(&temp, sg, sizeof(struct scatterlist)); temp.offset = offset; temp.length = length; - crypto_digest_update(tcp_conn->data_rx_tfm, &temp, 1); + crypto_digest_update(conn->data_rx_tfm, &temp, 1); } static void -iscsi_recv_digest_update(struct iscsi_tcp_conn *tcp_conn, char* buf, int len) +iscsi_recv_digest_update(struct iscsi_conn *conn, char* buf, int len) { struct scatterlist tmp; sg_init_one(&tmp, buf, len); - crypto_digest_update(tcp_conn->data_rx_tfm, &tmp, 1); + crypto_digest_update(conn->data_rx_tfm, &tmp, 1); } static int iscsi_scsi_data_in(struct iscsi_conn *conn) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct iscsi_cmd_task *ctask = tcp_conn->in.ctask; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; + struct iscsi_cmd_task *ctask = conn->in.ctask; struct scsi_cmnd *sc = ctask->sc; struct scatterlist *sg; int i, offset, rc = 0; @@ -701,33 +919,31 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) */ if (!sc->use_sg) { i = ctask->data_count; - rc = iscsi_ctask_copy(tcp_conn, ctask, sc->request_buffer, - sc->request_bufflen, - tcp_ctask->data_offset); + rc = iscsi_ctask_copy(conn, ctask, sc->request_buffer, + sc->request_bufflen, ctask->data_offset); if (rc == -EAGAIN) return rc; if (conn->datadgst_en) - iscsi_recv_digest_update(tcp_conn, sc->request_buffer, - i); + iscsi_recv_digest_update(conn, sc->request_buffer, i); rc = 0; goto done; } - offset = tcp_ctask->data_offset; + offset = ctask->data_offset; sg = sc->request_buffer; - if (tcp_ctask->data_offset) - for (i = 0; i < tcp_ctask->sg_count; i++) + if (ctask->data_offset) + for (i = 0; i < ctask->sg_count; i++) offset -= sg[i].length; /* we've passed through partial sg*/ if (offset < 0) offset = 0; - for (i = tcp_ctask->sg_count; i < sc->use_sg; i++) { + for (i = ctask->sg_count; i < sc->use_sg; i++) { char *dest; dest = kmap_atomic(sg[i].page, KM_SOFTIRQ0); - rc = iscsi_ctask_copy(tcp_conn, ctask, dest + sg[i].offset, + rc = iscsi_ctask_copy(conn, ctask, dest + sg[i].offset, sg[i].length, offset); kunmap_atomic(dest, KM_SOFTIRQ0); if (rc == -EAGAIN) @@ -736,17 +952,15 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) if (!rc) { if (conn->datadgst_en) { if (!offset) - crypto_digest_update( - tcp_conn->data_rx_tfm, - &sg[i], 1); + crypto_digest_update(conn->data_rx_tfm, + &sg[i], 1); else - partial_sg_digest_update(tcp_conn, - &sg[i], + partial_sg_digest_update(conn, &sg[i], sg[i].offset + offset, sg[i].length - offset); } offset = 0; - tcp_ctask->sg_count++; + ctask->sg_count++; } if (!ctask->data_count) { @@ -754,27 +968,25 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) /* * data-in is complete, but buffer not... */ - partial_sg_digest_update(tcp_conn, &sg[i], + partial_sg_digest_update(conn, &sg[i], sg[i].offset, sg[i].length-rc); rc = 0; break; } - if (!tcp_conn->in.copy) + if (!conn->in.copy) return -EAGAIN; } BUG_ON(ctask->data_count); done: /* check for non-exceptional status */ - if (tcp_conn->in.hdr->flags & ISCSI_FLAG_DATA_STATUS) { - debug_scsi("done [sc %lx res %d itt 0x%x flags 0x%x]\n", - (long)sc, sc->result, ctask->itt, - tcp_conn->in.hdr->flags); - spin_lock(&conn->session->lock); - iscsi_tcp_cleanup_ctask(conn, ctask); - __iscsi_complete_pdu(conn, tcp_conn->in.hdr, NULL, 0); - spin_unlock(&conn->session->lock); + if (conn->in.flags & ISCSI_FLAG_DATA_STATUS) { + debug_scsi("done [sc %lx res %d itt 0x%x]\n", + (long)sc, sc->result, ctask->itt); + conn->scsirsp_pdus_cnt++; + iscsi_ctask_cleanup(conn, ctask); + sc->scsi_done(sc); } return rc; @@ -783,37 +995,71 @@ done: static int iscsi_data_recv(struct iscsi_conn *conn) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int rc = 0, opcode; + struct iscsi_session *session = conn->session; + int rc = 0; - opcode = tcp_conn->in.hdr->opcode & ISCSI_OPCODE_MASK; - switch (opcode) { + switch(conn->in.opcode) { case ISCSI_OP_SCSI_DATA_IN: rc = iscsi_scsi_data_in(conn); break; - case ISCSI_OP_SCSI_CMD_RSP: - spin_lock(&conn->session->lock); - iscsi_tcp_cleanup_ctask(conn, tcp_conn->in.ctask); - spin_unlock(&conn->session->lock); + case ISCSI_OP_SCSI_CMD_RSP: { + /* + * SCSI Sense Data: + * copying the entire Data Segment. + */ + if (iscsi_tcp_copy(conn, conn->data, conn->in.datalen)) { + rc = -EAGAIN; + goto exit; + } + + /* + * check for sense + */ + conn->in.hdr = &conn->hdr; + conn->senselen = (conn->data[0] << 8) | conn->data[1]; + rc = iscsi_cmd_rsp(conn, conn->in.ctask); + if (!rc && conn->datadgst_en) + iscsi_recv_digest_update(conn, conn->data, + conn->in.datalen); + } + break; case ISCSI_OP_TEXT_RSP: case ISCSI_OP_LOGIN_RSP: - case ISCSI_OP_ASYNC_EVENT: - case ISCSI_OP_REJECT: + case ISCSI_OP_NOOP_IN: { + struct iscsi_mgmt_task *mtask = NULL; + + if (conn->in.itt != ISCSI_RESERVED_TAG) + mtask = (struct iscsi_mgmt_task *) + session->mgmt_cmds[conn->in.itt - + ISCSI_MGMT_ITT_OFFSET]; + /* * Collect data segment to the connection's data * placeholder */ - if (iscsi_tcp_copy(conn)) { + if (iscsi_tcp_copy(conn, conn->data, conn->in.datalen)) { rc = -EAGAIN; goto exit; } - rc = iscsi_complete_pdu(conn, tcp_conn->in.hdr, conn->data, - tcp_conn->in.datalen); - if (!rc && conn->datadgst_en && opcode != ISCSI_OP_LOGIN_RSP) - iscsi_recv_digest_update(tcp_conn, conn->data, - tcp_conn->in.datalen); - break; + rc = iscsi_recv_pdu(conn->cls_conn, conn->in.hdr, + conn->data, conn->in.datalen); + + if (!rc && conn->datadgst_en && + conn->in.opcode != ISCSI_OP_LOGIN_RSP) + iscsi_recv_digest_update(conn, conn->data, + conn->in.datalen); + + if (mtask && conn->login_mtask != mtask) { + spin_lock(&session->lock); + __kfifo_put(session->mgmtpool.queue, (void*)&mtask, + sizeof(void*)); + spin_unlock(&session->lock); + } + } + break; + case ISCSI_OP_ASYNC_EVENT: + case ISCSI_OP_REJECT: default: BUG_ON(1); } @@ -834,7 +1080,6 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, { int rc; struct iscsi_conn *conn = rd_desc->arg.data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; int processed; char pad[ISCSI_PAD_LEN]; struct scatterlist sg; @@ -843,15 +1088,15 @@ iscsi_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, * Save current SKB and its offset in the corresponding * connection context. */ - tcp_conn->in.copy = skb->len - offset; - tcp_conn->in.offset = offset; - tcp_conn->in.skb = skb; - tcp_conn->in.len = tcp_conn->in.copy; - BUG_ON(tcp_conn->in.copy <= 0); - debug_tcp("in %d bytes\n", tcp_conn->in.copy); + conn->in.copy = skb->len - offset; + conn->in.offset = offset; + conn->in.skb = skb; + conn->in.len = conn->in.copy; + BUG_ON(conn->in.copy <= 0); + debug_tcp("in %d bytes\n", conn->in.copy); more: - tcp_conn->in.copied = 0; + conn->in.copied = 0; rc = 0; if (unlikely(conn->suspend_rx)) { @@ -859,14 +1104,14 @@ more: return 0; } - if (tcp_conn->in_progress == IN_PROGRESS_WAIT_HEADER || - tcp_conn->in_progress == IN_PROGRESS_HEADER_GATHER) { - rc = iscsi_hdr_extract(tcp_conn); + if (conn->in_progress == IN_PROGRESS_WAIT_HEADER || + conn->in_progress == IN_PROGRESS_HEADER_GATHER) { + rc = iscsi_hdr_extract(conn); if (rc) { if (rc == -EAGAIN) goto nomore; else { - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + iscsi_conn_failure(conn, rc); return 0; } } @@ -874,91 +1119,90 @@ more: /* * Verify and process incoming PDU header. */ - rc = iscsi_tcp_hdr_recv(conn); - if (!rc && tcp_conn->in.datalen) { + rc = iscsi_hdr_recv(conn); + if (!rc && conn->in.datalen) { if (conn->datadgst_en) { - BUG_ON(!tcp_conn->data_rx_tfm); - crypto_digest_init(tcp_conn->data_rx_tfm); + BUG_ON(!conn->data_rx_tfm); + crypto_digest_init(conn->data_rx_tfm); } - tcp_conn->in_progress = IN_PROGRESS_DATA_RECV; + conn->in_progress = IN_PROGRESS_DATA_RECV; } else if (rc) { iscsi_conn_failure(conn, rc); return 0; } } - if (tcp_conn->in_progress == IN_PROGRESS_DDIGEST_RECV) { + if (conn->in_progress == IN_PROGRESS_DDIGEST_RECV) { uint32_t recv_digest; - debug_tcp("extra data_recv offset %d copy %d\n", - tcp_conn->in.offset, tcp_conn->in.copy); - skb_copy_bits(tcp_conn->in.skb, tcp_conn->in.offset, + conn->in.offset, conn->in.copy); + skb_copy_bits(conn->in.skb, conn->in.offset, &recv_digest, 4); - tcp_conn->in.offset += 4; - tcp_conn->in.copy -= 4; - if (recv_digest != tcp_conn->in.datadgst) { + conn->in.offset += 4; + conn->in.copy -= 4; + if (recv_digest != conn->in.datadgst) { debug_tcp("iscsi_tcp: data digest error!" "0x%x != 0x%x\n", recv_digest, - tcp_conn->in.datadgst); + conn->in.datadgst); iscsi_conn_failure(conn, ISCSI_ERR_DATA_DGST); return 0; } else { debug_tcp("iscsi_tcp: data digest match!" "0x%x == 0x%x\n", recv_digest, - tcp_conn->in.datadgst); - tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; + conn->in.datadgst); + conn->in_progress = IN_PROGRESS_WAIT_HEADER; } } - if (tcp_conn->in_progress == IN_PROGRESS_DATA_RECV && - tcp_conn->in.copy) { + if (conn->in_progress == IN_PROGRESS_DATA_RECV && conn->in.copy) { debug_tcp("data_recv offset %d copy %d\n", - tcp_conn->in.offset, tcp_conn->in.copy); + conn->in.offset, conn->in.copy); rc = iscsi_data_recv(conn); if (rc) { - if (rc == -EAGAIN) + if (rc == -EAGAIN) { + rd_desc->count = conn->in.datalen - + conn->in.ctask->data_count; goto again; - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + } + iscsi_conn_failure(conn, rc); return 0; } - tcp_conn->in.copy -= tcp_conn->in.padding; - tcp_conn->in.offset += tcp_conn->in.padding; + conn->in.copy -= conn->in.padding; + conn->in.offset += conn->in.padding; if (conn->datadgst_en) { - if (tcp_conn->in.padding) { - debug_tcp("padding -> %d\n", - tcp_conn->in.padding); - memset(pad, 0, tcp_conn->in.padding); - sg_init_one(&sg, pad, tcp_conn->in.padding); - crypto_digest_update(tcp_conn->data_rx_tfm, - &sg, 1); + if (conn->in.padding) { + debug_tcp("padding -> %d\n", conn->in.padding); + memset(pad, 0, conn->in.padding); + sg_init_one(&sg, pad, conn->in.padding); + crypto_digest_update(conn->data_rx_tfm, &sg, 1); } - crypto_digest_final(tcp_conn->data_rx_tfm, - (u8 *) & tcp_conn->in.datadgst); - debug_tcp("rx digest 0x%x\n", tcp_conn->in.datadgst); - tcp_conn->in_progress = IN_PROGRESS_DDIGEST_RECV; + crypto_digest_final(conn->data_rx_tfm, + (u8 *) & conn->in.datadgst); + debug_tcp("rx digest 0x%x\n", conn->in.datadgst); + conn->in_progress = IN_PROGRESS_DDIGEST_RECV; } else - tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; + conn->in_progress = IN_PROGRESS_WAIT_HEADER; } debug_tcp("f, processed %d from out of %d padding %d\n", - tcp_conn->in.offset - offset, (int)len, tcp_conn->in.padding); - BUG_ON(tcp_conn->in.offset - offset > len); + conn->in.offset - offset, (int)len, conn->in.padding); + BUG_ON(conn->in.offset - offset > len); - if (tcp_conn->in.offset - offset != len) { + if (conn->in.offset - offset != len) { debug_tcp("continue to process %d bytes\n", - (int)len - (tcp_conn->in.offset - offset)); + (int)len - (conn->in.offset - offset)); goto more; } nomore: - processed = tcp_conn->in.offset - offset; + processed = conn->in.offset - offset; BUG_ON(processed == 0); return processed; again: - processed = tcp_conn->in.offset - offset; + processed = conn->in.offset - offset; debug_tcp("c, processed %d from out of %d rd_desc_cnt %d\n", processed, (int)len, (int)rd_desc->count); BUG_ON(processed == 0); @@ -976,14 +1220,9 @@ iscsi_tcp_data_ready(struct sock *sk, int flag) read_lock(&sk->sk_callback_lock); - /* - * Use rd_desc to pass 'conn' to iscsi_tcp_data_recv. - * We set count to 1 because we want the network layer to - * hand us all the skbs that are available. iscsi_tcp_data_recv - * handled pdus that cross buffers or pdus that still need data. - */ + /* use rd_desc to pass 'conn' to iscsi_tcp_data_recv */ rd_desc.arg.data = conn; - rd_desc.count = 1; + rd_desc.count = 0; tcp_read_sock(sk, &rd_desc, iscsi_tcp_data_recv); read_unlock(&sk->sk_callback_lock); @@ -992,7 +1231,6 @@ iscsi_tcp_data_ready(struct sock *sk, int flag) static void iscsi_tcp_state_change(struct sock *sk) { - struct iscsi_tcp_conn *tcp_conn; struct iscsi_conn *conn; struct iscsi_session *session; void (*old_state_change)(struct sock *); @@ -1009,8 +1247,7 @@ iscsi_tcp_state_change(struct sock *sk) iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); } - tcp_conn = conn->dd_data; - old_state_change = tcp_conn->old_state_change; + old_state_change = conn->old_state_change; read_unlock(&sk->sk_callback_lock); @@ -1025,25 +1262,23 @@ static void iscsi_write_space(struct sock *sk) { struct iscsi_conn *conn = (struct iscsi_conn*)sk->sk_user_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - - tcp_conn->old_write_space(sk); + conn->old_write_space(sk); debug_tcp("iscsi_write_space: cid %d\n", conn->id); + clear_bit(SUSPEND_BIT, &conn->suspend_tx); scsi_queue_work(conn->session->host, &conn->xmitwork); } static void iscsi_conn_set_callbacks(struct iscsi_conn *conn) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct sock *sk = tcp_conn->sock->sk; + struct sock *sk = conn->sock->sk; /* assign new callbacks */ write_lock_bh(&sk->sk_callback_lock); sk->sk_user_data = conn; - tcp_conn->old_data_ready = sk->sk_data_ready; - tcp_conn->old_state_change = sk->sk_state_change; - tcp_conn->old_write_space = sk->sk_write_space; + conn->old_data_ready = sk->sk_data_ready; + conn->old_state_change = sk->sk_state_change; + conn->old_write_space = sk->sk_write_space; sk->sk_data_ready = iscsi_tcp_data_ready; sk->sk_state_change = iscsi_tcp_state_change; sk->sk_write_space = iscsi_write_space; @@ -1051,16 +1286,16 @@ iscsi_conn_set_callbacks(struct iscsi_conn *conn) } static void -iscsi_conn_restore_callbacks(struct iscsi_tcp_conn *tcp_conn) +iscsi_conn_restore_callbacks(struct iscsi_conn *conn) { - struct sock *sk = tcp_conn->sock->sk; + struct sock *sk = conn->sock->sk; /* restore socket callbacks, see also: iscsi_conn_set_callbacks() */ write_lock_bh(&sk->sk_callback_lock); sk->sk_user_data = NULL; - sk->sk_data_ready = tcp_conn->old_data_ready; - sk->sk_state_change = tcp_conn->old_state_change; - sk->sk_write_space = tcp_conn->old_write_space; + sk->sk_data_ready = conn->old_data_ready; + sk->sk_state_change = conn->old_state_change; + sk->sk_write_space = conn->old_write_space; sk->sk_no_check = 0; write_unlock_bh(&sk->sk_callback_lock); } @@ -1075,9 +1310,8 @@ iscsi_conn_restore_callbacks(struct iscsi_tcp_conn *tcp_conn) static inline int iscsi_send(struct iscsi_conn *conn, struct iscsi_buf *buf, int size, int flags) { - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct socket *sk = tcp_conn->sock; - int offset = buf->sg.offset + buf->sent, res; + struct socket *sk = conn->sock; + int offset = buf->sg.offset + buf->sent; /* * if we got use_sg=0 or are sending something we kmallocd @@ -1088,22 +1322,9 @@ iscsi_send(struct iscsi_conn *conn, struct iscsi_buf *buf, int size, int flags) * slab case. */ if (buf->use_sendmsg) - res = sock_no_sendpage(sk, buf->sg.page, offset, size, flags); - else - res = tcp_conn->sendpage(sk, buf->sg.page, offset, size, flags); - - if (res >= 0) { - conn->txdata_octets += res; - buf->sent += res; - return res; - } - - tcp_conn->sendpage_failures_cnt++; - if (res == -EAGAIN) - res = -ENOBUFS; + return sock_no_sendpage(sk, buf->sg.page, offset, size, flags); else - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - return res; + return conn->sendpage(sk, buf->sg.page, offset, size, flags); } /** @@ -1129,10 +1350,16 @@ iscsi_sendhdr(struct iscsi_conn *conn, struct iscsi_buf *buf, int datalen) res = iscsi_send(conn, buf, size, flags); debug_tcp("sendhdr %d bytes, sent %d res %d\n", size, buf->sent, res); if (res >= 0) { + conn->txdata_octets += res; + buf->sent += res; if (size != res) return -EAGAIN; return 0; - } + } else if (res == -EAGAIN) { + conn->sendpage_failures_cnt++; + set_bit(SUSPEND_BIT, &conn->suspend_tx); + } else if (res == -EPIPE) + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); return res; } @@ -1165,46 +1392,47 @@ iscsi_sendpage(struct iscsi_conn *conn, struct iscsi_buf *buf, debug_tcp("sendpage: %d bytes, sent %d left %d sent %d res %d\n", size, buf->sent, *count, *sent, res); if (res >= 0) { + conn->txdata_octets += res; + buf->sent += res; *count -= res; *sent += res; if (size != res) return -EAGAIN; return 0; - } + } else if (res == -EAGAIN) { + conn->sendpage_failures_cnt++; + set_bit(SUSPEND_BIT, &conn->suspend_tx); + } else if (res == -EPIPE) + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); return res; } static inline void -iscsi_data_digest_init(struct iscsi_tcp_conn *tcp_conn, - struct iscsi_cmd_task *ctask) +iscsi_data_digest_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - - BUG_ON(!tcp_conn->data_tx_tfm); - crypto_digest_init(tcp_conn->data_tx_tfm); - tcp_ctask->digest_count = 4; + BUG_ON(!conn->data_tx_tfm); + crypto_digest_init(conn->data_tx_tfm); + ctask->digest_count = 4; } static int iscsi_digest_final_send(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, struct iscsi_buf *buf, uint32_t *digest, int final) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; int rc = 0; int sent = 0; if (final) - crypto_digest_final(tcp_conn->data_tx_tfm, (u8*)digest); + crypto_digest_final(conn->data_tx_tfm, (u8*)digest); - iscsi_buf_init_iov(buf, (char*)digest, 4); - rc = iscsi_sendpage(conn, buf, &tcp_ctask->digest_count, &sent); + iscsi_buf_init_virt(buf, (char*)digest, 4); + rc = iscsi_sendpage(conn, buf, &ctask->digest_count, &sent); if (rc) { - tcp_ctask->datadigest = *digest; - tcp_ctask->xmstate |= XMSTATE_DATA_DIGEST; + ctask->datadigest = *digest; + ctask->xmstate |= XMSTATE_DATA_DIGEST; } else - tcp_ctask->digest_count = 4; + ctask->digest_count = 4; return rc; } @@ -1225,19 +1453,21 @@ static void iscsi_solicit_data_cont(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, struct iscsi_r2t_info *r2t, int left) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; struct iscsi_data *hdr; + struct iscsi_data_task *dtask; struct scsi_cmnd *sc = ctask->sc; int new_offset; - hdr = &r2t->dtask.hdr; + dtask = mempool_alloc(ctask->datapool, GFP_ATOMIC); + BUG_ON(!dtask); + hdr = &dtask->hdr; memset(hdr, 0, sizeof(struct iscsi_data)); hdr->ttt = r2t->ttt; hdr->datasn = cpu_to_be32(r2t->solicit_datasn); r2t->solicit_datasn++; hdr->opcode = ISCSI_OP_SCSI_DATA_OUT; - memcpy(hdr->lun, ctask->hdr->lun, sizeof(hdr->lun)); - hdr->itt = ctask->hdr->itt; + memcpy(hdr->lun, ctask->hdr.lun, sizeof(hdr->lun)); + hdr->itt = ctask->hdr.itt; hdr->exp_statsn = r2t->exp_statsn; new_offset = r2t->data_offset + r2t->sent; hdr->offset = cpu_to_be32(new_offset); @@ -1251,98 +1481,181 @@ iscsi_solicit_data_cont(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, } conn->dataout_pdus_cnt++; - iscsi_buf_init_iov(&r2t->headbuf, (char*)hdr, + iscsi_buf_init_virt(&r2t->headbuf, (char*)hdr, sizeof(struct iscsi_hdr)); + r2t->dtask = dtask; + if (sc->use_sg && !iscsi_buf_left(&r2t->sendbuf)) { - BUG_ON(tcp_ctask->bad_sg == r2t->sg); + BUG_ON(ctask->bad_sg == r2t->sg); iscsi_buf_init_sg(&r2t->sendbuf, r2t->sg); r2t->sg += 1; } else - iscsi_buf_init_iov(&tcp_ctask->sendbuf, + iscsi_buf_init_iov(&ctask->sendbuf, (char*)sc->request_buffer + new_offset, r2t->data_count); + + list_add(&dtask->item, &ctask->dataqueue); } static void iscsi_unsolicit_data_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; + struct iscsi_data *hdr; struct iscsi_data_task *dtask; - dtask = tcp_ctask->dtask = &tcp_ctask->unsol_dtask; - iscsi_prep_unsolicit_data_pdu(ctask, &dtask->hdr, - tcp_ctask->r2t_data_count); - iscsi_buf_init_iov(&tcp_ctask->headbuf, (char*)&dtask->hdr, + dtask = mempool_alloc(ctask->datapool, GFP_ATOMIC); + BUG_ON(!dtask); + hdr = &dtask->hdr; + memset(hdr, 0, sizeof(struct iscsi_data)); + hdr->ttt = cpu_to_be32(ISCSI_RESERVED_TAG); + hdr->datasn = cpu_to_be32(ctask->unsol_datasn); + ctask->unsol_datasn++; + hdr->opcode = ISCSI_OP_SCSI_DATA_OUT; + memcpy(hdr->lun, ctask->hdr.lun, sizeof(hdr->lun)); + hdr->itt = ctask->hdr.itt; + hdr->exp_statsn = cpu_to_be32(conn->exp_statsn); + hdr->offset = cpu_to_be32(ctask->total_length - + ctask->r2t_data_count - + ctask->unsol_count); + if (ctask->unsol_count > conn->max_xmit_dlength) { + hton24(hdr->dlength, conn->max_xmit_dlength); + ctask->data_count = conn->max_xmit_dlength; + hdr->flags = 0; + } else { + hton24(hdr->dlength, ctask->unsol_count); + ctask->data_count = ctask->unsol_count; + hdr->flags = ISCSI_FLAG_CMD_FINAL; + } + + iscsi_buf_init_virt(&ctask->headbuf, (char*)hdr, sizeof(struct iscsi_hdr)); + + list_add(&dtask->item, &ctask->dataqueue); + + ctask->dtask = dtask; } /** - * iscsi_tcp_cmd_init - Initialize iSCSI SCSI_READ or SCSI_WRITE commands + * iscsi_cmd_init - Initialize iSCSI SCSI_READ or SCSI_WRITE commands * @conn: iscsi connection * @ctask: scsi command task * @sc: scsi command **/ static void -iscsi_tcp_cmd_init(struct iscsi_cmd_task *ctask) +iscsi_cmd_init(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, + struct scsi_cmnd *sc) { - struct scsi_cmnd *sc = ctask->sc; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; + struct iscsi_session *session = conn->session; - BUG_ON(__kfifo_len(tcp_ctask->r2tqueue)); + BUG_ON(__kfifo_len(ctask->r2tqueue)); - tcp_ctask->sent = 0; - tcp_ctask->sg_count = 0; + ctask->sc = sc; + ctask->conn = conn; + ctask->hdr.opcode = ISCSI_OP_SCSI_CMD; + ctask->hdr.flags = ISCSI_ATTR_SIMPLE; + int_to_scsilun(sc->device->lun, (struct scsi_lun *)ctask->hdr.lun); + ctask->hdr.itt = ctask->itt | (conn->id << CID_SHIFT) | + (session->age << AGE_SHIFT); + ctask->hdr.data_length = cpu_to_be32(sc->request_bufflen); + ctask->hdr.cmdsn = cpu_to_be32(session->cmdsn); session->cmdsn++; + ctask->hdr.exp_statsn = cpu_to_be32(conn->exp_statsn); + memcpy(ctask->hdr.cdb, sc->cmnd, sc->cmd_len); + memset(&ctask->hdr.cdb[sc->cmd_len], 0, MAX_COMMAND_SIZE - sc->cmd_len); + + ctask->mtask = NULL; + ctask->sent = 0; + ctask->sg_count = 0; + + ctask->total_length = sc->request_bufflen; if (sc->sc_data_direction == DMA_TO_DEVICE) { - tcp_ctask->xmstate = XMSTATE_W_HDR; - tcp_ctask->exp_r2tsn = 0; + ctask->exp_r2tsn = 0; + ctask->hdr.flags |= ISCSI_FLAG_CMD_WRITE; BUG_ON(ctask->total_length == 0); - if (sc->use_sg) { struct scatterlist *sg = sc->request_buffer; - iscsi_buf_init_sg(&tcp_ctask->sendbuf, - &sg[tcp_ctask->sg_count++]); - tcp_ctask->sg = sg; - tcp_ctask->bad_sg = sg + sc->use_sg; - } else - iscsi_buf_init_iov(&tcp_ctask->sendbuf, - sc->request_buffer, - sc->request_bufflen); - - if (ctask->imm_count) - tcp_ctask->xmstate |= XMSTATE_IMM_DATA; + iscsi_buf_init_sg(&ctask->sendbuf, + &sg[ctask->sg_count++]); + ctask->sg = sg; + ctask->bad_sg = sg + sc->use_sg; + } else { + iscsi_buf_init_iov(&ctask->sendbuf, sc->request_buffer, + sc->request_bufflen); + } - tcp_ctask->pad_count = ctask->total_length & (ISCSI_PAD_LEN-1); - if (tcp_ctask->pad_count) { - tcp_ctask->pad_count = ISCSI_PAD_LEN - - tcp_ctask->pad_count; + /* + * Write counters: + * + * imm_count bytes to be sent right after + * SCSI PDU Header + * + * unsol_count bytes(as Data-Out) to be sent + * without R2T ack right after + * immediate data + * + * r2t_data_count bytes to be sent via R2T ack's + * + * pad_count bytes to be sent as zero-padding + */ + ctask->imm_count = 0; + ctask->unsol_count = 0; + ctask->unsol_datasn = 0; + ctask->xmstate = XMSTATE_W_HDR; + /* calculate write padding */ + ctask->pad_count = ctask->total_length & (ISCSI_PAD_LEN-1); + if (ctask->pad_count) { + ctask->pad_count = ISCSI_PAD_LEN - ctask->pad_count; debug_scsi("write padding %d bytes\n", - tcp_ctask->pad_count); - tcp_ctask->xmstate |= XMSTATE_W_PAD; + ctask->pad_count); + ctask->xmstate |= XMSTATE_W_PAD; } + if (session->imm_data_en) { + if (ctask->total_length >= session->first_burst) + ctask->imm_count = min(session->first_burst, + conn->max_xmit_dlength); + else + ctask->imm_count = min(ctask->total_length, + conn->max_xmit_dlength); + hton24(ctask->hdr.dlength, ctask->imm_count); + ctask->xmstate |= XMSTATE_IMM_DATA; + } else + zero_data(ctask->hdr.dlength); + + if (!session->initial_r2t_en) + ctask->unsol_count = min(session->first_burst, + ctask->total_length) - ctask->imm_count; + if (!ctask->unsol_count) + /* No unsolicit Data-Out's */ + ctask->hdr.flags |= ISCSI_FLAG_CMD_FINAL; + else + ctask->xmstate |= XMSTATE_UNS_HDR | XMSTATE_UNS_INIT; - if (ctask->unsol_count) - tcp_ctask->xmstate |= XMSTATE_UNS_HDR | - XMSTATE_UNS_INIT; - tcp_ctask->r2t_data_count = ctask->total_length - + ctask->r2t_data_count = ctask->total_length - ctask->imm_count - ctask->unsol_count; - debug_scsi("cmd [itt 0x%x total %d imm %d imm_data %d " + debug_scsi("cmd [itt %x total %d imm %d imm_data %d " "r2t_data %d]\n", ctask->itt, ctask->total_length, ctask->imm_count, - ctask->unsol_count, tcp_ctask->r2t_data_count); - } else - tcp_ctask->xmstate = XMSTATE_R_HDR; + ctask->unsol_count, ctask->r2t_data_count); + } else { + ctask->hdr.flags |= ISCSI_FLAG_CMD_FINAL; + if (sc->sc_data_direction == DMA_FROM_DEVICE) + ctask->hdr.flags |= ISCSI_FLAG_CMD_READ; + ctask->datasn = 0; + ctask->xmstate = XMSTATE_R_HDR; + zero_data(ctask->hdr.dlength); + } - iscsi_buf_init_iov(&tcp_ctask->headbuf, (char*)ctask->hdr, + iscsi_buf_init_virt(&ctask->headbuf, (char*)&ctask->hdr, sizeof(struct iscsi_hdr)); + conn->scsicmd_pdus_cnt++; } /** - * iscsi_tcp_mtask_xmit - xmit management(immediate) task + * iscsi_mtask_xmit - xmit management(immediate) task * @conn: iscsi connection * @mtask: task management task * @@ -1356,167 +1669,132 @@ iscsi_tcp_cmd_init(struct iscsi_cmd_task *ctask) * IN_PROGRESS_IMM_DATA - PDU Data xmit in progress **/ static int -iscsi_tcp_mtask_xmit(struct iscsi_conn *conn, struct iscsi_mgmt_task *mtask) +iscsi_mtask_xmit(struct iscsi_conn *conn, struct iscsi_mgmt_task *mtask) { - struct iscsi_tcp_mgmt_task *tcp_mtask = mtask->dd_data; - int rc; debug_scsi("mtask deq [cid %d state %x itt 0x%x]\n", - conn->id, tcp_mtask->xmstate, mtask->itt); + conn->id, mtask->xmstate, mtask->itt); - if (tcp_mtask->xmstate & XMSTATE_IMM_HDR) { - tcp_mtask->xmstate &= ~XMSTATE_IMM_HDR; + if (mtask->xmstate & XMSTATE_IMM_HDR) { + mtask->xmstate &= ~XMSTATE_IMM_HDR; if (mtask->data_count) - tcp_mtask->xmstate |= XMSTATE_IMM_DATA; + mtask->xmstate |= XMSTATE_IMM_DATA; if (conn->c_stage != ISCSI_CONN_INITIAL_STAGE && - conn->stop_stage != STOP_CONN_RECOVER && + conn->stop_stage != STOP_CONN_RECOVER && conn->hdrdgst_en) - iscsi_hdr_digest(conn, &tcp_mtask->headbuf, - (u8*)tcp_mtask->hdrext); - rc = iscsi_sendhdr(conn, &tcp_mtask->headbuf, - mtask->data_count); - if (rc) { - tcp_mtask->xmstate |= XMSTATE_IMM_HDR; + iscsi_hdr_digest(conn, &mtask->headbuf, + (u8*)mtask->hdrext); + if (iscsi_sendhdr(conn, &mtask->headbuf, mtask->data_count)) { + mtask->xmstate |= XMSTATE_IMM_HDR; if (mtask->data_count) - tcp_mtask->xmstate &= ~XMSTATE_IMM_DATA; - return rc; + mtask->xmstate &= ~XMSTATE_IMM_DATA; + return -EAGAIN; } } - if (tcp_mtask->xmstate & XMSTATE_IMM_DATA) { + if (mtask->xmstate & XMSTATE_IMM_DATA) { BUG_ON(!mtask->data_count); - tcp_mtask->xmstate &= ~XMSTATE_IMM_DATA; + mtask->xmstate &= ~XMSTATE_IMM_DATA; /* FIXME: implement. * Virtual buffer could be spreaded across multiple pages... */ do { - int rc; - - rc = iscsi_sendpage(conn, &tcp_mtask->sendbuf, - &mtask->data_count, &tcp_mtask->sent); - if (rc) { - tcp_mtask->xmstate |= XMSTATE_IMM_DATA; - return rc; + if (iscsi_sendpage(conn, &mtask->sendbuf, + &mtask->data_count, &mtask->sent)) { + mtask->xmstate |= XMSTATE_IMM_DATA; + return -EAGAIN; } } while (mtask->data_count); } - BUG_ON(tcp_mtask->xmstate != XMSTATE_IDLE); - if (mtask->hdr->itt == cpu_to_be32(ISCSI_RESERVED_TAG)) { - struct iscsi_session *session = conn->session; - - spin_lock_bh(&session->lock); - list_del(&conn->mtask->running); - __kfifo_put(session->mgmtpool.queue, (void*)&conn->mtask, - sizeof(void*)); - spin_unlock_bh(&session->lock); - } + BUG_ON(mtask->xmstate != XMSTATE_IDLE); return 0; } static inline int -handle_xmstate_r_hdr(struct iscsi_conn *conn, - struct iscsi_tcp_cmd_task *tcp_ctask) +handle_xmstate_r_hdr(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - int rc; - - tcp_ctask->xmstate &= ~XMSTATE_R_HDR; + ctask->xmstate &= ~XMSTATE_R_HDR; if (conn->hdrdgst_en) - iscsi_hdr_digest(conn, &tcp_ctask->headbuf, - (u8*)tcp_ctask->hdrext); - rc = iscsi_sendhdr(conn, &tcp_ctask->headbuf, 0); - if (!rc) { - BUG_ON(tcp_ctask->xmstate != XMSTATE_IDLE); + iscsi_hdr_digest(conn, &ctask->headbuf, (u8*)ctask->hdrext); + if (!iscsi_sendhdr(conn, &ctask->headbuf, 0)) { + BUG_ON(ctask->xmstate != XMSTATE_IDLE); return 0; /* wait for Data-In */ } - tcp_ctask->xmstate |= XMSTATE_R_HDR; - return rc; + ctask->xmstate |= XMSTATE_R_HDR; + return -EAGAIN; } static inline int -handle_xmstate_w_hdr(struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask) +handle_xmstate_w_hdr(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - int rc; - - tcp_ctask->xmstate &= ~XMSTATE_W_HDR; + ctask->xmstate &= ~XMSTATE_W_HDR; if (conn->hdrdgst_en) - iscsi_hdr_digest(conn, &tcp_ctask->headbuf, - (u8*)tcp_ctask->hdrext); - rc = iscsi_sendhdr(conn, &tcp_ctask->headbuf, ctask->imm_count); - if (rc) - tcp_ctask->xmstate |= XMSTATE_W_HDR; - return rc; + iscsi_hdr_digest(conn, &ctask->headbuf, (u8*)ctask->hdrext); + if (iscsi_sendhdr(conn, &ctask->headbuf, ctask->imm_count)) { + ctask->xmstate |= XMSTATE_W_HDR; + return -EAGAIN; + } + return 0; } static inline int handle_xmstate_data_digest(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - int rc; - - tcp_ctask->xmstate &= ~XMSTATE_DATA_DIGEST; - debug_tcp("resent data digest 0x%x\n", tcp_ctask->datadigest); - rc = iscsi_digest_final_send(conn, ctask, &tcp_ctask->immbuf, - &tcp_ctask->datadigest, 0); - if (rc) { - tcp_ctask->xmstate |= XMSTATE_DATA_DIGEST; + ctask->xmstate &= ~XMSTATE_DATA_DIGEST; + debug_tcp("resent data digest 0x%x\n", ctask->datadigest); + if (iscsi_digest_final_send(conn, ctask, &ctask->immbuf, + &ctask->datadigest, 0)) { + ctask->xmstate |= XMSTATE_DATA_DIGEST; debug_tcp("resent data digest 0x%x fail!\n", - tcp_ctask->datadigest); + ctask->datadigest); + return -EAGAIN; } - - return rc; + return 0; } static inline int handle_xmstate_imm_data(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int rc; - BUG_ON(!ctask->imm_count); - tcp_ctask->xmstate &= ~XMSTATE_IMM_DATA; + ctask->xmstate &= ~XMSTATE_IMM_DATA; if (conn->datadgst_en) { - iscsi_data_digest_init(tcp_conn, ctask); - tcp_ctask->immdigest = 0; + iscsi_data_digest_init(conn, ctask); + ctask->immdigest = 0; } for (;;) { - rc = iscsi_sendpage(conn, &tcp_ctask->sendbuf, - &ctask->imm_count, &tcp_ctask->sent); - if (rc) { - tcp_ctask->xmstate |= XMSTATE_IMM_DATA; + if (iscsi_sendpage(conn, &ctask->sendbuf, &ctask->imm_count, + &ctask->sent)) { + ctask->xmstate |= XMSTATE_IMM_DATA; if (conn->datadgst_en) { - crypto_digest_final(tcp_conn->data_tx_tfm, - (u8*)&tcp_ctask->immdigest); + crypto_digest_final(conn->data_tx_tfm, + (u8*)&ctask->immdigest); debug_tcp("tx imm sendpage fail 0x%x\n", - tcp_ctask->datadigest); + ctask->datadigest); } - return rc; + return -EAGAIN; } if (conn->datadgst_en) - crypto_digest_update(tcp_conn->data_tx_tfm, - &tcp_ctask->sendbuf.sg, 1); + crypto_digest_update(conn->data_tx_tfm, + &ctask->sendbuf.sg, 1); if (!ctask->imm_count) break; - iscsi_buf_init_sg(&tcp_ctask->sendbuf, - &tcp_ctask->sg[tcp_ctask->sg_count++]); + iscsi_buf_init_sg(&ctask->sendbuf, + &ctask->sg[ctask->sg_count++]); } - if (conn->datadgst_en && !(tcp_ctask->xmstate & XMSTATE_W_PAD)) { - rc = iscsi_digest_final_send(conn, ctask, &tcp_ctask->immbuf, - &tcp_ctask->immdigest, 1); - if (rc) { + if (conn->datadgst_en && !(ctask->xmstate & XMSTATE_W_PAD)) { + if (iscsi_digest_final_send(conn, ctask, &ctask->immbuf, + &ctask->immdigest, 1)) { debug_tcp("sending imm digest 0x%x fail!\n", - tcp_ctask->immdigest); - return rc; + ctask->immdigest); + return -EAGAIN; } - debug_tcp("sending imm digest 0x%x\n", tcp_ctask->immdigest); + debug_tcp("sending imm digest 0x%x\n", ctask->immdigest); } return 0; @@ -1525,81 +1803,74 @@ handle_xmstate_imm_data(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) static inline int handle_xmstate_uns_hdr(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; struct iscsi_data_task *dtask; - int rc; - tcp_ctask->xmstate |= XMSTATE_UNS_DATA; - if (tcp_ctask->xmstate & XMSTATE_UNS_INIT) { + ctask->xmstate |= XMSTATE_UNS_DATA; + if (ctask->xmstate & XMSTATE_UNS_INIT) { iscsi_unsolicit_data_init(conn, ctask); - dtask = tcp_ctask->dtask; + BUG_ON(!ctask->dtask); + dtask = ctask->dtask; if (conn->hdrdgst_en) - iscsi_hdr_digest(conn, &tcp_ctask->headbuf, + iscsi_hdr_digest(conn, &ctask->headbuf, (u8*)dtask->hdrext); - tcp_ctask->xmstate &= ~XMSTATE_UNS_INIT; + ctask->xmstate &= ~XMSTATE_UNS_INIT; } - - rc = iscsi_sendhdr(conn, &tcp_ctask->headbuf, ctask->data_count); - if (rc) { - tcp_ctask->xmstate &= ~XMSTATE_UNS_DATA; - tcp_ctask->xmstate |= XMSTATE_UNS_HDR; - return rc; + if (iscsi_sendhdr(conn, &ctask->headbuf, ctask->data_count)) { + ctask->xmstate &= ~XMSTATE_UNS_DATA; + ctask->xmstate |= XMSTATE_UNS_HDR; + return -EAGAIN; } debug_scsi("uns dout [itt 0x%x dlen %d sent %d]\n", - ctask->itt, ctask->unsol_count, tcp_ctask->sent); + ctask->itt, ctask->unsol_count, ctask->sent); return 0; } static inline int handle_xmstate_uns_data(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_data_task *dtask = tcp_ctask->dtask; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int rc; + struct iscsi_data_task *dtask = ctask->dtask; BUG_ON(!ctask->data_count); - tcp_ctask->xmstate &= ~XMSTATE_UNS_DATA; + ctask->xmstate &= ~XMSTATE_UNS_DATA; if (conn->datadgst_en) { - iscsi_data_digest_init(tcp_conn, ctask); + iscsi_data_digest_init(conn, ctask); dtask->digest = 0; } for (;;) { - int start = tcp_ctask->sent; + int start = ctask->sent; - rc = iscsi_sendpage(conn, &tcp_ctask->sendbuf, - &ctask->data_count, &tcp_ctask->sent); - if (rc) { - ctask->unsol_count -= tcp_ctask->sent - start; - tcp_ctask->xmstate |= XMSTATE_UNS_DATA; + if (iscsi_sendpage(conn, &ctask->sendbuf, &ctask->data_count, + &ctask->sent)) { + ctask->unsol_count -= ctask->sent - start; + ctask->xmstate |= XMSTATE_UNS_DATA; /* will continue with this ctask later.. */ if (conn->datadgst_en) { - crypto_digest_final(tcp_conn->data_tx_tfm, + crypto_digest_final(conn->data_tx_tfm, (u8 *)&dtask->digest); debug_tcp("tx uns data fail 0x%x\n", dtask->digest); } - return rc; + return -EAGAIN; } - BUG_ON(tcp_ctask->sent > ctask->total_length); - ctask->unsol_count -= tcp_ctask->sent - start; + BUG_ON(ctask->sent > ctask->total_length); + ctask->unsol_count -= ctask->sent - start; /* * XXX:we may run here with un-initial sendbuf. * so pass it */ - if (conn->datadgst_en && tcp_ctask->sent - start > 0) - crypto_digest_update(tcp_conn->data_tx_tfm, - &tcp_ctask->sendbuf.sg, 1); + if (conn->datadgst_en && ctask->sent - start > 0) + crypto_digest_update(conn->data_tx_tfm, + &ctask->sendbuf.sg, 1); if (!ctask->data_count) break; - iscsi_buf_init_sg(&tcp_ctask->sendbuf, - &tcp_ctask->sg[tcp_ctask->sg_count++]); + iscsi_buf_init_sg(&ctask->sendbuf, + &ctask->sg[ctask->sg_count++]); } BUG_ON(ctask->unsol_count < 0); @@ -1609,29 +1880,27 @@ handle_xmstate_uns_data(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) */ if (ctask->unsol_count) { if (conn->datadgst_en) { - rc = iscsi_digest_final_send(conn, ctask, + if (iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, - &dtask->digest, 1); - if (rc) { + &dtask->digest, 1)) { debug_tcp("send uns digest 0x%x fail\n", dtask->digest); - return rc; + return -EAGAIN; } debug_tcp("sending uns digest 0x%x, more uns\n", dtask->digest); } - tcp_ctask->xmstate |= XMSTATE_UNS_INIT; + ctask->xmstate |= XMSTATE_UNS_INIT; return 1; } - if (conn->datadgst_en && !(tcp_ctask->xmstate & XMSTATE_W_PAD)) { - rc = iscsi_digest_final_send(conn, ctask, + if (conn->datadgst_en && !(ctask->xmstate & XMSTATE_W_PAD)) { + if (iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, - &dtask->digest, 1); - if (rc) { + &dtask->digest, 1)) { debug_tcp("send last uns digest 0x%x fail\n", dtask->digest); - return rc; + return -EAGAIN; } debug_tcp("sending uns digest 0x%x\n",dtask->digest); } @@ -1643,47 +1912,43 @@ static inline int handle_xmstate_sol_data(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { struct iscsi_session *session = conn->session; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_r2t_info *r2t = tcp_ctask->r2t; - struct iscsi_data_task *dtask = &r2t->dtask; - int left, rc; + struct iscsi_r2t_info *r2t = ctask->r2t; + struct iscsi_data_task *dtask = r2t->dtask; + int left; - tcp_ctask->xmstate &= ~XMSTATE_SOL_DATA; - tcp_ctask->dtask = dtask; + ctask->xmstate &= ~XMSTATE_SOL_DATA; + ctask->dtask = dtask; if (conn->datadgst_en) { - iscsi_data_digest_init(tcp_conn, ctask); + iscsi_data_digest_init(conn, ctask); dtask->digest = 0; } solicit_again: /* - * send Data-Out within this R2T sequence. + * send Data-Out whitnin this R2T sequence. */ if (!r2t->data_count) goto data_out_done; - rc = iscsi_sendpage(conn, &r2t->sendbuf, &r2t->data_count, &r2t->sent); - if (rc) { - tcp_ctask->xmstate |= XMSTATE_SOL_DATA; + if (iscsi_sendpage(conn, &r2t->sendbuf, &r2t->data_count, &r2t->sent)) { + ctask->xmstate |= XMSTATE_SOL_DATA; /* will continue with this ctask later.. */ if (conn->datadgst_en) { - crypto_digest_final(tcp_conn->data_tx_tfm, + crypto_digest_final(conn->data_tx_tfm, (u8 *)&dtask->digest); debug_tcp("r2t data send fail 0x%x\n", dtask->digest); } - return rc; + return -EAGAIN; } BUG_ON(r2t->data_count < 0); if (conn->datadgst_en) - crypto_digest_update(tcp_conn->data_tx_tfm, &r2t->sendbuf.sg, - 1); + crypto_digest_update(conn->data_tx_tfm, &r2t->sendbuf.sg, 1); if (r2t->data_count) { BUG_ON(ctask->sc->use_sg == 0); if (!iscsi_buf_left(&r2t->sendbuf)) { - BUG_ON(tcp_ctask->bad_sg == r2t->sg); + BUG_ON(ctask->bad_sg == r2t->sg); iscsi_buf_init_sg(&r2t->sendbuf, r2t->sg); r2t->sg += 1; } @@ -1699,20 +1964,19 @@ data_out_done: left = r2t->data_length - r2t->sent; if (left) { if (conn->datadgst_en) { - rc = iscsi_digest_final_send(conn, ctask, + if (iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, - &dtask->digest, 1); - if (rc) { + &dtask->digest, 1)) { debug_tcp("send r2t data digest 0x%x" "fail\n", dtask->digest); - return rc; + return -EAGAIN; } debug_tcp("r2t data send digest 0x%x\n", dtask->digest); } iscsi_solicit_data_cont(conn, ctask, r2t, left); - tcp_ctask->xmstate |= XMSTATE_SOL_DATA; - tcp_ctask->xmstate &= ~XMSTATE_SOL_HDR; + ctask->xmstate |= XMSTATE_SOL_DATA; + ctask->xmstate &= ~XMSTATE_SOL_HDR; return 1; } @@ -1720,27 +1984,26 @@ data_out_done: * Done with this R2T. Check if there are more * outstanding R2Ts ready to be processed. */ - BUG_ON(tcp_ctask->r2t_data_count - r2t->data_length < 0); + BUG_ON(ctask->r2t_data_count - r2t->data_length < 0); if (conn->datadgst_en) { - rc = iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, - &dtask->digest, 1); - if (rc) { + if (iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, + &dtask->digest, 1)) { debug_tcp("send last r2t data digest 0x%x" "fail\n", dtask->digest); - return rc; + return -EAGAIN; } debug_tcp("r2t done dout digest 0x%x\n", dtask->digest); } - tcp_ctask->r2t_data_count -= r2t->data_length; - tcp_ctask->r2t = NULL; + ctask->r2t_data_count -= r2t->data_length; + ctask->r2t = NULL; spin_lock_bh(&session->lock); - __kfifo_put(tcp_ctask->r2tpool.queue, (void*)&r2t, sizeof(void*)); + __kfifo_put(ctask->r2tpool.queue, (void*)&r2t, sizeof(void*)); spin_unlock_bh(&session->lock); - if (__kfifo_get(tcp_ctask->r2tqueue, (void*)&r2t, sizeof(void*))) { - tcp_ctask->r2t = r2t; - tcp_ctask->xmstate |= XMSTATE_SOL_DATA; - tcp_ctask->xmstate &= ~XMSTATE_SOL_HDR; + if (__kfifo_get(ctask->r2tqueue, (void*)&r2t, sizeof(void*))) { + ctask->r2t = r2t; + ctask->xmstate |= XMSTATE_SOL_DATA; + ctask->xmstate &= ~XMSTATE_SOL_HDR; return 1; } @@ -1750,44 +2013,36 @@ data_out_done: static inline int handle_xmstate_w_pad(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct iscsi_data_task *dtask = tcp_ctask->dtask; - int sent = 0, rc; - - tcp_ctask->xmstate &= ~XMSTATE_W_PAD; - iscsi_buf_init_iov(&tcp_ctask->sendbuf, (char*)&tcp_ctask->pad, - tcp_ctask->pad_count); - rc = iscsi_sendpage(conn, &tcp_ctask->sendbuf, &tcp_ctask->pad_count, - &sent); - if (rc) { - tcp_ctask->xmstate |= XMSTATE_W_PAD; - return rc; + struct iscsi_data_task *dtask = ctask->dtask; + int sent; + + ctask->xmstate &= ~XMSTATE_W_PAD; + iscsi_buf_init_virt(&ctask->sendbuf, (char*)&ctask->pad, + ctask->pad_count); + if (iscsi_sendpage(conn, &ctask->sendbuf, &ctask->pad_count, &sent)) { + ctask->xmstate |= XMSTATE_W_PAD; + return -EAGAIN; } if (conn->datadgst_en) { - crypto_digest_update(tcp_conn->data_tx_tfm, - &tcp_ctask->sendbuf.sg, 1); + crypto_digest_update(conn->data_tx_tfm, &ctask->sendbuf.sg, 1); /* imm data? */ if (!dtask) { - rc = iscsi_digest_final_send(conn, ctask, - &tcp_ctask->immbuf, - &tcp_ctask->immdigest, 1); - if (rc) { + if (iscsi_digest_final_send(conn, ctask, &ctask->immbuf, + &ctask->immdigest, 1)) { debug_tcp("send padding digest 0x%x" - "fail!\n", tcp_ctask->immdigest); - return rc; + "fail!\n", ctask->immdigest); + return -EAGAIN; } debug_tcp("done with padding, digest 0x%x\n", - tcp_ctask->datadigest); + ctask->datadigest); } else { - rc = iscsi_digest_final_send(conn, ctask, + if (iscsi_digest_final_send(conn, ctask, &dtask->digestbuf, - &dtask->digest, 1); - if (rc) { + &dtask->digest, 1)) { debug_tcp("send padding digest 0x%x" "fail\n", dtask->digest); - return rc; + return -EAGAIN; } debug_tcp("done with padding, digest 0x%x\n", dtask->digest); @@ -1798,13 +2053,12 @@ handle_xmstate_w_pad(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) } static int -iscsi_tcp_ctask_xmit(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) +iscsi_ctask_xmit(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) { - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; int rc = 0; debug_scsi("ctask deq [cid %d xmstate %x itt 0x%x]\n", - conn->id, tcp_ctask->xmstate, ctask->itt); + conn->id, ctask->xmstate, ctask->itt); /* * serialize with TMF AbortTask @@ -1812,38 +2066,40 @@ iscsi_tcp_ctask_xmit(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) if (ctask->mtask) return rc; - if (tcp_ctask->xmstate & XMSTATE_R_HDR) - return handle_xmstate_r_hdr(conn, tcp_ctask); + if (ctask->xmstate & XMSTATE_R_HDR) { + rc = handle_xmstate_r_hdr(conn, ctask); + return rc; + } - if (tcp_ctask->xmstate & XMSTATE_W_HDR) { + if (ctask->xmstate & XMSTATE_W_HDR) { rc = handle_xmstate_w_hdr(conn, ctask); if (rc) return rc; } /* XXX: for data digest xmit recover */ - if (tcp_ctask->xmstate & XMSTATE_DATA_DIGEST) { + if (ctask->xmstate & XMSTATE_DATA_DIGEST) { rc = handle_xmstate_data_digest(conn, ctask); if (rc) return rc; } - if (tcp_ctask->xmstate & XMSTATE_IMM_DATA) { + if (ctask->xmstate & XMSTATE_IMM_DATA) { rc = handle_xmstate_imm_data(conn, ctask); if (rc) return rc; } - if (tcp_ctask->xmstate & XMSTATE_UNS_HDR) { + if (ctask->xmstate & XMSTATE_UNS_HDR) { BUG_ON(!ctask->unsol_count); - tcp_ctask->xmstate &= ~XMSTATE_UNS_HDR; + ctask->xmstate &= ~XMSTATE_UNS_HDR; unsolicit_head_again: rc = handle_xmstate_uns_hdr(conn, ctask); if (rc) return rc; } - if (tcp_ctask->xmstate & XMSTATE_UNS_DATA) { + if (ctask->xmstate & XMSTATE_UNS_DATA) { rc = handle_xmstate_uns_data(conn, ctask); if (rc == 1) goto unsolicit_head_again; @@ -1852,24 +2108,23 @@ unsolicit_head_again: goto done; } - if (tcp_ctask->xmstate & XMSTATE_SOL_HDR) { + if (ctask->xmstate & XMSTATE_SOL_HDR) { struct iscsi_r2t_info *r2t; - tcp_ctask->xmstate &= ~XMSTATE_SOL_HDR; - tcp_ctask->xmstate |= XMSTATE_SOL_DATA; - if (!tcp_ctask->r2t) - __kfifo_get(tcp_ctask->r2tqueue, (void*)&tcp_ctask->r2t, + ctask->xmstate &= ~XMSTATE_SOL_HDR; + ctask->xmstate |= XMSTATE_SOL_DATA; + if (!ctask->r2t) + __kfifo_get(ctask->r2tqueue, (void*)&ctask->r2t, sizeof(void*)); solicit_head_again: - r2t = tcp_ctask->r2t; + r2t = ctask->r2t; if (conn->hdrdgst_en) iscsi_hdr_digest(conn, &r2t->headbuf, - (u8*)r2t->dtask.hdrext); - rc = iscsi_sendhdr(conn, &r2t->headbuf, r2t->data_count); - if (rc) { - tcp_ctask->xmstate &= ~XMSTATE_SOL_DATA; - tcp_ctask->xmstate |= XMSTATE_SOL_HDR; - return rc; + (u8*)r2t->dtask->hdrext); + if (iscsi_sendhdr(conn, &r2t->headbuf, r2t->data_count)) { + ctask->xmstate &= ~XMSTATE_SOL_DATA; + ctask->xmstate |= XMSTATE_SOL_HDR; + return -EAGAIN; } debug_scsi("sol dout [dsn %d itt 0x%x dlen %d sent %d]\n", @@ -1877,7 +2132,7 @@ solicit_head_again: r2t->sent); } - if (tcp_ctask->xmstate & XMSTATE_SOL_DATA) { + if (ctask->xmstate & XMSTATE_SOL_DATA) { rc = handle_xmstate_sol_data(conn, ctask); if (rc == 1) goto solicit_head_again; @@ -1890,432 +2145,1100 @@ done: * Last thing to check is whether we need to send write * padding. Note that we check for xmstate equality, not just the bit. */ - if (tcp_ctask->xmstate == XMSTATE_W_PAD) + if (ctask->xmstate == XMSTATE_W_PAD) rc = handle_xmstate_w_pad(conn, ctask); return rc; } -static struct iscsi_cls_conn * -iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) +/** + * iscsi_data_xmit - xmit any command into the scheduled connection + * @conn: iscsi connection + * + * Notes: + * The function can return -EAGAIN in which case the caller must + * re-schedule it again later or recover. '0' return code means + * successful xmit. + **/ +static int +iscsi_data_xmit(struct iscsi_conn *conn) { - struct iscsi_conn *conn; - struct iscsi_cls_conn *cls_conn; - struct iscsi_tcp_conn *tcp_conn; + if (unlikely(conn->suspend_tx)) { + debug_tcp("conn %d Tx suspended!\n", conn->id); + return 0; + } - cls_conn = iscsi_conn_setup(cls_session, conn_idx); - if (!cls_conn) - return NULL; - conn = cls_conn->dd_data; /* - * due to strange issues with iser these are not set - * in iscsi_conn_setup + * Transmit in the following order: + * + * 1) un-finished xmit (ctask or mtask) + * 2) immediate control PDUs + * 3) write data + * 4) SCSI commands + * 5) non-immediate control PDUs + * + * No need to lock around __kfifo_get as long as + * there's one producer and one consumer. */ - conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; - tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); - if (!tcp_conn) - goto tcp_conn_alloc_fail; + BUG_ON(conn->ctask && conn->mtask); - conn->dd_data = tcp_conn; - tcp_conn->iscsi_conn = conn; - tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; - /* initial operational parameters */ - tcp_conn->hdr_size = sizeof(struct iscsi_hdr); + if (conn->ctask) { + if (iscsi_ctask_xmit(conn, conn->ctask)) + goto again; + /* done with this in-progress ctask */ + conn->ctask = NULL; + } + if (conn->mtask) { + if (iscsi_mtask_xmit(conn, conn->mtask)) + goto again; + /* done with this in-progress mtask */ + conn->mtask = NULL; + } - return cls_conn; + /* process immediate first */ + if (unlikely(__kfifo_len(conn->immqueue))) { + struct iscsi_session *session = conn->session; + while (__kfifo_get(conn->immqueue, (void*)&conn->mtask, + sizeof(void*))) { + if (iscsi_mtask_xmit(conn, conn->mtask)) + goto again; + + if (conn->mtask->hdr.itt == + cpu_to_be32(ISCSI_RESERVED_TAG)) { + spin_lock_bh(&session->lock); + __kfifo_put(session->mgmtpool.queue, + (void*)&conn->mtask, sizeof(void*)); + spin_unlock_bh(&session->lock); + } + } + /* done with this mtask */ + conn->mtask = NULL; + } + + /* process write queue */ + while (__kfifo_get(conn->writequeue, (void*)&conn->ctask, + sizeof(void*))) { + if (iscsi_ctask_xmit(conn, conn->ctask)) + goto again; + } + + /* process command queue */ + while (__kfifo_get(conn->xmitqueue, (void*)&conn->ctask, + sizeof(void*))) { + if (iscsi_ctask_xmit(conn, conn->ctask)) + goto again; + } + /* done with this ctask */ + conn->ctask = NULL; + + /* process the rest control plane PDUs, if any */ + if (unlikely(__kfifo_len(conn->mgmtqueue))) { + struct iscsi_session *session = conn->session; -tcp_conn_alloc_fail: - iscsi_conn_teardown(cls_conn); - return NULL; -} + while (__kfifo_get(conn->mgmtqueue, (void*)&conn->mtask, + sizeof(void*))) { + if (iscsi_mtask_xmit(conn, conn->mtask)) + goto again; -static void -iscsi_tcp_release_conn(struct iscsi_conn *conn) -{ - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; + if (conn->mtask->hdr.itt == + cpu_to_be32(ISCSI_RESERVED_TAG)) { + spin_lock_bh(&session->lock); + __kfifo_put(session->mgmtpool.queue, + (void*)&conn->mtask, + sizeof(void*)); + spin_unlock_bh(&session->lock); + } + } + /* done with this mtask */ + conn->mtask = NULL; + } - if (!tcp_conn->sock) - return; + return 0; - sock_hold(tcp_conn->sock->sk); - iscsi_conn_restore_callbacks(tcp_conn); - sock_put(tcp_conn->sock->sk); +again: + if (unlikely(conn->suspend_tx)) + return 0; - sock_release(tcp_conn->sock); - tcp_conn->sock = NULL; - conn->recv_lock = NULL; + return -EAGAIN; } static void -iscsi_tcp_conn_destroy(struct iscsi_cls_conn *cls_conn) +iscsi_xmitworker(void *data) { - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int digest = 0; + struct iscsi_conn *conn = data; - if (conn->hdrdgst_en || conn->datadgst_en) - digest = 1; + /* + * serialize Xmit worker on a per-connection basis. + */ + mutex_lock(&conn->xmitmutex); + if (iscsi_data_xmit(conn)) + scsi_queue_work(conn->session->host, &conn->xmitwork); + mutex_unlock(&conn->xmitmutex); +} - iscsi_tcp_release_conn(conn); - iscsi_conn_teardown(cls_conn); +#define FAILURE_BAD_HOST 1 +#define FAILURE_SESSION_FAILED 2 +#define FAILURE_SESSION_FREED 3 +#define FAILURE_WINDOW_CLOSED 4 +#define FAILURE_SESSION_TERMINATE 5 - /* now free tcp_conn */ - if (digest) { - if (tcp_conn->tx_tfm) - crypto_free_tfm(tcp_conn->tx_tfm); - if (tcp_conn->rx_tfm) - crypto_free_tfm(tcp_conn->rx_tfm); - if (tcp_conn->data_tx_tfm) - crypto_free_tfm(tcp_conn->data_tx_tfm); - if (tcp_conn->data_rx_tfm) - crypto_free_tfm(tcp_conn->data_rx_tfm); - } +static int +iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) +{ + struct Scsi_Host *host; + int reason = 0; + struct iscsi_session *session; + struct iscsi_conn *conn = NULL; + struct iscsi_cmd_task *ctask = NULL; - kfree(tcp_conn); -} + sc->scsi_done = done; + sc->result = 0; -static void -iscsi_tcp_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) -{ - struct iscsi_conn *conn = cls_conn->dd_data; + host = sc->device->host; + session = iscsi_hostdata(host->hostdata); + BUG_ON(host != session->host); - iscsi_conn_stop(cls_conn, flag); - iscsi_tcp_release_conn(conn); -} + spin_lock(&session->lock); -static int -iscsi_tcp_conn_bind(struct iscsi_cls_session *cls_session, - struct iscsi_cls_conn *cls_conn, uint64_t transport_eph, - int is_leading) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct sock *sk; - struct socket *sock; - int err; + if (session->state != ISCSI_STATE_LOGGED_IN) { + if (session->state == ISCSI_STATE_FAILED) { + reason = FAILURE_SESSION_FAILED; + goto reject; + } else if (session->state == ISCSI_STATE_TERMINATE) { + reason = FAILURE_SESSION_TERMINATE; + goto fault; + } + reason = FAILURE_SESSION_FREED; + goto fault; + } - /* lookup for existing socket */ - sock = sockfd_lookup((int)transport_eph, &err); - if (!sock) { - printk(KERN_ERR "iscsi_tcp: sockfd_lookup failed %d\n", err); - return -EEXIST; + /* + * Check for iSCSI window and take care of CmdSN wrap-around + */ + if ((int)(session->max_cmdsn - session->cmdsn) < 0) { + reason = FAILURE_WINDOW_CLOSED; + goto reject; } - err = iscsi_conn_bind(cls_session, cls_conn, is_leading); - if (err) - return err; + conn = session->leadconn; - /* bind iSCSI connection and socket */ - tcp_conn->sock = sock; + __kfifo_get(session->cmdpool.queue, (void*)&ctask, sizeof(void*)); + BUG_ON(ctask->sc); - /* setup Socket parameters */ - sk = sock->sk; - sk->sk_reuse = 1; - sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ - sk->sk_allocation = GFP_ATOMIC; + sc->SCp.phase = session->age; + sc->SCp.ptr = (char*)ctask; + iscsi_cmd_init(conn, ctask, sc); - /* FIXME: disable Nagle's algorithm */ + __kfifo_put(conn->xmitqueue, (void*)&ctask, sizeof(void*)); + debug_scsi( + "ctask enq [%s cid %d sc %lx itt 0x%x len %d cmdsn %d win %d]\n", + sc->sc_data_direction == DMA_TO_DEVICE ? "write" : "read", + conn->id, (long)sc, ctask->itt, sc->request_bufflen, + session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1); + spin_unlock(&session->lock); - /* - * Intercept TCP callbacks for sendfile like receive - * processing. - */ - conn->recv_lock = &sk->sk_callback_lock; - iscsi_conn_set_callbacks(conn); - tcp_conn->sendpage = tcp_conn->sock->ops->sendpage; - /* - * set receive state machine into initial state - */ - tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; + scsi_queue_work(host, &conn->xmitwork); + return 0; + +reject: + spin_unlock(&session->lock); + debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason); + return SCSI_MLQUEUE_HOST_BUSY; +fault: + spin_unlock(&session->lock); + printk(KERN_ERR "iscsi_tcp: cmd 0x%x is not queued (%d)\n", + sc->cmnd[0], reason); + sc->sense_buffer[0] = 0x70; + sc->sense_buffer[2] = NOT_READY; + sc->sense_buffer[7] = 0x6; + sc->sense_buffer[12] = 0x08; + sc->sense_buffer[13] = 0x00; + sc->result = (DID_NO_CONNECT << 16); + sc->resid = sc->request_bufflen; + sc->scsi_done(sc); return 0; } -/* called with host lock */ -static void -iscsi_tcp_mgmt_init(struct iscsi_conn *conn, struct iscsi_mgmt_task *mtask, - char *data, uint32_t data_size) +static int +iscsi_change_queue_depth(struct scsi_device *sdev, int depth) { - struct iscsi_tcp_mgmt_task *tcp_mtask = mtask->dd_data; - - iscsi_buf_init_iov(&tcp_mtask->headbuf, (char*)mtask->hdr, - sizeof(struct iscsi_hdr)); - tcp_mtask->xmstate = XMSTATE_IMM_HDR; - tcp_mtask->sent = 0; - - if (mtask->data_count) - iscsi_buf_init_iov(&tcp_mtask->sendbuf, (char*)mtask->data, - mtask->data_count); + if (depth > ISCSI_MAX_CMD_PER_LUN) + depth = ISCSI_MAX_CMD_PER_LUN; + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); + return sdev->queue_depth; } static int -iscsi_r2tpool_alloc(struct iscsi_session *session) +iscsi_pool_init(struct iscsi_queue *q, int max, void ***items, int item_size) { int i; - int cmd_i; - - /* - * initialize per-task: R2T pool and xmit queue - */ - for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) { - struct iscsi_cmd_task *ctask = session->cmds[cmd_i]; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - /* - * pre-allocated x4 as much r2ts to handle race when - * target acks DataOut faster than we data_xmit() queues - * could replenish r2tqueue. - */ + *items = kmalloc(max * sizeof(void*), GFP_KERNEL); + if (*items == NULL) + return -ENOMEM; - /* R2T pool */ - if (iscsi_pool_init(&tcp_ctask->r2tpool, session->max_r2t * 4, - (void***)&tcp_ctask->r2ts, - sizeof(struct iscsi_r2t_info))) { - goto r2t_alloc_fail; - } + q->max = max; + q->pool = kmalloc(max * sizeof(void*), GFP_KERNEL); + if (q->pool == NULL) { + kfree(*items); + return -ENOMEM; + } - /* R2T xmit queue */ - tcp_ctask->r2tqueue = kfifo_alloc( - session->max_r2t * 4 * sizeof(void*), GFP_KERNEL, NULL); - if (tcp_ctask->r2tqueue == ERR_PTR(-ENOMEM)) { - iscsi_pool_free(&tcp_ctask->r2tpool, - (void**)tcp_ctask->r2ts); - goto r2t_alloc_fail; - } + q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), + GFP_KERNEL, NULL); + if (q->queue == ERR_PTR(-ENOMEM)) { + kfree(q->pool); + kfree(*items); + return -ENOMEM; } - return 0; + for (i = 0; i < max; i++) { + q->pool[i] = kmalloc(item_size, GFP_KERNEL); + if (q->pool[i] == NULL) { + int j; -r2t_alloc_fail: - for (i = 0; i < cmd_i; i++) { - struct iscsi_cmd_task *ctask = session->cmds[i]; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; + for (j = 0; j < i; j++) + kfree(q->pool[j]); - kfifo_free(tcp_ctask->r2tqueue); - iscsi_pool_free(&tcp_ctask->r2tpool, - (void**)tcp_ctask->r2ts); + kfifo_free(q->queue); + kfree(q->pool); + kfree(*items); + return -ENOMEM; + } + memset(q->pool[i], 0, item_size); + (*items)[i] = q->pool[i]; + __kfifo_put(q->queue, (void*)&q->pool[i], sizeof(void*)); } - return -ENOMEM; + return 0; } static void -iscsi_r2tpool_free(struct iscsi_session *session) +iscsi_pool_free(struct iscsi_queue *q, void **items) { int i; - for (i = 0; i < session->cmds_max; i++) { - struct iscsi_cmd_task *ctask = session->cmds[i]; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; - - kfifo_free(tcp_ctask->r2tqueue); - iscsi_pool_free(&tcp_ctask->r2tpool, - (void**)tcp_ctask->r2ts); - } + for (i = 0; i < q->max; i++) + kfree(items[i]); + kfree(q->pool); + kfree(items); } -static int -iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param, - char *buf, int buflen) +static struct iscsi_cls_conn * +iscsi_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) { - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_session *session = conn->session; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - int value; + struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); + struct iscsi_session *session = iscsi_hostdata(shost->hostdata); + struct iscsi_conn *conn; + struct iscsi_cls_conn *cls_conn; - switch(param) { - case ISCSI_PARAM_HDRDGST_EN: - iscsi_set_param(cls_conn, param, buf, buflen); - tcp_conn->hdr_size = sizeof(struct iscsi_hdr); - if (conn->hdrdgst_en) { - tcp_conn->hdr_size += sizeof(__u32); - if (!tcp_conn->tx_tfm) - tcp_conn->tx_tfm = crypto_alloc_tfm("crc32c", - 0); - if (!tcp_conn->tx_tfm) - return -ENOMEM; - if (!tcp_conn->rx_tfm) - tcp_conn->rx_tfm = crypto_alloc_tfm("crc32c", - 0); - if (!tcp_conn->rx_tfm) { - crypto_free_tfm(tcp_conn->tx_tfm); - return -ENOMEM; - } - } else { - if (tcp_conn->tx_tfm) - crypto_free_tfm(tcp_conn->tx_tfm); - if (tcp_conn->rx_tfm) - crypto_free_tfm(tcp_conn->rx_tfm); - } - break; - case ISCSI_PARAM_DATADGST_EN: - iscsi_set_param(cls_conn, param, buf, buflen); - if (conn->datadgst_en) { - if (!tcp_conn->data_tx_tfm) - tcp_conn->data_tx_tfm = - crypto_alloc_tfm("crc32c", 0); - if (!tcp_conn->data_tx_tfm) - return -ENOMEM; - if (!tcp_conn->data_rx_tfm) - tcp_conn->data_rx_tfm = - crypto_alloc_tfm("crc32c", 0); - if (!tcp_conn->data_rx_tfm) { - crypto_free_tfm(tcp_conn->data_tx_tfm); - return -ENOMEM; - } - } else { - if (tcp_conn->data_tx_tfm) - crypto_free_tfm(tcp_conn->data_tx_tfm); - if (tcp_conn->data_rx_tfm) - crypto_free_tfm(tcp_conn->data_rx_tfm); - } - tcp_conn->sendpage = conn->datadgst_en ? - sock_no_sendpage : tcp_conn->sock->ops->sendpage; - break; - case ISCSI_PARAM_MAX_R2T: - sscanf(buf, "%d", &value); - if (session->max_r2t == roundup_pow_of_two(value)) - break; - iscsi_r2tpool_free(session); - iscsi_set_param(cls_conn, param, buf, buflen); - if (session->max_r2t & (session->max_r2t - 1)) - session->max_r2t = roundup_pow_of_two(session->max_r2t); - if (iscsi_r2tpool_alloc(session)) - return -ENOMEM; - break; - default: - return iscsi_set_param(cls_conn, param, buf, buflen); - } + cls_conn = iscsi_create_conn(cls_session, conn_idx); + if (!cls_conn) + return NULL; + conn = cls_conn->dd_data; + memset(conn, 0, sizeof(*conn)); - return 0; -} + conn->cls_conn = cls_conn; + conn->c_stage = ISCSI_CONN_INITIAL_STAGE; + conn->in_progress = IN_PROGRESS_WAIT_HEADER; + conn->id = conn_idx; + conn->exp_statsn = 0; + conn->tmabort_state = TMABORT_INITIAL; -static int -iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - struct inet_sock *inet; - struct ipv6_pinfo *np; - struct sock *sk; - int len; + /* initial operational parameters */ + conn->hdr_size = sizeof(struct iscsi_hdr); + conn->data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; + conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; - switch(param) { - case ISCSI_PARAM_CONN_PORT: - mutex_lock(&conn->xmitmutex); - if (!tcp_conn->sock) { - mutex_unlock(&conn->xmitmutex); - return -EINVAL; - } + /* initialize general xmit PDU commands queue */ + conn->xmitqueue = kfifo_alloc(session->cmds_max * sizeof(void*), + GFP_KERNEL, NULL); + if (conn->xmitqueue == ERR_PTR(-ENOMEM)) + goto xmitqueue_alloc_fail; - inet = inet_sk(tcp_conn->sock->sk); - len = sprintf(buf, "%hu\n", be16_to_cpu(inet->dport)); - mutex_unlock(&conn->xmitmutex); - break; - case ISCSI_PARAM_CONN_ADDRESS: - mutex_lock(&conn->xmitmutex); - if (!tcp_conn->sock) { - mutex_unlock(&conn->xmitmutex); - return -EINVAL; - } + /* initialize write response PDU commands queue */ + conn->writequeue = kfifo_alloc(session->cmds_max * sizeof(void*), + GFP_KERNEL, NULL); + if (conn->writequeue == ERR_PTR(-ENOMEM)) + goto writequeue_alloc_fail; - sk = tcp_conn->sock->sk; - if (sk->sk_family == PF_INET) { - inet = inet_sk(sk); - len = sprintf(buf, "%u.%u.%u.%u\n", - NIPQUAD(inet->daddr)); - } else { - np = inet6_sk(sk); - len = sprintf(buf, - "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", - NIP6(np->daddr)); - } - mutex_unlock(&conn->xmitmutex); - break; - default: - return iscsi_conn_get_param(cls_conn, param, buf); + /* initialize general immediate & non-immediate PDU commands queue */ + conn->immqueue = kfifo_alloc(session->mgmtpool_max * sizeof(void*), + GFP_KERNEL, NULL); + if (conn->immqueue == ERR_PTR(-ENOMEM)) + goto immqueue_alloc_fail; + + conn->mgmtqueue = kfifo_alloc(session->mgmtpool_max * sizeof(void*), + GFP_KERNEL, NULL); + if (conn->mgmtqueue == ERR_PTR(-ENOMEM)) + goto mgmtqueue_alloc_fail; + + INIT_WORK(&conn->xmitwork, iscsi_xmitworker, conn); + + /* allocate login_mtask used for the login/text sequences */ + spin_lock_bh(&session->lock); + if (!__kfifo_get(session->mgmtpool.queue, + (void*)&conn->login_mtask, + sizeof(void*))) { + spin_unlock_bh(&session->lock); + goto login_mtask_alloc_fail; } + spin_unlock_bh(&session->lock); - return len; + /* allocate initial PDU receive place holder */ + if (conn->data_size <= PAGE_SIZE) + conn->data = kmalloc(conn->data_size, GFP_KERNEL); + else + conn->data = (void*)__get_free_pages(GFP_KERNEL, + get_order(conn->data_size)); + if (!conn->data) + goto max_recv_dlenght_alloc_fail; + + init_timer(&conn->tmabort_timer); + mutex_init(&conn->xmitmutex); + init_waitqueue_head(&conn->ehwait); + + return cls_conn; + +max_recv_dlenght_alloc_fail: + spin_lock_bh(&session->lock); + __kfifo_put(session->mgmtpool.queue, (void*)&conn->login_mtask, + sizeof(void*)); + spin_unlock_bh(&session->lock); +login_mtask_alloc_fail: + kfifo_free(conn->mgmtqueue); +mgmtqueue_alloc_fail: + kfifo_free(conn->immqueue); +immqueue_alloc_fail: + kfifo_free(conn->writequeue); +writequeue_alloc_fail: + kfifo_free(conn->xmitqueue); +xmitqueue_alloc_fail: + iscsi_destroy_conn(cls_conn); + return NULL; } static void -iscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats) +iscsi_conn_destroy(struct iscsi_cls_conn *cls_conn) { struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_tcp_conn *tcp_conn = conn->dd_data; - - stats->txdata_octets = conn->txdata_octets; - stats->rxdata_octets = conn->rxdata_octets; - stats->scsicmd_pdus = conn->scsicmd_pdus_cnt; - stats->dataout_pdus = conn->dataout_pdus_cnt; - stats->scsirsp_pdus = conn->scsirsp_pdus_cnt; - stats->datain_pdus = conn->datain_pdus_cnt; - stats->r2t_pdus = conn->r2t_pdus_cnt; - stats->tmfcmd_pdus = conn->tmfcmd_pdus_cnt; - stats->tmfrsp_pdus = conn->tmfrsp_pdus_cnt; - stats->custom_length = 3; - strcpy(stats->custom[0].desc, "tx_sendpage_failures"); - stats->custom[0].value = tcp_conn->sendpage_failures_cnt; - strcpy(stats->custom[1].desc, "rx_discontiguous_hdr"); - stats->custom[1].value = tcp_conn->discontiguous_hdr_cnt; - strcpy(stats->custom[2].desc, "eh_abort_cnt"); - stats->custom[2].value = conn->eh_abort_cnt; -} + struct iscsi_session *session = conn->session; + unsigned long flags; -static struct iscsi_cls_session * -iscsi_tcp_session_create(struct iscsi_transport *iscsit, - struct scsi_transport_template *scsit, - uint32_t initial_cmdsn, uint32_t *hostno) -{ - struct iscsi_cls_session *cls_session; - struct iscsi_session *session; - uint32_t hn; - int cmd_i; + mutex_lock(&conn->xmitmutex); + set_bit(SUSPEND_BIT, &conn->suspend_tx); + if (conn->c_stage == ISCSI_CONN_INITIAL_STAGE && conn->sock) { + struct sock *sk = conn->sock->sk; - cls_session = iscsi_session_setup(iscsit, scsit, - sizeof(struct iscsi_tcp_cmd_task), - sizeof(struct iscsi_tcp_mgmt_task), - initial_cmdsn, &hn); - if (!cls_session) - return NULL; - *hostno = hn; + /* + * conn_start() has never been called! + * need to cleanup the socket. + */ + write_lock_bh(&sk->sk_callback_lock); + set_bit(SUSPEND_BIT, &conn->suspend_rx); + write_unlock_bh(&sk->sk_callback_lock); - session = class_to_transport_session(cls_session); - for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) { - struct iscsi_cmd_task *ctask = session->cmds[cmd_i]; - struct iscsi_tcp_cmd_task *tcp_ctask = ctask->dd_data; + sock_hold(conn->sock->sk); + iscsi_conn_restore_callbacks(conn); + sock_put(conn->sock->sk); + sock_release(conn->sock); + conn->sock = NULL; + } - ctask->hdr = &tcp_ctask->hdr; + spin_lock_bh(&session->lock); + conn->c_stage = ISCSI_CONN_CLEANUP_WAIT; + if (session->leadconn == conn) { + /* + * leading connection? then give up on recovery. + */ + session->state = ISCSI_STATE_TERMINATE; + wake_up(&conn->ehwait); } + spin_unlock_bh(&session->lock); - for (cmd_i = 0; cmd_i < session->mgmtpool_max; cmd_i++) { - struct iscsi_mgmt_task *mtask = session->mgmt_cmds[cmd_i]; - struct iscsi_tcp_mgmt_task *tcp_mtask = mtask->dd_data; + mutex_unlock(&conn->xmitmutex); + + /* + * Block until all in-progress commands for this connection + * time out or fail. + */ + for (;;) { + spin_lock_irqsave(session->host->host_lock, flags); + if (!session->host->host_busy) { /* OK for ERL == 0 */ + spin_unlock_irqrestore(session->host->host_lock, flags); + break; + } + spin_unlock_irqrestore(session->host->host_lock, flags); + msleep_interruptible(500); + printk("conn_destroy(): host_busy %d host_failed %d\n", + session->host->host_busy, session->host->host_failed); + /* + * force eh_abort() to unblock + */ + wake_up(&conn->ehwait); + } - mtask->hdr = &tcp_mtask->hdr; + /* now free crypto */ + if (conn->hdrdgst_en || conn->datadgst_en) { + if (conn->tx_tfm) + crypto_free_tfm(conn->tx_tfm); + if (conn->rx_tfm) + crypto_free_tfm(conn->rx_tfm); + if (conn->data_tx_tfm) + crypto_free_tfm(conn->data_tx_tfm); + if (conn->data_rx_tfm) + crypto_free_tfm(conn->data_rx_tfm); } - if (iscsi_r2tpool_alloc(class_to_transport_session(cls_session))) - goto r2tpool_alloc_fail; + /* free conn->data, size = MaxRecvDataSegmentLength */ + if (conn->data_size <= PAGE_SIZE) + kfree(conn->data); + else + free_pages((unsigned long)conn->data, + get_order(conn->data_size)); - return cls_session; + spin_lock_bh(&session->lock); + __kfifo_put(session->mgmtpool.queue, (void*)&conn->login_mtask, + sizeof(void*)); + list_del(&conn->item); + if (list_empty(&session->connections)) + session->leadconn = NULL; + if (session->leadconn && session->leadconn == conn) + session->leadconn = container_of(session->connections.next, + struct iscsi_conn, item); + + if (session->leadconn == NULL) + /* none connections exits.. reset sequencing */ + session->cmdsn = session->max_cmdsn = session->exp_cmdsn = 1; + spin_unlock_bh(&session->lock); -r2tpool_alloc_fail: - iscsi_session_teardown(cls_session); - return NULL; + kfifo_free(conn->xmitqueue); + kfifo_free(conn->writequeue); + kfifo_free(conn->immqueue); + kfifo_free(conn->mgmtqueue); + + iscsi_destroy_conn(cls_conn); } -static void iscsi_tcp_session_destroy(struct iscsi_cls_session *cls_session) +static int +iscsi_conn_bind(struct iscsi_cls_session *cls_session, + struct iscsi_cls_conn *cls_conn, uint32_t transport_fd, + int is_leading) { - iscsi_r2tpool_free(class_to_transport_session(cls_session)); - iscsi_session_teardown(cls_session); -} + struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); + struct iscsi_session *session = iscsi_hostdata(shost->hostdata); + struct iscsi_conn *tmp = ERR_PTR(-EEXIST), *conn = cls_conn->dd_data; + struct sock *sk; + struct socket *sock; + int err; -static struct scsi_host_template iscsi_sht = { - .name = "iSCSI Initiator over TCP/IP", - .queuecommand = iscsi_queuecommand, + /* lookup for existing socket */ + sock = sockfd_lookup(transport_fd, &err); + if (!sock) { + printk(KERN_ERR "iscsi_tcp: sockfd_lookup failed %d\n", err); + return -EEXIST; + } + + /* lookup for existing connection */ + spin_lock_bh(&session->lock); + list_for_each_entry(tmp, &session->connections, item) { + if (tmp == conn) { + if (conn->c_stage != ISCSI_CONN_STOPPED || + conn->stop_stage == STOP_CONN_TERM) { + printk(KERN_ERR "iscsi_tcp: can't bind " + "non-stopped connection (%d:%d)\n", + conn->c_stage, conn->stop_stage); + spin_unlock_bh(&session->lock); + return -EIO; + } + break; + } + } + if (tmp != conn) { + /* bind new iSCSI connection to session */ + conn->session = session; + + list_add(&conn->item, &session->connections); + } + spin_unlock_bh(&session->lock); + + if (conn->stop_stage != STOP_CONN_SUSPEND) { + /* bind iSCSI connection and socket */ + conn->sock = sock; + + /* setup Socket parameters */ + sk = sock->sk; + sk->sk_reuse = 1; + sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ + sk->sk_allocation = GFP_ATOMIC; + + /* FIXME: disable Nagle's algorithm */ + + /* + * Intercept TCP callbacks for sendfile like receive + * processing. + */ + iscsi_conn_set_callbacks(conn); + + conn->sendpage = conn->sock->ops->sendpage; + + /* + * set receive state machine into initial state + */ + conn->in_progress = IN_PROGRESS_WAIT_HEADER; + } + + if (is_leading) + session->leadconn = conn; + + /* + * Unblock xmitworker(), Login Phase will pass through. + */ + clear_bit(SUSPEND_BIT, &conn->suspend_rx); + clear_bit(SUSPEND_BIT, &conn->suspend_tx); + + return 0; +} + +static int +iscsi_conn_start(struct iscsi_cls_conn *cls_conn) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + struct iscsi_session *session = conn->session; + struct sock *sk; + + /* FF phase warming up... */ + + if (session == NULL) { + printk(KERN_ERR "iscsi_tcp: can't start unbound connection\n"); + return -EPERM; + } + + sk = conn->sock->sk; + + write_lock_bh(&sk->sk_callback_lock); + spin_lock_bh(&session->lock); + conn->c_stage = ISCSI_CONN_STARTED; + session->state = ISCSI_STATE_LOGGED_IN; + + switch(conn->stop_stage) { + case STOP_CONN_RECOVER: + /* + * unblock eh_abort() if it is blocked. re-try all + * commands after successful recovery + */ + session->conn_cnt++; + conn->stop_stage = 0; + conn->tmabort_state = TMABORT_INITIAL; + session->age++; + wake_up(&conn->ehwait); + break; + case STOP_CONN_TERM: + session->conn_cnt++; + conn->stop_stage = 0; + break; + case STOP_CONN_SUSPEND: + conn->stop_stage = 0; + clear_bit(SUSPEND_BIT, &conn->suspend_rx); + clear_bit(SUSPEND_BIT, &conn->suspend_tx); + break; + default: + break; + } + spin_unlock_bh(&session->lock); + write_unlock_bh(&sk->sk_callback_lock); + + return 0; +} + +static void +iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + struct iscsi_session *session = conn->session; + struct sock *sk; + unsigned long flags; + + BUG_ON(!conn->sock); + sk = conn->sock->sk; + write_lock_bh(&sk->sk_callback_lock); + set_bit(SUSPEND_BIT, &conn->suspend_rx); + write_unlock_bh(&sk->sk_callback_lock); + + mutex_lock(&conn->xmitmutex); + + spin_lock_irqsave(session->host->host_lock, flags); + spin_lock(&session->lock); + conn->stop_stage = flag; + conn->c_stage = ISCSI_CONN_STOPPED; + set_bit(SUSPEND_BIT, &conn->suspend_tx); + + if (flag != STOP_CONN_SUSPEND) + session->conn_cnt--; + + if (session->conn_cnt == 0 || session->leadconn == conn) + session->state = ISCSI_STATE_FAILED; + + spin_unlock(&session->lock); + spin_unlock_irqrestore(session->host->host_lock, flags); + + if (flag == STOP_CONN_TERM || flag == STOP_CONN_RECOVER) { + struct iscsi_cmd_task *ctask; + struct iscsi_mgmt_task *mtask; + + /* + * Socket must go now. + */ + sock_hold(conn->sock->sk); + iscsi_conn_restore_callbacks(conn); + sock_put(conn->sock->sk); + + /* + * flush xmit queues. + */ + spin_lock_bh(&session->lock); + while (__kfifo_get(conn->writequeue, (void*)&ctask, + sizeof(void*)) || + __kfifo_get(conn->xmitqueue, (void*)&ctask, + sizeof(void*))) { + struct iscsi_r2t_info *r2t; + + /* + * flush ctask's r2t queues + */ + while (__kfifo_get(ctask->r2tqueue, (void*)&r2t, + sizeof(void*))) + __kfifo_put(ctask->r2tpool.queue, (void*)&r2t, + sizeof(void*)); + + spin_unlock_bh(&session->lock); + local_bh_disable(); + iscsi_ctask_cleanup(conn, ctask); + local_bh_enable(); + spin_lock_bh(&session->lock); + } + conn->ctask = NULL; + while (__kfifo_get(conn->immqueue, (void*)&mtask, + sizeof(void*)) || + __kfifo_get(conn->mgmtqueue, (void*)&mtask, + sizeof(void*))) { + __kfifo_put(session->mgmtpool.queue, + (void*)&mtask, sizeof(void*)); + } + conn->mtask = NULL; + spin_unlock_bh(&session->lock); + + /* + * release socket only after we stopped data_xmit() + * activity and flushed all outstandings + */ + sock_release(conn->sock); + conn->sock = NULL; + + /* + * for connection level recovery we should not calculate + * header digest. conn->hdr_size used for optimization + * in hdr_extract() and will be re-negotiated at + * set_param() time. + */ + if (flag == STOP_CONN_RECOVER) { + conn->hdr_size = sizeof(struct iscsi_hdr); + conn->hdrdgst_en = 0; + conn->datadgst_en = 0; + } + } + mutex_unlock(&conn->xmitmutex); +} + +static int +iscsi_conn_send_generic(struct iscsi_conn *conn, struct iscsi_hdr *hdr, + char *data, uint32_t data_size) +{ + struct iscsi_session *session = conn->session; + struct iscsi_nopout *nop = (struct iscsi_nopout *)hdr; + struct iscsi_mgmt_task *mtask; + + spin_lock_bh(&session->lock); + if (session->state == ISCSI_STATE_TERMINATE) { + spin_unlock_bh(&session->lock); + return -EPERM; + } + if (hdr->opcode == (ISCSI_OP_LOGIN | ISCSI_OP_IMMEDIATE) || + hdr->opcode == (ISCSI_OP_TEXT | ISCSI_OP_IMMEDIATE)) + /* + * Login and Text are sent serially, in + * request-followed-by-response sequence. + * Same mtask can be used. Same ITT must be used. + * Note that login_mtask is preallocated at conn_create(). + */ + mtask = conn->login_mtask; + else { + BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); + BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); + + if (!__kfifo_get(session->mgmtpool.queue, + (void*)&mtask, sizeof(void*))) { + spin_unlock_bh(&session->lock); + return -ENOSPC; + } + } + + /* + * pre-format CmdSN and ExpStatSN for outgoing PDU. + */ + if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) { + hdr->itt = mtask->itt | (conn->id << CID_SHIFT) | + (session->age << AGE_SHIFT); + nop->cmdsn = cpu_to_be32(session->cmdsn); + if (conn->c_stage == ISCSI_CONN_STARTED && + !(hdr->opcode & ISCSI_OP_IMMEDIATE)) + session->cmdsn++; + } else + /* do not advance CmdSN */ + nop->cmdsn = cpu_to_be32(session->cmdsn); + + nop->exp_statsn = cpu_to_be32(conn->exp_statsn); + + memcpy(&mtask->hdr, hdr, sizeof(struct iscsi_hdr)); + + iscsi_buf_init_virt(&mtask->headbuf, (char*)&mtask->hdr, + sizeof(struct iscsi_hdr)); + + spin_unlock_bh(&session->lock); + + if (data_size) { + memcpy(mtask->data, data, data_size); + mtask->data_count = data_size; + } else + mtask->data_count = 0; + + mtask->xmstate = XMSTATE_IMM_HDR; + + if (mtask->data_count) { + iscsi_buf_init_iov(&mtask->sendbuf, (char*)mtask->data, + mtask->data_count); + } + + debug_scsi("mgmtpdu [op 0x%x hdr->itt 0x%x datalen %d]\n", + hdr->opcode, hdr->itt, data_size); + + /* + * since send_pdu() could be called at least from two contexts, + * we need to serialize __kfifo_put, so we don't have to take + * additional lock on fast data-path + */ + if (hdr->opcode & ISCSI_OP_IMMEDIATE) + __kfifo_put(conn->immqueue, (void*)&mtask, sizeof(void*)); + else + __kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*)); + + scsi_queue_work(session->host, &conn->xmitwork); + return 0; +} + +static int +iscsi_eh_host_reset(struct scsi_cmnd *sc) +{ + struct iscsi_cmd_task *ctask = (struct iscsi_cmd_task *)sc->SCp.ptr; + struct iscsi_conn *conn = ctask->conn; + struct iscsi_session *session = conn->session; + + spin_lock_bh(&session->lock); + if (session->state == ISCSI_STATE_TERMINATE) { + debug_scsi("failing host reset: session terminated " + "[CID %d age %d]", conn->id, session->age); + spin_unlock_bh(&session->lock); + return FAILED; + } + spin_unlock_bh(&session->lock); + + debug_scsi("failing connection CID %d due to SCSI host reset " + "[itt 0x%x age %d]", conn->id, ctask->itt, + session->age); + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + + return SUCCESS; +} + +static void +iscsi_tmabort_timedout(unsigned long data) +{ + struct iscsi_cmd_task *ctask = (struct iscsi_cmd_task *)data; + struct iscsi_conn *conn = ctask->conn; + struct iscsi_session *session = conn->session; + + spin_lock(&session->lock); + if (conn->tmabort_state == TMABORT_INITIAL) { + __kfifo_put(session->mgmtpool.queue, + (void*)&ctask->mtask, sizeof(void*)); + conn->tmabort_state = TMABORT_TIMEDOUT; + debug_scsi("tmabort timedout [sc %lx itt 0x%x]\n", + (long)ctask->sc, ctask->itt); + /* unblock eh_abort() */ + wake_up(&conn->ehwait); + } + spin_unlock(&session->lock); +} + +static int +iscsi_eh_abort(struct scsi_cmnd *sc) +{ + int rc; + struct iscsi_cmd_task *ctask = (struct iscsi_cmd_task *)sc->SCp.ptr; + struct iscsi_conn *conn = ctask->conn; + struct iscsi_session *session = conn->session; + + conn->eh_abort_cnt++; + debug_scsi("aborting [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); + + /* + * two cases for ERL=0 here: + * + * 1) connection-level failure; + * 2) recovery due protocol error; + */ + mutex_lock(&conn->xmitmutex); + spin_lock_bh(&session->lock); + if (session->state != ISCSI_STATE_LOGGED_IN) { + if (session->state == ISCSI_STATE_TERMINATE) { + spin_unlock_bh(&session->lock); + mutex_unlock(&conn->xmitmutex); + goto failed; + } + spin_unlock_bh(&session->lock); + } else { + struct iscsi_tm *hdr = &conn->tmhdr; + + /* + * Still LOGGED_IN... + */ + + if (!ctask->sc || sc->SCp.phase != session->age) { + /* + * 1) ctask completed before time out. But session + * is still ok => Happy Retry. + * 2) session was re-open during time out of ctask. + */ + spin_unlock_bh(&session->lock); + mutex_unlock(&conn->xmitmutex); + goto success; + } + conn->tmabort_state = TMABORT_INITIAL; + spin_unlock_bh(&session->lock); + + /* + * ctask timed out but session is OK + * ERL=0 requires task mgmt abort to be issued on each + * failed command. requests must be serialized. + */ + memset(hdr, 0, sizeof(struct iscsi_tm)); + hdr->opcode = ISCSI_OP_SCSI_TMFUNC | ISCSI_OP_IMMEDIATE; + hdr->flags = ISCSI_TM_FUNC_ABORT_TASK; + hdr->flags |= ISCSI_FLAG_CMD_FINAL; + memcpy(hdr->lun, ctask->hdr.lun, sizeof(hdr->lun)); + hdr->rtt = ctask->hdr.itt; + hdr->refcmdsn = ctask->hdr.cmdsn; + + rc = iscsi_conn_send_generic(conn, (struct iscsi_hdr *)hdr, + NULL, 0); + if (rc) { + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + debug_scsi("abort sent failure [itt 0x%x]", ctask->itt); + } else { + struct iscsi_r2t_info *r2t; + + /* + * TMF abort vs. TMF response race logic + */ + spin_lock_bh(&session->lock); + ctask->mtask = (struct iscsi_mgmt_task *) + session->mgmt_cmds[(hdr->itt & ITT_MASK) - + ISCSI_MGMT_ITT_OFFSET]; + /* + * have to flush r2tqueue to avoid r2t leaks + */ + while (__kfifo_get(ctask->r2tqueue, (void*)&r2t, + sizeof(void*))) { + __kfifo_put(ctask->r2tpool.queue, (void*)&r2t, + sizeof(void*)); + } + if (conn->tmabort_state == TMABORT_INITIAL) { + conn->tmfcmd_pdus_cnt++; + conn->tmabort_timer.expires = 3*HZ + jiffies; + conn->tmabort_timer.function = + iscsi_tmabort_timedout; + conn->tmabort_timer.data = (unsigned long)ctask; + add_timer(&conn->tmabort_timer); + debug_scsi("abort sent [itt 0x%x]", ctask->itt); + } else { + if (!ctask->sc || + conn->tmabort_state == TMABORT_SUCCESS) { + conn->tmabort_state = TMABORT_INITIAL; + spin_unlock_bh(&session->lock); + mutex_unlock(&conn->xmitmutex); + goto success; + } + conn->tmabort_state = TMABORT_INITIAL; + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + } + spin_unlock_bh(&session->lock); + } + } + mutex_unlock(&conn->xmitmutex); + + + /* + * block eh thread until: + * + * 1) abort response; + * 2) abort timeout; + * 3) session re-opened; + * 4) session terminated; + */ + for (;;) { + int p_state = session->state; + + rc = wait_event_interruptible(conn->ehwait, + (p_state == ISCSI_STATE_LOGGED_IN ? + (session->state == ISCSI_STATE_TERMINATE || + conn->tmabort_state != TMABORT_INITIAL) : + (session->state == ISCSI_STATE_TERMINATE || + session->state == ISCSI_STATE_LOGGED_IN))); + if (rc) { + /* shutdown.. */ + session->state = ISCSI_STATE_TERMINATE; + goto failed; + } + + if (signal_pending(current)) + flush_signals(current); + + if (session->state == ISCSI_STATE_TERMINATE) + goto failed; + + spin_lock_bh(&session->lock); + if (sc->SCp.phase == session->age && + (conn->tmabort_state == TMABORT_TIMEDOUT || + conn->tmabort_state == TMABORT_FAILED)) { + conn->tmabort_state = TMABORT_INITIAL; + if (!ctask->sc) { + /* + * ctask completed before tmf abort response or + * time out. + * But session is still ok => Happy Retry. + */ + spin_unlock_bh(&session->lock); + break; + } + spin_unlock_bh(&session->lock); + iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); + continue; + } + spin_unlock_bh(&session->lock); + break; + } + +success: + debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); + rc = SUCCESS; + goto exit; + +failed: + debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); + rc = FAILED; + +exit: + del_timer_sync(&conn->tmabort_timer); + + mutex_lock(&conn->xmitmutex); + if (conn->sock) { + struct sock *sk = conn->sock->sk; + + write_lock_bh(&sk->sk_callback_lock); + iscsi_ctask_cleanup(conn, ctask); + write_unlock_bh(&sk->sk_callback_lock); + } + mutex_unlock(&conn->xmitmutex); + return rc; +} + +static int +iscsi_r2tpool_alloc(struct iscsi_session *session) +{ + int i; + int cmd_i; + + /* + * initialize per-task: R2T pool and xmit queue + */ + for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) { + struct iscsi_cmd_task *ctask = session->cmds[cmd_i]; + + /* + * pre-allocated x4 as much r2ts to handle race when + * target acks DataOut faster than we data_xmit() queues + * could replenish r2tqueue. + */ + + /* R2T pool */ + if (iscsi_pool_init(&ctask->r2tpool, session->max_r2t * 4, + (void***)&ctask->r2ts, sizeof(struct iscsi_r2t_info))) { + goto r2t_alloc_fail; + } + + /* R2T xmit queue */ + ctask->r2tqueue = kfifo_alloc( + session->max_r2t * 4 * sizeof(void*), GFP_KERNEL, NULL); + if (ctask->r2tqueue == ERR_PTR(-ENOMEM)) { + iscsi_pool_free(&ctask->r2tpool, (void**)ctask->r2ts); + goto r2t_alloc_fail; + } + + /* + * number of + * Data-Out PDU's within R2T-sequence can be quite big; + * using mempool + */ + ctask->datapool = mempool_create_slab_pool(ISCSI_DTASK_DEFAULT_MAX, + taskcache); + if (ctask->datapool == NULL) { + kfifo_free(ctask->r2tqueue); + iscsi_pool_free(&ctask->r2tpool, (void**)ctask->r2ts); + goto r2t_alloc_fail; + } + INIT_LIST_HEAD(&ctask->dataqueue); + } + + return 0; + +r2t_alloc_fail: + for (i = 0; i < cmd_i; i++) { + mempool_destroy(session->cmds[i]->datapool); + kfifo_free(session->cmds[i]->r2tqueue); + iscsi_pool_free(&session->cmds[i]->r2tpool, + (void**)session->cmds[i]->r2ts); + } + return -ENOMEM; +} + +static void +iscsi_r2tpool_free(struct iscsi_session *session) +{ + int i; + + for (i = 0; i < session->cmds_max; i++) { + mempool_destroy(session->cmds[i]->datapool); + kfifo_free(session->cmds[i]->r2tqueue); + iscsi_pool_free(&session->cmds[i]->r2tpool, + (void**)session->cmds[i]->r2ts); + } +} + +static struct scsi_host_template iscsi_sht = { + .name = "iSCSI Initiator over TCP/IP, v." + ISCSI_VERSION_STR, + .queuecommand = iscsi_queuecommand, .change_queue_depth = iscsi_change_queue_depth, .can_queue = ISCSI_XMIT_CMDS_MAX - 1, .sg_tablesize = ISCSI_SG_TABLESIZE, @@ -2327,70 +3250,401 @@ static struct scsi_host_template iscsi_sht = { .this_id = -1, }; +static struct iscsi_transport iscsi_tcp_transport; + +static struct iscsi_cls_session * +iscsi_session_create(struct scsi_transport_template *scsit, + uint32_t initial_cmdsn, uint32_t *sid) +{ + struct Scsi_Host *shost; + struct iscsi_session *session; + int cmd_i; + + shost = iscsi_transport_create_session(scsit, &iscsi_tcp_transport); + if (!shost) + return NULL; + + session = iscsi_hostdata(shost->hostdata); + memset(session, 0, sizeof(struct iscsi_session)); + session->host = shost; + session->state = ISCSI_STATE_FREE; + session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX; + session->cmds_max = ISCSI_XMIT_CMDS_MAX; + session->cmdsn = initial_cmdsn; + session->exp_cmdsn = initial_cmdsn + 1; + session->max_cmdsn = initial_cmdsn + 1; + session->max_r2t = 1; + *sid = shost->host_no; + + /* initialize SCSI PDU commands pool */ + if (iscsi_pool_init(&session->cmdpool, session->cmds_max, + (void***)&session->cmds, sizeof(struct iscsi_cmd_task))) + goto cmdpool_alloc_fail; + + /* pre-format cmds pool with ITT */ + for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) + session->cmds[cmd_i]->itt = cmd_i; + + spin_lock_init(&session->lock); + INIT_LIST_HEAD(&session->connections); + + /* initialize immediate command pool */ + if (iscsi_pool_init(&session->mgmtpool, session->mgmtpool_max, + (void***)&session->mgmt_cmds, sizeof(struct iscsi_mgmt_task))) + goto mgmtpool_alloc_fail; + + + /* pre-format immediate cmds pool with ITT */ + for (cmd_i = 0; cmd_i < session->mgmtpool_max; cmd_i++) { + session->mgmt_cmds[cmd_i]->itt = ISCSI_MGMT_ITT_OFFSET + cmd_i; + session->mgmt_cmds[cmd_i]->data = kmalloc( + DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, GFP_KERNEL); + if (!session->mgmt_cmds[cmd_i]->data) { + int j; + + for (j = 0; j < cmd_i; j++) + kfree(session->mgmt_cmds[j]->data); + goto immdata_alloc_fail; + } + } + + if (iscsi_r2tpool_alloc(session)) + goto r2tpool_alloc_fail; + + return hostdata_session(shost->hostdata); + +r2tpool_alloc_fail: + for (cmd_i = 0; cmd_i < session->mgmtpool_max; cmd_i++) + kfree(session->mgmt_cmds[cmd_i]->data); +immdata_alloc_fail: + iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); +mgmtpool_alloc_fail: + iscsi_pool_free(&session->cmdpool, (void**)session->cmds); +cmdpool_alloc_fail: + iscsi_transport_destroy_session(shost); + return NULL; +} + +static void +iscsi_session_destroy(struct iscsi_cls_session *cls_session) +{ + struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); + struct iscsi_session *session = iscsi_hostdata(shost->hostdata); + int cmd_i; + struct iscsi_data_task *dtask, *n; + + for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) { + struct iscsi_cmd_task *ctask = session->cmds[cmd_i]; + list_for_each_entry_safe(dtask, n, &ctask->dataqueue, item) { + list_del(&dtask->item); + mempool_free(dtask, ctask->datapool); + } + } + + for (cmd_i = 0; cmd_i < session->mgmtpool_max; cmd_i++) + kfree(session->mgmt_cmds[cmd_i]->data); + + iscsi_r2tpool_free(session); + iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); + iscsi_pool_free(&session->cmdpool, (void**)session->cmds); + + iscsi_transport_destroy_session(shost); +} + +static int +iscsi_conn_set_param(struct iscsi_cls_conn *cls_conn, enum iscsi_param param, + uint32_t value) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + struct iscsi_session *session = conn->session; + + spin_lock_bh(&session->lock); + if (conn->c_stage != ISCSI_CONN_INITIAL_STAGE && + conn->stop_stage != STOP_CONN_RECOVER) { + printk(KERN_ERR "iscsi_tcp: can not change parameter [%d]\n", + param); + spin_unlock_bh(&session->lock); + return 0; + } + spin_unlock_bh(&session->lock); + + switch(param) { + case ISCSI_PARAM_MAX_RECV_DLENGTH: { + char *saveptr = conn->data; + gfp_t flags = GFP_KERNEL; + + if (conn->data_size >= value) { + conn->max_recv_dlength = value; + break; + } + + spin_lock_bh(&session->lock); + if (conn->stop_stage == STOP_CONN_RECOVER) + flags = GFP_ATOMIC; + spin_unlock_bh(&session->lock); + + if (value <= PAGE_SIZE) + conn->data = kmalloc(value, flags); + else + conn->data = (void*)__get_free_pages(flags, + get_order(value)); + if (conn->data == NULL) { + conn->data = saveptr; + return -ENOMEM; + } + if (conn->data_size <= PAGE_SIZE) + kfree(saveptr); + else + free_pages((unsigned long)saveptr, + get_order(conn->data_size)); + conn->max_recv_dlength = value; + conn->data_size = value; + } + break; + case ISCSI_PARAM_MAX_XMIT_DLENGTH: + conn->max_xmit_dlength = value; + break; + case ISCSI_PARAM_HDRDGST_EN: + conn->hdrdgst_en = value; + conn->hdr_size = sizeof(struct iscsi_hdr); + if (conn->hdrdgst_en) { + conn->hdr_size += sizeof(__u32); + if (!conn->tx_tfm) + conn->tx_tfm = crypto_alloc_tfm("crc32c", 0); + if (!conn->tx_tfm) + return -ENOMEM; + if (!conn->rx_tfm) + conn->rx_tfm = crypto_alloc_tfm("crc32c", 0); + if (!conn->rx_tfm) { + crypto_free_tfm(conn->tx_tfm); + return -ENOMEM; + } + } else { + if (conn->tx_tfm) + crypto_free_tfm(conn->tx_tfm); + if (conn->rx_tfm) + crypto_free_tfm(conn->rx_tfm); + } + break; + case ISCSI_PARAM_DATADGST_EN: + conn->datadgst_en = value; + if (conn->datadgst_en) { + if (!conn->data_tx_tfm) + conn->data_tx_tfm = + crypto_alloc_tfm("crc32c", 0); + if (!conn->data_tx_tfm) + return -ENOMEM; + if (!conn->data_rx_tfm) + conn->data_rx_tfm = + crypto_alloc_tfm("crc32c", 0); + if (!conn->data_rx_tfm) { + crypto_free_tfm(conn->data_tx_tfm); + return -ENOMEM; + } + } else { + if (conn->data_tx_tfm) + crypto_free_tfm(conn->data_tx_tfm); + if (conn->data_rx_tfm) + crypto_free_tfm(conn->data_rx_tfm); + } + conn->sendpage = conn->datadgst_en ? + sock_no_sendpage : conn->sock->ops->sendpage; + break; + case ISCSI_PARAM_INITIAL_R2T_EN: + session->initial_r2t_en = value; + break; + case ISCSI_PARAM_MAX_R2T: + if (session->max_r2t == roundup_pow_of_two(value)) + break; + iscsi_r2tpool_free(session); + session->max_r2t = value; + if (session->max_r2t & (session->max_r2t - 1)) + session->max_r2t = roundup_pow_of_two(session->max_r2t); + if (iscsi_r2tpool_alloc(session)) + return -ENOMEM; + break; + case ISCSI_PARAM_IMM_DATA_EN: + session->imm_data_en = value; + break; + case ISCSI_PARAM_FIRST_BURST: + session->first_burst = value; + break; + case ISCSI_PARAM_MAX_BURST: + session->max_burst = value; + break; + case ISCSI_PARAM_PDU_INORDER_EN: + session->pdu_inorder_en = value; + break; + case ISCSI_PARAM_DATASEQ_INORDER_EN: + session->dataseq_inorder_en = value; + break; + case ISCSI_PARAM_ERL: + session->erl = value; + break; + case ISCSI_PARAM_IFMARKER_EN: + BUG_ON(value); + session->ifmarker_en = value; + break; + case ISCSI_PARAM_OFMARKER_EN: + BUG_ON(value); + session->ofmarker_en = value; + break; + default: + break; + } + + return 0; +} + +static int +iscsi_session_get_param(struct iscsi_cls_session *cls_session, + enum iscsi_param param, uint32_t *value) +{ + struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); + struct iscsi_session *session = iscsi_hostdata(shost->hostdata); + + switch(param) { + case ISCSI_PARAM_INITIAL_R2T_EN: + *value = session->initial_r2t_en; + break; + case ISCSI_PARAM_MAX_R2T: + *value = session->max_r2t; + break; + case ISCSI_PARAM_IMM_DATA_EN: + *value = session->imm_data_en; + break; + case ISCSI_PARAM_FIRST_BURST: + *value = session->first_burst; + break; + case ISCSI_PARAM_MAX_BURST: + *value = session->max_burst; + break; + case ISCSI_PARAM_PDU_INORDER_EN: + *value = session->pdu_inorder_en; + break; + case ISCSI_PARAM_DATASEQ_INORDER_EN: + *value = session->dataseq_inorder_en; + break; + case ISCSI_PARAM_ERL: + *value = session->erl; + break; + case ISCSI_PARAM_IFMARKER_EN: + *value = session->ifmarker_en; + break; + case ISCSI_PARAM_OFMARKER_EN: + *value = session->ofmarker_en; + break; + default: + return ISCSI_ERR_PARAM_NOT_FOUND; + } + + return 0; +} + +static int +iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, + enum iscsi_param param, uint32_t *value) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + + switch(param) { + case ISCSI_PARAM_MAX_RECV_DLENGTH: + *value = conn->max_recv_dlength; + break; + case ISCSI_PARAM_MAX_XMIT_DLENGTH: + *value = conn->max_xmit_dlength; + break; + case ISCSI_PARAM_HDRDGST_EN: + *value = conn->hdrdgst_en; + break; + case ISCSI_PARAM_DATADGST_EN: + *value = conn->datadgst_en; + break; + default: + return ISCSI_ERR_PARAM_NOT_FOUND; + } + + return 0; +} + +static void +iscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + + stats->txdata_octets = conn->txdata_octets; + stats->rxdata_octets = conn->rxdata_octets; + stats->scsicmd_pdus = conn->scsicmd_pdus_cnt; + stats->dataout_pdus = conn->dataout_pdus_cnt; + stats->scsirsp_pdus = conn->scsirsp_pdus_cnt; + stats->datain_pdus = conn->datain_pdus_cnt; + stats->r2t_pdus = conn->r2t_pdus_cnt; + stats->tmfcmd_pdus = conn->tmfcmd_pdus_cnt; + stats->tmfrsp_pdus = conn->tmfrsp_pdus_cnt; + stats->custom_length = 3; + strcpy(stats->custom[0].desc, "tx_sendpage_failures"); + stats->custom[0].value = conn->sendpage_failures_cnt; + strcpy(stats->custom[1].desc, "rx_discontiguous_hdr"); + stats->custom[1].value = conn->discontiguous_hdr_cnt; + strcpy(stats->custom[2].desc, "eh_abort_cnt"); + stats->custom[2].value = conn->eh_abort_cnt; +} + +static int +iscsi_conn_send_pdu(struct iscsi_cls_conn *cls_conn, struct iscsi_hdr *hdr, + char *data, uint32_t data_size) +{ + struct iscsi_conn *conn = cls_conn->dd_data; + int rc; + + mutex_lock(&conn->xmitmutex); + rc = iscsi_conn_send_generic(conn, hdr, data, data_size); + mutex_unlock(&conn->xmitmutex); + + return rc; +} + static struct iscsi_transport iscsi_tcp_transport = { .owner = THIS_MODULE, .name = "tcp", .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST | CAP_DATADGST, - .param_mask = ISCSI_MAX_RECV_DLENGTH | - ISCSI_MAX_XMIT_DLENGTH | - ISCSI_HDRDGST_EN | - ISCSI_DATADGST_EN | - ISCSI_INITIAL_R2T_EN | - ISCSI_MAX_R2T | - ISCSI_IMM_DATA_EN | - ISCSI_FIRST_BURST | - ISCSI_MAX_BURST | - ISCSI_PDU_INORDER_EN | - ISCSI_DATASEQ_INORDER_EN | - ISCSI_ERL | - ISCSI_CONN_PORT | - ISCSI_CONN_ADDRESS | - ISCSI_EXP_STATSN | - ISCSI_PERSISTENT_PORT | - ISCSI_PERSISTENT_ADDRESS | - ISCSI_TARGET_NAME | - ISCSI_TPGT, .host_template = &iscsi_sht, + .hostdata_size = sizeof(struct iscsi_session), .conndata_size = sizeof(struct iscsi_conn), .max_conn = 1, .max_cmd_len = ISCSI_TCP_MAX_CMD_LEN, - /* session management */ - .create_session = iscsi_tcp_session_create, - .destroy_session = iscsi_tcp_session_destroy, - /* connection management */ - .create_conn = iscsi_tcp_conn_create, - .bind_conn = iscsi_tcp_conn_bind, - .destroy_conn = iscsi_tcp_conn_destroy, + .create_session = iscsi_session_create, + .destroy_session = iscsi_session_destroy, + .create_conn = iscsi_conn_create, + .bind_conn = iscsi_conn_bind, + .destroy_conn = iscsi_conn_destroy, .set_param = iscsi_conn_set_param, - .get_conn_param = iscsi_tcp_conn_get_param, + .get_conn_param = iscsi_conn_get_param, .get_session_param = iscsi_session_get_param, .start_conn = iscsi_conn_start, - .stop_conn = iscsi_tcp_conn_stop, - /* IO */ + .stop_conn = iscsi_conn_stop, .send_pdu = iscsi_conn_send_pdu, .get_stats = iscsi_conn_get_stats, - .init_cmd_task = iscsi_tcp_cmd_init, - .init_mgmt_task = iscsi_tcp_mgmt_init, - .xmit_cmd_task = iscsi_tcp_ctask_xmit, - .xmit_mgmt_task = iscsi_tcp_mtask_xmit, - .cleanup_cmd_task = iscsi_tcp_cleanup_ctask, - /* recovery */ - .session_recovery_timedout = iscsi_session_recovery_timedout, }; static int __init iscsi_tcp_init(void) { if (iscsi_max_lun < 1) { - printk(KERN_ERR "iscsi_tcp: Invalid max_lun value of %u\n", - iscsi_max_lun); + printk(KERN_ERR "Invalid max_lun value of %u\n", iscsi_max_lun); return -EINVAL; } iscsi_tcp_transport.max_lun = iscsi_max_lun; + taskcache = kmem_cache_create("iscsi_taskcache", + sizeof(struct iscsi_data_task), 0, + SLAB_HWCACHE_ALIGN, NULL, NULL); + if (!taskcache) + return -ENOMEM; + if (!iscsi_register_transport(&iscsi_tcp_transport)) - return -ENODEV; + kmem_cache_destroy(taskcache); return 0; } @@ -2399,6 +3653,7 @@ static void __exit iscsi_tcp_exit(void) { iscsi_unregister_transport(&iscsi_tcp_transport); + kmem_cache_destroy(taskcache); } module_init(iscsi_tcp_init); diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h index 6a4ee704e..ba26741ac 100644 --- a/drivers/scsi/iscsi_tcp.h +++ b/drivers/scsi/iscsi_tcp.h @@ -2,8 +2,7 @@ * iSCSI Initiator TCP Transport * Copyright (C) 2004 Dmitry Yusupov * Copyright (C) 2004 Alex Aizman - * Copyright (C) 2005 - 2006 Mike Christie - * Copyright (C) 2006 Red Hat, Inc. All rights reserved. + * Copyright (C) 2005 Mike Christie * maintained by open-iscsi@googlegroups.com * * This program is free software; you can redistribute it and/or modify @@ -22,7 +21,20 @@ #ifndef ISCSI_TCP_H #define ISCSI_TCP_H -#include +/* Session's states */ +#define ISCSI_STATE_FREE 1 +#define ISCSI_STATE_LOGGED_IN 2 +#define ISCSI_STATE_FAILED 3 +#define ISCSI_STATE_TERMINATE 4 + +/* Connection's states */ +#define ISCSI_CONN_INITIAL_STAGE 0 +#define ISCSI_CONN_STARTED 1 +#define ISCSI_CONN_STOPPED 2 +#define ISCSI_CONN_CLEANUP_WAIT 3 + +/* Connection suspend "bit" */ +#define SUSPEND_BIT 1 /* Socket's Receive state machine */ #define IN_PROGRESS_WAIT_HEADER 0x0 @@ -30,6 +42,12 @@ #define IN_PROGRESS_DATA_RECV 0x2 #define IN_PROGRESS_DDIGEST_RECV 0x3 +/* Task Mgmt states */ +#define TMABORT_INITIAL 0x0 +#define TMABORT_SUCCESS 0x1 +#define TMABORT_FAILED 0x2 +#define TMABORT_TIMEDOUT 0x3 + /* xmit state machine */ #define XMSTATE_IDLE 0x0 #define XMSTATE_R_HDR 0x1 @@ -44,14 +62,34 @@ #define XMSTATE_W_PAD 0x200 #define XMSTATE_DATA_DIGEST 0x400 +#define ISCSI_CONN_MAX 1 #define ISCSI_CONN_RCVBUF_MIN 262144 #define ISCSI_CONN_SNDBUF_MIN 262144 #define ISCSI_PAD_LEN 4 #define ISCSI_R2T_MAX 16 +#define ISCSI_XMIT_CMDS_MAX 128 /* must be power of 2 */ +#define ISCSI_MGMT_CMDS_MAX 32 /* must be power of 2 */ +#define ISCSI_MGMT_ITT_OFFSET 0xa00 #define ISCSI_SG_TABLESIZE SG_ALL +#define ISCSI_DEF_CMD_PER_LUN 32 +#define ISCSI_MAX_CMD_PER_LUN 128 #define ISCSI_TCP_MAX_CMD_LEN 16 -struct socket; +#define ITT_MASK (0xfff) +#define CID_SHIFT 12 +#define CID_MASK (0xffff<esp_command_dvma = vdma_alloc(CPHYSADDR(cmd_buffer), sizeof (cmd_buffer)); esp->irq = JAZZ_SCSI_IRQ; - request_irq(JAZZ_SCSI_IRQ, esp_intr, IRQF_DISABLED, "JAZZ SCSI", + request_irq(JAZZ_SCSI_IRQ, esp_intr, SA_INTERRUPT, "JAZZ SCSI", esp->ehost); /* @@ -257,7 +257,7 @@ static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, struct scsi_cmnd *sp) static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, struct scsi_cmnd *sp) { int sz = sp->use_sg - 1; - struct scatterlist *sg = (struct scatterlist *)sp->request_buffer; + struct scatterlist *sg = (struct scatterlist *)sp->buffer; while(sz >= 0) { vdma_free(sg[sz].dma_address); diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index f0871c3ac..eb7bd310c 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c @@ -131,7 +131,7 @@ lasi700_probe(struct parisc_device *dev) host->this_id = 7; host->base = base; host->irq = dev->irq; - if(request_irq(dev->irq, NCR_700_intr, IRQF_SHARED, "lasi700", host)) { + if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, "lasi700", host)) { printk(KERN_ERR "lasi700: request_irq failed!\n"); goto out_put_host; } diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c index 9ce221f25..835dff0ba 100644 --- a/drivers/scsi/libata-bmdma.c +++ b/drivers/scsi/libata-bmdma.c @@ -32,6 +32,7 @@ * */ +#include #include #include #include @@ -651,151 +652,6 @@ void ata_bmdma_stop(struct ata_queued_cmd *qc) ata_altstatus(ap); /* dummy read */ } -/** - * ata_bmdma_freeze - Freeze BMDMA controller port - * @ap: port to freeze - * - * Freeze BMDMA controller port. - * - * LOCKING: - * Inherited from caller. - */ -void ata_bmdma_freeze(struct ata_port *ap) -{ - struct ata_ioports *ioaddr = &ap->ioaddr; - - ap->ctl |= ATA_NIEN; - ap->last_ctl = ap->ctl; - - if (ap->flags & ATA_FLAG_MMIO) - writeb(ap->ctl, (void __iomem *)ioaddr->ctl_addr); - else - outb(ap->ctl, ioaddr->ctl_addr); -} - -/** - * ata_bmdma_thaw - Thaw BMDMA controller port - * @ap: port to thaw - * - * Thaw BMDMA controller port. - * - * LOCKING: - * Inherited from caller. - */ -void ata_bmdma_thaw(struct ata_port *ap) -{ - /* clear & re-enable interrupts */ - ata_chk_status(ap); - ap->ops->irq_clear(ap); - if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */ - ata_irq_on(ap); -} - -/** - * ata_bmdma_drive_eh - Perform EH with given methods for BMDMA controller - * @ap: port to handle error for - * @prereset: prereset method (can be NULL) - * @softreset: softreset method (can be NULL) - * @hardreset: hardreset method (can be NULL) - * @postreset: postreset method (can be NULL) - * - * Handle error for ATA BMDMA controller. It can handle both - * PATA and SATA controllers. Many controllers should be able to - * use this EH as-is or with some added handling before and - * after. - * - * This function is intended to be used for constructing - * ->error_handler callback by low level drivers. - * - * LOCKING: - * Kernel thread context (may sleep) - */ -void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset, - ata_reset_fn_t softreset, ata_reset_fn_t hardreset, - ata_postreset_fn_t postreset) -{ - struct ata_eh_context *ehc = &ap->eh_context; - struct ata_queued_cmd *qc; - unsigned long flags; - int thaw = 0; - - qc = __ata_qc_from_tag(ap, ap->active_tag); - if (qc && !(qc->flags & ATA_QCFLAG_FAILED)) - qc = NULL; - - /* reset PIO HSM and stop DMA engine */ - spin_lock_irqsave(ap->lock, flags); - - ap->hsm_task_state = HSM_ST_IDLE; - - if (qc && (qc->tf.protocol == ATA_PROT_DMA || - qc->tf.protocol == ATA_PROT_ATAPI_DMA)) { - u8 host_stat; - - host_stat = ata_bmdma_status(ap); - - ata_ehi_push_desc(&ehc->i, "BMDMA stat 0x%x", host_stat); - - /* BMDMA controllers indicate host bus error by - * setting DMA_ERR bit and timing out. As it wasn't - * really a timeout event, adjust error mask and - * cancel frozen state. - */ - if (qc->err_mask == AC_ERR_TIMEOUT && host_stat & ATA_DMA_ERR) { - qc->err_mask = AC_ERR_HOST_BUS; - thaw = 1; - } - - ap->ops->bmdma_stop(qc); - } - - ata_altstatus(ap); - ata_chk_status(ap); - ap->ops->irq_clear(ap); - - spin_unlock_irqrestore(ap->lock, flags); - - if (thaw) - ata_eh_thaw_port(ap); - - /* PIO and DMA engines have been stopped, perform recovery */ - ata_do_eh(ap, prereset, softreset, hardreset, postreset); -} - -/** - * ata_bmdma_error_handler - Stock error handler for BMDMA controller - * @ap: port to handle error for - * - * Stock error handler for BMDMA controller. - * - * LOCKING: - * Kernel thread context (may sleep) - */ -void ata_bmdma_error_handler(struct ata_port *ap) -{ - ata_reset_fn_t hardreset; - - hardreset = NULL; - if (sata_scr_valid(ap)) - hardreset = sata_std_hardreset; - - ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, hardreset, - ata_std_postreset); -} - -/** - * ata_bmdma_post_internal_cmd - Stock post_internal_cmd for - * BMDMA controller - * @qc: internal command to clean up - * - * LOCKING: - * Kernel thread context (may sleep) - */ -void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc) -{ - ata_bmdma_stop(qc); -} - #ifdef CONFIG_PCI static struct ata_probe_ent * ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) @@ -853,7 +709,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int return NULL; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->private_data = port[0]->private_data; if (ports & ATA_PORT_PRIMARY) { @@ -1074,21 +930,10 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, /* FIXME: check ata_device_add return */ if (legacy_mode) { - struct device *dev = &pdev->dev; - struct ata_host_set *host_set = NULL; - - if (legacy_mode & (1 << 0)) { + if (legacy_mode & (1 << 0)) ata_device_add(probe_ent); - host_set = dev_get_drvdata(dev); - } - - if (legacy_mode & (1 << 1)) { + if (legacy_mode & (1 << 1)) ata_device_add(probe_ent2); - if (host_set) { - host_set->next = dev_get_drvdata(dev); - dev_set_drvdata(dev, host_set); - } - } } else ata_device_add(probe_ent); diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 8e3e8caf8..d680ccd94 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -32,6 +32,7 @@ * */ +#include #include #include #include @@ -60,37 +61,26 @@ #include "libata.h" -/* debounce timing parameters in msecs { interval, duration, timeout } */ -const unsigned long sata_deb_timing_normal[] = { 5, 100, 2000 }; -const unsigned long sata_deb_timing_hotplug[] = { 25, 500, 2000 }; -const unsigned long sata_deb_timing_long[] = { 100, 2000, 5000 }; - -static unsigned int ata_dev_init_params(struct ata_device *dev, - u16 heads, u16 sectors); -static unsigned int ata_dev_set_xfermode(struct ata_device *dev); -static void ata_dev_xfermask(struct ata_device *dev); +static unsigned int ata_dev_init_params(struct ata_port *ap, + struct ata_device *dev, + u16 heads, + u16 sectors); +static void ata_set_mode(struct ata_port *ap); +static unsigned int ata_dev_set_xfermode(struct ata_port *ap, + struct ata_device *dev); +static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev); static unsigned int ata_unique_id = 1; static struct workqueue_struct *ata_wq; -struct workqueue_struct *ata_aux_wq; - int atapi_enabled = 1; module_param(atapi_enabled, int, 0444); MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); -int atapi_dmadir = 0; -module_param(atapi_dmadir, int, 0444); -MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)"); - int libata_fua = 0; module_param_named(fua, libata_fua, int, 0444); MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)"); -static int ata_probe_timeout = ATA_TMOUT_INTERNAL / HZ; -module_param(ata_probe_timeout, int, 0444); -MODULE_PARM_DESC(ata_probe_timeout, "Set ATA probing timeout (seconds)"); - MODULE_AUTHOR("Jeff Garzik"); MODULE_DESCRIPTION("Library module for ATA devices"); MODULE_LICENSE("GPL"); @@ -407,22 +397,11 @@ static const char *ata_mode_string(unsigned int xfer_mask) return ""; } -static const char *sata_spd_string(unsigned int spd) -{ - static const char * const spd_str[] = { - "1.5 Gbps", - "3.0 Gbps", - }; - - if (spd == 0 || (spd - 1) >= ARRAY_SIZE(spd_str)) - return ""; - return spd_str[spd - 1]; -} - -void ata_dev_disable(struct ata_device *dev) +static void ata_dev_disable(struct ata_port *ap, struct ata_device *dev) { - if (ata_dev_enabled(dev) && ata_msg_drv(dev->ap)) { - ata_dev_printk(dev, KERN_WARNING, "disabled\n"); + if (ata_dev_present(dev)) { + printk(KERN_WARNING "ata%u: dev %u disabled\n", + ap->id, dev->devno); dev->class++; } } @@ -780,9 +759,8 @@ void ata_std_dev_select (struct ata_port *ap, unsigned int device) void ata_dev_select(struct ata_port *ap, unsigned int device, unsigned int wait, unsigned int can_sleep) { - if (ata_msg_probe(ap)) - ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, ata%u: " - "device %u, wait %u\n", ap->id, device, wait); + VPRINTK("ENTER, ata%u: device %u, wait %u\n", + ap->id, device, wait); if (wait) ata_wait_idle(ap); @@ -907,7 +885,7 @@ void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), void *data, { int rc; - if (ap->pflags & ATA_PFLAG_FLUSH_PORT_TASK) + if (ap->flags & ATA_FLAG_FLUSH_PORT_TASK) return; PREPARE_WORK(&ap->port_task, fn, data); @@ -937,9 +915,9 @@ void ata_port_flush_task(struct ata_port *ap) DPRINTK("ENTER\n"); - spin_lock_irqsave(ap->lock, flags); - ap->pflags |= ATA_PFLAG_FLUSH_PORT_TASK; - spin_unlock_irqrestore(ap->lock, flags); + spin_lock_irqsave(&ap->host_set->lock, flags); + ap->flags |= ATA_FLAG_FLUSH_PORT_TASK; + spin_unlock_irqrestore(&ap->host_set->lock, flags); DPRINTK("flush #1\n"); flush_workqueue(ata_wq); @@ -950,32 +928,30 @@ void ata_port_flush_task(struct ata_port *ap) * Cancel and flush. */ if (!cancel_delayed_work(&ap->port_task)) { - if (ata_msg_ctl(ap)) - ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n", - __FUNCTION__); + DPRINTK("flush #2\n"); flush_workqueue(ata_wq); } - spin_lock_irqsave(ap->lock, flags); - ap->pflags &= ~ATA_PFLAG_FLUSH_PORT_TASK; - spin_unlock_irqrestore(ap->lock, flags); + spin_lock_irqsave(&ap->host_set->lock, flags); + ap->flags &= ~ATA_FLAG_FLUSH_PORT_TASK; + spin_unlock_irqrestore(&ap->host_set->lock, flags); - if (ata_msg_ctl(ap)) - ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __FUNCTION__); + DPRINTK("EXIT\n"); } void ata_qc_complete_internal(struct ata_queued_cmd *qc) { struct completion *waiting = qc->private_data; + qc->ap->ops->tf_read(qc->ap, &qc->tf); complete(waiting); } /** * ata_exec_internal - execute libata internal command + * @ap: Port to which the command is sent * @dev: Device to which the command is sent * @tf: Taskfile registers for the command and the result - * @cdb: CDB for packet command * @dma_dir: Data tranfer direction of the command * @buf: Data buffer of the command * @buflen: Length of data buffer @@ -988,66 +964,25 @@ void ata_qc_complete_internal(struct ata_queued_cmd *qc) * * LOCKING: * None. Should be called with kernel context, might sleep. - * - * RETURNS: - * Zero on success, AC_ERR_* mask on failure */ -unsigned ata_exec_internal(struct ata_device *dev, - struct ata_taskfile *tf, const u8 *cdb, - int dma_dir, void *buf, unsigned int buflen) + +static unsigned +ata_exec_internal(struct ata_port *ap, struct ata_device *dev, + struct ata_taskfile *tf, + int dma_dir, void *buf, unsigned int buflen) { - struct ata_port *ap = dev->ap; u8 command = tf->command; struct ata_queued_cmd *qc; - unsigned int tag, preempted_tag; - u32 preempted_sactive, preempted_qc_active; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); unsigned long flags; unsigned int err_mask; - int rc; - - spin_lock_irqsave(ap->lock, flags); - /* no internal command while frozen */ - if (ap->pflags & ATA_PFLAG_FROZEN) { - spin_unlock_irqrestore(ap->lock, flags); - return AC_ERR_SYSTEM; - } - - /* initialize internal qc */ - - /* XXX: Tag 0 is used for drivers with legacy EH as some - * drivers choke if any other tag is given. This breaks - * ata_tag_internal() test for those drivers. Don't use new - * EH stuff without converting to it. - */ - if (ap->ops->error_handler) - tag = ATA_TAG_INTERNAL; - else - tag = 0; - - if (test_and_set_bit(tag, &ap->qc_allocated)) - BUG(); - qc = __ata_qc_from_tag(ap, tag); + spin_lock_irqsave(&ap->host_set->lock, flags); - qc->tag = tag; - qc->scsicmd = NULL; - qc->ap = ap; - qc->dev = dev; - ata_qc_reinit(qc); + qc = ata_qc_new_init(ap, dev); + BUG_ON(qc == NULL); - preempted_tag = ap->active_tag; - preempted_sactive = ap->sactive; - preempted_qc_active = ap->qc_active; - ap->active_tag = ATA_TAG_POISON; - ap->sactive = 0; - ap->qc_active = 0; - - /* prepare & issue qc */ qc->tf = *tf; - if (cdb) - memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); - qc->flags |= ATA_QCFLAG_RESULT_TF; qc->dma_dir = dma_dir; if (dma_dir != DMA_NONE) { ata_sg_init_one(qc, buf, buflen); @@ -1059,58 +994,33 @@ unsigned ata_exec_internal(struct ata_device *dev, ata_qc_issue(qc); - spin_unlock_irqrestore(ap->lock, flags); + spin_unlock_irqrestore(&ap->host_set->lock, flags); - rc = wait_for_completion_timeout(&wait, ata_probe_timeout); + if (!wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL)) { + ata_port_flush_task(ap); - ata_port_flush_task(ap); - - if (!rc) { - spin_lock_irqsave(ap->lock, flags); + spin_lock_irqsave(&ap->host_set->lock, flags); /* We're racing with irq here. If we lose, the * following test prevents us from completing the qc - * twice. If we win, the port is frozen and will be - * cleaned up by ->post_internal_cmd(). + * again. If completion irq occurs after here but + * before the caller cleans up, it will result in a + * spurious interrupt. We can live with that. */ if (qc->flags & ATA_QCFLAG_ACTIVE) { - qc->err_mask |= AC_ERR_TIMEOUT; - - if (ap->ops->error_handler) - ata_port_freeze(ap); - else - ata_qc_complete(qc); - - if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, - "qc timeout (cmd 0x%x)\n", command); + qc->err_mask = AC_ERR_TIMEOUT; + ata_qc_complete(qc); + printk(KERN_WARNING "ata%u: qc timeout (cmd 0x%x)\n", + ap->id, command); } - spin_unlock_irqrestore(ap->lock, flags); - } - - /* do post_internal_cmd */ - if (ap->ops->post_internal_cmd) - ap->ops->post_internal_cmd(qc); - - if (qc->flags & ATA_QCFLAG_FAILED && !qc->err_mask) { - if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, - "zero err_mask for failed " - "internal command, assuming AC_ERR_OTHER\n"); - qc->err_mask |= AC_ERR_OTHER; + spin_unlock_irqrestore(&ap->host_set->lock, flags); } - /* finish up */ - spin_lock_irqsave(ap->lock, flags); - - *tf = qc->result_tf; + *tf = qc->tf; err_mask = qc->err_mask; ata_qc_free(qc); - ap->active_tag = preempted_tag; - ap->sactive = preempted_sactive; - ap->qc_active = preempted_qc_active; /* XXX - Some LLDDs (sata_mv) disable port on command failure. * Until those drivers are fixed, we detect the condition @@ -1123,43 +1033,14 @@ unsigned ata_exec_internal(struct ata_device *dev, * * Kill the following code as soon as those drivers are fixed. */ - if (ap->flags & ATA_FLAG_DISABLED) { + if (ap->flags & ATA_FLAG_PORT_DISABLED) { err_mask |= AC_ERR_SYSTEM; ata_port_probe(ap); } - spin_unlock_irqrestore(ap->lock, flags); - return err_mask; } -/** - * ata_do_simple_cmd - execute simple internal command - * @dev: Device to which the command is sent - * @cmd: Opcode to execute - * - * Execute a 'simple' command, that only consists of the opcode - * 'cmd' itself, without filling any other registers - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * Zero on success, AC_ERR_* mask on failure - */ -unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) -{ - struct ata_taskfile tf; - - ata_tf_init(dev, &tf); - - tf.command = cmd; - tf.flags |= ATA_TFLAG_DEVICE; - tf.protocol = ATA_PROT_NODATA; - - return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); -} - /** * ata_pio_need_iordy - check if iordy needed * @adev: ATA device @@ -1195,10 +1076,11 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev) /** * ata_dev_read_id - Read ID data from the specified device + * @ap: port on which target device resides * @dev: target device * @p_class: pointer to class of the target device (may be changed) * @post_reset: is this read ID post-reset? - * @id: buffer to read IDENTIFY data into + * @p_id: read IDENTIFY page (newly allocated) * * Read ID data from the specified device. ATA_CMD_ID_ATA is * performed on ATA devices and ATA_CMD_ID_ATAPI on ATAPI @@ -1211,24 +1093,29 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev) * RETURNS: * 0 on success, -errno otherwise. */ -int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, - int post_reset, u16 *id) +static int ata_dev_read_id(struct ata_port *ap, struct ata_device *dev, + unsigned int *p_class, int post_reset, u16 **p_id) { - struct ata_port *ap = dev->ap; unsigned int class = *p_class; struct ata_taskfile tf; unsigned int err_mask = 0; + u16 *id; const char *reason; int rc; - if (ata_msg_ctl(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", - __FUNCTION__, ap->id, dev->devno); + DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno); ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ + id = kmalloc(sizeof(id[0]) * ATA_ID_WORDS, GFP_KERNEL); + if (id == NULL) { + rc = -ENOMEM; + reason = "out of memory"; + goto err_out; + } + retry: - ata_tf_init(dev, &tf); + ata_tf_init(ap, &tf, dev->devno); switch (class) { case ATA_DEV_ATA: @@ -1245,7 +1132,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, tf.protocol = ATA_PROT_PIO; - err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, + err_mask = ata_exec_internal(ap, dev, &tf, DMA_FROM_DEVICE, id, sizeof(id[0]) * ATA_ID_WORDS); if (err_mask) { rc = -EIO; @@ -1256,15 +1143,10 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, swap_buf_le16(id, ATA_ID_WORDS); /* sanity check */ - rc = -EINVAL; - reason = "device reports illegal type"; - - if (class == ATA_DEV_ATA) { - if (!ata_id_is_ata(id) && !ata_id_is_cfa(id)) - goto err_out; - } else { - if (ata_id_is_ata(id)) - goto err_out; + if ((class == ATA_DEV_ATA) != (ata_id_is_ata(id) | ata_id_is_cfa(id))) { + rc = -EINVAL; + reason = "device reports illegal type"; + goto err_out; } if (post_reset && class == ATA_DEV_ATA) { @@ -1277,7 +1159,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, * Some drives were very specific about that exact sequence. */ if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) { - err_mask = ata_dev_init_params(dev, id[3], id[6]); + err_mask = ata_dev_init_params(ap, dev, id[3], id[6]); if (err_mask) { rc = -EIO; reason = "INIT_DEV_PARAMS failed"; @@ -1293,58 +1175,25 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, } *p_class = class; - + *p_id = id; return 0; err_out: - if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, "failed to IDENTIFY " - "(%s, err_mask=0x%x)\n", reason, err_mask); + printk(KERN_WARNING "ata%u: dev %u failed to IDENTIFY (%s)\n", + ap->id, dev->devno, reason); + kfree(id); return rc; } -static inline u8 ata_dev_knobble(struct ata_device *dev) +static inline u8 ata_dev_knobble(const struct ata_port *ap, + struct ata_device *dev) { - return ((dev->ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id))); -} - -static void ata_dev_config_ncq(struct ata_device *dev, - char *desc, size_t desc_sz) -{ - struct ata_port *ap = dev->ap; - int hdepth = 0, ddepth = ata_id_queue_depth(dev->id); - - if (!ata_id_has_ncq(dev->id)) { - desc[0] = '\0'; - return; - } - - if (ap->flags & ATA_FLAG_NCQ) { - hdepth = min(ap->host->can_queue, ATA_MAX_QUEUE - 1); - dev->flags |= ATA_DFLAG_NCQ; - } - - if (hdepth >= ddepth) - snprintf(desc, desc_sz, "NCQ (depth %d)", ddepth); - else - snprintf(desc, desc_sz, "NCQ (depth %d/%d)", hdepth, ddepth); -} - -static void ata_set_port_max_cmd_len(struct ata_port *ap) -{ - int i; - - if (ap->host) { - ap->host->max_cmd_len = 0; - for (i = 0; i < ATA_MAX_DEVICES; i++) - ap->host->max_cmd_len = max_t(unsigned int, - ap->host->max_cmd_len, - ap->device[i].cdb_len); - } + return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id))); } /** * ata_dev_configure - Configure the specified ATA/ATAPI device + * @ap: Port on which target device resides * @dev: Target device to configure * @print_info: Enable device info printout * @@ -1357,32 +1206,27 @@ static void ata_set_port_max_cmd_len(struct ata_port *ap) * RETURNS: * 0 on success, -errno otherwise */ -int ata_dev_configure(struct ata_device *dev, int print_info) +static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev, + int print_info) { - struct ata_port *ap = dev->ap; const u16 *id = dev->id; unsigned int xfer_mask; - int rc; + int i, rc; - if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { - ata_dev_printk(dev, KERN_INFO, - "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n", - __FUNCTION__, ap->id, dev->devno); + if (!ata_dev_present(dev)) { + DPRINTK("ENTER/EXIT (host %u, dev %u) -- nodev\n", + ap->id, dev->devno); return 0; } - if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", - __FUNCTION__, ap->id, dev->devno); + DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno); /* print device capabilities */ - if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, - "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " - "85:%04x 86:%04x 87:%04x 88:%04x\n", - __FUNCTION__, - id[49], id[82], id[83], id[84], - id[85], id[86], id[87], id[88]); + if (print_info) + printk(KERN_DEBUG "ata%u: dev %u cfg 49:%04x 82:%04x 83:%04x " + "84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n", + ap->id, dev->devno, id[49], id[82], id[83], + id[84], id[85], id[86], id[87], id[88]); /* initialize to-be-configured parameters */ dev->flags &= ~ATA_DFLAG_CFG_MASK; @@ -1400,8 +1244,7 @@ int ata_dev_configure(struct ata_device *dev, int print_info) /* find max transfer mode; for printk only */ xfer_mask = ata_id_xfermask(id); - if (ata_msg_probe(ap)) - ata_dump_id(id); + ata_dump_id(id); /* ATA-specific feature tests */ if (dev->class == ATA_DEV_ATA) { @@ -1409,7 +1252,6 @@ int ata_dev_configure(struct ata_device *dev, int print_info) if (ata_id_has_lba(id)) { const char *lba_desc; - char ncq_desc[20]; lba_desc = "LBA"; dev->flags |= ATA_DFLAG_LBA; @@ -1418,17 +1260,15 @@ int ata_dev_configure(struct ata_device *dev, int print_info) lba_desc = "LBA48"; } - /* config NCQ */ - ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc)); - /* print device info to dmesg */ - if (ata_msg_drv(ap) && print_info) - ata_dev_printk(dev, KERN_INFO, "ATA-%d, " - "max %s, %Lu sectors: %s %s\n", - ata_id_major_version(id), - ata_mode_string(xfer_mask), - (unsigned long long)dev->n_sectors, - lba_desc, ncq_desc); + if (print_info) + printk(KERN_INFO "ata%u: dev %u ATA-%d, " + "max %s, %Lu sectors: %s\n", + ap->id, dev->devno, + ata_id_major_version(id), + ata_mode_string(xfer_mask), + (unsigned long long)dev->n_sectors, + lba_desc); } else { /* CHS */ @@ -1445,22 +1285,14 @@ int ata_dev_configure(struct ata_device *dev, int print_info) } /* print device info to dmesg */ - if (ata_msg_drv(ap) && print_info) - ata_dev_printk(dev, KERN_INFO, "ATA-%d, " - "max %s, %Lu sectors: CHS %u/%u/%u\n", - ata_id_major_version(id), - ata_mode_string(xfer_mask), - (unsigned long long)dev->n_sectors, - dev->cylinders, dev->heads, - dev->sectors); - } - - if (dev->id[59] & 0x100) { - dev->multi_count = dev->id[59] & 0xff; - if (ata_msg_drv(ap) && print_info) - ata_dev_printk(dev, KERN_INFO, - "ata%u: dev %u multi count %u\n", - ap->id, dev->devno, dev->multi_count); + if (print_info) + printk(KERN_INFO "ata%u: dev %u ATA-%d, " + "max %s, %Lu sectors: CHS %u/%u/%u\n", + ap->id, dev->devno, + ata_id_major_version(id), + ata_mode_string(xfer_mask), + (unsigned long long)dev->n_sectors, + dev->cylinders, dev->heads, dev->sectors); } dev->cdb_len = 16; @@ -1468,37 +1300,31 @@ int ata_dev_configure(struct ata_device *dev, int print_info) /* ATAPI-specific feature tests */ else if (dev->class == ATA_DEV_ATAPI) { - char *cdb_intr_string = ""; - rc = atapi_cdb_len(id); if ((rc < 12) || (rc > ATAPI_CDB_LEN)) { - if (ata_msg_warn(ap)) - ata_dev_printk(dev, KERN_WARNING, - "unsupported CDB len\n"); + printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id); rc = -EINVAL; goto err_out_nosup; } dev->cdb_len = (unsigned int) rc; - if (ata_id_cdb_intr(dev->id)) { - dev->flags |= ATA_DFLAG_CDB_INTR; - cdb_intr_string = ", CDB intr"; - } - /* print device info to dmesg */ - if (ata_msg_drv(ap) && print_info) - ata_dev_printk(dev, KERN_INFO, "ATAPI, max %s%s\n", - ata_mode_string(xfer_mask), - cdb_intr_string); + if (print_info) + printk(KERN_INFO "ata%u: dev %u ATAPI, max %s\n", + ap->id, dev->devno, ata_mode_string(xfer_mask)); } - ata_set_port_max_cmd_len(ap); + ap->host->max_cmd_len = 0; + for (i = 0; i < ATA_MAX_DEVICES; i++) + ap->host->max_cmd_len = max_t(unsigned int, + ap->host->max_cmd_len, + ap->device[i].cdb_len); /* limit bridge transfers to udma5, 200 sectors */ - if (ata_dev_knobble(dev)) { - if (ata_msg_drv(ap) && print_info) - ata_dev_printk(dev, KERN_INFO, - "applying bridge limits\n"); + if (ata_dev_knobble(ap, dev)) { + if (print_info) + printk(KERN_INFO "ata%u(%u): applying bridge limits\n", + ap->id, dev->devno); dev->udma_mask &= ATA_UDMA5; dev->max_sectors = ATA_MAX_SECTORS; } @@ -1506,15 +1332,11 @@ int ata_dev_configure(struct ata_device *dev, int print_info) if (ap->ops->dev_config) ap->ops->dev_config(ap, dev); - if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n", - __FUNCTION__, ata_chk_status(ap)); + DPRINTK("EXIT, drv_stat = 0x%x\n", ata_chk_status(ap)); return 0; err_out_nosup: - if (ata_msg_probe(ap)) - ata_dev_printk(dev, KERN_DEBUG, - "%s: EXIT, err\n", __FUNCTION__); + DPRINTK("EXIT, err\n"); return rc; } @@ -1530,104 +1352,79 @@ err_out_nosup: * PCI/etc. bus probe sem. * * RETURNS: - * Zero on success, negative errno otherwise. + * Zero on success, non-zero on error. */ static int ata_bus_probe(struct ata_port *ap) { unsigned int classes[ATA_MAX_DEVICES]; - int tries[ATA_MAX_DEVICES]; - int i, rc, down_xfermask; - struct ata_device *dev; + unsigned int i, rc, found = 0; ata_port_probe(ap); - for (i = 0; i < ATA_MAX_DEVICES; i++) - tries[i] = ATA_PROBE_MAX_TRIES; - - retry: - down_xfermask = 0; - /* reset and determine device classes */ - ap->ops->phy_reset(ap); + for (i = 0; i < ATA_MAX_DEVICES; i++) + classes[i] = ATA_DEV_UNKNOWN; - for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; + if (ap->ops->probe_reset) { + rc = ap->ops->probe_reset(ap, classes); + if (rc) { + printk("ata%u: reset failed (errno=%d)\n", ap->id, rc); + return rc; + } + } else { + ap->ops->phy_reset(ap); - if (!(ap->flags & ATA_FLAG_DISABLED) && - dev->class != ATA_DEV_UNKNOWN) - classes[dev->devno] = dev->class; - else - classes[dev->devno] = ATA_DEV_NONE; + if (!(ap->flags & ATA_FLAG_PORT_DISABLED)) + for (i = 0; i < ATA_MAX_DEVICES; i++) + classes[i] = ap->device[i].class; - dev->class = ATA_DEV_UNKNOWN; + ata_port_probe(ap); } - ata_port_probe(ap); - - /* after the reset the device state is PIO 0 and the controller - state is undefined. Record the mode */ - for (i = 0; i < ATA_MAX_DEVICES; i++) - ap->device[i].pio_mode = XFER_PIO_0; + if (classes[i] == ATA_DEV_UNKNOWN) + classes[i] = ATA_DEV_NONE; /* read IDENTIFY page and configure devices */ for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; + struct ata_device *dev = &ap->device[i]; - if (tries[i]) - dev->class = classes[i]; + dev->class = classes[i]; - if (!ata_dev_enabled(dev)) + if (!ata_dev_present(dev)) continue; - rc = ata_dev_read_id(dev, &dev->class, 1, dev->id); - if (rc) - goto fail; + WARN_ON(dev->id != NULL); + if (ata_dev_read_id(ap, dev, &dev->class, 1, &dev->id)) { + dev->class = ATA_DEV_NONE; + continue; + } - rc = ata_dev_configure(dev, 1); - if (rc) - goto fail; - } + if (ata_dev_configure(ap, dev, 1)) { + ata_dev_disable(ap, dev); + continue; + } - /* configure transfer mode */ - rc = ata_set_mode(ap, &dev); - if (rc) { - down_xfermask = 1; - goto fail; + found = 1; } - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (ata_dev_enabled(&ap->device[i])) - return 0; + if (!found) + goto err_out_disable; - /* no device present, disable port */ - ata_port_disable(ap); - ap->ops->port_disable(ap); - return -ENODEV; + if (ap->ops->set_mode) + ap->ops->set_mode(ap); + else + ata_set_mode(ap); - fail: - switch (rc) { - case -EINVAL: - case -ENODEV: - tries[dev->devno] = 0; - break; - case -EIO: - sata_down_spd_limit(ap); - /* fall through */ - default: - tries[dev->devno]--; - if (down_xfermask && - ata_down_xfermask_limit(dev, tries[dev->devno] == 1)) - tries[dev->devno] = 0; - } + if (ap->flags & ATA_FLAG_PORT_DISABLED) + goto err_out_disable; - if (!tries[dev->devno]) { - ata_down_xfermask_limit(dev, 1); - ata_dev_disable(dev); - } + return 0; - goto retry; +err_out_disable: + ap->ops->port_disable(ap); + return -1; } /** @@ -1643,7 +1440,7 @@ static int ata_bus_probe(struct ata_port *ap) void ata_port_probe(struct ata_port *ap) { - ap->flags &= ~ATA_FLAG_DISABLED; + ap->flags &= ~ATA_FLAG_PORT_DISABLED; } /** @@ -1657,21 +1454,27 @@ void ata_port_probe(struct ata_port *ap) */ static void sata_print_link_status(struct ata_port *ap) { - u32 sstatus, scontrol, tmp; + u32 sstatus, tmp; + const char *speed; - if (sata_scr_read(ap, SCR_STATUS, &sstatus)) + if (!ap->ops->scr_read) return; - sata_scr_read(ap, SCR_CONTROL, &scontrol); - if (ata_port_online(ap)) { + sstatus = scr_read(ap, SCR_STATUS); + + if (sata_dev_present(ap)) { tmp = (sstatus >> 4) & 0xf; - ata_port_printk(ap, KERN_INFO, - "SATA link up %s (SStatus %X SControl %X)\n", - sata_spd_string(tmp), sstatus, scontrol); + if (tmp & (1 << 0)) + speed = "1.5"; + else if (tmp & (1 << 1)) + speed = "3.0"; + else + speed = ""; + printk(KERN_INFO "ata%u: SATA link up %s Gbps (SStatus %X)\n", + ap->id, speed, sstatus); } else { - ata_port_printk(ap, KERN_INFO, - "SATA link down (SStatus %X SControl %X)\n", - sstatus, scontrol); + printk(KERN_INFO "ata%u: SATA link down (SStatus %X)\n", + ap->id, sstatus); } } @@ -1694,18 +1497,17 @@ void __sata_phy_reset(struct ata_port *ap) if (ap->flags & ATA_FLAG_SATA_RESET) { /* issue phy wake/reset */ - sata_scr_write_flush(ap, SCR_CONTROL, 0x301); + scr_write_flush(ap, SCR_CONTROL, 0x301); /* Couldn't find anything in SATA I/II specs, but * AHCI-1.1 10.4.2 says at least 1 ms. */ mdelay(1); } - /* phy wake/clear reset */ - sata_scr_write_flush(ap, SCR_CONTROL, 0x300); + scr_write_flush(ap, SCR_CONTROL, 0x300); /* phy wake/clear reset */ /* wait for phy to become ready, if necessary */ do { msleep(200); - sata_scr_read(ap, SCR_STATUS, &sstatus); + sstatus = scr_read(ap, SCR_STATUS); if ((sstatus & 0xf) != 1) break; } while (time_before(jiffies, timeout)); @@ -1714,12 +1516,12 @@ void __sata_phy_reset(struct ata_port *ap) sata_print_link_status(ap); /* TODO: phy layer with polling, timeouts, etc. */ - if (!ata_port_offline(ap)) + if (sata_dev_present(ap)) ata_port_probe(ap); else ata_port_disable(ap); - if (ap->flags & ATA_FLAG_DISABLED) + if (ap->flags & ATA_FLAG_PORT_DISABLED) return; if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { @@ -1744,24 +1546,24 @@ void __sata_phy_reset(struct ata_port *ap) void sata_phy_reset(struct ata_port *ap) { __sata_phy_reset(ap); - if (ap->flags & ATA_FLAG_DISABLED) + if (ap->flags & ATA_FLAG_PORT_DISABLED) return; ata_bus_reset(ap); } /** * ata_dev_pair - return other device on cable + * @ap: port * @adev: device * * Obtain the other device on the same cable, or if none is * present NULL is returned */ -struct ata_device *ata_dev_pair(struct ata_device *adev) +struct ata_device *ata_dev_pair(struct ata_port *ap, struct ata_device *adev) { - struct ata_port *ap = adev->ap; struct ata_device *pair = &ap->device[1 - adev->devno]; - if (!ata_dev_enabled(pair)) + if (!ata_dev_present(pair)) return NULL; return pair; } @@ -1783,122 +1585,7 @@ void ata_port_disable(struct ata_port *ap) { ap->device[0].class = ATA_DEV_NONE; ap->device[1].class = ATA_DEV_NONE; - ap->flags |= ATA_FLAG_DISABLED; -} - -/** - * sata_down_spd_limit - adjust SATA spd limit downward - * @ap: Port to adjust SATA spd limit for - * - * Adjust SATA spd limit of @ap downward. Note that this - * function only adjusts the limit. The change must be applied - * using sata_set_spd(). - * - * LOCKING: - * Inherited from caller. - * - * RETURNS: - * 0 on success, negative errno on failure - */ -int sata_down_spd_limit(struct ata_port *ap) -{ - u32 sstatus, spd, mask; - int rc, highbit; - - rc = sata_scr_read(ap, SCR_STATUS, &sstatus); - if (rc) - return rc; - - mask = ap->sata_spd_limit; - if (mask <= 1) - return -EINVAL; - highbit = fls(mask) - 1; - mask &= ~(1 << highbit); - - spd = (sstatus >> 4) & 0xf; - if (spd <= 1) - return -EINVAL; - spd--; - mask &= (1 << spd) - 1; - if (!mask) - return -EINVAL; - - ap->sata_spd_limit = mask; - - ata_port_printk(ap, KERN_WARNING, "limiting SATA link speed to %s\n", - sata_spd_string(fls(mask))); - - return 0; -} - -static int __sata_set_spd_needed(struct ata_port *ap, u32 *scontrol) -{ - u32 spd, limit; - - if (ap->sata_spd_limit == UINT_MAX) - limit = 0; - else - limit = fls(ap->sata_spd_limit); - - spd = (*scontrol >> 4) & 0xf; - *scontrol = (*scontrol & ~0xf0) | ((limit & 0xf) << 4); - - return spd != limit; -} - -/** - * sata_set_spd_needed - is SATA spd configuration needed - * @ap: Port in question - * - * Test whether the spd limit in SControl matches - * @ap->sata_spd_limit. This function is used to determine - * whether hardreset is necessary to apply SATA spd - * configuration. - * - * LOCKING: - * Inherited from caller. - * - * RETURNS: - * 1 if SATA spd configuration is needed, 0 otherwise. - */ -int sata_set_spd_needed(struct ata_port *ap) -{ - u32 scontrol; - - if (sata_scr_read(ap, SCR_CONTROL, &scontrol)) - return 0; - - return __sata_set_spd_needed(ap, &scontrol); -} - -/** - * sata_set_spd - set SATA spd according to spd limit - * @ap: Port to set SATA spd for - * - * Set SATA spd of @ap according to sata_spd_limit. - * - * LOCKING: - * Inherited from caller. - * - * RETURNS: - * 0 if spd doesn't need to be changed, 1 if spd has been - * changed. Negative errno if SCR registers are inaccessible. - */ -int sata_set_spd(struct ata_port *ap) -{ - u32 scontrol; - int rc; - - if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol))) - return rc; - - if (!__sata_set_spd_needed(ap, &scontrol)) - return 0; - - if ((rc = sata_scr_write(ap, SCR_CONTROL, scontrol))) - return rc; - - return 1; + ap->flags |= ATA_FLAG_PORT_DISABLED; } /* @@ -2049,150 +1736,53 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, return 0; } -/** - * ata_down_xfermask_limit - adjust dev xfer masks downward - * @dev: Device to adjust xfer masks - * @force_pio0: Force PIO0 - * - * Adjust xfer masks of @dev downward. Note that this function - * does not apply the change. Invoking ata_set_mode() afterwards - * will apply the limit. - * - * LOCKING: - * Inherited from caller. - * - * RETURNS: - * 0 on success, negative errno on failure - */ -int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0) -{ - unsigned long xfer_mask; - int highbit; - - xfer_mask = ata_pack_xfermask(dev->pio_mask, dev->mwdma_mask, - dev->udma_mask); - - if (!xfer_mask) - goto fail; - /* don't gear down to MWDMA from UDMA, go directly to PIO */ - if (xfer_mask & ATA_MASK_UDMA) - xfer_mask &= ~ATA_MASK_MWDMA; - - highbit = fls(xfer_mask) - 1; - xfer_mask &= ~(1 << highbit); - if (force_pio0) - xfer_mask &= 1 << ATA_SHIFT_PIO; - if (!xfer_mask) - goto fail; - - ata_unpack_xfermask(xfer_mask, &dev->pio_mask, &dev->mwdma_mask, - &dev->udma_mask); - - ata_dev_printk(dev, KERN_WARNING, "limiting speed to %s\n", - ata_mode_string(xfer_mask)); - - return 0; - - fail: - return -EINVAL; -} - -static int ata_dev_set_mode(struct ata_device *dev) +static int ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev) { unsigned int err_mask; int rc; - dev->flags &= ~ATA_DFLAG_PIO; if (dev->xfer_shift == ATA_SHIFT_PIO) dev->flags |= ATA_DFLAG_PIO; - err_mask = ata_dev_set_xfermode(dev); + err_mask = ata_dev_set_xfermode(ap, dev); if (err_mask) { - ata_dev_printk(dev, KERN_ERR, "failed to set xfermode " - "(err_mask=0x%x)\n", err_mask); + printk(KERN_ERR + "ata%u: failed to set xfermode (err_mask=0x%x)\n", + ap->id, err_mask); return -EIO; } - rc = ata_dev_revalidate(dev, 0); - if (rc) + rc = ata_dev_revalidate(ap, dev, 0); + if (rc) { + printk(KERN_ERR + "ata%u: failed to revalidate after set xfermode\n", + ap->id); return rc; + } DPRINTK("xfer_shift=%u, xfer_mode=0x%x\n", dev->xfer_shift, (int)dev->xfer_mode); - ata_dev_printk(dev, KERN_INFO, "configured for %s\n", - ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode))); + printk(KERN_INFO "ata%u: dev %u configured for %s\n", + ap->id, dev->devno, + ata_mode_string(ata_xfer_mode2mask(dev->xfer_mode))); return 0; } -/** - * ata_set_mode - Program timings and issue SET FEATURES - XFER - * @ap: port on which timings will be programmed - * @r_failed_dev: out paramter for failed device - * - * Set ATA device disk transfer mode (PIO3, UDMA6, etc.). If - * ata_set_mode() fails, pointer to the failing device is - * returned in @r_failed_dev. - * - * LOCKING: - * PCI/etc. bus probe sem. - * - * RETURNS: - * 0 on success, negative errno otherwise - */ -int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) +static int ata_host_set_pio(struct ata_port *ap) { - struct ata_device *dev; - int i, rc = 0, used_dma = 0, found = 0; - - /* has private set_mode? */ - if (ap->ops->set_mode) { - /* FIXME: make ->set_mode handle no device case and - * return error code and failing device on failure. - */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - if (ata_dev_ready(&ap->device[i])) { - ap->ops->set_mode(ap); - break; - } - } - return 0; - } + int i; - /* step 1: calculate xfer_mask */ for (i = 0; i < ATA_MAX_DEVICES; i++) { - unsigned int pio_mask, dma_mask; - - dev = &ap->device[i]; + struct ata_device *dev = &ap->device[i]; - if (!ata_dev_enabled(dev)) + if (!ata_dev_present(dev)) continue; - ata_dev_xfermask(dev); - - pio_mask = ata_pack_xfermask(dev->pio_mask, 0, 0); - dma_mask = ata_pack_xfermask(0, dev->mwdma_mask, dev->udma_mask); - dev->pio_mode = ata_xfer_mask2mode(pio_mask); - dev->dma_mode = ata_xfer_mask2mode(dma_mask); - - found = 1; - if (dev->dma_mode) - used_dma = 1; - } - if (!found) - goto out; - - /* step 2: always set host PIO timings */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; - if (!ata_dev_enabled(dev)) - continue; - - if (!dev->pio_mode) { - ata_dev_printk(dev, KERN_WARNING, "no PIO support\n"); - rc = -EINVAL; - goto out; - } + if (!dev->pio_mode) { + printk(KERN_WARNING "ata%u: no PIO support for device %d.\n", ap->id, i); + return -1; + } dev->xfer_mode = dev->pio_mode; dev->xfer_shift = ATA_SHIFT_PIO; @@ -2200,11 +1790,17 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) ap->ops->set_piomode(ap, dev); } - /* step 3: set host DMA timings */ + return 0; +} + +static void ata_host_set_dma(struct ata_port *ap) +{ + int i; + for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; + struct ata_device *dev = &ap->device[i]; - if (!ata_dev_enabled(dev) || !dev->dma_mode) + if (!ata_dev_present(dev) || !dev->dma_mode) continue; dev->xfer_mode = dev->dma_mode; @@ -2212,34 +1808,79 @@ int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) if (ap->ops->set_dmamode) ap->ops->set_dmamode(ap, dev); } +} + +/** + * ata_set_mode - Program timings and issue SET FEATURES - XFER + * @ap: port on which timings will be programmed + * + * Set ATA device disk transfer mode (PIO3, UDMA6, etc.). + * + * LOCKING: + * PCI/etc. bus probe sem. + */ +static void ata_set_mode(struct ata_port *ap) +{ + int i, rc, used_dma = 0; + + /* step 1: calculate xfer_mask */ + for (i = 0; i < ATA_MAX_DEVICES; i++) { + struct ata_device *dev = &ap->device[i]; + unsigned int pio_mask, dma_mask; + + if (!ata_dev_present(dev)) + continue; + + ata_dev_xfermask(ap, dev); + + /* TODO: let LLDD filter dev->*_mask here */ + + pio_mask = ata_pack_xfermask(dev->pio_mask, 0, 0); + dma_mask = ata_pack_xfermask(0, dev->mwdma_mask, dev->udma_mask); + dev->pio_mode = ata_xfer_mask2mode(pio_mask); + dev->dma_mode = ata_xfer_mask2mode(dma_mask); + + if (dev->dma_mode) + used_dma = 1; + } + + /* step 2: always set host PIO timings */ + rc = ata_host_set_pio(ap); + if (rc) + goto err_out; + + /* step 3: set host DMA timings */ + ata_host_set_dma(ap); /* step 4: update devices' xfer mode */ for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; + struct ata_device *dev = &ap->device[i]; - /* don't udpate suspended devices' xfer mode */ - if (!ata_dev_ready(dev)) + if (!ata_dev_present(dev)) continue; - rc = ata_dev_set_mode(dev); - if (rc) - goto out; + if (ata_dev_set_mode(ap, dev)) + goto err_out; } - /* Record simplex status. If we selected DMA then the other - * host channels are not permitted to do so. + /* + * Record simplex status. If we selected DMA then the other + * host channels are not permitted to do so. */ + if (used_dma && (ap->host_set->flags & ATA_HOST_SIMPLEX)) ap->host_set->simplex_claimed = 1; - /* step5: chip specific finalisation */ + /* + * Chip specific finalisation + */ if (ap->ops->post_set_mode) ap->ops->post_set_mode(ap); - out: - if (rc) - *r_failed_dev = dev; - return rc; + return; + +err_out: + ata_port_disable(ap); } /** @@ -2289,8 +1930,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap, } if (status & ATA_BUSY) - ata_port_printk(ap, KERN_WARNING, - "port is slow to respond, please be patient\n"); + printk(KERN_WARNING "ata%u is slow to respond, " + "please be patient\n", ap->id); timeout = timer_start + tmout; while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) { @@ -2299,8 +1940,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap, } if (status & ATA_BUSY) { - ata_port_printk(ap, KERN_ERR, "port failed to respond " - "(%lu secs)\n", tmout / HZ); + printk(KERN_ERR "ata%u failed to respond (%lu secs)\n", + ap->id, tmout / HZ); return 1; } @@ -2392,10 +2033,8 @@ static unsigned int ata_bus_softreset(struct ata_port *ap, * the bus shows 0xFF because the odd clown forgets the D7 * pulldown resistor. */ - if (ata_check_status(ap) == 0xFF) { - ata_port_printk(ap, KERN_ERR, "SRST failed (status 0xFF)\n"); + if (ata_check_status(ap) == 0xFF) return AC_ERR_OTHER; - } ata_bus_post_reset(ap, devmask); @@ -2419,7 +2058,7 @@ static unsigned int ata_bus_softreset(struct ata_port *ap, * Obtains host_set lock. * * SIDE EFFECTS: - * Sets ATA_FLAG_DISABLED if bus reset fails. + * Sets ATA_FLAG_PORT_DISABLED if bus reset fails. */ void ata_bus_reset(struct ata_port *ap) @@ -2487,191 +2126,60 @@ void ata_bus_reset(struct ata_port *ap) return; err_out: - ata_port_printk(ap, KERN_ERR, "disabling port\n"); + printk(KERN_ERR "ata%u: disabling port\n", ap->id); ap->ops->port_disable(ap); DPRINTK("EXIT\n"); } -/** - * sata_phy_debounce - debounce SATA phy status - * @ap: ATA port to debounce SATA phy status for - * @params: timing parameters { interval, duratinon, timeout } in msec - * - * Make sure SStatus of @ap reaches stable state, determined by - * holding the same value where DET is not 1 for @duration polled - * every @interval, before @timeout. Timeout constraints the - * beginning of the stable state. Because, after hot unplugging, - * DET gets stuck at 1 on some controllers, this functions waits - * until timeout then returns 0 if DET is stable at 1. - * - * LOCKING: - * Kernel thread context (may sleep) - * - * RETURNS: - * 0 on success, -errno on failure. - */ -int sata_phy_debounce(struct ata_port *ap, const unsigned long *params) -{ - unsigned long interval_msec = params[0]; - unsigned long duration = params[1] * HZ / 1000; - unsigned long timeout = jiffies + params[2] * HZ / 1000; - unsigned long last_jiffies; - u32 last, cur; - int rc; - - if ((rc = sata_scr_read(ap, SCR_STATUS, &cur))) - return rc; - cur &= 0xf; - - last = cur; - last_jiffies = jiffies; - - while (1) { - msleep(interval_msec); - if ((rc = sata_scr_read(ap, SCR_STATUS, &cur))) - return rc; - cur &= 0xf; - - /* DET stable? */ - if (cur == last) { - if (cur == 1 && time_before(jiffies, timeout)) - continue; - if (time_after(jiffies, last_jiffies + duration)) - return 0; - continue; - } - - /* unstable, start over */ - last = cur; - last_jiffies = jiffies; - - /* check timeout */ - if (time_after(jiffies, timeout)) - return -EBUSY; - } -} - -/** - * sata_phy_resume - resume SATA phy - * @ap: ATA port to resume SATA phy for - * @params: timing parameters { interval, duratinon, timeout } in msec - * - * Resume SATA phy of @ap and debounce it. - * - * LOCKING: - * Kernel thread context (may sleep) - * - * RETURNS: - * 0 on success, -errno on failure. - */ -int sata_phy_resume(struct ata_port *ap, const unsigned long *params) -{ - u32 scontrol; - int rc; - - if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol))) - return rc; - - scontrol = (scontrol & 0x0f0) | 0x300; - - if ((rc = sata_scr_write(ap, SCR_CONTROL, scontrol))) - return rc; - - /* Some PHYs react badly if SStatus is pounded immediately - * after resuming. Delay 200ms before debouncing. - */ - msleep(200); - - return sata_phy_debounce(ap, params); -} - -static void ata_wait_spinup(struct ata_port *ap) +static int sata_phy_resume(struct ata_port *ap) { - struct ata_eh_context *ehc = &ap->eh_context; - unsigned long end, secs; - int rc; - - /* first, debounce phy if SATA */ - if (ap->cbl == ATA_CBL_SATA) { - rc = sata_phy_debounce(ap, sata_deb_timing_hotplug); - - /* if debounced successfully and offline, no need to wait */ - if ((rc == 0 || rc == -EOPNOTSUPP) && ata_port_offline(ap)) - return; - } - - /* okay, let's give the drive time to spin up */ - end = ehc->i.hotplug_timestamp + ATA_SPINUP_WAIT * HZ / 1000; - secs = ((end - jiffies) + HZ - 1) / HZ; + unsigned long timeout = jiffies + (HZ * 5); + u32 sstatus; - if (time_after(jiffies, end)) - return; + scr_write_flush(ap, SCR_CONTROL, 0x300); - if (secs > 5) - ata_port_printk(ap, KERN_INFO, "waiting for device to spin up " - "(%lu secs)\n", secs); + /* Wait for phy to become ready, if necessary. */ + do { + msleep(200); + sstatus = scr_read(ap, SCR_STATUS); + if ((sstatus & 0xf) != 1) + return 0; + } while (time_before(jiffies, timeout)); - schedule_timeout_uninterruptible(end - jiffies); + return -1; } /** - * ata_std_prereset - prepare for reset - * @ap: ATA port to be reset + * ata_std_probeinit - initialize probing + * @ap: port to be probed * - * @ap is about to be reset. Initialize it. - * - * LOCKING: - * Kernel thread context (may sleep) + * @ap is about to be probed. Initialize it. This function is + * to be used as standard callback for ata_drive_probe_reset(). * - * RETURNS: - * 0 on success, -errno otherwise. + * NOTE!!! Do not use this function as probeinit if a low level + * driver implements only hardreset. Just pass NULL as probeinit + * in that case. Using this function is probably okay but doing + * so makes reset sequence different from the original + * ->phy_reset implementation and Jeff nervous. :-P */ -int ata_std_prereset(struct ata_port *ap) +void ata_std_probeinit(struct ata_port *ap) { - struct ata_eh_context *ehc = &ap->eh_context; - const unsigned long *timing = sata_ehc_deb_timing(ehc); - int rc; - - /* handle link resume & hotplug spinup */ - if ((ehc->i.flags & ATA_EHI_RESUME_LINK) && - (ap->flags & ATA_FLAG_HRST_TO_RESUME)) - ehc->i.action |= ATA_EH_HARDRESET; - - if ((ehc->i.flags & ATA_EHI_HOTPLUGGED) && - (ap->flags & ATA_FLAG_SKIP_D2H_BSY)) - ata_wait_spinup(ap); - - /* if we're about to do hardreset, nothing more to do */ - if (ehc->i.action & ATA_EH_HARDRESET) - return 0; - - /* if SATA, resume phy */ - if (ap->cbl == ATA_CBL_SATA) { - rc = sata_phy_resume(ap, timing); - if (rc && rc != -EOPNOTSUPP) { - /* phy resume failed */ - ata_port_printk(ap, KERN_WARNING, "failed to resume " - "link for reset (errno=%d)\n", rc); - return rc; - } + if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { + sata_phy_resume(ap); + if (sata_dev_present(ap)) + ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); } - - /* Wait for !BSY if the controller can wait for the first D2H - * Reg FIS and we don't know that no device is attached. - */ - if (!(ap->flags & ATA_FLAG_SKIP_D2H_BSY) && !ata_port_offline(ap)) - ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); - - return 0; } /** * ata_std_softreset - reset host port via ATA SRST * @ap: port to reset + * @verbose: fail verbosely * @classes: resulting classes of attached devices * - * Reset host port using ATA SRST. + * Reset host port using ATA SRST. This function is to be used + * as standard callback for ata_drive_*_reset() functions. * * LOCKING: * Kernel thread context (may sleep) @@ -2679,7 +2187,7 @@ int ata_std_prereset(struct ata_port *ap) * RETURNS: * 0 on success, -errno otherwise. */ -int ata_std_softreset(struct ata_port *ap, unsigned int *classes) +int ata_std_softreset(struct ata_port *ap, int verbose, unsigned int *classes) { unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; unsigned int devmask = 0, err_mask; @@ -2687,7 +2195,7 @@ int ata_std_softreset(struct ata_port *ap, unsigned int *classes) DPRINTK("ENTER\n"); - if (ata_port_offline(ap)) { + if (ap->ops->scr_read && !sata_dev_present(ap)) { classes[0] = ATA_DEV_NONE; goto out; } @@ -2705,7 +2213,11 @@ int ata_std_softreset(struct ata_port *ap, unsigned int *classes) DPRINTK("about to softreset, devmask=%x\n", devmask); err_mask = ata_bus_softreset(ap, devmask); if (err_mask) { - ata_port_printk(ap, KERN_ERR, "SRST failed (err_mask=0x%x)\n", + if (verbose) + printk(KERN_ERR "ata%u: SRST failed (err_mask=0x%x)\n", + ap->id, err_mask); + else + DPRINTK("EXIT, softreset failed (err_mask=0x%x)\n", err_mask); return -EIO; } @@ -2723,9 +2235,12 @@ int ata_std_softreset(struct ata_port *ap, unsigned int *classes) /** * sata_std_hardreset - reset host port via SATA phy reset * @ap: port to reset + * @verbose: fail verbosely * @class: resulting class of attached device * * SATA phy-reset host port using DET bits of SControl register. + * This function is to be used as standard callback for + * ata_drive_*_reset(). * * LOCKING: * Kernel thread context (may sleep) @@ -2733,59 +2248,35 @@ int ata_std_softreset(struct ata_port *ap, unsigned int *classes) * RETURNS: * 0 on success, -errno otherwise. */ -int sata_std_hardreset(struct ata_port *ap, unsigned int *class) +int sata_std_hardreset(struct ata_port *ap, int verbose, unsigned int *class) { - struct ata_eh_context *ehc = &ap->eh_context; - const unsigned long *timing = sata_ehc_deb_timing(ehc); - u32 scontrol; - int rc; - DPRINTK("ENTER\n"); - if (sata_set_spd_needed(ap)) { - /* SATA spec says nothing about how to reconfigure - * spd. To be on the safe side, turn off phy during - * reconfiguration. This works for at least ICH7 AHCI - * and Sil3124. - */ - if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol))) - return rc; - - scontrol = (scontrol & 0x0f0) | 0x304; - - if ((rc = sata_scr_write(ap, SCR_CONTROL, scontrol))) - return rc; - - sata_set_spd(ap); - } - - /* issue phy wake/reset */ - if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol))) - return rc; - - scontrol = (scontrol & 0x0f0) | 0x301; - - if ((rc = sata_scr_write_flush(ap, SCR_CONTROL, scontrol))) - return rc; + /* Issue phy wake/reset */ + scr_write_flush(ap, SCR_CONTROL, 0x301); - /* Couldn't find anything in SATA I/II specs, but AHCI-1.1 + /* + * Couldn't find anything in SATA I/II specs, but AHCI-1.1 * 10.4.2 says at least 1 ms. */ msleep(1); - /* bring phy back */ - sata_phy_resume(ap, timing); + /* Bring phy back */ + sata_phy_resume(ap); /* TODO: phy layer with polling, timeouts, etc. */ - if (ata_port_offline(ap)) { + if (!sata_dev_present(ap)) { *class = ATA_DEV_NONE; DPRINTK("EXIT, link offline\n"); return 0; } if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { - ata_port_printk(ap, KERN_ERR, - "COMRESET failed (device not ready)\n"); + if (verbose) + printk(KERN_ERR "ata%u: COMRESET failed " + "(device not ready)\n", ap->id); + else + DPRINTK("EXIT, device not ready\n"); return -EIO; } @@ -2806,28 +2297,27 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) * the device might have been reset more than once using * different reset methods before postreset is invoked. * + * This function is to be used as standard callback for + * ata_drive_*_reset(). + * * LOCKING: * Kernel thread context (may sleep) */ void ata_std_postreset(struct ata_port *ap, unsigned int *classes) { - u32 serror; - DPRINTK("ENTER\n"); - /* print link status */ - sata_print_link_status(ap); + /* set cable type if it isn't already set */ + if (ap->cbl == ATA_CBL_NONE && ap->flags & ATA_FLAG_SATA) + ap->cbl = ATA_CBL_SATA; - /* clear SError */ - if (sata_scr_read(ap, SCR_ERROR, &serror) == 0) - sata_scr_write(ap, SCR_ERROR, serror); + /* print link status */ + if (ap->cbl == ATA_CBL_SATA) + sata_print_link_status(ap); /* re-enable interrupts */ - if (!ap->ops->error_handler) { - /* FIXME: hack. create a hook instead */ - if (ap->ioaddr.ctl_addr) - ata_irq_on(ap); - } + if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */ + ata_irq_on(ap); /* is double-select really necessary? */ if (classes[0] != ATA_DEV_NONE) @@ -2852,8 +2342,127 @@ void ata_std_postreset(struct ata_port *ap, unsigned int *classes) DPRINTK("EXIT\n"); } +/** + * ata_std_probe_reset - standard probe reset method + * @ap: prot to perform probe-reset + * @classes: resulting classes of attached devices + * + * The stock off-the-shelf ->probe_reset method. + * + * LOCKING: + * Kernel thread context (may sleep) + * + * RETURNS: + * 0 on success, -errno otherwise. + */ +int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes) +{ + ata_reset_fn_t hardreset; + + hardreset = NULL; + if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read) + hardreset = sata_std_hardreset; + + return ata_drive_probe_reset(ap, ata_std_probeinit, + ata_std_softreset, hardreset, + ata_std_postreset, classes); +} + +static int do_probe_reset(struct ata_port *ap, ata_reset_fn_t reset, + ata_postreset_fn_t postreset, + unsigned int *classes) +{ + int i, rc; + + for (i = 0; i < ATA_MAX_DEVICES; i++) + classes[i] = ATA_DEV_UNKNOWN; + + rc = reset(ap, 0, classes); + if (rc) + return rc; + + /* If any class isn't ATA_DEV_UNKNOWN, consider classification + * is complete and convert all ATA_DEV_UNKNOWN to + * ATA_DEV_NONE. + */ + for (i = 0; i < ATA_MAX_DEVICES; i++) + if (classes[i] != ATA_DEV_UNKNOWN) + break; + + if (i < ATA_MAX_DEVICES) + for (i = 0; i < ATA_MAX_DEVICES; i++) + if (classes[i] == ATA_DEV_UNKNOWN) + classes[i] = ATA_DEV_NONE; + + if (postreset) + postreset(ap, classes); + + return classes[0] != ATA_DEV_UNKNOWN ? 0 : -ENODEV; +} + +/** + * ata_drive_probe_reset - Perform probe reset with given methods + * @ap: port to reset + * @probeinit: probeinit method (can be NULL) + * @softreset: softreset method (can be NULL) + * @hardreset: hardreset method (can be NULL) + * @postreset: postreset method (can be NULL) + * @classes: resulting classes of attached devices + * + * Reset the specified port and classify attached devices using + * given methods. This function prefers softreset but tries all + * possible reset sequences to reset and classify devices. This + * function is intended to be used for constructing ->probe_reset + * callback by low level drivers. + * + * Reset methods should follow the following rules. + * + * - Return 0 on sucess, -errno on failure. + * - If classification is supported, fill classes[] with + * recognized class codes. + * - If classification is not supported, leave classes[] alone. + * - If verbose is non-zero, print error message on failure; + * otherwise, shut up. + * + * LOCKING: + * Kernel thread context (may sleep) + * + * RETURNS: + * 0 on success, -EINVAL if no reset method is avaliable, -ENODEV + * if classification fails, and any error code from reset + * methods. + */ +int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit, + ata_reset_fn_t softreset, ata_reset_fn_t hardreset, + ata_postreset_fn_t postreset, unsigned int *classes) +{ + int rc = -EINVAL; + + if (probeinit) + probeinit(ap); + + if (softreset) { + rc = do_probe_reset(ap, softreset, postreset, classes); + if (rc == 0) + return 0; + } + + if (!hardreset) + return rc; + + rc = do_probe_reset(ap, hardreset, postreset, classes); + if (rc == 0 || rc != -ENODEV) + return rc; + + if (softreset) + rc = do_probe_reset(ap, softreset, postreset, classes); + + return rc; +} + /** * ata_dev_same_device - Determine whether new ID matches configured device + * @ap: port on which the device to compare against resides * @dev: device to compare against * @new_class: class of the new device * @new_id: IDENTIFY page of the new device @@ -2868,16 +2477,17 @@ void ata_std_postreset(struct ata_port *ap, unsigned int *classes) * RETURNS: * 1 if @dev matches @new_class and @new_id, 0 otherwise. */ -static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, - const u16 *new_id) +static int ata_dev_same_device(struct ata_port *ap, struct ata_device *dev, + unsigned int new_class, const u16 *new_id) { const u16 *old_id = dev->id; unsigned char model[2][41], serial[2][21]; u64 new_n_sectors; if (dev->class != new_class) { - ata_dev_printk(dev, KERN_INFO, "class mismatch %d != %d\n", - dev->class, new_class); + printk(KERN_INFO + "ata%u: dev %u class mismatch %d != %d\n", + ap->id, dev->devno, dev->class, new_class); return 0; } @@ -2888,22 +2498,24 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, new_n_sectors = ata_id_n_sectors(new_id); if (strcmp(model[0], model[1])) { - ata_dev_printk(dev, KERN_INFO, "model number mismatch " - "'%s' != '%s'\n", model[0], model[1]); + printk(KERN_INFO + "ata%u: dev %u model number mismatch '%s' != '%s'\n", + ap->id, dev->devno, model[0], model[1]); return 0; } if (strcmp(serial[0], serial[1])) { - ata_dev_printk(dev, KERN_INFO, "serial number mismatch " - "'%s' != '%s'\n", serial[0], serial[1]); + printk(KERN_INFO + "ata%u: dev %u serial number mismatch '%s' != '%s'\n", + ap->id, dev->devno, serial[0], serial[1]); return 0; } if (dev->class == ATA_DEV_ATA && dev->n_sectors != new_n_sectors) { - ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " - "%llu != %llu\n", - (unsigned long long)dev->n_sectors, - (unsigned long long)new_n_sectors); + printk(KERN_INFO + "ata%u: dev %u n_sectors mismatch %llu != %llu\n", + ap->id, dev->devno, (unsigned long long)dev->n_sectors, + (unsigned long long)new_n_sectors); return 0; } @@ -2912,6 +2524,7 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, /** * ata_dev_revalidate - Revalidate ATA device + * @ap: port on which the device to revalidate resides * @dev: device to revalidate * @post_reset: is this revalidation after reset? * @@ -2924,37 +2537,40 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, * RETURNS: * 0 on success, negative errno otherwise */ -int ata_dev_revalidate(struct ata_device *dev, int post_reset) +int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, + int post_reset) { - unsigned int class = dev->class; - u16 *id = (void *)dev->ap->sector_buf; + unsigned int class; + u16 *id; int rc; - if (!ata_dev_enabled(dev)) { - rc = -ENODEV; - goto fail; - } + if (!ata_dev_present(dev)) + return -ENODEV; - /* read ID data */ - rc = ata_dev_read_id(dev, &class, post_reset, id); + class = dev->class; + id = NULL; + + /* allocate & read ID data */ + rc = ata_dev_read_id(ap, dev, &class, post_reset, &id); if (rc) goto fail; /* is the device still there? */ - if (!ata_dev_same_device(dev, class, id)) { + if (!ata_dev_same_device(ap, dev, class, id)) { rc = -ENODEV; goto fail; } - memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); + kfree(dev->id); + dev->id = id; /* configure device according to the new ID */ - rc = ata_dev_configure(dev, 0); - if (rc == 0) - return 0; + return ata_dev_configure(ap, dev, 0); fail: - ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); + printk(KERN_ERR "ata%u: dev %u revalidation failed (errno=%d)\n", + ap->id, dev->devno, rc); + kfree(id); return rc; } @@ -3010,14 +2626,6 @@ static int ata_dma_blacklisted(const struct ata_device *dev) unsigned int nlen, rlen; int i; - /* We don't support polling DMA. - * DMA blacklist those ATAPI devices with CDB-intr (and use PIO) - * if the LLDD handles only interrupts in the HSM_ST_LAST state. - */ - if ((dev->ap->flags & ATA_FLAG_PIO_POLLING) && - (dev->flags & ATA_DFLAG_CDB_INTR)) - return 1; - ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS, @@ -3038,6 +2646,7 @@ static int ata_dma_blacklisted(const struct ata_device *dev) /** * ata_dev_xfermask - Compute supported xfermask of the given device + * @ap: Port on which the device to compute xfermask for resides * @dev: Device to compute xfermask for * * Compute supported xfermask of @dev and store it in @@ -3052,61 +2661,49 @@ static int ata_dma_blacklisted(const struct ata_device *dev) * LOCKING: * None. */ -static void ata_dev_xfermask(struct ata_device *dev) +static void ata_dev_xfermask(struct ata_port *ap, struct ata_device *dev) { - struct ata_port *ap = dev->ap; struct ata_host_set *hs = ap->host_set; unsigned long xfer_mask; int i; - xfer_mask = ata_pack_xfermask(ap->pio_mask, - ap->mwdma_mask, ap->udma_mask); - - /* Apply cable rule here. Don't apply it early because when - * we handle hot plug the cable type can itself change. - */ - if (ap->cbl == ATA_CBL_PATA40) - xfer_mask &= ~(0xF8 << ATA_SHIFT_UDMA); + xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask, + ap->udma_mask); /* FIXME: Use port-wide xfermask for now */ for (i = 0; i < ATA_MAX_DEVICES; i++) { struct ata_device *d = &ap->device[i]; - - if (ata_dev_absent(d)) + if (!ata_dev_present(d)) continue; - - if (ata_dev_disabled(d)) { - /* to avoid violating device selection timing */ - xfer_mask &= ata_pack_xfermask(d->pio_mask, - UINT_MAX, UINT_MAX); - continue; - } - - xfer_mask &= ata_pack_xfermask(d->pio_mask, - d->mwdma_mask, d->udma_mask); + xfer_mask &= ata_pack_xfermask(d->pio_mask, d->mwdma_mask, + d->udma_mask); xfer_mask &= ata_id_xfermask(d->id); if (ata_dma_blacklisted(d)) xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); + /* Apply cable rule here. Don't apply it early because when + we handle hot plug the cable type can itself change */ + if (ap->cbl == ATA_CBL_PATA40) + xfer_mask &= ~(0xF8 << ATA_SHIFT_UDMA); } if (ata_dma_blacklisted(dev)) - ata_dev_printk(dev, KERN_WARNING, - "device is on DMA blacklist, disabling DMA\n"); + printk(KERN_WARNING "ata%u: dev %u is on DMA blacklist, " + "disabling DMA\n", ap->id, dev->devno); if (hs->flags & ATA_HOST_SIMPLEX) { if (hs->simplex_claimed) xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA); } - if (ap->ops->mode_filter) xfer_mask = ap->ops->mode_filter(ap, dev, xfer_mask); - ata_unpack_xfermask(xfer_mask, &dev->pio_mask, - &dev->mwdma_mask, &dev->udma_mask); + ata_unpack_xfermask(xfer_mask, &dev->pio_mask, &dev->mwdma_mask, + &dev->udma_mask); } /** * ata_dev_set_xfermode - Issue SET FEATURES - XFER MODE command + * @ap: Port associated with device @dev * @dev: Device to which command will be sent * * Issue SET FEATURES - XFER MODE command to device @dev @@ -3119,7 +2716,8 @@ static void ata_dev_xfermask(struct ata_device *dev) * 0 on success, AC_ERR_* mask otherwise. */ -static unsigned int ata_dev_set_xfermode(struct ata_device *dev) +static unsigned int ata_dev_set_xfermode(struct ata_port *ap, + struct ata_device *dev) { struct ata_taskfile tf; unsigned int err_mask; @@ -3127,14 +2725,14 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev) /* set up set-features taskfile */ DPRINTK("set features - xfer mode\n"); - ata_tf_init(dev, &tf); + ata_tf_init(ap, &tf, dev->devno); tf.command = ATA_CMD_SET_FEATURES; tf.feature = SETFEATURES_XFER; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; tf.protocol = ATA_PROT_NODATA; tf.nsect = dev->xfer_mode; - err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); + err_mask = ata_exec_internal(ap, dev, &tf, DMA_NONE, NULL, 0); DPRINTK("EXIT, err_mask=%x\n", err_mask); return err_mask; @@ -3142,6 +2740,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev) /** * ata_dev_init_params - Issue INIT DEV PARAMS command + * @ap: Port associated with device @dev * @dev: Device to which command will be sent * @heads: Number of heads (taskfile parameter) * @sectors: Number of sectors (taskfile parameter) @@ -3152,8 +2751,11 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev) * RETURNS: * 0 on success, AC_ERR_* mask otherwise. */ -static unsigned int ata_dev_init_params(struct ata_device *dev, - u16 heads, u16 sectors) + +static unsigned int ata_dev_init_params(struct ata_port *ap, + struct ata_device *dev, + u16 heads, + u16 sectors) { struct ata_taskfile tf; unsigned int err_mask; @@ -3165,14 +2767,14 @@ static unsigned int ata_dev_init_params(struct ata_device *dev, /* set up init dev params taskfile */ DPRINTK("init dev params \n"); - ata_tf_init(dev, &tf); + ata_tf_init(ap, &tf, dev->devno); tf.command = ATA_CMD_INIT_DEV_PARAMS; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; tf.protocol = ATA_PROT_NODATA; tf.nsect = sectors; tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */ - err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0); + err_mask = ata_exec_internal(ap, dev, &tf, DMA_NONE, NULL, 0); DPRINTK("EXIT, err_mask=%x\n", err_mask); return err_mask; @@ -3355,7 +2957,6 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) qc->n_elem = 1; qc->orig_n_elem = 1; qc->buf_virt = buf; - qc->nbytes = buflen; sg = qc->__sg; sg_init_one(sg, buf, buflen); @@ -3539,8 +3140,136 @@ skip_map: } /** - * swap_buf_le16 - swap halves of 16-bit words in place - * @buf: Buffer to swap + * ata_poll_qc_complete - turn irq back on and finish qc + * @qc: Command to complete + * @err_mask: ATA status register content + * + * LOCKING: + * None. (grabs host lock) + */ + +void ata_poll_qc_complete(struct ata_queued_cmd *qc) +{ + struct ata_port *ap = qc->ap; + unsigned long flags; + + spin_lock_irqsave(&ap->host_set->lock, flags); + ap->flags &= ~ATA_FLAG_NOINTR; + ata_irq_on(ap); + ata_qc_complete(qc); + spin_unlock_irqrestore(&ap->host_set->lock, flags); +} + +/** + * ata_pio_poll - poll using PIO, depending on current state + * @ap: the target ata_port + * + * LOCKING: + * None. (executing in kernel thread context) + * + * RETURNS: + * timeout value to use + */ + +static unsigned long ata_pio_poll(struct ata_port *ap) +{ + struct ata_queued_cmd *qc; + u8 status; + unsigned int poll_state = HSM_ST_UNKNOWN; + unsigned int reg_state = HSM_ST_UNKNOWN; + + qc = ata_qc_from_tag(ap, ap->active_tag); + WARN_ON(qc == NULL); + + switch (ap->hsm_task_state) { + case HSM_ST: + case HSM_ST_POLL: + poll_state = HSM_ST_POLL; + reg_state = HSM_ST; + break; + case HSM_ST_LAST: + case HSM_ST_LAST_POLL: + poll_state = HSM_ST_LAST_POLL; + reg_state = HSM_ST_LAST; + break; + default: + BUG(); + break; + } + + status = ata_chk_status(ap); + if (status & ATA_BUSY) { + if (time_after(jiffies, ap->pio_task_timeout)) { + qc->err_mask |= AC_ERR_TIMEOUT; + ap->hsm_task_state = HSM_ST_TMOUT; + return 0; + } + ap->hsm_task_state = poll_state; + return ATA_SHORT_PAUSE; + } + + ap->hsm_task_state = reg_state; + return 0; +} + +/** + * ata_pio_complete - check if drive is busy or idle + * @ap: the target ata_port + * + * LOCKING: + * None. (executing in kernel thread context) + * + * RETURNS: + * Non-zero if qc completed, zero otherwise. + */ + +static int ata_pio_complete (struct ata_port *ap) +{ + struct ata_queued_cmd *qc; + u8 drv_stat; + + /* + * This is purely heuristic. This is a fast path. Sometimes when + * we enter, BSY will be cleared in a chk-status or two. If not, + * the drive is probably seeking or something. Snooze for a couple + * msecs, then chk-status again. If still busy, fall back to + * HSM_ST_POLL state. + */ + drv_stat = ata_busy_wait(ap, ATA_BUSY, 10); + if (drv_stat & ATA_BUSY) { + msleep(2); + drv_stat = ata_busy_wait(ap, ATA_BUSY, 10); + if (drv_stat & ATA_BUSY) { + ap->hsm_task_state = HSM_ST_LAST_POLL; + ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; + return 0; + } + } + + qc = ata_qc_from_tag(ap, ap->active_tag); + WARN_ON(qc == NULL); + + drv_stat = ata_wait_idle(ap); + if (!ata_ok(drv_stat)) { + qc->err_mask |= __ac_err_mask(drv_stat); + ap->hsm_task_state = HSM_ST_ERR; + return 0; + } + + ap->hsm_task_state = HSM_ST_IDLE; + + WARN_ON(qc->err_mask); + ata_poll_qc_complete(qc); + + /* another command may start at this point */ + + return 1; +} + + +/** + * swap_buf_le16 - swap halves of 16-bit words in place + * @buf: Buffer to swap * @buf_words: Number of 16-bit words in buffer. * * Swap halves of 16-bit words if needed to convert from @@ -3562,7 +3291,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) /** * ata_mmio_data_xfer - Transfer data by MMIO - * @adev: device for this I/O + * @ap: port to read/write * @buf: data buffer * @buflen: buffer length * @write_data: read/write @@ -3573,10 +3302,9 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) * Inherited from caller. */ -void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data) +static void ata_mmio_data_xfer(struct ata_port *ap, unsigned char *buf, + unsigned int buflen, int write_data) { - struct ata_port *ap = adev->ap; unsigned int i; unsigned int words = buflen >> 1; u16 *buf16 = (u16 *) buf; @@ -3608,7 +3336,7 @@ void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, /** * ata_pio_data_xfer - Transfer data by PIO - * @adev: device to target + * @ap: port to read/write * @buf: data buffer * @buflen: buffer length * @write_data: read/write @@ -3619,10 +3347,9 @@ void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, * Inherited from caller. */ -void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data) +static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf, + unsigned int buflen, int write_data) { - struct ata_port *ap = adev->ap; unsigned int words = buflen >> 1; /* Transfer multiple of 2 bytes */ @@ -3647,29 +3374,38 @@ void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, } /** - * ata_pio_data_xfer_noirq - Transfer data by PIO - * @adev: device to target + * ata_data_xfer - Transfer data from/to the data register. + * @ap: port to read/write * @buf: data buffer * @buflen: buffer length - * @write_data: read/write + * @do_write: read/write * - * Transfer data from/to the device data register by PIO. Do the - * transfer with interrupts disabled. + * Transfer data from/to the device data register. * * LOCKING: * Inherited from caller. */ -void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data) +static void ata_data_xfer(struct ata_port *ap, unsigned char *buf, + unsigned int buflen, int do_write) { - unsigned long flags; - local_irq_save(flags); - ata_pio_data_xfer(adev, buf, buflen, write_data); - local_irq_restore(flags); + /* Make the crap hardware pay the costs not the good stuff */ + if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) { + unsigned long flags; + local_irq_save(flags); + if (ap->flags & ATA_FLAG_MMIO) + ata_mmio_data_xfer(ap, buf, buflen, do_write); + else + ata_pio_data_xfer(ap, buf, buflen, do_write); + local_irq_restore(flags); + } else { + if (ap->flags & ATA_FLAG_MMIO) + ata_mmio_data_xfer(ap, buf, buflen, do_write); + else + ata_pio_data_xfer(ap, buf, buflen, do_write); + } } - /** * ata_pio_sector - Transfer ATA_SECT_SIZE (512 bytes) of data. * @qc: Command on going @@ -3699,24 +3435,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) page = nth_page(page, (offset >> PAGE_SHIFT)); offset %= PAGE_SIZE; - DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); - - if (PageHighMem(page)) { - unsigned long flags; - - /* FIXME: use a bounce buffer */ - local_irq_save(flags); - buf = kmap_atomic(page, KM_IRQ0); - - /* do the actual data transfer */ - ap->ops->data_xfer(qc->dev, buf + offset, ATA_SECT_SIZE, do_write); - - kunmap_atomic(buf, KM_IRQ0); - local_irq_restore(flags); - } else { - buf = page_address(page); - ap->ops->data_xfer(qc->dev, buf + offset, ATA_SECT_SIZE, do_write); - } + buf = kmap(page) + offset; qc->cursect++; qc->cursg_ofs++; @@ -3725,68 +3444,14 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) qc->cursg++; qc->cursg_ofs = 0; } -} - -/** - * ata_pio_sectors - Transfer one or many 512-byte sectors. - * @qc: Command on going - * - * Transfer one or many ATA_SECT_SIZE of data from/to the - * ATA device for the DRQ request. - * - * LOCKING: - * Inherited from caller. - */ - -static void ata_pio_sectors(struct ata_queued_cmd *qc) -{ - if (is_multi_taskfile(&qc->tf)) { - /* READ/WRITE MULTIPLE */ - unsigned int nsect; - - WARN_ON(qc->dev->multi_count == 0); - - nsect = min(qc->nsect - qc->cursect, qc->dev->multi_count); - while (nsect--) - ata_pio_sector(qc); - } else - ata_pio_sector(qc); -} - -/** - * atapi_send_cdb - Write CDB bytes to hardware - * @ap: Port to which ATAPI device is attached. - * @qc: Taskfile currently active - * - * When device has indicated its readiness to accept - * a CDB, this function is called. Send the CDB. - * - * LOCKING: - * caller. - */ -static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc) -{ - /* send SCSI cdb */ - DPRINTK("send cdb\n"); - WARN_ON(qc->dev->cdb_len < 12); + DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); - ap->ops->data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1); - ata_altstatus(ap); /* flush */ + /* do the actual data transfer */ + do_write = (qc->tf.flags & ATA_TFLAG_WRITE); + ata_data_xfer(ap, buf, ATA_SECT_SIZE, do_write); - switch (qc->tf.protocol) { - case ATA_PROT_ATAPI: - ap->hsm_task_state = HSM_ST; - break; - case ATA_PROT_ATAPI_NODATA: - ap->hsm_task_state = HSM_ST_LAST; - break; - case ATA_PROT_ATAPI_DMA: - ap->hsm_task_state = HSM_ST_LAST; - /* initiate bmdma */ - ap->ops->bmdma_start(qc); - break; - } + kunmap(page); } /** @@ -3827,11 +3492,11 @@ next_sg: unsigned int i; if (words) /* warning if bytes > 1 */ - ata_dev_printk(qc->dev, KERN_WARNING, - "%u bytes trailing data\n", bytes); + printk(KERN_WARNING "ata%u: %u bytes trailing data\n", + ap->id, bytes); for (i = 0; i < words; i++) - ap->ops->data_xfer(qc->dev, (unsigned char*)pad_buf, 2, do_write); + ata_data_xfer(ap, (unsigned char*)pad_buf, 2, do_write); ap->hsm_task_state = HSM_ST_LAST; return; @@ -3852,24 +3517,7 @@ next_sg: /* don't cross page boundaries */ count = min(count, (unsigned int)PAGE_SIZE - offset); - DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); - - if (PageHighMem(page)) { - unsigned long flags; - - /* FIXME: use bounce buffer */ - local_irq_save(flags); - buf = kmap_atomic(page, KM_IRQ0); - - /* do the actual data transfer */ - ap->ops->data_xfer(qc->dev, buf + offset, count, do_write); - - kunmap_atomic(buf, KM_IRQ0); - local_irq_restore(flags); - } else { - buf = page_address(page); - ap->ops->data_xfer(qc->dev, buf + offset, count, do_write); - } + buf = kmap(page) + offset; bytes -= count; qc->curbytes += count; @@ -3880,6 +3528,13 @@ next_sg: qc->cursg_ofs = 0; } + DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); + + /* do the actual data transfer */ + ata_data_xfer(ap, buf, count, do_write); + + kunmap(page); + if (bytes) goto next_sg; } @@ -3901,16 +3556,10 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc) unsigned int ireason, bc_lo, bc_hi, bytes; int i_write, do_write = (qc->tf.flags & ATA_TFLAG_WRITE) ? 1 : 0; - /* Abuse qc->result_tf for temp storage of intermediate TF - * here to save some kernel stack usage. - * For normal completion, qc->result_tf is not relevant. For - * error, qc->result_tf is later overwritten by ata_qc_complete(). - * So, the correctness of qc->result_tf is not affected. - */ - ap->ops->tf_read(ap, &qc->result_tf); - ireason = qc->result_tf.nsect; - bc_lo = qc->result_tf.lbam; - bc_hi = qc->result_tf.lbah; + ap->ops->tf_read(ap, &qc->tf); + ireason = qc->tf.nsect; + bc_lo = qc->tf.lbam; + bc_hi = qc->tf.lbah; bytes = (bc_hi << 8) | bc_lo; /* shall be cleared to zero, indicating xfer of data */ @@ -3922,365 +3571,307 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc) if (do_write != i_write) goto err_out; - VPRINTK("ata%u: xfering %d bytes\n", ap->id, bytes); - __atapi_pio_bytes(qc, bytes); return; err_out: - ata_dev_printk(dev, KERN_INFO, "ATAPI check failed\n"); + printk(KERN_INFO "ata%u: dev %u: ATAPI check failed\n", + ap->id, dev->devno); qc->err_mask |= AC_ERR_HSM; ap->hsm_task_state = HSM_ST_ERR; } /** - * ata_hsm_ok_in_wq - Check if the qc can be handled in the workqueue. + * ata_pio_block - start PIO on a block * @ap: the target ata_port - * @qc: qc on going * - * RETURNS: - * 1 if ok in workqueue, 0 otherwise. + * LOCKING: + * None. (executing in kernel thread context) */ -static inline int ata_hsm_ok_in_wq(struct ata_port *ap, struct ata_queued_cmd *qc) +static void ata_pio_block(struct ata_port *ap) { - if (qc->tf.flags & ATA_TFLAG_POLLING) - return 1; - - if (ap->hsm_task_state == HSM_ST_FIRST) { - if (qc->tf.protocol == ATA_PROT_PIO && - (qc->tf.flags & ATA_TFLAG_WRITE)) - return 1; + struct ata_queued_cmd *qc; + u8 status; - if (is_atapi_taskfile(&qc->tf) && - !(qc->dev->flags & ATA_DFLAG_CDB_INTR)) - return 1; + /* + * This is purely heuristic. This is a fast path. + * Sometimes when we enter, BSY will be cleared in + * a chk-status or two. If not, the drive is probably seeking + * or something. Snooze for a couple msecs, then + * chk-status again. If still busy, fall back to + * HSM_ST_POLL state. + */ + status = ata_busy_wait(ap, ATA_BUSY, 5); + if (status & ATA_BUSY) { + msleep(2); + status = ata_busy_wait(ap, ATA_BUSY, 10); + if (status & ATA_BUSY) { + ap->hsm_task_state = HSM_ST_POLL; + ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; + return; + } } - return 0; -} + qc = ata_qc_from_tag(ap, ap->active_tag); + WARN_ON(qc == NULL); -/** - * ata_hsm_qc_complete - finish a qc running on standard HSM - * @qc: Command to complete - * @in_wq: 1 if called from workqueue, 0 otherwise - * - * Finish @qc which is running on standard HSM. - * - * LOCKING: - * If @in_wq is zero, spin_lock_irqsave(host_set lock). - * Otherwise, none on entry and grabs host lock. - */ -static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq) -{ - struct ata_port *ap = qc->ap; - unsigned long flags; - - if (ap->ops->error_handler) { - if (in_wq) { - spin_lock_irqsave(ap->lock, flags); - - /* EH might have kicked in while host_set lock - * is released. - */ - qc = ata_qc_from_tag(ap, qc->tag); - if (qc) { - if (likely(!(qc->err_mask & AC_ERR_HSM))) { - ata_irq_on(ap); - ata_qc_complete(qc); - } else - ata_port_freeze(ap); - } + /* check error */ + if (status & (ATA_ERR | ATA_DF)) { + qc->err_mask |= AC_ERR_DEV; + ap->hsm_task_state = HSM_ST_ERR; + return; + } - spin_unlock_irqrestore(ap->lock, flags); - } else { - if (likely(!(qc->err_mask & AC_ERR_HSM))) - ata_qc_complete(qc); - else - ata_port_freeze(ap); + /* transfer data if any */ + if (is_atapi_taskfile(&qc->tf)) { + /* DRQ=0 means no more data to transfer */ + if ((status & ATA_DRQ) == 0) { + ap->hsm_task_state = HSM_ST_LAST; + return; } + + atapi_pio_bytes(qc); } else { - if (in_wq) { - spin_lock_irqsave(ap->lock, flags); - ata_irq_on(ap); - ata_qc_complete(qc); - spin_unlock_irqrestore(ap->lock, flags); - } else - ata_qc_complete(qc); + /* handle BSY=0, DRQ=0 as error */ + if ((status & ATA_DRQ) == 0) { + qc->err_mask |= AC_ERR_HSM; + ap->hsm_task_state = HSM_ST_ERR; + return; + } + + ata_pio_sector(qc); } ata_altstatus(ap); /* flush */ } -/** - * ata_hsm_move - move the HSM to the next state. - * @ap: the target ata_port - * @qc: qc on going - * @status: current device status - * @in_wq: 1 if called from workqueue, 0 otherwise - * - * RETURNS: - * 1 when poll next status needed, 0 otherwise. - */ -int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, - u8 status, int in_wq) +static void ata_pio_error(struct ata_port *ap) { - unsigned long flags = 0; - int poll_next; + struct ata_queued_cmd *qc; - WARN_ON((qc->flags & ATA_QCFLAG_ACTIVE) == 0); + qc = ata_qc_from_tag(ap, ap->active_tag); + WARN_ON(qc == NULL); - /* Make sure ata_qc_issue_prot() does not throw things - * like DMA polling into the workqueue. Notice that - * in_wq is not equivalent to (qc->tf.flags & ATA_TFLAG_POLLING). + if (qc->tf.command != ATA_CMD_PACKET) + printk(KERN_WARNING "ata%u: PIO error\n", ap->id); + + /* make sure qc->err_mask is available to + * know what's wrong and recover */ - WARN_ON(in_wq != ata_hsm_ok_in_wq(ap, qc)); + WARN_ON(qc->err_mask == 0); -fsm_start: - DPRINTK("ata%u: protocol %d task_state %d (dev_stat 0x%X)\n", - ap->id, qc->tf.protocol, ap->hsm_task_state, status); + ap->hsm_task_state = HSM_ST_IDLE; - switch (ap->hsm_task_state) { - case HSM_ST_FIRST: - /* Send first data block or PACKET CDB */ + ata_poll_qc_complete(qc); +} - /* If polling, we will stay in the work queue after - * sending the data. Otherwise, interrupt handler - * takes over after sending the data. - */ - poll_next = (qc->tf.flags & ATA_TFLAG_POLLING); - - /* check device status */ - if (unlikely((status & ATA_DRQ) == 0)) { - /* handle BSY=0, DRQ=0 as error */ - if (likely(status & (ATA_ERR | ATA_DF))) - /* device stops HSM for abort/error */ - qc->err_mask |= AC_ERR_DEV; - else - /* HSM violation. Let EH handle this */ - qc->err_mask |= AC_ERR_HSM; +static void ata_pio_task(void *_data) +{ + struct ata_port *ap = _data; + unsigned long timeout; + int qc_completed; - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } +fsm_start: + timeout = 0; + qc_completed = 0; - /* Device should not ask for data transfer (DRQ=1) - * when it finds something wrong. - * We ignore DRQ here and stop the HSM by - * changing hsm_task_state to HSM_ST_ERR and - * let the EH abort the command or reset the device. - */ - if (unlikely(status & (ATA_ERR | ATA_DF))) { - printk(KERN_WARNING "ata%d: DRQ=1 with device error, dev_stat 0x%X\n", - ap->id, status); - qc->err_mask |= AC_ERR_HSM; - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + switch (ap->hsm_task_state) { + case HSM_ST_IDLE: + return; - /* Send the CDB (atapi) or the first data block (ata pio out). - * During the state transition, interrupt handler shouldn't - * be invoked before the data transfer is complete and - * hsm_task_state is changed. Hence, the following locking. - */ - if (in_wq) - spin_lock_irqsave(ap->lock, flags); + case HSM_ST: + ata_pio_block(ap); + break; - if (qc->tf.protocol == ATA_PROT_PIO) { - /* PIO data out protocol. - * send first data block. - */ + case HSM_ST_LAST: + qc_completed = ata_pio_complete(ap); + break; - /* ata_pio_sectors() might change the state - * to HSM_ST_LAST. so, the state is changed here - * before ata_pio_sectors(). - */ - ap->hsm_task_state = HSM_ST; - ata_pio_sectors(qc); - ata_altstatus(ap); /* flush */ - } else - /* send CDB */ - atapi_send_cdb(ap, qc); - - if (in_wq) - spin_unlock_irqrestore(ap->lock, flags); - - /* if polling, ata_pio_task() handles the rest. - * otherwise, interrupt handler takes over from here. - */ + case HSM_ST_POLL: + case HSM_ST_LAST_POLL: + timeout = ata_pio_poll(ap); break; - case HSM_ST: - /* complete command or read/write the data register */ - if (qc->tf.protocol == ATA_PROT_ATAPI) { - /* ATAPI PIO protocol */ - if ((status & ATA_DRQ) == 0) { - /* No more data to transfer or device error. - * Device error will be tagged in HSM_ST_LAST. - */ - ap->hsm_task_state = HSM_ST_LAST; - goto fsm_start; - } + case HSM_ST_TMOUT: + case HSM_ST_ERR: + ata_pio_error(ap); + return; + } - /* Device should not ask for data transfer (DRQ=1) - * when it finds something wrong. - * We ignore DRQ here and stop the HSM by - * changing hsm_task_state to HSM_ST_ERR and - * let the EH abort the command or reset the device. - */ - if (unlikely(status & (ATA_ERR | ATA_DF))) { - printk(KERN_WARNING "ata%d: DRQ=1 with device error, dev_stat 0x%X\n", - ap->id, status); - qc->err_mask |= AC_ERR_HSM; - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + if (timeout) + ata_port_queue_task(ap, ata_pio_task, ap, timeout); + else if (!qc_completed) + goto fsm_start; +} - atapi_pio_bytes(qc); +/** + * atapi_packet_task - Write CDB bytes to hardware + * @_data: Port to which ATAPI device is attached. + * + * When device has indicated its readiness to accept + * a CDB, this function is called. Send the CDB. + * If DMA is to be performed, exit immediately. + * Otherwise, we are in polling mode, so poll + * status under operation succeeds or fails. + * + * LOCKING: + * Kernel thread context (may sleep) + */ - if (unlikely(ap->hsm_task_state == HSM_ST_ERR)) - /* bad ireason reported by device */ - goto fsm_start; +static void atapi_packet_task(void *_data) +{ + struct ata_port *ap = _data; + struct ata_queued_cmd *qc; + u8 status; - } else { - /* ATA PIO protocol */ - if (unlikely((status & ATA_DRQ) == 0)) { - /* handle BSY=0, DRQ=0 as error */ - if (likely(status & (ATA_ERR | ATA_DF))) - /* device stops HSM for abort/error */ - qc->err_mask |= AC_ERR_DEV; - else - /* HSM violation. Let EH handle this */ - qc->err_mask |= AC_ERR_HSM; - - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + qc = ata_qc_from_tag(ap, ap->active_tag); + WARN_ON(qc == NULL); + WARN_ON(!(qc->flags & ATA_QCFLAG_ACTIVE)); - /* For PIO reads, some devices may ask for - * data transfer (DRQ=1) alone with ERR=1. - * We respect DRQ here and transfer one - * block of junk data before changing the - * hsm_task_state to HSM_ST_ERR. - * - * For PIO writes, ERR=1 DRQ=1 doesn't make - * sense since the data block has been - * transferred to the device. - */ - if (unlikely(status & (ATA_ERR | ATA_DF))) { - /* data might be corrputed */ - qc->err_mask |= AC_ERR_DEV; - - if (!(qc->tf.flags & ATA_TFLAG_WRITE)) { - ata_pio_sectors(qc); - ata_altstatus(ap); - status = ata_wait_idle(ap); - } - - if (status & (ATA_BUSY | ATA_DRQ)) - qc->err_mask |= AC_ERR_HSM; - - /* ata_pio_sectors() might change the - * state to HSM_ST_LAST. so, the state - * is changed after ata_pio_sectors(). - */ - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + /* sleep-wait for BSY to clear */ + DPRINTK("busy wait\n"); + if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) { + qc->err_mask |= AC_ERR_TIMEOUT; + goto err_out; + } - ata_pio_sectors(qc); + /* make sure DRQ is set */ + status = ata_chk_status(ap); + if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) { + qc->err_mask |= AC_ERR_HSM; + goto err_out; + } - if (ap->hsm_task_state == HSM_ST_LAST && - (!(qc->tf.flags & ATA_TFLAG_WRITE))) { - /* all data read */ - ata_altstatus(ap); - status = ata_wait_idle(ap); - goto fsm_start; - } - } + /* send SCSI cdb */ + DPRINTK("send cdb\n"); + WARN_ON(qc->dev->cdb_len < 12); + + if (qc->tf.protocol == ATA_PROT_ATAPI_DMA || + qc->tf.protocol == ATA_PROT_ATAPI_NODATA) { + unsigned long flags; + /* Once we're done issuing command and kicking bmdma, + * irq handler takes over. To not lose irq, we need + * to clear NOINTR flag before sending cdb, but + * interrupt handler shouldn't be invoked before we're + * finished. Hence, the following locking. + */ + spin_lock_irqsave(&ap->host_set->lock, flags); + ap->flags &= ~ATA_FLAG_NOINTR; + ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); ata_altstatus(ap); /* flush */ - poll_next = 1; - break; - case HSM_ST_LAST: - if (unlikely(!ata_ok(status))) { - qc->err_mask |= __ac_err_mask(status); - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) + ap->ops->bmdma_start(qc); /* initiate bmdma */ + spin_unlock_irqrestore(&ap->host_set->lock, flags); + } else { + ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); + ata_altstatus(ap); /* flush */ - /* no more data to transfer */ - DPRINTK("ata%u: dev %u command complete, drv_stat 0x%x\n", - ap->id, qc->dev->devno, status); + /* PIO commands are handled by polling */ + ap->hsm_task_state = HSM_ST; + ata_port_queue_task(ap, ata_pio_task, ap, 0); + } - WARN_ON(qc->err_mask); + return; - ap->hsm_task_state = HSM_ST_IDLE; +err_out: + ata_poll_qc_complete(qc); +} - /* complete taskfile transaction */ - ata_hsm_qc_complete(qc, in_wq); +/** + * ata_qc_timeout - Handle timeout of queued command + * @qc: Command that timed out + * + * Some part of the kernel (currently, only the SCSI layer) + * has noticed that the active command on port @ap has not + * completed after a specified length of time. Handle this + * condition by disabling DMA (if necessary) and completing + * transactions, with error if necessary. + * + * This also handles the case of the "lost interrupt", where + * for some reason (possibly hardware bug, possibly driver bug) + * an interrupt was not delivered to the driver, even though the + * transaction completed successfully. + * + * LOCKING: + * Inherited from SCSI layer (none, can sleep) + */ - poll_next = 0; - break; +static void ata_qc_timeout(struct ata_queued_cmd *qc) +{ + struct ata_port *ap = qc->ap; + struct ata_host_set *host_set = ap->host_set; + u8 host_stat = 0, drv_stat; + unsigned long flags; - case HSM_ST_ERR: - /* make sure qc->err_mask is available to - * know what's wrong and recover - */ - WARN_ON(qc->err_mask == 0); + DPRINTK("ENTER\n"); - ap->hsm_task_state = HSM_ST_IDLE; + ap->hsm_task_state = HSM_ST_IDLE; - /* complete taskfile transaction */ - ata_hsm_qc_complete(qc, in_wq); + spin_lock_irqsave(&host_set->lock, flags); + + switch (qc->tf.protocol) { + + case ATA_PROT_DMA: + case ATA_PROT_ATAPI_DMA: + host_stat = ap->ops->bmdma_status(ap); + + /* before we do anything else, clear DMA-Start bit */ + ap->ops->bmdma_stop(qc); + + /* fall through */ - poll_next = 0; - break; default: - poll_next = 0; - BUG(); + ata_altstatus(ap); + drv_stat = ata_chk_status(ap); + + /* ack bmdma irq events */ + ap->ops->irq_clear(ap); + + printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n", + ap->id, qc->tf.command, drv_stat, host_stat); + + /* complete taskfile transaction */ + qc->err_mask |= ac_err_mask(drv_stat); + break; } - return poll_next; -} + spin_unlock_irqrestore(&host_set->lock, flags); -static void ata_pio_task(void *_data) -{ - struct ata_queued_cmd *qc = _data; - struct ata_port *ap = qc->ap; - u8 status; - int poll_next; + ata_eh_qc_complete(qc); -fsm_start: - WARN_ON(ap->hsm_task_state == HSM_ST_IDLE); + DPRINTK("EXIT\n"); +} - /* - * This is purely heuristic. This is a fast path. - * Sometimes when we enter, BSY will be cleared in - * a chk-status or two. If not, the drive is probably seeking - * or something. Snooze for a couple msecs, then - * chk-status again. If still busy, queue delayed work. - */ - status = ata_busy_wait(ap, ATA_BUSY, 5); - if (status & ATA_BUSY) { - msleep(2); - status = ata_busy_wait(ap, ATA_BUSY, 10); - if (status & ATA_BUSY) { - ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE); - return; - } - } +/** + * ata_eng_timeout - Handle timeout of queued command + * @ap: Port on which timed-out command is active + * + * Some part of the kernel (currently, only the SCSI layer) + * has noticed that the active command on port @ap has not + * completed after a specified length of time. Handle this + * condition by disabling DMA (if necessary) and completing + * transactions, with error if necessary. + * + * This also handles the case of the "lost interrupt", where + * for some reason (possibly hardware bug, possibly driver bug) + * an interrupt was not delivered to the driver, even though the + * transaction completed successfully. + * + * LOCKING: + * Inherited from SCSI layer (none, can sleep) + */ - /* move the HSM */ - poll_next = ata_hsm_move(ap, qc, status, 1); +void ata_eng_timeout(struct ata_port *ap) +{ + DPRINTK("ENTER\n"); - /* another command or interrupt handler - * may be running at this point. - */ - if (poll_next) - goto fsm_start; + ata_qc_timeout(ata_qc_from_tag(ap, ap->active_tag)); + + DPRINTK("EXIT\n"); } /** @@ -4297,14 +3888,9 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) struct ata_queued_cmd *qc = NULL; unsigned int i; - /* no command while frozen */ - if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) - return NULL; - - /* the last tag is reserved for internal command. */ - for (i = 0; i < ATA_MAX_QUEUE - 1; i++) - if (!test_and_set_bit(i, &ap->qc_allocated)) { - qc = __ata_qc_from_tag(ap, i); + for (i = 0; i < ATA_MAX_QUEUE; i++) + if (!test_and_set_bit(i, &ap->qactive)) { + qc = ata_qc_from_tag(ap, i); break; } @@ -4316,15 +3902,16 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) /** * ata_qc_new_init - Request an available ATA command, and initialize it + * @ap: Port associated with device @dev * @dev: Device from whom we request an available command structure * * LOCKING: * None. */ -struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev) +struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, + struct ata_device *dev) { - struct ata_port *ap = dev->ap; struct ata_queued_cmd *qc; qc = ata_qc_new(ap); @@ -4359,153 +3946,36 @@ void ata_qc_free(struct ata_queued_cmd *qc) qc->flags = 0; tag = qc->tag; if (likely(ata_tag_valid(tag))) { + if (tag == ap->active_tag) + ap->active_tag = ATA_TAG_POISON; qc->tag = ATA_TAG_POISON; - clear_bit(tag, &ap->qc_allocated); + clear_bit(tag, &ap->qactive); } } void __ata_qc_complete(struct ata_queued_cmd *qc) { - struct ata_port *ap = qc->ap; - WARN_ON(qc == NULL); /* ata_qc_from_tag _might_ return NULL */ WARN_ON(!(qc->flags & ATA_QCFLAG_ACTIVE)); if (likely(qc->flags & ATA_QCFLAG_DMAMAP)) ata_sg_clean(qc); - /* command should be marked inactive atomically with qc completion */ - if (qc->tf.protocol == ATA_PROT_NCQ) - ap->sactive &= ~(1 << qc->tag); - else - ap->active_tag = ATA_TAG_POISON; - /* atapi: mark qc as inactive to prevent the interrupt handler * from completing the command twice later, before the error handler * is called. (when rc != 0 and atapi request sense is needed) */ qc->flags &= ~ATA_QCFLAG_ACTIVE; - ap->qc_active &= ~(1 << qc->tag); /* call completion callback */ qc->complete_fn(qc); } -/** - * ata_qc_complete - Complete an active ATA command - * @qc: Command to complete - * @err_mask: ATA Status register contents - * - * Indicate to the mid and upper layers that an ATA - * command has completed, with either an ok or not-ok status. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - */ -void ata_qc_complete(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - - /* XXX: New EH and old EH use different mechanisms to - * synchronize EH with regular execution path. - * - * In new EH, a failed qc is marked with ATA_QCFLAG_FAILED. - * Normal execution path is responsible for not accessing a - * failed qc. libata core enforces the rule by returning NULL - * from ata_qc_from_tag() for failed qcs. - * - * Old EH depends on ata_qc_complete() nullifying completion - * requests if ATA_QCFLAG_EH_SCHEDULED is set. Old EH does - * not synchronize with interrupt handler. Only PIO task is - * taken care of. - */ - if (ap->ops->error_handler) { - WARN_ON(ap->pflags & ATA_PFLAG_FROZEN); - - if (unlikely(qc->err_mask)) - qc->flags |= ATA_QCFLAG_FAILED; - - if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) { - if (!ata_tag_internal(qc->tag)) { - /* always fill result TF for failed qc */ - ap->ops->tf_read(ap, &qc->result_tf); - ata_qc_schedule_eh(qc); - return; - } - } - - /* read result TF if requested */ - if (qc->flags & ATA_QCFLAG_RESULT_TF) - ap->ops->tf_read(ap, &qc->result_tf); - - __ata_qc_complete(qc); - } else { - if (qc->flags & ATA_QCFLAG_EH_SCHEDULED) - return; - - /* read result TF if failed or requested */ - if (qc->err_mask || qc->flags & ATA_QCFLAG_RESULT_TF) - ap->ops->tf_read(ap, &qc->result_tf); - - __ata_qc_complete(qc); - } -} - -/** - * ata_qc_complete_multiple - Complete multiple qcs successfully - * @ap: port in question - * @qc_active: new qc_active mask - * @finish_qc: LLDD callback invoked before completing a qc - * - * Complete in-flight commands. This functions is meant to be - * called from low-level driver's interrupt routine to complete - * requests normally. ap->qc_active and @qc_active is compared - * and commands are completed accordingly. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * Number of completed commands on success, -errno otherwise. - */ -int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active, - void (*finish_qc)(struct ata_queued_cmd *)) -{ - int nr_done = 0; - u32 done_mask; - int i; - - done_mask = ap->qc_active ^ qc_active; - - if (unlikely(done_mask & qc_active)) { - ata_port_printk(ap, KERN_ERR, "illegal qc_active transition " - "(%08x->%08x)\n", ap->qc_active, qc_active); - return -EINVAL; - } - - for (i = 0; i < ATA_MAX_QUEUE; i++) { - struct ata_queued_cmd *qc; - - if (!(done_mask & (1 << i))) - continue; - - if ((qc = ata_qc_from_tag(ap, i))) { - if (finish_qc) - finish_qc(qc); - ata_qc_complete(qc); - nr_done++; - } - } - - return nr_done; -} - static inline int ata_should_dma_map(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; switch (qc->tf.protocol) { - case ATA_PROT_NCQ: case ATA_PROT_DMA: case ATA_PROT_ATAPI_DMA: return 1; @@ -4540,22 +4010,8 @@ void ata_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; - /* Make sure only one non-NCQ command is outstanding. The - * check is skipped for old EH because it reuses active qc to - * request ATAPI sense. - */ - WARN_ON(ap->ops->error_handler && ata_tag_valid(ap->active_tag)); - - if (qc->tf.protocol == ATA_PROT_NCQ) { - WARN_ON(ap->sactive & (1 << qc->tag)); - ap->sactive |= 1 << qc->tag; - } else { - WARN_ON(ap->sactive); - ap->active_tag = qc->tag; - } - + qc->ap->active_tag = qc->tag; qc->flags |= ATA_QCFLAG_ACTIVE; - ap->qc_active |= 1 << qc->tag; if (ata_should_dma_map(qc)) { if (qc->flags & ATA_QCFLAG_SG) { @@ -4605,105 +4061,43 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; - /* Use polling pio if the LLD doesn't handle - * interrupt driven pio and atapi CDB interrupt. - */ - if (ap->flags & ATA_FLAG_PIO_POLLING) { - switch (qc->tf.protocol) { - case ATA_PROT_PIO: - case ATA_PROT_ATAPI: - case ATA_PROT_ATAPI_NODATA: - qc->tf.flags |= ATA_TFLAG_POLLING; - break; - case ATA_PROT_ATAPI_DMA: - if (qc->dev->flags & ATA_DFLAG_CDB_INTR) - /* see ata_dma_blacklisted() */ - BUG(); - break; - default: - break; - } - } - - /* select the device */ ata_dev_select(ap, qc->dev->devno, 1, 0); - /* start the command */ switch (qc->tf.protocol) { case ATA_PROT_NODATA: - if (qc->tf.flags & ATA_TFLAG_POLLING) - ata_qc_set_polling(qc); - ata_tf_to_host(ap, &qc->tf); - ap->hsm_task_state = HSM_ST_LAST; - - if (qc->tf.flags & ATA_TFLAG_POLLING) - ata_port_queue_task(ap, ata_pio_task, qc, 0); - break; case ATA_PROT_DMA: - WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING); - ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ ap->ops->bmdma_setup(qc); /* set up bmdma */ ap->ops->bmdma_start(qc); /* initiate bmdma */ - ap->hsm_task_state = HSM_ST_LAST; break; - case ATA_PROT_PIO: - if (qc->tf.flags & ATA_TFLAG_POLLING) - ata_qc_set_polling(qc); - + case ATA_PROT_PIO: /* load tf registers, initiate polling pio */ + ata_qc_set_polling(qc); ata_tf_to_host(ap, &qc->tf); - - if (qc->tf.flags & ATA_TFLAG_WRITE) { - /* PIO data out protocol */ - ap->hsm_task_state = HSM_ST_FIRST; - ata_port_queue_task(ap, ata_pio_task, qc, 0); - - /* always send first data block using - * the ata_pio_task() codepath. - */ - } else { - /* PIO data in protocol */ - ap->hsm_task_state = HSM_ST; - - if (qc->tf.flags & ATA_TFLAG_POLLING) - ata_port_queue_task(ap, ata_pio_task, qc, 0); - - /* if polling, ata_pio_task() handles the rest. - * otherwise, interrupt handler takes over from here. - */ - } - + ap->hsm_task_state = HSM_ST; + ata_port_queue_task(ap, ata_pio_task, ap, 0); break; case ATA_PROT_ATAPI: - case ATA_PROT_ATAPI_NODATA: - if (qc->tf.flags & ATA_TFLAG_POLLING) - ata_qc_set_polling(qc); - + ata_qc_set_polling(qc); ata_tf_to_host(ap, &qc->tf); + ata_port_queue_task(ap, atapi_packet_task, ap, 0); + break; - ap->hsm_task_state = HSM_ST_FIRST; - - /* send cdb by polling if no cdb interrupt */ - if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || - (qc->tf.flags & ATA_TFLAG_POLLING)) - ata_port_queue_task(ap, ata_pio_task, qc, 0); + case ATA_PROT_ATAPI_NODATA: + ap->flags |= ATA_FLAG_NOINTR; + ata_tf_to_host(ap, &qc->tf); + ata_port_queue_task(ap, atapi_packet_task, ap, 0); break; case ATA_PROT_ATAPI_DMA: - WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING); - + ap->flags |= ATA_FLAG_NOINTR; ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ ap->ops->bmdma_setup(qc); /* set up bmdma */ - ap->hsm_task_state = HSM_ST_FIRST; - - /* send cdb by polling if no cdb interrupt */ - if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) - ata_port_queue_task(ap, ata_pio_task, qc, 0); + ata_port_queue_task(ap, atapi_packet_task, ap, 0); break; default: @@ -4733,66 +4127,52 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) inline unsigned int ata_host_intr (struct ata_port *ap, struct ata_queued_cmd *qc) { - u8 status, host_stat = 0; + u8 status, host_stat; - VPRINTK("ata%u: protocol %d task_state %d\n", - ap->id, qc->tf.protocol, ap->hsm_task_state); + switch (qc->tf.protocol) { - /* Check whether we are expecting interrupt in this state */ - switch (ap->hsm_task_state) { - case HSM_ST_FIRST: - /* Some pre-ATAPI-4 devices assert INTRQ - * at this state when ready to receive CDB. - */ + case ATA_PROT_DMA: + case ATA_PROT_ATAPI_DMA: + case ATA_PROT_ATAPI: + /* check status of DMA engine */ + host_stat = ap->ops->bmdma_status(ap); + VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat); - /* Check the ATA_DFLAG_CDB_INTR flag is enough here. - * The flag was turned on only for atapi devices. - * No need to check is_atapi_taskfile(&qc->tf) again. - */ - if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) + /* if it's not our irq... */ + if (!(host_stat & ATA_DMA_INTR)) goto idle_irq; - break; - case HSM_ST_LAST: - if (qc->tf.protocol == ATA_PROT_DMA || - qc->tf.protocol == ATA_PROT_ATAPI_DMA) { - /* check status of DMA engine */ - host_stat = ap->ops->bmdma_status(ap); - VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat); - - /* if it's not our irq... */ - if (!(host_stat & ATA_DMA_INTR)) - goto idle_irq; - - /* before we do anything else, clear DMA-Start bit */ - ap->ops->bmdma_stop(qc); - - if (unlikely(host_stat & ATA_DMA_ERR)) { - /* error when transfering data to/from memory */ - qc->err_mask |= AC_ERR_HOST_BUS; - ap->hsm_task_state = HSM_ST_ERR; - } - } - break; - case HSM_ST: - break; - default: - goto idle_irq; - } - /* check altstatus */ - status = ata_altstatus(ap); - if (status & ATA_BUSY) - goto idle_irq; + /* before we do anything else, clear DMA-Start bit */ + ap->ops->bmdma_stop(qc); + + /* fall through */ + + case ATA_PROT_ATAPI_NODATA: + case ATA_PROT_NODATA: + /* check altstatus */ + status = ata_altstatus(ap); + if (status & ATA_BUSY) + goto idle_irq; + + /* check main status, clearing INTRQ */ + status = ata_chk_status(ap); + if (unlikely(status & ATA_BUSY)) + goto idle_irq; + DPRINTK("ata%u: protocol %d (dev_stat 0x%X)\n", + ap->id, qc->tf.protocol, status); + + /* ack bmdma irq events */ + ap->ops->irq_clear(ap); + + /* complete taskfile transaction */ + qc->err_mask |= ac_err_mask(status); + ata_qc_complete(qc); + break; - /* check main status, clearing INTRQ */ - status = ata_chk_status(ap); - if (unlikely(status & ATA_BUSY)) + default: goto idle_irq; + } - /* ack bmdma irq events */ - ap->ops->irq_clear(ap); - - ata_hsm_move(ap, qc, status, 0); return 1; /* irq handled */ idle_irq: @@ -4801,7 +4181,7 @@ idle_irq: #ifdef ATA_IRQ_TRAP if ((ap->stats.idle_irq % 1000) == 0) { ata_irq_ack(ap, 0); /* debug trap */ - ata_port_printk(ap, KERN_WARNING, "irq trap\n"); + printk(KERN_WARNING "ata%d: irq trap\n", ap->id); return 1; } #endif @@ -4839,11 +4219,11 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) ap = host_set->ports[i]; if (ap && - !(ap->flags & ATA_FLAG_DISABLED)) { + !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) && + if (qc && (!(qc->tf.ctl & ATA_NIEN)) && (qc->flags & ATA_QCFLAG_ACTIVE)) handled |= ata_host_intr(ap, qc); } @@ -4854,147 +4234,33 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) return IRQ_RETVAL(handled); } -/** - * sata_scr_valid - test whether SCRs are accessible - * @ap: ATA port to test SCR accessibility for - * - * Test whether SCRs are accessible for @ap. - * - * LOCKING: - * None. - * - * RETURNS: - * 1 if SCRs are accessible, 0 otherwise. - */ -int sata_scr_valid(struct ata_port *ap) -{ - return ap->cbl == ATA_CBL_SATA && ap->ops->scr_read; -} - -/** - * sata_scr_read - read SCR register of the specified port - * @ap: ATA port to read SCR for - * @reg: SCR to read - * @val: Place to store read value - * - * Read SCR register @reg of @ap into *@val. This function is - * guaranteed to succeed if the cable type of the port is SATA - * and the port implements ->scr_read. - * - * LOCKING: - * None. - * - * RETURNS: - * 0 on success, negative errno on failure. - */ -int sata_scr_read(struct ata_port *ap, int reg, u32 *val) -{ - if (sata_scr_valid(ap)) { - *val = ap->ops->scr_read(ap, reg); - return 0; - } - return -EOPNOTSUPP; -} - -/** - * sata_scr_write - write SCR register of the specified port - * @ap: ATA port to write SCR for - * @reg: SCR to write - * @val: value to write - * - * Write @val to SCR register @reg of @ap. This function is - * guaranteed to succeed if the cable type of the port is SATA - * and the port implements ->scr_read. - * - * LOCKING: - * None. - * - * RETURNS: - * 0 on success, negative errno on failure. - */ -int sata_scr_write(struct ata_port *ap, int reg, u32 val) -{ - if (sata_scr_valid(ap)) { - ap->ops->scr_write(ap, reg, val); - return 0; - } - return -EOPNOTSUPP; -} -/** - * sata_scr_write_flush - write SCR register of the specified port and flush - * @ap: ATA port to write SCR for - * @reg: SCR to write - * @val: value to write - * - * This function is identical to sata_scr_write() except that this - * function performs flush after writing to the register. - * - * LOCKING: - * None. - * - * RETURNS: - * 0 on success, negative errno on failure. +/* + * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, + * without filling any other registers */ -int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val) +static int ata_do_simple_cmd(struct ata_port *ap, struct ata_device *dev, + u8 cmd) { - if (sata_scr_valid(ap)) { - ap->ops->scr_write(ap, reg, val); - ap->ops->scr_read(ap, reg); - return 0; - } - return -EOPNOTSUPP; -} + struct ata_taskfile tf; + int err; -/** - * ata_port_online - test whether the given port is online - * @ap: ATA port to test - * - * Test whether @ap is online. Note that this function returns 0 - * if online status of @ap cannot be obtained, so - * ata_port_online(ap) != !ata_port_offline(ap). - * - * LOCKING: - * None. - * - * RETURNS: - * 1 if the port online status is available and online. - */ -int ata_port_online(struct ata_port *ap) -{ - u32 sstatus; + ata_tf_init(ap, &tf, dev->devno); - if (!sata_scr_read(ap, SCR_STATUS, &sstatus) && (sstatus & 0xf) == 0x3) - return 1; - return 0; -} + tf.command = cmd; + tf.flags |= ATA_TFLAG_DEVICE; + tf.protocol = ATA_PROT_NODATA; -/** - * ata_port_offline - test whether the given port is offline - * @ap: ATA port to test - * - * Test whether @ap is offline. Note that this function returns - * 0 if offline status of @ap cannot be obtained, so - * ata_port_online(ap) != !ata_port_offline(ap). - * - * LOCKING: - * None. - * - * RETURNS: - * 1 if the port offline status is available and offline. - */ -int ata_port_offline(struct ata_port *ap) -{ - u32 sstatus; + err = ata_exec_internal(ap, dev, &tf, DMA_NONE, NULL, 0); + if (err) + printk(KERN_ERR "%s: ata command failed: %d\n", + __FUNCTION__, err); - if (!sata_scr_read(ap, SCR_STATUS, &sstatus) && (sstatus & 0xf) != 0x3) - return 1; - return 0; + return err; } -int ata_flush_cache(struct ata_device *dev) +static int ata_flush_cache(struct ata_port *ap, struct ata_device *dev) { - unsigned int err_mask; u8 cmd; if (!ata_try_flush_cache(dev)) @@ -5005,129 +4271,64 @@ int ata_flush_cache(struct ata_device *dev) else cmd = ATA_CMD_FLUSH; - err_mask = ata_do_simple_cmd(dev, cmd); - if (err_mask) { - ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n"); - return -EIO; - } - - return 0; + return ata_do_simple_cmd(ap, dev, cmd); } -static int ata_host_set_request_pm(struct ata_host_set *host_set, - pm_message_t mesg, unsigned int action, - unsigned int ehi_flags, int wait) +static int ata_standby_drive(struct ata_port *ap, struct ata_device *dev) { - unsigned long flags; - int i, rc; - - for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; - - /* Previous resume operation might still be in - * progress. Wait for PM_PENDING to clear. - */ - if (ap->pflags & ATA_PFLAG_PM_PENDING) { - ata_port_wait_eh(ap); - WARN_ON(ap->pflags & ATA_PFLAG_PM_PENDING); - } - - /* request PM ops to EH */ - spin_lock_irqsave(ap->lock, flags); - - ap->pm_mesg = mesg; - if (wait) { - rc = 0; - ap->pm_result = &rc; - } - - ap->pflags |= ATA_PFLAG_PM_PENDING; - ap->eh_info.action |= action; - ap->eh_info.flags |= ehi_flags; - - ata_port_schedule_eh(ap); - - spin_unlock_irqrestore(ap->lock, flags); - - /* wait and check result */ - if (wait) { - ata_port_wait_eh(ap); - WARN_ON(ap->pflags & ATA_PFLAG_PM_PENDING); - if (rc) - return rc; - } - } + return ata_do_simple_cmd(ap, dev, ATA_CMD_STANDBYNOW1); +} - return 0; +static int ata_start_drive(struct ata_port *ap, struct ata_device *dev) +{ + return ata_do_simple_cmd(ap, dev, ATA_CMD_IDLEIMMEDIATE); } /** - * ata_host_set_suspend - suspend host_set - * @host_set: host_set to suspend - * @mesg: PM message + * ata_device_resume - wakeup a previously suspended devices + * @ap: port the device is connected to + * @dev: the device to resume * - * Suspend @host_set. Actual operation is performed by EH. This - * function requests EH to perform PM operations and waits for EH - * to finish. + * Kick the drive back into action, by sending it an idle immediate + * command and making sure its transfer mode matches between drive + * and host. * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno on failure. */ -int ata_host_set_suspend(struct ata_host_set *host_set, pm_message_t mesg) +int ata_device_resume(struct ata_port *ap, struct ata_device *dev) { - int i, j, rc; - - rc = ata_host_set_request_pm(host_set, mesg, 0, ATA_EHI_QUIET, 1); - if (rc) - goto fail; - - /* EH is quiescent now. Fail if we have any ready device. - * This happens if hotplug occurs between completion of device - * suspension and here. - */ - for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; - - for (j = 0; j < ATA_MAX_DEVICES; j++) { - struct ata_device *dev = &ap->device[j]; - - if (ata_dev_ready(dev)) { - ata_port_printk(ap, KERN_WARNING, - "suspend failed, device %d " - "still active\n", dev->devno); - rc = -EBUSY; - goto fail; - } - } + if (ap->flags & ATA_FLAG_SUSPENDED) { + ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); + ap->flags &= ~ATA_FLAG_SUSPENDED; + ata_set_mode(ap); } + if (!ata_dev_present(dev)) + return 0; + if (dev->class == ATA_DEV_ATA) + ata_start_drive(ap, dev); - host_set->dev->power.power_state = mesg; return 0; - - fail: - ata_host_set_resume(host_set); - return rc; } /** - * ata_host_set_resume - resume host_set - * @host_set: host_set to resume + * ata_device_suspend - prepare a device for suspend + * @ap: port the device is connected to + * @dev: the device to suspend + * @state: target power management state * - * Resume @host_set. Actual operation is performed by EH. This - * function requests EH to perform PM operations and returns. - * Note that all resume operations are performed parallely. - * - * LOCKING: - * Kernel thread context (may sleep). + * Flush the cache on the drive, if appropriate, then issue a + * standbynow command. */ -void ata_host_set_resume(struct ata_host_set *host_set) +int ata_device_suspend(struct ata_port *ap, struct ata_device *dev, pm_message_t state) { - ata_host_set_request_pm(host_set, PMSG_ON, ATA_EH_SOFTRESET, - ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); - host_set->dev->power.power_state = PMSG_ON; + if (!ata_dev_present(dev)) + return 0; + if (dev->class == ATA_DEV_ATA) + ata_flush_cache(ap, dev); + + if (state.event != PM_EVENT_FREEZE) + ata_standby_drive(ap, dev); + ap->flags |= ATA_FLAG_SUSPENDED; + return 0; } /** @@ -5190,36 +4391,26 @@ void ata_host_stop (struct ata_host_set *host_set) iounmap(host_set->mmio_base); } + /** - * ata_dev_init - Initialize an ata_device structure - * @dev: Device structure to initialize - * - * Initialize @dev in preparation for probing. + * ata_host_remove - Unregister SCSI host structure with upper layers + * @ap: Port to unregister + * @do_unregister: 1 if we fully unregister, 0 to just stop the port * * LOCKING: * Inherited from caller. */ -void ata_dev_init(struct ata_device *dev) + +static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister) { - struct ata_port *ap = dev->ap; - unsigned long flags; + struct Scsi_Host *sh = ap->host; + + DPRINTK("ENTER\n"); - /* SATA spd limit is bound to the first device */ - ap->sata_spd_limit = ap->hw_sata_spd_limit; + if (do_unregister) + scsi_remove_host(sh); - /* High bits of dev->flags are used to record warm plug - * requests which occur asynchronously. Synchronize using - * host_set lock. - */ - spin_lock_irqsave(ap->lock, flags); - dev->flags &= ~ATA_DFLAG_INIT_MASK; - spin_unlock_irqrestore(ap->lock, flags); - - memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0, - sizeof(*dev) - ATA_DEVICE_CLEAR_OFFSET); - dev->pio_mask = UINT_MAX; - dev->mwdma_mask = UINT_MAX; - dev->udma_mask = UINT_MAX; + ap->ops->port_stop(ap); } /** @@ -5236,6 +4427,7 @@ void ata_dev_init(struct ata_device *dev) * LOCKING: * Inherited from caller. */ + static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, struct ata_host_set *host_set, const struct ata_probe_ent *ent, unsigned int port_no) @@ -5248,8 +4440,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, host->unique_id = ata_unique_id++; host->max_cmd_len = 12; - ap->lock = &host_set->lock; - ap->flags = ATA_FLAG_DISABLED; + ap->flags = ATA_FLAG_PORT_DISABLED; ap->id = host->unique_id; ap->host = host; ap->ctl = ATA_DEVCTL_OBS; @@ -5264,35 +4455,19 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, ap->flags |= ent->host_flags; ap->flags |= ent->port_flags[port_no]; /* pata fix */ ap->ops = ent->port_ops; - ap->hw_sata_spd_limit = UINT_MAX; + ap->cbl = ATA_CBL_NONE; ap->active_tag = ATA_TAG_POISON; ap->last_ctl = 0xFF; -#if defined(ATA_VERBOSE_DEBUG) - /* turn on all debugging levels */ - ap->msg_enable = 0x00FF; -#elif defined(ATA_DEBUG) - ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO | ATA_MSG_CTL | ATA_MSG_WARN | ATA_MSG_ERR; -#else - ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; -#endif - INIT_WORK(&ap->port_task, NULL, NULL); - INIT_WORK(&ap->hotplug_task, ata_scsi_hotplug, ap); - INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan, ap); INIT_LIST_HEAD(&ap->eh_done_q); - init_waitqueue_head(&ap->eh_wait_q); - - /* set cable type */ - ap->cbl = ATA_CBL_NONE; - if (ap->flags & ATA_FLAG_SATA) - ap->cbl = ATA_CBL_SATA; for (i = 0; i < ATA_MAX_DEVICES; i++) { struct ata_device *dev = &ap->device[i]; - dev->ap = ap; dev->devno = i; - ata_dev_init(dev); + dev->pio_mask = UINT_MAX; + dev->mwdma_mask = UINT_MAX; + dev->udma_mask = UINT_MAX; } #ifdef ATA_IRQ_TRAP @@ -5328,7 +4503,7 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent, DPRINTK("ENTER\n"); - if (!ent->port_ops->error_handler && + if (!ent->port_ops->probe_reset && !(ent->host_flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST))) { printk(KERN_ERR "ata%u: no reset mechanism available\n", port_no); @@ -5341,7 +4516,7 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent, host->transportt = &ata_scsi_transport_template; - ap = ata_shost_to_port(host); + ap = (struct ata_port *) &host->hostdata[0]; ata_host_init(ap, host, host_set, ent, port_no); @@ -5374,12 +4549,12 @@ err_out: * RETURNS: * Number of ports registered. Zero on error (no ports registered). */ + int ata_device_add(const struct ata_probe_ent *ent) { unsigned int count = 0, i; struct device *dev = ent->dev; struct ata_host_set *host_set; - int rc; DPRINTK("ENTER\n"); /* alloc a container for our list of ATA ports (buses) */ @@ -5412,18 +4587,18 @@ int ata_device_add(const struct ata_probe_ent *ent) (ap->pio_mask << ATA_SHIFT_PIO); /* print per-port info to dmesg */ - ata_port_printk(ap, KERN_INFO, "%cATA max %s cmd 0x%lX " - "ctl 0x%lX bmdma 0x%lX irq %lu\n", - ap->flags & ATA_FLAG_SATA ? 'S' : 'P', - ata_mode_string(xfer_mode_mask), - ap->ioaddr.cmd_addr, - ap->ioaddr.ctl_addr, - ap->ioaddr.bmdma_addr, - ent->irq); + printk(KERN_INFO "ata%u: %cATA max %s cmd 0x%lX ctl 0x%lX " + "bmdma 0x%lX irq %lu\n", + ap->id, + ap->flags & ATA_FLAG_SATA ? 'S' : 'P', + ata_mode_string(xfer_mode_mask), + ap->ioaddr.cmd_addr, + ap->ioaddr.ctl_addr, + ap->ioaddr.bmdma_addr, + ent->irq); ata_chk_status(ap); host_set->ops->irq_clear(ap); - ata_eh_freeze_port(ap); /* freeze port before requesting IRQ */ count++; } @@ -5431,74 +4606,41 @@ int ata_device_add(const struct ata_probe_ent *ent) goto err_free_ret; /* obtain irq, that is shared between channels */ - rc = request_irq(ent->irq, ent->port_ops->irq_handler, ent->irq_flags, - DRV_NAME, host_set); - if (rc) { - dev_printk(KERN_ERR, dev, "irq %lu request failed: %d\n", - ent->irq, rc); + if (request_irq(ent->irq, ent->port_ops->irq_handler, ent->irq_flags, + DRV_NAME, host_set)) goto err_out; - } /* perform each probe synchronously */ DPRINTK("probe begin\n"); for (i = 0; i < count; i++) { struct ata_port *ap; - u32 scontrol; int rc; ap = host_set->ports[i]; - /* init sata_spd_limit to the current value */ - if (sata_scr_read(ap, SCR_CONTROL, &scontrol) == 0) { - int spd = (scontrol >> 4) & 0xf; - ap->hw_sata_spd_limit &= (1 << spd) - 1; + DPRINTK("ata%u: bus probe begin\n", ap->id); + rc = ata_bus_probe(ap); + DPRINTK("ata%u: bus probe end\n", ap->id); + + if (rc) { + /* FIXME: do something useful here? + * Current libata behavior will + * tear down everything when + * the module is removed + * or the h/w is unplugged. + */ } - ap->sata_spd_limit = ap->hw_sata_spd_limit; rc = scsi_add_host(ap->host, dev); if (rc) { - ata_port_printk(ap, KERN_ERR, "scsi_add_host failed\n"); + printk(KERN_ERR "ata%u: scsi_add_host failed\n", + ap->id); /* FIXME: do something useful here */ /* FIXME: handle unconditional calls to * scsi_scan_host and ata_host_remove, below, * at the very least */ } - - if (ap->ops->error_handler) { - struct ata_eh_info *ehi = &ap->eh_info; - unsigned long flags; - - ata_port_probe(ap); - - /* kick EH for boot probing */ - spin_lock_irqsave(ap->lock, flags); - - ehi->probe_mask = (1 << ATA_MAX_DEVICES) - 1; - ehi->action |= ATA_EH_SOFTRESET; - ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; - - ap->pflags |= ATA_PFLAG_LOADING; - ata_port_schedule_eh(ap); - - spin_unlock_irqrestore(ap->lock, flags); - - /* wait for EH to finish */ - ata_port_wait_eh(ap); - } else { - DPRINTK("ata%u: bus probe begin\n", ap->id); - rc = ata_bus_probe(ap); - DPRINTK("ata%u: bus probe end\n", ap->id); - - if (rc) { - /* FIXME: do something useful here? - * Current libata behavior will - * tear down everything when - * the module is removed - * or the h/w is unplugged. - */ - } - } } /* probes are done, now scan each port's disk(s) */ @@ -5516,11 +4658,8 @@ int ata_device_add(const struct ata_probe_ent *ent) err_out: for (i = 0; i < count; i++) { - struct ata_port *ap = host_set->ports[i]; - if (ap) { - ap->ops->port_stop(ap); - scsi_host_put(ap->host); - } + ata_host_remove(host_set->ports[i], 1); + scsi_host_put(host_set->ports[i]->host); } err_free_ret: kfree(host_set); @@ -5528,64 +4667,6 @@ err_free_ret: return 0; } -/** - * ata_port_detach - Detach ATA port in prepration of device removal - * @ap: ATA port to be detached - * - * Detach all ATA devices and the associated SCSI devices of @ap; - * then, remove the associated SCSI host. @ap is guaranteed to - * be quiescent on return from this function. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -void ata_port_detach(struct ata_port *ap) -{ - unsigned long flags; - int i; - - if (!ap->ops->error_handler) - goto skip_eh; - - /* tell EH we're leaving & flush EH */ - spin_lock_irqsave(ap->lock, flags); - ap->pflags |= ATA_PFLAG_UNLOADING; - spin_unlock_irqrestore(ap->lock, flags); - - ata_port_wait_eh(ap); - - /* EH is now guaranteed to see UNLOADING, so no new device - * will be attached. Disable all existing devices. - */ - spin_lock_irqsave(ap->lock, flags); - - for (i = 0; i < ATA_MAX_DEVICES; i++) - ata_dev_disable(&ap->device[i]); - - spin_unlock_irqrestore(ap->lock, flags); - - /* Final freeze & EH. All in-flight commands are aborted. EH - * will be skipped and retrials will be terminated with bad - * target. - */ - spin_lock_irqsave(ap->lock, flags); - ata_port_freeze(ap); /* won't be thawed */ - spin_unlock_irqrestore(ap->lock, flags); - - ata_port_wait_eh(ap); - - /* Flush hotplug task. The sequence is similar to - * ata_port_flush_task(). - */ - flush_workqueue(ata_aux_wq); - cancel_delayed_work(&ap->hotplug_task); - flush_workqueue(ata_aux_wq); - - skip_eh: - /* remove the associated SCSI host */ - scsi_remove_host(ap->host); -} - /** * ata_host_set_remove - PCI layer callback for device removal * @host_set: ATA host set that was removed @@ -5599,15 +4680,18 @@ void ata_port_detach(struct ata_port *ap) void ata_host_set_remove(struct ata_host_set *host_set) { + struct ata_port *ap; unsigned int i; - for (i = 0; i < host_set->n_ports; i++) - ata_port_detach(host_set->ports[i]); + for (i = 0; i < host_set->n_ports; i++) { + ap = host_set->ports[i]; + scsi_remove_host(ap->host); + } free_irq(host_set->irq, host_set); for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; + ap = host_set->ports[i]; ata_scsi_release(ap->host); @@ -5645,12 +4729,15 @@ void ata_host_set_remove(struct ata_host_set *host_set) int ata_scsi_release(struct Scsi_Host *host) { - struct ata_port *ap = ata_shost_to_port(host); + struct ata_port *ap = (struct ata_port *) &host->hostdata[0]; + int i; DPRINTK("ENTER\n"); ap->ops->port_disable(ap); - ap->ops->port_stop(ap); + ata_host_remove(ap, 0); + for (i = 0; i < ATA_MAX_DEVICES; i++) + kfree(ap->device[i].id); DPRINTK("EXIT\n"); return 1; @@ -5710,12 +4797,8 @@ void ata_pci_remove_one (struct pci_dev *pdev) { struct device *dev = pci_dev_to_dev(pdev); struct ata_host_set *host_set = dev_get_drvdata(dev); - struct ata_host_set *host_set2 = host_set->next; ata_host_set_remove(host_set); - if (host_set2) - ata_host_set_remove(host_set2); - pci_release_regions(pdev); pci_disable_device(pdev); dev_set_drvdata(dev, NULL); @@ -5755,55 +4838,20 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits) return (tmp == bits->val) ? 1 : 0; } -void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state) +int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state) { pci_save_state(pdev); - - if (state.event == PM_EVENT_SUSPEND) { - pci_disable_device(pdev); - pci_set_power_state(pdev, PCI_D3hot); - } + pci_disable_device(pdev); + pci_set_power_state(pdev, PCI_D3hot); + return 0; } -void ata_pci_device_do_resume(struct pci_dev *pdev) +int ata_pci_device_resume(struct pci_dev *pdev) { pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); pci_enable_device(pdev); pci_set_master(pdev); -} - -int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - int rc = 0; - - rc = ata_host_set_suspend(host_set, state); - if (rc) - return rc; - - if (host_set->next) { - rc = ata_host_set_suspend(host_set->next, state); - if (rc) { - ata_host_set_resume(host_set); - return rc; - } - } - - ata_pci_device_do_suspend(pdev, state); - - return 0; -} - -int ata_pci_device_resume(struct pci_dev *pdev) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - - ata_pci_device_do_resume(pdev); - ata_host_set_resume(host_set); - if (host_set->next) - ata_host_set_resume(host_set->next); - return 0; } #endif /* CONFIG_PCI */ @@ -5811,17 +4859,10 @@ int ata_pci_device_resume(struct pci_dev *pdev) static int __init ata_init(void) { - ata_probe_timeout *= HZ; ata_wq = create_workqueue("ata"); if (!ata_wq) return -ENOMEM; - ata_aux_wq = create_singlethread_workqueue("ata_aux"); - if (!ata_aux_wq) { - destroy_workqueue(ata_wq); - return -ENOMEM; - } - printk(KERN_DEBUG "libata version " DRV_VERSION " loaded.\n"); return 0; } @@ -5829,14 +4870,13 @@ static int __init ata_init(void) static void __exit ata_exit(void) { destroy_workqueue(ata_wq); - destroy_workqueue(ata_aux_wq); } module_init(ata_init); module_exit(ata_exit); static unsigned long ratelimit_time; -static DEFINE_SPINLOCK(ata_ratelimit_lock); +static spinlock_t ata_ratelimit_lock = SPIN_LOCK_UNLOCKED; int ata_ratelimit(void) { @@ -5856,52 +4896,6 @@ int ata_ratelimit(void) return rc; } -/** - * ata_wait_register - wait until register value changes - * @reg: IO-mapped register - * @mask: Mask to apply to read register value - * @val: Wait condition - * @interval_msec: polling interval in milliseconds - * @timeout_msec: timeout in milliseconds - * - * Waiting for some bits of register to change is a common - * operation for ATA controllers. This function reads 32bit LE - * IO-mapped register @reg and tests for the following condition. - * - * (*@reg & mask) != val - * - * If the condition is met, it returns; otherwise, the process is - * repeated after @interval_msec until timeout. - * - * LOCKING: - * Kernel thread context (may sleep) - * - * RETURNS: - * The final register value. - */ -u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, - unsigned long interval_msec, - unsigned long timeout_msec) -{ - unsigned long timeout; - u32 tmp; - - tmp = ioread32(reg); - - /* Calculate timeout _after_ the first read to make sure - * preceding writes reach the controller before starting to - * eat away the timeout. - */ - timeout = jiffies + (timeout_msec * HZ) / 1000; - - while ((tmp & mask) == val && time_before(jiffies, timeout)) { - msleep(interval_msec); - tmp = ioread32(reg); - } - - return tmp; -} - /* * libata is essentially a library of internal helper functions for * low-level ATA host controller drivers. As such, the API/ABI is @@ -5909,20 +4903,15 @@ u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, * Do not depend on ABI/API stability. */ -EXPORT_SYMBOL_GPL(sata_deb_timing_normal); -EXPORT_SYMBOL_GPL(sata_deb_timing_hotplug); -EXPORT_SYMBOL_GPL(sata_deb_timing_long); EXPORT_SYMBOL_GPL(ata_std_bios_param); EXPORT_SYMBOL_GPL(ata_std_ports); EXPORT_SYMBOL_GPL(ata_device_add); -EXPORT_SYMBOL_GPL(ata_port_detach); EXPORT_SYMBOL_GPL(ata_host_set_remove); EXPORT_SYMBOL_GPL(ata_sg_init); EXPORT_SYMBOL_GPL(ata_sg_init_one); -EXPORT_SYMBOL_GPL(ata_hsm_move); -EXPORT_SYMBOL_GPL(ata_qc_complete); -EXPORT_SYMBOL_GPL(ata_qc_complete_multiple); +EXPORT_SYMBOL_GPL(__ata_qc_complete); EXPORT_SYMBOL_GPL(ata_qc_issue_prot); +EXPORT_SYMBOL_GPL(ata_eng_timeout); EXPORT_SYMBOL_GPL(ata_tf_load); EXPORT_SYMBOL_GPL(ata_tf_read); EXPORT_SYMBOL_GPL(ata_noop_dev_select); @@ -5936,9 +4925,6 @@ EXPORT_SYMBOL_GPL(ata_port_start); EXPORT_SYMBOL_GPL(ata_port_stop); EXPORT_SYMBOL_GPL(ata_host_stop); EXPORT_SYMBOL_GPL(ata_interrupt); -EXPORT_SYMBOL_GPL(ata_mmio_data_xfer); -EXPORT_SYMBOL_GPL(ata_pio_data_xfer); -EXPORT_SYMBOL_GPL(ata_pio_data_xfer_noirq); EXPORT_SYMBOL_GPL(ata_qc_prep); EXPORT_SYMBOL_GPL(ata_noop_qc_prep); EXPORT_SYMBOL_GPL(ata_bmdma_setup); @@ -5946,48 +4932,33 @@ EXPORT_SYMBOL_GPL(ata_bmdma_start); EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear); EXPORT_SYMBOL_GPL(ata_bmdma_status); EXPORT_SYMBOL_GPL(ata_bmdma_stop); -EXPORT_SYMBOL_GPL(ata_bmdma_freeze); -EXPORT_SYMBOL_GPL(ata_bmdma_thaw); -EXPORT_SYMBOL_GPL(ata_bmdma_drive_eh); -EXPORT_SYMBOL_GPL(ata_bmdma_error_handler); -EXPORT_SYMBOL_GPL(ata_bmdma_post_internal_cmd); EXPORT_SYMBOL_GPL(ata_port_probe); -EXPORT_SYMBOL_GPL(sata_set_spd); -EXPORT_SYMBOL_GPL(sata_phy_debounce); -EXPORT_SYMBOL_GPL(sata_phy_resume); EXPORT_SYMBOL_GPL(sata_phy_reset); EXPORT_SYMBOL_GPL(__sata_phy_reset); EXPORT_SYMBOL_GPL(ata_bus_reset); -EXPORT_SYMBOL_GPL(ata_std_prereset); +EXPORT_SYMBOL_GPL(ata_std_probeinit); EXPORT_SYMBOL_GPL(ata_std_softreset); EXPORT_SYMBOL_GPL(sata_std_hardreset); EXPORT_SYMBOL_GPL(ata_std_postreset); +EXPORT_SYMBOL_GPL(ata_std_probe_reset); +EXPORT_SYMBOL_GPL(ata_drive_probe_reset); EXPORT_SYMBOL_GPL(ata_dev_revalidate); EXPORT_SYMBOL_GPL(ata_dev_classify); EXPORT_SYMBOL_GPL(ata_dev_pair); EXPORT_SYMBOL_GPL(ata_port_disable); EXPORT_SYMBOL_GPL(ata_ratelimit); -EXPORT_SYMBOL_GPL(ata_wait_register); EXPORT_SYMBOL_GPL(ata_busy_sleep); EXPORT_SYMBOL_GPL(ata_port_queue_task); EXPORT_SYMBOL_GPL(ata_scsi_ioctl); EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); EXPORT_SYMBOL_GPL(ata_scsi_slave_config); -EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy); -EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth); EXPORT_SYMBOL_GPL(ata_scsi_release); EXPORT_SYMBOL_GPL(ata_host_intr); -EXPORT_SYMBOL_GPL(sata_scr_valid); -EXPORT_SYMBOL_GPL(sata_scr_read); -EXPORT_SYMBOL_GPL(sata_scr_write); -EXPORT_SYMBOL_GPL(sata_scr_write_flush); -EXPORT_SYMBOL_GPL(ata_port_online); -EXPORT_SYMBOL_GPL(ata_port_offline); -EXPORT_SYMBOL_GPL(ata_host_set_suspend); -EXPORT_SYMBOL_GPL(ata_host_set_resume); EXPORT_SYMBOL_GPL(ata_id_string); EXPORT_SYMBOL_GPL(ata_id_c_string); EXPORT_SYMBOL_GPL(ata_scsi_simulate); +EXPORT_SYMBOL_GPL(ata_eh_qc_complete); +EXPORT_SYMBOL_GPL(ata_eh_qc_retry); EXPORT_SYMBOL_GPL(ata_pio_need_iordy); EXPORT_SYMBOL_GPL(ata_timing_compute); @@ -5999,23 +4970,13 @@ EXPORT_SYMBOL_GPL(ata_pci_host_stop); EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); EXPORT_SYMBOL_GPL(ata_pci_init_one); EXPORT_SYMBOL_GPL(ata_pci_remove_one); -EXPORT_SYMBOL_GPL(ata_pci_device_do_suspend); -EXPORT_SYMBOL_GPL(ata_pci_device_do_resume); EXPORT_SYMBOL_GPL(ata_pci_device_suspend); EXPORT_SYMBOL_GPL(ata_pci_device_resume); EXPORT_SYMBOL_GPL(ata_pci_default_filter); EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); #endif /* CONFIG_PCI */ +EXPORT_SYMBOL_GPL(ata_device_suspend); +EXPORT_SYMBOL_GPL(ata_device_resume); EXPORT_SYMBOL_GPL(ata_scsi_device_suspend); EXPORT_SYMBOL_GPL(ata_scsi_device_resume); - -EXPORT_SYMBOL_GPL(ata_eng_timeout); -EXPORT_SYMBOL_GPL(ata_port_schedule_eh); -EXPORT_SYMBOL_GPL(ata_port_abort); -EXPORT_SYMBOL_GPL(ata_port_freeze); -EXPORT_SYMBOL_GPL(ata_eh_freeze_port); -EXPORT_SYMBOL_GPL(ata_eh_thaw_port); -EXPORT_SYMBOL_GPL(ata_eh_qc_complete); -EXPORT_SYMBOL_GPL(ata_eh_qc_retry); -EXPORT_SYMBOL_GPL(ata_do_eh); diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c deleted file mode 100644 index 2c34af996..000000000 --- a/drivers/scsi/libata-eh.c +++ /dev/null @@ -1,2245 +0,0 @@ -/* - * libata-eh.c - libata error handling - * - * Maintained by: Jeff Garzik - * Please ALWAYS copy linux-ide@vger.kernel.org - * on emails. - * - * Copyright 2006 Tejun Heo - * - * - * 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, 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; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, - * USA. - * - * - * libata documentation is available via 'make {ps|pdf}docs', - * as Documentation/DocBook/libata.* - * - * Hardware documentation available from http://www.t13.org/ and - * http://www.sata-io.org/ - * - */ - -#include -#include -#include -#include -#include -#include -#include "scsi_transport_api.h" - -#include - -#include "libata.h" - -static void __ata_port_freeze(struct ata_port *ap); -static void ata_eh_finish(struct ata_port *ap); -static void ata_eh_handle_port_suspend(struct ata_port *ap); -static void ata_eh_handle_port_resume(struct ata_port *ap); - -static void ata_ering_record(struct ata_ering *ering, int is_io, - unsigned int err_mask) -{ - struct ata_ering_entry *ent; - - WARN_ON(!err_mask); - - ering->cursor++; - ering->cursor %= ATA_ERING_SIZE; - - ent = &ering->ring[ering->cursor]; - ent->is_io = is_io; - ent->err_mask = err_mask; - ent->timestamp = get_jiffies_64(); -} - -static struct ata_ering_entry * ata_ering_top(struct ata_ering *ering) -{ - struct ata_ering_entry *ent = &ering->ring[ering->cursor]; - if (!ent->err_mask) - return NULL; - return ent; -} - -static int ata_ering_map(struct ata_ering *ering, - int (*map_fn)(struct ata_ering_entry *, void *), - void *arg) -{ - int idx, rc = 0; - struct ata_ering_entry *ent; - - idx = ering->cursor; - do { - ent = &ering->ring[idx]; - if (!ent->err_mask) - break; - rc = map_fn(ent, arg); - if (rc) - break; - idx = (idx - 1 + ATA_ERING_SIZE) % ATA_ERING_SIZE; - } while (idx != ering->cursor); - - return rc; -} - -static unsigned int ata_eh_dev_action(struct ata_device *dev) -{ - struct ata_eh_context *ehc = &dev->ap->eh_context; - - return ehc->i.action | ehc->i.dev_action[dev->devno]; -} - -static void ata_eh_clear_action(struct ata_device *dev, - struct ata_eh_info *ehi, unsigned int action) -{ - int i; - - if (!dev) { - ehi->action &= ~action; - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] &= ~action; - } else { - /* doesn't make sense for port-wide EH actions */ - WARN_ON(!(action & ATA_EH_PERDEV_MASK)); - - /* break ehi->action into ehi->dev_action */ - if (ehi->action & action) { - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehi->dev_action[i] |= ehi->action & action; - ehi->action &= ~action; - } - - /* turn off the specified per-dev action */ - ehi->dev_action[dev->devno] &= ~action; - } -} - -/** - * ata_scsi_timed_out - SCSI layer time out callback - * @cmd: timed out SCSI command - * - * Handles SCSI layer timeout. We race with normal completion of - * the qc for @cmd. If the qc is already gone, we lose and let - * the scsi command finish (EH_HANDLED). Otherwise, the qc has - * timed out and EH should be invoked. Prevent ata_qc_complete() - * from finishing it by setting EH_SCHEDULED and return - * EH_NOT_HANDLED. - * - * TODO: kill this function once old EH is gone. - * - * LOCKING: - * Called from timer context - * - * RETURNS: - * EH_HANDLED or EH_NOT_HANDLED - */ -enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) -{ - struct Scsi_Host *host = cmd->device->host; - struct ata_port *ap = ata_shost_to_port(host); - unsigned long flags; - struct ata_queued_cmd *qc; - enum scsi_eh_timer_return ret; - - DPRINTK("ENTER\n"); - - if (ap->ops->error_handler) { - ret = EH_NOT_HANDLED; - goto out; - } - - ret = EH_HANDLED; - spin_lock_irqsave(ap->lock, flags); - qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc) { - WARN_ON(qc->scsicmd != cmd); - qc->flags |= ATA_QCFLAG_EH_SCHEDULED; - qc->err_mask |= AC_ERR_TIMEOUT; - ret = EH_NOT_HANDLED; - } - spin_unlock_irqrestore(ap->lock, flags); - - out: - DPRINTK("EXIT, ret=%d\n", ret); - return ret; -} - -/** - * ata_scsi_error - SCSI layer error handler callback - * @host: SCSI host on which error occurred - * - * Handles SCSI-layer-thrown error events. - * - * LOCKING: - * Inherited from SCSI layer (none, can sleep) - * - * RETURNS: - * Zero. - */ -void ata_scsi_error(struct Scsi_Host *host) -{ - struct ata_port *ap = ata_shost_to_port(host); - int i, repeat_cnt = ATA_EH_MAX_REPEAT; - unsigned long flags; - - DPRINTK("ENTER\n"); - - /* synchronize with port task */ - ata_port_flush_task(ap); - - /* synchronize with host_set lock and sort out timeouts */ - - /* For new EH, all qcs are finished in one of three ways - - * normal completion, error completion, and SCSI timeout. - * Both cmpletions can race against SCSI timeout. When normal - * completion wins, the qc never reaches EH. When error - * completion wins, the qc has ATA_QCFLAG_FAILED set. - * - * When SCSI timeout wins, things are a bit more complex. - * Normal or error completion can occur after the timeout but - * before this point. In such cases, both types of - * completions are honored. A scmd is determined to have - * timed out iff its associated qc is active and not failed. - */ - if (ap->ops->error_handler) { - struct scsi_cmnd *scmd, *tmp; - int nr_timedout = 0; - - spin_lock_irqsave(ap->lock, flags); - - list_for_each_entry_safe(scmd, tmp, &host->eh_cmd_q, eh_entry) { - struct ata_queued_cmd *qc; - - for (i = 0; i < ATA_MAX_QUEUE; i++) { - qc = __ata_qc_from_tag(ap, i); - if (qc->flags & ATA_QCFLAG_ACTIVE && - qc->scsicmd == scmd) - break; - } - - if (i < ATA_MAX_QUEUE) { - /* the scmd has an associated qc */ - if (!(qc->flags & ATA_QCFLAG_FAILED)) { - /* which hasn't failed yet, timeout */ - qc->err_mask |= AC_ERR_TIMEOUT; - qc->flags |= ATA_QCFLAG_FAILED; - nr_timedout++; - } - } else { - /* Normal completion occurred after - * SCSI timeout but before this point. - * Successfully complete it. - */ - scmd->retries = scmd->allowed; - scsi_eh_finish_cmd(scmd, &ap->eh_done_q); - } - } - - /* If we have timed out qcs. They belong to EH from - * this point but the state of the controller is - * unknown. Freeze the port to make sure the IRQ - * handler doesn't diddle with those qcs. This must - * be done atomically w.r.t. setting QCFLAG_FAILED. - */ - if (nr_timedout) - __ata_port_freeze(ap); - - spin_unlock_irqrestore(ap->lock, flags); - } else - spin_unlock_wait(ap->lock); - - repeat: - /* invoke error handler */ - if (ap->ops->error_handler) { - /* process port resume request */ - ata_eh_handle_port_resume(ap); - - /* fetch & clear EH info */ - spin_lock_irqsave(ap->lock, flags); - - memset(&ap->eh_context, 0, sizeof(ap->eh_context)); - ap->eh_context.i = ap->eh_info; - memset(&ap->eh_info, 0, sizeof(ap->eh_info)); - - ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS; - ap->pflags &= ~ATA_PFLAG_EH_PENDING; - - spin_unlock_irqrestore(ap->lock, flags); - - /* invoke EH, skip if unloading or suspended */ - if (!(ap->pflags & (ATA_PFLAG_UNLOADING | ATA_PFLAG_SUSPENDED))) - ap->ops->error_handler(ap); - else - ata_eh_finish(ap); - - /* process port suspend request */ - ata_eh_handle_port_suspend(ap); - - /* Exception might have happend after ->error_handler - * recovered the port but before this point. Repeat - * EH in such case. - */ - spin_lock_irqsave(ap->lock, flags); - - if (ap->pflags & ATA_PFLAG_EH_PENDING) { - if (--repeat_cnt) { - ata_port_printk(ap, KERN_INFO, - "EH pending after completion, " - "repeating EH (cnt=%d)\n", repeat_cnt); - spin_unlock_irqrestore(ap->lock, flags); - goto repeat; - } - ata_port_printk(ap, KERN_ERR, "EH pending after %d " - "tries, giving up\n", ATA_EH_MAX_REPEAT); - } - - /* this run is complete, make sure EH info is clear */ - memset(&ap->eh_info, 0, sizeof(ap->eh_info)); - - /* Clear host_eh_scheduled while holding ap->lock such - * that if exception occurs after this point but - * before EH completion, SCSI midlayer will - * re-initiate EH. - */ - host->host_eh_scheduled = 0; - - spin_unlock_irqrestore(ap->lock, flags); - } else { - WARN_ON(ata_qc_from_tag(ap, ap->active_tag) == NULL); - ap->ops->eng_timeout(ap); - } - - /* finish or retry handled scmd's and clean up */ - WARN_ON(host->host_failed || !list_empty(&host->eh_cmd_q)); - - scsi_eh_flush_done_q(&ap->eh_done_q); - - /* clean up */ - spin_lock_irqsave(ap->lock, flags); - - if (ap->pflags & ATA_PFLAG_LOADING) - ap->pflags &= ~ATA_PFLAG_LOADING; - else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG) - queue_work(ata_aux_wq, &ap->hotplug_task); - - if (ap->pflags & ATA_PFLAG_RECOVERED) - ata_port_printk(ap, KERN_INFO, "EH complete\n"); - - ap->pflags &= ~(ATA_PFLAG_SCSI_HOTPLUG | ATA_PFLAG_RECOVERED); - - /* tell wait_eh that we're done */ - ap->pflags &= ~ATA_PFLAG_EH_IN_PROGRESS; - wake_up_all(&ap->eh_wait_q); - - spin_unlock_irqrestore(ap->lock, flags); - - DPRINTK("EXIT\n"); -} - -/** - * ata_port_wait_eh - Wait for the currently pending EH to complete - * @ap: Port to wait EH for - * - * Wait until the currently pending EH is complete. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -void ata_port_wait_eh(struct ata_port *ap) -{ - unsigned long flags; - DEFINE_WAIT(wait); - - retry: - spin_lock_irqsave(ap->lock, flags); - - while (ap->pflags & (ATA_PFLAG_EH_PENDING | ATA_PFLAG_EH_IN_PROGRESS)) { - prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE); - spin_unlock_irqrestore(ap->lock, flags); - schedule(); - spin_lock_irqsave(ap->lock, flags); - } - finish_wait(&ap->eh_wait_q, &wait); - - spin_unlock_irqrestore(ap->lock, flags); - - /* make sure SCSI EH is complete */ - if (scsi_host_in_recovery(ap->host)) { - msleep(10); - goto retry; - } -} - -/** - * ata_qc_timeout - Handle timeout of queued command - * @qc: Command that timed out - * - * Some part of the kernel (currently, only the SCSI layer) - * has noticed that the active command on port @ap has not - * completed after a specified length of time. Handle this - * condition by disabling DMA (if necessary) and completing - * transactions, with error if necessary. - * - * This also handles the case of the "lost interrupt", where - * for some reason (possibly hardware bug, possibly driver bug) - * an interrupt was not delivered to the driver, even though the - * transaction completed successfully. - * - * TODO: kill this function once old EH is gone. - * - * LOCKING: - * Inherited from SCSI layer (none, can sleep) - */ -static void ata_qc_timeout(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - u8 host_stat = 0, drv_stat; - unsigned long flags; - - DPRINTK("ENTER\n"); - - ap->hsm_task_state = HSM_ST_IDLE; - - spin_lock_irqsave(ap->lock, flags); - - switch (qc->tf.protocol) { - - case ATA_PROT_DMA: - case ATA_PROT_ATAPI_DMA: - host_stat = ap->ops->bmdma_status(ap); - - /* before we do anything else, clear DMA-Start bit */ - ap->ops->bmdma_stop(qc); - - /* fall through */ - - default: - ata_altstatus(ap); - drv_stat = ata_chk_status(ap); - - /* ack bmdma irq events */ - ap->ops->irq_clear(ap); - - ata_dev_printk(qc->dev, KERN_ERR, "command 0x%x timeout, " - "stat 0x%x host_stat 0x%x\n", - qc->tf.command, drv_stat, host_stat); - - /* complete taskfile transaction */ - qc->err_mask |= AC_ERR_TIMEOUT; - break; - } - - spin_unlock_irqrestore(ap->lock, flags); - - ata_eh_qc_complete(qc); - - DPRINTK("EXIT\n"); -} - -/** - * ata_eng_timeout - Handle timeout of queued command - * @ap: Port on which timed-out command is active - * - * Some part of the kernel (currently, only the SCSI layer) - * has noticed that the active command on port @ap has not - * completed after a specified length of time. Handle this - * condition by disabling DMA (if necessary) and completing - * transactions, with error if necessary. - * - * This also handles the case of the "lost interrupt", where - * for some reason (possibly hardware bug, possibly driver bug) - * an interrupt was not delivered to the driver, even though the - * transaction completed successfully. - * - * TODO: kill this function once old EH is gone. - * - * LOCKING: - * Inherited from SCSI layer (none, can sleep) - */ -void ata_eng_timeout(struct ata_port *ap) -{ - DPRINTK("ENTER\n"); - - ata_qc_timeout(ata_qc_from_tag(ap, ap->active_tag)); - - DPRINTK("EXIT\n"); -} - -/** - * ata_qc_schedule_eh - schedule qc for error handling - * @qc: command to schedule error handling for - * - * Schedule error handling for @qc. EH will kick in as soon as - * other commands are drained. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - */ -void ata_qc_schedule_eh(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - - WARN_ON(!ap->ops->error_handler); - - qc->flags |= ATA_QCFLAG_FAILED; - qc->ap->pflags |= ATA_PFLAG_EH_PENDING; - - /* The following will fail if timeout has already expired. - * ata_scsi_error() takes care of such scmds on EH entry. - * Note that ATA_QCFLAG_FAILED is unconditionally set after - * this function completes. - */ - scsi_req_abort_cmd(qc->scsicmd); -} - -/** - * ata_port_schedule_eh - schedule error handling without a qc - * @ap: ATA port to schedule EH for - * - * Schedule error handling for @ap. EH will kick in as soon as - * all commands are drained. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - */ -void ata_port_schedule_eh(struct ata_port *ap) -{ - WARN_ON(!ap->ops->error_handler); - - ap->pflags |= ATA_PFLAG_EH_PENDING; - scsi_schedule_eh(ap->host); - - DPRINTK("port EH scheduled\n"); -} - -/** - * ata_port_abort - abort all qc's on the port - * @ap: ATA port to abort qc's for - * - * Abort all active qc's of @ap and schedule EH. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * Number of aborted qc's. - */ -int ata_port_abort(struct ata_port *ap) -{ - int tag, nr_aborted = 0; - - WARN_ON(!ap->ops->error_handler); - - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag); - - if (qc) { - qc->flags |= ATA_QCFLAG_FAILED; - ata_qc_complete(qc); - nr_aborted++; - } - } - - if (!nr_aborted) - ata_port_schedule_eh(ap); - - return nr_aborted; -} - -/** - * __ata_port_freeze - freeze port - * @ap: ATA port to freeze - * - * This function is called when HSM violation or some other - * condition disrupts normal operation of the port. Frozen port - * is not allowed to perform any operation until the port is - * thawed, which usually follows a successful reset. - * - * ap->ops->freeze() callback can be used for freezing the port - * hardware-wise (e.g. mask interrupt and stop DMA engine). If a - * port cannot be frozen hardware-wise, the interrupt handler - * must ack and clear interrupts unconditionally while the port - * is frozen. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - */ -static void __ata_port_freeze(struct ata_port *ap) -{ - WARN_ON(!ap->ops->error_handler); - - if (ap->ops->freeze) - ap->ops->freeze(ap); - - ap->pflags |= ATA_PFLAG_FROZEN; - - DPRINTK("ata%u port frozen\n", ap->id); -} - -/** - * ata_port_freeze - abort & freeze port - * @ap: ATA port to freeze - * - * Abort and freeze @ap. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * Number of aborted commands. - */ -int ata_port_freeze(struct ata_port *ap) -{ - int nr_aborted; - - WARN_ON(!ap->ops->error_handler); - - nr_aborted = ata_port_abort(ap); - __ata_port_freeze(ap); - - return nr_aborted; -} - -/** - * ata_eh_freeze_port - EH helper to freeze port - * @ap: ATA port to freeze - * - * Freeze @ap. - * - * LOCKING: - * None. - */ -void ata_eh_freeze_port(struct ata_port *ap) -{ - unsigned long flags; - - if (!ap->ops->error_handler) - return; - - spin_lock_irqsave(ap->lock, flags); - __ata_port_freeze(ap); - spin_unlock_irqrestore(ap->lock, flags); -} - -/** - * ata_port_thaw_port - EH helper to thaw port - * @ap: ATA port to thaw - * - * Thaw frozen port @ap. - * - * LOCKING: - * None. - */ -void ata_eh_thaw_port(struct ata_port *ap) -{ - unsigned long flags; - - if (!ap->ops->error_handler) - return; - - spin_lock_irqsave(ap->lock, flags); - - ap->pflags &= ~ATA_PFLAG_FROZEN; - - if (ap->ops->thaw) - ap->ops->thaw(ap); - - spin_unlock_irqrestore(ap->lock, flags); - - DPRINTK("ata%u port thawed\n", ap->id); -} - -static void ata_eh_scsidone(struct scsi_cmnd *scmd) -{ - /* nada */ -} - -static void __ata_eh_qc_complete(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - struct scsi_cmnd *scmd = qc->scsicmd; - unsigned long flags; - - spin_lock_irqsave(ap->lock, flags); - qc->scsidone = ata_eh_scsidone; - __ata_qc_complete(qc); - WARN_ON(ata_tag_valid(qc->tag)); - spin_unlock_irqrestore(ap->lock, flags); - - scsi_eh_finish_cmd(scmd, &ap->eh_done_q); -} - -/** - * ata_eh_qc_complete - Complete an active ATA command from EH - * @qc: Command to complete - * - * Indicate to the mid and upper layers that an ATA command has - * completed. To be used from EH. - */ -void ata_eh_qc_complete(struct ata_queued_cmd *qc) -{ - struct scsi_cmnd *scmd = qc->scsicmd; - scmd->retries = scmd->allowed; - __ata_eh_qc_complete(qc); -} - -/** - * ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH - * @qc: Command to retry - * - * Indicate to the mid and upper layers that an ATA command - * should be retried. To be used from EH. - * - * SCSI midlayer limits the number of retries to scmd->allowed. - * scmd->retries is decremented for commands which get retried - * due to unrelated failures (qc->err_mask is zero). - */ -void ata_eh_qc_retry(struct ata_queued_cmd *qc) -{ - struct scsi_cmnd *scmd = qc->scsicmd; - if (!qc->err_mask && scmd->retries) - scmd->retries--; - __ata_eh_qc_complete(qc); -} - -/** - * ata_eh_detach_dev - detach ATA device - * @dev: ATA device to detach - * - * Detach @dev. - * - * LOCKING: - * None. - */ -static void ata_eh_detach_dev(struct ata_device *dev) -{ - struct ata_port *ap = dev->ap; - unsigned long flags; - - ata_dev_disable(dev); - - spin_lock_irqsave(ap->lock, flags); - - dev->flags &= ~ATA_DFLAG_DETACH; - - if (ata_scsi_offline_dev(dev)) { - dev->flags |= ATA_DFLAG_DETACHED; - ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG; - } - - /* clear per-dev EH actions */ - ata_eh_clear_action(dev, &ap->eh_info, ATA_EH_PERDEV_MASK); - ata_eh_clear_action(dev, &ap->eh_context.i, ATA_EH_PERDEV_MASK); - - spin_unlock_irqrestore(ap->lock, flags); -} - -/** - * ata_eh_about_to_do - about to perform eh_action - * @ap: target ATA port - * @dev: target ATA dev for per-dev action (can be NULL) - * @action: action about to be performed - * - * Called just before performing EH actions to clear related bits - * in @ap->eh_info such that eh actions are not unnecessarily - * repeated. - * - * LOCKING: - * None. - */ -static void ata_eh_about_to_do(struct ata_port *ap, struct ata_device *dev, - unsigned int action) -{ - unsigned long flags; - struct ata_eh_info *ehi = &ap->eh_info; - struct ata_eh_context *ehc = &ap->eh_context; - - spin_lock_irqsave(ap->lock, flags); - - /* Reset is represented by combination of actions and EHI - * flags. Suck in all related bits before clearing eh_info to - * avoid losing requested action. - */ - if (action & ATA_EH_RESET_MASK) { - ehc->i.action |= ehi->action & ATA_EH_RESET_MASK; - ehc->i.flags |= ehi->flags & ATA_EHI_RESET_MODIFIER_MASK; - - /* make sure all reset actions are cleared & clear EHI flags */ - action |= ATA_EH_RESET_MASK; - ehi->flags &= ~ATA_EHI_RESET_MODIFIER_MASK; - } - - ata_eh_clear_action(dev, ehi, action); - - if (!(ehc->i.flags & ATA_EHI_QUIET)) - ap->pflags |= ATA_PFLAG_RECOVERED; - - spin_unlock_irqrestore(ap->lock, flags); -} - -/** - * ata_eh_done - EH action complete - * @ap: target ATA port - * @dev: target ATA dev for per-dev action (can be NULL) - * @action: action just completed - * - * Called right after performing EH actions to clear related bits - * in @ap->eh_context. - * - * LOCKING: - * None. - */ -static void ata_eh_done(struct ata_port *ap, struct ata_device *dev, - unsigned int action) -{ - /* if reset is complete, clear all reset actions & reset modifier */ - if (action & ATA_EH_RESET_MASK) { - action |= ATA_EH_RESET_MASK; - ap->eh_context.i.flags &= ~ATA_EHI_RESET_MODIFIER_MASK; - } - - ata_eh_clear_action(dev, &ap->eh_context.i, action); -} - -/** - * ata_err_string - convert err_mask to descriptive string - * @err_mask: error mask to convert to string - * - * Convert @err_mask to descriptive string. Errors are - * prioritized according to severity and only the most severe - * error is reported. - * - * LOCKING: - * None. - * - * RETURNS: - * Descriptive string for @err_mask - */ -static const char * ata_err_string(unsigned int err_mask) -{ - if (err_mask & AC_ERR_HOST_BUS) - return "host bus error"; - if (err_mask & AC_ERR_ATA_BUS) - return "ATA bus error"; - if (err_mask & AC_ERR_TIMEOUT) - return "timeout"; - if (err_mask & AC_ERR_HSM) - return "HSM violation"; - if (err_mask & AC_ERR_SYSTEM) - return "internal error"; - if (err_mask & AC_ERR_MEDIA) - return "media error"; - if (err_mask & AC_ERR_INVALID) - return "invalid argument"; - if (err_mask & AC_ERR_DEV) - return "device error"; - return "unknown error"; -} - -/** - * ata_read_log_page - read a specific log page - * @dev: target device - * @page: page to read - * @buf: buffer to store read page - * @sectors: number of sectors to read - * - * Read log page using READ_LOG_EXT command. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, AC_ERR_* mask otherwise. - */ -static unsigned int ata_read_log_page(struct ata_device *dev, - u8 page, void *buf, unsigned int sectors) -{ - struct ata_taskfile tf; - unsigned int err_mask; - - DPRINTK("read log page - page %d\n", page); - - ata_tf_init(dev, &tf); - tf.command = ATA_CMD_READ_LOG_EXT; - tf.lbal = page; - tf.nsect = sectors; - tf.hob_nsect = sectors >> 8; - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE; - tf.protocol = ATA_PROT_PIO; - - err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, - buf, sectors * ATA_SECT_SIZE); - - DPRINTK("EXIT, err_mask=%x\n", err_mask); - return err_mask; -} - -/** - * ata_eh_read_log_10h - Read log page 10h for NCQ error details - * @dev: Device to read log page 10h from - * @tag: Resulting tag of the failed command - * @tf: Resulting taskfile registers of the failed command - * - * Read log page 10h to obtain NCQ error details and clear error - * condition. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno otherwise. - */ -static int ata_eh_read_log_10h(struct ata_device *dev, - int *tag, struct ata_taskfile *tf) -{ - u8 *buf = dev->ap->sector_buf; - unsigned int err_mask; - u8 csum; - int i; - - err_mask = ata_read_log_page(dev, ATA_LOG_SATA_NCQ, buf, 1); - if (err_mask) - return -EIO; - - csum = 0; - for (i = 0; i < ATA_SECT_SIZE; i++) - csum += buf[i]; - if (csum) - ata_dev_printk(dev, KERN_WARNING, - "invalid checksum 0x%x on log page 10h\n", csum); - - if (buf[0] & 0x80) - return -ENOENT; - - *tag = buf[0] & 0x1f; - - tf->command = buf[2]; - tf->feature = buf[3]; - tf->lbal = buf[4]; - tf->lbam = buf[5]; - tf->lbah = buf[6]; - tf->device = buf[7]; - tf->hob_lbal = buf[8]; - tf->hob_lbam = buf[9]; - tf->hob_lbah = buf[10]; - tf->nsect = buf[12]; - tf->hob_nsect = buf[13]; - - return 0; -} - -/** - * atapi_eh_request_sense - perform ATAPI REQUEST_SENSE - * @dev: device to perform REQUEST_SENSE to - * @sense_buf: result sense data buffer (SCSI_SENSE_BUFFERSIZE bytes long) - * - * Perform ATAPI REQUEST_SENSE after the device reported CHECK - * SENSE. This function is EH helper. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, AC_ERR_* mask on failure - */ -static unsigned int atapi_eh_request_sense(struct ata_device *dev, - unsigned char *sense_buf) -{ - struct ata_port *ap = dev->ap; - struct ata_taskfile tf; - u8 cdb[ATAPI_CDB_LEN]; - - DPRINTK("ATAPI request sense\n"); - - ata_tf_init(dev, &tf); - - /* FIXME: is this needed? */ - memset(sense_buf, 0, SCSI_SENSE_BUFFERSIZE); - - /* XXX: why tf_read here? */ - ap->ops->tf_read(ap, &tf); - - /* fill these in, for the case where they are -not- overwritten */ - sense_buf[0] = 0x70; - sense_buf[2] = tf.feature >> 4; - - memset(cdb, 0, ATAPI_CDB_LEN); - cdb[0] = REQUEST_SENSE; - cdb[4] = SCSI_SENSE_BUFFERSIZE; - - tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; - tf.command = ATA_CMD_PACKET; - - /* is it pointless to prefer PIO for "safety reasons"? */ - if (ap->flags & ATA_FLAG_PIO_DMA) { - tf.protocol = ATA_PROT_ATAPI_DMA; - tf.feature |= ATAPI_PKT_DMA; - } else { - tf.protocol = ATA_PROT_ATAPI; - tf.lbam = (8 * 1024) & 0xff; - tf.lbah = (8 * 1024) >> 8; - } - - return ata_exec_internal(dev, &tf, cdb, DMA_FROM_DEVICE, - sense_buf, SCSI_SENSE_BUFFERSIZE); -} - -/** - * ata_eh_analyze_serror - analyze SError for a failed port - * @ap: ATA port to analyze SError for - * - * Analyze SError if available and further determine cause of - * failure. - * - * LOCKING: - * None. - */ -static void ata_eh_analyze_serror(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - u32 serror = ehc->i.serror; - unsigned int err_mask = 0, action = 0; - - if (serror & SERR_PERSISTENT) { - err_mask |= AC_ERR_ATA_BUS; - action |= ATA_EH_HARDRESET; - } - if (serror & - (SERR_DATA_RECOVERED | SERR_COMM_RECOVERED | SERR_DATA)) { - err_mask |= AC_ERR_ATA_BUS; - action |= ATA_EH_SOFTRESET; - } - if (serror & SERR_PROTOCOL) { - err_mask |= AC_ERR_HSM; - action |= ATA_EH_SOFTRESET; - } - if (serror & SERR_INTERNAL) { - err_mask |= AC_ERR_SYSTEM; - action |= ATA_EH_SOFTRESET; - } - if (serror & (SERR_PHYRDY_CHG | SERR_DEV_XCHG)) - ata_ehi_hotplugged(&ehc->i); - - ehc->i.err_mask |= err_mask; - ehc->i.action |= action; -} - -/** - * ata_eh_analyze_ncq_error - analyze NCQ error - * @ap: ATA port to analyze NCQ error for - * - * Read log page 10h, determine the offending qc and acquire - * error status TF. For NCQ device errors, all LLDDs have to do - * is setting AC_ERR_DEV in ehi->err_mask. This function takes - * care of the rest. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_eh_analyze_ncq_error(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - struct ata_device *dev = ap->device; - struct ata_queued_cmd *qc; - struct ata_taskfile tf; - int tag, rc; - - /* if frozen, we can't do much */ - if (ap->pflags & ATA_PFLAG_FROZEN) - return; - - /* is it NCQ device error? */ - if (!ap->sactive || !(ehc->i.err_mask & AC_ERR_DEV)) - return; - - /* has LLDD analyzed already? */ - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - qc = __ata_qc_from_tag(ap, tag); - - if (!(qc->flags & ATA_QCFLAG_FAILED)) - continue; - - if (qc->err_mask) - return; - } - - /* okay, this error is ours */ - rc = ata_eh_read_log_10h(dev, &tag, &tf); - if (rc) { - ata_port_printk(ap, KERN_ERR, "failed to read log page 10h " - "(errno=%d)\n", rc); - return; - } - - if (!(ap->sactive & (1 << tag))) { - ata_port_printk(ap, KERN_ERR, "log page 10h reported " - "inactive tag %d\n", tag); - return; - } - - /* we've got the perpetrator, condemn it */ - qc = __ata_qc_from_tag(ap, tag); - memcpy(&qc->result_tf, &tf, sizeof(tf)); - qc->err_mask |= AC_ERR_DEV; - ehc->i.err_mask &= ~AC_ERR_DEV; -} - -/** - * ata_eh_analyze_tf - analyze taskfile of a failed qc - * @qc: qc to analyze - * @tf: Taskfile registers to analyze - * - * Analyze taskfile of @qc and further determine cause of - * failure. This function also requests ATAPI sense data if - * avaliable. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * Determined recovery action - */ -static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc, - const struct ata_taskfile *tf) -{ - unsigned int tmp, action = 0; - u8 stat = tf->command, err = tf->feature; - - if ((stat & (ATA_BUSY | ATA_DRQ | ATA_DRDY)) != ATA_DRDY) { - qc->err_mask |= AC_ERR_HSM; - return ATA_EH_SOFTRESET; - } - - if (!(qc->err_mask & AC_ERR_DEV)) - return 0; - - switch (qc->dev->class) { - case ATA_DEV_ATA: - if (err & ATA_ICRC) - qc->err_mask |= AC_ERR_ATA_BUS; - if (err & ATA_UNC) - qc->err_mask |= AC_ERR_MEDIA; - if (err & ATA_IDNF) - qc->err_mask |= AC_ERR_INVALID; - break; - - case ATA_DEV_ATAPI: - tmp = atapi_eh_request_sense(qc->dev, - qc->scsicmd->sense_buffer); - if (!tmp) { - /* ATA_QCFLAG_SENSE_VALID is used to tell - * atapi_qc_complete() that sense data is - * already valid. - * - * TODO: interpret sense data and set - * appropriate err_mask. - */ - qc->flags |= ATA_QCFLAG_SENSE_VALID; - } else - qc->err_mask |= tmp; - } - - if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS)) - action |= ATA_EH_SOFTRESET; - - return action; -} - -static int ata_eh_categorize_ering_entry(struct ata_ering_entry *ent) -{ - if (ent->err_mask & (AC_ERR_ATA_BUS | AC_ERR_TIMEOUT)) - return 1; - - if (ent->is_io) { - if (ent->err_mask & AC_ERR_HSM) - return 1; - if ((ent->err_mask & - (AC_ERR_DEV|AC_ERR_MEDIA|AC_ERR_INVALID)) == AC_ERR_DEV) - return 2; - } - - return 0; -} - -struct speed_down_needed_arg { - u64 since; - int nr_errors[3]; -}; - -static int speed_down_needed_cb(struct ata_ering_entry *ent, void *void_arg) -{ - struct speed_down_needed_arg *arg = void_arg; - - if (ent->timestamp < arg->since) - return -1; - - arg->nr_errors[ata_eh_categorize_ering_entry(ent)]++; - return 0; -} - -/** - * ata_eh_speed_down_needed - Determine wheter speed down is necessary - * @dev: Device of interest - * - * This function examines error ring of @dev and determines - * whether speed down is necessary. Speed down is necessary if - * there have been more than 3 of Cat-1 errors or 10 of Cat-2 - * errors during last 15 minutes. - * - * Cat-1 errors are ATA_BUS, TIMEOUT for any command and HSM - * violation for known supported commands. - * - * Cat-2 errors are unclassified DEV error for known supported - * command. - * - * LOCKING: - * Inherited from caller. - * - * RETURNS: - * 1 if speed down is necessary, 0 otherwise - */ -static int ata_eh_speed_down_needed(struct ata_device *dev) -{ - const u64 interval = 15LLU * 60 * HZ; - static const int err_limits[3] = { -1, 3, 10 }; - struct speed_down_needed_arg arg; - struct ata_ering_entry *ent; - int err_cat; - u64 j64; - - ent = ata_ering_top(&dev->ering); - if (!ent) - return 0; - - err_cat = ata_eh_categorize_ering_entry(ent); - if (err_cat == 0) - return 0; - - memset(&arg, 0, sizeof(arg)); - - j64 = get_jiffies_64(); - if (j64 >= interval) - arg.since = j64 - interval; - else - arg.since = 0; - - ata_ering_map(&dev->ering, speed_down_needed_cb, &arg); - - return arg.nr_errors[err_cat] > err_limits[err_cat]; -} - -/** - * ata_eh_speed_down - record error and speed down if necessary - * @dev: Failed device - * @is_io: Did the device fail during normal IO? - * @err_mask: err_mask of the error - * - * Record error and examine error history to determine whether - * adjusting transmission speed is necessary. It also sets - * transmission limits appropriately if such adjustment is - * necessary. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno otherwise - */ -static int ata_eh_speed_down(struct ata_device *dev, int is_io, - unsigned int err_mask) -{ - if (!err_mask) - return 0; - - /* record error and determine whether speed down is necessary */ - ata_ering_record(&dev->ering, is_io, err_mask); - - if (!ata_eh_speed_down_needed(dev)) - return 0; - - /* speed down SATA link speed if possible */ - if (sata_down_spd_limit(dev->ap) == 0) - return ATA_EH_HARDRESET; - - /* lower transfer mode */ - if (ata_down_xfermask_limit(dev, 0) == 0) - return ATA_EH_SOFTRESET; - - ata_dev_printk(dev, KERN_ERR, - "speed down requested but no transfer mode left\n"); - return 0; -} - -/** - * ata_eh_autopsy - analyze error and determine recovery action - * @ap: ATA port to perform autopsy on - * - * Analyze why @ap failed and determine which recovery action is - * needed. This function also sets more detailed AC_ERR_* values - * and fills sense data for ATAPI CHECK SENSE. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_eh_autopsy(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - unsigned int all_err_mask = 0; - int tag, is_io = 0; - u32 serror; - int rc; - - DPRINTK("ENTER\n"); - - if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) - return; - - /* obtain and analyze SError */ - rc = sata_scr_read(ap, SCR_ERROR, &serror); - if (rc == 0) { - ehc->i.serror |= serror; - ata_eh_analyze_serror(ap); - } else if (rc != -EOPNOTSUPP) - ehc->i.action |= ATA_EH_HARDRESET; - - /* analyze NCQ failure */ - ata_eh_analyze_ncq_error(ap); - - /* any real error trumps AC_ERR_OTHER */ - if (ehc->i.err_mask & ~AC_ERR_OTHER) - ehc->i.err_mask &= ~AC_ERR_OTHER; - - all_err_mask |= ehc->i.err_mask; - - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); - - if (!(qc->flags & ATA_QCFLAG_FAILED)) - continue; - - /* inherit upper level err_mask */ - qc->err_mask |= ehc->i.err_mask; - - /* analyze TF */ - ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf); - - /* DEV errors are probably spurious in case of ATA_BUS error */ - if (qc->err_mask & AC_ERR_ATA_BUS) - qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_MEDIA | - AC_ERR_INVALID); - - /* any real error trumps unknown error */ - if (qc->err_mask & ~AC_ERR_OTHER) - qc->err_mask &= ~AC_ERR_OTHER; - - /* SENSE_VALID trumps dev/unknown error and revalidation */ - if (qc->flags & ATA_QCFLAG_SENSE_VALID) { - qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER); - ehc->i.action &= ~ATA_EH_REVALIDATE; - } - - /* accumulate error info */ - ehc->i.dev = qc->dev; - all_err_mask |= qc->err_mask; - if (qc->flags & ATA_QCFLAG_IO) - is_io = 1; - } - - /* enforce default EH actions */ - if (ap->pflags & ATA_PFLAG_FROZEN || - all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT)) - ehc->i.action |= ATA_EH_SOFTRESET; - else if (all_err_mask) - ehc->i.action |= ATA_EH_REVALIDATE; - - /* if we have offending qcs and the associated failed device */ - if (ehc->i.dev) { - /* speed down */ - ehc->i.action |= ata_eh_speed_down(ehc->i.dev, is_io, - all_err_mask); - - /* perform per-dev EH action only on the offending device */ - ehc->i.dev_action[ehc->i.dev->devno] |= - ehc->i.action & ATA_EH_PERDEV_MASK; - ehc->i.action &= ~ATA_EH_PERDEV_MASK; - } - - DPRINTK("EXIT\n"); -} - -/** - * ata_eh_report - report error handling to user - * @ap: ATA port EH is going on - * - * Report EH to user. - * - * LOCKING: - * None. - */ -static void ata_eh_report(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - const char *frozen, *desc; - int tag, nr_failed = 0; - - desc = NULL; - if (ehc->i.desc[0] != '\0') - desc = ehc->i.desc; - - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); - - if (!(qc->flags & ATA_QCFLAG_FAILED)) - continue; - if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask) - continue; - - nr_failed++; - } - - if (!nr_failed && !ehc->i.err_mask) - return; - - frozen = ""; - if (ap->pflags & ATA_PFLAG_FROZEN) - frozen = " frozen"; - - if (ehc->i.dev) { - ata_dev_printk(ehc->i.dev, KERN_ERR, "exception Emask 0x%x " - "SAct 0x%x SErr 0x%x action 0x%x%s\n", - ehc->i.err_mask, ap->sactive, ehc->i.serror, - ehc->i.action, frozen); - if (desc) - ata_dev_printk(ehc->i.dev, KERN_ERR, "(%s)\n", desc); - } else { - ata_port_printk(ap, KERN_ERR, "exception Emask 0x%x " - "SAct 0x%x SErr 0x%x action 0x%x%s\n", - ehc->i.err_mask, ap->sactive, ehc->i.serror, - ehc->i.action, frozen); - if (desc) - ata_port_printk(ap, KERN_ERR, "(%s)\n", desc); - } - - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); - - if (!(qc->flags & ATA_QCFLAG_FAILED) || !qc->err_mask) - continue; - - ata_dev_printk(qc->dev, KERN_ERR, "tag %d cmd 0x%x " - "Emask 0x%x stat 0x%x err 0x%x (%s)\n", - qc->tag, qc->tf.command, qc->err_mask, - qc->result_tf.command, qc->result_tf.feature, - ata_err_string(qc->err_mask)); - } -} - -static int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset, - unsigned int *classes) -{ - int i, rc; - - for (i = 0; i < ATA_MAX_DEVICES; i++) - classes[i] = ATA_DEV_UNKNOWN; - - rc = reset(ap, classes); - if (rc) - return rc; - - /* If any class isn't ATA_DEV_UNKNOWN, consider classification - * is complete and convert all ATA_DEV_UNKNOWN to - * ATA_DEV_NONE. - */ - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (classes[i] != ATA_DEV_UNKNOWN) - break; - - if (i < ATA_MAX_DEVICES) - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (classes[i] == ATA_DEV_UNKNOWN) - classes[i] = ATA_DEV_NONE; - - return 0; -} - -static int ata_eh_followup_srst_needed(int rc, int classify, - const unsigned int *classes) -{ - if (rc == -EAGAIN) - return 1; - if (rc != 0) - return 0; - if (classify && classes[0] == ATA_DEV_UNKNOWN) - return 1; - return 0; -} - -static int ata_eh_reset(struct ata_port *ap, int classify, - ata_prereset_fn_t prereset, ata_reset_fn_t softreset, - ata_reset_fn_t hardreset, ata_postreset_fn_t postreset) -{ - struct ata_eh_context *ehc = &ap->eh_context; - unsigned int *classes = ehc->classes; - int tries = ATA_EH_RESET_TRIES; - int verbose = !(ehc->i.flags & ATA_EHI_QUIET); - unsigned int action; - ata_reset_fn_t reset; - int i, did_followup_srst, rc; - - /* about to reset */ - ata_eh_about_to_do(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK); - - /* Determine which reset to use and record in ehc->i.action. - * prereset() may examine and modify it. - */ - action = ehc->i.action; - ehc->i.action &= ~ATA_EH_RESET_MASK; - if (softreset && (!hardreset || (!sata_set_spd_needed(ap) && - !(action & ATA_EH_HARDRESET)))) - ehc->i.action |= ATA_EH_SOFTRESET; - else - ehc->i.action |= ATA_EH_HARDRESET; - - if (prereset) { - rc = prereset(ap); - if (rc) { - ata_port_printk(ap, KERN_ERR, - "prereset failed (errno=%d)\n", rc); - return rc; - } - } - - /* prereset() might have modified ehc->i.action */ - if (ehc->i.action & ATA_EH_HARDRESET) - reset = hardreset; - else if (ehc->i.action & ATA_EH_SOFTRESET) - reset = softreset; - else { - /* prereset told us not to reset, bang classes and return */ - for (i = 0; i < ATA_MAX_DEVICES; i++) - classes[i] = ATA_DEV_NONE; - return 0; - } - - /* did prereset() screw up? if so, fix up to avoid oopsing */ - if (!reset) { - ata_port_printk(ap, KERN_ERR, "BUG: prereset() requested " - "invalid reset type\n"); - if (softreset) - reset = softreset; - else - reset = hardreset; - } - - retry: - /* shut up during boot probing */ - if (verbose) - ata_port_printk(ap, KERN_INFO, "%s resetting port\n", - reset == softreset ? "soft" : "hard"); - - /* mark that this EH session started with reset */ - ehc->i.flags |= ATA_EHI_DID_RESET; - - rc = ata_do_reset(ap, reset, classes); - - did_followup_srst = 0; - if (reset == hardreset && - ata_eh_followup_srst_needed(rc, classify, classes)) { - /* okay, let's do follow-up softreset */ - did_followup_srst = 1; - reset = softreset; - - if (!reset) { - ata_port_printk(ap, KERN_ERR, - "follow-up softreset required " - "but no softreset avaliable\n"); - return -EINVAL; - } - - ata_eh_about_to_do(ap, NULL, ATA_EH_RESET_MASK); - rc = ata_do_reset(ap, reset, classes); - - if (rc == 0 && classify && - classes[0] == ATA_DEV_UNKNOWN) { - ata_port_printk(ap, KERN_ERR, - "classification failed\n"); - return -EINVAL; - } - } - - if (rc && --tries) { - const char *type; - - if (reset == softreset) { - if (did_followup_srst) - type = "follow-up soft"; - else - type = "soft"; - } else - type = "hard"; - - ata_port_printk(ap, KERN_WARNING, - "%sreset failed, retrying in 5 secs\n", type); - ssleep(5); - - if (reset == hardreset) - sata_down_spd_limit(ap); - if (hardreset) - reset = hardreset; - goto retry; - } - - if (rc == 0) { - /* After the reset, the device state is PIO 0 and the - * controller state is undefined. Record the mode. - */ - for (i = 0; i < ATA_MAX_DEVICES; i++) - ap->device[i].pio_mode = XFER_PIO_0; - - if (postreset) - postreset(ap, classes); - - /* reset successful, schedule revalidation */ - ata_eh_done(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK); - ehc->i.action |= ATA_EH_REVALIDATE; - } - - return rc; -} - -static int ata_eh_revalidate_and_attach(struct ata_port *ap, - struct ata_device **r_failed_dev) -{ - struct ata_eh_context *ehc = &ap->eh_context; - struct ata_device *dev; - unsigned long flags; - int i, rc = 0; - - DPRINTK("ENTER\n"); - - for (i = 0; i < ATA_MAX_DEVICES; i++) { - unsigned int action; - - dev = &ap->device[i]; - action = ata_eh_dev_action(dev); - - if (action & ATA_EH_REVALIDATE && ata_dev_ready(dev)) { - if (ata_port_offline(ap)) { - rc = -EIO; - break; - } - - ata_eh_about_to_do(ap, dev, ATA_EH_REVALIDATE); - rc = ata_dev_revalidate(dev, - ehc->i.flags & ATA_EHI_DID_RESET); - if (rc) - break; - - ata_eh_done(ap, dev, ATA_EH_REVALIDATE); - - /* schedule the scsi_rescan_device() here */ - queue_work(ata_aux_wq, &(ap->scsi_rescan_task)); - } else if (dev->class == ATA_DEV_UNKNOWN && - ehc->tries[dev->devno] && - ata_class_enabled(ehc->classes[dev->devno])) { - dev->class = ehc->classes[dev->devno]; - - rc = ata_dev_read_id(dev, &dev->class, 1, dev->id); - if (rc == 0) - rc = ata_dev_configure(dev, 1); - - if (rc) { - dev->class = ATA_DEV_UNKNOWN; - break; - } - - spin_lock_irqsave(ap->lock, flags); - ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG; - spin_unlock_irqrestore(ap->lock, flags); - } - } - - if (rc) - *r_failed_dev = dev; - - DPRINTK("EXIT\n"); - return rc; -} - -/** - * ata_eh_suspend - handle suspend EH action - * @ap: target host port - * @r_failed_dev: result parameter to indicate failing device - * - * Handle suspend EH action. Disk devices are spinned down and - * other types of devices are just marked suspended. Once - * suspended, no EH action to the device is allowed until it is - * resumed. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno otherwise - */ -static int ata_eh_suspend(struct ata_port *ap, struct ata_device **r_failed_dev) -{ - struct ata_device *dev; - int i, rc = 0; - - DPRINTK("ENTER\n"); - - for (i = 0; i < ATA_MAX_DEVICES; i++) { - unsigned long flags; - unsigned int action, err_mask; - - dev = &ap->device[i]; - action = ata_eh_dev_action(dev); - - if (!ata_dev_enabled(dev) || !(action & ATA_EH_SUSPEND)) - continue; - - WARN_ON(dev->flags & ATA_DFLAG_SUSPENDED); - - ata_eh_about_to_do(ap, dev, ATA_EH_SUSPEND); - - if (dev->class == ATA_DEV_ATA && !(action & ATA_EH_PM_FREEZE)) { - /* flush cache */ - rc = ata_flush_cache(dev); - if (rc) - break; - - /* spin down */ - err_mask = ata_do_simple_cmd(dev, ATA_CMD_STANDBYNOW1); - if (err_mask) { - ata_dev_printk(dev, KERN_ERR, "failed to " - "spin down (err_mask=0x%x)\n", - err_mask); - rc = -EIO; - break; - } - } - - spin_lock_irqsave(ap->lock, flags); - dev->flags |= ATA_DFLAG_SUSPENDED; - spin_unlock_irqrestore(ap->lock, flags); - - ata_eh_done(ap, dev, ATA_EH_SUSPEND); - } - - if (rc) - *r_failed_dev = dev; - - DPRINTK("EXIT\n"); - return 0; -} - -/** - * ata_eh_prep_resume - prep for resume EH action - * @ap: target host port - * - * Clear SUSPENDED in preparation for scheduled resume actions. - * This allows other parts of EH to access the devices being - * resumed. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_eh_prep_resume(struct ata_port *ap) -{ - struct ata_device *dev; - unsigned long flags; - int i; - - DPRINTK("ENTER\n"); - - for (i = 0; i < ATA_MAX_DEVICES; i++) { - unsigned int action; - - dev = &ap->device[i]; - action = ata_eh_dev_action(dev); - - if (!ata_dev_enabled(dev) || !(action & ATA_EH_RESUME)) - continue; - - spin_lock_irqsave(ap->lock, flags); - dev->flags &= ~ATA_DFLAG_SUSPENDED; - spin_unlock_irqrestore(ap->lock, flags); - } - - DPRINTK("EXIT\n"); -} - -/** - * ata_eh_resume - handle resume EH action - * @ap: target host port - * @r_failed_dev: result parameter to indicate failing device - * - * Handle resume EH action. Target devices are already reset and - * revalidated. Spinning up is the only operation left. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno otherwise - */ -static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev) -{ - struct ata_device *dev; - int i, rc = 0; - - DPRINTK("ENTER\n"); - - for (i = 0; i < ATA_MAX_DEVICES; i++) { - unsigned int action, err_mask; - - dev = &ap->device[i]; - action = ata_eh_dev_action(dev); - - if (!ata_dev_enabled(dev) || !(action & ATA_EH_RESUME)) - continue; - - ata_eh_about_to_do(ap, dev, ATA_EH_RESUME); - - if (dev->class == ATA_DEV_ATA && !(action & ATA_EH_PM_FREEZE)) { - err_mask = ata_do_simple_cmd(dev, - ATA_CMD_IDLEIMMEDIATE); - if (err_mask) { - ata_dev_printk(dev, KERN_ERR, "failed to " - "spin up (err_mask=0x%x)\n", - err_mask); - rc = -EIO; - break; - } - } - - ata_eh_done(ap, dev, ATA_EH_RESUME); - } - - if (rc) - *r_failed_dev = dev; - - DPRINTK("EXIT\n"); - return 0; -} - -static int ata_port_nr_enabled(struct ata_port *ap) -{ - int i, cnt = 0; - - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (ata_dev_enabled(&ap->device[i])) - cnt++; - return cnt; -} - -static int ata_port_nr_vacant(struct ata_port *ap) -{ - int i, cnt = 0; - - for (i = 0; i < ATA_MAX_DEVICES; i++) - if (ap->device[i].class == ATA_DEV_UNKNOWN) - cnt++; - return cnt; -} - -static int ata_eh_skip_recovery(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - int i; - - /* skip if all possible devices are suspended */ - for (i = 0; i < ata_port_max_devices(ap); i++) { - struct ata_device *dev = &ap->device[i]; - - if (!(dev->flags & ATA_DFLAG_SUSPENDED)) - break; - } - - if (i == ata_port_max_devices(ap)) - return 1; - - /* thaw frozen port, resume link and recover failed devices */ - if ((ap->pflags & ATA_PFLAG_FROZEN) || - (ehc->i.flags & ATA_EHI_RESUME_LINK) || ata_port_nr_enabled(ap)) - return 0; - - /* skip if class codes for all vacant slots are ATA_DEV_NONE */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - struct ata_device *dev = &ap->device[i]; - - if (dev->class == ATA_DEV_UNKNOWN && - ehc->classes[dev->devno] != ATA_DEV_NONE) - return 0; - } - - return 1; -} - -/** - * ata_eh_recover - recover host port after error - * @ap: host port to recover - * @prereset: prereset method (can be NULL) - * @softreset: softreset method (can be NULL) - * @hardreset: hardreset method (can be NULL) - * @postreset: postreset method (can be NULL) - * - * This is the alpha and omega, eum and yang, heart and soul of - * libata exception handling. On entry, actions required to - * recover the port and hotplug requests are recorded in - * eh_context. This function executes all the operations with - * appropriate retrials and fallbacks to resurrect failed - * devices, detach goners and greet newcomers. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno on failure. - */ -static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, - ata_reset_fn_t softreset, ata_reset_fn_t hardreset, - ata_postreset_fn_t postreset) -{ - struct ata_eh_context *ehc = &ap->eh_context; - struct ata_device *dev; - int down_xfermask, i, rc; - - DPRINTK("ENTER\n"); - - /* prep for recovery */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; - - ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; - - /* process hotplug request */ - if (dev->flags & ATA_DFLAG_DETACH) - ata_eh_detach_dev(dev); - - if (!ata_dev_enabled(dev) && - ((ehc->i.probe_mask & (1 << dev->devno)) && - !(ehc->did_probe_mask & (1 << dev->devno)))) { - ata_eh_detach_dev(dev); - ata_dev_init(dev); - ehc->did_probe_mask |= (1 << dev->devno); - ehc->i.action |= ATA_EH_SOFTRESET; - } - } - - retry: - down_xfermask = 0; - rc = 0; - - /* if UNLOADING, finish immediately */ - if (ap->pflags & ATA_PFLAG_UNLOADING) - goto out; - - /* prep for resume */ - ata_eh_prep_resume(ap); - - /* skip EH if possible. */ - if (ata_eh_skip_recovery(ap)) - ehc->i.action = 0; - - for (i = 0; i < ATA_MAX_DEVICES; i++) - ehc->classes[i] = ATA_DEV_UNKNOWN; - - /* reset */ - if (ehc->i.action & ATA_EH_RESET_MASK) { - ata_eh_freeze_port(ap); - - rc = ata_eh_reset(ap, ata_port_nr_vacant(ap), prereset, - softreset, hardreset, postreset); - if (rc) { - ata_port_printk(ap, KERN_ERR, - "reset failed, giving up\n"); - goto out; - } - - ata_eh_thaw_port(ap); - } - - /* revalidate existing devices and attach new ones */ - rc = ata_eh_revalidate_and_attach(ap, &dev); - if (rc) - goto dev_fail; - - /* resume devices */ - rc = ata_eh_resume(ap, &dev); - if (rc) - goto dev_fail; - - /* configure transfer mode if the port has been reset */ - if (ehc->i.flags & ATA_EHI_DID_RESET) { - rc = ata_set_mode(ap, &dev); - if (rc) { - down_xfermask = 1; - goto dev_fail; - } - } - - /* suspend devices */ - rc = ata_eh_suspend(ap, &dev); - if (rc) - goto dev_fail; - - goto out; - - dev_fail: - switch (rc) { - case -ENODEV: - /* device missing, schedule probing */ - ehc->i.probe_mask |= (1 << dev->devno); - case -EINVAL: - ehc->tries[dev->devno] = 0; - break; - case -EIO: - sata_down_spd_limit(ap); - default: - ehc->tries[dev->devno]--; - if (down_xfermask && - ata_down_xfermask_limit(dev, ehc->tries[dev->devno] == 1)) - ehc->tries[dev->devno] = 0; - } - - if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { - /* disable device if it has used up all its chances */ - ata_dev_disable(dev); - - /* detach if offline */ - if (ata_port_offline(ap)) - ata_eh_detach_dev(dev); - - /* probe if requested */ - if ((ehc->i.probe_mask & (1 << dev->devno)) && - !(ehc->did_probe_mask & (1 << dev->devno))) { - ata_eh_detach_dev(dev); - ata_dev_init(dev); - - ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; - ehc->did_probe_mask |= (1 << dev->devno); - ehc->i.action |= ATA_EH_SOFTRESET; - } - } else { - /* soft didn't work? be haaaaard */ - if (ehc->i.flags & ATA_EHI_DID_RESET) - ehc->i.action |= ATA_EH_HARDRESET; - else - ehc->i.action |= ATA_EH_SOFTRESET; - } - - if (ata_port_nr_enabled(ap)) { - ata_port_printk(ap, KERN_WARNING, "failed to recover some " - "devices, retrying in 5 secs\n"); - ssleep(5); - } else { - /* no device left, repeat fast */ - msleep(500); - } - - goto retry; - - out: - if (rc) { - for (i = 0; i < ATA_MAX_DEVICES; i++) - ata_dev_disable(&ap->device[i]); - } - - DPRINTK("EXIT, rc=%d\n", rc); - return rc; -} - -/** - * ata_eh_finish - finish up EH - * @ap: host port to finish EH for - * - * Recovery is complete. Clean up EH states and retry or finish - * failed qcs. - * - * LOCKING: - * None. - */ -static void ata_eh_finish(struct ata_port *ap) -{ - int tag; - - /* retry or finish qcs */ - for (tag = 0; tag < ATA_MAX_QUEUE; tag++) { - struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); - - if (!(qc->flags & ATA_QCFLAG_FAILED)) - continue; - - if (qc->err_mask) { - /* FIXME: Once EH migration is complete, - * generate sense data in this function, - * considering both err_mask and tf. - */ - if (qc->err_mask & AC_ERR_INVALID) - ata_eh_qc_complete(qc); - else - ata_eh_qc_retry(qc); - } else { - if (qc->flags & ATA_QCFLAG_SENSE_VALID) { - ata_eh_qc_complete(qc); - } else { - /* feed zero TF to sense generation */ - memset(&qc->result_tf, 0, sizeof(qc->result_tf)); - ata_eh_qc_retry(qc); - } - } - } -} - -/** - * ata_do_eh - do standard error handling - * @ap: host port to handle error for - * @prereset: prereset method (can be NULL) - * @softreset: softreset method (can be NULL) - * @hardreset: hardreset method (can be NULL) - * @postreset: postreset method (can be NULL) - * - * Perform standard error handling sequence. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, - ata_reset_fn_t softreset, ata_reset_fn_t hardreset, - ata_postreset_fn_t postreset) -{ - ata_eh_autopsy(ap); - ata_eh_report(ap); - ata_eh_recover(ap, prereset, softreset, hardreset, postreset); - ata_eh_finish(ap); -} - -/** - * ata_eh_handle_port_suspend - perform port suspend operation - * @ap: port to suspend - * - * Suspend @ap. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_eh_handle_port_suspend(struct ata_port *ap) -{ - unsigned long flags; - int rc = 0; - - /* are we suspending? */ - spin_lock_irqsave(ap->lock, flags); - if (!(ap->pflags & ATA_PFLAG_PM_PENDING) || - ap->pm_mesg.event == PM_EVENT_ON) { - spin_unlock_irqrestore(ap->lock, flags); - return; - } - spin_unlock_irqrestore(ap->lock, flags); - - WARN_ON(ap->pflags & ATA_PFLAG_SUSPENDED); - - /* suspend */ - ata_eh_freeze_port(ap); - - if (ap->ops->port_suspend) - rc = ap->ops->port_suspend(ap, ap->pm_mesg); - - /* report result */ - spin_lock_irqsave(ap->lock, flags); - - ap->pflags &= ~ATA_PFLAG_PM_PENDING; - if (rc == 0) - ap->pflags |= ATA_PFLAG_SUSPENDED; - else - ata_port_schedule_eh(ap); - - if (ap->pm_result) { - *ap->pm_result = rc; - ap->pm_result = NULL; - } - - spin_unlock_irqrestore(ap->lock, flags); - - return; -} - -/** - * ata_eh_handle_port_resume - perform port resume operation - * @ap: port to resume - * - * Resume @ap. - * - * This function also waits upto one second until all devices - * hanging off this port requests resume EH action. This is to - * prevent invoking EH and thus reset multiple times on resume. - * - * On DPM resume, where some of devices might not be resumed - * together, this may delay port resume upto one second, but such - * DPM resumes are rare and 1 sec delay isn't too bad. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_eh_handle_port_resume(struct ata_port *ap) -{ - unsigned long timeout; - unsigned long flags; - int i, rc = 0; - - /* are we resuming? */ - spin_lock_irqsave(ap->lock, flags); - if (!(ap->pflags & ATA_PFLAG_PM_PENDING) || - ap->pm_mesg.event != PM_EVENT_ON) { - spin_unlock_irqrestore(ap->lock, flags); - return; - } - spin_unlock_irqrestore(ap->lock, flags); - - /* spurious? */ - if (!(ap->pflags & ATA_PFLAG_SUSPENDED)) - goto done; - - if (ap->ops->port_resume) - rc = ap->ops->port_resume(ap); - - /* give devices time to request EH */ - timeout = jiffies + HZ; /* 1s max */ - while (1) { - for (i = 0; i < ATA_MAX_DEVICES; i++) { - struct ata_device *dev = &ap->device[i]; - unsigned int action = ata_eh_dev_action(dev); - - if ((dev->flags & ATA_DFLAG_SUSPENDED) && - !(action & ATA_EH_RESUME)) - break; - } - - if (i == ATA_MAX_DEVICES || time_after(jiffies, timeout)) - break; - msleep(10); - } - - done: - spin_lock_irqsave(ap->lock, flags); - ap->pflags &= ~(ATA_PFLAG_PM_PENDING | ATA_PFLAG_SUSPENDED); - if (ap->pm_result) { - *ap->pm_result = rc; - ap->pm_result = NULL; - } - spin_unlock_irqrestore(ap->lock, flags); -} diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index e92c31d69..b405acf11 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -38,10 +38,9 @@ #include #include #include -#include #include #include -#include +#include #include #include #include @@ -52,14 +51,10 @@ #define SECTOR_SIZE 512 typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); - -static struct ata_device * __ata_scsi_find_dev(struct ata_port *ap, - const struct scsi_device *scsidev); -static struct ata_device * ata_scsi_find_dev(struct ata_port *ap, - const struct scsi_device *scsidev); -static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, - unsigned int id, unsigned int lun); - +static struct ata_device * +ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); +static void ata_scsi_error(struct Scsi_Host *host); +enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); #define RW_RECOVERY_MPAGE 0x1 #define RW_RECOVERY_MPAGE_LEN 12 @@ -107,7 +102,6 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { struct scsi_transport_template ata_scsi_transport_template = { .eh_strategy_handler = ata_scsi_error, .eh_timed_out = ata_scsi_timed_out, - .user_scan = ata_scsi_user_scan, }; @@ -222,7 +216,9 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg) && copy_to_user(arg + sizeof(args), argbuf, argsize)) rc = -EFAULT; error: - kfree(argbuf); + if (argbuf) + kfree(argbuf); + return rc; } @@ -308,6 +304,7 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) /** * ata_scsi_qc_new - acquire new ata_queued_cmd reference + * @ap: ATA port to which the new command is attached * @dev: ATA device to which the new command is attached * @cmd: SCSI command that originated this ATA command * @done: SCSI command completion function @@ -326,13 +323,14 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg) * RETURNS: * Command allocated, or %NULL if none available. */ -struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, +struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap, + struct ata_device *dev, struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_queued_cmd *qc; - qc = ata_qc_new_init(dev); + qc = ata_qc_new_init(ap, dev); if (qc) { qc->scsicmd = cmd; qc->scsidone = done; @@ -397,129 +395,20 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf) } } -/** - * ata_scsi_device_suspend - suspend ATA device associated with sdev - * @sdev: the SCSI device to suspend - * @state: target power management state - * - * Request suspend EH action on the ATA device associated with - * @sdev and wait for the operation to complete. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0 on success, -errno otherwise. - */ -int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) +int ata_scsi_device_resume(struct scsi_device *sdev) { - struct ata_port *ap = ata_shost_to_port(sdev->host); - struct ata_device *dev = ata_scsi_find_dev(ap, sdev); - unsigned long flags; - unsigned int action; - int rc = 0; - - if (!dev) - goto out; - - spin_lock_irqsave(ap->lock, flags); - - /* wait for the previous resume to complete */ - while (dev->flags & ATA_DFLAG_SUSPENDED) { - spin_unlock_irqrestore(ap->lock, flags); - ata_port_wait_eh(ap); - spin_lock_irqsave(ap->lock, flags); - } - - /* if @sdev is already detached, nothing to do */ - if (sdev->sdev_state == SDEV_OFFLINE || - sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) - goto out_unlock; - - /* request suspend */ - action = ATA_EH_SUSPEND; - if (state.event != PM_EVENT_SUSPEND) - action |= ATA_EH_PM_FREEZE; - ap->eh_info.dev_action[dev->devno] |= action; - ap->eh_info.flags |= ATA_EHI_QUIET; - ata_port_schedule_eh(ap); - - spin_unlock_irqrestore(ap->lock, flags); + struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_device *dev = &ap->device[sdev->id]; - /* wait for EH to do the job */ - ata_port_wait_eh(ap); - - spin_lock_irqsave(ap->lock, flags); - - /* If @sdev is still attached but the associated ATA device - * isn't suspended, the operation failed. - */ - if (sdev->sdev_state != SDEV_OFFLINE && - sdev->sdev_state != SDEV_CANCEL && sdev->sdev_state != SDEV_DEL && - !(dev->flags & ATA_DFLAG_SUSPENDED)) - rc = -EIO; - - out_unlock: - spin_unlock_irqrestore(ap->lock, flags); - out: - if (rc == 0) - sdev->sdev_gendev.power.power_state = state; - return rc; + return ata_device_resume(ap, dev); } -/** - * ata_scsi_device_resume - resume ATA device associated with sdev - * @sdev: the SCSI device to resume - * - * Request resume EH action on the ATA device associated with - * @sdev and return immediately. This enables parallel - * wakeup/spinup of devices. - * - * LOCKING: - * Kernel thread context (may sleep). - * - * RETURNS: - * 0. - */ -int ata_scsi_device_resume(struct scsi_device *sdev) +int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) { - struct ata_port *ap = ata_shost_to_port(sdev->host); - struct ata_device *dev = ata_scsi_find_dev(ap, sdev); - struct ata_eh_info *ehi = &ap->eh_info; - unsigned long flags; - unsigned int action; - - if (!dev) - goto out; - - spin_lock_irqsave(ap->lock, flags); + struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_device *dev = &ap->device[sdev->id]; - /* if @sdev is already detached, nothing to do */ - if (sdev->sdev_state == SDEV_OFFLINE || - sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) - goto out_unlock; - - /* request resume */ - action = ATA_EH_RESUME; - if (sdev->sdev_gendev.power.power_state.event == PM_EVENT_SUSPEND) - __ata_ehi_hotplugged(ehi); - else - action |= ATA_EH_PM_FREEZE | ATA_EH_SOFTRESET; - ehi->dev_action[dev->devno] |= action; - - /* We don't want autopsy and verbose EH messages. Disable - * those if we're the only device on this link. - */ - if (ata_port_max_devices(ap) == 1) - ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; - - ata_port_schedule_eh(ap); - - out_unlock: - spin_unlock_irqrestore(ap->lock, flags); - out: - sdev->sdev_gendev.power.power_state = PMSG_ON; - return 0; + return ata_device_suspend(ap, dev, state); } /** @@ -530,7 +419,6 @@ int ata_scsi_device_resume(struct scsi_device *sdev) * @sk: the sense key we'll fill out * @asc: the additional sense code we'll fill out * @ascq: the additional sense code qualifier we'll fill out - * @verbose: be verbose * * Converts an ATA error into a SCSI error. Fill out pointers to * SK, ASC, and ASCQ bytes for later use in fixed or descriptor @@ -540,7 +428,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) * spin_lock_irqsave(host_set lock) */ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, - u8 *ascq, int verbose) + u8 *ascq) { int i; @@ -605,9 +493,8 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, } } /* No immediate match */ - if (verbose) - printk(KERN_WARNING "ata%u: no sense translation for " - "error 0x%02x\n", id, drv_err); + printk(KERN_WARNING "ata%u: no sense translation for " + "error 0x%02x\n", id, drv_err); } /* Fall back to interpreting status bits */ @@ -620,9 +507,8 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, } } /* No error? Undecoded? */ - if (verbose) - printk(KERN_WARNING "ata%u: no sense translation for " - "status: 0x%02x\n", id, drv_stat); + printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n", + id, drv_stat); /* We need a sensible error return here, which is tricky, and one that won't cause people to do things like return a disk wrongly */ @@ -631,10 +517,6 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, *ascq = 0x00; translate_done: - if (verbose) - printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x " - "to SCSI SK/ASC/ASCQ 0x%x/%02x/%02x\n", - id, drv_stat, drv_err, *sk, *asc, *ascq); return; } @@ -654,23 +536,27 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc) { struct scsi_cmnd *cmd = qc->scsicmd; - struct ata_taskfile *tf = &qc->result_tf; + struct ata_taskfile *tf = &qc->tf; unsigned char *sb = cmd->sense_buffer; unsigned char *desc = sb + 8; - int verbose = qc->ap->ops->error_handler == NULL; memset(sb, 0, SCSI_SENSE_BUFFERSIZE); cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; + /* + * Read the controller registers. + */ + WARN_ON(qc->ap->ops->tf_read == NULL); + qc->ap->ops->tf_read(qc->ap, tf); + /* * Use ata_to_sense_error() to map status register bits * onto sense key, asc & ascq. */ - if (qc->err_mask || - tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { + if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ata_to_sense_error(qc->ap->id, tf->command, tf->feature, - &sb[1], &sb[2], &sb[3], verbose); + &sb[1], &sb[2], &sb[3]); sb[1] &= 0x0f; } @@ -726,22 +612,26 @@ void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc) void ata_gen_fixed_sense(struct ata_queued_cmd *qc) { struct scsi_cmnd *cmd = qc->scsicmd; - struct ata_taskfile *tf = &qc->result_tf; + struct ata_taskfile *tf = &qc->tf; unsigned char *sb = cmd->sense_buffer; - int verbose = qc->ap->ops->error_handler == NULL; memset(sb, 0, SCSI_SENSE_BUFFERSIZE); cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; + /* + * Read the controller registers. + */ + WARN_ON(qc->ap->ops->tf_read == NULL); + qc->ap->ops->tf_read(qc->ap, tf); + /* * Use ata_to_sense_error() to map status register bits * onto sense key, asc & ascq. */ - if (qc->err_mask || - tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { + if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ata_to_sense_error(qc->ap->id, tf->command, tf->feature, - &sb[2], &sb[12], &sb[13], verbose); + &sb[2], &sb[12], &sb[13]); sb[2] &= 0x0f; } @@ -784,7 +674,7 @@ static void ata_scsi_dev_config(struct scsi_device *sdev, */ max_sectors = ATA_MAX_SECTORS; if (dev->flags & ATA_DFLAG_LBA48) - max_sectors = ATA_MAX_SECTORS_LBA48; + max_sectors = 2048; if (dev->max_sectors) max_sectors = dev->max_sectors; @@ -799,14 +689,6 @@ static void ata_scsi_dev_config(struct scsi_device *sdev, request_queue_t *q = sdev->request_queue; blk_queue_max_hw_segments(q, q->max_hw_segments - 1); } - - if (dev->flags & ATA_DFLAG_NCQ) { - int depth; - - depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); - depth = min(ATA_MAX_QUEUE - 1, depth); - scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); - } } /** @@ -823,88 +705,152 @@ static void ata_scsi_dev_config(struct scsi_device *sdev, int ata_scsi_slave_config(struct scsi_device *sdev) { - struct ata_port *ap = ata_shost_to_port(sdev->host); - struct ata_device *dev = __ata_scsi_find_dev(ap, sdev); - ata_scsi_sdev_config(sdev); blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); - if (dev) + if (sdev->id < ATA_MAX_DEVICES) { + struct ata_port *ap; + struct ata_device *dev; + + ap = (struct ata_port *) &sdev->host->hostdata[0]; + dev = &ap->device[sdev->id]; + ata_scsi_dev_config(sdev, dev); + } return 0; /* scsi layer doesn't check return value, sigh */ } /** - * ata_scsi_slave_destroy - SCSI device is about to be destroyed - * @sdev: SCSI device to be destroyed + * ata_scsi_timed_out - SCSI layer time out callback + * @cmd: timed out SCSI command * - * @sdev is about to be destroyed for hot/warm unplugging. If - * this unplugging was initiated by libata as indicated by NULL - * dev->sdev, this function doesn't have to do anything. - * Otherwise, SCSI layer initiated warm-unplug is in progress. - * Clear dev->sdev, schedule the device for ATA detach and invoke - * EH. + * Handles SCSI layer timeout. We race with normal completion of + * the qc for @cmd. If the qc is already gone, we lose and let + * the scsi command finish (EH_HANDLED). Otherwise, the qc has + * timed out and EH should be invoked. Prevent ata_qc_complete() + * from finishing it by setting EH_SCHEDULED and return + * EH_NOT_HANDLED. * * LOCKING: - * Defined by SCSI layer. We don't really care. + * Called from timer context + * + * RETURNS: + * EH_HANDLED or EH_NOT_HANDLED */ -void ata_scsi_slave_destroy(struct scsi_device *sdev) +enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) { - struct ata_port *ap = ata_shost_to_port(sdev->host); + struct Scsi_Host *host = cmd->device->host; + struct ata_port *ap = (struct ata_port *) &host->hostdata[0]; unsigned long flags; - struct ata_device *dev; + struct ata_queued_cmd *qc; + enum scsi_eh_timer_return ret = EH_HANDLED; - if (!ap->ops->error_handler) - return; + DPRINTK("ENTER\n"); - spin_lock_irqsave(ap->lock, flags); - dev = __ata_scsi_find_dev(ap, sdev); - if (dev && dev->sdev) { - /* SCSI device already in CANCEL state, no need to offline it */ - dev->sdev = NULL; - dev->flags |= ATA_DFLAG_DETACH; - ata_port_schedule_eh(ap); + spin_lock_irqsave(&ap->host_set->lock, flags); + qc = ata_qc_from_tag(ap, ap->active_tag); + if (qc) { + WARN_ON(qc->scsicmd != cmd); + qc->flags |= ATA_QCFLAG_EH_SCHEDULED; + qc->err_mask |= AC_ERR_TIMEOUT; + ret = EH_NOT_HANDLED; } - spin_unlock_irqrestore(ap->lock, flags); + spin_unlock_irqrestore(&ap->host_set->lock, flags); + + DPRINTK("EXIT, ret=%d\n", ret); + return ret; } /** - * ata_scsi_change_queue_depth - SCSI callback for queue depth config - * @sdev: SCSI device to configure queue depth for - * @queue_depth: new queue depth + * ata_scsi_error - SCSI layer error handler callback + * @host: SCSI host on which error occurred * - * This is libata standard hostt->change_queue_depth callback. - * SCSI will call into this callback when user tries to set queue - * depth via sysfs. + * Handles SCSI-layer-thrown error events. * * LOCKING: - * SCSI layer (we don't care) - * - * RETURNS: - * Newly configured queue depth. + * Inherited from SCSI layer (none, can sleep) */ -int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) + +static void ata_scsi_error(struct Scsi_Host *host) { - struct ata_port *ap = ata_shost_to_port(sdev->host); - struct ata_device *dev; - int max_depth; + struct ata_port *ap; + unsigned long flags; + + DPRINTK("ENTER\n"); + + ap = (struct ata_port *) &host->hostdata[0]; + + spin_lock_irqsave(&ap->host_set->lock, flags); + WARN_ON(ap->flags & ATA_FLAG_IN_EH); + ap->flags |= ATA_FLAG_IN_EH; + WARN_ON(ata_qc_from_tag(ap, ap->active_tag) == NULL); + spin_unlock_irqrestore(&ap->host_set->lock, flags); + + ata_port_flush_task(ap); - if (queue_depth < 1) - return sdev->queue_depth; + ap->ops->eng_timeout(ap); - dev = ata_scsi_find_dev(ap, sdev); - if (!dev || !ata_dev_enabled(dev)) - return sdev->queue_depth; + WARN_ON(host->host_failed || !list_empty(&host->eh_cmd_q)); - max_depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); - max_depth = min(ATA_MAX_QUEUE - 1, max_depth); - if (queue_depth > max_depth) - queue_depth = max_depth; + scsi_eh_flush_done_q(&ap->eh_done_q); - scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth); - return queue_depth; + spin_lock_irqsave(&ap->host_set->lock, flags); + ap->flags &= ~ATA_FLAG_IN_EH; + spin_unlock_irqrestore(&ap->host_set->lock, flags); + + DPRINTK("EXIT\n"); +} + +static void ata_eh_scsidone(struct scsi_cmnd *scmd) +{ + /* nada */ +} + +static void __ata_eh_qc_complete(struct ata_queued_cmd *qc) +{ + struct ata_port *ap = qc->ap; + struct scsi_cmnd *scmd = qc->scsicmd; + unsigned long flags; + + spin_lock_irqsave(&ap->host_set->lock, flags); + qc->scsidone = ata_eh_scsidone; + __ata_qc_complete(qc); + WARN_ON(ata_tag_valid(qc->tag)); + spin_unlock_irqrestore(&ap->host_set->lock, flags); + + scsi_eh_finish_cmd(scmd, &ap->eh_done_q); +} + +/** + * ata_eh_qc_complete - Complete an active ATA command from EH + * @qc: Command to complete + * + * Indicate to the mid and upper layers that an ATA command has + * completed. To be used from EH. + */ +void ata_eh_qc_complete(struct ata_queued_cmd *qc) +{ + struct scsi_cmnd *scmd = qc->scsicmd; + scmd->retries = scmd->allowed; + __ata_eh_qc_complete(qc); +} + +/** + * ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH + * @qc: Command to retry + * + * Indicate to the mid and upper layers that an ATA command + * should be retried. To be used from EH. + * + * SCSI midlayer limits the number of retries to scmd->allowed. + * This function might need to adjust scmd->retries for commands + * which get retried due to unrelated NCQ failures. + */ +void ata_eh_qc_retry(struct ata_queued_cmd *qc) +{ + __ata_eh_qc_complete(qc); } /** @@ -942,7 +888,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc, tf->nsect = 1; /* 1 sector, lba=0 */ if (qc->dev->flags & ATA_DFLAG_LBA) { - tf->flags |= ATA_TFLAG_LBA; + qc->tf.flags |= ATA_TFLAG_LBA; tf->lbah = 0x0; tf->lbam = 0x0; @@ -1246,7 +1192,6 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm u64 block; u32 n_block; - qc->flags |= ATA_QCFLAG_IO; tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; if (scsicmd[0] == WRITE_10 || scsicmd[0] == WRITE_6 || @@ -1293,36 +1238,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm */ goto nothing_to_do; - if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) { - /* yay, NCQ */ - if (!lba_48_ok(block, n_block)) - goto out_of_range; - - tf->protocol = ATA_PROT_NCQ; - tf->flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48; - - if (tf->flags & ATA_TFLAG_WRITE) - tf->command = ATA_CMD_FPDMA_WRITE; - else - tf->command = ATA_CMD_FPDMA_READ; - - qc->nsect = n_block; - - tf->nsect = qc->tag << 3; - tf->hob_feature = (n_block >> 8) & 0xff; - tf->feature = n_block & 0xff; - - tf->hob_lbah = (block >> 40) & 0xff; - tf->hob_lbam = (block >> 32) & 0xff; - tf->hob_lbal = (block >> 24) & 0xff; - tf->lbah = (block >> 16) & 0xff; - tf->lbam = (block >> 8) & 0xff; - tf->lbal = block & 0xff; - - tf->device = 1 << 6; - if (tf->flags & ATA_TFLAG_FUA) - tf->device |= 1 << 7; - } else if (dev->flags & ATA_DFLAG_LBA) { + if (dev->flags & ATA_DFLAG_LBA) { tf->flags |= ATA_TFLAG_LBA; if (lba_28_ok(block, n_block)) { @@ -1413,17 +1329,6 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) u8 *cdb = cmd->cmnd; int need_sense = (qc->err_mask != 0); - /* We snoop the SET_FEATURES - Write Cache ON/OFF command, and - * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE - * cache - */ - if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) && - ((qc->tf.feature == SETFEATURES_WC_ON) || - (qc->tf.feature == SETFEATURES_WC_OFF))) { - qc->ap->eh_info.action |= ATA_EH_REVALIDATE; - ata_port_schedule_eh(qc->ap); - } - /* For ATA pass thru (SAT) commands, generate a sense block if * user mandated it or if there's an error. Note that if we * generate because the user forced us to, a check condition @@ -1448,49 +1353,19 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) } } - if (need_sense && !qc->ap->ops->error_handler) - ata_dump_status(qc->ap->id, &qc->result_tf); + if (need_sense) { + /* The ata_gen_..._sense routines fill in tf */ + ata_dump_status(qc->ap->id, &qc->tf); + } qc->scsidone(cmd); ata_qc_free(qc); } -/** - * ata_scmd_need_defer - Check whether we need to defer scmd - * @dev: ATA device to which the command is addressed - * @is_io: Is the command IO (and thus possibly NCQ)? - * - * NCQ and non-NCQ commands cannot run together. As upper layer - * only knows the queue depth, we are responsible for maintaining - * exclusion. This function checks whether a new command can be - * issued to @dev. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * 1 if deferring is needed, 0 otherwise. - */ -static int ata_scmd_need_defer(struct ata_device *dev, int is_io) -{ - struct ata_port *ap = dev->ap; - - if (!(dev->flags & ATA_DFLAG_NCQ)) - return 0; - - if (is_io) { - if (!ata_tag_valid(ap->active_tag)) - return 0; - } else { - if (!ata_tag_valid(ap->active_tag) && !ap->sactive) - return 0; - } - return 1; -} - /** * ata_scsi_translate - Translate then issue SCSI command to ATA device + * @ap: ATA port to which the command is addressed * @dev: ATA device to which the command is addressed * @cmd: SCSI command to execute * @done: SCSI command completion function @@ -1511,25 +1386,19 @@ static int ata_scmd_need_defer(struct ata_device *dev, int is_io) * * LOCKING: * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * 0 on success, SCSI_ML_QUEUE_DEVICE_BUSY if the command - * needs to be deferred. */ -static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, + +static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev, + struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), ata_xlat_func_t xlat_func) { struct ata_queued_cmd *qc; u8 *scsicmd = cmd->cmnd; - int is_io = xlat_func == ata_scsi_rw_xlat; VPRINTK("ENTER\n"); - if (unlikely(ata_scmd_need_defer(dev, is_io))) - goto defer; - - qc = ata_scsi_qc_new(dev, cmd, done); + qc = ata_scsi_qc_new(ap, dev, cmd, done); if (!qc) goto err_mem; @@ -1537,8 +1406,8 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, if (cmd->sc_data_direction == DMA_FROM_DEVICE || cmd->sc_data_direction == DMA_TO_DEVICE) { if (unlikely(cmd->request_bufflen < 1)) { - ata_dev_printk(dev, KERN_WARNING, - "WARNING: zero len r/w req\n"); + printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n", + ap->id, dev->devno); goto err_did; } @@ -1560,13 +1429,13 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, ata_qc_issue(qc); VPRINTK("EXIT\n"); - return 0; + return; early_finish: ata_qc_free(qc); done(cmd); DPRINTK("EXIT - early finish (good or error)\n"); - return 0; + return; err_did: ata_qc_free(qc); @@ -1574,11 +1443,7 @@ err_mem: cmd->result = (DID_ERROR << 16); done(cmd); DPRINTK("EXIT - internal\n"); - return 0; - -defer: - DPRINTK("EXIT - defer\n"); - return SCSI_MLQUEUE_DEVICE_BUSY; + return; } /** @@ -2076,7 +1941,7 @@ unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf, return 0; dpofua = 0; - if (ata_dev_supports_fua(args->id) && (dev->flags & ATA_DFLAG_LBA48) && + if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) dpofua = 1 << 4; @@ -2269,14 +2134,13 @@ void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8 static void atapi_sense_complete(struct ata_queued_cmd *qc) { - if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0)) { + if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0)) /* FIXME: not quite right; we don't want the * translation of taskfile registers into * a sense descriptors, since that's only * correct for ATA, not ATAPI */ ata_gen_ata_desc_sense(qc); - } qc->scsidone(qc->scsicmd); ata_qc_free(qc); @@ -2340,51 +2204,21 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc) VPRINTK("ENTER, err_mask 0x%X\n", err_mask); - /* handle completion from new EH */ - if (unlikely(qc->ap->ops->error_handler && - (err_mask || qc->flags & ATA_QCFLAG_SENSE_VALID))) { - - if (!(qc->flags & ATA_QCFLAG_SENSE_VALID)) { - /* FIXME: not quite right; we don't want the - * translation of taskfile registers into a - * sense descriptors, since that's only - * correct for ATA, not ATAPI - */ - ata_gen_ata_desc_sense(qc); - } - - /* SCSI EH automatically locks door if sdev->locked is - * set. Sometimes door lock request continues to - * fail, for example, when no media is present. This - * creates a loop - SCSI EH issues door lock which - * fails and gets invoked again to acquire sense data - * for the failed command. - * - * If door lock fails, always clear sdev->locked to - * avoid this infinite loop. - */ - if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL) - qc->dev->sdev->locked = 0; - - qc->scsicmd->result = SAM_STAT_CHECK_CONDITION; - qc->scsidone(cmd); - ata_qc_free(qc); - return; - } - - /* successful completion or old EH failure path */ if (unlikely(err_mask & AC_ERR_DEV)) { cmd->result = SAM_STAT_CHECK_CONDITION; atapi_request_sense(qc); return; - } else if (unlikely(err_mask)) { + } + + else if (unlikely(err_mask)) /* FIXME: not quite right; we don't want the * translation of taskfile registers into * a sense descriptors, since that's only * correct for ATA, not ATAPI */ ata_gen_ata_desc_sense(qc); - } else { + + else { u8 *scsicmd = cmd->cmnd; if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { @@ -2466,63 +2300,18 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd) qc->tf.protocol = ATA_PROT_ATAPI_DMA; qc->tf.feature |= ATAPI_PKT_DMA; - if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE)) - /* some SATA bridges need us to indicate data xfer direction */ +#ifdef ATAPI_ENABLE_DMADIR + /* some SATA bridges need us to indicate data xfer direction */ + if (cmd->sc_data_direction != DMA_TO_DEVICE) qc->tf.feature |= ATAPI_DMADIR; +#endif } - qc->nbytes = cmd->request_bufflen; + qc->nbytes = cmd->bufflen; return 0; } -static struct ata_device * ata_find_dev(struct ata_port *ap, int id) -{ - if (likely(id < ATA_MAX_DEVICES)) - return &ap->device[id]; - return NULL; -} - -static struct ata_device * __ata_scsi_find_dev(struct ata_port *ap, - const struct scsi_device *scsidev) -{ - /* skip commands not addressed to targets we simulate */ - if (unlikely(scsidev->channel || scsidev->lun)) - return NULL; - - return ata_find_dev(ap, scsidev->id); -} - -/** - * ata_scsi_dev_enabled - determine if device is enabled - * @dev: ATA device - * - * Determine if commands should be sent to the specified device. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * 0 if commands are not allowed / 1 if commands are allowed - */ - -static int ata_scsi_dev_enabled(struct ata_device *dev) -{ - if (unlikely(!ata_dev_enabled(dev))) - return 0; - - if (!atapi_enabled || (dev->ap->flags & ATA_FLAG_NO_ATAPI)) { - if (unlikely(dev->class == ATA_DEV_ATAPI)) { - ata_dev_printk(dev, KERN_WARNING, - "WARNING: ATAPI is %s, device ignored.\n", - atapi_enabled ? "not supported with this driver" : "disabled"); - return 0; - } - } - - return 1; -} - /** * ata_scsi_find_dev - lookup ata_device from scsi_cmnd * @ap: ATA port to which the device is attached @@ -2539,14 +2328,33 @@ static int ata_scsi_dev_enabled(struct ata_device *dev) * RETURNS: * Associated ATA device, or %NULL if not found. */ + static struct ata_device * ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) { - struct ata_device *dev = __ata_scsi_find_dev(ap, scsidev); + struct ata_device *dev; + + /* skip commands not addressed to targets we simulate */ + if (likely(scsidev->id < ATA_MAX_DEVICES)) + dev = &ap->device[scsidev->id]; + else + return NULL; - if (unlikely(!dev || !ata_scsi_dev_enabled(dev))) + if (unlikely((scsidev->channel != 0) || + (scsidev->lun != 0))) return NULL; + if (unlikely(!ata_dev_present(dev))) + return NULL; + + if (!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) { + if (unlikely(dev->class == ATA_DEV_ATAPI)) { + printk(KERN_WARNING "ata%u(%u): WARNING: ATAPI is %s, device ignored.\n", + ap->id, dev->devno, atapi_enabled ? "not supported with this driver" : "disabled"); + return NULL; + } + } + return dev; } @@ -2603,15 +2411,10 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) { struct ata_taskfile *tf = &(qc->tf); struct scsi_cmnd *cmd = qc->scsicmd; - struct ata_device *dev = qc->dev; if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) goto invalid_fld; - /* We may not issue DMA commands if no DMA mode is set */ - if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) - goto invalid_fld; - if (scsicmd[1] & 0xe0) /* PIO multi not supported yet */ goto invalid_fld; @@ -2694,10 +2497,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) * TODO: find out if we need to do more here to * cover scatter/gather case. */ - qc->nsect = cmd->request_bufflen / ATA_SECT_SIZE; - - /* request result TF */ - qc->flags |= ATA_QCFLAG_RESULT_TF; + qc->nsect = cmd->bufflen / ATA_SECT_SIZE; return 0; @@ -2775,24 +2575,19 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap, #endif } -static inline int __ata_scsi_queuecmd(struct scsi_cmnd *cmd, - void (*done)(struct scsi_cmnd *), - struct ata_device *dev) +static inline void __ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), + struct ata_port *ap, struct ata_device *dev) { - int rc = 0; - if (dev->class == ATA_DEV_ATA) { ata_xlat_func_t xlat_func = ata_get_xlat_func(dev, cmd->cmnd[0]); if (xlat_func) - rc = ata_scsi_translate(dev, cmd, done, xlat_func); + ata_scsi_translate(ap, dev, cmd, done, xlat_func); else - ata_scsi_simulate(dev, cmd, done); + ata_scsi_simulate(ap, dev, cmd, done); } else - rc = ata_scsi_translate(dev, cmd, done, atapi_xlat); - - return rc; + ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); } /** @@ -2811,39 +2606,39 @@ static inline int __ata_scsi_queuecmd(struct scsi_cmnd *cmd, * Releases scsi-layer-held lock, and obtains host_set lock. * * RETURNS: - * Return value from __ata_scsi_queuecmd() if @cmd can be queued, - * 0 otherwise. + * Zero. */ + int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_port *ap; struct ata_device *dev; struct scsi_device *scsidev = cmd->device; struct Scsi_Host *shost = scsidev->host; - int rc = 0; - ap = ata_shost_to_port(shost); + ap = (struct ata_port *) &shost->hostdata[0]; spin_unlock(shost->host_lock); - spin_lock(ap->lock); + spin_lock(&ap->host_set->lock); ata_scsi_dump_cdb(ap, cmd); dev = ata_scsi_find_dev(ap, scsidev); if (likely(dev)) - rc = __ata_scsi_queuecmd(cmd, done, dev); + __ata_scsi_queuecmd(cmd, done, ap, dev); else { cmd->result = (DID_BAD_TARGET << 16); done(cmd); } - spin_unlock(ap->lock); + spin_unlock(&ap->host_set->lock); spin_lock(shost->host_lock); - return rc; + return 0; } /** * ata_scsi_simulate - simulate SCSI command on ATA device + * @ap: port the device is connected to * @dev: the target device * @cmd: SCSI command being sent to device. * @done: SCSI command completion function. @@ -2855,12 +2650,14 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) * spin_lock_irqsave(host_set lock) */ -void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, +void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, + struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { struct ata_scsi_args args; const u8 *scsicmd = cmd->cmnd; + args.ap = ap; args.dev = dev; args.id = dev->id; args.cmd = cmd; @@ -2932,242 +2729,17 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, void ata_scsi_scan_host(struct ata_port *ap) { + struct ata_device *dev; unsigned int i; - if (ap->flags & ATA_FLAG_DISABLED) + if (ap->flags & ATA_FLAG_PORT_DISABLED) return; - for (i = 0; i < ATA_MAX_DEVICES; i++) { - struct ata_device *dev = &ap->device[i]; - struct scsi_device *sdev; - - if (!ata_dev_enabled(dev) || dev->sdev) - continue; - - sdev = __scsi_add_device(ap->host, 0, i, 0, NULL); - if (!IS_ERR(sdev)) { - dev->sdev = sdev; - scsi_device_put(sdev); - } - } -} - -/** - * ata_scsi_offline_dev - offline attached SCSI device - * @dev: ATA device to offline attached SCSI device for - * - * This function is called from ata_eh_hotplug() and responsible - * for taking the SCSI device attached to @dev offline. This - * function is called with host_set lock which protects dev->sdev - * against clearing. - * - * LOCKING: - * spin_lock_irqsave(host_set lock) - * - * RETURNS: - * 1 if attached SCSI device exists, 0 otherwise. - */ -int ata_scsi_offline_dev(struct ata_device *dev) -{ - if (dev->sdev) { - scsi_device_set_state(dev->sdev, SDEV_OFFLINE); - return 1; - } - return 0; -} - -/** - * ata_scsi_remove_dev - remove attached SCSI device - * @dev: ATA device to remove attached SCSI device for - * - * This function is called from ata_eh_scsi_hotplug() and - * responsible for removing the SCSI device attached to @dev. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -static void ata_scsi_remove_dev(struct ata_device *dev) -{ - struct ata_port *ap = dev->ap; - struct scsi_device *sdev; - unsigned long flags; - - /* Alas, we need to grab scan_mutex to ensure SCSI device - * state doesn't change underneath us and thus - * scsi_device_get() always succeeds. The mutex locking can - * be removed if there is __scsi_device_get() interface which - * increments reference counts regardless of device state. - */ - mutex_lock(&ap->host->scan_mutex); - spin_lock_irqsave(ap->lock, flags); - - /* clearing dev->sdev is protected by host_set lock */ - sdev = dev->sdev; - dev->sdev = NULL; - - if (sdev) { - /* If user initiated unplug races with us, sdev can go - * away underneath us after the host_set lock and - * scan_mutex are released. Hold onto it. - */ - if (scsi_device_get(sdev) == 0) { - /* The following ensures the attached sdev is - * offline on return from ata_scsi_offline_dev() - * regardless it wins or loses the race - * against this function. - */ - scsi_device_set_state(sdev, SDEV_OFFLINE); - } else { - WARN_ON(1); - sdev = NULL; - } - } - - spin_unlock_irqrestore(ap->lock, flags); - mutex_unlock(&ap->host->scan_mutex); - - if (sdev) { - ata_dev_printk(dev, KERN_INFO, "detaching (SCSI %s)\n", - sdev->sdev_gendev.bus_id); - - scsi_remove_device(sdev); - scsi_device_put(sdev); - } -} - -/** - * ata_scsi_hotplug - SCSI part of hotplug - * @data: Pointer to ATA port to perform SCSI hotplug on - * - * Perform SCSI part of hotplug. It's executed from a separate - * workqueue after EH completes. This is necessary because SCSI - * hot plugging requires working EH and hot unplugging is - * synchronized with hot plugging with a mutex. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -void ata_scsi_hotplug(void *data) -{ - struct ata_port *ap = data; - int i; - - if (ap->pflags & ATA_PFLAG_UNLOADING) { - DPRINTK("ENTER/EXIT - unloading\n"); - return; - } - - DPRINTK("ENTER\n"); - - /* unplug detached devices */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - struct ata_device *dev = &ap->device[i]; - unsigned long flags; - - if (!(dev->flags & ATA_DFLAG_DETACHED)) - continue; - - spin_lock_irqsave(ap->lock, flags); - dev->flags &= ~ATA_DFLAG_DETACHED; - spin_unlock_irqrestore(ap->lock, flags); - - ata_scsi_remove_dev(dev); - } - - /* scan for new ones */ - ata_scsi_scan_host(ap); - - /* If we scanned while EH was in progress, scan would have - * failed silently. Requeue if there are enabled but - * unattached devices. - */ - for (i = 0; i < ATA_MAX_DEVICES; i++) { - struct ata_device *dev = &ap->device[i]; - if (ata_dev_enabled(dev) && !dev->sdev) { - queue_delayed_work(ata_aux_wq, &ap->hotplug_task, HZ); - break; - } - } - - DPRINTK("EXIT\n"); -} - -/** - * ata_scsi_user_scan - indication for user-initiated bus scan - * @shost: SCSI host to scan - * @channel: Channel to scan - * @id: ID to scan - * @lun: LUN to scan - * - * This function is called when user explicitly requests bus - * scan. Set probe pending flag and invoke EH. - * - * LOCKING: - * SCSI layer (we don't care) - * - * RETURNS: - * Zero. - */ -static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, - unsigned int id, unsigned int lun) -{ - struct ata_port *ap = ata_shost_to_port(shost); - unsigned long flags; - int rc = 0; - - if (!ap->ops->error_handler) - return -EOPNOTSUPP; - - if ((channel != SCAN_WILD_CARD && channel != 0) || - (lun != SCAN_WILD_CARD && lun != 0)) - return -EINVAL; - - spin_lock_irqsave(ap->lock, flags); - - if (id == SCAN_WILD_CARD) { - ap->eh_info.probe_mask |= (1 << ATA_MAX_DEVICES) - 1; - ap->eh_info.action |= ATA_EH_SOFTRESET; - } else { - struct ata_device *dev = ata_find_dev(ap, id); - - if (dev) { - ap->eh_info.probe_mask |= 1 << dev->devno; - ap->eh_info.action |= ATA_EH_SOFTRESET; - ap->eh_info.flags |= ATA_EHI_RESUME_LINK; - } else - rc = -EINVAL; - } - - if (rc == 0) - ata_port_schedule_eh(ap); - - spin_unlock_irqrestore(ap->lock, flags); - - return rc; -} - -/** - * ata_scsi_dev_rescan - initiate scsi_rescan_device() - * @data: Pointer to ATA port to perform scsi_rescan_device() - * - * After ATA pass thru (SAT) commands are executed successfully, - * libata need to propagate the changes to SCSI layer. This - * function must be executed from ata_aux_wq such that sdev - * attach/detach don't race with rescan. - * - * LOCKING: - * Kernel thread context (may sleep). - */ -void ata_scsi_dev_rescan(void *data) -{ - struct ata_port *ap = data; - struct ata_device *dev; - unsigned int i; - for (i = 0; i < ATA_MAX_DEVICES; i++) { dev = &ap->device[i]; - if (ata_dev_enabled(dev) && dev->sdev) - scsi_rescan_device(&(dev->sdev->sdev_gendev)); + if (ata_dev_present(dev)) + scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0); } } + diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index c325679d9..bac8cbae0 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h @@ -29,9 +29,10 @@ #define __LIBATA_H__ #define DRV_NAME "libata" -#define DRV_VERSION "2.00" /* must be exactly four chars */ +#define DRV_VERSION "1.20" /* must be exactly four chars */ struct ata_scsi_args { + struct ata_port *ap; struct ata_device *dev; u16 *id; struct scsi_cmnd *cmd; @@ -39,34 +40,18 @@ struct ata_scsi_args { }; /* libata-core.c */ -extern struct workqueue_struct *ata_aux_wq; extern int atapi_enabled; -extern int atapi_dmadir; extern int libata_fua; -extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev); +extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, + struct ata_device *dev); extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); -extern void ata_dev_disable(struct ata_device *dev); extern void ata_port_flush_task(struct ata_port *ap); -extern unsigned ata_exec_internal(struct ata_device *dev, - struct ata_taskfile *tf, const u8 *cdb, - int dma_dir, void *buf, unsigned int buflen); -extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd); -extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, - int post_reset, u16 *id); -extern int ata_dev_configure(struct ata_device *dev, int print_info); -extern int sata_down_spd_limit(struct ata_port *ap); -extern int sata_set_spd_needed(struct ata_port *ap); -extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0); -extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev); extern void ata_qc_free(struct ata_queued_cmd *qc); extern void ata_qc_issue(struct ata_queued_cmd *qc); -extern void __ata_qc_complete(struct ata_queued_cmd *qc); extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); extern void ata_dev_select(struct ata_port *ap, unsigned int device, unsigned int wait, unsigned int can_sleep); extern void swap_buf_le16(u16 *buf, unsigned int buf_words); -extern int ata_flush_cache(struct ata_device *dev); -extern void ata_dev_init(struct ata_device *dev); extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg); extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); @@ -75,8 +60,6 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); extern struct scsi_transport_template ata_scsi_transport_template; extern void ata_scsi_scan_host(struct ata_port *ap); -extern int ata_scsi_offline_dev(struct ata_device *dev); -extern void ata_scsi_hotplug(void *data); extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, unsigned int buflen); @@ -105,13 +88,5 @@ extern void ata_scsi_set_sense(struct scsi_cmnd *cmd, extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, unsigned int (*actor) (struct ata_scsi_args *args, u8 *rbuf, unsigned int buflen)); -extern void ata_schedule_scsi_eh(struct Scsi_Host *shost); -extern void ata_scsi_dev_rescan(void *data); - -/* libata-eh.c */ -extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); -extern void ata_scsi_error(struct Scsi_Host *host); -extern void ata_port_wait_eh(struct ata_port *ap); -extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); #endif /* __LIBATA_H__ */ diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c deleted file mode 100644 index 5884cd26d..000000000 --- a/drivers/scsi/libiscsi.c +++ /dev/null @@ -1,1905 +0,0 @@ -/* - * iSCSI lib functions - * - * Copyright (C) 2006 Red Hat, Inc. All rights reserved. - * Copyright (C) 2004 - 2006 Mike Christie - * Copyright (C) 2004 - 2005 Dmitry Yusupov - * Copyright (C) 2004 - 2005 Alex Aizman - * maintained by open-iscsi@googlegroups.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. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct iscsi_session * -class_to_transport_session(struct iscsi_cls_session *cls_session) -{ - struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); - return iscsi_hostdata(shost->hostdata); -} -EXPORT_SYMBOL_GPL(class_to_transport_session); - -#define INVALID_SN_DELTA 0xffff - -int -iscsi_check_assign_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr) -{ - uint32_t max_cmdsn = be32_to_cpu(hdr->max_cmdsn); - uint32_t exp_cmdsn = be32_to_cpu(hdr->exp_cmdsn); - - if (max_cmdsn < exp_cmdsn -1 && - max_cmdsn > exp_cmdsn - INVALID_SN_DELTA) - return ISCSI_ERR_MAX_CMDSN; - if (max_cmdsn > session->max_cmdsn || - max_cmdsn < session->max_cmdsn - INVALID_SN_DELTA) - session->max_cmdsn = max_cmdsn; - if (exp_cmdsn > session->exp_cmdsn || - exp_cmdsn < session->exp_cmdsn - INVALID_SN_DELTA) - session->exp_cmdsn = exp_cmdsn; - - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_check_assign_cmdsn); - -void iscsi_prep_unsolicit_data_pdu(struct iscsi_cmd_task *ctask, - struct iscsi_data *hdr, - int transport_data_cnt) -{ - struct iscsi_conn *conn = ctask->conn; - - memset(hdr, 0, sizeof(struct iscsi_data)); - hdr->ttt = cpu_to_be32(ISCSI_RESERVED_TAG); - hdr->datasn = cpu_to_be32(ctask->unsol_datasn); - ctask->unsol_datasn++; - hdr->opcode = ISCSI_OP_SCSI_DATA_OUT; - memcpy(hdr->lun, ctask->hdr->lun, sizeof(hdr->lun)); - - hdr->itt = ctask->hdr->itt; - hdr->exp_statsn = cpu_to_be32(conn->exp_statsn); - - hdr->offset = cpu_to_be32(ctask->total_length - - transport_data_cnt - - ctask->unsol_count); - - if (ctask->unsol_count > conn->max_xmit_dlength) { - hton24(hdr->dlength, conn->max_xmit_dlength); - ctask->data_count = conn->max_xmit_dlength; - hdr->flags = 0; - } else { - hton24(hdr->dlength, ctask->unsol_count); - ctask->data_count = ctask->unsol_count; - hdr->flags = ISCSI_FLAG_CMD_FINAL; - } -} -EXPORT_SYMBOL_GPL(iscsi_prep_unsolicit_data_pdu); - -/** - * iscsi_prep_scsi_cmd_pdu - prep iscsi scsi cmd pdu - * @ctask: iscsi cmd task - * - * Prep basic iSCSI PDU fields for a scsi cmd pdu. The LLD should set - * fields like dlength or final based on how much data it sends - */ -static void iscsi_prep_scsi_cmd_pdu(struct iscsi_cmd_task *ctask) -{ - struct iscsi_conn *conn = ctask->conn; - struct iscsi_session *session = conn->session; - struct iscsi_cmd *hdr = ctask->hdr; - struct scsi_cmnd *sc = ctask->sc; - - hdr->opcode = ISCSI_OP_SCSI_CMD; - hdr->flags = ISCSI_ATTR_SIMPLE; - int_to_scsilun(sc->device->lun, (struct scsi_lun *)hdr->lun); - hdr->itt = ctask->itt | (conn->id << ISCSI_CID_SHIFT) | - (session->age << ISCSI_AGE_SHIFT); - hdr->data_length = cpu_to_be32(sc->request_bufflen); - hdr->cmdsn = cpu_to_be32(session->cmdsn); - session->cmdsn++; - hdr->exp_statsn = cpu_to_be32(conn->exp_statsn); - memcpy(hdr->cdb, sc->cmnd, sc->cmd_len); - memset(&hdr->cdb[sc->cmd_len], 0, MAX_COMMAND_SIZE - sc->cmd_len); - - if (sc->sc_data_direction == DMA_TO_DEVICE) { - hdr->flags |= ISCSI_FLAG_CMD_WRITE; - /* - * Write counters: - * - * imm_count bytes to be sent right after - * SCSI PDU Header - * - * unsol_count bytes(as Data-Out) to be sent - * without R2T ack right after - * immediate data - * - * r2t_data_count bytes to be sent via R2T ack's - * - * pad_count bytes to be sent as zero-padding - */ - ctask->imm_count = 0; - ctask->unsol_count = 0; - ctask->unsol_datasn = 0; - - if (session->imm_data_en) { - if (ctask->total_length >= session->first_burst) - ctask->imm_count = min(session->first_burst, - conn->max_xmit_dlength); - else - ctask->imm_count = min(ctask->total_length, - conn->max_xmit_dlength); - hton24(ctask->hdr->dlength, ctask->imm_count); - } else - zero_data(ctask->hdr->dlength); - - if (!session->initial_r2t_en) - ctask->unsol_count = min(session->first_burst, - ctask->total_length) - ctask->imm_count; - if (!ctask->unsol_count) - /* No unsolicit Data-Out's */ - ctask->hdr->flags |= ISCSI_FLAG_CMD_FINAL; - } else { - ctask->datasn = 0; - hdr->flags |= ISCSI_FLAG_CMD_FINAL; - zero_data(hdr->dlength); - - if (sc->sc_data_direction == DMA_FROM_DEVICE) - hdr->flags |= ISCSI_FLAG_CMD_READ; - } - - conn->scsicmd_pdus_cnt++; -} -EXPORT_SYMBOL_GPL(iscsi_prep_scsi_cmd_pdu); - -/** - * iscsi_complete_command - return command back to scsi-ml - * @session: iscsi session - * @ctask: iscsi cmd task - * - * Must be called with session lock. - * This function returns the scsi command to scsi-ml and returns - * the cmd task to the pool of available cmd tasks. - */ -static void iscsi_complete_command(struct iscsi_session *session, - struct iscsi_cmd_task *ctask) -{ - struct scsi_cmnd *sc = ctask->sc; - - ctask->state = ISCSI_TASK_COMPLETED; - ctask->sc = NULL; - list_del_init(&ctask->running); - __kfifo_put(session->cmdpool.queue, (void*)&ctask, sizeof(void*)); - sc->scsi_done(sc); -} - -/** - * iscsi_cmd_rsp - SCSI Command Response processing - * @conn: iscsi connection - * @hdr: iscsi header - * @ctask: scsi command task - * @data: cmd data buffer - * @datalen: len of buffer - * - * iscsi_cmd_rsp sets up the scsi_cmnd fields based on the PDU and - * then completes the command and task. - **/ -static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr, - struct iscsi_cmd_task *ctask, char *data, - int datalen) -{ - int rc; - struct iscsi_cmd_rsp *rhdr = (struct iscsi_cmd_rsp *)hdr; - struct iscsi_session *session = conn->session; - struct scsi_cmnd *sc = ctask->sc; - - rc = iscsi_check_assign_cmdsn(session, (struct iscsi_nopin*)rhdr); - if (rc) { - sc->result = DID_ERROR << 16; - goto out; - } - - conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1; - - sc->result = (DID_OK << 16) | rhdr->cmd_status; - - if (rhdr->response != ISCSI_STATUS_CMD_COMPLETED) { - sc->result = DID_ERROR << 16; - goto out; - } - - if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) { - int senselen; - - if (datalen < 2) { -invalid_datalen: - printk(KERN_ERR "iscsi: Got CHECK_CONDITION but " - "invalid data buffer size of %d\n", datalen); - sc->result = DID_BAD_TARGET << 16; - goto out; - } - - senselen = (data[0] << 8) | data[1]; - if (datalen < senselen) - goto invalid_datalen; - - memcpy(sc->sense_buffer, data + 2, - min(senselen, SCSI_SENSE_BUFFERSIZE)); - debug_scsi("copied %d bytes of sense\n", - min(senselen, SCSI_SENSE_BUFFERSIZE)); - } - - if (sc->sc_data_direction == DMA_TO_DEVICE) - goto out; - - if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) { - int res_count = be32_to_cpu(rhdr->residual_count); - - if (res_count > 0 && res_count <= sc->request_bufflen) - sc->resid = res_count; - else - sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; - } else if (rhdr->flags & ISCSI_FLAG_CMD_BIDI_UNDERFLOW) - sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status; - else if (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW) - sc->resid = be32_to_cpu(rhdr->residual_count); - -out: - debug_scsi("done [sc %lx res %d itt 0x%x]\n", - (long)sc, sc->result, ctask->itt); - conn->scsirsp_pdus_cnt++; - - iscsi_complete_command(conn->session, ctask); - return rc; -} - -static void iscsi_tmf_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr) -{ - struct iscsi_tm_rsp *tmf = (struct iscsi_tm_rsp *)hdr; - - conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1; - conn->tmfrsp_pdus_cnt++; - - if (conn->tmabort_state != TMABORT_INITIAL) - return; - - if (tmf->response == ISCSI_TMF_RSP_COMPLETE) - conn->tmabort_state = TMABORT_SUCCESS; - else if (tmf->response == ISCSI_TMF_RSP_NO_TASK) - conn->tmabort_state = TMABORT_NOT_FOUND; - else - conn->tmabort_state = TMABORT_FAILED; - wake_up(&conn->ehwait); -} - -/** - * __iscsi_complete_pdu - complete pdu - * @conn: iscsi conn - * @hdr: iscsi header - * @data: data buffer - * @datalen: len of data buffer - * - * Completes pdu processing by freeing any resources allocated at - * queuecommand or send generic. session lock must be held and verify - * itt must have been called. - */ -int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, - char *data, int datalen) -{ - struct iscsi_session *session = conn->session; - int opcode = hdr->opcode & ISCSI_OPCODE_MASK, rc = 0; - struct iscsi_cmd_task *ctask; - struct iscsi_mgmt_task *mtask; - uint32_t itt; - - if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) - itt = hdr->itt & ISCSI_ITT_MASK; - else - itt = hdr->itt; - - if (itt < session->cmds_max) { - ctask = session->cmds[itt]; - - debug_scsi("cmdrsp [op 0x%x cid %d itt 0x%x len %d]\n", - opcode, conn->id, ctask->itt, datalen); - - switch(opcode) { - case ISCSI_OP_SCSI_CMD_RSP: - BUG_ON((void*)ctask != ctask->sc->SCp.ptr); - rc = iscsi_scsi_cmd_rsp(conn, hdr, ctask, data, - datalen); - break; - case ISCSI_OP_SCSI_DATA_IN: - BUG_ON((void*)ctask != ctask->sc->SCp.ptr); - if (hdr->flags & ISCSI_FLAG_DATA_STATUS) { - conn->scsirsp_pdus_cnt++; - iscsi_complete_command(session, ctask); - } - break; - case ISCSI_OP_R2T: - /* LLD handles this for now */ - break; - default: - rc = ISCSI_ERR_BAD_OPCODE; - break; - } - } else if (itt >= ISCSI_MGMT_ITT_OFFSET && - itt < ISCSI_MGMT_ITT_OFFSET + session->mgmtpool_max) { - mtask = session->mgmt_cmds[itt - ISCSI_MGMT_ITT_OFFSET]; - - debug_scsi("immrsp [op 0x%x cid %d itt 0x%x len %d]\n", - opcode, conn->id, mtask->itt, datalen); - - rc = iscsi_check_assign_cmdsn(session, - (struct iscsi_nopin*)hdr); - if (rc) - goto done; - - switch(opcode) { - case ISCSI_OP_LOGOUT_RSP: - if (datalen) { - rc = ISCSI_ERR_PROTO; - break; - } - conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1; - /* fall through */ - case ISCSI_OP_LOGIN_RSP: - case ISCSI_OP_TEXT_RSP: - /* - * login related PDU's exp_statsn is handled in - * userspace - */ - if (iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen)) - rc = ISCSI_ERR_CONN_FAILED; - list_del(&mtask->running); - if (conn->login_mtask != mtask) - __kfifo_put(session->mgmtpool.queue, - (void*)&mtask, sizeof(void*)); - break; - case ISCSI_OP_SCSI_TMFUNC_RSP: - if (datalen) { - rc = ISCSI_ERR_PROTO; - break; - } - - iscsi_tmf_rsp(conn, hdr); - break; - case ISCSI_OP_NOOP_IN: - if (hdr->ttt != ISCSI_RESERVED_TAG || datalen) { - rc = ISCSI_ERR_PROTO; - break; - } - conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1; - - if (iscsi_recv_pdu(conn->cls_conn, hdr, data, datalen)) - rc = ISCSI_ERR_CONN_FAILED; - list_del(&mtask->running); - if (conn->login_mtask != mtask) - __kfifo_put(session->mgmtpool.queue, - (void*)&mtask, sizeof(void*)); - break; - default: - rc = ISCSI_ERR_BAD_OPCODE; - break; - } - } else if (itt == ISCSI_RESERVED_TAG) { - switch(opcode) { - case ISCSI_OP_NOOP_IN: - if (datalen) { - rc = ISCSI_ERR_PROTO; - break; - } - - rc = iscsi_check_assign_cmdsn(session, - (struct iscsi_nopin*)hdr); - if (rc) - break; - - if (hdr->ttt == ISCSI_RESERVED_TAG) - break; - - if (iscsi_recv_pdu(conn->cls_conn, hdr, NULL, 0)) - rc = ISCSI_ERR_CONN_FAILED; - break; - case ISCSI_OP_REJECT: - /* we need sth like iscsi_reject_rsp()*/ - case ISCSI_OP_ASYNC_EVENT: - conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1; - /* we need sth like iscsi_async_event_rsp() */ - rc = ISCSI_ERR_BAD_OPCODE; - break; - default: - rc = ISCSI_ERR_BAD_OPCODE; - break; - } - } else - rc = ISCSI_ERR_BAD_ITT; - -done: - return rc; -} -EXPORT_SYMBOL_GPL(__iscsi_complete_pdu); - -int iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, - char *data, int datalen) -{ - int rc; - - spin_lock(&conn->session->lock); - rc = __iscsi_complete_pdu(conn, hdr, data, datalen); - spin_unlock(&conn->session->lock); - return rc; -} -EXPORT_SYMBOL_GPL(iscsi_complete_pdu); - -/* verify itt (itt encoding: age+cid+itt) */ -int iscsi_verify_itt(struct iscsi_conn *conn, struct iscsi_hdr *hdr, - uint32_t *ret_itt) -{ - struct iscsi_session *session = conn->session; - struct iscsi_cmd_task *ctask; - uint32_t itt; - - if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) { - if ((hdr->itt & ISCSI_AGE_MASK) != - (session->age << ISCSI_AGE_SHIFT)) { - printk(KERN_ERR "iscsi: received itt %x expected " - "session age (%x)\n", hdr->itt, - session->age & ISCSI_AGE_MASK); - return ISCSI_ERR_BAD_ITT; - } - - if ((hdr->itt & ISCSI_CID_MASK) != - (conn->id << ISCSI_CID_SHIFT)) { - printk(KERN_ERR "iscsi: received itt %x, expected " - "CID (%x)\n", hdr->itt, conn->id); - return ISCSI_ERR_BAD_ITT; - } - itt = hdr->itt & ISCSI_ITT_MASK; - } else - itt = hdr->itt; - - if (itt < session->cmds_max) { - ctask = session->cmds[itt]; - - if (!ctask->sc) { - printk(KERN_INFO "iscsi: dropping ctask with " - "itt 0x%x\n", ctask->itt); - /* force drop */ - return ISCSI_ERR_NO_SCSI_CMD; - } - - if (ctask->sc->SCp.phase != session->age) { - printk(KERN_ERR "iscsi: ctask's session age %d, " - "expected %d\n", ctask->sc->SCp.phase, - session->age); - return ISCSI_ERR_SESSION_FAILED; - } - } - - *ret_itt = itt; - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_verify_itt); - -void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err) -{ - struct iscsi_session *session = conn->session; - unsigned long flags; - - spin_lock_irqsave(&session->lock, flags); - if (session->state == ISCSI_STATE_FAILED) { - spin_unlock_irqrestore(&session->lock, flags); - return; - } - - if (conn->stop_stage == 0) - session->state = ISCSI_STATE_FAILED; - spin_unlock_irqrestore(&session->lock, flags); - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); - iscsi_conn_error(conn->cls_conn, err); -} -EXPORT_SYMBOL_GPL(iscsi_conn_failure); - -/** - * iscsi_data_xmit - xmit any command into the scheduled connection - * @conn: iscsi connection - * - * Notes: - * The function can return -EAGAIN in which case the caller must - * re-schedule it again later or recover. '0' return code means - * successful xmit. - **/ -static int iscsi_data_xmit(struct iscsi_conn *conn) -{ - struct iscsi_transport *tt; - int rc = 0; - - if (unlikely(conn->suspend_tx)) { - debug_scsi("conn %d Tx suspended!\n", conn->id); - return -ENODATA; - } - tt = conn->session->tt; - - /* - * Transmit in the following order: - * - * 1) un-finished xmit (ctask or mtask) - * 2) immediate control PDUs - * 3) write data - * 4) SCSI commands - * 5) non-immediate control PDUs - * - * No need to lock around __kfifo_get as long as - * there's one producer and one consumer. - */ - - BUG_ON(conn->ctask && conn->mtask); - - if (conn->ctask) { - rc = tt->xmit_cmd_task(conn, conn->ctask); - if (rc) - goto again; - /* done with this in-progress ctask */ - conn->ctask = NULL; - } - if (conn->mtask) { - rc = tt->xmit_mgmt_task(conn, conn->mtask); - if (rc) - goto again; - /* done with this in-progress mtask */ - conn->mtask = NULL; - } - - /* process immediate first */ - if (unlikely(__kfifo_len(conn->immqueue))) { - while (__kfifo_get(conn->immqueue, (void*)&conn->mtask, - sizeof(void*))) { - spin_lock_bh(&conn->session->lock); - list_add_tail(&conn->mtask->running, - &conn->mgmt_run_list); - spin_unlock_bh(&conn->session->lock); - rc = tt->xmit_mgmt_task(conn, conn->mtask); - if (rc) - goto again; - } - /* done with this mtask */ - conn->mtask = NULL; - } - - /* process command queue */ - spin_lock_bh(&conn->session->lock); - while (!list_empty(&conn->xmitqueue)) { - /* - * iscsi tcp may readd the task to the xmitqueue to send - * write data - */ - conn->ctask = list_entry(conn->xmitqueue.next, - struct iscsi_cmd_task, running); - conn->ctask->state = ISCSI_TASK_RUNNING; - list_move_tail(conn->xmitqueue.next, &conn->run_list); - spin_unlock_bh(&conn->session->lock); - - rc = tt->xmit_cmd_task(conn, conn->ctask); - if (rc) - goto again; - spin_lock_bh(&conn->session->lock); - } - spin_unlock_bh(&conn->session->lock); - /* done with this ctask */ - conn->ctask = NULL; - - /* process the rest control plane PDUs, if any */ - if (unlikely(__kfifo_len(conn->mgmtqueue))) { - while (__kfifo_get(conn->mgmtqueue, (void*)&conn->mtask, - sizeof(void*))) { - spin_lock_bh(&conn->session->lock); - list_add_tail(&conn->mtask->running, - &conn->mgmt_run_list); - spin_unlock_bh(&conn->session->lock); - rc = tt->xmit_mgmt_task(conn, conn->mtask); - if (rc) - goto again; - } - /* done with this mtask */ - conn->mtask = NULL; - } - - return -ENODATA; - -again: - if (unlikely(conn->suspend_tx)) - return -ENODATA; - - return rc; -} - -static void iscsi_xmitworker(void *data) -{ - struct iscsi_conn *conn = data; - int rc; - /* - * serialize Xmit worker on a per-connection basis. - */ - mutex_lock(&conn->xmitmutex); - do { - rc = iscsi_data_xmit(conn); - } while (rc >= 0 || rc == -EAGAIN); - mutex_unlock(&conn->xmitmutex); -} - -enum { - FAILURE_BAD_HOST = 1, - FAILURE_SESSION_FAILED, - FAILURE_SESSION_FREED, - FAILURE_WINDOW_CLOSED, - FAILURE_SESSION_TERMINATE, - FAILURE_SESSION_IN_RECOVERY, - FAILURE_SESSION_RECOVERY_TIMEOUT, -}; - -int iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) -{ - struct Scsi_Host *host; - int reason = 0; - struct iscsi_session *session; - struct iscsi_conn *conn; - struct iscsi_cmd_task *ctask = NULL; - - sc->scsi_done = done; - sc->result = 0; - - host = sc->device->host; - session = iscsi_hostdata(host->hostdata); - - spin_lock(&session->lock); - - /* - * ISCSI_STATE_FAILED is a temp. state. The recovery - * code will decide what is best to do with command queued - * during this time - */ - if (session->state != ISCSI_STATE_LOGGED_IN && - session->state != ISCSI_STATE_FAILED) { - /* - * to handle the race between when we set the recovery state - * and block the session we requeue here (commands could - * be entering our queuecommand while a block is starting - * up because the block code is not locked) - */ - if (session->state == ISCSI_STATE_IN_RECOVERY) { - reason = FAILURE_SESSION_IN_RECOVERY; - goto reject; - } - - if (session->state == ISCSI_STATE_RECOVERY_FAILED) - reason = FAILURE_SESSION_RECOVERY_TIMEOUT; - else if (session->state == ISCSI_STATE_TERMINATE) - reason = FAILURE_SESSION_TERMINATE; - else - reason = FAILURE_SESSION_FREED; - goto fault; - } - - /* - * Check for iSCSI window and take care of CmdSN wrap-around - */ - if ((int)(session->max_cmdsn - session->cmdsn) < 0) { - reason = FAILURE_WINDOW_CLOSED; - goto reject; - } - - conn = session->leadconn; - - __kfifo_get(session->cmdpool.queue, (void*)&ctask, sizeof(void*)); - sc->SCp.phase = session->age; - sc->SCp.ptr = (char *)ctask; - - ctask->state = ISCSI_TASK_PENDING; - ctask->mtask = NULL; - ctask->conn = conn; - ctask->sc = sc; - INIT_LIST_HEAD(&ctask->running); - ctask->total_length = sc->request_bufflen; - iscsi_prep_scsi_cmd_pdu(ctask); - - session->tt->init_cmd_task(ctask); - - list_add_tail(&ctask->running, &conn->xmitqueue); - debug_scsi( - "ctask enq [%s cid %d sc %lx itt 0x%x len %d cmdsn %d win %d]\n", - sc->sc_data_direction == DMA_TO_DEVICE ? "write" : "read", - conn->id, (long)sc, ctask->itt, sc->request_bufflen, - session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1); - spin_unlock(&session->lock); - - scsi_queue_work(host, &conn->xmitwork); - return 0; - -reject: - spin_unlock(&session->lock); - debug_scsi("cmd 0x%x rejected (%d)\n", sc->cmnd[0], reason); - return SCSI_MLQUEUE_HOST_BUSY; - -fault: - spin_unlock(&session->lock); - printk(KERN_ERR "iscsi: cmd 0x%x is not queued (%d)\n", - sc->cmnd[0], reason); - sc->result = (DID_NO_CONNECT << 16); - sc->resid = sc->request_bufflen; - sc->scsi_done(sc); - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_queuecommand); - -int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) -{ - if (depth > ISCSI_MAX_CMD_PER_LUN) - depth = ISCSI_MAX_CMD_PER_LUN; - scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); - return sdev->queue_depth; -} -EXPORT_SYMBOL_GPL(iscsi_change_queue_depth); - -static int -iscsi_conn_send_generic(struct iscsi_conn *conn, struct iscsi_hdr *hdr, - char *data, uint32_t data_size) -{ - struct iscsi_session *session = conn->session; - struct iscsi_nopout *nop = (struct iscsi_nopout *)hdr; - struct iscsi_mgmt_task *mtask; - - spin_lock_bh(&session->lock); - if (session->state == ISCSI_STATE_TERMINATE) { - spin_unlock_bh(&session->lock); - return -EPERM; - } - if (hdr->opcode == (ISCSI_OP_LOGIN | ISCSI_OP_IMMEDIATE) || - hdr->opcode == (ISCSI_OP_TEXT | ISCSI_OP_IMMEDIATE)) - /* - * Login and Text are sent serially, in - * request-followed-by-response sequence. - * Same mtask can be used. Same ITT must be used. - * Note that login_mtask is preallocated at conn_create(). - */ - mtask = conn->login_mtask; - else { - BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); - BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); - - nop->exp_statsn = cpu_to_be32(conn->exp_statsn); - if (!__kfifo_get(session->mgmtpool.queue, - (void*)&mtask, sizeof(void*))) { - spin_unlock_bh(&session->lock); - return -ENOSPC; - } - } - - /* - * pre-format CmdSN for outgoing PDU. - */ - if (hdr->itt != cpu_to_be32(ISCSI_RESERVED_TAG)) { - hdr->itt = mtask->itt | (conn->id << ISCSI_CID_SHIFT) | - (session->age << ISCSI_AGE_SHIFT); - nop->cmdsn = cpu_to_be32(session->cmdsn); - if (conn->c_stage == ISCSI_CONN_STARTED && - !(hdr->opcode & ISCSI_OP_IMMEDIATE)) - session->cmdsn++; - } else - /* do not advance CmdSN */ - nop->cmdsn = cpu_to_be32(session->cmdsn); - - if (data_size) { - memcpy(mtask->data, data, data_size); - mtask->data_count = data_size; - } else - mtask->data_count = 0; - - INIT_LIST_HEAD(&mtask->running); - memcpy(mtask->hdr, hdr, sizeof(struct iscsi_hdr)); - if (session->tt->init_mgmt_task) - session->tt->init_mgmt_task(conn, mtask, data, data_size); - spin_unlock_bh(&session->lock); - - debug_scsi("mgmtpdu [op 0x%x hdr->itt 0x%x datalen %d]\n", - hdr->opcode, hdr->itt, data_size); - - /* - * since send_pdu() could be called at least from two contexts, - * we need to serialize __kfifo_put, so we don't have to take - * additional lock on fast data-path - */ - if (hdr->opcode & ISCSI_OP_IMMEDIATE) - __kfifo_put(conn->immqueue, (void*)&mtask, sizeof(void*)); - else - __kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*)); - - scsi_queue_work(session->host, &conn->xmitwork); - return 0; -} - -int iscsi_conn_send_pdu(struct iscsi_cls_conn *cls_conn, struct iscsi_hdr *hdr, - char *data, uint32_t data_size) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - int rc; - - mutex_lock(&conn->xmitmutex); - rc = iscsi_conn_send_generic(conn, hdr, data, data_size); - mutex_unlock(&conn->xmitmutex); - - return rc; -} -EXPORT_SYMBOL_GPL(iscsi_conn_send_pdu); - -void iscsi_session_recovery_timedout(struct iscsi_cls_session *cls_session) -{ - struct iscsi_session *session = class_to_transport_session(cls_session); - struct iscsi_conn *conn = session->leadconn; - - spin_lock_bh(&session->lock); - if (session->state != ISCSI_STATE_LOGGED_IN) { - session->state = ISCSI_STATE_RECOVERY_FAILED; - if (conn) - wake_up(&conn->ehwait); - } - spin_unlock_bh(&session->lock); -} -EXPORT_SYMBOL_GPL(iscsi_session_recovery_timedout); - -int iscsi_eh_host_reset(struct scsi_cmnd *sc) -{ - struct Scsi_Host *host = sc->device->host; - struct iscsi_session *session = iscsi_hostdata(host->hostdata); - struct iscsi_conn *conn = session->leadconn; - int fail_session = 0; - - spin_lock_bh(&session->lock); - if (session->state == ISCSI_STATE_TERMINATE) { -failed: - debug_scsi("failing host reset: session terminated " - "[CID %d age %d]", conn->id, session->age); - spin_unlock_bh(&session->lock); - return FAILED; - } - - if (sc->SCp.phase == session->age) { - debug_scsi("failing connection CID %d due to SCSI host reset", - conn->id); - fail_session = 1; - } - spin_unlock_bh(&session->lock); - - /* - * we drop the lock here but the leadconn cannot be destoyed while - * we are in the scsi eh - */ - if (fail_session) - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - - debug_scsi("iscsi_eh_host_reset wait for relogin\n"); - wait_event_interruptible(conn->ehwait, - session->state == ISCSI_STATE_TERMINATE || - session->state == ISCSI_STATE_LOGGED_IN || - session->state == ISCSI_STATE_RECOVERY_FAILED); - if (signal_pending(current)) - flush_signals(current); - - spin_lock_bh(&session->lock); - if (session->state == ISCSI_STATE_LOGGED_IN) - printk(KERN_INFO "iscsi: host reset succeeded\n"); - else - goto failed; - spin_unlock_bh(&session->lock); - - return SUCCESS; -} -EXPORT_SYMBOL_GPL(iscsi_eh_host_reset); - -static void iscsi_tmabort_timedout(unsigned long data) -{ - struct iscsi_cmd_task *ctask = (struct iscsi_cmd_task *)data; - struct iscsi_conn *conn = ctask->conn; - struct iscsi_session *session = conn->session; - - spin_lock(&session->lock); - if (conn->tmabort_state == TMABORT_INITIAL) { - conn->tmabort_state = TMABORT_TIMEDOUT; - debug_scsi("tmabort timedout [sc %p itt 0x%x]\n", - ctask->sc, ctask->itt); - /* unblock eh_abort() */ - wake_up(&conn->ehwait); - } - spin_unlock(&session->lock); -} - -/* must be called with the mutex lock */ -static int iscsi_exec_abort_task(struct scsi_cmnd *sc, - struct iscsi_cmd_task *ctask) -{ - struct iscsi_conn *conn = ctask->conn; - struct iscsi_session *session = conn->session; - struct iscsi_tm *hdr = &conn->tmhdr; - int rc; - - /* - * ctask timed out but session is OK requests must be serialized. - */ - memset(hdr, 0, sizeof(struct iscsi_tm)); - hdr->opcode = ISCSI_OP_SCSI_TMFUNC | ISCSI_OP_IMMEDIATE; - hdr->flags = ISCSI_TM_FUNC_ABORT_TASK; - hdr->flags |= ISCSI_FLAG_CMD_FINAL; - memcpy(hdr->lun, ctask->hdr->lun, sizeof(hdr->lun)); - hdr->rtt = ctask->hdr->itt; - hdr->refcmdsn = ctask->hdr->cmdsn; - - rc = iscsi_conn_send_generic(conn, (struct iscsi_hdr *)hdr, - NULL, 0); - if (rc) { - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - debug_scsi("abort sent failure [itt 0x%x] %d", ctask->itt, rc); - return rc; - } - - debug_scsi("abort sent [itt 0x%x]\n", ctask->itt); - - spin_lock_bh(&session->lock); - ctask->mtask = (struct iscsi_mgmt_task *) - session->mgmt_cmds[(hdr->itt & ISCSI_ITT_MASK) - - ISCSI_MGMT_ITT_OFFSET]; - - if (conn->tmabort_state == TMABORT_INITIAL) { - conn->tmfcmd_pdus_cnt++; - conn->tmabort_timer.expires = 10*HZ + jiffies; - conn->tmabort_timer.function = iscsi_tmabort_timedout; - conn->tmabort_timer.data = (unsigned long)ctask; - add_timer(&conn->tmabort_timer); - debug_scsi("abort set timeout [itt 0x%x]", ctask->itt); - } - spin_unlock_bh(&session->lock); - mutex_unlock(&conn->xmitmutex); - - /* - * block eh thread until: - * - * 1) abort response - * 2) abort timeout - * 3) session is terminated or restarted or userspace has - * given up on recovery - */ - wait_event_interruptible(conn->ehwait, - sc->SCp.phase != session->age || - session->state != ISCSI_STATE_LOGGED_IN || - conn->tmabort_state != TMABORT_INITIAL); - if (signal_pending(current)) - flush_signals(current); - del_timer_sync(&conn->tmabort_timer); - - mutex_lock(&conn->xmitmutex); - return 0; -} - -/* - * xmit mutex and session lock must be held - */ -static struct iscsi_mgmt_task * -iscsi_remove_mgmt_task(struct kfifo *fifo, uint32_t itt) -{ - int i, nr_tasks = __kfifo_len(fifo) / sizeof(void*); - struct iscsi_mgmt_task *task; - - debug_scsi("searching %d tasks\n", nr_tasks); - - for (i = 0; i < nr_tasks; i++) { - __kfifo_get(fifo, (void*)&task, sizeof(void*)); - debug_scsi("check task %u\n", task->itt); - - if (task->itt == itt) { - debug_scsi("matched task\n"); - return task; - } - - __kfifo_put(fifo, (void*)&task, sizeof(void*)); - } - return NULL; -} - -static int iscsi_ctask_mtask_cleanup(struct iscsi_cmd_task *ctask) -{ - struct iscsi_conn *conn = ctask->conn; - struct iscsi_session *session = conn->session; - - if (!ctask->mtask) - return -EINVAL; - - if (!iscsi_remove_mgmt_task(conn->immqueue, ctask->mtask->itt)) - list_del(&ctask->mtask->running); - __kfifo_put(session->mgmtpool.queue, (void*)&ctask->mtask, - sizeof(void*)); - ctask->mtask = NULL; - return 0; -} - -/* - * session lock and xmitmutex must be held - */ -static void fail_command(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask, - int err) -{ - struct scsi_cmnd *sc; - - sc = ctask->sc; - if (!sc) - return; - - conn->session->tt->cleanup_cmd_task(conn, ctask); - iscsi_ctask_mtask_cleanup(ctask); - - sc->result = err; - sc->resid = sc->request_bufflen; - iscsi_complete_command(conn->session, ctask); -} - -int iscsi_eh_abort(struct scsi_cmnd *sc) -{ - struct iscsi_cmd_task *ctask = (struct iscsi_cmd_task *)sc->SCp.ptr; - struct iscsi_conn *conn = ctask->conn; - struct iscsi_session *session = conn->session; - int rc; - - conn->eh_abort_cnt++; - debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt); - - mutex_lock(&conn->xmitmutex); - spin_lock_bh(&session->lock); - - /* - * If we are not logged in or we have started a new session - * then let the host reset code handle this - */ - if (session->state != ISCSI_STATE_LOGGED_IN || - sc->SCp.phase != session->age) - goto failed; - - /* ctask completed before time out */ - if (!ctask->sc) { - spin_unlock_bh(&session->lock); - debug_scsi("sc completed while abort in progress\n"); - goto success_rel_mutex; - } - - /* what should we do here ? */ - if (conn->ctask == ctask) { - printk(KERN_INFO "iscsi: sc %p itt 0x%x partially sent. " - "Failing abort\n", sc, ctask->itt); - goto failed; - } - - if (ctask->state == ISCSI_TASK_PENDING) - goto success_cleanup; - - conn->tmabort_state = TMABORT_INITIAL; - - spin_unlock_bh(&session->lock); - rc = iscsi_exec_abort_task(sc, ctask); - spin_lock_bh(&session->lock); - - if (rc || sc->SCp.phase != session->age || - session->state != ISCSI_STATE_LOGGED_IN) - goto failed; - iscsi_ctask_mtask_cleanup(ctask); - - switch (conn->tmabort_state) { - case TMABORT_SUCCESS: - goto success_cleanup; - case TMABORT_NOT_FOUND: - if (!ctask->sc) { - /* ctask completed before tmf abort response */ - spin_unlock_bh(&session->lock); - debug_scsi("sc completed while abort in progress\n"); - goto success_rel_mutex; - } - /* fall through */ - default: - /* timedout or failed */ - spin_unlock_bh(&session->lock); - iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED); - spin_lock_bh(&session->lock); - goto failed; - } - -success_cleanup: - debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); - spin_unlock_bh(&session->lock); - - /* - * clean up task if aborted. we have the xmitmutex so grab - * the recv lock as a writer - */ - write_lock_bh(conn->recv_lock); - spin_lock(&session->lock); - fail_command(conn, ctask, DID_ABORT << 16); - spin_unlock(&session->lock); - write_unlock_bh(conn->recv_lock); - -success_rel_mutex: - mutex_unlock(&conn->xmitmutex); - return SUCCESS; - -failed: - spin_unlock_bh(&session->lock); - mutex_unlock(&conn->xmitmutex); - - debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt); - return FAILED; -} -EXPORT_SYMBOL_GPL(iscsi_eh_abort); - -int -iscsi_pool_init(struct iscsi_queue *q, int max, void ***items, int item_size) -{ - int i; - - *items = kmalloc(max * sizeof(void*), GFP_KERNEL); - if (*items == NULL) - return -ENOMEM; - - q->max = max; - q->pool = kmalloc(max * sizeof(void*), GFP_KERNEL); - if (q->pool == NULL) { - kfree(*items); - return -ENOMEM; - } - - q->queue = kfifo_init((void*)q->pool, max * sizeof(void*), - GFP_KERNEL, NULL); - if (q->queue == ERR_PTR(-ENOMEM)) { - kfree(q->pool); - kfree(*items); - return -ENOMEM; - } - - for (i = 0; i < max; i++) { - q->pool[i] = kmalloc(item_size, GFP_KERNEL); - if (q->pool[i] == NULL) { - int j; - - for (j = 0; j < i; j++) - kfree(q->pool[j]); - - kfifo_free(q->queue); - kfree(q->pool); - kfree(*items); - return -ENOMEM; - } - memset(q->pool[i], 0, item_size); - (*items)[i] = q->pool[i]; - __kfifo_put(q->queue, (void*)&q->pool[i], sizeof(void*)); - } - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_pool_init); - -void iscsi_pool_free(struct iscsi_queue *q, void **items) -{ - int i; - - for (i = 0; i < q->max; i++) - kfree(items[i]); - kfree(q->pool); - kfree(items); -} -EXPORT_SYMBOL_GPL(iscsi_pool_free); - -/* - * iSCSI Session's hostdata organization: - * - * *------------------* <== hostdata_session(host->hostdata) - * | ptr to class sess| - * |------------------| <== iscsi_hostdata(host->hostdata) - * | iscsi_session | - * *------------------* - */ - -#define hostdata_privsize(_sz) (sizeof(unsigned long) + _sz + \ - _sz % sizeof(unsigned long)) - -#define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) - -/** - * iscsi_session_setup - create iscsi cls session and host and session - * @scsit: scsi transport template - * @iscsit: iscsi transport template - * @initial_cmdsn: initial CmdSN - * @hostno: host no allocated - * - * This can be used by software iscsi_transports that allocate - * a session per scsi host. - **/ -struct iscsi_cls_session * -iscsi_session_setup(struct iscsi_transport *iscsit, - struct scsi_transport_template *scsit, - int cmd_task_size, int mgmt_task_size, - uint32_t initial_cmdsn, uint32_t *hostno) -{ - struct Scsi_Host *shost; - struct iscsi_session *session; - struct iscsi_cls_session *cls_session; - int cmd_i; - - shost = scsi_host_alloc(iscsit->host_template, - hostdata_privsize(sizeof(*session))); - if (!shost) - return NULL; - - shost->max_id = 1; - shost->max_channel = 0; - shost->max_lun = iscsit->max_lun; - shost->max_cmd_len = iscsit->max_cmd_len; - shost->transportt = scsit; - shost->transportt->create_work_queue = 1; - *hostno = shost->host_no; - - session = iscsi_hostdata(shost->hostdata); - memset(session, 0, sizeof(struct iscsi_session)); - session->host = shost; - session->state = ISCSI_STATE_FREE; - session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX; - session->cmds_max = ISCSI_XMIT_CMDS_MAX; - session->cmdsn = initial_cmdsn; - session->exp_cmdsn = initial_cmdsn + 1; - session->max_cmdsn = initial_cmdsn + 1; - session->max_r2t = 1; - session->tt = iscsit; - - /* initialize SCSI PDU commands pool */ - if (iscsi_pool_init(&session->cmdpool, session->cmds_max, - (void***)&session->cmds, - cmd_task_size + sizeof(struct iscsi_cmd_task))) - goto cmdpool_alloc_fail; - - /* pre-format cmds pool with ITT */ - for (cmd_i = 0; cmd_i < session->cmds_max; cmd_i++) { - struct iscsi_cmd_task *ctask = session->cmds[cmd_i]; - - if (cmd_task_size) - ctask->dd_data = &ctask[1]; - ctask->itt = cmd_i; - INIT_LIST_HEAD(&ctask->running); - } - - spin_lock_init(&session->lock); - INIT_LIST_HEAD(&session->connections); - - /* initialize immediate command pool */ - if (iscsi_pool_init(&session->mgmtpool, session->mgmtpool_max, - (void***)&session->mgmt_cmds, - mgmt_task_size + sizeof(struct iscsi_mgmt_task))) - goto mgmtpool_alloc_fail; - - - /* pre-format immediate cmds pool with ITT */ - for (cmd_i = 0; cmd_i < session->mgmtpool_max; cmd_i++) { - struct iscsi_mgmt_task *mtask = session->mgmt_cmds[cmd_i]; - - if (mgmt_task_size) - mtask->dd_data = &mtask[1]; - mtask->itt = ISCSI_MGMT_ITT_OFFSET + cmd_i; - INIT_LIST_HEAD(&mtask->running); - } - - if (scsi_add_host(shost, NULL)) - goto add_host_fail; - - if (!try_module_get(iscsit->owner)) - goto cls_session_fail; - - cls_session = iscsi_create_session(shost, iscsit, 0); - if (!cls_session) - goto module_put; - *(unsigned long*)shost->hostdata = (unsigned long)cls_session; - - return cls_session; - -module_put: - module_put(iscsit->owner); -cls_session_fail: - scsi_remove_host(shost); -add_host_fail: - iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); -mgmtpool_alloc_fail: - iscsi_pool_free(&session->cmdpool, (void**)session->cmds); -cmdpool_alloc_fail: - scsi_host_put(shost); - return NULL; -} -EXPORT_SYMBOL_GPL(iscsi_session_setup); - -/** - * iscsi_session_teardown - destroy session, host, and cls_session - * shost: scsi host - * - * This can be used by software iscsi_transports that allocate - * a session per scsi host. - **/ -void iscsi_session_teardown(struct iscsi_cls_session *cls_session) -{ - struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); - struct iscsi_session *session = iscsi_hostdata(shost->hostdata); - struct module *owner = cls_session->transport->owner; - - scsi_remove_host(shost); - - iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds); - iscsi_pool_free(&session->cmdpool, (void**)session->cmds); - - kfree(session->targetname); - - iscsi_destroy_session(cls_session); - scsi_host_put(shost); - module_put(owner); -} -EXPORT_SYMBOL_GPL(iscsi_session_teardown); - -/** - * iscsi_conn_setup - create iscsi_cls_conn and iscsi_conn - * @cls_session: iscsi_cls_session - * @conn_idx: cid - **/ -struct iscsi_cls_conn * -iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx) -{ - struct iscsi_session *session = class_to_transport_session(cls_session); - struct iscsi_conn *conn; - struct iscsi_cls_conn *cls_conn; - char *data; - - cls_conn = iscsi_create_conn(cls_session, conn_idx); - if (!cls_conn) - return NULL; - conn = cls_conn->dd_data; - memset(conn, 0, sizeof(*conn)); - - conn->session = session; - conn->cls_conn = cls_conn; - conn->c_stage = ISCSI_CONN_INITIAL_STAGE; - conn->id = conn_idx; - conn->exp_statsn = 0; - conn->tmabort_state = TMABORT_INITIAL; - INIT_LIST_HEAD(&conn->run_list); - INIT_LIST_HEAD(&conn->mgmt_run_list); - INIT_LIST_HEAD(&conn->xmitqueue); - - /* initialize general immediate & non-immediate PDU commands queue */ - conn->immqueue = kfifo_alloc(session->mgmtpool_max * sizeof(void*), - GFP_KERNEL, NULL); - if (conn->immqueue == ERR_PTR(-ENOMEM)) - goto immqueue_alloc_fail; - - conn->mgmtqueue = kfifo_alloc(session->mgmtpool_max * sizeof(void*), - GFP_KERNEL, NULL); - if (conn->mgmtqueue == ERR_PTR(-ENOMEM)) - goto mgmtqueue_alloc_fail; - - INIT_WORK(&conn->xmitwork, iscsi_xmitworker, conn); - - /* allocate login_mtask used for the login/text sequences */ - spin_lock_bh(&session->lock); - if (!__kfifo_get(session->mgmtpool.queue, - (void*)&conn->login_mtask, - sizeof(void*))) { - spin_unlock_bh(&session->lock); - goto login_mtask_alloc_fail; - } - spin_unlock_bh(&session->lock); - - data = kmalloc(DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, GFP_KERNEL); - if (!data) - goto login_mtask_data_alloc_fail; - conn->login_mtask->data = conn->data = data; - - init_timer(&conn->tmabort_timer); - mutex_init(&conn->xmitmutex); - init_waitqueue_head(&conn->ehwait); - - return cls_conn; - -login_mtask_data_alloc_fail: - __kfifo_put(session->mgmtpool.queue, (void*)&conn->login_mtask, - sizeof(void*)); -login_mtask_alloc_fail: - kfifo_free(conn->mgmtqueue); -mgmtqueue_alloc_fail: - kfifo_free(conn->immqueue); -immqueue_alloc_fail: - iscsi_destroy_conn(cls_conn); - return NULL; -} -EXPORT_SYMBOL_GPL(iscsi_conn_setup); - -/** - * iscsi_conn_teardown - teardown iscsi connection - * cls_conn: iscsi class connection - * - * TODO: we may need to make this into a two step process - * like scsi-mls remove + put host - */ -void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_session *session = conn->session; - unsigned long flags; - - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - mutex_lock(&conn->xmitmutex); - - spin_lock_bh(&session->lock); - conn->c_stage = ISCSI_CONN_CLEANUP_WAIT; - if (session->leadconn == conn) { - /* - * leading connection? then give up on recovery. - */ - session->state = ISCSI_STATE_TERMINATE; - wake_up(&conn->ehwait); - } - spin_unlock_bh(&session->lock); - - mutex_unlock(&conn->xmitmutex); - - /* - * Block until all in-progress commands for this connection - * time out or fail. - */ - for (;;) { - spin_lock_irqsave(session->host->host_lock, flags); - if (!session->host->host_busy) { /* OK for ERL == 0 */ - spin_unlock_irqrestore(session->host->host_lock, flags); - break; - } - spin_unlock_irqrestore(session->host->host_lock, flags); - msleep_interruptible(500); - printk(KERN_INFO "iscsi: scsi conn_destroy(): host_busy %d " - "host_failed %d\n", session->host->host_busy, - session->host->host_failed); - /* - * force eh_abort() to unblock - */ - wake_up(&conn->ehwait); - } - - spin_lock_bh(&session->lock); - kfree(conn->data); - kfree(conn->persistent_address); - __kfifo_put(session->mgmtpool.queue, (void*)&conn->login_mtask, - sizeof(void*)); - list_del(&conn->item); - if (list_empty(&session->connections)) - session->leadconn = NULL; - if (session->leadconn && session->leadconn == conn) - session->leadconn = container_of(session->connections.next, - struct iscsi_conn, item); - - if (session->leadconn == NULL) - /* no connections exits.. reset sequencing */ - session->cmdsn = session->max_cmdsn = session->exp_cmdsn = 1; - spin_unlock_bh(&session->lock); - - kfifo_free(conn->immqueue); - kfifo_free(conn->mgmtqueue); - - iscsi_destroy_conn(cls_conn); -} -EXPORT_SYMBOL_GPL(iscsi_conn_teardown); - -int iscsi_conn_start(struct iscsi_cls_conn *cls_conn) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_session *session = conn->session; - - if (session == NULL) { - printk(KERN_ERR "iscsi: can't start unbound connection\n"); - return -EPERM; - } - - spin_lock_bh(&session->lock); - conn->c_stage = ISCSI_CONN_STARTED; - session->state = ISCSI_STATE_LOGGED_IN; - - switch(conn->stop_stage) { - case STOP_CONN_RECOVER: - /* - * unblock eh_abort() if it is blocked. re-try all - * commands after successful recovery - */ - conn->stop_stage = 0; - conn->tmabort_state = TMABORT_INITIAL; - session->age++; - spin_unlock_bh(&session->lock); - - iscsi_unblock_session(session_to_cls(session)); - wake_up(&conn->ehwait); - return 0; - case STOP_CONN_TERM: - conn->stop_stage = 0; - break; - default: - break; - } - spin_unlock_bh(&session->lock); - - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_conn_start); - -static void -flush_control_queues(struct iscsi_session *session, struct iscsi_conn *conn) -{ - struct iscsi_mgmt_task *mtask, *tmp; - - /* handle pending */ - while (__kfifo_get(conn->immqueue, (void*)&mtask, sizeof(void*)) || - __kfifo_get(conn->mgmtqueue, (void*)&mtask, sizeof(void*))) { - if (mtask == conn->login_mtask) - continue; - debug_scsi("flushing pending mgmt task itt 0x%x\n", mtask->itt); - __kfifo_put(session->mgmtpool.queue, (void*)&mtask, - sizeof(void*)); - } - - /* handle running */ - list_for_each_entry_safe(mtask, tmp, &conn->mgmt_run_list, running) { - debug_scsi("flushing running mgmt task itt 0x%x\n", mtask->itt); - list_del(&mtask->running); - - if (mtask == conn->login_mtask) - continue; - __kfifo_put(session->mgmtpool.queue, (void*)&mtask, - sizeof(void*)); - } - - conn->mtask = NULL; -} - -/* Fail commands. Mutex and session lock held and recv side suspended */ -static void fail_all_commands(struct iscsi_conn *conn) -{ - struct iscsi_cmd_task *ctask, *tmp; - - /* flush pending */ - list_for_each_entry_safe(ctask, tmp, &conn->xmitqueue, running) { - debug_scsi("failing pending sc %p itt 0x%x\n", ctask->sc, - ctask->itt); - fail_command(conn, ctask, DID_BUS_BUSY << 16); - } - - /* fail all other running */ - list_for_each_entry_safe(ctask, tmp, &conn->run_list, running) { - debug_scsi("failing in progress sc %p itt 0x%x\n", - ctask->sc, ctask->itt); - fail_command(conn, ctask, DID_BUS_BUSY << 16); - } - - conn->ctask = NULL; -} - -static void iscsi_start_session_recovery(struct iscsi_session *session, - struct iscsi_conn *conn, int flag) -{ - int old_stop_stage; - - spin_lock_bh(&session->lock); - if (conn->stop_stage == STOP_CONN_TERM) { - spin_unlock_bh(&session->lock); - return; - } - - /* - * When this is called for the in_login state, we only want to clean - * up the login task and connection. We do not need to block and set - * the recovery state again - */ - if (flag == STOP_CONN_TERM) - session->state = ISCSI_STATE_TERMINATE; - else if (conn->stop_stage != STOP_CONN_RECOVER) - session->state = ISCSI_STATE_IN_RECOVERY; - - old_stop_stage = conn->stop_stage; - conn->stop_stage = flag; - conn->c_stage = ISCSI_CONN_STOPPED; - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - spin_unlock_bh(&session->lock); - - write_lock_bh(conn->recv_lock); - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); - write_unlock_bh(conn->recv_lock); - - mutex_lock(&conn->xmitmutex); - /* - * for connection level recovery we should not calculate - * header digest. conn->hdr_size used for optimization - * in hdr_extract() and will be re-negotiated at - * set_param() time. - */ - if (flag == STOP_CONN_RECOVER) { - conn->hdrdgst_en = 0; - conn->datadgst_en = 0; - if (session->state == ISCSI_STATE_IN_RECOVERY && - old_stop_stage != STOP_CONN_RECOVER) { - debug_scsi("blocking session\n"); - iscsi_block_session(session_to_cls(session)); - } - } - - /* - * flush queues. - */ - spin_lock_bh(&session->lock); - fail_all_commands(conn); - flush_control_queues(session, conn); - spin_unlock_bh(&session->lock); - - mutex_unlock(&conn->xmitmutex); -} - -void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_session *session = conn->session; - - switch (flag) { - case STOP_CONN_RECOVER: - case STOP_CONN_TERM: - iscsi_start_session_recovery(session, conn, flag); - break; - default: - printk(KERN_ERR "iscsi: invalid stop flag %d\n", flag); - } -} -EXPORT_SYMBOL_GPL(iscsi_conn_stop); - -int iscsi_conn_bind(struct iscsi_cls_session *cls_session, - struct iscsi_cls_conn *cls_conn, int is_leading) -{ - struct iscsi_session *session = class_to_transport_session(cls_session); - struct iscsi_conn *tmp = ERR_PTR(-EEXIST), *conn = cls_conn->dd_data; - - /* lookup for existing connection */ - spin_lock_bh(&session->lock); - list_for_each_entry(tmp, &session->connections, item) { - if (tmp == conn) { - if (conn->c_stage != ISCSI_CONN_STOPPED || - conn->stop_stage == STOP_CONN_TERM) { - printk(KERN_ERR "iscsi: can't bind " - "non-stopped connection (%d:%d)\n", - conn->c_stage, conn->stop_stage); - spin_unlock_bh(&session->lock); - return -EIO; - } - break; - } - } - if (tmp != conn) { - /* bind new iSCSI connection to session */ - conn->session = session; - list_add(&conn->item, &session->connections); - } - spin_unlock_bh(&session->lock); - - if (is_leading) - session->leadconn = conn; - - /* - * Unblock xmitworker(), Login Phase will pass through. - */ - clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx); - clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_conn_bind); - - -int iscsi_set_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf, int buflen) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - struct iscsi_session *session = conn->session; - uint32_t value; - - switch(param) { - case ISCSI_PARAM_MAX_RECV_DLENGTH: - sscanf(buf, "%d", &conn->max_recv_dlength); - break; - case ISCSI_PARAM_MAX_XMIT_DLENGTH: - sscanf(buf, "%d", &conn->max_xmit_dlength); - break; - case ISCSI_PARAM_HDRDGST_EN: - sscanf(buf, "%d", &conn->hdrdgst_en); - break; - case ISCSI_PARAM_DATADGST_EN: - sscanf(buf, "%d", &conn->datadgst_en); - break; - case ISCSI_PARAM_INITIAL_R2T_EN: - sscanf(buf, "%d", &session->initial_r2t_en); - break; - case ISCSI_PARAM_MAX_R2T: - sscanf(buf, "%d", &session->max_r2t); - break; - case ISCSI_PARAM_IMM_DATA_EN: - sscanf(buf, "%d", &session->imm_data_en); - break; - case ISCSI_PARAM_FIRST_BURST: - sscanf(buf, "%d", &session->first_burst); - break; - case ISCSI_PARAM_MAX_BURST: - sscanf(buf, "%d", &session->max_burst); - break; - case ISCSI_PARAM_PDU_INORDER_EN: - sscanf(buf, "%d", &session->pdu_inorder_en); - break; - case ISCSI_PARAM_DATASEQ_INORDER_EN: - sscanf(buf, "%d", &session->dataseq_inorder_en); - break; - case ISCSI_PARAM_ERL: - sscanf(buf, "%d", &session->erl); - break; - case ISCSI_PARAM_IFMARKER_EN: - sscanf(buf, "%d", &value); - BUG_ON(value); - break; - case ISCSI_PARAM_OFMARKER_EN: - sscanf(buf, "%d", &value); - BUG_ON(value); - break; - case ISCSI_PARAM_EXP_STATSN: - sscanf(buf, "%u", &conn->exp_statsn); - break; - case ISCSI_PARAM_TARGET_NAME: - /* this should not change between logins */ - if (session->targetname) - break; - - session->targetname = kstrdup(buf, GFP_KERNEL); - if (!session->targetname) - return -ENOMEM; - break; - case ISCSI_PARAM_TPGT: - sscanf(buf, "%d", &session->tpgt); - break; - case ISCSI_PARAM_PERSISTENT_PORT: - sscanf(buf, "%d", &conn->persistent_port); - break; - case ISCSI_PARAM_PERSISTENT_ADDRESS: - /* - * this is the address returned in discovery so it should - * not change between logins. - */ - if (conn->persistent_address) - break; - - conn->persistent_address = kstrdup(buf, GFP_KERNEL); - if (!conn->persistent_address) - return -ENOMEM; - break; - default: - return -ENOSYS; - } - - return 0; -} -EXPORT_SYMBOL_GPL(iscsi_set_param); - -int iscsi_session_get_param(struct iscsi_cls_session *cls_session, - enum iscsi_param param, char *buf) -{ - struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); - struct iscsi_session *session = iscsi_hostdata(shost->hostdata); - int len; - - switch(param) { - case ISCSI_PARAM_INITIAL_R2T_EN: - len = sprintf(buf, "%d\n", session->initial_r2t_en); - break; - case ISCSI_PARAM_MAX_R2T: - len = sprintf(buf, "%hu\n", session->max_r2t); - break; - case ISCSI_PARAM_IMM_DATA_EN: - len = sprintf(buf, "%d\n", session->imm_data_en); - break; - case ISCSI_PARAM_FIRST_BURST: - len = sprintf(buf, "%u\n", session->first_burst); - break; - case ISCSI_PARAM_MAX_BURST: - len = sprintf(buf, "%u\n", session->max_burst); - break; - case ISCSI_PARAM_PDU_INORDER_EN: - len = sprintf(buf, "%d\n", session->pdu_inorder_en); - break; - case ISCSI_PARAM_DATASEQ_INORDER_EN: - len = sprintf(buf, "%d\n", session->dataseq_inorder_en); - break; - case ISCSI_PARAM_ERL: - len = sprintf(buf, "%d\n", session->erl); - break; - case ISCSI_PARAM_TARGET_NAME: - len = sprintf(buf, "%s\n", session->targetname); - break; - case ISCSI_PARAM_TPGT: - len = sprintf(buf, "%d\n", session->tpgt); - break; - default: - return -ENOSYS; - } - - return len; -} -EXPORT_SYMBOL_GPL(iscsi_session_get_param); - -int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf) -{ - struct iscsi_conn *conn = cls_conn->dd_data; - int len; - - switch(param) { - case ISCSI_PARAM_MAX_RECV_DLENGTH: - len = sprintf(buf, "%u\n", conn->max_recv_dlength); - break; - case ISCSI_PARAM_MAX_XMIT_DLENGTH: - len = sprintf(buf, "%u\n", conn->max_xmit_dlength); - break; - case ISCSI_PARAM_HDRDGST_EN: - len = sprintf(buf, "%d\n", conn->hdrdgst_en); - break; - case ISCSI_PARAM_DATADGST_EN: - len = sprintf(buf, "%d\n", conn->datadgst_en); - break; - case ISCSI_PARAM_IFMARKER_EN: - len = sprintf(buf, "%d\n", conn->ifmarker_en); - break; - case ISCSI_PARAM_OFMARKER_EN: - len = sprintf(buf, "%d\n", conn->ofmarker_en); - break; - case ISCSI_PARAM_EXP_STATSN: - len = sprintf(buf, "%u\n", conn->exp_statsn); - break; - case ISCSI_PARAM_PERSISTENT_PORT: - len = sprintf(buf, "%d\n", conn->persistent_port); - break; - case ISCSI_PARAM_PERSISTENT_ADDRESS: - len = sprintf(buf, "%s\n", conn->persistent_address); - break; - default: - return -ENOSYS; - } - - return len; -} -EXPORT_SYMBOL_GPL(iscsi_conn_get_param); - -MODULE_AUTHOR("Mike Christie"); -MODULE_DESCRIPTION("iSCSI library functions"); -MODULE_LICENSE("GPL"); diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index d44f9aac6..087c44539 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -21,12 +21,10 @@ struct lpfc_sli2_slim; +#define LPFC_MAX_TARGET 256 /* max targets supported */ +#define LPFC_MAX_DISC_THREADS 64 /* max outstanding discovery els req */ +#define LPFC_MAX_NS_RETRY 3 /* max NameServer retries */ -#define LPFC_MAX_TARGET 256 /* max number of targets supported */ -#define LPFC_MAX_DISC_THREADS 64 /* max outstanding discovery els - requests */ -#define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact - the NameServer before giving up. */ #define LPFC_DFT_HBA_Q_DEPTH 2048 /* max cmds per hba */ #define LPFC_LC_HBA_Q_DEPTH 1024 /* max cmds per low cost hba */ #define LPFC_LP101_HBA_Q_DEPTH 128 /* max cmds per low cost hba */ @@ -43,6 +41,7 @@ struct lpfc_sli2_slim; (( (u64)(high)<<16 ) << 16)|( (u64)(low)))) /* Provide maximum configuration definitions. */ #define LPFC_DRVR_TIMEOUT 16 /* driver iocb timeout value in sec */ +#define MAX_FCP_TARGET 256 /* max num of FCP targets supported */ #define FC_MAX_ADPTMSG 64 #define MAX_HBAEVT 32 @@ -175,6 +174,7 @@ struct lpfc_hba { dma_addr_t slim2p_mapping; uint16_t pci_cfg_value; + struct semaphore hba_can_block; int32_t hba_state; #define LPFC_STATE_UNKNOWN 0 /* HBA state is unknown */ diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index d384c16f4..b62a72dfa 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -219,18 +219,8 @@ lpfc_issue_lip(struct Scsi_Host *host) return -ENOMEM; memset((void *)pmboxq, 0, sizeof (LPFC_MBOXQ_t)); - pmboxq->mb.mbxCommand = MBX_DOWN_LINK; - pmboxq->mb.mbxOwner = OWN_HOST; - - mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq, LPFC_MBOX_TMO * 2); - - if ((mbxstatus == MBX_SUCCESS) && (pmboxq->mb.mbxStatus == 0)) { - memset((void *)pmboxq, 0, sizeof (LPFC_MBOXQ_t)); - lpfc_init_link(phba, pmboxq, phba->cfg_topology, - phba->cfg_link_speed); - mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq, - phba->fc_ratov * 2); - } + lpfc_init_link(phba, pmboxq, phba->cfg_topology, phba->cfg_link_speed); + mbxstatus = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); if (mbxstatus == MBX_TIMEOUT) pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl; @@ -243,53 +233,51 @@ lpfc_issue_lip(struct Scsi_Host *host) return 0; } -static int -lpfc_selective_reset(struct lpfc_hba *phba) +static ssize_t +lpfc_nport_evt_cnt_show(struct class_device *cdev, char *buf) { - struct completion online_compl; - int status = 0; - - init_completion(&online_compl); - lpfc_workq_post_event(phba, &status, &online_compl, - LPFC_EVT_OFFLINE); - wait_for_completion(&online_compl); - - if (status != 0) - return -EIO; - - init_completion(&online_compl); - lpfc_workq_post_event(phba, &status, &online_compl, - LPFC_EVT_ONLINE); - wait_for_completion(&online_compl); - - if (status != 0) - return -EIO; - - return 0; + struct Scsi_Host *host = class_to_shost(cdev); + struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata; + return snprintf(buf, PAGE_SIZE, "%d\n", phba->nport_event_cnt); } static ssize_t -lpfc_issue_reset(struct class_device *cdev, const char *buf, size_t count) +lpfc_board_online_show(struct class_device *cdev, char *buf) { struct Scsi_Host *host = class_to_shost(cdev); struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata; - int status = -EINVAL; - - if (strncmp(buf, "selective", sizeof("selective") - 1) == 0) - status = lpfc_selective_reset(phba); - if (status == 0) - return strlen(buf); + if (phba->fc_flag & FC_OFFLINE_MODE) + return snprintf(buf, PAGE_SIZE, "0\n"); else - return status; + return snprintf(buf, PAGE_SIZE, "1\n"); } static ssize_t -lpfc_nport_evt_cnt_show(struct class_device *cdev, char *buf) +lpfc_board_online_store(struct class_device *cdev, const char *buf, + size_t count) { struct Scsi_Host *host = class_to_shost(cdev); struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata; - return snprintf(buf, PAGE_SIZE, "%d\n", phba->nport_event_cnt); + struct completion online_compl; + int val=0, status=0; + + if (sscanf(buf, "%d", &val) != 1) + return -EINVAL; + + init_completion(&online_compl); + + if (val) + lpfc_workq_post_event(phba, &status, &online_compl, + LPFC_EVT_ONLINE); + else + lpfc_workq_post_event(phba, &status, &online_compl, + LPFC_EVT_OFFLINE); + wait_for_completion(&online_compl); + if (!status) + return strlen(buf); + else + return -EIO; } static ssize_t @@ -544,9 +532,10 @@ static CLASS_DEVICE_ATTR(lpfc_drvr_version, S_IRUGO, lpfc_drvr_version_show, NULL); static CLASS_DEVICE_ATTR(management_version, S_IRUGO, management_version_show, NULL); +static CLASS_DEVICE_ATTR(board_online, S_IRUGO | S_IWUSR, + lpfc_board_online_show, lpfc_board_online_store); static CLASS_DEVICE_ATTR(board_mode, S_IRUGO | S_IWUSR, lpfc_board_mode_show, lpfc_board_mode_store); -static CLASS_DEVICE_ATTR(issue_reset, S_IWUSR, NULL, lpfc_issue_reset); static int lpfc_poll = 0; module_param(lpfc_poll, int, 0); @@ -706,12 +695,12 @@ LPFC_ATTR(discovery_threads, 32, 1, 64, "Maximum number of ELS commands " "during discovery"); /* -# lpfc_max_luns: maximum allowed LUN. -# Value range is [0,65535]. Default value is 255. -# NOTE: The SCSI layer might probe all allowed LUN on some old targets. +# lpfc_max_luns: maximum number of LUNs per target driver will support +# Value range is [1,32768]. Default value is 256. +# NOTE: The SCSI layer will scan each target for this many luns */ -LPFC_ATTR_R(max_luns, 255, 0, 65535, - "Maximum allowed LUN"); +LPFC_ATTR_R(max_luns, 256, 1, 32768, + "Maximum number of LUNs per target driver will support"); /* # lpfc_poll_tmo: .Milliseconds driver will wait between polling FCP ring. @@ -750,8 +739,8 @@ struct class_device_attribute *lpfc_host_attrs[] = { &class_device_attr_lpfc_max_luns, &class_device_attr_nport_evt_cnt, &class_device_attr_management_version, + &class_device_attr_board_online, &class_device_attr_board_mode, - &class_device_attr_issue_reset, &class_device_attr_lpfc_poll, &class_device_attr_lpfc_poll_tmo, NULL, @@ -884,7 +873,7 @@ sysfs_mbox_write(struct kobject *kobj, char *buf, loff_t off, size_t count) phba->sysfs_mbox.mbox == NULL ) { sysfs_mbox_idle(phba); spin_unlock_irq(host->host_lock); - return -EAGAIN; + return -EINVAL; } } @@ -1000,15 +989,14 @@ sysfs_mbox_read(struct kobject *kobj, char *buf, loff_t off, size_t count) spin_unlock_irq(phba->host->host_lock); rc = lpfc_sli_issue_mbox_wait (phba, phba->sysfs_mbox.mbox, - lpfc_mbox_tmo_val(phba, - phba->sysfs_mbox.mbox->mb.mbxCommand) * HZ); + phba->fc_ratov * 2); spin_lock_irq(phba->host->host_lock); } if (rc != MBX_SUCCESS) { sysfs_mbox_idle(phba); spin_unlock_irq(host->host_lock); - return (rc == MBX_TIMEOUT) ? -ETIME : -ENODEV; + return -ENODEV; } phba->sysfs_mbox.state = SMBOX_READING; } @@ -1017,7 +1005,7 @@ sysfs_mbox_read(struct kobject *kobj, char *buf, loff_t off, size_t count) printk(KERN_WARNING "mbox_read: Bad State\n"); sysfs_mbox_idle(phba); spin_unlock_irq(host->host_lock); - return -EAGAIN; + return -EINVAL; } memcpy(buf, (uint8_t *) & phba->sysfs_mbox.mbox->mb + off, count); @@ -1211,10 +1199,8 @@ lpfc_get_stats(struct Scsi_Host *shost) struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata; struct lpfc_sli *psli = &phba->sli; struct fc_host_statistics *hs = &phba->link_stats; - struct lpfc_lnk_stat * lso = &psli->lnk_stat_offsets; LPFC_MBOXQ_t *pmboxq; MAILBOX_t *pmb; - unsigned long seconds; int rc = 0; pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); @@ -1275,103 +1261,22 @@ lpfc_get_stats(struct Scsi_Host *shost) hs->invalid_crc_count = pmb->un.varRdLnk.crcCnt; hs->error_frames = pmb->un.varRdLnk.crcCnt; - hs->link_failure_count -= lso->link_failure_count; - hs->loss_of_sync_count -= lso->loss_of_sync_count; - hs->loss_of_signal_count -= lso->loss_of_signal_count; - hs->prim_seq_protocol_err_count -= lso->prim_seq_protocol_err_count; - hs->invalid_tx_word_count -= lso->invalid_tx_word_count; - hs->invalid_crc_count -= lso->invalid_crc_count; - hs->error_frames -= lso->error_frames; - if (phba->fc_topology == TOPOLOGY_LOOP) { hs->lip_count = (phba->fc_eventTag >> 1); - hs->lip_count -= lso->link_events; hs->nos_count = -1; } else { hs->lip_count = -1; hs->nos_count = (phba->fc_eventTag >> 1); - hs->nos_count -= lso->link_events; } hs->dumped_frames = -1; - seconds = get_seconds(); - if (seconds < psli->stats_start) - hs->seconds_since_last_reset = seconds + - ((unsigned long)-1 - psli->stats_start); - else - hs->seconds_since_last_reset = seconds - psli->stats_start; +/* FIX ME */ + /*hs->SecondsSinceLastReset = (jiffies - lpfc_loadtime) / HZ;*/ return hs; } -static void -lpfc_reset_stats(struct Scsi_Host *shost) -{ - struct lpfc_hba *phba = (struct lpfc_hba *)shost->hostdata; - struct lpfc_sli *psli = &phba->sli; - struct lpfc_lnk_stat * lso = &psli->lnk_stat_offsets; - LPFC_MBOXQ_t *pmboxq; - MAILBOX_t *pmb; - int rc = 0; - - pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); - if (!pmboxq) - return; - memset(pmboxq, 0, sizeof(LPFC_MBOXQ_t)); - - pmb = &pmboxq->mb; - pmb->mbxCommand = MBX_READ_STATUS; - pmb->mbxOwner = OWN_HOST; - pmb->un.varWords[0] = 0x1; /* reset request */ - pmboxq->context1 = NULL; - - if ((phba->fc_flag & FC_OFFLINE_MODE) || - (!(psli->sli_flag & LPFC_SLI2_ACTIVE))) - rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL); - else - rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); - - if (rc != MBX_SUCCESS) { - if (rc == MBX_TIMEOUT) - pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl; - else - mempool_free(pmboxq, phba->mbox_mem_pool); - return; - } - - memset(pmboxq, 0, sizeof(LPFC_MBOXQ_t)); - pmb->mbxCommand = MBX_READ_LNK_STAT; - pmb->mbxOwner = OWN_HOST; - pmboxq->context1 = NULL; - - if ((phba->fc_flag & FC_OFFLINE_MODE) || - (!(psli->sli_flag & LPFC_SLI2_ACTIVE))) - rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL); - else - rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2); - - if (rc != MBX_SUCCESS) { - if (rc == MBX_TIMEOUT) - pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl; - else - mempool_free( pmboxq, phba->mbox_mem_pool); - return; - } - - lso->link_failure_count = pmb->un.varRdLnk.linkFailureCnt; - lso->loss_of_sync_count = pmb->un.varRdLnk.lossSyncCnt; - lso->loss_of_signal_count = pmb->un.varRdLnk.lossSignalCnt; - lso->prim_seq_protocol_err_count = pmb->un.varRdLnk.primSeqErrCnt; - lso->invalid_tx_word_count = pmb->un.varRdLnk.invalidXmitWord; - lso->invalid_crc_count = pmb->un.varRdLnk.crcCnt; - lso->error_frames = pmb->un.varRdLnk.crcCnt; - lso->link_events = (phba->fc_eventTag >> 1); - - psli->stats_start = get_seconds(); - - return; -} /* * The LPFC driver treats linkdown handling as target loss events so there @@ -1515,7 +1420,8 @@ struct fc_function_template lpfc_transport_functions = { */ .get_fc_host_stats = lpfc_get_stats, - .reset_fc_host_stats = lpfc_reset_stats, + + /* the LPFC driver doesn't support resetting stats yet */ .dd_fcrport_size = sizeof(struct lpfc_rport_data), .show_rport_maxframe_size = 1, diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 2a176467f..ee22173fc 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h @@ -127,7 +127,6 @@ void lpfc_config_port(struct lpfc_hba *, LPFC_MBOXQ_t *); void lpfc_kill_board(struct lpfc_hba *, LPFC_MBOXQ_t *); void lpfc_mbox_put(struct lpfc_hba *, LPFC_MBOXQ_t *); LPFC_MBOXQ_t *lpfc_mbox_get(struct lpfc_hba *); -int lpfc_mbox_tmo_val(struct lpfc_hba *, int); int lpfc_mem_alloc(struct lpfc_hba *); void lpfc_mem_free(struct lpfc_hba *); @@ -148,7 +147,6 @@ int lpfc_sli_hba_setup(struct lpfc_hba *); int lpfc_sli_hba_down(struct lpfc_hba *); int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); int lpfc_sli_handle_mb_event(struct lpfc_hba *); -int lpfc_sli_flush_mbox_queue(struct lpfc_hba *); int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, struct lpfc_sli_ring *, uint32_t); void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *); diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index bbb731021..b65ee57af 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -131,7 +131,6 @@ lpfc_ct_unsol_event(struct lpfc_hba * phba, } ct_unsol_event_exit_piocbq: - list_del(&head); if (pmbuf) { list_for_each_entry_safe(matp, next_matp, &pmbuf->list, list) { lpfc_mbuf_free(phba, matp->virt, matp->phys); @@ -482,7 +481,7 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, if (CTrsp->CommandResponse.bits.CmdRsp == be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) { lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, - "%d:0208 NameServer Rsp " + "%d:0239 NameServer Rsp " "Data: x%x\n", phba->brd_no, phba->fc_flag); @@ -589,9 +588,13 @@ lpfc_get_hba_sym_node_name(struct lpfc_hba * phba, uint8_t * symbp) lpfc_decode_firmware_rev(phba, fwrev, 0); - sprintf(symbp, "Emulex %s FV%s DV%s", phba->ModelName, - fwrev, lpfc_release_version); - return; + if (phba->Port[0]) { + sprintf(symbp, "Emulex %s Port %s FV%s DV%s", phba->ModelName, + phba->Port, fwrev, lpfc_release_version); + } else { + sprintf(symbp, "Emulex %s FV%s DV%s", phba->ModelName, + fwrev, lpfc_release_version); + } } /* diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 3567de613..283b7d824 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -648,32 +648,33 @@ lpfc_more_plogi(struct lpfc_hba * phba) } static struct lpfc_nodelist * -lpfc_plogi_confirm_nport(struct lpfc_hba * phba, struct lpfc_dmabuf *prsp, +lpfc_plogi_confirm_nport(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, struct lpfc_nodelist *ndlp) { struct lpfc_nodelist *new_ndlp; + struct lpfc_dmabuf *pcmd, *prsp; uint32_t *lp; struct serv_parm *sp; uint8_t name[sizeof (struct lpfc_name)]; uint32_t rc; + pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; + prsp = (struct lpfc_dmabuf *) pcmd->list.next; lp = (uint32_t *) prsp->virt; sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); - memset(name, 0, sizeof (struct lpfc_name)); /* Now we to find out if the NPort we are logging into, matches the WWPN * we have for that ndlp. If not, we have some work to do. */ new_ndlp = lpfc_findnode_wwpn(phba, NLP_SEARCH_ALL, &sp->portName); - if (new_ndlp == ndlp) + memset(name, 0, sizeof (struct lpfc_name)); + rc = memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)); + if (!rc || (new_ndlp == ndlp)) { return ndlp; + } if (!new_ndlp) { - rc = - memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)); - if (!rc) - return ndlp; new_ndlp = mempool_alloc(phba->nlp_mem_pool, GFP_ATOMIC); if (!new_ndlp) return ndlp; @@ -682,21 +683,17 @@ lpfc_plogi_confirm_nport(struct lpfc_hba * phba, struct lpfc_dmabuf *prsp, } lpfc_unreg_rpi(phba, new_ndlp); + new_ndlp->nlp_prev_state = ndlp->nlp_state; new_ndlp->nlp_DID = ndlp->nlp_DID; - new_ndlp->nlp_prev_state = ndlp->nlp_prev_state; - new_ndlp->nlp_state = ndlp->nlp_state; - lpfc_nlp_list(phba, new_ndlp, ndlp->nlp_flag & NLP_LIST_MASK); + new_ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; + lpfc_nlp_list(phba, new_ndlp, NLP_PLOGI_LIST); /* Move this back to NPR list */ - if (memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)) == 0) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); - } - else { - lpfc_unreg_rpi(phba, ndlp); - ndlp->nlp_DID = 0; /* Two ndlps cannot have the same did */ - ndlp->nlp_state = NLP_STE_NPR_NODE; - lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); - } + lpfc_unreg_rpi(phba, ndlp); + ndlp->nlp_DID = 0; /* Two ndlps cannot have the same did */ + ndlp->nlp_state = NLP_STE_NPR_NODE; + lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); + return new_ndlp; } @@ -706,7 +703,6 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, { IOCB_t *irsp; struct lpfc_nodelist *ndlp; - struct lpfc_dmabuf *prsp; int disc, rc, did, type; @@ -773,10 +769,7 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, } } else { /* Good status, call state machine */ - prsp = list_entry(((struct lpfc_dmabuf *) - cmdiocb->context2)->list.next, - struct lpfc_dmabuf, list); - ndlp = lpfc_plogi_confirm_nport(phba, prsp, ndlp); + ndlp = lpfc_plogi_confirm_nport(phba, cmdiocb, ndlp); rc = lpfc_disc_state_machine(phba, ndlp, cmdiocb, NLP_EVT_CMPL_PLOGI); } @@ -828,7 +821,7 @@ lpfc_issue_els_plogi(struct lpfc_hba * phba, uint32_t did, uint8_t retry) pring = &psli->ring[LPFC_ELS_RING]; /* ELS ring */ cmdsize = (sizeof (uint32_t) + sizeof (struct serv_parm)); - elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, NULL, did, + elsiocb = lpfc_prep_els_iocb(phba, 1, cmdsize, retry, 0, did, ELS_CMD_PLOGI); if (!elsiocb) return 1; @@ -1848,12 +1841,9 @@ static void lpfc_cmpl_els_acc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, struct lpfc_iocbq * rspiocb) { - IOCB_t *irsp; struct lpfc_nodelist *ndlp; LPFC_MBOXQ_t *mbox = NULL; - irsp = &rspiocb->iocb; - ndlp = (struct lpfc_nodelist *) cmdiocb->context1; if (cmdiocb->context_un.mbox) mbox = cmdiocb->context_un.mbox; @@ -1896,15 +1886,9 @@ lpfc_cmpl_els_acc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, mempool_free( mbox, phba->mbox_mem_pool); } else { mempool_free( mbox, phba->mbox_mem_pool); - /* Do not call NO_LIST for lpfc_els_abort'ed ELS cmds */ - if (!((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) && - ((irsp->un.ulpWord[4] == IOERR_SLI_ABORTED) || - (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || - (irsp->un.ulpWord[4] == IOERR_SLI_DOWN)))) { - if (ndlp->nlp_flag & NLP_ACC_REGLOGIN) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); - ndlp = NULL; - } + if (ndlp->nlp_flag & NLP_ACC_REGLOGIN) { + lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + ndlp = NULL; } } } @@ -2807,8 +2791,8 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) ndlp = (struct lpfc_nodelist *) pmb->context2; xri = (uint16_t) ((unsigned long)(pmb->context1)); - pmb->context1 = NULL; - pmb->context2 = NULL; + pmb->context1 = 0; + pmb->context2 = 0; if (mb->mbxStatus) { mempool_free( pmb, phba->mbox_mem_pool); @@ -2848,7 +2832,7 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) /* Xmit ELS RPS ACC response tag */ lpfc_printf_log(phba, KERN_INFO, LOG_ELS, - "%d:0118 Xmit ELS RPS ACC response tag x%x " + "%d:0128 Xmit ELS RPS ACC response tag x%x " "Data: x%x x%x x%x x%x x%x\n", phba->brd_no, elsiocb->iocb.ulpIoTag, @@ -2957,7 +2941,7 @@ lpfc_els_rsp_rpl_acc(struct lpfc_hba * phba, uint16_t cmdsize, /* Xmit ELS RPL ACC response tag */ lpfc_printf_log(phba, KERN_INFO, LOG_ELS, - "%d:0120 Xmit ELS RPL ACC response tag x%x " + "%d:0128 Xmit ELS RPL ACC response tag x%x " "Data: x%x x%x x%x x%x x%x\n", phba->brd_no, elsiocb->iocb.ulpIoTag, @@ -3118,7 +3102,7 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, struct lpfc_nodelist *ndlp, *next_ndlp; /* FAN received */ - lpfc_printf_log(phba, KERN_INFO, LOG_ELS, "%d:0265 FAN received\n", + lpfc_printf_log(phba, KERN_INFO, LOG_ELS, "%d:265 FAN received\n", phba->brd_no); icmd = &cmdiocb->iocb; @@ -3298,9 +3282,10 @@ lpfc_els_timeout_handler(struct lpfc_hba *phba) } else lpfc_sli_release_iocbq(phba, piocb); } - if (phba->sli.ring[LPFC_ELS_RING].txcmplq_cnt) - mod_timer(&phba->els_tmofunc, jiffies + HZ * timeout); - + if (phba->sli.ring[LPFC_ELS_RING].txcmplq_cnt) { + phba->els_tmofunc.expires = jiffies + HZ * timeout; + add_timer(&phba->els_tmofunc); + } spin_unlock_irq(phba->host->host_lock); } @@ -3457,8 +3442,6 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, if ((did & Fabric_DID_MASK) == Fabric_DID_MASK) { ndlp->nlp_type |= NLP_FABRIC; } - ndlp->nlp_state = NLP_STE_UNUSED_NODE; - lpfc_nlp_list(phba, ndlp, NLP_UNUSED_LIST); } phba->fc_stat.elsRcvFrame++; @@ -3480,14 +3463,13 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, rjt_err = 1; break; } - ndlp = lpfc_plogi_confirm_nport(phba, mp, ndlp); lpfc_disc_state_machine(phba, ndlp, elsiocb, NLP_EVT_RCV_PLOGI); break; case ELS_CMD_FLOGI: phba->fc_stat.elsRcvFLOGI++; lpfc_els_rcv_flogi(phba, elsiocb, ndlp, newnode); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; case ELS_CMD_LOGO: @@ -3510,7 +3492,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, phba->fc_stat.elsRcvRSCN++; lpfc_els_rcv_rscn(phba, elsiocb, ndlp, newnode); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; case ELS_CMD_ADISC: @@ -3553,28 +3535,28 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, phba->fc_stat.elsRcvLIRR++; lpfc_els_rcv_lirr(phba, elsiocb, ndlp); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; case ELS_CMD_RPS: phba->fc_stat.elsRcvRPS++; lpfc_els_rcv_rps(phba, elsiocb, ndlp); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; case ELS_CMD_RPL: phba->fc_stat.elsRcvRPL++; lpfc_els_rcv_rpl(phba, elsiocb, ndlp); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; case ELS_CMD_RNID: phba->fc_stat.elsRcvRNID++; lpfc_els_rcv_rnid(phba, elsiocb, ndlp); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; default: @@ -3586,7 +3568,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, "%d:0115 Unknown ELS command x%x received from " "NPORT x%x\n", phba->brd_no, cmd, did); if (newnode) { - lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); + mempool_free( ndlp, phba->nlp_mem_pool); } break; } diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index b2f1552f1..adb086009 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1084,7 +1084,7 @@ lpfc_register_remote_port(struct lpfc_hba * phba, fc_remote_port_rolechg(rport, rport_ids.roles); if ((rport->scsi_target_id != -1) && - (rport->scsi_target_id < LPFC_MAX_TARGET)) { + (rport->scsi_target_id < MAX_FCP_TARGET)) { ndlp->nlp_sid = rport->scsi_target_id; } @@ -1313,7 +1313,7 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) if ((rport_add == mapped) && ((!nlp->rport) || (nlp->rport->scsi_target_id == -1) || - (nlp->rport->scsi_target_id >= LPFC_MAX_TARGET))) { + (nlp->rport->scsi_target_id >= MAX_FCP_TARGET))) { nlp->nlp_state = NLP_STE_UNMAPPED_NODE; spin_lock_irq(phba->host->host_lock); nlp->nlp_flag |= NLP_TGT_NO_SCSIID; @@ -1557,8 +1557,6 @@ lpfc_freenode(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) mb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; } } - - spin_lock_irq(phba->host->host_lock); list_for_each_entry_safe(mb, nextmb, &phba->sli.mboxq, list) { if ((mb->mb.mbxCommand == MBX_REG_LOGIN64) && (ndlp == (struct lpfc_nodelist *) mb->context2)) { @@ -1571,7 +1569,6 @@ lpfc_freenode(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) mempool_free(mb, phba->mbox_mem_pool); } } - spin_unlock_irq(phba->host->host_lock); lpfc_els_abort(phba,ndlp,0); spin_lock_irq(phba->host->host_lock); @@ -1785,7 +1782,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) /* LOG change to REGLOGIN */ /* FIND node DID reglogin */ lpfc_printf_log(phba, KERN_INFO, LOG_NODE, - "%d:0901 FIND node DID reglogin" + "%d:0931 FIND node DID reglogin" " Data: x%p x%x x%x x%x\n", phba->brd_no, ndlp, ndlp->nlp_DID, @@ -1808,7 +1805,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) /* LOG change to PRLI */ /* FIND node DID prli */ lpfc_printf_log(phba, KERN_INFO, LOG_NODE, - "%d:0902 FIND node DID prli " + "%d:0931 FIND node DID prli " "Data: x%p x%x x%x x%x\n", phba->brd_no, ndlp, ndlp->nlp_DID, @@ -1831,7 +1828,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) /* LOG change to NPR */ /* FIND node DID npr */ lpfc_printf_log(phba, KERN_INFO, LOG_NODE, - "%d:0903 FIND node DID npr " + "%d:0931 FIND node DID npr " "Data: x%p x%x x%x x%x\n", phba->brd_no, ndlp, ndlp->nlp_DID, @@ -1854,7 +1851,7 @@ lpfc_findnode_did(struct lpfc_hba * phba, uint32_t order, uint32_t did) /* LOG change to UNUSED */ /* FIND node DID unused */ lpfc_printf_log(phba, KERN_INFO, LOG_NODE, - "%d:0905 FIND node DID unused " + "%d:0931 FIND node DID unused " "Data: x%p x%x x%x x%x\n", phba->brd_no, ndlp, ndlp->nlp_DID, @@ -2338,7 +2335,7 @@ lpfc_disc_timeout_handler(struct lpfc_hba *phba) initlinkmbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!initlinkmbox) { lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, - "%d:0206 Device Discovery " + "%d:0226 Device Discovery " "completion error\n", phba->brd_no); phba->hba_state = LPFC_HBA_ERROR; @@ -2368,7 +2365,7 @@ lpfc_disc_timeout_handler(struct lpfc_hba *phba) if (!clearlambox) { clrlaerr = 1; lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, - "%d:0207 Device Discovery " + "%d:0226 Device Discovery " "completion error\n", phba->brd_no); phba->hba_state = LPFC_HBA_ERROR; diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index f6948ffe6..908d0f277 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -71,7 +71,6 @@ lpfc_config_port_prep(struct lpfc_hba * phba) uint16_t offset = 0; static char licensed[56] = "key unlock for use with gnu public licensed code only\0"; - static int init_key = 1; pmb = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); if (!pmb) { @@ -83,13 +82,10 @@ lpfc_config_port_prep(struct lpfc_hba * phba) phba->hba_state = LPFC_INIT_MBX_CMDS; if (lpfc_is_LC_HBA(phba->pcidev->device)) { - if (init_key) { - uint32_t *ptext = (uint32_t *) licensed; + uint32_t *ptext = (uint32_t *) licensed; - for (i = 0; i < 56; i += sizeof (uint32_t), ptext++) - *ptext = cpu_to_be32(*ptext); - init_key = 0; - } + for (i = 0; i < 56; i += sizeof (uint32_t), ptext++) + *ptext = cpu_to_be32(*ptext); lpfc_read_nv(phba, pmb); memset((char*)mb->un.varRDnvp.rsvd3, 0, @@ -409,26 +405,19 @@ lpfc_config_port_post(struct lpfc_hba * phba) } /* MBOX buffer will be freed in mbox compl */ - return (0); -} - -static int -lpfc_discovery_wait(struct lpfc_hba *phba) -{ - int i = 0; - + i = 0; while ((phba->hba_state != LPFC_HBA_READY) || (phba->num_disc_nodes) || (phba->fc_prli_sent) || ((phba->fc_map_cnt == 0) && (i<2)) || - (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE)) { + (psli->sli_flag & LPFC_SLI_MBOX_ACTIVE)) { /* Check every second for 30 retries. */ i++; if (i > 30) { - return -ETIMEDOUT; + break; } if ((i >= 15) && (phba->hba_state <= LPFC_LINK_DOWN)) { /* The link is down. Set linkdown timeout */ - return -ETIMEDOUT; + break; } /* Delay for 1 second to give discovery time to complete. */ @@ -436,7 +425,12 @@ lpfc_discovery_wait(struct lpfc_hba *phba) } - return 0; + /* Since num_disc_nodes keys off of PLOGI, delay a bit to let + * any potential PRLIs to flush thru the SLI sub-system. + */ + msleep(50); + + return (0); } /************************************************************************/ @@ -945,12 +939,12 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) "10-port ", "PCIe"}; break; default: - m = (typeof(m)){ NULL }; + m = (typeof(m)){ 0 }; break; } break; default: - m = (typeof(m)){ NULL }; + m = (typeof(m)){ 0 }; break; } @@ -1345,8 +1339,7 @@ lpfc_offline(struct lpfc_hba * phba) struct lpfc_sli_ring *pring; struct lpfc_sli *psli; unsigned long iflag; - int i; - int cnt = 0; + int i = 0; if (!phba) return 0; @@ -1355,31 +1348,20 @@ lpfc_offline(struct lpfc_hba * phba) return 0; psli = &phba->sli; + pring = &psli->ring[psli->fcp_ring]; lpfc_linkdown(phba); - lpfc_sli_flush_mbox_queue(phba); - for (i = 0; i < psli->num_rings; i++) { - pring = &psli->ring[i]; - /* The linkdown event takes 30 seconds to timeout. */ - while (pring->txcmplq_cnt) { - mdelay(10); - if (cnt++ > 3000) { - lpfc_printf_log(phba, - KERN_WARNING, LOG_INIT, - "%d:0466 Outstanding IO when " - "bringing Adapter offline\n", - phba->brd_no); - break; - } - } + /* The linkdown event takes 30 seconds to timeout. */ + while (pring->txcmplq_cnt) { + mdelay(10); + if (i++ > 3000) + break; } - /* stop all timers associated with this hba */ lpfc_stop_timer(phba); phba->work_hba_events = 0; - phba->work_ha = 0; lpfc_printf_log(phba, KERN_WARNING, @@ -1469,6 +1451,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) goto out_put_host; host->unique_id = phba->brd_no; + init_MUTEX(&phba->hba_can_block); INIT_LIST_HEAD(&phba->ctrspbuflist); INIT_LIST_HEAD(&phba->rnidrspbuflist); INIT_LIST_HEAD(&phba->freebufList); @@ -1617,11 +1600,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) goto out_free_iocbq; } - /* - * Set initial can_queue value since 0 is no longer supported and - * scsi_add_host will fail. This will be adjusted later based on the - * max xri value determined in hba setup. - */ + /* We can rely on a queue depth attribute only after SLI HBA setup */ host->can_queue = phba->cfg_hba_queue_depth - 10; /* Tell the midlayer we support 16 byte commands */ @@ -1641,7 +1620,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) if (error) goto out_remove_host; - error = request_irq(phba->pcidev->irq, lpfc_intr_handler, IRQF_SHARED, + error = request_irq(phba->pcidev->irq, lpfc_intr_handler, SA_SHIRQ, LPFC_DRIVER_NAME, phba); if (error) { lpfc_printf_log(phba, KERN_ERR, LOG_INIT, @@ -1661,14 +1640,6 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) goto out_free_irq; } - /* - * hba setup may have changed the hba_queue_depth so we need to adjust - * the value of can_queue. - */ - host->can_queue = phba->cfg_hba_queue_depth - 10; - - lpfc_discovery_wait(phba); - if (phba->cfg_poll & DISABLE_FCP_RING_INT) { spin_lock_irq(phba->host->host_lock); lpfc_poll_start_timer(phba); diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 4d016c2a1..e42f22aaf 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c @@ -651,19 +651,3 @@ lpfc_mbox_get(struct lpfc_hba * phba) return mbq; } - -int -lpfc_mbox_tmo_val(struct lpfc_hba *phba, int cmd) -{ - switch (cmd) { - case MBX_WRITE_NV: /* 0x03 */ - case MBX_UPDATE_CFG: /* 0x1B */ - case MBX_DOWN_LOAD: /* 0x1C */ - case MBX_DEL_LD_ENTRY: /* 0x1D */ - case MBX_LOAD_AREA: /* 0x81 */ - case MBX_FLASH_WR_ULA: /* 0x98 */ - case MBX_LOAD_EXP_ROM: /* 0x9C */ - return LPFC_MBOX_TMO_FLASH_CMD; - } - return LPFC_MBOX_TMO; -} diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 066292d39..07017658a 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c @@ -133,11 +133,6 @@ lpfc_mem_free(struct lpfc_hba * phba) pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool); pci_pool_destroy(phba->lpfc_mbuf_pool); - - /* Free the iocb lookup array */ - kfree(psli->iocbq_lookup); - psli->iocbq_lookup = NULL; - } void * diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 20449a8dd..27d60ad89 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -179,7 +179,7 @@ lpfc_els_abort(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, /* Abort outstanding I/O on NPort */ lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, - "%d:0205 Abort outstanding I/O on NPort x%x " + "%d:0201 Abort outstanding I/O on NPort x%x " "Data: x%x x%x x%x\n", phba->brd_no, ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); @@ -393,20 +393,6 @@ lpfc_rcv_plogi(struct lpfc_hba * phba, mbox->context2 = ndlp; ndlp->nlp_flag |= (NLP_ACC_REGLOGIN | NLP_RCV_PLOGI); - /* - * If there is an outstanding PLOGI issued, abort it before - * sending ACC rsp for received PLOGI. If pending plogi - * is not canceled here, the plogi will be rejected by - * remote port and will be retried. On a configuration with - * single discovery thread, this will cause a huge delay in - * discovery. Also this will cause multiple state machines - * running in parallel for this node. - */ - if (ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) { - /* software abort outstanding PLOGI */ - lpfc_els_abort(phba, ndlp, 1); - } - lpfc_els_rsp_acc(phba, ELS_CMD_PLOGI, cmdiocb, ndlp, mbox, 0); return 1; @@ -1124,17 +1110,6 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_hba * phba, phba->brd_no, did, mb->mbxStatus, phba->hba_state); - /* - * If RegLogin failed due to lack of HBA resources do not - * retry discovery. - */ - if (mb->mbxStatus == MBXERR_RPI_FULL) { - ndlp->nlp_prev_state = NLP_STE_UNUSED_NODE; - ndlp->nlp_state = NLP_STE_UNUSED_NODE; - lpfc_nlp_list(phba, ndlp, NLP_UNUSED_LIST); - return ndlp->nlp_state; - } - /* Put ndlp in npr list set plogi timer for 1 sec */ mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); spin_lock_irq(phba->host->host_lock); @@ -1615,13 +1590,7 @@ lpfc_rcv_padisc_npr_node(struct lpfc_hba * phba, lpfc_rcv_padisc(phba, ndlp, cmdiocb); - /* - * Do not start discovery if discovery is about to start - * or discovery in progress for this node. Starting discovery - * here will affect the counting of discovery threads. - */ - if ((!(ndlp->nlp_flag & NLP_DELAY_TMO)) && - (ndlp->nlp_flag & NLP_NPR_2B_DISC)){ + if (!(ndlp->nlp_flag & NLP_DELAY_TMO)) { if (ndlp->nlp_flag & NLP_NPR_ADISC) { ndlp->nlp_prev_state = NLP_STE_NPR_NODE; ndlp->nlp_state = NLP_STE_ADISC_ISSUE; diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index a8816a873..7dc4c2e6b 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -21,7 +21,6 @@ #include #include -#include #include #include @@ -42,6 +41,20 @@ #define LPFC_ABORT_WAIT 2 +static inline void +lpfc_block_requests(struct lpfc_hba * phba) +{ + down(&phba->hba_can_block); + scsi_block_requests(phba->host); +} + +static inline void +lpfc_unblock_requests(struct lpfc_hba * phba) +{ + scsi_unblock_requests(phba->host); + up(&phba->hba_can_block); +} + /* * This routine allocates a scsi buffer, which contains all the necessary * information needed to initiate a SCSI I/O. The non-DMAable buffer region @@ -154,6 +167,22 @@ static void lpfc_release_scsi_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * psb) { unsigned long iflag = 0; + /* + * There are only two special cases to consider. (1) the scsi command + * requested scatter-gather usage or (2) the scsi command allocated + * a request buffer, but did not request use_sg. There is a third + * case, but it does not require resource deallocation. + */ + if ((psb->seg_cnt > 0) && (psb->pCmd->use_sg)) { + dma_unmap_sg(&phba->pcidev->dev, psb->pCmd->request_buffer, + psb->seg_cnt, psb->pCmd->sc_data_direction); + } else { + if ((psb->nonsg_phys) && (psb->pCmd->request_bufflen)) { + dma_unmap_single(&phba->pcidev->dev, psb->nonsg_phys, + psb->pCmd->request_bufflen, + psb->pCmd->sc_data_direction); + } + } spin_lock_irqsave(&phba->scsi_buf_list_lock, iflag); psb->pCmd = NULL; @@ -266,27 +295,6 @@ lpfc_scsi_prep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd) return 0; } -static void -lpfc_scsi_unprep_dma_buf(struct lpfc_hba * phba, struct lpfc_scsi_buf * psb) -{ - /* - * There are only two special cases to consider. (1) the scsi command - * requested scatter-gather usage or (2) the scsi command allocated - * a request buffer, but did not request use_sg. There is a third - * case, but it does not require resource deallocation. - */ - if ((psb->seg_cnt > 0) && (psb->pCmd->use_sg)) { - dma_unmap_sg(&phba->pcidev->dev, psb->pCmd->request_buffer, - psb->seg_cnt, psb->pCmd->sc_data_direction); - } else { - if ((psb->nonsg_phys) && (psb->pCmd->request_bufflen)) { - dma_unmap_single(&phba->pcidev->dev, psb->nonsg_phys, - psb->pCmd->request_bufflen, - psb->pCmd->sc_data_direction); - } - } -} - static void lpfc_handle_fcp_err(struct lpfc_scsi_buf *lpfc_cmd) { @@ -460,7 +468,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, cmd->scsi_done(cmd); if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { - lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); lpfc_release_scsi_buf(phba, lpfc_cmd); return; } @@ -518,7 +525,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, } } - lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); lpfc_release_scsi_buf(phba, lpfc_cmd); } @@ -617,7 +623,6 @@ lpfc_scsi_prep_cmnd(struct lpfc_hba * phba, struct lpfc_scsi_buf * lpfc_cmd, static int lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd, - unsigned int lun, uint8_t task_mgmt_cmd) { struct lpfc_sli *psli; @@ -636,7 +641,8 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_hba *phba, piocb = &piocbq->iocb; fcp_cmnd = lpfc_cmd->fcp_cmnd; - int_to_scsilun(lun, &lpfc_cmd->fcp_cmnd->fcp_lun); + int_to_scsilun(lpfc_cmd->pCmd->device->lun, + &lpfc_cmd->fcp_cmnd->fcp_lun); fcp_cmnd->fcpCntl2 = task_mgmt_cmd; piocb->ulpCommand = CMD_FCP_ICMND64_CR; @@ -663,16 +669,14 @@ lpfc_scsi_prep_task_mgmt_cmd(struct lpfc_hba *phba, static int lpfc_scsi_tgt_reset(struct lpfc_scsi_buf * lpfc_cmd, struct lpfc_hba * phba, - unsigned tgt_id, unsigned int lun, - struct lpfc_rport_data *rdata) + unsigned tgt_id, struct lpfc_rport_data *rdata) { struct lpfc_iocbq *iocbq; struct lpfc_iocbq *iocbqrsp; int ret; lpfc_cmd->rdata = rdata; - ret = lpfc_scsi_prep_task_mgmt_cmd(phba, lpfc_cmd, lun, - FCP_TARGET_RESET); + ret = lpfc_scsi_prep_task_mgmt_cmd(phba, lpfc_cmd, FCP_TARGET_RESET); if (!ret) return FAILED; @@ -832,7 +836,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) return 0; out_host_busy_free_buf: - lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); lpfc_release_scsi_buf(phba, lpfc_cmd); out_host_busy: return SCSI_MLQUEUE_HOST_BUSY; @@ -842,21 +845,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) return 0; } -static void -lpfc_block_error_handler(struct scsi_cmnd *cmnd) -{ - struct Scsi_Host *shost = cmnd->device->host; - struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); - - spin_lock_irq(shost->host_lock); - while (rport->port_state == FC_PORTSTATE_BLOCKED) { - spin_unlock_irq(shost->host_lock); - msleep(1000); - spin_lock_irq(shost->host_lock); - } - spin_unlock_irq(shost->host_lock); - return; -} static int lpfc_abort_handler(struct scsi_cmnd *cmnd) @@ -871,7 +859,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) unsigned int loop_count = 0; int ret = SUCCESS; - lpfc_block_error_handler(cmnd); + lpfc_block_requests(phba); spin_lock_irq(shost->host_lock); lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; @@ -957,6 +945,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) cmnd->device->lun, cmnd->serial_number); spin_unlock_irq(shost->host_lock); + lpfc_unblock_requests(phba); return ret; } @@ -974,7 +963,7 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) int ret = FAILED; int cnt, loopcnt; - lpfc_block_error_handler(cmnd); + lpfc_block_requests(phba); spin_lock_irq(shost->host_lock); /* * If target is not in a MAPPED state, delay the reset until @@ -997,12 +986,12 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) if (lpfc_cmd == NULL) goto out; + lpfc_cmd->pCmd = cmnd; lpfc_cmd->timeout = 60; lpfc_cmd->scsi_hba = phba; lpfc_cmd->rdata = rdata; - ret = lpfc_scsi_prep_task_mgmt_cmd(phba, lpfc_cmd, cmnd->device->lun, - FCP_LUN_RESET); + ret = lpfc_scsi_prep_task_mgmt_cmd(phba, lpfc_cmd, FCP_LUN_RESET); if (!ret) goto out_free_scsi_buf; @@ -1029,6 +1018,7 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) cmd_status = iocbqrsp->iocb.ulpStatus; lpfc_sli_release_iocbq(phba, iocbqrsp); + lpfc_release_scsi_buf(phba, lpfc_cmd); /* * All outstanding txcmplq I/Os should have been aborted by the device. @@ -1067,8 +1057,6 @@ lpfc_reset_lun_handler(struct scsi_cmnd *cmnd) } out_free_scsi_buf: - lpfc_release_scsi_buf(phba, lpfc_cmd); - lpfc_printf_log(phba, KERN_ERR, LOG_FCP, "%d:0713 SCSI layer issued LUN reset (%d, %d) " "Data: x%x x%x x%x\n", @@ -1077,6 +1065,7 @@ out_free_scsi_buf: out: spin_unlock_irq(shost->host_lock); + lpfc_unblock_requests(phba); return ret; } @@ -1091,7 +1080,7 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) int cnt, loopcnt; struct lpfc_scsi_buf * lpfc_cmd; - lpfc_block_error_handler(cmnd); + lpfc_block_requests(phba); spin_lock_irq(shost->host_lock); lpfc_cmd = lpfc_get_scsi_buf(phba); @@ -1100,6 +1089,7 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) /* The lpfc_cmd storage is reused. Set all loop invariants. */ lpfc_cmd->timeout = 60; + lpfc_cmd->pCmd = cmnd; lpfc_cmd->scsi_hba = phba; /* @@ -1107,7 +1097,7 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) * targets known to the driver. Should any target reset * fail, this routine returns failure to the midlayer. */ - for (i = 0; i < LPFC_MAX_TARGET; i++) { + for (i = 0; i < MAX_FCP_TARGET; i++) { /* Search the mapped list for this target ID */ match = 0; list_for_each_entry(ndlp, &phba->fc_nlpmap_list, nlp_listp) { @@ -1119,11 +1109,11 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) if (!match) continue; - ret = lpfc_scsi_tgt_reset(lpfc_cmd, phba, i, cmnd->device->lun, - ndlp->rport->dd_data); + ret = lpfc_scsi_tgt_reset(lpfc_cmd, phba, + i, ndlp->rport->dd_data); if (ret != SUCCESS) { lpfc_printf_log(phba, KERN_ERR, LOG_FCP, - "%d:0700 Bus Reset on target %d failed\n", + "%d:0713 Bus Reset on target %d failed\n", phba->brd_no, i); err_count++; } @@ -1173,6 +1163,7 @@ lpfc_reset_bus_handler(struct scsi_cmnd *cmnd) phba->brd_no, ret); out: spin_unlock_irq(shost->host_lock); + lpfc_unblock_requests(phba); return ret; } diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 70f4d5a13..bb69a7a1e 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -191,12 +191,35 @@ static int lpfc_sli_ringtxcmpl_put(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, struct lpfc_iocbq * piocb) { + uint16_t iotag; + list_add_tail(&piocb->list, &pring->txcmplq); pring->txcmplq_cnt++; if (unlikely(pring->ringno == LPFC_ELS_RING)) mod_timer(&phba->els_tmofunc, jiffies + HZ * (phba->fc_ratov << 1)); + if (pring->fast_lookup) { + /* Setup fast lookup based on iotag for completion */ + iotag = piocb->iocb.ulpIoTag; + if (iotag && (iotag < pring->fast_iotag)) + *(pring->fast_lookup + iotag) = piocb; + else { + + /* Cmd ring put: iotag greater then + configured max wd0 */ + lpfc_printf_log(phba, + KERN_ERR, + LOG_SLI, + "%d:0316 Cmd ring %d put: iotag x%x " + "greater then configured max x%x " + "wd0 x%x\n", + phba->brd_no, + pring->ringno, iotag, + pring->fast_iotag, + *(((uint32_t *)(&piocb->iocb)) + 7)); + } + } return (0); } @@ -320,8 +343,7 @@ lpfc_sli_next_iotag(struct lpfc_hba * phba, struct lpfc_iocbq * iocbq) kfree(old_arr); return iotag; } - } else - spin_unlock_irq(phba->host->host_lock); + } lpfc_printf_log(phba, KERN_ERR,LOG_SLI, "%d:0318 Failed to allocate IOTAG.last IOTAG is %d\n", @@ -579,7 +601,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba * phba) /* Stray Mailbox Interrupt, mbxCommand mbxStatus */ lpfc_printf_log(phba, - KERN_WARNING, + KERN_ERR, LOG_MBOX | LOG_SLI, "%d:0304 Stray Mailbox Interrupt " "mbxCommand x%x mbxStatus x%x\n", @@ -970,11 +992,9 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_hba * phba) * resources need to be recovered. */ if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { - lpfc_printf_log(phba, KERN_INFO, LOG_SLI, - "%d:0314 IOCB cmd 0x%x" - " processed. Skipping" - " completion", phba->brd_no, - irsp->ulpCommand); + printk(KERN_INFO "%s: IOCB cmd 0x%x processed." + " Skipping completion\n", __FUNCTION__, + irsp->ulpCommand); break; } @@ -1107,7 +1127,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, if (unlikely(irsp->ulpStatus)) { /* Rsp ring error: IOCB */ lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, - "%d:0336 Rsp Ring %d error: IOCB Data: " + "%d:0326 Rsp Ring %d error: IOCB Data: " "x%x x%x x%x x%x x%x x%x x%x x%x\n", phba->brd_no, pring->ringno, irsp->un.ulpWord[0], irsp->un.ulpWord[1], @@ -1125,11 +1145,9 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, * resources need to be recovered. */ if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { - lpfc_printf_log(phba, KERN_INFO, LOG_SLI, - "%d:0333 IOCB cmd 0x%x" - " processed. Skipping" - " completion\n", phba->brd_no, - irsp->ulpCommand); + printk(KERN_INFO "%s: IOCB cmd 0x%x processed. " + "Skipping completion\n", __FUNCTION__, + irsp->ulpCommand); break; } @@ -1160,7 +1178,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba, } else { /* Unknown IOCB command */ lpfc_printf_log(phba, KERN_ERR, LOG_SLI, - "%d:0334 Unknown IOCB command " + "%d:0321 Unknown IOCB command " "Data: x%x, x%x x%x x%x x%x\n", phba->brd_no, type, irsp->ulpCommand, irsp->ulpStatus, irsp->ulpIoTag, @@ -1243,7 +1261,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba, lpfc_printf_log(phba, KERN_ERR, LOG_SLI, - "%d:0303 Ring %d handler: portRspPut %d " + "%d:0312 Ring %d handler: portRspPut %d " "is bigger then rsp ring %d\n", phba->brd_no, pring->ringno, portRspPut, portRspMax); @@ -1388,7 +1406,7 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba, lpfc_printf_log(phba, KERN_ERR, LOG_SLI, - "%d:0335 Unknown IOCB command " + "%d:0321 Unknown IOCB command " "Data: x%x x%x x%x x%x\n", phba->brd_no, irsp->ulpCommand, @@ -1404,11 +1422,11 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba * phba, next_iocb, &saveq->list, list) { - list_del(&rspiocbp->list); lpfc_sli_release_iocbq(phba, rspiocbp); } } + lpfc_sli_release_iocbq(phba, saveq); } } @@ -1552,8 +1570,8 @@ lpfc_sli_brdready(struct lpfc_hba * phba, uint32_t mask) void lpfc_reset_barrier(struct lpfc_hba * phba) { - uint32_t __iomem *resp_buf; - uint32_t __iomem *mbox_buf; + uint32_t * resp_buf; + uint32_t * mbox_buf; volatile uint32_t mbox; uint32_t hc_copy; int i; @@ -1569,7 +1587,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba) * Tell the other part of the chip to suspend temporarily all * its DMA activity. */ - resp_buf = phba->MBslimaddr; + resp_buf = (uint32_t *)phba->MBslimaddr; /* Disable the error attention */ hc_copy = readl(phba->HCregaddr); @@ -1587,7 +1605,7 @@ void lpfc_reset_barrier(struct lpfc_hba * phba) ((MAILBOX_t *)&mbox)->mbxOwner = OWN_CHIP; writel(BARRIER_TEST_PATTERN, (resp_buf + 1)); - mbox_buf = phba->MBslimaddr; + mbox_buf = (uint32_t *)phba->MBslimaddr; writel(mbox, mbox_buf); for (i = 0; @@ -1716,13 +1734,15 @@ lpfc_sli_brdreset(struct lpfc_hba * phba) phba->fc_myDID = 0; phba->fc_prevDID = 0; + psli->sli_flag = 0; + /* Turn off parity checking and serr during the physical reset */ pci_read_config_word(phba->pcidev, PCI_COMMAND, &cfg_value); pci_write_config_word(phba->pcidev, PCI_COMMAND, (cfg_value & ~(PCI_COMMAND_PARITY | PCI_COMMAND_SERR))); - psli->sli_flag &= ~(LPFC_SLI2_ACTIVE | LPFC_PROCESS_LA); + psli->sli_flag &= ~LPFC_SLI2_ACTIVE; /* Now toggle INITFF bit in the Host Control Register */ writel(HC_INITFF, phba->HCregaddr); mdelay(1); @@ -1763,7 +1783,7 @@ lpfc_sli_brdrestart(struct lpfc_hba * phba) /* Restart HBA */ lpfc_printf_log(phba, KERN_INFO, LOG_SLI, - "%d:0337 Restart HBA Data: x%x x%x\n", phba->brd_no, + "%d:0328 Restart HBA Data: x%x x%x\n", phba->brd_no, phba->hba_state, psli->sli_flag); word0 = 0; @@ -1785,7 +1805,7 @@ lpfc_sli_brdrestart(struct lpfc_hba * phba) skip_post = 0; word0 = 0; /* This is really setting up word1 */ } - to_slim = phba->MBslimaddr + sizeof (uint32_t); + to_slim = (uint8_t *) phba->MBslimaddr + sizeof (uint32_t); writel(*(uint32_t *) mb, to_slim); readl(to_slim); /* flush */ @@ -1795,9 +1815,6 @@ lpfc_sli_brdrestart(struct lpfc_hba * phba) spin_unlock_irq(phba->host->host_lock); - memset(&psli->lnk_stat_offsets, 0, sizeof(psli->lnk_stat_offsets)); - psli->stats_start = get_seconds(); - if (skip_post) mdelay(100); else @@ -1908,9 +1925,6 @@ lpfc_sli_hba_setup(struct lpfc_hba * phba) } while (resetcount < 2 && !done) { - spin_lock_irq(phba->host->host_lock); - phba->sli.sli_flag |= LPFC_SLI_MBOX_ACTIVE; - spin_unlock_irq(phba->host->host_lock); phba->hba_state = LPFC_STATE_UNKNOWN; lpfc_sli_brdrestart(phba); msleep(2500); @@ -1918,9 +1932,6 @@ lpfc_sli_hba_setup(struct lpfc_hba * phba) if (rc) break; - spin_lock_irq(phba->host->host_lock); - phba->sli.sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; - spin_unlock_irq(phba->host->host_lock); resetcount++; /* Call pre CONFIG_PORT mailbox command initialization. A value of 0 @@ -2206,8 +2217,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) return (MBX_NOT_FINISHED); } /* timeout active mbox command */ - mod_timer(&psli->mbox_tmo, (jiffies + - (HZ * lpfc_mbox_tmo_val(phba, mb->mbxCommand)))); + mod_timer(&psli->mbox_tmo, jiffies + HZ * LPFC_MBOX_TMO); } /* Mailbox cmd issue */ @@ -2267,6 +2277,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) break; case MBX_POLL: + i = 0; psli->mbox_active = NULL; if (psli->sli_flag & LPFC_SLI2_ACTIVE) { /* First read mbox status word */ @@ -2280,14 +2291,11 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) /* Read the HBA Host Attention Register */ ha_copy = readl(phba->HAregaddr); - i = lpfc_mbox_tmo_val(phba, mb->mbxCommand); - i *= 1000; /* Convert to ms */ - /* Wait for command to complete */ while (((word0 & OWN_CHIP) == OWN_CHIP) || (!(ha_copy & HA_MBATT) && (phba->hba_state > LPFC_WARM_START))) { - if (i-- <= 0) { + if (i++ >= 100) { psli->sli_flag &= ~LPFC_SLI_MBOX_ACTIVE; spin_unlock_irqrestore(phba->host->host_lock, drvr_flag); @@ -2305,7 +2313,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmbox, uint32_t flag) /* Can be in interrupt context, do not sleep */ /* (or might be called with interrupts disabled) */ - mdelay(1); + mdelay(i); spin_lock_irqsave(phba->host->host_lock, drvr_flag); @@ -2651,6 +2659,8 @@ lpfc_sli_hba_down(struct lpfc_hba * phba) INIT_LIST_HEAD(&(pring->txq)); + kfree(pring->fast_lookup); + pring->fast_lookup = NULL; } spin_unlock_irqrestore(phba->host->host_lock, flags); @@ -3020,7 +3030,7 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba * phba, if (timeleft == 0) { lpfc_printf_log(phba, KERN_ERR, LOG_SLI, - "%d:0338 IOCB wait timeout error - no " + "%d:0329 IOCB wait timeout error - no " "wake response Data x%x\n", phba->brd_no, timeout); retval = IOCB_TIMEDOUT; @@ -3100,24 +3110,6 @@ lpfc_sli_issue_mbox_wait(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq, return retval; } -int -lpfc_sli_flush_mbox_queue(struct lpfc_hba * phba) -{ - int i = 0; - - while (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE && !phba->stopped) { - if (i++ > LPFC_MBOX_TMO * 1000) - return 1; - - if (lpfc_sli_handle_mb_event(phba) == 0) - i = 0; - - msleep(1); - } - - return (phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) ? 1 : 0; -} - irqreturn_t lpfc_intr_handler(int irq, void *dev_id, struct pt_regs * regs) { diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index e26de6809..a52d6c6cf 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h @@ -135,6 +135,8 @@ struct lpfc_sli_ring { uint32_t fast_iotag; /* max fastlookup based iotag */ uint32_t iotag_ctr; /* keeps track of the next iotag to use */ uint32_t iotag_max; /* max iotag value to use */ + struct lpfc_iocbq ** fast_lookup; /* array of IOCB ptrs indexed by + iotag */ struct list_head txq; uint16_t txq_cnt; /* current length of queue */ uint16_t txq_max; /* max length */ @@ -172,18 +174,6 @@ struct lpfc_sli_stat { uint32_t mbox_busy; /* Mailbox cmd busy */ }; -/* Structure to store link status values when port stats are reset */ -struct lpfc_lnk_stat { - uint32_t link_failure_count; - uint32_t loss_of_sync_count; - uint32_t loss_of_signal_count; - uint32_t prim_seq_protocol_err_count; - uint32_t invalid_tx_word_count; - uint32_t invalid_crc_count; - uint32_t error_frames; - uint32_t link_events; -}; - /* Structure used to hold SLI information */ struct lpfc_sli { uint32_t num_rings; @@ -213,8 +203,6 @@ struct lpfc_sli { struct lpfc_iocbq ** iocbq_lookup; /* array to lookup IOCB by IOTAG */ size_t iocbq_lookup_len; /* current lengs of the array */ uint16_t last_iotag; /* last allocated IOTAG */ - unsigned long stats_start; /* in seconds */ - struct lpfc_lnk_stat lnk_stat_offsets; }; /* Given a pointer to the start of the ring, and the slot number of @@ -225,9 +213,3 @@ struct lpfc_sli { #define LPFC_MBOX_TMO 30 /* Sec tmo for outstanding mbox command */ -#define LPFC_MBOX_TMO_FLASH_CMD 300 /* Sec tmo for outstanding FLASH write - * or erase cmds. This is especially - * long because of the potential of - * multiple flash erases that can be - * spawned. - */ diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index c7091ea29..6b737568b 100644 --- a/drivers/scsi/lpfc/lpfc_version.h +++ b/drivers/scsi/lpfc/lpfc_version.h @@ -18,7 +18,7 @@ * included with this package. * *******************************************************************/ -#define LPFC_DRIVER_VERSION "8.1.9" +#define LPFC_DRIVER_VERSION "8.1.6" #define LPFC_DRIVER_NAME "lpfc" diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index 89ef34df5..93edaa869 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c @@ -378,7 +378,7 @@ static void set_dma_cmds(struct fsc_state *state, struct scsi_cmnd *cmd) int nseg; total = 0; - scl = (struct scatterlist *) cmd->request_buffer; + scl = (struct scatterlist *) cmd->buffer; nseg = pci_map_sg(state->pdev, scl, cmd->use_sg, cmd->sc_data_direction); for (i = 0; i < nseg; ++i) { diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c index 118206d68..e31fadd61 100644 --- a/drivers/scsi/mac_esp.c +++ b/drivers/scsi/mac_esp.c @@ -43,6 +43,9 @@ /* #define DEBUG_MAC_ESP */ +#define mac_turnon_irq(x) mac_enable_irq(x) +#define mac_turnoff_irq(x) mac_disable_irq(x) + extern void esp_handle(struct NCR_ESP *esp); extern void mac_esp_intr(int irq, void *dev_id, struct pt_regs *pregs); @@ -636,13 +639,13 @@ static void dma_init_write(struct NCR_ESP * esp, char * vaddress, int length) static void dma_ints_off(struct NCR_ESP * esp) { - disable_irq(esp->irq); + mac_turnoff_irq(esp->irq); } static void dma_ints_on(struct NCR_ESP * esp) { - enable_irq(esp->irq); + mac_turnon_irq(esp->irq); } /* diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index a942a21dd..777f9bcd1 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c @@ -65,6 +65,9 @@ #define RESET_BOOT #define DRIVER_SETUP +#define ENABLE_IRQ() mac_enable_irq( IRQ_MAC_SCSI ); +#define DISABLE_IRQ() mac_disable_irq( IRQ_MAC_SCSI ); + extern void via_scsi_clear(void); #ifdef RESET_BOOT @@ -348,7 +351,7 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance) printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." ); /* switch off SCSI IRQ - catch an interrupt without IRQ bit set else */ - disable_irq(IRQ_MAC_SCSI); + mac_disable_irq(IRQ_MAC_SCSI); /* get in phase */ NCR5380_write( TARGET_COMMAND_REG, @@ -366,7 +369,7 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance) barrier(); /* switch on SCSI IRQ again */ - enable_irq(IRQ_MAC_SCSI); + mac_enable_irq(IRQ_MAC_SCSI); printk(KERN_INFO " done\n" ); } diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 76edbb639..de35ffe2f 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -524,7 +524,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) * filter the internal and ioctl commands */ if((cmd->cmnd[0] == MEGA_INTERNAL_CMD)) { - return cmd->request_buffer; + return cmd->buffer; } @@ -1828,7 +1828,7 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len) scb->dma_type = MEGA_SGLIST; - BUG_ON(sgcnt > adapter->sglen); + if( sgcnt > adapter->sglen ) BUG(); *len = 0; @@ -4492,7 +4492,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) scmd->device = sdev; scmd->device->host = adapter->host; - scmd->request_buffer = (void *)scb; + scmd->buffer = (void *)scb; scmd->cmnd[0] = MEGA_INTERNAL_CMD; scb->state |= SCB_ACTIVE; @@ -4714,7 +4714,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ? megaraid_isr_memmapped : megaraid_isr_iomapped, - IRQF_SHARED, "megaraid", adapter)) { + SA_SHIRQ, "megaraid", adapter)) { printk(KERN_WARNING "megaraid: Couldn't register IRQ %d!\n", irq); goto out_free_scb_list; diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h index 8cd0bd1d0..467534322 100644 --- a/drivers/scsi/megaraid/mega_common.h +++ b/drivers/scsi/megaraid/mega_common.h @@ -37,12 +37,6 @@ #define LSI_MAX_CHANNELS 16 #define LSI_MAX_LOGICAL_DRIVES_64LD (64+1) -#define HBA_SIGNATURE_64_BIT 0x299 -#define PCI_CONF_AMISIG64 0xa4 - -#define MEGA_SCSI_INQ_EVPD 1 -#define MEGA_INVALID_FIELD_IN_CDB 0x24 - /** * scb_t - scsi command control block diff --git a/drivers/scsi/megaraid/megaraid_ioctl.h b/drivers/scsi/megaraid/megaraid_ioctl.h index b8aa34202..bdaee144a 100644 --- a/drivers/scsi/megaraid/megaraid_ioctl.h +++ b/drivers/scsi/megaraid/megaraid_ioctl.h @@ -132,10 +132,6 @@ typedef struct uioc { /* Driver Data: */ void __user * user_data; uint32_t user_data_len; - - /* 64bit alignment */ - uint32_t pad_for_64bit_align; - mraid_passthru_t __user *user_pthru; mraid_passthru_t *pthru32; diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index cd982c877..bec1424ed 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_mbox.c - * Version : v2.20.4.9 (Jul 16 2006) + * Version : v2.20.4.8 (Apr 11 2006) * * Authors: * Atul Mukker @@ -714,13 +714,12 @@ megaraid_io_detach(adapter_t *adapter) * . Allocate memory required for all the commands * . Use internal library of FW routines, build up complete soft state */ -static int __devinit +static int __init megaraid_init_mbox(adapter_t *adapter) { struct pci_dev *pdev; mraid_device_t *raid_dev; int i; - uint32_t magic64; adapter->ito = MBOX_TIMEOUT; @@ -768,7 +767,7 @@ megaraid_init_mbox(adapter_t *adapter) // // request IRQ and register the interrupt service routine - if (request_irq(adapter->irq, megaraid_isr, IRQF_SHARED, "megaraid", + if (request_irq(adapter->irq, megaraid_isr, SA_SHIRQ, "megaraid", adapter)) { con_log(CL_ANN, (KERN_WARNING @@ -864,33 +863,12 @@ megaraid_init_mbox(adapter_t *adapter) // Set the DMA mask to 64-bit. All supported controllers as capable of // DMA in this range - pci_read_config_dword(adapter->pdev, PCI_CONF_AMISIG64, &magic64); - - if (((magic64 == HBA_SIGNATURE_64_BIT) && - ((adapter->pdev->subsystem_device != - PCI_SUBSYS_ID_MEGARAID_SATA_150_6) || - (adapter->pdev->subsystem_device != - PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) || - (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && - adapter->pdev->device == PCI_DEVICE_ID_VERDE) || - (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && - adapter->pdev->device == PCI_DEVICE_ID_DOBSON) || - (adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC && - adapter->pdev->device == PCI_DEVICE_ID_LINDSAY) || - (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && - adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) || - (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && - adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) { - if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) { - con_log(CL_ANN, (KERN_WARNING - "megaraid: DMA mask for 64-bit failed\n")); + if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK) != 0) { - if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) { - con_log(CL_ANN, (KERN_WARNING - "megaraid: 32-bit DMA mask failed\n")); - goto out_free_sysfs_res; - } - } + con_log(CL_ANN, (KERN_WARNING + "megaraid: could not set DMA mask for 64-bit.\n")); + + goto out_free_sysfs_res; } // setup tasklet for DPC @@ -1644,14 +1622,6 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) rdev->last_disp |= (1L << SCP2CHANNEL(scp)); } - if (scp->cmnd[1] & MEGA_SCSI_INQ_EVPD) { - scp->sense_buffer[0] = 0x70; - scp->sense_buffer[2] = ILLEGAL_REQUEST; - scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB; - scp->result = CHECK_CONDITION << 1; - return NULL; - } - /* Fall through */ case READ_CAPACITY: diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h index 2b5a3285f..868fb0ec9 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.h +++ b/drivers/scsi/megaraid/megaraid_mbox.h @@ -21,8 +21,8 @@ #include "megaraid_ioctl.h" -#define MEGARAID_VERSION "2.20.4.9" -#define MEGARAID_EXT_VERSION "(Release Date: Sun Jul 16 12:27:22 EST 2006)" +#define MEGARAID_VERSION "2.20.4.8" +#define MEGARAID_EXT_VERSION "(Release Date: Mon Apr 11 12:27:22 EST 2006)" /* diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index d85b9a8f1..e8f534fb3 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_mm.c - * Version : v2.20.2.7 (Jul 16 2006) + * Version : v2.20.2.6 (Mar 7 2005) * * Common management module */ diff --git a/drivers/scsi/megaraid/megaraid_mm.h b/drivers/scsi/megaraid/megaraid_mm.h index c8762b2b8..3d9e67d68 100644 --- a/drivers/scsi/megaraid/megaraid_mm.h +++ b/drivers/scsi/megaraid/megaraid_mm.h @@ -27,9 +27,9 @@ #include "megaraid_ioctl.h" -#define LSI_COMMON_MOD_VERSION "2.20.2.7" +#define LSI_COMMON_MOD_VERSION "2.20.2.6" #define LSI_COMMON_MOD_EXT_VERSION \ - "(Release Date: Sun Jul 16 00:01:03 EST 2006)" + "(Release Date: Mon Mar 7 00:01:03 EST 2005)" #define LSI_DBGLVL dbglevel diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index a8c9627a1..39729460b 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c @@ -10,7 +10,7 @@ * 2 of the License, or (at your option) any later version. * * FILE : megaraid_sas.c - * Version : v00.00.03.01 + * Version : v00.00.02.04 * * Authors: * Sreenivas Bagalkote @@ -55,25 +55,19 @@ static struct pci_device_id megasas_pci_table[] = { { PCI_VENDOR_ID_LSI_LOGIC, - PCI_DEVICE_ID_LSI_SAS1064R, /* xscale IOP */ + PCI_DEVICE_ID_LSI_SAS1064R, // xscale IOP PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_LSI_LOGIC, - PCI_DEVICE_ID_LSI_SAS1078R, /* ppc IOP */ + PCI_DEVICE_ID_LSI_SAS1078R, // ppc IOP PCI_ANY_ID, PCI_ANY_ID, }, - { - PCI_VENDOR_ID_LSI_LOGIC, - PCI_DEVICE_ID_LSI_VERDE_ZCR, /* xscale IOP, vega */ - PCI_ANY_ID, - PCI_ANY_ID, - }, { PCI_VENDOR_ID_DELL, - PCI_DEVICE_ID_DELL_PERC5, /* xscale IOP */ + PCI_DEVICE_ID_DELL_PERC5, // xscale IOP PCI_ANY_ID, PCI_ANY_ID, }, @@ -295,14 +289,9 @@ static struct megasas_instance_template megasas_instance_template_ppc = { * @regs: MFI register set */ static inline void -megasas_disable_intr(struct megasas_instance *instance) +megasas_disable_intr(struct megasas_register_set __iomem * regs) { u32 mask = 0x1f; - struct megasas_register_set __iomem *regs = instance->reg_set; - - if(instance->pdev->device == PCI_DEVICE_ID_LSI_SAS1078R) - mask = 0xffffffff; - writel(mask, ®s->outbound_intr_mask); /* Dummy readl to force pci flush */ @@ -752,6 +741,7 @@ static int megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) { u32 frame_count; + unsigned long flags; struct megasas_cmd *cmd; struct megasas_instance *instance; @@ -786,7 +776,9 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *)) /* * Issue the command to the FW */ - atomic_inc(&instance->fw_outstanding); + spin_lock_irqsave(&instance->instance_lock, flags); + instance->fw_outstanding++; + spin_unlock_irqrestore(&instance->instance_lock, flags); instance->instancet->fire_cmd(cmd->frame_phys_addr ,cmd->frame_count-1,instance->reg_set); @@ -834,20 +826,19 @@ static int megasas_wait_for_outstanding(struct megasas_instance *instance) for (i = 0; i < wait_time; i++) { - int outstanding = atomic_read(&instance->fw_outstanding); - - if (!outstanding) + if (!instance->fw_outstanding) break; if (!(i % MEGASAS_RESET_NOTICE_INTERVAL)) { printk(KERN_NOTICE "megasas: [%2d]waiting for %d " - "commands to complete\n",i,outstanding); + "commands to complete\n", i, + instance->fw_outstanding); } msleep(1000); } - if (atomic_read(&instance->fw_outstanding)) { + if (instance->fw_outstanding) { instance->hw_crit_error = 1; return FAILED; } @@ -1059,6 +1050,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, { int exception = 0; struct megasas_header *hdr = &cmd->frame->hdr; + unsigned long flags; if (cmd->scmd) { cmd->scmd->SCp.ptr = (char *)0; @@ -1090,7 +1082,9 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, if (exception) { - atomic_dec(&instance->fw_outstanding); + spin_lock_irqsave(&instance->instance_lock, flags); + instance->fw_outstanding--; + spin_unlock_irqrestore(&instance->instance_lock, flags); megasas_unmap_sgbuf(instance, cmd); cmd->scmd->scsi_done(cmd->scmd); @@ -1138,7 +1132,9 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, break; } - atomic_dec(&instance->fw_outstanding); + spin_lock_irqsave(&instance->instance_lock, flags); + instance->fw_outstanding--; + spin_unlock_irqrestore(&instance->instance_lock, flags); megasas_unmap_sgbuf(instance, cmd); cmd->scmd->scsi_done(cmd->scmd); @@ -1271,7 +1267,7 @@ megasas_transition_to_ready(struct megasas_instance* instance) /* * Bring it to READY state; assuming max wait 2 secs */ - megasas_disable_intr(instance); + megasas_disable_intr(instance->reg_set); writel(MFI_INIT_READY, &instance->reg_set->inbound_doorbell); max_wait = 10; @@ -1767,11 +1763,6 @@ static int megasas_init_mfi(struct megasas_instance *instance) init_frame->data_xfer_len = sizeof(struct megasas_init_queue_info); - /* - * disable the intr before firing the init frame to FW - */ - megasas_disable_intr(instance); - /* * Issue the init frame in polled mode */ @@ -2180,12 +2171,11 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) */ INIT_LIST_HEAD(&instance->cmd_pool); - atomic_set(&instance->fw_outstanding,0); - init_waitqueue_head(&instance->int_cmd_wait_q); init_waitqueue_head(&instance->abort_cmd_wait_q); spin_lock_init(&instance->cmd_pool_lock); + spin_lock_init(&instance->instance_lock); sema_init(&instance->aen_mutex, 1); sema_init(&instance->ioctl_sem, MEGASAS_INT_CMDS); @@ -2207,7 +2197,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) /* * Register IRQ */ - if (request_irq(pdev->irq, megasas_isr, IRQF_SHARED, "megasas", instance)) { + if (request_irq(pdev->irq, megasas_isr, SA_SHIRQ, "megasas", instance)) { printk(KERN_DEBUG "megasas: Failed to register IRQ\n"); goto fail_irq; } @@ -2250,7 +2240,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) megasas_mgmt_info.max_index--; pci_set_drvdata(pdev, NULL); - megasas_disable_intr(instance); + megasas_disable_intr(instance->reg_set); free_irq(instance->pdev->irq, instance); megasas_release_mfi(instance); @@ -2380,7 +2370,7 @@ static void megasas_detach_one(struct pci_dev *pdev) pci_set_drvdata(instance->pdev, NULL); - megasas_disable_intr(instance); + megasas_disable_intr(instance->reg_set); free_irq(instance->pdev->irq, instance); diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 3531a1422..89639f0c3 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -18,16 +18,9 @@ /** * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "00.00.03.01" -#define MEGASAS_RELDATE "May 14, 2006" -#define MEGASAS_EXT_VERSION "Sun May 14 22:49:52 PDT 2006" - -/* - * Device IDs - */ -#define PCI_DEVICE_ID_LSI_SAS1078R 0x0060 -#define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413 - +#define MEGASAS_VERSION "00.00.02.04" +#define MEGASAS_RELDATE "Feb 03, 2006" +#define MEGASAS_EXT_VERSION "Fri Feb 03 14:31:44 PST 2006" /* * ===================================== * MegaRAID SAS MFI firmware definitions @@ -561,11 +554,7 @@ struct megasas_ctrl_info { #define MFI_POLL_TIMEOUT_SECS 10 #define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000 - -/* -* register set for both 1068 and 1078 controllers -* structure extended for 1078 registers -*/ +#define PCI_DEVICE_ID_LSI_SAS1078R 0x00000060 struct megasas_register_set { u32 reserved_0[4]; /*0000h*/ @@ -1088,8 +1077,9 @@ struct megasas_instance { struct pci_dev *pdev; u32 unique_id; - atomic_t fw_outstanding; + u32 fw_outstanding; u32 hw_crit_error; + spinlock_t instance_lock; struct megasas_instance_template *instancet; }; @@ -1161,10 +1151,10 @@ struct compat_megasas_iocpacket { struct compat_iovec sgl[MAX_IOCTL_SGE]; } __attribute__ ((packed)); -#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket) #endif #define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket) +#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket) #define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen) struct megasas_mgmt_info { diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 5572981a9..f85242100 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -18,6 +18,7 @@ * - retry arbitration if lost (unless higher levels do this for us) * - power down the chip when no device is detected */ +#include #include #include #include @@ -1268,7 +1269,7 @@ static void set_dma_cmds(struct mesh_state *ms, struct scsi_cmnd *cmd) if (cmd->use_sg > 0) { int nseg; total = 0; - scl = (struct scatterlist *) cmd->request_buffer; + scl = (struct scatterlist *) cmd->buffer; off = ms->data_ptr; nseg = pci_map_sg(ms->pdev, scl, cmd->use_sg, cmd->sc_data_direction); diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index b28712df0..22f913127 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c @@ -529,7 +529,7 @@ static void __unmap_scsi_data(struct device *dev, struct scsi_cmnd *cmd) { switch(cmd->__data_mapped) { case 2: - dma_unmap_sg(dev, cmd->request_buffer, cmd->use_sg, + dma_unmap_sg(dev, cmd->buffer, cmd->use_sg, cmd->sc_data_direction); break; case 1: @@ -564,7 +564,7 @@ static int __map_scsi_sg_data(struct device *dev, struct scsi_cmnd *cmd) if (cmd->use_sg == 0) return 0; - use_sg = dma_map_sg(dev, cmd->request_buffer, cmd->use_sg, + use_sg = dma_map_sg(dev, cmd->buffer, cmd->use_sg, cmd->sc_data_direction); cmd->__data_mapped = 2; cmd->__data_mapping = use_sg; @@ -5118,7 +5118,8 @@ static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp) cp->host_status &= ~HS_SKIPMASK; cp->start.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, select)); - list_move_tail(&cp->link_ccbq, &lp->skip_ccbq); + list_del(&cp->link_ccbq); + list_add_tail(&cp->link_ccbq, &lp->skip_ccbq); if (cp->queued) { --lp->queuedccbs; } @@ -7696,7 +7697,7 @@ static int ncr_scatter(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd) if (!use_sg) segment = ncr_scatter_no_sglist(np, cp, cmd); else if ((use_sg = map_scsi_sg_data(np, cmd)) > 0) { - struct scatterlist *scatter = (struct scatterlist *)cmd->request_buffer; + struct scatterlist *scatter = (struct scatterlist *)cmd->buffer; struct scr_tblmove *data; if (use_sg > MAX_SCATTER) { diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h index 78818b668..0e4e46a01 100644 --- a/drivers/scsi/ncr53c8xx.h +++ b/drivers/scsi/ncr53c8xx.h @@ -53,8 +53,10 @@ #ifndef NCR53C8XX_H #define NCR53C8XX_H +#include #include +#include /* ** If you want a driver as small as possible, donnot define the diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index bfb4f49e1..30ee0ef4b 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c @@ -1636,7 +1636,7 @@ static void nsp32_scsi_done(struct scsi_cmnd *SCpnt) if (SCpnt->use_sg) { pci_unmap_sg(data->Pci, - (struct scatterlist *)SCpnt->request_buffer, + (struct scatterlist *)SCpnt->buffer, SCpnt->use_sg, SCpnt->sc_data_direction); } else { pci_unmap_single(data->Pci, @@ -2866,7 +2866,8 @@ static int nsp32_detect(struct scsi_host_template *sht) */ nsp32_do_bus_reset(data); - ret = request_irq(host->irq, do_nsp32_isr, IRQF_SHARED, "nsp32", data); + ret = request_irq(host->irq, do_nsp32_isr, + SA_SHIRQ | SA_SAMPLE_RANDOM, "nsp32", data); if (ret < 0) { nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 " "SCSI PCI controller. Interrupt: %d", host->irq); @@ -2885,19 +2886,12 @@ static int nsp32_detect(struct scsi_host_template *sht) } #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,73)) - ret = scsi_add_host(host, &PCIDEV->dev); - if (ret) { - nsp32_msg(KERN_ERR, "failed to add scsi host"); - goto free_region; - } + scsi_add_host (host, &PCIDEV->dev); scsi_scan_host(host); #endif pci_set_drvdata(PCIDEV, host); return DETECT_OK; - free_region: - release_region(host->io_port, host->n_io_port); - free_irq: free_irq(host->irq, data); diff --git a/drivers/scsi/oktagon_esp.c b/drivers/scsi/oktagon_esp.c index dd67a68c5..dee426f8c 100644 --- a/drivers/scsi/oktagon_esp.c +++ b/drivers/scsi/oktagon_esp.c @@ -6,6 +6,7 @@ * Based on cyber_esp.c */ +#include #if defined(CONFIG_AMIGA) || defined(CONFIG_APUS) #define USE_BOTTOM_HALF @@ -197,7 +198,7 @@ int oktagon_esp_detect(struct scsi_host_template *tpnt) esp->esp_command_dvma = (__u32) cmd_buffer; esp->irq = IRQ_AMIGA_PORTS; - request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, + request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, "BSC Oktagon SCSI", esp->ehost); /* Figure out our scsi ID on the bus */ diff --git a/drivers/scsi/oktagon_io.S b/drivers/scsi/oktagon_io.S index 8a7340b02..08ce8d80d 100644 --- a/drivers/scsi/oktagon_io.S +++ b/drivers/scsi/oktagon_io.S @@ -23,6 +23,7 @@ int oktag_from_io(long *addr,long *paddr,long len) * is moved to/from the IO register. */ +#include #ifdef CONFIG_APUS diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 4a2fed350..e3bd4bc33 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -4724,7 +4724,7 @@ err_out: /* Flush the tape buffer before close */ -static int os_scsi_tape_flush(struct file * filp, fl_owner_t id) +static int os_scsi_tape_flush(struct file * filp) { int result = 0, result2; struct osst_tape * STp = filp->private_data; @@ -5492,7 +5492,7 @@ static int __init osst_setup (char *str) char *stp; stp = get_options(str, ARRAY_SIZE(ints), ints); - + if (ints[0] > 0) { for (i = 0; i < ints[0] && i < ARRAY_SIZE(parms); i++) *parms[i].val = ints[i + 1]; @@ -5507,7 +5507,7 @@ static int __init osst_setup (char *str) break; } } - if (i >= ARRAY_SIZE(parms)) + if (i >= sizeof(parms) / sizeof(struct osst_dev_parm)) printk(KERN_INFO "osst :I: Illegal parameter in '%s'\n", stp); stp = strchr(stp, ','); diff --git a/drivers/scsi/osst.h b/drivers/scsi/osst.h index 1e426f5d0..011d4d6ca 100644 --- a/drivers/scsi/osst.h +++ b/drivers/scsi/osst.h @@ -3,6 +3,7 @@ */ #include +#include #include /* FIXME - rename and use the following two types or delete them! diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 1434209a8..f09e94af9 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c @@ -156,7 +156,7 @@ static int default_irqs[] __initdata = static struct override { unsigned short io_port; int irq; -} overrides +} overrides #ifdef PAS16_OVERRIDE [] __initdata = PAS16_OVERRIDE; #else @@ -164,19 +164,19 @@ static struct override { {0,IRQ_AUTO}}; #endif -#define NO_OVERRIDES ARRAY_SIZE(overrides) +#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) static struct base { unsigned short io_port; int noauto; -} bases[] __initdata = +} bases[] __initdata = { {PAS16_DEFAULT_BASE_1, 0}, {PAS16_DEFAULT_BASE_2, 0}, {PAS16_DEFAULT_BASE_3, 0}, {PAS16_DEFAULT_BASE_4, 0} }; -#define NO_BASES ARRAY_SIZE(bases) +#define NO_BASES (sizeof (bases) / sizeof (struct base)) static const unsigned short pas16_offset[ 8 ] = { @@ -454,7 +454,7 @@ int __init pas16_detect(struct scsi_host_template * tpnt) instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED, "pas16", instance)) { + if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) { printk("scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 0d4c04e1f..231f9c311 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c @@ -1623,7 +1623,7 @@ static int nsp_cs_probe(struct pcmcia_device *link) /* Interrupt handler */ link->irq.Handler = &nspintr; link->irq.Instance = info; - link->irq.Attributes |= IRQF_SHARED; + link->irq.Attributes |= (SA_SHIRQ | SA_SAMPLE_RANDOM); /* General socket configuration */ link->conf.Attributes = CONF_ENABLE_IRQ; diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 0b65099ac..9f5982770 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c @@ -799,7 +799,7 @@ next_entry: data = (struct sym53c500_data *)host->hostdata; if (irq_level > 0) { - if (request_irq(irq_level, SYM53C500_intr, IRQF_SHARED, "SYM53C500", host)) { + if (request_irq(irq_level, SYM53C500_intr, SA_SHIRQ, "SYM53C500", host)) { printk("SYM53C500: unable to allocate IRQ %d\n", irq_level); goto err_free_scsi; } diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index efc8fff1d..5cda16cfa 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c @@ -46,7 +46,7 @@ #include #define DRV_NAME "pdc_adma" -#define DRV_VERSION "0.04" +#define DRV_VERSION "0.03" /* macro to calculate base address for ATA regs */ #define ADMA_ATA_REGS(base,port_no) ((base) + ((port_no) * 0x40)) @@ -152,7 +152,6 @@ static struct scsi_host_template adma_ata_sht = { .proc_name = DRV_NAME, .dma_boundary = ADMA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -168,7 +167,6 @@ static const struct ata_port_operations adma_ata_ops = { .qc_prep = adma_qc_prep, .qc_issue = adma_qc_issue, .eng_timeout = adma_eng_timeout, - .data_xfer = ata_mmio_data_xfer, .irq_handler = adma_intr, .irq_clear = adma_irq_clear, .port_start = adma_port_start, @@ -183,8 +181,7 @@ static struct ata_port_info adma_port_info[] = { { .sht = &adma_ata_sht, .host_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST | - ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | - ATA_FLAG_PIO_POLLING, + ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO, .pio_mask = 0x10, /* pio4 */ .udma_mask = 0x1f, /* udma0-4 */ .port_ops = &adma_ata_ops, @@ -458,13 +455,13 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set) continue; handled = 1; adma_enter_reg_mode(ap); - if (ap->flags & ATA_FLAG_DISABLED) + if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) continue; pp = ap->private_data; if (!pp || pp->state != adma_state_pkt) continue; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { + if (qc && (!(qc->tf.ctl & ATA_NIEN))) { if ((status & (aPERR | aPSD | aUIRQ))) qc->err_mask |= AC_ERR_OTHER; else if (pp->pkt[0] != cDONE) @@ -483,13 +480,13 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set) for (port_no = 0; port_no < host_set->n_ports; ++port_no) { struct ata_port *ap; ap = host_set->ports[port_no]; - if (ap && (!(ap->flags & ATA_FLAG_DISABLED))) { + if (ap && (!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)))) { struct ata_queued_cmd *qc; struct adma_port_priv *pp = ap->private_data; if (!pp || pp->state != adma_state_mmio) continue; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { + if (qc && (!(qc->tf.ctl & ATA_NIEN))) { /* check main status, clearing INTRQ */ u8 status = ata_check_status(ap); @@ -691,7 +688,7 @@ static int adma_ata_init_one(struct pci_dev *pdev, probe_ent->port_ops = adma_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; probe_ent->n_ports = ADMA_PORTS; diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c index 0bd9c60e6..46624ab9c 100644 --- a/drivers/scsi/pluto.c +++ b/drivers/scsi/pluto.c @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef CONFIG_KMOD #include #endif @@ -26,9 +27,6 @@ #include -#define RQ_SCSI_BUSY 0xffff -#define RQ_SCSI_DONE 0xfffe - /* #define PLUTO_DEBUG */ #define pluto_printk printk ("PLUTO %s: ", fc->name); printk @@ -169,6 +167,8 @@ int __init pluto_detect(struct scsi_host_template *tpnt) SCpnt->request->rq_status = RQ_SCSI_BUSY; SCpnt->done = pluto_detect_done; + SCpnt->bufflen = 256; + SCpnt->buffer = fcs[i].inquiry; SCpnt->request_bufflen = 256; SCpnt->request_buffer = fcs[i].inquiry; PLD(("set up %d %08lx\n", i, (long)SCpnt)) diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index b0eba39f2..108910f51 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c @@ -6,8 +6,11 @@ * (c) 1995,1996 Grant R. Guenther, grant@torque.net, * under the terms of the GNU General Public License. * + * Current Maintainer: David Campbell (Perth, Western Australia, GMT+0800) + * campbell@torque.net */ +#include #include #include #include diff --git a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h index ba8021427..f6e1a1574 100644 --- a/drivers/scsi/ppa.h +++ b/drivers/scsi/ppa.h @@ -2,7 +2,7 @@ * the Iomega ZIP drive * * (c) 1996 Grant R. Guenther grant@torque.net - * David Campbell + * David Campbell campbell@torque.net * * All comments to David. */ @@ -73,6 +73,7 @@ */ /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */ +#include #include #include #include diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 332151e2a..5a48e55f9 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -192,7 +192,7 @@ - Don't walk the entire list in qla1280_putq_t() just to directly grab the pointer to the last element afterwards Rev 3.23.5 Beta August 9, 2001, Jes Sorensen - - Don't use IRQF_DISABLED, it's use is deprecated for this kinda driver + - Don't use SA_INTERRUPT, it's use is deprecated for this kinda driver Rev 3.23.4 Beta August 8, 2001, Jes Sorensen - Set dev->max_sectors to 1024 Rev 3.23.3 Beta August 6, 2001, Jes Sorensen @@ -331,6 +331,7 @@ *****************************************************************************/ +#include #include #include @@ -396,6 +397,30 @@ #include "ql1280_fw.h" #include "ql1040_fw.h" + +/* + * Missing PCI ID's + */ +#ifndef PCI_DEVICE_ID_QLOGIC_ISP1080 +#define PCI_DEVICE_ID_QLOGIC_ISP1080 0x1080 +#endif +#ifndef PCI_DEVICE_ID_QLOGIC_ISP1240 +#define PCI_DEVICE_ID_QLOGIC_ISP1240 0x1240 +#endif +#ifndef PCI_DEVICE_ID_QLOGIC_ISP1280 +#define PCI_DEVICE_ID_QLOGIC_ISP1280 0x1280 +#endif +#ifndef PCI_DEVICE_ID_QLOGIC_ISP10160 +#define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 +#endif +#ifndef PCI_DEVICE_ID_QLOGIC_ISP12160 +#define PCI_DEVICE_ID_QLOGIC_ISP12160 0x1216 +#endif + +#ifndef PCI_VENDOR_ID_AMI +#define PCI_VENDOR_ID_AMI 0x101e +#endif + #ifndef BITS_PER_LONG #error "BITS_PER_LONG not defined!" #endif @@ -813,7 +838,7 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action) uint16_t data; unsigned char *handle; int result, i; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); struct timer_list timer; ha = (struct scsi_qla_host *)(CMD_HOST(cmd)->hostdata); @@ -2406,7 +2431,7 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) uint16_t *optr, *iptr; uint16_t __iomem *mptr; uint16_t data; - DECLARE_COMPLETION_ONSTACK(wait); + DECLARE_COMPLETION(wait); struct timer_list timer; ENTER("qla1280_mailbox_command"); @@ -4209,17 +4234,20 @@ qla1280_setup(char *s) } -static int __init +static int qla1280_get_token(char *str) { char *sep; long ret = -1; - int i; + int i, len; + + len = sizeof(setup_token)/sizeof(struct setup_tokens); sep = strchr(str, ':'); if (sep) { - for (i = 0; i < ARRAY_SIZE(setup_token); i++) { + for (i = 0; i < len; i++){ + if (!strncmp(setup_token[i].token, str, (sep - str))) { ret = setup_token[i].val; break; @@ -4369,7 +4397,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) /* Disable ISP interrupts. */ qla1280_disable_intrs(ha); - if (request_irq(pdev->irq, qla1280_intr_handler, IRQF_SHARED, + if (request_irq(pdev->irq, qla1280_intr_handler, SA_SHIRQ, "qla1280", ha)) { printk("qla1280 : Failed to reserve interrupt %d already " "in use\n", pdev->irq); diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig index 8c865b9e0..ff40906c6 100644 --- a/drivers/scsi/qla2xxx/Kconfig +++ b/drivers/scsi/qla2xxx/Kconfig @@ -24,3 +24,48 @@ config SCSI_QLA_FC Firmware images can be retrieved from: ftp://ftp.qlogic.com/outgoing/linux/firmware/ + + NOTE: The original method of building firmware-loader + modules has been deprecated as the firmware-images will + be removed from the kernel sources. + +config SCSI_QLA2XXX_EMBEDDED_FIRMWARE + bool " Use firmware-loader modules (DEPRECATED)" + depends on SCSI_QLA_FC + help + This option offers you the deprecated firmware-loader + modules that have been obsoleted by the usage of the + Firmware Loader interface in the qla2xxx driver. + +config SCSI_QLA21XX + tristate " Build QLogic ISP2100 firmware-module" + depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE + ---help--- + This driver supports the QLogic 21xx (ISP2100) host adapter family. + +config SCSI_QLA22XX + tristate " Build QLogic ISP2200 firmware-module" + depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE + ---help--- + This driver supports the QLogic 22xx (ISP2200) host adapter family. + +config SCSI_QLA2300 + tristate " Build QLogic ISP2300/ISP6312 firmware-module" + depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE + ---help--- + This driver supports the QLogic 2300 (ISP2300, ISP2312 and + ISP6312) host adapter family. + +config SCSI_QLA2322 + tristate " Build QLogic ISP2322/ISP6322 firmware-module" + depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE + ---help--- + This driver supports the QLogic 2322 (ISP2322 and ISP6322) host + adapter family. + +config SCSI_QLA24XX + tristate " Build QLogic ISP24xx firmware-module" + depends on SCSI_QLA_FC && SCSI_QLA2XXX_EMBEDDED_FIRMWARE + ---help--- + This driver supports the QLogic 24xx (ISP2422 and ISP2432) host + adapter family. diff --git a/drivers/scsi/qla2xxx/Makefile b/drivers/scsi/qla2xxx/Makefile index 6399648f1..c8f670ee6 100644 --- a/drivers/scsi/qla2xxx/Makefile +++ b/drivers/scsi/qla2xxx/Makefile @@ -1,5 +1,18 @@ +EXTRA_CFLAGS += -DUNIQUE_FW_NAME + qla2xxx-y := qla_os.o qla_init.o qla_mbx.o qla_iocb.o qla_isr.o qla_gs.o \ - qla_dbg.o qla_sup.o qla_attr.o ql2100_fw.o ql2200_fw.o \ - ql2300_fw.o ql2322_fw.o ql2400_fw.o + qla_dbg.o qla_sup.o qla_rscn.o qla_attr.o obj-$(CONFIG_SCSI_QLA_FC) += qla2xxx.o + +qla2100-y := ql2100.o ql2100_fw.o +qla2200-y := ql2200.o ql2200_fw.o +qla2300-y := ql2300.o ql2300_fw.o +qla2322-y := ql2322.o ql2322_fw.o +qla2400-y := ql2400.o ql2400_fw.o + +obj-$(CONFIG_SCSI_QLA21XX) += qla2xxx.o qla2100.o +obj-$(CONFIG_SCSI_QLA22XX) += qla2xxx.o qla2200.o +obj-$(CONFIG_SCSI_QLA2300) += qla2xxx.o qla2300.o +obj-$(CONFIG_SCSI_QLA2322) += qla2xxx.o qla2322.o +obj-$(CONFIG_SCSI_QLA24XX) += qla2xxx.o qla2400.o diff --git a/drivers/scsi/qla2xxx/ql2100.c b/drivers/scsi/qla2xxx/ql2100.c new file mode 100644 index 000000000..f5db2235e --- /dev/null +++ b/drivers/scsi/qla2xxx/ql2100.c @@ -0,0 +1,91 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (C) 2003 Christoph Hellwig. + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include +#include +#include + +#include "qla_def.h" + +static char qla_driver_name[] = "qla2100"; + +extern unsigned char fw2100tp_version[]; +extern unsigned char fw2100tp_version_str[]; +extern unsigned short fw2100tp_addr01; +extern unsigned short fw2100tp_code01[]; +extern unsigned short fw2100tp_length01; + +static struct qla_fw_info qla_fw_tbl[] = { + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2100tp_code01[0], + .fwlen = &fw2100tp_length01, + .fwstart = &fw2100tp_addr01, + }, + + { FW_INFO_ADDR_NOMORE, }, +}; + +static struct qla_board_info qla_board_tbl = { + .drv_name = qla_driver_name, + + .isp_name = "ISP2100", + .fw_info = qla_fw_tbl, +}; + +static struct pci_device_id qla2100_pci_tbl[] = { + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2100, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl, + }, + + {0, 0}, +}; +MODULE_DEVICE_TABLE(pci, qla2100_pci_tbl); + +static int __devinit +qla2100_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, + (struct qla_board_info *)id->driver_data); +} + +static void __devexit +qla2100_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + +static struct pci_driver qla2100_pci_driver = { + .name = "qla2100", + .id_table = qla2100_pci_tbl, + .probe = qla2100_probe_one, + .remove = __devexit_p(qla2100_remove_one), +}; + +static int __init +qla2100_init(void) +{ + return pci_module_init(&qla2100_pci_driver); +} + +static void __exit +qla2100_exit(void) +{ + pci_unregister_driver(&qla2100_pci_driver); +} + +module_init(qla2100_init); +module_exit(qla2100_exit); + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic ISP21xx FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff --git a/drivers/scsi/qla2xxx/ql2100_fw.c b/drivers/scsi/qla2xxx/ql2100_fw.c index 0e7d6d53a..56006162d 100644 --- a/drivers/scsi/qla2xxx/ql2100_fw.c +++ b/drivers/scsi/qla2xxx/ql2100_fw.c @@ -1,6419 +1,4848 @@ /* - * Firmware version 1.19 from - * - * ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2100_fw.bin - * - * xxd -g 1 -i ql2100_fw.bin | indent -l80 -i8 -o ql2100_fw.c + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation * + * See LICENSE.qla2xxx for copyright and licensing details. */ -#include +/* + * Firmware Version 1.19.25 (13:12 Dec 10, 2003) + */ -static u8 ql2100_fw_bin[] = { - 0x00, 0x78, 0x10, 0x2d, 0x00, 0x00, 0x96, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x13, 0x00, 0x19, 0x00, 0x17, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, - 0x49, 0x47, 0x48, 0x54, 0x20, 0x32, 0x30, 0x30, 0x31, 0x20, 0x51, 0x4c, - 0x4f, 0x47, 0x49, 0x43, 0x20, 0x43, 0x4f, 0x52, 0x50, 0x4f, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x49, 0x53, 0x50, 0x32, 0x31, 0x30, 0x30, - 0x20, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x30, 0x31, 0x2e, 0x31, 0x39, - 0x20, 0x20, 0x20, 0x20, 0x24, 0x00, 0x20, 0x91, 0x20, 0x00, 0x20, 0xc1, - 0x00, 0x21, 0x20, 0x39, 0xff, 0xff, 0x20, 0x19, 0xaa, 0xaa, 0x27, 0x60, - 0x20, 0x69, 0x7f, 0xff, 0x20, 0xc1, 0x00, 0x20, 0x2c, 0x2c, 0x2d, 0x34, - 0x27, 0x62, 0x23, 0x6a, 0x2c, 0x24, 0x2d, 0x04, 0x26, 0x6a, 0x25, 0x62, - 0xa4, 0x06, 0x00, 0xc0, 0x10, 0x52, 0x20, 0xc1, 0x00, 0x21, 0x2c, 0x2c, - 0x23, 0x62, 0x2c, 0x04, 0x25, 0x62, 0xa3, 0x06, 0x00, 0x40, 0x10, 0x52, - 0x20, 0xc1, 0x00, 0x20, 0x20, 0x39, 0x8f, 0xff, 0x20, 0xa1, 0xae, 0x00, - 0x27, 0x08, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0xa1, 0x8c, - 0x00, 0x0f, 0x20, 0x01, 0x00, 0x0a, 0xa1, 0x12, 0xa0, 0x0e, 0x21, 0xa8, - 0x41, 0xa4, 0x34, 0x00, 0x82, 0x11, 0x00, 0xc0, 0x10, 0x5f, 0x27, 0x08, - 0x34, 0x00, 0xa1, 0x02, 0x00, 0x40, 0x10, 0x6f, 0x00, 0x48, 0x10, 0x6f, - 0x20, 0xa8, 0xa0, 0x0e, 0x41, 0xa4, 0x20, 0xa1, 0xa6, 0x01, 0x20, 0x09, - 0x00, 0x00, 0x20, 0xa9, 0x07, 0xff, 0x41, 0xa4, 0x34, 0x00, 0x20, 0xc9, - 0xab, 0xff, 0x20, 0x59, 0x00, 0x00, 0x2b, 0x78, 0x78, 0x23, 0x00, 0x04, - 0x20, 0x89, 0x25, 0xc7, 0x20, 0x51, 0xa7, 0x00, 0x2a, 0x70, 0x77, 0x62, - 0xa7, 0x86, 0x8f, 0xff, 0x00, 0x40, 0x10, 0x92, 0x70, 0x5f, 0xce, 0x00, - 0x70, 0x5b, 0xcd, 0xf1, 0x70, 0x67, 0x02, 0x00, 0x70, 0x6b, 0x02, 0x00, - 0x00, 0x78, 0x10, 0x9a, 0x70, 0x5b, 0xbe, 0x01, 0x70, 0x67, 0x01, 0x00, - 0x70, 0x6b, 0x01, 0x00, 0x70, 0x5f, 0xbe, 0x00, 0x10, 0x78, 0x12, 0xdf, - 0x10, 0x78, 0x13, 0xca, 0x10, 0x78, 0x15, 0x77, 0x10, 0x78, 0x1c, 0xe9, - 0x10, 0x78, 0x42, 0xec, 0x10, 0x78, 0x76, 0xbf, 0x10, 0x78, 0x13, 0x55, - 0x10, 0x78, 0x2a, 0xc0, 0x10, 0x78, 0x4e, 0x93, 0x10, 0x78, 0x49, 0xa3, - 0x10, 0x78, 0x59, 0x4a, 0x10, 0x78, 0x22, 0x63, 0x10, 0x78, 0x5c, 0x43, - 0x10, 0x78, 0x54, 0x85, 0x10, 0x78, 0x21, 0x62, 0x10, 0x78, 0x22, 0x40, - 0x20, 0x91, 0x30, 0x09, 0x78, 0x23, 0x00, 0x00, 0x00, 0x90, 0x10, 0xcf, - 0x78, 0x20, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x10, 0xcf, 0x78, 0x23, - 0x40, 0x00, 0x00, 0x68, 0x10, 0xc7, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, - 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x2a, 0x70, 0x70, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x01, 0x7f, 0x20, 0x03, 0x00, 0x00, 0x2a, 0x70, 0x70, 0x00, - 0xa0, 0x8e, 0x00, 0x03, 0x00, 0xc0, 0x10, 0xef, 0x10, 0x78, 0x36, 0x5e, - 0x10, 0x78, 0x2a, 0xe8, 0x10, 0x78, 0x4e, 0xe3, 0x10, 0x78, 0x4b, 0x66, - 0x20, 0x09, 0x01, 0x00, 0x21, 0x04, 0xa0, 0x82, 0x00, 0x02, 0x00, 0x48, - 0x10, 0xf3, 0x10, 0x78, 0x59, 0x66, 0x00, 0x78, 0x10, 0xd6, 0x10, 0x79, - 0x10, 0xf7, 0x00, 0x78, 0x10, 0xdc, 0x10, 0x78, 0x71, 0x97, 0x00, 0x78, - 0x10, 0xeb, 0x11, 0x01, 0x11, 0x02, 0x11, 0xbe, 0x10, 0xff, 0x12, 0x46, - 0x12, 0xdc, 0x12, 0xdd, 0x12, 0xde, 0x10, 0x78, 0x13, 0x32, 0x00, 0x7c, - 0x12, 0x7e, 0x0f, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, 0xa0, 0x86, - 0x00, 0x01, 0x00, 0xc0, 0x11, 0x98, 0x10, 0x78, 0x3a, 0xec, 0x20, 0x79, - 0x01, 0x00, 0x78, 0x44, 0xa0, 0x05, 0x00, 0xc0, 0x11, 0x98, 0x20, 0x11, - 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x10, 0x78, 0x1a, 0xdf, 0x78, 0x0f, - 0x00, 0xff, 0x78, 0x40, 0xa0, 0x84, 0xff, 0xfb, 0x78, 0x42, 0x20, 0x11, - 0x80, 0x10, 0x73, 0xc4, 0x10, 0x78, 0x36, 0x1b, 0x20, 0x01, 0xff, 0xff, - 0x10, 0x78, 0x5a, 0xe6, 0x72, 0x3c, 0xc2, 0x84, 0x72, 0x3e, 0x20, 0x01, - 0xa7, 0x0c, 0x20, 0x14, 0xc2, 0xac, 0x22, 0x02, 0x10, 0x78, 0x6f, 0x9f, - 0x20, 0x11, 0x00, 0x04, 0x10, 0x78, 0x8d, 0x2b, 0x10, 0x78, 0x48, 0x9e, - 0x10, 0x78, 0x42, 0xd4, 0x00, 0x40, 0x11, 0x44, 0x70, 0x87, 0x00, 0x01, - 0x70, 0xbf, 0x00, 0x00, 0x10, 0x78, 0x3c, 0x9e, 0x00, 0x78, 0x11, 0x98, - 0x10, 0x78, 0x49, 0x67, 0x00, 0x40, 0x11, 0x4d, 0x7a, 0x0c, 0xc2, 0xb4, - 0x7a, 0x0e, 0x00, 0x78, 0x11, 0x59, 0x10, 0x78, 0x90, 0xb6, 0x70, 0xcc, - 0xd0, 0x9c, 0x00, 0xc0, 0x11, 0x59, 0x70, 0x98, 0xa0, 0x05, 0x00, 0x40, - 0x11, 0x59, 0x10, 0x78, 0x42, 0xb8, 0x70, 0xd7, 0x00, 0x00, 0x70, 0xd3, - 0x00, 0x00, 0x72, 0xcc, 0x20, 0x79, 0xa7, 0x52, 0x78, 0x04, 0xd0, 0xac, - 0x00, 0x40, 0x11, 0x65, 0xc2, 0x95, 0x72, 0xce, 0xa2, 0x96, 0x00, 0x04, - 0x00, 0x40, 0x11, 0x86, 0x20, 0x11, 0x00, 0x01, 0x10, 0x78, 0x8d, 0x2b, - 0x70, 0x93, 0x00, 0x00, 0x70, 0x97, 0xff, 0xff, 0x70, 0x03, 0x00, 0x02, - 0x0f, 0x7f, 0x10, 0x78, 0x26, 0x77, 0x20, 0x11, 0x00, 0x05, 0x10, 0x78, - 0x70, 0xe0, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, - 0x60, 0xe3, 0x00, 0x08, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x78, 0x11, 0x9a, - 0x70, 0x93, 0x00, 0x00, 0x70, 0x97, 0xff, 0xff, 0x70, 0x03, 0x00, 0x02, - 0x20, 0x11, 0x00, 0x05, 0x10, 0x78, 0x70, 0xe0, 0x10, 0x78, 0x62, 0xd1, - 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x60, 0xe3, 0x00, 0x08, 0x0c, 0x7f, - 0x0f, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x20, 0xa9, 0x00, 0x82, - 0x20, 0x09, 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x21, 0x10, - 0x02, 0x7e, 0x20, 0x19, 0x00, 0x29, 0x10, 0x78, 0x73, 0xd0, 0x02, 0x7f, - 0x10, 0x78, 0xa5, 0x01, 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x10, 0x78, - 0x29, 0x8e, 0x81, 0x08, 0x00, 0xf0, 0x11, 0xa0, 0x0c, 0x7f, 0x70, 0x6f, - 0x00, 0x00, 0x70, 0x70, 0xa0, 0x84, 0x00, 0xff, 0x70, 0x72, 0x70, 0x9b, - 0x00, 0x00, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x12, 0x44, 0x70, 0x94, 0xa0, 0x86, - 0xff, 0xff, 0x00, 0x40, 0x11, 0xd1, 0x10, 0x78, 0x26, 0x77, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x78, 0x12, 0x44, 0x70, 0xcc, 0xd0, 0x9c, 0x00, 0x40, - 0x11, 0xfd, 0xd0, 0x84, 0x00, 0x40, 0x11, 0xfd, 0x0f, 0x7e, 0x20, 0x79, - 0x01, 0x00, 0x79, 0x0c, 0xc1, 0xb5, 0x79, 0x0e, 0x0f, 0x7f, 0xd0, 0x8c, - 0x00, 0x40, 0x11, 0xfd, 0x70, 0xd0, 0xa0, 0x86, 0xff, 0xff, 0x00, 0x40, - 0x11, 0xf9, 0x10, 0x78, 0x27, 0xf7, 0x10, 0x78, 0x62, 0xd1, 0x70, 0xcc, - 0xd0, 0x94, 0x00, 0xc0, 0x12, 0x44, 0x20, 0x11, 0x00, 0x01, 0x20, 0x19, - 0x00, 0x00, 0x10, 0x78, 0x28, 0x2f, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, - 0x12, 0x44, 0x70, 0xd4, 0xa0, 0x05, 0x00, 0xc0, 0x12, 0x44, 0x70, 0x90, - 0xa0, 0x05, 0x00, 0xc0, 0x12, 0x44, 0x10, 0x78, 0x49, 0x67, 0x00, 0xc0, - 0x12, 0x44, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x00, 0x40, - 0x12, 0x27, 0x15, 0x7e, 0x0c, 0x7e, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, - 0x00, 0x00, 0x01, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x12, 0x1a, - 0x60, 0x00, 0xd0, 0xec, 0x00, 0xc0, 0x12, 0x22, 0x01, 0x7f, 0x81, 0x08, - 0x00, 0xf0, 0x12, 0x11, 0x0c, 0x7f, 0x15, 0x7f, 0x00, 0x78, 0x12, 0x27, - 0x01, 0x7f, 0x0c, 0x7f, 0x15, 0x7f, 0x00, 0x78, 0x12, 0x44, 0x70, 0x03, - 0x00, 0x03, 0x70, 0x97, 0xff, 0xff, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, - 0x24, 0xe8, 0x10, 0x78, 0x36, 0x99, 0x20, 0x01, 0xa9, 0xb2, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x05, 0x00, 0xc0, 0x12, 0x3c, 0x20, 0x11, 0x00, 0x00, - 0x10, 0x78, 0x70, 0xe0, 0x20, 0x11, 0x00, 0x00, 0x10, 0x78, 0x70, 0xea, - 0x10, 0x78, 0x62, 0xd1, 0x10, 0x78, 0x63, 0x9b, 0x12, 0x7f, 0x00, 0x7c, - 0x01, 0x7e, 0x0f, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, - 0x01, 0x00, 0x20, 0x09, 0x00, 0xf7, 0x10, 0x78, 0x42, 0xa1, 0x79, 0x40, - 0xa1, 0x8c, 0x00, 0x10, 0x79, 0x42, 0x79, 0x24, 0xd1, 0xb4, 0x00, 0x40, - 0x12, 0x5b, 0x78, 0x27, 0x00, 0x40, 0xd1, 0x9c, 0x00, 0x40, 0x12, 0x60, - 0x78, 0x27, 0x00, 0x08, 0x00, 0x7e, 0x03, 0x7e, 0x15, 0x7e, 0xa0, 0x06, - 0x10, 0x78, 0x5a, 0xe6, 0x79, 0x00, 0xa1, 0x8a, 0x00, 0x03, 0x00, 0x50, - 0x12, 0x89, 0x79, 0x54, 0xd1, 0xac, 0x00, 0xc0, 0x12, 0x89, 0x20, 0x09, - 0x00, 0xf8, 0x10, 0x78, 0x42, 0xa1, 0x78, 0x43, 0x00, 0x90, 0x78, 0x43, - 0x00, 0x10, 0x20, 0xa9, 0x09, 0xc4, 0x78, 0x20, 0xd0, 0x9c, 0x00, 0xc0, - 0x12, 0x81, 0x78, 0x24, 0xd0, 0xac, 0x00, 0xc0, 0x12, 0xca, 0x00, 0xf0, - 0x12, 0x79, 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x24, 0xe8, 0x00, 0x78, - 0x12, 0xd5, 0x78, 0x53, 0x00, 0x00, 0x78, 0x2f, 0x00, 0x20, 0x20, 0xa9, - 0x00, 0x50, 0x00, 0xe0, 0x12, 0x8f, 0x20, 0x91, 0x60, 0x00, 0x00, 0xf0, - 0x12, 0x8f, 0x78, 0x53, 0x04, 0x00, 0x78, 0x2f, 0x00, 0x00, 0x20, 0x09, - 0x00, 0xf8, 0x10, 0x78, 0x42, 0xa1, 0x20, 0xa9, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0xf0, 0x12, 0x9f, 0x78, 0x53, 0x14, 0x00, 0x78, 0x43, 0x00, 0x90, - 0x78, 0x43, 0x00, 0x10, 0x20, 0x19, 0x61, 0xa8, 0x78, 0x54, 0x00, 0x05, - 0x00, 0x05, 0xd0, 0x8c, 0x00, 0x40, 0x12, 0xb4, 0x78, 0x24, 0xd0, 0xac, - 0x00, 0xc0, 0x12, 0xca, 0x83, 0x19, 0x00, 0xc0, 0x12, 0xaa, 0x20, 0x09, - 0xa7, 0x32, 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, 0xa0, 0x84, 0xff, 0xf0, - 0x00, 0x40, 0x12, 0xc4, 0x20, 0x0b, 0x00, 0x00, 0x10, 0x78, 0x25, 0x88, - 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x24, 0xe8, 0x00, 0x78, 0x12, 0xd3, - 0x20, 0x01, 0xa7, 0x32, 0x20, 0x03, 0x00, 0x00, 0x78, 0x28, 0xc0, 0x9d, - 0x78, 0x2a, 0x78, 0x27, 0x00, 0x48, 0x78, 0x53, 0x04, 0x00, 0x15, 0x7f, - 0x03, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x0f, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x2a, 0x70, 0x20, 0x61, 0xa9, 0xad, - 0x20, 0x63, 0x00, 0x01, 0x60, 0x07, 0x00, 0x13, 0x60, 0x0b, 0x00, 0x19, - 0x60, 0x0f, 0x00, 0x17, 0x20, 0x09, 0x01, 0x00, 0x21, 0x04, 0xa0, 0x82, - 0x00, 0x02, 0x00, 0x48, 0x12, 0xf5, 0x70, 0x53, 0xff, 0xff, 0x00, 0x78, - 0x12, 0xf7, 0x70, 0x53, 0x00, 0x00, 0x70, 0x57, 0xff, 0xff, 0x70, 0x6f, - 0x00, 0x00, 0x70, 0x73, 0x00, 0x00, 0x10, 0x78, 0x90, 0xb6, 0x20, 0x61, - 0xa9, 0x8d, 0x60, 0x03, 0x09, 0x09, 0x60, 0x07, 0x00, 0x00, 0x60, 0x0b, - 0x88, 0x00, 0x60, 0x0f, 0x02, 0x00, 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, - 0x00, 0x03, 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, 0x07, 0xd0, 0x20, 0x61, - 0xa9, 0x95, 0x60, 0x03, 0x80, 0x00, 0x60, 0x07, 0x00, 0x00, 0x60, 0x0b, - 0x00, 0x00, 0x60, 0x0f, 0x02, 0x00, 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, - 0x00, 0x00, 0x60, 0x1b, 0x00, 0x01, 0x60, 0x1f, 0x00, 0x00, 0x20, 0x61, - 0xa9, 0xa5, 0x60, 0x03, 0x51, 0x4c, 0x60, 0x07, 0x4f, 0x47, 0x60, 0x0b, - 0x49, 0x43, 0x60, 0x0f, 0x20, 0x20, 0x20, 0x01, 0xa7, 0x26, 0x20, 0x03, - 0x00, 0x00, 0x00, 0x7c, 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x13, 0x34, - 0x00, 0x7e, 0x01, 0x7e, 0x20, 0x79, 0x00, 0x00, 0x78, 0x18, 0xd0, 0x84, - 0x00, 0xc0, 0x13, 0x3a, 0x01, 0x7f, 0x79, 0x2e, 0x00, 0x7f, 0x78, 0x2a, - 0x00, 0x7f, 0x78, 0x26, 0x39, 0x00, 0x78, 0x3a, 0x78, 0x23, 0x80, 0x02, - 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x79, 0xa7, 0x00, 0x78, 0x03, 0x00, 0x05, 0x00, 0x78, 0x13, 0x52, - 0x00, 0x7c, 0x20, 0x71, 0xa7, 0x00, 0x71, 0x5c, 0x71, 0x2e, 0x20, 0x21, - 0x00, 0x01, 0xa1, 0x90, 0x00, 0x2d, 0xa2, 0x98, 0x00, 0x2d, 0x00, 0x48, - 0x13, 0x6b, 0x70, 0x60, 0xa3, 0x02, 0x00, 0xc8, 0x13, 0x6b, 0x22, 0x0a, - 0x22, 0x08, 0x23, 0x10, 0x84, 0x20, 0x00, 0x78, 0x13, 0x5d, 0x20, 0x0b, - 0x00, 0x00, 0x74, 0xaa, 0x74, 0xae, 0x00, 0x7c, 0x0e, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x70, 0xac, 0xa0, 0xea, - 0x00, 0x10, 0x00, 0xc8, 0x13, 0x7e, 0xa0, 0x6e, 0x00, 0x78, 0x13, 0x88, - 0x80, 0x01, 0x70, 0xae, 0x70, 0x2c, 0x20, 0x68, 0x2d, 0x04, 0x70, 0x2e, - 0x20, 0x6b, 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x12, 0x7f, 0x0e, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x70, 0xac, 0x80, 0x01, 0x00, 0xc8, 0x13, 0x98, 0xa0, 0x6e, - 0x00, 0x78, 0x13, 0xa1, 0x70, 0xae, 0x70, 0x2c, 0x20, 0x68, 0x2d, 0x04, - 0x70, 0x2e, 0x20, 0x6b, 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x12, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0xa7, 0x00, 0x70, 0x2c, 0x20, 0x6a, 0x2d, 0x00, 0x70, 0x2e, - 0x70, 0xac, 0x80, 0x00, 0x70, 0xae, 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x8d, 0xff, 0x00, 0x40, 0x13, 0xc0, 0x68, 0x04, 0x68, 0x07, 0x00, 0x00, - 0x00, 0x7e, 0x10, 0x78, 0x13, 0xa4, 0x0d, 0x7f, 0x00, 0x78, 0x13, 0xb4, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x70, 0xac, 0xa0, 0x8a, - 0x00, 0x10, 0xa0, 0x0d, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, - 0xa9, 0xd6, 0x70, 0x07, 0x00, 0x00, 0x70, 0x1b, 0x00, 0x00, 0x70, 0x1f, - 0x00, 0x00, 0x20, 0x71, 0x00, 0x00, 0x70, 0x10, 0xa0, 0x85, 0x80, 0x04, - 0x70, 0x12, 0x0e, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x0e, 0x7e, 0x22, 0x70, 0x70, 0x0b, 0x00, 0x00, 0x20, 0x71, 0xa9, 0xd6, - 0x70, 0x18, 0xa0, 0x88, 0xa9, 0xdf, 0x22, 0x0a, 0x80, 0x00, 0xa0, 0x84, - 0x00, 0x07, 0x70, 0x1a, 0x70, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x13, 0xf6, - 0x0f, 0x7e, 0x20, 0x79, 0x00, 0x10, 0x10, 0x78, 0x14, 0x08, 0x0f, 0x7f, - 0x0e, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xd6, - 0x70, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x14, 0x06, 0x0f, 0x7e, 0x20, 0x79, - 0x00, 0x10, 0x10, 0x78, 0x14, 0x08, 0x0f, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x70, 0x00, 0x00, 0x79, 0x14, 0x0b, 0x14, 0x0f, 0x14, 0x79, 0x14, 0x96, - 0x14, 0x96, 0x70, 0x18, 0x71, 0x1c, 0xa1, 0x06, 0x00, 0xc0, 0x14, 0x17, - 0x70, 0x07, 0x00, 0x00, 0x00, 0x7c, 0x0d, 0x7e, 0xa1, 0x80, 0xa9, 0xdf, - 0x20, 0x04, 0x70, 0x0a, 0x20, 0x68, 0x81, 0x08, 0xa1, 0x8c, 0x00, 0x07, - 0x71, 0x1e, 0x78, 0x03, 0x00, 0x26, 0x68, 0x24, 0x78, 0x32, 0x68, 0x28, - 0x78, 0x36, 0x68, 0x2c, 0x78, 0x3a, 0x68, 0x30, 0x78, 0x3e, 0x68, 0x10, - 0x70, 0x0e, 0x68, 0x0c, 0x70, 0x16, 0x68, 0x04, 0x0d, 0x7f, 0xd0, 0x84, - 0x00, 0x40, 0x14, 0x39, 0x70, 0x07, 0x00, 0x01, 0x10, 0x78, 0x14, 0x3e, - 0x00, 0x7c, 0x70, 0x07, 0x00, 0x02, 0x10, 0x78, 0x14, 0x54, 0x00, 0x7c, - 0x01, 0x7e, 0x02, 0x7e, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, 0xa1, 0x82, - 0x00, 0x40, 0x00, 0xc8, 0x14, 0x49, 0x21, 0x10, 0xa0, 0x06, 0x70, 0x0e, - 0x72, 0x12, 0x82, 0x03, 0x78, 0x22, 0x78, 0x03, 0x00, 0x20, 0x78, 0x03, - 0x00, 0x41, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x02, 0x7e, - 0x13, 0x7e, 0x14, 0x7e, 0x15, 0x7e, 0x70, 0x14, 0x20, 0x98, 0x20, 0xa1, - 0x00, 0x14, 0x78, 0x03, 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0xc8, 0x14, 0x68, 0x21, 0x10, 0xa0, 0x06, - 0x70, 0x0e, 0x22, 0xa8, 0x53, 0xa6, 0x82, 0x03, 0x78, 0x22, 0x78, 0x03, - 0x00, 0x20, 0x33, 0x00, 0x70, 0x16, 0x78, 0x03, 0x00, 0x01, 0x15, 0x7f, - 0x14, 0x7f, 0x13, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x13, 0x7e, - 0x14, 0x7e, 0x15, 0x7e, 0x20, 0x99, 0xa7, 0xfa, 0x20, 0xa1, 0x00, 0x18, - 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa3, 0x78, 0x03, 0x00, 0x20, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x78, 0x03, 0x00, 0x41, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x00, 0xc0, 0x84, 0x70, 0x02, 0x70, 0x0b, 0xa7, 0xf5, 0x12, 0x7f, - 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x00, 0x7c, 0x13, 0x7e, 0x14, 0x7e, - 0x15, 0x7e, 0x20, 0x01, 0xa8, 0x29, 0x20, 0x9c, 0x20, 0xa1, 0x00, 0x14, - 0x78, 0x03, 0x00, 0x26, 0x20, 0x01, 0xa8, 0x2a, 0x20, 0xac, 0x53, 0xa6, - 0x20, 0x99, 0xa8, 0x2b, 0x20, 0xa1, 0x00, 0x18, 0x20, 0xa9, 0x00, 0x08, - 0x53, 0xa3, 0x78, 0x03, 0x00, 0x20, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x03, 0x00, 0x01, 0x70, 0x07, 0x00, 0x04, 0x70, 0x00, 0xc0, 0x8c, - 0x70, 0x02, 0x70, 0x0b, 0xa8, 0x26, 0x12, 0x7f, 0x15, 0x7f, 0x14, 0x7f, - 0x13, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xd6, - 0x0f, 0x7e, 0x20, 0x79, 0x00, 0x10, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, - 0xd1, 0xfc, 0x00, 0x40, 0x14, 0xd0, 0xa1, 0x8c, 0x07, 0x00, 0x70, 0x04, - 0x10, 0x79, 0x14, 0xd4, 0x0f, 0x7f, 0x0e, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x14, 0x08, 0x14, 0xdc, 0x15, 0x09, 0x15, 0x31, 0x15, 0x64, 0x14, 0xda, - 0x00, 0x78, 0x14, 0xda, 0xa1, 0x8c, 0x07, 0x00, 0x00, 0xc0, 0x15, 0x02, - 0x13, 0x7e, 0x14, 0x7e, 0x15, 0x7e, 0x70, 0x14, 0x20, 0xa0, 0x20, 0x99, - 0x00, 0x14, 0x78, 0x03, 0x00, 0x40, 0x70, 0x10, 0x20, 0xa8, 0x53, 0xa5, - 0x34, 0x00, 0x70, 0x16, 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x70, 0x0c, - 0xa0, 0x05, 0x00, 0x40, 0x15, 0x1e, 0x10, 0x78, 0x14, 0x3e, 0x00, 0x7c, - 0x70, 0x08, 0xa0, 0x80, 0x00, 0x02, 0x20, 0x03, 0x01, 0x00, 0x70, 0x07, - 0x00, 0x00, 0x10, 0x78, 0x14, 0x08, 0x00, 0x7c, 0x70, 0x08, 0xa0, 0x80, - 0x00, 0x02, 0x20, 0x03, 0x02, 0x00, 0x00, 0x78, 0x14, 0xfd, 0xa1, 0x8c, - 0x07, 0x00, 0x00, 0xc0, 0x15, 0x14, 0x70, 0x0c, 0xa0, 0x05, 0x00, 0x40, - 0x15, 0x1e, 0x10, 0x78, 0x14, 0x54, 0x00, 0x7c, 0x70, 0x08, 0xa0, 0x80, - 0x00, 0x02, 0x20, 0x03, 0x02, 0x00, 0x70, 0x07, 0x00, 0x00, 0x10, 0x78, - 0x14, 0x08, 0x00, 0x7c, 0x0d, 0x7e, 0x70, 0x08, 0x20, 0x68, 0x78, 0x30, - 0x68, 0x26, 0x78, 0x34, 0x68, 0x2a, 0x78, 0x38, 0x68, 0x2e, 0x78, 0x3c, - 0x68, 0x32, 0x68, 0x0b, 0x01, 0x00, 0x0d, 0x7f, 0x70, 0x07, 0x00, 0x00, - 0x10, 0x78, 0x14, 0x08, 0x00, 0x7c, 0xa1, 0x8c, 0x07, 0x00, 0x00, 0xc0, - 0x15, 0x5e, 0x13, 0x7e, 0x14, 0x7e, 0x15, 0x7e, 0x20, 0x01, 0xa7, 0xf8, - 0x20, 0x04, 0xa0, 0x80, 0x00, 0x0d, 0x20, 0xa0, 0x20, 0x99, 0x00, 0x14, - 0x78, 0x03, 0x00, 0x40, 0x20, 0xa9, 0x00, 0x20, 0x53, 0xa5, 0x20, 0x01, - 0xa7, 0xfa, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x15, 0x54, 0x20, 0x01, - 0xa8, 0x03, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x0d, 0x20, 0xa0, 0x20, 0xa9, - 0x00, 0x20, 0x53, 0xa5, 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x70, 0x07, - 0x00, 0x00, 0x10, 0x78, 0x4f, 0x8c, 0x10, 0x78, 0x14, 0x08, 0x00, 0x7c, - 0x20, 0x11, 0x80, 0x03, 0x10, 0x78, 0x36, 0x1b, 0x00, 0x78, 0x15, 0x62, - 0xa1, 0x8c, 0x07, 0x00, 0x00, 0xc0, 0x15, 0x71, 0x20, 0x01, 0xa8, 0x28, - 0x20, 0x03, 0x01, 0x00, 0x70, 0x07, 0x00, 0x00, 0x10, 0x78, 0x14, 0x08, - 0x00, 0x7c, 0x20, 0x11, 0x80, 0x04, 0x10, 0x78, 0x36, 0x1b, 0x00, 0x78, - 0x15, 0x75, 0x12, 0x7e, 0x20, 0x91, 0x21, 0x00, 0x20, 0x79, 0x00, 0x30, - 0x20, 0x71, 0xa9, 0xe7, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x70, 0x0f, 0xa9, 0xed, 0x70, 0x13, 0xa9, 0xed, 0x78, 0x0f, 0x00, 0x76, - 0x78, 0x03, 0x00, 0x04, 0x12, 0x7f, 0x00, 0x7c, 0x69, 0x34, 0xa1, 0x84, - 0x00, 0x07, 0x00, 0x79, 0x15, 0x91, 0x15, 0x99, 0x15, 0xdf, 0x15, 0x99, - 0x15, 0x99, 0x15, 0x99, 0x15, 0xc4, 0x15, 0xa8, 0x15, 0x9d, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x15, 0xf9, 0x68, 0x4c, 0xd0, 0xbc, 0x00, 0x40, - 0x15, 0x99, 0x68, 0x60, 0x68, 0x2e, 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x58, - 0x00, 0x78, 0x15, 0xe7, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x1e, - 0x00, 0xc0, 0x15, 0x99, 0x68, 0x4c, 0xd0, 0xbc, 0x00, 0x40, 0x15, 0x99, - 0x68, 0x60, 0x68, 0x2e, 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x04, 0x68, 0x1a, - 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, - 0x20, 0x6a, 0x20, 0x04, 0x68, 0x32, 0x68, 0x58, 0x00, 0x78, 0x15, 0xef, - 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x15, 0x00, 0xc0, 0x15, 0x99, - 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x15, 0x99, 0x68, 0x04, 0x68, 0x1a, - 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, - 0x20, 0x6a, 0x20, 0x04, 0x68, 0x32, 0xa0, 0x06, 0x68, 0x2e, 0x68, 0x2a, - 0x68, 0x58, 0x00, 0x78, 0x15, 0xef, 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, - 0x15, 0x99, 0xa0, 0x06, 0x68, 0x2e, 0x68, 0x2a, 0x68, 0x58, 0xa1, 0x8c, - 0x00, 0x0f, 0xa1, 0x88, 0x20, 0x6a, 0x21, 0x0c, 0x69, 0x32, 0x2d, 0x08, - 0x69, 0x1a, 0x68, 0x26, 0x68, 0x4c, 0xc0, 0xdd, 0x68, 0x4e, 0xa0, 0x06, - 0x68, 0x0a, 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, 0x00, 0x7c, - 0x20, 0xe1, 0x00, 0x07, 0x20, 0xe1, 0x20, 0x00, 0x20, 0x01, 0x02, 0x0a, - 0x20, 0x04, 0x82, 0xff, 0x00, 0x40, 0x16, 0x1c, 0xa2, 0x80, 0x00, 0x04, - 0x0d, 0x7e, 0x20, 0x6c, 0x68, 0x4c, 0xd0, 0xdc, 0x00, 0xc0, 0x16, 0x18, - 0x10, 0x78, 0x15, 0x8c, 0x00, 0x40, 0x16, 0x18, 0x0d, 0x7f, 0xa2, 0x80, - 0x00, 0x00, 0x20, 0x03, 0x00, 0x02, 0xa0, 0x16, 0x00, 0x78, 0x16, 0x1c, - 0x68, 0x08, 0x80, 0x00, 0x68, 0x0a, 0x0d, 0x7f, 0x12, 0x7e, 0x04, 0x7e, - 0x03, 0x7e, 0x02, 0x7e, 0x20, 0x91, 0x21, 0x00, 0x02, 0x7f, 0x03, 0x7f, - 0x04, 0x7f, 0x70, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0x16, 0x30, 0x72, 0x06, - 0x20, 0x01, 0x16, 0x51, 0x00, 0x7e, 0x22, 0x60, 0x00, 0x78, 0x17, 0xe0, - 0x71, 0x0c, 0x22, 0x0a, 0x81, 0x08, 0x23, 0x0a, 0x81, 0x08, 0x24, 0x0a, - 0x81, 0x08, 0xa1, 0x82, 0xaa, 0x08, 0x00, 0x48, 0x16, 0x3d, 0x20, 0x09, - 0xa9, 0xed, 0x71, 0x0e, 0x70, 0x10, 0xa1, 0x02, 0xa0, 0x82, 0x00, 0x09, - 0x00, 0x40, 0x16, 0x48, 0xa0, 0x80, 0x00, 0x1b, 0x00, 0xc0, 0x16, 0x4b, - 0x20, 0x09, 0x01, 0x38, 0x20, 0x0a, 0x70, 0x00, 0xa0, 0x05, 0x00, 0xc0, - 0x16, 0x51, 0x10, 0x78, 0x17, 0xc1, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x02, 0x7e, 0x03, 0x7e, 0x0c, 0x7e, 0x00, 0x7e, 0x20, 0x91, 0x21, 0x00, - 0x00, 0x7f, 0x04, 0x7f, 0x03, 0x7f, 0x02, 0x7f, 0x0d, 0x7e, 0x0c, 0x7e, - 0x24, 0x60, 0x61, 0x10, 0x21, 0x68, 0x6a, 0x62, 0x6b, 0x5e, 0xa0, 0x05, - 0x00, 0x40, 0x16, 0xdd, 0x68, 0x08, 0xa0, 0x05, 0x00, 0x40, 0x17, 0x4a, - 0x70, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0x16, 0x72, 0x00, 0x78, 0x16, 0xd2, - 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x00, 0xc0, 0x17, 0x53, 0x70, 0x04, - 0xa4, 0x06, 0x00, 0xc0, 0x16, 0xd2, 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, - 0xd0, 0x8c, 0x00, 0x40, 0x16, 0x8f, 0x04, 0x7e, 0x10, 0x78, 0x19, 0x13, - 0x04, 0x7f, 0x24, 0x60, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, 0x20, 0x04, - 0xa0, 0x05, 0x00, 0x40, 0x17, 0x4a, 0x00, 0x78, 0x16, 0x6c, 0x20, 0x01, - 0x02, 0x07, 0x20, 0x04, 0xd0, 0x9c, 0x00, 0xc0, 0x16, 0x7b, 0x78, 0x04, - 0xa0, 0x84, 0x60, 0x00, 0x00, 0x40, 0x16, 0xa0, 0xa0, 0x86, 0x60, 0x00, - 0x00, 0x40, 0x16, 0xa0, 0x00, 0x78, 0x16, 0x7b, 0x71, 0x00, 0xa1, 0x86, - 0x00, 0x02, 0x00, 0xc0, 0x16, 0xc0, 0x0e, 0x7e, 0x2b, 0x68, 0x68, 0x18, - 0x20, 0x60, 0x10, 0x78, 0x20, 0x3f, 0x28, 0x04, 0xac, 0x70, 0x60, 0x34, - 0xd0, 0x9c, 0x00, 0xc0, 0x16, 0xb5, 0x71, 0x08, 0x72, 0x0c, 0x00, 0x78, - 0x16, 0xb7, 0x71, 0x10, 0x72, 0x14, 0x68, 0x10, 0xa1, 0x00, 0x68, 0x12, - 0x68, 0x14, 0xa2, 0x01, 0x68, 0x16, 0x0e, 0x7f, 0x00, 0x78, 0x16, 0xc4, - 0xa1, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x16, 0xcc, 0x78, 0x20, 0x69, 0x10, - 0xa1, 0x00, 0x68, 0x12, 0x78, 0x24, 0x69, 0x14, 0xa1, 0x01, 0x68, 0x16, - 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, - 0x61, 0x00, 0xa1, 0x8e, 0x00, 0x04, 0x00, 0xc0, 0x17, 0x53, 0x20, 0x09, - 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x17, 0x53, 0x68, 0x08, - 0xa0, 0x05, 0x00, 0x40, 0x17, 0x4a, 0x70, 0x00, 0xa0, 0x05, 0x00, 0xc0, - 0x16, 0xe7, 0x00, 0x78, 0x17, 0x4a, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, - 0x00, 0xc0, 0x16, 0xf0, 0x70, 0x04, 0xa4, 0x06, 0x00, 0xc0, 0x17, 0x4a, - 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, 0xd0, 0x8c, 0x00, 0x40, 0x17, 0x04, - 0x04, 0x7e, 0x10, 0x78, 0x19, 0x13, 0x04, 0x7f, 0x24, 0x60, 0x60, 0x10, - 0xa0, 0x80, 0x00, 0x02, 0x20, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x17, 0x4a, - 0x00, 0x78, 0x16, 0xe1, 0x20, 0x01, 0x02, 0x07, 0x20, 0x04, 0xd0, 0x9c, - 0x00, 0xc0, 0x16, 0xf0, 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, 0xd0, 0x8c, - 0x00, 0xc0, 0x16, 0xf6, 0x78, 0x04, 0xa0, 0x84, 0x60, 0x00, 0x00, 0x40, - 0x17, 0x1b, 0xa0, 0x86, 0x60, 0x00, 0x00, 0x40, 0x17, 0x1b, 0x00, 0x78, - 0x16, 0xf0, 0x70, 0x07, 0x00, 0x00, 0xa0, 0x16, 0x22, 0x18, 0x70, 0x00, - 0xa0, 0x8e, 0x00, 0x01, 0x00, 0x40, 0x17, 0x3c, 0xa0, 0x8e, 0x00, 0x02, - 0x00, 0xc0, 0x17, 0x4a, 0x0c, 0x7e, 0x0e, 0x7e, 0x68, 0x18, 0x20, 0x60, - 0x10, 0x78, 0x20, 0x3f, 0x28, 0x04, 0xac, 0x70, 0x60, 0x34, 0xd0, 0x9c, - 0x00, 0xc0, 0x17, 0x38, 0x73, 0x08, 0x72, 0x0c, 0x00, 0x78, 0x17, 0x3a, - 0x73, 0x10, 0x72, 0x14, 0x0e, 0x7f, 0x0c, 0x7f, 0x78, 0x20, 0xa3, 0x18, - 0x78, 0x24, 0xa2, 0x11, 0x68, 0x10, 0xa3, 0x00, 0x68, 0x12, 0x68, 0x14, - 0xa2, 0x01, 0x68, 0x16, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x61, 0x00, 0xa1, 0x8e, 0x00, 0x04, 0x00, 0xc0, 0x17, 0x53, 0x20, 0x09, - 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x0c, 0x7f, 0x0d, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x04, 0x7e, - 0x05, 0x7e, 0x20, 0x71, 0xa9, 0xe7, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x00, 0x40, 0x17, 0xba, 0x70, 0x04, 0xac, 0x06, 0x00, 0xc0, 0x17, 0xab, - 0x20, 0x79, 0x00, 0x30, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x00, 0x40, - 0x17, 0xab, 0x78, 0x04, 0xd0, 0xfc, 0x00, 0xc0, 0x17, 0xa7, 0x20, 0xe1, - 0x60, 0x00, 0x20, 0x11, 0x00, 0x32, 0x20, 0x01, 0x02, 0x08, 0x20, 0x0c, - 0x20, 0x01, 0x02, 0x09, 0x20, 0x04, 0xa1, 0x06, 0x00, 0xc0, 0x17, 0x6f, - 0x82, 0x11, 0x00, 0xc0, 0x17, 0x77, 0x78, 0x04, 0xd0, 0xfc, 0x00, 0xc0, - 0x17, 0xa7, 0x10, 0x78, 0x1b, 0x22, 0x02, 0x7e, 0x05, 0x7e, 0x78, 0x03, - 0x00, 0x04, 0x78, 0x04, 0xd0, 0xac, 0x00, 0xc0, 0x17, 0x8d, 0x78, 0x03, - 0x00, 0x02, 0x78, 0x03, 0x00, 0x09, 0x70, 0x03, 0x00, 0x03, 0x70, 0x07, - 0x00, 0x00, 0x05, 0x7f, 0x02, 0x7f, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, 0x20, 0x01, 0x01, 0x38, - 0x22, 0x02, 0x00, 0x78, 0x17, 0xab, 0x10, 0x78, 0x19, 0x13, 0x00, 0x78, - 0x17, 0x5f, 0x15, 0x7e, 0x20, 0xa9, 0x00, 0x09, 0x20, 0x09, 0xa9, 0xed, - 0x21, 0x04, 0xac, 0x06, 0x00, 0xc0, 0x17, 0xb5, 0x20, 0x0a, 0xa1, 0x88, - 0x00, 0x03, 0x00, 0xf0, 0x17, 0xb0, 0x15, 0x7f, 0x05, 0x7f, 0x04, 0x7f, - 0x03, 0x7f, 0x02, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x0c, - 0x71, 0x10, 0xa1, 0x06, 0x00, 0xc0, 0x17, 0xc9, 0x70, 0x03, 0x00, 0x00, - 0x00, 0x7c, 0x21, 0x04, 0x70, 0x06, 0x20, 0x60, 0x81, 0x08, 0x21, 0x1c, - 0x81, 0x08, 0x21, 0x24, 0x81, 0x08, 0xa1, 0x82, 0xaa, 0x08, 0x00, 0x48, - 0x17, 0xd7, 0x20, 0x09, 0xa9, 0xed, 0x71, 0x12, 0x70, 0x0c, 0xa1, 0x06, - 0x00, 0xc0, 0x17, 0xe0, 0x20, 0x01, 0x01, 0x38, 0x20, 0x03, 0x00, 0x08, - 0x8c, 0xff, 0x00, 0xc0, 0x17, 0xe7, 0x10, 0x78, 0x1b, 0x4d, 0x00, 0x78, - 0x18, 0x54, 0x60, 0x10, 0x20, 0x68, 0x2d, 0x58, 0x68, 0x28, 0xa4, 0x06, - 0x00, 0xc0, 0x17, 0xf2, 0x68, 0x2c, 0xa3, 0x06, 0x00, 0x40, 0x18, 0x2f, - 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x08, 0x00, 0x40, 0x18, 0x2f, 0x60, 0x24, - 0xd0, 0xf4, 0x00, 0xc0, 0x18, 0x1c, 0xd0, 0xd4, 0x00, 0x40, 0x18, 0x18, - 0x60, 0x38, 0xa4, 0x02, 0x60, 0x34, 0xa3, 0x03, 0x00, 0x40, 0x18, 0x06, - 0x00, 0xc8, 0x18, 0x18, 0x64, 0x3a, 0x63, 0x36, 0x6c, 0x2a, 0x6b, 0x2e, - 0x04, 0x7e, 0x03, 0x7e, 0x24, 0x00, 0x6c, 0x7c, 0xa4, 0x02, 0x68, 0x12, - 0x23, 0x00, 0x6b, 0x80, 0xa3, 0x03, 0x68, 0x16, 0x03, 0x7f, 0x04, 0x7f, - 0x00, 0x78, 0x18, 0x1c, 0x10, 0x78, 0x90, 0x63, 0x00, 0x40, 0x17, 0xe3, - 0x20, 0x01, 0xa7, 0x74, 0x20, 0x04, 0xd0, 0xb4, 0x00, 0xc0, 0x18, 0x2b, - 0x60, 0x18, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0xc0, 0x18, 0x2b, 0x68, 0x17, - 0x7f, 0xff, 0x68, 0x13, 0xff, 0xff, 0x10, 0x78, 0x20, 0x8a, 0x00, 0xc0, - 0x17, 0xe3, 0x0c, 0x7e, 0x70, 0x04, 0x20, 0x60, 0x60, 0x24, 0xc0, 0xd4, - 0x60, 0x26, 0x0c, 0x7f, 0x68, 0x4c, 0xd0, 0xf4, 0x00, 0x40, 0x18, 0x40, - 0x68, 0x17, 0xff, 0xff, 0x68, 0x13, 0xff, 0xff, 0x00, 0x78, 0x17, 0xe3, - 0x68, 0x24, 0x20, 0x50, 0x68, 0x18, 0x20, 0x60, 0x68, 0x30, 0x20, 0x40, - 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0x20, 0x09, 0x00, 0x11, 0x10, 0x78, - 0x18, 0x55, 0x00, 0x40, 0x18, 0x53, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, - 0x18, 0x55, 0x2d, 0x58, 0x00, 0x7c, 0x8a, 0xff, 0x00, 0x40, 0x18, 0xec, - 0xa0, 0x3e, 0x27, 0x30, 0x68, 0x50, 0xd0, 0xfc, 0x00, 0xc0, 0x18, 0x77, - 0xd0, 0xf4, 0x00, 0xc0, 0x18, 0x87, 0x0d, 0x7e, 0x28, 0x04, 0xac, 0x68, - 0x29, 0x00, 0x00, 0x79, 0x18, 0x67, 0x18, 0xce, 0x18, 0x8e, 0x18, 0x8e, - 0x18, 0xce, 0x18, 0xce, 0x18, 0xc6, 0x18, 0xce, 0x18, 0x8e, 0x18, 0xce, - 0x18, 0x94, 0x18, 0x94, 0x18, 0xce, 0x18, 0xce, 0x18, 0xce, 0x18, 0xbd, - 0x18, 0x94, 0xc0, 0xfc, 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, 0x6d, 0x1c, - 0x6c, 0x20, 0x0d, 0x7e, 0xd9, 0x9c, 0x00, 0x40, 0x18, 0xd1, 0x28, 0x04, - 0xac, 0x68, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0x78, 0x18, 0xd1, 0xc0, 0xf4, - 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, 0x0d, 0x7e, 0x00, 0x78, 0x18, 0xd8, - 0x6b, 0x08, 0x6a, 0x0c, 0x6d, 0x00, 0x6c, 0x04, 0x00, 0x78, 0x18, 0xd1, - 0x7b, 0x0c, 0xd3, 0xbc, 0x00, 0x40, 0x18, 0xb5, 0x70, 0x04, 0x0e, 0x7e, - 0x20, 0x70, 0x70, 0x1c, 0x0e, 0x7f, 0xa0, 0x86, 0x00, 0x08, 0x00, 0xc0, - 0x18, 0xb5, 0x7b, 0x08, 0xa3, 0x9c, 0x0f, 0xff, 0x2d, 0x20, 0x0d, 0x7f, - 0x0d, 0x7e, 0x6a, 0x14, 0x82, 0xff, 0x00, 0xc0, 0x18, 0xb0, 0x68, 0x10, - 0xa3, 0x02, 0x00, 0x48, 0x18, 0xb0, 0x6b, 0x10, 0x20, 0x11, 0x00, 0x00, - 0x24, 0x68, 0x00, 0x78, 0x18, 0xb7, 0x6b, 0x10, 0x6a, 0x14, 0x6d, 0x00, - 0x6c, 0x04, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0x78, 0x18, 0xd1, 0x0d, 0x7f, - 0x0d, 0x7e, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, - 0x00, 0xc0, 0x18, 0xce, 0x0d, 0x7f, 0x10, 0x78, 0x20, 0x26, 0x00, 0xc0, - 0x18, 0x55, 0xa0, 0x0e, 0x00, 0x78, 0x18, 0xec, 0x0d, 0x7f, 0x10, 0x78, - 0x13, 0x32, 0x7b, 0x22, 0x7a, 0x26, 0x7d, 0x32, 0x7c, 0x36, 0x7f, 0x3a, - 0x7e, 0x3e, 0x79, 0x02, 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0x0d, 0x7f, - 0x68, 0x28, 0xa3, 0x00, 0x68, 0x2a, 0x68, 0x2c, 0xa2, 0x01, 0x68, 0x2e, - 0x23, 0x00, 0x6b, 0x10, 0xa3, 0x02, 0x68, 0x12, 0x22, 0x00, 0x6a, 0x14, - 0xa2, 0x03, 0x68, 0x16, 0x10, 0x78, 0x20, 0x26, 0x00, 0x7c, 0x10, 0x78, - 0x13, 0x32, 0x10, 0x78, 0x1c, 0x97, 0x70, 0x04, 0x20, 0x60, 0x0d, 0x7e, - 0x60, 0x10, 0x20, 0x68, 0x70, 0x03, 0x00, 0x00, 0x10, 0x78, 0x1a, 0xf4, - 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x19, 0x0c, 0x68, 0x08, 0x80, 0x01, - 0x68, 0x0a, 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, 0x68, 0x2b, - 0xff, 0xff, 0x68, 0x2f, 0xff, 0xff, 0x68, 0x50, 0xc0, 0xbd, 0x68, 0x52, - 0x0d, 0x7f, 0x10, 0x78, 0x8a, 0x11, 0x00, 0x78, 0x1a, 0xdb, 0x10, 0x78, - 0x13, 0x32, 0x12, 0x7e, 0x20, 0x91, 0x21, 0x00, 0x00, 0x7e, 0x01, 0x7e, - 0x2b, 0x68, 0x68, 0x18, 0x20, 0x60, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, - 0xa1, 0x84, 0x07, 0x00, 0x00, 0xc0, 0x18, 0xef, 0xa1, 0x84, 0x00, 0x03, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0x40, 0x19, 0x11, 0x70, 0x00, 0x00, 0x79, - 0x19, 0x2b, 0x19, 0x33, 0x19, 0x35, 0x1a, 0x34, 0x1a, 0xb2, 0x1a, 0xc9, - 0x19, 0x33, 0x19, 0x33, 0x19, 0x33, 0x10, 0x78, 0x13, 0x32, 0x80, 0x01, - 0x70, 0x02, 0xa1, 0x84, 0x08, 0x80, 0x00, 0xc0, 0x19, 0x4a, 0x8a, 0xff, - 0x00, 0x40, 0x19, 0xd4, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x18, 0x55, - 0x00, 0x40, 0x1a, 0xdb, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x18, 0x55, - 0x00, 0x78, 0x1a, 0xdb, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0xd1, 0xbc, 0x00, 0xc0, 0x19, 0xb2, 0x02, 0x7e, 0x03, 0x7e, 0x01, 0x7e, - 0x78, 0x08, 0xd0, 0xec, 0x00, 0xc0, 0x19, 0x62, 0x7c, 0x20, 0x7d, 0x24, - 0x7e, 0x30, 0x7f, 0x34, 0x78, 0x03, 0x00, 0x09, 0x70, 0x03, 0x00, 0x04, - 0x00, 0x78, 0x19, 0x64, 0x10, 0x78, 0x1b, 0xd7, 0x01, 0x7f, 0xd1, 0x94, - 0x00, 0x40, 0x19, 0x6b, 0x8a, 0xff, 0x00, 0x40, 0x19, 0xa1, 0x6b, 0x28, - 0x6a, 0x2c, 0x24, 0x00, 0x68, 0x6e, 0xa3, 0x1a, 0x25, 0x00, 0x68, 0x72, - 0xa2, 0x13, 0x6b, 0x2a, 0x6a, 0x2e, 0x0c, 0x7e, 0x70, 0x04, 0x20, 0x60, - 0x60, 0x24, 0xd0, 0xf4, 0x00, 0xc0, 0x19, 0x7e, 0x63, 0x3a, 0x62, 0x36, - 0x0c, 0x7f, 0x24, 0x00, 0x69, 0x10, 0xa1, 0x00, 0x68, 0x12, 0x25, 0x00, - 0x69, 0x14, 0xa1, 0x01, 0x68, 0x16, 0x03, 0x7f, 0x02, 0x7f, 0x26, 0x00, - 0x68, 0x1e, 0x27, 0x00, 0x68, 0x22, 0x10, 0x78, 0x20, 0x3f, 0x2a, 0x00, - 0x68, 0x26, 0x2c, 0x00, 0x68, 0x1a, 0x28, 0x00, 0x68, 0x32, 0x68, 0x50, - 0xc0, 0xfd, 0x68, 0x52, 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, 0x00, 0xc0, - 0x19, 0xa7, 0x68, 0x4c, 0xd0, 0xe4, 0x00, 0x40, 0x19, 0xa7, 0x70, 0x04, - 0x20, 0x60, 0x20, 0x09, 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x04, 0x00, 0x40, 0x1a, 0xdb, 0x70, 0x03, 0x00, 0x00, - 0x10, 0x78, 0x17, 0xc1, 0x00, 0x78, 0x1a, 0xdb, 0x05, 0x7e, 0x7d, 0x0c, - 0xd5, 0xbc, 0x00, 0xc0, 0x19, 0xb9, 0x10, 0x78, 0xa5, 0x8e, 0x05, 0x7f, - 0x10, 0x78, 0x1a, 0xf4, 0x0f, 0x7e, 0x70, 0x04, 0x20, 0x78, 0x10, 0x78, - 0x49, 0x63, 0x00, 0x40, 0x19, 0xc6, 0x78, 0x24, 0xc0, 0xf5, 0x78, 0x26, - 0x0f, 0x7f, 0x68, 0x2b, 0xff, 0xff, 0x68, 0x2f, 0xff, 0xff, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, - 0x00, 0x78, 0x1a, 0xdb, 0x70, 0x04, 0x0c, 0x7e, 0x20, 0x60, 0x60, 0x24, - 0x0c, 0x7f, 0xd0, 0xf4, 0x00, 0x40, 0x19, 0xe1, 0x68, 0x08, 0x80, 0x01, - 0x68, 0x0a, 0x00, 0x78, 0x19, 0xf5, 0x68, 0x4c, 0xc0, 0xf5, 0x68, 0x4e, - 0x78, 0x14, 0xa0, 0x05, 0x00, 0xc0, 0x19, 0xf9, 0x70, 0x03, 0x00, 0x00, - 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, 0x00, 0xc0, 0x19, 0xf5, 0x70, 0x04, - 0x20, 0x60, 0x20, 0x09, 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x10, 0x78, - 0x17, 0xc1, 0x00, 0x78, 0x1a, 0xdb, 0x78, 0x14, 0x69, 0x10, 0xa1, 0x02, - 0x68, 0x12, 0x69, 0x14, 0xa1, 0x83, 0x00, 0x00, 0x68, 0x16, 0x78, 0x14, - 0x79, 0x08, 0xa1, 0x8c, 0x0f, 0xff, 0xa1, 0x92, 0x08, 0x41, 0x00, 0xc8, - 0x18, 0xef, 0xa1, 0x88, 0x00, 0x07, 0x81, 0x14, 0x82, 0x14, 0x82, 0x14, - 0xa1, 0x0a, 0x81, 0x04, 0x80, 0x04, 0x80, 0x04, 0xa2, 0x0a, 0x81, 0x0b, - 0x81, 0x0b, 0x81, 0x0b, 0x10, 0x78, 0x1b, 0x5e, 0x78, 0x03, 0x00, 0x04, - 0x78, 0x0f, 0xff, 0xff, 0x78, 0x03, 0x00, 0x01, 0x78, 0x04, 0xd0, 0xfc, - 0x00, 0x40, 0x1a, 0x1e, 0x78, 0x03, 0x00, 0x02, 0x78, 0x03, 0x00, 0x04, - 0x78, 0x0f, 0x00, 0x76, 0x70, 0x04, 0x70, 0x07, 0x00, 0x00, 0x20, 0x60, - 0x20, 0x09, 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x10, 0x78, 0x1b, 0x92, - 0x00, 0x40, 0x19, 0xf5, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x94, 0x00, 0x40, - 0x1a, 0x46, 0x78, 0x04, 0xd0, 0xfc, 0x00, 0xc0, 0x19, 0x1b, 0x8a, 0xff, - 0x00, 0x40, 0x1a, 0xdb, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x18, 0x55, - 0x00, 0x78, 0x1a, 0xdb, 0xa1, 0x84, 0x08, 0x80, 0x00, 0xc0, 0x1a, 0x53, - 0x8a, 0xff, 0x00, 0x40, 0x1a, 0xdb, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, - 0x18, 0x55, 0x00, 0x78, 0x1a, 0xdb, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, - 0x00, 0x00, 0xd1, 0xbc, 0x00, 0xc0, 0x1a, 0x93, 0x02, 0x7e, 0x03, 0x7e, - 0x78, 0x08, 0xd0, 0xec, 0x00, 0xc0, 0x1a, 0x66, 0x78, 0x03, 0x00, 0x09, - 0x70, 0x03, 0x00, 0x04, 0x00, 0x78, 0x1a, 0x68, 0x10, 0x78, 0x1b, 0xd7, - 0x6b, 0x28, 0x6a, 0x2c, 0x10, 0x78, 0x20, 0x3f, 0x0d, 0x7e, 0x0f, 0x7e, - 0x2d, 0x78, 0x28, 0x04, 0xac, 0x68, 0x60, 0x34, 0xd0, 0x9c, 0x00, 0xc0, - 0x1a, 0x83, 0x68, 0x08, 0x20, 0x08, 0xa3, 0x1a, 0x68, 0x0c, 0xa2, 0x13, - 0x78, 0x10, 0xa1, 0x00, 0x78, 0x12, 0x69, 0x0c, 0x78, 0x14, 0xa1, 0x01, - 0x78, 0x16, 0x00, 0x78, 0x1a, 0x8f, 0x68, 0x10, 0x20, 0x08, 0xa3, 0x1a, - 0x68, 0x14, 0xa2, 0x13, 0x78, 0x10, 0xa1, 0x00, 0x78, 0x12, 0x69, 0x14, - 0x78, 0x14, 0xa1, 0x01, 0x78, 0x16, 0x0f, 0x7f, 0x0d, 0x7f, 0x00, 0x78, - 0x19, 0x6d, 0x05, 0x7e, 0x7d, 0x0c, 0x10, 0x78, 0xa5, 0x8e, 0x05, 0x7f, - 0x10, 0x78, 0x1a, 0xf4, 0x0f, 0x7e, 0x70, 0x04, 0x20, 0x78, 0x10, 0x78, - 0x49, 0x63, 0x00, 0x40, 0x1a, 0xa4, 0x78, 0x24, 0xc0, 0xf5, 0x78, 0x26, - 0x0f, 0x7f, 0x68, 0x2b, 0xff, 0xff, 0x68, 0x2f, 0xff, 0xff, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, - 0x00, 0x78, 0x1a, 0xdb, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x70, 0x04, 0xa0, 0x0d, 0x00, 0x40, 0x1a, 0xc5, 0x68, 0x08, 0x80, 0x01, - 0x68, 0x0a, 0x00, 0xc0, 0x1a, 0xc5, 0x70, 0x04, 0x20, 0x60, 0x20, 0x09, - 0x00, 0x48, 0x10, 0x78, 0x77, 0x5c, 0x10, 0x78, 0x17, 0xc1, 0x00, 0x78, - 0x1a, 0xdb, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, - 0x20, 0x60, 0x60, 0x10, 0xa0, 0x05, 0x00, 0x40, 0x1a, 0xc5, 0x20, 0x68, - 0x68, 0x08, 0x80, 0x00, 0x68, 0x0a, 0x6c, 0x28, 0x6b, 0x2c, 0x10, 0x78, - 0x17, 0xe0, 0x01, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x20, 0x91, 0x21, 0x00, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, - 0x1a, 0xf2, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x00, 0x40, 0x1a, 0xf2, - 0x20, 0xe1, 0x90, 0x28, 0x70, 0x0f, 0xa9, 0xed, 0x70, 0x13, 0xa9, 0xed, - 0x12, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x10, 0x78, 0x1b, 0x22, 0x20, 0xe1, - 0x90, 0x28, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x00, 0x40, 0x1b, 0x19, - 0x21, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x1b, 0x08, 0x20, 0x60, 0x60, 0x10, - 0x20, 0x60, 0x60, 0x08, 0x80, 0x01, 0x60, 0x0a, 0xa1, 0x88, 0x00, 0x03, - 0xa1, 0x82, 0xaa, 0x08, 0x00, 0x48, 0x1b, 0x10, 0x20, 0x09, 0xa9, 0xed, - 0x71, 0x12, 0x70, 0x0c, 0xa1, 0x06, 0x00, 0xc0, 0x1a, 0xf9, 0x20, 0x11, - 0x00, 0x08, 0x00, 0x78, 0x1a, 0xf9, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x0c, 0x7f, 0x00, 0x7c, - 0x20, 0x01, 0x01, 0x38, 0x20, 0x14, 0x20, 0x03, 0x00, 0x00, 0x20, 0x21, - 0xb0, 0x15, 0x20, 0x01, 0x01, 0x41, 0x20, 0x1c, 0xd3, 0xdc, 0x00, 0xc0, - 0x1b, 0x3f, 0x20, 0x01, 0x01, 0x09, 0x20, 0x1c, 0xa3, 0x9c, 0x00, 0x48, - 0x00, 0xc0, 0x1b, 0x3f, 0x20, 0x01, 0x01, 0x11, 0x20, 0x1c, 0x83, 0xff, - 0x00, 0xc0, 0x1b, 0x3f, 0x84, 0x21, 0x00, 0xc0, 0x1b, 0x29, 0x00, 0x7c, - 0x20, 0x11, 0x02, 0x01, 0x20, 0x09, 0x00, 0x3c, 0x22, 0x04, 0xa0, 0x05, - 0x00, 0xc0, 0x1b, 0x4c, 0x81, 0x09, 0x00, 0xc0, 0x1b, 0x44, 0x00, 0x7c, - 0x00, 0x7c, 0x10, 0x78, 0x1b, 0x40, 0x00, 0x40, 0x1b, 0x55, 0x78, 0x0c, - 0xd0, 0xa4, 0x00, 0x40, 0x1b, 0x5b, 0x10, 0x78, 0x1a, 0xf4, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x1b, 0x5d, 0x10, 0x78, 0x1b, 0x92, 0x00, 0x7c, - 0x0e, 0x7e, 0x20, 0x71, 0x02, 0x00, 0x78, 0x08, 0xa0, 0x84, 0xf0, 0x00, - 0xa1, 0x0d, 0x10, 0x78, 0x1b, 0x22, 0x20, 0x19, 0x50, 0x00, 0x83, 0x19, - 0x00, 0x40, 0x1b, 0x7c, 0x20, 0x01, 0xaa, 0x08, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x00, 0x00, 0x40, 0x1b, 0x7c, 0x20, 0x01, 0x00, 0x21, 0xd0, 0xfc, - 0x00, 0x40, 0x1b, 0x69, 0x10, 0x78, 0x1e, 0xaa, 0x00, 0x78, 0x1b, 0x67, - 0x20, 0xe1, 0x70, 0x00, 0x73, 0x24, 0x74, 0x20, 0x70, 0x28, 0x70, 0x28, - 0x74, 0x26, 0x70, 0x37, 0x00, 0x01, 0x81, 0x0f, 0x71, 0x2e, 0x70, 0x2f, - 0x01, 0x00, 0x70, 0x37, 0x00, 0x08, 0x73, 0x26, 0x74, 0x22, 0x20, 0x01, - 0x01, 0x38, 0x22, 0x02, 0x0e, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x20, 0x01, - 0x01, 0x5d, 0x20, 0x01, 0x00, 0x00, 0x79, 0x08, 0xa1, 0x8c, 0x0f, 0xff, - 0xa1, 0x82, 0x0f, 0xfd, 0x00, 0x48, 0x1b, 0xa0, 0x20, 0x09, 0x00, 0x00, - 0xa1, 0x90, 0x00, 0x07, 0xa2, 0x94, 0x1f, 0xf8, 0x82, 0x14, 0x82, 0x14, - 0x82, 0x14, 0x20, 0x01, 0x02, 0x0a, 0x82, 0xff, 0x00, 0x40, 0x1b, 0xb5, - 0x20, 0xe1, 0x60, 0x00, 0x20, 0x0c, 0x20, 0x0c, 0x20, 0x0c, 0x20, 0x0c, - 0x82, 0x11, 0x00, 0xc0, 0x1b, 0xae, 0x20, 0xe1, 0x70, 0x00, 0x20, 0x0c, - 0x20, 0x0c, 0x70, 0x03, 0x00, 0x00, 0x20, 0xe1, 0x60, 0x00, 0x20, 0x01, - 0x02, 0x08, 0x20, 0x0c, 0x20, 0x01, 0x02, 0x09, 0x20, 0x04, 0xa1, 0x06, - 0x00, 0x40, 0x1b, 0xd4, 0x10, 0x78, 0x1b, 0x40, 0x00, 0x40, 0x1b, 0xd2, - 0x79, 0x08, 0xd1, 0xec, 0x00, 0xc0, 0x1b, 0xd4, 0x79, 0x0c, 0xd1, 0xa4, - 0x00, 0x40, 0x1b, 0x97, 0x10, 0x78, 0x1a, 0xf4, 0xa0, 0x06, 0x02, 0x7f, - 0x00, 0x7c, 0x7c, 0x20, 0x7d, 0x24, 0x7e, 0x30, 0x7f, 0x34, 0x70, 0x0c, - 0x71, 0x10, 0xa1, 0x06, 0x00, 0x40, 0x1c, 0x69, 0x70, 0x04, 0x01, 0x7e, - 0x21, 0x0c, 0xa1, 0x06, 0x01, 0x7f, 0x00, 0x40, 0x1c, 0x69, 0x0d, 0x7e, - 0x0c, 0x7e, 0x21, 0x6c, 0x2d, 0x00, 0xa0, 0x05, 0x00, 0x40, 0x1c, 0x67, - 0x68, 0x1c, 0xa0, 0x86, 0x00, 0x08, 0x00, 0x40, 0x1c, 0x67, 0x68, 0x24, - 0xd0, 0xd4, 0x00, 0xc0, 0x1c, 0x67, 0x68, 0x10, 0x20, 0x68, 0x68, 0x50, - 0xd0, 0xfc, 0x00, 0x40, 0x1c, 0x29, 0x81, 0x08, 0x21, 0x04, 0x6b, 0x2c, - 0xa3, 0x06, 0x00, 0xc0, 0x1c, 0x67, 0x81, 0x08, 0x21, 0x04, 0x6a, 0x28, - 0xa2, 0x06, 0x00, 0xc0, 0x1c, 0x67, 0x68, 0x50, 0xc0, 0xfc, 0xc0, 0xf5, - 0x68, 0x52, 0x68, 0x6c, 0x78, 0x22, 0x68, 0x70, 0x78, 0x26, 0x68, 0x1c, - 0x78, 0x32, 0x68, 0x20, 0x78, 0x36, 0x68, 0x18, 0x20, 0x60, 0x60, 0x34, - 0xd0, 0x9c, 0x00, 0x40, 0x1c, 0x24, 0x68, 0x30, 0x20, 0x04, 0xac, 0x68, - 0x68, 0x08, 0x78, 0x3a, 0x68, 0x0c, 0x78, 0x3e, 0x00, 0x78, 0x1c, 0x65, - 0xa0, 0x06, 0x78, 0x3a, 0x78, 0x3e, 0x00, 0x78, 0x1c, 0x65, 0x81, 0x08, - 0x21, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x1c, 0x67, 0x6b, 0x2c, 0xa3, 0x06, - 0x00, 0xc0, 0x1c, 0x67, 0x81, 0x08, 0x21, 0x04, 0xa0, 0x05, 0x00, 0xc0, - 0x1c, 0x67, 0x6a, 0x28, 0xa2, 0x06, 0x00, 0xc0, 0x1c, 0x67, 0x68, 0x50, - 0xc0, 0xf5, 0x68, 0x52, 0x68, 0x30, 0x20, 0x04, 0x69, 0x18, 0xa1, 0x60, - 0xa1, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xd0, 0x9c, 0x00, 0xc0, 0x1c, 0x57, - 0x60, 0x08, 0x78, 0x22, 0x68, 0x6e, 0x60, 0x0c, 0x78, 0x26, 0x68, 0x72, - 0x60, 0x00, 0x78, 0x32, 0x60, 0x04, 0x78, 0x36, 0xa0, 0x06, 0x78, 0x3a, - 0x78, 0x3e, 0x00, 0x78, 0x1c, 0x65, 0x60, 0x10, 0x78, 0x22, 0x68, 0x6e, - 0x60, 0x14, 0x78, 0x26, 0x68, 0x72, 0x60, 0x00, 0x78, 0x32, 0x60, 0x04, - 0x78, 0x36, 0x60, 0x08, 0x78, 0x3a, 0x60, 0x0c, 0x78, 0x3e, 0x78, 0x03, - 0x00, 0x11, 0x0c, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, - 0x01, 0x7e, 0x02, 0x7e, 0x20, 0x71, 0xa9, 0xe7, 0x20, 0x79, 0x00, 0x30, - 0x20, 0x11, 0x00, 0x50, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, - 0x1c, 0x92, 0x82, 0x11, 0x00, 0x40, 0x1c, 0x90, 0x20, 0x01, 0x00, 0x05, - 0x20, 0x04, 0xd0, 0x8c, 0x00, 0x40, 0x1c, 0x79, 0x79, 0x04, 0xa1, 0x8c, - 0x07, 0x80, 0x01, 0x7e, 0x10, 0x78, 0x19, 0x13, 0x01, 0x7f, 0x81, 0xff, - 0x00, 0xc0, 0x1c, 0x90, 0x20, 0x11, 0x00, 0x50, 0x00, 0x78, 0x1c, 0x74, - 0xa0, 0x85, 0x00, 0x01, 0x02, 0x7f, 0x01, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, - 0x00, 0x7c, 0x78, 0x03, 0x00, 0x04, 0x20, 0x09, 0x00, 0x64, 0x78, 0x04, - 0xd0, 0xac, 0x00, 0x40, 0x1c, 0xe8, 0x81, 0x09, 0x00, 0xc0, 0x1c, 0x9b, - 0x20, 0x09, 0x01, 0x00, 0x21, 0x0c, 0xa1, 0x8a, 0x00, 0x03, 0x10, 0x48, - 0x13, 0x32, 0x10, 0x78, 0x1f, 0xca, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, - 0xa9, 0xd6, 0x20, 0x79, 0x00, 0x10, 0x70, 0x04, 0xa0, 0x86, 0x00, 0x00, - 0x00, 0x40, 0x1c, 0xe0, 0x78, 0x00, 0x00, 0x7e, 0x78, 0x20, 0x00, 0x7e, - 0x78, 0x30, 0x00, 0x7e, 0x78, 0x34, 0x00, 0x7e, 0x78, 0x38, 0x00, 0x7e, - 0x78, 0x3c, 0x00, 0x7e, 0x78, 0x03, 0x00, 0x04, 0x78, 0x23, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x05, 0x20, 0x79, 0x00, 0x30, 0x78, 0x04, 0xd0, 0xac, - 0x10, 0xc0, 0x13, 0x32, 0x20, 0x79, 0x00, 0x10, 0x00, 0x7f, 0x78, 0x3e, - 0x00, 0x7f, 0x78, 0x3a, 0x00, 0x7f, 0x78, 0x36, 0x00, 0x7f, 0x78, 0x32, - 0x00, 0x7f, 0x78, 0x22, 0x00, 0x7f, 0x78, 0x02, 0x0f, 0x7f, 0x0e, 0x7f, - 0x00, 0x78, 0x1c, 0xe6, 0x0f, 0x7f, 0x0e, 0x7f, 0x78, 0x04, 0xd0, 0xac, - 0x10, 0xc0, 0x13, 0x32, 0x10, 0x78, 0x63, 0x9b, 0x00, 0x7c, 0x0e, 0x7e, - 0x20, 0x71, 0xaa, 0x08, 0x70, 0x03, 0x00, 0x00, 0x0e, 0x7f, 0x00, 0x7c, - 0x0d, 0x7e, 0xa2, 0x80, 0x00, 0x04, 0x20, 0x6c, 0x69, 0x4c, 0xd1, 0xdc, - 0x00, 0xc0, 0x1d, 0x6b, 0x69, 0x34, 0xa1, 0x84, 0x00, 0x07, 0x00, 0x79, - 0x1c, 0xfd, 0x1d, 0x05, 0x1d, 0x56, 0x1d, 0x05, 0x1d, 0x05, 0x1d, 0x05, - 0x1d, 0x3b, 0x1d, 0x18, 0x1d, 0x07, 0x10, 0x78, 0x13, 0x32, 0x68, 0x4c, - 0xd0, 0xb4, 0x00, 0x40, 0x1e, 0x79, 0x68, 0x60, 0x68, 0x2e, 0x68, 0x16, - 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x12, 0x68, 0x7c, 0x68, 0x0a, 0x68, 0x80, - 0x68, 0x0e, 0x69, 0x58, 0x00, 0x78, 0x1d, 0x5e, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, 0x00, 0xc0, 0x1d, 0x05, 0x68, 0x4c, - 0xd0, 0xb4, 0x00, 0x40, 0x1e, 0x79, 0x68, 0x60, 0x68, 0x2e, 0x68, 0x16, - 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x12, 0x68, 0x7c, 0x68, 0x0a, 0x68, 0x80, - 0x68, 0x0e, 0x68, 0x04, 0x68, 0x1a, 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x20, 0x6a, 0x20, 0x04, 0x68, 0x32, - 0x69, 0x58, 0x00, 0x78, 0x1d, 0x67, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, - 0x00, 0x15, 0x00, 0xc0, 0x1d, 0x6b, 0x68, 0x4c, 0xd0, 0xb4, 0x00, 0x40, - 0x1e, 0x79, 0x68, 0x04, 0x68, 0x1a, 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x20, 0x6a, 0x20, 0x04, 0x68, 0x32, - 0x69, 0x58, 0xa0, 0x06, 0x68, 0x2e, 0x68, 0x2a, 0x00, 0x78, 0x1d, 0x67, - 0x68, 0x4c, 0xd0, 0xb4, 0x00, 0x40, 0x18, 0xed, 0x69, 0x58, 0xa0, 0x06, - 0x68, 0x2e, 0x68, 0x2a, 0x2d, 0x00, 0x68, 0x1a, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0x0f, 0xa0, 0x80, 0x20, 0x6a, 0x20, 0x04, 0x68, 0x32, 0x69, 0x26, - 0x68, 0x4c, 0xc0, 0xdd, 0x68, 0x4e, 0x0d, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, - 0x20, 0x79, 0x00, 0x20, 0x78, 0x04, 0xd0, 0xfc, 0x10, 0xc0, 0x1e, 0xaa, - 0x0e, 0x7e, 0x0d, 0x7e, 0x20, 0x71, 0xaa, 0x08, 0x70, 0x00, 0xa0, 0x05, - 0x00, 0xc0, 0x1d, 0xf0, 0x0c, 0x7e, 0x72, 0x06, 0xa2, 0x80, 0x00, 0x04, - 0x20, 0x5c, 0x70, 0x04, 0x20, 0x68, 0x78, 0x03, 0x00, 0x04, 0x68, 0x18, - 0x0d, 0x7e, 0x20, 0x68, 0x68, 0x6c, 0x78, 0x12, 0x68, 0x90, 0x0f, 0x7e, - 0x20, 0xe1, 0x90, 0x40, 0x20, 0x79, 0x02, 0x00, 0x78, 0x1a, 0x20, 0x79, - 0x01, 0x00, 0x80, 0x04, 0x78, 0xd6, 0x0f, 0x7f, 0x0d, 0x7f, 0x2b, 0x68, - 0x68, 0x24, 0x20, 0x50, 0x68, 0x18, 0x20, 0x60, 0x68, 0x30, 0x20, 0x40, - 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0x69, 0x08, 0x20, 0x01, 0x04, 0xfd, - 0x20, 0x04, 0xa0, 0x86, 0x00, 0x07, 0x00, 0x40, 0x1d, 0xb2, 0xa1, 0x84, - 0x00, 0x07, 0x00, 0x40, 0x1d, 0xb2, 0x01, 0x7e, 0x20, 0x09, 0x00, 0x08, - 0xa1, 0x02, 0x01, 0x7f, 0xa1, 0x08, 0x79, 0x1a, 0x71, 0x16, 0x70, 0x1e, - 0x68, 0x0c, 0xa0, 0x81, 0x00, 0x00, 0x78, 0x1e, 0x70, 0x1a, 0xa0, 0x06, - 0x70, 0x0e, 0x70, 0x12, 0x70, 0x04, 0x69, 0x2c, 0x68, 0x14, 0xa1, 0x06, - 0x00, 0xc0, 0x1d, 0xc9, 0x69, 0x28, 0x68, 0x10, 0xa1, 0x06, 0x00, 0x40, - 0x1d, 0xd6, 0x03, 0x7e, 0x04, 0x7e, 0x6b, 0x14, 0x6c, 0x10, 0x10, 0x78, - 0x20, 0x8a, 0x04, 0x7f, 0x03, 0x7f, 0x00, 0x40, 0x1d, 0xd6, 0x0c, 0x7f, - 0x00, 0x78, 0x1d, 0xf0, 0x8a, 0xff, 0x00, 0xc0, 0x1d, 0xde, 0x0c, 0x7f, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x1d, 0xf0, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x79, 0x00, 0x20, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, - 0x1d, 0xf4, 0x00, 0x40, 0x1d, 0xed, 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, - 0x1d, 0xf4, 0x12, 0x7f, 0x0c, 0x7f, 0xa0, 0x06, 0x0d, 0x7f, 0x0e, 0x7f, - 0x0f, 0x7f, 0x00, 0x7c, 0x07, 0x7e, 0x06, 0x7e, 0x05, 0x7e, 0x04, 0x7e, - 0x03, 0x7e, 0x02, 0x7e, 0x8a, 0xff, 0x00, 0x40, 0x1e, 0x72, 0x70, 0x0c, - 0x72, 0x14, 0xa2, 0x3a, 0x70, 0x10, 0x72, 0x18, 0xa2, 0x03, 0x00, 0x48, - 0x1e, 0x71, 0xa7, 0x05, 0x00, 0x40, 0x1e, 0x71, 0xa0, 0x3e, 0x27, 0x30, - 0x68, 0x50, 0xd0, 0xfc, 0x00, 0xc0, 0x1e, 0x24, 0x0d, 0x7e, 0x28, 0x04, - 0xac, 0x68, 0x29, 0x00, 0x00, 0x79, 0x1e, 0x14, 0x1e, 0x53, 0x1e, 0x34, - 0x1e, 0x34, 0x1e, 0x53, 0x1e, 0x53, 0x1e, 0x4b, 0x1e, 0x53, 0x1e, 0x34, - 0x1e, 0x53, 0x1e, 0x3a, 0x1e, 0x3a, 0x1e, 0x53, 0x1e, 0x53, 0x1e, 0x53, - 0x1e, 0x42, 0x1e, 0x3a, 0xc0, 0xfc, 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, - 0x6d, 0x1c, 0x6c, 0x20, 0xd9, 0x9c, 0x00, 0x40, 0x1e, 0x57, 0x0d, 0x7e, - 0x28, 0x04, 0xac, 0x68, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0x78, 0x1e, 0x56, - 0x6b, 0x08, 0x6a, 0x0c, 0x6d, 0x00, 0x6c, 0x04, 0x00, 0x78, 0x1e, 0x56, - 0x6b, 0x10, 0x6a, 0x14, 0x6d, 0x00, 0x6c, 0x04, 0x6f, 0x08, 0x6e, 0x0c, - 0x00, 0x78, 0x1e, 0x56, 0x0d, 0x7f, 0x0d, 0x7e, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, 0x00, 0xc0, 0x1e, 0x53, 0x0d, 0x7f, - 0x10, 0x78, 0x20, 0x26, 0x00, 0xc0, 0x1d, 0xfa, 0xa0, 0x0e, 0x00, 0x78, - 0x1e, 0x72, 0x0d, 0x7f, 0x10, 0x78, 0x13, 0x32, 0x0d, 0x7f, 0x7b, 0x22, - 0x7a, 0x26, 0x7d, 0x32, 0x7c, 0x36, 0x7f, 0x3a, 0x7e, 0x3e, 0x79, 0x02, - 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0x68, 0x28, 0xa3, 0x00, 0x68, 0x2a, - 0x68, 0x2c, 0xa2, 0x01, 0x68, 0x2e, 0x70, 0x0c, 0xa3, 0x00, 0x70, 0x0e, - 0x70, 0x10, 0xa2, 0x01, 0x70, 0x12, 0x10, 0x78, 0x20, 0x26, 0x00, 0x78, - 0x1e, 0x72, 0xa0, 0x06, 0x02, 0x7f, 0x03, 0x7f, 0x04, 0x7f, 0x05, 0x7f, - 0x06, 0x7f, 0x07, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x13, 0x32, 0x02, 0x7e, - 0x20, 0x01, 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, - 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, - 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x1e, 0x92, 0x68, 0x50, 0xc0, 0xbd, 0x68, 0x52, 0x0d, 0x7f, 0x0c, 0x7e, - 0x10, 0x78, 0x8a, 0x11, 0x0c, 0x7f, 0x20, 0x01, 0xa9, 0xc0, 0x20, 0x04, - 0xac, 0x06, 0x00, 0xc0, 0x1e, 0xa7, 0x20, 0xe1, 0x90, 0x40, 0x10, 0x78, - 0x73, 0x8a, 0x20, 0x11, 0x00, 0x00, 0x10, 0x78, 0x70, 0xea, 0x10, 0x78, - 0x63, 0x9b, 0x02, 0x7f, 0x00, 0x78, 0x1f, 0x76, 0x12, 0x7e, 0x20, 0x91, - 0x22, 0x00, 0x00, 0x7e, 0x01, 0x7e, 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, - 0x0c, 0x7e, 0x20, 0x79, 0x00, 0x20, 0x20, 0x71, 0xaa, 0x08, 0x2b, 0x68, - 0x68, 0x18, 0x20, 0x60, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, 0xa1, 0x84, - 0x07, 0x00, 0x00, 0xc0, 0x1e, 0x7b, 0x70, 0x00, 0x00, 0x79, 0x1e, 0xc4, - 0x1f, 0x76, 0x1e, 0xc8, 0x1f, 0x43, 0x1f, 0x74, 0x80, 0x01, 0x70, 0x02, - 0xd1, 0x9c, 0x00, 0xc0, 0x1e, 0xdc, 0x8a, 0xff, 0x00, 0x40, 0x1e, 0xfb, - 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x1d, 0xf4, 0x00, 0x40, 0x1f, 0x76, - 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x1d, 0xf4, 0x00, 0x78, 0x1f, 0x76, - 0x78, 0x03, 0x00, 0x04, 0xd1, 0x94, 0x00, 0x40, 0x1e, 0xec, 0x68, 0x50, - 0xc0, 0xfc, 0x68, 0x52, 0x8a, 0xff, 0x00, 0xc0, 0x1e, 0xf1, 0x68, 0x4c, - 0xc0, 0xf5, 0x68, 0x4e, 0x00, 0x78, 0x1e, 0xf1, 0x10, 0x78, 0x20, 0x3f, - 0x68, 0x50, 0xc0, 0xfd, 0x68, 0x52, 0x2a, 0x00, 0x68, 0x26, 0x2c, 0x00, - 0x68, 0x1a, 0x28, 0x00, 0x68, 0x32, 0x70, 0x03, 0x00, 0x00, 0x00, 0x78, - 0x1f, 0x76, 0x71, 0x1c, 0x81, 0xff, 0x00, 0x40, 0x1f, 0x11, 0x79, 0x18, - 0x79, 0x22, 0x78, 0x27, 0x00, 0x00, 0x78, 0x03, 0x00, 0x01, 0x70, 0x00, - 0x80, 0x00, 0x70, 0x02, 0x70, 0x0c, 0xa1, 0x00, 0x70, 0x0e, 0x70, 0x10, - 0xa0, 0x81, 0x00, 0x00, 0x70, 0x12, 0x00, 0x78, 0x1f, 0x76, 0x0f, 0x7e, - 0x02, 0x7e, 0x78, 0x1c, 0x00, 0x7e, 0x78, 0x18, 0x00, 0x7e, 0x20, 0x79, - 0x01, 0x00, 0x7a, 0x14, 0xa2, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x12, - 0x78, 0x16, 0x03, 0x7e, 0x20, 0x19, 0x10, 0x00, 0x83, 0x19, 0x10, 0x40, - 0x13, 0x32, 0x78, 0x20, 0xd0, 0xbc, 0x00, 0xc0, 0x1f, 0x22, 0x03, 0x7f, - 0x79, 0xc8, 0x00, 0x7f, 0xa1, 0x02, 0x01, 0x7f, 0x00, 0x7e, 0x01, 0x7e, - 0x79, 0xc4, 0x00, 0x7f, 0xa1, 0x03, 0x78, 0xc6, 0x00, 0x7f, 0x78, 0xca, - 0xa2, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x12, 0x78, 0x16, 0x02, 0x7f, - 0x0f, 0x7f, 0x78, 0x03, 0x00, 0x08, 0x70, 0x03, 0x00, 0x00, 0x00, 0x78, - 0x1f, 0x76, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x94, 0x00, 0x40, 0x1f, 0x58, - 0x78, 0x04, 0xd0, 0xfc, 0x00, 0xc0, 0x1e, 0xba, 0xd1, 0x9c, 0x00, 0xc0, - 0x1f, 0x72, 0x8a, 0xff, 0x00, 0x40, 0x1f, 0x76, 0x20, 0x09, 0x00, 0x01, - 0x10, 0x78, 0x1d, 0xf4, 0x00, 0x78, 0x1f, 0x76, 0x02, 0x7e, 0x03, 0x7e, - 0x6b, 0x28, 0x6a, 0x2c, 0x10, 0x78, 0x20, 0x3f, 0x0d, 0x7e, 0x28, 0x04, - 0xac, 0x68, 0x60, 0x34, 0xd0, 0x9c, 0x00, 0xc0, 0x1f, 0x6b, 0x68, 0x08, - 0xa3, 0x1a, 0x68, 0x0c, 0xa2, 0x13, 0x00, 0x78, 0x1f, 0x6f, 0x68, 0x10, - 0xa3, 0x1a, 0x68, 0x14, 0xa2, 0x13, 0x0d, 0x7f, 0x00, 0x78, 0x1e, 0xec, - 0x00, 0x78, 0x1e, 0xec, 0x10, 0x78, 0x13, 0x32, 0x0c, 0x7f, 0x0d, 0x7f, - 0x0e, 0x7f, 0x0f, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, - 0x0f, 0x7e, 0x0e, 0x7e, 0x20, 0x71, 0xaa, 0x08, 0x70, 0x00, 0xa0, 0x86, - 0x00, 0x00, 0x00, 0x40, 0x1f, 0xc7, 0x20, 0x79, 0x00, 0x20, 0x01, 0x7e, - 0x20, 0x09, 0x02, 0x07, 0x21, 0x0c, 0xd1, 0x94, 0x00, 0x40, 0x1f, 0xa4, - 0x20, 0x09, 0x02, 0x0c, 0x21, 0x0c, 0xa1, 0x84, 0x00, 0x03, 0x00, 0x40, - 0x1f, 0xa4, 0x10, 0x78, 0xa5, 0xe2, 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, - 0xa0, 0x05, 0x10, 0x40, 0x13, 0x32, 0x20, 0xe1, 0x90, 0x40, 0x20, 0x01, - 0x02, 0x0c, 0x21, 0x02, 0x20, 0x09, 0x02, 0x06, 0x21, 0x04, 0x20, 0x09, - 0x02, 0x03, 0x21, 0x0c, 0xa1, 0x06, 0x00, 0xc0, 0x1f, 0xaf, 0x20, 0xe1, - 0x90, 0x40, 0x78, 0x04, 0xd0, 0xfc, 0x00, 0x40, 0x1f, 0x8a, 0x10, 0x78, - 0x1e, 0xaa, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x8a, - 0x01, 0x7f, 0x78, 0x03, 0x00, 0x04, 0x78, 0x04, 0xd0, 0xac, 0x00, 0xc0, - 0x1f, 0xbd, 0x20, 0xe1, 0x90, 0x40, 0x78, 0x03, 0x00, 0x02, 0x70, 0x03, - 0x00, 0x00, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x0c, 0x7e, - 0x0d, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, 0xaa, 0x08, 0x20, 0x79, - 0x00, 0x20, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, 0x20, 0x03, - 0x70, 0x04, 0x20, 0x60, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x1f, 0xed, 0x68, 0x50, 0xc0, 0xb5, 0x68, 0x52, 0x68, 0x0c, - 0x7a, 0x1c, 0xa2, 0x06, 0x00, 0xc0, 0x1f, 0xed, 0x68, 0x08, 0x7a, 0x18, - 0xa2, 0x06, 0x00, 0x40, 0x20, 0x09, 0x20, 0x01, 0x01, 0x05, 0x20, 0x03, - 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, - 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, 0x10, 0x78, 0x8a, 0x11, 0x20, 0xe1, - 0x90, 0x40, 0x10, 0x78, 0x73, 0x8a, 0x20, 0x11, 0x00, 0x00, 0x10, 0x78, - 0x70, 0xea, 0x0f, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, 0x0c, 0x7f, 0x02, 0x7f, - 0x00, 0x7c, 0x68, 0x10, 0x6a, 0x14, 0xa2, 0x05, 0x00, 0xc0, 0x1f, 0xed, - 0x68, 0x4c, 0xc0, 0xdc, 0x68, 0x4e, 0x2c, 0x10, 0x10, 0x78, 0x1c, 0xf0, - 0x20, 0x01, 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, - 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x20, 0x69, 0xa9, 0xb1, - 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x00, 0x78, 0x20, 0x03, - 0x88, 0x40, 0x28, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x20, 0x3a, 0x60, 0x04, - 0xa0, 0x05, 0x00, 0x40, 0x20, 0x3c, 0x68, 0x1a, 0x20, 0x60, 0x60, 0x34, - 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x20, 0x6a, 0x20, 0x44, 0x88, 0xff, - 0x10, 0x40, 0x13, 0x32, 0x8a, 0x51, 0x00, 0x7c, 0x20, 0x51, 0x00, 0x00, - 0x00, 0x7c, 0x8a, 0x50, 0x88, 0x41, 0x28, 0x04, 0xa0, 0x05, 0x00, 0xc0, - 0x20, 0x59, 0x2c, 0x00, 0xad, 0x06, 0x00, 0x40, 0x20, 0x4e, 0x60, 0x00, - 0xa0, 0x05, 0x00, 0xc0, 0x20, 0x4e, 0x2d, 0x00, 0x20, 0x60, 0x68, 0x1a, - 0x60, 0x34, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x20, 0x7a, 0x20, 0x44, - 0x88, 0xff, 0x10, 0x40, 0x13, 0x32, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x11, - 0x00, 0x15, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x15, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x27, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x5f, 0x20, 0x5b, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x69, 0x00, 0x00, 0x20, 0x5f, 0x00, 0x00, 0x20, 0x66, - 0x20, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x69, 0x20, 0x66, - 0x00, 0x00, 0x20, 0x61, 0x20, 0x61, 0x00, 0x00, 0x00, 0x00, 0x20, 0x69, - 0x00, 0x00, 0x20, 0x61, 0x00, 0x00, 0x20, 0x67, 0x20, 0x67, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x69, 0x20, 0x67, 0x0a, 0x7e, 0x09, 0x7e, - 0x08, 0x7e, 0x6b, 0x2e, 0x6c, 0x2a, 0x68, 0x58, 0xa0, 0x55, 0x00, 0x40, - 0x21, 0x2d, 0x2d, 0x60, 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0xa9, 0xc0, - 0x20, 0x6a, 0xa9, 0x86, 0x00, 0x07, 0x00, 0x40, 0x20, 0xa5, 0xa9, 0x86, - 0x00, 0x0e, 0x00, 0x40, 0x20, 0xa5, 0xa9, 0x86, 0x00, 0x0f, 0x00, 0xc0, - 0x20, 0xa9, 0x60, 0x5c, 0xa4, 0x22, 0x60, 0x60, 0xa3, 0x1b, 0x28, 0x04, - 0xa0, 0x45, 0x00, 0xc0, 0x20, 0xb7, 0x00, 0x50, 0x20, 0xb1, 0x00, 0x78, - 0x21, 0x2d, 0x60, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x21, 0x2d, 0x00, 0x78, - 0x20, 0x94, 0x28, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x20, 0xd5, 0xac, 0x68, - 0xd9, 0x9c, 0x00, 0xc0, 0x20, 0xc5, 0x68, 0x08, 0xa4, 0x22, 0x68, 0x0c, - 0xa3, 0x1b, 0x00, 0x78, 0x20, 0xc9, 0x68, 0x10, 0xa4, 0x22, 0x68, 0x14, - 0xa3, 0x1b, 0x00, 0x48, 0x20, 0xf4, 0x23, 0x00, 0xa4, 0x05, 0x00, 0x40, - 0x20, 0xdb, 0x8a, 0x51, 0x00, 0x40, 0x21, 0x2d, 0x88, 0x40, 0x00, 0x78, - 0x20, 0xb7, 0x60, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x21, 0x2d, 0x00, 0x78, - 0x20, 0x94, 0x8a, 0x51, 0x00, 0x40, 0x21, 0x2d, 0x88, 0x40, 0x28, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x20, 0xee, 0x60, 0x04, 0xa0, 0x65, 0x00, 0x40, - 0x21, 0x2d, 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0xa9, 0xc0, 0x20, 0x6a, - 0x28, 0x04, 0x20, 0x40, 0x2b, 0x68, 0x68, 0x50, 0xc0, 0xfc, 0x68, 0x52, - 0x00, 0x78, 0x21, 0x21, 0x84, 0x22, 0x84, 0x20, 0x83, 0x1a, 0xa3, 0x99, - 0x00, 0x00, 0x0d, 0x7e, 0x2b, 0x68, 0x6c, 0x6e, 0x6b, 0x72, 0x0d, 0x7f, - 0xd9, 0x9c, 0x00, 0xc0, 0x21, 0x0f, 0x69, 0x08, 0x24, 0x00, 0xa1, 0x22, - 0x69, 0x0c, 0x23, 0x00, 0xa1, 0x1b, 0x10, 0x48, 0x13, 0x32, 0x68, 0x00, - 0xa4, 0x20, 0x68, 0x04, 0xa3, 0x19, 0x00, 0x78, 0x21, 0x1b, 0x69, 0x10, - 0x24, 0x00, 0xa1, 0x22, 0x69, 0x14, 0x23, 0x00, 0xa1, 0x1b, 0x10, 0x48, - 0x13, 0x32, 0x68, 0x00, 0xa4, 0x20, 0x68, 0x04, 0xa3, 0x19, 0x2b, 0x68, - 0x6c, 0x1e, 0x6b, 0x22, 0x68, 0x50, 0xc0, 0xfd, 0x68, 0x52, 0x2c, 0x00, - 0x68, 0x1a, 0x28, 0x00, 0x68, 0x32, 0x2a, 0x00, 0x68, 0x26, 0x00, 0x7f, - 0x00, 0x7f, 0x00, 0x7f, 0xa0, 0x06, 0x00, 0x78, 0x21, 0x32, 0x08, 0x7f, - 0x09, 0x7f, 0x0a, 0x7f, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0x20, 0x01, - 0x00, 0x05, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x21, 0x3a, - 0x21, 0x42, 0x21, 0x43, 0x21, 0x46, 0x21, 0x49, 0x21, 0x4e, 0x21, 0x51, - 0x21, 0x56, 0x21, 0x5b, 0x00, 0x7c, 0x10, 0x78, 0x1e, 0xaa, 0x00, 0x7c, - 0x10, 0x78, 0x19, 0x13, 0x00, 0x7c, 0x10, 0x78, 0x19, 0x13, 0x10, 0x78, - 0x1e, 0xaa, 0x00, 0x7c, 0x10, 0x78, 0x14, 0xbe, 0x00, 0x7c, 0x10, 0x78, - 0x1e, 0xaa, 0x10, 0x78, 0x14, 0xbe, 0x00, 0x7c, 0x10, 0x78, 0x19, 0x13, - 0x10, 0x78, 0x14, 0xbe, 0x00, 0x7c, 0x10, 0x78, 0x19, 0x13, 0x10, 0x78, - 0x1e, 0xaa, 0x10, 0x78, 0x14, 0xbe, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x23, 0x00, 0x20, 0x79, 0x02, 0x00, 0x20, 0x71, 0xac, 0x80, 0x20, 0x69, - 0xa7, 0x00, 0x20, 0x09, 0x00, 0x04, 0x79, 0x12, 0x78, 0x17, 0x00, 0x04, - 0x10, 0x78, 0x25, 0x1f, 0x78, 0x1b, 0x00, 0x02, 0x20, 0xe1, 0x87, 0x00, - 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x23, 0x00, 0x78, 0x1c, - 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x21, 0x80, 0x21, 0xa4, 0x21, 0x88, - 0x21, 0x8c, 0x21, 0x90, 0x21, 0x96, 0x21, 0x9a, 0x21, 0x9e, 0x21, 0xa2, - 0x10, 0x78, 0x54, 0x8e, 0x00, 0x78, 0x21, 0xa4, 0x10, 0x78, 0x54, 0xda, - 0x00, 0x78, 0x21, 0xa4, 0x10, 0x78, 0x54, 0x8e, 0x10, 0x78, 0x54, 0xda, - 0x00, 0x78, 0x21, 0xa4, 0x10, 0x78, 0x21, 0xa6, 0x00, 0x78, 0x21, 0xa4, - 0x10, 0x78, 0x21, 0xa6, 0x00, 0x78, 0x21, 0xa4, 0x10, 0x78, 0x21, 0xa6, - 0x00, 0x78, 0x21, 0xa4, 0x10, 0x78, 0x21, 0xa6, 0x12, 0x7f, 0x00, 0x7c, - 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x10, 0x78, 0xa5, 0xe2, 0x79, 0x30, - 0xa1, 0x84, 0x00, 0x03, 0x00, 0x40, 0x21, 0xc9, 0x20, 0x01, 0xa9, 0xc0, - 0x20, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x21, 0xc5, 0x20, 0x01, 0x01, 0x33, - 0x20, 0x04, 0xa0, 0x05, 0x10, 0x40, 0x13, 0x32, 0x0c, 0x7e, 0x20, 0x01, - 0xa9, 0xc0, 0x20, 0x64, 0x10, 0x78, 0x8a, 0x11, 0x0c, 0x7f, 0x00, 0x78, - 0x21, 0xf2, 0x20, 0xe1, 0x90, 0x40, 0x00, 0x78, 0x21, 0xf2, 0xa1, 0x84, - 0x00, 0x30, 0x00, 0x40, 0x21, 0xda, 0x6a, 0x00, 0xa2, 0x86, 0x00, 0x03, - 0x00, 0xc0, 0x21, 0xd4, 0x00, 0x78, 0x21, 0xd6, 0x10, 0x78, 0x42, 0x24, - 0x20, 0xe1, 0x90, 0x10, 0x00, 0x78, 0x21, 0xf2, 0xa1, 0x84, 0x00, 0xc0, - 0x00, 0x40, 0x21, 0xec, 0x0e, 0x7e, 0x03, 0x7e, 0x04, 0x7e, 0x05, 0x7e, - 0x20, 0x71, 0xa9, 0xe7, 0x10, 0x78, 0x1a, 0xf4, 0x05, 0x7f, 0x04, 0x7f, - 0x03, 0x7f, 0x0e, 0x7f, 0x00, 0x78, 0x21, 0xf2, 0xa1, 0x84, 0x03, 0x00, - 0x00, 0x40, 0x21, 0xf2, 0x20, 0xe1, 0x90, 0x20, 0x79, 0x32, 0x02, 0x7f, - 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, - 0x20, 0x71, 0xa7, 0x00, 0x71, 0x28, 0x20, 0x01, 0xa9, 0x90, 0x21, 0x02, - 0x20, 0x01, 0xa9, 0x98, 0x21, 0x02, 0xa1, 0x82, 0x02, 0x11, 0x00, 0xc8, - 0x22, 0x0b, 0x20, 0x09, 0x00, 0x08, 0x00, 0x78, 0x22, 0x35, 0xa1, 0x82, - 0x02, 0x59, 0x00, 0xc8, 0x22, 0x13, 0x20, 0x09, 0x00, 0x07, 0x00, 0x78, - 0x22, 0x35, 0xa1, 0x82, 0x02, 0xc1, 0x00, 0xc8, 0x22, 0x1b, 0x20, 0x09, - 0x00, 0x06, 0x00, 0x78, 0x22, 0x35, 0xa1, 0x82, 0x03, 0x49, 0x00, 0xc8, - 0x22, 0x23, 0x20, 0x09, 0x00, 0x05, 0x00, 0x78, 0x22, 0x35, 0xa1, 0x82, - 0x04, 0x21, 0x00, 0xc8, 0x22, 0x2b, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, - 0x22, 0x35, 0xa1, 0x82, 0x05, 0x81, 0x00, 0xc8, 0x22, 0x33, 0x20, 0x09, - 0x00, 0x03, 0x00, 0x78, 0x22, 0x35, 0x20, 0x09, 0x00, 0x02, 0x20, 0x79, - 0x02, 0x00, 0x79, 0x12, 0x78, 0x17, 0x00, 0x04, 0x10, 0x78, 0x25, 0x1f, - 0x0f, 0x7f, 0x0e, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x22, 0x00, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x60, 0x24, - 0x60, 0x26, 0x60, 0x53, 0x00, 0x30, 0x60, 0x33, 0x00, 0xef, 0x60, 0xe7, - 0x00, 0x00, 0x60, 0xeb, 0x00, 0xef, 0x60, 0xe3, 0x00, 0x08, 0x60, 0x4b, - 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x80, 0x60, 0x2f, - 0x00, 0x00, 0x60, 0x07, 0x0e, 0xaf, 0x60, 0x0f, 0x00, 0xff, 0x60, 0x2b, - 0x00, 0x2f, 0x12, 0x7f, 0x00, 0x7c, 0x20, 0x01, 0xa7, 0x30, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0xa7, 0x2f, 0x20, 0x03, 0x00, 0x01, 0x00, 0x7c, - 0x12, 0x7e, 0x20, 0x91, 0x22, 0x00, 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, - 0x61, 0x24, 0xa1, 0x84, 0x00, 0x2c, 0x00, 0xc0, 0x22, 0x7b, 0xa1, 0x84, - 0x00, 0x07, 0x00, 0x79, 0x22, 0x81, 0xa1, 0x95, 0x00, 0x04, 0xa2, 0x84, - 0x00, 0x07, 0x00, 0x79, 0x22, 0x81, 0x22, 0xad, 0x22, 0x89, 0x22, 0x8d, - 0x22, 0x91, 0x22, 0x97, 0x22, 0x9b, 0x22, 0xa1, 0x22, 0xa7, 0x10, 0x78, - 0x5c, 0x56, 0x00, 0x78, 0x22, 0xad, 0x10, 0x78, 0x5d, 0x45, 0x00, 0x78, - 0x22, 0xad, 0x10, 0x78, 0x5d, 0x45, 0x10, 0x78, 0x5c, 0x56, 0x00, 0x78, - 0x22, 0xad, 0x10, 0x78, 0x22, 0xb2, 0x00, 0x78, 0x22, 0xad, 0x10, 0x78, - 0x5c, 0x56, 0x10, 0x78, 0x22, 0xb2, 0x00, 0x78, 0x22, 0xad, 0x10, 0x78, - 0x5d, 0x45, 0x10, 0x78, 0x22, 0xb2, 0x00, 0x78, 0x22, 0xad, 0x10, 0x78, - 0x5d, 0x45, 0x10, 0x78, 0x5c, 0x56, 0x10, 0x78, 0x22, 0xb2, 0x02, 0x7f, - 0x01, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x61, 0x24, 0xd1, 0xac, - 0x00, 0x40, 0x23, 0xac, 0x01, 0x7e, 0x04, 0x7e, 0x0c, 0x7e, 0x64, 0x4c, - 0xa4, 0x86, 0xf0, 0xf0, 0x00, 0xc0, 0x22, 0xc5, 0x20, 0x61, 0x01, 0x00, - 0x64, 0x4a, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x74, 0xc6, - 0xa4, 0x8c, 0xff, 0x00, 0x70, 0x34, 0xd0, 0x84, 0x00, 0x40, 0x22, 0xdd, - 0xa1, 0x86, 0xf8, 0x00, 0x00, 0xc0, 0x22, 0xdd, 0x70, 0x3c, 0xd0, 0x84, - 0x00, 0xc0, 0x22, 0xdd, 0xc0, 0x85, 0x70, 0x3e, 0x03, 0x7e, 0x24, 0x18, - 0x20, 0x11, 0x80, 0x16, 0x10, 0x78, 0x36, 0x1b, 0x03, 0x7f, 0xa1, 0x96, - 0xff, 0x00, 0x00, 0x40, 0x23, 0x1f, 0x60, 0x30, 0xa0, 0x84, 0x00, 0xff, - 0x81, 0x0f, 0xa1, 0x16, 0x00, 0x40, 0x23, 0x1f, 0x71, 0x30, 0xd1, 0x84, - 0x00, 0xc0, 0x23, 0x1f, 0x20, 0x11, 0xa7, 0x53, 0x22, 0x14, 0xd2, 0xec, - 0x00, 0x40, 0x22, 0xfa, 0xc1, 0x8d, 0x71, 0x32, 0x20, 0x11, 0xa7, 0x53, - 0x22, 0x14, 0xd2, 0xac, 0x00, 0xc0, 0x23, 0x1f, 0x62, 0x40, 0xa2, 0x94, - 0x00, 0x10, 0x00, 0x40, 0x23, 0x06, 0x62, 0x48, 0xa2, 0x94, 0xff, 0x00, - 0xa2, 0x96, 0xff, 0x00, 0x00, 0x40, 0x23, 0x1f, 0x70, 0x30, 0xd0, 0x8c, - 0x00, 0x40, 0x23, 0x71, 0x70, 0x34, 0xd0, 0x8c, 0x00, 0xc0, 0x23, 0x16, - 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x0c, 0xd1, 0xac, 0x00, 0xc0, 0x23, 0x71, - 0xc1, 0xad, 0x21, 0x02, 0x03, 0x7e, 0x73, 0xc4, 0x20, 0x11, 0x80, 0x13, - 0x10, 0x78, 0x36, 0x1b, 0x03, 0x7f, 0x00, 0x78, 0x23, 0x71, 0x70, 0x34, - 0xd0, 0x8c, 0x00, 0xc0, 0x23, 0x2b, 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x0c, - 0xd1, 0xac, 0x00, 0xc0, 0x23, 0x71, 0xc1, 0xad, 0x21, 0x02, 0x03, 0x7e, - 0x73, 0xc4, 0x20, 0x11, 0x80, 0x13, 0x10, 0x78, 0x36, 0x1b, 0x03, 0x7f, - 0x71, 0x30, 0xc1, 0x85, 0x71, 0x32, 0x20, 0x11, 0xa7, 0x53, 0x22, 0x0c, - 0xd1, 0xa4, 0x00, 0x40, 0x23, 0x55, 0x01, 0x7e, 0x20, 0x09, 0x00, 0x01, - 0x20, 0x11, 0x01, 0x00, 0x10, 0x78, 0x5b, 0xf1, 0x20, 0x19, 0x00, 0x0e, - 0x10, 0x78, 0xa1, 0xa5, 0xa4, 0x84, 0x00, 0xff, 0xa0, 0x80, 0x29, 0xc0, - 0x20, 0x0c, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x81, 0x27, 0xa0, 0x06, - 0x20, 0x09, 0x00, 0x0e, 0x10, 0x78, 0xa2, 0x2d, 0x01, 0x7f, 0xd1, 0xac, - 0x00, 0xc0, 0x23, 0x62, 0x01, 0x7e, 0x20, 0x09, 0x00, 0x00, 0x20, 0x19, - 0x00, 0x04, 0x10, 0x78, 0x28, 0x4f, 0x01, 0x7f, 0x00, 0x78, 0x23, 0x71, - 0x15, 0x7e, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, - 0x45, 0xc4, 0x00, 0xc0, 0x23, 0x6d, 0x10, 0x78, 0x42, 0xf8, 0x81, 0x08, - 0x00, 0xf0, 0x23, 0x67, 0x15, 0x7f, 0x0c, 0x7f, 0x04, 0x7f, 0x0f, 0x7e, - 0x20, 0x79, 0xa9, 0xc4, 0x78, 0x3c, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, - 0x23, 0x83, 0x60, 0x27, 0x00, 0x04, 0x78, 0x3f, 0x00, 0x00, 0x20, 0x79, - 0x01, 0x40, 0x78, 0x03, 0x00, 0x00, 0x0f, 0x7f, 0x20, 0x11, 0x00, 0x03, - 0x10, 0x78, 0x70, 0xe0, 0x20, 0x11, 0x00, 0x02, 0x10, 0x78, 0x70, 0xea, - 0x10, 0x78, 0x6f, 0xc4, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x00, 0x10, 0x78, - 0x70, 0x58, 0x03, 0x7f, 0x60, 0xe3, 0x00, 0x00, 0x01, 0x7f, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x14, 0xa2, 0x96, 0x00, 0x04, 0x00, 0xc0, 0x23, 0xa4, - 0xd1, 0x9c, 0x00, 0xc0, 0x23, 0xac, 0x62, 0x28, 0xc2, 0x9d, 0x62, 0x2a, - 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xa7, 0x22, 0x20, 0x03, 0x00, 0x00, - 0x60, 0x27, 0x00, 0x20, 0xd1, 0x94, 0x00, 0x40, 0x24, 0x90, 0x0f, 0x7e, - 0x20, 0x79, 0xa9, 0xc4, 0x78, 0x3c, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, - 0x23, 0xd0, 0x01, 0x7e, 0x60, 0x27, 0x00, 0x04, 0x78, 0x3f, 0x00, 0x00, - 0x20, 0x79, 0x01, 0x40, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, 0x00, 0x00, - 0x20, 0x79, 0xa9, 0xb1, 0x78, 0x07, 0x00, 0x00, 0x78, 0x33, 0x00, 0x00, - 0x10, 0x78, 0x62, 0xd1, 0x10, 0x78, 0x63, 0x9b, 0x01, 0x7f, 0x0f, 0x7f, - 0x00, 0x78, 0x24, 0x90, 0x0f, 0x7f, 0x01, 0x7e, 0x39, 0x00, 0xa0, 0x82, - 0xaa, 0xe3, 0x00, 0xc8, 0x23, 0xdb, 0x01, 0x7e, 0x10, 0x78, 0x74, 0x7a, - 0x01, 0x7f, 0x62, 0x20, 0xd2, 0xb4, 0x00, 0x40, 0x24, 0x46, 0x10, 0x78, - 0x5a, 0xcb, 0x10, 0x78, 0x6e, 0x0f, 0x60, 0x27, 0x00, 0x04, 0x0f, 0x7e, - 0x20, 0x19, 0xa9, 0xba, 0x23, 0x04, 0xa0, 0x7d, 0x00, 0x40, 0x24, 0x1c, - 0x78, 0x04, 0xa0, 0x86, 0x00, 0x32, 0x00, 0xc0, 0x24, 0x1c, 0x0d, 0x7e, - 0x0c, 0x7e, 0x0e, 0x7e, 0x20, 0x69, 0x01, 0x40, 0x61, 0x8c, 0x62, 0x88, - 0x78, 0x18, 0x60, 0x8e, 0x78, 0x08, 0x60, 0x8a, 0x60, 0x43, 0x00, 0x02, - 0x20, 0x01, 0x00, 0x03, 0x80, 0x01, 0x00, 0xc0, 0x24, 0x00, 0x60, 0x43, - 0x00, 0x00, 0x68, 0x03, 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x61, 0x8e, - 0x62, 0x8a, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x62, 0xd1, 0x78, 0x10, - 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, 0x2f, 0x60, 0x10, 0x78, 0x77, 0x2d, - 0x0e, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0f, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x0f, 0x7f, 0x0d, 0x7e, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x00, 0x40, 0x24, 0x29, 0x68, 0x03, 0x10, 0x00, 0x68, 0x03, - 0x00, 0x00, 0x0d, 0x7f, 0x0c, 0x7e, 0x20, 0x61, 0xa9, 0xb1, 0x60, 0x28, - 0xa0, 0x9a, 0x00, 0xc8, 0x00, 0xc8, 0x24, 0x39, 0x80, 0x00, 0x60, 0x2a, - 0x0c, 0x7f, 0x10, 0x78, 0x6e, 0x01, 0x00, 0x78, 0x24, 0x8f, 0x20, 0x19, - 0xa9, 0xba, 0x23, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x24, 0x43, 0x20, 0x09, - 0x00, 0x27, 0x10, 0x78, 0x77, 0x5c, 0x0c, 0x7f, 0x00, 0x78, 0x24, 0x8f, - 0xd2, 0xbc, 0x00, 0x40, 0x24, 0x8f, 0x10, 0x78, 0x5a, 0xd8, 0x60, 0x17, - 0x00, 0x10, 0x60, 0x27, 0x00, 0x04, 0x0d, 0x7e, 0x20, 0x69, 0x01, 0x40, - 0x68, 0x04, 0xa0, 0x84, 0x40, 0x00, 0x00, 0x40, 0x24, 0x5b, 0x68, 0x03, - 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x0d, 0x7f, 0x0c, 0x7e, 0x20, 0x61, - 0xa9, 0xb1, 0x60, 0x44, 0xa0, 0x9a, 0x00, 0xc8, 0x00, 0xc8, 0x24, 0x7e, - 0x80, 0x00, 0x60, 0x46, 0x60, 0x3c, 0x0c, 0x7f, 0xa0, 0x05, 0x00, 0x40, - 0x24, 0x8f, 0x20, 0x09, 0x07, 0xd0, 0x10, 0x78, 0x5a, 0xd0, 0xa0, 0x80, - 0x00, 0x07, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x24, 0x7a, - 0x60, 0x17, 0x00, 0x12, 0x00, 0x78, 0x24, 0x8f, 0x60, 0x17, 0x00, 0x16, - 0x00, 0x78, 0x24, 0x8f, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x01, 0x10, 0x78, - 0x70, 0x58, 0x03, 0x7f, 0x20, 0x19, 0xa9, 0xc0, 0x23, 0x04, 0xa0, 0x65, - 0x00, 0x40, 0x24, 0x8e, 0x20, 0x09, 0x00, 0x4f, 0x10, 0x78, 0x77, 0x5c, - 0x0c, 0x7f, 0x01, 0x7f, 0xd1, 0x9c, 0x00, 0x40, 0x24, 0xe4, 0x70, 0x34, - 0xd0, 0xac, 0x00, 0xc0, 0x24, 0xc1, 0x01, 0x7e, 0x15, 0x7e, 0x60, 0x27, - 0x00, 0x08, 0x60, 0x2f, 0x00, 0x20, 0x20, 0xa9, 0x00, 0x0a, 0x00, 0xf0, - 0x24, 0x9f, 0x60, 0x2f, 0x00, 0x00, 0x61, 0x50, 0xa1, 0x85, 0x14, 0x00, - 0x60, 0x52, 0x20, 0xa9, 0x03, 0x20, 0x00, 0xe0, 0x24, 0xa9, 0x20, 0x91, - 0x60, 0x00, 0x60, 0x20, 0xd0, 0x9c, 0x00, 0xc0, 0x24, 0xb8, 0x15, 0x7f, - 0x61, 0x52, 0x01, 0x7f, 0x60, 0x27, 0x00, 0x08, 0x00, 0x78, 0x24, 0xe4, - 0x10, 0x78, 0x25, 0x77, 0x00, 0xf0, 0x24, 0xa9, 0x15, 0x7f, 0x61, 0x52, - 0x01, 0x7f, 0x60, 0x27, 0x00, 0x08, 0x01, 0x7e, 0x60, 0x28, 0xc0, 0x9c, - 0x60, 0x2a, 0x20, 0x11, 0x00, 0x03, 0x10, 0x78, 0x70, 0xe0, 0x20, 0x11, - 0x00, 0x02, 0x10, 0x78, 0x70, 0xea, 0x10, 0x78, 0x6f, 0xc4, 0x03, 0x7e, - 0x20, 0x19, 0x00, 0x00, 0x10, 0x78, 0x70, 0x58, 0x03, 0x7f, 0x60, 0xe3, - 0x00, 0x00, 0x10, 0x78, 0xa5, 0xbd, 0x10, 0x78, 0xa5, 0xdb, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x03, 0x00, 0x04, 0x60, 0x27, 0x00, 0x08, 0x10, 0x78, - 0x12, 0x46, 0x01, 0x7f, 0xa1, 0x8c, 0xff, 0xd0, 0x61, 0x26, 0x00, 0x7c, - 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x71, 0xbc, 0x70, 0xbe, - 0xa1, 0x16, 0x00, 0x40, 0x25, 0x18, 0x81, 0xff, 0x00, 0x40, 0x25, 0x00, - 0x20, 0x11, 0x80, 0x11, 0x10, 0x78, 0x36, 0x1b, 0x00, 0x78, 0x25, 0x18, - 0x20, 0x11, 0x80, 0x12, 0x10, 0x78, 0x36, 0x1b, 0x20, 0x01, 0xa7, 0x72, - 0x20, 0x04, 0xd0, 0xfc, 0x00, 0xc0, 0x25, 0x18, 0x03, 0x7e, 0x0c, 0x7e, - 0x10, 0x78, 0x6f, 0x9f, 0x20, 0x61, 0x01, 0x00, 0x20, 0x19, 0x00, 0x28, - 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x28, 0x4f, 0x0c, 0x7f, 0x03, 0x7f, - 0x12, 0x7f, 0x0f, 0x7f, 0x0e, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7f, - 0x00, 0x7c, 0x0c, 0x7e, 0x0f, 0x7e, 0x00, 0x7e, 0x02, 0x7e, 0x20, 0x61, - 0x01, 0x00, 0xa1, 0x90, 0x25, 0x3b, 0x22, 0x04, 0x60, 0xf2, 0x20, 0x11, - 0x25, 0x48, 0x60, 0x00, 0xa0, 0x82, 0x00, 0x03, 0x00, 0xc8, 0x25, 0x34, - 0x20, 0x01, 0x00, 0xff, 0x00, 0x78, 0x25, 0x35, 0x22, 0x04, 0x60, 0xee, - 0x02, 0x7f, 0x00, 0x7f, 0x0f, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x08, 0x40, - 0x08, 0x40, 0x08, 0x40, 0x05, 0x80, 0x04, 0x20, 0x03, 0x48, 0x02, 0xc0, - 0x02, 0x58, 0x02, 0x10, 0x01, 0xa8, 0x01, 0xa8, 0x01, 0xa8, 0x01, 0xa8, - 0x01, 0x40, 0x00, 0xf8, 0x00, 0xd0, 0x00, 0xb0, 0x00, 0xa0, 0x20, 0x28, - 0xa1, 0x8c, 0x00, 0xff, 0x21, 0x30, 0xa0, 0x94, 0xff, 0x00, 0x00, 0xc0, - 0x25, 0x58, 0x81, 0xff, 0x00, 0x40, 0x25, 0x5c, 0x10, 0x78, 0x57, 0x61, - 0x00, 0x78, 0x25, 0x63, 0xa0, 0x80, 0x29, 0xc0, 0x20, 0x0c, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa0, 0x06, 0x00, 0x7c, 0xa0, 0x80, 0x29, 0xc0, - 0x20, 0x0c, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x7c, 0x0c, 0x7e, 0x20, 0x61, - 0xa7, 0x00, 0x60, 0x30, 0x00, 0x40, 0x25, 0x73, 0xc0, 0x9d, 0x00, 0x78, - 0x25, 0x74, 0xc0, 0x9c, 0x60, 0x32, 0x0c, 0x7f, 0x00, 0x7c, 0x00, 0x7e, - 0x15, 0x7e, 0x0f, 0x7e, 0x20, 0x79, 0x01, 0x00, 0x20, 0xa9, 0x00, 0x0a, - 0x78, 0x54, 0xd0, 0x8c, 0x00, 0xc0, 0x25, 0x84, 0x00, 0xf0, 0x25, 0x7e, - 0x0f, 0x7f, 0x15, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x00, 0x7e, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x30, 0x00, 0x7e, 0x60, 0x48, 0x00, 0x7e, - 0x60, 0xe4, 0x00, 0x7e, 0x60, 0xe8, 0x00, 0x7e, 0x60, 0x50, 0x00, 0x7e, - 0x60, 0xf0, 0x00, 0x7e, 0x60, 0xec, 0x00, 0x7e, 0x60, 0x0c, 0x00, 0x7e, - 0x60, 0x04, 0x00, 0x7e, 0x60, 0x28, 0x00, 0x7e, 0x60, 0xe0, 0x00, 0x7e, - 0x60, 0x2f, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x05, 0x00, 0x05, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, - 0x00, 0x7f, 0x60, 0xe2, 0x00, 0x7f, 0x60, 0x2a, 0x00, 0x7f, 0x60, 0x06, - 0x00, 0x7f, 0x60, 0x0e, 0x00, 0x7f, 0x60, 0xee, 0x00, 0x7f, 0x60, 0xf2, - 0x00, 0x7f, 0x60, 0x52, 0x00, 0x7f, 0x60, 0xea, 0x00, 0x7f, 0x60, 0xe6, - 0x00, 0x7f, 0x60, 0x4a, 0x00, 0x7f, 0x60, 0x32, 0x00, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0x25, 0xe7, 0x25, 0xeb, 0x25, 0xef, 0x25, 0xf5, 0x25, 0xfb, - 0x26, 0x01, 0x26, 0x07, 0x26, 0x0f, 0x26, 0x17, 0x26, 0x1d, 0x26, 0x23, - 0x26, 0x2b, 0x26, 0x33, 0x26, 0x3b, 0x26, 0x43, 0x26, 0x4d, 0x26, 0x57, - 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, - 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, - 0x26, 0x57, 0x26, 0x57, 0x26, 0x57, 0x10, 0x7e, 0x00, 0x7e, 0x00, 0x78, - 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x21, 0x33, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x21, 0x33, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x10, 0x78, 0x21, 0x33, 0x00, 0x78, - 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x10, 0x78, - 0x21, 0x33, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, - 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, - 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, - 0x22, 0x6c, 0x10, 0x78, 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x10, 0x78, 0x21, 0x78, 0x00, 0x78, - 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, 0x21, 0x33, 0x10, 0x78, - 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, - 0x21, 0x33, 0x10, 0x78, 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x22, 0x6c, 0x10, 0x78, 0x21, 0x33, 0x10, 0x78, - 0x21, 0x78, 0x00, 0x78, 0x26, 0x70, 0x10, 0x7e, 0x00, 0x7e, 0x10, 0x78, - 0x22, 0x6c, 0x10, 0x78, 0x21, 0x33, 0x10, 0x78, 0x21, 0x78, 0x00, 0x78, - 0x26, 0x70, 0x00, 0x05, 0x00, 0x78, 0x26, 0x57, 0xb0, 0x84, 0x00, 0x3c, - 0x80, 0x04, 0x80, 0x04, 0x00, 0x79, 0x26, 0x60, 0x26, 0x70, 0x25, 0xed, - 0x25, 0xf1, 0x25, 0xf7, 0x25, 0xfd, 0x26, 0x03, 0x26, 0x09, 0x26, 0x11, - 0x26, 0x19, 0x26, 0x1f, 0x26, 0x25, 0x26, 0x2d, 0x26, 0x35, 0x26, 0x3d, - 0x26, 0x45, 0x26, 0x4f, 0x00, 0x08, 0x26, 0x5a, 0x00, 0x7f, 0x10, 0x7f, - 0x20, 0x91, 0x80, 0x01, 0x00, 0x7c, 0x0c, 0x7e, 0x02, 0x7e, 0x04, 0x7e, - 0x20, 0x21, 0x00, 0x00, 0x10, 0x78, 0x49, 0x67, 0x00, 0xc0, 0x27, 0x72, - 0x70, 0xcc, 0xd0, 0x9c, 0x00, 0x40, 0x26, 0x8e, 0xd0, 0x84, 0x00, 0xc0, - 0x26, 0x8e, 0xd0, 0xbc, 0x00, 0xc0, 0x27, 0x72, 0x10, 0x78, 0x27, 0x76, - 0x00, 0x78, 0x27, 0x72, 0xd0, 0xcc, 0x00, 0xc0, 0x27, 0x72, 0xd0, 0x94, - 0x00, 0x40, 0x26, 0x98, 0x70, 0x97, 0xff, 0xff, 0x00, 0x78, 0x27, 0x72, - 0x20, 0x01, 0x01, 0x0c, 0x20, 0x3c, 0x72, 0x84, 0xd2, 0x84, 0x00, 0x40, - 0x27, 0x01, 0xd2, 0x8c, 0x00, 0xc0, 0x27, 0x01, 0x03, 0x7e, 0x73, 0x94, - 0xa3, 0x8e, 0xff, 0xff, 0x00, 0x40, 0x26, 0xab, 0x83, 0xff, 0x00, 0xc0, - 0x26, 0xad, 0x20, 0x19, 0x00, 0x01, 0x83, 0x14, 0xa2, 0xe0, 0xad, 0xc0, - 0x2c, 0x04, 0xa3, 0x8c, 0x00, 0x01, 0x00, 0x40, 0x26, 0xba, 0xa0, 0x84, - 0xff, 0x00, 0x80, 0x07, 0x00, 0x78, 0x26, 0xbc, 0xa0, 0x84, 0x00, 0xff, - 0xa7, 0x0e, 0x00, 0x40, 0x26, 0xf6, 0xa0, 0x8e, 0x00, 0x00, 0x00, 0x40, - 0x26, 0xf6, 0xa0, 0x8e, 0x00, 0xff, 0x00, 0xc0, 0x26, 0xd3, 0x72, 0x30, - 0xd2, 0x84, 0x00, 0xc0, 0x26, 0xfc, 0x72, 0x84, 0xc2, 0x8d, 0x72, 0x86, - 0x70, 0x97, 0xff, 0xff, 0x03, 0x7f, 0x00, 0x78, 0x27, 0x01, 0x20, 0x09, - 0x00, 0x00, 0x10, 0x78, 0x25, 0x4d, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, - 0x26, 0xf9, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, - 0x00, 0xc0, 0x26, 0xf0, 0x70, 0x30, 0xd0, 0x8c, 0x00, 0x40, 0x26, 0xea, - 0x60, 0x00, 0xd0, 0xbc, 0x00, 0x40, 0x26, 0xf0, 0x10, 0x78, 0x27, 0x8c, - 0x00, 0x40, 0x26, 0xf9, 0x00, 0x78, 0x26, 0xf6, 0x10, 0x78, 0x28, 0xc4, - 0x10, 0x78, 0x27, 0xb9, 0x00, 0x40, 0x26, 0xf9, 0x83, 0x18, 0x00, 0x78, - 0x26, 0xad, 0x73, 0x96, 0x00, 0x78, 0x26, 0xfe, 0x70, 0x97, 0xff, 0xff, - 0x03, 0x7f, 0x00, 0x78, 0x27, 0x72, 0xa7, 0x80, 0x29, 0xc0, 0x20, 0x3c, - 0xa7, 0xbc, 0xff, 0x00, 0x87, 0x3f, 0x20, 0x41, 0x00, 0x7e, 0x70, 0x94, - 0xa0, 0x96, 0xff, 0xff, 0x00, 0xc0, 0x27, 0x13, 0x20, 0x09, 0x00, 0x00, - 0x28, 0xa8, 0x00, 0x78, 0x27, 0x1f, 0xa8, 0x12, 0x00, 0x48, 0x27, 0x1b, - 0x20, 0x08, 0xa8, 0x02, 0x20, 0xa8, 0x00, 0x78, 0x27, 0x1f, 0x70, 0x97, - 0xff, 0xff, 0x00, 0x78, 0x27, 0x72, 0x27, 0x00, 0x15, 0x7e, 0x01, 0x7e, - 0xa1, 0x06, 0x00, 0x40, 0x27, 0x66, 0xc4, 0x84, 0x10, 0x78, 0x45, 0xc4, - 0x00, 0x40, 0x27, 0x30, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x27, 0x6f, - 0x00, 0x78, 0x27, 0x31, 0xc4, 0x85, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x27, 0x40, 0x70, 0x30, 0xd0, 0x8c, - 0x00, 0x40, 0x27, 0x5e, 0x60, 0x00, 0xd0, 0xbc, 0x00, 0xc0, 0x27, 0x5e, - 0x72, 0x84, 0xd2, 0x8c, 0x00, 0x40, 0x27, 0x56, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x00, 0x48, 0x27, 0x66, 0xd4, 0x84, - 0x00, 0xc0, 0x27, 0x52, 0x10, 0x78, 0x45, 0x7f, 0x00, 0x78, 0x27, 0x54, - 0x10, 0x78, 0x29, 0x8e, 0x00, 0x78, 0x27, 0x66, 0x10, 0x78, 0x28, 0xc4, - 0x10, 0x78, 0x27, 0xb9, 0x00, 0x40, 0x27, 0x6f, 0x00, 0x78, 0x27, 0x66, - 0x10, 0x78, 0x29, 0x59, 0x00, 0x40, 0x27, 0x66, 0x10, 0x78, 0x27, 0x8c, - 0x00, 0x40, 0x27, 0x6f, 0x01, 0x7f, 0x81, 0x08, 0x15, 0x7f, 0x00, 0xf0, - 0x27, 0x1f, 0x70, 0x97, 0xff, 0xff, 0x00, 0x78, 0x27, 0x72, 0x01, 0x7f, - 0x15, 0x7f, 0x71, 0x96, 0x04, 0x7f, 0x02, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, - 0x0c, 0x7e, 0x01, 0x7e, 0x70, 0x97, 0x00, 0x01, 0x20, 0x09, 0x00, 0x7e, - 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x27, 0x89, 0x10, 0x78, 0x28, 0xc4, - 0x10, 0x78, 0x27, 0xb9, 0x00, 0x40, 0x27, 0x89, 0x70, 0xcc, 0xc0, 0xbd, - 0x70, 0xce, 0x01, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x07, 0x7e, - 0x0d, 0x7e, 0x0c, 0x7e, 0x2c, 0x68, 0x20, 0x01, 0xa7, 0x57, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x68, 0x42, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, - 0x27, 0xb4, 0x2d, 0x00, 0x60, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, - 0x45, 0x02, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x90, 0x80, 0x00, - 0x70, 0x92, 0x12, 0x7f, 0x20, 0x09, 0x00, 0x04, 0x10, 0x78, 0x77, 0x5c, - 0xa0, 0x85, 0x00, 0x01, 0x0c, 0x7f, 0x0d, 0x7f, 0x07, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x01, 0x7e, 0x07, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x2c, 0x68, - 0x20, 0x01, 0xa7, 0x57, 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x42, - 0x10, 0x78, 0x91, 0x97, 0x00, 0x40, 0x27, 0xf2, 0x2d, 0x00, 0x60, 0x1a, - 0x68, 0x00, 0xc0, 0xc4, 0x68, 0x02, 0x68, 0xa0, 0xa0, 0x86, 0x00, 0x7e, - 0x00, 0x40, 0x27, 0xdb, 0x68, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0xc0, 0x27, 0xdb, 0x10, 0x78, 0x28, 0x80, 0x60, 0x1f, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x20, 0x01, - 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x90, 0x80, 0x00, 0x70, 0x92, 0x12, 0x7f, 0x20, 0x09, 0x00, 0x02, - 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x0c, 0x7f, 0x0d, 0x7f, - 0x07, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x02, 0x7e, 0x20, 0x09, - 0x00, 0x80, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x28, 0x05, 0x10, 0x78, - 0x28, 0x08, 0x00, 0x40, 0x28, 0x05, 0x70, 0xd3, 0xff, 0xff, 0x02, 0x7f, - 0x0c, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x07, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, - 0x2c, 0x68, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, 0x28, 0x2a, 0x2d, 0x00, - 0x60, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, - 0x44, 0xee, 0x20, 0x01, 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x70, 0xd4, 0x80, 0x00, 0x70, 0xd6, 0x12, 0x7f, - 0x20, 0x09, 0x00, 0x02, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x0c, 0x7f, 0x0d, 0x7f, 0x07, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, - 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0x00, 0x7f, - 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x28, 0x4b, 0x2c, 0x68, 0x10, 0x78, - 0x76, 0xc7, 0x00, 0x40, 0x28, 0x4b, 0x2d, 0x00, 0x60, 0x1a, 0x63, 0x12, - 0x60, 0x1f, 0x00, 0x01, 0x62, 0x0a, 0x20, 0x09, 0x00, 0x22, 0x10, 0x78, - 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0d, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, 0x03, 0x7e, 0x02, 0x7e, - 0x10, 0x78, 0x5f, 0x0e, 0x10, 0x78, 0x5e, 0xae, 0x10, 0x78, 0x80, 0x68, - 0x21, 0x30, 0x81, 0xff, 0x00, 0x40, 0x28, 0x64, 0x20, 0xa9, 0x00, 0x7e, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x28, 0x68, 0x20, 0xa9, 0x00, 0x7f, - 0x20, 0x09, 0x00, 0x00, 0x01, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, - 0x28, 0x71, 0x10, 0x78, 0x47, 0xe9, 0x10, 0x78, 0x42, 0xf8, 0x01, 0x7f, - 0x81, 0x08, 0x00, 0xf0, 0x28, 0x68, 0x86, 0xff, 0x00, 0xc0, 0x28, 0x7a, - 0x10, 0x78, 0x11, 0x9b, 0x02, 0x7f, 0x03, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x03, 0x7e, 0x02, 0x7e, - 0x01, 0x7e, 0x62, 0x18, 0x22, 0x70, 0x72, 0xa0, 0x02, 0x7e, 0x20, 0x19, - 0x00, 0x29, 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, - 0x10, 0x78, 0x5e, 0x0a, 0x2c, 0x08, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, - 0x01, 0x7f, 0x2e, 0x60, 0x10, 0x78, 0x47, 0xe9, 0x62, 0x10, 0x63, 0x14, - 0x10, 0x78, 0x42, 0xf8, 0x62, 0x12, 0x63, 0x16, 0x01, 0x7f, 0x02, 0x7f, - 0x03, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x00, 0x7e, - 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0xc0, - 0x28, 0xba, 0x20, 0x71, 0xa7, 0x00, 0x70, 0x90, 0xa0, 0x05, 0x00, 0x40, - 0x28, 0xb7, 0x80, 0x01, 0x70, 0x92, 0x00, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x20, 0x71, 0xa7, 0x00, 0x70, 0xd4, 0xa0, 0x05, 0x00, 0x40, 0x28, 0xb7, - 0x80, 0x01, 0x70, 0xd6, 0x00, 0x78, 0x28, 0xb7, 0x60, 0x00, 0xc0, 0x8c, - 0x60, 0x02, 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, 0x0c, 0x7e, 0x03, 0x7e, - 0x02, 0x7e, 0x01, 0x7e, 0x15, 0x7e, 0x21, 0x78, 0x81, 0xff, 0x00, 0xc0, - 0x28, 0xd7, 0x20, 0xa9, 0x00, 0x01, 0x00, 0x78, 0x28, 0xf2, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x00, 0x40, 0x28, 0xee, 0xd0, 0xa4, - 0x00, 0x40, 0x28, 0xee, 0x04, 0x7e, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x24, 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, 0xa0, 0x06, 0x20, 0x09, - 0x00, 0x2d, 0x10, 0x78, 0xa2, 0x2d, 0x04, 0x7f, 0x20, 0xa9, 0x00, 0xff, - 0x20, 0x11, 0x00, 0x00, 0x02, 0x7e, 0xa2, 0x8e, 0x00, 0x7e, 0x00, 0x40, - 0x29, 0x36, 0xa2, 0x8e, 0x00, 0x7f, 0x00, 0x40, 0x29, 0x36, 0xa2, 0x8e, - 0x00, 0x80, 0x00, 0x40, 0x29, 0x36, 0xa2, 0x88, 0xa8, 0x35, 0x21, 0x0c, - 0x81, 0xff, 0x00, 0x40, 0x29, 0x36, 0x8f, 0xff, 0x10, 0x40, 0x29, 0x42, - 0x0c, 0x7e, 0x21, 0x60, 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x49, 0x72, - 0x0c, 0x7f, 0x20, 0x19, 0x00, 0x29, 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, - 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x5e, 0x0a, 0x0c, 0x7e, 0x02, 0x7e, - 0x21, 0x60, 0x62, 0x04, 0xa2, 0x94, 0x00, 0xff, 0xa2, 0x86, 0x00, 0x06, - 0x00, 0xc0, 0x29, 0x26, 0x60, 0x07, 0x04, 0x04, 0x00, 0x78, 0x29, 0x2b, - 0x20, 0x01, 0x00, 0x04, 0x80, 0x07, 0xa2, 0x15, 0x62, 0x06, 0x02, 0x7f, - 0x0c, 0x7f, 0x01, 0x7e, 0x2c, 0x08, 0x10, 0x78, 0x9f, 0x9b, 0x01, 0x7f, - 0x07, 0x7f, 0x21, 0x60, 0x10, 0x78, 0x47, 0xe9, 0x02, 0x7f, 0x82, 0x10, - 0x00, 0xf0, 0x28, 0xf2, 0x15, 0x7f, 0x01, 0x7f, 0x02, 0x7f, 0x03, 0x7f, - 0x0c, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x04, 0x7e, 0x02, 0x7e, - 0x01, 0x7e, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x00, 0x40, - 0x29, 0x55, 0xd0, 0xa4, 0x00, 0x40, 0x29, 0x55, 0xa0, 0x06, 0x22, 0x20, - 0x84, 0x27, 0x20, 0x09, 0x00, 0x29, 0x10, 0x78, 0xa2, 0x2d, 0x01, 0x7f, - 0x02, 0x7f, 0x04, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, - 0x0c, 0x7e, 0x72, 0x84, 0x82, 0xff, 0x00, 0x40, 0x29, 0x87, 0xa2, 0x90, - 0xa7, 0x53, 0x22, 0x14, 0xd2, 0xac, 0x00, 0xc0, 0x29, 0x87, 0x21, 0x00, - 0x10, 0x78, 0x25, 0x64, 0x81, 0xff, 0x00, 0x40, 0x29, 0x89, 0x20, 0x19, - 0x00, 0x01, 0x83, 0x14, 0xa2, 0xe0, 0xad, 0xc0, 0x2c, 0x04, 0xd3, 0x84, - 0x00, 0x40, 0x29, 0x7b, 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x78, - 0x29, 0x7d, 0xa0, 0x84, 0x00, 0xff, 0xa1, 0x16, 0x00, 0x40, 0x29, 0x89, - 0xa0, 0x96, 0x00, 0xff, 0x00, 0x40, 0x29, 0x87, 0x83, 0x18, 0x00, 0x78, - 0x29, 0x6f, 0xa0, 0x85, 0x00, 0x01, 0x0c, 0x7f, 0x03, 0x7f, 0x02, 0x7f, - 0x01, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x21, 0x10, 0x02, 0x7e, - 0x20, 0x19, 0x00, 0x29, 0x10, 0x78, 0x73, 0xd0, 0x02, 0x7f, 0x10, 0x78, - 0xa5, 0x01, 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0xa1, 0x80, 0xa8, 0x35, - 0x20, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x29, 0xb7, 0x01, 0x7e, 0x0c, 0x7e, - 0x10, 0x78, 0x91, 0x97, 0x01, 0x7f, 0x10, 0x40, 0x13, 0x32, 0x61, 0x1a, - 0x10, 0x78, 0x28, 0x80, 0x10, 0x78, 0x77, 0x2d, 0x01, 0x7f, 0x10, 0x78, - 0x45, 0x7f, 0x12, 0x7f, 0x0c, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x20, 0x01, - 0xa7, 0x33, 0x20, 0x04, 0xd0, 0xcc, 0x00, 0x7c, 0x7e, 0xef, 0x7d, 0xe8, - 0x7c, 0xe4, 0x80, 0xe2, 0x7b, 0xe1, 0x80, 0xe0, 0x80, 0xdc, 0x80, 0xda, - 0x7a, 0xd9, 0x80, 0xd6, 0x80, 0xd5, 0x80, 0xd4, 0x80, 0xd3, 0x80, 0xd2, - 0x80, 0xd1, 0x79, 0xce, 0x78, 0xcd, 0x80, 0xcc, 0x80, 0xcb, 0x80, 0xca, - 0x80, 0xc9, 0x80, 0xc7, 0x80, 0xc6, 0x77, 0xc5, 0x76, 0xc3, 0x80, 0xbc, - 0x80, 0xba, 0x75, 0xb9, 0x80, 0xb6, 0x74, 0xb5, 0x73, 0xb4, 0x72, 0xb3, - 0x80, 0xb2, 0x80, 0xb1, 0x80, 0xae, 0x71, 0xad, 0x80, 0xac, 0x70, 0xab, - 0x6f, 0xaa, 0x6e, 0xa9, 0x80, 0xa7, 0x6d, 0xa6, 0x6c, 0xa5, 0x6b, 0xa3, - 0x6a, 0x9f, 0x69, 0x9e, 0x68, 0x9d, 0x80, 0x9b, 0x80, 0x98, 0x67, 0x97, - 0x66, 0x90, 0x65, 0x8f, 0x64, 0x88, 0x63, 0x84, 0x62, 0x82, 0x80, 0x81, - 0x80, 0x80, 0x61, 0x7c, 0x60, 0x7a, 0x80, 0x79, 0x5f, 0x76, 0x80, 0x75, - 0x80, 0x74, 0x80, 0x73, 0x80, 0x72, 0x80, 0x71, 0x80, 0x6e, 0x5e, 0x6d, - 0x80, 0x6c, 0x5d, 0x6b, 0x5c, 0x6a, 0x5b, 0x69, 0x80, 0x67, 0x5a, 0x66, - 0x59, 0x65, 0x58, 0x63, 0x57, 0x5c, 0x56, 0x5a, 0x55, 0x59, 0x80, 0x56, - 0x80, 0x55, 0x54, 0x54, 0x53, 0x53, 0x52, 0x52, 0x51, 0x51, 0x50, 0x4e, - 0x4f, 0x4d, 0x80, 0x4c, 0x80, 0x4b, 0x4e, 0x4a, 0x4d, 0x49, 0x80, 0x47, - 0x4c, 0x46, 0x80, 0x45, 0x80, 0x43, 0x80, 0x3c, 0x80, 0x3a, 0x80, 0x39, - 0x80, 0x36, 0x4b, 0x35, 0x80, 0x34, 0x4a, 0x33, 0x49, 0x32, 0x48, 0x31, - 0x80, 0x2e, 0x47, 0x2d, 0x46, 0x2c, 0x45, 0x2b, 0x44, 0x2a, 0x43, 0x29, - 0x42, 0x27, 0x80, 0x26, 0x80, 0x25, 0x41, 0x23, 0x40, 0x1f, 0x3f, 0x1e, - 0x3e, 0x1d, 0x3d, 0x1b, 0x3c, 0x18, 0x80, 0x17, 0x80, 0x10, 0x3b, 0x0f, - 0x3a, 0x08, 0x80, 0x04, 0x39, 0x02, 0x80, 0x01, 0x80, 0x00, 0x80, 0x00, - 0x38, 0x00, 0x37, 0x00, 0x36, 0x00, 0x80, 0x00, 0x35, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x34, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x33, 0x00, 0x32, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x31, 0x00, - 0x30, 0x00, 0x80, 0x00, 0x80, 0x00, 0x2f, 0x00, 0x80, 0x00, 0x2e, 0x00, - 0x2d, 0x00, 0x2c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x2b, 0x00, - 0x80, 0x00, 0x2a, 0x00, 0x29, 0x00, 0x28, 0x00, 0x80, 0x00, 0x27, 0x00, - 0x26, 0x00, 0x25, 0x00, 0x24, 0x00, 0x23, 0x00, 0x22, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x21, 0x00, 0x20, 0x00, 0x1f, 0x00, 0x1e, 0x00, 0x1d, 0x00, - 0x1c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x1b, 0x00, 0x1a, 0x00, 0x80, 0x00, - 0x19, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x18, 0x00, 0x80, 0x00, 0x17, 0x00, 0x16, 0x00, 0x15, 0x00, - 0x80, 0x00, 0x14, 0x00, 0x13, 0x00, 0x12, 0x00, 0x11, 0x00, 0x10, 0x00, - 0x0f, 0x00, 0x80, 0x00, 0x80, 0x00, 0x0e, 0x00, 0x0d, 0x00, 0x0c, 0x00, - 0x0b, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, - 0x07, 0x00, 0x80, 0x00, 0x06, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x05, 0x00, 0x04, 0x00, 0x03, 0x00, 0x80, 0x00, 0x02, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x01, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x20, 0x71, 0xa7, 0x82, 0x70, 0x03, 0x00, 0x02, - 0xa0, 0x06, 0x70, 0x12, 0x70, 0x16, 0x70, 0x3a, 0x70, 0x3e, 0x70, 0x33, - 0xa7, 0x92, 0x70, 0x37, 0xa7, 0x92, 0x70, 0x07, 0x00, 0x01, 0x20, 0x61, - 0xa7, 0xd2, 0x60, 0x03, 0x00, 0x02, 0x00, 0x7c, 0x00, 0x90, 0x2a, 0xe7, - 0x00, 0x68, 0x2a, 0xe7, 0x20, 0x71, 0xa7, 0x82, 0x2b, 0x78, 0x78, 0x18, - 0xd0, 0x84, 0x00, 0xc0, 0x2a, 0xe7, 0x2a, 0x60, 0x78, 0x20, 0xa0, 0x8e, - 0x00, 0x69, 0x00, 0xc0, 0x2b, 0xd7, 0x00, 0x79, 0x2b, 0x6b, 0x00, 0x7c, - 0x20, 0x71, 0xa7, 0x82, 0x70, 0x04, 0x00, 0x79, 0x2a, 0xed, 0x2a, 0xf1, - 0x2a, 0xf2, 0x2a, 0xfc, 0x2b, 0x0e, 0x00, 0x7c, 0x00, 0x90, 0x2a, 0xfb, - 0x00, 0x68, 0x2a, 0xfb, 0x2b, 0x78, 0x78, 0x18, 0xd0, 0x84, 0x00, 0x40, - 0x2b, 0x1a, 0x00, 0x7c, 0x2b, 0x78, 0x20, 0x61, 0xa7, 0xd2, 0x60, 0x08, - 0xa0, 0x8e, 0x01, 0x00, 0x00, 0x40, 0x2b, 0x09, 0xa0, 0x86, 0x02, 0x00, - 0x00, 0x40, 0x2b, 0xcf, 0x00, 0x7c, 0x70, 0x14, 0x20, 0x68, 0x2a, 0x60, - 0x70, 0x18, 0x00, 0x7a, 0x70, 0x10, 0x20, 0x68, 0x68, 0x34, 0xa0, 0x86, - 0x01, 0x03, 0x00, 0x40, 0x2b, 0x16, 0x00, 0x7c, 0x2a, 0x60, 0x2b, 0x78, - 0x70, 0x18, 0x00, 0x7a, 0x2a, 0x60, 0x78, 0x20, 0xa0, 0x8a, 0x00, 0x40, - 0x00, 0xc8, 0x2b, 0x23, 0x61, 0xbc, 0x00, 0x79, 0x2b, 0x2b, 0x21, 0x00, - 0xa0, 0x8a, 0x00, 0x3f, 0x00, 0xc8, 0x2b, 0xcb, 0x61, 0xbc, 0x00, 0x79, - 0x2b, 0x6b, 0x2b, 0xad, 0x2b, 0xdf, 0x2b, 0xe7, 0x2b, 0xeb, 0x2b, 0xf3, - 0x2b, 0xf9, 0x2b, 0xfd, 0x2c, 0x09, 0x2c, 0x0d, 0x2c, 0x17, 0x2c, 0x1b, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2c, 0x1f, 0x2b, 0xcb, 0x2c, 0x2f, - 0x2c, 0x46, 0x2c, 0x5d, 0x2c, 0xdd, 0x2c, 0xe2, 0x2d, 0x0f, 0x2d, 0x69, - 0x2d, 0x7a, 0x2d, 0x98, 0x2d, 0xd9, 0x2d, 0xe3, 0x2d, 0xf0, 0x2e, 0x03, - 0x2e, 0x22, 0x2e, 0x2b, 0x2e, 0x68, 0x2e, 0x6e, 0x2b, 0xcb, 0x2e, 0x8a, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2e, 0x91, - 0x2e, 0x9b, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2e, 0xa3, 0x2b, 0xcb, 0x2b, 0xcb, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2e, 0xb5, 0x2e, 0xce, 0x2b, 0xcb, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2e, 0xe0, - 0x2f, 0x37, 0x2f, 0x95, 0x2f, 0xa9, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, - 0x39, 0x8e, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2c, 0x17, 0x2c, 0x1b, 0x2f, 0xc0, - 0x2b, 0xcb, 0x2f, 0xcd, 0x3a, 0x26, 0x3a, 0x83, 0x2b, 0xcb, 0x2b, 0xcb, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, - 0x2b, 0xcb, 0x30, 0x1a, 0x31, 0x4f, 0x31, 0x6b, 0x31, 0x77, 0x31, 0xda, - 0x32, 0x33, 0x32, 0x3e, 0x32, 0x7d, 0x32, 0x8c, 0x32, 0x9b, 0x32, 0x9e, - 0x2f, 0xd1, 0x32, 0xc2, 0x33, 0x1e, 0x33, 0x2b, 0x34, 0x3c, 0x35, 0x6f, - 0x35, 0x99, 0x36, 0xa6, 0x2b, 0xcb, 0x36, 0xb6, 0x36, 0xf0, 0x37, 0xbf, - 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x2b, 0xcb, 0x38, 0x27, 0x38, 0x43, - 0x38, 0xbd, 0x39, 0x77, 0x71, 0x3c, 0x00, 0x78, 0x2b, 0xad, 0x20, 0x21, - 0x40, 0x00, 0x10, 0x78, 0x35, 0xf5, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x00, 0x68, 0x2b, 0xba, 0x78, 0x18, 0xd0, 0x84, 0x00, 0x40, 0x2b, 0xbd, - 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xb1, 0x7c, 0x22, 0x79, 0x26, 0x7a, 0x2a, - 0x7b, 0x2e, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x70, 0x07, - 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, 0x12, 0x7f, 0x00, 0x7c, 0x20, 0x21, - 0x40, 0x01, 0x00, 0x78, 0x2b, 0xaf, 0x20, 0x21, 0x40, 0x02, 0x00, 0x78, - 0x2b, 0xaf, 0x20, 0x21, 0x40, 0x03, 0x00, 0x78, 0x2b, 0xaf, 0x20, 0x21, - 0x40, 0x05, 0x00, 0x78, 0x2b, 0xaf, 0x20, 0x21, 0x40, 0x06, 0x00, 0x78, - 0x2b, 0xaf, 0xa0, 0x2e, 0x25, 0x20, 0x7b, 0x28, 0x7a, 0x2c, 0x78, 0x24, - 0x79, 0x30, 0x00, 0x78, 0x36, 0x04, 0x78, 0x23, 0x00, 0x04, 0x78, 0x24, - 0x00, 0x7a, 0xa0, 0x2e, 0x25, 0x20, 0x7b, 0x28, 0x7a, 0x2c, 0x78, 0x24, - 0x79, 0x30, 0x00, 0x78, 0x36, 0x08, 0x79, 0x24, 0x78, 0x28, 0x21, 0x14, - 0x20, 0x0a, 0x00, 0x78, 0x2b, 0xad, 0x79, 0x24, 0x21, 0x14, 0x00, 0x78, - 0x2b, 0xad, 0x20, 0x99, 0x00, 0x09, 0x20, 0xa1, 0x00, 0x09, 0x20, 0xa9, - 0x00, 0x07, 0x53, 0xa3, 0x79, 0x24, 0x7a, 0x28, 0x7b, 0x2c, 0x00, 0x78, - 0x2b, 0xad, 0x78, 0x24, 0x20, 0x60, 0x00, 0x78, 0x2c, 0x21, 0x20, 0x09, - 0x00, 0x01, 0x20, 0x11, 0x00, 0x13, 0x20, 0x19, 0x00, 0x19, 0x78, 0x3b, - 0x00, 0x17, 0x00, 0x78, 0x2b, 0xad, 0x7d, 0x38, 0x7c, 0x3c, 0x00, 0x78, - 0x2b, 0xe1, 0x7d, 0x38, 0x7c, 0x3c, 0x00, 0x78, 0x2b, 0xed, 0x20, 0x61, - 0x10, 0x00, 0x61, 0x0c, 0xa0, 0x06, 0x2c, 0x14, 0xa2, 0x00, 0x8c, 0x60, - 0x81, 0x09, 0x00, 0xc0, 0x2c, 0x23, 0x20, 0x10, 0xa0, 0x05, 0x00, 0x40, - 0x2b, 0xad, 0x00, 0x78, 0x2b, 0xd3, 0x20, 0x69, 0xa7, 0x52, 0x78, 0x24, - 0x79, 0x30, 0xa1, 0x1a, 0x00, 0xc8, 0x2b, 0xdb, 0x80, 0x19, 0x00, 0x40, - 0x2b, 0xdb, 0x68, 0x4a, 0x69, 0x42, 0x78, 0x2c, 0x68, 0x52, 0x78, 0x28, - 0x68, 0x56, 0xa0, 0x06, 0x68, 0x5a, 0x68, 0x5e, 0x10, 0x78, 0x4e, 0xae, - 0x00, 0x78, 0x2b, 0xad, 0x20, 0x69, 0xa7, 0x52, 0x78, 0x24, 0x79, 0x34, - 0xa1, 0x1a, 0x00, 0xc8, 0x2b, 0xdb, 0x80, 0x19, 0x00, 0x40, 0x2b, 0xdb, - 0x68, 0x4e, 0x69, 0x46, 0x78, 0x2c, 0x68, 0x62, 0x78, 0x28, 0x68, 0x66, - 0xa0, 0x06, 0x68, 0x6a, 0x68, 0x6e, 0x10, 0x78, 0x4a, 0x3e, 0x00, 0x78, - 0x2b, 0xad, 0xa0, 0x2e, 0x25, 0x20, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, - 0x79, 0x24, 0x7b, 0x28, 0x7a, 0x2c, 0x20, 0xa9, 0x00, 0x05, 0x20, 0xa1, - 0xa7, 0x89, 0x41, 0xa1, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x2b, 0xd7, - 0x20, 0x09, 0x00, 0x20, 0x10, 0x78, 0x36, 0x04, 0x70, 0x1b, 0x2c, 0x75, - 0x00, 0x7c, 0x68, 0x34, 0x20, 0x08, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x96, - 0x00, 0x11, 0x00, 0x40, 0x2c, 0x85, 0xa0, 0x96, 0x00, 0x19, 0x00, 0x40, - 0x2c, 0x85, 0xa0, 0x96, 0x00, 0x15, 0x00, 0xc0, 0x2b, 0xd7, 0x81, 0x0f, - 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x40, 0x2b, 0xd7, 0x71, 0x0e, 0x70, 0x0c, - 0x80, 0x01, 0x00, 0x40, 0x2c, 0xb6, 0x70, 0x0e, 0x10, 0x78, 0x35, 0xba, - 0x00, 0x40, 0x2b, 0xd7, 0x20, 0x09, 0x00, 0x20, 0x20, 0x61, 0xa7, 0xd2, - 0x62, 0x24, 0x63, 0x28, 0x64, 0x2c, 0x65, 0x30, 0xa2, 0x90, 0x00, 0x40, - 0xa3, 0x99, 0x00, 0x00, 0xa4, 0xa1, 0x00, 0x00, 0xa5, 0xa9, 0x00, 0x00, - 0x10, 0x78, 0x36, 0x04, 0x70, 0x1b, 0x2c, 0xa9, 0x00, 0x7c, 0x68, 0x34, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x96, 0x00, 0x02, 0x00, 0x40, 0x2c, 0xb4, - 0xa0, 0x96, 0x00, 0x0a, 0x00, 0xc0, 0x2b, 0xd7, 0x00, 0x78, 0x2c, 0x8b, - 0x70, 0x10, 0x20, 0x68, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x10, 0x78, - 0x44, 0x31, 0x00, 0xc0, 0x2c, 0xc4, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, - 0x2c, 0xc6, 0x00, 0x7c, 0x10, 0x78, 0x4b, 0x51, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, 0x20, 0x99, 0xa7, 0x89, 0x53, 0x0a, - 0x21, 0x00, 0xa2, 0x10, 0xa3, 0x99, 0x00, 0x00, 0xa4, 0xa1, 0x00, 0x00, - 0xa5, 0xa9, 0x00, 0x00, 0xad, 0x80, 0x00, 0x0d, 0x20, 0x09, 0x00, 0x20, - 0x12, 0x7f, 0x00, 0x78, 0x36, 0x08, 0x61, 0xa4, 0x78, 0x24, 0x60, 0xa6, - 0x00, 0x78, 0x2b, 0xad, 0x20, 0x91, 0x80, 0x00, 0x78, 0x23, 0x40, 0x00, - 0x78, 0x27, 0x49, 0x53, 0x78, 0x2b, 0x50, 0x20, 0x78, 0x2f, 0x20, 0x20, - 0x20, 0x09, 0x01, 0x7f, 0x21, 0x04, 0x78, 0x32, 0x3f, 0x00, 0x78, 0x36, - 0x20, 0x61, 0x01, 0x00, 0x62, 0x00, 0x20, 0x61, 0x02, 0x00, 0x60, 0x3c, - 0x80, 0x07, 0xa2, 0x05, 0x78, 0x3a, 0x20, 0x09, 0x04, 0xfd, 0x21, 0x04, - 0x78, 0x3e, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x71, 0x00, 0x10, 0x20, 0xc1, 0x00, 0xf0, 0xa0, 0x8a, - 0x00, 0x03, 0x00, 0xc8, 0x04, 0x27, 0x00, 0x78, 0x04, 0x23, 0x81, 0xff, - 0x00, 0xc0, 0x2b, 0xd7, 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, - 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x2b, 0xdb, 0x7e, 0x38, 0xa6, 0x84, - 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, 0x00, 0x48, 0x2d, 0x23, 0x00, 0x78, - 0x2b, 0xdb, 0x7c, 0x28, 0x7d, 0x2c, 0x10, 0x78, 0x47, 0xa4, 0xd2, 0x8c, - 0x00, 0xc0, 0x2d, 0x2e, 0x10, 0x78, 0x47, 0x36, 0x00, 0x78, 0x2d, 0x30, - 0x10, 0x78, 0x47, 0x72, 0x00, 0xc0, 0x2d, 0x5a, 0x20, 0x61, 0xae, 0x00, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x00, 0x40, 0x2d, 0x48, 0x60, 0x10, 0xa0, 0x6d, 0x00, 0x40, 0x2d, 0x48, - 0x68, 0x3c, 0xa4, 0x06, 0x00, 0xc0, 0x2d, 0x48, 0x68, 0x40, 0xa5, 0x06, - 0x00, 0x40, 0x2d, 0x53, 0x12, 0x7f, 0xac, 0xe0, 0x00, 0x10, 0x20, 0x01, - 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, 0x2b, 0xd7, 0x00, 0x78, - 0x2d, 0x34, 0x10, 0x78, 0x8a, 0x11, 0x12, 0x7f, 0x00, 0x40, 0x2b, 0xd7, - 0x00, 0x78, 0x2b, 0xad, 0xa0, 0x0e, 0x20, 0x01, 0x00, 0x05, 0x10, 0x78, - 0x4b, 0x51, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x8f, 0x95, - 0x10, 0x78, 0x4a, 0x73, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, - 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, 0x2b, 0xdb, - 0x10, 0x78, 0x46, 0x73, 0x00, 0x40, 0x2b, 0xd7, 0x10, 0x78, 0x47, 0xb2, - 0x00, 0x40, 0x2b, 0xd7, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, - 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, - 0x48, 0x2f, 0x00, 0x40, 0x2b, 0xd7, 0x20, 0x19, 0x00, 0x05, 0x10, 0x78, - 0x47, 0xd3, 0x00, 0x40, 0x2b, 0xd7, 0x78, 0x28, 0xa0, 0x8a, 0x10, 0x00, - 0x00, 0xc8, 0x2b, 0xdb, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, - 0x10, 0x78, 0x5a, 0x52, 0x00, 0x78, 0x2b, 0xad, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x81, 0xff, 0x00, 0x40, 0x2d, 0xa2, 0x20, 0x09, 0x00, 0x01, - 0x00, 0x78, 0x2d, 0xd3, 0x20, 0x29, 0x00, 0xff, 0x64, 0x50, 0x24, 0x00, - 0xa5, 0x06, 0x00, 0x40, 0x2d, 0xcd, 0x25, 0x08, 0x10, 0x78, 0x45, 0xc4, - 0x00, 0xc0, 0x2d, 0xcd, 0x10, 0x78, 0x48, 0x2f, 0x00, 0xc0, 0x2d, 0xb8, - 0x20, 0x09, 0x00, 0x02, 0x62, 0xac, 0x25, 0x18, 0x00, 0x78, 0x2d, 0xd3, - 0x20, 0x19, 0x00, 0x04, 0x10, 0x78, 0x47, 0xd3, 0x00, 0xc0, 0x2d, 0xc2, - 0x20, 0x09, 0x00, 0x06, 0x00, 0x78, 0x2d, 0xd3, 0x78, 0x24, 0xa0, 0x8a, - 0x10, 0x00, 0x00, 0xc8, 0x2d, 0xd6, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0xa1, 0x08, 0x10, 0x78, 0x5a, 0x52, 0x85, 0x29, 0x00, 0xc8, 0x2d, 0xa5, - 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xd7, - 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, - 0x2b, 0xdb, 0x10, 0x78, 0x46, 0xe7, 0x10, 0x78, 0x47, 0xa4, 0x00, 0x78, - 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xd2, - 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, 0x46, 0xd6, 0x10, 0x78, 0x47, 0xa4, - 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, - 0x35, 0xd2, 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, 0x47, 0x75, 0x00, 0x40, - 0x2b, 0xd7, 0x10, 0x78, 0x44, 0x84, 0x10, 0x78, 0x47, 0x2f, 0x10, 0x78, - 0x47, 0xa4, 0x00, 0x78, 0x2b, 0xad, 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, - 0x2b, 0xdb, 0x10, 0x78, 0x46, 0x73, 0x00, 0x40, 0x2b, 0xd7, 0x62, 0xa0, - 0x20, 0x19, 0x00, 0x05, 0x0c, 0x7e, 0x10, 0x78, 0x47, 0xe9, 0x0c, 0x7f, - 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, - 0x5e, 0x0a, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, - 0x10, 0x78, 0x47, 0xa4, 0x00, 0x78, 0x2b, 0xad, 0x10, 0x78, 0x35, 0xd2, - 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, 0x47, 0xa4, 0x22, 0x08, 0x00, 0x78, - 0x2b, 0xad, 0x15, 0x7e, 0x0d, 0x7e, 0x0e, 0x7e, 0x20, 0x69, 0xa8, 0x14, - 0x68, 0x10, 0x69, 0x14, 0xa1, 0x0a, 0x00, 0xc8, 0x2e, 0x37, 0x20, 0x09, - 0x00, 0x00, 0x68, 0x16, 0x20, 0x11, 0x00, 0x00, 0x20, 0x19, 0x00, 0x00, - 0x20, 0xa9, 0x00, 0xff, 0x20, 0x69, 0xa8, 0x35, 0x2d, 0x04, 0xa0, 0x75, - 0x00, 0x40, 0x2e, 0x4c, 0x70, 0x4c, 0x10, 0x78, 0x2e, 0x56, 0xa2, 0x10, - 0x70, 0x80, 0x10, 0x78, 0x2e, 0x56, 0xa3, 0x18, 0x8d, 0x68, 0x00, 0xf0, - 0x2e, 0x40, 0x23, 0x00, 0xa2, 0x18, 0x0e, 0x7f, 0x0d, 0x7f, 0x15, 0x7f, - 0x00, 0x78, 0x2b, 0xad, 0x0f, 0x7e, 0x01, 0x7e, 0xa0, 0x7d, 0x00, 0x40, - 0x2e, 0x65, 0x20, 0x01, 0x00, 0x00, 0x80, 0x00, 0x2f, 0x0c, 0x81, 0xff, - 0x00, 0x40, 0x2e, 0x65, 0x21, 0x78, 0x00, 0x78, 0x2e, 0x5d, 0x01, 0x7f, - 0x0f, 0x7f, 0x00, 0x7c, 0x20, 0x69, 0xa8, 0x14, 0x69, 0x10, 0x62, 0xa8, - 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x61, 0x50, - 0xa1, 0x90, 0x29, 0xc0, 0x22, 0x14, 0xa2, 0x94, 0x00, 0xff, 0x60, 0x70, - 0xa0, 0x84, 0xff, 0x00, 0xa2, 0x15, 0x63, 0x6c, 0x67, 0xcc, 0xd7, 0x9c, - 0x00, 0x40, 0x2e, 0x84, 0x20, 0x31, 0x00, 0x01, 0x00, 0x78, 0x2e, 0x86, - 0x20, 0x31, 0x00, 0x00, 0x7e, 0x3a, 0x7f, 0x3e, 0x00, 0x78, 0x2b, 0xad, - 0x61, 0x40, 0x62, 0x44, 0x20, 0x19, 0xa9, 0xa2, 0x23, 0x1c, 0x00, 0x78, - 0x2b, 0xad, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x61, 0x34, 0x63, 0x38, - 0xa0, 0x06, 0x20, 0x10, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, 0x10, 0x78, - 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x62, 0x44, 0x63, 0x38, 0x00, 0x78, - 0x2b, 0xad, 0x61, 0x40, 0x62, 0x44, 0x78, 0x24, 0x60, 0x42, 0x7b, 0x28, - 0x63, 0x46, 0x20, 0x69, 0xa7, 0x52, 0x83, 0x1f, 0xa3, 0x05, 0x68, 0x16, - 0x78, 0x2c, 0x20, 0x69, 0xa9, 0xa2, 0x2d, 0x1c, 0x20, 0x6a, 0x00, 0x78, - 0x2b, 0xad, 0x01, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x78, 0x24, - 0x60, 0x36, 0xd0, 0x94, 0x00, 0x40, 0x2e, 0xc8, 0x78, 0x28, 0xa0, 0x85, - 0x00, 0x01, 0x20, 0x09, 0xa9, 0xab, 0x20, 0x0a, 0x20, 0x01, 0xff, 0xff, - 0x10, 0x78, 0x5a, 0xe6, 0x78, 0x2c, 0x60, 0x3a, 0x12, 0x7f, 0x01, 0x7f, - 0x00, 0x78, 0x2b, 0xad, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, - 0x78, 0x28, 0xa0, 0x0d, 0x00, 0x40, 0x2b, 0xdb, 0x78, 0x2c, 0xa0, 0x05, - 0x00, 0x40, 0x2b, 0xdb, 0x62, 0x44, 0x61, 0x46, 0x63, 0x38, 0x60, 0x3a, - 0x00, 0x78, 0x2b, 0xad, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, - 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x96, 0x00, 0xff, - 0x00, 0xc0, 0x2e, 0xf7, 0x60, 0x30, 0xa0, 0x85, 0xff, 0x00, 0x00, 0x78, - 0x2f, 0x06, 0xa1, 0x82, 0x00, 0x7f, 0x00, 0xc8, 0x2f, 0x30, 0xa1, 0x88, - 0x29, 0xc0, 0x21, 0x0c, 0xa1, 0x8c, 0x00, 0xff, 0x60, 0x30, 0xa1, 0x16, - 0x00, 0x40, 0x2f, 0x30, 0x81, 0x0f, 0xa1, 0x05, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x7f, 0x00, 0x40, - 0x2f, 0x2c, 0x60, 0x1a, 0x60, 0x0b, 0xbc, 0x09, 0x60, 0x1f, 0x00, 0x01, - 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x2f, 0x33, 0x68, 0x37, 0x00, 0x00, - 0x70, 0x07, 0x00, 0x03, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, - 0x68, 0x3a, 0x70, 0x1b, 0x2f, 0x8e, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, - 0x00, 0x32, 0x10, 0x78, 0x77, 0x5c, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, - 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x78, 0x2b, 0xd7, 0x0c, 0x7f, 0x00, 0x78, - 0x2b, 0xdb, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x2f, 0x2c, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, - 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x96, 0x00, 0xff, 0x00, 0xc0, 0x2f, 0x4e, 0x60, 0x30, - 0xa0, 0x85, 0xff, 0x00, 0x00, 0x78, 0x2f, 0x5d, 0xa1, 0x82, 0x00, 0x7f, - 0x00, 0xc8, 0x2f, 0x87, 0xa1, 0x88, 0x29, 0xc0, 0x21, 0x0c, 0xa1, 0x8c, - 0x00, 0xff, 0x60, 0x30, 0xa1, 0x16, 0x00, 0x40, 0x2f, 0x87, 0x81, 0x0f, - 0xa1, 0x05, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x00, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x00, 0x7f, 0x00, 0x40, 0x2f, 0x83, 0x60, 0x1a, 0x60, 0x0b, - 0xbc, 0x05, 0x60, 0x1f, 0x00, 0x01, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, - 0x2f, 0x8a, 0x68, 0x37, 0x00, 0x00, 0x70, 0x07, 0x00, 0x03, 0x68, 0x33, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x70, 0x1b, 0x2f, 0x8e, - 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x32, 0x10, 0x78, 0x77, 0x5c, - 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x78, - 0x2b, 0xd7, 0x0c, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x10, 0x78, 0x77, 0x2d, - 0x00, 0x78, 0x2f, 0x83, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x00, 0x40, - 0x2b, 0xd7, 0x00, 0x78, 0x2b, 0xad, 0x20, 0x61, 0xaa, 0x33, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0xd0, 0x84, 0x00, 0x40, 0x2f, 0xa6, - 0x61, 0x04, 0x62, 0x08, 0x20, 0x19, 0xa7, 0x12, 0x23, 0x1c, 0x12, 0x7f, - 0x00, 0x78, 0x2b, 0xad, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x81, 0xff, - 0x00, 0xc0, 0x2b, 0xd7, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x62, 0x48, - 0x60, 0x64, 0xa2, 0x02, 0x00, 0x48, 0x2f, 0xbd, 0xa0, 0x85, 0x00, 0x01, - 0x10, 0x78, 0x25, 0x6a, 0x10, 0x78, 0x3c, 0x9e, 0x12, 0x7f, 0x00, 0x78, - 0x2b, 0xad, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x20, 0xa9, 0x00, 0x12, 0x20, 0x01, 0xa7, 0x40, 0x20, 0xa0, - 0xa0, 0x06, 0x40, 0xa4, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, 0x7d, 0x38, - 0x7c, 0x3c, 0x00, 0x78, 0x2c, 0x5f, 0x78, 0x24, 0xa0, 0x9c, 0x00, 0xff, - 0xa3, 0x9a, 0x00, 0x03, 0x00, 0xc8, 0x2b, 0xd7, 0x62, 0x50, 0xa0, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa2, 0x06, 0x00, 0xc0, 0x2f, 0xe9, 0x20, 0x01, - 0xa7, 0x40, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x00, 0x78, 0x36, 0x08, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, - 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x2b, 0xd7, 0x0c, 0x7e, - 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x00, 0x40, 0x2b, 0xd7, 0x68, 0x37, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x10, 0x78, 0x8e, 0x5a, - 0x00, 0x40, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x30, 0x0b, - 0x00, 0x7c, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x00, 0x40, 0x2b, 0xd7, - 0xad, 0x80, 0x00, 0x0e, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x00, 0x78, 0x36, 0x08, 0x10, 0x78, 0x35, 0xba, - 0x00, 0x40, 0x2b, 0xd7, 0x10, 0x78, 0x42, 0xdd, 0x20, 0x09, 0x00, 0x1c, - 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x10, 0x78, 0x36, 0x04, - 0x70, 0x1b, 0x30, 0x2b, 0x00, 0x7c, 0xad, 0xe8, 0x00, 0x0d, 0x68, 0x00, - 0xa0, 0x05, 0x00, 0x40, 0x2b, 0xdb, 0x68, 0x04, 0xd0, 0xac, 0x00, 0x40, - 0x30, 0x38, 0xd0, 0xa4, 0x00, 0x40, 0x2b, 0xdb, 0xd0, 0x94, 0x00, 0x40, - 0x30, 0x43, 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0xa1, 0x8c, - 0xff, 0xdf, 0x61, 0x06, 0x0c, 0x7f, 0xd0, 0x8c, 0x00, 0x40, 0x30, 0x4e, - 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0xa1, 0x8d, 0x00, 0x10, - 0x61, 0x06, 0x0c, 0x7f, 0x20, 0x09, 0x01, 0x00, 0x21, 0x0c, 0xa1, 0x8a, - 0x00, 0x02, 0x00, 0x48, 0x30, 0x63, 0xd0, 0x84, 0x00, 0x40, 0x30, 0x63, - 0x6a, 0x28, 0xa2, 0x8a, 0x00, 0x7f, 0x00, 0xc8, 0x2b, 0xdb, 0xa2, 0x88, - 0x29, 0xc0, 0x21, 0x0c, 0xa1, 0x8c, 0x00, 0xff, 0x61, 0x56, 0xd0, 0xdc, - 0x00, 0x40, 0x30, 0x6c, 0x68, 0x28, 0xa0, 0x8a, 0x00, 0x7f, 0x00, 0xc8, - 0x2b, 0xdb, 0x60, 0x52, 0x68, 0x08, 0xa0, 0x8a, 0x01, 0x00, 0x00, 0x48, - 0x2b, 0xdb, 0xa0, 0x8a, 0x08, 0x41, 0x00, 0xc8, 0x2b, 0xdb, 0xa0, 0x84, - 0x00, 0x07, 0x00, 0xc0, 0x2b, 0xdb, 0x68, 0x0c, 0xa0, 0x05, 0x00, 0x40, - 0x2b, 0xdb, 0x68, 0x10, 0xa0, 0x05, 0x00, 0x40, 0x2b, 0xdb, 0x68, 0x48, - 0x69, 0x40, 0xa1, 0x0a, 0x00, 0xc8, 0x2b, 0xdb, 0x80, 0x01, 0x00, 0x40, - 0x2b, 0xdb, 0x68, 0x4c, 0x69, 0x44, 0xa1, 0x0a, 0x00, 0xc8, 0x2b, 0xdb, - 0x80, 0x01, 0x00, 0x40, 0x2b, 0xdb, 0x68, 0x04, 0xd0, 0xfc, 0x00, 0x40, - 0x30, 0xc2, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x2b, 0xd7, 0x20, 0x09, - 0x00, 0x14, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0xa2, 0x90, - 0x00, 0x38, 0xa3, 0x99, 0x00, 0x00, 0x10, 0x78, 0x36, 0x04, 0x70, 0x1b, - 0x30, 0xa8, 0x00, 0x7c, 0xad, 0xe8, 0x00, 0x0d, 0x20, 0xa9, 0x00, 0x14, - 0x2d, 0x98, 0x20, 0x69, 0xa7, 0x6e, 0x2d, 0xa0, 0x53, 0xa3, 0x70, 0x10, - 0xa0, 0xe8, 0x00, 0x0d, 0x20, 0x01, 0xa7, 0x72, 0x20, 0x0c, 0xd1, 0xe4, - 0x00, 0x40, 0x30, 0xc2, 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, - 0xa0, 0x85, 0x0b, 0x00, 0x60, 0x06, 0x0c, 0x7f, 0x20, 0xa9, 0x00, 0x1c, - 0x2d, 0x98, 0x20, 0x69, 0xa7, 0x52, 0x2d, 0xa0, 0x53, 0xa3, 0x68, 0x14, - 0xa0, 0x8c, 0x00, 0xff, 0x61, 0x42, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, - 0x60, 0x46, 0x10, 0x78, 0x4e, 0xae, 0x10, 0x78, 0x49, 0xce, 0x10, 0x78, - 0x4a, 0x3e, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0xc0, 0x31, 0x4d, - 0x68, 0x08, 0x60, 0x2a, 0x10, 0x78, 0x21, 0xf7, 0x68, 0x18, 0x69, 0x1c, - 0x6a, 0x20, 0x6b, 0x24, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, - 0x60, 0x16, 0x61, 0x1a, 0x62, 0x1e, 0x63, 0x22, 0x6c, 0x04, 0xd4, 0xf4, - 0x00, 0x40, 0x30, 0xfa, 0x68, 0x30, 0x69, 0x34, 0x6a, 0x38, 0x6b, 0x3c, - 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, 0x00, 0x78, 0x30, 0xfc, - 0xa0, 0x84, 0xf0, 0xff, 0x60, 0x06, 0x61, 0x0a, 0x62, 0x0e, 0x63, 0x12, - 0x10, 0x78, 0x5b, 0x19, 0x69, 0x04, 0xd1, 0xfc, 0x00, 0x40, 0x31, 0x2f, - 0x0c, 0x7e, 0x20, 0x09, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x01, 0x6b, 0x70, - 0xd3, 0x84, 0x00, 0x40, 0x31, 0x2c, 0x00, 0x78, 0x31, 0x16, 0x83, 0x9d, - 0x00, 0xc8, 0x31, 0x2c, 0x35, 0x08, 0x81, 0x09, 0x10, 0x78, 0x54, 0x80, - 0x68, 0x78, 0x60, 0x16, 0x68, 0x74, 0x20, 0x08, 0xa0, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x60, 0x0a, 0xa1, 0x84, 0x00, 0xff, 0x60, 0x06, 0x81, 0x08, - 0x00, 0xc0, 0x31, 0x2a, 0x60, 0x03, 0x00, 0x03, 0x00, 0x78, 0x31, 0x2c, - 0x60, 0x03, 0x00, 0x01, 0x00, 0xf0, 0x31, 0x11, 0x0c, 0x7f, 0x0c, 0x7e, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, - 0x0c, 0x7f, 0x10, 0x78, 0x38, 0x19, 0x00, 0x40, 0x31, 0x3d, 0x10, 0x78, - 0x25, 0x6a, 0x60, 0xc0, 0xa0, 0x05, 0x00, 0x40, 0x31, 0x49, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x91, 0x30, 0x1d, 0x10, 0x78, 0x42, 0x24, 0x00, 0x78, - 0x31, 0x4d, 0x60, 0x03, 0x00, 0x04, 0x20, 0x91, 0x30, 0x1d, 0x00, 0x78, - 0x2b, 0xad, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, 0x2b, 0xd7, - 0x20, 0x69, 0xa7, 0x52, 0x78, 0x30, 0x68, 0x42, 0x78, 0x34, 0x68, 0x46, - 0x68, 0x04, 0xd0, 0xfc, 0x00, 0x40, 0x31, 0x62, 0x20, 0x09, 0x00, 0x30, - 0x00, 0x78, 0x31, 0x64, 0x20, 0x09, 0x00, 0x1c, 0x2d, 0x00, 0x7a, 0x2c, - 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x00, 0x78, 0x36, 0x08, 0xa0, 0x06, - 0x10, 0x78, 0x25, 0x6a, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, - 0x42, 0xdd, 0x10, 0x78, 0x42, 0x24, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, - 0x00, 0xc0, 0x2b, 0xd7, 0x61, 0x84, 0x81, 0xff, 0x00, 0x40, 0x31, 0x91, - 0x70, 0x3f, 0x00, 0x00, 0x20, 0x01, 0xad, 0xc0, 0x20, 0x09, 0x00, 0x40, - 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x36, 0x08, 0x70, 0x1b, 0x2b, 0xaa, 0x12, 0x7f, - 0x00, 0x7c, 0x70, 0x3f, 0x00, 0x01, 0x0d, 0x7e, 0x20, 0x69, 0xad, 0xc0, - 0x20, 0xa9, 0x00, 0x40, 0x20, 0xa1, 0xad, 0xc0, 0x20, 0x19, 0xff, 0xff, - 0x43, 0xa4, 0x65, 0x50, 0xa5, 0x88, 0x29, 0xc0, 0x21, 0x0c, 0xa1, 0x8c, - 0x00, 0xff, 0x21, 0x6a, 0xa0, 0x0e, 0x20, 0x11, 0x00, 0x02, 0x21, 0x00, - 0xa5, 0x06, 0x00, 0x40, 0x31, 0xc3, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, - 0x31, 0xc3, 0x60, 0x14, 0x82, 0x1c, 0x00, 0x48, 0x31, 0xbb, 0xa3, 0x98, - 0xad, 0xc0, 0xa0, 0x85, 0xff, 0x00, 0x80, 0x07, 0x20, 0x1a, 0x00, 0x78, - 0x31, 0xc2, 0xa3, 0x98, 0xad, 0xc0, 0x23, 0x24, 0xa4, 0xa4, 0xff, 0x00, - 0xa4, 0x05, 0x20, 0x1a, 0x82, 0x10, 0x81, 0x08, 0xa1, 0x82, 0x00, 0x80, - 0x00, 0xc8, 0x31, 0xca, 0x00, 0x78, 0x31, 0xa7, 0x82, 0x01, 0x80, 0x07, - 0x2d, 0x0c, 0xa1, 0x05, 0x20, 0x6a, 0x0d, 0x7f, 0x20, 0xa9, 0x00, 0x40, - 0x20, 0xa1, 0xad, 0xc0, 0x20, 0x99, 0xad, 0xc0, 0x10, 0x78, 0x42, 0x81, - 0x00, 0x78, 0x31, 0x80, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, - 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x00, 0xc0, 0x31, 0xe8, - 0x20, 0x09, 0x00, 0x02, 0x00, 0x78, 0x2b, 0xd7, 0x20, 0x01, 0xa7, 0x53, - 0x20, 0x04, 0xd0, 0xb4, 0x00, 0x40, 0x32, 0x0f, 0x60, 0x00, 0xd0, 0x8c, - 0x00, 0xc0, 0x32, 0x0f, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0xc0, 0x32, 0x0f, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x10, 0x78, 0x8e, 0xae, 0x00, 0xc0, 0x32, 0x06, - 0x20, 0x09, 0x00, 0x03, 0x00, 0x78, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x32, 0x0b, 0x00, 0x7c, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, - 0x2b, 0xdb, 0x20, 0xa9, 0x00, 0x2b, 0x2c, 0x98, 0xad, 0xe8, 0x00, 0x02, - 0x2d, 0xa0, 0x53, 0xa3, 0x20, 0xa9, 0x00, 0x04, 0xac, 0x80, 0x00, 0x06, - 0x20, 0x98, 0xad, 0x80, 0x00, 0x06, 0x20, 0xa0, 0x10, 0x78, 0x42, 0x81, - 0x20, 0xa9, 0x00, 0x04, 0xac, 0x80, 0x00, 0x0a, 0x20, 0x98, 0xad, 0x80, - 0x00, 0x0a, 0x20, 0xa0, 0x10, 0x78, 0x42, 0x81, 0x2d, 0x00, 0x20, 0x09, - 0x00, 0x2b, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x00, 0x78, - 0x36, 0x08, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xd2, - 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, 0x47, 0xbd, 0x00, 0x78, 0x2b, 0xad, - 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x78, 0x28, 0xa0, 0x8a, 0x10, 0x00, - 0x00, 0xc8, 0x2b, 0xdb, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, - 0x10, 0x78, 0x48, 0x2f, 0x00, 0x40, 0x2b, 0xd7, 0x20, 0x19, 0x00, 0x04, - 0x10, 0x78, 0x47, 0xd3, 0x79, 0x24, 0x81, 0x0f, 0x7a, 0x28, 0x10, 0x78, - 0x32, 0x59, 0x00, 0x78, 0x2b, 0xad, 0xa1, 0x86, 0x00, 0xff, 0x00, 0x40, - 0x32, 0x61, 0x10, 0x78, 0x32, 0x71, 0x00, 0x78, 0x32, 0x70, 0x20, 0x29, - 0x00, 0x7e, 0x20, 0x61, 0xa7, 0x00, 0x64, 0x50, 0x24, 0x00, 0xa5, 0x06, - 0x00, 0x40, 0x32, 0x6d, 0x25, 0x08, 0x10, 0x78, 0x32, 0x71, 0x85, 0x29, - 0x00, 0xc8, 0x32, 0x66, 0x00, 0x7c, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, - 0x32, 0x7c, 0x22, 0x00, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, - 0x10, 0x78, 0x5a, 0x52, 0x00, 0x7c, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, - 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, 0x2b, 0xdb, 0x10, 0x78, 0x46, 0x73, - 0x00, 0x40, 0x2b, 0xd7, 0x10, 0x78, 0x47, 0xc8, 0x00, 0x78, 0x2b, 0xad, - 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, - 0x2b, 0xdb, 0x10, 0x78, 0x46, 0x73, 0x00, 0x40, 0x2b, 0xd7, 0x10, 0x78, - 0x47, 0xb2, 0x00, 0x78, 0x2b, 0xad, 0x61, 0x00, 0x00, 0x78, 0x2b, 0xad, - 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x20, 0x01, 0xa7, 0x00, - 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, 0x0d, 0x7e, - 0xac, 0xe8, 0x00, 0x0a, 0x79, 0x24, 0xd1, 0x84, 0x00, 0x40, 0x32, 0xb2, - 0xac, 0xe8, 0x00, 0x06, 0x68, 0x0c, 0x80, 0x07, 0x78, 0x3e, 0x68, 0x08, - 0x80, 0x07, 0x78, 0x3a, 0x6b, 0x04, 0x83, 0x1f, 0x6a, 0x00, 0x82, 0x17, - 0x0d, 0x7f, 0x61, 0x00, 0xa1, 0x8c, 0x02, 0x00, 0x00, 0x78, 0x2b, 0xad, - 0xa0, 0x06, 0x10, 0x78, 0x25, 0x6a, 0x78, 0x24, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0xff, 0x00, 0x40, 0x32, 0xcf, 0x81, 0xff, 0x00, 0xc0, - 0x2b, 0xd7, 0x10, 0x78, 0x42, 0xdd, 0x78, 0x28, 0xa0, 0x8a, 0x10, 0x00, - 0x00, 0xc8, 0x2b, 0xdb, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0xa1, 0x86, 0x00, 0xff, 0x00, 0x40, 0x32, 0xe5, 0xa1, 0x82, 0x00, 0x7f, - 0x00, 0xc8, 0x2b, 0xdb, 0x21, 0x00, 0x10, 0x78, 0x25, 0x64, 0x02, 0x7e, - 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, 0xa9, 0xc4, - 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x20, 0x11, 0x00, 0x03, - 0x10, 0x78, 0x70, 0xe0, 0x20, 0x11, 0x00, 0x02, 0x10, 0x78, 0x70, 0xea, - 0x10, 0x78, 0x6f, 0xc4, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x00, 0x10, 0x78, - 0x70, 0x58, 0x03, 0x7f, 0x20, 0x61, 0x01, 0x00, 0x60, 0x30, 0xa0, 0x84, - 0x00, 0xff, 0x81, 0x0f, 0xa1, 0x05, 0x60, 0x4a, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, 0x42, 0x59, - 0x10, 0x78, 0x5a, 0xdd, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x7a, 0x28, 0x10, 0x78, 0x32, 0x59, 0x12, 0x7f, 0x0c, 0x7f, 0x02, 0x7f, - 0x00, 0x78, 0x2b, 0xad, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x0c, 0x7e, 0x10, 0x78, 0x45, 0x5c, 0x2c, 0x08, 0x0c, 0x7f, 0x00, 0xc0, - 0x2b, 0xdb, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, 0x00, 0x40, 0x33, 0x32, - 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, 0x2b, 0xd7, 0x60, 0xcc, 0xd0, 0x9c, - 0x00, 0xc0, 0x33, 0x3a, 0x20, 0x09, 0x00, 0x05, 0x00, 0x78, 0x2b, 0xd7, - 0x10, 0x78, 0x35, 0xba, 0x00, 0xc0, 0x33, 0x42, 0x20, 0x09, 0x00, 0x02, - 0x00, 0x78, 0x2b, 0xd7, 0x79, 0x24, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x10, 0x78, 0x36, 0x04, 0x70, 0x1b, 0x33, 0x4c, 0x00, 0x7c, - 0x20, 0x09, 0x00, 0x80, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x33, 0x59, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x33, 0x5d, 0x20, 0x21, 0x40, 0x0a, 0x00, 0x78, 0x2b, 0xaf, 0x0d, 0x7e, - 0xad, 0xe8, 0x00, 0x0d, 0x69, 0x00, 0x6a, 0x08, 0x6b, 0x0c, 0x6c, 0x10, - 0x6d, 0x14, 0x6e, 0x18, 0x68, 0x20, 0xa0, 0xbe, 0x01, 0x00, 0x00, 0x40, - 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0x12, 0x00, 0x40, 0x33, 0xd0, 0xa0, 0xbe, - 0x01, 0x13, 0x00, 0x40, 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0x14, 0x00, 0x40, - 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0x17, 0x00, 0x40, 0x33, 0xd0, 0xa0, 0xbe, - 0x01, 0x1a, 0x00, 0x40, 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0x21, 0x00, 0x40, - 0x33, 0xc6, 0xa0, 0xbe, 0x01, 0x31, 0x00, 0x40, 0x33, 0xc6, 0xa0, 0xbe, - 0x01, 0x71, 0x00, 0x40, 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0x73, 0x00, 0x40, - 0x33, 0xd0, 0xa0, 0xbe, 0x01, 0xa1, 0x00, 0xc0, 0x33, 0x98, 0x68, 0x30, - 0x80, 0x07, 0x68, 0x32, 0x00, 0x78, 0x33, 0xd6, 0xa0, 0xbe, 0x02, 0x12, - 0x00, 0x40, 0x33, 0xcc, 0xa0, 0xbe, 0x02, 0x13, 0x00, 0x40, 0x33, 0xcc, - 0xa0, 0xbe, 0x02, 0x14, 0x00, 0x40, 0x33, 0xbe, 0xa0, 0xbe, 0x02, 0x17, - 0x00, 0x40, 0x33, 0xb8, 0xa0, 0xbe, 0x02, 0x1a, 0x00, 0xc0, 0x33, 0xb1, - 0x68, 0x38, 0x80, 0x07, 0x68, 0x3a, 0x00, 0x78, 0x33, 0xd0, 0xa0, 0xbe, - 0x03, 0x00, 0x00, 0x40, 0x33, 0xd0, 0x0d, 0x7f, 0x00, 0x78, 0x2b, 0xdb, - 0xad, 0x80, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x07, 0x10, 0x78, 0x34, 0x18, - 0xad, 0x80, 0x00, 0x0e, 0x20, 0xa9, 0x00, 0x01, 0x10, 0x78, 0x34, 0x18, - 0x00, 0x78, 0x33, 0xd0, 0xad, 0x80, 0x00, 0x0c, 0x10, 0x78, 0x34, 0x26, - 0x00, 0x78, 0x33, 0xd6, 0xad, 0x80, 0x00, 0x0e, 0x10, 0x78, 0x34, 0x26, - 0xad, 0x80, 0x00, 0x0c, 0x20, 0xa9, 0x00, 0x01, 0x10, 0x78, 0x34, 0x18, - 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x34, 0x09, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x68, 0x37, 0x01, 0x19, 0x68, 0x53, 0x00, 0x00, - 0x68, 0x4f, 0x00, 0x20, 0x68, 0x5b, 0x00, 0x01, 0x81, 0x0b, 0x69, 0x7e, - 0x68, 0x83, 0x00, 0x00, 0x6a, 0x86, 0x6b, 0x8a, 0x6c, 0x8e, 0x6d, 0x92, - 0x69, 0x96, 0x68, 0x9b, 0x00, 0x00, 0x0c, 0x7f, 0x0d, 0x7f, 0x68, 0x37, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x68, 0x23, 0x00, 0x00, - 0x68, 0x04, 0x20, 0x68, 0x10, 0x78, 0x8e, 0x76, 0x00, 0xc0, 0x34, 0x04, - 0x20, 0x09, 0x00, 0x03, 0x00, 0x78, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x34, 0x0f, 0x00, 0x7c, 0x0c, 0x7f, 0x0d, 0x7f, 0x20, 0x09, - 0x00, 0x02, 0x00, 0x78, 0x2b, 0xd7, 0x68, 0x20, 0xa0, 0x86, 0x80, 0x01, - 0x00, 0xc0, 0x2b, 0xad, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, 0x2b, 0xd7, - 0x01, 0x7e, 0x20, 0x08, 0x20, 0x44, 0x80, 0x00, 0x20, 0x4c, 0x80, 0x00, - 0x29, 0x0a, 0x81, 0x08, 0x28, 0x0a, 0x81, 0x08, 0x00, 0xf0, 0x34, 0x1a, - 0x01, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x0a, 0x7e, 0x0b, 0x7e, 0x20, 0x08, - 0x20, 0x44, 0x80, 0x00, 0x20, 0x4c, 0x80, 0x00, 0x20, 0x54, 0x80, 0x00, - 0x20, 0x5c, 0x2b, 0x0a, 0x81, 0x08, 0x2a, 0x0a, 0x81, 0x08, 0x29, 0x0a, - 0x81, 0x08, 0x28, 0x0a, 0x0b, 0x7f, 0x0a, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x81, 0xff, 0x00, 0x40, 0x34, 0x43, 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, - 0x2b, 0xd7, 0x60, 0xcc, 0xd0, 0x9c, 0x00, 0xc0, 0x34, 0x4b, 0x20, 0x09, - 0x00, 0x05, 0x00, 0x78, 0x2b, 0xd7, 0x79, 0x24, 0x21, 0x40, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x82, 0x00, 0x80, 0x00, 0x48, 0x2b, 0xdb, - 0xa1, 0x82, 0x00, 0xff, 0x00, 0xc8, 0x2b, 0xdb, 0x7a, 0x2c, 0x7b, 0x28, - 0x60, 0x6c, 0xa3, 0x06, 0x00, 0xc0, 0x34, 0x66, 0x60, 0x70, 0xa2, 0x4e, - 0x00, 0x40, 0x2b, 0xdb, 0xa9, 0xcc, 0xff, 0x00, 0x00, 0x40, 0x2b, 0xdb, - 0x0c, 0x7e, 0x10, 0x78, 0x35, 0x0f, 0x2c, 0x68, 0x0c, 0x7f, 0x00, 0x40, - 0x34, 0x9e, 0xa0, 0xc6, 0x40, 0x00, 0x00, 0xc0, 0x34, 0x84, 0x0c, 0x7e, - 0x00, 0x7e, 0x2d, 0x60, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x48, 0x9b, - 0x00, 0xc0, 0x34, 0x7b, 0xc1, 0x85, 0x60, 0x00, 0xd0, 0xbc, 0x00, 0x40, - 0x34, 0x80, 0xc1, 0x8d, 0x00, 0x7f, 0x0c, 0x7f, 0x00, 0x78, 0x34, 0x9b, - 0xa0, 0xc6, 0x40, 0x07, 0x00, 0xc0, 0x34, 0x8b, 0x24, 0x08, 0x00, 0x78, - 0x34, 0x9b, 0xa0, 0xc6, 0x40, 0x08, 0x00, 0xc0, 0x34, 0x93, 0x27, 0x08, - 0x26, 0x10, 0x00, 0x78, 0x34, 0x9b, 0xa0, 0xc6, 0x40, 0x09, 0x00, 0xc0, - 0x34, 0x99, 0x00, 0x78, 0x34, 0x9b, 0x20, 0x01, 0x40, 0x06, 0x20, 0x20, - 0x00, 0x78, 0x2b, 0xaf, 0x2d, 0x00, 0x70, 0x22, 0x01, 0x7e, 0x0b, 0x7e, - 0x0c, 0x7e, 0x0e, 0x7e, 0x2c, 0x70, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, - 0x34, 0xe4, 0x2d, 0x00, 0x60, 0x1a, 0x20, 0x01, 0xa7, 0x57, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x68, 0x42, 0x2e, 0x58, 0x0e, 0x7f, 0x0e, 0x7e, - 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x2b, 0x70, 0x00, 0xc0, - 0x34, 0xc5, 0x10, 0x78, 0x77, 0x2d, 0x0e, 0x7f, 0x0c, 0x7f, 0x0b, 0x7f, - 0x01, 0x7f, 0x20, 0x09, 0x00, 0x02, 0x00, 0x78, 0x2b, 0xd7, 0x68, 0x37, - 0x00, 0x00, 0x2d, 0x00, 0x60, 0x12, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x28, 0x80, 0x12, 0x7f, 0x60, 0x1f, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, - 0x10, 0x78, 0x44, 0xee, 0x20, 0x01, 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, - 0x20, 0x09, 0x00, 0x02, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x0e, 0x7f, 0x0c, 0x7f, 0x0b, 0x7f, 0x01, 0x7f, 0x00, 0xc0, 0x34, 0xee, - 0x20, 0x09, 0x00, 0x03, 0x00, 0x78, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x34, 0xf3, 0x00, 0x7c, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, - 0x70, 0x20, 0x20, 0x60, 0x00, 0xc0, 0x35, 0x01, 0x20, 0x09, 0x00, 0x04, - 0x62, 0x04, 0xa2, 0x94, 0x00, 0xff, 0x00, 0x78, 0x2b, 0xd7, 0x20, 0x09, - 0x00, 0x00, 0x10, 0x78, 0x48, 0x9b, 0x00, 0xc0, 0x35, 0x08, 0xc1, 0x85, - 0x60, 0x00, 0xd0, 0xbc, 0x00, 0x40, 0x35, 0x0d, 0xc1, 0x8d, 0x00, 0x78, - 0x2b, 0xad, 0x0e, 0x7e, 0x0d, 0x7e, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, - 0x00, 0x80, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x71, 0xa8, 0xb5, 0x2e, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x35, 0x24, 0x21, 0x00, 0xa4, 0x06, 0x00, 0xc0, - 0x35, 0x55, 0x24, 0x28, 0x00, 0x78, 0x35, 0x55, 0x20, 0x68, 0x6f, 0x10, - 0x27, 0x00, 0xa3, 0x06, 0x00, 0xc0, 0x35, 0x46, 0x6e, 0x14, 0x26, 0x00, - 0xa2, 0x06, 0x00, 0xc0, 0x35, 0x46, 0x24, 0x00, 0xa1, 0x06, 0x00, 0xc0, - 0x35, 0x42, 0x2d, 0x60, 0xd8, 0x84, 0x00, 0x40, 0x35, 0x6a, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x35, 0x6a, - 0x20, 0x01, 0x40, 0x00, 0x00, 0x78, 0x35, 0x6b, 0x20, 0x01, 0x40, 0x07, - 0x00, 0x78, 0x35, 0x6b, 0x24, 0x00, 0xa1, 0x06, 0x00, 0xc0, 0x35, 0x55, - 0x6e, 0x14, 0x87, 0xff, 0x00, 0xc0, 0x35, 0x51, 0x86, 0xff, 0x00, 0x40, - 0x35, 0x21, 0x20, 0x01, 0x40, 0x08, 0x00, 0x78, 0x35, 0x6b, 0x84, 0x20, - 0x8e, 0x70, 0x00, 0xf0, 0x35, 0x19, 0x85, 0xff, 0x00, 0xc0, 0x35, 0x64, - 0x20, 0x01, 0x40, 0x09, 0x00, 0x78, 0x35, 0x6b, 0x20, 0x01, 0x00, 0x01, - 0x00, 0x78, 0x35, 0x6b, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x35, 0x60, - 0x63, 0x12, 0x62, 0x16, 0xa0, 0x06, 0xa0, 0x05, 0x0d, 0x7f, 0x0e, 0x7f, - 0x00, 0x7c, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xba, - 0x00, 0x40, 0x2b, 0xd7, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, - 0x68, 0x3a, 0x78, 0x24, 0xa0, 0x05, 0x00, 0x40, 0x2b, 0xdb, 0xa0, 0x96, - 0x00, 0xff, 0x00, 0x40, 0x35, 0x87, 0xa0, 0x92, 0x00, 0x04, 0x00, 0xc8, - 0x2b, 0xdb, 0x20, 0x10, 0x2d, 0x18, 0x10, 0x78, 0x28, 0x2f, 0x00, 0x40, - 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x35, 0x92, 0x00, 0x7c, - 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x00, 0x40, 0x2b, 0xd7, 0x00, 0x78, - 0x2b, 0xad, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x82, - 0x00, 0x80, 0x00, 0x48, 0x2b, 0xdb, 0xa1, 0x82, 0x00, 0xff, 0x00, 0xc8, - 0x2b, 0xdb, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x8d, 0x5b, - 0x00, 0xc0, 0x35, 0xb7, 0xa1, 0x90, 0xa8, 0x35, 0x22, 0x04, 0xa0, 0x65, - 0x00, 0x40, 0x35, 0xb7, 0x10, 0x78, 0x42, 0xf8, 0x12, 0x7f, 0x00, 0x78, - 0x2b, 0xad, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xd7, 0x10, 0x78, 0x13, 0x8b, - 0x00, 0x40, 0x35, 0xd1, 0xa0, 0x06, 0x68, 0x02, 0x70, 0x10, 0xa0, 0x05, - 0x00, 0xc0, 0x35, 0xc9, 0x2d, 0x00, 0x70, 0x12, 0x70, 0x16, 0x00, 0x78, - 0x35, 0xcf, 0x70, 0x14, 0x68, 0x02, 0x20, 0x60, 0x2d, 0x00, 0x60, 0x06, - 0x70, 0x16, 0xad, 0x80, 0x00, 0x0d, 0x00, 0x7c, 0x79, 0x24, 0x81, 0x0f, - 0xa1, 0x8c, 0x00, 0xff, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x35, 0xe1, - 0x7e, 0x28, 0xa6, 0x84, 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, 0x00, 0x48, - 0x35, 0xe2, 0xa0, 0x66, 0x8c, 0xff, 0x00, 0x7c, 0x7e, 0x24, 0x86, 0x0f, - 0xa1, 0x8c, 0x00, 0xff, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x35, 0xf2, - 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x82, 0x40, 0x00, 0x00, 0x48, 0x35, 0xf3, - 0xa0, 0x66, 0x8c, 0xff, 0x00, 0x7c, 0x01, 0x7e, 0x71, 0x10, 0x81, 0xff, - 0x00, 0x40, 0x36, 0x00, 0x21, 0x68, 0x69, 0x04, 0x10, 0x78, 0x13, 0xa4, - 0x00, 0x78, 0x35, 0xf7, 0x71, 0x12, 0x71, 0x16, 0x01, 0x7f, 0x00, 0x7c, - 0x20, 0x31, 0x00, 0x01, 0x00, 0x78, 0x36, 0x0a, 0x20, 0x31, 0x00, 0x00, - 0x20, 0x61, 0xa7, 0xd2, 0x66, 0x06, 0x61, 0x12, 0x60, 0x0e, 0x62, 0x26, - 0x63, 0x2a, 0x64, 0x2e, 0x65, 0x32, 0x2c, 0x10, 0x10, 0x78, 0x13, 0xdb, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1b, 0x2b, 0xad, 0x00, 0x7c, 0x0f, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x00, 0x00, 0x20, 0x01, - 0xa7, 0x90, 0x20, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x36, 0x36, 0x00, 0x68, - 0x36, 0x36, 0x78, 0x18, 0xd0, 0x84, 0x00, 0xc0, 0x36, 0x36, 0x7a, 0x22, - 0x7b, 0x26, 0x7c, 0x2a, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, - 0x00, 0x78, 0x36, 0x5b, 0x01, 0x7e, 0x0c, 0x7e, 0x0e, 0x7e, 0x20, 0x71, - 0xa7, 0x82, 0x71, 0x38, 0xa1, 0x82, 0x00, 0x08, 0x00, 0x48, 0x36, 0x44, - 0x70, 0x30, 0x20, 0x60, 0x00, 0x78, 0x36, 0x55, 0x70, 0x30, 0xa0, 0xe0, - 0x00, 0x08, 0xac, 0x82, 0xa7, 0xd2, 0x00, 0x48, 0x36, 0x4d, 0x20, 0x61, - 0xa7, 0x92, 0x2c, 0x00, 0x70, 0x32, 0x81, 0xff, 0x00, 0xc0, 0x36, 0x53, - 0x70, 0x36, 0x81, 0x08, 0x71, 0x3a, 0x22, 0x62, 0x63, 0x06, 0x64, 0x0a, - 0x0e, 0x7f, 0x0c, 0x7f, 0x01, 0x7f, 0x12, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x82, 0x70, 0x38, 0xa0, 0x05, 0x00, 0x40, - 0x36, 0x97, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x36, 0x96, - 0x0f, 0x7e, 0x20, 0x79, 0x00, 0x00, 0x78, 0x18, 0xd0, 0x84, 0x00, 0xc0, - 0x36, 0x95, 0x0c, 0x7e, 0x70, 0x34, 0x20, 0x60, 0x2c, 0x04, 0x78, 0x22, - 0x60, 0x04, 0x78, 0x26, 0x60, 0x08, 0x78, 0x2a, 0x78, 0x1b, 0x00, 0x01, - 0x20, 0x91, 0x40, 0x80, 0x70, 0x38, 0x80, 0x01, 0x70, 0x3a, 0xa0, 0x05, - 0x00, 0xc0, 0x36, 0x8b, 0x70, 0x33, 0xa7, 0x92, 0x70, 0x37, 0xa7, 0x92, - 0x0c, 0x7f, 0x00, 0x78, 0x36, 0x95, 0xac, 0x80, 0x00, 0x08, 0xa0, 0xfa, - 0xa7, 0xd2, 0x00, 0x48, 0x36, 0x93, 0x20, 0x01, 0xa7, 0x92, 0x70, 0x36, - 0x0c, 0x7f, 0x0f, 0x7f, 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x02, 0x7e, - 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x00, 0x40, 0x36, 0xa4, - 0x20, 0x11, 0x80, 0x14, 0x10, 0x78, 0x36, 0x1b, 0x02, 0x7f, 0x00, 0x7c, - 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x60, 0x30, 0xc0, 0x8d, 0xc0, 0x85, 0xc0, 0xac, 0x60, 0x32, 0x10, 0x78, - 0x42, 0x24, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, - 0x2b, 0xd7, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, - 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x00, 0xc0, 0x2b, 0xd7, - 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x36, 0xd3, 0x78, 0x28, - 0xa0, 0x05, 0x00, 0x40, 0x2b, 0xad, 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, - 0x0c, 0x7f, 0x00, 0x40, 0x2b, 0xd7, 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x10, 0x78, 0x8f, 0x22, - 0x00, 0x40, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x36, 0xe9, - 0x00, 0x7c, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x00, 0x40, 0x2b, 0xd7, - 0x00, 0x78, 0x2b, 0xad, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, 0x7f, 0x24, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x2b, 0xd7, - 0x20, 0x09, 0x00, 0x00, 0x20, 0x31, 0x00, 0x00, 0x70, 0x23, 0x00, 0x00, - 0x70, 0x2f, 0x00, 0x00, 0xad, 0x80, 0x00, 0x05, 0x70, 0x26, 0x20, 0xa0, - 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x37, 0x6d, 0x60, 0x04, 0xa0, 0xc4, - 0x00, 0xff, 0xa8, 0xc6, 0x00, 0x06, 0x00, 0x40, 0x37, 0x1d, 0xa0, 0xc4, - 0xff, 0x00, 0xa8, 0xc6, 0x06, 0x00, 0x00, 0xc0, 0x37, 0x6d, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x00, 0xc0, 0x37, 0x2a, 0x10, 0x78, - 0x48, 0x9b, 0x00, 0xc0, 0x37, 0x2a, 0xd7, 0x9c, 0x00, 0x40, 0x37, 0x6d, - 0xd7, 0x94, 0x00, 0xc0, 0x37, 0x30, 0xd7, 0x84, 0x00, 0x40, 0x37, 0x3c, - 0xac, 0x80, 0x00, 0x06, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x04, - 0x53, 0xa3, 0x10, 0x78, 0x34, 0x26, 0xd7, 0x94, 0x00, 0x40, 0x37, 0x45, - 0xac, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x04, - 0x53, 0xa3, 0x10, 0x78, 0x34, 0x26, 0x21, 0xa2, 0xd7, 0x94, 0x00, 0x40, - 0x37, 0x65, 0xac, 0x80, 0x00, 0x00, 0x20, 0x98, 0x94, 0xa0, 0x20, 0xa9, - 0x00, 0x02, 0x53, 0xa3, 0xac, 0x80, 0x00, 0x03, 0x20, 0xa6, 0x94, 0xa0, - 0xac, 0x80, 0x00, 0x04, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x02, - 0x53, 0xa3, 0x10, 0x78, 0x34, 0x18, 0xac, 0x80, 0x00, 0x26, 0x20, 0x98, - 0x20, 0xa9, 0x00, 0x02, 0x53, 0xa3, 0x00, 0x78, 0x37, 0x66, 0x94, 0xa0, - 0xd7, 0x94, 0x00, 0x40, 0x37, 0x6b, 0xa6, 0xb0, 0x00, 0x0b, 0xa6, 0xb0, - 0x00, 0x05, 0x81, 0x08, 0xd7, 0x8c, 0x00, 0x40, 0x37, 0x77, 0xa1, 0x86, - 0x01, 0x00, 0x00, 0x40, 0x37, 0x88, 0x00, 0x78, 0x37, 0x7b, 0xa1, 0x86, - 0x00, 0x7e, 0x00, 0x40, 0x37, 0x88, 0xd7, 0x94, 0x00, 0x40, 0x37, 0x82, - 0xa6, 0x86, 0x00, 0x20, 0x00, 0x78, 0x37, 0x84, 0xa6, 0x86, 0x00, 0x28, - 0x00, 0x40, 0x37, 0x91, 0x00, 0x78, 0x37, 0x0c, 0x86, 0xff, 0x00, 0xc0, - 0x37, 0x8f, 0x71, 0x20, 0x81, 0x0b, 0x00, 0x78, 0x2b, 0xad, 0x70, 0x2f, - 0x00, 0x01, 0x71, 0x1e, 0x70, 0x20, 0xa6, 0x00, 0x70, 0x22, 0x77, 0x2a, - 0x20, 0x61, 0xa7, 0xd2, 0x60, 0x07, 0x00, 0x00, 0x66, 0x12, 0x70, 0x24, - 0x60, 0x0e, 0x62, 0x26, 0x63, 0x2a, 0x64, 0x2e, 0x65, 0x32, 0x2c, 0x10, - 0x10, 0x78, 0x13, 0xdb, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1b, 0x37, 0xa9, - 0x00, 0x7c, 0x70, 0x2c, 0xa0, 0x05, 0x00, 0xc0, 0x37, 0xbb, 0x71, 0x1c, - 0x70, 0x24, 0x20, 0xa0, 0x77, 0x28, 0x20, 0x31, 0x00, 0x00, 0x20, 0x61, - 0xa7, 0xd2, 0x62, 0x24, 0x63, 0x28, 0x64, 0x2c, 0x65, 0x30, 0x00, 0x78, - 0x37, 0x0c, 0x71, 0x20, 0x81, 0x0b, 0x00, 0x78, 0x2b, 0xad, 0x20, 0x29, - 0x00, 0x7e, 0x79, 0x24, 0x7a, 0x28, 0x7b, 0x2c, 0x7c, 0x38, 0xa1, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, - 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, 0xa1, 0x84, 0x00, 0xff, 0xa0, 0xe2, - 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, - 0xa2, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, 0x00, 0x20, 0x00, 0x48, - 0x2b, 0xdb, 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, 0xa2, 0x84, 0x00, 0xff, - 0xa0, 0xe2, 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, 0xa5, 0x02, 0x00, 0x48, - 0x2b, 0xdb, 0xa3, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, 0x00, 0x20, - 0x00, 0x48, 0x2b, 0xdb, 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, 0xa3, 0x84, - 0x00, 0xff, 0xa0, 0xe2, 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, 0xa5, 0x02, - 0x00, 0x48, 0x2b, 0xdb, 0xa4, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, - 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, - 0xa4, 0x84, 0x00, 0xff, 0xa0, 0xe2, 0x00, 0x20, 0x00, 0x48, 0x2b, 0xdb, - 0xa5, 0x02, 0x00, 0x48, 0x2b, 0xdb, 0x20, 0x61, 0xa9, 0xa5, 0x61, 0x02, - 0x62, 0x06, 0x63, 0x0a, 0x64, 0x0e, 0x00, 0x78, 0x2b, 0xad, 0x00, 0x7e, - 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xcc, 0x00, 0x7f, 0x00, 0x7c, - 0x00, 0x7e, 0x20, 0x01, 0xa7, 0x72, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x7f, - 0x00, 0x7c, 0x61, 0x64, 0x7a, 0x24, 0x63, 0x00, 0x82, 0xff, 0x00, 0xc0, - 0x38, 0x30, 0x79, 0x26, 0x00, 0x78, 0x2b, 0xad, 0x83, 0xff, 0x00, 0xc0, - 0x2b, 0xdb, 0x20, 0x01, 0xff, 0xf0, 0xa2, 0x00, 0x00, 0xc8, 0x2b, 0xdb, - 0x20, 0x19, 0xff, 0xff, 0x60, 0x68, 0xa3, 0x02, 0xa2, 0x00, 0x00, 0x48, - 0x2b, 0xdb, 0x79, 0x26, 0x62, 0x66, 0x00, 0x78, 0x2b, 0xad, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x2b, 0xd7, - 0x7c, 0x28, 0x7d, 0x24, 0x7e, 0x38, 0x7f, 0x2c, 0x10, 0x78, 0x35, 0xba, - 0x00, 0x40, 0x2b, 0xd7, 0x20, 0x09, 0x00, 0x00, 0x20, 0x19, 0x00, 0x00, - 0x70, 0x23, 0x00, 0x00, 0x70, 0x2f, 0x00, 0x00, 0xad, 0x80, 0x00, 0x03, - 0x70, 0x26, 0x20, 0xa0, 0xa1, 0xe0, 0xa8, 0x35, 0x2c, 0x64, 0x8c, 0xff, - 0x00, 0x40, 0x38, 0x7d, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x38, 0x72, 0x60, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0xa0, 0x86, 0x06, 0x00, 0x00, 0xc0, 0x38, 0x7d, 0x60, 0x14, 0x20, 0xa2, - 0x94, 0xa0, 0x60, 0x10, 0x80, 0x07, 0xa1, 0x05, 0x80, 0x07, 0x20, 0xa2, - 0x94, 0xa0, 0xa3, 0x98, 0x00, 0x02, 0x81, 0x08, 0xa1, 0x82, 0x00, 0xff, - 0x00, 0x40, 0x38, 0x88, 0xa3, 0x86, 0x00, 0x2a, 0x00, 0x40, 0x38, 0x91, - 0x00, 0x78, 0x38, 0x5e, 0x83, 0xff, 0x00, 0xc0, 0x38, 0x8f, 0x71, 0x20, - 0x81, 0x0c, 0x00, 0x78, 0x2b, 0xad, 0x70, 0x2f, 0x00, 0x01, 0x71, 0x1e, - 0x70, 0x20, 0xa3, 0x00, 0x70, 0x22, 0x20, 0x61, 0xa7, 0xd2, 0x60, 0x07, - 0x00, 0x00, 0x63, 0x12, 0x70, 0x24, 0x60, 0x0e, 0x64, 0x26, 0x65, 0x2a, - 0x66, 0x2e, 0x67, 0x32, 0x2c, 0x10, 0x10, 0x78, 0x13, 0xdb, 0x70, 0x07, - 0x00, 0x02, 0x70, 0x1b, 0x38, 0xa8, 0x00, 0x7c, 0x70, 0x2c, 0xa0, 0x05, - 0x00, 0xc0, 0x38, 0xb9, 0x71, 0x1c, 0x70, 0x24, 0x20, 0xa0, 0x20, 0x19, - 0x00, 0x00, 0x20, 0x61, 0xa7, 0xd2, 0x64, 0x24, 0x65, 0x28, 0x66, 0x2c, - 0x67, 0x30, 0x00, 0x78, 0x38, 0x5e, 0x71, 0x20, 0x81, 0x0c, 0x00, 0x78, - 0x2b, 0xad, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x60, 0xcc, 0xd0, 0x9c, - 0x00, 0x40, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x2b, 0xd7, - 0x79, 0x24, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x10, 0x78, - 0x36, 0x04, 0x70, 0x1b, 0x38, 0xd2, 0x00, 0x7c, 0x0d, 0x7e, 0xad, 0xe8, - 0x00, 0x0d, 0x68, 0x28, 0xa0, 0xbe, 0x70, 0x00, 0x00, 0x40, 0x38, 0xe5, - 0xa0, 0xbe, 0x71, 0x00, 0x00, 0x40, 0x38, 0xe5, 0xa0, 0xbe, 0x72, 0x00, - 0x00, 0x40, 0x38, 0xe5, 0x0d, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x68, 0x20, - 0x69, 0x24, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x39, 0x10, 0x10, 0x78, - 0x45, 0x5c, 0x00, 0xc0, 0x39, 0x10, 0x71, 0x22, 0x66, 0x12, 0x65, 0x16, - 0x6e, 0x18, 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x39, 0x10, - 0x10, 0x78, 0x35, 0xba, 0x00, 0x40, 0x39, 0x10, 0x0c, 0x7f, 0x0d, 0x7f, - 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x68, 0x23, - 0x00, 0x00, 0x68, 0x04, 0x20, 0x68, 0x10, 0x78, 0x8e, 0x92, 0x00, 0x40, - 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x39, 0x13, 0x00, 0x7c, - 0x0d, 0x7f, 0x00, 0x78, 0x2b, 0xd7, 0x71, 0x20, 0x10, 0x78, 0x29, 0x8e, - 0x68, 0x20, 0xa0, 0x86, 0x80, 0x01, 0x00, 0x40, 0x2b, 0xd7, 0x2d, 0x00, - 0x70, 0x1e, 0x68, 0x04, 0xa0, 0x80, 0x00, 0x02, 0x00, 0x7e, 0x20, 0xa9, - 0x00, 0x2a, 0x20, 0x98, 0x20, 0xa0, 0x10, 0x78, 0x42, 0x81, 0x00, 0x7f, - 0xad, 0xe8, 0x00, 0x0d, 0x6a, 0x08, 0x6b, 0x0c, 0x6c, 0x10, 0x6d, 0x14, - 0x20, 0x61, 0xa7, 0xd2, 0x60, 0x07, 0x00, 0x00, 0x6e, 0x00, 0x6f, 0x28, - 0xa7, 0xc6, 0x70, 0x00, 0x00, 0xc0, 0x39, 0x3a, 0x00, 0x78, 0x39, 0x3e, - 0xa7, 0xc6, 0x71, 0x00, 0x00, 0xc0, 0x39, 0x46, 0xa6, 0xc2, 0x00, 0x04, - 0x00, 0x48, 0x2b, 0xdb, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, 0x36, 0x08, - 0xa7, 0xc6, 0x72, 0x00, 0x00, 0xc0, 0x2b, 0xdb, 0xa6, 0xc2, 0x00, 0x54, - 0x00, 0x48, 0x2b, 0xdb, 0x60, 0x0e, 0x60, 0x13, 0x00, 0x2a, 0x62, 0x26, - 0x63, 0x2a, 0x64, 0x2e, 0x65, 0x32, 0x2c, 0x10, 0x10, 0x78, 0x13, 0xdb, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1b, 0x39, 0x5d, 0x00, 0x7c, 0x70, 0x1c, - 0x20, 0x68, 0x68, 0x04, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x80, - 0x00, 0x02, 0x00, 0x7e, 0x20, 0xa9, 0x00, 0x2a, 0x20, 0x98, 0x20, 0xa0, - 0x10, 0x78, 0x42, 0x81, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x2a, 0x20, 0x61, - 0xa7, 0xd2, 0x62, 0x24, 0x63, 0x28, 0x64, 0x2c, 0x65, 0x30, 0x00, 0x78, - 0x36, 0x08, 0x81, 0xff, 0x00, 0xc0, 0x2b, 0xd7, 0x79, 0x2c, 0x20, 0x01, - 0xa9, 0x9d, 0x21, 0x02, 0x10, 0x78, 0x35, 0xd2, 0x00, 0x40, 0x2b, 0xdb, - 0x10, 0x78, 0x46, 0x73, 0x00, 0x40, 0x2b, 0xd7, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x47, 0xde, 0x12, 0x7f, 0x00, 0x78, 0x2b, 0xad, - 0x78, 0x24, 0xd0, 0x8c, 0x00, 0xc0, 0x39, 0x95, 0xd0, 0x84, 0x00, 0x40, - 0x31, 0xda, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x0c, 0x7e, - 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x00, 0xc0, 0x39, 0xa3, 0x20, 0x09, - 0x00, 0x02, 0x00, 0x78, 0x2b, 0xd7, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, 0x39, 0xb0, 0xa0, 0x8e, 0x00, 0x04, - 0x00, 0x40, 0x39, 0xb0, 0xa0, 0x8e, 0x00, 0x05, 0x00, 0xc0, 0x39, 0xdd, - 0x78, 0x24, 0xd0, 0x8c, 0x00, 0x40, 0x39, 0xbb, 0x60, 0x00, 0xc0, 0x8c, - 0x60, 0x02, 0x00, 0x78, 0x39, 0xc5, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, - 0xd0, 0xb4, 0x00, 0x40, 0x32, 0x0f, 0x60, 0x00, 0xd0, 0x8c, 0x00, 0xc0, - 0x32, 0x0f, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, - 0x10, 0x78, 0x8e, 0xae, 0x00, 0xc0, 0x39, 0xd2, 0x20, 0x09, 0x00, 0x03, - 0x00, 0x78, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x39, 0xd7, - 0x00, 0x7c, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x00, 0x78, - 0x32, 0x0f, 0x20, 0x09, 0xa7, 0x2f, 0x21, 0x0c, 0x81, 0xff, 0x00, 0x40, - 0x39, 0xe7, 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, 0x2b, 0xd7, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0x40, 0x39, 0xf2, - 0x20, 0x09, 0x00, 0x07, 0x00, 0x78, 0x2b, 0xd7, 0x20, 0x01, 0xa7, 0x53, - 0x20, 0x04, 0xd0, 0xac, 0x00, 0x40, 0x39, 0xfc, 0x20, 0x09, 0x00, 0x08, - 0x00, 0x78, 0x2b, 0xd7, 0x60, 0x9c, 0xd0, 0xa4, 0x00, 0xc0, 0x3a, 0x03, - 0xd0, 0xac, 0x00, 0xc0, 0x32, 0x0f, 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x10, 0x78, 0x8f, 0x22, - 0x00, 0xc0, 0x3a, 0x12, 0x20, 0x09, 0x00, 0x03, 0x00, 0x78, 0x2b, 0xd7, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3a, 0x17, 0x00, 0x7c, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x00, 0xc0, 0x3a, 0x20, 0x20, 0x09, 0x00, 0x04, - 0x00, 0x78, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, - 0x00, 0x78, 0x39, 0xb2, 0x81, 0xff, 0x20, 0x09, 0x00, 0x01, 0x00, 0xc0, - 0x2b, 0xd7, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x20, 0x09, 0x00, 0x07, - 0x00, 0xc0, 0x2b, 0xd7, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, - 0x20, 0x09, 0x00, 0x08, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, 0x35, 0xe4, - 0x00, 0x40, 0x2b, 0xdb, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x06, 0x20, 0x09, 0x00, 0x09, 0x00, 0xc0, 0x2b, 0xd7, 0x0c, 0x7e, - 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x20, 0x09, 0x00, 0x02, 0x00, 0x40, - 0x2b, 0xd7, 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x79, 0x28, 0xa1, 0x94, 0xff, 0x00, 0xa1, 0x8c, - 0x00, 0xff, 0xa0, 0x06, 0x82, 0xff, 0x00, 0xc0, 0x3a, 0x65, 0xc0, 0xed, - 0x69, 0x52, 0x79, 0x2c, 0x69, 0x56, 0x00, 0x78, 0x3a, 0x6e, 0xa2, 0x8e, - 0x01, 0x00, 0x00, 0xc0, 0x2b, 0xdb, 0xc0, 0xe5, 0x68, 0x53, 0x00, 0x00, - 0x68, 0x57, 0x00, 0x00, 0x68, 0x3e, 0x10, 0x78, 0x90, 0xcd, 0x20, 0x09, - 0x00, 0x03, 0x00, 0x40, 0x2b, 0xd7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, - 0x3a, 0x7a, 0x00, 0x7c, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x20, 0x09, - 0x00, 0x04, 0x00, 0x40, 0x2b, 0xd7, 0x00, 0x78, 0x2b, 0xad, 0x81, 0xff, - 0x20, 0x09, 0x00, 0x01, 0x00, 0xc0, 0x2b, 0xd7, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x03, 0x20, 0x09, 0x00, 0x07, 0x00, 0xc0, 0x2b, 0xd7, 0x10, 0x78, - 0x35, 0xe4, 0x00, 0x40, 0x2b, 0xdb, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x20, 0x09, 0x00, 0x09, 0x00, 0xc0, 0x2b, 0xd7, - 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xba, 0x0c, 0x7f, 0x20, 0x09, 0x00, 0x02, - 0x00, 0x40, 0x2b, 0xd7, 0xad, 0x80, 0x00, 0x0f, 0x20, 0x09, 0x00, 0x08, - 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x10, 0x78, 0x36, 0x04, - 0x70, 0x1b, 0x3a, 0xb1, 0x00, 0x7c, 0x0d, 0x7e, 0xad, 0xe8, 0x00, 0x0f, - 0x68, 0x00, 0xa0, 0x86, 0x05, 0x00, 0x00, 0xc0, 0x3a, 0xc4, 0x68, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x3a, 0xc4, 0x68, 0x08, 0xa0, 0x84, 0xff, 0x00, - 0x00, 0xc0, 0x3a, 0xc4, 0x00, 0x78, 0x3a, 0xc7, 0x0d, 0x7f, 0x00, 0xc0, - 0x2b, 0xdb, 0x0d, 0x7f, 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, - 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x0c, 0x7e, 0x10, 0x78, 0x35, 0xe4, - 0x00, 0xc0, 0x3a, 0xd7, 0x0c, 0x7f, 0x00, 0x78, 0x2b, 0xdb, 0x10, 0x78, - 0x91, 0x29, 0x20, 0x09, 0x00, 0x03, 0x0c, 0x7f, 0x00, 0x40, 0x2b, 0xd7, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3a, 0xe3, 0x00, 0x7c, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0x2b, 0xd7, - 0x00, 0x78, 0x2b, 0xad, 0x12, 0x7e, 0x0c, 0x7e, 0x0e, 0x7e, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x60, 0x44, 0xd0, 0xa4, 0x00, 0xc0, - 0x3b, 0x15, 0xd0, 0x84, 0x00, 0x40, 0x3a, 0xfe, 0x10, 0x78, 0x3c, 0x75, - 0x00, 0x78, 0x3b, 0x11, 0xd0, 0x8c, 0x00, 0x40, 0x3b, 0x05, 0x10, 0x78, - 0x3b, 0x8c, 0x00, 0x78, 0x3b, 0x11, 0xd0, 0x94, 0x00, 0x40, 0x3b, 0x0c, - 0x10, 0x78, 0x3b, 0x60, 0x00, 0x78, 0x3b, 0x11, 0xd0, 0x9c, 0x00, 0x40, - 0x3b, 0x11, 0x10, 0x78, 0x3b, 0x1f, 0x0e, 0x7f, 0x0c, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x01, 0x7e, 0x61, 0x28, 0xd1, 0x9c, 0x00, 0xc0, 0x3b, 0x1c, - 0xc1, 0x9d, 0x61, 0x2a, 0x01, 0x7f, 0x00, 0x78, 0x3b, 0x11, 0x62, 0x4c, - 0xa2, 0x86, 0xf0, 0xf0, 0x00, 0xc0, 0x3b, 0x30, 0x60, 0x48, 0xa0, 0x86, - 0xf0, 0xf0, 0x00, 0x40, 0x3b, 0x30, 0x62, 0x4a, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x00, 0x78, 0x3b, 0x5f, 0xa2, 0x94, 0xff, 0x00, - 0xa2, 0x96, 0xf7, 0x00, 0x00, 0x40, 0x3b, 0x45, 0x71, 0x34, 0xd1, 0xa4, - 0x00, 0xc0, 0x3b, 0x45, 0x62, 0x40, 0xa2, 0x94, 0x00, 0x10, 0x00, 0x40, - 0x3b, 0x45, 0x20, 0x09, 0x00, 0xf7, 0x10, 0x78, 0x42, 0xa1, 0x00, 0x78, - 0x3b, 0x5f, 0x60, 0x43, 0x00, 0x40, 0x60, 0x43, 0x00, 0x00, 0x70, 0x77, - 0x00, 0x00, 0x70, 0x8f, 0x00, 0x01, 0x70, 0xb3, 0x00, 0x00, 0x70, 0xcf, - 0x00, 0x00, 0x20, 0x09, 0xad, 0xc0, 0x20, 0x0b, 0x00, 0x00, 0x70, 0x87, - 0x00, 0x00, 0x70, 0x7b, 0x00, 0x0f, 0x20, 0x09, 0x00, 0x0f, 0x20, 0x11, - 0x41, 0xd5, 0x10, 0x78, 0x5a, 0xdd, 0x00, 0x7c, 0x15, 0x7e, 0x70, 0x78, - 0xa0, 0x05, 0x00, 0xc0, 0x3b, 0x8a, 0x20, 0x11, 0x41, 0xd5, 0x10, 0x78, - 0x5a, 0x45, 0x60, 0x40, 0xa0, 0x94, 0x00, 0x10, 0xa2, 0x85, 0x00, 0x20, - 0x60, 0x42, 0x20, 0xa9, 0x00, 0xc8, 0x60, 0x44, 0xd0, 0x8c, 0x00, 0xc0, - 0x3b, 0x83, 0x00, 0xf0, 0x3b, 0x71, 0x62, 0x42, 0x70, 0x8b, 0x00, 0x00, - 0x60, 0x40, 0xa0, 0x94, 0x00, 0x10, 0xa2, 0x85, 0x00, 0x80, 0x60, 0x42, - 0x62, 0x42, 0x00, 0x78, 0x3b, 0x8a, 0x62, 0x42, 0x70, 0x8b, 0x00, 0x00, - 0x70, 0x7f, 0x00, 0x00, 0x00, 0x78, 0x3b, 0x8a, 0x15, 0x7f, 0x00, 0x7c, - 0x70, 0x7c, 0xa0, 0x8a, 0x00, 0x03, 0x00, 0xc8, 0x3b, 0x95, 0x10, 0x79, - 0x3b, 0x98, 0x00, 0x78, 0x3b, 0x97, 0x10, 0x78, 0x13, 0x32, 0x00, 0x7c, - 0x3b, 0x9b, 0x3b, 0xea, 0x3c, 0x74, 0x0f, 0x7e, 0x70, 0x7f, 0x00, 0x01, - 0x20, 0xe1, 0xa0, 0x00, 0x20, 0xe1, 0x87, 0x00, 0x10, 0x78, 0x21, 0xf7, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x79, 0xac, 0x00, - 0x20, 0x7b, 0x22, 0x00, 0x78, 0x07, 0x00, 0xef, 0x78, 0x0b, 0x00, 0x00, - 0x78, 0x0f, 0x00, 0xef, 0x78, 0x13, 0x01, 0x38, 0x78, 0x17, 0x00, 0x00, - 0x78, 0x1b, 0x00, 0x00, 0x78, 0x1f, 0x00, 0x00, 0x78, 0x23, 0xff, 0xff, - 0x78, 0x27, 0xff, 0xff, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x2f, 0x00, 0x00, - 0x20, 0x79, 0xac, 0x0c, 0x20, 0x7b, 0x11, 0x01, 0x78, 0x07, 0x00, 0x00, - 0x20, 0x99, 0xa7, 0x05, 0x20, 0xa1, 0xac, 0x0e, 0x20, 0xa9, 0x00, 0x04, - 0x53, 0xa3, 0x20, 0x79, 0xac, 0x12, 0x20, 0x7b, 0x00, 0x00, 0x78, 0x07, - 0x00, 0x00, 0x20, 0x99, 0xac, 0x00, 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xa9, - 0x00, 0x14, 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x0c, 0x60, 0x0f, 0x00, 0x00, - 0x10, 0x78, 0x42, 0x0b, 0x0f, 0x7f, 0x70, 0x83, 0x00, 0x00, 0x60, 0x43, - 0x00, 0x08, 0x60, 0x43, 0x00, 0x00, 0x00, 0x7c, 0x0d, 0x7e, 0x70, 0x80, - 0x70, 0x83, 0x00, 0x00, 0xa0, 0x25, 0x00, 0x40, 0x3c, 0x5e, 0x60, 0x20, - 0xd0, 0xb4, 0x00, 0xc0, 0x3c, 0x5c, 0x71, 0x8c, 0x81, 0xff, 0x00, 0x40, - 0x3c, 0x4b, 0xa4, 0x86, 0x00, 0x0c, 0x00, 0xc0, 0x3c, 0x56, 0xa4, 0x80, - 0x00, 0x18, 0x80, 0x04, 0x20, 0xa8, 0x20, 0x11, 0xac, 0x80, 0x20, 0x19, - 0xac, 0x00, 0x22, 0x0c, 0x23, 0x04, 0xa1, 0x06, 0x00, 0xc0, 0x3c, 0x22, - 0x82, 0x10, 0x83, 0x18, 0x00, 0xf0, 0x3c, 0x05, 0x60, 0x43, 0x00, 0x04, - 0x60, 0x8b, 0xbc, 0x94, 0x60, 0x8f, 0xf0, 0xf0, 0x60, 0x43, 0x00, 0x06, - 0x70, 0x7f, 0x00, 0x02, 0x70, 0x8b, 0x00, 0x02, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0xdd, 0x00, 0x78, 0x3c, 0x5c, - 0x20, 0x69, 0xac, 0x80, 0x69, 0x30, 0xa1, 0x8e, 0x11, 0x01, 0x00, 0xc0, - 0x3c, 0x56, 0x68, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x3c, 0x56, 0x69, 0x00, - 0xa1, 0x8c, 0x00, 0xff, 0x00, 0xc0, 0x3c, 0x36, 0x68, 0x04, 0xa0, 0x05, - 0x00, 0x40, 0x3c, 0x4b, 0x20, 0x11, 0xac, 0x8e, 0x20, 0x19, 0xa7, 0x05, - 0x20, 0xa9, 0x00, 0x04, 0x22, 0x0c, 0x23, 0x04, 0xa1, 0x02, 0x00, 0x48, - 0x3c, 0x49, 0x00, 0xc0, 0x3c, 0x56, 0x82, 0x10, 0x83, 0x18, 0x00, 0xf0, - 0x3c, 0x3c, 0x00, 0x78, 0x3c, 0x56, 0x70, 0x8f, 0x00, 0x00, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xac, 0x80, 0x20, 0xa1, - 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x14, 0x53, 0xa6, 0x60, 0x43, 0x00, 0x08, - 0x60, 0x43, 0x00, 0x00, 0x00, 0x78, 0x3c, 0x5e, 0x0d, 0x7f, 0x00, 0x7c, - 0x60, 0x20, 0xd0, 0xb4, 0x00, 0xc0, 0x3c, 0x5c, 0x60, 0xc3, 0x00, 0x0c, - 0x20, 0x11, 0xa9, 0xbb, 0x20, 0x13, 0x00, 0x00, 0x70, 0x83, 0x00, 0x00, - 0x20, 0xe1, 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, - 0x10, 0x78, 0x6e, 0x06, 0x00, 0x78, 0x3c, 0x5c, 0x00, 0x7c, 0x70, 0x88, - 0xa0, 0x8a, 0x00, 0x1d, 0x00, 0xc8, 0x3c, 0x7e, 0x10, 0x79, 0x3c, 0x81, - 0x00, 0x78, 0x3c, 0x80, 0x10, 0x78, 0x13, 0x32, 0x00, 0x7c, 0x3c, 0xab, - 0x3c, 0xba, 0x3c, 0xe9, 0x3d, 0x02, 0x3d, 0x2e, 0x3d, 0x5a, 0x3d, 0x86, - 0x3d, 0xbc, 0x3d, 0xe8, 0x3e, 0x10, 0x3e, 0x53, 0x3e, 0x7d, 0x3e, 0x9f, - 0x3e, 0xb5, 0x3e, 0xdb, 0x3e, 0xee, 0x3e, 0xf7, 0x3f, 0x2b, 0x3f, 0x57, - 0x3f, 0x83, 0x3f, 0xaf, 0x3f, 0xe5, 0x40, 0x30, 0x40, 0x5f, 0x40, 0x81, - 0x40, 0xc3, 0x40, 0xe9, 0x41, 0x02, 0x41, 0x03, 0x0c, 0x7e, 0x20, 0x61, - 0xa7, 0x00, 0x60, 0x03, 0x00, 0x07, 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, - 0xa0, 0x84, 0xff, 0xf9, 0x60, 0x06, 0x0c, 0x7f, 0x00, 0x7c, 0x60, 0x8b, - 0xbc, 0x94, 0x60, 0x8f, 0xf0, 0xf0, 0x60, 0x43, 0x00, 0x02, 0x70, 0x8b, - 0x00, 0x01, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, - 0x5a, 0xdd, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x86, 0x00, 0x14, - 0x00, 0xc0, 0x3c, 0xe7, 0x60, 0x43, 0x00, 0x00, 0x60, 0x20, 0xd0, 0xb4, - 0x00, 0xc0, 0x3c, 0xe7, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, 0xa2, 0x96, - 0x11, 0x02, 0x00, 0xc0, 0x3c, 0xe5, 0x78, 0x34, 0xa0, 0x05, 0x00, 0xc0, - 0x3c, 0xe5, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x3c, 0xdb, 0x70, 0xb0, - 0xa0, 0x05, 0x00, 0xc0, 0x3c, 0xdb, 0x70, 0xb3, 0x00, 0x01, 0x20, 0x11, - 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x70, 0x8b, 0x00, 0x10, 0x10, 0x78, - 0x3e, 0xf7, 0x00, 0x78, 0x3c, 0xe7, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, - 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x03, 0x60, 0x43, 0x00, 0x04, 0x20, 0x11, - 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x10, 0x78, 0x42, 0x89, 0x20, 0xa3, - 0x11, 0x02, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x0a, 0x20, 0xa3, - 0x00, 0x00, 0x00, 0xf0, 0x3c, 0xf9, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, - 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, - 0x3d, 0x2c, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, - 0x00, 0x14, 0x00, 0xc0, 0x3d, 0x2a, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, - 0xa2, 0x96, 0x11, 0x02, 0x00, 0xc0, 0x3d, 0x2a, 0x78, 0x34, 0xa0, 0x05, - 0x00, 0xc0, 0x3d, 0x2a, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x3d, 0x24, - 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, 0x3d, 0x24, 0x70, 0xb3, 0x00, 0x01, - 0x70, 0x8b, 0x00, 0x04, 0x10, 0x78, 0x3d, 0x2e, 0x00, 0x78, 0x3d, 0x2c, - 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x05, - 0x10, 0x78, 0x42, 0x89, 0x20, 0xa3, 0x11, 0x03, 0x20, 0xa3, 0x00, 0x00, - 0x34, 0x30, 0x20, 0x11, 0xac, 0x8e, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, - 0x3d, 0x4c, 0x70, 0x74, 0xa0, 0x05, 0x00, 0xc0, 0x3d, 0x4c, 0x71, 0x50, - 0xa1, 0x86, 0xff, 0xff, 0x00, 0x40, 0x3d, 0x4c, 0x10, 0x78, 0x41, 0x9d, - 0x00, 0x40, 0x3d, 0x4c, 0x10, 0x78, 0x42, 0xb8, 0x20, 0xa9, 0x00, 0x08, - 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, - 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, 0x3d, 0x84, 0x20, 0x11, - 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, - 0x3d, 0x82, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x03, - 0x00, 0xc0, 0x3d, 0x82, 0x78, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x3d, 0x82, - 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x3d, 0x7c, 0x70, 0xb0, 0xa0, 0x05, - 0x00, 0xc0, 0x3d, 0x7c, 0x70, 0xb3, 0x00, 0x01, 0x70, 0x8b, 0x00, 0x06, - 0x10, 0x78, 0x3d, 0x86, 0x00, 0x78, 0x3d, 0x84, 0x10, 0x78, 0x42, 0x24, - 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x07, 0x10, 0x78, 0x42, 0x89, - 0x20, 0xa3, 0x11, 0x04, 0x20, 0xa3, 0x00, 0x00, 0x34, 0x30, 0x20, 0x11, - 0xac, 0x8e, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, 0x3d, 0xae, 0x70, 0x74, - 0xa0, 0x05, 0x00, 0xc0, 0x3d, 0xae, 0x71, 0x54, 0xa1, 0x86, 0xff, 0xff, - 0x00, 0x40, 0x3d, 0xae, 0xa1, 0x80, 0x29, 0xc0, 0x20, 0x0c, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x10, 0x78, 0x41, 0x9d, 0x00, 0x40, 0x3d, 0xae, - 0x10, 0x78, 0x38, 0x20, 0x00, 0x40, 0x3d, 0xae, 0x10, 0x78, 0x25, 0x6a, - 0x20, 0xa9, 0x00, 0x08, 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, - 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, - 0x3d, 0xe6, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, - 0x00, 0x14, 0x00, 0xc0, 0x3d, 0xe4, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, - 0xa2, 0x96, 0x11, 0x04, 0x00, 0xc0, 0x3d, 0xe4, 0x78, 0x34, 0xa0, 0x05, - 0x00, 0xc0, 0x3d, 0xe4, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x3d, 0xde, - 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, 0x3d, 0xde, 0x70, 0xb3, 0x00, 0x01, - 0x70, 0x8b, 0x00, 0x08, 0x10, 0x78, 0x3d, 0xe8, 0x00, 0x78, 0x3d, 0xe6, - 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x09, - 0x10, 0x78, 0x42, 0x89, 0x20, 0xa3, 0x11, 0x05, 0x20, 0xa3, 0x01, 0x00, - 0x34, 0x30, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, 0x3e, 0x01, 0x70, 0x74, - 0xa0, 0x05, 0x00, 0xc0, 0x3e, 0x01, 0x10, 0x78, 0x41, 0x04, 0x00, 0xc0, - 0x3e, 0x0b, 0xa0, 0x85, 0x00, 0x01, 0x10, 0x78, 0x25, 0x6a, 0x20, 0xa9, - 0x00, 0x08, 0x20, 0x99, 0xac, 0x8e, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, - 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, - 0x3e, 0x51, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, - 0x00, 0x14, 0x00, 0xc0, 0x3e, 0x4f, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, - 0xa2, 0x96, 0x11, 0x05, 0x00, 0xc0, 0x3e, 0x4f, 0x78, 0x34, 0x20, 0x11, - 0x01, 0x00, 0xa2, 0x1e, 0x00, 0xc0, 0x3e, 0x3a, 0x7a, 0x38, 0xd2, 0xfc, - 0x00, 0x40, 0x3e, 0x34, 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, 0x3e, 0x34, - 0x70, 0xb3, 0x00, 0x01, 0x70, 0x8b, 0x00, 0x0a, 0x10, 0x78, 0x3e, 0x53, - 0x00, 0x78, 0x3e, 0x51, 0xa0, 0x05, 0x00, 0xc0, 0x3e, 0x4f, 0x7a, 0x38, - 0xd2, 0xfc, 0x00, 0x40, 0x3e, 0x47, 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, - 0x3e, 0x47, 0x70, 0xb3, 0x00, 0x01, 0x70, 0x87, 0x00, 0x00, 0x70, 0x8b, - 0x00, 0x0e, 0x10, 0x78, 0x3e, 0xdb, 0x00, 0x78, 0x3e, 0x51, 0x10, 0x78, - 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x0b, 0x20, 0x11, - 0xac, 0x0e, 0x22, 0xa0, 0x20, 0xa9, 0x00, 0x40, 0x20, 0x19, 0xff, 0xff, - 0x43, 0xa4, 0x20, 0xa9, 0x00, 0x02, 0x20, 0x09, 0x00, 0x00, 0x41, 0xa4, - 0x10, 0x78, 0x42, 0x89, 0x20, 0xa3, 0x11, 0x06, 0x20, 0xa3, 0x00, 0x00, - 0x10, 0x78, 0x42, 0xd4, 0x00, 0x40, 0x3e, 0x70, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x78, 0x3e, 0x74, 0x60, 0x30, 0xa0, 0x85, 0x01, 0x00, 0x20, 0x12, - 0x22, 0x98, 0x20, 0xa9, 0x00, 0x42, 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x84, - 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, - 0x00, 0x40, 0x3e, 0x9d, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, - 0xa0, 0x86, 0x00, 0x84, 0x00, 0xc0, 0x3e, 0x9b, 0x20, 0x79, 0xac, 0x80, - 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x06, 0x00, 0xc0, 0x3e, 0x9b, 0x78, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x3e, 0x9b, 0x70, 0x8b, 0x00, 0x0c, 0x10, 0x78, - 0x3e, 0x9f, 0x00, 0x78, 0x3e, 0x9d, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, - 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x0d, 0x10, 0x78, 0x42, 0x89, 0x20, 0xa3, - 0x11, 0x07, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x99, 0xac, 0x8e, 0x20, 0xa9, - 0x00, 0x40, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x84, 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, - 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, 0x3e, 0xd9, 0x20, 0x11, 0x41, 0xdc, - 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, 0x00, 0x84, 0x00, 0xc0, 0x3e, 0xd7, - 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x07, 0x00, 0xc0, - 0x3e, 0xd7, 0x78, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x3e, 0xd7, 0x70, 0x87, - 0x00, 0x01, 0x10, 0x78, 0x42, 0x7b, 0x70, 0x8b, 0x00, 0x0e, 0x10, 0x78, - 0x3e, 0xdb, 0x00, 0x78, 0x3e, 0xd9, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, - 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x0f, 0x70, 0x83, 0x00, 0x00, 0x60, 0x8b, - 0xbc, 0x85, 0x60, 0x8f, 0xb5, 0xb5, 0x60, 0x43, 0x00, 0x05, 0x60, 0x43, - 0x00, 0x04, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, - 0x5a, 0x38, 0x00, 0x7c, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, 0x3e, 0xf6, - 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x00, 0x7c, 0x70, 0x8b, - 0x00, 0x11, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, 0x3f, 0x14, 0x71, 0x6c, - 0x81, 0xff, 0x00, 0x40, 0x3f, 0x14, 0x20, 0x09, 0x00, 0x00, 0x70, 0x70, - 0xa0, 0x84, 0x00, 0xff, 0x10, 0x78, 0x25, 0x4d, 0xa1, 0x86, 0x00, 0x7e, - 0x00, 0x40, 0x3f, 0x14, 0xa1, 0x86, 0x00, 0x80, 0x00, 0x40, 0x3f, 0x14, - 0x20, 0x11, 0xac, 0x8e, 0x10, 0x78, 0x41, 0x9d, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xac, 0x80, 0x20, 0xa1, 0x02, 0x0b, - 0x74, 0x80, 0xa4, 0x80, 0x00, 0x18, 0xa0, 0x80, 0x00, 0x07, 0xa0, 0x84, - 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x14, - 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, - 0x00, 0x40, 0x3f, 0x55, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, - 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x3f, 0x53, 0x20, 0x79, 0xac, 0x80, - 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x03, 0x00, 0xc0, 0x3f, 0x53, 0x78, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x3f, 0x53, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, - 0x3f, 0x4d, 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, 0x3f, 0x4d, 0x70, 0xb3, - 0x00, 0x01, 0x70, 0x8b, 0x00, 0x12, 0x10, 0x78, 0x3f, 0x57, 0x00, 0x78, - 0x3f, 0x55, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, - 0x00, 0x13, 0x10, 0x78, 0x42, 0x95, 0x20, 0xa3, 0x11, 0x03, 0x20, 0xa3, - 0x00, 0x00, 0x34, 0x30, 0x20, 0x11, 0xac, 0x8e, 0x10, 0x78, 0x42, 0xd4, - 0x00, 0xc0, 0x3f, 0x75, 0x70, 0x74, 0xa0, 0x05, 0x00, 0xc0, 0x3f, 0x75, - 0x71, 0x50, 0xa1, 0x86, 0xff, 0xff, 0x00, 0x40, 0x3f, 0x75, 0x10, 0x78, - 0x41, 0x9d, 0x00, 0x40, 0x3f, 0x75, 0x10, 0x78, 0x42, 0xb8, 0x20, 0xa9, - 0x00, 0x08, 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, 0x42, 0x0b, - 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, 0x3f, 0xad, - 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, 0x00, 0x14, - 0x00, 0xc0, 0x3f, 0xab, 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, 0xa2, 0x96, - 0x11, 0x04, 0x00, 0xc0, 0x3f, 0xab, 0x78, 0x34, 0xa0, 0x05, 0x00, 0xc0, - 0x3f, 0xab, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x3f, 0xa5, 0x70, 0xb0, - 0xa0, 0x05, 0x00, 0xc0, 0x3f, 0xa5, 0x70, 0xb3, 0x00, 0x01, 0x70, 0x8b, - 0x00, 0x14, 0x10, 0x78, 0x3f, 0xaf, 0x00, 0x78, 0x3f, 0xad, 0x10, 0x78, - 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x15, 0x10, 0x78, - 0x42, 0x95, 0x20, 0xa3, 0x11, 0x04, 0x20, 0xa3, 0x00, 0x00, 0x34, 0x30, - 0x20, 0x11, 0xac, 0x8e, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, 0x3f, 0xd7, - 0x70, 0x74, 0xa0, 0x05, 0x00, 0xc0, 0x3f, 0xd7, 0x71, 0x54, 0xa1, 0x86, - 0xff, 0xff, 0x00, 0x40, 0x3f, 0xd7, 0xa1, 0x80, 0x29, 0xc0, 0x20, 0x0c, - 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x10, 0x78, 0x41, 0x9d, 0x00, 0x40, - 0x3f, 0xd7, 0x10, 0x78, 0x38, 0x20, 0x00, 0x40, 0x3f, 0xd7, 0x10, 0x78, - 0x25, 0x6a, 0x20, 0xa9, 0x00, 0x08, 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, - 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, - 0x00, 0x40, 0x40, 0x2e, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, - 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x40, 0x2c, 0x20, 0x79, 0xac, 0x80, - 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x05, 0x00, 0xc0, 0x40, 0x2c, 0x78, 0x34, - 0x20, 0x11, 0x01, 0x00, 0xa2, 0x1e, 0x00, 0xc0, 0x40, 0x0b, 0x7a, 0x38, - 0xd2, 0xfc, 0x00, 0x40, 0x40, 0x09, 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, - 0x40, 0x09, 0x70, 0xb3, 0x00, 0x01, 0x00, 0x78, 0x40, 0x1a, 0xa0, 0x05, - 0x00, 0xc0, 0x40, 0x2c, 0x7a, 0x38, 0xd2, 0xfc, 0x00, 0x40, 0x40, 0x18, - 0x70, 0xb0, 0xa0, 0x05, 0x00, 0xc0, 0x40, 0x18, 0x70, 0xb3, 0x00, 0x01, - 0x70, 0x87, 0x00, 0x00, 0x7a, 0x38, 0xd2, 0xf4, 0x00, 0x40, 0x40, 0x26, - 0x20, 0x01, 0xa7, 0x74, 0x20, 0x04, 0xd0, 0xa4, 0x00, 0xc0, 0x40, 0x26, - 0x70, 0xcf, 0x00, 0x08, 0x70, 0x8b, 0x00, 0x16, 0x10, 0x78, 0x40, 0x30, - 0x00, 0x78, 0x40, 0x2e, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xac, 0x80, - 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0e, 0x53, 0xa6, 0x34, 0x30, - 0x20, 0x11, 0xac, 0x8e, 0x70, 0x8b, 0x00, 0x17, 0x10, 0x78, 0x42, 0xd4, - 0x00, 0xc0, 0x40, 0x50, 0x70, 0x74, 0xa0, 0x05, 0x00, 0xc0, 0x40, 0x50, - 0x10, 0x78, 0x41, 0x04, 0x00, 0xc0, 0x40, 0x5a, 0xa0, 0x85, 0x00, 0x01, - 0x10, 0x78, 0x25, 0x6a, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x99, 0xac, 0x8e, - 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, - 0x70, 0x80, 0xa0, 0x05, 0x00, 0x40, 0x40, 0x7f, 0x20, 0x11, 0x41, 0xdc, - 0x10, 0x78, 0x5a, 0x45, 0xa0, 0x86, 0x00, 0x84, 0x00, 0xc0, 0x40, 0x7d, - 0x20, 0x79, 0xac, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x06, 0x00, 0xc0, - 0x40, 0x7d, 0x78, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x40, 0x7d, 0x70, 0x8b, - 0x00, 0x18, 0x10, 0x78, 0x40, 0x81, 0x00, 0x78, 0x40, 0x7f, 0x10, 0x78, - 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, 0x00, 0x19, 0x10, 0x78, - 0x42, 0x95, 0x20, 0xa3, 0x11, 0x06, 0x20, 0xa3, 0x00, 0x00, 0x34, 0x30, - 0x20, 0x99, 0xac, 0x8e, 0x20, 0x39, 0xac, 0x0e, 0x27, 0xa0, 0x20, 0xa9, - 0x00, 0x40, 0x53, 0xa3, 0x10, 0x78, 0x42, 0xd4, 0x00, 0xc0, 0x40, 0xb5, - 0x27, 0x28, 0x25, 0x14, 0x82, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x00, - 0x20, 0x18, 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, 0xa2, 0x05, 0x20, 0x2a, - 0x60, 0x30, 0x23, 0x10, 0x82, 0x14, 0xa2, 0xa0, 0xac, 0x0e, 0x24, 0x14, - 0xa3, 0x8c, 0x00, 0x01, 0x00, 0x40, 0x40, 0xb0, 0xa2, 0x94, 0xff, 0x00, - 0x00, 0x78, 0x40, 0xb3, 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, 0xa2, 0x15, - 0x22, 0x22, 0x27, 0x98, 0x26, 0xa0, 0x20, 0xa9, 0x00, 0x40, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x84, - 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, 0x0f, 0x7e, 0x70, 0x80, 0xa0, 0x05, - 0x00, 0x40, 0x40, 0xe7, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, - 0xa0, 0x86, 0x00, 0x84, 0x00, 0xc0, 0x40, 0xe5, 0x20, 0x79, 0xac, 0x80, - 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x07, 0x00, 0xc0, 0x40, 0xe5, 0x78, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x40, 0xe5, 0x70, 0x87, 0x00, 0x01, 0x10, 0x78, - 0x42, 0x7b, 0x70, 0x8b, 0x00, 0x1a, 0x10, 0x78, 0x40, 0xe9, 0x00, 0x78, - 0x40, 0xe7, 0x10, 0x78, 0x42, 0x24, 0x0f, 0x7f, 0x00, 0x7c, 0x70, 0x8b, - 0x00, 0x1b, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, - 0xac, 0x80, 0x20, 0xa1, 0x02, 0x0b, 0x74, 0x80, 0xa4, 0x80, 0x00, 0x18, - 0xa0, 0x80, 0x00, 0x07, 0xa0, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, - 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x84, 0x10, 0x78, 0x42, 0x0b, 0x00, 0x7c, - 0x00, 0x7c, 0x00, 0x7c, 0x08, 0x7e, 0x09, 0x7e, 0x20, 0x29, 0xa7, 0x53, - 0x25, 0x2c, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x41, 0xac, 0x0e, 0x28, 0xa0, - 0x20, 0x99, 0xac, 0x8e, 0x53, 0xa3, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x11, - 0x00, 0x07, 0xd5, 0xd4, 0x00, 0x40, 0x41, 0x1a, 0x20, 0x11, 0x00, 0x00, - 0x28, 0x00, 0xa2, 0x00, 0x20, 0x0c, 0xa1, 0xa6, 0xff, 0xff, 0x00, 0xc0, - 0x41, 0x2c, 0xd5, 0xd4, 0x00, 0x40, 0x41, 0x27, 0x82, 0x10, 0x00, 0x78, - 0x41, 0x28, 0x82, 0x11, 0x00, 0xf0, 0x41, 0x1a, 0x00, 0x78, 0x41, 0x94, - 0x82, 0xff, 0x00, 0xc0, 0x41, 0x3e, 0xd5, 0xd4, 0x00, 0x40, 0x41, 0x38, - 0xa1, 0xa6, 0x3f, 0xff, 0x00, 0x40, 0x41, 0x24, 0x00, 0x78, 0x41, 0x3c, - 0xa1, 0xa6, 0x3f, 0xff, 0x00, 0x40, 0x41, 0x94, 0xa1, 0x8d, 0xc0, 0x00, - 0x20, 0xa9, 0x00, 0x10, 0x20, 0x19, 0x00, 0x01, 0xd5, 0xd4, 0x00, 0x40, - 0x41, 0x47, 0x20, 0x19, 0x00, 0x10, 0x21, 0x20, 0xd5, 0xd4, 0x00, 0x40, - 0x41, 0x4e, 0x84, 0x23, 0x00, 0x78, 0x41, 0x4f, 0x84, 0x24, 0x00, 0xc8, - 0x41, 0x5c, 0xd5, 0xd4, 0x00, 0x40, 0x41, 0x57, 0x83, 0x19, 0x00, 0x78, - 0x41, 0x58, 0x83, 0x18, 0x00, 0xf0, 0x41, 0x48, 0x00, 0x78, 0x41, 0x94, - 0x23, 0xa8, 0x20, 0x21, 0x00, 0x01, 0x84, 0x26, 0x84, 0x25, 0x00, 0xf0, - 0x41, 0x60, 0x23, 0x28, 0x85, 0x29, 0xa2, 0xbe, 0x00, 0x07, 0x00, 0x40, - 0x41, 0x74, 0x00, 0x7e, 0x20, 0x39, 0x00, 0x07, 0x22, 0x00, 0xa7, 0x3a, - 0x00, 0x7f, 0x27, 0xa8, 0xa5, 0xa8, 0x00, 0x10, 0x00, 0xf0, 0x41, 0x70, - 0x75, 0x52, 0xa5, 0xc8, 0x29, 0xc0, 0x29, 0x2c, 0xa5, 0xac, 0x00, 0xff, - 0x65, 0x32, 0x60, 0xe7, 0x00, 0x00, 0x65, 0xea, 0x70, 0x6f, 0x00, 0x00, - 0x75, 0x72, 0x20, 0x18, 0x23, 0x04, 0xa4, 0x05, 0x20, 0x1a, 0x70, 0x77, - 0x00, 0x01, 0x26, 0xa0, 0x28, 0x98, 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x78, 0x41, 0x9a, 0xa0, 0x06, 0x00, 0x78, 0x41, 0x9a, 0xa0, 0x06, - 0x10, 0x78, 0x13, 0x32, 0x09, 0x7f, 0x08, 0x7f, 0x00, 0x7c, 0x21, 0x18, - 0x20, 0x21, 0x00, 0x00, 0x20, 0x01, 0x00, 0x07, 0xa3, 0x9a, 0x00, 0x10, - 0x00, 0x48, 0x41, 0xaa, 0x84, 0x20, 0x80, 0x01, 0x00, 0x78, 0x41, 0xa2, - 0x21, 0x18, 0x84, 0xff, 0x00, 0x40, 0x41, 0xb3, 0xa3, 0x9a, 0x00, 0x10, - 0x84, 0x21, 0x00, 0xc0, 0x41, 0xae, 0x20, 0x21, 0x00, 0x01, 0x83, 0xff, - 0x00, 0x40, 0x41, 0xbc, 0x84, 0x23, 0x83, 0x19, 0x00, 0xc0, 0x41, 0xb8, - 0xa2, 0x38, 0x27, 0x04, 0xa4, 0x2c, 0x00, 0xc0, 0x41, 0xd4, 0xa4, 0x05, - 0x20, 0x3a, 0x71, 0x52, 0xa1, 0xa0, 0x29, 0xc0, 0x24, 0x2c, 0xa5, 0xac, - 0x00, 0xff, 0x65, 0x32, 0x60, 0xe7, 0x00, 0x00, 0x65, 0xea, 0x70, 0x6f, - 0x00, 0x00, 0x75, 0x72, 0x70, 0x77, 0x00, 0x01, 0xa0, 0x84, 0x00, 0x00, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x70, 0x7b, 0x00, 0x00, - 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x01, 0x00, 0x02, - 0x10, 0x78, 0x5a, 0xe6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x71, 0x01, 0x40, - 0x10, 0x78, 0x6e, 0x0f, 0x70, 0x04, 0xa0, 0x84, 0x40, 0x00, 0x00, 0x40, - 0x41, 0xf1, 0x70, 0x03, 0x10, 0x00, 0x70, 0x03, 0x00, 0x00, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa7, 0x22, 0x20, 0x73, 0x00, 0x00, - 0x78, 0x40, 0x02, 0x7e, 0x01, 0x7e, 0x20, 0x09, 0x00, 0xf7, 0x10, 0x78, - 0x42, 0xa1, 0x01, 0x7f, 0xa0, 0x94, 0x00, 0x10, 0xa2, 0x85, 0x00, 0x80, - 0x78, 0x42, 0x7a, 0x42, 0x02, 0x7f, 0x12, 0x7f, 0x0f, 0x7f, 0x0e, 0x7f, - 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x11, 0xa9, 0xbb, - 0x20, 0x13, 0x00, 0x00, 0x70, 0x83, 0x00, 0x00, 0x12, 0x7f, 0x20, 0xe1, - 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x10, 0x78, - 0x6e, 0x06, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, - 0x5a, 0xdd, 0x00, 0x7c, 0x01, 0x7e, 0x02, 0x7e, 0x0c, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x11, 0x00, 0x03, 0x10, 0x78, 0x70, 0xe0, - 0x20, 0x11, 0x00, 0x02, 0x10, 0x78, 0x70, 0xea, 0x10, 0x78, 0x6f, 0xc4, - 0x03, 0x7e, 0x20, 0x19, 0x00, 0x00, 0x10, 0x78, 0x70, 0x58, 0x03, 0x7f, - 0x20, 0x09, 0x00, 0xf7, 0x10, 0x78, 0x42, 0xa1, 0x20, 0x61, 0xa9, 0xc4, - 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x20, 0x61, 0xa7, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, 0x42, 0x59, - 0x10, 0x78, 0x5a, 0x38, 0x12, 0x7f, 0x0c, 0x7f, 0x02, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x5a, 0xe6, 0x20, 0x71, 0x01, 0x00, - 0x10, 0x78, 0x6e, 0x0f, 0x20, 0x71, 0x01, 0x40, 0x70, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x00, 0x40, 0x42, 0x71, 0x70, 0x03, 0x10, 0x00, 0x70, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x24, 0xe8, 0x10, 0x78, - 0x42, 0x24, 0x12, 0x7f, 0x00, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0xa1, 0xad, 0xc0, 0x20, 0x99, 0xac, 0x8e, 0x33, 0x04, - 0x80, 0x07, 0x20, 0xa2, 0x93, 0x98, 0x94, 0xa0, 0x00, 0xf0, 0x42, 0x81, - 0x00, 0x7c, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, - 0xac, 0x00, 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0c, 0x53, 0xa6, - 0x00, 0x7c, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, - 0xac, 0x80, 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0c, 0x53, 0xa6, - 0x00, 0x7c, 0x0c, 0x7e, 0x00, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x81, 0x0f, - 0x20, 0x01, 0xa7, 0x2f, 0x20, 0x04, 0xa0, 0x05, 0x00, 0xc0, 0x42, 0xb2, - 0x60, 0x30, 0xa0, 0x84, 0x00, 0xff, 0xa1, 0x05, 0x00, 0x78, 0x42, 0xb4, - 0xa1, 0x85, 0x00, 0xf7, 0x60, 0x4a, 0x00, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, - 0x01, 0x7e, 0x04, 0x7e, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, - 0x00, 0x40, 0x42, 0xcb, 0xa0, 0x06, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2a, - 0x10, 0x78, 0xa2, 0x2d, 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x0c, 0xc1, 0x95, - 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, - 0x28, 0x4f, 0x04, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x00, 0x7e, 0x20, 0x01, - 0xa7, 0x0c, 0x20, 0x04, 0xd0, 0x9c, 0x00, 0x40, 0x42, 0xdb, 0x00, 0x7f, - 0x00, 0x7c, 0x00, 0x7e, 0x01, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x01, 0x01, 0x01, 0x20, 0x0c, 0xa1, 0x8d, 0x00, 0x06, 0x21, 0x02, - 0x12, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x15, 0x7e, 0x20, 0xa9, - 0x00, 0xff, 0x20, 0x09, 0xa8, 0x35, 0xa0, 0x06, 0x20, 0x0a, 0x81, 0x08, - 0x00, 0xf0, 0x42, 0xf2, 0x15, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x03, 0x7e, - 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x20, 0x69, 0xa7, 0x52, 0xa0, 0x06, - 0x60, 0x02, 0x60, 0x07, 0x07, 0x07, 0x60, 0x0a, 0x60, 0x0e, 0x60, 0x12, - 0xa1, 0x98, 0x29, 0xc0, 0x23, 0x1c, 0xa3, 0x9c, 0x00, 0xff, 0x63, 0x16, - 0x20, 0xa9, 0x00, 0x04, 0xac, 0x98, 0x00, 0x06, 0x23, 0xa0, 0x40, 0xa4, - 0x20, 0xa9, 0x00, 0x04, 0xac, 0x98, 0x00, 0x0a, 0x23, 0xa0, 0x40, 0xa4, - 0x60, 0x3e, 0x60, 0x42, 0x60, 0x4e, 0x60, 0x52, 0x60, 0x56, 0x60, 0x5a, - 0x60, 0x5e, 0x60, 0x62, 0x60, 0x66, 0x60, 0x6a, 0x60, 0x6e, 0x60, 0x72, - 0x60, 0x76, 0x60, 0x7a, 0x60, 0x7e, 0x60, 0x82, 0x60, 0x86, 0x60, 0x8a, - 0x60, 0x8e, 0x60, 0x92, 0x60, 0x96, 0x60, 0x9a, 0x60, 0x9e, 0x60, 0xae, - 0x61, 0xa2, 0x0d, 0x7e, 0x60, 0xa4, 0xa0, 0x6d, 0x00, 0x40, 0x43, 0x38, - 0x10, 0x78, 0x13, 0xa4, 0x60, 0xa7, 0x00, 0x00, 0x60, 0xa8, 0xa0, 0x6d, - 0x00, 0x40, 0x43, 0x40, 0x10, 0x78, 0x13, 0xa4, 0x60, 0xab, 0x00, 0x00, - 0x0d, 0x7f, 0xa0, 0x06, 0x60, 0x4a, 0x68, 0x10, 0x60, 0x3a, 0x68, 0x0c, - 0x60, 0x46, 0x68, 0x14, 0xa0, 0x84, 0x00, 0xff, 0x60, 0x42, 0x14, 0x7f, - 0x13, 0x7f, 0x15, 0x7f, 0x03, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x69, 0x44, 0x6e, 0x48, 0xa6, 0x84, 0x3f, 0xff, - 0xa0, 0x82, 0x40, 0x00, 0x00, 0xc8, 0x44, 0x24, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x82, 0x00, 0xff, 0x00, 0xc8, 0x44, 0x2a, 0x20, 0x01, - 0xa7, 0x0c, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0x00, 0x40, 0x43, 0x85, - 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x04, 0xd0, 0x84, 0x00, 0xc0, 0x44, 0x05, - 0xa1, 0x88, 0xa8, 0x35, 0x21, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x44, 0x05, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, 0x00, 0x06, 0x00, 0xc0, - 0x44, 0x05, 0x60, 0x00, 0xd0, 0xc4, 0x00, 0x40, 0x44, 0x05, 0x00, 0x78, - 0x43, 0x92, 0xa1, 0x88, 0xa8, 0x35, 0x21, 0x04, 0xa0, 0x65, 0x00, 0x40, - 0x43, 0xe9, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, 0x00, 0x06, - 0x00, 0xc0, 0x43, 0xef, 0x60, 0xa4, 0xa0, 0x0d, 0x00, 0x40, 0x43, 0x9a, - 0x10, 0x78, 0x48, 0x17, 0x00, 0x40, 0x43, 0xe3, 0x60, 0xa8, 0xa0, 0x0d, - 0x00, 0x40, 0x43, 0xb4, 0x10, 0x78, 0x48, 0x6a, 0x00, 0xc0, 0x43, 0xb4, - 0x69, 0x4c, 0xd1, 0xfc, 0x00, 0xc0, 0x43, 0xaa, 0x10, 0x78, 0x44, 0xdf, - 0x00, 0x78, 0x43, 0xde, 0x10, 0x78, 0x44, 0x84, 0x69, 0x4c, 0xd1, 0xec, - 0x00, 0xc0, 0x43, 0xde, 0x10, 0x78, 0x46, 0xd6, 0x00, 0x78, 0x43, 0xde, - 0x69, 0x4c, 0xa1, 0x84, 0xa0, 0x00, 0x00, 0x40, 0x43, 0xce, 0xd1, 0xec, - 0x00, 0x40, 0x43, 0xc7, 0xd1, 0xfc, 0x00, 0x40, 0x43, 0xc3, 0x10, 0x78, - 0x46, 0xe7, 0x00, 0x78, 0x43, 0xca, 0x10, 0x78, 0x46, 0xe7, 0x00, 0x78, - 0x43, 0xce, 0xd1, 0xfc, 0x00, 0x40, 0x43, 0xce, 0x10, 0x78, 0x44, 0x84, - 0x00, 0x78, 0x43, 0xde, 0x60, 0x50, 0xa0, 0x0d, 0x00, 0x40, 0x43, 0xd9, - 0x2d, 0x00, 0x20, 0x0a, 0x68, 0x03, 0x00, 0x00, 0x60, 0x52, 0x00, 0x78, - 0x43, 0xde, 0x2d, 0x00, 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, 0x00, 0x00, - 0x10, 0x78, 0x5d, 0xa9, 0xa0, 0x06, 0x12, 0x7f, 0x00, 0x7c, 0x20, 0x01, - 0x00, 0x05, 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x44, 0x2e, 0x20, 0x01, - 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x44, 0x2e, 0xa0, 0x82, - 0x00, 0x06, 0x00, 0xc8, 0x44, 0x05, 0x60, 0xa0, 0xd0, 0xbc, 0x00, 0xc0, - 0x44, 0x01, 0x61, 0x00, 0xd1, 0xfc, 0x00, 0x40, 0x43, 0x92, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, 0x00, 0x78, 0x44, 0x2e, 0x20, 0x01, - 0x00, 0x28, 0x00, 0x78, 0x44, 0x20, 0x20, 0x09, 0xa7, 0x0c, 0x21, 0x0c, - 0xd1, 0x8c, 0x00, 0x40, 0x44, 0x0f, 0x20, 0x01, 0x00, 0x04, 0x00, 0x78, - 0x44, 0x20, 0xd1, 0x84, 0x00, 0x40, 0x44, 0x16, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x78, 0x44, 0x20, 0x20, 0x01, 0x00, 0x29, 0x61, 0x00, 0xd1, 0xfc, - 0x00, 0x40, 0x44, 0x20, 0x20, 0x09, 0x10, 0x00, 0x00, 0x78, 0x44, 0x2e, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x44, 0x2e, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x44, 0x2e, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x00, 0x00, 0xa0, 0x05, 0x12, 0x7f, 0x00, 0x7c, 0x69, 0x44, - 0x6e, 0x48, 0xa6, 0x84, 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, 0x00, 0xc8, - 0x44, 0x7e, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x82, 0x00, 0xff, - 0x00, 0xc8, 0x44, 0x64, 0xa1, 0x88, 0xa8, 0x35, 0x21, 0x04, 0xa0, 0x65, - 0x00, 0x40, 0x44, 0x64, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, - 0x00, 0x06, 0x00, 0xc0, 0x44, 0x6a, 0x68, 0x4c, 0xd0, 0xec, 0x00, 0x40, - 0x44, 0x57, 0x10, 0x78, 0x46, 0xe7, 0x10, 0x78, 0x44, 0x84, 0x00, 0x78, - 0x44, 0x5f, 0x10, 0x78, 0x44, 0x84, 0x68, 0x4c, 0xd0, 0xfc, 0x00, 0x40, - 0x44, 0x5f, 0x10, 0x78, 0x46, 0xd6, 0x10, 0x78, 0x47, 0x2f, 0xa0, 0x06, - 0x00, 0x78, 0x44, 0x82, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, - 0x00, 0x78, 0x44, 0x82, 0xa0, 0x82, 0x00, 0x06, 0x00, 0xc8, 0x44, 0x78, - 0x61, 0x00, 0xd1, 0xfc, 0x00, 0x40, 0x44, 0x4d, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x10, 0x00, 0x00, 0x78, 0x44, 0x82, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x44, 0x82, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x50, 0xa0, 0x0d, 0x00, 0x40, 0x44, 0x92, 0x2d, 0x00, - 0x20, 0x0a, 0x68, 0x03, 0x00, 0x00, 0x60, 0x52, 0x12, 0x7f, 0x00, 0x7c, - 0x2d, 0x00, 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, 0x00, 0x00, 0x00, 0x78, - 0x44, 0x90, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0x4c, 0xa0, 0x05, - 0x00, 0x40, 0x44, 0xaf, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x04, - 0xa0, 0x86, 0x00, 0x02, 0x00, 0x40, 0x44, 0xb6, 0x0e, 0x7f, 0x60, 0x4c, - 0x68, 0x02, 0x2d, 0x00, 0x60, 0x4e, 0x12, 0x7f, 0x00, 0x7c, 0x2d, 0x00, - 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, 0x00, 0x00, 0x00, 0x78, 0x44, 0xad, - 0x70, 0x1c, 0xac, 0x06, 0x00, 0xc0, 0x44, 0xa8, 0x60, 0x4c, 0x20, 0x70, - 0x70, 0x00, 0x68, 0x02, 0x2d, 0x00, 0x70, 0x02, 0x0e, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0x4c, 0xa0, 0x6d, - 0x00, 0x40, 0x44, 0xd1, 0x68, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0x44, 0xcf, - 0x60, 0x52, 0x60, 0x4e, 0xad, 0x05, 0x12, 0x7f, 0x00, 0x7c, 0x60, 0x4c, - 0xa0, 0x6d, 0x00, 0x40, 0x44, 0xde, 0x68, 0x00, 0xa0, 0x05, 0x00, 0xc0, - 0x44, 0xdc, 0x60, 0x52, 0x60, 0x4e, 0xad, 0x05, 0x00, 0x7c, 0x68, 0x03, - 0x00, 0x00, 0x60, 0x84, 0xa0, 0x0d, 0x00, 0x40, 0x44, 0xe9, 0x2d, 0x00, - 0x20, 0x0a, 0x60, 0x86, 0x00, 0x7c, 0x2d, 0x00, 0x60, 0x86, 0x60, 0x82, - 0x00, 0x78, 0x44, 0xe8, 0x12, 0x7e, 0x0c, 0x7e, 0x02, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x62, 0x18, 0x22, 0x60, 0x62, 0x00, 0xa0, 0x05, 0x00, 0x40, - 0x44, 0xfc, 0xc2, 0x85, 0x00, 0x78, 0x44, 0xfd, 0xc2, 0x84, 0x62, 0x02, - 0x02, 0x7f, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x0c, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x62, 0x18, 0x22, 0x60, 0x62, 0x04, 0x00, 0x7e, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x45, 0x21, 0x60, 0x9c, 0xd0, 0xac, - 0x00, 0x40, 0x45, 0x21, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, - 0x00, 0x40, 0x45, 0x21, 0xa2, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0x86, - 0x00, 0x07, 0x00, 0xc0, 0x45, 0x21, 0x20, 0x11, 0x06, 0x00, 0x00, 0x7f, - 0xa2, 0x94, 0xff, 0x00, 0xa2, 0x15, 0x62, 0x06, 0x00, 0x7e, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0xc0, 0x45, 0x31, 0x62, 0x90, 0x82, 0xff, 0x00, 0xc0, - 0x45, 0x31, 0x10, 0x78, 0x13, 0x32, 0x00, 0x7f, 0x0c, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x12, 0x7e, 0x0c, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x62, 0x18, - 0x22, 0x60, 0x62, 0x04, 0x00, 0x7e, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, - 0x45, 0x53, 0x60, 0x9c, 0xd0, 0xa4, 0x00, 0x40, 0x45, 0x53, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x00, 0xc0, 0x45, 0x53, 0xa2, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x07, 0x00, 0xc0, 0x45, 0x53, 0x20, 0x11, - 0x00, 0x06, 0x00, 0x7f, 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, 0xa2, 0x15, - 0x62, 0x06, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0xa1, 0x82, - 0x00, 0xff, 0x00, 0x48, 0x45, 0x65, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, - 0x45, 0x7d, 0xa1, 0x90, 0xa8, 0x35, 0x22, 0x04, 0xa0, 0x65, 0x00, 0xc0, - 0x45, 0x7c, 0x01, 0x7e, 0x0d, 0x7e, 0x10, 0x78, 0x13, 0x70, 0x2d, 0x60, - 0x0d, 0x7f, 0x01, 0x7f, 0x00, 0x40, 0x45, 0x61, 0x2c, 0x00, 0x20, 0x12, - 0x60, 0xa7, 0x00, 0x00, 0x60, 0xab, 0x00, 0x00, 0x10, 0x78, 0x42, 0xf8, - 0xa0, 0x06, 0x02, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x02, 0x7e, 0xa1, 0x82, 0x00, 0xff, 0x00, 0x48, 0x45, 0x8b, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x45, 0xc1, 0x0d, 0x7e, 0xa1, 0x90, 0xa8, 0x35, - 0x22, 0x04, 0xa0, 0x6d, 0x00, 0x40, 0x45, 0xbf, 0x20, 0x13, 0x00, 0x00, - 0x0d, 0x7e, 0x0c, 0x7e, 0x2d, 0x60, 0x60, 0xa4, 0xa0, 0x6d, 0x00, 0x40, - 0x45, 0x9d, 0x10, 0x78, 0x13, 0xa4, 0x60, 0xa8, 0xa0, 0x6d, 0x00, 0x40, - 0x45, 0xa3, 0x10, 0x78, 0x13, 0xa4, 0x0c, 0x7f, 0x0d, 0x7f, 0x0d, 0x7e, - 0x0c, 0x7e, 0x68, 0xac, 0x20, 0x60, 0x8c, 0xff, 0x00, 0x40, 0x45, 0xbb, - 0x60, 0x0c, 0x00, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x45, 0xb6, 0x10, 0x78, 0x13, 0xb4, 0x10, 0x78, 0x77, 0x2d, - 0x0c, 0x7f, 0x00, 0x78, 0x45, 0xa9, 0x0c, 0x7f, 0x0d, 0x7f, 0x10, 0x78, - 0x13, 0xa4, 0x0d, 0x7f, 0xa0, 0x06, 0x02, 0x7f, 0x12, 0x7f, 0x00, 0x7c, - 0x01, 0x7e, 0xa1, 0x82, 0x00, 0xff, 0x00, 0x48, 0x45, 0xcd, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x45, 0xd4, 0xa1, 0x88, 0xa8, 0x35, 0x21, 0x04, - 0xa0, 0x65, 0x00, 0x40, 0x45, 0xc9, 0xa0, 0x06, 0x01, 0x7f, 0x00, 0x7c, - 0x0d, 0x7e, 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x60, 0x0b, 0x00, 0x00, - 0x60, 0x0f, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x8c, 0x60, 0x02, 0x20, 0x69, - 0xac, 0x8e, 0x68, 0x08, 0x60, 0x5e, 0x68, 0x10, 0x60, 0x62, 0x61, 0x38, - 0xa1, 0x0a, 0x00, 0x48, 0x45, 0xec, 0x60, 0x3a, 0x68, 0x14, 0x60, 0x66, - 0x20, 0x99, 0xac, 0x96, 0xac, 0x88, 0x00, 0x0a, 0x21, 0xa0, 0x20, 0xa9, - 0x00, 0x04, 0x53, 0xa3, 0x20, 0x99, 0xac, 0x9a, 0xac, 0x88, 0x00, 0x06, - 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x20, 0x69, 0xac, 0xae, - 0x68, 0x08, 0x60, 0x6a, 0x69, 0x0c, 0x61, 0x6e, 0x68, 0x10, 0x60, 0x72, - 0x68, 0x18, 0x60, 0x76, 0x60, 0xa0, 0xa0, 0x86, 0x00, 0x7e, 0x00, 0xc0, - 0x46, 0x11, 0x20, 0x69, 0xac, 0x8e, 0x69, 0x0c, 0x61, 0x6e, 0xa1, 0x82, - 0x02, 0x11, 0x00, 0xc8, 0x46, 0x19, 0x20, 0x09, 0x00, 0x08, 0x00, 0x78, - 0x46, 0x43, 0xa1, 0x82, 0x02, 0x59, 0x00, 0xc8, 0x46, 0x21, 0x20, 0x09, - 0x00, 0x07, 0x00, 0x78, 0x46, 0x43, 0xa1, 0x82, 0x02, 0xc1, 0x00, 0xc8, - 0x46, 0x29, 0x20, 0x09, 0x00, 0x06, 0x00, 0x78, 0x46, 0x43, 0xa1, 0x82, - 0x03, 0x49, 0x00, 0xc8, 0x46, 0x31, 0x20, 0x09, 0x00, 0x05, 0x00, 0x78, - 0x46, 0x43, 0xa1, 0x82, 0x04, 0x21, 0x00, 0xc8, 0x46, 0x39, 0x20, 0x09, - 0x00, 0x04, 0x00, 0x78, 0x46, 0x43, 0xa1, 0x82, 0x05, 0x81, 0x00, 0xc8, - 0x46, 0x41, 0x20, 0x09, 0x00, 0x03, 0x00, 0x78, 0x46, 0x43, 0x20, 0x09, - 0x00, 0x02, 0x61, 0x92, 0x14, 0x7f, 0x13, 0x7f, 0x15, 0x7f, 0x0d, 0x7f, - 0x00, 0x7c, 0x01, 0x7e, 0x02, 0x7e, 0x0e, 0x7e, 0x20, 0x71, 0xac, 0x8d, - 0x2e, 0x04, 0x68, 0x96, 0x20, 0x71, 0xac, 0x8e, 0x70, 0x04, 0x68, 0x9a, - 0x70, 0x1c, 0x68, 0x9e, 0x6a, 0x00, 0x20, 0x09, 0xa7, 0x72, 0x21, 0x0c, - 0xd0, 0xbc, 0x00, 0x40, 0x46, 0x63, 0xd1, 0xec, 0x00, 0x40, 0x46, 0x63, - 0xc2, 0xad, 0x00, 0x78, 0x46, 0x64, 0xc2, 0xac, 0xd0, 0xc4, 0x00, 0x40, - 0x46, 0x6d, 0xd1, 0xe4, 0x00, 0x40, 0x46, 0x6d, 0xc2, 0xbd, 0x00, 0x78, - 0x46, 0x6e, 0xc2, 0xbc, 0x6a, 0x02, 0x0e, 0x7f, 0x02, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa4, - 0xa0, 0x6d, 0x00, 0x40, 0x46, 0x97, 0x69, 0x00, 0x81, 0xff, 0x00, 0xc0, - 0x46, 0xab, 0x6a, 0x04, 0xa2, 0x82, 0x00, 0x10, 0x00, 0xc8, 0x46, 0xb0, - 0xad, 0x88, 0x00, 0x04, 0x20, 0xa9, 0x00, 0x10, 0x21, 0x04, 0xa0, 0x86, - 0xff, 0xff, 0x00, 0x40, 0x46, 0x92, 0x81, 0x08, 0x00, 0xf0, 0x46, 0x88, - 0x10, 0x78, 0x13, 0x32, 0x26, 0x0a, 0x82, 0x10, 0x6a, 0x06, 0x00, 0x78, - 0x46, 0xab, 0x10, 0x78, 0x13, 0x8b, 0x00, 0x40, 0x46, 0xb0, 0x2d, 0x00, - 0x60, 0xa6, 0x68, 0x03, 0x00, 0x00, 0xad, 0x88, 0x00, 0x04, 0x20, 0xa9, - 0x00, 0x10, 0x20, 0x0b, 0xff, 0xff, 0x81, 0x08, 0x00, 0xf0, 0x46, 0xa3, - 0x68, 0x07, 0x00, 0x01, 0x6e, 0x12, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, - 0x0d, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x46, 0xad, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x0d, 0x7e, 0x60, 0xa4, 0xa0, 0x0d, 0x00, 0x40, - 0x46, 0xd3, 0x21, 0x68, 0x68, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0x46, 0xcf, - 0x10, 0x78, 0x48, 0x17, 0x00, 0xc0, 0x46, 0xd3, 0x20, 0x0b, 0xff, 0xff, - 0x68, 0x04, 0xa0, 0x8a, 0x00, 0x02, 0x00, 0x48, 0x46, 0xcf, 0x80, 0x01, - 0x68, 0x06, 0x00, 0x78, 0x46, 0xd3, 0x10, 0x78, 0x13, 0xa4, 0x60, 0xa7, - 0x00, 0x00, 0x0d, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x48, 0x7f, 0x00, 0x78, 0x46, 0xdf, 0x10, 0x78, - 0x44, 0x84, 0x10, 0x78, 0x47, 0x75, 0x00, 0xc0, 0x46, 0xdd, 0x10, 0x78, - 0x47, 0x2f, 0x12, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x60, 0xa8, 0xa0, 0x6d, 0x00, 0x40, 0x47, 0x0b, 0x69, 0x50, - 0x81, 0xff, 0x00, 0xc0, 0x47, 0x1f, 0x6a, 0x54, 0xa2, 0x82, 0x00, 0x10, - 0x00, 0xc8, 0x47, 0x2c, 0xad, 0x88, 0x00, 0x18, 0x20, 0xa9, 0x00, 0x10, - 0x21, 0x04, 0xa0, 0x86, 0xff, 0xff, 0x00, 0x40, 0x47, 0x06, 0x81, 0x08, - 0x00, 0xf0, 0x46, 0xfc, 0x10, 0x78, 0x13, 0x32, 0x26, 0x0a, 0x82, 0x10, - 0x6a, 0x56, 0x00, 0x78, 0x47, 0x1f, 0x10, 0x78, 0x13, 0x8b, 0x00, 0x40, - 0x47, 0x2c, 0x2d, 0x00, 0x60, 0xaa, 0x68, 0x53, 0x00, 0x00, 0xad, 0x88, - 0x00, 0x18, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x0b, 0xff, 0xff, 0x81, 0x08, - 0x00, 0xf0, 0x47, 0x17, 0x68, 0x57, 0x00, 0x01, 0x6e, 0x62, 0x00, 0x78, - 0x47, 0x23, 0x10, 0x78, 0x44, 0xdf, 0x10, 0x78, 0x47, 0x39, 0x00, 0xc0, - 0x47, 0x21, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x78, 0x47, 0x29, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x10, 0x78, 0x5d, 0xa9, 0x12, 0x7f, 0x00, 0x7c, 0xa0, 0x1e, 0x00, 0x78, - 0x47, 0x3b, 0x20, 0x19, 0x00, 0x01, 0xa0, 0x0e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x4c, 0x20, 0x68, 0x60, 0x00, 0xd0, 0xdc, 0x00, 0xc0, - 0x47, 0x59, 0x8d, 0xff, 0x00, 0x40, 0x47, 0x70, 0x83, 0xff, 0x00, 0x40, - 0x47, 0x51, 0x68, 0x48, 0xa6, 0x06, 0x00, 0x40, 0x47, 0x5e, 0x00, 0x78, - 0x47, 0x59, 0x68, 0x3c, 0xa4, 0x06, 0x00, 0xc0, 0x47, 0x59, 0x68, 0x40, - 0xa5, 0x06, 0x00, 0x40, 0x47, 0x5e, 0x2d, 0x08, 0x68, 0x00, 0x20, 0x68, - 0x00, 0x78, 0x47, 0x45, 0x10, 0x78, 0x72, 0x33, 0x6a, 0x00, 0x60, 0x4c, - 0xad, 0x06, 0x00, 0xc0, 0x47, 0x68, 0x62, 0x4e, 0x00, 0x78, 0x47, 0x6b, - 0xa1, 0x80, 0x00, 0x00, 0x22, 0x02, 0x82, 0xff, 0x00, 0xc0, 0x47, 0x70, - 0x61, 0x52, 0x8d, 0xff, 0x12, 0x7f, 0x00, 0x7c, 0xa0, 0x1e, 0x00, 0x78, - 0x47, 0x77, 0x20, 0x19, 0x00, 0x01, 0xa0, 0x0e, 0x60, 0x80, 0x20, 0x68, - 0x8d, 0xff, 0x00, 0x40, 0x47, 0xa3, 0x83, 0xff, 0x00, 0x40, 0x47, 0x86, - 0x68, 0x48, 0xa6, 0x06, 0x00, 0x40, 0x47, 0x93, 0x00, 0x78, 0x47, 0x8e, - 0x68, 0x3c, 0xa4, 0x06, 0x00, 0xc0, 0x47, 0x8e, 0x68, 0x40, 0xa5, 0x06, - 0x00, 0x40, 0x47, 0x93, 0x2d, 0x08, 0x68, 0x00, 0x20, 0x68, 0x00, 0x78, - 0x47, 0x7a, 0x6a, 0x00, 0x60, 0x80, 0xad, 0x06, 0x00, 0xc0, 0x47, 0x9b, - 0x62, 0x82, 0x00, 0x78, 0x47, 0x9e, 0xa1, 0x80, 0x00, 0x00, 0x22, 0x02, - 0x82, 0xff, 0x00, 0xc0, 0x47, 0xa3, 0x61, 0x86, 0x8d, 0xff, 0x00, 0x7c, - 0xa0, 0x16, 0x10, 0x78, 0x48, 0x10, 0x00, 0xc0, 0x47, 0xab, 0x20, 0x11, - 0x00, 0x01, 0x10, 0x78, 0x48, 0x63, 0x00, 0xc0, 0x47, 0xb1, 0xa2, 0x95, - 0x00, 0x02, 0x00, 0x7c, 0x10, 0x78, 0x48, 0x9b, 0x00, 0x40, 0x47, 0xba, - 0x10, 0x78, 0x8d, 0xda, 0x00, 0x78, 0x47, 0xbc, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x7c, 0x10, 0x78, 0x48, 0x9b, 0x00, 0x40, 0x47, 0xc5, 0x10, 0x78, - 0x8d, 0x72, 0x00, 0x78, 0x47, 0xc7, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, - 0x10, 0x78, 0x48, 0x9b, 0x00, 0x40, 0x47, 0xd0, 0x10, 0x78, 0x8d, 0xbc, - 0x00, 0x78, 0x47, 0xd2, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0x10, 0x78, - 0x48, 0x9b, 0x00, 0x40, 0x47, 0xdb, 0x10, 0x78, 0x8d, 0x8e, 0x00, 0x78, - 0x47, 0xdd, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0x10, 0x78, 0x48, 0x9b, - 0x00, 0x40, 0x47, 0xe6, 0x10, 0x78, 0x8d, 0xf8, 0x00, 0x78, 0x47, 0xe8, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0x12, 0x7e, 0x00, 0x7e, 0x0d, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x80, 0xa0, 0x6d, 0x00, 0x40, 0x48, 0x08, - 0x68, 0x00, 0x00, 0x7e, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x10, 0x78, 0x8f, 0x8d, 0x00, 0x7e, 0x60, 0x00, 0xd0, 0xfc, - 0x00, 0x40, 0x48, 0x02, 0x10, 0x78, 0xa4, 0xfd, 0x00, 0x7f, 0x10, 0x78, - 0x4a, 0x73, 0x00, 0x7f, 0x00, 0x78, 0x47, 0xef, 0x60, 0x83, 0x00, 0x00, - 0x60, 0x87, 0x00, 0x00, 0x0d, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, - 0x60, 0xa4, 0xa0, 0x0d, 0x00, 0xc0, 0x48, 0x17, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x7c, 0x0e, 0x7e, 0x21, 0x70, 0x70, 0x00, 0xa0, 0x05, 0x00, 0xc0, - 0x48, 0x2c, 0x20, 0xa9, 0x00, 0x10, 0xae, 0x88, 0x00, 0x04, 0x21, 0x04, - 0xa6, 0x06, 0x00, 0x40, 0x48, 0x2c, 0x81, 0x08, 0x00, 0xf0, 0x48, 0x21, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x48, 0x2d, 0xa0, 0x06, 0x0e, 0x7f, - 0x00, 0x7c, 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa4, - 0xa0, 0x6d, 0x00, 0xc0, 0x48, 0x3d, 0x10, 0x78, 0x13, 0x8b, 0x00, 0x40, - 0x48, 0x4f, 0x2d, 0x00, 0x60, 0xa6, 0x68, 0x03, 0x00, 0x01, 0x68, 0x07, - 0x00, 0x00, 0xad, 0x88, 0x00, 0x04, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x0b, - 0xff, 0xff, 0x81, 0x08, 0x00, 0xf0, 0x48, 0x45, 0xa0, 0x85, 0x00, 0x01, - 0x12, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x48, 0x4c, - 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa4, 0xa0, 0x6d, - 0x00, 0x40, 0x48, 0x60, 0x60, 0xa7, 0x00, 0x00, 0x10, 0x78, 0x13, 0xa4, - 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x60, 0xa8, - 0xa0, 0x0d, 0x00, 0xc0, 0x48, 0x6a, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, - 0x0e, 0x7e, 0x21, 0x70, 0x70, 0x50, 0xa0, 0x05, 0x00, 0xc0, 0x48, 0x7d, - 0x20, 0xa9, 0x00, 0x10, 0xae, 0x88, 0x00, 0x18, 0x21, 0x04, 0xa6, 0x06, - 0x00, 0x40, 0x48, 0x7d, 0x81, 0x08, 0x00, 0xf0, 0x48, 0x74, 0xa0, 0x85, - 0x00, 0x01, 0x0e, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x10, 0x78, 0x48, 0x63, 0x00, 0xc0, 0x48, 0x99, 0x20, 0x0b, 0xff, 0xff, - 0x0d, 0x7e, 0x60, 0xa8, 0x20, 0x68, 0x68, 0x54, 0xa0, 0x8a, 0x00, 0x02, - 0x00, 0x48, 0x48, 0x94, 0x80, 0x01, 0x68, 0x56, 0x00, 0x78, 0x48, 0x98, - 0x10, 0x78, 0x13, 0xa4, 0x60, 0xab, 0x00, 0x00, 0x0d, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x60, 0x9c, 0xd0, 0xa4, 0x00, 0x7c, 0x0f, 0x7e, 0x71, 0xb0, - 0x81, 0xff, 0x00, 0xc0, 0x48, 0xb9, 0x71, 0xcc, 0xd1, 0x9c, 0x00, 0x40, - 0x48, 0xb9, 0x20, 0x01, 0x00, 0x7e, 0xa0, 0x80, 0xa8, 0x35, 0x20, 0x04, - 0xa0, 0x7d, 0x00, 0x40, 0x48, 0xb9, 0x78, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x48, 0xb9, 0x78, 0x00, 0xc0, 0xed, - 0x78, 0x02, 0x20, 0x79, 0xa7, 0x52, 0x78, 0x04, 0xd0, 0xa4, 0x00, 0x40, - 0x48, 0xdf, 0x15, 0x7e, 0x0c, 0x7e, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, - 0x00, 0x00, 0x01, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x48, 0xd9, - 0x60, 0x04, 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0x96, 0x00, 0x04, - 0x00, 0x40, 0x48, 0xd6, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x48, 0xd9, - 0x60, 0x00, 0xc0, 0xed, 0x60, 0x02, 0x01, 0x7f, 0x81, 0x08, 0x00, 0xf0, - 0x48, 0xc5, 0x0c, 0x7f, 0x15, 0x7f, 0x10, 0x78, 0x49, 0x67, 0x00, 0x40, - 0x48, 0xe8, 0x20, 0x01, 0xa9, 0xa1, 0x20, 0x0c, 0x00, 0x78, 0x48, 0xf0, - 0x20, 0x79, 0xa7, 0x52, 0x78, 0x04, 0xd0, 0xa4, 0x00, 0x40, 0x48, 0xf4, - 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x48, 0xf6, 0x10, 0x78, 0x5a, 0xdd, - 0x0f, 0x7f, 0x00, 0x7c, 0x20, 0x11, 0x48, 0xf6, 0x10, 0x78, 0x5a, 0x45, - 0x10, 0x78, 0x49, 0x67, 0x00, 0x40, 0x49, 0x1e, 0x20, 0x01, 0xa8, 0xb3, - 0x20, 0x04, 0xa0, 0x80, 0x00, 0x00, 0x20, 0x0c, 0xc1, 0xec, 0x21, 0x02, - 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x00, 0x40, 0x49, 0x12, - 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x48, 0xf6, 0x10, 0x78, 0x5a, 0xdd, - 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x70, 0x6f, 0x00, 0x00, 0x70, 0x73, - 0x00, 0x00, 0x10, 0x78, 0x26, 0x77, 0x0e, 0x7f, 0x00, 0x78, 0x49, 0x56, - 0x15, 0x7e, 0x0c, 0x7e, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, - 0x01, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x49, 0x50, 0x60, 0x00, - 0xd0, 0xec, 0x00, 0x40, 0x49, 0x50, 0x04, 0x7e, 0x62, 0xa0, 0xa2, 0x94, - 0x00, 0xff, 0x82, 0x27, 0xa0, 0x06, 0x20, 0x09, 0x00, 0x29, 0x10, 0x78, - 0xa2, 0x2d, 0x60, 0x00, 0xc0, 0xe5, 0xc0, 0xec, 0x60, 0x02, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x85, 0x07, 0x00, 0x60, 0x06, 0x20, 0x19, - 0x00, 0x29, 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, - 0x10, 0x78, 0x5e, 0x0a, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x9f, 0x9b, - 0x07, 0x7f, 0x04, 0x7f, 0x01, 0x7f, 0x81, 0x08, 0x00, 0xf0, 0x49, 0x24, - 0x0c, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x60, 0x18, 0x20, 0x60, - 0x60, 0x00, 0xc0, 0xec, 0x60, 0x02, 0x0c, 0x7f, 0x00, 0x7c, 0x78, 0x18, - 0x20, 0x04, 0xd0, 0xac, 0x00, 0x7c, 0x78, 0x18, 0x20, 0x04, 0xd0, 0xbc, - 0x00, 0x7c, 0x0f, 0x7e, 0x20, 0x01, 0xa8, 0xb3, 0x20, 0x04, 0xa0, 0x7d, - 0x00, 0x40, 0x49, 0x70, 0x78, 0x00, 0xd0, 0xec, 0x0f, 0x7f, 0x00, 0x7c, - 0x12, 0x7e, 0x02, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x00, 0x7e, 0x62, 0xa0, - 0xa2, 0x90, 0xa8, 0x35, 0x22, 0x04, 0xac, 0x06, 0x10, 0xc0, 0x13, 0x32, - 0x00, 0x7f, 0x62, 0x00, 0xa0, 0x05, 0x00, 0x40, 0x49, 0x86, 0xc2, 0xfd, - 0x00, 0x78, 0x49, 0x87, 0xc2, 0xfc, 0x62, 0x02, 0x02, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x20, 0x11, 0xa7, 0x33, 0x22, 0x04, 0xd0, 0xcc, 0x00, 0x40, - 0x49, 0x98, 0x20, 0x01, 0xa9, 0x9f, 0x20, 0x0c, 0x20, 0x11, 0x49, 0x99, - 0x10, 0x78, 0x5a, 0xdd, 0x00, 0x7c, 0x20, 0x11, 0x49, 0x99, 0x10, 0x78, - 0x5a, 0x45, 0x20, 0x11, 0xa7, 0x33, 0x22, 0x04, 0xc0, 0xcc, 0x20, 0x12, - 0x00, 0x7c, 0x20, 0x71, 0xa8, 0x14, 0x70, 0x03, 0x00, 0x01, 0x70, 0x07, - 0x00, 0x00, 0x70, 0x13, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00, 0x70, 0x1b, - 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x70, 0x4b, - 0x00, 0x01, 0x70, 0x4f, 0x00, 0x00, 0x70, 0x5b, 0x00, 0x20, 0x70, 0x5f, - 0x00, 0x40, 0x70, 0x7f, 0x00, 0x00, 0x20, 0x71, 0xa9, 0x7d, 0x70, 0x03, - 0xa8, 0x14, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x70, 0x0f, - 0xa9, 0x5d, 0x70, 0x13, 0x00, 0x20, 0x70, 0x17, 0x00, 0x40, 0x70, 0x37, - 0x00, 0x00, 0x00, 0x7c, 0x01, 0x7e, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0x35, - 0xa0, 0x0e, 0x71, 0x86, 0x71, 0x8a, 0x70, 0x97, 0x00, 0x01, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xfc, 0x00, 0xc0, 0x49, 0xe8, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xa0, 0x0e, 0xd0, 0x9c, 0x00, 0x40, 0x49, 0xe5, - 0x81, 0x08, 0x71, 0x02, 0x00, 0x78, 0x4a, 0x3b, 0x20, 0x01, 0xa7, 0x72, - 0x20, 0x0c, 0xa1, 0x84, 0x00, 0x0f, 0x20, 0x09, 0xa7, 0x73, 0x21, 0x0c, - 0x00, 0x79, 0x49, 0xf2, 0x49, 0xdd, 0x4a, 0x13, 0x4a, 0x1b, 0x4a, 0x26, - 0x4a, 0x2c, 0x49, 0xdd, 0x49, 0xdd, 0x49, 0xdd, 0x4a, 0x02, 0x49, 0xdd, - 0x49, 0xdd, 0x49, 0xdd, 0x49, 0xdd, 0x49, 0xdd, 0x49, 0xdd, 0x49, 0xdd, - 0x70, 0x03, 0x00, 0x04, 0x13, 0x7e, 0x14, 0x7e, 0x15, 0x7e, 0x20, 0x99, - 0xa7, 0x76, 0x20, 0xa1, 0xa9, 0x86, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, - 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x00, 0x78, 0x4a, 0x3b, 0x70, 0x8f, - 0x00, 0x05, 0x70, 0x07, 0x01, 0x22, 0x20, 0x01, 0x00, 0x02, 0x00, 0x78, - 0x4a, 0x21, 0x70, 0x8f, 0x00, 0x02, 0x70, 0x07, 0x01, 0x21, 0x20, 0x01, - 0x00, 0x03, 0x70, 0x02, 0x70, 0x97, 0x00, 0x01, 0x00, 0x78, 0x4a, 0x38, - 0x70, 0x07, 0x01, 0x22, 0x20, 0x01, 0x00, 0x02, 0x00, 0x78, 0x4a, 0x30, - 0x70, 0x07, 0x01, 0x21, 0x20, 0x01, 0x00, 0x03, 0x70, 0x02, 0xa0, 0x06, - 0x70, 0x96, 0x70, 0x8e, 0xa1, 0x84, 0xff, 0x00, 0x80, 0x07, 0x70, 0x9a, - 0xa1, 0x84, 0x00, 0xff, 0x70, 0x92, 0x0e, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x20, 0x71, 0xa8, 0x14, 0x68, 0x4c, 0xa0, 0x05, 0x00, 0xc0, - 0x4a, 0x4c, 0x70, 0x28, 0xc0, 0x85, 0x70, 0x2a, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x78, 0x4a, 0x71, 0x6a, 0x60, 0x72, 0x36, 0x6b, 0x64, 0x73, 0x3a, - 0x68, 0x68, 0x70, 0x3e, 0x70, 0x76, 0x68, 0x6c, 0x70, 0x42, 0x70, 0x7a, - 0x68, 0x4c, 0x70, 0x2e, 0x68, 0x44, 0x70, 0x32, 0x20, 0x09, 0x00, 0x0d, - 0x20, 0x0a, 0x70, 0x0b, 0x00, 0x00, 0x80, 0x07, 0x80, 0x06, 0x80, 0x06, - 0xa0, 0x8c, 0x00, 0x3f, 0xa0, 0x84, 0xff, 0xc0, 0xa2, 0x10, 0x21, 0x00, - 0xa3, 0x19, 0x72, 0x6e, 0x73, 0x72, 0x70, 0x28, 0xc0, 0x84, 0x70, 0x2a, - 0x70, 0x07, 0x00, 0x01, 0xa0, 0x06, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x02, 0x7e, 0x68, 0x38, 0xd0, 0xfc, 0x00, 0xc0, 0x4a, 0xc9, 0x68, 0x04, - 0xa0, 0x0d, 0x00, 0x40, 0x4a, 0x8f, 0x0d, 0x7e, 0x20, 0x71, 0xa7, 0x00, - 0xa0, 0x16, 0x70, 0x2c, 0x21, 0x68, 0x69, 0x04, 0x20, 0x6a, 0x82, 0x10, - 0x2d, 0x00, 0x81, 0xff, 0x00, 0xc0, 0x4a, 0x82, 0x70, 0x2e, 0x70, 0xac, - 0xa2, 0x00, 0x70, 0xae, 0x0d, 0x7f, 0x20, 0x71, 0xa8, 0x14, 0x70, 0x1c, - 0xa0, 0x05, 0x00, 0xc0, 0x4a, 0xdb, 0x00, 0x68, 0x4a, 0xd9, 0x20, 0x71, - 0xa9, 0x35, 0x72, 0x00, 0x82, 0xff, 0x00, 0x40, 0x4a, 0xd9, 0x69, 0x34, - 0xa1, 0x86, 0x01, 0x03, 0x00, 0xc0, 0x4a, 0xec, 0x69, 0x48, 0x68, 0x44, - 0xa1, 0x05, 0x00, 0xc0, 0x4a, 0xcc, 0x20, 0x09, 0x80, 0x20, 0x22, 0x00, - 0x00, 0x79, 0x4a, 0xac, 0x4a, 0xd9, 0x4a, 0xb1, 0x4b, 0x09, 0x4b, 0x17, - 0x4a, 0xd9, 0x20, 0x71, 0x00, 0x00, 0x70, 0x18, 0xd0, 0x84, 0x00, 0xc0, - 0x4a, 0xd9, 0x71, 0x22, 0x68, 0x3c, 0x70, 0x26, 0x68, 0x40, 0x70, 0x2a, - 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x20, 0x71, 0xa7, 0x00, - 0x70, 0x2c, 0x20, 0x6a, 0x2d, 0x00, 0x70, 0x2e, 0x70, 0xac, 0x80, 0x00, - 0x70, 0xae, 0x02, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x68, 0x44, 0xa0, 0x86, - 0x01, 0x00, 0x00, 0xc0, 0x4a, 0xd9, 0x68, 0x68, 0xa0, 0x05, 0x00, 0xc0, - 0x4a, 0xd9, 0x20, 0x09, 0x80, 0x20, 0x00, 0x78, 0x4a, 0xa9, 0x20, 0x71, - 0xa8, 0x14, 0x2d, 0x08, 0x20, 0x6b, 0x00, 0x00, 0x70, 0x10, 0x80, 0x00, - 0x70, 0x12, 0x70, 0x18, 0xa0, 0x6d, 0x71, 0x1a, 0x00, 0x40, 0x4a, 0xe9, - 0x69, 0x02, 0x00, 0x78, 0x4a, 0xea, 0x71, 0x1e, 0x00, 0x78, 0x4a, 0xc9, - 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x17, 0x00, 0x40, 0x4a, 0xfa, - 0xa1, 0x86, 0x00, 0x1e, 0x00, 0x40, 0x4a, 0xfa, 0xa1, 0x8e, 0x00, 0x1f, - 0x00, 0xc0, 0x4a, 0xd9, 0x68, 0x4c, 0xd0, 0xcc, 0x00, 0x40, 0x4a, 0xd9, - 0x68, 0x50, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, - 0x4a, 0xd9, 0x20, 0x09, 0x80, 0x21, 0x00, 0x78, 0x4a, 0xa9, 0x70, 0x84, - 0x80, 0x08, 0xa0, 0x92, 0x00, 0x1e, 0x00, 0xc8, 0x4a, 0xd9, 0x71, 0x86, - 0xae, 0x90, 0x00, 0x03, 0xa2, 0x10, 0x68, 0x3c, 0x20, 0x12, 0x00, 0x78, - 0x4b, 0x27, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, 0x00, 0x0f, 0x00, 0xc8, - 0x4a, 0xd9, 0x71, 0x86, 0xae, 0x90, 0x00, 0x03, 0x80, 0x03, 0xa2, 0x10, - 0x68, 0x3c, 0x20, 0x12, 0x82, 0x10, 0x68, 0x40, 0x20, 0x12, 0x70, 0x88, - 0xa1, 0x0a, 0x00, 0x48, 0x4a, 0xc0, 0x71, 0x8c, 0x70, 0x84, 0xa1, 0x0a, - 0x00, 0x48, 0x4a, 0xc0, 0x20, 0x71, 0x00, 0x00, 0x70, 0x18, 0xd0, 0x84, - 0x00, 0xc0, 0x4a, 0xc0, 0x20, 0x71, 0xa9, 0x35, 0x70, 0x00, 0xa0, 0x86, - 0x00, 0x02, 0x00, 0xc0, 0x4b, 0x47, 0x10, 0x78, 0x4d, 0xc3, 0x20, 0x71, - 0x00, 0x00, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x00, 0x78, - 0x4a, 0xc0, 0x10, 0x78, 0x4d, 0xee, 0x20, 0x71, 0x00, 0x00, 0x70, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x00, 0x78, 0x4a, 0xc0, 0x00, 0x7e, - 0x68, 0x4c, 0x00, 0x7e, 0x68, 0x37, 0x01, 0x03, 0x20, 0xa9, 0x00, 0x1c, - 0xad, 0x80, 0x00, 0x11, 0x20, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x40, 0xa4, - 0x00, 0x7f, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x4e, 0x00, 0x7f, 0x68, 0x4a, - 0x69, 0x52, 0x00, 0x7c, 0x20, 0x71, 0xa8, 0x14, 0x70, 0x04, 0x00, 0x79, - 0x4b, 0x6b, 0x4b, 0x75, 0x4b, 0x86, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0xbc, - 0x4d, 0xc2, 0x4b, 0x76, 0x4d, 0x82, 0x4d, 0x23, 0x4d, 0xa5, 0x00, 0x7c, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x4b, 0x85, 0x20, 0x09, - 0x00, 0x0d, 0x70, 0x30, 0x20, 0x0a, 0x20, 0x91, 0x40, 0x80, 0x70, 0x07, - 0x00, 0x01, 0x70, 0x0b, 0x00, 0x00, 0x12, 0x7f, 0x20, 0x69, 0xa9, 0xc4, - 0x68, 0x44, 0xa0, 0x05, 0x00, 0x50, 0x4b, 0xae, 0x00, 0xc0, 0x4b, 0xae, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x00, 0x00, 0x69, 0x34, - 0x20, 0x01, 0xa8, 0x20, 0x20, 0x04, 0xa1, 0x0a, 0x00, 0x40, 0x4b, 0xa9, - 0x00, 0x68, 0x4b, 0xad, 0x20, 0x69, 0x00, 0x00, 0x68, 0x18, 0xd0, 0x84, - 0x00, 0xc0, 0x4b, 0xad, 0x20, 0x09, 0x80, 0x40, 0x69, 0x22, 0x68, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x20, 0x69, 0xa9, 0xc4, 0x68, 0x47, - 0xff, 0xff, 0x12, 0x7f, 0x20, 0x69, 0xa7, 0x00, 0x68, 0x48, 0x69, 0x64, - 0xa1, 0x02, 0x20, 0x69, 0xa9, 0x35, 0x68, 0x8a, 0x69, 0x84, 0x70, 0x1c, - 0xa0, 0x6d, 0x00, 0x40, 0x4b, 0xc0, 0x81, 0xff, 0x00, 0x40, 0x4c, 0x08, - 0x00, 0x78, 0x4b, 0xd6, 0x81, 0xff, 0x00, 0x40, 0x4c, 0xda, 0x20, 0x71, - 0xa9, 0x35, 0x71, 0x84, 0x70, 0x88, 0xa1, 0x0a, 0x00, 0xc8, 0x4b, 0xd6, - 0x71, 0x90, 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x40, 0xa0, 0x05, 0x00, 0x40, - 0x4b, 0xd6, 0x00, 0xd0, 0x4c, 0xda, 0x71, 0x42, 0x00, 0x78, 0x4c, 0xda, - 0x20, 0x71, 0xa9, 0x35, 0x71, 0x8c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x84, 0xa1, 0x0a, 0x00, 0x48, 0x4c, 0xf7, 0x00, 0x68, 0x4c, 0x8c, - 0x20, 0x71, 0x00, 0x00, 0x70, 0x18, 0xd0, 0x84, 0x00, 0xc0, 0x4c, 0x8c, - 0x20, 0x01, 0xff, 0xff, 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x42, 0x20, 0x71, - 0xa9, 0x35, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x4b, 0xfe, - 0x10, 0x78, 0x4d, 0xc3, 0x20, 0x71, 0x00, 0x00, 0x70, 0x1b, 0x00, 0x01, - 0x20, 0x91, 0x40, 0x80, 0x00, 0x78, 0x4c, 0x8c, 0x10, 0x78, 0x4d, 0xee, - 0x20, 0x71, 0x00, 0x00, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, - 0x00, 0x78, 0x4c, 0x8c, 0x20, 0x71, 0xa9, 0x35, 0x70, 0x00, 0xa0, 0x05, - 0x00, 0x40, 0x4c, 0xb9, 0x69, 0x34, 0xa1, 0x86, 0x01, 0x03, 0x00, 0xc0, - 0x4c, 0x8f, 0x68, 0x4c, 0xd0, 0xbc, 0x00, 0xc0, 0x4c, 0xb9, 0x69, 0x48, - 0x68, 0x44, 0xa1, 0x05, 0x00, 0xc0, 0x4c, 0xac, 0x20, 0x09, 0x80, 0x20, - 0x20, 0x71, 0xa9, 0x35, 0x70, 0x00, 0x00, 0x79, 0x4c, 0x23, 0x4c, 0xb9, - 0x4c, 0x71, 0x4c, 0x49, 0x4c, 0x5b, 0x4c, 0x28, 0x13, 0x7e, 0x14, 0x7e, - 0x15, 0x7e, 0x20, 0x99, 0xa7, 0x76, 0x20, 0xa1, 0xa9, 0x86, 0x20, 0xa9, - 0x00, 0x04, 0x53, 0xa3, 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x20, 0x71, - 0xa9, 0x7d, 0xad, 0x80, 0x00, 0x0f, 0x70, 0x0e, 0x70, 0x13, 0x00, 0x02, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x0b, 0x00, 0x00, 0x2e, 0x10, 0x10, 0x78, - 0x13, 0xdb, 0x20, 0x71, 0xa8, 0x14, 0x70, 0x07, 0x00, 0x09, 0x00, 0x78, - 0x4c, 0xda, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, 0x00, 0x1e, 0x00, 0xc8, - 0x4c, 0xda, 0xae, 0x90, 0x00, 0x03, 0xa2, 0x10, 0x68, 0x3c, 0x20, 0x12, - 0x71, 0x86, 0x20, 0x71, 0xa8, 0x14, 0x10, 0x78, 0x4e, 0x4c, 0x00, 0x78, - 0x4c, 0xda, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, 0x00, 0x0f, 0x00, 0xc8, - 0x4c, 0xda, 0xae, 0x90, 0x00, 0x03, 0x80, 0x03, 0xa2, 0x10, 0x68, 0x3c, - 0x20, 0x12, 0x82, 0x10, 0x68, 0x40, 0x20, 0x12, 0x71, 0x86, 0x20, 0x71, - 0xa8, 0x14, 0x10, 0x78, 0x4e, 0x4c, 0x00, 0x78, 0x4c, 0xda, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x4c, 0x8c, 0x20, 0x71, 0x00, 0x00, - 0x70, 0x18, 0xd0, 0x84, 0x00, 0xc0, 0x4c, 0x8c, 0x71, 0x22, 0x68, 0x3c, - 0x70, 0x26, 0x68, 0x40, 0x70, 0x2a, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, - 0x40, 0x80, 0x12, 0x7f, 0x20, 0x71, 0xa8, 0x14, 0x10, 0x78, 0x4e, 0x4c, - 0x00, 0x78, 0x4c, 0xda, 0x12, 0x7f, 0x00, 0x78, 0x4c, 0xda, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x86, 0x00, 0x17, 0x00, 0x40, 0x4c, 0x9d, 0xa1, 0x86, - 0x00, 0x1e, 0x00, 0x40, 0x4c, 0x9d, 0xa1, 0x8e, 0x00, 0x1f, 0x00, 0xc0, - 0x4c, 0xb9, 0x68, 0x4c, 0xd0, 0xcc, 0x00, 0x40, 0x4c, 0xb9, 0x68, 0x50, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x4c, 0xb9, - 0x20, 0x09, 0x80, 0x21, 0x00, 0x78, 0x4c, 0x1e, 0x68, 0x44, 0xa0, 0x86, - 0x01, 0x00, 0x00, 0xc0, 0x4c, 0xb9, 0x68, 0x68, 0xa0, 0x05, 0x00, 0xc0, - 0x4c, 0xb9, 0x20, 0x09, 0x80, 0x20, 0x00, 0x78, 0x4c, 0x1e, 0x20, 0x71, - 0xa8, 0x14, 0x10, 0x78, 0x4e, 0x60, 0x00, 0x40, 0x4c, 0xda, 0x20, 0x71, - 0xa8, 0x14, 0x70, 0x0f, 0x00, 0x01, 0x69, 0x34, 0xa1, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x4c, 0xd1, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x81, 0x01, 0x00, 0x40, 0x4c, 0xd1, 0x71, 0x0e, 0x70, 0x07, - 0x00, 0x03, 0x10, 0x78, 0x4e, 0x80, 0x70, 0x50, 0xa0, 0x86, 0x01, 0x00, - 0x00, 0x40, 0x4d, 0x95, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xa8, 0x14, 0x70, 0x08, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x4c, 0xf5, - 0x00, 0x68, 0x4c, 0xf5, 0x20, 0x09, 0x00, 0x0d, 0x70, 0x30, 0x20, 0x0a, - 0x20, 0x91, 0x40, 0x80, 0x70, 0x0b, 0x00, 0x00, 0x70, 0x04, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0xc0, 0x4c, 0xf5, 0x70, 0x07, 0x00, 0x01, 0x12, 0x7f, - 0x00, 0x7c, 0x20, 0x71, 0xa8, 0x14, 0x10, 0x78, 0x4e, 0x60, 0x00, 0x40, - 0x4d, 0x20, 0x20, 0x71, 0xa9, 0x35, 0x70, 0x84, 0x70, 0x0a, 0x20, 0xa9, - 0x00, 0x20, 0x20, 0x99, 0xa9, 0x36, 0x20, 0xa1, 0xa9, 0x5d, 0x53, 0xa3, - 0x70, 0x87, 0x00, 0x00, 0x20, 0x71, 0xa8, 0x14, 0x20, 0x69, 0xa9, 0x7d, - 0x70, 0x6c, 0x68, 0x26, 0x70, 0x70, 0x68, 0x2a, 0x70, 0x74, 0x68, 0x2e, - 0x70, 0x78, 0x68, 0x32, 0x2d, 0x10, 0x10, 0x78, 0x13, 0xdb, 0x70, 0x07, - 0x00, 0x08, 0x20, 0x01, 0xff, 0xff, 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x42, - 0x12, 0x7f, 0x00, 0x78, 0x4c, 0xda, 0x20, 0x69, 0xa9, 0x7d, 0x68, 0x08, - 0xa0, 0x8e, 0x00, 0x00, 0x00, 0x40, 0x4d, 0x81, 0xa0, 0x8e, 0x02, 0x00, - 0x00, 0x40, 0x4d, 0x7f, 0xa0, 0x8e, 0x01, 0x00, 0x00, 0xc0, 0x4d, 0x81, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x4d, 0x7c, 0x20, 0x69, - 0x00, 0x00, 0x68, 0x18, 0xd0, 0x84, 0x00, 0xc0, 0x4d, 0x7c, 0x70, 0x2c, - 0x71, 0x30, 0x81, 0x08, 0xa1, 0x02, 0x00, 0x48, 0x4d, 0x4a, 0xa0, 0x0e, - 0x70, 0x34, 0x70, 0x6e, 0x70, 0x38, 0x70, 0x72, 0x00, 0x78, 0x4d, 0x54, - 0x70, 0x6c, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x6e, 0x00, 0xc8, 0x4d, 0x54, - 0x70, 0x70, 0xa0, 0x81, 0x00, 0x00, 0x70, 0x72, 0x71, 0x32, 0x69, 0x36, - 0x70, 0x0b, 0x00, 0x00, 0x20, 0x01, 0xa9, 0x5a, 0x20, 0x04, 0xa0, 0x05, - 0x00, 0xc0, 0x4d, 0x73, 0x69, 0x34, 0x20, 0x69, 0xa9, 0x35, 0x68, 0x9c, - 0x69, 0x9e, 0x20, 0x69, 0xa9, 0xc4, 0xa1, 0x02, 0x00, 0xc0, 0x4d, 0x6c, - 0x68, 0x44, 0xa0, 0x05, 0x00, 0xd0, 0x4d, 0x7a, 0x20, 0x01, 0xa9, 0x5b, - 0x20, 0x0c, 0x81, 0x0d, 0x69, 0x46, 0x00, 0x78, 0x4d, 0x7a, 0x20, 0x09, - 0x80, 0x40, 0x69, 0x22, 0x68, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, - 0x70, 0x07, 0x00, 0x01, 0x12, 0x7f, 0x00, 0x78, 0x4d, 0x81, 0x70, 0x07, - 0x00, 0x05, 0x00, 0x7c, 0x70, 0x1c, 0xa0, 0x6d, 0x00, 0x40, 0x4d, 0x93, - 0x10, 0x78, 0x4e, 0x60, 0x00, 0x40, 0x4d, 0x93, 0x70, 0x07, 0x00, 0x03, - 0x10, 0x78, 0x4e, 0x80, 0x70, 0x50, 0xa0, 0x86, 0x01, 0x00, 0x00, 0x40, - 0x4d, 0x95, 0x00, 0x7c, 0x00, 0x7c, 0x70, 0x50, 0xa0, 0x9e, 0x01, 0x00, - 0x00, 0xc0, 0x4d, 0x9e, 0x70, 0x07, 0x00, 0x04, 0x00, 0x78, 0x4d, 0xbc, - 0xa0, 0x86, 0x02, 0x00, 0x00, 0xc0, 0x4d, 0xa4, 0x70, 0x07, 0x00, 0x05, - 0x00, 0x7c, 0x20, 0x01, 0xa9, 0x7f, 0x20, 0x04, 0xa0, 0x8e, 0x01, 0x00, - 0x00, 0xc0, 0x4d, 0xb1, 0x70, 0x07, 0x00, 0x01, 0x10, 0x78, 0x4e, 0x4c, - 0x00, 0x7c, 0xa0, 0x8e, 0x00, 0x00, 0x00, 0x40, 0x4d, 0xb0, 0xa0, 0x8e, - 0x02, 0x00, 0x00, 0xc0, 0x4d, 0xb0, 0x70, 0x07, 0x00, 0x05, 0x00, 0x7c, - 0x10, 0x78, 0x4e, 0x16, 0x70, 0x06, 0x10, 0x78, 0x4e, 0x4c, 0x00, 0x7c, - 0x00, 0x7c, 0x0e, 0x7e, 0x15, 0x7e, 0x20, 0x71, 0xa9, 0x35, 0x71, 0x84, - 0x81, 0xff, 0x00, 0x40, 0x4d, 0xeb, 0xa0, 0x06, 0x70, 0x86, 0xae, 0x80, - 0x00, 0x03, 0x20, 0x71, 0x00, 0x00, 0x21, 0xa8, 0x20, 0x14, 0x72, 0x26, - 0x80, 0x00, 0x00, 0x70, 0x4d, 0xe8, 0x20, 0x14, 0x72, 0x2a, 0x80, 0x00, - 0x00, 0x70, 0x4d, 0xe8, 0x20, 0x14, 0x72, 0x2e, 0x80, 0x00, 0x00, 0x70, - 0x4d, 0xe8, 0x20, 0x14, 0x72, 0x3a, 0x80, 0x00, 0x00, 0x70, 0x4d, 0xe8, - 0x20, 0x14, 0x72, 0x3e, 0xa1, 0x80, 0x80, 0x30, 0x70, 0x22, 0x15, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x15, 0x7e, 0x20, 0x71, 0xa9, 0x35, - 0x71, 0x84, 0x81, 0xff, 0x00, 0x40, 0x4e, 0x13, 0xa0, 0x06, 0x70, 0x86, - 0xae, 0x80, 0x00, 0x03, 0x20, 0x71, 0x00, 0x00, 0x21, 0xa8, 0x20, 0x14, - 0x72, 0x26, 0x80, 0x00, 0x20, 0x14, 0x72, 0x2a, 0x80, 0x00, 0x00, 0x70, - 0x4e, 0x0c, 0x20, 0x14, 0x72, 0x3a, 0x80, 0x00, 0x20, 0x14, 0x72, 0x3e, - 0x00, 0x78, 0x4e, 0x10, 0x20, 0x01, 0x80, 0x20, 0x00, 0x78, 0x4e, 0x12, - 0x20, 0x01, 0x80, 0x42, 0x70, 0x22, 0x15, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x70, 0x2c, 0x71, 0x30, 0x81, 0x08, 0xa1, 0x02, 0x00, 0x48, 0x4e, 0x23, - 0xa0, 0x0e, 0x70, 0x34, 0x70, 0x6e, 0x70, 0x38, 0x70, 0x72, 0x00, 0x78, - 0x4e, 0x2d, 0x70, 0x6c, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x6e, 0x00, 0xc8, - 0x4e, 0x2d, 0x70, 0x70, 0xa0, 0x81, 0x00, 0x00, 0x70, 0x72, 0x71, 0x32, - 0x70, 0x0c, 0x80, 0x01, 0x70, 0x0e, 0x00, 0xc0, 0x4e, 0x43, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x00, 0x68, 0x4e, 0x46, 0x20, 0x01, 0x00, 0x0d, - 0x21, 0x02, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x01, 0x70, 0x0b, - 0x00, 0x00, 0x12, 0x7f, 0x00, 0x7c, 0x20, 0x01, 0x00, 0x07, 0x00, 0x7c, - 0x20, 0x01, 0x00, 0x06, 0x70, 0x0b, 0x00, 0x01, 0x12, 0x7f, 0x00, 0x7c, - 0x70, 0x1c, 0xa0, 0x6d, 0x00, 0x40, 0x4e, 0x5f, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0x2d, 0x04, 0x70, 0x1e, - 0xa0, 0x05, 0x00, 0xc0, 0x4e, 0x5c, 0x70, 0x1a, 0x12, 0x7f, 0x10, 0x78, - 0x13, 0xa4, 0x00, 0x7c, 0x20, 0x19, 0x00, 0x0d, 0x23, 0x04, 0x23, 0x0c, - 0xa1, 0x0e, 0x00, 0x40, 0x4e, 0x6f, 0x23, 0x04, 0x23, 0x0c, 0xa1, 0x0e, - 0x00, 0x40, 0x4e, 0x6f, 0xa0, 0x06, 0x00, 0x78, 0x4e, 0x7f, 0x73, 0x2c, - 0x83, 0x19, 0x71, 0x30, 0xa1, 0x02, 0x00, 0xc0, 0x4e, 0x79, 0x23, 0x00, - 0xa0, 0x05, 0x00, 0x78, 0x4e, 0x7f, 0x00, 0x48, 0x4e, 0x7e, 0xa3, 0x02, - 0x00, 0x78, 0x4e, 0x7f, 0x80, 0x02, 0x00, 0x7c, 0x2d, 0x00, 0x70, 0x26, - 0xa0, 0x80, 0x00, 0x0d, 0x70, 0x56, 0x70, 0x53, 0x00, 0x00, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0xa9, 0xd6, 0x21, 0x04, 0xc0, 0x8d, - 0x20, 0x0a, 0x12, 0x7f, 0x10, 0x78, 0x13, 0xf9, 0x00, 0x7c, 0x20, 0x71, - 0xa7, 0xe2, 0x70, 0x03, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0f, - 0x00, 0x00, 0x70, 0x2b, 0x00, 0x01, 0x70, 0x4f, 0x00, 0x00, 0x70, 0x53, - 0x00, 0x01, 0x70, 0x5f, 0x00, 0x20, 0x70, 0x63, 0x00, 0x40, 0x70, 0x83, - 0x00, 0x00, 0x70, 0x8b, 0x00, 0x00, 0x70, 0x8f, 0x00, 0x01, 0x70, 0xbf, - 0x00, 0x00, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0xe2, 0x68, 0x48, - 0xa0, 0x05, 0x00, 0xc0, 0x4e, 0xbc, 0x70, 0x28, 0xc0, 0x85, 0x70, 0x2a, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x4e, 0xe1, 0x6a, 0x50, 0x72, 0x36, - 0x6b, 0x54, 0x73, 0x3a, 0x68, 0x58, 0x70, 0x3e, 0x70, 0x7a, 0x68, 0x5c, - 0x70, 0x42, 0x70, 0x7e, 0x68, 0x48, 0x70, 0x2e, 0x68, 0x40, 0x70, 0x32, - 0x20, 0x09, 0x00, 0x0c, 0x20, 0x0a, 0x80, 0x07, 0x80, 0x06, 0x80, 0x06, - 0xa0, 0x8c, 0x00, 0x3f, 0xa0, 0x84, 0xff, 0xc0, 0xa2, 0x10, 0x21, 0x00, - 0xa3, 0x19, 0x72, 0x72, 0x73, 0x76, 0x70, 0x28, 0xc0, 0x84, 0x70, 0x2a, - 0x70, 0x07, 0x00, 0x01, 0x70, 0x0f, 0x00, 0x00, 0xa0, 0x06, 0x0e, 0x7f, - 0x00, 0x7c, 0x2b, 0x78, 0x20, 0x71, 0xa7, 0xe2, 0x70, 0x04, 0x10, 0x79, - 0x4f, 0x41, 0x70, 0x0c, 0x00, 0x79, 0x4e, 0xec, 0x4e, 0xf1, 0x4e, 0xe6, - 0x4e, 0xe6, 0x4e, 0xe6, 0x4e, 0xe6, 0x00, 0x7c, 0x70, 0x0c, 0x00, 0x79, - 0x4e, 0xf5, 0x4e, 0xfa, 0x4f, 0x3f, 0x4f, 0x3f, 0x4f, 0x40, 0x4f, 0x40, - 0x78, 0x30, 0x79, 0x30, 0xa1, 0x06, 0x00, 0x40, 0x4f, 0x04, 0x78, 0x30, - 0x79, 0x30, 0xa1, 0x06, 0x00, 0xc0, 0x4f, 0x2a, 0x70, 0x30, 0xa1, 0x0a, - 0x00, 0x40, 0x4f, 0x2a, 0x00, 0xc8, 0x4f, 0x0c, 0x71, 0x2c, 0xa1, 0x0a, - 0xa1, 0x8a, 0x00, 0x02, 0x00, 0xc8, 0x4f, 0x2b, 0x10, 0x78, 0x13, 0x70, - 0x00, 0x40, 0x4f, 0x2a, 0x2d, 0x00, 0x70, 0x5a, 0x70, 0x63, 0x00, 0x40, - 0x20, 0x01, 0x00, 0x03, 0x70, 0x57, 0x00, 0x00, 0x12, 0x7e, 0x00, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0xa9, 0xd6, 0x21, 0x04, 0xc0, 0x85, - 0x20, 0x0a, 0x00, 0x7f, 0x70, 0x0e, 0x12, 0x7f, 0x10, 0x78, 0x13, 0xf9, - 0x00, 0x7c, 0x10, 0x78, 0x13, 0x70, 0x00, 0x40, 0x4f, 0x2a, 0x2d, 0x00, - 0x70, 0x5a, 0x10, 0x78, 0x13, 0x70, 0x00, 0xc0, 0x4f, 0x37, 0x00, 0x78, - 0x4f, 0x16, 0x2d, 0x00, 0x70, 0x86, 0x70, 0x63, 0x00, 0x80, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x78, 0x4f, 0x1a, 0x00, 0x7c, 0x00, 0x7c, 0x4f, 0x52, - 0x4f, 0x53, 0x4f, 0x8a, 0x4f, 0x8b, 0x4f, 0x3f, 0x4f, 0xc1, 0x4f, 0xc6, - 0x4f, 0xfd, 0x4f, 0xfe, 0x50, 0x19, 0x50, 0x1a, 0x50, 0x1b, 0x50, 0x1c, - 0x50, 0x1d, 0x50, 0x1e, 0x50, 0x9e, 0x50, 0xc8, 0x00, 0x7c, 0x70, 0x0c, - 0x00, 0x79, 0x4f, 0x56, 0x4f, 0x5b, 0x4f, 0x5e, 0x4f, 0x6e, 0x4f, 0x89, - 0x4f, 0x89, 0x10, 0x78, 0x4e, 0xf2, 0x00, 0x7c, 0x12, 0x7e, 0x80, 0x01, - 0x70, 0x0e, 0x70, 0x58, 0x00, 0x7e, 0x10, 0x78, 0x54, 0x64, 0x00, 0x40, - 0x4f, 0x6b, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x4e, 0xf2, 0x0d, 0x7f, - 0x00, 0x78, 0x4f, 0x77, 0x12, 0x7e, 0x80, 0x01, 0x70, 0x0e, 0x10, 0x78, - 0x54, 0x64, 0x70, 0x58, 0x20, 0x68, 0x70, 0x84, 0x70, 0x5a, 0x68, 0x03, - 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x8a, 0x00, 0x20, 0x00, 0xc8, 0x4f, 0x86, 0x10, 0x79, 0x4f, 0xa1, - 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7f, 0x10, 0x78, 0x50, 0x1f, 0x00, 0x7c, - 0x00, 0x7c, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0xe2, 0x70, 0x0c, - 0x00, 0x79, 0x4f, 0x92, 0x4f, 0x97, 0x4f, 0x97, 0x4f, 0x97, 0x4f, 0x99, - 0x4f, 0x9d, 0x0e, 0x7f, 0x00, 0x7c, 0x70, 0x0f, 0x00, 0x01, 0x00, 0x78, - 0x4f, 0x9f, 0x70, 0x0f, 0x00, 0x02, 0x0e, 0x7f, 0x00, 0x7c, 0x50, 0x1f, - 0x50, 0x1f, 0x50, 0x3b, 0x50, 0x1f, 0x51, 0x71, 0x50, 0x1f, 0x50, 0x1f, - 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x3b, 0x51, 0xbb, 0x52, 0x08, - 0x52, 0x61, 0x52, 0x77, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x57, 0x50, 0x3b, - 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x78, 0x53, 0x38, 0x53, 0x56, 0x50, 0x1f, - 0x50, 0x57, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x6d, - 0x53, 0x56, 0x70, 0x20, 0x20, 0x68, 0x10, 0x78, 0x13, 0xa4, 0x00, 0x7c, - 0x70, 0x0c, 0x00, 0x79, 0x4f, 0xc9, 0x4f, 0xce, 0x4f, 0xd1, 0x4f, 0xe1, - 0x4f, 0xfc, 0x4f, 0xfc, 0x10, 0x78, 0x4e, 0xf2, 0x00, 0x7c, 0x12, 0x7e, - 0x80, 0x01, 0x70, 0x0e, 0x70, 0x58, 0x00, 0x7e, 0x10, 0x78, 0x54, 0x64, - 0x00, 0x40, 0x4f, 0xde, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x4e, 0xf2, - 0x0d, 0x7f, 0x00, 0x78, 0x4f, 0xea, 0x12, 0x7e, 0x80, 0x01, 0x70, 0x0e, - 0x10, 0x78, 0x54, 0x64, 0x70, 0x58, 0x20, 0x68, 0x70, 0x84, 0x70, 0x5a, - 0x68, 0x03, 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x8a, 0x00, 0x1a, 0x00, 0xc8, 0x4f, 0xf9, 0x10, 0x79, - 0x4f, 0xff, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7f, 0x10, 0x78, 0x50, 0x1f, - 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x50, 0x1f, 0x50, 0x3b, 0x51, 0x5b, - 0x50, 0x1f, 0x50, 0x3b, 0x50, 0x1f, 0x50, 0x3b, 0x50, 0x3b, 0x50, 0x1f, - 0x50, 0x3b, 0x51, 0x5b, 0x50, 0x3b, 0x50, 0x3b, 0x50, 0x3b, 0x50, 0x3b, - 0x50, 0x3b, 0x50, 0x1f, 0x50, 0x3b, 0x51, 0x5b, 0x50, 0x1f, 0x50, 0x1f, - 0x50, 0x3b, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x1f, 0x50, 0x3b, 0x00, 0x7c, - 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x70, 0x07, - 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xd5, 0x68, 0x3a, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x12, 0x7f, - 0x00, 0x7c, 0x70, 0x07, 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, - 0xc0, 0xe5, 0x68, 0x3a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x4a, 0x73, 0x12, 0x7f, 0x00, 0x7c, 0x70, 0x07, 0x00, 0x01, 0x68, 0x38, - 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xed, 0x68, 0x3a, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x12, 0x7f, 0x00, 0x7c, 0x70, 0x07, - 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xdd, 0x68, 0x3a, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x12, 0x7f, - 0x00, 0x7c, 0x68, 0x34, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x00, 0x40, - 0x50, 0x2d, 0x80, 0x01, 0x00, 0xc0, 0x50, 0x64, 0x70, 0x07, 0x00, 0x01, - 0x00, 0x78, 0x51, 0x3a, 0x70, 0x07, 0x00, 0x06, 0x70, 0x12, 0x2d, 0x00, - 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x51, 0x3a, 0x00, 0x7c, 0x68, 0x4c, - 0xa0, 0x84, 0x00, 0xc0, 0xa0, 0x86, 0x00, 0xc0, 0x00, 0xc0, 0x50, 0x78, - 0x70, 0x07, 0x00, 0x01, 0x00, 0x78, 0x53, 0x73, 0x2d, 0x00, 0x70, 0x16, - 0x70, 0x1a, 0x20, 0xa9, 0x00, 0x04, 0xa0, 0x80, 0x00, 0x24, 0x20, 0x98, - 0x20, 0xa1, 0xa8, 0x0d, 0x53, 0xa3, 0x68, 0x58, 0x70, 0x12, 0xa0, 0x82, - 0x04, 0x01, 0x00, 0xc8, 0x50, 0x49, 0x68, 0x84, 0xa0, 0x8a, 0x00, 0x02, - 0x00, 0xc8, 0x50, 0x49, 0x82, 0xff, 0x00, 0xc0, 0x50, 0x9a, 0x68, 0x88, - 0x69, 0x8c, 0xa1, 0x05, 0x00, 0x40, 0x50, 0x9a, 0x20, 0x01, 0x51, 0x0a, - 0x00, 0x78, 0x50, 0x9d, 0xa2, 0x80, 0x51, 0x00, 0x20, 0x04, 0x70, 0xc6, - 0x70, 0x10, 0xa0, 0x15, 0x00, 0x40, 0x50, 0xe8, 0x10, 0x78, 0x13, 0x70, - 0x00, 0xc0, 0x50, 0xa9, 0x70, 0x07, 0x00, 0x0f, 0x00, 0x7c, 0x2d, 0x00, - 0x70, 0x22, 0x70, 0xc4, 0x20, 0x60, 0x60, 0x00, 0x68, 0x36, 0x60, 0x04, - 0xad, 0x00, 0x70, 0x96, 0x60, 0x08, 0xa2, 0x0a, 0x00, 0xc8, 0x50, 0xb8, - 0xa0, 0x0e, 0x22, 0x00, 0x71, 0x12, 0x62, 0x0c, 0x80, 0x03, 0x80, 0x0b, - 0xa2, 0x96, 0x00, 0x04, 0x00, 0x40, 0x50, 0xc1, 0xa1, 0x08, 0x71, 0x9a, - 0x81, 0x0b, 0x71, 0x9e, 0xae, 0x90, 0x00, 0x22, 0x10, 0x78, 0x13, 0xdb, - 0x70, 0x90, 0xa0, 0x8e, 0x01, 0x00, 0x00, 0x40, 0x50, 0xdc, 0xa0, 0x86, - 0x02, 0x00, 0x00, 0x40, 0x50, 0xd4, 0x70, 0x07, 0x00, 0x10, 0x00, 0x7c, - 0x70, 0x20, 0x20, 0x68, 0x10, 0x78, 0x13, 0xa4, 0x70, 0x14, 0x20, 0x68, - 0x00, 0x78, 0x50, 0x49, 0x70, 0x20, 0x20, 0x68, 0x70, 0x18, 0x68, 0x02, - 0x68, 0x07, 0x00, 0x00, 0x2d, 0x08, 0x20, 0x68, 0x69, 0x06, 0x71, 0x1a, - 0x00, 0x78, 0x50, 0x9e, 0x70, 0x14, 0x20, 0x68, 0x70, 0x07, 0x00, 0x01, - 0x68, 0x84, 0xa0, 0x05, 0x00, 0xc0, 0x50, 0xf7, 0x68, 0x88, 0x69, 0x8c, - 0xa1, 0x05, 0x00, 0x40, 0x50, 0xf7, 0x10, 0x78, 0x51, 0x0e, 0x68, 0x34, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, 0x00, 0x40, 0x53, 0x73, - 0x00, 0x78, 0x51, 0x3a, 0x51, 0x02, 0x51, 0x06, 0x00, 0x02, 0x00, 0x11, - 0x00, 0x07, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x0a, 0x00, 0x11, 0x00, 0x05, 0x00, 0x04, 0x0f, 0x7e, 0x0e, 0x7e, - 0x0c, 0x7e, 0x07, 0x7e, 0x06, 0x7e, 0x6f, 0x88, 0x6e, 0x8c, 0x68, 0x04, - 0x20, 0x60, 0xac, 0xf0, 0x00, 0x21, 0xac, 0xf8, 0x00, 0x27, 0x20, 0x09, - 0x00, 0x05, 0x70, 0x0c, 0x78, 0x16, 0x70, 0x08, 0x78, 0x12, 0x70, 0x04, - 0x78, 0x06, 0x70, 0x00, 0x78, 0x02, 0x7e, 0x0e, 0x7f, 0x0a, 0x81, 0x09, - 0x00, 0x40, 0x51, 0x30, 0xae, 0xf2, 0x00, 0x04, 0xaf, 0xfa, 0x00, 0x06, - 0x00, 0x78, 0x51, 0x1d, 0x60, 0x04, 0xa0, 0x65, 0x00, 0xc0, 0x51, 0x17, - 0x06, 0x7f, 0x07, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, - 0x20, 0x09, 0xa7, 0x2f, 0x21, 0x0c, 0x81, 0xff, 0x00, 0xc0, 0x51, 0x55, - 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x3a, 0x10, 0x78, 0x43, 0x53, - 0x00, 0xc0, 0x51, 0x49, 0x00, 0x7c, 0x10, 0x78, 0x4b, 0x51, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x8f, 0x8d, 0x10, 0x78, 0x4a, 0x73, - 0x12, 0x7f, 0x00, 0x78, 0x51, 0x48, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, - 0x00, 0x00, 0x00, 0x78, 0x51, 0x49, 0x70, 0x18, 0x68, 0x02, 0x2d, 0x08, - 0x20, 0x68, 0x69, 0x06, 0x71, 0x1a, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, - 0x00, 0x40, 0x51, 0x6a, 0x70, 0x07, 0x00, 0x06, 0x00, 0x78, 0x51, 0x70, - 0x70, 0x14, 0x20, 0x68, 0x70, 0x07, 0x00, 0x01, 0x70, 0x48, 0x10, 0x7a, - 0x00, 0x7c, 0x70, 0x07, 0x00, 0x01, 0x69, 0x44, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x68, 0x48, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa9, 0x00, 0x01, - 0xa0, 0x96, 0x00, 0x01, 0x00, 0x40, 0x51, 0x9a, 0x20, 0x09, 0x00, 0x00, - 0x20, 0xa9, 0x00, 0xff, 0xa0, 0x96, 0x00, 0x02, 0x00, 0x40, 0x51, 0x9a, - 0xa0, 0x05, 0x00, 0xc0, 0x51, 0xad, 0x69, 0x44, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x51, 0xad, 0x06, 0x7e, - 0x6e, 0x50, 0x10, 0x78, 0x46, 0xb3, 0x06, 0x7f, 0x00, 0x78, 0x51, 0xad, - 0x04, 0x7e, 0x20, 0x11, 0xa7, 0x0c, 0x22, 0x24, 0xc4, 0x84, 0xc4, 0x8c, - 0x24, 0x12, 0x04, 0x7f, 0x0c, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, - 0x51, 0xa9, 0x10, 0x78, 0x48, 0x52, 0x81, 0x08, 0x00, 0xf0, 0x51, 0xa3, - 0x0c, 0x7f, 0x68, 0x4c, 0xd0, 0x84, 0x00, 0xc0, 0x51, 0xb4, 0x10, 0x78, - 0x13, 0xa4, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x4a, 0x73, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x07, 0x00, 0x01, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, - 0x00, 0x40, 0x51, 0xff, 0x20, 0x61, 0xaa, 0x33, 0x61, 0x00, 0xd1, 0x84, - 0x00, 0x40, 0x51, 0xdf, 0x68, 0x58, 0xa0, 0x84, 0x00, 0xff, 0x00, 0xc0, - 0x52, 0x02, 0x60, 0x00, 0xd0, 0x84, 0x00, 0x40, 0x51, 0xff, 0x60, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x52, 0x05, 0x60, 0x03, 0x00, 0x00, 0x60, 0x0b, - 0x00, 0x00, 0x00, 0x78, 0x51, 0xfc, 0x20, 0x11, 0x00, 0x01, 0x68, 0x60, - 0xa0, 0x05, 0x00, 0xc0, 0x51, 0xe7, 0x20, 0x01, 0x00, 0x1e, 0x80, 0x00, - 0x60, 0x16, 0x68, 0x58, 0xa0, 0x84, 0x00, 0xff, 0x00, 0x40, 0x51, 0xff, - 0x60, 0x06, 0x68, 0x58, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x00, 0x40, - 0x51, 0xff, 0x60, 0x0a, 0x68, 0x58, 0x80, 0x00, 0x00, 0xc0, 0x51, 0xfb, - 0xc2, 0x8d, 0x62, 0x02, 0x12, 0x7f, 0x00, 0x78, 0x54, 0x53, 0x12, 0x7f, - 0x00, 0x78, 0x54, 0x4b, 0x12, 0x7f, 0x00, 0x78, 0x54, 0x43, 0x12, 0x7f, - 0x00, 0x78, 0x54, 0x47, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, - 0x00, 0x01, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x00, 0x40, - 0x52, 0x5e, 0x20, 0x61, 0xaa, 0x33, 0x60, 0x00, 0xd0, 0x84, 0x00, 0x40, - 0x52, 0x5e, 0x62, 0x04, 0x63, 0x08, 0xd0, 0x8c, 0x00, 0xc0, 0x52, 0x50, - 0x6c, 0x48, 0xa4, 0x84, 0x00, 0x03, 0x00, 0x40, 0x52, 0x36, 0x69, 0x58, - 0xa1, 0x8c, 0x00, 0xff, 0x80, 0x01, 0x00, 0xc0, 0x52, 0x2f, 0x21, 0x00, - 0xa2, 0x10, 0x00, 0x48, 0x52, 0x5b, 0x00, 0x78, 0x52, 0x36, 0x80, 0x01, - 0x00, 0xc0, 0x52, 0x5b, 0x21, 0x00, 0xa2, 0x12, 0x00, 0x48, 0x52, 0x5b, - 0xa4, 0x84, 0x00, 0x0c, 0x00, 0x40, 0x52, 0x50, 0x69, 0x58, 0x81, 0x0f, - 0xa1, 0x8c, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x04, 0x00, 0xc0, 0x52, 0x48, - 0x21, 0x00, 0xa3, 0x18, 0x00, 0x48, 0x52, 0x5b, 0x00, 0x78, 0x52, 0x50, - 0xa0, 0x82, 0x00, 0x04, 0x00, 0xc0, 0x52, 0x5b, 0x21, 0x00, 0xa3, 0x1a, - 0x00, 0x48, 0x52, 0x5b, 0x68, 0x60, 0xa0, 0x05, 0x00, 0x40, 0x52, 0x56, - 0x80, 0x00, 0x60, 0x16, 0x62, 0x06, 0x63, 0x0a, 0x12, 0x7f, 0x00, 0x78, - 0x54, 0x53, 0x12, 0x7f, 0x00, 0x78, 0x54, 0x4f, 0x12, 0x7f, 0x00, 0x78, - 0x54, 0x4b, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, - 0x20, 0x61, 0xaa, 0x33, 0x63, 0x00, 0xd3, 0x8c, 0x00, 0xc0, 0x52, 0x71, - 0x63, 0x08, 0x83, 0x18, 0x00, 0x48, 0x52, 0x74, 0x63, 0x0a, 0x12, 0x7f, - 0x00, 0x78, 0x54, 0x61, 0x12, 0x7f, 0x00, 0x78, 0x54, 0x4f, 0x12, 0x7e, - 0x0c, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0x68, 0x4c, - 0xd0, 0xac, 0x00, 0x40, 0x52, 0x8b, 0x0c, 0x7e, 0x20, 0x61, 0xaa, 0x33, - 0x60, 0x00, 0xa0, 0x84, 0xfc, 0xff, 0x60, 0x02, 0x0c, 0x7f, 0x00, 0x78, - 0x52, 0xba, 0x68, 0x58, 0xa0, 0x05, 0x00, 0x40, 0x52, 0xd1, 0x68, 0x5c, - 0xa0, 0x65, 0x00, 0x40, 0x52, 0xcd, 0x20, 0x01, 0xa7, 0x2f, 0x20, 0x04, - 0xa0, 0x05, 0x00, 0x40, 0x52, 0x9d, 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x78, - 0x52, 0xab, 0x60, 0x13, 0x04, 0x00, 0x60, 0x37, 0x00, 0x00, 0x69, 0x4c, - 0xd1, 0xa4, 0x00, 0x40, 0x52, 0xa7, 0x69, 0x50, 0x61, 0x36, 0x20, 0x09, - 0x00, 0x41, 0x10, 0x78, 0x77, 0x5c, 0x69, 0x58, 0xa1, 0x8c, 0xff, 0x00, - 0xa1, 0x86, 0x20, 0x00, 0x00, 0xc0, 0x52, 0xba, 0x02, 0x7e, 0x20, 0x09, - 0x00, 0x00, 0x20, 0x11, 0xfd, 0xff, 0x10, 0x78, 0x5b, 0xf1, 0x02, 0x7f, - 0x68, 0x4c, 0xd0, 0xc4, 0x00, 0x40, 0x52, 0xc9, 0x20, 0x61, 0xaa, 0x33, - 0x60, 0x00, 0xd0, 0x8c, 0x00, 0xc0, 0x52, 0xc9, 0x60, 0x08, 0x80, 0x00, - 0x00, 0x48, 0x52, 0xcd, 0x60, 0x0a, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x78, - 0x54, 0x53, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x78, 0x54, 0x4b, 0x69, 0x54, - 0xa1, 0x86, 0x00, 0x45, 0x00, 0x40, 0x53, 0x06, 0xa1, 0x86, 0x00, 0x2a, - 0x00, 0xc0, 0x52, 0xe1, 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x0c, 0xc1, 0x94, - 0x21, 0x02, 0x00, 0x78, 0x52, 0xba, 0xa1, 0x86, 0x00, 0x20, 0x00, 0x40, - 0x52, 0xfa, 0xa1, 0x86, 0x00, 0x29, 0x00, 0x40, 0x52, 0xed, 0xa1, 0x86, - 0x00, 0x2d, 0x00, 0xc0, 0x52, 0xcd, 0x69, 0x44, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x52, 0xba, 0x60, 0x00, - 0xc0, 0xe4, 0x60, 0x02, 0x00, 0x78, 0x52, 0xba, 0x68, 0x5c, 0xa0, 0x65, - 0x00, 0x40, 0x52, 0xcd, 0x60, 0x07, 0x00, 0x24, 0x20, 0x01, 0xa9, 0xa3, - 0x20, 0x04, 0x60, 0x16, 0x00, 0x78, 0x52, 0xba, 0x68, 0x5c, 0xa0, 0x65, - 0x00, 0x40, 0x52, 0xcd, 0x0e, 0x7e, 0x68, 0x60, 0xa0, 0x75, 0x20, 0x01, - 0xa7, 0x2f, 0x20, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x53, 0x1e, 0x10, 0x78, - 0x8e, 0xd6, 0x8e, 0xff, 0x00, 0x40, 0x53, 0x1b, 0x2e, 0x60, 0x10, 0x78, - 0x8e, 0xd6, 0x0e, 0x7f, 0x00, 0x78, 0x52, 0xba, 0x60, 0x24, 0xc0, 0xdc, - 0xc0, 0xd5, 0x60, 0x26, 0x2e, 0x60, 0x60, 0x07, 0x00, 0x3a, 0x68, 0x70, - 0xa0, 0x05, 0x00, 0x40, 0x53, 0x2f, 0x60, 0x07, 0x00, 0x3b, 0x68, 0x74, - 0x60, 0x2a, 0x68, 0x78, 0x60, 0x12, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0e, 0x7f, 0x00, 0x78, 0x52, 0xba, - 0x20, 0x61, 0xaa, 0x33, 0x60, 0x00, 0xd0, 0x84, 0x00, 0x40, 0x53, 0x52, - 0xd0, 0x8c, 0x00, 0xc0, 0x54, 0x61, 0x20, 0x91, 0x80, 0x00, 0x62, 0x04, - 0x82, 0x10, 0x00, 0x48, 0x53, 0x4c, 0x62, 0x06, 0x20, 0x91, 0x80, 0x01, - 0x00, 0x78, 0x54, 0x61, 0x20, 0x91, 0x80, 0x01, 0x68, 0x53, 0x00, 0x16, - 0x00, 0x78, 0x54, 0x5a, 0x68, 0x53, 0x00, 0x07, 0x00, 0x78, 0x54, 0x5a, - 0x68, 0x34, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x00, 0xc0, 0x53, 0x60, - 0x10, 0x78, 0x50, 0x2d, 0x00, 0x78, 0x53, 0x72, 0x20, 0x30, 0x80, 0x01, - 0x00, 0xc0, 0x53, 0x6a, 0x70, 0x07, 0x00, 0x01, 0x10, 0x78, 0x53, 0x73, - 0x00, 0x78, 0x53, 0x72, 0x70, 0x07, 0x00, 0x06, 0x70, 0x12, 0x2d, 0x00, - 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x53, 0x73, 0x00, 0x7c, 0x0e, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0xa0, 0x3e, 0x20, 0x09, 0xa7, 0x2f, - 0x21, 0x0c, 0x81, 0xff, 0x00, 0xc0, 0x53, 0xff, 0x20, 0x09, 0xa7, 0x0c, - 0x21, 0x0c, 0xd1, 0x94, 0x00, 0xc0, 0x54, 0x31, 0x68, 0x48, 0x20, 0x70, - 0xae, 0x82, 0xae, 0x00, 0x00, 0x48, 0x53, 0xef, 0x20, 0x01, 0xa7, 0x16, - 0x20, 0x04, 0xae, 0x02, 0x00, 0xc8, 0x53, 0xef, 0x20, 0x61, 0xaa, 0x33, - 0x61, 0x00, 0xa1, 0x84, 0x03, 0x01, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, - 0x53, 0xd2, 0x71, 0x1c, 0xa1, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x53, 0xda, - 0x70, 0x18, 0xa0, 0x05, 0x00, 0x40, 0x53, 0xff, 0x20, 0x04, 0xd0, 0xe4, - 0x00, 0xc0, 0x54, 0x2b, 0x70, 0x24, 0xd0, 0xdc, 0x00, 0xc0, 0x54, 0x35, - 0x68, 0x53, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x2d, 0x08, 0x70, 0x10, - 0xa0, 0x05, 0x00, 0xc0, 0x53, 0xbe, 0x71, 0x12, 0x68, 0x4c, 0xd0, 0xf4, - 0x00, 0xc0, 0x54, 0x39, 0x2e, 0x60, 0x10, 0x78, 0x5b, 0x27, 0x12, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0x68, 0x68, 0x00, 0xa0, 0x05, 0x00, 0xc0, - 0x53, 0xbe, 0x69, 0x02, 0x21, 0x68, 0x68, 0x4c, 0xd0, 0xf4, 0x00, 0xc0, - 0x54, 0x39, 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x12, 0x7f, 0x0e, 0x7f, - 0x68, 0x53, 0x00, 0x06, 0x00, 0x78, 0x54, 0x5a, 0xd1, 0x84, 0x00, 0x40, - 0x53, 0xcc, 0xd1, 0xc4, 0x00, 0xc0, 0x53, 0xf3, 0x00, 0x78, 0x53, 0xf7, - 0x69, 0x44, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x10, 0x78, 0x45, 0xc4, - 0x00, 0xc0, 0x54, 0x2b, 0x60, 0x00, 0xd0, 0xe4, 0x00, 0xc0, 0x54, 0x2b, - 0x71, 0x1c, 0xa1, 0x86, 0x00, 0x07, 0x00, 0xc0, 0x53, 0xef, 0x68, 0x53, - 0x00, 0x02, 0x00, 0x78, 0x54, 0x2d, 0x68, 0x53, 0x00, 0x08, 0x00, 0x78, - 0x54, 0x2d, 0x68, 0x53, 0x00, 0x0e, 0x00, 0x78, 0x54, 0x2d, 0x68, 0x53, - 0x00, 0x17, 0x00, 0x78, 0x54, 0x2d, 0x68, 0x53, 0x00, 0x35, 0x00, 0x78, - 0x54, 0x2d, 0x20, 0x01, 0xa7, 0x72, 0x20, 0x04, 0xd0, 0xfc, 0x00, 0x40, - 0x54, 0x27, 0x68, 0x48, 0x20, 0x70, 0xae, 0x82, 0xae, 0x00, 0x00, 0x48, - 0x54, 0x27, 0x60, 0x58, 0xae, 0x02, 0x00, 0xc8, 0x54, 0x27, 0x71, 0x1c, - 0xa1, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x54, 0x27, 0x70, 0x18, 0xa0, 0x05, - 0x00, 0x40, 0x54, 0x27, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x54, 0x27, - 0x20, 0x39, 0x00, 0x01, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x07, 0x00, 0xc0, - 0x53, 0x7e, 0x70, 0x03, 0x00, 0x02, 0x00, 0x78, 0x53, 0x7e, 0x68, 0x53, - 0x00, 0x28, 0x00, 0x78, 0x54, 0x2d, 0x68, 0x53, 0x00, 0x29, 0x12, 0x7f, - 0x0e, 0x7f, 0x00, 0x78, 0x54, 0x5a, 0x68, 0x53, 0x00, 0x2a, 0x00, 0x78, - 0x54, 0x2d, 0x68, 0x53, 0x00, 0x45, 0x00, 0x78, 0x54, 0x2d, 0x2e, 0x60, - 0x20, 0x19, 0x00, 0x02, 0x60, 0x17, 0x00, 0x14, 0x10, 0x78, 0x9d, 0xd7, - 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0x09, 0x00, 0x3e, 0x00, 0x78, - 0x54, 0x55, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, 0x54, 0x55, 0x20, 0x09, - 0x00, 0x06, 0x00, 0x78, 0x54, 0x55, 0x20, 0x09, 0x00, 0x16, 0x00, 0x78, - 0x54, 0x55, 0x20, 0x09, 0x00, 0x01, 0x68, 0x54, 0xa0, 0x84, 0xff, 0x00, - 0xa1, 0x05, 0x68, 0x56, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x4a, 0x73, - 0x20, 0x91, 0x80, 0x01, 0x00, 0x7c, 0x10, 0x78, 0x13, 0xa4, 0x00, 0x7c, - 0x70, 0x2c, 0x71, 0x30, 0x81, 0x08, 0xa1, 0x02, 0x00, 0x48, 0x54, 0x71, - 0xa0, 0x0e, 0x70, 0x34, 0x70, 0x72, 0x70, 0x38, 0x70, 0x76, 0x00, 0x78, - 0x54, 0x7d, 0x70, 0x70, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x72, 0x00, 0xc8, - 0x54, 0x7d, 0x70, 0x74, 0xa0, 0x81, 0x00, 0x00, 0x70, 0x76, 0xa0, 0x85, - 0x00, 0x01, 0x79, 0x32, 0x71, 0x32, 0x00, 0x7c, 0x0d, 0x7e, 0x10, 0x78, - 0x5b, 0x1e, 0x0d, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0x11, 0x00, 0x04, - 0x22, 0x04, 0xa0, 0x85, 0x80, 0x02, 0x20, 0x12, 0x0d, 0x7f, 0x00, 0x7c, - 0x20, 0xe1, 0x00, 0x02, 0x3d, 0x08, 0x20, 0xe1, 0x20, 0x00, 0x3d, 0x00, - 0xa0, 0x84, 0x70, 0x00, 0x00, 0x40, 0x54, 0x9c, 0xa0, 0x86, 0x10, 0x00, - 0x00, 0xc0, 0x54, 0xd3, 0x20, 0xe1, 0x00, 0x00, 0x3d, 0x00, 0xa0, 0x94, - 0xff, 0x00, 0x82, 0x17, 0xa0, 0x84, 0xf0, 0x00, 0xa0, 0x86, 0x30, 0x00, - 0x00, 0xc0, 0x54, 0xb7, 0xa1, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0x86, - 0x00, 0x08, 0x00, 0xc0, 0x54, 0xd3, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, - 0x54, 0xd3, 0x10, 0x78, 0x56, 0xb2, 0x00, 0x78, 0x54, 0xce, 0x20, 0xe1, - 0x00, 0x04, 0x3d, 0x60, 0xd1, 0xbc, 0x00, 0xc0, 0x54, 0xbe, 0x3e, 0x60, - 0xac, 0x84, 0x00, 0x0f, 0x00, 0xc0, 0x54, 0xd3, 0xac, 0x82, 0xae, 0x00, - 0x00, 0x48, 0x54, 0xd3, 0x68, 0x58, 0xac, 0x02, 0x00, 0xc8, 0x54, 0xd3, - 0x20, 0x09, 0x00, 0x47, 0x10, 0x78, 0x77, 0x5c, 0x7a, 0x1c, 0xd2, 0x84, - 0x00, 0xc0, 0x54, 0x8e, 0x00, 0x7c, 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, - 0x00, 0x78, 0x54, 0xce, 0x00, 0x78, 0x54, 0xd3, 0x78, 0x1c, 0xd0, 0x8c, - 0x00, 0x40, 0x55, 0x02, 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x20, 0xe1, - 0x30, 0x00, 0x3d, 0x20, 0x3e, 0x28, 0xa5, 0x84, 0x00, 0x76, 0x00, 0xc0, - 0x55, 0x18, 0xa4, 0x84, 0x70, 0x00, 0xa0, 0x86, 0x10, 0x00, 0x00, 0xc0, - 0x55, 0x07, 0x10, 0x78, 0x55, 0x4e, 0x00, 0x40, 0x55, 0x18, 0x20, 0xe1, - 0x30, 0x00, 0x78, 0x28, 0x78, 0x28, 0x10, 0x78, 0x55, 0x6c, 0x14, 0x7f, - 0x13, 0x7f, 0x15, 0x7f, 0x20, 0x09, 0xa9, 0xb9, 0x21, 0x04, 0xa0, 0x05, - 0x00, 0xc0, 0x55, 0x03, 0x00, 0x7c, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, - 0x55, 0x02, 0xa4, 0x84, 0x70, 0x00, 0x00, 0xc0, 0x55, 0x18, 0x10, 0x78, - 0x55, 0x4e, 0x00, 0x40, 0x55, 0x2c, 0x70, 0x00, 0xa0, 0x84, 0xff, 0x00, - 0xa0, 0x86, 0x81, 0x00, 0x00, 0x40, 0x54, 0xf3, 0x00, 0x78, 0x55, 0x2c, - 0x10, 0x78, 0xa5, 0x5f, 0xd5, 0xa4, 0x00, 0x40, 0x55, 0x28, 0x04, 0x7e, - 0x10, 0x78, 0x1b, 0x22, 0x04, 0x7f, 0x20, 0xe1, 0x90, 0x10, 0x20, 0x01, - 0x01, 0x38, 0x22, 0x02, 0x00, 0x78, 0x55, 0x30, 0x10, 0x78, 0x55, 0x4e, - 0x68, 0x83, 0x00, 0x00, 0x20, 0xe1, 0x30, 0x00, 0x78, 0x28, 0x78, 0x28, - 0x10, 0x78, 0x55, 0x37, 0x14, 0x7f, 0x13, 0x7f, 0x15, 0x7f, 0x00, 0x78, - 0x55, 0x02, 0x20, 0x01, 0xa7, 0x0e, 0x20, 0x04, 0xd0, 0x8c, 0x00, 0x40, - 0x55, 0x4d, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, - 0x00, 0xc0, 0x55, 0x4d, 0x02, 0x7e, 0x03, 0x7e, 0x20, 0x11, 0x80, 0x48, - 0x25, 0x18, 0x10, 0x78, 0x36, 0x1b, 0x03, 0x7f, 0x02, 0x7f, 0x00, 0x7c, - 0xa4, 0x84, 0x01, 0xff, 0x68, 0x82, 0xa0, 0x05, 0x00, 0x40, 0x55, 0x60, - 0xa0, 0x80, 0x00, 0x1f, 0xa0, 0x84, 0x03, 0xf8, 0x80, 0xac, 0x20, 0xe1, - 0x10, 0x00, 0x2e, 0xa0, 0x20, 0x99, 0x02, 0x0a, 0x53, 0xa5, 0x00, 0x7c, - 0x20, 0xa9, 0x00, 0x0c, 0x20, 0xe1, 0x10, 0x00, 0x2e, 0xa0, 0x20, 0x99, - 0x02, 0x0a, 0x53, 0xa5, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x55, 0x5f, - 0x70, 0x00, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x8c, 0xf0, 0x00, 0x80, 0x07, - 0xa1, 0x96, 0x00, 0x00, 0x00, 0xc0, 0x55, 0x79, 0x00, 0x78, 0x57, 0xba, - 0x00, 0x7c, 0xa1, 0x96, 0x20, 0x00, 0x00, 0xc0, 0x55, 0x8a, 0x69, 0x00, - 0xa1, 0x8e, 0x00, 0x01, 0x00, 0xc0, 0x55, 0x86, 0x10, 0x78, 0x3a, 0xec, - 0x00, 0x78, 0x55, 0x78, 0x10, 0x78, 0x55, 0x92, 0x00, 0x78, 0x55, 0x78, - 0xa1, 0x96, 0x80, 0x00, 0x00, 0xc0, 0x55, 0x78, 0x10, 0x78, 0x58, 0x71, - 0x00, 0x78, 0x55, 0x78, 0x0c, 0x7e, 0x71, 0x10, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x96, 0x00, 0x01, 0x00, 0x40, 0x55, 0x9f, 0xa1, 0x96, - 0x00, 0x23, 0x00, 0xc0, 0x56, 0xaa, 0xa0, 0x8e, 0x00, 0x23, 0x00, 0xc0, - 0x55, 0xd4, 0x10, 0x78, 0x59, 0x1d, 0x00, 0x40, 0x56, 0xaa, 0x71, 0x24, - 0x61, 0x0a, 0x70, 0x30, 0xa0, 0x8e, 0x02, 0x00, 0x00, 0xc0, 0x55, 0xb8, - 0x70, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x56, 0xaa, 0x20, 0x09, 0x00, 0x15, - 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x56, 0xaa, 0xa0, 0x8e, 0x02, 0x14, - 0x00, 0x40, 0x55, 0xc0, 0xa0, 0x8e, 0x02, 0x10, 0x00, 0xc0, 0x55, 0xc6, - 0x20, 0x09, 0x00, 0x15, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x56, 0xaa, - 0xa0, 0x8e, 0x01, 0x00, 0x00, 0xc0, 0x56, 0xaa, 0x70, 0x34, 0xa0, 0x05, - 0x00, 0xc0, 0x56, 0xaa, 0x20, 0x09, 0x00, 0x16, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x78, 0x56, 0xaa, 0xa0, 0x8e, 0x00, 0x22, 0x00, 0xc0, 0x56, 0xaa, - 0x70, 0x30, 0xa0, 0x8e, 0x03, 0x00, 0x00, 0xc0, 0x55, 0xe5, 0x70, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x56, 0xaa, 0x20, 0x09, 0x00, 0x17, 0x00, 0x78, - 0x56, 0x76, 0xa0, 0x8e, 0x05, 0x00, 0x00, 0xc0, 0x55, 0xf1, 0x70, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x56, 0xaa, 0x20, 0x09, 0x00, 0x18, 0x00, 0x78, - 0x56, 0x76, 0xa0, 0x8e, 0x20, 0x10, 0x00, 0xc0, 0x55, 0xf9, 0x20, 0x09, - 0x00, 0x19, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, 0x21, 0x10, 0x00, 0xc0, - 0x56, 0x01, 0x20, 0x09, 0x00, 0x1a, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, - 0x52, 0x00, 0x00, 0xc0, 0x56, 0x0d, 0x70, 0x34, 0xa0, 0x05, 0x00, 0xc0, - 0x56, 0xaa, 0x20, 0x09, 0x00, 0x1b, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, - 0x50, 0x00, 0x00, 0xc0, 0x56, 0x19, 0x70, 0x34, 0xa0, 0x05, 0x00, 0xc0, - 0x56, 0xaa, 0x20, 0x09, 0x00, 0x1c, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, - 0x13, 0x00, 0x00, 0xc0, 0x56, 0x21, 0x20, 0x09, 0x00, 0x34, 0x00, 0x78, - 0x56, 0x76, 0xa0, 0x8e, 0x12, 0x00, 0x00, 0xc0, 0x56, 0x2d, 0x70, 0x34, - 0xa0, 0x05, 0x00, 0xc0, 0x56, 0xaa, 0x20, 0x09, 0x00, 0x24, 0x00, 0x78, - 0x56, 0x76, 0xa0, 0x8c, 0xff, 0x00, 0xa1, 0x8e, 0x24, 0x00, 0x00, 0xc0, - 0x56, 0x37, 0x20, 0x09, 0x00, 0x2d, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8c, - 0xff, 0x00, 0xa1, 0x8e, 0x53, 0x00, 0x00, 0xc0, 0x56, 0x41, 0x20, 0x09, - 0x00, 0x2a, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, 0x0f, 0x00, 0x00, 0xc0, - 0x56, 0x49, 0x20, 0x09, 0x00, 0x20, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, - 0x53, 0x00, 0x00, 0xc0, 0x56, 0x4f, 0x00, 0x78, 0x56, 0x6c, 0xa0, 0x8e, - 0x61, 0x04, 0x00, 0xc0, 0x56, 0x6c, 0x20, 0x11, 0xac, 0x8d, 0x82, 0x08, - 0x22, 0x04, 0xa0, 0x82, 0x00, 0x04, 0x20, 0xa8, 0x95, 0xac, 0x95, 0xac, - 0x20, 0x11, 0x80, 0x15, 0x21, 0x1c, 0x81, 0x08, 0x04, 0x7e, 0x21, 0x24, - 0x10, 0x78, 0x36, 0x1b, 0x04, 0x7f, 0x81, 0x08, 0x00, 0xf0, 0x56, 0x5c, - 0x20, 0x09, 0x00, 0x23, 0x00, 0x78, 0x56, 0x76, 0xa0, 0x8e, 0x60, 0x00, - 0x00, 0xc0, 0x56, 0x74, 0x20, 0x09, 0x00, 0x3f, 0x00, 0x78, 0x56, 0x76, - 0x20, 0x09, 0x00, 0x1d, 0x01, 0x7e, 0x20, 0x11, 0xac, 0x83, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x56, 0xac, - 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x56, 0xac, 0x66, 0x12, 0x65, 0x16, - 0x86, 0xff, 0x00, 0x40, 0x56, 0x9c, 0x01, 0x7f, 0x01, 0x7e, 0xa1, 0x86, - 0x00, 0x17, 0x00, 0xc0, 0x56, 0x9c, 0x68, 0x6c, 0xa6, 0x06, 0x00, 0xc0, - 0x56, 0x9c, 0x68, 0x70, 0xa5, 0x06, 0xa0, 0x84, 0xff, 0x00, 0x00, 0xc0, - 0x56, 0x9c, 0x60, 0x00, 0xc0, 0xf5, 0x60, 0x02, 0x0c, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x00, 0x40, 0x56, 0xaf, 0x01, 0x7f, 0x61, 0x1a, 0x60, 0x1f, - 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x01, 0x7f, 0x10, 0x78, 0x77, 0x5c, - 0x0c, 0x7f, 0x00, 0x7c, 0x01, 0x7f, 0x00, 0x78, 0x56, 0xaa, 0x0c, 0x7f, - 0x00, 0x78, 0x56, 0xac, 0x0c, 0x7e, 0x10, 0x78, 0x57, 0x0f, 0x00, 0xc0, - 0x57, 0x0d, 0xa2, 0x8e, 0x00, 0x33, 0x00, 0xc0, 0x56, 0xde, 0x10, 0x78, - 0x59, 0x1d, 0x00, 0x40, 0x57, 0x0d, 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, - 0xa0, 0x8e, 0x02, 0x00, 0x00, 0xc0, 0x56, 0xd0, 0x70, 0x34, 0xa0, 0x05, - 0x00, 0xc0, 0x57, 0x0d, 0x20, 0x09, 0x00, 0x15, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x78, 0x57, 0x0d, 0xa0, 0x8e, 0x01, 0x00, 0x00, 0xc0, 0x57, 0x0d, - 0x70, 0x34, 0xa0, 0x05, 0x00, 0xc0, 0x57, 0x0d, 0x20, 0x09, 0x00, 0x16, - 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x57, 0x0d, 0xa2, 0x8e, 0x00, 0x32, - 0x00, 0xc0, 0x57, 0x0d, 0x70, 0x30, 0xa0, 0x8e, 0x14, 0x00, 0x00, 0xc0, - 0x57, 0x0d, 0x20, 0x09, 0x00, 0x38, 0x01, 0x7e, 0x20, 0x11, 0xac, 0x83, - 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, - 0x57, 0x0c, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x57, 0x0c, 0x66, 0x12, - 0x65, 0x16, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, 0x57, 0x0b, - 0x01, 0x7f, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, - 0x01, 0x7f, 0x10, 0x78, 0x77, 0x5c, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, - 0x57, 0x0d, 0x0c, 0x7f, 0x01, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, - 0x0d, 0x7e, 0x02, 0x7e, 0x01, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x15, 0x7e, - 0x3c, 0x00, 0x00, 0x7e, 0x20, 0x79, 0x00, 0x30, 0x20, 0x69, 0x02, 0x00, - 0x10, 0x78, 0x1c, 0x6a, 0x00, 0xc0, 0x57, 0x50, 0x10, 0x78, 0x1b, 0x40, - 0x00, 0x40, 0x57, 0x5d, 0x79, 0x08, 0xa1, 0x8c, 0x1f, 0xff, 0xa1, 0x82, - 0x00, 0x11, 0x00, 0xc8, 0x57, 0x5a, 0x20, 0xa9, 0x00, 0x0c, 0x20, 0xe1, - 0x00, 0x00, 0x2e, 0xa0, 0x20, 0x99, 0x02, 0x0a, 0x53, 0xa5, 0x20, 0xe1, - 0x20, 0x00, 0x20, 0x01, 0x02, 0x0a, 0x20, 0x04, 0x7a, 0x0c, 0x78, 0x08, - 0xa0, 0x80, 0x00, 0x07, 0xa0, 0x84, 0x1f, 0xf8, 0xa0, 0x8a, 0x01, 0x40, - 0x10, 0xc8, 0x13, 0x32, 0x80, 0xac, 0x20, 0xe1, 0x60, 0x00, 0x20, 0x99, - 0x02, 0x0a, 0x53, 0xa5, 0x20, 0xe1, 0x70, 0x00, 0x68, 0x28, 0x68, 0x28, - 0x78, 0x03, 0x00, 0x04, 0xa2, 0x94, 0x00, 0x70, 0x00, 0x7f, 0x20, 0xe0, - 0x15, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x01, 0x7f, 0x02, 0x7f, 0x0d, 0x7f, - 0x0f, 0x7f, 0x00, 0x7c, 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x57, 0x50, 0x04, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, - 0x20, 0x28, 0x21, 0x30, 0xa6, 0x96, 0x00, 0xff, 0x00, 0xc0, 0x57, 0x82, - 0xa5, 0x96, 0xff, 0xfd, 0x00, 0xc0, 0x57, 0x72, 0x20, 0x09, 0x00, 0x7f, - 0x00, 0x78, 0x57, 0xb5, 0xa5, 0x96, 0xff, 0xfe, 0x00, 0xc0, 0x57, 0x7a, - 0x20, 0x09, 0x00, 0x7e, 0x00, 0x78, 0x57, 0xb5, 0xa5, 0x96, 0xff, 0xfc, - 0x00, 0xc0, 0x57, 0x82, 0x20, 0x09, 0x00, 0x80, 0x00, 0x78, 0x57, 0xb5, - 0x20, 0x11, 0x00, 0x00, 0x20, 0x21, 0x00, 0x81, 0x20, 0xa9, 0x00, 0x7e, - 0x20, 0x71, 0xa8, 0xb6, 0x2e, 0x1c, 0x83, 0xff, 0x00, 0xc0, 0x57, 0x94, - 0x82, 0xff, 0x00, 0xc0, 0x57, 0xa9, 0x24, 0x10, 0x00, 0x78, 0x57, 0xa9, - 0x23, 0x68, 0x6f, 0x10, 0x00, 0x7e, 0x21, 0x00, 0xa7, 0x06, 0x00, 0x7f, - 0x6b, 0x14, 0x00, 0xc0, 0x57, 0xa3, 0xa3, 0x46, 0x00, 0xc0, 0x57, 0xa3, - 0x24, 0x08, 0x00, 0x78, 0x57, 0xb5, 0x87, 0xff, 0x00, 0xc0, 0x57, 0xa9, - 0x83, 0xff, 0x00, 0x40, 0x57, 0x8e, 0x84, 0x20, 0x8e, 0x70, 0x00, 0xf0, - 0x57, 0x8a, 0x82, 0xff, 0x00, 0xc0, 0x57, 0xb4, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x78, 0x57, 0xb6, 0x22, 0x08, 0xa0, 0x06, 0x0d, 0x7f, 0x0e, 0x7f, - 0x04, 0x7f, 0x00, 0x7c, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x57, 0xbf, - 0x00, 0x7c, 0x57, 0xc7, 0x57, 0xc7, 0x57, 0xc7, 0x59, 0x33, 0x57, 0xc7, - 0x57, 0xc8, 0x57, 0xe1, 0x58, 0x58, 0x00, 0x7c, 0x71, 0x10, 0xd1, 0xbc, - 0x00, 0x40, 0x57, 0xe0, 0x71, 0x20, 0x21, 0x60, 0xac, 0x8c, 0x00, 0x0f, - 0x00, 0xc0, 0x57, 0xe0, 0xac, 0x8a, 0xae, 0x00, 0x00, 0x48, 0x57, 0xe0, - 0x68, 0x58, 0xac, 0x02, 0x00, 0xc8, 0x57, 0xe0, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x46, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, 0x0c, 0x7e, - 0xa4, 0x84, 0x01, 0xff, 0x00, 0x40, 0x58, 0x33, 0x71, 0x10, 0xd1, 0xbc, - 0x00, 0xc0, 0x58, 0x33, 0x20, 0x11, 0xac, 0x83, 0x22, 0x04, 0x82, 0x11, - 0x22, 0x0c, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x58, 0x33, 0x10, 0x78, - 0x45, 0x5c, 0x00, 0xc0, 0x58, 0x33, 0x66, 0x12, 0x65, 0x16, 0x60, 0x00, - 0xd0, 0xec, 0x00, 0xc0, 0x58, 0x33, 0x62, 0x04, 0xa2, 0x94, 0xff, 0x00, - 0x82, 0x17, 0xa2, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x58, 0x18, 0x0c, 0x7e, - 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x58, 0x35, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x22, - 0x20, 0x09, 0x00, 0x44, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x58, 0x33, - 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x58, 0x33, - 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0xa2, 0x86, - 0x00, 0x04, 0x00, 0xc0, 0x58, 0x2b, 0x60, 0x07, 0x00, 0x05, 0x00, 0x78, - 0x58, 0x2d, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0xd7, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7f, 0x00, 0x7c, 0x20, 0x01, - 0xa7, 0x0d, 0x20, 0x04, 0xd0, 0xec, 0x00, 0x40, 0x58, 0x3f, 0x20, 0x11, - 0x80, 0x49, 0x10, 0x78, 0x36, 0x1b, 0x0c, 0x7e, 0x10, 0x78, 0x91, 0x97, - 0x01, 0x7f, 0x00, 0x40, 0x58, 0x33, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x06, - 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x22, 0x60, 0x13, 0x03, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x10, 0x78, 0x5d, 0x8a, - 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x58, 0x33, 0x71, 0x10, 0xd1, 0xbc, - 0x00, 0x40, 0x58, 0x70, 0x70, 0x20, 0x20, 0x60, 0xac, 0x84, 0x00, 0x0f, - 0x00, 0xc0, 0x58, 0x70, 0xac, 0x82, 0xae, 0x00, 0x00, 0x48, 0x58, 0x70, - 0x68, 0x58, 0xac, 0x02, 0x00, 0xc8, 0x58, 0x70, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x45, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, 0x00, 0x7e, - 0x10, 0x78, 0x29, 0xbb, 0x00, 0x7f, 0x00, 0xc0, 0x58, 0x87, 0x71, 0x10, - 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x8e, 0x00, 0x00, 0x00, 0xc0, - 0x58, 0x87, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x8a, 0x00, 0x06, 0x00, 0xc8, - 0x58, 0x87, 0x10, 0x79, 0x58, 0x88, 0x00, 0x7c, 0x58, 0x8e, 0x58, 0x8f, - 0x58, 0x8e, 0x58, 0x8e, 0x58, 0xff, 0x59, 0x0e, 0x00, 0x7c, 0x71, 0x10, - 0xd1, 0xbc, 0x00, 0x40, 0x58, 0x97, 0x70, 0x2c, 0xd0, 0x84, 0x00, 0x40, - 0x58, 0xfe, 0x70, 0x0c, 0x71, 0x08, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, - 0x58, 0xfe, 0x10, 0x78, 0x45, 0x5c, 0x00, 0xc0, 0x58, 0xfe, 0x66, 0x12, - 0x65, 0x16, 0x62, 0x04, 0x71, 0x10, 0xd1, 0xbc, 0x00, 0x40, 0x58, 0xc9, - 0xa2, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x04, 0x00, 0x40, 0x58, 0xb2, - 0xa1, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x58, 0xef, 0x0c, 0x7e, 0x10, 0x78, - 0x59, 0x1d, 0x0c, 0x7f, 0x00, 0x40, 0x58, 0xfe, 0x0c, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x58, 0xfe, 0x61, 0x1a, 0x60, 0x1f, - 0x00, 0x02, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x88, 0x10, 0x78, - 0x77, 0x5c, 0x00, 0x78, 0x58, 0xfe, 0xa2, 0x8c, 0x00, 0xff, 0xa1, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x58, 0xde, 0xa1, 0x86, 0x00, 0x04, 0x00, 0x40, - 0x58, 0xde, 0xa2, 0x94, 0xff, 0x00, 0x82, 0x17, 0xa2, 0x86, 0x00, 0x04, - 0x00, 0x40, 0x58, 0xde, 0xa2, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x58, 0xef, - 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x58, 0xfe, - 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x05, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, - 0x00, 0x88, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x58, 0xfe, 0x0c, 0x7e, - 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x58, 0xfe, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x01, - 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, 0x71, 0x10, 0xd1, 0xbc, 0x00, 0x40, - 0x59, 0x0d, 0x10, 0x78, 0x59, 0x1d, 0x00, 0x40, 0x59, 0x0d, 0x71, 0x24, - 0x61, 0x0a, 0x20, 0x09, 0x00, 0x89, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, - 0x71, 0x10, 0xd1, 0xbc, 0x00, 0x40, 0x59, 0x1c, 0x10, 0x78, 0x59, 0x1d, - 0x00, 0x40, 0x59, 0x1c, 0x71, 0x24, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x8a, - 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, 0x70, 0x20, 0x20, 0x60, 0xac, 0x84, - 0x00, 0x0f, 0x00, 0xc0, 0x59, 0x30, 0xac, 0x82, 0xae, 0x00, 0x00, 0x48, - 0x59, 0x30, 0x20, 0x01, 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, - 0x59, 0x30, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, - 0x59, 0x2f, 0x71, 0x10, 0xd1, 0xbc, 0x00, 0xc0, 0x59, 0x49, 0x70, 0x24, - 0x20, 0x60, 0xac, 0x84, 0x00, 0x0f, 0x00, 0xc0, 0x59, 0x49, 0xac, 0x82, - 0xae, 0x00, 0x00, 0x48, 0x59, 0x49, 0x68, 0x58, 0xac, 0x02, 0x00, 0xc8, - 0x59, 0x49, 0x20, 0x09, 0x00, 0x51, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, - 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x03, 0x00, 0x03, 0x70, 0x0f, 0x03, 0x61, - 0xa0, 0x06, 0x70, 0x1a, 0x70, 0x12, 0x70, 0x17, 0xae, 0x00, 0x70, 0x07, - 0x00, 0x00, 0x70, 0x26, 0x70, 0x2b, 0x6e, 0x1c, 0x70, 0x32, 0x70, 0x37, - 0x6e, 0x70, 0x70, 0x3b, 0x00, 0x02, 0x70, 0x3f, 0x00, 0x00, 0x70, 0x43, - 0xff, 0xff, 0x70, 0x47, 0xff, 0xff, 0x00, 0x7c, 0x20, 0x71, 0xa9, 0xc4, - 0x00, 0xe0, 0x5a, 0x32, 0x20, 0x91, 0x60, 0x00, 0x70, 0x0c, 0x80, 0x01, - 0x70, 0x0e, 0x00, 0xc0, 0x59, 0xde, 0x70, 0x0f, 0x03, 0x61, 0x70, 0x07, - 0x00, 0x01, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x71, 0x38, 0x81, 0x09, - 0x71, 0x3a, 0x00, 0xc0, 0x59, 0xdc, 0x70, 0x3b, 0x00, 0x02, 0x20, 0x09, - 0x01, 0x00, 0x21, 0x04, 0xa0, 0x82, 0x00, 0x03, 0x00, 0xc8, 0x59, 0xdc, - 0x70, 0x3c, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x59, 0xb9, 0x0d, 0x7e, - 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, 0xa0, 0x84, 0x40, 0x00, 0x00, 0x40, - 0x59, 0x97, 0x68, 0x03, 0x10, 0x00, 0x00, 0x78, 0x59, 0x9e, 0x68, 0x04, - 0xa0, 0x84, 0x10, 0x00, 0x00, 0x40, 0x59, 0x9e, 0x68, 0x03, 0x01, 0x00, - 0x68, 0x03, 0x00, 0x00, 0x70, 0x3f, 0x00, 0x00, 0x20, 0x69, 0xa9, 0xb1, - 0x68, 0x04, 0xa0, 0x82, 0x00, 0x06, 0x00, 0xc0, 0x59, 0xab, 0x68, 0x07, - 0x00, 0x00, 0x68, 0x30, 0xa0, 0x82, 0x00, 0x03, 0x00, 0xc0, 0x59, 0xb2, - 0x68, 0x33, 0x00, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x10, 0x78, 0x63, 0x9b, - 0x0d, 0x7f, 0x00, 0x78, 0x59, 0xdc, 0x0d, 0x7e, 0x20, 0x69, 0xa7, 0x00, - 0x69, 0x48, 0x68, 0x64, 0xa1, 0x02, 0x00, 0xc8, 0x59, 0xdb, 0x20, 0x69, - 0xa9, 0xb1, 0x68, 0x04, 0xa0, 0x86, 0x00, 0x00, 0x00, 0xc0, 0x59, 0xdb, - 0x68, 0x30, 0xa0, 0x86, 0x00, 0x00, 0x00, 0xc0, 0x59, 0xdb, 0x70, 0x3f, - 0x00, 0x01, 0x68, 0x07, 0x00, 0x06, 0x68, 0x33, 0x00, 0x03, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x30, 0x68, 0x9e, 0x20, 0x69, 0x01, 0x40, 0x68, 0x03, - 0x06, 0x00, 0x0d, 0x7f, 0x00, 0x78, 0x59, 0xe1, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x24, 0xa0, 0x0d, 0x00, 0x40, 0x59, 0xf9, 0x70, 0x20, - 0x80, 0x01, 0x70, 0x22, 0x00, 0xc0, 0x59, 0xf9, 0x70, 0x23, 0x00, 0x09, - 0x81, 0x09, 0x71, 0x26, 0xa1, 0x86, 0x03, 0xe8, 0x00, 0xc0, 0x59, 0xf4, - 0x70, 0x28, 0x10, 0x7a, 0x81, 0xff, 0x00, 0xc0, 0x59, 0xf9, 0x70, 0x28, - 0x10, 0x7a, 0x70, 0x30, 0xa0, 0x0d, 0x00, 0x40, 0x5a, 0x10, 0x70, 0x2c, - 0x80, 0x01, 0x70, 0x2e, 0x00, 0xc0, 0x5a, 0x10, 0x70, 0x2f, 0x00, 0x09, - 0x81, 0x09, 0x71, 0x32, 0x00, 0x40, 0x5a, 0x0e, 0xa1, 0x84, 0x00, 0x7f, - 0x10, 0x40, 0x6e, 0xa2, 0x00, 0x78, 0x5a, 0x10, 0x70, 0x34, 0x10, 0x7a, - 0x70, 0x40, 0xa0, 0x05, 0x00, 0x40, 0x5a, 0x18, 0x00, 0x50, 0x5a, 0x18, - 0x80, 0x01, 0x70, 0x42, 0x70, 0x44, 0xa0, 0x05, 0x00, 0x40, 0x5a, 0x20, - 0x00, 0x50, 0x5a, 0x20, 0x80, 0x01, 0x70, 0x46, 0x70, 0x18, 0xa0, 0x0d, - 0x00, 0x40, 0x5a, 0x31, 0x70, 0x08, 0x80, 0x01, 0x70, 0x0a, 0x00, 0xc0, - 0x5a, 0x31, 0x70, 0x0b, 0x00, 0x09, 0x81, 0x09, 0x71, 0x1a, 0x00, 0xc0, - 0x5a, 0x31, 0x70, 0x1c, 0x10, 0x7a, 0x12, 0x7f, 0x70, 0x04, 0x00, 0x79, - 0x5a, 0x35, 0x5a, 0x5c, 0x5a, 0x5d, 0x5a, 0x79, 0x0e, 0x7e, 0x20, 0x71, - 0xa9, 0xc4, 0x70, 0x18, 0xa0, 0x05, 0x00, 0xc0, 0x5a, 0x43, 0x71, 0x1a, - 0x72, 0x1e, 0x70, 0x0b, 0x00, 0x09, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x00, 0x7e, 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x1c, 0xa2, 0x06, 0x00, 0xc0, - 0x5a, 0x4f, 0x70, 0x1a, 0x70, 0x1e, 0x00, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xc4, 0x60, 0x88, 0xa1, 0x02, 0x00, 0x48, - 0x5a, 0x5a, 0x61, 0x8a, 0x0e, 0x7f, 0x00, 0x7c, 0x00, 0x7c, 0x71, 0x10, - 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x5a, 0x6f, 0x60, 0x88, 0x80, 0x01, - 0x00, 0x48, 0x5a, 0x6f, 0x60, 0x8a, 0x00, 0xc0, 0x5a, 0x6f, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x81, 0x08, - 0xa1, 0x82, 0x00, 0xff, 0x00, 0x48, 0x5a, 0x77, 0xa0, 0x0e, 0x70, 0x07, - 0x00, 0x02, 0x71, 0x12, 0x00, 0x7c, 0x70, 0x14, 0x20, 0x60, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x3c, 0xa0, 0x05, 0x00, 0x40, 0x5a, 0x88, - 0x80, 0x01, 0x60, 0x3e, 0x00, 0xc0, 0x5a, 0x88, 0x10, 0x78, 0x8f, 0xac, - 0x60, 0x14, 0xa0, 0x05, 0x00, 0x40, 0x5a, 0xb2, 0x80, 0x01, 0x60, 0x16, - 0x00, 0xc0, 0x5a, 0xb2, 0x61, 0x1c, 0xa1, 0x86, 0x00, 0x03, 0x00, 0x40, - 0x5a, 0x99, 0xa1, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x5a, 0xb0, 0x60, 0x10, - 0x20, 0x68, 0x68, 0x54, 0xa0, 0x8a, 0x19, 0x9a, 0x00, 0x48, 0x5a, 0xb0, - 0xa0, 0x82, 0x19, 0x99, 0x68, 0x56, 0xa0, 0x8a, 0x19, 0x9a, 0x00, 0x48, - 0x5a, 0xa9, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0xa1, 0x08, 0x61, 0x16, 0x00, 0x78, 0x5a, 0xb2, 0x10, 0x78, 0x8a, 0xce, - 0x12, 0x7f, 0xac, 0x88, 0x00, 0x10, 0x71, 0x16, 0x20, 0x01, 0xce, 0x00, - 0xa1, 0x02, 0x00, 0x48, 0x5a, 0xbf, 0x70, 0x17, 0xae, 0x00, 0x70, 0x07, - 0x00, 0x00, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xc4, 0x70, 0x27, - 0x07, 0xd0, 0x70, 0x23, 0x00, 0x09, 0x70, 0x3b, 0x00, 0x02, 0x0e, 0x7f, - 0x00, 0x7c, 0x20, 0x01, 0xa9, 0xcd, 0x20, 0x03, 0x00, 0x00, 0x00, 0x7c, - 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xc4, 0x71, 0x32, 0x70, 0x2f, 0x00, 0x09, - 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0x11, 0xa9, 0xd0, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xc4, 0x71, 0x1a, 0x72, 0x1e, - 0x70, 0x0b, 0x00, 0x09, 0x0e, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x0e, 0x7e, - 0x0f, 0x7e, 0x20, 0x79, 0xa7, 0x00, 0x7a, 0x34, 0xd2, 0x94, 0x00, 0x40, - 0x5b, 0x15, 0x20, 0x71, 0xa9, 0xac, 0x2e, 0x14, 0xa0, 0xfe, 0x00, 0x00, - 0x00, 0x40, 0x5b, 0x02, 0xa0, 0xfe, 0x00, 0x01, 0x00, 0x40, 0x5b, 0x06, - 0xa0, 0xfe, 0x00, 0x02, 0x00, 0xc0, 0x5b, 0x11, 0xa2, 0x92, 0x00, 0x85, - 0x00, 0x78, 0x5b, 0x08, 0xa2, 0x92, 0x00, 0x05, 0x00, 0x78, 0x5b, 0x08, - 0xa2, 0x92, 0x00, 0x02, 0x22, 0x72, 0x00, 0x40, 0x5b, 0x0d, 0x00, 0xc8, - 0x5b, 0x15, 0x20, 0x11, 0x80, 0x37, 0x10, 0x78, 0x36, 0x1b, 0x20, 0x11, - 0xa9, 0xab, 0x22, 0x04, 0x20, 0x72, 0x0f, 0x7f, 0x0e, 0x7f, 0x02, 0x7f, - 0x00, 0x7c, 0x0c, 0x7e, 0x20, 0x61, 0xaa, 0x33, 0x0c, 0x7f, 0x00, 0x7c, - 0xa1, 0x84, 0x00, 0x0f, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0xa0, 0x80, - 0xaa, 0x33, 0x20, 0x60, 0x00, 0x7c, 0x68, 0x54, 0xa0, 0x8a, 0x19, 0x9a, - 0x00, 0x48, 0x5b, 0x2e, 0x20, 0x01, 0x19, 0x99, 0xa0, 0x05, 0x00, 0xc0, - 0x5b, 0x3d, 0x0c, 0x7e, 0x20, 0x61, 0xaa, 0x33, 0x60, 0x14, 0x0c, 0x7f, - 0xa0, 0x05, 0x00, 0xc0, 0x5b, 0x42, 0x20, 0x01, 0x00, 0x1e, 0x00, 0x78, - 0x5b, 0x42, 0xa0, 0x8e, 0xff, 0xff, 0x00, 0xc0, 0x5b, 0x42, 0xa0, 0x06, - 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, 0x61, 0x16, 0x68, 0x4c, - 0xa0, 0x8c, 0x00, 0xc0, 0xa1, 0x8e, 0x00, 0xc0, 0x00, 0x40, 0x5b, 0x9e, - 0xd0, 0xb4, 0x00, 0xc0, 0x5b, 0x59, 0xd0, 0xbc, 0x00, 0xc0, 0x5b, 0x8b, - 0x20, 0x09, 0x00, 0x06, 0x10, 0x78, 0x5b, 0xc3, 0x00, 0x7c, 0xd0, 0xfc, - 0x00, 0x40, 0x5b, 0x64, 0xa0, 0x84, 0x00, 0x03, 0x00, 0x40, 0x5b, 0x64, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x5b, 0xbc, 0x60, 0x24, 0xd0, 0xd4, - 0x00, 0x40, 0x5b, 0x6e, 0xc0, 0xd4, 0x60, 0x26, 0x68, 0x60, 0x60, 0x2a, - 0x68, 0x5c, 0x60, 0x2e, 0x20, 0x09, 0xa7, 0x74, 0x21, 0x04, 0xd0, 0x84, - 0x00, 0x40, 0x5b, 0x83, 0x61, 0x18, 0xa1, 0x88, 0x00, 0x27, 0x21, 0x04, - 0xd0, 0x8c, 0x00, 0xc0, 0x5b, 0x83, 0x87, 0xff, 0x00, 0xc0, 0x5b, 0x82, - 0x20, 0x09, 0x00, 0x42, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x7c, 0x87, 0xff, - 0x00, 0xc0, 0x5b, 0x8a, 0x20, 0x09, 0x00, 0x43, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x7c, 0xd0, 0xfc, 0x00, 0x40, 0x5b, 0x96, 0xa0, 0x84, 0x00, 0x03, - 0x00, 0x40, 0x5b, 0x96, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x5b, 0xbc, - 0x87, 0xff, 0x00, 0xc0, 0x5b, 0x9d, 0x20, 0x09, 0x00, 0x42, 0x10, 0x78, - 0x77, 0x5c, 0x00, 0x7c, 0xd0, 0xfc, 0x00, 0x40, 0x5b, 0xaf, 0xa0, 0x84, - 0x00, 0x03, 0xa0, 0x8e, 0x00, 0x02, 0x00, 0x40, 0x5b, 0xb3, 0x87, 0xff, - 0x00, 0xc0, 0x5b, 0xae, 0x20, 0x09, 0x00, 0x41, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x7c, 0x10, 0x78, 0x5b, 0xc1, 0x00, 0x78, 0x5b, 0xae, 0x87, 0xff, - 0x00, 0xc0, 0x5b, 0xae, 0x20, 0x09, 0x00, 0x43, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x78, 0x5b, 0xae, 0x20, 0x09, 0x00, 0x04, 0x10, 0x78, 0x5b, 0xc3, - 0x00, 0x7c, 0x20, 0x09, 0x00, 0x01, 0x0d, 0x7e, 0x60, 0x10, 0xa0, 0xec, - 0xf0, 0x00, 0x00, 0x40, 0x5b, 0xef, 0x20, 0x68, 0x69, 0x52, 0x68, 0x00, - 0x60, 0x12, 0xa1, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x5b, 0xe5, 0x69, 0x4c, - 0xa1, 0x8c, 0x81, 0x00, 0xa1, 0x8e, 0x81, 0x00, 0x00, 0xc0, 0x5b, 0xe5, - 0x0c, 0x7e, 0x20, 0x61, 0xaa, 0x33, 0x62, 0x00, 0xd2, 0x8c, 0x00, 0xc0, - 0x5b, 0xe4, 0x62, 0x04, 0x82, 0x10, 0x00, 0x48, 0x5b, 0xe4, 0x62, 0x06, - 0x0c, 0x7f, 0x10, 0x78, 0x4a, 0x73, 0x60, 0x10, 0xa0, 0x6d, 0x07, 0x7e, - 0x20, 0x39, 0x00, 0x00, 0x10, 0xc0, 0x5b, 0x27, 0x07, 0x7f, 0x0d, 0x7f, - 0x00, 0x7c, 0x15, 0x7e, 0x0c, 0x7e, 0x20, 0x61, 0xaa, 0x33, 0x60, 0x00, - 0x81, 0xff, 0x00, 0x40, 0x5b, 0xfc, 0xa2, 0x05, 0x00, 0x78, 0x5b, 0xfd, - 0xa2, 0x04, 0x60, 0x02, 0x0c, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x68, 0x00, - 0xd0, 0x8c, 0x00, 0xc0, 0x5c, 0x0d, 0x68, 0x08, 0xa0, 0x05, 0x00, 0x40, - 0x5c, 0x0d, 0x80, 0x01, 0x68, 0x0a, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, - 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x06, 0x80, 0x04, 0x80, 0x86, 0x81, 0x8e, - 0x00, 0xc8, 0x5c, 0x17, 0xa2, 0x00, 0x00, 0xf0, 0x5c, 0x12, 0x80, 0x86, - 0x81, 0x8e, 0x00, 0x7c, 0x15, 0x7e, 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x05, - 0x00, 0x40, 0x5c, 0x3d, 0xa1, 0x1a, 0x00, 0xc8, 0x5c, 0x3d, 0x82, 0x13, - 0x81, 0x8d, 0x00, 0x48, 0x5c, 0x30, 0xa1, 0x1a, 0x00, 0xc8, 0x5c, 0x31, - 0x00, 0xf0, 0x5c, 0x25, 0x00, 0x78, 0x5c, 0x35, 0xa1, 0x1a, 0x23, 0x08, - 0x82, 0x10, 0x00, 0xf0, 0x5c, 0x25, 0x00, 0x7e, 0x32, 0x00, 0xa0, 0x84, - 0xf7, 0xff, 0x20, 0x80, 0x00, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x00, 0x7e, - 0x32, 0x00, 0xa0, 0x85, 0x08, 0x00, 0x00, 0x78, 0x5c, 0x39, 0x12, 0x7e, - 0x20, 0x91, 0x22, 0x00, 0x20, 0x79, 0xa9, 0xb1, 0x12, 0x7f, 0x0d, 0x7e, - 0x20, 0x69, 0xa9, 0xb1, 0x68, 0x03, 0x00, 0x05, 0x20, 0x69, 0x00, 0x04, - 0x2d, 0x04, 0xa0, 0x85, 0x80, 0x01, 0x20, 0x6a, 0x0d, 0x7f, 0x00, 0x7c, - 0x0c, 0x7e, 0x60, 0x27, 0x00, 0x01, 0x78, 0x04, 0xa0, 0x84, 0x00, 0x07, - 0x00, 0x79, 0x5c, 0x5e, 0x5c, 0x68, 0x5c, 0x8d, 0x5c, 0xe8, 0x5c, 0x6e, - 0x5c, 0x8d, 0x5c, 0x68, 0x5c, 0x66, 0x5c, 0x66, 0x10, 0x78, 0x13, 0x32, - 0x10, 0x78, 0x5a, 0xcb, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7f, 0x00, 0x7c, - 0x62, 0xc0, 0x82, 0xff, 0x00, 0xc0, 0x5c, 0x74, 0x0c, 0x7f, 0x00, 0x7c, - 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x78, 0x28, 0xa0, 0x92, - 0x00, 0xc8, 0x00, 0xc8, 0x5c, 0x83, 0x80, 0x00, 0x78, 0x2a, 0x10, 0x78, - 0x42, 0x1b, 0x00, 0x78, 0x5c, 0x72, 0x10, 0x78, 0x41, 0xdc, 0x78, 0x07, - 0x00, 0x03, 0x78, 0x27, 0x00, 0x00, 0x78, 0x2b, 0x00, 0x00, 0x00, 0x78, - 0x5c, 0x72, 0x10, 0x78, 0x5a, 0xcb, 0x3c, 0x00, 0x00, 0x7e, 0x20, 0x11, - 0x02, 0x09, 0x20, 0xe1, 0x40, 0x00, 0x22, 0x14, 0x00, 0x7f, 0x20, 0xe0, - 0x82, 0xff, 0x00, 0x40, 0x5c, 0xab, 0x62, 0xc0, 0x82, 0xff, 0x00, 0xc0, - 0x5c, 0xab, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x24, 0xa0, 0x65, 0x10, 0x40, - 0x13, 0x32, 0x20, 0x09, 0x00, 0x13, 0x10, 0x78, 0x77, 0x5c, 0x0c, 0x7f, - 0x00, 0x7c, 0x39, 0x00, 0xa0, 0x82, 0xaa, 0xe3, 0x00, 0xc8, 0x5c, 0xb2, - 0x10, 0x78, 0x74, 0x7a, 0x0c, 0x7e, 0x78, 0x24, 0xa0, 0x65, 0x10, 0x40, - 0x13, 0x32, 0x78, 0x04, 0xa0, 0x86, 0x00, 0x04, 0x00, 0x40, 0x5d, 0x2d, - 0x78, 0x28, 0xa0, 0x92, 0x27, 0x10, 0x00, 0xc8, 0x5c, 0xc8, 0x80, 0x00, - 0x78, 0x2a, 0x0c, 0x7f, 0x10, 0x78, 0x6e, 0x01, 0x00, 0x78, 0x5c, 0xa9, - 0x61, 0x04, 0xa1, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x5c, 0xdf, 0x0e, 0x7e, - 0x20, 0x71, 0xa7, 0x00, 0x70, 0xd8, 0x0e, 0x7f, 0xd0, 0x8c, 0x00, 0x40, - 0x5c, 0xdf, 0x0c, 0x7e, 0x0e, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0xa7, 0x00, 0x10, 0x78, 0x42, 0x24, 0x0e, 0x7f, 0x0c, 0x7f, 0x10, 0x78, - 0xa5, 0xd4, 0x20, 0x09, 0x00, 0x14, 0x10, 0x78, 0x77, 0x5c, 0x0c, 0x7f, - 0x00, 0x78, 0x5c, 0xa9, 0x20, 0x01, 0xa9, 0xcd, 0x20, 0x03, 0x00, 0x00, - 0x62, 0xc0, 0x82, 0xff, 0x00, 0xc0, 0x5c, 0xfc, 0x78, 0x2b, 0x00, 0x00, - 0x78, 0x24, 0xa0, 0x65, 0x10, 0x40, 0x13, 0x32, 0x20, 0x09, 0x00, 0x13, - 0x10, 0x78, 0x77, 0xb3, 0x0c, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x0d, 0x7e, - 0x39, 0x00, 0xa0, 0x82, 0xaa, 0xe3, 0x00, 0xc8, 0x5d, 0x05, 0x10, 0x78, - 0x74, 0x7a, 0x78, 0x24, 0xa0, 0x05, 0x10, 0x40, 0x13, 0x32, 0x78, 0x1c, - 0xa0, 0x6d, 0x10, 0x40, 0x13, 0x32, 0x68, 0x00, 0xc0, 0xdc, 0x68, 0x02, - 0x79, 0x24, 0x21, 0x60, 0x10, 0x78, 0x77, 0x2d, 0x69, 0x3c, 0x81, 0xff, - 0x10, 0x40, 0x13, 0x32, 0x81, 0x09, 0x69, 0x3e, 0x68, 0x54, 0xa0, 0x15, - 0x00, 0x40, 0x5d, 0x21, 0x7a, 0x1e, 0x00, 0x78, 0x5d, 0x23, 0x79, 0x18, - 0x79, 0x1e, 0x78, 0x07, 0x00, 0x00, 0x78, 0x27, 0x00, 0x00, 0x0d, 0x7f, - 0x0c, 0x7f, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x5c, 0xfa, 0x61, 0x04, - 0xa1, 0x86, 0x00, 0x02, 0x00, 0x40, 0x5d, 0x38, 0xa1, 0x86, 0x00, 0x04, - 0x00, 0x40, 0x5d, 0x38, 0x00, 0x78, 0x5c, 0xbc, 0x78, 0x08, 0xac, 0x06, - 0x00, 0x40, 0x5c, 0xbc, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x5d, 0xd7, - 0x0c, 0x7f, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x5c, 0xa9, 0x0c, 0x7e, - 0x60, 0x27, 0x00, 0x02, 0x62, 0xc8, 0x82, 0xff, 0x00, 0xc0, 0x5d, 0x61, - 0x62, 0xc4, 0x82, 0xff, 0x00, 0xc0, 0x5d, 0x61, 0x79, 0x3c, 0xa1, 0xe5, - 0x00, 0x00, 0x00, 0x40, 0x5d, 0x5b, 0x20, 0x09, 0x00, 0x49, 0x10, 0x78, - 0x77, 0x5c, 0x0c, 0x7f, 0x00, 0x7c, 0x20, 0x11, 0xa9, 0xd0, 0x20, 0x13, - 0x00, 0x00, 0x00, 0x78, 0x5d, 0x59, 0x39, 0x08, 0xa1, 0x92, 0xaa, 0xe3, - 0x00, 0xc8, 0x5d, 0x68, 0x10, 0x78, 0x74, 0x7a, 0x60, 0x17, 0x00, 0x10, - 0x79, 0x3c, 0x81, 0xff, 0x00, 0x40, 0x5d, 0x5b, 0x79, 0x44, 0xa1, 0x92, - 0x75, 0x30, 0x00, 0xc8, 0x5d, 0x85, 0x81, 0x08, 0x79, 0x46, 0x79, 0x3c, - 0xa1, 0x88, 0x00, 0x07, 0x21, 0x0c, 0xa1, 0x8e, 0x00, 0x06, 0x00, 0xc0, - 0x5d, 0x81, 0x60, 0x17, 0x00, 0x12, 0x00, 0x78, 0x5d, 0x59, 0x60, 0x17, - 0x00, 0x16, 0x00, 0x78, 0x5d, 0x59, 0x78, 0x48, 0xc0, 0x85, 0x78, 0x4a, - 0x00, 0x78, 0x5d, 0x59, 0x00, 0x7e, 0x01, 0x7e, 0x0c, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, - 0xa9, 0xb1, 0x60, 0x20, 0x80, 0x00, 0x60, 0x22, 0x60, 0x10, 0xa0, 0x05, - 0x00, 0x40, 0x5d, 0xa5, 0xa0, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x12, - 0x12, 0x7f, 0x0c, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x61, 0x16, - 0x61, 0x12, 0x00, 0x78, 0x5d, 0xa0, 0x0d, 0x7e, 0x20, 0x69, 0xa9, 0xb1, - 0x60, 0x00, 0xd0, 0xd4, 0x00, 0x40, 0x5d, 0xbe, 0x68, 0x20, 0x80, 0x00, - 0x68, 0x22, 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x5d, 0xb9, 0x2c, 0x00, - 0x68, 0x1e, 0x68, 0x04, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x62, 0xd9, - 0xc0, 0xd5, 0x60, 0x02, 0x68, 0x18, 0xa0, 0x05, 0x00, 0x40, 0x5d, 0xd0, - 0x60, 0x56, 0x60, 0x5b, 0x00, 0x00, 0x00, 0x7e, 0x2c, 0x00, 0x68, 0x1a, - 0x0d, 0x7f, 0x68, 0x5a, 0x20, 0x69, 0xa9, 0xb1, 0x00, 0x78, 0x5d, 0xb0, - 0x60, 0x56, 0x60, 0x5a, 0x2c, 0x00, 0x68, 0x1a, 0x68, 0x1e, 0x00, 0x78, - 0x5d, 0xb0, 0x00, 0x7e, 0x01, 0x7e, 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0xa9, 0xb1, - 0x60, 0x20, 0x80, 0x00, 0x60, 0x22, 0x60, 0x08, 0xa0, 0x05, 0x00, 0x40, - 0x5d, 0xf2, 0xa0, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x0a, 0x12, 0x7f, - 0x0c, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x61, 0x0e, 0x61, 0x0a, - 0x00, 0x78, 0x5d, 0xed, 0x0c, 0x7e, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, - 0x20, 0x61, 0xa9, 0xb1, 0x60, 0x34, 0xa0, 0x05, 0x00, 0x40, 0x5e, 0x06, - 0xa0, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x36, 0x0c, 0x7f, 0x00, 0x7c, - 0x61, 0x3a, 0x61, 0x36, 0x00, 0x78, 0x5e, 0x04, 0x0f, 0x7e, 0x0e, 0x7e, - 0x0d, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, 0x05, 0x7e, 0x03, 0x7e, 0x02, 0x7e, - 0x01, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0xa0, 0x2e, 0x20, 0x71, 0xa9, 0xb1, - 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, 0x20, 0x91, 0x80, 0x00, 0x8c, 0xff, - 0x00, 0x40, 0x5e, 0x8c, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0xa2, 0x06, 0x00, 0xc0, 0x5e, 0x87, 0x87, 0xff, 0x00, 0x40, 0x5e, 0x2e, - 0x60, 0x20, 0xa1, 0x06, 0x00, 0xc0, 0x5e, 0x87, 0x70, 0x3c, 0xac, 0x06, - 0x00, 0xc0, 0x5e, 0x44, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x01, 0x10, 0x78, - 0x70, 0x58, 0x70, 0x33, 0x00, 0x00, 0x70, 0x3f, 0x00, 0x00, 0x70, 0x43, - 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x70, 0x4b, 0x00, 0x00, 0x03, 0x7f, - 0x20, 0x29, 0x00, 0x01, 0x70, 0x38, 0xac, 0x36, 0x00, 0xc0, 0x5e, 0x4a, - 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0xac, 0x36, 0x00, 0xc0, 0x5e, 0x58, - 0x2c, 0x00, 0xaf, 0x36, 0x00, 0x40, 0x5e, 0x56, 0x2f, 0x00, 0x70, 0x36, - 0x00, 0x78, 0x5e, 0x58, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, 0x06, 0x7e, - 0x2c, 0x00, 0xaf, 0x06, 0x00, 0x40, 0x5e, 0x61, 0x7e, 0x0e, 0x00, 0x78, - 0x5e, 0x62, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x5e, 0x82, 0x60, 0x10, 0x20, 0x68, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x03, 0x00, 0xc0, 0x5e, 0x9d, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, - 0x68, 0x47, 0x00, 0x00, 0x01, 0x7e, 0x03, 0x7e, 0x07, 0x7e, 0x10, 0x78, - 0x8f, 0x8d, 0x10, 0x78, 0xa4, 0xf2, 0x10, 0x78, 0x4a, 0x73, 0x07, 0x7f, - 0x03, 0x7f, 0x01, 0x7f, 0x10, 0x78, 0x8e, 0xc9, 0x10, 0x78, 0x8e, 0xd6, - 0x0c, 0x7f, 0x00, 0x78, 0x5e, 0x1d, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x00, 0x78, 0x5e, 0x1d, 0x85, 0xff, 0x00, 0x40, 0x5e, 0x91, 0x10, 0x78, - 0x63, 0x9b, 0x12, 0x7f, 0x00, 0x7f, 0x01, 0x7f, 0x02, 0x7f, 0x03, 0x7f, - 0x05, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, - 0x00, 0x7c, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x5e, 0x6f, - 0x01, 0x7e, 0x03, 0x7e, 0x07, 0x7e, 0x10, 0x78, 0xa4, 0xf2, 0x10, 0x78, - 0xa1, 0xda, 0x07, 0x7f, 0x03, 0x7f, 0x01, 0x7f, 0x00, 0x78, 0x5e, 0x82, - 0x00, 0x7e, 0x06, 0x7e, 0x0c, 0x7e, 0x0d, 0x7e, 0x0f, 0x7e, 0x20, 0x31, - 0x00, 0x00, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0xa9, 0xb1, - 0x78, 0x38, 0xa0, 0x65, 0x00, 0x40, 0x5e, 0xef, 0x60, 0x0c, 0x00, 0x7e, - 0x60, 0x0f, 0x00, 0x00, 0x78, 0x3c, 0xac, 0x06, 0x00, 0xc0, 0x5e, 0xd6, - 0x03, 0x7e, 0x20, 0x19, 0x00, 0x01, 0x10, 0x78, 0x70, 0x58, 0x78, 0x33, - 0x00, 0x00, 0x78, 0x3f, 0x00, 0x00, 0x78, 0x43, 0x00, 0x00, 0x78, 0x47, - 0x00, 0x00, 0x78, 0x4b, 0x00, 0x00, 0x03, 0x7f, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x5e, 0xea, 0x60, 0x10, 0x20, 0x68, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x03, 0x00, 0xc0, 0x5e, 0xf8, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, - 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, - 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x7f, 0x00, 0x78, 0x5e, 0xbb, 0x7e, 0x3a, - 0x7e, 0x36, 0x12, 0x7f, 0x0f, 0x7f, 0x0d, 0x7f, 0x0c, 0x7f, 0x06, 0x7f, - 0x00, 0x7f, 0x00, 0x7c, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, - 0x5e, 0xe1, 0x10, 0x78, 0xa1, 0xda, 0x00, 0x78, 0x5e, 0xea, 0x01, 0x7e, - 0x02, 0x7e, 0x08, 0x7e, 0x20, 0x41, 0x00, 0x00, 0x10, 0x78, 0x5f, 0x1b, - 0x10, 0x78, 0x5f, 0xdb, 0x08, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7c, - 0x0f, 0x7e, 0x12, 0x7e, 0x20, 0x79, 0xa9, 0xb1, 0x20, 0x91, 0x80, 0x00, - 0x10, 0x78, 0x60, 0x76, 0x10, 0x78, 0x60, 0xec, 0x12, 0x7f, 0x0f, 0x7f, - 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, - 0x01, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xa9, 0xb1, 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x00, 0x40, - 0x5f, 0xb5, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa2, 0x06, - 0x00, 0xc0, 0x5f, 0xb0, 0x88, 0xff, 0x00, 0x40, 0x5f, 0x3b, 0x60, 0x20, - 0xa1, 0x06, 0x00, 0xc0, 0x5f, 0xb0, 0x70, 0x24, 0xac, 0x06, 0x00, 0xc0, - 0x5f, 0x6b, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x00, 0x40, - 0x5f, 0x66, 0x10, 0x78, 0x5a, 0xcb, 0x10, 0x78, 0x6e, 0x0f, 0x68, 0xc3, - 0x00, 0x00, 0x10, 0x78, 0x73, 0x78, 0x70, 0x27, 0x00, 0x00, 0x03, 0x7e, - 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, - 0x5f, 0x5b, 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x5f, 0x63, 0x68, 0x27, - 0x00, 0x01, 0x03, 0x7f, 0x00, 0x78, 0x5f, 0x6b, 0x60, 0x03, 0x00, 0x09, - 0x63, 0x0a, 0x00, 0x78, 0x5f, 0xb0, 0x70, 0x14, 0xac, 0x36, 0x00, 0xc0, - 0x5f, 0x71, 0x66, 0x0c, 0x76, 0x16, 0x70, 0x10, 0xac, 0x36, 0x00, 0xc0, - 0x5f, 0x7f, 0x2c, 0x00, 0xaf, 0x36, 0x00, 0x40, 0x5f, 0x7d, 0x2f, 0x00, - 0x70, 0x12, 0x00, 0x78, 0x5f, 0x7f, 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, - 0x06, 0x7e, 0x2c, 0x00, 0xaf, 0x06, 0x00, 0x40, 0x5f, 0x88, 0x7e, 0x0e, - 0x00, 0x78, 0x5f, 0x89, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x10, - 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x5f, 0xa9, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x5f, 0xbe, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x01, 0x7e, 0x03, 0x7e, 0x08, 0x7e, - 0x10, 0x78, 0x8f, 0x8d, 0x10, 0x78, 0xa4, 0xf2, 0x10, 0x78, 0x4a, 0x73, - 0x08, 0x7f, 0x03, 0x7f, 0x01, 0x7f, 0x10, 0x78, 0x8e, 0xc9, 0x10, 0x78, - 0x8e, 0xd6, 0x10, 0x78, 0x72, 0x33, 0x0c, 0x7f, 0x00, 0x78, 0x5f, 0x2a, - 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x00, 0x78, 0x5f, 0x2a, 0x12, 0x7f, - 0x00, 0x7f, 0x01, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, - 0x0f, 0x7f, 0x00, 0x7c, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, - 0x5f, 0xcf, 0x01, 0x7e, 0x03, 0x7e, 0x08, 0x7e, 0x10, 0x78, 0xa4, 0xf2, - 0x10, 0x78, 0xa1, 0xda, 0x08, 0x7f, 0x03, 0x7f, 0x01, 0x7f, 0x00, 0x78, - 0x5f, 0xa9, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x5f, 0xa9, - 0x60, 0x04, 0xa0, 0x86, 0x00, 0x85, 0x00, 0x40, 0x5f, 0x96, 0x00, 0x78, - 0x5f, 0xa9, 0x0c, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0xa2, 0x80, 0xa8, 0x35, 0x20, 0x04, 0xa0, 0x65, 0x00, 0x40, 0x60, 0x72, - 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x06, 0x7e, 0x20, 0x71, 0xa9, 0xb1, - 0x66, 0x54, 0x70, 0x18, 0xac, 0x06, 0x00, 0xc0, 0x5f, 0xf2, 0x76, 0x1a, - 0x70, 0x1c, 0xac, 0x06, 0x00, 0xc0, 0x5f, 0xfe, 0x86, 0xff, 0x00, 0xc0, - 0x5f, 0xfd, 0x70, 0x18, 0x70, 0x1e, 0x00, 0x78, 0x5f, 0xfe, 0x76, 0x1e, - 0x60, 0x58, 0xa0, 0x7d, 0x00, 0x40, 0x60, 0x03, 0x7e, 0x56, 0xa6, 0xed, - 0x00, 0x00, 0x00, 0x40, 0x60, 0x09, 0x2f, 0x00, 0x68, 0x5a, 0x60, 0x57, - 0x00, 0x00, 0x60, 0x5b, 0x00, 0x00, 0x60, 0x00, 0xc0, 0xd4, 0xc0, 0xdc, - 0x60, 0x02, 0x10, 0x78, 0x44, 0xd3, 0x00, 0x40, 0x60, 0x6e, 0x76, 0x24, - 0x86, 0xff, 0x00, 0x40, 0x60, 0x5c, 0xa6, 0x80, 0x00, 0x04, 0x20, 0x04, - 0xad, 0x06, 0x00, 0xc0, 0x60, 0x5c, 0x0d, 0x7e, 0x20, 0x69, 0x01, 0x00, - 0x68, 0xc0, 0xa0, 0x05, 0x00, 0x40, 0x60, 0x53, 0x10, 0x78, 0x5a, 0xcb, - 0x10, 0x78, 0x6e, 0x0f, 0x68, 0xc3, 0x00, 0x00, 0x10, 0x78, 0x73, 0x78, - 0x70, 0x27, 0x00, 0x00, 0x03, 0x7e, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, - 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, 0x60, 0x3c, 0x68, 0x03, 0x01, 0x00, - 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, - 0x00, 0x40, 0x60, 0x44, 0x68, 0x27, 0x00, 0x01, 0x03, 0x7f, 0x0d, 0x7f, - 0x0c, 0x7e, 0x60, 0x3c, 0xa0, 0x05, 0x00, 0x40, 0x60, 0x4d, 0x80, 0x01, - 0x60, 0x3e, 0x26, 0x60, 0x10, 0x78, 0x8e, 0xd6, 0x0c, 0x7f, 0x00, 0x78, - 0x60, 0x5c, 0x0d, 0x7f, 0x0c, 0x7e, 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, - 0x63, 0x0a, 0x0c, 0x7f, 0x00, 0x78, 0x60, 0x11, 0x8d, 0xff, 0x00, 0x40, - 0x60, 0x6a, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, - 0x10, 0x78, 0x8f, 0x8d, 0x10, 0x78, 0xa4, 0xf2, 0x10, 0x78, 0x4a, 0x73, - 0x10, 0x78, 0x72, 0x33, 0x00, 0x78, 0x60, 0x11, 0x06, 0x7f, 0x0d, 0x7f, - 0x0e, 0x7f, 0x0f, 0x7f, 0x12, 0x7f, 0x00, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, - 0x00, 0x7e, 0x06, 0x7e, 0x0c, 0x7e, 0x0d, 0x7e, 0x20, 0x31, 0x00, 0x00, - 0x78, 0x14, 0xa0, 0x65, 0x00, 0x40, 0x60, 0xd0, 0x60, 0x0c, 0x00, 0x7e, - 0x60, 0x0f, 0x00, 0x00, 0x78, 0x24, 0xac, 0x06, 0x00, 0xc0, 0x60, 0xb5, - 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x00, 0x40, 0x60, 0xaf, - 0x10, 0x78, 0x5a, 0xcb, 0x10, 0x78, 0x6e, 0x0f, 0x68, 0xc3, 0x00, 0x00, - 0x10, 0x78, 0x73, 0x78, 0x78, 0x27, 0x00, 0x00, 0x03, 0x7e, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, 0x60, 0xa4, - 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x60, 0xac, 0x68, 0x27, 0x00, 0x01, - 0x03, 0x7f, 0x00, 0x78, 0x60, 0xb5, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, - 0x2c, 0x30, 0x00, 0x78, 0x60, 0xcd, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, - 0x8d, 0x16, 0x00, 0x40, 0x60, 0xc9, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, - 0x00, 0xc0, 0x60, 0xd7, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, 0x10, 0x78, - 0x8e, 0xd6, 0x10, 0x78, 0x72, 0x33, 0x00, 0x7f, 0x00, 0x78, 0x60, 0x7d, - 0x7e, 0x16, 0x7e, 0x12, 0x0d, 0x7f, 0x0c, 0x7f, 0x06, 0x7f, 0x00, 0x7f, - 0x00, 0x7c, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x60, 0xe0, - 0x10, 0x78, 0xa1, 0xda, 0x00, 0x78, 0x60, 0xc9, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x02, 0x00, 0xc0, 0x60, 0xc9, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x85, - 0x00, 0x40, 0x60, 0xc0, 0x00, 0x78, 0x60, 0xc9, 0x00, 0x7e, 0x06, 0x7e, - 0x0c, 0x7e, 0x0d, 0x7e, 0x78, 0x18, 0xa0, 0x65, 0x00, 0x40, 0x61, 0x5a, - 0x60, 0x54, 0x00, 0x7e, 0x60, 0x57, 0x00, 0x00, 0x60, 0x5b, 0x00, 0x00, - 0x60, 0x00, 0xc0, 0xd4, 0xc0, 0xdc, 0x60, 0x02, 0x10, 0x78, 0x44, 0xd3, - 0x00, 0x40, 0x61, 0x57, 0x7e, 0x24, 0x86, 0xff, 0x00, 0x40, 0x61, 0x49, - 0xa6, 0x80, 0x00, 0x04, 0x20, 0x04, 0xad, 0x06, 0x00, 0xc0, 0x61, 0x49, - 0x0d, 0x7e, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x00, 0x40, - 0x61, 0x40, 0x10, 0x78, 0x5a, 0xcb, 0x10, 0x78, 0x6e, 0x0f, 0x68, 0xc3, - 0x00, 0x00, 0x10, 0x78, 0x73, 0x78, 0x78, 0x27, 0x00, 0x00, 0x03, 0x7e, - 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, - 0x61, 0x29, 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x61, 0x31, 0x68, 0x27, - 0x00, 0x01, 0x03, 0x7f, 0x0d, 0x7f, 0x0c, 0x7e, 0x60, 0x3c, 0xa0, 0x05, - 0x00, 0x40, 0x61, 0x3a, 0x80, 0x01, 0x60, 0x3e, 0x26, 0x60, 0x10, 0x78, - 0x8e, 0xd6, 0x0c, 0x7f, 0x00, 0x78, 0x61, 0x49, 0x0d, 0x7f, 0x0c, 0x7e, - 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x0c, 0x7f, 0x00, 0x78, - 0x60, 0xfe, 0x8d, 0xff, 0x00, 0x40, 0x61, 0x53, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, - 0x72, 0x33, 0x00, 0x78, 0x60, 0xfe, 0x00, 0x7f, 0x00, 0x78, 0x60, 0xf1, - 0x78, 0x1e, 0x78, 0x1a, 0x0d, 0x7f, 0x0c, 0x7f, 0x06, 0x7f, 0x00, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x0d, 0x7e, 0x06, 0x7e, 0x60, 0x00, 0xd0, 0xdc, - 0x00, 0x40, 0x61, 0x81, 0x60, 0x4c, 0xa0, 0x6d, 0x00, 0x40, 0x61, 0x81, - 0x68, 0x48, 0xa6, 0x06, 0x00, 0xc0, 0x61, 0x81, 0x20, 0x71, 0xa9, 0xb1, - 0x70, 0x24, 0xa0, 0x35, 0x00, 0x40, 0x61, 0x81, 0xa0, 0x80, 0x00, 0x04, - 0x20, 0x04, 0xad, 0x06, 0x00, 0xc0, 0x61, 0x81, 0x60, 0x00, 0xc0, 0xdc, - 0x60, 0x02, 0x10, 0x78, 0x61, 0x85, 0x06, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, - 0x00, 0x7c, 0x0f, 0x7e, 0x20, 0x79, 0x01, 0x00, 0x78, 0xc0, 0xa0, 0x05, - 0x00, 0xc0, 0x61, 0x94, 0x0c, 0x7e, 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, - 0x63, 0x0a, 0x0c, 0x7f, 0x00, 0x78, 0x61, 0xcb, 0x10, 0x78, 0x6e, 0x0f, - 0x78, 0xc3, 0x00, 0x00, 0x10, 0x78, 0x73, 0x78, 0x70, 0x27, 0x00, 0x00, - 0x03, 0x7e, 0x20, 0x79, 0x01, 0x40, 0x7b, 0x04, 0xa3, 0x84, 0x10, 0x00, - 0x00, 0x40, 0x61, 0xa8, 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, - 0x20, 0x79, 0x01, 0x00, 0x78, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x61, 0xb0, - 0x78, 0x27, 0x00, 0x01, 0x10, 0x78, 0x73, 0x78, 0x03, 0x7f, 0x10, 0x78, - 0x44, 0xd3, 0x0c, 0x7e, 0x60, 0x3c, 0xa0, 0x05, 0x00, 0x40, 0x61, 0xbc, - 0x80, 0x01, 0x60, 0x3e, 0x26, 0x60, 0x10, 0x78, 0x77, 0x2d, 0x0c, 0x7f, - 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, - 0x8f, 0x8d, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x72, 0x33, 0x0f, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x04, - 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x61, 0xd6, 0x61, 0xe0, 0x61, 0xe3, - 0x61, 0xfc, 0x62, 0x18, 0x62, 0x62, 0x61, 0xe0, 0x61, 0xe0, 0x61, 0xde, - 0x10, 0x78, 0x13, 0x32, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x70, 0x24, - 0xa0, 0x65, 0x00, 0x40, 0x61, 0xf1, 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, - 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, 0x61, 0xf8, 0x72, 0x16, 0x60, 0x0f, - 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x70, 0x27, 0x00, 0x00, 0x0c, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x72, 0x16, 0x72, 0x12, 0x00, 0x78, 0x61, 0xf1, - 0x60, 0x18, 0x20, 0x60, 0x10, 0x78, 0x44, 0xd3, 0x60, 0x00, 0xc0, 0xdc, - 0x60, 0x02, 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, 0x00, 0x40, 0x62, 0x0d, - 0x60, 0x54, 0xa0, 0x15, 0x00, 0x40, 0x62, 0x14, 0x72, 0x1e, 0x70, 0x07, - 0x00, 0x00, 0x70, 0x27, 0x00, 0x00, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x72, 0x18, 0x72, 0x1e, 0x00, 0x78, 0x62, 0x0d, 0x70, 0x24, 0xa0, 0x65, - 0x00, 0x40, 0x62, 0x5f, 0x70, 0x0c, 0xac, 0x06, 0x00, 0xc0, 0x62, 0x2f, - 0x10, 0x78, 0x72, 0x33, 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, 0x62, 0x2b, - 0x72, 0x0e, 0x60, 0x0f, 0x00, 0x00, 0x00, 0x78, 0x62, 0x5d, 0x72, 0x0e, - 0x72, 0x0a, 0x00, 0x78, 0x62, 0x5d, 0x70, 0x14, 0xac, 0x06, 0x00, 0xc0, - 0x62, 0x42, 0x10, 0x78, 0x72, 0x33, 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, - 0x62, 0x3e, 0x72, 0x16, 0x60, 0x0f, 0x00, 0x00, 0x00, 0x78, 0x62, 0x5d, - 0x72, 0x16, 0x72, 0x12, 0x00, 0x78, 0x62, 0x5d, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x03, 0x00, 0xc0, 0x62, 0x5d, 0x60, 0x18, 0x20, 0x60, 0x10, 0x78, - 0x44, 0xd3, 0x60, 0x00, 0xc0, 0xdc, 0x60, 0x02, 0x10, 0x78, 0x72, 0x33, - 0x70, 0x1c, 0xa0, 0x65, 0x00, 0x40, 0x62, 0x5d, 0x60, 0x54, 0xa0, 0x15, - 0x00, 0x40, 0x62, 0x5b, 0x72, 0x1e, 0x00, 0x78, 0x62, 0x5d, 0x72, 0x18, - 0x72, 0x1e, 0x70, 0x27, 0x00, 0x00, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x70, 0x24, 0xa0, 0x65, 0x00, 0x40, 0x62, 0x6f, 0x10, 0x78, 0x72, 0x33, - 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, 0x62, 0x76, 0x72, 0x0e, 0x60, 0x0f, - 0x00, 0x00, 0x10, 0x78, 0x73, 0x78, 0x70, 0x27, 0x00, 0x00, 0x0c, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x72, 0x0e, 0x72, 0x0a, 0x00, 0x78, 0x62, 0x6f, - 0x0d, 0x7e, 0x20, 0x69, 0xa9, 0xb1, 0x68, 0x30, 0xa0, 0x84, 0x00, 0x03, - 0x00, 0x79, 0x62, 0x82, 0x62, 0x88, 0x62, 0x8a, 0x62, 0xb4, 0x62, 0x88, - 0x10, 0x78, 0x13, 0x32, 0x0d, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x68, 0x40, - 0xa0, 0x86, 0x00, 0x01, 0x00, 0x40, 0x62, 0xaa, 0x68, 0x3c, 0xa0, 0x65, - 0x00, 0x40, 0x62, 0x9b, 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, 0x62, 0xa6, - 0x6a, 0x3a, 0x60, 0x0f, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, - 0x00, 0x00, 0x20, 0x11, 0xa9, 0xd0, 0x20, 0x13, 0x00, 0x00, 0x0c, 0x7f, - 0x0d, 0x7f, 0x00, 0x7c, 0x68, 0x3a, 0x68, 0x36, 0x00, 0x78, 0x62, 0x9b, - 0x68, 0x43, 0x00, 0x00, 0x68, 0x38, 0xa0, 0x65, 0x00, 0x40, 0x62, 0x9b, - 0x60, 0x03, 0x00, 0x03, 0x00, 0x78, 0x62, 0x9b, 0x0c, 0x7e, 0x68, 0x43, - 0x00, 0x00, 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x3c, - 0xa0, 0x65, 0x00, 0x40, 0x62, 0xce, 0x60, 0x0c, 0xa0, 0x15, 0x00, 0x40, - 0x62, 0xca, 0x6a, 0x3a, 0x60, 0x0f, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, - 0x00, 0x78, 0x62, 0xce, 0x68, 0x3f, 0x00, 0x00, 0x68, 0x3a, 0x68, 0x36, - 0x0c, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0x69, 0xa9, 0xb1, - 0x68, 0x04, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x79, 0x62, 0xd9, 0x62, 0xe3, - 0x63, 0x8a, 0x63, 0x8a, 0x63, 0x8a, 0x63, 0x8a, 0x63, 0x8c, 0x63, 0x8a, - 0x62, 0xe1, 0x10, 0x78, 0x13, 0x32, 0x68, 0x20, 0xa0, 0x05, 0x00, 0xc0, - 0x62, 0xe9, 0x0d, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x68, 0x0c, 0xa0, 0x65, - 0x00, 0x40, 0x62, 0xf8, 0x68, 0x07, 0x00, 0x04, 0x68, 0x26, 0x68, 0x2b, - 0x00, 0x00, 0x10, 0x78, 0x63, 0xd4, 0x0c, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x68, 0x14, 0xa0, 0x65, 0x00, 0x40, 0x63, 0x06, 0x68, 0x07, 0x00, 0x01, - 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, 0x10, 0x78, 0x63, 0xd4, 0x0c, 0x7f, - 0x0d, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x03, 0x7e, 0x6a, 0x1c, 0xa2, 0xf5, - 0x00, 0x00, 0x00, 0x40, 0x63, 0x85, 0x70, 0x4c, 0xa0, 0x0d, 0x00, 0x40, - 0x63, 0x15, 0x70, 0x88, 0xa0, 0x05, 0x00, 0x40, 0x63, 0x2d, 0x70, 0x54, - 0xa0, 0x75, 0x00, 0x40, 0x63, 0x1e, 0xa2, 0x0e, 0x00, 0x40, 0x63, 0x85, - 0x00, 0x78, 0x63, 0x23, 0x68, 0x18, 0xa2, 0x0e, 0x00, 0x40, 0x63, 0x85, - 0x20, 0x70, 0x70, 0x4c, 0xa0, 0x0d, 0x00, 0x40, 0x63, 0x15, 0x70, 0x88, - 0xa0, 0x05, 0x00, 0xc0, 0x63, 0x15, 0x2e, 0x00, 0x68, 0x1e, 0x73, 0x3c, - 0x70, 0x38, 0xa3, 0x02, 0x00, 0xc8, 0x63, 0x15, 0x10, 0x78, 0x76, 0xfc, - 0x00, 0x40, 0x63, 0x85, 0x83, 0x18, 0x73, 0x3e, 0x61, 0x12, 0x2e, 0x10, - 0x62, 0x1a, 0xa1, 0x80, 0x00, 0x14, 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0x60, 0x32, 0xa1, 0x80, 0x00, 0x14, 0x20, 0x03, 0x00, 0x00, 0xa1, 0x80, - 0x00, 0x15, 0x20, 0x04, 0xa0, 0x8a, 0x19, 0x9a, 0x00, 0x48, 0x63, 0x4e, - 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x1b, 0x83, 0x1b, 0xa3, 0x18, - 0x63, 0x16, 0x03, 0x7f, 0x0f, 0x7e, 0x2c, 0x78, 0x71, 0xa0, 0xd1, 0xbc, - 0x00, 0x40, 0x63, 0x67, 0x71, 0x00, 0xd1, 0xf4, 0x00, 0x40, 0x63, 0x63, - 0x71, 0x14, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x78, 0x63, 0x6c, 0x20, 0x09, - 0x00, 0x00, 0x00, 0x78, 0x63, 0x6c, 0xa1, 0xe0, 0x29, 0xc0, 0x2c, 0x0c, - 0xa1, 0x8c, 0x00, 0xff, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0x10, 0x78, - 0x69, 0x65, 0x73, 0x00, 0xc3, 0xdd, 0x73, 0x02, 0x68, 0x07, 0x00, 0x02, - 0x2f, 0x18, 0x6b, 0x26, 0x68, 0x2b, 0x00, 0x00, 0x78, 0x1f, 0x00, 0x03, - 0x78, 0x03, 0x00, 0x01, 0x78, 0x07, 0x00, 0x40, 0x0f, 0x7f, 0x0e, 0x7f, - 0x0c, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x03, 0x7f, 0x0e, 0x7f, 0x0c, 0x7f, - 0x00, 0x78, 0x63, 0x83, 0x0d, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x68, 0x0c, - 0xa0, 0x65, 0x00, 0x40, 0x63, 0x98, 0x68, 0x07, 0x00, 0x04, 0x68, 0x26, - 0x68, 0x2b, 0x00, 0x00, 0x10, 0x78, 0x63, 0xd4, 0x0c, 0x7f, 0x0d, 0x7f, - 0x00, 0x7c, 0x0f, 0x7e, 0x0d, 0x7e, 0x20, 0x69, 0xa9, 0xb1, 0x68, 0x30, - 0xa0, 0x86, 0x00, 0x00, 0x00, 0xc0, 0x63, 0xbb, 0x68, 0x38, 0xa0, 0x7d, - 0x00, 0x40, 0x63, 0xbb, 0x68, 0x33, 0x00, 0x01, 0x68, 0x3e, 0x68, 0x47, - 0x00, 0x00, 0x68, 0x4b, 0x00, 0x00, 0x12, 0x7e, 0x0f, 0x7e, 0x20, 0x91, - 0x22, 0x00, 0x02, 0x7f, 0x10, 0x78, 0x1d, 0x6d, 0x00, 0xc0, 0x63, 0xbe, - 0x12, 0x7f, 0x10, 0x78, 0x6c, 0xb3, 0x0d, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, - 0x12, 0x7f, 0x68, 0x43, 0x00, 0x00, 0x78, 0x03, 0x00, 0x02, 0x78, 0x0c, - 0xa0, 0x15, 0x00, 0x40, 0x63, 0xd0, 0x6a, 0x3a, 0x78, 0x0f, 0x00, 0x00, - 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x00, 0x78, 0x63, 0xbb, - 0x68, 0x3a, 0x68, 0x36, 0x00, 0x78, 0x63, 0xca, 0x60, 0x1c, 0xa0, 0x84, - 0x00, 0x0f, 0x10, 0x79, 0x63, 0xda, 0x00, 0x7c, 0x63, 0xe3, 0x63, 0xe8, - 0x68, 0x09, 0x69, 0x22, 0x63, 0xe8, 0x68, 0x09, 0x69, 0x22, 0x63, 0xe3, - 0x63, 0xe8, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, - 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x0c, 0x7e, 0x0f, 0x7e, 0x60, 0x04, - 0xa0, 0x8a, 0x00, 0x44, 0x10, 0xc8, 0x13, 0x32, 0x61, 0x18, 0x21, 0x78, - 0x79, 0xa0, 0xd1, 0xbc, 0x00, 0x40, 0x64, 0x05, 0x79, 0x00, 0xd1, 0xf4, - 0x00, 0x40, 0x64, 0x01, 0x79, 0x14, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x78, - 0x64, 0x0a, 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, 0x64, 0x0a, 0xa1, 0xf8, - 0x29, 0xc0, 0x2f, 0x0c, 0xa1, 0x8c, 0x00, 0xff, 0x2c, 0x78, 0x20, 0x61, - 0x01, 0x00, 0x61, 0x9a, 0xa0, 0x8a, 0x00, 0x40, 0x00, 0xc8, 0x64, 0x5c, - 0x10, 0x79, 0x64, 0x1a, 0x0f, 0x7f, 0x0c, 0x7f, 0x14, 0x7f, 0x13, 0x7f, - 0x15, 0x7f, 0x00, 0x7c, 0x64, 0xc2, 0x65, 0x0a, 0x65, 0x32, 0x65, 0xcd, - 0x65, 0xfd, 0x66, 0x05, 0x66, 0x2c, 0x66, 0x3d, 0x66, 0x4e, 0x66, 0x56, - 0x66, 0x6e, 0x66, 0x56, 0x66, 0xd9, 0x66, 0x3d, 0x66, 0xfa, 0x67, 0x02, - 0x66, 0x4e, 0x67, 0x02, 0x67, 0x13, 0x64, 0x5a, 0x64, 0x5a, 0x64, 0x5a, - 0x64, 0x5a, 0x64, 0x5a, 0x64, 0x5a, 0x64, 0x5a, 0x64, 0x5a, 0x64, 0x5a, - 0x64, 0x5a, 0x64, 0x5a, 0x6e, 0xef, 0x6f, 0x14, 0x6f, 0x29, 0x6f, 0x4c, - 0x6f, 0x6d, 0x66, 0x2c, 0x64, 0x5a, 0x66, 0x2c, 0x66, 0x56, 0x64, 0x5a, - 0x65, 0x32, 0x65, 0xcd, 0x64, 0x5a, 0x74, 0x9c, 0x66, 0x56, 0x64, 0x5a, - 0x74, 0xbc, 0x66, 0x56, 0x64, 0x5a, 0x64, 0x5a, 0x64, 0xbd, 0x64, 0x6b, - 0x64, 0x5a, 0x74, 0xe1, 0x75, 0x58, 0x76, 0x40, 0x64, 0x5a, 0x76, 0x51, - 0x66, 0x26, 0x76, 0x6d, 0x64, 0x5a, 0x6f, 0x82, 0x64, 0x5a, 0x64, 0x5a, - 0x10, 0x78, 0x13, 0x32, 0x21, 0x00, 0x10, 0x79, 0x64, 0x65, 0x0f, 0x7f, - 0x0c, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x64, 0x69, - 0x64, 0x69, 0x64, 0x69, 0x64, 0x9f, 0x10, 0x78, 0x13, 0x32, 0x0d, 0x7e, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x78, 0x10, 0x20, 0x68, - 0x20, 0xa3, 0x24, 0x14, 0x20, 0xa3, 0x00, 0x18, 0x20, 0xa3, 0x08, 0x00, - 0x68, 0x3c, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x68, 0x50, 0x20, 0xa2, - 0x68, 0x54, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x18, 0x10, 0x78, 0x6d, 0xfb, 0x0d, 0x7f, 0x00, 0x7c, - 0x0d, 0x7e, 0x78, 0x18, 0x20, 0x68, 0x68, 0xa0, 0xa0, 0x82, 0x00, 0x7e, - 0x00, 0x48, 0x64, 0x9c, 0xa0, 0x85, 0x00, 0x01, 0x0d, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x78, 0x64, 0x9a, 0x0d, 0x7e, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x05, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x78, 0x10, 0xa0, 0xe8, 0x00, 0x0f, 0x68, 0x08, 0x20, 0xa2, 0x68, 0x0c, - 0x20, 0xa2, 0x68, 0x10, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x68, 0x18, - 0x20, 0xa2, 0x68, 0x1c, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x10, 0x10, 0x78, - 0x6d, 0xfb, 0x0d, 0x7f, 0x00, 0x7c, 0x60, 0x30, 0x60, 0x9a, 0x10, 0x78, - 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, - 0x20, 0xa3, 0x52, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x0d, 0x7e, 0x20, 0x69, - 0xa7, 0x52, 0x68, 0x04, 0xd0, 0x84, 0x00, 0x40, 0x64, 0xdc, 0x68, 0x28, - 0x20, 0xa3, 0x00, 0x00, 0x01, 0x7e, 0x10, 0x78, 0x25, 0x64, 0x21, 0xa2, - 0x01, 0x7f, 0x0d, 0x7f, 0x00, 0x78, 0x64, 0xe1, 0x0d, 0x7f, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, - 0xa7, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0xa7, 0x01, - 0x53, 0xa6, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x82, - 0x00, 0x7f, 0x00, 0x48, 0x64, 0xfb, 0x20, 0x01, 0xa7, 0x1b, 0x20, 0xa6, - 0x20, 0x01, 0xa7, 0x1c, 0x20, 0xa6, 0x00, 0x78, 0x65, 0x01, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0x30, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x1c, 0x10, 0x78, - 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, - 0x20, 0xa3, 0x05, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x7f, 0x00, 0x48, 0x65, 0x22, - 0x20, 0x01, 0xa7, 0x1b, 0x20, 0xa6, 0x20, 0x01, 0xa7, 0x1c, 0x20, 0xa6, - 0x00, 0x78, 0x65, 0x28, 0x20, 0xa3, 0x00, 0x00, 0x60, 0x30, 0xa0, 0x84, - 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0xa7, 0x05, - 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x10, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x0c, 0x7e, 0x78, 0x18, - 0x20, 0x60, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x49, 0x72, 0x0c, 0x7f, - 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x7e, - 0x00, 0xc0, 0x65, 0x4d, 0x20, 0xa3, 0x04, 0x00, 0x62, 0x0c, 0xc2, 0xb4, - 0x62, 0x0e, 0x00, 0x78, 0x65, 0x4f, 0x20, 0xa3, 0x03, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x7e, 0x00, 0xc0, 0x65, 0x9c, 0x20, 0x99, 0xa9, 0x8d, 0x33, 0xa6, - 0x93, 0x98, 0x33, 0xa6, 0x93, 0x98, 0x33, 0x04, 0xa0, 0x84, 0x3f, 0xff, - 0x20, 0xa2, 0x93, 0x98, 0x33, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x99, 0xa7, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x99, 0xa7, 0x01, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x10, 0x20, 0xa3, - 0x00, 0x00, 0x00, 0xf0, 0x65, 0x79, 0x20, 0x99, 0xa9, 0x95, 0x33, 0x04, - 0xc0, 0xdd, 0x20, 0xa2, 0x20, 0x01, 0xa7, 0x72, 0x20, 0x04, 0xd0, 0xe4, - 0x00, 0x40, 0x65, 0x94, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x93, 0x98, 0x93, 0x98, 0x93, 0x98, 0x33, 0xa6, 0x20, 0xa9, 0x00, 0x04, - 0x00, 0x78, 0x65, 0x96, 0x20, 0xa9, 0x00, 0x07, 0x20, 0xa3, 0x00, 0x00, - 0x00, 0xf0, 0x65, 0x96, 0x00, 0x78, 0x65, 0xbc, 0x20, 0x99, 0xa9, 0x8d, - 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, - 0xa7, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0xa7, 0x01, - 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, 0x00, 0xf0, - 0x65, 0xad, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, 0x00, 0xf0, - 0x65, 0xb3, 0x20, 0x99, 0xa9, 0x95, 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa6, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, 0x00, 0xf0, 0x65, 0xbe, - 0x20, 0xa9, 0x00, 0x0a, 0x20, 0xa3, 0x00, 0x00, 0x00, 0xf0, 0x65, 0xc4, - 0x60, 0xc3, 0x00, 0x74, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x20, 0x10, 0x20, 0xa3, - 0x00, 0x14, 0x20, 0xa3, 0x08, 0x00, 0x20, 0xa3, 0x20, 0x00, 0xa0, 0x06, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x0f, 0x7e, - 0x20, 0x79, 0xa7, 0x52, 0x79, 0x04, 0x0f, 0x7f, 0xd1, 0xac, 0x00, 0xc0, - 0x65, 0xe9, 0xa0, 0x85, 0x00, 0x20, 0xd1, 0xa4, 0x00, 0x40, 0x65, 0xee, - 0xa0, 0x85, 0x00, 0x10, 0xa0, 0x85, 0x00, 0x02, 0x0d, 0x7e, 0x00, 0x78, - 0x66, 0xb7, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x50, 0x00, 0x00, 0x78, - 0x65, 0x4f, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, - 0x21, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x14, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0xb9, 0x00, 0x78, 0x66, 0x30, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x04, - 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x67, 0xc2, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x03, 0x20, 0xa3, 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x10, 0x78, - 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, - 0x20, 0xa3, 0x02, 0x00, 0x00, 0x78, 0x65, 0x4f, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x78, 0x28, 0xa0, 0x05, 0x00, 0x40, 0x66, 0x65, 0x20, 0xa2, 0x00, 0x78, - 0x66, 0x67, 0x20, 0xa3, 0x00, 0x03, 0x78, 0x10, 0x20, 0xa2, 0x60, 0xc3, - 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x10, 0x20, 0xa3, - 0x00, 0x14, 0x20, 0xa3, 0x08, 0x00, 0x78, 0x18, 0x20, 0x68, 0x68, 0x94, - 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x66, 0x94, 0x69, 0x98, 0xa1, 0x84, - 0xc0, 0x00, 0x00, 0xc0, 0x66, 0x90, 0xd1, 0xec, 0x00, 0x40, 0x66, 0x8c, - 0x20, 0xa3, 0x21, 0x00, 0x00, 0x78, 0x66, 0x96, 0x20, 0xa3, 0x01, 0x00, - 0x00, 0x78, 0x66, 0x96, 0x20, 0xa3, 0x04, 0x00, 0x00, 0x78, 0x66, 0x96, - 0x20, 0xa3, 0x07, 0x00, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x0f, 0x7e, 0x20, 0x79, 0xa7, 0x52, 0x79, 0x04, - 0x0f, 0x7f, 0xd1, 0xac, 0x00, 0xc0, 0x66, 0xa6, 0xa0, 0x85, 0x00, 0x20, - 0xd1, 0xa4, 0x00, 0x40, 0x66, 0xab, 0xa0, 0x85, 0x00, 0x10, 0x20, 0x09, - 0xa7, 0x74, 0x21, 0x0c, 0xd1, 0x84, 0x00, 0x40, 0x66, 0xb5, 0x69, 0x9c, - 0xd1, 0x8c, 0x00, 0x40, 0x66, 0xb7, 0xa0, 0x85, 0x00, 0x02, 0x02, 0x7e, - 0x20, 0x09, 0xa7, 0x72, 0x21, 0x0c, 0xd1, 0xe4, 0x00, 0x40, 0x66, 0xc5, - 0xc0, 0xc5, 0xa0, 0x94, 0x00, 0x30, 0xa2, 0x96, 0x00, 0x10, 0x00, 0x40, - 0x66, 0xcf, 0xd1, 0xec, 0x00, 0x40, 0x66, 0xcf, 0xa0, 0x94, 0x00, 0x30, - 0xa2, 0x96, 0x00, 0x10, 0x00, 0x40, 0x66, 0xcf, 0xc0, 0xbd, 0x02, 0x7f, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, - 0x6d, 0xfb, 0x0d, 0x7f, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x00, - 0x00, 0x78, 0x64, 0xc8, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, - 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x03, - 0x20, 0xa3, 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, - 0x00, 0x7c, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x0b, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x02, 0x7e, 0x03, 0x7e, - 0x04, 0x7e, 0x20, 0x19, 0x32, 0x00, 0x20, 0x21, 0x08, 0x00, 0x00, 0x78, - 0x67, 0x38, 0x02, 0x7e, 0x03, 0x7e, 0x04, 0x7e, 0x20, 0x19, 0x22, 0x00, - 0x20, 0x21, 0x01, 0x00, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, - 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x14, 0xa2, 0x86, 0x00, 0x7e, - 0x00, 0xc0, 0x67, 0x4b, 0xa3, 0x85, 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, - 0xff, 0xfe, 0x00, 0x78, 0x67, 0x80, 0xa2, 0x86, 0x00, 0x7f, 0x00, 0xc0, - 0x67, 0x57, 0x0d, 0x7e, 0xa3, 0x85, 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, - 0xff, 0xfd, 0x00, 0x78, 0x67, 0x6e, 0xd2, 0xbc, 0x00, 0x40, 0x67, 0x76, - 0xa2, 0x86, 0x00, 0x80, 0x0d, 0x7e, 0x00, 0xc0, 0x67, 0x66, 0xa3, 0x85, - 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, 0xff, 0xfc, 0x00, 0x78, 0x67, 0x6e, - 0xa2, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x67, 0x84, 0x0d, 0x7e, 0xa2, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, - 0xa4, 0x85, 0x00, 0x29, 0x20, 0xa2, 0x04, 0x7f, 0x03, 0x7f, 0x20, 0xa3, - 0x00, 0x00, 0x10, 0x78, 0x6d, 0xea, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, - 0x2f, 0xa2, 0x20, 0xa3, 0xff, 0xff, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x02, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x20, 0xa3, 0x02, 0xff, 0x20, 0x11, 0xff, 0xfc, - 0x22, 0xa2, 0x0d, 0x7e, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x20, 0xa3, 0x20, 0x29, 0x20, 0xa3, 0x00, 0x00, - 0x00, 0x78, 0x67, 0x8b, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0xfc, 0x02, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x7c, 0x02, 0x7e, - 0x03, 0x7e, 0x04, 0x7e, 0x20, 0x19, 0x33, 0x00, 0x20, 0x21, 0x08, 0x00, - 0x00, 0x78, 0x67, 0xc9, 0x02, 0x7e, 0x03, 0x7e, 0x04, 0x7e, 0x20, 0x19, - 0x23, 0x00, 0x20, 0x21, 0x01, 0x00, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, - 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x92, - 0x00, 0x7e, 0x00, 0x48, 0x67, 0xe6, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x0d, 0x7f, - 0x00, 0x78, 0x67, 0xf4, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, - 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, 0xa4, 0x85, 0x00, 0x98, - 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x04, 0x7f, 0x03, 0x7f, 0x10, 0x78, - 0x6d, 0xea, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, - 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x02, 0x7f, - 0x00, 0x7c, 0x0c, 0x7e, 0x0f, 0x7e, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x85, - 0x10, 0x48, 0x13, 0x32, 0xa0, 0x8a, 0x00, 0x8c, 0x10, 0xc8, 0x13, 0x32, - 0x61, 0x18, 0x21, 0x78, 0x79, 0xa0, 0xd1, 0xbc, 0x00, 0x40, 0x68, 0x27, - 0x79, 0x00, 0xd1, 0xf4, 0x00, 0x40, 0x68, 0x23, 0x79, 0x14, 0xa1, 0x8c, - 0x00, 0xff, 0x00, 0x78, 0x68, 0x2c, 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, - 0x68, 0x2c, 0xa1, 0xf8, 0x29, 0xc0, 0x2f, 0x0c, 0xa1, 0x8c, 0x00, 0xff, - 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0xa0, 0x82, 0x00, 0x85, - 0x10, 0x79, 0x68, 0x37, 0x0f, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x68, 0x40, - 0x68, 0x4b, 0x68, 0x66, 0x68, 0x3e, 0x68, 0x3e, 0x68, 0x3e, 0x68, 0x40, - 0x10, 0x78, 0x13, 0x32, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x68, 0x79, 0x60, 0xc3, 0x00, 0x00, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, - 0x00, 0x7c, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x68, 0xad, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x08, 0x20, 0xa2, - 0x78, 0x10, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0xff, 0xff, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x0c, - 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x00, 0x7c, 0x14, 0x7e, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x68, 0xee, 0x20, 0xa3, 0x00, 0x03, 0x20, 0xa3, - 0x03, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x04, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x00, 0x7c, 0x02, 0x7e, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0xa0, 0x92, 0x00, 0x7e, 0x00, 0x48, 0x68, 0x98, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x81, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, - 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x68, 0xa7, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x81, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, - 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x09, 0x20, 0xa3, - 0x00, 0x00, 0x00, 0x78, 0x67, 0x8b, 0x02, 0x7e, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0xa0, 0x92, 0x00, 0x7e, 0x00, 0x48, 0x68, 0xcc, 0x0d, 0x7e, 0xa0, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x84, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x68, 0xdb, 0x0d, 0x7e, 0xa0, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x84, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x99, 0x20, 0xa3, 0x00, 0x00, 0x10, 0x78, - 0x6d, 0xea, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, - 0x7a, 0x10, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x02, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, - 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x92, - 0x00, 0x7e, 0x00, 0x48, 0x69, 0x0d, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x85, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, - 0x0d, 0x7f, 0x00, 0x78, 0x69, 0x1c, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x85, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x99, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x78, 0x68, 0xdf, - 0x0c, 0x7e, 0x0f, 0x7e, 0x2c, 0x78, 0x78, 0x04, 0xa0, 0x8a, 0x00, 0x40, - 0x10, 0x48, 0x13, 0x32, 0xa0, 0x8a, 0x00, 0x53, 0x10, 0xc8, 0x13, 0x32, - 0x79, 0x18, 0x21, 0x60, 0x61, 0xa0, 0xd1, 0xbc, 0x00, 0x40, 0x69, 0x41, - 0x61, 0x00, 0xd1, 0xf4, 0x00, 0x40, 0x69, 0x3d, 0x61, 0x14, 0xa1, 0x8c, - 0x00, 0xff, 0x00, 0x78, 0x69, 0x46, 0x20, 0x09, 0x00, 0x00, 0x00, 0x78, - 0x69, 0x46, 0xa1, 0xe0, 0x29, 0xc0, 0x2c, 0x0c, 0xa1, 0x8c, 0x00, 0xff, - 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0xa0, 0x82, 0x00, 0x40, 0x10, 0x79, - 0x69, 0x50, 0x0f, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x69, 0x65, 0x6a, 0x73, - 0x6a, 0x14, 0x6c, 0x27, 0x69, 0x63, 0x69, 0x63, 0x69, 0x63, 0x69, 0x63, - 0x69, 0x63, 0x69, 0x63, 0x69, 0x63, 0x71, 0x4c, 0x71, 0x5d, 0x71, 0x6e, - 0x71, 0x7f, 0x69, 0x63, 0x76, 0x7e, 0x69, 0x63, 0x71, 0x3b, 0x10, 0x78, - 0x13, 0x32, 0x0d, 0x7e, 0x15, 0x7e, 0x14, 0x7e, 0x78, 0x0b, 0xff, 0xff, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x69, 0xd0, 0x79, 0x10, 0x21, 0x68, - 0x69, 0x48, 0x79, 0x22, 0x21, 0xa2, 0xa0, 0x16, 0x22, 0xa2, 0x22, 0xa2, - 0x22, 0xa2, 0x69, 0x4c, 0xa1, 0x84, 0x00, 0x0f, 0x00, 0xc0, 0x69, 0x80, - 0x20, 0x01, 0x00, 0x05, 0x00, 0x78, 0x69, 0x8a, 0xd1, 0x84, 0x00, 0x40, - 0x69, 0x87, 0x20, 0x01, 0x00, 0x04, 0x00, 0x78, 0x69, 0x8a, 0xa0, 0x84, - 0x00, 0x06, 0x80, 0x04, 0x01, 0x7e, 0x20, 0x08, 0x78, 0x30, 0xa0, 0x84, - 0x00, 0xff, 0x80, 0x07, 0xa1, 0x05, 0x01, 0x7f, 0x20, 0xa2, 0xd1, 0xac, - 0x00, 0x40, 0x69, 0x9a, 0x20, 0xa3, 0x00, 0x02, 0x00, 0x78, 0x69, 0xa6, - 0xd1, 0xb4, 0x00, 0x40, 0x69, 0xa1, 0x20, 0xa3, 0x00, 0x01, 0x00, 0x78, - 0x69, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x22, 0x30, 0x00, 0x78, 0x69, 0xa8, - 0x6a, 0x80, 0x6e, 0x7c, 0x20, 0xa9, 0x00, 0x08, 0xad, 0x80, 0x00, 0x17, - 0x20, 0x0c, 0x81, 0x0f, 0x21, 0xa2, 0x80, 0x00, 0x00, 0xf0, 0x69, 0xac, - 0x22, 0xa2, 0x26, 0xa2, 0x60, 0xc3, 0x00, 0x20, 0x20, 0xe1, 0x90, 0x80, - 0x60, 0x14, 0xa0, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x09, 0x60, 0x16, - 0x20, 0x01, 0xa9, 0xcd, 0x20, 0x03, 0x07, 0xd0, 0x20, 0x01, 0xa9, 0xcc, - 0x20, 0x03, 0x00, 0x09, 0x20, 0x01, 0xa9, 0xd2, 0x20, 0x03, 0x00, 0x02, - 0x10, 0x78, 0x15, 0x8c, 0x14, 0x7f, 0x15, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x7a, 0x18, 0xa2, 0x80, - 0x00, 0x23, 0x20, 0x14, 0x82, 0x10, 0xa2, 0x94, 0x00, 0xff, 0x22, 0x02, - 0x82, 0x17, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xd0, 0xbc, - 0x00, 0x40, 0x69, 0xf6, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x06, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x0d, 0x7f, - 0x00, 0x78, 0x6a, 0x05, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x06, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x61, 0x30, 0x21, 0xa2, 0x20, 0xa3, - 0x08, 0x29, 0x20, 0xa3, 0x00, 0x00, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, - 0x2f, 0xa2, 0x20, 0xa3, 0xff, 0xff, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x00, 0x7c, 0x0d, 0x7e, 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x6a, 0x34, 0x78, 0x10, 0x20, 0x68, - 0x68, 0x60, 0x20, 0xa2, 0x68, 0x5c, 0x20, 0xa2, 0x68, 0x80, 0x20, 0xa2, - 0x68, 0x7c, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x0c, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, - 0x13, 0x7f, 0x15, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x6a, 0x52, 0x0d, 0x7e, 0xa0, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x05, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x6a, 0x61, 0x0d, 0x7e, 0xa0, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x05, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, - 0x22, 0xa2, 0x20, 0xa3, 0x08, 0x89, 0x20, 0xa3, 0x00, 0x00, 0x10, 0x78, - 0x6d, 0xea, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, - 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x02, 0x7f, - 0x00, 0x7c, 0x0d, 0x7e, 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x78, 0x10, - 0xa0, 0xec, 0xf0, 0x00, 0x00, 0x40, 0x6a, 0x8b, 0xa0, 0x6d, 0x10, 0x78, - 0x49, 0x5f, 0x00, 0x40, 0x6a, 0x8b, 0x68, 0x4c, 0xa0, 0x84, 0x20, 0x20, - 0xa0, 0x86, 0x20, 0x20, 0x00, 0xc0, 0x6a, 0x8b, 0x78, 0x24, 0xc0, 0xcd, - 0x78, 0x26, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x6b, 0xe0, 0xa0, 0x16, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x78, 0x10, - 0xa0, 0x84, 0xf0, 0x00, 0x00, 0xc0, 0x6a, 0xa2, 0x78, 0x10, 0xa0, 0x84, - 0x07, 0x00, 0x80, 0x07, 0x10, 0x79, 0x6a, 0xaa, 0x00, 0x78, 0x6a, 0xa5, - 0xa0, 0x06, 0x10, 0x79, 0x6a, 0xaa, 0x14, 0x7f, 0x13, 0x7f, 0x15, 0x7f, - 0x0d, 0x7f, 0x00, 0x7c, 0x6a, 0xb4, 0x6b, 0x4c, 0x6b, 0x57, 0x6b, 0x81, - 0x6b, 0x95, 0x6b, 0xb1, 0x6b, 0xbc, 0x6a, 0xb2, 0x10, 0x78, 0x13, 0x32, - 0x01, 0x7e, 0x03, 0x7e, 0x69, 0x4c, 0xa1, 0x8c, 0x00, 0x03, 0x00, 0x40, - 0x6a, 0xbf, 0xa1, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x6a, 0xce, 0x6b, 0x78, - 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, 0x6a, 0xc5, 0xc3, 0xe5, 0x23, 0xa2, - 0x68, 0x68, 0x20, 0xa2, 0x68, 0x64, 0x20, 0xa2, 0x03, 0x7f, 0x01, 0x7f, - 0x00, 0x78, 0x6b, 0x8c, 0xa1, 0x86, 0x00, 0x01, 0x10, 0xc0, 0x13, 0x32, - 0x6b, 0x78, 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, 0x6a, 0xd8, 0xc3, 0xe5, - 0x23, 0xa2, 0x68, 0x68, 0x20, 0xa2, 0x68, 0x64, 0x20, 0xa2, 0x22, 0xa2, - 0x68, 0x74, 0x20, 0xa2, 0x22, 0xa2, 0x68, 0x7c, 0x20, 0xa2, 0x20, 0x09, - 0x00, 0x18, 0xa3, 0x84, 0x03, 0x00, 0x00, 0x40, 0x6b, 0x46, 0xd3, 0xc4, - 0x00, 0x40, 0x6a, 0xee, 0x68, 0x7c, 0xa1, 0x08, 0xd3, 0xcc, 0x00, 0x40, - 0x6a, 0xf3, 0x68, 0x74, 0xa1, 0x08, 0x15, 0x7e, 0x20, 0xa9, 0x00, 0x0d, - 0xad, 0x80, 0x00, 0x20, 0x20, 0x1c, 0x83, 0x1f, 0x23, 0xa2, 0x80, 0x00, - 0x00, 0xf0, 0x6a, 0xf8, 0x15, 0x7f, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, - 0xa1, 0x84, 0x00, 0x03, 0x00, 0x40, 0x6b, 0x46, 0x20, 0xa1, 0x02, 0x0b, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x00, 0x7e, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x6b, 0x26, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, - 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x6b, 0x35, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, - 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, 0x00, 0x7f, 0x7b, 0x24, 0xd3, 0xcc, - 0x00, 0x40, 0x6b, 0x3e, 0x20, 0xa3, 0x08, 0x89, 0x00, 0x78, 0x6b, 0x40, - 0x20, 0xa3, 0x08, 0x98, 0x20, 0xa2, 0x10, 0x78, 0x6d, 0xea, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x61, 0xc2, 0x03, 0x7f, 0x01, 0x7f, 0x10, 0x78, - 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0x11, 0x00, 0x08, 0x78, 0x24, 0xd0, 0xcc, - 0x00, 0x40, 0x6b, 0x53, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x00, 0x78, - 0x6b, 0x8a, 0x20, 0x11, 0x03, 0x02, 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, - 0x6b, 0x5e, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x22, 0xa2, 0x22, 0xa2, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x12, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x08, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x20, 0xa3, 0x70, 0x00, - 0x20, 0xa3, 0x05, 0x00, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x0a, 0x22, 0xa2, - 0x22, 0xa2, 0x20, 0xa3, 0x25, 0x00, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, 0x00, 0x32, 0x10, 0x78, 0x6d, 0xfb, - 0x00, 0x7c, 0x20, 0x11, 0x00, 0x28, 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, - 0x6b, 0x88, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x22, 0xa2, 0x22, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, 0x00, 0x18, - 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0x11, 0x01, 0x00, 0x78, 0x24, - 0xd0, 0xcc, 0x00, 0x40, 0x6b, 0x9c, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x08, 0x22, 0xa2, 0x78, 0x34, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, 0x00, 0x20, 0x10, 0x78, 0x6d, 0xfb, - 0x00, 0x7c, 0x20, 0x11, 0x00, 0x08, 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, - 0x6b, 0xb8, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x00, 0x78, 0x6b, 0x8a, - 0x03, 0x7e, 0x7b, 0x10, 0xa3, 0x84, 0xff, 0x00, 0x78, 0x12, 0xa3, 0x84, - 0x00, 0xff, 0x80, 0x01, 0x00, 0xc0, 0x6b, 0xcf, 0x78, 0x24, 0xd0, 0xcc, - 0x00, 0x40, 0x6b, 0xcb, 0xc2, 0xe5, 0x22, 0xa2, 0x03, 0x7f, 0x00, 0x78, - 0x6b, 0x8a, 0x04, 0x7e, 0x20, 0x21, 0x08, 0x00, 0x00, 0x7e, 0x78, 0x24, - 0xd0, 0xcc, 0x00, 0x7f, 0x00, 0x40, 0x6b, 0xd9, 0xc4, 0xe5, 0x24, 0xa2, - 0x04, 0x7f, 0x22, 0xa2, 0x20, 0xa2, 0x03, 0x7f, 0x00, 0x78, 0x6b, 0x8c, - 0x02, 0x7e, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x6b, 0xfe, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, - 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x6c, 0x0d, - 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, - 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, - 0x6c, 0x15, 0x20, 0xa3, 0x08, 0x89, 0x00, 0x78, 0x6c, 0x17, 0x20, 0xa3, - 0x08, 0x98, 0x20, 0xa3, 0x00, 0x00, 0x10, 0x78, 0x6d, 0xea, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, 0x2f, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x02, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, - 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x01, 0x7e, 0x03, 0x7e, 0x78, 0x10, - 0xa0, 0x84, 0x07, 0x00, 0x80, 0x07, 0x10, 0x79, 0x6c, 0x3a, 0x03, 0x7f, - 0x01, 0x7f, 0x14, 0x7f, 0x13, 0x7f, 0x15, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x6c, 0x42, 0x6c, 0x42, 0x6c, 0x44, 0x6c, 0x42, 0x6c, 0x42, 0x6c, 0x42, - 0x6c, 0x69, 0x6c, 0x42, 0x10, 0x78, 0x13, 0x32, 0x79, 0x10, 0xa1, 0x8c, - 0xf8, 0xff, 0xa1, 0x8d, 0x06, 0x00, 0x79, 0x12, 0x20, 0xa1, 0x02, 0x0b, - 0x20, 0x09, 0x00, 0x03, 0x10, 0x78, 0x6c, 0x73, 0x0d, 0x7e, 0x20, 0x69, - 0xa7, 0x52, 0x68, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x6c, 0x5e, 0x68, 0x2c, - 0xa0, 0x84, 0x00, 0xff, 0x80, 0x07, 0x20, 0xa2, 0x00, 0x78, 0x6c, 0x60, - 0x20, 0xa3, 0x3f, 0x00, 0x0d, 0x7f, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, - 0x60, 0xc3, 0x00, 0x01, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, - 0x02, 0x0b, 0x20, 0x09, 0x00, 0x03, 0x10, 0x78, 0x6c, 0x73, 0x20, 0xa3, - 0x7f, 0x00, 0x00, 0x78, 0x6c, 0x61, 0x02, 0x7e, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0xd0, 0xbc, 0x00, 0x40, 0x6c, 0x91, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x01, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, - 0x0d, 0x7f, 0x00, 0x78, 0x6c, 0xa0, 0x0d, 0x7e, 0xa0, 0xe8, 0xa8, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x01, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x0d, 0x7f, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, - 0x20, 0xa3, 0x08, 0x88, 0xa1, 0x8d, 0x00, 0x08, 0x21, 0xa2, 0x10, 0x78, - 0x6d, 0xea, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, - 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x02, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x05, 0x7e, 0x04, 0x7e, - 0x03, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x61, 0x30, - 0x78, 0x18, 0x20, 0x68, 0x68, 0xa0, 0x20, 0x28, 0xd0, 0xbc, 0x00, 0xc0, - 0x6c, 0xca, 0x69, 0x10, 0x6a, 0x14, 0x64, 0x30, 0x00, 0x78, 0x6c, 0xce, - 0x69, 0x10, 0x6a, 0x14, 0x73, 0x6c, 0x74, 0x70, 0x78, 0x1c, 0xa0, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x6d, 0x2d, 0xd5, 0xbc, 0x00, 0x40, 0x6c, 0xde, - 0xa1, 0x85, 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, - 0x00, 0x78, 0x6c, 0xe5, 0xa1, 0x85, 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, - 0x60, 0x6b, 0x00, 0x00, 0x64, 0x6e, 0x60, 0x73, 0x08, 0x09, 0x60, 0x77, - 0x00, 0x08, 0x68, 0x8c, 0x80, 0x00, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x8e, - 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, 0x2f, 0x00, 0x60, 0x82, - 0x78, 0x08, 0x60, 0x86, 0x78, 0x10, 0x20, 0x70, 0x70, 0x14, 0x60, 0x8a, - 0x70, 0x10, 0x60, 0x8e, 0x70, 0x0c, 0x60, 0xc6, 0x70, 0x08, 0x60, 0xca, - 0x68, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, 0x60, 0xaf, 0x95, 0xd5, - 0x60, 0xd7, 0x00, 0x00, 0xa5, 0x82, 0x00, 0x80, 0x00, 0x48, 0x6d, 0x17, - 0x6a, 0x00, 0xd2, 0xf4, 0x00, 0x40, 0x6d, 0x15, 0x6a, 0x14, 0xa2, 0x94, - 0x00, 0xff, 0x00, 0x78, 0x6d, 0x17, 0x20, 0x11, 0x00, 0x00, 0x62, 0x9e, - 0x60, 0x17, 0x00, 0x16, 0x20, 0x09, 0x07, 0xd0, 0x60, 0xc4, 0xa0, 0x84, - 0xff, 0xf0, 0xa0, 0x05, 0x00, 0x40, 0x6d, 0x24, 0x20, 0x09, 0x1b, 0x58, - 0x10, 0x78, 0x5a, 0xd0, 0x03, 0x7f, 0x04, 0x7f, 0x05, 0x7f, 0x0c, 0x7f, - 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x78, 0x10, 0x20, 0x70, 0x70, 0x4c, - 0xa0, 0x84, 0x00, 0x03, 0xa0, 0x86, 0x00, 0x02, 0x00, 0x40, 0x6d, 0x85, - 0xd5, 0xbc, 0x00, 0x40, 0x6d, 0x41, 0xa1, 0x85, 0x01, 0x00, 0x60, 0x62, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x78, 0x6d, 0x48, 0xa1, 0x85, - 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x64, 0x6e, - 0x60, 0x73, 0x08, 0x80, 0x60, 0x77, 0x00, 0x08, 0x68, 0x8c, 0x80, 0x00, - 0xa0, 0x84, 0x00, 0xff, 0x68, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, - 0x00, 0x00, 0x2f, 0x00, 0x60, 0x86, 0x78, 0x08, 0x60, 0x82, 0x70, 0x60, - 0x60, 0x8a, 0x70, 0x5c, 0x60, 0x8e, 0x70, 0x80, 0x60, 0xc6, 0x70, 0x7c, - 0x60, 0xca, 0x70, 0x7c, 0x79, 0x2c, 0xa1, 0x08, 0x79, 0x2e, 0x70, 0x80, - 0x79, 0x28, 0xa1, 0x09, 0x79, 0x2a, 0x68, 0x6c, 0x60, 0xce, 0x60, 0xab, - 0x00, 0x36, 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xa5, 0x82, - 0x00, 0x80, 0x00, 0x48, 0x6d, 0x80, 0x6a, 0x00, 0xd2, 0xf4, 0x00, 0x40, - 0x6d, 0x7e, 0x6a, 0x14, 0xa2, 0x94, 0x00, 0xff, 0x00, 0x78, 0x6d, 0x80, - 0x20, 0x11, 0x00, 0x00, 0x62, 0x9e, 0x60, 0x17, 0x00, 0x12, 0x00, 0x78, - 0x6d, 0x1a, 0xd5, 0xbc, 0x00, 0x40, 0x6d, 0x90, 0xa1, 0x85, 0x07, 0x00, - 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x78, 0x6d, 0x97, - 0xa1, 0x85, 0x07, 0x00, 0x60, 0x62, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, - 0x64, 0x6e, 0x10, 0x78, 0x49, 0x5f, 0x00, 0x40, 0x6d, 0xad, 0x0d, 0x7e, - 0x78, 0x10, 0xa0, 0x6d, 0x68, 0x4c, 0x0d, 0x7f, 0xa0, 0x84, 0x20, 0x20, - 0xa0, 0x86, 0x20, 0x20, 0x00, 0xc0, 0x6d, 0xad, 0x78, 0x24, 0xc0, 0xcd, - 0x78, 0x26, 0x60, 0x73, 0x08, 0x89, 0x00, 0x78, 0x6d, 0xaf, 0x60, 0x73, - 0x08, 0x98, 0x60, 0x77, 0x00, 0x00, 0x68, 0x8c, 0x80, 0x00, 0xa0, 0x84, - 0x00, 0xff, 0x68, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, - 0x2f, 0x00, 0x60, 0x86, 0x78, 0x08, 0x60, 0x82, 0x70, 0x14, 0x60, 0x8a, - 0x70, 0x10, 0x60, 0x8e, 0x70, 0x0c, 0x60, 0xc6, 0x70, 0x08, 0x60, 0xca, - 0x68, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, 0x60, 0xaf, 0x95, 0xd5, - 0x60, 0xd7, 0x00, 0x00, 0xa5, 0x82, 0x00, 0x80, 0x00, 0x48, 0x6d, 0xdd, - 0x6a, 0x00, 0xd2, 0xf4, 0x00, 0x40, 0x6d, 0xdb, 0x6a, 0x14, 0xa2, 0x94, - 0x00, 0xff, 0x00, 0x78, 0x6d, 0xdd, 0x20, 0x11, 0x00, 0x00, 0x62, 0x9e, - 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x40, 0x6d, 0xe6, 0x60, 0x17, 0x00, 0x16, - 0x00, 0x78, 0x6d, 0x1a, 0x60, 0x17, 0x00, 0x12, 0x00, 0x78, 0x6d, 0x1a, - 0x7a, 0x18, 0xa2, 0x80, 0x00, 0x23, 0x20, 0x14, 0x82, 0x10, 0xa2, 0x94, - 0x00, 0xff, 0x22, 0x02, 0x82, 0x17, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0x69, - 0xa9, 0xb1, 0x68, 0x43, 0x00, 0x01, 0x0d, 0x7f, 0x00, 0x7c, 0x20, 0xe1, - 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x10, 0x78, - 0x6e, 0x06, 0x10, 0x78, 0x5a, 0xc0, 0x00, 0x7c, 0x00, 0x7e, 0x60, 0x14, - 0xa0, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x09, 0x60, 0x16, 0x00, 0x7f, - 0x00, 0x7c, 0x00, 0x7e, 0x0c, 0x7e, 0x20, 0x61, 0x01, 0x00, 0x60, 0x14, - 0xa0, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x08, 0x60, 0x16, 0x0c, 0x7f, - 0x00, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x0d, 0x7e, 0x01, 0x7e, 0x02, 0x7e, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x69, 0x04, 0xa1, 0x94, - 0x40, 0x00, 0x00, 0x40, 0x6e, 0x59, 0x10, 0x78, 0x6e, 0x0f, 0x68, 0x03, - 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x0c, 0x7e, 0x20, 0x61, 0xa9, 0xb1, - 0x61, 0x28, 0xa1, 0x92, 0x00, 0xc8, 0x00, 0xc8, 0x6e, 0x44, 0x81, 0x08, - 0x61, 0x2a, 0x61, 0x24, 0x0c, 0x7f, 0x81, 0xff, 0x00, 0x40, 0x6e, 0x54, - 0x10, 0x78, 0x5a, 0xc0, 0x10, 0x78, 0x6e, 0x06, 0x00, 0x78, 0x6e, 0x54, - 0x61, 0x24, 0xa1, 0xe5, 0x00, 0x00, 0x00, 0x40, 0x6e, 0x51, 0x10, 0x78, - 0xa5, 0xd4, 0x10, 0x78, 0x5a, 0xcb, 0x20, 0x09, 0x00, 0x14, 0x10, 0x78, - 0x77, 0x5c, 0x0c, 0x7f, 0x00, 0x78, 0x6e, 0x54, 0x02, 0x7f, 0x01, 0x7f, - 0x0d, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x20, 0x01, 0xa9, 0xcd, 0x20, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x6e, 0x54, 0x0c, 0x7e, 0x20, 0x61, 0xa9, 0xb1, - 0x61, 0x28, 0xa1, 0x92, 0x00, 0x03, 0x00, 0xc8, 0x6e, 0x44, 0x81, 0x08, - 0x61, 0x2a, 0x0c, 0x7f, 0x10, 0x78, 0x5a, 0xc0, 0x10, 0x78, 0x42, 0x24, - 0x00, 0x78, 0x6e, 0x54, 0x0c, 0x7e, 0x0d, 0x7e, 0x0e, 0x7e, 0x01, 0x7e, - 0x02, 0x7e, 0x10, 0x78, 0x5a, 0xd8, 0x20, 0x71, 0xa9, 0xb1, 0x71, 0x3c, - 0x81, 0xff, 0x00, 0x40, 0x6e, 0x9a, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x69, 0x04, 0xa1, 0x94, 0x40, 0x00, 0x00, 0x40, 0x6e, 0xa0, - 0x68, 0x03, 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x03, 0x7e, 0x20, 0x19, - 0x00, 0x01, 0x10, 0x78, 0x70, 0x58, 0x03, 0x7f, 0x71, 0x3c, 0x21, 0x60, - 0x10, 0x78, 0xa5, 0xd4, 0x20, 0x09, 0x00, 0x4a, 0x10, 0x78, 0x77, 0x5c, - 0x00, 0x78, 0x6e, 0x9a, 0x02, 0x7f, 0x01, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, - 0x0c, 0x7f, 0x00, 0x7c, 0x00, 0x78, 0x6e, 0x8a, 0x0e, 0x7e, 0x20, 0x71, - 0xa9, 0xb1, 0x70, 0x48, 0xd0, 0x84, 0x00, 0x40, 0x6e, 0xbc, 0x71, 0x3c, - 0x81, 0xff, 0x00, 0x40, 0x6e, 0xbc, 0x20, 0x71, 0x01, 0x00, 0xa1, 0x88, - 0x00, 0x07, 0x21, 0x0c, 0xa1, 0x8e, 0x00, 0x06, 0x00, 0xc0, 0x6e, 0xba, - 0x70, 0x17, 0x00, 0x12, 0x00, 0x78, 0x6e, 0xbc, 0x70, 0x17, 0x00, 0x16, - 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, - 0x05, 0x7e, 0x04, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x60, 0x18, 0x20, 0x68, 0x6c, 0xa0, 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x18, - 0x20, 0x68, 0x8d, 0xff, 0x00, 0x40, 0x6e, 0xe6, 0x68, 0xa0, 0xa4, 0x06, - 0x00, 0x40, 0x6e, 0xda, 0x68, 0x54, 0x20, 0x68, 0x00, 0x78, 0x6e, 0xcf, - 0x60, 0x10, 0x20, 0x60, 0x64, 0x3c, 0x65, 0x40, 0x66, 0x48, 0x2d, 0x60, - 0x10, 0x78, 0x47, 0x36, 0x00, 0x40, 0x6e, 0xe6, 0xa0, 0x85, 0x00, 0x01, - 0x12, 0x7f, 0x00, 0x7f, 0x04, 0x7f, 0x05, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, - 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x67, 0x31, 0x20, 0xa3, 0x12, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x78, 0x1c, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x6f, 0x01, - 0x60, 0x98, 0x00, 0x78, 0x6f, 0x02, 0x60, 0x30, 0x20, 0xa2, 0x78, 0x34, - 0x20, 0xa2, 0x78, 0x38, 0x20, 0xa2, 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x06, - 0x20, 0xa2, 0x00, 0xf0, 0x6f, 0x0a, 0x20, 0xa2, 0x20, 0xa2, 0x60, 0xc3, - 0x00, 0x2c, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x15, 0x7e, 0x14, 0x7e, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x0f, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x08, 0x20, 0xa2, - 0x60, 0xc3, 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x15, 0x7f, - 0x00, 0x7c, 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x06, 0x20, 0x11, 0xa7, 0x40, 0x20, 0x19, 0xa7, 0x41, 0x23, 0xa6, - 0x22, 0xa6, 0xa3, 0x98, 0x00, 0x02, 0xa2, 0x90, 0x00, 0x02, 0x00, 0xf0, - 0x6f, 0x39, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x1c, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x15, 0x7f, 0x00, 0x7c, - 0x15, 0x7e, 0x14, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0x99, 0x10, 0x78, 0x67, 0xb0, 0x78, 0x10, 0xa0, 0x80, - 0x00, 0x00, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x15, 0x20, 0x98, 0x78, 0x08, - 0xa0, 0x88, 0x00, 0x02, 0x21, 0xa8, 0x53, 0xa6, 0xa0, 0x80, 0x00, 0x04, - 0x80, 0x03, 0x60, 0xc2, 0x10, 0x78, 0x6d, 0xfb, 0x02, 0x7f, 0x01, 0x7f, - 0x14, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x62, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x08, 0x20, 0xa2, 0x60, 0xc3, - 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x15, 0x7f, 0x00, 0x7c, - 0x15, 0x7e, 0x14, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0x31, 0x78, 0x10, 0xa0, 0x80, 0x00, 0x00, 0x20, 0x04, - 0xa0, 0x80, 0x00, 0x17, 0x20, 0x98, 0x78, 0x08, 0xa0, 0x88, 0x00, 0x02, - 0x21, 0xa8, 0x53, 0xa6, 0x80, 0x03, 0x60, 0xc2, 0x10, 0x78, 0x6d, 0xfb, - 0x02, 0x7f, 0x01, 0x7f, 0x14, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x0c, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xa9, 0xb1, 0x70, 0x0c, 0x20, 0x60, 0x8c, 0xff, 0x00, 0x40, 0x6f, 0xbb, - 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, 0x6f, 0xb2, 0x10, 0x78, 0x7c, 0x83, - 0x60, 0x0c, 0x00, 0x7e, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x72, 0x33, - 0x0c, 0x7f, 0x00, 0x78, 0x6f, 0xa9, 0x70, 0x0f, 0x00, 0x00, 0x70, 0x0b, - 0x00, 0x00, 0x12, 0x7f, 0x00, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0x12, 0x7e, 0x15, 0x7e, 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, - 0x02, 0x7e, 0x01, 0x7e, 0x00, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, - 0x01, 0x00, 0x20, 0x79, 0x01, 0x40, 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x24, - 0x20, 0x60, 0x8c, 0xff, 0x00, 0x40, 0x70, 0x14, 0x10, 0x78, 0x6e, 0x0f, - 0x68, 0xc3, 0x00, 0x00, 0x10, 0x78, 0x5a, 0xcb, 0x20, 0x09, 0x00, 0x13, - 0x10, 0x78, 0x77, 0x5c, 0x20, 0xa9, 0x01, 0xf4, 0x68, 0x24, 0xd0, 0x94, - 0x00, 0x40, 0x6f, 0xf7, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x00, 0x40, 0x70, 0x09, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x00, 0x78, 0x70, 0x09, 0xd0, 0x84, 0x00, 0x40, 0x6f, 0xfe, - 0x68, 0x27, 0x00, 0x01, 0x00, 0x78, 0x70, 0x00, 0x00, 0xf0, 0x6f, 0xe6, - 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, 0x00, 0x40, 0x70, 0x09, 0x78, 0x03, - 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, 0x68, 0x24, 0x00, 0x7f, 0x01, 0x7f, - 0x02, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x15, 0x7f, - 0x12, 0x7f, 0x00, 0x7c, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x96, - 0x00, 0x01, 0x00, 0x40, 0x70, 0x4e, 0xa0, 0x96, 0x00, 0x04, 0x00, 0x40, - 0x70, 0x4e, 0x10, 0x78, 0x5a, 0xcb, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, - 0x00, 0x00, 0x20, 0x11, 0x41, 0xdc, 0x10, 0x78, 0x5a, 0x45, 0x20, 0xa9, - 0x01, 0xf4, 0x68, 0x24, 0xd0, 0x94, 0x00, 0x40, 0x70, 0x3c, 0x68, 0x27, - 0x00, 0x04, 0x78, 0x04, 0xa0, 0x84, 0x40, 0x00, 0x00, 0x40, 0x70, 0x4e, - 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, 0x00, 0x00, 0x00, 0x78, 0x70, 0x4e, - 0xd0, 0x84, 0x00, 0x40, 0x70, 0x43, 0x68, 0x27, 0x00, 0x01, 0x00, 0x78, - 0x70, 0x45, 0x00, 0xf0, 0x70, 0x2b, 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, - 0x00, 0x40, 0x70, 0x4e, 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, - 0x00, 0x7f, 0x01, 0x7f, 0x02, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, - 0x0f, 0x7f, 0x15, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, 0x15, 0x7e, - 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x02, 0x7e, 0x01, 0x7e, - 0x00, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, - 0x01, 0x40, 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x3c, 0x20, 0x60, 0x8c, 0xff, - 0x00, 0x40, 0x70, 0xd6, 0x68, 0xaf, 0x95, 0xf5, 0x68, 0x17, 0x00, 0x10, - 0x20, 0x09, 0x00, 0xfa, 0x81, 0x09, 0x00, 0xc0, 0x70, 0x74, 0x68, 0xc7, - 0x00, 0x00, 0x68, 0xcb, 0x00, 0x08, 0x10, 0x78, 0x5a, 0xd8, 0x10, 0x78, - 0x1f, 0x7e, 0x04, 0x7e, 0x05, 0x7e, 0x20, 0x09, 0x01, 0x7f, 0x21, 0x2c, - 0x20, 0x0b, 0x00, 0xa5, 0x20, 0x21, 0x01, 0x69, 0x24, 0x04, 0xa0, 0x84, - 0x00, 0x0f, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x70, 0xa5, 0x68, 0xc7, - 0x00, 0x00, 0x68, 0xcb, 0x00, 0x08, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x79, - 0x00, 0x20, 0x20, 0x71, 0xaa, 0x08, 0x68, 0x14, 0xa0, 0x84, 0x00, 0x04, - 0xa0, 0x85, 0x00, 0x12, 0x68, 0x16, 0x78, 0x03, 0x00, 0x08, 0x70, 0x03, - 0x00, 0x00, 0x0f, 0x7f, 0x0e, 0x7f, 0x25, 0x0a, 0x05, 0x7f, 0x04, 0x7f, - 0xa3, 0x9d, 0x00, 0x00, 0x00, 0xc0, 0x70, 0xb0, 0x20, 0x09, 0x00, 0x49, - 0x10, 0x78, 0x77, 0x5c, 0x20, 0xa9, 0x03, 0xe8, 0x68, 0x24, 0xd0, 0x94, - 0x00, 0x40, 0x70, 0xc3, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x00, 0x40, 0x70, 0xd5, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x00, 0x78, 0x70, 0xd5, 0xd0, 0x8c, 0x00, 0x40, 0x70, 0xca, - 0x68, 0x27, 0x00, 0x02, 0x00, 0x78, 0x70, 0xcc, 0x00, 0xf0, 0x70, 0xb2, - 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, 0x00, 0x40, 0x70, 0xd5, 0x78, 0x03, - 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, 0x68, 0x24, 0x00, 0x7f, 0x01, 0x7f, - 0x02, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x15, 0x7f, - 0x12, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x69, 0xa9, 0xb1, 0x6a, 0x06, 0x12, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x0d, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0xa9, 0xb1, - 0x6a, 0x32, 0x12, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, - 0x0c, 0x7e, 0x06, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x71, 0xa9, 0xb1, - 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x20, 0x91, 0x80, 0x00, 0x8c, 0xff, - 0x00, 0x40, 0x71, 0x34, 0x60, 0x1c, 0xa2, 0x06, 0x00, 0xc0, 0x71, 0x2f, - 0x70, 0x14, 0xac, 0x36, 0x00, 0xc0, 0x71, 0x0e, 0x66, 0x0c, 0x76, 0x16, - 0x70, 0x10, 0xac, 0x36, 0x00, 0xc0, 0x71, 0x1c, 0x2c, 0x00, 0xaf, 0x36, - 0x00, 0x40, 0x71, 0x1a, 0x2f, 0x00, 0x70, 0x12, 0x00, 0x78, 0x71, 0x1c, - 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, 0x06, 0x7e, 0x2c, 0x00, 0xaf, 0x06, - 0x00, 0x40, 0x71, 0x25, 0x7e, 0x0e, 0x00, 0x78, 0x71, 0x26, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x72, 0x33, - 0x0c, 0x7f, 0x00, 0x78, 0x71, 0x01, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x00, 0x78, 0x71, 0x01, 0x12, 0x7f, 0x00, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, - 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x69, 0xd0, 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, 0x10, 0x00, - 0x00, 0x78, 0x71, 0x8e, 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x69, 0xd0, 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, 0x40, 0x00, 0x00, 0x78, - 0x71, 0x8e, 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x69, 0xd0, 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, 0x20, 0x00, 0x00, 0x78, 0x71, 0x8e, - 0x15, 0x7e, 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x69, 0xd0, - 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa3, 0x04, 0x00, 0x00, 0x78, 0x71, 0x8e, 0x15, 0x7e, - 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x69, 0xd0, 0x78, 0x10, - 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa3, 0x02, 0x00, 0x10, 0x78, 0x72, 0x3e, 0x60, 0xc3, 0x00, 0x20, - 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x15, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x0c, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, 0x01, 0x00, 0x61, 0x20, - 0xd1, 0xb4, 0x00, 0xc0, 0x71, 0xa6, 0xd1, 0xbc, 0x00, 0xc0, 0x71, 0xf0, - 0x00, 0x78, 0x72, 0x30, 0x20, 0x09, 0x01, 0x7f, 0x20, 0x0b, 0x00, 0xa1, - 0x15, 0x7e, 0x00, 0x7e, 0x0d, 0x7e, 0x20, 0x69, 0x01, 0x40, 0x20, 0xa9, - 0x00, 0x1e, 0x20, 0x09, 0x01, 0x69, 0x68, 0x04, 0xa0, 0x84, 0x40, 0x00, - 0x00, 0x40, 0x71, 0xe7, 0x60, 0x20, 0xd0, 0xb4, 0x00, 0x40, 0x71, 0xe7, - 0x60, 0x24, 0xd0, 0x94, 0x00, 0xc0, 0x71, 0xe7, 0x21, 0x04, 0xa0, 0x84, - 0x00, 0x0f, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x71, 0xe7, 0x00, 0xf0, - 0x71, 0xb3, 0x02, 0x7e, 0x61, 0x98, 0xa1, 0x8c, 0x00, 0xff, 0x81, 0x07, - 0x61, 0x30, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x0d, 0x60, 0x88, 0x62, 0x8c, - 0x61, 0x8e, 0x60, 0x8b, 0xbc, 0x91, 0x60, 0x43, 0x00, 0x01, 0x60, 0x43, - 0x00, 0x00, 0x60, 0x8a, 0x62, 0x8e, 0x60, 0x24, 0xd0, 0x94, 0x00, 0xc0, - 0x71, 0xe6, 0x6a, 0x04, 0xa2, 0x94, 0x40, 0x00, 0x00, 0xc0, 0x71, 0xdd, - 0x02, 0x7f, 0x0d, 0x7f, 0x00, 0x7f, 0x15, 0x7f, 0x20, 0x09, 0x01, 0x7f, - 0x20, 0x0b, 0x00, 0x00, 0x00, 0x78, 0x72, 0x30, 0x20, 0x09, 0x01, 0x7f, - 0x20, 0x0b, 0x00, 0xa1, 0x15, 0x7e, 0x00, 0x7e, 0x0d, 0x7e, 0x20, 0x69, - 0x01, 0x40, 0x20, 0xa9, 0x00, 0x1e, 0x20, 0x09, 0x01, 0x69, 0x68, 0x04, - 0xa0, 0x84, 0x40, 0x00, 0x00, 0x40, 0x72, 0x29, 0x60, 0x20, 0xd0, 0xbc, - 0x00, 0x40, 0x72, 0x29, 0x21, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x86, - 0x00, 0x04, 0x00, 0xc0, 0x72, 0x29, 0x00, 0xf0, 0x71, 0xfd, 0x02, 0x7e, - 0x61, 0x64, 0xa1, 0x8c, 0x00, 0xff, 0x81, 0x07, 0x61, 0x30, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x0d, 0x60, 0x88, 0x62, 0x8c, 0x60, 0x8b, 0xbc, 0x91, - 0x61, 0x8e, 0x60, 0x43, 0x00, 0x01, 0x60, 0x43, 0x00, 0x00, 0x60, 0x8a, - 0x62, 0x8e, 0x6a, 0x04, 0xa2, 0x94, 0x40, 0x00, 0x00, 0xc0, 0x72, 0x23, - 0x02, 0x7f, 0x0d, 0x7f, 0x00, 0x7f, 0x15, 0x7f, 0x20, 0x09, 0x01, 0x7f, - 0x20, 0x0b, 0x00, 0x00, 0x0c, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x20, 0xa0, 0x05, 0x00, 0x40, 0x72, 0x3c, - 0x80, 0x01, 0x70, 0x22, 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0xa9, 0x00, 0x08, - 0x20, 0xa2, 0x00, 0xf0, 0x72, 0x40, 0x20, 0xa2, 0x20, 0xa2, 0x00, 0x7c, - 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x07, 0x7e, 0x06, 0x7e, - 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa9, 0xb1, - 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x20, 0x39, 0x00, 0x01, 0x87, 0xff, - 0x00, 0x40, 0x72, 0xe2, 0x8c, 0xff, 0x00, 0x40, 0x72, 0xe2, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x72, 0xdd, 0x88, 0xff, 0x00, 0x40, - 0x72, 0x6d, 0x28, 0x00, 0xac, 0x06, 0x00, 0xc0, 0x72, 0xdd, 0x20, 0x39, - 0x00, 0x00, 0x00, 0x78, 0x72, 0x78, 0x60, 0x18, 0xa2, 0x06, 0x00, 0xc0, - 0x72, 0xdd, 0x85, 0xff, 0x00, 0x40, 0x72, 0x78, 0x60, 0x20, 0xa1, 0x06, - 0x00, 0xc0, 0x72, 0xdd, 0x70, 0x24, 0xac, 0x06, 0x00, 0xc0, 0x72, 0xa8, - 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x00, 0x40, 0x72, 0xa3, - 0x10, 0x78, 0x5a, 0xcb, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, - 0x10, 0x78, 0x73, 0x78, 0x70, 0x27, 0x00, 0x00, 0x03, 0x7e, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, 0x72, 0x98, - 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x72, 0xa0, 0x68, 0x27, 0x00, 0x01, - 0x03, 0x7f, 0x00, 0x78, 0x72, 0xa8, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, - 0x00, 0x78, 0x72, 0xdd, 0x70, 0x14, 0xac, 0x36, 0x00, 0xc0, 0x72, 0xae, - 0x66, 0x0c, 0x76, 0x16, 0x70, 0x10, 0xac, 0x36, 0x00, 0xc0, 0x72, 0xbc, - 0x2c, 0x00, 0xaf, 0x36, 0x00, 0x40, 0x72, 0xba, 0x2f, 0x00, 0x70, 0x12, - 0x00, 0x78, 0x72, 0xbc, 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, 0x06, 0x7e, - 0x2c, 0x00, 0xaf, 0x06, 0x00, 0x40, 0x72, 0xc5, 0x7e, 0x0e, 0x00, 0x78, - 0x72, 0xc6, 0x26, 0x78, 0x89, 0xff, 0x00, 0xc0, 0x72, 0xd5, 0x60, 0x0f, - 0x00, 0x00, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x72, 0xd3, 0x10, 0x78, 0xa1, 0xda, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, - 0x72, 0x33, 0x88, 0xff, 0x00, 0xc0, 0x72, 0xec, 0x0c, 0x7f, 0x00, 0x78, - 0x72, 0x57, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x00, 0x78, 0x72, 0x57, - 0xa0, 0x06, 0x12, 0x7f, 0x00, 0x7f, 0x06, 0x7f, 0x07, 0x7f, 0x0c, 0x7f, - 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x60, 0x17, 0x00, 0x00, - 0x0c, 0x7f, 0xa8, 0xc5, 0x00, 0x01, 0x00, 0x78, 0x72, 0xe3, 0x0f, 0x7e, - 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, 0x02, 0x7e, 0x00, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa9, 0xb1, 0x76, 0x38, - 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x00, 0x40, 0x73, 0x67, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x73, 0x62, 0x87, 0xff, 0x00, 0x40, - 0x73, 0x13, 0x27, 0x00, 0xac, 0x06, 0x00, 0xc0, 0x73, 0x62, 0x00, 0x78, - 0x73, 0x1e, 0x60, 0x18, 0xa2, 0x06, 0x00, 0xc0, 0x73, 0x62, 0x85, 0xff, - 0x00, 0x40, 0x73, 0x1e, 0x60, 0x20, 0xa1, 0x06, 0x00, 0xc0, 0x73, 0x62, - 0x70, 0x3c, 0xac, 0x06, 0x00, 0xc0, 0x73, 0x32, 0x03, 0x7e, 0x20, 0x19, - 0x00, 0x01, 0x10, 0x78, 0x70, 0x58, 0x70, 0x33, 0x00, 0x00, 0x70, 0x3f, - 0x00, 0x00, 0x70, 0x43, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x70, 0x4b, - 0x00, 0x00, 0x03, 0x7f, 0x70, 0x38, 0xac, 0x36, 0x00, 0xc0, 0x73, 0x38, - 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0xac, 0x36, 0x00, 0xc0, 0x73, 0x46, - 0x2c, 0x00, 0xaf, 0x36, 0x00, 0x40, 0x73, 0x44, 0x2f, 0x00, 0x70, 0x36, - 0x00, 0x78, 0x73, 0x46, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, 0x06, 0x7e, - 0x2c, 0x00, 0xaf, 0x06, 0x00, 0x40, 0x73, 0x4f, 0x7e, 0x0e, 0x00, 0x78, - 0x73, 0x50, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x10, 0x20, 0x68, - 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x73, 0x5a, 0x10, 0x78, 0xa1, 0xda, - 0x10, 0x78, 0x8e, 0xd6, 0x87, 0xff, 0x00, 0xc0, 0x73, 0x71, 0x0c, 0x7f, - 0x00, 0x78, 0x73, 0x02, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x00, 0x78, - 0x73, 0x02, 0xa0, 0x06, 0x12, 0x7f, 0x00, 0x7f, 0x02, 0x7f, 0x06, 0x7f, - 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x60, 0x17, - 0x00, 0x00, 0x0c, 0x7f, 0xa7, 0xbd, 0x00, 0x01, 0x00, 0x78, 0x73, 0x68, - 0x0e, 0x7e, 0x20, 0x71, 0xa9, 0xb1, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x73, 0x86, 0x70, 0x07, 0x00, 0x05, - 0x00, 0x78, 0x73, 0x88, 0x70, 0x07, 0x00, 0x00, 0x0e, 0x7f, 0x00, 0x7c, - 0x0f, 0x7e, 0x0e, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, 0x02, 0x7e, 0x00, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa9, 0xb1, 0x2c, 0x10, - 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x00, 0x40, 0x73, 0xc8, - 0x22, 0x00, 0xac, 0x06, 0x00, 0xc0, 0x73, 0xc3, 0x70, 0x38, 0xac, 0x36, - 0x00, 0xc0, 0x73, 0xa6, 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0xac, 0x36, - 0x00, 0xc0, 0x73, 0xb4, 0x2c, 0x00, 0xaf, 0x36, 0x00, 0x40, 0x73, 0xb2, - 0x2f, 0x00, 0x70, 0x36, 0x00, 0x78, 0x73, 0xb4, 0x70, 0x37, 0x00, 0x00, - 0x66, 0x0c, 0x2c, 0x00, 0xaf, 0x06, 0x00, 0x40, 0x73, 0xbc, 0x7e, 0x0e, - 0x00, 0x78, 0x73, 0xbd, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x73, 0xc8, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x00, 0x78, 0x73, 0x99, 0x12, 0x7f, 0x00, 0x7f, 0x02, 0x7f, 0x06, 0x7f, - 0x0c, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x0e, 0x7e, - 0x0d, 0x7e, 0x0c, 0x7e, 0x06, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0xa9, 0xb1, 0x76, 0x0c, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x00, 0x40, 0x74, 0x69, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0xa2, 0x06, 0x00, 0xc0, 0x74, 0x64, 0x70, 0x24, 0xac, 0x06, - 0x00, 0xc0, 0x74, 0x0f, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, - 0x00, 0x40, 0x74, 0x3d, 0x10, 0x78, 0x6e, 0x0f, 0x68, 0xc3, 0x00, 0x00, - 0x10, 0x78, 0x73, 0x78, 0x70, 0x27, 0x00, 0x00, 0x03, 0x7e, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x00, 0x40, 0x74, 0x06, - 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x00, 0x40, 0x74, 0x0e, 0x68, 0x27, 0x00, 0x01, - 0x03, 0x7f, 0x70, 0x0c, 0xac, 0x36, 0x00, 0xc0, 0x74, 0x15, 0x66, 0x0c, - 0x76, 0x0e, 0x70, 0x08, 0xac, 0x36, 0x00, 0xc0, 0x74, 0x23, 0x2c, 0x00, - 0xaf, 0x36, 0x00, 0x40, 0x74, 0x21, 0x2f, 0x00, 0x70, 0x0a, 0x00, 0x78, - 0x74, 0x23, 0x70, 0x0b, 0x00, 0x00, 0x66, 0x0c, 0x06, 0x7e, 0x2c, 0x00, - 0xaf, 0x06, 0x00, 0x40, 0x74, 0x2c, 0x7e, 0x0e, 0x00, 0x78, 0x74, 0x2d, - 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0xc0, - 0x74, 0x41, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0x74, 0x5d, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x78, 0x74, 0x5d, 0x10, 0x78, - 0x73, 0x78, 0x00, 0x78, 0x74, 0x0f, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0x74, 0x49, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x78, 0x74, 0x5d, 0x60, 0x10, - 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x74, 0x5d, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x74, 0x71, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, - 0x8e, 0xc9, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x72, 0x33, 0x0c, 0x7f, - 0x00, 0x78, 0x73, 0xde, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x00, 0x78, - 0x73, 0xde, 0x12, 0x7f, 0x00, 0x7f, 0x06, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, - 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, - 0x00, 0xc0, 0x74, 0x5d, 0x10, 0x78, 0xa1, 0xda, 0x00, 0x78, 0x74, 0x5d, - 0x03, 0x7e, 0x15, 0x7e, 0x13, 0x7e, 0x14, 0x7e, 0x39, 0x08, 0xa0, 0x06, - 0xa1, 0x90, 0x00, 0x20, 0x22, 0x1c, 0xa3, 0x9e, 0x26, 0x76, 0x00, 0xc0, - 0x74, 0x8b, 0x82, 0x10, 0x80, 0x00, 0x00, 0x78, 0x74, 0x82, 0xa0, 0x05, - 0x00, 0x40, 0x74, 0x97, 0x20, 0xa9, 0x00, 0x20, 0x21, 0x98, 0x82, 0x11, - 0xa2, 0x82, 0x00, 0x20, 0x20, 0xc8, 0x20, 0xa0, 0x53, 0xa3, 0x14, 0x7f, - 0x13, 0x7f, 0x15, 0x7f, 0x03, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0xa1, - 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, - 0x00, 0x14, 0x60, 0xc3, 0x00, 0x14, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0x99, 0xa9, 0xa5, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x04, 0x20, 0xa3, 0x78, 0x78, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x10, 0x78, 0x6d, 0xfb, 0x0d, 0x7f, 0x00, 0x7c, - 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x02, 0x14, - 0x20, 0xa3, 0x00, 0x18, 0x20, 0xa3, 0x08, 0x00, 0x78, 0x10, 0xa0, 0x84, - 0xff, 0x00, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x10, 0xa0, 0x84, - 0x00, 0xff, 0x20, 0xa2, 0x78, 0x28, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x18, 0x10, 0x78, 0x6d, 0xfb, - 0x00, 0x7c, 0x0d, 0x7e, 0x01, 0x7e, 0x2f, 0x68, 0x20, 0x09, 0x00, 0x35, - 0x10, 0x78, 0x91, 0xcc, 0x00, 0xc0, 0x75, 0x51, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0x31, 0x20, 0xa3, 0x13, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x78, 0x28, 0x20, 0x68, 0x68, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x00, 0x40, - 0x75, 0x2d, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x14, 0xa2, 0x86, - 0x00, 0x7e, 0x00, 0xc0, 0x75, 0x07, 0x20, 0xa3, 0x00, 0xff, 0x20, 0xa3, - 0xff, 0xfe, 0x00, 0x78, 0x75, 0x42, 0xa2, 0x86, 0x00, 0x7f, 0x00, 0xc0, - 0x75, 0x11, 0x20, 0xa3, 0x00, 0xff, 0x20, 0xa3, 0xff, 0xfd, 0x00, 0x78, - 0x75, 0x42, 0xd2, 0xbc, 0x00, 0x40, 0x75, 0x27, 0xa2, 0x86, 0x00, 0x80, - 0x00, 0xc0, 0x75, 0x1e, 0x20, 0xa3, 0x00, 0xff, 0x20, 0xa3, 0xff, 0xfc, - 0x00, 0x78, 0x75, 0x42, 0xa2, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0x78, 0x75, 0x42, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0x98, 0x20, 0xa2, 0x00, 0x78, 0x75, 0x42, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x7e, 0x00, 0x48, - 0x75, 0x3e, 0x0d, 0x7e, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x75, 0x42, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0x30, 0x20, 0xa2, 0x78, 0x34, 0x20, 0xa2, 0x78, 0x38, 0x20, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x0c, - 0x10, 0x78, 0x6d, 0xfb, 0x01, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x78, 0x17, - 0x00, 0x01, 0x78, 0x03, 0x00, 0x06, 0x01, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x0d, 0x7e, 0x02, 0x7e, 0x79, 0x28, 0x21, 0x68, 0x69, 0x1c, 0xa1, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x75, 0x7a, 0xa1, 0x86, 0x00, 0x03, 0x00, 0x40, - 0x75, 0xd5, 0xa1, 0x86, 0x00, 0x05, 0x00, 0x40, 0x75, 0xb8, 0xa1, 0x86, - 0x00, 0x04, 0x00, 0x40, 0x75, 0xa8, 0xa1, 0x86, 0x00, 0x08, 0x00, 0x40, - 0x75, 0xc2, 0x78, 0x07, 0x00, 0x37, 0x78, 0x13, 0x17, 0x00, 0x10, 0x78, - 0x76, 0x40, 0x02, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x75, 0xfd, - 0x20, 0x09, 0x40, 0x00, 0x68, 0x00, 0x00, 0x79, 0x75, 0x81, 0x75, 0x94, - 0x75, 0xa2, 0x75, 0x96, 0x75, 0xa2, 0x75, 0x9d, 0x75, 0x94, 0x75, 0x94, - 0x75, 0xa2, 0x75, 0xa2, 0x75, 0xa2, 0x75, 0xa2, 0x75, 0x94, 0x75, 0x94, - 0x75, 0x94, 0x75, 0x94, 0x75, 0x94, 0x75, 0xa2, 0x75, 0x94, 0x75, 0xa2, - 0x10, 0x78, 0x13, 0x32, 0x68, 0x24, 0xd0, 0xe4, 0x00, 0x40, 0x75, 0x9d, - 0xd0, 0xcc, 0x00, 0x40, 0x75, 0xa0, 0xa0, 0x0e, 0x00, 0x78, 0x75, 0xa2, - 0x20, 0x09, 0x20, 0x00, 0x68, 0x28, 0x20, 0xa2, 0x68, 0x2c, 0x20, 0xa2, - 0x00, 0x78, 0x75, 0xf3, 0x10, 0x78, 0x75, 0xfd, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x09, 0x40, 0x00, 0x6a, 0x00, 0xa2, 0x86, - 0x00, 0x02, 0x00, 0xc0, 0x75, 0xb6, 0xa0, 0x0e, 0x00, 0x78, 0x75, 0xf3, - 0x10, 0x78, 0x75, 0xfd, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0x09, 0x40, 0x00, 0x00, 0x78, 0x75, 0xf3, 0x10, 0x78, 0x75, 0xfd, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x09, 0x40, 0x00, - 0xa2, 0x86, 0x00, 0x05, 0x00, 0x40, 0x75, 0xd2, 0xa2, 0x86, 0x00, 0x02, - 0x00, 0xc0, 0x75, 0xd3, 0xa0, 0x0e, 0x00, 0x78, 0x75, 0xf3, 0x10, 0x78, - 0x75, 0xfd, 0x68, 0x10, 0x20, 0x68, 0x69, 0x7c, 0x68, 0x10, 0xa1, 0x12, - 0x69, 0x80, 0x68, 0x14, 0xa1, 0x03, 0x20, 0xa2, 0x22, 0xa2, 0x79, 0x28, - 0xa1, 0x80, 0x00, 0x00, 0x20, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x00, 0x40, - 0x75, 0xf1, 0xa0, 0x8e, 0x00, 0x04, 0x00, 0x40, 0x75, 0xf1, 0x20, 0x09, - 0x40, 0x00, 0x00, 0x78, 0x75, 0xf3, 0x20, 0x09, 0x00, 0x00, 0x21, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x18, 0x10, 0x78, 0x6d, 0xfb, - 0x02, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x03, 0x7e, 0x04, 0x7e, 0x05, 0x7e, - 0x06, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xc2, 0xa0, 0x06, - 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa2, 0x79, 0x34, 0x21, 0xa2, 0x79, 0x38, - 0x21, 0xa2, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x92, - 0x00, 0x7e, 0x00, 0x48, 0x76, 0x23, 0x0d, 0x7e, 0x20, 0x69, 0xa7, 0x1b, - 0x2d, 0x2c, 0x8d, 0x68, 0x2d, 0x34, 0xa0, 0xe8, 0xa8, 0x35, 0x2d, 0x6c, - 0x6b, 0x10, 0x6c, 0x14, 0x0d, 0x7f, 0x00, 0x78, 0x76, 0x29, 0x20, 0x19, - 0x00, 0x00, 0x64, 0x98, 0x20, 0x29, 0x00, 0x00, 0x66, 0x30, 0x78, 0x28, - 0xa0, 0x80, 0x00, 0x07, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, - 0x76, 0x37, 0x25, 0xa2, 0x26, 0xa2, 0x23, 0xa2, 0x24, 0xa2, 0x00, 0x78, - 0x76, 0x3b, 0x23, 0xa2, 0x24, 0xa2, 0x25, 0xa2, 0x26, 0xa2, 0x06, 0x7f, - 0x05, 0x7f, 0x04, 0x7f, 0x03, 0x7f, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, - 0x10, 0x78, 0x67, 0xc2, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x09, 0x78, 0x10, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, - 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, - 0x67, 0x28, 0x20, 0xa3, 0x14, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x34, - 0x20, 0xa2, 0x78, 0x38, 0x20, 0xa2, 0x78, 0x28, 0x20, 0xa2, 0x78, 0x2c, - 0x20, 0xa2, 0x78, 0x30, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x07, 0x20, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x10, 0x10, 0x78, 0x6d, 0xfb, - 0x00, 0x7c, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x67, 0xb9, 0x20, 0xa3, - 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x28, 0x20, 0xa2, 0x78, 0x10, - 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, 0x10, 0x78, 0x6d, 0xfb, 0x00, 0x7c, - 0x14, 0x7e, 0x20, 0xa1, 0x02, 0x0b, 0x10, 0x78, 0x76, 0x89, 0x60, 0xc3, - 0x00, 0x00, 0x10, 0x78, 0x6d, 0xfb, 0x14, 0x7f, 0x00, 0x7c, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x40, 0x76, 0xa6, 0x0d, 0x7e, 0xa0, 0xe8, - 0xa8, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x03, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xa7, 0x1b, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x0d, 0x7f, 0x00, 0x78, 0x76, 0xae, 0x20, 0xa3, 0x03, 0x00, - 0x62, 0x98, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x30, 0x22, 0xa2, - 0x20, 0xa3, 0x08, 0x19, 0x20, 0xa3, 0x00, 0x00, 0x10, 0x78, 0x6d, 0xea, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x2f, 0xa2, 0x7a, 0x08, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x7c, 0x20, 0x61, - 0xae, 0x00, 0x2a, 0x70, 0x70, 0x64, 0x70, 0x4a, 0x70, 0x4f, 0xae, 0x00, - 0x00, 0x7c, 0x0e, 0x7e, 0x12, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x75, 0x48, 0xa5, 0x82, 0x00, 0x10, 0x00, 0x48, 0x76, 0xf9, - 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, - 0x76, 0xe5, 0xac, 0xe0, 0x00, 0x10, 0x70, 0x58, 0xac, 0x02, 0x00, 0xc8, - 0x76, 0xe1, 0x00, 0x78, 0x76, 0xd4, 0x20, 0x61, 0xae, 0x00, 0x00, 0x78, - 0x76, 0xd4, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, 0x75, 0x4a, 0xac, 0xa8, - 0x00, 0x10, 0x70, 0x58, 0xa5, 0x02, 0x00, 0xc8, 0x76, 0xf5, 0x75, 0x4e, - 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x70, 0x4f, - 0xae, 0x00, 0x00, 0x78, 0x76, 0xf0, 0xa0, 0x06, 0x00, 0x78, 0x76, 0xf2, - 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x75, 0x48, 0xa5, 0x82, 0x00, 0x10, - 0x00, 0x48, 0x77, 0x2a, 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x00, 0x00, 0x40, 0x77, 0x17, 0xac, 0xe0, 0x00, 0x10, 0x70, 0x58, - 0xac, 0x02, 0x00, 0xc8, 0x77, 0x13, 0x00, 0x78, 0x77, 0x06, 0x20, 0x61, - 0xae, 0x00, 0x00, 0x78, 0x77, 0x06, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, - 0x75, 0x4a, 0xac, 0xa8, 0x00, 0x10, 0x70, 0x58, 0xa5, 0x02, 0x00, 0xc8, - 0x77, 0x26, 0x75, 0x4e, 0xa0, 0x85, 0x00, 0x01, 0x0e, 0x7f, 0x00, 0x7c, - 0x70, 0x4f, 0xae, 0x00, 0x00, 0x78, 0x77, 0x22, 0xa0, 0x06, 0x00, 0x78, - 0x77, 0x24, 0xac, 0x82, 0xae, 0x00, 0x10, 0x48, 0x13, 0x32, 0x20, 0x01, - 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x10, 0xc8, 0x13, 0x32, 0xa0, 0x06, - 0x60, 0x06, 0x60, 0x0a, 0x60, 0x0e, 0x60, 0x12, 0x60, 0x16, 0x60, 0x1a, - 0x60, 0x1f, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x60, 0x22, 0x60, 0x26, - 0x60, 0x2a, 0x60, 0x2e, 0x60, 0x32, 0x60, 0x36, 0x60, 0x3a, 0x60, 0x3e, - 0x20, 0x61, 0xa7, 0x00, 0x60, 0x48, 0x80, 0x00, 0x60, 0x4a, 0xa0, 0x86, - 0x00, 0x01, 0x00, 0x40, 0x77, 0x54, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x78, 0x77, 0x53, - 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x79, 0x77, 0x61, 0x77, 0x6a, - 0x77, 0x7b, 0x77, 0x97, 0x77, 0xb3, 0x92, 0x1e, 0x92, 0x3a, 0x92, 0x56, - 0x77, 0x6a, 0x77, 0x7b, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, 0x77, 0x73, - 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x8e, - 0x00, 0x47, 0x00, 0xc0, 0x77, 0x7a, 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, - 0x00, 0x7c, 0x06, 0x7e, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x10, 0xc8, - 0x13, 0x32, 0x10, 0x79, 0x77, 0x85, 0x06, 0x7f, 0x00, 0x7c, 0x77, 0x95, - 0x7b, 0x00, 0x7c, 0xb2, 0x77, 0x95, 0x7d, 0x36, 0x77, 0xcf, 0x77, 0x95, - 0x77, 0x95, 0x7a, 0x92, 0x80, 0xf6, 0x77, 0x95, 0x77, 0x95, 0x77, 0x95, - 0x77, 0x95, 0x77, 0x95, 0x77, 0x95, 0x10, 0x78, 0x13, 0x32, 0x06, 0x7e, - 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, - 0x77, 0xa1, 0x06, 0x7f, 0x00, 0x7c, 0x77, 0xb1, 0x87, 0xd3, 0x77, 0xb1, - 0x77, 0xb1, 0x77, 0xb1, 0x77, 0xb1, 0x77, 0xb1, 0x77, 0xb1, 0x87, 0x76, - 0x89, 0x61, 0x77, 0xb1, 0x88, 0x03, 0x88, 0x89, 0x88, 0x03, 0x88, 0x89, - 0x77, 0xb1, 0x10, 0x78, 0x13, 0x32, 0x06, 0x7e, 0x60, 0x00, 0xa0, 0xb2, - 0x00, 0x10, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x77, 0xbd, 0x06, 0x7f, - 0x00, 0x7c, 0x77, 0xcd, 0x81, 0x3d, 0x82, 0x0e, 0x83, 0x72, 0x84, 0xf1, - 0x77, 0xcd, 0x77, 0xcd, 0x77, 0xcd, 0x81, 0x16, 0x87, 0x1e, 0x87, 0x22, - 0x77, 0xcd, 0x77, 0xcd, 0x77, 0xcd, 0x77, 0xcd, 0x87, 0x52, 0x10, 0x78, - 0x13, 0x32, 0xa1, 0xb6, 0x00, 0x15, 0x00, 0xc0, 0x77, 0xd7, 0x10, 0x78, - 0x77, 0x2d, 0x00, 0x78, 0x77, 0xdd, 0xa1, 0xb6, 0x00, 0x16, 0x10, 0xc0, - 0x13, 0x32, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x20, 0xa9, 0x00, 0x0e, - 0x2e, 0x98, 0x60, 0x10, 0x20, 0xa0, 0x53, 0xa3, 0x20, 0xa9, 0x00, 0x06, - 0x33, 0x10, 0x34, 0x20, 0x93, 0x98, 0x94, 0xa0, 0x33, 0x18, 0x34, 0x28, - 0x22, 0x2e, 0x23, 0x26, 0xa2, 0x90, 0x00, 0x02, 0xa5, 0xa8, 0x00, 0x02, - 0xa3, 0x98, 0x00, 0x02, 0xa4, 0xa0, 0x00, 0x02, 0x00, 0xf0, 0x77, 0xec, - 0x0e, 0x7e, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x78, 0x03, 0x60, 0x10, - 0x20, 0x70, 0x70, 0x07, 0x00, 0x00, 0x70, 0x37, 0x01, 0x03, 0x0e, 0x7f, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x0d, 0x7e, 0x03, 0x7e, 0x73, 0x30, - 0xa3, 0x86, 0x02, 0x00, 0x00, 0xc0, 0x78, 0x14, 0x60, 0x18, 0x20, 0x68, - 0x68, 0x13, 0x00, 0xff, 0x68, 0x17, 0xff, 0xfd, 0x60, 0x10, 0xa0, 0x05, - 0x00, 0x40, 0x78, 0x1e, 0x20, 0x68, 0x68, 0x07, 0x00, 0x00, 0x68, 0x37, - 0x01, 0x03, 0x6b, 0x32, 0x10, 0x78, 0x77, 0x2d, 0x03, 0x7f, 0x0d, 0x7f, - 0x00, 0x7c, 0x01, 0x7e, 0x20, 0xa9, 0x00, 0x2a, 0xae, 0x80, 0x00, 0x0c, - 0x20, 0x98, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x53, 0xa3, - 0x20, 0xa9, 0x00, 0x2a, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, - 0xa0, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x53, 0xa3, 0x0e, 0x7e, 0x60, 0x10, - 0x20, 0x04, 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, 0x0e, 0x7f, 0x10, 0x78, - 0x77, 0x2d, 0x01, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x0d, 0x7e, 0x60, 0x3f, - 0x00, 0x00, 0x2c, 0x68, 0x01, 0x7e, 0x20, 0x09, 0x00, 0x35, 0x10, 0x78, - 0x91, 0xcc, 0x01, 0x7f, 0x00, 0xc0, 0x78, 0x5f, 0x02, 0x7e, 0x62, 0x28, - 0x22, 0x68, 0x02, 0x7f, 0x20, 0x71, 0xac, 0x8c, 0x6b, 0x1c, 0xa3, 0x86, - 0x00, 0x03, 0x00, 0x40, 0x78, 0x63, 0xa3, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x78, 0x67, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x78, 0x69, 0x10, 0x78, - 0x78, 0x6c, 0x00, 0x78, 0x78, 0x69, 0x10, 0x78, 0x79, 0x38, 0x0d, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x68, 0x10, 0x20, 0x78, 0xa1, 0x86, - 0x00, 0x15, 0x00, 0x40, 0x79, 0x1d, 0xa1, 0x8e, 0x00, 0x16, 0x00, 0xc0, - 0x79, 0x36, 0x70, 0x0c, 0xa0, 0x8c, 0xff, 0x00, 0xa1, 0x86, 0x17, 0x00, - 0x00, 0x40, 0x78, 0x82, 0xa1, 0x86, 0x03, 0x00, 0x00, 0xc0, 0x78, 0xf8, - 0x8f, 0xff, 0x00, 0xc0, 0x78, 0x8c, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x0f, - 0x00, 0x40, 0x78, 0xdb, 0x00, 0x78, 0x79, 0x34, 0x68, 0x08, 0xa0, 0x86, - 0xff, 0xff, 0x00, 0xc0, 0x79, 0x21, 0x78, 0x4c, 0xa0, 0x84, 0x00, 0x60, - 0xa0, 0x86, 0x00, 0x20, 0x00, 0xc0, 0x78, 0xa2, 0x79, 0x7c, 0x78, 0x10, - 0xa1, 0x06, 0x00, 0xc0, 0x79, 0x21, 0x79, 0x80, 0x78, 0x14, 0xa1, 0x06, - 0x00, 0xc0, 0x79, 0x21, 0x10, 0x78, 0x8e, 0xc9, 0x68, 0x30, 0x78, 0x52, - 0x78, 0x4c, 0xc0, 0xdc, 0xc0, 0xf4, 0xc0, 0xd4, 0x78, 0x4e, 0x02, 0x7e, - 0xa0, 0x0e, 0x6a, 0x14, 0x20, 0x01, 0x00, 0x0a, 0x10, 0x78, 0x5c, 0x1c, - 0x78, 0x54, 0xa2, 0x0a, 0x00, 0x48, 0x78, 0xb7, 0x80, 0x11, 0x7a, 0x56, - 0x82, 0xff, 0x02, 0x7f, 0x00, 0xc0, 0x78, 0xc3, 0x0c, 0x7e, 0x2d, 0x60, - 0x10, 0x78, 0x8a, 0xf0, 0x0c, 0x7f, 0x00, 0x78, 0x79, 0x34, 0x0c, 0x7e, - 0x0d, 0x7e, 0x2f, 0x68, 0x68, 0x38, 0xd0, 0xfc, 0x00, 0xc0, 0x78, 0xce, - 0x10, 0x78, 0x43, 0x53, 0x00, 0x78, 0x78, 0xd0, 0x10, 0x78, 0x44, 0x31, - 0x0d, 0x7f, 0x0c, 0x7f, 0x00, 0xc0, 0x79, 0x21, 0x0c, 0x7e, 0x2d, 0x60, - 0x10, 0x78, 0x77, 0x2d, 0x0c, 0x7f, 0x00, 0x78, 0x79, 0x34, 0x0c, 0x7e, - 0x10, 0x78, 0x91, 0x97, 0x00, 0x40, 0x78, 0xf1, 0x60, 0x13, 0x00, 0x00, - 0x68, 0x18, 0x60, 0x1a, 0x60, 0x1f, 0x00, 0x03, 0x69, 0x04, 0x0c, 0x7e, - 0x2d, 0x60, 0x10, 0x78, 0x77, 0x2d, 0x0c, 0x7f, 0x10, 0x78, 0x77, 0x5c, - 0x0c, 0x7f, 0x00, 0x78, 0x79, 0x34, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, - 0x68, 0x3e, 0x0c, 0x7f, 0x00, 0x78, 0x79, 0x34, 0x70, 0x08, 0xa0, 0x86, - 0x00, 0x0b, 0x00, 0xc0, 0x79, 0x12, 0x60, 0x18, 0x20, 0x0c, 0xc1, 0xbc, - 0x21, 0x02, 0x0c, 0x7e, 0x2d, 0x60, 0x78, 0x53, 0x00, 0x03, 0x60, 0x07, - 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7f, 0x00, 0x78, 0x79, 0x34, - 0x70, 0x0c, 0xa0, 0x86, 0x2a, 0x00, 0x00, 0xc0, 0x79, 0x21, 0x20, 0x01, - 0xa9, 0xa4, 0x20, 0x04, 0x68, 0x3e, 0x00, 0x78, 0x79, 0x34, 0x10, 0x78, - 0x79, 0x53, 0x00, 0x78, 0x79, 0x36, 0x8f, 0xff, 0x10, 0x40, 0x13, 0x32, - 0x0c, 0x7e, 0x0d, 0x7e, 0x2d, 0x60, 0x2f, 0x68, 0x68, 0x37, 0x01, 0x03, - 0x68, 0x4b, 0x00, 0x03, 0x10, 0x78, 0x89, 0xdf, 0x10, 0x78, 0x8e, 0xc9, - 0x10, 0x78, 0x8e, 0xd6, 0x0d, 0x7f, 0x0c, 0x7f, 0x10, 0x78, 0x77, 0x2d, - 0x0f, 0x7f, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x15, 0x00, 0xc0, 0x79, 0x42, - 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x68, 0x3e, 0x00, 0x78, 0x79, 0x50, - 0xa1, 0x8e, 0x00, 0x16, 0x00, 0xc0, 0x79, 0x52, 0x0c, 0x7e, 0x2d, 0x00, - 0x20, 0x60, 0x10, 0x78, 0xa4, 0xa5, 0x10, 0x78, 0x5b, 0xc1, 0x10, 0x78, - 0x77, 0x2d, 0x0c, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x02, 0x7e, - 0x03, 0x7e, 0x04, 0x7e, 0x72, 0x28, 0x7c, 0x80, 0x7b, 0x7c, 0xd2, 0xf4, - 0x00, 0x40, 0x79, 0x62, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x68, 0x3e, - 0x00, 0x78, 0x79, 0xc6, 0x0c, 0x7e, 0x2d, 0x60, 0x10, 0x78, 0x8a, 0x03, - 0x0c, 0x7f, 0x68, 0x04, 0xa0, 0x86, 0x00, 0x50, 0x00, 0xc0, 0x79, 0x7a, - 0x0c, 0x7e, 0x2d, 0x00, 0x20, 0x60, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x50, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7f, - 0x00, 0x78, 0x79, 0xc6, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x0f, 0x00, 0x40, - 0x79, 0x9c, 0x8f, 0xff, 0x10, 0x40, 0x13, 0x32, 0x68, 0x24, 0xd0, 0xdc, - 0x00, 0xc0, 0x79, 0x9c, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, - 0x79, 0xa1, 0x78, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x79, 0xa1, 0x78, 0x4c, - 0xc0, 0xdc, 0xc0, 0xf4, 0x78, 0x4e, 0x78, 0x50, 0xc0, 0xf4, 0xc0, 0xfc, - 0x78, 0x52, 0x20, 0x01, 0x00, 0x01, 0x68, 0x2e, 0x00, 0x78, 0x79, 0xc0, - 0x20, 0x01, 0x00, 0x07, 0x68, 0x2e, 0x00, 0x78, 0x79, 0xc0, 0x78, 0x4c, - 0xd0, 0xb4, 0x00, 0xc0, 0x79, 0xae, 0xd0, 0xac, 0x00, 0x40, 0x79, 0x9c, - 0x78, 0x4c, 0xd0, 0xf4, 0x00, 0xc0, 0x79, 0x9c, 0x00, 0x78, 0x79, 0x8f, - 0xd2, 0xec, 0x00, 0xc0, 0x79, 0x9c, 0x70, 0x24, 0xa3, 0x06, 0x00, 0xc0, - 0x79, 0xb9, 0x70, 0x20, 0xa4, 0x06, 0x00, 0x40, 0x79, 0x9c, 0x70, 0x20, - 0x68, 0x36, 0x70, 0x24, 0x68, 0x3a, 0x20, 0x01, 0x00, 0x05, 0x68, 0x2e, - 0x10, 0x78, 0x90, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x79, 0xc8, - 0x10, 0x78, 0x77, 0x2d, 0x04, 0x7f, 0x03, 0x7f, 0x02, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x0d, 0x7e, 0x02, 0x7e, 0x60, 0x34, 0x20, 0x68, 0x6a, 0x1c, - 0xa2, 0x86, 0x00, 0x07, 0x00, 0x40, 0x7a, 0x35, 0xa2, 0x86, 0x00, 0x02, - 0x00, 0x40, 0x7a, 0x35, 0xa2, 0x86, 0x00, 0x00, 0x00, 0x40, 0x7a, 0x35, - 0x68, 0x08, 0x63, 0x38, 0xa3, 0x06, 0x00, 0xc0, 0x7a, 0x35, 0x20, 0x71, - 0xac, 0x8c, 0xa1, 0x86, 0x00, 0x15, 0x00, 0x40, 0x7a, 0x2f, 0xa1, 0x8e, - 0x00, 0x16, 0x00, 0xc0, 0x7a, 0x02, 0x60, 0x30, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x01, 0x00, 0xc0, 0x7a, 0x02, 0x70, 0x0c, 0xa0, 0x86, - 0x2a, 0x00, 0x00, 0xc0, 0x7a, 0x02, 0x60, 0x34, 0xa0, 0x80, 0x00, 0x09, - 0x20, 0x0c, 0xc1, 0xdd, 0xc1, 0xf5, 0x21, 0x02, 0x00, 0x78, 0x7a, 0x2f, - 0x0c, 0x7e, 0x60, 0x34, 0x20, 0x60, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x4b, - 0x00, 0x40, 0x7a, 0x22, 0xa1, 0x86, 0x00, 0x4c, 0x00, 0x40, 0x7a, 0x22, - 0xa1, 0x86, 0x00, 0x4d, 0x00, 0x40, 0x7a, 0x22, 0xa1, 0x86, 0x00, 0x4e, - 0x00, 0x40, 0x7a, 0x22, 0xa1, 0x86, 0x00, 0x52, 0x00, 0x40, 0x7a, 0x22, - 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x10, 0x40, 0x13, 0x32, - 0x68, 0x53, 0x00, 0x03, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, - 0x60, 0x1f, 0x00, 0x02, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x0c, 0x7f, 0x00, 0x78, 0x7a, 0x35, 0x60, 0x34, 0x20, 0x68, 0x20, 0x01, - 0xa9, 0xa4, 0x20, 0x04, 0x68, 0x3e, 0x10, 0x78, 0x77, 0x2d, 0x02, 0x7f, - 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0xa9, 0x00, 0x0e, - 0x2e, 0x98, 0x60, 0x10, 0x20, 0xa0, 0x53, 0xa3, 0xa1, 0xb6, 0x00, 0x15, - 0x00, 0xc0, 0x7a, 0x73, 0x60, 0x18, 0x20, 0x68, 0x15, 0x7e, 0x03, 0x7e, - 0x02, 0x7e, 0xae, 0x90, 0x00, 0x0c, 0xa2, 0x90, 0x00, 0x04, 0x20, 0xa9, - 0x00, 0x04, 0xad, 0x98, 0x00, 0x0a, 0x10, 0x78, 0x80, 0xde, 0x02, 0x7f, - 0x03, 0x7f, 0x15, 0x7f, 0x00, 0xc0, 0x7a, 0x76, 0x15, 0x7e, 0x03, 0x7e, - 0x02, 0x7e, 0xae, 0x90, 0x00, 0x0c, 0xa2, 0x90, 0x00, 0x08, 0x20, 0xa9, - 0x00, 0x04, 0xad, 0x98, 0x00, 0x06, 0x10, 0x78, 0x80, 0xde, 0x02, 0x7f, - 0x03, 0x7f, 0x15, 0x7f, 0x00, 0xc0, 0x7a, 0x76, 0x70, 0x38, 0x68, 0x0a, - 0x70, 0x3c, 0x68, 0x0e, 0x68, 0x00, 0xc0, 0x8d, 0x68, 0x02, 0x0d, 0x7f, - 0x00, 0x78, 0x77, 0xf8, 0x10, 0x78, 0x28, 0x80, 0x0c, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x2f, 0x00, 0x60, 0x1a, 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x07, 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x45, 0x35, 0x10, 0x78, - 0x5d, 0xd7, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7f, 0x00, 0x78, 0x7a, 0x73, - 0x21, 0x00, 0xa1, 0xb2, 0x00, 0x44, 0x10, 0xc8, 0x13, 0x32, 0xa1, 0xb2, - 0x00, 0x40, 0x00, 0xc8, 0x7a, 0xf7, 0x00, 0x79, 0x7a, 0x9d, 0x7a, 0xeb, - 0x7a, 0xdf, 0x7a, 0xeb, 0x7a, 0xeb, 0x7a, 0xeb, 0x7a, 0xeb, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xeb, 0x7a, 0xdd, 0x7a, 0xeb, 0x7a, 0xeb, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xeb, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xeb, 0x7a, 0xeb, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, 0x7a, 0xdd, - 0x7a, 0xeb, 0x7a, 0xdd, 0x7a, 0xdd, 0x10, 0x78, 0x13, 0x32, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x10, 0x78, 0x5d, 0xd7, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x10, 0x78, 0x5d, 0xd7, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0x26, 0x00, - 0x00, 0x79, 0x7a, 0xfa, 0x7a, 0xfe, 0x7a, 0xfe, 0x7a, 0xfe, 0x7a, 0xeb, - 0x10, 0x78, 0x13, 0x32, 0x60, 0x04, 0xa0, 0xb2, 0x00, 0x44, 0x10, 0xc8, - 0x13, 0x32, 0xa1, 0xb6, 0x00, 0x13, 0x00, 0xc0, 0x7b, 0x10, 0xa0, 0xb2, - 0x00, 0x40, 0x00, 0xc8, 0x7c, 0x79, 0x20, 0x08, 0x00, 0x79, 0x7b, 0xbf, - 0xa1, 0xb6, 0x00, 0x27, 0x00, 0xc0, 0x7b, 0x7c, 0x10, 0x78, 0x61, 0xcd, - 0x60, 0x04, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0x40, 0x7b, 0x2d, 0x10, 0x78, - 0x8f, 0x10, 0x00, 0x40, 0x7b, 0x74, 0xa0, 0x8e, 0x00, 0x21, 0x00, 0x40, - 0x7b, 0x78, 0xa0, 0x8e, 0x00, 0x22, 0x00, 0x40, 0x7b, 0x74, 0xa0, 0x8e, - 0x00, 0x3d, 0x00, 0x40, 0x7b, 0x78, 0x00, 0x78, 0x7b, 0x6f, 0x10, 0x78, - 0x28, 0xa6, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x02, 0x60, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x0c, 0x10, 0x78, 0x7c, 0x83, 0xa1, 0x86, - 0x00, 0x7e, 0x00, 0xc0, 0x7b, 0x42, 0x20, 0x01, 0xa7, 0x33, 0x20, 0x14, - 0xc2, 0x85, 0x22, 0x02, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x21, 0x10, - 0x02, 0x7e, 0x20, 0x19, 0x00, 0x28, 0x10, 0x78, 0x73, 0xd0, 0x02, 0x7f, - 0x10, 0x78, 0xa5, 0x01, 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x01, 0x7e, - 0x02, 0x7e, 0x03, 0x7e, 0x21, 0x10, 0x20, 0x19, 0x00, 0x28, 0x10, 0x78, - 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x5e, 0x0a, - 0x0c, 0x7e, 0x60, 0x18, 0xa0, 0x65, 0x00, 0x40, 0x7b, 0x65, 0x10, 0x78, - 0x47, 0xe9, 0x0c, 0x7f, 0x2c, 0x08, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, - 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x10, 0x78, 0x45, 0x7f, 0x10, 0x78, - 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, 0x7c, 0x83, - 0x00, 0x78, 0x7b, 0x6f, 0x10, 0x78, 0x7c, 0xa6, 0x00, 0x78, 0x7b, 0x6f, - 0xa1, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x7b, 0x73, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x28, 0x80, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0xc0, 0x7b, 0x9b, - 0x10, 0x78, 0x28, 0xa6, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x0c, - 0x10, 0x78, 0x7c, 0x83, 0xa1, 0x86, 0x00, 0x7e, 0x00, 0xc0, 0x7b, 0x99, - 0x20, 0x01, 0xa7, 0x33, 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, 0x00, 0x78, - 0x7b, 0x6f, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, 0x7b, 0xa3, 0x10, 0x78, - 0x7c, 0x83, 0x00, 0x78, 0x7b, 0x6f, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x32, - 0x00, 0xc0, 0x7b, 0xb4, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, 0xa7, 0x82, - 0x20, 0x79, 0x00, 0x00, 0x10, 0x78, 0x2b, 0xd7, 0x0f, 0x7f, 0x0e, 0x7f, - 0x00, 0x78, 0x7b, 0x6f, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x21, 0x00, 0x40, - 0x7b, 0x9f, 0xa0, 0x8e, 0x00, 0x22, 0x10, 0x40, 0x7c, 0x83, 0x00, 0x78, - 0x7b, 0x6f, 0x7c, 0x01, 0x7c, 0x03, 0x7c, 0x07, 0x7c, 0x0b, 0x7c, 0x0f, - 0x7c, 0x13, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, - 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, - 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, - 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, - 0x7b, 0xff, 0x7c, 0x17, 0x7c, 0x29, 0x7b, 0xff, 0x7c, 0x2b, 0x7c, 0x29, - 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7c, 0x29, - 0x7c, 0x29, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, - 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7c, 0x5c, 0x7c, 0x29, 0x7b, 0xff, - 0x7c, 0x23, 0x7b, 0xff, 0x7b, 0xff, 0x7b, 0xff, 0x7c, 0x25, 0x7b, 0xff, - 0x7b, 0xff, 0x7b, 0xff, 0x7c, 0x29, 0x7b, 0xff, 0x7b, 0xff, 0x10, 0x78, - 0x13, 0x32, 0x00, 0x78, 0x7c, 0x29, 0x20, 0x01, 0x00, 0x0b, 0x00, 0x78, - 0x7c, 0x36, 0x20, 0x01, 0x00, 0x03, 0x00, 0x78, 0x7c, 0x36, 0x20, 0x01, - 0x00, 0x05, 0x00, 0x78, 0x7c, 0x36, 0x20, 0x01, 0x00, 0x01, 0x00, 0x78, - 0x7c, 0x36, 0x20, 0x01, 0x00, 0x09, 0x00, 0x78, 0x7c, 0x36, 0x10, 0x78, - 0x61, 0xcd, 0x60, 0x03, 0x00, 0x05, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, - 0x60, 0x3e, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x7c, 0x35, 0x00, 0x78, - 0x7c, 0x29, 0x00, 0x78, 0x7c, 0x29, 0x10, 0x78, 0x45, 0x02, 0x00, 0x78, - 0x7c, 0x6e, 0x10, 0x78, 0x61, 0xcd, 0x60, 0x03, 0x00, 0x04, 0x20, 0x01, - 0xa9, 0xa2, 0x20, 0x04, 0x60, 0x16, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, - 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x61, 0xcd, 0x20, 0x01, 0xa9, 0xa4, - 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, 0x00, 0x02, 0x03, 0x7e, 0x20, 0x19, - 0xa7, 0x5d, 0x23, 0x04, 0xa0, 0x84, 0xff, 0x00, 0x00, 0xc0, 0x7c, 0x4d, - 0x20, 0x19, 0xa9, 0xa2, 0x23, 0x1c, 0x00, 0x78, 0x7c, 0x56, 0x80, 0x07, - 0xa0, 0x9a, 0x00, 0x04, 0x00, 0x48, 0x7c, 0x48, 0x80, 0x03, 0x80, 0x1b, - 0x83, 0x1b, 0xa3, 0x18, 0x63, 0x16, 0x03, 0x7f, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x78, 0x7c, 0x35, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, 0xa7, 0x82, - 0x20, 0x79, 0x00, 0x00, 0x10, 0x78, 0x2b, 0xd7, 0x0f, 0x7f, 0x0e, 0x7f, - 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x78, 0x7c, 0x35, 0x10, 0x78, 0x61, 0xcd, 0x60, 0x03, 0x00, 0x02, - 0x20, 0x01, 0xa9, 0xa2, 0x20, 0x04, 0x60, 0x16, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x7c, 0x26, 0x00, 0x20, 0x08, 0x00, 0x79, 0x7c, 0x7d, 0x7c, 0x81, - 0x7c, 0x81, 0x7c, 0x81, 0x7c, 0x6e, 0x10, 0x78, 0x13, 0x32, 0x0e, 0x7e, - 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x7c, 0x9f, 0x60, 0x10, 0x20, 0x70, - 0x70, 0x38, 0xd0, 0xfc, 0x00, 0x40, 0x7c, 0x9f, 0x70, 0x07, 0x00, 0x00, - 0x01, 0x7e, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x21, 0x00, 0x40, 0x7c, 0xa1, - 0xa0, 0x8e, 0x00, 0x3d, 0x00, 0x40, 0x7c, 0xa1, 0x01, 0x7f, 0x70, 0x37, - 0x01, 0x03, 0x70, 0x33, 0x01, 0x00, 0x0e, 0x7f, 0x00, 0x7c, 0x01, 0x7f, - 0x10, 0x78, 0x7c, 0xa6, 0x00, 0x78, 0x7c, 0x9f, 0x0e, 0x7e, 0xac, 0xf0, - 0x00, 0x04, 0x2e, 0x74, 0x70, 0x00, 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, - 0x70, 0x23, 0x80, 0x01, 0x0e, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x66, 0x18, - 0x26, 0x68, 0x68, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x0d, 0x7f, 0xa0, 0xb2, - 0x00, 0x0c, 0x10, 0xc8, 0x13, 0x32, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x43, - 0x00, 0xc0, 0x7c, 0xc6, 0x10, 0x78, 0x91, 0x44, 0x00, 0x78, 0x7d, 0x25, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x33, 0x00, 0xc0, 0x7c, 0xcf, 0x10, 0x78, - 0x90, 0xe8, 0x00, 0x78, 0x7d, 0x25, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x28, - 0x00, 0xc0, 0x7c, 0xd8, 0x10, 0x78, 0x8f, 0x3f, 0x00, 0x78, 0x7d, 0x25, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x29, 0x00, 0xc0, 0x7c, 0xe1, 0x10, 0x78, - 0x8f, 0x59, 0x00, 0x78, 0x7d, 0x25, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x1f, - 0x00, 0xc0, 0x7c, 0xea, 0x10, 0x78, 0x77, 0xde, 0x00, 0x78, 0x7d, 0x25, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x00, 0x00, 0xc0, 0x7c, 0xf3, 0x10, 0x78, - 0x7a, 0x3b, 0x00, 0x78, 0x7d, 0x25, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x22, - 0x00, 0xc0, 0x7c, 0xfc, 0x10, 0x78, 0x78, 0x07, 0x00, 0x78, 0x7d, 0x25, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x35, 0x00, 0xc0, 0x7d, 0x05, 0x10, 0x78, - 0x78, 0x43, 0x00, 0x78, 0x7d, 0x25, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x39, - 0x00, 0xc0, 0x7d, 0x0e, 0x10, 0x78, 0x79, 0xcc, 0x00, 0x78, 0x7d, 0x25, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x3d, 0x00, 0xc0, 0x7d, 0x17, 0x10, 0x78, - 0x78, 0x23, 0x00, 0x78, 0x7d, 0x25, 0xa1, 0xb6, 0x00, 0x15, 0x00, 0xc0, - 0x7d, 0x1f, 0x10, 0x79, 0x7d, 0x2a, 0x00, 0x78, 0x7d, 0x25, 0xa1, 0xb6, - 0x00, 0x16, 0x00, 0xc0, 0x7d, 0x26, 0x10, 0x79, 0x7e, 0x7f, 0x00, 0x7c, - 0x10, 0x78, 0x77, 0x73, 0x00, 0x78, 0x7d, 0x25, 0x7d, 0x4e, 0x7d, 0x51, - 0x7d, 0x4e, 0x7d, 0x9c, 0x7d, 0x4e, 0x7e, 0x13, 0x7e, 0x8b, 0x7d, 0x4e, - 0x7d, 0x4e, 0x7e, 0x57, 0x7d, 0x4e, 0x7e, 0x6d, 0xa1, 0xb6, 0x00, 0x48, - 0x00, 0x40, 0x7d, 0x42, 0x20, 0xe1, 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, - 0x2c, 0x10, 0x10, 0x78, 0x15, 0xfa, 0x00, 0x7c, 0x0e, 0x7e, 0xac, 0xf0, - 0x00, 0x04, 0x2e, 0x74, 0x70, 0x00, 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, - 0x0e, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x70, 0x80, 0xa0, 0x86, - 0x00, 0x74, 0x00, 0xc0, 0x7d, 0x85, 0x10, 0x78, 0x9f, 0x6f, 0x00, 0xc0, - 0x7d, 0x77, 0x0d, 0x7e, 0x60, 0x18, 0x20, 0x68, 0x70, 0x30, 0xd0, 0x8c, - 0x00, 0x40, 0x7d, 0x6a, 0x68, 0x00, 0xd0, 0xbc, 0x00, 0x40, 0x7d, 0x6a, - 0xc0, 0xc5, 0x68, 0x02, 0x10, 0x78, 0x7d, 0x89, 0x0d, 0x7f, 0x20, 0x01, - 0x00, 0x06, 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, - 0x77, 0x2d, 0x00, 0x78, 0x7d, 0x87, 0x20, 0x01, 0x00, 0x0a, 0x10, 0x78, - 0x45, 0x02, 0x10, 0x78, 0x28, 0xa6, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x7d, 0x87, 0x10, 0x78, - 0x7d, 0xff, 0x0e, 0x7f, 0x00, 0x7c, 0x68, 0x00, 0xd0, 0x84, 0x00, 0x40, - 0x7d, 0x9b, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x20, 0x69, - 0xa7, 0x52, 0x68, 0x04, 0xd0, 0xa4, 0x00, 0x40, 0x7d, 0x9b, 0x20, 0x01, - 0x00, 0x06, 0x10, 0x78, 0x45, 0x35, 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0x11, - 0xa7, 0x20, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x74, 0x00, 0xc0, 0x7d, 0xfb, - 0x60, 0x18, 0x20, 0x68, 0x6a, 0xa0, 0xa2, 0x86, 0x00, 0x7e, 0x00, 0xc0, - 0x7d, 0xaf, 0x10, 0x78, 0x7f, 0x9b, 0x00, 0x78, 0x7d, 0xfd, 0x10, 0x78, - 0x7f, 0x91, 0x60, 0x18, 0x20, 0x68, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x14, - 0xa2, 0x86, 0x00, 0x80, 0x00, 0xc0, 0x7d, 0xd3, 0x68, 0x13, 0x00, 0xff, - 0x68, 0x17, 0xff, 0xfc, 0x60, 0x10, 0xa0, 0x05, 0x00, 0x40, 0x7d, 0xc9, - 0x20, 0x68, 0x68, 0x07, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, 0x68, 0x33, - 0x02, 0x00, 0x20, 0x01, 0x00, 0x06, 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, - 0x28, 0xa6, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x7d, 0xfd, 0x0e, 0x7e, - 0x20, 0x71, 0xa7, 0x33, 0x2e, 0x04, 0xd0, 0x9c, 0x00, 0x40, 0x7d, 0xee, - 0x20, 0x71, 0xac, 0x80, 0x71, 0x08, 0x72, 0x0c, 0xa1, 0x8c, 0x00, 0xff, - 0x00, 0xc0, 0x7d, 0xe6, 0xa2, 0x84, 0xff, 0x00, 0x00, 0x40, 0x7d, 0xee, - 0x60, 0x18, 0x20, 0x70, 0x70, 0xa0, 0xd0, 0xbc, 0x00, 0xc0, 0x7d, 0xee, - 0x71, 0x12, 0x72, 0x16, 0x0e, 0x7f, 0x20, 0x01, 0x00, 0x04, 0x10, 0x78, - 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x03, 0x10, 0x78, - 0x5d, 0xd7, 0x00, 0x78, 0x7d, 0xfd, 0x10, 0x78, 0x7d, 0xff, 0x0d, 0x7f, - 0x00, 0x7c, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x02, 0x20, 0x01, - 0xa7, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x7e, 0x0e, - 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x35, 0x10, 0x78, 0x28, 0xa6, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, - 0x70, 0x80, 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x7e, 0x51, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x7e, 0x26, 0x60, 0x10, 0xa0, 0x05, - 0x00, 0xc0, 0x7e, 0x26, 0x10, 0x78, 0x36, 0x99, 0x0d, 0x7e, 0x60, 0x18, - 0x20, 0x68, 0x10, 0x78, 0x46, 0x49, 0x10, 0x78, 0x7d, 0x89, 0x0d, 0x7f, - 0x10, 0x78, 0x80, 0x43, 0x00, 0xc0, 0x7e, 0x51, 0x0d, 0x7e, 0x60, 0x18, - 0x20, 0x68, 0x68, 0x90, 0x0d, 0x7f, 0xa0, 0x05, 0x00, 0x40, 0x7e, 0x51, - 0x20, 0x01, 0x00, 0x06, 0x10, 0x78, 0x45, 0x02, 0x0e, 0x7e, 0x60, 0x10, - 0xa0, 0x05, 0x00, 0x40, 0x7e, 0x4a, 0x20, 0x70, 0x70, 0x07, 0x00, 0x00, - 0x70, 0x37, 0x01, 0x03, 0x70, 0x33, 0x02, 0x00, 0x0e, 0x7f, 0x10, 0x78, - 0x28, 0xa6, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x7e, 0x55, 0x10, 0x78, - 0x7c, 0x83, 0x10, 0x78, 0x7d, 0xff, 0x0e, 0x7f, 0x00, 0x7c, 0x20, 0x11, - 0xa7, 0x20, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x7e, 0x6a, - 0x20, 0x01, 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x7e, 0x6c, - 0x10, 0x78, 0x7d, 0xff, 0x00, 0x7c, 0x20, 0x11, 0xa7, 0x20, 0x22, 0x04, - 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x7e, 0x7c, 0x20, 0x01, 0x00, 0x07, - 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x7e, 0x7e, - 0x10, 0x78, 0x7d, 0xff, 0x00, 0x7c, 0x7d, 0x4e, 0x7e, 0x97, 0x7d, 0x4e, - 0x7e, 0xd2, 0x7d, 0x4e, 0x7f, 0x44, 0x7e, 0x8b, 0x7d, 0x4e, 0x7d, 0x4e, - 0x7f, 0x59, 0x7d, 0x4e, 0x7f, 0x6c, 0x66, 0x04, 0xa6, 0x86, 0x00, 0x03, - 0x00, 0x40, 0x7e, 0x13, 0xa6, 0xb6, 0x00, 0x1e, 0x00, 0xc0, 0x7e, 0x96, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x0d, 0x7e, 0x0c, 0x7e, 0x10, 0x78, - 0x7f, 0x7f, 0x00, 0xc0, 0x7e, 0xad, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, - 0x44, 0xee, 0x20, 0x01, 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, - 0x7e, 0xcf, 0x20, 0x09, 0xac, 0x8e, 0x21, 0x04, 0xa0, 0x86, 0x00, 0x09, - 0x00, 0xc0, 0x7e, 0xc2, 0x60, 0x18, 0x20, 0x68, 0x68, 0x40, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x05, 0x00, 0x40, 0x7e, 0xcd, 0x80, 0x01, 0x68, 0x42, - 0x60, 0x17, 0x00, 0x0a, 0x00, 0x78, 0x7e, 0xcf, 0x20, 0x09, 0xac, 0x8f, - 0x21, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x19, 0x00, 0x00, 0xc0, - 0x7e, 0xcd, 0x00, 0x78, 0x7e, 0xa1, 0x10, 0x78, 0x7d, 0xff, 0x0c, 0x7f, - 0x0d, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x7f, 0x8e, 0x00, 0xc0, 0x7e, 0xe6, - 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x20, 0x01, 0x00, 0x02, - 0x10, 0x78, 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, - 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x7f, 0x12, 0x10, 0x78, 0x7c, 0x83, - 0x20, 0x09, 0xac, 0x8e, 0x21, 0x34, 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x86, - 0x00, 0x05, 0x00, 0x40, 0x7f, 0x13, 0xa6, 0x86, 0x00, 0x0b, 0x00, 0x40, - 0x7f, 0x10, 0x20, 0x09, 0xac, 0x8f, 0x21, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0x00, 0xc0, 0x7f, 0x00, 0xa6, 0x86, 0x00, 0x09, 0x00, 0x40, 0x7f, 0x13, - 0xa0, 0x86, 0x19, 0x00, 0x00, 0xc0, 0x7f, 0x10, 0xa6, 0x86, 0x00, 0x09, - 0x00, 0x40, 0x7f, 0x13, 0x20, 0x01, 0x00, 0x04, 0x10, 0x78, 0x45, 0x02, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x7f, 0x12, 0x10, 0x78, 0x7d, 0xff, - 0x00, 0x7c, 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x7f, 0x21, 0x68, 0x38, 0xd0, 0xfc, 0x00, 0x40, 0x7f, 0x21, - 0x0d, 0x7f, 0x00, 0x78, 0x7f, 0x10, 0x60, 0x18, 0x20, 0x68, 0x68, 0x40, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x40, 0x7f, 0x32, 0x80, 0x01, - 0x68, 0x42, 0x60, 0x17, 0x00, 0x0a, 0x60, 0x07, 0x00, 0x16, 0x0d, 0x7f, - 0x00, 0x78, 0x7f, 0x12, 0x68, 0xa0, 0xa0, 0x86, 0x00, 0x7e, 0x00, 0xc0, - 0x7f, 0x3f, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x10, 0x78, 0x42, 0xb8, - 0x0e, 0x7f, 0x00, 0x78, 0x7f, 0x41, 0x10, 0x78, 0x28, 0x80, 0x0d, 0x7f, - 0x00, 0x78, 0x7f, 0x10, 0x10, 0x78, 0x7f, 0x8e, 0x00, 0xc0, 0x7f, 0x54, - 0x20, 0x01, 0x00, 0x04, 0x10, 0x78, 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x03, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x7f, 0x58, - 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x7d, 0xff, 0x00, 0x7c, 0x10, 0x78, - 0x7f, 0x8e, 0x00, 0xc0, 0x7f, 0x69, 0x20, 0x01, 0x00, 0x08, 0x10, 0x78, - 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x05, 0x10, 0x78, - 0x5d, 0xd7, 0x00, 0x78, 0x7f, 0x6b, 0x10, 0x78, 0x7d, 0xff, 0x00, 0x7c, - 0x10, 0x78, 0x7f, 0x8e, 0x00, 0xc0, 0x7f, 0x7c, 0x20, 0x01, 0x00, 0x0a, - 0x10, 0x78, 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, - 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x7f, 0x7e, 0x10, 0x78, 0x7d, 0xff, - 0x00, 0x7c, 0x20, 0x09, 0xac, 0x8e, 0x21, 0x04, 0xa0, 0x86, 0x00, 0x03, - 0x00, 0xc0, 0x7f, 0x8d, 0x20, 0x09, 0xac, 0x8f, 0x21, 0x04, 0xa0, 0x84, - 0xff, 0x00, 0xa0, 0x86, 0x2a, 0x00, 0x00, 0x7c, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x7c, 0x0c, 0x7e, 0x01, 0x7e, 0xac, 0x88, 0x00, 0x06, 0x21, 0x64, - 0x10, 0x78, 0x45, 0xd6, 0x01, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, - 0x0e, 0x7e, 0x0d, 0x7e, 0x03, 0x7e, 0x01, 0x7e, 0x60, 0x18, 0x20, 0x68, - 0x20, 0x71, 0xa7, 0x33, 0x2e, 0x04, 0xa0, 0x85, 0x00, 0x03, 0x20, 0x72, - 0x10, 0x78, 0x80, 0x14, 0x00, 0x40, 0x7f, 0xd9, 0x20, 0x09, 0xa7, 0x33, - 0x21, 0x04, 0xc0, 0xcd, 0x20, 0x0a, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, - 0xd0, 0xa4, 0x00, 0x40, 0x7f, 0xc2, 0xa0, 0x06, 0x20, 0x20, 0x20, 0x09, - 0x00, 0x2a, 0x10, 0x78, 0xa2, 0x2d, 0x20, 0x01, 0xa7, 0x0c, 0x20, 0x0c, - 0xc1, 0x95, 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, 0x20, 0x09, 0x00, 0x01, - 0x10, 0x78, 0x28, 0x4f, 0x20, 0x71, 0xa7, 0x00, 0x10, 0x78, 0x26, 0x77, - 0x0c, 0x7e, 0x15, 0x7e, 0x20, 0xa9, 0x00, 0x81, 0x20, 0x09, 0x00, 0x7f, - 0x10, 0x78, 0x29, 0x8e, 0x81, 0x08, 0x00, 0xf0, 0x7f, 0xd2, 0x15, 0x7f, - 0x0c, 0x7f, 0x10, 0x78, 0x7f, 0x91, 0x68, 0x13, 0x00, 0xff, 0x68, 0x17, - 0xff, 0xfe, 0x20, 0x71, 0xac, 0x80, 0x20, 0x79, 0x01, 0x00, 0x2e, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x20, 0x69, 0xa7, 0x1b, 0x20, 0x6a, 0x78, 0xe6, - 0x00, 0x7e, 0x8e, 0x70, 0x2e, 0x04, 0x20, 0x69, 0xa7, 0x1c, 0x20, 0x6a, - 0x78, 0xea, 0xa0, 0x84, 0xff, 0x00, 0x01, 0x7f, 0xa1, 0x05, 0x20, 0x09, - 0xa7, 0x26, 0x20, 0x0a, 0x20, 0x69, 0xac, 0x8e, 0x20, 0x71, 0xa9, 0x9e, - 0x68, 0x10, 0x20, 0x72, 0x68, 0x14, 0x70, 0x06, 0x68, 0x18, 0x70, 0x0a, - 0x68, 0x1c, 0x70, 0x0e, 0x10, 0x78, 0x90, 0x7e, 0x20, 0x01, 0x00, 0x06, - 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, 0x77, 0x2d, - 0x01, 0x7f, 0x03, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, - 0x02, 0x7e, 0x03, 0x7e, 0x0e, 0x7e, 0x15, 0x7e, 0x20, 0x19, 0xa7, 0x26, - 0x23, 0x1c, 0x83, 0xff, 0x00, 0x40, 0x80, 0x3e, 0x20, 0x71, 0xac, 0x80, - 0x2e, 0x14, 0xa2, 0x94, 0x00, 0xff, 0x70, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0xa2, 0x05, 0xa3, 0x06, 0x00, 0xc0, 0x80, 0x3e, 0x20, 0x11, 0xac, 0x96, - 0xad, 0x98, 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, - 0x00, 0xc0, 0x80, 0x3e, 0x20, 0x11, 0xac, 0x9a, 0xad, 0x98, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, 0x00, 0xc0, 0x80, 0x3e, - 0x15, 0x7f, 0x0e, 0x7f, 0x03, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x20, 0x71, 0xac, 0x8c, 0x70, 0x04, 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, - 0x80, 0x66, 0x70, 0x08, 0xa0, 0x86, 0x08, 0x00, 0x00, 0xc0, 0x80, 0x66, - 0x70, 0x0c, 0xd0, 0xec, 0x00, 0x40, 0x80, 0x64, 0xa0, 0x84, 0x0f, 0x00, - 0xa0, 0x86, 0x01, 0x00, 0x00, 0xc0, 0x80, 0x64, 0x70, 0x24, 0xd0, 0xa4, - 0x00, 0xc0, 0x80, 0x61, 0xd0, 0xac, 0x00, 0x40, 0x80, 0x64, 0xa0, 0x06, - 0x00, 0x78, 0x80, 0x66, 0xa0, 0x85, 0x00, 0x01, 0x0e, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x07, 0x7e, 0x05, 0x7e, 0x04, 0x7e, - 0x02, 0x7e, 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, - 0xa9, 0xba, 0x25, 0x2c, 0x20, 0x21, 0xa9, 0xc0, 0x24, 0x24, 0x20, 0x61, - 0xae, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x72, 0x48, 0x70, 0x64, 0xa2, 0x02, - 0x00, 0xc8, 0x80, 0xcc, 0x10, 0x78, 0xa2, 0x52, 0x00, 0x40, 0x80, 0xc4, - 0x67, 0x1c, 0xa7, 0x86, 0x00, 0x01, 0x00, 0x40, 0x80, 0xc4, 0xa7, 0x86, - 0x00, 0x07, 0x00, 0x40, 0x80, 0xc4, 0x25, 0x00, 0xac, 0x06, 0x00, 0x40, - 0x80, 0xc4, 0x24, 0x00, 0xac, 0x06, 0x00, 0x40, 0x80, 0xc4, 0x0c, 0x7e, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x80, 0x9f, 0x10, 0x78, - 0x17, 0x57, 0xa7, 0x86, 0x00, 0x08, 0x00, 0xc0, 0x80, 0xae, 0x10, 0x78, - 0x8f, 0x10, 0x00, 0xc0, 0x80, 0xae, 0x0c, 0x7f, 0x10, 0x78, 0x7c, 0x83, - 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x78, 0x80, 0xc4, 0x60, 0x10, 0x20, 0x68, - 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x80, 0xc1, 0xa7, 0x86, 0x00, 0x03, - 0x00, 0xc0, 0x80, 0xd6, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, 0x10, 0x78, - 0x8e, 0xd6, 0x0c, 0x7f, 0xac, 0xe0, 0x00, 0x10, 0x70, 0x58, 0xac, 0x02, - 0x00, 0xc8, 0x80, 0xcc, 0x00, 0x78, 0x80, 0x7d, 0x12, 0x7f, 0x00, 0x7f, - 0x02, 0x7f, 0x04, 0x7f, 0x05, 0x7f, 0x07, 0x7f, 0x0c, 0x7f, 0x0d, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0xa7, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x80, 0xb8, - 0x10, 0x78, 0xa1, 0xda, 0x00, 0x78, 0x80, 0xc1, 0x22, 0x0c, 0x23, 0x04, - 0xa1, 0x06, 0x00, 0xc0, 0x80, 0xe9, 0x82, 0x10, 0x83, 0x18, 0x00, 0xf0, - 0x80, 0xde, 0xa0, 0x06, 0x00, 0x7c, 0x23, 0x04, 0xa1, 0x02, 0x00, 0x48, - 0x80, 0xf1, 0x20, 0x01, 0x00, 0x01, 0x00, 0x78, 0x80, 0xf3, 0x20, 0x01, - 0x00, 0x00, 0xa1, 0x8d, 0x00, 0x01, 0x00, 0x7c, 0x60, 0x04, 0xa0, 0x8a, - 0x00, 0x44, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0x40, - 0x81, 0x05, 0x10, 0x78, 0x8f, 0x10, 0x00, 0x40, 0x81, 0x12, 0x00, 0x78, - 0x81, 0x0b, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, 0x8f, 0x10, 0x00, 0x40, - 0x81, 0x12, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x78, 0x81, 0x0b, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, 0x81, 0x1a, 0x81, 0x2d, 0x81, 0x2d, - 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, - 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2f, 0x81, 0x2f, 0x81, 0x2f, - 0x81, 0x2f, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2d, 0x81, 0x2f, 0x10, 0x78, - 0x13, 0x32, 0x60, 0x0b, 0xff, 0xff, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x10, 0x78, 0x5d, 0x8a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, - 0x81, 0x46, 0x60, 0x04, 0xa0, 0x82, 0x00, 0x40, 0x00, 0x79, 0x81, 0xd1, - 0xa1, 0x86, 0x00, 0x27, 0x00, 0xc0, 0x81, 0x68, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x28, 0x80, 0x0d, 0x7e, 0x61, 0x10, 0x21, 0x68, 0x10, 0x78, - 0x8d, 0x16, 0x00, 0x40, 0x81, 0x62, 0x68, 0x37, 0x01, 0x03, 0x68, 0x4b, - 0x00, 0x29, 0x68, 0x47, 0x00, 0x00, 0x69, 0x4c, 0xc1, 0xc5, 0x69, 0x4e, - 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, 0x0d, 0x7f, 0x10, 0x78, - 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x14, - 0x00, 0xc0, 0x81, 0x71, 0x60, 0x04, 0xa0, 0x82, 0x00, 0x40, 0x00, 0x79, - 0x81, 0x99, 0xa1, 0x86, 0x00, 0x46, 0x00, 0x40, 0x81, 0x7d, 0xa1, 0x86, - 0x00, 0x45, 0x00, 0x40, 0x81, 0x7d, 0xa1, 0x86, 0x00, 0x47, 0x10, 0xc0, - 0x13, 0x32, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x84, 0x00, 0x40, - 0x81, 0x96, 0x12, 0x7e, 0x20, 0x91, 0x22, 0x00, 0x00, 0x7e, 0x01, 0x7e, - 0x02, 0x7e, 0x10, 0x78, 0x5c, 0x56, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7f, - 0x12, 0x7f, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x81, 0x96, - 0x00, 0x78, 0x82, 0x0e, 0x10, 0x78, 0x77, 0x73, 0x00, 0x7c, 0x81, 0xae, - 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, - 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, 0x81, 0xac, 0x81, 0xca, 0x81, 0xca, - 0x81, 0xca, 0x81, 0xca, 0x81, 0xac, 0x81, 0xca, 0x81, 0xac, 0x81, 0xca, - 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, 0x0d, 0x7e, 0x61, 0x10, - 0x21, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x81, 0xc4, 0x68, 0x37, - 0x01, 0x03, 0x68, 0x4b, 0x00, 0x06, 0x68, 0x47, 0x00, 0x00, 0x68, 0x50, - 0xc0, 0xec, 0x68, 0x52, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, - 0x0d, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, - 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x7c, 0x81, 0xe6, 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, - 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, 0x81, 0xe4, - 0x81, 0xf8, 0x81, 0xf8, 0x81, 0xf8, 0x81, 0xf8, 0x81, 0xe4, 0x82, 0x07, - 0x81, 0xe4, 0x81, 0xf8, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, - 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, 0x00, 0x02, - 0x10, 0x78, 0x62, 0xd1, 0x60, 0x10, 0xa0, 0x88, 0x00, 0x13, 0x21, 0x04, - 0xa0, 0x85, 0x04, 0x00, 0x20, 0x0a, 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, - 0x20, 0x01, 0xa9, 0xa2, 0x20, 0x04, 0x60, 0x16, 0x20, 0x01, 0xa9, 0xa4, - 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, 0x00, 0x0f, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, 0x82, 0x12, - 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x27, - 0x83, 0x31, 0x83, 0x63, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, - 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, 0x82, 0x25, - 0x82, 0x25, 0x10, 0x78, 0x13, 0x32, 0x0e, 0x7e, 0x0d, 0x7e, 0x60, 0x3f, - 0x00, 0x00, 0x20, 0x71, 0xac, 0x80, 0x71, 0x24, 0x61, 0x0a, 0x20, 0x71, - 0xac, 0x8c, 0x61, 0x10, 0x21, 0x68, 0x76, 0x14, 0xa6, 0xb4, 0x0f, 0xff, - 0x86, 0xff, 0x00, 0x40, 0x82, 0xf0, 0xa6, 0x8c, 0x0c, 0x00, 0x00, 0x40, - 0x82, 0x65, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, - 0x00, 0x40, 0x82, 0x61, 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x82, 0x61, - 0x60, 0x24, 0xd0, 0xdc, 0x00, 0xc0, 0x82, 0x61, 0x68, 0x50, 0xd0, 0xbc, - 0x00, 0xc0, 0x82, 0x61, 0x73, 0x18, 0x68, 0x14, 0xa3, 0x06, 0x00, 0xc0, - 0x83, 0x08, 0x73, 0x1c, 0x68, 0x10, 0xa3, 0x1e, 0x00, 0x40, 0x82, 0x61, - 0xd6, 0xd4, 0x00, 0x40, 0x83, 0x08, 0x6b, 0x14, 0xa3, 0x05, 0x00, 0xc0, - 0x83, 0x08, 0x73, 0x18, 0x6b, 0x62, 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, - 0x00, 0xff, 0xa1, 0x86, 0x00, 0x02, 0x00, 0x40, 0x82, 0x98, 0xa1, 0x86, - 0x00, 0x28, 0x00, 0xc0, 0x82, 0x75, 0x10, 0x78, 0x8e, 0xea, 0x68, 0x4b, - 0x00, 0x1c, 0x00, 0x78, 0x82, 0x9a, 0xd6, 0xdc, 0x00, 0x40, 0x82, 0x91, - 0x68, 0x4b, 0x00, 0x15, 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x82, 0x8f, - 0x69, 0x14, 0x6a, 0x10, 0x21, 0x00, 0xa2, 0x05, 0x00, 0x40, 0x82, 0x8f, - 0x70, 0x18, 0xa1, 0x06, 0x00, 0xc0, 0x82, 0x8c, 0x70, 0x1c, 0xa2, 0x06, - 0x00, 0x40, 0x82, 0x8f, 0x69, 0x62, 0x6a, 0x5e, 0xc6, 0xdc, 0x00, 0x78, - 0x82, 0x9a, 0xd6, 0xd4, 0x00, 0x40, 0x82, 0x98, 0x68, 0x4b, 0x00, 0x07, - 0x00, 0x78, 0x82, 0x9a, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, - 0x6e, 0x46, 0xa0, 0x1e, 0xd6, 0xc4, 0x00, 0x40, 0x82, 0xc3, 0xa6, 0x86, - 0x01, 0x00, 0x00, 0xc0, 0x82, 0xae, 0x20, 0x01, 0xac, 0x99, 0x20, 0x04, - 0xa0, 0x05, 0x00, 0xc0, 0x82, 0xae, 0xc6, 0xc4, 0x00, 0x78, 0x82, 0x36, - 0x73, 0x28, 0x73, 0x2c, 0x6b, 0x56, 0x83, 0xff, 0x00, 0x40, 0x82, 0xc3, - 0xa3, 0x8a, 0x00, 0x09, 0x00, 0x48, 0x82, 0xba, 0x20, 0x19, 0x00, 0x08, - 0x03, 0x7e, 0x23, 0x08, 0x20, 0x19, 0xac, 0x98, 0xad, 0x90, 0x00, 0x19, - 0x10, 0x78, 0x89, 0xf2, 0x03, 0x7f, 0xd6, 0xcc, 0x00, 0x40, 0x83, 0x1e, - 0x71, 0x24, 0x69, 0x5a, 0x81, 0xff, 0x00, 0x40, 0x83, 0x1e, 0xa1, 0x92, - 0x00, 0x21, 0x00, 0xc8, 0x82, 0xdc, 0x20, 0x71, 0xac, 0x98, 0x83, 0x1c, - 0x23, 0x00, 0xae, 0x18, 0xad, 0x90, 0x00, 0x1d, 0x10, 0x78, 0x89, 0xf2, - 0x10, 0x78, 0x92, 0x04, 0x00, 0x78, 0x83, 0x1e, 0x68, 0x38, 0xd0, 0xfc, - 0x00, 0x40, 0x82, 0xe5, 0x20, 0x09, 0x00, 0x20, 0x69, 0x5a, 0x00, 0x78, - 0x82, 0xcf, 0x0f, 0x7e, 0x2d, 0x78, 0x10, 0x78, 0x89, 0x8a, 0x0f, 0x7f, - 0x10, 0x78, 0x92, 0x04, 0x10, 0x78, 0x89, 0xdf, 0x00, 0x78, 0x83, 0x20, - 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, - 0x83, 0x0e, 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x83, 0x0e, 0x60, 0x24, - 0xd0, 0xdc, 0x00, 0xc0, 0x83, 0x0e, 0x68, 0x50, 0xd0, 0xbc, 0x00, 0xc0, - 0x83, 0x0e, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x05, 0x00, 0x40, 0x83, 0x0e, - 0x10, 0x78, 0x8f, 0xcf, 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x78, 0x83, 0x30, - 0x68, 0x4b, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, 0x6e, 0x46, 0x68, 0x4c, - 0xd0, 0xac, 0x00, 0x40, 0x83, 0x1e, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, - 0x00, 0x40, 0x83, 0x1e, 0x10, 0x78, 0x84, 0xe2, 0x10, 0x78, 0x4a, 0x73, - 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, 0x00, 0x40, 0x83, 0x28, - 0x82, 0x11, 0x6a, 0x3e, 0x10, 0x78, 0x8f, 0x99, 0x0d, 0x7f, 0x0e, 0x7f, - 0x00, 0xc0, 0x83, 0x30, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x0f, 0x7e, - 0x60, 0x03, 0x00, 0x03, 0x20, 0x79, 0xac, 0x8c, 0x7c, 0x04, 0x7b, 0x00, - 0x7e, 0x0c, 0x7d, 0x08, 0x60, 0x10, 0x20, 0x78, 0x78, 0x4c, 0xd0, 0xac, - 0x00, 0x40, 0x83, 0x48, 0x60, 0x03, 0x00, 0x02, 0x0f, 0x7f, 0x00, 0x7c, - 0x21, 0x30, 0x22, 0x28, 0x00, 0x78, 0x83, 0x54, 0x24, 0x00, 0x79, 0x7c, - 0xa1, 0x0a, 0x23, 0x00, 0x7a, 0x80, 0xa2, 0x13, 0x26, 0x00, 0xa1, 0x02, - 0x25, 0x00, 0xa2, 0x03, 0x00, 0x48, 0x83, 0x44, 0x7c, 0x12, 0x7b, 0x16, - 0x7e, 0x0a, 0x7d, 0x0e, 0x0f, 0x7f, 0x60, 0x3f, 0x00, 0x00, 0x2c, 0x10, - 0x10, 0x78, 0x1c, 0xf0, 0x10, 0x78, 0x5d, 0xf6, 0x10, 0x78, 0x63, 0x9b, - 0x00, 0x7c, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, - 0x00, 0x04, 0x61, 0x10, 0x20, 0xe1, 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, - 0x2c, 0x10, 0x10, 0x78, 0x15, 0xfa, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x40, - 0x00, 0x79, 0x83, 0x76, 0x83, 0x89, 0x83, 0x89, 0x83, 0x89, 0x83, 0x89, - 0x83, 0x89, 0x83, 0x8b, 0x84, 0x31, 0x83, 0x89, 0x83, 0x89, 0x84, 0x47, - 0x84, 0xb8, 0x83, 0x89, 0x83, 0x89, 0x83, 0x89, 0x83, 0x89, 0x84, 0xc7, - 0x83, 0x89, 0x83, 0x89, 0x83, 0x89, 0x10, 0x78, 0x13, 0x32, 0x07, 0x7e, - 0x0f, 0x7e, 0x0e, 0x7e, 0x0d, 0x7e, 0x20, 0x71, 0xac, 0x8c, 0x61, 0x10, - 0x21, 0x78, 0x76, 0x14, 0xa6, 0xb4, 0x0f, 0xff, 0x7e, 0x46, 0x7f, 0x4c, - 0xc7, 0xe5, 0x7f, 0x4e, 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, - 0x00, 0x40, 0x83, 0xa2, 0x82, 0x11, 0x6a, 0x3e, 0x86, 0xff, 0x00, 0x40, - 0x84, 0x2c, 0xa6, 0x94, 0xff, 0x00, 0xa2, 0x84, 0x0c, 0x00, 0x00, 0x40, - 0x83, 0xaf, 0x70, 0x18, 0x78, 0x62, 0x70, 0x1c, 0x78, 0x5e, 0xa2, 0x84, - 0x03, 0x00, 0x00, 0x40, 0x84, 0x2c, 0x10, 0x78, 0x13, 0x8b, 0x10, 0x40, - 0x13, 0x32, 0x2d, 0x00, 0x78, 0x4a, 0x7f, 0x4c, 0xc7, 0xcd, 0x7f, 0x4e, - 0x68, 0x37, 0x01, 0x03, 0x78, 0x38, 0x68, 0x3a, 0x78, 0x3c, 0x68, 0x3e, - 0x78, 0x40, 0x68, 0x42, 0x6e, 0x46, 0xa6, 0x8c, 0x0c, 0x00, 0x00, 0x40, - 0x83, 0xcd, 0x73, 0x18, 0x6b, 0x62, 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, - 0x00, 0xff, 0xa1, 0x86, 0x00, 0x02, 0x00, 0x40, 0x83, 0xe9, 0xa1, 0x86, - 0x00, 0x28, 0x00, 0xc0, 0x83, 0xdb, 0x68, 0x4b, 0x00, 0x1c, 0x00, 0x78, - 0x83, 0xeb, 0xd6, 0xdc, 0x00, 0x40, 0x83, 0xe2, 0x68, 0x4b, 0x00, 0x15, - 0x00, 0x78, 0x83, 0xeb, 0xd6, 0xd4, 0x00, 0x40, 0x83, 0xe9, 0x68, 0x4b, - 0x00, 0x07, 0x00, 0x78, 0x83, 0xeb, 0x68, 0x4b, 0x00, 0x00, 0x6f, 0x4e, - 0x78, 0x50, 0x68, 0x52, 0x78, 0x54, 0x68, 0x56, 0xa0, 0x1e, 0xd6, 0xc4, - 0x00, 0x40, 0x84, 0x09, 0x73, 0x28, 0x73, 0x2c, 0x6b, 0x56, 0x83, 0xff, - 0x00, 0x40, 0x84, 0x09, 0xa3, 0x8a, 0x00, 0x09, 0x00, 0x48, 0x84, 0x00, - 0x20, 0x19, 0x00, 0x08, 0x03, 0x7e, 0x23, 0x08, 0x20, 0x19, 0xac, 0x98, - 0xad, 0x90, 0x00, 0x19, 0x10, 0x78, 0x89, 0xf2, 0x03, 0x7f, 0xd6, 0xcc, - 0x00, 0x40, 0x84, 0x2c, 0x71, 0x24, 0x69, 0x5a, 0x81, 0xff, 0x00, 0x40, - 0x84, 0x2c, 0xa1, 0x92, 0x00, 0x21, 0x00, 0xc8, 0x84, 0x20, 0x20, 0x71, - 0xac, 0x98, 0x83, 0x1c, 0x23, 0x00, 0xae, 0x18, 0xad, 0x90, 0x00, 0x1d, - 0x10, 0x78, 0x89, 0xf2, 0x00, 0x78, 0x84, 0x2c, 0x78, 0x38, 0xd0, 0xfc, - 0x00, 0x40, 0x84, 0x29, 0x20, 0x09, 0x00, 0x20, 0x69, 0x5a, 0x00, 0x78, - 0x84, 0x15, 0x2d, 0x78, 0x10, 0x78, 0x89, 0x8a, 0x0d, 0x7f, 0x0e, 0x7f, - 0x0f, 0x7f, 0x07, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x60, 0x03, 0x00, 0x03, - 0x20, 0x79, 0xac, 0x8c, 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, 0x7d, 0x08, - 0x60, 0x10, 0x20, 0x78, 0x7c, 0x12, 0x7b, 0x16, 0x7e, 0x0a, 0x7d, 0x0e, - 0x0f, 0x7f, 0x2c, 0x10, 0x10, 0x78, 0x1c, 0xf0, 0x10, 0x78, 0x6d, 0xf4, - 0x00, 0x7c, 0x0d, 0x7e, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, - 0x0f, 0x7f, 0x00, 0x40, 0x84, 0x53, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, - 0x60, 0x3e, 0x60, 0x03, 0x00, 0x02, 0x10, 0x78, 0x62, 0x7a, 0x10, 0x78, - 0x63, 0x9b, 0x61, 0x10, 0x21, 0x68, 0x69, 0x4c, 0xd1, 0xe4, 0x00, 0x40, - 0x84, 0xb6, 0xd1, 0xcc, 0x00, 0x40, 0x84, 0x8d, 0x69, 0x48, 0x68, 0x38, - 0xd0, 0xfc, 0x00, 0x40, 0x84, 0x85, 0x01, 0x7e, 0x68, 0x4c, 0x00, 0x7e, - 0x68, 0x50, 0x00, 0x7e, 0xad, 0x90, 0x00, 0x0d, 0xa1, 0x98, 0x00, 0x0d, - 0x20, 0x09, 0x00, 0x20, 0x15, 0x7e, 0x21, 0xa8, 0x23, 0x04, 0x20, 0x12, - 0x83, 0x18, 0x82, 0x10, 0x00, 0xf0, 0x84, 0x74, 0x15, 0x7f, 0x00, 0x7f, - 0x68, 0x52, 0x00, 0x7f, 0x68, 0x4e, 0x01, 0x7f, 0x21, 0x68, 0x10, 0x78, - 0x13, 0xb4, 0x00, 0x78, 0x84, 0xb0, 0x01, 0x7e, 0x10, 0x78, 0x13, 0xb4, - 0x0d, 0x7f, 0x10, 0x78, 0x89, 0xdf, 0x00, 0x78, 0x84, 0xb0, 0x68, 0x37, - 0x01, 0x03, 0x69, 0x44, 0xa1, 0x84, 0x00, 0xff, 0xa0, 0xb6, 0x00, 0x02, - 0x00, 0x40, 0x84, 0xac, 0xa0, 0x86, 0x00, 0x28, 0x00, 0xc0, 0x84, 0x9e, - 0x68, 0x4b, 0x00, 0x1c, 0x00, 0x78, 0x84, 0xae, 0xd1, 0xdc, 0x00, 0x40, - 0x84, 0xa5, 0x68, 0x4b, 0x00, 0x15, 0x00, 0x78, 0x84, 0xae, 0xd1, 0xd4, - 0x00, 0x40, 0x84, 0xac, 0x68, 0x4b, 0x00, 0x07, 0x00, 0x78, 0x84, 0xae, - 0x68, 0x4b, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8f, 0x99, - 0x00, 0xc0, 0x84, 0xb6, 0x10, 0x78, 0x77, 0x2d, 0x0d, 0x7f, 0x00, 0x7c, - 0x20, 0x19, 0x00, 0x01, 0x10, 0x78, 0x70, 0x58, 0x60, 0x03, 0x00, 0x02, - 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x60, 0x3e, 0x10, 0x78, 0x62, 0x7a, - 0x10, 0x78, 0x63, 0x9b, 0x00, 0x7c, 0x10, 0x78, 0x62, 0x7a, 0x10, 0x78, - 0x28, 0x80, 0x0d, 0x7e, 0x61, 0x10, 0x21, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x84, 0xdc, 0x68, 0x37, 0x01, 0x03, 0x68, 0x4b, 0x00, 0x29, - 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, 0x8e, 0xc9, - 0x0d, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x63, 0x9b, 0x00, 0x7c, - 0x68, 0x4b, 0x00, 0x15, 0xd1, 0xfc, 0x00, 0x40, 0x84, 0xee, 0x68, 0x4b, - 0x00, 0x07, 0x80, 0x02, 0x80, 0x00, 0x81, 0x0a, 0xa1, 0x89, 0x00, 0x00, - 0x69, 0x62, 0x68, 0x5e, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, - 0x84, 0xf5, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, - 0x85, 0x0a, 0x85, 0x08, 0x85, 0xe0, 0x85, 0xec, 0x85, 0x08, 0x85, 0x08, - 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, 0x85, 0x08, - 0x85, 0x08, 0x85, 0x08, 0x10, 0x78, 0x13, 0x32, 0x07, 0x7e, 0x0f, 0x7e, - 0x0e, 0x7e, 0x0d, 0x7e, 0x20, 0x71, 0xac, 0x8c, 0x61, 0x10, 0x21, 0x78, - 0x76, 0x14, 0xa6, 0xb4, 0x0f, 0xff, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, - 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, 0x85, 0x28, 0xa6, 0x84, 0x00, 0xff, - 0x00, 0xc0, 0x85, 0x28, 0x60, 0x24, 0xd0, 0xf4, 0x00, 0x40, 0x85, 0x28, - 0x10, 0x78, 0x8f, 0xcf, 0x00, 0x78, 0x85, 0xdb, 0x7e, 0x46, 0x7f, 0x4c, - 0xc7, 0xe5, 0x7f, 0x4e, 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, - 0x00, 0x40, 0x85, 0x34, 0x82, 0x11, 0x6a, 0x3e, 0x86, 0xff, 0x00, 0x40, - 0x85, 0xd0, 0xa6, 0x94, 0xff, 0x00, 0xa2, 0x84, 0x0c, 0x00, 0x00, 0x40, - 0x85, 0x41, 0x70, 0x18, 0x78, 0x62, 0x70, 0x1c, 0x78, 0x5e, 0xa2, 0x84, - 0x03, 0x00, 0x00, 0x40, 0x85, 0xcd, 0xa6, 0x86, 0x01, 0x00, 0x00, 0xc0, - 0x85, 0x53, 0x20, 0x01, 0xac, 0x99, 0x20, 0x04, 0xa0, 0x05, 0x00, 0xc0, - 0x85, 0x53, 0xc6, 0xc4, 0x7e, 0x46, 0x00, 0x78, 0x85, 0x34, 0x10, 0x78, - 0x13, 0x8b, 0x10, 0x40, 0x13, 0x32, 0x2d, 0x00, 0x78, 0x4a, 0x7f, 0x4c, - 0xa7, 0xbd, 0x02, 0x00, 0x7f, 0x4e, 0x68, 0x37, 0x01, 0x03, 0x78, 0x38, - 0x68, 0x3a, 0x78, 0x3c, 0x68, 0x3e, 0x78, 0x40, 0x68, 0x42, 0x6e, 0x46, - 0xa6, 0x8c, 0x0c, 0x00, 0x00, 0x40, 0x85, 0x6e, 0x73, 0x18, 0x6b, 0x62, - 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x02, - 0x00, 0x40, 0x85, 0x8a, 0xa1, 0x86, 0x00, 0x28, 0x00, 0xc0, 0x85, 0x7c, - 0x68, 0x4b, 0x00, 0x1c, 0x00, 0x78, 0x85, 0x8c, 0xd6, 0xdc, 0x00, 0x40, - 0x85, 0x83, 0x68, 0x4b, 0x00, 0x15, 0x00, 0x78, 0x85, 0x8c, 0xd6, 0xd4, - 0x00, 0x40, 0x85, 0x8a, 0x68, 0x4b, 0x00, 0x07, 0x00, 0x78, 0x85, 0x8c, - 0x68, 0x4b, 0x00, 0x00, 0x6f, 0x4e, 0x78, 0x50, 0x68, 0x52, 0x78, 0x54, - 0x68, 0x56, 0xa0, 0x1e, 0xd6, 0xc4, 0x00, 0x40, 0x85, 0xaa, 0x73, 0x28, - 0x73, 0x2c, 0x6b, 0x56, 0x83, 0xff, 0x00, 0x40, 0x85, 0xaa, 0xa3, 0x8a, - 0x00, 0x09, 0x00, 0x48, 0x85, 0xa1, 0x20, 0x19, 0x00, 0x08, 0x03, 0x7e, - 0x23, 0x08, 0x20, 0x19, 0xac, 0x98, 0xad, 0x90, 0x00, 0x19, 0x10, 0x78, - 0x89, 0xf2, 0x03, 0x7f, 0xd6, 0xcc, 0x00, 0x40, 0x85, 0xcd, 0x71, 0x24, - 0x69, 0x5a, 0x81, 0xff, 0x00, 0x40, 0x85, 0xcd, 0xa1, 0x92, 0x00, 0x21, - 0x00, 0xc8, 0x85, 0xc1, 0x20, 0x71, 0xac, 0x98, 0x83, 0x1c, 0x23, 0x00, - 0xae, 0x18, 0xad, 0x90, 0x00, 0x1d, 0x10, 0x78, 0x89, 0xf2, 0x00, 0x78, - 0x85, 0xcd, 0x78, 0x38, 0xd0, 0xfc, 0x00, 0x40, 0x85, 0xca, 0x20, 0x09, - 0x00, 0x20, 0x69, 0x5a, 0x00, 0x78, 0x85, 0xb6, 0x2d, 0x78, 0x10, 0x78, - 0x89, 0x8a, 0xd6, 0xdc, 0x00, 0xc0, 0x85, 0xd3, 0xa0, 0x06, 0x00, 0x78, - 0x85, 0xd9, 0x20, 0x01, 0x00, 0x01, 0x20, 0x71, 0xac, 0x8c, 0x72, 0x18, - 0x73, 0x1c, 0x10, 0x78, 0x16, 0x53, 0x0d, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, - 0x07, 0x7f, 0x00, 0x7c, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x60, 0x3e, - 0x20, 0xe1, 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x10, 0x78, - 0x15, 0xfa, 0x00, 0x7c, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, 0x60, 0x3e, - 0x0d, 0x7e, 0x60, 0x03, 0x00, 0x02, 0x61, 0x10, 0x21, 0x68, 0x69, 0x4c, - 0xd1, 0xe4, 0x00, 0x40, 0x87, 0x1c, 0x60, 0x3f, 0x00, 0x00, 0x0f, 0x7e, - 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, 0x86, 0x32, - 0x68, 0x14, 0x69, 0x10, 0xa1, 0x15, 0x00, 0x40, 0x86, 0x32, 0x6a, 0x60, - 0xa2, 0x06, 0x00, 0xc0, 0x86, 0x0f, 0x68, 0x5c, 0xa1, 0x06, 0x00, 0x40, - 0x86, 0x32, 0x68, 0x4c, 0xc0, 0xe4, 0x68, 0x4e, 0x68, 0x47, 0x00, 0x00, - 0x68, 0x63, 0x00, 0x00, 0x68, 0x5f, 0x00, 0x00, 0x60, 0x24, 0xd0, 0xf4, - 0x00, 0xc0, 0x86, 0x27, 0x69, 0x7c, 0x68, 0x10, 0xa1, 0x02, 0x60, 0x3a, - 0x69, 0x80, 0x68, 0x14, 0xa1, 0x03, 0x60, 0x36, 0x60, 0x24, 0xc0, 0xf5, - 0x60, 0x26, 0x0d, 0x7e, 0x60, 0x18, 0x20, 0x68, 0x68, 0x3c, 0x80, 0x00, - 0x68, 0x3e, 0x0d, 0x7f, 0x10, 0x78, 0x8f, 0xcf, 0x00, 0x78, 0x87, 0x1c, - 0x69, 0x4c, 0xd1, 0xcc, 0x00, 0x40, 0x86, 0xe1, 0x69, 0x48, 0x68, 0x38, - 0xd0, 0xfc, 0x00, 0x40, 0x86, 0x99, 0x01, 0x7e, 0x68, 0x4c, 0x00, 0x7e, - 0x68, 0x50, 0x00, 0x7e, 0x0f, 0x7e, 0x21, 0x78, 0x79, 0x44, 0xa1, 0x84, - 0x00, 0xff, 0xa0, 0xb6, 0x00, 0x02, 0x00, 0x40, 0x86, 0x6c, 0xa0, 0x86, - 0x00, 0x28, 0x00, 0xc0, 0x86, 0x53, 0x68, 0x4b, 0x00, 0x1c, 0x78, 0x4b, - 0x00, 0x1c, 0x00, 0x78, 0x86, 0x77, 0xd1, 0xdc, 0x00, 0x40, 0x86, 0x63, - 0x68, 0x4b, 0x00, 0x15, 0x78, 0x4b, 0x00, 0x15, 0x10, 0x78, 0x91, 0x7c, - 0x00, 0x40, 0x86, 0x61, 0x79, 0x44, 0xc1, 0xdc, 0x79, 0x46, 0x00, 0x78, - 0x86, 0x77, 0xd1, 0xd4, 0x00, 0x40, 0x86, 0x6c, 0x68, 0x4b, 0x00, 0x07, - 0x78, 0x4b, 0x00, 0x07, 0x00, 0x78, 0x86, 0x77, 0x68, 0x4c, 0xd0, 0xac, - 0x00, 0x40, 0x86, 0x77, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, 0x00, 0x40, - 0x86, 0x77, 0x10, 0x78, 0x84, 0xe2, 0x68, 0x48, 0x78, 0x4a, 0x68, 0x60, - 0x78, 0x62, 0x68, 0x5c, 0x78, 0x5e, 0xad, 0x90, 0x00, 0x0d, 0xaf, 0x98, - 0x00, 0x0d, 0x20, 0x09, 0x00, 0x20, 0x15, 0x7e, 0x21, 0xa8, 0x23, 0x04, - 0x20, 0x12, 0x83, 0x18, 0x82, 0x10, 0x00, 0xf0, 0x86, 0x85, 0x15, 0x7f, - 0x0f, 0x7f, 0x00, 0x7f, 0x68, 0x52, 0x00, 0x7f, 0x68, 0x4e, 0x10, 0x78, - 0x92, 0x04, 0x01, 0x7f, 0x21, 0x68, 0x10, 0x78, 0x13, 0xb4, 0x00, 0x78, - 0x87, 0x16, 0x01, 0x7e, 0x0f, 0x7e, 0x21, 0x78, 0x79, 0x44, 0xa1, 0x84, - 0x00, 0xff, 0xa0, 0xb6, 0x00, 0x02, 0x00, 0x40, 0x86, 0xc6, 0xa0, 0x86, - 0x00, 0x28, 0x00, 0xc0, 0x86, 0xad, 0x68, 0x4b, 0x00, 0x1c, 0x78, 0x4b, - 0x00, 0x1c, 0x00, 0x78, 0x86, 0xd1, 0xd1, 0xdc, 0x00, 0x40, 0x86, 0xbd, - 0x68, 0x4b, 0x00, 0x15, 0x78, 0x4b, 0x00, 0x15, 0x10, 0x78, 0x91, 0x7c, - 0x00, 0x40, 0x86, 0xbb, 0x79, 0x44, 0xc1, 0xdc, 0x79, 0x46, 0x00, 0x78, - 0x86, 0xd1, 0xd1, 0xd4, 0x00, 0x40, 0x86, 0xc6, 0x68, 0x4b, 0x00, 0x07, - 0x78, 0x4b, 0x00, 0x07, 0x00, 0x78, 0x86, 0xd1, 0x68, 0x4c, 0xd0, 0xac, - 0x00, 0x40, 0x86, 0xd1, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, 0x00, 0x40, - 0x86, 0xd1, 0x10, 0x78, 0x84, 0xe2, 0x68, 0x60, 0x78, 0x62, 0x68, 0x5c, - 0x78, 0x5e, 0x68, 0x4c, 0x78, 0x4e, 0x0f, 0x7f, 0x10, 0x78, 0x13, 0xb4, - 0x0d, 0x7f, 0x10, 0x78, 0x92, 0x04, 0x10, 0x78, 0x89, 0xdf, 0x00, 0x78, - 0x87, 0x16, 0x68, 0x37, 0x01, 0x03, 0x69, 0x44, 0xa1, 0x84, 0x00, 0xff, - 0xa0, 0xb6, 0x00, 0x02, 0x00, 0x40, 0x87, 0x07, 0xa0, 0x86, 0x00, 0x28, - 0x00, 0xc0, 0x86, 0xf2, 0x68, 0x4b, 0x00, 0x1c, 0x00, 0x78, 0x87, 0x14, - 0xd1, 0xdc, 0x00, 0x40, 0x87, 0x00, 0x68, 0x4b, 0x00, 0x15, 0x10, 0x78, - 0x91, 0x7c, 0x00, 0x40, 0x86, 0xfe, 0x69, 0x44, 0xc1, 0xdc, 0x69, 0x46, - 0x00, 0x78, 0x87, 0x14, 0xd1, 0xd4, 0x00, 0x40, 0x87, 0x07, 0x68, 0x4b, - 0x00, 0x07, 0x00, 0x78, 0x87, 0x14, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x4c, - 0xd0, 0xac, 0x00, 0x40, 0x87, 0x14, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, - 0x00, 0x40, 0x87, 0x14, 0x10, 0x78, 0x84, 0xe2, 0x10, 0x78, 0x4a, 0x73, - 0x10, 0x78, 0x8f, 0x99, 0x00, 0xc0, 0x87, 0x1c, 0x10, 0x78, 0x77, 0x2d, - 0x0d, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, 0x00, 0x78, 0x87, 0x24, - 0x10, 0x78, 0x62, 0x7a, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x87, 0x43, - 0x0d, 0x7e, 0x61, 0x10, 0x21, 0x68, 0x68, 0x37, 0x01, 0x03, 0x20, 0x09, - 0xa7, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x00, 0xc0, 0x87, 0x4e, 0xd1, 0x84, - 0x00, 0xc0, 0x87, 0x4a, 0x61, 0x08, 0x69, 0x4a, 0xa1, 0x8e, 0x00, 0x29, - 0x00, 0xc0, 0x87, 0x3e, 0x10, 0x78, 0xa4, 0xf2, 0x68, 0x47, 0x00, 0x00, - 0x10, 0x78, 0x4a, 0x73, 0x0d, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, - 0x62, 0xd1, 0x10, 0x78, 0x63, 0x9b, 0x00, 0x7c, 0x68, 0x4b, 0x00, 0x04, - 0x00, 0x78, 0x87, 0x3e, 0x68, 0x4b, 0x00, 0x04, 0x00, 0x78, 0x87, 0x3e, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, 0x87, 0x56, 0x87, 0x69, 0x87, 0x69, - 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x6b, 0x87, 0x69, 0x87, 0x6e, - 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, - 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x87, 0x69, 0x10, 0x78, - 0x13, 0x32, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x00, 0x7e, 0x02, 0x7e, - 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, 0x02, 0x7f, 0x00, 0x7f, 0x00, 0x7c, - 0xa1, 0x82, 0x00, 0x85, 0x00, 0x79, 0x87, 0x7a, 0x87, 0x83, 0x87, 0x81, - 0x87, 0x81, 0x87, 0x8f, 0x87, 0x81, 0x87, 0x81, 0x87, 0x81, 0x10, 0x78, - 0x13, 0x32, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x10, 0x78, 0x5d, 0x8a, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, - 0x00, 0x7c, 0x02, 0x7e, 0x05, 0x7e, 0x0d, 0x7e, 0x0e, 0x7e, 0x20, 0x71, - 0xac, 0x80, 0x72, 0x24, 0x62, 0x12, 0x72, 0x20, 0x10, 0x78, 0x8d, 0x02, - 0x00, 0x40, 0x87, 0xb4, 0x22, 0x68, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x00, 0x40, 0x87, 0xb4, 0x60, 0x18, 0x6d, 0x18, 0xa5, 0x2e, 0x00, 0xc0, - 0x87, 0xb4, 0x0c, 0x7e, 0x2d, 0x60, 0x10, 0x78, 0x8a, 0x03, 0x0c, 0x7f, - 0x00, 0x40, 0x87, 0xb4, 0x68, 0x03, 0x00, 0x02, 0x60, 0x07, 0x00, 0x86, - 0x00, 0x78, 0x87, 0xb6, 0x60, 0x07, 0x00, 0x87, 0x60, 0x03, 0x00, 0x01, - 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0f, 0x7e, 0x22, 0x78, - 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, 0x87, 0xce, 0x68, 0x24, - 0xd0, 0xec, 0x00, 0x40, 0x87, 0xce, 0x0c, 0x7e, 0x22, 0x60, 0x60, 0x3f, - 0x00, 0x00, 0x10, 0x78, 0x8f, 0xcf, 0x0c, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, - 0x05, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, - 0x87, 0xe4, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x85, 0x10, 0x48, 0x13, 0x32, - 0xa0, 0x8a, 0x00, 0x8c, 0x10, 0xc8, 0x13, 0x32, 0xa0, 0x82, 0x00, 0x85, - 0x00, 0x79, 0x87, 0xf3, 0xa1, 0x86, 0x00, 0x27, 0x00, 0x40, 0x87, 0xec, - 0xa1, 0x86, 0x00, 0x14, 0x10, 0xc0, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x87, 0xfa, - 0x87, 0xfc, 0x87, 0xfc, 0x87, 0xfa, 0x87, 0xfa, 0x87, 0xfa, 0x87, 0xfa, - 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, - 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, - 0x88, 0x0d, 0x60, 0x04, 0xa0, 0x82, 0x00, 0x85, 0x20, 0x08, 0x00, 0x78, - 0x88, 0x48, 0xa1, 0x86, 0x00, 0x27, 0x00, 0xc0, 0x88, 0x30, 0x10, 0x78, - 0x61, 0xcd, 0x10, 0x78, 0x28, 0x80, 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, - 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x88, 0x26, 0x68, 0x37, 0x01, 0x03, - 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, 0x00, 0x29, 0x10, 0x78, 0x4a, 0x73, - 0x10, 0x78, 0x8e, 0xc9, 0x0d, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, 0x77, 0x73, 0x00, 0x78, 0x88, 0x2b, - 0xa1, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x88, 0x2c, 0x10, 0x78, 0x61, 0xcd, - 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x88, 0x26, 0x68, 0x37, 0x01, 0x03, 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, - 0x00, 0x06, 0x68, 0x50, 0xc0, 0xec, 0x68, 0x52, 0x00, 0x78, 0x88, 0x22, - 0x00, 0x79, 0x88, 0x4a, 0x88, 0x53, 0x88, 0x51, 0x88, 0x51, 0x88, 0x51, - 0x88, 0x51, 0x88, 0x51, 0x88, 0x6e, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, - 0x61, 0xcd, 0x60, 0x30, 0xa0, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, - 0x00, 0x39, 0x00, 0x40, 0x88, 0x61, 0xa1, 0x86, 0x00, 0x35, 0x00, 0xc0, - 0x88, 0x65, 0x20, 0x01, 0xa9, 0xa2, 0x00, 0x78, 0x88, 0x67, 0x20, 0x01, - 0xa9, 0xa3, 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x0c, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, 0x60, 0x30, 0xa0, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x00, 0x40, 0x88, 0x7c, - 0xa1, 0x86, 0x00, 0x35, 0x00, 0xc0, 0x88, 0x80, 0x20, 0x01, 0xa9, 0xa2, - 0x00, 0x78, 0x88, 0x82, 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, 0x60, 0x16, - 0x60, 0x03, 0x00, 0x0e, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x82, - 0x00, 0x8c, 0x00, 0xc8, 0x88, 0x93, 0xa1, 0x82, 0x00, 0x85, 0x00, 0x48, - 0x88, 0x93, 0x00, 0x79, 0x88, 0x96, 0x10, 0x78, 0x77, 0x73, 0x00, 0x7c, - 0x88, 0x9d, 0x88, 0x9d, 0x88, 0x9d, 0x88, 0x9d, 0x88, 0x9f, 0x88, 0xfc, - 0x88, 0x9d, 0x10, 0x78, 0x13, 0x32, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, - 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, 0x88, 0xb2, 0x60, 0x30, 0xa0, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x00, 0x40, 0x89, 0x13, - 0xa1, 0x86, 0x00, 0x35, 0x00, 0x40, 0x89, 0x13, 0x0d, 0x7e, 0x10, 0x78, - 0x8d, 0x16, 0x00, 0xc0, 0x88, 0xbb, 0x10, 0x78, 0x8e, 0xc9, 0x00, 0x78, - 0x88, 0xde, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xe4, 0x00, 0xc0, - 0x88, 0xc3, 0x10, 0x78, 0x8e, 0xc9, 0x68, 0x37, 0x01, 0x03, 0x68, 0x50, - 0xd0, 0xb4, 0x00, 0x40, 0x88, 0xcf, 0x68, 0x4b, 0x00, 0x06, 0xc0, 0xec, - 0x68, 0x52, 0x00, 0x78, 0x88, 0xda, 0xd0, 0xbc, 0x00, 0x40, 0x88, 0xd6, - 0x68, 0x4b, 0x00, 0x02, 0x00, 0x78, 0x88, 0xda, 0x68, 0x4b, 0x00, 0x05, - 0x10, 0x78, 0x8f, 0x95, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, - 0x2c, 0x68, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, 0x88, 0xf7, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, 0x20, 0x09, 0xac, 0x8e, 0x21, 0x0c, - 0x61, 0x36, 0x20, 0x09, 0xac, 0x8f, 0x21, 0x0c, 0x61, 0x3a, 0x69, 0x18, - 0x61, 0x1a, 0x69, 0x20, 0x61, 0x22, 0x60, 0x1f, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0x8a, 0x2d, 0x60, 0x10, 0x78, 0x77, 0x2d, 0x0d, 0x7f, 0x00, 0x7c, - 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, - 0x89, 0x39, 0x60, 0x30, 0xa0, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, - 0x00, 0x35, 0x00, 0x40, 0x89, 0x13, 0xa1, 0x86, 0x00, 0x1e, 0x00, 0x40, - 0x89, 0x13, 0xa1, 0x86, 0x00, 0x39, 0x00, 0xc0, 0x89, 0x39, 0x0d, 0x7e, - 0x2c, 0x68, 0x10, 0x78, 0x91, 0xcc, 0x00, 0xc0, 0x89, 0x5d, 0x10, 0x78, - 0x76, 0xc7, 0x00, 0x40, 0x89, 0x36, 0x61, 0x06, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x1f, 0x00, 0x01, 0x69, 0x18, 0x61, 0x1a, 0x69, 0x28, 0x61, 0x2a, - 0x69, 0x2c, 0x61, 0x2e, 0x69, 0x30, 0xa1, 0x8c, 0x00, 0xff, 0x61, 0x32, - 0x69, 0x34, 0x61, 0x36, 0x69, 0x38, 0x61, 0x3a, 0x69, 0x20, 0x61, 0x22, - 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x2d, 0x60, 0x00, 0x78, - 0x89, 0x5d, 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x89, 0x5d, 0x68, 0x37, 0x01, 0x03, 0x68, 0x50, 0xd0, 0xb4, - 0x00, 0x40, 0x89, 0x4c, 0xc0, 0xec, 0x68, 0x52, 0x68, 0x4b, 0x00, 0x06, - 0x00, 0x78, 0x89, 0x57, 0xd0, 0xbc, 0x00, 0x40, 0x89, 0x53, 0x68, 0x4b, - 0x00, 0x02, 0x00, 0x78, 0x89, 0x57, 0x68, 0x4b, 0x00, 0x05, 0x10, 0x78, - 0x8f, 0x95, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x10, 0x78, - 0x8e, 0xc9, 0x0d, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x01, 0x7e, - 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x89, 0x71, 0x68, 0x37, 0x01, 0x03, 0x68, 0x4b, 0x00, 0x28, 0x68, 0x47, - 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x0d, 0x7f, 0x01, 0x7f, 0xa1, 0x86, - 0x00, 0x13, 0x00, 0x40, 0x89, 0x83, 0xa1, 0x86, 0x00, 0x14, 0x00, 0x40, - 0x89, 0x83, 0xa1, 0x86, 0x00, 0x27, 0x00, 0x40, 0x89, 0x83, 0x10, 0x78, - 0x77, 0x73, 0x00, 0x78, 0x89, 0x89, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, - 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x05, 0x7e, 0x06, 0x7e, - 0x0d, 0x7e, 0x0f, 0x7e, 0x20, 0x29, 0x00, 0x01, 0xa1, 0x82, 0x01, 0x01, - 0x00, 0xc8, 0x89, 0x96, 0x00, 0x78, 0x89, 0x98, 0x20, 0x09, 0x01, 0x00, - 0x21, 0x30, 0x20, 0x69, 0xac, 0x98, 0x83, 0x1c, 0x23, 0x00, 0xad, 0x18, - 0x20, 0x09, 0x00, 0x20, 0xaf, 0x90, 0x00, 0x1d, 0x10, 0x78, 0x89, 0xf2, - 0xa6, 0xb2, 0x00, 0x20, 0x78, 0x04, 0xa0, 0x6d, 0x00, 0x40, 0x89, 0xac, - 0x10, 0x78, 0x13, 0xb4, 0x10, 0x78, 0x13, 0x8b, 0x00, 0x40, 0x89, 0xd6, - 0x85, 0x28, 0x68, 0x37, 0x01, 0x10, 0x68, 0x3b, 0x00, 0x00, 0x2d, 0x20, - 0x7c, 0x06, 0xa6, 0x8a, 0x00, 0x3d, 0x00, 0xc8, 0x89, 0xc2, 0x26, 0x08, - 0xad, 0x90, 0x00, 0x0f, 0x10, 0x78, 0x89, 0xf2, 0x00, 0x78, 0x89, 0xd6, - 0xa6, 0xb2, 0x00, 0x3c, 0x20, 0x09, 0x00, 0x3c, 0x2d, 0x78, 0xad, 0x90, - 0x00, 0x0f, 0x10, 0x78, 0x89, 0xf2, 0x00, 0x78, 0x89, 0xac, 0x0f, 0x7f, - 0x85, 0x2f, 0xa5, 0xad, 0x00, 0x03, 0x7d, 0x36, 0xa5, 0xac, 0x00, 0x00, - 0x00, 0x78, 0x89, 0xdb, 0x0f, 0x7f, 0x85, 0x2f, 0xa5, 0xad, 0x00, 0x03, - 0x7d, 0x36, 0x0d, 0x7f, 0x06, 0x7f, 0x05, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, - 0x8d, 0xff, 0x00, 0x40, 0x89, 0xf0, 0x68, 0x04, 0xa0, 0x7d, 0x00, 0x40, - 0x89, 0xee, 0x68, 0x07, 0x00, 0x00, 0x10, 0x78, 0x4a, 0x73, 0x2f, 0x68, - 0x00, 0x78, 0x89, 0xe3, 0x10, 0x78, 0x4a, 0x73, 0x0f, 0x7f, 0x00, 0x7c, - 0x15, 0x7e, 0xa1, 0x84, 0x00, 0x01, 0x00, 0x40, 0x89, 0xf8, 0x81, 0x08, - 0x81, 0x0c, 0x21, 0xa8, 0x23, 0x04, 0x80, 0x07, 0x20, 0x12, 0x83, 0x18, - 0x82, 0x10, 0x00, 0xf0, 0x89, 0xfa, 0x15, 0x7f, 0x00, 0x7c, 0x06, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x31, 0x00, 0x01, 0x60, 0x1c, - 0xa0, 0x84, 0x00, 0x0f, 0x10, 0x79, 0x8a, 0x1f, 0x12, 0x7f, 0x06, 0x7f, - 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x06, 0x7e, 0x20, 0x31, - 0x00, 0x00, 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x10, 0x79, 0x8a, 0x1f, - 0x06, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x8a, 0x39, 0x8a, 0x27, 0x8a, 0x34, - 0x8a, 0x55, 0x8a, 0x27, 0x8a, 0x34, 0x8a, 0x55, 0x8a, 0x34, 0x10, 0x78, - 0x13, 0x32, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x10, 0x10, 0x78, 0x9d, 0xd7, - 0x60, 0x1f, 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x03, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x7c, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0x0d, 0x7e, - 0x86, 0xff, 0x00, 0xc0, 0x8a, 0x50, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, - 0x8d, 0x16, 0x00, 0x40, 0x8a, 0x52, 0xa0, 0x0e, 0x20, 0x01, 0x00, 0x05, - 0x10, 0x78, 0x4b, 0x51, 0x10, 0x78, 0x8f, 0x95, 0x10, 0x78, 0x4a, 0x73, - 0x10, 0x78, 0x77, 0x2d, 0xa0, 0x85, 0x00, 0x01, 0x0d, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x78, 0x8a, 0x50, 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, - 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x8a, 0x5d, 0x00, 0x7c, 0x8a, 0x6d, - 0x8a, 0x92, 0x8a, 0x6f, 0x8a, 0xb5, 0x8a, 0x8e, 0x8a, 0x6d, 0x8a, 0x34, - 0x8a, 0x39, 0x8a, 0x39, 0x8a, 0x34, 0x8a, 0x34, 0x8a, 0x34, 0x8a, 0x34, - 0x8a, 0x34, 0x8a, 0x34, 0x8a, 0x34, 0x10, 0x78, 0x13, 0x32, 0x86, 0xff, - 0x00, 0xc0, 0x8a, 0x8b, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x8a, 0x8b, 0x0d, 0x7e, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x8a, 0x80, 0x10, 0x78, 0x8f, 0x95, 0x0d, 0x7f, 0x60, 0x07, - 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, - 0x10, 0x78, 0x17, 0x57, 0x00, 0x78, 0x8a, 0x6f, 0x0e, 0x7e, 0x20, 0x71, - 0xa9, 0xb1, 0x70, 0x24, 0xac, 0x06, 0x00, 0xc0, 0x8a, 0x9b, 0x10, 0x78, - 0x6f, 0xc4, 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x86, 0x00, 0x06, - 0x00, 0xc0, 0x8a, 0xad, 0x08, 0x7e, 0x09, 0x7e, 0x20, 0x49, 0x00, 0x01, - 0x2c, 0x40, 0x10, 0x78, 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, 0x00, 0x78, - 0x8a, 0xaf, 0x10, 0x78, 0x6e, 0xbe, 0x0e, 0x7f, 0x00, 0xc0, 0x8a, 0x6f, - 0x10, 0x78, 0x8a, 0x34, 0x00, 0x7c, 0x03, 0x7e, 0x0e, 0x7e, 0x20, 0x71, - 0xa9, 0xb1, 0x70, 0x3c, 0xac, 0x06, 0x00, 0xc0, 0x8a, 0xc5, 0x20, 0x19, - 0x00, 0x00, 0x10, 0x78, 0x70, 0x58, 0x0e, 0x7f, 0x03, 0x7f, 0x00, 0x78, - 0x8a, 0x6f, 0x10, 0x78, 0x73, 0x8a, 0x0e, 0x7f, 0x03, 0x7f, 0x00, 0xc0, - 0x8a, 0x6f, 0x10, 0x78, 0x8a, 0x34, 0x00, 0x7c, 0x0c, 0x7e, 0x60, 0x1c, - 0xa0, 0x84, 0x00, 0x0f, 0x10, 0x79, 0x8a, 0xd6, 0x0c, 0x7f, 0x00, 0x7c, - 0x8a, 0xe5, 0x8b, 0x57, 0x8c, 0x8f, 0x8a, 0xf0, 0x8e, 0xd6, 0x8a, 0xe5, - 0x9d, 0xc8, 0x77, 0x2d, 0x8b, 0x57, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0x8a, 0xe5, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x62, 0xd1, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x60, 0x17, - 0x00, 0x01, 0x00, 0x7c, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x8a, 0xf8, - 0x60, 0x10, 0xa0, 0x80, 0x00, 0x19, 0x2c, 0x02, 0x60, 0x00, 0xa0, 0x8a, - 0x00, 0x10, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x8b, 0x00, 0x00, 0x7c, - 0x8b, 0x10, 0x8b, 0x12, 0x8b, 0x34, 0x8b, 0x46, 0x8b, 0x53, 0x8b, 0x10, - 0x8a, 0xe5, 0x8a, 0xe5, 0x8a, 0xe5, 0x8b, 0x46, 0x8b, 0x46, 0x8b, 0x10, - 0x8b, 0x10, 0x8b, 0x10, 0x8b, 0x10, 0x8b, 0x50, 0x10, 0x78, 0x13, 0x32, - 0x0e, 0x7e, 0x60, 0x10, 0x20, 0x70, 0x70, 0x50, 0xc0, 0xb5, 0x70, 0x52, - 0x20, 0x71, 0xa9, 0xb1, 0x70, 0x24, 0xac, 0x06, 0x00, 0x40, 0x8b, 0x30, - 0x10, 0x78, 0x6e, 0xbe, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, - 0x60, 0x1f, 0x00, 0x02, 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, 0x60, 0x16, - 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0e, 0x7f, 0x00, 0x7c, - 0x60, 0x17, 0x00, 0x01, 0x00, 0x78, 0x8b, 0x2e, 0x0d, 0x7e, 0x60, 0x10, - 0x20, 0x68, 0x68, 0x50, 0xc0, 0xb5, 0x68, 0x52, 0x0d, 0x7f, 0x60, 0x07, - 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x0d, 0x7e, 0x60, 0x17, - 0x00, 0x01, 0x60, 0x10, 0x20, 0x68, 0x68, 0x50, 0xc0, 0xb5, 0x68, 0x52, - 0x0d, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x10, 0x78, - 0x17, 0x57, 0x00, 0x78, 0x8b, 0x34, 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, - 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x8b, 0x5f, 0x00, 0x7c, 0x8b, 0x6f, - 0x8a, 0xed, 0x8b, 0x71, 0x8b, 0x6f, 0x8b, 0x71, 0x8b, 0x71, 0x8a, 0xe6, - 0x8b, 0x6f, 0x8a, 0xdf, 0x8a, 0xdf, 0x8b, 0x6f, 0x8b, 0x6f, 0x8b, 0x6f, - 0x8b, 0x6f, 0x8b, 0x6f, 0x8b, 0x6f, 0x10, 0x78, 0x13, 0x32, 0x0d, 0x7e, - 0x60, 0x18, 0x20, 0x68, 0x68, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x0d, 0x7f, - 0xa0, 0x8a, 0x00, 0x0c, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x8b, 0x7f, - 0x00, 0x7c, 0x8b, 0x8b, 0x8c, 0x33, 0x8b, 0x8d, 0x8b, 0xcd, 0x8b, 0x8d, - 0x8b, 0xcd, 0x8b, 0x8d, 0x8b, 0x9a, 0x8b, 0x8b, 0x8b, 0xcd, 0x8b, 0x8b, - 0x8b, 0xb7, 0x10, 0x78, 0x13, 0x32, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x16, - 0x00, 0x40, 0x8b, 0xc8, 0xa0, 0x8e, 0x00, 0x04, 0x00, 0x40, 0x8b, 0xc8, - 0xa0, 0x8e, 0x00, 0x02, 0x00, 0x40, 0x8b, 0xc8, 0x60, 0x04, 0x10, 0x78, - 0x8f, 0x10, 0x00, 0x40, 0x8c, 0x4e, 0xa0, 0x8e, 0x00, 0x21, 0x00, 0x40, - 0x8c, 0x52, 0xa0, 0x8e, 0x00, 0x22, 0x00, 0x40, 0x8c, 0x4e, 0xa0, 0x8e, - 0x00, 0x3d, 0x00, 0x40, 0x8c, 0x52, 0xa0, 0x8e, 0x00, 0x39, 0x00, 0x40, - 0x8c, 0x56, 0xa0, 0x8e, 0x00, 0x35, 0x00, 0x40, 0x8c, 0x56, 0xa0, 0x8e, - 0x00, 0x1e, 0x00, 0x40, 0x8b, 0xca, 0xa0, 0x8e, 0x00, 0x01, 0x00, 0xc0, - 0x8b, 0xc6, 0x0d, 0x7e, 0x60, 0x18, 0x20, 0x68, 0x68, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x0d, 0x7f, 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, 0x8b, 0xc8, - 0x10, 0x78, 0x28, 0x80, 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x8e, 0xd6, - 0x00, 0x7c, 0x0c, 0x7e, 0x0d, 0x7e, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x16, - 0x00, 0x40, 0x8c, 0x23, 0xa1, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x8b, 0xf6, - 0x60, 0x18, 0x20, 0x68, 0x68, 0xa0, 0xd0, 0xbc, 0x00, 0xc0, 0x8c, 0x7a, - 0x68, 0x40, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x40, 0x8b, 0xf6, - 0x80, 0x01, 0x68, 0x42, 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x07, - 0x60, 0x17, 0x03, 0x98, 0x10, 0x78, 0x76, 0xc7, 0x00, 0x40, 0x8b, 0xf6, - 0x2d, 0x00, 0x60, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x00, 0x78, 0x8c, 0x23, - 0x0d, 0x7f, 0x0c, 0x7f, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x00, 0xc0, - 0x8c, 0x14, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x7e, 0x00, 0xc0, 0x8c, 0x14, 0x20, 0x09, 0xa7, 0x33, 0x21, 0x04, - 0xc0, 0x85, 0x20, 0x0a, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x10, 0x78, - 0x42, 0xb8, 0x0e, 0x7f, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x78, 0x8c, 0x18, - 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x28, 0x80, 0x0e, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x28, 0xa6, 0x12, 0x7f, 0x0e, 0x7f, - 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x7c, 0x20, 0x01, 0x00, 0x02, 0x10, 0x78, - 0x45, 0x02, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x10, 0x78, - 0x5d, 0xd7, 0x10, 0x78, 0x62, 0xd1, 0x0d, 0x7f, 0x0c, 0x7f, 0x00, 0x78, - 0x8c, 0x22, 0x0c, 0x7e, 0x0d, 0x7e, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x16, - 0x00, 0x40, 0x8c, 0x23, 0x60, 0x18, 0x20, 0x68, 0x68, 0x40, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x05, 0x00, 0x40, 0x8b, 0xf6, 0x80, 0x01, 0x68, 0x42, - 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x10, 0x78, 0x62, 0xd1, - 0x0d, 0x7f, 0x0c, 0x7f, 0x00, 0x78, 0x8c, 0x22, 0x10, 0x78, 0x7c, 0x83, - 0x00, 0x78, 0x8b, 0xca, 0x10, 0x78, 0x7c, 0xa6, 0x00, 0x78, 0x8b, 0xca, - 0x0d, 0x7e, 0x2c, 0x68, 0x61, 0x04, 0x10, 0x78, 0x91, 0xcc, 0x0d, 0x7f, - 0x00, 0x40, 0x8c, 0x62, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x8c, 0x79, - 0x60, 0x04, 0x80, 0x07, 0x61, 0x30, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x05, - 0x60, 0x32, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, - 0x00, 0x02, 0x60, 0x38, 0x60, 0x0a, 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, - 0x60, 0x16, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, - 0x0d, 0x7f, 0x0c, 0x7f, 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x28, 0x80, - 0x0e, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x28, 0xa6, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x07, 0x60, 0x17, 0x03, 0x98, - 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, - 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x8c, 0x97, 0x00, 0x7c, 0x8c, 0xa7, - 0x8c, 0xa7, 0x8c, 0xa7, 0x8c, 0xa7, 0x8c, 0xa7, 0x8c, 0xa7, 0x8c, 0xa7, - 0x8c, 0xa7, 0x8c, 0xa7, 0x8a, 0xe5, 0x8c, 0xa7, 0x8a, 0xed, 0x8c, 0xa9, - 0x8a, 0xed, 0x8c, 0xb7, 0x8c, 0xa7, 0x10, 0x78, 0x13, 0x32, 0x60, 0x04, - 0xa0, 0x86, 0x00, 0x8b, 0x00, 0x40, 0x8c, 0xb7, 0x60, 0x07, 0x00, 0x8b, - 0x60, 0x03, 0x00, 0x0d, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x7c, 0x10, 0x78, 0x8e, 0xc9, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x8c, 0xef, 0x10, 0x78, 0x28, 0x80, 0x0d, 0x7e, 0x10, 0x78, 0x8d, 0x16, - 0x00, 0x40, 0x8c, 0xd1, 0x60, 0x10, 0x20, 0x68, 0x68, 0x37, 0x01, 0x03, - 0x68, 0x4b, 0x00, 0x06, 0x68, 0x47, 0x00, 0x00, 0x68, 0x50, 0xc0, 0xed, - 0x68, 0x52, 0x10, 0x78, 0x4a, 0x73, 0x2c, 0x68, 0x10, 0x78, 0x76, 0xc7, - 0x00, 0x40, 0x8c, 0xdf, 0x68, 0x18, 0x60, 0x1a, 0x0c, 0x7e, 0x2d, 0x60, - 0x10, 0x78, 0x8e, 0xd6, 0x0c, 0x7f, 0x00, 0x78, 0x8c, 0xe0, 0x2d, 0x60, - 0x0d, 0x7f, 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x78, 0x8d, 0x01, 0x60, 0x30, 0xa0, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x00, 0x40, 0x8c, 0xfb, 0xa1, 0x86, - 0x00, 0x35, 0x00, 0xc0, 0x8c, 0xff, 0x10, 0x78, 0x28, 0x80, 0x00, 0x78, - 0x8c, 0xd1, 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x7c, 0xa2, 0x84, 0x00, 0x0f, - 0x00, 0xc0, 0x8d, 0x13, 0xa2, 0x82, 0xae, 0x00, 0x00, 0x48, 0x8d, 0x13, - 0x20, 0x01, 0xa7, 0x16, 0x20, 0x04, 0xa2, 0x02, 0x00, 0xc8, 0x8d, 0x13, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x8d, 0x12, - 0x02, 0x7e, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x62, 0x10, 0x70, 0x5c, - 0xa2, 0x02, 0x00, 0x48, 0x8d, 0x28, 0x70, 0x60, 0xa2, 0x02, 0x00, 0xc8, - 0x8d, 0x28, 0xa0, 0x85, 0x00, 0x01, 0x0e, 0x7f, 0x02, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x78, 0x8d, 0x25, 0x0e, 0x7e, 0x0c, 0x7e, 0x03, 0x7e, - 0x00, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, 0xae, 0x00, - 0x20, 0x71, 0xa7, 0x00, 0x73, 0x48, 0x70, 0x64, 0xa3, 0x02, 0x00, 0xc8, - 0x8d, 0x55, 0x60, 0x1c, 0xa2, 0x06, 0x00, 0xc0, 0x8d, 0x4d, 0x10, 0x78, - 0x90, 0x3b, 0x00, 0x40, 0x8d, 0x4d, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0x8d, 0x49, 0x10, 0x78, 0x7c, 0x83, 0x0c, 0x7e, 0x10, 0x78, 0x77, 0x2d, - 0x0c, 0x7f, 0xac, 0xe0, 0x00, 0x10, 0x70, 0x58, 0xac, 0x02, 0x00, 0xc8, - 0x8d, 0x55, 0x00, 0x78, 0x8d, 0x36, 0x12, 0x7f, 0x00, 0x7f, 0x03, 0x7f, - 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x01, 0x7e, - 0xa1, 0x88, 0xa8, 0x35, 0x21, 0x0c, 0x81, 0xff, 0x00, 0x40, 0x8d, 0x69, - 0x20, 0x61, 0xaa, 0xb3, 0x61, 0x1a, 0x10, 0x78, 0x28, 0x80, 0xa0, 0x06, - 0x00, 0x78, 0x8d, 0x6e, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x7f, 0x0c, 0x7f, - 0x0e, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x05, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x05, 0x7f, 0x00, 0x40, - 0x8d, 0x8b, 0x66, 0x12, 0x65, 0x1a, 0x60, 0x1f, 0x00, 0x03, 0x20, 0x09, - 0x00, 0x4b, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, - 0x05, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x8d, 0x87, - 0x0c, 0x7e, 0x05, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x62, 0xa0, - 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x05, 0x7f, 0x00, 0x40, 0x8d, 0xb9, - 0x60, 0x13, 0x00, 0x00, 0x65, 0x1a, 0x60, 0x1f, 0x00, 0x03, 0x0c, 0x7e, - 0x25, 0x60, 0x10, 0x78, 0x47, 0xe9, 0x0c, 0x7f, 0x10, 0x78, 0x5f, 0x01, - 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x5e, 0x0a, 0x2c, 0x08, - 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, 0x20, 0x09, 0x00, 0x4c, 0x10, 0x78, - 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x05, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x8d, 0xb5, 0x0f, 0x7e, 0x0c, 0x7e, - 0x04, 0x7e, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x2c, 0x78, 0x0c, 0x7f, - 0x00, 0x40, 0x8d, 0xd6, 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, 0x78, 0x1f, - 0x00, 0x03, 0x20, 0x21, 0x00, 0x05, 0x10, 0x78, 0x8e, 0x21, 0x2f, 0x60, - 0x20, 0x09, 0x00, 0x4d, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x04, 0x7f, 0x0c, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x0c, 0x7e, - 0x04, 0x7e, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x2c, 0x78, 0x0c, 0x7f, - 0x00, 0x40, 0x8d, 0xf4, 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, 0x78, 0x1f, - 0x00, 0x03, 0x20, 0x21, 0x00, 0x05, 0x10, 0x78, 0x8e, 0x21, 0x2f, 0x60, - 0x20, 0x09, 0x00, 0x4e, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x04, 0x7f, 0x0c, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, 0x0c, 0x7e, - 0x04, 0x7e, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x2c, 0x78, 0x0c, 0x7f, - 0x00, 0x40, 0x8e, 0x1d, 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, 0x78, 0x1f, - 0x00, 0x03, 0x20, 0x21, 0x00, 0x04, 0x10, 0x78, 0x8e, 0x21, 0x20, 0x01, - 0xa9, 0x9d, 0x20, 0x04, 0xd0, 0xfc, 0x00, 0x40, 0x8e, 0x16, 0x2f, 0x60, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x8e, 0x1b, 0x2f, 0x60, 0x20, 0x09, - 0x00, 0x52, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x04, 0x7f, - 0x0c, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x09, 0x7e, 0x07, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, 0x47, 0x75, 0x00, 0x40, 0x8e, 0x2e, - 0x20, 0x01, 0x8e, 0x26, 0x00, 0x78, 0x8e, 0x34, 0x10, 0x78, 0x47, 0x39, - 0x00, 0x40, 0x8e, 0x3d, 0x20, 0x01, 0x8e, 0x2e, 0x00, 0x7e, 0xa0, 0x0e, - 0x24, 0x00, 0x10, 0x78, 0x4b, 0x51, 0x10, 0x78, 0x4a, 0x73, 0x00, 0x7f, - 0x00, 0x7a, 0x24, 0x18, 0x10, 0x78, 0x61, 0x61, 0x62, 0xa0, 0x08, 0x7e, - 0x20, 0x41, 0x00, 0x01, 0x20, 0x39, 0x00, 0x01, 0x26, 0x08, 0x10, 0x78, - 0x5f, 0x1b, 0x08, 0x7f, 0x10, 0x78, 0x5e, 0x0a, 0x2f, 0x08, 0x26, 0x48, - 0x10, 0x78, 0x9f, 0x9b, 0x61, 0x3c, 0x81, 0xff, 0x10, 0x40, 0x5f, 0xdb, - 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x07, 0x7f, 0x09, 0x7f, 0x00, 0x7c, - 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x8e, 0x73, 0x66, 0x0a, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x1f, - 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x8e, 0x70, 0x0c, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, - 0x00, 0x40, 0x8e, 0x8f, 0x66, 0x0a, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x08, - 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x21, 0x10, 0x78, 0x77, 0x5c, - 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, - 0x00, 0x78, 0x8e, 0x8c, 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x8e, 0xab, - 0x66, 0x0a, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, - 0x20, 0x09, 0x00, 0x3d, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x8e, 0xa8, - 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, - 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x8e, 0xc6, 0x61, 0x1a, 0x60, 0x1f, - 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, - 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, - 0xa0, 0x06, 0x00, 0x78, 0x8e, 0xc3, 0x02, 0x7e, 0x0d, 0x7e, 0x62, 0x18, - 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, 0x00, 0x40, 0x8e, 0xd3, 0x82, 0x11, - 0x6a, 0x3e, 0x0d, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0x00, 0x7e, 0x60, 0x00, - 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, 0x8e, 0xe8, 0x60, 0x13, 0x00, 0x00, - 0x60, 0x1f, 0x00, 0x07, 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, 0x60, 0x16, - 0x10, 0x78, 0xa4, 0xa5, 0x60, 0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x7c, - 0x06, 0x7e, 0x0c, 0x7e, 0x0d, 0x7e, 0x20, 0x31, 0xa7, 0x53, 0x26, 0x34, - 0xd6, 0xe4, 0x00, 0x40, 0x8e, 0xf8, 0x66, 0x18, 0x26, 0x60, 0x6e, 0x48, - 0x10, 0x78, 0x46, 0xe7, 0x0d, 0x7f, 0x0c, 0x7f, 0x06, 0x7f, 0x00, 0x7c, - 0x00, 0x7e, 0x01, 0x7e, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x00, 0x40, - 0x8f, 0x0d, 0xa0, 0x8e, 0x00, 0x03, 0x00, 0x40, 0x8f, 0x0d, 0xa0, 0x8e, - 0x00, 0x04, 0x00, 0x40, 0x8f, 0x0d, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x7f, - 0x00, 0x7f, 0x00, 0x7c, 0x00, 0x7e, 0x0d, 0x7e, 0x60, 0x10, 0xa0, 0x6d, - 0x00, 0x40, 0x8f, 0x1d, 0x68, 0x38, 0xd0, 0xfc, 0x00, 0x40, 0x8f, 0x1d, - 0xa0, 0x06, 0x00, 0x78, 0x8f, 0x1f, 0xa0, 0x85, 0x00, 0x01, 0x0d, 0x7f, - 0x00, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, 0x8f, 0x3c, - 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x10, 0x78, - 0x28, 0x80, 0x20, 0x09, 0x00, 0x28, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, - 0x00, 0x01, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, - 0x8f, 0x39, 0xa1, 0x86, 0x00, 0x15, 0x00, 0xc0, 0x8f, 0x54, 0x20, 0x11, - 0xa7, 0x20, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x74, 0x00, 0xc0, 0x8f, 0x54, - 0x10, 0x78, 0x7f, 0x91, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x29, - 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x78, 0x8f, 0x58, 0x10, 0x78, 0x7c, 0x83, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x16, 0x00, 0xc0, - 0x8f, 0x63, 0x20, 0x01, 0x00, 0x04, 0x10, 0x78, 0x45, 0x02, 0x00, 0x78, - 0x8f, 0x84, 0xa1, 0x86, 0x00, 0x15, 0x00, 0xc0, 0x8f, 0x88, 0x20, 0x11, - 0xa7, 0x20, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x8f, 0x88, - 0x0d, 0x7e, 0x60, 0x18, 0x20, 0x68, 0x10, 0x78, 0x46, 0x49, 0x0d, 0x7f, - 0x10, 0x78, 0x80, 0x43, 0x00, 0xc0, 0x8f, 0x88, 0x0d, 0x7e, 0x60, 0x18, - 0x20, 0x68, 0x68, 0x90, 0x0d, 0x7f, 0xa0, 0x05, 0x00, 0x40, 0x8f, 0x88, - 0x20, 0x01, 0x00, 0x06, 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x77, 0xf8, - 0x00, 0x78, 0x8f, 0x8c, 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x77, 0x2d, - 0x00, 0x7c, 0x68, 0x48, 0xa0, 0x86, 0x00, 0x05, 0x00, 0xc0, 0x8f, 0x94, - 0x10, 0x78, 0x8f, 0x95, 0x00, 0x7c, 0x68, 0x50, 0xc0, 0xad, 0x68, 0x52, - 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xac, 0x8c, 0x70, 0x14, 0xd0, 0xe4, - 0x00, 0x40, 0x8f, 0xaa, 0x60, 0x13, 0x00, 0x00, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x50, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x0e, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, - 0x49, 0x63, 0x0f, 0x7f, 0x00, 0x40, 0x8f, 0xb9, 0x60, 0x1c, 0xa0, 0x84, - 0x00, 0x0f, 0x10, 0x79, 0x8f, 0xbb, 0x0c, 0x7f, 0x00, 0x7c, 0x8a, 0xe5, - 0x8f, 0xc6, 0x8f, 0xc9, 0x8f, 0xcc, 0xa2, 0x6d, 0xa2, 0x89, 0xa2, 0x8c, - 0x8a, 0xe5, 0x8a, 0xe5, 0x10, 0x78, 0x13, 0x32, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x7c, 0x00, 0x05, 0x00, 0x05, 0x00, 0x7c, 0x10, 0x78, 0x8f, 0xcf, - 0x00, 0x7c, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x00, 0x40, - 0x8f, 0xfe, 0x10, 0x78, 0x76, 0xc7, 0x00, 0xc0, 0x8f, 0xdf, 0x20, 0x01, - 0xa9, 0xa4, 0x20, 0x04, 0x78, 0x3e, 0x00, 0x78, 0x8f, 0xfe, 0x78, 0x18, - 0x60, 0x1a, 0x78, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x00, 0x40, 0x8f, 0xec, - 0x78, 0x08, 0x60, 0x36, 0x2f, 0x00, 0x60, 0x3a, 0x00, 0x78, 0x8f, 0xf0, - 0x78, 0x08, 0x60, 0x3a, 0x2f, 0x00, 0x60, 0x36, 0x60, 0x2a, 0x60, 0x1f, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x35, 0x60, 0x03, 0x00, 0x01, 0x79, 0x20, - 0x61, 0x22, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x2f, 0x60, - 0x0f, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x0f, 0x7e, 0x68, 0x2c, 0x60, 0x32, - 0xa0, 0x8e, 0x00, 0x01, 0x00, 0x40, 0x90, 0x11, 0xa0, 0x86, 0x00, 0x05, - 0x00, 0x40, 0x90, 0x15, 0xa0, 0x06, 0x60, 0x2a, 0x60, 0x2e, 0x00, 0x78, - 0x90, 0x26, 0x68, 0x24, 0xc0, 0xf4, 0xc0, 0xd5, 0x68, 0x26, 0x68, 0x10, - 0x20, 0x78, 0x78, 0x7c, 0x69, 0x38, 0xa1, 0x02, 0x78, 0x80, 0x69, 0x34, - 0xa1, 0x03, 0x00, 0xc8, 0x90, 0x0c, 0x68, 0x34, 0x60, 0x2a, 0x68, 0x38, - 0xa0, 0x84, 0xff, 0xfc, 0x68, 0x3a, 0x60, 0x2e, 0x2d, 0x00, 0x60, 0x36, - 0x68, 0x08, 0x60, 0x3a, 0x69, 0x18, 0x61, 0x1a, 0x69, 0x20, 0x61, 0x22, - 0x60, 0x1f, 0x00, 0x01, 0x60, 0x07, 0x00, 0x39, 0x60, 0x03, 0x00, 0x01, - 0x10, 0x78, 0x5d, 0x8a, 0x68, 0x03, 0x00, 0x02, 0x0f, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x00, 0x7e, 0x01, 0x7e, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x34, - 0x00, 0x40, 0x90, 0x60, 0xa0, 0x8e, 0x00, 0x35, 0x00, 0x40, 0x90, 0x60, - 0xa0, 0x8e, 0x00, 0x36, 0x00, 0x40, 0x90, 0x60, 0xa0, 0x8e, 0x00, 0x37, - 0x00, 0x40, 0x90, 0x60, 0xa0, 0x8e, 0x00, 0x38, 0x00, 0x40, 0x90, 0x60, - 0xa0, 0x8e, 0x00, 0x39, 0x00, 0x40, 0x90, 0x60, 0xa0, 0x8e, 0x00, 0x3a, - 0x00, 0x40, 0x90, 0x60, 0xa0, 0x8e, 0x00, 0x3b, 0x00, 0x40, 0x90, 0x60, - 0xa0, 0x85, 0x00, 0x01, 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x0f, 0x7e, - 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x00, 0xc0, 0x90, 0x6d, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x78, 0x90, 0x7c, 0x60, 0x24, 0xd0, 0xf4, 0x00, 0xc0, - 0x90, 0x7b, 0xc0, 0xf5, 0x60, 0x26, 0x60, 0x10, 0x20, 0x78, 0x78, 0x28, - 0x60, 0x3a, 0x78, 0x2c, 0x60, 0x36, 0x10, 0x78, 0x17, 0x57, 0xa0, 0x06, - 0x0f, 0x7f, 0x00, 0x7c, 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, - 0x0e, 0x7e, 0x20, 0x01, 0xa9, 0x9e, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, - 0x20, 0x01, 0x00, 0x32, 0x10, 0x78, 0x5c, 0x1c, 0x20, 0x01, 0xa9, 0xa2, - 0x82, 0xff, 0x00, 0xc0, 0x90, 0x93, 0x20, 0x11, 0x00, 0x14, 0x22, 0x02, - 0x20, 0x01, 0xa9, 0xa0, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, 0x20, 0x71, - 0xa9, 0x8d, 0x71, 0x1a, 0x72, 0x1e, 0x20, 0x01, 0x00, 0x64, 0x10, 0x78, - 0x5c, 0x1c, 0x20, 0x01, 0xa9, 0xa3, 0x82, 0xff, 0x00, 0xc0, 0x90, 0xa8, - 0x20, 0x11, 0x00, 0x14, 0x22, 0x02, 0x20, 0x09, 0xa9, 0xa4, 0xa2, 0x80, - 0x00, 0x0a, 0x20, 0x0a, 0x10, 0x78, 0x49, 0x8b, 0x0e, 0x7f, 0x03, 0x7f, - 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x00, 0x7e, 0x0e, 0x7e, - 0x20, 0x01, 0xa9, 0xa2, 0x20, 0x03, 0x00, 0x28, 0x20, 0x01, 0xa9, 0xa3, - 0x20, 0x03, 0x00, 0x14, 0x20, 0x71, 0xa9, 0x8d, 0x70, 0x1b, 0x00, 0x00, - 0x70, 0x1f, 0x07, 0xd0, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x03, 0x00, 0x1e, - 0x0e, 0x7f, 0x00, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, 0x01, 0x7f, 0x00, 0x40, - 0x90, 0xe5, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, - 0x20, 0x09, 0x00, 0x33, 0x10, 0x78, 0x77, 0x5c, 0xa0, 0x85, 0x00, 0x01, - 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, 0x00, 0x78, 0x90, 0xe2, - 0x0d, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0xa1, 0x86, - 0x00, 0x15, 0x00, 0xc0, 0x91, 0x17, 0x70, 0x80, 0xa0, 0x86, 0x00, 0x18, - 0x00, 0xc0, 0x91, 0x17, 0x60, 0x10, 0x20, 0x68, 0x6a, 0x3c, 0xd2, 0xe4, - 0x00, 0xc0, 0x91, 0x0b, 0x2c, 0x78, 0x10, 0x78, 0x64, 0x90, 0x00, 0x40, - 0x91, 0x1f, 0x70, 0x6c, 0x6a, 0x50, 0xa2, 0x06, 0x00, 0xc0, 0x91, 0x13, - 0x70, 0x70, 0x6a, 0x54, 0xa2, 0x06, 0x00, 0xc0, 0x91, 0x13, 0x62, 0x18, - 0xa2, 0x90, 0x00, 0x28, 0x22, 0x14, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, - 0x28, 0xc8, 0x10, 0x78, 0x77, 0xf8, 0x00, 0x78, 0x91, 0x1b, 0x10, 0x78, - 0x7c, 0x83, 0x10, 0x78, 0x77, 0x2d, 0x0f, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, - 0x00, 0x7c, 0x70, 0x50, 0xa0, 0x80, 0x29, 0xc0, 0x20, 0x04, 0x6a, 0x54, - 0xa2, 0x06, 0x00, 0x40, 0x91, 0x0b, 0x00, 0x78, 0x91, 0x13, 0x0c, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x0c, 0x7e, 0x10, 0x78, 0x76, 0xc7, - 0x01, 0x7f, 0x00, 0x40, 0x91, 0x41, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x01, - 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x43, 0x10, 0x78, 0x77, 0x5c, - 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x06, - 0x00, 0x78, 0x91, 0x3e, 0x0d, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, 0x20, 0x71, - 0xa7, 0x00, 0xa1, 0x86, 0x00, 0x15, 0x00, 0xc0, 0x91, 0x6a, 0x70, 0x80, - 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x91, 0x6a, 0x60, 0x10, 0xa0, 0xe8, - 0x00, 0x0f, 0x2c, 0x78, 0x10, 0x78, 0x64, 0x90, 0x00, 0x40, 0x91, 0x72, - 0x70, 0x6c, 0x6a, 0x08, 0xa2, 0x06, 0x00, 0xc0, 0x91, 0x66, 0x70, 0x70, - 0x6a, 0x0c, 0xa2, 0x06, 0x00, 0xc0, 0x91, 0x66, 0x10, 0x78, 0x28, 0x80, - 0x10, 0x78, 0x77, 0xf8, 0x00, 0x78, 0x91, 0x6e, 0x10, 0x78, 0x7c, 0x83, - 0x10, 0x78, 0x77, 0x2d, 0x0f, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x70, 0x50, 0xa0, 0x80, 0x29, 0xc0, 0x20, 0x04, 0x6a, 0x0c, 0xa2, 0x06, - 0x00, 0x40, 0x91, 0x64, 0x00, 0x78, 0x91, 0x66, 0x01, 0x7e, 0x02, 0x7e, - 0x68, 0x4c, 0xd0, 0xac, 0x00, 0x40, 0x91, 0x94, 0x69, 0x14, 0x6a, 0x10, - 0x21, 0x00, 0xa2, 0x05, 0x00, 0x40, 0x91, 0x94, 0x68, 0x60, 0xa1, 0x06, - 0x00, 0xc0, 0x91, 0x90, 0x68, 0x5c, 0xa2, 0x06, 0x00, 0x40, 0x91, 0x94, - 0x69, 0x62, 0x6a, 0x5e, 0xa0, 0x85, 0x00, 0x01, 0x02, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x12, 0x7e, 0x20, 0x71, 0xa7, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x75, 0x48, 0xa5, 0x82, 0x00, 0x01, 0x00, 0x48, 0x91, 0xc9, - 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, - 0x91, 0xb5, 0xac, 0xe0, 0x00, 0x10, 0x70, 0x58, 0xac, 0x02, 0x00, 0xc8, - 0x91, 0xb1, 0x00, 0x78, 0x91, 0xa4, 0x20, 0x61, 0xae, 0x00, 0x00, 0x78, - 0x91, 0xa4, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, 0x75, 0x4a, 0xac, 0xa8, - 0x00, 0x10, 0x70, 0x58, 0xa5, 0x02, 0x00, 0xc8, 0x91, 0xc5, 0x75, 0x4e, - 0xa0, 0x85, 0x00, 0x01, 0x12, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x70, 0x4f, - 0xae, 0x00, 0x00, 0x78, 0x91, 0xc0, 0xa0, 0x06, 0x00, 0x78, 0x91, 0xc2, - 0x0c, 0x7e, 0x02, 0x7e, 0x01, 0x7e, 0xa1, 0x86, 0x00, 0x35, 0x00, 0x40, - 0x91, 0xd6, 0x6a, 0x34, 0x00, 0x78, 0x91, 0xd7, 0x6a, 0x28, 0x10, 0x78, - 0x8d, 0x02, 0x00, 0x40, 0x92, 0x00, 0x22, 0x60, 0x61, 0x1c, 0xa1, 0x86, - 0x00, 0x03, 0x00, 0x40, 0x91, 0xe5, 0xa1, 0x86, 0x00, 0x06, 0x00, 0xc0, - 0x91, 0xfc, 0x68, 0x34, 0xa2, 0x06, 0x00, 0x40, 0x91, 0xf4, 0x68, 0x38, - 0xa2, 0x06, 0x00, 0xc0, 0x91, 0xfc, 0x61, 0x08, 0x68, 0x34, 0xa1, 0x06, - 0x00, 0xc0, 0x91, 0xfc, 0x00, 0x78, 0x91, 0xf9, 0x60, 0x08, 0x69, 0x38, - 0xa1, 0x06, 0x00, 0xc0, 0x91, 0xfc, 0x60, 0x18, 0x69, 0x18, 0xa1, 0x06, - 0x01, 0x7f, 0x02, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x78, 0x91, 0xfc, 0x69, 0x44, 0xd1, 0xcc, 0x00, 0x40, 0x92, 0x1d, - 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x8e, 0x00, 0x02, 0x00, 0xc0, 0x92, 0x1d, - 0xad, 0x88, 0x00, 0x1e, 0x21, 0x0c, 0xa1, 0x8c, 0x0f, 0x00, 0x81, 0x0f, - 0xa1, 0x8e, 0x00, 0x01, 0x00, 0xc0, 0x92, 0x1d, 0x68, 0x10, 0x69, 0x14, - 0xa1, 0x15, 0x10, 0xc0, 0x84, 0xe2, 0x00, 0x7c, 0x06, 0x7e, 0x60, 0x00, - 0xa0, 0xb2, 0x00, 0x10, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x92, 0x28, - 0x06, 0x7f, 0x00, 0x7c, 0x92, 0x38, 0x96, 0xef, 0x98, 0x0b, 0x92, 0x38, - 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, 0x92, 0x72, 0x98, 0x9e, - 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, 0x92, 0x38, - 0x10, 0x78, 0x13, 0x32, 0x06, 0x7e, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, - 0x10, 0xc8, 0x13, 0x32, 0x10, 0x79, 0x92, 0x44, 0x06, 0x7f, 0x00, 0x7c, - 0x92, 0x54, 0x9d, 0x63, 0x92, 0x54, 0x92, 0x54, 0x92, 0x54, 0x92, 0x54, - 0x92, 0x54, 0x92, 0x54, 0x9d, 0x21, 0x9d, 0xb1, 0x92, 0x54, 0xa3, 0xc0, - 0xa3, 0xf4, 0xa3, 0xc0, 0xa3, 0xf4, 0x92, 0x54, 0x10, 0x78, 0x13, 0x32, - 0x06, 0x7e, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x10, 0xc8, 0x13, 0x32, - 0x10, 0x79, 0x92, 0x60, 0x06, 0x7f, 0x00, 0x7c, 0x92, 0x70, 0x99, 0xfb, - 0x9a, 0xd7, 0x9b, 0x05, 0x9b, 0x80, 0x92, 0x70, 0x9c, 0x86, 0x9c, 0x2e, - 0x98, 0xaa, 0x9c, 0xf5, 0x9d, 0x0b, 0x92, 0x70, 0x92, 0x70, 0x92, 0x70, - 0x92, 0x70, 0x92, 0x70, 0x10, 0x78, 0x13, 0x32, 0xa1, 0xb2, 0x00, 0x44, - 0x10, 0xc8, 0x13, 0x32, 0x21, 0x00, 0x00, 0x79, 0x92, 0x79, 0x92, 0xb9, - 0x94, 0xa8, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x94, 0xb0, 0x92, 0xb9, - 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, - 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, - 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xbb, 0x93, 0x21, - 0x93, 0x30, 0x93, 0x87, 0x93, 0xa6, 0x94, 0x25, 0x94, 0x95, 0x92, 0xb9, - 0x92, 0xb9, 0x94, 0xb4, 0x92, 0xb9, 0x92, 0xb9, 0x94, 0xc7, 0x94, 0xd2, - 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x95, 0x0a, - 0x92, 0xb9, 0x92, 0xb9, 0x95, 0x19, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, - 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x95, 0x32, 0x92, 0xb9, 0x92, 0xb9, - 0x92, 0xb9, 0x95, 0xbf, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, 0x92, 0xb9, - 0x92, 0xb9, 0x92, 0xb9, 0x96, 0x39, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, - 0x49, 0x67, 0x00, 0xc0, 0x92, 0xcb, 0x20, 0x01, 0xa7, 0x33, 0x20, 0x04, - 0xd0, 0xcc, 0x00, 0xc0, 0x92, 0xcb, 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, - 0x00, 0x08, 0x00, 0xc0, 0x92, 0xd3, 0x60, 0x07, 0x00, 0x09, 0x60, 0x2b, - 0x00, 0x09, 0x60, 0x13, 0x00, 0x00, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, - 0x49, 0x57, 0x0e, 0x7e, 0x0c, 0x7e, 0x03, 0x7e, 0x02, 0x7e, 0x01, 0x7e, - 0x62, 0x18, 0x22, 0x70, 0x72, 0xa0, 0x02, 0x7e, 0x20, 0x19, 0x00, 0x29, - 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, - 0x5e, 0x0a, 0x2c, 0x08, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, 0x01, 0x7f, - 0x2e, 0x60, 0x10, 0x78, 0x47, 0xe9, 0x01, 0x7f, 0x02, 0x7f, 0x03, 0x7f, - 0x0c, 0x7f, 0x0e, 0x7f, 0x66, 0x18, 0x0c, 0x7e, 0x26, 0x60, 0x10, 0x78, - 0x45, 0xd6, 0x0c, 0x7f, 0xa6, 0xb0, 0x00, 0x01, 0x26, 0x34, 0xa6, 0x84, - 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x00, 0x48, 0x93, 0x13, 0x10, 0x78, - 0x9e, 0xcf, 0x00, 0xc0, 0x93, 0x81, 0x10, 0x78, 0x9e, 0x60, 0x00, 0xc0, - 0x93, 0x0f, 0x60, 0x07, 0x00, 0x08, 0x00, 0x78, 0x94, 0xa3, 0x60, 0x07, - 0x00, 0x09, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, 0xa0, 0xaf, 0x00, 0x40, - 0x93, 0x1d, 0x10, 0x78, 0x9e, 0xcf, 0x00, 0x40, 0x93, 0x07, 0x00, 0x78, - 0x93, 0x81, 0x60, 0x13, 0x19, 0x00, 0x00, 0x78, 0x93, 0x0f, 0x10, 0x78, - 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, 0x61, 0x06, 0x10, 0x78, 0x9e, 0x15, - 0x60, 0x07, 0x00, 0x06, 0x00, 0x78, 0x94, 0xa3, 0x60, 0x07, 0x00, 0x07, - 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, 0xa4, 0x2c, 0x00, 0xc0, 0x96, 0x74, - 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, 0x0d, 0x7e, 0x66, 0x18, - 0x26, 0x68, 0x6e, 0x04, 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, - 0x00, 0xc8, 0x93, 0x46, 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x44, 0xee, - 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x93, 0x63, 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x93, 0x63, 0x6e, 0x04, - 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, 0x93, 0x63, - 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x93, 0x63, 0xa6, 0x86, 0x00, 0x05, - 0x00, 0x40, 0x93, 0x63, 0x0d, 0x7f, 0x00, 0x78, 0x93, 0x81, 0x10, 0x78, - 0x9f, 0x35, 0x00, 0xc0, 0x93, 0x7c, 0xa6, 0x86, 0x00, 0x06, 0x00, 0xc0, - 0x93, 0x75, 0x02, 0x7e, 0x62, 0x18, 0xa2, 0x90, 0x00, 0x28, 0x22, 0x14, - 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x28, 0xc8, 0x02, 0x7f, 0x10, 0x78, - 0x46, 0x49, 0x60, 0x07, 0x00, 0x0a, 0x0d, 0x7f, 0x00, 0x78, 0x94, 0xa3, - 0x60, 0x07, 0x00, 0x0b, 0x0d, 0x7f, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, - 0x28, 0x80, 0x60, 0x07, 0x00, 0x01, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, - 0xa4, 0x2c, 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, - 0x96, 0x74, 0x66, 0x18, 0x0d, 0x7e, 0x26, 0x68, 0x6e, 0x04, 0x0d, 0x7f, - 0xa6, 0x86, 0x07, 0x07, 0x00, 0x40, 0x93, 0x81, 0x02, 0x7e, 0x62, 0x18, - 0xa2, 0x90, 0x00, 0x28, 0x22, 0x14, 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, - 0x28, 0xc8, 0x02, 0x7f, 0x60, 0x07, 0x00, 0x0c, 0x00, 0x78, 0x94, 0xa3, - 0x10, 0x78, 0x49, 0x67, 0x00, 0xc0, 0x93, 0xb3, 0x20, 0x01, 0xa7, 0x33, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, 0x00, 0x08, 0x00, 0xc0, - 0x93, 0xbb, 0x60, 0x07, 0x00, 0x09, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, - 0x00, 0x00, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, 0x49, 0x57, 0x66, 0x18, - 0xa6, 0xb0, 0x00, 0x01, 0x26, 0x34, 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, - 0x00, 0x06, 0x00, 0x48, 0x93, 0xff, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, - 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x93, 0xd2, 0xa6, 0x86, 0x00, 0x06, - 0x00, 0xc0, 0x93, 0x81, 0x10, 0x78, 0x9f, 0x44, 0x00, 0xc0, 0x93, 0xda, - 0x60, 0x07, 0x00, 0x0e, 0x00, 0x78, 0x94, 0xa3, 0x04, 0x7e, 0x64, 0x18, - 0xa4, 0xa0, 0x00, 0x28, 0x24, 0x24, 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, - 0x04, 0x7e, 0x10, 0x78, 0x28, 0x80, 0x04, 0x7f, 0x01, 0x7e, 0xa0, 0x06, - 0x20, 0x09, 0xa7, 0x53, 0x21, 0x0c, 0xd1, 0xa4, 0x00, 0x40, 0x93, 0xf9, - 0x20, 0x09, 0x00, 0x29, 0x10, 0x78, 0xa2, 0x2d, 0x60, 0x18, 0x0d, 0x7e, - 0x20, 0x68, 0x68, 0x00, 0xc0, 0xe5, 0x68, 0x02, 0x0d, 0x7f, 0x01, 0x7f, - 0x04, 0x7f, 0x60, 0x07, 0x00, 0x01, 0x00, 0x78, 0x94, 0xa3, 0x20, 0x01, - 0x00, 0x01, 0x10, 0x78, 0x44, 0xee, 0x15, 0x7e, 0x01, 0x7e, 0x02, 0x7e, - 0x03, 0x7e, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0xa7, 0x05, 0x20, 0x11, - 0xac, 0x90, 0x10, 0x78, 0x80, 0xde, 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, - 0x15, 0x7f, 0xa0, 0x05, 0x00, 0x40, 0x94, 0x1f, 0xa6, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, 0x93, 0xd2, 0x00, 0x78, - 0x93, 0x81, 0x60, 0x13, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x00, 0x78, - 0x94, 0xa3, 0x10, 0x78, 0x49, 0x67, 0x00, 0xc0, 0x94, 0x32, 0x20, 0x01, - 0xa7, 0x33, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, 0x00, 0x08, - 0x00, 0xc0, 0x94, 0x3a, 0x60, 0x07, 0x00, 0x09, 0x60, 0x2b, 0x00, 0x09, - 0x60, 0x13, 0x00, 0x00, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, 0x49, 0x57, - 0x66, 0x18, 0xa6, 0xb0, 0x00, 0x01, 0x26, 0x34, 0xa6, 0x84, 0x00, 0xff, - 0xa0, 0x82, 0x00, 0x06, 0x00, 0x48, 0x94, 0x82, 0xa6, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x94, 0x51, 0xa6, 0x86, - 0x00, 0x06, 0x00, 0xc0, 0x93, 0x81, 0x10, 0x78, 0x9f, 0x6f, 0x00, 0xc0, - 0x94, 0x5d, 0x10, 0x78, 0x9e, 0x60, 0x00, 0xc0, 0x94, 0x5d, 0x60, 0x07, - 0x00, 0x10, 0x00, 0x78, 0x94, 0xa3, 0x04, 0x7e, 0x64, 0x18, 0xa4, 0xa0, - 0x00, 0x28, 0x24, 0x24, 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, 0x04, 0x7e, - 0x10, 0x78, 0x28, 0x80, 0x04, 0x7f, 0x01, 0x7e, 0xa0, 0x06, 0x20, 0x09, - 0xa7, 0x53, 0x21, 0x0c, 0xd1, 0xa4, 0x00, 0x40, 0x94, 0x7c, 0x20, 0x09, - 0x00, 0x29, 0x10, 0x78, 0xa2, 0x2d, 0x60, 0x18, 0x0d, 0x7e, 0x20, 0x68, - 0x68, 0x00, 0xc0, 0xe5, 0x68, 0x02, 0x0d, 0x7f, 0x01, 0x7f, 0x04, 0x7f, - 0x60, 0x07, 0x00, 0x01, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, 0xa0, 0xaf, - 0x00, 0x40, 0x94, 0x8f, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x94, 0x51, 0x00, 0x78, 0x93, 0x81, 0x60, 0x13, - 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, - 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0xa4, 0x2c, 0x00, 0xc0, - 0x96, 0x74, 0x10, 0x78, 0x96, 0x77, 0x00, 0xc0, 0x93, 0x81, 0x60, 0x07, - 0x00, 0x12, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x7c, - 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, - 0x00, 0x78, 0x94, 0xa7, 0x60, 0x07, 0x00, 0x05, 0x00, 0x78, 0x94, 0xaa, - 0x10, 0x78, 0xa4, 0x2c, 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x29, 0xbb, - 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x96, 0x77, 0x00, 0xc0, 0x93, 0x81, - 0x60, 0x07, 0x00, 0x20, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, - 0x00, 0x7c, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, 0x60, 0x07, - 0x00, 0x23, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x00, 0x7c, - 0x10, 0x78, 0xa4, 0x2c, 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x29, 0xbb, - 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x96, 0x77, 0x00, 0xc0, 0x93, 0x81, - 0x01, 0x7e, 0x02, 0x7e, 0x20, 0x11, 0xac, 0x90, 0x22, 0x14, 0x2c, 0x08, - 0xa0, 0x06, 0x10, 0x78, 0xa1, 0xf6, 0x00, 0xc0, 0x94, 0xf9, 0x21, 0x60, - 0x60, 0x07, 0x00, 0x26, 0x60, 0x13, 0x17, 0x00, 0x20, 0x11, 0xac, 0x89, - 0x22, 0x14, 0xa2, 0x96, 0xff, 0xff, 0x00, 0xc0, 0x95, 0x03, 0x60, 0x07, - 0x00, 0x25, 0x00, 0x78, 0x95, 0x03, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x24, - 0x00, 0xc0, 0x95, 0x00, 0x10, 0x78, 0x77, 0x2d, 0x21, 0x60, 0x60, 0x07, - 0x00, 0x25, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0xd7, 0x02, 0x7f, - 0x01, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, - 0x61, 0x06, 0x10, 0x78, 0x96, 0x97, 0x60, 0x07, 0x00, 0x2b, 0x00, 0x78, - 0x94, 0xa3, 0x60, 0x07, 0x00, 0x2c, 0x00, 0x78, 0x94, 0xa3, 0x10, 0x78, - 0xa4, 0x2c, 0x00, 0xc0, 0x96, 0x74, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, - 0x96, 0x74, 0x10, 0x78, 0x96, 0x77, 0x00, 0xc0, 0x93, 0x81, 0x61, 0x06, - 0x10, 0x78, 0x96, 0x9c, 0x00, 0xc0, 0x95, 0x2e, 0x60, 0x07, 0x00, 0x2e, - 0x00, 0x78, 0x94, 0xa3, 0x60, 0x07, 0x00, 0x2f, 0x00, 0x78, 0x94, 0xa3, - 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, 0x96, 0x74, 0x0e, 0x7e, 0x0d, 0x7e, - 0x0c, 0x7e, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x0c, 0xa1, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, 0x95, 0x4f, 0xa1, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0x86, 0x00, 0x06, 0x00, 0x40, 0x95, 0x4f, - 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x78, 0x94, 0xa8, 0x20, 0x01, - 0xa7, 0x72, 0x20, 0x04, 0xd0, 0xe4, 0x00, 0x40, 0x95, 0xbb, 0x20, 0x71, - 0xac, 0x8c, 0x70, 0x10, 0x60, 0x36, 0x70, 0x14, 0x60, 0x3a, 0x71, 0x08, - 0x72, 0x0c, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x00, 0x40, - 0x95, 0x6d, 0x60, 0x18, 0x20, 0x68, 0x68, 0x10, 0xa1, 0x06, 0x00, 0xc0, - 0x95, 0x6d, 0x68, 0x14, 0xa2, 0x06, 0x00, 0x40, 0x95, 0x91, 0x20, 0x01, - 0xa7, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x00, 0xc0, 0x95, 0xaf, 0x20, 0x69, - 0xa7, 0x00, 0x68, 0x70, 0xa2, 0x06, 0x00, 0xc0, 0x95, 0xaf, 0x68, 0x6c, - 0xa1, 0x06, 0x00, 0xc0, 0x95, 0xaf, 0x72, 0x10, 0x10, 0x78, 0x8d, 0x02, - 0x00, 0x40, 0x95, 0xb5, 0x10, 0x78, 0xa2, 0x9e, 0x00, 0x40, 0x95, 0xb5, - 0x62, 0x2a, 0x60, 0x07, 0x00, 0x36, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0x8a, 0x0c, 0x7f, 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x72, 0x14, - 0xa2, 0x86, 0xff, 0xff, 0x00, 0x40, 0x95, 0xa3, 0x10, 0x78, 0x8d, 0x02, - 0x00, 0x40, 0x95, 0xb5, 0xa2, 0x80, 0x00, 0x02, 0x20, 0x04, 0x71, 0x10, - 0xa1, 0x06, 0x00, 0xc0, 0x95, 0xb5, 0x00, 0x78, 0x95, 0x7e, 0x72, 0x10, - 0x2c, 0x08, 0xa0, 0x85, 0x00, 0x01, 0x10, 0x78, 0xa1, 0xf6, 0x2c, 0x10, - 0x21, 0x60, 0x00, 0x40, 0x95, 0xb5, 0x00, 0x78, 0x95, 0x7e, 0x60, 0x07, - 0x00, 0x37, 0x60, 0x13, 0x15, 0x00, 0x00, 0x78, 0x95, 0x89, 0x60, 0x07, - 0x00, 0x37, 0x60, 0x13, 0x17, 0x00, 0x00, 0x78, 0x95, 0x89, 0x60, 0x07, - 0x00, 0x12, 0x00, 0x78, 0x95, 0x89, 0x10, 0x78, 0x29, 0xbb, 0x00, 0xc0, - 0x96, 0x74, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0x86, 0x00, 0x06, 0x00, 0xc0, 0x94, 0xa8, - 0x0e, 0x7e, 0x0d, 0x7e, 0x0c, 0x7e, 0x20, 0x01, 0xa7, 0x72, 0x20, 0x04, - 0xd0, 0xe4, 0x00, 0x40, 0x96, 0x31, 0x20, 0x69, 0xa7, 0x00, 0x20, 0x71, - 0xac, 0x8c, 0x70, 0x08, 0x60, 0x36, 0x72, 0x0c, 0x62, 0x3a, 0xa2, 0x86, - 0xff, 0xff, 0x00, 0xc0, 0x95, 0xee, 0x72, 0x08, 0x0c, 0x7e, 0x2c, 0x08, - 0xa0, 0x85, 0x00, 0x01, 0x10, 0x78, 0xa1, 0xf6, 0x2c, 0x10, 0x0c, 0x7f, - 0x00, 0x40, 0x96, 0x25, 0x10, 0x78, 0x8d, 0x02, 0x00, 0x40, 0x96, 0x25, - 0x0c, 0x7e, 0x02, 0x7e, 0x22, 0x60, 0x10, 0x78, 0x8a, 0x03, 0x02, 0x7f, - 0x0c, 0x7f, 0x71, 0x18, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, - 0x00, 0x01, 0x00, 0x40, 0x96, 0x0f, 0xa1, 0x86, 0x00, 0x05, 0x00, 0x40, - 0x96, 0x09, 0xa1, 0x86, 0x00, 0x07, 0x00, 0xc0, 0x96, 0x19, 0xa2, 0x80, - 0x00, 0x04, 0x20, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x96, 0x19, 0x05, 0x7e, - 0x75, 0x10, 0x76, 0x14, 0x10, 0x78, 0xa2, 0xb3, 0x05, 0x7f, 0x0c, 0x7f, - 0x0d, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, - 0x00, 0x09, 0x60, 0x13, 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0x8a, 0x00, 0x78, 0x96, 0x15, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, - 0x00, 0x09, 0x60, 0x13, 0x17, 0x00, 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0x8a, 0x00, 0x78, 0x96, 0x15, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, - 0x00, 0x0b, 0x60, 0x13, 0x00, 0x00, 0x00, 0x78, 0x95, 0x89, 0x0e, 0x7e, - 0x02, 0x7e, 0x10, 0x78, 0x49, 0x67, 0x00, 0x40, 0x96, 0x6e, 0x10, 0x78, - 0x49, 0x57, 0x10, 0x78, 0xa4, 0xb9, 0x00, 0xc0, 0x96, 0x6c, 0x20, 0x71, - 0xa7, 0x00, 0x70, 0xcc, 0xc0, 0x85, 0x70, 0xce, 0x0f, 0x7e, 0x20, 0x79, - 0x01, 0x00, 0x72, 0x98, 0xa2, 0x84, 0x00, 0xff, 0x70, 0x6e, 0x78, 0xe6, - 0xa2, 0x84, 0xff, 0x00, 0x72, 0x70, 0xa2, 0x05, 0x70, 0x72, 0x78, 0xea, - 0x0f, 0x7f, 0x70, 0xd7, 0x00, 0x00, 0x20, 0x01, 0xa7, 0x53, 0x20, 0x04, - 0xd0, 0xa4, 0x00, 0x40, 0x96, 0x65, 0x20, 0x11, 0xa9, 0xca, 0x20, 0x13, - 0x07, 0xd0, 0xd0, 0xac, 0x00, 0xc0, 0x96, 0x6e, 0x10, 0x78, 0x26, 0x77, - 0x00, 0x78, 0x96, 0x6e, 0x10, 0x78, 0xa4, 0xe9, 0x02, 0x7f, 0x0e, 0x7f, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x94, 0xa7, 0x10, 0x78, 0x77, 0x2d, - 0x00, 0x7c, 0x0d, 0x7e, 0x06, 0x7e, 0x66, 0x18, 0x26, 0x68, 0x6e, 0x04, - 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x96, 0x94, 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x96, 0x94, 0x6e, 0x04, - 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, 0x96, 0x94, - 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x96, 0x94, 0xa0, 0x85, 0x00, 0x01, - 0x06, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x10, 0x78, 0x96, 0xcb, - 0x0d, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x10, 0x78, 0x96, 0xda, 0x00, 0xc0, - 0x96, 0xc4, 0x68, 0x0c, 0xa0, 0x8c, 0xff, 0x00, 0x68, 0x20, 0xa0, 0x84, - 0x00, 0xff, 0xa1, 0x15, 0x62, 0x12, 0x68, 0x24, 0x60, 0x2a, 0xd1, 0xe4, - 0x00, 0x40, 0x96, 0xb2, 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, 0x96, 0xc0, - 0xd1, 0xec, 0x00, 0x40, 0x96, 0xc4, 0x69, 0x20, 0xa1, 0x8c, 0x00, 0xff, - 0x68, 0x24, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x96, 0xc4, 0x21, 0x10, - 0x20, 0x09, 0x00, 0x00, 0x10, 0x78, 0x28, 0xc8, 0x00, 0x78, 0x96, 0xc8, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x96, 0xc9, 0xa0, 0x06, 0x0d, 0x7f, - 0x00, 0x7c, 0x20, 0x69, 0xac, 0x8d, 0x68, 0x00, 0xa0, 0x82, 0x00, 0x10, - 0x00, 0xc8, 0x96, 0xd8, 0x60, 0x13, 0x00, 0x00, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x78, 0x96, 0xd9, 0xa0, 0x06, 0x00, 0x7c, 0x60, 0x13, 0x00, 0x00, - 0x20, 0x69, 0xac, 0x8c, 0x68, 0x08, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, - 0x08, 0x00, 0x00, 0xc0, 0x96, 0xee, 0x68, 0x00, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x8e, 0x00, 0x14, 0x00, 0x40, 0x96, 0xee, 0xa0, 0x8e, 0x00, 0x10, - 0x00, 0x7c, 0x60, 0x04, 0xa0, 0xb2, 0x00, 0x44, 0x10, 0xc8, 0x13, 0x32, - 0xa1, 0xb6, 0x00, 0x13, 0x00, 0xc0, 0x96, 0xfb, 0x20, 0x08, 0x00, 0x79, - 0x97, 0x0e, 0xa1, 0xb6, 0x00, 0x27, 0x00, 0x40, 0x97, 0x03, 0xa1, 0xb6, - 0x00, 0x14, 0x10, 0xc0, 0x13, 0x32, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, - 0x45, 0x35, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0x97, 0x4e, 0x97, 0x50, 0x97, 0x4e, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0x50, 0x97, 0x5c, 0x97, 0xe6, 0x97, 0xa9, 0x97, 0xe6, - 0x97, 0xbd, 0x97, 0xe6, 0x97, 0x5c, 0x97, 0xe6, 0x97, 0xde, 0x97, 0xe6, - 0x97, 0xde, 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x50, 0x97, 0x4e, 0x97, 0xe6, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0xe6, 0x97, 0x4e, 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, - 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, - 0x97, 0x4e, 0x97, 0x50, 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, 0x97, 0x4e, - 0x97, 0xe6, 0x97, 0xe6, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, 0x97, 0x4e, - 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, 0x20, 0x01, 0xa9, 0xa2, - 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x02, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x78, 0x97, 0xec, 0x0f, 0x7e, 0x20, 0x79, 0xa7, 0x52, 0x78, 0x04, - 0x0f, 0x7f, 0xd0, 0xac, 0x00, 0xc0, 0x97, 0xe6, 0x20, 0x01, 0x00, 0x00, - 0x10, 0x78, 0x44, 0xee, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x04, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0xff, 0x00, 0x40, 0x97, 0xe6, 0x0c, 0x7e, 0x60, 0x18, - 0x20, 0x60, 0x60, 0x00, 0xd0, 0xf4, 0x00, 0xc0, 0x97, 0x80, 0x60, 0x10, - 0xa0, 0x05, 0x00, 0x40, 0x97, 0x80, 0x0c, 0x7f, 0x10, 0x78, 0x36, 0x99, - 0x00, 0x78, 0x97, 0xe6, 0x0c, 0x7f, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, 0x97, 0x8f, 0x0f, 0x7e, 0x20, 0x79, - 0xa7, 0x00, 0x78, 0x90, 0x80, 0x00, 0x78, 0x92, 0x0f, 0x7f, 0x20, 0x01, - 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x10, 0x78, 0x61, 0xcd, 0x60, 0x1f, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x10, 0x78, - 0x5d, 0xd7, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7e, 0x61, 0x18, 0x21, 0x60, - 0x20, 0x09, 0x00, 0x01, 0x10, 0x78, 0x5a, 0x52, 0x0c, 0x7f, 0x00, 0x78, - 0x97, 0xec, 0x66, 0x18, 0x0d, 0x7e, 0x26, 0x68, 0x6e, 0x04, 0x0d, 0x7f, - 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, - 0x97, 0xe6, 0xa6, 0x86, 0x00, 0x04, 0x00, 0x40, 0x97, 0xe6, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x78, 0x97, 0xe4, 0x20, 0x01, 0xa7, 0x00, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0x97, 0xc6, 0x10, 0x78, 0x36, 0x99, - 0x20, 0x01, 0x00, 0x06, 0x10, 0x78, 0x97, 0xed, 0x66, 0x18, 0x0d, 0x7e, - 0x26, 0x68, 0x6e, 0x04, 0x0d, 0x7f, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, - 0xa6, 0x86, 0x00, 0x06, 0x00, 0x40, 0x97, 0xe6, 0x20, 0x01, 0x00, 0x06, - 0x00, 0x78, 0x97, 0xe4, 0x20, 0x01, 0x00, 0x04, 0x00, 0x78, 0x97, 0xe4, - 0x20, 0x01, 0x00, 0x06, 0x10, 0x78, 0x97, 0xed, 0x00, 0x78, 0x97, 0xe6, - 0x10, 0x78, 0x45, 0x35, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x77, 0x2d, - 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x01, 0x7e, 0x0d, 0x7e, 0x61, 0x18, - 0x21, 0x68, 0x69, 0x00, 0xd1, 0x84, 0x00, 0x40, 0x98, 0x08, 0x61, 0x04, - 0xa1, 0x8e, 0x00, 0x0a, 0x00, 0xc0, 0x98, 0x00, 0x69, 0x9c, 0xd1, 0xa4, - 0x00, 0xc0, 0x98, 0x00, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x02, - 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x10, 0x78, 0x28, 0xa6, - 0x0d, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x66, 0x18, 0x26, 0x68, - 0x68, 0x04, 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0x0d, 0x7f, 0xa0, 0xb2, - 0x00, 0x0c, 0x10, 0xc8, 0x13, 0x32, 0xa1, 0xb6, 0x00, 0x15, 0x00, 0xc0, - 0x98, 0x1f, 0x10, 0x79, 0x98, 0x26, 0x00, 0x78, 0x98, 0x25, 0xa1, 0xb6, - 0x00, 0x16, 0x10, 0xc0, 0x13, 0x32, 0x10, 0x79, 0x98, 0x32, 0x00, 0x7c, - 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, - 0x98, 0x87, 0x98, 0x3e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, - 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, - 0x98, 0x87, 0x98, 0x8f, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, 0x7d, 0x4e, - 0x0f, 0x7e, 0x20, 0x79, 0xa7, 0x52, 0x78, 0x04, 0xd0, 0xac, 0x00, 0xc0, - 0x98, 0x65, 0x60, 0x18, 0xa0, 0x7d, 0x00, 0x40, 0x98, 0x65, 0x78, 0x00, - 0xd0, 0xf4, 0x00, 0xc0, 0x98, 0x51, 0x78, 0x10, 0xa0, 0x05, 0x00, 0xc0, - 0x98, 0x65, 0x20, 0x01, 0x00, 0x00, 0x10, 0x78, 0x44, 0xee, 0x20, 0x01, - 0x00, 0x02, 0x10, 0x78, 0x45, 0x02, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x10, 0x78, 0x5d, 0xd7, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x78, 0x98, 0x85, 0x20, 0x11, 0xac, 0x83, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x98, 0x85, - 0x0c, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0x40, 0x98, 0x78, 0x0c, 0x7f, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0x98, 0x85, 0x60, 0x10, 0x00, 0x7e, - 0x60, 0x14, 0x00, 0x7e, 0x10, 0x78, 0x42, 0xf8, 0x00, 0x7f, 0x60, 0x16, - 0x00, 0x7f, 0x60, 0x12, 0x0c, 0x7f, 0x10, 0x78, 0x77, 0x2d, 0x0f, 0x7f, - 0x00, 0x7c, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x1e, 0x00, 0xc0, 0x98, 0x8e, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0x10, 0x78, 0x7f, 0x8e, 0x00, 0xc0, - 0x98, 0x9b, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x10, 0x78, - 0x5d, 0xd7, 0x00, 0x78, 0x98, 0x9d, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, - 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x44, 0x10, 0xc8, 0x13, 0x32, 0x10, 0x78, - 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, 0x98, 0xae, 0x98, 0xc1, 0x98, 0xc1, - 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc3, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, - 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, - 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x98, 0xc1, 0x10, 0x78, - 0x13, 0x32, 0x0d, 0x7e, 0x0e, 0x7e, 0x0f, 0x7e, 0x15, 0x7e, 0x04, 0x7e, - 0x02, 0x7e, 0x62, 0x18, 0xa2, 0x80, 0x00, 0x2b, 0x20, 0x04, 0xa0, 0x05, - 0x00, 0x40, 0x98, 0xd4, 0x20, 0x21, 0x00, 0x00, 0x10, 0x78, 0xa4, 0x82, - 0x61, 0x06, 0x20, 0x71, 0xac, 0x80, 0x74, 0x44, 0xa4, 0xa4, 0xff, 0x00, - 0x00, 0x40, 0x99, 0x2b, 0xa4, 0x86, 0x20, 0x00, 0x00, 0xc0, 0x98, 0xe6, - 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, 0x02, 0x00, 0x10, 0x78, 0x5b, 0xf1, - 0x10, 0x78, 0x13, 0x8b, 0x10, 0x40, 0x13, 0x32, 0x60, 0x03, 0x00, 0x07, - 0x2d, 0x00, 0x68, 0x37, 0x01, 0x0d, 0x68, 0x03, 0x00, 0x00, 0x68, 0x3b, - 0x00, 0x00, 0x6c, 0x5a, 0x2c, 0x00, 0x68, 0x5e, 0x60, 0x08, 0x68, 0xb2, - 0x60, 0x18, 0x20, 0x78, 0x78, 0xa0, 0x80, 0x07, 0x71, 0x30, 0x69, 0x4a, - 0x01, 0x7e, 0xa0, 0x84, 0xff, 0x00, 0x68, 0x46, 0x68, 0x4f, 0x00, 0x00, - 0x68, 0x57, 0x00, 0x36, 0x10, 0x78, 0x4a, 0x73, 0x01, 0x7f, 0xa4, 0x86, - 0x20, 0x00, 0x00, 0xc0, 0x99, 0x13, 0x20, 0x19, 0x00, 0x17, 0x10, 0x78, - 0xa1, 0xa5, 0x00, 0x78, 0x99, 0x8d, 0xa4, 0x86, 0x04, 0x00, 0x00, 0xc0, - 0x99, 0x1d, 0x20, 0x19, 0x00, 0x02, 0x10, 0x78, 0xa1, 0x56, 0x00, 0x78, - 0x99, 0x8d, 0xa4, 0x86, 0x02, 0x00, 0x00, 0xc0, 0x99, 0x23, 0x10, 0x78, - 0xa1, 0x3b, 0xa4, 0x86, 0x10, 0x00, 0x00, 0xc0, 0x99, 0x29, 0x10, 0x78, - 0xa1, 0x8a, 0x00, 0x78, 0x99, 0x8d, 0x20, 0x69, 0xaa, 0x33, 0x6a, 0x00, - 0xd2, 0x84, 0x00, 0x40, 0x99, 0xf7, 0xa2, 0x84, 0x03, 0x00, 0x00, 0xc0, - 0x99, 0xef, 0x68, 0x04, 0xa0, 0x05, 0x00, 0x40, 0x99, 0xd5, 0x2d, 0x78, - 0x60, 0x03, 0x00, 0x07, 0x10, 0x78, 0x13, 0x70, 0x00, 0x40, 0x99, 0x94, - 0x78, 0x00, 0xd0, 0x8c, 0x00, 0xc0, 0x99, 0x47, 0x78, 0x04, 0x80, 0x01, - 0x78, 0x06, 0x60, 0x13, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x68, 0x37, - 0x01, 0x16, 0x68, 0x3b, 0x00, 0x00, 0x60, 0x08, 0x68, 0xb2, 0x2c, 0x00, - 0x68, 0x4a, 0x60, 0x18, 0x20, 0x78, 0x78, 0xa0, 0x80, 0x07, 0x71, 0x30, - 0x69, 0x86, 0x68, 0x46, 0x79, 0x28, 0x69, 0x8a, 0x79, 0x2c, 0x69, 0x8e, - 0x79, 0x30, 0x69, 0x92, 0x79, 0x34, 0x69, 0x96, 0x68, 0x53, 0x00, 0x3d, - 0x72, 0x44, 0xa2, 0x94, 0x00, 0x03, 0xa2, 0x86, 0x00, 0x02, 0x00, 0xc0, - 0x99, 0x6f, 0x68, 0x4f, 0x00, 0x40, 0x00, 0x78, 0x99, 0x79, 0xa2, 0x86, - 0x00, 0x01, 0x00, 0xc0, 0x99, 0x77, 0x68, 0x4f, 0x00, 0x80, 0x00, 0x78, - 0x99, 0x79, 0x68, 0x4f, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x0a, 0x20, 0x01, - 0xac, 0x90, 0xad, 0x90, 0x00, 0x15, 0x20, 0x0c, 0x81, 0x0f, 0x21, 0x12, - 0x80, 0x00, 0x82, 0x10, 0x00, 0xf0, 0x99, 0x7f, 0x20, 0x0c, 0x69, 0x82, - 0x80, 0x00, 0x20, 0x0c, 0x69, 0x7e, 0x10, 0x78, 0x4a, 0x73, 0x02, 0x7f, - 0x04, 0x7f, 0x15, 0x7f, 0x0f, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0x20, 0x01, 0xa7, 0x0e, 0x20, 0x04, 0xd0, 0x84, 0x00, 0x40, 0x99, 0x9e, - 0x10, 0x78, 0x13, 0x8b, 0x00, 0xc0, 0x99, 0x40, 0x60, 0x13, 0x01, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x10, 0x78, 0x5d, 0x8a, - 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x99, 0x8d, 0x20, 0x69, 0xac, 0x92, - 0x2d, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x12, 0x00, 0x00, 0xc0, - 0x99, 0xc9, 0x20, 0x69, 0xac, 0x80, 0x68, 0x6c, 0xa0, 0x84, 0x00, 0xff, - 0x01, 0x7e, 0x61, 0x10, 0xa1, 0x8c, 0x07, 0x00, 0xa1, 0x0d, 0x61, 0x12, - 0x01, 0x7f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x43, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x99, 0x8d, 0x60, 0x13, - 0x02, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x99, 0x8d, 0x20, 0x01, - 0xa7, 0x0d, 0x20, 0x04, 0xd0, 0xec, 0x00, 0x40, 0x99, 0xdf, 0x20, 0x11, - 0x80, 0x49, 0x10, 0x78, 0x36, 0x1b, 0x60, 0x13, 0x03, 0x00, 0x00, 0x78, - 0x99, 0xe5, 0x60, 0x13, 0x01, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, - 0x99, 0x8d, 0x60, 0x13, 0x05, 0x00, 0x00, 0x78, 0x99, 0xe5, 0x60, 0x13, - 0x06, 0x00, 0x00, 0x78, 0x99, 0xaa, 0x60, 0x13, 0x02, 0x00, 0x00, 0x78, - 0x99, 0xaa, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, 0x9a, 0x0d, 0x60, 0x04, - 0xa0, 0x8a, 0x00, 0x40, 0x10, 0x48, 0x13, 0x32, 0xa0, 0x8a, 0x00, 0x53, - 0x10, 0xc8, 0x13, 0x32, 0xa0, 0x82, 0x00, 0x40, 0x20, 0x08, 0x00, 0x79, - 0x9a, 0x92, 0xa1, 0x86, 0x00, 0x51, 0x00, 0x40, 0x9a, 0x1a, 0xa1, 0x86, - 0x00, 0x47, 0x00, 0xc0, 0x9a, 0x33, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x41, - 0x00, 0x40, 0x9a, 0x41, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x84, - 0x00, 0x40, 0x9a, 0x41, 0x12, 0x7e, 0x20, 0x91, 0x22, 0x00, 0x00, 0x7e, - 0x01, 0x7e, 0x02, 0x7e, 0x10, 0x78, 0x5c, 0x56, 0x02, 0x7f, 0x01, 0x7f, - 0x00, 0x7f, 0x12, 0x7f, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, - 0x9a, 0x41, 0x00, 0x78, 0x9a, 0xd7, 0xa1, 0x86, 0x00, 0x27, 0x00, 0x40, - 0x9a, 0x3b, 0xa1, 0x86, 0x00, 0x14, 0x10, 0xc0, 0x13, 0x32, 0x60, 0x04, - 0xa0, 0x82, 0x00, 0x40, 0x20, 0x08, 0x00, 0x79, 0x9a, 0x44, 0x10, 0x78, - 0x77, 0x73, 0x00, 0x7c, 0x9a, 0x57, 0x9a, 0x59, 0x9a, 0x59, 0x9a, 0x81, - 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, - 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, - 0x9a, 0x57, 0x9a, 0x57, 0x9a, 0x57, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, - 0x61, 0xcd, 0x10, 0x78, 0x62, 0xd1, 0x03, 0x7e, 0x0d, 0x7e, 0x60, 0x10, - 0xa0, 0x6d, 0x00, 0x40, 0x9a, 0x7e, 0xad, 0x84, 0xf0, 0x00, 0x00, 0x40, - 0x9a, 0x7e, 0x60, 0x03, 0x00, 0x02, 0x60, 0x18, 0x20, 0x04, 0xd0, 0xbc, - 0x00, 0xc0, 0x9a, 0x7e, 0x20, 0x19, 0x00, 0x04, 0x10, 0x78, 0xa1, 0xda, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x14, 0xa0, 0x05, 0x00, 0xc0, 0x9a, 0x7c, - 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x07, - 0x0d, 0x7f, 0x03, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x62, 0xd1, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0x9a, 0x8e, - 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x13, 0xa4, 0x10, 0x78, 0x8e, 0xd6, - 0x0d, 0x7f, 0x00, 0x7c, 0x9a, 0xa5, 0x9a, 0xc4, 0x9a, 0xae, 0x9a, 0xd1, - 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, - 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, - 0x9a, 0xa5, 0x9a, 0xa5, 0x9a, 0xa5, 0x10, 0x78, 0x13, 0x32, 0x60, 0x10, - 0xa0, 0x88, 0x00, 0x13, 0x21, 0x04, 0xa0, 0x85, 0x04, 0x00, 0x20, 0x0a, - 0x10, 0x78, 0x61, 0xcd, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, - 0xd0, 0xb4, 0x00, 0x40, 0x9a, 0xbf, 0x60, 0x03, 0x00, 0x07, 0x20, 0x09, - 0x00, 0x43, 0x10, 0x78, 0x77, 0x5c, 0x00, 0x78, 0x9a, 0xc1, 0x60, 0x03, - 0x00, 0x02, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0xa4, 0x33, 0x00, 0xc0, 0x9a, 0xce, 0x10, 0x78, 0x5b, 0xc1, - 0x10, 0x78, 0x77, 0x2d, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, - 0x61, 0xcd, 0x20, 0x09, 0x00, 0x41, 0x00, 0x78, 0x9c, 0x2e, 0xa1, 0x82, - 0x00, 0x40, 0x00, 0x79, 0x9a, 0xdb, 0x9a, 0xee, 0x9a, 0xf0, 0x9a, 0xee, - 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xf1, 0x9a, 0xee, - 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xee, - 0x9a, 0xee, 0x9a, 0xee, 0x9a, 0xfc, 0x9a, 0xee, 0x10, 0x78, 0x13, 0x32, - 0x00, 0x7c, 0x60, 0x03, 0x00, 0x04, 0x61, 0x10, 0x20, 0xe1, 0x00, 0x05, - 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x10, 0x78, 0x15, 0xfa, 0x00, 0x7c, - 0x0d, 0x7e, 0x10, 0x78, 0x5b, 0xc1, 0x0d, 0x7f, 0x10, 0x78, 0xa4, 0xa5, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, - 0x9b, 0x09, 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1c, - 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1e, 0x9b, 0x1c, 0x9b, 0x21, 0x9b, 0x4c, - 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x1c, 0x9b, 0x4c, 0x9b, 0x1c, - 0x9b, 0x1c, 0x9b, 0x1c, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x77, 0x73, - 0x00, 0x7c, 0x10, 0x78, 0x62, 0x7a, 0x10, 0x78, 0x63, 0x9b, 0x60, 0x10, - 0x0d, 0x7e, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, 0x00, 0x40, 0x9b, 0x37, - 0xa0, 0x8c, 0x00, 0x03, 0xa1, 0x8e, 0x00, 0x02, 0x00, 0x40, 0x9b, 0x3f, - 0x20, 0x09, 0x00, 0x41, 0x0d, 0x7f, 0x00, 0x78, 0x9c, 0x2e, 0x60, 0x03, - 0x00, 0x07, 0x60, 0x17, 0x00, 0x00, 0x10, 0x78, 0x5b, 0xc1, 0x0d, 0x7f, - 0x00, 0x7c, 0x10, 0x78, 0xa4, 0x33, 0x00, 0x40, 0x9b, 0x45, 0x0d, 0x7f, - 0x00, 0x7c, 0x10, 0x78, 0x5b, 0xc1, 0x10, 0x78, 0x77, 0x2d, 0x0d, 0x7f, - 0x00, 0x78, 0x9b, 0x3e, 0x03, 0x7e, 0x10, 0x78, 0x62, 0x7a, 0x10, 0x78, - 0x63, 0x9b, 0x60, 0x10, 0x0d, 0x7e, 0x20, 0x68, 0x60, 0x18, 0x20, 0x04, - 0xd0, 0xbc, 0x00, 0x40, 0x9b, 0x6c, 0x68, 0x4c, 0xa0, 0x84, 0x00, 0x03, - 0xa0, 0x86, 0x00, 0x02, 0x00, 0x40, 0x9b, 0x68, 0x68, 0x7c, 0x63, 0x2c, - 0xa3, 0x1a, 0x63, 0x2e, 0x68, 0x80, 0x63, 0x28, 0xa3, 0x1b, 0x63, 0x2a, - 0x60, 0x03, 0x00, 0x02, 0x00, 0x78, 0x9b, 0x7d, 0x20, 0x19, 0x00, 0x04, - 0x10, 0x78, 0xa1, 0xda, 0x60, 0x14, 0xa0, 0x05, 0x00, 0xc0, 0x9b, 0x79, - 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, 0x80, 0x03, 0x60, 0x16, 0x60, 0x13, - 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, 0x0d, 0x7f, 0x03, 0x7f, 0x00, 0x7c, - 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, 0x9b, 0x8e, 0x60, 0x04, 0xa0, 0x86, - 0x00, 0x42, 0x10, 0xc0, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x27, 0x00, 0x40, 0x9b, 0x96, - 0xa1, 0x86, 0x00, 0x14, 0x00, 0xc0, 0x9b, 0xa6, 0x60, 0x04, 0xa0, 0x86, - 0x00, 0x42, 0x10, 0xc0, 0x13, 0x32, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, - 0x45, 0x35, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x79, 0x9b, 0xaa, - 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, - 0x9b, 0xbd, 0x9b, 0xbf, 0x9b, 0xcb, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, - 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, 0x9b, 0xbd, - 0x9b, 0xbd, 0x10, 0x78, 0x13, 0x32, 0x03, 0x7e, 0x04, 0x7e, 0x20, 0xe1, - 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x10, 0x78, 0x15, 0xfa, - 0x04, 0x7f, 0x03, 0x7f, 0x00, 0x7c, 0x60, 0x10, 0x0d, 0x7e, 0x20, 0x68, - 0x68, 0x10, 0x6a, 0x14, 0x61, 0x18, 0x21, 0x0c, 0xd1, 0xbc, 0x00, 0x40, - 0x9b, 0xea, 0x61, 0x24, 0xd1, 0xf4, 0x00, 0xc0, 0x9b, 0xea, 0x00, 0x7e, - 0x04, 0x7e, 0x05, 0x7e, 0x6c, 0x7c, 0xa4, 0x22, 0x6d, 0x80, 0x22, 0x00, - 0xa5, 0x2b, 0x60, 0x2c, 0xa4, 0x20, 0x64, 0x2e, 0x60, 0x28, 0xa5, 0x29, - 0x65, 0x2a, 0x05, 0x7f, 0x04, 0x7f, 0x00, 0x7f, 0xa2, 0x0d, 0x00, 0xc0, - 0x9b, 0xfe, 0x68, 0x4c, 0xd0, 0xfc, 0x00, 0x40, 0x9b, 0xf6, 0x20, 0x09, - 0x00, 0x41, 0x0d, 0x7f, 0x00, 0x78, 0x9c, 0x2e, 0x60, 0x03, 0x00, 0x07, - 0x60, 0x17, 0x00, 0x00, 0x10, 0x78, 0x5b, 0xc1, 0x0d, 0x7f, 0x00, 0x7c, - 0x00, 0x7e, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x63, 0x0f, 0x7f, - 0x00, 0x7f, 0x00, 0x40, 0x9c, 0x0b, 0x60, 0x03, 0x00, 0x02, 0x0d, 0x7f, - 0x00, 0x7c, 0x20, 0x09, 0xa7, 0x0d, 0x21, 0x0c, 0xd1, 0x9c, 0x00, 0x40, - 0x9c, 0x15, 0x60, 0x03, 0x00, 0x07, 0x00, 0x78, 0x9c, 0x17, 0x60, 0x03, - 0x00, 0x06, 0x10, 0x78, 0x9c, 0x1d, 0x10, 0x78, 0x5b, 0xc3, 0x0d, 0x7f, - 0x00, 0x7c, 0xd2, 0xfc, 0x00, 0x40, 0x9c, 0x29, 0x80, 0x02, 0x80, 0x00, - 0x82, 0x12, 0xa2, 0x91, 0x00, 0x00, 0x20, 0x09, 0x00, 0x09, 0x00, 0x78, - 0x9c, 0x2b, 0x20, 0x09, 0x00, 0x15, 0x6a, 0x6a, 0x68, 0x66, 0x00, 0x7c, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x48, 0x9c, 0x34, 0x00, 0x79, 0x9c, 0x41, - 0xa1, 0x86, 0x00, 0x13, 0x00, 0x40, 0x9c, 0x3c, 0xa1, 0x86, 0x00, 0x14, - 0x10, 0xc0, 0x13, 0x32, 0x60, 0x24, 0xd0, 0xdc, 0x10, 0x40, 0x13, 0x32, - 0x00, 0x7c, 0x9c, 0x54, 0x9c, 0x5b, 0x9c, 0x67, 0x9c, 0x73, 0x9c, 0x54, - 0x9c, 0x54, 0x9c, 0x54, 0x9c, 0x82, 0x9c, 0x54, 0x9c, 0x56, 0x9c, 0x56, - 0x9c, 0x54, 0x9c, 0x54, 0x9c, 0x54, 0x9c, 0x54, 0x9c, 0x54, 0x9c, 0x54, - 0x9c, 0x54, 0x9c, 0x54, 0x10, 0x78, 0x13, 0x32, 0x60, 0x24, 0xd0, 0xdc, - 0x10, 0x40, 0x13, 0x32, 0x00, 0x7c, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x10, 0x78, 0x5d, 0x8a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x10, 0x78, 0x5d, 0x8a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x10, 0x78, - 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, - 0x2c, 0x10, 0x10, 0x78, 0x1c, 0xf0, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x10, 0x78, 0x5d, 0xf6, 0x10, 0x78, 0x63, 0x9b, 0x12, 0x7f, 0x00, 0x7c, - 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, 0x00, 0x7c, 0x12, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x03, 0x7e, 0x0d, 0x7e, 0xa1, 0x82, 0x00, 0x40, 0x10, 0x79, - 0x9c, 0x93, 0x0d, 0x7f, 0x03, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x9c, 0xa3, - 0x9c, 0xa5, 0x9c, 0xba, 0x9c, 0xd9, 0x9c, 0xa3, 0x9c, 0xa3, 0x9c, 0xa3, - 0x9c, 0xf1, 0x9c, 0xa3, 0x9c, 0xa3, 0x9c, 0xa3, 0x9c, 0xa3, 0x9c, 0xa3, - 0x9c, 0xa3, 0x9c, 0xa3, 0x9c, 0xa3, 0x10, 0x78, 0x13, 0x32, 0x60, 0x10, - 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, 0x00, 0x40, 0x9c, 0xcf, 0xa0, 0x9c, - 0x00, 0x03, 0xa3, 0x9e, 0x00, 0x03, 0x00, 0x40, 0x9c, 0xcf, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x78, 0x9c, 0xf4, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, - 0x00, 0x40, 0x9c, 0xcf, 0xa0, 0x9c, 0x00, 0x03, 0xa3, 0x9e, 0x00, 0x03, - 0x00, 0x40, 0x9c, 0xcf, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x10, 0x78, - 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x78, 0x9c, 0xf4, 0x60, 0x13, - 0x00, 0x00, 0x60, 0x17, 0x00, 0x00, 0x20, 0x19, 0x00, 0x04, 0x10, 0x78, - 0xa1, 0xda, 0x00, 0x78, 0x9c, 0xf4, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, - 0xd0, 0xfc, 0x00, 0x40, 0x9c, 0xcf, 0xa0, 0x9c, 0x00, 0x03, 0xa3, 0x9e, - 0x00, 0x03, 0x00, 0x40, 0x9c, 0xcf, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, - 0x2c, 0x10, 0x10, 0x78, 0x1c, 0xf0, 0x10, 0x78, 0x5d, 0xf6, 0x10, 0x78, - 0x63, 0x9b, 0x00, 0x78, 0x9c, 0xf4, 0xa0, 0x16, 0x10, 0x78, 0x15, 0xfa, - 0x00, 0x7c, 0x10, 0x78, 0x61, 0xcd, 0x61, 0x10, 0x81, 0xff, 0x00, 0x40, - 0x9d, 0x06, 0x0d, 0x7e, 0x21, 0x68, 0x10, 0x78, 0xa4, 0xf2, 0x03, 0x7e, - 0x20, 0x19, 0x00, 0x29, 0x10, 0x78, 0xa1, 0xda, 0x03, 0x7f, 0x0d, 0x7f, - 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0x10, 0x78, - 0x62, 0x7a, 0x61, 0x10, 0x81, 0xff, 0x00, 0x40, 0x9d, 0x1c, 0x0d, 0x7e, - 0x21, 0x68, 0x10, 0x78, 0xa4, 0xf2, 0x03, 0x7e, 0x20, 0x19, 0x00, 0x29, - 0x10, 0x78, 0xa1, 0xda, 0x03, 0x7f, 0x0d, 0x7f, 0x10, 0x78, 0x8e, 0xd6, - 0x10, 0x78, 0x63, 0x9b, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x85, 0x00, 0x79, - 0x9d, 0x25, 0x9d, 0x2e, 0x9d, 0x2c, 0x9d, 0x2c, 0x9d, 0x3a, 0x9d, 0x2c, - 0x9d, 0x2c, 0x9d, 0x2c, 0x10, 0x78, 0x13, 0x32, 0x60, 0x03, 0x00, 0x0b, - 0x61, 0x06, 0x10, 0x78, 0x5d, 0x8a, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x10, 0x78, 0x62, 0xd1, 0x12, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x0e, 0x7e, - 0x10, 0x78, 0xa4, 0x2c, 0x00, 0x40, 0x9d, 0x44, 0x10, 0x78, 0x77, 0x2d, - 0x00, 0x78, 0x9d, 0x60, 0x20, 0x71, 0xac, 0x80, 0x72, 0x24, 0x62, 0x12, - 0x72, 0x20, 0x10, 0x78, 0xa0, 0x79, 0x00, 0x40, 0x9d, 0x51, 0x60, 0x07, - 0x00, 0x86, 0x00, 0x78, 0x9d, 0x5a, 0x60, 0x07, 0x00, 0x87, 0x72, 0x24, - 0xa2, 0x96, 0xff, 0xff, 0x00, 0xc0, 0x9d, 0x5a, 0x60, 0x07, 0x00, 0x86, - 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x0e, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, - 0x9d, 0x74, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x85, 0x10, 0x48, 0x13, 0x32, - 0xa0, 0x8a, 0x00, 0x8c, 0x10, 0xc8, 0x13, 0x32, 0xa0, 0x82, 0x00, 0x85, - 0x00, 0x79, 0x9d, 0x8b, 0xa1, 0x86, 0x00, 0x27, 0x00, 0x40, 0x9d, 0x80, - 0xa1, 0x86, 0x00, 0x14, 0x00, 0x40, 0x9d, 0x80, 0x10, 0x78, 0x77, 0x73, - 0x00, 0x78, 0x9d, 0x8a, 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x35, - 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, - 0x00, 0x7c, 0x9d, 0x92, 0x9d, 0x94, 0x9d, 0x94, 0x9d, 0x92, 0x9d, 0x92, - 0x9d, 0x92, 0x9d, 0x92, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, - 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x82, - 0x00, 0x85, 0x10, 0x48, 0x13, 0x32, 0xa1, 0x82, 0x00, 0x8c, 0x10, 0xc8, - 0x13, 0x32, 0xa1, 0x82, 0x00, 0x85, 0x00, 0x79, 0x9d, 0xa7, 0x9d, 0xae, - 0x9d, 0xae, 0x9d, 0xae, 0x9d, 0xb0, 0x9d, 0xae, 0x9d, 0xae, 0x9d, 0xae, - 0x10, 0x78, 0x13, 0x32, 0x00, 0x7c, 0xa1, 0x86, 0x00, 0x13, 0x00, 0x40, - 0x9d, 0xc1, 0xa1, 0x86, 0x00, 0x14, 0x00, 0x40, 0x9d, 0xc1, 0xa1, 0x86, - 0x00, 0x27, 0x00, 0x40, 0x9d, 0xc1, 0x10, 0x78, 0x77, 0x73, 0x00, 0x78, - 0x9d, 0xc7, 0x10, 0x78, 0x61, 0xcd, 0x10, 0x78, 0x8e, 0xd6, 0x10, 0x78, - 0x62, 0xd1, 0x00, 0x7c, 0x03, 0x7e, 0x10, 0x78, 0xa4, 0xa5, 0x60, 0x3f, - 0x00, 0x00, 0x20, 0x19, 0x00, 0x0b, 0x10, 0x78, 0x9d, 0xd7, 0x60, 0x1f, - 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x03, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x03, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x08, 0x7e, 0x2c, 0x40, 0x09, 0x7e, - 0x20, 0x49, 0x00, 0x00, 0x10, 0x78, 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, - 0x00, 0xc0, 0x9e, 0x12, 0x07, 0x7e, 0x2c, 0x38, 0x10, 0x78, 0x72, 0xf3, - 0x07, 0x7f, 0x00, 0xc0, 0x9e, 0x12, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x00, 0x40, 0x9e, 0x12, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x07, 0x00, 0x40, - 0x9e, 0x12, 0x0d, 0x7e, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, - 0x9e, 0x03, 0x10, 0x78, 0xa4, 0xa5, 0x60, 0x1f, 0x00, 0x07, 0x10, 0x78, - 0x17, 0x57, 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, - 0x9e, 0x0b, 0x10, 0x78, 0xa1, 0xda, 0x0d, 0x7f, 0x60, 0x13, 0x00, 0x00, - 0x10, 0x78, 0xa4, 0xa5, 0x60, 0x1f, 0x00, 0x07, 0x03, 0x7f, 0x12, 0x7f, - 0x00, 0x7c, 0x0f, 0x7e, 0x0c, 0x7e, 0x03, 0x7e, 0x15, 0x7e, 0x20, 0x79, - 0xac, 0x80, 0x79, 0x38, 0x78, 0x3c, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, - 0x9e, 0x59, 0x01, 0x7e, 0x0c, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, - 0x9e, 0x59, 0x01, 0x7f, 0x02, 0x7f, 0x02, 0x7e, 0x01, 0x7e, 0x20, 0x19, - 0x00, 0x29, 0x10, 0x78, 0x73, 0xd0, 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, - 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x5e, 0x0a, 0x07, 0x7f, 0x01, 0x7f, - 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, - 0x10, 0x78, 0x47, 0xe9, 0x02, 0x7e, 0x62, 0x04, 0xa2, 0x94, 0xff, 0x00, - 0x82, 0x17, 0xa2, 0x86, 0x00, 0x06, 0x00, 0x40, 0x9e, 0x4d, 0xa2, 0x86, - 0x00, 0x04, 0x00, 0xc0, 0x9e, 0x50, 0x62, 0xa0, 0x10, 0x78, 0x29, 0x42, - 0x02, 0x7f, 0x01, 0x7f, 0x10, 0x78, 0x42, 0xf8, 0x66, 0x12, 0x65, 0x16, - 0xa0, 0x06, 0x00, 0x78, 0x9e, 0x5b, 0x0c, 0x7f, 0x01, 0x7f, 0x15, 0x7f, - 0x03, 0x7f, 0x0c, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x0d, 0x7e, - 0x0e, 0x7e, 0x01, 0x7e, 0x20, 0x09, 0xa7, 0x20, 0x21, 0x04, 0xa0, 0x86, - 0x00, 0x74, 0x00, 0xc0, 0x9e, 0xc3, 0x20, 0x69, 0xac, 0x8e, 0x69, 0x0c, - 0xa1, 0x82, 0x01, 0x00, 0x00, 0x48, 0x9e, 0xb3, 0x69, 0x08, 0xa1, 0x84, - 0x80, 0x00, 0x00, 0x40, 0x9e, 0xbf, 0x60, 0x18, 0x20, 0x70, 0x70, 0x10, - 0xa0, 0x84, 0x00, 0xff, 0x00, 0x40, 0x9e, 0x82, 0x70, 0x00, 0xd0, 0xf4, - 0x00, 0x40, 0x9e, 0x86, 0xa1, 0x84, 0x08, 0x00, 0x00, 0x40, 0x9e, 0xbf, - 0x69, 0x10, 0xa1, 0x8a, 0x00, 0x01, 0x00, 0x48, 0x9e, 0xb7, 0x69, 0x14, - 0x20, 0x69, 0xac, 0xae, 0x69, 0x04, 0x81, 0xff, 0x00, 0xc0, 0x9e, 0xab, - 0x69, 0x0c, 0xa1, 0x82, 0x01, 0x00, 0x00, 0x48, 0x9e, 0xb3, 0x69, 0x08, - 0x81, 0xff, 0x00, 0xc0, 0x9e, 0xaf, 0x69, 0x10, 0xa1, 0x8a, 0x00, 0x01, - 0x00, 0x48, 0x9e, 0xb7, 0x69, 0x18, 0xa1, 0x8a, 0x00, 0x01, 0x00, 0x48, - 0x9e, 0xbf, 0x00, 0x78, 0x9e, 0xc9, 0x60, 0x13, 0x01, 0x00, 0x00, 0x78, - 0x9e, 0xc5, 0x60, 0x13, 0x03, 0x00, 0x00, 0x78, 0x9e, 0xc5, 0x60, 0x13, - 0x05, 0x00, 0x00, 0x78, 0x9e, 0xc5, 0x60, 0x13, 0x07, 0x00, 0x00, 0x78, - 0x9e, 0xc5, 0x60, 0x13, 0x09, 0x00, 0x00, 0x78, 0x9e, 0xc5, 0x60, 0x13, - 0x0b, 0x00, 0x00, 0x78, 0x9e, 0xc5, 0x60, 0x13, 0x0f, 0x00, 0x00, 0x78, - 0x9e, 0xc5, 0x60, 0x13, 0x2d, 0x00, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, - 0x9e, 0xca, 0xa0, 0x06, 0x01, 0x7f, 0x0e, 0x7f, 0x0d, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0x0c, 0x7e, 0x0d, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x15, 0x7e, - 0x62, 0x18, 0x22, 0x68, 0x6b, 0x04, 0xa3, 0x94, 0x00, 0xff, 0xa2, 0x86, - 0x00, 0x06, 0x00, 0x40, 0x9e, 0xf3, 0xa2, 0x86, 0x00, 0x04, 0x00, 0x40, - 0x9e, 0xf3, 0xa3, 0x94, 0xff, 0x00, 0x82, 0x17, 0xa2, 0x86, 0x00, 0x06, - 0x00, 0x40, 0x9e, 0xf3, 0xa2, 0x86, 0x00, 0x04, 0x00, 0x40, 0x9e, 0xf3, - 0x0c, 0x7e, 0x2d, 0x60, 0x10, 0x78, 0x45, 0xd6, 0x0c, 0x7f, 0x00, 0x78, - 0x9f, 0x2e, 0x20, 0x11, 0xac, 0x96, 0xad, 0x98, 0x00, 0x0a, 0x20, 0xa9, - 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, 0x00, 0xc0, 0x9f, 0x2f, 0x20, 0x11, - 0xac, 0x9a, 0xad, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, - 0x80, 0xde, 0x00, 0xc0, 0x9f, 0x2f, 0x04, 0x7e, 0x01, 0x7e, 0x6a, 0xa0, - 0xa2, 0x94, 0x00, 0xff, 0x82, 0x27, 0xa0, 0x06, 0x20, 0x09, 0xa7, 0x53, - 0x21, 0x0c, 0xd1, 0xa4, 0x00, 0x40, 0x9f, 0x1b, 0x20, 0x09, 0x00, 0x29, - 0x10, 0x78, 0xa2, 0x2d, 0x68, 0x00, 0xc0, 0xe5, 0x68, 0x02, 0x20, 0x19, - 0x00, 0x29, 0x10, 0x78, 0x5f, 0x01, 0x07, 0x7e, 0x20, 0x39, 0x00, 0x00, - 0x10, 0x78, 0x5e, 0x0a, 0x2c, 0x08, 0x10, 0x78, 0x9f, 0x9b, 0x07, 0x7f, - 0x20, 0x01, 0x00, 0x07, 0x10, 0x78, 0x45, 0x35, 0x01, 0x7f, 0x04, 0x7f, - 0xa0, 0x06, 0x15, 0x7f, 0x03, 0x7f, 0x02, 0x7f, 0x0d, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0x0d, 0x7e, 0x20, 0x69, 0xac, 0x8e, 0x68, 0x00, 0xa0, 0x86, - 0x08, 0x00, 0x00, 0x40, 0x9f, 0x41, 0x60, 0x13, 0x00, 0x00, 0x00, 0x78, - 0x9f, 0x42, 0xa0, 0x06, 0x0d, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, 0x0f, 0x7e, - 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x15, 0x7e, 0x20, 0x79, 0xac, 0x8c, - 0x79, 0x30, 0x78, 0x34, 0x10, 0x78, 0x25, 0x4d, 0x00, 0xc0, 0x9f, 0x68, - 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x9f, 0x68, 0x20, 0x11, 0xac, 0x90, - 0xac, 0x98, 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, - 0x00, 0xc0, 0x9f, 0x68, 0x20, 0x11, 0xac, 0x94, 0xac, 0x98, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, 0x15, 0x7f, 0x03, 0x7f, - 0x02, 0x7f, 0x01, 0x7f, 0x0f, 0x7f, 0x0c, 0x7f, 0x00, 0x7c, 0x0c, 0x7e, - 0x00, 0x7e, 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x15, 0x7e, 0x20, 0x11, - 0xac, 0x83, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x10, 0x78, 0x25, 0x4d, - 0x00, 0xc0, 0x9f, 0x94, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0x9f, 0x94, - 0x20, 0x11, 0xac, 0x96, 0xac, 0x98, 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, - 0x10, 0x78, 0x80, 0xde, 0x00, 0xc0, 0x9f, 0x94, 0x20, 0x11, 0xac, 0x9a, - 0xac, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, - 0x15, 0x7f, 0x03, 0x7f, 0x02, 0x7f, 0x01, 0x7f, 0x00, 0x7f, 0x0c, 0x7f, - 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x08, 0x7e, 0x07, 0x7e, 0x06, 0x7e, - 0x05, 0x7e, 0x04, 0x7e, 0x02, 0x7e, 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x27, 0x40, 0x20, 0x29, 0xa9, 0xba, 0x25, 0x2c, 0x20, 0x21, 0xa9, 0xc0, - 0x24, 0x24, 0x20, 0x61, 0xae, 0x00, 0x20, 0x71, 0xa7, 0x00, 0x76, 0x48, - 0x70, 0x64, 0x81, 0xff, 0x00, 0x40, 0x9f, 0xc2, 0x00, 0x7e, 0xa1, 0x86, - 0xaa, 0xb3, 0x00, 0x7f, 0x00, 0x40, 0x9f, 0xc2, 0x80, 0x01, 0xa6, 0x02, - 0x00, 0xc8, 0xa0, 0x2c, 0x00, 0x78, 0x9f, 0xc5, 0xa6, 0x06, 0x00, 0x40, - 0xa0, 0x2c, 0x21, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa0, 0x22, 0x10, 0x78, - 0xa2, 0x52, 0x00, 0x40, 0xa0, 0x22, 0x67, 0x1c, 0xa7, 0x86, 0x00, 0x01, - 0x00, 0x40, 0xa0, 0x47, 0xa7, 0x86, 0x00, 0x04, 0x00, 0x40, 0xa0, 0x47, - 0xa7, 0x86, 0x00, 0x07, 0x00, 0x40, 0xa0, 0x22, 0x25, 0x00, 0xac, 0x06, - 0x00, 0x40, 0xa0, 0x22, 0x24, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa0, 0x22, - 0x10, 0x78, 0xa2, 0x66, 0x00, 0xc0, 0xa0, 0x22, 0x88, 0xff, 0x00, 0x40, - 0x9f, 0xed, 0x60, 0x20, 0xa9, 0x06, 0x00, 0xc0, 0xa0, 0x22, 0x0d, 0x7e, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0x9f, 0xf7, 0x01, 0x7e, - 0x10, 0x78, 0x17, 0x57, 0x01, 0x7f, 0xa7, 0x86, 0x00, 0x08, 0x00, 0xc0, - 0xa0, 0x06, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, 0xa0, 0x06, 0x10, 0x78, - 0x7c, 0x83, 0x0d, 0x7f, 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x78, 0xa0, 0x22, - 0x60, 0x10, 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0xa0, 0x1f, - 0xa7, 0x86, 0x00, 0x03, 0x00, 0xc0, 0xa0, 0x36, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x10, 0x78, 0xa4, 0xf2, 0x01, 0x7e, - 0x10, 0x78, 0x8f, 0x8d, 0x10, 0x78, 0x4a, 0x73, 0x01, 0x7f, 0x10, 0x78, - 0x8e, 0xc9, 0x0d, 0x7f, 0x10, 0x78, 0x8e, 0xd6, 0xac, 0xe0, 0x00, 0x10, - 0x20, 0x01, 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, 0xa0, 0x2c, - 0x00, 0x78, 0x9f, 0xaf, 0x12, 0x7f, 0x02, 0x7f, 0x04, 0x7f, 0x05, 0x7f, - 0x06, 0x7f, 0x07, 0x7f, 0x08, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, - 0xa7, 0x86, 0x00, 0x06, 0x00, 0xc0, 0xa0, 0x10, 0xa3, 0x86, 0x00, 0x05, - 0x00, 0x40, 0xa0, 0x44, 0x10, 0x78, 0xa4, 0xf2, 0x10, 0x78, 0xa1, 0xda, - 0x00, 0x78, 0xa0, 0x1f, 0x0d, 0x7f, 0x00, 0x78, 0xa0, 0x22, 0x10, 0x78, - 0xa2, 0x66, 0x00, 0xc0, 0xa0, 0x22, 0x81, 0xff, 0x00, 0x40, 0xa0, 0x22, - 0xa1, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x18, 0x00, 0x40, - 0xa0, 0x5c, 0xa1, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x2d, - 0x00, 0xc0, 0xa0, 0x22, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x00, 0xc0, - 0xa0, 0x22, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0x40, 0xa0, 0x6d, 0x10, 0x78, - 0x8f, 0x10, 0x00, 0xc0, 0xa0, 0x22, 0x10, 0x78, 0x7c, 0x83, 0x00, 0x78, - 0xa0, 0x75, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0xa0, 0x75, 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x8e, 0xd6, 0x00, 0x78, - 0xa0, 0x22, 0x0c, 0x7e, 0x0e, 0x7e, 0x01, 0x7e, 0x2c, 0x08, 0x21, 0x70, - 0xa0, 0x06, 0x10, 0x78, 0xa1, 0xf6, 0x01, 0x7f, 0x00, 0x40, 0xa0, 0x89, - 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x10, 0x79, 0xa0, 0x8c, 0x0e, 0x7f, - 0x0c, 0x7f, 0x00, 0x7c, 0xa0, 0x94, 0xa0, 0x94, 0xa0, 0x94, 0xa0, 0x94, - 0xa0, 0x94, 0xa0, 0x94, 0xa0, 0x96, 0xa0, 0x94, 0xa0, 0x06, 0x00, 0x7c, - 0x04, 0x7e, 0x01, 0x7e, 0x70, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x24, - 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, 0x2c, 0x00, 0x20, 0x09, 0x00, 0x20, - 0x10, 0x78, 0xa2, 0x2d, 0x01, 0x7f, 0x04, 0x7f, 0x03, 0x7e, 0x20, 0x19, - 0x00, 0x02, 0x10, 0x78, 0x9d, 0xd7, 0x03, 0x7f, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x7c, 0x20, 0x01, 0x00, 0x01, 0x10, 0x78, 0x44, 0xee, 0x15, 0x7e, - 0x01, 0x7e, 0x02, 0x7e, 0x03, 0x7e, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, - 0xa7, 0x05, 0x20, 0x11, 0xac, 0x96, 0x10, 0x78, 0x80, 0xde, 0x03, 0x7f, - 0x02, 0x7f, 0x01, 0x7f, 0x15, 0x7f, 0xa0, 0x05, 0x00, 0x7c, 0x0f, 0x7e, - 0x0e, 0x7e, 0x0c, 0x7e, 0x08, 0x7e, 0x07, 0x7e, 0x06, 0x7e, 0x02, 0x7e, - 0x12, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x27, 0x40, 0x20, 0x61, 0xae, 0x00, - 0x20, 0x79, 0x00, 0x01, 0x8f, 0xff, 0x00, 0x40, 0xa1, 0x2d, 0x20, 0x71, - 0xa7, 0x00, 0x76, 0x48, 0x70, 0x64, 0x80, 0x01, 0xa6, 0x02, 0x00, 0xc8, - 0xa1, 0x2d, 0x88, 0xff, 0x00, 0x40, 0xa0, 0xe8, 0x28, 0x00, 0xac, 0x06, - 0x00, 0xc0, 0xa1, 0x23, 0x20, 0x79, 0x00, 0x00, 0x10, 0x78, 0xa2, 0x52, - 0x00, 0x40, 0xa1, 0x23, 0x24, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa1, 0x23, - 0x67, 0x1c, 0xa7, 0x86, 0x00, 0x06, 0x00, 0xc0, 0xa1, 0x23, 0xa7, 0x86, - 0x00, 0x07, 0x00, 0x40, 0xa1, 0x23, 0x88, 0xff, 0x00, 0xc0, 0xa1, 0x07, - 0x60, 0x18, 0xa2, 0x06, 0x00, 0xc0, 0xa1, 0x23, 0x85, 0xff, 0x00, 0x40, - 0xa1, 0x07, 0x60, 0x20, 0xa1, 0x06, 0x00, 0xc0, 0xa1, 0x23, 0x0d, 0x7e, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0xa1, 0x13, 0x10, 0x78, - 0xa4, 0xa5, 0x60, 0x1f, 0x00, 0x07, 0x10, 0x78, 0x17, 0x57, 0x60, 0x10, - 0x20, 0x68, 0x10, 0x78, 0x8d, 0x16, 0x00, 0x40, 0xa1, 0x1d, 0x04, 0x7e, - 0x10, 0x78, 0xa1, 0xda, 0x04, 0x7f, 0x0d, 0x7f, 0x10, 0x78, 0x8e, 0xd6, - 0x88, 0xff, 0x00, 0xc0, 0xa1, 0x37, 0xac, 0xe0, 0x00, 0x10, 0x20, 0x01, - 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, 0xa1, 0x2d, 0x00, 0x78, - 0xa0, 0xd4, 0xa0, 0x06, 0x12, 0x7f, 0x02, 0x7f, 0x06, 0x7f, 0x07, 0x7f, - 0x08, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, 0x0f, 0x7f, 0x00, 0x7c, 0xa8, 0xc5, - 0x00, 0x01, 0x00, 0x78, 0xa1, 0x2e, 0x07, 0x7e, 0x05, 0x7e, 0x08, 0x7e, - 0x20, 0x41, 0x00, 0x00, 0x20, 0x29, 0x00, 0x01, 0x2c, 0x20, 0x20, 0x19, - 0x00, 0x02, 0x62, 0x18, 0x09, 0x7e, 0x20, 0x49, 0x00, 0x00, 0x10, 0x78, - 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, - 0x72, 0xf3, 0x10, 0x78, 0xa0, 0xc5, 0x05, 0x7f, 0x07, 0x7f, 0x00, 0x7c, - 0x02, 0x7e, 0x04, 0x7e, 0x05, 0x7e, 0x07, 0x7e, 0x0c, 0x7e, 0x15, 0x7e, - 0x2c, 0x20, 0x21, 0x28, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, - 0x01, 0x7e, 0x03, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0xa1, 0x7e, - 0x2c, 0x10, 0x05, 0x7e, 0x08, 0x7e, 0x20, 0x41, 0x00, 0x00, 0x25, 0x08, - 0x20, 0x29, 0x00, 0x01, 0x09, 0x7e, 0x20, 0x49, 0x00, 0x00, 0x10, 0x78, - 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, - 0x72, 0xf3, 0x10, 0x78, 0xa0, 0xc5, 0x05, 0x7f, 0x03, 0x7f, 0x01, 0x7f, - 0x81, 0x08, 0x00, 0xf0, 0xa1, 0x62, 0x15, 0x7f, 0x0c, 0x7f, 0x07, 0x7f, - 0x05, 0x7f, 0x04, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0x07, 0x7e, 0x05, 0x7e, - 0x62, 0x18, 0x08, 0x7e, 0x20, 0x41, 0x00, 0x00, 0x20, 0x29, 0x00, 0x01, - 0x20, 0x19, 0x00, 0x48, 0x09, 0x7e, 0x20, 0x49, 0x00, 0x00, 0x10, 0x78, - 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, - 0x72, 0xf3, 0x2c, 0x20, 0x10, 0x78, 0xa0, 0xc5, 0x05, 0x7f, 0x07, 0x7f, - 0x00, 0x7c, 0x02, 0x7e, 0x04, 0x7e, 0x05, 0x7e, 0x07, 0x7e, 0x0c, 0x7e, - 0x15, 0x7e, 0x2c, 0x20, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, - 0x01, 0x7e, 0x03, 0x7e, 0x10, 0x78, 0x45, 0xc4, 0x00, 0xc0, 0xa1, 0xce, - 0x2c, 0x10, 0x08, 0x7e, 0x20, 0x41, 0x00, 0x00, 0x28, 0x28, 0x04, 0x7e, - 0x20, 0x21, 0x00, 0x01, 0x10, 0x78, 0xa4, 0x82, 0x04, 0x7f, 0x09, 0x7e, - 0x20, 0x49, 0x00, 0x00, 0x10, 0x78, 0x72, 0x46, 0x09, 0x7f, 0x08, 0x7f, - 0x20, 0x39, 0x00, 0x00, 0x10, 0x78, 0x72, 0xf3, 0x10, 0x78, 0xa0, 0xc5, - 0x03, 0x7f, 0x01, 0x7f, 0x81, 0x08, 0x00, 0xf0, 0xa1, 0xb0, 0x15, 0x7f, - 0x0c, 0x7f, 0x07, 0x7f, 0x05, 0x7f, 0x04, 0x7f, 0x02, 0x7f, 0x00, 0x7c, - 0x01, 0x7e, 0x0f, 0x7e, 0xad, 0x82, 0xce, 0x00, 0x00, 0x48, 0xa1, 0xf3, - 0xad, 0x82, 0xff, 0xff, 0x00, 0xc8, 0xa1, 0xf3, 0x68, 0x00, 0xa0, 0x7d, - 0x00, 0x40, 0xa1, 0xf0, 0x68, 0x03, 0x00, 0x00, 0x6b, 0x52, 0x10, 0x78, - 0x4a, 0x73, 0x2f, 0x68, 0x00, 0x78, 0xa1, 0xe4, 0x6b, 0x52, 0x10, 0x78, - 0x4a, 0x73, 0x0f, 0x7f, 0x01, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x04, 0x7e, - 0x03, 0x7e, 0x20, 0x61, 0xae, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0xa2, 0x06, - 0x20, 0x71, 0xa7, 0x00, 0x74, 0x48, 0x70, 0x64, 0x80, 0x01, 0xa4, 0x02, - 0x00, 0xc8, 0xa2, 0x28, 0x21, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa2, 0x1a, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x40, 0xa2, 0x1a, 0x60, 0x08, - 0xa2, 0x06, 0x00, 0xc0, 0xa2, 0x1a, 0x60, 0x18, 0xa1, 0xa0, 0x00, 0x06, - 0x24, 0x24, 0xa4, 0x06, 0x00, 0x40, 0xa2, 0x24, 0xac, 0xe0, 0x00, 0x10, - 0x20, 0x01, 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, 0xa2, 0x28, - 0x00, 0x78, 0xa2, 0x06, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0xa2, 0x29, - 0xa0, 0x06, 0x03, 0x7f, 0x04, 0x7f, 0x0e, 0x7f, 0x00, 0x7c, 0x0d, 0x7e, - 0x00, 0x7e, 0x10, 0x78, 0x13, 0x8b, 0x00, 0x7f, 0x10, 0x40, 0x13, 0x32, - 0x68, 0x37, 0x01, 0x0d, 0x68, 0x5e, 0x02, 0x7e, 0x20, 0x10, 0x10, 0x78, - 0x8d, 0x02, 0x20, 0x01, 0x00, 0x00, 0x00, 0x40, 0xa2, 0x43, 0x22, 0x00, - 0xa0, 0x80, 0x00, 0x08, 0x20, 0x04, 0x02, 0x7f, 0x68, 0x4a, 0x69, 0x56, - 0x6c, 0x46, 0x68, 0x4f, 0x00, 0x00, 0xa0, 0x06, 0x68, 0xb2, 0x68, 0x02, - 0x68, 0x3a, 0x68, 0x5a, 0x10, 0x78, 0x4a, 0x73, 0x0d, 0x7f, 0x00, 0x7c, - 0x67, 0x00, 0xa7, 0x86, 0x00, 0x00, 0x00, 0x40, 0xa2, 0x65, 0xa7, 0x86, - 0x00, 0x01, 0x00, 0x40, 0xa2, 0x65, 0xa7, 0x86, 0x00, 0x0a, 0x00, 0x40, - 0xa2, 0x65, 0xa7, 0x86, 0x00, 0x09, 0x00, 0x40, 0xa2, 0x65, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x7c, 0x0e, 0x7e, 0x60, 0x18, 0x20, 0x70, 0x70, 0xa0, - 0xa2, 0x06, 0x0e, 0x7f, 0x00, 0x7c, 0x01, 0x7e, 0x60, 0x04, 0xa0, 0x8e, - 0x00, 0x1e, 0x00, 0xc0, 0xa2, 0x87, 0x80, 0x07, 0x61, 0x30, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x05, 0x60, 0x32, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, - 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x05, 0x20, 0x01, 0xa9, 0xa3, 0x20, 0x04, - 0x60, 0x16, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x01, 0x7f, - 0x00, 0x7c, 0x00, 0x05, 0x00, 0x05, 0x00, 0x7c, 0x60, 0x24, 0xd0, 0xe4, - 0x00, 0x40, 0xa2, 0x9d, 0xd0, 0xcc, 0x00, 0x40, 0xa2, 0x97, 0x10, 0x78, - 0x8f, 0xcf, 0x00, 0x78, 0xa2, 0x9d, 0x10, 0x78, 0xa4, 0xa5, 0x10, 0x78, - 0x5b, 0xc1, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, 0xa2, 0x80, 0x00, 0x07, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x79, 0xa2, 0xa5, 0xa2, 0xae, - 0xa2, 0xae, 0xa2, 0xae, 0xa2, 0xb0, 0xa2, 0xae, 0xa2, 0xb0, 0xa2, 0xb0, - 0xa2, 0xae, 0xa2, 0xb0, 0xa0, 0x06, 0x00, 0x7c, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x7c, 0xa2, 0x80, 0x00, 0x07, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, - 0x00, 0x79, 0xa2, 0xba, 0xa2, 0xc3, 0xa2, 0xc3, 0xa2, 0xc3, 0xa2, 0xc3, - 0xa2, 0xc3, 0xa2, 0xc3, 0xa2, 0xce, 0xa2, 0xc3, 0xa2, 0xc3, 0x60, 0x07, - 0x00, 0x3b, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, 0x2a, 0x00, 0x60, 0x03, - 0x00, 0x01, 0x10, 0x78, 0x5d, 0x8a, 0x00, 0x7c, 0x0c, 0x7e, 0x22, 0x60, - 0x10, 0x78, 0xa4, 0xa5, 0x60, 0x3f, 0x00, 0x00, 0x60, 0x24, 0xc0, 0xf4, - 0xc0, 0xcc, 0x60, 0x26, 0x0c, 0x7f, 0x0d, 0x7e, 0x22, 0x68, 0xa1, 0x86, - 0x00, 0x07, 0x00, 0xc0, 0xa3, 0x2f, 0x68, 0x10, 0xa0, 0x05, 0x00, 0x40, - 0xa2, 0xec, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, 0xd0, 0xfc, 0x00, 0xc0, - 0xa2, 0xec, 0x0d, 0x7f, 0x00, 0x78, 0xa2, 0xc3, 0x60, 0x07, 0x00, 0x3a, - 0x60, 0x03, 0x00, 0x01, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, - 0x0c, 0x7e, 0x2d, 0x60, 0x61, 0x00, 0xa1, 0x86, 0x00, 0x02, 0x00, 0xc0, - 0xa3, 0xbd, 0x60, 0x10, 0xa0, 0x05, 0x00, 0xc0, 0xa3, 0x06, 0x60, 0x00, - 0xa0, 0x86, 0x00, 0x07, 0x10, 0xc0, 0x13, 0x32, 0x00, 0x78, 0xa3, 0xbd, - 0xa0, 0x8c, 0xf0, 0x00, 0x00, 0xc0, 0xa3, 0x12, 0x00, 0x78, 0xa3, 0x12, - 0x20, 0x68, 0x68, 0x00, 0xa0, 0x05, 0x00, 0xc0, 0xa3, 0x0c, 0x2d, 0x00, - 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0xa0, 0x86, - 0x00, 0x02, 0x00, 0xc0, 0xa3, 0x2b, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, - 0xc0, 0xdc, 0xc0, 0xf4, 0x68, 0x4e, 0x68, 0x50, 0xc0, 0xf4, 0xc0, 0xfc, - 0x68, 0x52, 0x20, 0x09, 0x00, 0x43, 0x10, 0x78, 0x9c, 0x2e, 0x00, 0x78, - 0xa3, 0xbd, 0x20, 0x09, 0x00, 0x41, 0x00, 0x78, 0xa3, 0xb7, 0xa1, 0x86, - 0x00, 0x05, 0x00, 0xc0, 0xa3, 0x76, 0x68, 0x10, 0xa0, 0x80, 0x00, 0x13, - 0x20, 0x04, 0xd0, 0xbc, 0x00, 0xc0, 0xa3, 0x3d, 0x0d, 0x7f, 0x00, 0x78, - 0xa2, 0xc3, 0xd0, 0xb4, 0x00, 0x40, 0xa3, 0x45, 0xd0, 0xfc, 0x10, 0x40, - 0x13, 0x32, 0x00, 0x78, 0xa2, 0xdf, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, - 0x00, 0x01, 0x10, 0x78, 0x5d, 0x8a, 0x10, 0x78, 0x62, 0xd1, 0x0c, 0x7e, - 0x2d, 0x60, 0x61, 0x00, 0xa1, 0x86, 0x00, 0x02, 0x00, 0x40, 0xa3, 0x58, - 0xa1, 0x86, 0x00, 0x04, 0x00, 0xc0, 0xa3, 0xbd, 0x20, 0x71, 0xa9, 0xe7, - 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x00, 0xc0, 0xa3, 0x65, 0x70, 0x04, - 0xac, 0x06, 0x00, 0xc0, 0xa3, 0x65, 0x70, 0x03, 0x00, 0x00, 0x68, 0x10, - 0xa0, 0x80, 0x00, 0x13, 0x20, 0x0c, 0xc1, 0xf4, 0xc1, 0xdc, 0x21, 0x02, - 0x80, 0x00, 0x20, 0x0c, 0xc1, 0xf4, 0xc1, 0xfc, 0xc1, 0xbc, 0x21, 0x02, - 0x20, 0x09, 0x00, 0x42, 0x00, 0x78, 0xa3, 0xb7, 0x03, 0x7e, 0x0d, 0x7e, - 0x0d, 0x7e, 0x10, 0x78, 0x13, 0x8b, 0x03, 0x7f, 0x10, 0x40, 0x13, 0x32, - 0x68, 0x37, 0x01, 0x0d, 0x68, 0x03, 0x00, 0x00, 0x68, 0x3b, 0x00, 0x00, - 0x68, 0x5b, 0x00, 0x00, 0x6b, 0x5e, 0x68, 0x57, 0x00, 0x45, 0x2c, 0x00, - 0x68, 0x62, 0x60, 0x34, 0x68, 0x72, 0x23, 0x60, 0x60, 0x24, 0xc0, 0xdd, - 0x60, 0x26, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x80, 0x07, 0x63, 0x20, 0x6b, 0x4a, 0x68, 0x46, 0x68, 0x4f, - 0x00, 0x00, 0x6d, 0x6a, 0x6e, 0x66, 0x68, 0x6f, 0x00, 0x01, 0x10, 0x78, - 0x4a, 0x73, 0x20, 0x19, 0x00, 0x45, 0x60, 0x08, 0x20, 0x68, 0x10, 0x78, - 0x9d, 0xd7, 0x2d, 0x00, 0x60, 0x0a, 0x60, 0x1f, 0x00, 0x06, 0x60, 0x03, - 0x00, 0x07, 0x60, 0x17, 0x00, 0x00, 0x60, 0x3f, 0x00, 0x00, 0x0d, 0x7f, - 0x03, 0x7f, 0x00, 0x78, 0xa3, 0xbe, 0x60, 0x3f, 0x00, 0x00, 0x60, 0x03, - 0x00, 0x07, 0x10, 0x78, 0x9c, 0x2e, 0x0c, 0x7f, 0x0d, 0x7f, 0x00, 0x7c, - 0xa1, 0x86, 0x00, 0x13, 0x00, 0xc0, 0xa3, 0xca, 0x60, 0x04, 0xa0, 0x82, - 0x00, 0x85, 0x20, 0x08, 0x00, 0x79, 0xa3, 0xe4, 0xa1, 0x86, 0x00, 0x27, - 0x00, 0xc0, 0xa3, 0xdd, 0x10, 0x78, 0x61, 0xcd, 0x03, 0x7e, 0x0d, 0x7e, - 0x60, 0x10, 0x20, 0x68, 0x20, 0x19, 0x00, 0x04, 0x10, 0x78, 0xa1, 0xda, - 0x0d, 0x7f, 0x03, 0x7f, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x86, - 0x00, 0x14, 0x00, 0x40, 0xa3, 0xce, 0x10, 0x78, 0x77, 0x73, 0x00, 0x7c, - 0xa3, 0xed, 0xa3, 0xeb, 0xa3, 0xeb, 0xa3, 0xeb, 0xa3, 0xeb, 0xa3, 0xeb, - 0xa3, 0xed, 0x10, 0x78, 0x13, 0x32, 0x10, 0x78, 0x61, 0xcd, 0x60, 0x03, - 0x00, 0x0c, 0x10, 0x78, 0x62, 0xd1, 0x00, 0x7c, 0xa1, 0x82, 0x00, 0x8c, - 0x00, 0xc8, 0xa3, 0xfe, 0xa1, 0x82, 0x00, 0x85, 0x00, 0x48, 0xa3, 0xfe, - 0x00, 0x79, 0xa4, 0x01, 0x10, 0x78, 0x77, 0x73, 0x00, 0x7c, 0xa4, 0x08, - 0xa4, 0x08, 0xa4, 0x08, 0xa4, 0x08, 0xa4, 0x0a, 0xa4, 0x29, 0xa4, 0x08, - 0x10, 0x78, 0x13, 0x32, 0x0d, 0x7e, 0x2c, 0x68, 0x10, 0x78, 0x76, 0xc7, - 0x00, 0x40, 0xa4, 0x24, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, - 0x20, 0x09, 0xac, 0x8e, 0x21, 0x0c, 0x61, 0x36, 0x20, 0x09, 0xac, 0x8f, - 0x21, 0x0c, 0x61, 0x3a, 0x60, 0x0b, 0xff, 0xff, 0x69, 0x18, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x04, 0x10, 0x78, 0x5d, 0x8a, 0x2d, 0x60, 0x10, 0x78, - 0x77, 0x2d, 0x0d, 0x7f, 0x00, 0x7c, 0x10, 0x78, 0x77, 0x2d, 0x00, 0x7c, - 0x0e, 0x7e, 0x60, 0x18, 0x20, 0x70, 0x70, 0x00, 0xd0, 0xec, 0x0e, 0x7f, - 0x00, 0x7c, 0x60, 0x10, 0xa0, 0x8c, 0xf0, 0x00, 0x00, 0x40, 0xa4, 0x81, - 0xa0, 0x80, 0x00, 0x13, 0x20, 0x0c, 0xd1, 0xec, 0x00, 0x40, 0xa4, 0x81, - 0x20, 0x01, 0xa7, 0x72, 0x20, 0x04, 0xd0, 0xec, 0x00, 0x40, 0xa4, 0x81, - 0x60, 0x03, 0x00, 0x02, 0x60, 0x24, 0xc0, 0xe5, 0x60, 0x26, 0xd1, 0xac, - 0x00, 0x40, 0xa4, 0x5f, 0x0f, 0x7e, 0x2c, 0x78, 0x10, 0x78, 0x49, 0x5f, - 0x0f, 0x7f, 0x00, 0x40, 0xa4, 0x5f, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x04, - 0x60, 0x3e, 0x20, 0x09, 0xa7, 0x72, 0x21, 0x0c, 0xd1, 0xf4, 0x00, 0xc0, - 0xa4, 0x7f, 0x00, 0x78, 0xa4, 0x71, 0x20, 0x09, 0xa7, 0x72, 0x21, 0x0c, - 0xd1, 0xf4, 0x00, 0x40, 0xa4, 0x6b, 0x60, 0x24, 0xc0, 0xe4, 0x60, 0x26, - 0xa0, 0x06, 0x00, 0x78, 0xa4, 0x81, 0x20, 0x01, 0xa9, 0xa4, 0x20, 0x0c, - 0x81, 0x03, 0xa1, 0x00, 0x60, 0x3e, 0x60, 0x18, 0xa0, 0x88, 0x00, 0x2b, - 0x21, 0x04, 0xa0, 0x05, 0x00, 0x40, 0xa4, 0x7c, 0xa0, 0x88, 0x00, 0x03, - 0x00, 0x78, 0xa4, 0x74, 0x2c, 0x0a, 0x60, 0x0f, 0x00, 0x00, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x7c, 0x01, 0x7e, 0x0c, 0x7e, 0x0e, 0x7e, 0x61, 0x20, - 0xa2, 0xf0, 0x00, 0x2b, 0x2e, 0x04, 0x20, 0x60, 0x8c, 0xff, 0x00, 0x40, - 0xa4, 0xa1, 0x84, 0xff, 0x00, 0xc0, 0xa4, 0x94, 0x60, 0x20, 0xa1, 0x06, - 0x00, 0xc0, 0xa4, 0x9c, 0x60, 0x0c, 0x20, 0x72, 0x10, 0x78, 0x5b, 0xc1, - 0x10, 0x78, 0x77, 0x2d, 0x00, 0x78, 0xa4, 0x9e, 0xac, 0xf0, 0x00, 0x03, - 0x2e, 0x64, 0x00, 0x78, 0xa4, 0x8a, 0x0e, 0x7f, 0x0c, 0x7f, 0x01, 0x7f, - 0x00, 0x7c, 0x0d, 0x7e, 0x60, 0x18, 0xa0, 0xe8, 0x00, 0x2b, 0x2d, 0x04, - 0xa0, 0x05, 0x00, 0x40, 0xa4, 0xb7, 0xac, 0x06, 0x00, 0x40, 0xa4, 0xb5, - 0x2d, 0x04, 0xa0, 0xe8, 0x00, 0x03, 0x00, 0x78, 0xa4, 0xa9, 0x60, 0x0c, - 0x20, 0x6a, 0x0d, 0x7f, 0x00, 0x7c, 0x02, 0x7e, 0x03, 0x7e, 0x15, 0x7e, - 0x20, 0x11, 0xa7, 0x26, 0x22, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x20, 0x19, - 0xac, 0x8e, 0x23, 0x34, 0xa6, 0x36, 0x00, 0xc0, 0xa4, 0xe5, 0x83, 0x18, - 0x23, 0x34, 0x22, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa6, 0x36, 0x00, 0xc0, - 0xa4, 0xe5, 0x20, 0x11, 0xac, 0x90, 0x60, 0x18, 0xa0, 0x98, 0x00, 0x0a, - 0x20, 0xa9, 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, 0x00, 0xc0, 0xa4, 0xe5, - 0x20, 0x11, 0xac, 0x94, 0x60, 0x18, 0xa0, 0x98, 0x00, 0x06, 0x20, 0xa9, - 0x00, 0x04, 0x10, 0x78, 0x80, 0xde, 0x00, 0xc0, 0xa4, 0xe5, 0x15, 0x7f, - 0x03, 0x7f, 0x02, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, 0xa7, 0x00, - 0x10, 0x78, 0x42, 0xb8, 0x10, 0x78, 0x26, 0x77, 0x0e, 0x7f, 0x00, 0x7c, - 0x0e, 0x7e, 0x60, 0x18, 0x20, 0x70, 0x70, 0x00, 0xd0, 0xfc, 0x00, 0x40, - 0xa4, 0xfb, 0x10, 0x78, 0xa4, 0xfd, 0x0e, 0x7f, 0x00, 0x7c, 0x68, 0x50, - 0xc0, 0xe5, 0x68, 0x52, 0x00, 0x7c, 0x0e, 0x7e, 0x0c, 0x7e, 0x07, 0x7e, - 0x06, 0x7e, 0x05, 0x7e, 0x04, 0x7e, 0x02, 0x7e, 0x01, 0x7e, 0x12, 0x7e, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, 0xa9, 0xba, 0x25, 0x2c, 0x20, 0x21, - 0xa9, 0xc0, 0x24, 0x24, 0x20, 0x61, 0xae, 0x00, 0x20, 0x71, 0xa7, 0x00, - 0x76, 0x48, 0x70, 0x64, 0xa6, 0x06, 0x00, 0x40, 0xa5, 0x55, 0x67, 0x1c, - 0xa7, 0x86, 0x00, 0x01, 0x00, 0x40, 0xa5, 0x24, 0xa7, 0x86, 0x00, 0x08, - 0x00, 0xc0, 0xa5, 0x4b, 0x25, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa5, 0x4b, - 0x24, 0x00, 0xac, 0x06, 0x00, 0x40, 0xa5, 0x4b, 0x10, 0x78, 0xa2, 0x52, - 0x00, 0x40, 0xa5, 0x4b, 0x10, 0x78, 0xa2, 0x66, 0x00, 0xc0, 0xa5, 0x4b, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x00, 0xc0, 0xa5, 0x3d, 0x01, 0x7e, - 0x10, 0x78, 0x17, 0x57, 0x01, 0x7f, 0x10, 0x78, 0x8e, 0xfc, 0x00, 0xc0, - 0xa5, 0x43, 0x10, 0x78, 0x28, 0xa6, 0x10, 0x78, 0x8f, 0x10, 0x00, 0xc0, - 0xa5, 0x49, 0x10, 0x78, 0x7c, 0x83, 0x10, 0x78, 0x8e, 0xd6, 0xac, 0xe0, - 0x00, 0x10, 0x20, 0x01, 0xa7, 0x16, 0x20, 0x04, 0xac, 0x02, 0x00, 0xc8, - 0xa5, 0x55, 0x00, 0x78, 0xa5, 0x14, 0x12, 0x7f, 0x01, 0x7f, 0x02, 0x7f, - 0x04, 0x7f, 0x05, 0x7f, 0x06, 0x7f, 0x07, 0x7f, 0x0c, 0x7f, 0x0e, 0x7f, - 0x00, 0x7c, 0x12, 0x7e, 0x00, 0x7e, 0x0e, 0x7e, 0x01, 0x7e, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0xa7, 0x40, 0xd5, 0xa4, 0x00, 0x40, 0xa5, 0x6d, - 0x70, 0x34, 0x80, 0x00, 0x70, 0x36, 0xd5, 0xb4, 0x00, 0x40, 0xa5, 0x73, - 0x70, 0x30, 0x80, 0x00, 0x70, 0x32, 0xd5, 0xac, 0x00, 0x40, 0xa5, 0x89, - 0x25, 0x00, 0xa0, 0x84, 0x00, 0x07, 0xa0, 0x8e, 0x00, 0x03, 0x00, 0x40, - 0xa5, 0x89, 0xa0, 0x8e, 0x00, 0x04, 0x00, 0x40, 0xa5, 0x89, 0xa0, 0x8e, - 0x00, 0x05, 0x00, 0x40, 0xa5, 0x89, 0x20, 0x71, 0xa7, 0x4a, 0x10, 0x78, - 0xa5, 0xca, 0x01, 0x7f, 0x0e, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, - 0x12, 0x7e, 0x00, 0x7e, 0x0e, 0x7e, 0x01, 0x7e, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0xa7, 0x40, 0xd5, 0xa4, 0x00, 0x40, 0xa5, 0x9c, 0x70, 0x34, - 0x80, 0x00, 0x70, 0x36, 0xd5, 0xb4, 0x00, 0x40, 0xa5, 0xa2, 0x70, 0x30, - 0x80, 0x00, 0x70, 0x32, 0xd5, 0xac, 0x00, 0x40, 0xa5, 0xb8, 0x25, 0x00, - 0xa0, 0x84, 0x00, 0x07, 0xa0, 0x8e, 0x00, 0x03, 0x00, 0x40, 0xa5, 0xb8, - 0xa0, 0x8e, 0x00, 0x04, 0x00, 0x40, 0xa5, 0xb8, 0xa0, 0x8e, 0x00, 0x05, - 0x00, 0x40, 0xa5, 0xb8, 0x20, 0x71, 0xa7, 0x4a, 0x10, 0x78, 0xa5, 0xca, - 0x01, 0x7f, 0x0e, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, 0x12, 0x7e, - 0x00, 0x7e, 0x0e, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xa7, 0x42, - 0x10, 0x78, 0xa5, 0xca, 0x0e, 0x7f, 0x00, 0x7f, 0x12, 0x7f, 0x00, 0x7c, - 0x2e, 0x04, 0x80, 0x00, 0x20, 0x72, 0x00, 0xc8, 0xa5, 0xd3, 0x8e, 0x70, - 0x2e, 0x04, 0x80, 0x00, 0x20, 0x72, 0x00, 0x7c, 0x0e, 0x7e, 0x20, 0x71, - 0xa7, 0x40, 0x10, 0x78, 0xa5, 0xca, 0x0e, 0x7f, 0x00, 0x7c, 0x0e, 0x7e, - 0x20, 0x71, 0xa7, 0x44, 0x10, 0x78, 0xa5, 0xca, 0x0e, 0x7f, 0x00, 0x7c, - 0x12, 0x7e, 0x00, 0x7e, 0x0e, 0x7e, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xa7, 0x40, 0x70, 0x44, 0x80, 0x00, 0x70, 0x46, 0x0e, 0x7f, 0x00, 0x7f, - 0x12, 0x7f, 0x00, 0x7c, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, - 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, - 0x48, 0x11 -}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_version = 1*1024+19; +#else +unsigned short risc_code_version = 1*1024+19; +#endif -struct firmware ql2100_fw = { - .size = sizeof(ql2100_fw_bin), - .data = ql2100_fw_bin +#ifdef UNIQUE_FW_NAME +unsigned char fw2100tp_version_str[] = {1,19,25}; +#else +unsigned char firmware_version[] = {1,19,25}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2100tp_VERSION_STRING "1.19.25" +#else +#define FW_VERSION_STRING "1.19.25" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_addr01 = 0x1000 ; +#else +unsigned short risc_code_addr01 = 0x1000 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0078, 0x102d, 0x0000, 0x9601, 0x0000, 0x0001, 0x0013, 0x0019, + 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3231, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x312e, 0x3139, 0x2020, 0x2020, 0x2400, 0x2091, 0x2000, 0x20c1, + 0x0021, 0x2039, 0xffff, 0x2019, 0xaaaa, 0x2760, 0x2069, 0x7fff, + 0x20c1, 0x0020, 0x2c2c, 0x2d34, 0x2762, 0x236a, 0x2c24, 0x2d04, + 0x266a, 0x2562, 0xa406, 0x00c0, 0x1052, 0x20c1, 0x0021, 0x2c2c, + 0x2362, 0x2c04, 0x2562, 0xa306, 0x0040, 0x1052, 0x20c1, 0x0020, + 0x2039, 0x8fff, 0x20a1, 0xae00, 0x2708, 0x810d, 0x810d, 0x810d, + 0x810d, 0xa18c, 0x000f, 0x2001, 0x000a, 0xa112, 0xa00e, 0x21a8, + 0x41a4, 0x3400, 0x8211, 0x00c0, 0x105f, 0x2708, 0x3400, 0xa102, + 0x0040, 0x106f, 0x0048, 0x106f, 0x20a8, 0xa00e, 0x41a4, 0x20a1, + 0xa601, 0x2009, 0x0000, 0x20a9, 0x07ff, 0x41a4, 0x3400, 0x20c9, + 0xabff, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x25c7, + 0x2051, 0xa700, 0x2a70, 0x7762, 0xa786, 0x8fff, 0x0040, 0x1092, + 0x705f, 0xce00, 0x705b, 0xcdf1, 0x7067, 0x0200, 0x706b, 0x0200, + 0x0078, 0x109a, 0x705b, 0xbe01, 0x7067, 0x0100, 0x706b, 0x0100, + 0x705f, 0xbe00, 0x1078, 0x12df, 0x1078, 0x13ca, 0x1078, 0x1577, + 0x1078, 0x1ce9, 0x1078, 0x42ec, 0x1078, 0x76bf, 0x1078, 0x1355, + 0x1078, 0x2ac0, 0x1078, 0x4e93, 0x1078, 0x49a3, 0x1078, 0x594a, + 0x1078, 0x2263, 0x1078, 0x5c43, 0x1078, 0x5485, 0x1078, 0x2162, + 0x1078, 0x2240, 0x2091, 0x3009, 0x7823, 0x0000, 0x0090, 0x10cf, + 0x7820, 0xa086, 0x0002, 0x00c0, 0x10cf, 0x7823, 0x4000, 0x0068, + 0x10c7, 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, + 0x7003, 0x0000, 0x2001, 0x017f, 0x2003, 0x0000, 0x2a70, 0x7000, + 0xa08e, 0x0003, 0x00c0, 0x10ef, 0x1078, 0x365e, 0x1078, 0x2ae8, + 0x1078, 0x4ee3, 0x1078, 0x4b66, 0x2009, 0x0100, 0x2104, 0xa082, + 0x0002, 0x0048, 0x10f3, 0x1078, 0x5966, 0x0078, 0x10d6, 0x1079, + 0x10f7, 0x0078, 0x10dc, 0x1078, 0x7197, 0x0078, 0x10eb, 0x1101, + 0x1102, 0x11be, 0x10ff, 0x1246, 0x12dc, 0x12dd, 0x12de, 0x1078, + 0x1332, 0x007c, 0x127e, 0x0f7e, 0x2091, 0x8000, 0x7000, 0xa086, + 0x0001, 0x00c0, 0x1198, 0x1078, 0x3aec, 0x2079, 0x0100, 0x7844, + 0xa005, 0x00c0, 0x1198, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x1078, + 0x1adf, 0x780f, 0x00ff, 0x7840, 0xa084, 0xfffb, 0x7842, 0x2011, + 0x8010, 0x73c4, 0x1078, 0x361b, 0x2001, 0xffff, 0x1078, 0x5ae6, + 0x723c, 0xc284, 0x723e, 0x2001, 0xa70c, 0x2014, 0xc2ac, 0x2202, + 0x1078, 0x6f9f, 0x2011, 0x0004, 0x1078, 0x8d2b, 0x1078, 0x489e, + 0x1078, 0x42d4, 0x0040, 0x1144, 0x7087, 0x0001, 0x70bf, 0x0000, + 0x1078, 0x3c9e, 0x0078, 0x1198, 0x1078, 0x4967, 0x0040, 0x114d, + 0x7a0c, 0xc2b4, 0x7a0e, 0x0078, 0x1159, 0x1078, 0x90b6, 0x70cc, + 0xd09c, 0x00c0, 0x1159, 0x7098, 0xa005, 0x0040, 0x1159, 0x1078, + 0x42b8, 0x70d7, 0x0000, 0x70d3, 0x0000, 0x72cc, 0x2079, 0xa752, + 0x7804, 0xd0ac, 0x0040, 0x1165, 0xc295, 0x72ce, 0xa296, 0x0004, + 0x0040, 0x1186, 0x2011, 0x0001, 0x1078, 0x8d2b, 0x7093, 0x0000, + 0x7097, 0xffff, 0x7003, 0x0002, 0x0f7f, 0x1078, 0x2677, 0x2011, + 0x0005, 0x1078, 0x70e0, 0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100, + 0x60e3, 0x0008, 0x0c7f, 0x127f, 0x0078, 0x119a, 0x7093, 0x0000, + 0x7097, 0xffff, 0x7003, 0x0002, 0x2011, 0x0005, 0x1078, 0x70e0, + 0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100, 0x60e3, 0x0008, 0x0c7f, + 0x0f7f, 0x127f, 0x007c, 0x0c7e, 0x20a9, 0x0082, 0x2009, 0x007e, + 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, 0x2019, 0x0029, 0x1078, + 0x73d0, 0x027f, 0x1078, 0xa501, 0x037f, 0x027f, 0x017f, 0x1078, + 0x298e, 0x8108, 0x00f0, 0x11a0, 0x0c7f, 0x706f, 0x0000, 0x7070, + 0xa084, 0x00ff, 0x7072, 0x709b, 0x0000, 0x007c, 0x127e, 0x2091, + 0x8000, 0x7000, 0xa086, 0x0002, 0x00c0, 0x1244, 0x7094, 0xa086, + 0xffff, 0x0040, 0x11d1, 0x1078, 0x2677, 0x1078, 0x62d1, 0x0078, + 0x1244, 0x70cc, 0xd09c, 0x0040, 0x11fd, 0xd084, 0x0040, 0x11fd, + 0x0f7e, 0x2079, 0x0100, 0x790c, 0xc1b5, 0x790e, 0x0f7f, 0xd08c, + 0x0040, 0x11fd, 0x70d0, 0xa086, 0xffff, 0x0040, 0x11f9, 0x1078, + 0x27f7, 0x1078, 0x62d1, 0x70cc, 0xd094, 0x00c0, 0x1244, 0x2011, + 0x0001, 0x2019, 0x0000, 0x1078, 0x282f, 0x1078, 0x62d1, 0x0078, + 0x1244, 0x70d4, 0xa005, 0x00c0, 0x1244, 0x7090, 0xa005, 0x00c0, + 0x1244, 0x1078, 0x4967, 0x00c0, 0x1244, 0x2001, 0xa753, 0x2004, + 0xd0ac, 0x0040, 0x1227, 0x157e, 0x0c7e, 0x20a9, 0x007f, 0x2009, + 0x0000, 0x017e, 0x1078, 0x45c4, 0x00c0, 0x121a, 0x6000, 0xd0ec, + 0x00c0, 0x1222, 0x017f, 0x8108, 0x00f0, 0x1211, 0x0c7f, 0x157f, + 0x0078, 0x1227, 0x017f, 0x0c7f, 0x157f, 0x0078, 0x1244, 0x7003, + 0x0003, 0x7097, 0xffff, 0x2001, 0x0000, 0x1078, 0x24e8, 0x1078, + 0x3699, 0x2001, 0xa9b2, 0x2004, 0xa086, 0x0005, 0x00c0, 0x123c, + 0x2011, 0x0000, 0x1078, 0x70e0, 0x2011, 0x0000, 0x1078, 0x70ea, + 0x1078, 0x62d1, 0x1078, 0x639b, 0x127f, 0x007c, 0x017e, 0x0f7e, + 0x127e, 0x2091, 0x8000, 0x2079, 0x0100, 0x2009, 0x00f7, 0x1078, + 0x42a1, 0x7940, 0xa18c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0040, + 0x125b, 0x7827, 0x0040, 0xd19c, 0x0040, 0x1260, 0x7827, 0x0008, + 0x007e, 0x037e, 0x157e, 0xa006, 0x1078, 0x5ae6, 0x7900, 0xa18a, + 0x0003, 0x0050, 0x1289, 0x7954, 0xd1ac, 0x00c0, 0x1289, 0x2009, + 0x00f8, 0x1078, 0x42a1, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, + 0x09c4, 0x7820, 0xd09c, 0x00c0, 0x1281, 0x7824, 0xd0ac, 0x00c0, + 0x12ca, 0x00f0, 0x1279, 0x2001, 0x0001, 0x1078, 0x24e8, 0x0078, + 0x12d5, 0x7853, 0x0000, 0x782f, 0x0020, 0x20a9, 0x0050, 0x00e0, + 0x128f, 0x2091, 0x6000, 0x00f0, 0x128f, 0x7853, 0x0400, 0x782f, + 0x0000, 0x2009, 0x00f8, 0x1078, 0x42a1, 0x20a9, 0x000e, 0x0005, + 0x00f0, 0x129f, 0x7853, 0x1400, 0x7843, 0x0090, 0x7843, 0x0010, + 0x2019, 0x61a8, 0x7854, 0x0005, 0x0005, 0xd08c, 0x0040, 0x12b4, + 0x7824, 0xd0ac, 0x00c0, 0x12ca, 0x8319, 0x00c0, 0x12aa, 0x2009, + 0xa732, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0040, 0x12c4, + 0x200b, 0x0000, 0x1078, 0x2588, 0x2001, 0x0001, 0x1078, 0x24e8, + 0x0078, 0x12d3, 0x2001, 0xa732, 0x2003, 0x0000, 0x7828, 0xc09d, + 0x782a, 0x7827, 0x0048, 0x7853, 0x0400, 0x157f, 0x037f, 0x007f, + 0x127f, 0x0f7f, 0x017f, 0x007c, 0x007c, 0x007c, 0x007c, 0x2a70, + 0x2061, 0xa9ad, 0x2063, 0x0001, 0x6007, 0x0013, 0x600b, 0x0019, + 0x600f, 0x0017, 0x2009, 0x0100, 0x2104, 0xa082, 0x0002, 0x0048, + 0x12f5, 0x7053, 0xffff, 0x0078, 0x12f7, 0x7053, 0x0000, 0x7057, + 0xffff, 0x706f, 0x0000, 0x7073, 0x0000, 0x1078, 0x90b6, 0x2061, + 0xa98d, 0x6003, 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6017, 0x0003, 0x601b, 0x0000, 0x601f, + 0x07d0, 0x2061, 0xa995, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b, + 0x0000, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x0000, 0x601b, + 0x0001, 0x601f, 0x0000, 0x2061, 0xa9a5, 0x6003, 0x514c, 0x6007, + 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0xa726, 0x2003, + 0x0000, 0x007c, 0x2091, 0x8000, 0x0068, 0x1334, 0x007e, 0x017e, + 0x2079, 0x0000, 0x7818, 0xd084, 0x00c0, 0x133a, 0x017f, 0x792e, + 0x007f, 0x782a, 0x007f, 0x7826, 0x3900, 0x783a, 0x7823, 0x8002, + 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2079, 0xa700, + 0x7803, 0x0005, 0x0078, 0x1352, 0x007c, 0x2071, 0xa700, 0x715c, + 0x712e, 0x2021, 0x0001, 0xa190, 0x002d, 0xa298, 0x002d, 0x0048, + 0x136b, 0x7060, 0xa302, 0x00c8, 0x136b, 0x220a, 0x2208, 0x2310, + 0x8420, 0x0078, 0x135d, 0x200b, 0x0000, 0x74aa, 0x74ae, 0x007c, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa700, 0x70ac, 0xa0ea, + 0x0010, 0x00c8, 0x137e, 0xa06e, 0x0078, 0x1388, 0x8001, 0x70ae, + 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, + 0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa700, 0x127e, 0x2091, + 0x8000, 0x70ac, 0x8001, 0x00c8, 0x1398, 0xa06e, 0x0078, 0x13a1, + 0x70ae, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, + 0x0000, 0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa700, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000, + 0x70ae, 0x127f, 0x0e7f, 0x007c, 0x8dff, 0x0040, 0x13c0, 0x6804, + 0x6807, 0x0000, 0x007e, 0x1078, 0x13a4, 0x0d7f, 0x0078, 0x13b4, + 0x007c, 0x0e7e, 0x2071, 0xa700, 0x70ac, 0xa08a, 0x0010, 0xa00d, + 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa9d6, 0x7007, 0x0000, 0x701b, + 0x0000, 0x701f, 0x0000, 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, + 0x7012, 0x0e7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x0e7e, 0x2270, + 0x700b, 0x0000, 0x2071, 0xa9d6, 0x7018, 0xa088, 0xa9df, 0x220a, + 0x8000, 0xa084, 0x0007, 0x701a, 0x7004, 0xa005, 0x00c0, 0x13f6, + 0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x127f, + 0x007c, 0x0e7e, 0x2071, 0xa9d6, 0x7004, 0xa005, 0x00c0, 0x1406, + 0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x007c, + 0x7000, 0x0079, 0x140b, 0x140f, 0x1479, 0x1496, 0x1496, 0x7018, + 0x711c, 0xa106, 0x00c0, 0x1417, 0x7007, 0x0000, 0x007c, 0x0d7e, + 0xa180, 0xa9df, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007, + 0x711e, 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, 0x7836, 0x682c, + 0x783a, 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, 0x7016, 0x6804, + 0x0d7f, 0xd084, 0x0040, 0x1439, 0x7007, 0x0001, 0x1078, 0x143e, + 0x007c, 0x7007, 0x0002, 0x1078, 0x1454, 0x007c, 0x017e, 0x027e, + 0x710c, 0x2011, 0x0040, 0xa182, 0x0040, 0x00c8, 0x1449, 0x2110, + 0xa006, 0x700e, 0x7212, 0x8203, 0x7822, 0x7803, 0x0020, 0x7803, + 0x0041, 0x027f, 0x017f, 0x007c, 0x017e, 0x027e, 0x137e, 0x147e, + 0x157e, 0x7014, 0x2098, 0x20a1, 0x0014, 0x7803, 0x0026, 0x710c, + 0x2011, 0x0040, 0xa182, 0x0040, 0x00c8, 0x1468, 0x2110, 0xa006, + 0x700e, 0x22a8, 0x53a6, 0x8203, 0x7822, 0x7803, 0x0020, 0x3300, + 0x7016, 0x7803, 0x0001, 0x157f, 0x147f, 0x137f, 0x027f, 0x017f, + 0x007c, 0x137e, 0x147e, 0x157e, 0x2099, 0xa7fa, 0x20a1, 0x0018, + 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000, + 0x7803, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x700b, + 0xa7f5, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x137e, 0x147e, + 0x157e, 0x2001, 0xa829, 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026, + 0x2001, 0xa82a, 0x20ac, 0x53a6, 0x2099, 0xa82b, 0x20a1, 0x0018, + 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000, + 0x7803, 0x0001, 0x7007, 0x0004, 0x7000, 0xc08c, 0x7002, 0x700b, + 0xa826, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x017e, 0x0e7e, + 0x2071, 0xa9d6, 0x0f7e, 0x2079, 0x0010, 0x7904, 0x7803, 0x0002, + 0xd1fc, 0x0040, 0x14d0, 0xa18c, 0x0700, 0x7004, 0x1079, 0x14d4, + 0x0f7f, 0x0e7f, 0x017f, 0x007c, 0x1408, 0x14dc, 0x1509, 0x1531, + 0x1564, 0x14da, 0x0078, 0x14da, 0xa18c, 0x0700, 0x00c0, 0x1502, + 0x137e, 0x147e, 0x157e, 0x7014, 0x20a0, 0x2099, 0x0014, 0x7803, + 0x0040, 0x7010, 0x20a8, 0x53a5, 0x3400, 0x7016, 0x157f, 0x147f, + 0x137f, 0x700c, 0xa005, 0x0040, 0x151e, 0x1078, 0x143e, 0x007c, + 0x7008, 0xa080, 0x0002, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, + 0x1408, 0x007c, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, 0x0078, + 0x14fd, 0xa18c, 0x0700, 0x00c0, 0x1514, 0x700c, 0xa005, 0x0040, + 0x151e, 0x1078, 0x1454, 0x007c, 0x7008, 0xa080, 0x0002, 0x2003, + 0x0200, 0x7007, 0x0000, 0x1078, 0x1408, 0x007c, 0x0d7e, 0x7008, + 0x2068, 0x7830, 0x6826, 0x7834, 0x682a, 0x7838, 0x682e, 0x783c, + 0x6832, 0x680b, 0x0100, 0x0d7f, 0x7007, 0x0000, 0x1078, 0x1408, + 0x007c, 0xa18c, 0x0700, 0x00c0, 0x155e, 0x137e, 0x147e, 0x157e, + 0x2001, 0xa7f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, 0x0014, + 0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xa7fa, 0x2004, + 0xd0bc, 0x0040, 0x1554, 0x2001, 0xa803, 0x2004, 0xa080, 0x000d, + 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x157f, 0x147f, 0x137f, 0x7007, + 0x0000, 0x1078, 0x4f8c, 0x1078, 0x1408, 0x007c, 0x2011, 0x8003, + 0x1078, 0x361b, 0x0078, 0x1562, 0xa18c, 0x0700, 0x00c0, 0x1571, + 0x2001, 0xa828, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, 0x1408, + 0x007c, 0x2011, 0x8004, 0x1078, 0x361b, 0x0078, 0x1575, 0x127e, + 0x2091, 0x2100, 0x2079, 0x0030, 0x2071, 0xa9e7, 0x7803, 0x0004, + 0x7003, 0x0000, 0x700f, 0xa9ed, 0x7013, 0xa9ed, 0x780f, 0x0076, + 0x7803, 0x0004, 0x127f, 0x007c, 0x6934, 0xa184, 0x0007, 0x0079, + 0x1591, 0x1599, 0x15df, 0x1599, 0x1599, 0x1599, 0x15c4, 0x15a8, + 0x159d, 0xa085, 0x0001, 0x0078, 0x15f9, 0x684c, 0xd0bc, 0x0040, + 0x1599, 0x6860, 0x682e, 0x685c, 0x682a, 0x6858, 0x0078, 0x15e7, + 0xa18c, 0x00ff, 0xa186, 0x001e, 0x00c0, 0x1599, 0x684c, 0xd0bc, + 0x0040, 0x1599, 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, 0x681a, + 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, + 0x6832, 0x6858, 0x0078, 0x15ef, 0xa18c, 0x00ff, 0xa186, 0x0015, + 0x00c0, 0x1599, 0x684c, 0xd0ac, 0x0040, 0x1599, 0x6804, 0x681a, + 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, + 0x6832, 0xa006, 0x682e, 0x682a, 0x6858, 0x0078, 0x15ef, 0x684c, + 0xd0ac, 0x0040, 0x1599, 0xa006, 0x682e, 0x682a, 0x6858, 0xa18c, + 0x000f, 0xa188, 0x206a, 0x210c, 0x6932, 0x2d08, 0x691a, 0x6826, + 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x697c, 0x6912, 0x6980, + 0x6916, 0x007c, 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, 0x020a, + 0x2004, 0x82ff, 0x0040, 0x161c, 0xa280, 0x0004, 0x0d7e, 0x206c, + 0x684c, 0xd0dc, 0x00c0, 0x1618, 0x1078, 0x158c, 0x0040, 0x1618, + 0x0d7f, 0xa280, 0x0000, 0x2003, 0x0002, 0xa016, 0x0078, 0x161c, + 0x6808, 0x8000, 0x680a, 0x0d7f, 0x127e, 0x047e, 0x037e, 0x027e, + 0x2091, 0x2100, 0x027f, 0x037f, 0x047f, 0x7000, 0xa005, 0x00c0, + 0x1630, 0x7206, 0x2001, 0x1651, 0x007e, 0x2260, 0x0078, 0x17e0, + 0x710c, 0x220a, 0x8108, 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, + 0xaa08, 0x0048, 0x163d, 0x2009, 0xa9ed, 0x710e, 0x7010, 0xa102, + 0xa082, 0x0009, 0x0040, 0x1648, 0xa080, 0x001b, 0x00c0, 0x164b, + 0x2009, 0x0138, 0x200a, 0x7000, 0xa005, 0x00c0, 0x1651, 0x1078, + 0x17c1, 0x127f, 0x007c, 0x127e, 0x027e, 0x037e, 0x0c7e, 0x007e, + 0x2091, 0x2100, 0x007f, 0x047f, 0x037f, 0x027f, 0x0d7e, 0x0c7e, + 0x2460, 0x6110, 0x2168, 0x6a62, 0x6b5e, 0xa005, 0x0040, 0x16dd, + 0x6808, 0xa005, 0x0040, 0x174a, 0x7000, 0xa005, 0x00c0, 0x1672, + 0x0078, 0x16d2, 0x700c, 0x7110, 0xa106, 0x00c0, 0x1753, 0x7004, + 0xa406, 0x00c0, 0x16d2, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0040, + 0x168f, 0x047e, 0x1078, 0x1913, 0x047f, 0x2460, 0x6010, 0xa080, + 0x0002, 0x2004, 0xa005, 0x0040, 0x174a, 0x0078, 0x166c, 0x2001, + 0x0207, 0x2004, 0xd09c, 0x00c0, 0x167b, 0x7804, 0xa084, 0x6000, + 0x0040, 0x16a0, 0xa086, 0x6000, 0x0040, 0x16a0, 0x0078, 0x167b, + 0x7100, 0xa186, 0x0002, 0x00c0, 0x16c0, 0x0e7e, 0x2b68, 0x6818, + 0x2060, 0x1078, 0x203f, 0x2804, 0xac70, 0x6034, 0xd09c, 0x00c0, + 0x16b5, 0x7108, 0x720c, 0x0078, 0x16b7, 0x7110, 0x7214, 0x6810, + 0xa100, 0x6812, 0x6814, 0xa201, 0x6816, 0x0e7f, 0x0078, 0x16c4, + 0xa186, 0x0001, 0x00c0, 0x16cc, 0x7820, 0x6910, 0xa100, 0x6812, + 0x7824, 0x6914, 0xa101, 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, + 0x7004, 0x2060, 0x6100, 0xa18e, 0x0004, 0x00c0, 0x1753, 0x2009, + 0x0048, 0x1078, 0x775c, 0x0078, 0x1753, 0x6808, 0xa005, 0x0040, + 0x174a, 0x7000, 0xa005, 0x00c0, 0x16e7, 0x0078, 0x174a, 0x700c, + 0x7110, 0xa106, 0x00c0, 0x16f0, 0x7004, 0xa406, 0x00c0, 0x174a, + 0x2001, 0x0005, 0x2004, 0xd08c, 0x0040, 0x1704, 0x047e, 0x1078, + 0x1913, 0x047f, 0x2460, 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, + 0x0040, 0x174a, 0x0078, 0x16e1, 0x2001, 0x0207, 0x2004, 0xd09c, + 0x00c0, 0x16f0, 0x2001, 0x0005, 0x2004, 0xd08c, 0x00c0, 0x16f6, + 0x7804, 0xa084, 0x6000, 0x0040, 0x171b, 0xa086, 0x6000, 0x0040, + 0x171b, 0x0078, 0x16f0, 0x7007, 0x0000, 0xa016, 0x2218, 0x7000, + 0xa08e, 0x0001, 0x0040, 0x173c, 0xa08e, 0x0002, 0x00c0, 0x174a, + 0x0c7e, 0x0e7e, 0x6818, 0x2060, 0x1078, 0x203f, 0x2804, 0xac70, + 0x6034, 0xd09c, 0x00c0, 0x1738, 0x7308, 0x720c, 0x0078, 0x173a, + 0x7310, 0x7214, 0x0e7f, 0x0c7f, 0x7820, 0xa318, 0x7824, 0xa211, + 0x6810, 0xa300, 0x6812, 0x6814, 0xa201, 0x6816, 0x7803, 0x0004, + 0x7003, 0x0000, 0x6100, 0xa18e, 0x0004, 0x00c0, 0x1753, 0x2009, + 0x0048, 0x1078, 0x775c, 0x0c7f, 0x0d7f, 0x127f, 0x007c, 0x0f7e, + 0x0e7e, 0x027e, 0x037e, 0x047e, 0x057e, 0x2071, 0xa9e7, 0x7000, + 0xa086, 0x0000, 0x0040, 0x17ba, 0x7004, 0xac06, 0x00c0, 0x17ab, + 0x2079, 0x0030, 0x7000, 0xa086, 0x0003, 0x0040, 0x17ab, 0x7804, + 0xd0fc, 0x00c0, 0x17a7, 0x20e1, 0x6000, 0x2011, 0x0032, 0x2001, + 0x0208, 0x200c, 0x2001, 0x0209, 0x2004, 0xa106, 0x00c0, 0x176f, + 0x8211, 0x00c0, 0x1777, 0x7804, 0xd0fc, 0x00c0, 0x17a7, 0x1078, + 0x1b22, 0x027e, 0x057e, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x00c0, + 0x178d, 0x7803, 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007, + 0x0000, 0x057f, 0x027f, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0078, 0x17ab, 0x1078, + 0x1913, 0x0078, 0x175f, 0x157e, 0x20a9, 0x0009, 0x2009, 0xa9ed, + 0x2104, 0xac06, 0x00c0, 0x17b5, 0x200a, 0xa188, 0x0003, 0x00f0, + 0x17b0, 0x157f, 0x057f, 0x047f, 0x037f, 0x027f, 0x0e7f, 0x0f7f, + 0x007c, 0x700c, 0x7110, 0xa106, 0x00c0, 0x17c9, 0x7003, 0x0000, + 0x007c, 0x2104, 0x7006, 0x2060, 0x8108, 0x211c, 0x8108, 0x2124, + 0x8108, 0xa182, 0xaa08, 0x0048, 0x17d7, 0x2009, 0xa9ed, 0x7112, + 0x700c, 0xa106, 0x00c0, 0x17e0, 0x2001, 0x0138, 0x2003, 0x0008, + 0x8cff, 0x00c0, 0x17e7, 0x1078, 0x1b4d, 0x0078, 0x1854, 0x6010, + 0x2068, 0x2d58, 0x6828, 0xa406, 0x00c0, 0x17f2, 0x682c, 0xa306, + 0x0040, 0x182f, 0x601c, 0xa086, 0x0008, 0x0040, 0x182f, 0x6024, + 0xd0f4, 0x00c0, 0x181c, 0xd0d4, 0x0040, 0x1818, 0x6038, 0xa402, + 0x6034, 0xa303, 0x0040, 0x1806, 0x00c8, 0x1818, 0x643a, 0x6336, + 0x6c2a, 0x6b2e, 0x047e, 0x037e, 0x2400, 0x6c7c, 0xa402, 0x6812, + 0x2300, 0x6b80, 0xa303, 0x6816, 0x037f, 0x047f, 0x0078, 0x181c, + 0x1078, 0x9063, 0x0040, 0x17e3, 0x2001, 0xa774, 0x2004, 0xd0b4, + 0x00c0, 0x182b, 0x6018, 0x2004, 0xd0bc, 0x00c0, 0x182b, 0x6817, + 0x7fff, 0x6813, 0xffff, 0x1078, 0x208a, 0x00c0, 0x17e3, 0x0c7e, + 0x7004, 0x2060, 0x6024, 0xc0d4, 0x6026, 0x0c7f, 0x684c, 0xd0f4, + 0x0040, 0x1840, 0x6817, 0xffff, 0x6813, 0xffff, 0x0078, 0x17e3, + 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, + 0x000f, 0x2009, 0x0011, 0x1078, 0x1855, 0x0040, 0x1853, 0x2009, + 0x0001, 0x1078, 0x1855, 0x2d58, 0x007c, 0x8aff, 0x0040, 0x18ec, + 0xa03e, 0x2730, 0x6850, 0xd0fc, 0x00c0, 0x1877, 0xd0f4, 0x00c0, + 0x1887, 0x0d7e, 0x2804, 0xac68, 0x2900, 0x0079, 0x1867, 0x18ce, + 0x188e, 0x188e, 0x18ce, 0x18ce, 0x18c6, 0x18ce, 0x188e, 0x18ce, + 0x1894, 0x1894, 0x18ce, 0x18ce, 0x18ce, 0x18bd, 0x1894, 0xc0fc, + 0x6852, 0x6b6c, 0x6a70, 0x6d1c, 0x6c20, 0x0d7e, 0xd99c, 0x0040, + 0x18d1, 0x2804, 0xac68, 0x6f08, 0x6e0c, 0x0078, 0x18d1, 0xc0f4, + 0x6852, 0x6b6c, 0x6a70, 0x0d7e, 0x0078, 0x18d8, 0x6b08, 0x6a0c, + 0x6d00, 0x6c04, 0x0078, 0x18d1, 0x7b0c, 0xd3bc, 0x0040, 0x18b5, + 0x7004, 0x0e7e, 0x2070, 0x701c, 0x0e7f, 0xa086, 0x0008, 0x00c0, + 0x18b5, 0x7b08, 0xa39c, 0x0fff, 0x2d20, 0x0d7f, 0x0d7e, 0x6a14, + 0x82ff, 0x00c0, 0x18b0, 0x6810, 0xa302, 0x0048, 0x18b0, 0x6b10, + 0x2011, 0x0000, 0x2468, 0x0078, 0x18b7, 0x6b10, 0x6a14, 0x6d00, + 0x6c04, 0x6f08, 0x6e0c, 0x0078, 0x18d1, 0x0d7f, 0x0d7e, 0x6834, + 0xa084, 0x00ff, 0xa086, 0x001e, 0x00c0, 0x18ce, 0x0d7f, 0x1078, + 0x2026, 0x00c0, 0x1855, 0xa00e, 0x0078, 0x18ec, 0x0d7f, 0x1078, + 0x1332, 0x7b22, 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, + 0x7000, 0x8000, 0x7002, 0x0d7f, 0x6828, 0xa300, 0x682a, 0x682c, + 0xa201, 0x682e, 0x2300, 0x6b10, 0xa302, 0x6812, 0x2200, 0x6a14, + 0xa203, 0x6816, 0x1078, 0x2026, 0x007c, 0x1078, 0x1332, 0x1078, + 0x1c97, 0x7004, 0x2060, 0x0d7e, 0x6010, 0x2068, 0x7003, 0x0000, + 0x1078, 0x1af4, 0x1078, 0x8d16, 0x0040, 0x190c, 0x6808, 0x8001, + 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6850, 0xc0bd, 0x6852, 0x0d7f, 0x1078, 0x8a11, 0x0078, + 0x1adb, 0x1078, 0x1332, 0x127e, 0x2091, 0x2100, 0x007e, 0x017e, + 0x2b68, 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, + 0x00c0, 0x18ef, 0xa184, 0x0003, 0xa086, 0x0003, 0x0040, 0x1911, + 0x7000, 0x0079, 0x192b, 0x1933, 0x1935, 0x1a34, 0x1ab2, 0x1ac9, + 0x1933, 0x1933, 0x1933, 0x1078, 0x1332, 0x8001, 0x7002, 0xa184, + 0x0880, 0x00c0, 0x194a, 0x8aff, 0x0040, 0x19d4, 0x2009, 0x0001, + 0x1078, 0x1855, 0x0040, 0x1adb, 0x2009, 0x0001, 0x1078, 0x1855, + 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, 0x00c0, + 0x19b2, 0x027e, 0x037e, 0x017e, 0x7808, 0xd0ec, 0x00c0, 0x1962, + 0x7c20, 0x7d24, 0x7e30, 0x7f34, 0x7803, 0x0009, 0x7003, 0x0004, + 0x0078, 0x1964, 0x1078, 0x1bd7, 0x017f, 0xd194, 0x0040, 0x196b, + 0x8aff, 0x0040, 0x19a1, 0x6b28, 0x6a2c, 0x2400, 0x686e, 0xa31a, + 0x2500, 0x6872, 0xa213, 0x6b2a, 0x6a2e, 0x0c7e, 0x7004, 0x2060, + 0x6024, 0xd0f4, 0x00c0, 0x197e, 0x633a, 0x6236, 0x0c7f, 0x2400, + 0x6910, 0xa100, 0x6812, 0x2500, 0x6914, 0xa101, 0x6816, 0x037f, + 0x027f, 0x2600, 0x681e, 0x2700, 0x6822, 0x1078, 0x203f, 0x2a00, + 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6850, 0xc0fd, 0x6852, + 0x6808, 0x8001, 0x680a, 0x00c0, 0x19a7, 0x684c, 0xd0e4, 0x0040, + 0x19a7, 0x7004, 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x7000, + 0xa086, 0x0004, 0x0040, 0x1adb, 0x7003, 0x0000, 0x1078, 0x17c1, + 0x0078, 0x1adb, 0x057e, 0x7d0c, 0xd5bc, 0x00c0, 0x19b9, 0x1078, + 0xa58e, 0x057f, 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078, + 0x4963, 0x0040, 0x19c6, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b, + 0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, + 0x6980, 0x6916, 0x0078, 0x1adb, 0x7004, 0x0c7e, 0x2060, 0x6024, + 0x0c7f, 0xd0f4, 0x0040, 0x19e1, 0x6808, 0x8001, 0x680a, 0x0078, + 0x19f5, 0x684c, 0xc0f5, 0x684e, 0x7814, 0xa005, 0x00c0, 0x19f9, + 0x7003, 0x0000, 0x6808, 0x8001, 0x680a, 0x00c0, 0x19f5, 0x7004, + 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x1078, 0x17c1, 0x0078, + 0x1adb, 0x7814, 0x6910, 0xa102, 0x6812, 0x6914, 0xa183, 0x0000, + 0x6816, 0x7814, 0x7908, 0xa18c, 0x0fff, 0xa192, 0x0841, 0x00c8, + 0x18ef, 0xa188, 0x0007, 0x8114, 0x8214, 0x8214, 0xa10a, 0x8104, + 0x8004, 0x8004, 0xa20a, 0x810b, 0x810b, 0x810b, 0x1078, 0x1b5e, + 0x7803, 0x0004, 0x780f, 0xffff, 0x7803, 0x0001, 0x7804, 0xd0fc, + 0x0040, 0x1a1e, 0x7803, 0x0002, 0x7803, 0x0004, 0x780f, 0x0076, + 0x7004, 0x7007, 0x0000, 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, + 0x1078, 0x1b92, 0x0040, 0x19f5, 0x8001, 0x7002, 0xd194, 0x0040, + 0x1a46, 0x7804, 0xd0fc, 0x00c0, 0x191b, 0x8aff, 0x0040, 0x1adb, + 0x2009, 0x0001, 0x1078, 0x1855, 0x0078, 0x1adb, 0xa184, 0x0880, + 0x00c0, 0x1a53, 0x8aff, 0x0040, 0x1adb, 0x2009, 0x0001, 0x1078, + 0x1855, 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, + 0x00c0, 0x1a93, 0x027e, 0x037e, 0x7808, 0xd0ec, 0x00c0, 0x1a66, + 0x7803, 0x0009, 0x7003, 0x0004, 0x0078, 0x1a68, 0x1078, 0x1bd7, + 0x6b28, 0x6a2c, 0x1078, 0x203f, 0x0d7e, 0x0f7e, 0x2d78, 0x2804, + 0xac68, 0x6034, 0xd09c, 0x00c0, 0x1a83, 0x6808, 0x2008, 0xa31a, + 0x680c, 0xa213, 0x7810, 0xa100, 0x7812, 0x690c, 0x7814, 0xa101, + 0x7816, 0x0078, 0x1a8f, 0x6810, 0x2008, 0xa31a, 0x6814, 0xa213, + 0x7810, 0xa100, 0x7812, 0x6914, 0x7814, 0xa101, 0x7816, 0x0f7f, + 0x0d7f, 0x0078, 0x196d, 0x057e, 0x7d0c, 0x1078, 0xa58e, 0x057f, + 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078, 0x4963, 0x0040, + 0x1aa4, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, + 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0xa00d, + 0x0040, 0x1ac5, 0x6808, 0x8001, 0x680a, 0x00c0, 0x1ac5, 0x7004, + 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x1078, 0x17c1, 0x0078, + 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x6010, + 0xa005, 0x0040, 0x1ac5, 0x2068, 0x6808, 0x8000, 0x680a, 0x6c28, + 0x6b2c, 0x1078, 0x17e0, 0x017f, 0x007f, 0x127f, 0x007c, 0x127e, + 0x2091, 0x2100, 0x7000, 0xa086, 0x0003, 0x00c0, 0x1af2, 0x700c, + 0x7110, 0xa106, 0x0040, 0x1af2, 0x20e1, 0x9028, 0x700f, 0xa9ed, + 0x7013, 0xa9ed, 0x127f, 0x007c, 0x0c7e, 0x1078, 0x1b22, 0x20e1, + 0x9028, 0x700c, 0x7110, 0xa106, 0x0040, 0x1b19, 0x2104, 0xa005, + 0x0040, 0x1b08, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, + 0xa188, 0x0003, 0xa182, 0xaa08, 0x0048, 0x1b10, 0x2009, 0xa9ed, + 0x7112, 0x700c, 0xa106, 0x00c0, 0x1af9, 0x2011, 0x0008, 0x0078, + 0x1af9, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0138, 0x2202, + 0x0c7f, 0x007c, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2021, + 0xb015, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x00c0, 0x1b3f, 0x2001, + 0x0109, 0x201c, 0xa39c, 0x0048, 0x00c0, 0x1b3f, 0x2001, 0x0111, + 0x201c, 0x83ff, 0x00c0, 0x1b3f, 0x8421, 0x00c0, 0x1b29, 0x007c, + 0x2011, 0x0201, 0x2009, 0x003c, 0x2204, 0xa005, 0x00c0, 0x1b4c, + 0x8109, 0x00c0, 0x1b44, 0x007c, 0x007c, 0x1078, 0x1b40, 0x0040, + 0x1b55, 0x780c, 0xd0a4, 0x0040, 0x1b5b, 0x1078, 0x1af4, 0xa085, + 0x0001, 0x0078, 0x1b5d, 0x1078, 0x1b92, 0x007c, 0x0e7e, 0x2071, + 0x0200, 0x7808, 0xa084, 0xf000, 0xa10d, 0x1078, 0x1b22, 0x2019, + 0x5000, 0x8319, 0x0040, 0x1b7c, 0x2001, 0xaa08, 0x2004, 0xa086, + 0x0000, 0x0040, 0x1b7c, 0x2001, 0x0021, 0xd0fc, 0x0040, 0x1b69, + 0x1078, 0x1eaa, 0x0078, 0x1b67, 0x20e1, 0x7000, 0x7324, 0x7420, + 0x7028, 0x7028, 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f, + 0x0100, 0x7037, 0x0008, 0x7326, 0x7422, 0x2001, 0x0138, 0x2202, + 0x0e7f, 0x007c, 0x027e, 0x2001, 0x015d, 0x2001, 0x0000, 0x7908, + 0xa18c, 0x0fff, 0xa182, 0x0ffd, 0x0048, 0x1ba0, 0x2009, 0x0000, + 0xa190, 0x0007, 0xa294, 0x1ff8, 0x8214, 0x8214, 0x8214, 0x2001, + 0x020a, 0x82ff, 0x0040, 0x1bb5, 0x20e1, 0x6000, 0x200c, 0x200c, + 0x200c, 0x200c, 0x8211, 0x00c0, 0x1bae, 0x20e1, 0x7000, 0x200c, + 0x200c, 0x7003, 0x0000, 0x20e1, 0x6000, 0x2001, 0x0208, 0x200c, + 0x2001, 0x0209, 0x2004, 0xa106, 0x0040, 0x1bd4, 0x1078, 0x1b40, + 0x0040, 0x1bd2, 0x7908, 0xd1ec, 0x00c0, 0x1bd4, 0x790c, 0xd1a4, + 0x0040, 0x1b97, 0x1078, 0x1af4, 0xa006, 0x027f, 0x007c, 0x7c20, + 0x7d24, 0x7e30, 0x7f34, 0x700c, 0x7110, 0xa106, 0x0040, 0x1c69, + 0x7004, 0x017e, 0x210c, 0xa106, 0x017f, 0x0040, 0x1c69, 0x0d7e, + 0x0c7e, 0x216c, 0x2d00, 0xa005, 0x0040, 0x1c67, 0x681c, 0xa086, + 0x0008, 0x0040, 0x1c67, 0x6824, 0xd0d4, 0x00c0, 0x1c67, 0x6810, + 0x2068, 0x6850, 0xd0fc, 0x0040, 0x1c29, 0x8108, 0x2104, 0x6b2c, + 0xa306, 0x00c0, 0x1c67, 0x8108, 0x2104, 0x6a28, 0xa206, 0x00c0, + 0x1c67, 0x6850, 0xc0fc, 0xc0f5, 0x6852, 0x686c, 0x7822, 0x6870, + 0x7826, 0x681c, 0x7832, 0x6820, 0x7836, 0x6818, 0x2060, 0x6034, + 0xd09c, 0x0040, 0x1c24, 0x6830, 0x2004, 0xac68, 0x6808, 0x783a, + 0x680c, 0x783e, 0x0078, 0x1c65, 0xa006, 0x783a, 0x783e, 0x0078, + 0x1c65, 0x8108, 0x2104, 0xa005, 0x00c0, 0x1c67, 0x6b2c, 0xa306, + 0x00c0, 0x1c67, 0x8108, 0x2104, 0xa005, 0x00c0, 0x1c67, 0x6a28, + 0xa206, 0x00c0, 0x1c67, 0x6850, 0xc0f5, 0x6852, 0x6830, 0x2004, + 0x6918, 0xa160, 0xa180, 0x000d, 0x2004, 0xd09c, 0x00c0, 0x1c57, + 0x6008, 0x7822, 0x686e, 0x600c, 0x7826, 0x6872, 0x6000, 0x7832, + 0x6004, 0x7836, 0xa006, 0x783a, 0x783e, 0x0078, 0x1c65, 0x6010, + 0x7822, 0x686e, 0x6014, 0x7826, 0x6872, 0x6000, 0x7832, 0x6004, + 0x7836, 0x6008, 0x783a, 0x600c, 0x783e, 0x7803, 0x0011, 0x0c7f, + 0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x017e, 0x027e, 0x2071, 0xa9e7, + 0x2079, 0x0030, 0x2011, 0x0050, 0x7000, 0xa086, 0x0000, 0x0040, + 0x1c92, 0x8211, 0x0040, 0x1c90, 0x2001, 0x0005, 0x2004, 0xd08c, + 0x0040, 0x1c79, 0x7904, 0xa18c, 0x0780, 0x017e, 0x1078, 0x1913, + 0x017f, 0x81ff, 0x00c0, 0x1c90, 0x2011, 0x0050, 0x0078, 0x1c74, + 0xa085, 0x0001, 0x027f, 0x017f, 0x0e7f, 0x0f7f, 0x007c, 0x7803, + 0x0004, 0x2009, 0x0064, 0x7804, 0xd0ac, 0x0040, 0x1ce8, 0x8109, + 0x00c0, 0x1c9b, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0003, 0x1048, + 0x1332, 0x1078, 0x1fca, 0x0e7e, 0x0f7e, 0x2071, 0xa9d6, 0x2079, + 0x0010, 0x7004, 0xa086, 0x0000, 0x0040, 0x1ce0, 0x7800, 0x007e, + 0x7820, 0x007e, 0x7830, 0x007e, 0x7834, 0x007e, 0x7838, 0x007e, + 0x783c, 0x007e, 0x7803, 0x0004, 0x7823, 0x0000, 0x0005, 0x0005, + 0x2079, 0x0030, 0x7804, 0xd0ac, 0x10c0, 0x1332, 0x2079, 0x0010, + 0x007f, 0x783e, 0x007f, 0x783a, 0x007f, 0x7836, 0x007f, 0x7832, + 0x007f, 0x7822, 0x007f, 0x7802, 0x0f7f, 0x0e7f, 0x0078, 0x1ce6, + 0x0f7f, 0x0e7f, 0x7804, 0xd0ac, 0x10c0, 0x1332, 0x1078, 0x639b, + 0x007c, 0x0e7e, 0x2071, 0xaa08, 0x7003, 0x0000, 0x0e7f, 0x007c, + 0x0d7e, 0xa280, 0x0004, 0x206c, 0x694c, 0xd1dc, 0x00c0, 0x1d6b, + 0x6934, 0xa184, 0x0007, 0x0079, 0x1cfd, 0x1d05, 0x1d56, 0x1d05, + 0x1d05, 0x1d05, 0x1d3b, 0x1d18, 0x1d07, 0x1078, 0x1332, 0x684c, + 0xd0b4, 0x0040, 0x1e79, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, + 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, 0x6958, 0x0078, 0x1d5e, + 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x00c0, 0x1d05, 0x684c, + 0xd0b4, 0x0040, 0x1e79, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, + 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, 0x6804, 0x681a, 0xa080, + 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, + 0x6958, 0x0078, 0x1d67, 0xa18c, 0x00ff, 0xa186, 0x0015, 0x00c0, + 0x1d6b, 0x684c, 0xd0b4, 0x0040, 0x1e79, 0x6804, 0x681a, 0xa080, + 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, + 0x6958, 0xa006, 0x682e, 0x682a, 0x0078, 0x1d67, 0x684c, 0xd0b4, + 0x0040, 0x18ed, 0x6958, 0xa006, 0x682e, 0x682a, 0x2d00, 0x681a, + 0x6834, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, 0x6926, + 0x684c, 0xc0dd, 0x684e, 0x0d7f, 0x007c, 0x0f7e, 0x2079, 0x0020, + 0x7804, 0xd0fc, 0x10c0, 0x1eaa, 0x0e7e, 0x0d7e, 0x2071, 0xaa08, + 0x7000, 0xa005, 0x00c0, 0x1df0, 0x0c7e, 0x7206, 0xa280, 0x0004, + 0x205c, 0x7004, 0x2068, 0x7803, 0x0004, 0x6818, 0x0d7e, 0x2068, + 0x686c, 0x7812, 0x6890, 0x0f7e, 0x20e1, 0x9040, 0x2079, 0x0200, + 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x0f7f, 0x0d7f, 0x2b68, + 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, + 0x000f, 0x6908, 0x2001, 0x04fd, 0x2004, 0xa086, 0x0007, 0x0040, + 0x1db2, 0xa184, 0x0007, 0x0040, 0x1db2, 0x017e, 0x2009, 0x0008, + 0xa102, 0x017f, 0xa108, 0x791a, 0x7116, 0x701e, 0x680c, 0xa081, + 0x0000, 0x781e, 0x701a, 0xa006, 0x700e, 0x7012, 0x7004, 0x692c, + 0x6814, 0xa106, 0x00c0, 0x1dc9, 0x6928, 0x6810, 0xa106, 0x0040, + 0x1dd6, 0x037e, 0x047e, 0x6b14, 0x6c10, 0x1078, 0x208a, 0x047f, + 0x037f, 0x0040, 0x1dd6, 0x0c7f, 0x0078, 0x1df0, 0x8aff, 0x00c0, + 0x1dde, 0x0c7f, 0xa085, 0x0001, 0x0078, 0x1df0, 0x127e, 0x2091, + 0x8000, 0x2079, 0x0020, 0x2009, 0x0001, 0x1078, 0x1df4, 0x0040, + 0x1ded, 0x2009, 0x0001, 0x1078, 0x1df4, 0x127f, 0x0c7f, 0xa006, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x077e, 0x067e, 0x057e, 0x047e, + 0x037e, 0x027e, 0x8aff, 0x0040, 0x1e72, 0x700c, 0x7214, 0xa23a, + 0x7010, 0x7218, 0xa203, 0x0048, 0x1e71, 0xa705, 0x0040, 0x1e71, + 0xa03e, 0x2730, 0x6850, 0xd0fc, 0x00c0, 0x1e24, 0x0d7e, 0x2804, + 0xac68, 0x2900, 0x0079, 0x1e14, 0x1e53, 0x1e34, 0x1e34, 0x1e53, + 0x1e53, 0x1e4b, 0x1e53, 0x1e34, 0x1e53, 0x1e3a, 0x1e3a, 0x1e53, + 0x1e53, 0x1e53, 0x1e42, 0x1e3a, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, + 0x6d1c, 0x6c20, 0xd99c, 0x0040, 0x1e57, 0x0d7e, 0x2804, 0xac68, + 0x6f08, 0x6e0c, 0x0078, 0x1e56, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, + 0x0078, 0x1e56, 0x6b10, 0x6a14, 0x6d00, 0x6c04, 0x6f08, 0x6e0c, + 0x0078, 0x1e56, 0x0d7f, 0x0d7e, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x00c0, 0x1e53, 0x0d7f, 0x1078, 0x2026, 0x00c0, 0x1dfa, + 0xa00e, 0x0078, 0x1e72, 0x0d7f, 0x1078, 0x1332, 0x0d7f, 0x7b22, + 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, 0x7000, 0x8000, + 0x7002, 0x6828, 0xa300, 0x682a, 0x682c, 0xa201, 0x682e, 0x700c, + 0xa300, 0x700e, 0x7010, 0xa201, 0x7012, 0x1078, 0x2026, 0x0078, + 0x1e72, 0xa006, 0x027f, 0x037f, 0x047f, 0x057f, 0x067f, 0x077f, + 0x007c, 0x1078, 0x1332, 0x027e, 0x2001, 0x0105, 0x2003, 0x0010, + 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, + 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x1e92, 0x6850, + 0xc0bd, 0x6852, 0x0d7f, 0x0c7e, 0x1078, 0x8a11, 0x0c7f, 0x2001, + 0xa9c0, 0x2004, 0xac06, 0x00c0, 0x1ea7, 0x20e1, 0x9040, 0x1078, + 0x738a, 0x2011, 0x0000, 0x1078, 0x70ea, 0x1078, 0x639b, 0x027f, + 0x0078, 0x1f76, 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, 0x0f7e, + 0x0e7e, 0x0d7e, 0x0c7e, 0x2079, 0x0020, 0x2071, 0xaa08, 0x2b68, + 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x00c0, + 0x1e7b, 0x7000, 0x0079, 0x1ec4, 0x1f76, 0x1ec8, 0x1f43, 0x1f74, + 0x8001, 0x7002, 0xd19c, 0x00c0, 0x1edc, 0x8aff, 0x0040, 0x1efb, + 0x2009, 0x0001, 0x1078, 0x1df4, 0x0040, 0x1f76, 0x2009, 0x0001, + 0x1078, 0x1df4, 0x0078, 0x1f76, 0x7803, 0x0004, 0xd194, 0x0040, + 0x1eec, 0x6850, 0xc0fc, 0x6852, 0x8aff, 0x00c0, 0x1ef1, 0x684c, + 0xc0f5, 0x684e, 0x0078, 0x1ef1, 0x1078, 0x203f, 0x6850, 0xc0fd, + 0x6852, 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x7003, + 0x0000, 0x0078, 0x1f76, 0x711c, 0x81ff, 0x0040, 0x1f11, 0x7918, + 0x7922, 0x7827, 0x0000, 0x7803, 0x0001, 0x7000, 0x8000, 0x7002, + 0x700c, 0xa100, 0x700e, 0x7010, 0xa081, 0x0000, 0x7012, 0x0078, + 0x1f76, 0x0f7e, 0x027e, 0x781c, 0x007e, 0x7818, 0x007e, 0x2079, + 0x0100, 0x7a14, 0xa284, 0x0004, 0xa085, 0x0012, 0x7816, 0x037e, + 0x2019, 0x1000, 0x8319, 0x1040, 0x1332, 0x7820, 0xd0bc, 0x00c0, + 0x1f22, 0x037f, 0x79c8, 0x007f, 0xa102, 0x017f, 0x007e, 0x017e, + 0x79c4, 0x007f, 0xa103, 0x78c6, 0x007f, 0x78ca, 0xa284, 0x0004, + 0xa085, 0x0012, 0x7816, 0x027f, 0x0f7f, 0x7803, 0x0008, 0x7003, + 0x0000, 0x0078, 0x1f76, 0x8001, 0x7002, 0xd194, 0x0040, 0x1f58, + 0x7804, 0xd0fc, 0x00c0, 0x1eba, 0xd19c, 0x00c0, 0x1f72, 0x8aff, + 0x0040, 0x1f76, 0x2009, 0x0001, 0x1078, 0x1df4, 0x0078, 0x1f76, + 0x027e, 0x037e, 0x6b28, 0x6a2c, 0x1078, 0x203f, 0x0d7e, 0x2804, + 0xac68, 0x6034, 0xd09c, 0x00c0, 0x1f6b, 0x6808, 0xa31a, 0x680c, + 0xa213, 0x0078, 0x1f6f, 0x6810, 0xa31a, 0x6814, 0xa213, 0x0d7f, + 0x0078, 0x1eec, 0x0078, 0x1eec, 0x1078, 0x1332, 0x0c7f, 0x0d7f, + 0x0e7f, 0x0f7f, 0x017f, 0x007f, 0x127f, 0x007c, 0x0f7e, 0x0e7e, + 0x2071, 0xaa08, 0x7000, 0xa086, 0x0000, 0x0040, 0x1fc7, 0x2079, + 0x0020, 0x017e, 0x2009, 0x0207, 0x210c, 0xd194, 0x0040, 0x1fa4, + 0x2009, 0x020c, 0x210c, 0xa184, 0x0003, 0x0040, 0x1fa4, 0x1078, + 0xa5e2, 0x2001, 0x0133, 0x2004, 0xa005, 0x1040, 0x1332, 0x20e1, + 0x9040, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, + 0x0203, 0x210c, 0xa106, 0x00c0, 0x1faf, 0x20e1, 0x9040, 0x7804, + 0xd0fc, 0x0040, 0x1f8a, 0x1078, 0x1eaa, 0x7000, 0xa086, 0x0000, + 0x00c0, 0x1f8a, 0x017f, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x00c0, + 0x1fbd, 0x20e1, 0x9040, 0x7803, 0x0002, 0x7003, 0x0000, 0x0e7f, + 0x0f7f, 0x007c, 0x027e, 0x0c7e, 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, + 0xaa08, 0x2079, 0x0020, 0x7000, 0xa086, 0x0000, 0x0040, 0x2003, + 0x7004, 0x2060, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x1fed, + 0x6850, 0xc0b5, 0x6852, 0x680c, 0x7a1c, 0xa206, 0x00c0, 0x1fed, + 0x6808, 0x7a18, 0xa206, 0x0040, 0x2009, 0x2001, 0x0105, 0x2003, + 0x0010, 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, + 0x2060, 0x1078, 0x8a11, 0x20e1, 0x9040, 0x1078, 0x738a, 0x2011, + 0x0000, 0x1078, 0x70ea, 0x0f7f, 0x0e7f, 0x0d7f, 0x0c7f, 0x027f, + 0x007c, 0x6810, 0x6a14, 0xa205, 0x00c0, 0x1fed, 0x684c, 0xc0dc, + 0x684e, 0x2c10, 0x1078, 0x1cf0, 0x2001, 0x0105, 0x2003, 0x0010, + 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x2069, 0xa9b1, + 0x6833, 0x0000, 0x683f, 0x0000, 0x0078, 0x2003, 0x8840, 0x2804, + 0xa005, 0x00c0, 0x203a, 0x6004, 0xa005, 0x0040, 0x203c, 0x681a, + 0x2060, 0x6034, 0xa084, 0x000f, 0xa080, 0x206a, 0x2044, 0x88ff, + 0x1040, 0x1332, 0x8a51, 0x007c, 0x2051, 0x0000, 0x007c, 0x8a50, + 0x8841, 0x2804, 0xa005, 0x00c0, 0x2059, 0x2c00, 0xad06, 0x0040, + 0x204e, 0x6000, 0xa005, 0x00c0, 0x204e, 0x2d00, 0x2060, 0x681a, + 0x6034, 0xa084, 0x000f, 0xa080, 0x207a, 0x2044, 0x88ff, 0x1040, + 0x1332, 0x007c, 0x0000, 0x0011, 0x0015, 0x0019, 0x001d, 0x0021, + 0x0025, 0x0029, 0x0000, 0x000f, 0x0015, 0x001b, 0x0021, 0x0027, + 0x0000, 0x0000, 0x0000, 0x205f, 0x205b, 0x0000, 0x0000, 0x2069, + 0x0000, 0x205f, 0x0000, 0x2066, 0x2063, 0x0000, 0x0000, 0x0000, + 0x2069, 0x2066, 0x0000, 0x2061, 0x2061, 0x0000, 0x0000, 0x2069, + 0x0000, 0x2061, 0x0000, 0x2067, 0x2067, 0x0000, 0x0000, 0x0000, + 0x2069, 0x2067, 0x0a7e, 0x097e, 0x087e, 0x6b2e, 0x6c2a, 0x6858, + 0xa055, 0x0040, 0x212d, 0x2d60, 0x6034, 0xa0cc, 0x000f, 0xa9c0, + 0x206a, 0xa986, 0x0007, 0x0040, 0x20a5, 0xa986, 0x000e, 0x0040, + 0x20a5, 0xa986, 0x000f, 0x00c0, 0x20a9, 0x605c, 0xa422, 0x6060, + 0xa31b, 0x2804, 0xa045, 0x00c0, 0x20b7, 0x0050, 0x20b1, 0x0078, + 0x212d, 0x6004, 0xa065, 0x0040, 0x212d, 0x0078, 0x2094, 0x2804, + 0xa005, 0x0040, 0x20d5, 0xac68, 0xd99c, 0x00c0, 0x20c5, 0x6808, + 0xa422, 0x680c, 0xa31b, 0x0078, 0x20c9, 0x6810, 0xa422, 0x6814, + 0xa31b, 0x0048, 0x20f4, 0x2300, 0xa405, 0x0040, 0x20db, 0x8a51, + 0x0040, 0x212d, 0x8840, 0x0078, 0x20b7, 0x6004, 0xa065, 0x0040, + 0x212d, 0x0078, 0x2094, 0x8a51, 0x0040, 0x212d, 0x8840, 0x2804, + 0xa005, 0x00c0, 0x20ee, 0x6004, 0xa065, 0x0040, 0x212d, 0x6034, + 0xa0cc, 0x000f, 0xa9c0, 0x206a, 0x2804, 0x2040, 0x2b68, 0x6850, + 0xc0fc, 0x6852, 0x0078, 0x2121, 0x8422, 0x8420, 0x831a, 0xa399, + 0x0000, 0x0d7e, 0x2b68, 0x6c6e, 0x6b72, 0x0d7f, 0xd99c, 0x00c0, + 0x210f, 0x6908, 0x2400, 0xa122, 0x690c, 0x2300, 0xa11b, 0x1048, + 0x1332, 0x6800, 0xa420, 0x6804, 0xa319, 0x0078, 0x211b, 0x6910, + 0x2400, 0xa122, 0x6914, 0x2300, 0xa11b, 0x1048, 0x1332, 0x6800, + 0xa420, 0x6804, 0xa319, 0x2b68, 0x6c1e, 0x6b22, 0x6850, 0xc0fd, + 0x6852, 0x2c00, 0x681a, 0x2800, 0x6832, 0x2a00, 0x6826, 0x007f, + 0x007f, 0x007f, 0xa006, 0x0078, 0x2132, 0x087f, 0x097f, 0x0a7f, + 0xa085, 0x0001, 0x007c, 0x2001, 0x0005, 0x2004, 0xa084, 0x0007, + 0x0079, 0x213a, 0x2142, 0x2143, 0x2146, 0x2149, 0x214e, 0x2151, + 0x2156, 0x215b, 0x007c, 0x1078, 0x1eaa, 0x007c, 0x1078, 0x1913, + 0x007c, 0x1078, 0x1913, 0x1078, 0x1eaa, 0x007c, 0x1078, 0x14be, + 0x007c, 0x1078, 0x1eaa, 0x1078, 0x14be, 0x007c, 0x1078, 0x1913, + 0x1078, 0x14be, 0x007c, 0x1078, 0x1913, 0x1078, 0x1eaa, 0x1078, + 0x14be, 0x007c, 0x127e, 0x2091, 0x2300, 0x2079, 0x0200, 0x2071, + 0xac80, 0x2069, 0xa700, 0x2009, 0x0004, 0x7912, 0x7817, 0x0004, + 0x1078, 0x251f, 0x781b, 0x0002, 0x20e1, 0x8700, 0x127f, 0x007c, + 0x127e, 0x2091, 0x2300, 0x781c, 0xa084, 0x0007, 0x0079, 0x2180, + 0x21a4, 0x2188, 0x218c, 0x2190, 0x2196, 0x219a, 0x219e, 0x21a2, + 0x1078, 0x548e, 0x0078, 0x21a4, 0x1078, 0x54da, 0x0078, 0x21a4, + 0x1078, 0x548e, 0x1078, 0x54da, 0x0078, 0x21a4, 0x1078, 0x21a6, + 0x0078, 0x21a4, 0x1078, 0x21a6, 0x0078, 0x21a4, 0x1078, 0x21a6, + 0x0078, 0x21a4, 0x1078, 0x21a6, 0x127f, 0x007c, 0x007e, 0x017e, + 0x027e, 0x1078, 0xa5e2, 0x7930, 0xa184, 0x0003, 0x0040, 0x21c9, + 0x2001, 0xa9c0, 0x2004, 0xa005, 0x0040, 0x21c5, 0x2001, 0x0133, + 0x2004, 0xa005, 0x1040, 0x1332, 0x0c7e, 0x2001, 0xa9c0, 0x2064, + 0x1078, 0x8a11, 0x0c7f, 0x0078, 0x21f2, 0x20e1, 0x9040, 0x0078, + 0x21f2, 0xa184, 0x0030, 0x0040, 0x21da, 0x6a00, 0xa286, 0x0003, + 0x00c0, 0x21d4, 0x0078, 0x21d6, 0x1078, 0x4224, 0x20e1, 0x9010, + 0x0078, 0x21f2, 0xa184, 0x00c0, 0x0040, 0x21ec, 0x0e7e, 0x037e, + 0x047e, 0x057e, 0x2071, 0xa9e7, 0x1078, 0x1af4, 0x057f, 0x047f, + 0x037f, 0x0e7f, 0x0078, 0x21f2, 0xa184, 0x0300, 0x0040, 0x21f2, + 0x20e1, 0x9020, 0x7932, 0x027f, 0x017f, 0x007f, 0x007c, 0x017e, + 0x0e7e, 0x0f7e, 0x2071, 0xa700, 0x7128, 0x2001, 0xa990, 0x2102, + 0x2001, 0xa998, 0x2102, 0xa182, 0x0211, 0x00c8, 0x220b, 0x2009, + 0x0008, 0x0078, 0x2235, 0xa182, 0x0259, 0x00c8, 0x2213, 0x2009, + 0x0007, 0x0078, 0x2235, 0xa182, 0x02c1, 0x00c8, 0x221b, 0x2009, + 0x0006, 0x0078, 0x2235, 0xa182, 0x0349, 0x00c8, 0x2223, 0x2009, + 0x0005, 0x0078, 0x2235, 0xa182, 0x0421, 0x00c8, 0x222b, 0x2009, + 0x0004, 0x0078, 0x2235, 0xa182, 0x0581, 0x00c8, 0x2233, 0x2009, + 0x0003, 0x0078, 0x2235, 0x2009, 0x0002, 0x2079, 0x0200, 0x7912, + 0x7817, 0x0004, 0x1078, 0x251f, 0x0f7f, 0x0e7f, 0x017f, 0x007c, + 0x127e, 0x2091, 0x2200, 0x2061, 0x0100, 0x2071, 0xa700, 0x6024, + 0x6026, 0x6053, 0x0030, 0x6033, 0x00ef, 0x60e7, 0x0000, 0x60eb, + 0x00ef, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, + 0x0080, 0x602f, 0x0000, 0x6007, 0x0eaf, 0x600f, 0x00ff, 0x602b, + 0x002f, 0x127f, 0x007c, 0x2001, 0xa730, 0x2003, 0x0000, 0x2001, + 0xa72f, 0x2003, 0x0001, 0x007c, 0x127e, 0x2091, 0x2200, 0x007e, + 0x017e, 0x027e, 0x6124, 0xa184, 0x002c, 0x00c0, 0x227b, 0xa184, + 0x0007, 0x0079, 0x2281, 0xa195, 0x0004, 0xa284, 0x0007, 0x0079, + 0x2281, 0x22ad, 0x2289, 0x228d, 0x2291, 0x2297, 0x229b, 0x22a1, + 0x22a7, 0x1078, 0x5c56, 0x0078, 0x22ad, 0x1078, 0x5d45, 0x0078, + 0x22ad, 0x1078, 0x5d45, 0x1078, 0x5c56, 0x0078, 0x22ad, 0x1078, + 0x22b2, 0x0078, 0x22ad, 0x1078, 0x5c56, 0x1078, 0x22b2, 0x0078, + 0x22ad, 0x1078, 0x5d45, 0x1078, 0x22b2, 0x0078, 0x22ad, 0x1078, + 0x5d45, 0x1078, 0x5c56, 0x1078, 0x22b2, 0x027f, 0x017f, 0x007f, + 0x127f, 0x007c, 0x6124, 0xd1ac, 0x0040, 0x23ac, 0x017e, 0x047e, + 0x0c7e, 0x644c, 0xa486, 0xf0f0, 0x00c0, 0x22c5, 0x2061, 0x0100, + 0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74c6, 0xa48c, 0xff00, + 0x7034, 0xd084, 0x0040, 0x22dd, 0xa186, 0xf800, 0x00c0, 0x22dd, + 0x703c, 0xd084, 0x00c0, 0x22dd, 0xc085, 0x703e, 0x037e, 0x2418, + 0x2011, 0x8016, 0x1078, 0x361b, 0x037f, 0xa196, 0xff00, 0x0040, + 0x231f, 0x6030, 0xa084, 0x00ff, 0x810f, 0xa116, 0x0040, 0x231f, + 0x7130, 0xd184, 0x00c0, 0x231f, 0x2011, 0xa753, 0x2214, 0xd2ec, + 0x0040, 0x22fa, 0xc18d, 0x7132, 0x2011, 0xa753, 0x2214, 0xd2ac, + 0x00c0, 0x231f, 0x6240, 0xa294, 0x0010, 0x0040, 0x2306, 0x6248, + 0xa294, 0xff00, 0xa296, 0xff00, 0x0040, 0x231f, 0x7030, 0xd08c, + 0x0040, 0x2371, 0x7034, 0xd08c, 0x00c0, 0x2316, 0x2001, 0xa70c, + 0x200c, 0xd1ac, 0x00c0, 0x2371, 0xc1ad, 0x2102, 0x037e, 0x73c4, + 0x2011, 0x8013, 0x1078, 0x361b, 0x037f, 0x0078, 0x2371, 0x7034, + 0xd08c, 0x00c0, 0x232b, 0x2001, 0xa70c, 0x200c, 0xd1ac, 0x00c0, + 0x2371, 0xc1ad, 0x2102, 0x037e, 0x73c4, 0x2011, 0x8013, 0x1078, + 0x361b, 0x037f, 0x7130, 0xc185, 0x7132, 0x2011, 0xa753, 0x220c, + 0xd1a4, 0x0040, 0x2355, 0x017e, 0x2009, 0x0001, 0x2011, 0x0100, + 0x1078, 0x5bf1, 0x2019, 0x000e, 0x1078, 0xa1a5, 0xa484, 0x00ff, + 0xa080, 0x29c0, 0x200c, 0xa18c, 0xff00, 0x810f, 0x8127, 0xa006, + 0x2009, 0x000e, 0x1078, 0xa22d, 0x017f, 0xd1ac, 0x00c0, 0x2362, + 0x017e, 0x2009, 0x0000, 0x2019, 0x0004, 0x1078, 0x284f, 0x017f, + 0x0078, 0x2371, 0x157e, 0x20a9, 0x007f, 0x2009, 0x0000, 0x1078, + 0x45c4, 0x00c0, 0x236d, 0x1078, 0x42f8, 0x8108, 0x00f0, 0x2367, + 0x157f, 0x0c7f, 0x047f, 0x0f7e, 0x2079, 0xa9c4, 0x783c, 0xa086, + 0x0000, 0x0040, 0x2383, 0x6027, 0x0004, 0x783f, 0x0000, 0x2079, + 0x0140, 0x7803, 0x0000, 0x0f7f, 0x2011, 0x0003, 0x1078, 0x70e0, + 0x2011, 0x0002, 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, 0x2019, + 0x0000, 0x1078, 0x7058, 0x037f, 0x60e3, 0x0000, 0x017f, 0x2001, + 0xa700, 0x2014, 0xa296, 0x0004, 0x00c0, 0x23a4, 0xd19c, 0x00c0, + 0x23ac, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0xa722, + 0x2003, 0x0000, 0x6027, 0x0020, 0xd194, 0x0040, 0x2490, 0x0f7e, + 0x2079, 0xa9c4, 0x783c, 0xa086, 0x0001, 0x00c0, 0x23d0, 0x017e, + 0x6027, 0x0004, 0x783f, 0x0000, 0x2079, 0x0140, 0x7803, 0x1000, + 0x7803, 0x0000, 0x2079, 0xa9b1, 0x7807, 0x0000, 0x7833, 0x0000, + 0x1078, 0x62d1, 0x1078, 0x639b, 0x017f, 0x0f7f, 0x0078, 0x2490, + 0x0f7f, 0x017e, 0x3900, 0xa082, 0xaae3, 0x00c8, 0x23db, 0x017e, + 0x1078, 0x747a, 0x017f, 0x6220, 0xd2b4, 0x0040, 0x2446, 0x1078, + 0x5acb, 0x1078, 0x6e0f, 0x6027, 0x0004, 0x0f7e, 0x2019, 0xa9ba, + 0x2304, 0xa07d, 0x0040, 0x241c, 0x7804, 0xa086, 0x0032, 0x00c0, + 0x241c, 0x0d7e, 0x0c7e, 0x0e7e, 0x2069, 0x0140, 0x618c, 0x6288, + 0x7818, 0x608e, 0x7808, 0x608a, 0x6043, 0x0002, 0x2001, 0x0003, + 0x8001, 0x00c0, 0x2400, 0x6043, 0x0000, 0x6803, 0x1000, 0x6803, + 0x0000, 0x618e, 0x628a, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x7810, + 0x2070, 0x7037, 0x0103, 0x2f60, 0x1078, 0x772d, 0x0e7f, 0x0c7f, + 0x0d7f, 0x0f7f, 0x017f, 0x007c, 0x0f7f, 0x0d7e, 0x2069, 0x0140, + 0x6804, 0xa084, 0x4000, 0x0040, 0x2429, 0x6803, 0x1000, 0x6803, + 0x0000, 0x0d7f, 0x0c7e, 0x2061, 0xa9b1, 0x6028, 0xa09a, 0x00c8, + 0x00c8, 0x2439, 0x8000, 0x602a, 0x0c7f, 0x1078, 0x6e01, 0x0078, + 0x248f, 0x2019, 0xa9ba, 0x2304, 0xa065, 0x0040, 0x2443, 0x2009, + 0x0027, 0x1078, 0x775c, 0x0c7f, 0x0078, 0x248f, 0xd2bc, 0x0040, + 0x248f, 0x1078, 0x5ad8, 0x6017, 0x0010, 0x6027, 0x0004, 0x0d7e, + 0x2069, 0x0140, 0x6804, 0xa084, 0x4000, 0x0040, 0x245b, 0x6803, + 0x1000, 0x6803, 0x0000, 0x0d7f, 0x0c7e, 0x2061, 0xa9b1, 0x6044, + 0xa09a, 0x00c8, 0x00c8, 0x247e, 0x8000, 0x6046, 0x603c, 0x0c7f, + 0xa005, 0x0040, 0x248f, 0x2009, 0x07d0, 0x1078, 0x5ad0, 0xa080, + 0x0007, 0x2004, 0xa086, 0x0006, 0x00c0, 0x247a, 0x6017, 0x0012, + 0x0078, 0x248f, 0x6017, 0x0016, 0x0078, 0x248f, 0x037e, 0x2019, + 0x0001, 0x1078, 0x7058, 0x037f, 0x2019, 0xa9c0, 0x2304, 0xa065, + 0x0040, 0x248e, 0x2009, 0x004f, 0x1078, 0x775c, 0x0c7f, 0x017f, + 0xd19c, 0x0040, 0x24e4, 0x7034, 0xd0ac, 0x00c0, 0x24c1, 0x017e, + 0x157e, 0x6027, 0x0008, 0x602f, 0x0020, 0x20a9, 0x000a, 0x00f0, + 0x249f, 0x602f, 0x0000, 0x6150, 0xa185, 0x1400, 0x6052, 0x20a9, + 0x0320, 0x00e0, 0x24a9, 0x2091, 0x6000, 0x6020, 0xd09c, 0x00c0, + 0x24b8, 0x157f, 0x6152, 0x017f, 0x6027, 0x0008, 0x0078, 0x24e4, + 0x1078, 0x2577, 0x00f0, 0x24a9, 0x157f, 0x6152, 0x017f, 0x6027, + 0x0008, 0x017e, 0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, 0x1078, + 0x70e0, 0x2011, 0x0002, 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, + 0x2019, 0x0000, 0x1078, 0x7058, 0x037f, 0x60e3, 0x0000, 0x1078, + 0xa5bd, 0x1078, 0xa5db, 0x2001, 0xa700, 0x2003, 0x0004, 0x6027, + 0x0008, 0x1078, 0x1246, 0x017f, 0xa18c, 0xffd0, 0x6126, 0x007c, + 0x007e, 0x017e, 0x027e, 0x0e7e, 0x0f7e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa700, 0x71bc, 0x70be, 0xa116, 0x0040, 0x2518, 0x81ff, + 0x0040, 0x2500, 0x2011, 0x8011, 0x1078, 0x361b, 0x0078, 0x2518, + 0x2011, 0x8012, 0x1078, 0x361b, 0x2001, 0xa772, 0x2004, 0xd0fc, + 0x00c0, 0x2518, 0x037e, 0x0c7e, 0x1078, 0x6f9f, 0x2061, 0x0100, + 0x2019, 0x0028, 0x2009, 0x0000, 0x1078, 0x284f, 0x0c7f, 0x037f, + 0x127f, 0x0f7f, 0x0e7f, 0x027f, 0x017f, 0x007f, 0x007c, 0x0c7e, + 0x0f7e, 0x007e, 0x027e, 0x2061, 0x0100, 0xa190, 0x253b, 0x2204, + 0x60f2, 0x2011, 0x2548, 0x6000, 0xa082, 0x0003, 0x00c8, 0x2534, + 0x2001, 0x00ff, 0x0078, 0x2535, 0x2204, 0x60ee, 0x027f, 0x007f, + 0x0f7f, 0x0c7f, 0x007c, 0x0840, 0x0840, 0x0840, 0x0580, 0x0420, + 0x0348, 0x02c0, 0x0258, 0x0210, 0x01a8, 0x01a8, 0x01a8, 0x01a8, + 0x0140, 0x00f8, 0x00d0, 0x00b0, 0x00a0, 0x2028, 0xa18c, 0x00ff, + 0x2130, 0xa094, 0xff00, 0x00c0, 0x2558, 0x81ff, 0x0040, 0x255c, + 0x1078, 0x5761, 0x0078, 0x2563, 0xa080, 0x29c0, 0x200c, 0xa18c, + 0xff00, 0x810f, 0xa006, 0x007c, 0xa080, 0x29c0, 0x200c, 0xa18c, + 0x00ff, 0x007c, 0x0c7e, 0x2061, 0xa700, 0x6030, 0x0040, 0x2573, + 0xc09d, 0x0078, 0x2574, 0xc09c, 0x6032, 0x0c7f, 0x007c, 0x007e, + 0x157e, 0x0f7e, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd08c, + 0x00c0, 0x2584, 0x00f0, 0x257e, 0x0f7f, 0x157f, 0x007f, 0x007c, + 0x0c7e, 0x007e, 0x2061, 0x0100, 0x6030, 0x007e, 0x6048, 0x007e, + 0x60e4, 0x007e, 0x60e8, 0x007e, 0x6050, 0x007e, 0x60f0, 0x007e, + 0x60ec, 0x007e, 0x600c, 0x007e, 0x6004, 0x007e, 0x6028, 0x007e, + 0x60e0, 0x007e, 0x602f, 0x0100, 0x602f, 0x0000, 0x0005, 0x0005, + 0x0005, 0x0005, 0x602f, 0x0040, 0x602f, 0x0000, 0x007f, 0x60e2, + 0x007f, 0x602a, 0x007f, 0x6006, 0x007f, 0x600e, 0x007f, 0x60ee, + 0x007f, 0x60f2, 0x007f, 0x6052, 0x007f, 0x60ea, 0x007f, 0x60e6, + 0x007f, 0x604a, 0x007f, 0x6032, 0x007f, 0x0c7f, 0x007c, 0x25e7, + 0x25eb, 0x25ef, 0x25f5, 0x25fb, 0x2601, 0x2607, 0x260f, 0x2617, + 0x261d, 0x2623, 0x262b, 0x2633, 0x263b, 0x2643, 0x264d, 0x2657, + 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, + 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x107e, + 0x007e, 0x0078, 0x2670, 0x107e, 0x007e, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x226c, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x0078, + 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2133, 0x1078, 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x226c, 0x1078, 0x2133, 0x1078, 0x2178, 0x0078, 0x2670, 0x0005, + 0x0078, 0x2657, 0xb084, 0x003c, 0x8004, 0x8004, 0x0079, 0x2660, + 0x2670, 0x25ed, 0x25f1, 0x25f7, 0x25fd, 0x2603, 0x2609, 0x2611, + 0x2619, 0x261f, 0x2625, 0x262d, 0x2635, 0x263d, 0x2645, 0x264f, + 0x0008, 0x265a, 0x007f, 0x107f, 0x2091, 0x8001, 0x007c, 0x0c7e, + 0x027e, 0x047e, 0x2021, 0x0000, 0x1078, 0x4967, 0x00c0, 0x2772, + 0x70cc, 0xd09c, 0x0040, 0x268e, 0xd084, 0x00c0, 0x268e, 0xd0bc, + 0x00c0, 0x2772, 0x1078, 0x2776, 0x0078, 0x2772, 0xd0cc, 0x00c0, + 0x2772, 0xd094, 0x0040, 0x2698, 0x7097, 0xffff, 0x0078, 0x2772, + 0x2001, 0x010c, 0x203c, 0x7284, 0xd284, 0x0040, 0x2701, 0xd28c, + 0x00c0, 0x2701, 0x037e, 0x7394, 0xa38e, 0xffff, 0x0040, 0x26ab, + 0x83ff, 0x00c0, 0x26ad, 0x2019, 0x0001, 0x8314, 0xa2e0, 0xadc0, + 0x2c04, 0xa38c, 0x0001, 0x0040, 0x26ba, 0xa084, 0xff00, 0x8007, + 0x0078, 0x26bc, 0xa084, 0x00ff, 0xa70e, 0x0040, 0x26f6, 0xa08e, + 0x0000, 0x0040, 0x26f6, 0xa08e, 0x00ff, 0x00c0, 0x26d3, 0x7230, + 0xd284, 0x00c0, 0x26fc, 0x7284, 0xc28d, 0x7286, 0x7097, 0xffff, + 0x037f, 0x0078, 0x2701, 0x2009, 0x0000, 0x1078, 0x254d, 0x1078, + 0x455c, 0x00c0, 0x26f9, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x00c0, 0x26f0, 0x7030, 0xd08c, 0x0040, 0x26ea, 0x6000, 0xd0bc, + 0x0040, 0x26f0, 0x1078, 0x278c, 0x0040, 0x26f9, 0x0078, 0x26f6, + 0x1078, 0x28c4, 0x1078, 0x27b9, 0x0040, 0x26f9, 0x8318, 0x0078, + 0x26ad, 0x7396, 0x0078, 0x26fe, 0x7097, 0xffff, 0x037f, 0x0078, + 0x2772, 0xa780, 0x29c0, 0x203c, 0xa7bc, 0xff00, 0x873f, 0x2041, + 0x007e, 0x7094, 0xa096, 0xffff, 0x00c0, 0x2713, 0x2009, 0x0000, + 0x28a8, 0x0078, 0x271f, 0xa812, 0x0048, 0x271b, 0x2008, 0xa802, + 0x20a8, 0x0078, 0x271f, 0x7097, 0xffff, 0x0078, 0x2772, 0x2700, + 0x157e, 0x017e, 0xa106, 0x0040, 0x2766, 0xc484, 0x1078, 0x45c4, + 0x0040, 0x2730, 0x1078, 0x455c, 0x00c0, 0x276f, 0x0078, 0x2731, + 0xc485, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x2740, + 0x7030, 0xd08c, 0x0040, 0x275e, 0x6000, 0xd0bc, 0x00c0, 0x275e, + 0x7284, 0xd28c, 0x0040, 0x2756, 0x6004, 0xa084, 0x00ff, 0xa082, + 0x0006, 0x0048, 0x2766, 0xd484, 0x00c0, 0x2752, 0x1078, 0x457f, + 0x0078, 0x2754, 0x1078, 0x298e, 0x0078, 0x2766, 0x1078, 0x28c4, + 0x1078, 0x27b9, 0x0040, 0x276f, 0x0078, 0x2766, 0x1078, 0x2959, + 0x0040, 0x2766, 0x1078, 0x278c, 0x0040, 0x276f, 0x017f, 0x8108, + 0x157f, 0x00f0, 0x271f, 0x7097, 0xffff, 0x0078, 0x2772, 0x017f, + 0x157f, 0x7196, 0x047f, 0x027f, 0x0c7f, 0x007c, 0x0c7e, 0x017e, + 0x7097, 0x0001, 0x2009, 0x007e, 0x1078, 0x455c, 0x00c0, 0x2789, + 0x1078, 0x28c4, 0x1078, 0x27b9, 0x0040, 0x2789, 0x70cc, 0xc0bd, + 0x70ce, 0x017f, 0x0c7f, 0x007c, 0x017e, 0x077e, 0x0d7e, 0x0c7e, + 0x2c68, 0x2001, 0xa757, 0x2004, 0xa084, 0x00ff, 0x6842, 0x1078, + 0x76c7, 0x0040, 0x27b4, 0x2d00, 0x601a, 0x601f, 0x0001, 0x2001, + 0x0000, 0x1078, 0x44ee, 0x2001, 0x0000, 0x1078, 0x4502, 0x127e, + 0x2091, 0x8000, 0x7090, 0x8000, 0x7092, 0x127f, 0x2009, 0x0004, + 0x1078, 0x775c, 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, + 0x007c, 0x017e, 0x077e, 0x0d7e, 0x0c7e, 0x2c68, 0x2001, 0xa757, + 0x2004, 0xa084, 0x00ff, 0x6842, 0x1078, 0x9197, 0x0040, 0x27f2, + 0x2d00, 0x601a, 0x6800, 0xc0c4, 0x6802, 0x68a0, 0xa086, 0x007e, + 0x0040, 0x27db, 0x6804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, + 0x27db, 0x1078, 0x2880, 0x601f, 0x0001, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x127e, 0x2091, 0x8000, + 0x7090, 0x8000, 0x7092, 0x127f, 0x2009, 0x0002, 0x1078, 0x775c, + 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, 0x007c, 0x0c7e, + 0x027e, 0x2009, 0x0080, 0x1078, 0x455c, 0x00c0, 0x2805, 0x1078, + 0x2808, 0x0040, 0x2805, 0x70d3, 0xffff, 0x027f, 0x0c7f, 0x007c, + 0x017e, 0x077e, 0x0d7e, 0x0c7e, 0x2c68, 0x1078, 0x76c7, 0x0040, + 0x282a, 0x2d00, 0x601a, 0x601f, 0x0001, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x127e, 0x2091, 0x8000, + 0x70d4, 0x8000, 0x70d6, 0x127f, 0x2009, 0x0002, 0x1078, 0x775c, + 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, 0x007c, 0x0c7e, + 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2009, 0x007f, 0x1078, 0x455c, + 0x00c0, 0x284b, 0x2c68, 0x1078, 0x76c7, 0x0040, 0x284b, 0x2d00, + 0x601a, 0x6312, 0x601f, 0x0001, 0x620a, 0x2009, 0x0022, 0x1078, + 0x775c, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x0c7f, 0x007c, 0x0e7e, + 0x0c7e, 0x067e, 0x037e, 0x027e, 0x1078, 0x5f0e, 0x1078, 0x5eae, + 0x1078, 0x8068, 0x2130, 0x81ff, 0x0040, 0x2864, 0x20a9, 0x007e, + 0x2009, 0x0000, 0x0078, 0x2868, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x017e, 0x1078, 0x45c4, 0x00c0, 0x2871, 0x1078, 0x47e9, 0x1078, + 0x42f8, 0x017f, 0x8108, 0x00f0, 0x2868, 0x86ff, 0x00c0, 0x287a, + 0x1078, 0x119b, 0x027f, 0x037f, 0x067f, 0x0c7f, 0x0e7f, 0x007c, + 0x0e7e, 0x0c7e, 0x037e, 0x027e, 0x017e, 0x6218, 0x2270, 0x72a0, + 0x027e, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, + 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f9b, 0x077f, 0x017f, 0x2e60, + 0x1078, 0x47e9, 0x6210, 0x6314, 0x1078, 0x42f8, 0x6212, 0x6316, + 0x017f, 0x027f, 0x037f, 0x0c7f, 0x0e7f, 0x007c, 0x0e7e, 0x007e, + 0x6018, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x00c0, 0x28ba, 0x2071, + 0xa700, 0x7090, 0xa005, 0x0040, 0x28b7, 0x8001, 0x7092, 0x007f, + 0x0e7f, 0x007c, 0x2071, 0xa700, 0x70d4, 0xa005, 0x0040, 0x28b7, + 0x8001, 0x70d6, 0x0078, 0x28b7, 0x6000, 0xc08c, 0x6002, 0x007c, + 0x0f7e, 0x0e7e, 0x0c7e, 0x037e, 0x027e, 0x017e, 0x157e, 0x2178, + 0x81ff, 0x00c0, 0x28d7, 0x20a9, 0x0001, 0x0078, 0x28f2, 0x2001, + 0xa753, 0x2004, 0xd0c4, 0x0040, 0x28ee, 0xd0a4, 0x0040, 0x28ee, + 0x047e, 0x6018, 0xa080, 0x0028, 0x2024, 0xa4a4, 0x00ff, 0x8427, + 0xa006, 0x2009, 0x002d, 0x1078, 0xa22d, 0x047f, 0x20a9, 0x00ff, + 0x2011, 0x0000, 0x027e, 0xa28e, 0x007e, 0x0040, 0x2936, 0xa28e, + 0x007f, 0x0040, 0x2936, 0xa28e, 0x0080, 0x0040, 0x2936, 0xa288, + 0xa835, 0x210c, 0x81ff, 0x0040, 0x2936, 0x8fff, 0x1040, 0x2942, + 0x0c7e, 0x2160, 0x2001, 0x0001, 0x1078, 0x4972, 0x0c7f, 0x2019, + 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, + 0x0c7e, 0x027e, 0x2160, 0x6204, 0xa294, 0x00ff, 0xa286, 0x0006, + 0x00c0, 0x2926, 0x6007, 0x0404, 0x0078, 0x292b, 0x2001, 0x0004, + 0x8007, 0xa215, 0x6206, 0x027f, 0x0c7f, 0x017e, 0x2c08, 0x1078, + 0x9f9b, 0x017f, 0x077f, 0x2160, 0x1078, 0x47e9, 0x027f, 0x8210, + 0x00f0, 0x28f2, 0x157f, 0x017f, 0x027f, 0x037f, 0x0c7f, 0x0e7f, + 0x0f7f, 0x007c, 0x047e, 0x027e, 0x017e, 0x2001, 0xa753, 0x2004, + 0xd0c4, 0x0040, 0x2955, 0xd0a4, 0x0040, 0x2955, 0xa006, 0x2220, + 0x8427, 0x2009, 0x0029, 0x1078, 0xa22d, 0x017f, 0x027f, 0x047f, + 0x007c, 0x017e, 0x027e, 0x037e, 0x0c7e, 0x7284, 0x82ff, 0x0040, + 0x2987, 0xa290, 0xa753, 0x2214, 0xd2ac, 0x00c0, 0x2987, 0x2100, + 0x1078, 0x2564, 0x81ff, 0x0040, 0x2989, 0x2019, 0x0001, 0x8314, + 0xa2e0, 0xadc0, 0x2c04, 0xd384, 0x0040, 0x297b, 0xa084, 0xff00, + 0x8007, 0x0078, 0x297d, 0xa084, 0x00ff, 0xa116, 0x0040, 0x2989, + 0xa096, 0x00ff, 0x0040, 0x2987, 0x8318, 0x0078, 0x296f, 0xa085, + 0x0001, 0x0c7f, 0x037f, 0x027f, 0x017f, 0x007c, 0x017e, 0x0c7e, + 0x127e, 0x2091, 0x8000, 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, + 0x2019, 0x0029, 0x1078, 0x73d0, 0x027f, 0x1078, 0xa501, 0x037f, + 0x027f, 0x017f, 0xa180, 0xa835, 0x2004, 0xa065, 0x0040, 0x29b7, + 0x017e, 0x0c7e, 0x1078, 0x9197, 0x017f, 0x1040, 0x1332, 0x611a, + 0x1078, 0x2880, 0x1078, 0x772d, 0x017f, 0x1078, 0x457f, 0x127f, + 0x0c7f, 0x017f, 0x007c, 0x2001, 0xa733, 0x2004, 0xd0cc, 0x007c, + 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, + 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, + 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, + 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, + 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, + 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, + 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, + 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, + 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, + 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, + 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, + 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, + 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, + 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, + 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, + 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, + 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, + 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, + 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, + 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, + 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, + 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, + 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, + 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, + 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, + 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, + 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, + 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, + 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x2071, 0xa782, 0x7003, 0x0002, 0xa006, 0x7012, 0x7016, 0x703a, + 0x703e, 0x7033, 0xa792, 0x7037, 0xa792, 0x7007, 0x0001, 0x2061, + 0xa7d2, 0x6003, 0x0002, 0x007c, 0x0090, 0x2ae7, 0x0068, 0x2ae7, + 0x2071, 0xa782, 0x2b78, 0x7818, 0xd084, 0x00c0, 0x2ae7, 0x2a60, + 0x7820, 0xa08e, 0x0069, 0x00c0, 0x2bd7, 0x0079, 0x2b6b, 0x007c, + 0x2071, 0xa782, 0x7004, 0x0079, 0x2aed, 0x2af1, 0x2af2, 0x2afc, + 0x2b0e, 0x007c, 0x0090, 0x2afb, 0x0068, 0x2afb, 0x2b78, 0x7818, + 0xd084, 0x0040, 0x2b1a, 0x007c, 0x2b78, 0x2061, 0xa7d2, 0x6008, + 0xa08e, 0x0100, 0x0040, 0x2b09, 0xa086, 0x0200, 0x0040, 0x2bcf, + 0x007c, 0x7014, 0x2068, 0x2a60, 0x7018, 0x007a, 0x7010, 0x2068, + 0x6834, 0xa086, 0x0103, 0x0040, 0x2b16, 0x007c, 0x2a60, 0x2b78, + 0x7018, 0x007a, 0x2a60, 0x7820, 0xa08a, 0x0040, 0x00c8, 0x2b23, + 0x61bc, 0x0079, 0x2b2b, 0x2100, 0xa08a, 0x003f, 0x00c8, 0x2bcb, + 0x61bc, 0x0079, 0x2b6b, 0x2bad, 0x2bdf, 0x2be7, 0x2beb, 0x2bf3, + 0x2bf9, 0x2bfd, 0x2c09, 0x2c0d, 0x2c17, 0x2c1b, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2c1f, 0x2bcb, 0x2c2f, 0x2c46, 0x2c5d, 0x2cdd, 0x2ce2, + 0x2d0f, 0x2d69, 0x2d7a, 0x2d98, 0x2dd9, 0x2de3, 0x2df0, 0x2e03, + 0x2e22, 0x2e2b, 0x2e68, 0x2e6e, 0x2bcb, 0x2e8a, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2e91, 0x2e9b, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2ea3, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2eb5, 0x2ece, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2ee0, 0x2f37, 0x2f95, 0x2fa9, 0x2bcb, + 0x2bcb, 0x2bcb, 0x398e, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2c17, 0x2c1b, 0x2fc0, 0x2bcb, 0x2fcd, + 0x3a26, 0x3a83, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x301a, 0x314f, 0x316b, 0x3177, 0x31da, + 0x3233, 0x323e, 0x327d, 0x328c, 0x329b, 0x329e, 0x2fd1, 0x32c2, + 0x331e, 0x332b, 0x343c, 0x356f, 0x3599, 0x36a6, 0x2bcb, 0x36b6, + 0x36f0, 0x37bf, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x3827, 0x3843, + 0x38bd, 0x3977, 0x713c, 0x0078, 0x2bad, 0x2021, 0x4000, 0x1078, + 0x35f5, 0x127e, 0x2091, 0x8000, 0x0068, 0x2bba, 0x7818, 0xd084, + 0x0040, 0x2bbd, 0x127f, 0x0078, 0x2bb1, 0x7c22, 0x7926, 0x7a2a, + 0x7b2e, 0x781b, 0x0001, 0x2091, 0x4080, 0x7007, 0x0001, 0x2091, + 0x5000, 0x127f, 0x007c, 0x2021, 0x4001, 0x0078, 0x2baf, 0x2021, + 0x4002, 0x0078, 0x2baf, 0x2021, 0x4003, 0x0078, 0x2baf, 0x2021, + 0x4005, 0x0078, 0x2baf, 0x2021, 0x4006, 0x0078, 0x2baf, 0xa02e, + 0x2520, 0x7b28, 0x7a2c, 0x7824, 0x7930, 0x0078, 0x3604, 0x7823, + 0x0004, 0x7824, 0x007a, 0xa02e, 0x2520, 0x7b28, 0x7a2c, 0x7824, + 0x7930, 0x0078, 0x3608, 0x7924, 0x7828, 0x2114, 0x200a, 0x0078, + 0x2bad, 0x7924, 0x2114, 0x0078, 0x2bad, 0x2099, 0x0009, 0x20a1, + 0x0009, 0x20a9, 0x0007, 0x53a3, 0x7924, 0x7a28, 0x7b2c, 0x0078, + 0x2bad, 0x7824, 0x2060, 0x0078, 0x2c21, 0x2009, 0x0001, 0x2011, + 0x0013, 0x2019, 0x0019, 0x783b, 0x0017, 0x0078, 0x2bad, 0x7d38, + 0x7c3c, 0x0078, 0x2be1, 0x7d38, 0x7c3c, 0x0078, 0x2bed, 0x2061, + 0x1000, 0x610c, 0xa006, 0x2c14, 0xa200, 0x8c60, 0x8109, 0x00c0, + 0x2c23, 0x2010, 0xa005, 0x0040, 0x2bad, 0x0078, 0x2bd3, 0x2069, + 0xa752, 0x7824, 0x7930, 0xa11a, 0x00c8, 0x2bdb, 0x8019, 0x0040, + 0x2bdb, 0x684a, 0x6942, 0x782c, 0x6852, 0x7828, 0x6856, 0xa006, + 0x685a, 0x685e, 0x1078, 0x4eae, 0x0078, 0x2bad, 0x2069, 0xa752, + 0x7824, 0x7934, 0xa11a, 0x00c8, 0x2bdb, 0x8019, 0x0040, 0x2bdb, + 0x684e, 0x6946, 0x782c, 0x6862, 0x7828, 0x6866, 0xa006, 0x686a, + 0x686e, 0x1078, 0x4a3e, 0x0078, 0x2bad, 0xa02e, 0x2520, 0x81ff, + 0x00c0, 0x2bd7, 0x7924, 0x7b28, 0x7a2c, 0x20a9, 0x0005, 0x20a1, + 0xa789, 0x41a1, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x2009, 0x0020, + 0x1078, 0x3604, 0x701b, 0x2c75, 0x007c, 0x6834, 0x2008, 0xa084, + 0x00ff, 0xa096, 0x0011, 0x0040, 0x2c85, 0xa096, 0x0019, 0x0040, + 0x2c85, 0xa096, 0x0015, 0x00c0, 0x2bd7, 0x810f, 0xa18c, 0x00ff, + 0x0040, 0x2bd7, 0x710e, 0x700c, 0x8001, 0x0040, 0x2cb6, 0x700e, + 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x2009, 0x0020, 0x2061, 0xa7d2, + 0x6224, 0x6328, 0x642c, 0x6530, 0xa290, 0x0040, 0xa399, 0x0000, + 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0x1078, 0x3604, 0x701b, 0x2ca9, + 0x007c, 0x6834, 0xa084, 0x00ff, 0xa096, 0x0002, 0x0040, 0x2cb4, + 0xa096, 0x000a, 0x00c0, 0x2bd7, 0x0078, 0x2c8b, 0x7010, 0x2068, + 0x6838, 0xc0fd, 0x683a, 0x1078, 0x4431, 0x00c0, 0x2cc4, 0x7007, + 0x0003, 0x701b, 0x2cc6, 0x007c, 0x1078, 0x4b51, 0x127e, 0x2091, + 0x8000, 0x20a9, 0x0005, 0x2099, 0xa789, 0x530a, 0x2100, 0xa210, + 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0xad80, 0x000d, + 0x2009, 0x0020, 0x127f, 0x0078, 0x3608, 0x61a4, 0x7824, 0x60a6, + 0x0078, 0x2bad, 0x2091, 0x8000, 0x7823, 0x4000, 0x7827, 0x4953, + 0x782b, 0x5020, 0x782f, 0x2020, 0x2009, 0x017f, 0x2104, 0x7832, + 0x3f00, 0x7836, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, 0x603c, + 0x8007, 0xa205, 0x783a, 0x2009, 0x04fd, 0x2104, 0x783e, 0x781b, + 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2071, 0x0010, 0x20c1, + 0x00f0, 0xa08a, 0x0003, 0x00c8, 0x0427, 0x0078, 0x0423, 0x81ff, + 0x00c0, 0x2bd7, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x1078, 0x45c4, + 0x00c0, 0x2bdb, 0x7e38, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0048, + 0x2d23, 0x0078, 0x2bdb, 0x7c28, 0x7d2c, 0x1078, 0x47a4, 0xd28c, + 0x00c0, 0x2d2e, 0x1078, 0x4736, 0x0078, 0x2d30, 0x1078, 0x4772, + 0x00c0, 0x2d5a, 0x2061, 0xae00, 0x127e, 0x2091, 0x8000, 0x6000, + 0xa086, 0x0000, 0x0040, 0x2d48, 0x6010, 0xa06d, 0x0040, 0x2d48, + 0x683c, 0xa406, 0x00c0, 0x2d48, 0x6840, 0xa506, 0x0040, 0x2d53, + 0x127f, 0xace0, 0x0010, 0x2001, 0xa716, 0x2004, 0xac02, 0x00c8, + 0x2bd7, 0x0078, 0x2d34, 0x1078, 0x8a11, 0x127f, 0x0040, 0x2bd7, + 0x0078, 0x2bad, 0xa00e, 0x2001, 0x0005, 0x1078, 0x4b51, 0x127e, + 0x2091, 0x8000, 0x1078, 0x8f95, 0x1078, 0x4a73, 0x127f, 0x0078, + 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, 0x0040, 0x2bdb, + 0x1078, 0x4673, 0x0040, 0x2bd7, 0x1078, 0x47b2, 0x0040, 0x2bd7, + 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, + 0x2bdb, 0x1078, 0x482f, 0x0040, 0x2bd7, 0x2019, 0x0005, 0x1078, + 0x47d3, 0x0040, 0x2bd7, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, + 0x8003, 0x800b, 0x810b, 0xa108, 0x1078, 0x5a52, 0x0078, 0x2bad, + 0x127e, 0x2091, 0x8000, 0x81ff, 0x0040, 0x2da2, 0x2009, 0x0001, + 0x0078, 0x2dd3, 0x2029, 0x00ff, 0x6450, 0x2400, 0xa506, 0x0040, + 0x2dcd, 0x2508, 0x1078, 0x45c4, 0x00c0, 0x2dcd, 0x1078, 0x482f, + 0x00c0, 0x2db8, 0x2009, 0x0002, 0x62ac, 0x2518, 0x0078, 0x2dd3, + 0x2019, 0x0004, 0x1078, 0x47d3, 0x00c0, 0x2dc2, 0x2009, 0x0006, + 0x0078, 0x2dd3, 0x7824, 0xa08a, 0x1000, 0x00c8, 0x2dd6, 0x8003, + 0x800b, 0x810b, 0xa108, 0x1078, 0x5a52, 0x8529, 0x00c8, 0x2da5, + 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, 0x2bd7, 0x127f, 0x0078, + 0x2bdb, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x46e7, 0x1078, + 0x47a4, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x46d6, 0x1078, 0x47a4, 0x0078, 0x2bad, + 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, + 0x4775, 0x0040, 0x2bd7, 0x1078, 0x4484, 0x1078, 0x472f, 0x1078, + 0x47a4, 0x0078, 0x2bad, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, + 0x4673, 0x0040, 0x2bd7, 0x62a0, 0x2019, 0x0005, 0x0c7e, 0x1078, + 0x47e9, 0x0c7f, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, + 0x5e0a, 0x2009, 0x0000, 0x1078, 0x9f9b, 0x077f, 0x1078, 0x47a4, + 0x0078, 0x2bad, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x47a4, + 0x2208, 0x0078, 0x2bad, 0x157e, 0x0d7e, 0x0e7e, 0x2069, 0xa814, + 0x6810, 0x6914, 0xa10a, 0x00c8, 0x2e37, 0x2009, 0x0000, 0x6816, + 0x2011, 0x0000, 0x2019, 0x0000, 0x20a9, 0x00ff, 0x2069, 0xa835, + 0x2d04, 0xa075, 0x0040, 0x2e4c, 0x704c, 0x1078, 0x2e56, 0xa210, + 0x7080, 0x1078, 0x2e56, 0xa318, 0x8d68, 0x00f0, 0x2e40, 0x2300, + 0xa218, 0x0e7f, 0x0d7f, 0x157f, 0x0078, 0x2bad, 0x0f7e, 0x017e, + 0xa07d, 0x0040, 0x2e65, 0x2001, 0x0000, 0x8000, 0x2f0c, 0x81ff, + 0x0040, 0x2e65, 0x2178, 0x0078, 0x2e5d, 0x017f, 0x0f7f, 0x007c, + 0x2069, 0xa814, 0x6910, 0x62a8, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x6150, 0xa190, 0x29c0, 0x2214, 0xa294, 0x00ff, 0x6070, + 0xa084, 0xff00, 0xa215, 0x636c, 0x67cc, 0xd79c, 0x0040, 0x2e84, + 0x2031, 0x0001, 0x0078, 0x2e86, 0x2031, 0x0000, 0x7e3a, 0x7f3e, + 0x0078, 0x2bad, 0x6140, 0x6244, 0x2019, 0xa9a2, 0x231c, 0x0078, + 0x2bad, 0x127e, 0x2091, 0x8000, 0x6134, 0x6338, 0xa006, 0x2010, + 0x127f, 0x0078, 0x2bad, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x6244, + 0x6338, 0x0078, 0x2bad, 0x6140, 0x6244, 0x7824, 0x6042, 0x7b28, + 0x6346, 0x2069, 0xa752, 0x831f, 0xa305, 0x6816, 0x782c, 0x2069, + 0xa9a2, 0x2d1c, 0x206a, 0x0078, 0x2bad, 0x017e, 0x127e, 0x2091, + 0x8000, 0x7824, 0x6036, 0xd094, 0x0040, 0x2ec8, 0x7828, 0xa085, + 0x0001, 0x2009, 0xa9ab, 0x200a, 0x2001, 0xffff, 0x1078, 0x5ae6, + 0x782c, 0x603a, 0x127f, 0x017f, 0x0078, 0x2bad, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x7828, 0xa00d, 0x0040, 0x2bdb, 0x782c, 0xa005, + 0x0040, 0x2bdb, 0x6244, 0x6146, 0x6338, 0x603a, 0x0078, 0x2bad, + 0x2001, 0xa700, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x0c7e, + 0x2061, 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, + 0x00c0, 0x2ef7, 0x6030, 0xa085, 0xff00, 0x0078, 0x2f06, 0xa182, + 0x007f, 0x00c8, 0x2f30, 0xa188, 0x29c0, 0x210c, 0xa18c, 0x00ff, + 0x6030, 0xa116, 0x0040, 0x2f30, 0x810f, 0xa105, 0x127e, 0x2091, + 0x8000, 0x007e, 0x1078, 0x76c7, 0x007f, 0x0040, 0x2f2c, 0x601a, + 0x600b, 0xbc09, 0x601f, 0x0001, 0x1078, 0x35ba, 0x0040, 0x2f33, + 0x6837, 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, + 0x683a, 0x701b, 0x2f8e, 0x2d00, 0x6012, 0x2009, 0x0032, 0x1078, + 0x775c, 0x127f, 0x0c7f, 0x007c, 0x127f, 0x0c7f, 0x0078, 0x2bd7, + 0x0c7f, 0x0078, 0x2bdb, 0x1078, 0x772d, 0x0078, 0x2f2c, 0x2001, + 0xa700, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x0c7e, 0x2061, + 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, 0x00c0, + 0x2f4e, 0x6030, 0xa085, 0xff00, 0x0078, 0x2f5d, 0xa182, 0x007f, + 0x00c8, 0x2f87, 0xa188, 0x29c0, 0x210c, 0xa18c, 0x00ff, 0x6030, + 0xa116, 0x0040, 0x2f87, 0x810f, 0xa105, 0x127e, 0x2091, 0x8000, + 0x007e, 0x1078, 0x76c7, 0x007f, 0x0040, 0x2f83, 0x601a, 0x600b, + 0xbc05, 0x601f, 0x0001, 0x1078, 0x35ba, 0x0040, 0x2f8a, 0x6837, + 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x701b, 0x2f8e, 0x2d00, 0x6012, 0x2009, 0x0032, 0x1078, 0x775c, + 0x127f, 0x0c7f, 0x007c, 0x127f, 0x0c7f, 0x0078, 0x2bd7, 0x0c7f, + 0x0078, 0x2bdb, 0x1078, 0x772d, 0x0078, 0x2f83, 0x6830, 0xa086, + 0x0100, 0x0040, 0x2bd7, 0x0078, 0x2bad, 0x2061, 0xaa33, 0x127e, + 0x2091, 0x8000, 0x6000, 0xd084, 0x0040, 0x2fa6, 0x6104, 0x6208, + 0x2019, 0xa712, 0x231c, 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, + 0x2bdb, 0x81ff, 0x00c0, 0x2bd7, 0x127e, 0x2091, 0x8000, 0x6248, + 0x6064, 0xa202, 0x0048, 0x2fbd, 0xa085, 0x0001, 0x1078, 0x256a, + 0x1078, 0x3c9e, 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, 0x2bdb, + 0x127e, 0x2091, 0x8000, 0x20a9, 0x0012, 0x2001, 0xa740, 0x20a0, + 0xa006, 0x40a4, 0x127f, 0x0078, 0x2bad, 0x7d38, 0x7c3c, 0x0078, + 0x2c5f, 0x7824, 0xa09c, 0x00ff, 0xa39a, 0x0003, 0x00c8, 0x2bd7, + 0x6250, 0xa084, 0xff00, 0x8007, 0xa206, 0x00c0, 0x2fe9, 0x2001, + 0xa740, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0078, + 0x3608, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x2bd7, 0x0c7e, + 0x1078, 0x35ba, 0x0c7f, 0x0040, 0x2bd7, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8e5a, 0x0040, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x300b, 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, + 0xad80, 0x000e, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x0078, 0x3608, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x1078, 0x42dd, + 0x2009, 0x001c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, + 0x701b, 0x302b, 0x007c, 0xade8, 0x000d, 0x6800, 0xa005, 0x0040, + 0x2bdb, 0x6804, 0xd0ac, 0x0040, 0x3038, 0xd0a4, 0x0040, 0x2bdb, + 0xd094, 0x0040, 0x3043, 0x0c7e, 0x2061, 0x0100, 0x6104, 0xa18c, + 0xffdf, 0x6106, 0x0c7f, 0xd08c, 0x0040, 0x304e, 0x0c7e, 0x2061, + 0x0100, 0x6104, 0xa18d, 0x0010, 0x6106, 0x0c7f, 0x2009, 0x0100, + 0x210c, 0xa18a, 0x0002, 0x0048, 0x3063, 0xd084, 0x0040, 0x3063, + 0x6a28, 0xa28a, 0x007f, 0x00c8, 0x2bdb, 0xa288, 0x29c0, 0x210c, + 0xa18c, 0x00ff, 0x6156, 0xd0dc, 0x0040, 0x306c, 0x6828, 0xa08a, + 0x007f, 0x00c8, 0x2bdb, 0x6052, 0x6808, 0xa08a, 0x0100, 0x0048, + 0x2bdb, 0xa08a, 0x0841, 0x00c8, 0x2bdb, 0xa084, 0x0007, 0x00c0, + 0x2bdb, 0x680c, 0xa005, 0x0040, 0x2bdb, 0x6810, 0xa005, 0x0040, + 0x2bdb, 0x6848, 0x6940, 0xa10a, 0x00c8, 0x2bdb, 0x8001, 0x0040, + 0x2bdb, 0x684c, 0x6944, 0xa10a, 0x00c8, 0x2bdb, 0x8001, 0x0040, + 0x2bdb, 0x6804, 0xd0fc, 0x0040, 0x30c2, 0x1078, 0x35ba, 0x0040, + 0x2bd7, 0x2009, 0x0014, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0xa290, + 0x0038, 0xa399, 0x0000, 0x1078, 0x3604, 0x701b, 0x30a8, 0x007c, + 0xade8, 0x000d, 0x20a9, 0x0014, 0x2d98, 0x2069, 0xa76e, 0x2da0, + 0x53a3, 0x7010, 0xa0e8, 0x000d, 0x2001, 0xa772, 0x200c, 0xd1e4, + 0x0040, 0x30c2, 0x0c7e, 0x2061, 0x0100, 0x6004, 0xa085, 0x0b00, + 0x6006, 0x0c7f, 0x20a9, 0x001c, 0x2d98, 0x2069, 0xa752, 0x2da0, + 0x53a3, 0x6814, 0xa08c, 0x00ff, 0x6142, 0x8007, 0xa084, 0x00ff, + 0x6046, 0x1078, 0x4eae, 0x1078, 0x49ce, 0x1078, 0x4a3e, 0x6000, + 0xa086, 0x0000, 0x00c0, 0x314d, 0x6808, 0x602a, 0x1078, 0x21f7, + 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, + 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0040, 0x30fa, + 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, + 0x0078, 0x30fc, 0xa084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, + 0x1078, 0x5b19, 0x6904, 0xd1fc, 0x0040, 0x312f, 0x0c7e, 0x2009, + 0x0000, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x0040, 0x312c, 0x0078, + 0x3116, 0x839d, 0x00c8, 0x312c, 0x3508, 0x8109, 0x1078, 0x5480, + 0x6878, 0x6016, 0x6874, 0x2008, 0xa084, 0xff00, 0x8007, 0x600a, + 0xa184, 0x00ff, 0x6006, 0x8108, 0x00c0, 0x312a, 0x6003, 0x0003, + 0x0078, 0x312c, 0x6003, 0x0001, 0x00f0, 0x3111, 0x0c7f, 0x0c7e, + 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x0c7f, 0x1078, + 0x3819, 0x0040, 0x313d, 0x1078, 0x256a, 0x60c0, 0xa005, 0x0040, + 0x3149, 0x6003, 0x0001, 0x2091, 0x301d, 0x1078, 0x4224, 0x0078, + 0x314d, 0x6003, 0x0004, 0x2091, 0x301d, 0x0078, 0x2bad, 0x6000, + 0xa086, 0x0000, 0x0040, 0x2bd7, 0x2069, 0xa752, 0x7830, 0x6842, + 0x7834, 0x6846, 0x6804, 0xd0fc, 0x0040, 0x3162, 0x2009, 0x0030, + 0x0078, 0x3164, 0x2009, 0x001c, 0x2d00, 0x7a2c, 0x7b28, 0x7c3c, + 0x7d38, 0x0078, 0x3608, 0xa006, 0x1078, 0x256a, 0x81ff, 0x00c0, + 0x2bd7, 0x1078, 0x42dd, 0x1078, 0x4224, 0x0078, 0x2bad, 0x81ff, + 0x00c0, 0x2bd7, 0x6184, 0x81ff, 0x0040, 0x3191, 0x703f, 0x0000, + 0x2001, 0xadc0, 0x2009, 0x0040, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x127e, 0x2091, 0x8000, 0x1078, 0x3608, 0x701b, 0x2baa, 0x127f, + 0x007c, 0x703f, 0x0001, 0x0d7e, 0x2069, 0xadc0, 0x20a9, 0x0040, + 0x20a1, 0xadc0, 0x2019, 0xffff, 0x43a4, 0x6550, 0xa588, 0x29c0, + 0x210c, 0xa18c, 0x00ff, 0x216a, 0xa00e, 0x2011, 0x0002, 0x2100, + 0xa506, 0x0040, 0x31c3, 0x1078, 0x45c4, 0x00c0, 0x31c3, 0x6014, + 0x821c, 0x0048, 0x31bb, 0xa398, 0xadc0, 0xa085, 0xff00, 0x8007, + 0x201a, 0x0078, 0x31c2, 0xa398, 0xadc0, 0x2324, 0xa4a4, 0xff00, + 0xa405, 0x201a, 0x8210, 0x8108, 0xa182, 0x0080, 0x00c8, 0x31ca, + 0x0078, 0x31a7, 0x8201, 0x8007, 0x2d0c, 0xa105, 0x206a, 0x0d7f, + 0x20a9, 0x0040, 0x20a1, 0xadc0, 0x2099, 0xadc0, 0x1078, 0x4281, + 0x0078, 0x3180, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x0c7e, 0x1078, + 0x35ba, 0x0c7f, 0x00c0, 0x31e8, 0x2009, 0x0002, 0x0078, 0x2bd7, + 0x2001, 0xa753, 0x2004, 0xd0b4, 0x0040, 0x320f, 0x6000, 0xd08c, + 0x00c0, 0x320f, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, + 0x320f, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x1078, 0x8eae, + 0x00c0, 0x3206, 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x320b, 0x007c, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x20a9, + 0x002b, 0x2c98, 0xade8, 0x0002, 0x2da0, 0x53a3, 0x20a9, 0x0004, + 0xac80, 0x0006, 0x2098, 0xad80, 0x0006, 0x20a0, 0x1078, 0x4281, + 0x20a9, 0x0004, 0xac80, 0x000a, 0x2098, 0xad80, 0x000a, 0x20a0, + 0x1078, 0x4281, 0x2d00, 0x2009, 0x002b, 0x7a2c, 0x7b28, 0x7c3c, + 0x7d38, 0x0078, 0x3608, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x47bd, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x1078, 0x482f, 0x0040, 0x2bd7, 0x2019, 0x0004, + 0x1078, 0x47d3, 0x7924, 0x810f, 0x7a28, 0x1078, 0x3259, 0x0078, + 0x2bad, 0xa186, 0x00ff, 0x0040, 0x3261, 0x1078, 0x3271, 0x0078, + 0x3270, 0x2029, 0x007e, 0x2061, 0xa700, 0x6450, 0x2400, 0xa506, + 0x0040, 0x326d, 0x2508, 0x1078, 0x3271, 0x8529, 0x00c8, 0x3266, + 0x007c, 0x1078, 0x45c4, 0x00c0, 0x327c, 0x2200, 0x8003, 0x800b, + 0x810b, 0xa108, 0x1078, 0x5a52, 0x007c, 0x81ff, 0x00c0, 0x2bd7, + 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, + 0x1078, 0x47c8, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, + 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, 0x1078, + 0x47b2, 0x0078, 0x2bad, 0x6100, 0x0078, 0x2bad, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x2001, 0xa700, 0x2004, 0xa086, 0x0003, 0x00c0, + 0x2bd7, 0x0d7e, 0xace8, 0x000a, 0x7924, 0xd184, 0x0040, 0x32b2, + 0xace8, 0x0006, 0x680c, 0x8007, 0x783e, 0x6808, 0x8007, 0x783a, + 0x6b04, 0x831f, 0x6a00, 0x8217, 0x0d7f, 0x6100, 0xa18c, 0x0200, + 0x0078, 0x2bad, 0xa006, 0x1078, 0x256a, 0x7824, 0xa084, 0x00ff, + 0xa086, 0x00ff, 0x0040, 0x32cf, 0x81ff, 0x00c0, 0x2bd7, 0x1078, + 0x42dd, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, 0x7924, 0xa18c, + 0xff00, 0x810f, 0xa186, 0x00ff, 0x0040, 0x32e5, 0xa182, 0x007f, + 0x00c8, 0x2bdb, 0x2100, 0x1078, 0x2564, 0x027e, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x2061, 0xa9c4, 0x601b, 0x0000, 0x601f, 0x0000, + 0x2011, 0x0003, 0x1078, 0x70e0, 0x2011, 0x0002, 0x1078, 0x70ea, + 0x1078, 0x6fc4, 0x037e, 0x2019, 0x0000, 0x1078, 0x7058, 0x037f, + 0x2061, 0x0100, 0x6030, 0xa084, 0x00ff, 0x810f, 0xa105, 0x604a, + 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x002d, 0x2011, 0x4259, + 0x1078, 0x5add, 0x7924, 0xa18c, 0xff00, 0x810f, 0x7a28, 0x1078, + 0x3259, 0x127f, 0x0c7f, 0x027f, 0x0078, 0x2bad, 0x7924, 0xa18c, + 0xff00, 0x810f, 0x0c7e, 0x1078, 0x455c, 0x2c08, 0x0c7f, 0x00c0, + 0x2bdb, 0x0078, 0x2bad, 0x81ff, 0x0040, 0x3332, 0x2009, 0x0001, + 0x0078, 0x2bd7, 0x60cc, 0xd09c, 0x00c0, 0x333a, 0x2009, 0x0005, + 0x0078, 0x2bd7, 0x1078, 0x35ba, 0x00c0, 0x3342, 0x2009, 0x0002, + 0x0078, 0x2bd7, 0x7924, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, + 0x3604, 0x701b, 0x334c, 0x007c, 0x2009, 0x0080, 0x1078, 0x45c4, + 0x00c0, 0x3359, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x0040, + 0x335d, 0x2021, 0x400a, 0x0078, 0x2baf, 0x0d7e, 0xade8, 0x000d, + 0x6900, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x6e18, 0x6820, 0xa0be, + 0x0100, 0x0040, 0x33d0, 0xa0be, 0x0112, 0x0040, 0x33d0, 0xa0be, + 0x0113, 0x0040, 0x33d0, 0xa0be, 0x0114, 0x0040, 0x33d0, 0xa0be, + 0x0117, 0x0040, 0x33d0, 0xa0be, 0x011a, 0x0040, 0x33d0, 0xa0be, + 0x0121, 0x0040, 0x33c6, 0xa0be, 0x0131, 0x0040, 0x33c6, 0xa0be, + 0x0171, 0x0040, 0x33d0, 0xa0be, 0x0173, 0x0040, 0x33d0, 0xa0be, + 0x01a1, 0x00c0, 0x3398, 0x6830, 0x8007, 0x6832, 0x0078, 0x33d6, + 0xa0be, 0x0212, 0x0040, 0x33cc, 0xa0be, 0x0213, 0x0040, 0x33cc, + 0xa0be, 0x0214, 0x0040, 0x33be, 0xa0be, 0x0217, 0x0040, 0x33b8, + 0xa0be, 0x021a, 0x00c0, 0x33b1, 0x6838, 0x8007, 0x683a, 0x0078, + 0x33d0, 0xa0be, 0x0300, 0x0040, 0x33d0, 0x0d7f, 0x0078, 0x2bdb, + 0xad80, 0x0010, 0x20a9, 0x0007, 0x1078, 0x3418, 0xad80, 0x000e, + 0x20a9, 0x0001, 0x1078, 0x3418, 0x0078, 0x33d0, 0xad80, 0x000c, + 0x1078, 0x3426, 0x0078, 0x33d6, 0xad80, 0x000e, 0x1078, 0x3426, + 0xad80, 0x000c, 0x20a9, 0x0001, 0x1078, 0x3418, 0x0c7e, 0x1078, + 0x35ba, 0x0040, 0x3409, 0x6838, 0xc0fd, 0x683a, 0x6837, 0x0119, + 0x6853, 0x0000, 0x684f, 0x0020, 0x685b, 0x0001, 0x810b, 0x697e, + 0x6883, 0x0000, 0x6a86, 0x6b8a, 0x6c8e, 0x6d92, 0x6996, 0x689b, + 0x0000, 0x0c7f, 0x0d7f, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x6823, 0x0000, 0x6804, 0x2068, 0x1078, 0x8e76, 0x00c0, 0x3404, + 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x340f, + 0x007c, 0x0c7f, 0x0d7f, 0x2009, 0x0002, 0x0078, 0x2bd7, 0x6820, + 0xa086, 0x8001, 0x00c0, 0x2bad, 0x2009, 0x0004, 0x0078, 0x2bd7, + 0x017e, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x290a, 0x8108, + 0x280a, 0x8108, 0x00f0, 0x341a, 0x017f, 0x007c, 0x017e, 0x0a7e, + 0x0b7e, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x2054, 0x8000, + 0x205c, 0x2b0a, 0x8108, 0x2a0a, 0x8108, 0x290a, 0x8108, 0x280a, + 0x0b7f, 0x0a7f, 0x017f, 0x007c, 0x81ff, 0x0040, 0x3443, 0x2009, + 0x0001, 0x0078, 0x2bd7, 0x60cc, 0xd09c, 0x00c0, 0x344b, 0x2009, + 0x0005, 0x0078, 0x2bd7, 0x7924, 0x2140, 0xa18c, 0xff00, 0x810f, + 0xa182, 0x0080, 0x0048, 0x2bdb, 0xa182, 0x00ff, 0x00c8, 0x2bdb, + 0x7a2c, 0x7b28, 0x606c, 0xa306, 0x00c0, 0x3466, 0x6070, 0xa24e, + 0x0040, 0x2bdb, 0xa9cc, 0xff00, 0x0040, 0x2bdb, 0x0c7e, 0x1078, + 0x350f, 0x2c68, 0x0c7f, 0x0040, 0x349e, 0xa0c6, 0x4000, 0x00c0, + 0x3484, 0x0c7e, 0x007e, 0x2d60, 0x2009, 0x0000, 0x1078, 0x489b, + 0x00c0, 0x347b, 0xc185, 0x6000, 0xd0bc, 0x0040, 0x3480, 0xc18d, + 0x007f, 0x0c7f, 0x0078, 0x349b, 0xa0c6, 0x4007, 0x00c0, 0x348b, + 0x2408, 0x0078, 0x349b, 0xa0c6, 0x4008, 0x00c0, 0x3493, 0x2708, + 0x2610, 0x0078, 0x349b, 0xa0c6, 0x4009, 0x00c0, 0x3499, 0x0078, + 0x349b, 0x2001, 0x4006, 0x2020, 0x0078, 0x2baf, 0x2d00, 0x7022, + 0x017e, 0x0b7e, 0x0c7e, 0x0e7e, 0x2c70, 0x1078, 0x76c7, 0x0040, + 0x34e4, 0x2d00, 0x601a, 0x2001, 0xa757, 0x2004, 0xa084, 0x00ff, + 0x6842, 0x2e58, 0x0e7f, 0x0e7e, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, + 0x2b70, 0x00c0, 0x34c5, 0x1078, 0x772d, 0x0e7f, 0x0c7f, 0x0b7f, + 0x017f, 0x2009, 0x0002, 0x0078, 0x2bd7, 0x6837, 0x0000, 0x2d00, + 0x6012, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x2880, 0x127f, 0x601f, 0x0001, 0x2001, 0x0000, + 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x2009, 0x0002, + 0x1078, 0x775c, 0xa085, 0x0001, 0x0e7f, 0x0c7f, 0x0b7f, 0x017f, + 0x00c0, 0x34ee, 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x34f3, 0x007c, 0x6830, 0xa086, 0x0100, 0x7020, 0x2060, + 0x00c0, 0x3501, 0x2009, 0x0004, 0x6204, 0xa294, 0x00ff, 0x0078, + 0x2bd7, 0x2009, 0x0000, 0x1078, 0x489b, 0x00c0, 0x3508, 0xc185, + 0x6000, 0xd0bc, 0x0040, 0x350d, 0xc18d, 0x0078, 0x2bad, 0x0e7e, + 0x0d7e, 0x2029, 0x0000, 0x2021, 0x0080, 0x20a9, 0x007f, 0x2071, + 0xa8b5, 0x2e04, 0xa005, 0x00c0, 0x3524, 0x2100, 0xa406, 0x00c0, + 0x3555, 0x2428, 0x0078, 0x3555, 0x2068, 0x6f10, 0x2700, 0xa306, + 0x00c0, 0x3546, 0x6e14, 0x2600, 0xa206, 0x00c0, 0x3546, 0x2400, + 0xa106, 0x00c0, 0x3542, 0x2d60, 0xd884, 0x0040, 0x356a, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x356a, 0x2001, 0x4000, + 0x0078, 0x356b, 0x2001, 0x4007, 0x0078, 0x356b, 0x2400, 0xa106, + 0x00c0, 0x3555, 0x6e14, 0x87ff, 0x00c0, 0x3551, 0x86ff, 0x0040, + 0x3521, 0x2001, 0x4008, 0x0078, 0x356b, 0x8420, 0x8e70, 0x00f0, + 0x3519, 0x85ff, 0x00c0, 0x3564, 0x2001, 0x4009, 0x0078, 0x356b, + 0x2001, 0x0001, 0x0078, 0x356b, 0x1078, 0x455c, 0x00c0, 0x3560, + 0x6312, 0x6216, 0xa006, 0xa005, 0x0d7f, 0x0e7f, 0x007c, 0x81ff, + 0x00c0, 0x2bd7, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x7824, 0xa005, 0x0040, 0x2bdb, 0xa096, + 0x00ff, 0x0040, 0x3587, 0xa092, 0x0004, 0x00c8, 0x2bdb, 0x2010, + 0x2d18, 0x1078, 0x282f, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, + 0x3592, 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, 0x0078, + 0x2bad, 0x7924, 0xa18c, 0xff00, 0x810f, 0xa182, 0x0080, 0x0048, + 0x2bdb, 0xa182, 0x00ff, 0x00c8, 0x2bdb, 0x127e, 0x2091, 0x8000, + 0x1078, 0x8d5b, 0x00c0, 0x35b7, 0xa190, 0xa835, 0x2204, 0xa065, + 0x0040, 0x35b7, 0x1078, 0x42f8, 0x127f, 0x0078, 0x2bad, 0x127f, + 0x0078, 0x2bd7, 0x1078, 0x138b, 0x0040, 0x35d1, 0xa006, 0x6802, + 0x7010, 0xa005, 0x00c0, 0x35c9, 0x2d00, 0x7012, 0x7016, 0x0078, + 0x35cf, 0x7014, 0x6802, 0x2060, 0x2d00, 0x6006, 0x7016, 0xad80, + 0x000d, 0x007c, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x1078, 0x45c4, + 0x00c0, 0x35e1, 0x7e28, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0048, + 0x35e2, 0xa066, 0x8cff, 0x007c, 0x7e24, 0x860f, 0xa18c, 0x00ff, + 0x1078, 0x45c4, 0x00c0, 0x35f2, 0xa6b4, 0x00ff, 0xa682, 0x4000, + 0x0048, 0x35f3, 0xa066, 0x8cff, 0x007c, 0x017e, 0x7110, 0x81ff, + 0x0040, 0x3600, 0x2168, 0x6904, 0x1078, 0x13a4, 0x0078, 0x35f7, + 0x7112, 0x7116, 0x017f, 0x007c, 0x2031, 0x0001, 0x0078, 0x360a, + 0x2031, 0x0000, 0x2061, 0xa7d2, 0x6606, 0x6112, 0x600e, 0x6226, + 0x632a, 0x642e, 0x6532, 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, + 0x701b, 0x2bad, 0x007c, 0x0f7e, 0x127e, 0x2091, 0x8000, 0x2079, + 0x0000, 0x2001, 0xa790, 0x2004, 0xa005, 0x00c0, 0x3636, 0x0068, + 0x3636, 0x7818, 0xd084, 0x00c0, 0x3636, 0x7a22, 0x7b26, 0x7c2a, + 0x781b, 0x0001, 0x2091, 0x4080, 0x0078, 0x365b, 0x017e, 0x0c7e, + 0x0e7e, 0x2071, 0xa782, 0x7138, 0xa182, 0x0008, 0x0048, 0x3644, + 0x7030, 0x2060, 0x0078, 0x3655, 0x7030, 0xa0e0, 0x0008, 0xac82, + 0xa7d2, 0x0048, 0x364d, 0x2061, 0xa792, 0x2c00, 0x7032, 0x81ff, + 0x00c0, 0x3653, 0x7036, 0x8108, 0x713a, 0x2262, 0x6306, 0x640a, + 0x0e7f, 0x0c7f, 0x017f, 0x127f, 0x0f7f, 0x007c, 0x0e7e, 0x2071, + 0xa782, 0x7038, 0xa005, 0x0040, 0x3697, 0x127e, 0x2091, 0x8000, + 0x0068, 0x3696, 0x0f7e, 0x2079, 0x0000, 0x7818, 0xd084, 0x00c0, + 0x3695, 0x0c7e, 0x7034, 0x2060, 0x2c04, 0x7822, 0x6004, 0x7826, + 0x6008, 0x782a, 0x781b, 0x0001, 0x2091, 0x4080, 0x7038, 0x8001, + 0x703a, 0xa005, 0x00c0, 0x368b, 0x7033, 0xa792, 0x7037, 0xa792, + 0x0c7f, 0x0078, 0x3695, 0xac80, 0x0008, 0xa0fa, 0xa7d2, 0x0048, + 0x3693, 0x2001, 0xa792, 0x7036, 0x0c7f, 0x0f7f, 0x127f, 0x0e7f, + 0x007c, 0x027e, 0x2001, 0xa753, 0x2004, 0xd0c4, 0x0040, 0x36a4, + 0x2011, 0x8014, 0x1078, 0x361b, 0x027f, 0x007c, 0x81ff, 0x00c0, + 0x2bd7, 0x127e, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, + 0x6032, 0x1078, 0x4224, 0x127f, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x6000, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x2001, 0xa753, + 0x2004, 0xd0ac, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x36d3, 0x7828, + 0xa005, 0x0040, 0x2bad, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, 0x0040, + 0x2bd7, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x1078, 0x8f22, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x36e9, + 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, 0x0078, 0x2bad, + 0x2001, 0xa700, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x7f24, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x35ba, 0x0040, 0x2bd7, + 0x2009, 0x0000, 0x2031, 0x0000, 0x7023, 0x0000, 0x702f, 0x0000, + 0xad80, 0x0005, 0x7026, 0x20a0, 0x1078, 0x45c4, 0x00c0, 0x376d, + 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0040, 0x371d, 0xa0c4, + 0xff00, 0xa8c6, 0x0600, 0x00c0, 0x376d, 0x2001, 0xa753, 0x2004, + 0xd0ac, 0x00c0, 0x372a, 0x1078, 0x489b, 0x00c0, 0x372a, 0xd79c, + 0x0040, 0x376d, 0xd794, 0x00c0, 0x3730, 0xd784, 0x0040, 0x373c, + 0xac80, 0x0006, 0x2098, 0x3400, 0x20a9, 0x0004, 0x53a3, 0x1078, + 0x3426, 0xd794, 0x0040, 0x3745, 0xac80, 0x000a, 0x2098, 0x3400, + 0x20a9, 0x0004, 0x53a3, 0x1078, 0x3426, 0x21a2, 0xd794, 0x0040, + 0x3765, 0xac80, 0x0000, 0x2098, 0x94a0, 0x20a9, 0x0002, 0x53a3, + 0xac80, 0x0003, 0x20a6, 0x94a0, 0xac80, 0x0004, 0x2098, 0x3400, + 0x20a9, 0x0002, 0x53a3, 0x1078, 0x3418, 0xac80, 0x0026, 0x2098, + 0x20a9, 0x0002, 0x53a3, 0x0078, 0x3766, 0x94a0, 0xd794, 0x0040, + 0x376b, 0xa6b0, 0x000b, 0xa6b0, 0x0005, 0x8108, 0xd78c, 0x0040, + 0x3777, 0xa186, 0x0100, 0x0040, 0x3788, 0x0078, 0x377b, 0xa186, + 0x007e, 0x0040, 0x3788, 0xd794, 0x0040, 0x3782, 0xa686, 0x0020, + 0x0078, 0x3784, 0xa686, 0x0028, 0x0040, 0x3791, 0x0078, 0x370c, + 0x86ff, 0x00c0, 0x378f, 0x7120, 0x810b, 0x0078, 0x2bad, 0x702f, + 0x0001, 0x711e, 0x7020, 0xa600, 0x7022, 0x772a, 0x2061, 0xa7d2, + 0x6007, 0x0000, 0x6612, 0x7024, 0x600e, 0x6226, 0x632a, 0x642e, + 0x6532, 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, 0x701b, 0x37a9, + 0x007c, 0x702c, 0xa005, 0x00c0, 0x37bb, 0x711c, 0x7024, 0x20a0, + 0x7728, 0x2031, 0x0000, 0x2061, 0xa7d2, 0x6224, 0x6328, 0x642c, + 0x6530, 0x0078, 0x370c, 0x7120, 0x810b, 0x0078, 0x2bad, 0x2029, + 0x007e, 0x7924, 0x7a28, 0x7b2c, 0x7c38, 0xa184, 0xff00, 0x8007, + 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa184, + 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, + 0xa284, 0xff00, 0x8007, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, + 0x0048, 0x2bdb, 0xa284, 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, + 0xa502, 0x0048, 0x2bdb, 0xa384, 0xff00, 0x8007, 0xa0e2, 0x0020, + 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa384, 0x00ff, 0xa0e2, + 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa484, 0xff00, + 0x8007, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, + 0xa484, 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, + 0x2bdb, 0x2061, 0xa9a5, 0x6102, 0x6206, 0x630a, 0x640e, 0x0078, + 0x2bad, 0x007e, 0x2001, 0xa753, 0x2004, 0xd0cc, 0x007f, 0x007c, + 0x007e, 0x2001, 0xa772, 0x2004, 0xd0bc, 0x007f, 0x007c, 0x6164, + 0x7a24, 0x6300, 0x82ff, 0x00c0, 0x3830, 0x7926, 0x0078, 0x2bad, + 0x83ff, 0x00c0, 0x2bdb, 0x2001, 0xfff0, 0xa200, 0x00c8, 0x2bdb, + 0x2019, 0xffff, 0x6068, 0xa302, 0xa200, 0x0048, 0x2bdb, 0x7926, + 0x6266, 0x0078, 0x2bad, 0x2001, 0xa700, 0x2004, 0xa086, 0x0003, + 0x00c0, 0x2bd7, 0x7c28, 0x7d24, 0x7e38, 0x7f2c, 0x1078, 0x35ba, + 0x0040, 0x2bd7, 0x2009, 0x0000, 0x2019, 0x0000, 0x7023, 0x0000, + 0x702f, 0x0000, 0xad80, 0x0003, 0x7026, 0x20a0, 0xa1e0, 0xa835, + 0x2c64, 0x8cff, 0x0040, 0x387d, 0x6004, 0xa084, 0x00ff, 0xa086, + 0x0006, 0x0040, 0x3872, 0x6004, 0xa084, 0xff00, 0xa086, 0x0600, + 0x00c0, 0x387d, 0x6014, 0x20a2, 0x94a0, 0x6010, 0x8007, 0xa105, + 0x8007, 0x20a2, 0x94a0, 0xa398, 0x0002, 0x8108, 0xa182, 0x00ff, + 0x0040, 0x3888, 0xa386, 0x002a, 0x0040, 0x3891, 0x0078, 0x385e, + 0x83ff, 0x00c0, 0x388f, 0x7120, 0x810c, 0x0078, 0x2bad, 0x702f, + 0x0001, 0x711e, 0x7020, 0xa300, 0x7022, 0x2061, 0xa7d2, 0x6007, + 0x0000, 0x6312, 0x7024, 0x600e, 0x6426, 0x652a, 0x662e, 0x6732, + 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, 0x701b, 0x38a8, 0x007c, + 0x702c, 0xa005, 0x00c0, 0x38b9, 0x711c, 0x7024, 0x20a0, 0x2019, + 0x0000, 0x2061, 0xa7d2, 0x6424, 0x6528, 0x662c, 0x6730, 0x0078, + 0x385e, 0x7120, 0x810c, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, + 0x60cc, 0xd09c, 0x0040, 0x2bd7, 0x1078, 0x35ba, 0x0040, 0x2bd7, + 0x7924, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, 0x701b, + 0x38d2, 0x007c, 0x0d7e, 0xade8, 0x000d, 0x6828, 0xa0be, 0x7000, + 0x0040, 0x38e5, 0xa0be, 0x7100, 0x0040, 0x38e5, 0xa0be, 0x7200, + 0x0040, 0x38e5, 0x0d7f, 0x0078, 0x2bdb, 0x6820, 0x6924, 0x1078, + 0x254d, 0x00c0, 0x3910, 0x1078, 0x455c, 0x00c0, 0x3910, 0x7122, + 0x6612, 0x6516, 0x6e18, 0x0c7e, 0x1078, 0x35ba, 0x0040, 0x3910, + 0x1078, 0x35ba, 0x0040, 0x3910, 0x0c7f, 0x0d7f, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x6823, 0x0000, 0x6804, 0x2068, 0x1078, + 0x8e92, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x3913, 0x007c, + 0x0d7f, 0x0078, 0x2bd7, 0x7120, 0x1078, 0x298e, 0x6820, 0xa086, + 0x8001, 0x0040, 0x2bd7, 0x2d00, 0x701e, 0x6804, 0xa080, 0x0002, + 0x007e, 0x20a9, 0x002a, 0x2098, 0x20a0, 0x1078, 0x4281, 0x007f, + 0xade8, 0x000d, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x2061, 0xa7d2, + 0x6007, 0x0000, 0x6e00, 0x6f28, 0xa7c6, 0x7000, 0x00c0, 0x393a, + 0x0078, 0x393e, 0xa7c6, 0x7100, 0x00c0, 0x3946, 0xa6c2, 0x0004, + 0x0048, 0x2bdb, 0x2009, 0x0004, 0x0078, 0x3608, 0xa7c6, 0x7200, + 0x00c0, 0x2bdb, 0xa6c2, 0x0054, 0x0048, 0x2bdb, 0x600e, 0x6013, + 0x002a, 0x6226, 0x632a, 0x642e, 0x6532, 0x2c10, 0x1078, 0x13db, + 0x7007, 0x0002, 0x701b, 0x395d, 0x007c, 0x701c, 0x2068, 0x6804, + 0xa080, 0x0001, 0x2004, 0xa080, 0x0002, 0x007e, 0x20a9, 0x002a, + 0x2098, 0x20a0, 0x1078, 0x4281, 0x007f, 0x2009, 0x002a, 0x2061, + 0xa7d2, 0x6224, 0x6328, 0x642c, 0x6530, 0x0078, 0x3608, 0x81ff, + 0x00c0, 0x2bd7, 0x792c, 0x2001, 0xa99d, 0x2102, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, 0x127e, 0x2091, + 0x8000, 0x1078, 0x47de, 0x127f, 0x0078, 0x2bad, 0x7824, 0xd08c, + 0x00c0, 0x3995, 0xd084, 0x0040, 0x31da, 0x1078, 0x35e4, 0x0040, + 0x2bdb, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, 0x00c0, 0x39a3, 0x2009, + 0x0002, 0x0078, 0x2bd7, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x0040, 0x39b0, 0xa08e, 0x0004, 0x0040, 0x39b0, 0xa08e, 0x0005, + 0x00c0, 0x39dd, 0x7824, 0xd08c, 0x0040, 0x39bb, 0x6000, 0xc08c, + 0x6002, 0x0078, 0x39c5, 0x2001, 0xa753, 0x2004, 0xd0b4, 0x0040, + 0x320f, 0x6000, 0xd08c, 0x00c0, 0x320f, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8eae, 0x00c0, 0x39d2, 0x2009, 0x0003, + 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x39d7, 0x007c, 0x1078, + 0x35e4, 0x0040, 0x2bdb, 0x0078, 0x320f, 0x2009, 0xa72f, 0x210c, + 0x81ff, 0x0040, 0x39e7, 0x2009, 0x0001, 0x0078, 0x2bd7, 0x2001, + 0xa700, 0x2004, 0xa086, 0x0003, 0x0040, 0x39f2, 0x2009, 0x0007, + 0x0078, 0x2bd7, 0x2001, 0xa753, 0x2004, 0xd0ac, 0x0040, 0x39fc, + 0x2009, 0x0008, 0x0078, 0x2bd7, 0x609c, 0xd0a4, 0x00c0, 0x3a03, + 0xd0ac, 0x00c0, 0x320f, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8f22, 0x00c0, 0x3a12, 0x2009, 0x0003, + 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x3a17, 0x007c, 0x6830, + 0xa086, 0x0100, 0x00c0, 0x3a20, 0x2009, 0x0004, 0x0078, 0x2bd7, + 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x0078, 0x39b2, 0x81ff, 0x2009, + 0x0001, 0x00c0, 0x2bd7, 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, + 0x00c0, 0x2bd7, 0x2001, 0xa753, 0x2004, 0xd0ac, 0x2009, 0x0008, + 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x2009, 0x0009, 0x00c0, 0x2bd7, 0x0c7e, + 0x1078, 0x35ba, 0x0c7f, 0x2009, 0x0002, 0x0040, 0x2bd7, 0x6837, + 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x7928, 0xa194, + 0xff00, 0xa18c, 0x00ff, 0xa006, 0x82ff, 0x00c0, 0x3a65, 0xc0ed, + 0x6952, 0x792c, 0x6956, 0x0078, 0x3a6e, 0xa28e, 0x0100, 0x00c0, + 0x2bdb, 0xc0e5, 0x6853, 0x0000, 0x6857, 0x0000, 0x683e, 0x1078, + 0x90cd, 0x2009, 0x0003, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, + 0x3a7a, 0x007c, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, 0x0040, + 0x2bd7, 0x0078, 0x2bad, 0x81ff, 0x2009, 0x0001, 0x00c0, 0x2bd7, + 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, 0x00c0, 0x2bd7, 0x1078, + 0x35e4, 0x0040, 0x2bdb, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x2009, 0x0009, 0x00c0, 0x2bd7, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, + 0x2009, 0x0002, 0x0040, 0x2bd7, 0xad80, 0x000f, 0x2009, 0x0008, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, 0x701b, 0x3ab1, + 0x007c, 0x0d7e, 0xade8, 0x000f, 0x6800, 0xa086, 0x0500, 0x00c0, + 0x3ac4, 0x6804, 0xa005, 0x00c0, 0x3ac4, 0x6808, 0xa084, 0xff00, + 0x00c0, 0x3ac4, 0x0078, 0x3ac7, 0x0d7f, 0x00c0, 0x2bdb, 0x0d7f, + 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x0c7e, + 0x1078, 0x35e4, 0x00c0, 0x3ad7, 0x0c7f, 0x0078, 0x2bdb, 0x1078, + 0x9129, 0x2009, 0x0003, 0x0c7f, 0x0040, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x3ae3, 0x007c, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, + 0x0040, 0x2bd7, 0x0078, 0x2bad, 0x127e, 0x0c7e, 0x0e7e, 0x2061, + 0x0100, 0x2071, 0xa700, 0x6044, 0xd0a4, 0x00c0, 0x3b15, 0xd084, + 0x0040, 0x3afe, 0x1078, 0x3c75, 0x0078, 0x3b11, 0xd08c, 0x0040, + 0x3b05, 0x1078, 0x3b8c, 0x0078, 0x3b11, 0xd094, 0x0040, 0x3b0c, + 0x1078, 0x3b60, 0x0078, 0x3b11, 0xd09c, 0x0040, 0x3b11, 0x1078, + 0x3b1f, 0x0e7f, 0x0c7f, 0x127f, 0x007c, 0x017e, 0x6128, 0xd19c, + 0x00c0, 0x3b1c, 0xc19d, 0x612a, 0x017f, 0x0078, 0x3b11, 0x624c, + 0xa286, 0xf0f0, 0x00c0, 0x3b30, 0x6048, 0xa086, 0xf0f0, 0x0040, + 0x3b30, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0078, 0x3b5f, + 0xa294, 0xff00, 0xa296, 0xf700, 0x0040, 0x3b45, 0x7134, 0xd1a4, + 0x00c0, 0x3b45, 0x6240, 0xa294, 0x0010, 0x0040, 0x3b45, 0x2009, + 0x00f7, 0x1078, 0x42a1, 0x0078, 0x3b5f, 0x6043, 0x0040, 0x6043, + 0x0000, 0x7077, 0x0000, 0x708f, 0x0001, 0x70b3, 0x0000, 0x70cf, + 0x0000, 0x2009, 0xadc0, 0x200b, 0x0000, 0x7087, 0x0000, 0x707b, + 0x000f, 0x2009, 0x000f, 0x2011, 0x41d5, 0x1078, 0x5add, 0x007c, + 0x157e, 0x7078, 0xa005, 0x00c0, 0x3b8a, 0x2011, 0x41d5, 0x1078, + 0x5a45, 0x6040, 0xa094, 0x0010, 0xa285, 0x0020, 0x6042, 0x20a9, + 0x00c8, 0x6044, 0xd08c, 0x00c0, 0x3b83, 0x00f0, 0x3b71, 0x6242, + 0x708b, 0x0000, 0x6040, 0xa094, 0x0010, 0xa285, 0x0080, 0x6042, + 0x6242, 0x0078, 0x3b8a, 0x6242, 0x708b, 0x0000, 0x707f, 0x0000, + 0x0078, 0x3b8a, 0x157f, 0x007c, 0x707c, 0xa08a, 0x0003, 0x00c8, + 0x3b95, 0x1079, 0x3b98, 0x0078, 0x3b97, 0x1078, 0x1332, 0x007c, + 0x3b9b, 0x3bea, 0x3c74, 0x0f7e, 0x707f, 0x0001, 0x20e1, 0xa000, + 0x20e1, 0x8700, 0x1078, 0x21f7, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2079, 0xac00, 0x207b, 0x2200, 0x7807, 0x00ef, 0x780b, 0x0000, + 0x780f, 0x00ef, 0x7813, 0x0138, 0x7817, 0x0000, 0x781b, 0x0000, + 0x781f, 0x0000, 0x7823, 0xffff, 0x7827, 0xffff, 0x782b, 0x0000, + 0x782f, 0x0000, 0x2079, 0xac0c, 0x207b, 0x1101, 0x7807, 0x0000, + 0x2099, 0xa705, 0x20a1, 0xac0e, 0x20a9, 0x0004, 0x53a3, 0x2079, + 0xac12, 0x207b, 0x0000, 0x7807, 0x0000, 0x2099, 0xac00, 0x20a1, + 0x020b, 0x20a9, 0x0014, 0x53a6, 0x60c3, 0x000c, 0x600f, 0x0000, + 0x1078, 0x420b, 0x0f7f, 0x7083, 0x0000, 0x6043, 0x0008, 0x6043, + 0x0000, 0x007c, 0x0d7e, 0x7080, 0x7083, 0x0000, 0xa025, 0x0040, + 0x3c5e, 0x6020, 0xd0b4, 0x00c0, 0x3c5c, 0x718c, 0x81ff, 0x0040, + 0x3c4b, 0xa486, 0x000c, 0x00c0, 0x3c56, 0xa480, 0x0018, 0x8004, + 0x20a8, 0x2011, 0xac80, 0x2019, 0xac00, 0x220c, 0x2304, 0xa106, + 0x00c0, 0x3c22, 0x8210, 0x8318, 0x00f0, 0x3c05, 0x6043, 0x0004, + 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0006, 0x707f, 0x0002, + 0x708b, 0x0002, 0x2009, 0x07d0, 0x2011, 0x41dc, 0x1078, 0x5add, + 0x0078, 0x3c5c, 0x2069, 0xac80, 0x6930, 0xa18e, 0x1101, 0x00c0, + 0x3c56, 0x6834, 0xa005, 0x00c0, 0x3c56, 0x6900, 0xa18c, 0x00ff, + 0x00c0, 0x3c36, 0x6804, 0xa005, 0x0040, 0x3c4b, 0x2011, 0xac8e, + 0x2019, 0xa705, 0x20a9, 0x0004, 0x220c, 0x2304, 0xa102, 0x0048, + 0x3c49, 0x00c0, 0x3c56, 0x8210, 0x8318, 0x00f0, 0x3c3c, 0x0078, + 0x3c56, 0x708f, 0x0000, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xac80, 0x20a1, 0x020b, 0x20a9, 0x0014, 0x53a6, 0x6043, 0x0008, + 0x6043, 0x0000, 0x0078, 0x3c5e, 0x0d7f, 0x007c, 0x6020, 0xd0b4, + 0x00c0, 0x3c5c, 0x60c3, 0x000c, 0x2011, 0xa9bb, 0x2013, 0x0000, + 0x7083, 0x0000, 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, + 0x1078, 0x6e06, 0x0078, 0x3c5c, 0x007c, 0x7088, 0xa08a, 0x001d, + 0x00c8, 0x3c7e, 0x1079, 0x3c81, 0x0078, 0x3c80, 0x1078, 0x1332, + 0x007c, 0x3cab, 0x3cba, 0x3ce9, 0x3d02, 0x3d2e, 0x3d5a, 0x3d86, + 0x3dbc, 0x3de8, 0x3e10, 0x3e53, 0x3e7d, 0x3e9f, 0x3eb5, 0x3edb, + 0x3eee, 0x3ef7, 0x3f2b, 0x3f57, 0x3f83, 0x3faf, 0x3fe5, 0x4030, + 0x405f, 0x4081, 0x40c3, 0x40e9, 0x4102, 0x4103, 0x0c7e, 0x2061, + 0xa700, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0xa084, 0xfff9, + 0x6006, 0x0c7f, 0x007c, 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, + 0x0002, 0x708b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x41dc, 0x1078, + 0x5add, 0x007c, 0x0f7e, 0x7080, 0xa086, 0x0014, 0x00c0, 0x3ce7, + 0x6043, 0x0000, 0x6020, 0xd0b4, 0x00c0, 0x3ce7, 0x2079, 0xac80, + 0x7a30, 0xa296, 0x1102, 0x00c0, 0x3ce5, 0x7834, 0xa005, 0x00c0, + 0x3ce5, 0x7a38, 0xd2fc, 0x0040, 0x3cdb, 0x70b0, 0xa005, 0x00c0, + 0x3cdb, 0x70b3, 0x0001, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x708b, + 0x0010, 0x1078, 0x3ef7, 0x0078, 0x3ce7, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x0003, 0x6043, 0x0004, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0x1078, 0x4289, 0x20a3, 0x1102, 0x20a3, 0x0000, 0x20a9, + 0x000a, 0x20a3, 0x0000, 0x00f0, 0x3cf9, 0x60c3, 0x0014, 0x1078, + 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3d2c, 0x2011, + 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3d2a, 0x2079, + 0xac80, 0x7a30, 0xa296, 0x1102, 0x00c0, 0x3d2a, 0x7834, 0xa005, + 0x00c0, 0x3d2a, 0x7a38, 0xd2fc, 0x0040, 0x3d24, 0x70b0, 0xa005, + 0x00c0, 0x3d24, 0x70b3, 0x0001, 0x708b, 0x0004, 0x1078, 0x3d2e, + 0x0078, 0x3d2c, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, 0x0005, + 0x1078, 0x4289, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, + 0xac8e, 0x1078, 0x42d4, 0x00c0, 0x3d4c, 0x7074, 0xa005, 0x00c0, + 0x3d4c, 0x7150, 0xa186, 0xffff, 0x0040, 0x3d4c, 0x1078, 0x419d, + 0x0040, 0x3d4c, 0x1078, 0x42b8, 0x20a9, 0x0008, 0x2298, 0x26a0, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, + 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3d84, 0x2011, + 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3d82, 0x2079, + 0xac80, 0x7a30, 0xa296, 0x1103, 0x00c0, 0x3d82, 0x7834, 0xa005, + 0x00c0, 0x3d82, 0x7a38, 0xd2fc, 0x0040, 0x3d7c, 0x70b0, 0xa005, + 0x00c0, 0x3d7c, 0x70b3, 0x0001, 0x708b, 0x0006, 0x1078, 0x3d86, + 0x0078, 0x3d84, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, 0x0007, + 0x1078, 0x4289, 0x20a3, 0x1104, 0x20a3, 0x0000, 0x3430, 0x2011, + 0xac8e, 0x1078, 0x42d4, 0x00c0, 0x3dae, 0x7074, 0xa005, 0x00c0, + 0x3dae, 0x7154, 0xa186, 0xffff, 0x0040, 0x3dae, 0xa180, 0x29c0, + 0x200c, 0xa18c, 0xff00, 0x810f, 0x1078, 0x419d, 0x0040, 0x3dae, + 0x1078, 0x3820, 0x0040, 0x3dae, 0x1078, 0x256a, 0x20a9, 0x0008, + 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, + 0x3de6, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, + 0x3de4, 0x2079, 0xac80, 0x7a30, 0xa296, 0x1104, 0x00c0, 0x3de4, + 0x7834, 0xa005, 0x00c0, 0x3de4, 0x7a38, 0xd2fc, 0x0040, 0x3dde, + 0x70b0, 0xa005, 0x00c0, 0x3dde, 0x70b3, 0x0001, 0x708b, 0x0008, + 0x1078, 0x3de8, 0x0078, 0x3de6, 0x1078, 0x4224, 0x0f7f, 0x007c, + 0x708b, 0x0009, 0x1078, 0x4289, 0x20a3, 0x1105, 0x20a3, 0x0100, + 0x3430, 0x1078, 0x42d4, 0x00c0, 0x3e01, 0x7074, 0xa005, 0x00c0, + 0x3e01, 0x1078, 0x4104, 0x00c0, 0x3e0b, 0xa085, 0x0001, 0x1078, + 0x256a, 0x20a9, 0x0008, 0x2099, 0xac8e, 0x26a0, 0x53a6, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, + 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3e51, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3e4f, 0x2079, 0xac80, 0x7a30, + 0xa296, 0x1105, 0x00c0, 0x3e4f, 0x7834, 0x2011, 0x0100, 0xa21e, + 0x00c0, 0x3e3a, 0x7a38, 0xd2fc, 0x0040, 0x3e34, 0x70b0, 0xa005, + 0x00c0, 0x3e34, 0x70b3, 0x0001, 0x708b, 0x000a, 0x1078, 0x3e53, + 0x0078, 0x3e51, 0xa005, 0x00c0, 0x3e4f, 0x7a38, 0xd2fc, 0x0040, + 0x3e47, 0x70b0, 0xa005, 0x00c0, 0x3e47, 0x70b3, 0x0001, 0x7087, + 0x0000, 0x708b, 0x000e, 0x1078, 0x3edb, 0x0078, 0x3e51, 0x1078, + 0x4224, 0x0f7f, 0x007c, 0x708b, 0x000b, 0x2011, 0xac0e, 0x22a0, + 0x20a9, 0x0040, 0x2019, 0xffff, 0x43a4, 0x20a9, 0x0002, 0x2009, + 0x0000, 0x41a4, 0x1078, 0x4289, 0x20a3, 0x1106, 0x20a3, 0x0000, + 0x1078, 0x42d4, 0x0040, 0x3e70, 0x2013, 0x0000, 0x0078, 0x3e74, + 0x6030, 0xa085, 0x0100, 0x2012, 0x2298, 0x20a9, 0x0042, 0x53a6, + 0x60c3, 0x0084, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x3e9d, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, + 0x00c0, 0x3e9b, 0x2079, 0xac80, 0x7a30, 0xa296, 0x1106, 0x00c0, + 0x3e9b, 0x7834, 0xa005, 0x00c0, 0x3e9b, 0x708b, 0x000c, 0x1078, + 0x3e9f, 0x0078, 0x3e9d, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x000d, 0x1078, 0x4289, 0x20a3, 0x1107, 0x20a3, 0x0000, 0x2099, + 0xac8e, 0x20a9, 0x0040, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0084, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x3ed9, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, + 0x00c0, 0x3ed7, 0x2079, 0xac80, 0x7a30, 0xa296, 0x1107, 0x00c0, + 0x3ed7, 0x7834, 0xa005, 0x00c0, 0x3ed7, 0x7087, 0x0001, 0x1078, + 0x427b, 0x708b, 0x000e, 0x1078, 0x3edb, 0x0078, 0x3ed9, 0x1078, + 0x4224, 0x0f7f, 0x007c, 0x708b, 0x000f, 0x7083, 0x0000, 0x608b, + 0xbc85, 0x608f, 0xb5b5, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, + 0x07d0, 0x2011, 0x41dc, 0x1078, 0x5a38, 0x007c, 0x7080, 0xa005, + 0x0040, 0x3ef6, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x007c, 0x708b, + 0x0011, 0x1078, 0x42d4, 0x00c0, 0x3f14, 0x716c, 0x81ff, 0x0040, + 0x3f14, 0x2009, 0x0000, 0x7070, 0xa084, 0x00ff, 0x1078, 0x254d, + 0xa186, 0x007e, 0x0040, 0x3f14, 0xa186, 0x0080, 0x0040, 0x3f14, + 0x2011, 0xac8e, 0x1078, 0x419d, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2099, 0xac80, 0x20a1, 0x020b, 0x7480, 0xa480, 0x0018, 0xa080, + 0x0007, 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0014, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3f55, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3f53, + 0x2079, 0xac80, 0x7a30, 0xa296, 0x1103, 0x00c0, 0x3f53, 0x7834, + 0xa005, 0x00c0, 0x3f53, 0x7a38, 0xd2fc, 0x0040, 0x3f4d, 0x70b0, + 0xa005, 0x00c0, 0x3f4d, 0x70b3, 0x0001, 0x708b, 0x0012, 0x1078, + 0x3f57, 0x0078, 0x3f55, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x0013, 0x1078, 0x4295, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, + 0x2011, 0xac8e, 0x1078, 0x42d4, 0x00c0, 0x3f75, 0x7074, 0xa005, + 0x00c0, 0x3f75, 0x7150, 0xa186, 0xffff, 0x0040, 0x3f75, 0x1078, + 0x419d, 0x0040, 0x3f75, 0x1078, 0x42b8, 0x20a9, 0x0008, 0x2298, + 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3fad, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3fab, + 0x2079, 0xac80, 0x7a30, 0xa296, 0x1104, 0x00c0, 0x3fab, 0x7834, + 0xa005, 0x00c0, 0x3fab, 0x7a38, 0xd2fc, 0x0040, 0x3fa5, 0x70b0, + 0xa005, 0x00c0, 0x3fa5, 0x70b3, 0x0001, 0x708b, 0x0014, 0x1078, + 0x3faf, 0x0078, 0x3fad, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x0015, 0x1078, 0x4295, 0x20a3, 0x1104, 0x20a3, 0x0000, 0x3430, + 0x2011, 0xac8e, 0x1078, 0x42d4, 0x00c0, 0x3fd7, 0x7074, 0xa005, + 0x00c0, 0x3fd7, 0x7154, 0xa186, 0xffff, 0x0040, 0x3fd7, 0xa180, + 0x29c0, 0x200c, 0xa18c, 0xff00, 0x810f, 0x1078, 0x419d, 0x0040, + 0x3fd7, 0x1078, 0x3820, 0x0040, 0x3fd7, 0x1078, 0x256a, 0x20a9, + 0x0008, 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x402e, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, + 0x00c0, 0x402c, 0x2079, 0xac80, 0x7a30, 0xa296, 0x1105, 0x00c0, + 0x402c, 0x7834, 0x2011, 0x0100, 0xa21e, 0x00c0, 0x400b, 0x7a38, + 0xd2fc, 0x0040, 0x4009, 0x70b0, 0xa005, 0x00c0, 0x4009, 0x70b3, + 0x0001, 0x0078, 0x401a, 0xa005, 0x00c0, 0x402c, 0x7a38, 0xd2fc, + 0x0040, 0x4018, 0x70b0, 0xa005, 0x00c0, 0x4018, 0x70b3, 0x0001, + 0x7087, 0x0000, 0x7a38, 0xd2f4, 0x0040, 0x4026, 0x2001, 0xa774, + 0x2004, 0xd0a4, 0x00c0, 0x4026, 0x70cf, 0x0008, 0x708b, 0x0016, + 0x1078, 0x4030, 0x0078, 0x402e, 0x1078, 0x4224, 0x0f7f, 0x007c, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xac80, 0x20a1, 0x020b, + 0x20a9, 0x000e, 0x53a6, 0x3430, 0x2011, 0xac8e, 0x708b, 0x0017, + 0x1078, 0x42d4, 0x00c0, 0x4050, 0x7074, 0xa005, 0x00c0, 0x4050, + 0x1078, 0x4104, 0x00c0, 0x405a, 0xa085, 0x0001, 0x1078, 0x256a, + 0x20a9, 0x0008, 0x2099, 0xac8e, 0x26a0, 0x53a6, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, + 0x7080, 0xa005, 0x0040, 0x407f, 0x2011, 0x41dc, 0x1078, 0x5a45, + 0xa086, 0x0084, 0x00c0, 0x407d, 0x2079, 0xac80, 0x7a30, 0xa296, + 0x1106, 0x00c0, 0x407d, 0x7834, 0xa005, 0x00c0, 0x407d, 0x708b, + 0x0018, 0x1078, 0x4081, 0x0078, 0x407f, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x0019, 0x1078, 0x4295, 0x20a3, 0x1106, 0x20a3, + 0x0000, 0x3430, 0x2099, 0xac8e, 0x2039, 0xac0e, 0x27a0, 0x20a9, + 0x0040, 0x53a3, 0x1078, 0x42d4, 0x00c0, 0x40b5, 0x2728, 0x2514, + 0x8207, 0xa084, 0x00ff, 0x8000, 0x2018, 0xa294, 0x00ff, 0x8007, + 0xa205, 0x202a, 0x6030, 0x2310, 0x8214, 0xa2a0, 0xac0e, 0x2414, + 0xa38c, 0x0001, 0x0040, 0x40b0, 0xa294, 0xff00, 0x0078, 0x40b3, + 0xa294, 0x00ff, 0x8007, 0xa215, 0x2222, 0x2798, 0x26a0, 0x20a9, + 0x0040, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0084, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x40e7, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, 0x00c0, 0x40e5, + 0x2079, 0xac80, 0x7a30, 0xa296, 0x1107, 0x00c0, 0x40e5, 0x7834, + 0xa005, 0x00c0, 0x40e5, 0x7087, 0x0001, 0x1078, 0x427b, 0x708b, + 0x001a, 0x1078, 0x40e9, 0x0078, 0x40e7, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x001b, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xac80, 0x20a1, 0x020b, 0x7480, 0xa480, 0x0018, 0xa080, 0x0007, + 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0084, 0x1078, + 0x420b, 0x007c, 0x007c, 0x007c, 0x087e, 0x097e, 0x2029, 0xa753, + 0x252c, 0x20a9, 0x0008, 0x2041, 0xac0e, 0x28a0, 0x2099, 0xac8e, + 0x53a3, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0040, 0x411a, + 0x2011, 0x0000, 0x2800, 0xa200, 0x200c, 0xa1a6, 0xffff, 0x00c0, + 0x412c, 0xd5d4, 0x0040, 0x4127, 0x8210, 0x0078, 0x4128, 0x8211, + 0x00f0, 0x411a, 0x0078, 0x4194, 0x82ff, 0x00c0, 0x413e, 0xd5d4, + 0x0040, 0x4138, 0xa1a6, 0x3fff, 0x0040, 0x4124, 0x0078, 0x413c, + 0xa1a6, 0x3fff, 0x0040, 0x4194, 0xa18d, 0xc000, 0x20a9, 0x0010, + 0x2019, 0x0001, 0xd5d4, 0x0040, 0x4147, 0x2019, 0x0010, 0x2120, + 0xd5d4, 0x0040, 0x414e, 0x8423, 0x0078, 0x414f, 0x8424, 0x00c8, + 0x415c, 0xd5d4, 0x0040, 0x4157, 0x8319, 0x0078, 0x4158, 0x8318, + 0x00f0, 0x4148, 0x0078, 0x4194, 0x23a8, 0x2021, 0x0001, 0x8426, + 0x8425, 0x00f0, 0x4160, 0x2328, 0x8529, 0xa2be, 0x0007, 0x0040, + 0x4174, 0x007e, 0x2039, 0x0007, 0x2200, 0xa73a, 0x007f, 0x27a8, + 0xa5a8, 0x0010, 0x00f0, 0x4170, 0x7552, 0xa5c8, 0x29c0, 0x292c, + 0xa5ac, 0x00ff, 0x6532, 0x60e7, 0x0000, 0x65ea, 0x706f, 0x0000, + 0x7572, 0x2018, 0x2304, 0xa405, 0x201a, 0x7077, 0x0001, 0x26a0, + 0x2898, 0x20a9, 0x0008, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0xa085, 0x0001, 0x0078, 0x419a, 0xa006, 0x0078, 0x419a, 0xa006, + 0x1078, 0x1332, 0x097f, 0x087f, 0x007c, 0x2118, 0x2021, 0x0000, + 0x2001, 0x0007, 0xa39a, 0x0010, 0x0048, 0x41aa, 0x8420, 0x8001, + 0x0078, 0x41a2, 0x2118, 0x84ff, 0x0040, 0x41b3, 0xa39a, 0x0010, + 0x8421, 0x00c0, 0x41ae, 0x2021, 0x0001, 0x83ff, 0x0040, 0x41bc, + 0x8423, 0x8319, 0x00c0, 0x41b8, 0xa238, 0x2704, 0xa42c, 0x00c0, + 0x41d4, 0xa405, 0x203a, 0x7152, 0xa1a0, 0x29c0, 0x242c, 0xa5ac, + 0x00ff, 0x6532, 0x60e7, 0x0000, 0x65ea, 0x706f, 0x0000, 0x7572, + 0x7077, 0x0001, 0xa084, 0x0000, 0x007c, 0x0e7e, 0x2071, 0xa700, + 0x707b, 0x0000, 0x0e7f, 0x007c, 0x0e7e, 0x0f7e, 0x2001, 0x0002, + 0x1078, 0x5ae6, 0x2079, 0x0100, 0x2071, 0x0140, 0x1078, 0x6e0f, + 0x7004, 0xa084, 0x4000, 0x0040, 0x41f1, 0x7003, 0x1000, 0x7003, + 0x0000, 0x127e, 0x2091, 0x8000, 0x2071, 0xa722, 0x2073, 0x0000, + 0x7840, 0x027e, 0x017e, 0x2009, 0x00f7, 0x1078, 0x42a1, 0x017f, + 0xa094, 0x0010, 0xa285, 0x0080, 0x7842, 0x7a42, 0x027f, 0x127f, + 0x0f7f, 0x0e7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x2011, 0xa9bb, + 0x2013, 0x0000, 0x7083, 0x0000, 0x127f, 0x20e1, 0x9080, 0x60a3, + 0x0056, 0x60a7, 0x9575, 0x1078, 0x6e06, 0x2009, 0x07d0, 0x2011, + 0x41dc, 0x1078, 0x5add, 0x007c, 0x017e, 0x027e, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x2011, 0x0003, 0x1078, 0x70e0, 0x2011, 0x0002, + 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, 0x2019, 0x0000, 0x1078, + 0x7058, 0x037f, 0x2009, 0x00f7, 0x1078, 0x42a1, 0x2061, 0xa9c4, + 0x601b, 0x0000, 0x601f, 0x0000, 0x2061, 0xa700, 0x6003, 0x0001, + 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x002d, + 0x2011, 0x4259, 0x1078, 0x5a38, 0x127f, 0x0c7f, 0x027f, 0x017f, + 0x007c, 0x0e7e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2001, 0x0001, + 0x1078, 0x5ae6, 0x2071, 0x0100, 0x1078, 0x6e0f, 0x2071, 0x0140, + 0x7004, 0xa084, 0x4000, 0x0040, 0x4271, 0x7003, 0x1000, 0x7003, + 0x0000, 0x2001, 0x0001, 0x1078, 0x24e8, 0x1078, 0x4224, 0x127f, + 0x007f, 0x0e7f, 0x007c, 0x20a9, 0x0040, 0x20a1, 0xadc0, 0x2099, + 0xac8e, 0x3304, 0x8007, 0x20a2, 0x9398, 0x94a0, 0x00f0, 0x4281, + 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xac00, 0x20a1, + 0x020b, 0x20a9, 0x000c, 0x53a6, 0x007c, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x2099, 0xac80, 0x20a1, 0x020b, 0x20a9, 0x000c, 0x53a6, + 0x007c, 0x0c7e, 0x007e, 0x2061, 0x0100, 0x810f, 0x2001, 0xa72f, + 0x2004, 0xa005, 0x00c0, 0x42b2, 0x6030, 0xa084, 0x00ff, 0xa105, + 0x0078, 0x42b4, 0xa185, 0x00f7, 0x604a, 0x007f, 0x0c7f, 0x007c, + 0x017e, 0x047e, 0x2001, 0xa753, 0x2004, 0xd0a4, 0x0040, 0x42cb, + 0xa006, 0x2020, 0x2009, 0x002a, 0x1078, 0xa22d, 0x2001, 0xa70c, + 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0000, 0x1078, + 0x284f, 0x047f, 0x017f, 0x007c, 0x007e, 0x2001, 0xa70c, 0x2004, + 0xd09c, 0x0040, 0x42db, 0x007f, 0x007c, 0x007e, 0x017e, 0x127e, + 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0xa18d, 0x0006, 0x2102, + 0x127f, 0x017f, 0x007f, 0x007c, 0x157e, 0x20a9, 0x00ff, 0x2009, + 0xa835, 0xa006, 0x200a, 0x8108, 0x00f0, 0x42f2, 0x157f, 0x007c, + 0x0d7e, 0x037e, 0x157e, 0x137e, 0x147e, 0x2069, 0xa752, 0xa006, + 0x6002, 0x6007, 0x0707, 0x600a, 0x600e, 0x6012, 0xa198, 0x29c0, + 0x231c, 0xa39c, 0x00ff, 0x6316, 0x20a9, 0x0004, 0xac98, 0x0006, + 0x23a0, 0x40a4, 0x20a9, 0x0004, 0xac98, 0x000a, 0x23a0, 0x40a4, + 0x603e, 0x6042, 0x604e, 0x6052, 0x6056, 0x605a, 0x605e, 0x6062, + 0x6066, 0x606a, 0x606e, 0x6072, 0x6076, 0x607a, 0x607e, 0x6082, + 0x6086, 0x608a, 0x608e, 0x6092, 0x6096, 0x609a, 0x609e, 0x60ae, + 0x61a2, 0x0d7e, 0x60a4, 0xa06d, 0x0040, 0x4338, 0x1078, 0x13a4, + 0x60a7, 0x0000, 0x60a8, 0xa06d, 0x0040, 0x4340, 0x1078, 0x13a4, + 0x60ab, 0x0000, 0x0d7f, 0xa006, 0x604a, 0x6810, 0x603a, 0x680c, + 0x6046, 0x6814, 0xa084, 0x00ff, 0x6042, 0x147f, 0x137f, 0x157f, + 0x037f, 0x0d7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x6944, 0x6e48, + 0xa684, 0x3fff, 0xa082, 0x4000, 0x00c8, 0x4424, 0xa18c, 0xff00, + 0x810f, 0xa182, 0x00ff, 0x00c8, 0x442a, 0x2001, 0xa70c, 0x2004, + 0xa084, 0x0003, 0x0040, 0x4385, 0x2001, 0xa70c, 0x2004, 0xd084, + 0x00c0, 0x4405, 0xa188, 0xa835, 0x2104, 0xa065, 0x0040, 0x4405, + 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x00c0, 0x4405, 0x6000, + 0xd0c4, 0x0040, 0x4405, 0x0078, 0x4392, 0xa188, 0xa835, 0x2104, + 0xa065, 0x0040, 0x43e9, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, + 0x00c0, 0x43ef, 0x60a4, 0xa00d, 0x0040, 0x439a, 0x1078, 0x4817, + 0x0040, 0x43e3, 0x60a8, 0xa00d, 0x0040, 0x43b4, 0x1078, 0x486a, + 0x00c0, 0x43b4, 0x694c, 0xd1fc, 0x00c0, 0x43aa, 0x1078, 0x44df, + 0x0078, 0x43de, 0x1078, 0x4484, 0x694c, 0xd1ec, 0x00c0, 0x43de, + 0x1078, 0x46d6, 0x0078, 0x43de, 0x694c, 0xa184, 0xa000, 0x0040, + 0x43ce, 0xd1ec, 0x0040, 0x43c7, 0xd1fc, 0x0040, 0x43c3, 0x1078, + 0x46e7, 0x0078, 0x43ca, 0x1078, 0x46e7, 0x0078, 0x43ce, 0xd1fc, + 0x0040, 0x43ce, 0x1078, 0x4484, 0x0078, 0x43de, 0x6050, 0xa00d, + 0x0040, 0x43d9, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, 0x0078, + 0x43de, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x1078, 0x5da9, + 0xa006, 0x127f, 0x007c, 0x2001, 0x0005, 0x2009, 0x0000, 0x0078, + 0x442e, 0x2001, 0x0028, 0x2009, 0x0000, 0x0078, 0x442e, 0xa082, + 0x0006, 0x00c8, 0x4405, 0x60a0, 0xd0bc, 0x00c0, 0x4401, 0x6100, + 0xd1fc, 0x0040, 0x4392, 0x2001, 0x0029, 0x2009, 0x1000, 0x0078, + 0x442e, 0x2001, 0x0028, 0x0078, 0x4420, 0x2009, 0xa70c, 0x210c, + 0xd18c, 0x0040, 0x440f, 0x2001, 0x0004, 0x0078, 0x4420, 0xd184, + 0x0040, 0x4416, 0x2001, 0x0004, 0x0078, 0x4420, 0x2001, 0x0029, + 0x6100, 0xd1fc, 0x0040, 0x4420, 0x2009, 0x1000, 0x0078, 0x442e, + 0x2009, 0x0000, 0x0078, 0x442e, 0x2001, 0x0029, 0x2009, 0x0000, + 0x0078, 0x442e, 0x2001, 0x0029, 0x2009, 0x0000, 0xa005, 0x127f, + 0x007c, 0x6944, 0x6e48, 0xa684, 0x3fff, 0xa082, 0x4000, 0x00c8, + 0x447e, 0xa18c, 0xff00, 0x810f, 0xa182, 0x00ff, 0x00c8, 0x4464, + 0xa188, 0xa835, 0x2104, 0xa065, 0x0040, 0x4464, 0x6004, 0xa084, + 0x00ff, 0xa08e, 0x0006, 0x00c0, 0x446a, 0x684c, 0xd0ec, 0x0040, + 0x4457, 0x1078, 0x46e7, 0x1078, 0x4484, 0x0078, 0x445f, 0x1078, + 0x4484, 0x684c, 0xd0fc, 0x0040, 0x445f, 0x1078, 0x46d6, 0x1078, + 0x472f, 0xa006, 0x0078, 0x4482, 0x2001, 0x0028, 0x2009, 0x0000, + 0x0078, 0x4482, 0xa082, 0x0006, 0x00c8, 0x4478, 0x6100, 0xd1fc, + 0x0040, 0x444d, 0x2001, 0x0029, 0x2009, 0x1000, 0x0078, 0x4482, + 0x2001, 0x0029, 0x2009, 0x0000, 0x0078, 0x4482, 0x2001, 0x0029, + 0x2009, 0x0000, 0xa005, 0x007c, 0x127e, 0x2091, 0x8000, 0x6050, + 0xa00d, 0x0040, 0x4492, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, + 0x127f, 0x007c, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x0078, + 0x4490, 0x127e, 0x2091, 0x8000, 0x604c, 0xa005, 0x0040, 0x44af, + 0x0e7e, 0x2071, 0xa9b1, 0x7004, 0xa086, 0x0002, 0x0040, 0x44b6, + 0x0e7f, 0x604c, 0x6802, 0x2d00, 0x604e, 0x127f, 0x007c, 0x2d00, + 0x6052, 0x604e, 0x6803, 0x0000, 0x0078, 0x44ad, 0x701c, 0xac06, + 0x00c0, 0x44a8, 0x604c, 0x2070, 0x7000, 0x6802, 0x2d00, 0x7002, + 0x0e7f, 0x127f, 0x007c, 0x127e, 0x2091, 0x8000, 0x604c, 0xa06d, + 0x0040, 0x44d1, 0x6800, 0xa005, 0x00c0, 0x44cf, 0x6052, 0x604e, + 0xad05, 0x127f, 0x007c, 0x604c, 0xa06d, 0x0040, 0x44de, 0x6800, + 0xa005, 0x00c0, 0x44dc, 0x6052, 0x604e, 0xad05, 0x007c, 0x6803, + 0x0000, 0x6084, 0xa00d, 0x0040, 0x44e9, 0x2d00, 0x200a, 0x6086, + 0x007c, 0x2d00, 0x6086, 0x6082, 0x0078, 0x44e8, 0x127e, 0x0c7e, + 0x027e, 0x2091, 0x8000, 0x6218, 0x2260, 0x6200, 0xa005, 0x0040, + 0x44fc, 0xc285, 0x0078, 0x44fd, 0xc284, 0x6202, 0x027f, 0x0c7f, + 0x127f, 0x007c, 0x127e, 0x0c7e, 0x2091, 0x8000, 0x6218, 0x2260, + 0x6204, 0x007e, 0xa086, 0x0006, 0x00c0, 0x4521, 0x609c, 0xd0ac, + 0x0040, 0x4521, 0x2001, 0xa753, 0x2004, 0xd0a4, 0x0040, 0x4521, + 0xa284, 0xff00, 0x8007, 0xa086, 0x0007, 0x00c0, 0x4521, 0x2011, + 0x0600, 0x007f, 0xa294, 0xff00, 0xa215, 0x6206, 0x007e, 0xa086, + 0x0006, 0x00c0, 0x4531, 0x6290, 0x82ff, 0x00c0, 0x4531, 0x1078, + 0x1332, 0x007f, 0x0c7f, 0x127f, 0x007c, 0x127e, 0x0c7e, 0x2091, + 0x8000, 0x6218, 0x2260, 0x6204, 0x007e, 0xa086, 0x0006, 0x00c0, + 0x4553, 0x609c, 0xd0a4, 0x0040, 0x4553, 0x2001, 0xa753, 0x2004, + 0xd0ac, 0x00c0, 0x4553, 0xa284, 0x00ff, 0xa086, 0x0007, 0x00c0, + 0x4553, 0x2011, 0x0006, 0x007f, 0xa294, 0x00ff, 0x8007, 0xa215, + 0x6206, 0x0c7f, 0x127f, 0x007c, 0x027e, 0xa182, 0x00ff, 0x0048, + 0x4565, 0xa085, 0x0001, 0x0078, 0x457d, 0xa190, 0xa835, 0x2204, + 0xa065, 0x00c0, 0x457c, 0x017e, 0x0d7e, 0x1078, 0x1370, 0x2d60, + 0x0d7f, 0x017f, 0x0040, 0x4561, 0x2c00, 0x2012, 0x60a7, 0x0000, + 0x60ab, 0x0000, 0x1078, 0x42f8, 0xa006, 0x027f, 0x007c, 0x127e, + 0x2091, 0x8000, 0x027e, 0xa182, 0x00ff, 0x0048, 0x458b, 0xa085, + 0x0001, 0x0078, 0x45c1, 0x0d7e, 0xa190, 0xa835, 0x2204, 0xa06d, + 0x0040, 0x45bf, 0x2013, 0x0000, 0x0d7e, 0x0c7e, 0x2d60, 0x60a4, + 0xa06d, 0x0040, 0x459d, 0x1078, 0x13a4, 0x60a8, 0xa06d, 0x0040, + 0x45a3, 0x1078, 0x13a4, 0x0c7f, 0x0d7f, 0x0d7e, 0x0c7e, 0x68ac, + 0x2060, 0x8cff, 0x0040, 0x45bb, 0x600c, 0x007e, 0x6010, 0x2068, + 0x1078, 0x8d16, 0x0040, 0x45b6, 0x1078, 0x13b4, 0x1078, 0x772d, + 0x0c7f, 0x0078, 0x45a9, 0x0c7f, 0x0d7f, 0x1078, 0x13a4, 0x0d7f, + 0xa006, 0x027f, 0x127f, 0x007c, 0x017e, 0xa182, 0x00ff, 0x0048, + 0x45cd, 0xa085, 0x0001, 0x0078, 0x45d4, 0xa188, 0xa835, 0x2104, + 0xa065, 0x0040, 0x45c9, 0xa006, 0x017f, 0x007c, 0x0d7e, 0x157e, + 0x137e, 0x147e, 0x600b, 0x0000, 0x600f, 0x0000, 0x6000, 0xc08c, + 0x6002, 0x2069, 0xac8e, 0x6808, 0x605e, 0x6810, 0x6062, 0x6138, + 0xa10a, 0x0048, 0x45ec, 0x603a, 0x6814, 0x6066, 0x2099, 0xac96, + 0xac88, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2099, 0xac9a, + 0xac88, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2069, 0xacae, + 0x6808, 0x606a, 0x690c, 0x616e, 0x6810, 0x6072, 0x6818, 0x6076, + 0x60a0, 0xa086, 0x007e, 0x00c0, 0x4611, 0x2069, 0xac8e, 0x690c, + 0x616e, 0xa182, 0x0211, 0x00c8, 0x4619, 0x2009, 0x0008, 0x0078, + 0x4643, 0xa182, 0x0259, 0x00c8, 0x4621, 0x2009, 0x0007, 0x0078, + 0x4643, 0xa182, 0x02c1, 0x00c8, 0x4629, 0x2009, 0x0006, 0x0078, + 0x4643, 0xa182, 0x0349, 0x00c8, 0x4631, 0x2009, 0x0005, 0x0078, + 0x4643, 0xa182, 0x0421, 0x00c8, 0x4639, 0x2009, 0x0004, 0x0078, + 0x4643, 0xa182, 0x0581, 0x00c8, 0x4641, 0x2009, 0x0003, 0x0078, + 0x4643, 0x2009, 0x0002, 0x6192, 0x147f, 0x137f, 0x157f, 0x0d7f, + 0x007c, 0x017e, 0x027e, 0x0e7e, 0x2071, 0xac8d, 0x2e04, 0x6896, + 0x2071, 0xac8e, 0x7004, 0x689a, 0x701c, 0x689e, 0x6a00, 0x2009, + 0xa772, 0x210c, 0xd0bc, 0x0040, 0x4663, 0xd1ec, 0x0040, 0x4663, + 0xc2ad, 0x0078, 0x4664, 0xc2ac, 0xd0c4, 0x0040, 0x466d, 0xd1e4, + 0x0040, 0x466d, 0xc2bd, 0x0078, 0x466e, 0xc2bc, 0x6a02, 0x0e7f, + 0x027f, 0x017f, 0x007c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x60a4, + 0xa06d, 0x0040, 0x4697, 0x6900, 0x81ff, 0x00c0, 0x46ab, 0x6a04, + 0xa282, 0x0010, 0x00c8, 0x46b0, 0xad88, 0x0004, 0x20a9, 0x0010, + 0x2104, 0xa086, 0xffff, 0x0040, 0x4692, 0x8108, 0x00f0, 0x4688, + 0x1078, 0x1332, 0x260a, 0x8210, 0x6a06, 0x0078, 0x46ab, 0x1078, + 0x138b, 0x0040, 0x46b0, 0x2d00, 0x60a6, 0x6803, 0x0000, 0xad88, + 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, 0x00f0, 0x46a3, + 0x6807, 0x0001, 0x6e12, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x007c, + 0xa006, 0x0078, 0x46ad, 0x127e, 0x2091, 0x8000, 0x0d7e, 0x60a4, + 0xa00d, 0x0040, 0x46d3, 0x2168, 0x6800, 0xa005, 0x00c0, 0x46cf, + 0x1078, 0x4817, 0x00c0, 0x46d3, 0x200b, 0xffff, 0x6804, 0xa08a, + 0x0002, 0x0048, 0x46cf, 0x8001, 0x6806, 0x0078, 0x46d3, 0x1078, + 0x13a4, 0x60a7, 0x0000, 0x0d7f, 0x127f, 0x007c, 0x127e, 0x2091, + 0x8000, 0x1078, 0x487f, 0x0078, 0x46df, 0x1078, 0x4484, 0x1078, + 0x4775, 0x00c0, 0x46dd, 0x1078, 0x472f, 0x127f, 0x007c, 0x0d7e, + 0x127e, 0x2091, 0x8000, 0x60a8, 0xa06d, 0x0040, 0x470b, 0x6950, + 0x81ff, 0x00c0, 0x471f, 0x6a54, 0xa282, 0x0010, 0x00c8, 0x472c, + 0xad88, 0x0018, 0x20a9, 0x0010, 0x2104, 0xa086, 0xffff, 0x0040, + 0x4706, 0x8108, 0x00f0, 0x46fc, 0x1078, 0x1332, 0x260a, 0x8210, + 0x6a56, 0x0078, 0x471f, 0x1078, 0x138b, 0x0040, 0x472c, 0x2d00, + 0x60aa, 0x6853, 0x0000, 0xad88, 0x0018, 0x20a9, 0x0010, 0x200b, + 0xffff, 0x8108, 0x00f0, 0x4717, 0x6857, 0x0001, 0x6e62, 0x0078, + 0x4723, 0x1078, 0x44df, 0x1078, 0x4739, 0x00c0, 0x4721, 0xa085, + 0x0001, 0x127f, 0x0d7f, 0x007c, 0xa006, 0x0078, 0x4729, 0x127e, + 0x2091, 0x8000, 0x1078, 0x5da9, 0x127f, 0x007c, 0xa01e, 0x0078, + 0x473b, 0x2019, 0x0001, 0xa00e, 0x127e, 0x2091, 0x8000, 0x604c, + 0x2068, 0x6000, 0xd0dc, 0x00c0, 0x4759, 0x8dff, 0x0040, 0x4770, + 0x83ff, 0x0040, 0x4751, 0x6848, 0xa606, 0x0040, 0x475e, 0x0078, + 0x4759, 0x683c, 0xa406, 0x00c0, 0x4759, 0x6840, 0xa506, 0x0040, + 0x475e, 0x2d08, 0x6800, 0x2068, 0x0078, 0x4745, 0x1078, 0x7233, + 0x6a00, 0x604c, 0xad06, 0x00c0, 0x4768, 0x624e, 0x0078, 0x476b, + 0xa180, 0x0000, 0x2202, 0x82ff, 0x00c0, 0x4770, 0x6152, 0x8dff, + 0x127f, 0x007c, 0xa01e, 0x0078, 0x4777, 0x2019, 0x0001, 0xa00e, + 0x6080, 0x2068, 0x8dff, 0x0040, 0x47a3, 0x83ff, 0x0040, 0x4786, + 0x6848, 0xa606, 0x0040, 0x4793, 0x0078, 0x478e, 0x683c, 0xa406, + 0x00c0, 0x478e, 0x6840, 0xa506, 0x0040, 0x4793, 0x2d08, 0x6800, + 0x2068, 0x0078, 0x477a, 0x6a00, 0x6080, 0xad06, 0x00c0, 0x479b, + 0x6282, 0x0078, 0x479e, 0xa180, 0x0000, 0x2202, 0x82ff, 0x00c0, + 0x47a3, 0x6186, 0x8dff, 0x007c, 0xa016, 0x1078, 0x4810, 0x00c0, + 0x47ab, 0x2011, 0x0001, 0x1078, 0x4863, 0x00c0, 0x47b1, 0xa295, + 0x0002, 0x007c, 0x1078, 0x489b, 0x0040, 0x47ba, 0x1078, 0x8dda, + 0x0078, 0x47bc, 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, 0x0040, + 0x47c5, 0x1078, 0x8d72, 0x0078, 0x47c7, 0xa085, 0x0001, 0x007c, + 0x1078, 0x489b, 0x0040, 0x47d0, 0x1078, 0x8dbc, 0x0078, 0x47d2, + 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, 0x0040, 0x47db, 0x1078, + 0x8d8e, 0x0078, 0x47dd, 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, + 0x0040, 0x47e6, 0x1078, 0x8df8, 0x0078, 0x47e8, 0xa085, 0x0001, + 0x007c, 0x127e, 0x007e, 0x0d7e, 0x2091, 0x8000, 0x6080, 0xa06d, + 0x0040, 0x4808, 0x6800, 0x007e, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x8f8d, 0x007e, 0x6000, 0xd0fc, 0x0040, 0x4802, + 0x1078, 0xa4fd, 0x007f, 0x1078, 0x4a73, 0x007f, 0x0078, 0x47ef, + 0x6083, 0x0000, 0x6087, 0x0000, 0x0d7f, 0x007f, 0x127f, 0x007c, + 0x60a4, 0xa00d, 0x00c0, 0x4817, 0xa085, 0x0001, 0x007c, 0x0e7e, + 0x2170, 0x7000, 0xa005, 0x00c0, 0x482c, 0x20a9, 0x0010, 0xae88, + 0x0004, 0x2104, 0xa606, 0x0040, 0x482c, 0x8108, 0x00f0, 0x4821, + 0xa085, 0x0001, 0x0078, 0x482d, 0xa006, 0x0e7f, 0x007c, 0x0d7e, + 0x127e, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x00c0, 0x483d, 0x1078, + 0x138b, 0x0040, 0x484f, 0x2d00, 0x60a6, 0x6803, 0x0001, 0x6807, + 0x0000, 0xad88, 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, + 0x00f0, 0x4845, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x007c, 0xa006, + 0x0078, 0x484c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x60a4, 0xa06d, + 0x0040, 0x4860, 0x60a7, 0x0000, 0x1078, 0x13a4, 0xa085, 0x0001, + 0x127f, 0x0d7f, 0x007c, 0x60a8, 0xa00d, 0x00c0, 0x486a, 0xa085, + 0x0001, 0x007c, 0x0e7e, 0x2170, 0x7050, 0xa005, 0x00c0, 0x487d, + 0x20a9, 0x0010, 0xae88, 0x0018, 0x2104, 0xa606, 0x0040, 0x487d, + 0x8108, 0x00f0, 0x4874, 0xa085, 0x0001, 0x0e7f, 0x007c, 0x127e, + 0x2091, 0x8000, 0x1078, 0x4863, 0x00c0, 0x4899, 0x200b, 0xffff, + 0x0d7e, 0x60a8, 0x2068, 0x6854, 0xa08a, 0x0002, 0x0048, 0x4894, + 0x8001, 0x6856, 0x0078, 0x4898, 0x1078, 0x13a4, 0x60ab, 0x0000, + 0x0d7f, 0x127f, 0x007c, 0x609c, 0xd0a4, 0x007c, 0x0f7e, 0x71b0, + 0x81ff, 0x00c0, 0x48b9, 0x71cc, 0xd19c, 0x0040, 0x48b9, 0x2001, + 0x007e, 0xa080, 0xa835, 0x2004, 0xa07d, 0x0040, 0x48b9, 0x7804, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x48b9, 0x7800, 0xc0ed, + 0x7802, 0x2079, 0xa752, 0x7804, 0xd0a4, 0x0040, 0x48df, 0x157e, + 0x0c7e, 0x20a9, 0x007f, 0x2009, 0x0000, 0x017e, 0x1078, 0x45c4, + 0x00c0, 0x48d9, 0x6004, 0xa084, 0xff00, 0x8007, 0xa096, 0x0004, + 0x0040, 0x48d6, 0xa086, 0x0006, 0x00c0, 0x48d9, 0x6000, 0xc0ed, + 0x6002, 0x017f, 0x8108, 0x00f0, 0x48c5, 0x0c7f, 0x157f, 0x1078, + 0x4967, 0x0040, 0x48e8, 0x2001, 0xa9a1, 0x200c, 0x0078, 0x48f0, + 0x2079, 0xa752, 0x7804, 0xd0a4, 0x0040, 0x48f4, 0x2009, 0x07d0, + 0x2011, 0x48f6, 0x1078, 0x5add, 0x0f7f, 0x007c, 0x2011, 0x48f6, + 0x1078, 0x5a45, 0x1078, 0x4967, 0x0040, 0x491e, 0x2001, 0xa8b3, + 0x2004, 0xa080, 0x0000, 0x200c, 0xc1ec, 0x2102, 0x2001, 0xa753, + 0x2004, 0xd0a4, 0x0040, 0x4912, 0x2009, 0x07d0, 0x2011, 0x48f6, + 0x1078, 0x5add, 0x0e7e, 0x2071, 0xa700, 0x706f, 0x0000, 0x7073, + 0x0000, 0x1078, 0x2677, 0x0e7f, 0x0078, 0x4956, 0x157e, 0x0c7e, + 0x20a9, 0x007f, 0x2009, 0x0000, 0x017e, 0x1078, 0x45c4, 0x00c0, + 0x4950, 0x6000, 0xd0ec, 0x0040, 0x4950, 0x047e, 0x62a0, 0xa294, + 0x00ff, 0x8227, 0xa006, 0x2009, 0x0029, 0x1078, 0xa22d, 0x6000, + 0xc0e5, 0xc0ec, 0x6002, 0x6004, 0xa084, 0x00ff, 0xa085, 0x0700, + 0x6006, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, + 0x1078, 0x5e0a, 0x2009, 0x0000, 0x1078, 0x9f9b, 0x077f, 0x047f, + 0x017f, 0x8108, 0x00f0, 0x4924, 0x0c7f, 0x157f, 0x007c, 0x0c7e, + 0x6018, 0x2060, 0x6000, 0xc0ec, 0x6002, 0x0c7f, 0x007c, 0x7818, + 0x2004, 0xd0ac, 0x007c, 0x7818, 0x2004, 0xd0bc, 0x007c, 0x0f7e, + 0x2001, 0xa8b3, 0x2004, 0xa07d, 0x0040, 0x4970, 0x7800, 0xd0ec, + 0x0f7f, 0x007c, 0x127e, 0x027e, 0x2091, 0x8000, 0x007e, 0x62a0, + 0xa290, 0xa835, 0x2204, 0xac06, 0x10c0, 0x1332, 0x007f, 0x6200, + 0xa005, 0x0040, 0x4986, 0xc2fd, 0x0078, 0x4987, 0xc2fc, 0x6202, + 0x027f, 0x127f, 0x007c, 0x2011, 0xa733, 0x2204, 0xd0cc, 0x0040, + 0x4998, 0x2001, 0xa99f, 0x200c, 0x2011, 0x4999, 0x1078, 0x5add, + 0x007c, 0x2011, 0x4999, 0x1078, 0x5a45, 0x2011, 0xa733, 0x2204, + 0xc0cc, 0x2012, 0x007c, 0x2071, 0xa814, 0x7003, 0x0001, 0x7007, + 0x0000, 0x7013, 0x0000, 0x7017, 0x0000, 0x701b, 0x0000, 0x701f, + 0x0000, 0x700b, 0x0000, 0x704b, 0x0001, 0x704f, 0x0000, 0x705b, + 0x0020, 0x705f, 0x0040, 0x707f, 0x0000, 0x2071, 0xa97d, 0x7003, + 0xa814, 0x7007, 0x0000, 0x700b, 0x0000, 0x700f, 0xa95d, 0x7013, + 0x0020, 0x7017, 0x0040, 0x7037, 0x0000, 0x007c, 0x017e, 0x0e7e, + 0x2071, 0xa935, 0xa00e, 0x7186, 0x718a, 0x7097, 0x0001, 0x2001, + 0xa753, 0x2004, 0xd0fc, 0x00c0, 0x49e8, 0x2001, 0xa753, 0x2004, + 0xa00e, 0xd09c, 0x0040, 0x49e5, 0x8108, 0x7102, 0x0078, 0x4a3b, + 0x2001, 0xa772, 0x200c, 0xa184, 0x000f, 0x2009, 0xa773, 0x210c, + 0x0079, 0x49f2, 0x49dd, 0x4a13, 0x4a1b, 0x4a26, 0x4a2c, 0x49dd, + 0x49dd, 0x49dd, 0x4a02, 0x49dd, 0x49dd, 0x49dd, 0x49dd, 0x49dd, + 0x49dd, 0x49dd, 0x7003, 0x0004, 0x137e, 0x147e, 0x157e, 0x2099, + 0xa776, 0x20a1, 0xa986, 0x20a9, 0x0004, 0x53a3, 0x157f, 0x147f, + 0x137f, 0x0078, 0x4a3b, 0x708f, 0x0005, 0x7007, 0x0122, 0x2001, + 0x0002, 0x0078, 0x4a21, 0x708f, 0x0002, 0x7007, 0x0121, 0x2001, + 0x0003, 0x7002, 0x7097, 0x0001, 0x0078, 0x4a38, 0x7007, 0x0122, + 0x2001, 0x0002, 0x0078, 0x4a30, 0x7007, 0x0121, 0x2001, 0x0003, + 0x7002, 0xa006, 0x7096, 0x708e, 0xa184, 0xff00, 0x8007, 0x709a, + 0xa184, 0x00ff, 0x7092, 0x0e7f, 0x017f, 0x007c, 0x0e7e, 0x2071, + 0xa814, 0x684c, 0xa005, 0x00c0, 0x4a4c, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0078, 0x4a71, 0x6a60, 0x7236, 0x6b64, 0x733a, + 0x6868, 0x703e, 0x7076, 0x686c, 0x7042, 0x707a, 0x684c, 0x702e, + 0x6844, 0x7032, 0x2009, 0x000d, 0x200a, 0x700b, 0x0000, 0x8007, + 0x8006, 0x8006, 0xa08c, 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, + 0xa319, 0x726e, 0x7372, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, + 0xa006, 0x0e7f, 0x007c, 0x0e7e, 0x027e, 0x6838, 0xd0fc, 0x00c0, + 0x4ac9, 0x6804, 0xa00d, 0x0040, 0x4a8f, 0x0d7e, 0x2071, 0xa700, + 0xa016, 0x702c, 0x2168, 0x6904, 0x206a, 0x8210, 0x2d00, 0x81ff, + 0x00c0, 0x4a82, 0x702e, 0x70ac, 0xa200, 0x70ae, 0x0d7f, 0x2071, + 0xa814, 0x701c, 0xa005, 0x00c0, 0x4adb, 0x0068, 0x4ad9, 0x2071, + 0xa935, 0x7200, 0x82ff, 0x0040, 0x4ad9, 0x6934, 0xa186, 0x0103, + 0x00c0, 0x4aec, 0x6948, 0x6844, 0xa105, 0x00c0, 0x4acc, 0x2009, + 0x8020, 0x2200, 0x0079, 0x4aac, 0x4ad9, 0x4ab1, 0x4b09, 0x4b17, + 0x4ad9, 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4ad9, 0x7122, + 0x683c, 0x7026, 0x6840, 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, + 0x2071, 0xa700, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000, + 0x70ae, 0x027f, 0x0e7f, 0x007c, 0x6844, 0xa086, 0x0100, 0x00c0, + 0x4ad9, 0x6868, 0xa005, 0x00c0, 0x4ad9, 0x2009, 0x8020, 0x0078, + 0x4aa9, 0x2071, 0xa814, 0x2d08, 0x206b, 0x0000, 0x7010, 0x8000, + 0x7012, 0x7018, 0xa06d, 0x711a, 0x0040, 0x4ae9, 0x6902, 0x0078, + 0x4aea, 0x711e, 0x0078, 0x4ac9, 0xa18c, 0x00ff, 0xa186, 0x0017, + 0x0040, 0x4afa, 0xa186, 0x001e, 0x0040, 0x4afa, 0xa18e, 0x001f, + 0x00c0, 0x4ad9, 0x684c, 0xd0cc, 0x0040, 0x4ad9, 0x6850, 0xa084, + 0x00ff, 0xa086, 0x0001, 0x00c0, 0x4ad9, 0x2009, 0x8021, 0x0078, + 0x4aa9, 0x7084, 0x8008, 0xa092, 0x001e, 0x00c8, 0x4ad9, 0x7186, + 0xae90, 0x0003, 0xa210, 0x683c, 0x2012, 0x0078, 0x4b27, 0x7084, + 0x8008, 0xa092, 0x000f, 0x00c8, 0x4ad9, 0x7186, 0xae90, 0x0003, + 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, 0x6840, 0x2012, 0x7088, + 0xa10a, 0x0048, 0x4ac0, 0x718c, 0x7084, 0xa10a, 0x0048, 0x4ac0, + 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4ac0, 0x2071, 0xa935, + 0x7000, 0xa086, 0x0002, 0x00c0, 0x4b47, 0x1078, 0x4dc3, 0x2071, + 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4ac0, 0x1078, + 0x4dee, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, + 0x4ac0, 0x007e, 0x684c, 0x007e, 0x6837, 0x0103, 0x20a9, 0x001c, + 0xad80, 0x0011, 0x20a0, 0x2001, 0x0000, 0x40a4, 0x007f, 0xa084, + 0x00ff, 0x684e, 0x007f, 0x684a, 0x6952, 0x007c, 0x2071, 0xa814, + 0x7004, 0x0079, 0x4b6b, 0x4b75, 0x4b86, 0x4d94, 0x4d95, 0x4dbc, + 0x4dc2, 0x4b76, 0x4d82, 0x4d23, 0x4da5, 0x007c, 0x127e, 0x2091, + 0x8000, 0x0068, 0x4b85, 0x2009, 0x000d, 0x7030, 0x200a, 0x2091, + 0x4080, 0x7007, 0x0001, 0x700b, 0x0000, 0x127f, 0x2069, 0xa9c4, + 0x6844, 0xa005, 0x0050, 0x4bae, 0x00c0, 0x4bae, 0x127e, 0x2091, + 0x8000, 0x2069, 0x0000, 0x6934, 0x2001, 0xa820, 0x2004, 0xa10a, + 0x0040, 0x4ba9, 0x0068, 0x4bad, 0x2069, 0x0000, 0x6818, 0xd084, + 0x00c0, 0x4bad, 0x2009, 0x8040, 0x6922, 0x681b, 0x0001, 0x2091, + 0x4080, 0x2069, 0xa9c4, 0x6847, 0xffff, 0x127f, 0x2069, 0xa700, + 0x6848, 0x6964, 0xa102, 0x2069, 0xa935, 0x688a, 0x6984, 0x701c, + 0xa06d, 0x0040, 0x4bc0, 0x81ff, 0x0040, 0x4c08, 0x0078, 0x4bd6, + 0x81ff, 0x0040, 0x4cda, 0x2071, 0xa935, 0x7184, 0x7088, 0xa10a, + 0x00c8, 0x4bd6, 0x7190, 0x2071, 0xa9c4, 0x7040, 0xa005, 0x0040, + 0x4bd6, 0x00d0, 0x4cda, 0x7142, 0x0078, 0x4cda, 0x2071, 0xa935, + 0x718c, 0x127e, 0x2091, 0x8000, 0x7084, 0xa10a, 0x0048, 0x4cf7, + 0x0068, 0x4c8c, 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4c8c, + 0x2001, 0xffff, 0x2071, 0xa9c4, 0x7042, 0x2071, 0xa935, 0x7000, + 0xa086, 0x0002, 0x00c0, 0x4bfe, 0x1078, 0x4dc3, 0x2071, 0x0000, + 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4c8c, 0x1078, 0x4dee, + 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4c8c, + 0x2071, 0xa935, 0x7000, 0xa005, 0x0040, 0x4cb9, 0x6934, 0xa186, + 0x0103, 0x00c0, 0x4c8f, 0x684c, 0xd0bc, 0x00c0, 0x4cb9, 0x6948, + 0x6844, 0xa105, 0x00c0, 0x4cac, 0x2009, 0x8020, 0x2071, 0xa935, + 0x7000, 0x0079, 0x4c23, 0x4cb9, 0x4c71, 0x4c49, 0x4c5b, 0x4c28, + 0x137e, 0x147e, 0x157e, 0x2099, 0xa776, 0x20a1, 0xa986, 0x20a9, + 0x0004, 0x53a3, 0x157f, 0x147f, 0x137f, 0x2071, 0xa97d, 0xad80, + 0x000f, 0x700e, 0x7013, 0x0002, 0x7007, 0x0002, 0x700b, 0x0000, + 0x2e10, 0x1078, 0x13db, 0x2071, 0xa814, 0x7007, 0x0009, 0x0078, + 0x4cda, 0x7084, 0x8008, 0xa092, 0x001e, 0x00c8, 0x4cda, 0xae90, + 0x0003, 0xa210, 0x683c, 0x2012, 0x7186, 0x2071, 0xa814, 0x1078, + 0x4e4c, 0x0078, 0x4cda, 0x7084, 0x8008, 0xa092, 0x000f, 0x00c8, + 0x4cda, 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, + 0x6840, 0x2012, 0x7186, 0x2071, 0xa814, 0x1078, 0x4e4c, 0x0078, + 0x4cda, 0x127e, 0x2091, 0x8000, 0x0068, 0x4c8c, 0x2071, 0x0000, + 0x7018, 0xd084, 0x00c0, 0x4c8c, 0x7122, 0x683c, 0x7026, 0x6840, + 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, 0x127f, 0x2071, 0xa814, + 0x1078, 0x4e4c, 0x0078, 0x4cda, 0x127f, 0x0078, 0x4cda, 0xa18c, + 0x00ff, 0xa186, 0x0017, 0x0040, 0x4c9d, 0xa186, 0x001e, 0x0040, + 0x4c9d, 0xa18e, 0x001f, 0x00c0, 0x4cb9, 0x684c, 0xd0cc, 0x0040, + 0x4cb9, 0x6850, 0xa084, 0x00ff, 0xa086, 0x0001, 0x00c0, 0x4cb9, + 0x2009, 0x8021, 0x0078, 0x4c1e, 0x6844, 0xa086, 0x0100, 0x00c0, + 0x4cb9, 0x6868, 0xa005, 0x00c0, 0x4cb9, 0x2009, 0x8020, 0x0078, + 0x4c1e, 0x2071, 0xa814, 0x1078, 0x4e60, 0x0040, 0x4cda, 0x2071, + 0xa814, 0x700f, 0x0001, 0x6934, 0xa184, 0x00ff, 0xa086, 0x0003, + 0x00c0, 0x4cd1, 0x810f, 0xa18c, 0x00ff, 0x8101, 0x0040, 0x4cd1, + 0x710e, 0x7007, 0x0003, 0x1078, 0x4e80, 0x7050, 0xa086, 0x0100, + 0x0040, 0x4d95, 0x127e, 0x2091, 0x8000, 0x2071, 0xa814, 0x7008, + 0xa086, 0x0001, 0x00c0, 0x4cf5, 0x0068, 0x4cf5, 0x2009, 0x000d, + 0x7030, 0x200a, 0x2091, 0x4080, 0x700b, 0x0000, 0x7004, 0xa086, + 0x0006, 0x00c0, 0x4cf5, 0x7007, 0x0001, 0x127f, 0x007c, 0x2071, + 0xa814, 0x1078, 0x4e60, 0x0040, 0x4d20, 0x2071, 0xa935, 0x7084, + 0x700a, 0x20a9, 0x0020, 0x2099, 0xa936, 0x20a1, 0xa95d, 0x53a3, + 0x7087, 0x0000, 0x2071, 0xa814, 0x2069, 0xa97d, 0x706c, 0x6826, + 0x7070, 0x682a, 0x7074, 0x682e, 0x7078, 0x6832, 0x2d10, 0x1078, + 0x13db, 0x7007, 0x0008, 0x2001, 0xffff, 0x2071, 0xa9c4, 0x7042, + 0x127f, 0x0078, 0x4cda, 0x2069, 0xa97d, 0x6808, 0xa08e, 0x0000, + 0x0040, 0x4d81, 0xa08e, 0x0200, 0x0040, 0x4d7f, 0xa08e, 0x0100, + 0x00c0, 0x4d81, 0x127e, 0x2091, 0x8000, 0x0068, 0x4d7c, 0x2069, + 0x0000, 0x6818, 0xd084, 0x00c0, 0x4d7c, 0x702c, 0x7130, 0x8108, + 0xa102, 0x0048, 0x4d4a, 0xa00e, 0x7034, 0x706e, 0x7038, 0x7072, + 0x0078, 0x4d54, 0x706c, 0xa080, 0x0040, 0x706e, 0x00c8, 0x4d54, + 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, 0x6936, 0x700b, 0x0000, + 0x2001, 0xa95a, 0x2004, 0xa005, 0x00c0, 0x4d73, 0x6934, 0x2069, + 0xa935, 0x689c, 0x699e, 0x2069, 0xa9c4, 0xa102, 0x00c0, 0x4d6c, + 0x6844, 0xa005, 0x00d0, 0x4d7a, 0x2001, 0xa95b, 0x200c, 0x810d, + 0x6946, 0x0078, 0x4d7a, 0x2009, 0x8040, 0x6922, 0x681b, 0x0001, + 0x2091, 0x4080, 0x7007, 0x0001, 0x127f, 0x0078, 0x4d81, 0x7007, + 0x0005, 0x007c, 0x701c, 0xa06d, 0x0040, 0x4d93, 0x1078, 0x4e60, + 0x0040, 0x4d93, 0x7007, 0x0003, 0x1078, 0x4e80, 0x7050, 0xa086, + 0x0100, 0x0040, 0x4d95, 0x007c, 0x007c, 0x7050, 0xa09e, 0x0100, + 0x00c0, 0x4d9e, 0x7007, 0x0004, 0x0078, 0x4dbc, 0xa086, 0x0200, + 0x00c0, 0x4da4, 0x7007, 0x0005, 0x007c, 0x2001, 0xa97f, 0x2004, + 0xa08e, 0x0100, 0x00c0, 0x4db1, 0x7007, 0x0001, 0x1078, 0x4e4c, + 0x007c, 0xa08e, 0x0000, 0x0040, 0x4db0, 0xa08e, 0x0200, 0x00c0, + 0x4db0, 0x7007, 0x0005, 0x007c, 0x1078, 0x4e16, 0x7006, 0x1078, + 0x4e4c, 0x007c, 0x007c, 0x0e7e, 0x157e, 0x2071, 0xa935, 0x7184, + 0x81ff, 0x0040, 0x4deb, 0xa006, 0x7086, 0xae80, 0x0003, 0x2071, + 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, 0x0070, 0x4de8, 0x2014, + 0x722a, 0x8000, 0x0070, 0x4de8, 0x2014, 0x722e, 0x8000, 0x0070, + 0x4de8, 0x2014, 0x723a, 0x8000, 0x0070, 0x4de8, 0x2014, 0x723e, + 0xa180, 0x8030, 0x7022, 0x157f, 0x0e7f, 0x007c, 0x0e7e, 0x157e, + 0x2071, 0xa935, 0x7184, 0x81ff, 0x0040, 0x4e13, 0xa006, 0x7086, + 0xae80, 0x0003, 0x2071, 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, + 0x2014, 0x722a, 0x8000, 0x0070, 0x4e0c, 0x2014, 0x723a, 0x8000, + 0x2014, 0x723e, 0x0078, 0x4e10, 0x2001, 0x8020, 0x0078, 0x4e12, + 0x2001, 0x8042, 0x7022, 0x157f, 0x0e7f, 0x007c, 0x702c, 0x7130, + 0x8108, 0xa102, 0x0048, 0x4e23, 0xa00e, 0x7034, 0x706e, 0x7038, + 0x7072, 0x0078, 0x4e2d, 0x706c, 0xa080, 0x0040, 0x706e, 0x00c8, + 0x4e2d, 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, 0x700c, 0x8001, + 0x700e, 0x00c0, 0x4e43, 0x127e, 0x2091, 0x8000, 0x0068, 0x4e46, + 0x2001, 0x000d, 0x2102, 0x2091, 0x4080, 0x2001, 0x0001, 0x700b, + 0x0000, 0x127f, 0x007c, 0x2001, 0x0007, 0x007c, 0x2001, 0x0006, + 0x700b, 0x0001, 0x127f, 0x007c, 0x701c, 0xa06d, 0x0040, 0x4e5f, + 0x127e, 0x2091, 0x8000, 0x7010, 0x8001, 0x7012, 0x2d04, 0x701e, + 0xa005, 0x00c0, 0x4e5c, 0x701a, 0x127f, 0x1078, 0x13a4, 0x007c, + 0x2019, 0x000d, 0x2304, 0x230c, 0xa10e, 0x0040, 0x4e6f, 0x2304, + 0x230c, 0xa10e, 0x0040, 0x4e6f, 0xa006, 0x0078, 0x4e7f, 0x732c, + 0x8319, 0x7130, 0xa102, 0x00c0, 0x4e79, 0x2300, 0xa005, 0x0078, + 0x4e7f, 0x0048, 0x4e7e, 0xa302, 0x0078, 0x4e7f, 0x8002, 0x007c, + 0x2d00, 0x7026, 0xa080, 0x000d, 0x7056, 0x7053, 0x0000, 0x127e, + 0x2091, 0x8000, 0x2009, 0xa9d6, 0x2104, 0xc08d, 0x200a, 0x127f, + 0x1078, 0x13f9, 0x007c, 0x2071, 0xa7e2, 0x7003, 0x0000, 0x7007, + 0x0000, 0x700f, 0x0000, 0x702b, 0x0001, 0x704f, 0x0000, 0x7053, + 0x0001, 0x705f, 0x0020, 0x7063, 0x0040, 0x7083, 0x0000, 0x708b, + 0x0000, 0x708f, 0x0001, 0x70bf, 0x0000, 0x007c, 0x0e7e, 0x2071, + 0xa7e2, 0x6848, 0xa005, 0x00c0, 0x4ebc, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0078, 0x4ee1, 0x6a50, 0x7236, 0x6b54, 0x733a, + 0x6858, 0x703e, 0x707a, 0x685c, 0x7042, 0x707e, 0x6848, 0x702e, + 0x6840, 0x7032, 0x2009, 0x000c, 0x200a, 0x8007, 0x8006, 0x8006, + 0xa08c, 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, 0xa319, 0x7272, + 0x7376, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700f, 0x0000, + 0xa006, 0x0e7f, 0x007c, 0x2b78, 0x2071, 0xa7e2, 0x7004, 0x1079, + 0x4f41, 0x700c, 0x0079, 0x4eec, 0x4ef1, 0x4ee6, 0x4ee6, 0x4ee6, + 0x4ee6, 0x007c, 0x700c, 0x0079, 0x4ef5, 0x4efa, 0x4f3f, 0x4f3f, + 0x4f40, 0x4f40, 0x7830, 0x7930, 0xa106, 0x0040, 0x4f04, 0x7830, + 0x7930, 0xa106, 0x00c0, 0x4f2a, 0x7030, 0xa10a, 0x0040, 0x4f2a, + 0x00c8, 0x4f0c, 0x712c, 0xa10a, 0xa18a, 0x0002, 0x00c8, 0x4f2b, + 0x1078, 0x1370, 0x0040, 0x4f2a, 0x2d00, 0x705a, 0x7063, 0x0040, + 0x2001, 0x0003, 0x7057, 0x0000, 0x127e, 0x007e, 0x2091, 0x8000, + 0x2009, 0xa9d6, 0x2104, 0xc085, 0x200a, 0x007f, 0x700e, 0x127f, + 0x1078, 0x13f9, 0x007c, 0x1078, 0x1370, 0x0040, 0x4f2a, 0x2d00, + 0x705a, 0x1078, 0x1370, 0x00c0, 0x4f37, 0x0078, 0x4f16, 0x2d00, + 0x7086, 0x7063, 0x0080, 0x2001, 0x0004, 0x0078, 0x4f1a, 0x007c, + 0x007c, 0x4f52, 0x4f53, 0x4f8a, 0x4f8b, 0x4f3f, 0x4fc1, 0x4fc6, + 0x4ffd, 0x4ffe, 0x5019, 0x501a, 0x501b, 0x501c, 0x501d, 0x501e, + 0x509e, 0x50c8, 0x007c, 0x700c, 0x0079, 0x4f56, 0x4f5b, 0x4f5e, + 0x4f6e, 0x4f89, 0x4f89, 0x1078, 0x4ef2, 0x007c, 0x127e, 0x8001, + 0x700e, 0x7058, 0x007e, 0x1078, 0x5464, 0x0040, 0x4f6b, 0x2091, + 0x8000, 0x1078, 0x4ef2, 0x0d7f, 0x0078, 0x4f77, 0x127e, 0x8001, + 0x700e, 0x1078, 0x5464, 0x7058, 0x2068, 0x7084, 0x705a, 0x6803, + 0x0000, 0x6807, 0x0000, 0x6834, 0xa084, 0x00ff, 0xa08a, 0x0020, + 0x00c8, 0x4f86, 0x1079, 0x4fa1, 0x127f, 0x007c, 0x127f, 0x1078, + 0x501f, 0x007c, 0x007c, 0x007c, 0x0e7e, 0x2071, 0xa7e2, 0x700c, + 0x0079, 0x4f92, 0x4f97, 0x4f97, 0x4f97, 0x4f99, 0x4f9d, 0x0e7f, + 0x007c, 0x700f, 0x0001, 0x0078, 0x4f9f, 0x700f, 0x0002, 0x0e7f, + 0x007c, 0x501f, 0x501f, 0x503b, 0x501f, 0x5171, 0x501f, 0x501f, + 0x501f, 0x501f, 0x501f, 0x503b, 0x51bb, 0x5208, 0x5261, 0x5277, + 0x501f, 0x501f, 0x5057, 0x503b, 0x501f, 0x501f, 0x5078, 0x5338, + 0x5356, 0x501f, 0x5057, 0x501f, 0x501f, 0x501f, 0x501f, 0x506d, + 0x5356, 0x7020, 0x2068, 0x1078, 0x13a4, 0x007c, 0x700c, 0x0079, + 0x4fc9, 0x4fce, 0x4fd1, 0x4fe1, 0x4ffc, 0x4ffc, 0x1078, 0x4ef2, + 0x007c, 0x127e, 0x8001, 0x700e, 0x7058, 0x007e, 0x1078, 0x5464, + 0x0040, 0x4fde, 0x2091, 0x8000, 0x1078, 0x4ef2, 0x0d7f, 0x0078, + 0x4fea, 0x127e, 0x8001, 0x700e, 0x1078, 0x5464, 0x7058, 0x2068, + 0x7084, 0x705a, 0x6803, 0x0000, 0x6807, 0x0000, 0x6834, 0xa084, + 0x00ff, 0xa08a, 0x001a, 0x00c8, 0x4ff9, 0x1079, 0x4fff, 0x127f, + 0x007c, 0x127f, 0x1078, 0x501f, 0x007c, 0x007c, 0x007c, 0x501f, + 0x503b, 0x515b, 0x501f, 0x503b, 0x501f, 0x503b, 0x503b, 0x501f, + 0x503b, 0x515b, 0x503b, 0x503b, 0x503b, 0x503b, 0x503b, 0x501f, + 0x503b, 0x515b, 0x501f, 0x501f, 0x503b, 0x501f, 0x501f, 0x501f, + 0x503b, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x7007, + 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0d5, 0x683a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x4a73, 0x127f, 0x007c, 0x7007, 0x0001, 0x6838, + 0xa084, 0x00ff, 0xc0e5, 0x683a, 0x127e, 0x2091, 0x8000, 0x1078, + 0x4a73, 0x127f, 0x007c, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, + 0xc0ed, 0x683a, 0x127e, 0x2091, 0x8000, 0x1078, 0x4a73, 0x127f, + 0x007c, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0dd, 0x683a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x4a73, 0x127f, 0x007c, 0x6834, + 0x8007, 0xa084, 0x00ff, 0x0040, 0x502d, 0x8001, 0x00c0, 0x5064, + 0x7007, 0x0001, 0x0078, 0x513a, 0x7007, 0x0006, 0x7012, 0x2d00, + 0x7016, 0x701a, 0x704b, 0x513a, 0x007c, 0x684c, 0xa084, 0x00c0, + 0xa086, 0x00c0, 0x00c0, 0x5078, 0x7007, 0x0001, 0x0078, 0x5373, + 0x2d00, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa080, 0x0024, 0x2098, + 0x20a1, 0xa80d, 0x53a3, 0x6858, 0x7012, 0xa082, 0x0401, 0x00c8, + 0x5049, 0x6884, 0xa08a, 0x0002, 0x00c8, 0x5049, 0x82ff, 0x00c0, + 0x509a, 0x6888, 0x698c, 0xa105, 0x0040, 0x509a, 0x2001, 0x510a, + 0x0078, 0x509d, 0xa280, 0x5100, 0x2004, 0x70c6, 0x7010, 0xa015, + 0x0040, 0x50e8, 0x1078, 0x1370, 0x00c0, 0x50a9, 0x7007, 0x000f, + 0x007c, 0x2d00, 0x7022, 0x70c4, 0x2060, 0x6000, 0x6836, 0x6004, + 0xad00, 0x7096, 0x6008, 0xa20a, 0x00c8, 0x50b8, 0xa00e, 0x2200, + 0x7112, 0x620c, 0x8003, 0x800b, 0xa296, 0x0004, 0x0040, 0x50c1, + 0xa108, 0x719a, 0x810b, 0x719e, 0xae90, 0x0022, 0x1078, 0x13db, + 0x7090, 0xa08e, 0x0100, 0x0040, 0x50dc, 0xa086, 0x0200, 0x0040, + 0x50d4, 0x7007, 0x0010, 0x007c, 0x7020, 0x2068, 0x1078, 0x13a4, + 0x7014, 0x2068, 0x0078, 0x5049, 0x7020, 0x2068, 0x7018, 0x6802, + 0x6807, 0x0000, 0x2d08, 0x2068, 0x6906, 0x711a, 0x0078, 0x509e, + 0x7014, 0x2068, 0x7007, 0x0001, 0x6884, 0xa005, 0x00c0, 0x50f7, + 0x6888, 0x698c, 0xa105, 0x0040, 0x50f7, 0x1078, 0x510e, 0x6834, + 0xa084, 0x00ff, 0xa086, 0x001e, 0x0040, 0x5373, 0x0078, 0x513a, + 0x5102, 0x5106, 0x0002, 0x0011, 0x0007, 0x0004, 0x000a, 0x000f, + 0x0005, 0x0006, 0x000a, 0x0011, 0x0005, 0x0004, 0x0f7e, 0x0e7e, + 0x0c7e, 0x077e, 0x067e, 0x6f88, 0x6e8c, 0x6804, 0x2060, 0xacf0, + 0x0021, 0xacf8, 0x0027, 0x2009, 0x0005, 0x700c, 0x7816, 0x7008, + 0x7812, 0x7004, 0x7806, 0x7000, 0x7802, 0x7e0e, 0x7f0a, 0x8109, + 0x0040, 0x5130, 0xaef2, 0x0004, 0xaffa, 0x0006, 0x0078, 0x511d, + 0x6004, 0xa065, 0x00c0, 0x5117, 0x067f, 0x077f, 0x0c7f, 0x0e7f, + 0x0f7f, 0x007c, 0x2009, 0xa72f, 0x210c, 0x81ff, 0x00c0, 0x5155, + 0x6838, 0xa084, 0x00ff, 0x683a, 0x1078, 0x4353, 0x00c0, 0x5149, + 0x007c, 0x1078, 0x4b51, 0x127e, 0x2091, 0x8000, 0x1078, 0x8f8d, + 0x1078, 0x4a73, 0x127f, 0x0078, 0x5148, 0x2001, 0x0028, 0x2009, + 0x0000, 0x0078, 0x5149, 0x7018, 0x6802, 0x2d08, 0x2068, 0x6906, + 0x711a, 0x7010, 0x8001, 0x7012, 0x0040, 0x516a, 0x7007, 0x0006, + 0x0078, 0x5170, 0x7014, 0x2068, 0x7007, 0x0001, 0x7048, 0x107a, + 0x007c, 0x7007, 0x0001, 0x6944, 0x810f, 0xa18c, 0x00ff, 0x6848, + 0xa084, 0x00ff, 0x20a9, 0x0001, 0xa096, 0x0001, 0x0040, 0x519a, + 0x2009, 0x0000, 0x20a9, 0x00ff, 0xa096, 0x0002, 0x0040, 0x519a, + 0xa005, 0x00c0, 0x51ad, 0x6944, 0x810f, 0xa18c, 0x00ff, 0x1078, + 0x45c4, 0x00c0, 0x51ad, 0x067e, 0x6e50, 0x1078, 0x46b3, 0x067f, + 0x0078, 0x51ad, 0x047e, 0x2011, 0xa70c, 0x2224, 0xc484, 0xc48c, + 0x2412, 0x047f, 0x0c7e, 0x1078, 0x45c4, 0x00c0, 0x51a9, 0x1078, + 0x4852, 0x8108, 0x00f0, 0x51a3, 0x0c7f, 0x684c, 0xd084, 0x00c0, + 0x51b4, 0x1078, 0x13a4, 0x007c, 0x127e, 0x2091, 0x8000, 0x1078, + 0x4a73, 0x127f, 0x007c, 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, + 0x2001, 0xa753, 0x2004, 0xd0a4, 0x0040, 0x51ff, 0x2061, 0xaa33, + 0x6100, 0xd184, 0x0040, 0x51df, 0x6858, 0xa084, 0x00ff, 0x00c0, + 0x5202, 0x6000, 0xd084, 0x0040, 0x51ff, 0x6004, 0xa005, 0x00c0, + 0x5205, 0x6003, 0x0000, 0x600b, 0x0000, 0x0078, 0x51fc, 0x2011, + 0x0001, 0x6860, 0xa005, 0x00c0, 0x51e7, 0x2001, 0x001e, 0x8000, + 0x6016, 0x6858, 0xa084, 0x00ff, 0x0040, 0x51ff, 0x6006, 0x6858, + 0x8007, 0xa084, 0x00ff, 0x0040, 0x51ff, 0x600a, 0x6858, 0x8000, + 0x00c0, 0x51fb, 0xc28d, 0x6202, 0x127f, 0x0078, 0x5453, 0x127f, + 0x0078, 0x544b, 0x127f, 0x0078, 0x5443, 0x127f, 0x0078, 0x5447, + 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, 0x2001, 0xa753, 0x2004, + 0xd0a4, 0x0040, 0x525e, 0x2061, 0xaa33, 0x6000, 0xd084, 0x0040, + 0x525e, 0x6204, 0x6308, 0xd08c, 0x00c0, 0x5250, 0x6c48, 0xa484, + 0x0003, 0x0040, 0x5236, 0x6958, 0xa18c, 0x00ff, 0x8001, 0x00c0, + 0x522f, 0x2100, 0xa210, 0x0048, 0x525b, 0x0078, 0x5236, 0x8001, + 0x00c0, 0x525b, 0x2100, 0xa212, 0x0048, 0x525b, 0xa484, 0x000c, + 0x0040, 0x5250, 0x6958, 0x810f, 0xa18c, 0x00ff, 0xa082, 0x0004, + 0x00c0, 0x5248, 0x2100, 0xa318, 0x0048, 0x525b, 0x0078, 0x5250, + 0xa082, 0x0004, 0x00c0, 0x525b, 0x2100, 0xa31a, 0x0048, 0x525b, + 0x6860, 0xa005, 0x0040, 0x5256, 0x8000, 0x6016, 0x6206, 0x630a, + 0x127f, 0x0078, 0x5453, 0x127f, 0x0078, 0x544f, 0x127f, 0x0078, + 0x544b, 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0xaa33, + 0x6300, 0xd38c, 0x00c0, 0x5271, 0x6308, 0x8318, 0x0048, 0x5274, + 0x630a, 0x127f, 0x0078, 0x5461, 0x127f, 0x0078, 0x544f, 0x127e, + 0x0c7e, 0x2091, 0x8000, 0x7007, 0x0001, 0x684c, 0xd0ac, 0x0040, + 0x528b, 0x0c7e, 0x2061, 0xaa33, 0x6000, 0xa084, 0xfcff, 0x6002, + 0x0c7f, 0x0078, 0x52ba, 0x6858, 0xa005, 0x0040, 0x52d1, 0x685c, + 0xa065, 0x0040, 0x52cd, 0x2001, 0xa72f, 0x2004, 0xa005, 0x0040, + 0x529d, 0x1078, 0x8ed6, 0x0078, 0x52ab, 0x6013, 0x0400, 0x6037, + 0x0000, 0x694c, 0xd1a4, 0x0040, 0x52a7, 0x6950, 0x6136, 0x2009, + 0x0041, 0x1078, 0x775c, 0x6958, 0xa18c, 0xff00, 0xa186, 0x2000, + 0x00c0, 0x52ba, 0x027e, 0x2009, 0x0000, 0x2011, 0xfdff, 0x1078, + 0x5bf1, 0x027f, 0x684c, 0xd0c4, 0x0040, 0x52c9, 0x2061, 0xaa33, + 0x6000, 0xd08c, 0x00c0, 0x52c9, 0x6008, 0x8000, 0x0048, 0x52cd, + 0x600a, 0x0c7f, 0x127f, 0x0078, 0x5453, 0x0c7f, 0x127f, 0x0078, + 0x544b, 0x6954, 0xa186, 0x0045, 0x0040, 0x5306, 0xa186, 0x002a, + 0x00c0, 0x52e1, 0x2001, 0xa70c, 0x200c, 0xc194, 0x2102, 0x0078, + 0x52ba, 0xa186, 0x0020, 0x0040, 0x52fa, 0xa186, 0x0029, 0x0040, + 0x52ed, 0xa186, 0x002d, 0x00c0, 0x52cd, 0x6944, 0xa18c, 0xff00, + 0x810f, 0x1078, 0x45c4, 0x00c0, 0x52ba, 0x6000, 0xc0e4, 0x6002, + 0x0078, 0x52ba, 0x685c, 0xa065, 0x0040, 0x52cd, 0x6007, 0x0024, + 0x2001, 0xa9a3, 0x2004, 0x6016, 0x0078, 0x52ba, 0x685c, 0xa065, + 0x0040, 0x52cd, 0x0e7e, 0x6860, 0xa075, 0x2001, 0xa72f, 0x2004, + 0xa005, 0x0040, 0x531e, 0x1078, 0x8ed6, 0x8eff, 0x0040, 0x531b, + 0x2e60, 0x1078, 0x8ed6, 0x0e7f, 0x0078, 0x52ba, 0x6024, 0xc0dc, + 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0x6870, 0xa005, 0x0040, + 0x532f, 0x6007, 0x003b, 0x6874, 0x602a, 0x6878, 0x6012, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0e7f, 0x0078, 0x52ba, + 0x2061, 0xaa33, 0x6000, 0xd084, 0x0040, 0x5352, 0xd08c, 0x00c0, + 0x5461, 0x2091, 0x8000, 0x6204, 0x8210, 0x0048, 0x534c, 0x6206, + 0x2091, 0x8001, 0x0078, 0x5461, 0x2091, 0x8001, 0x6853, 0x0016, + 0x0078, 0x545a, 0x6853, 0x0007, 0x0078, 0x545a, 0x6834, 0x8007, + 0xa084, 0x00ff, 0x00c0, 0x5360, 0x1078, 0x502d, 0x0078, 0x5372, + 0x2030, 0x8001, 0x00c0, 0x536a, 0x7007, 0x0001, 0x1078, 0x5373, + 0x0078, 0x5372, 0x7007, 0x0006, 0x7012, 0x2d00, 0x7016, 0x701a, + 0x704b, 0x5373, 0x007c, 0x0e7e, 0x127e, 0x2091, 0x8000, 0xa03e, + 0x2009, 0xa72f, 0x210c, 0x81ff, 0x00c0, 0x53ff, 0x2009, 0xa70c, + 0x210c, 0xd194, 0x00c0, 0x5431, 0x6848, 0x2070, 0xae82, 0xae00, + 0x0048, 0x53ef, 0x2001, 0xa716, 0x2004, 0xae02, 0x00c8, 0x53ef, + 0x2061, 0xaa33, 0x6100, 0xa184, 0x0301, 0xa086, 0x0001, 0x00c0, + 0x53d2, 0x711c, 0xa186, 0x0006, 0x00c0, 0x53da, 0x7018, 0xa005, + 0x0040, 0x53ff, 0x2004, 0xd0e4, 0x00c0, 0x542b, 0x7024, 0xd0dc, + 0x00c0, 0x5435, 0x6853, 0x0000, 0x6803, 0x0000, 0x2d08, 0x7010, + 0xa005, 0x00c0, 0x53be, 0x7112, 0x684c, 0xd0f4, 0x00c0, 0x5439, + 0x2e60, 0x1078, 0x5b27, 0x127f, 0x0e7f, 0x007c, 0x2068, 0x6800, + 0xa005, 0x00c0, 0x53be, 0x6902, 0x2168, 0x684c, 0xd0f4, 0x00c0, + 0x5439, 0x127f, 0x0e7f, 0x007c, 0x127f, 0x0e7f, 0x6853, 0x0006, + 0x0078, 0x545a, 0xd184, 0x0040, 0x53cc, 0xd1c4, 0x00c0, 0x53f3, + 0x0078, 0x53f7, 0x6944, 0xa18c, 0xff00, 0x810f, 0x1078, 0x45c4, + 0x00c0, 0x542b, 0x6000, 0xd0e4, 0x00c0, 0x542b, 0x711c, 0xa186, + 0x0007, 0x00c0, 0x53ef, 0x6853, 0x0002, 0x0078, 0x542d, 0x6853, + 0x0008, 0x0078, 0x542d, 0x6853, 0x000e, 0x0078, 0x542d, 0x6853, + 0x0017, 0x0078, 0x542d, 0x6853, 0x0035, 0x0078, 0x542d, 0x2001, + 0xa772, 0x2004, 0xd0fc, 0x0040, 0x5427, 0x6848, 0x2070, 0xae82, + 0xae00, 0x0048, 0x5427, 0x6058, 0xae02, 0x00c8, 0x5427, 0x711c, + 0xa186, 0x0006, 0x00c0, 0x5427, 0x7018, 0xa005, 0x0040, 0x5427, + 0x2004, 0xd0bc, 0x0040, 0x5427, 0x2039, 0x0001, 0x7000, 0xa086, + 0x0007, 0x00c0, 0x537e, 0x7003, 0x0002, 0x0078, 0x537e, 0x6853, + 0x0028, 0x0078, 0x542d, 0x6853, 0x0029, 0x127f, 0x0e7f, 0x0078, + 0x545a, 0x6853, 0x002a, 0x0078, 0x542d, 0x6853, 0x0045, 0x0078, + 0x542d, 0x2e60, 0x2019, 0x0002, 0x6017, 0x0014, 0x1078, 0x9dd7, + 0x127f, 0x0e7f, 0x007c, 0x2009, 0x003e, 0x0078, 0x5455, 0x2009, + 0x0004, 0x0078, 0x5455, 0x2009, 0x0006, 0x0078, 0x5455, 0x2009, + 0x0016, 0x0078, 0x5455, 0x2009, 0x0001, 0x6854, 0xa084, 0xff00, + 0xa105, 0x6856, 0x2091, 0x8000, 0x1078, 0x4a73, 0x2091, 0x8001, + 0x007c, 0x1078, 0x13a4, 0x007c, 0x702c, 0x7130, 0x8108, 0xa102, + 0x0048, 0x5471, 0xa00e, 0x7034, 0x7072, 0x7038, 0x7076, 0x0078, + 0x547d, 0x7070, 0xa080, 0x0040, 0x7072, 0x00c8, 0x547d, 0x7074, + 0xa081, 0x0000, 0x7076, 0xa085, 0x0001, 0x7932, 0x7132, 0x007c, + 0x0d7e, 0x1078, 0x5b1e, 0x0d7f, 0x007c, 0x0d7e, 0x2011, 0x0004, + 0x2204, 0xa085, 0x8002, 0x2012, 0x0d7f, 0x007c, 0x20e1, 0x0002, + 0x3d08, 0x20e1, 0x2000, 0x3d00, 0xa084, 0x7000, 0x0040, 0x549c, + 0xa086, 0x1000, 0x00c0, 0x54d3, 0x20e1, 0x0000, 0x3d00, 0xa094, + 0xff00, 0x8217, 0xa084, 0xf000, 0xa086, 0x3000, 0x00c0, 0x54b7, + 0xa184, 0xff00, 0x8007, 0xa086, 0x0008, 0x00c0, 0x54d3, 0x1078, + 0x29bb, 0x00c0, 0x54d3, 0x1078, 0x56b2, 0x0078, 0x54ce, 0x20e1, + 0x0004, 0x3d60, 0xd1bc, 0x00c0, 0x54be, 0x3e60, 0xac84, 0x000f, + 0x00c0, 0x54d3, 0xac82, 0xae00, 0x0048, 0x54d3, 0x6858, 0xac02, + 0x00c8, 0x54d3, 0x2009, 0x0047, 0x1078, 0x775c, 0x7a1c, 0xd284, + 0x00c0, 0x548e, 0x007c, 0xa016, 0x1078, 0x15fa, 0x0078, 0x54ce, + 0x0078, 0x54d3, 0x781c, 0xd08c, 0x0040, 0x5502, 0x157e, 0x137e, + 0x147e, 0x20e1, 0x3000, 0x3d20, 0x3e28, 0xa584, 0x0076, 0x00c0, + 0x5518, 0xa484, 0x7000, 0xa086, 0x1000, 0x00c0, 0x5507, 0x1078, + 0x554e, 0x0040, 0x5518, 0x20e1, 0x3000, 0x7828, 0x7828, 0x1078, + 0x556c, 0x147f, 0x137f, 0x157f, 0x2009, 0xa9b9, 0x2104, 0xa005, + 0x00c0, 0x5503, 0x007c, 0x1078, 0x62d1, 0x0078, 0x5502, 0xa484, + 0x7000, 0x00c0, 0x5518, 0x1078, 0x554e, 0x0040, 0x552c, 0x7000, + 0xa084, 0xff00, 0xa086, 0x8100, 0x0040, 0x54f3, 0x0078, 0x552c, + 0x1078, 0xa55f, 0xd5a4, 0x0040, 0x5528, 0x047e, 0x1078, 0x1b22, + 0x047f, 0x20e1, 0x9010, 0x2001, 0x0138, 0x2202, 0x0078, 0x5530, + 0x1078, 0x554e, 0x6883, 0x0000, 0x20e1, 0x3000, 0x7828, 0x7828, + 0x1078, 0x5537, 0x147f, 0x137f, 0x157f, 0x0078, 0x5502, 0x2001, + 0xa70e, 0x2004, 0xd08c, 0x0040, 0x554d, 0x2001, 0xa700, 0x2004, + 0xa086, 0x0003, 0x00c0, 0x554d, 0x027e, 0x037e, 0x2011, 0x8048, + 0x2518, 0x1078, 0x361b, 0x037f, 0x027f, 0x007c, 0xa484, 0x01ff, + 0x6882, 0xa005, 0x0040, 0x5560, 0xa080, 0x001f, 0xa084, 0x03f8, + 0x80ac, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, 0x007c, + 0x20a9, 0x000c, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, + 0xa085, 0x0001, 0x0078, 0x555f, 0x7000, 0xa084, 0xff00, 0xa08c, + 0xf000, 0x8007, 0xa196, 0x0000, 0x00c0, 0x5579, 0x0078, 0x57ba, + 0x007c, 0xa196, 0x2000, 0x00c0, 0x558a, 0x6900, 0xa18e, 0x0001, + 0x00c0, 0x5586, 0x1078, 0x3aec, 0x0078, 0x5578, 0x1078, 0x5592, + 0x0078, 0x5578, 0xa196, 0x8000, 0x00c0, 0x5578, 0x1078, 0x5871, + 0x0078, 0x5578, 0x0c7e, 0x7110, 0xa18c, 0xff00, 0x810f, 0xa196, + 0x0001, 0x0040, 0x559f, 0xa196, 0x0023, 0x00c0, 0x56aa, 0xa08e, + 0x0023, 0x00c0, 0x55d4, 0x1078, 0x591d, 0x0040, 0x56aa, 0x7124, + 0x610a, 0x7030, 0xa08e, 0x0200, 0x00c0, 0x55b8, 0x7034, 0xa005, + 0x00c0, 0x56aa, 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x56aa, + 0xa08e, 0x0214, 0x0040, 0x55c0, 0xa08e, 0x0210, 0x00c0, 0x55c6, + 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x56aa, 0xa08e, 0x0100, + 0x00c0, 0x56aa, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x0016, + 0x1078, 0x775c, 0x0078, 0x56aa, 0xa08e, 0x0022, 0x00c0, 0x56aa, + 0x7030, 0xa08e, 0x0300, 0x00c0, 0x55e5, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x0017, 0x0078, 0x5676, 0xa08e, 0x0500, 0x00c0, + 0x55f1, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x0018, 0x0078, + 0x5676, 0xa08e, 0x2010, 0x00c0, 0x55f9, 0x2009, 0x0019, 0x0078, + 0x5676, 0xa08e, 0x2110, 0x00c0, 0x5601, 0x2009, 0x001a, 0x0078, + 0x5676, 0xa08e, 0x5200, 0x00c0, 0x560d, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x001b, 0x0078, 0x5676, 0xa08e, 0x5000, 0x00c0, + 0x5619, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x001c, 0x0078, + 0x5676, 0xa08e, 0x1300, 0x00c0, 0x5621, 0x2009, 0x0034, 0x0078, + 0x5676, 0xa08e, 0x1200, 0x00c0, 0x562d, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x0024, 0x0078, 0x5676, 0xa08c, 0xff00, 0xa18e, + 0x2400, 0x00c0, 0x5637, 0x2009, 0x002d, 0x0078, 0x5676, 0xa08c, + 0xff00, 0xa18e, 0x5300, 0x00c0, 0x5641, 0x2009, 0x002a, 0x0078, + 0x5676, 0xa08e, 0x0f00, 0x00c0, 0x5649, 0x2009, 0x0020, 0x0078, + 0x5676, 0xa08e, 0x5300, 0x00c0, 0x564f, 0x0078, 0x566c, 0xa08e, + 0x6104, 0x00c0, 0x566c, 0x2011, 0xac8d, 0x8208, 0x2204, 0xa082, + 0x0004, 0x20a8, 0x95ac, 0x95ac, 0x2011, 0x8015, 0x211c, 0x8108, + 0x047e, 0x2124, 0x1078, 0x361b, 0x047f, 0x8108, 0x00f0, 0x565c, + 0x2009, 0x0023, 0x0078, 0x5676, 0xa08e, 0x6000, 0x00c0, 0x5674, + 0x2009, 0x003f, 0x0078, 0x5676, 0x2009, 0x001d, 0x017e, 0x2011, + 0xac83, 0x2204, 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x56ac, + 0x1078, 0x455c, 0x00c0, 0x56ac, 0x6612, 0x6516, 0x86ff, 0x0040, + 0x569c, 0x017f, 0x017e, 0xa186, 0x0017, 0x00c0, 0x569c, 0x686c, + 0xa606, 0x00c0, 0x569c, 0x6870, 0xa506, 0xa084, 0xff00, 0x00c0, + 0x569c, 0x6000, 0xc0f5, 0x6002, 0x0c7e, 0x1078, 0x76c7, 0x0040, + 0x56af, 0x017f, 0x611a, 0x601f, 0x0004, 0x7120, 0x610a, 0x017f, + 0x1078, 0x775c, 0x0c7f, 0x007c, 0x017f, 0x0078, 0x56aa, 0x0c7f, + 0x0078, 0x56ac, 0x0c7e, 0x1078, 0x570f, 0x00c0, 0x570d, 0xa28e, + 0x0033, 0x00c0, 0x56de, 0x1078, 0x591d, 0x0040, 0x570d, 0x7124, + 0x610a, 0x7030, 0xa08e, 0x0200, 0x00c0, 0x56d0, 0x7034, 0xa005, + 0x00c0, 0x570d, 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x570d, + 0xa08e, 0x0100, 0x00c0, 0x570d, 0x7034, 0xa005, 0x00c0, 0x570d, + 0x2009, 0x0016, 0x1078, 0x775c, 0x0078, 0x570d, 0xa28e, 0x0032, + 0x00c0, 0x570d, 0x7030, 0xa08e, 0x1400, 0x00c0, 0x570d, 0x2009, + 0x0038, 0x017e, 0x2011, 0xac83, 0x2204, 0x8211, 0x220c, 0x1078, + 0x254d, 0x00c0, 0x570c, 0x1078, 0x455c, 0x00c0, 0x570c, 0x6612, + 0x6516, 0x0c7e, 0x1078, 0x76c7, 0x0040, 0x570b, 0x017f, 0x611a, + 0x601f, 0x0004, 0x7120, 0x610a, 0x017f, 0x1078, 0x775c, 0x1078, + 0x62d1, 0x0078, 0x570d, 0x0c7f, 0x017f, 0x0c7f, 0x007c, 0x0f7e, + 0x0d7e, 0x027e, 0x017e, 0x137e, 0x147e, 0x157e, 0x3c00, 0x007e, + 0x2079, 0x0030, 0x2069, 0x0200, 0x1078, 0x1c6a, 0x00c0, 0x5750, + 0x1078, 0x1b40, 0x0040, 0x575d, 0x7908, 0xa18c, 0x1fff, 0xa182, + 0x0011, 0x00c8, 0x575a, 0x20a9, 0x000c, 0x20e1, 0x0000, 0x2ea0, + 0x2099, 0x020a, 0x53a5, 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, + 0x7a0c, 0x7808, 0xa080, 0x0007, 0xa084, 0x1ff8, 0xa08a, 0x0140, + 0x10c8, 0x1332, 0x80ac, 0x20e1, 0x6000, 0x2099, 0x020a, 0x53a5, + 0x20e1, 0x7000, 0x6828, 0x6828, 0x7803, 0x0004, 0xa294, 0x0070, + 0x007f, 0x20e0, 0x157f, 0x147f, 0x137f, 0x017f, 0x027f, 0x0d7f, + 0x0f7f, 0x007c, 0xa016, 0x1078, 0x15fa, 0xa085, 0x0001, 0x0078, + 0x5750, 0x047e, 0x0e7e, 0x0d7e, 0x2028, 0x2130, 0xa696, 0x00ff, + 0x00c0, 0x5782, 0xa596, 0xfffd, 0x00c0, 0x5772, 0x2009, 0x007f, + 0x0078, 0x57b5, 0xa596, 0xfffe, 0x00c0, 0x577a, 0x2009, 0x007e, + 0x0078, 0x57b5, 0xa596, 0xfffc, 0x00c0, 0x5782, 0x2009, 0x0080, + 0x0078, 0x57b5, 0x2011, 0x0000, 0x2021, 0x0081, 0x20a9, 0x007e, + 0x2071, 0xa8b6, 0x2e1c, 0x83ff, 0x00c0, 0x5794, 0x82ff, 0x00c0, + 0x57a9, 0x2410, 0x0078, 0x57a9, 0x2368, 0x6f10, 0x007e, 0x2100, + 0xa706, 0x007f, 0x6b14, 0x00c0, 0x57a3, 0xa346, 0x00c0, 0x57a3, + 0x2408, 0x0078, 0x57b5, 0x87ff, 0x00c0, 0x57a9, 0x83ff, 0x0040, + 0x578e, 0x8420, 0x8e70, 0x00f0, 0x578a, 0x82ff, 0x00c0, 0x57b4, + 0xa085, 0x0001, 0x0078, 0x57b6, 0x2208, 0xa006, 0x0d7f, 0x0e7f, + 0x047f, 0x007c, 0xa084, 0x0007, 0x0079, 0x57bf, 0x007c, 0x57c7, + 0x57c7, 0x57c7, 0x5933, 0x57c7, 0x57c8, 0x57e1, 0x5858, 0x007c, + 0x7110, 0xd1bc, 0x0040, 0x57e0, 0x7120, 0x2160, 0xac8c, 0x000f, + 0x00c0, 0x57e0, 0xac8a, 0xae00, 0x0048, 0x57e0, 0x6858, 0xac02, + 0x00c8, 0x57e0, 0x7124, 0x610a, 0x2009, 0x0046, 0x1078, 0x775c, + 0x007c, 0x0c7e, 0xa484, 0x01ff, 0x0040, 0x5833, 0x7110, 0xd1bc, + 0x00c0, 0x5833, 0x2011, 0xac83, 0x2204, 0x8211, 0x220c, 0x1078, + 0x254d, 0x00c0, 0x5833, 0x1078, 0x455c, 0x00c0, 0x5833, 0x6612, + 0x6516, 0x6000, 0xd0ec, 0x00c0, 0x5833, 0x6204, 0xa294, 0xff00, + 0x8217, 0xa286, 0x0006, 0x00c0, 0x5818, 0x0c7e, 0x1078, 0x76c7, + 0x017f, 0x0040, 0x5835, 0x611a, 0x601f, 0x0006, 0x7120, 0x610a, + 0x7130, 0x6122, 0x2009, 0x0044, 0x1078, 0x775c, 0x0078, 0x5833, + 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x5833, 0x611a, 0x601f, + 0x0004, 0x7120, 0x610a, 0xa286, 0x0004, 0x00c0, 0x582b, 0x6007, + 0x0005, 0x0078, 0x582d, 0x6007, 0x0001, 0x6003, 0x0001, 0x1078, + 0x5dd7, 0x1078, 0x62d1, 0x0c7f, 0x007c, 0x2001, 0xa70d, 0x2004, + 0xd0ec, 0x0040, 0x583f, 0x2011, 0x8049, 0x1078, 0x361b, 0x0c7e, + 0x1078, 0x9197, 0x017f, 0x0040, 0x5833, 0x611a, 0x601f, 0x0006, + 0x7120, 0x610a, 0x7130, 0x6122, 0x6013, 0x0300, 0x6003, 0x0001, + 0x6007, 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x5833, + 0x7110, 0xd1bc, 0x0040, 0x5870, 0x7020, 0x2060, 0xac84, 0x000f, + 0x00c0, 0x5870, 0xac82, 0xae00, 0x0048, 0x5870, 0x6858, 0xac02, + 0x00c8, 0x5870, 0x7124, 0x610a, 0x2009, 0x0045, 0x1078, 0x775c, + 0x007c, 0x007e, 0x1078, 0x29bb, 0x007f, 0x00c0, 0x5887, 0x7110, + 0xa18c, 0xff00, 0x810f, 0xa18e, 0x0000, 0x00c0, 0x5887, 0xa084, + 0x000f, 0xa08a, 0x0006, 0x00c8, 0x5887, 0x1079, 0x5888, 0x007c, + 0x588e, 0x588f, 0x588e, 0x588e, 0x58ff, 0x590e, 0x007c, 0x7110, + 0xd1bc, 0x0040, 0x5897, 0x702c, 0xd084, 0x0040, 0x58fe, 0x700c, + 0x7108, 0x1078, 0x254d, 0x00c0, 0x58fe, 0x1078, 0x455c, 0x00c0, + 0x58fe, 0x6612, 0x6516, 0x6204, 0x7110, 0xd1bc, 0x0040, 0x58c9, + 0xa28c, 0x00ff, 0xa186, 0x0004, 0x0040, 0x58b2, 0xa186, 0x0006, + 0x00c0, 0x58ef, 0x0c7e, 0x1078, 0x591d, 0x0c7f, 0x0040, 0x58fe, + 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, + 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x1078, 0x775c, 0x0078, + 0x58fe, 0xa28c, 0x00ff, 0xa186, 0x0006, 0x0040, 0x58de, 0xa186, + 0x0004, 0x0040, 0x58de, 0xa294, 0xff00, 0x8217, 0xa286, 0x0004, + 0x0040, 0x58de, 0xa286, 0x0006, 0x00c0, 0x58ef, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, 0x0005, 0x7120, + 0x610a, 0x2009, 0x0088, 0x1078, 0x775c, 0x0078, 0x58fe, 0x0c7e, + 0x1078, 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, 0x0004, + 0x7120, 0x610a, 0x2009, 0x0001, 0x1078, 0x775c, 0x007c, 0x7110, + 0xd1bc, 0x0040, 0x590d, 0x1078, 0x591d, 0x0040, 0x590d, 0x7124, + 0x610a, 0x2009, 0x0089, 0x1078, 0x775c, 0x007c, 0x7110, 0xd1bc, + 0x0040, 0x591c, 0x1078, 0x591d, 0x0040, 0x591c, 0x7124, 0x610a, + 0x2009, 0x008a, 0x1078, 0x775c, 0x007c, 0x7020, 0x2060, 0xac84, + 0x000f, 0x00c0, 0x5930, 0xac82, 0xae00, 0x0048, 0x5930, 0x2001, + 0xa716, 0x2004, 0xac02, 0x00c8, 0x5930, 0xa085, 0x0001, 0x007c, + 0xa006, 0x0078, 0x592f, 0x7110, 0xd1bc, 0x00c0, 0x5949, 0x7024, + 0x2060, 0xac84, 0x000f, 0x00c0, 0x5949, 0xac82, 0xae00, 0x0048, + 0x5949, 0x6858, 0xac02, 0x00c8, 0x5949, 0x2009, 0x0051, 0x1078, + 0x775c, 0x007c, 0x2071, 0xa9c4, 0x7003, 0x0003, 0x700f, 0x0361, + 0xa006, 0x701a, 0x7012, 0x7017, 0xae00, 0x7007, 0x0000, 0x7026, + 0x702b, 0x6e1c, 0x7032, 0x7037, 0x6e70, 0x703b, 0x0002, 0x703f, + 0x0000, 0x7043, 0xffff, 0x7047, 0xffff, 0x007c, 0x2071, 0xa9c4, + 0x00e0, 0x5a32, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x00c0, + 0x59de, 0x700f, 0x0361, 0x7007, 0x0001, 0x127e, 0x2091, 0x8000, + 0x7138, 0x8109, 0x713a, 0x00c0, 0x59dc, 0x703b, 0x0002, 0x2009, + 0x0100, 0x2104, 0xa082, 0x0003, 0x00c8, 0x59dc, 0x703c, 0xa086, + 0x0001, 0x00c0, 0x59b9, 0x0d7e, 0x2069, 0x0140, 0x6804, 0xa084, + 0x4000, 0x0040, 0x5997, 0x6803, 0x1000, 0x0078, 0x599e, 0x6804, + 0xa084, 0x1000, 0x0040, 0x599e, 0x6803, 0x0100, 0x6803, 0x0000, + 0x703f, 0x0000, 0x2069, 0xa9b1, 0x6804, 0xa082, 0x0006, 0x00c0, + 0x59ab, 0x6807, 0x0000, 0x6830, 0xa082, 0x0003, 0x00c0, 0x59b2, + 0x6833, 0x0000, 0x1078, 0x62d1, 0x1078, 0x639b, 0x0d7f, 0x0078, + 0x59dc, 0x0d7e, 0x2069, 0xa700, 0x6948, 0x6864, 0xa102, 0x00c8, + 0x59db, 0x2069, 0xa9b1, 0x6804, 0xa086, 0x0000, 0x00c0, 0x59db, + 0x6830, 0xa086, 0x0000, 0x00c0, 0x59db, 0x703f, 0x0001, 0x6807, + 0x0006, 0x6833, 0x0003, 0x2069, 0x0100, 0x6830, 0x689e, 0x2069, + 0x0140, 0x6803, 0x0600, 0x0d7f, 0x0078, 0x59e1, 0x127e, 0x2091, + 0x8000, 0x7024, 0xa00d, 0x0040, 0x59f9, 0x7020, 0x8001, 0x7022, + 0x00c0, 0x59f9, 0x7023, 0x0009, 0x8109, 0x7126, 0xa186, 0x03e8, + 0x00c0, 0x59f4, 0x7028, 0x107a, 0x81ff, 0x00c0, 0x59f9, 0x7028, + 0x107a, 0x7030, 0xa00d, 0x0040, 0x5a10, 0x702c, 0x8001, 0x702e, + 0x00c0, 0x5a10, 0x702f, 0x0009, 0x8109, 0x7132, 0x0040, 0x5a0e, + 0xa184, 0x007f, 0x1040, 0x6ea2, 0x0078, 0x5a10, 0x7034, 0x107a, + 0x7040, 0xa005, 0x0040, 0x5a18, 0x0050, 0x5a18, 0x8001, 0x7042, + 0x7044, 0xa005, 0x0040, 0x5a20, 0x0050, 0x5a20, 0x8001, 0x7046, + 0x7018, 0xa00d, 0x0040, 0x5a31, 0x7008, 0x8001, 0x700a, 0x00c0, + 0x5a31, 0x700b, 0x0009, 0x8109, 0x711a, 0x00c0, 0x5a31, 0x701c, + 0x107a, 0x127f, 0x7004, 0x0079, 0x5a35, 0x5a5c, 0x5a5d, 0x5a79, + 0x0e7e, 0x2071, 0xa9c4, 0x7018, 0xa005, 0x00c0, 0x5a43, 0x711a, + 0x721e, 0x700b, 0x0009, 0x0e7f, 0x007c, 0x0e7e, 0x007e, 0x2071, + 0xa9c4, 0x701c, 0xa206, 0x00c0, 0x5a4f, 0x701a, 0x701e, 0x007f, + 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa9c4, 0x6088, 0xa102, 0x0048, + 0x5a5a, 0x618a, 0x0e7f, 0x007c, 0x007c, 0x7110, 0x1078, 0x45c4, + 0x00c0, 0x5a6f, 0x6088, 0x8001, 0x0048, 0x5a6f, 0x608a, 0x00c0, + 0x5a6f, 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x8108, + 0xa182, 0x00ff, 0x0048, 0x5a77, 0xa00e, 0x7007, 0x0002, 0x7112, + 0x007c, 0x7014, 0x2060, 0x127e, 0x2091, 0x8000, 0x603c, 0xa005, + 0x0040, 0x5a88, 0x8001, 0x603e, 0x00c0, 0x5a88, 0x1078, 0x8fac, + 0x6014, 0xa005, 0x0040, 0x5ab2, 0x8001, 0x6016, 0x00c0, 0x5ab2, + 0x611c, 0xa186, 0x0003, 0x0040, 0x5a99, 0xa186, 0x0006, 0x00c0, + 0x5ab0, 0x6010, 0x2068, 0x6854, 0xa08a, 0x199a, 0x0048, 0x5ab0, + 0xa082, 0x1999, 0x6856, 0xa08a, 0x199a, 0x0048, 0x5aa9, 0x2001, + 0x1999, 0x8003, 0x800b, 0x810b, 0xa108, 0x6116, 0x0078, 0x5ab2, + 0x1078, 0x8ace, 0x127f, 0xac88, 0x0010, 0x7116, 0x2001, 0xce00, + 0xa102, 0x0048, 0x5abf, 0x7017, 0xae00, 0x7007, 0x0000, 0x007c, + 0x0e7e, 0x2071, 0xa9c4, 0x7027, 0x07d0, 0x7023, 0x0009, 0x703b, + 0x0002, 0x0e7f, 0x007c, 0x2001, 0xa9cd, 0x2003, 0x0000, 0x007c, + 0x0e7e, 0x2071, 0xa9c4, 0x7132, 0x702f, 0x0009, 0x0e7f, 0x007c, + 0x2011, 0xa9d0, 0x2013, 0x0000, 0x007c, 0x0e7e, 0x2071, 0xa9c4, + 0x711a, 0x721e, 0x700b, 0x0009, 0x0e7f, 0x007c, 0x027e, 0x0e7e, + 0x0f7e, 0x2079, 0xa700, 0x7a34, 0xd294, 0x0040, 0x5b15, 0x2071, + 0xa9ac, 0x2e14, 0xa0fe, 0x0000, 0x0040, 0x5b02, 0xa0fe, 0x0001, + 0x0040, 0x5b06, 0xa0fe, 0x0002, 0x00c0, 0x5b11, 0xa292, 0x0085, + 0x0078, 0x5b08, 0xa292, 0x0005, 0x0078, 0x5b08, 0xa292, 0x0002, + 0x2272, 0x0040, 0x5b0d, 0x00c8, 0x5b15, 0x2011, 0x8037, 0x1078, + 0x361b, 0x2011, 0xa9ab, 0x2204, 0x2072, 0x0f7f, 0x0e7f, 0x027f, + 0x007c, 0x0c7e, 0x2061, 0xaa33, 0x0c7f, 0x007c, 0xa184, 0x000f, + 0x8003, 0x8003, 0x8003, 0xa080, 0xaa33, 0x2060, 0x007c, 0x6854, + 0xa08a, 0x199a, 0x0048, 0x5b2e, 0x2001, 0x1999, 0xa005, 0x00c0, + 0x5b3d, 0x0c7e, 0x2061, 0xaa33, 0x6014, 0x0c7f, 0xa005, 0x00c0, + 0x5b42, 0x2001, 0x001e, 0x0078, 0x5b42, 0xa08e, 0xffff, 0x00c0, + 0x5b42, 0xa006, 0x8003, 0x800b, 0x810b, 0xa108, 0x6116, 0x684c, + 0xa08c, 0x00c0, 0xa18e, 0x00c0, 0x0040, 0x5b9e, 0xd0b4, 0x00c0, + 0x5b59, 0xd0bc, 0x00c0, 0x5b8b, 0x2009, 0x0006, 0x1078, 0x5bc3, + 0x007c, 0xd0fc, 0x0040, 0x5b64, 0xa084, 0x0003, 0x0040, 0x5b64, + 0xa086, 0x0003, 0x00c0, 0x5bbc, 0x6024, 0xd0d4, 0x0040, 0x5b6e, + 0xc0d4, 0x6026, 0x6860, 0x602a, 0x685c, 0x602e, 0x2009, 0xa774, + 0x2104, 0xd084, 0x0040, 0x5b83, 0x6118, 0xa188, 0x0027, 0x2104, + 0xd08c, 0x00c0, 0x5b83, 0x87ff, 0x00c0, 0x5b82, 0x2009, 0x0042, + 0x1078, 0x775c, 0x007c, 0x87ff, 0x00c0, 0x5b8a, 0x2009, 0x0043, + 0x1078, 0x775c, 0x007c, 0xd0fc, 0x0040, 0x5b96, 0xa084, 0x0003, + 0x0040, 0x5b96, 0xa086, 0x0003, 0x00c0, 0x5bbc, 0x87ff, 0x00c0, + 0x5b9d, 0x2009, 0x0042, 0x1078, 0x775c, 0x007c, 0xd0fc, 0x0040, + 0x5baf, 0xa084, 0x0003, 0xa08e, 0x0002, 0x0040, 0x5bb3, 0x87ff, + 0x00c0, 0x5bae, 0x2009, 0x0041, 0x1078, 0x775c, 0x007c, 0x1078, + 0x5bc1, 0x0078, 0x5bae, 0x87ff, 0x00c0, 0x5bae, 0x2009, 0x0043, + 0x1078, 0x775c, 0x0078, 0x5bae, 0x2009, 0x0004, 0x1078, 0x5bc3, + 0x007c, 0x2009, 0x0001, 0x0d7e, 0x6010, 0xa0ec, 0xf000, 0x0040, + 0x5bef, 0x2068, 0x6952, 0x6800, 0x6012, 0xa186, 0x0001, 0x00c0, + 0x5be5, 0x694c, 0xa18c, 0x8100, 0xa18e, 0x8100, 0x00c0, 0x5be5, + 0x0c7e, 0x2061, 0xaa33, 0x6200, 0xd28c, 0x00c0, 0x5be4, 0x6204, + 0x8210, 0x0048, 0x5be4, 0x6206, 0x0c7f, 0x1078, 0x4a73, 0x6010, + 0xa06d, 0x077e, 0x2039, 0x0000, 0x10c0, 0x5b27, 0x077f, 0x0d7f, + 0x007c, 0x157e, 0x0c7e, 0x2061, 0xaa33, 0x6000, 0x81ff, 0x0040, + 0x5bfc, 0xa205, 0x0078, 0x5bfd, 0xa204, 0x6002, 0x0c7f, 0x157f, + 0x007c, 0x6800, 0xd08c, 0x00c0, 0x5c0d, 0x6808, 0xa005, 0x0040, + 0x5c0d, 0x8001, 0x680a, 0xa085, 0x0001, 0x007c, 0x20a9, 0x0010, + 0xa006, 0x8004, 0x8086, 0x818e, 0x00c8, 0x5c17, 0xa200, 0x00f0, + 0x5c12, 0x8086, 0x818e, 0x007c, 0x157e, 0x20a9, 0x0010, 0xa005, + 0x0040, 0x5c3d, 0xa11a, 0x00c8, 0x5c3d, 0x8213, 0x818d, 0x0048, + 0x5c30, 0xa11a, 0x00c8, 0x5c31, 0x00f0, 0x5c25, 0x0078, 0x5c35, + 0xa11a, 0x2308, 0x8210, 0x00f0, 0x5c25, 0x007e, 0x3200, 0xa084, + 0xf7ff, 0x2080, 0x007f, 0x157f, 0x007c, 0x007e, 0x3200, 0xa085, + 0x0800, 0x0078, 0x5c39, 0x127e, 0x2091, 0x2200, 0x2079, 0xa9b1, + 0x127f, 0x0d7e, 0x2069, 0xa9b1, 0x6803, 0x0005, 0x2069, 0x0004, + 0x2d04, 0xa085, 0x8001, 0x206a, 0x0d7f, 0x007c, 0x0c7e, 0x6027, + 0x0001, 0x7804, 0xa084, 0x0007, 0x0079, 0x5c5e, 0x5c68, 0x5c8d, + 0x5ce8, 0x5c6e, 0x5c8d, 0x5c68, 0x5c66, 0x5c66, 0x1078, 0x1332, + 0x1078, 0x5acb, 0x1078, 0x62d1, 0x0c7f, 0x007c, 0x62c0, 0x82ff, + 0x00c0, 0x5c74, 0x0c7f, 0x007c, 0x2011, 0x41dc, 0x1078, 0x5a45, + 0x7828, 0xa092, 0x00c8, 0x00c8, 0x5c83, 0x8000, 0x782a, 0x1078, + 0x421b, 0x0078, 0x5c72, 0x1078, 0x41dc, 0x7807, 0x0003, 0x7827, + 0x0000, 0x782b, 0x0000, 0x0078, 0x5c72, 0x1078, 0x5acb, 0x3c00, + 0x007e, 0x2011, 0x0209, 0x20e1, 0x4000, 0x2214, 0x007f, 0x20e0, + 0x82ff, 0x0040, 0x5cab, 0x62c0, 0x82ff, 0x00c0, 0x5cab, 0x782b, + 0x0000, 0x7824, 0xa065, 0x1040, 0x1332, 0x2009, 0x0013, 0x1078, + 0x775c, 0x0c7f, 0x007c, 0x3900, 0xa082, 0xaae3, 0x00c8, 0x5cb2, + 0x1078, 0x747a, 0x0c7e, 0x7824, 0xa065, 0x1040, 0x1332, 0x7804, + 0xa086, 0x0004, 0x0040, 0x5d2d, 0x7828, 0xa092, 0x2710, 0x00c8, + 0x5cc8, 0x8000, 0x782a, 0x0c7f, 0x1078, 0x6e01, 0x0078, 0x5ca9, + 0x6104, 0xa186, 0x0003, 0x00c0, 0x5cdf, 0x0e7e, 0x2071, 0xa700, + 0x70d8, 0x0e7f, 0xd08c, 0x0040, 0x5cdf, 0x0c7e, 0x0e7e, 0x2061, + 0x0100, 0x2071, 0xa700, 0x1078, 0x4224, 0x0e7f, 0x0c7f, 0x1078, + 0xa5d4, 0x2009, 0x0014, 0x1078, 0x775c, 0x0c7f, 0x0078, 0x5ca9, + 0x2001, 0xa9cd, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x00c0, 0x5cfc, + 0x782b, 0x0000, 0x7824, 0xa065, 0x1040, 0x1332, 0x2009, 0x0013, + 0x1078, 0x77b3, 0x0c7f, 0x007c, 0x0c7e, 0x0d7e, 0x3900, 0xa082, + 0xaae3, 0x00c8, 0x5d05, 0x1078, 0x747a, 0x7824, 0xa005, 0x1040, + 0x1332, 0x781c, 0xa06d, 0x1040, 0x1332, 0x6800, 0xc0dc, 0x6802, + 0x7924, 0x2160, 0x1078, 0x772d, 0x693c, 0x81ff, 0x1040, 0x1332, + 0x8109, 0x693e, 0x6854, 0xa015, 0x0040, 0x5d21, 0x7a1e, 0x0078, + 0x5d23, 0x7918, 0x791e, 0x7807, 0x0000, 0x7827, 0x0000, 0x0d7f, + 0x0c7f, 0x1078, 0x62d1, 0x0078, 0x5cfa, 0x6104, 0xa186, 0x0002, + 0x0040, 0x5d38, 0xa186, 0x0004, 0x0040, 0x5d38, 0x0078, 0x5cbc, + 0x7808, 0xac06, 0x0040, 0x5cbc, 0x1078, 0x61cd, 0x1078, 0x5dd7, + 0x0c7f, 0x1078, 0x62d1, 0x0078, 0x5ca9, 0x0c7e, 0x6027, 0x0002, + 0x62c8, 0x82ff, 0x00c0, 0x5d61, 0x62c4, 0x82ff, 0x00c0, 0x5d61, + 0x793c, 0xa1e5, 0x0000, 0x0040, 0x5d5b, 0x2009, 0x0049, 0x1078, + 0x775c, 0x0c7f, 0x007c, 0x2011, 0xa9d0, 0x2013, 0x0000, 0x0078, + 0x5d59, 0x3908, 0xa192, 0xaae3, 0x00c8, 0x5d68, 0x1078, 0x747a, + 0x6017, 0x0010, 0x793c, 0x81ff, 0x0040, 0x5d5b, 0x7944, 0xa192, + 0x7530, 0x00c8, 0x5d85, 0x8108, 0x7946, 0x793c, 0xa188, 0x0007, + 0x210c, 0xa18e, 0x0006, 0x00c0, 0x5d81, 0x6017, 0x0012, 0x0078, + 0x5d59, 0x6017, 0x0016, 0x0078, 0x5d59, 0x7848, 0xc085, 0x784a, + 0x0078, 0x5d59, 0x007e, 0x017e, 0x0c7e, 0x127e, 0x2091, 0x8000, + 0x600f, 0x0000, 0x2c08, 0x2061, 0xa9b1, 0x6020, 0x8000, 0x6022, + 0x6010, 0xa005, 0x0040, 0x5da5, 0xa080, 0x0003, 0x2102, 0x6112, + 0x127f, 0x0c7f, 0x017f, 0x007f, 0x007c, 0x6116, 0x6112, 0x0078, + 0x5da0, 0x0d7e, 0x2069, 0xa9b1, 0x6000, 0xd0d4, 0x0040, 0x5dbe, + 0x6820, 0x8000, 0x6822, 0xa086, 0x0001, 0x00c0, 0x5db9, 0x2c00, + 0x681e, 0x6804, 0xa084, 0x0007, 0x0079, 0x62d9, 0xc0d5, 0x6002, + 0x6818, 0xa005, 0x0040, 0x5dd0, 0x6056, 0x605b, 0x0000, 0x007e, + 0x2c00, 0x681a, 0x0d7f, 0x685a, 0x2069, 0xa9b1, 0x0078, 0x5db0, + 0x6056, 0x605a, 0x2c00, 0x681a, 0x681e, 0x0078, 0x5db0, 0x007e, + 0x017e, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, + 0x2061, 0xa9b1, 0x6020, 0x8000, 0x6022, 0x6008, 0xa005, 0x0040, + 0x5df2, 0xa080, 0x0003, 0x2102, 0x610a, 0x127f, 0x0c7f, 0x017f, + 0x007f, 0x007c, 0x610e, 0x610a, 0x0078, 0x5ded, 0x0c7e, 0x600f, + 0x0000, 0x2c08, 0x2061, 0xa9b1, 0x6034, 0xa005, 0x0040, 0x5e06, + 0xa080, 0x0003, 0x2102, 0x6136, 0x0c7f, 0x007c, 0x613a, 0x6136, + 0x0078, 0x5e04, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, 0x057e, + 0x037e, 0x027e, 0x017e, 0x007e, 0x127e, 0xa02e, 0x2071, 0xa9b1, + 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0040, 0x5e8c, + 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x00c0, 0x5e87, 0x87ff, + 0x0040, 0x5e2e, 0x6020, 0xa106, 0x00c0, 0x5e87, 0x703c, 0xac06, + 0x00c0, 0x5e44, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x7033, + 0x0000, 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, + 0x0000, 0x037f, 0x2029, 0x0001, 0x7038, 0xac36, 0x00c0, 0x5e4a, + 0x660c, 0x763a, 0x7034, 0xac36, 0x00c0, 0x5e58, 0x2c00, 0xaf36, + 0x0040, 0x5e56, 0x2f00, 0x7036, 0x0078, 0x5e58, 0x7037, 0x0000, + 0x660c, 0x067e, 0x2c00, 0xaf06, 0x0040, 0x5e61, 0x7e0e, 0x0078, + 0x5e62, 0x2678, 0x600f, 0x0000, 0x1078, 0x8d16, 0x0040, 0x5e82, + 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x00c0, 0x5e9d, 0x6837, + 0x0103, 0x6b4a, 0x6847, 0x0000, 0x017e, 0x037e, 0x077e, 0x1078, + 0x8f8d, 0x1078, 0xa4f2, 0x1078, 0x4a73, 0x077f, 0x037f, 0x017f, + 0x1078, 0x8ec9, 0x1078, 0x8ed6, 0x0c7f, 0x0078, 0x5e1d, 0x2c78, + 0x600c, 0x2060, 0x0078, 0x5e1d, 0x85ff, 0x0040, 0x5e91, 0x1078, + 0x639b, 0x127f, 0x007f, 0x017f, 0x027f, 0x037f, 0x057f, 0x067f, + 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x5e6f, 0x017e, 0x037e, 0x077e, 0x1078, 0xa4f2, 0x1078, + 0xa1da, 0x077f, 0x037f, 0x017f, 0x0078, 0x5e82, 0x007e, 0x067e, + 0x0c7e, 0x0d7e, 0x0f7e, 0x2031, 0x0000, 0x127e, 0x2091, 0x8000, + 0x2079, 0xa9b1, 0x7838, 0xa065, 0x0040, 0x5eef, 0x600c, 0x007e, + 0x600f, 0x0000, 0x783c, 0xac06, 0x00c0, 0x5ed6, 0x037e, 0x2019, + 0x0001, 0x1078, 0x7058, 0x7833, 0x0000, 0x783f, 0x0000, 0x7843, + 0x0000, 0x7847, 0x0000, 0x784b, 0x0000, 0x037f, 0x1078, 0x8d16, + 0x0040, 0x5eea, 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x00c0, + 0x5ef8, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, + 0x1078, 0x8ec9, 0x1078, 0x8ed6, 0x007f, 0x0078, 0x5ebb, 0x7e3a, + 0x7e36, 0x127f, 0x0f7f, 0x0d7f, 0x0c7f, 0x067f, 0x007f, 0x007c, + 0x601c, 0xa086, 0x0006, 0x00c0, 0x5ee1, 0x1078, 0xa1da, 0x0078, + 0x5eea, 0x017e, 0x027e, 0x087e, 0x2041, 0x0000, 0x1078, 0x5f1b, + 0x1078, 0x5fdb, 0x087f, 0x027f, 0x017f, 0x007c, 0x0f7e, 0x127e, + 0x2079, 0xa9b1, 0x2091, 0x8000, 0x1078, 0x6076, 0x1078, 0x60ec, + 0x127f, 0x0f7f, 0x007c, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, + 0x017e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa9b1, 0x7614, + 0x2660, 0x2678, 0x8cff, 0x0040, 0x5fb5, 0x6018, 0xa080, 0x0028, + 0x2004, 0xa206, 0x00c0, 0x5fb0, 0x88ff, 0x0040, 0x5f3b, 0x6020, + 0xa106, 0x00c0, 0x5fb0, 0x7024, 0xac06, 0x00c0, 0x5f6b, 0x2069, + 0x0100, 0x68c0, 0xa005, 0x0040, 0x5f66, 0x1078, 0x5acb, 0x1078, + 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, + 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x5f5b, 0x6803, + 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, + 0x5f63, 0x6827, 0x0001, 0x037f, 0x0078, 0x5f6b, 0x6003, 0x0009, + 0x630a, 0x0078, 0x5fb0, 0x7014, 0xac36, 0x00c0, 0x5f71, 0x660c, + 0x7616, 0x7010, 0xac36, 0x00c0, 0x5f7f, 0x2c00, 0xaf36, 0x0040, + 0x5f7d, 0x2f00, 0x7012, 0x0078, 0x5f7f, 0x7013, 0x0000, 0x660c, + 0x067e, 0x2c00, 0xaf06, 0x0040, 0x5f88, 0x7e0e, 0x0078, 0x5f89, + 0x2678, 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, + 0x5fa9, 0x601c, 0xa086, 0x0003, 0x00c0, 0x5fbe, 0x6837, 0x0103, + 0x6b4a, 0x6847, 0x0000, 0x017e, 0x037e, 0x087e, 0x1078, 0x8f8d, + 0x1078, 0xa4f2, 0x1078, 0x4a73, 0x087f, 0x037f, 0x017f, 0x1078, + 0x8ec9, 0x1078, 0x8ed6, 0x1078, 0x7233, 0x0c7f, 0x0078, 0x5f2a, + 0x2c78, 0x600c, 0x2060, 0x0078, 0x5f2a, 0x127f, 0x007f, 0x017f, + 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x601c, 0xa086, + 0x0006, 0x00c0, 0x5fcf, 0x017e, 0x037e, 0x087e, 0x1078, 0xa4f2, + 0x1078, 0xa1da, 0x087f, 0x037f, 0x017f, 0x0078, 0x5fa9, 0x601c, + 0xa086, 0x0002, 0x00c0, 0x5fa9, 0x6004, 0xa086, 0x0085, 0x0040, + 0x5f96, 0x0078, 0x5fa9, 0x0c7e, 0x007e, 0x127e, 0x2091, 0x8000, + 0xa280, 0xa835, 0x2004, 0xa065, 0x0040, 0x6072, 0x0f7e, 0x0e7e, + 0x0d7e, 0x067e, 0x2071, 0xa9b1, 0x6654, 0x7018, 0xac06, 0x00c0, + 0x5ff2, 0x761a, 0x701c, 0xac06, 0x00c0, 0x5ffe, 0x86ff, 0x00c0, + 0x5ffd, 0x7018, 0x701e, 0x0078, 0x5ffe, 0x761e, 0x6058, 0xa07d, + 0x0040, 0x6003, 0x7e56, 0xa6ed, 0x0000, 0x0040, 0x6009, 0x2f00, + 0x685a, 0x6057, 0x0000, 0x605b, 0x0000, 0x6000, 0xc0d4, 0xc0dc, + 0x6002, 0x1078, 0x44d3, 0x0040, 0x606e, 0x7624, 0x86ff, 0x0040, + 0x605c, 0xa680, 0x0004, 0x2004, 0xad06, 0x00c0, 0x605c, 0x0d7e, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x0040, 0x6053, 0x1078, 0x5acb, + 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7027, 0x0000, + 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x603c, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0040, 0x6044, 0x6827, 0x0001, 0x037f, 0x0d7f, 0x0c7e, 0x603c, + 0xa005, 0x0040, 0x604d, 0x8001, 0x603e, 0x2660, 0x1078, 0x8ed6, + 0x0c7f, 0x0078, 0x605c, 0x0d7f, 0x0c7e, 0x2660, 0x6003, 0x0009, + 0x630a, 0x0c7f, 0x0078, 0x6011, 0x8dff, 0x0040, 0x606a, 0x6837, + 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x8f8d, 0x1078, 0xa4f2, + 0x1078, 0x4a73, 0x1078, 0x7233, 0x0078, 0x6011, 0x067f, 0x0d7f, + 0x0e7f, 0x0f7f, 0x127f, 0x007f, 0x0c7f, 0x007c, 0x007e, 0x067e, + 0x0c7e, 0x0d7e, 0x2031, 0x0000, 0x7814, 0xa065, 0x0040, 0x60d0, + 0x600c, 0x007e, 0x600f, 0x0000, 0x7824, 0xac06, 0x00c0, 0x60b5, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x0040, 0x60af, 0x1078, 0x5acb, + 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7827, 0x0000, + 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x60a4, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0040, 0x60ac, 0x6827, 0x0001, 0x037f, 0x0078, 0x60b5, 0x6003, + 0x0009, 0x630a, 0x2c30, 0x0078, 0x60cd, 0x6010, 0x2068, 0x1078, + 0x8d16, 0x0040, 0x60c9, 0x601c, 0xa086, 0x0003, 0x00c0, 0x60d7, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, 0x1078, + 0x8ec9, 0x1078, 0x8ed6, 0x1078, 0x7233, 0x007f, 0x0078, 0x607d, + 0x7e16, 0x7e12, 0x0d7f, 0x0c7f, 0x067f, 0x007f, 0x007c, 0x601c, + 0xa086, 0x0006, 0x00c0, 0x60e0, 0x1078, 0xa1da, 0x0078, 0x60c9, + 0x601c, 0xa086, 0x0002, 0x00c0, 0x60c9, 0x6004, 0xa086, 0x0085, + 0x0040, 0x60c0, 0x0078, 0x60c9, 0x007e, 0x067e, 0x0c7e, 0x0d7e, + 0x7818, 0xa065, 0x0040, 0x615a, 0x6054, 0x007e, 0x6057, 0x0000, + 0x605b, 0x0000, 0x6000, 0xc0d4, 0xc0dc, 0x6002, 0x1078, 0x44d3, + 0x0040, 0x6157, 0x7e24, 0x86ff, 0x0040, 0x6149, 0xa680, 0x0004, + 0x2004, 0xad06, 0x00c0, 0x6149, 0x0d7e, 0x2069, 0x0100, 0x68c0, + 0xa005, 0x0040, 0x6140, 0x1078, 0x5acb, 0x1078, 0x6e0f, 0x68c3, + 0x0000, 0x1078, 0x7378, 0x7827, 0x0000, 0x037e, 0x2069, 0x0140, + 0x6b04, 0xa384, 0x1000, 0x0040, 0x6129, 0x6803, 0x0100, 0x6803, + 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, 0x6131, 0x6827, + 0x0001, 0x037f, 0x0d7f, 0x0c7e, 0x603c, 0xa005, 0x0040, 0x613a, + 0x8001, 0x603e, 0x2660, 0x1078, 0x8ed6, 0x0c7f, 0x0078, 0x6149, + 0x0d7f, 0x0c7e, 0x2660, 0x6003, 0x0009, 0x630a, 0x0c7f, 0x0078, + 0x60fe, 0x8dff, 0x0040, 0x6153, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x7233, 0x0078, 0x60fe, 0x007f, + 0x0078, 0x60f1, 0x781e, 0x781a, 0x0d7f, 0x0c7f, 0x067f, 0x007f, + 0x007c, 0x0e7e, 0x0d7e, 0x067e, 0x6000, 0xd0dc, 0x0040, 0x6181, + 0x604c, 0xa06d, 0x0040, 0x6181, 0x6848, 0xa606, 0x00c0, 0x6181, + 0x2071, 0xa9b1, 0x7024, 0xa035, 0x0040, 0x6181, 0xa080, 0x0004, + 0x2004, 0xad06, 0x00c0, 0x6181, 0x6000, 0xc0dc, 0x6002, 0x1078, + 0x6185, 0x067f, 0x0d7f, 0x0e7f, 0x007c, 0x0f7e, 0x2079, 0x0100, + 0x78c0, 0xa005, 0x00c0, 0x6194, 0x0c7e, 0x2660, 0x6003, 0x0009, + 0x630a, 0x0c7f, 0x0078, 0x61cb, 0x1078, 0x6e0f, 0x78c3, 0x0000, + 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, 0x2079, 0x0140, 0x7b04, + 0xa384, 0x1000, 0x0040, 0x61a8, 0x7803, 0x0100, 0x7803, 0x0000, + 0x2079, 0x0100, 0x7824, 0xd084, 0x0040, 0x61b0, 0x7827, 0x0001, + 0x1078, 0x7378, 0x037f, 0x1078, 0x44d3, 0x0c7e, 0x603c, 0xa005, + 0x0040, 0x61bc, 0x8001, 0x603e, 0x2660, 0x1078, 0x772d, 0x0c7f, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x8f8d, 0x1078, + 0x4a73, 0x1078, 0x7233, 0x0f7f, 0x007c, 0x0e7e, 0x0c7e, 0x2071, + 0xa9b1, 0x7004, 0xa084, 0x0007, 0x0079, 0x61d6, 0x61e0, 0x61e3, + 0x61fc, 0x6218, 0x6262, 0x61e0, 0x61e0, 0x61de, 0x1078, 0x1332, + 0x0c7f, 0x0e7f, 0x007c, 0x7024, 0xa065, 0x0040, 0x61f1, 0x7020, + 0x8001, 0x7022, 0x600c, 0xa015, 0x0040, 0x61f8, 0x7216, 0x600f, + 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x0c7f, 0x0e7f, 0x007c, + 0x7216, 0x7212, 0x0078, 0x61f1, 0x6018, 0x2060, 0x1078, 0x44d3, + 0x6000, 0xc0dc, 0x6002, 0x7020, 0x8001, 0x7022, 0x0040, 0x620d, + 0x6054, 0xa015, 0x0040, 0x6214, 0x721e, 0x7007, 0x0000, 0x7027, + 0x0000, 0x0c7f, 0x0e7f, 0x007c, 0x7218, 0x721e, 0x0078, 0x620d, + 0x7024, 0xa065, 0x0040, 0x625f, 0x700c, 0xac06, 0x00c0, 0x622f, + 0x1078, 0x7233, 0x600c, 0xa015, 0x0040, 0x622b, 0x720e, 0x600f, + 0x0000, 0x0078, 0x625d, 0x720e, 0x720a, 0x0078, 0x625d, 0x7014, + 0xac06, 0x00c0, 0x6242, 0x1078, 0x7233, 0x600c, 0xa015, 0x0040, + 0x623e, 0x7216, 0x600f, 0x0000, 0x0078, 0x625d, 0x7216, 0x7212, + 0x0078, 0x625d, 0x601c, 0xa086, 0x0003, 0x00c0, 0x625d, 0x6018, + 0x2060, 0x1078, 0x44d3, 0x6000, 0xc0dc, 0x6002, 0x1078, 0x7233, + 0x701c, 0xa065, 0x0040, 0x625d, 0x6054, 0xa015, 0x0040, 0x625b, + 0x721e, 0x0078, 0x625d, 0x7218, 0x721e, 0x7027, 0x0000, 0x0c7f, + 0x0e7f, 0x007c, 0x7024, 0xa065, 0x0040, 0x626f, 0x1078, 0x7233, + 0x600c, 0xa015, 0x0040, 0x6276, 0x720e, 0x600f, 0x0000, 0x1078, + 0x7378, 0x7027, 0x0000, 0x0c7f, 0x0e7f, 0x007c, 0x720e, 0x720a, + 0x0078, 0x626f, 0x0d7e, 0x2069, 0xa9b1, 0x6830, 0xa084, 0x0003, + 0x0079, 0x6282, 0x6288, 0x628a, 0x62b4, 0x6288, 0x1078, 0x1332, + 0x0d7f, 0x007c, 0x0c7e, 0x6840, 0xa086, 0x0001, 0x0040, 0x62aa, + 0x683c, 0xa065, 0x0040, 0x629b, 0x600c, 0xa015, 0x0040, 0x62a6, + 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011, + 0xa9d0, 0x2013, 0x0000, 0x0c7f, 0x0d7f, 0x007c, 0x683a, 0x6836, + 0x0078, 0x629b, 0x6843, 0x0000, 0x6838, 0xa065, 0x0040, 0x629b, + 0x6003, 0x0003, 0x0078, 0x629b, 0x0c7e, 0x6843, 0x0000, 0x6847, + 0x0000, 0x684b, 0x0000, 0x683c, 0xa065, 0x0040, 0x62ce, 0x600c, + 0xa015, 0x0040, 0x62ca, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, + 0x0078, 0x62ce, 0x683f, 0x0000, 0x683a, 0x6836, 0x0c7f, 0x0d7f, + 0x007c, 0x0d7e, 0x2069, 0xa9b1, 0x6804, 0xa084, 0x0007, 0x0079, + 0x62d9, 0x62e3, 0x638a, 0x638a, 0x638a, 0x638a, 0x638c, 0x638a, + 0x62e1, 0x1078, 0x1332, 0x6820, 0xa005, 0x00c0, 0x62e9, 0x0d7f, + 0x007c, 0x0c7e, 0x680c, 0xa065, 0x0040, 0x62f8, 0x6807, 0x0004, + 0x6826, 0x682b, 0x0000, 0x1078, 0x63d4, 0x0c7f, 0x0d7f, 0x007c, + 0x6814, 0xa065, 0x0040, 0x6306, 0x6807, 0x0001, 0x6826, 0x682b, + 0x0000, 0x1078, 0x63d4, 0x0c7f, 0x0d7f, 0x007c, 0x0e7e, 0x037e, + 0x6a1c, 0xa2f5, 0x0000, 0x0040, 0x6385, 0x704c, 0xa00d, 0x0040, + 0x6315, 0x7088, 0xa005, 0x0040, 0x632d, 0x7054, 0xa075, 0x0040, + 0x631e, 0xa20e, 0x0040, 0x6385, 0x0078, 0x6323, 0x6818, 0xa20e, + 0x0040, 0x6385, 0x2070, 0x704c, 0xa00d, 0x0040, 0x6315, 0x7088, + 0xa005, 0x00c0, 0x6315, 0x2e00, 0x681e, 0x733c, 0x7038, 0xa302, + 0x00c8, 0x6315, 0x1078, 0x76fc, 0x0040, 0x6385, 0x8318, 0x733e, + 0x6112, 0x2e10, 0x621a, 0xa180, 0x0014, 0x2004, 0xa084, 0x00ff, + 0x6032, 0xa180, 0x0014, 0x2003, 0x0000, 0xa180, 0x0015, 0x2004, + 0xa08a, 0x199a, 0x0048, 0x634e, 0x2001, 0x1999, 0x8003, 0x801b, + 0x831b, 0xa318, 0x6316, 0x037f, 0x0f7e, 0x2c78, 0x71a0, 0xd1bc, + 0x0040, 0x6367, 0x7100, 0xd1f4, 0x0040, 0x6363, 0x7114, 0xa18c, + 0x00ff, 0x0078, 0x636c, 0x2009, 0x0000, 0x0078, 0x636c, 0xa1e0, + 0x29c0, 0x2c0c, 0xa18c, 0x00ff, 0x2061, 0x0100, 0x619a, 0x1078, + 0x6965, 0x7300, 0xc3dd, 0x7302, 0x6807, 0x0002, 0x2f18, 0x6b26, + 0x682b, 0x0000, 0x781f, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, + 0x0f7f, 0x0e7f, 0x0c7f, 0x0d7f, 0x007c, 0x037f, 0x0e7f, 0x0c7f, + 0x0078, 0x6383, 0x0d7f, 0x007c, 0x0c7e, 0x680c, 0xa065, 0x0040, + 0x6398, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x1078, 0x63d4, + 0x0c7f, 0x0d7f, 0x007c, 0x0f7e, 0x0d7e, 0x2069, 0xa9b1, 0x6830, + 0xa086, 0x0000, 0x00c0, 0x63bb, 0x6838, 0xa07d, 0x0040, 0x63bb, + 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x127e, + 0x0f7e, 0x2091, 0x2200, 0x027f, 0x1078, 0x1d6d, 0x00c0, 0x63be, + 0x127f, 0x1078, 0x6cb3, 0x0d7f, 0x0f7f, 0x007c, 0x127f, 0x6843, + 0x0000, 0x7803, 0x0002, 0x780c, 0xa015, 0x0040, 0x63d0, 0x6a3a, + 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0078, 0x63bb, + 0x683a, 0x6836, 0x0078, 0x63ca, 0x601c, 0xa084, 0x000f, 0x1079, + 0x63da, 0x007c, 0x63e3, 0x63e8, 0x6809, 0x6922, 0x63e8, 0x6809, + 0x6922, 0x63e3, 0x63e8, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x007c, + 0x157e, 0x137e, 0x147e, 0x0c7e, 0x0f7e, 0x6004, 0xa08a, 0x0044, + 0x10c8, 0x1332, 0x6118, 0x2178, 0x79a0, 0xd1bc, 0x0040, 0x6405, + 0x7900, 0xd1f4, 0x0040, 0x6401, 0x7914, 0xa18c, 0x00ff, 0x0078, + 0x640a, 0x2009, 0x0000, 0x0078, 0x640a, 0xa1f8, 0x29c0, 0x2f0c, + 0xa18c, 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, 0xa08a, 0x0040, + 0x00c8, 0x645c, 0x1079, 0x641a, 0x0f7f, 0x0c7f, 0x147f, 0x137f, + 0x157f, 0x007c, 0x64c2, 0x650a, 0x6532, 0x65cd, 0x65fd, 0x6605, + 0x662c, 0x663d, 0x664e, 0x6656, 0x666e, 0x6656, 0x66d9, 0x663d, + 0x66fa, 0x6702, 0x664e, 0x6702, 0x6713, 0x645a, 0x645a, 0x645a, + 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, + 0x6eef, 0x6f14, 0x6f29, 0x6f4c, 0x6f6d, 0x662c, 0x645a, 0x662c, + 0x6656, 0x645a, 0x6532, 0x65cd, 0x645a, 0x749c, 0x6656, 0x645a, + 0x74bc, 0x6656, 0x645a, 0x645a, 0x64bd, 0x646b, 0x645a, 0x74e1, + 0x7558, 0x7640, 0x645a, 0x7651, 0x6626, 0x766d, 0x645a, 0x6f82, + 0x645a, 0x645a, 0x1078, 0x1332, 0x2100, 0x1079, 0x6465, 0x0f7f, + 0x0c7f, 0x147f, 0x137f, 0x157f, 0x007c, 0x6469, 0x6469, 0x6469, + 0x649f, 0x1078, 0x1332, 0x0d7e, 0x20a1, 0x020b, 0x1078, 0x6731, + 0x7810, 0x2068, 0x20a3, 0x2414, 0x20a3, 0x0018, 0x20a3, 0x0800, + 0x683c, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x6850, 0x20a2, 0x6854, 0x20a2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x0018, 0x1078, 0x6dfb, 0x0d7f, 0x007c, + 0x0d7e, 0x7818, 0x2068, 0x68a0, 0xa082, 0x007e, 0x0048, 0x649c, + 0xa085, 0x0001, 0x0d7f, 0x007c, 0xa006, 0x0078, 0x649a, 0x0d7e, + 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x0500, 0x20a3, 0x0000, + 0x7810, 0xa0e8, 0x000f, 0x6808, 0x20a2, 0x680c, 0x20a2, 0x6810, + 0x20a2, 0x6814, 0x20a2, 0x6818, 0x20a2, 0x681c, 0x20a2, 0x60c3, + 0x0010, 0x1078, 0x6dfb, 0x0d7f, 0x007c, 0x6030, 0x609a, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x5200, + 0x20a3, 0x0000, 0x0d7e, 0x2069, 0xa752, 0x6804, 0xd084, 0x0040, + 0x64dc, 0x6828, 0x20a3, 0x0000, 0x017e, 0x1078, 0x2564, 0x21a2, + 0x017f, 0x0d7f, 0x0078, 0x64e1, 0x0d7f, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a9, 0x0004, 0x2099, 0xa705, 0x53a6, 0x20a9, 0x0004, + 0x2099, 0xa701, 0x53a6, 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, + 0x007f, 0x0048, 0x64fb, 0x2001, 0xa71b, 0x20a6, 0x2001, 0xa71c, + 0x20a6, 0x0078, 0x6501, 0x20a3, 0x0000, 0x6030, 0xa084, 0x00ff, + 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x0500, + 0x20a3, 0x0000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, 0x007f, + 0x0048, 0x6522, 0x2001, 0xa71b, 0x20a6, 0x2001, 0xa71c, 0x20a6, + 0x0078, 0x6528, 0x20a3, 0x0000, 0x6030, 0xa084, 0x00ff, 0x20a2, + 0x20a9, 0x0004, 0x2099, 0xa705, 0x53a6, 0x60c3, 0x0010, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x0c7e, 0x7818, + 0x2060, 0x2001, 0x0000, 0x1078, 0x4972, 0x0c7f, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa086, 0x007e, 0x00c0, 0x654d, 0x20a3, 0x0400, + 0x620c, 0xc2b4, 0x620e, 0x0078, 0x654f, 0x20a3, 0x0300, 0x20a3, + 0x0000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa086, 0x007e, 0x00c0, + 0x659c, 0x2099, 0xa98d, 0x33a6, 0x9398, 0x33a6, 0x9398, 0x3304, + 0xa084, 0x3fff, 0x20a2, 0x9398, 0x33a6, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, 0x0004, 0x2099, + 0xa705, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xa701, 0x53a6, 0x20a9, + 0x0010, 0x20a3, 0x0000, 0x00f0, 0x6579, 0x2099, 0xa995, 0x3304, + 0xc0dd, 0x20a2, 0x2001, 0xa772, 0x2004, 0xd0e4, 0x0040, 0x6594, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x9398, 0x9398, 0x9398, 0x33a6, + 0x20a9, 0x0004, 0x0078, 0x6596, 0x20a9, 0x0007, 0x20a3, 0x0000, + 0x00f0, 0x6596, 0x0078, 0x65bc, 0x2099, 0xa98d, 0x20a9, 0x0008, + 0x53a6, 0x20a9, 0x0004, 0x2099, 0xa705, 0x53a6, 0x20a9, 0x0004, + 0x2099, 0xa701, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x00f0, + 0x65ad, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x00f0, 0x65b3, 0x2099, + 0xa995, 0x20a9, 0x0008, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, + 0x00f0, 0x65be, 0x20a9, 0x000a, 0x20a3, 0x0000, 0x00f0, 0x65c4, + 0x60c3, 0x0074, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x2010, 0x20a3, 0x0014, 0x20a3, 0x0800, 0x20a3, + 0x2000, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x0f7e, + 0x2079, 0xa752, 0x7904, 0x0f7f, 0xd1ac, 0x00c0, 0x65e9, 0xa085, + 0x0020, 0xd1a4, 0x0040, 0x65ee, 0xa085, 0x0010, 0xa085, 0x0002, + 0x0d7e, 0x0078, 0x66b7, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x5000, 0x0078, 0x654f, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x2110, 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, + 0x1078, 0x67b9, 0x0078, 0x6630, 0x20a1, 0x020b, 0x1078, 0x67c2, + 0x20a3, 0x0200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0004, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, + 0x2a00, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, + 0x1078, 0x67c2, 0x20a3, 0x0200, 0x0078, 0x654f, 0x20a1, 0x020b, + 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0xa005, + 0x0040, 0x6665, 0x20a2, 0x0078, 0x6667, 0x20a3, 0x0003, 0x7810, + 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x0d7e, 0x20a1, + 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0210, 0x20a3, 0x0014, 0x20a3, + 0x0800, 0x7818, 0x2068, 0x6894, 0xa086, 0x0014, 0x00c0, 0x6694, + 0x6998, 0xa184, 0xc000, 0x00c0, 0x6690, 0xd1ec, 0x0040, 0x668c, + 0x20a3, 0x2100, 0x0078, 0x6696, 0x20a3, 0x0100, 0x0078, 0x6696, + 0x20a3, 0x0400, 0x0078, 0x6696, 0x20a3, 0x0700, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x0f7e, 0x2079, 0xa752, 0x7904, + 0x0f7f, 0xd1ac, 0x00c0, 0x66a6, 0xa085, 0x0020, 0xd1a4, 0x0040, + 0x66ab, 0xa085, 0x0010, 0x2009, 0xa774, 0x210c, 0xd184, 0x0040, + 0x66b5, 0x699c, 0xd18c, 0x0040, 0x66b7, 0xa085, 0x0002, 0x027e, + 0x2009, 0xa772, 0x210c, 0xd1e4, 0x0040, 0x66c5, 0xc0c5, 0xa094, + 0x0030, 0xa296, 0x0010, 0x0040, 0x66cf, 0xd1ec, 0x0040, 0x66cf, + 0xa094, 0x0030, 0xa296, 0x0010, 0x0040, 0x66cf, 0xc0bd, 0x027f, + 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x0d7f, + 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0210, 0x20a3, + 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0200, + 0x0078, 0x64c8, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, 0x2a00, 0x60c3, 0x0008, + 0x1078, 0x6dfb, 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a1, + 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, + 0x000b, 0x20a3, 0x0000, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, + 0x027e, 0x037e, 0x047e, 0x2019, 0x3200, 0x2021, 0x0800, 0x0078, + 0x6738, 0x027e, 0x037e, 0x047e, 0x2019, 0x2200, 0x2021, 0x0100, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2014, + 0xa286, 0x007e, 0x00c0, 0x674b, 0xa385, 0x00ff, 0x20a2, 0x20a3, + 0xfffe, 0x0078, 0x6780, 0xa286, 0x007f, 0x00c0, 0x6757, 0x0d7e, + 0xa385, 0x00ff, 0x20a2, 0x20a3, 0xfffd, 0x0078, 0x676e, 0xd2bc, + 0x0040, 0x6776, 0xa286, 0x0080, 0x0d7e, 0x00c0, 0x6766, 0xa385, + 0x00ff, 0x20a2, 0x20a3, 0xfffc, 0x0078, 0x676e, 0xa2e8, 0xa835, + 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6784, 0x0d7e, 0xa2e8, + 0xa835, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0xa485, 0x0029, 0x20a2, 0x047f, + 0x037f, 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, + 0x2fa2, 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, + 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a3, 0x02ff, + 0x2011, 0xfffc, 0x22a2, 0x0d7e, 0x2069, 0xa71b, 0x2da6, 0x8d68, + 0x2da6, 0x0d7f, 0x20a3, 0x2029, 0x20a3, 0x0000, 0x0078, 0x678b, + 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0xfc02, 0x20a3, 0x0000, + 0x007c, 0x027e, 0x037e, 0x047e, 0x2019, 0x3300, 0x2021, 0x0800, + 0x0078, 0x67c9, 0x027e, 0x037e, 0x047e, 0x2019, 0x2300, 0x2021, + 0x0100, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa092, 0x007e, 0x0048, 0x67e6, 0x0d7e, 0xa0e8, 0xa835, + 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x67f4, 0x0d7e, 0xa0e8, + 0xa835, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0xa485, 0x0098, 0x20a2, 0x20a3, + 0x0000, 0x047f, 0x037f, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, + 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, + 0x007c, 0x0c7e, 0x0f7e, 0x6004, 0xa08a, 0x0085, 0x1048, 0x1332, + 0xa08a, 0x008c, 0x10c8, 0x1332, 0x6118, 0x2178, 0x79a0, 0xd1bc, + 0x0040, 0x6827, 0x7900, 0xd1f4, 0x0040, 0x6823, 0x7914, 0xa18c, + 0x00ff, 0x0078, 0x682c, 0x2009, 0x0000, 0x0078, 0x682c, 0xa1f8, + 0x29c0, 0x2f0c, 0xa18c, 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, + 0xa082, 0x0085, 0x1079, 0x6837, 0x0f7f, 0x0c7f, 0x007c, 0x6840, + 0x684b, 0x6866, 0x683e, 0x683e, 0x683e, 0x6840, 0x1078, 0x1332, + 0x147e, 0x20a1, 0x020b, 0x1078, 0x6879, 0x60c3, 0x0000, 0x1078, + 0x6dfb, 0x147f, 0x007c, 0x147e, 0x20a1, 0x020b, 0x1078, 0x68ad, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, 0x20a2, 0x7810, 0x20a2, + 0x20a3, 0x0000, 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x147f, 0x007c, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x68ee, 0x20a3, 0x0003, 0x20a3, 0x0300, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0004, 0x1078, 0x6dfb, 0x147f, + 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa092, 0x007e, 0x0048, 0x6898, 0x0d7e, 0xa0e8, + 0xa835, 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xa71b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x68a7, + 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, + 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, + 0x0009, 0x20a3, 0x0000, 0x0078, 0x678b, 0x027e, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa092, 0x007e, + 0x0048, 0x68cc, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, + 0x8400, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, 0x2da6, 0x8d68, + 0x2da6, 0x0d7f, 0x0078, 0x68db, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, + 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, + 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0099, 0x20a3, 0x0000, 0x1078, + 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x7a10, 0x22a2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, 0x007c, 0x027e, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa092, + 0x007e, 0x0048, 0x690d, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, + 0xa085, 0x8500, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, 0x2da6, + 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x691c, 0x0d7e, 0xa0e8, 0xa835, + 0x2d6c, 0x6810, 0xa085, 0x8500, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0099, 0x20a3, 0x0000, + 0x0078, 0x68df, 0x0c7e, 0x0f7e, 0x2c78, 0x7804, 0xa08a, 0x0040, + 0x1048, 0x1332, 0xa08a, 0x0053, 0x10c8, 0x1332, 0x7918, 0x2160, + 0x61a0, 0xd1bc, 0x0040, 0x6941, 0x6100, 0xd1f4, 0x0040, 0x693d, + 0x6114, 0xa18c, 0x00ff, 0x0078, 0x6946, 0x2009, 0x0000, 0x0078, + 0x6946, 0xa1e0, 0x29c0, 0x2c0c, 0xa18c, 0x00ff, 0x2061, 0x0100, + 0x619a, 0xa082, 0x0040, 0x1079, 0x6950, 0x0f7f, 0x0c7f, 0x007c, + 0x6965, 0x6a73, 0x6a14, 0x6c27, 0x6963, 0x6963, 0x6963, 0x6963, + 0x6963, 0x6963, 0x6963, 0x714c, 0x715d, 0x716e, 0x717f, 0x6963, + 0x767e, 0x6963, 0x713b, 0x1078, 0x1332, 0x0d7e, 0x157e, 0x147e, + 0x780b, 0xffff, 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7910, 0x2168, + 0x6948, 0x7922, 0x21a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x694c, + 0xa184, 0x000f, 0x00c0, 0x6980, 0x2001, 0x0005, 0x0078, 0x698a, + 0xd184, 0x0040, 0x6987, 0x2001, 0x0004, 0x0078, 0x698a, 0xa084, + 0x0006, 0x8004, 0x017e, 0x2008, 0x7830, 0xa084, 0x00ff, 0x8007, + 0xa105, 0x017f, 0x20a2, 0xd1ac, 0x0040, 0x699a, 0x20a3, 0x0002, + 0x0078, 0x69a6, 0xd1b4, 0x0040, 0x69a1, 0x20a3, 0x0001, 0x0078, + 0x69a6, 0x20a3, 0x0000, 0x2230, 0x0078, 0x69a8, 0x6a80, 0x6e7c, + 0x20a9, 0x0008, 0xad80, 0x0017, 0x200c, 0x810f, 0x21a2, 0x8000, + 0x00f0, 0x69ac, 0x22a2, 0x26a2, 0x60c3, 0x0020, 0x20e1, 0x9080, + 0x6014, 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, 0x2001, 0xa9cd, + 0x2003, 0x07d0, 0x2001, 0xa9cc, 0x2003, 0x0009, 0x2001, 0xa9d2, + 0x2003, 0x0002, 0x1078, 0x158c, 0x147f, 0x157f, 0x0d7f, 0x007c, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7a18, 0xa280, 0x0023, 0x2014, + 0x8210, 0xa294, 0x00ff, 0x2202, 0x8217, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x69f6, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, + 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6a05, 0x0d7e, 0xa0e8, + 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6130, 0x21a2, 0x20a3, 0x0829, 0x20a3, + 0x0000, 0x22a2, 0x20a3, 0x0000, 0x2fa2, 0x20a3, 0xffff, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x007c, 0x0d7e, 0x157e, 0x137e, 0x147e, + 0x20a1, 0x020b, 0x1078, 0x6a34, 0x7810, 0x2068, 0x6860, 0x20a2, + 0x685c, 0x20a2, 0x6880, 0x20a2, 0x687c, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x147f, + 0x137f, 0x157f, 0x0d7f, 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x0040, 0x6a52, + 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0500, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xa71b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, + 0x0078, 0x6a61, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, + 0x0500, 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, + 0x22a2, 0x20a3, 0x0889, 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, + 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x027f, 0x007c, 0x0d7e, 0x157e, 0x137e, 0x147e, 0x7810, + 0xa0ec, 0xf000, 0x0040, 0x6a8b, 0xa06d, 0x1078, 0x495f, 0x0040, + 0x6a8b, 0x684c, 0xa084, 0x2020, 0xa086, 0x2020, 0x00c0, 0x6a8b, + 0x7824, 0xc0cd, 0x7826, 0x20a1, 0x020b, 0x1078, 0x6be0, 0xa016, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x7810, 0xa084, 0xf000, + 0x00c0, 0x6aa2, 0x7810, 0xa084, 0x0700, 0x8007, 0x1079, 0x6aaa, + 0x0078, 0x6aa5, 0xa006, 0x1079, 0x6aaa, 0x147f, 0x137f, 0x157f, + 0x0d7f, 0x007c, 0x6ab4, 0x6b4c, 0x6b57, 0x6b81, 0x6b95, 0x6bb1, + 0x6bbc, 0x6ab2, 0x1078, 0x1332, 0x017e, 0x037e, 0x694c, 0xa18c, + 0x0003, 0x0040, 0x6abf, 0xa186, 0x0003, 0x00c0, 0x6ace, 0x6b78, + 0x7824, 0xd0cc, 0x0040, 0x6ac5, 0xc3e5, 0x23a2, 0x6868, 0x20a2, + 0x6864, 0x20a2, 0x037f, 0x017f, 0x0078, 0x6b8c, 0xa186, 0x0001, + 0x10c0, 0x1332, 0x6b78, 0x7824, 0xd0cc, 0x0040, 0x6ad8, 0xc3e5, + 0x23a2, 0x6868, 0x20a2, 0x6864, 0x20a2, 0x22a2, 0x6874, 0x20a2, + 0x22a2, 0x687c, 0x20a2, 0x2009, 0x0018, 0xa384, 0x0300, 0x0040, + 0x6b46, 0xd3c4, 0x0040, 0x6aee, 0x687c, 0xa108, 0xd3cc, 0x0040, + 0x6af3, 0x6874, 0xa108, 0x157e, 0x20a9, 0x000d, 0xad80, 0x0020, + 0x201c, 0x831f, 0x23a2, 0x8000, 0x00f0, 0x6af8, 0x157f, 0x22a2, + 0x22a2, 0x22a2, 0xa184, 0x0003, 0x0040, 0x6b46, 0x20a1, 0x020b, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x007e, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x6b26, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, + 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6b35, 0x0d7e, 0xa0e8, + 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x007f, 0x7b24, 0xd3cc, + 0x0040, 0x6b3e, 0x20a3, 0x0889, 0x0078, 0x6b40, 0x20a3, 0x0898, + 0x20a2, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x61c2, 0x037f, + 0x017f, 0x1078, 0x6dfb, 0x007c, 0x2011, 0x0008, 0x7824, 0xd0cc, + 0x0040, 0x6b53, 0xc2e5, 0x22a2, 0xa016, 0x0078, 0x6b8a, 0x2011, + 0x0302, 0x7824, 0xd0cc, 0x0040, 0x6b5e, 0xc2e5, 0x22a2, 0xa016, + 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x0012, 0x22a2, 0x20a3, 0x0008, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x7000, 0x20a3, 0x0500, + 0x22a2, 0x20a3, 0x000a, 0x22a2, 0x22a2, 0x20a3, 0x2500, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0032, 0x1078, 0x6dfb, + 0x007c, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x0040, 0x6b88, 0xc2e5, + 0x22a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, + 0x60c3, 0x0018, 0x1078, 0x6dfb, 0x007c, 0x2011, 0x0100, 0x7824, + 0xd0cc, 0x0040, 0x6b9c, 0xc2e5, 0x22a2, 0xa016, 0x22a2, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x0008, 0x22a2, 0x7834, 0xa084, + 0x00ff, 0x20a2, 0x22a2, 0x22a2, 0x60c3, 0x0020, 0x1078, 0x6dfb, + 0x007c, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0040, 0x6bb8, 0xc2e5, + 0x22a2, 0xa016, 0x0078, 0x6b8a, 0x037e, 0x7b10, 0xa384, 0xff00, + 0x7812, 0xa384, 0x00ff, 0x8001, 0x00c0, 0x6bcf, 0x7824, 0xd0cc, + 0x0040, 0x6bcb, 0xc2e5, 0x22a2, 0x037f, 0x0078, 0x6b8a, 0x047e, + 0x2021, 0x0800, 0x007e, 0x7824, 0xd0cc, 0x007f, 0x0040, 0x6bd9, + 0xc4e5, 0x24a2, 0x047f, 0x22a2, 0x20a2, 0x037f, 0x0078, 0x6b8c, + 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x6bfe, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, + 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6c0d, 0x0d7e, 0xa0e8, + 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x7824, 0xd0cc, 0x0040, + 0x6c15, 0x20a3, 0x0889, 0x0078, 0x6c17, 0x20a3, 0x0898, 0x20a3, + 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, + 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, 0x007c, 0x0d7e, + 0x157e, 0x137e, 0x147e, 0x017e, 0x037e, 0x7810, 0xa084, 0x0700, + 0x8007, 0x1079, 0x6c3a, 0x037f, 0x017f, 0x147f, 0x137f, 0x157f, + 0x0d7f, 0x007c, 0x6c42, 0x6c42, 0x6c44, 0x6c42, 0x6c42, 0x6c42, + 0x6c69, 0x6c42, 0x1078, 0x1332, 0x7910, 0xa18c, 0xf8ff, 0xa18d, + 0x0600, 0x7912, 0x20a1, 0x020b, 0x2009, 0x0003, 0x1078, 0x6c73, + 0x0d7e, 0x2069, 0xa752, 0x6804, 0xd0bc, 0x0040, 0x6c5e, 0x682c, + 0xa084, 0x00ff, 0x8007, 0x20a2, 0x0078, 0x6c60, 0x20a3, 0x3f00, + 0x0d7f, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0001, 0x1078, 0x6dfb, + 0x007c, 0x20a1, 0x020b, 0x2009, 0x0003, 0x1078, 0x6c73, 0x20a3, + 0x7f00, 0x0078, 0x6c61, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x7818, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x0040, 0x6c91, 0x0d7e, + 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0100, 0x20a2, 0x6814, + 0x20a2, 0x2069, 0xa71b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, + 0x6ca0, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, 0x6810, 0xa085, 0x0100, + 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, + 0x20a3, 0x0888, 0xa18d, 0x0008, 0x21a2, 0x1078, 0x6dea, 0x22a2, + 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x027f, 0x007c, 0x0e7e, 0x0d7e, 0x0c7e, 0x057e, 0x047e, + 0x037e, 0x2061, 0x0100, 0x2071, 0xa700, 0x6130, 0x7818, 0x2068, + 0x68a0, 0x2028, 0xd0bc, 0x00c0, 0x6cca, 0x6910, 0x6a14, 0x6430, + 0x0078, 0x6cce, 0x6910, 0x6a14, 0x736c, 0x7470, 0x781c, 0xa086, + 0x0006, 0x0040, 0x6d2d, 0xd5bc, 0x0040, 0x6cde, 0xa185, 0x0100, + 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, 0x6ce5, 0xa185, 0x0100, + 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x6073, 0x0809, 0x6077, + 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, 0x7810, 0x2070, + 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, + 0x686c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xa582, 0x0080, 0x0048, 0x6d17, 0x6a00, 0xd2f4, 0x0040, 0x6d15, + 0x6a14, 0xa294, 0x00ff, 0x0078, 0x6d17, 0x2011, 0x0000, 0x629e, + 0x6017, 0x0016, 0x2009, 0x07d0, 0x60c4, 0xa084, 0xfff0, 0xa005, + 0x0040, 0x6d24, 0x2009, 0x1b58, 0x1078, 0x5ad0, 0x037f, 0x047f, + 0x057f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0x7810, 0x2070, 0x704c, + 0xa084, 0x0003, 0xa086, 0x0002, 0x0040, 0x6d85, 0xd5bc, 0x0040, + 0x6d41, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, + 0x6d48, 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, + 0x6073, 0x0880, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, + 0x688e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, + 0x6082, 0x7060, 0x608a, 0x705c, 0x608e, 0x7080, 0x60c6, 0x707c, + 0x60ca, 0x707c, 0x792c, 0xa108, 0x792e, 0x7080, 0x7928, 0xa109, + 0x792a, 0x686c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, + 0x0000, 0xa582, 0x0080, 0x0048, 0x6d80, 0x6a00, 0xd2f4, 0x0040, + 0x6d7e, 0x6a14, 0xa294, 0x00ff, 0x0078, 0x6d80, 0x2011, 0x0000, + 0x629e, 0x6017, 0x0012, 0x0078, 0x6d1a, 0xd5bc, 0x0040, 0x6d90, + 0xa185, 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, 0x6d97, + 0xa185, 0x0700, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x1078, + 0x495f, 0x0040, 0x6dad, 0x0d7e, 0x7810, 0xa06d, 0x684c, 0x0d7f, + 0xa084, 0x2020, 0xa086, 0x2020, 0x00c0, 0x6dad, 0x7824, 0xc0cd, + 0x7826, 0x6073, 0x0889, 0x0078, 0x6daf, 0x6073, 0x0898, 0x6077, + 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0x7014, 0x608a, + 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, 0x686c, 0x60ce, + 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, 0x0080, + 0x0048, 0x6ddd, 0x6a00, 0xd2f4, 0x0040, 0x6ddb, 0x6a14, 0xa294, + 0x00ff, 0x0078, 0x6ddd, 0x2011, 0x0000, 0x629e, 0x7824, 0xd0cc, + 0x0040, 0x6de6, 0x6017, 0x0016, 0x0078, 0x6d1a, 0x6017, 0x0012, + 0x0078, 0x6d1a, 0x7a18, 0xa280, 0x0023, 0x2014, 0x8210, 0xa294, + 0x00ff, 0x2202, 0x8217, 0x007c, 0x0d7e, 0x2069, 0xa9b1, 0x6843, + 0x0001, 0x0d7f, 0x007c, 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x1078, 0x6e06, 0x1078, 0x5ac0, 0x007c, 0x007e, 0x6014, + 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, 0x007f, 0x007c, 0x007e, + 0x0c7e, 0x2061, 0x0100, 0x6014, 0xa084, 0x0004, 0xa085, 0x0008, + 0x6016, 0x0c7f, 0x007f, 0x007c, 0x0c7e, 0x0d7e, 0x017e, 0x027e, + 0x2061, 0x0100, 0x2069, 0x0140, 0x6904, 0xa194, 0x4000, 0x0040, + 0x6e59, 0x1078, 0x6e0f, 0x6803, 0x1000, 0x6803, 0x0000, 0x0c7e, + 0x2061, 0xa9b1, 0x6128, 0xa192, 0x00c8, 0x00c8, 0x6e44, 0x8108, + 0x612a, 0x6124, 0x0c7f, 0x81ff, 0x0040, 0x6e54, 0x1078, 0x5ac0, + 0x1078, 0x6e06, 0x0078, 0x6e54, 0x6124, 0xa1e5, 0x0000, 0x0040, + 0x6e51, 0x1078, 0xa5d4, 0x1078, 0x5acb, 0x2009, 0x0014, 0x1078, + 0x775c, 0x0c7f, 0x0078, 0x6e54, 0x027f, 0x017f, 0x0d7f, 0x0c7f, + 0x007c, 0x2001, 0xa9cd, 0x2004, 0xa005, 0x00c0, 0x6e54, 0x0c7e, + 0x2061, 0xa9b1, 0x6128, 0xa192, 0x0003, 0x00c8, 0x6e44, 0x8108, + 0x612a, 0x0c7f, 0x1078, 0x5ac0, 0x1078, 0x4224, 0x0078, 0x6e54, + 0x0c7e, 0x0d7e, 0x0e7e, 0x017e, 0x027e, 0x1078, 0x5ad8, 0x2071, + 0xa9b1, 0x713c, 0x81ff, 0x0040, 0x6e9a, 0x2061, 0x0100, 0x2069, + 0x0140, 0x6904, 0xa194, 0x4000, 0x0040, 0x6ea0, 0x6803, 0x1000, + 0x6803, 0x0000, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x037f, + 0x713c, 0x2160, 0x1078, 0xa5d4, 0x2009, 0x004a, 0x1078, 0x775c, + 0x0078, 0x6e9a, 0x027f, 0x017f, 0x0e7f, 0x0d7f, 0x0c7f, 0x007c, + 0x0078, 0x6e8a, 0x0e7e, 0x2071, 0xa9b1, 0x7048, 0xd084, 0x0040, + 0x6ebc, 0x713c, 0x81ff, 0x0040, 0x6ebc, 0x2071, 0x0100, 0xa188, + 0x0007, 0x210c, 0xa18e, 0x0006, 0x00c0, 0x6eba, 0x7017, 0x0012, + 0x0078, 0x6ebc, 0x7017, 0x0016, 0x0e7f, 0x007c, 0x0e7e, 0x0d7e, + 0x0c7e, 0x067e, 0x057e, 0x047e, 0x007e, 0x127e, 0x2091, 0x8000, + 0x6018, 0x2068, 0x6ca0, 0x2071, 0xa9b1, 0x7018, 0x2068, 0x8dff, + 0x0040, 0x6ee6, 0x68a0, 0xa406, 0x0040, 0x6eda, 0x6854, 0x2068, + 0x0078, 0x6ecf, 0x6010, 0x2060, 0x643c, 0x6540, 0x6648, 0x2d60, + 0x1078, 0x4736, 0x0040, 0x6ee6, 0xa085, 0x0001, 0x127f, 0x007f, + 0x047f, 0x057f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0x20a1, + 0x020b, 0x1078, 0x6731, 0x20a3, 0x1200, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x781c, 0xa086, 0x0004, 0x00c0, 0x6f01, 0x6098, 0x0078, + 0x6f02, 0x6030, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a9, + 0x0010, 0xa006, 0x20a2, 0x00f0, 0x6f0a, 0x20a2, 0x20a2, 0x60c3, + 0x002c, 0x1078, 0x6dfb, 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, + 0x1078, 0x6731, 0x20a3, 0x0f00, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x7808, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x147f, 0x157f, + 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, + 0x0200, 0x20a3, 0x0000, 0x20a9, 0x0006, 0x2011, 0xa740, 0x2019, + 0xa741, 0x23a6, 0x22a6, 0xa398, 0x0002, 0xa290, 0x0002, 0x00f0, + 0x6f39, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, 0x1078, + 0x6dfb, 0x147f, 0x157f, 0x007c, 0x157e, 0x147e, 0x017e, 0x027e, + 0x20a1, 0x020b, 0x1078, 0x6799, 0x1078, 0x67b0, 0x7810, 0xa080, + 0x0000, 0x2004, 0xa080, 0x0015, 0x2098, 0x7808, 0xa088, 0x0002, + 0x21a8, 0x53a6, 0xa080, 0x0004, 0x8003, 0x60c2, 0x1078, 0x6dfb, + 0x027f, 0x017f, 0x147f, 0x157f, 0x007c, 0x157e, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x6731, 0x20a3, 0x6200, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x7808, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x147f, + 0x157f, 0x007c, 0x157e, 0x147e, 0x017e, 0x027e, 0x20a1, 0x020b, + 0x1078, 0x6731, 0x7810, 0xa080, 0x0000, 0x2004, 0xa080, 0x0017, + 0x2098, 0x7808, 0xa088, 0x0002, 0x21a8, 0x53a6, 0x8003, 0x60c2, + 0x1078, 0x6dfb, 0x027f, 0x017f, 0x147f, 0x157f, 0x007c, 0x0e7e, + 0x0c7e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa9b1, 0x700c, + 0x2060, 0x8cff, 0x0040, 0x6fbb, 0x1078, 0x8f10, 0x00c0, 0x6fb2, + 0x1078, 0x7c83, 0x600c, 0x007e, 0x1078, 0x772d, 0x1078, 0x7233, + 0x0c7f, 0x0078, 0x6fa9, 0x700f, 0x0000, 0x700b, 0x0000, 0x127f, + 0x007f, 0x0c7f, 0x0e7f, 0x007c, 0x127e, 0x157e, 0x0f7e, 0x0e7e, + 0x0d7e, 0x0c7e, 0x027e, 0x017e, 0x007e, 0x2091, 0x8000, 0x2069, + 0x0100, 0x2079, 0x0140, 0x2071, 0xa9b1, 0x7024, 0x2060, 0x8cff, + 0x0040, 0x7014, 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x5acb, + 0x2009, 0x0013, 0x1078, 0x775c, 0x20a9, 0x01f4, 0x6824, 0xd094, + 0x0040, 0x6ff7, 0x6827, 0x0004, 0x7804, 0xa084, 0x4000, 0x0040, + 0x7009, 0x7803, 0x1000, 0x7803, 0x0000, 0x0078, 0x7009, 0xd084, + 0x0040, 0x6ffe, 0x6827, 0x0001, 0x0078, 0x7000, 0x00f0, 0x6fe6, + 0x7804, 0xa084, 0x1000, 0x0040, 0x7009, 0x7803, 0x0100, 0x7803, + 0x0000, 0x6824, 0x007f, 0x017f, 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, + 0x0f7f, 0x157f, 0x127f, 0x007c, 0x2001, 0xa700, 0x2004, 0xa096, + 0x0001, 0x0040, 0x704e, 0xa096, 0x0004, 0x0040, 0x704e, 0x1078, + 0x5acb, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0x20a9, 0x01f4, 0x6824, 0xd094, 0x0040, 0x703c, 0x6827, + 0x0004, 0x7804, 0xa084, 0x4000, 0x0040, 0x704e, 0x7803, 0x1000, + 0x7803, 0x0000, 0x0078, 0x704e, 0xd084, 0x0040, 0x7043, 0x6827, + 0x0001, 0x0078, 0x7045, 0x00f0, 0x702b, 0x7804, 0xa084, 0x1000, + 0x0040, 0x704e, 0x7803, 0x0100, 0x7803, 0x0000, 0x007f, 0x017f, + 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x157f, 0x127f, 0x007c, + 0x127e, 0x157e, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x027e, 0x017e, + 0x007e, 0x2091, 0x8000, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, + 0xa9b1, 0x703c, 0x2060, 0x8cff, 0x0040, 0x70d6, 0x68af, 0x95f5, + 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x00c0, 0x7074, 0x68c7, + 0x0000, 0x68cb, 0x0008, 0x1078, 0x5ad8, 0x1078, 0x1f7e, 0x047e, + 0x057e, 0x2009, 0x017f, 0x212c, 0x200b, 0x00a5, 0x2021, 0x0169, + 0x2404, 0xa084, 0x000f, 0xa086, 0x0004, 0x00c0, 0x70a5, 0x68c7, + 0x0000, 0x68cb, 0x0008, 0x0e7e, 0x0f7e, 0x2079, 0x0020, 0x2071, + 0xaa08, 0x6814, 0xa084, 0x0004, 0xa085, 0x0012, 0x6816, 0x7803, + 0x0008, 0x7003, 0x0000, 0x0f7f, 0x0e7f, 0x250a, 0x057f, 0x047f, + 0xa39d, 0x0000, 0x00c0, 0x70b0, 0x2009, 0x0049, 0x1078, 0x775c, + 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0040, 0x70c3, 0x6827, 0x0004, + 0x7804, 0xa084, 0x4000, 0x0040, 0x70d5, 0x7803, 0x1000, 0x7803, + 0x0000, 0x0078, 0x70d5, 0xd08c, 0x0040, 0x70ca, 0x6827, 0x0002, + 0x0078, 0x70cc, 0x00f0, 0x70b2, 0x7804, 0xa084, 0x1000, 0x0040, + 0x70d5, 0x7803, 0x0100, 0x7803, 0x0000, 0x6824, 0x007f, 0x017f, + 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x157f, 0x127f, 0x007c, + 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2069, 0xa9b1, 0x6a06, 0x127f, + 0x0d7f, 0x007c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2069, 0xa9b1, + 0x6a32, 0x127f, 0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, 0x067e, + 0x007e, 0x127e, 0x2071, 0xa9b1, 0x7614, 0x2660, 0x2678, 0x2091, + 0x8000, 0x8cff, 0x0040, 0x7134, 0x601c, 0xa206, 0x00c0, 0x712f, + 0x7014, 0xac36, 0x00c0, 0x710e, 0x660c, 0x7616, 0x7010, 0xac36, + 0x00c0, 0x711c, 0x2c00, 0xaf36, 0x0040, 0x711a, 0x2f00, 0x7012, + 0x0078, 0x711c, 0x7013, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, + 0x0040, 0x7125, 0x7e0e, 0x0078, 0x7126, 0x2678, 0x600f, 0x0000, + 0x1078, 0x8ed6, 0x1078, 0x7233, 0x0c7f, 0x0078, 0x7101, 0x2c78, + 0x600c, 0x2060, 0x0078, 0x7101, 0x127f, 0x007f, 0x067f, 0x0c7f, + 0x0e7f, 0x0f7f, 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, 0x1078, + 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, + 0x20a3, 0x1000, 0x0078, 0x718e, 0x157e, 0x147e, 0x20a1, 0x020b, + 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, 0x20a2, + 0x20a2, 0x20a3, 0x4000, 0x0078, 0x718e, 0x157e, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, + 0x20a2, 0x20a2, 0x20a3, 0x2000, 0x0078, 0x718e, 0x157e, 0x147e, + 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0400, 0x0078, 0x718e, 0x157e, + 0x147e, 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0200, 0x1078, 0x723e, + 0x60c3, 0x0020, 0x1078, 0x6dfb, 0x147f, 0x157f, 0x007c, 0x127e, + 0x0c7e, 0x2091, 0x8000, 0x2061, 0x0100, 0x6120, 0xd1b4, 0x00c0, + 0x71a6, 0xd1bc, 0x00c0, 0x71f0, 0x0078, 0x7230, 0x2009, 0x017f, + 0x200b, 0x00a1, 0x157e, 0x007e, 0x0d7e, 0x2069, 0x0140, 0x20a9, + 0x001e, 0x2009, 0x0169, 0x6804, 0xa084, 0x4000, 0x0040, 0x71e7, + 0x6020, 0xd0b4, 0x0040, 0x71e7, 0x6024, 0xd094, 0x00c0, 0x71e7, + 0x2104, 0xa084, 0x000f, 0xa086, 0x0004, 0x00c0, 0x71e7, 0x00f0, + 0x71b3, 0x027e, 0x6198, 0xa18c, 0x00ff, 0x8107, 0x6130, 0xa18c, + 0x00ff, 0xa10d, 0x6088, 0x628c, 0x618e, 0x608b, 0xbc91, 0x6043, + 0x0001, 0x6043, 0x0000, 0x608a, 0x628e, 0x6024, 0xd094, 0x00c0, + 0x71e6, 0x6a04, 0xa294, 0x4000, 0x00c0, 0x71dd, 0x027f, 0x0d7f, + 0x007f, 0x157f, 0x2009, 0x017f, 0x200b, 0x0000, 0x0078, 0x7230, + 0x2009, 0x017f, 0x200b, 0x00a1, 0x157e, 0x007e, 0x0d7e, 0x2069, + 0x0140, 0x20a9, 0x001e, 0x2009, 0x0169, 0x6804, 0xa084, 0x4000, + 0x0040, 0x7229, 0x6020, 0xd0bc, 0x0040, 0x7229, 0x2104, 0xa084, + 0x000f, 0xa086, 0x0004, 0x00c0, 0x7229, 0x00f0, 0x71fd, 0x027e, + 0x6164, 0xa18c, 0x00ff, 0x8107, 0x6130, 0xa18c, 0x00ff, 0xa10d, + 0x6088, 0x628c, 0x608b, 0xbc91, 0x618e, 0x6043, 0x0001, 0x6043, + 0x0000, 0x608a, 0x628e, 0x6a04, 0xa294, 0x4000, 0x00c0, 0x7223, + 0x027f, 0x0d7f, 0x007f, 0x157f, 0x2009, 0x017f, 0x200b, 0x0000, + 0x0c7f, 0x127f, 0x007c, 0x0e7e, 0x2071, 0xa9b1, 0x7020, 0xa005, + 0x0040, 0x723c, 0x8001, 0x7022, 0x0e7f, 0x007c, 0x20a9, 0x0008, + 0x20a2, 0x00f0, 0x7240, 0x20a2, 0x20a2, 0x007c, 0x0f7e, 0x0e7e, + 0x0d7e, 0x0c7e, 0x077e, 0x067e, 0x007e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa9b1, 0x7614, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, + 0x0040, 0x72e2, 0x8cff, 0x0040, 0x72e2, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x72dd, 0x88ff, 0x0040, 0x726d, 0x2800, 0xac06, 0x00c0, + 0x72dd, 0x2039, 0x0000, 0x0078, 0x7278, 0x6018, 0xa206, 0x00c0, + 0x72dd, 0x85ff, 0x0040, 0x7278, 0x6020, 0xa106, 0x00c0, 0x72dd, + 0x7024, 0xac06, 0x00c0, 0x72a8, 0x2069, 0x0100, 0x68c0, 0xa005, + 0x0040, 0x72a3, 0x1078, 0x5acb, 0x6817, 0x0008, 0x68c3, 0x0000, + 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, 0x2069, 0x0140, 0x6b04, + 0xa384, 0x1000, 0x0040, 0x7298, 0x6803, 0x0100, 0x6803, 0x0000, + 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, 0x72a0, 0x6827, 0x0001, + 0x037f, 0x0078, 0x72a8, 0x6003, 0x0009, 0x630a, 0x0078, 0x72dd, + 0x7014, 0xac36, 0x00c0, 0x72ae, 0x660c, 0x7616, 0x7010, 0xac36, + 0x00c0, 0x72bc, 0x2c00, 0xaf36, 0x0040, 0x72ba, 0x2f00, 0x7012, + 0x0078, 0x72bc, 0x7013, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, + 0x0040, 0x72c5, 0x7e0e, 0x0078, 0x72c6, 0x2678, 0x89ff, 0x00c0, + 0x72d5, 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, + 0x72d3, 0x1078, 0xa1da, 0x1078, 0x8ed6, 0x1078, 0x7233, 0x88ff, + 0x00c0, 0x72ec, 0x0c7f, 0x0078, 0x7257, 0x2c78, 0x600c, 0x2060, + 0x0078, 0x7257, 0xa006, 0x127f, 0x007f, 0x067f, 0x077f, 0x0c7f, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x6017, 0x0000, 0x0c7f, 0xa8c5, + 0x0001, 0x0078, 0x72e3, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, + 0x027e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa9b1, 0x7638, + 0x2660, 0x2678, 0x8cff, 0x0040, 0x7367, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x7362, 0x87ff, 0x0040, 0x7313, 0x2700, 0xac06, 0x00c0, + 0x7362, 0x0078, 0x731e, 0x6018, 0xa206, 0x00c0, 0x7362, 0x85ff, + 0x0040, 0x731e, 0x6020, 0xa106, 0x00c0, 0x7362, 0x703c, 0xac06, + 0x00c0, 0x7332, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x7033, + 0x0000, 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, + 0x0000, 0x037f, 0x7038, 0xac36, 0x00c0, 0x7338, 0x660c, 0x763a, + 0x7034, 0xac36, 0x00c0, 0x7346, 0x2c00, 0xaf36, 0x0040, 0x7344, + 0x2f00, 0x7036, 0x0078, 0x7346, 0x7037, 0x0000, 0x660c, 0x067e, + 0x2c00, 0xaf06, 0x0040, 0x734f, 0x7e0e, 0x0078, 0x7350, 0x2678, + 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x735a, + 0x1078, 0xa1da, 0x1078, 0x8ed6, 0x87ff, 0x00c0, 0x7371, 0x0c7f, + 0x0078, 0x7302, 0x2c78, 0x600c, 0x2060, 0x0078, 0x7302, 0xa006, + 0x127f, 0x007f, 0x027f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, + 0x007c, 0x6017, 0x0000, 0x0c7f, 0xa7bd, 0x0001, 0x0078, 0x7368, + 0x0e7e, 0x2071, 0xa9b1, 0x2001, 0xa700, 0x2004, 0xa086, 0x0002, + 0x00c0, 0x7386, 0x7007, 0x0005, 0x0078, 0x7388, 0x7007, 0x0000, + 0x0e7f, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, 0x067e, 0x027e, 0x007e, + 0x127e, 0x2091, 0x8000, 0x2071, 0xa9b1, 0x2c10, 0x7638, 0x2660, + 0x2678, 0x8cff, 0x0040, 0x73c8, 0x2200, 0xac06, 0x00c0, 0x73c3, + 0x7038, 0xac36, 0x00c0, 0x73a6, 0x660c, 0x763a, 0x7034, 0xac36, + 0x00c0, 0x73b4, 0x2c00, 0xaf36, 0x0040, 0x73b2, 0x2f00, 0x7036, + 0x0078, 0x73b4, 0x7037, 0x0000, 0x660c, 0x2c00, 0xaf06, 0x0040, + 0x73bc, 0x7e0e, 0x0078, 0x73bd, 0x2678, 0x600f, 0x0000, 0xa085, + 0x0001, 0x0078, 0x73c8, 0x2c78, 0x600c, 0x2060, 0x0078, 0x7399, + 0x127f, 0x007f, 0x027f, 0x067f, 0x0c7f, 0x0e7f, 0x0f7f, 0x007c, + 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, 0x007e, 0x127e, 0x2091, + 0x8000, 0x2071, 0xa9b1, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0040, + 0x7469, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x00c0, 0x7464, + 0x7024, 0xac06, 0x00c0, 0x740f, 0x2069, 0x0100, 0x68c0, 0xa005, + 0x0040, 0x743d, 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, + 0x7027, 0x0000, 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0040, 0x7406, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0040, 0x740e, 0x6827, 0x0001, 0x037f, 0x700c, + 0xac36, 0x00c0, 0x7415, 0x660c, 0x760e, 0x7008, 0xac36, 0x00c0, + 0x7423, 0x2c00, 0xaf36, 0x0040, 0x7421, 0x2f00, 0x700a, 0x0078, + 0x7423, 0x700b, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, 0x0040, + 0x742c, 0x7e0e, 0x0078, 0x742d, 0x2678, 0x600f, 0x0000, 0x1078, + 0x8efc, 0x00c0, 0x7441, 0x1078, 0x28a6, 0x1078, 0x8f10, 0x00c0, + 0x745d, 0x1078, 0x7c83, 0x0078, 0x745d, 0x1078, 0x7378, 0x0078, + 0x740f, 0x1078, 0x8f10, 0x00c0, 0x7449, 0x1078, 0x7c83, 0x0078, + 0x745d, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x745d, 0x601c, + 0xa086, 0x0003, 0x00c0, 0x7471, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x8ec9, 0x1078, 0x8ed6, 0x1078, + 0x7233, 0x0c7f, 0x0078, 0x73de, 0x2c78, 0x600c, 0x2060, 0x0078, + 0x73de, 0x127f, 0x007f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, + 0x007c, 0x601c, 0xa086, 0x0006, 0x00c0, 0x745d, 0x1078, 0xa1da, + 0x0078, 0x745d, 0x037e, 0x157e, 0x137e, 0x147e, 0x3908, 0xa006, + 0xa190, 0x0020, 0x221c, 0xa39e, 0x2676, 0x00c0, 0x748b, 0x8210, + 0x8000, 0x0078, 0x7482, 0xa005, 0x0040, 0x7497, 0x20a9, 0x0020, + 0x2198, 0x8211, 0xa282, 0x0020, 0x20c8, 0x20a0, 0x53a3, 0x147f, + 0x137f, 0x157f, 0x037f, 0x007c, 0x0d7e, 0x20a1, 0x020b, 0x1078, + 0x67c2, 0x20a3, 0x0200, 0x20a3, 0x0014, 0x60c3, 0x0014, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x2099, 0xa9a5, 0x20a9, 0x0004, 0x53a6, + 0x20a3, 0x0004, 0x20a3, 0x7878, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x1078, 0x6dfb, 0x0d7f, 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, + 0x20a3, 0x0214, 0x20a3, 0x0018, 0x20a3, 0x0800, 0x7810, 0xa084, + 0xff00, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x7810, 0xa084, 0x00ff, 0x20a2, 0x7828, 0x20a2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x1078, 0x6dfb, + 0x007c, 0x0d7e, 0x017e, 0x2f68, 0x2009, 0x0035, 0x1078, 0x91cc, + 0x00c0, 0x7551, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x1300, + 0x20a3, 0x0000, 0x7828, 0x2068, 0x681c, 0xa086, 0x0003, 0x0040, + 0x752d, 0x7818, 0xa080, 0x0028, 0x2014, 0xa286, 0x007e, 0x00c0, + 0x7507, 0x20a3, 0x00ff, 0x20a3, 0xfffe, 0x0078, 0x7542, 0xa286, + 0x007f, 0x00c0, 0x7511, 0x20a3, 0x00ff, 0x20a3, 0xfffd, 0x0078, + 0x7542, 0xd2bc, 0x0040, 0x7527, 0xa286, 0x0080, 0x00c0, 0x751e, + 0x20a3, 0x00ff, 0x20a3, 0xfffc, 0x0078, 0x7542, 0xa2e8, 0xa835, + 0x2d6c, 0x6810, 0x20a2, 0x6814, 0x20a2, 0x0078, 0x7542, 0x20a3, + 0x0000, 0x6098, 0x20a2, 0x0078, 0x7542, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa082, 0x007e, 0x0048, 0x753e, 0x0d7e, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x7542, 0x20a3, 0x0000, + 0x6030, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x017f, 0x0d7f, + 0x007c, 0x7817, 0x0001, 0x7803, 0x0006, 0x017f, 0x0d7f, 0x007c, + 0x0d7e, 0x027e, 0x7928, 0x2168, 0x691c, 0xa186, 0x0006, 0x0040, + 0x757a, 0xa186, 0x0003, 0x0040, 0x75d5, 0xa186, 0x0005, 0x0040, + 0x75b8, 0xa186, 0x0004, 0x0040, 0x75a8, 0xa186, 0x0008, 0x0040, + 0x75c2, 0x7807, 0x0037, 0x7813, 0x1700, 0x1078, 0x7640, 0x027f, + 0x0d7f, 0x007c, 0x1078, 0x75fd, 0x2009, 0x4000, 0x6800, 0x0079, + 0x7581, 0x7594, 0x75a2, 0x7596, 0x75a2, 0x759d, 0x7594, 0x7594, + 0x75a2, 0x75a2, 0x75a2, 0x75a2, 0x7594, 0x7594, 0x7594, 0x7594, + 0x7594, 0x75a2, 0x7594, 0x75a2, 0x1078, 0x1332, 0x6824, 0xd0e4, + 0x0040, 0x759d, 0xd0cc, 0x0040, 0x75a0, 0xa00e, 0x0078, 0x75a2, + 0x2009, 0x2000, 0x6828, 0x20a2, 0x682c, 0x20a2, 0x0078, 0x75f3, + 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0x6a00, 0xa286, 0x0002, 0x00c0, 0x75b6, 0xa00e, 0x0078, 0x75f3, + 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0x0078, 0x75f3, 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x2009, 0x4000, 0xa286, 0x0005, 0x0040, 0x75d2, 0xa286, 0x0002, + 0x00c0, 0x75d3, 0xa00e, 0x0078, 0x75f3, 0x1078, 0x75fd, 0x6810, + 0x2068, 0x697c, 0x6810, 0xa112, 0x6980, 0x6814, 0xa103, 0x20a2, + 0x22a2, 0x7928, 0xa180, 0x0000, 0x2004, 0xa08e, 0x0002, 0x0040, + 0x75f1, 0xa08e, 0x0004, 0x0040, 0x75f1, 0x2009, 0x4000, 0x0078, + 0x75f3, 0x2009, 0x0000, 0x21a2, 0x20a3, 0x0000, 0x60c3, 0x0018, + 0x1078, 0x6dfb, 0x027f, 0x0d7f, 0x007c, 0x037e, 0x047e, 0x057e, + 0x067e, 0x20a1, 0x020b, 0x1078, 0x67c2, 0xa006, 0x20a3, 0x0200, + 0x20a2, 0x7934, 0x21a2, 0x7938, 0x21a2, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa092, 0x007e, 0x0048, 0x7623, 0x0d7e, 0x2069, 0xa71b, + 0x2d2c, 0x8d68, 0x2d34, 0xa0e8, 0xa835, 0x2d6c, 0x6b10, 0x6c14, + 0x0d7f, 0x0078, 0x7629, 0x2019, 0x0000, 0x6498, 0x2029, 0x0000, + 0x6630, 0x7828, 0xa080, 0x0007, 0x2004, 0xa086, 0x0003, 0x00c0, + 0x7637, 0x25a2, 0x26a2, 0x23a2, 0x24a2, 0x0078, 0x763b, 0x23a2, + 0x24a2, 0x25a2, 0x26a2, 0x067f, 0x057f, 0x047f, 0x037f, 0x007c, + 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0x0009, 0x7810, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, + 0x007c, 0x20a1, 0x020b, 0x1078, 0x6728, 0x20a3, 0x1400, 0x20a3, + 0x0000, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x7828, 0x20a2, 0x782c, + 0x20a2, 0x7830, 0xa084, 0x00ff, 0x8007, 0x20a2, 0x20a3, 0x0000, + 0x60c3, 0x0010, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x67b9, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0x20a2, 0x7810, + 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x7689, 0x60c3, 0x0000, 0x1078, 0x6dfb, 0x147f, + 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x76a6, 0x0d7e, 0xa0e8, 0xa835, 0x2d6c, + 0x6810, 0xa085, 0x0300, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa71b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x76ae, 0x20a3, 0x0300, + 0x6298, 0x22a2, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0819, + 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x2fa2, + 0x7a08, 0x22a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x007c, 0x2061, + 0xae00, 0x2a70, 0x7064, 0x704a, 0x704f, 0xae00, 0x007c, 0x0e7e, + 0x127e, 0x2071, 0xa700, 0x2091, 0x8000, 0x7548, 0xa582, 0x0010, + 0x0048, 0x76f9, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0040, + 0x76e5, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, 0x76e1, 0x0078, + 0x76d4, 0x2061, 0xae00, 0x0078, 0x76d4, 0x6003, 0x0008, 0x8529, + 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, 0x76f5, 0x754e, + 0xa085, 0x0001, 0x127f, 0x0e7f, 0x007c, 0x704f, 0xae00, 0x0078, + 0x76f0, 0xa006, 0x0078, 0x76f2, 0x0e7e, 0x2071, 0xa700, 0x7548, + 0xa582, 0x0010, 0x0048, 0x772a, 0x704c, 0x2060, 0x6000, 0xa086, + 0x0000, 0x0040, 0x7717, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, + 0x7713, 0x0078, 0x7706, 0x2061, 0xae00, 0x0078, 0x7706, 0x6003, + 0x0008, 0x8529, 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, + 0x7726, 0x754e, 0xa085, 0x0001, 0x0e7f, 0x007c, 0x704f, 0xae00, + 0x0078, 0x7722, 0xa006, 0x0078, 0x7724, 0xac82, 0xae00, 0x1048, + 0x1332, 0x2001, 0xa716, 0x2004, 0xac02, 0x10c8, 0x1332, 0xa006, + 0x6006, 0x600a, 0x600e, 0x6012, 0x6016, 0x601a, 0x601f, 0x0000, + 0x6003, 0x0000, 0x6022, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, + 0x603a, 0x603e, 0x2061, 0xa700, 0x6048, 0x8000, 0x604a, 0xa086, + 0x0001, 0x0040, 0x7754, 0x007c, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x0078, 0x7753, 0x601c, 0xa084, 0x000f, 0x0079, + 0x7761, 0x776a, 0x777b, 0x7797, 0x77b3, 0x921e, 0x923a, 0x9256, + 0x776a, 0x777b, 0xa186, 0x0013, 0x00c0, 0x7773, 0x1078, 0x61cd, + 0x1078, 0x62d1, 0x007c, 0xa18e, 0x0047, 0x00c0, 0x777a, 0xa016, + 0x1078, 0x15fa, 0x007c, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, + 0x1332, 0x1079, 0x7785, 0x067f, 0x007c, 0x7795, 0x7b00, 0x7cb2, + 0x7795, 0x7d36, 0x77cf, 0x7795, 0x7795, 0x7a92, 0x80f6, 0x7795, + 0x7795, 0x7795, 0x7795, 0x7795, 0x7795, 0x1078, 0x1332, 0x067e, + 0x6000, 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x77a1, 0x067f, + 0x007c, 0x77b1, 0x87d3, 0x77b1, 0x77b1, 0x77b1, 0x77b1, 0x77b1, + 0x77b1, 0x8776, 0x8961, 0x77b1, 0x8803, 0x8889, 0x8803, 0x8889, + 0x77b1, 0x1078, 0x1332, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, + 0x1332, 0x1079, 0x77bd, 0x067f, 0x007c, 0x77cd, 0x813d, 0x820e, + 0x8372, 0x84f1, 0x77cd, 0x77cd, 0x77cd, 0x8116, 0x871e, 0x8722, + 0x77cd, 0x77cd, 0x77cd, 0x77cd, 0x8752, 0x1078, 0x1332, 0xa1b6, + 0x0015, 0x00c0, 0x77d7, 0x1078, 0x772d, 0x0078, 0x77dd, 0xa1b6, + 0x0016, 0x10c0, 0x1332, 0x1078, 0x772d, 0x007c, 0x20a9, 0x000e, + 0x2e98, 0x6010, 0x20a0, 0x53a3, 0x20a9, 0x0006, 0x3310, 0x3420, + 0x9398, 0x94a0, 0x3318, 0x3428, 0x222e, 0x2326, 0xa290, 0x0002, + 0xa5a8, 0x0002, 0xa398, 0x0002, 0xa4a0, 0x0002, 0x00f0, 0x77ec, + 0x0e7e, 0x1078, 0x8d16, 0x0040, 0x7803, 0x6010, 0x2070, 0x7007, + 0x0000, 0x7037, 0x0103, 0x0e7f, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x037e, 0x7330, 0xa386, 0x0200, 0x00c0, 0x7814, 0x6018, 0x2068, + 0x6813, 0x00ff, 0x6817, 0xfffd, 0x6010, 0xa005, 0x0040, 0x781e, + 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, 0x6b32, 0x1078, 0x772d, + 0x037f, 0x0d7f, 0x007c, 0x017e, 0x20a9, 0x002a, 0xae80, 0x000c, + 0x2098, 0x6010, 0xa080, 0x0002, 0x20a0, 0x53a3, 0x20a9, 0x002a, + 0x6010, 0xa080, 0x0001, 0x2004, 0xa080, 0x0002, 0x20a0, 0x53a3, + 0x0e7e, 0x6010, 0x2004, 0x2070, 0x7037, 0x0103, 0x0e7f, 0x1078, + 0x772d, 0x017f, 0x007c, 0x0e7e, 0x0d7e, 0x603f, 0x0000, 0x2c68, + 0x017e, 0x2009, 0x0035, 0x1078, 0x91cc, 0x017f, 0x00c0, 0x785f, + 0x027e, 0x6228, 0x2268, 0x027f, 0x2071, 0xac8c, 0x6b1c, 0xa386, + 0x0003, 0x0040, 0x7863, 0xa386, 0x0006, 0x0040, 0x7867, 0x1078, + 0x772d, 0x0078, 0x7869, 0x1078, 0x786c, 0x0078, 0x7869, 0x1078, + 0x7938, 0x0d7f, 0x0e7f, 0x007c, 0x0f7e, 0x6810, 0x2078, 0xa186, + 0x0015, 0x0040, 0x791d, 0xa18e, 0x0016, 0x00c0, 0x7936, 0x700c, + 0xa08c, 0xff00, 0xa186, 0x1700, 0x0040, 0x7882, 0xa186, 0x0300, + 0x00c0, 0x78f8, 0x8fff, 0x00c0, 0x788c, 0x6800, 0xa086, 0x000f, + 0x0040, 0x78db, 0x0078, 0x7934, 0x6808, 0xa086, 0xffff, 0x00c0, + 0x7921, 0x784c, 0xa084, 0x0060, 0xa086, 0x0020, 0x00c0, 0x78a2, + 0x797c, 0x7810, 0xa106, 0x00c0, 0x7921, 0x7980, 0x7814, 0xa106, + 0x00c0, 0x7921, 0x1078, 0x8ec9, 0x6830, 0x7852, 0x784c, 0xc0dc, + 0xc0f4, 0xc0d4, 0x784e, 0x027e, 0xa00e, 0x6a14, 0x2001, 0x000a, + 0x1078, 0x5c1c, 0x7854, 0xa20a, 0x0048, 0x78b7, 0x8011, 0x7a56, + 0x82ff, 0x027f, 0x00c0, 0x78c3, 0x0c7e, 0x2d60, 0x1078, 0x8af0, + 0x0c7f, 0x0078, 0x7934, 0x0c7e, 0x0d7e, 0x2f68, 0x6838, 0xd0fc, + 0x00c0, 0x78ce, 0x1078, 0x4353, 0x0078, 0x78d0, 0x1078, 0x4431, + 0x0d7f, 0x0c7f, 0x00c0, 0x7921, 0x0c7e, 0x2d60, 0x1078, 0x772d, + 0x0c7f, 0x0078, 0x7934, 0x0c7e, 0x1078, 0x9197, 0x0040, 0x78f1, + 0x6013, 0x0000, 0x6818, 0x601a, 0x601f, 0x0003, 0x6904, 0x0c7e, + 0x2d60, 0x1078, 0x772d, 0x0c7f, 0x1078, 0x775c, 0x0c7f, 0x0078, + 0x7934, 0x2001, 0xa9a4, 0x2004, 0x683e, 0x0c7f, 0x0078, 0x7934, + 0x7008, 0xa086, 0x000b, 0x00c0, 0x7912, 0x6018, 0x200c, 0xc1bc, + 0x2102, 0x0c7e, 0x2d60, 0x7853, 0x0003, 0x6007, 0x0085, 0x6003, + 0x000b, 0x601f, 0x0002, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x7934, 0x700c, 0xa086, 0x2a00, 0x00c0, 0x7921, 0x2001, + 0xa9a4, 0x2004, 0x683e, 0x0078, 0x7934, 0x1078, 0x7953, 0x0078, + 0x7936, 0x8fff, 0x1040, 0x1332, 0x0c7e, 0x0d7e, 0x2d60, 0x2f68, + 0x6837, 0x0103, 0x684b, 0x0003, 0x1078, 0x89df, 0x1078, 0x8ec9, + 0x1078, 0x8ed6, 0x0d7f, 0x0c7f, 0x1078, 0x772d, 0x0f7f, 0x007c, + 0xa186, 0x0015, 0x00c0, 0x7942, 0x2001, 0xa9a4, 0x2004, 0x683e, + 0x0078, 0x7950, 0xa18e, 0x0016, 0x00c0, 0x7952, 0x0c7e, 0x2d00, + 0x2060, 0x1078, 0xa4a5, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x0c7f, + 0x1078, 0x772d, 0x007c, 0x027e, 0x037e, 0x047e, 0x7228, 0x7c80, + 0x7b7c, 0xd2f4, 0x0040, 0x7962, 0x2001, 0xa9a4, 0x2004, 0x683e, + 0x0078, 0x79c6, 0x0c7e, 0x2d60, 0x1078, 0x8a03, 0x0c7f, 0x6804, + 0xa086, 0x0050, 0x00c0, 0x797a, 0x0c7e, 0x2d00, 0x2060, 0x6003, + 0x0001, 0x6007, 0x0050, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x79c6, 0x6800, 0xa086, 0x000f, 0x0040, 0x799c, 0x8fff, + 0x1040, 0x1332, 0x6824, 0xd0dc, 0x00c0, 0x799c, 0x6800, 0xa086, + 0x0004, 0x00c0, 0x79a1, 0x784c, 0xd0ac, 0x0040, 0x79a1, 0x784c, + 0xc0dc, 0xc0f4, 0x784e, 0x7850, 0xc0f4, 0xc0fc, 0x7852, 0x2001, + 0x0001, 0x682e, 0x0078, 0x79c0, 0x2001, 0x0007, 0x682e, 0x0078, + 0x79c0, 0x784c, 0xd0b4, 0x00c0, 0x79ae, 0xd0ac, 0x0040, 0x799c, + 0x784c, 0xd0f4, 0x00c0, 0x799c, 0x0078, 0x798f, 0xd2ec, 0x00c0, + 0x799c, 0x7024, 0xa306, 0x00c0, 0x79b9, 0x7020, 0xa406, 0x0040, + 0x799c, 0x7020, 0x6836, 0x7024, 0x683a, 0x2001, 0x0005, 0x682e, + 0x1078, 0x9000, 0x1078, 0x62d1, 0x0078, 0x79c8, 0x1078, 0x772d, + 0x047f, 0x037f, 0x027f, 0x007c, 0x0e7e, 0x0d7e, 0x027e, 0x6034, + 0x2068, 0x6a1c, 0xa286, 0x0007, 0x0040, 0x7a35, 0xa286, 0x0002, + 0x0040, 0x7a35, 0xa286, 0x0000, 0x0040, 0x7a35, 0x6808, 0x6338, + 0xa306, 0x00c0, 0x7a35, 0x2071, 0xac8c, 0xa186, 0x0015, 0x0040, + 0x7a2f, 0xa18e, 0x0016, 0x00c0, 0x7a02, 0x6030, 0xa084, 0x00ff, + 0xa086, 0x0001, 0x00c0, 0x7a02, 0x700c, 0xa086, 0x2a00, 0x00c0, + 0x7a02, 0x6034, 0xa080, 0x0009, 0x200c, 0xc1dd, 0xc1f5, 0x2102, + 0x0078, 0x7a2f, 0x0c7e, 0x6034, 0x2060, 0x6104, 0xa186, 0x004b, + 0x0040, 0x7a22, 0xa186, 0x004c, 0x0040, 0x7a22, 0xa186, 0x004d, + 0x0040, 0x7a22, 0xa186, 0x004e, 0x0040, 0x7a22, 0xa186, 0x0052, + 0x0040, 0x7a22, 0x6010, 0x2068, 0x1078, 0x8d16, 0x1040, 0x1332, + 0x6853, 0x0003, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, 0x0078, 0x7a35, 0x6034, + 0x2068, 0x2001, 0xa9a4, 0x2004, 0x683e, 0x1078, 0x772d, 0x027f, + 0x0d7f, 0x0e7f, 0x007c, 0x0d7e, 0x20a9, 0x000e, 0x2e98, 0x6010, + 0x20a0, 0x53a3, 0xa1b6, 0x0015, 0x00c0, 0x7a73, 0x6018, 0x2068, + 0x157e, 0x037e, 0x027e, 0xae90, 0x000c, 0xa290, 0x0004, 0x20a9, + 0x0004, 0xad98, 0x000a, 0x1078, 0x80de, 0x027f, 0x037f, 0x157f, + 0x00c0, 0x7a76, 0x157e, 0x037e, 0x027e, 0xae90, 0x000c, 0xa290, + 0x0008, 0x20a9, 0x0004, 0xad98, 0x0006, 0x1078, 0x80de, 0x027f, + 0x037f, 0x157f, 0x00c0, 0x7a76, 0x7038, 0x680a, 0x703c, 0x680e, + 0x6800, 0xc08d, 0x6802, 0x0d7f, 0x0078, 0x77f8, 0x1078, 0x2880, + 0x0c7e, 0x1078, 0x76c7, 0x2f00, 0x601a, 0x6013, 0x0000, 0x601f, + 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x1078, + 0x4502, 0x1078, 0x4535, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x7a73, 0x2100, 0xa1b2, 0x0044, 0x10c8, 0x1332, 0xa1b2, + 0x0040, 0x00c8, 0x7af7, 0x0079, 0x7a9d, 0x7aeb, 0x7adf, 0x7aeb, + 0x7aeb, 0x7aeb, 0x7aeb, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7aeb, 0x7aeb, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, + 0x7aeb, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7add, 0x1078, 0x1332, 0x6003, + 0x0001, 0x6106, 0x1078, 0x5dd7, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x007c, 0x6003, 0x0001, 0x6106, 0x1078, 0x5dd7, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x2600, + 0x0079, 0x7afa, 0x7afe, 0x7afe, 0x7afe, 0x7aeb, 0x1078, 0x1332, + 0x6004, 0xa0b2, 0x0044, 0x10c8, 0x1332, 0xa1b6, 0x0013, 0x00c0, + 0x7b10, 0xa0b2, 0x0040, 0x00c8, 0x7c79, 0x2008, 0x0079, 0x7bbf, + 0xa1b6, 0x0027, 0x00c0, 0x7b7c, 0x1078, 0x61cd, 0x6004, 0x1078, + 0x8efc, 0x0040, 0x7b2d, 0x1078, 0x8f10, 0x0040, 0x7b74, 0xa08e, + 0x0021, 0x0040, 0x7b78, 0xa08e, 0x0022, 0x0040, 0x7b74, 0xa08e, + 0x003d, 0x0040, 0x7b78, 0x0078, 0x7b6f, 0x1078, 0x28a6, 0x2001, + 0x0007, 0x1078, 0x4502, 0x6018, 0xa080, 0x0028, 0x200c, 0x1078, + 0x7c83, 0xa186, 0x007e, 0x00c0, 0x7b42, 0x2001, 0xa733, 0x2014, + 0xc285, 0x2202, 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, 0x2019, + 0x0028, 0x1078, 0x73d0, 0x027f, 0x1078, 0xa501, 0x037f, 0x027f, + 0x017f, 0x017e, 0x027e, 0x037e, 0x2110, 0x2019, 0x0028, 0x1078, + 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x0c7e, 0x6018, + 0xa065, 0x0040, 0x7b65, 0x1078, 0x47e9, 0x0c7f, 0x2c08, 0x1078, + 0x9f9b, 0x077f, 0x037f, 0x027f, 0x017f, 0x1078, 0x457f, 0x1078, + 0x772d, 0x1078, 0x62d1, 0x007c, 0x1078, 0x7c83, 0x0078, 0x7b6f, + 0x1078, 0x7ca6, 0x0078, 0x7b6f, 0xa186, 0x0014, 0x00c0, 0x7b73, + 0x1078, 0x61cd, 0x1078, 0x2880, 0x1078, 0x8efc, 0x00c0, 0x7b9b, + 0x1078, 0x28a6, 0x6018, 0xa080, 0x0028, 0x200c, 0x1078, 0x7c83, + 0xa186, 0x007e, 0x00c0, 0x7b99, 0x2001, 0xa733, 0x200c, 0xc185, + 0x2102, 0x0078, 0x7b6f, 0x1078, 0x8f10, 0x00c0, 0x7ba3, 0x1078, + 0x7c83, 0x0078, 0x7b6f, 0x6004, 0xa08e, 0x0032, 0x00c0, 0x7bb4, + 0x0e7e, 0x0f7e, 0x2071, 0xa782, 0x2079, 0x0000, 0x1078, 0x2bd7, + 0x0f7f, 0x0e7f, 0x0078, 0x7b6f, 0x6004, 0xa08e, 0x0021, 0x0040, + 0x7b9f, 0xa08e, 0x0022, 0x1040, 0x7c83, 0x0078, 0x7b6f, 0x7c01, + 0x7c03, 0x7c07, 0x7c0b, 0x7c0f, 0x7c13, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7c17, 0x7c29, 0x7bff, + 0x7c2b, 0x7c29, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7c29, + 0x7c29, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7c5c, 0x7c29, 0x7bff, 0x7c23, 0x7bff, 0x7bff, 0x7bff, + 0x7c25, 0x7bff, 0x7bff, 0x7bff, 0x7c29, 0x7bff, 0x7bff, 0x1078, + 0x1332, 0x0078, 0x7c29, 0x2001, 0x000b, 0x0078, 0x7c36, 0x2001, + 0x0003, 0x0078, 0x7c36, 0x2001, 0x0005, 0x0078, 0x7c36, 0x2001, + 0x0001, 0x0078, 0x7c36, 0x2001, 0x0009, 0x0078, 0x7c36, 0x1078, + 0x61cd, 0x6003, 0x0005, 0x2001, 0xa9a4, 0x2004, 0x603e, 0x1078, + 0x62d1, 0x0078, 0x7c35, 0x0078, 0x7c29, 0x0078, 0x7c29, 0x1078, + 0x4502, 0x0078, 0x7c6e, 0x1078, 0x61cd, 0x6003, 0x0004, 0x2001, + 0xa9a2, 0x2004, 0x6016, 0x1078, 0x62d1, 0x007c, 0x1078, 0x4502, + 0x1078, 0x61cd, 0x2001, 0xa9a4, 0x2004, 0x603e, 0x6003, 0x0002, + 0x037e, 0x2019, 0xa75d, 0x2304, 0xa084, 0xff00, 0x00c0, 0x7c4d, + 0x2019, 0xa9a2, 0x231c, 0x0078, 0x7c56, 0x8007, 0xa09a, 0x0004, + 0x0048, 0x7c48, 0x8003, 0x801b, 0x831b, 0xa318, 0x6316, 0x037f, + 0x1078, 0x62d1, 0x0078, 0x7c35, 0x0e7e, 0x0f7e, 0x2071, 0xa782, + 0x2079, 0x0000, 0x1078, 0x2bd7, 0x0f7f, 0x0e7f, 0x1078, 0x61cd, + 0x1078, 0x772d, 0x1078, 0x62d1, 0x0078, 0x7c35, 0x1078, 0x61cd, + 0x6003, 0x0002, 0x2001, 0xa9a2, 0x2004, 0x6016, 0x1078, 0x62d1, + 0x007c, 0x2600, 0x2008, 0x0079, 0x7c7d, 0x7c81, 0x7c81, 0x7c81, + 0x7c6e, 0x1078, 0x1332, 0x0e7e, 0x1078, 0x8d16, 0x0040, 0x7c9f, + 0x6010, 0x2070, 0x7038, 0xd0fc, 0x0040, 0x7c9f, 0x7007, 0x0000, + 0x017e, 0x6004, 0xa08e, 0x0021, 0x0040, 0x7ca1, 0xa08e, 0x003d, + 0x0040, 0x7ca1, 0x017f, 0x7037, 0x0103, 0x7033, 0x0100, 0x0e7f, + 0x007c, 0x017f, 0x1078, 0x7ca6, 0x0078, 0x7c9f, 0x0e7e, 0xacf0, + 0x0004, 0x2e74, 0x7000, 0x2070, 0x7037, 0x0103, 0x7023, 0x8001, + 0x0e7f, 0x007c, 0x0d7e, 0x6618, 0x2668, 0x6804, 0xa084, 0x00ff, + 0x0d7f, 0xa0b2, 0x000c, 0x10c8, 0x1332, 0x6604, 0xa6b6, 0x0043, + 0x00c0, 0x7cc6, 0x1078, 0x9144, 0x0078, 0x7d25, 0x6604, 0xa6b6, + 0x0033, 0x00c0, 0x7ccf, 0x1078, 0x90e8, 0x0078, 0x7d25, 0x6604, + 0xa6b6, 0x0028, 0x00c0, 0x7cd8, 0x1078, 0x8f3f, 0x0078, 0x7d25, + 0x6604, 0xa6b6, 0x0029, 0x00c0, 0x7ce1, 0x1078, 0x8f59, 0x0078, + 0x7d25, 0x6604, 0xa6b6, 0x001f, 0x00c0, 0x7cea, 0x1078, 0x77de, + 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0000, 0x00c0, 0x7cf3, 0x1078, + 0x7a3b, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0022, 0x00c0, 0x7cfc, + 0x1078, 0x7807, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0035, 0x00c0, + 0x7d05, 0x1078, 0x7843, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0039, + 0x00c0, 0x7d0e, 0x1078, 0x79cc, 0x0078, 0x7d25, 0x6604, 0xa6b6, + 0x003d, 0x00c0, 0x7d17, 0x1078, 0x7823, 0x0078, 0x7d25, 0xa1b6, + 0x0015, 0x00c0, 0x7d1f, 0x1079, 0x7d2a, 0x0078, 0x7d25, 0xa1b6, + 0x0016, 0x00c0, 0x7d26, 0x1079, 0x7e7f, 0x007c, 0x1078, 0x7773, + 0x0078, 0x7d25, 0x7d4e, 0x7d51, 0x7d4e, 0x7d9c, 0x7d4e, 0x7e13, + 0x7e8b, 0x7d4e, 0x7d4e, 0x7e57, 0x7d4e, 0x7e6d, 0xa1b6, 0x0048, + 0x0040, 0x7d42, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, + 0x15fa, 0x007c, 0x0e7e, 0xacf0, 0x0004, 0x2e74, 0x7000, 0x2070, + 0x7037, 0x0103, 0x0e7f, 0x1078, 0x772d, 0x007c, 0x0005, 0x0005, + 0x007c, 0x0e7e, 0x2071, 0xa700, 0x7080, 0xa086, 0x0074, 0x00c0, + 0x7d85, 0x1078, 0x9f6f, 0x00c0, 0x7d77, 0x0d7e, 0x6018, 0x2068, + 0x7030, 0xd08c, 0x0040, 0x7d6a, 0x6800, 0xd0bc, 0x0040, 0x7d6a, + 0xc0c5, 0x6802, 0x1078, 0x7d89, 0x0d7f, 0x2001, 0x0006, 0x1078, + 0x4502, 0x1078, 0x28a6, 0x1078, 0x772d, 0x0078, 0x7d87, 0x2001, + 0x000a, 0x1078, 0x4502, 0x1078, 0x28a6, 0x6003, 0x0001, 0x6007, + 0x0001, 0x1078, 0x5dd7, 0x0078, 0x7d87, 0x1078, 0x7dff, 0x0e7f, + 0x007c, 0x6800, 0xd084, 0x0040, 0x7d9b, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2069, 0xa752, 0x6804, 0xd0a4, 0x0040, 0x7d9b, 0x2001, + 0x0006, 0x1078, 0x4535, 0x007c, 0x0d7e, 0x2011, 0xa720, 0x2204, + 0xa086, 0x0074, 0x00c0, 0x7dfb, 0x6018, 0x2068, 0x6aa0, 0xa286, + 0x007e, 0x00c0, 0x7daf, 0x1078, 0x7f9b, 0x0078, 0x7dfd, 0x1078, + 0x7f91, 0x6018, 0x2068, 0xa080, 0x0028, 0x2014, 0xa286, 0x0080, + 0x00c0, 0x7dd3, 0x6813, 0x00ff, 0x6817, 0xfffc, 0x6010, 0xa005, + 0x0040, 0x7dc9, 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, 0x6833, + 0x0200, 0x2001, 0x0006, 0x1078, 0x4502, 0x1078, 0x28a6, 0x1078, + 0x772d, 0x0078, 0x7dfd, 0x0e7e, 0x2071, 0xa733, 0x2e04, 0xd09c, + 0x0040, 0x7dee, 0x2071, 0xac80, 0x7108, 0x720c, 0xa18c, 0x00ff, + 0x00c0, 0x7de6, 0xa284, 0xff00, 0x0040, 0x7dee, 0x6018, 0x2070, + 0x70a0, 0xd0bc, 0x00c0, 0x7dee, 0x7112, 0x7216, 0x0e7f, 0x2001, + 0x0004, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0003, 0x1078, + 0x5dd7, 0x0078, 0x7dfd, 0x1078, 0x7dff, 0x0d7f, 0x007c, 0x2001, + 0x0007, 0x1078, 0x4502, 0x2001, 0xa700, 0x2004, 0xa086, 0x0003, + 0x00c0, 0x7e0e, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, 0x28a6, + 0x1078, 0x772d, 0x007c, 0x0e7e, 0x2071, 0xa700, 0x7080, 0xa086, + 0x0014, 0x00c0, 0x7e51, 0x7000, 0xa086, 0x0003, 0x00c0, 0x7e26, + 0x6010, 0xa005, 0x00c0, 0x7e26, 0x1078, 0x3699, 0x0d7e, 0x6018, + 0x2068, 0x1078, 0x4649, 0x1078, 0x7d89, 0x0d7f, 0x1078, 0x8043, + 0x00c0, 0x7e51, 0x0d7e, 0x6018, 0x2068, 0x6890, 0x0d7f, 0xa005, + 0x0040, 0x7e51, 0x2001, 0x0006, 0x1078, 0x4502, 0x0e7e, 0x6010, + 0xa005, 0x0040, 0x7e4a, 0x2070, 0x7007, 0x0000, 0x7037, 0x0103, + 0x7033, 0x0200, 0x0e7f, 0x1078, 0x28a6, 0x1078, 0x772d, 0x0078, + 0x7e55, 0x1078, 0x7c83, 0x1078, 0x7dff, 0x0e7f, 0x007c, 0x2011, + 0xa720, 0x2204, 0xa086, 0x0014, 0x00c0, 0x7e6a, 0x2001, 0x0002, + 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0001, 0x1078, 0x5dd7, + 0x0078, 0x7e6c, 0x1078, 0x7dff, 0x007c, 0x2011, 0xa720, 0x2204, + 0xa086, 0x0004, 0x00c0, 0x7e7c, 0x2001, 0x0007, 0x1078, 0x4502, + 0x1078, 0x772d, 0x0078, 0x7e7e, 0x1078, 0x7dff, 0x007c, 0x7d4e, + 0x7e97, 0x7d4e, 0x7ed2, 0x7d4e, 0x7f44, 0x7e8b, 0x7d4e, 0x7d4e, + 0x7f59, 0x7d4e, 0x7f6c, 0x6604, 0xa686, 0x0003, 0x0040, 0x7e13, + 0xa6b6, 0x001e, 0x00c0, 0x7e96, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x0c7e, 0x1078, 0x7f7f, 0x00c0, 0x7ead, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, + 0x0002, 0x1078, 0x5dd7, 0x0078, 0x7ecf, 0x2009, 0xac8e, 0x2104, + 0xa086, 0x0009, 0x00c0, 0x7ec2, 0x6018, 0x2068, 0x6840, 0xa084, + 0x00ff, 0xa005, 0x0040, 0x7ecd, 0x8001, 0x6842, 0x6017, 0x000a, + 0x0078, 0x7ecf, 0x2009, 0xac8f, 0x2104, 0xa084, 0xff00, 0xa086, + 0x1900, 0x00c0, 0x7ecd, 0x0078, 0x7ea1, 0x1078, 0x7dff, 0x0c7f, + 0x0d7f, 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7ee6, 0x2001, 0x0000, + 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, 0x0001, + 0x6007, 0x0002, 0x1078, 0x5dd7, 0x0078, 0x7f12, 0x1078, 0x7c83, + 0x2009, 0xac8e, 0x2134, 0xa6b4, 0x00ff, 0xa686, 0x0005, 0x0040, + 0x7f13, 0xa686, 0x000b, 0x0040, 0x7f10, 0x2009, 0xac8f, 0x2104, + 0xa084, 0xff00, 0x00c0, 0x7f00, 0xa686, 0x0009, 0x0040, 0x7f13, + 0xa086, 0x1900, 0x00c0, 0x7f10, 0xa686, 0x0009, 0x0040, 0x7f13, + 0x2001, 0x0004, 0x1078, 0x4502, 0x1078, 0x772d, 0x0078, 0x7f12, + 0x1078, 0x7dff, 0x007c, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d16, + 0x0040, 0x7f21, 0x6838, 0xd0fc, 0x0040, 0x7f21, 0x0d7f, 0x0078, + 0x7f10, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, 0x0040, + 0x7f32, 0x8001, 0x6842, 0x6017, 0x000a, 0x6007, 0x0016, 0x0d7f, + 0x0078, 0x7f12, 0x68a0, 0xa086, 0x007e, 0x00c0, 0x7f3f, 0x0e7e, + 0x2071, 0xa700, 0x1078, 0x42b8, 0x0e7f, 0x0078, 0x7f41, 0x1078, + 0x2880, 0x0d7f, 0x0078, 0x7f10, 0x1078, 0x7f8e, 0x00c0, 0x7f54, + 0x2001, 0x0004, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0003, + 0x1078, 0x5dd7, 0x0078, 0x7f58, 0x1078, 0x7c83, 0x1078, 0x7dff, + 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7f69, 0x2001, 0x0008, 0x1078, + 0x4502, 0x6003, 0x0001, 0x6007, 0x0005, 0x1078, 0x5dd7, 0x0078, + 0x7f6b, 0x1078, 0x7dff, 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7f7c, + 0x2001, 0x000a, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0001, + 0x1078, 0x5dd7, 0x0078, 0x7f7e, 0x1078, 0x7dff, 0x007c, 0x2009, + 0xac8e, 0x2104, 0xa086, 0x0003, 0x00c0, 0x7f8d, 0x2009, 0xac8f, + 0x2104, 0xa084, 0xff00, 0xa086, 0x2a00, 0x007c, 0xa085, 0x0001, + 0x007c, 0x0c7e, 0x017e, 0xac88, 0x0006, 0x2164, 0x1078, 0x45d6, + 0x017f, 0x0c7f, 0x007c, 0x0f7e, 0x0e7e, 0x0d7e, 0x037e, 0x017e, + 0x6018, 0x2068, 0x2071, 0xa733, 0x2e04, 0xa085, 0x0003, 0x2072, + 0x1078, 0x8014, 0x0040, 0x7fd9, 0x2009, 0xa733, 0x2104, 0xc0cd, + 0x200a, 0x2001, 0xa753, 0x2004, 0xd0a4, 0x0040, 0x7fc2, 0xa006, + 0x2020, 0x2009, 0x002a, 0x1078, 0xa22d, 0x2001, 0xa70c, 0x200c, + 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x1078, 0x284f, + 0x2071, 0xa700, 0x1078, 0x2677, 0x0c7e, 0x157e, 0x20a9, 0x0081, + 0x2009, 0x007f, 0x1078, 0x298e, 0x8108, 0x00f0, 0x7fd2, 0x157f, + 0x0c7f, 0x1078, 0x7f91, 0x6813, 0x00ff, 0x6817, 0xfffe, 0x2071, + 0xac80, 0x2079, 0x0100, 0x2e04, 0xa084, 0x00ff, 0x2069, 0xa71b, + 0x206a, 0x78e6, 0x007e, 0x8e70, 0x2e04, 0x2069, 0xa71c, 0x206a, + 0x78ea, 0xa084, 0xff00, 0x017f, 0xa105, 0x2009, 0xa726, 0x200a, + 0x2069, 0xac8e, 0x2071, 0xa99e, 0x6810, 0x2072, 0x6814, 0x7006, + 0x6818, 0x700a, 0x681c, 0x700e, 0x1078, 0x907e, 0x2001, 0x0006, + 0x1078, 0x4502, 0x1078, 0x28a6, 0x1078, 0x772d, 0x017f, 0x037f, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x027e, 0x037e, 0x0e7e, 0x157e, + 0x2019, 0xa726, 0x231c, 0x83ff, 0x0040, 0x803e, 0x2071, 0xac80, + 0x2e14, 0xa294, 0x00ff, 0x7004, 0xa084, 0xff00, 0xa205, 0xa306, + 0x00c0, 0x803e, 0x2011, 0xac96, 0xad98, 0x000a, 0x20a9, 0x0004, + 0x1078, 0x80de, 0x00c0, 0x803e, 0x2011, 0xac9a, 0xad98, 0x0006, + 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x803e, 0x157f, 0x0e7f, + 0x037f, 0x027f, 0x007c, 0x0e7e, 0x2071, 0xac8c, 0x7004, 0xa086, + 0x0014, 0x00c0, 0x8066, 0x7008, 0xa086, 0x0800, 0x00c0, 0x8066, + 0x700c, 0xd0ec, 0x0040, 0x8064, 0xa084, 0x0f00, 0xa086, 0x0100, + 0x00c0, 0x8064, 0x7024, 0xd0a4, 0x00c0, 0x8061, 0xd0ac, 0x0040, + 0x8064, 0xa006, 0x0078, 0x8066, 0xa085, 0x0001, 0x0e7f, 0x007c, + 0x0e7e, 0x0d7e, 0x0c7e, 0x077e, 0x057e, 0x047e, 0x027e, 0x007e, + 0x127e, 0x2091, 0x8000, 0x2029, 0xa9ba, 0x252c, 0x2021, 0xa9c0, + 0x2424, 0x2061, 0xae00, 0x2071, 0xa700, 0x7248, 0x7064, 0xa202, + 0x00c8, 0x80cc, 0x1078, 0xa252, 0x0040, 0x80c4, 0x671c, 0xa786, + 0x0001, 0x0040, 0x80c4, 0xa786, 0x0007, 0x0040, 0x80c4, 0x2500, + 0xac06, 0x0040, 0x80c4, 0x2400, 0xac06, 0x0040, 0x80c4, 0x0c7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0x809f, 0x1078, 0x1757, 0xa786, + 0x0008, 0x00c0, 0x80ae, 0x1078, 0x8f10, 0x00c0, 0x80ae, 0x0c7f, + 0x1078, 0x7c83, 0x1078, 0x8ed6, 0x0078, 0x80c4, 0x6010, 0x2068, + 0x1078, 0x8d16, 0x0040, 0x80c1, 0xa786, 0x0003, 0x00c0, 0x80d6, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, 0x1078, + 0x8ec9, 0x1078, 0x8ed6, 0x0c7f, 0xace0, 0x0010, 0x7058, 0xac02, + 0x00c8, 0x80cc, 0x0078, 0x807d, 0x127f, 0x007f, 0x027f, 0x047f, + 0x057f, 0x077f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0xa786, 0x0006, + 0x00c0, 0x80b8, 0x1078, 0xa1da, 0x0078, 0x80c1, 0x220c, 0x2304, + 0xa106, 0x00c0, 0x80e9, 0x8210, 0x8318, 0x00f0, 0x80de, 0xa006, + 0x007c, 0x2304, 0xa102, 0x0048, 0x80f1, 0x2001, 0x0001, 0x0078, + 0x80f3, 0x2001, 0x0000, 0xa18d, 0x0001, 0x007c, 0x6004, 0xa08a, + 0x0044, 0x10c8, 0x1332, 0x1078, 0x8efc, 0x0040, 0x8105, 0x1078, + 0x8f10, 0x0040, 0x8112, 0x0078, 0x810b, 0x1078, 0x28a6, 0x1078, + 0x8f10, 0x0040, 0x8112, 0x1078, 0x61cd, 0x1078, 0x772d, 0x1078, + 0x62d1, 0x007c, 0x1078, 0x7c83, 0x0078, 0x810b, 0xa182, 0x0040, + 0x0079, 0x811a, 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, + 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, 0x812f, 0x812f, 0x812f, + 0x812f, 0x812d, 0x812d, 0x812d, 0x812f, 0x1078, 0x1332, 0x600b, + 0xffff, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0xa186, 0x0013, 0x00c0, + 0x8146, 0x6004, 0xa082, 0x0040, 0x0079, 0x81d1, 0xa186, 0x0027, + 0x00c0, 0x8168, 0x1078, 0x61cd, 0x1078, 0x2880, 0x0d7e, 0x6110, + 0x2168, 0x1078, 0x8d16, 0x0040, 0x8162, 0x6837, 0x0103, 0x684b, + 0x0029, 0x6847, 0x0000, 0x694c, 0xc1c5, 0x694e, 0x1078, 0x4a73, + 0x1078, 0x8ec9, 0x0d7f, 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, + 0xa186, 0x0014, 0x00c0, 0x8171, 0x6004, 0xa082, 0x0040, 0x0079, + 0x8199, 0xa186, 0x0046, 0x0040, 0x817d, 0xa186, 0x0045, 0x0040, + 0x817d, 0xa186, 0x0047, 0x10c0, 0x1332, 0x2001, 0x0109, 0x2004, + 0xd084, 0x0040, 0x8196, 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, + 0x027e, 0x1078, 0x5c56, 0x027f, 0x017f, 0x007f, 0x127f, 0x6000, + 0xa086, 0x0002, 0x00c0, 0x8196, 0x0078, 0x820e, 0x1078, 0x7773, + 0x007c, 0x81ae, 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ac, + 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ca, 0x81ca, 0x81ca, 0x81ca, + 0x81ac, 0x81ca, 0x81ac, 0x81ca, 0x1078, 0x1332, 0x1078, 0x61cd, + 0x0d7e, 0x6110, 0x2168, 0x1078, 0x8d16, 0x0040, 0x81c4, 0x6837, + 0x0103, 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ec, 0x6852, + 0x1078, 0x4a73, 0x1078, 0x8ec9, 0x0d7f, 0x1078, 0x772d, 0x1078, + 0x62d1, 0x007c, 0x1078, 0x61cd, 0x1078, 0x772d, 0x1078, 0x62d1, + 0x007c, 0x81e6, 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81e4, + 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81f8, 0x81f8, 0x81f8, 0x81f8, + 0x81e4, 0x8207, 0x81e4, 0x81f8, 0x1078, 0x1332, 0x1078, 0x61cd, + 0x2001, 0xa9a4, 0x2004, 0x603e, 0x6003, 0x0002, 0x1078, 0x62d1, + 0x6010, 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x007c, + 0x1078, 0x61cd, 0x2001, 0xa9a2, 0x2004, 0x6016, 0x2001, 0xa9a4, + 0x2004, 0x603e, 0x6003, 0x000f, 0x1078, 0x62d1, 0x007c, 0x1078, + 0x61cd, 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, 0xa182, 0x0040, + 0x0079, 0x8212, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x8227, + 0x8331, 0x8363, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, + 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x1078, 0x1332, 0x0e7e, + 0x0d7e, 0x603f, 0x0000, 0x2071, 0xac80, 0x7124, 0x610a, 0x2071, + 0xac8c, 0x6110, 0x2168, 0x7614, 0xa6b4, 0x0fff, 0x86ff, 0x0040, + 0x82f0, 0xa68c, 0x0c00, 0x0040, 0x8265, 0x0f7e, 0x2c78, 0x1078, + 0x4963, 0x0f7f, 0x0040, 0x8261, 0x684c, 0xd0ac, 0x0040, 0x8261, + 0x6024, 0xd0dc, 0x00c0, 0x8261, 0x6850, 0xd0bc, 0x00c0, 0x8261, + 0x7318, 0x6814, 0xa306, 0x00c0, 0x8308, 0x731c, 0x6810, 0xa31e, + 0x0040, 0x8261, 0xd6d4, 0x0040, 0x8308, 0x6b14, 0xa305, 0x00c0, + 0x8308, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, + 0x0002, 0x0040, 0x8298, 0xa186, 0x0028, 0x00c0, 0x8275, 0x1078, + 0x8eea, 0x684b, 0x001c, 0x0078, 0x829a, 0xd6dc, 0x0040, 0x8291, + 0x684b, 0x0015, 0x684c, 0xd0ac, 0x0040, 0x828f, 0x6914, 0x6a10, + 0x2100, 0xa205, 0x0040, 0x828f, 0x7018, 0xa106, 0x00c0, 0x828c, + 0x701c, 0xa206, 0x0040, 0x828f, 0x6962, 0x6a5e, 0xc6dc, 0x0078, + 0x829a, 0xd6d4, 0x0040, 0x8298, 0x684b, 0x0007, 0x0078, 0x829a, + 0x684b, 0x0000, 0x6837, 0x0103, 0x6e46, 0xa01e, 0xd6c4, 0x0040, + 0x82c3, 0xa686, 0x0100, 0x00c0, 0x82ae, 0x2001, 0xac99, 0x2004, + 0xa005, 0x00c0, 0x82ae, 0xc6c4, 0x0078, 0x8236, 0x7328, 0x732c, + 0x6b56, 0x83ff, 0x0040, 0x82c3, 0xa38a, 0x0009, 0x0048, 0x82ba, + 0x2019, 0x0008, 0x037e, 0x2308, 0x2019, 0xac98, 0xad90, 0x0019, + 0x1078, 0x89f2, 0x037f, 0xd6cc, 0x0040, 0x831e, 0x7124, 0x695a, + 0x81ff, 0x0040, 0x831e, 0xa192, 0x0021, 0x00c8, 0x82dc, 0x2071, + 0xac98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, 0x89f2, + 0x1078, 0x9204, 0x0078, 0x831e, 0x6838, 0xd0fc, 0x0040, 0x82e5, + 0x2009, 0x0020, 0x695a, 0x0078, 0x82cf, 0x0f7e, 0x2d78, 0x1078, + 0x898a, 0x0f7f, 0x1078, 0x9204, 0x1078, 0x89df, 0x0078, 0x8320, + 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x830e, 0x684c, + 0xd0ac, 0x0040, 0x830e, 0x6024, 0xd0dc, 0x00c0, 0x830e, 0x6850, + 0xd0bc, 0x00c0, 0x830e, 0x6810, 0x6914, 0xa105, 0x0040, 0x830e, + 0x1078, 0x8fcf, 0x0d7f, 0x0e7f, 0x0078, 0x8330, 0x684b, 0x0000, + 0x6837, 0x0103, 0x6e46, 0x684c, 0xd0ac, 0x0040, 0x831e, 0x6810, + 0x6914, 0xa115, 0x0040, 0x831e, 0x1078, 0x84e2, 0x1078, 0x4a73, + 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0040, 0x8328, 0x8211, 0x6a3e, + 0x1078, 0x8f99, 0x0d7f, 0x0e7f, 0x00c0, 0x8330, 0x1078, 0x772d, + 0x007c, 0x0f7e, 0x6003, 0x0003, 0x2079, 0xac8c, 0x7c04, 0x7b00, + 0x7e0c, 0x7d08, 0x6010, 0x2078, 0x784c, 0xd0ac, 0x0040, 0x8348, + 0x6003, 0x0002, 0x0f7f, 0x007c, 0x2130, 0x2228, 0x0078, 0x8354, + 0x2400, 0x797c, 0xa10a, 0x2300, 0x7a80, 0xa213, 0x2600, 0xa102, + 0x2500, 0xa203, 0x0048, 0x8344, 0x7c12, 0x7b16, 0x7e0a, 0x7d0e, + 0x0f7f, 0x603f, 0x0000, 0x2c10, 0x1078, 0x1cf0, 0x1078, 0x5df6, + 0x1078, 0x639b, 0x007c, 0x2001, 0xa9a4, 0x2004, 0x603e, 0x6003, + 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, + 0x15fa, 0x007c, 0xa182, 0x0040, 0x0079, 0x8376, 0x8389, 0x8389, + 0x8389, 0x8389, 0x8389, 0x838b, 0x8431, 0x8389, 0x8389, 0x8447, + 0x84b8, 0x8389, 0x8389, 0x8389, 0x8389, 0x84c7, 0x8389, 0x8389, + 0x8389, 0x1078, 0x1332, 0x077e, 0x0f7e, 0x0e7e, 0x0d7e, 0x2071, + 0xac8c, 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, 0x7e46, 0x7f4c, + 0xc7e5, 0x7f4e, 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0040, 0x83a2, + 0x8211, 0x6a3e, 0x86ff, 0x0040, 0x842c, 0xa694, 0xff00, 0xa284, + 0x0c00, 0x0040, 0x83af, 0x7018, 0x7862, 0x701c, 0x785e, 0xa284, + 0x0300, 0x0040, 0x842c, 0x1078, 0x138b, 0x1040, 0x1332, 0x2d00, + 0x784a, 0x7f4c, 0xc7cd, 0x7f4e, 0x6837, 0x0103, 0x7838, 0x683a, + 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, 0x0040, + 0x83cd, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, + 0x0002, 0x0040, 0x83e9, 0xa186, 0x0028, 0x00c0, 0x83db, 0x684b, + 0x001c, 0x0078, 0x83eb, 0xd6dc, 0x0040, 0x83e2, 0x684b, 0x0015, + 0x0078, 0x83eb, 0xd6d4, 0x0040, 0x83e9, 0x684b, 0x0007, 0x0078, + 0x83eb, 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, 0x6856, + 0xa01e, 0xd6c4, 0x0040, 0x8409, 0x7328, 0x732c, 0x6b56, 0x83ff, + 0x0040, 0x8409, 0xa38a, 0x0009, 0x0048, 0x8400, 0x2019, 0x0008, + 0x037e, 0x2308, 0x2019, 0xac98, 0xad90, 0x0019, 0x1078, 0x89f2, + 0x037f, 0xd6cc, 0x0040, 0x842c, 0x7124, 0x695a, 0x81ff, 0x0040, + 0x842c, 0xa192, 0x0021, 0x00c8, 0x8420, 0x2071, 0xac98, 0x831c, + 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, 0x89f2, 0x0078, 0x842c, + 0x7838, 0xd0fc, 0x0040, 0x8429, 0x2009, 0x0020, 0x695a, 0x0078, + 0x8415, 0x2d78, 0x1078, 0x898a, 0x0d7f, 0x0e7f, 0x0f7f, 0x077f, + 0x007c, 0x0f7e, 0x6003, 0x0003, 0x2079, 0xac8c, 0x7c04, 0x7b00, + 0x7e0c, 0x7d08, 0x6010, 0x2078, 0x7c12, 0x7b16, 0x7e0a, 0x7d0e, + 0x0f7f, 0x2c10, 0x1078, 0x1cf0, 0x1078, 0x6df4, 0x007c, 0x0d7e, + 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x8453, 0x2001, + 0xa9a4, 0x2004, 0x603e, 0x6003, 0x0002, 0x1078, 0x627a, 0x1078, + 0x639b, 0x6110, 0x2168, 0x694c, 0xd1e4, 0x0040, 0x84b6, 0xd1cc, + 0x0040, 0x848d, 0x6948, 0x6838, 0xd0fc, 0x0040, 0x8485, 0x017e, + 0x684c, 0x007e, 0x6850, 0x007e, 0xad90, 0x000d, 0xa198, 0x000d, + 0x2009, 0x0020, 0x157e, 0x21a8, 0x2304, 0x2012, 0x8318, 0x8210, + 0x00f0, 0x8474, 0x157f, 0x007f, 0x6852, 0x007f, 0x684e, 0x017f, + 0x2168, 0x1078, 0x13b4, 0x0078, 0x84b0, 0x017e, 0x1078, 0x13b4, + 0x0d7f, 0x1078, 0x89df, 0x0078, 0x84b0, 0x6837, 0x0103, 0x6944, + 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0040, 0x84ac, 0xa086, 0x0028, + 0x00c0, 0x849e, 0x684b, 0x001c, 0x0078, 0x84ae, 0xd1dc, 0x0040, + 0x84a5, 0x684b, 0x0015, 0x0078, 0x84ae, 0xd1d4, 0x0040, 0x84ac, + 0x684b, 0x0007, 0x0078, 0x84ae, 0x684b, 0x0000, 0x1078, 0x4a73, + 0x1078, 0x8f99, 0x00c0, 0x84b6, 0x1078, 0x772d, 0x0d7f, 0x007c, + 0x2019, 0x0001, 0x1078, 0x7058, 0x6003, 0x0002, 0x2001, 0xa9a4, + 0x2004, 0x603e, 0x1078, 0x627a, 0x1078, 0x639b, 0x007c, 0x1078, + 0x627a, 0x1078, 0x2880, 0x0d7e, 0x6110, 0x2168, 0x1078, 0x8d16, + 0x0040, 0x84dc, 0x6837, 0x0103, 0x684b, 0x0029, 0x6847, 0x0000, + 0x1078, 0x4a73, 0x1078, 0x8ec9, 0x0d7f, 0x1078, 0x772d, 0x1078, + 0x639b, 0x007c, 0x684b, 0x0015, 0xd1fc, 0x0040, 0x84ee, 0x684b, + 0x0007, 0x8002, 0x8000, 0x810a, 0xa189, 0x0000, 0x6962, 0x685e, + 0x007c, 0xa182, 0x0040, 0x0079, 0x84f5, 0x8508, 0x8508, 0x8508, + 0x8508, 0x8508, 0x850a, 0x8508, 0x85e0, 0x85ec, 0x8508, 0x8508, + 0x8508, 0x8508, 0x8508, 0x8508, 0x8508, 0x8508, 0x8508, 0x8508, + 0x1078, 0x1332, 0x077e, 0x0f7e, 0x0e7e, 0x0d7e, 0x2071, 0xac8c, + 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, 0x0f7e, 0x2c78, 0x1078, + 0x4963, 0x0f7f, 0x0040, 0x8528, 0xa684, 0x00ff, 0x00c0, 0x8528, + 0x6024, 0xd0f4, 0x0040, 0x8528, 0x1078, 0x8fcf, 0x0078, 0x85db, + 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, 0x6218, 0x2268, 0x6a3c, 0x82ff, + 0x0040, 0x8534, 0x8211, 0x6a3e, 0x86ff, 0x0040, 0x85d0, 0xa694, + 0xff00, 0xa284, 0x0c00, 0x0040, 0x8541, 0x7018, 0x7862, 0x701c, + 0x785e, 0xa284, 0x0300, 0x0040, 0x85cd, 0xa686, 0x0100, 0x00c0, + 0x8553, 0x2001, 0xac99, 0x2004, 0xa005, 0x00c0, 0x8553, 0xc6c4, + 0x7e46, 0x0078, 0x8534, 0x1078, 0x138b, 0x1040, 0x1332, 0x2d00, + 0x784a, 0x7f4c, 0xa7bd, 0x0200, 0x7f4e, 0x6837, 0x0103, 0x7838, + 0x683a, 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, + 0x0040, 0x856e, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, + 0xa186, 0x0002, 0x0040, 0x858a, 0xa186, 0x0028, 0x00c0, 0x857c, + 0x684b, 0x001c, 0x0078, 0x858c, 0xd6dc, 0x0040, 0x8583, 0x684b, + 0x0015, 0x0078, 0x858c, 0xd6d4, 0x0040, 0x858a, 0x684b, 0x0007, + 0x0078, 0x858c, 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, + 0x6856, 0xa01e, 0xd6c4, 0x0040, 0x85aa, 0x7328, 0x732c, 0x6b56, + 0x83ff, 0x0040, 0x85aa, 0xa38a, 0x0009, 0x0048, 0x85a1, 0x2019, + 0x0008, 0x037e, 0x2308, 0x2019, 0xac98, 0xad90, 0x0019, 0x1078, + 0x89f2, 0x037f, 0xd6cc, 0x0040, 0x85cd, 0x7124, 0x695a, 0x81ff, + 0x0040, 0x85cd, 0xa192, 0x0021, 0x00c8, 0x85c1, 0x2071, 0xac98, + 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, 0x89f2, 0x0078, + 0x85cd, 0x7838, 0xd0fc, 0x0040, 0x85ca, 0x2009, 0x0020, 0x695a, + 0x0078, 0x85b6, 0x2d78, 0x1078, 0x898a, 0xd6dc, 0x00c0, 0x85d3, + 0xa006, 0x0078, 0x85d9, 0x2001, 0x0001, 0x2071, 0xac8c, 0x7218, + 0x731c, 0x1078, 0x1653, 0x0d7f, 0x0e7f, 0x0f7f, 0x077f, 0x007c, + 0x2001, 0xa9a4, 0x2004, 0x603e, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x1078, 0x15fa, 0x007c, 0x2001, 0xa9a4, 0x2004, 0x603e, + 0x0d7e, 0x6003, 0x0002, 0x6110, 0x2168, 0x694c, 0xd1e4, 0x0040, + 0x871c, 0x603f, 0x0000, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, + 0x0040, 0x8632, 0x6814, 0x6910, 0xa115, 0x0040, 0x8632, 0x6a60, + 0xa206, 0x00c0, 0x860f, 0x685c, 0xa106, 0x0040, 0x8632, 0x684c, + 0xc0e4, 0x684e, 0x6847, 0x0000, 0x6863, 0x0000, 0x685f, 0x0000, + 0x6024, 0xd0f4, 0x00c0, 0x8627, 0x697c, 0x6810, 0xa102, 0x603a, + 0x6980, 0x6814, 0xa103, 0x6036, 0x6024, 0xc0f5, 0x6026, 0x0d7e, + 0x6018, 0x2068, 0x683c, 0x8000, 0x683e, 0x0d7f, 0x1078, 0x8fcf, + 0x0078, 0x871c, 0x694c, 0xd1cc, 0x0040, 0x86e1, 0x6948, 0x6838, + 0xd0fc, 0x0040, 0x8699, 0x017e, 0x684c, 0x007e, 0x6850, 0x007e, + 0x0f7e, 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0040, + 0x866c, 0xa086, 0x0028, 0x00c0, 0x8653, 0x684b, 0x001c, 0x784b, + 0x001c, 0x0078, 0x8677, 0xd1dc, 0x0040, 0x8663, 0x684b, 0x0015, + 0x784b, 0x0015, 0x1078, 0x917c, 0x0040, 0x8661, 0x7944, 0xc1dc, + 0x7946, 0x0078, 0x8677, 0xd1d4, 0x0040, 0x866c, 0x684b, 0x0007, + 0x784b, 0x0007, 0x0078, 0x8677, 0x684c, 0xd0ac, 0x0040, 0x8677, + 0x6810, 0x6914, 0xa115, 0x0040, 0x8677, 0x1078, 0x84e2, 0x6848, + 0x784a, 0x6860, 0x7862, 0x685c, 0x785e, 0xad90, 0x000d, 0xaf98, + 0x000d, 0x2009, 0x0020, 0x157e, 0x21a8, 0x2304, 0x2012, 0x8318, + 0x8210, 0x00f0, 0x8685, 0x157f, 0x0f7f, 0x007f, 0x6852, 0x007f, + 0x684e, 0x1078, 0x9204, 0x017f, 0x2168, 0x1078, 0x13b4, 0x0078, + 0x8716, 0x017e, 0x0f7e, 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, + 0x0002, 0x0040, 0x86c6, 0xa086, 0x0028, 0x00c0, 0x86ad, 0x684b, + 0x001c, 0x784b, 0x001c, 0x0078, 0x86d1, 0xd1dc, 0x0040, 0x86bd, + 0x684b, 0x0015, 0x784b, 0x0015, 0x1078, 0x917c, 0x0040, 0x86bb, + 0x7944, 0xc1dc, 0x7946, 0x0078, 0x86d1, 0xd1d4, 0x0040, 0x86c6, + 0x684b, 0x0007, 0x784b, 0x0007, 0x0078, 0x86d1, 0x684c, 0xd0ac, + 0x0040, 0x86d1, 0x6810, 0x6914, 0xa115, 0x0040, 0x86d1, 0x1078, + 0x84e2, 0x6860, 0x7862, 0x685c, 0x785e, 0x684c, 0x784e, 0x0f7f, + 0x1078, 0x13b4, 0x0d7f, 0x1078, 0x9204, 0x1078, 0x89df, 0x0078, + 0x8716, 0x6837, 0x0103, 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, + 0x0040, 0x8707, 0xa086, 0x0028, 0x00c0, 0x86f2, 0x684b, 0x001c, + 0x0078, 0x8714, 0xd1dc, 0x0040, 0x8700, 0x684b, 0x0015, 0x1078, + 0x917c, 0x0040, 0x86fe, 0x6944, 0xc1dc, 0x6946, 0x0078, 0x8714, + 0xd1d4, 0x0040, 0x8707, 0x684b, 0x0007, 0x0078, 0x8714, 0x684b, + 0x0000, 0x684c, 0xd0ac, 0x0040, 0x8714, 0x6810, 0x6914, 0xa115, + 0x0040, 0x8714, 0x1078, 0x84e2, 0x1078, 0x4a73, 0x1078, 0x8f99, + 0x00c0, 0x871c, 0x1078, 0x772d, 0x0d7f, 0x007c, 0x1078, 0x61cd, + 0x0078, 0x8724, 0x1078, 0x627a, 0x1078, 0x8d16, 0x0040, 0x8743, + 0x0d7e, 0x6110, 0x2168, 0x6837, 0x0103, 0x2009, 0xa70c, 0x210c, + 0xd18c, 0x00c0, 0x874e, 0xd184, 0x00c0, 0x874a, 0x6108, 0x694a, + 0xa18e, 0x0029, 0x00c0, 0x873e, 0x1078, 0xa4f2, 0x6847, 0x0000, + 0x1078, 0x4a73, 0x0d7f, 0x1078, 0x772d, 0x1078, 0x62d1, 0x1078, + 0x639b, 0x007c, 0x684b, 0x0004, 0x0078, 0x873e, 0x684b, 0x0004, + 0x0078, 0x873e, 0xa182, 0x0040, 0x0079, 0x8756, 0x8769, 0x8769, + 0x8769, 0x8769, 0x8769, 0x876b, 0x8769, 0x876e, 0x8769, 0x8769, + 0x8769, 0x8769, 0x8769, 0x8769, 0x8769, 0x8769, 0x8769, 0x8769, + 0x8769, 0x1078, 0x1332, 0x1078, 0x772d, 0x007c, 0x007e, 0x027e, + 0xa016, 0x1078, 0x15fa, 0x027f, 0x007f, 0x007c, 0xa182, 0x0085, + 0x0079, 0x877a, 0x8783, 0x8781, 0x8781, 0x878f, 0x8781, 0x8781, + 0x8781, 0x1078, 0x1332, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x027e, + 0x057e, 0x0d7e, 0x0e7e, 0x2071, 0xac80, 0x7224, 0x6212, 0x7220, + 0x1078, 0x8d02, 0x0040, 0x87b4, 0x2268, 0x6800, 0xa086, 0x0000, + 0x0040, 0x87b4, 0x6018, 0x6d18, 0xa52e, 0x00c0, 0x87b4, 0x0c7e, + 0x2d60, 0x1078, 0x8a03, 0x0c7f, 0x0040, 0x87b4, 0x6803, 0x0002, + 0x6007, 0x0086, 0x0078, 0x87b6, 0x6007, 0x0087, 0x6003, 0x0001, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0f7e, 0x2278, 0x1078, 0x4963, + 0x0f7f, 0x0040, 0x87ce, 0x6824, 0xd0ec, 0x0040, 0x87ce, 0x0c7e, + 0x2260, 0x603f, 0x0000, 0x1078, 0x8fcf, 0x0c7f, 0x0e7f, 0x0d7f, + 0x057f, 0x027f, 0x007c, 0xa186, 0x0013, 0x00c0, 0x87e4, 0x6004, + 0xa08a, 0x0085, 0x1048, 0x1332, 0xa08a, 0x008c, 0x10c8, 0x1332, + 0xa082, 0x0085, 0x0079, 0x87f3, 0xa186, 0x0027, 0x0040, 0x87ec, + 0xa186, 0x0014, 0x10c0, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ed6, + 0x1078, 0x62d1, 0x007c, 0x87fa, 0x87fc, 0x87fc, 0x87fa, 0x87fa, + 0x87fa, 0x87fa, 0x1078, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ed6, + 0x1078, 0x62d1, 0x007c, 0xa186, 0x0013, 0x00c0, 0x880d, 0x6004, + 0xa082, 0x0085, 0x2008, 0x0078, 0x8848, 0xa186, 0x0027, 0x00c0, + 0x8830, 0x1078, 0x61cd, 0x1078, 0x2880, 0x0d7e, 0x6010, 0x2068, + 0x1078, 0x8d16, 0x0040, 0x8826, 0x6837, 0x0103, 0x6847, 0x0000, + 0x684b, 0x0029, 0x1078, 0x4a73, 0x1078, 0x8ec9, 0x0d7f, 0x1078, + 0x772d, 0x1078, 0x62d1, 0x007c, 0x1078, 0x7773, 0x0078, 0x882b, + 0xa186, 0x0014, 0x00c0, 0x882c, 0x1078, 0x61cd, 0x0d7e, 0x6010, + 0x2068, 0x1078, 0x8d16, 0x0040, 0x8826, 0x6837, 0x0103, 0x6847, + 0x0000, 0x684b, 0x0006, 0x6850, 0xc0ec, 0x6852, 0x0078, 0x8822, + 0x0079, 0x884a, 0x8853, 0x8851, 0x8851, 0x8851, 0x8851, 0x8851, + 0x886e, 0x1078, 0x1332, 0x1078, 0x61cd, 0x6030, 0xa08c, 0xff00, + 0x810f, 0xa186, 0x0039, 0x0040, 0x8861, 0xa186, 0x0035, 0x00c0, + 0x8865, 0x2001, 0xa9a2, 0x0078, 0x8867, 0x2001, 0xa9a3, 0x2004, + 0x6016, 0x6003, 0x000c, 0x1078, 0x62d1, 0x007c, 0x1078, 0x61cd, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x887c, + 0xa186, 0x0035, 0x00c0, 0x8880, 0x2001, 0xa9a2, 0x0078, 0x8882, + 0x2001, 0xa9a3, 0x2004, 0x6016, 0x6003, 0x000e, 0x1078, 0x62d1, + 0x007c, 0xa182, 0x008c, 0x00c8, 0x8893, 0xa182, 0x0085, 0x0048, + 0x8893, 0x0079, 0x8896, 0x1078, 0x7773, 0x007c, 0x889d, 0x889d, + 0x889d, 0x889d, 0x889f, 0x88fc, 0x889d, 0x1078, 0x1332, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x88b2, 0x6030, 0xa08c, + 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x8913, 0xa186, 0x0035, + 0x0040, 0x8913, 0x0d7e, 0x1078, 0x8d16, 0x00c0, 0x88bb, 0x1078, + 0x8ec9, 0x0078, 0x88de, 0x6010, 0x2068, 0x684c, 0xd0e4, 0x00c0, + 0x88c3, 0x1078, 0x8ec9, 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0040, + 0x88cf, 0x684b, 0x0006, 0xc0ec, 0x6852, 0x0078, 0x88da, 0xd0bc, + 0x0040, 0x88d6, 0x684b, 0x0002, 0x0078, 0x88da, 0x684b, 0x0005, + 0x1078, 0x8f95, 0x6847, 0x0000, 0x1078, 0x4a73, 0x2c68, 0x1078, + 0x76c7, 0x0040, 0x88f7, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, + 0xac8e, 0x210c, 0x6136, 0x2009, 0xac8f, 0x210c, 0x613a, 0x6918, + 0x611a, 0x6920, 0x6122, 0x601f, 0x0001, 0x1078, 0x5d8a, 0x2d60, + 0x1078, 0x772d, 0x0d7f, 0x007c, 0x0f7e, 0x2c78, 0x1078, 0x4963, + 0x0f7f, 0x0040, 0x8939, 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, + 0x0035, 0x0040, 0x8913, 0xa186, 0x001e, 0x0040, 0x8913, 0xa186, + 0x0039, 0x00c0, 0x8939, 0x0d7e, 0x2c68, 0x1078, 0x91cc, 0x00c0, + 0x895d, 0x1078, 0x76c7, 0x0040, 0x8936, 0x6106, 0x6003, 0x0001, + 0x601f, 0x0001, 0x6918, 0x611a, 0x6928, 0x612a, 0x692c, 0x612e, + 0x6930, 0xa18c, 0x00ff, 0x6132, 0x6934, 0x6136, 0x6938, 0x613a, + 0x6920, 0x6122, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x2d60, 0x0078, + 0x895d, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x895d, + 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0040, 0x894c, 0xc0ec, 0x6852, + 0x684b, 0x0006, 0x0078, 0x8957, 0xd0bc, 0x0040, 0x8953, 0x684b, + 0x0002, 0x0078, 0x8957, 0x684b, 0x0005, 0x1078, 0x8f95, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x8ec9, 0x0d7f, 0x1078, 0x772d, + 0x007c, 0x017e, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, + 0x8971, 0x6837, 0x0103, 0x684b, 0x0028, 0x6847, 0x0000, 0x1078, + 0x4a73, 0x0d7f, 0x017f, 0xa186, 0x0013, 0x0040, 0x8983, 0xa186, + 0x0014, 0x0040, 0x8983, 0xa186, 0x0027, 0x0040, 0x8983, 0x1078, + 0x7773, 0x0078, 0x8989, 0x1078, 0x61cd, 0x1078, 0x8ed6, 0x1078, + 0x62d1, 0x007c, 0x057e, 0x067e, 0x0d7e, 0x0f7e, 0x2029, 0x0001, + 0xa182, 0x0101, 0x00c8, 0x8996, 0x0078, 0x8998, 0x2009, 0x0100, + 0x2130, 0x2069, 0xac98, 0x831c, 0x2300, 0xad18, 0x2009, 0x0020, + 0xaf90, 0x001d, 0x1078, 0x89f2, 0xa6b2, 0x0020, 0x7804, 0xa06d, + 0x0040, 0x89ac, 0x1078, 0x13b4, 0x1078, 0x138b, 0x0040, 0x89d6, + 0x8528, 0x6837, 0x0110, 0x683b, 0x0000, 0x2d20, 0x7c06, 0xa68a, + 0x003d, 0x00c8, 0x89c2, 0x2608, 0xad90, 0x000f, 0x1078, 0x89f2, + 0x0078, 0x89d6, 0xa6b2, 0x003c, 0x2009, 0x003c, 0x2d78, 0xad90, + 0x000f, 0x1078, 0x89f2, 0x0078, 0x89ac, 0x0f7f, 0x852f, 0xa5ad, + 0x0003, 0x7d36, 0xa5ac, 0x0000, 0x0078, 0x89db, 0x0f7f, 0x852f, + 0xa5ad, 0x0003, 0x7d36, 0x0d7f, 0x067f, 0x057f, 0x007c, 0x0f7e, + 0x8dff, 0x0040, 0x89f0, 0x6804, 0xa07d, 0x0040, 0x89ee, 0x6807, + 0x0000, 0x1078, 0x4a73, 0x2f68, 0x0078, 0x89e3, 0x1078, 0x4a73, + 0x0f7f, 0x007c, 0x157e, 0xa184, 0x0001, 0x0040, 0x89f8, 0x8108, + 0x810c, 0x21a8, 0x2304, 0x8007, 0x2012, 0x8318, 0x8210, 0x00f0, + 0x89fa, 0x157f, 0x007c, 0x067e, 0x127e, 0x2091, 0x8000, 0x2031, + 0x0001, 0x601c, 0xa084, 0x000f, 0x1079, 0x8a1f, 0x127f, 0x067f, + 0x007c, 0x127e, 0x2091, 0x8000, 0x067e, 0x2031, 0x0000, 0x601c, + 0xa084, 0x000f, 0x1079, 0x8a1f, 0x067f, 0x127f, 0x007c, 0x8a39, + 0x8a27, 0x8a34, 0x8a55, 0x8a27, 0x8a34, 0x8a55, 0x8a34, 0x1078, + 0x1332, 0x037e, 0x2019, 0x0010, 0x1078, 0x9dd7, 0x601f, 0x0006, + 0x6003, 0x0007, 0x037f, 0x007c, 0xa006, 0x007c, 0xa085, 0x0001, + 0x007c, 0x0d7e, 0x86ff, 0x00c0, 0x8a50, 0x6010, 0x2068, 0x1078, + 0x8d16, 0x0040, 0x8a52, 0xa00e, 0x2001, 0x0005, 0x1078, 0x4b51, + 0x1078, 0x8f95, 0x1078, 0x4a73, 0x1078, 0x772d, 0xa085, 0x0001, + 0x0d7f, 0x007c, 0xa006, 0x0078, 0x8a50, 0x6000, 0xa08a, 0x0010, + 0x10c8, 0x1332, 0x1079, 0x8a5d, 0x007c, 0x8a6d, 0x8a92, 0x8a6f, + 0x8ab5, 0x8a8e, 0x8a6d, 0x8a34, 0x8a39, 0x8a39, 0x8a34, 0x8a34, + 0x8a34, 0x8a34, 0x8a34, 0x8a34, 0x8a34, 0x1078, 0x1332, 0x86ff, + 0x00c0, 0x8a8b, 0x601c, 0xa086, 0x0006, 0x0040, 0x8a8b, 0x0d7e, + 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, 0x8a80, 0x1078, 0x8f95, + 0x0d7f, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x1078, + 0x5d8a, 0x1078, 0x62d1, 0xa085, 0x0001, 0x007c, 0x1078, 0x1757, + 0x0078, 0x8a6f, 0x0e7e, 0x2071, 0xa9b1, 0x7024, 0xac06, 0x00c0, + 0x8a9b, 0x1078, 0x6fc4, 0x601c, 0xa084, 0x000f, 0xa086, 0x0006, + 0x00c0, 0x8aad, 0x087e, 0x097e, 0x2049, 0x0001, 0x2c40, 0x1078, + 0x7246, 0x097f, 0x087f, 0x0078, 0x8aaf, 0x1078, 0x6ebe, 0x0e7f, + 0x00c0, 0x8a6f, 0x1078, 0x8a34, 0x007c, 0x037e, 0x0e7e, 0x2071, + 0xa9b1, 0x703c, 0xac06, 0x00c0, 0x8ac5, 0x2019, 0x0000, 0x1078, + 0x7058, 0x0e7f, 0x037f, 0x0078, 0x8a6f, 0x1078, 0x738a, 0x0e7f, + 0x037f, 0x00c0, 0x8a6f, 0x1078, 0x8a34, 0x007c, 0x0c7e, 0x601c, + 0xa084, 0x000f, 0x1079, 0x8ad6, 0x0c7f, 0x007c, 0x8ae5, 0x8b57, + 0x8c8f, 0x8af0, 0x8ed6, 0x8ae5, 0x9dc8, 0x772d, 0x8b57, 0x1078, + 0x8f10, 0x00c0, 0x8ae5, 0x1078, 0x7c83, 0x007c, 0x1078, 0x61cd, + 0x1078, 0x62d1, 0x1078, 0x772d, 0x007c, 0x6017, 0x0001, 0x007c, + 0x1078, 0x8d16, 0x0040, 0x8af8, 0x6010, 0xa080, 0x0019, 0x2c02, + 0x6000, 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8b00, 0x007c, + 0x8b10, 0x8b12, 0x8b34, 0x8b46, 0x8b53, 0x8b10, 0x8ae5, 0x8ae5, + 0x8ae5, 0x8b46, 0x8b46, 0x8b10, 0x8b10, 0x8b10, 0x8b10, 0x8b50, + 0x1078, 0x1332, 0x0e7e, 0x6010, 0x2070, 0x7050, 0xc0b5, 0x7052, + 0x2071, 0xa9b1, 0x7024, 0xac06, 0x0040, 0x8b30, 0x1078, 0x6ebe, + 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x2001, 0xa9a3, + 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0e7f, 0x007c, + 0x6017, 0x0001, 0x0078, 0x8b2e, 0x0d7e, 0x6010, 0x2068, 0x6850, + 0xc0b5, 0x6852, 0x0d7f, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, + 0x0002, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x007c, 0x0d7e, 0x6017, + 0x0001, 0x6010, 0x2068, 0x6850, 0xc0b5, 0x6852, 0x0d7f, 0x007c, + 0x1078, 0x772d, 0x007c, 0x1078, 0x1757, 0x0078, 0x8b34, 0x6000, + 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8b5f, 0x007c, 0x8b6f, + 0x8aed, 0x8b71, 0x8b6f, 0x8b71, 0x8b71, 0x8ae6, 0x8b6f, 0x8adf, + 0x8adf, 0x8b6f, 0x8b6f, 0x8b6f, 0x8b6f, 0x8b6f, 0x8b6f, 0x1078, + 0x1332, 0x0d7e, 0x6018, 0x2068, 0x6804, 0xa084, 0x00ff, 0x0d7f, + 0xa08a, 0x000c, 0x10c8, 0x1332, 0x1079, 0x8b7f, 0x007c, 0x8b8b, + 0x8c33, 0x8b8d, 0x8bcd, 0x8b8d, 0x8bcd, 0x8b8d, 0x8b9a, 0x8b8b, + 0x8bcd, 0x8b8b, 0x8bb7, 0x1078, 0x1332, 0x6004, 0xa08e, 0x0016, + 0x0040, 0x8bc8, 0xa08e, 0x0004, 0x0040, 0x8bc8, 0xa08e, 0x0002, + 0x0040, 0x8bc8, 0x6004, 0x1078, 0x8f10, 0x0040, 0x8c4e, 0xa08e, + 0x0021, 0x0040, 0x8c52, 0xa08e, 0x0022, 0x0040, 0x8c4e, 0xa08e, + 0x003d, 0x0040, 0x8c52, 0xa08e, 0x0039, 0x0040, 0x8c56, 0xa08e, + 0x0035, 0x0040, 0x8c56, 0xa08e, 0x001e, 0x0040, 0x8bca, 0xa08e, + 0x0001, 0x00c0, 0x8bc6, 0x0d7e, 0x6018, 0x2068, 0x6804, 0xa084, + 0x00ff, 0x0d7f, 0xa086, 0x0006, 0x0040, 0x8bc8, 0x1078, 0x2880, + 0x1078, 0x7c83, 0x1078, 0x8ed6, 0x007c, 0x0c7e, 0x0d7e, 0x6104, + 0xa186, 0x0016, 0x0040, 0x8c23, 0xa186, 0x0002, 0x00c0, 0x8bf6, + 0x6018, 0x2068, 0x68a0, 0xd0bc, 0x00c0, 0x8c7a, 0x6840, 0xa084, + 0x00ff, 0xa005, 0x0040, 0x8bf6, 0x8001, 0x6842, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x1078, 0x76c7, 0x0040, 0x8bf6, + 0x2d00, 0x601a, 0x601f, 0x0001, 0x0078, 0x8c23, 0x0d7f, 0x0c7f, + 0x6004, 0xa08e, 0x0002, 0x00c0, 0x8c14, 0x6018, 0xa080, 0x0028, + 0x2004, 0xa086, 0x007e, 0x00c0, 0x8c14, 0x2009, 0xa733, 0x2104, + 0xc085, 0x200a, 0x0e7e, 0x2071, 0xa700, 0x1078, 0x42b8, 0x0e7f, + 0x1078, 0x7c83, 0x0078, 0x8c18, 0x1078, 0x7c83, 0x1078, 0x2880, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x1078, 0x28a6, 0x127f, 0x0e7f, + 0x1078, 0x8ed6, 0x007c, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, + 0x0001, 0x6007, 0x0002, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0d7f, + 0x0c7f, 0x0078, 0x8c22, 0x0c7e, 0x0d7e, 0x6104, 0xa186, 0x0016, + 0x0040, 0x8c23, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, + 0x0040, 0x8bf6, 0x8001, 0x6842, 0x6003, 0x0001, 0x1078, 0x5dd7, + 0x1078, 0x62d1, 0x0d7f, 0x0c7f, 0x0078, 0x8c22, 0x1078, 0x7c83, + 0x0078, 0x8bca, 0x1078, 0x7ca6, 0x0078, 0x8bca, 0x0d7e, 0x2c68, + 0x6104, 0x1078, 0x91cc, 0x0d7f, 0x0040, 0x8c62, 0x1078, 0x772d, + 0x0078, 0x8c79, 0x6004, 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, + 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x6038, + 0x600a, 0x2001, 0xa9a3, 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, + 0x62d1, 0x007c, 0x0d7f, 0x0c7f, 0x1078, 0x7c83, 0x1078, 0x2880, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x1078, 0x28a6, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x127f, 0x0e7f, 0x007c, 0x6000, + 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8c97, 0x007c, 0x8ca7, + 0x8ca7, 0x8ca7, 0x8ca7, 0x8ca7, 0x8ca7, 0x8ca7, 0x8ca7, 0x8ca7, + 0x8ae5, 0x8ca7, 0x8aed, 0x8ca9, 0x8aed, 0x8cb7, 0x8ca7, 0x1078, + 0x1332, 0x6004, 0xa086, 0x008b, 0x0040, 0x8cb7, 0x6007, 0x008b, + 0x6003, 0x000d, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x007c, 0x1078, + 0x8ec9, 0x1078, 0x8d16, 0x0040, 0x8cef, 0x1078, 0x2880, 0x0d7e, + 0x1078, 0x8d16, 0x0040, 0x8cd1, 0x6010, 0x2068, 0x6837, 0x0103, + 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ed, 0x6852, 0x1078, + 0x4a73, 0x2c68, 0x1078, 0x76c7, 0x0040, 0x8cdf, 0x6818, 0x601a, + 0x0c7e, 0x2d60, 0x1078, 0x8ed6, 0x0c7f, 0x0078, 0x8ce0, 0x2d60, + 0x0d7f, 0x6013, 0x0000, 0x601f, 0x0001, 0x6007, 0x0001, 0x6003, + 0x0001, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0078, 0x8d01, 0x6030, + 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x8cfb, 0xa186, + 0x0035, 0x00c0, 0x8cff, 0x1078, 0x2880, 0x0078, 0x8cd1, 0x1078, + 0x8ed6, 0x007c, 0xa284, 0x000f, 0x00c0, 0x8d13, 0xa282, 0xae00, + 0x0048, 0x8d13, 0x2001, 0xa716, 0x2004, 0xa202, 0x00c8, 0x8d13, + 0xa085, 0x0001, 0x007c, 0xa006, 0x0078, 0x8d12, 0x027e, 0x0e7e, + 0x2071, 0xa700, 0x6210, 0x705c, 0xa202, 0x0048, 0x8d28, 0x7060, + 0xa202, 0x00c8, 0x8d28, 0xa085, 0x0001, 0x0e7f, 0x027f, 0x007c, + 0xa006, 0x0078, 0x8d25, 0x0e7e, 0x0c7e, 0x037e, 0x007e, 0x127e, + 0x2091, 0x8000, 0x2061, 0xae00, 0x2071, 0xa700, 0x7348, 0x7064, + 0xa302, 0x00c8, 0x8d55, 0x601c, 0xa206, 0x00c0, 0x8d4d, 0x1078, + 0x903b, 0x0040, 0x8d4d, 0x1078, 0x8f10, 0x00c0, 0x8d49, 0x1078, + 0x7c83, 0x0c7e, 0x1078, 0x772d, 0x0c7f, 0xace0, 0x0010, 0x7058, + 0xac02, 0x00c8, 0x8d55, 0x0078, 0x8d36, 0x127f, 0x007f, 0x037f, + 0x0c7f, 0x0e7f, 0x007c, 0x0e7e, 0x0c7e, 0x017e, 0xa188, 0xa835, + 0x210c, 0x81ff, 0x0040, 0x8d69, 0x2061, 0xaab3, 0x611a, 0x1078, + 0x2880, 0xa006, 0x0078, 0x8d6e, 0xa085, 0x0001, 0x017f, 0x0c7f, + 0x0e7f, 0x007c, 0x0c7e, 0x057e, 0x127e, 0x2091, 0x8000, 0x0c7e, + 0x1078, 0x76c7, 0x057f, 0x0040, 0x8d8b, 0x6612, 0x651a, 0x601f, + 0x0003, 0x2009, 0x004b, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, + 0x057f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8d87, 0x0c7e, 0x057e, + 0x127e, 0x2091, 0x8000, 0x62a0, 0x0c7e, 0x1078, 0x76c7, 0x057f, + 0x0040, 0x8db9, 0x6013, 0x0000, 0x651a, 0x601f, 0x0003, 0x0c7e, + 0x2560, 0x1078, 0x47e9, 0x0c7f, 0x1078, 0x5f01, 0x077e, 0x2039, + 0x0000, 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f9b, 0x077f, 0x2009, + 0x004c, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x057f, 0x0c7f, + 0x007c, 0xa006, 0x0078, 0x8db5, 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, + 0x1078, 0x76c7, 0x2c78, 0x0c7f, 0x0040, 0x8dd6, 0x7e12, 0x2c00, + 0x781a, 0x781f, 0x0003, 0x2021, 0x0005, 0x1078, 0x8e21, 0x2f60, + 0x2009, 0x004d, 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, + 0x0f7f, 0x007c, 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, 0x1078, 0x76c7, + 0x2c78, 0x0c7f, 0x0040, 0x8df4, 0x7e12, 0x2c00, 0x781a, 0x781f, + 0x0003, 0x2021, 0x0005, 0x1078, 0x8e21, 0x2f60, 0x2009, 0x004e, + 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, 0x0f7f, 0x007c, + 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, 0x1078, 0x76c7, 0x2c78, 0x0c7f, + 0x0040, 0x8e1d, 0x7e12, 0x2c00, 0x781a, 0x781f, 0x0003, 0x2021, + 0x0004, 0x1078, 0x8e21, 0x2001, 0xa99d, 0x2004, 0xd0fc, 0x0040, + 0x8e16, 0x2f60, 0x1078, 0x772d, 0x0078, 0x8e1b, 0x2f60, 0x2009, + 0x0052, 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, 0x0f7f, + 0x007c, 0x097e, 0x077e, 0x127e, 0x2091, 0x8000, 0x1078, 0x4775, + 0x0040, 0x8e2e, 0x2001, 0x8e26, 0x0078, 0x8e34, 0x1078, 0x4739, + 0x0040, 0x8e3d, 0x2001, 0x8e2e, 0x007e, 0xa00e, 0x2400, 0x1078, + 0x4b51, 0x1078, 0x4a73, 0x007f, 0x007a, 0x2418, 0x1078, 0x6161, + 0x62a0, 0x087e, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x1078, + 0x5f1b, 0x087f, 0x1078, 0x5e0a, 0x2f08, 0x2648, 0x1078, 0x9f9b, + 0x613c, 0x81ff, 0x1040, 0x5fdb, 0x1078, 0x62d1, 0x127f, 0x077f, + 0x097f, 0x007c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8e73, 0x660a, 0x611a, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x001f, 0x1078, 0x775c, 0xa085, 0x0001, + 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8e70, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x8e8f, + 0x660a, 0x611a, 0x601f, 0x0008, 0x2d00, 0x6012, 0x2009, 0x0021, + 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, + 0x0078, 0x8e8c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8eab, 0x660a, 0x611a, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x003d, 0x1078, 0x775c, 0xa085, 0x0001, + 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8ea8, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x8ec6, + 0x611a, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0000, 0x1078, + 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, + 0x8ec3, 0x027e, 0x0d7e, 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0040, + 0x8ed3, 0x8211, 0x6a3e, 0x0d7f, 0x027f, 0x007c, 0x007e, 0x6000, + 0xa086, 0x0000, 0x0040, 0x8ee8, 0x6013, 0x0000, 0x601f, 0x0007, + 0x2001, 0xa9a3, 0x2004, 0x6016, 0x1078, 0xa4a5, 0x603f, 0x0000, + 0x007f, 0x007c, 0x067e, 0x0c7e, 0x0d7e, 0x2031, 0xa753, 0x2634, + 0xd6e4, 0x0040, 0x8ef8, 0x6618, 0x2660, 0x6e48, 0x1078, 0x46e7, + 0x0d7f, 0x0c7f, 0x067f, 0x007c, 0x007e, 0x017e, 0x6004, 0xa08e, + 0x0002, 0x0040, 0x8f0d, 0xa08e, 0x0003, 0x0040, 0x8f0d, 0xa08e, + 0x0004, 0x0040, 0x8f0d, 0xa085, 0x0001, 0x017f, 0x007f, 0x007c, + 0x007e, 0x0d7e, 0x6010, 0xa06d, 0x0040, 0x8f1d, 0x6838, 0xd0fc, + 0x0040, 0x8f1d, 0xa006, 0x0078, 0x8f1f, 0xa085, 0x0001, 0x0d7f, + 0x007f, 0x007c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8f3c, 0x611a, 0x601f, 0x0001, 0x2d00, + 0x6012, 0x1078, 0x2880, 0x2009, 0x0028, 0x1078, 0x775c, 0xa085, + 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8f39, 0xa186, + 0x0015, 0x00c0, 0x8f54, 0x2011, 0xa720, 0x2204, 0xa086, 0x0074, + 0x00c0, 0x8f54, 0x1078, 0x7f91, 0x6003, 0x0001, 0x6007, 0x0029, + 0x1078, 0x5dd7, 0x0078, 0x8f58, 0x1078, 0x7c83, 0x1078, 0x772d, + 0x007c, 0xa186, 0x0016, 0x00c0, 0x8f63, 0x2001, 0x0004, 0x1078, + 0x4502, 0x0078, 0x8f84, 0xa186, 0x0015, 0x00c0, 0x8f88, 0x2011, + 0xa720, 0x2204, 0xa086, 0x0014, 0x00c0, 0x8f88, 0x0d7e, 0x6018, + 0x2068, 0x1078, 0x4649, 0x0d7f, 0x1078, 0x8043, 0x00c0, 0x8f88, + 0x0d7e, 0x6018, 0x2068, 0x6890, 0x0d7f, 0xa005, 0x0040, 0x8f88, + 0x2001, 0x0006, 0x1078, 0x4502, 0x1078, 0x77f8, 0x0078, 0x8f8c, + 0x1078, 0x7c83, 0x1078, 0x772d, 0x007c, 0x6848, 0xa086, 0x0005, + 0x00c0, 0x8f94, 0x1078, 0x8f95, 0x007c, 0x6850, 0xc0ad, 0x6852, + 0x007c, 0x0e7e, 0x2071, 0xac8c, 0x7014, 0xd0e4, 0x0040, 0x8faa, + 0x6013, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x1078, 0x5d8a, + 0x1078, 0x62d1, 0x0e7f, 0x007c, 0x0c7e, 0x0f7e, 0x2c78, 0x1078, + 0x4963, 0x0f7f, 0x0040, 0x8fb9, 0x601c, 0xa084, 0x000f, 0x1079, + 0x8fbb, 0x0c7f, 0x007c, 0x8ae5, 0x8fc6, 0x8fc9, 0x8fcc, 0xa26d, + 0xa289, 0xa28c, 0x8ae5, 0x8ae5, 0x1078, 0x1332, 0x0005, 0x0005, + 0x007c, 0x0005, 0x0005, 0x007c, 0x1078, 0x8fcf, 0x007c, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0040, 0x8ffe, 0x1078, 0x76c7, 0x00c0, + 0x8fdf, 0x2001, 0xa9a4, 0x2004, 0x783e, 0x0078, 0x8ffe, 0x7818, + 0x601a, 0x781c, 0xa086, 0x0003, 0x0040, 0x8fec, 0x7808, 0x6036, + 0x2f00, 0x603a, 0x0078, 0x8ff0, 0x7808, 0x603a, 0x2f00, 0x6036, + 0x602a, 0x601f, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x7920, + 0x6122, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x2f60, 0x0f7f, 0x007c, + 0x017e, 0x0f7e, 0x682c, 0x6032, 0xa08e, 0x0001, 0x0040, 0x9011, + 0xa086, 0x0005, 0x0040, 0x9015, 0xa006, 0x602a, 0x602e, 0x0078, + 0x9026, 0x6824, 0xc0f4, 0xc0d5, 0x6826, 0x6810, 0x2078, 0x787c, + 0x6938, 0xa102, 0x7880, 0x6934, 0xa103, 0x00c8, 0x900c, 0x6834, + 0x602a, 0x6838, 0xa084, 0xfffc, 0x683a, 0x602e, 0x2d00, 0x6036, + 0x6808, 0x603a, 0x6918, 0x611a, 0x6920, 0x6122, 0x601f, 0x0001, + 0x6007, 0x0039, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x6803, 0x0002, + 0x0f7f, 0x017f, 0x007c, 0x007e, 0x017e, 0x6004, 0xa08e, 0x0034, + 0x0040, 0x9060, 0xa08e, 0x0035, 0x0040, 0x9060, 0xa08e, 0x0036, + 0x0040, 0x9060, 0xa08e, 0x0037, 0x0040, 0x9060, 0xa08e, 0x0038, + 0x0040, 0x9060, 0xa08e, 0x0039, 0x0040, 0x9060, 0xa08e, 0x003a, + 0x0040, 0x9060, 0xa08e, 0x003b, 0x0040, 0x9060, 0xa085, 0x0001, + 0x017f, 0x007f, 0x007c, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x00c0, + 0x906d, 0xa085, 0x0001, 0x0078, 0x907c, 0x6024, 0xd0f4, 0x00c0, + 0x907b, 0xc0f5, 0x6026, 0x6010, 0x2078, 0x7828, 0x603a, 0x782c, + 0x6036, 0x1078, 0x1757, 0xa006, 0x0f7f, 0x007c, 0x007e, 0x017e, + 0x027e, 0x037e, 0x0e7e, 0x2001, 0xa99e, 0x200c, 0x8000, 0x2014, + 0x2001, 0x0032, 0x1078, 0x5c1c, 0x2001, 0xa9a2, 0x82ff, 0x00c0, + 0x9093, 0x2011, 0x0014, 0x2202, 0x2001, 0xa9a0, 0x200c, 0x8000, + 0x2014, 0x2071, 0xa98d, 0x711a, 0x721e, 0x2001, 0x0064, 0x1078, + 0x5c1c, 0x2001, 0xa9a3, 0x82ff, 0x00c0, 0x90a8, 0x2011, 0x0014, + 0x2202, 0x2009, 0xa9a4, 0xa280, 0x000a, 0x200a, 0x1078, 0x498b, + 0x0e7f, 0x037f, 0x027f, 0x017f, 0x007f, 0x007c, 0x007e, 0x0e7e, + 0x2001, 0xa9a2, 0x2003, 0x0028, 0x2001, 0xa9a3, 0x2003, 0x0014, + 0x2071, 0xa98d, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0xa9a4, + 0x2003, 0x001e, 0x0e7f, 0x007f, 0x007c, 0x0c7e, 0x127e, 0x2091, + 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x90e5, 0x611a, + 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0033, 0x1078, 0x775c, + 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x90e2, + 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, 0xa700, 0xa186, 0x0015, 0x00c0, + 0x9117, 0x7080, 0xa086, 0x0018, 0x00c0, 0x9117, 0x6010, 0x2068, + 0x6a3c, 0xd2e4, 0x00c0, 0x910b, 0x2c78, 0x1078, 0x6490, 0x0040, + 0x911f, 0x706c, 0x6a50, 0xa206, 0x00c0, 0x9113, 0x7070, 0x6a54, + 0xa206, 0x00c0, 0x9113, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, + 0x0000, 0x1078, 0x28c8, 0x1078, 0x77f8, 0x0078, 0x911b, 0x1078, + 0x7c83, 0x1078, 0x772d, 0x0f7f, 0x0e7f, 0x0d7f, 0x007c, 0x7050, + 0xa080, 0x29c0, 0x2004, 0x6a54, 0xa206, 0x0040, 0x910b, 0x0078, + 0x9113, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, + 0x017f, 0x0040, 0x9141, 0x611a, 0x601f, 0x0001, 0x2d00, 0x6012, + 0x2009, 0x0043, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, + 0x007c, 0xa006, 0x0078, 0x913e, 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, + 0xa700, 0xa186, 0x0015, 0x00c0, 0x916a, 0x7080, 0xa086, 0x0004, + 0x00c0, 0x916a, 0x6010, 0xa0e8, 0x000f, 0x2c78, 0x1078, 0x6490, + 0x0040, 0x9172, 0x706c, 0x6a08, 0xa206, 0x00c0, 0x9166, 0x7070, + 0x6a0c, 0xa206, 0x00c0, 0x9166, 0x1078, 0x2880, 0x1078, 0x77f8, + 0x0078, 0x916e, 0x1078, 0x7c83, 0x1078, 0x772d, 0x0f7f, 0x0e7f, + 0x0d7f, 0x007c, 0x7050, 0xa080, 0x29c0, 0x2004, 0x6a0c, 0xa206, + 0x0040, 0x9164, 0x0078, 0x9166, 0x017e, 0x027e, 0x684c, 0xd0ac, + 0x0040, 0x9194, 0x6914, 0x6a10, 0x2100, 0xa205, 0x0040, 0x9194, + 0x6860, 0xa106, 0x00c0, 0x9190, 0x685c, 0xa206, 0x0040, 0x9194, + 0x6962, 0x6a5e, 0xa085, 0x0001, 0x027f, 0x017f, 0x007c, 0x0e7e, + 0x127e, 0x2071, 0xa700, 0x2091, 0x8000, 0x7548, 0xa582, 0x0001, + 0x0048, 0x91c9, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0040, + 0x91b5, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, 0x91b1, 0x0078, + 0x91a4, 0x2061, 0xae00, 0x0078, 0x91a4, 0x6003, 0x0008, 0x8529, + 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, 0x91c5, 0x754e, + 0xa085, 0x0001, 0x127f, 0x0e7f, 0x007c, 0x704f, 0xae00, 0x0078, + 0x91c0, 0xa006, 0x0078, 0x91c2, 0x0c7e, 0x027e, 0x017e, 0xa186, + 0x0035, 0x0040, 0x91d6, 0x6a34, 0x0078, 0x91d7, 0x6a28, 0x1078, + 0x8d02, 0x0040, 0x9200, 0x2260, 0x611c, 0xa186, 0x0003, 0x0040, + 0x91e5, 0xa186, 0x0006, 0x00c0, 0x91fc, 0x6834, 0xa206, 0x0040, + 0x91f4, 0x6838, 0xa206, 0x00c0, 0x91fc, 0x6108, 0x6834, 0xa106, + 0x00c0, 0x91fc, 0x0078, 0x91f9, 0x6008, 0x6938, 0xa106, 0x00c0, + 0x91fc, 0x6018, 0x6918, 0xa106, 0x017f, 0x027f, 0x0c7f, 0x007c, + 0xa085, 0x0001, 0x0078, 0x91fc, 0x6944, 0xd1cc, 0x0040, 0x921d, + 0xa18c, 0x00ff, 0xa18e, 0x0002, 0x00c0, 0x921d, 0xad88, 0x001e, + 0x210c, 0xa18c, 0x0f00, 0x810f, 0xa18e, 0x0001, 0x00c0, 0x921d, + 0x6810, 0x6914, 0xa115, 0x10c0, 0x84e2, 0x007c, 0x067e, 0x6000, + 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x9228, 0x067f, 0x007c, + 0x9238, 0x96ef, 0x980b, 0x9238, 0x9238, 0x9238, 0x9238, 0x9238, + 0x9272, 0x989e, 0x9238, 0x9238, 0x9238, 0x9238, 0x9238, 0x9238, + 0x1078, 0x1332, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, 0x1332, + 0x1079, 0x9244, 0x067f, 0x007c, 0x9254, 0x9d63, 0x9254, 0x9254, + 0x9254, 0x9254, 0x9254, 0x9254, 0x9d21, 0x9db1, 0x9254, 0xa3c0, + 0xa3f4, 0xa3c0, 0xa3f4, 0x9254, 0x1078, 0x1332, 0x067e, 0x6000, + 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x9260, 0x067f, 0x007c, + 0x9270, 0x99fb, 0x9ad7, 0x9b05, 0x9b80, 0x9270, 0x9c86, 0x9c2e, + 0x98aa, 0x9cf5, 0x9d0b, 0x9270, 0x9270, 0x9270, 0x9270, 0x9270, + 0x1078, 0x1332, 0xa1b2, 0x0044, 0x10c8, 0x1332, 0x2100, 0x0079, + 0x9279, 0x92b9, 0x94a8, 0x92b9, 0x92b9, 0x92b9, 0x94b0, 0x92b9, + 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, + 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, + 0x92bb, 0x9321, 0x9330, 0x9387, 0x93a6, 0x9425, 0x9495, 0x92b9, + 0x92b9, 0x94b4, 0x92b9, 0x92b9, 0x94c7, 0x94d2, 0x92b9, 0x92b9, + 0x92b9, 0x92b9, 0x92b9, 0x950a, 0x92b9, 0x92b9, 0x9519, 0x92b9, + 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x9532, 0x92b9, 0x92b9, + 0x92b9, 0x95bf, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, 0x92b9, + 0x9639, 0x1078, 0x1332, 0x1078, 0x4967, 0x00c0, 0x92cb, 0x2001, + 0xa733, 0x2004, 0xd0cc, 0x00c0, 0x92cb, 0xa084, 0x0009, 0xa086, + 0x0008, 0x00c0, 0x92d3, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, + 0x0000, 0x0078, 0x94a3, 0x1078, 0x4957, 0x0e7e, 0x0c7e, 0x037e, + 0x027e, 0x017e, 0x6218, 0x2270, 0x72a0, 0x027e, 0x2019, 0x0029, + 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x2c08, + 0x1078, 0x9f9b, 0x077f, 0x017f, 0x2e60, 0x1078, 0x47e9, 0x017f, + 0x027f, 0x037f, 0x0c7f, 0x0e7f, 0x6618, 0x0c7e, 0x2660, 0x1078, + 0x45d6, 0x0c7f, 0xa6b0, 0x0001, 0x2634, 0xa684, 0x00ff, 0xa082, + 0x0006, 0x0048, 0x9313, 0x1078, 0x9ecf, 0x00c0, 0x9381, 0x1078, + 0x9e60, 0x00c0, 0x930f, 0x6007, 0x0008, 0x0078, 0x94a3, 0x6007, + 0x0009, 0x0078, 0x94a3, 0x1078, 0xa0af, 0x0040, 0x931d, 0x1078, + 0x9ecf, 0x0040, 0x9307, 0x0078, 0x9381, 0x6013, 0x1900, 0x0078, + 0x930f, 0x1078, 0x29bb, 0x00c0, 0x9674, 0x6106, 0x1078, 0x9e15, + 0x6007, 0x0006, 0x0078, 0x94a3, 0x6007, 0x0007, 0x0078, 0x94a3, + 0x1078, 0xa42c, 0x00c0, 0x9674, 0x1078, 0x29bb, 0x00c0, 0x9674, + 0x0d7e, 0x6618, 0x2668, 0x6e04, 0xa684, 0x00ff, 0xa082, 0x0006, + 0x00c8, 0x9346, 0x2001, 0x0001, 0x1078, 0x44ee, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x9363, 0xa686, 0x0004, 0x0040, + 0x9363, 0x6e04, 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0040, 0x9363, + 0xa686, 0x0004, 0x0040, 0x9363, 0xa686, 0x0005, 0x0040, 0x9363, + 0x0d7f, 0x0078, 0x9381, 0x1078, 0x9f35, 0x00c0, 0x937c, 0xa686, + 0x0006, 0x00c0, 0x9375, 0x027e, 0x6218, 0xa290, 0x0028, 0x2214, + 0x2009, 0x0000, 0x1078, 0x28c8, 0x027f, 0x1078, 0x4649, 0x6007, + 0x000a, 0x0d7f, 0x0078, 0x94a3, 0x6007, 0x000b, 0x0d7f, 0x0078, + 0x94a3, 0x1078, 0x2880, 0x6007, 0x0001, 0x0078, 0x94a3, 0x1078, + 0xa42c, 0x00c0, 0x9674, 0x1078, 0x29bb, 0x00c0, 0x9674, 0x6618, + 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa686, 0x0707, 0x0040, 0x9381, + 0x027e, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, 0x0000, 0x1078, + 0x28c8, 0x027f, 0x6007, 0x000c, 0x0078, 0x94a3, 0x1078, 0x4967, + 0x00c0, 0x93b3, 0x2001, 0xa733, 0x2004, 0xa084, 0x0009, 0xa086, + 0x0008, 0x00c0, 0x93bb, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, + 0x0000, 0x0078, 0x94a3, 0x1078, 0x4957, 0x6618, 0xa6b0, 0x0001, + 0x2634, 0xa684, 0x00ff, 0xa082, 0x0006, 0x0048, 0x93ff, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0004, 0x0040, 0x93d2, 0xa686, 0x0006, + 0x00c0, 0x9381, 0x1078, 0x9f44, 0x00c0, 0x93da, 0x6007, 0x000e, + 0x0078, 0x94a3, 0x047e, 0x6418, 0xa4a0, 0x0028, 0x2424, 0xa4a4, + 0x00ff, 0x8427, 0x047e, 0x1078, 0x2880, 0x047f, 0x017e, 0xa006, + 0x2009, 0xa753, 0x210c, 0xd1a4, 0x0040, 0x93f9, 0x2009, 0x0029, + 0x1078, 0xa22d, 0x6018, 0x0d7e, 0x2068, 0x6800, 0xc0e5, 0x6802, + 0x0d7f, 0x017f, 0x047f, 0x6007, 0x0001, 0x0078, 0x94a3, 0x2001, + 0x0001, 0x1078, 0x44ee, 0x157e, 0x017e, 0x027e, 0x037e, 0x20a9, + 0x0004, 0x2019, 0xa705, 0x2011, 0xac90, 0x1078, 0x80de, 0x037f, + 0x027f, 0x017f, 0x157f, 0xa005, 0x0040, 0x941f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x93d2, 0x0078, 0x9381, 0x6013, + 0x1900, 0x6007, 0x0009, 0x0078, 0x94a3, 0x1078, 0x4967, 0x00c0, + 0x9432, 0x2001, 0xa733, 0x2004, 0xa084, 0x0009, 0xa086, 0x0008, + 0x00c0, 0x943a, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, 0x0000, + 0x0078, 0x94a3, 0x1078, 0x4957, 0x6618, 0xa6b0, 0x0001, 0x2634, + 0xa684, 0x00ff, 0xa082, 0x0006, 0x0048, 0x9482, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0004, 0x0040, 0x9451, 0xa686, 0x0006, 0x00c0, + 0x9381, 0x1078, 0x9f6f, 0x00c0, 0x945d, 0x1078, 0x9e60, 0x00c0, + 0x945d, 0x6007, 0x0010, 0x0078, 0x94a3, 0x047e, 0x6418, 0xa4a0, + 0x0028, 0x2424, 0xa4a4, 0x00ff, 0x8427, 0x047e, 0x1078, 0x2880, + 0x047f, 0x017e, 0xa006, 0x2009, 0xa753, 0x210c, 0xd1a4, 0x0040, + 0x947c, 0x2009, 0x0029, 0x1078, 0xa22d, 0x6018, 0x0d7e, 0x2068, + 0x6800, 0xc0e5, 0x6802, 0x0d7f, 0x017f, 0x047f, 0x6007, 0x0001, + 0x0078, 0x94a3, 0x1078, 0xa0af, 0x0040, 0x948f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x9451, 0x0078, 0x9381, 0x6013, + 0x1900, 0x6007, 0x0009, 0x0078, 0x94a3, 0x1078, 0x29bb, 0x00c0, + 0x9674, 0x1078, 0xa42c, 0x00c0, 0x9674, 0x1078, 0x9677, 0x00c0, + 0x9381, 0x6007, 0x0012, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x007c, + 0x6007, 0x0001, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x0078, 0x94a7, + 0x6007, 0x0005, 0x0078, 0x94aa, 0x1078, 0xa42c, 0x00c0, 0x9674, + 0x1078, 0x29bb, 0x00c0, 0x9674, 0x1078, 0x9677, 0x00c0, 0x9381, + 0x6007, 0x0020, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x007c, 0x1078, + 0x29bb, 0x00c0, 0x9674, 0x6007, 0x0023, 0x6003, 0x0001, 0x1078, + 0x5dd7, 0x007c, 0x1078, 0xa42c, 0x00c0, 0x9674, 0x1078, 0x29bb, + 0x00c0, 0x9674, 0x1078, 0x9677, 0x00c0, 0x9381, 0x017e, 0x027e, + 0x2011, 0xac90, 0x2214, 0x2c08, 0xa006, 0x1078, 0xa1f6, 0x00c0, + 0x94f9, 0x2160, 0x6007, 0x0026, 0x6013, 0x1700, 0x2011, 0xac89, + 0x2214, 0xa296, 0xffff, 0x00c0, 0x9503, 0x6007, 0x0025, 0x0078, + 0x9503, 0x6004, 0xa086, 0x0024, 0x00c0, 0x9500, 0x1078, 0x772d, + 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x027f, + 0x017f, 0x007c, 0x1078, 0x29bb, 0x00c0, 0x9674, 0x6106, 0x1078, + 0x9697, 0x6007, 0x002b, 0x0078, 0x94a3, 0x6007, 0x002c, 0x0078, + 0x94a3, 0x1078, 0xa42c, 0x00c0, 0x9674, 0x1078, 0x29bb, 0x00c0, + 0x9674, 0x1078, 0x9677, 0x00c0, 0x9381, 0x6106, 0x1078, 0x969c, + 0x00c0, 0x952e, 0x6007, 0x002e, 0x0078, 0x94a3, 0x6007, 0x002f, + 0x0078, 0x94a3, 0x1078, 0x29bb, 0x00c0, 0x9674, 0x0e7e, 0x0d7e, + 0x0c7e, 0x6018, 0xa080, 0x0001, 0x200c, 0xa184, 0x00ff, 0xa086, + 0x0006, 0x0040, 0x954f, 0xa184, 0xff00, 0x8007, 0xa086, 0x0006, + 0x0040, 0x954f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0078, 0x94a8, 0x2001, + 0xa772, 0x2004, 0xd0e4, 0x0040, 0x95bb, 0x2071, 0xac8c, 0x7010, + 0x6036, 0x7014, 0x603a, 0x7108, 0x720c, 0x2001, 0xa753, 0x2004, + 0xd0a4, 0x0040, 0x956d, 0x6018, 0x2068, 0x6810, 0xa106, 0x00c0, + 0x956d, 0x6814, 0xa206, 0x0040, 0x9591, 0x2001, 0xa753, 0x2004, + 0xd0ac, 0x00c0, 0x95af, 0x2069, 0xa700, 0x6870, 0xa206, 0x00c0, + 0x95af, 0x686c, 0xa106, 0x00c0, 0x95af, 0x7210, 0x1078, 0x8d02, + 0x0040, 0x95b5, 0x1078, 0xa29e, 0x0040, 0x95b5, 0x622a, 0x6007, + 0x0036, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x0c7f, 0x0d7f, 0x0e7f, + 0x007c, 0x7214, 0xa286, 0xffff, 0x0040, 0x95a3, 0x1078, 0x8d02, + 0x0040, 0x95b5, 0xa280, 0x0002, 0x2004, 0x7110, 0xa106, 0x00c0, + 0x95b5, 0x0078, 0x957e, 0x7210, 0x2c08, 0xa085, 0x0001, 0x1078, + 0xa1f6, 0x2c10, 0x2160, 0x0040, 0x95b5, 0x0078, 0x957e, 0x6007, + 0x0037, 0x6013, 0x1500, 0x0078, 0x9589, 0x6007, 0x0037, 0x6013, + 0x1700, 0x0078, 0x9589, 0x6007, 0x0012, 0x0078, 0x9589, 0x1078, + 0x29bb, 0x00c0, 0x9674, 0x6018, 0xa080, 0x0001, 0x2004, 0xa084, + 0xff00, 0x8007, 0xa086, 0x0006, 0x00c0, 0x94a8, 0x0e7e, 0x0d7e, + 0x0c7e, 0x2001, 0xa772, 0x2004, 0xd0e4, 0x0040, 0x9631, 0x2069, + 0xa700, 0x2071, 0xac8c, 0x7008, 0x6036, 0x720c, 0x623a, 0xa286, + 0xffff, 0x00c0, 0x95ee, 0x7208, 0x0c7e, 0x2c08, 0xa085, 0x0001, + 0x1078, 0xa1f6, 0x2c10, 0x0c7f, 0x0040, 0x9625, 0x1078, 0x8d02, + 0x0040, 0x9625, 0x0c7e, 0x027e, 0x2260, 0x1078, 0x8a03, 0x027f, + 0x0c7f, 0x7118, 0xa18c, 0xff00, 0x810f, 0xa186, 0x0001, 0x0040, + 0x960f, 0xa186, 0x0005, 0x0040, 0x9609, 0xa186, 0x0007, 0x00c0, + 0x9619, 0xa280, 0x0004, 0x2004, 0xa005, 0x0040, 0x9619, 0x057e, + 0x7510, 0x7614, 0x1078, 0xa2b3, 0x057f, 0x0c7f, 0x0d7f, 0x0e7f, + 0x007c, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, 0x2a00, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x0078, 0x9615, 0x6007, 0x003b, 0x602b, + 0x0009, 0x6013, 0x1700, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x0078, + 0x9615, 0x6007, 0x003b, 0x602b, 0x000b, 0x6013, 0x0000, 0x0078, + 0x9589, 0x0e7e, 0x027e, 0x1078, 0x4967, 0x0040, 0x966e, 0x1078, + 0x4957, 0x1078, 0xa4b9, 0x00c0, 0x966c, 0x2071, 0xa700, 0x70cc, + 0xc085, 0x70ce, 0x0f7e, 0x2079, 0x0100, 0x7298, 0xa284, 0x00ff, + 0x706e, 0x78e6, 0xa284, 0xff00, 0x7270, 0xa205, 0x7072, 0x78ea, + 0x0f7f, 0x70d7, 0x0000, 0x2001, 0xa753, 0x2004, 0xd0a4, 0x0040, + 0x9665, 0x2011, 0xa9ca, 0x2013, 0x07d0, 0xd0ac, 0x00c0, 0x966e, + 0x1078, 0x2677, 0x0078, 0x966e, 0x1078, 0xa4e9, 0x027f, 0x0e7f, + 0x1078, 0x772d, 0x0078, 0x94a7, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x067e, 0x6618, 0x2668, 0x6e04, 0xa6b4, 0xff00, 0x8637, 0xa686, + 0x0006, 0x0040, 0x9694, 0xa686, 0x0004, 0x0040, 0x9694, 0x6e04, + 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0040, 0x9694, 0xa686, 0x0004, + 0x0040, 0x9694, 0xa085, 0x0001, 0x067f, 0x0d7f, 0x007c, 0x0d7e, + 0x1078, 0x96cb, 0x0d7f, 0x007c, 0x0d7e, 0x1078, 0x96da, 0x00c0, + 0x96c4, 0x680c, 0xa08c, 0xff00, 0x6820, 0xa084, 0x00ff, 0xa115, + 0x6212, 0x6824, 0x602a, 0xd1e4, 0x0040, 0x96b2, 0x2009, 0x0001, + 0x0078, 0x96c0, 0xd1ec, 0x0040, 0x96c4, 0x6920, 0xa18c, 0x00ff, + 0x6824, 0x1078, 0x254d, 0x00c0, 0x96c4, 0x2110, 0x2009, 0x0000, + 0x1078, 0x28c8, 0x0078, 0x96c8, 0xa085, 0x0001, 0x0078, 0x96c9, + 0xa006, 0x0d7f, 0x007c, 0x2069, 0xac8d, 0x6800, 0xa082, 0x0010, + 0x00c8, 0x96d8, 0x6013, 0x0000, 0xa085, 0x0001, 0x0078, 0x96d9, + 0xa006, 0x007c, 0x6013, 0x0000, 0x2069, 0xac8c, 0x6808, 0xa084, + 0xff00, 0xa086, 0x0800, 0x00c0, 0x96ee, 0x6800, 0xa084, 0x00ff, + 0xa08e, 0x0014, 0x0040, 0x96ee, 0xa08e, 0x0010, 0x007c, 0x6004, + 0xa0b2, 0x0044, 0x10c8, 0x1332, 0xa1b6, 0x0013, 0x00c0, 0x96fb, + 0x2008, 0x0079, 0x970e, 0xa1b6, 0x0027, 0x0040, 0x9703, 0xa1b6, + 0x0014, 0x10c0, 0x1332, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, + 0x61cd, 0x1078, 0x8ed6, 0x1078, 0x62d1, 0x007c, 0x974e, 0x9750, + 0x974e, 0x974e, 0x974e, 0x9750, 0x975c, 0x97e6, 0x97a9, 0x97e6, + 0x97bd, 0x97e6, 0x975c, 0x97e6, 0x97de, 0x97e6, 0x97de, 0x97e6, + 0x97e6, 0x974e, 0x974e, 0x974e, 0x974e, 0x974e, 0x974e, 0x974e, + 0x974e, 0x974e, 0x974e, 0x974e, 0x9750, 0x974e, 0x97e6, 0x974e, + 0x974e, 0x97e6, 0x974e, 0x97e6, 0x97e6, 0x974e, 0x974e, 0x974e, + 0x974e, 0x97e6, 0x97e6, 0x974e, 0x97e6, 0x97e6, 0x974e, 0x974e, + 0x974e, 0x974e, 0x974e, 0x9750, 0x97e6, 0x97e6, 0x974e, 0x974e, + 0x97e6, 0x97e6, 0x974e, 0x974e, 0x974e, 0x974e, 0x1078, 0x1332, + 0x1078, 0x61cd, 0x2001, 0xa9a2, 0x2004, 0x6016, 0x6003, 0x0002, + 0x1078, 0x62d1, 0x0078, 0x97ec, 0x0f7e, 0x2079, 0xa752, 0x7804, + 0x0f7f, 0xd0ac, 0x00c0, 0x97e6, 0x2001, 0x0000, 0x1078, 0x44ee, + 0x6018, 0xa080, 0x0004, 0x2004, 0xa086, 0x00ff, 0x0040, 0x97e6, + 0x0c7e, 0x6018, 0x2060, 0x6000, 0xd0f4, 0x00c0, 0x9780, 0x6010, + 0xa005, 0x0040, 0x9780, 0x0c7f, 0x1078, 0x3699, 0x0078, 0x97e6, + 0x0c7f, 0x2001, 0xa700, 0x2004, 0xa086, 0x0002, 0x00c0, 0x978f, + 0x0f7e, 0x2079, 0xa700, 0x7890, 0x8000, 0x7892, 0x0f7f, 0x2001, + 0x0002, 0x1078, 0x4502, 0x1078, 0x61cd, 0x601f, 0x0001, 0x6003, + 0x0001, 0x6007, 0x0002, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0c7e, + 0x6118, 0x2160, 0x2009, 0x0001, 0x1078, 0x5a52, 0x0c7f, 0x0078, + 0x97ec, 0x6618, 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x97e6, 0xa686, 0x0004, 0x0040, + 0x97e6, 0x2001, 0x0004, 0x0078, 0x97e4, 0x2001, 0xa700, 0x2004, + 0xa086, 0x0003, 0x00c0, 0x97c6, 0x1078, 0x3699, 0x2001, 0x0006, + 0x1078, 0x97ed, 0x6618, 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0006, 0x0040, 0x97e6, 0x2001, 0x0006, + 0x0078, 0x97e4, 0x2001, 0x0004, 0x0078, 0x97e4, 0x2001, 0x0006, + 0x1078, 0x97ed, 0x0078, 0x97e6, 0x1078, 0x4535, 0x1078, 0x61cd, + 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, 0x017e, 0x0d7e, 0x6118, + 0x2168, 0x6900, 0xd184, 0x0040, 0x9808, 0x6104, 0xa18e, 0x000a, + 0x00c0, 0x9800, 0x699c, 0xd1a4, 0x00c0, 0x9800, 0x2001, 0x0007, + 0x1078, 0x4502, 0x2001, 0x0000, 0x1078, 0x44ee, 0x1078, 0x28a6, + 0x0d7f, 0x017f, 0x007c, 0x0d7e, 0x6618, 0x2668, 0x6804, 0xa084, + 0xff00, 0x8007, 0x0d7f, 0xa0b2, 0x000c, 0x10c8, 0x1332, 0xa1b6, + 0x0015, 0x00c0, 0x981f, 0x1079, 0x9826, 0x0078, 0x9825, 0xa1b6, + 0x0016, 0x10c0, 0x1332, 0x1079, 0x9832, 0x007c, 0x7d4e, 0x7d4e, + 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x9887, 0x983e, 0x7d4e, 0x7d4e, + 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, + 0x9887, 0x988f, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x0f7e, 0x2079, + 0xa752, 0x7804, 0xd0ac, 0x00c0, 0x9865, 0x6018, 0xa07d, 0x0040, + 0x9865, 0x7800, 0xd0f4, 0x00c0, 0x9851, 0x7810, 0xa005, 0x00c0, + 0x9865, 0x2001, 0x0000, 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, + 0x4502, 0x601f, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x1078, + 0x5dd7, 0x1078, 0x62d1, 0x0078, 0x9885, 0x2011, 0xac83, 0x2204, + 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x9885, 0x0c7e, 0x1078, + 0x45c4, 0x0040, 0x9878, 0x0c7f, 0x1078, 0x772d, 0x0078, 0x9885, + 0x6010, 0x007e, 0x6014, 0x007e, 0x1078, 0x42f8, 0x007f, 0x6016, + 0x007f, 0x6012, 0x0c7f, 0x1078, 0x772d, 0x0f7f, 0x007c, 0x6604, + 0xa6b6, 0x001e, 0x00c0, 0x988e, 0x1078, 0x772d, 0x007c, 0x1078, + 0x7f8e, 0x00c0, 0x989b, 0x6003, 0x0001, 0x6007, 0x0001, 0x1078, + 0x5dd7, 0x0078, 0x989d, 0x1078, 0x772d, 0x007c, 0x6004, 0xa08a, + 0x0044, 0x10c8, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ed6, 0x1078, + 0x62d1, 0x007c, 0xa182, 0x0040, 0x0079, 0x98ae, 0x98c1, 0x98c1, + 0x98c1, 0x98c1, 0x98c3, 0x98c1, 0x98c1, 0x98c1, 0x98c1, 0x98c1, + 0x98c1, 0x98c1, 0x98c1, 0x98c1, 0x98c1, 0x98c1, 0x98c1, 0x98c1, + 0x98c1, 0x1078, 0x1332, 0x0d7e, 0x0e7e, 0x0f7e, 0x157e, 0x047e, + 0x027e, 0x6218, 0xa280, 0x002b, 0x2004, 0xa005, 0x0040, 0x98d4, + 0x2021, 0x0000, 0x1078, 0xa482, 0x6106, 0x2071, 0xac80, 0x7444, + 0xa4a4, 0xff00, 0x0040, 0x992b, 0xa486, 0x2000, 0x00c0, 0x98e6, + 0x2009, 0x0001, 0x2011, 0x0200, 0x1078, 0x5bf1, 0x1078, 0x138b, + 0x1040, 0x1332, 0x6003, 0x0007, 0x2d00, 0x6837, 0x010d, 0x6803, + 0x0000, 0x683b, 0x0000, 0x6c5a, 0x2c00, 0x685e, 0x6008, 0x68b2, + 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, 0x694a, 0x017e, 0xa084, + 0xff00, 0x6846, 0x684f, 0x0000, 0x6857, 0x0036, 0x1078, 0x4a73, + 0x017f, 0xa486, 0x2000, 0x00c0, 0x9913, 0x2019, 0x0017, 0x1078, + 0xa1a5, 0x0078, 0x998d, 0xa486, 0x0400, 0x00c0, 0x991d, 0x2019, + 0x0002, 0x1078, 0xa156, 0x0078, 0x998d, 0xa486, 0x0200, 0x00c0, + 0x9923, 0x1078, 0xa13b, 0xa486, 0x1000, 0x00c0, 0x9929, 0x1078, + 0xa18a, 0x0078, 0x998d, 0x2069, 0xaa33, 0x6a00, 0xd284, 0x0040, + 0x99f7, 0xa284, 0x0300, 0x00c0, 0x99ef, 0x6804, 0xa005, 0x0040, + 0x99d5, 0x2d78, 0x6003, 0x0007, 0x1078, 0x1370, 0x0040, 0x9994, + 0x7800, 0xd08c, 0x00c0, 0x9947, 0x7804, 0x8001, 0x7806, 0x6013, + 0x0000, 0x6803, 0x0000, 0x6837, 0x0116, 0x683b, 0x0000, 0x6008, + 0x68b2, 0x2c00, 0x684a, 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, + 0x6986, 0x6846, 0x7928, 0x698a, 0x792c, 0x698e, 0x7930, 0x6992, + 0x7934, 0x6996, 0x6853, 0x003d, 0x7244, 0xa294, 0x0003, 0xa286, + 0x0002, 0x00c0, 0x996f, 0x684f, 0x0040, 0x0078, 0x9979, 0xa286, + 0x0001, 0x00c0, 0x9977, 0x684f, 0x0080, 0x0078, 0x9979, 0x684f, + 0x0000, 0x20a9, 0x000a, 0x2001, 0xac90, 0xad90, 0x0015, 0x200c, + 0x810f, 0x2112, 0x8000, 0x8210, 0x00f0, 0x997f, 0x200c, 0x6982, + 0x8000, 0x200c, 0x697e, 0x1078, 0x4a73, 0x027f, 0x047f, 0x157f, + 0x0f7f, 0x0e7f, 0x0d7f, 0x007c, 0x2001, 0xa70e, 0x2004, 0xd084, + 0x0040, 0x999e, 0x1078, 0x138b, 0x00c0, 0x9940, 0x6013, 0x0100, + 0x6003, 0x0001, 0x6007, 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0078, 0x998d, 0x2069, 0xac92, 0x2d04, 0xa084, 0xff00, 0xa086, + 0x1200, 0x00c0, 0x99c9, 0x2069, 0xac80, 0x686c, 0xa084, 0x00ff, + 0x017e, 0x6110, 0xa18c, 0x0700, 0xa10d, 0x6112, 0x017f, 0x6003, + 0x0001, 0x6007, 0x0043, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, + 0x998d, 0x6013, 0x0200, 0x6003, 0x0001, 0x6007, 0x0041, 0x1078, + 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x998d, 0x2001, 0xa70d, 0x2004, + 0xd0ec, 0x0040, 0x99df, 0x2011, 0x8049, 0x1078, 0x361b, 0x6013, + 0x0300, 0x0078, 0x99e5, 0x6013, 0x0100, 0x6003, 0x0001, 0x6007, + 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x998d, 0x6013, + 0x0500, 0x0078, 0x99e5, 0x6013, 0x0600, 0x0078, 0x99aa, 0x6013, + 0x0200, 0x0078, 0x99aa, 0xa186, 0x0013, 0x00c0, 0x9a0d, 0x6004, + 0xa08a, 0x0040, 0x1048, 0x1332, 0xa08a, 0x0053, 0x10c8, 0x1332, + 0xa082, 0x0040, 0x2008, 0x0079, 0x9a92, 0xa186, 0x0051, 0x0040, + 0x9a1a, 0xa186, 0x0047, 0x00c0, 0x9a33, 0x6004, 0xa086, 0x0041, + 0x0040, 0x9a41, 0x2001, 0x0109, 0x2004, 0xd084, 0x0040, 0x9a41, + 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, 0x027e, 0x1078, 0x5c56, + 0x027f, 0x017f, 0x007f, 0x127f, 0x6000, 0xa086, 0x0002, 0x00c0, + 0x9a41, 0x0078, 0x9ad7, 0xa186, 0x0027, 0x0040, 0x9a3b, 0xa186, + 0x0014, 0x10c0, 0x1332, 0x6004, 0xa082, 0x0040, 0x2008, 0x0079, + 0x9a44, 0x1078, 0x7773, 0x007c, 0x9a57, 0x9a59, 0x9a59, 0x9a81, + 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, + 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x9a57, 0x1078, + 0x1332, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x037e, 0x0d7e, 0x6010, + 0xa06d, 0x0040, 0x9a7e, 0xad84, 0xf000, 0x0040, 0x9a7e, 0x6003, + 0x0002, 0x6018, 0x2004, 0xd0bc, 0x00c0, 0x9a7e, 0x2019, 0x0004, + 0x1078, 0xa1da, 0x6013, 0x0000, 0x6014, 0xa005, 0x00c0, 0x9a7c, + 0x2001, 0xa9a3, 0x2004, 0x6016, 0x6003, 0x0007, 0x0d7f, 0x037f, + 0x007c, 0x0d7e, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x1078, 0x8d16, + 0x0040, 0x9a8e, 0x6010, 0x2068, 0x1078, 0x13a4, 0x1078, 0x8ed6, + 0x0d7f, 0x007c, 0x9aa5, 0x9ac4, 0x9aae, 0x9ad1, 0x9aa5, 0x9aa5, + 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, + 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x9aa5, 0x1078, 0x1332, 0x6010, + 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x1078, 0x61cd, + 0x6010, 0xa080, 0x0013, 0x2004, 0xd0b4, 0x0040, 0x9abf, 0x6003, + 0x0007, 0x2009, 0x0043, 0x1078, 0x775c, 0x0078, 0x9ac1, 0x6003, + 0x0002, 0x1078, 0x62d1, 0x007c, 0x1078, 0x61cd, 0x1078, 0xa433, + 0x00c0, 0x9ace, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x1078, 0x62d1, + 0x007c, 0x1078, 0x61cd, 0x2009, 0x0041, 0x0078, 0x9c2e, 0xa182, + 0x0040, 0x0079, 0x9adb, 0x9aee, 0x9af0, 0x9aee, 0x9aee, 0x9aee, + 0x9aee, 0x9aee, 0x9af1, 0x9aee, 0x9aee, 0x9aee, 0x9aee, 0x9aee, + 0x9aee, 0x9aee, 0x9aee, 0x9aee, 0x9afc, 0x9aee, 0x1078, 0x1332, + 0x007c, 0x6003, 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x1078, 0x15fa, 0x007c, 0x0d7e, 0x1078, 0x5bc1, 0x0d7f, + 0x1078, 0xa4a5, 0x1078, 0x772d, 0x007c, 0xa182, 0x0040, 0x0079, + 0x9b09, 0x9b1c, 0x9b1c, 0x9b1c, 0x9b1c, 0x9b1c, 0x9b1c, 0x9b1c, + 0x9b1e, 0x9b1c, 0x9b21, 0x9b4c, 0x9b1c, 0x9b1c, 0x9b1c, 0x9b1c, + 0x9b4c, 0x9b1c, 0x9b1c, 0x9b1c, 0x1078, 0x1332, 0x1078, 0x7773, + 0x007c, 0x1078, 0x627a, 0x1078, 0x639b, 0x6010, 0x0d7e, 0x2068, + 0x684c, 0xd0fc, 0x0040, 0x9b37, 0xa08c, 0x0003, 0xa18e, 0x0002, + 0x0040, 0x9b3f, 0x2009, 0x0041, 0x0d7f, 0x0078, 0x9c2e, 0x6003, + 0x0007, 0x6017, 0x0000, 0x1078, 0x5bc1, 0x0d7f, 0x007c, 0x1078, + 0xa433, 0x0040, 0x9b45, 0x0d7f, 0x007c, 0x1078, 0x5bc1, 0x1078, + 0x772d, 0x0d7f, 0x0078, 0x9b3e, 0x037e, 0x1078, 0x627a, 0x1078, + 0x639b, 0x6010, 0x0d7e, 0x2068, 0x6018, 0x2004, 0xd0bc, 0x0040, + 0x9b6c, 0x684c, 0xa084, 0x0003, 0xa086, 0x0002, 0x0040, 0x9b68, + 0x687c, 0x632c, 0xa31a, 0x632e, 0x6880, 0x6328, 0xa31b, 0x632a, + 0x6003, 0x0002, 0x0078, 0x9b7d, 0x2019, 0x0004, 0x1078, 0xa1da, + 0x6014, 0xa005, 0x00c0, 0x9b79, 0x2001, 0xa9a3, 0x2004, 0x8003, + 0x6016, 0x6013, 0x0000, 0x6003, 0x0007, 0x0d7f, 0x037f, 0x007c, + 0xa186, 0x0013, 0x00c0, 0x9b8e, 0x6004, 0xa086, 0x0042, 0x10c0, + 0x1332, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x007c, 0xa186, 0x0027, + 0x0040, 0x9b96, 0xa186, 0x0014, 0x00c0, 0x9ba6, 0x6004, 0xa086, + 0x0042, 0x10c0, 0x1332, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, + 0x61cd, 0x1078, 0x8ed6, 0x1078, 0x62d1, 0x007c, 0xa182, 0x0040, + 0x0079, 0x9baa, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, + 0x9bbd, 0x9bbf, 0x9bcb, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, + 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, 0x9bbd, 0x1078, 0x1332, 0x037e, + 0x047e, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, 0x15fa, + 0x047f, 0x037f, 0x007c, 0x6010, 0x0d7e, 0x2068, 0x6810, 0x6a14, + 0x6118, 0x210c, 0xd1bc, 0x0040, 0x9bea, 0x6124, 0xd1f4, 0x00c0, + 0x9bea, 0x007e, 0x047e, 0x057e, 0x6c7c, 0xa422, 0x6d80, 0x2200, + 0xa52b, 0x602c, 0xa420, 0x642e, 0x6028, 0xa529, 0x652a, 0x057f, + 0x047f, 0x007f, 0xa20d, 0x00c0, 0x9bfe, 0x684c, 0xd0fc, 0x0040, + 0x9bf6, 0x2009, 0x0041, 0x0d7f, 0x0078, 0x9c2e, 0x6003, 0x0007, + 0x6017, 0x0000, 0x1078, 0x5bc1, 0x0d7f, 0x007c, 0x007e, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x007f, 0x0040, 0x9c0b, 0x6003, + 0x0002, 0x0d7f, 0x007c, 0x2009, 0xa70d, 0x210c, 0xd19c, 0x0040, + 0x9c15, 0x6003, 0x0007, 0x0078, 0x9c17, 0x6003, 0x0006, 0x1078, + 0x9c1d, 0x1078, 0x5bc3, 0x0d7f, 0x007c, 0xd2fc, 0x0040, 0x9c29, + 0x8002, 0x8000, 0x8212, 0xa291, 0x0000, 0x2009, 0x0009, 0x0078, + 0x9c2b, 0x2009, 0x0015, 0x6a6a, 0x6866, 0x007c, 0xa182, 0x0040, + 0x0048, 0x9c34, 0x0079, 0x9c41, 0xa186, 0x0013, 0x0040, 0x9c3c, + 0xa186, 0x0014, 0x10c0, 0x1332, 0x6024, 0xd0dc, 0x1040, 0x1332, + 0x007c, 0x9c54, 0x9c5b, 0x9c67, 0x9c73, 0x9c54, 0x9c54, 0x9c54, + 0x9c82, 0x9c54, 0x9c56, 0x9c56, 0x9c54, 0x9c54, 0x9c54, 0x9c54, + 0x9c54, 0x9c54, 0x9c54, 0x9c54, 0x1078, 0x1332, 0x6024, 0xd0dc, + 0x1040, 0x1332, 0x007c, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x6003, + 0x0001, 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x007c, 0x6003, 0x0003, 0x6106, 0x2c10, 0x1078, + 0x1cf0, 0x127e, 0x2091, 0x8000, 0x1078, 0x5df6, 0x1078, 0x639b, + 0x127f, 0x007c, 0xa016, 0x1078, 0x15fa, 0x007c, 0x127e, 0x2091, + 0x8000, 0x037e, 0x0d7e, 0xa182, 0x0040, 0x1079, 0x9c93, 0x0d7f, + 0x037f, 0x127f, 0x007c, 0x9ca3, 0x9ca5, 0x9cba, 0x9cd9, 0x9ca3, + 0x9ca3, 0x9ca3, 0x9cf1, 0x9ca3, 0x9ca3, 0x9ca3, 0x9ca3, 0x9ca3, + 0x9ca3, 0x9ca3, 0x9ca3, 0x1078, 0x1332, 0x6010, 0x2068, 0x684c, + 0xd0fc, 0x0040, 0x9ccf, 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0040, + 0x9ccf, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0078, 0x9cf4, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0040, 0x9ccf, + 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0040, 0x9ccf, 0x6003, 0x0001, + 0x6106, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x9cf4, 0x6013, + 0x0000, 0x6017, 0x0000, 0x2019, 0x0004, 0x1078, 0xa1da, 0x0078, + 0x9cf4, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0040, 0x9ccf, 0xa09c, + 0x0003, 0xa39e, 0x0003, 0x0040, 0x9ccf, 0x6003, 0x0003, 0x6106, + 0x2c10, 0x1078, 0x1cf0, 0x1078, 0x5df6, 0x1078, 0x639b, 0x0078, + 0x9cf4, 0xa016, 0x1078, 0x15fa, 0x007c, 0x1078, 0x61cd, 0x6110, + 0x81ff, 0x0040, 0x9d06, 0x0d7e, 0x2168, 0x1078, 0xa4f2, 0x037e, + 0x2019, 0x0029, 0x1078, 0xa1da, 0x037f, 0x0d7f, 0x1078, 0x8ed6, + 0x1078, 0x62d1, 0x007c, 0x1078, 0x627a, 0x6110, 0x81ff, 0x0040, + 0x9d1c, 0x0d7e, 0x2168, 0x1078, 0xa4f2, 0x037e, 0x2019, 0x0029, + 0x1078, 0xa1da, 0x037f, 0x0d7f, 0x1078, 0x8ed6, 0x1078, 0x639b, + 0x007c, 0xa182, 0x0085, 0x0079, 0x9d25, 0x9d2e, 0x9d2c, 0x9d2c, + 0x9d3a, 0x9d2c, 0x9d2c, 0x9d2c, 0x1078, 0x1332, 0x6003, 0x000b, + 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, + 0x127f, 0x007c, 0x027e, 0x0e7e, 0x1078, 0xa42c, 0x0040, 0x9d44, + 0x1078, 0x772d, 0x0078, 0x9d60, 0x2071, 0xac80, 0x7224, 0x6212, + 0x7220, 0x1078, 0xa079, 0x0040, 0x9d51, 0x6007, 0x0086, 0x0078, + 0x9d5a, 0x6007, 0x0087, 0x7224, 0xa296, 0xffff, 0x00c0, 0x9d5a, + 0x6007, 0x0086, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0e7f, 0x027f, 0x007c, 0xa186, 0x0013, 0x00c0, 0x9d74, 0x6004, + 0xa08a, 0x0085, 0x1048, 0x1332, 0xa08a, 0x008c, 0x10c8, 0x1332, + 0xa082, 0x0085, 0x0079, 0x9d8b, 0xa186, 0x0027, 0x0040, 0x9d80, + 0xa186, 0x0014, 0x0040, 0x9d80, 0x1078, 0x7773, 0x0078, 0x9d8a, + 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, 0x61cd, 0x1078, 0x8ed6, + 0x1078, 0x62d1, 0x007c, 0x9d92, 0x9d94, 0x9d94, 0x9d92, 0x9d92, + 0x9d92, 0x9d92, 0x1078, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ed6, + 0x1078, 0x62d1, 0x007c, 0xa182, 0x0085, 0x1048, 0x1332, 0xa182, + 0x008c, 0x10c8, 0x1332, 0xa182, 0x0085, 0x0079, 0x9da7, 0x9dae, + 0x9dae, 0x9dae, 0x9db0, 0x9dae, 0x9dae, 0x9dae, 0x1078, 0x1332, + 0x007c, 0xa186, 0x0013, 0x0040, 0x9dc1, 0xa186, 0x0014, 0x0040, + 0x9dc1, 0xa186, 0x0027, 0x0040, 0x9dc1, 0x1078, 0x7773, 0x0078, + 0x9dc7, 0x1078, 0x61cd, 0x1078, 0x8ed6, 0x1078, 0x62d1, 0x007c, + 0x037e, 0x1078, 0xa4a5, 0x603f, 0x0000, 0x2019, 0x000b, 0x1078, + 0x9dd7, 0x601f, 0x0006, 0x6003, 0x0007, 0x037f, 0x007c, 0x127e, + 0x037e, 0x2091, 0x8000, 0x087e, 0x2c40, 0x097e, 0x2049, 0x0000, + 0x1078, 0x7246, 0x097f, 0x087f, 0x00c0, 0x9e12, 0x077e, 0x2c38, + 0x1078, 0x72f3, 0x077f, 0x00c0, 0x9e12, 0x6000, 0xa086, 0x0000, + 0x0040, 0x9e12, 0x601c, 0xa086, 0x0007, 0x0040, 0x9e12, 0x0d7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0x9e03, 0x1078, 0xa4a5, 0x601f, + 0x0007, 0x1078, 0x1757, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, + 0x9e0b, 0x1078, 0xa1da, 0x0d7f, 0x6013, 0x0000, 0x1078, 0xa4a5, + 0x601f, 0x0007, 0x037f, 0x127f, 0x007c, 0x0f7e, 0x0c7e, 0x037e, + 0x157e, 0x2079, 0xac80, 0x7938, 0x783c, 0x1078, 0x254d, 0x00c0, + 0x9e59, 0x017e, 0x0c7e, 0x1078, 0x45c4, 0x00c0, 0x9e59, 0x017f, + 0x027f, 0x027e, 0x017e, 0x2019, 0x0029, 0x1078, 0x73d0, 0x1078, + 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x077f, 0x017f, + 0x077e, 0x2039, 0x0000, 0x1078, 0x9f9b, 0x077f, 0x1078, 0x47e9, + 0x027e, 0x6204, 0xa294, 0xff00, 0x8217, 0xa286, 0x0006, 0x0040, + 0x9e4d, 0xa286, 0x0004, 0x00c0, 0x9e50, 0x62a0, 0x1078, 0x2942, + 0x027f, 0x017f, 0x1078, 0x42f8, 0x6612, 0x6516, 0xa006, 0x0078, + 0x9e5b, 0x0c7f, 0x017f, 0x157f, 0x037f, 0x0c7f, 0x0f7f, 0x007c, + 0x0c7e, 0x0d7e, 0x0e7e, 0x017e, 0x2009, 0xa720, 0x2104, 0xa086, + 0x0074, 0x00c0, 0x9ec3, 0x2069, 0xac8e, 0x690c, 0xa182, 0x0100, + 0x0048, 0x9eb3, 0x6908, 0xa184, 0x8000, 0x0040, 0x9ebf, 0x6018, + 0x2070, 0x7010, 0xa084, 0x00ff, 0x0040, 0x9e82, 0x7000, 0xd0f4, + 0x0040, 0x9e86, 0xa184, 0x0800, 0x0040, 0x9ebf, 0x6910, 0xa18a, + 0x0001, 0x0048, 0x9eb7, 0x6914, 0x2069, 0xacae, 0x6904, 0x81ff, + 0x00c0, 0x9eab, 0x690c, 0xa182, 0x0100, 0x0048, 0x9eb3, 0x6908, + 0x81ff, 0x00c0, 0x9eaf, 0x6910, 0xa18a, 0x0001, 0x0048, 0x9eb7, + 0x6918, 0xa18a, 0x0001, 0x0048, 0x9ebf, 0x0078, 0x9ec9, 0x6013, + 0x0100, 0x0078, 0x9ec5, 0x6013, 0x0300, 0x0078, 0x9ec5, 0x6013, + 0x0500, 0x0078, 0x9ec5, 0x6013, 0x0700, 0x0078, 0x9ec5, 0x6013, + 0x0900, 0x0078, 0x9ec5, 0x6013, 0x0b00, 0x0078, 0x9ec5, 0x6013, + 0x0f00, 0x0078, 0x9ec5, 0x6013, 0x2d00, 0xa085, 0x0001, 0x0078, + 0x9eca, 0xa006, 0x017f, 0x0e7f, 0x0d7f, 0x0c7f, 0x007c, 0x0c7e, + 0x0d7e, 0x027e, 0x037e, 0x157e, 0x6218, 0x2268, 0x6b04, 0xa394, + 0x00ff, 0xa286, 0x0006, 0x0040, 0x9ef3, 0xa286, 0x0004, 0x0040, + 0x9ef3, 0xa394, 0xff00, 0x8217, 0xa286, 0x0006, 0x0040, 0x9ef3, + 0xa286, 0x0004, 0x0040, 0x9ef3, 0x0c7e, 0x2d60, 0x1078, 0x45d6, + 0x0c7f, 0x0078, 0x9f2e, 0x2011, 0xac96, 0xad98, 0x000a, 0x20a9, + 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f2f, 0x2011, 0xac9a, 0xad98, + 0x0006, 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f2f, 0x047e, + 0x017e, 0x6aa0, 0xa294, 0x00ff, 0x8227, 0xa006, 0x2009, 0xa753, + 0x210c, 0xd1a4, 0x0040, 0x9f1b, 0x2009, 0x0029, 0x1078, 0xa22d, + 0x6800, 0xc0e5, 0x6802, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, + 0x2039, 0x0000, 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f9b, 0x077f, + 0x2001, 0x0007, 0x1078, 0x4535, 0x017f, 0x047f, 0xa006, 0x157f, + 0x037f, 0x027f, 0x0d7f, 0x0c7f, 0x007c, 0x0d7e, 0x2069, 0xac8e, + 0x6800, 0xa086, 0x0800, 0x0040, 0x9f41, 0x6013, 0x0000, 0x0078, + 0x9f42, 0xa006, 0x0d7f, 0x007c, 0x0c7e, 0x0f7e, 0x017e, 0x027e, + 0x037e, 0x157e, 0x2079, 0xac8c, 0x7930, 0x7834, 0x1078, 0x254d, + 0x00c0, 0x9f68, 0x1078, 0x45c4, 0x00c0, 0x9f68, 0x2011, 0xac90, + 0xac98, 0x000a, 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f68, + 0x2011, 0xac94, 0xac98, 0x0006, 0x20a9, 0x0004, 0x1078, 0x80de, + 0x157f, 0x037f, 0x027f, 0x017f, 0x0f7f, 0x0c7f, 0x007c, 0x0c7e, + 0x007e, 0x017e, 0x027e, 0x037e, 0x157e, 0x2011, 0xac83, 0x2204, + 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x9f94, 0x1078, 0x45c4, + 0x00c0, 0x9f94, 0x2011, 0xac96, 0xac98, 0x000a, 0x20a9, 0x0004, + 0x1078, 0x80de, 0x00c0, 0x9f94, 0x2011, 0xac9a, 0xac98, 0x0006, + 0x20a9, 0x0004, 0x1078, 0x80de, 0x157f, 0x037f, 0x027f, 0x017f, + 0x007f, 0x0c7f, 0x007c, 0x0e7e, 0x0c7e, 0x087e, 0x077e, 0x067e, + 0x057e, 0x047e, 0x027e, 0x127e, 0x2091, 0x8000, 0x2740, 0x2029, + 0xa9ba, 0x252c, 0x2021, 0xa9c0, 0x2424, 0x2061, 0xae00, 0x2071, + 0xa700, 0x7648, 0x7064, 0x81ff, 0x0040, 0x9fc2, 0x007e, 0xa186, + 0xaab3, 0x007f, 0x0040, 0x9fc2, 0x8001, 0xa602, 0x00c8, 0xa02c, + 0x0078, 0x9fc5, 0xa606, 0x0040, 0xa02c, 0x2100, 0xac06, 0x0040, + 0xa022, 0x1078, 0xa252, 0x0040, 0xa022, 0x671c, 0xa786, 0x0001, + 0x0040, 0xa047, 0xa786, 0x0004, 0x0040, 0xa047, 0xa786, 0x0007, + 0x0040, 0xa022, 0x2500, 0xac06, 0x0040, 0xa022, 0x2400, 0xac06, + 0x0040, 0xa022, 0x1078, 0xa266, 0x00c0, 0xa022, 0x88ff, 0x0040, + 0x9fed, 0x6020, 0xa906, 0x00c0, 0xa022, 0x0d7e, 0x6000, 0xa086, + 0x0004, 0x00c0, 0x9ff7, 0x017e, 0x1078, 0x1757, 0x017f, 0xa786, + 0x0008, 0x00c0, 0xa006, 0x1078, 0x8f10, 0x00c0, 0xa006, 0x1078, + 0x7c83, 0x0d7f, 0x1078, 0x8ed6, 0x0078, 0xa022, 0x6010, 0x2068, + 0x1078, 0x8d16, 0x0040, 0xa01f, 0xa786, 0x0003, 0x00c0, 0xa036, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0xa4f2, 0x017e, + 0x1078, 0x8f8d, 0x1078, 0x4a73, 0x017f, 0x1078, 0x8ec9, 0x0d7f, + 0x1078, 0x8ed6, 0xace0, 0x0010, 0x2001, 0xa716, 0x2004, 0xac02, + 0x00c8, 0xa02c, 0x0078, 0x9faf, 0x127f, 0x027f, 0x047f, 0x057f, + 0x067f, 0x077f, 0x087f, 0x0c7f, 0x0e7f, 0x007c, 0xa786, 0x0006, + 0x00c0, 0xa010, 0xa386, 0x0005, 0x0040, 0xa044, 0x1078, 0xa4f2, + 0x1078, 0xa1da, 0x0078, 0xa01f, 0x0d7f, 0x0078, 0xa022, 0x1078, + 0xa266, 0x00c0, 0xa022, 0x81ff, 0x0040, 0xa022, 0xa180, 0x0001, + 0x2004, 0xa086, 0x0018, 0x0040, 0xa05c, 0xa180, 0x0001, 0x2004, + 0xa086, 0x002d, 0x00c0, 0xa022, 0x6000, 0xa086, 0x0002, 0x00c0, + 0xa022, 0x1078, 0x8efc, 0x0040, 0xa06d, 0x1078, 0x8f10, 0x00c0, + 0xa022, 0x1078, 0x7c83, 0x0078, 0xa075, 0x1078, 0x28a6, 0x1078, + 0x8f10, 0x00c0, 0xa075, 0x1078, 0x7c83, 0x1078, 0x8ed6, 0x0078, + 0xa022, 0x0c7e, 0x0e7e, 0x017e, 0x2c08, 0x2170, 0xa006, 0x1078, + 0xa1f6, 0x017f, 0x0040, 0xa089, 0x601c, 0xa084, 0x000f, 0x1079, + 0xa08c, 0x0e7f, 0x0c7f, 0x007c, 0xa094, 0xa094, 0xa094, 0xa094, + 0xa094, 0xa094, 0xa096, 0xa094, 0xa006, 0x007c, 0x047e, 0x017e, + 0x7018, 0xa080, 0x0028, 0x2024, 0xa4a4, 0x00ff, 0x8427, 0x2c00, + 0x2009, 0x0020, 0x1078, 0xa22d, 0x017f, 0x047f, 0x037e, 0x2019, + 0x0002, 0x1078, 0x9dd7, 0x037f, 0xa085, 0x0001, 0x007c, 0x2001, + 0x0001, 0x1078, 0x44ee, 0x157e, 0x017e, 0x027e, 0x037e, 0x20a9, + 0x0004, 0x2019, 0xa705, 0x2011, 0xac96, 0x1078, 0x80de, 0x037f, + 0x027f, 0x017f, 0x157f, 0xa005, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, + 0x087e, 0x077e, 0x067e, 0x027e, 0x127e, 0x2091, 0x8000, 0x2740, + 0x2061, 0xae00, 0x2079, 0x0001, 0x8fff, 0x0040, 0xa12d, 0x2071, + 0xa700, 0x7648, 0x7064, 0x8001, 0xa602, 0x00c8, 0xa12d, 0x88ff, + 0x0040, 0xa0e8, 0x2800, 0xac06, 0x00c0, 0xa123, 0x2079, 0x0000, + 0x1078, 0xa252, 0x0040, 0xa123, 0x2400, 0xac06, 0x0040, 0xa123, + 0x671c, 0xa786, 0x0006, 0x00c0, 0xa123, 0xa786, 0x0007, 0x0040, + 0xa123, 0x88ff, 0x00c0, 0xa107, 0x6018, 0xa206, 0x00c0, 0xa123, + 0x85ff, 0x0040, 0xa107, 0x6020, 0xa106, 0x00c0, 0xa123, 0x0d7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0xa113, 0x1078, 0xa4a5, 0x601f, + 0x0007, 0x1078, 0x1757, 0x6010, 0x2068, 0x1078, 0x8d16, 0x0040, + 0xa11d, 0x047e, 0x1078, 0xa1da, 0x047f, 0x0d7f, 0x1078, 0x8ed6, + 0x88ff, 0x00c0, 0xa137, 0xace0, 0x0010, 0x2001, 0xa716, 0x2004, + 0xac02, 0x00c8, 0xa12d, 0x0078, 0xa0d4, 0xa006, 0x127f, 0x027f, + 0x067f, 0x077f, 0x087f, 0x0c7f, 0x0e7f, 0x0f7f, 0x007c, 0xa8c5, + 0x0001, 0x0078, 0xa12e, 0x077e, 0x057e, 0x087e, 0x2041, 0x0000, + 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6218, 0x097e, 0x2049, + 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, 0x2039, 0x0000, 0x1078, + 0x72f3, 0x1078, 0xa0c5, 0x057f, 0x077f, 0x007c, 0x027e, 0x047e, + 0x057e, 0x077e, 0x0c7e, 0x157e, 0x2c20, 0x2128, 0x20a9, 0x007f, + 0x2009, 0x0000, 0x017e, 0x037e, 0x1078, 0x45c4, 0x00c0, 0xa17e, + 0x2c10, 0x057e, 0x087e, 0x2041, 0x0000, 0x2508, 0x2029, 0x0001, + 0x097e, 0x2049, 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, 0x2039, + 0x0000, 0x1078, 0x72f3, 0x1078, 0xa0c5, 0x057f, 0x037f, 0x017f, + 0x8108, 0x00f0, 0xa162, 0x157f, 0x0c7f, 0x077f, 0x057f, 0x047f, + 0x027f, 0x007c, 0x077e, 0x057e, 0x6218, 0x087e, 0x2041, 0x0000, + 0x2029, 0x0001, 0x2019, 0x0048, 0x097e, 0x2049, 0x0000, 0x1078, + 0x7246, 0x097f, 0x087f, 0x2039, 0x0000, 0x1078, 0x72f3, 0x2c20, + 0x1078, 0xa0c5, 0x057f, 0x077f, 0x007c, 0x027e, 0x047e, 0x057e, + 0x077e, 0x0c7e, 0x157e, 0x2c20, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x017e, 0x037e, 0x1078, 0x45c4, 0x00c0, 0xa1ce, 0x2c10, 0x087e, + 0x2041, 0x0000, 0x2828, 0x047e, 0x2021, 0x0001, 0x1078, 0xa482, + 0x047f, 0x097e, 0x2049, 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, + 0x2039, 0x0000, 0x1078, 0x72f3, 0x1078, 0xa0c5, 0x037f, 0x017f, + 0x8108, 0x00f0, 0xa1b0, 0x157f, 0x0c7f, 0x077f, 0x057f, 0x047f, + 0x027f, 0x007c, 0x017e, 0x0f7e, 0xad82, 0xce00, 0x0048, 0xa1f3, + 0xad82, 0xffff, 0x00c8, 0xa1f3, 0x6800, 0xa07d, 0x0040, 0xa1f0, + 0x6803, 0x0000, 0x6b52, 0x1078, 0x4a73, 0x2f68, 0x0078, 0xa1e4, + 0x6b52, 0x1078, 0x4a73, 0x0f7f, 0x017f, 0x007c, 0x0e7e, 0x047e, + 0x037e, 0x2061, 0xae00, 0xa005, 0x00c0, 0xa206, 0x2071, 0xa700, + 0x7448, 0x7064, 0x8001, 0xa402, 0x00c8, 0xa228, 0x2100, 0xac06, + 0x0040, 0xa21a, 0x6000, 0xa086, 0x0000, 0x0040, 0xa21a, 0x6008, + 0xa206, 0x00c0, 0xa21a, 0x6018, 0xa1a0, 0x0006, 0x2424, 0xa406, + 0x0040, 0xa224, 0xace0, 0x0010, 0x2001, 0xa716, 0x2004, 0xac02, + 0x00c8, 0xa228, 0x0078, 0xa206, 0xa085, 0x0001, 0x0078, 0xa229, + 0xa006, 0x037f, 0x047f, 0x0e7f, 0x007c, 0x0d7e, 0x007e, 0x1078, + 0x138b, 0x007f, 0x1040, 0x1332, 0x6837, 0x010d, 0x685e, 0x027e, + 0x2010, 0x1078, 0x8d02, 0x2001, 0x0000, 0x0040, 0xa243, 0x2200, + 0xa080, 0x0008, 0x2004, 0x027f, 0x684a, 0x6956, 0x6c46, 0x684f, + 0x0000, 0xa006, 0x68b2, 0x6802, 0x683a, 0x685a, 0x1078, 0x4a73, + 0x0d7f, 0x007c, 0x6700, 0xa786, 0x0000, 0x0040, 0xa265, 0xa786, + 0x0001, 0x0040, 0xa265, 0xa786, 0x000a, 0x0040, 0xa265, 0xa786, + 0x0009, 0x0040, 0xa265, 0xa085, 0x0001, 0x007c, 0x0e7e, 0x6018, + 0x2070, 0x70a0, 0xa206, 0x0e7f, 0x007c, 0x017e, 0x6004, 0xa08e, + 0x001e, 0x00c0, 0xa287, 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, + 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0005, 0x2001, + 0xa9a3, 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x017f, + 0x007c, 0x0005, 0x0005, 0x007c, 0x6024, 0xd0e4, 0x0040, 0xa29d, + 0xd0cc, 0x0040, 0xa297, 0x1078, 0x8fcf, 0x0078, 0xa29d, 0x1078, + 0xa4a5, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x007c, 0xa280, 0x0007, + 0x2004, 0xa084, 0x000f, 0x0079, 0xa2a5, 0xa2ae, 0xa2ae, 0xa2ae, + 0xa2b0, 0xa2ae, 0xa2b0, 0xa2b0, 0xa2ae, 0xa2b0, 0xa006, 0x007c, + 0xa085, 0x0001, 0x007c, 0xa280, 0x0007, 0x2004, 0xa084, 0x000f, + 0x0079, 0xa2ba, 0xa2c3, 0xa2c3, 0xa2c3, 0xa2c3, 0xa2c3, 0xa2c3, + 0xa2ce, 0xa2c3, 0xa2c3, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, + 0x2a00, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x007c, 0x0c7e, 0x2260, + 0x1078, 0xa4a5, 0x603f, 0x0000, 0x6024, 0xc0f4, 0xc0cc, 0x6026, + 0x0c7f, 0x0d7e, 0x2268, 0xa186, 0x0007, 0x00c0, 0xa32f, 0x6810, + 0xa005, 0x0040, 0xa2ec, 0xa080, 0x0013, 0x2004, 0xd0fc, 0x00c0, + 0xa2ec, 0x0d7f, 0x0078, 0xa2c3, 0x6007, 0x003a, 0x6003, 0x0001, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7e, 0x2d60, 0x6100, 0xa186, + 0x0002, 0x00c0, 0xa3bd, 0x6010, 0xa005, 0x00c0, 0xa306, 0x6000, + 0xa086, 0x0007, 0x10c0, 0x1332, 0x0078, 0xa3bd, 0xa08c, 0xf000, + 0x00c0, 0xa312, 0x0078, 0xa312, 0x2068, 0x6800, 0xa005, 0x00c0, + 0xa30c, 0x2d00, 0xa080, 0x0013, 0x2004, 0xa084, 0x0003, 0xa086, + 0x0002, 0x00c0, 0xa32b, 0x6010, 0x2068, 0x684c, 0xc0dc, 0xc0f4, + 0x684e, 0x6850, 0xc0f4, 0xc0fc, 0x6852, 0x2009, 0x0043, 0x1078, + 0x9c2e, 0x0078, 0xa3bd, 0x2009, 0x0041, 0x0078, 0xa3b7, 0xa186, + 0x0005, 0x00c0, 0xa376, 0x6810, 0xa080, 0x0013, 0x2004, 0xd0bc, + 0x00c0, 0xa33d, 0x0d7f, 0x0078, 0xa2c3, 0xd0b4, 0x0040, 0xa345, + 0xd0fc, 0x1040, 0x1332, 0x0078, 0xa2df, 0x6007, 0x003a, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7e, 0x2d60, 0x6100, + 0xa186, 0x0002, 0x0040, 0xa358, 0xa186, 0x0004, 0x00c0, 0xa3bd, + 0x2071, 0xa9e7, 0x7000, 0xa086, 0x0003, 0x00c0, 0xa365, 0x7004, + 0xac06, 0x00c0, 0xa365, 0x7003, 0x0000, 0x6810, 0xa080, 0x0013, + 0x200c, 0xc1f4, 0xc1dc, 0x2102, 0x8000, 0x200c, 0xc1f4, 0xc1fc, + 0xc1bc, 0x2102, 0x2009, 0x0042, 0x0078, 0xa3b7, 0x037e, 0x0d7e, + 0x0d7e, 0x1078, 0x138b, 0x037f, 0x1040, 0x1332, 0x6837, 0x010d, + 0x6803, 0x0000, 0x683b, 0x0000, 0x685b, 0x0000, 0x6b5e, 0x6857, + 0x0045, 0x2c00, 0x6862, 0x6034, 0x6872, 0x2360, 0x6024, 0xc0dd, + 0x6026, 0x6018, 0xa080, 0x0028, 0x2004, 0xa084, 0x00ff, 0x8007, + 0x6320, 0x6b4a, 0x6846, 0x684f, 0x0000, 0x6d6a, 0x6e66, 0x686f, + 0x0001, 0x1078, 0x4a73, 0x2019, 0x0045, 0x6008, 0x2068, 0x1078, + 0x9dd7, 0x2d00, 0x600a, 0x601f, 0x0006, 0x6003, 0x0007, 0x6017, + 0x0000, 0x603f, 0x0000, 0x0d7f, 0x037f, 0x0078, 0xa3be, 0x603f, + 0x0000, 0x6003, 0x0007, 0x1078, 0x9c2e, 0x0c7f, 0x0d7f, 0x007c, + 0xa186, 0x0013, 0x00c0, 0xa3ca, 0x6004, 0xa082, 0x0085, 0x2008, + 0x0079, 0xa3e4, 0xa186, 0x0027, 0x00c0, 0xa3dd, 0x1078, 0x61cd, + 0x037e, 0x0d7e, 0x6010, 0x2068, 0x2019, 0x0004, 0x1078, 0xa1da, + 0x0d7f, 0x037f, 0x1078, 0x62d1, 0x007c, 0xa186, 0x0014, 0x0040, + 0xa3ce, 0x1078, 0x7773, 0x007c, 0xa3ed, 0xa3eb, 0xa3eb, 0xa3eb, + 0xa3eb, 0xa3eb, 0xa3ed, 0x1078, 0x1332, 0x1078, 0x61cd, 0x6003, + 0x000c, 0x1078, 0x62d1, 0x007c, 0xa182, 0x008c, 0x00c8, 0xa3fe, + 0xa182, 0x0085, 0x0048, 0xa3fe, 0x0079, 0xa401, 0x1078, 0x7773, + 0x007c, 0xa408, 0xa408, 0xa408, 0xa408, 0xa40a, 0xa429, 0xa408, + 0x1078, 0x1332, 0x0d7e, 0x2c68, 0x1078, 0x76c7, 0x0040, 0xa424, + 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0xac8e, 0x210c, 0x6136, + 0x2009, 0xac8f, 0x210c, 0x613a, 0x600b, 0xffff, 0x6918, 0x611a, + 0x601f, 0x0004, 0x1078, 0x5d8a, 0x2d60, 0x1078, 0x772d, 0x0d7f, + 0x007c, 0x1078, 0x772d, 0x007c, 0x0e7e, 0x6018, 0x2070, 0x7000, + 0xd0ec, 0x0e7f, 0x007c, 0x6010, 0xa08c, 0xf000, 0x0040, 0xa481, + 0xa080, 0x0013, 0x200c, 0xd1ec, 0x0040, 0xa481, 0x2001, 0xa772, + 0x2004, 0xd0ec, 0x0040, 0xa481, 0x6003, 0x0002, 0x6024, 0xc0e5, + 0x6026, 0xd1ac, 0x0040, 0xa45f, 0x0f7e, 0x2c78, 0x1078, 0x495f, + 0x0f7f, 0x0040, 0xa45f, 0x2001, 0xa9a4, 0x2004, 0x603e, 0x2009, + 0xa772, 0x210c, 0xd1f4, 0x00c0, 0xa47f, 0x0078, 0xa471, 0x2009, + 0xa772, 0x210c, 0xd1f4, 0x0040, 0xa46b, 0x6024, 0xc0e4, 0x6026, + 0xa006, 0x0078, 0xa481, 0x2001, 0xa9a4, 0x200c, 0x8103, 0xa100, + 0x603e, 0x6018, 0xa088, 0x002b, 0x2104, 0xa005, 0x0040, 0xa47c, + 0xa088, 0x0003, 0x0078, 0xa474, 0x2c0a, 0x600f, 0x0000, 0xa085, + 0x0001, 0x007c, 0x017e, 0x0c7e, 0x0e7e, 0x6120, 0xa2f0, 0x002b, + 0x2e04, 0x2060, 0x8cff, 0x0040, 0xa4a1, 0x84ff, 0x00c0, 0xa494, + 0x6020, 0xa106, 0x00c0, 0xa49c, 0x600c, 0x2072, 0x1078, 0x5bc1, + 0x1078, 0x772d, 0x0078, 0xa49e, 0xacf0, 0x0003, 0x2e64, 0x0078, + 0xa48a, 0x0e7f, 0x0c7f, 0x017f, 0x007c, 0x0d7e, 0x6018, 0xa0e8, + 0x002b, 0x2d04, 0xa005, 0x0040, 0xa4b7, 0xac06, 0x0040, 0xa4b5, + 0x2d04, 0xa0e8, 0x0003, 0x0078, 0xa4a9, 0x600c, 0x206a, 0x0d7f, + 0x007c, 0x027e, 0x037e, 0x157e, 0x2011, 0xa726, 0x2204, 0xa084, + 0x00ff, 0x2019, 0xac8e, 0x2334, 0xa636, 0x00c0, 0xa4e5, 0x8318, + 0x2334, 0x2204, 0xa084, 0xff00, 0xa636, 0x00c0, 0xa4e5, 0x2011, + 0xac90, 0x6018, 0xa098, 0x000a, 0x20a9, 0x0004, 0x1078, 0x80de, + 0x00c0, 0xa4e5, 0x2011, 0xac94, 0x6018, 0xa098, 0x0006, 0x20a9, + 0x0004, 0x1078, 0x80de, 0x00c0, 0xa4e5, 0x157f, 0x037f, 0x027f, + 0x007c, 0x0e7e, 0x2071, 0xa700, 0x1078, 0x42b8, 0x1078, 0x2677, + 0x0e7f, 0x007c, 0x0e7e, 0x6018, 0x2070, 0x7000, 0xd0fc, 0x0040, + 0xa4fb, 0x1078, 0xa4fd, 0x0e7f, 0x007c, 0x6850, 0xc0e5, 0x6852, + 0x007c, 0x0e7e, 0x0c7e, 0x077e, 0x067e, 0x057e, 0x047e, 0x027e, + 0x017e, 0x127e, 0x2091, 0x8000, 0x2029, 0xa9ba, 0x252c, 0x2021, + 0xa9c0, 0x2424, 0x2061, 0xae00, 0x2071, 0xa700, 0x7648, 0x7064, + 0xa606, 0x0040, 0xa555, 0x671c, 0xa786, 0x0001, 0x0040, 0xa524, + 0xa786, 0x0008, 0x00c0, 0xa54b, 0x2500, 0xac06, 0x0040, 0xa54b, + 0x2400, 0xac06, 0x0040, 0xa54b, 0x1078, 0xa252, 0x0040, 0xa54b, + 0x1078, 0xa266, 0x00c0, 0xa54b, 0x6000, 0xa086, 0x0004, 0x00c0, + 0xa53d, 0x017e, 0x1078, 0x1757, 0x017f, 0x1078, 0x8efc, 0x00c0, + 0xa543, 0x1078, 0x28a6, 0x1078, 0x8f10, 0x00c0, 0xa549, 0x1078, + 0x7c83, 0x1078, 0x8ed6, 0xace0, 0x0010, 0x2001, 0xa716, 0x2004, + 0xac02, 0x00c8, 0xa555, 0x0078, 0xa514, 0x127f, 0x017f, 0x027f, + 0x047f, 0x057f, 0x067f, 0x077f, 0x0c7f, 0x0e7f, 0x007c, 0x127e, + 0x007e, 0x0e7e, 0x017e, 0x2091, 0x8000, 0x2071, 0xa740, 0xd5a4, + 0x0040, 0xa56d, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0040, 0xa573, + 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0040, 0xa589, 0x2500, 0xa084, + 0x0007, 0xa08e, 0x0003, 0x0040, 0xa589, 0xa08e, 0x0004, 0x0040, + 0xa589, 0xa08e, 0x0005, 0x0040, 0xa589, 0x2071, 0xa74a, 0x1078, + 0xa5ca, 0x017f, 0x0e7f, 0x007f, 0x127f, 0x007c, 0x127e, 0x007e, + 0x0e7e, 0x017e, 0x2091, 0x8000, 0x2071, 0xa740, 0xd5a4, 0x0040, + 0xa59c, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0040, 0xa5a2, 0x7030, + 0x8000, 0x7032, 0xd5ac, 0x0040, 0xa5b8, 0x2500, 0xa084, 0x0007, + 0xa08e, 0x0003, 0x0040, 0xa5b8, 0xa08e, 0x0004, 0x0040, 0xa5b8, + 0xa08e, 0x0005, 0x0040, 0xa5b8, 0x2071, 0xa74a, 0x1078, 0xa5ca, + 0x017f, 0x0e7f, 0x007f, 0x127f, 0x007c, 0x127e, 0x007e, 0x0e7e, + 0x2091, 0x8000, 0x2071, 0xa742, 0x1078, 0xa5ca, 0x0e7f, 0x007f, + 0x127f, 0x007c, 0x2e04, 0x8000, 0x2072, 0x00c8, 0xa5d3, 0x8e70, + 0x2e04, 0x8000, 0x2072, 0x007c, 0x0e7e, 0x2071, 0xa740, 0x1078, + 0xa5ca, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa744, 0x1078, 0xa5ca, + 0x0e7f, 0x007c, 0x127e, 0x007e, 0x0e7e, 0x2091, 0x8000, 0x2071, + 0xa740, 0x7044, 0x8000, 0x7046, 0x0e7f, 0x007f, 0x127f, 0x007c, + 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x4811 }; +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_length01 = 0x9601; +#else +unsigned short risc_code_length01 = 0x9601; +#endif + diff --git a/drivers/scsi/qla2xxx/ql2200.c b/drivers/scsi/qla2xxx/ql2200.c new file mode 100644 index 000000000..0eef72dc8 --- /dev/null +++ b/drivers/scsi/qla2xxx/ql2200.c @@ -0,0 +1,91 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (C) 2003 Christoph Hellwig. + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include +#include +#include + +#include "qla_def.h" + +static char qla_driver_name[] = "qla2200"; + +extern unsigned char fw2200tp_version[]; +extern unsigned char fw2200tp_version_str[]; +extern unsigned short fw2200tp_addr01; +extern unsigned short fw2200tp_code01[]; +extern unsigned short fw2200tp_length01; + +static struct qla_fw_info qla_fw_tbl[] = { + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2200tp_code01[0], + .fwlen = &fw2200tp_length01, + .fwstart = &fw2200tp_addr01, + }, + + { FW_INFO_ADDR_NOMORE, }, +}; + +static struct qla_board_info qla_board_tbl = { + .drv_name = qla_driver_name, + + .isp_name = "ISP2200", + .fw_info = qla_fw_tbl, +}; + +static struct pci_device_id qla2200_pci_tbl[] = { + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2200, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl, + }, + + {0, 0}, +}; +MODULE_DEVICE_TABLE(pci, qla2200_pci_tbl); + +static int __devinit +qla2200_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, + (struct qla_board_info *)id->driver_data); +} + +static void __devexit +qla2200_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + +static struct pci_driver qla2200_pci_driver = { + .name = "qla2200", + .id_table = qla2200_pci_tbl, + .probe = qla2200_probe_one, + .remove = __devexit_p(qla2200_remove_one), +}; + +static int __init +qla2200_init(void) +{ + return pci_module_init(&qla2200_pci_driver); +} + +static void __exit +qla2200_exit(void) +{ + pci_unregister_driver(&qla2200_pci_driver); +} + +module_init(qla2200_init); +module_exit(qla2200_exit); + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic ISP22xx FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff --git a/drivers/scsi/qla2xxx/ql2200_fw.c b/drivers/scsi/qla2xxx/ql2200_fw.c index 883563b8a..ac07e18ab 100644 --- a/drivers/scsi/qla2xxx/ql2200_fw.c +++ b/drivers/scsi/qla2xxx/ql2200_fw.c @@ -1,7066 +1,5333 @@ /* - * Firmware version 2.02.08 from - * - * ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2200_fw.bin - * - * xxd -g 1 -i ql2200_fw.bin | indent -l80 -i8 -o ql2200_fw.c + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation * + * See LICENSE.qla2xxx for copyright and licensing details. */ -#include +/* + * Firmware Version 2.02.08 (17:06 Mar 22, 2005) + */ -unsigned char ql2200_fw_bin[] = { - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x2b, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x02, 0x00, 0x08, 0x00, 0x17, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, - 0x49, 0x47, 0x48, 0x54, 0x20, 0x32, 0x30, 0x30, 0x31, 0x20, 0x51, 0x4c, - 0x4f, 0x47, 0x49, 0x43, 0x20, 0x43, 0x4f, 0x52, 0x50, 0x4f, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x49, 0x53, 0x50, 0x32, 0x32, 0x30, 0x30, - 0x20, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x30, 0x32, 0x2e, 0x30, 0x32, - 0x2e, 0x30, 0x38, 0x20, 0x20, 0x20, 0x20, 0x20, 0x24, 0x00, 0x20, 0xc1, - 0x00, 0x05, 0x20, 0x01, 0x01, 0x7f, 0x20, 0x03, 0x00, 0x00, 0x20, 0xc9, - 0xbb, 0xff, 0x20, 0x91, 0x20, 0x00, 0x20, 0x59, 0x00, 0x00, 0x2b, 0x78, - 0x78, 0x23, 0x00, 0x04, 0x20, 0x89, 0x29, 0x9f, 0x20, 0x51, 0xb6, 0x00, - 0x2a, 0x70, 0x20, 0x29, 0xee, 0x00, 0x20, 0x31, 0xff, 0xff, 0x20, 0x39, - 0xed, 0xe9, 0x20, 0x21, 0x02, 0x00, 0x08, 0x04, 0x14, 0x6d, 0x20, 0xa1, - 0xb5, 0x2b, 0xa0, 0x0e, 0x20, 0xa9, 0x08, 0xd5, 0x41, 0xa4, 0x34, 0x00, - 0x75, 0x62, 0x76, 0x66, 0x77, 0x5e, 0x74, 0x6a, 0x74, 0x6e, 0x20, 0xa1, - 0xbe, 0x00, 0x71, 0x64, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, - 0xa1, 0x8c, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x0b, 0xa1, 0x12, 0xa0, 0x0e, - 0x21, 0xa8, 0x41, 0xa4, 0x34, 0x00, 0x82, 0x11, 0x1d, 0xd8, 0x71, 0x64, - 0x34, 0x00, 0xa1, 0x02, 0x01, 0x20, 0x02, 0x18, 0x20, 0xa8, 0xa0, 0x0e, - 0x41, 0xa4, 0x38, 0x00, 0xd0, 0x8c, 0x01, 0xd8, 0x20, 0x09, 0xb6, 0x00, - 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0xa1, 0x8c, 0x00, 0x0f, - 0x20, 0x01, 0x00, 0x01, 0xa1, 0x12, 0x20, 0xa1, 0x10, 0x00, 0xa0, 0x0e, - 0x21, 0xa8, 0x41, 0xa4, 0x82, 0x11, 0x1d, 0xe0, 0x20, 0x09, 0xb6, 0x00, - 0x34, 0x00, 0xa1, 0x02, 0x01, 0x20, 0x02, 0x18, 0x20, 0xa8, 0xa0, 0x0e, - 0x41, 0xa4, 0x08, 0x0c, 0x14, 0x16, 0x08, 0x0c, 0x16, 0x37, 0x08, 0x0c, - 0x17, 0xd4, 0x08, 0x0c, 0x1f, 0xbe, 0x08, 0x0c, 0x4c, 0x72, 0x08, 0x0c, - 0x86, 0x46, 0x08, 0x0c, 0x15, 0xc0, 0x08, 0x0c, 0x2e, 0xf9, 0x08, 0x0c, - 0x5d, 0xfc, 0x08, 0x0c, 0x53, 0xb3, 0x08, 0x0c, 0x69, 0x40, 0x08, 0x0c, - 0x25, 0x45, 0x08, 0x0c, 0x6b, 0xd3, 0x08, 0x0c, 0x64, 0x2d, 0x08, 0x0c, - 0x23, 0xff, 0x08, 0x0c, 0x25, 0x13, 0x20, 0x91, 0x30, 0x09, 0x78, 0x23, - 0x00, 0x00, 0x10, 0x04, 0x10, 0xc5, 0x78, 0x20, 0xa0, 0x86, 0x00, 0x02, - 0x11, 0x50, 0x78, 0x23, 0x40, 0x00, 0x0e, 0x04, 0x10, 0xbd, 0x78, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x2a, 0x70, - 0x70, 0x03, 0x00, 0x00, 0x2a, 0x70, 0x70, 0x00, 0xa0, 0x8e, 0x00, 0x03, - 0x11, 0x58, 0x08, 0x0c, 0x3f, 0x4f, 0x08, 0x0c, 0x2f, 0x20, 0x08, 0x0c, - 0x5e, 0x4a, 0x08, 0x0c, 0x55, 0x62, 0x08, 0x0c, 0x69, 0x6b, 0x0c, 0x80, - 0x00, 0x0b, 0x0c, 0x98, 0x10, 0xe4, 0x10, 0xe5, 0x12, 0x15, 0x10, 0xe2, - 0x12, 0xe2, 0x14, 0x13, 0x14, 0x14, 0x14, 0x15, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0x05, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x01, 0x19, 0x04, 0x11, 0xf2, 0x08, 0x0c, 0x15, 0x8d, - 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x50, 0x08, 0x0c, 0x5b, 0x67, 0x15, 0xc0, - 0x20, 0x79, 0x01, 0x00, 0x78, 0x28, 0xa0, 0x85, 0x18, 0x00, 0x78, 0x2a, - 0x04, 0x88, 0x08, 0x0c, 0x5a, 0x79, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x01, - 0x19, 0x04, 0x11, 0xf2, 0x70, 0x8c, 0xa0, 0x86, 0x00, 0x28, 0x19, 0x04, - 0x11, 0xf2, 0x20, 0x01, 0x01, 0x61, 0x20, 0x03, 0x00, 0x01, 0x20, 0x79, - 0x01, 0x00, 0x78, 0x27, 0xff, 0xff, 0x7a, 0x28, 0xa2, 0x95, 0x1e, 0x2f, - 0x7a, 0x2a, 0x20, 0x11, 0x5a, 0x14, 0x08, 0x0c, 0x6a, 0x0e, 0x20, 0x11, - 0x5a, 0x07, 0x08, 0x0c, 0x6a, 0xce, 0x20, 0x11, 0x5a, 0x56, 0x08, 0x0c, - 0x6a, 0x0e, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0x20, 0x11, - 0x80, 0x30, 0x20, 0x19, 0x00, 0x00, 0x70, 0x8b, 0x00, 0x00, 0x08, 0x0c, - 0x1e, 0x05, 0x00, 0xe8, 0x08, 0x0c, 0x44, 0xd6, 0x20, 0x79, 0x01, 0x00, - 0x78, 0x44, 0xa0, 0x05, 0x19, 0x04, 0x11, 0xf2, 0x20, 0x11, 0x4b, 0x23, - 0x08, 0x0c, 0x6a, 0x0e, 0x20, 0x11, 0x5a, 0x56, 0x08, 0x0c, 0x6a, 0x0e, - 0x08, 0x0c, 0x1e, 0x05, 0x20, 0x01, 0xb8, 0x8d, 0x20, 0x04, 0x78, 0x0e, - 0x78, 0x40, 0xa0, 0x84, 0xff, 0xfb, 0x78, 0x42, 0x20, 0x11, 0x80, 0x10, - 0x73, 0xcc, 0x08, 0x0c, 0x3f, 0x13, 0x72, 0x3c, 0xc2, 0x84, 0x72, 0x3e, - 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xc1, 0xac, 0x21, 0x02, 0x08, 0x0c, - 0x7f, 0xbc, 0x20, 0x11, 0x00, 0x04, 0x08, 0x0c, 0x9d, 0x1c, 0x08, 0x0c, - 0x52, 0xbf, 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x58, 0x08, 0x0c, 0x4c, 0x4a, - 0x01, 0x40, 0x70, 0x8b, 0x00, 0x01, 0x70, 0xc7, 0x00, 0x00, 0x08, 0x0c, - 0x46, 0x73, 0x08, 0x04, 0x11, 0xf2, 0x08, 0x0c, 0x53, 0x7b, 0x01, 0x20, - 0x7a, 0x0c, 0xc2, 0xb4, 0x7a, 0x0e, 0x00, 0x60, 0x70, 0x73, 0x00, 0x00, - 0x08, 0x0c, 0xa0, 0xc4, 0x70, 0xd4, 0xd0, 0x9c, 0x11, 0x28, 0x70, 0xa0, - 0xa0, 0x05, 0x01, 0x10, 0x08, 0x0c, 0x4c, 0x28, 0x70, 0xdf, 0x00, 0x00, - 0x70, 0xdb, 0x00, 0x00, 0x72, 0xd4, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x80, - 0x20, 0x11, 0x00, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x20, 0x20, 0x19, - 0xb8, 0x8f, 0x21, 0x1a, 0x00, 0x1e, 0x70, 0x53, 0xff, 0xff, 0x70, 0x57, - 0x00, 0xef, 0x70, 0x77, 0x00, 0x00, 0x00, 0x20, 0x20, 0x19, 0xb8, 0x8f, - 0x20, 0x1b, 0x00, 0x00, 0x20, 0x79, 0xb6, 0x52, 0x78, 0x04, 0xd0, 0xac, - 0x01, 0x08, 0xc2, 0x95, 0x72, 0xd6, 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x18, - 0xa2, 0x96, 0x00, 0x04, 0x05, 0x48, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, - 0x9d, 0x1c, 0x70, 0x9b, 0x00, 0x00, 0x70, 0x9f, 0xff, 0xff, 0x70, 0x03, - 0x00, 0x02, 0x20, 0x79, 0x01, 0x00, 0x78, 0x27, 0x00, 0x03, 0x78, 0x28, - 0xa0, 0x85, 0x00, 0x03, 0x78, 0x2a, 0x00, 0xfe, 0x08, 0x0c, 0x2a, 0xed, - 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0x80, 0xfc, 0x08, 0x0c, 0x71, 0xe5, - 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x00, 0x16, 0x08, 0x0c, 0x29, 0x20, 0x61, 0xe2, 0x00, 0x1e, 0x00, 0xce, - 0x01, 0x2e, 0x04, 0x20, 0x70, 0x9b, 0x00, 0x00, 0x70, 0x9f, 0xff, 0xff, - 0x70, 0x03, 0x00, 0x02, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x78, 0x27, - 0x00, 0x03, 0x78, 0x28, 0xa0, 0x85, 0x00, 0x03, 0x78, 0x2a, 0x00, 0xfe, - 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0x80, 0xfc, 0x08, 0x0c, 0x71, 0xe5, - 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x00, 0x16, 0x08, 0x0c, 0x29, 0x20, 0x61, 0xe2, 0x00, 0x1e, 0x00, 0xce, - 0x00, 0xfe, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0x18, 0x20, 0xa9, 0x01, 0x00, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x82, - 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x18, 0x20, 0x09, 0x00, 0x00, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x2d, 0xcc, 0x81, 0x08, 0x1f, 0x04, - 0x12, 0x06, 0x00, 0xce, 0x70, 0x73, 0x00, 0x00, 0x70, 0x74, 0xa0, 0x84, - 0x00, 0xff, 0x70, 0x76, 0x70, 0xa3, 0x00, 0x00, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x19, 0x04, - 0x12, 0xe0, 0x70, 0x9c, 0xa0, 0x86, 0xff, 0xff, 0x01, 0x30, 0x08, 0x0c, - 0x2a, 0xed, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x04, 0x12, 0xe0, 0x70, 0xd4, - 0xd0, 0xac, 0x11, 0x10, 0xd0, 0x9c, 0x05, 0x40, 0xd0, 0x84, 0x05, 0x30, - 0x00, 0x06, 0x00, 0x16, 0x20, 0x01, 0x01, 0x03, 0x20, 0x09, 0xb8, 0x8d, - 0x21, 0x0c, 0x21, 0x02, 0x00, 0x1e, 0x00, 0x0e, 0xd0, 0x8c, 0x01, 0xd0, - 0x70, 0xd8, 0xa0, 0x86, 0xff, 0xff, 0x01, 0x90, 0x08, 0x0c, 0x2c, 0x4c, - 0x08, 0x0c, 0x71, 0xe5, 0x70, 0xd4, 0xd0, 0x94, 0x19, 0x04, 0x12, 0xe0, - 0x20, 0x11, 0x00, 0x01, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x2c, 0x84, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x04, 0x12, 0xe0, 0x70, 0xdc, 0xa0, 0x05, - 0x19, 0x04, 0x12, 0xe0, 0x70, 0x98, 0xa0, 0x05, 0x19, 0x04, 0x12, 0xe0, - 0x70, 0xd4, 0xd0, 0xa4, 0x01, 0x18, 0xd0, 0xb4, 0x09, 0x04, 0x12, 0xe0, - 0x08, 0x0c, 0x53, 0x7b, 0x19, 0x04, 0x12, 0xe0, 0x20, 0x01, 0xb6, 0x53, - 0x20, 0x04, 0xd0, 0xac, 0x01, 0xc8, 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, - 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x50, 0x1b, - 0x11, 0x18, 0x60, 0x00, 0xd0, 0xec, 0x11, 0x38, 0x00, 0x1e, 0x81, 0x08, - 0x1f, 0x04, 0x12, 0x6d, 0x00, 0xce, 0x01, 0x5e, 0x00, 0x28, 0x00, 0x1e, - 0x00, 0xce, 0x01, 0x5e, 0x08, 0x04, 0x12, 0xe0, 0x00, 0x06, 0x00, 0x16, - 0x20, 0x01, 0x01, 0x03, 0x20, 0x09, 0xb8, 0x8d, 0x21, 0x0c, 0x21, 0x02, - 0x00, 0x1e, 0x00, 0x0e, 0x71, 0xa8, 0x81, 0xff, 0x11, 0xb0, 0xa0, 0x06, - 0x20, 0x09, 0x02, 0x00, 0x20, 0xa9, 0x00, 0x02, 0x20, 0xa1, 0xb8, 0xdf, - 0x40, 0xa1, 0x20, 0x09, 0x07, 0x00, 0x20, 0xa9, 0x00, 0x02, 0x20, 0xa1, - 0xb8, 0xcf, 0x40, 0xa1, 0x70, 0x70, 0x80, 0x07, 0x71, 0x74, 0x81, 0x0f, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0xa1, 0x20, 0xa1, 0xb8, 0xd3, 0x20, 0x09, - 0x00, 0x00, 0x08, 0x0c, 0x15, 0x00, 0x20, 0x01, 0x00, 0x00, 0x81, 0x0f, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0xa1, 0x70, 0x30, 0xc0, 0x8c, 0x70, 0x32, - 0x70, 0x03, 0x00, 0x03, 0x70, 0x9f, 0xff, 0xff, 0x08, 0x0c, 0x15, 0x86, - 0xa0, 0x06, 0x08, 0x0c, 0x27, 0xf8, 0x08, 0x0c, 0x3f, 0x85, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, 0x5b, 0x67, 0x01, 0x50, 0x08, 0x0c, - 0x5b, 0x41, 0x78, 0x28, 0x01, 0x18, 0xa0, 0x84, 0xe1, 0xff, 0x00, 0x10, - 0xa0, 0x84, 0xff, 0xdf, 0x78, 0x2a, 0x00, 0xfe, 0x20, 0x01, 0xb8, 0xe2, - 0x20, 0x04, 0xa0, 0x86, 0x00, 0x05, 0x11, 0x20, 0x20, 0x11, 0x00, 0x00, - 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0x81, 0x06, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x0c, 0x72, 0xa2, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x46, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x79, 0x01, 0x00, 0x20, 0x09, 0xb6, 0x34, 0x21, 0x04, 0xa0, 0x05, - 0x11, 0x10, 0x08, 0x0c, 0x29, 0x4c, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, - 0x4c, 0x11, 0x79, 0x40, 0xa1, 0x8c, 0x00, 0x10, 0x79, 0x42, 0x79, 0x24, - 0xd1, 0xb4, 0x01, 0x10, 0x78, 0x27, 0x00, 0x40, 0xd1, 0x9c, 0x01, 0x10, - 0x78, 0x27, 0x00, 0x08, 0x00, 0x06, 0x00, 0x36, 0x01, 0x56, 0x79, 0x54, - 0xd1, 0xac, 0x19, 0x04, 0x13, 0x50, 0x08, 0x0c, 0x5b, 0x53, 0x01, 0x58, - 0x08, 0x0c, 0x5b, 0x67, 0x11, 0x28, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, - 0x00, 0x00, 0x00, 0x70, 0x08, 0x0c, 0x5b, 0x49, 0x0d, 0xc0, 0x20, 0x01, - 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x5a, 0x79, 0x00, 0x58, 0x08, 0x0c, 0x5b, 0x41, - 0x01, 0x40, 0x20, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x4c, 0x11, 0x78, 0x43, - 0x00, 0x90, 0x78, 0x43, 0x00, 0x10, 0x20, 0xa9, 0x09, 0xc4, 0x78, 0x20, - 0xd0, 0x9c, 0x11, 0x38, 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x38, 0x78, 0x24, - 0xd0, 0xac, 0x19, 0x04, 0x13, 0xfa, 0x1f, 0x04, 0x13, 0x2f, 0x00, 0x70, - 0x78, 0x24, 0x08, 0x0c, 0x5b, 0x5d, 0x01, 0x18, 0xd0, 0xac, 0x19, 0x04, - 0x13, 0xfa, 0xa0, 0x84, 0x18, 0x00, 0x0d, 0x98, 0x70, 0x03, 0x00, 0x01, - 0x08, 0x04, 0x13, 0xfa, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x27, 0xf8, - 0x08, 0x04, 0x14, 0x09, 0x78, 0x50, 0xa0, 0x84, 0x01, 0x80, 0x78, 0x52, - 0x78, 0x2f, 0x00, 0x20, 0x20, 0xa9, 0x00, 0x46, 0x1d, 0x04, 0x13, 0x58, - 0x08, 0x0c, 0x6a, 0xb6, 0x1f, 0x04, 0x13, 0x58, 0x78, 0x50, 0xa0, 0x84, - 0x01, 0x80, 0xa0, 0x85, 0x04, 0x00, 0x78, 0x52, 0x78, 0x2f, 0x00, 0x00, - 0x08, 0x0c, 0x5b, 0x53, 0x01, 0x58, 0x08, 0x0c, 0x5b, 0x67, 0x11, 0x28, - 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0x00, 0x00, 0x00, 0x70, 0x08, 0x0c, - 0x5b, 0x49, 0x0d, 0xc0, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x5a, 0x79, - 0x00, 0x20, 0x20, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x4c, 0x11, 0x20, 0xa9, - 0x00, 0x0e, 0xe0, 0x00, 0x1f, 0x04, 0x13, 0x85, 0x78, 0x50, 0xa0, 0x84, - 0x01, 0x80, 0xa0, 0x85, 0x14, 0x00, 0x78, 0x52, 0x08, 0x0c, 0x5b, 0x41, - 0x01, 0x20, 0x78, 0x43, 0x00, 0x90, 0x78, 0x43, 0x00, 0x10, 0x20, 0x21, - 0xe6, 0x78, 0x20, 0x19, 0xea, 0x60, 0x78, 0x20, 0xd0, 0x9c, 0x15, 0x58, - 0x08, 0x0c, 0x5b, 0x41, 0x05, 0xd8, 0x78, 0x24, 0xd0, 0xac, 0x19, 0x04, - 0x13, 0xfa, 0x08, 0x0c, 0x5b, 0x67, 0x15, 0x08, 0x00, 0x46, 0x20, 0x21, - 0x01, 0x90, 0x84, 0x21, 0x1d, 0xf0, 0x00, 0x4e, 0x84, 0x21, 0x11, 0xc8, - 0x78, 0x27, 0x00, 0x48, 0x20, 0xa9, 0x01, 0xf4, 0x1d, 0x04, 0x13, 0xb2, - 0x08, 0x0c, 0x6a, 0xb6, 0x1f, 0x04, 0x13, 0xb2, 0x78, 0x24, 0xa0, 0x84, - 0x00, 0x68, 0x15, 0xc8, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x70, 0x03, 0x00, 0x01, - 0x04, 0x98, 0x1d, 0x04, 0x13, 0xcb, 0x08, 0x0c, 0x6a, 0xb6, 0x83, 0x19, - 0x19, 0x60, 0x20, 0x09, 0xb6, 0x34, 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, - 0xa0, 0x84, 0xff, 0xf0, 0x01, 0x20, 0x20, 0x0b, 0x00, 0x00, 0x08, 0x0c, - 0x29, 0x4c, 0x00, 0xd8, 0x08, 0x0c, 0x5b, 0x53, 0x11, 0x40, 0xa4, 0xa2, - 0x00, 0x64, 0x11, 0x28, 0x08, 0x0c, 0x5b, 0x18, 0x70, 0x03, 0x00, 0x01, - 0x00, 0xa8, 0x78, 0x27, 0x18, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x78, 0x24, - 0x08, 0x0c, 0x5b, 0x5d, 0x01, 0x10, 0xd0, 0xac, 0x11, 0x58, 0xa0, 0x84, - 0x18, 0x00, 0x09, 0xa8, 0x70, 0x03, 0x00, 0x01, 0x00, 0x28, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x27, 0xf8, 0x00, 0x48, 0x20, 0x01, 0xb6, 0x34, - 0x20, 0x03, 0x00, 0x00, 0x78, 0x27, 0x00, 0x48, 0x78, 0x28, 0xc0, 0x9d, - 0x78, 0x2a, 0x78, 0x50, 0xa0, 0x84, 0x01, 0x80, 0xa0, 0x85, 0x04, 0x00, - 0x78, 0x52, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x0e, 0x08, 0x0c, 0x15, 0x5d, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x4e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x05, 0x00, 0x05, 0x2a, 0x70, 0x20, 0x61, 0xb8, 0xc2, 0x20, 0x63, - 0x00, 0x02, 0x60, 0x07, 0x00, 0x02, 0x60, 0x0b, 0x00, 0x08, 0x60, 0x0f, - 0x00, 0x17, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0x00, 0x00, 0x70, 0x8b, - 0x00, 0x00, 0x20, 0x09, 0x01, 0x00, 0x21, 0x04, 0xa0, 0x82, 0x00, 0x02, - 0x02, 0x18, 0x70, 0x53, 0xff, 0xff, 0x00, 0x10, 0x70, 0x53, 0x00, 0x00, - 0x70, 0x5b, 0xff, 0xff, 0x70, 0x73, 0x00, 0x00, 0x70, 0x77, 0x00, 0x00, - 0x08, 0x0c, 0xa0, 0xc4, 0x20, 0x61, 0xb8, 0x8e, 0x60, 0x03, 0x09, 0x09, - 0x60, 0x07, 0x00, 0x00, 0x60, 0x0b, 0x88, 0x00, 0x60, 0x0f, 0x02, 0x00, - 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, 0x00, 0x0f, 0x60, 0x1b, 0x00, 0x00, - 0x60, 0x1f, 0x07, 0xd0, 0x20, 0x61, 0xb8, 0x96, 0x60, 0x03, 0x80, 0x00, - 0x60, 0x07, 0x00, 0x00, 0x60, 0x0b, 0x00, 0x00, 0x60, 0x0f, 0x02, 0x00, - 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, 0x00, 0x00, 0x60, 0x1b, 0x00, 0x01, - 0x60, 0x1f, 0x00, 0x00, 0x20, 0x61, 0xb8, 0xb9, 0x60, 0x03, 0x51, 0x4c, - 0x60, 0x07, 0x4f, 0x47, 0x60, 0x0b, 0x49, 0x43, 0x60, 0x0f, 0x20, 0x20, - 0x20, 0x01, 0xb6, 0x28, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x04, 0xa0, - 0x20, 0x11, 0x00, 0x00, 0x81, 0xff, 0x05, 0x70, 0xa1, 0x86, 0x00, 0x01, - 0x11, 0x48, 0x20, 0x31, 0x8f, 0xff, 0x20, 0x39, 0xd6, 0x01, 0x20, 0x21, - 0x01, 0x00, 0x20, 0x29, 0xd6, 0x00, 0x00, 0xe8, 0xa1, 0x86, 0x00, 0x02, - 0x11, 0x18, 0x20, 0x11, 0x00, 0x00, 0x00, 0xb8, 0xa1, 0x86, 0x00, 0x05, - 0x11, 0x18, 0x20, 0x11, 0x00, 0x01, 0x00, 0x88, 0xa1, 0x86, 0x00, 0x09, - 0x11, 0x18, 0x20, 0x11, 0x00, 0x02, 0x00, 0x58, 0xa1, 0x86, 0x00, 0x0a, - 0x11, 0x18, 0x20, 0x11, 0x00, 0x02, 0x00, 0x28, 0xa1, 0x86, 0x00, 0x55, - 0x11, 0x10, 0x20, 0x11, 0x00, 0x03, 0x38, 0x00, 0xa0, 0x84, 0xff, 0xfc, - 0xa2, 0x05, 0x20, 0xc0, 0x08, 0x04, 0x10, 0x4d, 0xa0, 0x0e, 0x20, 0x11, - 0x00, 0x03, 0x20, 0x19, 0x14, 0xa9, 0x08, 0x04, 0x14, 0xfa, 0x20, 0x19, - 0xaa, 0xaa, 0x20, 0x61, 0xff, 0xff, 0x2c, 0x14, 0x23, 0x62, 0xe0, 0x00, - 0xe0, 0x00, 0x2c, 0x04, 0xa3, 0x06, 0x22, 0x62, 0x11, 0x10, 0xc1, 0xb5, - 0xc1, 0xa5, 0x20, 0x11, 0x00, 0x00, 0x20, 0x19, 0x14, 0xbc, 0x04, 0xf0, - 0x20, 0x19, 0xaa, 0xaa, 0x20, 0x61, 0xff, 0xff, 0x2c, 0x14, 0x23, 0x62, - 0xe0, 0x00, 0xe0, 0x00, 0x2c, 0x1c, 0x20, 0x61, 0x7f, 0xff, 0xe0, 0x00, - 0xe0, 0x00, 0x2c, 0x04, 0x20, 0x61, 0xff, 0xff, 0x22, 0x62, 0xa3, 0x06, - 0x01, 0x10, 0xc1, 0x8d, 0x00, 0x08, 0xc1, 0x85, 0x20, 0x11, 0x00, 0x02, - 0x20, 0x19, 0x14, 0xd7, 0x04, 0x18, 0x20, 0x61, 0xff, 0xff, 0x20, 0x19, - 0xaa, 0xaa, 0x2c, 0x14, 0x23, 0x62, 0xe0, 0x00, 0xe0, 0x00, 0x2c, 0x04, - 0x22, 0x62, 0xa3, 0x06, 0x11, 0x80, 0x2c, 0x14, 0x23, 0x62, 0xe0, 0x00, - 0xe0, 0x00, 0x2c, 0x1c, 0x20, 0x61, 0x7f, 0xff, 0x2c, 0x04, 0x20, 0x61, - 0xff, 0xff, 0x22, 0x62, 0xa3, 0x06, 0x11, 0x10, 0xc1, 0x95, 0x00, 0x08, - 0xc1, 0x9d, 0x20, 0x11, 0x00, 0x01, 0x20, 0x19, 0x14, 0xf8, 0x00, 0x10, - 0x08, 0x04, 0x14, 0x6e, 0x38, 0x00, 0xa0, 0x84, 0xff, 0xfc, 0xa2, 0x05, - 0x20, 0xc0, 0x08, 0x37, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0x50, 0x1b, - 0x11, 0x78, 0x60, 0x04, 0xa0, 0xc4, 0x00, 0xff, 0xa8, 0xc6, 0x00, 0x06, - 0x01, 0x28, 0xa0, 0xc4, 0xff, 0x00, 0xa8, 0xc6, 0x06, 0x00, 0x11, 0x20, - 0xa1, 0x86, 0x00, 0x80, 0x01, 0x08, 0x82, 0x10, 0x81, 0x08, 0xa1, 0x86, - 0x01, 0x00, 0x1d, 0x50, 0x22, 0x08, 0x00, 0x05, 0x20, 0x91, 0x80, 0x00, - 0x0e, 0x04, 0x15, 0x1c, 0x00, 0x06, 0x00, 0x16, 0x20, 0x79, 0x00, 0x00, - 0x78, 0x18, 0xd0, 0x84, 0x1d, 0xe8, 0x00, 0x1e, 0x79, 0x2e, 0x00, 0x0e, - 0x78, 0x2a, 0x00, 0x0e, 0x78, 0x26, 0x39, 0x00, 0x78, 0x3a, 0x78, 0x23, - 0x80, 0x02, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, 0x01, 0x26, - 0x01, 0x56, 0x01, 0x46, 0x20, 0xa9, 0x00, 0x10, 0x20, 0xa1, 0xba, 0x0d, - 0x20, 0x91, 0x20, 0x00, 0x40, 0xa1, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x91, - 0x22, 0x00, 0x40, 0xa1, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x91, 0x24, 0x00, - 0x40, 0xa1, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x91, 0x26, 0x00, 0x40, 0xa1, - 0x20, 0xa9, 0x00, 0x10, 0x20, 0x91, 0x28, 0x00, 0x40, 0xa1, 0x01, 0x4e, - 0x01, 0x5e, 0x01, 0x2e, 0x20, 0x79, 0xb6, 0x00, 0x78, 0x03, 0x00, 0x05, - 0x20, 0x91, 0x40, 0x80, 0x04, 0xc9, 0x0c, 0xf8, 0x00, 0x05, 0x00, 0x06, - 0x08, 0x0c, 0x15, 0xa8, 0x15, 0x18, 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x24, - 0x2f, 0x04, 0x80, 0x00, 0x20, 0x7a, 0xa0, 0x82, 0x00, 0x0f, 0x02, 0x58, - 0xa0, 0x06, 0x20, 0x7a, 0x20, 0x79, 0xb6, 0x26, 0x2f, 0x04, 0xa0, 0x84, - 0x00, 0x01, 0xa0, 0x86, 0x00, 0x01, 0x20, 0x7a, 0x00, 0x70, 0x20, 0x79, - 0xb6, 0x26, 0x2f, 0x7c, 0x8f, 0xff, 0x11, 0x28, 0x20, 0x01, 0x0c, 0x03, - 0x20, 0x03, 0x00, 0x40, 0x00, 0x20, 0x20, 0x01, 0x0c, 0x03, 0x20, 0x03, - 0x00, 0xc0, 0x00, 0xfe, 0x00, 0x0e, 0x00, 0x05, 0x04, 0x09, 0x11, 0x20, - 0x20, 0x01, 0x0c, 0x03, 0x20, 0x03, 0x00, 0x80, 0x00, 0x05, 0x00, 0xd1, - 0x11, 0x20, 0x20, 0x01, 0x0c, 0x03, 0x20, 0x03, 0x00, 0x40, 0x00, 0x05, - 0x00, 0x06, 0x00, 0x91, 0x11, 0x78, 0x20, 0x01, 0x0c, 0x03, 0x20, 0x03, - 0x00, 0x40, 0x20, 0x09, 0x0f, 0xff, 0x00, 0xa1, 0x20, 0x01, 0x0c, 0x03, - 0x20, 0x03, 0x00, 0x80, 0x20, 0x09, 0x0f, 0xff, 0x00, 0x69, 0x0c, 0x88, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x61, 0x0c, 0x00, 0x2c, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0xaa, 0x00, 0xce, 0x00, 0x05, - 0x01, 0x56, 0x01, 0x26, 0xa1, 0x8c, 0x0f, 0xff, 0x21, 0xa8, 0x1d, 0x04, - 0x15, 0xb7, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x15, 0xb7, 0x01, 0x2e, - 0x01, 0x5e, 0x00, 0x05, 0x20, 0x71, 0xb6, 0x00, 0x71, 0x60, 0x71, 0x2e, - 0x20, 0x21, 0x00, 0x01, 0xa1, 0x90, 0x00, 0x30, 0xa2, 0x98, 0x00, 0x30, - 0x02, 0x40, 0x70, 0x64, 0xa3, 0x02, 0x12, 0x28, 0x22, 0x0a, 0x22, 0x08, - 0x23, 0x10, 0x84, 0x20, 0x0c, 0xa8, 0x38, 0x00, 0xd0, 0x8c, 0x01, 0x48, - 0x70, 0x64, 0xa0, 0x86, 0xb6, 0x00, 0x01, 0x28, 0x70, 0x67, 0xb6, 0x00, - 0x20, 0x11, 0x10, 0x00, 0x0c, 0x48, 0x20, 0x0b, 0x00, 0x00, 0x74, 0xb2, - 0x74, 0xb6, 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0xb6, 0x00, 0x70, 0xb4, 0xa0, 0xea, 0x00, 0x10, 0x02, 0x68, - 0x80, 0x01, 0x70, 0xb6, 0x70, 0x2c, 0x20, 0x68, 0x2d, 0x04, 0x70, 0x2e, - 0x20, 0x6b, 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0xa0, 0x6e, 0x0c, 0xd8, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0xb4, 0x80, 0x01, 0x02, 0x60, - 0x70, 0xb6, 0x70, 0x2c, 0x20, 0x68, 0x2d, 0x04, 0x70, 0x2e, 0x20, 0x6b, - 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0xa0, 0x6e, 0x0c, 0xd8, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0xb6, 0x00, 0x70, 0x2c, 0x20, 0x6a, 0x2d, 0x00, 0x70, 0x2e, - 0x70, 0xb4, 0x80, 0x00, 0x70, 0xb6, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x8d, 0xff, 0x01, 0x38, 0x68, 0x04, 0x68, 0x07, 0x00, 0x00, 0x00, 0x06, - 0x0c, 0x49, 0x00, 0xde, 0x0c, 0xb8, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0xb6, 0x00, 0x70, 0xb4, 0xa0, 0x8a, 0x00, 0x10, 0xa0, 0x0d, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x13, 0x70, 0x07, 0x00, 0x00, - 0x70, 0x1b, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0x20, 0x71, 0x00, 0x00, - 0x70, 0x10, 0xa0, 0x85, 0x80, 0x04, 0x70, 0x12, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x22, 0x70, 0x70, 0x0b, - 0x00, 0x00, 0x20, 0x71, 0xb9, 0x13, 0x70, 0x18, 0xa0, 0x88, 0xb9, 0x1c, - 0x22, 0x0a, 0x80, 0x00, 0xa0, 0x84, 0x00, 0x07, 0x70, 0x1a, 0x70, 0x04, - 0xa0, 0x05, 0x11, 0x28, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x10, 0x00, 0x89, - 0x00, 0xfe, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0xb9, 0x13, 0x70, 0x04, 0xa0, 0x05, 0x11, 0x28, 0x00, 0xf6, 0x20, 0x79, - 0x00, 0x10, 0x00, 0x19, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x70, 0x00, - 0x00, 0x02, 0x16, 0x77, 0x16, 0xdb, 0x16, 0xf8, 0x16, 0xf8, 0x70, 0x18, - 0x71, 0x1c, 0xa1, 0x06, 0x11, 0x18, 0x70, 0x07, 0x00, 0x00, 0x00, 0x05, - 0x00, 0xd6, 0xa1, 0x80, 0xb9, 0x1c, 0x20, 0x04, 0x70, 0x0a, 0x20, 0x68, - 0x81, 0x08, 0xa1, 0x8c, 0x00, 0x07, 0x71, 0x1e, 0x78, 0x03, 0x00, 0x26, - 0x68, 0x24, 0x78, 0x32, 0x68, 0x28, 0x78, 0x36, 0x68, 0x2c, 0x78, 0x3a, - 0x68, 0x30, 0x78, 0x3e, 0x68, 0x10, 0x70, 0x0e, 0x68, 0x0c, 0x70, 0x16, - 0x68, 0x04, 0x00, 0xde, 0xd0, 0x84, 0x01, 0x20, 0x70, 0x07, 0x00, 0x01, - 0x00, 0x29, 0x00, 0x05, 0x70, 0x07, 0x00, 0x02, 0x00, 0xb1, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, 0xa1, 0x82, - 0x00, 0x40, 0x12, 0x10, 0x21, 0x10, 0xa0, 0x06, 0x70, 0x0e, 0x72, 0x12, - 0x82, 0x03, 0x78, 0x22, 0x78, 0x03, 0x00, 0x20, 0x78, 0x03, 0x00, 0x41, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x70, 0x14, 0x20, 0x98, 0x20, 0xa1, 0x00, 0x14, - 0x78, 0x03, 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, 0xa1, 0x82, - 0x00, 0x40, 0x12, 0x10, 0x21, 0x10, 0xa0, 0x06, 0x70, 0x0e, 0x22, 0xa8, - 0x53, 0xa6, 0x82, 0x03, 0x78, 0x22, 0x78, 0x03, 0x00, 0x20, 0x33, 0x00, - 0x70, 0x16, 0x78, 0x03, 0x00, 0x01, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x20, 0x99, 0xb6, 0xfa, 0x20, 0xa1, 0x00, 0x18, 0x20, 0xa9, 0x00, 0x08, - 0x53, 0xa3, 0x78, 0x03, 0x00, 0x20, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x03, 0x00, 0x41, 0x70, 0x07, 0x00, 0x03, 0x70, 0x00, 0xc0, 0x84, - 0x70, 0x02, 0x70, 0x0b, 0xb6, 0xf5, 0x01, 0x2e, 0x01, 0x5e, 0x01, 0x4e, - 0x01, 0x3e, 0x00, 0x05, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x20, 0x01, - 0xb7, 0x29, 0x20, 0x9c, 0x20, 0xa1, 0x00, 0x14, 0x78, 0x03, 0x00, 0x26, - 0x20, 0x01, 0xb7, 0x2a, 0x20, 0xac, 0x53, 0xa6, 0x20, 0x99, 0xb7, 0x2b, - 0x20, 0xa1, 0x00, 0x18, 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa3, 0x78, 0x03, - 0x00, 0x20, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0x03, 0x00, 0x01, - 0x70, 0x07, 0x00, 0x04, 0x70, 0x00, 0xc0, 0x8c, 0x70, 0x02, 0x70, 0x0b, - 0xb7, 0x26, 0x01, 0x2e, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x13, 0x00, 0xf6, 0x20, 0x79, - 0x00, 0x10, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, 0xd1, 0xfc, 0x01, 0x20, - 0xa1, 0x8c, 0x07, 0x00, 0x70, 0x04, 0x00, 0x23, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x1e, 0x00, 0x05, 0x16, 0x71, 0x17, 0x3b, 0x17, 0x69, 0x17, 0x93, - 0x17, 0xc3, 0x17, 0x3a, 0x0c, 0xf8, 0xa1, 0x8c, 0x07, 0x00, 0x15, 0x28, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x70, 0x14, 0x20, 0xa0, 0x20, 0x99, - 0x00, 0x14, 0x78, 0x03, 0x00, 0x40, 0x70, 0x10, 0x20, 0xa8, 0x53, 0xa5, - 0x34, 0x00, 0x70, 0x16, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x70, 0x0c, - 0xa0, 0x05, 0x05, 0x70, 0x78, 0x30, 0x78, 0x32, 0x78, 0x34, 0x78, 0x36, - 0x08, 0x0c, 0x16, 0xa2, 0x00, 0x05, 0x70, 0x08, 0xa0, 0x80, 0x00, 0x02, - 0x20, 0x03, 0x01, 0x00, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x16, 0x71, - 0x00, 0x05, 0x70, 0x08, 0xa0, 0x80, 0x00, 0x02, 0x20, 0x03, 0x02, 0x00, - 0x0c, 0xa8, 0xa1, 0x8c, 0x07, 0x00, 0x11, 0x50, 0x70, 0x0c, 0xa0, 0x05, - 0x01, 0x88, 0x78, 0x30, 0x78, 0x32, 0x78, 0x34, 0x78, 0x36, 0x08, 0x0c, - 0x16, 0xb7, 0x00, 0x05, 0x70, 0x08, 0xa0, 0x80, 0x00, 0x02, 0x20, 0x03, - 0x02, 0x00, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x16, 0x71, 0x00, 0x05, - 0x00, 0xd6, 0x70, 0x08, 0x20, 0x68, 0x78, 0x30, 0x68, 0x26, 0x78, 0x34, - 0x68, 0x2a, 0x78, 0x38, 0x68, 0x2e, 0x78, 0x3c, 0x68, 0x32, 0x68, 0x0b, - 0x01, 0x00, 0x00, 0xde, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x16, 0x71, - 0x00, 0x05, 0xa1, 0x8c, 0x07, 0x00, 0x15, 0x40, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x20, 0x01, 0xb6, 0xf8, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x0d, - 0x20, 0xa0, 0x20, 0x99, 0x00, 0x14, 0x78, 0x03, 0x00, 0x40, 0x20, 0xa9, - 0x00, 0x20, 0x53, 0xa5, 0x20, 0x01, 0xb6, 0xfa, 0x20, 0x04, 0xd0, 0xbc, - 0x01, 0x48, 0x20, 0x01, 0xb7, 0x03, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x0d, - 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x20, 0x53, 0xa5, 0x01, 0x5e, 0x01, 0x4e, - 0x01, 0x3e, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x5e, 0xe1, 0x08, 0x0c, - 0x16, 0x71, 0x00, 0x05, 0x20, 0x11, 0x80, 0x03, 0x08, 0x0c, 0x3f, 0x13, - 0x0c, 0xf8, 0xa1, 0x8c, 0x07, 0x00, 0x11, 0x48, 0x20, 0x01, 0xb7, 0x28, - 0x20, 0x03, 0x01, 0x00, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x16, 0x71, - 0x00, 0x05, 0x20, 0x11, 0x80, 0x04, 0x08, 0x0c, 0x3f, 0x13, 0x0c, 0xf8, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x20, 0x79, 0x00, 0x30, 0x20, 0x71, - 0xb9, 0x24, 0x70, 0x03, 0x00, 0x00, 0x70, 0x0f, 0xb9, 0x30, 0x70, 0x13, - 0xb9, 0x30, 0x78, 0x0f, 0x00, 0xf6, 0x78, 0x03, 0x00, 0x04, 0x01, 0x2e, - 0x00, 0x05, 0x69, 0x34, 0xa1, 0x84, 0x00, 0x07, 0x00, 0x02, 0x17, 0xf3, - 0x18, 0x31, 0x17, 0xf3, 0x17, 0xf3, 0x17, 0xf3, 0x18, 0x19, 0x18, 0x00, - 0x17, 0xf7, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x04, 0x18, 0x4b, 0x68, 0x4c, - 0xd0, 0xbc, 0x0d, 0xc8, 0x68, 0x60, 0x68, 0x2e, 0x68, 0x5c, 0x68, 0x2a, - 0x68, 0x58, 0x04, 0xc8, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x1e, - 0x1d, 0x70, 0x68, 0x4c, 0xd0, 0xbc, 0x0d, 0x58, 0x68, 0x60, 0x68, 0x2e, - 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x04, 0x68, 0x1a, 0xa0, 0x80, 0x00, 0x0d, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x23, 0x08, 0x20, 0x05, - 0x68, 0x32, 0x68, 0x58, 0x04, 0x40, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, - 0x00, 0x15, 0x19, 0xa8, 0x68, 0x4c, 0xd0, 0xac, 0x09, 0x90, 0x68, 0x04, - 0x68, 0x1a, 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, - 0xa0, 0x80, 0x23, 0x08, 0x20, 0x05, 0x68, 0x32, 0xa0, 0x06, 0x68, 0x2e, - 0x68, 0x2a, 0x68, 0x58, 0x00, 0x80, 0x68, 0x4c, 0xd0, 0xac, 0x09, 0x04, - 0x17, 0xf3, 0xa0, 0x06, 0x68, 0x2e, 0x68, 0x2a, 0x68, 0x58, 0xa1, 0x8c, - 0x00, 0x0f, 0xa1, 0x88, 0x23, 0x08, 0x21, 0x0d, 0x69, 0x32, 0x2d, 0x08, - 0x69, 0x1a, 0x68, 0x26, 0x68, 0x4c, 0xc0, 0xdd, 0x68, 0x4e, 0xa0, 0x06, - 0x68, 0x0a, 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, 0x00, 0x05, - 0x68, 0x4c, 0xd0, 0xac, 0x09, 0x0c, 0x15, 0x1a, 0x68, 0x33, 0x23, 0x05, - 0x2d, 0x08, 0x69, 0x1a, 0x68, 0x58, 0x80, 0x01, 0x68, 0x26, 0x68, 0x4c, - 0xc0, 0xdd, 0x68, 0x4e, 0xa0, 0x06, 0x68, 0x0a, 0x68, 0x2e, 0x68, 0x2a, - 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, 0x00, 0x05, 0x20, 0xe1, - 0x00, 0x07, 0x20, 0xe1, 0x20, 0x00, 0x20, 0x01, 0x02, 0x0a, 0x20, 0x04, - 0x82, 0xff, 0x01, 0xe8, 0xa2, 0x80, 0x00, 0x04, 0x00, 0xd6, 0x20, 0x6c, - 0x68, 0x4c, 0xd0, 0xdc, 0x11, 0x90, 0xa2, 0x80, 0x00, 0x07, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x0a, 0x11, 0x10, 0x08, 0x91, 0x00, 0x10, 0x08, 0x0c, - 0x17, 0xe7, 0x01, 0x38, 0x00, 0xde, 0xa2, 0x80, 0x00, 0x00, 0x20, 0x03, - 0x00, 0x02, 0xa0, 0x16, 0x00, 0x20, 0x68, 0x08, 0x80, 0x00, 0x68, 0x0a, - 0x00, 0xde, 0x01, 0x26, 0x00, 0x46, 0x00, 0x36, 0x00, 0x26, 0x20, 0x91, - 0x22, 0x00, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x4e, 0x70, 0x00, 0xa0, 0x05, - 0x01, 0xd0, 0x71, 0x0c, 0x22, 0x0a, 0x81, 0x08, 0x23, 0x0a, 0x81, 0x08, - 0x24, 0x0a, 0x81, 0x08, 0xa1, 0x82, 0xb9, 0x4b, 0x02, 0x10, 0x20, 0x09, - 0xb9, 0x30, 0x71, 0x0e, 0x70, 0x10, 0xa1, 0x02, 0xa0, 0x82, 0x00, 0x09, - 0x01, 0x18, 0xa0, 0x80, 0x00, 0x1b, 0x11, 0x18, 0x20, 0x09, 0x01, 0x38, - 0x20, 0x0a, 0x01, 0x2e, 0x00, 0x05, 0x72, 0x06, 0x20, 0x01, 0x18, 0xad, - 0x00, 0x06, 0x22, 0x60, 0x08, 0x04, 0x19, 0xda, 0x01, 0x26, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xc6, 0x00, 0x06, 0x20, 0x91, 0x22, 0x00, 0x00, 0x0e, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0xd6, 0x00, 0xc6, 0x24, 0x60, - 0x61, 0x10, 0x21, 0x68, 0x6a, 0x62, 0x6b, 0x5e, 0xa0, 0x05, 0x09, 0x04, - 0x19, 0x0f, 0x68, 0x08, 0xa0, 0x05, 0x09, 0x04, 0x19, 0x46, 0x70, 0x00, - 0xa0, 0x05, 0x11, 0x08, 0x04, 0x88, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, - 0x19, 0x04, 0x19, 0x4e, 0x70, 0x04, 0xa4, 0x06, 0x15, 0x48, 0x20, 0x01, - 0x00, 0x05, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x68, 0x00, 0x46, 0x08, 0x0c, - 0x1b, 0x22, 0x00, 0x4e, 0x24, 0x60, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, - 0x20, 0x04, 0xa0, 0x05, 0x09, 0x04, 0x19, 0x46, 0x0c, 0x10, 0x20, 0x01, - 0x02, 0x07, 0x20, 0x04, 0xd0, 0x9c, 0x1d, 0x48, 0x78, 0x04, 0xa0, 0x84, - 0x60, 0x00, 0x01, 0x20, 0xa0, 0x86, 0x60, 0x00, 0x01, 0x08, 0x0c, 0x08, - 0x78, 0x18, 0x68, 0x12, 0x78, 0x1c, 0x68, 0x16, 0x78, 0x03, 0x00, 0x04, - 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, 0x61, 0x00, 0xa1, 0x8e, - 0x00, 0x04, 0x19, 0x04, 0x19, 0x4e, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, - 0x86, 0xd3, 0x08, 0x04, 0x19, 0x4e, 0x68, 0x08, 0xa0, 0x05, 0x05, 0xa0, - 0x70, 0x00, 0xa0, 0x05, 0x05, 0x88, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, - 0x11, 0x18, 0x70, 0x04, 0xa4, 0x06, 0x15, 0x50, 0x20, 0x01, 0x00, 0x05, - 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x60, 0x00, 0x46, 0x08, 0x0c, 0x1b, 0x22, - 0x00, 0x4e, 0x24, 0x60, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, 0x20, 0x04, - 0xa0, 0x05, 0x01, 0xd0, 0x0c, 0x28, 0x20, 0x01, 0x02, 0x07, 0x20, 0x04, - 0xd0, 0x9c, 0x1d, 0x50, 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, 0xd0, 0x8c, - 0x1d, 0x50, 0x78, 0x04, 0xa0, 0x84, 0x60, 0x00, 0x01, 0x18, 0xa0, 0x86, - 0x60, 0x00, 0x19, 0xf0, 0x78, 0x18, 0x68, 0x12, 0x78, 0x1c, 0x68, 0x16, - 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x61, 0x00, 0xa1, 0x8e, - 0x00, 0x04, 0x11, 0x20, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0x86, 0xd3, - 0x00, 0xce, 0x00, 0xde, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, - 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, 0xb9, 0x24, - 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x09, 0x04, 0x19, 0xb8, 0x70, 0x04, - 0xac, 0x06, 0x19, 0x04, 0x19, 0xaa, 0x20, 0x79, 0x00, 0x30, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x03, 0x09, 0x04, 0x19, 0xaa, 0x78, 0x04, 0xd0, 0xfc, - 0x15, 0xc8, 0x20, 0xe1, 0x60, 0x00, 0x20, 0x11, 0x00, 0x32, 0x20, 0x01, - 0x02, 0x08, 0x20, 0x0c, 0x20, 0x01, 0x02, 0x09, 0x20, 0x04, 0xa1, 0x06, - 0x1d, 0x88, 0x82, 0x11, 0x1d, 0xb0, 0x78, 0x04, 0xd0, 0xfc, 0x15, 0x40, - 0x08, 0x0c, 0x1e, 0x8a, 0x00, 0x26, 0x00, 0x56, 0x78, 0x03, 0x00, 0x04, - 0x78, 0x04, 0xd0, 0xac, 0x1d, 0xe8, 0x78, 0x03, 0x00, 0x02, 0x78, 0x03, - 0x00, 0x09, 0x70, 0x03, 0x00, 0x03, 0x70, 0x07, 0x00, 0x00, 0x00, 0x5e, - 0x00, 0x2e, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0x38, 0x00, 0x66, 0x20, 0x31, 0x00, 0x01, 0x08, 0x0c, - 0x5b, 0xc3, 0x00, 0x6e, 0x00, 0x58, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, - 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x00, 0x20, 0x08, 0x0c, 0x1b, 0x22, - 0x08, 0x04, 0x19, 0x5a, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x09, 0x20, 0x09, - 0xb9, 0x30, 0x21, 0x04, 0xac, 0x06, 0x11, 0x08, 0x20, 0x0a, 0xa1, 0x88, - 0x00, 0x03, 0x1f, 0x04, 0x19, 0xaf, 0x01, 0x5e, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x0c, - 0x71, 0x10, 0xa1, 0x06, 0x09, 0x04, 0x1a, 0x4e, 0x21, 0x04, 0x70, 0x06, - 0x20, 0x60, 0x81, 0x08, 0x21, 0x1c, 0x81, 0x08, 0x21, 0x24, 0x81, 0x08, - 0xa1, 0x82, 0xb9, 0x4b, 0x02, 0x10, 0x20, 0x09, 0xb9, 0x30, 0x71, 0x12, - 0x70, 0x0c, 0xa1, 0x06, 0x11, 0x28, 0x08, 0x0c, 0x29, 0x20, 0x20, 0x01, - 0x01, 0x38, 0x21, 0x02, 0x8c, 0xff, 0x05, 0x98, 0x60, 0x10, 0x20, 0x68, - 0x2d, 0x58, 0x68, 0x28, 0xa4, 0x06, 0x15, 0x90, 0x68, 0x2c, 0xa3, 0x06, - 0x15, 0x78, 0x70, 0x04, 0x20, 0x60, 0x60, 0x20, 0xc0, 0xd4, 0x60, 0x22, - 0x68, 0x4c, 0xd0, 0xf4, 0x01, 0x28, 0x68, 0x17, 0xff, 0xff, 0x68, 0x13, - 0xff, 0xff, 0x00, 0xe8, 0x68, 0x50, 0xd0, 0xf4, 0x11, 0x30, 0x78, 0x03, - 0x00, 0x04, 0x68, 0x10, 0x78, 0x1a, 0x68, 0x14, 0x78, 0x1e, 0x68, 0x24, - 0x20, 0x50, 0x68, 0x18, 0x20, 0x60, 0x68, 0x30, 0x20, 0x40, 0x60, 0x34, - 0xa0, 0xcc, 0x00, 0x0f, 0x20, 0x09, 0x00, 0x11, 0x08, 0x0c, 0x1a, 0x51, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x1a, 0x51, 0x2d, 0x58, - 0x00, 0x05, 0x08, 0x0c, 0x1d, 0xf9, 0x09, 0x04, 0x19, 0xbf, 0x0c, 0xd0, - 0x60, 0x20, 0xd0, 0xf4, 0x11, 0xe0, 0xd0, 0xd4, 0x01, 0xb8, 0x60, 0x38, - 0xa4, 0x02, 0x60, 0x34, 0xa3, 0x03, 0x01, 0x08, 0x12, 0x88, 0x64, 0x3a, - 0x63, 0x36, 0x6c, 0x2a, 0x6b, 0x2e, 0x00, 0x46, 0x00, 0x36, 0x24, 0x00, - 0x6c, 0x7c, 0xa4, 0x02, 0x68, 0x12, 0x23, 0x00, 0x6b, 0x80, 0xa3, 0x03, - 0x68, 0x16, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x18, 0x08, 0x0c, 0xa0, 0x56, - 0x09, 0xe0, 0x60, 0x1c, 0xa0, 0x8e, 0x00, 0x08, 0x09, 0x04, 0x19, 0xe5, - 0xa0, 0x8e, 0x00, 0x0a, 0x09, 0x04, 0x19, 0xe5, 0x20, 0x01, 0xb6, 0x74, - 0x20, 0x04, 0xd0, 0xb4, 0x11, 0x40, 0x60, 0x18, 0x20, 0x04, 0xd0, 0xbc, - 0x11, 0x20, 0x68, 0x17, 0x7f, 0xff, 0x68, 0x13, 0xff, 0xff, 0x08, 0x0c, - 0x23, 0x28, 0x19, 0x18, 0x08, 0x04, 0x19, 0xe5, 0x70, 0x03, 0x00, 0x00, - 0x00, 0x05, 0x8a, 0xff, 0x09, 0x04, 0x1a, 0xfc, 0xa0, 0x3e, 0x27, 0x30, - 0xc9, 0xfc, 0x68, 0x50, 0xd0, 0xfc, 0x11, 0xb8, 0xd0, 0xf4, 0x15, 0x88, - 0x00, 0xd6, 0x28, 0x05, 0xac, 0x68, 0x29, 0x00, 0x00, 0x02, 0x1a, 0xba, - 0x1a, 0x93, 0x1a, 0x93, 0x1a, 0xba, 0x1a, 0xba, 0x1a, 0xb2, 0x1a, 0xba, - 0x1a, 0x93, 0x1a, 0xba, 0x1a, 0x9b, 0x1a, 0x9b, 0x1a, 0xba, 0x1a, 0xba, - 0x1a, 0xba, 0x1a, 0xaa, 0x1a, 0x9b, 0x78, 0x03, 0x00, 0x04, 0xc0, 0xfc, - 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, 0x6d, 0x1c, 0x6c, 0x20, 0x00, 0xd6, - 0xd9, 0x9c, 0x01, 0x40, 0x28, 0x05, 0xac, 0x68, 0x6f, 0x08, 0x6e, 0x0c, - 0x08, 0x0c, 0x23, 0xed, 0x01, 0x20, 0x04, 0xd0, 0x08, 0x0c, 0x23, 0xed, - 0x15, 0xb0, 0x68, 0x50, 0xc0, 0xfd, 0x68, 0x52, 0x00, 0xde, 0xa0, 0x06, - 0x00, 0x05, 0xc0, 0xf4, 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, 0x00, 0xd6, - 0x04, 0xc0, 0x6b, 0x08, 0x6a, 0x0c, 0x6d, 0x00, 0x6c, 0x04, 0x08, 0x0c, - 0x23, 0xed, 0x0d, 0x80, 0x04, 0x10, 0x6b, 0x10, 0x6a, 0x14, 0x6d, 0x00, - 0x6c, 0x04, 0x6f, 0x08, 0x6e, 0x0c, 0x08, 0x0c, 0x23, 0xed, 0x0d, 0x30, - 0x00, 0xc8, 0x6d, 0x00, 0x6c, 0x04, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0xa0, - 0x00, 0xde, 0x00, 0xd6, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x1e, 0x11, 0x40, 0x00, 0xde, 0x08, 0x0c, 0x22, 0xca, 0x19, 0x04, - 0x1a, 0x51, 0xa0, 0x0e, 0x08, 0x04, 0x1a, 0xfc, 0x00, 0xde, 0x08, 0x0c, - 0x15, 0x1a, 0xc9, 0xfd, 0x7b, 0x22, 0x7a, 0x26, 0x7d, 0x32, 0x7c, 0x36, - 0x7f, 0x3a, 0x7e, 0x3e, 0x73, 0x16, 0x72, 0x1a, 0x75, 0x1e, 0x74, 0x22, - 0x77, 0x26, 0x76, 0x2a, 0x79, 0x02, 0x71, 0x00, 0x81, 0x08, 0x71, 0x02, - 0x00, 0xde, 0x68, 0x28, 0xa3, 0x00, 0x68, 0x2a, 0x68, 0x2c, 0xa2, 0x01, - 0x68, 0x2e, 0x81, 0x09, 0x2d, 0x08, 0x15, 0x00, 0xd9, 0xfc, 0x01, 0x60, - 0xc9, 0xfc, 0x08, 0x0c, 0x22, 0xca, 0x01, 0xe8, 0x28, 0x05, 0xac, 0x68, - 0x68, 0x00, 0xa5, 0x06, 0x11, 0xc0, 0x68, 0x04, 0xa4, 0x06, 0x00, 0xa8, - 0xc9, 0xfc, 0x08, 0x0c, 0x22, 0xca, 0x01, 0x88, 0x28, 0x05, 0xac, 0x68, - 0x68, 0x00, 0xa5, 0x06, 0x11, 0x60, 0x68, 0x04, 0xa4, 0x06, 0x11, 0x48, - 0x68, 0x08, 0xa7, 0x06, 0x11, 0x30, 0x68, 0x0c, 0xa6, 0x06, 0x00, 0x18, - 0xc9, 0xfc, 0x08, 0x0c, 0x22, 0xca, 0x21, 0x68, 0x00, 0x05, 0x08, 0x0c, - 0x15, 0x1a, 0x08, 0x0c, 0x1f, 0x71, 0x70, 0x04, 0x20, 0x60, 0x00, 0xd6, - 0x60, 0x10, 0x20, 0x68, 0x70, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x1e, 0x1a, - 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x70, 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, - 0x69, 0x7c, 0x69, 0x12, 0x69, 0x80, 0x69, 0x16, 0x68, 0x2b, 0xff, 0xff, - 0x68, 0x2f, 0xff, 0xff, 0x68, 0x50, 0xc0, 0xbd, 0x68, 0x52, 0x00, 0xde, - 0x08, 0x0c, 0x99, 0xe6, 0x08, 0x04, 0x1d, 0x47, 0x08, 0x0c, 0x15, 0x1a, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x00, 0x06, 0x00, 0x16, 0x2b, 0x68, - 0x68, 0x18, 0x20, 0x60, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, 0xa1, 0x84, - 0x07, 0x00, 0x19, 0x78, 0xa1, 0x84, 0x00, 0x03, 0xa0, 0x86, 0x00, 0x03, - 0x0d, 0x58, 0x70, 0x00, 0x00, 0x02, 0x1b, 0x3f, 0x1b, 0x45, 0x1c, 0x56, - 0x1d, 0x22, 0x1d, 0x36, 0x1b, 0x3f, 0x1b, 0x3f, 0x1b, 0x3f, 0x78, 0x04, - 0xd0, 0x9c, 0x19, 0x04, 0x1d, 0x47, 0x08, 0x0c, 0x15, 0x1a, 0x80, 0x01, - 0x70, 0x02, 0xd1, 0xbc, 0x11, 0xa0, 0xd1, 0x9c, 0x19, 0x04, 0x1b, 0xda, - 0xd1, 0xdc, 0x11, 0x78, 0x8a, 0xff, 0x09, 0x04, 0x1b, 0xda, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x0c, 0x1a, 0x51, 0x09, 0x04, 0x1d, 0x47, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x0c, 0x1a, 0x51, 0x08, 0x04, 0x1d, 0x47, 0x78, 0x03, - 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0xd1, 0xbc, 0x19, 0x04, 0x1b, 0xba, - 0x00, 0x26, 0x00, 0x36, 0x7c, 0x20, 0x7d, 0x24, 0x7e, 0x30, 0x7f, 0x34, - 0x78, 0x18, 0x68, 0x12, 0x78, 0x1c, 0x68, 0x16, 0x20, 0x01, 0x02, 0x01, - 0x20, 0x04, 0xa0, 0x05, 0x01, 0x40, 0x78, 0x08, 0xd0, 0xec, 0x11, 0x28, - 0x78, 0x03, 0x00, 0x09, 0x70, 0x03, 0x00, 0x04, 0x00, 0x10, 0x08, 0x0c, - 0x1d, 0x4b, 0x6b, 0x28, 0x6a, 0x2c, 0x24, 0x00, 0x68, 0x6e, 0xa3, 0x1a, - 0x25, 0x00, 0x68, 0x72, 0xa2, 0x13, 0x6b, 0x2a, 0x6a, 0x2e, 0x00, 0xc6, - 0x70, 0x04, 0x20, 0x60, 0x60, 0x20, 0xd0, 0xf4, 0x11, 0x10, 0x63, 0x3a, - 0x62, 0x36, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x6e, 0x1e, 0x6f, 0x22, - 0x25, 0x00, 0xa4, 0x05, 0x01, 0x28, 0x08, 0x0c, 0x22, 0xe0, 0x68, 0x50, - 0xc0, 0xfd, 0x68, 0x52, 0x2a, 0x00, 0x68, 0x26, 0x2c, 0x00, 0x68, 0x1a, - 0x28, 0x00, 0x68, 0x32, 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, 0x11, 0x48, - 0x68, 0x4c, 0xd0, 0xe4, 0x01, 0x30, 0x70, 0x04, 0x20, 0x60, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x0c, 0x86, 0xd3, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x04, - 0x09, 0x04, 0x1d, 0x47, 0x70, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x19, 0xbf, - 0x08, 0x04, 0x1d, 0x47, 0x00, 0x56, 0x7d, 0x0c, 0xd5, 0xbc, 0x11, 0x10, - 0x08, 0x0c, 0xb4, 0xc3, 0x00, 0x5e, 0x08, 0x0c, 0x1e, 0x1a, 0x00, 0xf6, - 0x70, 0x04, 0x20, 0x78, 0x08, 0x0c, 0x53, 0x77, 0x01, 0x18, 0x78, 0x20, - 0xc0, 0xf5, 0x78, 0x22, 0x00, 0xfe, 0x68, 0x2b, 0xff, 0xff, 0x68, 0x2f, - 0xff, 0xff, 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, 0x69, 0x7c, 0x79, 0x1a, - 0x69, 0x80, 0x79, 0x1e, 0x08, 0x04, 0x1d, 0x47, 0x70, 0x04, 0x00, 0xc6, - 0x20, 0x60, 0x60, 0x20, 0x00, 0xce, 0xd0, 0xf4, 0x01, 0x20, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x04, 0xc0, 0x78, 0x18, 0x68, 0x12, 0x7a, 0x1c, - 0x6a, 0x16, 0xd1, 0x9c, 0x01, 0x60, 0xa2, 0x05, 0x01, 0x50, 0x70, 0x04, - 0xa0, 0x80, 0x00, 0x07, 0x20, 0x04, 0xa0, 0x84, 0xff, 0xfd, 0xa0, 0x86, - 0x00, 0x08, 0x19, 0x04, 0x1b, 0x5d, 0x68, 0x4c, 0xc0, 0xf5, 0x68, 0x4e, - 0x78, 0x14, 0xa0, 0x05, 0x15, 0x20, 0x70, 0x03, 0x00, 0x00, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x01, 0xa0, 0x70, 0x04, 0x20, 0x60, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x0a, 0x11, 0xa0, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x09, - 0x20, 0x09, 0xb9, 0x30, 0x21, 0x04, 0xac, 0x06, 0x11, 0x08, 0x20, 0x0a, - 0xa1, 0x88, 0x00, 0x03, 0x1f, 0x04, 0x1c, 0x0e, 0x01, 0x5e, 0x70, 0x04, - 0x20, 0x60, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0x86, 0xd3, 0x08, 0x0c, - 0x19, 0xbf, 0x08, 0x04, 0x1d, 0x47, 0x78, 0x18, 0x68, 0x12, 0x78, 0x1c, - 0x68, 0x16, 0x78, 0x14, 0x79, 0x08, 0xa1, 0x8c, 0x0f, 0xff, 0xa1, 0x92, - 0x08, 0x41, 0x1a, 0x04, 0x1a, 0xff, 0xa1, 0x88, 0x00, 0x07, 0x81, 0x14, - 0x82, 0x14, 0x82, 0x14, 0xa1, 0x0a, 0x81, 0x04, 0x80, 0x04, 0x80, 0x04, - 0xa2, 0x0a, 0x81, 0x0b, 0x81, 0x0b, 0x81, 0x0b, 0x08, 0x0c, 0x1e, 0xb5, - 0x78, 0x03, 0x00, 0x04, 0x78, 0x0f, 0xff, 0xff, 0x78, 0x03, 0x00, 0x01, - 0x78, 0x04, 0xd0, 0xfc, 0x0d, 0xe8, 0x78, 0x03, 0x00, 0x02, 0x78, 0x03, - 0x00, 0x04, 0x78, 0x0f, 0x00, 0xf6, 0x70, 0x04, 0x70, 0x07, 0x00, 0x00, - 0x20, 0x60, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0x86, 0xd3, 0x08, 0x0c, - 0x1f, 0x0b, 0x08, 0x38, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x94, 0x01, 0xb0, - 0x78, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x1c, 0xf2, 0xd0, 0x9c, 0x01, 0x38, - 0x78, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x1c, 0xf2, 0xd0, 0x9c, 0x19, 0x04, - 0x1c, 0xf6, 0x8a, 0xff, 0x09, 0x04, 0x1d, 0x47, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0x1a, 0x51, 0x08, 0x04, 0x1d, 0x47, 0xa1, 0x84, 0x08, 0x88, - 0x11, 0x48, 0x8a, 0xff, 0x09, 0x04, 0x1d, 0x47, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0x1a, 0x51, 0x08, 0x04, 0x1d, 0x47, 0x78, 0x18, 0x68, 0x12, - 0x7a, 0x1c, 0x6a, 0x16, 0xa2, 0x05, 0x09, 0x04, 0x1b, 0xf7, 0x78, 0x03, - 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0xd1, 0xbc, 0x19, 0x04, 0x1c, 0xd4, - 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x29, 0x11, 0x18, - 0xd1, 0x9c, 0x19, 0x04, 0x1b, 0xf7, 0x00, 0x26, 0x00, 0x36, 0x7c, 0x20, - 0x7d, 0x24, 0x7e, 0x30, 0x7f, 0x34, 0x78, 0x18, 0x68, 0x12, 0x78, 0x1c, - 0x68, 0x16, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x40, - 0x78, 0x08, 0xd0, 0xec, 0x11, 0x28, 0x78, 0x03, 0x00, 0x09, 0x70, 0x03, - 0x00, 0x04, 0x00, 0x20, 0x00, 0x16, 0x08, 0x0c, 0x1d, 0x4b, 0x00, 0x1e, - 0x6b, 0x28, 0x6a, 0x2c, 0x08, 0x0c, 0x22, 0xe0, 0x00, 0xd6, 0x28, 0x05, - 0xac, 0x68, 0x60, 0x34, 0xd0, 0x9c, 0x11, 0x28, 0x68, 0x08, 0xa3, 0x1a, - 0x68, 0x0c, 0xa2, 0x13, 0x00, 0x20, 0x68, 0x10, 0xa3, 0x1a, 0x68, 0x14, - 0xa2, 0x13, 0x00, 0xde, 0xd1, 0x94, 0x09, 0x04, 0x1b, 0x7f, 0x2a, 0x00, - 0x68, 0x26, 0x2c, 0x00, 0x68, 0x1a, 0x28, 0x00, 0x68, 0x32, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x6b, 0x2a, 0x6a, 0x2e, 0x00, 0x3e, 0x00, 0x2e, - 0x08, 0x04, 0x1c, 0x1d, 0x00, 0x56, 0x7d, 0x0c, 0x08, 0x0c, 0xb4, 0xc3, - 0x00, 0x5e, 0x08, 0x0c, 0x1e, 0x1a, 0x00, 0xf6, 0x70, 0x04, 0x20, 0x78, - 0x08, 0x0c, 0x53, 0x77, 0x01, 0x18, 0x78, 0x20, 0xc0, 0xf5, 0x78, 0x22, - 0x00, 0xfe, 0x68, 0x2b, 0xff, 0xff, 0x68, 0x2f, 0xff, 0xff, 0x68, 0x08, - 0x80, 0x01, 0x68, 0x0a, 0x69, 0x7c, 0x79, 0x1a, 0x69, 0x80, 0x79, 0x1e, - 0x08, 0x04, 0x1d, 0x47, 0x78, 0x04, 0xd0, 0x9c, 0x09, 0x04, 0x1b, 0x2a, - 0x7c, 0x20, 0x78, 0x24, 0xa4, 0x05, 0x19, 0x04, 0x1b, 0x2a, 0x78, 0x18, - 0x68, 0x12, 0x7c, 0x1c, 0x6c, 0x16, 0xa4, 0x05, 0x11, 0x20, 0x78, 0x03, - 0x00, 0x02, 0x08, 0x04, 0x1b, 0xf7, 0x75, 0x1c, 0x74, 0x20, 0x77, 0x24, - 0x76, 0x28, 0x70, 0x14, 0xa5, 0x28, 0x70, 0x18, 0xa4, 0x21, 0xa7, 0xb9, - 0x00, 0x00, 0xa6, 0xb1, 0x00, 0x00, 0x78, 0x30, 0xa5, 0x06, 0x11, 0x50, - 0x78, 0x34, 0xa4, 0x06, 0x11, 0x38, 0x78, 0x38, 0xa7, 0x06, 0x11, 0x20, - 0x78, 0x3c, 0xa6, 0x06, 0x09, 0x04, 0x1b, 0x2a, 0x78, 0x03, 0x00, 0x02, - 0x08, 0x04, 0x1c, 0x83, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x70, 0x04, 0xa0, 0x0d, 0x01, 0x50, 0x68, 0x08, 0x80, 0x01, 0x68, 0x0a, - 0x11, 0x30, 0x70, 0x04, 0x20, 0x60, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, - 0x86, 0xd3, 0x08, 0x0c, 0x19, 0xbf, 0x00, 0x88, 0x78, 0x03, 0x00, 0x04, - 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, 0x60, 0x10, 0xa0, 0x05, - 0x0d, 0xa0, 0x20, 0x68, 0x68, 0x08, 0x80, 0x00, 0x68, 0x0a, 0x6c, 0x28, - 0x6b, 0x2c, 0x08, 0x0c, 0x19, 0xda, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, - 0x00, 0x05, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x09, 0x04, 0x1d, 0xed, - 0x70, 0x04, 0x00, 0x16, 0x21, 0x0c, 0xa1, 0x06, 0x00, 0x1e, 0x09, 0x04, - 0x1d, 0xed, 0x00, 0xd6, 0x00, 0xc6, 0x21, 0x6c, 0x2d, 0x00, 0xa0, 0x05, - 0x09, 0x04, 0x1d, 0xeb, 0x68, 0x1c, 0xa0, 0x86, 0x00, 0x08, 0x09, 0x04, - 0x1d, 0xeb, 0x68, 0x20, 0xd0, 0xd4, 0x19, 0x04, 0x1d, 0xeb, 0x68, 0x10, - 0x20, 0x68, 0x68, 0x50, 0xd0, 0xfc, 0x05, 0xa8, 0x81, 0x08, 0x21, 0x04, - 0x6b, 0x2c, 0xa3, 0x06, 0x19, 0x04, 0x1d, 0xeb, 0x81, 0x08, 0x21, 0x04, - 0x6a, 0x28, 0xa2, 0x06, 0x19, 0x04, 0x1d, 0xeb, 0x68, 0x50, 0xc0, 0xfc, - 0xc0, 0xf5, 0x68, 0x52, 0x68, 0x6c, 0x78, 0x22, 0x70, 0x16, 0x68, 0x70, - 0x78, 0x26, 0x70, 0x1a, 0x68, 0x1c, 0x78, 0x32, 0x70, 0x1e, 0x68, 0x20, - 0x78, 0x36, 0x70, 0x22, 0x68, 0x18, 0x20, 0x60, 0x60, 0x34, 0xd0, 0x9c, - 0x01, 0x68, 0x68, 0x30, 0x20, 0x05, 0x00, 0xd6, 0xac, 0x68, 0x68, 0x08, - 0x78, 0x3a, 0x70, 0x26, 0x68, 0x0c, 0x78, 0x3e, 0x70, 0x2a, 0x00, 0xde, - 0x08, 0x04, 0x1d, 0xe5, 0xa0, 0x06, 0x78, 0x3a, 0x78, 0x3e, 0x70, 0x26, - 0x70, 0x2a, 0x08, 0x04, 0x1d, 0xe5, 0x81, 0x08, 0x21, 0x04, 0xa0, 0x05, - 0x19, 0x04, 0x1d, 0xeb, 0x6b, 0x2c, 0xa3, 0x06, 0x19, 0x04, 0x1d, 0xeb, - 0x81, 0x08, 0x21, 0x04, 0xa0, 0x05, 0x15, 0xe8, 0x6a, 0x28, 0xa2, 0x06, - 0x15, 0xd0, 0x68, 0x50, 0xc0, 0xf5, 0x68, 0x52, 0x68, 0x30, 0x20, 0x05, - 0x69, 0x18, 0xa1, 0x60, 0xa1, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xd0, 0x9c, - 0x11, 0xa0, 0x60, 0x08, 0x78, 0x22, 0x70, 0x16, 0x68, 0x6e, 0x60, 0x0c, - 0x78, 0x26, 0x70, 0x1a, 0x68, 0x72, 0x60, 0x00, 0x78, 0x32, 0x70, 0x1e, - 0x60, 0x04, 0x78, 0x36, 0x70, 0x22, 0xa0, 0x06, 0x78, 0x3a, 0x78, 0x3e, - 0x70, 0x26, 0x70, 0x2a, 0x00, 0xa0, 0x60, 0x10, 0x78, 0x22, 0x70, 0x16, - 0x68, 0x6e, 0x60, 0x14, 0x78, 0x26, 0x70, 0x1a, 0x68, 0x72, 0x60, 0x00, - 0x78, 0x32, 0x70, 0x1e, 0x60, 0x04, 0x78, 0x36, 0x70, 0x22, 0x60, 0x08, - 0x78, 0x3a, 0x70, 0x26, 0x60, 0x0c, 0x78, 0x3e, 0x70, 0x2a, 0x68, 0x10, - 0x78, 0x1a, 0x68, 0x14, 0x78, 0x1e, 0x78, 0x03, 0x00, 0x11, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0x20, 0x11, 0x02, 0x01, 0x20, 0x09, 0x00, 0x3c, - 0x22, 0x04, 0xa0, 0x05, 0x11, 0x18, 0x81, 0x09, 0x1d, 0xd8, 0x00, 0x05, - 0x00, 0x05, 0x0c, 0xa1, 0x01, 0x18, 0x78, 0x0c, 0xd0, 0xa4, 0x01, 0x20, - 0x00, 0xd9, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x10, 0x08, 0x0c, 0x1f, 0x0b, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x70, 0x00, 0xa0, 0x86, - 0x00, 0x03, 0x11, 0x60, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x01, 0x40, - 0x08, 0x0c, 0x29, 0x91, 0x20, 0xe1, 0x90, 0x28, 0x70, 0x0f, 0xb9, 0x30, - 0x70, 0x13, 0xb9, 0x30, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0xb8, 0x20, 0x01, 0x01, 0x60, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x01, 0x38, 0x20, 0x03, 0x00, 0x00, 0x20, 0x11, 0x00, 0xc8, - 0xe0, 0x00, 0xe0, 0x00, 0x82, 0x11, 0x1d, 0xe0, 0x04, 0xb1, 0x00, 0x66, - 0x20, 0x31, 0x00, 0x00, 0x08, 0x0c, 0x5b, 0xc3, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0x05, 0x08, 0x0c, 0x1e, 0x8a, 0x08, 0x0c, 0x29, 0x91, 0x20, 0xe1, - 0x90, 0x28, 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x01, 0xc0, 0x21, 0x04, - 0xa0, 0x05, 0x01, 0x30, 0x20, 0x60, 0x60, 0x10, 0x20, 0x60, 0x60, 0x08, - 0x80, 0x01, 0x60, 0x0a, 0xa1, 0x88, 0x00, 0x03, 0xa1, 0x82, 0xb9, 0x4b, - 0x02, 0x10, 0x20, 0x09, 0xb9, 0x30, 0x71, 0x12, 0x70, 0x0c, 0xa1, 0x06, - 0x1d, 0x40, 0x08, 0x0c, 0x29, 0x20, 0x21, 0x10, 0x0c, 0x20, 0x20, 0x01, - 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, - 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x00, 0xce, 0x00, 0x05, 0x08, 0x0c, - 0x29, 0x91, 0x20, 0xe1, 0x90, 0x28, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, - 0x00, 0x00, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x16, 0x20, 0x71, 0xb9, 0x24, - 0x70, 0x0c, 0x71, 0x10, 0xa1, 0x06, 0x01, 0x90, 0x21, 0x04, 0xa0, 0x05, - 0x01, 0x30, 0x20, 0x60, 0x60, 0x10, 0x20, 0x60, 0x60, 0x08, 0x80, 0x01, - 0x60, 0x0a, 0xa1, 0x88, 0x00, 0x03, 0xa1, 0x82, 0xb9, 0x4b, 0x02, 0x10, - 0x20, 0x09, 0xb9, 0x30, 0x71, 0x12, 0x0c, 0x50, 0x00, 0x1e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x01, 0x38, 0x20, 0x14, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x01, 0x60, 0x20, 0x2c, 0x20, 0x03, 0x00, 0x00, - 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x48, 0x20, 0x21, 0x00, 0x02, 0x1d, 0x04, - 0x1e, 0x99, 0x20, 0x91, 0x60, 0x00, 0x84, 0x21, 0x1d, 0xd0, 0x00, 0x05, - 0x20, 0x21, 0xb0, 0x15, 0x20, 0x01, 0x01, 0x41, 0x20, 0x1c, 0xd3, 0xdc, - 0x11, 0x68, 0x20, 0x01, 0x01, 0x09, 0x20, 0x1c, 0xa3, 0x9c, 0x00, 0x48, - 0x11, 0x38, 0x20, 0x01, 0x01, 0x11, 0x20, 0x1c, 0x83, 0xff, 0x11, 0x10, - 0x84, 0x21, 0x1d, 0x70, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x00, - 0x78, 0x08, 0xa0, 0x84, 0xf0, 0x00, 0xa1, 0x0d, 0x08, 0x69, 0x20, 0x01, - 0x01, 0x05, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0x11, 0x30, 0x20, 0x01, - 0xb9, 0x4b, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x00, 0x05, 0x48, 0xa0, 0x26, - 0x20, 0x19, 0xf0, 0x00, 0x83, 0x19, 0x11, 0x48, 0x20, 0x01, 0x01, 0x2b, - 0x20, 0x03, 0x95, 0xf5, 0x20, 0x01, 0x01, 0x29, 0x20, 0x03, 0x95, 0xf5, - 0x00, 0xd8, 0x20, 0x01, 0x01, 0x05, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, - 0x11, 0x30, 0x20, 0x01, 0xb9, 0x4b, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x00, - 0x01, 0x78, 0x20, 0x01, 0x01, 0x32, 0x20, 0x04, 0xa4, 0x36, 0x01, 0x10, - 0x20, 0x20, 0x0c, 0x00, 0x20, 0x01, 0x00, 0x21, 0x20, 0x04, 0xd0, 0xfc, - 0x09, 0xe8, 0x08, 0x0c, 0x21, 0x6d, 0x08, 0xc0, 0x20, 0xe1, 0x70, 0x00, - 0x73, 0x24, 0x74, 0x20, 0x70, 0x28, 0x70, 0x28, 0x74, 0x26, 0x70, 0x37, - 0x00, 0x01, 0x81, 0x0f, 0x71, 0x2e, 0x70, 0x2f, 0x01, 0x00, 0x70, 0x37, - 0x00, 0x08, 0x73, 0x26, 0x74, 0x22, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, - 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x00, 0xee, 0x00, 0x05, 0x00, 0x26, - 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x79, 0x08, 0xa1, 0x8c, - 0x0f, 0xff, 0xa1, 0x82, 0x0f, 0xfd, 0x02, 0x10, 0x20, 0x09, 0x00, 0x00, - 0xa1, 0x90, 0x00, 0x07, 0xa2, 0x94, 0x1f, 0xf8, 0x82, 0x14, 0x82, 0x14, - 0x82, 0x14, 0x20, 0x01, 0x02, 0x0a, 0x82, 0xff, 0x01, 0x40, 0x20, 0xe1, - 0x60, 0x00, 0x20, 0x0c, 0x20, 0x0c, 0x20, 0x0c, 0x20, 0x0c, 0x82, 0x11, - 0x1d, 0xd0, 0x20, 0xe1, 0x70, 0x00, 0x20, 0x0c, 0x20, 0x0c, 0x70, 0x03, - 0x00, 0x00, 0x20, 0xe1, 0x60, 0x00, 0x20, 0x01, 0x02, 0x08, 0x20, 0x0c, - 0x20, 0x01, 0x02, 0x09, 0x20, 0x04, 0xa1, 0x06, 0x01, 0x58, 0x08, 0x0c, - 0x1d, 0xee, 0x01, 0x30, 0x79, 0x08, 0xd1, 0xec, 0x11, 0x28, 0x79, 0x0c, - 0xd1, 0xa4, 0x09, 0x60, 0x08, 0x0c, 0x1e, 0x1a, 0xa0, 0x06, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x16, 0x00, 0x26, 0x20, 0x71, - 0xb9, 0x24, 0x20, 0x79, 0x00, 0x30, 0x20, 0x11, 0x00, 0x50, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x00, 0x01, 0xa8, 0x82, 0x11, 0x01, 0x88, 0x20, 0x01, - 0x00, 0x05, 0x20, 0x04, 0xd0, 0x8c, 0x0d, 0xc8, 0x79, 0x04, 0xa1, 0x8c, - 0x07, 0x80, 0x00, 0x16, 0x08, 0x0c, 0x1b, 0x22, 0x00, 0x1e, 0x81, 0xff, - 0x11, 0x18, 0x20, 0x11, 0x00, 0x50, 0x0c, 0x48, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x78, 0x03, - 0x00, 0x04, 0x20, 0x09, 0x00, 0x64, 0x78, 0x04, 0xd0, 0xac, 0x09, 0x04, - 0x1f, 0xbd, 0x81, 0x09, 0x1d, 0xd0, 0x20, 0x09, 0x01, 0x00, 0x21, 0x0c, - 0xa1, 0x8a, 0x00, 0x03, 0x0a, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x22, 0x74, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0xb9, 0x13, 0x20, 0x79, 0x00, 0x10, - 0x70, 0x04, 0xa0, 0x86, 0x00, 0x00, 0x05, 0x38, 0x78, 0x00, 0x00, 0x06, - 0x78, 0x20, 0x00, 0x06, 0x78, 0x30, 0x00, 0x06, 0x78, 0x34, 0x00, 0x06, - 0x78, 0x38, 0x00, 0x06, 0x78, 0x3c, 0x00, 0x06, 0x78, 0x03, 0x00, 0x04, - 0xe0, 0x00, 0xe0, 0x00, 0x20, 0x79, 0x00, 0x30, 0x78, 0x04, 0xd0, 0xac, - 0x19, 0x0c, 0x15, 0x1a, 0x20, 0x79, 0x00, 0x10, 0x00, 0x0e, 0x78, 0x3e, - 0x00, 0x0e, 0x78, 0x3a, 0x00, 0x0e, 0x78, 0x36, 0x00, 0x0e, 0x78, 0x32, - 0x00, 0x0e, 0x78, 0x22, 0x00, 0x0e, 0x78, 0x02, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x30, 0x00, 0xfe, 0x00, 0xee, 0x78, 0x04, 0xd0, 0xac, 0x19, 0x0c, - 0x15, 0x1a, 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0xb9, 0x4b, 0x70, 0x03, 0x00, 0x00, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, - 0xa2, 0x80, 0x00, 0x04, 0x20, 0x6c, 0x69, 0x4c, 0xd1, 0xdc, 0x19, 0x04, - 0x20, 0x3b, 0x69, 0x34, 0xa1, 0x84, 0x00, 0x07, 0x00, 0x02, 0x1f, 0xd9, - 0x20, 0x26, 0x1f, 0xd9, 0x1f, 0xd9, 0x1f, 0xd9, 0x20, 0x0d, 0x1f, 0xec, - 0x1f, 0xdb, 0x08, 0x0c, 0x15, 0x1a, 0x68, 0x4c, 0xd0, 0xb4, 0x09, 0x04, - 0x21, 0x2a, 0x68, 0x60, 0x68, 0x2e, 0x68, 0x16, 0x68, 0x5c, 0x68, 0x2a, - 0x68, 0x12, 0x68, 0x7c, 0x68, 0x0a, 0x68, 0x80, 0x68, 0x0e, 0x69, 0x58, - 0x08, 0x04, 0x20, 0x2e, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x1e, 0x1d, 0x38, 0x68, 0x4c, 0xd0, 0xb4, 0x09, 0x04, 0x21, 0x2a, - 0x68, 0x60, 0x68, 0x2e, 0x68, 0x16, 0x68, 0x5c, 0x68, 0x2a, 0x68, 0x12, - 0x68, 0x7c, 0x68, 0x0a, 0x68, 0x80, 0x68, 0x0e, 0x68, 0x04, 0x68, 0x1a, - 0xa0, 0x80, 0x00, 0x0d, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, - 0x23, 0x08, 0x20, 0x05, 0x68, 0x32, 0x69, 0x58, 0x04, 0x50, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x86, 0x00, 0x15, 0x15, 0x48, 0x68, 0x4c, 0xd0, 0xb4, - 0x09, 0x04, 0x21, 0x2a, 0x68, 0x04, 0x68, 0x1a, 0xa0, 0x80, 0x00, 0x0d, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x23, 0x08, 0x20, 0x05, - 0x68, 0x32, 0x69, 0x58, 0xa0, 0x06, 0x68, 0x2e, 0x68, 0x2a, 0x00, 0x88, - 0x68, 0x4c, 0xd0, 0xb4, 0x09, 0x04, 0x1a, 0xfd, 0x69, 0x58, 0xa0, 0x06, - 0x68, 0x2e, 0x68, 0x2a, 0x2d, 0x00, 0x68, 0x1a, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0x0f, 0xa0, 0x80, 0x23, 0x08, 0x20, 0x05, 0x68, 0x32, 0x69, 0x26, - 0x68, 0x4c, 0xc0, 0xdd, 0x68, 0x4e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x00, 0x20, 0x78, 0x04, 0xd0, 0xfc, 0x19, 0x0c, 0x21, 0x6d, - 0x00, 0xe6, 0x00, 0xd6, 0x20, 0x71, 0xb9, 0x4b, 0x70, 0x00, 0xa0, 0x05, - 0x19, 0x04, 0x20, 0xaa, 0x00, 0xc6, 0x72, 0x06, 0xa2, 0x80, 0x00, 0x04, - 0x20, 0x5c, 0x70, 0x04, 0x20, 0x68, 0x78, 0x03, 0x00, 0x04, 0x68, 0x18, - 0x00, 0xd6, 0x20, 0x68, 0x68, 0x6c, 0x78, 0x12, 0x68, 0x90, 0x00, 0xf6, - 0x20, 0xe1, 0x90, 0x40, 0x20, 0x79, 0x02, 0x00, 0x78, 0x1a, 0x20, 0x79, - 0x01, 0x00, 0x80, 0x04, 0x78, 0xd6, 0x00, 0xfe, 0x00, 0xde, 0x2b, 0x68, - 0x68, 0x24, 0x20, 0x50, 0x68, 0x18, 0x20, 0x60, 0x68, 0x30, 0x20, 0x40, - 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0x69, 0x08, 0x79, 0x1a, 0x71, 0x16, - 0x68, 0x0c, 0x78, 0x1e, 0x70, 0x1a, 0xa0, 0x06, 0x70, 0x0e, 0x70, 0x12, - 0x70, 0x04, 0x69, 0x2c, 0x68, 0x14, 0xa1, 0x06, 0x11, 0x20, 0x69, 0x28, - 0x68, 0x10, 0xa1, 0x06, 0x01, 0x90, 0x20, 0x01, 0xb6, 0x74, 0x20, 0x04, - 0xd0, 0xcc, 0x01, 0x10, 0x00, 0xce, 0x04, 0x00, 0x00, 0x36, 0x00, 0x46, - 0x6b, 0x14, 0x6c, 0x10, 0x08, 0x0c, 0x23, 0x28, 0x00, 0x4e, 0x00, 0x3e, - 0x01, 0x10, 0x00, 0xce, 0x00, 0xa8, 0x8a, 0xff, 0x11, 0x20, 0x00, 0xce, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x78, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x79, 0x00, 0x20, 0x20, 0x09, 0x00, 0x01, 0x00, 0x59, 0x01, 0x18, - 0x20, 0x09, 0x00, 0x01, 0x00, 0x39, 0x01, 0x2e, 0x00, 0xce, 0xa0, 0x06, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x76, 0x00, 0x66, - 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x00, 0x26, 0x8a, 0xff, 0x09, 0x04, - 0x21, 0x23, 0x70, 0x0c, 0x72, 0x14, 0xa2, 0x3a, 0x70, 0x10, 0x72, 0x18, - 0xa2, 0x03, 0x0a, 0x04, 0x21, 0x22, 0xa7, 0x05, 0x09, 0x04, 0x21, 0x22, - 0xa0, 0x3e, 0x27, 0x30, 0x68, 0x50, 0xd0, 0xfc, 0x11, 0xa8, 0x00, 0xd6, - 0x28, 0x05, 0xac, 0x68, 0x29, 0x00, 0x00, 0x02, 0x21, 0x05, 0x20, 0xea, - 0x20, 0xea, 0x21, 0x05, 0x21, 0x05, 0x20, 0xfe, 0x21, 0x05, 0x20, 0xea, - 0x21, 0x05, 0x20, 0xef, 0x20, 0xef, 0x21, 0x05, 0x21, 0x05, 0x21, 0x05, - 0x20, 0xf6, 0x20, 0xef, 0xc0, 0xfc, 0x68, 0x52, 0x6b, 0x6c, 0x6a, 0x70, - 0x6d, 0x1c, 0x6c, 0x20, 0xd9, 0x9c, 0x05, 0x28, 0x00, 0xd6, 0x28, 0x05, - 0xac, 0x68, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0xf0, 0x6b, 0x08, 0x6a, 0x0c, - 0x6d, 0x00, 0x6c, 0x04, 0x00, 0xc8, 0x6b, 0x10, 0x6a, 0x14, 0x6d, 0x00, - 0x6c, 0x04, 0x6f, 0x08, 0x6e, 0x0c, 0x00, 0x90, 0x00, 0xde, 0x00, 0xd6, - 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, 0x11, 0x38, - 0x00, 0xde, 0x08, 0x0c, 0x22, 0xca, 0x19, 0x04, 0x20, 0xb4, 0xa0, 0x0e, - 0x00, 0xf0, 0x00, 0xde, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xde, 0x7b, 0x22, - 0x7a, 0x26, 0x7d, 0x32, 0x7c, 0x36, 0x7f, 0x3a, 0x7e, 0x3e, 0x79, 0x02, - 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0x68, 0x28, 0xa3, 0x00, 0x68, 0x2a, - 0x68, 0x2c, 0xa2, 0x01, 0x68, 0x2e, 0x70, 0x0c, 0xa3, 0x00, 0x70, 0x0e, - 0x70, 0x10, 0xa2, 0x01, 0x70, 0x12, 0x08, 0x0c, 0x22, 0xca, 0x00, 0x08, - 0xa0, 0x06, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, - 0x00, 0x7e, 0x00, 0x05, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x26, 0x20, 0x01, - 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, 0x78, 0x03, - 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, 0x00, 0xd6, - 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x18, 0x68, 0x50, - 0xc0, 0xbd, 0x68, 0x52, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x80, - 0x20, 0x61, 0x01, 0x00, 0x62, 0xc8, 0x20, 0x01, 0x00, 0xfa, 0x80, 0x01, - 0x1d, 0xf0, 0x60, 0xc8, 0xa2, 0x06, 0x1d, 0xc0, 0x60, 0xc4, 0x68, 0x6a, - 0x60, 0xc8, 0x68, 0x66, 0x70, 0x04, 0x20, 0x60, 0x00, 0xde, 0x00, 0xc6, - 0x08, 0x0c, 0x99, 0xe6, 0x00, 0xce, 0x20, 0x01, 0xb8, 0xf0, 0x20, 0x04, - 0xac, 0x06, 0x11, 0x50, 0x20, 0xe1, 0x90, 0x40, 0x08, 0x0c, 0x82, 0xe4, - 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, 0x72, 0xa2, - 0x00, 0x2e, 0x08, 0x04, 0x22, 0x27, 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, - 0x00, 0x06, 0x00, 0x16, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x20, 0x79, 0x00, 0x20, 0x20, 0x71, 0xb9, 0x4b, 0x2b, 0x68, 0x68, 0x18, - 0x20, 0x60, 0x79, 0x04, 0x78, 0x03, 0x00, 0x02, 0xa1, 0x84, 0x07, 0x00, - 0x19, 0x04, 0x21, 0x2c, 0x70, 0x00, 0x00, 0x02, 0x22, 0x27, 0x21, 0x8a, - 0x21, 0xfa, 0x22, 0x25, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x9c, 0x11, 0x70, - 0x8a, 0xff, 0x05, 0xd0, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x20, 0xae, - 0x09, 0x04, 0x22, 0x27, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x20, 0xae, - 0x08, 0x04, 0x22, 0x27, 0x78, 0x03, 0x00, 0x04, 0xd1, 0x94, 0x01, 0x48, - 0x68, 0x50, 0xc0, 0xfc, 0x68, 0x52, 0x8a, 0xff, 0x11, 0xd8, 0x68, 0x4c, - 0xc0, 0xf5, 0x68, 0x4e, 0x00, 0xb8, 0x00, 0x26, 0x00, 0x36, 0x6b, 0x28, - 0x6a, 0x2c, 0x78, 0x20, 0x68, 0x6e, 0xa3, 0x1a, 0x78, 0x24, 0x68, 0x72, - 0xa2, 0x13, 0x78, 0x30, 0x68, 0x1e, 0x78, 0x34, 0x68, 0x22, 0x6b, 0x2a, - 0x6a, 0x2e, 0x00, 0x3e, 0x00, 0x2e, 0x08, 0x0c, 0x22, 0xe0, 0x68, 0x50, - 0xc0, 0xfd, 0x68, 0x52, 0x2a, 0x00, 0x68, 0x26, 0x2c, 0x00, 0x68, 0x1a, - 0x28, 0x00, 0x68, 0x32, 0x70, 0x03, 0x00, 0x00, 0x08, 0x04, 0x22, 0x27, - 0x00, 0xf6, 0x00, 0x26, 0x78, 0x1c, 0x00, 0x06, 0x78, 0x18, 0x00, 0x06, - 0x20, 0x79, 0x01, 0x00, 0x7a, 0x14, 0xa2, 0x84, 0x01, 0x84, 0xa0, 0x85, - 0x00, 0x12, 0x78, 0x16, 0x00, 0x36, 0x20, 0x19, 0x10, 0x00, 0x83, 0x19, - 0x09, 0x0c, 0x15, 0x1a, 0x78, 0x20, 0xd0, 0xbc, 0x1d, 0xd0, 0x00, 0x3e, - 0x79, 0xc8, 0x00, 0x0e, 0xa1, 0x02, 0x00, 0x1e, 0x00, 0x06, 0x00, 0x16, - 0x79, 0xc4, 0x00, 0x0e, 0xa1, 0x03, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, - 0xa2, 0x84, 0x01, 0x84, 0xa0, 0x85, 0x00, 0x12, 0x78, 0x16, 0x00, 0x2e, - 0x00, 0xfe, 0x78, 0x03, 0x00, 0x08, 0x70, 0x03, 0x00, 0x00, 0x04, 0x68, - 0x80, 0x01, 0x70, 0x02, 0xd1, 0x94, 0x01, 0x68, 0x78, 0x04, 0xd0, 0xfc, - 0x19, 0x04, 0x21, 0x7d, 0xd1, 0x9c, 0x11, 0xf8, 0x8a, 0xff, 0x05, 0x08, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x20, 0xae, 0x00, 0xe0, 0x00, 0x26, - 0x00, 0x36, 0x6b, 0x28, 0x6a, 0x2c, 0x08, 0x0c, 0x22, 0xe0, 0x00, 0xd6, - 0x28, 0x05, 0xac, 0x68, 0x60, 0x34, 0xd0, 0x9c, 0x11, 0x28, 0x68, 0x08, - 0xa3, 0x1a, 0x68, 0x0c, 0xa2, 0x13, 0x00, 0x20, 0x68, 0x10, 0xa3, 0x1a, - 0x68, 0x14, 0xa2, 0x13, 0x00, 0xde, 0x08, 0x04, 0x21, 0xad, 0x08, 0x04, - 0x21, 0xa9, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x4b, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x05, 0xd0, 0x20, 0x79, 0x00, 0x20, 0x00, 0x16, 0x20, 0x09, 0x02, 0x07, - 0x21, 0x0c, 0xd1, 0x94, 0x01, 0x98, 0x20, 0x09, 0x02, 0x0c, 0x21, 0x0c, - 0xa1, 0x84, 0x00, 0x03, 0x01, 0x68, 0x08, 0x0c, 0xb5, 0x0c, 0x20, 0x01, - 0x01, 0x33, 0x20, 0x04, 0xa0, 0x05, 0x09, 0x0c, 0x15, 0x1a, 0x20, 0xe1, - 0x90, 0x40, 0x20, 0x01, 0x02, 0x0c, 0x21, 0x02, 0x20, 0x09, 0x02, 0x06, - 0x21, 0x04, 0x20, 0x09, 0x02, 0x03, 0x21, 0x0c, 0xa1, 0x06, 0x11, 0x10, - 0x20, 0xe1, 0x90, 0x40, 0x78, 0x04, 0xd0, 0xfc, 0x09, 0xd8, 0x08, 0x0c, - 0x21, 0x6d, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x19, 0xa8, 0x00, 0x1e, - 0x78, 0x03, 0x00, 0x04, 0x78, 0x04, 0xd0, 0xac, 0x1d, 0xe8, 0x20, 0xe1, - 0x90, 0x40, 0x78, 0x03, 0x00, 0x02, 0x70, 0x03, 0x00, 0x00, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x26, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x00, 0xf6, 0x20, 0x71, 0xb9, 0x4b, 0x20, 0x79, 0x00, 0x20, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x00, 0x05, 0x40, 0x70, 0x04, 0x20, 0x60, 0x60, 0x10, - 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x58, 0x68, 0x50, 0xc0, 0xb5, - 0x68, 0x52, 0x68, 0x0c, 0x7a, 0x1c, 0xa2, 0x06, 0x11, 0x20, 0x68, 0x08, - 0x7a, 0x18, 0xa2, 0x06, 0x01, 0xe0, 0x20, 0x01, 0x01, 0x05, 0x20, 0x03, - 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, - 0x00, 0x00, 0x70, 0x04, 0x20, 0x60, 0x08, 0x0c, 0x99, 0xe6, 0x20, 0xe1, - 0x90, 0x40, 0x08, 0x0c, 0x82, 0xe4, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, - 0x81, 0x06, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x2e, - 0x00, 0x05, 0x68, 0x10, 0x6a, 0x14, 0xa2, 0x05, 0x1d, 0x00, 0x68, 0x4c, - 0xc0, 0xdc, 0x68, 0x4e, 0x2c, 0x10, 0x08, 0x0c, 0x1f, 0xc5, 0x20, 0x01, - 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0xe1, 0x90, 0x40, 0x78, 0x03, - 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x20, 0x69, 0xb8, 0xe1, 0x68, 0x33, - 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x08, 0xf8, 0x88, 0x40, 0x28, 0x05, - 0xa0, 0x05, 0x11, 0x70, 0x60, 0x04, 0xa0, 0x05, 0x01, 0x68, 0x68, 0x1a, - 0x20, 0x60, 0x60, 0x34, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x80, 0x23, 0x08, - 0x20, 0x45, 0x88, 0xff, 0x09, 0x0c, 0x15, 0x1a, 0x8a, 0x51, 0x00, 0x05, - 0x20, 0x50, 0x00, 0x05, 0x8a, 0x50, 0x88, 0x41, 0x28, 0x05, 0xa0, 0x05, - 0x11, 0x90, 0x2c, 0x00, 0xad, 0x06, 0x01, 0x20, 0x60, 0x00, 0xa0, 0x05, - 0x11, 0x08, 0x2d, 0x00, 0x20, 0x60, 0x68, 0x1a, 0x60, 0x34, 0xa0, 0x84, - 0x00, 0x0f, 0xa0, 0x80, 0x23, 0x18, 0x20, 0x45, 0x88, 0xff, 0x09, 0x0c, - 0x15, 0x1a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x11, 0x00, 0x15, 0x00, 0x19, - 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00, 0x00, 0x00, 0x0f, - 0x00, 0x15, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x22, 0xfd, 0x22, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x23, 0x07, - 0x00, 0x00, 0x22, 0xfd, 0x00, 0x00, 0x23, 0x04, 0x23, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x23, 0x07, 0x23, 0x04, 0x00, 0x00, 0x22, 0xff, - 0x22, 0xff, 0x00, 0x00, 0x00, 0x00, 0x23, 0x07, 0x00, 0x00, 0x22, 0xff, - 0x00, 0x00, 0x23, 0x05, 0x23, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x23, 0x07, 0x23, 0x05, 0x00, 0xa6, 0x00, 0x96, 0x00, 0x86, 0x6b, 0x2e, - 0x6c, 0x2a, 0x68, 0x58, 0xa0, 0x55, 0x09, 0x04, 0x23, 0xb9, 0x2d, 0x60, - 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, 0xa9, 0xc0, 0x23, 0x08, 0xa9, 0x86, - 0x00, 0x07, 0x01, 0x30, 0xa9, 0x86, 0x00, 0x0e, 0x01, 0x18, 0xa9, 0x86, - 0x00, 0x0f, 0x11, 0x20, 0x60, 0x5c, 0xa4, 0x22, 0x60, 0x60, 0xa3, 0x1b, - 0x28, 0x05, 0xa0, 0x45, 0x11, 0x40, 0x03, 0x10, 0x08, 0x04, 0x23, 0xb9, - 0x60, 0x04, 0xa0, 0x65, 0x09, 0x04, 0x23, 0xb9, 0x0c, 0x18, 0x28, 0x05, - 0xa0, 0x05, 0x01, 0xa8, 0xac, 0x68, 0xd9, 0x9c, 0x11, 0x28, 0x68, 0x08, - 0xa4, 0x22, 0x68, 0x0c, 0xa3, 0x1b, 0x00, 0x20, 0x68, 0x10, 0xa4, 0x22, - 0x68, 0x14, 0xa3, 0x1b, 0x06, 0x20, 0x23, 0x00, 0xa4, 0x05, 0x01, 0x50, - 0x8a, 0x51, 0x09, 0x04, 0x23, 0xb9, 0x88, 0x40, 0x0c, 0x40, 0x60, 0x04, - 0xa0, 0x65, 0x09, 0x04, 0x23, 0xb9, 0x08, 0x30, 0x8a, 0x51, 0x09, 0x04, - 0x23, 0xb9, 0x88, 0x40, 0x28, 0x05, 0xa0, 0x05, 0x11, 0x58, 0x60, 0x04, - 0xa0, 0x65, 0x09, 0x04, 0x23, 0xb9, 0x60, 0x34, 0xa0, 0xcc, 0x00, 0x0f, - 0xa9, 0xc0, 0x23, 0x08, 0x28, 0x05, 0x20, 0x40, 0x2b, 0x68, 0x68, 0x50, - 0xc0, 0xfc, 0x68, 0x52, 0x04, 0x58, 0x84, 0x22, 0x84, 0x20, 0x83, 0x1a, - 0xa3, 0x99, 0x00, 0x00, 0x00, 0xd6, 0x2b, 0x68, 0x6c, 0x6e, 0x6b, 0x72, - 0x00, 0xde, 0xd9, 0x9c, 0x11, 0x68, 0x69, 0x08, 0x24, 0x00, 0xa1, 0x22, - 0x69, 0x0c, 0x23, 0x00, 0xa1, 0x1b, 0x0a, 0x0c, 0x15, 0x1a, 0x68, 0x00, - 0xa4, 0x20, 0x68, 0x04, 0xa3, 0x19, 0x00, 0x60, 0x69, 0x10, 0x24, 0x00, - 0xa1, 0x22, 0x69, 0x14, 0x23, 0x00, 0xa1, 0x1b, 0x0a, 0x0c, 0x15, 0x1a, - 0x68, 0x00, 0xa4, 0x20, 0x68, 0x04, 0xa3, 0x19, 0x2b, 0x68, 0x6c, 0x1e, - 0x6b, 0x22, 0x68, 0x50, 0xc0, 0xfd, 0x68, 0x52, 0x2c, 0x00, 0x68, 0x1a, - 0x28, 0x00, 0x68, 0x32, 0x2a, 0x00, 0x68, 0x26, 0x00, 0x0e, 0x00, 0x0e, - 0x00, 0x0e, 0xa0, 0x06, 0x00, 0x28, 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xae, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x07, 0x00, 0x02, 0x23, 0xcd, 0x23, 0xce, 0x23, 0xd1, - 0x23, 0xd4, 0x23, 0xd9, 0x23, 0xdc, 0x23, 0xe1, 0x23, 0xe6, 0x00, 0x05, - 0x08, 0x0c, 0x21, 0x6d, 0x00, 0x05, 0x08, 0x0c, 0x1b, 0x22, 0x00, 0x05, - 0x08, 0x0c, 0x1b, 0x22, 0x08, 0x0c, 0x21, 0x6d, 0x00, 0x05, 0x08, 0x0c, - 0x17, 0x20, 0x00, 0x05, 0x08, 0x0c, 0x21, 0x6d, 0x08, 0x0c, 0x17, 0x20, - 0x00, 0x05, 0x08, 0x0c, 0x1b, 0x22, 0x08, 0x0c, 0x17, 0x20, 0x00, 0x05, - 0x08, 0x0c, 0x1b, 0x22, 0x08, 0x0c, 0x21, 0x6d, 0x08, 0x0c, 0x17, 0x20, - 0x00, 0x05, 0x00, 0x06, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x01, 0x11, 0x58, - 0x70, 0x1c, 0xa5, 0x06, 0x11, 0x40, 0x70, 0x20, 0xa4, 0x06, 0x11, 0x28, - 0x70, 0x24, 0xa7, 0x06, 0x11, 0x10, 0x70, 0x28, 0xa6, 0x06, 0x00, 0x0e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x26, 0x00, 0x20, 0x79, 0x02, 0x00, - 0x20, 0x71, 0xbc, 0x80, 0x20, 0x69, 0xb6, 0x00, 0x08, 0x0c, 0x24, 0xf5, - 0x08, 0x0c, 0x24, 0xe5, 0x20, 0x09, 0x00, 0x04, 0x79, 0x12, 0x78, 0x17, - 0x00, 0x04, 0x08, 0x0c, 0x28, 0x2d, 0x78, 0x1b, 0x00, 0x02, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0xa9, 0x00, 0x80, 0x78, 0x2f, - 0x00, 0x00, 0x1f, 0x04, 0x24, 0x1b, 0x20, 0xe1, 0x90, 0x80, 0x78, 0x3b, - 0x00, 0x1f, 0x20, 0xe1, 0x87, 0x00, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x26, 0x00, 0x78, 0x1c, 0xd0, 0xa4, 0x19, 0x0c, 0x24, 0xe2, - 0xa0, 0x84, 0x00, 0x07, 0x00, 0x02, 0x24, 0x4b, 0x24, 0x39, 0x24, 0x3c, - 0x24, 0x3f, 0x24, 0x44, 0x24, 0x46, 0x24, 0x48, 0x24, 0x4a, 0x08, 0x0c, - 0x64, 0x36, 0x00, 0x78, 0x08, 0x0c, 0x64, 0x75, 0x00, 0x60, 0x08, 0x0c, - 0x64, 0x36, 0x08, 0x0c, 0x64, 0x75, 0x00, 0x38, 0x00, 0x41, 0x00, 0x28, - 0x00, 0x31, 0x00, 0x18, 0x00, 0x21, 0x00, 0x08, 0x00, 0x11, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0xb5, 0x0c, - 0x79, 0x30, 0xa1, 0x84, 0x00, 0x03, 0x01, 0xb0, 0x20, 0x01, 0xb8, 0xf0, - 0x20, 0x04, 0xa0, 0x05, 0x01, 0x70, 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, - 0xa0, 0x05, 0x09, 0x0c, 0x15, 0x1a, 0x00, 0xc6, 0x20, 0x01, 0xb8, 0xf0, - 0x20, 0x64, 0x08, 0x0c, 0x99, 0xe6, 0x00, 0xce, 0x04, 0xb8, 0x20, 0xe1, - 0x90, 0x40, 0x04, 0xa0, 0xa1, 0x84, 0x00, 0x30, 0x01, 0xe0, 0x6a, 0x00, - 0xa2, 0x86, 0x00, 0x03, 0x11, 0x08, 0x00, 0xa0, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0x78, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x5b, 0x85, 0x08, 0x0c, 0x5a, 0x79, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, - 0x08, 0x0c, 0x24, 0xe5, 0x00, 0xa8, 0xa1, 0x84, 0x00, 0xc0, 0x01, 0x68, - 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, 0xb9, 0x24, - 0x08, 0x0c, 0x1e, 0x1a, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xee, - 0x00, 0x28, 0xa1, 0x84, 0x03, 0x00, 0x01, 0x10, 0x20, 0xe1, 0x90, 0x20, - 0x79, 0x32, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0xb6, 0x00, 0x71, 0x28, 0x20, 0x01, - 0xb8, 0x91, 0x21, 0x02, 0x20, 0x01, 0xb8, 0x99, 0x21, 0x02, 0xa1, 0x82, - 0x02, 0x11, 0x12, 0x18, 0x20, 0x09, 0x00, 0x08, 0x04, 0x00, 0xa1, 0x82, - 0x02, 0x59, 0x12, 0x18, 0x20, 0x09, 0x00, 0x07, 0x00, 0xd0, 0xa1, 0x82, - 0x02, 0xc1, 0x12, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0xa0, 0xa1, 0x82, - 0x03, 0x49, 0x12, 0x18, 0x20, 0x09, 0x00, 0x05, 0x00, 0x70, 0xa1, 0x82, - 0x04, 0x21, 0x12, 0x18, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0xa1, 0x82, - 0x05, 0x81, 0x12, 0x18, 0x20, 0x09, 0x00, 0x03, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x79, 0x02, 0x00, 0x79, 0x12, 0x78, 0x17, 0x00, 0x04, - 0x08, 0x0c, 0x28, 0x2d, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x1e, 0x00, 0x05, - 0x79, 0x38, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xe6, 0x00, 0x26, 0x20, 0x71, - 0x02, 0x00, 0x20, 0xe1, 0x10, 0x00, 0x72, 0x20, 0x70, 0x28, 0x70, 0x20, - 0xa2, 0x06, 0x0d, 0xe0, 0x20, 0xe1, 0x90, 0x10, 0x00, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x20, 0xe1, 0xa0, 0x00, 0x78, 0x37, 0x00, 0x01, 0x78, 0x2f, - 0x00, 0x00, 0x78, 0x2f, 0x00, 0x00, 0x78, 0x2f, 0x00, 0x00, 0x78, 0x2f, - 0x00, 0x00, 0x78, 0x37, 0x00, 0x05, 0x20, 0xa9, 0x02, 0x10, 0x78, 0x30, - 0xd0, 0xbc, 0x11, 0x10, 0x1f, 0x04, 0x25, 0x05, 0x78, 0x37, 0x00, 0x01, - 0x78, 0x37, 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0x20, 0xe1, 0xa0, 0x00, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x71, 0xb6, 0x00, 0x60, 0x24, 0x60, 0x26, 0x60, 0x53, 0x00, 0x30, - 0x08, 0x0c, 0x28, 0x6c, 0x60, 0x50, 0xa0, 0x84, 0xfe, 0x7f, 0x60, 0x52, - 0x20, 0x09, 0x00, 0xef, 0x61, 0x32, 0x61, 0x36, 0x08, 0x0c, 0x28, 0x7c, - 0x60, 0xe7, 0x00, 0x00, 0x61, 0xea, 0x60, 0xe3, 0x00, 0x08, 0x60, 0x4b, - 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x80, 0x60, 0x2f, - 0x00, 0x00, 0x60, 0x07, 0x0e, 0x9f, 0x60, 0x1b, 0x00, 0x1e, 0x60, 0x0f, - 0x00, 0xff, 0x20, 0x01, 0xb8, 0x8d, 0x20, 0x03, 0x00, 0xff, 0x60, 0x2b, - 0x00, 0x2f, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, 0xb6, 0x32, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0xb6, 0x31, 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0x61, 0x24, 0xa1, 0x84, 0x1e, 0x2c, 0x11, 0x18, 0xa1, 0x84, 0x00, 0x07, - 0x00, 0x2a, 0xa1, 0x95, 0x00, 0x04, 0xa2, 0x84, 0x00, 0x07, 0x00, 0x02, - 0x25, 0x82, 0x25, 0x68, 0x25, 0x6b, 0x25, 0x6e, 0x25, 0x73, 0x25, 0x75, - 0x25, 0x79, 0x25, 0x7d, 0x08, 0x0c, 0x6b, 0xe6, 0x00, 0xb8, 0x08, 0x0c, - 0x6c, 0xc1, 0x00, 0xa0, 0x08, 0x0c, 0x6c, 0xc1, 0x08, 0x0c, 0x6b, 0xe6, - 0x00, 0x78, 0x00, 0x99, 0x00, 0x68, 0x08, 0x0c, 0x6b, 0xe6, 0x00, 0x79, - 0x00, 0x48, 0x08, 0x0c, 0x6c, 0xc1, 0x00, 0x59, 0x00, 0x28, 0x08, 0x0c, - 0x6c, 0xc1, 0x08, 0x0c, 0x6b, 0xe6, 0x00, 0x29, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x61, 0x24, 0x60, 0x28, 0xd0, 0x9c, - 0x01, 0x18, 0xd1, 0x9c, 0x19, 0x04, 0x27, 0x9b, 0x08, 0x0c, 0x5b, 0x41, - 0x05, 0x78, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x01, 0x98, 0x60, 0x24, - 0xa0, 0x84, 0x18, 0x00, 0x01, 0x78, 0x08, 0x0c, 0x5b, 0x67, 0x01, 0x18, - 0x08, 0x0c, 0x5b, 0x53, 0x11, 0x48, 0x60, 0x27, 0x00, 0x20, 0x60, 0x43, - 0x00, 0x00, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, 0x04, 0x58, - 0x08, 0x0c, 0x5b, 0x67, 0x15, 0xd0, 0x60, 0x24, 0xa0, 0x84, 0x18, 0x00, - 0x11, 0x08, 0x04, 0xa8, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x5a, 0x79, 0x08, 0x04, 0x27, 0x9b, - 0xd1, 0xac, 0x15, 0x18, 0x60, 0x24, 0xd0, 0xdc, 0x11, 0x70, 0xd0, 0xe4, - 0x11, 0x88, 0xd0, 0xd4, 0x11, 0xa0, 0xd0, 0xcc, 0x01, 0x30, 0x70, 0x8c, - 0xa0, 0x86, 0x00, 0x28, 0x11, 0x10, 0x08, 0x0c, 0x5c, 0xd0, 0x08, 0x04, - 0x27, 0x9b, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x00, 0x00, 0x48, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x02, 0x00, 0x20, 0x08, 0x0c, - 0x5c, 0x43, 0x08, 0x04, 0x27, 0x9b, 0x08, 0x0c, 0x5d, 0x75, 0x08, 0x04, - 0x27, 0x9b, 0xd1, 0xac, 0x09, 0x04, 0x26, 0xe3, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0xd8, 0x60, 0x27, 0x00, 0x20, 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, - 0x08, 0x0c, 0x5b, 0x5d, 0x11, 0x70, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, - 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x5a, 0x79, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x0e, 0x08, 0x0c, 0x5b, 0x18, 0x00, 0x16, 0x00, 0x46, - 0x00, 0xc6, 0x64, 0x4c, 0xa4, 0x86, 0xf0, 0xf0, 0x11, 0x38, 0x20, 0x61, - 0x01, 0x00, 0x64, 0x4a, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, - 0x74, 0xce, 0xa4, 0x8c, 0xff, 0x00, 0x70, 0x34, 0xd0, 0x84, 0x01, 0x78, - 0xa1, 0x86, 0xf8, 0x00, 0x11, 0x60, 0x70, 0x3c, 0xd0, 0x84, 0x11, 0x48, - 0xc0, 0x85, 0x70, 0x3e, 0x00, 0x36, 0x24, 0x18, 0x20, 0x11, 0x80, 0x16, - 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x3e, 0xa1, 0x96, 0xff, 0x00, 0x05, 0xb8, - 0x70, 0x54, 0xa0, 0x84, 0x00, 0xff, 0x81, 0x0f, 0xa1, 0x16, 0x05, 0x88, - 0x71, 0x30, 0xd1, 0x84, 0x15, 0x70, 0x20, 0x11, 0xb6, 0x53, 0x22, 0x14, - 0xd2, 0xec, 0x01, 0x38, 0xc1, 0x8d, 0x71, 0x32, 0x20, 0x11, 0xb6, 0x53, - 0x22, 0x14, 0xd2, 0xac, 0x15, 0x10, 0x62, 0x40, 0xa2, 0x94, 0x00, 0x10, - 0x01, 0x30, 0x62, 0x48, 0xa2, 0x94, 0xff, 0x00, 0xa2, 0x96, 0xff, 0x00, - 0x01, 0xc0, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, 0x26, 0xb0, 0x70, 0x34, - 0xd0, 0x8c, 0x11, 0x40, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xd1, 0xac, - 0x19, 0x04, 0x26, 0xb0, 0xc1, 0xad, 0x21, 0x02, 0x00, 0x36, 0x73, 0xcc, - 0x20, 0x11, 0x80, 0x13, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x3e, 0x08, 0x04, - 0x26, 0xb0, 0x70, 0x34, 0xd0, 0x8c, 0x11, 0x40, 0x20, 0x01, 0xb6, 0x0c, - 0x20, 0x0c, 0xd1, 0xac, 0x19, 0x04, 0x26, 0xb0, 0xc1, 0xad, 0x21, 0x02, - 0x00, 0x36, 0x73, 0xcc, 0x20, 0x11, 0x80, 0x13, 0x08, 0x0c, 0x3f, 0x13, - 0x00, 0x3e, 0x71, 0x30, 0xc1, 0x85, 0x71, 0x32, 0x20, 0x11, 0xb6, 0x53, - 0x22, 0x0c, 0xd1, 0xa4, 0x01, 0xd0, 0x00, 0x16, 0x20, 0x09, 0x00, 0x01, - 0x20, 0x11, 0x01, 0x00, 0x08, 0x0c, 0x6b, 0x8c, 0x20, 0x19, 0x00, 0x0e, - 0x08, 0x0c, 0xb1, 0x21, 0xa4, 0x84, 0x00, 0xff, 0xa0, 0x80, 0x2d, 0xf9, - 0x20, 0x0d, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x81, 0x27, 0xa0, 0x06, - 0x20, 0x09, 0x00, 0x0e, 0x08, 0x0c, 0xb1, 0xa4, 0x00, 0x1e, 0xd1, 0xac, - 0x11, 0x48, 0x00, 0x16, 0x20, 0x09, 0x00, 0x00, 0x20, 0x19, 0x00, 0x04, - 0x08, 0x0c, 0x2c, 0xa4, 0x00, 0x1e, 0x00, 0x70, 0x01, 0x56, 0x20, 0xa9, - 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x10, - 0x08, 0x0c, 0x4c, 0x7e, 0x81, 0x08, 0x1f, 0x04, 0x26, 0xa7, 0x01, 0x5e, - 0x00, 0xce, 0x00, 0x4e, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, - 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, 0x00, 0x3e, - 0x60, 0xe3, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x14, - 0xa2, 0x96, 0x00, 0x04, 0x11, 0x28, 0xd1, 0x9c, 0x11, 0xb0, 0x62, 0x28, - 0xc2, 0x9d, 0x62, 0x2a, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x23, - 0x20, 0x03, 0x00, 0x00, 0x60, 0x27, 0x00, 0x20, 0x08, 0x0c, 0x5b, 0x67, - 0x11, 0x40, 0x00, 0x16, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x5a, 0x56, - 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x1e, 0xd1, 0x94, 0x09, 0x04, 0x27, 0x9b, - 0x00, 0x16, 0x62, 0x20, 0xd2, 0xb4, 0x09, 0x04, 0x27, 0x4c, 0x08, 0x0c, - 0x6a, 0x82, 0x08, 0x0c, 0x7d, 0xf3, 0x60, 0x27, 0x00, 0x04, 0x00, 0xf6, - 0x20, 0x19, 0xb8, 0xea, 0x23, 0x04, 0xa0, 0x7d, 0x05, 0x70, 0x78, 0x04, - 0xa0, 0x86, 0x00, 0x32, 0x15, 0x50, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0xe6, - 0x20, 0x69, 0x01, 0x40, 0x61, 0x8c, 0x62, 0x88, 0x78, 0x18, 0x60, 0x8e, - 0x78, 0x08, 0x60, 0x8a, 0x60, 0x43, 0x00, 0x02, 0x20, 0x01, 0x00, 0x03, - 0x80, 0x01, 0x1d, 0xf0, 0x60, 0x43, 0x00, 0x00, 0x68, 0x03, 0x10, 0x00, - 0x68, 0x03, 0x00, 0x00, 0x61, 0x8e, 0x62, 0x8a, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x71, 0xe5, 0x78, 0x10, 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, - 0x2f, 0x60, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xee, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xfe, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xfe, 0x00, 0xd6, 0x20, 0x69, - 0x01, 0x40, 0x68, 0x04, 0xa0, 0x84, 0x40, 0x00, 0x01, 0x20, 0x68, 0x03, - 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x00, 0xde, 0x00, 0xc6, 0x20, 0x61, - 0xb8, 0xe1, 0x60, 0x28, 0xa0, 0x9a, 0x00, 0xc8, 0x12, 0x38, 0x80, 0x00, - 0x60, 0x2a, 0x00, 0xce, 0x08, 0x0c, 0x7d, 0xe6, 0x08, 0x04, 0x27, 0x9a, - 0x20, 0x19, 0xb8, 0xea, 0x23, 0x04, 0xa0, 0x65, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x27, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, 0x08, 0x04, 0x27, 0x9a, - 0xd2, 0xbc, 0x09, 0x04, 0x27, 0x9a, 0x08, 0x0c, 0x6a, 0x8f, 0x60, 0x14, - 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, 0x00, 0x10, 0x60, 0x16, 0x60, 0x27, - 0x00, 0x04, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x01, 0x20, 0x68, 0x03, 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, - 0x00, 0xde, 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xe1, 0x60, 0x44, 0xa0, 0x9a, - 0x00, 0xc8, 0x12, 0xf0, 0x80, 0x00, 0x60, 0x46, 0x60, 0x3c, 0x00, 0xce, - 0xa0, 0x05, 0x05, 0x40, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x6a, 0x87, - 0xa0, 0x80, 0x00, 0x07, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x38, - 0x61, 0x14, 0xa1, 0x8c, 0x01, 0x84, 0xa1, 0x8d, 0x00, 0x12, 0x61, 0x16, - 0x00, 0xb8, 0x61, 0x14, 0xa1, 0x8c, 0x01, 0x84, 0xa1, 0x8d, 0x00, 0x16, - 0x61, 0x16, 0x00, 0x80, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, - 0x80, 0x6b, 0x00, 0x3e, 0x20, 0x19, 0xb8, 0xf0, 0x23, 0x04, 0xa0, 0x65, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x4f, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, - 0x00, 0x1e, 0xd1, 0x9c, 0x09, 0x04, 0x27, 0xf4, 0x70, 0x34, 0xd0, 0xac, - 0x15, 0x60, 0x00, 0x16, 0x01, 0x56, 0x60, 0x27, 0x00, 0x08, 0x60, 0x2f, - 0x00, 0x20, 0x20, 0xa9, 0x00, 0x06, 0x1d, 0x04, 0x27, 0xa9, 0x20, 0x91, - 0x60, 0x00, 0x1f, 0x04, 0x27, 0xa9, 0x60, 0x2f, 0x00, 0x00, 0x61, 0x50, - 0xa1, 0x85, 0x14, 0x00, 0x60, 0x52, 0x20, 0xa9, 0x03, 0x66, 0x1d, 0x04, - 0x27, 0xb7, 0x20, 0x91, 0x60, 0x00, 0x60, 0x20, 0xd0, 0x9c, 0x11, 0x30, - 0x01, 0x5e, 0x61, 0x52, 0x00, 0x1e, 0x60, 0x27, 0x00, 0x08, 0x04, 0x80, - 0x08, 0x0c, 0x29, 0x3c, 0x1f, 0x04, 0x27, 0xb7, 0x01, 0x5e, 0x61, 0x52, - 0x00, 0x1e, 0x60, 0x27, 0x00, 0x08, 0x00, 0x16, 0x60, 0x28, 0xc0, 0x9c, - 0x60, 0x2a, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x00, 0x36, - 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, 0x00, 0x3e, 0x60, 0xe3, - 0x00, 0x00, 0x08, 0x0c, 0xb4, 0xeb, 0x08, 0x0c, 0xb5, 0x06, 0xa0, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x5b, 0x85, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, - 0x00, 0x04, 0x60, 0x27, 0x00, 0x08, 0x08, 0x0c, 0x12, 0xe2, 0x00, 0x1e, - 0xa1, 0x8c, 0xff, 0xd0, 0x61, 0x26, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0xb6, 0x00, 0x71, 0xc4, 0x70, 0xc6, 0xa1, 0x16, 0x05, 0x00, - 0x81, 0xff, 0x01, 0x28, 0x20, 0x11, 0x80, 0x11, 0x08, 0x0c, 0x3f, 0x13, - 0x00, 0xc8, 0x20, 0x11, 0x80, 0x12, 0x08, 0x0c, 0x3f, 0x13, 0x20, 0x01, - 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x80, 0x00, 0x36, 0x00, 0xc6, - 0x08, 0x0c, 0x28, 0xc7, 0x08, 0x0c, 0x7f, 0xbc, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x19, 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2c, 0xa4, - 0x00, 0xce, 0x00, 0x3e, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xf6, 0x00, 0x06, - 0x00, 0x26, 0x20, 0x61, 0x01, 0x00, 0xa1, 0x90, 0x28, 0x40, 0x22, 0x05, - 0x60, 0xf2, 0x20, 0x11, 0x28, 0x4d, 0x22, 0x05, 0x60, 0xee, 0x00, 0x2e, - 0x00, 0x0e, 0x00, 0xfe, 0x00, 0xce, 0x00, 0x05, 0x08, 0x40, 0x08, 0x40, - 0x08, 0x40, 0x05, 0x80, 0x04, 0x20, 0x03, 0x48, 0x02, 0xc0, 0x02, 0x58, - 0x02, 0x10, 0x01, 0xa8, 0x01, 0xa8, 0x01, 0xa8, 0x01, 0xa8, 0x01, 0x40, - 0x00, 0xf8, 0x00, 0xd0, 0x00, 0xb0, 0x00, 0xa0, 0x20, 0x28, 0xa1, 0x8c, - 0x00, 0xff, 0x21, 0x30, 0xa0, 0x94, 0xff, 0x00, 0x11, 0x10, 0x81, 0xff, - 0x01, 0x18, 0x08, 0x0c, 0x67, 0x23, 0x00, 0x38, 0xa0, 0x80, 0x2d, 0xf9, - 0x20, 0x0d, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa0, 0x06, 0x00, 0x05, - 0xa0, 0x80, 0x2d, 0xf9, 0x20, 0x0d, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x05, - 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x03, - 0x00, 0xef, 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x06, 0x68, 0x52, 0x68, 0x56, - 0x1f, 0x04, 0x28, 0x77, 0x00, 0xde, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, - 0x00, 0x26, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0xb6, 0x15, 0x21, 0x02, - 0x81, 0x14, 0x82, 0x14, 0x82, 0x14, 0x82, 0x14, 0x20, 0xa9, 0x00, 0x10, - 0x68, 0x53, 0x00, 0x00, 0xa0, 0x06, 0x82, 0xff, 0x11, 0x28, 0xa1, 0x84, - 0x00, 0x0f, 0xa0, 0x80, 0xb5, 0x1a, 0x20, 0x05, 0x68, 0x56, 0x82, 0x11, - 0x1f, 0x04, 0x28, 0x8c, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0xc6, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x30, 0x01, 0x10, 0xc0, 0x9d, - 0x00, 0x08, 0xc0, 0x9c, 0x60, 0x32, 0x00, 0xce, 0x00, 0x05, 0x01, 0x56, - 0x00, 0xd6, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x69, 0x01, 0x40, - 0x69, 0x80, 0xa1, 0x16, 0x01, 0x80, 0xa1, 0x12, 0x12, 0x30, 0x82, 0x12, - 0x82, 0x10, 0x22, 0xa8, 0x20, 0x01, 0x04, 0x02, 0x00, 0x18, 0x22, 0xa8, - 0x20, 0x01, 0x04, 0x04, 0x68, 0x0e, 0x1f, 0x04, 0x28, 0xbc, 0x68, 0x0f, - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xde, 0x01, 0x5e, - 0x00, 0x05, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x50, - 0xd0, 0xa4, 0x01, 0x40, 0xa0, 0x06, 0x00, 0x46, 0x20, 0x20, 0x20, 0x09, - 0x00, 0x2e, 0x08, 0x0c, 0xb1, 0xa4, 0x00, 0x4e, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0x16, 0x00, 0x26, 0x20, 0x79, 0x01, 0x40, 0x78, 0xc4, 0xd0, 0xdc, - 0x05, 0x48, 0xa0, 0x84, 0x07, 0x00, 0xa0, 0x8e, 0x03, 0x00, 0x15, 0x20, - 0x20, 0x11, 0x00, 0x00, 0x20, 0x09, 0x00, 0x02, 0x23, 0x00, 0xa0, 0x80, - 0x00, 0x20, 0x20, 0x18, 0x23, 0x00, 0x08, 0x0c, 0x6b, 0xb2, 0x20, 0x11, - 0x00, 0x30, 0x22, 0x00, 0x80, 0x07, 0xa0, 0x85, 0x00, 0x4c, 0x78, 0xc2, - 0x20, 0x09, 0x02, 0x04, 0x21, 0x0c, 0x22, 0x00, 0xa1, 0x00, 0x20, 0x09, - 0x01, 0x38, 0x20, 0x0a, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x18, 0x20, 0x09, - 0xb8, 0x8f, 0x20, 0x0a, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0xc3, 0x00, 0x00, 0x0c, 0xc8, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x20, 0x01, 0x01, 0x70, 0x20, 0x0c, - 0x80, 0x00, 0x20, 0x14, 0xa1, 0x84, 0x00, 0x03, 0x01, 0x10, 0x08, 0x04, - 0x1b, 0x20, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0x06, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x05, - 0x00, 0x0e, 0x02, 0x68, 0x20, 0x01, 0x01, 0x70, 0x20, 0x0c, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x8e, 0x00, 0x4c, 0x11, 0x28, 0x20, 0x0c, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x00, 0x10, 0x20, 0x09, 0x00, 0x00, 0x20, 0x01, - 0x02, 0x04, 0x20, 0x04, 0xa1, 0x08, 0x00, 0x05, 0x00, 0x06, 0x01, 0x56, - 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0xa9, 0x00, 0x0a, 0x78, 0x54, - 0xd0, 0x8c, 0x11, 0x10, 0x1f, 0x04, 0x29, 0x43, 0x00, 0xfe, 0x01, 0x5e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x00, 0x06, 0x20, 0x61, - 0x01, 0x00, 0x60, 0x30, 0x00, 0x06, 0x60, 0x48, 0x00, 0x06, 0x60, 0xe4, - 0x00, 0x06, 0x60, 0xe8, 0x00, 0x06, 0x60, 0x50, 0x00, 0x06, 0x60, 0xf0, - 0x00, 0x06, 0x60, 0xec, 0x00, 0x06, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x04, - 0x00, 0x06, 0x60, 0x28, 0x00, 0x06, 0x60, 0xe0, 0x00, 0x06, 0x60, 0x2f, - 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, - 0xe0, 0x00, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, 0x00, 0x0e, - 0x60, 0xe2, 0x00, 0x0e, 0x60, 0x2a, 0x00, 0x0e, 0x60, 0x06, 0x00, 0x0e, - 0x60, 0x0e, 0x00, 0x0e, 0x60, 0xee, 0x00, 0x0e, 0x60, 0xf2, 0x00, 0x0e, - 0x60, 0x52, 0x00, 0x0e, 0x60, 0xea, 0x00, 0x0e, 0x60, 0xe6, 0x00, 0x0e, - 0x60, 0x4a, 0x00, 0x0e, 0x60, 0x32, 0x60, 0x36, 0x20, 0x08, 0x08, 0x0c, - 0x28, 0x7c, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x09, - 0x01, 0x71, 0x21, 0x04, 0xd0, 0xdc, 0x01, 0x40, 0x20, 0x09, 0x01, 0x70, - 0x21, 0x04, 0x20, 0x0b, 0x00, 0x80, 0xe0, 0x00, 0xe0, 0x00, 0x20, 0x0a, - 0x00, 0x05, 0x2a, 0x2f, 0x2a, 0x33, 0x2a, 0x37, 0x2a, 0x3d, 0x2a, 0x43, - 0x2a, 0x49, 0x2a, 0x4f, 0x2a, 0x57, 0x2a, 0x5f, 0x2a, 0x65, 0x2a, 0x6b, - 0x2a, 0x73, 0x2a, 0x7b, 0x2a, 0x83, 0x2a, 0x8b, 0x2a, 0x95, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xa1, - 0x2a, 0xa1, 0x2a, 0xa7, 0x2a, 0xa7, 0x2a, 0xae, 0x2a, 0xae, 0x2a, 0xb5, - 0x2a, 0xb5, 0x2a, 0xbe, 0x2a, 0xbe, 0x2a, 0xc5, 0x2a, 0xc5, 0x2a, 0xce, - 0x2a, 0xce, 0x2a, 0xd7, 0x2a, 0xd7, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, - 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0xe2, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, 0x2a, 0x9f, - 0x2a, 0x9f, 0x01, 0x06, 0x00, 0x06, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, - 0x00, 0x06, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x23, 0xbf, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x23, 0xbf, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, - 0x00, 0x06, 0x08, 0x0c, 0x25, 0x4e, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x25, 0x4e, 0x08, 0x0c, - 0x24, 0x27, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, - 0x00, 0x06, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x0c, - 0x24, 0x27, 0x08, 0x04, 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x25, 0x4e, 0x08, 0x0c, - 0x23, 0xbf, 0x08, 0x0c, 0x24, 0x27, 0x08, 0x04, 0x2a, 0xea, 0xe0, 0x00, - 0x0c, 0xf0, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x04, - 0x2a, 0xea, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x0c, - 0x25, 0x4e, 0x04, 0xe0, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, - 0x08, 0x0c, 0x23, 0xbf, 0x04, 0xa8, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, - 0x29, 0x0b, 0x08, 0x0c, 0x25, 0x4e, 0x08, 0x0c, 0x23, 0xbf, 0x04, 0x60, - 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x0c, 0x24, 0x27, - 0x04, 0x28, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x0c, 0x24, 0x27, 0x00, 0xe0, 0x01, 0x06, 0x00, 0x06, - 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x0c, 0x24, 0x27, - 0x00, 0x98, 0x01, 0x06, 0x00, 0x06, 0x08, 0x0c, 0x29, 0x0b, 0x08, 0x0c, - 0x25, 0x4e, 0x08, 0x0c, 0x23, 0xbf, 0x08, 0x0c, 0x24, 0x27, 0x00, 0x40, - 0x20, 0xd1, 0x00, 0x00, 0x20, 0xd1, 0x00, 0x01, 0x20, 0xd1, 0x00, 0x00, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x0e, 0x01, 0x0e, 0x00, 0x0d, 0x00, 0xc6, - 0x00, 0x26, 0x00, 0x46, 0x20, 0x21, 0x00, 0x00, 0x08, 0x0c, 0x53, 0x7b, - 0x19, 0x04, 0x2b, 0xca, 0x72, 0xd4, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x04, - 0xa0, 0x05, 0x11, 0x10, 0xd2, 0x9c, 0x01, 0x48, 0xd2, 0x84, 0x11, 0x38, - 0xd2, 0xbc, 0x19, 0x04, 0x2b, 0xca, 0x08, 0x0c, 0x2b, 0xce, 0x08, 0x04, - 0x2b, 0xca, 0xd2, 0xcc, 0x19, 0x04, 0x2b, 0xca, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0x20, 0x70, 0x9f, 0xff, 0xff, 0x08, 0x04, 0x2b, 0xca, 0xd2, 0x94, - 0x01, 0x20, 0x70, 0x9f, 0xff, 0xff, 0x08, 0x04, 0x2b, 0xca, 0x20, 0x01, - 0xb6, 0x15, 0x20, 0x3c, 0x72, 0x88, 0xd2, 0x84, 0x09, 0x04, 0x2b, 0x6c, - 0xd2, 0x8c, 0x19, 0x04, 0x2b, 0x6c, 0x00, 0x36, 0x73, 0x9c, 0xa3, 0x8e, - 0xff, 0xff, 0x11, 0x10, 0x20, 0x19, 0x00, 0x01, 0x83, 0x14, 0xa2, 0xe0, - 0xbd, 0xc0, 0x2c, 0x04, 0xa3, 0x8c, 0x00, 0x01, 0x01, 0x20, 0xa0, 0x84, - 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0xa0, 0x84, 0x00, 0xff, 0xa7, 0x0e, - 0x05, 0x60, 0xa0, 0x8e, 0x00, 0x00, 0x05, 0x48, 0xa0, 0x8e, 0x00, 0xff, - 0x11, 0x50, 0x72, 0x30, 0xd2, 0x84, 0x15, 0x38, 0x72, 0x88, 0xc2, 0x8d, - 0x72, 0x8a, 0x70, 0x9f, 0xff, 0xff, 0x00, 0x3e, 0x04, 0x28, 0x20, 0x09, - 0x00, 0x00, 0x08, 0x0c, 0x28, 0x52, 0x08, 0x0c, 0x4f, 0xbf, 0x11, 0xb8, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x50, - 0x70, 0x30, 0xd0, 0x8c, 0x01, 0x18, 0x60, 0x00, 0xd0, 0xbc, 0x01, 0x20, - 0x08, 0x0c, 0x2b, 0xe1, 0x01, 0x40, 0x00, 0x28, 0x08, 0x0c, 0x2d, 0x12, - 0x08, 0x0c, 0x2c, 0x0f, 0x01, 0x10, 0x83, 0x18, 0x08, 0x18, 0x73, 0x9e, - 0x00, 0x10, 0x70, 0x9f, 0xff, 0xff, 0x00, 0x3e, 0x08, 0x04, 0x2b, 0xca, - 0xa7, 0x80, 0x2d, 0xf9, 0x20, 0x3d, 0xa7, 0xbc, 0xff, 0x00, 0x87, 0x3f, - 0x20, 0x41, 0x00, 0x7e, 0x70, 0x9c, 0xa0, 0x96, 0xff, 0xff, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x00, 0x28, 0xa8, 0x00, 0x50, 0xa8, 0x12, 0x02, 0x20, - 0x20, 0x08, 0xa8, 0x02, 0x20, 0xa8, 0x00, 0x20, 0x70, 0x9f, 0xff, 0xff, - 0x08, 0x04, 0x2b, 0xca, 0x27, 0x00, 0x01, 0x56, 0x00, 0x16, 0xa1, 0x06, - 0x05, 0xa0, 0xc4, 0x84, 0x08, 0x0c, 0x50, 0x1b, 0x01, 0x20, 0x08, 0x0c, - 0x4f, 0xbf, 0x15, 0xa8, 0x00, 0x08, 0xc4, 0x85, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x30, 0x70, 0x30, 0xd0, 0x8c, - 0x01, 0xe8, 0x60, 0x00, 0xd0, 0xbc, 0x11, 0xd0, 0x72, 0x88, 0xd2, 0x8c, - 0x01, 0x88, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, - 0x02, 0xb0, 0xd4, 0x84, 0x11, 0x18, 0x08, 0x0c, 0x4f, 0xde, 0x00, 0x28, - 0x08, 0x0c, 0x2d, 0x9f, 0x01, 0x70, 0x08, 0x0c, 0x2d, 0xcc, 0x00, 0x58, - 0x08, 0x0c, 0x2d, 0x12, 0x08, 0x0c, 0x2c, 0x0f, 0x01, 0x70, 0x00, 0x28, - 0x08, 0x0c, 0x2d, 0x9f, 0x01, 0x10, 0x04, 0x19, 0x01, 0x40, 0x00, 0x1e, - 0x81, 0x08, 0x01, 0x5e, 0x1f, 0x04, 0x2b, 0x86, 0x70, 0x9f, 0xff, 0xff, - 0x00, 0x18, 0x00, 0x1e, 0x01, 0x5e, 0x71, 0x9e, 0x00, 0x4e, 0x00, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x16, 0x70, 0x9f, 0x00, 0x01, - 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x4f, 0xbf, 0x11, 0x38, 0x08, 0x0c, - 0x2d, 0x12, 0x04, 0xa9, 0x01, 0x18, 0x70, 0xd4, 0xc0, 0xbd, 0x70, 0xd6, - 0x00, 0x1e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, 0x00, 0xd6, - 0x00, 0xc6, 0x2c, 0x68, 0x20, 0x01, 0xb6, 0x57, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x68, 0x42, 0x08, 0x0c, 0x9f, 0x92, 0x01, 0xd8, 0x2d, 0x00, - 0x60, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, - 0x4f, 0x6f, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x98, 0x80, 0x00, - 0x70, 0x9a, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x04, 0x08, 0x0c, 0x86, 0xd3, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, 0x00, 0xd6, 0x00, 0xc6, 0x2c, 0x68, - 0x20, 0x01, 0xb6, 0x57, 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x42, - 0x08, 0x0c, 0x9f, 0x92, 0x05, 0x50, 0x2d, 0x00, 0x60, 0x1a, 0x68, 0x00, - 0xc0, 0xc4, 0x68, 0x02, 0x68, 0xa0, 0xa0, 0x86, 0x00, 0x7e, 0x01, 0x40, - 0x68, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x10, - 0x08, 0x0c, 0x2c, 0xd1, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x4f, 0x6f, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x98, - 0x80, 0x00, 0x70, 0x9a, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, - 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xde, 0x00, 0x7e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x26, 0x20, 0x09, 0x00, 0x80, - 0x08, 0x0c, 0x4f, 0xbf, 0x11, 0x20, 0x00, 0x31, 0x01, 0x10, 0x70, 0xdb, - 0xff, 0xff, 0x00, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, - 0x00, 0xd6, 0x00, 0xc6, 0x2c, 0x68, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0xe8, - 0x2d, 0x00, 0x60, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x4f, 0x6f, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x2c, 0xd1, 0x70, 0xdc, 0x80, 0x00, 0x70, 0xde, 0x01, 0x2e, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, - 0x4f, 0xbf, 0x11, 0x90, 0x2c, 0x68, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0x70, - 0x2d, 0x00, 0x60, 0x1a, 0x63, 0x12, 0x60, 0x1f, 0x00, 0x01, 0x62, 0x0a, - 0x08, 0x0c, 0xa0, 0xe3, 0x20, 0x09, 0x00, 0x22, 0x08, 0x0c, 0x86, 0xd3, - 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x36, 0x00, 0x26, 0x08, 0x0c, - 0x6e, 0x73, 0x08, 0x0c, 0x6e, 0x16, 0x08, 0x0c, 0x90, 0xfb, 0x21, 0x30, - 0x81, 0xff, 0x01, 0x28, 0x20, 0xa9, 0x00, 0x7e, 0x20, 0x09, 0x00, 0x00, - 0x00, 0x20, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x20, 0x08, 0x0c, 0x52, 0x1c, 0x08, 0x0c, - 0x4c, 0x7e, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x2c, 0xbb, 0x86, 0xff, - 0x11, 0x10, 0x08, 0x0c, 0x11, 0xf5, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x36, - 0x00, 0x26, 0x00, 0x16, 0x62, 0x18, 0x22, 0x70, 0x72, 0xa0, 0x00, 0x26, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, - 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, 0x2c, 0x08, 0x08, 0x0c, 0xaf, 0x3e, - 0x00, 0x7e, 0x00, 0x1e, 0x2e, 0x60, 0x08, 0x0c, 0x52, 0x1c, 0x62, 0x10, - 0x63, 0x14, 0x08, 0x0c, 0x4c, 0x7e, 0x62, 0x12, 0x63, 0x16, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0x06, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x80, 0x01, 0x50, 0x20, 0x71, 0xb6, 0x00, 0x70, 0x98, 0xa0, 0x05, - 0x01, 0x10, 0x80, 0x01, 0x70, 0x9a, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x71, 0xb6, 0x00, 0x70, 0xdc, 0xa0, 0x05, 0x0d, 0xc0, 0x80, 0x01, - 0x70, 0xde, 0x0c, 0xa8, 0x60, 0x00, 0xc0, 0x8c, 0x60, 0x02, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, - 0x01, 0x56, 0x21, 0x78, 0x81, 0xff, 0x11, 0x18, 0x20, 0xa9, 0x00, 0x01, - 0x00, 0x98, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x50, - 0xd0, 0xa4, 0x01, 0x40, 0xa0, 0x06, 0x00, 0x46, 0x20, 0x20, 0x20, 0x09, - 0x00, 0x2d, 0x08, 0x0c, 0xb1, 0xa4, 0x00, 0x4e, 0x20, 0xa9, 0x00, 0xff, - 0x20, 0x11, 0x00, 0x00, 0x00, 0x26, 0xa2, 0x8e, 0x00, 0x7e, 0x09, 0x04, - 0x2d, 0x7e, 0xa2, 0x8e, 0x00, 0x7f, 0x09, 0x04, 0x2d, 0x7e, 0xa2, 0x8e, - 0x00, 0x80, 0x05, 0xe0, 0xa2, 0x88, 0xb7, 0x35, 0x21, 0x0c, 0x81, 0xff, - 0x05, 0xb8, 0x8f, 0xff, 0x11, 0x48, 0x20, 0x01, 0xb8, 0xbe, 0x00, 0x06, - 0x20, 0x03, 0x00, 0x01, 0x04, 0xd9, 0x00, 0x0e, 0x20, 0x03, 0x00, 0x00, - 0x00, 0xc6, 0x21, 0x60, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x53, 0x85, - 0x00, 0xce, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, 0x00, 0xc6, 0x00, 0x26, - 0x21, 0x60, 0x62, 0x04, 0xa2, 0x94, 0x00, 0xff, 0xa2, 0x86, 0x00, 0x06, - 0x11, 0x18, 0x60, 0x07, 0x04, 0x04, 0x00, 0x28, 0x20, 0x01, 0x00, 0x04, - 0x80, 0x07, 0xa2, 0x15, 0x62, 0x06, 0x00, 0x2e, 0x00, 0xce, 0x00, 0x16, - 0x2c, 0x08, 0x08, 0x0c, 0xaf, 0x3e, 0x00, 0x1e, 0x00, 0x7e, 0x21, 0x60, - 0x08, 0x0c, 0x52, 0x1c, 0x00, 0x2e, 0x82, 0x10, 0x1f, 0x04, 0x2d, 0x36, - 0x01, 0x5e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x46, 0x00, 0x26, 0x00, 0x16, 0x20, 0x01, - 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x48, 0xd0, 0xa4, 0x01, 0x38, - 0xa0, 0x06, 0x22, 0x20, 0x84, 0x27, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, - 0xb1, 0xa4, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x72, 0x88, 0x82, 0xff, 0x01, 0xf8, - 0x20, 0x11, 0xb6, 0x53, 0x22, 0x14, 0xd2, 0xac, 0x11, 0xd0, 0x21, 0x00, - 0x08, 0x0c, 0x28, 0x66, 0x81, 0xff, 0x01, 0xb8, 0x20, 0x19, 0x00, 0x01, - 0x83, 0x14, 0xa2, 0xe0, 0xbd, 0xc0, 0x2c, 0x04, 0xd3, 0x84, 0x01, 0x20, - 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0xa0, 0x84, 0x00, 0xff, - 0xa1, 0x16, 0x01, 0x38, 0xa0, 0x96, 0x00, 0xff, 0x01, 0x10, 0x83, 0x18, - 0x0c, 0x68, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x21, 0x10, 0x00, 0x26, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x83, 0x20, 0x00, 0x2e, 0x08, 0x0c, - 0xb4, 0x49, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0xa1, 0x80, 0xb7, 0x35, - 0x20, 0x04, 0xa0, 0x65, 0x01, 0x58, 0x00, 0x16, 0x00, 0xc6, 0x20, 0x61, - 0xb9, 0xf5, 0x00, 0x1e, 0x61, 0x1a, 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0x1e, - 0x08, 0x0c, 0x4f, 0xde, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xcc, 0x00, 0x05, 0x7e, 0xef, - 0x7d, 0xe8, 0x7c, 0xe4, 0x80, 0xe2, 0x7b, 0xe1, 0x80, 0xe0, 0x80, 0xdc, - 0x80, 0xda, 0x7a, 0xd9, 0x80, 0xd6, 0x80, 0xd5, 0x80, 0xd4, 0x80, 0xd3, - 0x80, 0xd2, 0x80, 0xd1, 0x79, 0xce, 0x78, 0xcd, 0x80, 0xcc, 0x80, 0xcb, - 0x80, 0xca, 0x80, 0xc9, 0x80, 0xc7, 0x80, 0xc6, 0x77, 0xc5, 0x76, 0xc3, - 0x80, 0xbc, 0x80, 0xba, 0x75, 0xb9, 0x80, 0xb6, 0x74, 0xb5, 0x73, 0xb4, - 0x72, 0xb3, 0x80, 0xb2, 0x80, 0xb1, 0x80, 0xae, 0x71, 0xad, 0x80, 0xac, - 0x70, 0xab, 0x6f, 0xaa, 0x6e, 0xa9, 0x80, 0xa7, 0x6d, 0xa6, 0x6c, 0xa5, - 0x6b, 0xa3, 0x6a, 0x9f, 0x69, 0x9e, 0x68, 0x9d, 0x80, 0x9b, 0x80, 0x98, - 0x67, 0x97, 0x66, 0x90, 0x65, 0x8f, 0x64, 0x88, 0x63, 0x84, 0x62, 0x82, - 0x80, 0x81, 0x80, 0x80, 0x61, 0x7c, 0x60, 0x7a, 0x80, 0x79, 0x5f, 0x76, - 0x80, 0x75, 0x80, 0x74, 0x80, 0x73, 0x80, 0x72, 0x80, 0x71, 0x80, 0x6e, - 0x5e, 0x6d, 0x80, 0x6c, 0x5d, 0x6b, 0x5c, 0x6a, 0x5b, 0x69, 0x80, 0x67, - 0x5a, 0x66, 0x59, 0x65, 0x58, 0x63, 0x57, 0x5c, 0x56, 0x5a, 0x55, 0x59, - 0x80, 0x56, 0x80, 0x55, 0x54, 0x54, 0x53, 0x53, 0x52, 0x52, 0x51, 0x51, - 0x50, 0x4e, 0x4f, 0x4d, 0x80, 0x4c, 0x80, 0x4b, 0x4e, 0x4a, 0x4d, 0x49, - 0x80, 0x47, 0x4c, 0x46, 0x80, 0x45, 0x80, 0x43, 0x80, 0x3c, 0x80, 0x3a, - 0x80, 0x39, 0x80, 0x36, 0x4b, 0x35, 0x80, 0x34, 0x4a, 0x33, 0x49, 0x32, - 0x48, 0x31, 0x80, 0x2e, 0x47, 0x2d, 0x46, 0x2c, 0x45, 0x2b, 0x44, 0x2a, - 0x43, 0x29, 0x42, 0x27, 0x80, 0x26, 0x80, 0x25, 0x41, 0x23, 0x40, 0x1f, - 0x3f, 0x1e, 0x3e, 0x1d, 0x3d, 0x1b, 0x3c, 0x18, 0x80, 0x17, 0x80, 0x10, - 0x3b, 0x0f, 0x3a, 0x08, 0x80, 0x04, 0x39, 0x02, 0x80, 0x01, 0x80, 0x00, - 0x80, 0x00, 0x38, 0x00, 0x37, 0x00, 0x36, 0x00, 0x80, 0x00, 0x35, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x34, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x33, 0x00, 0x32, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x31, 0x00, 0x30, 0x00, 0x80, 0x00, 0x80, 0x00, 0x2f, 0x00, 0x80, 0x00, - 0x2e, 0x00, 0x2d, 0x00, 0x2c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x2b, 0x00, 0x80, 0x00, 0x2a, 0x00, 0x29, 0x00, 0x28, 0x00, 0x80, 0x00, - 0x27, 0x00, 0x26, 0x00, 0x25, 0x00, 0x24, 0x00, 0x23, 0x00, 0x22, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x21, 0x00, 0x20, 0x00, 0x1f, 0x00, 0x1e, 0x00, - 0x1d, 0x00, 0x1c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x1b, 0x00, 0x1a, 0x00, - 0x80, 0x00, 0x19, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x18, 0x00, 0x80, 0x00, 0x17, 0x00, 0x16, 0x00, - 0x15, 0x00, 0x80, 0x00, 0x14, 0x00, 0x13, 0x00, 0x12, 0x00, 0x11, 0x00, - 0x10, 0x00, 0x0f, 0x00, 0x80, 0x00, 0x80, 0x00, 0x0e, 0x00, 0x0d, 0x00, - 0x0c, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x08, 0x00, 0x07, 0x00, 0x80, 0x00, 0x06, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x05, 0x00, 0x04, 0x00, 0x03, 0x00, 0x80, 0x00, 0x02, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x01, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x20, 0x71, 0xb6, 0x82, 0x70, 0x03, - 0x00, 0x02, 0xa0, 0x06, 0x70, 0x12, 0x70, 0x16, 0x70, 0x3a, 0x70, 0x3e, - 0x70, 0x33, 0xb6, 0x92, 0x70, 0x37, 0xb6, 0x92, 0x70, 0x07, 0x00, 0x01, - 0x20, 0x61, 0xb6, 0xd2, 0x60, 0x03, 0x00, 0x02, 0x00, 0x05, 0x10, 0x04, - 0x2f, 0x1f, 0x0e, 0x04, 0x2f, 0x1f, 0x20, 0x71, 0xb6, 0x82, 0x2b, 0x78, - 0x78, 0x18, 0xd0, 0x84, 0x11, 0x40, 0x2a, 0x60, 0x78, 0x20, 0xa0, 0x8e, - 0x00, 0x69, 0x19, 0x04, 0x30, 0x04, 0x08, 0x04, 0x2f, 0x9d, 0x00, 0x05, - 0x20, 0x71, 0xb6, 0x82, 0x70, 0x04, 0x00, 0x02, 0x2f, 0x28, 0x2f, 0x29, - 0x2f, 0x32, 0x2f, 0x43, 0x00, 0x05, 0x10, 0x04, 0x2f, 0x31, 0x0e, 0x04, - 0x2f, 0x31, 0x2b, 0x78, 0x78, 0x18, 0xd0, 0x84, 0x01, 0xe8, 0x00, 0x05, - 0x2b, 0x78, 0x20, 0x61, 0xb6, 0xd2, 0x60, 0x08, 0xa0, 0x8e, 0x01, 0x00, - 0x01, 0x28, 0xa0, 0x86, 0x02, 0x00, 0x09, 0x04, 0x2f, 0xfe, 0x00, 0x05, - 0x70, 0x14, 0x20, 0x68, 0x2a, 0x60, 0x70, 0x18, 0x08, 0x07, 0x70, 0x10, - 0x20, 0x68, 0x68, 0x34, 0xa0, 0x86, 0x01, 0x03, 0x01, 0x08, 0x00, 0x05, - 0x2a, 0x60, 0x2b, 0x78, 0x70, 0x18, 0x08, 0x07, 0x2a, 0x60, 0x78, 0x20, - 0xa0, 0x8a, 0x00, 0x40, 0x12, 0x10, 0x61, 0xc4, 0x00, 0x42, 0x21, 0x00, - 0xa0, 0x8a, 0x00, 0x3f, 0x1a, 0x04, 0x2f, 0xfb, 0x61, 0xc4, 0x08, 0x04, - 0x2f, 0x9d, 0x2f, 0xdf, 0x30, 0x0a, 0x30, 0x12, 0x30, 0x16, 0x30, 0x1e, - 0x30, 0x24, 0x30, 0x28, 0x30, 0x34, 0x30, 0x37, 0x30, 0x41, 0x30, 0x44, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x30, 0x47, 0x2f, 0xfb, 0x30, 0x56, - 0x30, 0x6d, 0x30, 0x84, 0x30, 0xfe, 0x31, 0x03, 0x31, 0x2c, 0x31, 0x7d, - 0x31, 0x8e, 0x31, 0xad, 0x31, 0xe5, 0x31, 0xef, 0x31, 0xfc, 0x32, 0x0f, - 0x32, 0x30, 0x32, 0x39, 0x32, 0x6f, 0x32, 0x75, 0x2f, 0xfb, 0x32, 0x9e, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x32, 0xa5, - 0x32, 0xaf, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x32, 0xb7, 0x2f, 0xfb, 0x2f, 0xfb, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x32, 0xc9, 0x32, 0xd3, 0x2f, 0xfb, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x00, 0x02, - 0x32, 0xfd, 0x33, 0x51, 0x33, 0xac, 0x33, 0xc6, 0x2f, 0xfb, 0x33, 0xf7, - 0x38, 0x2a, 0x42, 0x7a, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, - 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x30, 0x41, 0x30, 0x44, - 0x38, 0x2c, 0x2f, 0xfb, 0x38, 0x39, 0x43, 0x13, 0x43, 0x6e, 0x43, 0xd2, - 0x2f, 0xfb, 0x44, 0x35, 0x44, 0x5f, 0x44, 0x7e, 0x44, 0xb0, 0x2f, 0xfb, - 0x2f, 0xfb, 0x2f, 0xfb, 0x38, 0x3d, 0x39, 0xe2, 0x39, 0xfc, 0x3a, 0x26, - 0x3a, 0x87, 0x3a, 0xe7, 0x3a, 0xf2, 0x3b, 0x2a, 0x3b, 0x39, 0x3b, 0x48, - 0x3b, 0x4b, 0x3b, 0x6e, 0x3b, 0xba, 0x3c, 0x34, 0x3c, 0x41, 0x3d, 0x42, - 0x3e, 0x6a, 0x3e, 0x93, 0x3f, 0x91, 0x3f, 0xb3, 0x3f, 0xbf, 0x3f, 0xf8, - 0x40, 0xbc, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x2f, 0xfb, 0x41, 0x24, - 0x41, 0x3f, 0x41, 0xb1, 0x42, 0x63, 0x71, 0x3c, 0x00, 0x00, 0x20, 0x21, - 0x40, 0x00, 0x08, 0x0c, 0x3e, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x0e, 0x04, 0x2f, 0xeb, 0x78, 0x18, 0xd0, 0x84, 0x01, 0x10, 0x01, 0x2e, - 0x0c, 0xb0, 0x7c, 0x22, 0x79, 0x26, 0x7a, 0x2a, 0x7b, 0x2e, 0x78, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x70, 0x07, 0x00, 0x01, 0x20, 0x91, - 0x50, 0x00, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x21, 0x40, 0x01, 0x0c, 0x18, - 0x20, 0x21, 0x40, 0x02, 0x0c, 0x00, 0x20, 0x21, 0x40, 0x03, 0x08, 0xe8, - 0x20, 0x21, 0x40, 0x05, 0x08, 0xd0, 0x20, 0x21, 0x40, 0x06, 0x08, 0xb8, - 0xa0, 0x2e, 0x25, 0x20, 0x7b, 0x28, 0x7a, 0x2c, 0x78, 0x24, 0x79, 0x30, - 0x08, 0x04, 0x3e, 0xfd, 0x78, 0x23, 0x00, 0x04, 0x78, 0x24, 0x08, 0x07, - 0xa0, 0x2e, 0x25, 0x20, 0x7b, 0x28, 0x7a, 0x2c, 0x78, 0x24, 0x79, 0x30, - 0x08, 0x04, 0x3f, 0x00, 0x79, 0x24, 0x78, 0x28, 0x21, 0x14, 0x20, 0x0a, - 0x08, 0x04, 0x2f, 0xdf, 0x79, 0x24, 0x21, 0x14, 0x08, 0x04, 0x2f, 0xdf, - 0x20, 0x99, 0x00, 0x09, 0x20, 0xa1, 0x00, 0x09, 0x20, 0xa9, 0x00, 0x07, - 0x53, 0xa3, 0x79, 0x24, 0x7a, 0x28, 0x7b, 0x2c, 0x08, 0x04, 0x2f, 0xdf, - 0x78, 0x24, 0x20, 0x60, 0x00, 0x90, 0x20, 0x09, 0x00, 0x02, 0x20, 0x11, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x08, 0x78, 0x3b, 0x00, 0x17, 0x08, 0x04, - 0x2f, 0xdf, 0x7d, 0x38, 0x7c, 0x3c, 0x08, 0x40, 0x7d, 0x38, 0x7c, 0x3c, - 0x08, 0x88, 0x20, 0x61, 0x10, 0x00, 0xe1, 0x0c, 0xa0, 0x06, 0x2c, 0x15, - 0xa2, 0x00, 0x8c, 0x60, 0x81, 0x09, 0x1d, 0xd8, 0x20, 0x10, 0xa0, 0x05, - 0x09, 0x04, 0x2f, 0xdf, 0x08, 0x04, 0x30, 0x01, 0x20, 0x69, 0xb6, 0x52, - 0x78, 0x24, 0x79, 0x30, 0xa1, 0x1a, 0x1a, 0x04, 0x30, 0x07, 0x80, 0x19, - 0x09, 0x04, 0x30, 0x07, 0x68, 0x4a, 0x69, 0x42, 0x78, 0x2c, 0x68, 0x52, - 0x78, 0x28, 0x68, 0x56, 0xa0, 0x06, 0x68, 0x5a, 0x68, 0x5e, 0x08, 0x0c, - 0x5e, 0x17, 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x69, 0xb6, 0x52, 0x78, 0x24, - 0x79, 0x34, 0xa1, 0x1a, 0x1a, 0x04, 0x30, 0x07, 0x80, 0x19, 0x09, 0x04, - 0x30, 0x07, 0x68, 0x4e, 0x69, 0x46, 0x78, 0x2c, 0x68, 0x62, 0x78, 0x28, - 0x68, 0x66, 0xa0, 0x06, 0x68, 0x6a, 0x68, 0x6e, 0x08, 0x0c, 0x54, 0x47, - 0x08, 0x04, 0x2f, 0xdf, 0xa0, 0x2e, 0x25, 0x20, 0x81, 0xff, 0x19, 0x04, - 0x30, 0x04, 0x79, 0x24, 0x7b, 0x28, 0x7a, 0x2c, 0x20, 0xa9, 0x00, 0x05, - 0x20, 0xa1, 0xb6, 0x89, 0x41, 0xa1, 0x08, 0x0c, 0x3e, 0xbc, 0x09, 0x04, - 0x30, 0x04, 0x20, 0x09, 0x00, 0x20, 0x08, 0x0c, 0x3e, 0xfd, 0x70, 0x1b, - 0x30, 0x9c, 0x00, 0x05, 0x68, 0x34, 0x20, 0x08, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x96, 0x00, 0x11, 0x01, 0x38, 0xa0, 0x96, 0x00, 0x19, 0x01, 0x20, - 0xa0, 0x96, 0x00, 0x15, 0x19, 0x04, 0x30, 0x04, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x09, 0x04, 0x30, 0x04, 0x71, 0x0e, 0x70, 0x0c, 0x80, 0x01, - 0x05, 0x28, 0x70, 0x0e, 0x08, 0x0c, 0x3e, 0xbc, 0x09, 0x04, 0x30, 0x04, - 0x20, 0x09, 0x00, 0x20, 0x20, 0x61, 0xb6, 0xd2, 0x62, 0x24, 0x63, 0x28, - 0x64, 0x2c, 0x65, 0x30, 0xa2, 0x90, 0x00, 0x40, 0xa3, 0x99, 0x00, 0x00, - 0xa4, 0xa1, 0x00, 0x00, 0xa5, 0xa9, 0x00, 0x00, 0x08, 0x0c, 0x3e, 0xfd, - 0x70, 0x1b, 0x30, 0xcd, 0x00, 0x05, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x96, 0x00, 0x02, 0x01, 0x20, 0xa0, 0x96, 0x00, 0x0a, 0x19, 0x04, - 0x30, 0x04, 0x08, 0xc0, 0x70, 0x10, 0x20, 0x68, 0x68, 0x38, 0xc0, 0xfd, - 0x68, 0x3a, 0x08, 0x0c, 0x4e, 0xbb, 0x11, 0x28, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x30, 0xe7, 0x00, 0x05, 0x08, 0x0c, 0x55, 0x4d, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, 0x20, 0x99, 0xb6, 0x89, - 0x53, 0x0a, 0x21, 0x00, 0xa2, 0x10, 0xa3, 0x99, 0x00, 0x00, 0xa4, 0xa1, - 0x00, 0x00, 0xa5, 0xa9, 0x00, 0x00, 0xad, 0x80, 0x00, 0x0d, 0x20, 0x09, - 0x00, 0x20, 0x01, 0x2e, 0x08, 0x04, 0x3f, 0x00, 0x61, 0xac, 0x78, 0x24, - 0x60, 0xae, 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x91, 0x80, 0x00, 0x78, 0x23, - 0x40, 0x00, 0x78, 0x27, 0x49, 0x53, 0x78, 0x2b, 0x50, 0x20, 0x78, 0x2f, - 0x20, 0x20, 0x20, 0x09, 0x01, 0x7f, 0x21, 0x04, 0x78, 0x32, 0x3f, 0x00, - 0x78, 0x36, 0x20, 0x61, 0x01, 0x00, 0x62, 0x00, 0x20, 0x61, 0x02, 0x00, - 0x60, 0x3c, 0x80, 0x07, 0xa2, 0x05, 0x78, 0x3a, 0x20, 0x09, 0x04, 0xfd, - 0x21, 0x04, 0x78, 0x3e, 0x78, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x71, 0x00, 0x10, 0x20, 0xc1, 0x00, 0xf0, - 0x08, 0x04, 0x04, 0x27, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x79, 0x24, - 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0x08, 0x0c, 0x50, 0x1b, 0x19, 0x04, - 0x30, 0x07, 0x7e, 0x38, 0xa6, 0x84, 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, - 0x02, 0x10, 0x08, 0x04, 0x30, 0x07, 0x7c, 0x28, 0x7d, 0x2c, 0x08, 0x0c, - 0x51, 0xe3, 0xd2, 0x8c, 0x11, 0x18, 0x08, 0x0c, 0x51, 0x8c, 0x00, 0x10, - 0x08, 0x0c, 0x51, 0xbc, 0x15, 0x18, 0x20, 0x61, 0xbe, 0x00, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x01, 0x48, - 0x60, 0x10, 0xa0, 0x6d, 0x01, 0x30, 0x68, 0x3c, 0xa4, 0x06, 0x11, 0x18, - 0x68, 0x40, 0xa5, 0x06, 0x01, 0x50, 0x01, 0x2e, 0xac, 0xe0, 0x00, 0x18, - 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, 0xac, 0x02, 0x1a, 0x04, 0x30, 0x04, - 0x0c, 0x30, 0x08, 0x0c, 0x99, 0xe6, 0x01, 0x2e, 0x09, 0x04, 0x30, 0x04, - 0x08, 0x04, 0x2f, 0xdf, 0xa0, 0x0e, 0x20, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x55, 0x4d, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x9f, 0x8e, - 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, - 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, - 0x08, 0x0c, 0x50, 0xe1, 0x09, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x51, 0xef, - 0x09, 0x04, 0x30, 0x04, 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, - 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, - 0x52, 0x5b, 0x09, 0x04, 0x30, 0x04, 0x20, 0x19, 0x00, 0x05, 0x79, 0x24, - 0x08, 0x0c, 0x52, 0x0a, 0x09, 0x04, 0x30, 0x04, 0x78, 0x28, 0xa0, 0x8a, - 0x10, 0x00, 0x1a, 0x04, 0x30, 0x07, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0xa1, 0x08, 0x08, 0x0c, 0x6a, 0x1a, 0x08, 0x04, 0x2f, 0xdf, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x81, 0xff, 0x01, 0x18, 0x20, 0x09, 0x00, 0x01, - 0x04, 0x50, 0x20, 0x29, 0x00, 0xff, 0x64, 0x50, 0x24, 0x00, 0xa5, 0x06, - 0x01, 0xf8, 0x25, 0x08, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0xd8, 0x08, 0x0c, - 0x52, 0x5b, 0x11, 0x28, 0x20, 0x09, 0x00, 0x02, 0x62, 0xb4, 0x25, 0x18, - 0x00, 0xc0, 0x20, 0x19, 0x00, 0x04, 0xa0, 0x0e, 0x08, 0x0c, 0x52, 0x0a, - 0x11, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0x78, 0x78, 0x24, 0xa0, 0x8a, - 0x10, 0x00, 0x12, 0x70, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, - 0x08, 0x0c, 0x6a, 0x1a, 0x85, 0x29, 0x1a, 0xe0, 0x01, 0x2e, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x2e, 0x08, 0x04, 0x30, 0x04, 0x01, 0x2e, 0x08, 0x04, - 0x30, 0x07, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, - 0x51, 0x47, 0x08, 0x0c, 0x51, 0xe3, 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, - 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, - 0x08, 0x0c, 0x51, 0x38, 0x08, 0x0c, 0x51, 0xe3, 0x08, 0x04, 0x2f, 0xdf, - 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, - 0x30, 0x07, 0x08, 0x0c, 0x51, 0xbe, 0x09, 0x04, 0x30, 0x04, 0x08, 0x0c, - 0x4e, 0xff, 0x08, 0x0c, 0x51, 0x85, 0x08, 0x0c, 0x51, 0xe3, 0x08, 0x04, - 0x2f, 0xdf, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, - 0x50, 0xe1, 0x09, 0x04, 0x30, 0x04, 0x62, 0xa0, 0x20, 0x19, 0x00, 0x05, - 0x00, 0xc6, 0x08, 0x0c, 0x52, 0x1c, 0x20, 0x61, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, - 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0xaf, 0x3e, 0x00, 0x7e, 0x00, 0xce, - 0x08, 0x0c, 0x51, 0xe3, 0x08, 0x04, 0x2f, 0xdf, 0x08, 0x0c, 0x3e, 0xd1, - 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x51, 0xe3, 0x22, 0x08, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x56, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x69, 0xb7, 0x14, - 0x68, 0x10, 0x69, 0x14, 0xa1, 0x0a, 0x12, 0x10, 0x20, 0x09, 0x00, 0x00, - 0x68, 0x16, 0x20, 0x11, 0x00, 0x00, 0x20, 0x19, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x7e, 0x20, 0x69, 0xb7, 0x35, 0x2d, 0x04, 0xa0, 0x75, 0x01, 0x30, - 0x70, 0x4c, 0x00, 0x71, 0xa2, 0x10, 0x70, 0x80, 0x00, 0x59, 0xa3, 0x18, - 0x8d, 0x68, 0x1f, 0x04, 0x32, 0x4d, 0x23, 0x00, 0xa2, 0x18, 0x00, 0xee, - 0x00, 0xde, 0x01, 0x5e, 0x08, 0x04, 0x2f, 0xdf, 0x00, 0xf6, 0x00, 0x16, - 0xa0, 0x7d, 0x01, 0x40, 0x20, 0x01, 0x00, 0x00, 0x80, 0x00, 0x2f, 0x0c, - 0x81, 0xff, 0x01, 0x10, 0x21, 0x78, 0x0c, 0xd0, 0x00, 0x1e, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x69, 0xb7, 0x14, 0x69, 0x10, 0x62, 0xb0, 0x08, 0x04, - 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x61, 0x50, 0xa1, 0x90, - 0x2d, 0xf9, 0x22, 0x15, 0xa2, 0x94, 0x00, 0xff, 0x63, 0x70, 0x83, 0xff, - 0x01, 0x08, 0x62, 0x74, 0x67, 0xd4, 0xd7, 0x9c, 0x01, 0x18, 0x20, 0x31, - 0x00, 0x01, 0x00, 0x90, 0xd7, 0xac, 0x01, 0x18, 0x20, 0x31, 0x00, 0x03, - 0x00, 0x68, 0xd7, 0xa4, 0x01, 0x18, 0x20, 0x31, 0x00, 0x02, 0x00, 0x40, - 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x18, 0x20, 0x31, 0x00, 0x04, 0x00, 0x10, - 0x20, 0x31, 0x00, 0x00, 0x7e, 0x3a, 0x7f, 0x3e, 0x08, 0x04, 0x2f, 0xdf, - 0x61, 0x40, 0x62, 0x44, 0x20, 0x19, 0xb8, 0xb6, 0x23, 0x1c, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x61, 0x34, 0xa0, 0x06, - 0x20, 0x10, 0x63, 0x38, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0x08, 0x0c, - 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x62, 0x44, 0x63, 0x38, 0x08, 0x04, - 0x2f, 0xdf, 0x61, 0x40, 0x62, 0x44, 0x78, 0x24, 0x60, 0x42, 0x7b, 0x28, - 0x63, 0x46, 0x20, 0x69, 0xb6, 0x52, 0x83, 0x1f, 0xa3, 0x05, 0x68, 0x16, - 0x78, 0x2c, 0x20, 0x69, 0xb8, 0xb6, 0x2d, 0x1c, 0x20, 0x6a, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0x24, 0x60, 0x36, - 0x78, 0x2c, 0x60, 0x3a, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0x78, 0x38, - 0xa0, 0x05, 0x01, 0xa8, 0x78, 0x28, 0xa0, 0x25, 0x09, 0x04, 0x30, 0x07, - 0x78, 0x2c, 0xa0, 0x2d, 0x09, 0x04, 0x30, 0x07, 0xa0, 0x0e, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x20, 0x62, 0x44, 0x63, 0x38, 0x64, 0x46, 0x65, 0x3a, - 0xa1, 0x86, 0x00, 0xff, 0x01, 0x90, 0x81, 0x08, 0x0c, 0xa0, 0x08, 0x0c, - 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x78, 0x28, 0xa0, 0x0d, 0x09, 0x04, - 0x30, 0x07, 0x78, 0x2c, 0xa0, 0x05, 0x09, 0x04, 0x30, 0x07, 0x62, 0x44, - 0x61, 0x46, 0x63, 0x38, 0x60, 0x3a, 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x19, 0x04, 0x30, 0x04, - 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x96, 0x00, 0xff, 0x11, 0x30, 0x20, 0x01, 0xb6, 0x15, - 0x20, 0x04, 0xa0, 0x85, 0xff, 0x00, 0x00, 0x78, 0xa1, 0x82, 0x00, 0x7f, - 0x16, 0xa0, 0xa1, 0x88, 0x2d, 0xf9, 0x21, 0x0d, 0xa1, 0x8c, 0x00, 0xff, - 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, 0xa1, 0x16, 0x05, 0x50, 0x81, 0x0f, - 0xa1, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x06, 0x08, 0x0c, - 0x86, 0x4e, 0x00, 0x0e, 0x01, 0xe0, 0x60, 0x1a, 0x60, 0x0b, 0xbc, 0x09, - 0x60, 0x1f, 0x00, 0x01, 0x08, 0x0c, 0x3e, 0xbc, 0x01, 0xd8, 0x68, 0x37, - 0x00, 0x00, 0x70, 0x07, 0x00, 0x03, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x70, 0x1b, 0x33, 0xa5, 0x2d, 0x00, 0x60, 0x12, - 0x20, 0x09, 0x00, 0x32, 0x08, 0x0c, 0x86, 0xd3, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x05, 0x01, 0x2e, 0x00, 0xce, 0x08, 0x04, 0x30, 0x04, 0x00, 0xce, - 0x08, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x86, 0xa4, 0x0c, 0xb0, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x19, 0x04, 0x30, 0x04, - 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x96, 0x00, 0xff, 0x11, 0x30, 0x20, 0x01, 0xb6, 0x15, - 0x20, 0x04, 0xa0, 0x85, 0xff, 0x00, 0x00, 0x78, 0xa1, 0x82, 0x00, 0x7f, - 0x16, 0xa0, 0xa1, 0x88, 0x2d, 0xf9, 0x21, 0x0d, 0xa1, 0x8c, 0x00, 0xff, - 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, 0xa1, 0x16, 0x05, 0x50, 0x81, 0x0f, - 0xa1, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x06, 0x08, 0x0c, - 0x86, 0x4e, 0x00, 0x0e, 0x01, 0xe0, 0x60, 0x1a, 0x60, 0x0b, 0xbc, 0x05, - 0x60, 0x1f, 0x00, 0x01, 0x08, 0x0c, 0x3e, 0xbc, 0x01, 0xd8, 0x68, 0x37, - 0x00, 0x00, 0x70, 0x07, 0x00, 0x03, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x70, 0x1b, 0x33, 0xa5, 0x2d, 0x00, 0x60, 0x12, - 0x20, 0x09, 0x00, 0x32, 0x08, 0x0c, 0x86, 0xd3, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x05, 0x01, 0x2e, 0x00, 0xce, 0x08, 0x04, 0x30, 0x04, 0x00, 0xce, - 0x08, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x86, 0xa4, 0x0c, 0xb0, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x09, 0x04, 0x30, 0x04, 0x08, 0x04, 0x2f, 0xdf, - 0x20, 0x61, 0xb9, 0x75, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, - 0xd0, 0x84, 0x01, 0x78, 0x61, 0x04, 0x62, 0x08, 0x2a, 0x60, 0x60, 0x68, - 0x78, 0x3a, 0x60, 0xb4, 0x78, 0x3e, 0x60, 0xb0, 0x20, 0x19, 0x00, 0x72, - 0x20, 0x1a, 0x63, 0x48, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0xa0, 0x0e, - 0x21, 0x10, 0x0c, 0x80, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, - 0x5b, 0x41, 0x09, 0x04, 0x30, 0x04, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x62, 0x48, 0x60, 0x68, 0xa2, 0x02, 0x02, 0x48, 0xa0, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x28, 0x9c, 0x08, 0x0c, 0x46, 0x73, 0x01, 0x2e, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x2e, 0x08, 0x04, 0x30, 0x07, 0x00, 0x06, 0x00, 0x16, - 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x01, 0xb8, 0xc0, 0x20, 0x70, 0x20, 0x61, - 0xb6, 0x52, 0x60, 0x08, 0x20, 0x72, 0x20, 0x09, 0x00, 0x00, 0x20, 0x11, - 0x10, 0x00, 0x08, 0x0c, 0x6b, 0xb2, 0x72, 0x06, 0x00, 0xee, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x24, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x02, 0x34, 0x09, 0x34, 0x12, - 0x34, 0x19, 0x34, 0x06, 0x34, 0x06, 0x34, 0x06, 0x34, 0x06, 0x34, 0x06, - 0x01, 0x2e, 0x08, 0x04, 0x30, 0x07, 0x20, 0x09, 0x01, 0x14, 0x21, 0x04, - 0xa0, 0x85, 0x08, 0x00, 0x20, 0x0a, 0x08, 0x0c, 0x35, 0x84, 0x00, 0x70, - 0x20, 0x09, 0x01, 0x0b, 0x20, 0x0b, 0x00, 0x10, 0x08, 0x0c, 0x35, 0x84, - 0x00, 0x38, 0x81, 0xff, 0x01, 0x28, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0b, - 0x08, 0x04, 0x2f, 0xe1, 0x00, 0x86, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x08, 0x0c, 0x33, 0xe0, - 0x20, 0x09, 0x01, 0x01, 0x21, 0x0c, 0x00, 0x16, 0x20, 0x01, 0x01, 0x38, - 0x20, 0x0c, 0x20, 0x03, 0x00, 0x01, 0x00, 0x16, 0x20, 0x01, 0x00, 0x7a, - 0x20, 0x34, 0x20, 0x01, 0x00, 0x7b, 0x20, 0x2c, 0xa0, 0x06, 0x20, 0x48, - 0x20, 0x50, 0x20, 0x58, 0x08, 0x0c, 0x37, 0xcf, 0x08, 0x0c, 0x37, 0x33, - 0xa0, 0x3e, 0x27, 0x20, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x2d, 0x60, - 0x20, 0x71, 0xb9, 0x4b, 0x20, 0x79, 0x00, 0x20, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x00, 0x68, 0x24, 0xd0, 0xb4, 0x01, 0x40, 0x20, 0x01, 0x00, 0x7d, - 0x20, 0x04, 0x78, 0x3e, 0x20, 0x01, 0x00, 0x7c, 0x20, 0x04, 0x78, 0x3a, - 0x00, 0xde, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x36, 0xdf, 0x08, 0x0c, - 0x36, 0xdf, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x08, 0x0c, 0x36, 0x2a, - 0x08, 0x0c, 0x37, 0x07, 0x08, 0x0c, 0x36, 0x84, 0x08, 0x0c, 0x35, 0xe9, - 0x08, 0x0c, 0x36, 0x1a, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x78, 0x24, - 0xd0, 0x94, 0x05, 0x30, 0x78, 0x14, 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, - 0x00, 0x10, 0x78, 0x16, 0x20, 0x79, 0x01, 0x40, 0x08, 0x0c, 0x35, 0x62, - 0x11, 0x10, 0x00, 0xfe, 0x04, 0x30, 0x78, 0x04, 0xd0, 0xdc, 0x0d, 0xc0, - 0x20, 0x79, 0x01, 0x00, 0x78, 0x27, 0x00, 0x86, 0x78, 0x14, 0xa0, 0x84, - 0x01, 0x84, 0xa0, 0x85, 0x00, 0x32, 0x78, 0x16, 0x08, 0x0c, 0x35, 0x62, - 0x11, 0x10, 0x00, 0xfe, 0x00, 0xa0, 0x78, 0x24, 0xd0, 0xbc, 0x0d, 0xc0, - 0x78, 0x27, 0x00, 0x80, 0xa0, 0x26, 0x7c, 0x16, 0x78, 0x24, 0xd0, 0xac, - 0x01, 0x30, 0x8b, 0x58, 0x08, 0x0c, 0x35, 0x6c, 0x00, 0xfe, 0x08, 0x04, - 0x35, 0x2c, 0x00, 0xfe, 0x08, 0x0c, 0x35, 0x62, 0x11, 0x50, 0x89, 0x48, - 0x20, 0x01, 0x00, 0x7a, 0x26, 0x02, 0x20, 0x01, 0x00, 0x7b, 0x25, 0x02, - 0x08, 0x0c, 0x35, 0x6c, 0x00, 0x88, 0x87, 0xff, 0x01, 0x40, 0x20, 0x01, - 0x02, 0x01, 0x20, 0x04, 0xa0, 0x05, 0x19, 0x04, 0x34, 0x66, 0x87, 0x39, - 0x00, 0x38, 0x20, 0x01, 0xb9, 0x24, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x00, - 0x19, 0x04, 0x34, 0x66, 0x20, 0x01, 0x00, 0x33, 0x20, 0x03, 0x00, 0xf6, - 0x86, 0x31, 0x12, 0x08, 0x85, 0x29, 0x25, 0x00, 0xa6, 0x05, 0x09, 0x04, - 0x35, 0x2c, 0x78, 0x24, 0xd0, 0xbc, 0x01, 0x28, 0x29, 0x00, 0xaa, 0x05, - 0xab, 0x05, 0x19, 0x04, 0x35, 0x2c, 0x60, 0x33, 0x00, 0x0d, 0x20, 0x01, - 0x00, 0x30, 0x20, 0x03, 0x00, 0x04, 0x78, 0x24, 0xd0, 0xac, 0x11, 0x48, - 0x20, 0x01, 0xb9, 0x24, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, 0x00, 0x30, - 0x20, 0x03, 0x00, 0x09, 0x00, 0x40, 0x60, 0x27, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x75, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x08, 0x60, 0x26, 0x2c, 0x00, - 0x60, 0x1a, 0x20, 0xe1, 0x90, 0x40, 0x2d, 0x00, 0x68, 0x1a, 0x68, 0x33, - 0x00, 0x0d, 0x78, 0x24, 0xd0, 0xa4, 0x11, 0x80, 0x68, 0x27, 0x00, 0x00, - 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x61, 0x00, 0x20, 0x60, 0x03, - 0x00, 0x08, 0x20, 0x01, 0x02, 0x03, 0x20, 0x04, 0x1f, 0x04, 0x35, 0x01, - 0x00, 0xce, 0x00, 0x40, 0x68, 0x27, 0x00, 0x01, 0x20, 0x01, 0x00, 0x74, - 0x20, 0x04, 0xa0, 0x05, 0x01, 0x08, 0x68, 0x26, 0x00, 0xf6, 0x00, 0xc6, - 0x20, 0x79, 0x01, 0x00, 0x20, 0x61, 0x00, 0x20, 0x78, 0x27, 0x00, 0x02, - 0x20, 0x01, 0x00, 0x72, 0x20, 0x04, 0xa0, 0x84, 0xff, 0xf8, 0x60, 0x1a, - 0x00, 0x06, 0x20, 0x01, 0x00, 0x73, 0x20, 0x04, 0x60, 0x1e, 0x78, 0xc6, - 0x00, 0x0e, 0x78, 0xca, 0x00, 0xce, 0x00, 0xfe, 0x08, 0x04, 0x34, 0x44, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x27, 0x00, 0x02, 0x00, 0x1e, 0x61, 0xe2, - 0x00, 0x1e, 0x61, 0x06, 0x78, 0x24, 0xa0, 0x84, 0x00, 0x03, 0xa0, 0x86, - 0x00, 0x02, 0x01, 0x88, 0x20, 0xe1, 0x90, 0x28, 0x60, 0x50, 0xa0, 0x84, - 0xf7, 0xef, 0x60, 0x52, 0x60, 0x2f, 0x00, 0x00, 0x60, 0x2c, 0xc0, 0xac, - 0x60, 0x2e, 0x60, 0x4b, 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, - 0x00, 0x10, 0x29, 0x08, 0x2a, 0x10, 0x2b, 0x18, 0x2b, 0x00, 0xaa, 0x05, - 0xa9, 0x05, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x11, 0x18, 0x01, 0x2e, 0x08, 0x04, - 0x2f, 0xdf, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0c, 0x08, 0x04, 0x2f, 0xe1, - 0xa0, 0x85, 0x00, 0x01, 0x1d, 0x04, 0x35, 0x6b, 0x20, 0x91, 0x60, 0x00, - 0x84, 0x20, 0xa4, 0x86, 0x00, 0x64, 0x00, 0x05, 0x20, 0x01, 0x01, 0x05, - 0x20, 0x03, 0x00, 0x10, 0x20, 0x01, 0x00, 0x30, 0x20, 0x03, 0x00, 0x04, - 0x20, 0x01, 0x00, 0x20, 0x20, 0x03, 0x00, 0x04, 0x20, 0x01, 0xb9, 0x24, - 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0xb9, 0x4b, 0x20, 0x03, 0x00, 0x00, - 0x20, 0xe1, 0xf0, 0x00, 0xa0, 0x26, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x0c, 0x79, 0x32, 0x79, 0x36, - 0x08, 0x0c, 0x28, 0x7c, 0x78, 0x50, 0xa0, 0x84, 0x09, 0x80, 0xa0, 0x85, - 0x00, 0x30, 0x78, 0x52, 0x20, 0x19, 0x01, 0xf4, 0x83, 0x19, 0x1d, 0xf0, - 0xa0, 0x84, 0x09, 0x80, 0x78, 0x52, 0x78, 0x2c, 0xc0, 0xad, 0x78, 0x2e, - 0x20, 0xa9, 0x00, 0x46, 0x1d, 0x04, 0x35, 0xa0, 0x20, 0x91, 0x60, 0x00, - 0x1f, 0x04, 0x35, 0xa0, 0x78, 0x50, 0xa0, 0x85, 0x04, 0x00, 0x78, 0x52, - 0x20, 0x01, 0x00, 0x09, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0xa0, 0x86, - 0x00, 0x01, 0x11, 0x18, 0x78, 0x2c, 0xc0, 0xac, 0x78, 0x2e, 0x78, 0x4b, - 0xf7, 0xf7, 0x78, 0x43, 0x00, 0x90, 0x78, 0x43, 0x00, 0x10, 0x20, 0xa9, - 0x00, 0x0e, 0xe0, 0x00, 0x1f, 0x04, 0x35, 0xbd, 0x78, 0x50, 0xa0, 0x85, - 0x14, 0x00, 0x78, 0x52, 0x20, 0x19, 0x61, 0xa8, 0x78, 0x54, 0xe0, 0x00, - 0xe0, 0x00, 0xd0, 0x8c, 0x11, 0x10, 0x83, 0x19, 0x1d, 0xc8, 0x78, 0x27, - 0x00, 0x48, 0x78, 0x50, 0xa0, 0x85, 0x04, 0x00, 0x78, 0x52, 0x78, 0x43, - 0x00, 0x40, 0x20, 0x19, 0x01, 0xf4, 0xe0, 0x00, 0xe0, 0x00, 0x83, 0x19, - 0x1d, 0xe0, 0x20, 0x01, 0x01, 0x40, 0x20, 0x03, 0x01, 0x00, 0x78, 0x27, - 0x00, 0x20, 0x78, 0x43, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x78, 0x27, - 0x00, 0x48, 0x00, 0xfe, 0x00, 0x05, 0x78, 0x24, 0xd0, 0xac, 0x11, 0xc8, - 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x24, 0x20, 0x79, 0x00, 0x30, - 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x60, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x00, 0x11, 0x40, 0x00, 0x51, 0xd0, 0xbc, 0x01, 0x08, - 0x87, 0x38, 0x70, 0x03, 0x00, 0x03, 0x78, 0x03, 0x00, 0x19, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x78, 0x0c, 0xa0, 0x8c, 0x00, 0x70, 0x01, 0x78, - 0x20, 0x09, 0x00, 0x7a, 0x26, 0x0a, 0x20, 0x09, 0x00, 0x7b, 0x25, 0x0a, - 0xd0, 0xb4, 0x01, 0x08, 0x8a, 0x50, 0xd0, 0xac, 0x01, 0x08, 0x89, 0x48, - 0xd0, 0xa4, 0x01, 0x08, 0x8b, 0x58, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, - 0x02, 0x00, 0x78, 0x1c, 0xd0, 0x84, 0x01, 0x40, 0x20, 0xe1, 0x00, 0x07, - 0x20, 0xe1, 0x20, 0x00, 0x20, 0x01, 0x02, 0x0a, 0x20, 0x04, 0x0c, 0xa8, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x01, 0x00, 0x20, 0x01, - 0xb8, 0xc1, 0x20, 0x04, 0x70, 0xe2, 0x20, 0x09, 0xb6, 0x15, 0x21, 0x0c, - 0x71, 0x6e, 0x70, 0x63, 0x01, 0x00, 0x71, 0x66, 0x71, 0x9e, 0x70, 0x6b, - 0x00, 0x00, 0x70, 0x73, 0x08, 0x09, 0x70, 0x77, 0x00, 0x08, 0x70, 0x78, - 0xa0, 0x80, 0x01, 0x00, 0x70, 0x7a, 0x70, 0x80, 0x80, 0x00, 0x70, 0x82, - 0x70, 0x87, 0xaa, 0xaa, 0xa0, 0x06, 0x70, 0x8a, 0x70, 0x8e, 0x70, 0x7e, - 0x70, 0xd6, 0x70, 0xab, 0x00, 0x36, 0x70, 0xaf, 0x95, 0xd5, 0x70, 0x27, - 0x00, 0x80, 0x70, 0x14, 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, 0x00, 0x32, - 0x70, 0x16, 0x08, 0x0c, 0x37, 0x07, 0x08, 0x0c, 0x35, 0x62, 0x11, 0x10, - 0x84, 0x21, 0x00, 0x28, 0x70, 0x24, 0xd0, 0xbc, 0x0d, 0xb0, 0x70, 0x27, - 0x00, 0x80, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x24, 0x20, 0x79, - 0x00, 0x30, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x24, 0xd0, 0xb4, - 0x01, 0x20, 0x68, 0x3c, 0x78, 0x3e, 0x68, 0x38, 0x78, 0x3a, 0x00, 0xde, - 0x20, 0x11, 0x00, 0x11, 0x08, 0x0c, 0x36, 0xdf, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0x36, 0xdf, 0x00, 0xee, 0x00, 0xfe, 0x70, 0x17, 0x00, 0x00, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0xb9, 0x24, - 0x20, 0x79, 0x00, 0x30, 0x79, 0x04, 0xd1, 0xfc, 0x09, 0x04, 0x36, 0xdc, - 0x78, 0x03, 0x00, 0x02, 0xa0, 0x26, 0xd1, 0x9c, 0x19, 0x04, 0x36, 0xd8, - 0x70, 0x00, 0x00, 0x02, 0x36, 0xdc, 0x36, 0x9a, 0x36, 0xbe, 0x36, 0xd8, - 0xd1, 0xbc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x50, 0x80, 0x01, 0x70, 0x02, - 0x20, 0x11, 0x00, 0x01, 0x04, 0xe1, 0x05, 0xc0, 0x04, 0xd1, 0x04, 0xb0, - 0x78, 0x0f, 0x00, 0x00, 0x78, 0x20, 0x79, 0x24, 0x78, 0x03, 0x00, 0x04, - 0x78, 0x22, 0x79, 0x26, 0x20, 0x01, 0x02, 0x01, 0x20, 0x0c, 0x81, 0xff, - 0x0d, 0xe8, 0x08, 0x0c, 0x36, 0x06, 0x20, 0x09, 0x00, 0x01, 0x78, 0x08, - 0xd0, 0xec, 0x01, 0x10, 0x20, 0x09, 0x00, 0x11, 0x79, 0x02, 0x00, 0xf0, - 0x80, 0x01, 0x70, 0x02, 0xa1, 0x84, 0x08, 0x80, 0x11, 0x38, 0x78, 0x04, - 0xd0, 0xfc, 0x19, 0x40, 0x20, 0x11, 0x00, 0x01, 0x00, 0xb1, 0x00, 0x90, - 0x60, 0x30, 0xa0, 0x92, 0x00, 0x04, 0xa0, 0x86, 0x00, 0x09, 0x11, 0x20, - 0x60, 0x00, 0x60, 0x1a, 0x20, 0x11, 0x00, 0x25, 0x62, 0x32, 0xd1, 0xdc, - 0x19, 0x88, 0x08, 0x70, 0x78, 0x03, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x24, 0xa0, 0x05, 0x05, 0x20, - 0x80, 0x01, 0x60, 0x26, 0x60, 0x18, 0x61, 0x30, 0xa1, 0x40, 0x28, 0x04, - 0x78, 0x32, 0x88, 0x40, 0x28, 0x04, 0x78, 0x36, 0x88, 0x40, 0x28, 0x04, - 0x78, 0x22, 0x88, 0x40, 0x28, 0x04, 0x78, 0x26, 0x88, 0x40, 0x7a, 0x02, - 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0x60, 0x18, 0xa8, 0x02, 0xa0, 0x8a, - 0x00, 0x29, 0x11, 0x38, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, - 0x60, 0x1a, 0x20, 0x01, 0x00, 0x0d, 0x60, 0x32, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x71, 0xb9, 0x4b, - 0x20, 0x79, 0x00, 0x20, 0x79, 0x04, 0xd1, 0xfc, 0x01, 0xf0, 0x78, 0x03, - 0x00, 0x02, 0x2d, 0x60, 0xa0, 0x26, 0x70, 0x00, 0x00, 0x02, 0x37, 0x2f, - 0x37, 0x1a, 0x37, 0x26, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x9c, 0x11, 0x88, - 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x36, 0xdf, 0x01, 0x60, 0x08, 0x0c, - 0x36, 0xdf, 0x00, 0x48, 0x80, 0x01, 0x70, 0x02, 0x78, 0x04, 0xd0, 0xfc, - 0x1d, 0x30, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x36, 0xdf, 0x00, 0xce, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x20, 0x61, 0x02, 0x00, 0x20, 0x01, 0xb8, 0xc1, 0x20, 0x04, 0x60, 0x1a, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x01, 0xb8, 0xc0, 0x20, 0x04, 0x60, 0xce, - 0x60, 0x04, 0xc0, 0xac, 0xa0, 0x85, 0x02, 0x00, 0x60, 0x06, 0x20, 0x01, - 0x00, 0x74, 0x20, 0x04, 0xa0, 0x05, 0x01, 0xf8, 0x20, 0x38, 0x20, 0x01, - 0x00, 0x76, 0x20, 0x24, 0x20, 0x01, 0x00, 0x77, 0x20, 0x1c, 0x08, 0x0c, - 0x3e, 0xbc, 0x68, 0x33, 0x00, 0x0d, 0x6f, 0x26, 0x2d, 0x00, 0x68, 0x1a, - 0xa7, 0x8a, 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, 0x20, 0x09, 0x00, 0x07, - 0x00, 0x10, 0x27, 0x08, 0xa0, 0x3e, 0x68, 0x18, 0xa0, 0x80, 0x00, 0x0d, - 0x04, 0xb1, 0x1d, 0x90, 0x2d, 0x00, 0x68, 0x1a, 0x00, 0x88, 0x08, 0x0c, - 0x3e, 0xbc, 0x68, 0x33, 0x00, 0x0d, 0x20, 0x70, 0x68, 0x27, 0x00, 0x01, - 0x2d, 0x00, 0x68, 0x1a, 0x20, 0x01, 0x00, 0x76, 0x20, 0x04, 0x20, 0x72, - 0x20, 0x01, 0x00, 0x77, 0x20, 0x04, 0x70, 0x06, 0x20, 0x61, 0x00, 0x20, - 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, 0xb8, 0xc0, 0x20, 0x04, 0x60, 0x12, - 0x20, 0xe1, 0x90, 0x40, 0x20, 0x01, 0x00, 0x72, 0x20, 0x04, 0xa0, 0x84, - 0xff, 0xf8, 0x70, 0x0a, 0x60, 0x1a, 0x00, 0x06, 0x20, 0x01, 0x00, 0x73, - 0x20, 0x04, 0x70, 0x0e, 0x60, 0x1e, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, - 0xa0, 0x06, 0x60, 0x3a, 0x60, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x10, 0x20, 0xa0, 0x20, 0x99, - 0x00, 0x14, 0x70, 0x03, 0x00, 0x26, 0x74, 0x32, 0x73, 0x36, 0xa0, 0x06, - 0x70, 0x3a, 0x70, 0x3e, 0x81, 0x0b, 0x81, 0x0b, 0x21, 0xa8, 0x81, 0x0b, - 0x71, 0x22, 0x70, 0x03, 0x00, 0x41, 0x70, 0x04, 0xd0, 0xfc, 0x0d, 0xe8, - 0x70, 0x03, 0x00, 0x02, 0x70, 0x03, 0x00, 0x40, 0x53, 0xa5, 0x74, 0x30, - 0x73, 0x34, 0x87, 0xff, 0x01, 0x80, 0x00, 0xc6, 0x00, 0xd6, 0x2d, 0x60, - 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x60, 0x18, 0x20, 0x70, - 0x2d, 0x00, 0x70, 0x06, 0x60, 0x1a, 0x00, 0xde, 0x00, 0xce, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x01, 0x00, 0x75, - 0x20, 0x04, 0xa0, 0x05, 0x05, 0x08, 0x20, 0x38, 0x20, 0x01, 0x00, 0x78, - 0x20, 0x24, 0x20, 0x01, 0x00, 0x79, 0x20, 0x1c, 0x08, 0x0c, 0x3e, 0xbc, - 0x2d, 0x60, 0x68, 0x33, 0x00, 0x0d, 0x6f, 0x26, 0x2d, 0x00, 0x68, 0x1a, - 0xa7, 0x8a, 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, 0x20, 0x09, 0x00, 0x07, - 0x00, 0x10, 0x27, 0x08, 0xa0, 0x3e, 0x68, 0x18, 0xa0, 0x80, 0x00, 0x0d, - 0x08, 0x0c, 0x37, 0x9d, 0x1d, 0x88, 0x2d, 0x00, 0x68, 0x1a, 0x00, 0xe0, - 0x08, 0x0c, 0x3e, 0xbc, 0x2d, 0x60, 0x60, 0x33, 0x00, 0x0d, 0x20, 0x70, - 0x60, 0x27, 0x00, 0x01, 0x2c, 0x00, 0x60, 0x1a, 0x20, 0x01, 0x00, 0x78, - 0x20, 0x04, 0x20, 0x72, 0x20, 0x01, 0x00, 0x79, 0x20, 0x04, 0x70, 0x06, - 0x20, 0x01, 0x00, 0x72, 0x20, 0x04, 0xa0, 0x84, 0xff, 0xf8, 0x70, 0x0a, - 0x20, 0x01, 0x00, 0x73, 0x20, 0x04, 0x70, 0x0e, 0x20, 0x01, 0x00, 0x30, - 0x20, 0x03, 0x00, 0x04, 0x78, 0x24, 0xd0, 0xac, 0x11, 0x78, 0x20, 0x01, - 0x01, 0x01, 0x20, 0x0c, 0xc1, 0xed, 0x21, 0x02, 0x60, 0x27, 0x00, 0x00, - 0x20, 0x01, 0xb9, 0x24, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, 0x00, 0x30, - 0x20, 0x03, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x08, 0x04, 0x2f, 0xdf, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x12, 0x20, 0x01, - 0xb6, 0x40, 0x20, 0xa0, 0xa0, 0x06, 0x40, 0xa4, 0x01, 0x2e, 0x08, 0x04, - 0x2f, 0xdf, 0x7d, 0x38, 0x7c, 0x3c, 0x08, 0x04, 0x30, 0x86, 0x08, 0x0c, - 0x3e, 0xbc, 0x09, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x10, - 0x08, 0x0c, 0x4c, 0x52, 0x20, 0x09, 0x00, 0x1c, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xfd, 0x70, 0x1b, 0x38, 0x51, - 0x00, 0x05, 0xad, 0xe8, 0x00, 0x0d, 0x68, 0x00, 0xa0, 0x05, 0x09, 0x04, - 0x30, 0x07, 0x68, 0x04, 0xd0, 0xac, 0x01, 0x18, 0xd0, 0xa4, 0x09, 0x04, - 0x30, 0x07, 0xd0, 0x94, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, - 0x01, 0x38, 0x62, 0x00, 0xa2, 0x92, 0x00, 0x05, 0x02, 0x18, 0xa1, 0x8c, - 0xff, 0xdf, 0x00, 0x10, 0xa1, 0x8d, 0x00, 0x20, 0x61, 0x06, 0x00, 0xce, - 0xd0, 0x8c, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0x01, 0x18, - 0xa1, 0x8d, 0x00, 0x10, 0x00, 0x10, 0xa1, 0x8c, 0xff, 0xef, 0x61, 0x06, - 0x00, 0xce, 0x20, 0x09, 0x01, 0x00, 0x21, 0x0c, 0xa1, 0x8a, 0x00, 0x02, - 0x02, 0x68, 0xd0, 0x84, 0x01, 0x58, 0x6a, 0x28, 0xa2, 0x8a, 0x00, 0x7f, - 0x1a, 0x04, 0x30, 0x07, 0xa2, 0x88, 0x2d, 0xf9, 0x21, 0x0d, 0xa1, 0x8c, - 0x00, 0xff, 0x61, 0x5a, 0xd0, 0xdc, 0x01, 0x30, 0x68, 0x28, 0xa0, 0x8a, - 0x00, 0x7f, 0x1a, 0x04, 0x30, 0x07, 0x60, 0x52, 0x68, 0x08, 0xa0, 0x8a, - 0x01, 0x00, 0x0a, 0x04, 0x30, 0x07, 0xa0, 0x8a, 0x08, 0x41, 0x1a, 0x04, - 0x30, 0x07, 0xa0, 0x84, 0x00, 0x07, 0x19, 0x04, 0x30, 0x07, 0x68, 0x0c, - 0xa0, 0x05, 0x09, 0x04, 0x30, 0x07, 0x68, 0x10, 0xa0, 0x05, 0x09, 0x04, - 0x30, 0x07, 0x68, 0x48, 0x69, 0x40, 0xa1, 0x0a, 0x1a, 0x04, 0x30, 0x07, - 0x80, 0x01, 0x09, 0x04, 0x30, 0x07, 0x68, 0x4c, 0x69, 0x44, 0xa1, 0x0a, - 0x1a, 0x04, 0x30, 0x07, 0x80, 0x01, 0x09, 0x04, 0x30, 0x07, 0x68, 0x04, - 0xd0, 0xfc, 0x05, 0x60, 0x08, 0x0c, 0x3e, 0xbc, 0x09, 0x04, 0x30, 0x04, - 0x20, 0x09, 0x00, 0x14, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, - 0xa2, 0x90, 0x00, 0x38, 0xa3, 0x99, 0x00, 0x00, 0x08, 0x0c, 0x3e, 0xfd, - 0x70, 0x1b, 0x38, 0xd1, 0x00, 0x05, 0xad, 0xe8, 0x00, 0x0d, 0x20, 0xa9, - 0x00, 0x14, 0x2d, 0x98, 0x20, 0x69, 0xb6, 0x6e, 0x2d, 0xa0, 0x53, 0xa3, - 0x70, 0x10, 0xa0, 0xe8, 0x00, 0x0d, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x0c, - 0xd1, 0xe4, 0x01, 0x40, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, - 0xa0, 0x85, 0x0b, 0x00, 0x60, 0x06, 0x00, 0xce, 0x20, 0x09, 0xb8, 0xb1, - 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0xb6, 0x74, 0x20, 0x04, 0xd0, 0xac, - 0x01, 0x58, 0x78, 0x24, 0x20, 0x0a, 0x20, 0x09, 0x01, 0x7f, 0x20, 0x0a, - 0x32, 0x00, 0xa0, 0x84, 0x00, 0x3f, 0xa0, 0x85, 0x30, 0x20, 0x20, 0x90, - 0x20, 0xa9, 0x00, 0x1c, 0x2d, 0x98, 0x20, 0x69, 0xb6, 0x52, 0x2d, 0xa0, - 0x53, 0xa3, 0x68, 0x14, 0xa0, 0x8c, 0x00, 0xff, 0x61, 0x42, 0x80, 0x07, - 0xa0, 0x84, 0x00, 0xff, 0x60, 0x46, 0x08, 0x0c, 0x5e, 0x17, 0x08, 0x0c, - 0x53, 0xde, 0x08, 0x0c, 0x54, 0x47, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, - 0x19, 0x04, 0x39, 0xcc, 0x68, 0x08, 0x60, 0x2a, 0x08, 0x0c, 0x24, 0xa5, - 0x00, 0x06, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x05, - 0x00, 0x0e, 0x02, 0x68, 0x20, 0x09, 0x01, 0x70, 0x20, 0x0b, 0x00, 0x80, - 0xe0, 0x00, 0xe0, 0x00, 0x20, 0x0b, 0x00, 0x00, 0x00, 0x36, 0x6b, 0x08, - 0x08, 0x0c, 0x28, 0xd7, 0x00, 0x3e, 0x68, 0x18, 0x69, 0x1c, 0x6a, 0x20, - 0x6b, 0x24, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, 0x60, 0x16, - 0x61, 0x1a, 0x62, 0x1e, 0x63, 0x22, 0x6c, 0x04, 0xd4, 0xf4, 0x01, 0x48, - 0x68, 0x30, 0x69, 0x34, 0x6a, 0x38, 0x6b, 0x3c, 0x80, 0x07, 0x81, 0x0f, - 0x82, 0x17, 0x83, 0x1f, 0x00, 0x10, 0xa0, 0x84, 0xf0, 0xff, 0x60, 0x06, - 0x61, 0x0a, 0x62, 0x0e, 0x63, 0x12, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, - 0x83, 0x1f, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xa1, 0xb8, 0xc7, 0x40, 0xa1, - 0x08, 0x0c, 0x6a, 0xda, 0x69, 0x04, 0xd1, 0xfc, 0x05, 0x20, 0x00, 0xc6, - 0x20, 0x09, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x01, 0x6b, 0x70, 0xd3, 0x84, - 0x01, 0xc8, 0x00, 0x20, 0x83, 0x9d, 0x12, 0xb0, 0x35, 0x08, 0x81, 0x09, - 0x08, 0x0c, 0x63, 0xce, 0x68, 0x78, 0x60, 0x16, 0x68, 0x74, 0x20, 0x08, - 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0x60, 0x0a, 0xa1, 0x84, 0x00, 0xff, - 0x60, 0x06, 0x81, 0x08, 0x11, 0x18, 0x60, 0x03, 0x00, 0x03, 0x00, 0x10, - 0x60, 0x03, 0x00, 0x01, 0x1f, 0x04, 0x39, 0x66, 0x00, 0xce, 0x20, 0x69, - 0xb6, 0x52, 0x20, 0x01, 0xb8, 0x9e, 0x6a, 0x80, 0xa2, 0x94, 0x00, 0x30, - 0xa2, 0x8e, 0x00, 0x00, 0x01, 0x70, 0xa2, 0x8e, 0x00, 0x10, 0x01, 0x18, - 0xa2, 0x8e, 0x00, 0x20, 0x01, 0x40, 0x20, 0x03, 0xaa, 0xaa, 0x08, 0x0c, - 0x29, 0x20, 0x20, 0x01, 0xb8, 0x8f, 0x21, 0x02, 0x00, 0x08, 0x21, 0x02, - 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, - 0x00, 0x00, 0x00, 0xce, 0x08, 0x0c, 0x5b, 0x41, 0x01, 0x28, 0x08, 0x0c, - 0x41, 0x16, 0x01, 0x10, 0x08, 0x0c, 0x28, 0x9c, 0x60, 0xc8, 0xa0, 0x05, - 0x01, 0xd0, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x39, 0xb2, 0x00, 0xe0, - 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x78, 0x20, 0x11, 0x5a, 0x14, 0x08, 0x0c, - 0x6a, 0x0e, 0x20, 0x11, 0x5a, 0x07, 0x08, 0x0c, 0x6a, 0xce, 0x20, 0x01, - 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x5a, 0x79, 0x00, 0x40, - 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0x28, 0x60, 0x03, 0x00, 0x04, 0x20, 0x09, - 0x39, 0xcc, 0x00, 0x10, 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x01, 0x01, 0x00, - 0x20, 0x04, 0xa0, 0x82, 0x00, 0x05, 0x02, 0x58, 0x20, 0x01, 0x01, 0x70, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x4c, 0x11, 0x18, - 0x20, 0x91, 0x30, 0x9d, 0x08, 0x17, 0x20, 0x91, 0x30, 0x1d, 0x08, 0x17, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x09, 0x04, 0x30, 0x04, 0x20, 0x69, - 0xb6, 0x52, 0x78, 0x30, 0x68, 0x42, 0x78, 0x34, 0x68, 0x46, 0x68, 0x04, - 0xd0, 0xfc, 0x01, 0x18, 0x20, 0x09, 0x00, 0x30, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x1c, 0x2d, 0x00, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, - 0x08, 0x04, 0x3f, 0x00, 0xa0, 0x06, 0x08, 0x0c, 0x28, 0x9c, 0x81, 0xff, - 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x78, 0x20, 0x01, - 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, - 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x5b, 0x85, 0x08, 0x0c, - 0x5a, 0x79, 0x00, 0x80, 0x00, 0x16, 0x20, 0x09, 0xff, 0xff, 0x81, 0x09, - 0x01, 0x30, 0x20, 0x01, 0xb8, 0xe2, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x00, - 0x1d, 0xc0, 0x00, 0x1e, 0x08, 0x0c, 0x4c, 0x52, 0x08, 0x0c, 0x4b, 0x7b, - 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0x10, 0x08, 0x04, 0x30, 0x04, 0x61, 0x88, 0x81, 0xff, - 0x01, 0x98, 0x70, 0x3f, 0x00, 0x00, 0x20, 0x01, 0xbd, 0xc0, 0x20, 0x09, - 0x00, 0x40, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x3f, 0x00, 0x70, 0x1b, 0x2f, 0xdd, - 0x01, 0x2e, 0x00, 0x05, 0x70, 0x3f, 0x00, 0x01, 0x00, 0xd6, 0x20, 0x69, - 0xbd, 0xc0, 0x20, 0xa9, 0x00, 0x40, 0x20, 0xa1, 0xbd, 0xc0, 0x20, 0x19, - 0xff, 0xff, 0x43, 0xa4, 0x65, 0x50, 0xa5, 0x88, 0x2d, 0xf9, 0x21, 0x0d, - 0xa1, 0x8c, 0x00, 0xff, 0x21, 0x6a, 0xa0, 0x0e, 0x20, 0x11, 0x00, 0x02, - 0x21, 0x00, 0xa5, 0x06, 0x01, 0xa8, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x90, - 0x60, 0x14, 0x82, 0x1c, 0x02, 0x38, 0xa3, 0x98, 0xbd, 0xc0, 0xa0, 0x85, - 0xff, 0x00, 0x80, 0x07, 0x20, 0x1a, 0x00, 0x38, 0xa3, 0x98, 0xbd, 0xc0, - 0x23, 0x24, 0xa4, 0xa4, 0xff, 0x00, 0xa4, 0x05, 0x20, 0x1a, 0x82, 0x10, - 0x81, 0x08, 0xa1, 0x82, 0x00, 0x80, 0x12, 0x08, 0x0c, 0x18, 0x82, 0x01, - 0x80, 0x07, 0x2d, 0x0c, 0xa1, 0x05, 0x20, 0x6a, 0x00, 0xde, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0xa1, 0xbd, 0xc0, 0x20, 0x99, 0xbd, 0xc0, 0x08, 0x0c, - 0x4b, 0xf1, 0x08, 0x04, 0x3a, 0x33, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, - 0x30, 0x07, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x20, 0x01, 0xb6, 0x53, - 0x20, 0x04, 0xd0, 0xb4, 0x05, 0x50, 0x78, 0x24, 0xa0, 0x84, 0xff, 0x00, - 0xa0, 0x8e, 0x7e, 0x00, 0x05, 0x20, 0xa0, 0x8e, 0x7f, 0x00, 0x05, 0x08, - 0xa0, 0x8e, 0x80, 0x00, 0x01, 0xf0, 0x60, 0x00, 0xd0, 0x8c, 0x11, 0xd8, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x11, 0xa8, - 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x08, 0x0c, - 0x9e, 0x96, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x30, 0x04, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3a, 0xbf, 0x00, 0x05, 0x08, 0x0c, - 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x20, 0xa9, 0x00, 0x2b, 0x2c, 0x98, - 0xad, 0xe8, 0x00, 0x02, 0x2d, 0xa0, 0x53, 0xa3, 0x20, 0xa9, 0x00, 0x04, - 0xac, 0x80, 0x00, 0x06, 0x20, 0x98, 0xad, 0x80, 0x00, 0x06, 0x20, 0xa0, - 0x08, 0x0c, 0x4b, 0xf1, 0x20, 0xa9, 0x00, 0x04, 0xac, 0x80, 0x00, 0x0a, - 0x20, 0x98, 0xad, 0x80, 0x00, 0x0a, 0x20, 0xa0, 0x08, 0x0c, 0x4b, 0xf1, - 0x2d, 0x00, 0x20, 0x09, 0x00, 0x2b, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x08, 0x04, 0x3f, 0x00, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, - 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x51, 0xf8, - 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x78, 0x28, - 0xa0, 0x8a, 0x10, 0x00, 0x1a, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x3e, 0xe1, - 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x52, 0x5b, 0x09, 0x04, 0x30, 0x04, - 0x20, 0x19, 0x00, 0x04, 0xa0, 0x0e, 0x08, 0x0c, 0x52, 0x0a, 0x79, 0x24, - 0x81, 0x0f, 0x7a, 0x28, 0x00, 0x11, 0x08, 0x04, 0x2f, 0xdf, 0xa1, 0x86, - 0x00, 0xff, 0x01, 0x10, 0x00, 0x71, 0x00, 0x60, 0x20, 0x29, 0x00, 0x7e, - 0x20, 0x61, 0xb6, 0x00, 0x64, 0x50, 0x24, 0x00, 0xa5, 0x06, 0x01, 0x10, - 0x25, 0x08, 0x00, 0x19, 0x85, 0x29, 0x1e, 0xc8, 0x00, 0x05, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x38, 0x22, 0x00, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0xa1, 0x08, 0x08, 0x0c, 0x6a, 0x1a, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, - 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, - 0x50, 0xe1, 0x09, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x52, 0x01, 0x08, 0x04, - 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xd1, - 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x50, 0xe1, 0x09, 0x04, 0x30, 0x04, - 0x08, 0x0c, 0x51, 0xef, 0x08, 0x04, 0x2f, 0xdf, 0x61, 0x00, 0x08, 0x04, - 0x2f, 0xdf, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x19, 0x04, 0x30, 0x04, - 0x00, 0xd6, 0xac, 0xe8, 0x00, 0x0a, 0x79, 0x24, 0xd1, 0x84, 0x01, 0x10, - 0xac, 0xe8, 0x00, 0x06, 0x68, 0x0c, 0x80, 0x07, 0x78, 0x3e, 0x68, 0x08, - 0x80, 0x07, 0x78, 0x3a, 0x6b, 0x04, 0x83, 0x1f, 0x6a, 0x00, 0x82, 0x17, - 0x00, 0xde, 0x61, 0x00, 0xa1, 0x8c, 0x02, 0x00, 0x08, 0x04, 0x2f, 0xdf, - 0x78, 0x24, 0xa0, 0x9c, 0x00, 0x03, 0xd0, 0xb4, 0x11, 0x60, 0xa3, 0x9a, - 0x00, 0x03, 0x1a, 0x04, 0x30, 0x04, 0x62, 0x50, 0xa2, 0x94, 0x00, 0xff, - 0xa0, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa2, 0x06, 0x11, 0x50, 0x20, 0x01, - 0xb6, 0x40, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x08, 0x04, 0x3f, 0x00, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, - 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x19, 0x04, 0x30, 0x04, 0x00, 0xc6, - 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x09, 0x04, 0x30, 0x04, 0x68, 0x37, - 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x08, 0x0c, 0x9e, 0x42, - 0x09, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3b, 0xab, - 0x00, 0x05, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x09, 0x04, 0x30, 0x04, - 0xad, 0x80, 0x00, 0x0e, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x04, 0x3f, 0x00, 0xa0, 0x06, 0x08, 0x0c, - 0x28, 0x9c, 0x78, 0x24, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0xff, - 0x01, 0x18, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x5b, 0x41, - 0x01, 0x10, 0x08, 0x0c, 0x4c, 0x52, 0x78, 0x28, 0xa0, 0x8a, 0x10, 0x00, - 0x1a, 0x04, 0x30, 0x07, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0xa1, 0x86, 0x00, 0xff, 0x01, 0x38, 0xa1, 0x82, 0x00, 0x7f, 0x1a, 0x04, - 0x30, 0x07, 0x21, 0x00, 0x08, 0x0c, 0x28, 0x66, 0x00, 0x26, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, 0xb8, 0xf4, 0x60, 0x1b, - 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x78, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x03, 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x5b, 0x85, - 0x08, 0x0c, 0x5a, 0x79, 0x04, 0x40, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, - 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, - 0x7f, 0xe0, 0x00, 0x36, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, - 0x00, 0x3e, 0x20, 0x61, 0x01, 0x00, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x81, 0x0f, 0xa1, 0x05, 0x60, 0x4a, 0x60, 0x43, - 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, 0xb8, 0xbf, 0x20, 0x0b, - 0x00, 0x00, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, 0x4b, 0xb4, 0x08, 0x0c, - 0x6a, 0x94, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0x10, 0x20, 0x09, 0x00, 0xff, 0x7a, 0x28, 0x08, 0x0c, - 0x3b, 0x0d, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x2e, 0x08, 0x04, 0x2f, 0xdf, - 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x00, 0xc6, 0x08, 0x0c, - 0x4f, 0xbf, 0x2c, 0x08, 0x00, 0xce, 0x19, 0x04, 0x30, 0x07, 0x08, 0x04, - 0x2f, 0xdf, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, - 0x30, 0x04, 0x60, 0xd4, 0xd0, 0xac, 0x11, 0x30, 0xd0, 0x9c, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x05, 0x08, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xbc, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x79, 0x24, - 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xfd, - 0x70, 0x1b, 0x3c, 0x61, 0x00, 0x05, 0x20, 0x09, 0x00, 0x80, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x30, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x06, 0x01, 0x20, 0x20, 0x21, 0x40, 0x0a, 0x08, 0x04, 0x2f, 0xe1, - 0x00, 0xd6, 0xad, 0xe8, 0x00, 0x0d, 0x69, 0x00, 0x6a, 0x08, 0x6b, 0x0c, - 0x6c, 0x10, 0x6d, 0x14, 0x6e, 0x18, 0x68, 0x20, 0xa0, 0xbe, 0x01, 0x00, - 0x09, 0x04, 0x3c, 0xd8, 0xa0, 0xbe, 0x01, 0x12, 0x09, 0x04, 0x3c, 0xd8, - 0xa0, 0xbe, 0x01, 0x13, 0x09, 0x04, 0x3c, 0xd8, 0xa0, 0xbe, 0x01, 0x14, - 0x09, 0x04, 0x3c, 0xd8, 0xa0, 0xbe, 0x01, 0x17, 0x09, 0x04, 0x3c, 0xd8, - 0xa0, 0xbe, 0x01, 0x1a, 0x09, 0x04, 0x3c, 0xd8, 0xa0, 0xbe, 0x01, 0x1c, - 0x09, 0x04, 0x3c, 0xd8, 0xa0, 0xbe, 0x01, 0x21, 0x05, 0xb0, 0xa0, 0xbe, - 0x01, 0x31, 0x05, 0x98, 0xa0, 0xbe, 0x01, 0x71, 0x05, 0xc8, 0xa0, 0xbe, - 0x01, 0x73, 0x05, 0xb0, 0xa0, 0xbe, 0x01, 0xa1, 0x11, 0x20, 0x68, 0x30, - 0x80, 0x07, 0x68, 0x32, 0x04, 0xa8, 0xa0, 0xbe, 0x02, 0x12, 0x05, 0x40, - 0xa0, 0xbe, 0x02, 0x13, 0x05, 0x28, 0xa0, 0xbe, 0x02, 0x14, 0x01, 0xb0, - 0xa0, 0xbe, 0x02, 0x17, 0x01, 0x68, 0xa0, 0xbe, 0x02, 0x1a, 0x11, 0x20, - 0x68, 0x38, 0x80, 0x07, 0x68, 0x3a, 0x00, 0xe0, 0xa0, 0xbe, 0x03, 0x00, - 0x01, 0xc8, 0x00, 0xde, 0x08, 0x04, 0x30, 0x07, 0xad, 0x80, 0x00, 0x10, - 0x20, 0xa9, 0x00, 0x07, 0x08, 0x0c, 0x3d, 0x1e, 0xad, 0x80, 0x00, 0x0e, - 0x20, 0xa9, 0x00, 0x01, 0x08, 0x0c, 0x3d, 0x1e, 0x00, 0x48, 0xad, 0x80, - 0x00, 0x0c, 0x08, 0x0c, 0x3d, 0x2c, 0x00, 0x50, 0xad, 0x80, 0x00, 0x0e, - 0x08, 0x0c, 0x3d, 0x2c, 0xad, 0x80, 0x00, 0x0c, 0x20, 0xa9, 0x00, 0x01, - 0x08, 0x0c, 0x3d, 0x1e, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x05, 0x68, - 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x68, 0x37, 0x01, 0x19, 0x68, 0x53, - 0x00, 0x00, 0x68, 0x4f, 0x00, 0x20, 0x68, 0x5b, 0x00, 0x01, 0x81, 0x0b, - 0x69, 0x7e, 0x68, 0x83, 0x00, 0x00, 0x6a, 0x86, 0x6b, 0x8a, 0x6c, 0x8e, - 0x6d, 0x92, 0x69, 0x96, 0x68, 0x9b, 0x00, 0x00, 0x00, 0xce, 0x00, 0xde, - 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x68, 0x23, - 0x00, 0x00, 0x68, 0x04, 0x20, 0x68, 0x08, 0x0c, 0x9e, 0x5e, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x3d, 0x15, 0x00, 0x05, 0x00, 0xce, 0x00, 0xde, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x68, 0x20, 0xa0, 0x86, 0x80, 0x01, - 0x19, 0x04, 0x2f, 0xdf, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x30, 0x04, - 0x00, 0x16, 0x20, 0x08, 0x20, 0x44, 0x80, 0x00, 0x20, 0x4c, 0x80, 0x00, - 0x29, 0x0a, 0x81, 0x08, 0x28, 0x0a, 0x81, 0x08, 0x1f, 0x04, 0x3d, 0x20, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xa6, 0x00, 0xb6, 0x20, 0x08, - 0x20, 0x44, 0x80, 0x00, 0x20, 0x4c, 0x80, 0x00, 0x20, 0x54, 0x80, 0x00, - 0x20, 0x5c, 0x2b, 0x0a, 0x81, 0x08, 0x2a, 0x0a, 0x81, 0x08, 0x29, 0x0a, - 0x81, 0x08, 0x28, 0x0a, 0x00, 0xbe, 0x00, 0xae, 0x00, 0x1e, 0x00, 0x05, - 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x30, 0x04, - 0x60, 0xd4, 0xd0, 0xac, 0x11, 0x30, 0xd0, 0x9c, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x05, 0x08, 0x04, 0x30, 0x04, 0x79, 0x24, 0x21, 0x40, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x60, 0xd4, 0xd0, 0xac, 0x11, 0x20, 0xa1, 0x82, - 0x00, 0x80, 0x0a, 0x04, 0x30, 0x07, 0xa1, 0x82, 0x00, 0xff, 0x1a, 0x04, - 0x30, 0x07, 0x7a, 0x2c, 0x7b, 0x28, 0x60, 0x70, 0xa3, 0x06, 0x11, 0x40, - 0x60, 0x74, 0xa2, 0x4e, 0x09, 0x04, 0x30, 0x07, 0xa9, 0xcc, 0xff, 0x00, - 0x09, 0x04, 0x30, 0x07, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, - 0x08, 0x0c, 0x3e, 0x0c, 0x2c, 0x68, 0x00, 0xce, 0x05, 0x38, 0xa0, 0xc6, - 0x40, 0x00, 0x11, 0x78, 0x00, 0xc6, 0x00, 0x06, 0x2d, 0x60, 0xa0, 0x0e, - 0x08, 0x0c, 0x52, 0xbc, 0x11, 0x08, 0xc1, 0x85, 0x60, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x88, 0xa0, 0xc6, - 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, 0x00, 0x60, 0xa0, 0xc6, 0x40, 0x08, - 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, 0x00, 0x30, 0xa0, 0xc6, 0x40, 0x09, - 0x11, 0x08, 0x00, 0x10, 0x20, 0x01, 0x40, 0x06, 0x20, 0x20, 0x01, 0x2e, - 0x08, 0x04, 0x2f, 0xe1, 0x2d, 0x00, 0x70, 0x22, 0x00, 0x16, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0xe6, 0x2c, 0x70, 0x08, 0x0c, 0x86, 0x4e, 0x05, 0xc0, - 0x2d, 0x00, 0x60, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x2e, 0x58, 0x00, 0xee, - 0x00, 0xe6, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x2b, 0x70, - 0x11, 0x58, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xee, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x1e, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, - 0x68, 0x37, 0x00, 0x00, 0x68, 0x3b, 0x00, 0x00, 0x2d, 0x00, 0x60, 0x12, - 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0xd8, 0x8c, 0x01, 0x08, - 0xc0, 0xf5, 0x68, 0x3a, 0x08, 0x0c, 0x2c, 0xd1, 0x60, 0x1f, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x4f, 0x6f, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0x86, 0xd3, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, - 0x01, 0x2e, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x30, 0x04, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3d, 0xef, 0x00, 0x05, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x70, 0x20, 0x20, 0x60, 0x11, 0x38, 0x20, 0x09, - 0x00, 0x04, 0x62, 0x04, 0xa2, 0x94, 0x00, 0xff, 0x08, 0x04, 0x30, 0x04, - 0x20, 0x09, 0x00, 0x00, 0x68, 0x38, 0xd0, 0xf4, 0x19, 0x04, 0x2f, 0xdf, - 0x08, 0x0c, 0x52, 0xbc, 0x11, 0x08, 0xc1, 0x85, 0x60, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, 0x2f, 0xdf, 0x00, 0xe6, 0x00, 0xd6, - 0xa0, 0x2e, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x01, 0x30, - 0xa0, 0x26, 0x20, 0xa9, 0x00, 0xff, 0x20, 0x71, 0xb7, 0x35, 0x00, 0x30, - 0x20, 0x21, 0x00, 0x80, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x71, 0xb7, 0xb5, - 0x2e, 0x04, 0xa0, 0x05, 0x11, 0x30, 0x21, 0x00, 0xa4, 0x06, 0x15, 0x70, - 0x24, 0x28, 0xc5, 0xfd, 0x04, 0x58, 0x20, 0x68, 0x6f, 0x10, 0x27, 0x00, - 0xa3, 0x06, 0x11, 0xb0, 0x6e, 0x14, 0x26, 0x00, 0xa2, 0x06, 0x11, 0x90, - 0x24, 0x00, 0xa1, 0x06, 0x11, 0x60, 0x2d, 0x60, 0xd8, 0x84, 0x05, 0x68, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x15, 0x38, - 0x20, 0x01, 0x40, 0x00, 0x04, 0x28, 0x20, 0x01, 0x40, 0x07, 0x04, 0x10, - 0x24, 0x00, 0xa1, 0x06, 0x11, 0x68, 0x6e, 0x14, 0x87, 0xff, 0x11, 0x38, - 0x86, 0xff, 0x09, 0xd0, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, - 0x19, 0xa8, 0x20, 0x01, 0x40, 0x08, 0x00, 0x90, 0x84, 0x20, 0x8e, 0x70, - 0x1f, 0x04, 0x3e, 0x20, 0x85, 0xff, 0x11, 0x30, 0x20, 0x01, 0x40, 0x09, - 0x00, 0x48, 0x20, 0x01, 0x00, 0x01, 0x00, 0x30, 0x08, 0x0c, 0x4f, 0xbf, - 0x1d, 0xd0, 0x63, 0x12, 0x62, 0x16, 0xa0, 0x06, 0xa0, 0x05, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, - 0x3e, 0xbc, 0x09, 0x04, 0x30, 0x04, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x78, 0x24, 0xa0, 0x05, 0x09, 0x04, 0x30, 0x07, - 0xa0, 0x96, 0x00, 0xff, 0x01, 0x20, 0xa0, 0x92, 0x00, 0x04, 0x1a, 0x04, - 0x30, 0x07, 0x20, 0x10, 0x2d, 0x18, 0x08, 0x0c, 0x2c, 0x84, 0x09, 0x04, - 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x3e, 0x8c, 0x00, 0x05, - 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, 0x09, 0x04, 0x30, 0x04, 0x08, 0x04, - 0x2f, 0xdf, 0x79, 0x24, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x60, 0xd4, - 0xd0, 0xac, 0x11, 0x20, 0xa1, 0x82, 0x00, 0x80, 0x0a, 0x04, 0x30, 0x07, - 0xa1, 0x82, 0x00, 0xff, 0x1a, 0x04, 0x30, 0x07, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x9d, 0x46, 0x11, 0x88, 0xa1, 0x90, 0xb7, 0x35, - 0x22, 0x04, 0xa0, 0x65, 0x01, 0x60, 0x08, 0x0c, 0x4c, 0x7e, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x01, 0x10, 0x60, 0x17, 0x00, 0x00, - 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0x01, 0x2e, 0x08, 0x04, 0x30, 0x04, - 0x08, 0x0c, 0x15, 0xfd, 0x01, 0x88, 0xa0, 0x06, 0x68, 0x02, 0x70, 0x10, - 0xa0, 0x05, 0x11, 0x20, 0x2d, 0x00, 0x70, 0x12, 0x70, 0x16, 0x00, 0x30, - 0x70, 0x14, 0x68, 0x02, 0x20, 0x60, 0x2d, 0x00, 0x60, 0x06, 0x70, 0x16, - 0xad, 0x80, 0x00, 0x0d, 0x00, 0x05, 0x79, 0x24, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x30, 0x7e, 0x28, 0xa6, 0x84, - 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, 0x02, 0x08, 0xa0, 0x66, 0x8c, 0xff, - 0x00, 0x05, 0x7e, 0x24, 0x86, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x28, 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x82, 0x40, 0x00, - 0x02, 0x08, 0xa0, 0x66, 0x8c, 0xff, 0x00, 0x05, 0x00, 0x16, 0x71, 0x10, - 0x81, 0xff, 0x01, 0x28, 0x21, 0x68, 0x69, 0x04, 0x08, 0x0c, 0x16, 0x14, - 0x0c, 0xc8, 0x71, 0x12, 0x71, 0x16, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x31, - 0x00, 0x01, 0x00, 0x10, 0x20, 0x31, 0x00, 0x00, 0x20, 0x61, 0xb6, 0xd2, - 0x66, 0x06, 0x61, 0x12, 0x60, 0x0e, 0x62, 0x26, 0x63, 0x2a, 0x64, 0x2e, - 0x65, 0x32, 0x2c, 0x10, 0x08, 0x0c, 0x16, 0x48, 0x70, 0x07, 0x00, 0x02, - 0x70, 0x1b, 0x2f, 0xdf, 0x00, 0x05, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x79, 0x00, 0x00, 0x20, 0x01, 0xb6, 0x90, 0x20, 0x04, - 0xa0, 0x05, 0x11, 0x68, 0x0e, 0x04, 0x3f, 0x2b, 0x78, 0x18, 0xd0, 0x84, - 0x11, 0x40, 0x7a, 0x22, 0x7b, 0x26, 0x7c, 0x2a, 0x78, 0x1b, 0x00, 0x01, - 0x20, 0x91, 0x40, 0x80, 0x04, 0x08, 0x00, 0x16, 0x00, 0xc6, 0x00, 0xe6, - 0x20, 0x71, 0xb6, 0x82, 0x71, 0x38, 0xa1, 0x82, 0x00, 0x10, 0x02, 0x18, - 0x70, 0x30, 0x20, 0x60, 0x00, 0x78, 0x70, 0x30, 0xa0, 0xe0, 0x00, 0x04, - 0xac, 0x82, 0xb6, 0xd2, 0x02, 0x10, 0x20, 0x61, 0xb6, 0x92, 0x2c, 0x00, - 0x70, 0x32, 0x81, 0xff, 0x11, 0x08, 0x70, 0x36, 0x81, 0x08, 0x71, 0x3a, - 0x22, 0x62, 0x63, 0x06, 0x64, 0x0a, 0x00, 0xee, 0x00, 0xce, 0x00, 0x1e, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x82, - 0x70, 0x38, 0xa0, 0x05, 0x05, 0x70, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x0e, 0x04, 0x3f, 0x82, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x00, 0x78, 0x18, - 0xd0, 0x84, 0x15, 0x08, 0x00, 0xc6, 0x70, 0x34, 0x20, 0x60, 0x2c, 0x04, - 0x78, 0x22, 0x60, 0x04, 0x78, 0x26, 0x60, 0x08, 0x78, 0x2a, 0x78, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x70, 0x38, 0x80, 0x01, 0x70, 0x3a, - 0xa0, 0x05, 0x11, 0x30, 0x70, 0x33, 0xb6, 0x92, 0x70, 0x37, 0xb6, 0x92, - 0x00, 0xce, 0x00, 0x48, 0xac, 0x80, 0x00, 0x04, 0xa0, 0xfa, 0xb6, 0xd2, - 0x02, 0x10, 0x20, 0x01, 0xb6, 0x92, 0x70, 0x36, 0x00, 0xce, 0x00, 0xfe, - 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x26, 0x20, 0x01, 0xb6, 0x53, - 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x20, 0x20, 0x11, 0x80, 0x14, 0x08, 0x0c, - 0x3f, 0x13, 0x00, 0x2e, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x30, 0xc0, 0x8d, 0xc0, 0x85, - 0xc0, 0xac, 0x60, 0x32, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x78, 0x20, 0x01, - 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, - 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x5b, 0x85, 0x08, 0x0c, - 0x5a, 0x79, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, 0x01, 0x2e, 0x08, 0x04, - 0x2f, 0xdf, 0x78, 0x24, 0x20, 0x08, 0xa1, 0x8c, 0xff, 0xfd, 0x11, 0x28, - 0x61, 0xe0, 0xa1, 0x0d, 0x61, 0xe2, 0x08, 0x04, 0x2f, 0xdf, 0x08, 0x04, - 0x30, 0x07, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x03, 0x19, 0x04, 0x30, 0x04, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, - 0xd0, 0xac, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, - 0x30, 0x07, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, - 0x11, 0x20, 0x78, 0x28, 0xa0, 0x05, 0x09, 0x04, 0x2f, 0xdf, 0x00, 0xc6, - 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x09, 0x04, 0x30, 0x04, 0x68, 0x37, - 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, - 0x08, 0x0c, 0x9f, 0x27, 0x09, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x3f, 0xf1, 0x00, 0x05, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, - 0x09, 0x04, 0x30, 0x04, 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x19, 0x04, 0x30, 0x04, 0x7f, 0x24, - 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xbc, - 0x09, 0x04, 0x30, 0x04, 0x20, 0x09, 0x00, 0x00, 0x20, 0x31, 0x00, 0x00, - 0x70, 0x23, 0x00, 0x00, 0x70, 0x2f, 0x00, 0x00, 0xad, 0x80, 0x00, 0x05, - 0x70, 0x26, 0x20, 0xa0, 0x08, 0x0c, 0x50, 0x1b, 0x19, 0x04, 0x40, 0x6b, - 0x60, 0x04, 0xa0, 0xc4, 0x00, 0xff, 0xa8, 0xc6, 0x00, 0x06, 0x01, 0x30, - 0xa0, 0xc4, 0xff, 0x00, 0xa8, 0xc6, 0x06, 0x00, 0x19, 0x04, 0x40, 0x6b, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x28, 0x08, 0x0c, - 0x52, 0xbc, 0x11, 0x10, 0xd7, 0x9c, 0x05, 0xe8, 0xd7, 0x94, 0x11, 0x10, - 0xd7, 0x84, 0x01, 0x58, 0xac, 0x80, 0x00, 0x06, 0x20, 0x98, 0x34, 0x00, - 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x08, 0x0c, 0x3d, 0x2c, 0xd7, 0x94, - 0x01, 0x48, 0xac, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, - 0x00, 0x04, 0x53, 0xa3, 0x08, 0x0c, 0x3d, 0x2c, 0x21, 0xa2, 0xd7, 0x94, - 0x01, 0xd8, 0xac, 0x80, 0x00, 0x00, 0x20, 0x98, 0x94, 0xa0, 0x20, 0xa9, - 0x00, 0x02, 0x53, 0xa3, 0xac, 0x80, 0x00, 0x03, 0x20, 0xa6, 0x94, 0xa0, - 0xac, 0x80, 0x00, 0x04, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x02, - 0x53, 0xa3, 0x08, 0x0c, 0x3d, 0x1e, 0xac, 0x80, 0x00, 0x26, 0x20, 0x98, - 0x20, 0xa9, 0x00, 0x02, 0x53, 0xa3, 0x00, 0x08, 0x94, 0xa0, 0xd7, 0x94, - 0x01, 0x10, 0xa6, 0xb0, 0x00, 0x0b, 0xa6, 0xb0, 0x00, 0x05, 0x81, 0x08, - 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x01, 0x18, 0xa1, 0x86, - 0x01, 0x00, 0x00, 0x40, 0xd7, 0x8c, 0x01, 0x20, 0xa1, 0x86, 0x01, 0x00, - 0x01, 0x70, 0x00, 0x18, 0xa1, 0x86, 0x00, 0x7e, 0x01, 0x50, 0xd7, 0x94, - 0x01, 0x18, 0xa6, 0x86, 0x00, 0x20, 0x00, 0x10, 0xa6, 0x86, 0x00, 0x28, - 0x01, 0x50, 0x08, 0x04, 0x40, 0x14, 0x86, 0xff, 0x11, 0x20, 0x71, 0x20, - 0x81, 0x0b, 0x08, 0x04, 0x2f, 0xdf, 0x70, 0x2f, 0x00, 0x01, 0x71, 0x1e, - 0x70, 0x20, 0xa6, 0x00, 0x70, 0x22, 0x77, 0x2a, 0x20, 0x61, 0xb6, 0xd2, - 0x60, 0x07, 0x00, 0x00, 0x66, 0x12, 0x70, 0x24, 0x60, 0x0e, 0x62, 0x26, - 0x63, 0x2a, 0x64, 0x2e, 0x65, 0x32, 0x2c, 0x10, 0x08, 0x0c, 0x16, 0x48, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1b, 0x40, 0xa7, 0x00, 0x05, 0x70, 0x2c, - 0xa0, 0x05, 0x11, 0x70, 0x71, 0x1c, 0x70, 0x24, 0x20, 0xa0, 0x77, 0x28, - 0x20, 0x31, 0x00, 0x00, 0x20, 0x61, 0xb6, 0xd2, 0x62, 0x24, 0x63, 0x28, - 0x64, 0x2c, 0x65, 0x30, 0x08, 0x04, 0x40, 0x14, 0x71, 0x20, 0x81, 0x0b, - 0x08, 0x04, 0x2f, 0xdf, 0x20, 0x29, 0x00, 0x7e, 0x79, 0x24, 0x7a, 0x28, - 0x7b, 0x2c, 0x7c, 0x38, 0xa1, 0x84, 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, - 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, - 0xa1, 0x84, 0x00, 0xff, 0xa0, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, - 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, 0xa2, 0x84, 0xff, 0x00, 0x80, 0x07, - 0xa0, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, 0xa5, 0x02, 0x0a, 0x04, - 0x30, 0x07, 0xa2, 0x84, 0x00, 0xff, 0xa0, 0xe2, 0x00, 0x20, 0x0a, 0x04, - 0x30, 0x07, 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, 0xa3, 0x84, 0xff, 0x00, - 0x80, 0x07, 0xa0, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, 0xa5, 0x02, - 0x0a, 0x04, 0x30, 0x07, 0xa3, 0x84, 0x00, 0xff, 0xa0, 0xe2, 0x00, 0x20, - 0x0a, 0x04, 0x30, 0x07, 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, 0xa4, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, - 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, 0xa4, 0x84, 0x00, 0xff, 0xa0, 0xe2, - 0x00, 0x20, 0x0a, 0x04, 0x30, 0x07, 0xa5, 0x02, 0x0a, 0x04, 0x30, 0x07, - 0x20, 0x61, 0xb8, 0xb9, 0x61, 0x02, 0x62, 0x06, 0x63, 0x0a, 0x64, 0x0e, - 0x08, 0x04, 0x2f, 0xdf, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, - 0xd0, 0xcc, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x72, - 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x0e, 0x00, 0x05, 0x61, 0x68, 0x7a, 0x24, - 0x63, 0x00, 0x82, 0xff, 0x11, 0x18, 0x79, 0x26, 0x08, 0x04, 0x2f, 0xdf, - 0x83, 0xff, 0x19, 0x04, 0x30, 0x07, 0x20, 0x01, 0xff, 0xf0, 0xa2, 0x00, - 0x1a, 0x04, 0x30, 0x07, 0x20, 0x19, 0xff, 0xff, 0x60, 0x6c, 0xa3, 0x02, - 0xa2, 0x00, 0x0a, 0x04, 0x30, 0x07, 0x79, 0x26, 0x62, 0x6a, 0x08, 0x04, - 0x2f, 0xdf, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, - 0x19, 0x04, 0x30, 0x04, 0x7c, 0x28, 0x7d, 0x24, 0x7e, 0x38, 0x7f, 0x2c, - 0x08, 0x0c, 0x3e, 0xbc, 0x09, 0x04, 0x30, 0x04, 0x20, 0x09, 0x00, 0x00, - 0x20, 0x19, 0x00, 0x00, 0x70, 0x23, 0x00, 0x00, 0x70, 0x2f, 0x00, 0x00, - 0xad, 0x80, 0x00, 0x03, 0x70, 0x26, 0x20, 0xa0, 0xa1, 0xe0, 0xb7, 0x35, - 0x2c, 0x64, 0x8c, 0xff, 0x01, 0xb8, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x01, 0x30, 0x60, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0xa0, 0x86, 0x06, 0x00, 0x11, 0x58, 0x60, 0x14, 0x20, 0xa2, 0x94, 0xa0, - 0x60, 0x10, 0x80, 0x07, 0xa1, 0x05, 0x80, 0x07, 0x20, 0xa2, 0x94, 0xa0, - 0xa3, 0x98, 0x00, 0x02, 0x81, 0x08, 0xa1, 0x82, 0x00, 0xff, 0x01, 0x20, - 0xa3, 0x86, 0x00, 0x2a, 0x01, 0x48, 0x08, 0xe0, 0x83, 0xff, 0x11, 0x20, - 0x71, 0x20, 0x81, 0x0c, 0x08, 0x04, 0x2f, 0xdf, 0x70, 0x2f, 0x00, 0x01, - 0x71, 0x1e, 0x70, 0x20, 0xa3, 0x00, 0x70, 0x22, 0x20, 0x61, 0xb6, 0xd2, - 0x60, 0x07, 0x00, 0x00, 0x63, 0x12, 0x70, 0x24, 0x60, 0x0e, 0x64, 0x26, - 0x65, 0x2a, 0x66, 0x2e, 0x67, 0x32, 0x2c, 0x10, 0x08, 0x0c, 0x16, 0x48, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1b, 0x41, 0x9d, 0x00, 0x05, 0x70, 0x2c, - 0xa0, 0x05, 0x11, 0x68, 0x71, 0x1c, 0x70, 0x24, 0x20, 0xa0, 0x20, 0x19, - 0x00, 0x00, 0x20, 0x61, 0xb6, 0xd2, 0x64, 0x24, 0x65, 0x28, 0x66, 0x2c, - 0x67, 0x30, 0x08, 0x04, 0x41, 0x5a, 0x71, 0x20, 0x81, 0x0c, 0x08, 0x04, - 0x2f, 0xdf, 0x81, 0xff, 0x19, 0x04, 0x30, 0x04, 0x60, 0xd4, 0xd0, 0xac, - 0x11, 0x18, 0xd0, 0x9c, 0x09, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xbc, - 0x09, 0x04, 0x30, 0x04, 0x79, 0x24, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xfd, 0x70, 0x1b, 0x41, 0xc8, 0x00, 0x05, - 0x00, 0xd6, 0xad, 0xe8, 0x00, 0x0d, 0x68, 0x28, 0xa0, 0xbe, 0x70, 0x00, - 0x01, 0x48, 0xa0, 0xbe, 0x71, 0x00, 0x01, 0x30, 0xa0, 0xbe, 0x72, 0x00, - 0x01, 0x18, 0x00, 0xde, 0x08, 0x04, 0x30, 0x07, 0x68, 0x20, 0x69, 0x24, - 0x08, 0x0c, 0x28, 0x52, 0x15, 0x10, 0x08, 0x0c, 0x4f, 0xbf, 0x11, 0xf8, - 0x71, 0x22, 0x66, 0x12, 0x65, 0x16, 0x6e, 0x18, 0x00, 0xc6, 0x08, 0x0c, - 0x3e, 0xbc, 0x01, 0xb8, 0x08, 0x0c, 0x3e, 0xbc, 0x01, 0xa0, 0x00, 0xce, - 0x00, 0xde, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, - 0x68, 0x23, 0x00, 0x00, 0x68, 0x04, 0x20, 0x68, 0x08, 0x0c, 0x9e, 0x7a, - 0x09, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x42, 0x02, - 0x00, 0x05, 0x00, 0xde, 0x08, 0x04, 0x30, 0x04, 0x71, 0x20, 0x08, 0x0c, - 0x2d, 0xcc, 0x68, 0x20, 0xa0, 0x86, 0x80, 0x01, 0x09, 0x04, 0x30, 0x04, - 0x2d, 0x00, 0x70, 0x1e, 0x68, 0x04, 0xa0, 0x80, 0x00, 0x02, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x2a, 0x20, 0x98, 0x20, 0xa0, 0x08, 0x0c, 0x4b, 0xf1, - 0x00, 0x0e, 0xad, 0xe8, 0x00, 0x0d, 0x6a, 0x08, 0x6b, 0x0c, 0x6c, 0x10, - 0x6d, 0x14, 0x20, 0x61, 0xb6, 0xd2, 0x60, 0x07, 0x00, 0x00, 0x6e, 0x00, - 0x6f, 0x28, 0xa7, 0xc6, 0x70, 0x00, 0x11, 0x08, 0x00, 0x18, 0xa7, 0xc6, - 0x71, 0x00, 0x11, 0x40, 0xa6, 0xc2, 0x00, 0x04, 0x0a, 0x04, 0x30, 0x07, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x3f, 0x00, 0xa7, 0xc6, 0x72, 0x00, - 0x19, 0x04, 0x30, 0x07, 0xa6, 0xc2, 0x00, 0x54, 0x0a, 0x04, 0x30, 0x07, - 0x60, 0x0e, 0x60, 0x13, 0x00, 0x2a, 0x62, 0x26, 0x63, 0x2a, 0x64, 0x2e, - 0x65, 0x32, 0x2c, 0x10, 0x08, 0x0c, 0x16, 0x48, 0x70, 0x07, 0x00, 0x02, - 0x70, 0x1b, 0x42, 0x49, 0x00, 0x05, 0x70, 0x1c, 0x20, 0x68, 0x68, 0x04, - 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x02, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x2a, 0x20, 0x98, 0x20, 0xa0, 0x08, 0x0c, 0x4b, 0xf1, - 0x00, 0x0e, 0x20, 0x09, 0x00, 0x2a, 0x20, 0x61, 0xb6, 0xd2, 0x62, 0x24, - 0x63, 0x28, 0x64, 0x2c, 0x65, 0x30, 0x08, 0x04, 0x3f, 0x00, 0x81, 0xff, - 0x19, 0x04, 0x30, 0x04, 0x79, 0x2c, 0x20, 0x01, 0xb8, 0xa0, 0x21, 0x02, - 0x08, 0x0c, 0x3e, 0xd1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x0c, 0x50, 0xe1, - 0x09, 0x04, 0x30, 0x04, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x52, 0x13, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, 0x78, 0x24, 0xd0, 0x8c, - 0x11, 0x18, 0xd0, 0x84, 0x09, 0x04, 0x3a, 0x87, 0x08, 0x0c, 0x3e, 0xe1, - 0x09, 0x04, 0x30, 0x07, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x01, 0x28, 0xa0, 0x8e, - 0x00, 0x04, 0x01, 0x10, 0xa0, 0x8e, 0x00, 0x05, 0x15, 0xb8, 0x78, 0x24, - 0xd0, 0x8c, 0x01, 0x20, 0x60, 0x00, 0xc0, 0x8c, 0x60, 0x02, 0x00, 0x30, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xb4, 0x09, 0x04, 0x3a, 0xc3, - 0x78, 0x24, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x8e, 0x7e, 0x00, 0x09, 0x04, - 0x3a, 0xc3, 0xa0, 0x8e, 0x7f, 0x00, 0x09, 0x04, 0x3a, 0xc3, 0xa0, 0x8e, - 0x80, 0x00, 0x09, 0x04, 0x3a, 0xc3, 0x60, 0x00, 0xd0, 0x8c, 0x19, 0x04, - 0x3a, 0xc3, 0x68, 0x37, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, - 0x08, 0x0c, 0x9e, 0x96, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, - 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x42, 0xca, 0x00, 0x05, - 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x04, 0x3a, 0xc3, - 0x20, 0x09, 0xb6, 0x31, 0x21, 0x0c, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x30, 0x04, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x03, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, - 0x30, 0x04, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x08, 0x08, 0x04, 0x30, 0x04, 0x60, 0x9c, 0xd0, 0xa4, - 0x11, 0x18, 0xd0, 0xac, 0x19, 0x04, 0x3a, 0xc3, 0x68, 0x37, 0x00, 0x00, - 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x08, 0x0c, - 0x9f, 0x27, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x30, 0x04, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x43, 0x05, 0x00, 0x05, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, - 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, 0x08, 0x04, - 0x42, 0x99, 0x81, 0xff, 0x20, 0x09, 0x00, 0x01, 0x19, 0x04, 0x30, 0x04, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, - 0x30, 0x04, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x20, 0x09, - 0x00, 0x08, 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, - 0x30, 0x07, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x09, 0x19, 0x04, 0x30, 0x04, 0x00, 0xc6, 0x08, 0x0c, - 0x3e, 0xbc, 0x00, 0xce, 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, 0x30, 0x04, - 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, 0xc0, 0xfd, - 0x68, 0x3a, 0x79, 0x28, 0xa1, 0x94, 0xff, 0x00, 0xa1, 0x8c, 0x00, 0xff, - 0xa0, 0x06, 0x82, 0xff, 0x11, 0x28, 0xc0, 0xed, 0x69, 0x52, 0x79, 0x2c, - 0x69, 0x56, 0x00, 0x48, 0xa2, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x30, 0x07, - 0xc0, 0xe5, 0x68, 0x53, 0x00, 0x00, 0x68, 0x57, 0x00, 0x00, 0x68, 0x3e, - 0x08, 0x0c, 0xa0, 0xe4, 0x20, 0x09, 0x00, 0x03, 0x09, 0x04, 0x30, 0x04, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x43, 0x65, 0x00, 0x05, 0x68, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x20, 0x09, 0x00, 0x04, 0x09, 0x04, 0x30, 0x04, - 0x08, 0x04, 0x2f, 0xdf, 0x81, 0xff, 0x20, 0x09, 0x00, 0x01, 0x19, 0x04, - 0x30, 0x04, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x20, 0x09, 0x00, 0x07, - 0x19, 0x04, 0x30, 0x04, 0x08, 0x0c, 0x3e, 0xe1, 0x09, 0x04, 0x30, 0x07, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x20, 0x09, - 0x00, 0x09, 0x19, 0x04, 0x30, 0x04, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, - 0x00, 0xce, 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, 0x30, 0x04, 0xad, 0x80, - 0x00, 0x0f, 0x20, 0x09, 0x00, 0x08, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xfd, 0x70, 0x1b, 0x43, 0x9c, 0x00, 0x05, - 0x00, 0xd6, 0xad, 0xe8, 0x00, 0x0f, 0x68, 0x00, 0xa0, 0x86, 0x05, 0x00, - 0x11, 0x40, 0x68, 0x04, 0xa0, 0x05, 0x11, 0x28, 0x68, 0x08, 0xa0, 0x84, - 0xff, 0x00, 0x11, 0x08, 0x00, 0x18, 0x00, 0xde, 0x19, 0x04, 0x30, 0x07, - 0x00, 0xde, 0x68, 0x37, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x38, - 0xc0, 0xfd, 0x68, 0x3a, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xe1, 0x11, 0x18, - 0x00, 0xce, 0x08, 0x04, 0x30, 0x07, 0x08, 0x0c, 0xa1, 0x33, 0x20, 0x09, - 0x00, 0x03, 0x00, 0xce, 0x09, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1b, 0x43, 0xc9, 0x00, 0x05, 0x68, 0x30, 0xa0, 0x86, 0x01, 0x00, - 0x20, 0x09, 0x00, 0x04, 0x09, 0x04, 0x30, 0x04, 0x08, 0x04, 0x2f, 0xdf, - 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x30, 0x04, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, - 0x08, 0x04, 0x30, 0x04, 0x7e, 0x24, 0x86, 0x0f, 0xa1, 0x8c, 0x00, 0xff, - 0xa6, 0xb4, 0x00, 0xff, 0x08, 0x0c, 0x50, 0x1b, 0x19, 0x04, 0x30, 0x07, - 0xa1, 0x86, 0x00, 0x7f, 0x01, 0x50, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x06, 0x01, 0x20, 0x20, 0x09, 0x00, 0x09, 0x08, 0x04, - 0x30, 0x04, 0x00, 0xc6, 0x08, 0x0c, 0x3e, 0xbc, 0x00, 0xce, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x68, 0x37, 0x00, 0x00, - 0x68, 0x38, 0xc0, 0xfd, 0x68, 0x3a, 0x20, 0x01, 0x01, 0x00, 0x80, 0x07, - 0x68, 0x0a, 0x08, 0x0c, 0x9e, 0xb1, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x04, 0x30, 0x04, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1b, 0x44, 0x15, - 0x00, 0x05, 0x68, 0x08, 0x80, 0x07, 0xa0, 0x86, 0x01, 0x00, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x30, 0x04, 0x68, 0xb0, 0x68, 0x36, - 0x68, 0x10, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x0c, 0x68, 0x14, - 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x04, 0xa0, 0x80, 0x00, 0x02, - 0xa1, 0x08, 0xad, 0x80, 0x00, 0x04, 0x7a, 0x2c, 0x7b, 0x28, 0x7c, 0x3c, - 0x7d, 0x38, 0x08, 0x04, 0x3f, 0x00, 0x08, 0x0c, 0x3e, 0xbc, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x79, 0x24, 0xa1, 0x94, - 0xff, 0x00, 0xa1, 0x8c, 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, 0x01, 0x10, - 0x08, 0x04, 0x30, 0x07, 0x20, 0x09, 0x00, 0x1a, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x0c, 0x3e, 0xfd, 0x70, 0x1b, 0x44, 0x51, - 0x00, 0x05, 0x20, 0x01, 0xb6, 0x2a, 0x20, 0x03, 0x00, 0x01, 0xad, 0x80, - 0x00, 0x0d, 0x20, 0x98, 0x20, 0xa9, 0x00, 0x1a, 0x20, 0xa1, 0xb8, 0xc7, - 0x53, 0xa3, 0x08, 0x04, 0x2f, 0xdf, 0x08, 0x0c, 0x3e, 0xbc, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x30, 0x04, 0x79, 0x24, 0xa1, 0x94, - 0xff, 0x00, 0xa1, 0x8c, 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, 0x01, 0x10, - 0x08, 0x04, 0x30, 0x07, 0x20, 0x99, 0xb8, 0xc7, 0x20, 0xa0, 0x20, 0xa9, - 0x00, 0x1a, 0x53, 0xa3, 0x20, 0x09, 0x00, 0x1a, 0x7a, 0x2c, 0x7b, 0x28, - 0x7c, 0x3c, 0x7d, 0x38, 0x08, 0x04, 0x3f, 0x00, 0x78, 0x24, 0xa0, 0x8a, - 0x10, 0x00, 0x1a, 0x04, 0x30, 0x07, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, 0x00, 0xc6, 0x20, 0x61, - 0xb8, 0xf4, 0x61, 0x42, 0x00, 0xce, 0x01, 0x2e, 0x08, 0x04, 0x2f, 0xdf, - 0x00, 0xc6, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x88, 0x20, 0x01, 0xb8, 0x9f, - 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, - 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x5b, 0x85, 0x08, 0x0c, 0x5a, 0x79, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x38, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x30, - 0xc0, 0x9d, 0x60, 0x32, 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xce, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xf4, - 0x79, 0x24, 0x61, 0x52, 0x61, 0x4e, 0x60, 0x57, 0x00, 0x00, 0x60, 0x4b, - 0x00, 0x09, 0x78, 0x38, 0x60, 0x6a, 0x78, 0x3c, 0x60, 0x66, 0x78, 0x28, - 0x60, 0x62, 0x78, 0x2c, 0x60, 0x5e, 0x20, 0x61, 0xb8, 0xa1, 0x20, 0x01, - 0xb9, 0x09, 0x60, 0x0e, 0x60, 0x13, 0x00, 0x01, 0x60, 0x17, 0x00, 0x02, - 0x60, 0x07, 0x00, 0x00, 0x60, 0x37, 0x00, 0x00, 0x00, 0xce, 0x01, 0x2e, - 0x08, 0x04, 0x2f, 0xdf, 0x01, 0x26, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0xb6, 0x00, 0x60, 0x44, 0xd0, 0xa4, 0x11, 0xb0, - 0xd0, 0x84, 0x01, 0x18, 0x08, 0x0c, 0x46, 0x4d, 0x00, 0x68, 0xd0, 0x8c, - 0x01, 0x18, 0x08, 0x0c, 0x45, 0x6e, 0x00, 0x40, 0xd0, 0x94, 0x01, 0x18, - 0x08, 0x0c, 0x45, 0x3f, 0x00, 0x18, 0xd0, 0x9c, 0x01, 0x08, 0x00, 0x61, - 0x00, 0xee, 0x00, 0xce, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x16, 0x61, 0x28, - 0xd1, 0x9c, 0x11, 0x10, 0xc1, 0x9d, 0x61, 0x2a, 0x00, 0x1e, 0x0c, 0xa0, - 0x62, 0x4c, 0xa2, 0x86, 0xf0, 0xf0, 0x11, 0x50, 0x60, 0x48, 0xa0, 0x86, - 0xf0, 0xf0, 0x01, 0x30, 0x62, 0x4a, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, - 0x00, 0x10, 0x04, 0x90, 0xa2, 0x94, 0xff, 0x00, 0xa2, 0x96, 0xf7, 0x00, - 0x01, 0x78, 0x71, 0x34, 0xd1, 0xa4, 0x11, 0x60, 0x62, 0x40, 0xa2, 0x95, - 0x01, 0x00, 0x62, 0x42, 0xa2, 0x94, 0x00, 0x10, 0x01, 0x28, 0x20, 0x09, - 0x00, 0xf7, 0x08, 0x0c, 0x4c, 0x11, 0x00, 0xf0, 0x60, 0x40, 0xa0, 0x84, - 0x00, 0x10, 0xa0, 0x85, 0x01, 0x40, 0x60, 0x42, 0x60, 0x43, 0x00, 0x00, - 0x70, 0x7b, 0x00, 0x00, 0x70, 0x97, 0x00, 0x01, 0x70, 0xbb, 0x00, 0x00, - 0x70, 0xd7, 0x00, 0x00, 0x20, 0x09, 0xbd, 0xc0, 0x20, 0x0b, 0x00, 0x00, - 0x70, 0x8b, 0x00, 0x00, 0x70, 0x7f, 0x00, 0x0a, 0x20, 0x09, 0x00, 0x0a, - 0x20, 0x11, 0x4b, 0x1c, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x05, 0x01, 0x56, - 0x20, 0x01, 0xb6, 0x74, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x10, 0x70, 0x53, - 0xff, 0xff, 0x70, 0x7c, 0xa0, 0x05, 0x15, 0x10, 0x20, 0x11, 0x4b, 0x1c, - 0x08, 0x0c, 0x6a, 0x0e, 0x60, 0x40, 0xa0, 0x94, 0x00, 0x10, 0xa2, 0x85, - 0x00, 0x20, 0x60, 0x42, 0x20, 0xa9, 0x00, 0xc8, 0x60, 0x44, 0xd0, 0x8c, - 0x11, 0x68, 0x1f, 0x04, 0x45, 0x56, 0x62, 0x42, 0x70, 0x8f, 0x00, 0x00, - 0x60, 0x40, 0xa0, 0x94, 0x00, 0x10, 0xa2, 0x85, 0x00, 0x80, 0x60, 0x42, - 0x62, 0x42, 0x00, 0x30, 0x62, 0x42, 0x70, 0x8f, 0x00, 0x00, 0x70, 0x83, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x5e, 0x00, 0x05, 0x70, 0x80, 0xa0, 0x8a, - 0x00, 0x03, 0x12, 0x10, 0x00, 0x23, 0x00, 0x10, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0x05, 0x45, 0x7a, 0x45, 0xca, 0x46, 0x4c, 0x00, 0xf6, 0x70, 0x83, - 0x00, 0x01, 0x20, 0xe1, 0xa0, 0x00, 0xe0, 0x00, 0x20, 0xe1, 0x87, 0x00, - 0x08, 0x0c, 0x24, 0xa5, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, - 0x20, 0x79, 0xbc, 0x00, 0x20, 0x7b, 0x22, 0x00, 0x78, 0x07, 0x00, 0xef, - 0x78, 0x0b, 0x00, 0x00, 0x78, 0x0f, 0x00, 0xef, 0x78, 0x13, 0x01, 0x38, - 0x78, 0x17, 0x00, 0x00, 0x78, 0x1b, 0x00, 0x00, 0x78, 0x1f, 0x00, 0x00, - 0x78, 0x23, 0xff, 0xff, 0x78, 0x27, 0xff, 0xff, 0x78, 0x2b, 0x00, 0x00, - 0x78, 0x2f, 0x00, 0x00, 0x20, 0x79, 0xbc, 0x0c, 0x20, 0x7b, 0x11, 0x01, - 0x78, 0x07, 0x00, 0x00, 0x20, 0x99, 0xb6, 0x05, 0x20, 0xa1, 0xbc, 0x0e, - 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x20, 0x79, 0xbc, 0x12, 0x20, 0x7b, - 0x00, 0x00, 0x78, 0x07, 0x00, 0x00, 0x20, 0x99, 0xbc, 0x00, 0x20, 0xa1, - 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x14, 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x0c, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0xfe, 0x70, 0x87, - 0x00, 0x00, 0x60, 0x43, 0x00, 0x08, 0x60, 0x43, 0x00, 0x00, 0x00, 0x05, - 0x00, 0xd6, 0x70, 0x84, 0x70, 0x87, 0x00, 0x00, 0xa0, 0x25, 0x09, 0x04, - 0x46, 0x34, 0x60, 0x20, 0xd0, 0xb4, 0x19, 0x04, 0x46, 0x32, 0x71, 0x94, - 0x81, 0xff, 0x09, 0x04, 0x46, 0x22, 0xa4, 0x86, 0x00, 0x0c, 0x19, 0x04, - 0x46, 0x2d, 0xa4, 0x80, 0x00, 0x18, 0x80, 0x04, 0x20, 0xa8, 0x20, 0x11, - 0xbc, 0x80, 0x20, 0x19, 0xbc, 0x00, 0x22, 0x0c, 0x23, 0x04, 0xa1, 0x06, - 0x11, 0xb8, 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, 0x45, 0xe5, 0x60, 0x43, - 0x00, 0x04, 0x60, 0x8b, 0xbc, 0x94, 0x60, 0x8f, 0xf0, 0xf0, 0x60, 0x43, - 0x00, 0x06, 0x70, 0x83, 0x00, 0x02, 0x70, 0x8f, 0x00, 0x02, 0x20, 0x09, - 0x07, 0xd0, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x94, 0x04, 0x90, - 0x20, 0x69, 0xbc, 0x80, 0x69, 0x30, 0xa1, 0x8e, 0x11, 0x01, 0x15, 0x38, - 0x68, 0x34, 0xa0, 0x05, 0x15, 0x20, 0x69, 0x00, 0xa1, 0x8c, 0x00, 0xff, - 0x11, 0x18, 0x68, 0x04, 0xa0, 0x05, 0x01, 0x90, 0x20, 0x11, 0xbc, 0x8e, - 0x20, 0x19, 0xb6, 0x05, 0x20, 0xa9, 0x00, 0x04, 0x22, 0x0c, 0x23, 0x04, - 0xa1, 0x02, 0x02, 0x30, 0x11, 0x90, 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, - 0x46, 0x16, 0x00, 0x68, 0x70, 0x97, 0x00, 0x00, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xbc, 0x80, 0x20, 0xa1, 0x02, 0x0b, - 0x20, 0xa9, 0x00, 0x14, 0x53, 0xa6, 0x60, 0x43, 0x00, 0x08, 0x60, 0x43, - 0x00, 0x00, 0x00, 0x10, 0x00, 0xde, 0x00, 0x05, 0x60, 0x40, 0xa0, 0x85, - 0x01, 0x00, 0x60, 0x42, 0x60, 0x20, 0xd0, 0xb4, 0x1d, 0xb8, 0x60, 0xc3, - 0x00, 0x0c, 0x20, 0x11, 0xb8, 0xeb, 0x20, 0x13, 0x00, 0x00, 0x70, 0x87, - 0x00, 0x00, 0x20, 0xe1, 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, - 0x95, 0x75, 0x08, 0x0c, 0x7d, 0xea, 0x0c, 0x30, 0x00, 0x05, 0x70, 0x8c, - 0xa0, 0x8a, 0x00, 0x1d, 0x12, 0x10, 0x00, 0x23, 0x00, 0x10, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0x05, 0x46, 0x80, 0x46, 0x8f, 0x46, 0xb7, 0x46, 0xd0, - 0x46, 0xf4, 0x47, 0x1c, 0x47, 0x40, 0x47, 0x71, 0x47, 0x95, 0x47, 0xbd, - 0x47, 0xf4, 0x48, 0x1c, 0x48, 0x38, 0x48, 0x4e, 0x48, 0x6e, 0x48, 0x81, - 0x48, 0x89, 0x48, 0xb9, 0x48, 0xdd, 0x49, 0x05, 0x49, 0x29, 0x49, 0x5a, - 0x49, 0x97, 0x49, 0xc6, 0x49, 0xe2, 0x4a, 0x21, 0x4a, 0x41, 0x4a, 0x5a, - 0x4a, 0x5b, 0x00, 0xc6, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x03, 0x00, 0x07, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, 0xa0, 0x84, 0xff, 0xf9, 0x60, 0x06, - 0x00, 0xce, 0x00, 0x05, 0x60, 0x8b, 0xbc, 0x94, 0x60, 0x8f, 0xf0, 0xf0, - 0x60, 0x43, 0x00, 0x02, 0x70, 0x8f, 0x00, 0x01, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x84, 0xa0, 0x86, 0x00, 0x14, 0x15, 0x08, 0x60, 0x43, 0x00, 0x00, - 0x60, 0x20, 0xd0, 0xb4, 0x11, 0xe0, 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, - 0xa2, 0x96, 0x11, 0x02, 0x11, 0xa0, 0x78, 0x34, 0xa0, 0x05, 0x11, 0x88, - 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, - 0x70, 0xbb, 0x00, 0x01, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, - 0x70, 0x8f, 0x00, 0x10, 0x08, 0x0c, 0x48, 0x89, 0x00, 0x10, 0x08, 0x0c, - 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x03, 0x60, 0x43, - 0x00, 0x04, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0x08, 0x0c, - 0x4b, 0xf9, 0x20, 0xa3, 0x11, 0x02, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x0a, 0x20, 0xa3, 0x00, 0x00, 0x1f, 0x04, 0x46, 0xc7, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, - 0xa0, 0x05, 0x01, 0xf0, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, - 0xa0, 0x86, 0x00, 0x14, 0x11, 0xa8, 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, - 0xa2, 0x96, 0x11, 0x02, 0x11, 0x78, 0x78, 0x34, 0xa0, 0x05, 0x11, 0x60, - 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, - 0x70, 0xbb, 0x00, 0x01, 0x70, 0x8f, 0x00, 0x04, 0x00, 0x29, 0x00, 0x10, - 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x05, - 0x08, 0x0c, 0x4b, 0xf9, 0x20, 0xa3, 0x11, 0x03, 0x20, 0xa3, 0x00, 0x00, - 0x34, 0x30, 0x20, 0x11, 0xbc, 0x8e, 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0x60, - 0x70, 0x78, 0xa0, 0x05, 0x11, 0x48, 0x71, 0x50, 0xa1, 0x86, 0xff, 0xff, - 0x01, 0x28, 0x08, 0x0c, 0x4a, 0xe7, 0x01, 0x10, 0x08, 0x0c, 0x4c, 0x28, - 0x20, 0xa9, 0x00, 0x08, 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, - 0x4b, 0x55, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xf0, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x14, - 0x11, 0xa8, 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x03, - 0x11, 0x78, 0x78, 0x34, 0xa0, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, - 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, - 0x70, 0x8f, 0x00, 0x06, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, - 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x07, 0x08, 0x0c, 0x4b, 0xf9, - 0x20, 0xa3, 0x11, 0x04, 0x20, 0xa3, 0x00, 0x00, 0x34, 0x30, 0x20, 0x11, - 0xbc, 0x8e, 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0xa8, 0x70, 0x78, 0xa0, 0x05, - 0x11, 0x90, 0x71, 0x58, 0xa1, 0x86, 0xff, 0xff, 0x01, 0x70, 0xa1, 0x80, - 0x2d, 0xf9, 0x20, 0x0d, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x08, 0x0c, - 0x4a, 0xe7, 0x01, 0x28, 0x08, 0x0c, 0x41, 0x1d, 0x01, 0x10, 0x08, 0x0c, - 0x28, 0x9c, 0x20, 0xa9, 0x00, 0x08, 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, - 0x01, 0xf0, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, - 0x00, 0x14, 0x11, 0xa8, 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, - 0x11, 0x04, 0x11, 0x78, 0x78, 0x34, 0xa0, 0x05, 0x11, 0x60, 0x7a, 0x38, - 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, - 0x00, 0x01, 0x70, 0x8f, 0x00, 0x08, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, - 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x09, 0x08, 0x0c, - 0x4b, 0xf9, 0x20, 0xa3, 0x11, 0x05, 0x20, 0xa3, 0x01, 0x00, 0x34, 0x30, - 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0x50, 0x70, 0x78, 0xa0, 0x05, 0x11, 0x38, - 0x08, 0x0c, 0x4a, 0x5c, 0x11, 0x70, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x28, 0x9c, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x99, 0xbc, 0x8e, 0x26, 0xa0, - 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x10, 0x08, 0x0c, 0x46, 0x73, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x05, 0x88, 0x20, 0x11, - 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x14, 0x15, 0x40, - 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x05, 0x15, 0x10, - 0x78, 0x34, 0x20, 0x11, 0x01, 0x00, 0xa2, 0x1e, 0x11, 0x60, 0x7a, 0x38, - 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, - 0x00, 0x01, 0x70, 0x8f, 0x00, 0x0a, 0x00, 0xb1, 0x00, 0x98, 0xa0, 0x05, - 0x11, 0x78, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, - 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, 0x70, 0x8b, 0x00, 0x00, 0x70, 0x8f, - 0x00, 0x0e, 0x08, 0x0c, 0x48, 0x6e, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, - 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x0b, 0x20, 0x11, 0xbc, 0x0e, - 0x22, 0xa0, 0x20, 0xa9, 0x00, 0x40, 0x20, 0x19, 0xff, 0xff, 0x43, 0xa4, - 0x20, 0xa9, 0x00, 0x02, 0x20, 0x09, 0x00, 0x00, 0x41, 0xa4, 0x08, 0x0c, - 0x4b, 0xf9, 0x20, 0xa3, 0x11, 0x06, 0x20, 0xa3, 0x00, 0x00, 0x08, 0x0c, - 0x4c, 0x4a, 0x01, 0x18, 0x20, 0x13, 0x00, 0x00, 0x00, 0x20, 0x70, 0x54, - 0xa0, 0x85, 0x01, 0x00, 0x20, 0x12, 0x22, 0x98, 0x20, 0xa9, 0x00, 0x42, - 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xb0, 0x20, 0x11, 0x4b, 0x23, - 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x84, 0x11, 0x68, 0x20, 0x79, - 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x06, 0x11, 0x38, 0x78, 0x34, - 0xa0, 0x05, 0x11, 0x20, 0x70, 0x8f, 0x00, 0x0c, 0x00, 0x29, 0x00, 0x10, - 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x0d, - 0x08, 0x0c, 0x4b, 0xf9, 0x20, 0xa3, 0x11, 0x07, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0x99, 0xbc, 0x8e, 0x20, 0xa9, 0x00, 0x40, 0x53, 0xa6, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, - 0x4b, 0x55, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xd0, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x84, - 0x11, 0x88, 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x07, - 0x11, 0x58, 0x78, 0x34, 0xa0, 0x05, 0x11, 0x40, 0x70, 0x8b, 0x00, 0x01, - 0x08, 0x0c, 0x4b, 0xeb, 0x70, 0x8f, 0x00, 0x0e, 0x00, 0x29, 0x00, 0x10, - 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x0f, - 0x70, 0x87, 0x00, 0x00, 0x60, 0x8b, 0xbc, 0x85, 0x60, 0x8f, 0xb5, 0xb5, - 0x60, 0x43, 0x00, 0x05, 0x60, 0x43, 0x00, 0x04, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x02, 0x00, 0x05, 0x70, 0x84, - 0xa0, 0x05, 0x01, 0x20, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, - 0x00, 0x05, 0x70, 0x8f, 0x00, 0x11, 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0xa0, - 0x71, 0x70, 0x81, 0xff, 0x01, 0x88, 0x20, 0x09, 0x00, 0x00, 0x70, 0x74, - 0xa0, 0x84, 0x00, 0xff, 0x08, 0x0c, 0x28, 0x52, 0xa1, 0x86, 0x00, 0x7e, - 0x01, 0x38, 0xa1, 0x86, 0x00, 0x80, 0x01, 0x20, 0x20, 0x11, 0xbc, 0x8e, - 0x08, 0x0c, 0x4a, 0xe7, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, - 0x20, 0x99, 0xbc, 0x80, 0x20, 0xa1, 0x02, 0x0b, 0x74, 0x84, 0xa4, 0x80, - 0x00, 0x18, 0xa0, 0x80, 0x00, 0x07, 0xa0, 0x84, 0x03, 0xf8, 0x80, 0x04, - 0x20, 0xa8, 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x4b, 0x55, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xf0, 0x20, 0x11, - 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x14, 0x11, 0xa8, - 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x03, 0x11, 0x78, - 0x78, 0x34, 0xa0, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, 0x70, 0x8f, - 0x00, 0x12, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, - 0x00, 0x05, 0x70, 0x8f, 0x00, 0x13, 0x08, 0x0c, 0x4c, 0x05, 0x20, 0xa3, - 0x11, 0x03, 0x20, 0xa3, 0x00, 0x00, 0x34, 0x30, 0x20, 0x11, 0xbc, 0x8e, - 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0x60, 0x70, 0x78, 0xa0, 0x05, 0x11, 0x48, - 0x71, 0x50, 0xa1, 0x86, 0xff, 0xff, 0x01, 0x28, 0x08, 0x0c, 0x4a, 0xe7, - 0x01, 0x10, 0x08, 0x0c, 0x4c, 0x28, 0x20, 0xa9, 0x00, 0x08, 0x22, 0x98, - 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x84, 0xa0, 0x05, 0x01, 0xf0, 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, - 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x14, 0x11, 0xa8, 0x20, 0x79, 0xbc, 0x80, - 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x04, 0x11, 0x78, 0x78, 0x34, 0xa0, 0x05, - 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, - 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, 0x70, 0x8f, 0x00, 0x14, 0x00, 0x29, - 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, - 0x00, 0x15, 0x08, 0x0c, 0x4c, 0x05, 0x20, 0xa3, 0x11, 0x04, 0x20, 0xa3, - 0x00, 0x00, 0x34, 0x30, 0x20, 0x11, 0xbc, 0x8e, 0x08, 0x0c, 0x4c, 0x4a, - 0x11, 0xa8, 0x70, 0x78, 0xa0, 0x05, 0x11, 0x90, 0x71, 0x58, 0xa1, 0x86, - 0xff, 0xff, 0x01, 0x70, 0xa1, 0x80, 0x2d, 0xf9, 0x20, 0x0d, 0xa1, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x08, 0x0c, 0x4a, 0xe7, 0x01, 0x28, 0x08, 0x0c, - 0x41, 0x1d, 0x01, 0x10, 0x08, 0x0c, 0x28, 0x9c, 0x20, 0xa9, 0x00, 0x08, - 0x22, 0x98, 0x26, 0xa0, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x05, 0xb8, 0x20, 0x11, 0x4b, 0x23, - 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x14, 0x15, 0x70, 0x20, 0x79, - 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x05, 0x15, 0x40, 0x78, 0x34, - 0x20, 0x11, 0x01, 0x00, 0xa2, 0x1e, 0x11, 0x48, 0x7a, 0x38, 0xd2, 0xfc, - 0x01, 0x28, 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, - 0x00, 0x60, 0xa0, 0x05, 0x11, 0xc0, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xb8, 0xa0, 0x05, 0x11, 0x10, 0x70, 0xbb, 0x00, 0x01, 0x70, 0x8b, - 0x00, 0x00, 0x7a, 0x38, 0xd2, 0xf4, 0x01, 0x38, 0x20, 0x01, 0xb6, 0x74, - 0x20, 0x04, 0xd0, 0xa4, 0x11, 0x10, 0x70, 0xd7, 0x00, 0x08, 0x70, 0x8f, - 0x00, 0x16, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, - 0xbc, 0x80, 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0e, 0x53, 0xa6, - 0x34, 0x30, 0x20, 0x11, 0xbc, 0x8e, 0x70, 0x8f, 0x00, 0x17, 0x08, 0x0c, - 0x4c, 0x4a, 0x11, 0x50, 0x70, 0x78, 0xa0, 0x05, 0x11, 0x38, 0x08, 0x0c, - 0x4a, 0x5c, 0x11, 0x70, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x28, 0x9c, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0x99, 0xbc, 0x8e, 0x26, 0xa0, 0x53, 0xa6, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x10, 0x08, 0x0c, 0x46, 0x73, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xb0, 0x20, 0x11, 0x4b, 0x23, - 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x84, 0x11, 0x68, 0x20, 0x79, - 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x06, 0x11, 0x38, 0x78, 0x34, - 0xa0, 0x05, 0x11, 0x20, 0x70, 0x8f, 0x00, 0x18, 0x00, 0x29, 0x00, 0x10, - 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x19, - 0x08, 0x0c, 0x4c, 0x05, 0x20, 0xa3, 0x11, 0x06, 0x20, 0xa3, 0x00, 0x00, - 0x34, 0x30, 0x20, 0x99, 0xbc, 0x8e, 0x20, 0x39, 0xbc, 0x0e, 0x27, 0xa0, - 0x20, 0xa9, 0x00, 0x40, 0x53, 0xa3, 0x08, 0x0c, 0x4c, 0x4a, 0x11, 0xe8, - 0x27, 0x28, 0x25, 0x14, 0x82, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x00, - 0x20, 0x18, 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, 0xa2, 0x05, 0x20, 0x2a, - 0x70, 0x54, 0x23, 0x10, 0x82, 0x14, 0xa2, 0xa0, 0xbc, 0x0e, 0x24, 0x14, - 0xa3, 0x8c, 0x00, 0x01, 0x01, 0x18, 0xa2, 0x94, 0xff, 0x00, 0x00, 0x18, - 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, 0xa2, 0x15, 0x22, 0x22, 0x27, 0x98, - 0x26, 0xa0, 0x20, 0xa9, 0x00, 0x40, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x4b, 0x55, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x84, 0xa0, 0x05, 0x01, 0xd0, 0x20, 0x11, - 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0xa0, 0x86, 0x00, 0x84, 0x11, 0x88, - 0x20, 0x79, 0xbc, 0x80, 0x7a, 0x30, 0xa2, 0x96, 0x11, 0x07, 0x11, 0x58, - 0x78, 0x34, 0xa0, 0x05, 0x11, 0x40, 0x70, 0x8b, 0x00, 0x01, 0x08, 0x0c, - 0x4b, 0xeb, 0x70, 0x8f, 0x00, 0x1a, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, - 0x4b, 0x7b, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x8f, 0x00, 0x1b, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xbc, 0x80, 0x20, 0xa1, - 0x02, 0x0b, 0x74, 0x84, 0xa4, 0x80, 0x00, 0x18, 0xa0, 0x80, 0x00, 0x07, - 0xa0, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x53, 0xa6, 0x60, 0xc3, - 0x00, 0x84, 0x08, 0x0c, 0x4b, 0x55, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x86, 0x00, 0x96, 0x20, 0x29, 0xb6, 0x53, 0x25, 0x2c, 0x20, 0xa9, - 0x00, 0x08, 0x20, 0x41, 0xbc, 0x0e, 0x28, 0xa0, 0x20, 0x99, 0xbc, 0x8e, - 0x53, 0xa3, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x11, 0x00, 0x07, 0xd5, 0xd4, - 0x01, 0x10, 0x20, 0x11, 0x00, 0x00, 0x28, 0x00, 0xa2, 0x00, 0x20, 0x0c, - 0xa1, 0xa6, 0xff, 0xff, 0x11, 0x48, 0xd5, 0xd4, 0x01, 0x10, 0x82, 0x10, - 0x00, 0x08, 0x82, 0x11, 0x1f, 0x04, 0x4a, 0x71, 0x08, 0x04, 0x4a, 0xdf, - 0x82, 0xff, 0x11, 0x60, 0xd5, 0xd4, 0x01, 0x20, 0xa1, 0xa6, 0x3f, 0xff, - 0x0d, 0x90, 0x00, 0x20, 0xa1, 0xa6, 0x3f, 0xff, 0x09, 0x04, 0x4a, 0xdf, - 0xa1, 0x8d, 0xc0, 0x00, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x19, 0x00, 0x01, - 0xd5, 0xd4, 0x01, 0x10, 0x20, 0x19, 0x00, 0x10, 0x21, 0x20, 0xd5, 0xd4, - 0x01, 0x10, 0x84, 0x23, 0x00, 0x08, 0x84, 0x24, 0x12, 0x40, 0xd5, 0xd4, - 0x01, 0x10, 0x83, 0x19, 0x00, 0x08, 0x83, 0x18, 0x1f, 0x04, 0x4a, 0x97, - 0x04, 0xd0, 0x23, 0xa8, 0x20, 0x21, 0x00, 0x01, 0x84, 0x26, 0x84, 0x25, - 0x1f, 0x04, 0x4a, 0xa9, 0x23, 0x28, 0x85, 0x29, 0xa2, 0xbe, 0x00, 0x07, - 0x01, 0x58, 0x00, 0x06, 0x20, 0x39, 0x00, 0x07, 0x22, 0x00, 0xa7, 0x3a, - 0x00, 0x0e, 0x27, 0xa8, 0xa5, 0xa8, 0x00, 0x10, 0x1f, 0x04, 0x4a, 0xb8, - 0x75, 0x52, 0xa5, 0xc8, 0x2d, 0xf9, 0x29, 0x2d, 0xa5, 0xac, 0x00, 0xff, - 0x75, 0x76, 0x65, 0x32, 0x65, 0x36, 0x00, 0x16, 0x25, 0x08, 0x08, 0x0c, - 0x28, 0x7c, 0x00, 0x1e, 0x60, 0xe7, 0x00, 0x00, 0x65, 0xea, 0x20, 0x18, - 0x23, 0x04, 0xa4, 0x05, 0x20, 0x1a, 0x70, 0x7b, 0x00, 0x01, 0x26, 0xa0, - 0x28, 0x98, 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x28, 0xa0, 0x06, - 0x00, 0x18, 0xa0, 0x06, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x9e, 0x00, 0x8e, - 0x00, 0x05, 0x21, 0x18, 0x20, 0x21, 0x00, 0x00, 0x20, 0x01, 0x00, 0x07, - 0xa3, 0x9a, 0x00, 0x10, 0x02, 0x18, 0x84, 0x20, 0x80, 0x01, 0x0c, 0xd0, - 0x21, 0x18, 0x84, 0xff, 0x01, 0x20, 0xa3, 0x9a, 0x00, 0x10, 0x84, 0x21, - 0x1d, 0xe0, 0x20, 0x21, 0x00, 0x01, 0x83, 0xff, 0x01, 0x18, 0x84, 0x23, - 0x83, 0x19, 0x1d, 0xe8, 0xa2, 0x38, 0x27, 0x04, 0xa4, 0x2c, 0x11, 0xb8, - 0xa4, 0x05, 0x20, 0x3a, 0x71, 0x52, 0xa1, 0xa0, 0x2d, 0xf9, 0x24, 0x2d, - 0xa5, 0xac, 0x00, 0xff, 0x75, 0x76, 0x65, 0x32, 0x65, 0x36, 0x00, 0x16, - 0x25, 0x08, 0x08, 0x0c, 0x28, 0x7c, 0x00, 0x1e, 0x60, 0xe7, 0x00, 0x00, - 0x65, 0xea, 0x70, 0x7b, 0x00, 0x01, 0xa0, 0x84, 0x00, 0x00, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, 0x70, 0x7f, 0x00, 0x00, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x71, - 0x01, 0x40, 0x08, 0x0c, 0x4c, 0x61, 0x08, 0x0c, 0x7d, 0xf3, 0x70, 0x04, - 0xa0, 0x84, 0x40, 0x00, 0x01, 0x20, 0x70, 0x03, 0x10, 0x00, 0x70, 0x03, - 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb6, 0x23, - 0x20, 0x73, 0x00, 0x00, 0x78, 0x40, 0x00, 0x26, 0x00, 0x16, 0x20, 0x09, - 0x00, 0xf7, 0x08, 0x0c, 0x4c, 0x11, 0x00, 0x1e, 0xa0, 0x94, 0x00, 0x10, - 0xa2, 0x85, 0x00, 0x80, 0x78, 0x42, 0x7a, 0x42, 0x20, 0x09, 0x13, 0x88, - 0x20, 0x11, 0x5a, 0x14, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x2e, 0x01, 0x2e, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x11, 0xb8, 0xeb, 0x20, 0x13, 0x00, 0x00, 0x70, 0x87, 0x00, 0x00, - 0x01, 0x2e, 0x20, 0xe1, 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, - 0x95, 0x75, 0x08, 0x0c, 0x7d, 0xea, 0x61, 0x44, 0xd1, 0x84, 0x01, 0x20, - 0x71, 0x8c, 0xa1, 0x8d, 0x20, 0x00, 0x00, 0x18, 0x71, 0x80, 0xa1, 0x8d, - 0x10, 0x00, 0x20, 0x11, 0xb8, 0xbf, 0x21, 0x12, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x26, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x11, - 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, - 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x00, 0x36, 0x20, 0x19, 0x00, 0x00, - 0x08, 0x0c, 0x80, 0x6b, 0x00, 0x3e, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, - 0x4c, 0x11, 0x20, 0x61, 0xb8, 0xf4, 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, - 0x00, 0x00, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x03, 0x00, 0x01, 0x20, 0x61, - 0x01, 0x00, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, - 0xb8, 0xbf, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, - 0x4b, 0xb4, 0x08, 0x0c, 0x6a, 0x02, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x4c, 0x61, 0x20, 0x71, 0x01, 0x00, 0x08, 0x0c, - 0x7d, 0xf3, 0x20, 0x71, 0x01, 0x40, 0x70, 0x04, 0xa0, 0x84, 0x40, 0x00, - 0x01, 0x20, 0x70, 0x03, 0x10, 0x00, 0x70, 0x03, 0x00, 0x00, 0x08, 0x0c, - 0x5b, 0x49, 0x01, 0xa8, 0x08, 0x0c, 0x5b, 0x67, 0x11, 0x90, 0x20, 0x01, - 0xb8, 0x9e, 0x20, 0x03, 0xaa, 0xaa, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x20, - 0x20, 0x01, 0xb8, 0x8f, 0x21, 0x02, 0x00, 0x1e, 0x20, 0x01, 0xb8, 0x9f, - 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x5a, 0x79, 0x00, 0x30, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x27, 0xf8, 0x08, 0x0c, 0x4b, 0x7b, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x40, 0x20, 0xa1, - 0xbd, 0xc0, 0x20, 0x99, 0xbc, 0x8e, 0x33, 0x04, 0x80, 0x07, 0x20, 0xa2, - 0x93, 0x98, 0x94, 0xa0, 0x1f, 0x04, 0x4b, 0xf1, 0x00, 0x05, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xbc, 0x00, 0x20, 0xa1, - 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0c, 0x53, 0xa6, 0x00, 0x05, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0x99, 0xbc, 0x80, 0x20, 0xa1, - 0x02, 0x0b, 0x20, 0xa9, 0x00, 0x0c, 0x53, 0xa6, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0x06, 0x20, 0x61, 0x01, 0x00, 0x81, 0x0f, 0x20, 0x01, 0xb6, 0x31, - 0x20, 0x04, 0xa0, 0x05, 0x11, 0x38, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa1, 0x05, 0x00, 0x10, 0xa1, 0x85, 0x00, 0xf7, - 0x60, 0x4a, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x46, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x58, 0xa0, 0x06, - 0x20, 0x20, 0x20, 0x09, 0x00, 0x2a, 0x08, 0x0c, 0xb1, 0xa4, 0x20, 0x01, - 0xb6, 0x0c, 0x20, 0x0c, 0xc1, 0x95, 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, - 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2c, 0xa4, 0x00, 0x4e, 0x00, 0x1e, - 0x00, 0x05, 0x08, 0x0c, 0x4b, 0x7b, 0x70, 0x8f, 0x00, 0x00, 0x70, 0x87, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x04, - 0xd0, 0x9c, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x01, 0x01, 0x20, 0x0c, - 0xa1, 0x8d, 0x00, 0x06, 0x21, 0x02, 0x01, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x20, 0x01, 0xb6, 0x0d, 0x20, 0x04, 0xd0, 0xbc, 0x01, 0x58, - 0x00, 0x26, 0x00, 0x36, 0x20, 0x11, 0x80, 0x17, 0x20, 0x01, 0xb8, 0xbf, - 0x20, 0x1c, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, - 0x01, 0x56, 0x20, 0xa9, 0x00, 0xff, 0x20, 0x09, 0xb7, 0x35, 0xa0, 0x06, - 0x20, 0x0a, 0x81, 0x08, 0x1f, 0x04, 0x4c, 0x78, 0x01, 0x5e, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x36, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x20, 0x69, - 0xb6, 0x52, 0xa0, 0x06, 0x60, 0x02, 0x60, 0x07, 0x07, 0x07, 0x60, 0x0a, - 0x60, 0x0e, 0x60, 0x12, 0xa1, 0x98, 0x2d, 0xf9, 0x23, 0x1d, 0xa3, 0x9c, - 0x00, 0xff, 0x63, 0x16, 0x20, 0xa9, 0x00, 0x04, 0xac, 0x98, 0x00, 0x06, - 0x23, 0xa0, 0x40, 0xa4, 0x20, 0xa9, 0x00, 0x04, 0xac, 0x98, 0x00, 0x0a, - 0x23, 0xa0, 0x40, 0xa4, 0x60, 0x3e, 0x60, 0x42, 0x60, 0x4e, 0x60, 0x52, - 0x60, 0x56, 0x60, 0x5a, 0x60, 0x5e, 0x60, 0x62, 0x60, 0x66, 0x60, 0x6a, - 0x60, 0x6e, 0x60, 0x72, 0x60, 0x76, 0x60, 0x7a, 0x60, 0x7e, 0x60, 0x82, - 0x60, 0x86, 0x60, 0x8a, 0x60, 0x8e, 0x60, 0x92, 0x60, 0x96, 0x60, 0x9a, - 0x60, 0x9e, 0x60, 0xae, 0x61, 0xa2, 0x00, 0xd6, 0x60, 0xa4, 0xa0, 0x6d, - 0x01, 0x10, 0x08, 0x0c, 0x16, 0x14, 0x60, 0xa7, 0x00, 0x00, 0x60, 0xa8, - 0xa0, 0x6d, 0x01, 0x10, 0x08, 0x0c, 0x16, 0x14, 0x60, 0xab, 0x00, 0x00, - 0x00, 0xde, 0xa0, 0x06, 0x60, 0x4a, 0x68, 0x10, 0x60, 0x3a, 0x68, 0x0c, - 0x60, 0x46, 0x68, 0x14, 0xa0, 0x84, 0x00, 0xff, 0x60, 0x42, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x69, 0x44, 0x6e, 0x48, 0xa6, 0x84, 0x3f, 0xff, - 0xa0, 0x82, 0x40, 0x00, 0x1a, 0x04, 0x4d, 0x8c, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x82, 0x00, 0xff, 0x1a, 0x04, 0x4d, 0x91, 0x20, 0x01, - 0xb6, 0x0c, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0x01, 0xc0, 0x20, 0x01, - 0xb6, 0x0c, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x04, 0x4d, 0x74, 0xa1, 0x88, - 0xb7, 0x35, 0x21, 0x04, 0xa0, 0x65, 0x09, 0x04, 0x4d, 0x74, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, 0x00, 0x06, 0x19, 0x04, 0x4d, 0x74, - 0x60, 0x00, 0xd0, 0xc4, 0x09, 0x04, 0x4d, 0x74, 0x00, 0x68, 0xa1, 0x88, - 0xb7, 0x35, 0x21, 0x04, 0xa0, 0x65, 0x09, 0x04, 0x4d, 0x59, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, 0x00, 0x06, 0x19, 0x04, 0x4d, 0x5e, - 0x60, 0xa4, 0xa0, 0x0d, 0x01, 0x18, 0x08, 0x0c, 0x52, 0x46, 0x05, 0xd0, - 0x60, 0xa8, 0xa0, 0x0d, 0x01, 0x88, 0x08, 0x0c, 0x52, 0x91, 0x11, 0x70, - 0x69, 0x4c, 0xd1, 0xfc, 0x11, 0x18, 0x08, 0x0c, 0x4f, 0x50, 0x04, 0x48, - 0x08, 0x0c, 0x4e, 0xff, 0x69, 0x4c, 0xd1, 0xec, 0x15, 0x20, 0x08, 0x0c, - 0x51, 0x38, 0x04, 0x08, 0x69, 0x4c, 0xa1, 0x84, 0xa0, 0x00, 0x01, 0x78, - 0xd1, 0xec, 0x01, 0x40, 0xd1, 0xfc, 0x01, 0x18, 0x08, 0x0c, 0x51, 0x47, - 0x00, 0x28, 0x08, 0x0c, 0x51, 0x47, 0x00, 0x28, 0xd1, 0xfc, 0x01, 0x18, - 0x08, 0x0c, 0x4e, 0xff, 0x00, 0x70, 0x60, 0x50, 0xa0, 0x0d, 0x01, 0x30, - 0x2d, 0x00, 0x20, 0x0a, 0x68, 0x03, 0x00, 0x00, 0x60, 0x52, 0x00, 0x28, - 0x2d, 0x00, 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, 0x00, 0x00, 0x08, 0x0c, - 0x6d, 0x1c, 0xa0, 0x06, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, 0x00, 0x05, - 0x20, 0x09, 0x00, 0x00, 0x04, 0xe0, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, - 0x00, 0x00, 0x04, 0xb8, 0xa0, 0x82, 0x00, 0x06, 0x12, 0x98, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x58, 0x60, 0xa0, 0xd0, 0xbc, - 0x11, 0x40, 0x61, 0x00, 0xd1, 0xfc, 0x01, 0x28, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x10, 0x00, 0x04, 0x20, 0x20, 0x01, 0x00, 0x28, 0x00, 0xa8, - 0x20, 0x09, 0xb6, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x68, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x40, 0x20, 0x01, 0x00, 0x29, 0x61, 0x00, 0xd1, 0xfc, 0x01, 0x18, - 0x20, 0x09, 0x10, 0x00, 0x00, 0x60, 0x20, 0x09, 0x00, 0x00, 0x00, 0x48, - 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x00, 0x00, 0x00, 0x20, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x00, 0x00, 0xa0, 0x05, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x68, 0x44, 0x80, 0x07, - 0xa0, 0x84, 0x00, 0xff, 0x20, 0x08, 0xa1, 0x82, 0x00, 0xff, 0x1a, 0x04, - 0x4d, 0xeb, 0xa1, 0x88, 0xb7, 0x35, 0x21, 0x04, 0xa0, 0x65, 0x01, 0xc0, - 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8e, 0x00, 0x06, 0x11, 0xa8, - 0x2c, 0x70, 0x08, 0x0c, 0x86, 0x4e, 0x05, 0xe8, 0x2e, 0x00, 0x60, 0x1a, - 0x2d, 0x00, 0x60, 0x12, 0x60, 0x0b, 0xff, 0xff, 0x60, 0x1f, 0x00, 0x0a, - 0x20, 0x09, 0x00, 0x03, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x06, 0x04, 0x60, - 0x20, 0x01, 0x00, 0x28, 0x04, 0x40, 0xa0, 0x82, 0x00, 0x06, 0x12, 0x98, - 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x58, 0x60, 0xa0, - 0xd0, 0xbc, 0x11, 0x40, 0x61, 0x00, 0xd1, 0xfc, 0x09, 0xe8, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, 0x00, 0xa8, 0x20, 0x01, 0x00, 0x28, - 0x00, 0x90, 0x20, 0x09, 0xb6, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, - 0x20, 0x01, 0x00, 0x04, 0x00, 0x50, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x28, 0x20, 0x01, 0x00, 0x29, 0x00, 0x10, 0x20, 0x01, - 0x00, 0x29, 0xa0, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x2c, 0x0c, 0xc8, 0x00, 0xf6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x11, 0x00, 0x00, 0x20, 0x79, 0xb6, 0x00, 0x69, 0x44, - 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x82, 0x00, 0xff, 0x1a, 0x04, - 0x4e, 0xb6, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0xa0, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x12, 0x70, 0x68, 0x64, 0xa0, 0xc6, - 0x00, 0x6f, 0x01, 0x50, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, - 0x19, 0x04, 0x4e, 0x9f, 0x60, 0xa0, 0xd0, 0xbc, 0x19, 0x04, 0x4e, 0x9f, - 0x68, 0x64, 0xa0, 0xc6, 0x00, 0x6f, 0x01, 0x18, 0x20, 0x08, 0x08, 0x04, - 0x4e, 0x68, 0x69, 0x68, 0x21, 0x40, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x78, 0xd4, 0xd0, 0xac, 0x11, 0x18, 0xa1, 0x82, 0x00, 0x80, 0x06, 0xd0, - 0xa1, 0x82, 0x00, 0xff, 0x16, 0xb8, 0x6a, 0x70, 0x6b, 0x6c, 0x78, 0x70, - 0xa3, 0x06, 0x11, 0x60, 0x78, 0x74, 0xa2, 0x4e, 0x11, 0x18, 0x22, 0x08, - 0x23, 0x10, 0x04, 0x60, 0xa9, 0xcc, 0xff, 0x00, 0x11, 0x18, 0x22, 0x08, - 0x23, 0x10, 0x04, 0x30, 0x08, 0x0c, 0x3e, 0x0c, 0x2c, 0x70, 0x05, 0x50, - 0x20, 0x09, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0xa0, 0xc6, 0x40, 0x00, - 0x11, 0x60, 0x00, 0x06, 0x2e, 0x60, 0x08, 0x0c, 0x52, 0xbc, 0x11, 0x08, - 0xc1, 0x85, 0x70, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x00, 0x0e, - 0x00, 0x88, 0xa0, 0xc6, 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, 0x00, 0x60, - 0xa0, 0xc6, 0x40, 0x08, 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, 0x00, 0x30, - 0xa0, 0xc6, 0x40, 0x09, 0x11, 0x08, 0x00, 0x10, 0x20, 0x01, 0x40, 0x06, - 0x68, 0x66, 0x69, 0x6a, 0x6a, 0x6e, 0x20, 0x01, 0x00, 0x30, 0x04, 0x50, - 0x08, 0x0c, 0x86, 0x4e, 0x11, 0x38, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, - 0x00, 0x03, 0x20, 0x11, 0x00, 0x00, 0x0c, 0x80, 0x2e, 0x00, 0x60, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x2d, 0x00, 0x60, 0x12, 0x60, 0x1f, 0x00, 0x01, - 0x68, 0x38, 0xd8, 0x8c, 0x01, 0x08, 0xc0, 0xf5, 0x68, 0x3a, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x2c, 0xd1, 0x01, 0x2e, 0x20, 0x01, - 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x4f, 0x6f, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x06, - 0xa0, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, 0x0c, 0xb0, 0x20, 0x09, 0xb6, 0x0c, - 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x38, - 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x10, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x00, 0x00, 0x0c, 0x20, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x00, 0x00, 0x08, 0xf8, 0x69, 0x44, 0x6e, 0x48, 0xa6, 0x84, - 0x3f, 0xff, 0xa0, 0x82, 0x40, 0x00, 0x16, 0xb8, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x82, 0x00, 0xff, 0x12, 0xe0, 0xa1, 0x88, 0xb7, 0x35, - 0x21, 0x04, 0xa0, 0x65, 0x01, 0xb8, 0x60, 0x04, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x8e, 0x00, 0x06, 0x11, 0xb0, 0x68, 0x4c, 0xd0, 0xec, 0x01, 0x20, - 0x08, 0x0c, 0x51, 0x47, 0x04, 0x31, 0x00, 0x30, 0x04, 0x21, 0x68, 0x4c, - 0xd0, 0xfc, 0x01, 0x10, 0x08, 0x0c, 0x51, 0x38, 0x08, 0x0c, 0x51, 0x85, - 0xa0, 0x06, 0x00, 0xc8, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, - 0x00, 0xa0, 0xa0, 0x82, 0x00, 0x06, 0x12, 0x40, 0x61, 0x00, 0xd1, 0xfc, - 0x0d, 0x20, 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, 0x00, 0x48, - 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x00, 0x00, 0x00, 0x20, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x00, 0x00, 0xa0, 0x05, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x50, 0xa0, 0x0d, 0x01, 0x38, 0x2d, 0x00, - 0x20, 0x0a, 0x68, 0x03, 0x00, 0x00, 0x60, 0x52, 0x01, 0x2e, 0x00, 0x05, - 0x2d, 0x00, 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, 0x00, 0x00, 0x0c, 0xc0, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x4c, 0xa0, 0x05, 0x01, 0x70, - 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x04, 0xa0, 0x86, 0x00, 0x02, - 0x01, 0x68, 0x00, 0xee, 0x60, 0x4c, 0x68, 0x02, 0x2d, 0x00, 0x60, 0x4e, - 0x01, 0x2e, 0x00, 0x05, 0x2d, 0x00, 0x60, 0x52, 0x60, 0x4e, 0x68, 0x03, - 0x00, 0x00, 0x0c, 0xc0, 0x70, 0x1c, 0xac, 0x06, 0x1d, 0x80, 0x60, 0x4c, - 0x20, 0x70, 0x70, 0x00, 0x68, 0x02, 0x2d, 0x00, 0x70, 0x02, 0x00, 0xee, - 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x4c, - 0xa0, 0x6d, 0x01, 0x30, 0x68, 0x00, 0xa0, 0x05, 0x11, 0x08, 0x60, 0x52, - 0x60, 0x4e, 0xad, 0x05, 0x01, 0x2e, 0x00, 0x05, 0x60, 0x4c, 0xa0, 0x6d, - 0x01, 0x30, 0x68, 0x00, 0xa0, 0x05, 0x11, 0x08, 0x60, 0x52, 0x60, 0x4e, - 0xad, 0x05, 0x00, 0x05, 0x68, 0x03, 0x00, 0x00, 0x60, 0x84, 0xa0, 0x0d, - 0x01, 0x20, 0x2d, 0x00, 0x20, 0x0a, 0x60, 0x86, 0x00, 0x05, 0x2d, 0x00, - 0x60, 0x86, 0x60, 0x82, 0x0c, 0xd8, 0x01, 0x26, 0x00, 0xc6, 0x00, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x62, 0x18, 0x22, 0x60, 0x62, 0x00, 0xa0, 0x05, - 0x01, 0x10, 0xc2, 0x85, 0x00, 0x08, 0xc2, 0x84, 0x62, 0x02, 0x00, 0x2e, - 0x00, 0xce, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, - 0x80, 0x00, 0x62, 0x18, 0x22, 0x60, 0x62, 0x04, 0x00, 0x06, 0xa0, 0x86, - 0x00, 0x06, 0x11, 0x80, 0x60, 0x9c, 0xd0, 0xac, 0x01, 0x68, 0x20, 0x01, - 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x40, 0xa2, 0x84, 0xff, 0x00, - 0x80, 0x07, 0xa0, 0x86, 0x00, 0x07, 0x11, 0x10, 0x20, 0x11, 0x06, 0x00, - 0x00, 0x0e, 0xa2, 0x94, 0xff, 0x00, 0xa2, 0x15, 0x62, 0x06, 0x00, 0x06, - 0xa0, 0x86, 0x00, 0x06, 0x11, 0x28, 0x62, 0x90, 0x82, 0xff, 0x11, 0x10, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x0e, 0x00, 0xce, 0x01, 0x2e, 0x00, 0x05, - 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, 0x62, 0x18, 0x22, 0x60, - 0x62, 0x04, 0x00, 0x06, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x78, 0x60, 0x9c, - 0xd0, 0xa4, 0x01, 0x60, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xac, - 0x11, 0x38, 0xa2, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x07, 0x11, 0x10, - 0x20, 0x11, 0x00, 0x06, 0x00, 0x0e, 0xa2, 0x94, 0x00, 0xff, 0x80, 0x07, - 0xa2, 0x15, 0x62, 0x06, 0x00, 0xce, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, - 0xa1, 0x82, 0x00, 0xff, 0x02, 0x18, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xb0, - 0xa1, 0x90, 0xb7, 0x35, 0x22, 0x04, 0xa0, 0x65, 0x11, 0x80, 0x00, 0x16, - 0x00, 0xd6, 0x08, 0x0c, 0x15, 0xe4, 0x2d, 0x60, 0x00, 0xde, 0x00, 0x1e, - 0x0d, 0x80, 0x2c, 0x00, 0x20, 0x12, 0x60, 0xa7, 0x00, 0x00, 0x60, 0xab, - 0x00, 0x00, 0x08, 0x0c, 0x4c, 0x7e, 0xa0, 0x06, 0x00, 0x2e, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x26, 0xa1, 0x82, 0x00, 0xff, - 0x02, 0x18, 0xa0, 0x85, 0x00, 0x01, 0x04, 0x80, 0x00, 0xd6, 0xa1, 0x90, - 0xb7, 0x35, 0x22, 0x04, 0xa0, 0x6d, 0x05, 0x40, 0x20, 0x13, 0x00, 0x00, - 0x00, 0xd6, 0x00, 0xc6, 0x2d, 0x60, 0x60, 0xa4, 0xa0, 0x6d, 0x01, 0x10, - 0x08, 0x0c, 0x16, 0x14, 0x60, 0xa8, 0xa0, 0x6d, 0x01, 0x10, 0x08, 0x0c, - 0x16, 0x14, 0x00, 0xce, 0x00, 0xde, 0x00, 0xd6, 0x00, 0xc6, 0x68, 0xac, - 0x20, 0x60, 0x8c, 0xff, 0x01, 0x68, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x10, - 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x10, 0x08, 0x0c, 0x16, 0x24, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, 0x0c, 0x88, 0x00, 0xce, 0x00, 0xde, - 0x08, 0x0c, 0x16, 0x14, 0x00, 0xde, 0xa0, 0x06, 0x00, 0x2e, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0x16, 0xa1, 0x82, 0x00, 0xff, 0x02, 0x18, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x30, 0xa1, 0x88, 0xb7, 0x35, 0x21, 0x04, 0xa0, 0x65, - 0x0d, 0xc0, 0xa0, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x56, - 0x01, 0x36, 0x01, 0x46, 0x60, 0x0b, 0x00, 0x00, 0x60, 0x0f, 0x00, 0x00, - 0x60, 0x00, 0xc0, 0x8c, 0x60, 0x02, 0x08, 0x0c, 0x5b, 0x41, 0x15, 0x58, - 0x60, 0xa0, 0xa0, 0x86, 0x00, 0x7e, 0x20, 0x69, 0xbc, 0x90, 0x01, 0x30, - 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x15, 0x00, 0x00, 0x98, - 0x2d, 0x04, 0xd0, 0xe4, 0x01, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0xbc, 0x8e, - 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xb2, 0x68, 0x10, 0x20, 0x62, 0x68, 0x14, - 0x60, 0x06, 0x68, 0x18, 0x60, 0x0a, 0x68, 0x1c, 0x60, 0x0e, 0x00, 0xce, - 0x00, 0xde, 0x8d, 0x69, 0x2d, 0x04, 0x20, 0x69, 0x01, 0x40, 0xa0, 0x05, - 0x11, 0x10, 0x20, 0x01, 0x00, 0x01, 0x68, 0x86, 0x20, 0x69, 0xb6, 0x00, - 0x68, 0xa6, 0x20, 0x69, 0xbc, 0x8e, 0x68, 0x08, 0x60, 0x5e, 0x68, 0x10, - 0x60, 0x62, 0x61, 0x38, 0xa1, 0x0a, 0x02, 0x08, 0x60, 0x3a, 0x68, 0x14, - 0x60, 0x66, 0x20, 0x99, 0xbc, 0x96, 0xac, 0x88, 0x00, 0x0a, 0x21, 0xa0, - 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x20, 0x99, 0xbc, 0x9a, 0xac, 0x88, - 0x00, 0x06, 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x20, 0x69, - 0xbc, 0xae, 0x68, 0x08, 0x60, 0x6a, 0x69, 0x0c, 0x61, 0x6e, 0x68, 0x10, - 0x60, 0x72, 0x68, 0x18, 0x60, 0x76, 0x60, 0xa0, 0xa0, 0x86, 0x00, 0x7e, - 0x11, 0x20, 0x20, 0x69, 0xbc, 0x8e, 0x69, 0x0c, 0x61, 0x6e, 0xa1, 0x82, - 0x02, 0x11, 0x12, 0x18, 0x20, 0x09, 0x00, 0x08, 0x04, 0x00, 0xa1, 0x82, - 0x02, 0x59, 0x12, 0x18, 0x20, 0x09, 0x00, 0x07, 0x00, 0xd0, 0xa1, 0x82, - 0x02, 0xc1, 0x12, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0xa0, 0xa1, 0x82, - 0x03, 0x49, 0x12, 0x18, 0x20, 0x09, 0x00, 0x05, 0x00, 0x70, 0xa1, 0x82, - 0x04, 0x21, 0x12, 0x18, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0xa1, 0x82, - 0x05, 0x81, 0x12, 0x18, 0x20, 0x09, 0x00, 0x03, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x02, 0x61, 0x92, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, 0xbc, 0x8d, - 0x2e, 0x04, 0x68, 0x96, 0x20, 0x71, 0xbc, 0x8e, 0x70, 0x04, 0x68, 0x9a, - 0x70, 0x1c, 0x68, 0x9e, 0x6a, 0x00, 0x20, 0x09, 0xb6, 0x72, 0x21, 0x0c, - 0xd0, 0xbc, 0x01, 0x20, 0xd1, 0xec, 0x01, 0x10, 0xc2, 0xad, 0x00, 0x08, - 0xc2, 0xac, 0xd0, 0xc4, 0x01, 0x20, 0xd1, 0xe4, 0x01, 0x10, 0xc2, 0xbd, - 0x00, 0x08, 0xc2, 0xbc, 0x6a, 0x02, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa4, - 0xa0, 0x6d, 0x01, 0xc0, 0x69, 0x00, 0x81, 0xff, 0x15, 0x40, 0x6a, 0x04, - 0xa2, 0x82, 0x00, 0x10, 0x16, 0x48, 0xad, 0x88, 0x00, 0x04, 0x20, 0xa9, - 0x00, 0x10, 0x21, 0x04, 0xa0, 0x86, 0xff, 0xff, 0x01, 0x28, 0x81, 0x08, - 0x1f, 0x04, 0x50, 0xf3, 0x08, 0x0c, 0x15, 0x1a, 0x26, 0x0a, 0x82, 0x10, - 0x6a, 0x06, 0x00, 0x98, 0x08, 0x0c, 0x15, 0xfd, 0x01, 0xa8, 0x2d, 0x00, - 0x60, 0xa6, 0x68, 0x03, 0x00, 0x00, 0xad, 0x88, 0x00, 0x04, 0x20, 0xa9, - 0x00, 0x10, 0x20, 0x0b, 0xff, 0xff, 0x81, 0x08, 0x1f, 0x04, 0x51, 0x0b, - 0x68, 0x07, 0x00, 0x01, 0x6e, 0x12, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xde, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0xd6, 0x60, 0xa4, 0xa0, 0x0d, 0x01, 0xa0, 0x21, 0x68, - 0x68, 0x00, 0xa0, 0x05, 0x11, 0x60, 0x08, 0x0c, 0x52, 0x46, 0x11, 0x68, - 0x20, 0x0b, 0xff, 0xff, 0x68, 0x04, 0xa0, 0x8a, 0x00, 0x02, 0x02, 0x18, - 0x80, 0x01, 0x68, 0x06, 0x00, 0x20, 0x08, 0x0c, 0x16, 0x14, 0x60, 0xa7, - 0x00, 0x00, 0x00, 0xde, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x52, 0xa4, 0x00, 0x10, 0x08, 0x0c, 0x4e, 0xff, - 0x08, 0x0c, 0x51, 0xbe, 0x1d, 0xd8, 0x08, 0x0c, 0x51, 0x85, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa8, - 0xa0, 0x6d, 0x01, 0xc0, 0x69, 0x50, 0x81, 0xff, 0x15, 0x40, 0x6a, 0x54, - 0xa2, 0x82, 0x00, 0x10, 0x16, 0x70, 0xad, 0x88, 0x00, 0x18, 0x20, 0xa9, - 0x00, 0x10, 0x21, 0x04, 0xa0, 0x86, 0xff, 0xff, 0x01, 0x28, 0x81, 0x08, - 0x1f, 0x04, 0x51, 0x59, 0x08, 0x0c, 0x15, 0x1a, 0x26, 0x0a, 0x82, 0x10, - 0x6a, 0x56, 0x00, 0x98, 0x08, 0x0c, 0x15, 0xfd, 0x01, 0xd0, 0x2d, 0x00, - 0x60, 0xaa, 0x68, 0x53, 0x00, 0x00, 0xad, 0x88, 0x00, 0x18, 0x20, 0xa9, - 0x00, 0x10, 0x20, 0x0b, 0xff, 0xff, 0x81, 0x08, 0x1f, 0x04, 0x51, 0x71, - 0x68, 0x57, 0x00, 0x01, 0x6e, 0x62, 0x00, 0x10, 0x08, 0x0c, 0x4f, 0x50, - 0x00, 0x89, 0x1d, 0xe0, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x6d, 0x1c, 0x01, 0x2e, 0x00, 0x05, 0xa0, 0x1e, 0x00, 0x10, - 0x20, 0x19, 0x00, 0x01, 0xa0, 0x0e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x60, 0x4c, 0x20, 0x68, 0x60, 0x00, 0xd0, 0xdc, 0x11, 0x70, 0x8d, 0xff, - 0x01, 0xf8, 0x83, 0xff, 0x01, 0x20, 0x68, 0x48, 0xa6, 0x06, 0x01, 0x58, - 0x00, 0x30, 0x68, 0x3c, 0xa4, 0x06, 0x11, 0x18, 0x68, 0x40, 0xa5, 0x06, - 0x01, 0x20, 0x2d, 0x08, 0x68, 0x00, 0x20, 0x68, 0x0c, 0x70, 0x08, 0x0c, - 0x81, 0xa5, 0x6a, 0x00, 0x60, 0x4c, 0xad, 0x06, 0x11, 0x10, 0x62, 0x4e, - 0x00, 0x18, 0xa1, 0x80, 0x00, 0x00, 0x22, 0x02, 0x82, 0xff, 0x11, 0x10, - 0x61, 0x52, 0x8d, 0xff, 0x01, 0x2e, 0x00, 0x05, 0xa0, 0x1e, 0x00, 0x10, - 0x20, 0x19, 0x00, 0x01, 0xa0, 0x0e, 0x60, 0x80, 0x20, 0x68, 0x8d, 0xff, - 0x01, 0xe8, 0x83, 0xff, 0x01, 0x20, 0x68, 0x48, 0xa6, 0x06, 0x01, 0x58, - 0x00, 0x30, 0x68, 0x3c, 0xa4, 0x06, 0x11, 0x18, 0x68, 0x40, 0xa5, 0x06, - 0x01, 0x20, 0x2d, 0x08, 0x68, 0x00, 0x20, 0x68, 0x0c, 0x70, 0x6a, 0x00, - 0x60, 0x80, 0xad, 0x06, 0x11, 0x10, 0x62, 0x82, 0x00, 0x18, 0xa1, 0x80, - 0x00, 0x00, 0x22, 0x02, 0x82, 0xff, 0x11, 0x10, 0x61, 0x86, 0x8d, 0xff, - 0x00, 0x05, 0xa0, 0x16, 0x08, 0x0c, 0x52, 0x40, 0x11, 0x10, 0x20, 0x11, - 0x00, 0x01, 0x08, 0x0c, 0x52, 0x8b, 0x11, 0x10, 0xa2, 0x95, 0x00, 0x02, - 0x00, 0x05, 0x08, 0x0c, 0x52, 0xbc, 0x01, 0x18, 0x08, 0x0c, 0x9d, 0xcb, - 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x52, 0xbc, - 0x01, 0x18, 0x08, 0x0c, 0x9d, 0x5b, 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x08, 0x0c, 0x52, 0xbc, 0x01, 0x18, 0x08, 0x0c, 0x9d, 0xae, - 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x52, 0xbc, - 0x01, 0x18, 0x08, 0x0c, 0x9d, 0x77, 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x08, 0x0c, 0x52, 0xbc, 0x01, 0x18, 0x08, 0x0c, 0x9d, 0xe7, - 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x01, 0x26, 0x00, 0x06, - 0x00, 0xd6, 0x20, 0x91, 0x80, 0x00, 0x60, 0x80, 0xa0, 0x6d, 0x01, 0xa0, - 0x68, 0x00, 0x00, 0x06, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x08, 0x0c, 0x9f, 0x88, 0x00, 0x06, 0x60, 0x00, 0xd0, 0xfc, - 0x01, 0x10, 0x08, 0x0c, 0xb4, 0x45, 0x00, 0x0e, 0x08, 0x0c, 0x54, 0x7a, - 0x00, 0x0e, 0x0c, 0x50, 0x60, 0x83, 0x00, 0x00, 0x60, 0x87, 0x00, 0x00, - 0x00, 0xde, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x60, 0xa4, 0xa0, 0x0d, - 0x11, 0x18, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xe6, 0x21, 0x70, - 0x70, 0x00, 0xa0, 0x05, 0x11, 0x68, 0x20, 0xa9, 0x00, 0x10, 0xae, 0x88, - 0x00, 0x04, 0x21, 0x04, 0xa6, 0x06, 0x01, 0x30, 0x81, 0x08, 0x1f, 0x04, - 0x52, 0x4f, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x08, 0xa0, 0x06, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0xa4, - 0xa0, 0x6d, 0x11, 0x28, 0x08, 0x0c, 0x15, 0xfd, 0x01, 0xa0, 0x2d, 0x00, - 0x60, 0xa6, 0x68, 0x03, 0x00, 0x01, 0x68, 0x07, 0x00, 0x00, 0xad, 0x88, - 0x00, 0x04, 0x20, 0xa9, 0x00, 0x10, 0x20, 0x0b, 0xff, 0xff, 0x81, 0x08, - 0x1f, 0x04, 0x52, 0x6f, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x60, 0xa4, 0xa0, 0x6d, 0x01, 0x30, 0x60, 0xa7, 0x00, 0x00, - 0x08, 0x0c, 0x16, 0x14, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0x60, 0xa8, 0xa0, 0x0d, 0x11, 0x18, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0xe6, 0x21, 0x70, 0x70, 0x50, 0xa0, 0x05, 0x11, 0x60, - 0x20, 0xa9, 0x00, 0x10, 0xae, 0x88, 0x00, 0x18, 0x21, 0x04, 0xa6, 0x06, - 0x01, 0x28, 0x81, 0x08, 0x1f, 0x04, 0x52, 0x9a, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x0c, 0x19, - 0x11, 0x88, 0x20, 0x0b, 0xff, 0xff, 0x00, 0xd6, 0x60, 0xa8, 0x20, 0x68, - 0x68, 0x54, 0xa0, 0x8a, 0x00, 0x02, 0x02, 0x18, 0x80, 0x01, 0x68, 0x56, - 0x00, 0x20, 0x08, 0x0c, 0x16, 0x14, 0x60, 0xab, 0x00, 0x00, 0x00, 0xde, - 0x01, 0x2e, 0x00, 0x05, 0x60, 0x9c, 0xd0, 0xa4, 0x00, 0x05, 0x00, 0xf6, - 0x08, 0x0c, 0x5b, 0x41, 0x01, 0xb0, 0x71, 0xb8, 0x81, 0xff, 0x11, 0x98, - 0x71, 0xd4, 0xd1, 0x9c, 0x01, 0x80, 0x20, 0x01, 0x00, 0x7e, 0xa0, 0x80, - 0xb7, 0x35, 0x20, 0x04, 0xa0, 0x7d, 0x01, 0x48, 0x78, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x18, 0x78, 0x00, 0xc0, 0xed, - 0x78, 0x02, 0x20, 0x79, 0xb6, 0x52, 0x78, 0x04, 0xd0, 0xa4, 0x01, 0xe8, - 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, - 0x00, 0x16, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x68, 0x60, 0x04, 0xa0, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0x96, 0x00, 0x04, 0x01, 0x18, 0xa0, 0x86, - 0x00, 0x06, 0x11, 0x18, 0x60, 0x00, 0xc0, 0xed, 0x60, 0x02, 0x00, 0x1e, - 0x81, 0x08, 0x1f, 0x04, 0x52, 0xe4, 0x00, 0xce, 0x01, 0x5e, 0x08, 0x0c, - 0x53, 0x7b, 0x01, 0x20, 0x20, 0x01, 0xb8, 0xb5, 0x20, 0x0c, 0x00, 0x38, - 0x20, 0x79, 0xb6, 0x52, 0x78, 0x04, 0xd0, 0xa4, 0x01, 0x30, 0x20, 0x09, - 0x07, 0xd0, 0x20, 0x11, 0x53, 0x0f, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x11, 0x53, 0x0f, 0x08, 0x0c, 0x6a, 0x0e, 0x08, 0x0c, - 0x53, 0x7b, 0x01, 0xf0, 0x20, 0x01, 0xb7, 0xb3, 0x20, 0x04, 0xa0, 0x80, - 0x00, 0x00, 0x20, 0x0c, 0xc1, 0xec, 0x21, 0x02, 0x20, 0x01, 0xb6, 0x53, - 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x30, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, - 0x53, 0x0f, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, - 0x70, 0x73, 0x00, 0x00, 0x70, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x2a, 0xed, - 0x00, 0xee, 0x04, 0xb0, 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x7f, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x50, 0x1b, 0x15, 0x30, - 0x60, 0x00, 0xd0, 0xec, 0x05, 0x18, 0x00, 0x46, 0x62, 0xa0, 0xa2, 0x94, - 0x00, 0xff, 0x82, 0x27, 0xa0, 0x06, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, - 0xb1, 0xa4, 0x60, 0x00, 0xc0, 0xe5, 0xc0, 0xec, 0x60, 0x02, 0x60, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x85, 0x07, 0x00, 0x60, 0x06, 0x20, 0x19, - 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, - 0x08, 0x0c, 0x6d, 0x74, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0xaf, 0x3e, - 0x00, 0x7e, 0x00, 0x4e, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x53, 0x3a, - 0x00, 0xce, 0x01, 0x5e, 0x00, 0x05, 0x00, 0xc6, 0x60, 0x18, 0x20, 0x60, - 0x60, 0x00, 0xc0, 0xec, 0x60, 0x02, 0x00, 0xce, 0x00, 0x05, 0x78, 0x18, - 0x20, 0x04, 0xd0, 0xac, 0x00, 0x05, 0x78, 0x18, 0x20, 0x04, 0xd0, 0xbc, - 0x00, 0x05, 0x00, 0xf6, 0x20, 0x01, 0xb7, 0xb3, 0x20, 0x04, 0xa0, 0x7d, - 0x01, 0x10, 0x78, 0x00, 0xd0, 0xec, 0x00, 0xfe, 0x00, 0x05, 0x01, 0x26, - 0x00, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x06, 0x62, 0xa0, 0xa2, 0x90, - 0xb7, 0x35, 0x22, 0x04, 0xac, 0x06, 0x19, 0x0c, 0x15, 0x1a, 0x00, 0x0e, - 0x62, 0x00, 0xa0, 0x05, 0x01, 0x10, 0xc2, 0xfd, 0x00, 0x08, 0xc2, 0xfc, - 0x62, 0x02, 0x00, 0x2e, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x11, 0xb6, 0x35, - 0x22, 0x04, 0xd0, 0xcc, 0x01, 0x38, 0x20, 0x01, 0xb8, 0xb3, 0x20, 0x0c, - 0x20, 0x11, 0x53, 0xa9, 0x08, 0x0c, 0x6a, 0x94, 0x00, 0x05, 0x20, 0x11, - 0x53, 0xa9, 0x08, 0x0c, 0x6a, 0x0e, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x04, - 0xc0, 0xcc, 0x20, 0x12, 0x00, 0x05, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x03, - 0x00, 0x01, 0x70, 0x07, 0x00, 0x00, 0x70, 0x13, 0x00, 0x00, 0x70, 0x17, - 0x00, 0x00, 0x70, 0x1b, 0x00, 0x00, 0x70, 0x1f, 0x00, 0x00, 0x70, 0x0b, - 0x00, 0x00, 0x70, 0x4b, 0x00, 0x01, 0x70, 0x4f, 0x00, 0x00, 0x70, 0x5b, - 0x00, 0x20, 0x70, 0x5f, 0x00, 0x40, 0x70, 0x7f, 0x00, 0x00, 0x20, 0x71, - 0xb8, 0x7d, 0x70, 0x03, 0xb7, 0x14, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0b, - 0x00, 0x00, 0x70, 0x0f, 0xb8, 0x5d, 0x70, 0x13, 0x00, 0x20, 0x70, 0x17, - 0x00, 0x40, 0x70, 0x37, 0x00, 0x00, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, - 0x20, 0x71, 0xb8, 0x35, 0xa0, 0x0e, 0x71, 0x86, 0x71, 0x8a, 0x70, 0x97, - 0x00, 0x01, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x50, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xa0, 0x0e, 0xd0, 0x9c, 0x01, 0x08, - 0x81, 0x08, 0x71, 0x02, 0x08, 0x04, 0x54, 0x44, 0x20, 0x01, 0xb6, 0x72, - 0x20, 0x0c, 0xa1, 0x84, 0x00, 0x0f, 0x20, 0x09, 0xb6, 0x73, 0x21, 0x0c, - 0x00, 0x02, 0x53, 0xec, 0x54, 0x1f, 0x54, 0x26, 0x54, 0x30, 0x54, 0x35, - 0x53, 0xec, 0x53, 0xec, 0x53, 0xec, 0x54, 0x0f, 0x53, 0xec, 0x53, 0xec, - 0x53, 0xec, 0x53, 0xec, 0x53, 0xec, 0x53, 0xec, 0x53, 0xec, 0x70, 0x03, - 0x00, 0x04, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x20, 0x99, 0xb6, 0x76, - 0x20, 0xa1, 0xb8, 0x86, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x01, 0x5e, - 0x01, 0x4e, 0x01, 0x3e, 0x04, 0x28, 0x70, 0x8f, 0x00, 0x05, 0x70, 0x07, - 0x01, 0x22, 0x20, 0x01, 0x00, 0x02, 0x00, 0x30, 0x70, 0x8f, 0x00, 0x02, - 0x70, 0x07, 0x01, 0x21, 0x20, 0x01, 0x00, 0x03, 0x70, 0x02, 0x70, 0x97, - 0x00, 0x01, 0x00, 0x88, 0x70, 0x07, 0x01, 0x22, 0x20, 0x01, 0x00, 0x02, - 0x00, 0x20, 0x70, 0x07, 0x01, 0x21, 0x20, 0x01, 0x00, 0x03, 0x70, 0x02, - 0xa0, 0x06, 0x70, 0x96, 0x70, 0x8e, 0xa1, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x70, 0x9a, 0xa1, 0x84, 0x00, 0xff, 0x70, 0x92, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb7, 0x14, 0x68, 0x4c, 0xa0, 0x05, - 0x11, 0x30, 0x70, 0x28, 0xc0, 0x85, 0x70, 0x2a, 0xa0, 0x85, 0x00, 0x01, - 0x04, 0x28, 0x6a, 0x60, 0x72, 0x36, 0x6b, 0x64, 0x73, 0x3a, 0x68, 0x68, - 0x70, 0x3e, 0x70, 0x76, 0x68, 0x6c, 0x70, 0x42, 0x70, 0x7a, 0x68, 0x4c, - 0x70, 0x2e, 0x68, 0x44, 0x70, 0x32, 0x20, 0x09, 0x00, 0x0d, 0x20, 0x0a, - 0x70, 0x0b, 0x00, 0x00, 0x80, 0x07, 0x80, 0x06, 0x80, 0x06, 0xa0, 0x8c, - 0x00, 0x3f, 0xa0, 0x84, 0xff, 0xc0, 0xa2, 0x10, 0x21, 0x00, 0xa3, 0x19, - 0x72, 0x6e, 0x73, 0x72, 0x70, 0x28, 0xc0, 0x84, 0x70, 0x2a, 0x70, 0x07, - 0x00, 0x01, 0xa0, 0x06, 0x00, 0xee, 0x00, 0x05, 0x01, 0x56, 0x00, 0xe6, - 0x00, 0x26, 0x68, 0x38, 0xd0, 0xfc, 0x19, 0x04, 0x54, 0xd3, 0x68, 0x04, - 0xa0, 0x0d, 0x01, 0x88, 0x00, 0xd6, 0x20, 0x71, 0xb6, 0x00, 0xa0, 0x16, - 0x70, 0x2c, 0x21, 0x68, 0x69, 0x04, 0x20, 0x6a, 0x82, 0x10, 0x2d, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xb4, 0xa2, 0x00, 0x70, 0xb6, - 0x00, 0xde, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x1c, 0xa0, 0x05, 0x19, 0x04, - 0x54, 0xe3, 0x20, 0xa9, 0x00, 0x32, 0x0f, 0x04, 0x54, 0xe1, 0x0e, 0x04, - 0x54, 0x9d, 0x20, 0x71, 0xb8, 0x35, 0x72, 0x00, 0x82, 0xff, 0x05, 0xd8, - 0x69, 0x34, 0xa1, 0x86, 0x01, 0x03, 0x19, 0x04, 0x54, 0xf1, 0x69, 0x48, - 0x68, 0x44, 0xa1, 0x05, 0x15, 0x40, 0x20, 0x09, 0x80, 0x20, 0x22, 0x00, - 0x00, 0x02, 0x54, 0xe1, 0x54, 0xb8, 0x55, 0x09, 0x55, 0x15, 0x54, 0xe1, - 0x20, 0x71, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x32, 0x0f, 0x04, 0x54, 0xe1, - 0x70, 0x18, 0xd0, 0x84, 0x1d, 0xd8, 0x71, 0x22, 0x68, 0x3c, 0x70, 0x26, - 0x68, 0x40, 0x70, 0x2a, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x71, 0xb6, 0x00, 0x70, 0x2c, 0x20, 0x6a, 0x2d, 0x00, 0x70, 0x2e, - 0x70, 0xb4, 0x80, 0x00, 0x70, 0xb6, 0x00, 0x2e, 0x00, 0xee, 0x01, 0x5e, - 0x00, 0x05, 0x68, 0x44, 0xa0, 0x86, 0x01, 0x00, 0x11, 0x30, 0x68, 0x68, - 0xa0, 0x05, 0x11, 0x18, 0x20, 0x09, 0x80, 0x20, 0x08, 0x80, 0x20, 0x71, - 0xb7, 0x14, 0x2d, 0x08, 0x20, 0x6b, 0x00, 0x00, 0x70, 0x10, 0x80, 0x00, - 0x70, 0x12, 0x70, 0x18, 0xa0, 0x6d, 0x71, 0x1a, 0x01, 0x10, 0x69, 0x02, - 0x00, 0x08, 0x71, 0x1e, 0x0c, 0x10, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x86, - 0x00, 0x17, 0x01, 0x30, 0xa1, 0x86, 0x00, 0x1e, 0x01, 0x18, 0xa1, 0x8e, - 0x00, 0x1f, 0x1d, 0x28, 0x68, 0x4c, 0xd0, 0xcc, 0x0d, 0x10, 0x68, 0x50, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x01, 0x19, 0xe0, 0x20, 0x09, - 0x80, 0x21, 0x08, 0x04, 0x54, 0xb1, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, - 0x00, 0x1e, 0x1a, 0x98, 0x71, 0x86, 0xae, 0x90, 0x00, 0x03, 0xa2, 0x10, - 0x68, 0x3c, 0x20, 0x12, 0x00, 0x78, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, - 0x00, 0x0f, 0x1a, 0x38, 0x71, 0x86, 0xae, 0x90, 0x00, 0x03, 0x80, 0x03, - 0xa2, 0x10, 0x68, 0x3c, 0x20, 0x12, 0x82, 0x10, 0x68, 0x40, 0x20, 0x12, - 0x70, 0x88, 0xa1, 0x0a, 0x0a, 0x04, 0x54, 0xca, 0x71, 0x8c, 0x70, 0x84, - 0xa1, 0x0a, 0x0a, 0x04, 0x54, 0xca, 0x20, 0x71, 0x00, 0x00, 0x70, 0x18, - 0xd0, 0x84, 0x19, 0x04, 0x54, 0xca, 0x20, 0x71, 0xb8, 0x35, 0x70, 0x00, - 0xa0, 0x86, 0x00, 0x02, 0x11, 0x50, 0x08, 0x0c, 0x57, 0x94, 0x20, 0x71, - 0x00, 0x00, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x08, 0x04, - 0x54, 0xca, 0x08, 0x0c, 0x57, 0xbe, 0x20, 0x71, 0x00, 0x00, 0x70, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x08, 0x04, 0x54, 0xca, 0x00, 0x06, - 0x68, 0x4c, 0x00, 0x06, 0x68, 0x37, 0x01, 0x03, 0x20, 0xa9, 0x00, 0x1c, - 0xad, 0x80, 0x00, 0x11, 0x20, 0xa0, 0x20, 0x01, 0x00, 0x00, 0x40, 0xa4, - 0x00, 0x0e, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x4e, 0x00, 0x0e, 0x68, 0x4a, - 0x69, 0x52, 0x00, 0x05, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x04, 0x00, 0x02, - 0x55, 0x70, 0x55, 0x81, 0x57, 0x7f, 0x57, 0x80, 0x57, 0x8d, 0x57, 0x93, - 0x55, 0x71, 0x57, 0x70, 0x57, 0x06, 0x57, 0x5c, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x55, 0x80, 0x20, 0x09, 0x00, 0x0d, - 0x70, 0x30, 0x20, 0x0a, 0x20, 0x91, 0x40, 0x80, 0x70, 0x07, 0x00, 0x01, - 0x70, 0x0b, 0x00, 0x00, 0x01, 0x2e, 0x20, 0x69, 0xb8, 0xf4, 0x68, 0x3c, - 0xa0, 0x05, 0x03, 0xf8, 0x11, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x69, 0x00, 0x00, 0x69, 0x34, 0x20, 0x01, 0xb7, 0x20, 0x20, 0x04, - 0xa1, 0x0a, 0x01, 0x70, 0x0e, 0x04, 0x55, 0xa4, 0x20, 0x69, 0x00, 0x00, - 0x68, 0x18, 0xd0, 0x84, 0x11, 0x58, 0x20, 0x09, 0x80, 0x40, 0x69, 0x22, - 0x68, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x20, 0x69, 0xb8, 0xf4, - 0x68, 0x3f, 0xff, 0xff, 0x01, 0x2e, 0x20, 0x69, 0xb6, 0x00, 0x68, 0x48, - 0x69, 0x68, 0xa1, 0x02, 0x20, 0x69, 0xb8, 0x35, 0x68, 0x8a, 0x69, 0x84, - 0x70, 0x1c, 0xa0, 0x6d, 0x01, 0x20, 0x81, 0xff, 0x09, 0x04, 0x55, 0xfa, - 0x00, 0xa0, 0x81, 0xff, 0x09, 0x04, 0x56, 0xc0, 0x20, 0x71, 0xb8, 0x35, - 0x71, 0x84, 0x70, 0x88, 0xa1, 0x0a, 0x12, 0x58, 0x71, 0x90, 0x20, 0x71, - 0xb8, 0xf4, 0x70, 0x38, 0xa0, 0x05, 0x01, 0x28, 0x1b, 0x04, 0x56, 0xc0, - 0x71, 0x3a, 0x08, 0x04, 0x56, 0xc0, 0x20, 0x71, 0xb8, 0x35, 0x71, 0x8c, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x84, 0xa1, 0x0a, 0x0a, 0x04, - 0x56, 0xdb, 0x0e, 0x04, 0x56, 0x7c, 0x20, 0x71, 0x00, 0x00, 0x70, 0x18, - 0xd0, 0x84, 0x19, 0x04, 0x56, 0x7c, 0x20, 0x01, 0xff, 0xff, 0x20, 0x71, - 0xb8, 0xf4, 0x70, 0x3a, 0x20, 0x71, 0xb8, 0x35, 0x70, 0x00, 0xa0, 0x86, - 0x00, 0x02, 0x11, 0x50, 0x08, 0x0c, 0x57, 0x94, 0x20, 0x71, 0x00, 0x00, - 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x08, 0x04, 0x56, 0x7c, - 0x08, 0x0c, 0x57, 0xbe, 0x20, 0x71, 0x00, 0x00, 0x70, 0x1b, 0x00, 0x01, - 0x20, 0x91, 0x40, 0x80, 0x08, 0x04, 0x56, 0x7c, 0x20, 0x71, 0xb8, 0x35, - 0x70, 0x00, 0xa0, 0x05, 0x09, 0x04, 0x56, 0xa2, 0x69, 0x34, 0xa1, 0x86, - 0x01, 0x03, 0x19, 0x04, 0x56, 0x7f, 0x68, 0x4c, 0xd0, 0xbc, 0x19, 0x04, - 0x56, 0xa2, 0x69, 0x48, 0x68, 0x44, 0xa1, 0x05, 0x19, 0x04, 0x56, 0x97, - 0x20, 0x09, 0x80, 0x20, 0x20, 0x71, 0xb8, 0x35, 0x70, 0x00, 0x00, 0x02, - 0x56, 0xa2, 0x56, 0x62, 0x56, 0x3a, 0x56, 0x4c, 0x56, 0x19, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x20, 0x99, 0xb6, 0x76, 0x20, 0xa1, 0xb8, 0x86, - 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa3, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, - 0x20, 0x71, 0xb8, 0x7d, 0xad, 0x80, 0x00, 0x0f, 0x70, 0x0e, 0x70, 0x13, - 0x00, 0x02, 0x70, 0x07, 0x00, 0x02, 0x70, 0x0b, 0x00, 0x00, 0x2e, 0x10, - 0x08, 0x0c, 0x16, 0x48, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x07, 0x00, 0x09, - 0x08, 0x04, 0x56, 0xc0, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, 0x00, 0x1e, - 0x1a, 0x04, 0x56, 0xc0, 0xae, 0x90, 0x00, 0x03, 0xa2, 0x10, 0x68, 0x3c, - 0x20, 0x12, 0x71, 0x86, 0x20, 0x71, 0xb7, 0x14, 0x08, 0x0c, 0x58, 0x15, - 0x08, 0x04, 0x56, 0xc0, 0x70, 0x84, 0x80, 0x08, 0xa0, 0x92, 0x00, 0x0f, - 0x1a, 0x04, 0x56, 0xc0, 0xae, 0x90, 0x00, 0x03, 0x80, 0x03, 0xa2, 0x10, - 0x68, 0x3c, 0x20, 0x12, 0x82, 0x10, 0x68, 0x40, 0x20, 0x12, 0x71, 0x86, - 0x20, 0x71, 0xb7, 0x14, 0x08, 0x0c, 0x58, 0x15, 0x08, 0x04, 0x56, 0xc0, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x56, 0x7c, 0x20, 0x71, - 0x00, 0x00, 0x70, 0x18, 0xd0, 0x84, 0x11, 0x80, 0x71, 0x22, 0x68, 0x3c, - 0x70, 0x26, 0x68, 0x40, 0x70, 0x2a, 0x70, 0x1b, 0x00, 0x01, 0x20, 0x91, - 0x40, 0x80, 0x01, 0x2e, 0x20, 0x71, 0xb7, 0x14, 0x08, 0x0c, 0x58, 0x15, - 0x08, 0x04, 0x56, 0xc0, 0x01, 0x2e, 0x08, 0x04, 0x56, 0xc0, 0xa1, 0x8c, - 0x00, 0xff, 0xa1, 0x86, 0x00, 0x17, 0x01, 0x30, 0xa1, 0x86, 0x00, 0x1e, - 0x01, 0x18, 0xa1, 0x8e, 0x00, 0x1f, 0x11, 0xc0, 0x68, 0x4c, 0xd0, 0xcc, - 0x01, 0xa8, 0x68, 0x50, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x01, - 0x11, 0x78, 0x20, 0x09, 0x80, 0x21, 0x08, 0x04, 0x56, 0x10, 0x68, 0x44, - 0xa0, 0x86, 0x01, 0x00, 0x11, 0x38, 0x68, 0x68, 0xa0, 0x05, 0x11, 0x20, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x04, 0x56, 0x10, 0x20, 0x71, 0xb7, 0x14, - 0x08, 0x0c, 0x58, 0x27, 0x01, 0xc8, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x0f, - 0x00, 0x01, 0x69, 0x34, 0xa1, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x03, - 0x11, 0x30, 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0x81, 0x01, 0x01, 0x08, - 0x71, 0x0e, 0x70, 0x07, 0x00, 0x03, 0x08, 0x0c, 0x58, 0x40, 0x70, 0x50, - 0xa0, 0x86, 0x01, 0x00, 0x09, 0x04, 0x57, 0x80, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0xb7, 0x14, 0x70, 0x08, 0xa0, 0x86, 0x00, 0x01, - 0x11, 0x80, 0x0e, 0x04, 0x56, 0xd9, 0x20, 0x09, 0x00, 0x0d, 0x70, 0x30, - 0x20, 0x0a, 0x20, 0x91, 0x40, 0x80, 0x70, 0x0b, 0x00, 0x00, 0x70, 0x04, - 0xa0, 0x86, 0x00, 0x06, 0x11, 0x10, 0x70, 0x07, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x05, 0x20, 0x71, 0xb7, 0x14, 0x08, 0x0c, 0x58, 0x27, 0x05, 0x18, - 0x20, 0x71, 0xb8, 0x35, 0x70, 0x84, 0x70, 0x0a, 0x20, 0xa9, 0x00, 0x20, - 0x20, 0x99, 0xb8, 0x36, 0x20, 0xa1, 0xb8, 0x5d, 0x53, 0xa3, 0x70, 0x87, - 0x00, 0x00, 0x20, 0x71, 0xb7, 0x14, 0x20, 0x69, 0xb8, 0x7d, 0x70, 0x6c, - 0x68, 0x26, 0x70, 0x70, 0x68, 0x2a, 0x70, 0x74, 0x68, 0x2e, 0x70, 0x78, - 0x68, 0x32, 0x2d, 0x10, 0x08, 0x0c, 0x16, 0x48, 0x70, 0x07, 0x00, 0x08, - 0x20, 0x01, 0xff, 0xff, 0x20, 0x71, 0xb8, 0xf4, 0x70, 0x3a, 0x01, 0x2e, - 0x08, 0x04, 0x56, 0xc0, 0x20, 0x69, 0xb8, 0x7d, 0x68, 0x08, 0xa0, 0x8e, - 0x00, 0x00, 0x09, 0x04, 0x57, 0x5b, 0xa0, 0x8e, 0x02, 0x00, 0x09, 0x04, - 0x57, 0x59, 0xa0, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x57, 0x5b, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x57, 0x57, 0x20, 0x69, 0x00, 0x00, - 0x68, 0x18, 0xd0, 0x84, 0x15, 0xc0, 0x70, 0x2c, 0x71, 0x30, 0x81, 0x08, - 0xa1, 0x02, 0x02, 0x30, 0xa0, 0x0e, 0x70, 0x34, 0x70, 0x6e, 0x70, 0x38, - 0x70, 0x72, 0x00, 0x48, 0x70, 0x6c, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x6e, - 0x12, 0x20, 0x70, 0x70, 0xa0, 0x81, 0x00, 0x00, 0x70, 0x72, 0x71, 0x32, - 0x69, 0x36, 0x70, 0x0b, 0x00, 0x00, 0x20, 0x01, 0xb8, 0x5a, 0x20, 0x04, - 0xa0, 0x05, 0x11, 0x90, 0x69, 0x34, 0x20, 0x69, 0xb8, 0x35, 0x68, 0x9c, - 0x69, 0x9e, 0x20, 0x69, 0xb8, 0xf4, 0xa1, 0x02, 0x11, 0x18, 0x68, 0x3c, - 0xa0, 0x05, 0x13, 0x68, 0x20, 0x01, 0xb8, 0x5b, 0x20, 0x0c, 0x81, 0x0d, - 0x69, 0x3e, 0x00, 0x38, 0x20, 0x09, 0x80, 0x40, 0x69, 0x22, 0x68, 0x1b, - 0x00, 0x01, 0x20, 0x91, 0x40, 0x80, 0x70, 0x07, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x10, 0x70, 0x07, 0x00, 0x05, 0x00, 0x05, 0x20, 0x01, 0xb8, 0x7f, - 0x20, 0x04, 0xa0, 0x8e, 0x01, 0x00, 0x11, 0x28, 0x70, 0x07, 0x00, 0x01, - 0x08, 0x0c, 0x58, 0x15, 0x00, 0x05, 0xa0, 0x8e, 0x00, 0x00, 0x0d, 0xe0, - 0xa0, 0x8e, 0x02, 0x00, 0x1d, 0xc8, 0x70, 0x07, 0x00, 0x05, 0x00, 0x05, - 0x70, 0x1c, 0xa0, 0x6d, 0x01, 0x58, 0x08, 0x0c, 0x58, 0x27, 0x01, 0x40, - 0x70, 0x07, 0x00, 0x03, 0x08, 0x0c, 0x58, 0x40, 0x70, 0x50, 0xa0, 0x86, - 0x01, 0x00, 0x01, 0x10, 0x00, 0x05, 0x00, 0x05, 0x70, 0x50, 0xa0, 0x9e, - 0x01, 0x00, 0x11, 0x18, 0x70, 0x07, 0x00, 0x04, 0x00, 0x30, 0xa0, 0x86, - 0x02, 0x00, 0x11, 0x10, 0x70, 0x07, 0x00, 0x05, 0x00, 0x05, 0x08, 0x0c, - 0x57, 0xe3, 0x70, 0x06, 0x08, 0x0c, 0x58, 0x15, 0x00, 0x05, 0x00, 0x05, - 0x00, 0xe6, 0x01, 0x56, 0x20, 0x71, 0xb8, 0x35, 0x71, 0x84, 0x81, 0xff, - 0x05, 0x00, 0xa0, 0x06, 0x70, 0x86, 0xae, 0x80, 0x00, 0x03, 0x20, 0x71, - 0x00, 0x00, 0x21, 0xa8, 0x20, 0x14, 0x72, 0x26, 0x80, 0x00, 0x0f, 0x04, - 0x57, 0xb8, 0x20, 0x14, 0x72, 0x2a, 0x80, 0x00, 0x0f, 0x04, 0x57, 0xb8, - 0x20, 0x14, 0x72, 0x2e, 0x80, 0x00, 0x0f, 0x04, 0x57, 0xb8, 0x20, 0x14, - 0x72, 0x3a, 0x80, 0x00, 0x0f, 0x04, 0x57, 0xb8, 0x20, 0x14, 0x72, 0x3e, - 0xa1, 0x80, 0x80, 0x30, 0x70, 0x22, 0x01, 0x5e, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x01, 0x56, 0x20, 0x71, 0xb8, 0x35, 0x71, 0x84, 0x81, 0xff, - 0x01, 0xd8, 0xa0, 0x06, 0x70, 0x86, 0xae, 0x80, 0x00, 0x03, 0x20, 0x71, - 0x00, 0x00, 0x21, 0xa8, 0x20, 0x14, 0x72, 0x26, 0x80, 0x00, 0x20, 0x14, - 0x72, 0x2a, 0x80, 0x00, 0x0f, 0x04, 0x57, 0xda, 0x20, 0x14, 0x72, 0x3a, - 0x80, 0x00, 0x20, 0x14, 0x72, 0x3e, 0x00, 0x18, 0x20, 0x01, 0x80, 0x20, - 0x00, 0x10, 0x20, 0x01, 0x80, 0x42, 0x70, 0x22, 0x01, 0x5e, 0x00, 0xee, - 0x00, 0x05, 0x70, 0x2c, 0x71, 0x30, 0x81, 0x08, 0xa1, 0x02, 0x02, 0x30, - 0xa0, 0x0e, 0x70, 0x34, 0x70, 0x6e, 0x70, 0x38, 0x70, 0x72, 0x00, 0x48, - 0x70, 0x6c, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x6e, 0x12, 0x20, 0x70, 0x70, - 0xa0, 0x81, 0x00, 0x00, 0x70, 0x72, 0x71, 0x32, 0x70, 0x0c, 0x80, 0x01, - 0x70, 0x0e, 0x11, 0x80, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, - 0x58, 0x0f, 0x20, 0x01, 0x00, 0x0d, 0x21, 0x02, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x01, 0x70, 0x0b, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x01, 0x00, 0x07, 0x00, 0x05, 0x20, 0x01, 0x00, 0x06, 0x70, 0x0b, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x1c, 0xa0, 0x6d, 0x01, 0x70, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, - 0x2d, 0x04, 0x70, 0x1e, 0xa0, 0x05, 0x11, 0x08, 0x70, 0x1a, 0x01, 0x2e, - 0x08, 0x0c, 0x16, 0x14, 0x00, 0x05, 0x20, 0x19, 0x00, 0x0d, 0x23, 0x04, - 0x23, 0x0c, 0xa1, 0x0e, 0x01, 0x30, 0x23, 0x04, 0x23, 0x0c, 0xa1, 0x0e, - 0x01, 0x10, 0xa0, 0x06, 0x00, 0x60, 0x73, 0x2c, 0x83, 0x19, 0x71, 0x30, - 0xa1, 0x02, 0x11, 0x18, 0x23, 0x00, 0xa0, 0x05, 0x00, 0x20, 0x02, 0x10, - 0xa3, 0x02, 0x00, 0x08, 0x80, 0x02, 0x00, 0x05, 0x2d, 0x00, 0x70, 0x26, - 0xa0, 0x80, 0x00, 0x0d, 0x70, 0x56, 0x70, 0x53, 0x00, 0x00, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0xb9, 0x13, 0x21, 0x04, 0xc0, 0x8d, - 0x20, 0x0a, 0x01, 0x2e, 0x08, 0x0c, 0x16, 0x64, 0x00, 0x05, 0x70, 0x8c, - 0xa0, 0x8a, 0x00, 0x29, 0x12, 0x20, 0xa0, 0x82, 0x00, 0x1d, 0x00, 0x33, - 0x00, 0x10, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x27, 0x1e, 0x00, 0x00, 0x05, - 0x59, 0x4e, 0x58, 0xc9, 0x58, 0xe1, 0x59, 0x1e, 0x59, 0x3f, 0x59, 0x79, - 0x59, 0x8b, 0x58, 0xe1, 0x59, 0x65, 0x58, 0x6d, 0x58, 0x9b, 0x58, 0x6c, - 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0xa0, 0x05, - 0x11, 0x80, 0x68, 0x08, 0xa0, 0x05, 0x15, 0x18, 0x70, 0x8f, 0x00, 0x28, - 0x20, 0x69, 0xb8, 0xc6, 0x2d, 0x04, 0x70, 0x02, 0x08, 0x0c, 0x5c, 0x43, - 0x60, 0x28, 0xa0, 0x85, 0x06, 0x00, 0x60, 0x2a, 0x00, 0xb0, 0x70, 0x8f, - 0x00, 0x28, 0x20, 0x69, 0xb8, 0xc6, 0x2d, 0x04, 0x70, 0x02, 0x60, 0x28, - 0xa0, 0x85, 0x06, 0x00, 0x60, 0x2a, 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, - 0x00, 0x56, 0x20, 0x71, 0xb9, 0x24, 0x08, 0x0c, 0x1e, 0x1a, 0x00, 0x5e, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, - 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0xa0, 0x05, 0x11, 0x80, 0x68, 0x08, - 0xa0, 0x05, 0x15, 0x18, 0x70, 0x8f, 0x00, 0x28, 0x20, 0x69, 0xb8, 0xc6, - 0x2d, 0x04, 0x70, 0x02, 0x08, 0x0c, 0x5c, 0xd0, 0x60, 0x28, 0xa0, 0x85, - 0x06, 0x00, 0x60, 0x2a, 0x00, 0xb0, 0x70, 0x8f, 0x00, 0x28, 0x20, 0x69, - 0xb8, 0xc6, 0x2d, 0x04, 0x70, 0x02, 0x60, 0x28, 0xa0, 0x85, 0x06, 0x00, - 0x60, 0x2a, 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, - 0xb9, 0x24, 0x08, 0x0c, 0x1e, 0x1a, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, 0x68, 0x03, 0x00, 0x90, 0x61, 0x24, - 0xd1, 0xe4, 0x11, 0x90, 0x08, 0x0c, 0x59, 0xf6, 0xd1, 0xd4, 0x11, 0x60, - 0xd1, 0xdc, 0x11, 0x38, 0xd1, 0xcc, 0x01, 0x50, 0x70, 0x8f, 0x00, 0x20, - 0x08, 0x0c, 0x59, 0xf6, 0x00, 0x28, 0x70, 0x8f, 0x00, 0x1d, 0x00, 0x10, - 0x70, 0x8f, 0x00, 0x1f, 0x00, 0x05, 0x68, 0x03, 0x00, 0x88, 0x61, 0x24, - 0xd1, 0xcc, 0x15, 0x90, 0xd1, 0xdc, 0x15, 0x68, 0xd1, 0xe4, 0x15, 0x40, - 0xa1, 0x84, 0x1e, 0x00, 0x15, 0x80, 0x60, 0xe3, 0x00, 0x01, 0x60, 0x0c, - 0xc0, 0xb4, 0x60, 0x0e, 0x08, 0x0c, 0x5b, 0x71, 0x08, 0x0c, 0x24, 0xe5, - 0x01, 0x56, 0x68, 0x03, 0x01, 0x00, 0x20, 0xa9, 0x00, 0x14, 0x68, 0x04, - 0xd0, 0xdc, 0x11, 0x18, 0x1f, 0x04, 0x58, 0xfb, 0x00, 0x48, 0x20, 0xa9, - 0x00, 0x14, 0x68, 0x03, 0x00, 0x80, 0x68, 0x04, 0xd0, 0xd4, 0x11, 0x30, - 0x1f, 0x04, 0x59, 0x05, 0x08, 0x0c, 0x5b, 0x92, 0x01, 0x5e, 0x00, 0x78, - 0x01, 0x5e, 0x70, 0x8f, 0x00, 0x28, 0x00, 0x58, 0x70, 0x8f, 0x00, 0x1e, - 0x00, 0x40, 0x70, 0x8f, 0x00, 0x1d, 0x00, 0x28, 0x70, 0x8f, 0x00, 0x20, - 0x00, 0x10, 0x70, 0x8f, 0x00, 0x1f, 0x00, 0x05, 0x60, 0xe3, 0x00, 0x01, - 0x60, 0x0c, 0xc0, 0xb4, 0x60, 0x0e, 0x08, 0x0c, 0x5b, 0x71, 0x08, 0x0c, - 0x24, 0xe5, 0x68, 0x03, 0x00, 0x80, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x80, - 0xd1, 0xdc, 0x11, 0x58, 0xd1, 0xe4, 0x11, 0x30, 0xa1, 0x84, 0x1e, 0x00, - 0x11, 0x58, 0x70, 0x8f, 0x00, 0x28, 0x00, 0x40, 0x70, 0x8f, 0x00, 0x1e, - 0x00, 0x28, 0x70, 0x8f, 0x00, 0x1d, 0x00, 0x10, 0x70, 0x8f, 0x00, 0x1f, - 0x00, 0x05, 0x68, 0x03, 0x00, 0xa0, 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x38, - 0xd1, 0xe4, 0x01, 0x38, 0x08, 0x0c, 0x1e, 0x63, 0x70, 0x8f, 0x00, 0x1e, - 0x00, 0x10, 0x70, 0x8f, 0x00, 0x1d, 0x00, 0x05, 0x08, 0x0c, 0x5a, 0x68, - 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x88, 0x08, 0x0c, 0x59, 0xf6, 0x00, 0x16, - 0x08, 0x0c, 0x1e, 0x63, 0x00, 0x1e, 0xd1, 0xd4, 0x11, 0x28, 0xd1, 0xe4, - 0x01, 0x38, 0x70, 0x8f, 0x00, 0x1e, 0x00, 0x20, 0x70, 0x8f, 0x00, 0x1f, - 0x08, 0x0c, 0x59, 0xf6, 0x00, 0x05, 0x68, 0x03, 0x00, 0xa0, 0x61, 0x24, - 0xd1, 0xd4, 0x11, 0x60, 0xd1, 0xcc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, - 0xd1, 0xe4, 0x01, 0x40, 0x70, 0x8f, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x8f, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x8f, 0x00, 0x21, 0x00, 0x05, 0x08, 0x0c, - 0x5a, 0x68, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, - 0xd1, 0xe4, 0x01, 0x40, 0x70, 0x8f, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x8f, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x8f, 0x00, 0x1f, 0x00, 0x05, 0x68, 0x03, - 0x00, 0x90, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x78, 0xd1, 0xcc, 0x11, 0x50, - 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x58, 0x70, 0x8f, 0x00, 0x1e, - 0x00, 0x40, 0x70, 0x8f, 0x00, 0x1d, 0x00, 0x28, 0x70, 0x8f, 0x00, 0x20, - 0x00, 0x10, 0x70, 0x8f, 0x00, 0x1f, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x71, 0xb6, 0x00, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0xe8, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xd1, 0xb4, - 0x01, 0xc0, 0xc1, 0xb4, 0x21, 0x02, 0x60, 0x27, 0x02, 0x00, 0xe0, 0x00, - 0xe0, 0x00, 0x60, 0x24, 0xd0, 0xcc, 0x01, 0x58, 0x68, 0x03, 0x00, 0xa0, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x03, 0x00, 0x01, 0x04, 0x28, 0x60, 0x28, 0xc0, 0xcd, 0x60, 0x2a, - 0x04, 0x08, 0x08, 0x0c, 0x5b, 0x5d, 0x01, 0x50, 0x08, 0x0c, 0x5b, 0x53, - 0x11, 0x38, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x27, 0xf8, 0x08, 0x0c, - 0x5b, 0x18, 0x00, 0xa0, 0x08, 0x0c, 0x5a, 0x65, 0x01, 0x78, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x27, 0xf8, 0x70, 0x8c, 0xa0, 0x86, 0x00, 0x1e, - 0x01, 0x20, 0x70, 0x8c, 0xa0, 0x86, 0x00, 0x22, 0x11, 0x18, 0x70, 0x8f, - 0x00, 0x25, 0x00, 0x10, 0x70, 0x8f, 0x00, 0x21, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, 0x20, 0x11, - 0x5a, 0x07, 0x08, 0x0c, 0x6a, 0xce, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x26, - 0x20, 0x09, 0x00, 0x64, 0x20, 0x11, 0x5a, 0x07, 0x08, 0x0c, 0x6a, 0xc5, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xf6, 0x00, 0x16, - 0x08, 0x0c, 0x7d, 0xf3, 0x20, 0x71, 0xb6, 0x00, 0x08, 0x0c, 0x59, 0xa2, - 0x00, 0x1e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x26, - 0x08, 0x0c, 0x7d, 0xf3, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, - 0x20, 0x71, 0xb6, 0x00, 0x20, 0x91, 0x80, 0x00, 0x60, 0x28, 0xc0, 0x9c, - 0x60, 0x2a, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x08, 0x0c, - 0x6a, 0x82, 0x00, 0x36, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, - 0x00, 0x3e, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xb4, 0xeb, 0x08, 0x0c, - 0xb5, 0x06, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, 0x00, 0x04, 0x60, 0x27, - 0x00, 0x08, 0x08, 0x0c, 0x12, 0xe2, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x27, 0xf8, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x04, 0xa0, 0x86, 0x00, 0x04, 0x01, 0x40, 0x20, 0x01, 0xb8, 0x9e, - 0x20, 0x03, 0xaa, 0xaa, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x00, - 0x00, 0x05, 0x60, 0x20, 0xd0, 0x9c, 0x00, 0x05, 0x68, 0x00, 0xa0, 0x86, - 0x00, 0xc0, 0x01, 0x60, 0x68, 0x03, 0x00, 0xc0, 0x01, 0x56, 0x20, 0xa9, - 0x00, 0x2d, 0x1d, 0x04, 0x5a, 0x71, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, - 0x5a, 0x71, 0x01, 0x5e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0xb6, 0x00, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x0c, 0xa1, 0x86, 0x00, 0x00, 0x01, 0x58, - 0xa1, 0x86, 0x00, 0x01, 0x01, 0x58, 0xa1, 0x86, 0x00, 0x02, 0x01, 0x58, - 0xa1, 0x86, 0x00, 0x03, 0x01, 0x58, 0x08, 0x04, 0x5b, 0x06, 0x70, 0x8f, - 0x00, 0x22, 0x00, 0x40, 0x70, 0x8f, 0x00, 0x21, 0x00, 0x28, 0x70, 0x8f, - 0x00, 0x23, 0x00, 0x20, 0x70, 0x8f, 0x00, 0x24, 0x60, 0x43, 0x00, 0x00, - 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x01, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x28, 0xa7, 0x00, 0x26, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, - 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, - 0x7f, 0xe0, 0x00, 0x36, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, - 0x00, 0x3e, 0x00, 0x2e, 0x70, 0x00, 0xa0, 0x8e, 0x00, 0x04, 0x01, 0x18, - 0x60, 0x2b, 0x00, 0x28, 0x00, 0x10, 0x60, 0x2b, 0x00, 0x20, 0x01, 0x56, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, 0x60, 0x24, - 0xd0, 0xac, 0x01, 0x20, 0x01, 0x2e, 0x01, 0x5e, 0x08, 0x04, 0x5b, 0x14, - 0x68, 0x00, 0xa0, 0x84, 0x00, 0xa0, 0xc0, 0xbd, 0x68, 0x02, 0x69, 0x04, - 0xd1, 0xd4, 0x11, 0x30, 0x68, 0x03, 0x01, 0x00, 0x1f, 0x04, 0x5a, 0xc9, - 0x08, 0x0c, 0x5b, 0x92, 0x01, 0x2e, 0x01, 0x5e, 0x08, 0x0c, 0x5b, 0x53, - 0x01, 0xa8, 0x60, 0x44, 0xa0, 0x05, 0x01, 0x68, 0x60, 0x50, 0x00, 0x06, - 0xa0, 0x85, 0x00, 0x20, 0x60, 0x52, 0x08, 0x0c, 0x5b, 0x92, 0xa0, 0x06, - 0x80, 0x01, 0x1d, 0xf0, 0x00, 0x0e, 0x60, 0x52, 0x00, 0x28, 0x68, 0x04, - 0xd0, 0xd4, 0x11, 0x10, 0x08, 0x0c, 0x5b, 0x92, 0x00, 0x16, 0x00, 0x26, - 0x20, 0x09, 0x00, 0xc8, 0x20, 0x11, 0x5a, 0x14, 0x08, 0x0c, 0x6a, 0x94, - 0x00, 0x2e, 0x00, 0x1e, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x04, - 0x08, 0x0c, 0x58, 0x53, 0x08, 0x0c, 0x5b, 0x53, 0x01, 0x48, 0x68, 0x04, - 0xd0, 0xd4, 0x11, 0x30, 0xd0, 0xdc, 0x11, 0x00, 0x20, 0x01, 0xb8, 0x9f, - 0x20, 0x03, 0x00, 0x00, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x71, 0xb6, 0x00, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0xb8, 0x8f, 0x20, 0x03, 0x00, 0x00, 0x70, 0x8f, - 0x00, 0x00, 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x00, 0x20, 0x01, - 0x00, 0x00, 0x08, 0x0c, 0x28, 0xa7, 0x68, 0x03, 0x00, 0x00, 0x60, 0x43, - 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x60, 0x27, 0xff, 0xff, 0x60, 0x2b, - 0x18, 0x2f, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x04, 0xa0, 0x86, 0xaa, 0xaa, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0x30, 0xa0, 0x86, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xa0, 0x84, 0x00, 0x30, 0xa0, 0x86, - 0x00, 0x30, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x72, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x30, 0xa0, 0x86, 0x00, 0x10, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0x30, 0xa0, 0x86, 0x00, 0x20, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x01, - 0xb6, 0x0c, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x70, 0x08, 0x0c, 0x28, 0xc7, - 0x00, 0x36, 0x00, 0x16, 0x20, 0x09, 0x00, 0x00, 0x20, 0x19, 0x00, 0x28, - 0x08, 0x0c, 0x2c, 0xa4, 0x00, 0x1e, 0x00, 0x3e, 0xa0, 0x06, 0x00, 0x09, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x0c, 0x2e, 0x04, 0x01, 0x18, - 0xa0, 0x85, 0x00, 0x10, 0x00, 0x10, 0xa0, 0x84, 0xff, 0xef, 0x20, 0x72, - 0x00, 0xee, 0x00, 0x05, 0x60, 0x50, 0x00, 0x06, 0x60, 0xf0, 0x00, 0x06, - 0x60, 0xec, 0x00, 0x06, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x04, 0x00, 0x06, - 0x60, 0x28, 0x00, 0x06, 0x60, 0x2f, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, - 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, 0x00, 0x0e, 0x60, 0x2a, - 0x00, 0x0e, 0x60, 0x06, 0x00, 0x0e, 0x60, 0x0e, 0x00, 0x0e, 0x60, 0xee, - 0x00, 0x0e, 0x60, 0xf2, 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0xa7, 0x68, 0x00, 0xa0, 0x84, - 0x00, 0xa0, 0xc0, 0xbd, 0x68, 0x02, 0x68, 0x03, 0x00, 0xa0, 0x00, 0x0e, - 0x60, 0x52, 0x60, 0x50, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0xb6, 0x00, 0x60, 0x20, 0xa0, 0x84, - 0x00, 0x80, 0x01, 0x38, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xc1, 0xbd, - 0x21, 0x02, 0x08, 0x04, 0x5c, 0x3b, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, - 0xc1, 0xbc, 0x21, 0x02, 0x60, 0x28, 0xa0, 0x84, 0xe1, 0xff, 0x60, 0x2a, - 0x60, 0x27, 0x02, 0x00, 0x68, 0x03, 0x00, 0x90, 0x20, 0xa9, 0x03, 0x84, - 0x60, 0x24, 0xd0, 0xcc, 0x15, 0x08, 0x1d, 0x04, 0x5b, 0xea, 0x20, 0x91, - 0x60, 0x00, 0x1f, 0x04, 0x5b, 0xea, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, - 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, - 0x7f, 0xe0, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, 0x68, 0x03, - 0x00, 0xa0, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x04, 0x68, - 0x86, 0xff, 0x11, 0x20, 0x08, 0x0c, 0x1e, 0x63, 0x08, 0x0c, 0x24, 0xe5, - 0x60, 0xe3, 0x00, 0x00, 0x20, 0x01, 0xb8, 0x8f, 0x20, 0x04, 0x08, 0x0c, - 0x28, 0xa7, 0x60, 0xe2, 0x68, 0x03, 0x00, 0x80, 0x20, 0xa9, 0x03, 0x84, - 0x60, 0x27, 0x1e, 0x00, 0x20, 0x09, 0x1e, 0x00, 0xe0, 0x00, 0x60, 0x24, - 0xa1, 0x0c, 0x01, 0x38, 0x1d, 0x04, 0x5c, 0x20, 0x20, 0x91, 0x60, 0x00, - 0x1f, 0x04, 0x5c, 0x20, 0x08, 0x20, 0x60, 0x28, 0xa0, 0x85, 0x1e, 0x00, - 0x60, 0x2a, 0x70, 0xa4, 0xa0, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, - 0x00, 0x08, 0x68, 0x86, 0xa0, 0x06, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0xb6, 0x00, 0x20, 0x69, 0x01, 0x40, - 0x60, 0x20, 0xa0, 0x84, 0x00, 0xc0, 0x01, 0x20, 0x68, 0x84, 0xa0, 0x05, - 0x19, 0x04, 0x5c, 0x97, 0x68, 0x03, 0x00, 0x88, 0x60, 0xe3, 0x00, 0x00, - 0x68, 0x87, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x28, 0xa7, - 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0xa0, 0x05, 0x11, 0x18, 0x68, 0x08, - 0xa0, 0x05, 0x01, 0xc0, 0x60, 0x28, 0xa0, 0x84, 0xfb, 0xff, 0x60, 0x2a, - 0x60, 0x27, 0x04, 0x00, 0x20, 0x69, 0xb8, 0xc6, 0x70, 0x00, 0x20, 0x6a, - 0x70, 0x8f, 0x00, 0x26, 0x70, 0x03, 0x00, 0x01, 0x20, 0xa9, 0x00, 0x02, - 0x1d, 0x04, 0x5c, 0x7a, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x5c, 0x7a, - 0x08, 0x04, 0x5c, 0xc8, 0x20, 0x69, 0x01, 0x40, 0x20, 0xa9, 0x03, 0x84, - 0x60, 0x27, 0x1e, 0x00, 0x20, 0x09, 0x1e, 0x00, 0xe0, 0x00, 0x60, 0x24, - 0xa1, 0x0c, 0x05, 0x20, 0xa0, 0x84, 0x1a, 0x00, 0x15, 0x08, 0x1d, 0x04, - 0x5c, 0x86, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x5c, 0x86, 0x20, 0x11, - 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, - 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, - 0x80, 0x6b, 0x68, 0x03, 0x00, 0xa0, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, - 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0xb0, 0x08, 0x0c, 0x24, 0xe5, 0x68, 0x03, 0x00, 0x80, - 0x20, 0x69, 0x01, 0x40, 0x60, 0xe3, 0x00, 0x00, 0x70, 0xa4, 0xa0, 0x05, - 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, 0x00, 0x08, 0x68, 0x86, 0x20, 0x01, - 0xb8, 0x8f, 0x20, 0x04, 0x08, 0x0c, 0x28, 0xa7, 0x60, 0xe2, 0xa0, 0x06, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0xb6, 0x00, 0x60, 0x20, 0xa0, 0x84, 0x00, 0xc0, 0x01, 0xe0, 0x20, 0x11, - 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, - 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, - 0x80, 0x6b, 0x20, 0x69, 0x01, 0x40, 0x68, 0x03, 0x00, 0xa0, 0x20, 0x01, - 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, - 0x00, 0x01, 0x08, 0x04, 0x5d, 0x6d, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, - 0xd1, 0xb4, 0x11, 0x60, 0xc1, 0xb5, 0x21, 0x02, 0x08, 0x0c, 0x59, 0xfc, - 0x20, 0x69, 0x01, 0x40, 0x08, 0x0c, 0x24, 0xe5, 0x68, 0x03, 0x00, 0x80, - 0x60, 0xe3, 0x00, 0x00, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0xa0, 0x05, - 0x11, 0x18, 0x68, 0x08, 0xa0, 0x05, 0x01, 0xc0, 0x60, 0x28, 0xa0, 0x84, - 0xfd, 0xff, 0x60, 0x2a, 0x60, 0x27, 0x02, 0x00, 0x20, 0x69, 0xb8, 0xc6, - 0x70, 0x00, 0x20, 0x6a, 0x70, 0x8f, 0x00, 0x27, 0x70, 0x03, 0x00, 0x01, - 0x20, 0xa9, 0x00, 0x02, 0x1d, 0x04, 0x5d, 0x24, 0x20, 0x91, 0x60, 0x00, - 0x1f, 0x04, 0x5d, 0x24, 0x08, 0x04, 0x5d, 0x6d, 0x60, 0x27, 0x1e, 0x00, - 0x20, 0x09, 0x1e, 0x00, 0xe0, 0x00, 0x60, 0x24, 0xa1, 0x0c, 0x01, 0xc8, - 0xa0, 0x84, 0x1c, 0x00, 0x11, 0xb0, 0x1d, 0x04, 0x5d, 0x2c, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x08, 0x0c, 0x69, 0x6b, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xe6, - 0x20, 0x71, 0xb8, 0xf4, 0x70, 0x18, 0x00, 0xee, 0xa0, 0x05, 0x1d, 0x00, - 0x05, 0x00, 0x00, 0x26, 0x20, 0x11, 0x5a, 0x14, 0x08, 0x0c, 0x6a, 0x0e, - 0x20, 0x11, 0x5a, 0x07, 0x08, 0x0c, 0x6a, 0xce, 0x00, 0x2e, 0x20, 0x69, - 0x01, 0x40, 0x60, 0xe3, 0x00, 0x00, 0x70, 0xa4, 0xa0, 0x05, 0x11, 0x18, - 0x68, 0x87, 0x00, 0x01, 0x00, 0x08, 0x68, 0x86, 0x20, 0x01, 0xb8, 0x8f, - 0x20, 0x04, 0x08, 0x0c, 0x28, 0xa7, 0x60, 0xe2, 0x20, 0x01, 0xb6, 0x0c, - 0x20, 0x0c, 0xc1, 0xb4, 0x21, 0x02, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xc6, 0x00, 0xe6, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0xb6, 0x00, 0x71, 0x30, 0xd1, 0x84, - 0x11, 0x80, 0x20, 0x11, 0xb6, 0x53, 0x22, 0x14, 0xd2, 0xec, 0x01, 0x38, - 0xc1, 0x8d, 0x71, 0x32, 0x20, 0x11, 0xb6, 0x53, 0x22, 0x14, 0xd2, 0xac, - 0x11, 0x20, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, 0x5d, 0xda, 0x71, 0x30, - 0xc1, 0x85, 0x71, 0x32, 0x20, 0x11, 0xb6, 0x53, 0x22, 0x0c, 0xd1, 0xa4, - 0x05, 0x30, 0x00, 0x16, 0x20, 0x19, 0x00, 0x0e, 0x08, 0x0c, 0xb1, 0x21, - 0x01, 0x56, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0xa1, 0x86, - 0x00, 0x7e, 0x01, 0xa0, 0xa1, 0x86, 0x00, 0x80, 0x01, 0x88, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x70, 0x81, 0x27, 0xa0, 0x06, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x0e, 0x08, 0x0c, 0xb1, 0xa4, 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, - 0x01, 0x00, 0x08, 0x0c, 0x6b, 0x8c, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, - 0x5d, 0xa5, 0x01, 0x5e, 0x00, 0x1e, 0xd1, 0xac, 0x11, 0x48, 0x00, 0x16, - 0x20, 0x09, 0x00, 0x00, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x2c, 0xa4, - 0x00, 0x1e, 0x00, 0x70, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, - 0x00, 0x00, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x10, 0x08, 0x0c, 0x4c, 0x7e, - 0x81, 0x08, 0x1f, 0x04, 0x5d, 0xd1, 0x01, 0x5e, 0x08, 0x0c, 0x1e, 0x63, - 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0x80, 0xfc, 0x20, 0x11, 0x00, 0x02, - 0x08, 0x0c, 0x81, 0x06, 0x08, 0x0c, 0x7f, 0xe0, 0x00, 0x36, 0x20, 0x19, - 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, 0x00, 0x3e, 0x60, 0xe3, 0x00, 0x00, - 0x20, 0x01, 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x5a, 0x79, - 0x00, 0xee, 0x00, 0xce, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x00, 0x05, 0x20, 0x71, 0xb6, 0xe2, 0x70, 0x03, 0x00, 0x00, - 0x70, 0x07, 0x00, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x70, 0x2b, 0x00, 0x01, - 0x70, 0x4f, 0x00, 0x00, 0x70, 0x53, 0x00, 0x01, 0x70, 0x5f, 0x00, 0x20, - 0x70, 0x63, 0x00, 0x40, 0x70, 0x83, 0x00, 0x00, 0x70, 0x8b, 0x00, 0x00, - 0x70, 0x8f, 0x00, 0x01, 0x70, 0xbf, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0xb6, 0xe2, 0x68, 0x48, 0xa0, 0x05, 0x11, 0x30, 0x70, 0x28, - 0xc0, 0x85, 0x70, 0x2a, 0xa0, 0x85, 0x00, 0x01, 0x04, 0x28, 0x6a, 0x50, - 0x72, 0x36, 0x6b, 0x54, 0x73, 0x3a, 0x68, 0x58, 0x70, 0x3e, 0x70, 0x7a, - 0x68, 0x5c, 0x70, 0x42, 0x70, 0x7e, 0x68, 0x48, 0x70, 0x2e, 0x68, 0x40, - 0x70, 0x32, 0x20, 0x09, 0x00, 0x0c, 0x20, 0x0a, 0x80, 0x07, 0x80, 0x06, - 0x80, 0x06, 0xa0, 0x8c, 0x00, 0x3f, 0xa0, 0x84, 0xff, 0xc0, 0xa2, 0x10, - 0x21, 0x00, 0xa3, 0x19, 0x72, 0x72, 0x73, 0x76, 0x70, 0x28, 0xc0, 0x84, - 0x70, 0x2a, 0x70, 0x07, 0x00, 0x01, 0x70, 0x0f, 0x00, 0x00, 0xa0, 0x06, - 0x00, 0xee, 0x00, 0x05, 0x2b, 0x78, 0x20, 0x71, 0xb6, 0xe2, 0x70, 0x04, - 0x00, 0x43, 0x70, 0x0c, 0x00, 0x02, 0x5e, 0x56, 0x5e, 0x4d, 0x5e, 0x4d, - 0x5e, 0x4d, 0x5e, 0x4d, 0x00, 0x05, 0x5e, 0xac, 0x5e, 0xad, 0x5e, 0xdf, - 0x5e, 0xe0, 0x5e, 0xaa, 0x5f, 0x2e, 0x5f, 0x33, 0x5f, 0x64, 0x5f, 0x65, - 0x5f, 0x80, 0x5f, 0x81, 0x5f, 0x82, 0x5f, 0x83, 0x5f, 0x84, 0x5f, 0x85, - 0x60, 0x3b, 0x60, 0x62, 0x70, 0x0c, 0x00, 0x02, 0x5e, 0x6f, 0x5e, 0xaa, - 0x5e, 0xaa, 0x5e, 0xab, 0x5e, 0xab, 0x78, 0x30, 0x79, 0x30, 0xa1, 0x06, - 0x01, 0x20, 0x78, 0x30, 0x79, 0x30, 0xa1, 0x06, 0x15, 0x10, 0x70, 0x30, - 0xa1, 0x0a, 0x01, 0xf8, 0x12, 0x10, 0x71, 0x2c, 0xa1, 0x0a, 0xa1, 0x8a, - 0x00, 0x02, 0x12, 0xd0, 0x08, 0x0c, 0x15, 0xe4, 0x01, 0xb0, 0x2d, 0x00, - 0x70, 0x5a, 0x70, 0x63, 0x00, 0x40, 0x20, 0x01, 0x00, 0x03, 0x70, 0x57, - 0x00, 0x00, 0x01, 0x26, 0x00, 0x06, 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, - 0xb9, 0x13, 0x21, 0x04, 0xc0, 0x85, 0x20, 0x0a, 0x00, 0x0e, 0x70, 0x0e, - 0x01, 0x2e, 0x08, 0x0c, 0x16, 0x64, 0x00, 0x05, 0x08, 0x0c, 0x15, 0xe4, - 0x0d, 0xe0, 0x2d, 0x00, 0x70, 0x5a, 0x08, 0x0c, 0x15, 0xe4, 0x11, 0x08, - 0x0c, 0x10, 0x2d, 0x00, 0x70, 0x86, 0x70, 0x63, 0x00, 0x80, 0x20, 0x01, - 0x00, 0x04, 0x08, 0xf8, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x70, 0x0c, - 0x00, 0x02, 0x5e, 0xb4, 0x5e, 0xb7, 0x5e, 0xc5, 0x5e, 0xde, 0x5e, 0xde, - 0x08, 0x0c, 0x5e, 0x68, 0x00, 0x05, 0x01, 0x26, 0x80, 0x01, 0x70, 0x0e, - 0x70, 0x58, 0x00, 0x06, 0x08, 0x0c, 0x63, 0xb5, 0x01, 0x20, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x5e, 0x68, 0x00, 0xde, 0x00, 0x48, 0x01, 0x26, - 0x80, 0x01, 0x70, 0x0e, 0x08, 0x0c, 0x63, 0xb5, 0x70, 0x58, 0x20, 0x68, - 0x70, 0x84, 0x70, 0x5a, 0x68, 0x03, 0x00, 0x00, 0x68, 0x07, 0x00, 0x00, - 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8a, 0x00, 0x3a, 0x12, 0x18, - 0x00, 0xdb, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x2e, 0x08, 0x0c, 0x5f, 0x86, - 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0xe2, - 0x70, 0x0c, 0x00, 0x02, 0x5e, 0xeb, 0x5e, 0xeb, 0x5e, 0xeb, 0x5e, 0xed, - 0x5e, 0xf0, 0x00, 0xee, 0x00, 0x05, 0x70, 0x0f, 0x00, 0x01, 0x00, 0x10, - 0x70, 0x0f, 0x00, 0x02, 0x00, 0xee, 0x00, 0x05, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0xa2, 0x5f, 0x86, 0x61, 0x1f, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0xa2, 0x61, 0x61, 0x61, 0xa4, 0x61, 0xed, - 0x62, 0x01, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0xbe, 0x5f, 0xa2, 0x5f, 0x86, - 0x5f, 0x86, 0x60, 0x18, 0x62, 0xad, 0x62, 0xc8, 0x5f, 0x86, 0x5f, 0xbe, - 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x60, 0x0e, 0x62, 0xc8, - 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0xd2, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0x86, 0x63, 0xd3, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, - 0x5f, 0x86, 0x5f, 0xe7, 0x70, 0x20, 0x20, 0x68, 0x08, 0x0c, 0x16, 0x14, - 0x00, 0x05, 0x70, 0x0c, 0x00, 0x02, 0x5f, 0x3a, 0x5f, 0x3d, 0x5f, 0x4b, - 0x5f, 0x63, 0x5f, 0x63, 0x08, 0x0c, 0x5e, 0x68, 0x00, 0x05, 0x01, 0x26, - 0x80, 0x01, 0x70, 0x0e, 0x70, 0x58, 0x00, 0x06, 0x08, 0x0c, 0x63, 0xb5, - 0x01, 0x20, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x5e, 0x68, 0x00, 0xde, - 0x00, 0x48, 0x01, 0x26, 0x80, 0x01, 0x70, 0x0e, 0x08, 0x0c, 0x63, 0xb5, - 0x70, 0x58, 0x20, 0x68, 0x70, 0x84, 0x70, 0x5a, 0x68, 0x03, 0x00, 0x00, - 0x68, 0x07, 0x00, 0x00, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x8a, - 0x00, 0x1a, 0x12, 0x18, 0x00, 0x3b, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x2e, - 0x04, 0x19, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x5f, 0x86, 0x5f, 0xa2, - 0x61, 0x0b, 0x5f, 0x86, 0x5f, 0xa2, 0x5f, 0x86, 0x5f, 0xa2, 0x5f, 0xa2, - 0x5f, 0x86, 0x5f, 0xa2, 0x61, 0x0b, 0x5f, 0xa2, 0x5f, 0xa2, 0x5f, 0xa2, - 0x5f, 0xa2, 0x5f, 0xa2, 0x5f, 0x86, 0x5f, 0xa2, 0x61, 0x0b, 0x5f, 0x86, - 0x5f, 0x86, 0x5f, 0xa2, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0x86, 0x5f, 0xa2, - 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, - 0x70, 0x07, 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xd5, - 0x68, 0x3a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, - 0x01, 0x2e, 0x00, 0x05, 0x70, 0x07, 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, - 0x00, 0xff, 0xc0, 0xe5, 0x68, 0x3a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x07, 0x00, 0x01, - 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xed, 0x68, 0x3a, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, 0x00, 0x05, - 0x70, 0x07, 0x00, 0x01, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0xc0, 0xdd, - 0x68, 0x3a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, - 0x01, 0x2e, 0x00, 0x05, 0x68, 0x34, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, - 0x09, 0x88, 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, - 0x60, 0xcb, 0x70, 0x07, 0x00, 0x06, 0x70, 0x12, 0x2d, 0x00, 0x70, 0x16, - 0x70, 0x1a, 0x70, 0x4b, 0x60, 0xcb, 0x00, 0x05, 0x68, 0x34, 0x80, 0x07, - 0xa0, 0x84, 0x00, 0xff, 0x09, 0x04, 0x5f, 0x94, 0x80, 0x01, 0x11, 0x20, - 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, 0x60, 0xe8, 0x70, 0x07, 0x00, 0x06, - 0x70, 0x12, 0x2d, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x60, 0xe8, - 0x00, 0x05, 0x68, 0x34, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, - 0x00, 0x01, 0x19, 0x04, 0x5f, 0x94, 0x70, 0x07, 0x00, 0x01, 0x20, 0x09, - 0xb6, 0x31, 0x21, 0x0c, 0x81, 0xff, 0x11, 0xa8, 0x68, 0x38, 0xa0, 0x84, - 0x00, 0xff, 0x68, 0x3a, 0x68, 0x53, 0x00, 0x00, 0x08, 0x0c, 0x4d, 0xf4, - 0x11, 0x08, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x68, 0x37, - 0x01, 0x39, 0x68, 0x4a, 0x69, 0x52, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, - 0x0c, 0xa0, 0x20, 0x01, 0x00, 0x28, 0x0c, 0x90, 0x68, 0x4c, 0xa0, 0x84, - 0x00, 0xc0, 0xa0, 0x86, 0x00, 0xc0, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, - 0x08, 0x04, 0x62, 0xe0, 0x2d, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x20, 0xa9, - 0x00, 0x04, 0xa0, 0x80, 0x00, 0x24, 0x20, 0x98, 0x20, 0xa1, 0xb7, 0x0d, - 0x53, 0xa3, 0x68, 0x58, 0x70, 0x12, 0xa0, 0x82, 0x04, 0x01, 0x1a, 0x04, - 0x5f, 0xb0, 0x6a, 0x84, 0xa2, 0x8a, 0x00, 0x02, 0x1a, 0x04, 0x5f, 0xb0, - 0x82, 0xff, 0x11, 0x38, 0x68, 0x88, 0x69, 0x8c, 0xa1, 0x05, 0x01, 0x18, - 0x20, 0x01, 0x60, 0x9e, 0x00, 0x18, 0xa2, 0x80, 0x60, 0x94, 0x20, 0x05, - 0x70, 0xc6, 0x70, 0x10, 0xa0, 0x15, 0x09, 0x04, 0x60, 0x80, 0x08, 0x0c, - 0x15, 0xe4, 0x11, 0x18, 0x70, 0x07, 0x00, 0x0f, 0x00, 0x05, 0x2d, 0x00, - 0x70, 0x22, 0x70, 0xc4, 0x20, 0x60, 0x2c, 0x05, 0x68, 0x36, 0xe0, 0x04, - 0xad, 0x00, 0x70, 0x96, 0xe0, 0x08, 0xa2, 0x0a, 0x12, 0x10, 0xa0, 0x0e, - 0x22, 0x00, 0x71, 0x12, 0xe2, 0x0c, 0x80, 0x03, 0x80, 0x0b, 0xa2, 0x96, - 0x00, 0x04, 0x01, 0x08, 0xa1, 0x08, 0x71, 0x9a, 0x81, 0x0b, 0x71, 0x9e, - 0xae, 0x90, 0x00, 0x22, 0x08, 0x0c, 0x16, 0x48, 0x70, 0x90, 0xa0, 0x8e, - 0x01, 0x00, 0x01, 0x70, 0xa0, 0x86, 0x02, 0x00, 0x01, 0x18, 0x70, 0x07, - 0x00, 0x10, 0x00, 0x05, 0x70, 0x20, 0x20, 0x68, 0x08, 0x0c, 0x16, 0x14, - 0x70, 0x14, 0x20, 0x68, 0x08, 0x04, 0x5f, 0xb0, 0x70, 0x20, 0x20, 0x68, - 0x70, 0x18, 0x68, 0x02, 0x68, 0x07, 0x00, 0x00, 0x2d, 0x08, 0x20, 0x68, - 0x69, 0x06, 0x71, 0x1a, 0x08, 0x04, 0x60, 0x3b, 0x70, 0x14, 0x20, 0x68, - 0x70, 0x07, 0x00, 0x01, 0x68, 0x84, 0xa0, 0x05, 0x11, 0x28, 0x68, 0x88, - 0x69, 0x8c, 0xa1, 0x05, 0x01, 0x08, 0x00, 0xb1, 0x68, 0x34, 0xa0, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x1e, 0x09, 0x04, 0x62, 0xe0, 0x04, 0xb8, - 0x60, 0x96, 0x60, 0x9a, 0x00, 0x02, 0x00, 0x11, 0x00, 0x07, 0x00, 0x04, - 0x00, 0x0a, 0x00, 0x0f, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x11, - 0x00, 0x05, 0x00, 0x04, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x76, - 0x00, 0x66, 0x6f, 0x88, 0x6e, 0x8c, 0x68, 0x04, 0x20, 0x60, 0xac, 0xf0, - 0x00, 0x21, 0xac, 0xf8, 0x00, 0x27, 0x20, 0x09, 0x00, 0x05, 0x70, 0x0c, - 0x78, 0x16, 0x70, 0x08, 0x78, 0x12, 0x70, 0x04, 0x78, 0x06, 0x70, 0x00, - 0x78, 0x02, 0x7e, 0x0e, 0x7f, 0x0a, 0x81, 0x09, 0x01, 0x28, 0xae, 0xf2, - 0x00, 0x04, 0xaf, 0xfa, 0x00, 0x06, 0x0c, 0x78, 0x60, 0x04, 0xa0, 0x65, - 0x1d, 0x30, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x09, 0xb6, 0x31, 0x21, 0x0c, 0x81, 0xff, 0x11, 0x98, - 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x3a, 0x08, 0x0c, 0x4c, 0xd7, - 0x11, 0x08, 0x00, 0x05, 0x08, 0x0c, 0x55, 0x4d, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x9f, 0x88, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, - 0x0c, 0xa0, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, 0x00, 0x00, 0x0c, 0x80, - 0x20, 0x09, 0xb6, 0x31, 0x21, 0x0c, 0x81, 0xff, 0x11, 0xb0, 0x68, 0x58, - 0xa0, 0x05, 0x01, 0xc0, 0x68, 0x38, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x3a, - 0x68, 0x53, 0x00, 0x00, 0x08, 0x0c, 0x4d, 0x98, 0x11, 0x08, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x68, 0x4a, 0x69, 0x52, 0x08, 0x0c, - 0x54, 0x7a, 0x01, 0x2e, 0x0c, 0xb0, 0x20, 0x01, 0x00, 0x28, 0x20, 0x09, - 0x00, 0x00, 0x0c, 0x90, 0x20, 0x01, 0x00, 0x00, 0x0c, 0x78, 0x70, 0x18, - 0x68, 0x02, 0x2d, 0x08, 0x20, 0x68, 0x69, 0x06, 0x71, 0x1a, 0x70, 0x10, - 0x80, 0x01, 0x70, 0x12, 0x01, 0x18, 0x70, 0x07, 0x00, 0x06, 0x00, 0x30, - 0x70, 0x14, 0x20, 0x68, 0x70, 0x07, 0x00, 0x01, 0x70, 0x48, 0x08, 0x0f, - 0x00, 0x05, 0x70, 0x07, 0x00, 0x01, 0x69, 0x44, 0x81, 0x0f, 0xa1, 0x8c, - 0x00, 0xff, 0x68, 0x48, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa9, 0x00, 0x01, - 0xa0, 0x96, 0x00, 0x01, 0x01, 0xb0, 0x20, 0x09, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0xff, 0xa0, 0x96, 0x00, 0x02, 0x01, 0x78, 0xa0, 0x05, 0x11, 0xf0, - 0x69, 0x44, 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0x08, 0x0c, 0x50, 0x1b, - 0x11, 0xb8, 0x00, 0x66, 0x6e, 0x50, 0x08, 0x0c, 0x51, 0x1a, 0x00, 0x6e, - 0x00, 0x88, 0x00, 0x46, 0x20, 0x11, 0xb6, 0x0c, 0x22, 0x24, 0xc4, 0x84, - 0x24, 0x12, 0x00, 0x4e, 0x00, 0xc6, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x10, - 0x08, 0x0c, 0x52, 0x7b, 0x81, 0x08, 0x1f, 0x04, 0x61, 0x4b, 0x00, 0xce, - 0x68, 0x4c, 0xd0, 0x84, 0x11, 0x18, 0x08, 0x0c, 0x16, 0x14, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x05, 0x80, 0x20, 0x61, - 0xb9, 0x75, 0x61, 0x00, 0xd1, 0x84, 0x01, 0x78, 0x68, 0x58, 0xa0, 0x84, - 0x00, 0xff, 0x15, 0x50, 0x60, 0x00, 0xd0, 0x84, 0x05, 0x20, 0x60, 0x04, - 0xa0, 0x05, 0x15, 0x38, 0x60, 0x03, 0x00, 0x00, 0x60, 0x0b, 0x00, 0x00, - 0x00, 0xc8, 0x20, 0x11, 0x00, 0x01, 0x68, 0x60, 0xa0, 0x05, 0x11, 0x10, - 0x20, 0x01, 0x00, 0x1e, 0x80, 0x00, 0x60, 0x16, 0x68, 0x58, 0xa0, 0x84, - 0x00, 0xff, 0x01, 0x78, 0x60, 0x06, 0x68, 0x58, 0x80, 0x07, 0xa0, 0x84, - 0x00, 0xff, 0x01, 0x48, 0x60, 0x0a, 0x68, 0x58, 0x80, 0x00, 0x11, 0x08, - 0xc2, 0x8d, 0x62, 0x02, 0x01, 0x2e, 0x08, 0x04, 0x63, 0xa4, 0x01, 0x2e, - 0x08, 0x04, 0x63, 0x9e, 0x01, 0x2e, 0x08, 0x04, 0x63, 0x98, 0x01, 0x2e, - 0x08, 0x04, 0x63, 0x9b, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, - 0x00, 0x01, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x05, 0xe0, - 0x20, 0x61, 0xb9, 0x75, 0x60, 0x00, 0xd0, 0x84, 0x05, 0xb8, 0x62, 0x04, - 0x63, 0x08, 0xd0, 0x8c, 0x15, 0x30, 0x6c, 0x48, 0xa4, 0x84, 0x00, 0x03, - 0x01, 0x70, 0x69, 0x58, 0xa1, 0x8c, 0x00, 0xff, 0x80, 0x01, 0x11, 0x20, - 0x21, 0x00, 0xa2, 0x10, 0x06, 0x20, 0x00, 0x28, 0x80, 0x01, 0x15, 0x08, - 0x21, 0x00, 0xa2, 0x12, 0x02, 0xf0, 0xa4, 0x84, 0x00, 0x0c, 0x01, 0x88, - 0x69, 0x58, 0x81, 0x0f, 0xa1, 0x8c, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x04, - 0x11, 0x20, 0x21, 0x00, 0xa3, 0x18, 0x02, 0x88, 0x00, 0x30, 0xa0, 0x82, - 0x00, 0x04, 0x11, 0x68, 0x21, 0x00, 0xa3, 0x1a, 0x02, 0x50, 0x68, 0x60, - 0xa0, 0x05, 0x01, 0x10, 0x80, 0x00, 0x60, 0x16, 0x62, 0x06, 0x63, 0x0a, - 0x01, 0x2e, 0x08, 0x04, 0x63, 0xa4, 0x01, 0x2e, 0x08, 0x04, 0x63, 0xa1, - 0x01, 0x2e, 0x08, 0x04, 0x63, 0x9e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x07, 0x00, 0x01, 0x20, 0x61, 0xb9, 0x75, 0x63, 0x00, 0xd3, 0x8c, - 0x11, 0x20, 0x63, 0x08, 0x83, 0x18, 0x02, 0x20, 0x63, 0x0a, 0x01, 0x2e, - 0x08, 0x04, 0x63, 0xb2, 0x01, 0x2e, 0x08, 0x04, 0x63, 0xa1, 0x01, 0x26, - 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0x68, 0x4c, - 0xd0, 0xac, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, 0xb9, 0x75, 0x60, 0x00, - 0xa0, 0x84, 0xfc, 0xff, 0x60, 0x02, 0x00, 0xce, 0x04, 0x48, 0x68, 0x58, - 0xa0, 0x05, 0x05, 0xd0, 0x68, 0x5c, 0xa0, 0x65, 0x05, 0x98, 0x20, 0x01, - 0xb6, 0x31, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x18, 0x08, 0x0c, 0x9e, 0xd9, - 0x00, 0x68, 0x60, 0x13, 0x04, 0x00, 0x60, 0x57, 0x00, 0x00, 0x69, 0x4c, - 0xd1, 0xa4, 0x01, 0x10, 0x69, 0x50, 0x61, 0x56, 0x20, 0x09, 0x00, 0x41, - 0x08, 0x0c, 0x86, 0xd3, 0x69, 0x58, 0xa1, 0x8c, 0xff, 0x00, 0xa1, 0x86, - 0x20, 0x00, 0x11, 0x40, 0x00, 0x26, 0x20, 0x09, 0x00, 0x00, 0x20, 0x11, - 0xfd, 0xff, 0x08, 0x0c, 0x6b, 0x8c, 0x00, 0x2e, 0x68, 0x4c, 0xd0, 0xc4, - 0x01, 0x48, 0x20, 0x61, 0xb9, 0x75, 0x60, 0x00, 0xd0, 0x8c, 0x11, 0x20, - 0x60, 0x08, 0x80, 0x00, 0x02, 0x08, 0x60, 0x0a, 0x00, 0xce, 0x01, 0x2e, - 0x08, 0x04, 0x63, 0xa4, 0x00, 0xce, 0x01, 0x2e, 0x08, 0x04, 0x63, 0x9e, - 0x69, 0x54, 0xa1, 0x86, 0x00, 0x2e, 0x0d, 0x40, 0xa1, 0x86, 0x00, 0x2d, - 0x0d, 0x28, 0xa1, 0x86, 0x00, 0x45, 0x05, 0x28, 0xa1, 0x86, 0x00, 0x2a, - 0x11, 0x30, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xc1, 0x94, 0x21, 0x02, - 0x08, 0xc8, 0xa1, 0x86, 0x00, 0x20, 0x01, 0x70, 0xa1, 0x86, 0x00, 0x29, - 0x1d, 0x18, 0x69, 0x44, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x08, 0x0c, - 0x50, 0x1b, 0x19, 0x60, 0x60, 0x00, 0xc0, 0xe4, 0x60, 0x02, 0x08, 0x40, - 0x68, 0x5c, 0xa0, 0x65, 0x09, 0xa8, 0x60, 0x07, 0x00, 0x24, 0x20, 0x01, - 0xb8, 0xb6, 0x20, 0x04, 0x60, 0x16, 0x08, 0x04, 0x62, 0x3c, 0x68, 0x5c, - 0xa0, 0x65, 0x09, 0x50, 0x00, 0xe6, 0x68, 0x60, 0xa0, 0x75, 0x20, 0x01, - 0xb6, 0x31, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x50, 0x08, 0x0c, 0x9e, 0xd9, - 0x8e, 0xff, 0x01, 0x18, 0x2e, 0x60, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xee, - 0x08, 0x04, 0x62, 0x3c, 0x60, 0x20, 0xc0, 0xdc, 0xc0, 0xd5, 0x60, 0x22, - 0x2e, 0x60, 0x60, 0x07, 0x00, 0x3a, 0x68, 0x70, 0xa0, 0x05, 0x01, 0x30, - 0x60, 0x07, 0x00, 0x3b, 0x68, 0x74, 0x60, 0x2a, 0x68, 0x78, 0x60, 0x12, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0xee, 0x08, 0x04, 0x62, 0x3c, 0x20, 0x61, 0xb9, 0x75, 0x60, 0x00, - 0xd0, 0x84, 0x01, 0x90, 0xd0, 0x8c, 0x19, 0x04, 0x63, 0xb2, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x62, 0x04, 0x82, 0x10, 0x02, 0x20, 0x62, 0x06, - 0x01, 0x2e, 0x08, 0x04, 0x63, 0xb2, 0x01, 0x2e, 0x68, 0x53, 0x00, 0x16, - 0x08, 0x04, 0x63, 0xab, 0x68, 0x53, 0x00, 0x07, 0x08, 0x04, 0x63, 0xab, - 0x68, 0x34, 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0x11, 0x18, 0x08, 0x0c, - 0x5f, 0x94, 0x00, 0x78, 0x20, 0x30, 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, - 0x00, 0x01, 0x00, 0x51, 0x00, 0x40, 0x70, 0x07, 0x00, 0x06, 0x70, 0x12, - 0x2d, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x62, 0xe0, 0x00, 0x05, - 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa0, 0x3e, 0x20, 0x09, - 0xb6, 0x31, 0x21, 0x0c, 0x81, 0xff, 0x19, 0x04, 0x63, 0x5e, 0x20, 0x09, - 0xb6, 0x0c, 0x21, 0x0c, 0xd1, 0x94, 0x19, 0x04, 0x63, 0x88, 0x68, 0x48, - 0x20, 0x70, 0xae, 0x82, 0xbe, 0x00, 0x0a, 0x04, 0x63, 0x52, 0x20, 0x01, - 0xb6, 0x17, 0x20, 0x04, 0xae, 0x02, 0x1a, 0x04, 0x63, 0x52, 0x71, 0x1c, - 0xa1, 0x86, 0x00, 0x06, 0x19, 0x04, 0x63, 0x41, 0x70, 0x18, 0xa0, 0x05, - 0x09, 0x04, 0x63, 0x5e, 0x20, 0x04, 0xd0, 0xe4, 0x19, 0x04, 0x63, 0x83, - 0x20, 0x61, 0xb9, 0x75, 0x61, 0x00, 0xa1, 0x84, 0x03, 0x01, 0xa0, 0x86, - 0x00, 0x01, 0x15, 0x50, 0x70, 0x20, 0xd0, 0xdc, 0x19, 0x04, 0x63, 0x8b, - 0x68, 0x53, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x2d, 0x08, 0x70, 0x10, - 0xa0, 0x05, 0x11, 0x58, 0x71, 0x12, 0x68, 0x4c, 0xd0, 0xf4, 0x19, 0x04, - 0x63, 0x8e, 0x2e, 0x60, 0x08, 0x0c, 0x6a, 0xe8, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x68, 0x68, 0x00, 0xa0, 0x05, 0x1d, 0xe0, 0x69, 0x02, - 0x21, 0x68, 0x68, 0x4c, 0xd0, 0xf4, 0x19, 0x04, 0x63, 0x8e, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x68, 0x53, 0x00, 0x06, - 0x08, 0x04, 0x63, 0xab, 0xd1, 0x84, 0x0d, 0xc0, 0xd1, 0xc4, 0x11, 0xa8, - 0x00, 0xb8, 0x69, 0x44, 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x08, 0x0c, - 0x50, 0x1b, 0x15, 0xd8, 0x60, 0x00, 0xd0, 0xe4, 0x15, 0xc0, 0x71, 0x1c, - 0xa1, 0x86, 0x00, 0x07, 0x11, 0x18, 0x68, 0x53, 0x00, 0x02, 0x04, 0x98, - 0x68, 0x53, 0x00, 0x08, 0x04, 0x80, 0x68, 0x53, 0x00, 0x0e, 0x04, 0x68, - 0x68, 0x53, 0x00, 0x17, 0x04, 0x50, 0x68, 0x53, 0x00, 0x35, 0x04, 0x38, - 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xfc, 0x01, 0xe8, 0x68, 0x48, - 0x20, 0x70, 0xae, 0x82, 0xbe, 0x00, 0x02, 0xc0, 0x60, 0x5c, 0xae, 0x02, - 0x12, 0xa8, 0x71, 0x1c, 0xa1, 0x86, 0x00, 0x06, 0x11, 0x88, 0x70, 0x18, - 0xa0, 0x05, 0x01, 0x70, 0x20, 0x04, 0xd0, 0xbc, 0x01, 0x58, 0x20, 0x39, - 0x00, 0x01, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x07, 0x19, 0x04, 0x62, 0xeb, - 0x70, 0x03, 0x00, 0x02, 0x08, 0x04, 0x62, 0xeb, 0x68, 0x53, 0x00, 0x28, - 0x00, 0x10, 0x68, 0x53, 0x00, 0x29, 0x01, 0x2e, 0x00, 0xee, 0x04, 0x18, - 0x68, 0x53, 0x00, 0x2a, 0x0c, 0xd0, 0x68, 0x53, 0x00, 0x45, 0x0c, 0xb8, - 0x2e, 0x60, 0x20, 0x19, 0x00, 0x02, 0x60, 0x17, 0x00, 0x14, 0x08, 0x0c, - 0xad, 0x9c, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x09, 0x00, 0x3e, - 0x00, 0x58, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0x20, 0x09, 0x00, 0x06, - 0x00, 0x28, 0x20, 0x09, 0x00, 0x16, 0x00, 0x10, 0x20, 0x09, 0x00, 0x01, - 0x68, 0x54, 0xa0, 0x84, 0xff, 0x00, 0xa1, 0x05, 0x68, 0x56, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, 0x00, 0x05, - 0x08, 0x0c, 0x16, 0x14, 0x00, 0x05, 0x70, 0x2c, 0x71, 0x30, 0x81, 0x08, - 0xa1, 0x02, 0x02, 0x30, 0xa0, 0x0e, 0x70, 0x34, 0x70, 0x72, 0x70, 0x38, - 0x70, 0x76, 0x00, 0x58, 0x70, 0x70, 0xa0, 0x80, 0x00, 0x40, 0x70, 0x72, - 0x12, 0x30, 0x70, 0x74, 0xa0, 0x81, 0x00, 0x00, 0x70, 0x76, 0xa0, 0x85, - 0x00, 0x01, 0x79, 0x32, 0x71, 0x32, 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, - 0x6a, 0xdf, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x36, - 0x00, 0x26, 0x00, 0x16, 0x70, 0x07, 0x00, 0x01, 0x6a, 0x44, 0xa2, 0x82, - 0x00, 0x04, 0x1a, 0x04, 0x64, 0x1e, 0xd2, 0x84, 0x01, 0x70, 0x6a, 0x4c, - 0xa2, 0x90, 0xb7, 0x35, 0x22, 0x04, 0xa0, 0x65, 0x60, 0x04, 0x05, 0xe0, - 0x80, 0x07, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x84, 0x00, 0x06, 0x11, 0x08, - 0x04, 0xa8, 0x2c, 0x10, 0x08, 0x0c, 0x86, 0x4e, 0x11, 0x18, 0x08, 0x0c, - 0x9f, 0x92, 0x05, 0xa0, 0x62, 0x1a, 0x68, 0x44, 0x00, 0x02, 0x63, 0xfd, - 0x64, 0x02, 0x64, 0x05, 0x64, 0x0b, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, - 0xb1, 0x21, 0x00, 0x60, 0x08, 0x0c, 0xb0, 0xb8, 0x00, 0x48, 0x20, 0x19, - 0x00, 0x02, 0x69, 0x50, 0x08, 0x0c, 0xb0, 0xd3, 0x00, 0x18, 0x69, 0x50, - 0x08, 0x0c, 0xb0, 0xb8, 0x08, 0x0c, 0x86, 0xa4, 0x68, 0x57, 0x00, 0x00, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x01, 0x2e, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, - 0x68, 0x57, 0x00, 0x06, 0x0c, 0x88, 0x68, 0x57, 0x00, 0x02, 0x0c, 0x70, - 0x68, 0x57, 0x00, 0x05, 0x0c, 0x58, 0x68, 0x57, 0x00, 0x04, 0x0c, 0x40, - 0x68, 0x57, 0x00, 0x07, 0x0c, 0x28, 0x00, 0xd6, 0x20, 0x11, 0x00, 0x04, - 0x22, 0x04, 0xa0, 0x85, 0x80, 0x02, 0x20, 0x12, 0x00, 0xde, 0x00, 0x05, - 0x20, 0xe1, 0x00, 0x02, 0x3d, 0x08, 0x20, 0xe1, 0x20, 0x00, 0x3d, 0x00, - 0xa0, 0x84, 0x70, 0x00, 0x01, 0x18, 0xa0, 0x86, 0x10, 0x00, 0x15, 0x70, - 0x20, 0xe1, 0x00, 0x00, 0x3d, 0x00, 0xa0, 0x94, 0xff, 0x00, 0x82, 0x17, - 0xa0, 0x84, 0xf0, 0x00, 0xa0, 0x86, 0x30, 0x00, 0x11, 0x60, 0xa1, 0x84, - 0xff, 0x00, 0x80, 0x07, 0xa0, 0x86, 0x00, 0x08, 0x11, 0xe8, 0x08, 0x0c, - 0x2d, 0xf4, 0x11, 0xd0, 0x08, 0x0c, 0x66, 0x75, 0x00, 0x98, 0x20, 0xe1, - 0x00, 0x04, 0x3d, 0x60, 0xd1, 0xbc, 0x11, 0x08, 0x3e, 0x60, 0xac, 0x84, - 0x00, 0x07, 0x11, 0x70, 0xac, 0x82, 0xbe, 0x00, 0x02, 0x58, 0x68, 0x5c, - 0xac, 0x02, 0x12, 0x40, 0x20, 0x09, 0x00, 0x47, 0x08, 0x0c, 0x86, 0xd3, - 0x7a, 0x1c, 0xd2, 0x84, 0x19, 0x38, 0x00, 0x05, 0xa0, 0x16, 0x08, 0x0c, - 0x18, 0x63, 0x0c, 0xc0, 0x0c, 0xd8, 0x78, 0x1c, 0xd0, 0x8c, 0x05, 0x00, - 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x20, 0xe1, 0x30, 0x00, 0x3d, 0x20, - 0x3e, 0x28, 0xa5, 0x84, 0x00, 0x76, 0x15, 0x38, 0xa4, 0x84, 0x70, 0x00, - 0xa0, 0x86, 0x10, 0x00, 0x11, 0xa8, 0x08, 0x0c, 0x64, 0xf0, 0x01, 0xf8, - 0x20, 0xe1, 0x30, 0x00, 0x78, 0x28, 0x78, 0x28, 0x08, 0x0c, 0x65, 0x0c, - 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x20, 0x09, 0xb8, 0xe9, 0x21, 0x04, - 0xa0, 0x05, 0x11, 0x08, 0x00, 0x05, 0x08, 0x0c, 0x71, 0xe5, 0x0c, 0xe0, - 0xa4, 0x84, 0x70, 0x00, 0x15, 0x48, 0x08, 0x0c, 0x64, 0xf0, 0x01, 0xd8, - 0x70, 0x00, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x81, 0x00, 0x0d, 0x10, - 0x00, 0xa0, 0xd5, 0xa4, 0x01, 0x78, 0x00, 0x56, 0x00, 0x46, 0x08, 0x0c, - 0x1e, 0x8a, 0x08, 0x0c, 0x24, 0xe5, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, - 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x48, - 0x04, 0xa9, 0x68, 0x87, 0x00, 0x00, 0x08, 0x0c, 0xb4, 0x9b, 0x20, 0xe1, - 0x30, 0x00, 0x78, 0x28, 0x78, 0x28, 0x00, 0xb9, 0x01, 0x4e, 0x01, 0x3e, - 0x01, 0x5e, 0x08, 0x80, 0x04, 0x39, 0x11, 0x30, 0x70, 0x00, 0xa0, 0x84, - 0xff, 0x00, 0xa0, 0x86, 0x81, 0x00, 0x1d, 0x68, 0x08, 0x0c, 0xb4, 0x9b, - 0x20, 0xe1, 0x30, 0x00, 0x78, 0x28, 0x78, 0x28, 0x00, 0x56, 0x08, 0x0c, - 0x68, 0xe6, 0x00, 0x5e, 0x0c, 0x40, 0x20, 0x01, 0xb6, 0x0e, 0x20, 0x04, - 0xd0, 0x8c, 0x01, 0x78, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x03, 0x11, 0x48, 0x00, 0x26, 0x00, 0x36, 0x20, 0x11, 0x80, 0x48, - 0x25, 0x18, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, - 0xa4, 0x84, 0x01, 0xff, 0x68, 0x86, 0xa0, 0x05, 0x01, 0x60, 0xa0, 0x80, - 0x00, 0x1f, 0xa0, 0x84, 0x03, 0xf8, 0x80, 0xac, 0x20, 0xe1, 0x10, 0x00, - 0x2e, 0xa0, 0x20, 0x99, 0x02, 0x0a, 0x53, 0xa5, 0x00, 0x05, 0x20, 0xa9, - 0x00, 0x0c, 0x20, 0xe1, 0x10, 0x00, 0x2e, 0xa0, 0x20, 0x99, 0x02, 0x0a, - 0x53, 0xa5, 0xa0, 0x85, 0x00, 0x01, 0x0c, 0xa0, 0x70, 0x00, 0xa0, 0x84, - 0xff, 0x00, 0xa0, 0x8c, 0xf0, 0x00, 0x80, 0x07, 0xa1, 0x96, 0x00, 0x00, - 0x11, 0x18, 0x08, 0x04, 0x67, 0x7a, 0x00, 0x05, 0xa1, 0x96, 0x20, 0x00, - 0x11, 0x48, 0x69, 0x00, 0xa1, 0x8e, 0x00, 0x01, 0x11, 0x18, 0x08, 0x0c, - 0x44, 0xd6, 0x0c, 0xa8, 0x00, 0x39, 0x0c, 0x98, 0xa1, 0x96, 0x80, 0x00, - 0x1d, 0x80, 0x08, 0x0c, 0x68, 0x26, 0x0c, 0x68, 0x00, 0xc6, 0x6a, 0x84, - 0x82, 0xff, 0x09, 0x04, 0x66, 0x6f, 0x71, 0x10, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x96, 0x00, 0x01, 0x01, 0x20, 0xa1, 0x96, 0x00, 0x23, - 0x19, 0x04, 0x66, 0x6f, 0xa0, 0x8e, 0x00, 0x23, 0x15, 0x70, 0x08, 0x0c, - 0x68, 0xc1, 0x09, 0x04, 0x66, 0x6f, 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, - 0xa0, 0x8e, 0x02, 0x00, 0x11, 0x50, 0x70, 0x34, 0xa0, 0x05, 0x19, 0x04, - 0x66, 0x6f, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0x86, 0xd3, 0x08, 0x04, - 0x66, 0x6f, 0xa0, 0x8e, 0x02, 0x14, 0x01, 0x18, 0xa0, 0x8e, 0x02, 0x10, - 0x11, 0x30, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0x86, 0xd3, 0x08, 0x04, - 0x66, 0x6f, 0xa0, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x66, 0x6f, 0x70, 0x34, - 0xa0, 0x05, 0x19, 0x04, 0x66, 0x6f, 0x20, 0x09, 0x00, 0x16, 0x08, 0x0c, - 0x86, 0xd3, 0x08, 0x04, 0x66, 0x6f, 0xa0, 0x8e, 0x00, 0x22, 0x19, 0x04, - 0x66, 0x6f, 0x70, 0x30, 0xa0, 0x8e, 0x03, 0x00, 0x15, 0x80, 0x68, 0xd4, - 0xd0, 0xa4, 0x05, 0x28, 0xc0, 0xb5, 0x68, 0xd6, 0x71, 0x00, 0xa1, 0x8c, - 0x00, 0xff, 0x69, 0x72, 0x70, 0x04, 0x68, 0x76, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x79, 0xe6, 0x78, 0xea, 0x00, 0x06, 0xa0, 0x84, 0x00, 0xff, - 0x00, 0x16, 0x20, 0x08, 0x08, 0x0c, 0x28, 0x7c, 0x79, 0x32, 0x79, 0x36, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xfe, 0x08, 0x0c, 0x28, 0x52, 0x69, 0x52, - 0x70, 0x3c, 0x00, 0xe6, 0x20, 0x71, 0x01, 0x40, 0x70, 0x86, 0x20, 0x71, - 0xb6, 0x00, 0x70, 0xa6, 0x00, 0xee, 0x70, 0x34, 0xa0, 0x05, 0x19, 0x04, - 0x66, 0x6f, 0x20, 0x09, 0x00, 0x17, 0x08, 0x04, 0x66, 0x35, 0xa0, 0x8e, - 0x04, 0x00, 0x11, 0x58, 0x70, 0x34, 0xa0, 0x05, 0x19, 0x04, 0x66, 0x6f, - 0x68, 0xd4, 0xc0, 0xa5, 0x68, 0xd6, 0x20, 0x09, 0x00, 0x30, 0x08, 0x04, - 0x66, 0x35, 0xa0, 0x8e, 0x05, 0x00, 0x11, 0x40, 0x70, 0x34, 0xa0, 0x05, - 0x19, 0x04, 0x66, 0x6f, 0x20, 0x09, 0x00, 0x18, 0x08, 0x04, 0x66, 0x35, - 0xa0, 0x8e, 0x20, 0x10, 0x11, 0x20, 0x20, 0x09, 0x00, 0x19, 0x08, 0x04, - 0x66, 0x35, 0xa0, 0x8e, 0x21, 0x10, 0x11, 0x20, 0x20, 0x09, 0x00, 0x1a, - 0x08, 0x04, 0x66, 0x35, 0xa0, 0x8e, 0x52, 0x00, 0x11, 0x40, 0x70, 0x34, - 0xa0, 0x05, 0x19, 0x04, 0x66, 0x6f, 0x20, 0x09, 0x00, 0x1b, 0x08, 0x04, - 0x66, 0x35, 0xa0, 0x8e, 0x50, 0x00, 0x11, 0x40, 0x70, 0x34, 0xa0, 0x05, - 0x19, 0x04, 0x66, 0x6f, 0x20, 0x09, 0x00, 0x1c, 0x08, 0x04, 0x66, 0x35, - 0xa0, 0x8e, 0x13, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x34, 0x08, 0x04, - 0x66, 0x35, 0xa0, 0x8e, 0x12, 0x00, 0x11, 0x40, 0x70, 0x34, 0xa0, 0x05, - 0x19, 0x04, 0x66, 0x6f, 0x20, 0x09, 0x00, 0x24, 0x08, 0x04, 0x66, 0x35, - 0xa0, 0x8c, 0xff, 0x00, 0xa1, 0x8e, 0x24, 0x00, 0x11, 0x18, 0x20, 0x09, - 0x00, 0x2d, 0x04, 0xd8, 0xa0, 0x8c, 0xff, 0x00, 0xa1, 0x8e, 0x53, 0x00, - 0x11, 0x18, 0x20, 0x09, 0x00, 0x2a, 0x04, 0x98, 0xa0, 0x8e, 0x0f, 0x00, - 0x11, 0x18, 0x20, 0x09, 0x00, 0x20, 0x04, 0x68, 0xa0, 0x8e, 0x53, 0x00, - 0x11, 0x08, 0x00, 0xd8, 0xa0, 0x8e, 0x61, 0x04, 0x11, 0xc0, 0x20, 0x11, - 0xbc, 0x8d, 0x82, 0x08, 0x22, 0x04, 0xa0, 0x82, 0x00, 0x04, 0x20, 0xa8, - 0x95, 0xac, 0x95, 0xac, 0x20, 0x11, 0x80, 0x15, 0x21, 0x1c, 0x81, 0x08, - 0x00, 0x46, 0x21, 0x24, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x4e, 0x81, 0x08, - 0x1f, 0x04, 0x66, 0x18, 0x20, 0x09, 0x00, 0x23, 0x00, 0x70, 0xa0, 0x8e, - 0x60, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x3f, 0x00, 0x40, 0xa0, 0x8e, - 0x78, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x45, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x1d, 0x00, 0x16, 0x20, 0x11, 0xbc, 0x83, 0x22, 0x04, 0x82, 0x11, - 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x52, 0x15, 0x98, 0x08, 0x0c, 0x4f, 0xbf, - 0x15, 0x80, 0x66, 0x12, 0x65, 0x16, 0x86, 0xff, 0x01, 0xe8, 0x00, 0x1e, - 0x00, 0x16, 0xa1, 0x86, 0x00, 0x17, 0x11, 0x58, 0x68, 0x70, 0xa6, 0x06, - 0x11, 0xa8, 0x68, 0x74, 0xa5, 0x06, 0xa0, 0x84, 0xff, 0x00, 0x11, 0x80, - 0x60, 0x00, 0xc0, 0xf5, 0x60, 0x02, 0xa1, 0x86, 0x00, 0x46, 0x11, 0x50, - 0x68, 0x70, 0xa6, 0x06, 0x11, 0x38, 0x68, 0x74, 0xa5, 0x06, 0xa0, 0x84, - 0xff, 0x00, 0x11, 0x10, 0x00, 0x1e, 0x00, 0x68, 0x00, 0xc6, 0x08, 0x0c, - 0x86, 0x4e, 0x01, 0x68, 0x00, 0x1e, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x04, - 0x71, 0x20, 0x61, 0x0a, 0x00, 0x1e, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, - 0x00, 0x05, 0x00, 0x1e, 0x0c, 0xe0, 0x00, 0xce, 0x0c, 0xe0, 0x00, 0xc6, - 0x00, 0x46, 0x08, 0x0c, 0x66, 0xc9, 0x19, 0x04, 0x66, 0xc6, 0xa2, 0x8e, - 0x00, 0x33, 0x11, 0xe8, 0x08, 0x0c, 0x68, 0xc1, 0x09, 0x04, 0x66, 0xc6, - 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, 0xa0, 0x8e, 0x02, 0x00, 0x11, 0x40, - 0x70, 0x34, 0xa0, 0x05, 0x15, 0xd8, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, - 0x86, 0xd3, 0x04, 0xb0, 0xa0, 0x8e, 0x01, 0x00, 0x15, 0x98, 0x70, 0x34, - 0xa0, 0x05, 0x15, 0x80, 0x20, 0x09, 0x00, 0x16, 0x08, 0x0c, 0x86, 0xd3, - 0x04, 0x58, 0xa2, 0x8e, 0x00, 0x32, 0x15, 0x40, 0x70, 0x30, 0xa0, 0x8e, - 0x14, 0x00, 0x15, 0x20, 0x20, 0x09, 0x00, 0x38, 0x00, 0x16, 0x20, 0x11, - 0xbc, 0x83, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x52, - 0x11, 0xc0, 0x08, 0x0c, 0x4f, 0xbf, 0x11, 0xa8, 0x66, 0x12, 0x65, 0x16, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0x70, 0x00, 0x1e, 0x61, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, - 0x00, 0x1e, 0x08, 0x0c, 0x86, 0xd3, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x10, - 0x00, 0xce, 0x00, 0x1e, 0x00, 0x4e, 0x00, 0xce, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xd6, 0x00, 0x26, 0x00, 0x16, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x3c, 0x00, 0x00, 0x06, 0x20, 0x79, 0x00, 0x30, 0x20, 0x69, 0x02, 0x00, - 0x08, 0x0c, 0x1f, 0x49, 0x15, 0x90, 0x08, 0x0c, 0x1d, 0xee, 0x05, 0xe0, - 0x04, 0xf1, 0x11, 0x30, 0x79, 0x08, 0xa1, 0x8c, 0x1f, 0xff, 0xa1, 0x82, - 0x00, 0x11, 0x16, 0x88, 0x20, 0xa9, 0x00, 0x0c, 0x20, 0xe1, 0x00, 0x00, - 0x2e, 0xa0, 0x20, 0x99, 0x02, 0x0a, 0x53, 0xa5, 0x20, 0xe1, 0x20, 0x00, - 0x20, 0x01, 0x02, 0x0a, 0x20, 0x04, 0x7a, 0x0c, 0x78, 0x08, 0xa0, 0x80, - 0x00, 0x07, 0xa0, 0x84, 0x1f, 0xf8, 0x04, 0x19, 0x11, 0x20, 0xa0, 0x8a, - 0x01, 0x40, 0x1a, 0x0c, 0x15, 0x1a, 0x80, 0xac, 0x20, 0xe1, 0x60, 0x00, - 0x20, 0x99, 0x02, 0x0a, 0x53, 0xa5, 0x20, 0xe1, 0x70, 0x00, 0x68, 0x28, - 0x68, 0x28, 0x78, 0x03, 0x00, 0x04, 0xa2, 0x94, 0x00, 0x70, 0x00, 0x0e, - 0x20, 0xe0, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0xde, 0x00, 0xfe, 0x00, 0x05, 0xa0, 0x16, 0x08, 0x0c, 0x18, 0x63, - 0xa0, 0x85, 0x00, 0x01, 0x0c, 0x80, 0x00, 0x06, 0x20, 0x01, 0x01, 0x11, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x46, - 0x00, 0xe6, 0x00, 0xd6, 0x20, 0x28, 0x21, 0x30, 0xa6, 0x96, 0x00, 0xff, - 0x11, 0x98, 0xa5, 0x96, 0xff, 0xfd, 0x11, 0x20, 0x20, 0x09, 0x00, 0x7f, - 0x08, 0x04, 0x67, 0x75, 0xa5, 0x96, 0xff, 0xfe, 0x11, 0x18, 0x20, 0x09, - 0x00, 0x7e, 0x04, 0xe8, 0xa5, 0x96, 0xff, 0xfc, 0x11, 0x18, 0x20, 0x09, - 0x00, 0x80, 0x04, 0xb8, 0x20, 0x11, 0x00, 0x00, 0x20, 0x19, 0xb6, 0x35, - 0x23, 0x1c, 0xd3, 0xac, 0x01, 0x38, 0x20, 0x21, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0xff, 0x20, 0x71, 0xb7, 0x35, 0x00, 0x30, 0x20, 0x21, 0x00, 0x81, - 0x20, 0xa9, 0x00, 0x7e, 0x20, 0x71, 0xb7, 0xb6, 0x2e, 0x1c, 0x83, 0xff, - 0x11, 0x28, 0x82, 0xff, 0x11, 0x98, 0x24, 0x10, 0xc2, 0xfd, 0x00, 0x80, - 0x23, 0x68, 0x6f, 0x10, 0x00, 0x06, 0x21, 0x00, 0xa7, 0x06, 0x00, 0x0e, - 0x6b, 0x14, 0x11, 0x20, 0xa3, 0x46, 0x11, 0x10, 0x24, 0x08, 0x00, 0x78, - 0x87, 0xff, 0x11, 0x10, 0x83, 0xff, 0x0d, 0x58, 0x84, 0x20, 0x8e, 0x70, - 0x1f, 0x04, 0x67, 0x52, 0x82, 0xff, 0x11, 0x18, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x18, 0xc2, 0xfc, 0x22, 0x08, 0xa0, 0x06, 0x00, 0xde, 0x00, 0xee, - 0x00, 0x4e, 0x00, 0x05, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x05, - 0x67, 0x86, 0x67, 0x86, 0x67, 0x86, 0x68, 0xd3, 0x67, 0x86, 0x67, 0x87, - 0x67, 0x9c, 0x68, 0x11, 0x00, 0x05, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0x88, - 0x71, 0x20, 0x21, 0x60, 0xac, 0x8c, 0x00, 0x07, 0x11, 0x60, 0xac, 0x8a, - 0xbe, 0x00, 0x02, 0x48, 0x68, 0x5c, 0xac, 0x02, 0x12, 0x30, 0x71, 0x24, - 0x61, 0x0a, 0x20, 0x09, 0x00, 0x46, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, - 0x00, 0xc6, 0xa4, 0x84, 0x01, 0xff, 0x09, 0x04, 0x67, 0xef, 0x71, 0x10, - 0xd1, 0xbc, 0x19, 0x04, 0x67, 0xef, 0x20, 0x11, 0xbc, 0x83, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x52, 0x19, 0x04, 0x67, 0xef, - 0x08, 0x0c, 0x4f, 0xbf, 0x15, 0xf0, 0x66, 0x12, 0x65, 0x16, 0x60, 0x00, - 0xd0, 0xec, 0x15, 0xc8, 0x62, 0x04, 0xa2, 0x94, 0xff, 0x00, 0x82, 0x17, - 0xa2, 0x86, 0x00, 0x06, 0x01, 0x48, 0x62, 0x04, 0xa2, 0x94, 0x00, 0xff, - 0xa2, 0x86, 0x00, 0x06, 0x11, 0xa0, 0xa2, 0x95, 0x06, 0x00, 0x62, 0x06, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x05, 0x30, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x52, - 0x20, 0x09, 0x00, 0x44, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xc0, 0x00, 0xc6, - 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x98, 0x61, 0x1a, 0x60, 0x1f, - 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0xa2, 0x86, 0x00, 0x04, 0x11, 0x18, - 0x60, 0x07, 0x00, 0x05, 0x00, 0x10, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xce, - 0x00, 0x05, 0x20, 0x01, 0xb6, 0x0d, 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, - 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0xc6, 0x08, 0x0c, - 0x9f, 0x92, 0x00, 0x1e, 0x0d, 0x80, 0x61, 0x1a, 0x60, 0x1f, 0x00, 0x06, - 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x52, 0x60, 0x13, 0x03, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0xf0, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0x88, - 0x70, 0x20, 0x20, 0x60, 0xac, 0x84, 0x00, 0x07, 0x11, 0x60, 0xac, 0x82, - 0xbe, 0x00, 0x02, 0x48, 0x68, 0x5c, 0xac, 0x02, 0x12, 0x30, 0x71, 0x24, - 0x61, 0x0a, 0x20, 0x09, 0x00, 0x45, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, - 0x00, 0x06, 0x08, 0x0c, 0x2d, 0xf4, 0x00, 0x0e, 0x11, 0x68, 0x71, 0x10, - 0xa1, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x8e, 0x00, 0x00, 0x11, 0x30, - 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x8a, 0x00, 0x06, 0x12, 0x08, 0x00, 0x0b, - 0x00, 0x05, 0x68, 0x3f, 0x68, 0x40, 0x68, 0x3f, 0x68, 0x3f, 0x68, 0xa9, - 0x68, 0xb5, 0x00, 0x05, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0x20, 0x70, 0x2c, - 0xd0, 0x84, 0x09, 0x04, 0x68, 0xa8, 0x70, 0x0c, 0x71, 0x08, 0x08, 0x0c, - 0x28, 0x52, 0x19, 0x04, 0x68, 0xa8, 0x08, 0x0c, 0x4f, 0xbf, 0x19, 0x04, - 0x68, 0xa8, 0x66, 0x12, 0x65, 0x16, 0x62, 0x04, 0x71, 0x10, 0xd1, 0xbc, - 0x01, 0xf8, 0xa2, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x04, 0x01, 0x18, - 0xa1, 0x86, 0x00, 0x06, 0x15, 0xc8, 0x00, 0xc6, 0x08, 0x0c, 0x68, 0xc1, - 0x00, 0xce, 0x09, 0x04, 0x68, 0xa8, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, - 0x00, 0x1e, 0x05, 0xf0, 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, - 0x00, 0x02, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x88, 0x08, 0x0c, - 0x86, 0xd3, 0x04, 0x90, 0xa2, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x06, - 0x01, 0x60, 0xa1, 0x86, 0x00, 0x04, 0x01, 0x48, 0xa2, 0x94, 0xff, 0x00, - 0x82, 0x17, 0xa2, 0x86, 0x00, 0x04, 0x01, 0x18, 0xa2, 0x86, 0x00, 0x06, - 0x11, 0x88, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0xe0, - 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x05, 0x71, 0x20, - 0x61, 0x0a, 0x20, 0x09, 0x00, 0x88, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x80, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x58, 0x61, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0x71, 0x10, - 0xd1, 0xbc, 0x01, 0x40, 0x00, 0xa1, 0x01, 0x30, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x89, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0x71, 0x10, - 0xd1, 0xbc, 0x01, 0x40, 0x00, 0x41, 0x01, 0x30, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x8a, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0x70, 0x20, - 0x20, 0x60, 0xac, 0x84, 0x00, 0x07, 0x11, 0x58, 0xac, 0x82, 0xbe, 0x00, - 0x02, 0x40, 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, 0xac, 0x02, 0x12, 0x18, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xe8, 0x71, 0x10, - 0xd1, 0xbc, 0x11, 0x78, 0x70, 0x24, 0x20, 0x60, 0xac, 0x84, 0x00, 0x07, - 0x11, 0x50, 0xac, 0x82, 0xbe, 0x00, 0x02, 0x38, 0x68, 0x5c, 0xac, 0x02, - 0x12, 0x20, 0x20, 0x09, 0x00, 0x51, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, - 0x20, 0x31, 0x01, 0x05, 0x00, 0x69, 0x00, 0x05, 0x20, 0x31, 0x02, 0x06, - 0x00, 0x49, 0x00, 0x05, 0x20, 0x31, 0x02, 0x07, 0x00, 0x29, 0x00, 0x05, - 0x20, 0x31, 0x02, 0x13, 0x00, 0x09, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xf6, 0x70, 0x00, 0xa0, 0x84, 0xf0, 0x00, 0xa0, 0x86, 0xc0, 0x00, - 0x05, 0xb0, 0x08, 0x0c, 0x86, 0x4e, 0x05, 0x98, 0x00, 0x66, 0x00, 0xc6, - 0x00, 0x46, 0x20, 0x11, 0xbc, 0x83, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, - 0x08, 0x0c, 0x28, 0x52, 0x15, 0x80, 0x08, 0x0c, 0x4f, 0xbf, 0x15, 0x68, - 0x66, 0x12, 0x65, 0x16, 0x2c, 0x00, 0x00, 0x4e, 0x00, 0xce, 0x60, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x08, 0x0c, 0x15, 0xfd, 0x01, 0xf0, 0x2d, 0x00, - 0x60, 0x56, 0x68, 0x03, 0x00, 0x00, 0x68, 0x37, 0x00, 0x00, 0x6c, 0x3a, - 0xad, 0xf8, 0x00, 0x0f, 0x20, 0xa9, 0x00, 0x0e, 0x2f, 0xa0, 0x2e, 0x98, - 0x53, 0xa3, 0x00, 0x6e, 0x66, 0x12, 0x60, 0x07, 0x00, 0x3e, 0x60, 0x1f, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0xfe, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0x6e, 0x0c, 0xc0, 0x00, 0x4e, 0x00, 0xce, 0x0c, 0xc8, - 0x20, 0x71, 0xb8, 0xf4, 0x70, 0x03, 0x00, 0x03, 0x70, 0x0f, 0x03, 0x61, - 0xa0, 0x06, 0x70, 0x1a, 0x70, 0x76, 0x70, 0x12, 0x70, 0x17, 0xbe, 0x00, - 0x70, 0x07, 0x00, 0x00, 0x70, 0x26, 0x70, 0x2b, 0x7e, 0x0a, 0x70, 0x32, - 0x70, 0x37, 0x7e, 0x6a, 0x70, 0x3b, 0xff, 0xff, 0x70, 0x3f, 0xff, 0xff, - 0x70, 0x42, 0x70, 0x47, 0x44, 0x92, 0x70, 0x4a, 0x70, 0x5b, 0x6a, 0x9d, - 0x20, 0x01, 0xb8, 0xa1, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, 0xb8, 0xa3, - 0x20, 0x03, 0x01, 0x00, 0x3a, 0x00, 0xa0, 0x84, 0x00, 0x05, 0x70, 0x6e, - 0x00, 0x05, 0x20, 0x71, 0xb8, 0xf4, 0x1d, 0x04, 0x69, 0xfd, 0x20, 0x91, - 0x60, 0x00, 0x70, 0x0c, 0x80, 0x01, 0x70, 0x0e, 0x15, 0x18, 0x70, 0x0f, - 0x03, 0x61, 0x70, 0x07, 0x00, 0x01, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x40, 0xa0, 0x0d, 0x01, 0x28, 0x81, 0x09, 0x71, 0x42, 0x11, 0x10, - 0x70, 0x44, 0x08, 0x0f, 0x00, 0xc6, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x34, - 0x00, 0xce, 0xd0, 0xcc, 0x01, 0x80, 0x3a, 0x00, 0xa0, 0x84, 0x00, 0x05, - 0x72, 0x6c, 0xa2, 0x16, 0x01, 0x50, 0x70, 0x6e, 0x20, 0x11, 0x80, 0x43, - 0x20, 0x18, 0x08, 0x0c, 0x3f, 0x13, 0x00, 0x18, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x24, 0xa0, 0x0d, 0x01, 0x88, 0x70, 0x20, 0x80, 0x01, - 0x70, 0x22, 0x11, 0x68, 0x70, 0x23, 0x00, 0x09, 0x81, 0x09, 0x71, 0x26, - 0xa1, 0x86, 0x03, 0xe8, 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, 0x81, 0xff, - 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, 0x70, 0x30, 0xa0, 0x0d, 0x01, 0x80, - 0x70, 0x2c, 0x80, 0x01, 0x70, 0x2e, 0x11, 0x60, 0x70, 0x2f, 0x00, 0x09, - 0x81, 0x09, 0x71, 0x32, 0x01, 0x28, 0xa1, 0x84, 0x00, 0x7f, 0x09, 0x0c, - 0x7e, 0xaf, 0x00, 0x10, 0x70, 0x34, 0x08, 0x0f, 0x70, 0x38, 0xa0, 0x05, - 0x01, 0x18, 0x03, 0x10, 0x80, 0x01, 0x70, 0x3a, 0x70, 0x3c, 0xa0, 0x05, - 0x01, 0x18, 0x03, 0x10, 0x80, 0x01, 0x70, 0x3e, 0x70, 0x4c, 0xa0, 0x0d, - 0x01, 0x68, 0x70, 0x48, 0x80, 0x01, 0x70, 0x4a, 0x11, 0x48, 0x70, 0x4b, - 0x00, 0x09, 0x81, 0x09, 0x71, 0x4e, 0x11, 0x20, 0x71, 0x50, 0x71, 0x4e, - 0x70, 0x58, 0x08, 0x0f, 0x70, 0x18, 0xa0, 0x0d, 0x01, 0xd8, 0x00, 0x16, - 0x70, 0x74, 0xa0, 0x0d, 0x01, 0x58, 0x70, 0x70, 0x80, 0x01, 0x70, 0x72, - 0x11, 0x38, 0x70, 0x73, 0x00, 0x09, 0x81, 0x09, 0x71, 0x76, 0x11, 0x10, - 0x70, 0x78, 0x08, 0x0f, 0x00, 0x1e, 0x70, 0x08, 0x80, 0x01, 0x70, 0x0a, - 0x11, 0x38, 0x70, 0x0b, 0x00, 0x09, 0x81, 0x09, 0x71, 0x1a, 0x11, 0x10, - 0x70, 0x1c, 0x08, 0x0f, 0x01, 0x2e, 0x70, 0x04, 0x00, 0x02, 0x6a, 0x23, - 0x6a, 0x24, 0x6a, 0x3c, 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xf4, 0x70, 0x18, - 0xa0, 0x05, 0x11, 0x20, 0x71, 0x1a, 0x72, 0x1e, 0x70, 0x0b, 0x00, 0x09, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x20, 0x71, 0xb8, 0xf4, - 0x70, 0x1c, 0xa2, 0x06, 0x11, 0x10, 0x70, 0x1a, 0x70, 0x1e, 0x00, 0x0e, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xf4, 0x60, 0x88, - 0xa1, 0x02, 0x02, 0x08, 0x61, 0x8a, 0x00, 0xee, 0x00, 0x05, 0x00, 0x05, - 0x71, 0x10, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x58, 0x60, 0x88, 0x80, 0x01, - 0x02, 0x40, 0x60, 0x8a, 0x11, 0x30, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x81, 0x08, 0xa1, 0x82, 0x00, 0xff, - 0x02, 0x18, 0xa0, 0x0e, 0x70, 0x07, 0x00, 0x02, 0x71, 0x12, 0x00, 0x05, - 0x70, 0x14, 0x20, 0x60, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x3c, - 0xa0, 0x05, 0x01, 0x28, 0x80, 0x01, 0x60, 0x3e, 0x11, 0x10, 0x08, 0x0c, - 0x9f, 0xd1, 0x60, 0x14, 0xa0, 0x05, 0x05, 0x00, 0x80, 0x01, 0x60, 0x16, - 0x11, 0xe8, 0x61, 0x1c, 0xa1, 0x86, 0x00, 0x03, 0x01, 0x18, 0xa1, 0x86, - 0x00, 0x06, 0x11, 0xa0, 0x60, 0x10, 0x20, 0x68, 0x68, 0x54, 0xa0, 0x8a, - 0x19, 0x9a, 0x02, 0x70, 0xa0, 0x82, 0x19, 0x99, 0x68, 0x56, 0xa0, 0x8a, - 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x0b, - 0x81, 0x0b, 0xa1, 0x08, 0x61, 0x16, 0x00, 0x10, 0x08, 0x0c, 0x9a, 0xa1, - 0x01, 0x2e, 0xac, 0x88, 0x00, 0x18, 0x71, 0x16, 0x20, 0x01, 0xee, 0x00, - 0xa1, 0x02, 0x02, 0x20, 0x70, 0x17, 0xbe, 0x00, 0x70, 0x07, 0x00, 0x00, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xf4, 0x70, 0x27, 0x07, 0xd0, - 0x70, 0x23, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0xb8, 0xfd, - 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xf4, - 0x71, 0x32, 0x70, 0x2f, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x20, 0x11, - 0xb9, 0x00, 0x20, 0x13, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0xb8, 0xf4, 0x71, 0x1a, 0x72, 0x1e, 0x70, 0x0b, 0x00, 0x09, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0x26, 0x70, 0x54, 0x80, 0x00, 0x70, 0x56, - 0x20, 0x61, 0xb8, 0xa1, 0x60, 0x08, 0xa0, 0x86, 0x00, 0x00, 0x01, 0x58, - 0x70, 0x68, 0x60, 0x32, 0x70, 0x64, 0x60, 0x2e, 0x70, 0x60, 0x60, 0x2a, - 0x70, 0x5c, 0x60, 0x26, 0x2c, 0x10, 0x08, 0x0c, 0x16, 0x48, 0x00, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x08, 0x0c, 0x69, 0x6b, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0xb8, 0xf4, 0x71, 0x76, 0x72, 0x7a, 0x70, 0x73, 0x00, 0x09, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x20, 0x71, 0xb8, 0xf4, - 0x70, 0x78, 0xa2, 0x06, 0x11, 0x10, 0x70, 0x76, 0x70, 0x7a, 0x00, 0x0e, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x61, 0xb9, 0x75, 0x00, 0xce, - 0x00, 0x05, 0xa1, 0x84, 0x00, 0x0f, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, - 0xa0, 0x80, 0xb9, 0x75, 0x20, 0x60, 0x00, 0x05, 0x68, 0x54, 0xa0, 0x8a, - 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0xa0, 0x05, 0x11, 0x50, - 0x00, 0xc6, 0x20, 0x61, 0xb9, 0x75, 0x60, 0x14, 0x00, 0xce, 0xa0, 0x05, - 0x11, 0x38, 0x20, 0x01, 0x00, 0x1e, 0x00, 0x20, 0xa0, 0x8e, 0xff, 0xff, - 0x11, 0x08, 0xa0, 0x06, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0xa1, 0x08, - 0x61, 0x16, 0x68, 0x4c, 0xa0, 0x8c, 0x00, 0xc0, 0xa1, 0x8e, 0x00, 0xc0, - 0x05, 0xe8, 0xd0, 0xb4, 0x11, 0x38, 0xd0, 0xbc, 0x15, 0x50, 0x20, 0x09, - 0x00, 0x06, 0x08, 0x0c, 0x6b, 0x63, 0x00, 0x05, 0xd0, 0xfc, 0x01, 0x38, - 0xa0, 0x84, 0x00, 0x03, 0x01, 0x20, 0xa0, 0x86, 0x00, 0x03, 0x19, 0x04, - 0x6b, 0x5d, 0x60, 0x20, 0xd0, 0xd4, 0x01, 0x30, 0xc0, 0xd4, 0x60, 0x22, - 0x68, 0x60, 0x60, 0x2a, 0x68, 0x5c, 0x60, 0x2e, 0x20, 0x09, 0xb6, 0x74, - 0x21, 0x04, 0xd0, 0x84, 0x01, 0x38, 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x42, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0x87, 0xff, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0xd0, 0xfc, - 0x01, 0x30, 0xa0, 0x84, 0x00, 0x03, 0x01, 0x18, 0xa0, 0x86, 0x00, 0x03, - 0x11, 0xf0, 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, 0x00, 0x42, 0x08, 0x0c, - 0x86, 0xd3, 0x00, 0x05, 0xd0, 0xfc, 0x01, 0x60, 0xa0, 0x84, 0x00, 0x03, - 0xa0, 0x8e, 0x00, 0x02, 0x01, 0x48, 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x41, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x05, 0x00, 0x61, 0x0c, 0xe8, - 0x87, 0xff, 0x1d, 0xd8, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, 0x86, 0xd3, - 0x0c, 0xb0, 0x20, 0x09, 0x00, 0x04, 0x00, 0x19, 0x00, 0x05, 0x20, 0x09, - 0x00, 0x01, 0x00, 0xd6, 0x60, 0x10, 0xa0, 0xec, 0xf0, 0x00, 0x05, 0x10, - 0x20, 0x68, 0x69, 0x52, 0x68, 0x00, 0x60, 0x12, 0xa1, 0x86, 0x00, 0x01, - 0x11, 0x88, 0x69, 0x4c, 0xa1, 0x8c, 0x81, 0x00, 0xa1, 0x8e, 0x81, 0x00, - 0x11, 0x58, 0x00, 0xc6, 0x20, 0x61, 0xb9, 0x75, 0x62, 0x00, 0xd2, 0x8c, - 0x11, 0x20, 0x62, 0x04, 0x82, 0x10, 0x02, 0x08, 0x62, 0x06, 0x00, 0xce, - 0x08, 0x0c, 0x54, 0x7a, 0x60, 0x10, 0xa0, 0x6d, 0x00, 0x76, 0x20, 0x39, - 0x00, 0x00, 0x19, 0x0c, 0x6a, 0xe8, 0x00, 0x7e, 0x00, 0xde, 0x00, 0x05, - 0x01, 0x56, 0x00, 0xc6, 0x20, 0x61, 0xb9, 0x75, 0x60, 0x00, 0x81, 0xff, - 0x01, 0x10, 0xa2, 0x05, 0x00, 0x08, 0xa2, 0x04, 0x60, 0x02, 0x00, 0xce, - 0x01, 0x5e, 0x00, 0x05, 0x68, 0x00, 0xd0, 0x8c, 0x11, 0x38, 0x68, 0x08, - 0xa0, 0x05, 0x01, 0x20, 0x80, 0x01, 0x68, 0x0a, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x06, 0x80, 0x04, 0x80, 0x86, - 0x81, 0x8e, 0x12, 0x08, 0xa2, 0x00, 0x1f, 0x04, 0x6b, 0xa9, 0x80, 0x86, - 0x81, 0x8e, 0x00, 0x05, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x10, 0xa0, 0x05, - 0x01, 0xb8, 0xa1, 0x1a, 0x12, 0xa8, 0x82, 0x13, 0x81, 0x8d, 0x02, 0x28, - 0xa1, 0x1a, 0x12, 0x20, 0x1f, 0x04, 0x6b, 0xb9, 0x00, 0x28, 0xa1, 0x1a, - 0x23, 0x08, 0x82, 0x10, 0x1f, 0x04, 0x6b, 0xb9, 0x00, 0x06, 0x32, 0x00, - 0xa0, 0x84, 0xef, 0xff, 0x20, 0x80, 0x00, 0x0e, 0x01, 0x5e, 0x00, 0x05, - 0x00, 0x06, 0x32, 0x00, 0xa0, 0x85, 0x10, 0x00, 0x0c, 0xb8, 0x01, 0x26, - 0x20, 0x91, 0x28, 0x00, 0x20, 0x79, 0xb8, 0xe1, 0x01, 0x2e, 0x00, 0xd6, - 0x20, 0x69, 0xb8, 0xe1, 0x68, 0x03, 0x00, 0x05, 0x20, 0x69, 0x00, 0x04, - 0x2d, 0x04, 0xa0, 0x85, 0x80, 0x01, 0x20, 0x6a, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xc6, 0x60, 0x27, 0x00, 0x01, 0x78, 0x04, 0xa0, 0x84, 0x00, 0x07, - 0x00, 0x02, 0x6b, 0xf7, 0x6c, 0x18, 0x6c, 0x6b, 0x6b, 0xfd, 0x6c, 0x18, - 0x6b, 0xf7, 0x6b, 0xf5, 0x6b, 0xf5, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0x6a, 0x82, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xce, 0x00, 0x05, 0x62, 0xc0, - 0x82, 0xff, 0x11, 0x10, 0x00, 0xce, 0x00, 0x05, 0x20, 0x11, 0x4b, 0x23, - 0x08, 0x0c, 0x6a, 0x0e, 0x78, 0x28, 0xa0, 0x92, 0x00, 0xc8, 0x12, 0x28, - 0x80, 0x00, 0x78, 0x2a, 0x08, 0x0c, 0x4b, 0x65, 0x0c, 0x88, 0x08, 0x0c, - 0x4b, 0x23, 0x78, 0x07, 0x00, 0x03, 0x78, 0x27, 0x00, 0x00, 0x78, 0x2b, - 0x00, 0x00, 0x0c, 0x40, 0x08, 0x0c, 0x6a, 0x82, 0x3c, 0x00, 0x00, 0x06, - 0x20, 0x11, 0x02, 0x09, 0x20, 0xe1, 0x40, 0x00, 0x22, 0x14, 0x00, 0x0e, - 0x20, 0xe0, 0x82, 0xff, 0x01, 0x78, 0x62, 0xc0, 0x82, 0xff, 0x11, 0x60, - 0x78, 0x2b, 0x00, 0x00, 0x78, 0x24, 0xa0, 0x65, 0x09, 0x0c, 0x15, 0x1a, - 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, 0x00, 0x05, - 0x39, 0x00, 0xa0, 0x82, 0xba, 0x2d, 0x12, 0x10, 0x08, 0x0c, 0x83, 0xb9, - 0x00, 0xc6, 0x78, 0x24, 0xa0, 0x65, 0x09, 0x0c, 0x15, 0x1a, 0x78, 0x04, - 0xa0, 0x86, 0x00, 0x04, 0x09, 0x04, 0x6c, 0xab, 0x78, 0x28, 0xa0, 0x92, - 0x27, 0x10, 0x12, 0x30, 0x80, 0x00, 0x78, 0x2a, 0x00, 0xce, 0x08, 0x0c, - 0x7d, 0xe6, 0x0c, 0x20, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x03, 0x11, 0x88, - 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, 0x70, 0xe0, 0x00, 0xee, 0xd0, 0x8c, - 0x01, 0x50, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0xb6, 0x00, 0x08, 0x0c, 0x4b, 0x7b, 0x00, 0xee, 0x00, 0xce, 0x08, 0x0c, - 0xb5, 0x00, 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, - 0x08, 0x38, 0x20, 0x01, 0xb8, 0xfd, 0x20, 0x03, 0x00, 0x00, 0x62, 0xc0, - 0x82, 0xff, 0x11, 0x60, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x24, 0xa0, 0x65, - 0x09, 0x0c, 0x15, 0x1a, 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0x87, 0x2c, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x39, 0x00, 0xa0, 0x82, - 0xba, 0x2d, 0x12, 0x10, 0x08, 0x0c, 0x83, 0xb9, 0x78, 0x24, 0xa0, 0x05, - 0x09, 0x0c, 0x15, 0x1a, 0x78, 0x1c, 0xa0, 0x6d, 0x09, 0x0c, 0x15, 0x1a, - 0x68, 0x00, 0xc0, 0xdc, 0x68, 0x02, 0x79, 0x24, 0x21, 0x60, 0x08, 0x0c, - 0x86, 0xa4, 0x69, 0x3c, 0x81, 0xff, 0x09, 0x0c, 0x15, 0x1a, 0x81, 0x09, - 0x69, 0x3e, 0x68, 0x54, 0xa0, 0x15, 0x01, 0x10, 0x7a, 0x1e, 0x00, 0x10, - 0x79, 0x18, 0x79, 0x1e, 0x78, 0x07, 0x00, 0x00, 0x78, 0x27, 0x00, 0x00, - 0x00, 0xde, 0x00, 0xce, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x88, 0x61, 0x04, - 0xa1, 0x86, 0x00, 0x02, 0x01, 0x28, 0xa1, 0x86, 0x00, 0x04, 0x01, 0x10, - 0x08, 0x04, 0x6c, 0x44, 0x78, 0x08, 0xac, 0x06, 0x09, 0x04, 0x6c, 0x44, - 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0xce, 0x08, 0x0c, - 0x71, 0xe5, 0x08, 0x04, 0x6c, 0x32, 0x00, 0xc6, 0x60, 0x27, 0x00, 0x02, - 0x62, 0xc8, 0x60, 0xc4, 0xa2, 0x05, 0x11, 0x78, 0x79, 0x3c, 0xa1, 0xe5, - 0x00, 0x00, 0x01, 0x30, 0x20, 0x09, 0x00, 0x49, 0x08, 0x0c, 0x86, 0xd3, - 0x00, 0xce, 0x00, 0x05, 0x20, 0x11, 0xb9, 0x00, 0x20, 0x13, 0x00, 0x00, - 0x0c, 0xc8, 0x39, 0x08, 0xa1, 0x92, 0xba, 0x2d, 0x12, 0x10, 0x08, 0x0c, - 0x83, 0xb9, 0x79, 0x3c, 0x81, 0xff, 0x0d, 0x90, 0x79, 0x44, 0xa1, 0x92, - 0x75, 0x30, 0x12, 0xb8, 0x81, 0x08, 0x79, 0x46, 0x79, 0x3c, 0xa1, 0x88, - 0x00, 0x07, 0x21, 0x0c, 0xa1, 0x8e, 0x00, 0x06, 0x11, 0x38, 0x60, 0x14, - 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, 0x00, 0x12, 0x60, 0x16, 0x08, 0xe0, - 0x60, 0x14, 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, 0x00, 0x16, 0x60, 0x16, - 0x08, 0xa8, 0x78, 0x48, 0xc0, 0x85, 0x78, 0x4a, 0x08, 0x88, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x0f, - 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0xb8, 0xe1, 0x60, 0x20, 0x80, 0x00, - 0x60, 0x22, 0x60, 0x10, 0xa0, 0x05, 0x01, 0x48, 0xa0, 0x80, 0x00, 0x03, - 0x21, 0x02, 0x61, 0x12, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x61, 0x16, 0x61, 0x12, 0x0c, 0xc0, 0x00, 0xd6, 0x20, 0x69, - 0xb8, 0xe1, 0x60, 0x00, 0xd0, 0xd4, 0x01, 0x68, 0x68, 0x20, 0x80, 0x00, - 0x68, 0x22, 0xa0, 0x86, 0x00, 0x01, 0x11, 0x10, 0x2c, 0x00, 0x68, 0x1e, - 0x68, 0x04, 0xa0, 0x84, 0x00, 0x07, 0x08, 0x04, 0x71, 0xeb, 0xc0, 0xd5, - 0x60, 0x02, 0x68, 0x18, 0xa0, 0x05, 0x01, 0x58, 0x60, 0x56, 0x60, 0x5b, - 0x00, 0x00, 0x00, 0x06, 0x2c, 0x00, 0x68, 0x1a, 0x00, 0xde, 0x68, 0x5a, - 0x20, 0x69, 0xb8, 0xe1, 0x0c, 0x18, 0x60, 0x56, 0x60, 0x5a, 0x2c, 0x00, - 0x68, 0x1a, 0x68, 0x1e, 0x08, 0xe8, 0x00, 0x06, 0x00, 0x16, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, - 0x20, 0x61, 0xb8, 0xe1, 0x60, 0x20, 0x80, 0x00, 0x60, 0x22, 0x60, 0x08, - 0xa0, 0x05, 0x01, 0x48, 0xa0, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x0a, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x61, 0x0e, - 0x61, 0x0a, 0x0c, 0xc0, 0x00, 0xc6, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, - 0x20, 0x61, 0xb8, 0xe1, 0x60, 0x34, 0xa0, 0x05, 0x01, 0x30, 0xa0, 0x80, - 0x00, 0x03, 0x21, 0x02, 0x61, 0x36, 0x00, 0xce, 0x00, 0x05, 0x61, 0x3a, - 0x61, 0x36, 0x0c, 0xd8, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x76, 0x00, 0x66, 0x00, 0x56, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, - 0x00, 0x06, 0x01, 0x26, 0xa0, 0x2e, 0x20, 0x71, 0xb8, 0xe1, 0x76, 0x38, - 0x26, 0x60, 0x26, 0x78, 0x20, 0x91, 0x80, 0x00, 0x8c, 0xff, 0x09, 0x04, - 0x6d, 0xed, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa2, 0x06, - 0x19, 0x04, 0x6d, 0xe8, 0x87, 0xff, 0x01, 0x20, 0x60, 0x50, 0xa1, 0x06, - 0x19, 0x04, 0x6d, 0xe8, 0x70, 0x3c, 0xac, 0x06, 0x11, 0x90, 0x00, 0x36, - 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0x80, 0x6b, 0x70, 0x33, 0x00, 0x00, - 0x70, 0x3f, 0x00, 0x00, 0x70, 0x43, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, - 0x70, 0x4b, 0x00, 0x00, 0x00, 0x3e, 0x20, 0x29, 0x00, 0x01, 0x70, 0x38, - 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0xac, 0x36, - 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x36, - 0x00, 0x10, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, - 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, - 0x00, 0x00, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0xc8, 0x60, 0x10, 0x20, 0x68, - 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x15, 0x80, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x00, 0x16, 0x00, 0x36, 0x00, 0x76, - 0x08, 0x0c, 0x9f, 0x88, 0x08, 0x0c, 0xb4, 0x3c, 0x08, 0x0c, 0x54, 0x7a, - 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x0c, 0x9e, 0xcd, 0x08, 0x0c, - 0x9e, 0xd9, 0x00, 0xce, 0x08, 0x04, 0x6d, 0x88, 0x2c, 0x78, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0x04, 0x6d, 0x88, 0x85, 0xff, 0x01, 0x20, 0x00, 0x36, - 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x3e, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x06, 0x11, 0x58, 0x00, 0x16, 0x00, 0x36, 0x00, 0x76, 0x08, 0x0c, - 0xb4, 0x3c, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0xa0, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x0a, 0x09, 0x04, 0x6d, 0xd2, - 0x08, 0x04, 0x6d, 0xd0, 0x00, 0x06, 0x00, 0x66, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xf6, 0x20, 0x31, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x79, 0xb8, 0xe1, 0x78, 0x38, 0xa0, 0x65, 0x05, 0x68, 0x60, 0x0c, - 0x00, 0x06, 0x60, 0x0f, 0x00, 0x00, 0x78, 0x3c, 0xac, 0x06, 0x11, 0x80, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0x80, 0x6b, 0x78, 0x33, - 0x00, 0x00, 0x78, 0x3f, 0x00, 0x00, 0x78, 0x43, 0x00, 0x00, 0x78, 0x47, - 0x00, 0x00, 0x78, 0x4b, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x0c, 0x9d, 0x16, - 0x01, 0x78, 0x60, 0x10, 0x20, 0x68, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, - 0x11, 0xb0, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, - 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, 0x08, 0x0c, 0x9e, 0xd9, - 0x00, 0x0e, 0x08, 0x88, 0x7e, 0x3a, 0x7e, 0x36, 0x01, 0x2e, 0x00, 0xfe, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x05, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, 0xb1, 0x55, 0x0c, 0x60, - 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x0a, 0x0d, 0x08, 0x08, 0xf0, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x86, 0x20, 0x41, 0x00, 0x00, 0x00, 0x99, 0x08, 0x0c, - 0x6f, 0x35, 0x00, 0x8e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xf6, - 0x01, 0x26, 0x20, 0x79, 0xb8, 0xe1, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x6f, 0xc2, 0x08, 0x0c, 0x70, 0x34, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x16, - 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, - 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x09, 0x04, 0x6f, 0x0b, - 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa2, 0x06, 0x19, 0x04, - 0x6f, 0x06, 0x88, 0xff, 0x01, 0x20, 0x60, 0x50, 0xa1, 0x06, 0x19, 0x04, - 0x6f, 0x06, 0x70, 0x24, 0xac, 0x06, 0x15, 0x38, 0x20, 0x69, 0x01, 0x00, - 0x68, 0xc0, 0xa0, 0x05, 0x01, 0xf0, 0x08, 0x0c, 0x6a, 0x82, 0x08, 0x0c, - 0x7d, 0xf3, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, 0x70, 0x27, - 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, - 0x10, 0x00, 0x01, 0x20, 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, - 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, - 0x00, 0x01, 0x00, 0x3e, 0x00, 0x20, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, - 0x04, 0xe8, 0x70, 0x14, 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x16, - 0x70, 0x10, 0xac, 0x36, 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, - 0x2f, 0x00, 0x70, 0x12, 0x00, 0x10, 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, - 0x00, 0x66, 0x2c, 0x00, 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, - 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, - 0x9d, 0x16, 0x01, 0xb8, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x15, 0x40, - 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0x9f, 0x88, 0x08, 0x0c, 0xb4, 0x3c, - 0x08, 0x0c, 0x54, 0x7a, 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x0c, - 0x9e, 0xcd, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x81, 0xa5, 0x00, 0xce, - 0x08, 0x04, 0x6e, 0x8f, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, - 0x6e, 0x8f, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x06, 0x11, 0x58, 0x00, 0x16, 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, - 0xb4, 0x3c, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0xe0, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x02, 0x11, 0x28, 0x60, 0x04, - 0xa0, 0x86, 0x00, 0x85, 0x09, 0x08, 0x08, 0x98, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x05, 0x19, 0x78, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x85, 0x0d, 0x20, - 0x08, 0x50, 0x00, 0xc6, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0xa2, 0x80, 0xb7, 0x35, 0x20, 0x04, 0xa0, 0x65, 0x09, 0x04, 0x6f, 0xbe, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x66, 0x20, 0x71, 0xb8, 0xe1, - 0x66, 0x54, 0x70, 0x18, 0xac, 0x06, 0x11, 0x08, 0x76, 0x1a, 0x70, 0x1c, - 0xac, 0x06, 0x11, 0x30, 0x86, 0xff, 0x11, 0x18, 0x70, 0x18, 0x70, 0x1e, - 0x00, 0x08, 0x76, 0x1e, 0x60, 0x58, 0xa0, 0x7d, 0x01, 0x08, 0x7e, 0x56, - 0xa6, 0xed, 0x00, 0x00, 0x01, 0x10, 0x2f, 0x00, 0x68, 0x5a, 0x60, 0x57, - 0x00, 0x00, 0x60, 0x5b, 0x00, 0x00, 0x60, 0x00, 0xc0, 0xd4, 0xc0, 0xdc, - 0x60, 0x02, 0x08, 0x0c, 0x4f, 0x46, 0x09, 0x04, 0x6f, 0xba, 0x76, 0x24, - 0x86, 0xff, 0x05, 0xe8, 0xa6, 0x80, 0x00, 0x04, 0x20, 0x04, 0xad, 0x06, - 0x15, 0xc0, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, - 0x05, 0x48, 0x08, 0x0c, 0x6a, 0x82, 0x08, 0x0c, 0x7d, 0xf3, 0x68, 0xc3, - 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, - 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x01, 0x20, - 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, - 0x00, 0xde, 0x00, 0xc6, 0x60, 0x3c, 0xa0, 0x05, 0x01, 0x10, 0x80, 0x01, - 0x60, 0x3e, 0x26, 0x60, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xce, 0x00, 0x48, - 0x00, 0xde, 0x00, 0xc6, 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, - 0x00, 0xce, 0x08, 0x04, 0x6f, 0x65, 0x8d, 0xff, 0x01, 0x58, 0x68, 0x37, - 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x9f, 0x88, - 0x08, 0x0c, 0xb4, 0x3c, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x81, 0xa5, - 0x08, 0x04, 0x6f, 0x65, 0x00, 0x6e, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x06, 0x00, 0x66, - 0x00, 0xc6, 0x00, 0xd6, 0x20, 0x31, 0x00, 0x00, 0x78, 0x14, 0xa0, 0x65, - 0x09, 0x04, 0x70, 0x14, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x0f, 0x00, 0x00, - 0x78, 0x24, 0xac, 0x06, 0x15, 0x40, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, - 0xa0, 0x05, 0x01, 0xf0, 0x08, 0x0c, 0x6a, 0x82, 0x08, 0x0c, 0x7d, 0xf3, - 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, 0x78, 0x27, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, - 0x01, 0x20, 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, - 0x00, 0x3e, 0x00, 0x28, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x2c, 0x30, - 0x00, 0xb0, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x68, - 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x11, 0xb8, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, - 0x9e, 0xcd, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x81, 0xa5, 0x00, 0x0e, - 0x08, 0x04, 0x6f, 0xc9, 0x7e, 0x16, 0x7e, 0x12, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x05, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, - 0x11, 0x18, 0x08, 0x0c, 0xb1, 0x55, 0x0c, 0x58, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x02, 0x11, 0x28, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x85, 0x09, 0xd0, - 0x0c, 0x10, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x05, 0x19, 0xf0, 0x60, 0x04, - 0xa0, 0x86, 0x00, 0x85, 0x0d, 0x60, 0x08, 0xc8, 0x00, 0x06, 0x00, 0x66, - 0x00, 0xc6, 0x00, 0xd6, 0x78, 0x18, 0xa0, 0x65, 0x09, 0x04, 0x70, 0x9a, - 0x60, 0x54, 0x00, 0x06, 0x60, 0x57, 0x00, 0x00, 0x60, 0x5b, 0x00, 0x00, - 0x60, 0x00, 0xc0, 0xd4, 0xc0, 0xdc, 0x60, 0x02, 0x08, 0x0c, 0x4f, 0x46, - 0x09, 0x04, 0x70, 0x97, 0x7e, 0x24, 0x86, 0xff, 0x05, 0xe8, 0xa6, 0x80, - 0x00, 0x04, 0x20, 0x04, 0xad, 0x06, 0x15, 0xc0, 0x00, 0xd6, 0x20, 0x69, - 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x05, 0x48, 0x08, 0x0c, 0x6a, 0x82, - 0x08, 0x0c, 0x7d, 0xf3, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, - 0x78, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, - 0xa3, 0x84, 0x10, 0x00, 0x01, 0x20, 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, - 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, - 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x00, 0xde, 0x00, 0xc6, 0x60, 0x3c, - 0xa0, 0x05, 0x01, 0x10, 0x80, 0x01, 0x60, 0x3e, 0x26, 0x60, 0x08, 0x0c, - 0x9e, 0xd9, 0x00, 0xce, 0x00, 0x48, 0x00, 0xde, 0x00, 0xc6, 0x26, 0x60, - 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x00, 0xce, 0x08, 0x04, 0x70, 0x46, - 0x8d, 0xff, 0x01, 0x38, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x81, 0xa5, 0x08, 0x04, - 0x70, 0x46, 0x00, 0x0e, 0x08, 0x04, 0x70, 0x39, 0x78, 0x1e, 0x78, 0x1a, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0x66, 0x60, 0x00, 0xd0, 0xdc, 0x01, 0xa0, 0x60, 0x4c, - 0xa0, 0x6d, 0x01, 0x88, 0x68, 0x48, 0xa6, 0x06, 0x11, 0x70, 0x20, 0x71, - 0xb8, 0xe1, 0x70, 0x24, 0xa0, 0x35, 0x01, 0x48, 0xa0, 0x80, 0x00, 0x04, - 0x20, 0x04, 0xad, 0x06, 0x11, 0x20, 0x60, 0x00, 0xc0, 0xdc, 0x60, 0x02, - 0x00, 0x21, 0x00, 0x6e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x78, 0xc0, 0xa0, 0x05, 0x11, 0x38, 0x00, 0xc6, - 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x00, 0xce, 0x04, 0xa0, - 0x08, 0x0c, 0x7d, 0xf3, 0x78, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, - 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x79, 0x01, 0x40, 0x7b, 0x04, - 0xa3, 0x84, 0x10, 0x00, 0x01, 0x20, 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x20, 0x79, 0x01, 0x00, 0x78, 0x24, 0xd0, 0x84, 0x01, 0x10, - 0x78, 0x27, 0x00, 0x01, 0x08, 0x0c, 0x82, 0xd4, 0x00, 0x3e, 0x08, 0x0c, - 0x4f, 0x46, 0x00, 0xc6, 0x60, 0x3c, 0xa0, 0x05, 0x01, 0x10, 0x80, 0x01, - 0x60, 0x3e, 0x26, 0x60, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, 0x68, 0x37, - 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x9f, 0x88, - 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x81, 0xa5, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x04, 0xa0, 0x84, - 0x00, 0x07, 0x00, 0x02, 0x71, 0x14, 0x71, 0x17, 0x71, 0x2d, 0x71, 0x46, - 0x71, 0x83, 0x71, 0x14, 0x71, 0x12, 0x71, 0x12, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x70, 0x24, 0xa0, 0x65, 0x01, 0x48, - 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, 0x60, 0x0c, 0xa0, 0x15, 0x01, 0x50, - 0x72, 0x16, 0x60, 0x0f, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x70, 0x27, - 0x00, 0x00, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x72, 0x16, 0x72, 0x12, - 0x0c, 0xb0, 0x60, 0x18, 0x20, 0x60, 0x08, 0x0c, 0x4f, 0x46, 0x60, 0x00, - 0xc0, 0xdc, 0x60, 0x02, 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, 0x01, 0x20, - 0x60, 0x54, 0xa0, 0x15, 0x01, 0x40, 0x72, 0x1e, 0x70, 0x07, 0x00, 0x00, - 0x70, 0x27, 0x00, 0x00, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x72, 0x18, - 0x72, 0x1e, 0x0c, 0xb0, 0x70, 0x24, 0xa0, 0x65, 0x05, 0xb8, 0x70, 0x0c, - 0xac, 0x06, 0x11, 0x60, 0x08, 0x0c, 0x81, 0xa5, 0x60, 0x0c, 0xa0, 0x15, - 0x01, 0x20, 0x72, 0x0e, 0x60, 0x0f, 0x00, 0x00, 0x04, 0x48, 0x72, 0x0e, - 0x72, 0x0a, 0x04, 0x30, 0x70, 0x14, 0xac, 0x06, 0x11, 0x60, 0x08, 0x0c, - 0x81, 0xa5, 0x60, 0x0c, 0xa0, 0x15, 0x01, 0x20, 0x72, 0x16, 0x60, 0x0f, - 0x00, 0x00, 0x00, 0xd0, 0x72, 0x16, 0x72, 0x12, 0x00, 0xb8, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x03, 0x11, 0x98, 0x60, 0x18, 0x20, 0x60, 0x08, 0x0c, - 0x4f, 0x46, 0x60, 0x00, 0xc0, 0xdc, 0x60, 0x02, 0x08, 0x0c, 0x81, 0xa5, - 0x70, 0x1c, 0xa0, 0x65, 0x01, 0x38, 0x60, 0x54, 0xa0, 0x15, 0x01, 0x10, - 0x72, 0x1e, 0x00, 0x10, 0x72, 0x18, 0x72, 0x1e, 0x70, 0x27, 0x00, 0x00, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x70, 0x24, 0xa0, 0x65, 0x01, 0x40, - 0x08, 0x0c, 0x81, 0xa5, 0x60, 0x0c, 0xa0, 0x15, 0x01, 0x50, 0x72, 0x0e, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, 0x70, 0x27, 0x00, 0x00, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x72, 0x0e, 0x72, 0x0a, 0x0c, 0xb0, - 0x00, 0xd6, 0x20, 0x69, 0xb8, 0xe1, 0x68, 0x30, 0xa0, 0x84, 0x00, 0x03, - 0x00, 0x02, 0x71, 0xa5, 0x71, 0xa7, 0x71, 0xcb, 0x71, 0xa3, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0xde, 0x00, 0x05, 0x00, 0xc6, 0x68, 0x40, 0xa0, 0x86, - 0x00, 0x01, 0x01, 0xb8, 0x68, 0x3c, 0xa0, 0x65, 0x01, 0x30, 0x60, 0x0c, - 0xa0, 0x15, 0x01, 0x70, 0x6a, 0x3a, 0x60, 0x0f, 0x00, 0x00, 0x68, 0x33, - 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x20, 0x11, 0xb9, 0x00, 0x20, 0x13, - 0x00, 0x00, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x68, 0x3a, 0x68, 0x36, - 0x0c, 0x90, 0x68, 0x43, 0x00, 0x00, 0x68, 0x38, 0xa0, 0x65, 0x0d, 0x68, - 0x60, 0x03, 0x00, 0x03, 0x0c, 0x50, 0x00, 0xc6, 0x68, 0x43, 0x00, 0x00, - 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x3c, 0xa0, 0x65, - 0x01, 0x68, 0x60, 0x0c, 0xa0, 0x15, 0x01, 0x30, 0x6a, 0x3a, 0x60, 0x0f, - 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x00, 0x20, 0x68, 0x3f, 0x00, 0x00, - 0x68, 0x3a, 0x68, 0x36, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, - 0x20, 0x69, 0xb8, 0xe1, 0x68, 0x04, 0xa0, 0x84, 0x00, 0x07, 0x00, 0x02, - 0x71, 0xf6, 0x72, 0x92, 0x72, 0x92, 0x72, 0x92, 0x72, 0x92, 0x72, 0x94, - 0x71, 0xf4, 0x71, 0xf4, 0x08, 0x0c, 0x15, 0x1a, 0x68, 0x20, 0xa0, 0x05, - 0x11, 0x10, 0x00, 0xde, 0x00, 0x05, 0x00, 0xc6, 0x68, 0x0c, 0xa0, 0x65, - 0x01, 0x50, 0x68, 0x07, 0x00, 0x04, 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, - 0x08, 0x0c, 0x72, 0xe4, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x68, 0x14, - 0xa0, 0x65, 0x01, 0x50, 0x68, 0x07, 0x00, 0x01, 0x68, 0x26, 0x68, 0x2b, - 0x00, 0x00, 0x08, 0x0c, 0x72, 0xe4, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0x36, 0x6a, 0x1c, 0xa2, 0xf5, 0x00, 0x00, 0x09, 0x04, - 0x72, 0x8e, 0x70, 0x4c, 0xa0, 0x0d, 0x01, 0x18, 0x70, 0x88, 0xa0, 0x05, - 0x01, 0xa0, 0x70, 0x54, 0xa0, 0x75, 0x01, 0x20, 0xa2, 0x0e, 0x09, 0x04, - 0x72, 0x8e, 0x00, 0x28, 0x68, 0x18, 0xa2, 0x0e, 0x09, 0x04, 0x72, 0x8e, - 0x20, 0x70, 0x70, 0x4c, 0xa0, 0x0d, 0x0d, 0x88, 0x70, 0x88, 0xa0, 0x05, - 0x1d, 0x70, 0x2e, 0x00, 0x68, 0x1e, 0x73, 0x3c, 0x70, 0x38, 0xa3, 0x02, - 0x1e, 0x40, 0x08, 0x0c, 0x86, 0x7b, 0x09, 0x04, 0x72, 0x8e, 0x83, 0x18, - 0x73, 0x3e, 0x61, 0x12, 0x2e, 0x10, 0x62, 0x1a, 0xa1, 0x80, 0x00, 0x14, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x60, 0x5a, 0xa1, 0x80, 0x00, 0x14, - 0x20, 0x03, 0x00, 0x00, 0xa1, 0x80, 0x00, 0x15, 0x20, 0x04, 0xa0, 0x8a, - 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x1b, - 0x83, 0x1b, 0xa3, 0x18, 0x63, 0x16, 0x00, 0x3e, 0x00, 0xf6, 0x2c, 0x78, - 0x71, 0xa0, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x10, - 0xd1, 0xbc, 0x01, 0x50, 0x71, 0x00, 0xd1, 0xf4, 0x01, 0x20, 0x71, 0x14, - 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x40, 0x20, 0x09, 0x00, 0x00, 0x00, 0x28, - 0xa1, 0xe0, 0x2d, 0xf9, 0x2c, 0x0d, 0xa1, 0x8c, 0x00, 0xff, 0x20, 0x61, - 0x01, 0x00, 0x61, 0x9a, 0x08, 0x0c, 0x79, 0x14, 0x73, 0x00, 0xc3, 0xdd, - 0x73, 0x02, 0x68, 0x07, 0x00, 0x02, 0x2f, 0x18, 0x6b, 0x26, 0x68, 0x2b, - 0x00, 0x00, 0x78, 0x1f, 0x00, 0x03, 0x78, 0x03, 0x00, 0x01, 0x78, 0x07, - 0x00, 0x40, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x3e, 0x00, 0xee, 0x00, 0xce, 0x0c, 0xd0, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xc6, 0x68, 0x0c, 0xa0, 0x65, 0x01, 0x38, 0x68, 0x07, 0x00, 0x04, - 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, 0x08, 0x0c, 0x72, 0xe4, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xd6, 0x20, 0x69, 0xb8, 0xe1, - 0x68, 0x30, 0xa0, 0x86, 0x00, 0x00, 0x11, 0xd0, 0x20, 0x01, 0xb6, 0x0c, - 0x20, 0x0c, 0xd1, 0xbc, 0x15, 0x60, 0x68, 0x38, 0xa0, 0x7d, 0x01, 0x90, - 0x68, 0x33, 0x00, 0x01, 0x68, 0x3e, 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, - 0x00, 0x00, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x24, 0x00, 0x00, 0x2e, - 0x08, 0x0c, 0x20, 0x3d, 0x11, 0x30, 0x01, 0x2e, 0x08, 0x0c, 0x7c, 0x5d, - 0x00, 0xde, 0x00, 0xfe, 0x00, 0x05, 0x01, 0x2e, 0xe0, 0x00, 0x68, 0x43, - 0x00, 0x00, 0x78, 0x03, 0x00, 0x02, 0x78, 0x0c, 0xa0, 0x15, 0x01, 0x40, - 0x6a, 0x3a, 0x78, 0x0f, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, - 0x00, 0x00, 0x0c, 0x60, 0x68, 0x3a, 0x68, 0x36, 0x0c, 0xc0, 0xc1, 0xbc, - 0x21, 0x02, 0x00, 0x66, 0x20, 0x31, 0x00, 0x01, 0x08, 0x0c, 0x5b, 0xc3, - 0x00, 0x6e, 0x08, 0x58, 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x0b, - 0x00, 0x05, 0x72, 0xf2, 0x72, 0xf7, 0x77, 0xb5, 0x78, 0xd1, 0x72, 0xf7, - 0x77, 0xb5, 0x78, 0xd1, 0x72, 0xf2, 0x72, 0xf7, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, - 0x00, 0xc6, 0x00, 0xf6, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x80, 0x1a, 0x0c, - 0x15, 0x1a, 0x61, 0x18, 0x21, 0x78, 0x79, 0xa0, 0x20, 0x11, 0xb6, 0x35, - 0x22, 0x14, 0xd2, 0xac, 0x11, 0x10, 0xd1, 0xbc, 0x01, 0x50, 0x79, 0x00, - 0xd1, 0xf4, 0x01, 0x20, 0x79, 0x14, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x40, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x28, 0xa1, 0xf8, 0x2d, 0xf9, 0x2f, 0x0d, - 0xa1, 0x8c, 0x00, 0xff, 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, - 0xa0, 0x8a, 0x00, 0x40, 0x1a, 0x04, 0x73, 0x6b, 0x00, 0x33, 0x00, 0xfe, - 0x00, 0xce, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0x05, 0x74, 0x1a, - 0x74, 0x65, 0x74, 0x92, 0x75, 0x5f, 0x75, 0x8d, 0x75, 0x95, 0x75, 0xbb, - 0x75, 0xcc, 0x75, 0xdd, 0x75, 0xe5, 0x75, 0xfb, 0x75, 0xe5, 0x76, 0x5c, - 0x75, 0xcc, 0x76, 0x7d, 0x76, 0x85, 0x75, 0xdd, 0x76, 0x85, 0x76, 0x96, - 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, - 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x73, 0x69, 0x7e, 0xfe, - 0x7f, 0x23, 0x7f, 0x46, 0x7f, 0x69, 0x7f, 0x8a, 0x75, 0xbb, 0x73, 0x69, - 0x75, 0xbb, 0x75, 0xe5, 0x73, 0x69, 0x74, 0x92, 0x75, 0x5f, 0x73, 0x69, - 0x83, 0xd6, 0x75, 0xe5, 0x73, 0x69, 0x83, 0xf6, 0x75, 0xe5, 0x73, 0x69, - 0x75, 0xdd, 0x74, 0x13, 0x73, 0x7e, 0x73, 0x69, 0x84, 0x1b, 0x84, 0x90, - 0x85, 0x67, 0x73, 0x69, 0x85, 0x78, 0x75, 0xb6, 0x85, 0x94, 0x73, 0x69, - 0x7f, 0x9f, 0x85, 0xef, 0x73, 0x69, 0x08, 0x0c, 0x15, 0x1a, 0x21, 0x00, - 0x00, 0x33, 0x00, 0xfe, 0x00, 0xce, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, - 0x00, 0x05, 0x73, 0x7c, 0x73, 0x7c, 0x73, 0x7c, 0x73, 0xb2, 0x73, 0xd0, - 0x73, 0xe6, 0x73, 0x7c, 0x73, 0x7c, 0x73, 0x7c, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0xd6, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x78, 0x10, - 0x20, 0x68, 0x20, 0xa3, 0x24, 0x14, 0x20, 0xa3, 0x00, 0x18, 0x20, 0xa3, - 0x08, 0x00, 0x68, 0x3c, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x68, 0x50, - 0x20, 0xa2, 0x68, 0x54, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x18, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xd6, 0x78, 0x18, 0x20, 0x68, 0x68, 0xa0, 0x20, 0x69, - 0xb6, 0x00, 0x6a, 0xd4, 0xd2, 0xac, 0x11, 0x10, 0xd0, 0xbc, 0x01, 0x10, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x20, 0xa1, - 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, 0x05, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x78, 0x10, 0xa0, 0xe8, 0x00, 0x0f, 0x68, 0x08, 0x20, 0xa2, - 0x68, 0x0c, 0x20, 0xa2, 0x68, 0x10, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x68, 0x18, 0x20, 0xa2, 0x68, 0x1c, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x10, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0xde, 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, 0x78, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x78, 0x08, 0x80, 0x07, 0x20, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, - 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0xdf, 0x10, 0x20, 0xa3, 0x00, 0x34, 0x20, 0x99, 0xb6, 0x05, - 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa6, 0x20, 0x99, 0xb6, 0x01, 0x20, 0xa9, - 0x00, 0x04, 0x53, 0xa6, 0x20, 0x99, 0xb8, 0xc7, 0x20, 0xa9, 0x00, 0x1a, - 0x33, 0x04, 0x80, 0x07, 0x20, 0xa2, 0x93, 0x98, 0x1f, 0x04, 0x74, 0x02, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x4c, - 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x20, 0x01, - 0xb6, 0x15, 0x20, 0x04, 0x60, 0x9a, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, 0x52, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x00, 0xd6, 0x20, 0x69, 0xb6, 0x52, 0x68, 0x04, - 0xd0, 0x84, 0x01, 0x50, 0x68, 0x28, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x16, - 0x08, 0x0c, 0x28, 0x66, 0x21, 0xa2, 0x00, 0x1e, 0x00, 0xde, 0x00, 0x28, - 0x00, 0xde, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x99, 0xb6, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x99, 0xb6, 0x01, 0x53, 0xa6, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, - 0xd0, 0xac, 0x11, 0x38, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0xa0, 0x82, 0x00, 0x7f, 0x02, 0x38, 0x20, 0x01, 0xb6, 0x1c, 0x20, 0xa6, - 0x20, 0x01, 0xb6, 0x1d, 0x20, 0xa6, 0x00, 0x40, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x1c, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x76, 0xb3, 0x20, 0xa3, 0x05, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x38, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x7f, 0x02, 0x38, 0x20, 0x01, - 0xb6, 0x1c, 0x20, 0xa6, 0x20, 0x01, 0xb6, 0x1d, 0x20, 0xa6, 0x00, 0x40, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0xb6, 0x05, - 0x53, 0xa6, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x00, 0xc6, 0x78, 0x18, - 0x20, 0x60, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x53, 0x85, 0x00, 0xce, - 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x7e, - 0x11, 0x30, 0x20, 0xa3, 0x04, 0x00, 0x62, 0x0c, 0xc2, 0xb4, 0x62, 0x0e, - 0x00, 0x10, 0x20, 0xa3, 0x03, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x7e, 0x19, 0x04, - 0x75, 0x21, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0xc8, - 0x20, 0x99, 0xb8, 0x8e, 0x33, 0xa6, 0x93, 0x98, 0x20, 0xa3, 0x00, 0x00, - 0x93, 0x98, 0x33, 0x04, 0xa0, 0x84, 0x20, 0x00, 0x20, 0xa2, 0x93, 0x98, - 0x33, 0xa6, 0x93, 0x98, 0x20, 0xa3, 0x00, 0x00, 0x93, 0x98, 0x20, 0x01, - 0x27, 0x10, 0x20, 0xa2, 0x93, 0x98, 0x33, 0xa6, 0x93, 0x98, 0x33, 0xa6, - 0x00, 0xd0, 0x20, 0x99, 0xb8, 0x8e, 0x33, 0xa6, 0x93, 0x98, 0x33, 0xa6, - 0x93, 0x98, 0x33, 0x04, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x18, 0xa0, 0x84, - 0x37, 0xff, 0x00, 0x10, 0xa0, 0x84, 0x3f, 0xff, 0x20, 0xa2, 0x93, 0x98, - 0x33, 0xa6, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, - 0xb6, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0xb6, 0x01, - 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, 0x1f, 0x04, - 0x74, 0xfb, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, 0x1f, 0x04, - 0x75, 0x01, 0x20, 0x99, 0xb8, 0x96, 0x33, 0x04, 0xc0, 0xdd, 0x20, 0xa2, - 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xe4, 0x01, 0x58, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x93, 0x98, 0x93, 0x98, 0x93, 0x98, - 0x33, 0xa6, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x07, - 0x20, 0xa3, 0x00, 0x00, 0x1f, 0x04, 0x75, 0x1c, 0x04, 0x68, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x40, 0x20, 0x01, 0xb8, 0x8f, - 0x20, 0x04, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x28, 0xa7, 0x60, 0xe2, - 0x20, 0x99, 0xb8, 0x8e, 0x20, 0xa9, 0x00, 0x08, 0x53, 0xa6, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x99, 0xb6, 0x05, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x99, 0xb6, 0x01, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, - 0x00, 0x00, 0x1f, 0x04, 0x75, 0x3f, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, - 0x00, 0x00, 0x1f, 0x04, 0x75, 0x45, 0x20, 0x99, 0xb8, 0x96, 0x20, 0xa9, - 0x00, 0x08, 0x53, 0xa6, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa3, 0x00, 0x00, - 0x1f, 0x04, 0x75, 0x50, 0x20, 0xa9, 0x00, 0x0a, 0x20, 0xa3, 0x00, 0x00, - 0x1f, 0x04, 0x75, 0x56, 0x60, 0xc3, 0x00, 0x74, 0x08, 0x0c, 0x7d, 0xe0, - 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, - 0x20, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, 0x08, 0x00, 0x20, 0xa3, - 0x20, 0x00, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x52, 0x79, 0x04, 0x00, 0xfe, - 0xd1, 0xac, 0x11, 0x10, 0xa0, 0x85, 0x00, 0x20, 0xd1, 0xa4, 0x01, 0x10, - 0xa0, 0x85, 0x00, 0x10, 0xa0, 0x85, 0x00, 0x02, 0x00, 0xd6, 0x08, 0x04, - 0x76, 0x3e, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, - 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, 0x50, 0x00, 0x08, 0x04, - 0x74, 0xad, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, - 0x21, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x77, 0x47, 0x00, 0x20, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x04, 0x08, 0x0c, - 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, - 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x03, - 0x20, 0xa3, 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, - 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, - 0x02, 0x00, 0x08, 0x04, 0x74, 0xad, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x77, 0x4f, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x28, - 0xa0, 0x05, 0x01, 0x10, 0x20, 0xa2, 0x00, 0x10, 0x20, 0xa3, 0x00, 0x03, - 0x78, 0x10, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, - 0x00, 0x05, 0x00, 0xd6, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, - 0x20, 0xa3, 0x02, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, 0x08, 0x00, - 0x78, 0x18, 0x20, 0x68, 0x68, 0x94, 0xa0, 0x86, 0x00, 0x14, 0x11, 0x98, - 0x69, 0x9c, 0xa1, 0x84, 0x00, 0x30, 0x01, 0x90, 0x69, 0x98, 0xa1, 0x84, - 0xc0, 0x00, 0x11, 0x40, 0xd1, 0xec, 0x01, 0x18, 0x20, 0xa3, 0x21, 0x00, - 0x00, 0x58, 0x20, 0xa3, 0x01, 0x00, 0x00, 0x40, 0x20, 0xa3, 0x04, 0x00, - 0x00, 0x28, 0x20, 0xa3, 0x07, 0x00, 0x00, 0x10, 0x70, 0x0f, 0x08, 0x00, - 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x52, 0x79, 0x04, 0x00, 0xfe, 0xd1, 0xac, - 0x11, 0x10, 0xa0, 0x85, 0x00, 0x20, 0xd1, 0xa4, 0x01, 0x10, 0xa0, 0x85, - 0x00, 0x10, 0x20, 0x09, 0xb6, 0x74, 0x21, 0x0c, 0xd1, 0x84, 0x11, 0x10, - 0xa0, 0x85, 0x00, 0x02, 0x00, 0x26, 0x20, 0x09, 0xb6, 0x72, 0x21, 0x0c, - 0xd1, 0xe4, 0x01, 0x30, 0xc0, 0xc5, 0xa0, 0x94, 0x00, 0x30, 0xa2, 0x96, - 0x00, 0x10, 0x01, 0x40, 0xd1, 0xec, 0x01, 0x30, 0xa0, 0x94, 0x00, 0x30, - 0xa2, 0x96, 0x00, 0x10, 0x01, 0x08, 0xc0, 0xbd, 0x00, 0x2e, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x7d, 0xe0, - 0x00, 0xde, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, - 0x20, 0xa3, 0x02, 0x10, 0x20, 0xa3, 0x00, 0x14, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, - 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x00, 0x08, 0x04, - 0x74, 0x20, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, - 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x03, 0x20, 0xa3, - 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x0b, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x08, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, - 0x20, 0x19, 0x32, 0x00, 0x20, 0x21, 0x08, 0x00, 0x00, 0x38, 0x00, 0x26, - 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x22, 0x00, 0x20, 0x21, 0x01, 0x00, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x14, 0xa2, 0x86, 0x00, 0x7e, 0x11, 0xa0, 0xa3, 0x85, - 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, 0xff, 0xfe, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x04, - 0xa0, 0x05, 0x01, 0x18, 0x20, 0x11, 0xb6, 0x1d, 0x22, 0x14, 0x22, 0xa2, - 0x04, 0xd0, 0xa2, 0x86, 0x00, 0x7f, 0x11, 0x38, 0x00, 0xd6, 0xa3, 0x85, - 0x00, 0xff, 0x20, 0xa2, 0x20, 0xa3, 0xff, 0xfd, 0x00, 0xc8, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x11, 0x10, 0xd2, 0xbc, 0x01, 0xc8, - 0xa2, 0x86, 0x00, 0x80, 0x00, 0xd6, 0x11, 0x30, 0xa3, 0x85, 0x00, 0xff, - 0x20, 0xa2, 0x20, 0xa3, 0xff, 0xfc, 0x00, 0x40, 0xa2, 0xe8, 0xb7, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x80, 0x00, 0xd6, 0xa2, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, 0xa4, 0x85, - 0x00, 0x29, 0x20, 0xa2, 0x00, 0x4e, 0x00, 0x3e, 0x20, 0xa3, 0x00, 0x00, - 0x08, 0x0c, 0x7d, 0xcf, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x2f, 0xa2, - 0x20, 0xa3, 0xff, 0xff, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x00, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, - 0x40, 0x00, 0x20, 0xa3, 0x02, 0xff, 0x20, 0x11, 0xff, 0xfc, 0x22, 0xa2, - 0x00, 0xd6, 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, - 0x00, 0xde, 0x20, 0xa3, 0x20, 0x29, 0x20, 0xa3, 0x00, 0x00, 0x08, 0xe0, - 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0xfc, 0x02, - 0x20, 0xa3, 0x00, 0x00, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, - 0x20, 0x19, 0x33, 0x00, 0x20, 0x21, 0x08, 0x00, 0x00, 0x38, 0x00, 0x26, - 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x23, 0x00, 0x20, 0x21, 0x01, 0x00, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, - 0x11, 0x18, 0xa0, 0x92, 0x00, 0x7e, 0x02, 0xd8, 0x00, 0xd6, 0xa0, 0xe8, - 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x68, 0x10, 0xa0, 0x05, 0x11, 0x40, 0x68, 0x14, 0xa0, 0x05, - 0x11, 0x28, 0x20, 0xa3, 0x00, 0xff, 0x20, 0xa3, 0xff, 0xfe, 0x00, 0x28, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x80, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa3, 0x05, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, 0xa4, 0x85, - 0x00, 0x98, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x3e, - 0x08, 0x0c, 0x7d, 0xcf, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, - 0x22, 0xa2, 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x00, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x7d, 0xcf, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, 0x78, 0x10, 0x20, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xf6, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x85, 0x0a, 0x0c, 0x15, 0x1a, - 0xa0, 0x8a, 0x00, 0x8c, 0x1a, 0x0c, 0x15, 0x1a, 0x61, 0x18, 0x21, 0x78, - 0x79, 0xa0, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x10, - 0xd1, 0xbc, 0x01, 0x50, 0x79, 0x00, 0xd1, 0xf4, 0x01, 0x20, 0x79, 0x14, - 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x40, 0x20, 0x09, 0x00, 0x00, 0x00, 0x28, - 0xa1, 0xf8, 0x2d, 0xf9, 0x2f, 0x0d, 0xa1, 0x8c, 0x00, 0xff, 0x2c, 0x78, - 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0xa0, 0x82, 0x00, 0x85, 0x00, 0x1b, - 0x00, 0xfe, 0x00, 0xce, 0x00, 0x05, 0x77, 0xec, 0x77, 0xf6, 0x78, 0x11, - 0x77, 0xea, 0x77, 0xea, 0x77, 0xea, 0x77, 0xec, 0x08, 0x0c, 0x15, 0x1a, - 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x04, 0xa1, 0x60, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, 0x00, 0x05, 0x01, 0x46, 0x20, 0xa1, - 0x02, 0x0b, 0x08, 0x0c, 0x78, 0x5d, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x78, 0x08, 0x20, 0xa2, 0x78, 0x10, 0x20, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0xa3, 0xff, 0xff, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0xc3, 0x00, 0x0c, 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, - 0x00, 0x05, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x78, 0x97, - 0x20, 0xa3, 0x00, 0x03, 0x20, 0xa3, 0x03, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x04, 0x08, 0x0c, 0x7d, 0xe0, - 0x01, 0x4e, 0x00, 0x05, 0x00, 0x26, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, - 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, - 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x18, 0xa0, 0x92, 0x00, 0x7e, - 0x02, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa0, 0x85, 0x81, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, - 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x88, - 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, - 0x81, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x09, 0x20, 0xa3, 0x00, 0x00, 0x08, 0x04, 0x77, 0x1a, 0x00, 0x26, - 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, - 0x11, 0x18, 0xa0, 0x92, 0x00, 0x7e, 0x02, 0x88, 0x00, 0xd6, 0xa0, 0xe8, - 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x84, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x84, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, - 0x22, 0x14, 0x22, 0xa2, 0x20, 0x01, 0x00, 0x99, 0x20, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x08, 0x04, 0x77, 0xa6, 0x00, 0x26, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x18, 0xa0, 0x92, - 0x00, 0x7e, 0x02, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x85, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa0, 0x85, 0x85, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, - 0x20, 0x01, 0x00, 0x99, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x08, 0x04, - 0x77, 0xa6, 0x00, 0xc6, 0x00, 0xf6, 0x2c, 0x78, 0x78, 0x04, 0xa0, 0x8a, - 0x00, 0x40, 0x0a, 0x0c, 0x15, 0x1a, 0xa0, 0x8a, 0x00, 0x53, 0x1a, 0x0c, - 0x15, 0x1a, 0x79, 0x18, 0x21, 0x60, 0x61, 0xa0, 0x20, 0x11, 0xb6, 0x35, - 0x22, 0x14, 0xd2, 0xac, 0x11, 0x10, 0xd1, 0xbc, 0x01, 0x50, 0x61, 0x00, - 0xd1, 0xf4, 0x01, 0x20, 0x61, 0x14, 0xa1, 0x8c, 0x00, 0xff, 0x00, 0x40, - 0x20, 0x09, 0x00, 0x00, 0x00, 0x28, 0xa1, 0xe0, 0x2d, 0xf9, 0x2c, 0x0d, - 0xa1, 0x8c, 0x00, 0xff, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0xa0, 0x82, - 0x00, 0x40, 0x00, 0x1b, 0x00, 0xfe, 0x00, 0xce, 0x00, 0x05, 0x79, 0x14, - 0x7a, 0x20, 0x79, 0xbd, 0x7b, 0xd2, 0x79, 0x12, 0x79, 0x12, 0x79, 0x12, - 0x79, 0x12, 0x79, 0x12, 0x79, 0x12, 0x79, 0x12, 0x81, 0x5e, 0x81, 0x6e, - 0x81, 0x7e, 0x81, 0x8e, 0x79, 0x12, 0x85, 0xa5, 0x79, 0x12, 0x81, 0x4d, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x01, 0x56, 0x01, 0x46, 0x78, 0x0b, - 0xff, 0xff, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x79, 0x74, 0x79, 0x10, - 0x21, 0x68, 0x69, 0x48, 0x79, 0x52, 0x21, 0xa2, 0xa0, 0x16, 0x22, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x69, 0x4c, 0xa1, 0x84, 0x00, 0x0f, 0x11, 0x18, - 0x20, 0x01, 0x00, 0x05, 0x00, 0x40, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x18, 0xa0, 0x84, 0x00, 0x06, 0x80, 0x04, 0x00, 0x16, - 0x20, 0x08, 0x78, 0x58, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x07, 0xa1, 0x05, - 0x00, 0x1e, 0x20, 0xa2, 0xd1, 0xac, 0x01, 0x18, 0x20, 0xa3, 0x00, 0x02, - 0x00, 0x48, 0xd1, 0xb4, 0x01, 0x18, 0x20, 0xa3, 0x00, 0x01, 0x00, 0x20, - 0x20, 0xa3, 0x00, 0x00, 0x22, 0x30, 0x00, 0x10, 0x6a, 0x80, 0x6e, 0x7c, - 0x20, 0xa9, 0x00, 0x08, 0x01, 0x36, 0xad, 0x88, 0x00, 0x17, 0x21, 0x98, - 0x20, 0xa1, 0x02, 0x1b, 0x53, 0xa6, 0x01, 0x3e, 0x20, 0xa1, 0x02, 0x0b, - 0x22, 0xa2, 0x26, 0xa2, 0x60, 0xc3, 0x00, 0x20, 0x20, 0xe1, 0x90, 0x80, - 0x60, 0x14, 0xa0, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x09, 0x60, 0x16, - 0x20, 0x01, 0xb8, 0xfd, 0x20, 0x03, 0x07, 0xd0, 0x20, 0x01, 0xb8, 0xfc, - 0x20, 0x03, 0x00, 0x09, 0x08, 0x0c, 0x17, 0xe7, 0x01, 0x4e, 0x01, 0x5e, - 0x00, 0xde, 0x00, 0x05, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, - 0x7a, 0x18, 0xa2, 0x80, 0x00, 0x23, 0x20, 0x14, 0x82, 0x10, 0xa2, 0x94, - 0x00, 0xff, 0x22, 0x02, 0x82, 0x17, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0x20, 0x19, 0xb6, 0x35, 0x23, 0x1c, 0xd3, 0xac, 0x11, 0x10, - 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x06, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa0, 0x85, 0x06, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x09, 0xb6, 0x15, 0x21, 0x0c, 0x21, 0xa2, - 0x20, 0xa3, 0x08, 0x29, 0x20, 0xa3, 0x00, 0x00, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x00, 0x2f, 0xa2, 0x20, 0xa3, 0xff, 0xff, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x56, 0x01, 0x36, - 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x00, 0xc1, 0x78, 0x10, 0x20, 0x68, - 0x68, 0x60, 0x20, 0xa2, 0x68, 0x5c, 0x20, 0xa2, 0x68, 0x80, 0x20, 0xa2, - 0x68, 0x7c, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x0c, 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xde, 0x00, 0x05, 0x00, 0x26, 0x20, 0xe1, - 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x10, - 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x05, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa0, 0x85, 0x05, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, - 0x20, 0xa3, 0x08, 0x89, 0x20, 0xa3, 0x00, 0x00, 0x08, 0x0c, 0x7d, 0xcf, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, 0x22, 0xa2, 0x2f, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0xd6, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x78, 0x10, 0xa0, 0xec, - 0xf0, 0x00, 0x01, 0x68, 0xa0, 0x6d, 0x08, 0x0c, 0x53, 0x73, 0x01, 0x48, - 0x68, 0x4c, 0xa0, 0x84, 0x20, 0x20, 0xa0, 0x86, 0x20, 0x20, 0x11, 0x18, - 0x78, 0x20, 0xc0, 0xcd, 0x78, 0x22, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x7b, 0x88, 0xa0, 0x16, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, - 0x22, 0xa2, 0x78, 0x10, 0xa0, 0x84, 0xf0, 0x00, 0x11, 0x30, 0x78, 0x10, - 0xa0, 0x84, 0x07, 0x00, 0x80, 0x07, 0x00, 0x43, 0x00, 0x10, 0xa0, 0x06, - 0x00, 0x2b, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xde, 0x00, 0x05, - 0x7a, 0x5a, 0x7a, 0xef, 0x7a, 0xff, 0x7b, 0x31, 0x7b, 0x44, 0x7b, 0x5f, - 0x7b, 0x68, 0x7a, 0x58, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x16, 0x00, 0x36, - 0x69, 0x4c, 0xa1, 0x8c, 0x00, 0x03, 0x01, 0x18, 0xa1, 0x86, 0x00, 0x03, - 0x11, 0x70, 0x6b, 0x78, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, 0xc3, 0xe5, - 0x23, 0xa2, 0x68, 0x68, 0x20, 0xa2, 0x68, 0x64, 0x20, 0xa2, 0x00, 0x3e, - 0x00, 0x1e, 0x08, 0x04, 0x7b, 0x3b, 0xa1, 0x86, 0x00, 0x01, 0x19, 0x0c, - 0x15, 0x1a, 0x6b, 0x78, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, 0xc3, 0xe5, - 0x23, 0xa2, 0x68, 0x68, 0x20, 0xa2, 0x68, 0x64, 0x20, 0xa2, 0x22, 0xa2, - 0x68, 0x74, 0x20, 0xa2, 0x22, 0xa2, 0x68, 0x7c, 0x20, 0xa2, 0x20, 0x09, - 0x00, 0x18, 0xa3, 0x84, 0x03, 0x00, 0x09, 0x04, 0x7a, 0xe9, 0xd3, 0xc4, - 0x01, 0x10, 0x68, 0x7c, 0xa1, 0x08, 0xd3, 0xcc, 0x01, 0x10, 0x68, 0x74, - 0xa1, 0x08, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x0d, 0xad, 0x80, 0x00, 0x20, - 0x20, 0x1c, 0x83, 0x1f, 0x23, 0xa2, 0x80, 0x00, 0x1f, 0x04, 0x7a, 0x98, - 0x01, 0x5e, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0xa1, 0x84, 0x00, 0x03, - 0x09, 0x04, 0x7a, 0xe9, 0x20, 0xa1, 0x02, 0x0b, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x00, 0x06, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x10, - 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0xa0, 0x85, 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, - 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, - 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, - 0xa0, 0x85, 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xde, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, 0x22, 0x14, 0x22, 0xa2, - 0x00, 0x0e, 0x7b, 0x20, 0xd3, 0xcc, 0x01, 0x18, 0x20, 0xa3, 0x08, 0x89, - 0x00, 0x10, 0x20, 0xa3, 0x08, 0x98, 0x20, 0xa2, 0x08, 0x0c, 0x7d, 0xcf, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x61, 0xc2, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0x11, 0x00, 0x08, 0x20, 0x01, - 0xb6, 0x0d, 0x20, 0x04, 0xd0, 0xf4, 0x01, 0x10, 0x20, 0x11, 0x00, 0x28, - 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, - 0x04, 0xd0, 0x20, 0x11, 0x03, 0x02, 0x00, 0x16, 0x00, 0x36, 0x78, 0x28, - 0x79, 0x2c, 0xa1, 0x1d, 0x01, 0x08, 0xc2, 0xdd, 0x7b, 0x20, 0xd3, 0xcc, - 0x01, 0x08, 0xc2, 0xe5, 0x22, 0xa2, 0x20, 0xa2, 0x21, 0xa2, 0x00, 0x3e, - 0x00, 0x1e, 0xa0, 0x16, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x12, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x08, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, - 0x20, 0xa3, 0x70, 0x00, 0x20, 0xa3, 0x05, 0x00, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x0a, 0x22, 0xa2, 0x22, 0xa2, 0x20, 0xa3, 0x25, 0x00, 0x22, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, 0x00, 0x32, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0x11, 0x00, 0x28, 0x78, 0x20, - 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x22, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, - 0x00, 0x18, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0x11, 0x01, 0x00, - 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, - 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x20, 0xa3, - 0x00, 0x08, 0x22, 0xa2, 0x78, 0x54, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa2, - 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, 0x00, 0x20, 0x08, 0x0c, 0x7d, 0xe0, - 0x00, 0x05, 0x20, 0x11, 0x00, 0x08, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, - 0xc2, 0xe5, 0x22, 0xa2, 0xa0, 0x16, 0x08, 0x88, 0x00, 0x36, 0x7b, 0x10, - 0xa3, 0x84, 0xff, 0x00, 0x78, 0x12, 0xa3, 0x84, 0x00, 0xff, 0x80, 0x01, - 0x11, 0x38, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x22, 0xa2, - 0x00, 0x3e, 0x08, 0x08, 0x00, 0x46, 0x20, 0x21, 0x08, 0x00, 0x00, 0x06, - 0x78, 0x20, 0xd0, 0xcc, 0x00, 0x0e, 0x01, 0x08, 0xc4, 0xe5, 0x24, 0xa2, - 0x00, 0x4e, 0x22, 0xa2, 0x20, 0xa2, 0x00, 0x3e, 0x08, 0x04, 0x7b, 0x3b, - 0x00, 0x26, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0x10, 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, - 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x07, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x07, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, - 0x22, 0x14, 0x22, 0xa2, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x18, 0x20, 0xa3, - 0x08, 0x89, 0x00, 0x10, 0x20, 0xa3, 0x08, 0x98, 0x20, 0xa3, 0x00, 0x00, - 0x08, 0x0c, 0x7d, 0xcf, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x7a, 0x08, - 0x22, 0xa2, 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x00, 0x2e, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, - 0x00, 0x16, 0x00, 0x36, 0x78, 0x10, 0xa0, 0x84, 0x07, 0x00, 0x80, 0x07, - 0x00, 0x3b, 0x00, 0x3e, 0x00, 0x1e, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, - 0x00, 0xde, 0x00, 0x05, 0x7b, 0xec, 0x7b, 0xec, 0x7b, 0xee, 0x7b, 0xec, - 0x7b, 0xec, 0x7b, 0xec, 0x7c, 0x10, 0x7b, 0xec, 0x08, 0x0c, 0x15, 0x1a, - 0x79, 0x10, 0xa1, 0x8c, 0xf8, 0xff, 0xa1, 0x8d, 0x06, 0x00, 0x79, 0x12, - 0x20, 0xa1, 0x02, 0x0b, 0x20, 0x09, 0x00, 0x03, 0x00, 0xf9, 0x00, 0xd6, - 0x20, 0x69, 0xb6, 0x52, 0x68, 0x04, 0xd0, 0xbc, 0x01, 0x30, 0x68, 0x2c, - 0xa0, 0x84, 0x00, 0xff, 0x80, 0x07, 0x20, 0xa2, 0x00, 0x10, 0x20, 0xa3, - 0x3f, 0x00, 0x00, 0xde, 0x22, 0xa2, 0x22, 0xa2, 0x22, 0xa2, 0x60, 0xc3, - 0x00, 0x01, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, - 0x20, 0x09, 0x00, 0x03, 0x00, 0x19, 0x20, 0xa3, 0x7f, 0x00, 0x0c, 0x80, - 0x00, 0x26, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0x10, 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, - 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x01, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x88, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x01, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x11, 0xb6, 0x15, - 0x22, 0x14, 0x22, 0xa2, 0x20, 0xa3, 0x08, 0x88, 0xa1, 0x8d, 0x00, 0x08, - 0x21, 0xa2, 0x08, 0x0c, 0x7d, 0xcf, 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, - 0x7a, 0x08, 0x22, 0xa2, 0x2f, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0xb6, 0x00, 0x71, 0x54, 0x78, 0x18, 0x20, 0x68, 0x68, 0xa0, 0x20, 0x28, - 0x76, 0xd4, 0xd6, 0xac, 0x11, 0x30, 0xd0, 0xbc, 0x11, 0x20, 0x69, 0x10, - 0x6a, 0x14, 0x74, 0x54, 0x00, 0x20, 0x69, 0x10, 0x6a, 0x14, 0x73, 0x70, - 0x74, 0x74, 0x78, 0x1c, 0xa0, 0xbe, 0x00, 0x06, 0x09, 0x04, 0x7d, 0x1a, - 0xa0, 0xbe, 0x00, 0x0a, 0x15, 0xe8, 0xa1, 0x85, 0x02, 0x00, 0x60, 0x62, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x60, 0x73, 0x20, 0x29, 0x60, 0x77, - 0x00, 0x00, 0x68, 0x8c, 0x80, 0x00, 0xa0, 0x84, 0x00, 0xff, 0x68, 0x8e, - 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, 0x2f, 0x00, 0x60, 0x82, - 0x78, 0x08, 0x60, 0x86, 0x78, 0x10, 0x20, 0x70, 0x70, 0x14, 0x60, 0x8a, - 0x70, 0x10, 0x60, 0x8e, 0x70, 0x0c, 0x60, 0xc6, 0x70, 0x08, 0x60, 0xca, - 0x68, 0x6c, 0x60, 0xce, 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, - 0x60, 0x9f, 0x00, 0x00, 0x08, 0x0c, 0x86, 0x40, 0x20, 0x09, 0x07, 0xd0, - 0x60, 0xc4, 0xa0, 0x84, 0xff, 0xf0, 0xa0, 0x05, 0x01, 0x10, 0x20, 0x09, - 0x1b, 0x58, 0x08, 0x0c, 0x6a, 0x87, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x70, 0xd4, 0xd0, 0xac, - 0x11, 0x10, 0xd5, 0xbc, 0x01, 0x38, 0xa1, 0x85, 0x01, 0x00, 0x60, 0x62, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x38, 0xa1, 0x85, 0x01, 0x00, - 0x60, 0x62, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x64, 0x6e, 0x60, 0x73, - 0x08, 0x09, 0x60, 0x77, 0x00, 0x08, 0x68, 0x8c, 0x80, 0x00, 0xa0, 0x84, - 0x00, 0xff, 0x68, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, - 0x2f, 0x00, 0x60, 0x82, 0x78, 0x08, 0x60, 0x86, 0x78, 0x10, 0x20, 0x70, - 0x70, 0x14, 0x60, 0x8a, 0x70, 0x10, 0x60, 0x8e, 0x70, 0x0c, 0x60, 0xc6, - 0x70, 0x08, 0x60, 0xca, 0x79, 0x2c, 0xa1, 0x08, 0x79, 0x2e, 0x70, 0x0c, - 0x79, 0x28, 0xa1, 0x09, 0x79, 0x2a, 0x68, 0x6c, 0x60, 0xce, 0x60, 0xaf, - 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xa5, 0x82, 0x00, 0x80, 0x02, 0x48, - 0x6a, 0x00, 0xd2, 0xf4, 0x01, 0x20, 0x6a, 0x14, 0xa2, 0x94, 0x00, 0xff, - 0x00, 0x10, 0x20, 0x11, 0x00, 0x00, 0x62, 0x9e, 0x08, 0x0c, 0x86, 0x40, - 0x20, 0x09, 0x07, 0xd0, 0x60, 0xc4, 0xa0, 0x84, 0xff, 0xf0, 0xa0, 0x05, - 0x01, 0x10, 0x20, 0x09, 0x1b, 0x58, 0x08, 0x0c, 0x6a, 0x87, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, - 0x78, 0x10, 0x20, 0x70, 0x70, 0x4c, 0xa0, 0x84, 0x00, 0x03, 0xa0, 0x86, - 0x00, 0x02, 0x09, 0x04, 0x7d, 0x70, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, - 0xd0, 0xac, 0x11, 0x10, 0xd5, 0xbc, 0x01, 0x38, 0xa1, 0x85, 0x01, 0x00, - 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x38, 0xa1, 0x85, - 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x64, 0x6e, - 0x60, 0x73, 0x08, 0x80, 0x60, 0x77, 0x00, 0x08, 0x68, 0x8c, 0x80, 0x00, - 0xa0, 0x84, 0x00, 0xff, 0x68, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x78, 0x34, - 0x60, 0x7e, 0x2f, 0x00, 0x60, 0x86, 0x78, 0x08, 0x60, 0x82, 0x70, 0x60, - 0x60, 0x8a, 0x70, 0x5c, 0x60, 0x8e, 0x70, 0x80, 0x60, 0xc6, 0x70, 0x7c, - 0x60, 0xca, 0x70, 0x7c, 0x79, 0x2c, 0xa1, 0x08, 0x79, 0x2e, 0x70, 0x80, - 0x79, 0x28, 0xa1, 0x09, 0x79, 0x2a, 0x68, 0x6c, 0x60, 0xce, 0x60, 0xaf, - 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xa5, 0x82, 0x00, 0x80, 0x02, 0x48, - 0x6a, 0x00, 0xd2, 0xf4, 0x01, 0x20, 0x6a, 0x14, 0xa2, 0x94, 0x00, 0xff, - 0x00, 0x10, 0x20, 0x11, 0x00, 0x00, 0x62, 0x9e, 0x08, 0x0c, 0x86, 0x3d, - 0x08, 0x04, 0x7d, 0x08, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, - 0x11, 0x10, 0xd5, 0xbc, 0x01, 0x38, 0xa1, 0x85, 0x07, 0x00, 0x60, 0x62, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x38, 0xa1, 0x85, 0x07, 0x00, - 0x60, 0x62, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x64, 0x6e, 0x08, 0x0c, - 0x53, 0x73, 0x01, 0x80, 0x00, 0xd6, 0x78, 0x10, 0xa0, 0x6d, 0x68, 0x4c, - 0x00, 0xde, 0xa0, 0x84, 0x20, 0x20, 0xa0, 0x86, 0x20, 0x20, 0x11, 0x30, - 0x78, 0x20, 0xc0, 0xcd, 0x78, 0x22, 0x60, 0x73, 0x08, 0x89, 0x00, 0x10, - 0x60, 0x73, 0x08, 0x98, 0x60, 0x77, 0x00, 0x00, 0x68, 0x8c, 0x80, 0x00, - 0xa0, 0x84, 0x00, 0xff, 0x68, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, - 0x00, 0x00, 0x2f, 0x00, 0x60, 0x86, 0x78, 0x08, 0x60, 0x82, 0x70, 0x14, - 0x60, 0x8a, 0x70, 0x10, 0x60, 0x8e, 0x70, 0x0c, 0x60, 0xc6, 0x70, 0x08, - 0x60, 0xca, 0x68, 0x6c, 0x60, 0xce, 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, - 0x00, 0x00, 0xa5, 0x82, 0x00, 0x80, 0x02, 0x48, 0x6a, 0x00, 0xd2, 0xf4, - 0x01, 0x20, 0x6a, 0x14, 0xa2, 0x94, 0x00, 0xff, 0x00, 0x10, 0x20, 0x11, - 0x00, 0x00, 0x62, 0x9e, 0x78, 0x20, 0xd0, 0xcc, 0x01, 0x20, 0x08, 0x0c, - 0x86, 0x40, 0x08, 0x04, 0x7d, 0x08, 0x08, 0x0c, 0x86, 0x3d, 0x08, 0x04, - 0x7d, 0x08, 0x7a, 0x18, 0xa2, 0x80, 0x00, 0x23, 0x20, 0x14, 0x82, 0x10, - 0xa2, 0x94, 0x00, 0xff, 0x22, 0x02, 0x82, 0x17, 0x00, 0x05, 0x00, 0xd6, - 0x20, 0x69, 0xb8, 0xe1, 0x68, 0x43, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, - 0x20, 0xe1, 0x90, 0x80, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, - 0x00, 0x19, 0x08, 0x0c, 0x6a, 0x79, 0x00, 0x05, 0x00, 0x06, 0x60, 0x14, - 0xa0, 0x84, 0x00, 0x04, 0xa0, 0x85, 0x00, 0x09, 0x60, 0x16, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x00, 0x06, 0x20, 0x61, 0x01, 0x00, - 0x61, 0xa4, 0x60, 0xa7, 0x95, 0xf5, 0x60, 0x14, 0xa0, 0x84, 0x00, 0x04, - 0xa0, 0x85, 0x00, 0x08, 0x60, 0x16, 0x00, 0x0e, 0xe0, 0x00, 0xe0, 0x00, - 0xe0, 0x00, 0xe0, 0x00, 0x61, 0xa6, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0x16, 0x00, 0x26, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x69, 0x01, 0x40, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0x98, 0x20, 0x01, - 0xb8, 0xfd, 0x20, 0x04, 0xa0, 0x05, 0x15, 0xb8, 0x00, 0x66, 0x20, 0x31, - 0x00, 0x01, 0x08, 0x0c, 0x5b, 0xc3, 0x00, 0x6e, 0x11, 0x18, 0x08, 0x0c, - 0x6a, 0x79, 0x04, 0x68, 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xe1, 0x00, 0xd8, - 0x69, 0x04, 0xa1, 0x94, 0x40, 0x00, 0x05, 0x50, 0x08, 0x31, 0x68, 0x03, - 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xe1, - 0x61, 0x28, 0xa1, 0x92, 0x00, 0xc8, 0x12, 0x58, 0x81, 0x08, 0x61, 0x2a, - 0x61, 0x24, 0x00, 0xce, 0x81, 0xff, 0x01, 0x98, 0x08, 0x0c, 0x6a, 0x79, - 0x08, 0x0c, 0x7d, 0xea, 0x00, 0x70, 0x61, 0x24, 0xa1, 0xe5, 0x00, 0x00, - 0x01, 0x40, 0x08, 0x0c, 0xb5, 0x00, 0x08, 0x0c, 0x6a, 0x82, 0x20, 0x09, - 0x00, 0x14, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, 0x00, 0x00, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x20, 0x01, 0xb8, 0xfd, - 0x20, 0x04, 0xa0, 0x05, 0x1d, 0xb0, 0x00, 0xc6, 0x20, 0x61, 0xb8, 0xe1, - 0x61, 0x28, 0xa1, 0x92, 0x00, 0x03, 0x1e, 0x08, 0x81, 0x08, 0x61, 0x2a, - 0x00, 0xce, 0x08, 0x0c, 0x6a, 0x79, 0x08, 0x0c, 0x4b, 0x7b, 0x0c, 0x38, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, - 0x6a, 0x8f, 0x20, 0x71, 0xb8, 0xe1, 0x71, 0x3c, 0x81, 0xff, 0x05, 0x90, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0xa8, 0x00, 0x36, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, 0x80, 0x6b, - 0x00, 0x3e, 0x71, 0x3c, 0x21, 0x60, 0x08, 0x0c, 0xb5, 0x00, 0x20, 0x09, - 0x00, 0x4a, 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x66, 0x20, 0x31, 0x00, 0x01, - 0x08, 0x0c, 0x5b, 0xc3, 0x00, 0x6e, 0x00, 0xb0, 0x69, 0x04, 0xa1, 0x94, - 0x40, 0x00, 0x01, 0xc0, 0x68, 0x03, 0x10, 0x00, 0x68, 0x03, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0x80, 0x6b, 0x00, 0x3e, - 0x71, 0x3c, 0x21, 0x60, 0x08, 0x0c, 0xb5, 0x00, 0x20, 0x09, 0x00, 0x4a, - 0x08, 0x0c, 0x86, 0xd3, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x05, 0x0c, 0x58, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, - 0xb8, 0xe1, 0x70, 0x48, 0xd0, 0x84, 0x01, 0xc0, 0x71, 0x3c, 0x81, 0xff, - 0x01, 0xa8, 0x20, 0x71, 0x01, 0x00, 0xa1, 0x88, 0x00, 0x07, 0x21, 0x14, - 0xa2, 0x8e, 0x00, 0x06, 0x11, 0x38, 0x70, 0x14, 0xa0, 0x84, 0x01, 0x84, - 0xa0, 0x85, 0x00, 0x12, 0x70, 0x16, 0x00, 0x30, 0x70, 0x14, 0xa0, 0x84, - 0x01, 0x84, 0xa0, 0x85, 0x00, 0x16, 0x70, 0x16, 0x00, 0xee, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x56, - 0x00, 0x46, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x18, - 0x20, 0x68, 0x6c, 0xa0, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x18, 0x20, 0x68, - 0x8d, 0xff, 0x01, 0x88, 0x68, 0xa0, 0xa4, 0x06, 0x01, 0x18, 0x68, 0x54, - 0x20, 0x68, 0x0c, 0xc0, 0x60, 0x10, 0x20, 0x60, 0x64, 0x3c, 0x65, 0x40, - 0x66, 0x48, 0x2d, 0x60, 0x08, 0x0c, 0x51, 0x8c, 0x01, 0x10, 0xa0, 0x85, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, 0x12, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x78, 0x1c, 0xa0, 0x86, 0x00, 0x04, 0x11, 0x10, - 0x60, 0x98, 0x00, 0x18, 0x20, 0x01, 0xb6, 0x15, 0x20, 0x04, 0x20, 0xa2, - 0x78, 0x34, 0x20, 0xa2, 0x78, 0x38, 0x20, 0xa2, 0x20, 0xa9, 0x00, 0x10, - 0xa0, 0x06, 0x20, 0xa2, 0x1f, 0x04, 0x7f, 0x19, 0x20, 0xa2, 0x20, 0xa2, - 0x60, 0xc3, 0x00, 0x2c, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x01, 0x56, - 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x20, 0xa3, - 0x0f, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x08, 0xd0, 0x9c, 0x11, 0x50, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, - 0x7d, 0xe0, 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x00, 0xd6, 0x78, 0x18, - 0xa0, 0x6d, 0x09, 0x0c, 0x15, 0x1a, 0x68, 0x10, 0xa0, 0x84, 0x00, 0xff, - 0x20, 0xa2, 0x68, 0x14, 0x00, 0xde, 0x0c, 0x60, 0x01, 0x56, 0x01, 0x46, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x06, 0x20, 0x11, 0xb6, 0x40, - 0x20, 0x19, 0xb6, 0x41, 0x23, 0xa6, 0x22, 0xa6, 0xa3, 0x98, 0x00, 0x02, - 0xa2, 0x90, 0x00, 0x02, 0x1f, 0x04, 0x7f, 0x56, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x1c, 0x08, 0x0c, 0x7d, 0xe0, - 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, 0x00, 0x16, - 0x00, 0x26, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x28, 0x08, 0x0c, - 0x77, 0x3e, 0x78, 0x10, 0xa0, 0x80, 0x00, 0x00, 0x20, 0x04, 0xa0, 0x80, - 0x00, 0x15, 0x20, 0x98, 0x78, 0x08, 0xa0, 0x88, 0x00, 0x02, 0x21, 0xa8, - 0x53, 0xa6, 0xa0, 0x80, 0x00, 0x04, 0x80, 0x03, 0x60, 0xc2, 0x08, 0x0c, - 0x7d, 0xe0, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, - 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, - 0x20, 0xa3, 0x62, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x78, 0x08, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, - 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, 0x00, 0x16, - 0x00, 0x26, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, 0x78, 0x10, - 0xa0, 0x80, 0x00, 0x00, 0x20, 0x04, 0xa0, 0x80, 0x00, 0x17, 0x20, 0x98, - 0x78, 0x08, 0xa0, 0x88, 0x00, 0x02, 0x21, 0xa8, 0x53, 0xa6, 0x80, 0x03, - 0x60, 0xc2, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x4e, - 0x01, 0x5e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x06, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x0c, 0x20, 0x60, - 0x8c, 0xff, 0x01, 0x78, 0x08, 0x0c, 0x9f, 0x14, 0x11, 0x10, 0x08, 0x0c, - 0x8c, 0xa5, 0x60, 0x0c, 0x00, 0x06, 0x08, 0x0c, 0xa0, 0xdb, 0x08, 0x0c, - 0x86, 0xa4, 0x08, 0x0c, 0x81, 0xa5, 0x00, 0xce, 0x0c, 0x78, 0x70, 0x0f, - 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, 0x00, 0xf6, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, 0x01, 0x40, 0x20, 0x71, - 0xb8, 0xe1, 0x70, 0x24, 0x20, 0x60, 0x8c, 0xff, 0x05, 0xa0, 0x08, 0x0c, - 0x7d, 0xf3, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x6a, 0x82, 0x20, 0x09, - 0x00, 0x13, 0x08, 0x0c, 0x86, 0xd3, 0x20, 0xa9, 0x01, 0xf4, 0x68, 0x24, - 0xd0, 0x94, 0x01, 0x58, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, 0xa0, 0x84, - 0x40, 0x00, 0x01, 0xa0, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, 0x00, 0x00, - 0x00, 0x78, 0xd0, 0x84, 0x01, 0x18, 0x68, 0x27, 0x00, 0x01, 0x00, 0x10, - 0x1f, 0x04, 0x80, 0x01, 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, 0x01, 0x20, - 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, 0x68, 0x24, 0x00, 0x0e, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, - 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, - 0xa0, 0x96, 0x00, 0x01, 0x05, 0x90, 0xa0, 0x96, 0x00, 0x04, 0x05, 0x78, - 0x08, 0x0c, 0x6a, 0x82, 0x68, 0x14, 0xa0, 0x84, 0x00, 0x01, 0x01, 0x10, - 0x68, 0xa7, 0x95, 0xf5, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, - 0x20, 0x11, 0x4b, 0x23, 0x08, 0x0c, 0x6a, 0x0e, 0x20, 0xa9, 0x01, 0xf4, - 0x68, 0x24, 0xd0, 0x94, 0x01, 0x58, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, - 0xa0, 0x84, 0x40, 0x00, 0x01, 0xa0, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x00, 0x78, 0xd0, 0x84, 0x01, 0x18, 0x68, 0x27, 0x00, 0x01, - 0x00, 0x10, 0x1f, 0x04, 0x80, 0x44, 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, - 0x01, 0x20, 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, - 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, 0x01, 0x40, - 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x3c, 0x20, 0x60, 0x8c, 0xff, 0x09, 0x04, - 0x80, 0xf2, 0xa3, 0x86, 0x00, 0x02, 0x11, 0x28, 0x68, 0x14, 0xa0, 0x84, - 0x00, 0x02, 0x09, 0x04, 0x80, 0xf2, 0x68, 0xaf, 0x95, 0xf5, 0x68, 0x17, - 0x00, 0x10, 0x20, 0x09, 0x00, 0xfa, 0x81, 0x09, 0x1d, 0xf0, 0x68, 0xc7, - 0x00, 0x00, 0x68, 0xcb, 0x00, 0x08, 0x08, 0x0c, 0x6a, 0x8f, 0x08, 0x0c, - 0x22, 0x2f, 0x00, 0x46, 0x20, 0x09, 0x01, 0x7f, 0x20, 0x0b, 0x00, 0xa5, - 0x20, 0x21, 0x01, 0x69, 0x24, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x86, - 0x00, 0x04, 0x15, 0x00, 0x68, 0xaf, 0x95, 0xf5, 0x68, 0xc7, 0x00, 0x00, - 0x68, 0xcb, 0x00, 0x08, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x20, - 0x20, 0x71, 0xb9, 0x4b, 0x68, 0x14, 0xa0, 0x84, 0x01, 0x84, 0xa0, 0x85, - 0x00, 0x12, 0x68, 0x16, 0x78, 0x03, 0x00, 0x08, 0x70, 0x03, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0xee, 0xa3, 0x86, 0x00, 0x02, 0x11, 0x28, 0x78, 0x84, - 0xa0, 0x05, 0x11, 0x10, 0x78, 0x87, 0x00, 0x01, 0x20, 0x01, 0xb8, 0xb1, - 0x20, 0x04, 0x20, 0x0a, 0x00, 0x4e, 0xa3, 0x9d, 0x00, 0x00, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x49, 0x08, 0x0c, 0x86, 0xd3, 0x20, 0xa9, 0x03, 0xe8, - 0x68, 0x24, 0xd0, 0x94, 0x01, 0x58, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, - 0xa0, 0x84, 0x40, 0x00, 0x01, 0xa0, 0x78, 0x03, 0x10, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x00, 0x78, 0xd0, 0x8c, 0x01, 0x18, 0x68, 0x27, 0x00, 0x02, - 0x00, 0x10, 0x1f, 0x04, 0x80, 0xd4, 0x78, 0x04, 0xa0, 0x84, 0x10, 0x00, - 0x01, 0x20, 0x78, 0x03, 0x01, 0x00, 0x78, 0x03, 0x00, 0x00, 0x68, 0x24, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0xb8, 0xe1, 0x6a, 0x06, 0x01, 0x2e, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x69, 0xb8, 0xe1, 0x6a, 0x32, 0x01, 0x2e, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x06, 0x01, 0x26, - 0x20, 0x71, 0xb8, 0xe1, 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x20, 0x91, - 0x80, 0x00, 0x8c, 0xff, 0x05, 0x38, 0x60, 0x1c, 0xa2, 0x06, 0x15, 0x00, - 0x70, 0x14, 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x16, 0x70, 0x10, - 0xac, 0x36, 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, 0x2f, 0x00, - 0x70, 0x12, 0x00, 0x10, 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, - 0x2c, 0x00, 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x81, 0xa5, - 0x00, 0xce, 0x08, 0xd8, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0xb8, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x79, 0x74, 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, 0x10, 0x00, 0x08, 0x04, 0x81, 0x9d, - 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x79, 0x74, - 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa3, 0x40, 0x00, 0x04, 0x78, 0x01, 0x56, 0x01, 0x46, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x79, 0x74, 0x78, 0x10, 0x20, 0xa2, - 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, - 0x20, 0x00, 0x00, 0xf8, 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x79, 0x74, 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa3, 0x04, 0x00, 0x00, 0x78, - 0x01, 0x56, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x79, 0x74, - 0x78, 0x10, 0x20, 0xa2, 0xa0, 0x06, 0x20, 0xa2, 0x20, 0xa2, 0x20, 0xa2, - 0x20, 0xa2, 0x20, 0xa3, 0x02, 0x00, 0x00, 0x89, 0x60, 0xc3, 0x00, 0x20, - 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x20, 0xa0, 0x05, 0x01, 0x10, 0x80, 0x01, - 0x70, 0x22, 0x00, 0xee, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xa2, - 0x1f, 0x04, 0x81, 0xb1, 0x20, 0xa2, 0x20, 0xa2, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x76, 0x00, 0x66, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, 0x76, 0x14, - 0x26, 0x60, 0x26, 0x78, 0x20, 0x39, 0x00, 0x01, 0x87, 0xff, 0x09, 0x04, - 0x82, 0x4d, 0x8c, 0xff, 0x09, 0x04, 0x82, 0x4d, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x06, 0x19, 0x04, 0x82, 0x48, 0x88, 0xff, 0x01, 0x38, 0x28, 0x00, - 0xac, 0x06, 0x19, 0x04, 0x82, 0x48, 0x20, 0x39, 0x00, 0x00, 0x00, 0x50, - 0x60, 0x18, 0xa2, 0x06, 0x19, 0x04, 0x82, 0x48, 0x85, 0xff, 0x01, 0x20, - 0x60, 0x50, 0xa1, 0x06, 0x19, 0x04, 0x82, 0x48, 0x70, 0x24, 0xac, 0x06, - 0x15, 0x98, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0xa0, 0x05, 0x11, 0x60, - 0x68, 0x24, 0xd0, 0x84, 0x01, 0x48, 0x68, 0x27, 0x00, 0x01, 0x08, 0x0c, - 0x6a, 0x82, 0x08, 0x0c, 0x82, 0xd4, 0x70, 0x27, 0x00, 0x00, 0x04, 0x10, - 0x08, 0x0c, 0x6a, 0x82, 0x68, 0x20, 0xd0, 0xb4, 0x01, 0x10, 0x68, 0xa7, - 0x95, 0xf5, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, - 0x82, 0xd4, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, - 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x01, 0x20, 0x68, 0x03, 0x01, 0x00, - 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, - 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x70, 0x14, 0xac, 0x36, - 0x11, 0x10, 0x66, 0x0c, 0x76, 0x16, 0x70, 0x10, 0xac, 0x36, 0x11, 0x40, - 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x12, 0x00, 0x10, - 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0xaf, 0x06, - 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x89, 0xff, 0x11, 0x58, - 0x60, 0x0f, 0x00, 0x00, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, - 0x01, 0x10, 0x08, 0x0c, 0xb1, 0x55, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, - 0x81, 0xa5, 0x88, 0xff, 0x11, 0x90, 0x00, 0xce, 0x08, 0x04, 0x81, 0xc8, - 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0x81, 0xc8, 0xa0, 0x06, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x17, 0x00, 0x00, 0x00, 0xce, - 0xa8, 0xc5, 0x00, 0x01, 0x0c, 0x88, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x09, 0x04, 0x82, 0xc4, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, - 0x19, 0x04, 0x82, 0xbf, 0x87, 0xff, 0x01, 0x28, 0x27, 0x00, 0xac, 0x06, - 0x19, 0x04, 0x82, 0xbf, 0x00, 0x48, 0x60, 0x18, 0xa2, 0x06, 0x19, 0x04, - 0x82, 0xbf, 0x85, 0xff, 0x01, 0x18, 0x60, 0x50, 0xa1, 0x06, 0x15, 0xd8, - 0x70, 0x3c, 0xac, 0x06, 0x11, 0x80, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0x80, 0x6b, 0x70, 0x33, 0x00, 0x00, 0x70, 0x3f, 0x00, 0x00, - 0x70, 0x43, 0x00, 0x00, 0x70, 0x47, 0x00, 0x00, 0x70, 0x4b, 0x00, 0x00, - 0x00, 0x3e, 0x70, 0x38, 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x3a, - 0x70, 0x34, 0xac, 0x36, 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, - 0x2f, 0x00, 0x70, 0x36, 0x00, 0x10, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, - 0x00, 0x66, 0x2c, 0x00, 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, - 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, - 0x9d, 0x16, 0x01, 0x10, 0x08, 0x0c, 0xb1, 0x55, 0x08, 0x0c, 0x9e, 0xd9, - 0x87, 0xff, 0x11, 0x90, 0x00, 0xce, 0x08, 0x04, 0x82, 0x6c, 0x2c, 0x78, - 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0x82, 0x6c, 0xa0, 0x06, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x60, 0x17, 0x00, 0x00, 0x00, 0xce, 0xa7, 0xbd, - 0x00, 0x01, 0x0c, 0x88, 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xe1, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x02, 0x11, 0x18, 0x70, 0x07, - 0x00, 0x05, 0x00, 0x10, 0x70, 0x07, 0x00, 0x00, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, 0x2c, 0x10, - 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x05, 0x18, 0x22, 0x00, - 0xac, 0x06, 0x11, 0xe0, 0x70, 0x38, 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, - 0x76, 0x3a, 0x70, 0x34, 0xac, 0x36, 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, - 0x01, 0x18, 0x2f, 0x00, 0x70, 0x36, 0x00, 0x10, 0x70, 0x37, 0x00, 0x00, - 0x66, 0x0c, 0x2c, 0x00, 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, - 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x20, - 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0xd8, 0x01, 0x2e, 0x00, 0x0e, - 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb8, 0xe1, 0x76, 0x0c, - 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x09, 0x04, 0x83, 0xaa, 0x60, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0xa2, 0x06, 0x19, 0x04, 0x83, 0xa5, - 0x70, 0x24, 0xac, 0x06, 0x15, 0x08, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, - 0xa0, 0x05, 0x09, 0x04, 0x83, 0x81, 0x08, 0x0c, 0x7d, 0xf3, 0x68, 0xc3, - 0x00, 0x00, 0x08, 0x0c, 0x82, 0xd4, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, - 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0xa3, 0x84, 0x10, 0x00, 0x01, 0x20, - 0x68, 0x03, 0x01, 0x00, 0x68, 0x03, 0x00, 0x00, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, - 0x70, 0x0c, 0xac, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x0e, 0x70, 0x08, - 0xac, 0x36, 0x11, 0x40, 0x2c, 0x00, 0xaf, 0x36, 0x01, 0x18, 0x2f, 0x00, - 0x70, 0x0a, 0x00, 0x10, 0x70, 0x0b, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, - 0x2c, 0x00, 0xaf, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0x9f, 0x03, 0x11, 0x58, 0x08, 0x0c, - 0x2c, 0xf7, 0x08, 0x0c, 0x9f, 0x14, 0x11, 0xf0, 0x08, 0x0c, 0x8c, 0xa5, - 0x00, 0xd8, 0x08, 0x0c, 0x82, 0xd4, 0x08, 0xc0, 0x08, 0x0c, 0x9f, 0x14, - 0x11, 0x18, 0x08, 0x0c, 0x8c, 0xa5, 0x00, 0x90, 0x60, 0x10, 0x20, 0x68, - 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x68, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x03, - 0x11, 0xf8, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, 0x00, 0x00, - 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, 0x08, 0x0c, 0xa0, 0xdb, - 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x81, 0xa5, 0x00, 0xce, 0x08, 0x04, - 0x83, 0x2e, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0x83, 0x2e, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x60, 0x1c, 0xa0, 0x86, 0x00, 0x06, 0x1d, 0x30, - 0x08, 0x0c, 0xb1, 0x55, 0x0c, 0x18, 0x00, 0x36, 0x01, 0x56, 0x01, 0x36, - 0x01, 0x46, 0x39, 0x08, 0xa0, 0x06, 0xa1, 0x90, 0x00, 0x20, 0x22, 0x1c, - 0xa3, 0x9e, 0x2a, 0xec, 0x11, 0x18, 0x82, 0x10, 0x80, 0x00, 0x0c, 0xc8, - 0xa0, 0x05, 0x01, 0x38, 0x20, 0xa9, 0x00, 0x20, 0x21, 0x98, 0xa1, 0x10, - 0x22, 0xa0, 0x22, 0xc8, 0x53, 0xa3, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, - 0x00, 0x3e, 0x00, 0x05, 0x00, 0xd6, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa3, 0x00, 0x14, 0x60, 0xc3, - 0x00, 0x14, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x99, - 0xb8, 0xb9, 0x20, 0xa9, 0x00, 0x04, 0x53, 0xa6, 0x20, 0xa3, 0x00, 0x04, - 0x20, 0xa3, 0x78, 0x78, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0xde, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, 0x02, 0x14, 0x20, 0xa3, 0x00, 0x18, - 0x20, 0xa3, 0x08, 0x00, 0x78, 0x10, 0xa0, 0x84, 0xff, 0x00, 0x20, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x78, 0x10, 0xa0, 0x84, 0x00, 0xff, 0x20, 0xa2, - 0x78, 0x28, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x18, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x16, 0x2f, 0x68, 0x20, 0x09, 0x00, 0x35, 0x08, 0x0c, 0xa1, 0xc6, - 0x19, 0x04, 0x84, 0x89, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xb3, - 0x20, 0xa3, 0x13, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x78, 0x28, 0x20, 0x68, - 0x68, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x05, 0x80, 0x78, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x14, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, - 0x11, 0xd0, 0xa2, 0x86, 0x00, 0x7e, 0x11, 0x28, 0x20, 0xa3, 0x00, 0xff, - 0x20, 0xa3, 0xff, 0xfe, 0x04, 0xb8, 0xa2, 0x86, 0x00, 0x7f, 0x11, 0x28, - 0x20, 0xa3, 0x00, 0xff, 0x20, 0xa3, 0xff, 0xfd, 0x04, 0x78, 0xd2, 0xbc, - 0x01, 0x80, 0xa2, 0x86, 0x00, 0x80, 0x11, 0x28, 0x20, 0xa3, 0x00, 0xff, - 0x20, 0xa3, 0xff, 0xfc, 0x04, 0x28, 0xa2, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x68, 0x10, 0x20, 0xa2, 0x68, 0x14, 0x20, 0xa2, 0x00, 0xe8, 0x20, 0xa3, - 0x00, 0x00, 0x60, 0x98, 0x20, 0xa2, 0x00, 0xc0, 0x20, 0x01, 0xb6, 0x35, - 0x20, 0x04, 0xd0, 0xac, 0x11, 0x38, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0xa0, 0x82, 0x00, 0x7e, 0x02, 0x40, 0x00, 0xd6, 0x20, 0x69, - 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x20, - 0x20, 0xa3, 0x00, 0x00, 0x60, 0x34, 0x20, 0xa2, 0x78, 0x34, 0x20, 0xa2, - 0x78, 0x38, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x0c, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x1e, 0x00, 0xde, - 0x00, 0x05, 0x78, 0x17, 0x00, 0x01, 0x78, 0x03, 0x00, 0x06, 0x00, 0x1e, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x26, 0x79, 0x28, 0x21, 0x68, - 0x69, 0x1c, 0xa1, 0x86, 0x00, 0x06, 0x01, 0xc0, 0xa1, 0x86, 0x00, 0x03, - 0x09, 0x04, 0x84, 0xff, 0xa1, 0x86, 0x00, 0x05, 0x09, 0x04, 0x84, 0xe8, - 0xa1, 0x86, 0x00, 0x04, 0x05, 0xb8, 0xa1, 0x86, 0x00, 0x08, 0x09, 0x04, - 0x84, 0xf0, 0x78, 0x07, 0x00, 0x37, 0x78, 0x13, 0x17, 0x00, 0x08, 0x0c, - 0x85, 0x67, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x85, 0x23, - 0x20, 0x09, 0x40, 0x00, 0x68, 0x00, 0x00, 0x02, 0x84, 0xc9, 0x84, 0xd4, - 0x84, 0xcb, 0x84, 0xd4, 0x84, 0xd0, 0x84, 0xc9, 0x84, 0xc9, 0x84, 0xd4, - 0x84, 0xd4, 0x84, 0xd4, 0x84, 0xd4, 0x84, 0xc9, 0x84, 0xc9, 0x84, 0xc9, - 0x84, 0xc9, 0x84, 0xc9, 0x84, 0xd4, 0x84, 0xc9, 0x84, 0xd4, 0x08, 0x0c, - 0x15, 0x1a, 0x68, 0x20, 0xd0, 0xe4, 0x01, 0x10, 0xd0, 0xcc, 0x01, 0x10, - 0xa0, 0x0e, 0x00, 0x10, 0x20, 0x09, 0x20, 0x00, 0x68, 0x28, 0x20, 0xa2, - 0x68, 0x2c, 0x20, 0xa2, 0x08, 0x04, 0x85, 0x19, 0x08, 0x0c, 0x85, 0x23, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x09, 0x40, 0x00, - 0x6a, 0x00, 0xa2, 0x86, 0x00, 0x02, 0x11, 0x08, 0xa0, 0x0e, 0x04, 0x88, - 0x04, 0xd1, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0x09, - 0x40, 0x00, 0x04, 0x48, 0x04, 0x91, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, - 0x00, 0x00, 0x20, 0x09, 0x40, 0x00, 0xa2, 0x86, 0x00, 0x05, 0x01, 0x18, - 0xa2, 0x86, 0x00, 0x02, 0x11, 0x08, 0xa0, 0x0e, 0x00, 0xd0, 0x04, 0x19, - 0x68, 0x10, 0x20, 0x68, 0x69, 0x7c, 0x68, 0x10, 0xa1, 0x12, 0x69, 0x80, - 0x68, 0x14, 0xa1, 0x03, 0x20, 0xa2, 0x22, 0xa2, 0x79, 0x28, 0xa1, 0x80, - 0x00, 0x00, 0x20, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x01, 0x30, 0xa0, 0x8e, - 0x00, 0x04, 0x01, 0x18, 0x20, 0x09, 0x40, 0x00, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x00, 0x21, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, 0x00, 0x18, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x00, 0x36, - 0x00, 0x46, 0x00, 0x56, 0x00, 0x66, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, - 0x77, 0x4f, 0xa0, 0x06, 0x20, 0xa3, 0x02, 0x00, 0x20, 0xa2, 0x79, 0x34, - 0x21, 0xa2, 0x79, 0x38, 0x21, 0xa2, 0x78, 0x18, 0xa0, 0x80, 0x00, 0x28, - 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, 0xd2, 0xac, 0x11, 0x18, - 0xa0, 0x92, 0x00, 0x7e, 0x02, 0x68, 0x00, 0xd6, 0x20, 0x69, 0xb6, 0x1c, - 0x2d, 0x2c, 0x8d, 0x68, 0x2d, 0x34, 0xa0, 0xe8, 0xb7, 0x35, 0x2d, 0x6c, - 0x6b, 0x10, 0x6c, 0x14, 0x00, 0xde, 0x00, 0x30, 0x20, 0x19, 0x00, 0x00, - 0x64, 0x98, 0x20, 0x29, 0x00, 0x00, 0x66, 0x34, 0x78, 0x28, 0xa0, 0x80, - 0x00, 0x07, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x03, 0x11, 0x28, 0x25, 0xa2, - 0x26, 0xa2, 0x23, 0xa2, 0x24, 0xa2, 0x00, 0x20, 0x23, 0xa2, 0x24, 0xa2, - 0x25, 0xa2, 0x26, 0xa2, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x77, 0x4f, 0x20, 0xa3, - 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x09, 0x78, 0x10, - 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, - 0x20, 0xa1, 0x02, 0x0b, 0x08, 0x0c, 0x76, 0xab, 0x20, 0xa3, 0x14, 0x00, - 0x20, 0xa3, 0x00, 0x00, 0x78, 0x34, 0x20, 0xa2, 0x78, 0x38, 0x20, 0xa2, - 0x78, 0x28, 0x20, 0xa2, 0x78, 0x2c, 0x20, 0xa2, 0x78, 0x30, 0xa0, 0x84, - 0x00, 0xff, 0x80, 0x07, 0x20, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x60, 0xc3, - 0x00, 0x10, 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x20, 0xa1, 0x02, 0x0b, - 0x08, 0x0c, 0x77, 0x47, 0x20, 0xa3, 0x01, 0x00, 0x20, 0xa3, 0x00, 0x00, - 0x78, 0x28, 0x20, 0xa2, 0x78, 0x10, 0x20, 0xa2, 0x60, 0xc3, 0x00, 0x08, - 0x08, 0x0c, 0x7d, 0xe0, 0x00, 0x05, 0x01, 0x46, 0x20, 0xa1, 0x02, 0x0b, - 0x00, 0x31, 0x60, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0x7d, 0xe0, 0x01, 0x4e, - 0x00, 0x05, 0x20, 0xe1, 0x90, 0x80, 0x20, 0xe1, 0x40, 0x00, 0x78, 0x18, - 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0x10, 0xd0, 0xbc, 0x01, 0x88, 0x00, 0xd6, 0xa0, 0xe8, - 0xb7, 0x35, 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x03, 0x00, 0x20, 0xa2, - 0x68, 0x14, 0x20, 0xa2, 0x20, 0x69, 0xb6, 0x1c, 0x2d, 0xa6, 0x8d, 0x68, - 0x2d, 0xa6, 0x00, 0xde, 0x00, 0x78, 0x00, 0xd6, 0xa0, 0xe8, 0xb7, 0x35, - 0x2d, 0x6c, 0x68, 0x10, 0xa0, 0x85, 0x03, 0x00, 0x20, 0xa2, 0x68, 0x14, - 0x20, 0xa2, 0x00, 0xde, 0x20, 0xa3, 0x00, 0x00, 0x62, 0x34, 0x22, 0xa2, - 0x20, 0xa3, 0x08, 0x19, 0x20, 0xa3, 0x00, 0x00, 0x08, 0x0c, 0x7d, 0xcf, - 0x22, 0xa2, 0x20, 0xa3, 0x00, 0x00, 0x2f, 0xa2, 0x7a, 0x08, 0x22, 0xa2, - 0x20, 0xa3, 0x00, 0x00, 0x20, 0xa3, 0x00, 0x00, 0x00, 0x05, 0x20, 0xa1, - 0x02, 0x0b, 0x00, 0x79, 0x79, 0x10, 0x21, 0xa2, 0x20, 0xa3, 0x00, 0x00, - 0x60, 0xc3, 0x00, 0x00, 0x20, 0xe1, 0x90, 0x80, 0x60, 0xa7, 0x95, 0x75, - 0x08, 0x0c, 0x7d, 0xea, 0x08, 0x0c, 0x6a, 0x79, 0x00, 0x05, 0x01, 0x56, - 0x01, 0x36, 0x00, 0x36, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0xe1, 0x90, 0x80, - 0x20, 0xe1, 0x40, 0x00, 0x78, 0x54, 0x20, 0x68, 0xad, 0xf0, 0x00, 0x0f, - 0x72, 0x10, 0xa2, 0x96, 0x00, 0xc0, 0xa2, 0x94, 0xff, 0xfd, 0x72, 0x12, - 0x72, 0x14, 0xa2, 0x94, 0x03, 0x00, 0x72, 0x16, 0x71, 0x00, 0xa1, 0x94, - 0x00, 0xff, 0x73, 0x08, 0xa3, 0x84, 0x00, 0xff, 0xa0, 0x8d, 0xc2, 0x00, - 0x71, 0x02, 0xa3, 0x84, 0xff, 0x00, 0xa2, 0x15, 0x72, 0x0a, 0x70, 0x04, - 0x72, 0x0c, 0x70, 0x0e, 0x72, 0x06, 0x20, 0xa9, 0x00, 0x0a, 0x2e, 0x98, - 0x53, 0xa6, 0x60, 0xa3, 0x00, 0x35, 0x6a, 0x38, 0xa2, 0x94, 0x70, 0x00, - 0xa2, 0x86, 0x30, 0x00, 0x01, 0x10, 0x60, 0xa3, 0x00, 0x37, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x3e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0x05, 0x20, 0x09, - 0x00, 0x92, 0x00, 0x10, 0x20, 0x09, 0x00, 0x96, 0x60, 0xab, 0x00, 0x36, - 0x61, 0x16, 0x00, 0x05, 0x20, 0x61, 0xbe, 0x00, 0x2a, 0x70, 0x70, 0x68, - 0x70, 0x4a, 0x70, 0x4f, 0xbe, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x71, 0xb6, 0x00, 0x20, 0x91, 0x80, 0x00, 0x75, 0x48, 0xa5, 0x82, - 0x00, 0x10, 0x06, 0x08, 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x00, 0x01, 0x48, 0xac, 0xe0, 0x00, 0x18, 0x70, 0x5c, 0xac, 0x02, - 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, 0xbe, 0x00, 0x0c, 0x98, 0x60, 0x03, - 0x00, 0x08, 0x85, 0x29, 0x75, 0x4a, 0xac, 0xa8, 0x00, 0x18, 0x70, 0x5c, - 0xa5, 0x02, 0x12, 0x30, 0x75, 0x4e, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x70, 0x4f, 0xbe, 0x00, 0x0c, 0xc0, 0xa0, 0x06, - 0x0c, 0xc0, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, 0x75, 0x48, 0xa5, 0x82, - 0x00, 0x10, 0x06, 0x00, 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x00, 0x01, 0x48, 0xac, 0xe0, 0x00, 0x18, 0x70, 0x5c, 0xac, 0x02, - 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, 0xbe, 0x00, 0x0c, 0x98, 0x60, 0x03, - 0x00, 0x08, 0x85, 0x29, 0x75, 0x4a, 0xac, 0xa8, 0x00, 0x18, 0x70, 0x5c, - 0xa5, 0x02, 0x12, 0x28, 0x75, 0x4e, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x05, 0x70, 0x4f, 0xbe, 0x00, 0x0c, 0xc8, 0xa0, 0x06, 0x0c, 0xc8, - 0xac, 0x82, 0xbe, 0x00, 0x0a, 0x0c, 0x15, 0x1a, 0x20, 0x01, 0xb6, 0x17, - 0x20, 0x04, 0xac, 0x02, 0x1a, 0x0c, 0x15, 0x1a, 0xa0, 0x06, 0x60, 0x06, - 0x60, 0x0a, 0x60, 0x0e, 0x60, 0x12, 0x60, 0x16, 0x60, 0x1a, 0x60, 0x1f, - 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x60, 0x52, 0x60, 0x56, 0x60, 0x22, - 0x60, 0x26, 0x60, 0x2a, 0x60, 0x2e, 0x60, 0x32, 0x60, 0x36, 0x60, 0x3a, - 0x60, 0x3e, 0x20, 0x61, 0xb6, 0x00, 0x60, 0x48, 0x80, 0x00, 0x60, 0x4a, - 0xa0, 0x86, 0x00, 0x01, 0x01, 0x08, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x0c, 0xc0, 0x60, 0x1c, - 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x02, 0x86, 0xe7, 0x86, 0xf6, 0x87, 0x11, - 0x87, 0x2c, 0xa2, 0x0e, 0xa2, 0x29, 0xa2, 0x44, 0x86, 0xe7, 0x86, 0xf6, - 0x86, 0xe7, 0x87, 0x47, 0x86, 0xe7, 0x86, 0xe7, 0x86, 0xe7, 0x86, 0xe7, - 0x86, 0xe7, 0xa1, 0x86, 0x00, 0x13, 0x11, 0x28, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x8e, 0x00, 0x47, 0x11, 0x18, - 0xa0, 0x16, 0x08, 0x0c, 0x18, 0x63, 0x00, 0x05, 0x00, 0x66, 0x60, 0x00, - 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, - 0x00, 0x05, 0x87, 0x0f, 0x8b, 0x27, 0x8c, 0xdf, 0x87, 0x0f, 0x8d, 0x54, - 0x88, 0x05, 0x87, 0x0f, 0x87, 0x0f, 0x8a, 0xb9, 0x91, 0x7b, 0x87, 0x0f, - 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0x66, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0x87, 0x2a, 0x97, 0xde, - 0x87, 0x2a, 0x87, 0x2a, 0x87, 0x2a, 0x87, 0x2a, 0x87, 0x2a, 0x87, 0x2a, - 0x97, 0x89, 0x99, 0x4a, 0x87, 0x2a, 0x98, 0x0b, 0x98, 0x82, 0x98, 0x0b, - 0x98, 0x82, 0x87, 0x2a, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x66, 0x60, 0x00, - 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, - 0x00, 0x05, 0x87, 0x45, 0x91, 0xbc, 0x92, 0x86, 0x93, 0xc4, 0x95, 0x4d, - 0x87, 0x45, 0x87, 0x45, 0x87, 0x45, 0x91, 0x96, 0x97, 0x39, 0x97, 0x3c, - 0x87, 0x45, 0x87, 0x45, 0x87, 0x45, 0x87, 0x45, 0x97, 0x66, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0x66, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0x87, 0x60, 0x87, 0x60, - 0x87, 0x60, 0x87, 0x8e, 0x87, 0xdb, 0x87, 0x60, 0x87, 0x60, 0x87, 0x60, - 0x87, 0x62, 0x87, 0x60, 0x87, 0x60, 0x87, 0x60, 0x87, 0x60, 0x87, 0x60, - 0x87, 0x60, 0x87, 0x60, 0x08, 0x0c, 0x15, 0x1a, 0xa1, 0x86, 0x00, 0x03, - 0x19, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, - 0x60, 0x10, 0x20, 0x68, 0x68, 0x4f, 0x00, 0x40, 0x68, 0x7c, 0x68, 0x0a, - 0x68, 0x80, 0x68, 0x0e, 0x68, 0x13, 0x00, 0x00, 0x68, 0x17, 0x00, 0x00, - 0x68, 0x54, 0xa0, 0x92, 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, - 0x80, 0x03, 0x80, 0x13, 0x82, 0x13, 0xa2, 0x10, 0x62, 0x16, 0x00, 0xde, - 0x2c, 0x10, 0x08, 0x0c, 0x1f, 0xc5, 0x08, 0x0c, 0x6d, 0x62, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x72, 0xa2, 0x01, 0x2e, 0x00, 0x05, - 0xa1, 0x82, 0x00, 0x47, 0x00, 0x02, 0x87, 0x9a, 0x87, 0x9a, 0x87, 0x9c, - 0x87, 0xb5, 0x87, 0x9a, 0x87, 0x9a, 0x87, 0x9a, 0x87, 0x9a, 0x87, 0xc7, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x00, 0x16, 0x08, 0x0c, 0x71, 0x98, - 0x08, 0x0c, 0x72, 0xa2, 0x60, 0x03, 0x00, 0x04, 0x61, 0x10, 0x21, 0x68, - 0x68, 0x4f, 0x00, 0x20, 0x68, 0x5c, 0x68, 0x5a, 0x68, 0x74, 0x68, 0x7e, - 0x68, 0x78, 0x68, 0x82, 0x68, 0x97, 0x00, 0x00, 0x68, 0x9b, 0x00, 0x00, - 0x00, 0x1e, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x98, 0x00, 0xd6, - 0x61, 0x10, 0x21, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x20, 0x68, 0x4b, - 0x00, 0x06, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, - 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, - 0x2c, 0xd1, 0x00, 0xd6, 0x61, 0x10, 0x21, 0x68, 0x08, 0x0c, 0x9d, 0x16, - 0x01, 0x20, 0x68, 0x4b, 0x00, 0x29, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0xde, - 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0xa1, 0x82, - 0x00, 0x47, 0x00, 0x02, 0x87, 0xe9, 0x87, 0xf8, 0x87, 0xe7, 0x87, 0xe7, - 0x87, 0xe7, 0x87, 0xe7, 0x87, 0xe7, 0x87, 0xe7, 0x87, 0xe7, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, 0xc0, 0xf4, - 0x68, 0x4e, 0x00, 0xde, 0x20, 0xe1, 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, - 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, 0x00, 0x05, 0x00, 0xd6, 0x61, 0x10, - 0x21, 0x68, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x53, 0x00, 0x00, 0x08, 0x0c, - 0x54, 0x7a, 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0xa1, 0xb6, - 0x00, 0x15, 0x11, 0x18, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x30, 0xa1, 0xb6, - 0x00, 0x16, 0x19, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, - 0x20, 0xa9, 0x00, 0x0e, 0x2e, 0x98, 0x60, 0x10, 0x20, 0xa0, 0x53, 0xa3, - 0x20, 0xa9, 0x00, 0x06, 0x33, 0x10, 0x34, 0x20, 0x93, 0x98, 0x94, 0xa0, - 0x33, 0x18, 0x34, 0x28, 0x22, 0x2e, 0x23, 0x26, 0xa2, 0x90, 0x00, 0x02, - 0xa5, 0xa8, 0x00, 0x02, 0xa3, 0x98, 0x00, 0x02, 0xa4, 0xa0, 0x00, 0x02, - 0x1f, 0x04, 0x88, 0x20, 0x00, 0xe6, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x30, - 0x60, 0x10, 0x20, 0x70, 0x70, 0x07, 0x00, 0x00, 0x70, 0x37, 0x01, 0x03, - 0x00, 0xee, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x36, - 0x73, 0x30, 0xa3, 0x86, 0x02, 0x00, 0x11, 0x30, 0x60, 0x18, 0x20, 0x68, - 0x68, 0x13, 0x00, 0xff, 0x68, 0x17, 0xff, 0xfd, 0x60, 0x10, 0xa0, 0x05, - 0x01, 0x30, 0x20, 0x68, 0x68, 0x07, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, - 0x6b, 0x32, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x16, 0x20, 0xa9, 0x00, 0x2a, 0xae, 0x80, 0x00, 0x0c, 0x20, 0x98, - 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x53, 0xa3, 0x20, 0xa9, - 0x00, 0x2a, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x80, - 0x00, 0x02, 0x20, 0xa0, 0x53, 0xa3, 0x00, 0xe6, 0x60, 0x10, 0x20, 0x04, - 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, 0x00, 0xee, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x20, 0x09, 0x00, 0x00, 0x70, 0x30, - 0xa0, 0x86, 0x01, 0x00, 0x01, 0x40, 0x70, 0x38, 0xa0, 0x84, 0x00, 0xff, - 0x80, 0x0c, 0x70, 0x3c, 0xa0, 0x84, 0x00, 0xff, 0x80, 0x04, 0xa0, 0x80, - 0x00, 0x04, 0xa1, 0x08, 0x21, 0xa8, 0xae, 0x80, 0x00, 0x0c, 0x20, 0x98, - 0x60, 0x10, 0xa0, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x08, 0x0c, 0x4b, 0xf1, - 0x00, 0xe6, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x40, 0x60, 0x10, 0x20, 0x70, - 0x70, 0x07, 0x00, 0x00, 0x70, 0x34, 0x70, 0xb2, 0x70, 0x37, 0x01, 0x03, - 0x00, 0xee, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0xd6, 0x60, 0x3f, 0x00, 0x00, 0x2c, 0x68, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x35, 0x08, 0x0c, 0xa1, 0xc6, 0x00, 0x1e, 0x11, 0x68, 0x00, 0x26, - 0x62, 0x28, 0x22, 0x68, 0x00, 0x2e, 0x20, 0x71, 0xbc, 0x8c, 0x6b, 0x1c, - 0xa3, 0x86, 0x00, 0x03, 0x01, 0x30, 0xa3, 0x86, 0x00, 0x06, 0x01, 0x28, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x20, 0x00, 0x31, 0x00, 0x10, 0x08, 0x0c, - 0x89, 0x82, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x68, 0x10, - 0x20, 0x78, 0xa1, 0x86, 0x00, 0x15, 0x09, 0x04, 0x89, 0x69, 0xa1, 0x8e, - 0x00, 0x16, 0x19, 0x04, 0x89, 0x80, 0x70, 0x0c, 0xa0, 0x8c, 0xff, 0x00, - 0xa1, 0x86, 0x17, 0x00, 0x01, 0x20, 0xa1, 0x86, 0x03, 0x00, 0x19, 0x04, - 0x89, 0x48, 0x8f, 0xff, 0x11, 0x38, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x0f, - 0x09, 0x04, 0x89, 0x2c, 0x08, 0x04, 0x89, 0x7e, 0x68, 0x08, 0xa0, 0x86, - 0xff, 0xff, 0x19, 0x04, 0x89, 0x6b, 0x78, 0x4c, 0xa0, 0x84, 0x00, 0x60, - 0xa0, 0x86, 0x00, 0x20, 0x11, 0x50, 0x79, 0x7c, 0x78, 0x10, 0xa1, 0x06, - 0x19, 0x04, 0x89, 0x6b, 0x79, 0x80, 0x78, 0x14, 0xa1, 0x06, 0x19, 0x04, - 0x89, 0x6b, 0x08, 0x0c, 0x9e, 0xcd, 0x68, 0x58, 0x78, 0x52, 0x78, 0x4c, - 0xc0, 0xdc, 0xc0, 0xf4, 0xc0, 0xd4, 0x78, 0x4e, 0x00, 0x26, 0xa0, 0x0e, - 0x6a, 0x14, 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x6b, 0xb2, 0x78, 0x54, - 0xa2, 0x0a, 0x02, 0x08, 0x80, 0x11, 0x7a, 0x56, 0x82, 0xff, 0x00, 0x2e, - 0x11, 0x38, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0x9a, 0xc5, 0x00, 0xce, - 0x08, 0x04, 0x89, 0x7e, 0x00, 0xc6, 0x00, 0xd6, 0x2f, 0x68, 0x68, 0x38, - 0xd0, 0xfc, 0x11, 0x18, 0x08, 0x0c, 0x4c, 0xd7, 0x00, 0x10, 0x08, 0x0c, - 0x4e, 0xbb, 0x00, 0xde, 0x00, 0xce, 0x19, 0x04, 0x89, 0x6b, 0x00, 0xc6, - 0x2d, 0x60, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, 0x08, 0x04, 0x89, 0x7e, - 0x00, 0xc6, 0x08, 0x0c, 0x9f, 0x92, 0x01, 0x90, 0x60, 0x13, 0x00, 0x00, - 0x68, 0x18, 0x60, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x03, - 0x69, 0x04, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, - 0x08, 0x0c, 0x86, 0xd3, 0x00, 0xce, 0x04, 0xe0, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x68, 0x3e, 0x00, 0xce, 0x04, 0xb0, 0x70, 0x08, 0xa0, 0x86, - 0x00, 0x0b, 0x11, 0xa0, 0x60, 0x18, 0x20, 0x0c, 0xc1, 0xbc, 0x21, 0x02, - 0x00, 0xc6, 0x2d, 0x60, 0x78, 0x4b, 0x00, 0x03, 0x60, 0x07, 0x00, 0x85, - 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xce, 0x00, 0xf0, 0x70, 0x0c, 0xa0, 0x86, - 0x2a, 0x00, 0x11, 0x38, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x68, 0x3e, - 0x00, 0xa8, 0x04, 0x81, 0x00, 0xa8, 0x8f, 0xff, 0x09, 0x0c, 0x15, 0x1a, - 0x00, 0xc6, 0x00, 0xd6, 0x2d, 0x60, 0x2f, 0x68, 0x68, 0x37, 0x01, 0x03, - 0x68, 0x4b, 0x00, 0x03, 0x08, 0x0c, 0x99, 0xb9, 0x08, 0x0c, 0x9e, 0xcd, - 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xde, 0x00, 0xce, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0xfe, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x15, 0x11, 0x28, 0x20, 0x01, - 0xb8, 0xb8, 0x20, 0x04, 0x68, 0x3e, 0x00, 0x68, 0xa1, 0x8e, 0x00, 0x16, - 0x11, 0x60, 0x00, 0xc6, 0x2d, 0x00, 0x20, 0x60, 0x08, 0x0c, 0xb3, 0xf6, - 0x08, 0x0c, 0x6b, 0x61, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x72, 0x28, - 0x7c, 0x80, 0x7b, 0x7c, 0xd2, 0xf4, 0x01, 0x30, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x68, 0x3e, 0x08, 0x04, 0x89, 0xfc, 0x00, 0xc6, 0x2d, 0x60, - 0x08, 0x0c, 0x99, 0xd9, 0x00, 0xce, 0x68, 0x04, 0xa0, 0x86, 0x00, 0x50, - 0x11, 0x68, 0x00, 0xc6, 0x2d, 0x00, 0x20, 0x60, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x50, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0xce, 0x04, 0xf0, 0x68, 0x00, 0xa0, 0x86, 0x00, 0x0f, 0x01, 0xc8, - 0x8f, 0xff, 0x09, 0x0c, 0x15, 0x1a, 0x68, 0x20, 0xd0, 0xdc, 0x11, 0x98, - 0x68, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x11, 0x98, 0x78, 0x4c, 0xd0, 0xac, - 0x01, 0x80, 0x78, 0x4c, 0xc0, 0xdc, 0xc0, 0xf4, 0x78, 0x4e, 0x78, 0x50, - 0xc0, 0xf4, 0xc0, 0xfc, 0x78, 0x52, 0x20, 0x01, 0x00, 0x01, 0x68, 0x2e, - 0x00, 0xe0, 0x20, 0x01, 0x00, 0x07, 0x68, 0x2e, 0x00, 0xc0, 0x78, 0x4c, - 0xd0, 0xb4, 0x11, 0x30, 0xd0, 0xac, 0x0d, 0xb8, 0x78, 0x4c, 0xd0, 0xf4, - 0x1d, 0xa0, 0x0c, 0x38, 0xd2, 0xec, 0x1d, 0x88, 0x70, 0x24, 0xa3, 0x06, - 0x11, 0x18, 0x70, 0x20, 0xa4, 0x06, 0x0d, 0x58, 0x70, 0x20, 0x68, 0x36, - 0x70, 0x24, 0x68, 0x3a, 0x20, 0x01, 0x00, 0x05, 0x68, 0x2e, 0x08, 0x0c, - 0xa0, 0x1f, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x10, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0x26, 0x60, 0x34, 0x20, 0x68, 0x6a, 0x1c, 0xa2, 0x86, 0x00, 0x07, - 0x09, 0x04, 0x8a, 0x60, 0xa2, 0x86, 0x00, 0x02, 0x09, 0x04, 0x8a, 0x60, - 0xa2, 0x86, 0x00, 0x00, 0x09, 0x04, 0x8a, 0x60, 0x68, 0x08, 0x63, 0x38, - 0xa3, 0x06, 0x19, 0x04, 0x8a, 0x60, 0x20, 0x71, 0xbc, 0x8c, 0xa1, 0x86, - 0x00, 0x15, 0x05, 0xe0, 0xa1, 0x8e, 0x00, 0x16, 0x11, 0x90, 0x60, 0x30, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x01, 0x11, 0x60, 0x70, 0x0c, - 0xa0, 0x86, 0x2a, 0x00, 0x11, 0x40, 0x60, 0x34, 0xa0, 0x80, 0x00, 0x08, - 0x20, 0x0c, 0xc1, 0xdd, 0xc1, 0xf5, 0x21, 0x02, 0x04, 0x38, 0x00, 0xc6, - 0x60, 0x34, 0x20, 0x60, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x4b, 0x01, 0xa0, - 0xa1, 0x86, 0x00, 0x4c, 0x01, 0x88, 0xa1, 0x86, 0x00, 0x4d, 0x01, 0x70, - 0xa1, 0x86, 0x00, 0x4e, 0x01, 0x58, 0xa1, 0x86, 0x00, 0x52, 0x01, 0x40, - 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x09, 0x0c, 0x15, 0x1a, - 0x68, 0x4b, 0x00, 0x03, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, - 0x60, 0x1f, 0x00, 0x02, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0xce, 0x00, 0x30, 0x60, 0x34, 0x20, 0x70, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x70, 0x3e, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x2e, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0x20, 0xa9, 0x00, 0x0e, 0x2e, 0x98, - 0x60, 0x10, 0x20, 0xa0, 0x53, 0xa3, 0xa1, 0xb6, 0x00, 0x15, 0x15, 0x58, - 0x60, 0x18, 0x20, 0x68, 0x01, 0x56, 0x00, 0x36, 0x00, 0x26, 0xae, 0x90, - 0x00, 0x0c, 0xa2, 0x90, 0x00, 0x04, 0x20, 0xa9, 0x00, 0x04, 0xad, 0x98, - 0x00, 0x0a, 0x08, 0x0c, 0x91, 0x66, 0x00, 0x2e, 0x00, 0x3e, 0x01, 0x5e, - 0x11, 0xd8, 0x01, 0x56, 0x00, 0x36, 0x00, 0x26, 0xae, 0x90, 0x00, 0x0c, - 0xa2, 0x90, 0x00, 0x08, 0x20, 0xa9, 0x00, 0x04, 0xad, 0x98, 0x00, 0x06, - 0x08, 0x0c, 0x91, 0x66, 0x00, 0x2e, 0x00, 0x3e, 0x01, 0x5e, 0x11, 0x50, - 0x70, 0x38, 0x68, 0x0a, 0x70, 0x3c, 0x68, 0x0e, 0x68, 0x00, 0xc0, 0x8d, - 0x68, 0x02, 0x00, 0xde, 0x08, 0x04, 0x88, 0x2c, 0x08, 0x0c, 0x2c, 0xd1, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x2f, 0x00, 0x60, 0x1a, 0x60, 0x13, - 0x00, 0x00, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x4f, 0x6f, 0x08, 0x0c, - 0x4f, 0x9c, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xce, - 0x0c, 0x10, 0x21, 0x00, 0xa1, 0xb2, 0x00, 0x80, 0x1a, 0x0c, 0x15, 0x1a, - 0xa1, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0x8b, 0x1d, 0x00, 0x02, 0x8b, 0x11, - 0x8b, 0x05, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x11, 0x8b, 0x03, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x11, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, 0x8b, 0x03, - 0x8b, 0x11, 0x8b, 0x03, 0x8b, 0x03, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6d, 0x45, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6d, 0x45, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, 0x26, 0x00, - 0x00, 0x02, 0x8b, 0x11, 0x8b, 0x11, 0x8b, 0x25, 0x8b, 0x11, 0x8b, 0x11, - 0x8b, 0x25, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x04, 0xa0, 0xb2, 0x00, 0x80, - 0x1a, 0x0c, 0x15, 0x1a, 0xa1, 0xb6, 0x00, 0x13, 0x09, 0x04, 0x8b, 0xd7, - 0xa1, 0xb6, 0x00, 0x27, 0x19, 0x04, 0x8b, 0x9d, 0x08, 0x0c, 0x71, 0x02, - 0x60, 0x04, 0x08, 0x0c, 0x9f, 0x03, 0x01, 0x90, 0x08, 0x0c, 0x9f, 0x14, - 0x09, 0x04, 0x8b, 0x97, 0xa0, 0x8e, 0x00, 0x21, 0x09, 0x04, 0x8b, 0x9a, - 0xa0, 0x8e, 0x00, 0x22, 0x09, 0x04, 0x8b, 0x97, 0xa0, 0x8e, 0x00, 0x3d, - 0x09, 0x04, 0x8b, 0x9a, 0x08, 0x04, 0x8b, 0x90, 0x08, 0x0c, 0x2c, 0xf7, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x0c, 0x08, 0x0c, 0x8c, 0xa5, 0xa1, 0x86, 0x00, 0x7e, - 0x11, 0x48, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x14, 0xc2, 0x85, 0x08, 0x0c, - 0x5b, 0x41, 0x11, 0x08, 0xc2, 0xad, 0x22, 0x02, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x21, 0x10, 0x00, 0x26, 0x20, 0x19, 0x00, 0x28, 0x08, 0x0c, - 0x83, 0x20, 0x00, 0x2e, 0x08, 0x0c, 0xb4, 0x49, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x21, 0x10, 0x20, 0x19, - 0x00, 0x28, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, - 0x08, 0x0c, 0x6d, 0x74, 0x00, 0xc6, 0x60, 0x18, 0xa0, 0x65, 0x01, 0x10, - 0x08, 0x0c, 0x52, 0x1c, 0x00, 0xce, 0x2c, 0x08, 0x08, 0x0c, 0xaf, 0x3e, - 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, 0x4f, 0xde, - 0x08, 0x0c, 0xa0, 0xdb, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0x05, 0x08, 0x0c, 0x8c, 0xa5, 0x0c, 0xb0, 0x08, 0x0c, 0x8c, 0xd3, - 0x0c, 0x98, 0xa1, 0x86, 0x00, 0x14, 0x1d, 0xb0, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x2c, 0xd1, 0x08, 0x0c, 0x9f, 0x03, 0x11, 0x88, 0x08, 0x0c, - 0x2c, 0xf7, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x0c, 0x08, 0x0c, - 0x8c, 0xa5, 0xa1, 0x86, 0x00, 0x7e, 0x11, 0x28, 0x20, 0x01, 0xb6, 0x35, - 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, 0x08, 0xc0, 0x08, 0x0c, 0x9f, 0x14, - 0x11, 0x18, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x90, 0x60, 0x04, 0xa0, 0x8e, - 0x00, 0x32, 0x11, 0x58, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0xb6, 0x82, - 0x20, 0x79, 0x00, 0x00, 0x08, 0x0c, 0x30, 0x04, 0x00, 0xfe, 0x00, 0xee, - 0x08, 0x18, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x21, 0x0d, 0x50, 0xa0, 0x8e, - 0x00, 0x22, 0x09, 0x0c, 0x8c, 0xa5, 0x08, 0x04, 0x8b, 0x90, 0xa0, 0xb2, - 0x00, 0x40, 0x1a, 0x04, 0x8c, 0x9a, 0x20, 0x08, 0x00, 0x02, 0x8c, 0x1f, - 0x8c, 0x20, 0x8c, 0x23, 0x8c, 0x26, 0x8c, 0x29, 0x8c, 0x2c, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x2f, - 0x8c, 0x3e, 0x8c, 0x1d, 0x8c, 0x40, 0x8c, 0x3e, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x3e, 0x8c, 0x3e, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x7a, 0x8c, 0x3e, 0x8c, 0x1d, 0x8c, 0x3a, 0x8c, 0x1d, - 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x3b, 0x8c, 0x1d, 0x8c, 0x1d, 0x8c, 0x1d, - 0x8c, 0x3e, 0x8c, 0x71, 0x8c, 0x1d, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xf0, - 0x20, 0x01, 0x00, 0x0b, 0x04, 0x60, 0x20, 0x01, 0x00, 0x03, 0x04, 0x48, - 0x20, 0x01, 0x00, 0x05, 0x04, 0x30, 0x20, 0x01, 0x00, 0x01, 0x04, 0x18, - 0x20, 0x01, 0x00, 0x09, 0x04, 0x00, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x03, - 0x00, 0x05, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0xa0, 0x00, 0x18, 0x00, 0x10, 0x08, 0x0c, 0x4f, 0x6f, - 0x08, 0x04, 0x8c, 0x8b, 0x08, 0x0c, 0x71, 0x02, 0x20, 0x01, 0xb8, 0xb6, - 0x20, 0x04, 0x60, 0x16, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, - 0x60, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, - 0x4f, 0x6f, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x03, 0x00, 0x02, 0x20, 0x01, - 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, 0x00, 0x36, 0x20, 0x19, 0xb6, 0x5d, - 0x23, 0x04, 0xa0, 0x84, 0xff, 0x00, 0x11, 0x20, 0x20, 0x01, 0xb8, 0xb6, - 0x20, 0x1c, 0x00, 0x40, 0x80, 0x07, 0xa0, 0x9a, 0x00, 0x04, 0x0e, 0xc0, - 0x80, 0x03, 0x80, 0x1b, 0x83, 0x1b, 0xa3, 0x18, 0x63, 0x16, 0x00, 0x3e, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0xe8, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0xa0, 0xdb, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0xa0, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0xb6, 0x82, 0x20, 0x79, 0x00, 0x00, - 0x08, 0x0c, 0x30, 0x04, 0x00, 0xfe, 0x00, 0xee, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x18, 0x08, 0x0c, - 0x71, 0x02, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, - 0x00, 0x02, 0x20, 0x01, 0xb8, 0xb6, 0x20, 0x04, 0x60, 0x16, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0x26, 0x00, 0x20, 0x08, 0x00, 0x02, 0x8c, 0xa3, - 0x8c, 0xa3, 0x8c, 0xa3, 0x8c, 0x8b, 0x8c, 0x8b, 0x8c, 0xa3, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0xe6, 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0x9d, 0x16, - 0x05, 0x08, 0x60, 0x10, 0x20, 0x70, 0x70, 0x34, 0xa0, 0x86, 0x01, 0x39, - 0x11, 0x48, 0x20, 0x01, 0x00, 0x30, 0x20, 0x09, 0x00, 0x00, 0x20, 0x11, - 0x40, 0x05, 0x08, 0x0c, 0xa1, 0x92, 0x00, 0x90, 0x70, 0x38, 0xd0, 0xfc, - 0x01, 0x78, 0x70, 0x07, 0x00, 0x00, 0x00, 0x16, 0x60, 0x04, 0xa0, 0x8e, - 0x00, 0x21, 0x01, 0x60, 0xa0, 0x8e, 0x00, 0x3d, 0x01, 0x48, 0x00, 0x1e, - 0x70, 0x37, 0x01, 0x03, 0x70, 0x33, 0x01, 0x00, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x1e, 0x00, 0x09, 0x0c, 0xc8, 0x00, 0xe6, - 0xac, 0xf0, 0x00, 0x04, 0x2e, 0x74, 0x70, 0x00, 0x20, 0x70, 0x70, 0x37, - 0x01, 0x03, 0x70, 0x23, 0x80, 0x01, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, - 0x66, 0x18, 0x26, 0x68, 0x68, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x00, 0xde, - 0xa0, 0xb2, 0x00, 0x0c, 0x1a, 0x0c, 0x15, 0x1a, 0x66, 0x04, 0xa6, 0xb6, - 0x00, 0x43, 0x11, 0x20, 0x08, 0x0c, 0xa1, 0x4e, 0x08, 0x04, 0x8d, 0x44, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x33, 0x11, 0x20, 0x08, 0x0c, 0xa0, 0xfe, - 0x08, 0x04, 0x8d, 0x44, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x28, 0x11, 0x20, - 0x08, 0x0c, 0x9f, 0x44, 0x08, 0x04, 0x8d, 0x44, 0x66, 0x04, 0xa6, 0xb6, - 0x00, 0x29, 0x11, 0x18, 0x08, 0x0c, 0x9f, 0x5b, 0x04, 0xd8, 0x66, 0x04, - 0xa6, 0xb6, 0x00, 0x1f, 0x11, 0x18, 0x08, 0x0c, 0x88, 0x12, 0x04, 0xa0, - 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x00, 0x11, 0x18, 0x08, 0x0c, 0x8a, 0x66, - 0x04, 0x68, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x22, 0x11, 0x18, 0x08, 0x0c, - 0x88, 0x3a, 0x04, 0x30, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x35, 0x11, 0x18, - 0x08, 0x0c, 0x88, 0xa1, 0x00, 0xf8, 0x66, 0x04, 0xa6, 0xb6, 0x00, 0x39, - 0x11, 0x18, 0x08, 0x0c, 0x8a, 0x02, 0x00, 0xc0, 0x66, 0x04, 0xa6, 0xb6, - 0x00, 0x3d, 0x11, 0x18, 0x08, 0x0c, 0x88, 0x54, 0x00, 0x88, 0x66, 0x04, - 0xa6, 0xb6, 0x00, 0x44, 0x11, 0x18, 0x08, 0x0c, 0x88, 0x74, 0x00, 0x50, - 0xa1, 0xb6, 0x00, 0x15, 0x11, 0x10, 0x00, 0x53, 0x00, 0x28, 0xa1, 0xb6, - 0x00, 0x16, 0x11, 0x18, 0x08, 0x04, 0x8f, 0x08, 0x00, 0x05, 0x08, 0x0c, - 0x86, 0xef, 0x0c, 0xe0, 0x8d, 0x6b, 0x8d, 0x6e, 0x8d, 0x6b, 0x8d, 0xb0, - 0x8d, 0x6b, 0x8e, 0x95, 0x8f, 0x16, 0x8d, 0x6b, 0x8d, 0x6b, 0x8e, 0xe4, - 0x8d, 0x6b, 0x8e, 0xf8, 0xa1, 0xb6, 0x00, 0x48, 0x01, 0x40, 0x20, 0xe1, - 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, - 0x00, 0x05, 0x00, 0xe6, 0xac, 0xf0, 0x00, 0x04, 0x2e, 0x74, 0x70, 0x00, - 0x20, 0x70, 0x70, 0x37, 0x01, 0x03, 0x00, 0xee, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x05, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0xb6, 0x00, 0x70, 0x84, 0xa0, 0x86, 0x00, 0x74, 0x15, 0x30, 0x08, 0x0c, - 0xaf, 0x15, 0x11, 0xb0, 0x00, 0xd6, 0x60, 0x18, 0x20, 0x68, 0x70, 0x30, - 0xd0, 0x8c, 0x01, 0x28, 0x68, 0x00, 0xd0, 0xbc, 0x01, 0x10, 0xc0, 0xc5, - 0x68, 0x02, 0x00, 0xd9, 0x00, 0xde, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x4f, 0x6f, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x78, - 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x4f, 0x6f, 0x08, 0x0c, 0x2c, 0xf7, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, - 0x00, 0x10, 0x08, 0x0c, 0x8e, 0x82, 0x00, 0xee, 0x00, 0x05, 0x68, 0x00, - 0xd0, 0x84, 0x01, 0x68, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, - 0x20, 0x69, 0xb6, 0x52, 0x68, 0x04, 0xd0, 0xa4, 0x01, 0x20, 0x20, 0x01, - 0x00, 0x06, 0x08, 0x0c, 0x4f, 0x9c, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x11, - 0xb6, 0x21, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x74, 0x19, 0x04, 0x8e, 0x7f, - 0x60, 0x18, 0x20, 0x68, 0x6a, 0xa0, 0xa2, 0x86, 0x00, 0x7e, 0x11, 0x20, - 0x08, 0x0c, 0x90, 0x2e, 0x08, 0x04, 0x8e, 0x1e, 0x08, 0x0c, 0x90, 0x24, - 0x60, 0x18, 0x20, 0x68, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x14, 0xa2, 0x86, - 0x00, 0x80, 0x11, 0xc0, 0x68, 0x13, 0x00, 0xff, 0x68, 0x17, 0xff, 0xfc, - 0x60, 0x10, 0xa0, 0x05, 0x01, 0x38, 0x20, 0x68, 0x68, 0x07, 0x00, 0x00, - 0x68, 0x37, 0x01, 0x03, 0x68, 0x33, 0x02, 0x00, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x4f, 0x6f, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, 0x86, 0xa4, - 0x08, 0x04, 0x8e, 0x80, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x35, 0x2e, 0x04, - 0xd0, 0x9c, 0x01, 0x88, 0x20, 0x71, 0xbc, 0x80, 0x71, 0x08, 0x72, 0x0c, - 0xa1, 0x8c, 0x00, 0xff, 0x11, 0x18, 0xa2, 0x84, 0xff, 0x00, 0x01, 0x38, - 0x60, 0x18, 0x20, 0x70, 0x70, 0xa0, 0xd0, 0xbc, 0x11, 0x10, 0x71, 0x12, - 0x72, 0x16, 0x00, 0xee, 0x60, 0x10, 0xa0, 0x05, 0x01, 0x98, 0x20, 0x68, - 0x68, 0x38, 0xd0, 0xf4, 0x01, 0x78, 0x68, 0x34, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x86, 0x00, 0x39, 0x19, 0x58, 0x20, 0x01, 0x00, 0x00, 0x20, 0x09, - 0x00, 0x00, 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, 0xa1, 0x92, 0x08, 0x40, - 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x03, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x04, 0x8e, 0x80, - 0x68, 0x5c, 0xd0, 0xe4, 0x01, 0xd8, 0x08, 0x0c, 0xa0, 0x8e, 0x08, 0x0c, - 0x5b, 0x41, 0x01, 0x18, 0xd0, 0xdc, 0x19, 0x04, 0x8d, 0xda, 0x20, 0x11, - 0xb6, 0x35, 0x22, 0x04, 0xc0, 0xad, 0x20, 0x12, 0x20, 0x01, 0xb8, 0x8f, - 0x20, 0x04, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x78, 0xe3, 0x00, 0x00, - 0x08, 0x0c, 0x28, 0xa7, 0x78, 0xe2, 0x00, 0xfe, 0x08, 0x04, 0x8d, 0xda, - 0x08, 0x0c, 0xa0, 0xc4, 0x20, 0x11, 0xb6, 0x35, 0x22, 0x04, 0xc0, 0xa5, - 0x20, 0x12, 0x00, 0x06, 0x08, 0x0c, 0xb0, 0x37, 0x00, 0x0e, 0x19, 0x04, - 0x8d, 0xda, 0xc0, 0xb5, 0x20, 0x12, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x4f, 0x6f, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x00, 0xc6, - 0x20, 0x09, 0x00, 0xef, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x79, 0xea, - 0x79, 0x32, 0x79, 0x36, 0x00, 0xfe, 0x08, 0x0c, 0x28, 0x7c, 0x00, 0xf6, - 0x20, 0x79, 0xb6, 0x00, 0x79, 0x76, 0x21, 0x00, 0x20, 0x09, 0x00, 0x00, - 0x08, 0x0c, 0x28, 0x52, 0x79, 0x52, 0x00, 0xfe, 0x81, 0x08, 0x08, 0x0c, - 0x4f, 0xbf, 0x2c, 0x00, 0x00, 0xce, 0x19, 0x04, 0x8d, 0xda, 0x60, 0x1a, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x1f, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x6d, 0x45, - 0x00, 0x08, 0x00, 0x11, 0x00, 0xde, 0x00, 0x05, 0x20, 0x01, 0x00, 0x07, - 0x08, 0x0c, 0x4f, 0x6f, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x03, 0x11, 0x20, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x4f, 0x9c, - 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0x26, 0x00, 0x16, 0x20, 0x71, 0xb6, 0x00, 0x70, 0x84, 0xa0, 0x86, - 0x00, 0x14, 0x15, 0xf0, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, 0x11, 0x28, - 0x60, 0x10, 0xa0, 0x05, 0x11, 0x10, 0x08, 0x0c, 0x3f, 0x85, 0x00, 0xd6, - 0x60, 0x18, 0x20, 0x68, 0x08, 0x0c, 0x50, 0xbd, 0x08, 0x0c, 0x8d, 0x9f, - 0x00, 0xde, 0x08, 0x0c, 0x90, 0xdd, 0x15, 0x50, 0x00, 0xd6, 0x60, 0x18, - 0x20, 0x68, 0x68, 0x90, 0x00, 0xde, 0xa0, 0x05, 0x05, 0x18, 0x20, 0x01, - 0x00, 0x06, 0x08, 0x0c, 0x4f, 0x6f, 0x00, 0xe6, 0x60, 0x10, 0xa0, 0x75, - 0x01, 0xa8, 0x70, 0x34, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x86, 0x00, 0x39, - 0x11, 0x48, 0x20, 0x01, 0x00, 0x00, 0x20, 0x09, 0x00, 0x00, 0x20, 0x11, - 0x40, 0x00, 0x08, 0x0c, 0xa1, 0x92, 0x00, 0x30, 0x70, 0x07, 0x00, 0x00, - 0x70, 0x37, 0x01, 0x03, 0x70, 0x33, 0x02, 0x00, 0x00, 0xee, 0x08, 0x0c, - 0x2c, 0xf7, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x20, 0x08, 0x0c, 0x8c, 0xa5, - 0x08, 0x0c, 0x8e, 0x82, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x11, 0xb6, 0x21, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x14, 0x11, 0x58, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x10, 0x08, 0x0c, - 0x8e, 0x82, 0x00, 0x05, 0x20, 0x11, 0xb6, 0x21, 0x22, 0x04, 0xa0, 0x86, - 0x00, 0x04, 0x11, 0x38, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x4f, 0x6f, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x10, 0x08, 0x0c, 0x8e, 0x82, 0x00, 0x05, - 0x00, 0x0b, 0x00, 0x05, 0x8d, 0x6b, 0x8f, 0x21, 0x8d, 0x6b, 0x8f, 0x55, - 0x8d, 0x6b, 0x8f, 0xe0, 0x8f, 0x16, 0x8d, 0x6b, 0x8d, 0x6b, 0x8f, 0xf3, - 0x8d, 0x6b, 0x90, 0x03, 0x66, 0x04, 0xa6, 0x86, 0x00, 0x03, 0x09, 0x04, - 0x8e, 0x95, 0xa6, 0xb6, 0x00, 0x1e, 0x11, 0x10, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, 0x90, 0x13, 0x11, 0x78, - 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, - 0x08, 0x0c, 0x6d, 0x45, 0x00, 0xe8, 0x20, 0x09, 0xbc, 0x8e, 0x21, 0x04, - 0xa0, 0x86, 0x00, 0x09, 0x11, 0x60, 0x60, 0x18, 0x20, 0x68, 0x68, 0x40, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, 0x01, 0x70, 0x80, 0x01, 0x68, 0x42, - 0x60, 0x17, 0x00, 0x0a, 0x00, 0x58, 0x20, 0x09, 0xbc, 0x8f, 0x21, 0x04, - 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x19, 0x00, 0x11, 0x08, 0x08, 0xd0, - 0x08, 0x0c, 0x8e, 0x82, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x00, 0x26, - 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0x90, 0x21, 0x00, 0xd6, 0x20, 0x69, - 0xb8, 0x9e, 0x2d, 0x04, 0xa0, 0x05, 0x01, 0x68, 0x60, 0x18, 0x20, 0x68, - 0x68, 0xa0, 0xa0, 0x86, 0x00, 0x7e, 0x11, 0x38, 0x20, 0x69, 0xb6, 0x1d, - 0x2d, 0x04, 0x80, 0x00, 0x20, 0x6a, 0x00, 0xde, 0x00, 0x10, 0x00, 0xde, - 0x00, 0x78, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x02, 0x08, 0x0c, 0x6d, 0x45, 0x04, 0x80, 0x00, 0xd6, 0x60, 0x10, - 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x00, 0xde, 0x01, 0x08, 0x6a, 0x34, - 0x08, 0x0c, 0x8c, 0xa5, 0x20, 0x09, 0xbc, 0x8e, 0x21, 0x34, 0xa6, 0xb4, - 0x00, 0xff, 0xa6, 0x86, 0x00, 0x05, 0x05, 0x00, 0xa6, 0x86, 0x00, 0x0b, - 0x01, 0xc8, 0x20, 0x09, 0xbc, 0x8f, 0x21, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0x11, 0x18, 0xa6, 0x86, 0x00, 0x09, 0x01, 0xa0, 0xa0, 0x86, 0x19, 0x00, - 0x11, 0x68, 0xa6, 0x86, 0x00, 0x09, 0x01, 0x70, 0x20, 0x01, 0x00, 0x04, - 0x08, 0x0c, 0x4f, 0x6f, 0x20, 0x01, 0x00, 0x28, 0x60, 0x16, 0x60, 0x07, - 0x00, 0x4b, 0x00, 0x10, 0x08, 0x0c, 0x8e, 0x82, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0xd6, 0xa2, 0x86, 0x01, 0x39, 0x01, 0x60, 0x60, 0x10, 0x20, 0x68, - 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x48, 0x68, 0x34, 0xa0, 0x86, 0x01, 0x39, - 0x01, 0x18, 0x68, 0x38, 0xd0, 0xfc, 0x01, 0x10, 0x00, 0xde, 0x0c, 0x50, - 0x60, 0x18, 0x20, 0x68, 0x68, 0x40, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, - 0x01, 0x40, 0x80, 0x01, 0x68, 0x42, 0x60, 0x17, 0x00, 0x0a, 0x60, 0x07, - 0x00, 0x16, 0x00, 0xde, 0x08, 0xe8, 0x68, 0xa0, 0xa0, 0x86, 0x00, 0x7e, - 0x11, 0x38, 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x00, 0x08, 0x0c, 0x4c, 0x28, - 0x00, 0xee, 0x00, 0x10, 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0xde, 0x08, 0x60, - 0x08, 0x0c, 0x90, 0x21, 0x11, 0x58, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, - 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x03, 0x08, 0x0c, - 0x6d, 0x45, 0x00, 0x20, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x8e, 0x82, - 0x00, 0x05, 0x04, 0x69, 0x11, 0x58, 0x20, 0x01, 0x00, 0x08, 0x08, 0x0c, - 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x05, 0x08, 0x0c, - 0x6d, 0x45, 0x00, 0x10, 0x08, 0x0c, 0x8e, 0x82, 0x00, 0x05, 0x00, 0xe9, - 0x11, 0x58, 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x10, - 0x08, 0x0c, 0x8e, 0x82, 0x00, 0x05, 0x20, 0x09, 0xbc, 0x8e, 0x21, 0x04, - 0xa0, 0x86, 0x00, 0x03, 0x11, 0x38, 0x20, 0x09, 0xbc, 0x8f, 0x21, 0x04, - 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x2a, 0x00, 0x00, 0x05, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x16, 0xac, 0x88, 0x00, 0x06, - 0x21, 0x64, 0x08, 0x0c, 0x50, 0x2a, 0x00, 0x1e, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x16, 0x60, 0x18, - 0x20, 0x68, 0x20, 0x71, 0xb6, 0x35, 0x2e, 0x04, 0xa0, 0x85, 0x00, 0x03, - 0x20, 0x72, 0x08, 0x0c, 0x90, 0xb2, 0x05, 0x60, 0x20, 0x09, 0xb6, 0x35, - 0x21, 0x04, 0xc0, 0xcd, 0x20, 0x0a, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, - 0xd0, 0xa4, 0x01, 0x58, 0xa0, 0x06, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2a, - 0x08, 0x0c, 0xb1, 0xa4, 0x20, 0x01, 0xb6, 0x0c, 0x20, 0x0c, 0xc1, 0x95, - 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, - 0x2c, 0xa4, 0x20, 0x71, 0xb6, 0x00, 0x08, 0x0c, 0x2a, 0xed, 0x00, 0xc6, - 0x01, 0x56, 0x20, 0xa9, 0x00, 0x81, 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, - 0x2d, 0xcc, 0x81, 0x08, 0x1f, 0x04, 0x90, 0x63, 0x01, 0x5e, 0x00, 0xce, - 0x08, 0x0c, 0x90, 0x24, 0x68, 0x13, 0x00, 0xff, 0x68, 0x17, 0xff, 0xfe, - 0x20, 0x71, 0xbc, 0x80, 0x20, 0x79, 0x01, 0x00, 0x2e, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x20, 0x69, 0xb6, 0x1c, 0x20, 0x6a, 0x78, 0xe6, 0x00, 0x06, - 0x8e, 0x70, 0x2e, 0x04, 0x20, 0x69, 0xb6, 0x1d, 0x20, 0x6a, 0x78, 0xea, - 0x78, 0x32, 0x78, 0x36, 0x20, 0x10, 0xa0, 0x84, 0xff, 0x00, 0x00, 0x1e, - 0xa1, 0x05, 0x20, 0x09, 0xb6, 0x28, 0x20, 0x0a, 0x22, 0x00, 0xa0, 0x84, - 0x00, 0xff, 0x20, 0x08, 0x08, 0x0c, 0x28, 0x7c, 0x08, 0x0c, 0x5b, 0x41, - 0x01, 0x70, 0x20, 0x69, 0xbc, 0x8e, 0x20, 0x71, 0xb8, 0xb2, 0x68, 0x10, - 0x20, 0x72, 0x68, 0x14, 0x70, 0x06, 0x68, 0x18, 0x70, 0x0a, 0x68, 0x1c, - 0x70, 0x0e, 0x08, 0x0c, 0xa0, 0x8e, 0x00, 0x40, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x4f, 0x6f, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x1e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, 0x01, 0x56, 0x20, 0x19, 0xb6, 0x28, - 0x23, 0x1c, 0x83, 0xff, 0x01, 0xe8, 0x20, 0x71, 0xbc, 0x80, 0x2e, 0x14, - 0xa2, 0x94, 0x00, 0xff, 0x70, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa2, 0x05, - 0xa3, 0x06, 0x11, 0x90, 0x20, 0x11, 0xbc, 0x96, 0xad, 0x98, 0x00, 0x0a, - 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, 0x11, 0x48, 0x20, 0x11, - 0xbc, 0x9a, 0xad, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, - 0x91, 0x66, 0x11, 0x00, 0x01, 0x5e, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xbc, 0x8c, 0x70, 0x04, 0xa0, 0x86, - 0x00, 0x14, 0x11, 0xa8, 0x70, 0x08, 0xa0, 0x86, 0x08, 0x00, 0x11, 0x88, - 0x70, 0x0c, 0xd0, 0xec, 0x01, 0x60, 0xa0, 0x84, 0x0f, 0x00, 0xa0, 0x86, - 0x01, 0x00, 0x11, 0x38, 0x70, 0x24, 0xd0, 0xa4, 0x11, 0x10, 0xd0, 0xac, - 0x01, 0x10, 0xa0, 0x06, 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x76, 0x00, 0x56, - 0x00, 0x46, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x29, 0xb8, 0xea, 0x25, 0x2c, 0x20, 0x21, 0xb8, 0xf0, 0x24, 0x24, - 0x20, 0x61, 0xbe, 0x00, 0x20, 0x71, 0xb6, 0x00, 0x72, 0x48, 0x70, 0x68, - 0xa2, 0x02, 0x16, 0xf0, 0x08, 0x0c, 0xb1, 0xcc, 0x05, 0xa0, 0x67, 0x1c, - 0xa7, 0x86, 0x00, 0x01, 0x05, 0x80, 0xa7, 0x86, 0x00, 0x07, 0x05, 0x68, - 0x25, 0x00, 0xac, 0x06, 0x05, 0x50, 0x24, 0x00, 0xac, 0x06, 0x05, 0x38, - 0x00, 0xc6, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x11, 0x10, 0x08, 0x0c, - 0x19, 0x52, 0xa7, 0x86, 0x00, 0x08, 0x11, 0x48, 0x08, 0x0c, 0x9f, 0x14, - 0x11, 0x30, 0x00, 0xce, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x9e, 0xd9, - 0x00, 0xa0, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x60, - 0xa7, 0x86, 0x00, 0x03, 0x11, 0xe8, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, - 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, - 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xce, 0xac, 0xe0, 0x00, 0x18, 0x70, 0x5c, - 0xac, 0x02, 0x12, 0x10, 0x08, 0x04, 0x91, 0x10, 0x01, 0x2e, 0x00, 0x0e, - 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0xa7, 0x86, 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, - 0xb1, 0x55, 0x0c, 0x30, 0xa7, 0x86, 0x00, 0x0a, 0x09, 0xe0, 0x08, 0xc8, - 0x22, 0x0c, 0x23, 0x04, 0xa1, 0x06, 0x11, 0x30, 0x82, 0x10, 0x83, 0x18, - 0x1f, 0x04, 0x91, 0x66, 0xa0, 0x06, 0x00, 0x05, 0x23, 0x04, 0xa1, 0x02, - 0x02, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x10, 0x20, 0x01, 0x00, 0x00, - 0xa1, 0x8d, 0x00, 0x01, 0x00, 0x05, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x80, - 0x1a, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x9f, 0x03, 0x01, 0x20, 0x08, 0x0c, - 0x9f, 0x14, 0x01, 0x68, 0x00, 0x28, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, - 0x9f, 0x14, 0x01, 0x38, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x86, 0xa4, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, 0x8c, 0xa5, 0x0c, 0xb0, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, - 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, - 0x91, 0xac, 0x91, 0xac, 0x91, 0xae, 0x91, 0xae, 0x91, 0xae, 0x91, 0xae, - 0x91, 0xac, 0x91, 0xac, 0x91, 0xac, 0x91, 0xae, 0x08, 0x0c, 0x15, 0x1a, - 0x60, 0x0b, 0xff, 0xff, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, - 0x6c, 0xff, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, - 0x01, 0x2e, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, 0x11, 0x28, 0x60, 0x04, - 0xa0, 0x82, 0x00, 0x40, 0x08, 0x04, 0x92, 0x48, 0xa1, 0x86, 0x00, 0x27, - 0x11, 0xe8, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0xd6, - 0x61, 0x10, 0x21, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x68, 0x68, 0x37, - 0x01, 0x03, 0x68, 0x4b, 0x00, 0x29, 0x68, 0x47, 0x00, 0x00, 0x69, 0x4c, - 0xc1, 0xc5, 0x69, 0x4e, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, - 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0xa1, 0x86, 0x00, 0x14, 0x11, 0x20, 0x60, 0x04, 0xa0, 0x82, 0x00, 0x40, - 0x04, 0x28, 0xa1, 0x86, 0x00, 0x46, 0x01, 0x38, 0xa1, 0x86, 0x00, 0x45, - 0x01, 0x20, 0xa1, 0x86, 0x00, 0x47, 0x19, 0x0c, 0x15, 0x1a, 0x20, 0x01, - 0x01, 0x09, 0x20, 0x04, 0xd0, 0x84, 0x01, 0x98, 0x01, 0x26, 0x20, 0x91, - 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0x6b, 0xe6, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, 0xe0, 0x00, 0x60, 0x00, - 0xa0, 0x86, 0x00, 0x02, 0x11, 0x10, 0x08, 0x04, 0x92, 0x86, 0x08, 0x0c, - 0x86, 0xef, 0x00, 0x05, 0x00, 0x02, 0x92, 0x26, 0x92, 0x24, 0x92, 0x24, - 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, 0x92, 0x24, - 0x92, 0x24, 0x92, 0x24, 0x92, 0x41, 0x92, 0x41, 0x92, 0x41, 0x92, 0x41, - 0x92, 0x24, 0x92, 0x41, 0x92, 0x24, 0x92, 0x41, 0x08, 0x0c, 0x15, 0x1a, - 0x08, 0x0c, 0x71, 0x02, 0x00, 0xd6, 0x61, 0x10, 0x21, 0x68, 0x08, 0x0c, - 0x9d, 0x16, 0x01, 0x68, 0x68, 0x37, 0x01, 0x03, 0x68, 0x4b, 0x00, 0x06, - 0x68, 0x47, 0x00, 0x00, 0x68, 0x50, 0xc0, 0xec, 0x68, 0x52, 0x08, 0x0c, - 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x00, 0x02, 0x92, 0x5e, - 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, - 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x5c, 0x92, 0x70, 0x92, 0x70, - 0x92, 0x70, 0x92, 0x70, 0x92, 0x5c, 0x92, 0x7f, 0x92, 0x5c, 0x92, 0x70, - 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x60, 0x3e, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x71, 0xe5, - 0x60, 0x10, 0xa0, 0x88, 0x00, 0x13, 0x21, 0x04, 0xa0, 0x85, 0x04, 0x00, - 0x20, 0x0a, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x20, 0x01, 0xb8, 0xb6, - 0x20, 0x04, 0x60, 0x16, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, - 0x60, 0x03, 0x00, 0x0f, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, - 0x71, 0x02, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, - 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9e, 0x93, 0x86, 0x93, 0xb5, 0x92, 0x9c, - 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, - 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, 0x92, 0x9c, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0xe6, 0x00, 0xd6, 0x60, 0x3f, 0x00, 0x00, 0x20, 0x71, 0xbc, 0x80, - 0x71, 0x24, 0x61, 0x0a, 0x20, 0x71, 0xbc, 0x8c, 0x61, 0x10, 0x21, 0x68, - 0x76, 0x14, 0xa6, 0xb4, 0x0f, 0xff, 0x86, 0xff, 0x09, 0x04, 0x93, 0x4c, - 0xa6, 0x8c, 0x0c, 0x00, 0x05, 0x18, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, - 0x53, 0x77, 0x00, 0xfe, 0x01, 0xc8, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0xb0, - 0x60, 0x20, 0xd0, 0xdc, 0x11, 0x98, 0x68, 0x50, 0xd0, 0xbc, 0x11, 0x80, - 0x73, 0x18, 0x68, 0x14, 0xa3, 0x06, 0x19, 0x04, 0x93, 0x5f, 0x73, 0x1c, - 0x68, 0x10, 0xa3, 0x1e, 0x01, 0x38, 0xd6, 0xd4, 0x09, 0x04, 0x93, 0x5f, - 0x6b, 0x14, 0xa3, 0x05, 0x19, 0x04, 0x93, 0x5f, 0x73, 0x18, 0x6b, 0x62, - 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, 0x00, 0xff, 0xa1, 0x86, 0x00, 0x02, - 0x05, 0x18, 0xa1, 0x86, 0x00, 0x28, 0x11, 0x28, 0x08, 0x0c, 0x9e, 0xf2, - 0x68, 0x4b, 0x00, 0x1c, 0x00, 0xe8, 0xd6, 0xdc, 0x01, 0xa0, 0x68, 0x4b, - 0x00, 0x15, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x70, 0x69, 0x14, 0x6a, 0x10, - 0x21, 0x00, 0xa2, 0x05, 0x01, 0x48, 0x70, 0x18, 0xa1, 0x06, 0x11, 0x18, - 0x70, 0x1c, 0xa2, 0x06, 0x01, 0x18, 0x69, 0x62, 0x6a, 0x5e, 0xc6, 0xdc, - 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x07, 0x00, 0x10, - 0x68, 0x4b, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, 0x6e, 0x46, 0xa0, 0x1e, - 0xd6, 0xc4, 0x01, 0xf0, 0xa6, 0x86, 0x01, 0x00, 0x11, 0x40, 0x20, 0x01, - 0xbc, 0x99, 0x20, 0x04, 0xa0, 0x05, 0x11, 0x18, 0xc6, 0xc4, 0x08, 0x04, - 0x92, 0xad, 0x73, 0x28, 0x73, 0x2c, 0x6b, 0x56, 0x83, 0xff, 0x01, 0x70, - 0xa3, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, 0x00, 0x08, 0x00, 0x36, - 0x23, 0x08, 0x20, 0x19, 0xbc, 0x98, 0xad, 0x90, 0x00, 0x19, 0x08, 0x0c, - 0x99, 0xc9, 0x00, 0x3e, 0xd6, 0xcc, 0x09, 0x04, 0x93, 0x75, 0x71, 0x24, - 0x69, 0x5a, 0x81, 0xff, 0x09, 0x04, 0x93, 0x75, 0xa1, 0x92, 0x00, 0x21, - 0x12, 0x60, 0x20, 0x71, 0xbc, 0x98, 0x83, 0x1c, 0x23, 0x00, 0xae, 0x18, - 0xad, 0x90, 0x00, 0x1d, 0x08, 0x0c, 0x99, 0xc9, 0x08, 0x0c, 0xa1, 0xf3, - 0x04, 0xd0, 0x68, 0x38, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, - 0x69, 0x5a, 0x0c, 0x68, 0x00, 0xf6, 0x2d, 0x78, 0x08, 0x0c, 0x99, 0x6e, - 0x00, 0xfe, 0x08, 0x0c, 0xa1, 0xf3, 0x08, 0x0c, 0x99, 0xb9, 0x04, 0x58, - 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, 0x00, 0xfe, 0x01, 0x90, - 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x78, 0x60, 0x20, 0xd0, 0xdc, 0x11, 0x60, - 0x68, 0x50, 0xd0, 0xbc, 0x11, 0x48, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x05, - 0x01, 0x28, 0x08, 0x0c, 0x9f, 0xf1, 0x00, 0xde, 0x00, 0xee, 0x04, 0x08, - 0x68, 0x4b, 0x00, 0x00, 0x68, 0x37, 0x01, 0x03, 0x6e, 0x46, 0x08, 0x0c, - 0x95, 0x23, 0x11, 0x48, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x30, 0x68, 0x10, - 0x69, 0x14, 0xa1, 0x15, 0x01, 0x10, 0x08, 0x0c, 0x95, 0x3f, 0x08, 0x0c, - 0x54, 0x7a, 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, 0x01, 0x10, - 0x82, 0x11, 0x6a, 0x3e, 0x08, 0x0c, 0x9f, 0xbf, 0x00, 0xde, 0x00, 0xee, - 0x11, 0x10, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x00, 0xf6, 0x60, 0x03, - 0x00, 0x03, 0x20, 0x79, 0xbc, 0x8c, 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, - 0x7d, 0x08, 0x60, 0x10, 0x20, 0x78, 0x78, 0x4c, 0xd0, 0xac, 0x01, 0x38, - 0x60, 0x03, 0x00, 0x02, 0x00, 0xfe, 0x00, 0x05, 0x21, 0x30, 0x22, 0x28, - 0x00, 0x58, 0x24, 0x00, 0x79, 0x7c, 0xa1, 0x0a, 0x23, 0x00, 0x7a, 0x80, - 0xa2, 0x13, 0x26, 0x00, 0xa1, 0x02, 0x25, 0x00, 0xa2, 0x03, 0x0e, 0x90, - 0x7c, 0x12, 0x7b, 0x16, 0x7e, 0x0a, 0x7d, 0x0e, 0x00, 0xfe, 0x60, 0x3f, - 0x00, 0x00, 0x2c, 0x10, 0x08, 0x0c, 0x1f, 0xc5, 0x08, 0x0c, 0x6d, 0x62, - 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, - 0x60, 0x3e, 0x60, 0x03, 0x00, 0x04, 0x61, 0x10, 0x20, 0xe1, 0x00, 0x05, - 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, 0x00, 0x05, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0x93, 0xda, 0x93, 0xda, 0x93, 0xda, - 0x93, 0xda, 0x93, 0xda, 0x93, 0xdc, 0x94, 0x6f, 0x93, 0xda, 0x93, 0xda, - 0x94, 0x85, 0x94, 0xeb, 0x93, 0xda, 0x93, 0xda, 0x93, 0xda, 0x93, 0xda, - 0x95, 0x09, 0x93, 0xda, 0x93, 0xda, 0x93, 0xda, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0x76, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x20, 0x71, 0xbc, 0x8c, - 0x61, 0x10, 0x21, 0x78, 0x76, 0x14, 0xa6, 0xb4, 0x0f, 0xff, 0x7e, 0x46, - 0x7f, 0x4c, 0xc7, 0xe5, 0x7f, 0x4e, 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, - 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, 0x6a, 0x3e, 0x86, 0xff, 0x09, 0x04, - 0x94, 0x6a, 0xa6, 0x94, 0xff, 0x00, 0xa2, 0x84, 0x0c, 0x00, 0x01, 0x20, - 0x70, 0x18, 0x78, 0x62, 0x70, 0x1c, 0x78, 0x5e, 0xa2, 0x84, 0x03, 0x00, - 0x09, 0x04, 0x94, 0x6a, 0x08, 0x0c, 0x15, 0xfd, 0x09, 0x0c, 0x15, 0x1a, - 0x2d, 0x00, 0x78, 0x4a, 0x7f, 0x4c, 0xc7, 0xcd, 0x7f, 0x4e, 0x68, 0x37, - 0x01, 0x03, 0x78, 0x38, 0x68, 0x3a, 0x78, 0x3c, 0x68, 0x3e, 0x78, 0x40, - 0x68, 0x42, 0x6e, 0x46, 0xa6, 0x8c, 0x0c, 0x00, 0x01, 0x20, 0x73, 0x18, - 0x6b, 0x62, 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, 0x00, 0xff, 0xa1, 0x86, - 0x00, 0x02, 0x01, 0x80, 0xa1, 0x86, 0x00, 0x28, 0x11, 0x18, 0x68, 0x4b, - 0x00, 0x1c, 0x00, 0x60, 0xd6, 0xdc, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x15, - 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x07, 0x00, 0x10, - 0x68, 0x4b, 0x00, 0x00, 0x6f, 0x4e, 0x78, 0x50, 0x68, 0x52, 0x78, 0x54, - 0x68, 0x56, 0xa0, 0x1e, 0xd6, 0xc4, 0x01, 0x98, 0x73, 0x28, 0x73, 0x2c, - 0x6b, 0x56, 0x83, 0xff, 0x01, 0x70, 0xa3, 0x8a, 0x00, 0x09, 0x02, 0x10, - 0x20, 0x19, 0x00, 0x08, 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, 0xbc, 0x98, - 0xad, 0x90, 0x00, 0x19, 0x08, 0x0c, 0x99, 0xc9, 0x00, 0x3e, 0xd6, 0xcc, - 0x01, 0xd8, 0x71, 0x24, 0x69, 0x5a, 0x81, 0xff, 0x01, 0xb8, 0xa1, 0x92, - 0x00, 0x21, 0x12, 0x50, 0x20, 0x71, 0xbc, 0x98, 0x83, 0x1c, 0x23, 0x00, - 0xae, 0x18, 0xad, 0x90, 0x00, 0x1d, 0x08, 0x0c, 0x99, 0xc9, 0x00, 0x50, - 0x78, 0x38, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, 0x69, 0x5a, - 0x0c, 0x78, 0x2d, 0x78, 0x08, 0x0c, 0x99, 0x6e, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x7e, 0x00, 0x05, 0x00, 0xf6, 0x60, 0x03, 0x00, 0x03, - 0x20, 0x79, 0xbc, 0x8c, 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, 0x7d, 0x08, - 0x60, 0x10, 0x20, 0x78, 0x7c, 0x12, 0x7b, 0x16, 0x7e, 0x0a, 0x7d, 0x0e, - 0x00, 0xfe, 0x2c, 0x10, 0x08, 0x0c, 0x1f, 0xc5, 0x08, 0x0c, 0x7d, 0xd9, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, - 0x00, 0xfe, 0x01, 0x20, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, - 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, 0x72, 0xa2, - 0x61, 0x10, 0x21, 0x68, 0x69, 0x4c, 0xd1, 0xe4, 0x09, 0x04, 0x94, 0xe9, - 0xd1, 0xcc, 0x05, 0x40, 0x69, 0x48, 0x68, 0x38, 0xd0, 0xfc, 0x01, 0xe8, - 0x00, 0x16, 0x68, 0x4c, 0x00, 0x06, 0x68, 0x50, 0x00, 0x06, 0xad, 0x90, - 0x00, 0x0d, 0xa1, 0x98, 0x00, 0x0d, 0x20, 0x09, 0x00, 0x20, 0x01, 0x56, - 0x21, 0xa8, 0x23, 0x04, 0x20, 0x12, 0x83, 0x18, 0x82, 0x10, 0x1f, 0x04, - 0x94, 0xaf, 0x01, 0x5e, 0x00, 0x0e, 0x68, 0x52, 0x00, 0x0e, 0x68, 0x4e, - 0x00, 0x1e, 0x21, 0x68, 0x08, 0x0c, 0x16, 0x24, 0x04, 0x28, 0x00, 0x16, - 0x08, 0x0c, 0x16, 0x24, 0x00, 0xde, 0x08, 0x0c, 0x99, 0xb9, 0x00, 0xf0, - 0x68, 0x37, 0x01, 0x03, 0x69, 0x44, 0xa1, 0x84, 0x00, 0xff, 0xa0, 0xb6, - 0x00, 0x02, 0x01, 0x80, 0xa0, 0x86, 0x00, 0x28, 0x11, 0x18, 0x68, 0x4b, - 0x00, 0x1c, 0x00, 0x70, 0xd1, 0xdc, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x15, - 0x00, 0x48, 0xd1, 0xd4, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x07, 0x00, 0x20, - 0x68, 0x4b, 0x00, 0x00, 0x08, 0x0c, 0x95, 0x23, 0x08, 0x0c, 0x54, 0x7a, - 0x08, 0x0c, 0x9f, 0xbf, 0x11, 0x10, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xde, - 0x00, 0x05, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0x80, 0x6b, 0x60, 0x03, - 0x00, 0x02, 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, - 0x01, 0x40, 0x68, 0x08, 0x61, 0x2c, 0xa1, 0x0a, 0x61, 0x2e, 0x68, 0x0c, - 0x61, 0x28, 0xa1, 0x0b, 0x61, 0x2a, 0x00, 0xde, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x60, 0x3e, 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, 0x72, 0xa2, - 0x00, 0x05, 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0xd6, - 0x61, 0x10, 0x21, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x50, 0x68, 0x37, - 0x01, 0x03, 0x68, 0x4b, 0x00, 0x29, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, - 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, - 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0x68, 0x4c, 0xd0, 0xb4, 0x01, 0xc0, - 0x60, 0x2c, 0x69, 0x7c, 0xa1, 0x12, 0x60, 0x28, 0x69, 0x80, 0xa1, 0x0b, - 0x21, 0x00, 0xa2, 0x05, 0x01, 0x68, 0x68, 0x4b, 0x00, 0x15, 0xd1, 0xfc, - 0x01, 0x38, 0x68, 0x4b, 0x00, 0x07, 0x82, 0x12, 0x82, 0x10, 0x81, 0x0a, - 0xa1, 0x89, 0x00, 0x00, 0x69, 0x62, 0x6a, 0x5e, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x68, 0x4b, 0x00, 0x15, 0xd1, 0xfc, 0x01, 0x38, 0x68, 0x4b, - 0x00, 0x07, 0x80, 0x02, 0x80, 0x00, 0x81, 0x0a, 0xa1, 0x89, 0x00, 0x00, - 0x69, 0x62, 0x68, 0x5e, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, - 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x65, - 0x95, 0x63, 0x96, 0x20, 0x96, 0x2c, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, - 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, 0x95, 0x63, - 0x95, 0x63, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x76, 0x00, 0xf6, 0x00, 0xe6, - 0x00, 0xd6, 0x20, 0x71, 0xbc, 0x8c, 0x61, 0x10, 0x21, 0x78, 0x76, 0x14, - 0xa6, 0xb4, 0x0f, 0xff, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, - 0x00, 0xfe, 0x01, 0x50, 0xa6, 0x84, 0x00, 0xff, 0x11, 0x38, 0x60, 0x20, - 0xd0, 0xf4, 0x01, 0x20, 0x08, 0x0c, 0x9f, 0xf1, 0x08, 0x04, 0x96, 0x1b, - 0x7e, 0x46, 0x7f, 0x4c, 0xc7, 0xe5, 0x7f, 0x4e, 0x62, 0x18, 0x22, 0x68, - 0x6a, 0x3c, 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, 0x6a, 0x3e, 0x86, 0xff, - 0x09, 0x04, 0x96, 0x11, 0xa6, 0x94, 0xff, 0x00, 0xa2, 0x84, 0x0c, 0x00, - 0x01, 0x20, 0x70, 0x18, 0x78, 0x62, 0x70, 0x1c, 0x78, 0x5e, 0xa2, 0x84, - 0x03, 0x00, 0x09, 0x04, 0x96, 0x0f, 0xa6, 0x86, 0x01, 0x00, 0x11, 0x40, - 0x20, 0x01, 0xbc, 0x99, 0x20, 0x04, 0xa0, 0x05, 0x11, 0x18, 0xc6, 0xc4, - 0x7e, 0x46, 0x0c, 0x28, 0x08, 0x0c, 0x15, 0xfd, 0x09, 0x0c, 0x15, 0x1a, - 0x2d, 0x00, 0x78, 0x4a, 0x7f, 0x4c, 0xa7, 0xbd, 0x02, 0x00, 0x7f, 0x4e, - 0x68, 0x37, 0x01, 0x03, 0x78, 0x38, 0x68, 0x3a, 0x78, 0x3c, 0x68, 0x3e, - 0x78, 0x40, 0x68, 0x42, 0x6e, 0x46, 0xa6, 0x8c, 0x0c, 0x00, 0x01, 0x20, - 0x73, 0x18, 0x6b, 0x62, 0x73, 0x1c, 0x6b, 0x5e, 0xa6, 0x8c, 0x00, 0xff, - 0xa1, 0x86, 0x00, 0x02, 0x01, 0x80, 0xa1, 0x86, 0x00, 0x28, 0x11, 0x18, - 0x68, 0x4b, 0x00, 0x1c, 0x00, 0x60, 0xd6, 0xdc, 0x01, 0x18, 0x68, 0x4b, - 0x00, 0x15, 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x07, - 0x00, 0x10, 0x68, 0x4b, 0x00, 0x00, 0x6f, 0x4e, 0x78, 0x50, 0x68, 0x52, - 0x78, 0x54, 0x68, 0x56, 0xa0, 0x1e, 0xd6, 0xc4, 0x01, 0x98, 0x73, 0x28, - 0x73, 0x2c, 0x6b, 0x56, 0x83, 0xff, 0x01, 0x70, 0xa3, 0x8a, 0x00, 0x09, - 0x02, 0x10, 0x20, 0x19, 0x00, 0x08, 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, - 0xbc, 0x98, 0xad, 0x90, 0x00, 0x19, 0x08, 0x0c, 0x99, 0xc9, 0x00, 0x3e, - 0xd6, 0xcc, 0x01, 0xd8, 0x71, 0x24, 0x69, 0x5a, 0x81, 0xff, 0x01, 0xb8, - 0xa1, 0x92, 0x00, 0x21, 0x12, 0x50, 0x20, 0x71, 0xbc, 0x98, 0x83, 0x1c, - 0x23, 0x00, 0xae, 0x18, 0xad, 0x90, 0x00, 0x1d, 0x08, 0x0c, 0x99, 0xc9, - 0x00, 0x50, 0x78, 0x38, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, - 0x69, 0x5a, 0x0c, 0x78, 0x2d, 0x78, 0x08, 0x0c, 0x99, 0x6e, 0xd6, 0xdc, - 0x11, 0x10, 0xa0, 0x06, 0x00, 0x30, 0x20, 0x01, 0x00, 0x01, 0x20, 0x71, - 0xbc, 0x8c, 0x72, 0x18, 0x73, 0x1c, 0x08, 0x0c, 0x18, 0xb6, 0x00, 0xde, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x7e, 0x00, 0x05, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x60, 0x3e, 0x20, 0xe1, 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, - 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, 0x00, 0x05, 0x20, 0x01, 0xb8, 0xb8, - 0x20, 0x04, 0x60, 0x3e, 0x00, 0xd6, 0x60, 0x03, 0x00, 0x02, 0x61, 0x10, - 0x21, 0x68, 0x69, 0x4c, 0xd1, 0xe4, 0x09, 0x04, 0x97, 0x37, 0x60, 0x3f, - 0x00, 0x00, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, 0x00, 0xfe, - 0x05, 0x60, 0x68, 0x14, 0x69, 0x10, 0xa1, 0x15, 0x05, 0x40, 0x6a, 0x60, - 0xa2, 0x06, 0x11, 0x18, 0x68, 0x5c, 0xa1, 0x06, 0x05, 0x10, 0x68, 0x4c, - 0xc0, 0xe4, 0x68, 0x4e, 0x68, 0x47, 0x00, 0x00, 0x68, 0x63, 0x00, 0x00, - 0x68, 0x5f, 0x00, 0x00, 0x60, 0x20, 0xd0, 0xf4, 0x11, 0x58, 0x69, 0x7c, - 0x68, 0x10, 0xa1, 0x02, 0x60, 0x3a, 0x69, 0x80, 0x68, 0x14, 0xa1, 0x03, - 0x60, 0x36, 0x60, 0x20, 0xc0, 0xf5, 0x60, 0x22, 0x00, 0xd6, 0x60, 0x18, - 0x20, 0x68, 0x68, 0x3c, 0x80, 0x00, 0x68, 0x3e, 0x00, 0xde, 0x08, 0x0c, - 0x9f, 0xf1, 0x08, 0x04, 0x97, 0x37, 0x69, 0x4c, 0xd1, 0xcc, 0x09, 0x04, - 0x97, 0x07, 0x69, 0x48, 0x68, 0x38, 0xd0, 0xfc, 0x09, 0x04, 0x96, 0xca, - 0x00, 0x16, 0x68, 0x4c, 0x00, 0x06, 0x68, 0x50, 0x00, 0x06, 0x00, 0xf6, - 0x21, 0x78, 0x79, 0x44, 0xa1, 0x84, 0x00, 0xff, 0xa0, 0xb6, 0x00, 0x02, - 0x01, 0xe0, 0xa0, 0x86, 0x00, 0x28, 0x11, 0x28, 0x68, 0x4b, 0x00, 0x1c, - 0x78, 0x4b, 0x00, 0x1c, 0x00, 0xe8, 0xd1, 0xdc, 0x01, 0x58, 0x68, 0x4b, - 0x00, 0x15, 0x78, 0x4b, 0x00, 0x15, 0x08, 0x0c, 0xa1, 0x7b, 0x01, 0x18, - 0x79, 0x44, 0xc1, 0xdc, 0x79, 0x46, 0x00, 0x80, 0xd1, 0xd4, 0x01, 0x28, - 0x68, 0x4b, 0x00, 0x07, 0x78, 0x4b, 0x00, 0x07, 0x00, 0x48, 0x68, 0x4c, - 0xd0, 0xac, 0x01, 0x30, 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, 0x01, 0x10, - 0x08, 0x0c, 0x95, 0x3f, 0x68, 0x48, 0x78, 0x4a, 0x68, 0x60, 0x78, 0x62, - 0x68, 0x5c, 0x78, 0x5e, 0xad, 0x90, 0x00, 0x0d, 0xaf, 0x98, 0x00, 0x0d, - 0x20, 0x09, 0x00, 0x20, 0x01, 0x56, 0x21, 0xa8, 0x23, 0x04, 0x20, 0x12, - 0x83, 0x18, 0x82, 0x10, 0x1f, 0x04, 0x96, 0xb6, 0x01, 0x5e, 0x00, 0xfe, - 0x00, 0x0e, 0x68, 0x52, 0x00, 0x0e, 0x68, 0x4e, 0x08, 0x0c, 0xa1, 0xf3, - 0x00, 0x1e, 0x21, 0x68, 0x08, 0x0c, 0x16, 0x24, 0x08, 0x04, 0x97, 0x32, - 0x00, 0x16, 0x00, 0xf6, 0x21, 0x78, 0x79, 0x44, 0xa1, 0x84, 0x00, 0xff, - 0xa0, 0xb6, 0x00, 0x02, 0x01, 0xe0, 0xa0, 0x86, 0x00, 0x28, 0x11, 0x28, - 0x68, 0x4b, 0x00, 0x1c, 0x78, 0x4b, 0x00, 0x1c, 0x00, 0xe8, 0xd1, 0xdc, - 0x01, 0x58, 0x68, 0x4b, 0x00, 0x15, 0x78, 0x4b, 0x00, 0x15, 0x08, 0x0c, - 0xa1, 0x7b, 0x01, 0x18, 0x79, 0x44, 0xc1, 0xdc, 0x79, 0x46, 0x00, 0x80, - 0xd1, 0xd4, 0x01, 0x28, 0x68, 0x4b, 0x00, 0x07, 0x78, 0x4b, 0x00, 0x07, - 0x00, 0x48, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x30, 0x68, 0x10, 0x69, 0x14, - 0xa1, 0x15, 0x01, 0x10, 0x08, 0x0c, 0x95, 0x3f, 0x68, 0x60, 0x78, 0x62, - 0x68, 0x5c, 0x78, 0x5e, 0x68, 0x4c, 0x78, 0x4e, 0x00, 0xfe, 0x08, 0x0c, - 0x16, 0x24, 0x00, 0xde, 0x08, 0x0c, 0xa1, 0xf3, 0x08, 0x0c, 0x99, 0xb9, - 0x04, 0x58, 0x68, 0x37, 0x01, 0x03, 0x69, 0x44, 0xa1, 0x84, 0x00, 0xff, - 0xa0, 0xb6, 0x00, 0x02, 0x01, 0xb0, 0xa0, 0x86, 0x00, 0x28, 0x11, 0x18, - 0x68, 0x4b, 0x00, 0x1c, 0x00, 0xd8, 0xd1, 0xdc, 0x01, 0x48, 0x68, 0x4b, - 0x00, 0x15, 0x08, 0x0c, 0xa1, 0x7b, 0x01, 0x18, 0x69, 0x44, 0xc1, 0xdc, - 0x69, 0x46, 0x00, 0x80, 0xd1, 0xd4, 0x01, 0x18, 0x68, 0x4b, 0x00, 0x07, - 0x00, 0x58, 0x68, 0x4b, 0x00, 0x00, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x30, - 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, 0x01, 0x10, 0x08, 0x0c, 0x95, 0x3f, - 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9f, 0xbf, 0x11, 0x10, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x00, 0x10, - 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0xc0, 0x00, 0xd6, - 0x61, 0x10, 0x21, 0x68, 0x68, 0x37, 0x01, 0x03, 0x20, 0x09, 0xb6, 0x0c, - 0x21, 0x0c, 0xd1, 0x8c, 0x11, 0xc0, 0xd1, 0x84, 0x11, 0x98, 0x61, 0x08, - 0x69, 0x4a, 0xa1, 0x8e, 0x00, 0x29, 0x11, 0x10, 0x08, 0x0c, 0xb4, 0x3c, - 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0xde, 0x08, 0x0c, - 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, - 0x68, 0x4b, 0x00, 0x04, 0x0c, 0x88, 0x68, 0x4b, 0x00, 0x04, 0x0c, 0x70, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, - 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7e, 0x97, 0x7c, 0x97, 0x81, 0x97, 0x7c, - 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, - 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, 0x97, 0x7c, 0x08, 0x0c, 0x15, 0x1a, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x00, 0x06, 0x00, 0x26, 0xa0, 0x16, - 0x08, 0x0c, 0x18, 0x63, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0x05, 0xa1, 0x82, - 0x00, 0x85, 0x00, 0x02, 0x97, 0x95, 0x97, 0x93, 0x97, 0x93, 0x97, 0xa1, - 0x97, 0x93, 0x97, 0x93, 0x97, 0x93, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0x56, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x71, 0xbc, 0x80, 0x72, 0x24, - 0x62, 0x12, 0x72, 0x20, 0x08, 0x0c, 0x9d, 0x06, 0x01, 0xa0, 0x22, 0x68, - 0x68, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x01, 0x78, 0x60, 0x18, 0x6d, 0x18, - 0xa5, 0x2e, 0x11, 0x58, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0x99, 0xd9, - 0x00, 0xce, 0x01, 0x28, 0x68, 0x03, 0x00, 0x02, 0x60, 0x07, 0x00, 0x86, - 0x00, 0x10, 0x60, 0x07, 0x00, 0x87, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xf6, 0x22, 0x78, 0x08, 0x0c, - 0x53, 0x77, 0x00, 0xfe, 0x01, 0x50, 0x68, 0x20, 0xd0, 0xec, 0x01, 0x38, - 0x00, 0xc6, 0x22, 0x60, 0x60, 0x3f, 0x00, 0x00, 0x08, 0x0c, 0x9f, 0xf1, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xde, 0x00, 0x5e, 0x00, 0x2e, 0x00, 0x05, - 0xa1, 0x86, 0x00, 0x13, 0x11, 0x60, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x85, - 0x0a, 0x0c, 0x15, 0x1a, 0xa0, 0x8a, 0x00, 0x8c, 0x1a, 0x0c, 0x15, 0x1a, - 0xa0, 0x82, 0x00, 0x85, 0x00, 0x72, 0xa1, 0x86, 0x00, 0x27, 0x01, 0x20, - 0xa1, 0x86, 0x00, 0x14, 0x19, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, - 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x98, 0x02, - 0x98, 0x04, 0x98, 0x04, 0x98, 0x02, 0x98, 0x02, 0x98, 0x02, 0x98, 0x02, - 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, 0x11, 0x28, - 0x60, 0x04, 0xa0, 0x82, 0x00, 0x85, 0x20, 0x08, 0x04, 0xa8, 0xa1, 0x86, - 0x00, 0x27, 0x11, 0xe8, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x2c, 0xd1, - 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x50, - 0x68, 0x37, 0x01, 0x03, 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, 0x00, 0x29, - 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, 0x00, 0xde, 0x08, 0x0c, - 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, 0x86, 0xef, - 0x0c, 0xe0, 0xa1, 0x86, 0x00, 0x14, 0x1d, 0xd0, 0x08, 0x0c, 0x71, 0x02, - 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x0d, 0x60, - 0x68, 0x37, 0x01, 0x03, 0x68, 0x47, 0x00, 0x00, 0x68, 0x4b, 0x00, 0x06, - 0x68, 0x50, 0xc0, 0xec, 0x68, 0x52, 0x08, 0xf0, 0x00, 0x02, 0x98, 0x52, - 0x98, 0x50, 0x98, 0x50, 0x98, 0x50, 0x98, 0x50, 0x98, 0x50, 0x98, 0x6a, - 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x30, 0xa0, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x01, 0x18, 0xa1, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x20, 0x01, 0xb8, 0xb6, 0x00, 0x10, 0x20, 0x01, - 0xb8, 0xb7, 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x0c, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x30, 0xa0, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x01, 0x18, 0xa1, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x20, 0x01, 0xb8, 0xb6, 0x00, 0x10, 0x20, 0x01, - 0xb8, 0xb7, 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x0e, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x8c, 0x12, 0x20, 0xa1, 0x82, - 0x00, 0x85, 0x02, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0x86, 0xef, 0x00, 0x05, - 0x98, 0x93, 0x98, 0x93, 0x98, 0x93, 0x98, 0x93, 0x98, 0x95, 0x98, 0xee, - 0x98, 0x93, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x00, 0xf6, 0x2c, 0x78, - 0x08, 0x0c, 0x53, 0x77, 0x00, 0xfe, 0x01, 0x68, 0x60, 0x30, 0xa0, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, 0x01, 0x18, 0xa1, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x00, 0xde, 0x08, 0x04, 0x99, 0x01, 0x08, 0x0c, - 0x9d, 0x16, 0x11, 0x18, 0x08, 0x0c, 0x9e, 0xcd, 0x00, 0xf0, 0x60, 0x10, - 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xe4, 0x11, 0x10, 0x08, 0x0c, 0x9e, 0xcd, - 0x68, 0x37, 0x01, 0x03, 0x68, 0x50, 0xd0, 0xb4, 0x01, 0x28, 0x68, 0x4b, - 0x00, 0x06, 0xc0, 0xec, 0x68, 0x52, 0x00, 0x48, 0xd0, 0xbc, 0x01, 0x18, - 0x68, 0x4b, 0x00, 0x02, 0x00, 0x20, 0x68, 0x4b, 0x00, 0x05, 0x08, 0x0c, - 0x9f, 0x8e, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x2c, 0x68, - 0x08, 0x0c, 0x86, 0x4e, 0x01, 0xc0, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x1e, 0x60, 0x0b, 0xff, 0xff, 0x20, 0x09, 0xbc, 0x8e, 0x21, 0x0c, - 0x61, 0x36, 0x20, 0x09, 0xbc, 0x8f, 0x21, 0x0c, 0x61, 0x3a, 0x69, 0x18, - 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x69, 0x50, 0x61, 0x52, 0x60, 0x1f, - 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x2d, 0x60, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, - 0x00, 0xfe, 0x05, 0x98, 0x60, 0x30, 0xa0, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0xa1, 0x86, 0x00, 0x35, 0x01, 0x30, 0xa1, 0x86, 0x00, 0x1e, 0x01, 0x18, - 0xa1, 0x86, 0x00, 0x39, 0x15, 0x30, 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, - 0xa1, 0xc6, 0x19, 0x04, 0x99, 0x46, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0xd8, - 0x61, 0x06, 0x60, 0x03, 0x00, 0x01, 0x60, 0x1f, 0x00, 0x01, 0x69, 0x18, - 0x61, 0x1a, 0x69, 0x28, 0x61, 0x2a, 0x69, 0x2c, 0x61, 0x2e, 0x69, 0x30, - 0xa1, 0x8c, 0x00, 0xff, 0x61, 0x32, 0x69, 0x34, 0x61, 0x36, 0x69, 0x38, - 0x61, 0x3a, 0x69, 0x50, 0x61, 0x52, 0x08, 0x0c, 0xa0, 0xe3, 0x08, 0x0c, - 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x2d, 0x60, 0x00, 0xf8, 0x00, 0xd6, - 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0xc8, 0x68, 0x37, - 0x01, 0x03, 0x68, 0x50, 0xd0, 0xb4, 0x01, 0x28, 0xc0, 0xec, 0x68, 0x52, - 0x68, 0x4b, 0x00, 0x06, 0x00, 0x48, 0xd0, 0xbc, 0x01, 0x18, 0x68, 0x4b, - 0x00, 0x02, 0x00, 0x20, 0x68, 0x4b, 0x00, 0x05, 0x08, 0x0c, 0x9f, 0x8e, - 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x9e, 0xcd, - 0x00, 0xde, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x00, 0x16, 0x00, 0xd6, - 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x40, 0x68, 0x37, - 0x01, 0x03, 0x68, 0x4b, 0x00, 0x28, 0x68, 0x47, 0x00, 0x00, 0x08, 0x0c, - 0x54, 0x7a, 0x00, 0xde, 0x00, 0x1e, 0xa1, 0x86, 0x00, 0x13, 0x01, 0x48, - 0xa1, 0x86, 0x00, 0x14, 0x01, 0x30, 0xa1, 0x86, 0x00, 0x27, 0x01, 0x18, - 0x08, 0x0c, 0x86, 0xef, 0x00, 0x30, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0x9e, 0xd9, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x00, 0x56, 0x00, 0x66, - 0x00, 0xd6, 0x00, 0xf6, 0x20, 0x29, 0x00, 0x01, 0xa1, 0x82, 0x01, 0x01, - 0x12, 0x08, 0x00, 0x10, 0x20, 0x09, 0x01, 0x00, 0x21, 0x30, 0x20, 0x69, - 0xbc, 0x98, 0x83, 0x1c, 0x23, 0x00, 0xad, 0x18, 0x20, 0x09, 0x00, 0x20, - 0xaf, 0x90, 0x00, 0x1d, 0x08, 0x0c, 0x99, 0xc9, 0xa6, 0xb2, 0x00, 0x20, - 0x78, 0x04, 0xa0, 0x6d, 0x01, 0x10, 0x08, 0x0c, 0x16, 0x24, 0x08, 0x0c, - 0x15, 0xfd, 0x05, 0x00, 0x85, 0x28, 0x68, 0x37, 0x01, 0x10, 0x68, 0x3b, - 0x00, 0x00, 0x2d, 0x20, 0x7c, 0x06, 0xa6, 0x8a, 0x00, 0x3d, 0x12, 0x28, - 0x26, 0x08, 0xad, 0x90, 0x00, 0x0f, 0x04, 0x59, 0x00, 0x88, 0xa6, 0xb2, - 0x00, 0x3c, 0x20, 0x09, 0x00, 0x3c, 0x2d, 0x78, 0xad, 0x90, 0x00, 0x0f, - 0x04, 0x11, 0x0c, 0x28, 0x00, 0xfe, 0x85, 0x2f, 0xa5, 0xad, 0x00, 0x03, - 0x7d, 0x36, 0xa5, 0xac, 0x00, 0x00, 0x00, 0x28, 0x00, 0xfe, 0x85, 0x2f, - 0xa5, 0xad, 0x00, 0x03, 0x7d, 0x36, 0x00, 0xde, 0x00, 0x6e, 0x00, 0x5e, - 0x00, 0x05, 0x00, 0xf6, 0x8d, 0xff, 0x01, 0x58, 0x68, 0x04, 0xa0, 0x7d, - 0x01, 0x30, 0x68, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x54, 0x7a, 0x2f, 0x68, - 0x0c, 0xb8, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0xfe, 0x00, 0x05, 0x01, 0x56, - 0xa1, 0x84, 0x00, 0x01, 0x01, 0x08, 0x81, 0x08, 0x81, 0x0c, 0x21, 0xa8, - 0x23, 0x04, 0x80, 0x07, 0x20, 0x12, 0x83, 0x18, 0x82, 0x10, 0x1f, 0x04, - 0x99, 0xd0, 0x01, 0x5e, 0x00, 0x05, 0x00, 0x66, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x31, 0x00, 0x01, 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, - 0x00, 0x83, 0x01, 0x2e, 0x00, 0x6e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x66, 0x20, 0x31, 0x00, 0x00, 0x60, 0x1c, 0xa0, 0x84, - 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x6e, 0x01, 0x2e, 0x00, 0x05, 0x9a, 0x10, - 0x9a, 0x10, 0x9a, 0x0b, 0x9a, 0x32, 0x99, 0xfe, 0x9a, 0x0b, 0x9a, 0x32, - 0x9a, 0x0b, 0x9a, 0x0b, 0x99, 0xfe, 0x9a, 0x0b, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x10, 0x08, 0x0c, 0xad, 0x9c, 0x60, 0x1f, - 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x00, 0x3e, 0x00, 0x05, 0xa0, 0x06, - 0x00, 0x05, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xd6, 0x86, 0xff, - 0x11, 0xd8, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0xc0, - 0x68, 0x34, 0xa0, 0x86, 0x01, 0x39, 0x11, 0x28, 0x68, 0x4b, 0x00, 0x05, - 0x68, 0x53, 0x00, 0x00, 0x00, 0x28, 0xa0, 0x0e, 0x20, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x55, 0x4d, 0x08, 0x0c, 0x9f, 0x8e, 0x08, 0x0c, 0x54, 0x7a, - 0x08, 0x0c, 0x86, 0xa4, 0xa0, 0x85, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, - 0xa0, 0x06, 0x0c, 0xe0, 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, 0x1a, 0x0c, - 0x15, 0x1a, 0x00, 0x0b, 0x00, 0x05, 0x9a, 0x49, 0x9a, 0x6a, 0x9a, 0x4b, - 0x9a, 0x89, 0x9a, 0x67, 0x9a, 0x49, 0x9a, 0x0b, 0x9a, 0x10, 0x9a, 0x10, - 0x9a, 0x0b, 0x9a, 0x0b, 0x9a, 0x0b, 0x9a, 0x0b, 0x9a, 0x0b, 0x9a, 0x0b, - 0x9a, 0x0b, 0x08, 0x0c, 0x15, 0x1a, 0x86, 0xff, 0x11, 0xb8, 0x60, 0x1c, - 0xa0, 0x86, 0x00, 0x06, 0x01, 0x98, 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, - 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x10, 0x08, 0x0c, 0x9f, 0x8e, 0x00, 0xde, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, - 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x08, 0x0c, 0x19, 0x52, 0x0c, 0x08, 0x00, 0xe6, 0x20, 0x71, - 0xb8, 0xe1, 0x70, 0x24, 0xac, 0x06, 0x11, 0x10, 0x08, 0x0c, 0x7f, 0xe0, - 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0xa0, 0x86, 0x00, 0x06, 0x11, 0x50, - 0x00, 0x86, 0x00, 0x96, 0x20, 0x49, 0x00, 0x01, 0x2c, 0x40, 0x08, 0x0c, - 0x81, 0xb7, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x10, 0x08, 0x0c, 0x7e, 0xd1, - 0x00, 0xee, 0x19, 0x28, 0x08, 0x0c, 0x9a, 0x0b, 0x00, 0x05, 0x00, 0x36, - 0x00, 0xe6, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x3c, 0xac, 0x06, 0x11, 0x40, - 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, 0x80, 0x6b, 0x00, 0xee, 0x00, 0x3e, - 0x08, 0x04, 0x9a, 0x4b, 0x08, 0x0c, 0x82, 0xe4, 0x00, 0xee, 0x00, 0x3e, - 0x19, 0x04, 0x9a, 0x4b, 0x08, 0x0c, 0x9a, 0x0b, 0x00, 0x05, 0x00, 0xc6, - 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x13, 0x00, 0xce, 0x00, 0x05, - 0x9a, 0xba, 0x9b, 0x27, 0x9c, 0x75, 0x9a, 0xc5, 0x9e, 0xd9, 0x9a, 0xba, - 0xad, 0x8e, 0xa2, 0x0a, 0x9b, 0x27, 0x9a, 0xb3, 0x9c, 0xe0, 0x08, 0x0c, - 0x15, 0x1a, 0x08, 0x0c, 0x9f, 0x14, 0x11, 0x10, 0x08, 0x0c, 0x8c, 0xa5, - 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0x05, 0x60, 0x17, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x9d, 0x16, 0x01, 0x20, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x19, 0x2c, 0x02, - 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x0b, - 0x00, 0x05, 0x9a, 0xe3, 0x9a, 0xe5, 0x9b, 0x05, 0x9b, 0x17, 0x9b, 0x24, - 0x9a, 0xe3, 0x9a, 0xba, 0x9a, 0xba, 0x9a, 0xba, 0x9b, 0x17, 0x9b, 0x17, - 0x9a, 0xe3, 0x9a, 0xe3, 0x9a, 0xe3, 0x9a, 0xe3, 0x9b, 0x21, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0xe6, 0x60, 0x10, 0x20, 0x70, 0x70, 0x50, 0xc0, 0xb5, - 0x70, 0x52, 0x20, 0x71, 0xb8, 0xe1, 0x70, 0x24, 0xac, 0x06, 0x01, 0x90, - 0x08, 0x0c, 0x7e, 0xd1, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, - 0x60, 0x1f, 0x00, 0x02, 0x20, 0x01, 0xb8, 0xb7, 0x20, 0x04, 0x60, 0x16, - 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xee, 0x00, 0x05, - 0x60, 0x17, 0x00, 0x01, 0x0c, 0xd8, 0x00, 0xd6, 0x60, 0x10, 0x20, 0x68, - 0x68, 0x50, 0xc0, 0xb5, 0x68, 0x52, 0x00, 0xde, 0x60, 0x07, 0x00, 0x85, - 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x02, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x00, 0xd6, 0x60, 0x17, 0x00, 0x01, - 0x60, 0x10, 0x20, 0x68, 0x68, 0x50, 0xc0, 0xb5, 0x68, 0x52, 0x00, 0xde, - 0x00, 0x05, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x08, 0x0c, 0x19, 0x52, - 0x08, 0xf0, 0x60, 0x00, 0xa0, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, - 0x00, 0x0b, 0x00, 0x05, 0x9b, 0x3e, 0x9a, 0xc2, 0x9b, 0x40, 0x9b, 0x3e, - 0x9b, 0x40, 0x9b, 0x40, 0x9a, 0xbb, 0x9b, 0x3e, 0x9a, 0xb5, 0x9a, 0xb5, - 0x9b, 0x3e, 0x9b, 0x3e, 0x9b, 0x3e, 0x9b, 0x3e, 0x9b, 0x3e, 0x9b, 0x3e, - 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x60, 0x18, 0x20, 0x68, 0x68, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x00, 0xde, 0xa0, 0x8a, 0x00, 0x0c, 0x1a, 0x0c, - 0x15, 0x1a, 0x00, 0x0b, 0x00, 0x05, 0x9b, 0x59, 0x9c, 0x1b, 0x9b, 0x5b, - 0x9b, 0x99, 0x9b, 0x5b, 0x9b, 0x99, 0x9b, 0x5b, 0x9b, 0x69, 0x9b, 0x59, - 0x9b, 0x99, 0x9b, 0x59, 0x9b, 0x85, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x04, - 0xa0, 0x8e, 0x00, 0x16, 0x05, 0xa8, 0xa0, 0x8e, 0x00, 0x04, 0x05, 0x90, - 0xa0, 0x8e, 0x00, 0x02, 0x05, 0x78, 0xa0, 0x8e, 0x00, 0x4b, 0x09, 0x04, - 0x9c, 0x17, 0x60, 0x04, 0x08, 0x0c, 0x9f, 0x14, 0x09, 0x04, 0x9c, 0x34, - 0xa0, 0x8e, 0x00, 0x21, 0x09, 0x04, 0x9c, 0x38, 0xa0, 0x8e, 0x00, 0x22, - 0x09, 0x04, 0x9c, 0x34, 0xa0, 0x8e, 0x00, 0x3d, 0x09, 0x04, 0x9c, 0x38, - 0xa0, 0x8e, 0x00, 0x39, 0x09, 0x04, 0x9c, 0x3c, 0xa0, 0x8e, 0x00, 0x35, - 0x09, 0x04, 0x9c, 0x3c, 0xa0, 0x8e, 0x00, 0x1e, 0x01, 0x88, 0xa0, 0x8e, - 0x00, 0x01, 0x11, 0x50, 0x00, 0xd6, 0x60, 0x18, 0x20, 0x68, 0x68, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x00, 0xde, 0xa0, 0x86, 0x00, 0x06, 0x01, 0x10, - 0x08, 0x0c, 0x2c, 0xd1, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x9e, 0xd9, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x16, - 0x09, 0x04, 0x9c, 0x08, 0xa1, 0x86, 0x00, 0x02, 0x15, 0xd8, 0x20, 0x01, - 0xb6, 0x35, 0x20, 0x04, 0xd0, 0x8c, 0x11, 0x98, 0x08, 0x0c, 0x5b, 0x41, - 0x11, 0x80, 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, - 0xb6, 0x00, 0x20, 0x03, 0x00, 0x01, 0xa0, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x5b, 0x85, 0x08, 0x0c, 0x5a, 0x79, 0x08, 0x04, 0x9c, 0x5e, 0x60, 0x18, - 0x20, 0x68, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xac, 0x19, 0x04, - 0x9c, 0x5e, 0x68, 0xa0, 0xd0, 0xbc, 0x19, 0x04, 0x9c, 0x5e, 0x68, 0x40, - 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, 0x01, 0x90, 0x80, 0x01, 0x68, 0x42, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x07, 0x60, 0x17, 0x03, 0x98, - 0x60, 0x3f, 0x00, 0x00, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0x28, 0x2d, 0x00, - 0x60, 0x1a, 0x60, 0x1f, 0x00, 0x01, 0x04, 0x50, 0x00, 0xde, 0x00, 0xce, - 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x11, 0xa8, 0x60, 0x18, 0xa0, 0x80, - 0x00, 0x28, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x7e, 0x11, 0x70, 0x20, 0x09, - 0xb6, 0x35, 0x21, 0x04, 0xc0, 0x85, 0x20, 0x0a, 0x00, 0xe6, 0x20, 0x71, - 0xb6, 0x00, 0x08, 0x0c, 0x4c, 0x28, 0x00, 0xee, 0x08, 0x0c, 0x8c, 0xa5, - 0x00, 0x20, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x2c, 0xf7, 0x01, 0x2e, - 0x00, 0xee, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0x05, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, - 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xde, 0x00, 0xce, - 0x0c, 0x80, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x04, 0x9b, 0x94, 0x00, 0xc6, - 0x00, 0xd6, 0x61, 0x04, 0xa1, 0x86, 0x00, 0x16, 0x0d, 0x38, 0x60, 0x18, - 0x20, 0x68, 0x68, 0x40, 0xa0, 0x84, 0x00, 0xff, 0xa0, 0x05, 0x09, 0x04, - 0x9b, 0xde, 0x80, 0x01, 0x68, 0x42, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x6d, 0x45, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xde, 0x00, 0xce, 0x08, 0x98, - 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x04, 0x9b, 0x96, 0x08, 0x0c, 0x8c, 0xd3, - 0x08, 0x04, 0x9b, 0x96, 0x00, 0xd6, 0x2c, 0x68, 0x61, 0x04, 0x08, 0x0c, - 0xa1, 0xc6, 0x00, 0xde, 0x01, 0x18, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xb8, - 0x60, 0x04, 0x80, 0x07, 0x61, 0x30, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x05, - 0x60, 0x32, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, - 0x00, 0x02, 0x60, 0x38, 0x60, 0x0a, 0x20, 0x01, 0xb8, 0xb7, 0x20, 0x04, - 0x60, 0x16, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0x00, 0xde, 0x00, 0xce, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x2c, 0xd1, - 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x2c, 0xf7, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x07, 0x60, 0x17, 0x03, 0x98, - 0x60, 0x3f, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x60, 0x00, - 0xa0, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x0b, 0x00, 0x05, - 0x9c, 0x8c, 0x9c, 0x8c, 0x9c, 0x8c, 0x9c, 0x8c, 0x9c, 0x8c, 0x9c, 0x8c, - 0x9c, 0x8c, 0x9c, 0x8c, 0x9c, 0x8c, 0x9a, 0xba, 0x9c, 0x8c, 0x9a, 0xc2, - 0x9c, 0x8e, 0x9a, 0xc2, 0x9c, 0x9b, 0x9c, 0x8c, 0x08, 0x0c, 0x15, 0x1a, - 0x60, 0x04, 0xa0, 0x86, 0x00, 0x8b, 0x01, 0x48, 0x60, 0x07, 0x00, 0x8b, - 0x60, 0x03, 0x00, 0x0d, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0x05, 0x08, 0x0c, 0x9e, 0xcd, 0x08, 0x0c, 0x9d, 0x16, 0x05, 0x80, - 0x08, 0x0c, 0x2c, 0xd1, 0x00, 0xd6, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x68, - 0x60, 0x10, 0x20, 0x68, 0x68, 0x37, 0x01, 0x03, 0x68, 0x4b, 0x00, 0x06, - 0x68, 0x47, 0x00, 0x00, 0x68, 0x50, 0xc0, 0xed, 0x68, 0x52, 0x08, 0x0c, - 0x54, 0x7a, 0x2c, 0x68, 0x08, 0x0c, 0x86, 0x4e, 0x01, 0x50, 0x68, 0x18, - 0x60, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, - 0x9e, 0xd9, 0x00, 0xce, 0x00, 0x08, 0x2d, 0x60, 0x00, 0xde, 0x60, 0x13, - 0x00, 0x00, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x78, - 0x60, 0x30, 0xa0, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x39, - 0x01, 0x18, 0xa1, 0x86, 0x00, 0x35, 0x11, 0x18, 0x08, 0x0c, 0x2c, 0xd1, - 0x08, 0xb0, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0x05, 0x60, 0x00, 0xa0, 0x8a, - 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x0b, 0x00, 0x05, 0x9c, 0xf7, - 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf9, 0x9c, 0xf9, 0x9c, 0xf7, 0x9c, 0xf7, - 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf7, - 0x9c, 0xf7, 0x9c, 0xf7, 0x9c, 0xf7, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0x82, 0xe4, 0x19, 0x0c, 0x15, 0x1a, 0x61, 0x10, 0x21, 0x68, 0x68, 0x4b, - 0x00, 0x06, 0x08, 0x0c, 0x54, 0x7a, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, - 0xa2, 0x84, 0x00, 0x07, 0x11, 0x58, 0xa2, 0x82, 0xbe, 0x00, 0x02, 0x40, - 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, 0xa2, 0x02, 0x12, 0x18, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xe8, 0x00, 0x26, 0x62, 0x10, - 0xa2, 0x94, 0xf0, 0x00, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x36, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, - 0xbe, 0x00, 0x20, 0x71, 0xb6, 0x00, 0x73, 0x48, 0x70, 0x68, 0xa3, 0x02, - 0x12, 0xa8, 0x60, 0x1c, 0xa2, 0x06, 0x11, 0x60, 0x08, 0x0c, 0xa0, 0x6e, - 0x01, 0x48, 0x08, 0x0c, 0x9f, 0x14, 0x11, 0x10, 0x08, 0x0c, 0x8c, 0xa5, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xce, 0xac, 0xe0, 0x00, 0x18, - 0x70, 0x5c, 0xac, 0x02, 0x12, 0x08, 0x0c, 0x38, 0x01, 0x2e, 0x00, 0x0e, - 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x16, 0xa1, 0x88, 0xb7, 0x35, 0x21, 0x0c, 0x81, 0xff, 0x01, 0x28, - 0x20, 0x61, 0xb9, 0xf5, 0x61, 0x1a, 0x08, 0x0c, 0x2c, 0xd1, 0xa0, 0x06, - 0x00, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x1e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0x56, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x5e, 0x01, 0x80, 0x66, 0x12, - 0x65, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x03, 0x20, 0x09, - 0x00, 0x4b, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x5e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd0, 0x00, 0xc6, - 0x00, 0x56, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x62, 0xa0, 0x00, 0xc6, - 0x08, 0x0c, 0x9f, 0x92, 0x00, 0x5e, 0x05, 0x50, 0x60, 0x13, 0x00, 0x00, - 0x65, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x03, 0x00, 0x16, - 0x00, 0xc6, 0x25, 0x60, 0x08, 0x0c, 0x52, 0x1c, 0x00, 0xce, 0x08, 0x0c, - 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, - 0x2c, 0x08, 0x08, 0x0c, 0xaf, 0x3e, 0x00, 0x7e, 0x00, 0x1e, 0xd1, 0x84, - 0x01, 0x28, 0x08, 0x0c, 0x86, 0xa4, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x30, - 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0x5e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd0, - 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x46, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, - 0x2c, 0x78, 0x00, 0xce, 0x01, 0x80, 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, - 0x78, 0x1f, 0x00, 0x03, 0x20, 0x21, 0x00, 0x05, 0x08, 0x0c, 0x9e, 0x0c, - 0x2f, 0x60, 0x20, 0x09, 0x00, 0x4d, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xc6, 0x00, 0x46, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x2c, 0x78, - 0x00, 0xce, 0x01, 0x78, 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, 0x78, 0x1f, - 0x00, 0x03, 0x20, 0x21, 0x00, 0x05, 0x04, 0x81, 0x2f, 0x60, 0x20, 0x09, - 0x00, 0x4e, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x4e, - 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x46, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x2c, 0x78, 0x00, 0xce, 0x01, 0xc0, - 0x7e, 0x12, 0x2c, 0x00, 0x78, 0x1a, 0x78, 0x1f, 0x00, 0x03, 0x20, 0x21, - 0x00, 0x04, 0x00, 0xa1, 0x20, 0x01, 0xb8, 0xa0, 0x20, 0x04, 0xd0, 0xfc, - 0x01, 0x20, 0x2f, 0x60, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x28, 0x2f, 0x60, - 0x20, 0x09, 0x00, 0x52, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x4e, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x96, 0x00, 0x76, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x51, 0xbe, 0x01, 0x18, - 0x20, 0x01, 0x9e, 0x11, 0x00, 0x28, 0x08, 0x0c, 0x51, 0x8e, 0x01, 0x58, - 0x20, 0x01, 0x9e, 0x17, 0x00, 0x06, 0xa0, 0x0e, 0x24, 0x00, 0x08, 0x0c, - 0x55, 0x4d, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0x0e, 0x08, 0x07, 0x24, 0x18, - 0x08, 0x0c, 0x70, 0xa1, 0x62, 0xa0, 0x00, 0x86, 0x20, 0x41, 0x00, 0x01, - 0x20, 0x39, 0x00, 0x01, 0x26, 0x08, 0x08, 0x0c, 0x6e, 0x80, 0x00, 0x8e, - 0x08, 0x0c, 0x6d, 0x74, 0x2f, 0x08, 0x26, 0x48, 0x08, 0x0c, 0xaf, 0x3e, - 0x61, 0x3c, 0x81, 0xff, 0x09, 0x0c, 0x6f, 0x35, 0x08, 0x0c, 0x71, 0xe5, - 0x01, 0x2e, 0x00, 0x7e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, - 0x01, 0x88, 0x66, 0x0a, 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, - 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x1f, 0x08, 0x0c, - 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, - 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x88, 0x66, 0x0a, - 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x08, 0x2d, 0x00, - 0x60, 0x12, 0x20, 0x09, 0x00, 0x21, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, - 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x08, 0x0c, - 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x88, 0x66, 0x0a, 0x61, 0x1a, 0x08, 0x0c, - 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, - 0x00, 0x3d, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x08, 0x0c, 0x9f, 0x92, 0x00, 0x1e, - 0x01, 0x80, 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, - 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x86, 0xd3, - 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, - 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, - 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x88, 0x66, 0x0a, 0x61, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, - 0x20, 0x09, 0x00, 0x44, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0x26, - 0x00, 0xd6, 0x62, 0x18, 0x22, 0x68, 0x6a, 0x3c, 0x82, 0xff, 0x01, 0x10, - 0x82, 0x11, 0x6a, 0x3e, 0x00, 0xde, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x06, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x01, 0x90, 0x60, 0x13, 0x00, 0x00, - 0x60, 0x1f, 0x00, 0x07, 0x20, 0x01, 0xb8, 0xb6, 0x20, 0x04, 0x00, 0x06, - 0xa0, 0x82, 0x00, 0x51, 0x00, 0x0e, 0x02, 0x08, 0x80, 0x04, 0x60, 0x16, - 0x08, 0x0c, 0xb3, 0xf6, 0x60, 0x3f, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x66, 0x00, 0xc6, 0x00, 0xd6, 0x20, 0x31, 0xb6, 0x53, 0x26, 0x34, - 0xd6, 0xe4, 0x01, 0x28, 0x66, 0x18, 0x26, 0x60, 0x6e, 0x48, 0x08, 0x0c, - 0x51, 0x47, 0x00, 0xde, 0x00, 0xce, 0x00, 0x6e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x02, 0x01, 0x40, 0xa0, 0x8e, - 0x00, 0x03, 0x01, 0x28, 0xa0, 0x8e, 0x00, 0x04, 0x01, 0x10, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, - 0x60, 0x10, 0xa0, 0x6d, 0x01, 0x48, 0x68, 0x34, 0xa0, 0x86, 0x01, 0x39, - 0x01, 0x38, 0x68, 0x38, 0xd0, 0xfc, 0x01, 0x10, 0xa0, 0x06, 0x00, 0x10, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x08, 0x0c, 0x86, 0x4e, - 0x00, 0x1e, 0x01, 0x90, 0x61, 0x1a, 0x08, 0x0c, 0xa0, 0xe3, 0x60, 0x1f, - 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x08, 0x0c, 0x2c, 0xd1, 0x20, 0x09, - 0x00, 0x28, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0xa1, 0x86, 0x00, 0x15, - 0x11, 0x78, 0x20, 0x11, 0xb6, 0x21, 0x22, 0x04, 0xa0, 0x86, 0x00, 0x74, - 0x11, 0x48, 0x08, 0x0c, 0x90, 0x24, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x29, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x20, 0x08, 0x0c, 0x8c, 0xa5, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x16, 0x11, 0x28, - 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x4f, 0x6f, 0x00, 0xe8, 0xa1, 0x86, - 0x00, 0x15, 0x11, 0xe8, 0x20, 0x11, 0xb6, 0x21, 0x22, 0x04, 0xa0, 0x86, - 0x00, 0x14, 0x11, 0xb8, 0x00, 0xd6, 0x60, 0x18, 0x20, 0x68, 0x08, 0x0c, - 0x50, 0xbd, 0x00, 0xde, 0x08, 0x0c, 0x90, 0xdd, 0x11, 0x70, 0x00, 0xd6, - 0x60, 0x18, 0x20, 0x68, 0x68, 0x90, 0x00, 0xde, 0xa0, 0x05, 0x01, 0x38, - 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x4f, 0x6f, 0x08, 0x0c, 0x88, 0x2c, - 0x00, 0x20, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, - 0x68, 0x48, 0xa0, 0x86, 0x00, 0x05, 0x11, 0x08, 0x00, 0x09, 0x00, 0x05, - 0x68, 0x50, 0xc0, 0xad, 0x68, 0x52, 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x71, 0xb6, 0x00, 0x20, 0x91, 0x80, 0x00, 0x75, 0x48, 0xa5, 0x82, - 0x00, 0x01, 0x06, 0x08, 0x70, 0x4c, 0x20, 0x60, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x00, 0x01, 0x48, 0xac, 0xe0, 0x00, 0x18, 0x70, 0x5c, 0xac, 0x02, - 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, 0xbe, 0x00, 0x0c, 0x98, 0x60, 0x03, - 0x00, 0x08, 0x85, 0x29, 0x75, 0x4a, 0xac, 0xa8, 0x00, 0x18, 0x70, 0x5c, - 0xa5, 0x02, 0x12, 0x30, 0x75, 0x4e, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x70, 0x4f, 0xbe, 0x00, 0x0c, 0xc0, 0xa0, 0x06, - 0x0c, 0xc0, 0x00, 0xe6, 0x20, 0x71, 0xbc, 0x8c, 0x70, 0x14, 0xd0, 0xe4, - 0x01, 0x50, 0x60, 0x13, 0x00, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x50, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, - 0x00, 0xfe, 0x01, 0x20, 0x60, 0x1c, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x13, - 0x00, 0xce, 0x00, 0x05, 0x9a, 0xba, 0x9f, 0xe9, 0x9f, 0xec, 0x9f, 0xef, - 0xb1, 0xe3, 0xb1, 0xfe, 0xb2, 0x01, 0x9a, 0xba, 0x9a, 0xba, 0x08, 0x0c, - 0x15, 0x1a, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x05, 0xe0, 0x00, 0xe0, 0x00, - 0x00, 0x05, 0x00, 0x09, 0x00, 0x05, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, - 0x53, 0x77, 0x05, 0x38, 0x08, 0x0c, 0x86, 0x4e, 0x11, 0x28, 0x20, 0x01, - 0xb8, 0xb8, 0x20, 0x04, 0x78, 0x3e, 0x00, 0xf8, 0x78, 0x18, 0x60, 0x1a, - 0x08, 0x0c, 0xa0, 0xe3, 0x78, 0x1c, 0xa0, 0x86, 0x00, 0x03, 0x01, 0x28, - 0x78, 0x08, 0x60, 0x36, 0x2f, 0x00, 0x60, 0x3a, 0x00, 0x20, 0x78, 0x08, - 0x60, 0x3a, 0x2f, 0x00, 0x60, 0x36, 0x60, 0x2a, 0x60, 0x1f, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x35, 0x60, 0x03, 0x00, 0x01, 0x79, 0x50, 0x61, 0x52, - 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x2f, 0x60, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0x16, 0x00, 0xf6, 0x68, 0x2c, 0x60, 0x32, 0xa0, 0x8e, - 0x00, 0x01, 0x01, 0x38, 0xa0, 0x86, 0x00, 0x05, 0x01, 0x40, 0xa0, 0x06, - 0x60, 0x2a, 0x60, 0x2e, 0x00, 0xa0, 0x68, 0x20, 0xc0, 0xf4, 0xc0, 0xd5, - 0x68, 0x22, 0x68, 0x10, 0x20, 0x78, 0x78, 0x7c, 0x69, 0x38, 0xa1, 0x02, - 0x78, 0x80, 0x69, 0x34, 0xa1, 0x03, 0x1e, 0x78, 0x68, 0x34, 0x60, 0x2a, - 0x68, 0x38, 0xa0, 0x84, 0xff, 0xfc, 0x68, 0x3a, 0x60, 0x2e, 0x2d, 0x00, - 0x60, 0x36, 0x68, 0x08, 0x60, 0x3a, 0x69, 0x18, 0x61, 0x1a, 0x69, 0x50, - 0x61, 0x52, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x07, 0x00, 0x39, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x68, 0x03, 0x00, 0x02, 0x00, 0xfe, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, - 0x11, 0x18, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x70, 0x60, 0x20, 0xd0, 0xf4, - 0x11, 0x50, 0xc0, 0xf5, 0x60, 0x22, 0x60, 0x10, 0x20, 0x78, 0x78, 0x28, - 0x60, 0x3a, 0x78, 0x2c, 0x60, 0x36, 0x08, 0x0c, 0x19, 0x52, 0xa0, 0x06, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x60, 0x04, 0xa0, 0x8e, - 0x00, 0x34, 0x01, 0xb8, 0xa0, 0x8e, 0x00, 0x35, 0x01, 0xa0, 0xa0, 0x8e, - 0x00, 0x36, 0x01, 0x88, 0xa0, 0x8e, 0x00, 0x37, 0x01, 0x70, 0xa0, 0x8e, - 0x00, 0x38, 0x01, 0x58, 0xa0, 0x8e, 0x00, 0x39, 0x01, 0x40, 0xa0, 0x8e, - 0x00, 0x3a, 0x01, 0x28, 0xa0, 0x8e, 0x00, 0x3b, 0x01, 0x10, 0xa0, 0x85, - 0x00, 0x01, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, 0x20, 0x01, 0xb8, 0xb2, 0x20, 0x0c, - 0x80, 0x00, 0x20, 0x14, 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x6b, 0xb2, - 0x20, 0x01, 0xb8, 0xb6, 0x82, 0xff, 0x11, 0x10, 0x20, 0x11, 0x00, 0x14, - 0x22, 0x02, 0x20, 0x01, 0xb8, 0xb4, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, - 0x20, 0x71, 0xb8, 0x8e, 0x71, 0x1a, 0x72, 0x1e, 0x20, 0x01, 0x00, 0x64, - 0x08, 0x0c, 0x6b, 0xb2, 0x20, 0x01, 0xb8, 0xb7, 0x82, 0xff, 0x11, 0x10, - 0x20, 0x11, 0x00, 0x14, 0x22, 0x02, 0x20, 0x09, 0xb8, 0xb8, 0xa2, 0x80, - 0x00, 0x0a, 0x20, 0x0a, 0x08, 0x0c, 0x53, 0x9c, 0x00, 0xee, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe6, - 0x20, 0x01, 0xb8, 0xb6, 0x20, 0x03, 0x00, 0x28, 0x20, 0x01, 0xb8, 0xb7, - 0x20, 0x03, 0x00, 0x14, 0x20, 0x71, 0xb8, 0x8e, 0x70, 0x1b, 0x00, 0x00, - 0x70, 0x1f, 0x07, 0xd0, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x03, 0x00, 0x1e, - 0x00, 0xee, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xd6, 0x60, 0x54, 0xa0, 0x6d, - 0x01, 0x10, 0x08, 0x0c, 0x16, 0x14, 0x00, 0xde, 0x00, 0x05, 0x00, 0x05, - 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x08, 0x0c, - 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x78, 0x61, 0x1a, 0x0c, 0xa1, 0x60, 0x1f, - 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, 0x00, 0x33, 0x08, 0x0c, - 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, - 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, - 0xb6, 0x00, 0xa1, 0x86, 0x00, 0x15, 0x15, 0x00, 0x70, 0x84, 0xa0, 0x86, - 0x00, 0x18, 0x11, 0xe0, 0x60, 0x10, 0x20, 0x68, 0x6a, 0x3c, 0xd2, 0xe4, - 0x11, 0x60, 0x2c, 0x78, 0x08, 0x0c, 0x73, 0xa3, 0x01, 0xd8, 0x70, 0x70, - 0x6a, 0x50, 0xa2, 0x06, 0x11, 0x60, 0x70, 0x74, 0x6a, 0x54, 0xa2, 0x06, - 0x11, 0x40, 0x62, 0x18, 0xa2, 0x90, 0x00, 0x28, 0x22, 0x14, 0x20, 0x09, - 0x00, 0x00, 0x08, 0x0c, 0x2d, 0x16, 0x08, 0x0c, 0x88, 0x2c, 0x00, 0x20, - 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x05, 0x70, 0x54, 0x6a, 0x54, 0xa2, 0x06, 0x0d, 0x48, - 0x0c, 0x80, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, - 0x08, 0x0c, 0x86, 0x4e, 0x00, 0x1e, 0x01, 0x80, 0x61, 0x1a, 0x08, 0x0c, - 0xa0, 0xe3, 0x60, 0x1f, 0x00, 0x01, 0x2d, 0x00, 0x60, 0x12, 0x20, 0x09, - 0x00, 0x43, 0x08, 0x0c, 0x86, 0xd3, 0xa0, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0xa0, 0x06, 0x0c, 0xd8, 0x00, 0xd6, 0x00, 0xe6, - 0x00, 0xf6, 0x20, 0x71, 0xb6, 0x00, 0xa1, 0x86, 0x00, 0x15, 0x11, 0xc0, - 0x70, 0x84, 0xa0, 0x86, 0x00, 0x04, 0x11, 0xa0, 0x60, 0x10, 0xa0, 0xe8, - 0x00, 0x0f, 0x2c, 0x78, 0x08, 0x0c, 0x73, 0xa3, 0x01, 0xa8, 0x70, 0x70, - 0x6a, 0x08, 0xa2, 0x06, 0x11, 0x30, 0x70, 0x74, 0x6a, 0x0c, 0xa2, 0x06, - 0x11, 0x10, 0x08, 0x0c, 0x2c, 0xd1, 0x08, 0x0c, 0x88, 0x2c, 0x00, 0x20, - 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x05, 0x70, 0x54, 0x6a, 0x0c, 0xa2, 0x06, 0x0d, 0x78, - 0x0c, 0x80, 0x00, 0x16, 0x00, 0x26, 0x68, 0x4c, 0xd0, 0xac, 0x01, 0x78, - 0x69, 0x14, 0x6a, 0x10, 0x21, 0x00, 0xa2, 0x05, 0x01, 0x50, 0x68, 0x60, - 0xa1, 0x06, 0x11, 0x18, 0x68, 0x5c, 0xa2, 0x06, 0x01, 0x20, 0x69, 0x62, - 0x6a, 0x5e, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x36, 0x63, 0x10, 0x23, 0x68, 0x68, 0x4a, 0x69, 0x52, - 0xa2, 0x9e, 0x40, 0x00, 0x11, 0xa0, 0x00, 0xc6, 0x63, 0x18, 0x23, 0x60, - 0x20, 0x09, 0x00, 0x00, 0x68, 0x38, 0xd0, 0xf4, 0x11, 0x40, 0x08, 0x0c, - 0x52, 0xbc, 0x11, 0x08, 0xc1, 0x85, 0x60, 0x00, 0xd0, 0xbc, 0x01, 0x08, - 0xc1, 0x8d, 0x6a, 0x66, 0x69, 0x6a, 0x00, 0xce, 0x00, 0x80, 0x6a, 0x66, - 0x39, 0x18, 0xa3, 0x98, 0x00, 0x06, 0x23, 0x1c, 0x68, 0x6b, 0x00, 0x04, - 0x6b, 0x72, 0x00, 0xc6, 0x63, 0x18, 0x23, 0x60, 0x60, 0x04, 0xa0, 0x84, - 0x00, 0xff, 0x68, 0x6e, 0x00, 0xce, 0x08, 0x0c, 0x54, 0x7a, 0x60, 0x13, - 0x00, 0x00, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x26, - 0x00, 0x16, 0xa1, 0x86, 0x00, 0x35, 0x01, 0x10, 0x6a, 0x34, 0x00, 0x08, - 0x6a, 0x28, 0x08, 0x0c, 0x9d, 0x06, 0x01, 0xf0, 0x22, 0x60, 0x61, 0x1c, - 0xa1, 0x86, 0x00, 0x03, 0x01, 0x18, 0xa1, 0x86, 0x00, 0x06, 0x11, 0x90, - 0x68, 0x34, 0xa2, 0x06, 0x01, 0x40, 0x68, 0x38, 0xa2, 0x06, 0x11, 0x60, - 0x61, 0x08, 0x68, 0x34, 0xa1, 0x06, 0x11, 0x40, 0x00, 0x20, 0x60, 0x08, - 0x69, 0x38, 0xa1, 0x06, 0x11, 0x18, 0x60, 0x18, 0x69, 0x18, 0xa1, 0x06, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0x05, 0xa0, 0x85, 0x00, 0x01, - 0x0c, 0xc8, 0x69, 0x44, 0xd1, 0xcc, 0x01, 0x98, 0xa1, 0x8c, 0x00, 0xff, - 0xa1, 0x8e, 0x00, 0x02, 0x11, 0x70, 0xad, 0x88, 0x00, 0x1e, 0x21, 0x0c, - 0xa1, 0x8c, 0x0f, 0x00, 0x81, 0x0f, 0xa1, 0x8e, 0x00, 0x01, 0x11, 0x28, - 0x68, 0x10, 0x69, 0x14, 0xa1, 0x15, 0x19, 0x0c, 0x95, 0x3f, 0x00, 0x05, - 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x04, 0x71, 0xe5, 0x00, 0x66, 0x60, 0x00, - 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, - 0x00, 0x05, 0xa2, 0x27, 0xa7, 0x02, 0xa8, 0x28, 0xa2, 0x27, 0xa2, 0x27, - 0xa2, 0x27, 0xa2, 0x27, 0xa2, 0x27, 0xa2, 0x5f, 0xa8, 0xac, 0xa2, 0x27, - 0xa2, 0x27, 0xa2, 0x27, 0xa2, 0x27, 0xa2, 0x27, 0xa2, 0x27, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0x66, 0x60, 0x00, 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0xa2, 0x42, 0xad, 0x33, - 0xa2, 0x42, 0xa2, 0x42, 0xa2, 0x42, 0xa2, 0x42, 0xa2, 0x42, 0xa2, 0x42, - 0xac, 0xf5, 0xad, 0x7b, 0xa2, 0x42, 0xb3, 0x28, 0xb3, 0x58, 0xb3, 0x28, - 0xb3, 0x58, 0xa2, 0x42, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x66, 0x60, 0x00, - 0xa0, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x15, 0x1a, 0x00, 0x13, 0x00, 0x6e, - 0x00, 0x05, 0xa2, 0x5d, 0xa9, 0xfc, 0xaa, 0xc9, 0xaa, 0xf6, 0xab, 0x7a, - 0xa2, 0x5d, 0xac, 0x67, 0xac, 0x12, 0xa8, 0xb8, 0xac, 0xcb, 0xac, 0xe0, - 0xa2, 0x5d, 0xa2, 0x5d, 0xa2, 0x5d, 0xa2, 0x5d, 0xa2, 0x5d, 0x08, 0x0c, - 0x15, 0x1a, 0xa1, 0xb2, 0x00, 0x80, 0x1a, 0x0c, 0x15, 0x1a, 0x21, 0x00, - 0xa1, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xa6, 0x76, 0x00, 0x02, 0xa2, 0xa9, - 0xa4, 0x74, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa4, 0x7b, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xab, 0xa3, 0x09, - 0xa3, 0x18, 0xa3, 0x66, 0xa3, 0x84, 0xa4, 0x02, 0xa4, 0x61, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa4, 0x7e, 0xa2, 0xa9, 0xa2, 0xa9, 0xa4, 0x91, 0xa4, 0x9c, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa5, 0x27, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa5, 0x3a, 0xa2, 0xa9, 0xa2, 0xa9, 0xa4, 0xf2, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa5, 0x52, 0xa2, 0xa9, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa5, 0xcc, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, 0xa2, 0xa9, - 0xa2, 0xa9, 0xa2, 0xa9, 0xa6, 0x3d, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0x53, 0x7b, 0x11, 0x50, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, 0xd0, 0xcc, - 0x11, 0x28, 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, 0x00, 0x08, 0x11, 0x40, - 0x60, 0x07, 0x00, 0x09, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, 0x00, 0x00, - 0x08, 0x04, 0xa4, 0x6f, 0x08, 0x0c, 0x53, 0x6b, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x62, 0x18, 0x22, 0x70, 0x72, 0xa0, - 0x00, 0x26, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, 0x2c, 0x08, 0x08, 0x0c, - 0xaf, 0x3e, 0x00, 0x7e, 0x00, 0x1e, 0x2e, 0x60, 0x08, 0x0c, 0x52, 0x1c, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x66, 0x18, - 0x00, 0xc6, 0x26, 0x60, 0x08, 0x0c, 0x50, 0x2a, 0x00, 0xce, 0xa6, 0xb0, - 0x00, 0x01, 0x26, 0x34, 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, - 0x02, 0x78, 0x08, 0x0c, 0xae, 0x82, 0x19, 0x04, 0xa3, 0x60, 0x08, 0x0c, - 0xae, 0x22, 0x11, 0x20, 0x60, 0x07, 0x00, 0x08, 0x08, 0x04, 0xa4, 0x6f, - 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, 0xa4, 0x6f, 0x08, 0x0c, 0xb0, 0x37, - 0x01, 0x28, 0x08, 0x0c, 0xae, 0x82, 0x0d, 0x78, 0x08, 0x04, 0xa3, 0x60, - 0x60, 0x13, 0x19, 0x00, 0x0c, 0x88, 0x08, 0x0c, 0x2d, 0xf4, 0x19, 0x04, - 0xa6, 0x73, 0x61, 0x06, 0x08, 0x0c, 0xad, 0xdc, 0x60, 0x07, 0x00, 0x06, - 0x08, 0x04, 0xa4, 0x6f, 0x60, 0x07, 0x00, 0x07, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0xb3, 0x8c, 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0x2d, 0xf4, - 0x19, 0x04, 0xa6, 0x73, 0x00, 0xd6, 0x66, 0x18, 0x26, 0x68, 0x6e, 0x04, - 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x12, 0x20, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x4f, 0x5d, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, - 0xa6, 0x86, 0x00, 0x06, 0x01, 0x88, 0xa6, 0x86, 0x00, 0x04, 0x01, 0x70, - 0x6e, 0x04, 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x86, 0x00, 0x06, 0x01, 0x40, - 0xa6, 0x86, 0x00, 0x04, 0x01, 0x28, 0xa6, 0x86, 0x00, 0x05, 0x01, 0x10, - 0x00, 0xde, 0x00, 0xe0, 0x08, 0x0c, 0xae, 0xe0, 0x11, 0xa0, 0xa6, 0x86, - 0x00, 0x06, 0x11, 0x50, 0x00, 0x26, 0x62, 0x18, 0xa2, 0x90, 0x00, 0x28, - 0x22, 0x14, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2d, 0x16, 0x00, 0x2e, - 0x08, 0x0c, 0x50, 0xbd, 0x60, 0x07, 0x00, 0x0a, 0x00, 0xde, 0x08, 0x04, - 0xa4, 0x6f, 0x60, 0x07, 0x00, 0x0b, 0x00, 0xde, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0x2c, 0xd1, 0x60, 0x07, 0x00, 0x01, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0xb3, 0x8c, 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0x2d, 0xf4, - 0x19, 0x04, 0xa6, 0x73, 0x66, 0x18, 0x00, 0xd6, 0x26, 0x68, 0x6e, 0x04, - 0x00, 0xde, 0xa6, 0x86, 0x07, 0x07, 0x0d, 0x50, 0x00, 0x26, 0x62, 0x18, - 0xa2, 0x90, 0x00, 0x28, 0x22, 0x14, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, - 0x2d, 0x16, 0x00, 0x2e, 0x60, 0x07, 0x00, 0x0c, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0x53, 0x7b, 0x11, 0x40, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, 0x00, 0x08, 0x11, 0x10, 0x08, 0x04, - 0xa2, 0xb8, 0x08, 0x0c, 0x53, 0x6b, 0x66, 0x18, 0xa6, 0xb0, 0x00, 0x01, - 0x26, 0x34, 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x06, 0xe8, - 0x11, 0x38, 0x00, 0x26, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x4f, 0x9c, - 0x00, 0x2e, 0x00, 0x50, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, - 0x00, 0x04, 0x01, 0x20, 0xa6, 0x86, 0x00, 0x06, 0x19, 0x04, 0xa3, 0x60, - 0x08, 0x0c, 0xae, 0xed, 0x11, 0x20, 0x60, 0x07, 0x00, 0x0e, 0x08, 0x04, - 0xa4, 0x6f, 0x00, 0x46, 0x64, 0x18, 0xa4, 0xa0, 0x00, 0x28, 0x24, 0x24, - 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, 0x00, 0x46, 0x08, 0x0c, 0x2c, 0xd1, - 0x00, 0x4e, 0x00, 0x16, 0xa0, 0x06, 0x20, 0x09, 0xb6, 0x53, 0x21, 0x0c, - 0xd1, 0xa4, 0x01, 0x58, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, 0xb1, 0xa4, - 0x60, 0x18, 0x00, 0xd6, 0x20, 0x68, 0x68, 0x00, 0xc0, 0xe5, 0x68, 0x02, - 0x00, 0xde, 0x00, 0x1e, 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, 0x08, 0x04, - 0xa4, 0x6f, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x4f, 0x5d, 0x01, 0x56, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, - 0xb6, 0x05, 0x20, 0x11, 0xbc, 0x90, 0x08, 0x0c, 0x91, 0x66, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0xa0, 0x05, 0x01, 0x68, 0xa6, 0xb4, - 0xff, 0x00, 0x86, 0x37, 0xa6, 0x82, 0x00, 0x04, 0x0a, 0x04, 0xa3, 0x60, - 0xa6, 0x82, 0x00, 0x07, 0x0a, 0x04, 0xa3, 0xae, 0x08, 0x04, 0xa3, 0x60, - 0x60, 0x13, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0x53, 0x7b, 0x11, 0x40, 0x20, 0x01, 0xb6, 0x35, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x09, 0xa0, 0x86, 0x00, 0x08, 0x11, 0x10, 0x08, 0x04, - 0xa2, 0xb8, 0x08, 0x0c, 0x53, 0x6b, 0x66, 0x18, 0xa6, 0xb0, 0x00, 0x01, - 0x26, 0x34, 0xa6, 0x84, 0x00, 0xff, 0xa0, 0x82, 0x00, 0x06, 0x06, 0xb8, - 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, 0x00, 0x04, 0x01, 0x20, - 0xa6, 0x86, 0x00, 0x06, 0x19, 0x04, 0xa3, 0x60, 0x08, 0x0c, 0xaf, 0x15, - 0x11, 0x38, 0x08, 0x0c, 0xae, 0x22, 0x11, 0x20, 0x60, 0x07, 0x00, 0x10, - 0x08, 0x04, 0xa4, 0x6f, 0x00, 0x46, 0x64, 0x18, 0xa4, 0xa0, 0x00, 0x28, - 0x24, 0x24, 0xa4, 0xa4, 0x00, 0xff, 0x84, 0x27, 0x00, 0x46, 0x08, 0x0c, - 0x2c, 0xd1, 0x00, 0x4e, 0x00, 0x16, 0xa0, 0x06, 0x20, 0x09, 0xb6, 0x53, - 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x58, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, - 0xb1, 0xa4, 0x60, 0x18, 0x00, 0xd6, 0x20, 0x68, 0x68, 0x00, 0xc0, 0xe5, - 0x68, 0x02, 0x00, 0xde, 0x00, 0x1e, 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, - 0x00, 0xf0, 0x08, 0x0c, 0xb0, 0x37, 0x01, 0x40, 0xa6, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x09, 0x50, 0x08, 0x04, 0xa3, 0x60, - 0x60, 0x13, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x00, 0x70, 0x08, 0x0c, - 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0xb3, 0x8c, 0x19, 0x04, - 0xa6, 0x73, 0x08, 0x0c, 0xa6, 0x9b, 0x19, 0x04, 0xa3, 0x60, 0x60, 0x07, - 0x00, 0x12, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x05, - 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, - 0x0c, 0xc0, 0x60, 0x07, 0x00, 0x05, 0x0c, 0xc0, 0x08, 0x0c, 0xb3, 0x8c, - 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, - 0x08, 0x0c, 0xa6, 0x9b, 0x19, 0x04, 0xa3, 0x60, 0x60, 0x07, 0x00, 0x20, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x05, 0x08, 0x0c, - 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, 0x60, 0x07, 0x00, 0x23, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x05, 0x08, 0x0c, 0xb3, 0x8c, - 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, - 0x08, 0x0c, 0xa6, 0x9b, 0x19, 0x04, 0xa3, 0x60, 0x00, 0x16, 0x00, 0x26, - 0x20, 0x11, 0xbc, 0x91, 0x22, 0x14, 0xa2, 0x86, 0xff, 0xff, 0x01, 0x90, - 0x2c, 0x08, 0x08, 0x0c, 0x9d, 0x06, 0x01, 0xe0, 0x22, 0x60, 0x20, 0x11, - 0xbc, 0x90, 0x22, 0x14, 0x60, 0x08, 0xa2, 0x06, 0x11, 0xa8, 0x60, 0x18, - 0xa1, 0x90, 0x00, 0x06, 0x22, 0x14, 0xa2, 0x06, 0x01, 0xe8, 0x00, 0x70, - 0x20, 0x11, 0xbc, 0x90, 0x22, 0x14, 0x2c, 0x08, 0xa0, 0x06, 0x08, 0x0c, - 0xb1, 0x76, 0x11, 0xa0, 0x20, 0x11, 0xbc, 0x91, 0x22, 0x14, 0xa2, 0x86, - 0xff, 0xff, 0x01, 0xc0, 0x21, 0x60, 0x60, 0x07, 0x00, 0x26, 0x60, 0x13, - 0x17, 0x00, 0x20, 0x11, 0xbc, 0x89, 0x22, 0x14, 0xa2, 0x96, 0xff, 0xff, - 0x11, 0x80, 0x60, 0x07, 0x00, 0x25, 0x00, 0x68, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x07, 0x1d, 0x70, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x24, 0x11, 0x10, - 0x08, 0x0c, 0x86, 0xa4, 0x21, 0x60, 0x60, 0x07, 0x00, 0x25, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x4f, 0x5d, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0xb6, 0x05, - 0x20, 0x11, 0xbc, 0x96, 0x08, 0x0c, 0x91, 0x66, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x01, 0x5e, 0x01, 0x20, 0x60, 0x07, 0x00, 0x31, 0x08, 0x04, - 0xa4, 0x6f, 0x08, 0x0c, 0x8e, 0x82, 0x08, 0x0c, 0x5b, 0x41, 0x11, 0xb0, - 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, 0x08, 0x0c, 0x5b, 0x5d, 0x11, 0x58, - 0x20, 0x01, 0xb8, 0x9f, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0xb6, 0x00, - 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x5a, 0x79, 0x00, 0x10, 0x08, 0x0c, - 0x5b, 0x18, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0x05, 0x08, 0x0c, - 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0xa6, 0x9b, 0x19, 0x04, - 0xa3, 0x60, 0x61, 0x06, 0x08, 0x0c, 0xa6, 0xb7, 0x60, 0x07, 0x00, 0x2b, - 0x08, 0x04, 0xa4, 0x6f, 0x60, 0x07, 0x00, 0x2c, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0xb3, 0x8c, 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0x2d, 0xf4, - 0x19, 0x04, 0xa6, 0x73, 0x08, 0x0c, 0xa6, 0x9b, 0x19, 0x04, 0xa3, 0x60, - 0x61, 0x06, 0x08, 0x0c, 0xa6, 0xbb, 0x11, 0x20, 0x60, 0x07, 0x00, 0x2e, - 0x08, 0x04, 0xa4, 0x6f, 0x60, 0x07, 0x00, 0x2f, 0x08, 0x04, 0xa4, 0x6f, - 0x08, 0x0c, 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x0c, 0xa1, 0x84, - 0x00, 0xff, 0xa0, 0x86, 0x00, 0x06, 0x01, 0x58, 0xa1, 0x84, 0xff, 0x00, - 0x80, 0x07, 0xa0, 0x86, 0x00, 0x06, 0x01, 0x28, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x08, 0x04, 0xa4, 0x74, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, - 0xd0, 0xe4, 0x09, 0x04, 0xa5, 0xc9, 0x20, 0x71, 0xbc, 0x8c, 0x70, 0x10, - 0x60, 0x36, 0x70, 0x14, 0x60, 0x3a, 0x71, 0x08, 0x72, 0x0c, 0x20, 0x01, - 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x40, 0x60, 0x18, 0x20, 0x68, - 0x68, 0x10, 0xa1, 0x06, 0x11, 0x18, 0x68, 0x14, 0xa2, 0x06, 0x01, 0xf8, - 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, 0xd0, 0xac, 0x15, 0x90, 0x20, 0x69, - 0xb6, 0x00, 0x68, 0x74, 0xa2, 0x06, 0x15, 0x68, 0x68, 0x70, 0xa1, 0x06, - 0x15, 0x50, 0x72, 0x10, 0x08, 0x0c, 0x9d, 0x06, 0x05, 0x58, 0x08, 0x0c, - 0xb2, 0x10, 0x05, 0x40, 0x62, 0x2a, 0x60, 0x07, 0x00, 0x36, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0x05, 0x72, 0x14, 0xa2, 0x86, 0xff, 0xff, 0x01, 0x50, 0x08, 0x0c, - 0x9d, 0x06, 0x01, 0xb0, 0xa2, 0x80, 0x00, 0x02, 0x20, 0x04, 0x71, 0x10, - 0xa1, 0x06, 0x11, 0x80, 0x0c, 0x08, 0x72, 0x10, 0x2c, 0x08, 0xa0, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0xb1, 0x76, 0x2c, 0x10, 0x21, 0x60, 0x01, 0x30, - 0x08, 0xb8, 0x60, 0x07, 0x00, 0x37, 0x60, 0x13, 0x15, 0x00, 0x08, 0xd8, - 0x60, 0x07, 0x00, 0x37, 0x60, 0x13, 0x17, 0x00, 0x08, 0xb0, 0x60, 0x07, - 0x00, 0x12, 0x08, 0x98, 0x08, 0x0c, 0x2d, 0xf4, 0x19, 0x04, 0xa6, 0x73, - 0x60, 0x18, 0xa0, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0x80, 0x07, 0xa0, 0x86, 0x00, 0x06, 0x19, 0x04, 0xa4, 0x74, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0xc6, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xe4, - 0x09, 0x04, 0xa6, 0x35, 0x20, 0x69, 0xb6, 0x00, 0x20, 0x71, 0xbc, 0x8c, - 0x70, 0x08, 0x60, 0x36, 0x72, 0x0c, 0x62, 0x3a, 0xa2, 0x86, 0xff, 0xff, - 0x11, 0x50, 0x72, 0x08, 0x00, 0xc6, 0x2c, 0x08, 0xa0, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0xb1, 0x76, 0x2c, 0x10, 0x00, 0xce, 0x05, 0x88, 0x08, 0x0c, - 0x9d, 0x06, 0x05, 0x70, 0x00, 0xc6, 0x00, 0x26, 0x22, 0x60, 0x08, 0x0c, - 0x99, 0xd9, 0x00, 0x2e, 0x00, 0xce, 0x71, 0x18, 0xa1, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0xa1, 0x86, 0x00, 0x01, 0x01, 0x58, 0xa1, 0x86, 0x00, 0x05, - 0x01, 0x18, 0xa1, 0x86, 0x00, 0x07, 0x11, 0x78, 0xa2, 0x80, 0x00, 0x04, - 0x20, 0x04, 0xa0, 0x05, 0x01, 0x50, 0x00, 0x56, 0x75, 0x10, 0x76, 0x14, - 0x08, 0x0c, 0xb2, 0x27, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0x05, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, - 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x0c, 0x88, - 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, 0x17, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x0c, 0x30, 0x60, 0x07, - 0x00, 0x3b, 0x60, 0x2b, 0x00, 0x0b, 0x60, 0x13, 0x00, 0x00, 0x08, 0x04, - 0xa5, 0x9f, 0x00, 0xe6, 0x00, 0x26, 0x08, 0x0c, 0x53, 0x7b, 0x05, 0x58, - 0x08, 0x0c, 0x53, 0x6b, 0x08, 0x0c, 0xb4, 0x07, 0x15, 0x20, 0x20, 0x71, - 0xb6, 0x00, 0x70, 0xd4, 0xc0, 0x85, 0x70, 0xd6, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x72, 0xa0, 0xa2, 0x84, 0x00, 0xff, 0x70, 0x72, 0x78, 0xe6, - 0xa2, 0x84, 0xff, 0x00, 0x72, 0x74, 0xa2, 0x05, 0x70, 0x76, 0x78, 0xea, - 0x00, 0xfe, 0x70, 0xdf, 0x00, 0x00, 0x20, 0x01, 0xb6, 0x53, 0x20, 0x04, - 0xd0, 0xa4, 0x01, 0x20, 0x20, 0x11, 0xb8, 0xfa, 0x20, 0x13, 0x07, 0xd0, - 0xd0, 0xac, 0x11, 0x28, 0x08, 0x0c, 0x2a, 0xed, 0x00, 0x10, 0x08, 0x0c, - 0xb4, 0x33, 0x00, 0x2e, 0x00, 0xee, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x04, - 0xa4, 0x73, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, - 0xa6, 0x81, 0xa6, 0x81, 0xa6, 0x81, 0xa6, 0x81, 0xa6, 0x81, 0xa6, 0x83, - 0xa6, 0x81, 0xa6, 0x81, 0xa6, 0x81, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0xb3, 0x8c, 0x1d, 0x68, 0x08, 0x0c, 0x2d, 0xf4, 0x1d, 0x50, 0x00, 0x89, - 0x11, 0x38, 0x60, 0x07, 0x00, 0x45, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x6d, 0x45, 0x00, 0x05, 0x08, 0x0c, 0x2c, 0xd1, 0x60, 0x07, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x66, 0x66, 0x18, 0x26, 0x68, 0x6e, 0x04, 0xa6, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, 0x01, 0x70, 0xa6, 0x86, 0x00, 0x04, - 0x01, 0x58, 0x6e, 0x04, 0xa6, 0xb4, 0x00, 0xff, 0xa6, 0x86, 0x00, 0x06, - 0x01, 0x28, 0xa6, 0x86, 0x00, 0x04, 0x01, 0x10, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x6e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x04, 0x49, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xd6, 0x04, 0x91, 0x11, 0xf0, 0x68, 0x0c, 0xa0, 0x8c, - 0xff, 0x00, 0x68, 0x20, 0xa0, 0x84, 0x00, 0xff, 0xa1, 0x15, 0x62, 0x12, - 0x68, 0x24, 0x60, 0x2a, 0xd1, 0xe4, 0x01, 0x18, 0x20, 0x09, 0x00, 0x01, - 0x00, 0x60, 0xd1, 0xec, 0x01, 0x68, 0x69, 0x20, 0xa1, 0x8c, 0x00, 0xff, - 0x68, 0x24, 0x08, 0x0c, 0x28, 0x52, 0x11, 0x30, 0x21, 0x10, 0x20, 0x09, - 0x00, 0x00, 0x08, 0x0c, 0x2d, 0x16, 0x00, 0x18, 0xa0, 0x85, 0x00, 0x01, - 0x00, 0x08, 0xa0, 0x06, 0x00, 0xde, 0x00, 0x05, 0x20, 0x69, 0xbc, 0x8d, - 0x68, 0x00, 0xa0, 0x82, 0x00, 0x10, 0x12, 0x28, 0x60, 0x13, 0x00, 0x00, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x08, 0xa0, 0x06, 0x00, 0x05, 0x60, 0x13, - 0x00, 0x00, 0x20, 0x69, 0xbc, 0x8c, 0x68, 0x08, 0xa0, 0x84, 0xff, 0x00, - 0xa0, 0x86, 0x08, 0x00, 0x11, 0x40, 0x68, 0x00, 0xa0, 0x84, 0x00, 0xff, - 0xa0, 0x8e, 0x00, 0x14, 0x01, 0x10, 0xa0, 0x8e, 0x00, 0x10, 0x00, 0x05, - 0x60, 0x04, 0xa0, 0xb2, 0x00, 0x80, 0x1a, 0x0c, 0x15, 0x1a, 0xa1, 0xb6, - 0x00, 0x13, 0x11, 0x30, 0x20, 0x08, 0xa1, 0xb2, 0x00, 0x40, 0x1a, 0x04, - 0xa8, 0x02, 0x00, 0x92, 0xa1, 0xb6, 0x00, 0x27, 0x01, 0x20, 0xa1, 0xb6, - 0x00, 0x14, 0x19, 0x0c, 0x15, 0x1a, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x4f, 0x9c, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0xa7, 0x62, 0xa7, 0x64, 0xa7, 0x62, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0x64, 0xa7, 0x76, 0xa7, 0xfb, 0xa7, 0xc6, 0xa7, 0xfb, - 0xa7, 0xd7, 0xa7, 0xfb, 0xa7, 0x76, 0xa7, 0xfb, 0xa7, 0xf3, 0xa7, 0xfb, - 0xa7, 0xf3, 0xa7, 0xfb, 0xa7, 0xfb, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x64, 0xa7, 0x62, 0xa7, 0xfb, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0xfb, 0xa7, 0x62, 0xa7, 0xf8, 0xa7, 0xfb, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0xfb, 0xa7, 0xfb, 0xa7, 0x62, - 0xa7, 0xfb, 0xa7, 0xfb, 0xa7, 0x62, 0xa7, 0x70, 0xa7, 0x62, 0xa7, 0x62, - 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0xf7, 0xa7, 0xfb, 0xa7, 0x62, 0xa7, 0x62, - 0xa7, 0xfb, 0xa7, 0xfb, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, 0xa7, 0x62, - 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x20, 0x01, 0xb8, 0xb6, - 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x71, 0xe5, - 0x08, 0x04, 0xa8, 0x01, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, - 0x08, 0x04, 0xa7, 0xfb, 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x52, 0x78, 0x04, - 0x00, 0xfe, 0xd0, 0xac, 0x19, 0x04, 0xa7, 0xfb, 0x20, 0x01, 0x00, 0x00, - 0x08, 0x0c, 0x4f, 0x5d, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x04, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0xff, 0x11, 0x40, 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x00, - 0x78, 0x98, 0x80, 0x00, 0x78, 0x9a, 0x00, 0xfe, 0x00, 0xe0, 0x00, 0xc6, - 0x60, 0x18, 0x20, 0x60, 0x60, 0x00, 0xd0, 0xf4, 0x11, 0x40, 0x60, 0x10, - 0xa0, 0x05, 0x01, 0x28, 0x00, 0xce, 0x08, 0x0c, 0x3f, 0x85, 0x08, 0x04, - 0xa7, 0xfb, 0x00, 0xce, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, 0xa0, 0x86, - 0x00, 0x02, 0x11, 0x38, 0x00, 0xf6, 0x20, 0x79, 0xb6, 0x00, 0x78, 0x98, - 0x80, 0x00, 0x78, 0x9a, 0x00, 0xfe, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x4f, 0x6f, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x1f, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x6d, 0x45, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0xc6, 0x61, 0x18, 0x21, 0x60, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0x6a, 0x1a, 0x00, 0xce, 0x04, 0xd8, 0x66, 0x18, 0x00, 0xd6, - 0x26, 0x68, 0x6e, 0x04, 0x00, 0xde, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, - 0xa6, 0x86, 0x00, 0x06, 0x05, 0x50, 0xa6, 0x86, 0x00, 0x04, 0x05, 0x38, - 0x20, 0x01, 0x00, 0x04, 0x04, 0x10, 0x20, 0x01, 0xb6, 0x00, 0x20, 0x04, - 0xa0, 0x86, 0x00, 0x03, 0x11, 0x10, 0x08, 0x0c, 0x3f, 0x85, 0x20, 0x01, - 0x00, 0x06, 0x04, 0xa1, 0x66, 0x18, 0x00, 0xd6, 0x26, 0x68, 0x6e, 0x04, - 0x00, 0xde, 0xa6, 0xb4, 0xff, 0x00, 0x86, 0x37, 0xa6, 0x86, 0x00, 0x06, - 0x01, 0x70, 0x20, 0x01, 0x00, 0x06, 0x00, 0x48, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x30, 0x20, 0x01, 0x00, 0x06, 0x04, 0x01, 0x00, 0x20, 0x00, 0x18, - 0x00, 0x10, 0x08, 0x0c, 0x4f, 0x9c, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, - 0xa8, 0x0d, 0xa8, 0x0d, 0xa8, 0x0d, 0xa8, 0x0d, 0xa8, 0x0d, 0xa8, 0x0f, - 0xa8, 0x0d, 0xa8, 0x0d, 0xa8, 0x0d, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0x71, 0x02, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xd6, 0x61, 0x18, 0x21, 0x68, 0x69, 0x00, 0xd1, 0x84, - 0x01, 0x40, 0x08, 0x0c, 0x4f, 0x6f, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, - 0x4f, 0x5d, 0x08, 0x0c, 0x2c, 0xf7, 0x00, 0xde, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0xd6, 0x66, 0x18, 0x26, 0x68, 0x68, 0x04, 0xa0, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x00, 0xde, 0xa0, 0xb2, 0x00, 0x0c, 0x1a, 0x0c, 0x15, 0x1a, - 0xa1, 0xb6, 0x00, 0x15, 0x11, 0x10, 0x00, 0x3b, 0x00, 0x28, 0xa1, 0xb6, - 0x00, 0x16, 0x19, 0x0c, 0x15, 0x1a, 0x00, 0x6b, 0x00, 0x05, 0x8d, 0x6b, - 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0xa8, 0x98, - 0xa8, 0x57, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, - 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0xa8, 0x98, - 0xa8, 0x9f, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x8d, 0x6b, 0x00, 0xf6, - 0x20, 0x79, 0xb6, 0x52, 0x78, 0x04, 0xd0, 0xac, 0x11, 0xe0, 0x60, 0x18, - 0xa0, 0x7d, 0x01, 0xc8, 0x78, 0x00, 0xd0, 0xf4, 0x11, 0x18, 0x78, 0x10, - 0xa0, 0x05, 0x11, 0x98, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x4f, 0x5d, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x4f, 0x6f, 0x60, 0x1f, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x6d, 0x45, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xe8, 0x20, 0x11, 0xbc, 0x83, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x52, 0x11, 0xa8, 0x00, 0xc6, - 0x08, 0x0c, 0x50, 0x1b, 0x01, 0x20, 0x00, 0xce, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0x68, 0x60, 0x10, 0x00, 0x06, 0x60, 0x14, 0x00, 0x06, 0x08, 0x0c, - 0x4c, 0x7e, 0x00, 0x0e, 0x60, 0x16, 0x00, 0x0e, 0x60, 0x12, 0x00, 0xce, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xfe, 0x00, 0x05, 0x66, 0x04, 0xa6, 0xb6, - 0x00, 0x1e, 0x11, 0x10, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0x08, 0x0c, - 0x90, 0x21, 0x11, 0x38, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, - 0x08, 0x0c, 0x6d, 0x45, 0x00, 0x10, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, - 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x80, 0x1a, 0x0c, 0x15, 0x1a, 0x08, 0x0c, - 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, - 0xa8, 0xce, 0xa8, 0xd0, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, - 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, - 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0xa8, 0xce, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x56, 0x00, 0x46, 0x00, 0x26, - 0x62, 0x18, 0xa2, 0x80, 0x00, 0x2b, 0x20, 0x04, 0xa0, 0x05, 0x01, 0x20, - 0x20, 0x21, 0x00, 0x00, 0x08, 0x0c, 0xb3, 0xd8, 0x61, 0x06, 0x20, 0x71, - 0xbc, 0x80, 0x74, 0x44, 0xa4, 0xa4, 0xff, 0x00, 0x09, 0x04, 0xa9, 0x34, - 0xa4, 0x86, 0x20, 0x00, 0x11, 0x30, 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, - 0x02, 0x00, 0x08, 0x0c, 0x6b, 0x8c, 0x08, 0x0c, 0x15, 0xfd, 0x09, 0x0c, - 0x15, 0x1a, 0x60, 0x03, 0x00, 0x07, 0x2d, 0x00, 0x68, 0x37, 0x01, 0x0d, - 0x68, 0x03, 0x00, 0x00, 0x68, 0x3b, 0x00, 0x00, 0x6c, 0x5a, 0x2c, 0x00, - 0x68, 0x5e, 0x60, 0x08, 0x68, 0xb2, 0x60, 0x18, 0x20, 0x78, 0x78, 0xa0, - 0x80, 0x07, 0x71, 0x30, 0x69, 0x4a, 0x00, 0x16, 0xa0, 0x84, 0xff, 0x00, - 0x68, 0x46, 0x68, 0x4f, 0x00, 0x00, 0x68, 0x53, 0x00, 0x00, 0x68, 0x57, - 0x00, 0x36, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0x1e, 0xa4, 0x86, 0x20, 0x00, - 0x11, 0x30, 0x20, 0x19, 0x00, 0x17, 0x08, 0x0c, 0xb1, 0x21, 0x08, 0x04, - 0xa9, 0x91, 0xa4, 0x86, 0x04, 0x00, 0x11, 0x30, 0x20, 0x19, 0x00, 0x02, - 0x08, 0x0c, 0xb0, 0xd3, 0x08, 0x04, 0xa9, 0x91, 0xa4, 0x86, 0x02, 0x00, - 0x11, 0x10, 0x08, 0x0c, 0xb0, 0xb8, 0xa4, 0x86, 0x10, 0x00, 0x11, 0x10, - 0x08, 0x0c, 0xb1, 0x06, 0x08, 0x04, 0xa9, 0x91, 0x20, 0x69, 0xb9, 0x75, - 0x6a, 0x00, 0xd2, 0x84, 0x09, 0x04, 0xa9, 0xf8, 0xa2, 0x84, 0x03, 0x00, - 0x19, 0x04, 0xa9, 0xf1, 0x68, 0x04, 0xa0, 0x05, 0x09, 0x04, 0xa9, 0xd9, - 0x2d, 0x78, 0x60, 0x03, 0x00, 0x07, 0x08, 0x0c, 0x15, 0xe4, 0x09, 0x04, - 0xa9, 0x98, 0x78, 0x00, 0xd0, 0x8c, 0x11, 0x18, 0x78, 0x04, 0x80, 0x01, - 0x78, 0x06, 0x60, 0x13, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x68, 0x37, - 0x01, 0x16, 0x68, 0x3b, 0x00, 0x00, 0x60, 0x08, 0x68, 0xb2, 0x2c, 0x00, - 0x68, 0x4a, 0x60, 0x18, 0x20, 0x78, 0x78, 0xa0, 0x80, 0x07, 0x71, 0x30, - 0x69, 0x86, 0x68, 0x46, 0x79, 0x28, 0x69, 0x8a, 0x79, 0x2c, 0x69, 0x8e, - 0x79, 0x30, 0x69, 0x92, 0x79, 0x34, 0x69, 0x96, 0x68, 0x53, 0x00, 0x3d, - 0x72, 0x44, 0xa2, 0x94, 0x00, 0x03, 0xa2, 0x86, 0x00, 0x02, 0x11, 0x18, - 0x68, 0x4f, 0x00, 0x40, 0x00, 0x40, 0xa2, 0x86, 0x00, 0x01, 0x11, 0x18, - 0x68, 0x4f, 0x00, 0x80, 0x00, 0x10, 0x68, 0x4f, 0x00, 0x00, 0x20, 0xa9, - 0x00, 0x0a, 0x20, 0x01, 0xbc, 0x90, 0xad, 0x90, 0x00, 0x15, 0x20, 0x0c, - 0x81, 0x0f, 0x21, 0x12, 0x80, 0x00, 0x82, 0x10, 0x1f, 0x04, 0xa9, 0x83, - 0x20, 0x0c, 0x69, 0x82, 0x80, 0x00, 0x20, 0x0c, 0x69, 0x7e, 0x08, 0x0c, - 0x54, 0x7a, 0x00, 0x2e, 0x00, 0x4e, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x05, 0x20, 0x01, 0xb6, 0x0e, 0x20, 0x04, 0xd0, 0x84, - 0x01, 0x20, 0x08, 0x0c, 0x15, 0xfd, 0x19, 0x04, 0xa9, 0x49, 0x60, 0x13, - 0x01, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, - 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x0c, 0x28, 0x20, 0x69, 0xbc, 0x92, - 0x2d, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa0, 0x86, 0x12, 0x00, 0x11, 0xa8, - 0x20, 0x69, 0xbc, 0x80, 0x68, 0x6c, 0xa0, 0x84, 0x00, 0xff, 0x00, 0x16, - 0x61, 0x10, 0xa1, 0x8c, 0x07, 0x00, 0xa1, 0x0d, 0x61, 0x12, 0x00, 0x1e, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x43, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x40, 0x68, 0x68, 0x60, 0x2a, 0x68, 0x6c, - 0x60, 0x2e, 0x60, 0x13, 0x02, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x04, - 0xa9, 0x91, 0x20, 0x01, 0xb6, 0x0d, 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, - 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, 0x3f, 0x13, 0x60, 0x13, 0x03, 0x00, - 0x00, 0x10, 0x60, 0x13, 0x01, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x04, - 0xa9, 0x91, 0x60, 0x13, 0x05, 0x00, 0x0c, 0x98, 0x60, 0x13, 0x06, 0x00, - 0x08, 0x04, 0xa9, 0xac, 0x60, 0x13, 0x02, 0x00, 0x08, 0x04, 0xa9, 0xac, - 0xa1, 0x86, 0x00, 0x13, 0x11, 0x70, 0x60, 0x04, 0xa0, 0x8a, 0x00, 0x40, - 0x0a, 0x0c, 0x15, 0x1a, 0xa0, 0x8a, 0x00, 0x53, 0x1a, 0x0c, 0x15, 0x1a, - 0xa0, 0x82, 0x00, 0x40, 0x20, 0x08, 0x08, 0x04, 0xaa, 0x86, 0xa1, 0x86, - 0x00, 0x51, 0x01, 0x38, 0xa1, 0x86, 0x00, 0x47, 0x11, 0xd8, 0x60, 0x04, - 0xa0, 0x86, 0x00, 0x41, 0x05, 0x18, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, - 0xd0, 0x84, 0x01, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0x6b, 0xe6, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x01, 0x2e, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x11, 0x70, - 0x08, 0x04, 0xaa, 0xc9, 0xa1, 0x86, 0x00, 0x27, 0x01, 0x20, 0xa1, 0x86, - 0x00, 0x14, 0x19, 0x0c, 0x15, 0x1a, 0x60, 0x04, 0xa0, 0x82, 0x00, 0x40, - 0x20, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0x86, 0xef, 0x00, 0x05, 0xaa, 0x50, - 0xaa, 0x52, 0xaa, 0x52, 0xaa, 0x76, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, - 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, - 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, 0xaa, 0x50, - 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0x36, 0x00, 0xd6, 0x60, 0x10, 0xa0, 0x6d, 0x01, 0xc0, 0xad, 0x84, - 0xf0, 0x00, 0x01, 0xa8, 0x60, 0x03, 0x00, 0x02, 0x60, 0x18, 0x20, 0x04, - 0xd0, 0xbc, 0x11, 0x78, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xb1, 0x55, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x14, 0xa0, 0x05, 0x11, 0x20, 0x20, 0x01, - 0xb8, 0xb7, 0x20, 0x04, 0x60, 0x16, 0x60, 0x03, 0x00, 0x07, 0x00, 0xde, - 0x00, 0x3e, 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0x71, 0xe5, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x20, 0x60, 0x10, 0x20, 0x68, - 0x08, 0x0c, 0x16, 0x14, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x02, 0xaa, 0x9a, 0xaa, 0xb7, 0xaa, 0xa3, 0xaa, 0xc3, 0xaa, 0x9a, - 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, - 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, 0xaa, 0x9a, - 0xaa, 0x9a, 0xaa, 0x9a, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x10, 0xa0, 0x88, - 0x00, 0x13, 0x21, 0x04, 0xa0, 0x85, 0x04, 0x00, 0x20, 0x0a, 0x08, 0x0c, - 0x71, 0x02, 0x60, 0x10, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, 0xd0, 0xb4, - 0x01, 0x38, 0x60, 0x03, 0x00, 0x07, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, - 0x86, 0xd3, 0x00, 0x10, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0xb3, 0x93, 0x11, 0x20, - 0x08, 0x0c, 0x6b, 0x61, 0x08, 0x0c, 0x86, 0xa4, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0x05, 0x08, 0x0c, 0x71, 0x02, 0x20, 0x09, 0x00, 0x41, 0x08, 0x04, - 0xac, 0x12, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, 0xaa, 0xdf, 0xaa, 0xe1, - 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xe2, - 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, - 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xdf, 0xaa, 0xed, 0xaa, 0xdf, 0x08, 0x0c, - 0x15, 0x1a, 0x00, 0x05, 0x60, 0x03, 0x00, 0x04, 0x61, 0x10, 0x20, 0xe1, - 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, - 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0x6b, 0x61, 0x00, 0xde, 0x08, 0x0c, - 0xb3, 0xf6, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x40, - 0x00, 0x02, 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0c, - 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0e, 0xab, 0x0c, 0xab, 0x11, 0xab, 0x4a, - 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x0c, 0xab, 0x4a, 0xab, 0x0c, - 0xab, 0x0c, 0xab, 0x0c, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x86, 0xef, - 0x00, 0x05, 0x20, 0x01, 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xe4, 0x01, 0x58, - 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, 0xa0, 0x82, 0x00, 0x05, 0x02, 0x28, - 0x20, 0x01, 0x01, 0x1f, 0x20, 0x04, 0x60, 0x36, 0x00, 0x10, 0x60, 0x37, - 0x00, 0x00, 0x08, 0x0c, 0x71, 0x98, 0x08, 0x0c, 0x72, 0xa2, 0x60, 0x10, - 0x00, 0xd6, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, 0x01, 0x50, 0xa0, 0x8c, - 0x00, 0x03, 0xa1, 0x8e, 0x00, 0x02, 0x01, 0x68, 0x20, 0x09, 0x00, 0x41, - 0x00, 0xde, 0x08, 0x04, 0xac, 0x12, 0x60, 0x03, 0x00, 0x07, 0x60, 0x17, - 0x00, 0x00, 0x08, 0x0c, 0x6b, 0x61, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, - 0xb3, 0x93, 0x01, 0x10, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x6b, 0x61, - 0x08, 0x0c, 0x86, 0xa4, 0x00, 0xde, 0x0c, 0xa0, 0x00, 0x36, 0x08, 0x0c, - 0x71, 0x98, 0x08, 0x0c, 0x72, 0xa2, 0x60, 0x10, 0x00, 0xd6, 0x20, 0x68, - 0x60, 0x18, 0x20, 0x04, 0xd0, 0xbc, 0x01, 0x88, 0x68, 0x4c, 0xa0, 0x84, - 0x00, 0x03, 0xa0, 0x86, 0x00, 0x02, 0x01, 0x40, 0x68, 0x7c, 0x63, 0x2c, - 0xa3, 0x1a, 0x63, 0x2e, 0x68, 0x80, 0x63, 0x28, 0xa3, 0x1b, 0x63, 0x2a, - 0x60, 0x03, 0x00, 0x02, 0x00, 0x80, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, - 0xb1, 0x55, 0x60, 0x14, 0xa0, 0x05, 0x11, 0x28, 0x20, 0x01, 0xb8, 0xb7, - 0x20, 0x04, 0x80, 0x03, 0x60, 0x16, 0x60, 0x13, 0x00, 0x00, 0x60, 0x03, - 0x00, 0x07, 0x00, 0xde, 0x00, 0x3e, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, - 0x11, 0x50, 0x60, 0x04, 0xa0, 0x86, 0x00, 0x42, 0x19, 0x0c, 0x15, 0x1a, - 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x86, - 0x00, 0x27, 0x01, 0x18, 0xa1, 0x86, 0x00, 0x14, 0x11, 0x80, 0x60, 0x04, - 0xa0, 0x86, 0x00, 0x42, 0x19, 0x0c, 0x15, 0x1a, 0x20, 0x01, 0x00, 0x07, - 0x08, 0x0c, 0x4f, 0x9c, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x40, 0x00, 0x02, - 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, - 0xab, 0xb3, 0xab, 0xb5, 0xab, 0xc1, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, - 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, 0xab, 0xb3, - 0xab, 0xb3, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0x36, 0x00, 0x46, 0x20, 0xe1, - 0x00, 0x05, 0x3d, 0x18, 0x3e, 0x20, 0x2c, 0x10, 0x08, 0x0c, 0x18, 0x63, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x05, 0x60, 0x10, 0x00, 0xd6, 0x20, 0x68, - 0x68, 0x10, 0x6a, 0x14, 0x00, 0x06, 0x00, 0x46, 0x00, 0x56, 0x6c, 0x7c, - 0xa4, 0x22, 0x6d, 0x80, 0x22, 0x00, 0xa5, 0x2b, 0x60, 0x2c, 0xa4, 0x20, - 0x64, 0x2e, 0x60, 0x28, 0xa5, 0x29, 0x65, 0x2a, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x0e, 0xa2, 0x0d, 0x11, 0x78, 0x68, 0x4c, 0xd0, 0xfc, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x41, 0x00, 0xde, 0x04, 0x90, 0x60, 0x03, 0x00, 0x07, - 0x60, 0x17, 0x00, 0x00, 0x08, 0x0c, 0x6b, 0x61, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x06, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x77, 0x00, 0xfe, - 0x00, 0x0e, 0x01, 0x20, 0x60, 0x03, 0x00, 0x02, 0x00, 0xde, 0x00, 0x05, - 0x20, 0x09, 0xb6, 0x0d, 0x21, 0x0c, 0xd1, 0x9c, 0x01, 0x18, 0x60, 0x03, - 0x00, 0x07, 0x00, 0x10, 0x60, 0x03, 0x00, 0x06, 0x00, 0x21, 0x08, 0x0c, - 0x6b, 0x63, 0x00, 0xde, 0x00, 0x05, 0xd2, 0xfc, 0x01, 0x40, 0x80, 0x02, - 0x80, 0x00, 0x82, 0x12, 0xa2, 0x91, 0x00, 0x00, 0x20, 0x09, 0x00, 0x09, - 0x00, 0x10, 0x20, 0x09, 0x00, 0x15, 0x6a, 0x6a, 0x68, 0x66, 0x00, 0x05, - 0xa1, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x62, 0xa1, 0x86, 0x00, 0x13, - 0x01, 0x20, 0xa1, 0x86, 0x00, 0x14, 0x19, 0x0c, 0x15, 0x1a, 0x60, 0x20, - 0xd0, 0xdc, 0x09, 0x0c, 0x15, 0x1a, 0x00, 0x05, 0xac, 0x35, 0xac, 0x3c, - 0xac, 0x48, 0xac, 0x54, 0xac, 0x35, 0xac, 0x35, 0xac, 0x35, 0xac, 0x63, - 0xac, 0x35, 0xac, 0x37, 0xac, 0x37, 0xac, 0x35, 0xac, 0x35, 0xac, 0x35, - 0xac, 0x35, 0xac, 0x37, 0xac, 0x35, 0xac, 0x37, 0xac, 0x35, 0x08, 0x0c, - 0x15, 0x1a, 0x60, 0x20, 0xd0, 0xdc, 0x09, 0x0c, 0x15, 0x1a, 0x00, 0x05, - 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, - 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, - 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, 0x2c, 0x10, 0x08, 0x0c, 0x1f, 0xc5, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6d, 0x62, 0x08, 0x0c, - 0x72, 0xa2, 0x01, 0x2e, 0x00, 0x05, 0xa0, 0x16, 0x08, 0x0c, 0x18, 0x63, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x36, 0x00, 0xd6, - 0xa1, 0x82, 0x00, 0x40, 0x00, 0x23, 0x00, 0xde, 0x00, 0x3e, 0x01, 0x2e, - 0x00, 0x05, 0xac, 0x83, 0xac, 0x85, 0xac, 0x97, 0xac, 0xb2, 0xac, 0x83, - 0xac, 0x83, 0xac, 0x83, 0xac, 0xc7, 0xac, 0x83, 0xac, 0x83, 0xac, 0x83, - 0xac, 0x83, 0xac, 0x83, 0xac, 0x83, 0xac, 0x83, 0xac, 0x83, 0x08, 0x0c, - 0x15, 0x1a, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, 0x01, 0xf8, - 0xa0, 0x9c, 0x00, 0x03, 0xa3, 0x9e, 0x00, 0x03, 0x01, 0xd0, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x04, 0x98, 0x60, 0x10, 0x20, 0x68, 0x68, 0x4c, 0xd0, 0xfc, 0x01, 0x68, - 0xa0, 0x9c, 0x00, 0x03, 0xa3, 0x9e, 0x00, 0x03, 0x01, 0x40, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x04, 0x08, 0x60, 0x13, 0x00, 0x00, 0x60, 0x17, 0x00, 0x00, 0x20, 0x19, - 0x00, 0x04, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0xc0, 0x60, 0x10, 0x20, 0x68, - 0x68, 0x4c, 0xd0, 0xfc, 0x0d, 0x90, 0xa0, 0x9c, 0x00, 0x03, 0xa3, 0x9e, - 0x00, 0x03, 0x0d, 0x68, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, 0x2c, 0x10, - 0x08, 0x0c, 0x1f, 0xc5, 0x08, 0x0c, 0x6d, 0x62, 0x08, 0x0c, 0x72, 0xa2, - 0x00, 0x18, 0xa0, 0x16, 0x08, 0x0c, 0x18, 0x63, 0x00, 0x05, 0x08, 0x0c, - 0x71, 0x02, 0x61, 0x10, 0x81, 0xff, 0x01, 0x58, 0x00, 0xd6, 0x21, 0x68, - 0x08, 0x0c, 0xb4, 0x3c, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, - 0xb1, 0x55, 0x00, 0x3e, 0x00, 0xde, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x98, 0x61, 0x10, 0x81, 0xff, - 0x01, 0x58, 0x00, 0xd6, 0x21, 0x68, 0x08, 0x0c, 0xb4, 0x3c, 0x00, 0x36, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0x3e, 0x00, 0xde, - 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x72, 0xa2, 0x00, 0x05, 0xa1, 0x82, - 0x00, 0x85, 0x00, 0x02, 0xad, 0x01, 0xac, 0xff, 0xac, 0xff, 0xad, 0x0d, - 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0x08, 0x0c, 0x15, 0x1a, 0x60, 0x03, - 0x00, 0x0b, 0x61, 0x06, 0x08, 0x0c, 0x6c, 0xff, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x71, 0xe5, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0xe6, 0x08, 0x0c, 0xb3, 0x8c, 0x01, 0x18, 0x08, 0x0c, 0x86, 0xa4, - 0x00, 0xd8, 0x20, 0x71, 0xbc, 0x80, 0x72, 0x24, 0x62, 0x12, 0x72, 0x20, - 0x08, 0x0c, 0xb0, 0x03, 0x01, 0x18, 0x60, 0x07, 0x00, 0x86, 0x00, 0x40, - 0x60, 0x07, 0x00, 0x87, 0x72, 0x24, 0xa2, 0x96, 0xff, 0xff, 0x11, 0x10, - 0x60, 0x07, 0x00, 0x86, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x08, 0x0c, 0x72, 0xa2, 0x00, 0xee, 0x00, 0x2e, - 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, 0x11, 0x60, 0x60, 0x04, 0xa0, 0x8a, - 0x00, 0x85, 0x0a, 0x0c, 0x15, 0x1a, 0xa0, 0x8a, 0x00, 0x8c, 0x1a, 0x0c, - 0x15, 0x1a, 0xa0, 0x82, 0x00, 0x85, 0x00, 0xa2, 0xa1, 0x86, 0x00, 0x27, - 0x01, 0x30, 0xa1, 0x86, 0x00, 0x14, 0x01, 0x18, 0x08, 0x0c, 0x86, 0xef, - 0x00, 0x50, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x4f, 0x9c, 0x08, 0x0c, - 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, - 0xad, 0x5d, 0xad, 0x5f, 0xad, 0x5f, 0xad, 0x5d, 0xad, 0x5d, 0xad, 0x5d, - 0xad, 0x5d, 0x08, 0x0c, 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, - 0x9e, 0xd9, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x85, - 0x0a, 0x0c, 0x15, 0x1a, 0xa1, 0x82, 0x00, 0x8c, 0x1a, 0x0c, 0x15, 0x1a, - 0xa1, 0x82, 0x00, 0x85, 0x00, 0x02, 0xad, 0x78, 0xad, 0x78, 0xad, 0x78, - 0xad, 0x7a, 0xad, 0x78, 0xad, 0x78, 0xad, 0x78, 0x08, 0x0c, 0x15, 0x1a, - 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, 0x01, 0x48, 0xa1, 0x86, 0x00, 0x14, - 0x01, 0x30, 0xa1, 0x86, 0x00, 0x27, 0x01, 0x18, 0x08, 0x0c, 0x86, 0xef, - 0x00, 0x30, 0x08, 0x0c, 0x71, 0x02, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0x00, 0x36, 0x08, 0x0c, 0xb3, 0xf6, 0x60, 0x3f, - 0x00, 0x00, 0x20, 0x19, 0x00, 0x0b, 0x00, 0x31, 0x60, 0x1f, 0x00, 0x06, - 0x60, 0x03, 0x00, 0x07, 0x00, 0x3e, 0x00, 0x05, 0x01, 0x26, 0x00, 0x36, - 0x20, 0x91, 0x80, 0x00, 0x00, 0x86, 0x2c, 0x40, 0x00, 0x96, 0x20, 0x49, - 0x00, 0x00, 0x08, 0x0c, 0x81, 0xb7, 0x00, 0x9e, 0x00, 0x8e, 0x15, 0x78, - 0x00, 0x76, 0x2c, 0x38, 0x08, 0x0c, 0x82, 0x5d, 0x00, 0x7e, 0x15, 0x48, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x00, 0x05, 0x28, 0x60, 0x1c, 0xa0, 0x86, - 0x00, 0x07, 0x05, 0x08, 0x00, 0xd6, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, - 0x11, 0x50, 0x08, 0x0c, 0xb3, 0xf6, 0x60, 0x1f, 0x00, 0x07, 0x20, 0x01, - 0xb8, 0xb6, 0x20, 0x04, 0x60, 0x16, 0x08, 0x0c, 0x19, 0x52, 0x60, 0x10, - 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x10, 0x08, 0x0c, 0xb1, 0x55, - 0x00, 0xde, 0x60, 0x13, 0x00, 0x00, 0x08, 0x0c, 0xb3, 0xf6, 0x60, 0x1f, - 0x00, 0x07, 0x20, 0x01, 0xb8, 0xb6, 0x20, 0x04, 0x60, 0x16, 0x00, 0x3e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x36, 0x01, 0x56, - 0x20, 0x79, 0xbc, 0x80, 0x79, 0x38, 0x78, 0x3c, 0x08, 0x0c, 0x28, 0x52, - 0x15, 0xb0, 0x00, 0x16, 0x00, 0xc6, 0x08, 0x0c, 0x50, 0x1b, 0x15, 0x78, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x26, 0x00, 0x16, 0x20, 0x19, 0x00, 0x29, - 0x08, 0x0c, 0x83, 0x20, 0x08, 0x0c, 0x6e, 0x67, 0x00, 0x76, 0x20, 0x39, - 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0xaf, 0x3e, 0x00, 0x7e, 0x08, 0x0c, - 0x52, 0x1c, 0x00, 0x26, 0x62, 0x04, 0xa2, 0x94, 0xff, 0x00, 0x82, 0x17, - 0xa2, 0x86, 0x00, 0x06, 0x01, 0x18, 0xa2, 0x86, 0x00, 0x04, 0x11, 0x18, - 0x62, 0xa0, 0x08, 0x0c, 0x2d, 0x8a, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, - 0x4c, 0x7e, 0x66, 0x12, 0x65, 0x16, 0xa0, 0x06, 0x00, 0x10, 0x00, 0xce, - 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x09, 0xb6, 0x21, - 0x21, 0x04, 0xa0, 0x86, 0x00, 0x74, 0x19, 0x04, 0xae, 0x77, 0x20, 0x69, - 0xbc, 0x8e, 0x69, 0x0c, 0xa1, 0x82, 0x01, 0x00, 0x06, 0xc0, 0x69, 0x08, - 0xa1, 0x84, 0x80, 0x00, 0x05, 0xe8, 0x20, 0x01, 0xb8, 0x9e, 0x20, 0x04, - 0xa0, 0x05, 0x11, 0x60, 0x60, 0x18, 0x20, 0x70, 0x70, 0x10, 0xa0, 0x84, - 0x00, 0xff, 0x01, 0x18, 0x70, 0x00, 0xd0, 0xf4, 0x01, 0x18, 0xa1, 0x84, - 0x08, 0x00, 0x05, 0x60, 0x69, 0x10, 0xa1, 0x8a, 0x00, 0x01, 0x06, 0x10, - 0x69, 0x14, 0x20, 0x69, 0xbc, 0xae, 0x69, 0x04, 0x81, 0xff, 0x11, 0x98, - 0x69, 0x0c, 0xa1, 0x82, 0x01, 0x00, 0x02, 0xa8, 0x69, 0x08, 0x81, 0xff, - 0x11, 0x78, 0x69, 0x10, 0xa1, 0x8a, 0x00, 0x01, 0x02, 0x88, 0x69, 0x18, - 0xa1, 0x8a, 0x00, 0x01, 0x02, 0x98, 0x00, 0xd0, 0x60, 0x13, 0x01, 0x00, - 0x00, 0xa0, 0x60, 0x13, 0x03, 0x00, 0x00, 0x88, 0x60, 0x13, 0x05, 0x00, - 0x00, 0x70, 0x60, 0x13, 0x07, 0x00, 0x00, 0x58, 0x60, 0x13, 0x09, 0x00, - 0x00, 0x40, 0x60, 0x13, 0x0b, 0x00, 0x00, 0x28, 0x60, 0x13, 0x0f, 0x00, - 0x00, 0x10, 0x60, 0x13, 0x2d, 0x00, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x08, - 0xa0, 0x06, 0x00, 0x1e, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x62, 0x18, - 0x22, 0x68, 0x6b, 0x04, 0xa3, 0x94, 0x00, 0xff, 0xa2, 0x86, 0x00, 0x06, - 0x01, 0x90, 0xa2, 0x86, 0x00, 0x04, 0x01, 0x78, 0xa3, 0x94, 0xff, 0x00, - 0x82, 0x17, 0xa2, 0x86, 0x00, 0x06, 0x01, 0x48, 0xa2, 0x86, 0x00, 0x04, - 0x01, 0x30, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0x50, 0x2a, 0x00, 0xce, - 0x04, 0xc0, 0x20, 0x11, 0xbc, 0x96, 0xad, 0x98, 0x00, 0x0a, 0x20, 0xa9, - 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, 0x15, 0x80, 0x20, 0x11, 0xbc, 0x9a, - 0xad, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, - 0x15, 0x38, 0x00, 0x46, 0x00, 0x16, 0x6a, 0xa0, 0xa2, 0x94, 0x00, 0xff, - 0x82, 0x27, 0xa0, 0x06, 0x20, 0x09, 0xb6, 0x53, 0x21, 0x0c, 0xd1, 0xa4, - 0x01, 0x38, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, 0xb1, 0xa4, 0x68, 0x00, - 0xc0, 0xe5, 0x68, 0x02, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x67, - 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x6d, 0x74, 0x2c, 0x08, - 0x08, 0x0c, 0xaf, 0x3e, 0x00, 0x7e, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x4f, 0x9c, 0x00, 0x1e, 0x00, 0x4e, 0xa0, 0x06, 0x01, 0x5e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, - 0xbc, 0x8e, 0x68, 0x00, 0xa0, 0x86, 0x08, 0x00, 0x01, 0x18, 0x60, 0x13, - 0x00, 0x00, 0x00, 0x08, 0xa0, 0x06, 0x00, 0xde, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xf6, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x20, 0x79, - 0xbc, 0x8c, 0x79, 0x30, 0x78, 0x34, 0x08, 0x0c, 0x28, 0x52, 0x11, 0xa0, - 0x08, 0x0c, 0x50, 0x1b, 0x11, 0x88, 0x20, 0x11, 0xbc, 0x90, 0xac, 0x98, - 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, 0x11, 0x40, - 0x20, 0x11, 0xbc, 0x94, 0xac, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, - 0x08, 0x0c, 0x91, 0x66, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0xfe, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x20, 0x11, 0xbc, 0x83, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x52, 0x11, 0xa0, 0x08, 0x0c, - 0x50, 0x1b, 0x11, 0x88, 0x20, 0x11, 0xbc, 0x96, 0xac, 0x98, 0x00, 0x0a, - 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, 0x11, 0x40, 0x20, 0x11, - 0xbc, 0x9a, 0xac, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, - 0x91, 0x66, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x86, 0x00, 0x76, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x27, 0x40, 0x20, 0x29, 0xb8, 0xea, 0x25, 0x2c, 0x20, 0x21, - 0xb8, 0xf0, 0x24, 0x24, 0x20, 0x61, 0xbe, 0x00, 0x20, 0x71, 0xb6, 0x00, - 0x76, 0x48, 0x70, 0x68, 0x81, 0xff, 0x01, 0x50, 0x00, 0x06, 0xa1, 0x86, - 0xb9, 0xf5, 0x00, 0x0e, 0x01, 0x28, 0x80, 0x01, 0xa6, 0x02, 0x1a, 0x04, - 0xaf, 0xbf, 0x00, 0x18, 0xa6, 0x06, 0x09, 0x04, 0xaf, 0xbf, 0x21, 0x00, - 0xac, 0x06, 0x09, 0x04, 0xaf, 0xb6, 0x08, 0x0c, 0xb1, 0xcc, 0x09, 0x04, - 0xaf, 0xb6, 0x67, 0x1c, 0xa7, 0x86, 0x00, 0x01, 0x09, 0x04, 0xaf, 0xda, - 0xa7, 0x86, 0x00, 0x04, 0x09, 0x04, 0xaf, 0xda, 0xa7, 0x86, 0x00, 0x07, - 0x05, 0xe8, 0x25, 0x00, 0xac, 0x06, 0x05, 0xd0, 0x24, 0x00, 0xac, 0x06, - 0x05, 0xb8, 0x08, 0x0c, 0xb1, 0xdc, 0x15, 0xa0, 0x88, 0xff, 0x01, 0x18, - 0x60, 0x50, 0xa9, 0x06, 0x15, 0x78, 0x00, 0xd6, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x04, 0x11, 0x20, 0x00, 0x16, 0x08, 0x0c, 0x19, 0x52, 0x00, 0x1e, - 0xa7, 0x86, 0x00, 0x08, 0x11, 0x48, 0x08, 0x0c, 0x9f, 0x14, 0x11, 0x30, - 0x08, 0x0c, 0x8c, 0xa5, 0x00, 0xde, 0x08, 0x0c, 0x9e, 0xd9, 0x00, 0xd0, - 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, 0x01, 0x90, 0xa7, 0x86, - 0x00, 0x03, 0x15, 0x28, 0x68, 0x37, 0x01, 0x03, 0x6b, 0x4a, 0x68, 0x47, - 0x00, 0x00, 0x08, 0x0c, 0xb4, 0x3c, 0x00, 0x16, 0x08, 0x0c, 0x9f, 0x88, - 0x08, 0x0c, 0x54, 0x7a, 0x00, 0x1e, 0x08, 0x0c, 0x9e, 0xcd, 0x00, 0xde, - 0x08, 0x0c, 0x9e, 0xd9, 0xac, 0xe0, 0x00, 0x18, 0x20, 0x01, 0xb6, 0x17, - 0x20, 0x04, 0xac, 0x02, 0x12, 0x10, 0x08, 0x04, 0xaf, 0x52, 0x01, 0x2e, - 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x8e, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0xa7, 0x86, 0x00, 0x06, 0x11, 0x50, - 0xa3, 0x86, 0x00, 0x05, 0x01, 0x28, 0x08, 0x0c, 0xb4, 0x3c, 0x08, 0x0c, - 0xb1, 0x55, 0x08, 0xf8, 0x00, 0xde, 0x0c, 0x00, 0xa7, 0x86, 0x00, 0x0a, - 0x09, 0x68, 0x08, 0x50, 0x08, 0x0c, 0xb1, 0xdc, 0x19, 0xc8, 0x81, 0xff, - 0x09, 0xb8, 0xa1, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x18, - 0x01, 0x30, 0xa1, 0x80, 0x00, 0x01, 0x20, 0x04, 0xa0, 0x86, 0x00, 0x2d, - 0x19, 0x58, 0x60, 0x00, 0xa0, 0x86, 0x00, 0x02, 0x19, 0x38, 0x08, 0x0c, - 0x9f, 0x03, 0x01, 0x30, 0x08, 0x0c, 0x9f, 0x14, 0x19, 0x08, 0x08, 0x0c, - 0x8c, 0xa5, 0x00, 0x38, 0x08, 0x0c, 0x2c, 0xf7, 0x08, 0x0c, 0x9f, 0x14, - 0x11, 0x10, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, 0x9e, 0xd9, 0x08, 0x04, - 0xaf, 0xb6, 0x00, 0xc6, 0x00, 0xe6, 0x00, 0x16, 0x2c, 0x08, 0x21, 0x70, - 0xa0, 0x06, 0x08, 0x0c, 0xb1, 0x76, 0x00, 0x1e, 0x01, 0x20, 0x60, 0x1c, - 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0xee, 0x00, 0xce, 0x00, 0x05, - 0xb0, 0x1c, 0xb0, 0x1c, 0xb0, 0x1c, 0xb0, 0x1c, 0xb0, 0x1c, 0xb0, 0x1c, - 0xb0, 0x1e, 0xb0, 0x1c, 0xa0, 0x06, 0x00, 0x05, 0x00, 0x46, 0x00, 0x16, - 0x70, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x24, 0xa4, 0xa4, 0x00, 0xff, - 0x84, 0x27, 0x2c, 0x00, 0x20, 0x09, 0x00, 0x20, 0x08, 0x0c, 0xb1, 0xa4, - 0x00, 0x1e, 0x00, 0x4e, 0x00, 0x36, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, - 0xad, 0x9c, 0x00, 0x3e, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x4f, 0x5d, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0xb6, 0x05, 0x20, 0x11, - 0xbc, 0x96, 0x08, 0x0c, 0x91, 0x66, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0xa0, 0x05, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x86, 0x00, 0x76, 0x00, 0x66, 0x00, 0x26, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x27, 0x40, 0x20, 0x61, 0xbe, 0x00, 0x20, 0x79, 0x00, 0x01, - 0x8f, 0xff, 0x09, 0x04, 0xb0, 0xab, 0x20, 0x71, 0xb6, 0x00, 0x76, 0x48, - 0x70, 0x68, 0x80, 0x01, 0xa6, 0x02, 0x1a, 0x04, 0xb0, 0xab, 0x88, 0xff, - 0x01, 0x28, 0x28, 0x00, 0xac, 0x06, 0x15, 0xb0, 0x20, 0x79, 0x00, 0x00, - 0x08, 0x0c, 0xb1, 0xcc, 0x05, 0x88, 0x24, 0x00, 0xac, 0x06, 0x05, 0x70, - 0x67, 0x1c, 0xa7, 0x86, 0x00, 0x06, 0x15, 0x50, 0xa7, 0x86, 0x00, 0x07, - 0x05, 0x38, 0x88, 0xff, 0x11, 0x40, 0x60, 0x18, 0xa2, 0x06, 0x15, 0x10, - 0x85, 0xff, 0x01, 0x18, 0x60, 0x50, 0xa1, 0x06, 0x11, 0xe8, 0x00, 0xd6, - 0x60, 0x00, 0xa0, 0x86, 0x00, 0x04, 0x11, 0x50, 0x08, 0x0c, 0xb3, 0xf6, - 0x60, 0x1f, 0x00, 0x07, 0x20, 0x01, 0xb8, 0xb6, 0x20, 0x04, 0x60, 0x16, - 0x08, 0x0c, 0x19, 0x52, 0x60, 0x10, 0x20, 0x68, 0x08, 0x0c, 0x9d, 0x16, - 0x01, 0x20, 0x00, 0x46, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0x4e, 0x00, 0xde, - 0x08, 0x0c, 0x9e, 0xd9, 0x88, 0xff, 0x11, 0x98, 0xac, 0xe0, 0x00, 0x18, - 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, 0xac, 0x02, 0x12, 0x10, 0x08, 0x04, - 0xb0, 0x5c, 0xa0, 0x06, 0x01, 0x2e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0x7e, - 0x00, 0x8e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0xa8, 0xc5, - 0x00, 0x01, 0x0c, 0xa0, 0x00, 0x76, 0x00, 0x56, 0x00, 0x86, 0x20, 0x41, - 0x00, 0x00, 0x20, 0x29, 0x00, 0x01, 0x2c, 0x20, 0x20, 0x19, 0x00, 0x02, - 0x62, 0x18, 0x00, 0x96, 0x20, 0x49, 0x00, 0x00, 0x08, 0x0c, 0x81, 0xb7, - 0x00, 0x9e, 0x00, 0x8e, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x82, 0x5d, - 0x08, 0x0c, 0xb0, 0x4d, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0xc6, 0x01, 0x56, 0x2c, 0x20, - 0x21, 0x28, 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x00, 0x16, - 0x00, 0x36, 0x08, 0x0c, 0x50, 0x1b, 0x11, 0xb0, 0x2c, 0x10, 0x00, 0x56, - 0x00, 0x86, 0x20, 0x41, 0x00, 0x00, 0x25, 0x08, 0x20, 0x29, 0x00, 0x01, - 0x00, 0x96, 0x20, 0x49, 0x00, 0x00, 0x08, 0x0c, 0x81, 0xb7, 0x00, 0x9e, - 0x00, 0x8e, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x82, 0x5d, 0x08, 0x0c, - 0xb0, 0x4d, 0x00, 0x5e, 0x00, 0x3e, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, - 0xb0, 0xdf, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x2e, 0x00, 0x05, 0x00, 0x76, 0x00, 0x56, 0x62, 0x18, 0x00, 0x86, - 0x20, 0x41, 0x00, 0x00, 0x20, 0x29, 0x00, 0x01, 0x20, 0x19, 0x00, 0x48, - 0x00, 0x96, 0x20, 0x49, 0x00, 0x00, 0x08, 0x0c, 0x81, 0xb7, 0x00, 0x9e, - 0x00, 0x8e, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x82, 0x5d, 0x2c, 0x20, - 0x08, 0x0c, 0xb0, 0x4d, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0xc6, 0x01, 0x56, 0x2c, 0x20, - 0x20, 0xa9, 0x00, 0x7f, 0x20, 0x09, 0x00, 0x00, 0x00, 0x16, 0x00, 0x36, - 0x08, 0x0c, 0x50, 0x1b, 0x11, 0xc0, 0x2c, 0x10, 0x00, 0x86, 0x20, 0x41, - 0x00, 0x00, 0x28, 0x28, 0x00, 0x46, 0x20, 0x21, 0x00, 0x01, 0x08, 0x0c, - 0xb3, 0xd8, 0x00, 0x4e, 0x00, 0x96, 0x20, 0x49, 0x00, 0x00, 0x08, 0x0c, - 0x81, 0xb7, 0x00, 0x9e, 0x00, 0x8e, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, - 0x82, 0x5d, 0x08, 0x0c, 0xb0, 0x4d, 0x00, 0x3e, 0x00, 0x1e, 0x81, 0x08, - 0x1f, 0x04, 0xb1, 0x2c, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x7e, 0x00, 0x5e, - 0x00, 0x4e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xf6, 0x38, 0x00, - 0xd0, 0x8c, 0x01, 0x30, 0xad, 0x82, 0x10, 0x00, 0x02, 0xb0, 0xad, 0x82, - 0xb6, 0x00, 0x02, 0x30, 0xad, 0x82, 0xee, 0x00, 0x02, 0x80, 0xad, 0x82, - 0xff, 0xff, 0x12, 0x68, 0x68, 0x00, 0xa0, 0x7d, 0x01, 0x38, 0x68, 0x03, - 0x00, 0x00, 0x6b, 0x52, 0x08, 0x0c, 0x54, 0x7a, 0x2f, 0x68, 0x0c, 0xb0, - 0x6b, 0x52, 0x08, 0x0c, 0x54, 0x7a, 0x00, 0xfe, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0xbe, 0x00, 0xa0, 0x05, - 0x11, 0x38, 0x20, 0x71, 0xb6, 0x00, 0x74, 0x48, 0x70, 0x68, 0x80, 0x01, - 0xa4, 0x02, 0x12, 0xd8, 0x21, 0x00, 0xac, 0x06, 0x01, 0x68, 0x60, 0x00, - 0xa0, 0x86, 0x00, 0x00, 0x01, 0x48, 0x60, 0x08, 0xa2, 0x06, 0x11, 0x30, - 0x60, 0x18, 0xa1, 0xa0, 0x00, 0x06, 0x24, 0x24, 0xa4, 0x06, 0x01, 0x40, - 0xac, 0xe0, 0x00, 0x18, 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, 0xac, 0x02, - 0x12, 0x20, 0x0c, 0x40, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x08, 0xa0, 0x06, - 0x00, 0x3e, 0x00, 0x4e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x06, - 0x08, 0x0c, 0x15, 0xfd, 0x00, 0x0e, 0x09, 0x0c, 0x15, 0x1a, 0x68, 0x37, - 0x01, 0x0d, 0x68, 0x5e, 0x00, 0x26, 0x20, 0x10, 0x08, 0x0c, 0x9d, 0x06, - 0x20, 0x01, 0x00, 0x00, 0x01, 0x20, 0x22, 0x00, 0xa0, 0x80, 0x00, 0x14, - 0x20, 0x04, 0x00, 0x2e, 0x68, 0x4a, 0x69, 0x56, 0x6c, 0x46, 0x68, 0x4f, - 0x00, 0x00, 0x20, 0x01, 0xb8, 0xbe, 0x20, 0x04, 0x68, 0x52, 0xa0, 0x06, - 0x68, 0xb2, 0x68, 0x02, 0x68, 0x3a, 0x68, 0x5a, 0x08, 0x0c, 0x54, 0x7a, - 0x00, 0xde, 0x00, 0x05, 0x67, 0x00, 0xa7, 0x86, 0x00, 0x00, 0x01, 0x58, - 0xa7, 0x86, 0x00, 0x01, 0x01, 0x40, 0xa7, 0x86, 0x00, 0x0a, 0x01, 0x28, - 0xa7, 0x86, 0x00, 0x09, 0x01, 0x10, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x00, 0xe6, 0x60, 0x18, 0x20, 0x70, 0x70, 0xa0, 0xa2, 0x06, 0x00, 0xee, - 0x00, 0x05, 0x00, 0x16, 0x60, 0x04, 0xa0, 0x8e, 0x00, 0x1e, 0x11, 0xa0, - 0x80, 0x07, 0x61, 0x30, 0xa1, 0x8c, 0x00, 0xff, 0xa1, 0x05, 0x60, 0x32, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x1f, 0x00, 0x05, - 0x20, 0x01, 0xb8, 0xb7, 0x20, 0x04, 0x60, 0x16, 0x08, 0x0c, 0x6c, 0xff, - 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x1e, 0x00, 0x05, 0xe0, 0x00, 0xe0, 0x00, - 0x00, 0x05, 0x60, 0x20, 0xd0, 0xe4, 0x01, 0x58, 0xd0, 0xcc, 0x01, 0x18, - 0x08, 0x0c, 0x9f, 0xf1, 0x00, 0x30, 0x08, 0x0c, 0xb3, 0xf6, 0x08, 0x0c, - 0x6b, 0x61, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, 0xa2, 0x80, 0x00, 0x07, - 0x20, 0x04, 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x02, 0xb2, 0x1f, 0xb2, 0x1f, - 0xb2, 0x1f, 0xb2, 0x24, 0xb2, 0x1f, 0xb2, 0x21, 0xb2, 0x21, 0xb2, 0x1f, - 0xb2, 0x21, 0xa0, 0x06, 0x00, 0x05, 0x00, 0xc6, 0x22, 0x60, 0x00, 0xce, - 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0xa2, 0x80, 0x00, 0x07, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0x0f, 0x00, 0x02, 0xb2, 0x36, 0xb2, 0x36, 0xb2, 0x36, - 0xb2, 0x36, 0xb2, 0x36, 0xb2, 0x36, 0xb2, 0x41, 0xb2, 0x36, 0xb2, 0x36, - 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2b, 0x00, 0x09, 0x60, 0x13, 0x2a, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x00, 0x05, 0x00, 0xc6, - 0x22, 0x60, 0x08, 0x0c, 0xb3, 0xf6, 0x60, 0x3f, 0x00, 0x00, 0x60, 0x20, - 0xc0, 0xf4, 0xc0, 0xcc, 0x60, 0x22, 0x60, 0x37, 0x00, 0x00, 0x00, 0xce, - 0x00, 0xd6, 0x22, 0x68, 0xa1, 0x86, 0x00, 0x07, 0x19, 0x04, 0xb2, 0x9c, - 0x68, 0x10, 0xa0, 0x05, 0x01, 0x38, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, - 0xd0, 0xfc, 0x11, 0x10, 0x00, 0xde, 0x08, 0xc0, 0x60, 0x07, 0x00, 0x3a, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, - 0x00, 0xc6, 0x2d, 0x60, 0x61, 0x00, 0xa1, 0x86, 0x00, 0x02, 0x19, 0x04, - 0xb3, 0x25, 0x60, 0x10, 0xa0, 0x05, 0x11, 0x38, 0x60, 0x00, 0xa0, 0x86, - 0x00, 0x07, 0x19, 0x0c, 0x15, 0x1a, 0x08, 0x04, 0xb3, 0x25, 0xa0, 0x8c, - 0xf0, 0x00, 0x11, 0x30, 0x00, 0x28, 0x20, 0x68, 0x68, 0x00, 0xa0, 0x05, - 0x1d, 0xe0, 0x2d, 0x00, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x04, 0xa0, 0x84, - 0x00, 0x03, 0xa0, 0x86, 0x00, 0x02, 0x11, 0x80, 0x60, 0x10, 0x20, 0x68, - 0x68, 0x4c, 0xc0, 0xdc, 0xc0, 0xf4, 0x68, 0x4e, 0x68, 0x50, 0xc0, 0xf4, - 0xc0, 0xfc, 0x68, 0x52, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, 0xac, 0x12, - 0x08, 0x04, 0xb3, 0x25, 0x20, 0x09, 0x00, 0x41, 0x08, 0x04, 0xb3, 0x1f, - 0xa1, 0x86, 0x00, 0x05, 0x15, 0xf0, 0x68, 0x10, 0xa0, 0x80, 0x00, 0x13, - 0x20, 0x04, 0xd0, 0xbc, 0x11, 0x18, 0x00, 0xde, 0x08, 0x04, 0xb2, 0x36, - 0xd0, 0xb4, 0x01, 0x28, 0xd0, 0xfc, 0x09, 0x0c, 0x15, 0x1a, 0x08, 0x04, - 0xb2, 0x54, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x6c, 0xff, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0xc6, 0x2d, 0x60, 0x61, 0x00, - 0xa1, 0x86, 0x00, 0x02, 0x01, 0x20, 0xa1, 0x86, 0x00, 0x04, 0x19, 0x04, - 0xb3, 0x25, 0x20, 0x71, 0xb9, 0x24, 0x70, 0x00, 0xa0, 0x86, 0x00, 0x03, - 0x11, 0x28, 0x70, 0x04, 0xac, 0x06, 0x11, 0x10, 0x70, 0x03, 0x00, 0x00, - 0x68, 0x10, 0xa0, 0x80, 0x00, 0x13, 0x20, 0x0c, 0xc1, 0xf4, 0xc1, 0xdc, - 0x21, 0x02, 0x80, 0x00, 0x20, 0x0c, 0xc1, 0xf4, 0xc1, 0xfc, 0xc1, 0xbc, - 0x21, 0x02, 0x20, 0x09, 0x00, 0x42, 0x08, 0x04, 0xb3, 0x1f, 0x00, 0x36, - 0x00, 0xd6, 0x00, 0xd6, 0x08, 0x0c, 0x15, 0xfd, 0x00, 0x3e, 0x09, 0x0c, - 0x15, 0x1a, 0x68, 0x37, 0x01, 0x0d, 0x68, 0x03, 0x00, 0x00, 0x68, 0x3b, - 0x00, 0x00, 0x68, 0x5b, 0x00, 0x00, 0x6b, 0x5e, 0x68, 0x57, 0x00, 0x45, - 0x2c, 0x00, 0x68, 0x62, 0x60, 0x34, 0x68, 0x72, 0x23, 0x60, 0x60, 0x20, - 0xc0, 0xdd, 0x60, 0x22, 0x60, 0x18, 0xa0, 0x80, 0x00, 0x28, 0x20, 0x04, - 0xa0, 0x84, 0x00, 0xff, 0x80, 0x07, 0x63, 0x50, 0x6b, 0x4a, 0x68, 0x46, - 0x68, 0x4f, 0x00, 0x00, 0x68, 0x53, 0x00, 0x00, 0x6d, 0x6a, 0x6e, 0x66, - 0x68, 0x6f, 0x00, 0x01, 0x08, 0x0c, 0x54, 0x7a, 0x20, 0x19, 0x00, 0x45, - 0x60, 0x08, 0x20, 0x68, 0x08, 0x0c, 0xad, 0x9c, 0x2d, 0x00, 0x60, 0x0a, - 0x60, 0x1f, 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x3f, 0x00, 0x00, 0x00, 0xde, 0x00, 0x3e, 0x00, 0x38, 0x60, 0x3f, - 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, 0x08, 0x0c, 0xac, 0x12, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x13, 0x11, 0x28, 0x60, 0x04, - 0xa0, 0x82, 0x00, 0x85, 0x20, 0x08, 0x00, 0xc2, 0xa1, 0x86, 0x00, 0x27, - 0x11, 0x78, 0x08, 0x0c, 0x71, 0x02, 0x00, 0x36, 0x00, 0xd6, 0x60, 0x10, - 0x20, 0x68, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xb1, 0x55, 0x00, 0xde, - 0x00, 0x3e, 0x08, 0x0c, 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x86, 0x00, 0x14, - 0x0d, 0x70, 0x08, 0x0c, 0x86, 0xef, 0x00, 0x05, 0xb3, 0x51, 0xb3, 0x4f, - 0xb3, 0x4f, 0xb3, 0x4f, 0xb3, 0x4f, 0xb3, 0x4f, 0xb3, 0x51, 0x08, 0x0c, - 0x15, 0x1a, 0x08, 0x0c, 0x71, 0x02, 0x60, 0x03, 0x00, 0x0c, 0x08, 0x0c, - 0x71, 0xe5, 0x00, 0x05, 0xa1, 0x82, 0x00, 0x8c, 0x12, 0x20, 0xa1, 0x82, - 0x00, 0x85, 0x02, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0x86, 0xef, 0x00, 0x05, - 0xb3, 0x69, 0xb3, 0x69, 0xb3, 0x69, 0xb3, 0x69, 0xb3, 0x6b, 0xb3, 0x89, - 0xb3, 0x69, 0x08, 0x0c, 0x15, 0x1a, 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, - 0x86, 0x4e, 0x01, 0xa0, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, - 0x20, 0x09, 0xbc, 0x8e, 0x21, 0x0c, 0x61, 0x36, 0x20, 0x09, 0xbc, 0x8f, - 0x21, 0x0c, 0x61, 0x3a, 0x60, 0x0b, 0xff, 0xff, 0x69, 0x18, 0x61, 0x1a, - 0x60, 0x1f, 0x00, 0x04, 0x08, 0x0c, 0x6c, 0xff, 0x2d, 0x60, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x86, 0xa4, 0x00, 0x05, - 0x00, 0xe6, 0x60, 0x18, 0x20, 0x70, 0x70, 0x00, 0xd0, 0xec, 0x00, 0xee, - 0x00, 0x05, 0x60, 0x10, 0xa0, 0x8c, 0xf0, 0x00, 0x09, 0x04, 0xb3, 0xd7, - 0xa0, 0x80, 0x00, 0x13, 0x20, 0x0c, 0xd1, 0xec, 0x05, 0xd0, 0x20, 0x01, - 0xb6, 0x72, 0x20, 0x04, 0xd0, 0xec, 0x05, 0xa8, 0x60, 0x03, 0x00, 0x02, - 0x60, 0x20, 0xc0, 0xe5, 0x60, 0x22, 0xd1, 0xac, 0x01, 0x80, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x53, 0x73, 0x00, 0xfe, 0x01, 0x50, 0x20, 0x01, - 0xb8, 0xb8, 0x20, 0x04, 0x60, 0x3e, 0x20, 0x09, 0xb6, 0x72, 0x21, 0x0c, - 0xd1, 0xf4, 0x11, 0xe8, 0x00, 0x80, 0x20, 0x09, 0xb6, 0x72, 0x21, 0x0c, - 0xd1, 0xf4, 0x01, 0x28, 0x60, 0x20, 0xc0, 0xe4, 0x60, 0x22, 0xa0, 0x06, - 0x00, 0xa0, 0x20, 0x01, 0xb8, 0xb8, 0x20, 0x0c, 0x81, 0x03, 0xa1, 0x00, - 0x60, 0x3e, 0x60, 0x18, 0xa0, 0x88, 0x00, 0x2b, 0x21, 0x04, 0xa0, 0x05, - 0x01, 0x18, 0xa0, 0x88, 0x00, 0x03, 0x0c, 0xd0, 0x2c, 0x0a, 0x60, 0x0f, - 0x00, 0x00, 0xa0, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, - 0x00, 0xe6, 0x61, 0x50, 0xa2, 0xf0, 0x00, 0x2b, 0x2e, 0x04, 0x20, 0x60, - 0x8c, 0xff, 0x01, 0x80, 0x84, 0xff, 0x11, 0x18, 0x60, 0x50, 0xa1, 0x06, - 0x11, 0x38, 0x60, 0x0c, 0x20, 0x72, 0x08, 0x0c, 0x6b, 0x61, 0x08, 0x0c, - 0x86, 0xa4, 0x00, 0x10, 0xac, 0xf0, 0x00, 0x03, 0x2e, 0x64, 0x0c, 0x70, - 0x00, 0xee, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x60, 0x18, - 0xa0, 0xe8, 0x00, 0x2b, 0x2d, 0x04, 0xa0, 0x05, 0x01, 0x40, 0xac, 0x06, - 0x01, 0x20, 0x2d, 0x04, 0xa0, 0xe8, 0x00, 0x03, 0x0c, 0xb8, 0x60, 0x0c, - 0x20, 0x6a, 0x00, 0xde, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, - 0x20, 0x11, 0xb6, 0x28, 0x22, 0x04, 0xa0, 0x84, 0x00, 0xff, 0x20, 0x19, - 0xbc, 0x8e, 0x23, 0x34, 0xa6, 0x36, 0x11, 0xd8, 0x83, 0x18, 0x23, 0x34, - 0x22, 0x04, 0xa0, 0x84, 0xff, 0x00, 0xa6, 0x36, 0x11, 0xa0, 0x20, 0x11, - 0xbc, 0x90, 0x60, 0x18, 0xa0, 0x98, 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, - 0x08, 0x0c, 0x91, 0x66, 0x11, 0x50, 0x20, 0x11, 0xbc, 0x94, 0x60, 0x18, - 0xa0, 0x98, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0x91, 0x66, - 0x11, 0x00, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0xb6, 0x00, 0x08, 0x0c, 0x4c, 0x28, 0x08, 0x0c, 0x2a, 0xed, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x60, 0x18, 0x20, 0x70, 0x70, 0x00, - 0xd0, 0xfc, 0x01, 0x08, 0x00, 0x11, 0x00, 0xee, 0x00, 0x05, 0x68, 0x50, - 0xc0, 0xe5, 0x68, 0x52, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x76, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, 0x00, 0x16, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, 0xb8, 0xea, 0x25, 0x2c, 0x20, 0x21, - 0xb8, 0xf0, 0x24, 0x24, 0x20, 0x61, 0xbe, 0x00, 0x20, 0x71, 0xb6, 0x00, - 0x76, 0x48, 0x70, 0x68, 0xa6, 0x06, 0x05, 0x78, 0x67, 0x1c, 0xa7, 0x86, - 0x00, 0x01, 0x01, 0x18, 0xa7, 0x86, 0x00, 0x08, 0x15, 0x00, 0x25, 0x00, - 0xac, 0x06, 0x01, 0xe8, 0x24, 0x00, 0xac, 0x06, 0x01, 0xd0, 0x08, 0x0c, - 0xb1, 0xcc, 0x01, 0xb8, 0x08, 0x0c, 0xb1, 0xdc, 0x11, 0xa0, 0x60, 0x00, - 0xa0, 0x86, 0x00, 0x04, 0x11, 0x20, 0x00, 0x16, 0x08, 0x0c, 0x19, 0x52, - 0x00, 0x1e, 0x08, 0x0c, 0x9f, 0x03, 0x11, 0x10, 0x08, 0x0c, 0x2c, 0xf7, - 0x08, 0x0c, 0x9f, 0x14, 0x11, 0x10, 0x08, 0x0c, 0x8c, 0xa5, 0x08, 0x0c, - 0x9e, 0xd9, 0xac, 0xe0, 0x00, 0x18, 0x20, 0x01, 0xb6, 0x17, 0x20, 0x04, - 0xac, 0x02, 0x12, 0x08, 0x08, 0x58, 0x01, 0x2e, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0xb6, 0x40, 0xd5, 0xa4, 0x01, 0x18, 0x70, 0x34, - 0x80, 0x00, 0x70, 0x36, 0xd5, 0xb4, 0x01, 0x18, 0x70, 0x30, 0x80, 0x00, - 0x70, 0x32, 0xd5, 0xac, 0x01, 0x78, 0x25, 0x00, 0xa0, 0x84, 0x00, 0x07, - 0xa0, 0x8e, 0x00, 0x03, 0x01, 0x48, 0xa0, 0x8e, 0x00, 0x04, 0x01, 0x30, - 0xa0, 0x8e, 0x00, 0x05, 0x01, 0x18, 0x20, 0x71, 0xb6, 0x4a, 0x04, 0xc9, - 0x00, 0x1e, 0x00, 0xee, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, - 0x00, 0x06, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xb6, 0x40, 0xd5, 0xa4, 0x01, 0x18, 0x70, 0x34, 0x80, 0x00, 0x70, 0x36, - 0xd5, 0xb4, 0x01, 0x18, 0x70, 0x30, 0x80, 0x00, 0x70, 0x32, 0xd5, 0xac, - 0x01, 0x78, 0x25, 0x00, 0xa0, 0x84, 0x00, 0x07, 0xa0, 0x8e, 0x00, 0x03, - 0x01, 0x48, 0xa0, 0x8e, 0x00, 0x04, 0x01, 0x30, 0xa0, 0x8e, 0x00, 0x05, - 0x01, 0x18, 0x20, 0x71, 0xb6, 0x4a, 0x00, 0x89, 0x00, 0x1e, 0x00, 0xee, - 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xb6, 0x42, 0x00, 0x21, 0x00, 0xee, - 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x2e, 0x04, 0x80, 0x00, 0x20, 0x72, - 0x12, 0x20, 0x8e, 0x70, 0x2e, 0x04, 0x80, 0x00, 0x20, 0x72, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x40, 0x0c, 0x99, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0xb6, 0x44, 0x0c, 0x69, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0xb6, 0x40, 0x70, 0x44, 0x80, 0x00, 0x70, 0x46, 0x00, 0xee, 0x00, 0x0e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, - 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, - 0xdb, 0x06 -}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_version = 2*1024+2; +#else +unsigned short risc_code_version = 2*1024+2; +#endif -struct firmware ql2200_fw = { - .size = sizeof(ql2200_fw_bin), - .data = ql2200_fw_bin +#ifdef UNIQUE_FW_NAME +unsigned char fw2200tp_version_str[] = {2,2,8}; +#else +unsigned char firmware_version[] = {2,2,8}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2200tp_VERSION_STRING "2.02.08" +#else +#define FW_VERSION_STRING "2.02.08" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_addr01 = 0x1000 ; +#else +unsigned short risc_code_addr01 = 0x1000 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0470, 0x0000, 0x0000, 0xa52b, 0x0000, 0x0002, 0x0002, 0x0008, + 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3232, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x322e, 0x3032, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20c1, + 0x0005, 0x2001, 0x017f, 0x2003, 0x0000, 0x20c9, 0xbbff, 0x2091, + 0x2000, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x299f, + 0x2051, 0xb600, 0x2a70, 0x2029, 0xee00, 0x2031, 0xffff, 0x2039, + 0xede9, 0x2021, 0x0200, 0x0804, 0x146d, 0x20a1, 0xb52b, 0xa00e, + 0x20a9, 0x08d5, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a, + 0x746e, 0x20a1, 0xbe00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d, + 0xa18c, 0x000f, 0x2001, 0x000b, 0xa112, 0xa00e, 0x21a8, 0x41a4, + 0x3400, 0x8211, 0x1dd8, 0x7164, 0x3400, 0xa102, 0x0120, 0x0218, + 0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xb600, + 0x810d, 0x810d, 0x810d, 0x810d, 0xa18c, 0x000f, 0x2001, 0x0001, + 0xa112, 0x20a1, 0x1000, 0xa00e, 0x21a8, 0x41a4, 0x8211, 0x1de0, + 0x2009, 0xb600, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e, + 0x41a4, 0x080c, 0x1416, 0x080c, 0x1637, 0x080c, 0x17d4, 0x080c, + 0x1fbe, 0x080c, 0x4c72, 0x080c, 0x8646, 0x080c, 0x15c0, 0x080c, + 0x2ef9, 0x080c, 0x5dfc, 0x080c, 0x53b3, 0x080c, 0x6940, 0x080c, + 0x2545, 0x080c, 0x6bd3, 0x080c, 0x642d, 0x080c, 0x23ff, 0x080c, + 0x2513, 0x2091, 0x3009, 0x7823, 0x0000, 0x1004, 0x10c5, 0x7820, + 0xa086, 0x0002, 0x1150, 0x7823, 0x4000, 0x0e04, 0x10bd, 0x781b, + 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, 0x7003, 0x0000, + 0x2a70, 0x7000, 0xa08e, 0x0003, 0x1158, 0x080c, 0x3f4f, 0x080c, + 0x2f20, 0x080c, 0x5e4a, 0x080c, 0x5562, 0x080c, 0x696b, 0x0c80, + 0x000b, 0x0c98, 0x10e4, 0x10e5, 0x1215, 0x10e2, 0x12e2, 0x1413, + 0x1414, 0x1415, 0x080c, 0x151a, 0x0005, 0x0126, 0x00f6, 0x2091, + 0x8000, 0x7000, 0xa086, 0x0001, 0x1904, 0x11f2, 0x080c, 0x158d, + 0x080c, 0x5b41, 0x0150, 0x080c, 0x5b67, 0x15c0, 0x2079, 0x0100, + 0x7828, 0xa085, 0x1800, 0x782a, 0x0488, 0x080c, 0x5a79, 0x7000, + 0xa086, 0x0001, 0x1904, 0x11f2, 0x708c, 0xa086, 0x0028, 0x1904, + 0x11f2, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, + 0xffff, 0x7a28, 0xa295, 0x1e2f, 0x7a2a, 0x2011, 0x5a14, 0x080c, + 0x6a0e, 0x2011, 0x5a07, 0x080c, 0x6ace, 0x2011, 0x5a56, 0x080c, + 0x6a0e, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0x2011, 0x8030, 0x2019, + 0x0000, 0x708b, 0x0000, 0x080c, 0x1e05, 0x00e8, 0x080c, 0x44d6, + 0x2079, 0x0100, 0x7844, 0xa005, 0x1904, 0x11f2, 0x2011, 0x4b23, + 0x080c, 0x6a0e, 0x2011, 0x5a56, 0x080c, 0x6a0e, 0x080c, 0x1e05, + 0x2001, 0xb88d, 0x2004, 0x780e, 0x7840, 0xa084, 0xfffb, 0x7842, + 0x2011, 0x8010, 0x73cc, 0x080c, 0x3f13, 0x723c, 0xc284, 0x723e, + 0x2001, 0xb60c, 0x200c, 0xc1ac, 0x2102, 0x080c, 0x7fbc, 0x2011, + 0x0004, 0x080c, 0x9d1c, 0x080c, 0x52bf, 0x080c, 0x5b41, 0x0158, + 0x080c, 0x4c4a, 0x0140, 0x708b, 0x0001, 0x70c7, 0x0000, 0x080c, + 0x4673, 0x0804, 0x11f2, 0x080c, 0x537b, 0x0120, 0x7a0c, 0xc2b4, + 0x7a0e, 0x0060, 0x7073, 0x0000, 0x080c, 0xa0c4, 0x70d4, 0xd09c, + 0x1128, 0x70a0, 0xa005, 0x0110, 0x080c, 0x4c28, 0x70df, 0x0000, + 0x70db, 0x0000, 0x72d4, 0x080c, 0x5b41, 0x1180, 0x2011, 0x0000, + 0x0016, 0x080c, 0x2920, 0x2019, 0xb88f, 0x211a, 0x001e, 0x7053, + 0xffff, 0x7057, 0x00ef, 0x7077, 0x0000, 0x0020, 0x2019, 0xb88f, + 0x201b, 0x0000, 0x2079, 0xb652, 0x7804, 0xd0ac, 0x0108, 0xc295, + 0x72d6, 0x080c, 0x5b41, 0x0118, 0xa296, 0x0004, 0x0548, 0x2011, + 0x0001, 0x080c, 0x9d1c, 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, + 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, 0x0003, + 0x782a, 0x00fe, 0x080c, 0x2aed, 0x2011, 0x0005, 0x080c, 0x80fc, + 0x080c, 0x71e5, 0x080c, 0x5b41, 0x0148, 0x00c6, 0x2061, 0x0100, + 0x0016, 0x080c, 0x2920, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, + 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, + 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, 0x0003, 0x782a, 0x00fe, + 0x2011, 0x0005, 0x080c, 0x80fc, 0x080c, 0x71e5, 0x080c, 0x5b41, + 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2920, 0x61e2, + 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x5b41, + 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x5b41, + 0x1118, 0x2009, 0x0000, 0x0010, 0x2009, 0x007e, 0x080c, 0x2dcc, + 0x8108, 0x1f04, 0x1206, 0x00ce, 0x7073, 0x0000, 0x7074, 0xa084, + 0x00ff, 0x7076, 0x70a3, 0x0000, 0x0005, 0x0126, 0x2091, 0x8000, + 0x7000, 0xa086, 0x0002, 0x1904, 0x12e0, 0x709c, 0xa086, 0xffff, + 0x0130, 0x080c, 0x2aed, 0x080c, 0x71e5, 0x0804, 0x12e0, 0x70d4, + 0xd0ac, 0x1110, 0xd09c, 0x0540, 0xd084, 0x0530, 0x0006, 0x0016, + 0x2001, 0x0103, 0x2009, 0xb88d, 0x210c, 0x2102, 0x001e, 0x000e, + 0xd08c, 0x01d0, 0x70d8, 0xa086, 0xffff, 0x0190, 0x080c, 0x2c4c, + 0x080c, 0x71e5, 0x70d4, 0xd094, 0x1904, 0x12e0, 0x2011, 0x0001, + 0x2019, 0x0000, 0x080c, 0x2c84, 0x080c, 0x71e5, 0x0804, 0x12e0, + 0x70dc, 0xa005, 0x1904, 0x12e0, 0x7098, 0xa005, 0x1904, 0x12e0, + 0x70d4, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x12e0, 0x080c, 0x537b, + 0x1904, 0x12e0, 0x2001, 0xb653, 0x2004, 0xd0ac, 0x01c8, 0x0156, + 0x00c6, 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, 0x080c, 0x501b, + 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x126d, + 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x12e0, + 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, 0xb88d, 0x210c, 0x2102, + 0x001e, 0x000e, 0x71a8, 0x81ff, 0x11b0, 0xa006, 0x2009, 0x0200, + 0x20a9, 0x0002, 0x20a1, 0xb8df, 0x40a1, 0x2009, 0x0700, 0x20a9, + 0x0002, 0x20a1, 0xb8cf, 0x40a1, 0x7070, 0x8007, 0x7174, 0x810f, + 0x20a9, 0x0002, 0x40a1, 0x20a1, 0xb8d3, 0x2009, 0x0000, 0x080c, + 0x1500, 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x40a1, 0x7030, + 0xc08c, 0x7032, 0x7003, 0x0003, 0x709f, 0xffff, 0x080c, 0x1586, + 0xa006, 0x080c, 0x27f8, 0x080c, 0x3f85, 0x00f6, 0x2079, 0x0100, + 0x080c, 0x5b67, 0x0150, 0x080c, 0x5b41, 0x7828, 0x0118, 0xa084, + 0xe1ff, 0x0010, 0xa084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0xb8e2, + 0x2004, 0xa086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x80fc, + 0x2011, 0x0000, 0x080c, 0x8106, 0x080c, 0x71e5, 0x080c, 0x72a2, + 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2079, 0x0100, 0x2009, 0xb634, 0x2104, 0xa005, 0x1110, 0x080c, + 0x294c, 0x2009, 0x00f7, 0x080c, 0x4c11, 0x7940, 0xa18c, 0x0010, + 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, + 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, + 0x1350, 0x080c, 0x5b53, 0x0158, 0x080c, 0x5b67, 0x1128, 0x2001, + 0xb89e, 0x2003, 0x0000, 0x0070, 0x080c, 0x5b49, 0x0dc0, 0x2001, + 0xb89e, 0x2003, 0xaaaa, 0x2001, 0xb89f, 0x2003, 0x0001, 0x080c, + 0x5a79, 0x0058, 0x080c, 0x5b41, 0x0140, 0x2009, 0x00f8, 0x080c, + 0x4c11, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, + 0xd09c, 0x1138, 0x080c, 0x5b41, 0x0138, 0x7824, 0xd0ac, 0x1904, + 0x13fa, 0x1f04, 0x132f, 0x0070, 0x7824, 0x080c, 0x5b5d, 0x0118, + 0xd0ac, 0x1904, 0x13fa, 0xa084, 0x1800, 0x0d98, 0x7003, 0x0001, + 0x0804, 0x13fa, 0x2001, 0x0001, 0x080c, 0x27f8, 0x0804, 0x1409, + 0x7850, 0xa084, 0x0180, 0x7852, 0x782f, 0x0020, 0x20a9, 0x0046, + 0x1d04, 0x1358, 0x080c, 0x6ab6, 0x1f04, 0x1358, 0x7850, 0xa084, + 0x0180, 0xa085, 0x0400, 0x7852, 0x782f, 0x0000, 0x080c, 0x5b53, + 0x0158, 0x080c, 0x5b67, 0x1128, 0x2001, 0xb89e, 0x2003, 0x0000, + 0x0070, 0x080c, 0x5b49, 0x0dc0, 0x2001, 0xb89e, 0x2003, 0xaaaa, + 0x2001, 0xb89f, 0x2003, 0x0001, 0x080c, 0x5a79, 0x0020, 0x2009, + 0x00f8, 0x080c, 0x4c11, 0x20a9, 0x000e, 0xe000, 0x1f04, 0x1385, + 0x7850, 0xa084, 0x0180, 0xa085, 0x1400, 0x7852, 0x080c, 0x5b41, + 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, 0x2019, + 0xea60, 0x7820, 0xd09c, 0x1558, 0x080c, 0x5b41, 0x05d8, 0x7824, + 0xd0ac, 0x1904, 0x13fa, 0x080c, 0x5b67, 0x1508, 0x0046, 0x2021, + 0x0190, 0x8421, 0x1df0, 0x004e, 0x8421, 0x11c8, 0x7827, 0x0048, + 0x20a9, 0x01f4, 0x1d04, 0x13b2, 0x080c, 0x6ab6, 0x1f04, 0x13b2, + 0x7824, 0xa084, 0x0068, 0x15c8, 0x2001, 0xb89e, 0x2003, 0xaaaa, + 0x2001, 0xb89f, 0x2003, 0x0001, 0x7003, 0x0001, 0x0498, 0x1d04, + 0x13cb, 0x080c, 0x6ab6, 0x8319, 0x1960, 0x2009, 0xb634, 0x2104, + 0x8000, 0x200a, 0xa084, 0xfff0, 0x0120, 0x200b, 0x0000, 0x080c, + 0x294c, 0x00d8, 0x080c, 0x5b53, 0x1140, 0xa4a2, 0x0064, 0x1128, + 0x080c, 0x5b18, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0xe000, + 0xe000, 0x7824, 0x080c, 0x5b5d, 0x0110, 0xd0ac, 0x1158, 0xa084, + 0x1800, 0x09a8, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, + 0x27f8, 0x0048, 0x2001, 0xb634, 0x2003, 0x0000, 0x7827, 0x0048, + 0x7828, 0xc09d, 0x782a, 0x7850, 0xa084, 0x0180, 0xa085, 0x0400, + 0x7852, 0x015e, 0x003e, 0x000e, 0x080c, 0x155d, 0x012e, 0x00fe, + 0x004e, 0x001e, 0x0005, 0x0005, 0x0005, 0x0005, 0x2a70, 0x2061, + 0xb8c2, 0x2063, 0x0002, 0x6007, 0x0002, 0x600b, 0x0008, 0x600f, + 0x0017, 0x2001, 0xb89e, 0x2003, 0x0000, 0x708b, 0x0000, 0x2009, + 0x0100, 0x2104, 0xa082, 0x0002, 0x0218, 0x7053, 0xffff, 0x0010, + 0x7053, 0x0000, 0x705b, 0xffff, 0x7073, 0x0000, 0x7077, 0x0000, + 0x080c, 0xa0c4, 0x2061, 0xb88e, 0x6003, 0x0909, 0x6007, 0x0000, + 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, + 0x601b, 0x0000, 0x601f, 0x07d0, 0x2061, 0xb896, 0x6003, 0x8000, + 0x6007, 0x0000, 0x600b, 0x0000, 0x600f, 0x0200, 0x6013, 0x00ff, + 0x6017, 0x0000, 0x601b, 0x0001, 0x601f, 0x0000, 0x2061, 0xb8b9, + 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, + 0x2001, 0xb628, 0x2003, 0x0000, 0x0005, 0x04a0, 0x2011, 0x0000, + 0x81ff, 0x0570, 0xa186, 0x0001, 0x1148, 0x2031, 0x8fff, 0x2039, + 0xd601, 0x2021, 0x0100, 0x2029, 0xd600, 0x00e8, 0xa186, 0x0002, + 0x1118, 0x2011, 0x0000, 0x00b8, 0xa186, 0x0005, 0x1118, 0x2011, + 0x0001, 0x0088, 0xa186, 0x0009, 0x1118, 0x2011, 0x0002, 0x0058, + 0xa186, 0x000a, 0x1118, 0x2011, 0x0002, 0x0028, 0xa186, 0x0055, + 0x1110, 0x2011, 0x0003, 0x3800, 0xa084, 0xfffc, 0xa205, 0x20c0, + 0x0804, 0x104d, 0xa00e, 0x2011, 0x0003, 0x2019, 0x14a9, 0x0804, + 0x14fa, 0x2019, 0xaaaa, 0x2061, 0xffff, 0x2c14, 0x2362, 0xe000, + 0xe000, 0x2c04, 0xa306, 0x2262, 0x1110, 0xc1b5, 0xc1a5, 0x2011, + 0x0000, 0x2019, 0x14bc, 0x04f0, 0x2019, 0xaaaa, 0x2061, 0xffff, + 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, 0x2061, 0x7fff, 0xe000, + 0xe000, 0x2c04, 0x2061, 0xffff, 0x2262, 0xa306, 0x0110, 0xc18d, + 0x0008, 0xc185, 0x2011, 0x0002, 0x2019, 0x14d7, 0x0418, 0x2061, + 0xffff, 0x2019, 0xaaaa, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c04, + 0x2262, 0xa306, 0x1180, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, + 0x2061, 0x7fff, 0x2c04, 0x2061, 0xffff, 0x2262, 0xa306, 0x1110, + 0xc195, 0x0008, 0xc19d, 0x2011, 0x0001, 0x2019, 0x14f8, 0x0010, + 0x0804, 0x146e, 0x3800, 0xa084, 0xfffc, 0xa205, 0x20c0, 0x0837, + 0x2011, 0x0000, 0x080c, 0x501b, 0x1178, 0x6004, 0xa0c4, 0x00ff, + 0xa8c6, 0x0006, 0x0128, 0xa0c4, 0xff00, 0xa8c6, 0x0600, 0x1120, + 0xa186, 0x0080, 0x0108, 0x8210, 0x8108, 0xa186, 0x0100, 0x1d50, + 0x2208, 0x0005, 0x2091, 0x8000, 0x0e04, 0x151c, 0x0006, 0x0016, + 0x2079, 0x0000, 0x7818, 0xd084, 0x1de8, 0x001e, 0x792e, 0x000e, + 0x782a, 0x000e, 0x7826, 0x3900, 0x783a, 0x7823, 0x8002, 0x781b, + 0x0001, 0x2091, 0x5000, 0x0126, 0x0156, 0x0146, 0x20a9, 0x0010, + 0x20a1, 0xba0d, 0x2091, 0x2000, 0x40a1, 0x20a9, 0x0010, 0x2091, + 0x2200, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2400, 0x40a1, 0x20a9, + 0x0010, 0x2091, 0x2600, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2800, + 0x40a1, 0x014e, 0x015e, 0x012e, 0x2079, 0xb600, 0x7803, 0x0005, + 0x2091, 0x4080, 0x04c9, 0x0cf8, 0x0005, 0x0006, 0x080c, 0x15a8, + 0x1518, 0x00f6, 0x2079, 0xb624, 0x2f04, 0x8000, 0x207a, 0xa082, + 0x000f, 0x0258, 0xa006, 0x207a, 0x2079, 0xb626, 0x2f04, 0xa084, + 0x0001, 0xa086, 0x0001, 0x207a, 0x0070, 0x2079, 0xb626, 0x2f7c, + 0x8fff, 0x1128, 0x2001, 0x0c03, 0x2003, 0x0040, 0x0020, 0x2001, + 0x0c03, 0x2003, 0x00c0, 0x00fe, 0x000e, 0x0005, 0x0409, 0x1120, + 0x2001, 0x0c03, 0x2003, 0x0080, 0x0005, 0x00d1, 0x1120, 0x2001, + 0x0c03, 0x2003, 0x0040, 0x0005, 0x0006, 0x0091, 0x1178, 0x2001, + 0x0c03, 0x2003, 0x0040, 0x2009, 0x0fff, 0x00a1, 0x2001, 0x0c03, + 0x2003, 0x0080, 0x2009, 0x0fff, 0x0069, 0x0c88, 0x000e, 0x0005, + 0x00c6, 0x2061, 0x0c00, 0x2c04, 0xa084, 0x00ff, 0xa086, 0x00aa, + 0x00ce, 0x0005, 0x0156, 0x0126, 0xa18c, 0x0fff, 0x21a8, 0x1d04, + 0x15b7, 0x2091, 0x6000, 0x1f04, 0x15b7, 0x012e, 0x015e, 0x0005, + 0x2071, 0xb600, 0x7160, 0x712e, 0x2021, 0x0001, 0xa190, 0x0030, + 0xa298, 0x0030, 0x0240, 0x7064, 0xa302, 0x1228, 0x220a, 0x2208, + 0x2310, 0x8420, 0x0ca8, 0x3800, 0xd08c, 0x0148, 0x7064, 0xa086, + 0xb600, 0x0128, 0x7067, 0xb600, 0x2011, 0x1000, 0x0c48, 0x200b, + 0x0000, 0x74b2, 0x74b6, 0x0005, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb600, 0x70b4, 0xa0ea, 0x0010, 0x0268, 0x8001, 0x70b6, + 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, + 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, 0x2071, 0xb600, + 0x0126, 0x2091, 0x8000, 0x70b4, 0x8001, 0x0260, 0x70b6, 0x702c, + 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, 0x012e, + 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb600, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70b4, 0x8000, + 0x70b6, 0x012e, 0x00ee, 0x0005, 0x8dff, 0x0138, 0x6804, 0x6807, + 0x0000, 0x0006, 0x0c49, 0x00de, 0x0cb8, 0x0005, 0x00e6, 0x2071, + 0xb600, 0x70b4, 0xa08a, 0x0010, 0xa00d, 0x00ee, 0x0005, 0x00e6, + 0x2071, 0xb913, 0x7007, 0x0000, 0x701b, 0x0000, 0x701f, 0x0000, + 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, 0x7012, 0x00ee, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00e6, 0x2270, 0x700b, 0x0000, 0x2071, + 0xb913, 0x7018, 0xa088, 0xb91c, 0x220a, 0x8000, 0xa084, 0x0007, + 0x701a, 0x7004, 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, 0x0089, + 0x00fe, 0x00ee, 0x012e, 0x0005, 0x00e6, 0x2071, 0xb913, 0x7004, + 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, 0x0019, 0x00fe, 0x00ee, + 0x0005, 0x7000, 0x0002, 0x1677, 0x16db, 0x16f8, 0x16f8, 0x7018, + 0x711c, 0xa106, 0x1118, 0x7007, 0x0000, 0x0005, 0x00d6, 0xa180, + 0xb91c, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007, 0x711e, + 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, 0x7836, 0x682c, 0x783a, + 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, 0x7016, 0x6804, 0x00de, + 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, + 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0xa182, + 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, 0x7212, 0x8203, 0x7822, + 0x7803, 0x0020, 0x7803, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x2098, 0x20a1, 0x0014, + 0x7803, 0x0026, 0x710c, 0x2011, 0x0040, 0xa182, 0x0040, 0x1210, + 0x2110, 0xa006, 0x700e, 0x22a8, 0x53a6, 0x8203, 0x7822, 0x7803, + 0x0020, 0x3300, 0x7016, 0x7803, 0x0001, 0x015e, 0x014e, 0x013e, + 0x002e, 0x001e, 0x0005, 0x0136, 0x0146, 0x0156, 0x2099, 0xb6fa, + 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x0126, + 0x2091, 0x8000, 0x7803, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, + 0x7002, 0x700b, 0xb6f5, 0x012e, 0x015e, 0x014e, 0x013e, 0x0005, + 0x0136, 0x0146, 0x0156, 0x2001, 0xb729, 0x209c, 0x20a1, 0x0014, + 0x7803, 0x0026, 0x2001, 0xb72a, 0x20ac, 0x53a6, 0x2099, 0xb72b, + 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x0126, + 0x2091, 0x8000, 0x7803, 0x0001, 0x7007, 0x0004, 0x7000, 0xc08c, + 0x7002, 0x700b, 0xb726, 0x012e, 0x015e, 0x014e, 0x013e, 0x0005, + 0x0016, 0x00e6, 0x2071, 0xb913, 0x00f6, 0x2079, 0x0010, 0x7904, + 0x7803, 0x0002, 0xd1fc, 0x0120, 0xa18c, 0x0700, 0x7004, 0x0023, + 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1671, 0x173b, 0x1769, 0x1793, + 0x17c3, 0x173a, 0x0cf8, 0xa18c, 0x0700, 0x1528, 0x0136, 0x0146, + 0x0156, 0x7014, 0x20a0, 0x2099, 0x0014, 0x7803, 0x0040, 0x7010, + 0x20a8, 0x53a5, 0x3400, 0x7016, 0x015e, 0x014e, 0x013e, 0x700c, + 0xa005, 0x0570, 0x7830, 0x7832, 0x7834, 0x7836, 0x080c, 0x16a2, + 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0100, 0x7007, 0x0000, + 0x080c, 0x1671, 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, + 0x0ca8, 0xa18c, 0x0700, 0x1150, 0x700c, 0xa005, 0x0188, 0x7830, + 0x7832, 0x7834, 0x7836, 0x080c, 0x16b7, 0x0005, 0x7008, 0xa080, + 0x0002, 0x2003, 0x0200, 0x7007, 0x0000, 0x080c, 0x1671, 0x0005, + 0x00d6, 0x7008, 0x2068, 0x7830, 0x6826, 0x7834, 0x682a, 0x7838, + 0x682e, 0x783c, 0x6832, 0x680b, 0x0100, 0x00de, 0x7007, 0x0000, + 0x080c, 0x1671, 0x0005, 0xa18c, 0x0700, 0x1540, 0x0136, 0x0146, + 0x0156, 0x2001, 0xb6f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, + 0x0014, 0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xb6fa, + 0x2004, 0xd0bc, 0x0148, 0x2001, 0xb703, 0x2004, 0xa080, 0x000d, + 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x015e, 0x014e, 0x013e, 0x7007, + 0x0000, 0x080c, 0x5ee1, 0x080c, 0x1671, 0x0005, 0x2011, 0x8003, + 0x080c, 0x3f13, 0x0cf8, 0xa18c, 0x0700, 0x1148, 0x2001, 0xb728, + 0x2003, 0x0100, 0x7007, 0x0000, 0x080c, 0x1671, 0x0005, 0x2011, + 0x8004, 0x080c, 0x3f13, 0x0cf8, 0x0126, 0x2091, 0x2200, 0x2079, + 0x0030, 0x2071, 0xb924, 0x7003, 0x0000, 0x700f, 0xb930, 0x7013, + 0xb930, 0x780f, 0x00f6, 0x7803, 0x0004, 0x012e, 0x0005, 0x6934, + 0xa184, 0x0007, 0x0002, 0x17f3, 0x1831, 0x17f3, 0x17f3, 0x17f3, + 0x1819, 0x1800, 0x17f7, 0xa085, 0x0001, 0x0804, 0x184b, 0x684c, + 0xd0bc, 0x0dc8, 0x6860, 0x682e, 0x685c, 0x682a, 0x6858, 0x04c8, + 0xa18c, 0x00ff, 0xa186, 0x001e, 0x1d70, 0x684c, 0xd0bc, 0x0d58, + 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, 0x681a, 0xa080, 0x000d, + 0x2004, 0xa084, 0x000f, 0xa080, 0x2308, 0x2005, 0x6832, 0x6858, + 0x0440, 0xa18c, 0x00ff, 0xa186, 0x0015, 0x19a8, 0x684c, 0xd0ac, + 0x0990, 0x6804, 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, + 0xa080, 0x2308, 0x2005, 0x6832, 0xa006, 0x682e, 0x682a, 0x6858, + 0x0080, 0x684c, 0xd0ac, 0x0904, 0x17f3, 0xa006, 0x682e, 0x682a, + 0x6858, 0xa18c, 0x000f, 0xa188, 0x2308, 0x210d, 0x6932, 0x2d08, + 0x691a, 0x6826, 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x697c, + 0x6912, 0x6980, 0x6916, 0x0005, 0x684c, 0xd0ac, 0x090c, 0x151a, + 0x6833, 0x2305, 0x2d08, 0x691a, 0x6858, 0x8001, 0x6826, 0x684c, + 0xc0dd, 0x684e, 0xa006, 0x680a, 0x682e, 0x682a, 0x697c, 0x6912, + 0x6980, 0x6916, 0x0005, 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, + 0x020a, 0x2004, 0x82ff, 0x01e8, 0xa280, 0x0004, 0x00d6, 0x206c, + 0x684c, 0xd0dc, 0x1190, 0xa280, 0x0007, 0x2004, 0xa086, 0x000a, + 0x1110, 0x0891, 0x0010, 0x080c, 0x17e7, 0x0138, 0x00de, 0xa280, + 0x0000, 0x2003, 0x0002, 0xa016, 0x0020, 0x6808, 0x8000, 0x680a, + 0x00de, 0x0126, 0x0046, 0x0036, 0x0026, 0x2091, 0x2200, 0x002e, + 0x003e, 0x004e, 0x7000, 0xa005, 0x01d0, 0x710c, 0x220a, 0x8108, + 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, 0xb94b, 0x0210, 0x2009, + 0xb930, 0x710e, 0x7010, 0xa102, 0xa082, 0x0009, 0x0118, 0xa080, + 0x001b, 0x1118, 0x2009, 0x0138, 0x200a, 0x012e, 0x0005, 0x7206, + 0x2001, 0x18ad, 0x0006, 0x2260, 0x0804, 0x19da, 0x0126, 0x0026, + 0x0036, 0x00c6, 0x0006, 0x2091, 0x2200, 0x000e, 0x004e, 0x003e, + 0x002e, 0x00d6, 0x00c6, 0x2460, 0x6110, 0x2168, 0x6a62, 0x6b5e, + 0xa005, 0x0904, 0x190f, 0x6808, 0xa005, 0x0904, 0x1946, 0x7000, + 0xa005, 0x1108, 0x0488, 0x700c, 0x7110, 0xa106, 0x1904, 0x194e, + 0x7004, 0xa406, 0x1548, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0168, + 0x0046, 0x080c, 0x1b22, 0x004e, 0x2460, 0x6010, 0xa080, 0x0002, + 0x2004, 0xa005, 0x0904, 0x1946, 0x0c10, 0x2001, 0x0207, 0x2004, + 0xd09c, 0x1d48, 0x7804, 0xa084, 0x6000, 0x0120, 0xa086, 0x6000, + 0x0108, 0x0c08, 0x7818, 0x6812, 0x781c, 0x6816, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0x2060, 0x6100, 0xa18e, 0x0004, 0x1904, + 0x194e, 0x2009, 0x0048, 0x080c, 0x86d3, 0x0804, 0x194e, 0x6808, + 0xa005, 0x05a0, 0x7000, 0xa005, 0x0588, 0x700c, 0x7110, 0xa106, + 0x1118, 0x7004, 0xa406, 0x1550, 0x2001, 0x0005, 0x2004, 0xd08c, + 0x0160, 0x0046, 0x080c, 0x1b22, 0x004e, 0x2460, 0x6010, 0xa080, + 0x0002, 0x2004, 0xa005, 0x01d0, 0x0c28, 0x2001, 0x0207, 0x2004, + 0xd09c, 0x1d50, 0x2001, 0x0005, 0x2004, 0xd08c, 0x1d50, 0x7804, + 0xa084, 0x6000, 0x0118, 0xa086, 0x6000, 0x19f0, 0x7818, 0x6812, + 0x781c, 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, 0x6100, 0xa18e, + 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0x86d3, 0x00ce, 0x00de, + 0x012e, 0x0005, 0x00f6, 0x00e6, 0x0026, 0x0036, 0x0046, 0x0056, + 0x2071, 0xb924, 0x7000, 0xa086, 0x0000, 0x0904, 0x19b8, 0x7004, + 0xac06, 0x1904, 0x19aa, 0x2079, 0x0030, 0x7000, 0xa086, 0x0003, + 0x0904, 0x19aa, 0x7804, 0xd0fc, 0x15c8, 0x20e1, 0x6000, 0x2011, + 0x0032, 0x2001, 0x0208, 0x200c, 0x2001, 0x0209, 0x2004, 0xa106, + 0x1d88, 0x8211, 0x1db0, 0x7804, 0xd0fc, 0x1540, 0x080c, 0x1e8a, + 0x0026, 0x0056, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x1de8, 0x7803, + 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007, 0x0000, 0x005e, + 0x002e, 0x2001, 0x015d, 0x2003, 0x0000, 0x080c, 0x5b41, 0x1138, + 0x0066, 0x2031, 0x0001, 0x080c, 0x5bc3, 0x006e, 0x0058, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0020, 0x080c, 0x1b22, + 0x0804, 0x195a, 0x0156, 0x20a9, 0x0009, 0x2009, 0xb930, 0x2104, + 0xac06, 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, 0x19af, 0x015e, + 0x005e, 0x004e, 0x003e, 0x002e, 0x00ee, 0x00fe, 0x0005, 0x700c, + 0x7110, 0xa106, 0x0904, 0x1a4e, 0x2104, 0x7006, 0x2060, 0x8108, + 0x211c, 0x8108, 0x2124, 0x8108, 0xa182, 0xb94b, 0x0210, 0x2009, + 0xb930, 0x7112, 0x700c, 0xa106, 0x1128, 0x080c, 0x2920, 0x2001, + 0x0138, 0x2102, 0x8cff, 0x0598, 0x6010, 0x2068, 0x2d58, 0x6828, + 0xa406, 0x1590, 0x682c, 0xa306, 0x1578, 0x7004, 0x2060, 0x6020, + 0xc0d4, 0x6022, 0x684c, 0xd0f4, 0x0128, 0x6817, 0xffff, 0x6813, + 0xffff, 0x00e8, 0x6850, 0xd0f4, 0x1130, 0x7803, 0x0004, 0x6810, + 0x781a, 0x6814, 0x781e, 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, + 0x2040, 0x6034, 0xa0cc, 0x000f, 0x2009, 0x0011, 0x080c, 0x1a51, + 0x0120, 0x2009, 0x0001, 0x080c, 0x1a51, 0x2d58, 0x0005, 0x080c, + 0x1df9, 0x0904, 0x19bf, 0x0cd0, 0x6020, 0xd0f4, 0x11e0, 0xd0d4, + 0x01b8, 0x6038, 0xa402, 0x6034, 0xa303, 0x0108, 0x1288, 0x643a, + 0x6336, 0x6c2a, 0x6b2e, 0x0046, 0x0036, 0x2400, 0x6c7c, 0xa402, + 0x6812, 0x2300, 0x6b80, 0xa303, 0x6816, 0x003e, 0x004e, 0x0018, + 0x080c, 0xa056, 0x09e0, 0x601c, 0xa08e, 0x0008, 0x0904, 0x19e5, + 0xa08e, 0x000a, 0x0904, 0x19e5, 0x2001, 0xb674, 0x2004, 0xd0b4, + 0x1140, 0x6018, 0x2004, 0xd0bc, 0x1120, 0x6817, 0x7fff, 0x6813, + 0xffff, 0x080c, 0x2328, 0x1918, 0x0804, 0x19e5, 0x7003, 0x0000, + 0x0005, 0x8aff, 0x0904, 0x1afc, 0xa03e, 0x2730, 0xc9fc, 0x6850, + 0xd0fc, 0x11b8, 0xd0f4, 0x1588, 0x00d6, 0x2805, 0xac68, 0x2900, + 0x0002, 0x1aba, 0x1a93, 0x1a93, 0x1aba, 0x1aba, 0x1ab2, 0x1aba, + 0x1a93, 0x1aba, 0x1a9b, 0x1a9b, 0x1aba, 0x1aba, 0x1aba, 0x1aaa, + 0x1a9b, 0x7803, 0x0004, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, 0x6d1c, + 0x6c20, 0x00d6, 0xd99c, 0x0140, 0x2805, 0xac68, 0x6f08, 0x6e0c, + 0x080c, 0x23ed, 0x0120, 0x04d0, 0x080c, 0x23ed, 0x15b0, 0x6850, + 0xc0fd, 0x6852, 0x00de, 0xa006, 0x0005, 0xc0f4, 0x6852, 0x6b6c, + 0x6a70, 0x00d6, 0x04c0, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, 0x080c, + 0x23ed, 0x0d80, 0x0410, 0x6b10, 0x6a14, 0x6d00, 0x6c04, 0x6f08, + 0x6e0c, 0x080c, 0x23ed, 0x0d30, 0x00c8, 0x6d00, 0x6c04, 0x6f08, + 0x6e0c, 0x00a0, 0x00de, 0x00d6, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x1140, 0x00de, 0x080c, 0x22ca, 0x1904, 0x1a51, 0xa00e, + 0x0804, 0x1afc, 0x00de, 0x080c, 0x151a, 0xc9fd, 0x7b22, 0x7a26, + 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7316, 0x721a, 0x751e, 0x7422, + 0x7726, 0x762a, 0x7902, 0x7100, 0x8108, 0x7102, 0x00de, 0x6828, + 0xa300, 0x682a, 0x682c, 0xa201, 0x682e, 0x8109, 0x2d08, 0x1500, + 0xd9fc, 0x0160, 0xc9fc, 0x080c, 0x22ca, 0x01e8, 0x2805, 0xac68, + 0x6800, 0xa506, 0x11c0, 0x6804, 0xa406, 0x00a8, 0xc9fc, 0x080c, + 0x22ca, 0x0188, 0x2805, 0xac68, 0x6800, 0xa506, 0x1160, 0x6804, + 0xa406, 0x1148, 0x6808, 0xa706, 0x1130, 0x680c, 0xa606, 0x0018, + 0xc9fc, 0x080c, 0x22ca, 0x2168, 0x0005, 0x080c, 0x151a, 0x080c, + 0x1f71, 0x7004, 0x2060, 0x00d6, 0x6010, 0x2068, 0x7003, 0x0000, + 0x080c, 0x1e1a, 0x080c, 0x9d16, 0x0170, 0x6808, 0x8001, 0x680a, + 0x697c, 0x6912, 0x6980, 0x6916, 0x682b, 0xffff, 0x682f, 0xffff, + 0x6850, 0xc0bd, 0x6852, 0x00de, 0x080c, 0x99e6, 0x0804, 0x1d47, + 0x080c, 0x151a, 0x0126, 0x2091, 0x2200, 0x0006, 0x0016, 0x2b68, + 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x1978, + 0xa184, 0x0003, 0xa086, 0x0003, 0x0d58, 0x7000, 0x0002, 0x1b3f, + 0x1b45, 0x1c56, 0x1d22, 0x1d36, 0x1b3f, 0x1b3f, 0x1b3f, 0x7804, + 0xd09c, 0x1904, 0x1d47, 0x080c, 0x151a, 0x8001, 0x7002, 0xd1bc, + 0x11a0, 0xd19c, 0x1904, 0x1bda, 0xd1dc, 0x1178, 0x8aff, 0x0904, + 0x1bda, 0x2009, 0x0001, 0x080c, 0x1a51, 0x0904, 0x1d47, 0x2009, + 0x0001, 0x080c, 0x1a51, 0x0804, 0x1d47, 0x7803, 0x0004, 0x7003, + 0x0000, 0xd1bc, 0x1904, 0x1bba, 0x0026, 0x0036, 0x7c20, 0x7d24, + 0x7e30, 0x7f34, 0x7818, 0x6812, 0x781c, 0x6816, 0x2001, 0x0201, + 0x2004, 0xa005, 0x0140, 0x7808, 0xd0ec, 0x1128, 0x7803, 0x0009, + 0x7003, 0x0004, 0x0010, 0x080c, 0x1d4b, 0x6b28, 0x6a2c, 0x2400, + 0x686e, 0xa31a, 0x2500, 0x6872, 0xa213, 0x6b2a, 0x6a2e, 0x00c6, + 0x7004, 0x2060, 0x6020, 0xd0f4, 0x1110, 0x633a, 0x6236, 0x00ce, + 0x003e, 0x002e, 0x6e1e, 0x6f22, 0x2500, 0xa405, 0x0128, 0x080c, + 0x22e0, 0x6850, 0xc0fd, 0x6852, 0x2a00, 0x6826, 0x2c00, 0x681a, + 0x2800, 0x6832, 0x6808, 0x8001, 0x680a, 0x1148, 0x684c, 0xd0e4, + 0x0130, 0x7004, 0x2060, 0x2009, 0x0048, 0x080c, 0x86d3, 0x7000, + 0xa086, 0x0004, 0x0904, 0x1d47, 0x7003, 0x0000, 0x080c, 0x19bf, + 0x0804, 0x1d47, 0x0056, 0x7d0c, 0xd5bc, 0x1110, 0x080c, 0xb4c3, + 0x005e, 0x080c, 0x1e1a, 0x00f6, 0x7004, 0x2078, 0x080c, 0x5377, + 0x0118, 0x7820, 0xc0f5, 0x7822, 0x00fe, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x791a, 0x6980, 0x791e, + 0x0804, 0x1d47, 0x7004, 0x00c6, 0x2060, 0x6020, 0x00ce, 0xd0f4, + 0x0120, 0x6808, 0x8001, 0x680a, 0x04c0, 0x7818, 0x6812, 0x7a1c, + 0x6a16, 0xd19c, 0x0160, 0xa205, 0x0150, 0x7004, 0xa080, 0x0007, + 0x2004, 0xa084, 0xfffd, 0xa086, 0x0008, 0x1904, 0x1b5d, 0x684c, + 0xc0f5, 0x684e, 0x7814, 0xa005, 0x1520, 0x7003, 0x0000, 0x6808, + 0x8001, 0x680a, 0x01a0, 0x7004, 0x2060, 0x601c, 0xa086, 0x000a, + 0x11a0, 0x0156, 0x20a9, 0x0009, 0x2009, 0xb930, 0x2104, 0xac06, + 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, 0x1c0e, 0x015e, 0x7004, + 0x2060, 0x2009, 0x0048, 0x080c, 0x86d3, 0x080c, 0x19bf, 0x0804, + 0x1d47, 0x7818, 0x6812, 0x781c, 0x6816, 0x7814, 0x7908, 0xa18c, + 0x0fff, 0xa192, 0x0841, 0x1a04, 0x1aff, 0xa188, 0x0007, 0x8114, + 0x8214, 0x8214, 0xa10a, 0x8104, 0x8004, 0x8004, 0xa20a, 0x810b, + 0x810b, 0x810b, 0x080c, 0x1eb5, 0x7803, 0x0004, 0x780f, 0xffff, + 0x7803, 0x0001, 0x7804, 0xd0fc, 0x0de8, 0x7803, 0x0002, 0x7803, + 0x0004, 0x780f, 0x00f6, 0x7004, 0x7007, 0x0000, 0x2060, 0x2009, + 0x0048, 0x080c, 0x86d3, 0x080c, 0x1f0b, 0x0838, 0x8001, 0x7002, + 0xd194, 0x01b0, 0x7804, 0xd0fc, 0x1904, 0x1cf2, 0xd09c, 0x0138, + 0x7804, 0xd0fc, 0x1904, 0x1cf2, 0xd09c, 0x1904, 0x1cf6, 0x8aff, + 0x0904, 0x1d47, 0x2009, 0x0001, 0x080c, 0x1a51, 0x0804, 0x1d47, + 0xa184, 0x0888, 0x1148, 0x8aff, 0x0904, 0x1d47, 0x2009, 0x0001, + 0x080c, 0x1a51, 0x0804, 0x1d47, 0x7818, 0x6812, 0x7a1c, 0x6a16, + 0xa205, 0x0904, 0x1bf7, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, + 0x1904, 0x1cd4, 0x6834, 0xa084, 0x00ff, 0xa086, 0x0029, 0x1118, + 0xd19c, 0x1904, 0x1bf7, 0x0026, 0x0036, 0x7c20, 0x7d24, 0x7e30, + 0x7f34, 0x7818, 0x6812, 0x781c, 0x6816, 0x2001, 0x0201, 0x2004, + 0xa005, 0x0140, 0x7808, 0xd0ec, 0x1128, 0x7803, 0x0009, 0x7003, + 0x0004, 0x0020, 0x0016, 0x080c, 0x1d4b, 0x001e, 0x6b28, 0x6a2c, + 0x080c, 0x22e0, 0x00d6, 0x2805, 0xac68, 0x6034, 0xd09c, 0x1128, + 0x6808, 0xa31a, 0x680c, 0xa213, 0x0020, 0x6810, 0xa31a, 0x6814, + 0xa213, 0x00de, 0xd194, 0x0904, 0x1b7f, 0x2a00, 0x6826, 0x2c00, + 0x681a, 0x2800, 0x6832, 0x6808, 0x8001, 0x680a, 0x6b2a, 0x6a2e, + 0x003e, 0x002e, 0x0804, 0x1c1d, 0x0056, 0x7d0c, 0x080c, 0xb4c3, + 0x005e, 0x080c, 0x1e1a, 0x00f6, 0x7004, 0x2078, 0x080c, 0x5377, + 0x0118, 0x7820, 0xc0f5, 0x7822, 0x00fe, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x791a, 0x6980, 0x791e, + 0x0804, 0x1d47, 0x7804, 0xd09c, 0x0904, 0x1b2a, 0x7c20, 0x7824, + 0xa405, 0x1904, 0x1b2a, 0x7818, 0x6812, 0x7c1c, 0x6c16, 0xa405, + 0x1120, 0x7803, 0x0002, 0x0804, 0x1bf7, 0x751c, 0x7420, 0x7724, + 0x7628, 0x7014, 0xa528, 0x7018, 0xa421, 0xa7b9, 0x0000, 0xa6b1, + 0x0000, 0x7830, 0xa506, 0x1150, 0x7834, 0xa406, 0x1138, 0x7838, + 0xa706, 0x1120, 0x783c, 0xa606, 0x0904, 0x1b2a, 0x7803, 0x0002, + 0x0804, 0x1c83, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0xa00d, + 0x0150, 0x6808, 0x8001, 0x680a, 0x1130, 0x7004, 0x2060, 0x2009, + 0x0048, 0x080c, 0x86d3, 0x080c, 0x19bf, 0x0088, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0x2060, 0x6010, 0xa005, 0x0da0, 0x2068, + 0x6808, 0x8000, 0x680a, 0x6c28, 0x6b2c, 0x080c, 0x19da, 0x001e, + 0x000e, 0x012e, 0x0005, 0x700c, 0x7110, 0xa106, 0x0904, 0x1ded, + 0x7004, 0x0016, 0x210c, 0xa106, 0x001e, 0x0904, 0x1ded, 0x00d6, + 0x00c6, 0x216c, 0x2d00, 0xa005, 0x0904, 0x1deb, 0x681c, 0xa086, + 0x0008, 0x0904, 0x1deb, 0x6820, 0xd0d4, 0x1904, 0x1deb, 0x6810, + 0x2068, 0x6850, 0xd0fc, 0x05a8, 0x8108, 0x2104, 0x6b2c, 0xa306, + 0x1904, 0x1deb, 0x8108, 0x2104, 0x6a28, 0xa206, 0x1904, 0x1deb, + 0x6850, 0xc0fc, 0xc0f5, 0x6852, 0x686c, 0x7822, 0x7016, 0x6870, + 0x7826, 0x701a, 0x681c, 0x7832, 0x701e, 0x6820, 0x7836, 0x7022, + 0x6818, 0x2060, 0x6034, 0xd09c, 0x0168, 0x6830, 0x2005, 0x00d6, + 0xac68, 0x6808, 0x783a, 0x7026, 0x680c, 0x783e, 0x702a, 0x00de, + 0x0804, 0x1de5, 0xa006, 0x783a, 0x783e, 0x7026, 0x702a, 0x0804, + 0x1de5, 0x8108, 0x2104, 0xa005, 0x1904, 0x1deb, 0x6b2c, 0xa306, + 0x1904, 0x1deb, 0x8108, 0x2104, 0xa005, 0x15e8, 0x6a28, 0xa206, + 0x15d0, 0x6850, 0xc0f5, 0x6852, 0x6830, 0x2005, 0x6918, 0xa160, + 0xa180, 0x000d, 0x2004, 0xd09c, 0x11a0, 0x6008, 0x7822, 0x7016, + 0x686e, 0x600c, 0x7826, 0x701a, 0x6872, 0x6000, 0x7832, 0x701e, + 0x6004, 0x7836, 0x7022, 0xa006, 0x783a, 0x783e, 0x7026, 0x702a, + 0x00a0, 0x6010, 0x7822, 0x7016, 0x686e, 0x6014, 0x7826, 0x701a, + 0x6872, 0x6000, 0x7832, 0x701e, 0x6004, 0x7836, 0x7022, 0x6008, + 0x783a, 0x7026, 0x600c, 0x783e, 0x702a, 0x6810, 0x781a, 0x6814, + 0x781e, 0x7803, 0x0011, 0x00ce, 0x00de, 0x0005, 0x2011, 0x0201, + 0x2009, 0x003c, 0x2204, 0xa005, 0x1118, 0x8109, 0x1dd8, 0x0005, + 0x0005, 0x0ca1, 0x0118, 0x780c, 0xd0a4, 0x0120, 0x00d9, 0xa085, + 0x0001, 0x0010, 0x080c, 0x1f0b, 0x0005, 0x0126, 0x2091, 0x2200, + 0x7000, 0xa086, 0x0003, 0x1160, 0x700c, 0x7110, 0xa106, 0x0140, + 0x080c, 0x2991, 0x20e1, 0x9028, 0x700f, 0xb930, 0x7013, 0xb930, + 0x012e, 0x0005, 0x00c6, 0x080c, 0x5b41, 0x11b8, 0x2001, 0x0160, + 0x2003, 0x0000, 0x2001, 0x0138, 0x2003, 0x0000, 0x2011, 0x00c8, + 0xe000, 0xe000, 0x8211, 0x1de0, 0x04b1, 0x0066, 0x2031, 0x0000, + 0x080c, 0x5bc3, 0x006e, 0x00ce, 0x0005, 0x080c, 0x1e8a, 0x080c, + 0x2991, 0x20e1, 0x9028, 0x700c, 0x7110, 0xa106, 0x01c0, 0x2104, + 0xa005, 0x0130, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, + 0xa188, 0x0003, 0xa182, 0xb94b, 0x0210, 0x2009, 0xb930, 0x7112, + 0x700c, 0xa106, 0x1d40, 0x080c, 0x2920, 0x2110, 0x0c20, 0x2001, + 0x015d, 0x2003, 0x0000, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, + 0x2202, 0x00ce, 0x0005, 0x080c, 0x2991, 0x20e1, 0x9028, 0x2001, + 0x015d, 0x2003, 0x0000, 0x00e6, 0x00c6, 0x0016, 0x2071, 0xb924, + 0x700c, 0x7110, 0xa106, 0x0190, 0x2104, 0xa005, 0x0130, 0x2060, + 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, 0xa188, 0x0003, 0xa182, + 0xb94b, 0x0210, 0x2009, 0xb930, 0x7112, 0x0c50, 0x001e, 0x00ce, + 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, + 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x5b41, 0x1148, 0x2021, + 0x0002, 0x1d04, 0x1e99, 0x2091, 0x6000, 0x8421, 0x1dd0, 0x0005, + 0x2021, 0xb015, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, + 0x0109, 0x201c, 0xa39c, 0x0048, 0x1138, 0x2001, 0x0111, 0x201c, + 0x83ff, 0x1110, 0x8421, 0x1d70, 0x0005, 0x00e6, 0x2071, 0x0200, + 0x7808, 0xa084, 0xf000, 0xa10d, 0x0869, 0x2001, 0x0105, 0x2004, + 0xa084, 0x0003, 0x1130, 0x2001, 0xb94b, 0x2004, 0xa086, 0x0000, + 0x0548, 0xa026, 0x2019, 0xf000, 0x8319, 0x1148, 0x2001, 0x012b, + 0x2003, 0x95f5, 0x2001, 0x0129, 0x2003, 0x95f5, 0x00d8, 0x2001, + 0x0105, 0x2004, 0xa084, 0x0003, 0x1130, 0x2001, 0xb94b, 0x2004, + 0xa086, 0x0000, 0x0178, 0x2001, 0x0132, 0x2004, 0xa436, 0x0110, + 0x2020, 0x0c00, 0x2001, 0x0021, 0x2004, 0xd0fc, 0x09e8, 0x080c, + 0x216d, 0x08c0, 0x20e1, 0x7000, 0x7324, 0x7420, 0x7028, 0x7028, + 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f, 0x0100, 0x7037, + 0x0008, 0x7326, 0x7422, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, + 0x2202, 0x00ee, 0x0005, 0x0026, 0x2001, 0x015d, 0x2003, 0x0000, + 0x7908, 0xa18c, 0x0fff, 0xa182, 0x0ffd, 0x0210, 0x2009, 0x0000, + 0xa190, 0x0007, 0xa294, 0x1ff8, 0x8214, 0x8214, 0x8214, 0x2001, + 0x020a, 0x82ff, 0x0140, 0x20e1, 0x6000, 0x200c, 0x200c, 0x200c, + 0x200c, 0x8211, 0x1dd0, 0x20e1, 0x7000, 0x200c, 0x200c, 0x7003, + 0x0000, 0x20e1, 0x6000, 0x2001, 0x0208, 0x200c, 0x2001, 0x0209, + 0x2004, 0xa106, 0x0158, 0x080c, 0x1dee, 0x0130, 0x7908, 0xd1ec, + 0x1128, 0x790c, 0xd1a4, 0x0960, 0x080c, 0x1e1a, 0xa006, 0x002e, + 0x0005, 0x00f6, 0x00e6, 0x0016, 0x0026, 0x2071, 0xb924, 0x2079, + 0x0030, 0x2011, 0x0050, 0x7000, 0xa086, 0x0000, 0x01a8, 0x8211, + 0x0188, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0dc8, 0x7904, 0xa18c, + 0x0780, 0x0016, 0x080c, 0x1b22, 0x001e, 0x81ff, 0x1118, 0x2011, + 0x0050, 0x0c48, 0xa085, 0x0001, 0x002e, 0x001e, 0x00ee, 0x00fe, + 0x0005, 0x7803, 0x0004, 0x2009, 0x0064, 0x7804, 0xd0ac, 0x0904, + 0x1fbd, 0x8109, 0x1dd0, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0003, + 0x0a0c, 0x151a, 0x080c, 0x2274, 0x00e6, 0x00f6, 0x2071, 0xb913, + 0x2079, 0x0010, 0x7004, 0xa086, 0x0000, 0x0538, 0x7800, 0x0006, + 0x7820, 0x0006, 0x7830, 0x0006, 0x7834, 0x0006, 0x7838, 0x0006, + 0x783c, 0x0006, 0x7803, 0x0004, 0xe000, 0xe000, 0x2079, 0x0030, + 0x7804, 0xd0ac, 0x190c, 0x151a, 0x2079, 0x0010, 0x000e, 0x783e, + 0x000e, 0x783a, 0x000e, 0x7836, 0x000e, 0x7832, 0x000e, 0x7822, + 0x000e, 0x7802, 0x00fe, 0x00ee, 0x0030, 0x00fe, 0x00ee, 0x7804, + 0xd0ac, 0x190c, 0x151a, 0x080c, 0x72a2, 0x0005, 0x00e6, 0x2071, + 0xb94b, 0x7003, 0x0000, 0x00ee, 0x0005, 0x00d6, 0xa280, 0x0004, + 0x206c, 0x694c, 0xd1dc, 0x1904, 0x203b, 0x6934, 0xa184, 0x0007, + 0x0002, 0x1fd9, 0x2026, 0x1fd9, 0x1fd9, 0x1fd9, 0x200d, 0x1fec, + 0x1fdb, 0x080c, 0x151a, 0x684c, 0xd0b4, 0x0904, 0x212a, 0x6860, + 0x682e, 0x6816, 0x685c, 0x682a, 0x6812, 0x687c, 0x680a, 0x6880, + 0x680e, 0x6958, 0x0804, 0x202e, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x1d38, 0x684c, 0xd0b4, 0x0904, 0x212a, 0x6860, 0x682e, + 0x6816, 0x685c, 0x682a, 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, + 0x6804, 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, + 0x2308, 0x2005, 0x6832, 0x6958, 0x0450, 0xa18c, 0x00ff, 0xa186, + 0x0015, 0x1548, 0x684c, 0xd0b4, 0x0904, 0x212a, 0x6804, 0x681a, + 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x2308, 0x2005, + 0x6832, 0x6958, 0xa006, 0x682e, 0x682a, 0x0088, 0x684c, 0xd0b4, + 0x0904, 0x1afd, 0x6958, 0xa006, 0x682e, 0x682a, 0x2d00, 0x681a, + 0x6834, 0xa084, 0x000f, 0xa080, 0x2308, 0x2005, 0x6832, 0x6926, + 0x684c, 0xc0dd, 0x684e, 0x00de, 0x0005, 0x00f6, 0x2079, 0x0020, + 0x7804, 0xd0fc, 0x190c, 0x216d, 0x00e6, 0x00d6, 0x2071, 0xb94b, + 0x7000, 0xa005, 0x1904, 0x20aa, 0x00c6, 0x7206, 0xa280, 0x0004, + 0x205c, 0x7004, 0x2068, 0x7803, 0x0004, 0x6818, 0x00d6, 0x2068, + 0x686c, 0x7812, 0x6890, 0x00f6, 0x20e1, 0x9040, 0x2079, 0x0200, + 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe, 0x00de, 0x2b68, + 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, + 0x000f, 0x6908, 0x791a, 0x7116, 0x680c, 0x781e, 0x701a, 0xa006, + 0x700e, 0x7012, 0x7004, 0x692c, 0x6814, 0xa106, 0x1120, 0x6928, + 0x6810, 0xa106, 0x0190, 0x2001, 0xb674, 0x2004, 0xd0cc, 0x0110, + 0x00ce, 0x0400, 0x0036, 0x0046, 0x6b14, 0x6c10, 0x080c, 0x2328, + 0x004e, 0x003e, 0x0110, 0x00ce, 0x00a8, 0x8aff, 0x1120, 0x00ce, + 0xa085, 0x0001, 0x0078, 0x0126, 0x2091, 0x8000, 0x2079, 0x0020, + 0x2009, 0x0001, 0x0059, 0x0118, 0x2009, 0x0001, 0x0039, 0x012e, + 0x00ce, 0xa006, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x0076, 0x0066, + 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff, 0x0904, 0x2123, 0x700c, + 0x7214, 0xa23a, 0x7010, 0x7218, 0xa203, 0x0a04, 0x2122, 0xa705, + 0x0904, 0x2122, 0xa03e, 0x2730, 0x6850, 0xd0fc, 0x11a8, 0x00d6, + 0x2805, 0xac68, 0x2900, 0x0002, 0x2105, 0x20ea, 0x20ea, 0x2105, + 0x2105, 0x20fe, 0x2105, 0x20ea, 0x2105, 0x20ef, 0x20ef, 0x2105, + 0x2105, 0x2105, 0x20f6, 0x20ef, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, + 0x6d1c, 0x6c20, 0xd99c, 0x0528, 0x00d6, 0x2805, 0xac68, 0x6f08, + 0x6e0c, 0x00f0, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, 0x00c8, 0x6b10, + 0x6a14, 0x6d00, 0x6c04, 0x6f08, 0x6e0c, 0x0090, 0x00de, 0x00d6, + 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x1138, 0x00de, 0x080c, + 0x22ca, 0x1904, 0x20b4, 0xa00e, 0x00f0, 0x00de, 0x080c, 0x151a, + 0x00de, 0x7b22, 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, + 0x7000, 0x8000, 0x7002, 0x6828, 0xa300, 0x682a, 0x682c, 0xa201, + 0x682e, 0x700c, 0xa300, 0x700e, 0x7010, 0xa201, 0x7012, 0x080c, + 0x22ca, 0x0008, 0xa006, 0x002e, 0x003e, 0x004e, 0x005e, 0x006e, + 0x007e, 0x0005, 0x080c, 0x151a, 0x0026, 0x2001, 0x0105, 0x2003, + 0x0010, 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, + 0x2060, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0118, 0x6850, + 0xc0bd, 0x6852, 0x601c, 0xa086, 0x0006, 0x1180, 0x2061, 0x0100, + 0x62c8, 0x2001, 0x00fa, 0x8001, 0x1df0, 0x60c8, 0xa206, 0x1dc0, + 0x60c4, 0x686a, 0x60c8, 0x6866, 0x7004, 0x2060, 0x00de, 0x00c6, + 0x080c, 0x99e6, 0x00ce, 0x2001, 0xb8f0, 0x2004, 0xac06, 0x1150, + 0x20e1, 0x9040, 0x080c, 0x82e4, 0x2011, 0x0000, 0x080c, 0x8106, + 0x080c, 0x72a2, 0x002e, 0x0804, 0x2227, 0x0126, 0x2091, 0x2400, + 0x0006, 0x0016, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x2079, 0x0020, + 0x2071, 0xb94b, 0x2b68, 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, + 0xa184, 0x0700, 0x1904, 0x212c, 0x7000, 0x0002, 0x2227, 0x218a, + 0x21fa, 0x2225, 0x8001, 0x7002, 0xd19c, 0x1170, 0x8aff, 0x05d0, + 0x2009, 0x0001, 0x080c, 0x20ae, 0x0904, 0x2227, 0x2009, 0x0001, + 0x080c, 0x20ae, 0x0804, 0x2227, 0x7803, 0x0004, 0xd194, 0x0148, + 0x6850, 0xc0fc, 0x6852, 0x8aff, 0x11d8, 0x684c, 0xc0f5, 0x684e, + 0x00b8, 0x0026, 0x0036, 0x6b28, 0x6a2c, 0x7820, 0x686e, 0xa31a, + 0x7824, 0x6872, 0xa213, 0x7830, 0x681e, 0x7834, 0x6822, 0x6b2a, + 0x6a2e, 0x003e, 0x002e, 0x080c, 0x22e0, 0x6850, 0xc0fd, 0x6852, + 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x7003, 0x0000, + 0x0804, 0x2227, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, + 0x2079, 0x0100, 0x7a14, 0xa284, 0x0184, 0xa085, 0x0012, 0x7816, + 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x151a, 0x7820, 0xd0bc, + 0x1dd0, 0x003e, 0x79c8, 0x000e, 0xa102, 0x001e, 0x0006, 0x0016, + 0x79c4, 0x000e, 0xa103, 0x78c6, 0x000e, 0x78ca, 0xa284, 0x0184, + 0xa085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x7803, 0x0008, 0x7003, + 0x0000, 0x0468, 0x8001, 0x7002, 0xd194, 0x0168, 0x7804, 0xd0fc, + 0x1904, 0x217d, 0xd19c, 0x11f8, 0x8aff, 0x0508, 0x2009, 0x0001, + 0x080c, 0x20ae, 0x00e0, 0x0026, 0x0036, 0x6b28, 0x6a2c, 0x080c, + 0x22e0, 0x00d6, 0x2805, 0xac68, 0x6034, 0xd09c, 0x1128, 0x6808, + 0xa31a, 0x680c, 0xa213, 0x0020, 0x6810, 0xa31a, 0x6814, 0xa213, + 0x00de, 0x0804, 0x21ad, 0x0804, 0x21a9, 0x080c, 0x151a, 0x00ce, + 0x00de, 0x00ee, 0x00fe, 0x001e, 0x000e, 0x012e, 0x0005, 0x00f6, + 0x00e6, 0x2071, 0xb94b, 0x7000, 0xa086, 0x0000, 0x05d0, 0x2079, + 0x0020, 0x0016, 0x2009, 0x0207, 0x210c, 0xd194, 0x0198, 0x2009, + 0x020c, 0x210c, 0xa184, 0x0003, 0x0168, 0x080c, 0xb50c, 0x2001, + 0x0133, 0x2004, 0xa005, 0x090c, 0x151a, 0x20e1, 0x9040, 0x2001, + 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, + 0xa106, 0x1110, 0x20e1, 0x9040, 0x7804, 0xd0fc, 0x09d8, 0x080c, + 0x216d, 0x7000, 0xa086, 0x0000, 0x19a8, 0x001e, 0x7803, 0x0004, + 0x7804, 0xd0ac, 0x1de8, 0x20e1, 0x9040, 0x7803, 0x0002, 0x7003, + 0x0000, 0x00ee, 0x00fe, 0x0005, 0x0026, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x2071, 0xb94b, 0x2079, 0x0020, 0x7000, 0xa086, 0x0000, + 0x0540, 0x7004, 0x2060, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0158, + 0x6850, 0xc0b5, 0x6852, 0x680c, 0x7a1c, 0xa206, 0x1120, 0x6808, + 0x7a18, 0xa206, 0x01e0, 0x2001, 0x0105, 0x2003, 0x0010, 0x20e1, + 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x080c, + 0x99e6, 0x20e1, 0x9040, 0x080c, 0x82e4, 0x2011, 0x0000, 0x080c, + 0x8106, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x0005, 0x6810, + 0x6a14, 0xa205, 0x1d00, 0x684c, 0xc0dc, 0x684e, 0x2c10, 0x080c, + 0x1fc5, 0x2001, 0x0105, 0x2003, 0x0010, 0x20e1, 0x9040, 0x7803, + 0x0004, 0x7003, 0x0000, 0x2069, 0xb8e1, 0x6833, 0x0000, 0x683f, + 0x0000, 0x08f8, 0x8840, 0x2805, 0xa005, 0x1170, 0x6004, 0xa005, + 0x0168, 0x681a, 0x2060, 0x6034, 0xa084, 0x000f, 0xa080, 0x2308, + 0x2045, 0x88ff, 0x090c, 0x151a, 0x8a51, 0x0005, 0x2050, 0x0005, + 0x8a50, 0x8841, 0x2805, 0xa005, 0x1190, 0x2c00, 0xad06, 0x0120, + 0x6000, 0xa005, 0x1108, 0x2d00, 0x2060, 0x681a, 0x6034, 0xa084, + 0x000f, 0xa080, 0x2318, 0x2045, 0x88ff, 0x090c, 0x151a, 0x0005, + 0x0000, 0x0011, 0x0015, 0x0019, 0x001d, 0x0021, 0x0025, 0x0029, + 0x0000, 0x000f, 0x0015, 0x001b, 0x0021, 0x0027, 0x0000, 0x0000, + 0x0000, 0x22fd, 0x22f9, 0x0000, 0x0000, 0x2307, 0x0000, 0x22fd, + 0x0000, 0x2304, 0x2301, 0x0000, 0x0000, 0x0000, 0x2307, 0x2304, + 0x0000, 0x22ff, 0x22ff, 0x0000, 0x0000, 0x2307, 0x0000, 0x22ff, + 0x0000, 0x2305, 0x2305, 0x0000, 0x0000, 0x0000, 0x2307, 0x2305, + 0x00a6, 0x0096, 0x0086, 0x6b2e, 0x6c2a, 0x6858, 0xa055, 0x0904, + 0x23b9, 0x2d60, 0x6034, 0xa0cc, 0x000f, 0xa9c0, 0x2308, 0xa986, + 0x0007, 0x0130, 0xa986, 0x000e, 0x0118, 0xa986, 0x000f, 0x1120, + 0x605c, 0xa422, 0x6060, 0xa31b, 0x2805, 0xa045, 0x1140, 0x0310, + 0x0804, 0x23b9, 0x6004, 0xa065, 0x0904, 0x23b9, 0x0c18, 0x2805, + 0xa005, 0x01a8, 0xac68, 0xd99c, 0x1128, 0x6808, 0xa422, 0x680c, + 0xa31b, 0x0020, 0x6810, 0xa422, 0x6814, 0xa31b, 0x0620, 0x2300, + 0xa405, 0x0150, 0x8a51, 0x0904, 0x23b9, 0x8840, 0x0c40, 0x6004, + 0xa065, 0x0904, 0x23b9, 0x0830, 0x8a51, 0x0904, 0x23b9, 0x8840, + 0x2805, 0xa005, 0x1158, 0x6004, 0xa065, 0x0904, 0x23b9, 0x6034, + 0xa0cc, 0x000f, 0xa9c0, 0x2308, 0x2805, 0x2040, 0x2b68, 0x6850, + 0xc0fc, 0x6852, 0x0458, 0x8422, 0x8420, 0x831a, 0xa399, 0x0000, + 0x00d6, 0x2b68, 0x6c6e, 0x6b72, 0x00de, 0xd99c, 0x1168, 0x6908, + 0x2400, 0xa122, 0x690c, 0x2300, 0xa11b, 0x0a0c, 0x151a, 0x6800, + 0xa420, 0x6804, 0xa319, 0x0060, 0x6910, 0x2400, 0xa122, 0x6914, + 0x2300, 0xa11b, 0x0a0c, 0x151a, 0x6800, 0xa420, 0x6804, 0xa319, + 0x2b68, 0x6c1e, 0x6b22, 0x6850, 0xc0fd, 0x6852, 0x2c00, 0x681a, + 0x2800, 0x6832, 0x2a00, 0x6826, 0x000e, 0x000e, 0x000e, 0xa006, + 0x0028, 0x008e, 0x009e, 0x00ae, 0xa085, 0x0001, 0x0005, 0x2001, + 0x0005, 0x2004, 0xa084, 0x0007, 0x0002, 0x23cd, 0x23ce, 0x23d1, + 0x23d4, 0x23d9, 0x23dc, 0x23e1, 0x23e6, 0x0005, 0x080c, 0x216d, + 0x0005, 0x080c, 0x1b22, 0x0005, 0x080c, 0x1b22, 0x080c, 0x216d, + 0x0005, 0x080c, 0x1720, 0x0005, 0x080c, 0x216d, 0x080c, 0x1720, + 0x0005, 0x080c, 0x1b22, 0x080c, 0x1720, 0x0005, 0x080c, 0x1b22, + 0x080c, 0x216d, 0x080c, 0x1720, 0x0005, 0x0006, 0x7000, 0xa086, + 0x0001, 0x1158, 0x701c, 0xa506, 0x1140, 0x7020, 0xa406, 0x1128, + 0x7024, 0xa706, 0x1110, 0x7028, 0xa606, 0x000e, 0x0005, 0x0126, + 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0xbc80, 0x2069, 0xb600, + 0x080c, 0x24f5, 0x080c, 0x24e5, 0x2009, 0x0004, 0x7912, 0x7817, + 0x0004, 0x080c, 0x282d, 0x781b, 0x0002, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x20a9, 0x0080, 0x782f, 0x0000, 0x1f04, 0x241b, 0x20e1, + 0x9080, 0x783b, 0x001f, 0x20e1, 0x8700, 0x012e, 0x0005, 0x0126, + 0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, 0x24e2, 0xa084, 0x0007, + 0x0002, 0x244b, 0x2439, 0x243c, 0x243f, 0x2444, 0x2446, 0x2448, + 0x244a, 0x080c, 0x6436, 0x0078, 0x080c, 0x6475, 0x0060, 0x080c, + 0x6436, 0x080c, 0x6475, 0x0038, 0x0041, 0x0028, 0x0031, 0x0018, + 0x0021, 0x0008, 0x0011, 0x012e, 0x0005, 0x0006, 0x0016, 0x0026, + 0x080c, 0xb50c, 0x7930, 0xa184, 0x0003, 0x01b0, 0x2001, 0xb8f0, + 0x2004, 0xa005, 0x0170, 0x2001, 0x0133, 0x2004, 0xa005, 0x090c, + 0x151a, 0x00c6, 0x2001, 0xb8f0, 0x2064, 0x080c, 0x99e6, 0x00ce, + 0x04b8, 0x20e1, 0x9040, 0x04a0, 0xa184, 0x0030, 0x01e0, 0x6a00, + 0xa286, 0x0003, 0x1108, 0x00a0, 0x080c, 0x5b41, 0x1178, 0x2001, + 0xb89f, 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, + 0x0001, 0x080c, 0x5b85, 0x080c, 0x5a79, 0x0010, 0x080c, 0x4b7b, + 0x080c, 0x24e5, 0x00a8, 0xa184, 0x00c0, 0x0168, 0x00e6, 0x0036, + 0x0046, 0x0056, 0x2071, 0xb924, 0x080c, 0x1e1a, 0x005e, 0x004e, + 0x003e, 0x00ee, 0x0028, 0xa184, 0x0300, 0x0110, 0x20e1, 0x9020, + 0x7932, 0x002e, 0x001e, 0x000e, 0x0005, 0x0016, 0x00e6, 0x00f6, + 0x2071, 0xb600, 0x7128, 0x2001, 0xb891, 0x2102, 0x2001, 0xb899, + 0x2102, 0xa182, 0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0xa182, + 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0xa182, 0x02c1, 0x1218, + 0x2009, 0x0006, 0x00a0, 0xa182, 0x0349, 0x1218, 0x2009, 0x0005, + 0x0070, 0xa182, 0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0xa182, + 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0x2079, + 0x0200, 0x7912, 0x7817, 0x0004, 0x080c, 0x282d, 0x00fe, 0x00ee, + 0x001e, 0x0005, 0x7938, 0x080c, 0x151a, 0x00e6, 0x0026, 0x2071, + 0x0200, 0x20e1, 0x1000, 0x7220, 0x7028, 0x7020, 0xa206, 0x0de0, + 0x20e1, 0x9010, 0x002e, 0x00ee, 0x0005, 0x20e1, 0xa000, 0x7837, + 0x0001, 0x782f, 0x0000, 0x782f, 0x0000, 0x782f, 0x0000, 0x782f, + 0x0000, 0x7837, 0x0005, 0x20a9, 0x0210, 0x7830, 0xd0bc, 0x1110, + 0x1f04, 0x2505, 0x7837, 0x0001, 0x7837, 0x0000, 0xe000, 0xe000, + 0x20e1, 0xa000, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100, + 0x2071, 0xb600, 0x6024, 0x6026, 0x6053, 0x0030, 0x080c, 0x286c, + 0x6050, 0xa084, 0xfe7f, 0x6052, 0x2009, 0x00ef, 0x6132, 0x6136, + 0x080c, 0x287c, 0x60e7, 0x0000, 0x61ea, 0x60e3, 0x0008, 0x604b, + 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, 0x602f, 0x0000, 0x6007, + 0x0e9f, 0x601b, 0x001e, 0x600f, 0x00ff, 0x2001, 0xb88d, 0x2003, + 0x00ff, 0x602b, 0x002f, 0x012e, 0x0005, 0x2001, 0xb632, 0x2003, + 0x0000, 0x2001, 0xb631, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0xa184, 0x1e2c, 0x1118, + 0xa184, 0x0007, 0x002a, 0xa195, 0x0004, 0xa284, 0x0007, 0x0002, + 0x2582, 0x2568, 0x256b, 0x256e, 0x2573, 0x2575, 0x2579, 0x257d, + 0x080c, 0x6be6, 0x00b8, 0x080c, 0x6cc1, 0x00a0, 0x080c, 0x6cc1, + 0x080c, 0x6be6, 0x0078, 0x0099, 0x0068, 0x080c, 0x6be6, 0x0079, + 0x0048, 0x080c, 0x6cc1, 0x0059, 0x0028, 0x080c, 0x6cc1, 0x080c, + 0x6be6, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x6124, + 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x279b, 0x080c, 0x5b41, + 0x0578, 0x7000, 0xa086, 0x0003, 0x0198, 0x6024, 0xa084, 0x1800, + 0x0178, 0x080c, 0x5b67, 0x0118, 0x080c, 0x5b53, 0x1148, 0x6027, + 0x0020, 0x6043, 0x0000, 0x2001, 0xb89e, 0x2003, 0xaaaa, 0x0458, + 0x080c, 0x5b67, 0x15d0, 0x6024, 0xa084, 0x1800, 0x1108, 0x04a8, + 0x2001, 0xb89e, 0x2003, 0xaaaa, 0x2001, 0xb89f, 0x2003, 0x0001, + 0x2001, 0xb600, 0x2003, 0x0001, 0x080c, 0x5a79, 0x0804, 0x279b, + 0xd1ac, 0x1518, 0x6024, 0xd0dc, 0x1170, 0xd0e4, 0x1188, 0xd0d4, + 0x11a0, 0xd0cc, 0x0130, 0x708c, 0xa086, 0x0028, 0x1110, 0x080c, + 0x5cd0, 0x0804, 0x279b, 0x2001, 0xb89f, 0x2003, 0x0000, 0x0048, + 0x2001, 0xb89f, 0x2003, 0x0002, 0x0020, 0x080c, 0x5c43, 0x0804, + 0x279b, 0x080c, 0x5d75, 0x0804, 0x279b, 0xd1ac, 0x0904, 0x26e3, + 0x080c, 0x5b41, 0x11d8, 0x6027, 0x0020, 0x0006, 0x0026, 0x0036, + 0x080c, 0x5b5d, 0x1170, 0x2001, 0xb89f, 0x2003, 0x0001, 0x2001, + 0xb600, 0x2003, 0x0001, 0x080c, 0x5a79, 0x003e, 0x002e, 0x000e, + 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x5b18, 0x0016, 0x0046, + 0x00c6, 0x644c, 0xa486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, + 0x6043, 0x0090, 0x6043, 0x0010, 0x74ce, 0xa48c, 0xff00, 0x7034, + 0xd084, 0x0178, 0xa186, 0xf800, 0x1160, 0x703c, 0xd084, 0x1148, + 0xc085, 0x703e, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x3f13, + 0x003e, 0xa196, 0xff00, 0x05b8, 0x7054, 0xa084, 0x00ff, 0x810f, + 0xa116, 0x0588, 0x7130, 0xd184, 0x1570, 0x2011, 0xb653, 0x2214, + 0xd2ec, 0x0138, 0xc18d, 0x7132, 0x2011, 0xb653, 0x2214, 0xd2ac, + 0x1510, 0x6240, 0xa294, 0x0010, 0x0130, 0x6248, 0xa294, 0xff00, + 0xa296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x26b0, 0x7034, + 0xd08c, 0x1140, 0x2001, 0xb60c, 0x200c, 0xd1ac, 0x1904, 0x26b0, + 0xc1ad, 0x2102, 0x0036, 0x73cc, 0x2011, 0x8013, 0x080c, 0x3f13, + 0x003e, 0x0804, 0x26b0, 0x7034, 0xd08c, 0x1140, 0x2001, 0xb60c, + 0x200c, 0xd1ac, 0x1904, 0x26b0, 0xc1ad, 0x2102, 0x0036, 0x73cc, + 0x2011, 0x8013, 0x080c, 0x3f13, 0x003e, 0x7130, 0xc185, 0x7132, + 0x2011, 0xb653, 0x220c, 0xd1a4, 0x01d0, 0x0016, 0x2009, 0x0001, + 0x2011, 0x0100, 0x080c, 0x6b8c, 0x2019, 0x000e, 0x080c, 0xb121, + 0xa484, 0x00ff, 0xa080, 0x2df9, 0x200d, 0xa18c, 0xff00, 0x810f, + 0x8127, 0xa006, 0x2009, 0x000e, 0x080c, 0xb1a4, 0x001e, 0xd1ac, + 0x1148, 0x0016, 0x2009, 0x0000, 0x2019, 0x0004, 0x080c, 0x2ca4, + 0x001e, 0x0070, 0x0156, 0x20a9, 0x007f, 0x2009, 0x0000, 0x080c, + 0x501b, 0x1110, 0x080c, 0x4c7e, 0x8108, 0x1f04, 0x26a7, 0x015e, + 0x00ce, 0x004e, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, + 0x080c, 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, 0x0000, 0x080c, + 0x806b, 0x003e, 0x60e3, 0x0000, 0x001e, 0x2001, 0xb600, 0x2014, + 0xa296, 0x0004, 0x1128, 0xd19c, 0x11b0, 0x6228, 0xc29d, 0x622a, + 0x2003, 0x0001, 0x2001, 0xb623, 0x2003, 0x0000, 0x6027, 0x0020, + 0x080c, 0x5b67, 0x1140, 0x0016, 0x2009, 0x07d0, 0x2011, 0x5a56, + 0x080c, 0x6a94, 0x001e, 0xd194, 0x0904, 0x279b, 0x0016, 0x6220, + 0xd2b4, 0x0904, 0x274c, 0x080c, 0x6a82, 0x080c, 0x7df3, 0x6027, + 0x0004, 0x00f6, 0x2019, 0xb8ea, 0x2304, 0xa07d, 0x0570, 0x7804, + 0xa086, 0x0032, 0x1550, 0x00d6, 0x00c6, 0x00e6, 0x2069, 0x0140, + 0x618c, 0x6288, 0x7818, 0x608e, 0x7808, 0x608a, 0x6043, 0x0002, + 0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x6803, 0x1000, + 0x6803, 0x0000, 0x618e, 0x628a, 0x080c, 0x7102, 0x080c, 0x71e5, + 0x7810, 0x2070, 0x7037, 0x0103, 0x2f60, 0x080c, 0x86a4, 0x00ee, + 0x00ce, 0x00de, 0x00fe, 0x001e, 0x0005, 0x00fe, 0x00d6, 0x2069, + 0x0140, 0x6804, 0xa084, 0x4000, 0x0120, 0x6803, 0x1000, 0x6803, + 0x0000, 0x00de, 0x00c6, 0x2061, 0xb8e1, 0x6028, 0xa09a, 0x00c8, + 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0x7de6, 0x0804, 0x279a, + 0x2019, 0xb8ea, 0x2304, 0xa065, 0x0120, 0x2009, 0x0027, 0x080c, + 0x86d3, 0x00ce, 0x0804, 0x279a, 0xd2bc, 0x0904, 0x279a, 0x080c, + 0x6a8f, 0x6014, 0xa084, 0x0184, 0xa085, 0x0010, 0x6016, 0x6027, + 0x0004, 0x00d6, 0x2069, 0x0140, 0x6804, 0xa084, 0x4000, 0x0120, + 0x6803, 0x1000, 0x6803, 0x0000, 0x00de, 0x00c6, 0x2061, 0xb8e1, + 0x6044, 0xa09a, 0x00c8, 0x12f0, 0x8000, 0x6046, 0x603c, 0x00ce, + 0xa005, 0x0540, 0x2009, 0x07d0, 0x080c, 0x6a87, 0xa080, 0x0007, + 0x2004, 0xa086, 0x0006, 0x1138, 0x6114, 0xa18c, 0x0184, 0xa18d, + 0x0012, 0x6116, 0x00b8, 0x6114, 0xa18c, 0x0184, 0xa18d, 0x0016, + 0x6116, 0x0080, 0x0036, 0x2019, 0x0001, 0x080c, 0x806b, 0x003e, + 0x2019, 0xb8f0, 0x2304, 0xa065, 0x0120, 0x2009, 0x004f, 0x080c, + 0x86d3, 0x00ce, 0x001e, 0xd19c, 0x0904, 0x27f4, 0x7034, 0xd0ac, + 0x1560, 0x0016, 0x0156, 0x6027, 0x0008, 0x602f, 0x0020, 0x20a9, + 0x0006, 0x1d04, 0x27a9, 0x2091, 0x6000, 0x1f04, 0x27a9, 0x602f, + 0x0000, 0x6150, 0xa185, 0x1400, 0x6052, 0x20a9, 0x0366, 0x1d04, + 0x27b7, 0x2091, 0x6000, 0x6020, 0xd09c, 0x1130, 0x015e, 0x6152, + 0x001e, 0x6027, 0x0008, 0x0480, 0x080c, 0x293c, 0x1f04, 0x27b7, + 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0016, 0x6028, 0xc09c, + 0x602a, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, + 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, 0x0000, 0x080c, 0x806b, + 0x003e, 0x60e3, 0x0000, 0x080c, 0xb4eb, 0x080c, 0xb506, 0xa085, + 0x0001, 0x080c, 0x5b85, 0x2001, 0xb600, 0x2003, 0x0004, 0x6027, + 0x0008, 0x080c, 0x12e2, 0x001e, 0xa18c, 0xffd0, 0x6126, 0x0005, + 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb600, 0x71c4, 0x70c6, 0xa116, 0x0500, 0x81ff, 0x0128, + 0x2011, 0x8011, 0x080c, 0x3f13, 0x00c8, 0x2011, 0x8012, 0x080c, + 0x3f13, 0x2001, 0xb672, 0x2004, 0xd0fc, 0x1180, 0x0036, 0x00c6, + 0x080c, 0x28c7, 0x080c, 0x7fbc, 0x2061, 0x0100, 0x2019, 0x0028, + 0x2009, 0x0000, 0x080c, 0x2ca4, 0x00ce, 0x003e, 0x012e, 0x00fe, + 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x00c6, 0x00f6, 0x0006, + 0x0026, 0x2061, 0x0100, 0xa190, 0x2840, 0x2205, 0x60f2, 0x2011, + 0x284d, 0x2205, 0x60ee, 0x002e, 0x000e, 0x00fe, 0x00ce, 0x0005, + 0x0840, 0x0840, 0x0840, 0x0580, 0x0420, 0x0348, 0x02c0, 0x0258, + 0x0210, 0x01a8, 0x01a8, 0x01a8, 0x01a8, 0x0140, 0x00f8, 0x00d0, + 0x00b0, 0x00a0, 0x2028, 0xa18c, 0x00ff, 0x2130, 0xa094, 0xff00, + 0x1110, 0x81ff, 0x0118, 0x080c, 0x6723, 0x0038, 0xa080, 0x2df9, + 0x200d, 0xa18c, 0xff00, 0x810f, 0xa006, 0x0005, 0xa080, 0x2df9, + 0x200d, 0xa18c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, + 0xb615, 0x2003, 0x00ef, 0x20a9, 0x0010, 0xa006, 0x6852, 0x6856, + 0x1f04, 0x2877, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, + 0x0140, 0x2001, 0xb615, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214, + 0x20a9, 0x0010, 0x6853, 0x0000, 0xa006, 0x82ff, 0x1128, 0xa184, + 0x000f, 0xa080, 0xb51a, 0x2005, 0x6856, 0x8211, 0x1f04, 0x288c, + 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0xb600, 0x6030, + 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, + 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0xa116, + 0x0180, 0xa112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, + 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x28bc, 0x680f, + 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x2001, + 0xb653, 0x2004, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0xa006, 0x0046, + 0x2020, 0x2009, 0x002e, 0x080c, 0xb1a4, 0x004e, 0x0005, 0x00f6, + 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0548, 0xa084, + 0x0700, 0xa08e, 0x0300, 0x1520, 0x2011, 0x0000, 0x2009, 0x0002, + 0x2300, 0xa080, 0x0020, 0x2018, 0x2300, 0x080c, 0x6bb2, 0x2011, + 0x0030, 0x2200, 0x8007, 0xa085, 0x004c, 0x78c2, 0x2009, 0x0204, + 0x210c, 0x2200, 0xa100, 0x2009, 0x0138, 0x200a, 0x080c, 0x5b41, + 0x1118, 0x2009, 0xb88f, 0x200a, 0x002e, 0x001e, 0x00fe, 0x0005, + 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, + 0x0026, 0x2001, 0x0170, 0x200c, 0x8000, 0x2014, 0xa184, 0x0003, + 0x0110, 0x0804, 0x1b20, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, + 0x0006, 0x2001, 0x0100, 0x2004, 0xa082, 0x0005, 0x000e, 0x0268, + 0x2001, 0x0170, 0x200c, 0xa18c, 0x00ff, 0xa18e, 0x004c, 0x1128, + 0x200c, 0xa18c, 0xff00, 0x810f, 0x0010, 0x2009, 0x0000, 0x2001, + 0x0204, 0x2004, 0xa108, 0x0005, 0x0006, 0x0156, 0x00f6, 0x2079, + 0x0100, 0x20a9, 0x000a, 0x7854, 0xd08c, 0x1110, 0x1f04, 0x2943, + 0x00fe, 0x015e, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, + 0x0100, 0x6030, 0x0006, 0x6048, 0x0006, 0x60e4, 0x0006, 0x60e8, + 0x0006, 0x6050, 0x0006, 0x60f0, 0x0006, 0x60ec, 0x0006, 0x600c, + 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x60e0, 0x0006, 0x602f, + 0x0100, 0x602f, 0x0000, 0xe000, 0xe000, 0xe000, 0xe000, 0x602f, + 0x0040, 0x602f, 0x0000, 0x000e, 0x60e2, 0x000e, 0x602a, 0x000e, + 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x000e, 0x60f2, 0x000e, + 0x6052, 0x000e, 0x60ea, 0x000e, 0x60e6, 0x000e, 0x604a, 0x000e, + 0x6032, 0x6036, 0x2008, 0x080c, 0x287c, 0x000e, 0x00ce, 0x001e, + 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140, 0x2009, 0x0170, + 0x2104, 0x200b, 0x0080, 0xe000, 0xe000, 0x200a, 0x0005, 0x2a2f, + 0x2a33, 0x2a37, 0x2a3d, 0x2a43, 0x2a49, 0x2a4f, 0x2a57, 0x2a5f, + 0x2a65, 0x2a6b, 0x2a73, 0x2a7b, 0x2a83, 0x2a8b, 0x2a95, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2aa1, + 0x2aa1, 0x2aa7, 0x2aa7, 0x2aae, 0x2aae, 0x2ab5, 0x2ab5, 0x2abe, + 0x2abe, 0x2ac5, 0x2ac5, 0x2ace, 0x2ace, 0x2ad7, 0x2ad7, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, + 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2ae2, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, + 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x2a9f, 0x0106, + 0x0006, 0x0804, 0x2aea, 0x0106, 0x0006, 0x0804, 0x2aea, 0x0106, + 0x0006, 0x080c, 0x254e, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, + 0x254e, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x23bf, 0x0804, + 0x2aea, 0x0106, 0x0006, 0x080c, 0x23bf, 0x0804, 0x2aea, 0x0106, + 0x0006, 0x080c, 0x254e, 0x080c, 0x23bf, 0x0804, 0x2aea, 0x0106, + 0x0006, 0x080c, 0x254e, 0x080c, 0x23bf, 0x0804, 0x2aea, 0x0106, + 0x0006, 0x080c, 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, + 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x254e, 0x080c, + 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x254e, 0x080c, + 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x23bf, 0x080c, + 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x23bf, 0x080c, + 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, 0x254e, 0x080c, + 0x23bf, 0x080c, 0x2427, 0x0804, 0x2aea, 0x0106, 0x0006, 0x080c, + 0x254e, 0x080c, 0x23bf, 0x080c, 0x2427, 0x0804, 0x2aea, 0xe000, + 0x0cf0, 0x0106, 0x0006, 0x080c, 0x290b, 0x0804, 0x2aea, 0x0106, + 0x0006, 0x080c, 0x290b, 0x080c, 0x254e, 0x04e0, 0x0106, 0x0006, + 0x080c, 0x290b, 0x080c, 0x23bf, 0x04a8, 0x0106, 0x0006, 0x080c, + 0x290b, 0x080c, 0x254e, 0x080c, 0x23bf, 0x0460, 0x0106, 0x0006, + 0x080c, 0x290b, 0x080c, 0x2427, 0x0428, 0x0106, 0x0006, 0x080c, + 0x290b, 0x080c, 0x254e, 0x080c, 0x2427, 0x00e0, 0x0106, 0x0006, + 0x080c, 0x290b, 0x080c, 0x23bf, 0x080c, 0x2427, 0x0098, 0x0106, + 0x0006, 0x080c, 0x290b, 0x080c, 0x254e, 0x080c, 0x23bf, 0x080c, + 0x2427, 0x0040, 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, + 0x080c, 0x151a, 0x000e, 0x010e, 0x000d, 0x00c6, 0x0026, 0x0046, + 0x2021, 0x0000, 0x080c, 0x537b, 0x1904, 0x2bca, 0x72d4, 0x2001, + 0xb89e, 0x2004, 0xa005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, + 0xd2bc, 0x1904, 0x2bca, 0x080c, 0x2bce, 0x0804, 0x2bca, 0xd2cc, + 0x1904, 0x2bca, 0x080c, 0x5b41, 0x1120, 0x709f, 0xffff, 0x0804, + 0x2bca, 0xd294, 0x0120, 0x709f, 0xffff, 0x0804, 0x2bca, 0x2001, + 0xb615, 0x203c, 0x7288, 0xd284, 0x0904, 0x2b6c, 0xd28c, 0x1904, + 0x2b6c, 0x0036, 0x739c, 0xa38e, 0xffff, 0x1110, 0x2019, 0x0001, + 0x8314, 0xa2e0, 0xbdc0, 0x2c04, 0xa38c, 0x0001, 0x0120, 0xa084, + 0xff00, 0x8007, 0x0010, 0xa084, 0x00ff, 0xa70e, 0x0560, 0xa08e, + 0x0000, 0x0548, 0xa08e, 0x00ff, 0x1150, 0x7230, 0xd284, 0x1538, + 0x7288, 0xc28d, 0x728a, 0x709f, 0xffff, 0x003e, 0x0428, 0x2009, + 0x0000, 0x080c, 0x2852, 0x080c, 0x4fbf, 0x11b8, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x1150, 0x7030, 0xd08c, 0x0118, 0x6000, + 0xd0bc, 0x0120, 0x080c, 0x2be1, 0x0140, 0x0028, 0x080c, 0x2d12, + 0x080c, 0x2c0f, 0x0110, 0x8318, 0x0818, 0x739e, 0x0010, 0x709f, + 0xffff, 0x003e, 0x0804, 0x2bca, 0xa780, 0x2df9, 0x203d, 0xa7bc, + 0xff00, 0x873f, 0x2041, 0x007e, 0x709c, 0xa096, 0xffff, 0x1120, + 0x2009, 0x0000, 0x28a8, 0x0050, 0xa812, 0x0220, 0x2008, 0xa802, + 0x20a8, 0x0020, 0x709f, 0xffff, 0x0804, 0x2bca, 0x2700, 0x0156, + 0x0016, 0xa106, 0x05a0, 0xc484, 0x080c, 0x501b, 0x0120, 0x080c, + 0x4fbf, 0x15a8, 0x0008, 0xc485, 0x6004, 0xa084, 0x00ff, 0xa086, + 0x0006, 0x1130, 0x7030, 0xd08c, 0x01e8, 0x6000, 0xd0bc, 0x11d0, + 0x7288, 0xd28c, 0x0188, 0x6004, 0xa084, 0x00ff, 0xa082, 0x0006, + 0x02b0, 0xd484, 0x1118, 0x080c, 0x4fde, 0x0028, 0x080c, 0x2d9f, + 0x0170, 0x080c, 0x2dcc, 0x0058, 0x080c, 0x2d12, 0x080c, 0x2c0f, + 0x0170, 0x0028, 0x080c, 0x2d9f, 0x0110, 0x0419, 0x0140, 0x001e, + 0x8108, 0x015e, 0x1f04, 0x2b86, 0x709f, 0xffff, 0x0018, 0x001e, + 0x015e, 0x719e, 0x004e, 0x002e, 0x00ce, 0x0005, 0x00c6, 0x0016, + 0x709f, 0x0001, 0x2009, 0x007e, 0x080c, 0x4fbf, 0x1138, 0x080c, + 0x2d12, 0x04a9, 0x0118, 0x70d4, 0xc0bd, 0x70d6, 0x001e, 0x00ce, + 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2c68, 0x2001, 0xb657, + 0x2004, 0xa084, 0x00ff, 0x6842, 0x080c, 0x9f92, 0x01d8, 0x2d00, + 0x601a, 0x080c, 0xa0e3, 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, + 0x4f5d, 0x2001, 0x0000, 0x080c, 0x4f6f, 0x0126, 0x2091, 0x8000, + 0x7098, 0x8000, 0x709a, 0x012e, 0x2009, 0x0004, 0x080c, 0x86d3, + 0xa085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x0016, + 0x0076, 0x00d6, 0x00c6, 0x2c68, 0x2001, 0xb657, 0x2004, 0xa084, + 0x00ff, 0x6842, 0x080c, 0x9f92, 0x0550, 0x2d00, 0x601a, 0x6800, + 0xc0c4, 0x6802, 0x68a0, 0xa086, 0x007e, 0x0140, 0x6804, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x1110, 0x080c, 0x2cd1, 0x080c, 0xa0e3, + 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, 0x4f5d, 0x2001, 0x0002, + 0x080c, 0x4f6f, 0x0126, 0x2091, 0x8000, 0x7098, 0x8000, 0x709a, + 0x012e, 0x2009, 0x0002, 0x080c, 0x86d3, 0xa085, 0x0001, 0x00ce, + 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x0026, 0x2009, 0x0080, + 0x080c, 0x4fbf, 0x1120, 0x0031, 0x0110, 0x70db, 0xffff, 0x002e, + 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2c68, 0x080c, + 0x864e, 0x01e8, 0x2d00, 0x601a, 0x080c, 0xa0e3, 0x601f, 0x0001, + 0x2001, 0x0000, 0x080c, 0x4f5d, 0x2001, 0x0002, 0x080c, 0x4f6f, + 0x0126, 0x2091, 0x8000, 0x080c, 0x2cd1, 0x70dc, 0x8000, 0x70de, + 0x012e, 0x2009, 0x0002, 0x080c, 0x86d3, 0xa085, 0x0001, 0x00ce, + 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126, 0x2091, + 0x8000, 0x2009, 0x007f, 0x080c, 0x4fbf, 0x1190, 0x2c68, 0x080c, + 0x864e, 0x0170, 0x2d00, 0x601a, 0x6312, 0x601f, 0x0001, 0x620a, + 0x080c, 0xa0e3, 0x2009, 0x0022, 0x080c, 0x86d3, 0xa085, 0x0001, + 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, + 0x0026, 0x080c, 0x6e73, 0x080c, 0x6e16, 0x080c, 0x90fb, 0x2130, + 0x81ff, 0x0128, 0x20a9, 0x007e, 0x2009, 0x0000, 0x0020, 0x20a9, + 0x007f, 0x2009, 0x0000, 0x0016, 0x080c, 0x501b, 0x1120, 0x080c, + 0x521c, 0x080c, 0x4c7e, 0x001e, 0x8108, 0x1f04, 0x2cbb, 0x86ff, + 0x1110, 0x080c, 0x11f5, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, + 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6218, 0x2270, + 0x72a0, 0x0026, 0x2019, 0x0029, 0x080c, 0x6e67, 0x0076, 0x2039, + 0x0000, 0x080c, 0x6d74, 0x2c08, 0x080c, 0xaf3e, 0x007e, 0x001e, + 0x2e60, 0x080c, 0x521c, 0x6210, 0x6314, 0x080c, 0x4c7e, 0x6212, + 0x6316, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, + 0x0006, 0x6018, 0xa080, 0x0028, 0x2004, 0xa086, 0x0080, 0x0150, + 0x2071, 0xb600, 0x7098, 0xa005, 0x0110, 0x8001, 0x709a, 0x000e, + 0x00ee, 0x0005, 0x2071, 0xb600, 0x70dc, 0xa005, 0x0dc0, 0x8001, + 0x70de, 0x0ca8, 0x6000, 0xc08c, 0x6002, 0x0005, 0x00f6, 0x00e6, + 0x00c6, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118, + 0x20a9, 0x0001, 0x0098, 0x2001, 0xb653, 0x2004, 0xd0c4, 0x0150, + 0xd0a4, 0x0140, 0xa006, 0x0046, 0x2020, 0x2009, 0x002d, 0x080c, + 0xb1a4, 0x004e, 0x20a9, 0x00ff, 0x2011, 0x0000, 0x0026, 0xa28e, + 0x007e, 0x0904, 0x2d7e, 0xa28e, 0x007f, 0x0904, 0x2d7e, 0xa28e, + 0x0080, 0x05e0, 0xa288, 0xb735, 0x210c, 0x81ff, 0x05b8, 0x8fff, + 0x1148, 0x2001, 0xb8be, 0x0006, 0x2003, 0x0001, 0x04d9, 0x000e, + 0x2003, 0x0000, 0x00c6, 0x2160, 0x2001, 0x0001, 0x080c, 0x5385, + 0x00ce, 0x2019, 0x0029, 0x080c, 0x6e67, 0x0076, 0x2039, 0x0000, + 0x080c, 0x6d74, 0x00c6, 0x0026, 0x2160, 0x6204, 0xa294, 0x00ff, + 0xa286, 0x0006, 0x1118, 0x6007, 0x0404, 0x0028, 0x2001, 0x0004, + 0x8007, 0xa215, 0x6206, 0x002e, 0x00ce, 0x0016, 0x2c08, 0x080c, + 0xaf3e, 0x001e, 0x007e, 0x2160, 0x080c, 0x521c, 0x002e, 0x8210, + 0x1f04, 0x2d36, 0x015e, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, + 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x2001, 0xb653, 0x2004, + 0xd0c4, 0x0148, 0xd0a4, 0x0138, 0xa006, 0x2220, 0x8427, 0x2009, + 0x0029, 0x080c, 0xb1a4, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, + 0x0026, 0x0036, 0x00c6, 0x7288, 0x82ff, 0x01f8, 0x2011, 0xb653, + 0x2214, 0xd2ac, 0x11d0, 0x2100, 0x080c, 0x2866, 0x81ff, 0x01b8, + 0x2019, 0x0001, 0x8314, 0xa2e0, 0xbdc0, 0x2c04, 0xd384, 0x0120, + 0xa084, 0xff00, 0x8007, 0x0010, 0xa084, 0x00ff, 0xa116, 0x0138, + 0xa096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0xa085, 0x0001, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x0016, 0x0026, 0x0036, 0x2110, 0x0026, 0x2019, 0x0029, + 0x080c, 0x8320, 0x002e, 0x080c, 0xb449, 0x003e, 0x002e, 0x001e, + 0xa180, 0xb735, 0x2004, 0xa065, 0x0158, 0x0016, 0x00c6, 0x2061, + 0xb9f5, 0x001e, 0x611a, 0x080c, 0x2cd1, 0x001e, 0x080c, 0x4fde, + 0x012e, 0x00ce, 0x001e, 0x0005, 0x2001, 0xb635, 0x2004, 0xd0cc, + 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, + 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, + 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, + 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, + 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, + 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, + 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, + 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, + 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, + 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, + 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, + 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, + 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, + 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, + 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, + 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, + 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, + 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, + 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, + 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, + 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, + 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, + 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, + 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, + 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, + 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, + 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x2071, 0xb682, 0x7003, 0x0002, 0xa006, 0x7012, 0x7016, + 0x703a, 0x703e, 0x7033, 0xb692, 0x7037, 0xb692, 0x7007, 0x0001, + 0x2061, 0xb6d2, 0x6003, 0x0002, 0x0005, 0x1004, 0x2f1f, 0x0e04, + 0x2f1f, 0x2071, 0xb682, 0x2b78, 0x7818, 0xd084, 0x1140, 0x2a60, + 0x7820, 0xa08e, 0x0069, 0x1904, 0x3004, 0x0804, 0x2f9d, 0x0005, + 0x2071, 0xb682, 0x7004, 0x0002, 0x2f28, 0x2f29, 0x2f32, 0x2f43, + 0x0005, 0x1004, 0x2f31, 0x0e04, 0x2f31, 0x2b78, 0x7818, 0xd084, + 0x01e8, 0x0005, 0x2b78, 0x2061, 0xb6d2, 0x6008, 0xa08e, 0x0100, + 0x0128, 0xa086, 0x0200, 0x0904, 0x2ffe, 0x0005, 0x7014, 0x2068, + 0x2a60, 0x7018, 0x0807, 0x7010, 0x2068, 0x6834, 0xa086, 0x0103, + 0x0108, 0x0005, 0x2a60, 0x2b78, 0x7018, 0x0807, 0x2a60, 0x7820, + 0xa08a, 0x0040, 0x1210, 0x61c4, 0x0042, 0x2100, 0xa08a, 0x003f, + 0x1a04, 0x2ffb, 0x61c4, 0x0804, 0x2f9d, 0x2fdf, 0x300a, 0x3012, + 0x3016, 0x301e, 0x3024, 0x3028, 0x3034, 0x3037, 0x3041, 0x3044, + 0x2ffb, 0x2ffb, 0x2ffb, 0x3047, 0x2ffb, 0x3056, 0x306d, 0x3084, + 0x30fe, 0x3103, 0x312c, 0x317d, 0x318e, 0x31ad, 0x31e5, 0x31ef, + 0x31fc, 0x320f, 0x3230, 0x3239, 0x326f, 0x3275, 0x2ffb, 0x329e, + 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x32a5, 0x32af, 0x2ffb, + 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x32b7, + 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x32c9, 0x32d3, 0x2ffb, + 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x0002, 0x32fd, 0x3351, + 0x33ac, 0x33c6, 0x2ffb, 0x33f7, 0x382a, 0x427a, 0x2ffb, 0x2ffb, + 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x2ffb, 0x3041, 0x3044, + 0x382c, 0x2ffb, 0x3839, 0x4313, 0x436e, 0x43d2, 0x2ffb, 0x4435, + 0x445f, 0x447e, 0x44b0, 0x2ffb, 0x2ffb, 0x2ffb, 0x383d, 0x39e2, + 0x39fc, 0x3a26, 0x3a87, 0x3ae7, 0x3af2, 0x3b2a, 0x3b39, 0x3b48, + 0x3b4b, 0x3b6e, 0x3bba, 0x3c34, 0x3c41, 0x3d42, 0x3e6a, 0x3e93, + 0x3f91, 0x3fb3, 0x3fbf, 0x3ff8, 0x40bc, 0x2ffb, 0x2ffb, 0x2ffb, + 0x2ffb, 0x4124, 0x413f, 0x41b1, 0x4263, 0x713c, 0x0000, 0x2021, + 0x4000, 0x080c, 0x3ef0, 0x0126, 0x2091, 0x8000, 0x0e04, 0x2feb, + 0x7818, 0xd084, 0x0110, 0x012e, 0x0cb0, 0x7c22, 0x7926, 0x7a2a, + 0x7b2e, 0x781b, 0x0001, 0x2091, 0x4080, 0x7007, 0x0001, 0x2091, + 0x5000, 0x012e, 0x0005, 0x2021, 0x4001, 0x0c18, 0x2021, 0x4002, + 0x0c00, 0x2021, 0x4003, 0x08e8, 0x2021, 0x4005, 0x08d0, 0x2021, + 0x4006, 0x08b8, 0xa02e, 0x2520, 0x7b28, 0x7a2c, 0x7824, 0x7930, + 0x0804, 0x3efd, 0x7823, 0x0004, 0x7824, 0x0807, 0xa02e, 0x2520, + 0x7b28, 0x7a2c, 0x7824, 0x7930, 0x0804, 0x3f00, 0x7924, 0x7828, + 0x2114, 0x200a, 0x0804, 0x2fdf, 0x7924, 0x2114, 0x0804, 0x2fdf, + 0x2099, 0x0009, 0x20a1, 0x0009, 0x20a9, 0x0007, 0x53a3, 0x7924, + 0x7a28, 0x7b2c, 0x0804, 0x2fdf, 0x7824, 0x2060, 0x0090, 0x2009, + 0x0002, 0x2011, 0x0002, 0x2019, 0x0008, 0x783b, 0x0017, 0x0804, + 0x2fdf, 0x7d38, 0x7c3c, 0x0840, 0x7d38, 0x7c3c, 0x0888, 0x2061, + 0x1000, 0xe10c, 0xa006, 0x2c15, 0xa200, 0x8c60, 0x8109, 0x1dd8, + 0x2010, 0xa005, 0x0904, 0x2fdf, 0x0804, 0x3001, 0x2069, 0xb652, + 0x7824, 0x7930, 0xa11a, 0x1a04, 0x3007, 0x8019, 0x0904, 0x3007, + 0x684a, 0x6942, 0x782c, 0x6852, 0x7828, 0x6856, 0xa006, 0x685a, + 0x685e, 0x080c, 0x5e17, 0x0804, 0x2fdf, 0x2069, 0xb652, 0x7824, + 0x7934, 0xa11a, 0x1a04, 0x3007, 0x8019, 0x0904, 0x3007, 0x684e, + 0x6946, 0x782c, 0x6862, 0x7828, 0x6866, 0xa006, 0x686a, 0x686e, + 0x080c, 0x5447, 0x0804, 0x2fdf, 0xa02e, 0x2520, 0x81ff, 0x1904, + 0x3004, 0x7924, 0x7b28, 0x7a2c, 0x20a9, 0x0005, 0x20a1, 0xb689, + 0x41a1, 0x080c, 0x3ebc, 0x0904, 0x3004, 0x2009, 0x0020, 0x080c, + 0x3efd, 0x701b, 0x309c, 0x0005, 0x6834, 0x2008, 0xa084, 0x00ff, + 0xa096, 0x0011, 0x0138, 0xa096, 0x0019, 0x0120, 0xa096, 0x0015, + 0x1904, 0x3004, 0x810f, 0xa18c, 0x00ff, 0x0904, 0x3004, 0x710e, + 0x700c, 0x8001, 0x0528, 0x700e, 0x080c, 0x3ebc, 0x0904, 0x3004, + 0x2009, 0x0020, 0x2061, 0xb6d2, 0x6224, 0x6328, 0x642c, 0x6530, + 0xa290, 0x0040, 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9, 0x0000, + 0x080c, 0x3efd, 0x701b, 0x30cd, 0x0005, 0x6834, 0xa084, 0x00ff, + 0xa096, 0x0002, 0x0120, 0xa096, 0x000a, 0x1904, 0x3004, 0x08c0, + 0x7010, 0x2068, 0x6838, 0xc0fd, 0x683a, 0x080c, 0x4ebb, 0x1128, + 0x7007, 0x0003, 0x701b, 0x30e7, 0x0005, 0x080c, 0x554d, 0x0126, + 0x2091, 0x8000, 0x20a9, 0x0005, 0x2099, 0xb689, 0x530a, 0x2100, + 0xa210, 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0xad80, + 0x000d, 0x2009, 0x0020, 0x012e, 0x0804, 0x3f00, 0x61ac, 0x7824, + 0x60ae, 0x0804, 0x2fdf, 0x2091, 0x8000, 0x7823, 0x4000, 0x7827, + 0x4953, 0x782b, 0x5020, 0x782f, 0x2020, 0x2009, 0x017f, 0x2104, + 0x7832, 0x3f00, 0x7836, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, + 0x603c, 0x8007, 0xa205, 0x783a, 0x2009, 0x04fd, 0x2104, 0x783e, + 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2071, 0x0010, + 0x20c1, 0x00f0, 0x0804, 0x0427, 0x81ff, 0x1904, 0x3004, 0x7924, + 0x810f, 0xa18c, 0x00ff, 0x080c, 0x501b, 0x1904, 0x3007, 0x7e38, + 0xa684, 0x3fff, 0xa082, 0x4000, 0x0210, 0x0804, 0x3007, 0x7c28, + 0x7d2c, 0x080c, 0x51e3, 0xd28c, 0x1118, 0x080c, 0x518c, 0x0010, + 0x080c, 0x51bc, 0x1518, 0x2061, 0xbe00, 0x0126, 0x2091, 0x8000, + 0x6000, 0xa086, 0x0000, 0x0148, 0x6010, 0xa06d, 0x0130, 0x683c, + 0xa406, 0x1118, 0x6840, 0xa506, 0x0150, 0x012e, 0xace0, 0x0018, + 0x2001, 0xb617, 0x2004, 0xac02, 0x1a04, 0x3004, 0x0c30, 0x080c, + 0x99e6, 0x012e, 0x0904, 0x3004, 0x0804, 0x2fdf, 0xa00e, 0x2001, + 0x0005, 0x080c, 0x554d, 0x0126, 0x2091, 0x8000, 0x080c, 0x9f8e, + 0x080c, 0x547a, 0x012e, 0x0804, 0x2fdf, 0x81ff, 0x1904, 0x3004, + 0x080c, 0x3ed1, 0x0904, 0x3007, 0x080c, 0x50e1, 0x0904, 0x3004, + 0x080c, 0x51ef, 0x0904, 0x3004, 0x0804, 0x2fdf, 0x81ff, 0x1904, + 0x3004, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x080c, 0x525b, 0x0904, + 0x3004, 0x2019, 0x0005, 0x7924, 0x080c, 0x520a, 0x0904, 0x3004, + 0x7828, 0xa08a, 0x1000, 0x1a04, 0x3007, 0x8003, 0x800b, 0x810b, + 0xa108, 0x080c, 0x6a1a, 0x0804, 0x2fdf, 0x0126, 0x2091, 0x8000, + 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, 0x00ff, 0x6450, + 0x2400, 0xa506, 0x01f8, 0x2508, 0x080c, 0x501b, 0x11d8, 0x080c, + 0x525b, 0x1128, 0x2009, 0x0002, 0x62b4, 0x2518, 0x00c0, 0x2019, + 0x0004, 0xa00e, 0x080c, 0x520a, 0x1118, 0x2009, 0x0006, 0x0078, + 0x7824, 0xa08a, 0x1000, 0x1270, 0x8003, 0x800b, 0x810b, 0xa108, + 0x080c, 0x6a1a, 0x8529, 0x1ae0, 0x012e, 0x0804, 0x2fdf, 0x012e, + 0x0804, 0x3004, 0x012e, 0x0804, 0x3007, 0x080c, 0x3ed1, 0x0904, + 0x3007, 0x080c, 0x5147, 0x080c, 0x51e3, 0x0804, 0x2fdf, 0x81ff, + 0x1904, 0x3004, 0x080c, 0x3ed1, 0x0904, 0x3007, 0x080c, 0x5138, + 0x080c, 0x51e3, 0x0804, 0x2fdf, 0x81ff, 0x1904, 0x3004, 0x080c, + 0x3ed1, 0x0904, 0x3007, 0x080c, 0x51be, 0x0904, 0x3004, 0x080c, + 0x4eff, 0x080c, 0x5185, 0x080c, 0x51e3, 0x0804, 0x2fdf, 0x080c, + 0x3ed1, 0x0904, 0x3007, 0x080c, 0x50e1, 0x0904, 0x3004, 0x62a0, + 0x2019, 0x0005, 0x00c6, 0x080c, 0x521c, 0x2061, 0x0000, 0x080c, + 0x6e67, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d74, 0x2009, 0x0000, + 0x080c, 0xaf3e, 0x007e, 0x00ce, 0x080c, 0x51e3, 0x0804, 0x2fdf, + 0x080c, 0x3ed1, 0x0904, 0x3007, 0x080c, 0x51e3, 0x2208, 0x0804, + 0x2fdf, 0x0156, 0x00d6, 0x00e6, 0x2069, 0xb714, 0x6810, 0x6914, + 0xa10a, 0x1210, 0x2009, 0x0000, 0x6816, 0x2011, 0x0000, 0x2019, + 0x0000, 0x20a9, 0x007e, 0x2069, 0xb735, 0x2d04, 0xa075, 0x0130, + 0x704c, 0x0071, 0xa210, 0x7080, 0x0059, 0xa318, 0x8d68, 0x1f04, + 0x324d, 0x2300, 0xa218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x2fdf, + 0x00f6, 0x0016, 0xa07d, 0x0140, 0x2001, 0x0000, 0x8000, 0x2f0c, + 0x81ff, 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, + 0xb714, 0x6910, 0x62b0, 0x0804, 0x2fdf, 0x81ff, 0x1904, 0x3004, + 0x6150, 0xa190, 0x2df9, 0x2215, 0xa294, 0x00ff, 0x6370, 0x83ff, + 0x0108, 0x6274, 0x67d4, 0xd79c, 0x0118, 0x2031, 0x0001, 0x0090, + 0xd7ac, 0x0118, 0x2031, 0x0003, 0x0068, 0xd7a4, 0x0118, 0x2031, + 0x0002, 0x0040, 0x080c, 0x5b41, 0x1118, 0x2031, 0x0004, 0x0010, + 0x2031, 0x0000, 0x7e3a, 0x7f3e, 0x0804, 0x2fdf, 0x6140, 0x6244, + 0x2019, 0xb8b6, 0x231c, 0x0804, 0x2fdf, 0x0126, 0x2091, 0x8000, + 0x6134, 0xa006, 0x2010, 0x6338, 0x012e, 0x0804, 0x2fdf, 0x080c, + 0x3ee1, 0x0904, 0x3007, 0x6244, 0x6338, 0x0804, 0x2fdf, 0x6140, + 0x6244, 0x7824, 0x6042, 0x7b28, 0x6346, 0x2069, 0xb652, 0x831f, + 0xa305, 0x6816, 0x782c, 0x2069, 0xb8b6, 0x2d1c, 0x206a, 0x0804, + 0x2fdf, 0x0126, 0x2091, 0x8000, 0x7824, 0x6036, 0x782c, 0x603a, + 0x012e, 0x0804, 0x2fdf, 0x7838, 0xa005, 0x01a8, 0x7828, 0xa025, + 0x0904, 0x3007, 0x782c, 0xa02d, 0x0904, 0x3007, 0xa00e, 0x080c, + 0x501b, 0x1120, 0x6244, 0x6338, 0x6446, 0x653a, 0xa186, 0x00ff, + 0x0190, 0x8108, 0x0ca0, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x7828, + 0xa00d, 0x0904, 0x3007, 0x782c, 0xa005, 0x0904, 0x3007, 0x6244, + 0x6146, 0x6338, 0x603a, 0x0804, 0x2fdf, 0x2001, 0xb600, 0x2004, + 0xa086, 0x0003, 0x1904, 0x3004, 0x00c6, 0x2061, 0x0100, 0x7924, + 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, 0x1130, 0x2001, 0xb615, + 0x2004, 0xa085, 0xff00, 0x0078, 0xa182, 0x007f, 0x16a0, 0xa188, + 0x2df9, 0x210d, 0xa18c, 0x00ff, 0x2001, 0xb615, 0x2004, 0xa116, + 0x0550, 0x810f, 0xa105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, + 0x864e, 0x000e, 0x01e0, 0x601a, 0x600b, 0xbc09, 0x601f, 0x0001, + 0x080c, 0x3ebc, 0x01d8, 0x6837, 0x0000, 0x7007, 0x0003, 0x6833, + 0x0000, 0x6838, 0xc0fd, 0x683a, 0x701b, 0x33a5, 0x2d00, 0x6012, + 0x2009, 0x0032, 0x080c, 0x86d3, 0x012e, 0x00ce, 0x0005, 0x012e, + 0x00ce, 0x0804, 0x3004, 0x00ce, 0x0804, 0x3007, 0x080c, 0x86a4, + 0x0cb0, 0x2001, 0xb600, 0x2004, 0xa086, 0x0003, 0x1904, 0x3004, + 0x00c6, 0x2061, 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, + 0x00ff, 0x1130, 0x2001, 0xb615, 0x2004, 0xa085, 0xff00, 0x0078, + 0xa182, 0x007f, 0x16a0, 0xa188, 0x2df9, 0x210d, 0xa18c, 0x00ff, + 0x2001, 0xb615, 0x2004, 0xa116, 0x0550, 0x810f, 0xa105, 0x0126, + 0x2091, 0x8000, 0x0006, 0x080c, 0x864e, 0x000e, 0x01e0, 0x601a, + 0x600b, 0xbc05, 0x601f, 0x0001, 0x080c, 0x3ebc, 0x01d8, 0x6837, + 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x701b, 0x33a5, 0x2d00, 0x6012, 0x2009, 0x0032, 0x080c, 0x86d3, + 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x3004, 0x00ce, + 0x0804, 0x3007, 0x080c, 0x86a4, 0x0cb0, 0x6830, 0xa086, 0x0100, + 0x0904, 0x3004, 0x0804, 0x2fdf, 0x2061, 0xb975, 0x0126, 0x2091, + 0x8000, 0x6000, 0xd084, 0x0178, 0x6104, 0x6208, 0x2a60, 0x6068, + 0x783a, 0x60b4, 0x783e, 0x60b0, 0x2019, 0x0072, 0x201a, 0x6348, + 0x012e, 0x0804, 0x2fdf, 0xa00e, 0x2110, 0x0c80, 0x81ff, 0x1904, + 0x3004, 0x080c, 0x5b41, 0x0904, 0x3004, 0x0126, 0x2091, 0x8000, + 0x6248, 0x6068, 0xa202, 0x0248, 0xa085, 0x0001, 0x080c, 0x289c, + 0x080c, 0x4673, 0x012e, 0x0804, 0x2fdf, 0x012e, 0x0804, 0x3007, + 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, 0xb8c0, 0x2070, 0x2061, + 0xb652, 0x6008, 0x2072, 0x2009, 0x0000, 0x2011, 0x1000, 0x080c, + 0x6bb2, 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x7824, 0xa084, 0x0007, 0x0002, 0x3409, 0x3412, + 0x3419, 0x3406, 0x3406, 0x3406, 0x3406, 0x3406, 0x012e, 0x0804, + 0x3007, 0x2009, 0x0114, 0x2104, 0xa085, 0x0800, 0x200a, 0x080c, + 0x3584, 0x0070, 0x2009, 0x010b, 0x200b, 0x0010, 0x080c, 0x3584, + 0x0038, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x2fe1, + 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x080c, 0x33e0, 0x2009, 0x0101, 0x210c, 0x0016, 0x2001, 0x0138, + 0x200c, 0x2003, 0x0001, 0x0016, 0x2001, 0x007a, 0x2034, 0x2001, + 0x007b, 0x202c, 0xa006, 0x2048, 0x2050, 0x2058, 0x080c, 0x37cf, + 0x080c, 0x3733, 0xa03e, 0x2720, 0x00f6, 0x00e6, 0x00c6, 0x2d60, + 0x2071, 0xb94b, 0x2079, 0x0020, 0x00d6, 0x2069, 0x0000, 0x6824, + 0xd0b4, 0x0140, 0x2001, 0x007d, 0x2004, 0x783e, 0x2001, 0x007c, + 0x2004, 0x783a, 0x00de, 0x2011, 0x0001, 0x080c, 0x36df, 0x080c, + 0x36df, 0x00ce, 0x00ee, 0x00fe, 0x080c, 0x362a, 0x080c, 0x3707, + 0x080c, 0x3684, 0x080c, 0x35e9, 0x080c, 0x361a, 0x00f6, 0x2079, + 0x0100, 0x7824, 0xd094, 0x0530, 0x7814, 0xa084, 0x0184, 0xa085, + 0x0010, 0x7816, 0x2079, 0x0140, 0x080c, 0x3562, 0x1110, 0x00fe, + 0x0430, 0x7804, 0xd0dc, 0x0dc0, 0x2079, 0x0100, 0x7827, 0x0086, + 0x7814, 0xa084, 0x0184, 0xa085, 0x0032, 0x7816, 0x080c, 0x3562, + 0x1110, 0x00fe, 0x00a0, 0x7824, 0xd0bc, 0x0dc0, 0x7827, 0x0080, + 0xa026, 0x7c16, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x356c, + 0x00fe, 0x0804, 0x352c, 0x00fe, 0x080c, 0x3562, 0x1150, 0x8948, + 0x2001, 0x007a, 0x2602, 0x2001, 0x007b, 0x2502, 0x080c, 0x356c, + 0x0088, 0x87ff, 0x0140, 0x2001, 0x0201, 0x2004, 0xa005, 0x1904, + 0x3466, 0x8739, 0x0038, 0x2001, 0xb924, 0x2004, 0xa086, 0x0000, + 0x1904, 0x3466, 0x2001, 0x0033, 0x2003, 0x00f6, 0x8631, 0x1208, + 0x8529, 0x2500, 0xa605, 0x0904, 0x352c, 0x7824, 0xd0bc, 0x0128, + 0x2900, 0xaa05, 0xab05, 0x1904, 0x352c, 0x6033, 0x000d, 0x2001, + 0x0030, 0x2003, 0x0004, 0x7824, 0xd0ac, 0x1148, 0x2001, 0xb924, + 0x2003, 0x0003, 0x2001, 0x0030, 0x2003, 0x0009, 0x0040, 0x6027, + 0x0001, 0x2001, 0x0075, 0x2004, 0xa005, 0x0108, 0x6026, 0x2c00, + 0x601a, 0x20e1, 0x9040, 0x2d00, 0x681a, 0x6833, 0x000d, 0x7824, + 0xd0a4, 0x1180, 0x6827, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, + 0x0020, 0x6003, 0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3501, + 0x00ce, 0x0040, 0x6827, 0x0001, 0x2001, 0x0074, 0x2004, 0xa005, + 0x0108, 0x6826, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0020, + 0x7827, 0x0002, 0x2001, 0x0072, 0x2004, 0xa084, 0xfff8, 0x601a, + 0x0006, 0x2001, 0x0073, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, + 0x00ce, 0x00fe, 0x0804, 0x3444, 0x2061, 0x0100, 0x6027, 0x0002, + 0x001e, 0x61e2, 0x001e, 0x6106, 0x7824, 0xa084, 0x0003, 0xa086, + 0x0002, 0x0188, 0x20e1, 0x9028, 0x6050, 0xa084, 0xf7ef, 0x6052, + 0x602f, 0x0000, 0x602c, 0xc0ac, 0x602e, 0x604b, 0xf7f7, 0x6043, + 0x0090, 0x6043, 0x0010, 0x2908, 0x2a10, 0x2b18, 0x2b00, 0xaa05, + 0xa905, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, + 0x008e, 0x1118, 0x012e, 0x0804, 0x2fdf, 0x012e, 0x2021, 0x400c, + 0x0804, 0x2fe1, 0xa085, 0x0001, 0x1d04, 0x356b, 0x2091, 0x6000, + 0x8420, 0xa486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, + 0x2001, 0x0030, 0x2003, 0x0004, 0x2001, 0x0020, 0x2003, 0x0004, + 0x2001, 0xb924, 0x2003, 0x0000, 0x2001, 0xb94b, 0x2003, 0x0000, + 0x20e1, 0xf000, 0xa026, 0x0005, 0x00f6, 0x2079, 0x0100, 0x2001, + 0xb615, 0x200c, 0x7932, 0x7936, 0x080c, 0x287c, 0x7850, 0xa084, + 0x0980, 0xa085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319, 0x1df0, + 0xa084, 0x0980, 0x7852, 0x782c, 0xc0ad, 0x782e, 0x20a9, 0x0046, + 0x1d04, 0x35a0, 0x2091, 0x6000, 0x1f04, 0x35a0, 0x7850, 0xa085, + 0x0400, 0x7852, 0x2001, 0x0009, 0x2004, 0xa084, 0x0003, 0xa086, + 0x0001, 0x1118, 0x782c, 0xc0ac, 0x782e, 0x784b, 0xf7f7, 0x7843, + 0x0090, 0x7843, 0x0010, 0x20a9, 0x000e, 0xe000, 0x1f04, 0x35bd, + 0x7850, 0xa085, 0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, 0xe000, + 0xe000, 0xd08c, 0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850, + 0xa085, 0x0400, 0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, 0xe000, + 0xe000, 0x8319, 0x1de0, 0x2001, 0x0140, 0x2003, 0x0100, 0x7827, + 0x0020, 0x7843, 0x0000, 0x2003, 0x0000, 0x7827, 0x0048, 0x00fe, + 0x0005, 0x7824, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0xb924, + 0x2079, 0x0030, 0x2001, 0x0201, 0x2004, 0xa005, 0x0160, 0x7000, + 0xa086, 0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, + 0x0003, 0x7803, 0x0019, 0x00ee, 0x00fe, 0x0005, 0x780c, 0xa08c, + 0x0070, 0x0178, 0x2009, 0x007a, 0x260a, 0x2009, 0x007b, 0x250a, + 0xd0b4, 0x0108, 0x8a50, 0xd0ac, 0x0108, 0x8948, 0xd0a4, 0x0108, + 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0140, + 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, 0x0ca8, + 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001, 0xb8c1, 0x2004, + 0x70e2, 0x2009, 0xb615, 0x210c, 0x716e, 0x7063, 0x0100, 0x7166, + 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077, 0x0008, 0x7078, + 0xa080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, + 0xa006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, + 0x95d5, 0x7027, 0x0080, 0x7014, 0xa084, 0x0184, 0xa085, 0x0032, + 0x7016, 0x080c, 0x3707, 0x080c, 0x3562, 0x1110, 0x8421, 0x0028, + 0x7024, 0xd0bc, 0x0db0, 0x7027, 0x0080, 0x00f6, 0x00e6, 0x2071, + 0xb924, 0x2079, 0x0030, 0x00d6, 0x2069, 0x0000, 0x6824, 0xd0b4, + 0x0120, 0x683c, 0x783e, 0x6838, 0x783a, 0x00de, 0x2011, 0x0011, + 0x080c, 0x36df, 0x2011, 0x0001, 0x080c, 0x36df, 0x00ee, 0x00fe, + 0x7017, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0xb924, + 0x2079, 0x0030, 0x7904, 0xd1fc, 0x0904, 0x36dc, 0x7803, 0x0002, + 0xa026, 0xd19c, 0x1904, 0x36d8, 0x7000, 0x0002, 0x36dc, 0x369a, + 0x36be, 0x36d8, 0xd1bc, 0x1150, 0xd1dc, 0x1150, 0x8001, 0x7002, + 0x2011, 0x0001, 0x04e1, 0x05c0, 0x04d1, 0x04b0, 0x780f, 0x0000, + 0x7820, 0x7924, 0x7803, 0x0004, 0x7822, 0x7926, 0x2001, 0x0201, + 0x200c, 0x81ff, 0x0de8, 0x080c, 0x3606, 0x2009, 0x0001, 0x7808, + 0xd0ec, 0x0110, 0x2009, 0x0011, 0x7902, 0x00f0, 0x8001, 0x7002, + 0xa184, 0x0880, 0x1138, 0x7804, 0xd0fc, 0x1940, 0x2011, 0x0001, + 0x00b1, 0x0090, 0x6030, 0xa092, 0x0004, 0xa086, 0x0009, 0x1120, + 0x6000, 0x601a, 0x2011, 0x0025, 0x6232, 0xd1dc, 0x1988, 0x0870, + 0x7803, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x6024, + 0xa005, 0x0520, 0x8001, 0x6026, 0x6018, 0x6130, 0xa140, 0x2804, + 0x7832, 0x8840, 0x2804, 0x7836, 0x8840, 0x2804, 0x7822, 0x8840, + 0x2804, 0x7826, 0x8840, 0x7a02, 0x7000, 0x8000, 0x7002, 0x6018, + 0xa802, 0xa08a, 0x0029, 0x1138, 0x6018, 0xa080, 0x0001, 0x2004, + 0x601a, 0x2001, 0x000d, 0x6032, 0xa085, 0x0001, 0x0005, 0x00f6, + 0x00e6, 0x00c6, 0x2071, 0xb94b, 0x2079, 0x0020, 0x7904, 0xd1fc, + 0x01f0, 0x7803, 0x0002, 0x2d60, 0xa026, 0x7000, 0x0002, 0x372f, + 0x371a, 0x3726, 0x8001, 0x7002, 0xd19c, 0x1188, 0x2011, 0x0001, + 0x080c, 0x36df, 0x0160, 0x080c, 0x36df, 0x0048, 0x8001, 0x7002, + 0x7804, 0xd0fc, 0x1d30, 0x2011, 0x0001, 0x080c, 0x36df, 0x00ce, + 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, + 0x2001, 0xb8c1, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0xb8c0, + 0x2004, 0x60ce, 0x6004, 0xc0ac, 0xa085, 0x0200, 0x6006, 0x2001, + 0x0074, 0x2004, 0xa005, 0x01f8, 0x2038, 0x2001, 0x0076, 0x2024, + 0x2001, 0x0077, 0x201c, 0x080c, 0x3ebc, 0x6833, 0x000d, 0x6f26, + 0x2d00, 0x681a, 0xa78a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, + 0x0010, 0x2708, 0xa03e, 0x6818, 0xa080, 0x000d, 0x04b1, 0x1d90, + 0x2d00, 0x681a, 0x0088, 0x080c, 0x3ebc, 0x6833, 0x000d, 0x2070, + 0x6827, 0x0001, 0x2d00, 0x681a, 0x2001, 0x0076, 0x2004, 0x2072, + 0x2001, 0x0077, 0x2004, 0x7006, 0x2061, 0x0020, 0x2079, 0x0100, + 0x2001, 0xb8c0, 0x2004, 0x6012, 0x20e1, 0x9040, 0x2001, 0x0072, + 0x2004, 0xa084, 0xfff8, 0x700a, 0x601a, 0x0006, 0x2001, 0x0073, + 0x2004, 0x700e, 0x601e, 0x78c6, 0x000e, 0x78ca, 0xa006, 0x603a, + 0x603e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0010, + 0x20a0, 0x2099, 0x0014, 0x7003, 0x0026, 0x7432, 0x7336, 0xa006, + 0x703a, 0x703e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7122, 0x7003, + 0x0041, 0x7004, 0xd0fc, 0x0de8, 0x7003, 0x0002, 0x7003, 0x0040, + 0x53a5, 0x7430, 0x7334, 0x87ff, 0x0180, 0x00c6, 0x00d6, 0x2d60, + 0x00c6, 0x080c, 0x3ebc, 0x00ce, 0x6018, 0x2070, 0x2d00, 0x7006, + 0x601a, 0x00de, 0x00ce, 0xa085, 0x0001, 0x00ee, 0x0005, 0x00e6, + 0x2001, 0x0075, 0x2004, 0xa005, 0x0508, 0x2038, 0x2001, 0x0078, + 0x2024, 0x2001, 0x0079, 0x201c, 0x080c, 0x3ebc, 0x2d60, 0x6833, + 0x000d, 0x6f26, 0x2d00, 0x681a, 0xa78a, 0x0007, 0x0220, 0x2138, + 0x2009, 0x0007, 0x0010, 0x2708, 0xa03e, 0x6818, 0xa080, 0x000d, + 0x080c, 0x379d, 0x1d88, 0x2d00, 0x681a, 0x00e0, 0x080c, 0x3ebc, + 0x2d60, 0x6033, 0x000d, 0x2070, 0x6027, 0x0001, 0x2c00, 0x601a, + 0x2001, 0x0078, 0x2004, 0x2072, 0x2001, 0x0079, 0x2004, 0x7006, + 0x2001, 0x0072, 0x2004, 0xa084, 0xfff8, 0x700a, 0x2001, 0x0073, + 0x2004, 0x700e, 0x2001, 0x0030, 0x2003, 0x0004, 0x7824, 0xd0ac, + 0x1178, 0x2001, 0x0101, 0x200c, 0xc1ed, 0x2102, 0x6027, 0x0000, + 0x2001, 0xb924, 0x2003, 0x0003, 0x2001, 0x0030, 0x2003, 0x0009, + 0x00ee, 0x0005, 0x0804, 0x2fdf, 0x0126, 0x2091, 0x8000, 0x20a9, + 0x0012, 0x2001, 0xb640, 0x20a0, 0xa006, 0x40a4, 0x012e, 0x0804, + 0x2fdf, 0x7d38, 0x7c3c, 0x0804, 0x3086, 0x080c, 0x3ebc, 0x0904, + 0x3004, 0x080c, 0x5b41, 0x0110, 0x080c, 0x4c52, 0x2009, 0x001c, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3efd, 0x701b, 0x3851, + 0x0005, 0xade8, 0x000d, 0x6800, 0xa005, 0x0904, 0x3007, 0x6804, + 0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x3007, 0xd094, 0x00c6, 0x2061, + 0x0100, 0x6104, 0x0138, 0x6200, 0xa292, 0x0005, 0x0218, 0xa18c, + 0xffdf, 0x0010, 0xa18d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, + 0x2061, 0x0100, 0x6104, 0x0118, 0xa18d, 0x0010, 0x0010, 0xa18c, + 0xffef, 0x6106, 0x00ce, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0002, + 0x0268, 0xd084, 0x0158, 0x6a28, 0xa28a, 0x007f, 0x1a04, 0x3007, + 0xa288, 0x2df9, 0x210d, 0xa18c, 0x00ff, 0x615a, 0xd0dc, 0x0130, + 0x6828, 0xa08a, 0x007f, 0x1a04, 0x3007, 0x6052, 0x6808, 0xa08a, + 0x0100, 0x0a04, 0x3007, 0xa08a, 0x0841, 0x1a04, 0x3007, 0xa084, + 0x0007, 0x1904, 0x3007, 0x680c, 0xa005, 0x0904, 0x3007, 0x6810, + 0xa005, 0x0904, 0x3007, 0x6848, 0x6940, 0xa10a, 0x1a04, 0x3007, + 0x8001, 0x0904, 0x3007, 0x684c, 0x6944, 0xa10a, 0x1a04, 0x3007, + 0x8001, 0x0904, 0x3007, 0x6804, 0xd0fc, 0x0560, 0x080c, 0x3ebc, + 0x0904, 0x3004, 0x2009, 0x0014, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0xa290, 0x0038, 0xa399, 0x0000, 0x080c, 0x3efd, 0x701b, 0x38d1, + 0x0005, 0xade8, 0x000d, 0x20a9, 0x0014, 0x2d98, 0x2069, 0xb66e, + 0x2da0, 0x53a3, 0x7010, 0xa0e8, 0x000d, 0x2001, 0xb672, 0x200c, + 0xd1e4, 0x0140, 0x00c6, 0x2061, 0x0100, 0x6004, 0xa085, 0x0b00, + 0x6006, 0x00ce, 0x2009, 0xb8b1, 0x200b, 0x0000, 0x2001, 0xb674, + 0x2004, 0xd0ac, 0x0158, 0x7824, 0x200a, 0x2009, 0x017f, 0x200a, + 0x3200, 0xa084, 0x003f, 0xa085, 0x3020, 0x2090, 0x20a9, 0x001c, + 0x2d98, 0x2069, 0xb652, 0x2da0, 0x53a3, 0x6814, 0xa08c, 0x00ff, + 0x6142, 0x8007, 0xa084, 0x00ff, 0x6046, 0x080c, 0x5e17, 0x080c, + 0x53de, 0x080c, 0x5447, 0x6000, 0xa086, 0x0000, 0x1904, 0x39cc, + 0x6808, 0x602a, 0x080c, 0x24a5, 0x0006, 0x2001, 0x0100, 0x2004, + 0xa082, 0x0005, 0x000e, 0x0268, 0x2009, 0x0170, 0x200b, 0x0080, + 0xe000, 0xe000, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x28d7, + 0x003e, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, + 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, + 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, + 0x0010, 0xa084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, + 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0xb8c7, 0x40a1, + 0x080c, 0x6ada, 0x6904, 0xd1fc, 0x0520, 0x00c6, 0x2009, 0x0000, + 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, 0x0020, 0x839d, 0x12b0, + 0x3508, 0x8109, 0x080c, 0x63ce, 0x6878, 0x6016, 0x6874, 0x2008, + 0xa084, 0xff00, 0x8007, 0x600a, 0xa184, 0x00ff, 0x6006, 0x8108, + 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x3966, + 0x00ce, 0x2069, 0xb652, 0x2001, 0xb89e, 0x6a80, 0xa294, 0x0030, + 0xa28e, 0x0000, 0x0170, 0xa28e, 0x0010, 0x0118, 0xa28e, 0x0020, + 0x0140, 0x2003, 0xaaaa, 0x080c, 0x2920, 0x2001, 0xb88f, 0x2102, + 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, + 0x0000, 0x00ce, 0x080c, 0x5b41, 0x0128, 0x080c, 0x4116, 0x0110, + 0x080c, 0x289c, 0x60c8, 0xa005, 0x01d0, 0x6003, 0x0001, 0x2009, + 0x39b2, 0x00e0, 0x080c, 0x5b41, 0x1178, 0x2011, 0x5a14, 0x080c, + 0x6a0e, 0x2011, 0x5a07, 0x080c, 0x6ace, 0x2001, 0xb89f, 0x2003, + 0x0000, 0x080c, 0x5a79, 0x0040, 0x080c, 0x4b7b, 0x0028, 0x6003, + 0x0004, 0x2009, 0x39cc, 0x0010, 0x0804, 0x2fdf, 0x2001, 0x0100, + 0x2004, 0xa082, 0x0005, 0x0258, 0x2001, 0x0170, 0x2004, 0xa084, + 0x00ff, 0xa086, 0x004c, 0x1118, 0x2091, 0x309d, 0x0817, 0x2091, + 0x301d, 0x0817, 0x6000, 0xa086, 0x0000, 0x0904, 0x3004, 0x2069, + 0xb652, 0x7830, 0x6842, 0x7834, 0x6846, 0x6804, 0xd0fc, 0x0118, + 0x2009, 0x0030, 0x0010, 0x2009, 0x001c, 0x2d00, 0x7a2c, 0x7b28, + 0x7c3c, 0x7d38, 0x0804, 0x3f00, 0xa006, 0x080c, 0x289c, 0x81ff, + 0x1904, 0x3004, 0x080c, 0x5b41, 0x1178, 0x2001, 0xb89f, 0x2003, + 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, 0x0001, 0x080c, + 0x5b85, 0x080c, 0x5a79, 0x0080, 0x0016, 0x2009, 0xffff, 0x8109, + 0x0130, 0x2001, 0xb8e2, 0x2004, 0xa086, 0x0000, 0x1dc0, 0x001e, + 0x080c, 0x4c52, 0x080c, 0x4b7b, 0x0804, 0x2fdf, 0x81ff, 0x1904, + 0x3004, 0x080c, 0x5b41, 0x1110, 0x0804, 0x3004, 0x6188, 0x81ff, + 0x0198, 0x703f, 0x0000, 0x2001, 0xbdc0, 0x2009, 0x0040, 0x7a2c, + 0x7b28, 0x7c3c, 0x7d38, 0x0126, 0x2091, 0x8000, 0x080c, 0x3f00, + 0x701b, 0x2fdd, 0x012e, 0x0005, 0x703f, 0x0001, 0x00d6, 0x2069, + 0xbdc0, 0x20a9, 0x0040, 0x20a1, 0xbdc0, 0x2019, 0xffff, 0x43a4, + 0x6550, 0xa588, 0x2df9, 0x210d, 0xa18c, 0x00ff, 0x216a, 0xa00e, + 0x2011, 0x0002, 0x2100, 0xa506, 0x01a8, 0x080c, 0x501b, 0x1190, + 0x6014, 0x821c, 0x0238, 0xa398, 0xbdc0, 0xa085, 0xff00, 0x8007, + 0x201a, 0x0038, 0xa398, 0xbdc0, 0x2324, 0xa4a4, 0xff00, 0xa405, + 0x201a, 0x8210, 0x8108, 0xa182, 0x0080, 0x1208, 0x0c18, 0x8201, + 0x8007, 0x2d0c, 0xa105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, + 0xbdc0, 0x2099, 0xbdc0, 0x080c, 0x4bf1, 0x0804, 0x3a33, 0x080c, + 0x3ee1, 0x0904, 0x3007, 0x00c6, 0x080c, 0x3ebc, 0x00ce, 0x1120, + 0x2009, 0x0002, 0x0804, 0x3004, 0x2001, 0xb653, 0x2004, 0xd0b4, + 0x0550, 0x7824, 0xa084, 0xff00, 0xa08e, 0x7e00, 0x0520, 0xa08e, + 0x7f00, 0x0508, 0xa08e, 0x8000, 0x01f0, 0x6000, 0xd08c, 0x11d8, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x11a8, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x080c, 0x9e96, 0x1120, 0x2009, 0x0003, + 0x0804, 0x3004, 0x7007, 0x0003, 0x701b, 0x3abf, 0x0005, 0x080c, + 0x3ee1, 0x0904, 0x3007, 0x20a9, 0x002b, 0x2c98, 0xade8, 0x0002, + 0x2da0, 0x53a3, 0x20a9, 0x0004, 0xac80, 0x0006, 0x2098, 0xad80, + 0x0006, 0x20a0, 0x080c, 0x4bf1, 0x20a9, 0x0004, 0xac80, 0x000a, + 0x2098, 0xad80, 0x000a, 0x20a0, 0x080c, 0x4bf1, 0x2d00, 0x2009, + 0x002b, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3f00, 0x81ff, + 0x1904, 0x3004, 0x080c, 0x3ed1, 0x0904, 0x3007, 0x080c, 0x51f8, + 0x0804, 0x2fdf, 0x81ff, 0x1904, 0x3004, 0x7828, 0xa08a, 0x1000, + 0x1a04, 0x3007, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x080c, 0x525b, + 0x0904, 0x3004, 0x2019, 0x0004, 0xa00e, 0x080c, 0x520a, 0x7924, + 0x810f, 0x7a28, 0x0011, 0x0804, 0x2fdf, 0xa186, 0x00ff, 0x0110, + 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0xb600, 0x6450, 0x2400, + 0xa506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, + 0x501b, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0xa108, 0x080c, + 0x6a1a, 0x0005, 0x81ff, 0x1904, 0x3004, 0x080c, 0x3ed1, 0x0904, + 0x3007, 0x080c, 0x50e1, 0x0904, 0x3004, 0x080c, 0x5201, 0x0804, + 0x2fdf, 0x81ff, 0x1904, 0x3004, 0x080c, 0x3ed1, 0x0904, 0x3007, + 0x080c, 0x50e1, 0x0904, 0x3004, 0x080c, 0x51ef, 0x0804, 0x2fdf, + 0x6100, 0x0804, 0x2fdf, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x2001, + 0xb600, 0x2004, 0xa086, 0x0003, 0x1904, 0x3004, 0x00d6, 0xace8, + 0x000a, 0x7924, 0xd184, 0x0110, 0xace8, 0x0006, 0x680c, 0x8007, + 0x783e, 0x6808, 0x8007, 0x783a, 0x6b04, 0x831f, 0x6a00, 0x8217, + 0x00de, 0x6100, 0xa18c, 0x0200, 0x0804, 0x2fdf, 0x7824, 0xa09c, + 0x0003, 0xd0b4, 0x1160, 0xa39a, 0x0003, 0x1a04, 0x3004, 0x6250, + 0xa294, 0x00ff, 0xa084, 0xff00, 0x8007, 0xa206, 0x1150, 0x2001, + 0xb640, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, + 0x3f00, 0x81ff, 0x1904, 0x3004, 0x080c, 0x3ee1, 0x0904, 0x3007, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1904, 0x3004, 0x00c6, + 0x080c, 0x3ebc, 0x00ce, 0x0904, 0x3004, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x080c, 0x9e42, 0x0904, 0x3004, 0x7007, 0x0003, + 0x701b, 0x3bab, 0x0005, 0x6830, 0xa086, 0x0100, 0x0904, 0x3004, + 0xad80, 0x000e, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x0804, 0x3f00, 0xa006, 0x080c, 0x289c, 0x7824, 0xa084, 0x00ff, + 0xa086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x3004, 0x080c, 0x5b41, + 0x0110, 0x080c, 0x4c52, 0x7828, 0xa08a, 0x1000, 0x1a04, 0x3007, + 0x7924, 0xa18c, 0xff00, 0x810f, 0xa186, 0x00ff, 0x0138, 0xa182, + 0x007f, 0x1a04, 0x3007, 0x2100, 0x080c, 0x2866, 0x0026, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x2061, 0xb8f4, 0x601b, 0x0000, 0x601f, + 0x0000, 0x080c, 0x5b41, 0x1178, 0x2001, 0xb89f, 0x2003, 0x0001, + 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, 0x0001, 0x080c, 0x5b85, + 0x080c, 0x5a79, 0x0440, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, + 0x0002, 0x080c, 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, 0x0000, + 0x080c, 0x806b, 0x003e, 0x2061, 0x0100, 0x2001, 0xb615, 0x2004, + 0xa084, 0x00ff, 0x810f, 0xa105, 0x604a, 0x6043, 0x0090, 0x6043, + 0x0010, 0x2009, 0xb8bf, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, + 0x4bb4, 0x080c, 0x6a94, 0x7924, 0xa18c, 0xff00, 0x810f, 0x080c, + 0x5b41, 0x1110, 0x2009, 0x00ff, 0x7a28, 0x080c, 0x3b0d, 0x012e, + 0x00ce, 0x002e, 0x0804, 0x2fdf, 0x7924, 0xa18c, 0xff00, 0x810f, + 0x00c6, 0x080c, 0x4fbf, 0x2c08, 0x00ce, 0x1904, 0x3007, 0x0804, + 0x2fdf, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3004, 0x60d4, + 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x3004, + 0x080c, 0x3ebc, 0x1120, 0x2009, 0x0002, 0x0804, 0x3004, 0x7924, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3efd, 0x701b, 0x3c61, + 0x0005, 0x2009, 0x0080, 0x080c, 0x501b, 0x1130, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x0120, 0x2021, 0x400a, 0x0804, 0x2fe1, + 0x00d6, 0xade8, 0x000d, 0x6900, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, + 0x6e18, 0x6820, 0xa0be, 0x0100, 0x0904, 0x3cd8, 0xa0be, 0x0112, + 0x0904, 0x3cd8, 0xa0be, 0x0113, 0x0904, 0x3cd8, 0xa0be, 0x0114, + 0x0904, 0x3cd8, 0xa0be, 0x0117, 0x0904, 0x3cd8, 0xa0be, 0x011a, + 0x0904, 0x3cd8, 0xa0be, 0x011c, 0x0904, 0x3cd8, 0xa0be, 0x0121, + 0x05b0, 0xa0be, 0x0131, 0x0598, 0xa0be, 0x0171, 0x05c8, 0xa0be, + 0x0173, 0x05b0, 0xa0be, 0x01a1, 0x1120, 0x6830, 0x8007, 0x6832, + 0x04a8, 0xa0be, 0x0212, 0x0540, 0xa0be, 0x0213, 0x0528, 0xa0be, + 0x0214, 0x01b0, 0xa0be, 0x0217, 0x0168, 0xa0be, 0x021a, 0x1120, + 0x6838, 0x8007, 0x683a, 0x00e0, 0xa0be, 0x0300, 0x01c8, 0x00de, + 0x0804, 0x3007, 0xad80, 0x0010, 0x20a9, 0x0007, 0x080c, 0x3d1e, + 0xad80, 0x000e, 0x20a9, 0x0001, 0x080c, 0x3d1e, 0x0048, 0xad80, + 0x000c, 0x080c, 0x3d2c, 0x0050, 0xad80, 0x000e, 0x080c, 0x3d2c, + 0xad80, 0x000c, 0x20a9, 0x0001, 0x080c, 0x3d1e, 0x00c6, 0x080c, + 0x3ebc, 0x0568, 0x6838, 0xc0fd, 0x683a, 0x6837, 0x0119, 0x6853, + 0x0000, 0x684f, 0x0020, 0x685b, 0x0001, 0x810b, 0x697e, 0x6883, + 0x0000, 0x6a86, 0x6b8a, 0x6c8e, 0x6d92, 0x6996, 0x689b, 0x0000, + 0x00ce, 0x00de, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x6823, + 0x0000, 0x6804, 0x2068, 0x080c, 0x9e5e, 0x1120, 0x2009, 0x0003, + 0x0804, 0x3004, 0x7007, 0x0003, 0x701b, 0x3d15, 0x0005, 0x00ce, + 0x00de, 0x2009, 0x0002, 0x0804, 0x3004, 0x6820, 0xa086, 0x8001, + 0x1904, 0x2fdf, 0x2009, 0x0004, 0x0804, 0x3004, 0x0016, 0x2008, + 0x2044, 0x8000, 0x204c, 0x8000, 0x290a, 0x8108, 0x280a, 0x8108, + 0x1f04, 0x3d20, 0x001e, 0x0005, 0x0016, 0x00a6, 0x00b6, 0x2008, + 0x2044, 0x8000, 0x204c, 0x8000, 0x2054, 0x8000, 0x205c, 0x2b0a, + 0x8108, 0x2a0a, 0x8108, 0x290a, 0x8108, 0x280a, 0x00be, 0x00ae, + 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3004, + 0x60d4, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, + 0x3004, 0x7924, 0x2140, 0xa18c, 0xff00, 0x810f, 0x60d4, 0xd0ac, + 0x1120, 0xa182, 0x0080, 0x0a04, 0x3007, 0xa182, 0x00ff, 0x1a04, + 0x3007, 0x7a2c, 0x7b28, 0x6070, 0xa306, 0x1140, 0x6074, 0xa24e, + 0x0904, 0x3007, 0xa9cc, 0xff00, 0x0904, 0x3007, 0x0126, 0x2091, + 0x8000, 0x00c6, 0x080c, 0x3e0c, 0x2c68, 0x00ce, 0x0538, 0xa0c6, + 0x4000, 0x1178, 0x00c6, 0x0006, 0x2d60, 0xa00e, 0x080c, 0x52bc, + 0x1108, 0xc185, 0x6000, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, + 0x0088, 0xa0c6, 0x4007, 0x1110, 0x2408, 0x0060, 0xa0c6, 0x4008, + 0x1118, 0x2708, 0x2610, 0x0030, 0xa0c6, 0x4009, 0x1108, 0x0010, + 0x2001, 0x4006, 0x2020, 0x012e, 0x0804, 0x2fe1, 0x2d00, 0x7022, + 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x864e, 0x05c0, + 0x2d00, 0x601a, 0x080c, 0xa0e3, 0x2e58, 0x00ee, 0x00e6, 0x00c6, + 0x080c, 0x3ebc, 0x00ce, 0x2b70, 0x1158, 0x080c, 0x86a4, 0x00ee, + 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, 0x0804, 0x3004, + 0x6837, 0x0000, 0x683b, 0x0000, 0x2d00, 0x6012, 0x6833, 0x0000, + 0x6838, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0x683a, 0x080c, 0x2cd1, + 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, 0x4f5d, 0x2001, 0x0002, + 0x080c, 0x4f6f, 0x2009, 0x0002, 0x080c, 0x86d3, 0xa085, 0x0001, + 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, + 0x0804, 0x3004, 0x7007, 0x0003, 0x701b, 0x3def, 0x0005, 0x6830, + 0xa086, 0x0100, 0x7020, 0x2060, 0x1138, 0x2009, 0x0004, 0x6204, + 0xa294, 0x00ff, 0x0804, 0x3004, 0x2009, 0x0000, 0x6838, 0xd0f4, + 0x1904, 0x2fdf, 0x080c, 0x52bc, 0x1108, 0xc185, 0x6000, 0xd0bc, + 0x0108, 0xc18d, 0x0804, 0x2fdf, 0x00e6, 0x00d6, 0xa02e, 0x2001, + 0xb635, 0x2004, 0xd0ac, 0x0130, 0xa026, 0x20a9, 0x00ff, 0x2071, + 0xb735, 0x0030, 0x2021, 0x0080, 0x20a9, 0x007f, 0x2071, 0xb7b5, + 0x2e04, 0xa005, 0x1130, 0x2100, 0xa406, 0x1570, 0x2428, 0xc5fd, + 0x0458, 0x2068, 0x6f10, 0x2700, 0xa306, 0x11b0, 0x6e14, 0x2600, + 0xa206, 0x1190, 0x2400, 0xa106, 0x1160, 0x2d60, 0xd884, 0x0568, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1538, 0x2001, 0x4000, + 0x0428, 0x2001, 0x4007, 0x0410, 0x2400, 0xa106, 0x1168, 0x6e14, + 0x87ff, 0x1138, 0x86ff, 0x09d0, 0x2001, 0xb635, 0x2004, 0xd0ac, + 0x19a8, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x3e20, + 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, + 0x080c, 0x4fbf, 0x1dd0, 0x6312, 0x6216, 0xa006, 0xa005, 0x00de, + 0x00ee, 0x0005, 0x81ff, 0x1904, 0x3004, 0x080c, 0x3ebc, 0x0904, + 0x3004, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x7824, 0xa005, + 0x0904, 0x3007, 0xa096, 0x00ff, 0x0120, 0xa092, 0x0004, 0x1a04, + 0x3007, 0x2010, 0x2d18, 0x080c, 0x2c84, 0x0904, 0x3004, 0x7007, + 0x0003, 0x701b, 0x3e8c, 0x0005, 0x6830, 0xa086, 0x0100, 0x0904, + 0x3004, 0x0804, 0x2fdf, 0x7924, 0xa18c, 0xff00, 0x810f, 0x60d4, + 0xd0ac, 0x1120, 0xa182, 0x0080, 0x0a04, 0x3007, 0xa182, 0x00ff, + 0x1a04, 0x3007, 0x0126, 0x2091, 0x8000, 0x080c, 0x9d46, 0x1188, + 0xa190, 0xb735, 0x2204, 0xa065, 0x0160, 0x080c, 0x4c7e, 0x2001, + 0xb635, 0x2004, 0xd0ac, 0x0110, 0x6017, 0x0000, 0x012e, 0x0804, + 0x2fdf, 0x012e, 0x0804, 0x3004, 0x080c, 0x15fd, 0x0188, 0xa006, + 0x6802, 0x7010, 0xa005, 0x1120, 0x2d00, 0x7012, 0x7016, 0x0030, + 0x7014, 0x6802, 0x2060, 0x2d00, 0x6006, 0x7016, 0xad80, 0x000d, + 0x0005, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x080c, 0x501b, 0x1130, + 0x7e28, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0208, 0xa066, 0x8cff, + 0x0005, 0x7e24, 0x860f, 0xa18c, 0x00ff, 0x080c, 0x501b, 0x1128, + 0xa6b4, 0x00ff, 0xa682, 0x4000, 0x0208, 0xa066, 0x8cff, 0x0005, + 0x0016, 0x7110, 0x81ff, 0x0128, 0x2168, 0x6904, 0x080c, 0x1614, + 0x0cc8, 0x7112, 0x7116, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, + 0x2031, 0x0000, 0x2061, 0xb6d2, 0x6606, 0x6112, 0x600e, 0x6226, + 0x632a, 0x642e, 0x6532, 0x2c10, 0x080c, 0x1648, 0x7007, 0x0002, + 0x701b, 0x2fdf, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, + 0x0000, 0x2001, 0xb690, 0x2004, 0xa005, 0x1168, 0x0e04, 0x3f2b, + 0x7818, 0xd084, 0x1140, 0x7a22, 0x7b26, 0x7c2a, 0x781b, 0x0001, + 0x2091, 0x4080, 0x0408, 0x0016, 0x00c6, 0x00e6, 0x2071, 0xb682, + 0x7138, 0xa182, 0x0010, 0x0218, 0x7030, 0x2060, 0x0078, 0x7030, + 0xa0e0, 0x0004, 0xac82, 0xb6d2, 0x0210, 0x2061, 0xb692, 0x2c00, + 0x7032, 0x81ff, 0x1108, 0x7036, 0x8108, 0x713a, 0x2262, 0x6306, + 0x640a, 0x00ee, 0x00ce, 0x001e, 0x012e, 0x00fe, 0x0005, 0x00e6, + 0x2071, 0xb682, 0x7038, 0xa005, 0x0570, 0x0126, 0x2091, 0x8000, + 0x0e04, 0x3f82, 0x00f6, 0x2079, 0x0000, 0x7818, 0xd084, 0x1508, + 0x00c6, 0x7034, 0x2060, 0x2c04, 0x7822, 0x6004, 0x7826, 0x6008, + 0x782a, 0x781b, 0x0001, 0x2091, 0x4080, 0x7038, 0x8001, 0x703a, + 0xa005, 0x1130, 0x7033, 0xb692, 0x7037, 0xb692, 0x00ce, 0x0048, + 0xac80, 0x0004, 0xa0fa, 0xb6d2, 0x0210, 0x2001, 0xb692, 0x7036, + 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x0026, 0x2001, 0xb653, + 0x2004, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x3f13, 0x002e, + 0x0005, 0x81ff, 0x1904, 0x3004, 0x0126, 0x2091, 0x8000, 0x6030, + 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x5b41, 0x1178, 0x2001, + 0xb89f, 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, + 0x0001, 0x080c, 0x5b85, 0x080c, 0x5a79, 0x0010, 0x080c, 0x4b7b, + 0x012e, 0x0804, 0x2fdf, 0x7824, 0x2008, 0xa18c, 0xfffd, 0x1128, + 0x61e0, 0xa10d, 0x61e2, 0x0804, 0x2fdf, 0x0804, 0x3007, 0x81ff, + 0x1904, 0x3004, 0x6000, 0xa086, 0x0003, 0x1904, 0x3004, 0x2001, + 0xb653, 0x2004, 0xd0ac, 0x1904, 0x3004, 0x080c, 0x3ee1, 0x0904, + 0x3007, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1120, 0x7828, + 0xa005, 0x0904, 0x2fdf, 0x00c6, 0x080c, 0x3ebc, 0x00ce, 0x0904, + 0x3004, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x080c, 0x9f27, 0x0904, 0x3004, 0x7007, 0x0003, 0x701b, 0x3ff1, + 0x0005, 0x6830, 0xa086, 0x0100, 0x0904, 0x3004, 0x0804, 0x2fdf, + 0x2001, 0xb600, 0x2004, 0xa086, 0x0003, 0x1904, 0x3004, 0x7f24, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3ebc, 0x0904, 0x3004, + 0x2009, 0x0000, 0x2031, 0x0000, 0x7023, 0x0000, 0x702f, 0x0000, + 0xad80, 0x0005, 0x7026, 0x20a0, 0x080c, 0x501b, 0x1904, 0x406b, + 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0130, 0xa0c4, 0xff00, + 0xa8c6, 0x0600, 0x1904, 0x406b, 0x2001, 0xb653, 0x2004, 0xd0ac, + 0x1128, 0x080c, 0x52bc, 0x1110, 0xd79c, 0x05e8, 0xd794, 0x1110, + 0xd784, 0x0158, 0xac80, 0x0006, 0x2098, 0x3400, 0x20a9, 0x0004, + 0x53a3, 0x080c, 0x3d2c, 0xd794, 0x0148, 0xac80, 0x000a, 0x2098, + 0x3400, 0x20a9, 0x0004, 0x53a3, 0x080c, 0x3d2c, 0x21a2, 0xd794, + 0x01d8, 0xac80, 0x0000, 0x2098, 0x94a0, 0x20a9, 0x0002, 0x53a3, + 0xac80, 0x0003, 0x20a6, 0x94a0, 0xac80, 0x0004, 0x2098, 0x3400, + 0x20a9, 0x0002, 0x53a3, 0x080c, 0x3d1e, 0xac80, 0x0026, 0x2098, + 0x20a9, 0x0002, 0x53a3, 0x0008, 0x94a0, 0xd794, 0x0110, 0xa6b0, + 0x000b, 0xa6b0, 0x0005, 0x8108, 0x2001, 0xb635, 0x2004, 0xd0ac, + 0x0118, 0xa186, 0x0100, 0x0040, 0xd78c, 0x0120, 0xa186, 0x0100, + 0x0170, 0x0018, 0xa186, 0x007e, 0x0150, 0xd794, 0x0118, 0xa686, + 0x0020, 0x0010, 0xa686, 0x0028, 0x0150, 0x0804, 0x4014, 0x86ff, + 0x1120, 0x7120, 0x810b, 0x0804, 0x2fdf, 0x702f, 0x0001, 0x711e, + 0x7020, 0xa600, 0x7022, 0x772a, 0x2061, 0xb6d2, 0x6007, 0x0000, + 0x6612, 0x7024, 0x600e, 0x6226, 0x632a, 0x642e, 0x6532, 0x2c10, + 0x080c, 0x1648, 0x7007, 0x0002, 0x701b, 0x40a7, 0x0005, 0x702c, + 0xa005, 0x1170, 0x711c, 0x7024, 0x20a0, 0x7728, 0x2031, 0x0000, + 0x2061, 0xb6d2, 0x6224, 0x6328, 0x642c, 0x6530, 0x0804, 0x4014, + 0x7120, 0x810b, 0x0804, 0x2fdf, 0x2029, 0x007e, 0x7924, 0x7a28, + 0x7b2c, 0x7c38, 0xa184, 0xff00, 0x8007, 0xa0e2, 0x0020, 0x0a04, + 0x3007, 0xa502, 0x0a04, 0x3007, 0xa184, 0x00ff, 0xa0e2, 0x0020, + 0x0a04, 0x3007, 0xa502, 0x0a04, 0x3007, 0xa284, 0xff00, 0x8007, + 0xa0e2, 0x0020, 0x0a04, 0x3007, 0xa502, 0x0a04, 0x3007, 0xa284, + 0x00ff, 0xa0e2, 0x0020, 0x0a04, 0x3007, 0xa502, 0x0a04, 0x3007, + 0xa384, 0xff00, 0x8007, 0xa0e2, 0x0020, 0x0a04, 0x3007, 0xa502, + 0x0a04, 0x3007, 0xa384, 0x00ff, 0xa0e2, 0x0020, 0x0a04, 0x3007, + 0xa502, 0x0a04, 0x3007, 0xa484, 0xff00, 0x8007, 0xa0e2, 0x0020, + 0x0a04, 0x3007, 0xa502, 0x0a04, 0x3007, 0xa484, 0x00ff, 0xa0e2, + 0x0020, 0x0a04, 0x3007, 0xa502, 0x0a04, 0x3007, 0x2061, 0xb8b9, + 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x2fdf, 0x0006, 0x2001, + 0xb653, 0x2004, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x2001, 0xb672, + 0x2004, 0xd0bc, 0x000e, 0x0005, 0x6168, 0x7a24, 0x6300, 0x82ff, + 0x1118, 0x7926, 0x0804, 0x2fdf, 0x83ff, 0x1904, 0x3007, 0x2001, + 0xfff0, 0xa200, 0x1a04, 0x3007, 0x2019, 0xffff, 0x606c, 0xa302, + 0xa200, 0x0a04, 0x3007, 0x7926, 0x626a, 0x0804, 0x2fdf, 0x2001, + 0xb600, 0x2004, 0xa086, 0x0003, 0x1904, 0x3004, 0x7c28, 0x7d24, + 0x7e38, 0x7f2c, 0x080c, 0x3ebc, 0x0904, 0x3004, 0x2009, 0x0000, + 0x2019, 0x0000, 0x7023, 0x0000, 0x702f, 0x0000, 0xad80, 0x0003, + 0x7026, 0x20a0, 0xa1e0, 0xb735, 0x2c64, 0x8cff, 0x01b8, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x0130, 0x6004, 0xa084, 0xff00, + 0xa086, 0x0600, 0x1158, 0x6014, 0x20a2, 0x94a0, 0x6010, 0x8007, + 0xa105, 0x8007, 0x20a2, 0x94a0, 0xa398, 0x0002, 0x8108, 0xa182, + 0x00ff, 0x0120, 0xa386, 0x002a, 0x0148, 0x08e0, 0x83ff, 0x1120, + 0x7120, 0x810c, 0x0804, 0x2fdf, 0x702f, 0x0001, 0x711e, 0x7020, + 0xa300, 0x7022, 0x2061, 0xb6d2, 0x6007, 0x0000, 0x6312, 0x7024, + 0x600e, 0x6426, 0x652a, 0x662e, 0x6732, 0x2c10, 0x080c, 0x1648, + 0x7007, 0x0002, 0x701b, 0x419d, 0x0005, 0x702c, 0xa005, 0x1168, + 0x711c, 0x7024, 0x20a0, 0x2019, 0x0000, 0x2061, 0xb6d2, 0x6424, + 0x6528, 0x662c, 0x6730, 0x0804, 0x415a, 0x7120, 0x810c, 0x0804, + 0x2fdf, 0x81ff, 0x1904, 0x3004, 0x60d4, 0xd0ac, 0x1118, 0xd09c, + 0x0904, 0x3004, 0x080c, 0x3ebc, 0x0904, 0x3004, 0x7924, 0x7a2c, + 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3efd, 0x701b, 0x41c8, 0x0005, + 0x00d6, 0xade8, 0x000d, 0x6828, 0xa0be, 0x7000, 0x0148, 0xa0be, + 0x7100, 0x0130, 0xa0be, 0x7200, 0x0118, 0x00de, 0x0804, 0x3007, + 0x6820, 0x6924, 0x080c, 0x2852, 0x1510, 0x080c, 0x4fbf, 0x11f8, + 0x7122, 0x6612, 0x6516, 0x6e18, 0x00c6, 0x080c, 0x3ebc, 0x01b8, + 0x080c, 0x3ebc, 0x01a0, 0x00ce, 0x00de, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x6823, 0x0000, 0x6804, 0x2068, 0x080c, 0x9e7a, + 0x0904, 0x3004, 0x7007, 0x0003, 0x701b, 0x4202, 0x0005, 0x00de, + 0x0804, 0x3004, 0x7120, 0x080c, 0x2dcc, 0x6820, 0xa086, 0x8001, + 0x0904, 0x3004, 0x2d00, 0x701e, 0x6804, 0xa080, 0x0002, 0x0006, + 0x20a9, 0x002a, 0x2098, 0x20a0, 0x080c, 0x4bf1, 0x000e, 0xade8, + 0x000d, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x2061, 0xb6d2, 0x6007, + 0x0000, 0x6e00, 0x6f28, 0xa7c6, 0x7000, 0x1108, 0x0018, 0xa7c6, + 0x7100, 0x1140, 0xa6c2, 0x0004, 0x0a04, 0x3007, 0x2009, 0x0004, + 0x0804, 0x3f00, 0xa7c6, 0x7200, 0x1904, 0x3007, 0xa6c2, 0x0054, + 0x0a04, 0x3007, 0x600e, 0x6013, 0x002a, 0x6226, 0x632a, 0x642e, + 0x6532, 0x2c10, 0x080c, 0x1648, 0x7007, 0x0002, 0x701b, 0x4249, + 0x0005, 0x701c, 0x2068, 0x6804, 0xa080, 0x0001, 0x2004, 0xa080, + 0x0002, 0x0006, 0x20a9, 0x002a, 0x2098, 0x20a0, 0x080c, 0x4bf1, + 0x000e, 0x2009, 0x002a, 0x2061, 0xb6d2, 0x6224, 0x6328, 0x642c, + 0x6530, 0x0804, 0x3f00, 0x81ff, 0x1904, 0x3004, 0x792c, 0x2001, + 0xb8a0, 0x2102, 0x080c, 0x3ed1, 0x0904, 0x3007, 0x080c, 0x50e1, + 0x0904, 0x3004, 0x0126, 0x2091, 0x8000, 0x080c, 0x5213, 0x012e, + 0x0804, 0x2fdf, 0x7824, 0xd08c, 0x1118, 0xd084, 0x0904, 0x3a87, + 0x080c, 0x3ee1, 0x0904, 0x3007, 0x00c6, 0x080c, 0x3ebc, 0x00ce, + 0x1120, 0x2009, 0x0002, 0x0804, 0x3004, 0x6004, 0xa084, 0x00ff, + 0xa086, 0x0006, 0x0128, 0xa08e, 0x0004, 0x0110, 0xa08e, 0x0005, + 0x15b8, 0x7824, 0xd08c, 0x0120, 0x6000, 0xc08c, 0x6002, 0x0030, + 0x2001, 0xb653, 0x2004, 0xd0b4, 0x0904, 0x3ac3, 0x7824, 0xa084, + 0xff00, 0xa08e, 0x7e00, 0x0904, 0x3ac3, 0xa08e, 0x7f00, 0x0904, + 0x3ac3, 0xa08e, 0x8000, 0x0904, 0x3ac3, 0x6000, 0xd08c, 0x1904, + 0x3ac3, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x080c, 0x9e96, + 0x1120, 0x2009, 0x0003, 0x0804, 0x3004, 0x7007, 0x0003, 0x701b, + 0x42ca, 0x0005, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x0804, 0x3ac3, + 0x2009, 0xb631, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, + 0x3004, 0x2001, 0xb600, 0x2004, 0xa086, 0x0003, 0x0120, 0x2009, + 0x0007, 0x0804, 0x3004, 0x2001, 0xb653, 0x2004, 0xd0ac, 0x0120, + 0x2009, 0x0008, 0x0804, 0x3004, 0x609c, 0xd0a4, 0x1118, 0xd0ac, + 0x1904, 0x3ac3, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, + 0x683a, 0x080c, 0x9f27, 0x1120, 0x2009, 0x0003, 0x0804, 0x3004, + 0x7007, 0x0003, 0x701b, 0x4305, 0x0005, 0x6830, 0xa086, 0x0100, + 0x1120, 0x2009, 0x0004, 0x0804, 0x3004, 0x080c, 0x3ee1, 0x0904, + 0x3007, 0x0804, 0x4299, 0x81ff, 0x2009, 0x0001, 0x1904, 0x3004, + 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, 0x1904, 0x3004, 0x2001, + 0xb653, 0x2004, 0xd0ac, 0x2009, 0x0008, 0x1904, 0x3004, 0x080c, + 0x3ee1, 0x0904, 0x3007, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x2009, 0x0009, 0x1904, 0x3004, 0x00c6, 0x080c, 0x3ebc, 0x00ce, + 0x2009, 0x0002, 0x0904, 0x3004, 0x6837, 0x0000, 0x6833, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x7928, 0xa194, 0xff00, 0xa18c, 0x00ff, + 0xa006, 0x82ff, 0x1128, 0xc0ed, 0x6952, 0x792c, 0x6956, 0x0048, + 0xa28e, 0x0100, 0x1904, 0x3007, 0xc0e5, 0x6853, 0x0000, 0x6857, + 0x0000, 0x683e, 0x080c, 0xa0e4, 0x2009, 0x0003, 0x0904, 0x3004, + 0x7007, 0x0003, 0x701b, 0x4365, 0x0005, 0x6830, 0xa086, 0x0100, + 0x2009, 0x0004, 0x0904, 0x3004, 0x0804, 0x2fdf, 0x81ff, 0x2009, + 0x0001, 0x1904, 0x3004, 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, + 0x1904, 0x3004, 0x080c, 0x3ee1, 0x0904, 0x3007, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x2009, 0x0009, 0x1904, 0x3004, 0x00c6, + 0x080c, 0x3ebc, 0x00ce, 0x2009, 0x0002, 0x0904, 0x3004, 0xad80, + 0x000f, 0x2009, 0x0008, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, + 0x3efd, 0x701b, 0x439c, 0x0005, 0x00d6, 0xade8, 0x000f, 0x6800, + 0xa086, 0x0500, 0x1140, 0x6804, 0xa005, 0x1128, 0x6808, 0xa084, + 0xff00, 0x1108, 0x0018, 0x00de, 0x1904, 0x3007, 0x00de, 0x6837, + 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x00c6, 0x080c, + 0x3ee1, 0x1118, 0x00ce, 0x0804, 0x3007, 0x080c, 0xa133, 0x2009, + 0x0003, 0x00ce, 0x0904, 0x3004, 0x7007, 0x0003, 0x701b, 0x43c9, + 0x0005, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, 0x0904, 0x3004, + 0x0804, 0x2fdf, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x3004, + 0x6000, 0xa086, 0x0003, 0x0120, 0x2009, 0x0007, 0x0804, 0x3004, + 0x7e24, 0x860f, 0xa18c, 0x00ff, 0xa6b4, 0x00ff, 0x080c, 0x501b, + 0x1904, 0x3007, 0xa186, 0x007f, 0x0150, 0x6004, 0xa084, 0x00ff, + 0xa086, 0x0006, 0x0120, 0x2009, 0x0009, 0x0804, 0x3004, 0x00c6, + 0x080c, 0x3ebc, 0x00ce, 0x1120, 0x2009, 0x0002, 0x0804, 0x3004, + 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x2001, 0x0100, 0x8007, + 0x680a, 0x080c, 0x9eb1, 0x1120, 0x2009, 0x0003, 0x0804, 0x3004, + 0x7007, 0x0003, 0x701b, 0x4415, 0x0005, 0x6808, 0x8007, 0xa086, + 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x3004, 0x68b0, 0x6836, + 0x6810, 0x8007, 0xa084, 0x00ff, 0x800c, 0x6814, 0x8007, 0xa084, + 0x00ff, 0x8004, 0xa080, 0x0002, 0xa108, 0xad80, 0x0004, 0x7a2c, + 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3f00, 0x080c, 0x3ebc, 0x1120, + 0x2009, 0x0002, 0x0804, 0x3004, 0x7924, 0xa194, 0xff00, 0xa18c, + 0x00ff, 0x8217, 0x82ff, 0x0110, 0x0804, 0x3007, 0x2009, 0x001a, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3efd, 0x701b, 0x4451, + 0x0005, 0x2001, 0xb62a, 0x2003, 0x0001, 0xad80, 0x000d, 0x2098, + 0x20a9, 0x001a, 0x20a1, 0xb8c7, 0x53a3, 0x0804, 0x2fdf, 0x080c, + 0x3ebc, 0x1120, 0x2009, 0x0002, 0x0804, 0x3004, 0x7924, 0xa194, + 0xff00, 0xa18c, 0x00ff, 0x8217, 0x82ff, 0x0110, 0x0804, 0x3007, + 0x2099, 0xb8c7, 0x20a0, 0x20a9, 0x001a, 0x53a3, 0x2009, 0x001a, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3f00, 0x7824, 0xa08a, + 0x1000, 0x1a04, 0x3007, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, + 0x810b, 0xa108, 0x00c6, 0x2061, 0xb8f4, 0x6142, 0x00ce, 0x012e, + 0x0804, 0x2fdf, 0x00c6, 0x080c, 0x5b41, 0x1188, 0x2001, 0xb89f, + 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, 0x0001, + 0x080c, 0x5b85, 0x080c, 0x5a79, 0x080c, 0x151a, 0x0038, 0x2061, + 0xb600, 0x6030, 0xc09d, 0x6032, 0x080c, 0x4b7b, 0x00ce, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0xb8f4, 0x7924, 0x6152, + 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7838, 0x606a, 0x783c, + 0x6066, 0x7828, 0x6062, 0x782c, 0x605e, 0x2061, 0xb8a1, 0x2001, + 0xb909, 0x600e, 0x6013, 0x0001, 0x6017, 0x0002, 0x6007, 0x0000, + 0x6037, 0x0000, 0x00ce, 0x012e, 0x0804, 0x2fdf, 0x0126, 0x00c6, + 0x00e6, 0x2061, 0x0100, 0x2071, 0xb600, 0x6044, 0xd0a4, 0x11b0, + 0xd084, 0x0118, 0x080c, 0x464d, 0x0068, 0xd08c, 0x0118, 0x080c, + 0x456e, 0x0040, 0xd094, 0x0118, 0x080c, 0x453f, 0x0018, 0xd09c, + 0x0108, 0x0061, 0x00ee, 0x00ce, 0x012e, 0x0005, 0x0016, 0x6128, + 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0ca0, 0x624c, 0xa286, + 0xf0f0, 0x1150, 0x6048, 0xa086, 0xf0f0, 0x0130, 0x624a, 0x6043, + 0x0090, 0x6043, 0x0010, 0x0490, 0xa294, 0xff00, 0xa296, 0xf700, + 0x0178, 0x7134, 0xd1a4, 0x1160, 0x6240, 0xa295, 0x0100, 0x6242, + 0xa294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x4c11, 0x00f0, + 0x6040, 0xa084, 0x0010, 0xa085, 0x0140, 0x6042, 0x6043, 0x0000, + 0x707b, 0x0000, 0x7097, 0x0001, 0x70bb, 0x0000, 0x70d7, 0x0000, + 0x2009, 0xbdc0, 0x200b, 0x0000, 0x708b, 0x0000, 0x707f, 0x000a, + 0x2009, 0x000a, 0x2011, 0x4b1c, 0x080c, 0x6a94, 0x0005, 0x0156, + 0x2001, 0xb674, 0x2004, 0xd08c, 0x0110, 0x7053, 0xffff, 0x707c, + 0xa005, 0x1510, 0x2011, 0x4b1c, 0x080c, 0x6a0e, 0x6040, 0xa094, + 0x0010, 0xa285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, + 0x1168, 0x1f04, 0x4556, 0x6242, 0x708f, 0x0000, 0x6040, 0xa094, + 0x0010, 0xa285, 0x0080, 0x6042, 0x6242, 0x0030, 0x6242, 0x708f, + 0x0000, 0x7083, 0x0000, 0x0000, 0x015e, 0x0005, 0x7080, 0xa08a, + 0x0003, 0x1210, 0x0023, 0x0010, 0x080c, 0x151a, 0x0005, 0x457a, + 0x45ca, 0x464c, 0x00f6, 0x7083, 0x0001, 0x20e1, 0xa000, 0xe000, + 0x20e1, 0x8700, 0x080c, 0x24a5, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2079, 0xbc00, 0x207b, 0x2200, 0x7807, 0x00ef, 0x780b, 0x0000, + 0x780f, 0x00ef, 0x7813, 0x0138, 0x7817, 0x0000, 0x781b, 0x0000, + 0x781f, 0x0000, 0x7823, 0xffff, 0x7827, 0xffff, 0x782b, 0x0000, + 0x782f, 0x0000, 0x2079, 0xbc0c, 0x207b, 0x1101, 0x7807, 0x0000, + 0x2099, 0xb605, 0x20a1, 0xbc0e, 0x20a9, 0x0004, 0x53a3, 0x2079, + 0xbc12, 0x207b, 0x0000, 0x7807, 0x0000, 0x2099, 0xbc00, 0x20a1, + 0x020b, 0x20a9, 0x0014, 0x53a6, 0x60c3, 0x000c, 0x600f, 0x0000, + 0x080c, 0x4b55, 0x00fe, 0x7087, 0x0000, 0x6043, 0x0008, 0x6043, + 0x0000, 0x0005, 0x00d6, 0x7084, 0x7087, 0x0000, 0xa025, 0x0904, + 0x4634, 0x6020, 0xd0b4, 0x1904, 0x4632, 0x7194, 0x81ff, 0x0904, + 0x4622, 0xa486, 0x000c, 0x1904, 0x462d, 0xa480, 0x0018, 0x8004, + 0x20a8, 0x2011, 0xbc80, 0x2019, 0xbc00, 0x220c, 0x2304, 0xa106, + 0x11b8, 0x8210, 0x8318, 0x1f04, 0x45e5, 0x6043, 0x0004, 0x608b, + 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0006, 0x7083, 0x0002, 0x708f, + 0x0002, 0x2009, 0x07d0, 0x2011, 0x4b23, 0x080c, 0x6a94, 0x0490, + 0x2069, 0xbc80, 0x6930, 0xa18e, 0x1101, 0x1538, 0x6834, 0xa005, + 0x1520, 0x6900, 0xa18c, 0x00ff, 0x1118, 0x6804, 0xa005, 0x0190, + 0x2011, 0xbc8e, 0x2019, 0xb605, 0x20a9, 0x0004, 0x220c, 0x2304, + 0xa102, 0x0230, 0x1190, 0x8210, 0x8318, 0x1f04, 0x4616, 0x0068, + 0x7097, 0x0000, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xbc80, + 0x20a1, 0x020b, 0x20a9, 0x0014, 0x53a6, 0x6043, 0x0008, 0x6043, + 0x0000, 0x0010, 0x00de, 0x0005, 0x6040, 0xa085, 0x0100, 0x6042, + 0x6020, 0xd0b4, 0x1db8, 0x60c3, 0x000c, 0x2011, 0xb8eb, 0x2013, + 0x0000, 0x7087, 0x0000, 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x080c, 0x7dea, 0x0c30, 0x0005, 0x708c, 0xa08a, 0x001d, + 0x1210, 0x0023, 0x0010, 0x080c, 0x151a, 0x0005, 0x4680, 0x468f, + 0x46b7, 0x46d0, 0x46f4, 0x471c, 0x4740, 0x4771, 0x4795, 0x47bd, + 0x47f4, 0x481c, 0x4838, 0x484e, 0x486e, 0x4881, 0x4889, 0x48b9, + 0x48dd, 0x4905, 0x4929, 0x495a, 0x4997, 0x49c6, 0x49e2, 0x4a21, + 0x4a41, 0x4a5a, 0x4a5b, 0x00c6, 0x2061, 0xb600, 0x6003, 0x0007, + 0x2061, 0x0100, 0x6004, 0xa084, 0xfff9, 0x6006, 0x00ce, 0x0005, + 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0002, 0x708f, 0x0001, + 0x2009, 0x07d0, 0x2011, 0x4b23, 0x080c, 0x6a94, 0x0005, 0x00f6, + 0x7084, 0xa086, 0x0014, 0x1508, 0x6043, 0x0000, 0x6020, 0xd0b4, + 0x11e0, 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1102, 0x11a0, 0x7834, + 0xa005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, + 0x70bb, 0x0001, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0x708f, 0x0010, + 0x080c, 0x4889, 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, + 0x0003, 0x6043, 0x0004, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0x080c, + 0x4bf9, 0x20a3, 0x1102, 0x20a3, 0x0000, 0x20a9, 0x000a, 0x20a3, + 0x0000, 0x1f04, 0x46c7, 0x60c3, 0x0014, 0x080c, 0x4b55, 0x0005, + 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4b23, 0x080c, 0x6a0e, + 0xa086, 0x0014, 0x11a8, 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1102, + 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, + 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0004, 0x0029, 0x0010, + 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, 0x0005, 0x080c, 0x4bf9, + 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, 0xbc8e, 0x080c, + 0x4c4a, 0x1160, 0x7078, 0xa005, 0x1148, 0x7150, 0xa186, 0xffff, + 0x0128, 0x080c, 0x4ae7, 0x0110, 0x080c, 0x4c28, 0x20a9, 0x0008, + 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0014, 0x080c, 0x4b55, 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, + 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0014, 0x11a8, 0x2079, + 0xbc80, 0x7a30, 0xa296, 0x1103, 0x1178, 0x7834, 0xa005, 0x1160, + 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, + 0x708f, 0x0006, 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, + 0x708f, 0x0007, 0x080c, 0x4bf9, 0x20a3, 0x1104, 0x20a3, 0x0000, + 0x3430, 0x2011, 0xbc8e, 0x080c, 0x4c4a, 0x11a8, 0x7078, 0xa005, + 0x1190, 0x7158, 0xa186, 0xffff, 0x0170, 0xa180, 0x2df9, 0x200d, + 0xa18c, 0xff00, 0x810f, 0x080c, 0x4ae7, 0x0128, 0x080c, 0x411d, + 0x0110, 0x080c, 0x289c, 0x20a9, 0x0008, 0x2298, 0x26a0, 0x53a6, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x080c, 0x4b55, + 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4b23, 0x080c, + 0x6a0e, 0xa086, 0x0014, 0x11a8, 0x2079, 0xbc80, 0x7a30, 0xa296, + 0x1104, 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, 0x0128, + 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0008, 0x0029, + 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, 0x0009, 0x080c, + 0x4bf9, 0x20a3, 0x1105, 0x20a3, 0x0100, 0x3430, 0x080c, 0x4c4a, + 0x1150, 0x7078, 0xa005, 0x1138, 0x080c, 0x4a5c, 0x1170, 0xa085, + 0x0001, 0x080c, 0x289c, 0x20a9, 0x0008, 0x2099, 0xbc8e, 0x26a0, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x080c, + 0x4b55, 0x0010, 0x080c, 0x4673, 0x0005, 0x00f6, 0x7084, 0xa005, + 0x0588, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0014, 0x1540, + 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1105, 0x1510, 0x7834, 0x2011, + 0x0100, 0xa21e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, + 0x1110, 0x70bb, 0x0001, 0x708f, 0x000a, 0x00b1, 0x0098, 0xa005, + 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, + 0x0001, 0x708b, 0x0000, 0x708f, 0x000e, 0x080c, 0x486e, 0x0010, + 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, 0x000b, 0x2011, 0xbc0e, + 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x43a4, 0x20a9, 0x0002, + 0x2009, 0x0000, 0x41a4, 0x080c, 0x4bf9, 0x20a3, 0x1106, 0x20a3, + 0x0000, 0x080c, 0x4c4a, 0x0118, 0x2013, 0x0000, 0x0020, 0x7054, + 0xa085, 0x0100, 0x2012, 0x2298, 0x20a9, 0x0042, 0x53a6, 0x60c3, + 0x0084, 0x080c, 0x4b55, 0x0005, 0x00f6, 0x7084, 0xa005, 0x01b0, + 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0084, 0x1168, 0x2079, + 0xbc80, 0x7a30, 0xa296, 0x1106, 0x1138, 0x7834, 0xa005, 0x1120, + 0x708f, 0x000c, 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, + 0x708f, 0x000d, 0x080c, 0x4bf9, 0x20a3, 0x1107, 0x20a3, 0x0000, + 0x2099, 0xbc8e, 0x20a9, 0x0040, 0x53a6, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x0084, 0x080c, 0x4b55, 0x0005, 0x00f6, 0x7084, + 0xa005, 0x01d0, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0084, + 0x1188, 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1107, 0x1158, 0x7834, + 0xa005, 0x1140, 0x708b, 0x0001, 0x080c, 0x4beb, 0x708f, 0x000e, + 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, 0x000f, + 0x7087, 0x0000, 0x608b, 0xbc85, 0x608f, 0xb5b5, 0x6043, 0x0005, + 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x4b23, 0x080c, 0x6a02, + 0x0005, 0x7084, 0xa005, 0x0120, 0x2011, 0x4b23, 0x080c, 0x6a0e, + 0x0005, 0x708f, 0x0011, 0x080c, 0x4c4a, 0x11a0, 0x7170, 0x81ff, + 0x0188, 0x2009, 0x0000, 0x7074, 0xa084, 0x00ff, 0x080c, 0x2852, + 0xa186, 0x007e, 0x0138, 0xa186, 0x0080, 0x0120, 0x2011, 0xbc8e, + 0x080c, 0x4ae7, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xbc80, + 0x20a1, 0x020b, 0x7484, 0xa480, 0x0018, 0xa080, 0x0007, 0xa084, + 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0014, 0x080c, 0x4b55, + 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4b23, 0x080c, + 0x6a0e, 0xa086, 0x0014, 0x11a8, 0x2079, 0xbc80, 0x7a30, 0xa296, + 0x1103, 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, 0x0128, + 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0012, 0x0029, + 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x708f, 0x0013, 0x080c, + 0x4c05, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, 0xbc8e, + 0x080c, 0x4c4a, 0x1160, 0x7078, 0xa005, 0x1148, 0x7150, 0xa186, + 0xffff, 0x0128, 0x080c, 0x4ae7, 0x0110, 0x080c, 0x4c28, 0x20a9, + 0x0008, 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x080c, 0x4b55, 0x0005, 0x00f6, 0x7084, 0xa005, + 0x01f0, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0014, 0x11a8, + 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1104, 0x1178, 0x7834, 0xa005, + 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, + 0x0001, 0x708f, 0x0014, 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, + 0x0005, 0x708f, 0x0015, 0x080c, 0x4c05, 0x20a3, 0x1104, 0x20a3, + 0x0000, 0x3430, 0x2011, 0xbc8e, 0x080c, 0x4c4a, 0x11a8, 0x7078, + 0xa005, 0x1190, 0x7158, 0xa186, 0xffff, 0x0170, 0xa180, 0x2df9, + 0x200d, 0xa18c, 0xff00, 0x810f, 0x080c, 0x4ae7, 0x0128, 0x080c, + 0x411d, 0x0110, 0x080c, 0x289c, 0x20a9, 0x0008, 0x2298, 0x26a0, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x080c, + 0x4b55, 0x0005, 0x00f6, 0x7084, 0xa005, 0x05b8, 0x2011, 0x4b23, + 0x080c, 0x6a0e, 0xa086, 0x0014, 0x1570, 0x2079, 0xbc80, 0x7a30, + 0xa296, 0x1105, 0x1540, 0x7834, 0x2011, 0x0100, 0xa21e, 0x1148, + 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, + 0x0060, 0xa005, 0x11c0, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, + 0x1110, 0x70bb, 0x0001, 0x708b, 0x0000, 0x7a38, 0xd2f4, 0x0138, + 0x2001, 0xb674, 0x2004, 0xd0a4, 0x1110, 0x70d7, 0x0008, 0x708f, + 0x0016, 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, 0x0005, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x2099, 0xbc80, 0x20a1, 0x020b, 0x20a9, + 0x000e, 0x53a6, 0x3430, 0x2011, 0xbc8e, 0x708f, 0x0017, 0x080c, + 0x4c4a, 0x1150, 0x7078, 0xa005, 0x1138, 0x080c, 0x4a5c, 0x1170, + 0xa085, 0x0001, 0x080c, 0x289c, 0x20a9, 0x0008, 0x2099, 0xbc8e, + 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x080c, 0x4b55, 0x0010, 0x080c, 0x4673, 0x0005, 0x00f6, 0x7084, + 0xa005, 0x01b0, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0xa086, 0x0084, + 0x1168, 0x2079, 0xbc80, 0x7a30, 0xa296, 0x1106, 0x1138, 0x7834, + 0xa005, 0x1120, 0x708f, 0x0018, 0x0029, 0x0010, 0x080c, 0x4b7b, + 0x00fe, 0x0005, 0x708f, 0x0019, 0x080c, 0x4c05, 0x20a3, 0x1106, + 0x20a3, 0x0000, 0x3430, 0x2099, 0xbc8e, 0x2039, 0xbc0e, 0x27a0, + 0x20a9, 0x0040, 0x53a3, 0x080c, 0x4c4a, 0x11e8, 0x2728, 0x2514, + 0x8207, 0xa084, 0x00ff, 0x8000, 0x2018, 0xa294, 0x00ff, 0x8007, + 0xa205, 0x202a, 0x7054, 0x2310, 0x8214, 0xa2a0, 0xbc0e, 0x2414, + 0xa38c, 0x0001, 0x0118, 0xa294, 0xff00, 0x0018, 0xa294, 0x00ff, + 0x8007, 0xa215, 0x2222, 0x2798, 0x26a0, 0x20a9, 0x0040, 0x53a6, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0084, 0x080c, 0x4b55, + 0x0005, 0x00f6, 0x7084, 0xa005, 0x01d0, 0x2011, 0x4b23, 0x080c, + 0x6a0e, 0xa086, 0x0084, 0x1188, 0x2079, 0xbc80, 0x7a30, 0xa296, + 0x1107, 0x1158, 0x7834, 0xa005, 0x1140, 0x708b, 0x0001, 0x080c, + 0x4beb, 0x708f, 0x001a, 0x0029, 0x0010, 0x080c, 0x4b7b, 0x00fe, + 0x0005, 0x708f, 0x001b, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xbc80, 0x20a1, 0x020b, 0x7484, 0xa480, 0x0018, 0xa080, 0x0007, + 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0084, 0x080c, + 0x4b55, 0x0005, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0xb653, + 0x252c, 0x20a9, 0x0008, 0x2041, 0xbc0e, 0x28a0, 0x2099, 0xbc8e, + 0x53a3, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0110, 0x2011, + 0x0000, 0x2800, 0xa200, 0x200c, 0xa1a6, 0xffff, 0x1148, 0xd5d4, + 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x4a71, 0x0804, 0x4adf, + 0x82ff, 0x1160, 0xd5d4, 0x0120, 0xa1a6, 0x3fff, 0x0d90, 0x0020, + 0xa1a6, 0x3fff, 0x0904, 0x4adf, 0xa18d, 0xc000, 0x20a9, 0x0010, + 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, + 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, + 0x0008, 0x8318, 0x1f04, 0x4a97, 0x04d0, 0x23a8, 0x2021, 0x0001, + 0x8426, 0x8425, 0x1f04, 0x4aa9, 0x2328, 0x8529, 0xa2be, 0x0007, + 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0xa73a, 0x000e, 0x27a8, + 0xa5a8, 0x0010, 0x1f04, 0x4ab8, 0x7552, 0xa5c8, 0x2df9, 0x292d, + 0xa5ac, 0x00ff, 0x7576, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, + 0x287c, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0xa405, + 0x201a, 0x707b, 0x0001, 0x26a0, 0x2898, 0x20a9, 0x0008, 0x53a6, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0xa085, 0x0001, 0x0028, 0xa006, + 0x0018, 0xa006, 0x080c, 0x151a, 0x009e, 0x008e, 0x0005, 0x2118, + 0x2021, 0x0000, 0x2001, 0x0007, 0xa39a, 0x0010, 0x0218, 0x8420, + 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0xa39a, 0x0010, 0x8421, + 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, 0x1de8, + 0xa238, 0x2704, 0xa42c, 0x11b8, 0xa405, 0x203a, 0x7152, 0xa1a0, + 0x2df9, 0x242d, 0xa5ac, 0x00ff, 0x7576, 0x6532, 0x6536, 0x0016, + 0x2508, 0x080c, 0x287c, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x707b, + 0x0001, 0xa084, 0x0000, 0x0005, 0x00e6, 0x2071, 0xb600, 0x707f, + 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, + 0x0140, 0x080c, 0x4c61, 0x080c, 0x7df3, 0x7004, 0xa084, 0x4000, + 0x0120, 0x7003, 0x1000, 0x7003, 0x0000, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb623, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, + 0x00f7, 0x080c, 0x4c11, 0x001e, 0xa094, 0x0010, 0xa285, 0x0080, + 0x7842, 0x7a42, 0x2009, 0x1388, 0x2011, 0x5a14, 0x080c, 0x6a94, + 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, + 0x2011, 0xb8eb, 0x2013, 0x0000, 0x7087, 0x0000, 0x012e, 0x20e1, + 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x7dea, 0x6144, + 0xd184, 0x0120, 0x718c, 0xa18d, 0x2000, 0x0018, 0x7180, 0xa18d, + 0x1000, 0x2011, 0xb8bf, 0x2112, 0x2009, 0x07d0, 0x2011, 0x4b23, + 0x080c, 0x6a94, 0x0005, 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, + 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, 0x0000, 0x080c, 0x806b, + 0x003e, 0x2009, 0x00f7, 0x080c, 0x4c11, 0x2061, 0xb8f4, 0x601b, + 0x0000, 0x601f, 0x0000, 0x2061, 0xb600, 0x6003, 0x0001, 0x2061, + 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0xb8bf, 0x200b, + 0x0000, 0x2009, 0x002d, 0x2011, 0x4bb4, 0x080c, 0x6a02, 0x012e, + 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, + 0x8000, 0x080c, 0x4c61, 0x2071, 0x0100, 0x080c, 0x7df3, 0x2071, + 0x0140, 0x7004, 0xa084, 0x4000, 0x0120, 0x7003, 0x1000, 0x7003, + 0x0000, 0x080c, 0x5b49, 0x01a8, 0x080c, 0x5b67, 0x1190, 0x2001, + 0xb89e, 0x2003, 0xaaaa, 0x0016, 0x080c, 0x2920, 0x2001, 0xb88f, + 0x2102, 0x001e, 0x2001, 0xb89f, 0x2003, 0x0000, 0x080c, 0x5a79, + 0x0030, 0x2001, 0x0001, 0x080c, 0x27f8, 0x080c, 0x4b7b, 0x012e, + 0x000e, 0x00ee, 0x0005, 0x20a9, 0x0040, 0x20a1, 0xbdc0, 0x2099, + 0xbc8e, 0x3304, 0x8007, 0x20a2, 0x9398, 0x94a0, 0x1f04, 0x4bf1, + 0x0005, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xbc00, 0x20a1, + 0x020b, 0x20a9, 0x000c, 0x53a6, 0x0005, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x2099, 0xbc80, 0x20a1, 0x020b, 0x20a9, 0x000c, 0x53a6, + 0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0xb631, + 0x2004, 0xa005, 0x1138, 0x2001, 0xb615, 0x2004, 0xa084, 0x00ff, + 0xa105, 0x0010, 0xa185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, + 0x0016, 0x0046, 0x2001, 0xb653, 0x2004, 0xd0a4, 0x0158, 0xa006, + 0x2020, 0x2009, 0x002a, 0x080c, 0xb1a4, 0x2001, 0xb60c, 0x200c, + 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0000, 0x080c, 0x2ca4, + 0x004e, 0x001e, 0x0005, 0x080c, 0x4b7b, 0x708f, 0x0000, 0x7087, + 0x0000, 0x0005, 0x0006, 0x2001, 0xb60c, 0x2004, 0xd09c, 0x0100, + 0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, + 0x0101, 0x200c, 0xa18d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, + 0x0005, 0x2001, 0xb60d, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, + 0x2011, 0x8017, 0x2001, 0xb8bf, 0x201c, 0x080c, 0x3f13, 0x003e, + 0x002e, 0x0005, 0x0156, 0x20a9, 0x00ff, 0x2009, 0xb735, 0xa006, + 0x200a, 0x8108, 0x1f04, 0x4c78, 0x015e, 0x0005, 0x00d6, 0x0036, + 0x0156, 0x0136, 0x0146, 0x2069, 0xb652, 0xa006, 0x6002, 0x6007, + 0x0707, 0x600a, 0x600e, 0x6012, 0xa198, 0x2df9, 0x231d, 0xa39c, + 0x00ff, 0x6316, 0x20a9, 0x0004, 0xac98, 0x0006, 0x23a0, 0x40a4, + 0x20a9, 0x0004, 0xac98, 0x000a, 0x23a0, 0x40a4, 0x603e, 0x6042, + 0x604e, 0x6052, 0x6056, 0x605a, 0x605e, 0x6062, 0x6066, 0x606a, + 0x606e, 0x6072, 0x6076, 0x607a, 0x607e, 0x6082, 0x6086, 0x608a, + 0x608e, 0x6092, 0x6096, 0x609a, 0x609e, 0x60ae, 0x61a2, 0x00d6, + 0x60a4, 0xa06d, 0x0110, 0x080c, 0x1614, 0x60a7, 0x0000, 0x60a8, + 0xa06d, 0x0110, 0x080c, 0x1614, 0x60ab, 0x0000, 0x00de, 0xa006, + 0x604a, 0x6810, 0x603a, 0x680c, 0x6046, 0x6814, 0xa084, 0x00ff, + 0x6042, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, + 0x2091, 0x8000, 0x6944, 0x6e48, 0xa684, 0x3fff, 0xa082, 0x4000, + 0x1a04, 0x4d8c, 0xa18c, 0xff00, 0x810f, 0xa182, 0x00ff, 0x1a04, + 0x4d91, 0x2001, 0xb60c, 0x2004, 0xa084, 0x0003, 0x01c0, 0x2001, + 0xb60c, 0x2004, 0xd084, 0x1904, 0x4d74, 0xa188, 0xb735, 0x2104, + 0xa065, 0x0904, 0x4d74, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, + 0x1904, 0x4d74, 0x6000, 0xd0c4, 0x0904, 0x4d74, 0x0068, 0xa188, + 0xb735, 0x2104, 0xa065, 0x0904, 0x4d59, 0x6004, 0xa084, 0x00ff, + 0xa08e, 0x0006, 0x1904, 0x4d5e, 0x60a4, 0xa00d, 0x0118, 0x080c, + 0x5246, 0x05d0, 0x60a8, 0xa00d, 0x0188, 0x080c, 0x5291, 0x1170, + 0x694c, 0xd1fc, 0x1118, 0x080c, 0x4f50, 0x0448, 0x080c, 0x4eff, + 0x694c, 0xd1ec, 0x1520, 0x080c, 0x5138, 0x0408, 0x694c, 0xa184, + 0xa000, 0x0178, 0xd1ec, 0x0140, 0xd1fc, 0x0118, 0x080c, 0x5147, + 0x0028, 0x080c, 0x5147, 0x0028, 0xd1fc, 0x0118, 0x080c, 0x4eff, + 0x0070, 0x6050, 0xa00d, 0x0130, 0x2d00, 0x200a, 0x6803, 0x0000, + 0x6052, 0x0028, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x080c, + 0x6d1c, 0xa006, 0x012e, 0x0005, 0x2001, 0x0005, 0x2009, 0x0000, + 0x04e0, 0x2001, 0x0028, 0x2009, 0x0000, 0x04b8, 0xa082, 0x0006, + 0x1298, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1158, 0x60a0, 0xd0bc, + 0x1140, 0x6100, 0xd1fc, 0x0128, 0x2001, 0x0029, 0x2009, 0x1000, + 0x0420, 0x2001, 0x0028, 0x00a8, 0x2009, 0xb60c, 0x210c, 0xd18c, + 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, + 0x0040, 0x2001, 0x0029, 0x6100, 0xd1fc, 0x0118, 0x2009, 0x1000, + 0x0060, 0x2009, 0x0000, 0x0048, 0x2001, 0x0029, 0x2009, 0x0000, + 0x0020, 0x2001, 0x0029, 0x2009, 0x0000, 0xa005, 0x012e, 0x0005, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x6844, 0x8007, 0xa084, 0x00ff, + 0x2008, 0xa182, 0x00ff, 0x1a04, 0x4deb, 0xa188, 0xb735, 0x2104, + 0xa065, 0x01c0, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x11a8, + 0x2c70, 0x080c, 0x864e, 0x05e8, 0x2e00, 0x601a, 0x2d00, 0x6012, + 0x600b, 0xffff, 0x601f, 0x000a, 0x2009, 0x0003, 0x080c, 0x86d3, + 0xa006, 0x0460, 0x2001, 0x0028, 0x0440, 0xa082, 0x0006, 0x1298, + 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1158, 0x60a0, 0xd0bc, 0x1140, + 0x6100, 0xd1fc, 0x09e8, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, + 0x2001, 0x0028, 0x0090, 0x2009, 0xb60c, 0x210c, 0xd18c, 0x0118, + 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, + 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0xa005, 0x012e, 0x00ee, + 0x0005, 0x2001, 0x002c, 0x0cc8, 0x00f6, 0x00e6, 0x0126, 0x2091, + 0x8000, 0x2011, 0x0000, 0x2079, 0xb600, 0x6944, 0xa18c, 0xff00, + 0x810f, 0xa182, 0x00ff, 0x1a04, 0x4eb6, 0x080c, 0x501b, 0x11a0, + 0x6004, 0xa084, 0x00ff, 0xa082, 0x0006, 0x1270, 0x6864, 0xa0c6, + 0x006f, 0x0150, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1904, 0x4e9f, + 0x60a0, 0xd0bc, 0x1904, 0x4e9f, 0x6864, 0xa0c6, 0x006f, 0x0118, + 0x2008, 0x0804, 0x4e68, 0x6968, 0x2140, 0xa18c, 0xff00, 0x810f, + 0x78d4, 0xd0ac, 0x1118, 0xa182, 0x0080, 0x06d0, 0xa182, 0x00ff, + 0x16b8, 0x6a70, 0x6b6c, 0x7870, 0xa306, 0x1160, 0x7874, 0xa24e, + 0x1118, 0x2208, 0x2310, 0x0460, 0xa9cc, 0xff00, 0x1118, 0x2208, + 0x2310, 0x0430, 0x080c, 0x3e0c, 0x2c70, 0x0550, 0x2009, 0x0000, + 0x2011, 0x0000, 0xa0c6, 0x4000, 0x1160, 0x0006, 0x2e60, 0x080c, + 0x52bc, 0x1108, 0xc185, 0x7000, 0xd0bc, 0x0108, 0xc18d, 0x000e, + 0x0088, 0xa0c6, 0x4007, 0x1110, 0x2408, 0x0060, 0xa0c6, 0x4008, + 0x1118, 0x2708, 0x2610, 0x0030, 0xa0c6, 0x4009, 0x1108, 0x0010, + 0x2001, 0x4006, 0x6866, 0x696a, 0x6a6e, 0x2001, 0x0030, 0x0450, + 0x080c, 0x864e, 0x1138, 0x2001, 0x4005, 0x2009, 0x0003, 0x2011, + 0x0000, 0x0c80, 0x2e00, 0x601a, 0x080c, 0xa0e3, 0x2d00, 0x6012, + 0x601f, 0x0001, 0x6838, 0xd88c, 0x0108, 0xc0f5, 0x683a, 0x0126, + 0x2091, 0x8000, 0x080c, 0x2cd1, 0x012e, 0x2001, 0x0000, 0x080c, + 0x4f5d, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x2009, 0x0002, 0x080c, + 0x86d3, 0xa006, 0xa005, 0x012e, 0x00ee, 0x00fe, 0x0005, 0x2001, + 0x0028, 0x2009, 0x0000, 0x0cb0, 0x2009, 0xb60c, 0x210c, 0xd18c, + 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, + 0x0010, 0x2001, 0x0029, 0x2009, 0x0000, 0x0c20, 0x2001, 0x0029, + 0x2009, 0x0000, 0x08f8, 0x6944, 0x6e48, 0xa684, 0x3fff, 0xa082, + 0x4000, 0x16b8, 0xa18c, 0xff00, 0x810f, 0xa182, 0x00ff, 0x12e0, + 0xa188, 0xb735, 0x2104, 0xa065, 0x01b8, 0x6004, 0xa084, 0x00ff, + 0xa08e, 0x0006, 0x11b0, 0x684c, 0xd0ec, 0x0120, 0x080c, 0x5147, + 0x0431, 0x0030, 0x0421, 0x684c, 0xd0fc, 0x0110, 0x080c, 0x5138, + 0x080c, 0x5185, 0xa006, 0x00c8, 0x2001, 0x0028, 0x2009, 0x0000, + 0x00a0, 0xa082, 0x0006, 0x1240, 0x6100, 0xd1fc, 0x0d20, 0x2001, + 0x0029, 0x2009, 0x1000, 0x0048, 0x2001, 0x0029, 0x2009, 0x0000, + 0x0020, 0x2001, 0x0029, 0x2009, 0x0000, 0xa005, 0x0005, 0x0126, + 0x2091, 0x8000, 0x6050, 0xa00d, 0x0138, 0x2d00, 0x200a, 0x6803, + 0x0000, 0x6052, 0x012e, 0x0005, 0x2d00, 0x6052, 0x604e, 0x6803, + 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0x604c, 0xa005, 0x0170, + 0x00e6, 0x2071, 0xb8e1, 0x7004, 0xa086, 0x0002, 0x0168, 0x00ee, + 0x604c, 0x6802, 0x2d00, 0x604e, 0x012e, 0x0005, 0x2d00, 0x6052, + 0x604e, 0x6803, 0x0000, 0x0cc0, 0x701c, 0xac06, 0x1d80, 0x604c, + 0x2070, 0x7000, 0x6802, 0x2d00, 0x7002, 0x00ee, 0x012e, 0x0005, + 0x0126, 0x2091, 0x8000, 0x604c, 0xa06d, 0x0130, 0x6800, 0xa005, + 0x1108, 0x6052, 0x604e, 0xad05, 0x012e, 0x0005, 0x604c, 0xa06d, + 0x0130, 0x6800, 0xa005, 0x1108, 0x6052, 0x604e, 0xad05, 0x0005, + 0x6803, 0x0000, 0x6084, 0xa00d, 0x0120, 0x2d00, 0x200a, 0x6086, + 0x0005, 0x2d00, 0x6086, 0x6082, 0x0cd8, 0x0126, 0x00c6, 0x0026, + 0x2091, 0x8000, 0x6218, 0x2260, 0x6200, 0xa005, 0x0110, 0xc285, + 0x0008, 0xc284, 0x6202, 0x002e, 0x00ce, 0x012e, 0x0005, 0x0126, + 0x00c6, 0x2091, 0x8000, 0x6218, 0x2260, 0x6204, 0x0006, 0xa086, + 0x0006, 0x1180, 0x609c, 0xd0ac, 0x0168, 0x2001, 0xb653, 0x2004, + 0xd0a4, 0x0140, 0xa284, 0xff00, 0x8007, 0xa086, 0x0007, 0x1110, + 0x2011, 0x0600, 0x000e, 0xa294, 0xff00, 0xa215, 0x6206, 0x0006, + 0xa086, 0x0006, 0x1128, 0x6290, 0x82ff, 0x1110, 0x080c, 0x151a, + 0x000e, 0x00ce, 0x012e, 0x0005, 0x0126, 0x00c6, 0x2091, 0x8000, + 0x6218, 0x2260, 0x6204, 0x0006, 0xa086, 0x0006, 0x1178, 0x609c, + 0xd0a4, 0x0160, 0x2001, 0xb653, 0x2004, 0xd0ac, 0x1138, 0xa284, + 0x00ff, 0xa086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0xa294, + 0x00ff, 0x8007, 0xa215, 0x6206, 0x00ce, 0x012e, 0x0005, 0x0026, + 0xa182, 0x00ff, 0x0218, 0xa085, 0x0001, 0x00b0, 0xa190, 0xb735, + 0x2204, 0xa065, 0x1180, 0x0016, 0x00d6, 0x080c, 0x15e4, 0x2d60, + 0x00de, 0x001e, 0x0d80, 0x2c00, 0x2012, 0x60a7, 0x0000, 0x60ab, + 0x0000, 0x080c, 0x4c7e, 0xa006, 0x002e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x0026, 0xa182, 0x00ff, 0x0218, 0xa085, 0x0001, 0x0480, + 0x00d6, 0xa190, 0xb735, 0x2204, 0xa06d, 0x0540, 0x2013, 0x0000, + 0x00d6, 0x00c6, 0x2d60, 0x60a4, 0xa06d, 0x0110, 0x080c, 0x1614, + 0x60a8, 0xa06d, 0x0110, 0x080c, 0x1614, 0x00ce, 0x00de, 0x00d6, + 0x00c6, 0x68ac, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6010, + 0x2068, 0x080c, 0x9d16, 0x0110, 0x080c, 0x1624, 0x080c, 0x86a4, + 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x080c, 0x1614, 0x00de, 0xa006, + 0x002e, 0x012e, 0x0005, 0x0016, 0xa182, 0x00ff, 0x0218, 0xa085, + 0x0001, 0x0030, 0xa188, 0xb735, 0x2104, 0xa065, 0x0dc0, 0xa006, + 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x600b, 0x0000, + 0x600f, 0x0000, 0x6000, 0xc08c, 0x6002, 0x080c, 0x5b41, 0x1558, + 0x60a0, 0xa086, 0x007e, 0x2069, 0xbc90, 0x0130, 0x2001, 0xb635, + 0x2004, 0xd0ac, 0x1500, 0x0098, 0x2d04, 0xd0e4, 0x01e0, 0x00d6, + 0x2069, 0xbc8e, 0x00c6, 0x2061, 0xb8b2, 0x6810, 0x2062, 0x6814, + 0x6006, 0x6818, 0x600a, 0x681c, 0x600e, 0x00ce, 0x00de, 0x8d69, + 0x2d04, 0x2069, 0x0140, 0xa005, 0x1110, 0x2001, 0x0001, 0x6886, + 0x2069, 0xb600, 0x68a6, 0x2069, 0xbc8e, 0x6808, 0x605e, 0x6810, + 0x6062, 0x6138, 0xa10a, 0x0208, 0x603a, 0x6814, 0x6066, 0x2099, + 0xbc96, 0xac88, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2099, + 0xbc9a, 0xac88, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2069, + 0xbcae, 0x6808, 0x606a, 0x690c, 0x616e, 0x6810, 0x6072, 0x6818, + 0x6076, 0x60a0, 0xa086, 0x007e, 0x1120, 0x2069, 0xbc8e, 0x690c, + 0x616e, 0xa182, 0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0xa182, + 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0xa182, 0x02c1, 0x1218, + 0x2009, 0x0006, 0x00a0, 0xa182, 0x0349, 0x1218, 0x2009, 0x0005, + 0x0070, 0xa182, 0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0xa182, + 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0x6192, + 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, + 0x2071, 0xbc8d, 0x2e04, 0x6896, 0x2071, 0xbc8e, 0x7004, 0x689a, + 0x701c, 0x689e, 0x6a00, 0x2009, 0xb672, 0x210c, 0xd0bc, 0x0120, + 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0120, 0xd1e4, + 0x0110, 0xc2bd, 0x0008, 0xc2bc, 0x6a02, 0x00ee, 0x002e, 0x001e, + 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x01c0, + 0x6900, 0x81ff, 0x1540, 0x6a04, 0xa282, 0x0010, 0x1648, 0xad88, + 0x0004, 0x20a9, 0x0010, 0x2104, 0xa086, 0xffff, 0x0128, 0x8108, + 0x1f04, 0x50f3, 0x080c, 0x151a, 0x260a, 0x8210, 0x6a06, 0x0098, + 0x080c, 0x15fd, 0x01a8, 0x2d00, 0x60a6, 0x6803, 0x0000, 0xad88, + 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, 0x1f04, 0x510b, + 0x6807, 0x0001, 0x6e12, 0xa085, 0x0001, 0x012e, 0x00de, 0x0005, + 0xa006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x00d6, 0x60a4, 0xa00d, + 0x01a0, 0x2168, 0x6800, 0xa005, 0x1160, 0x080c, 0x5246, 0x1168, + 0x200b, 0xffff, 0x6804, 0xa08a, 0x0002, 0x0218, 0x8001, 0x6806, + 0x0020, 0x080c, 0x1614, 0x60a7, 0x0000, 0x00de, 0x012e, 0x0005, + 0x0126, 0x2091, 0x8000, 0x080c, 0x52a4, 0x0010, 0x080c, 0x4eff, + 0x080c, 0x51be, 0x1dd8, 0x080c, 0x5185, 0x012e, 0x0005, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x60a8, 0xa06d, 0x01c0, 0x6950, 0x81ff, + 0x1540, 0x6a54, 0xa282, 0x0010, 0x1670, 0xad88, 0x0018, 0x20a9, + 0x0010, 0x2104, 0xa086, 0xffff, 0x0128, 0x8108, 0x1f04, 0x5159, + 0x080c, 0x151a, 0x260a, 0x8210, 0x6a56, 0x0098, 0x080c, 0x15fd, + 0x01d0, 0x2d00, 0x60aa, 0x6853, 0x0000, 0xad88, 0x0018, 0x20a9, + 0x0010, 0x200b, 0xffff, 0x8108, 0x1f04, 0x5171, 0x6857, 0x0001, + 0x6e62, 0x0010, 0x080c, 0x4f50, 0x0089, 0x1de0, 0xa085, 0x0001, + 0x012e, 0x00de, 0x0005, 0xa006, 0x0cd8, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6d1c, 0x012e, 0x0005, 0xa01e, 0x0010, 0x2019, 0x0001, + 0xa00e, 0x0126, 0x2091, 0x8000, 0x604c, 0x2068, 0x6000, 0xd0dc, + 0x1170, 0x8dff, 0x01f8, 0x83ff, 0x0120, 0x6848, 0xa606, 0x0158, + 0x0030, 0x683c, 0xa406, 0x1118, 0x6840, 0xa506, 0x0120, 0x2d08, + 0x6800, 0x2068, 0x0c70, 0x080c, 0x81a5, 0x6a00, 0x604c, 0xad06, + 0x1110, 0x624e, 0x0018, 0xa180, 0x0000, 0x2202, 0x82ff, 0x1110, + 0x6152, 0x8dff, 0x012e, 0x0005, 0xa01e, 0x0010, 0x2019, 0x0001, + 0xa00e, 0x6080, 0x2068, 0x8dff, 0x01e8, 0x83ff, 0x0120, 0x6848, + 0xa606, 0x0158, 0x0030, 0x683c, 0xa406, 0x1118, 0x6840, 0xa506, + 0x0120, 0x2d08, 0x6800, 0x2068, 0x0c70, 0x6a00, 0x6080, 0xad06, + 0x1110, 0x6282, 0x0018, 0xa180, 0x0000, 0x2202, 0x82ff, 0x1110, + 0x6186, 0x8dff, 0x0005, 0xa016, 0x080c, 0x5240, 0x1110, 0x2011, + 0x0001, 0x080c, 0x528b, 0x1110, 0xa295, 0x0002, 0x0005, 0x080c, + 0x52bc, 0x0118, 0x080c, 0x9dcb, 0x0010, 0xa085, 0x0001, 0x0005, + 0x080c, 0x52bc, 0x0118, 0x080c, 0x9d5b, 0x0010, 0xa085, 0x0001, + 0x0005, 0x080c, 0x52bc, 0x0118, 0x080c, 0x9dae, 0x0010, 0xa085, + 0x0001, 0x0005, 0x080c, 0x52bc, 0x0118, 0x080c, 0x9d77, 0x0010, + 0xa085, 0x0001, 0x0005, 0x080c, 0x52bc, 0x0118, 0x080c, 0x9de7, + 0x0010, 0xa085, 0x0001, 0x0005, 0x0126, 0x0006, 0x00d6, 0x2091, + 0x8000, 0x6080, 0xa06d, 0x01a0, 0x6800, 0x0006, 0x6837, 0x0103, + 0x6b4a, 0x6847, 0x0000, 0x080c, 0x9f88, 0x0006, 0x6000, 0xd0fc, + 0x0110, 0x080c, 0xb445, 0x000e, 0x080c, 0x547a, 0x000e, 0x0c50, + 0x6083, 0x0000, 0x6087, 0x0000, 0x00de, 0x000e, 0x012e, 0x0005, + 0x60a4, 0xa00d, 0x1118, 0xa085, 0x0001, 0x0005, 0x00e6, 0x2170, + 0x7000, 0xa005, 0x1168, 0x20a9, 0x0010, 0xae88, 0x0004, 0x2104, + 0xa606, 0x0130, 0x8108, 0x1f04, 0x524f, 0xa085, 0x0001, 0x0008, + 0xa006, 0x00ee, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x60a4, + 0xa06d, 0x1128, 0x080c, 0x15fd, 0x01a0, 0x2d00, 0x60a6, 0x6803, + 0x0001, 0x6807, 0x0000, 0xad88, 0x0004, 0x20a9, 0x0010, 0x200b, + 0xffff, 0x8108, 0x1f04, 0x526f, 0xa085, 0x0001, 0x012e, 0x00de, + 0x0005, 0xa006, 0x0cd8, 0x00d6, 0x0126, 0x2091, 0x8000, 0x60a4, + 0xa06d, 0x0130, 0x60a7, 0x0000, 0x080c, 0x1614, 0xa085, 0x0001, + 0x012e, 0x00de, 0x0005, 0x60a8, 0xa00d, 0x1118, 0xa085, 0x0001, + 0x0005, 0x00e6, 0x2170, 0x7050, 0xa005, 0x1160, 0x20a9, 0x0010, + 0xae88, 0x0018, 0x2104, 0xa606, 0x0128, 0x8108, 0x1f04, 0x529a, + 0xa085, 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x0c19, + 0x1188, 0x200b, 0xffff, 0x00d6, 0x60a8, 0x2068, 0x6854, 0xa08a, + 0x0002, 0x0218, 0x8001, 0x6856, 0x0020, 0x080c, 0x1614, 0x60ab, + 0x0000, 0x00de, 0x012e, 0x0005, 0x609c, 0xd0a4, 0x0005, 0x00f6, + 0x080c, 0x5b41, 0x01b0, 0x71b8, 0x81ff, 0x1198, 0x71d4, 0xd19c, + 0x0180, 0x2001, 0x007e, 0xa080, 0xb735, 0x2004, 0xa07d, 0x0148, + 0x7804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1118, 0x7800, 0xc0ed, + 0x7802, 0x2079, 0xb652, 0x7804, 0xd0a4, 0x01e8, 0x0156, 0x00c6, + 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, 0x080c, 0x501b, 0x1168, + 0x6004, 0xa084, 0xff00, 0x8007, 0xa096, 0x0004, 0x0118, 0xa086, + 0x0006, 0x1118, 0x6000, 0xc0ed, 0x6002, 0x001e, 0x8108, 0x1f04, + 0x52e4, 0x00ce, 0x015e, 0x080c, 0x537b, 0x0120, 0x2001, 0xb8b5, + 0x200c, 0x0038, 0x2079, 0xb652, 0x7804, 0xd0a4, 0x0130, 0x2009, + 0x07d0, 0x2011, 0x530f, 0x080c, 0x6a94, 0x00fe, 0x0005, 0x2011, + 0x530f, 0x080c, 0x6a0e, 0x080c, 0x537b, 0x01f0, 0x2001, 0xb7b3, + 0x2004, 0xa080, 0x0000, 0x200c, 0xc1ec, 0x2102, 0x2001, 0xb653, + 0x2004, 0xd0a4, 0x0130, 0x2009, 0x07d0, 0x2011, 0x530f, 0x080c, + 0x6a94, 0x00e6, 0x2071, 0xb600, 0x7073, 0x0000, 0x7077, 0x0000, + 0x080c, 0x2aed, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, + 0x2009, 0x0000, 0x0016, 0x080c, 0x501b, 0x1530, 0x6000, 0xd0ec, + 0x0518, 0x0046, 0x62a0, 0xa294, 0x00ff, 0x8227, 0xa006, 0x2009, + 0x0029, 0x080c, 0xb1a4, 0x6000, 0xc0e5, 0xc0ec, 0x6002, 0x6004, + 0xa084, 0x00ff, 0xa085, 0x0700, 0x6006, 0x2019, 0x0029, 0x080c, + 0x6e67, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d74, 0x2009, 0x0000, + 0x080c, 0xaf3e, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x533a, + 0x00ce, 0x015e, 0x0005, 0x00c6, 0x6018, 0x2060, 0x6000, 0xc0ec, + 0x6002, 0x00ce, 0x0005, 0x7818, 0x2004, 0xd0ac, 0x0005, 0x7818, + 0x2004, 0xd0bc, 0x0005, 0x00f6, 0x2001, 0xb7b3, 0x2004, 0xa07d, + 0x0110, 0x7800, 0xd0ec, 0x00fe, 0x0005, 0x0126, 0x0026, 0x2091, + 0x8000, 0x0006, 0x62a0, 0xa290, 0xb735, 0x2204, 0xac06, 0x190c, + 0x151a, 0x000e, 0x6200, 0xa005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, + 0x6202, 0x002e, 0x012e, 0x0005, 0x2011, 0xb635, 0x2204, 0xd0cc, + 0x0138, 0x2001, 0xb8b3, 0x200c, 0x2011, 0x53a9, 0x080c, 0x6a94, + 0x0005, 0x2011, 0x53a9, 0x080c, 0x6a0e, 0x2011, 0xb635, 0x2204, + 0xc0cc, 0x2012, 0x0005, 0x2071, 0xb714, 0x7003, 0x0001, 0x7007, + 0x0000, 0x7013, 0x0000, 0x7017, 0x0000, 0x701b, 0x0000, 0x701f, + 0x0000, 0x700b, 0x0000, 0x704b, 0x0001, 0x704f, 0x0000, 0x705b, + 0x0020, 0x705f, 0x0040, 0x707f, 0x0000, 0x2071, 0xb87d, 0x7003, + 0xb714, 0x7007, 0x0000, 0x700b, 0x0000, 0x700f, 0xb85d, 0x7013, + 0x0020, 0x7017, 0x0040, 0x7037, 0x0000, 0x0005, 0x0016, 0x00e6, + 0x2071, 0xb835, 0xa00e, 0x7186, 0x718a, 0x7097, 0x0001, 0x2001, + 0xb653, 0x2004, 0xd0fc, 0x1150, 0x2001, 0xb653, 0x2004, 0xa00e, + 0xd09c, 0x0108, 0x8108, 0x7102, 0x0804, 0x5444, 0x2001, 0xb672, + 0x200c, 0xa184, 0x000f, 0x2009, 0xb673, 0x210c, 0x0002, 0x53ec, + 0x541f, 0x5426, 0x5430, 0x5435, 0x53ec, 0x53ec, 0x53ec, 0x540f, + 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x53ec, 0x7003, + 0x0004, 0x0136, 0x0146, 0x0156, 0x2099, 0xb676, 0x20a1, 0xb886, + 0x20a9, 0x0004, 0x53a3, 0x015e, 0x014e, 0x013e, 0x0428, 0x708f, + 0x0005, 0x7007, 0x0122, 0x2001, 0x0002, 0x0030, 0x708f, 0x0002, + 0x7007, 0x0121, 0x2001, 0x0003, 0x7002, 0x7097, 0x0001, 0x0088, + 0x7007, 0x0122, 0x2001, 0x0002, 0x0020, 0x7007, 0x0121, 0x2001, + 0x0003, 0x7002, 0xa006, 0x7096, 0x708e, 0xa184, 0xff00, 0x8007, + 0x709a, 0xa184, 0x00ff, 0x7092, 0x00ee, 0x001e, 0x0005, 0x00e6, + 0x2071, 0xb714, 0x684c, 0xa005, 0x1130, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0428, 0x6a60, 0x7236, 0x6b64, 0x733a, 0x6868, + 0x703e, 0x7076, 0x686c, 0x7042, 0x707a, 0x684c, 0x702e, 0x6844, + 0x7032, 0x2009, 0x000d, 0x200a, 0x700b, 0x0000, 0x8007, 0x8006, + 0x8006, 0xa08c, 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, 0xa319, + 0x726e, 0x7372, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0xa006, + 0x00ee, 0x0005, 0x0156, 0x00e6, 0x0026, 0x6838, 0xd0fc, 0x1904, + 0x54d3, 0x6804, 0xa00d, 0x0188, 0x00d6, 0x2071, 0xb600, 0xa016, + 0x702c, 0x2168, 0x6904, 0x206a, 0x8210, 0x2d00, 0x81ff, 0x1dc8, + 0x702e, 0x70b4, 0xa200, 0x70b6, 0x00de, 0x2071, 0xb714, 0x701c, + 0xa005, 0x1904, 0x54e3, 0x20a9, 0x0032, 0x0f04, 0x54e1, 0x0e04, + 0x549d, 0x2071, 0xb835, 0x7200, 0x82ff, 0x05d8, 0x6934, 0xa186, + 0x0103, 0x1904, 0x54f1, 0x6948, 0x6844, 0xa105, 0x1540, 0x2009, + 0x8020, 0x2200, 0x0002, 0x54e1, 0x54b8, 0x5509, 0x5515, 0x54e1, + 0x2071, 0x0000, 0x20a9, 0x0032, 0x0f04, 0x54e1, 0x7018, 0xd084, + 0x1dd8, 0x7122, 0x683c, 0x7026, 0x6840, 0x702a, 0x701b, 0x0001, + 0x2091, 0x4080, 0x2071, 0xb600, 0x702c, 0x206a, 0x2d00, 0x702e, + 0x70b4, 0x8000, 0x70b6, 0x002e, 0x00ee, 0x015e, 0x0005, 0x6844, + 0xa086, 0x0100, 0x1130, 0x6868, 0xa005, 0x1118, 0x2009, 0x8020, + 0x0880, 0x2071, 0xb714, 0x2d08, 0x206b, 0x0000, 0x7010, 0x8000, + 0x7012, 0x7018, 0xa06d, 0x711a, 0x0110, 0x6902, 0x0008, 0x711e, + 0x0c10, 0xa18c, 0x00ff, 0xa186, 0x0017, 0x0130, 0xa186, 0x001e, + 0x0118, 0xa18e, 0x001f, 0x1d28, 0x684c, 0xd0cc, 0x0d10, 0x6850, + 0xa084, 0x00ff, 0xa086, 0x0001, 0x19e0, 0x2009, 0x8021, 0x0804, + 0x54b1, 0x7084, 0x8008, 0xa092, 0x001e, 0x1a98, 0x7186, 0xae90, + 0x0003, 0xa210, 0x683c, 0x2012, 0x0078, 0x7084, 0x8008, 0xa092, + 0x000f, 0x1a38, 0x7186, 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, + 0x2012, 0x8210, 0x6840, 0x2012, 0x7088, 0xa10a, 0x0a04, 0x54ca, + 0x718c, 0x7084, 0xa10a, 0x0a04, 0x54ca, 0x2071, 0x0000, 0x7018, + 0xd084, 0x1904, 0x54ca, 0x2071, 0xb835, 0x7000, 0xa086, 0x0002, + 0x1150, 0x080c, 0x5794, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, + 0x4080, 0x0804, 0x54ca, 0x080c, 0x57be, 0x2071, 0x0000, 0x701b, + 0x0001, 0x2091, 0x4080, 0x0804, 0x54ca, 0x0006, 0x684c, 0x0006, + 0x6837, 0x0103, 0x20a9, 0x001c, 0xad80, 0x0011, 0x20a0, 0x2001, + 0x0000, 0x40a4, 0x000e, 0xa084, 0x00ff, 0x684e, 0x000e, 0x684a, + 0x6952, 0x0005, 0x2071, 0xb714, 0x7004, 0x0002, 0x5570, 0x5581, + 0x577f, 0x5780, 0x578d, 0x5793, 0x5571, 0x5770, 0x5706, 0x575c, + 0x0005, 0x0126, 0x2091, 0x8000, 0x0e04, 0x5580, 0x2009, 0x000d, + 0x7030, 0x200a, 0x2091, 0x4080, 0x7007, 0x0001, 0x700b, 0x0000, + 0x012e, 0x2069, 0xb8f4, 0x683c, 0xa005, 0x03f8, 0x11f0, 0x0126, + 0x2091, 0x8000, 0x2069, 0x0000, 0x6934, 0x2001, 0xb720, 0x2004, + 0xa10a, 0x0170, 0x0e04, 0x55a4, 0x2069, 0x0000, 0x6818, 0xd084, + 0x1158, 0x2009, 0x8040, 0x6922, 0x681b, 0x0001, 0x2091, 0x4080, + 0x2069, 0xb8f4, 0x683f, 0xffff, 0x012e, 0x2069, 0xb600, 0x6848, + 0x6968, 0xa102, 0x2069, 0xb835, 0x688a, 0x6984, 0x701c, 0xa06d, + 0x0120, 0x81ff, 0x0904, 0x55fa, 0x00a0, 0x81ff, 0x0904, 0x56c0, + 0x2071, 0xb835, 0x7184, 0x7088, 0xa10a, 0x1258, 0x7190, 0x2071, + 0xb8f4, 0x7038, 0xa005, 0x0128, 0x1b04, 0x56c0, 0x713a, 0x0804, + 0x56c0, 0x2071, 0xb835, 0x718c, 0x0126, 0x2091, 0x8000, 0x7084, + 0xa10a, 0x0a04, 0x56db, 0x0e04, 0x567c, 0x2071, 0x0000, 0x7018, + 0xd084, 0x1904, 0x567c, 0x2001, 0xffff, 0x2071, 0xb8f4, 0x703a, + 0x2071, 0xb835, 0x7000, 0xa086, 0x0002, 0x1150, 0x080c, 0x5794, + 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0804, 0x567c, + 0x080c, 0x57be, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, + 0x0804, 0x567c, 0x2071, 0xb835, 0x7000, 0xa005, 0x0904, 0x56a2, + 0x6934, 0xa186, 0x0103, 0x1904, 0x567f, 0x684c, 0xd0bc, 0x1904, + 0x56a2, 0x6948, 0x6844, 0xa105, 0x1904, 0x5697, 0x2009, 0x8020, + 0x2071, 0xb835, 0x7000, 0x0002, 0x56a2, 0x5662, 0x563a, 0x564c, + 0x5619, 0x0136, 0x0146, 0x0156, 0x2099, 0xb676, 0x20a1, 0xb886, + 0x20a9, 0x0004, 0x53a3, 0x015e, 0x014e, 0x013e, 0x2071, 0xb87d, + 0xad80, 0x000f, 0x700e, 0x7013, 0x0002, 0x7007, 0x0002, 0x700b, + 0x0000, 0x2e10, 0x080c, 0x1648, 0x2071, 0xb714, 0x7007, 0x0009, + 0x0804, 0x56c0, 0x7084, 0x8008, 0xa092, 0x001e, 0x1a04, 0x56c0, + 0xae90, 0x0003, 0xa210, 0x683c, 0x2012, 0x7186, 0x2071, 0xb714, + 0x080c, 0x5815, 0x0804, 0x56c0, 0x7084, 0x8008, 0xa092, 0x000f, + 0x1a04, 0x56c0, 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, 0x2012, + 0x8210, 0x6840, 0x2012, 0x7186, 0x2071, 0xb714, 0x080c, 0x5815, + 0x0804, 0x56c0, 0x0126, 0x2091, 0x8000, 0x0e04, 0x567c, 0x2071, + 0x0000, 0x7018, 0xd084, 0x1180, 0x7122, 0x683c, 0x7026, 0x6840, + 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, 0x012e, 0x2071, 0xb714, + 0x080c, 0x5815, 0x0804, 0x56c0, 0x012e, 0x0804, 0x56c0, 0xa18c, + 0x00ff, 0xa186, 0x0017, 0x0130, 0xa186, 0x001e, 0x0118, 0xa18e, + 0x001f, 0x11c0, 0x684c, 0xd0cc, 0x01a8, 0x6850, 0xa084, 0x00ff, + 0xa086, 0x0001, 0x1178, 0x2009, 0x8021, 0x0804, 0x5610, 0x6844, + 0xa086, 0x0100, 0x1138, 0x6868, 0xa005, 0x1120, 0x2009, 0x8020, + 0x0804, 0x5610, 0x2071, 0xb714, 0x080c, 0x5827, 0x01c8, 0x2071, + 0xb714, 0x700f, 0x0001, 0x6934, 0xa184, 0x00ff, 0xa086, 0x0003, + 0x1130, 0x810f, 0xa18c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x7007, + 0x0003, 0x080c, 0x5840, 0x7050, 0xa086, 0x0100, 0x0904, 0x5780, + 0x0126, 0x2091, 0x8000, 0x2071, 0xb714, 0x7008, 0xa086, 0x0001, + 0x1180, 0x0e04, 0x56d9, 0x2009, 0x000d, 0x7030, 0x200a, 0x2091, + 0x4080, 0x700b, 0x0000, 0x7004, 0xa086, 0x0006, 0x1110, 0x7007, + 0x0001, 0x012e, 0x0005, 0x2071, 0xb714, 0x080c, 0x5827, 0x0518, + 0x2071, 0xb835, 0x7084, 0x700a, 0x20a9, 0x0020, 0x2099, 0xb836, + 0x20a1, 0xb85d, 0x53a3, 0x7087, 0x0000, 0x2071, 0xb714, 0x2069, + 0xb87d, 0x706c, 0x6826, 0x7070, 0x682a, 0x7074, 0x682e, 0x7078, + 0x6832, 0x2d10, 0x080c, 0x1648, 0x7007, 0x0008, 0x2001, 0xffff, + 0x2071, 0xb8f4, 0x703a, 0x012e, 0x0804, 0x56c0, 0x2069, 0xb87d, + 0x6808, 0xa08e, 0x0000, 0x0904, 0x575b, 0xa08e, 0x0200, 0x0904, + 0x5759, 0xa08e, 0x0100, 0x1904, 0x575b, 0x0126, 0x2091, 0x8000, + 0x0e04, 0x5757, 0x2069, 0x0000, 0x6818, 0xd084, 0x15c0, 0x702c, + 0x7130, 0x8108, 0xa102, 0x0230, 0xa00e, 0x7034, 0x706e, 0x7038, + 0x7072, 0x0048, 0x706c, 0xa080, 0x0040, 0x706e, 0x1220, 0x7070, + 0xa081, 0x0000, 0x7072, 0x7132, 0x6936, 0x700b, 0x0000, 0x2001, + 0xb85a, 0x2004, 0xa005, 0x1190, 0x6934, 0x2069, 0xb835, 0x689c, + 0x699e, 0x2069, 0xb8f4, 0xa102, 0x1118, 0x683c, 0xa005, 0x1368, + 0x2001, 0xb85b, 0x200c, 0x810d, 0x693e, 0x0038, 0x2009, 0x8040, + 0x6922, 0x681b, 0x0001, 0x2091, 0x4080, 0x7007, 0x0001, 0x012e, + 0x0010, 0x7007, 0x0005, 0x0005, 0x2001, 0xb87f, 0x2004, 0xa08e, + 0x0100, 0x1128, 0x7007, 0x0001, 0x080c, 0x5815, 0x0005, 0xa08e, + 0x0000, 0x0de0, 0xa08e, 0x0200, 0x1dc8, 0x7007, 0x0005, 0x0005, + 0x701c, 0xa06d, 0x0158, 0x080c, 0x5827, 0x0140, 0x7007, 0x0003, + 0x080c, 0x5840, 0x7050, 0xa086, 0x0100, 0x0110, 0x0005, 0x0005, + 0x7050, 0xa09e, 0x0100, 0x1118, 0x7007, 0x0004, 0x0030, 0xa086, + 0x0200, 0x1110, 0x7007, 0x0005, 0x0005, 0x080c, 0x57e3, 0x7006, + 0x080c, 0x5815, 0x0005, 0x0005, 0x00e6, 0x0156, 0x2071, 0xb835, + 0x7184, 0x81ff, 0x0500, 0xa006, 0x7086, 0xae80, 0x0003, 0x2071, + 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, 0x0f04, 0x57b8, 0x2014, + 0x722a, 0x8000, 0x0f04, 0x57b8, 0x2014, 0x722e, 0x8000, 0x0f04, + 0x57b8, 0x2014, 0x723a, 0x8000, 0x0f04, 0x57b8, 0x2014, 0x723e, + 0xa180, 0x8030, 0x7022, 0x015e, 0x00ee, 0x0005, 0x00e6, 0x0156, + 0x2071, 0xb835, 0x7184, 0x81ff, 0x01d8, 0xa006, 0x7086, 0xae80, + 0x0003, 0x2071, 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, 0x2014, + 0x722a, 0x8000, 0x0f04, 0x57da, 0x2014, 0x723a, 0x8000, 0x2014, + 0x723e, 0x0018, 0x2001, 0x8020, 0x0010, 0x2001, 0x8042, 0x7022, + 0x015e, 0x00ee, 0x0005, 0x702c, 0x7130, 0x8108, 0xa102, 0x0230, + 0xa00e, 0x7034, 0x706e, 0x7038, 0x7072, 0x0048, 0x706c, 0xa080, + 0x0040, 0x706e, 0x1220, 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, + 0x700c, 0x8001, 0x700e, 0x1180, 0x0126, 0x2091, 0x8000, 0x0e04, + 0x580f, 0x2001, 0x000d, 0x2102, 0x2091, 0x4080, 0x2001, 0x0001, + 0x700b, 0x0000, 0x012e, 0x0005, 0x2001, 0x0007, 0x0005, 0x2001, + 0x0006, 0x700b, 0x0001, 0x012e, 0x0005, 0x701c, 0xa06d, 0x0170, + 0x0126, 0x2091, 0x8000, 0x7010, 0x8001, 0x7012, 0x2d04, 0x701e, + 0xa005, 0x1108, 0x701a, 0x012e, 0x080c, 0x1614, 0x0005, 0x2019, + 0x000d, 0x2304, 0x230c, 0xa10e, 0x0130, 0x2304, 0x230c, 0xa10e, + 0x0110, 0xa006, 0x0060, 0x732c, 0x8319, 0x7130, 0xa102, 0x1118, + 0x2300, 0xa005, 0x0020, 0x0210, 0xa302, 0x0008, 0x8002, 0x0005, + 0x2d00, 0x7026, 0xa080, 0x000d, 0x7056, 0x7053, 0x0000, 0x0126, + 0x2091, 0x8000, 0x2009, 0xb913, 0x2104, 0xc08d, 0x200a, 0x012e, + 0x080c, 0x1664, 0x0005, 0x708c, 0xa08a, 0x0029, 0x1220, 0xa082, + 0x001d, 0x0033, 0x0010, 0x080c, 0x151a, 0x6027, 0x1e00, 0x0005, + 0x594e, 0x58c9, 0x58e1, 0x591e, 0x593f, 0x5979, 0x598b, 0x58e1, + 0x5965, 0x586d, 0x589b, 0x586c, 0x0005, 0x00d6, 0x2069, 0x0200, + 0x6804, 0xa005, 0x1180, 0x6808, 0xa005, 0x1518, 0x708f, 0x0028, + 0x2069, 0xb8c6, 0x2d04, 0x7002, 0x080c, 0x5c43, 0x6028, 0xa085, + 0x0600, 0x602a, 0x00b0, 0x708f, 0x0028, 0x2069, 0xb8c6, 0x2d04, + 0x7002, 0x6028, 0xa085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, + 0x0056, 0x2071, 0xb924, 0x080c, 0x1e1a, 0x005e, 0x004e, 0x003e, + 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0xa005, + 0x1180, 0x6808, 0xa005, 0x1518, 0x708f, 0x0028, 0x2069, 0xb8c6, + 0x2d04, 0x7002, 0x080c, 0x5cd0, 0x6028, 0xa085, 0x0600, 0x602a, + 0x00b0, 0x708f, 0x0028, 0x2069, 0xb8c6, 0x2d04, 0x7002, 0x6028, + 0xa085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, + 0xb924, 0x080c, 0x1e1a, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, + 0x0005, 0x6803, 0x0090, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x59f6, + 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x708f, 0x0020, + 0x080c, 0x59f6, 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x001f, + 0x0005, 0x6803, 0x0088, 0x6124, 0xd1cc, 0x1590, 0xd1dc, 0x1568, + 0xd1e4, 0x1540, 0xa184, 0x1e00, 0x1580, 0x60e3, 0x0001, 0x600c, + 0xc0b4, 0x600e, 0x080c, 0x5b71, 0x080c, 0x24e5, 0x0156, 0x6803, + 0x0100, 0x20a9, 0x0014, 0x6804, 0xd0dc, 0x1118, 0x1f04, 0x58fb, + 0x0048, 0x20a9, 0x0014, 0x6803, 0x0080, 0x6804, 0xd0d4, 0x1130, + 0x1f04, 0x5905, 0x080c, 0x5b92, 0x015e, 0x0078, 0x015e, 0x708f, + 0x0028, 0x0058, 0x708f, 0x001e, 0x0040, 0x708f, 0x001d, 0x0028, + 0x708f, 0x0020, 0x0010, 0x708f, 0x001f, 0x0005, 0x60e3, 0x0001, + 0x600c, 0xc0b4, 0x600e, 0x080c, 0x5b71, 0x080c, 0x24e5, 0x6803, + 0x0080, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, + 0xa184, 0x1e00, 0x1158, 0x708f, 0x0028, 0x0040, 0x708f, 0x001e, + 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x001f, 0x0005, 0x6803, + 0x00a0, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1e63, + 0x708f, 0x001e, 0x0010, 0x708f, 0x001d, 0x0005, 0x080c, 0x5a68, + 0x6124, 0xd1dc, 0x1188, 0x080c, 0x59f6, 0x0016, 0x080c, 0x1e63, + 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x708f, 0x001e, 0x0020, + 0x708f, 0x001f, 0x080c, 0x59f6, 0x0005, 0x6803, 0x00a0, 0x6124, + 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, + 0x708f, 0x001e, 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x0021, + 0x0005, 0x080c, 0x5a68, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, + 0xd1e4, 0x0140, 0x708f, 0x001e, 0x0028, 0x708f, 0x001d, 0x0010, + 0x708f, 0x001f, 0x0005, 0x6803, 0x0090, 0x6124, 0xd1d4, 0x1178, + 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x708f, 0x001e, + 0x0040, 0x708f, 0x001d, 0x0028, 0x708f, 0x0020, 0x0010, 0x708f, + 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, + 0x0100, 0x2069, 0x0140, 0x2071, 0xb600, 0x2091, 0x8000, 0x080c, + 0x5b41, 0x11e8, 0x2001, 0xb60c, 0x200c, 0xd1b4, 0x01c0, 0xc1b4, + 0x2102, 0x6027, 0x0200, 0xe000, 0xe000, 0x6024, 0xd0cc, 0x0158, + 0x6803, 0x00a0, 0x2001, 0xb89f, 0x2003, 0x0001, 0x2001, 0xb600, + 0x2003, 0x0001, 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, + 0x5b5d, 0x0150, 0x080c, 0x5b53, 0x1138, 0x2001, 0x0001, 0x080c, + 0x27f8, 0x080c, 0x5b18, 0x00a0, 0x080c, 0x5a65, 0x0178, 0x2001, + 0x0001, 0x080c, 0x27f8, 0x708c, 0xa086, 0x001e, 0x0120, 0x708c, + 0xa086, 0x0022, 0x1118, 0x708f, 0x0025, 0x0010, 0x708f, 0x0021, + 0x012e, 0x00ee, 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, + 0x5a07, 0x080c, 0x6ace, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, + 0x2011, 0x5a07, 0x080c, 0x6ac5, 0x002e, 0x001e, 0x0005, 0x00e6, + 0x00f6, 0x0016, 0x080c, 0x7df3, 0x2071, 0xb600, 0x080c, 0x59a2, + 0x001e, 0x00fe, 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, + 0x00d6, 0x00e6, 0x00f6, 0x0126, 0x080c, 0x7df3, 0x2061, 0x0100, + 0x2069, 0x0140, 0x2071, 0xb600, 0x2091, 0x8000, 0x6028, 0xc09c, + 0x602a, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, + 0x8106, 0x080c, 0x7fe0, 0x080c, 0x6a82, 0x0036, 0x2019, 0x0000, + 0x080c, 0x806b, 0x003e, 0x60e3, 0x0000, 0x080c, 0xb4eb, 0x080c, + 0xb506, 0x2001, 0xb600, 0x2003, 0x0004, 0x6027, 0x0008, 0x080c, + 0x12e2, 0x2001, 0x0001, 0x080c, 0x27f8, 0x012e, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x2001, 0xb600, + 0x2004, 0xa086, 0x0004, 0x0140, 0x2001, 0xb89e, 0x2003, 0xaaaa, + 0x2001, 0xb89f, 0x2003, 0x0000, 0x0005, 0x6020, 0xd09c, 0x0005, + 0x6800, 0xa086, 0x00c0, 0x0160, 0x6803, 0x00c0, 0x0156, 0x20a9, + 0x002d, 0x1d04, 0x5a71, 0x2091, 0x6000, 0x1f04, 0x5a71, 0x015e, + 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, + 0x2071, 0xb600, 0x2001, 0xb89f, 0x200c, 0xa186, 0x0000, 0x0158, + 0xa186, 0x0001, 0x0158, 0xa186, 0x0002, 0x0158, 0xa186, 0x0003, + 0x0158, 0x0804, 0x5b06, 0x708f, 0x0022, 0x0040, 0x708f, 0x0021, + 0x0028, 0x708f, 0x0023, 0x0020, 0x708f, 0x0024, 0x6043, 0x0000, + 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28a7, + 0x0026, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, + 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, 0x0000, 0x080c, 0x806b, + 0x003e, 0x002e, 0x7000, 0xa08e, 0x0004, 0x0118, 0x602b, 0x0028, + 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, + 0x0005, 0x6024, 0xd0ac, 0x0120, 0x012e, 0x015e, 0x0804, 0x5b14, + 0x6800, 0xa084, 0x00a0, 0xc0bd, 0x6802, 0x6904, 0xd1d4, 0x1130, + 0x6803, 0x0100, 0x1f04, 0x5ac9, 0x080c, 0x5b92, 0x012e, 0x015e, + 0x080c, 0x5b53, 0x01a8, 0x6044, 0xa005, 0x0168, 0x6050, 0x0006, + 0xa085, 0x0020, 0x6052, 0x080c, 0x5b92, 0xa006, 0x8001, 0x1df0, + 0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x5b92, + 0x0016, 0x0026, 0x2009, 0x00c8, 0x2011, 0x5a14, 0x080c, 0x6a94, + 0x002e, 0x001e, 0x2001, 0xb89f, 0x2003, 0x0004, 0x080c, 0x5853, + 0x080c, 0x5b53, 0x0148, 0x6804, 0xd0d4, 0x1130, 0xd0dc, 0x1100, + 0x2001, 0xb89f, 0x2003, 0x0000, 0x00ee, 0x00de, 0x00ce, 0x0005, + 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, + 0xb600, 0x2001, 0xb89e, 0x2003, 0x0000, 0x2001, 0xb88f, 0x2003, + 0x0000, 0x708f, 0x0000, 0x60e3, 0x0000, 0x6887, 0x0000, 0x2001, + 0x0000, 0x080c, 0x28a7, 0x6803, 0x0000, 0x6043, 0x0090, 0x6043, + 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, + 0x0005, 0x0006, 0x2001, 0xb89e, 0x2004, 0xa086, 0xaaaa, 0x000e, + 0x0005, 0x0006, 0x2001, 0xb672, 0x2004, 0xa084, 0x0030, 0xa086, + 0x0000, 0x000e, 0x0005, 0x0006, 0x2001, 0xb672, 0x2004, 0xa084, + 0x0030, 0xa086, 0x0030, 0x000e, 0x0005, 0x0006, 0x2001, 0xb672, + 0x2004, 0xa084, 0x0030, 0xa086, 0x0010, 0x000e, 0x0005, 0x0006, + 0x2001, 0xb672, 0x2004, 0xa084, 0x0030, 0xa086, 0x0020, 0x000e, + 0x0005, 0x2001, 0xb60c, 0x2004, 0xd0a4, 0x0170, 0x080c, 0x28c7, + 0x0036, 0x0016, 0x2009, 0x0000, 0x2019, 0x0028, 0x080c, 0x2ca4, + 0x001e, 0x003e, 0xa006, 0x0009, 0x0005, 0x00e6, 0x2071, 0xb60c, + 0x2e04, 0x0118, 0xa085, 0x0010, 0x0010, 0xa084, 0xffef, 0x2072, + 0x00ee, 0x0005, 0x6050, 0x0006, 0x60f0, 0x0006, 0x60ec, 0x0006, + 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x602f, 0x0100, + 0x602f, 0x0000, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, + 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x000e, 0x60f2, + 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28a7, + 0x6800, 0xa084, 0x00a0, 0xc0bd, 0x6802, 0x6803, 0x00a0, 0x000e, + 0x6052, 0x6050, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0xb600, + 0x6020, 0xa084, 0x0080, 0x0138, 0x2001, 0xb60c, 0x200c, 0xc1bd, + 0x2102, 0x0804, 0x5c3b, 0x2001, 0xb60c, 0x200c, 0xc1bc, 0x2102, + 0x6028, 0xa084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x6803, 0x0090, + 0x20a9, 0x0384, 0x6024, 0xd0cc, 0x1508, 0x1d04, 0x5bea, 0x2091, + 0x6000, 0x1f04, 0x5bea, 0x2011, 0x0003, 0x080c, 0x80fc, 0x2011, + 0x0002, 0x080c, 0x8106, 0x080c, 0x7fe0, 0x2019, 0x0000, 0x080c, + 0x806b, 0x6803, 0x00a0, 0x2001, 0xb89f, 0x2003, 0x0001, 0x2001, + 0xb600, 0x2003, 0x0001, 0xa085, 0x0001, 0x0468, 0x86ff, 0x1120, + 0x080c, 0x1e63, 0x080c, 0x24e5, 0x60e3, 0x0000, 0x2001, 0xb88f, + 0x2004, 0x080c, 0x28a7, 0x60e2, 0x6803, 0x0080, 0x20a9, 0x0384, + 0x6027, 0x1e00, 0x2009, 0x1e00, 0xe000, 0x6024, 0xa10c, 0x0138, + 0x1d04, 0x5c20, 0x2091, 0x6000, 0x1f04, 0x5c20, 0x0820, 0x6028, + 0xa085, 0x1e00, 0x602a, 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, + 0x0008, 0x6886, 0xa006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, + 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0xb600, 0x2069, 0x0140, + 0x6020, 0xa084, 0x00c0, 0x0120, 0x6884, 0xa005, 0x1904, 0x5c97, + 0x6803, 0x0088, 0x60e3, 0x0000, 0x6887, 0x0000, 0x2001, 0x0000, + 0x080c, 0x28a7, 0x2069, 0x0200, 0x6804, 0xa005, 0x1118, 0x6808, + 0xa005, 0x01c0, 0x6028, 0xa084, 0xfbff, 0x602a, 0x6027, 0x0400, + 0x2069, 0xb8c6, 0x7000, 0x206a, 0x708f, 0x0026, 0x7003, 0x0001, + 0x20a9, 0x0002, 0x1d04, 0x5c7a, 0x2091, 0x6000, 0x1f04, 0x5c7a, + 0x0804, 0x5cc8, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, 0x1e00, + 0x2009, 0x1e00, 0xe000, 0x6024, 0xa10c, 0x0520, 0xa084, 0x1a00, + 0x1508, 0x1d04, 0x5c86, 0x2091, 0x6000, 0x1f04, 0x5c86, 0x2011, + 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, 0x8106, 0x080c, + 0x7fe0, 0x2019, 0x0000, 0x080c, 0x806b, 0x6803, 0x00a0, 0x2001, + 0xb89f, 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0xa085, + 0x0001, 0x00b0, 0x080c, 0x24e5, 0x6803, 0x0080, 0x2069, 0x0140, + 0x60e3, 0x0000, 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, 0x0008, + 0x6886, 0x2001, 0xb88f, 0x2004, 0x080c, 0x28a7, 0x60e2, 0xa006, + 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, + 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, + 0x0100, 0x2071, 0xb600, 0x6020, 0xa084, 0x00c0, 0x01e0, 0x2011, + 0x0003, 0x080c, 0x80fc, 0x2011, 0x0002, 0x080c, 0x8106, 0x080c, + 0x7fe0, 0x2019, 0x0000, 0x080c, 0x806b, 0x2069, 0x0140, 0x6803, + 0x00a0, 0x2001, 0xb89f, 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, + 0x0001, 0x0804, 0x5d6d, 0x2001, 0xb60c, 0x200c, 0xd1b4, 0x1160, + 0xc1b5, 0x2102, 0x080c, 0x59fc, 0x2069, 0x0140, 0x080c, 0x24e5, + 0x6803, 0x0080, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0xa005, + 0x1118, 0x6808, 0xa005, 0x01c0, 0x6028, 0xa084, 0xfdff, 0x602a, + 0x6027, 0x0200, 0x2069, 0xb8c6, 0x7000, 0x206a, 0x708f, 0x0027, + 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x5d24, 0x2091, 0x6000, + 0x1f04, 0x5d24, 0x0804, 0x5d6d, 0x6027, 0x1e00, 0x2009, 0x1e00, + 0xe000, 0x6024, 0xa10c, 0x01c8, 0xa084, 0x1c00, 0x11b0, 0x1d04, + 0x5d2c, 0x0006, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x696b, + 0x00ee, 0x00de, 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0xb8f4, + 0x7018, 0x00ee, 0xa005, 0x1d00, 0x0500, 0x0026, 0x2011, 0x5a14, + 0x080c, 0x6a0e, 0x2011, 0x5a07, 0x080c, 0x6ace, 0x002e, 0x2069, + 0x0140, 0x60e3, 0x0000, 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, + 0x0008, 0x6886, 0x2001, 0xb88f, 0x2004, 0x080c, 0x28a7, 0x60e2, + 0x2001, 0xb60c, 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, + 0x0036, 0x0046, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0xb600, + 0x7130, 0xd184, 0x1180, 0x2011, 0xb653, 0x2214, 0xd2ec, 0x0138, + 0xc18d, 0x7132, 0x2011, 0xb653, 0x2214, 0xd2ac, 0x1120, 0x7030, + 0xd08c, 0x0904, 0x5dda, 0x7130, 0xc185, 0x7132, 0x2011, 0xb653, + 0x220c, 0xd1a4, 0x0530, 0x0016, 0x2019, 0x000e, 0x080c, 0xb121, + 0x0156, 0x20a9, 0x007f, 0x2009, 0x0000, 0xa186, 0x007e, 0x01a0, + 0xa186, 0x0080, 0x0188, 0x080c, 0x501b, 0x1170, 0x8127, 0xa006, + 0x0016, 0x2009, 0x000e, 0x080c, 0xb1a4, 0x2009, 0x0001, 0x2011, + 0x0100, 0x080c, 0x6b8c, 0x001e, 0x8108, 0x1f04, 0x5da5, 0x015e, + 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0000, 0x2019, 0x0004, + 0x080c, 0x2ca4, 0x001e, 0x0070, 0x0156, 0x20a9, 0x007f, 0x2009, + 0x0000, 0x080c, 0x501b, 0x1110, 0x080c, 0x4c7e, 0x8108, 0x1f04, + 0x5dd1, 0x015e, 0x080c, 0x1e63, 0x2011, 0x0003, 0x080c, 0x80fc, + 0x2011, 0x0002, 0x080c, 0x8106, 0x080c, 0x7fe0, 0x0036, 0x2019, + 0x0000, 0x080c, 0x806b, 0x003e, 0x60e3, 0x0000, 0x2001, 0xb600, + 0x2003, 0x0001, 0x080c, 0x5a79, 0x00ee, 0x00ce, 0x004e, 0x003e, + 0x002e, 0x001e, 0x015e, 0x0005, 0x2071, 0xb6e2, 0x7003, 0x0000, + 0x7007, 0x0000, 0x700f, 0x0000, 0x702b, 0x0001, 0x704f, 0x0000, + 0x7053, 0x0001, 0x705f, 0x0020, 0x7063, 0x0040, 0x7083, 0x0000, + 0x708b, 0x0000, 0x708f, 0x0001, 0x70bf, 0x0000, 0x0005, 0x00e6, + 0x2071, 0xb6e2, 0x6848, 0xa005, 0x1130, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0428, 0x6a50, 0x7236, 0x6b54, 0x733a, 0x6858, + 0x703e, 0x707a, 0x685c, 0x7042, 0x707e, 0x6848, 0x702e, 0x6840, + 0x7032, 0x2009, 0x000c, 0x200a, 0x8007, 0x8006, 0x8006, 0xa08c, + 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, 0xa319, 0x7272, 0x7376, + 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700f, 0x0000, 0xa006, + 0x00ee, 0x0005, 0x2b78, 0x2071, 0xb6e2, 0x7004, 0x0043, 0x700c, + 0x0002, 0x5e56, 0x5e4d, 0x5e4d, 0x5e4d, 0x5e4d, 0x0005, 0x5eac, + 0x5ead, 0x5edf, 0x5ee0, 0x5eaa, 0x5f2e, 0x5f33, 0x5f64, 0x5f65, + 0x5f80, 0x5f81, 0x5f82, 0x5f83, 0x5f84, 0x5f85, 0x603b, 0x6062, + 0x700c, 0x0002, 0x5e6f, 0x5eaa, 0x5eaa, 0x5eab, 0x5eab, 0x7830, + 0x7930, 0xa106, 0x0120, 0x7830, 0x7930, 0xa106, 0x1510, 0x7030, + 0xa10a, 0x01f8, 0x1210, 0x712c, 0xa10a, 0xa18a, 0x0002, 0x12d0, + 0x080c, 0x15e4, 0x01b0, 0x2d00, 0x705a, 0x7063, 0x0040, 0x2001, + 0x0003, 0x7057, 0x0000, 0x0126, 0x0006, 0x2091, 0x8000, 0x2009, + 0xb913, 0x2104, 0xc085, 0x200a, 0x000e, 0x700e, 0x012e, 0x080c, + 0x1664, 0x0005, 0x080c, 0x15e4, 0x0de0, 0x2d00, 0x705a, 0x080c, + 0x15e4, 0x1108, 0x0c10, 0x2d00, 0x7086, 0x7063, 0x0080, 0x2001, + 0x0004, 0x08f8, 0x0005, 0x0005, 0x0005, 0x700c, 0x0002, 0x5eb4, + 0x5eb7, 0x5ec5, 0x5ede, 0x5ede, 0x080c, 0x5e68, 0x0005, 0x0126, + 0x8001, 0x700e, 0x7058, 0x0006, 0x080c, 0x63b5, 0x0120, 0x2091, + 0x8000, 0x080c, 0x5e68, 0x00de, 0x0048, 0x0126, 0x8001, 0x700e, + 0x080c, 0x63b5, 0x7058, 0x2068, 0x7084, 0x705a, 0x6803, 0x0000, + 0x6807, 0x0000, 0x6834, 0xa084, 0x00ff, 0xa08a, 0x003a, 0x1218, + 0x00db, 0x012e, 0x0005, 0x012e, 0x080c, 0x5f86, 0x0005, 0x0005, + 0x0005, 0x00e6, 0x2071, 0xb6e2, 0x700c, 0x0002, 0x5eeb, 0x5eeb, + 0x5eeb, 0x5eed, 0x5ef0, 0x00ee, 0x0005, 0x700f, 0x0001, 0x0010, + 0x700f, 0x0002, 0x00ee, 0x0005, 0x5f86, 0x5f86, 0x5fa2, 0x5f86, + 0x611f, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5fa2, 0x6161, + 0x61a4, 0x61ed, 0x6201, 0x5f86, 0x5f86, 0x5fbe, 0x5fa2, 0x5f86, + 0x5f86, 0x6018, 0x62ad, 0x62c8, 0x5f86, 0x5fbe, 0x5f86, 0x5f86, + 0x5f86, 0x5f86, 0x600e, 0x62c8, 0x5f86, 0x5f86, 0x5f86, 0x5f86, + 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5fd2, 0x5f86, 0x5f86, + 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x63d3, + 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5f86, 0x5fe7, 0x7020, 0x2068, + 0x080c, 0x1614, 0x0005, 0x700c, 0x0002, 0x5f3a, 0x5f3d, 0x5f4b, + 0x5f63, 0x5f63, 0x080c, 0x5e68, 0x0005, 0x0126, 0x8001, 0x700e, + 0x7058, 0x0006, 0x080c, 0x63b5, 0x0120, 0x2091, 0x8000, 0x080c, + 0x5e68, 0x00de, 0x0048, 0x0126, 0x8001, 0x700e, 0x080c, 0x63b5, + 0x7058, 0x2068, 0x7084, 0x705a, 0x6803, 0x0000, 0x6807, 0x0000, + 0x6834, 0xa084, 0x00ff, 0xa08a, 0x001a, 0x1218, 0x003b, 0x012e, + 0x0005, 0x012e, 0x0419, 0x0005, 0x0005, 0x0005, 0x5f86, 0x5fa2, + 0x610b, 0x5f86, 0x5fa2, 0x5f86, 0x5fa2, 0x5fa2, 0x5f86, 0x5fa2, + 0x610b, 0x5fa2, 0x5fa2, 0x5fa2, 0x5fa2, 0x5fa2, 0x5f86, 0x5fa2, + 0x610b, 0x5f86, 0x5f86, 0x5fa2, 0x5f86, 0x5f86, 0x5f86, 0x5fa2, + 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x7007, 0x0001, + 0x6838, 0xa084, 0x00ff, 0xc0d5, 0x683a, 0x0126, 0x2091, 0x8000, + 0x080c, 0x547a, 0x012e, 0x0005, 0x7007, 0x0001, 0x6838, 0xa084, + 0x00ff, 0xc0e5, 0x683a, 0x0126, 0x2091, 0x8000, 0x080c, 0x547a, + 0x012e, 0x0005, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0ed, + 0x683a, 0x0126, 0x2091, 0x8000, 0x080c, 0x547a, 0x012e, 0x0005, + 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0dd, 0x683a, 0x0126, + 0x2091, 0x8000, 0x080c, 0x547a, 0x012e, 0x0005, 0x6834, 0x8007, + 0xa084, 0x00ff, 0x0988, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, + 0x60cb, 0x7007, 0x0006, 0x7012, 0x2d00, 0x7016, 0x701a, 0x704b, + 0x60cb, 0x0005, 0x6834, 0x8007, 0xa084, 0x00ff, 0x0904, 0x5f94, + 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x60e8, 0x7007, 0x0006, + 0x7012, 0x2d00, 0x7016, 0x701a, 0x704b, 0x60e8, 0x0005, 0x6834, + 0x8007, 0xa084, 0x00ff, 0xa086, 0x0001, 0x1904, 0x5f94, 0x7007, + 0x0001, 0x2009, 0xb631, 0x210c, 0x81ff, 0x11a8, 0x6838, 0xa084, + 0x00ff, 0x683a, 0x6853, 0x0000, 0x080c, 0x4df4, 0x1108, 0x0005, + 0x0126, 0x2091, 0x8000, 0x6837, 0x0139, 0x684a, 0x6952, 0x080c, + 0x547a, 0x012e, 0x0ca0, 0x2001, 0x0028, 0x0c90, 0x684c, 0xa084, + 0x00c0, 0xa086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x62e0, + 0x2d00, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa080, 0x0024, 0x2098, + 0x20a1, 0xb70d, 0x53a3, 0x6858, 0x7012, 0xa082, 0x0401, 0x1a04, + 0x5fb0, 0x6a84, 0xa28a, 0x0002, 0x1a04, 0x5fb0, 0x82ff, 0x1138, + 0x6888, 0x698c, 0xa105, 0x0118, 0x2001, 0x609e, 0x0018, 0xa280, + 0x6094, 0x2005, 0x70c6, 0x7010, 0xa015, 0x0904, 0x6080, 0x080c, + 0x15e4, 0x1118, 0x7007, 0x000f, 0x0005, 0x2d00, 0x7022, 0x70c4, + 0x2060, 0x2c05, 0x6836, 0xe004, 0xad00, 0x7096, 0xe008, 0xa20a, + 0x1210, 0xa00e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0xa296, + 0x0004, 0x0108, 0xa108, 0x719a, 0x810b, 0x719e, 0xae90, 0x0022, + 0x080c, 0x1648, 0x7090, 0xa08e, 0x0100, 0x0170, 0xa086, 0x0200, + 0x0118, 0x7007, 0x0010, 0x0005, 0x7020, 0x2068, 0x080c, 0x1614, + 0x7014, 0x2068, 0x0804, 0x5fb0, 0x7020, 0x2068, 0x7018, 0x6802, + 0x6807, 0x0000, 0x2d08, 0x2068, 0x6906, 0x711a, 0x0804, 0x603b, + 0x7014, 0x2068, 0x7007, 0x0001, 0x6884, 0xa005, 0x1128, 0x6888, + 0x698c, 0xa105, 0x0108, 0x00b1, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x0904, 0x62e0, 0x04b8, 0x6096, 0x609a, 0x0002, 0x0011, + 0x0007, 0x0004, 0x000a, 0x000f, 0x0005, 0x0006, 0x000a, 0x0011, + 0x0005, 0x0004, 0x00f6, 0x00e6, 0x00c6, 0x0076, 0x0066, 0x6f88, + 0x6e8c, 0x6804, 0x2060, 0xacf0, 0x0021, 0xacf8, 0x0027, 0x2009, + 0x0005, 0x700c, 0x7816, 0x7008, 0x7812, 0x7004, 0x7806, 0x7000, + 0x7802, 0x7e0e, 0x7f0a, 0x8109, 0x0128, 0xaef2, 0x0004, 0xaffa, + 0x0006, 0x0c78, 0x6004, 0xa065, 0x1d30, 0x006e, 0x007e, 0x00ce, + 0x00ee, 0x00fe, 0x0005, 0x2009, 0xb631, 0x210c, 0x81ff, 0x1198, + 0x6838, 0xa084, 0x00ff, 0x683a, 0x080c, 0x4cd7, 0x1108, 0x0005, + 0x080c, 0x554d, 0x0126, 0x2091, 0x8000, 0x080c, 0x9f88, 0x080c, + 0x547a, 0x012e, 0x0ca0, 0x2001, 0x0028, 0x2009, 0x0000, 0x0c80, + 0x2009, 0xb631, 0x210c, 0x81ff, 0x11b0, 0x6858, 0xa005, 0x01c0, + 0x6838, 0xa084, 0x00ff, 0x683a, 0x6853, 0x0000, 0x080c, 0x4d98, + 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0x684a, 0x6952, 0x080c, + 0x547a, 0x012e, 0x0cb0, 0x2001, 0x0028, 0x2009, 0x0000, 0x0c90, + 0x2001, 0x0000, 0x0c78, 0x7018, 0x6802, 0x2d08, 0x2068, 0x6906, + 0x711a, 0x7010, 0x8001, 0x7012, 0x0118, 0x7007, 0x0006, 0x0030, + 0x7014, 0x2068, 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x7007, + 0x0001, 0x6944, 0x810f, 0xa18c, 0x00ff, 0x6848, 0xa084, 0x00ff, + 0x20a9, 0x0001, 0xa096, 0x0001, 0x01b0, 0x2009, 0x0000, 0x20a9, + 0x00ff, 0xa096, 0x0002, 0x0178, 0xa005, 0x11f0, 0x6944, 0x810f, + 0xa18c, 0x00ff, 0x080c, 0x501b, 0x11b8, 0x0066, 0x6e50, 0x080c, + 0x511a, 0x006e, 0x0088, 0x0046, 0x2011, 0xb60c, 0x2224, 0xc484, + 0x2412, 0x004e, 0x00c6, 0x080c, 0x501b, 0x1110, 0x080c, 0x527b, + 0x8108, 0x1f04, 0x614b, 0x00ce, 0x684c, 0xd084, 0x1118, 0x080c, + 0x1614, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x547a, 0x012e, + 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2001, 0xb653, + 0x2004, 0xd0a4, 0x0580, 0x2061, 0xb975, 0x6100, 0xd184, 0x0178, + 0x6858, 0xa084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, + 0xa005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, + 0x0001, 0x6860, 0xa005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, + 0x6858, 0xa084, 0x00ff, 0x0178, 0x6006, 0x6858, 0x8007, 0xa084, + 0x00ff, 0x0148, 0x600a, 0x6858, 0x8000, 0x1108, 0xc28d, 0x6202, + 0x012e, 0x0804, 0x63a4, 0x012e, 0x0804, 0x639e, 0x012e, 0x0804, + 0x6398, 0x012e, 0x0804, 0x639b, 0x0126, 0x2091, 0x8000, 0x7007, + 0x0001, 0x2001, 0xb653, 0x2004, 0xd0a4, 0x05e0, 0x2061, 0xb975, + 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0x6c48, + 0xa484, 0x0003, 0x0170, 0x6958, 0xa18c, 0x00ff, 0x8001, 0x1120, + 0x2100, 0xa210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0xa212, + 0x02f0, 0xa484, 0x000c, 0x0188, 0x6958, 0x810f, 0xa18c, 0x00ff, + 0xa082, 0x0004, 0x1120, 0x2100, 0xa318, 0x0288, 0x0030, 0xa082, + 0x0004, 0x1168, 0x2100, 0xa31a, 0x0250, 0x6860, 0xa005, 0x0110, + 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x63a4, 0x012e, + 0x0804, 0x63a1, 0x012e, 0x0804, 0x639e, 0x0126, 0x2091, 0x8000, + 0x7007, 0x0001, 0x2061, 0xb975, 0x6300, 0xd38c, 0x1120, 0x6308, + 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x63b2, 0x012e, 0x0804, + 0x63a1, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0x684c, + 0xd0ac, 0x0148, 0x00c6, 0x2061, 0xb975, 0x6000, 0xa084, 0xfcff, + 0x6002, 0x00ce, 0x0448, 0x6858, 0xa005, 0x05d0, 0x685c, 0xa065, + 0x0598, 0x2001, 0xb631, 0x2004, 0xa005, 0x0118, 0x080c, 0x9ed9, + 0x0068, 0x6013, 0x0400, 0x6057, 0x0000, 0x694c, 0xd1a4, 0x0110, + 0x6950, 0x6156, 0x2009, 0x0041, 0x080c, 0x86d3, 0x6958, 0xa18c, + 0xff00, 0xa186, 0x2000, 0x1140, 0x0026, 0x2009, 0x0000, 0x2011, + 0xfdff, 0x080c, 0x6b8c, 0x002e, 0x684c, 0xd0c4, 0x0148, 0x2061, + 0xb975, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, + 0x00ce, 0x012e, 0x0804, 0x63a4, 0x00ce, 0x012e, 0x0804, 0x639e, + 0x6954, 0xa186, 0x002e, 0x0d40, 0xa186, 0x002d, 0x0d28, 0xa186, + 0x0045, 0x0528, 0xa186, 0x002a, 0x1130, 0x2001, 0xb60c, 0x200c, + 0xc194, 0x2102, 0x08c8, 0xa186, 0x0020, 0x0170, 0xa186, 0x0029, + 0x1d18, 0x6944, 0xa18c, 0xff00, 0x810f, 0x080c, 0x501b, 0x1960, + 0x6000, 0xc0e4, 0x6002, 0x0840, 0x685c, 0xa065, 0x09a8, 0x6007, + 0x0024, 0x2001, 0xb8b6, 0x2004, 0x6016, 0x0804, 0x623c, 0x685c, + 0xa065, 0x0950, 0x00e6, 0x6860, 0xa075, 0x2001, 0xb631, 0x2004, + 0xa005, 0x0150, 0x080c, 0x9ed9, 0x8eff, 0x0118, 0x2e60, 0x080c, + 0x9ed9, 0x00ee, 0x0804, 0x623c, 0x6020, 0xc0dc, 0xc0d5, 0x6022, + 0x2e60, 0x6007, 0x003a, 0x6870, 0xa005, 0x0130, 0x6007, 0x003b, + 0x6874, 0x602a, 0x6878, 0x6012, 0x6003, 0x0001, 0x080c, 0x6cff, + 0x080c, 0x71e5, 0x00ee, 0x0804, 0x623c, 0x2061, 0xb975, 0x6000, + 0xd084, 0x0190, 0xd08c, 0x1904, 0x63b2, 0x0126, 0x2091, 0x8000, + 0x6204, 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x63b2, 0x012e, + 0x6853, 0x0016, 0x0804, 0x63ab, 0x6853, 0x0007, 0x0804, 0x63ab, + 0x6834, 0x8007, 0xa084, 0x00ff, 0x1118, 0x080c, 0x5f94, 0x0078, + 0x2030, 0x8001, 0x1120, 0x7007, 0x0001, 0x0051, 0x0040, 0x7007, + 0x0006, 0x7012, 0x2d00, 0x7016, 0x701a, 0x704b, 0x62e0, 0x0005, + 0x00e6, 0x0126, 0x2091, 0x8000, 0xa03e, 0x2009, 0xb631, 0x210c, + 0x81ff, 0x1904, 0x635e, 0x2009, 0xb60c, 0x210c, 0xd194, 0x1904, + 0x6388, 0x6848, 0x2070, 0xae82, 0xbe00, 0x0a04, 0x6352, 0x2001, + 0xb617, 0x2004, 0xae02, 0x1a04, 0x6352, 0x711c, 0xa186, 0x0006, + 0x1904, 0x6341, 0x7018, 0xa005, 0x0904, 0x635e, 0x2004, 0xd0e4, + 0x1904, 0x6383, 0x2061, 0xb975, 0x6100, 0xa184, 0x0301, 0xa086, + 0x0001, 0x1550, 0x7020, 0xd0dc, 0x1904, 0x638b, 0x6853, 0x0000, + 0x6803, 0x0000, 0x2d08, 0x7010, 0xa005, 0x1158, 0x7112, 0x684c, + 0xd0f4, 0x1904, 0x638e, 0x2e60, 0x080c, 0x6ae8, 0x012e, 0x00ee, + 0x0005, 0x2068, 0x6800, 0xa005, 0x1de0, 0x6902, 0x2168, 0x684c, + 0xd0f4, 0x1904, 0x638e, 0x012e, 0x00ee, 0x0005, 0x012e, 0x00ee, + 0x6853, 0x0006, 0x0804, 0x63ab, 0xd184, 0x0dc0, 0xd1c4, 0x11a8, + 0x00b8, 0x6944, 0xa18c, 0xff00, 0x810f, 0x080c, 0x501b, 0x15d8, + 0x6000, 0xd0e4, 0x15c0, 0x711c, 0xa186, 0x0007, 0x1118, 0x6853, + 0x0002, 0x0498, 0x6853, 0x0008, 0x0480, 0x6853, 0x000e, 0x0468, + 0x6853, 0x0017, 0x0450, 0x6853, 0x0035, 0x0438, 0x2001, 0xb672, + 0x2004, 0xd0fc, 0x01e8, 0x6848, 0x2070, 0xae82, 0xbe00, 0x02c0, + 0x605c, 0xae02, 0x12a8, 0x711c, 0xa186, 0x0006, 0x1188, 0x7018, + 0xa005, 0x0170, 0x2004, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, + 0xa086, 0x0007, 0x1904, 0x62eb, 0x7003, 0x0002, 0x0804, 0x62eb, + 0x6853, 0x0028, 0x0010, 0x6853, 0x0029, 0x012e, 0x00ee, 0x0418, + 0x6853, 0x002a, 0x0cd0, 0x6853, 0x0045, 0x0cb8, 0x2e60, 0x2019, + 0x0002, 0x6017, 0x0014, 0x080c, 0xad9c, 0x012e, 0x00ee, 0x0005, + 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, + 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0x6854, 0xa084, + 0xff00, 0xa105, 0x6856, 0x0126, 0x2091, 0x8000, 0x080c, 0x547a, + 0x012e, 0x0005, 0x080c, 0x1614, 0x0005, 0x702c, 0x7130, 0x8108, + 0xa102, 0x0230, 0xa00e, 0x7034, 0x7072, 0x7038, 0x7076, 0x0058, + 0x7070, 0xa080, 0x0040, 0x7072, 0x1230, 0x7074, 0xa081, 0x0000, + 0x7076, 0xa085, 0x0001, 0x7932, 0x7132, 0x0005, 0x00d6, 0x080c, + 0x6adf, 0x00de, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, + 0x7007, 0x0001, 0x6a44, 0xa282, 0x0004, 0x1a04, 0x641e, 0xd284, + 0x0170, 0x6a4c, 0xa290, 0xb735, 0x2204, 0xa065, 0x6004, 0x05e0, + 0x8007, 0xa084, 0x00ff, 0xa084, 0x0006, 0x1108, 0x04a8, 0x2c10, + 0x080c, 0x864e, 0x1118, 0x080c, 0x9f92, 0x05a0, 0x621a, 0x6844, + 0x0002, 0x63fd, 0x6402, 0x6405, 0x640b, 0x2019, 0x0002, 0x080c, + 0xb121, 0x0060, 0x080c, 0xb0b8, 0x0048, 0x2019, 0x0002, 0x6950, + 0x080c, 0xb0d3, 0x0018, 0x6950, 0x080c, 0xb0b8, 0x080c, 0x86a4, + 0x6857, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x547a, 0x012e, + 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0x6857, 0x0006, + 0x0c88, 0x6857, 0x0002, 0x0c70, 0x6857, 0x0005, 0x0c58, 0x6857, + 0x0004, 0x0c40, 0x6857, 0x0007, 0x0c28, 0x00d6, 0x2011, 0x0004, + 0x2204, 0xa085, 0x8002, 0x2012, 0x00de, 0x0005, 0x20e1, 0x0002, + 0x3d08, 0x20e1, 0x2000, 0x3d00, 0xa084, 0x7000, 0x0118, 0xa086, + 0x1000, 0x1570, 0x20e1, 0x0000, 0x3d00, 0xa094, 0xff00, 0x8217, + 0xa084, 0xf000, 0xa086, 0x3000, 0x1160, 0xa184, 0xff00, 0x8007, + 0xa086, 0x0008, 0x11e8, 0x080c, 0x2df4, 0x11d0, 0x080c, 0x6675, + 0x0098, 0x20e1, 0x0004, 0x3d60, 0xd1bc, 0x1108, 0x3e60, 0xac84, + 0x0007, 0x1170, 0xac82, 0xbe00, 0x0258, 0x685c, 0xac02, 0x1240, + 0x2009, 0x0047, 0x080c, 0x86d3, 0x7a1c, 0xd284, 0x1938, 0x0005, + 0xa016, 0x080c, 0x1863, 0x0cc0, 0x0cd8, 0x781c, 0xd08c, 0x0500, + 0x0156, 0x0136, 0x0146, 0x20e1, 0x3000, 0x3d20, 0x3e28, 0xa584, + 0x0076, 0x1538, 0xa484, 0x7000, 0xa086, 0x1000, 0x11a8, 0x080c, + 0x64f0, 0x01f8, 0x20e1, 0x3000, 0x7828, 0x7828, 0x080c, 0x650c, + 0x014e, 0x013e, 0x015e, 0x2009, 0xb8e9, 0x2104, 0xa005, 0x1108, + 0x0005, 0x080c, 0x71e5, 0x0ce0, 0xa484, 0x7000, 0x1548, 0x080c, + 0x64f0, 0x01d8, 0x7000, 0xa084, 0xff00, 0xa086, 0x8100, 0x0d10, + 0x00a0, 0xd5a4, 0x0178, 0x0056, 0x0046, 0x080c, 0x1e8a, 0x080c, + 0x24e5, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x004e, + 0x005e, 0x0048, 0x04a9, 0x6887, 0x0000, 0x080c, 0xb49b, 0x20e1, + 0x3000, 0x7828, 0x7828, 0x00b9, 0x014e, 0x013e, 0x015e, 0x0880, + 0x0439, 0x1130, 0x7000, 0xa084, 0xff00, 0xa086, 0x8100, 0x1d68, + 0x080c, 0xb49b, 0x20e1, 0x3000, 0x7828, 0x7828, 0x0056, 0x080c, + 0x68e6, 0x005e, 0x0c40, 0x2001, 0xb60e, 0x2004, 0xd08c, 0x0178, + 0x2001, 0xb600, 0x2004, 0xa086, 0x0003, 0x1148, 0x0026, 0x0036, + 0x2011, 0x8048, 0x2518, 0x080c, 0x3f13, 0x003e, 0x002e, 0x0005, + 0xa484, 0x01ff, 0x6886, 0xa005, 0x0160, 0xa080, 0x001f, 0xa084, + 0x03f8, 0x80ac, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, + 0x0005, 0x20a9, 0x000c, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, + 0x53a5, 0xa085, 0x0001, 0x0ca0, 0x7000, 0xa084, 0xff00, 0xa08c, + 0xf000, 0x8007, 0xa196, 0x0000, 0x1118, 0x0804, 0x677a, 0x0005, + 0xa196, 0x2000, 0x1148, 0x6900, 0xa18e, 0x0001, 0x1118, 0x080c, + 0x44d6, 0x0ca8, 0x0039, 0x0c98, 0xa196, 0x8000, 0x1d80, 0x080c, + 0x6826, 0x0c68, 0x00c6, 0x6a84, 0x82ff, 0x0904, 0x666f, 0x7110, + 0xa18c, 0xff00, 0x810f, 0xa196, 0x0001, 0x0120, 0xa196, 0x0023, + 0x1904, 0x666f, 0xa08e, 0x0023, 0x1570, 0x080c, 0x68c1, 0x0904, + 0x666f, 0x7124, 0x610a, 0x7030, 0xa08e, 0x0200, 0x1150, 0x7034, + 0xa005, 0x1904, 0x666f, 0x2009, 0x0015, 0x080c, 0x86d3, 0x0804, + 0x666f, 0xa08e, 0x0214, 0x0118, 0xa08e, 0x0210, 0x1130, 0x2009, + 0x0015, 0x080c, 0x86d3, 0x0804, 0x666f, 0xa08e, 0x0100, 0x1904, + 0x666f, 0x7034, 0xa005, 0x1904, 0x666f, 0x2009, 0x0016, 0x080c, + 0x86d3, 0x0804, 0x666f, 0xa08e, 0x0022, 0x1904, 0x666f, 0x7030, + 0xa08e, 0x0300, 0x1580, 0x68d4, 0xd0a4, 0x0528, 0xc0b5, 0x68d6, + 0x7100, 0xa18c, 0x00ff, 0x6972, 0x7004, 0x6876, 0x00f6, 0x2079, + 0x0100, 0x79e6, 0x78ea, 0x0006, 0xa084, 0x00ff, 0x0016, 0x2008, + 0x080c, 0x287c, 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, + 0x2852, 0x6952, 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, + 0xb600, 0x70a6, 0x00ee, 0x7034, 0xa005, 0x1904, 0x666f, 0x2009, + 0x0017, 0x0804, 0x6635, 0xa08e, 0x0400, 0x1158, 0x7034, 0xa005, + 0x1904, 0x666f, 0x68d4, 0xc0a5, 0x68d6, 0x2009, 0x0030, 0x0804, + 0x6635, 0xa08e, 0x0500, 0x1140, 0x7034, 0xa005, 0x1904, 0x666f, + 0x2009, 0x0018, 0x0804, 0x6635, 0xa08e, 0x2010, 0x1120, 0x2009, + 0x0019, 0x0804, 0x6635, 0xa08e, 0x2110, 0x1120, 0x2009, 0x001a, + 0x0804, 0x6635, 0xa08e, 0x5200, 0x1140, 0x7034, 0xa005, 0x1904, + 0x666f, 0x2009, 0x001b, 0x0804, 0x6635, 0xa08e, 0x5000, 0x1140, + 0x7034, 0xa005, 0x1904, 0x666f, 0x2009, 0x001c, 0x0804, 0x6635, + 0xa08e, 0x1300, 0x1120, 0x2009, 0x0034, 0x0804, 0x6635, 0xa08e, + 0x1200, 0x1140, 0x7034, 0xa005, 0x1904, 0x666f, 0x2009, 0x0024, + 0x0804, 0x6635, 0xa08c, 0xff00, 0xa18e, 0x2400, 0x1118, 0x2009, + 0x002d, 0x04d8, 0xa08c, 0xff00, 0xa18e, 0x5300, 0x1118, 0x2009, + 0x002a, 0x0498, 0xa08e, 0x0f00, 0x1118, 0x2009, 0x0020, 0x0468, + 0xa08e, 0x5300, 0x1108, 0x00d8, 0xa08e, 0x6104, 0x11c0, 0x2011, + 0xbc8d, 0x8208, 0x2204, 0xa082, 0x0004, 0x20a8, 0x95ac, 0x95ac, + 0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x3f13, + 0x004e, 0x8108, 0x1f04, 0x6618, 0x2009, 0x0023, 0x0070, 0xa08e, + 0x6000, 0x1118, 0x2009, 0x003f, 0x0040, 0xa08e, 0x7800, 0x1118, + 0x2009, 0x0045, 0x0010, 0x2009, 0x001d, 0x0016, 0x2011, 0xbc83, + 0x2204, 0x8211, 0x220c, 0x080c, 0x2852, 0x1598, 0x080c, 0x4fbf, + 0x1580, 0x6612, 0x6516, 0x86ff, 0x01e8, 0x001e, 0x0016, 0xa186, + 0x0017, 0x1158, 0x6870, 0xa606, 0x11a8, 0x6874, 0xa506, 0xa084, + 0xff00, 0x1180, 0x6000, 0xc0f5, 0x6002, 0xa186, 0x0046, 0x1150, + 0x6870, 0xa606, 0x1138, 0x6874, 0xa506, 0xa084, 0xff00, 0x1110, + 0x001e, 0x0068, 0x00c6, 0x080c, 0x864e, 0x0168, 0x001e, 0x611a, + 0x601f, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0x86d3, 0x00ce, + 0x0005, 0x001e, 0x0ce0, 0x00ce, 0x0ce0, 0x00c6, 0x0046, 0x080c, + 0x66c9, 0x1904, 0x66c6, 0xa28e, 0x0033, 0x11e8, 0x080c, 0x68c1, + 0x0904, 0x66c6, 0x7124, 0x610a, 0x7030, 0xa08e, 0x0200, 0x1140, + 0x7034, 0xa005, 0x15d8, 0x2009, 0x0015, 0x080c, 0x86d3, 0x04b0, + 0xa08e, 0x0100, 0x1598, 0x7034, 0xa005, 0x1580, 0x2009, 0x0016, + 0x080c, 0x86d3, 0x0458, 0xa28e, 0x0032, 0x1540, 0x7030, 0xa08e, + 0x1400, 0x1520, 0x2009, 0x0038, 0x0016, 0x2011, 0xbc83, 0x2204, + 0x8211, 0x220c, 0x080c, 0x2852, 0x11c0, 0x080c, 0x4fbf, 0x11a8, + 0x6612, 0x6516, 0x00c6, 0x080c, 0x864e, 0x0170, 0x001e, 0x611a, + 0x080c, 0xa0e3, 0x601f, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, + 0x86d3, 0x080c, 0x71e5, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, + 0x0005, 0x00f6, 0x00d6, 0x0026, 0x0016, 0x0136, 0x0146, 0x0156, + 0x3c00, 0x0006, 0x2079, 0x0030, 0x2069, 0x0200, 0x080c, 0x1f49, + 0x1590, 0x080c, 0x1dee, 0x05e0, 0x04f1, 0x1130, 0x7908, 0xa18c, + 0x1fff, 0xa182, 0x0011, 0x1688, 0x20a9, 0x000c, 0x20e1, 0x0000, + 0x2ea0, 0x2099, 0x020a, 0x53a5, 0x20e1, 0x2000, 0x2001, 0x020a, + 0x2004, 0x7a0c, 0x7808, 0xa080, 0x0007, 0xa084, 0x1ff8, 0x0419, + 0x1120, 0xa08a, 0x0140, 0x1a0c, 0x151a, 0x80ac, 0x20e1, 0x6000, + 0x2099, 0x020a, 0x53a5, 0x20e1, 0x7000, 0x6828, 0x6828, 0x7803, + 0x0004, 0xa294, 0x0070, 0x000e, 0x20e0, 0x015e, 0x014e, 0x013e, + 0x001e, 0x002e, 0x00de, 0x00fe, 0x0005, 0xa016, 0x080c, 0x1863, + 0xa085, 0x0001, 0x0c80, 0x0006, 0x2001, 0x0111, 0x2004, 0xa084, + 0x0003, 0x000e, 0x0005, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, + 0xa696, 0x00ff, 0x1198, 0xa596, 0xfffd, 0x1120, 0x2009, 0x007f, + 0x0804, 0x6775, 0xa596, 0xfffe, 0x1118, 0x2009, 0x007e, 0x04e8, + 0xa596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04b8, 0x2011, 0x0000, + 0x2019, 0xb635, 0x231c, 0xd3ac, 0x0138, 0x2021, 0x0000, 0x20a9, + 0x00ff, 0x2071, 0xb735, 0x0030, 0x2021, 0x0081, 0x20a9, 0x007e, + 0x2071, 0xb7b6, 0x2e1c, 0x83ff, 0x1128, 0x82ff, 0x1198, 0x2410, + 0xc2fd, 0x0080, 0x2368, 0x6f10, 0x0006, 0x2100, 0xa706, 0x000e, + 0x6b14, 0x1120, 0xa346, 0x1110, 0x2408, 0x0078, 0x87ff, 0x1110, + 0x83ff, 0x0d58, 0x8420, 0x8e70, 0x1f04, 0x6752, 0x82ff, 0x1118, + 0xa085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0xa006, 0x00de, 0x00ee, + 0x004e, 0x0005, 0xa084, 0x0007, 0x000a, 0x0005, 0x6786, 0x6786, + 0x6786, 0x68d3, 0x6786, 0x6787, 0x679c, 0x6811, 0x0005, 0x7110, + 0xd1bc, 0x0188, 0x7120, 0x2160, 0xac8c, 0x0007, 0x1160, 0xac8a, + 0xbe00, 0x0248, 0x685c, 0xac02, 0x1230, 0x7124, 0x610a, 0x2009, + 0x0046, 0x080c, 0x86d3, 0x0005, 0x00c6, 0xa484, 0x01ff, 0x0904, + 0x67ef, 0x7110, 0xd1bc, 0x1904, 0x67ef, 0x2011, 0xbc83, 0x2204, + 0x8211, 0x220c, 0x080c, 0x2852, 0x1904, 0x67ef, 0x080c, 0x4fbf, + 0x15f0, 0x6612, 0x6516, 0x6000, 0xd0ec, 0x15c8, 0x6204, 0xa294, + 0xff00, 0x8217, 0xa286, 0x0006, 0x0148, 0x6204, 0xa294, 0x00ff, + 0xa286, 0x0006, 0x11a0, 0xa295, 0x0600, 0x6206, 0x00c6, 0x080c, + 0x864e, 0x001e, 0x0530, 0x611a, 0x601f, 0x0006, 0x7120, 0x610a, + 0x7130, 0x6152, 0x2009, 0x0044, 0x080c, 0x86d3, 0x00c0, 0x00c6, + 0x080c, 0x864e, 0x001e, 0x0198, 0x611a, 0x601f, 0x0004, 0x7120, + 0x610a, 0xa286, 0x0004, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007, + 0x0001, 0x6003, 0x0001, 0x080c, 0x6d45, 0x080c, 0x71e5, 0x00ce, + 0x0005, 0x2001, 0xb60d, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, + 0x080c, 0x3f13, 0x00c6, 0x080c, 0x9f92, 0x001e, 0x0d80, 0x611a, + 0x601f, 0x0006, 0x7120, 0x610a, 0x7130, 0x6152, 0x6013, 0x0300, + 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x6cff, 0x080c, 0x71e5, + 0x08f0, 0x7110, 0xd1bc, 0x0188, 0x7020, 0x2060, 0xac84, 0x0007, + 0x1160, 0xac82, 0xbe00, 0x0248, 0x685c, 0xac02, 0x1230, 0x7124, + 0x610a, 0x2009, 0x0045, 0x080c, 0x86d3, 0x0005, 0x0006, 0x080c, + 0x2df4, 0x000e, 0x1168, 0x7110, 0xa18c, 0xff00, 0x810f, 0xa18e, + 0x0000, 0x1130, 0xa084, 0x000f, 0xa08a, 0x0006, 0x1208, 0x000b, + 0x0005, 0x683f, 0x6840, 0x683f, 0x683f, 0x68a9, 0x68b5, 0x0005, + 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x68a8, 0x700c, + 0x7108, 0x080c, 0x2852, 0x1904, 0x68a8, 0x080c, 0x4fbf, 0x1904, + 0x68a8, 0x6612, 0x6516, 0x6204, 0x7110, 0xd1bc, 0x01f8, 0xa28c, + 0x00ff, 0xa186, 0x0004, 0x0118, 0xa186, 0x0006, 0x15c8, 0x00c6, + 0x080c, 0x68c1, 0x00ce, 0x0904, 0x68a8, 0x00c6, 0x080c, 0x864e, + 0x001e, 0x05f0, 0x611a, 0x080c, 0xa0e3, 0x601f, 0x0002, 0x7120, + 0x610a, 0x2009, 0x0088, 0x080c, 0x86d3, 0x0490, 0xa28c, 0x00ff, + 0xa186, 0x0006, 0x0160, 0xa186, 0x0004, 0x0148, 0xa294, 0xff00, + 0x8217, 0xa286, 0x0004, 0x0118, 0xa286, 0x0006, 0x1188, 0x00c6, + 0x080c, 0x864e, 0x001e, 0x01e0, 0x611a, 0x080c, 0xa0e3, 0x601f, + 0x0005, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0x86d3, 0x0080, + 0x00c6, 0x080c, 0x864e, 0x001e, 0x0158, 0x611a, 0x080c, 0xa0e3, + 0x601f, 0x0004, 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0x86d3, + 0x0005, 0x7110, 0xd1bc, 0x0140, 0x00a1, 0x0130, 0x7124, 0x610a, + 0x2009, 0x0089, 0x080c, 0x86d3, 0x0005, 0x7110, 0xd1bc, 0x0140, + 0x0041, 0x0130, 0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0x86d3, + 0x0005, 0x7020, 0x2060, 0xac84, 0x0007, 0x1158, 0xac82, 0xbe00, + 0x0240, 0x2001, 0xb617, 0x2004, 0xac02, 0x1218, 0xa085, 0x0001, + 0x0005, 0xa006, 0x0ce8, 0x7110, 0xd1bc, 0x1178, 0x7024, 0x2060, + 0xac84, 0x0007, 0x1150, 0xac82, 0xbe00, 0x0238, 0x685c, 0xac02, + 0x1220, 0x2009, 0x0051, 0x080c, 0x86d3, 0x0005, 0x2031, 0x0105, + 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207, + 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x00d6, + 0x00f6, 0x7000, 0xa084, 0xf000, 0xa086, 0xc000, 0x05b0, 0x080c, + 0x864e, 0x0598, 0x0066, 0x00c6, 0x0046, 0x2011, 0xbc83, 0x2204, + 0x8211, 0x220c, 0x080c, 0x2852, 0x1580, 0x080c, 0x4fbf, 0x1568, + 0x6612, 0x6516, 0x2c00, 0x004e, 0x00ce, 0x601a, 0x080c, 0xa0e3, + 0x080c, 0x15fd, 0x01f0, 0x2d00, 0x6056, 0x6803, 0x0000, 0x6837, + 0x0000, 0x6c3a, 0xadf8, 0x000f, 0x20a9, 0x000e, 0x2fa0, 0x2e98, + 0x53a3, 0x006e, 0x6612, 0x6007, 0x003e, 0x601f, 0x0001, 0x6003, + 0x0001, 0x080c, 0x6d45, 0x080c, 0x71e5, 0x00fe, 0x00de, 0x00ce, + 0x0005, 0x080c, 0x86a4, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, + 0x2071, 0xb8f4, 0x7003, 0x0003, 0x700f, 0x0361, 0xa006, 0x701a, + 0x7076, 0x7012, 0x7017, 0xbe00, 0x7007, 0x0000, 0x7026, 0x702b, + 0x7e0a, 0x7032, 0x7037, 0x7e6a, 0x703b, 0xffff, 0x703f, 0xffff, + 0x7042, 0x7047, 0x4492, 0x704a, 0x705b, 0x6a9d, 0x2001, 0xb8a1, + 0x2003, 0x0003, 0x2001, 0xb8a3, 0x2003, 0x0100, 0x3a00, 0xa084, + 0x0005, 0x706e, 0x0005, 0x2071, 0xb8f4, 0x1d04, 0x69fd, 0x2091, + 0x6000, 0x700c, 0x8001, 0x700e, 0x1518, 0x700f, 0x0361, 0x7007, + 0x0001, 0x0126, 0x2091, 0x8000, 0x7040, 0xa00d, 0x0128, 0x8109, + 0x7142, 0x1110, 0x7044, 0x080f, 0x00c6, 0x2061, 0xb600, 0x6034, + 0x00ce, 0xd0cc, 0x0180, 0x3a00, 0xa084, 0x0005, 0x726c, 0xa216, + 0x0150, 0x706e, 0x2011, 0x8043, 0x2018, 0x080c, 0x3f13, 0x0018, + 0x0126, 0x2091, 0x8000, 0x7024, 0xa00d, 0x0188, 0x7020, 0x8001, + 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0xa186, 0x03e8, + 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, + 0xa00d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009, + 0x8109, 0x7132, 0x0128, 0xa184, 0x007f, 0x090c, 0x7eaf, 0x0010, + 0x7034, 0x080f, 0x7038, 0xa005, 0x0118, 0x0310, 0x8001, 0x703a, + 0x703c, 0xa005, 0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0xa00d, + 0x0168, 0x7048, 0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109, + 0x714e, 0x1120, 0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0xa00d, + 0x01d8, 0x0016, 0x7074, 0xa00d, 0x0158, 0x7070, 0x8001, 0x7072, + 0x1138, 0x7073, 0x0009, 0x8109, 0x7176, 0x1110, 0x7078, 0x080f, + 0x001e, 0x7008, 0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, + 0x711a, 0x1110, 0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x6a23, + 0x6a24, 0x6a3c, 0x00e6, 0x2071, 0xb8f4, 0x7018, 0xa005, 0x1120, + 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, + 0x2071, 0xb8f4, 0x701c, 0xa206, 0x1110, 0x701a, 0x701e, 0x000e, + 0x00ee, 0x0005, 0x00e6, 0x2071, 0xb8f4, 0x6088, 0xa102, 0x0208, + 0x618a, 0x00ee, 0x0005, 0x0005, 0x7110, 0x080c, 0x501b, 0x1158, + 0x6088, 0x8001, 0x0240, 0x608a, 0x1130, 0x0126, 0x2091, 0x8000, + 0x080c, 0x71e5, 0x012e, 0x8108, 0xa182, 0x00ff, 0x0218, 0xa00e, + 0x7007, 0x0002, 0x7112, 0x0005, 0x7014, 0x2060, 0x0126, 0x2091, + 0x8000, 0x603c, 0xa005, 0x0128, 0x8001, 0x603e, 0x1110, 0x080c, + 0x9fd1, 0x6014, 0xa005, 0x0500, 0x8001, 0x6016, 0x11e8, 0x611c, + 0xa186, 0x0003, 0x0118, 0xa186, 0x0006, 0x11a0, 0x6010, 0x2068, + 0x6854, 0xa08a, 0x199a, 0x0270, 0xa082, 0x1999, 0x6856, 0xa08a, + 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0xa108, + 0x6116, 0x0010, 0x080c, 0x9aa1, 0x012e, 0xac88, 0x0018, 0x7116, + 0x2001, 0xee00, 0xa102, 0x0220, 0x7017, 0xbe00, 0x7007, 0x0000, + 0x0005, 0x00e6, 0x2071, 0xb8f4, 0x7027, 0x07d0, 0x7023, 0x0009, + 0x00ee, 0x0005, 0x2001, 0xb8fd, 0x2003, 0x0000, 0x0005, 0x00e6, + 0x2071, 0xb8f4, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, + 0xb900, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0xb8f4, 0x711a, + 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00c6, 0x0026, 0x7054, + 0x8000, 0x7056, 0x2061, 0xb8a1, 0x6008, 0xa086, 0x0000, 0x0158, + 0x7068, 0x6032, 0x7064, 0x602e, 0x7060, 0x602a, 0x705c, 0x6026, + 0x2c10, 0x080c, 0x1648, 0x002e, 0x00ce, 0x0005, 0x0006, 0x0016, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x696b, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0xb8f4, + 0x7176, 0x727a, 0x7073, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, + 0x2071, 0xb8f4, 0x7078, 0xa206, 0x1110, 0x7076, 0x707a, 0x000e, + 0x00ee, 0x0005, 0x00c6, 0x2061, 0xb975, 0x00ce, 0x0005, 0xa184, + 0x000f, 0x8003, 0x8003, 0x8003, 0xa080, 0xb975, 0x2060, 0x0005, + 0x6854, 0xa08a, 0x199a, 0x0210, 0x2001, 0x1999, 0xa005, 0x1150, + 0x00c6, 0x2061, 0xb975, 0x6014, 0x00ce, 0xa005, 0x1138, 0x2001, + 0x001e, 0x0020, 0xa08e, 0xffff, 0x1108, 0xa006, 0x8003, 0x800b, + 0x810b, 0xa108, 0x6116, 0x684c, 0xa08c, 0x00c0, 0xa18e, 0x00c0, + 0x05e8, 0xd0b4, 0x1138, 0xd0bc, 0x1550, 0x2009, 0x0006, 0x080c, + 0x6b63, 0x0005, 0xd0fc, 0x0138, 0xa084, 0x0003, 0x0120, 0xa086, + 0x0003, 0x1904, 0x6b5d, 0x6020, 0xd0d4, 0x0130, 0xc0d4, 0x6022, + 0x6860, 0x602a, 0x685c, 0x602e, 0x2009, 0xb674, 0x2104, 0xd084, + 0x0138, 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0x86d3, 0x0005, + 0x87ff, 0x1120, 0x2009, 0x0043, 0x080c, 0x86d3, 0x0005, 0xd0fc, + 0x0130, 0xa084, 0x0003, 0x0118, 0xa086, 0x0003, 0x11f0, 0x87ff, + 0x1120, 0x2009, 0x0042, 0x080c, 0x86d3, 0x0005, 0xd0fc, 0x0160, + 0xa084, 0x0003, 0xa08e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, + 0x0041, 0x080c, 0x86d3, 0x0005, 0x0061, 0x0ce8, 0x87ff, 0x1dd8, + 0x2009, 0x0043, 0x080c, 0x86d3, 0x0cb0, 0x2009, 0x0004, 0x0019, + 0x0005, 0x2009, 0x0001, 0x00d6, 0x6010, 0xa0ec, 0xf000, 0x0510, + 0x2068, 0x6952, 0x6800, 0x6012, 0xa186, 0x0001, 0x1188, 0x694c, + 0xa18c, 0x8100, 0xa18e, 0x8100, 0x1158, 0x00c6, 0x2061, 0xb975, + 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, + 0x080c, 0x547a, 0x6010, 0xa06d, 0x0076, 0x2039, 0x0000, 0x190c, + 0x6ae8, 0x007e, 0x00de, 0x0005, 0x0156, 0x00c6, 0x2061, 0xb975, + 0x6000, 0x81ff, 0x0110, 0xa205, 0x0008, 0xa204, 0x6002, 0x00ce, + 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0xa005, 0x0120, + 0x8001, 0x680a, 0xa085, 0x0001, 0x0005, 0x20a9, 0x0010, 0xa006, + 0x8004, 0x8086, 0x818e, 0x1208, 0xa200, 0x1f04, 0x6ba9, 0x8086, + 0x818e, 0x0005, 0x0156, 0x20a9, 0x0010, 0xa005, 0x01b8, 0xa11a, + 0x12a8, 0x8213, 0x818d, 0x0228, 0xa11a, 0x1220, 0x1f04, 0x6bb9, + 0x0028, 0xa11a, 0x2308, 0x8210, 0x1f04, 0x6bb9, 0x0006, 0x3200, + 0xa084, 0xefff, 0x2080, 0x000e, 0x015e, 0x0005, 0x0006, 0x3200, + 0xa085, 0x1000, 0x0cb8, 0x0126, 0x2091, 0x2800, 0x2079, 0xb8e1, + 0x012e, 0x00d6, 0x2069, 0xb8e1, 0x6803, 0x0005, 0x2069, 0x0004, + 0x2d04, 0xa085, 0x8001, 0x206a, 0x00de, 0x0005, 0x00c6, 0x6027, + 0x0001, 0x7804, 0xa084, 0x0007, 0x0002, 0x6bf7, 0x6c18, 0x6c6b, + 0x6bfd, 0x6c18, 0x6bf7, 0x6bf5, 0x6bf5, 0x080c, 0x151a, 0x080c, + 0x6a82, 0x080c, 0x71e5, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, + 0x00ce, 0x0005, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0x7828, 0xa092, + 0x00c8, 0x1228, 0x8000, 0x782a, 0x080c, 0x4b65, 0x0c88, 0x080c, + 0x4b23, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000, 0x0c40, + 0x080c, 0x6a82, 0x3c00, 0x0006, 0x2011, 0x0209, 0x20e1, 0x4000, + 0x2214, 0x000e, 0x20e0, 0x82ff, 0x0178, 0x62c0, 0x82ff, 0x1160, + 0x782b, 0x0000, 0x7824, 0xa065, 0x090c, 0x151a, 0x2009, 0x0013, + 0x080c, 0x86d3, 0x00ce, 0x0005, 0x3900, 0xa082, 0xba2d, 0x1210, + 0x080c, 0x83b9, 0x00c6, 0x7824, 0xa065, 0x090c, 0x151a, 0x7804, + 0xa086, 0x0004, 0x0904, 0x6cab, 0x7828, 0xa092, 0x2710, 0x1230, + 0x8000, 0x782a, 0x00ce, 0x080c, 0x7de6, 0x0c20, 0x6104, 0xa186, + 0x0003, 0x1188, 0x00e6, 0x2071, 0xb600, 0x70e0, 0x00ee, 0xd08c, + 0x0150, 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0xb600, 0x080c, + 0x4b7b, 0x00ee, 0x00ce, 0x080c, 0xb500, 0x2009, 0x0014, 0x080c, + 0x86d3, 0x00ce, 0x0838, 0x2001, 0xb8fd, 0x2003, 0x0000, 0x62c0, + 0x82ff, 0x1160, 0x782b, 0x0000, 0x7824, 0xa065, 0x090c, 0x151a, + 0x2009, 0x0013, 0x080c, 0x872c, 0x00ce, 0x0005, 0x00c6, 0x00d6, + 0x3900, 0xa082, 0xba2d, 0x1210, 0x080c, 0x83b9, 0x7824, 0xa005, + 0x090c, 0x151a, 0x781c, 0xa06d, 0x090c, 0x151a, 0x6800, 0xc0dc, + 0x6802, 0x7924, 0x2160, 0x080c, 0x86a4, 0x693c, 0x81ff, 0x090c, + 0x151a, 0x8109, 0x693e, 0x6854, 0xa015, 0x0110, 0x7a1e, 0x0010, + 0x7918, 0x791e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de, 0x00ce, + 0x080c, 0x71e5, 0x0888, 0x6104, 0xa186, 0x0002, 0x0128, 0xa186, + 0x0004, 0x0110, 0x0804, 0x6c44, 0x7808, 0xac06, 0x0904, 0x6c44, + 0x080c, 0x7102, 0x080c, 0x6d45, 0x00ce, 0x080c, 0x71e5, 0x0804, + 0x6c32, 0x00c6, 0x6027, 0x0002, 0x62c8, 0x60c4, 0xa205, 0x1178, + 0x793c, 0xa1e5, 0x0000, 0x0130, 0x2009, 0x0049, 0x080c, 0x86d3, + 0x00ce, 0x0005, 0x2011, 0xb900, 0x2013, 0x0000, 0x0cc8, 0x3908, + 0xa192, 0xba2d, 0x1210, 0x080c, 0x83b9, 0x793c, 0x81ff, 0x0d90, + 0x7944, 0xa192, 0x7530, 0x12b8, 0x8108, 0x7946, 0x793c, 0xa188, + 0x0007, 0x210c, 0xa18e, 0x0006, 0x1138, 0x6014, 0xa084, 0x0184, + 0xa085, 0x0012, 0x6016, 0x08e0, 0x6014, 0xa084, 0x0184, 0xa085, + 0x0016, 0x6016, 0x08a8, 0x7848, 0xc085, 0x784a, 0x0888, 0x0006, + 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, + 0x2061, 0xb8e1, 0x6020, 0x8000, 0x6022, 0x6010, 0xa005, 0x0148, + 0xa080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e, 0x000e, + 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0xb8e1, 0x6000, + 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0xa086, 0x0001, 0x1110, + 0x2c00, 0x681e, 0x6804, 0xa084, 0x0007, 0x0804, 0x71eb, 0xc0d5, + 0x6002, 0x6818, 0xa005, 0x0158, 0x6056, 0x605b, 0x0000, 0x0006, + 0x2c00, 0x681a, 0x00de, 0x685a, 0x2069, 0xb8e1, 0x0c18, 0x6056, + 0x605a, 0x2c00, 0x681a, 0x681e, 0x08e8, 0x0006, 0x0016, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, 0x2061, 0xb8e1, + 0x6020, 0x8000, 0x6022, 0x6008, 0xa005, 0x0148, 0xa080, 0x0003, + 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e, 0x000e, 0x0005, 0x610e, + 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000, 0x2c08, 0x2061, 0xb8e1, + 0x6034, 0xa005, 0x0130, 0xa080, 0x0003, 0x2102, 0x6136, 0x00ce, + 0x0005, 0x613a, 0x6136, 0x0cd8, 0x00f6, 0x00e6, 0x00d6, 0x00c6, + 0x0076, 0x0066, 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, + 0xa02e, 0x2071, 0xb8e1, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, + 0x8cff, 0x0904, 0x6ded, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, + 0x1904, 0x6de8, 0x87ff, 0x0120, 0x6050, 0xa106, 0x1904, 0x6de8, + 0x703c, 0xac06, 0x1190, 0x0036, 0x2019, 0x0001, 0x080c, 0x806b, + 0x7033, 0x0000, 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, + 0x704b, 0x0000, 0x003e, 0x2029, 0x0001, 0x7038, 0xac36, 0x1110, + 0x660c, 0x763a, 0x7034, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, + 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, + 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, + 0x9d16, 0x01c8, 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x1580, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x0016, 0x0036, 0x0076, + 0x080c, 0x9f88, 0x080c, 0xb43c, 0x080c, 0x547a, 0x007e, 0x003e, + 0x001e, 0x080c, 0x9ecd, 0x080c, 0x9ed9, 0x00ce, 0x0804, 0x6d88, + 0x2c78, 0x600c, 0x2060, 0x0804, 0x6d88, 0x85ff, 0x0120, 0x0036, + 0x080c, 0x72a2, 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, + 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, + 0x601c, 0xa086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076, 0x080c, + 0xb43c, 0x080c, 0xb155, 0x007e, 0x003e, 0x001e, 0x08a0, 0x601c, + 0xa086, 0x000a, 0x0904, 0x6dd2, 0x0804, 0x6dd0, 0x0006, 0x0066, + 0x00c6, 0x00d6, 0x00f6, 0x2031, 0x0000, 0x0126, 0x2091, 0x8000, + 0x2079, 0xb8e1, 0x7838, 0xa065, 0x0568, 0x600c, 0x0006, 0x600f, + 0x0000, 0x783c, 0xac06, 0x1180, 0x0036, 0x2019, 0x0001, 0x080c, + 0x806b, 0x7833, 0x0000, 0x783f, 0x0000, 0x7843, 0x0000, 0x7847, + 0x0000, 0x784b, 0x0000, 0x003e, 0x080c, 0x9d16, 0x0178, 0x6010, + 0x2068, 0x601c, 0xa086, 0x0003, 0x11b0, 0x6837, 0x0103, 0x6b4a, + 0x6847, 0x0000, 0x080c, 0x547a, 0x080c, 0x9ecd, 0x080c, 0x9ed9, + 0x000e, 0x0888, 0x7e3a, 0x7e36, 0x012e, 0x00fe, 0x00de, 0x00ce, + 0x006e, 0x000e, 0x0005, 0x601c, 0xa086, 0x0006, 0x1118, 0x080c, + 0xb155, 0x0c60, 0x601c, 0xa086, 0x000a, 0x0d08, 0x08f0, 0x0016, + 0x0026, 0x0086, 0x2041, 0x0000, 0x0099, 0x080c, 0x6f35, 0x008e, + 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079, 0xb8e1, 0x2091, + 0x8000, 0x080c, 0x6fc2, 0x080c, 0x7034, 0x012e, 0x00fe, 0x0005, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0xb8e1, 0x7614, 0x2660, 0x2678, 0x8cff, + 0x0904, 0x6f0b, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x1904, + 0x6f06, 0x88ff, 0x0120, 0x6050, 0xa106, 0x1904, 0x6f06, 0x7024, + 0xac06, 0x1538, 0x2069, 0x0100, 0x68c0, 0xa005, 0x01f0, 0x080c, + 0x6a82, 0x080c, 0x7df3, 0x68c3, 0x0000, 0x080c, 0x82d4, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x0020, 0x6003, 0x0009, 0x630a, + 0x04e8, 0x7014, 0xac36, 0x1110, 0x660c, 0x7616, 0x7010, 0xac36, + 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, + 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, + 0x2678, 0x600f, 0x0000, 0x6010, 0x2068, 0x080c, 0x9d16, 0x01b8, + 0x601c, 0xa086, 0x0003, 0x1540, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0x9f88, 0x080c, 0xb43c, + 0x080c, 0x547a, 0x008e, 0x003e, 0x001e, 0x080c, 0x9ecd, 0x080c, + 0x9ed9, 0x080c, 0x81a5, 0x00ce, 0x0804, 0x6e8f, 0x2c78, 0x600c, + 0x2060, 0x0804, 0x6e8f, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, + 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601c, 0xa086, 0x0006, 0x1158, + 0x0016, 0x0036, 0x0086, 0x080c, 0xb43c, 0x080c, 0xb155, 0x008e, + 0x003e, 0x001e, 0x08e0, 0x601c, 0xa086, 0x0002, 0x1128, 0x6004, + 0xa086, 0x0085, 0x0908, 0x0898, 0x601c, 0xa086, 0x0005, 0x1978, + 0x6004, 0xa086, 0x0085, 0x0d20, 0x0850, 0x00c6, 0x0006, 0x0126, + 0x2091, 0x8000, 0xa280, 0xb735, 0x2004, 0xa065, 0x0904, 0x6fbe, + 0x00f6, 0x00e6, 0x00d6, 0x0066, 0x2071, 0xb8e1, 0x6654, 0x7018, + 0xac06, 0x1108, 0x761a, 0x701c, 0xac06, 0x1130, 0x86ff, 0x1118, + 0x7018, 0x701e, 0x0008, 0x761e, 0x6058, 0xa07d, 0x0108, 0x7e56, + 0xa6ed, 0x0000, 0x0110, 0x2f00, 0x685a, 0x6057, 0x0000, 0x605b, + 0x0000, 0x6000, 0xc0d4, 0xc0dc, 0x6002, 0x080c, 0x4f46, 0x0904, + 0x6fba, 0x7624, 0x86ff, 0x05e8, 0xa680, 0x0004, 0x2004, 0xad06, + 0x15c0, 0x00d6, 0x2069, 0x0100, 0x68c0, 0xa005, 0x0548, 0x080c, + 0x6a82, 0x080c, 0x7df3, 0x68c3, 0x0000, 0x080c, 0x82d4, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x603c, 0xa005, + 0x0110, 0x8001, 0x603e, 0x2660, 0x080c, 0x9ed9, 0x00ce, 0x0048, + 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, + 0x6f65, 0x8dff, 0x0158, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, + 0x080c, 0x9f88, 0x080c, 0xb43c, 0x080c, 0x547a, 0x080c, 0x81a5, + 0x0804, 0x6f65, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e, + 0x00ce, 0x0005, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x2031, 0x0000, + 0x7814, 0xa065, 0x0904, 0x7014, 0x600c, 0x0006, 0x600f, 0x0000, + 0x7824, 0xac06, 0x1540, 0x2069, 0x0100, 0x68c0, 0xa005, 0x01f0, + 0x080c, 0x6a82, 0x080c, 0x7df3, 0x68c3, 0x0000, 0x080c, 0x82d4, + 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0120, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009, + 0x630a, 0x2c30, 0x00b0, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0168, + 0x601c, 0xa086, 0x0003, 0x11b8, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x080c, 0x547a, 0x080c, 0x9ecd, 0x080c, 0x9ed9, 0x080c, + 0x81a5, 0x000e, 0x0804, 0x6fc9, 0x7e16, 0x7e12, 0x00de, 0x00ce, + 0x006e, 0x000e, 0x0005, 0x601c, 0xa086, 0x0006, 0x1118, 0x080c, + 0xb155, 0x0c58, 0x601c, 0xa086, 0x0002, 0x1128, 0x6004, 0xa086, + 0x0085, 0x09d0, 0x0c10, 0x601c, 0xa086, 0x0005, 0x19f0, 0x6004, + 0xa086, 0x0085, 0x0d60, 0x08c8, 0x0006, 0x0066, 0x00c6, 0x00d6, + 0x7818, 0xa065, 0x0904, 0x709a, 0x6054, 0x0006, 0x6057, 0x0000, + 0x605b, 0x0000, 0x6000, 0xc0d4, 0xc0dc, 0x6002, 0x080c, 0x4f46, + 0x0904, 0x7097, 0x7e24, 0x86ff, 0x05e8, 0xa680, 0x0004, 0x2004, + 0xad06, 0x15c0, 0x00d6, 0x2069, 0x0100, 0x68c0, 0xa005, 0x0548, + 0x080c, 0x6a82, 0x080c, 0x7df3, 0x68c3, 0x0000, 0x080c, 0x82d4, + 0x7827, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0120, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x603c, + 0xa005, 0x0110, 0x8001, 0x603e, 0x2660, 0x080c, 0x9ed9, 0x00ce, + 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, + 0x0804, 0x7046, 0x8dff, 0x0138, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x080c, 0x547a, 0x080c, 0x81a5, 0x0804, 0x7046, 0x000e, + 0x0804, 0x7039, 0x781e, 0x781a, 0x00de, 0x00ce, 0x006e, 0x000e, + 0x0005, 0x00e6, 0x00d6, 0x0066, 0x6000, 0xd0dc, 0x01a0, 0x604c, + 0xa06d, 0x0188, 0x6848, 0xa606, 0x1170, 0x2071, 0xb8e1, 0x7024, + 0xa035, 0x0148, 0xa080, 0x0004, 0x2004, 0xad06, 0x1120, 0x6000, + 0xc0dc, 0x6002, 0x0021, 0x006e, 0x00de, 0x00ee, 0x0005, 0x00f6, + 0x2079, 0x0100, 0x78c0, 0xa005, 0x1138, 0x00c6, 0x2660, 0x6003, + 0x0009, 0x630a, 0x00ce, 0x04a0, 0x080c, 0x7df3, 0x78c3, 0x0000, + 0x080c, 0x82d4, 0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, + 0xa384, 0x1000, 0x0120, 0x7803, 0x0100, 0x7803, 0x0000, 0x2079, + 0x0100, 0x7824, 0xd084, 0x0110, 0x7827, 0x0001, 0x080c, 0x82d4, + 0x003e, 0x080c, 0x4f46, 0x00c6, 0x603c, 0xa005, 0x0110, 0x8001, + 0x603e, 0x2660, 0x080c, 0x86a4, 0x00ce, 0x6837, 0x0103, 0x6b4a, + 0x6847, 0x0000, 0x080c, 0x9f88, 0x080c, 0x547a, 0x080c, 0x81a5, + 0x00fe, 0x0005, 0x00e6, 0x00c6, 0x2071, 0xb8e1, 0x7004, 0xa084, + 0x0007, 0x0002, 0x7114, 0x7117, 0x712d, 0x7146, 0x7183, 0x7114, + 0x7112, 0x7112, 0x080c, 0x151a, 0x00ce, 0x00ee, 0x0005, 0x7024, + 0xa065, 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0xa015, 0x0150, + 0x7216, 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, + 0x00ee, 0x0005, 0x7216, 0x7212, 0x0cb0, 0x6018, 0x2060, 0x080c, + 0x4f46, 0x6000, 0xc0dc, 0x6002, 0x7020, 0x8001, 0x7022, 0x0120, + 0x6054, 0xa015, 0x0140, 0x721e, 0x7007, 0x0000, 0x7027, 0x0000, + 0x00ce, 0x00ee, 0x0005, 0x7218, 0x721e, 0x0cb0, 0x7024, 0xa065, + 0x05b8, 0x700c, 0xac06, 0x1160, 0x080c, 0x81a5, 0x600c, 0xa015, + 0x0120, 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a, 0x0430, + 0x7014, 0xac06, 0x1160, 0x080c, 0x81a5, 0x600c, 0xa015, 0x0120, + 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8, 0x601c, + 0xa086, 0x0003, 0x1198, 0x6018, 0x2060, 0x080c, 0x4f46, 0x6000, + 0xc0dc, 0x6002, 0x080c, 0x81a5, 0x701c, 0xa065, 0x0138, 0x6054, + 0xa015, 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027, 0x0000, + 0x00ce, 0x00ee, 0x0005, 0x7024, 0xa065, 0x0140, 0x080c, 0x81a5, + 0x600c, 0xa015, 0x0150, 0x720e, 0x600f, 0x0000, 0x080c, 0x82d4, + 0x7027, 0x0000, 0x00ce, 0x00ee, 0x0005, 0x720e, 0x720a, 0x0cb0, + 0x00d6, 0x2069, 0xb8e1, 0x6830, 0xa084, 0x0003, 0x0002, 0x71a5, + 0x71a7, 0x71cb, 0x71a3, 0x080c, 0x151a, 0x00de, 0x0005, 0x00c6, + 0x6840, 0xa086, 0x0001, 0x01b8, 0x683c, 0xa065, 0x0130, 0x600c, + 0xa015, 0x0170, 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, + 0x0000, 0x2011, 0xb900, 0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, + 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000, 0x6838, 0xa065, 0x0d68, + 0x6003, 0x0003, 0x0c50, 0x00c6, 0x6843, 0x0000, 0x6847, 0x0000, + 0x684b, 0x0000, 0x683c, 0xa065, 0x0168, 0x600c, 0xa015, 0x0130, + 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, 0x0020, 0x683f, 0x0000, + 0x683a, 0x6836, 0x00ce, 0x00de, 0x0005, 0x00d6, 0x2069, 0xb8e1, + 0x6804, 0xa084, 0x0007, 0x0002, 0x71f6, 0x7292, 0x7292, 0x7292, + 0x7292, 0x7294, 0x71f4, 0x71f4, 0x080c, 0x151a, 0x6820, 0xa005, + 0x1110, 0x00de, 0x0005, 0x00c6, 0x680c, 0xa065, 0x0150, 0x6807, + 0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x72e4, 0x00ce, 0x00de, + 0x0005, 0x6814, 0xa065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b, + 0x0000, 0x080c, 0x72e4, 0x00ce, 0x00de, 0x0005, 0x00e6, 0x0036, + 0x6a1c, 0xa2f5, 0x0000, 0x0904, 0x728e, 0x704c, 0xa00d, 0x0118, + 0x7088, 0xa005, 0x01a0, 0x7054, 0xa075, 0x0120, 0xa20e, 0x0904, + 0x728e, 0x0028, 0x6818, 0xa20e, 0x0904, 0x728e, 0x2070, 0x704c, + 0xa00d, 0x0d88, 0x7088, 0xa005, 0x1d70, 0x2e00, 0x681e, 0x733c, + 0x7038, 0xa302, 0x1e40, 0x080c, 0x867b, 0x0904, 0x728e, 0x8318, + 0x733e, 0x6112, 0x2e10, 0x621a, 0xa180, 0x0014, 0x2004, 0xa084, + 0x00ff, 0x605a, 0xa180, 0x0014, 0x2003, 0x0000, 0xa180, 0x0015, + 0x2004, 0xa08a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x801b, + 0x831b, 0xa318, 0x6316, 0x003e, 0x00f6, 0x2c78, 0x71a0, 0x2001, + 0xb635, 0x2004, 0xd0ac, 0x1110, 0xd1bc, 0x0150, 0x7100, 0xd1f4, + 0x0120, 0x7114, 0xa18c, 0x00ff, 0x0040, 0x2009, 0x0000, 0x0028, + 0xa1e0, 0x2df9, 0x2c0d, 0xa18c, 0x00ff, 0x2061, 0x0100, 0x619a, + 0x080c, 0x7914, 0x7300, 0xc3dd, 0x7302, 0x6807, 0x0002, 0x2f18, + 0x6b26, 0x682b, 0x0000, 0x781f, 0x0003, 0x7803, 0x0001, 0x7807, + 0x0040, 0x00fe, 0x00ee, 0x00ce, 0x00de, 0x0005, 0x003e, 0x00ee, + 0x00ce, 0x0cd0, 0x00de, 0x0005, 0x00c6, 0x680c, 0xa065, 0x0138, + 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x72e4, 0x00ce, + 0x00de, 0x0005, 0x00f6, 0x00d6, 0x2069, 0xb8e1, 0x6830, 0xa086, + 0x0000, 0x11d0, 0x2001, 0xb60c, 0x200c, 0xd1bc, 0x1560, 0x6838, + 0xa07d, 0x0190, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, + 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x203d, + 0x1130, 0x012e, 0x080c, 0x7c5d, 0x00de, 0x00fe, 0x0005, 0x012e, + 0xe000, 0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0xa015, 0x0140, + 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c60, + 0x683a, 0x6836, 0x0cc0, 0xc1bc, 0x2102, 0x0066, 0x2031, 0x0001, + 0x080c, 0x5bc3, 0x006e, 0x0858, 0x601c, 0xa084, 0x000f, 0x000b, + 0x0005, 0x72f2, 0x72f7, 0x77b5, 0x78d1, 0x72f7, 0x77b5, 0x78d1, + 0x72f2, 0x72f7, 0x080c, 0x7102, 0x080c, 0x71e5, 0x0005, 0x0156, + 0x0136, 0x0146, 0x00c6, 0x00f6, 0x6004, 0xa08a, 0x0080, 0x1a0c, + 0x151a, 0x6118, 0x2178, 0x79a0, 0x2011, 0xb635, 0x2214, 0xd2ac, + 0x1110, 0xd1bc, 0x0150, 0x7900, 0xd1f4, 0x0120, 0x7914, 0xa18c, + 0x00ff, 0x0040, 0x2009, 0x0000, 0x0028, 0xa1f8, 0x2df9, 0x2f0d, + 0xa18c, 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, 0xa08a, 0x0040, + 0x1a04, 0x736b, 0x0033, 0x00fe, 0x00ce, 0x014e, 0x013e, 0x015e, + 0x0005, 0x741a, 0x7465, 0x7492, 0x755f, 0x758d, 0x7595, 0x75bb, + 0x75cc, 0x75dd, 0x75e5, 0x75fb, 0x75e5, 0x765c, 0x75cc, 0x767d, + 0x7685, 0x75dd, 0x7685, 0x7696, 0x7369, 0x7369, 0x7369, 0x7369, + 0x7369, 0x7369, 0x7369, 0x7369, 0x7369, 0x7369, 0x7369, 0x7efe, + 0x7f23, 0x7f46, 0x7f69, 0x7f8a, 0x75bb, 0x7369, 0x75bb, 0x75e5, + 0x7369, 0x7492, 0x755f, 0x7369, 0x83d6, 0x75e5, 0x7369, 0x83f6, + 0x75e5, 0x7369, 0x75dd, 0x7413, 0x737e, 0x7369, 0x841b, 0x8490, + 0x8567, 0x7369, 0x8578, 0x75b6, 0x8594, 0x7369, 0x7f9f, 0x85ef, + 0x7369, 0x080c, 0x151a, 0x2100, 0x0033, 0x00fe, 0x00ce, 0x014e, + 0x013e, 0x015e, 0x0005, 0x737c, 0x737c, 0x737c, 0x73b2, 0x73d0, + 0x73e6, 0x737c, 0x737c, 0x737c, 0x080c, 0x151a, 0x00d6, 0x20a1, + 0x020b, 0x080c, 0x76b3, 0x7810, 0x2068, 0x20a3, 0x2414, 0x20a3, + 0x0018, 0x20a3, 0x0800, 0x683c, 0x20a2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x6850, 0x20a2, 0x6854, + 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x080c, + 0x7de0, 0x00de, 0x0005, 0x00d6, 0x7818, 0x2068, 0x68a0, 0x2069, + 0xb600, 0x6ad4, 0xd2ac, 0x1110, 0xd0bc, 0x0110, 0xa085, 0x0001, + 0x00de, 0x0005, 0x00d6, 0x20a1, 0x020b, 0x080c, 0x76b3, 0x20a3, + 0x0500, 0x20a3, 0x0000, 0x7810, 0xa0e8, 0x000f, 0x6808, 0x20a2, + 0x680c, 0x20a2, 0x6810, 0x20a2, 0x6814, 0x20a2, 0x6818, 0x20a2, + 0x681c, 0x20a2, 0x60c3, 0x0010, 0x080c, 0x7de0, 0x00de, 0x0005, + 0x0156, 0x0146, 0x20a1, 0x020b, 0x080c, 0x76b3, 0x20a3, 0x7800, + 0x20a3, 0x0000, 0x7808, 0x8007, 0x20a2, 0x20a3, 0x0000, 0x60c3, + 0x0008, 0x080c, 0x7de0, 0x014e, 0x015e, 0x0005, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x774f, 0x20a3, 0x0200, 0x20a3, 0x0000, + 0x20a3, 0xdf10, 0x20a3, 0x0034, 0x2099, 0xb605, 0x20a9, 0x0004, + 0x53a6, 0x2099, 0xb601, 0x20a9, 0x0004, 0x53a6, 0x2099, 0xb8c7, + 0x20a9, 0x001a, 0x3304, 0x8007, 0x20a2, 0x9398, 0x1f04, 0x7402, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x004c, 0x080c, 0x7de0, + 0x014e, 0x015e, 0x0005, 0x2001, 0xb615, 0x2004, 0x609a, 0x080c, + 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76b3, 0x20a3, 0x5200, + 0x20a3, 0x0000, 0x00d6, 0x2069, 0xb652, 0x6804, 0xd084, 0x0150, + 0x6828, 0x20a3, 0x0000, 0x0016, 0x080c, 0x2866, 0x21a2, 0x001e, + 0x00de, 0x0028, 0x00de, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, + 0x0004, 0x2099, 0xb605, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb601, + 0x53a6, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1138, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa082, 0x007f, 0x0238, 0x2001, 0xb61c, 0x20a6, + 0x2001, 0xb61d, 0x20a6, 0x0040, 0x20a3, 0x0000, 0x2001, 0xb615, + 0x2004, 0xa084, 0x00ff, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x001c, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x76b3, 0x20a3, 0x0500, 0x20a3, 0x0000, 0x2001, 0xb635, 0x2004, + 0xd0ac, 0x1138, 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, 0x007f, + 0x0238, 0x2001, 0xb61c, 0x20a6, 0x2001, 0xb61d, 0x20a6, 0x0040, + 0x20a3, 0x0000, 0x2001, 0xb615, 0x2004, 0xa084, 0x00ff, 0x20a2, + 0x20a9, 0x0004, 0x2099, 0xb605, 0x53a6, 0x60c3, 0x0010, 0x080c, + 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76b3, 0x00c6, 0x7818, + 0x2060, 0x2001, 0x0000, 0x080c, 0x5385, 0x00ce, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa086, 0x007e, 0x1130, 0x20a3, 0x0400, 0x620c, + 0xc2b4, 0x620e, 0x0010, 0x20a3, 0x0300, 0x20a3, 0x0000, 0x7818, + 0xa080, 0x0028, 0x2004, 0xa086, 0x007e, 0x1904, 0x7521, 0x2001, + 0xb635, 0x2004, 0xd0a4, 0x01c8, 0x2099, 0xb88e, 0x33a6, 0x9398, + 0x20a3, 0x0000, 0x9398, 0x3304, 0xa084, 0x2000, 0x20a2, 0x9398, + 0x33a6, 0x9398, 0x20a3, 0x0000, 0x9398, 0x2001, 0x2710, 0x20a2, + 0x9398, 0x33a6, 0x9398, 0x33a6, 0x00d0, 0x2099, 0xb88e, 0x33a6, + 0x9398, 0x33a6, 0x9398, 0x3304, 0x080c, 0x5b41, 0x1118, 0xa084, + 0x37ff, 0x0010, 0xa084, 0x3fff, 0x20a2, 0x9398, 0x33a6, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, + 0x0004, 0x2099, 0xb605, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb601, + 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x1f04, 0x74fb, 0x20a9, + 0x0008, 0x20a3, 0x0000, 0x1f04, 0x7501, 0x2099, 0xb896, 0x3304, + 0xc0dd, 0x20a2, 0x2001, 0xb672, 0x2004, 0xd0e4, 0x0158, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x9398, 0x9398, 0x9398, 0x33a6, 0x20a9, + 0x0004, 0x0010, 0x20a9, 0x0007, 0x20a3, 0x0000, 0x1f04, 0x751c, + 0x0468, 0x2001, 0xb635, 0x2004, 0xd0a4, 0x0140, 0x2001, 0xb88f, + 0x2004, 0x60e3, 0x0000, 0x080c, 0x28a7, 0x60e2, 0x2099, 0xb88e, + 0x20a9, 0x0008, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb605, 0x53a6, + 0x20a9, 0x0004, 0x2099, 0xb601, 0x53a6, 0x20a9, 0x0008, 0x20a3, + 0x0000, 0x1f04, 0x753f, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x1f04, + 0x7545, 0x2099, 0xb896, 0x20a9, 0x0008, 0x53a6, 0x20a9, 0x0008, + 0x20a3, 0x0000, 0x1f04, 0x7550, 0x20a9, 0x000a, 0x20a3, 0x0000, + 0x1f04, 0x7556, 0x60c3, 0x0074, 0x080c, 0x7de0, 0x0005, 0x20a1, + 0x020b, 0x080c, 0x76b3, 0x20a3, 0x2010, 0x20a3, 0x0014, 0x20a3, + 0x0800, 0x20a3, 0x2000, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, + 0x20a2, 0x00f6, 0x2079, 0xb652, 0x7904, 0x00fe, 0xd1ac, 0x1110, + 0xa085, 0x0020, 0xd1a4, 0x0110, 0xa085, 0x0010, 0xa085, 0x0002, + 0x00d6, 0x0804, 0x763e, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x76b3, 0x20a3, 0x5000, 0x0804, 0x74ad, 0x20a1, 0x020b, 0x080c, + 0x76b3, 0x20a3, 0x2110, 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x0014, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, + 0x080c, 0x7747, 0x0020, 0x20a1, 0x020b, 0x080c, 0x774f, 0x20a3, + 0x0200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0004, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, 0x774f, + 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, 0x2a00, + 0x60c3, 0x0008, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x774f, 0x20a3, 0x0200, 0x0804, 0x74ad, 0x20a1, 0x020b, 0x080c, + 0x774f, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0xa005, 0x0110, + 0x20a2, 0x0010, 0x20a3, 0x0003, 0x7810, 0x20a2, 0x60c3, 0x0008, + 0x080c, 0x7de0, 0x0005, 0x00d6, 0x20a1, 0x020b, 0x080c, 0x774f, + 0x20a3, 0x0210, 0x20a3, 0x0014, 0x20a3, 0x0800, 0x7818, 0x2068, + 0x6894, 0xa086, 0x0014, 0x1198, 0x699c, 0xa184, 0x0030, 0x0190, + 0x6998, 0xa184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x20a3, 0x2100, + 0x0058, 0x20a3, 0x0100, 0x0040, 0x20a3, 0x0400, 0x0028, 0x20a3, + 0x0700, 0x0010, 0x700f, 0x0800, 0xa006, 0x20a2, 0x20a2, 0x20a2, + 0x20a2, 0x20a2, 0x00f6, 0x2079, 0xb652, 0x7904, 0x00fe, 0xd1ac, + 0x1110, 0xa085, 0x0020, 0xd1a4, 0x0110, 0xa085, 0x0010, 0x2009, + 0xb674, 0x210c, 0xd184, 0x1110, 0xa085, 0x0002, 0x0026, 0x2009, + 0xb672, 0x210c, 0xd1e4, 0x0130, 0xc0c5, 0xa094, 0x0030, 0xa296, + 0x0010, 0x0140, 0xd1ec, 0x0130, 0xa094, 0x0030, 0xa296, 0x0010, + 0x0108, 0xc0bd, 0x002e, 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x0014, + 0x080c, 0x7de0, 0x00de, 0x0005, 0x20a1, 0x020b, 0x080c, 0x774f, + 0x20a3, 0x0210, 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x774f, 0x20a3, 0x0200, 0x0804, 0x7420, 0x20a1, 0x020b, 0x080c, + 0x774f, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, + 0x2a00, 0x60c3, 0x0008, 0x080c, 0x7de0, 0x0005, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x20a1, 0x020b, 0x080c, 0x774f, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0x000b, 0x20a3, 0x0000, 0x60c3, 0x0008, + 0x080c, 0x7de0, 0x0005, 0x0026, 0x0036, 0x0046, 0x2019, 0x3200, + 0x2021, 0x0800, 0x0038, 0x0026, 0x0036, 0x0046, 0x2019, 0x2200, + 0x2021, 0x0100, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, + 0x0028, 0x2014, 0xa286, 0x007e, 0x11a0, 0xa385, 0x00ff, 0x20a2, + 0x20a3, 0xfffe, 0x20a3, 0x0000, 0x2011, 0xb615, 0x2214, 0x2001, + 0xb89e, 0x2004, 0xa005, 0x0118, 0x2011, 0xb61d, 0x2214, 0x22a2, + 0x04d0, 0xa286, 0x007f, 0x1138, 0x00d6, 0xa385, 0x00ff, 0x20a2, + 0x20a3, 0xfffd, 0x00c8, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1110, + 0xd2bc, 0x01c8, 0xa286, 0x0080, 0x00d6, 0x1130, 0xa385, 0x00ff, + 0x20a2, 0x20a3, 0xfffc, 0x0040, 0xa2e8, 0xb735, 0x2d6c, 0x6810, + 0xa305, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb61c, 0x2da6, 0x8d68, + 0x2da6, 0x00de, 0x0080, 0x00d6, 0xa2e8, 0xb735, 0x2d6c, 0x6810, + 0xa305, 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, + 0xb615, 0x2214, 0x22a2, 0xa485, 0x0029, 0x20a2, 0x004e, 0x003e, + 0x20a3, 0x0000, 0x080c, 0x7dcf, 0x22a2, 0x20a3, 0x0000, 0x2fa2, + 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, + 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a3, 0x02ff, 0x2011, + 0xfffc, 0x22a2, 0x00d6, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, + 0x00de, 0x20a3, 0x2029, 0x20a3, 0x0000, 0x08e0, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0xfc02, 0x20a3, 0x0000, 0x0005, 0x0026, + 0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0038, 0x0026, + 0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb635, + 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x02d8, 0x00d6, 0xa0e8, + 0xb735, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x6810, + 0xa005, 0x1140, 0x6814, 0xa005, 0x1128, 0x20a3, 0x00ff, 0x20a3, + 0xfffe, 0x0028, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0080, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa305, 0x20a2, + 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, 0x2214, + 0x22a2, 0xa485, 0x0098, 0x20a2, 0x20a3, 0x0000, 0x004e, 0x003e, + 0x080c, 0x7dcf, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, 0x080c, 0x7dcf, + 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x7810, 0x20a2, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, 0x00c6, 0x00f6, 0x6004, + 0xa08a, 0x0085, 0x0a0c, 0x151a, 0xa08a, 0x008c, 0x1a0c, 0x151a, + 0x6118, 0x2178, 0x79a0, 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1110, + 0xd1bc, 0x0150, 0x7900, 0xd1f4, 0x0120, 0x7914, 0xa18c, 0x00ff, + 0x0040, 0x2009, 0x0000, 0x0028, 0xa1f8, 0x2df9, 0x2f0d, 0xa18c, + 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, 0xa082, 0x0085, 0x001b, + 0x00fe, 0x00ce, 0x0005, 0x77ec, 0x77f6, 0x7811, 0x77ea, 0x77ea, + 0x77ea, 0x77ec, 0x080c, 0x151a, 0x0146, 0x20a1, 0x020b, 0x04a1, + 0x60c3, 0x0000, 0x080c, 0x7de0, 0x014e, 0x0005, 0x0146, 0x20a1, + 0x020b, 0x080c, 0x785d, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, + 0x20a2, 0x7810, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0xffff, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x000c, 0x080c, 0x7de0, 0x014e, + 0x0005, 0x0146, 0x20a1, 0x020b, 0x080c, 0x7897, 0x20a3, 0x0003, + 0x20a3, 0x0300, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0004, + 0x080c, 0x7de0, 0x014e, 0x0005, 0x0026, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb635, 0x2214, + 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0288, 0x00d6, 0xa0e8, 0xb735, + 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, 0x2069, + 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, + 0xb735, 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, + 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, 0x2214, 0x22a2, 0x20a3, + 0x0009, 0x20a3, 0x0000, 0x0804, 0x771a, 0x0026, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb635, + 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0288, 0x00d6, 0xa0e8, + 0xb735, 0x2d6c, 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, + 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, 0x2214, 0x22a2, + 0x2001, 0x0099, 0x20a2, 0x20a3, 0x0000, 0x0804, 0x77a6, 0x0026, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, + 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0288, + 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x8500, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0088, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x8500, + 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, + 0x2214, 0x22a2, 0x2001, 0x0099, 0x20a2, 0x20a3, 0x0000, 0x0804, + 0x77a6, 0x00c6, 0x00f6, 0x2c78, 0x7804, 0xa08a, 0x0040, 0x0a0c, + 0x151a, 0xa08a, 0x0053, 0x1a0c, 0x151a, 0x7918, 0x2160, 0x61a0, + 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1110, 0xd1bc, 0x0150, 0x6100, + 0xd1f4, 0x0120, 0x6114, 0xa18c, 0x00ff, 0x0040, 0x2009, 0x0000, + 0x0028, 0xa1e0, 0x2df9, 0x2c0d, 0xa18c, 0x00ff, 0x2061, 0x0100, + 0x619a, 0xa082, 0x0040, 0x001b, 0x00fe, 0x00ce, 0x0005, 0x7914, + 0x7a20, 0x79bd, 0x7bd2, 0x7912, 0x7912, 0x7912, 0x7912, 0x7912, + 0x7912, 0x7912, 0x815e, 0x816e, 0x817e, 0x818e, 0x7912, 0x85a5, + 0x7912, 0x814d, 0x080c, 0x151a, 0x00d6, 0x0156, 0x0146, 0x780b, + 0xffff, 0x20a1, 0x020b, 0x080c, 0x7974, 0x7910, 0x2168, 0x6948, + 0x7952, 0x21a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x694c, 0xa184, + 0x000f, 0x1118, 0x2001, 0x0005, 0x0040, 0xd184, 0x0118, 0x2001, + 0x0004, 0x0018, 0xa084, 0x0006, 0x8004, 0x0016, 0x2008, 0x7858, + 0xa084, 0x00ff, 0x8007, 0xa105, 0x001e, 0x20a2, 0xd1ac, 0x0118, + 0x20a3, 0x0002, 0x0048, 0xd1b4, 0x0118, 0x20a3, 0x0001, 0x0020, + 0x20a3, 0x0000, 0x2230, 0x0010, 0x6a80, 0x6e7c, 0x20a9, 0x0008, + 0x0136, 0xad88, 0x0017, 0x2198, 0x20a1, 0x021b, 0x53a6, 0x013e, + 0x20a1, 0x020b, 0x22a2, 0x26a2, 0x60c3, 0x0020, 0x20e1, 0x9080, + 0x6014, 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, 0x2001, 0xb8fd, + 0x2003, 0x07d0, 0x2001, 0xb8fc, 0x2003, 0x0009, 0x080c, 0x17e7, + 0x014e, 0x015e, 0x00de, 0x0005, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x7a18, 0xa280, 0x0023, 0x2014, 0x8210, 0xa294, 0x00ff, 0x2202, + 0x8217, 0x7818, 0xa080, 0x0028, 0x2004, 0x2019, 0xb635, 0x231c, + 0xd3ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, + 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb61c, + 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb735, + 0x2d6c, 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, 0x00de, + 0x20a3, 0x0000, 0x2009, 0xb615, 0x210c, 0x21a2, 0x20a3, 0x0829, + 0x20a3, 0x0000, 0x22a2, 0x20a3, 0x0000, 0x2fa2, 0x20a3, 0xffff, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x0005, 0x00d6, 0x0156, 0x0136, + 0x0146, 0x20a1, 0x020b, 0x00c1, 0x7810, 0x2068, 0x6860, 0x20a2, + 0x685c, 0x20a2, 0x6880, 0x20a2, 0x687c, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x000c, 0x080c, 0x7de0, 0x014e, + 0x013e, 0x015e, 0x00de, 0x0005, 0x0026, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb635, 0x2214, + 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, + 0x6810, 0xa085, 0x0500, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb61c, + 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb735, + 0x2d6c, 0x6810, 0xa085, 0x0500, 0x20a2, 0x6814, 0x20a2, 0x00de, + 0x20a3, 0x0000, 0x2011, 0xb615, 0x2214, 0x22a2, 0x20a3, 0x0889, + 0x20a3, 0x0000, 0x080c, 0x7dcf, 0x22a2, 0x20a3, 0x0000, 0x7a08, + 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, + 0x00d6, 0x0156, 0x0136, 0x0146, 0x7810, 0xa0ec, 0xf000, 0x0168, + 0xa06d, 0x080c, 0x5373, 0x0148, 0x684c, 0xa084, 0x2020, 0xa086, + 0x2020, 0x1118, 0x7820, 0xc0cd, 0x7822, 0x20a1, 0x020b, 0x080c, + 0x7b88, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x7810, + 0xa084, 0xf000, 0x1130, 0x7810, 0xa084, 0x0700, 0x8007, 0x0043, + 0x0010, 0xa006, 0x002b, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, + 0x7a5a, 0x7aef, 0x7aff, 0x7b31, 0x7b44, 0x7b5f, 0x7b68, 0x7a58, + 0x080c, 0x151a, 0x0016, 0x0036, 0x694c, 0xa18c, 0x0003, 0x0118, + 0xa186, 0x0003, 0x1170, 0x6b78, 0x7820, 0xd0cc, 0x0108, 0xc3e5, + 0x23a2, 0x6868, 0x20a2, 0x6864, 0x20a2, 0x003e, 0x001e, 0x0804, + 0x7b3b, 0xa186, 0x0001, 0x190c, 0x151a, 0x6b78, 0x7820, 0xd0cc, + 0x0108, 0xc3e5, 0x23a2, 0x6868, 0x20a2, 0x6864, 0x20a2, 0x22a2, + 0x6874, 0x20a2, 0x22a2, 0x687c, 0x20a2, 0x2009, 0x0018, 0xa384, + 0x0300, 0x0904, 0x7ae9, 0xd3c4, 0x0110, 0x687c, 0xa108, 0xd3cc, + 0x0110, 0x6874, 0xa108, 0x0156, 0x20a9, 0x000d, 0xad80, 0x0020, + 0x201c, 0x831f, 0x23a2, 0x8000, 0x1f04, 0x7a98, 0x015e, 0x22a2, + 0x22a2, 0x22a2, 0xa184, 0x0003, 0x0904, 0x7ae9, 0x20a1, 0x020b, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x0006, 0x7818, 0xa080, 0x0028, + 0x2004, 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, + 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0088, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0700, + 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, + 0x2214, 0x22a2, 0x000e, 0x7b20, 0xd3cc, 0x0118, 0x20a3, 0x0889, + 0x0010, 0x20a3, 0x0898, 0x20a2, 0x080c, 0x7dcf, 0x22a2, 0x20a3, + 0x0000, 0x61c2, 0x003e, 0x001e, 0x080c, 0x7de0, 0x0005, 0x2011, + 0x0008, 0x2001, 0xb60d, 0x2004, 0xd0f4, 0x0110, 0x2011, 0x0028, + 0x7820, 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x04d0, 0x2011, + 0x0302, 0x0016, 0x0036, 0x7828, 0x792c, 0xa11d, 0x0108, 0xc2dd, + 0x7b20, 0xd3cc, 0x0108, 0xc2e5, 0x22a2, 0x20a2, 0x21a2, 0x003e, + 0x001e, 0xa016, 0x22a2, 0x20a3, 0x0012, 0x22a2, 0x20a3, 0x0008, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x7000, 0x20a3, 0x0500, + 0x22a2, 0x20a3, 0x000a, 0x22a2, 0x22a2, 0x20a3, 0x2500, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0032, 0x080c, 0x7de0, + 0x0005, 0x2011, 0x0028, 0x7820, 0xd0cc, 0x0108, 0xc2e5, 0x22a2, + 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x60c3, + 0x0018, 0x080c, 0x7de0, 0x0005, 0x2011, 0x0100, 0x7820, 0xd0cc, + 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, + 0x22a2, 0x20a3, 0x0008, 0x22a2, 0x7854, 0xa084, 0x00ff, 0x20a2, + 0x22a2, 0x22a2, 0x60c3, 0x0020, 0x080c, 0x7de0, 0x0005, 0x2011, + 0x0008, 0x7820, 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x0888, + 0x0036, 0x7b10, 0xa384, 0xff00, 0x7812, 0xa384, 0x00ff, 0x8001, + 0x1138, 0x7820, 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0x003e, 0x0808, + 0x0046, 0x2021, 0x0800, 0x0006, 0x7820, 0xd0cc, 0x000e, 0x0108, + 0xc4e5, 0x24a2, 0x004e, 0x22a2, 0x20a2, 0x003e, 0x0804, 0x7b3b, + 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, + 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0088, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0700, + 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, + 0x2214, 0x22a2, 0x7820, 0xd0cc, 0x0118, 0x20a3, 0x0889, 0x0010, + 0x20a3, 0x0898, 0x20a3, 0x0000, 0x080c, 0x7dcf, 0x22a2, 0x20a3, + 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x002e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x0016, 0x0036, + 0x7810, 0xa084, 0x0700, 0x8007, 0x003b, 0x003e, 0x001e, 0x014e, + 0x013e, 0x015e, 0x00de, 0x0005, 0x7bec, 0x7bec, 0x7bee, 0x7bec, + 0x7bec, 0x7bec, 0x7c10, 0x7bec, 0x080c, 0x151a, 0x7910, 0xa18c, + 0xf8ff, 0xa18d, 0x0600, 0x7912, 0x20a1, 0x020b, 0x2009, 0x0003, + 0x00f9, 0x00d6, 0x2069, 0xb652, 0x6804, 0xd0bc, 0x0130, 0x682c, + 0xa084, 0x00ff, 0x8007, 0x20a2, 0x0010, 0x20a3, 0x3f00, 0x00de, + 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0001, 0x080c, 0x7de0, 0x0005, + 0x20a1, 0x020b, 0x2009, 0x0003, 0x0019, 0x20a3, 0x7f00, 0x0c80, + 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0x2011, 0xb635, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, + 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0100, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0088, 0x00d6, 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0100, + 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb615, + 0x2214, 0x22a2, 0x20a3, 0x0888, 0xa18d, 0x0008, 0x21a2, 0x080c, + 0x7dcf, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x00c6, + 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0xb600, 0x7154, + 0x7818, 0x2068, 0x68a0, 0x2028, 0x76d4, 0xd6ac, 0x1130, 0xd0bc, + 0x1120, 0x6910, 0x6a14, 0x7454, 0x0020, 0x6910, 0x6a14, 0x7370, + 0x7474, 0x781c, 0xa0be, 0x0006, 0x0904, 0x7d1a, 0xa0be, 0x000a, + 0x15e8, 0xa185, 0x0200, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, + 0x2029, 0x6077, 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, + 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, + 0x7810, 0x2070, 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, + 0x7008, 0x60ca, 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0x609f, 0x0000, 0x080c, 0x8640, 0x2009, 0x07d0, 0x60c4, 0xa084, + 0xfff0, 0xa005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x6a87, 0x003e, + 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x70d4, 0xd0ac, + 0x1110, 0xd5bc, 0x0138, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, + 0x646e, 0x0038, 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, + 0x646e, 0x6073, 0x0809, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, + 0x00ff, 0x688e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, + 0x7808, 0x6086, 0x7810, 0x2070, 0x7014, 0x608a, 0x7010, 0x608e, + 0x700c, 0x60c6, 0x7008, 0x60ca, 0x792c, 0xa108, 0x792e, 0x700c, + 0x7928, 0xa109, 0x792a, 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, + 0x0000, 0xa582, 0x0080, 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, + 0xa294, 0x00ff, 0x0010, 0x2011, 0x0000, 0x629e, 0x080c, 0x8640, + 0x2009, 0x07d0, 0x60c4, 0xa084, 0xfff0, 0xa005, 0x0110, 0x2009, + 0x1b58, 0x080c, 0x6a87, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, + 0x00ee, 0x0005, 0x7810, 0x2070, 0x704c, 0xa084, 0x0003, 0xa086, + 0x0002, 0x0904, 0x7d70, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1110, + 0xd5bc, 0x0138, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, + 0x0038, 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, + 0x6073, 0x0880, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, + 0x688e, 0x8007, 0x607a, 0x7834, 0x607e, 0x2f00, 0x6086, 0x7808, + 0x6082, 0x7060, 0x608a, 0x705c, 0x608e, 0x7080, 0x60c6, 0x707c, + 0x60ca, 0x707c, 0x792c, 0xa108, 0x792e, 0x7080, 0x7928, 0xa109, + 0x792a, 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, + 0x0080, 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, 0xa294, 0x00ff, + 0x0010, 0x2011, 0x0000, 0x629e, 0x080c, 0x863d, 0x0804, 0x7d08, + 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1110, 0xd5bc, 0x0138, 0xa185, + 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x0038, 0xa185, 0x0700, + 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x080c, 0x5373, 0x0180, + 0x00d6, 0x7810, 0xa06d, 0x684c, 0x00de, 0xa084, 0x2020, 0xa086, + 0x2020, 0x1130, 0x7820, 0xc0cd, 0x7822, 0x6073, 0x0889, 0x0010, + 0x6073, 0x0898, 0x6077, 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, + 0x688e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, + 0x6082, 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, + 0x60ca, 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, + 0x0080, 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, 0xa294, 0x00ff, + 0x0010, 0x2011, 0x0000, 0x629e, 0x7820, 0xd0cc, 0x0120, 0x080c, + 0x8640, 0x0804, 0x7d08, 0x080c, 0x863d, 0x0804, 0x7d08, 0x7a18, + 0xa280, 0x0023, 0x2014, 0x8210, 0xa294, 0x00ff, 0x2202, 0x8217, + 0x0005, 0x00d6, 0x2069, 0xb8e1, 0x6843, 0x0001, 0x00de, 0x0005, + 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x0019, 0x080c, + 0x6a79, 0x0005, 0x0006, 0x6014, 0xa084, 0x0004, 0xa085, 0x0009, + 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, 0x0100, + 0x61a4, 0x60a7, 0x95f5, 0x6014, 0xa084, 0x0004, 0xa085, 0x0008, + 0x6016, 0x000e, 0xe000, 0xe000, 0xe000, 0xe000, 0x61a6, 0x00ce, + 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, + 0x2069, 0x0140, 0x080c, 0x5b41, 0x1198, 0x2001, 0xb8fd, 0x2004, + 0xa005, 0x15b8, 0x0066, 0x2031, 0x0001, 0x080c, 0x5bc3, 0x006e, + 0x1118, 0x080c, 0x6a79, 0x0468, 0x00c6, 0x2061, 0xb8e1, 0x00d8, + 0x6904, 0xa194, 0x4000, 0x0550, 0x0831, 0x6803, 0x1000, 0x6803, + 0x0000, 0x00c6, 0x2061, 0xb8e1, 0x6128, 0xa192, 0x00c8, 0x1258, + 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x6a79, + 0x080c, 0x7dea, 0x0070, 0x6124, 0xa1e5, 0x0000, 0x0140, 0x080c, + 0xb500, 0x080c, 0x6a82, 0x2009, 0x0014, 0x080c, 0x86d3, 0x00ce, + 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0xb8fd, + 0x2004, 0xa005, 0x1db0, 0x00c6, 0x2061, 0xb8e1, 0x6128, 0xa192, + 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x6a79, 0x080c, + 0x4b7b, 0x0c38, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, + 0x6a8f, 0x2071, 0xb8e1, 0x713c, 0x81ff, 0x0590, 0x2061, 0x0100, + 0x2069, 0x0140, 0x080c, 0x5b41, 0x11a8, 0x0036, 0x2019, 0x0002, + 0x080c, 0x806b, 0x003e, 0x713c, 0x2160, 0x080c, 0xb500, 0x2009, + 0x004a, 0x080c, 0x86d3, 0x0066, 0x2031, 0x0001, 0x080c, 0x5bc3, + 0x006e, 0x00b0, 0x6904, 0xa194, 0x4000, 0x01c0, 0x6803, 0x1000, + 0x6803, 0x0000, 0x0036, 0x2019, 0x0001, 0x080c, 0x806b, 0x003e, + 0x713c, 0x2160, 0x080c, 0xb500, 0x2009, 0x004a, 0x080c, 0x86d3, + 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0c58, 0x0026, + 0x00e6, 0x2071, 0xb8e1, 0x7048, 0xd084, 0x01c0, 0x713c, 0x81ff, + 0x01a8, 0x2071, 0x0100, 0xa188, 0x0007, 0x2114, 0xa28e, 0x0006, + 0x1138, 0x7014, 0xa084, 0x0184, 0xa085, 0x0012, 0x7016, 0x0030, + 0x7014, 0xa084, 0x0184, 0xa085, 0x0016, 0x7016, 0x00ee, 0x002e, + 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, + 0x0126, 0x2091, 0x8000, 0x6018, 0x2068, 0x6ca0, 0x2071, 0xb8e1, + 0x7018, 0x2068, 0x8dff, 0x0188, 0x68a0, 0xa406, 0x0118, 0x6854, + 0x2068, 0x0cc0, 0x6010, 0x2060, 0x643c, 0x6540, 0x6648, 0x2d60, + 0x080c, 0x518c, 0x0110, 0xa085, 0x0001, 0x012e, 0x000e, 0x004e, + 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x20a1, 0x020b, + 0x080c, 0x76b3, 0x20a3, 0x1200, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x781c, 0xa086, 0x0004, 0x1110, 0x6098, 0x0018, 0x2001, 0xb615, + 0x2004, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a9, 0x0010, + 0xa006, 0x20a2, 0x1f04, 0x7f19, 0x20a2, 0x20a2, 0x60c3, 0x002c, + 0x080c, 0x7de0, 0x0005, 0x0156, 0x0146, 0x20a1, 0x020b, 0x080c, + 0x76b3, 0x20a3, 0x0f00, 0x20a3, 0x0000, 0x7808, 0xd09c, 0x1150, + 0x20a3, 0x0000, 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7de0, 0x014e, + 0x015e, 0x0005, 0x00d6, 0x7818, 0xa06d, 0x090c, 0x151a, 0x6810, + 0xa084, 0x00ff, 0x20a2, 0x6814, 0x00de, 0x0c60, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x774f, 0x20a3, 0x0200, 0x20a3, 0x0000, + 0x20a9, 0x0006, 0x2011, 0xb640, 0x2019, 0xb641, 0x23a6, 0x22a6, + 0xa398, 0x0002, 0xa290, 0x0002, 0x1f04, 0x7f56, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x001c, 0x080c, 0x7de0, 0x014e, 0x015e, + 0x0005, 0x0156, 0x0146, 0x0016, 0x0026, 0x20a1, 0x020b, 0x080c, + 0x7728, 0x080c, 0x773e, 0x7810, 0xa080, 0x0000, 0x2004, 0xa080, + 0x0015, 0x2098, 0x7808, 0xa088, 0x0002, 0x21a8, 0x53a6, 0xa080, + 0x0004, 0x8003, 0x60c2, 0x080c, 0x7de0, 0x002e, 0x001e, 0x014e, + 0x015e, 0x0005, 0x0156, 0x0146, 0x20a1, 0x020b, 0x080c, 0x76b3, + 0x20a3, 0x6200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, 0x20a2, + 0x60c3, 0x0008, 0x080c, 0x7de0, 0x014e, 0x015e, 0x0005, 0x0156, + 0x0146, 0x0016, 0x0026, 0x20a1, 0x020b, 0x080c, 0x76b3, 0x7810, + 0xa080, 0x0000, 0x2004, 0xa080, 0x0017, 0x2098, 0x7808, 0xa088, + 0x0002, 0x21a8, 0x53a6, 0x8003, 0x60c2, 0x080c, 0x7de0, 0x002e, + 0x001e, 0x014e, 0x015e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0xb8e1, 0x700c, 0x2060, 0x8cff, 0x0178, + 0x080c, 0x9f14, 0x1110, 0x080c, 0x8ca5, 0x600c, 0x0006, 0x080c, + 0xa0db, 0x080c, 0x86a4, 0x080c, 0x81a5, 0x00ce, 0x0c78, 0x700f, + 0x0000, 0x700b, 0x0000, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, + 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0026, 0x0016, + 0x0006, 0x2091, 0x8000, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, + 0xb8e1, 0x7024, 0x2060, 0x8cff, 0x05a0, 0x080c, 0x7df3, 0x68c3, + 0x0000, 0x080c, 0x6a82, 0x2009, 0x0013, 0x080c, 0x86d3, 0x20a9, + 0x01f4, 0x6824, 0xd094, 0x0158, 0x6827, 0x0004, 0x7804, 0xa084, + 0x4000, 0x01a0, 0x7803, 0x1000, 0x7803, 0x0000, 0x0078, 0xd084, + 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0x8001, 0x7804, 0xa084, + 0x1000, 0x0120, 0x7803, 0x0100, 0x7803, 0x0000, 0x6824, 0x000e, + 0x001e, 0x002e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, + 0x0005, 0x2001, 0xb600, 0x2004, 0xa096, 0x0001, 0x0590, 0xa096, + 0x0004, 0x0578, 0x080c, 0x6a82, 0x6814, 0xa084, 0x0001, 0x0110, + 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x4b23, + 0x080c, 0x6a0e, 0x20a9, 0x01f4, 0x6824, 0xd094, 0x0158, 0x6827, + 0x0004, 0x7804, 0xa084, 0x4000, 0x01a0, 0x7803, 0x1000, 0x7803, + 0x0000, 0x0078, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, + 0x8044, 0x7804, 0xa084, 0x1000, 0x0120, 0x7803, 0x0100, 0x7803, + 0x0000, 0x000e, 0x001e, 0x002e, 0x00ce, 0x00de, 0x00ee, 0x00fe, + 0x015e, 0x012e, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2069, 0x0100, + 0x2079, 0x0140, 0x2071, 0xb8e1, 0x703c, 0x2060, 0x8cff, 0x0904, + 0x80f2, 0xa386, 0x0002, 0x1128, 0x6814, 0xa084, 0x0002, 0x0904, + 0x80f2, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, + 0x1df0, 0x68c7, 0x0000, 0x68cb, 0x0008, 0x080c, 0x6a8f, 0x080c, + 0x222f, 0x0046, 0x2009, 0x017f, 0x200b, 0x00a5, 0x2021, 0x0169, + 0x2404, 0xa084, 0x000f, 0xa086, 0x0004, 0x1500, 0x68af, 0x95f5, + 0x68c7, 0x0000, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, 0x0020, + 0x2071, 0xb94b, 0x6814, 0xa084, 0x0184, 0xa085, 0x0012, 0x6816, + 0x7803, 0x0008, 0x7003, 0x0000, 0x00fe, 0x00ee, 0xa386, 0x0002, + 0x1128, 0x7884, 0xa005, 0x1110, 0x7887, 0x0001, 0x2001, 0xb8b1, + 0x2004, 0x200a, 0x004e, 0xa39d, 0x0000, 0x1120, 0x2009, 0x0049, + 0x080c, 0x86d3, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0158, 0x6827, + 0x0004, 0x7804, 0xa084, 0x4000, 0x01a0, 0x7803, 0x1000, 0x7803, + 0x0000, 0x0078, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, + 0x80d4, 0x7804, 0xa084, 0x1000, 0x0120, 0x7803, 0x0100, 0x7803, + 0x0000, 0x6824, 0x000e, 0x001e, 0x002e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, + 0x2069, 0xb8e1, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, + 0x2091, 0x8000, 0x2069, 0xb8e1, 0x6a32, 0x012e, 0x00de, 0x0005, + 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0006, 0x0126, 0x2071, 0xb8e1, + 0x7614, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0538, 0x601c, + 0xa206, 0x1500, 0x7014, 0xac36, 0x1110, 0x660c, 0x7616, 0x7010, + 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7012, 0x0010, + 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, 0x0110, 0x7e0e, + 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0x9ed9, 0x080c, 0x81a5, + 0x00ce, 0x08d8, 0x2c78, 0x600c, 0x2060, 0x08b8, 0x012e, 0x000e, + 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0156, 0x0146, 0x20a1, + 0x020b, 0x080c, 0x7974, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, + 0x20a2, 0x20a2, 0x20a3, 0x1000, 0x0804, 0x819d, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7974, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x4000, 0x0478, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7974, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x2000, 0x00f8, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7974, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0400, 0x0078, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7974, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0200, 0x0089, 0x60c3, 0x0020, + 0x080c, 0x7de0, 0x014e, 0x015e, 0x0005, 0x00e6, 0x2071, 0xb8e1, + 0x7020, 0xa005, 0x0110, 0x8001, 0x7022, 0x00ee, 0x0005, 0x20a9, + 0x0008, 0x20a2, 0x1f04, 0x81b1, 0x20a2, 0x20a2, 0x0005, 0x00f6, + 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0xb8e1, 0x7614, 0x2660, 0x2678, 0x2039, 0x0001, + 0x87ff, 0x0904, 0x824d, 0x8cff, 0x0904, 0x824d, 0x601c, 0xa086, + 0x0006, 0x1904, 0x8248, 0x88ff, 0x0138, 0x2800, 0xac06, 0x1904, + 0x8248, 0x2039, 0x0000, 0x0050, 0x6018, 0xa206, 0x1904, 0x8248, + 0x85ff, 0x0120, 0x6050, 0xa106, 0x1904, 0x8248, 0x7024, 0xac06, + 0x1598, 0x2069, 0x0100, 0x68c0, 0xa005, 0x1160, 0x6824, 0xd084, + 0x0148, 0x6827, 0x0001, 0x080c, 0x6a82, 0x080c, 0x82d4, 0x7027, + 0x0000, 0x0410, 0x080c, 0x6a82, 0x6820, 0xd0b4, 0x0110, 0x68a7, + 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0x82d4, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x7014, 0xac36, 0x1110, 0x660c, + 0x7616, 0x7010, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, + 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1158, 0x600f, 0x0000, + 0x6010, 0x2068, 0x080c, 0x9d16, 0x0110, 0x080c, 0xb155, 0x080c, + 0x9ed9, 0x080c, 0x81a5, 0x88ff, 0x1190, 0x00ce, 0x0804, 0x81c8, + 0x2c78, 0x600c, 0x2060, 0x0804, 0x81c8, 0xa006, 0x012e, 0x000e, + 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6017, + 0x0000, 0x00ce, 0xa8c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0xb8e1, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, 0x82c4, 0x601c, + 0xa086, 0x0006, 0x1904, 0x82bf, 0x87ff, 0x0128, 0x2700, 0xac06, + 0x1904, 0x82bf, 0x0048, 0x6018, 0xa206, 0x1904, 0x82bf, 0x85ff, + 0x0118, 0x6050, 0xa106, 0x15d8, 0x703c, 0xac06, 0x1180, 0x0036, + 0x2019, 0x0001, 0x080c, 0x806b, 0x7033, 0x0000, 0x703f, 0x0000, + 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, 0x0000, 0x003e, 0x7038, + 0xac36, 0x1110, 0x660c, 0x763a, 0x7034, 0xac36, 0x1140, 0x2c00, + 0xaf36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, + 0x0066, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, + 0x0000, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0110, 0x080c, 0xb155, + 0x080c, 0x9ed9, 0x87ff, 0x1190, 0x00ce, 0x0804, 0x826c, 0x2c78, + 0x600c, 0x2060, 0x0804, 0x826c, 0xa006, 0x012e, 0x000e, 0x002e, + 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6017, 0x0000, + 0x00ce, 0xa7bd, 0x0001, 0x0c88, 0x00e6, 0x2071, 0xb8e1, 0x2001, + 0xb600, 0x2004, 0xa086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, + 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, + 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0xb8e1, 0x2c10, + 0x7638, 0x2660, 0x2678, 0x8cff, 0x0518, 0x2200, 0xac06, 0x11e0, + 0x7038, 0xac36, 0x1110, 0x660c, 0x763a, 0x7034, 0xac36, 0x1140, + 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, + 0x660c, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, + 0x0000, 0xa085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, 0x08d8, + 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0xb8e1, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, + 0x83aa, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x1904, 0x83a5, + 0x7024, 0xac06, 0x1508, 0x2069, 0x0100, 0x68c0, 0xa005, 0x0904, + 0x8381, 0x080c, 0x7df3, 0x68c3, 0x0000, 0x080c, 0x82d4, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0xac36, 0x1110, 0x660c, + 0x760e, 0x7008, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, + 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0x9f03, + 0x1158, 0x080c, 0x2cf7, 0x080c, 0x9f14, 0x11f0, 0x080c, 0x8ca5, + 0x00d8, 0x080c, 0x82d4, 0x08c0, 0x080c, 0x9f14, 0x1118, 0x080c, + 0x8ca5, 0x0090, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0168, 0x601c, + 0xa086, 0x0003, 0x11f8, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, + 0x080c, 0x547a, 0x080c, 0x9ecd, 0x080c, 0xa0db, 0x080c, 0x9ed9, + 0x080c, 0x81a5, 0x00ce, 0x0804, 0x832e, 0x2c78, 0x600c, 0x2060, + 0x0804, 0x832e, 0x012e, 0x000e, 0x006e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x0005, 0x601c, 0xa086, 0x0006, 0x1d30, 0x080c, 0xb155, + 0x0c18, 0x0036, 0x0156, 0x0136, 0x0146, 0x3908, 0xa006, 0xa190, + 0x0020, 0x221c, 0xa39e, 0x2aec, 0x1118, 0x8210, 0x8000, 0x0cc8, + 0xa005, 0x0138, 0x20a9, 0x0020, 0x2198, 0xa110, 0x22a0, 0x22c8, + 0x53a3, 0x014e, 0x013e, 0x015e, 0x003e, 0x0005, 0x00d6, 0x20a1, + 0x020b, 0x080c, 0x774f, 0x20a3, 0x0200, 0x20a3, 0x0014, 0x60c3, + 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2099, 0xb8b9, 0x20a9, + 0x0004, 0x53a6, 0x20a3, 0x0004, 0x20a3, 0x7878, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x080c, 0x7de0, 0x00de, 0x0005, 0x20a1, 0x020b, + 0x080c, 0x774f, 0x20a3, 0x0214, 0x20a3, 0x0018, 0x20a3, 0x0800, + 0x7810, 0xa084, 0xff00, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7810, 0xa084, 0x00ff, 0x20a2, + 0x7828, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0018, + 0x080c, 0x7de0, 0x0005, 0x00d6, 0x0016, 0x2f68, 0x2009, 0x0035, + 0x080c, 0xa1c6, 0x1904, 0x8489, 0x20a1, 0x020b, 0x080c, 0x76b3, + 0x20a3, 0x1300, 0x20a3, 0x0000, 0x7828, 0x2068, 0x681c, 0xa086, + 0x0003, 0x0580, 0x7818, 0xa080, 0x0028, 0x2014, 0x2001, 0xb635, + 0x2004, 0xd0ac, 0x11d0, 0xa286, 0x007e, 0x1128, 0x20a3, 0x00ff, + 0x20a3, 0xfffe, 0x04b8, 0xa286, 0x007f, 0x1128, 0x20a3, 0x00ff, + 0x20a3, 0xfffd, 0x0478, 0xd2bc, 0x0180, 0xa286, 0x0080, 0x1128, + 0x20a3, 0x00ff, 0x20a3, 0xfffc, 0x0428, 0xa2e8, 0xb735, 0x2d6c, + 0x6810, 0x20a2, 0x6814, 0x20a2, 0x00e8, 0x20a3, 0x0000, 0x6098, + 0x20a2, 0x00c0, 0x2001, 0xb635, 0x2004, 0xd0ac, 0x1138, 0x7818, + 0xa080, 0x0028, 0x2004, 0xa082, 0x007e, 0x0240, 0x00d6, 0x2069, + 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0020, 0x20a3, 0x0000, + 0x6034, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x000c, 0x080c, 0x7de0, 0x001e, 0x00de, + 0x0005, 0x7817, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x0005, + 0x00d6, 0x0026, 0x7928, 0x2168, 0x691c, 0xa186, 0x0006, 0x01c0, + 0xa186, 0x0003, 0x0904, 0x84ff, 0xa186, 0x0005, 0x0904, 0x84e8, + 0xa186, 0x0004, 0x05b8, 0xa186, 0x0008, 0x0904, 0x84f0, 0x7807, + 0x0037, 0x7813, 0x1700, 0x080c, 0x8567, 0x002e, 0x00de, 0x0005, + 0x080c, 0x8523, 0x2009, 0x4000, 0x6800, 0x0002, 0x84c9, 0x84d4, + 0x84cb, 0x84d4, 0x84d0, 0x84c9, 0x84c9, 0x84d4, 0x84d4, 0x84d4, + 0x84d4, 0x84c9, 0x84c9, 0x84c9, 0x84c9, 0x84c9, 0x84d4, 0x84c9, + 0x84d4, 0x080c, 0x151a, 0x6820, 0xd0e4, 0x0110, 0xd0cc, 0x0110, + 0xa00e, 0x0010, 0x2009, 0x2000, 0x6828, 0x20a2, 0x682c, 0x20a2, + 0x0804, 0x8519, 0x080c, 0x8523, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x2009, 0x4000, 0x6a00, 0xa286, 0x0002, 0x1108, 0xa00e, 0x0488, + 0x04d1, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, 0x0448, + 0x0491, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, 0xa286, + 0x0005, 0x0118, 0xa286, 0x0002, 0x1108, 0xa00e, 0x00d0, 0x0419, + 0x6810, 0x2068, 0x697c, 0x6810, 0xa112, 0x6980, 0x6814, 0xa103, + 0x20a2, 0x22a2, 0x7928, 0xa180, 0x0000, 0x2004, 0xa08e, 0x0002, + 0x0130, 0xa08e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0010, 0x2009, + 0x0000, 0x21a2, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x080c, 0x7de0, + 0x002e, 0x00de, 0x0005, 0x0036, 0x0046, 0x0056, 0x0066, 0x20a1, + 0x020b, 0x080c, 0x774f, 0xa006, 0x20a3, 0x0200, 0x20a2, 0x7934, + 0x21a2, 0x7938, 0x21a2, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, + 0xb635, 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0268, 0x00d6, + 0x2069, 0xb61c, 0x2d2c, 0x8d68, 0x2d34, 0xa0e8, 0xb735, 0x2d6c, + 0x6b10, 0x6c14, 0x00de, 0x0030, 0x2019, 0x0000, 0x6498, 0x2029, + 0x0000, 0x6634, 0x7828, 0xa080, 0x0007, 0x2004, 0xa086, 0x0003, + 0x1128, 0x25a2, 0x26a2, 0x23a2, 0x24a2, 0x0020, 0x23a2, 0x24a2, + 0x25a2, 0x26a2, 0x006e, 0x005e, 0x004e, 0x003e, 0x0005, 0x20a1, + 0x020b, 0x080c, 0x774f, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, + 0x0009, 0x7810, 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7de0, 0x0005, + 0x20a1, 0x020b, 0x080c, 0x76ab, 0x20a3, 0x1400, 0x20a3, 0x0000, + 0x7834, 0x20a2, 0x7838, 0x20a2, 0x7828, 0x20a2, 0x782c, 0x20a2, + 0x7830, 0xa084, 0x00ff, 0x8007, 0x20a2, 0x20a3, 0x0000, 0x60c3, + 0x0010, 0x080c, 0x7de0, 0x0005, 0x20a1, 0x020b, 0x080c, 0x7747, + 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0x20a2, 0x7810, 0x20a2, + 0x60c3, 0x0008, 0x080c, 0x7de0, 0x0005, 0x0146, 0x20a1, 0x020b, + 0x0031, 0x60c3, 0x0000, 0x080c, 0x7de0, 0x014e, 0x0005, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, + 0xb635, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, + 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0300, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb61c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0078, 0x00d6, + 0xa0e8, 0xb735, 0x2d6c, 0x6810, 0xa085, 0x0300, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x6234, 0x22a2, 0x20a3, 0x0819, + 0x20a3, 0x0000, 0x080c, 0x7dcf, 0x22a2, 0x20a3, 0x0000, 0x2fa2, + 0x7a08, 0x22a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x0005, 0x20a1, + 0x020b, 0x0079, 0x7910, 0x21a2, 0x20a3, 0x0000, 0x60c3, 0x0000, + 0x20e1, 0x9080, 0x60a7, 0x9575, 0x080c, 0x7dea, 0x080c, 0x6a79, + 0x0005, 0x0156, 0x0136, 0x0036, 0x00d6, 0x00e6, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7854, 0x2068, 0xadf0, 0x000f, 0x7210, 0xa296, + 0x00c0, 0xa294, 0xfffd, 0x7212, 0x7214, 0xa294, 0x0300, 0x7216, + 0x7100, 0xa194, 0x00ff, 0x7308, 0xa384, 0x00ff, 0xa08d, 0xc200, + 0x7102, 0xa384, 0xff00, 0xa215, 0x720a, 0x7004, 0x720c, 0x700e, + 0x7206, 0x20a9, 0x000a, 0x2e98, 0x53a6, 0x60a3, 0x0035, 0x6a38, + 0xa294, 0x7000, 0xa286, 0x3000, 0x0110, 0x60a3, 0x0037, 0x00ee, + 0x00de, 0x003e, 0x013e, 0x015e, 0x0005, 0x2009, 0x0092, 0x0010, + 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2061, 0xbe00, + 0x2a70, 0x7068, 0x704a, 0x704f, 0xbe00, 0x0005, 0x00e6, 0x0126, + 0x2071, 0xb600, 0x2091, 0x8000, 0x7548, 0xa582, 0x0010, 0x0608, + 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0148, 0xace0, 0x0018, + 0x705c, 0xac02, 0x1208, 0x0cb0, 0x2061, 0xbe00, 0x0c98, 0x6003, + 0x0008, 0x8529, 0x754a, 0xaca8, 0x0018, 0x705c, 0xa502, 0x1230, + 0x754e, 0xa085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x704f, 0xbe00, + 0x0cc0, 0xa006, 0x0cc0, 0x00e6, 0x2071, 0xb600, 0x7548, 0xa582, + 0x0010, 0x0600, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0148, + 0xace0, 0x0018, 0x705c, 0xac02, 0x1208, 0x0cb0, 0x2061, 0xbe00, + 0x0c98, 0x6003, 0x0008, 0x8529, 0x754a, 0xaca8, 0x0018, 0x705c, + 0xa502, 0x1228, 0x754e, 0xa085, 0x0001, 0x00ee, 0x0005, 0x704f, + 0xbe00, 0x0cc8, 0xa006, 0x0cc8, 0xac82, 0xbe00, 0x0a0c, 0x151a, + 0x2001, 0xb617, 0x2004, 0xac02, 0x1a0c, 0x151a, 0xa006, 0x6006, + 0x600a, 0x600e, 0x6012, 0x6016, 0x601a, 0x601f, 0x0000, 0x6003, + 0x0000, 0x6052, 0x6056, 0x6022, 0x6026, 0x602a, 0x602e, 0x6032, + 0x6036, 0x603a, 0x603e, 0x2061, 0xb600, 0x6048, 0x8000, 0x604a, + 0xa086, 0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, + 0x71e5, 0x012e, 0x0cc0, 0x601c, 0xa084, 0x000f, 0x0002, 0x86e7, + 0x86f6, 0x8711, 0x872c, 0xa20e, 0xa229, 0xa244, 0x86e7, 0x86f6, + 0x86e7, 0x8747, 0x86e7, 0x86e7, 0x86e7, 0x86e7, 0x86e7, 0xa186, + 0x0013, 0x1128, 0x080c, 0x7102, 0x080c, 0x71e5, 0x0005, 0xa18e, + 0x0047, 0x1118, 0xa016, 0x080c, 0x1863, 0x0005, 0x0066, 0x6000, + 0xa0b2, 0x0010, 0x1a0c, 0x151a, 0x0013, 0x006e, 0x0005, 0x870f, + 0x8b27, 0x8cdf, 0x870f, 0x8d54, 0x8805, 0x870f, 0x870f, 0x8ab9, + 0x917b, 0x870f, 0x870f, 0x870f, 0x870f, 0x870f, 0x870f, 0x080c, + 0x151a, 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x151a, 0x0013, + 0x006e, 0x0005, 0x872a, 0x97de, 0x872a, 0x872a, 0x872a, 0x872a, + 0x872a, 0x872a, 0x9789, 0x994a, 0x872a, 0x980b, 0x9882, 0x980b, + 0x9882, 0x872a, 0x080c, 0x151a, 0x0066, 0x6000, 0xa0b2, 0x0010, + 0x1a0c, 0x151a, 0x0013, 0x006e, 0x0005, 0x8745, 0x91bc, 0x9286, + 0x93c4, 0x954d, 0x8745, 0x8745, 0x8745, 0x9196, 0x9739, 0x973c, + 0x8745, 0x8745, 0x8745, 0x8745, 0x9766, 0x080c, 0x151a, 0x0066, + 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x151a, 0x0013, 0x006e, 0x0005, + 0x8760, 0x8760, 0x8760, 0x878e, 0x87db, 0x8760, 0x8760, 0x8760, + 0x8762, 0x8760, 0x8760, 0x8760, 0x8760, 0x8760, 0x8760, 0x8760, + 0x080c, 0x151a, 0xa186, 0x0003, 0x190c, 0x151a, 0x00d6, 0x6003, + 0x0003, 0x6106, 0x6010, 0x2068, 0x684f, 0x0040, 0x687c, 0x680a, + 0x6880, 0x680e, 0x6813, 0x0000, 0x6817, 0x0000, 0x6854, 0xa092, + 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0xa210, + 0x6216, 0x00de, 0x2c10, 0x080c, 0x1fc5, 0x080c, 0x6d62, 0x0126, + 0x2091, 0x8000, 0x080c, 0x72a2, 0x012e, 0x0005, 0xa182, 0x0047, + 0x0002, 0x879a, 0x879a, 0x879c, 0x87b5, 0x879a, 0x879a, 0x879a, + 0x879a, 0x87c7, 0x080c, 0x151a, 0x00d6, 0x0016, 0x080c, 0x7198, + 0x080c, 0x72a2, 0x6003, 0x0004, 0x6110, 0x2168, 0x684f, 0x0020, + 0x685c, 0x685a, 0x6874, 0x687e, 0x6878, 0x6882, 0x6897, 0x0000, + 0x689b, 0x0000, 0x001e, 0x00de, 0x0005, 0x080c, 0x7198, 0x00d6, + 0x6110, 0x2168, 0x080c, 0x9d16, 0x0120, 0x684b, 0x0006, 0x080c, + 0x547a, 0x00de, 0x080c, 0x86a4, 0x080c, 0x72a2, 0x0005, 0x080c, + 0x7198, 0x080c, 0x2cd1, 0x00d6, 0x6110, 0x2168, 0x080c, 0x9d16, + 0x0120, 0x684b, 0x0029, 0x080c, 0x547a, 0x00de, 0x080c, 0x86a4, + 0x080c, 0x72a2, 0x0005, 0xa182, 0x0047, 0x0002, 0x87e9, 0x87f8, + 0x87e7, 0x87e7, 0x87e7, 0x87e7, 0x87e7, 0x87e7, 0x87e7, 0x080c, + 0x151a, 0x00d6, 0x6010, 0x2068, 0x684c, 0xc0f4, 0x684e, 0x00de, + 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x080c, 0x1863, 0x0005, + 0x00d6, 0x6110, 0x2168, 0x684b, 0x0000, 0x6853, 0x0000, 0x080c, + 0x547a, 0x00de, 0x080c, 0x86a4, 0x0005, 0xa1b6, 0x0015, 0x1118, + 0x080c, 0x86a4, 0x0030, 0xa1b6, 0x0016, 0x190c, 0x151a, 0x080c, + 0x86a4, 0x0005, 0x20a9, 0x000e, 0x2e98, 0x6010, 0x20a0, 0x53a3, + 0x20a9, 0x0006, 0x3310, 0x3420, 0x9398, 0x94a0, 0x3318, 0x3428, + 0x222e, 0x2326, 0xa290, 0x0002, 0xa5a8, 0x0002, 0xa398, 0x0002, + 0xa4a0, 0x0002, 0x1f04, 0x8820, 0x00e6, 0x080c, 0x9d16, 0x0130, + 0x6010, 0x2070, 0x7007, 0x0000, 0x7037, 0x0103, 0x00ee, 0x080c, + 0x86a4, 0x0005, 0x00d6, 0x0036, 0x7330, 0xa386, 0x0200, 0x1130, + 0x6018, 0x2068, 0x6813, 0x00ff, 0x6817, 0xfffd, 0x6010, 0xa005, + 0x0130, 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, 0x6b32, 0x080c, + 0x86a4, 0x003e, 0x00de, 0x0005, 0x0016, 0x20a9, 0x002a, 0xae80, + 0x000c, 0x2098, 0x6010, 0xa080, 0x0002, 0x20a0, 0x53a3, 0x20a9, + 0x002a, 0x6010, 0xa080, 0x0001, 0x2004, 0xa080, 0x0002, 0x20a0, + 0x53a3, 0x00e6, 0x6010, 0x2004, 0x2070, 0x7037, 0x0103, 0x00ee, + 0x080c, 0x86a4, 0x001e, 0x0005, 0x0016, 0x2009, 0x0000, 0x7030, + 0xa086, 0x0100, 0x0140, 0x7038, 0xa084, 0x00ff, 0x800c, 0x703c, + 0xa084, 0x00ff, 0x8004, 0xa080, 0x0004, 0xa108, 0x21a8, 0xae80, + 0x000c, 0x2098, 0x6010, 0xa080, 0x0002, 0x20a0, 0x080c, 0x4bf1, + 0x00e6, 0x080c, 0x9d16, 0x0140, 0x6010, 0x2070, 0x7007, 0x0000, + 0x7034, 0x70b2, 0x7037, 0x0103, 0x00ee, 0x080c, 0x86a4, 0x001e, + 0x0005, 0x00e6, 0x00d6, 0x603f, 0x0000, 0x2c68, 0x0016, 0x2009, + 0x0035, 0x080c, 0xa1c6, 0x001e, 0x1168, 0x0026, 0x6228, 0x2268, + 0x002e, 0x2071, 0xbc8c, 0x6b1c, 0xa386, 0x0003, 0x0130, 0xa386, + 0x0006, 0x0128, 0x080c, 0x86a4, 0x0020, 0x0031, 0x0010, 0x080c, + 0x8982, 0x00de, 0x00ee, 0x0005, 0x00f6, 0x6810, 0x2078, 0xa186, + 0x0015, 0x0904, 0x8969, 0xa18e, 0x0016, 0x1904, 0x8980, 0x700c, + 0xa08c, 0xff00, 0xa186, 0x1700, 0x0120, 0xa186, 0x0300, 0x1904, + 0x8948, 0x8fff, 0x1138, 0x6800, 0xa086, 0x000f, 0x0904, 0x892c, + 0x0804, 0x897e, 0x6808, 0xa086, 0xffff, 0x1904, 0x896b, 0x784c, + 0xa084, 0x0060, 0xa086, 0x0020, 0x1150, 0x797c, 0x7810, 0xa106, + 0x1904, 0x896b, 0x7980, 0x7814, 0xa106, 0x1904, 0x896b, 0x080c, + 0x9ecd, 0x6858, 0x7852, 0x784c, 0xc0dc, 0xc0f4, 0xc0d4, 0x784e, + 0x0026, 0xa00e, 0x6a14, 0x2001, 0x000a, 0x080c, 0x6bb2, 0x7854, + 0xa20a, 0x0208, 0x8011, 0x7a56, 0x82ff, 0x002e, 0x1138, 0x00c6, + 0x2d60, 0x080c, 0x9ac5, 0x00ce, 0x0804, 0x897e, 0x00c6, 0x00d6, + 0x2f68, 0x6838, 0xd0fc, 0x1118, 0x080c, 0x4cd7, 0x0010, 0x080c, + 0x4ebb, 0x00de, 0x00ce, 0x1904, 0x896b, 0x00c6, 0x2d60, 0x080c, + 0x86a4, 0x00ce, 0x0804, 0x897e, 0x00c6, 0x080c, 0x9f92, 0x0190, + 0x6013, 0x0000, 0x6818, 0x601a, 0x080c, 0xa0e3, 0x601f, 0x0003, + 0x6904, 0x00c6, 0x2d60, 0x080c, 0x86a4, 0x00ce, 0x080c, 0x86d3, + 0x00ce, 0x04e0, 0x2001, 0xb8b8, 0x2004, 0x683e, 0x00ce, 0x04b0, + 0x7008, 0xa086, 0x000b, 0x11a0, 0x6018, 0x200c, 0xc1bc, 0x2102, + 0x00c6, 0x2d60, 0x784b, 0x0003, 0x6007, 0x0085, 0x6003, 0x000b, + 0x601f, 0x0002, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x00ce, 0x00f0, + 0x700c, 0xa086, 0x2a00, 0x1138, 0x2001, 0xb8b8, 0x2004, 0x683e, + 0x00a8, 0x0481, 0x00a8, 0x8fff, 0x090c, 0x151a, 0x00c6, 0x00d6, + 0x2d60, 0x2f68, 0x6837, 0x0103, 0x684b, 0x0003, 0x080c, 0x99b9, + 0x080c, 0x9ecd, 0x080c, 0x9ed9, 0x00de, 0x00ce, 0x080c, 0x86a4, + 0x00fe, 0x0005, 0xa186, 0x0015, 0x1128, 0x2001, 0xb8b8, 0x2004, + 0x683e, 0x0068, 0xa18e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, + 0x080c, 0xb3f6, 0x080c, 0x6b61, 0x080c, 0x86a4, 0x00ce, 0x080c, + 0x86a4, 0x0005, 0x0026, 0x0036, 0x0046, 0x7228, 0x7c80, 0x7b7c, + 0xd2f4, 0x0130, 0x2001, 0xb8b8, 0x2004, 0x683e, 0x0804, 0x89fc, + 0x00c6, 0x2d60, 0x080c, 0x99d9, 0x00ce, 0x6804, 0xa086, 0x0050, + 0x1168, 0x00c6, 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, + 0x080c, 0x6cff, 0x080c, 0x71e5, 0x00ce, 0x04f0, 0x6800, 0xa086, + 0x000f, 0x01c8, 0x8fff, 0x090c, 0x151a, 0x6820, 0xd0dc, 0x1198, + 0x6800, 0xa086, 0x0004, 0x1198, 0x784c, 0xd0ac, 0x0180, 0x784c, + 0xc0dc, 0xc0f4, 0x784e, 0x7850, 0xc0f4, 0xc0fc, 0x7852, 0x2001, + 0x0001, 0x682e, 0x00e0, 0x2001, 0x0007, 0x682e, 0x00c0, 0x784c, + 0xd0b4, 0x1130, 0xd0ac, 0x0db8, 0x784c, 0xd0f4, 0x1da0, 0x0c38, + 0xd2ec, 0x1d88, 0x7024, 0xa306, 0x1118, 0x7020, 0xa406, 0x0d58, + 0x7020, 0x6836, 0x7024, 0x683a, 0x2001, 0x0005, 0x682e, 0x080c, + 0xa01f, 0x080c, 0x71e5, 0x0010, 0x080c, 0x86a4, 0x004e, 0x003e, + 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x6034, 0x2068, 0x6a1c, + 0xa286, 0x0007, 0x0904, 0x8a60, 0xa286, 0x0002, 0x0904, 0x8a60, + 0xa286, 0x0000, 0x0904, 0x8a60, 0x6808, 0x6338, 0xa306, 0x1904, + 0x8a60, 0x2071, 0xbc8c, 0xa186, 0x0015, 0x05e0, 0xa18e, 0x0016, + 0x1190, 0x6030, 0xa084, 0x00ff, 0xa086, 0x0001, 0x1160, 0x700c, + 0xa086, 0x2a00, 0x1140, 0x6034, 0xa080, 0x0008, 0x200c, 0xc1dd, + 0xc1f5, 0x2102, 0x0438, 0x00c6, 0x6034, 0x2060, 0x6104, 0xa186, + 0x004b, 0x01a0, 0xa186, 0x004c, 0x0188, 0xa186, 0x004d, 0x0170, + 0xa186, 0x004e, 0x0158, 0xa186, 0x0052, 0x0140, 0x6010, 0x2068, + 0x080c, 0x9d16, 0x090c, 0x151a, 0x684b, 0x0003, 0x6007, 0x0085, + 0x6003, 0x000b, 0x601f, 0x0002, 0x080c, 0x6cff, 0x080c, 0x71e5, + 0x00ce, 0x0030, 0x6034, 0x2070, 0x2001, 0xb8b8, 0x2004, 0x703e, + 0x080c, 0x86a4, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00d6, 0x20a9, + 0x000e, 0x2e98, 0x6010, 0x20a0, 0x53a3, 0xa1b6, 0x0015, 0x1558, + 0x6018, 0x2068, 0x0156, 0x0036, 0x0026, 0xae90, 0x000c, 0xa290, + 0x0004, 0x20a9, 0x0004, 0xad98, 0x000a, 0x080c, 0x9166, 0x002e, + 0x003e, 0x015e, 0x11d8, 0x0156, 0x0036, 0x0026, 0xae90, 0x000c, + 0xa290, 0x0008, 0x20a9, 0x0004, 0xad98, 0x0006, 0x080c, 0x9166, + 0x002e, 0x003e, 0x015e, 0x1150, 0x7038, 0x680a, 0x703c, 0x680e, + 0x6800, 0xc08d, 0x6802, 0x00de, 0x0804, 0x882c, 0x080c, 0x2cd1, + 0x00c6, 0x080c, 0x864e, 0x2f00, 0x601a, 0x6013, 0x0000, 0x601f, + 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, + 0x4f6f, 0x080c, 0x4f9c, 0x080c, 0x6d45, 0x080c, 0x71e5, 0x00ce, + 0x0c10, 0x2100, 0xa1b2, 0x0080, 0x1a0c, 0x151a, 0xa1b2, 0x0040, + 0x1a04, 0x8b1d, 0x0002, 0x8b11, 0x8b05, 0x8b11, 0x8b11, 0x8b11, + 0x8b11, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, + 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, + 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, + 0x8b03, 0x8b03, 0x8b11, 0x8b03, 0x8b11, 0x8b11, 0x8b03, 0x8b03, + 0x8b03, 0x8b03, 0x8b03, 0x8b11, 0x8b03, 0x8b03, 0x8b03, 0x8b03, + 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b11, 0x8b11, 0x8b03, + 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, 0x8b03, + 0x8b11, 0x8b03, 0x8b03, 0x080c, 0x151a, 0x6003, 0x0001, 0x6106, + 0x080c, 0x6d45, 0x0126, 0x2091, 0x8000, 0x080c, 0x71e5, 0x012e, + 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x6d45, 0x0126, 0x2091, + 0x8000, 0x080c, 0x71e5, 0x012e, 0x0005, 0x2600, 0x0002, 0x8b11, + 0x8b11, 0x8b25, 0x8b11, 0x8b11, 0x8b25, 0x080c, 0x151a, 0x6004, + 0xa0b2, 0x0080, 0x1a0c, 0x151a, 0xa1b6, 0x0013, 0x0904, 0x8bd7, + 0xa1b6, 0x0027, 0x1904, 0x8b9d, 0x080c, 0x7102, 0x6004, 0x080c, + 0x9f03, 0x0190, 0x080c, 0x9f14, 0x0904, 0x8b97, 0xa08e, 0x0021, + 0x0904, 0x8b9a, 0xa08e, 0x0022, 0x0904, 0x8b97, 0xa08e, 0x003d, + 0x0904, 0x8b9a, 0x0804, 0x8b90, 0x080c, 0x2cf7, 0x2001, 0x0007, + 0x080c, 0x4f6f, 0x6018, 0xa080, 0x0028, 0x200c, 0x080c, 0x8ca5, + 0xa186, 0x007e, 0x1148, 0x2001, 0xb635, 0x2014, 0xc285, 0x080c, + 0x5b41, 0x1108, 0xc2ad, 0x2202, 0x0016, 0x0026, 0x0036, 0x2110, + 0x0026, 0x2019, 0x0028, 0x080c, 0x8320, 0x002e, 0x080c, 0xb449, + 0x003e, 0x002e, 0x001e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, + 0x0028, 0x080c, 0x6e67, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d74, + 0x00c6, 0x6018, 0xa065, 0x0110, 0x080c, 0x521c, 0x00ce, 0x2c08, + 0x080c, 0xaf3e, 0x007e, 0x003e, 0x002e, 0x001e, 0x080c, 0x4fde, + 0x080c, 0xa0db, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x0005, 0x080c, + 0x8ca5, 0x0cb0, 0x080c, 0x8cd3, 0x0c98, 0xa186, 0x0014, 0x1db0, + 0x080c, 0x7102, 0x080c, 0x2cd1, 0x080c, 0x9f03, 0x1188, 0x080c, + 0x2cf7, 0x6018, 0xa080, 0x0028, 0x200c, 0x080c, 0x8ca5, 0xa186, + 0x007e, 0x1128, 0x2001, 0xb635, 0x200c, 0xc185, 0x2102, 0x08c0, + 0x080c, 0x9f14, 0x1118, 0x080c, 0x8ca5, 0x0890, 0x6004, 0xa08e, + 0x0032, 0x1158, 0x00e6, 0x00f6, 0x2071, 0xb682, 0x2079, 0x0000, + 0x080c, 0x3004, 0x00fe, 0x00ee, 0x0818, 0x6004, 0xa08e, 0x0021, + 0x0d50, 0xa08e, 0x0022, 0x090c, 0x8ca5, 0x0804, 0x8b90, 0xa0b2, + 0x0040, 0x1a04, 0x8c9a, 0x2008, 0x0002, 0x8c1f, 0x8c20, 0x8c23, + 0x8c26, 0x8c29, 0x8c2c, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, + 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, + 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, + 0x8c1d, 0x8c1d, 0x8c1d, 0x8c2f, 0x8c3e, 0x8c1d, 0x8c40, 0x8c3e, + 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c3e, 0x8c3e, 0x8c1d, + 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c7a, + 0x8c3e, 0x8c1d, 0x8c3a, 0x8c1d, 0x8c1d, 0x8c1d, 0x8c3b, 0x8c1d, + 0x8c1d, 0x8c1d, 0x8c3e, 0x8c71, 0x8c1d, 0x080c, 0x151a, 0x00f0, + 0x2001, 0x000b, 0x0460, 0x2001, 0x0003, 0x0448, 0x2001, 0x0005, + 0x0430, 0x2001, 0x0001, 0x0418, 0x2001, 0x0009, 0x0400, 0x080c, + 0x7102, 0x6003, 0x0005, 0x2001, 0xb8b8, 0x2004, 0x603e, 0x080c, + 0x71e5, 0x00a0, 0x0018, 0x0010, 0x080c, 0x4f6f, 0x0804, 0x8c8b, + 0x080c, 0x7102, 0x2001, 0xb8b6, 0x2004, 0x6016, 0x2001, 0xb8b8, + 0x2004, 0x603e, 0x6003, 0x0004, 0x080c, 0x71e5, 0x0005, 0x080c, + 0x4f6f, 0x080c, 0x7102, 0x6003, 0x0002, 0x2001, 0xb8b8, 0x2004, + 0x603e, 0x0036, 0x2019, 0xb65d, 0x2304, 0xa084, 0xff00, 0x1120, + 0x2001, 0xb8b6, 0x201c, 0x0040, 0x8007, 0xa09a, 0x0004, 0x0ec0, + 0x8003, 0x801b, 0x831b, 0xa318, 0x6316, 0x003e, 0x080c, 0x71e5, + 0x08e8, 0x080c, 0x7102, 0x080c, 0xa0db, 0x080c, 0x86a4, 0x080c, + 0x71e5, 0x08a0, 0x00e6, 0x00f6, 0x2071, 0xb682, 0x2079, 0x0000, + 0x080c, 0x3004, 0x00fe, 0x00ee, 0x080c, 0x7102, 0x080c, 0x86a4, + 0x080c, 0x71e5, 0x0818, 0x080c, 0x7102, 0x2001, 0xb8b8, 0x2004, + 0x603e, 0x6003, 0x0002, 0x2001, 0xb8b6, 0x2004, 0x6016, 0x080c, + 0x71e5, 0x0005, 0x2600, 0x2008, 0x0002, 0x8ca3, 0x8ca3, 0x8ca3, + 0x8c8b, 0x8c8b, 0x8ca3, 0x080c, 0x151a, 0x00e6, 0x0026, 0x0016, + 0x080c, 0x9d16, 0x0508, 0x6010, 0x2070, 0x7034, 0xa086, 0x0139, + 0x1148, 0x2001, 0x0030, 0x2009, 0x0000, 0x2011, 0x4005, 0x080c, + 0xa192, 0x0090, 0x7038, 0xd0fc, 0x0178, 0x7007, 0x0000, 0x0016, + 0x6004, 0xa08e, 0x0021, 0x0160, 0xa08e, 0x003d, 0x0148, 0x001e, + 0x7037, 0x0103, 0x7033, 0x0100, 0x001e, 0x002e, 0x00ee, 0x0005, + 0x001e, 0x0009, 0x0cc8, 0x00e6, 0xacf0, 0x0004, 0x2e74, 0x7000, + 0x2070, 0x7037, 0x0103, 0x7023, 0x8001, 0x00ee, 0x0005, 0x00d6, + 0x6618, 0x2668, 0x6804, 0xa084, 0x00ff, 0x00de, 0xa0b2, 0x000c, + 0x1a0c, 0x151a, 0x6604, 0xa6b6, 0x0043, 0x1120, 0x080c, 0xa14e, + 0x0804, 0x8d44, 0x6604, 0xa6b6, 0x0033, 0x1120, 0x080c, 0xa0fe, + 0x0804, 0x8d44, 0x6604, 0xa6b6, 0x0028, 0x1120, 0x080c, 0x9f44, + 0x0804, 0x8d44, 0x6604, 0xa6b6, 0x0029, 0x1118, 0x080c, 0x9f5b, + 0x04d8, 0x6604, 0xa6b6, 0x001f, 0x1118, 0x080c, 0x8812, 0x04a0, + 0x6604, 0xa6b6, 0x0000, 0x1118, 0x080c, 0x8a66, 0x0468, 0x6604, + 0xa6b6, 0x0022, 0x1118, 0x080c, 0x883a, 0x0430, 0x6604, 0xa6b6, + 0x0035, 0x1118, 0x080c, 0x88a1, 0x00f8, 0x6604, 0xa6b6, 0x0039, + 0x1118, 0x080c, 0x8a02, 0x00c0, 0x6604, 0xa6b6, 0x003d, 0x1118, + 0x080c, 0x8854, 0x0088, 0x6604, 0xa6b6, 0x0044, 0x1118, 0x080c, + 0x8874, 0x0050, 0xa1b6, 0x0015, 0x1110, 0x0053, 0x0028, 0xa1b6, + 0x0016, 0x1118, 0x0804, 0x8f08, 0x0005, 0x080c, 0x86ef, 0x0ce0, + 0x8d6b, 0x8d6e, 0x8d6b, 0x8db0, 0x8d6b, 0x8e95, 0x8f16, 0x8d6b, + 0x8d6b, 0x8ee4, 0x8d6b, 0x8ef8, 0xa1b6, 0x0048, 0x0140, 0x20e1, + 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x080c, 0x1863, 0x0005, 0x00e6, + 0xacf0, 0x0004, 0x2e74, 0x7000, 0x2070, 0x7037, 0x0103, 0x00ee, + 0x080c, 0x86a4, 0x0005, 0xe000, 0xe000, 0x0005, 0x00e6, 0x2071, + 0xb600, 0x7084, 0xa086, 0x0074, 0x1530, 0x080c, 0xaf15, 0x11b0, + 0x00d6, 0x6018, 0x2068, 0x7030, 0xd08c, 0x0128, 0x6800, 0xd0bc, + 0x0110, 0xc0c5, 0x6802, 0x00d9, 0x00de, 0x2001, 0x0006, 0x080c, + 0x4f6f, 0x080c, 0x2cf7, 0x080c, 0x86a4, 0x0078, 0x2001, 0x000a, + 0x080c, 0x4f6f, 0x080c, 0x2cf7, 0x6003, 0x0001, 0x6007, 0x0001, + 0x080c, 0x6d45, 0x0010, 0x080c, 0x8e82, 0x00ee, 0x0005, 0x6800, + 0xd084, 0x0168, 0x2001, 0x0000, 0x080c, 0x4f5d, 0x2069, 0xb652, + 0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x4f9c, 0x0005, + 0x00d6, 0x2011, 0xb621, 0x2204, 0xa086, 0x0074, 0x1904, 0x8e7f, + 0x6018, 0x2068, 0x6aa0, 0xa286, 0x007e, 0x1120, 0x080c, 0x902e, + 0x0804, 0x8e1e, 0x080c, 0x9024, 0x6018, 0x2068, 0xa080, 0x0028, + 0x2014, 0xa286, 0x0080, 0x11c0, 0x6813, 0x00ff, 0x6817, 0xfffc, + 0x6010, 0xa005, 0x0138, 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, + 0x6833, 0x0200, 0x2001, 0x0006, 0x080c, 0x4f6f, 0x080c, 0x2cf7, + 0x080c, 0x86a4, 0x0804, 0x8e80, 0x00e6, 0x2071, 0xb635, 0x2e04, + 0xd09c, 0x0188, 0x2071, 0xbc80, 0x7108, 0x720c, 0xa18c, 0x00ff, + 0x1118, 0xa284, 0xff00, 0x0138, 0x6018, 0x2070, 0x70a0, 0xd0bc, + 0x1110, 0x7112, 0x7216, 0x00ee, 0x6010, 0xa005, 0x0198, 0x2068, + 0x6838, 0xd0f4, 0x0178, 0x6834, 0xa084, 0x00ff, 0xa086, 0x0039, + 0x1958, 0x2001, 0x0000, 0x2009, 0x0000, 0x2011, 0x4000, 0x080c, + 0xa192, 0x0840, 0x2001, 0x0004, 0x080c, 0x4f6f, 0x6003, 0x0001, + 0x6007, 0x0003, 0x080c, 0x6d45, 0x0804, 0x8e80, 0x685c, 0xd0e4, + 0x01d8, 0x080c, 0xa08e, 0x080c, 0x5b41, 0x0118, 0xd0dc, 0x1904, + 0x8dda, 0x2011, 0xb635, 0x2204, 0xc0ad, 0x2012, 0x2001, 0xb88f, + 0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c, 0x28a7, + 0x78e2, 0x00fe, 0x0804, 0x8dda, 0x080c, 0xa0c4, 0x2011, 0xb635, + 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xb037, 0x000e, 0x1904, + 0x8dda, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x4f6f, 0x2001, + 0x0000, 0x080c, 0x4f5d, 0x00c6, 0x2009, 0x00ef, 0x00f6, 0x2079, + 0x0100, 0x79ea, 0x7932, 0x7936, 0x00fe, 0x080c, 0x287c, 0x00f6, + 0x2079, 0xb600, 0x7976, 0x2100, 0x2009, 0x0000, 0x080c, 0x2852, + 0x7952, 0x00fe, 0x8108, 0x080c, 0x4fbf, 0x2c00, 0x00ce, 0x1904, + 0x8dda, 0x601a, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x601f, 0x0001, + 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x6d45, 0x0008, 0x0011, + 0x00de, 0x0005, 0x2001, 0x0007, 0x080c, 0x4f6f, 0x2001, 0xb600, + 0x2004, 0xa086, 0x0003, 0x1120, 0x2001, 0x0007, 0x080c, 0x4f9c, + 0x080c, 0x2cf7, 0x080c, 0x86a4, 0x0005, 0x00e6, 0x0026, 0x0016, + 0x2071, 0xb600, 0x7084, 0xa086, 0x0014, 0x15f0, 0x7000, 0xa086, + 0x0003, 0x1128, 0x6010, 0xa005, 0x1110, 0x080c, 0x3f85, 0x00d6, + 0x6018, 0x2068, 0x080c, 0x50bd, 0x080c, 0x8d9f, 0x00de, 0x080c, + 0x90dd, 0x1550, 0x00d6, 0x6018, 0x2068, 0x6890, 0x00de, 0xa005, + 0x0518, 0x2001, 0x0006, 0x080c, 0x4f6f, 0x00e6, 0x6010, 0xa075, + 0x01a8, 0x7034, 0xa084, 0x00ff, 0xa086, 0x0039, 0x1148, 0x2001, + 0x0000, 0x2009, 0x0000, 0x2011, 0x4000, 0x080c, 0xa192, 0x0030, + 0x7007, 0x0000, 0x7037, 0x0103, 0x7033, 0x0200, 0x00ee, 0x080c, + 0x2cf7, 0x080c, 0x86a4, 0x0020, 0x080c, 0x8ca5, 0x080c, 0x8e82, + 0x001e, 0x002e, 0x00ee, 0x0005, 0x2011, 0xb621, 0x2204, 0xa086, + 0x0014, 0x1158, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x6003, 0x0001, + 0x6007, 0x0001, 0x080c, 0x6d45, 0x0010, 0x080c, 0x8e82, 0x0005, + 0x2011, 0xb621, 0x2204, 0xa086, 0x0004, 0x1138, 0x2001, 0x0007, + 0x080c, 0x4f6f, 0x080c, 0x86a4, 0x0010, 0x080c, 0x8e82, 0x0005, + 0x000b, 0x0005, 0x8d6b, 0x8f21, 0x8d6b, 0x8f55, 0x8d6b, 0x8fe0, + 0x8f16, 0x8d6b, 0x8d6b, 0x8ff3, 0x8d6b, 0x9003, 0x6604, 0xa686, + 0x0003, 0x0904, 0x8e95, 0xa6b6, 0x001e, 0x1110, 0x080c, 0x86a4, + 0x0005, 0x00d6, 0x00c6, 0x080c, 0x9013, 0x1178, 0x2001, 0x0000, + 0x080c, 0x4f5d, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x6003, 0x0001, + 0x6007, 0x0002, 0x080c, 0x6d45, 0x00e8, 0x2009, 0xbc8e, 0x2104, + 0xa086, 0x0009, 0x1160, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, + 0xa005, 0x0170, 0x8001, 0x6842, 0x6017, 0x000a, 0x0058, 0x2009, + 0xbc8f, 0x2104, 0xa084, 0xff00, 0xa086, 0x1900, 0x1108, 0x08d0, + 0x080c, 0x8e82, 0x00ce, 0x00de, 0x0005, 0x0026, 0x2011, 0x0000, + 0x080c, 0x9021, 0x00d6, 0x2069, 0xb89e, 0x2d04, 0xa005, 0x0168, + 0x6018, 0x2068, 0x68a0, 0xa086, 0x007e, 0x1138, 0x2069, 0xb61d, + 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0078, 0x2001, + 0x0000, 0x080c, 0x4f5d, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x6003, + 0x0001, 0x6007, 0x0002, 0x080c, 0x6d45, 0x0480, 0x00d6, 0x6010, + 0x2068, 0x080c, 0x9d16, 0x00de, 0x0108, 0x6a34, 0x080c, 0x8ca5, + 0x2009, 0xbc8e, 0x2134, 0xa6b4, 0x00ff, 0xa686, 0x0005, 0x0500, + 0xa686, 0x000b, 0x01c8, 0x2009, 0xbc8f, 0x2104, 0xa084, 0xff00, + 0x1118, 0xa686, 0x0009, 0x01a0, 0xa086, 0x1900, 0x1168, 0xa686, + 0x0009, 0x0170, 0x2001, 0x0004, 0x080c, 0x4f6f, 0x2001, 0x0028, + 0x6016, 0x6007, 0x004b, 0x0010, 0x080c, 0x8e82, 0x002e, 0x0005, + 0x00d6, 0xa286, 0x0139, 0x0160, 0x6010, 0x2068, 0x080c, 0x9d16, + 0x0148, 0x6834, 0xa086, 0x0139, 0x0118, 0x6838, 0xd0fc, 0x0110, + 0x00de, 0x0c50, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, + 0x0140, 0x8001, 0x6842, 0x6017, 0x000a, 0x6007, 0x0016, 0x00de, + 0x08e8, 0x68a0, 0xa086, 0x007e, 0x1138, 0x00e6, 0x2071, 0xb600, + 0x080c, 0x4c28, 0x00ee, 0x0010, 0x080c, 0x2cd1, 0x00de, 0x0860, + 0x080c, 0x9021, 0x1158, 0x2001, 0x0004, 0x080c, 0x4f6f, 0x6003, + 0x0001, 0x6007, 0x0003, 0x080c, 0x6d45, 0x0020, 0x080c, 0x8ca5, + 0x080c, 0x8e82, 0x0005, 0x0469, 0x1158, 0x2001, 0x0008, 0x080c, + 0x4f6f, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x6d45, 0x0010, + 0x080c, 0x8e82, 0x0005, 0x00e9, 0x1158, 0x2001, 0x000a, 0x080c, + 0x4f6f, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x6d45, 0x0010, + 0x080c, 0x8e82, 0x0005, 0x2009, 0xbc8e, 0x2104, 0xa086, 0x0003, + 0x1138, 0x2009, 0xbc8f, 0x2104, 0xa084, 0xff00, 0xa086, 0x2a00, + 0x0005, 0xa085, 0x0001, 0x0005, 0x00c6, 0x0016, 0xac88, 0x0006, + 0x2164, 0x080c, 0x502a, 0x001e, 0x00ce, 0x0005, 0x00f6, 0x00e6, + 0x00d6, 0x0036, 0x0016, 0x6018, 0x2068, 0x2071, 0xb635, 0x2e04, + 0xa085, 0x0003, 0x2072, 0x080c, 0x90b2, 0x0560, 0x2009, 0xb635, + 0x2104, 0xc0cd, 0x200a, 0x2001, 0xb653, 0x2004, 0xd0a4, 0x0158, + 0xa006, 0x2020, 0x2009, 0x002a, 0x080c, 0xb1a4, 0x2001, 0xb60c, + 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, + 0x2ca4, 0x2071, 0xb600, 0x080c, 0x2aed, 0x00c6, 0x0156, 0x20a9, + 0x0081, 0x2009, 0x007f, 0x080c, 0x2dcc, 0x8108, 0x1f04, 0x9063, + 0x015e, 0x00ce, 0x080c, 0x9024, 0x6813, 0x00ff, 0x6817, 0xfffe, + 0x2071, 0xbc80, 0x2079, 0x0100, 0x2e04, 0xa084, 0x00ff, 0x2069, + 0xb61c, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, 0x2069, 0xb61d, + 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0xa084, 0xff00, 0x001e, + 0xa105, 0x2009, 0xb628, 0x200a, 0x2200, 0xa084, 0x00ff, 0x2008, + 0x080c, 0x287c, 0x080c, 0x5b41, 0x0170, 0x2069, 0xbc8e, 0x2071, + 0xb8b2, 0x6810, 0x2072, 0x6814, 0x7006, 0x6818, 0x700a, 0x681c, + 0x700e, 0x080c, 0xa08e, 0x0040, 0x2001, 0x0006, 0x080c, 0x4f6f, + 0x080c, 0x2cf7, 0x080c, 0x86a4, 0x001e, 0x003e, 0x00de, 0x00ee, + 0x00fe, 0x0005, 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0xb628, + 0x231c, 0x83ff, 0x01e8, 0x2071, 0xbc80, 0x2e14, 0xa294, 0x00ff, + 0x7004, 0xa084, 0xff00, 0xa205, 0xa306, 0x1190, 0x2011, 0xbc96, + 0xad98, 0x000a, 0x20a9, 0x0004, 0x080c, 0x9166, 0x1148, 0x2011, + 0xbc9a, 0xad98, 0x0006, 0x20a9, 0x0004, 0x080c, 0x9166, 0x1100, + 0x015e, 0x00ee, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0xbc8c, + 0x7004, 0xa086, 0x0014, 0x11a8, 0x7008, 0xa086, 0x0800, 0x1188, + 0x700c, 0xd0ec, 0x0160, 0xa084, 0x0f00, 0xa086, 0x0100, 0x1138, + 0x7024, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0xa006, 0x0010, 0xa085, + 0x0001, 0x00ee, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0056, + 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0xb8ea, + 0x252c, 0x2021, 0xb8f0, 0x2424, 0x2061, 0xbe00, 0x2071, 0xb600, + 0x7248, 0x7068, 0xa202, 0x16f0, 0x080c, 0xb1cc, 0x05a0, 0x671c, + 0xa786, 0x0001, 0x0580, 0xa786, 0x0007, 0x0568, 0x2500, 0xac06, + 0x0550, 0x2400, 0xac06, 0x0538, 0x00c6, 0x6000, 0xa086, 0x0004, + 0x1110, 0x080c, 0x1952, 0xa786, 0x0008, 0x1148, 0x080c, 0x9f14, + 0x1130, 0x00ce, 0x080c, 0x8ca5, 0x080c, 0x9ed9, 0x00a0, 0x6010, + 0x2068, 0x080c, 0x9d16, 0x0160, 0xa786, 0x0003, 0x11e8, 0x6837, + 0x0103, 0x6b4a, 0x6847, 0x0000, 0x080c, 0x547a, 0x080c, 0x9ecd, + 0x080c, 0x9ed9, 0x00ce, 0xace0, 0x0018, 0x705c, 0xac02, 0x1210, + 0x0804, 0x9110, 0x012e, 0x000e, 0x002e, 0x004e, 0x005e, 0x007e, + 0x00ce, 0x00de, 0x00ee, 0x0005, 0xa786, 0x0006, 0x1118, 0x080c, + 0xb155, 0x0c30, 0xa786, 0x000a, 0x09e0, 0x08c8, 0x220c, 0x2304, + 0xa106, 0x1130, 0x8210, 0x8318, 0x1f04, 0x9166, 0xa006, 0x0005, + 0x2304, 0xa102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, + 0xa18d, 0x0001, 0x0005, 0x6004, 0xa08a, 0x0080, 0x1a0c, 0x151a, + 0x080c, 0x9f03, 0x0120, 0x080c, 0x9f14, 0x0168, 0x0028, 0x080c, + 0x2cf7, 0x080c, 0x9f14, 0x0138, 0x080c, 0x7102, 0x080c, 0x86a4, + 0x080c, 0x71e5, 0x0005, 0x080c, 0x8ca5, 0x0cb0, 0xa182, 0x0040, + 0x0002, 0x91ac, 0x91ac, 0x91ac, 0x91ac, 0x91ac, 0x91ac, 0x91ac, + 0x91ac, 0x91ac, 0x91ac, 0x91ac, 0x91ae, 0x91ae, 0x91ae, 0x91ae, + 0x91ac, 0x91ac, 0x91ac, 0x91ae, 0x080c, 0x151a, 0x600b, 0xffff, + 0x6003, 0x0001, 0x6106, 0x080c, 0x6cff, 0x0126, 0x2091, 0x8000, + 0x080c, 0x71e5, 0x012e, 0x0005, 0xa186, 0x0013, 0x1128, 0x6004, + 0xa082, 0x0040, 0x0804, 0x9248, 0xa186, 0x0027, 0x11e8, 0x080c, + 0x7102, 0x080c, 0x2cd1, 0x00d6, 0x6110, 0x2168, 0x080c, 0x9d16, + 0x0168, 0x6837, 0x0103, 0x684b, 0x0029, 0x6847, 0x0000, 0x694c, + 0xc1c5, 0x694e, 0x080c, 0x547a, 0x080c, 0x9ecd, 0x00de, 0x080c, + 0x86a4, 0x080c, 0x71e5, 0x0005, 0xa186, 0x0014, 0x1120, 0x6004, + 0xa082, 0x0040, 0x0428, 0xa186, 0x0046, 0x0138, 0xa186, 0x0045, + 0x0120, 0xa186, 0x0047, 0x190c, 0x151a, 0x2001, 0x0109, 0x2004, + 0xd084, 0x0198, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, + 0x080c, 0x6be6, 0x002e, 0x001e, 0x000e, 0x012e, 0xe000, 0x6000, + 0xa086, 0x0002, 0x1110, 0x0804, 0x9286, 0x080c, 0x86ef, 0x0005, + 0x0002, 0x9226, 0x9224, 0x9224, 0x9224, 0x9224, 0x9224, 0x9224, + 0x9224, 0x9224, 0x9224, 0x9224, 0x9241, 0x9241, 0x9241, 0x9241, + 0x9224, 0x9241, 0x9224, 0x9241, 0x080c, 0x151a, 0x080c, 0x7102, + 0x00d6, 0x6110, 0x2168, 0x080c, 0x9d16, 0x0168, 0x6837, 0x0103, + 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ec, 0x6852, 0x080c, + 0x547a, 0x080c, 0x9ecd, 0x00de, 0x080c, 0x86a4, 0x080c, 0x71e5, + 0x0005, 0x080c, 0x7102, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x0005, + 0x0002, 0x925e, 0x925c, 0x925c, 0x925c, 0x925c, 0x925c, 0x925c, + 0x925c, 0x925c, 0x925c, 0x925c, 0x9270, 0x9270, 0x9270, 0x9270, + 0x925c, 0x927f, 0x925c, 0x9270, 0x080c, 0x151a, 0x080c, 0x7102, + 0x2001, 0xb8b8, 0x2004, 0x603e, 0x6003, 0x0002, 0x080c, 0x71e5, + 0x6010, 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x0005, + 0x080c, 0x7102, 0x2001, 0xb8b6, 0x2004, 0x6016, 0x2001, 0xb8b8, + 0x2004, 0x603e, 0x6003, 0x000f, 0x080c, 0x71e5, 0x0005, 0x080c, + 0x7102, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x0005, 0xa182, 0x0040, + 0x0002, 0x929c, 0x929c, 0x929c, 0x929c, 0x929c, 0x929e, 0x9386, + 0x93b5, 0x929c, 0x929c, 0x929c, 0x929c, 0x929c, 0x929c, 0x929c, + 0x929c, 0x929c, 0x929c, 0x929c, 0x080c, 0x151a, 0x00e6, 0x00d6, + 0x603f, 0x0000, 0x2071, 0xbc80, 0x7124, 0x610a, 0x2071, 0xbc8c, + 0x6110, 0x2168, 0x7614, 0xa6b4, 0x0fff, 0x86ff, 0x0904, 0x934c, + 0xa68c, 0x0c00, 0x0518, 0x00f6, 0x2c78, 0x080c, 0x5377, 0x00fe, + 0x01c8, 0x684c, 0xd0ac, 0x01b0, 0x6020, 0xd0dc, 0x1198, 0x6850, + 0xd0bc, 0x1180, 0x7318, 0x6814, 0xa306, 0x1904, 0x935f, 0x731c, + 0x6810, 0xa31e, 0x0138, 0xd6d4, 0x0904, 0x935f, 0x6b14, 0xa305, + 0x1904, 0x935f, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, + 0xa186, 0x0002, 0x0518, 0xa186, 0x0028, 0x1128, 0x080c, 0x9ef2, + 0x684b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, 0x684b, 0x0015, 0x684c, + 0xd0ac, 0x0170, 0x6914, 0x6a10, 0x2100, 0xa205, 0x0148, 0x7018, + 0xa106, 0x1118, 0x701c, 0xa206, 0x0118, 0x6962, 0x6a5e, 0xc6dc, + 0x0038, 0xd6d4, 0x0118, 0x684b, 0x0007, 0x0010, 0x684b, 0x0000, + 0x6837, 0x0103, 0x6e46, 0xa01e, 0xd6c4, 0x01f0, 0xa686, 0x0100, + 0x1140, 0x2001, 0xbc99, 0x2004, 0xa005, 0x1118, 0xc6c4, 0x0804, + 0x92ad, 0x7328, 0x732c, 0x6b56, 0x83ff, 0x0170, 0xa38a, 0x0009, + 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0xbc98, 0xad90, + 0x0019, 0x080c, 0x99c9, 0x003e, 0xd6cc, 0x0904, 0x9375, 0x7124, + 0x695a, 0x81ff, 0x0904, 0x9375, 0xa192, 0x0021, 0x1260, 0x2071, + 0xbc98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x080c, 0x99c9, + 0x080c, 0xa1f3, 0x04d0, 0x6838, 0xd0fc, 0x0120, 0x2009, 0x0020, + 0x695a, 0x0c68, 0x00f6, 0x2d78, 0x080c, 0x996e, 0x00fe, 0x080c, + 0xa1f3, 0x080c, 0x99b9, 0x0458, 0x00f6, 0x2c78, 0x080c, 0x5377, + 0x00fe, 0x0190, 0x684c, 0xd0ac, 0x0178, 0x6020, 0xd0dc, 0x1160, + 0x6850, 0xd0bc, 0x1148, 0x6810, 0x6914, 0xa105, 0x0128, 0x080c, + 0x9ff1, 0x00de, 0x00ee, 0x0408, 0x684b, 0x0000, 0x6837, 0x0103, + 0x6e46, 0x080c, 0x9523, 0x1148, 0x684c, 0xd0ac, 0x0130, 0x6810, + 0x6914, 0xa115, 0x0110, 0x080c, 0x953f, 0x080c, 0x547a, 0x6218, + 0x2268, 0x6a3c, 0x82ff, 0x0110, 0x8211, 0x6a3e, 0x080c, 0x9fbf, + 0x00de, 0x00ee, 0x1110, 0x080c, 0x86a4, 0x0005, 0x00f6, 0x6003, + 0x0003, 0x2079, 0xbc8c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6010, + 0x2078, 0x784c, 0xd0ac, 0x0138, 0x6003, 0x0002, 0x00fe, 0x0005, + 0x2130, 0x2228, 0x0058, 0x2400, 0x797c, 0xa10a, 0x2300, 0x7a80, + 0xa213, 0x2600, 0xa102, 0x2500, 0xa203, 0x0e90, 0x7c12, 0x7b16, + 0x7e0a, 0x7d0e, 0x00fe, 0x603f, 0x0000, 0x2c10, 0x080c, 0x1fc5, + 0x080c, 0x6d62, 0x080c, 0x72a2, 0x0005, 0x2001, 0xb8b8, 0x2004, + 0x603e, 0x6003, 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x080c, 0x1863, 0x0005, 0xa182, 0x0040, 0x0002, 0x93da, + 0x93da, 0x93da, 0x93da, 0x93da, 0x93dc, 0x946f, 0x93da, 0x93da, + 0x9485, 0x94eb, 0x93da, 0x93da, 0x93da, 0x93da, 0x9509, 0x93da, + 0x93da, 0x93da, 0x080c, 0x151a, 0x0076, 0x00f6, 0x00e6, 0x00d6, + 0x2071, 0xbc8c, 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, 0x7e46, + 0x7f4c, 0xc7e5, 0x7f4e, 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0110, + 0x8211, 0x6a3e, 0x86ff, 0x0904, 0x946a, 0xa694, 0xff00, 0xa284, + 0x0c00, 0x0120, 0x7018, 0x7862, 0x701c, 0x785e, 0xa284, 0x0300, + 0x0904, 0x946a, 0x080c, 0x15fd, 0x090c, 0x151a, 0x2d00, 0x784a, + 0x7f4c, 0xc7cd, 0x7f4e, 0x6837, 0x0103, 0x7838, 0x683a, 0x783c, + 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, 0x0120, 0x7318, + 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, 0x0002, 0x0180, + 0xa186, 0x0028, 0x1118, 0x684b, 0x001c, 0x0060, 0xd6dc, 0x0118, + 0x684b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0x684b, 0x0007, 0x0010, + 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, 0x6856, 0xa01e, + 0xd6c4, 0x0198, 0x7328, 0x732c, 0x6b56, 0x83ff, 0x0170, 0xa38a, + 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0xbc98, + 0xad90, 0x0019, 0x080c, 0x99c9, 0x003e, 0xd6cc, 0x01d8, 0x7124, + 0x695a, 0x81ff, 0x01b8, 0xa192, 0x0021, 0x1250, 0x2071, 0xbc98, + 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x080c, 0x99c9, 0x0050, + 0x7838, 0xd0fc, 0x0120, 0x2009, 0x0020, 0x695a, 0x0c78, 0x2d78, + 0x080c, 0x996e, 0x00de, 0x00ee, 0x00fe, 0x007e, 0x0005, 0x00f6, + 0x6003, 0x0003, 0x2079, 0xbc8c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, + 0x6010, 0x2078, 0x7c12, 0x7b16, 0x7e0a, 0x7d0e, 0x00fe, 0x2c10, + 0x080c, 0x1fc5, 0x080c, 0x7dd9, 0x0005, 0x00d6, 0x00f6, 0x2c78, + 0x080c, 0x5377, 0x00fe, 0x0120, 0x2001, 0xb8b8, 0x2004, 0x603e, + 0x6003, 0x0002, 0x080c, 0x7198, 0x080c, 0x72a2, 0x6110, 0x2168, + 0x694c, 0xd1e4, 0x0904, 0x94e9, 0xd1cc, 0x0540, 0x6948, 0x6838, + 0xd0fc, 0x01e8, 0x0016, 0x684c, 0x0006, 0x6850, 0x0006, 0xad90, + 0x000d, 0xa198, 0x000d, 0x2009, 0x0020, 0x0156, 0x21a8, 0x2304, + 0x2012, 0x8318, 0x8210, 0x1f04, 0x94af, 0x015e, 0x000e, 0x6852, + 0x000e, 0x684e, 0x001e, 0x2168, 0x080c, 0x1624, 0x0428, 0x0016, + 0x080c, 0x1624, 0x00de, 0x080c, 0x99b9, 0x00f0, 0x6837, 0x0103, + 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0180, 0xa086, 0x0028, + 0x1118, 0x684b, 0x001c, 0x0070, 0xd1dc, 0x0118, 0x684b, 0x0015, + 0x0048, 0xd1d4, 0x0118, 0x684b, 0x0007, 0x0020, 0x684b, 0x0000, + 0x080c, 0x9523, 0x080c, 0x547a, 0x080c, 0x9fbf, 0x1110, 0x080c, + 0x86a4, 0x00de, 0x0005, 0x2019, 0x0001, 0x080c, 0x806b, 0x6003, + 0x0002, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0140, 0x6808, + 0x612c, 0xa10a, 0x612e, 0x680c, 0x6128, 0xa10b, 0x612a, 0x00de, + 0x2001, 0xb8b8, 0x2004, 0x603e, 0x080c, 0x7198, 0x080c, 0x72a2, + 0x0005, 0x080c, 0x7198, 0x080c, 0x2cd1, 0x00d6, 0x6110, 0x2168, + 0x080c, 0x9d16, 0x0150, 0x6837, 0x0103, 0x684b, 0x0029, 0x6847, + 0x0000, 0x080c, 0x547a, 0x080c, 0x9ecd, 0x00de, 0x080c, 0x86a4, + 0x080c, 0x72a2, 0x0005, 0x684c, 0xd0b4, 0x01c0, 0x602c, 0x697c, + 0xa112, 0x6028, 0x6980, 0xa10b, 0x2100, 0xa205, 0x0168, 0x684b, + 0x0015, 0xd1fc, 0x0138, 0x684b, 0x0007, 0x8212, 0x8210, 0x810a, + 0xa189, 0x0000, 0x6962, 0x6a5e, 0xa085, 0x0001, 0x0005, 0x684b, + 0x0015, 0xd1fc, 0x0138, 0x684b, 0x0007, 0x8002, 0x8000, 0x810a, + 0xa189, 0x0000, 0x6962, 0x685e, 0x0005, 0xa182, 0x0040, 0x0002, + 0x9563, 0x9563, 0x9563, 0x9563, 0x9563, 0x9565, 0x9563, 0x9620, + 0x962c, 0x9563, 0x9563, 0x9563, 0x9563, 0x9563, 0x9563, 0x9563, + 0x9563, 0x9563, 0x9563, 0x080c, 0x151a, 0x0076, 0x00f6, 0x00e6, + 0x00d6, 0x2071, 0xbc8c, 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, + 0x00f6, 0x2c78, 0x080c, 0x5377, 0x00fe, 0x0150, 0xa684, 0x00ff, + 0x1138, 0x6020, 0xd0f4, 0x0120, 0x080c, 0x9ff1, 0x0804, 0x961b, + 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, 0x6218, 0x2268, 0x6a3c, 0x82ff, + 0x0110, 0x8211, 0x6a3e, 0x86ff, 0x0904, 0x9611, 0xa694, 0xff00, + 0xa284, 0x0c00, 0x0120, 0x7018, 0x7862, 0x701c, 0x785e, 0xa284, + 0x0300, 0x0904, 0x960f, 0xa686, 0x0100, 0x1140, 0x2001, 0xbc99, + 0x2004, 0xa005, 0x1118, 0xc6c4, 0x7e46, 0x0c28, 0x080c, 0x15fd, + 0x090c, 0x151a, 0x2d00, 0x784a, 0x7f4c, 0xa7bd, 0x0200, 0x7f4e, + 0x6837, 0x0103, 0x7838, 0x683a, 0x783c, 0x683e, 0x7840, 0x6842, + 0x6e46, 0xa68c, 0x0c00, 0x0120, 0x7318, 0x6b62, 0x731c, 0x6b5e, + 0xa68c, 0x00ff, 0xa186, 0x0002, 0x0180, 0xa186, 0x0028, 0x1118, + 0x684b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0x684b, 0x0015, 0x0038, + 0xd6d4, 0x0118, 0x684b, 0x0007, 0x0010, 0x684b, 0x0000, 0x6f4e, + 0x7850, 0x6852, 0x7854, 0x6856, 0xa01e, 0xd6c4, 0x0198, 0x7328, + 0x732c, 0x6b56, 0x83ff, 0x0170, 0xa38a, 0x0009, 0x0210, 0x2019, + 0x0008, 0x0036, 0x2308, 0x2019, 0xbc98, 0xad90, 0x0019, 0x080c, + 0x99c9, 0x003e, 0xd6cc, 0x01d8, 0x7124, 0x695a, 0x81ff, 0x01b8, + 0xa192, 0x0021, 0x1250, 0x2071, 0xbc98, 0x831c, 0x2300, 0xae18, + 0xad90, 0x001d, 0x080c, 0x99c9, 0x0050, 0x7838, 0xd0fc, 0x0120, + 0x2009, 0x0020, 0x695a, 0x0c78, 0x2d78, 0x080c, 0x996e, 0xd6dc, + 0x1110, 0xa006, 0x0030, 0x2001, 0x0001, 0x2071, 0xbc8c, 0x7218, + 0x731c, 0x080c, 0x18b6, 0x00de, 0x00ee, 0x00fe, 0x007e, 0x0005, + 0x2001, 0xb8b8, 0x2004, 0x603e, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x080c, 0x1863, 0x0005, 0x2001, 0xb8b8, 0x2004, 0x603e, + 0x00d6, 0x6003, 0x0002, 0x6110, 0x2168, 0x694c, 0xd1e4, 0x0904, + 0x9737, 0x603f, 0x0000, 0x00f6, 0x2c78, 0x080c, 0x5377, 0x00fe, + 0x0560, 0x6814, 0x6910, 0xa115, 0x0540, 0x6a60, 0xa206, 0x1118, + 0x685c, 0xa106, 0x0510, 0x684c, 0xc0e4, 0x684e, 0x6847, 0x0000, + 0x6863, 0x0000, 0x685f, 0x0000, 0x6020, 0xd0f4, 0x1158, 0x697c, + 0x6810, 0xa102, 0x603a, 0x6980, 0x6814, 0xa103, 0x6036, 0x6020, + 0xc0f5, 0x6022, 0x00d6, 0x6018, 0x2068, 0x683c, 0x8000, 0x683e, + 0x00de, 0x080c, 0x9ff1, 0x0804, 0x9737, 0x694c, 0xd1cc, 0x0904, + 0x9707, 0x6948, 0x6838, 0xd0fc, 0x0904, 0x96ca, 0x0016, 0x684c, + 0x0006, 0x6850, 0x0006, 0x00f6, 0x2178, 0x7944, 0xa184, 0x00ff, + 0xa0b6, 0x0002, 0x01e0, 0xa086, 0x0028, 0x1128, 0x684b, 0x001c, + 0x784b, 0x001c, 0x00e8, 0xd1dc, 0x0158, 0x684b, 0x0015, 0x784b, + 0x0015, 0x080c, 0xa17b, 0x0118, 0x7944, 0xc1dc, 0x7946, 0x0080, + 0xd1d4, 0x0128, 0x684b, 0x0007, 0x784b, 0x0007, 0x0048, 0x684c, + 0xd0ac, 0x0130, 0x6810, 0x6914, 0xa115, 0x0110, 0x080c, 0x953f, + 0x6848, 0x784a, 0x6860, 0x7862, 0x685c, 0x785e, 0xad90, 0x000d, + 0xaf98, 0x000d, 0x2009, 0x0020, 0x0156, 0x21a8, 0x2304, 0x2012, + 0x8318, 0x8210, 0x1f04, 0x96b6, 0x015e, 0x00fe, 0x000e, 0x6852, + 0x000e, 0x684e, 0x080c, 0xa1f3, 0x001e, 0x2168, 0x080c, 0x1624, + 0x0804, 0x9732, 0x0016, 0x00f6, 0x2178, 0x7944, 0xa184, 0x00ff, + 0xa0b6, 0x0002, 0x01e0, 0xa086, 0x0028, 0x1128, 0x684b, 0x001c, + 0x784b, 0x001c, 0x00e8, 0xd1dc, 0x0158, 0x684b, 0x0015, 0x784b, + 0x0015, 0x080c, 0xa17b, 0x0118, 0x7944, 0xc1dc, 0x7946, 0x0080, + 0xd1d4, 0x0128, 0x684b, 0x0007, 0x784b, 0x0007, 0x0048, 0x684c, + 0xd0ac, 0x0130, 0x6810, 0x6914, 0xa115, 0x0110, 0x080c, 0x953f, + 0x6860, 0x7862, 0x685c, 0x785e, 0x684c, 0x784e, 0x00fe, 0x080c, + 0x1624, 0x00de, 0x080c, 0xa1f3, 0x080c, 0x99b9, 0x0458, 0x6837, + 0x0103, 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x01b0, 0xa086, + 0x0028, 0x1118, 0x684b, 0x001c, 0x00d8, 0xd1dc, 0x0148, 0x684b, + 0x0015, 0x080c, 0xa17b, 0x0118, 0x6944, 0xc1dc, 0x6946, 0x0080, + 0xd1d4, 0x0118, 0x684b, 0x0007, 0x0058, 0x684b, 0x0000, 0x684c, + 0xd0ac, 0x0130, 0x6810, 0x6914, 0xa115, 0x0110, 0x080c, 0x953f, + 0x080c, 0x547a, 0x080c, 0x9fbf, 0x1110, 0x080c, 0x86a4, 0x00de, + 0x0005, 0x080c, 0x7102, 0x0010, 0x080c, 0x7198, 0x080c, 0x9d16, + 0x01c0, 0x00d6, 0x6110, 0x2168, 0x6837, 0x0103, 0x2009, 0xb60c, + 0x210c, 0xd18c, 0x11c0, 0xd184, 0x1198, 0x6108, 0x694a, 0xa18e, + 0x0029, 0x1110, 0x080c, 0xb43c, 0x6847, 0x0000, 0x080c, 0x547a, + 0x00de, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x080c, 0x72a2, 0x0005, + 0x684b, 0x0004, 0x0c88, 0x684b, 0x0004, 0x0c70, 0xa182, 0x0040, + 0x0002, 0x977c, 0x977c, 0x977c, 0x977c, 0x977c, 0x977e, 0x977c, + 0x9781, 0x977c, 0x977c, 0x977c, 0x977c, 0x977c, 0x977c, 0x977c, + 0x977c, 0x977c, 0x977c, 0x977c, 0x080c, 0x151a, 0x080c, 0x86a4, + 0x0005, 0x0006, 0x0026, 0xa016, 0x080c, 0x1863, 0x002e, 0x000e, + 0x0005, 0xa182, 0x0085, 0x0002, 0x9795, 0x9793, 0x9793, 0x97a1, + 0x9793, 0x9793, 0x9793, 0x080c, 0x151a, 0x6003, 0x0001, 0x6106, + 0x080c, 0x6cff, 0x0126, 0x2091, 0x8000, 0x080c, 0x71e5, 0x012e, + 0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, 0xbc80, 0x7224, + 0x6212, 0x7220, 0x080c, 0x9d06, 0x01a0, 0x2268, 0x6800, 0xa086, + 0x0000, 0x0178, 0x6018, 0x6d18, 0xa52e, 0x1158, 0x00c6, 0x2d60, + 0x080c, 0x99d9, 0x00ce, 0x0128, 0x6803, 0x0002, 0x6007, 0x0086, + 0x0010, 0x6007, 0x0087, 0x6003, 0x0001, 0x080c, 0x6cff, 0x080c, + 0x71e5, 0x00f6, 0x2278, 0x080c, 0x5377, 0x00fe, 0x0150, 0x6820, + 0xd0ec, 0x0138, 0x00c6, 0x2260, 0x603f, 0x0000, 0x080c, 0x9ff1, + 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0xa186, 0x0013, + 0x1160, 0x6004, 0xa08a, 0x0085, 0x0a0c, 0x151a, 0xa08a, 0x008c, + 0x1a0c, 0x151a, 0xa082, 0x0085, 0x0072, 0xa186, 0x0027, 0x0120, + 0xa186, 0x0014, 0x190c, 0x151a, 0x080c, 0x7102, 0x080c, 0x9ed9, + 0x080c, 0x71e5, 0x0005, 0x9802, 0x9804, 0x9804, 0x9802, 0x9802, + 0x9802, 0x9802, 0x080c, 0x151a, 0x080c, 0x7102, 0x080c, 0x9ed9, + 0x080c, 0x71e5, 0x0005, 0xa186, 0x0013, 0x1128, 0x6004, 0xa082, + 0x0085, 0x2008, 0x04a8, 0xa186, 0x0027, 0x11e8, 0x080c, 0x7102, + 0x080c, 0x2cd1, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0150, + 0x6837, 0x0103, 0x6847, 0x0000, 0x684b, 0x0029, 0x080c, 0x547a, + 0x080c, 0x9ecd, 0x00de, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x0005, + 0x080c, 0x86ef, 0x0ce0, 0xa186, 0x0014, 0x1dd0, 0x080c, 0x7102, + 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0d60, 0x6837, 0x0103, + 0x6847, 0x0000, 0x684b, 0x0006, 0x6850, 0xc0ec, 0x6852, 0x08f0, + 0x0002, 0x9852, 0x9850, 0x9850, 0x9850, 0x9850, 0x9850, 0x986a, + 0x080c, 0x151a, 0x080c, 0x7102, 0x6030, 0xa08c, 0xff00, 0x810f, + 0xa186, 0x0039, 0x0118, 0xa186, 0x0035, 0x1118, 0x2001, 0xb8b6, + 0x0010, 0x2001, 0xb8b7, 0x2004, 0x6016, 0x6003, 0x000c, 0x080c, + 0x71e5, 0x0005, 0x080c, 0x7102, 0x6030, 0xa08c, 0xff00, 0x810f, + 0xa186, 0x0039, 0x0118, 0xa186, 0x0035, 0x1118, 0x2001, 0xb8b6, + 0x0010, 0x2001, 0xb8b7, 0x2004, 0x6016, 0x6003, 0x000e, 0x080c, + 0x71e5, 0x0005, 0xa182, 0x008c, 0x1220, 0xa182, 0x0085, 0x0208, + 0x001a, 0x080c, 0x86ef, 0x0005, 0x9893, 0x9893, 0x9893, 0x9893, + 0x9895, 0x98ee, 0x9893, 0x080c, 0x151a, 0x00d6, 0x00f6, 0x2c78, + 0x080c, 0x5377, 0x00fe, 0x0168, 0x6030, 0xa08c, 0xff00, 0x810f, + 0xa186, 0x0039, 0x0118, 0xa186, 0x0035, 0x1118, 0x00de, 0x0804, + 0x9901, 0x080c, 0x9d16, 0x1118, 0x080c, 0x9ecd, 0x00f0, 0x6010, + 0x2068, 0x684c, 0xd0e4, 0x1110, 0x080c, 0x9ecd, 0x6837, 0x0103, + 0x6850, 0xd0b4, 0x0128, 0x684b, 0x0006, 0xc0ec, 0x6852, 0x0048, + 0xd0bc, 0x0118, 0x684b, 0x0002, 0x0020, 0x684b, 0x0005, 0x080c, + 0x9f8e, 0x6847, 0x0000, 0x080c, 0x547a, 0x2c68, 0x080c, 0x864e, + 0x01c0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, + 0xbc8e, 0x210c, 0x6136, 0x2009, 0xbc8f, 0x210c, 0x613a, 0x6918, + 0x611a, 0x080c, 0xa0e3, 0x6950, 0x6152, 0x601f, 0x0001, 0x080c, + 0x6cff, 0x2d60, 0x080c, 0x86a4, 0x00de, 0x0005, 0x00f6, 0x2c78, + 0x080c, 0x5377, 0x00fe, 0x0598, 0x6030, 0xa08c, 0xff00, 0x810f, + 0xa186, 0x0035, 0x0130, 0xa186, 0x001e, 0x0118, 0xa186, 0x0039, + 0x1530, 0x00d6, 0x2c68, 0x080c, 0xa1c6, 0x1904, 0x9946, 0x080c, + 0x864e, 0x01d8, 0x6106, 0x6003, 0x0001, 0x601f, 0x0001, 0x6918, + 0x611a, 0x6928, 0x612a, 0x692c, 0x612e, 0x6930, 0xa18c, 0x00ff, + 0x6132, 0x6934, 0x6136, 0x6938, 0x613a, 0x6950, 0x6152, 0x080c, + 0xa0e3, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x2d60, 0x00f8, 0x00d6, + 0x6010, 0x2068, 0x080c, 0x9d16, 0x01c8, 0x6837, 0x0103, 0x6850, + 0xd0b4, 0x0128, 0xc0ec, 0x6852, 0x684b, 0x0006, 0x0048, 0xd0bc, + 0x0118, 0x684b, 0x0002, 0x0020, 0x684b, 0x0005, 0x080c, 0x9f8e, + 0x6847, 0x0000, 0x080c, 0x547a, 0x080c, 0x9ecd, 0x00de, 0x080c, + 0x86a4, 0x0005, 0x0016, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, + 0x0140, 0x6837, 0x0103, 0x684b, 0x0028, 0x6847, 0x0000, 0x080c, + 0x547a, 0x00de, 0x001e, 0xa186, 0x0013, 0x0148, 0xa186, 0x0014, + 0x0130, 0xa186, 0x0027, 0x0118, 0x080c, 0x86ef, 0x0030, 0x080c, + 0x7102, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, 0x0056, 0x0066, + 0x00d6, 0x00f6, 0x2029, 0x0001, 0xa182, 0x0101, 0x1208, 0x0010, + 0x2009, 0x0100, 0x2130, 0x2069, 0xbc98, 0x831c, 0x2300, 0xad18, + 0x2009, 0x0020, 0xaf90, 0x001d, 0x080c, 0x99c9, 0xa6b2, 0x0020, + 0x7804, 0xa06d, 0x0110, 0x080c, 0x1624, 0x080c, 0x15fd, 0x0500, + 0x8528, 0x6837, 0x0110, 0x683b, 0x0000, 0x2d20, 0x7c06, 0xa68a, + 0x003d, 0x1228, 0x2608, 0xad90, 0x000f, 0x0459, 0x0088, 0xa6b2, + 0x003c, 0x2009, 0x003c, 0x2d78, 0xad90, 0x000f, 0x0411, 0x0c28, + 0x00fe, 0x852f, 0xa5ad, 0x0003, 0x7d36, 0xa5ac, 0x0000, 0x0028, + 0x00fe, 0x852f, 0xa5ad, 0x0003, 0x7d36, 0x00de, 0x006e, 0x005e, + 0x0005, 0x00f6, 0x8dff, 0x0158, 0x6804, 0xa07d, 0x0130, 0x6807, + 0x0000, 0x080c, 0x547a, 0x2f68, 0x0cb8, 0x080c, 0x547a, 0x00fe, + 0x0005, 0x0156, 0xa184, 0x0001, 0x0108, 0x8108, 0x810c, 0x21a8, + 0x2304, 0x8007, 0x2012, 0x8318, 0x8210, 0x1f04, 0x99d0, 0x015e, + 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, 0x2031, 0x0001, 0x601c, + 0xa084, 0x000f, 0x0083, 0x012e, 0x006e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x0066, 0x2031, 0x0000, 0x601c, 0xa084, 0x000f, 0x001b, + 0x006e, 0x012e, 0x0005, 0x9a10, 0x9a10, 0x9a0b, 0x9a32, 0x99fe, + 0x9a0b, 0x9a32, 0x9a0b, 0x9a0b, 0x99fe, 0x9a0b, 0x080c, 0x151a, + 0x0036, 0x2019, 0x0010, 0x080c, 0xad9c, 0x601f, 0x0006, 0x6003, + 0x0007, 0x003e, 0x0005, 0xa006, 0x0005, 0xa085, 0x0001, 0x0005, + 0x00d6, 0x86ff, 0x11d8, 0x6010, 0x2068, 0x080c, 0x9d16, 0x01c0, + 0x6834, 0xa086, 0x0139, 0x1128, 0x684b, 0x0005, 0x6853, 0x0000, + 0x0028, 0xa00e, 0x2001, 0x0005, 0x080c, 0x554d, 0x080c, 0x9f8e, + 0x080c, 0x547a, 0x080c, 0x86a4, 0xa085, 0x0001, 0x00de, 0x0005, + 0xa006, 0x0ce0, 0x6000, 0xa08a, 0x0010, 0x1a0c, 0x151a, 0x000b, + 0x0005, 0x9a49, 0x9a6a, 0x9a4b, 0x9a89, 0x9a67, 0x9a49, 0x9a0b, + 0x9a10, 0x9a10, 0x9a0b, 0x9a0b, 0x9a0b, 0x9a0b, 0x9a0b, 0x9a0b, + 0x9a0b, 0x080c, 0x151a, 0x86ff, 0x11b8, 0x601c, 0xa086, 0x0006, + 0x0198, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9d16, 0x0110, 0x080c, + 0x9f8e, 0x00de, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, + 0x080c, 0x6cff, 0x080c, 0x71e5, 0xa085, 0x0001, 0x0005, 0x080c, + 0x1952, 0x0c08, 0x00e6, 0x2071, 0xb8e1, 0x7024, 0xac06, 0x1110, + 0x080c, 0x7fe0, 0x601c, 0xa084, 0x000f, 0xa086, 0x0006, 0x1150, + 0x0086, 0x0096, 0x2049, 0x0001, 0x2c40, 0x080c, 0x81b7, 0x009e, + 0x008e, 0x0010, 0x080c, 0x7ed1, 0x00ee, 0x1928, 0x080c, 0x9a0b, + 0x0005, 0x0036, 0x00e6, 0x2071, 0xb8e1, 0x703c, 0xac06, 0x1140, + 0x2019, 0x0000, 0x080c, 0x806b, 0x00ee, 0x003e, 0x0804, 0x9a4b, + 0x080c, 0x82e4, 0x00ee, 0x003e, 0x1904, 0x9a4b, 0x080c, 0x9a0b, + 0x0005, 0x00c6, 0x601c, 0xa084, 0x000f, 0x0013, 0x00ce, 0x0005, + 0x9aba, 0x9b27, 0x9c75, 0x9ac5, 0x9ed9, 0x9aba, 0xad8e, 0xa20a, + 0x9b27, 0x9ab3, 0x9ce0, 0x080c, 0x151a, 0x080c, 0x9f14, 0x1110, + 0x080c, 0x8ca5, 0x0005, 0x080c, 0x7102, 0x080c, 0x71e5, 0x080c, + 0x86a4, 0x0005, 0x6017, 0x0001, 0x0005, 0x080c, 0x9d16, 0x0120, + 0x6010, 0xa080, 0x0019, 0x2c02, 0x6000, 0xa08a, 0x0010, 0x1a0c, + 0x151a, 0x000b, 0x0005, 0x9ae3, 0x9ae5, 0x9b05, 0x9b17, 0x9b24, + 0x9ae3, 0x9aba, 0x9aba, 0x9aba, 0x9b17, 0x9b17, 0x9ae3, 0x9ae3, + 0x9ae3, 0x9ae3, 0x9b21, 0x080c, 0x151a, 0x00e6, 0x6010, 0x2070, + 0x7050, 0xc0b5, 0x7052, 0x2071, 0xb8e1, 0x7024, 0xac06, 0x0190, + 0x080c, 0x7ed1, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, + 0x2001, 0xb8b7, 0x2004, 0x6016, 0x080c, 0x6cff, 0x080c, 0x71e5, + 0x00ee, 0x0005, 0x6017, 0x0001, 0x0cd8, 0x00d6, 0x6010, 0x2068, + 0x6850, 0xc0b5, 0x6852, 0x00de, 0x6007, 0x0085, 0x6003, 0x000b, + 0x601f, 0x0002, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x0005, 0x00d6, + 0x6017, 0x0001, 0x6010, 0x2068, 0x6850, 0xc0b5, 0x6852, 0x00de, + 0x0005, 0x080c, 0x86a4, 0x0005, 0x080c, 0x1952, 0x08f0, 0x6000, + 0xa08a, 0x0010, 0x1a0c, 0x151a, 0x000b, 0x0005, 0x9b3e, 0x9ac2, + 0x9b40, 0x9b3e, 0x9b40, 0x9b40, 0x9abb, 0x9b3e, 0x9ab5, 0x9ab5, + 0x9b3e, 0x9b3e, 0x9b3e, 0x9b3e, 0x9b3e, 0x9b3e, 0x080c, 0x151a, + 0x00d6, 0x6018, 0x2068, 0x6804, 0xa084, 0x00ff, 0x00de, 0xa08a, + 0x000c, 0x1a0c, 0x151a, 0x000b, 0x0005, 0x9b59, 0x9c1b, 0x9b5b, + 0x9b99, 0x9b5b, 0x9b99, 0x9b5b, 0x9b69, 0x9b59, 0x9b99, 0x9b59, + 0x9b85, 0x080c, 0x151a, 0x6004, 0xa08e, 0x0016, 0x05a8, 0xa08e, + 0x0004, 0x0590, 0xa08e, 0x0002, 0x0578, 0xa08e, 0x004b, 0x0904, + 0x9c17, 0x6004, 0x080c, 0x9f14, 0x0904, 0x9c34, 0xa08e, 0x0021, + 0x0904, 0x9c38, 0xa08e, 0x0022, 0x0904, 0x9c34, 0xa08e, 0x003d, + 0x0904, 0x9c38, 0xa08e, 0x0039, 0x0904, 0x9c3c, 0xa08e, 0x0035, + 0x0904, 0x9c3c, 0xa08e, 0x001e, 0x0188, 0xa08e, 0x0001, 0x1150, + 0x00d6, 0x6018, 0x2068, 0x6804, 0xa084, 0x00ff, 0x00de, 0xa086, + 0x0006, 0x0110, 0x080c, 0x2cd1, 0x080c, 0x8ca5, 0x080c, 0x9ed9, + 0x0005, 0x00c6, 0x00d6, 0x6104, 0xa186, 0x0016, 0x0904, 0x9c08, + 0xa186, 0x0002, 0x15d8, 0x2001, 0xb635, 0x2004, 0xd08c, 0x1198, + 0x080c, 0x5b41, 0x1180, 0x2001, 0xb89f, 0x2003, 0x0001, 0x2001, + 0xb600, 0x2003, 0x0001, 0xa085, 0x0001, 0x080c, 0x5b85, 0x080c, + 0x5a79, 0x0804, 0x9c5e, 0x6018, 0x2068, 0x2001, 0xb635, 0x2004, + 0xd0ac, 0x1904, 0x9c5e, 0x68a0, 0xd0bc, 0x1904, 0x9c5e, 0x6840, + 0xa084, 0x00ff, 0xa005, 0x0190, 0x8001, 0x6842, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x603f, 0x0000, 0x080c, 0x864e, + 0x0128, 0x2d00, 0x601a, 0x601f, 0x0001, 0x0450, 0x00de, 0x00ce, + 0x6004, 0xa08e, 0x0002, 0x11a8, 0x6018, 0xa080, 0x0028, 0x2004, + 0xa086, 0x007e, 0x1170, 0x2009, 0xb635, 0x2104, 0xc085, 0x200a, + 0x00e6, 0x2071, 0xb600, 0x080c, 0x4c28, 0x00ee, 0x080c, 0x8ca5, + 0x0020, 0x080c, 0x8ca5, 0x080c, 0x2cd1, 0x00e6, 0x0126, 0x2091, + 0x8000, 0x080c, 0x2cf7, 0x012e, 0x00ee, 0x080c, 0x9ed9, 0x0005, + 0x2001, 0x0002, 0x080c, 0x4f6f, 0x6003, 0x0001, 0x6007, 0x0002, + 0x080c, 0x6d45, 0x080c, 0x71e5, 0x00de, 0x00ce, 0x0c80, 0x080c, + 0x2cf7, 0x0804, 0x9b94, 0x00c6, 0x00d6, 0x6104, 0xa186, 0x0016, + 0x0d38, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, 0x0904, + 0x9bde, 0x8001, 0x6842, 0x6003, 0x0001, 0x080c, 0x6d45, 0x080c, + 0x71e5, 0x00de, 0x00ce, 0x0898, 0x080c, 0x8ca5, 0x0804, 0x9b96, + 0x080c, 0x8cd3, 0x0804, 0x9b96, 0x00d6, 0x2c68, 0x6104, 0x080c, + 0xa1c6, 0x00de, 0x0118, 0x080c, 0x86a4, 0x00b8, 0x6004, 0x8007, + 0x6130, 0xa18c, 0x00ff, 0xa105, 0x6032, 0x6007, 0x0085, 0x6003, + 0x000b, 0x601f, 0x0002, 0x6038, 0x600a, 0x2001, 0xb8b7, 0x2004, + 0x6016, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x0005, 0x00de, 0x00ce, + 0x080c, 0x8ca5, 0x080c, 0x2cd1, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x080c, 0x2cf7, 0x6013, 0x0000, 0x601f, 0x0007, 0x6017, 0x0398, + 0x603f, 0x0000, 0x012e, 0x00ee, 0x0005, 0x6000, 0xa08a, 0x0010, + 0x1a0c, 0x151a, 0x000b, 0x0005, 0x9c8c, 0x9c8c, 0x9c8c, 0x9c8c, + 0x9c8c, 0x9c8c, 0x9c8c, 0x9c8c, 0x9c8c, 0x9aba, 0x9c8c, 0x9ac2, + 0x9c8e, 0x9ac2, 0x9c9b, 0x9c8c, 0x080c, 0x151a, 0x6004, 0xa086, + 0x008b, 0x0148, 0x6007, 0x008b, 0x6003, 0x000d, 0x080c, 0x6cff, + 0x080c, 0x71e5, 0x0005, 0x080c, 0x9ecd, 0x080c, 0x9d16, 0x0580, + 0x080c, 0x2cd1, 0x00d6, 0x080c, 0x9d16, 0x0168, 0x6010, 0x2068, + 0x6837, 0x0103, 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ed, + 0x6852, 0x080c, 0x547a, 0x2c68, 0x080c, 0x864e, 0x0150, 0x6818, + 0x601a, 0x080c, 0xa0e3, 0x00c6, 0x2d60, 0x080c, 0x9ed9, 0x00ce, + 0x0008, 0x2d60, 0x00de, 0x6013, 0x0000, 0x601f, 0x0001, 0x6007, + 0x0001, 0x6003, 0x0001, 0x080c, 0x6d45, 0x080c, 0x71e5, 0x0078, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0118, 0xa186, + 0x0035, 0x1118, 0x080c, 0x2cd1, 0x08b0, 0x080c, 0x9ed9, 0x0005, + 0x6000, 0xa08a, 0x0010, 0x1a0c, 0x151a, 0x000b, 0x0005, 0x9cf7, + 0x9cf7, 0x9cf7, 0x9cf9, 0x9cf9, 0x9cf7, 0x9cf7, 0x9cf7, 0x9cf7, + 0x9cf7, 0x9cf7, 0x9cf7, 0x9cf7, 0x9cf7, 0x9cf7, 0x9cf7, 0x080c, + 0x151a, 0x080c, 0x82e4, 0x190c, 0x151a, 0x6110, 0x2168, 0x684b, + 0x0006, 0x080c, 0x547a, 0x080c, 0x86a4, 0x0005, 0xa284, 0x0007, + 0x1158, 0xa282, 0xbe00, 0x0240, 0x2001, 0xb617, 0x2004, 0xa202, + 0x1218, 0xa085, 0x0001, 0x0005, 0xa006, 0x0ce8, 0x0026, 0x6210, + 0xa294, 0xf000, 0x002e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, + 0x0126, 0x2091, 0x8000, 0x2061, 0xbe00, 0x2071, 0xb600, 0x7348, + 0x7068, 0xa302, 0x12a8, 0x601c, 0xa206, 0x1160, 0x080c, 0xa06e, + 0x0148, 0x080c, 0x9f14, 0x1110, 0x080c, 0x8ca5, 0x00c6, 0x080c, + 0x86a4, 0x00ce, 0xace0, 0x0018, 0x705c, 0xac02, 0x1208, 0x0c38, + 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, + 0x0016, 0xa188, 0xb735, 0x210c, 0x81ff, 0x0128, 0x2061, 0xb9f5, + 0x611a, 0x080c, 0x2cd1, 0xa006, 0x0010, 0xa085, 0x0001, 0x001e, + 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0056, 0x0126, 0x2091, 0x8000, + 0x00c6, 0x080c, 0x864e, 0x005e, 0x0180, 0x6612, 0x651a, 0x080c, + 0xa0e3, 0x601f, 0x0003, 0x2009, 0x004b, 0x080c, 0x86d3, 0xa085, + 0x0001, 0x012e, 0x005e, 0x00ce, 0x0005, 0xa006, 0x0cd0, 0x00c6, + 0x0056, 0x0126, 0x2091, 0x8000, 0x62a0, 0x00c6, 0x080c, 0x9f92, + 0x005e, 0x0550, 0x6013, 0x0000, 0x651a, 0x080c, 0xa0e3, 0x601f, + 0x0003, 0x0016, 0x00c6, 0x2560, 0x080c, 0x521c, 0x00ce, 0x080c, + 0x6e67, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d74, 0x2c08, 0x080c, + 0xaf3e, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0x86a4, 0xa085, + 0x0001, 0x0030, 0x2009, 0x004c, 0x080c, 0x86d3, 0xa085, 0x0001, + 0x012e, 0x005e, 0x00ce, 0x0005, 0xa006, 0x0cd0, 0x00f6, 0x00c6, + 0x0046, 0x00c6, 0x080c, 0x864e, 0x2c78, 0x00ce, 0x0180, 0x7e12, + 0x2c00, 0x781a, 0x781f, 0x0003, 0x2021, 0x0005, 0x080c, 0x9e0c, + 0x2f60, 0x2009, 0x004d, 0x080c, 0x86d3, 0xa085, 0x0001, 0x004e, + 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x00c6, 0x080c, + 0x864e, 0x2c78, 0x00ce, 0x0178, 0x7e12, 0x2c00, 0x781a, 0x781f, + 0x0003, 0x2021, 0x0005, 0x0481, 0x2f60, 0x2009, 0x004e, 0x080c, + 0x86d3, 0xa085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, + 0x00c6, 0x0046, 0x00c6, 0x080c, 0x864e, 0x2c78, 0x00ce, 0x01c0, + 0x7e12, 0x2c00, 0x781a, 0x781f, 0x0003, 0x2021, 0x0004, 0x00a1, + 0x2001, 0xb8a0, 0x2004, 0xd0fc, 0x0120, 0x2f60, 0x080c, 0x86a4, + 0x0028, 0x2f60, 0x2009, 0x0052, 0x080c, 0x86d3, 0xa085, 0x0001, + 0x004e, 0x00ce, 0x00fe, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, + 0x8000, 0x080c, 0x51be, 0x0118, 0x2001, 0x9e11, 0x0028, 0x080c, + 0x518e, 0x0158, 0x2001, 0x9e17, 0x0006, 0xa00e, 0x2400, 0x080c, + 0x554d, 0x080c, 0x547a, 0x000e, 0x0807, 0x2418, 0x080c, 0x70a1, + 0x62a0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, + 0x6e80, 0x008e, 0x080c, 0x6d74, 0x2f08, 0x2648, 0x080c, 0xaf3e, + 0x613c, 0x81ff, 0x090c, 0x6f35, 0x080c, 0x71e5, 0x012e, 0x007e, + 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, + 0x864e, 0x001e, 0x0188, 0x660a, 0x611a, 0x080c, 0xa0e3, 0x601f, + 0x0001, 0x2d00, 0x6012, 0x2009, 0x001f, 0x080c, 0x86d3, 0xa085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x00c6, 0x080c, 0x864e, 0x001e, 0x0188, 0x660a, + 0x611a, 0x080c, 0xa0e3, 0x601f, 0x0008, 0x2d00, 0x6012, 0x2009, + 0x0021, 0x080c, 0x86d3, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0xa006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, + 0x864e, 0x001e, 0x0188, 0x660a, 0x611a, 0x080c, 0xa0e3, 0x601f, + 0x0001, 0x2d00, 0x6012, 0x2009, 0x003d, 0x080c, 0x86d3, 0xa085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x00c6, 0x080c, 0x9f92, 0x001e, 0x0180, 0x611a, + 0x080c, 0xa0e3, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0000, + 0x080c, 0x86d3, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, + 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, 0x864e, + 0x001e, 0x0188, 0x660a, 0x611a, 0x080c, 0xa0e3, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x0044, 0x080c, 0x86d3, 0xa085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x0026, 0x00d6, 0x6218, + 0x2268, 0x6a3c, 0x82ff, 0x0110, 0x8211, 0x6a3e, 0x00de, 0x002e, + 0x0005, 0x0006, 0x6000, 0xa086, 0x0000, 0x0190, 0x6013, 0x0000, + 0x601f, 0x0007, 0x2001, 0xb8b6, 0x2004, 0x0006, 0xa082, 0x0051, + 0x000e, 0x0208, 0x8004, 0x6016, 0x080c, 0xb3f6, 0x603f, 0x0000, + 0x000e, 0x0005, 0x0066, 0x00c6, 0x00d6, 0x2031, 0xb653, 0x2634, + 0xd6e4, 0x0128, 0x6618, 0x2660, 0x6e48, 0x080c, 0x5147, 0x00de, + 0x00ce, 0x006e, 0x0005, 0x0006, 0x0016, 0x6004, 0xa08e, 0x0002, + 0x0140, 0xa08e, 0x0003, 0x0128, 0xa08e, 0x0004, 0x0110, 0xa085, + 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x00d6, 0x6010, 0xa06d, + 0x0148, 0x6834, 0xa086, 0x0139, 0x0138, 0x6838, 0xd0fc, 0x0110, + 0xa006, 0x0010, 0xa085, 0x0001, 0x00de, 0x000e, 0x0005, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, 0x864e, 0x001e, 0x0190, + 0x611a, 0x080c, 0xa0e3, 0x601f, 0x0001, 0x2d00, 0x6012, 0x080c, + 0x2cd1, 0x2009, 0x0028, 0x080c, 0x86d3, 0xa085, 0x0001, 0x012e, + 0x00ce, 0x0005, 0xa006, 0x0cd8, 0xa186, 0x0015, 0x1178, 0x2011, + 0xb621, 0x2204, 0xa086, 0x0074, 0x1148, 0x080c, 0x9024, 0x6003, + 0x0001, 0x6007, 0x0029, 0x080c, 0x6d45, 0x0020, 0x080c, 0x8ca5, + 0x080c, 0x86a4, 0x0005, 0xa186, 0x0016, 0x1128, 0x2001, 0x0004, + 0x080c, 0x4f6f, 0x00e8, 0xa186, 0x0015, 0x11e8, 0x2011, 0xb621, + 0x2204, 0xa086, 0x0014, 0x11b8, 0x00d6, 0x6018, 0x2068, 0x080c, + 0x50bd, 0x00de, 0x080c, 0x90dd, 0x1170, 0x00d6, 0x6018, 0x2068, + 0x6890, 0x00de, 0xa005, 0x0138, 0x2001, 0x0006, 0x080c, 0x4f6f, + 0x080c, 0x882c, 0x0020, 0x080c, 0x8ca5, 0x080c, 0x86a4, 0x0005, + 0x6848, 0xa086, 0x0005, 0x1108, 0x0009, 0x0005, 0x6850, 0xc0ad, + 0x6852, 0x0005, 0x00e6, 0x0126, 0x2071, 0xb600, 0x2091, 0x8000, + 0x7548, 0xa582, 0x0001, 0x0608, 0x704c, 0x2060, 0x6000, 0xa086, + 0x0000, 0x0148, 0xace0, 0x0018, 0x705c, 0xac02, 0x1208, 0x0cb0, + 0x2061, 0xbe00, 0x0c98, 0x6003, 0x0008, 0x8529, 0x754a, 0xaca8, + 0x0018, 0x705c, 0xa502, 0x1230, 0x754e, 0xa085, 0x0001, 0x012e, + 0x00ee, 0x0005, 0x704f, 0xbe00, 0x0cc0, 0xa006, 0x0cc0, 0x00e6, + 0x2071, 0xbc8c, 0x7014, 0xd0e4, 0x0150, 0x6013, 0x0000, 0x6003, + 0x0001, 0x6007, 0x0050, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x00ee, + 0x0005, 0x00c6, 0x00f6, 0x2c78, 0x080c, 0x5377, 0x00fe, 0x0120, + 0x601c, 0xa084, 0x000f, 0x0013, 0x00ce, 0x0005, 0x9aba, 0x9fe9, + 0x9fec, 0x9fef, 0xb1e3, 0xb1fe, 0xb201, 0x9aba, 0x9aba, 0x080c, + 0x151a, 0xe000, 0xe000, 0x0005, 0xe000, 0xe000, 0x0005, 0x0009, + 0x0005, 0x00f6, 0x2c78, 0x080c, 0x5377, 0x0538, 0x080c, 0x864e, + 0x1128, 0x2001, 0xb8b8, 0x2004, 0x783e, 0x00f8, 0x7818, 0x601a, + 0x080c, 0xa0e3, 0x781c, 0xa086, 0x0003, 0x0128, 0x7808, 0x6036, + 0x2f00, 0x603a, 0x0020, 0x7808, 0x603a, 0x2f00, 0x6036, 0x602a, + 0x601f, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x7950, 0x6152, + 0x080c, 0x6cff, 0x080c, 0x71e5, 0x2f60, 0x00fe, 0x0005, 0x0016, + 0x00f6, 0x682c, 0x6032, 0xa08e, 0x0001, 0x0138, 0xa086, 0x0005, + 0x0140, 0xa006, 0x602a, 0x602e, 0x00a0, 0x6820, 0xc0f4, 0xc0d5, + 0x6822, 0x6810, 0x2078, 0x787c, 0x6938, 0xa102, 0x7880, 0x6934, + 0xa103, 0x1e78, 0x6834, 0x602a, 0x6838, 0xa084, 0xfffc, 0x683a, + 0x602e, 0x2d00, 0x6036, 0x6808, 0x603a, 0x6918, 0x611a, 0x6950, + 0x6152, 0x601f, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x080c, + 0x6cff, 0x6803, 0x0002, 0x00fe, 0x001e, 0x0005, 0x00f6, 0x2c78, + 0x080c, 0x5377, 0x1118, 0xa085, 0x0001, 0x0070, 0x6020, 0xd0f4, + 0x1150, 0xc0f5, 0x6022, 0x6010, 0x2078, 0x7828, 0x603a, 0x782c, + 0x6036, 0x080c, 0x1952, 0xa006, 0x00fe, 0x0005, 0x0006, 0x0016, + 0x6004, 0xa08e, 0x0034, 0x01b8, 0xa08e, 0x0035, 0x01a0, 0xa08e, + 0x0036, 0x0188, 0xa08e, 0x0037, 0x0170, 0xa08e, 0x0038, 0x0158, + 0xa08e, 0x0039, 0x0140, 0xa08e, 0x003a, 0x0128, 0xa08e, 0x003b, + 0x0110, 0xa085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, + 0x0026, 0x0036, 0x00e6, 0x2001, 0xb8b2, 0x200c, 0x8000, 0x2014, + 0x2001, 0x0032, 0x080c, 0x6bb2, 0x2001, 0xb8b6, 0x82ff, 0x1110, + 0x2011, 0x0014, 0x2202, 0x2001, 0xb8b4, 0x200c, 0x8000, 0x2014, + 0x2071, 0xb88e, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x6bb2, + 0x2001, 0xb8b7, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2009, + 0xb8b8, 0xa280, 0x000a, 0x200a, 0x080c, 0x539c, 0x00ee, 0x003e, + 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x00e6, 0x2001, 0xb8b6, + 0x2003, 0x0028, 0x2001, 0xb8b7, 0x2003, 0x0014, 0x2071, 0xb88e, + 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0xb8b8, 0x2003, 0x001e, + 0x00ee, 0x000e, 0x0005, 0x00d6, 0x6054, 0xa06d, 0x0110, 0x080c, + 0x1614, 0x00de, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, + 0x00c6, 0x080c, 0x864e, 0x001e, 0x0178, 0x611a, 0x0ca1, 0x601f, + 0x0001, 0x2d00, 0x6012, 0x2009, 0x0033, 0x080c, 0x86d3, 0xa085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00d6, 0x00e6, + 0x00f6, 0x2071, 0xb600, 0xa186, 0x0015, 0x1500, 0x7084, 0xa086, + 0x0018, 0x11e0, 0x6010, 0x2068, 0x6a3c, 0xd2e4, 0x1160, 0x2c78, + 0x080c, 0x73a3, 0x01d8, 0x7070, 0x6a50, 0xa206, 0x1160, 0x7074, + 0x6a54, 0xa206, 0x1140, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, + 0x0000, 0x080c, 0x2d16, 0x080c, 0x882c, 0x0020, 0x080c, 0x8ca5, + 0x080c, 0x86a4, 0x00fe, 0x00ee, 0x00de, 0x0005, 0x7054, 0x6a54, + 0xa206, 0x0d48, 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, + 0x080c, 0x864e, 0x001e, 0x0180, 0x611a, 0x080c, 0xa0e3, 0x601f, + 0x0001, 0x2d00, 0x6012, 0x2009, 0x0043, 0x080c, 0x86d3, 0xa085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00d6, 0x00e6, + 0x00f6, 0x2071, 0xb600, 0xa186, 0x0015, 0x11c0, 0x7084, 0xa086, + 0x0004, 0x11a0, 0x6010, 0xa0e8, 0x000f, 0x2c78, 0x080c, 0x73a3, + 0x01a8, 0x7070, 0x6a08, 0xa206, 0x1130, 0x7074, 0x6a0c, 0xa206, + 0x1110, 0x080c, 0x2cd1, 0x080c, 0x882c, 0x0020, 0x080c, 0x8ca5, + 0x080c, 0x86a4, 0x00fe, 0x00ee, 0x00de, 0x0005, 0x7054, 0x6a0c, + 0xa206, 0x0d78, 0x0c80, 0x0016, 0x0026, 0x684c, 0xd0ac, 0x0178, + 0x6914, 0x6a10, 0x2100, 0xa205, 0x0150, 0x6860, 0xa106, 0x1118, + 0x685c, 0xa206, 0x0120, 0x6962, 0x6a5e, 0xa085, 0x0001, 0x002e, + 0x001e, 0x0005, 0x00d6, 0x0036, 0x6310, 0x2368, 0x684a, 0x6952, + 0xa29e, 0x4000, 0x11a0, 0x00c6, 0x6318, 0x2360, 0x2009, 0x0000, + 0x6838, 0xd0f4, 0x1140, 0x080c, 0x52bc, 0x1108, 0xc185, 0x6000, + 0xd0bc, 0x0108, 0xc18d, 0x6a66, 0x696a, 0x00ce, 0x0080, 0x6a66, + 0x3918, 0xa398, 0x0006, 0x231c, 0x686b, 0x0004, 0x6b72, 0x00c6, + 0x6318, 0x2360, 0x6004, 0xa084, 0x00ff, 0x686e, 0x00ce, 0x080c, + 0x547a, 0x6013, 0x0000, 0x003e, 0x00de, 0x0005, 0x00c6, 0x0026, + 0x0016, 0xa186, 0x0035, 0x0110, 0x6a34, 0x0008, 0x6a28, 0x080c, + 0x9d06, 0x01f0, 0x2260, 0x611c, 0xa186, 0x0003, 0x0118, 0xa186, + 0x0006, 0x1190, 0x6834, 0xa206, 0x0140, 0x6838, 0xa206, 0x1160, + 0x6108, 0x6834, 0xa106, 0x1140, 0x0020, 0x6008, 0x6938, 0xa106, + 0x1118, 0x6018, 0x6918, 0xa106, 0x001e, 0x002e, 0x00ce, 0x0005, + 0xa085, 0x0001, 0x0cc8, 0x6944, 0xd1cc, 0x0198, 0xa18c, 0x00ff, + 0xa18e, 0x0002, 0x1170, 0xad88, 0x001e, 0x210c, 0xa18c, 0x0f00, + 0x810f, 0xa18e, 0x0001, 0x1128, 0x6810, 0x6914, 0xa115, 0x190c, + 0x953f, 0x0005, 0x080c, 0x86a4, 0x0804, 0x71e5, 0x0066, 0x6000, + 0xa0b2, 0x0010, 0x1a0c, 0x151a, 0x0013, 0x006e, 0x0005, 0xa227, + 0xa702, 0xa828, 0xa227, 0xa227, 0xa227, 0xa227, 0xa227, 0xa25f, + 0xa8ac, 0xa227, 0xa227, 0xa227, 0xa227, 0xa227, 0xa227, 0x080c, + 0x151a, 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x151a, 0x0013, + 0x006e, 0x0005, 0xa242, 0xad33, 0xa242, 0xa242, 0xa242, 0xa242, + 0xa242, 0xa242, 0xacf5, 0xad7b, 0xa242, 0xb328, 0xb358, 0xb328, + 0xb358, 0xa242, 0x080c, 0x151a, 0x0066, 0x6000, 0xa0b2, 0x0010, + 0x1a0c, 0x151a, 0x0013, 0x006e, 0x0005, 0xa25d, 0xa9fc, 0xaac9, + 0xaaf6, 0xab7a, 0xa25d, 0xac67, 0xac12, 0xa8b8, 0xaccb, 0xace0, + 0xa25d, 0xa25d, 0xa25d, 0xa25d, 0xa25d, 0x080c, 0x151a, 0xa1b2, + 0x0080, 0x1a0c, 0x151a, 0x2100, 0xa1b2, 0x0040, 0x1a04, 0xa676, + 0x0002, 0xa2a9, 0xa474, 0xa2a9, 0xa2a9, 0xa2a9, 0xa47b, 0xa2a9, + 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, + 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, + 0xa2ab, 0xa309, 0xa318, 0xa366, 0xa384, 0xa402, 0xa461, 0xa2a9, + 0xa2a9, 0xa47e, 0xa2a9, 0xa2a9, 0xa491, 0xa49c, 0xa2a9, 0xa2a9, + 0xa2a9, 0xa2a9, 0xa2a9, 0xa527, 0xa2a9, 0xa2a9, 0xa53a, 0xa2a9, + 0xa2a9, 0xa4f2, 0xa2a9, 0xa2a9, 0xa2a9, 0xa552, 0xa2a9, 0xa2a9, + 0xa2a9, 0xa5cc, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, 0xa2a9, + 0xa63d, 0x080c, 0x151a, 0x080c, 0x537b, 0x1150, 0x2001, 0xb635, + 0x2004, 0xd0cc, 0x1128, 0xa084, 0x0009, 0xa086, 0x0008, 0x1140, + 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, 0x0000, 0x0804, 0xa46f, + 0x080c, 0x536b, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6218, + 0x2270, 0x72a0, 0x0026, 0x2019, 0x0029, 0x080c, 0x6e67, 0x0076, + 0x2039, 0x0000, 0x080c, 0x6d74, 0x2c08, 0x080c, 0xaf3e, 0x007e, + 0x001e, 0x2e60, 0x080c, 0x521c, 0x001e, 0x002e, 0x003e, 0x00ce, + 0x00ee, 0x6618, 0x00c6, 0x2660, 0x080c, 0x502a, 0x00ce, 0xa6b0, + 0x0001, 0x2634, 0xa684, 0x00ff, 0xa082, 0x0006, 0x0278, 0x080c, + 0xae82, 0x1904, 0xa360, 0x080c, 0xae22, 0x1120, 0x6007, 0x0008, + 0x0804, 0xa46f, 0x6007, 0x0009, 0x0804, 0xa46f, 0x080c, 0xb037, + 0x0128, 0x080c, 0xae82, 0x0d78, 0x0804, 0xa360, 0x6013, 0x1900, + 0x0c88, 0x080c, 0x2df4, 0x1904, 0xa673, 0x6106, 0x080c, 0xaddc, + 0x6007, 0x0006, 0x0804, 0xa46f, 0x6007, 0x0007, 0x0804, 0xa46f, + 0x080c, 0xb38c, 0x1904, 0xa673, 0x080c, 0x2df4, 0x1904, 0xa673, + 0x00d6, 0x6618, 0x2668, 0x6e04, 0xa684, 0x00ff, 0xa082, 0x0006, + 0x1220, 0x2001, 0x0001, 0x080c, 0x4f5d, 0xa6b4, 0xff00, 0x8637, + 0xa686, 0x0006, 0x0188, 0xa686, 0x0004, 0x0170, 0x6e04, 0xa6b4, + 0x00ff, 0xa686, 0x0006, 0x0140, 0xa686, 0x0004, 0x0128, 0xa686, + 0x0005, 0x0110, 0x00de, 0x00e0, 0x080c, 0xaee0, 0x11a0, 0xa686, + 0x0006, 0x1150, 0x0026, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, + 0x0000, 0x080c, 0x2d16, 0x002e, 0x080c, 0x50bd, 0x6007, 0x000a, + 0x00de, 0x0804, 0xa46f, 0x6007, 0x000b, 0x00de, 0x0804, 0xa46f, + 0x080c, 0x2cd1, 0x6007, 0x0001, 0x0804, 0xa46f, 0x080c, 0xb38c, + 0x1904, 0xa673, 0x080c, 0x2df4, 0x1904, 0xa673, 0x6618, 0x00d6, + 0x2668, 0x6e04, 0x00de, 0xa686, 0x0707, 0x0d50, 0x0026, 0x6218, + 0xa290, 0x0028, 0x2214, 0x2009, 0x0000, 0x080c, 0x2d16, 0x002e, + 0x6007, 0x000c, 0x0804, 0xa46f, 0x080c, 0x537b, 0x1140, 0x2001, + 0xb635, 0x2004, 0xa084, 0x0009, 0xa086, 0x0008, 0x1110, 0x0804, + 0xa2b8, 0x080c, 0x536b, 0x6618, 0xa6b0, 0x0001, 0x2634, 0xa684, + 0x00ff, 0xa082, 0x0006, 0x06e8, 0x1138, 0x0026, 0x2001, 0x0006, + 0x080c, 0x4f9c, 0x002e, 0x0050, 0xa6b4, 0xff00, 0x8637, 0xa686, + 0x0004, 0x0120, 0xa686, 0x0006, 0x1904, 0xa360, 0x080c, 0xaeed, + 0x1120, 0x6007, 0x000e, 0x0804, 0xa46f, 0x0046, 0x6418, 0xa4a0, + 0x0028, 0x2424, 0xa4a4, 0x00ff, 0x8427, 0x0046, 0x080c, 0x2cd1, + 0x004e, 0x0016, 0xa006, 0x2009, 0xb653, 0x210c, 0xd1a4, 0x0158, + 0x2009, 0x0029, 0x080c, 0xb1a4, 0x6018, 0x00d6, 0x2068, 0x6800, + 0xc0e5, 0x6802, 0x00de, 0x001e, 0x004e, 0x6007, 0x0001, 0x0804, + 0xa46f, 0x2001, 0x0001, 0x080c, 0x4f5d, 0x0156, 0x0016, 0x0026, + 0x0036, 0x20a9, 0x0004, 0x2019, 0xb605, 0x2011, 0xbc90, 0x080c, + 0x9166, 0x003e, 0x002e, 0x001e, 0x015e, 0xa005, 0x0168, 0xa6b4, + 0xff00, 0x8637, 0xa682, 0x0004, 0x0a04, 0xa360, 0xa682, 0x0007, + 0x0a04, 0xa3ae, 0x0804, 0xa360, 0x6013, 0x1900, 0x6007, 0x0009, + 0x0804, 0xa46f, 0x080c, 0x537b, 0x1140, 0x2001, 0xb635, 0x2004, + 0xa084, 0x0009, 0xa086, 0x0008, 0x1110, 0x0804, 0xa2b8, 0x080c, + 0x536b, 0x6618, 0xa6b0, 0x0001, 0x2634, 0xa684, 0x00ff, 0xa082, + 0x0006, 0x06b8, 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0004, 0x0120, + 0xa686, 0x0006, 0x1904, 0xa360, 0x080c, 0xaf15, 0x1138, 0x080c, + 0xae22, 0x1120, 0x6007, 0x0010, 0x0804, 0xa46f, 0x0046, 0x6418, + 0xa4a0, 0x0028, 0x2424, 0xa4a4, 0x00ff, 0x8427, 0x0046, 0x080c, + 0x2cd1, 0x004e, 0x0016, 0xa006, 0x2009, 0xb653, 0x210c, 0xd1a4, + 0x0158, 0x2009, 0x0029, 0x080c, 0xb1a4, 0x6018, 0x00d6, 0x2068, + 0x6800, 0xc0e5, 0x6802, 0x00de, 0x001e, 0x004e, 0x6007, 0x0001, + 0x00f0, 0x080c, 0xb037, 0x0140, 0xa6b4, 0xff00, 0x8637, 0xa686, + 0x0006, 0x0950, 0x0804, 0xa360, 0x6013, 0x1900, 0x6007, 0x0009, + 0x0070, 0x080c, 0x2df4, 0x1904, 0xa673, 0x080c, 0xb38c, 0x1904, + 0xa673, 0x080c, 0xa69b, 0x1904, 0xa360, 0x6007, 0x0012, 0x6003, + 0x0001, 0x080c, 0x6d45, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, + 0x080c, 0x6d45, 0x0cc0, 0x6007, 0x0005, 0x0cc0, 0x080c, 0xb38c, + 0x1904, 0xa673, 0x080c, 0x2df4, 0x1904, 0xa673, 0x080c, 0xa69b, + 0x1904, 0xa360, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, 0x6d45, + 0x0005, 0x080c, 0x2df4, 0x1904, 0xa673, 0x6007, 0x0023, 0x6003, + 0x0001, 0x080c, 0x6d45, 0x0005, 0x080c, 0xb38c, 0x1904, 0xa673, + 0x080c, 0x2df4, 0x1904, 0xa673, 0x080c, 0xa69b, 0x1904, 0xa360, + 0x0016, 0x0026, 0x2011, 0xbc91, 0x2214, 0xa286, 0xffff, 0x0190, + 0x2c08, 0x080c, 0x9d06, 0x01e0, 0x2260, 0x2011, 0xbc90, 0x2214, + 0x6008, 0xa206, 0x11a8, 0x6018, 0xa190, 0x0006, 0x2214, 0xa206, + 0x01e8, 0x0070, 0x2011, 0xbc90, 0x2214, 0x2c08, 0xa006, 0x080c, + 0xb176, 0x11a0, 0x2011, 0xbc91, 0x2214, 0xa286, 0xffff, 0x01c0, + 0x2160, 0x6007, 0x0026, 0x6013, 0x1700, 0x2011, 0xbc89, 0x2214, + 0xa296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x601c, 0xa086, + 0x0007, 0x1d70, 0x6004, 0xa086, 0x0024, 0x1110, 0x080c, 0x86a4, + 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x6d45, 0x002e, + 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x4f5d, 0x0156, 0x0016, + 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0xb605, 0x2011, 0xbc96, + 0x080c, 0x9166, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120, 0x6007, + 0x0031, 0x0804, 0xa46f, 0x080c, 0x8e82, 0x080c, 0x5b41, 0x11b0, + 0x0006, 0x0026, 0x0036, 0x080c, 0x5b5d, 0x1158, 0x2001, 0xb89f, + 0x2003, 0x0001, 0x2001, 0xb600, 0x2003, 0x0001, 0x080c, 0x5a79, + 0x0010, 0x080c, 0x5b18, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, + 0x2df4, 0x1904, 0xa673, 0x080c, 0xa69b, 0x1904, 0xa360, 0x6106, + 0x080c, 0xa6b7, 0x6007, 0x002b, 0x0804, 0xa46f, 0x6007, 0x002c, + 0x0804, 0xa46f, 0x080c, 0xb38c, 0x1904, 0xa673, 0x080c, 0x2df4, + 0x1904, 0xa673, 0x080c, 0xa69b, 0x1904, 0xa360, 0x6106, 0x080c, + 0xa6bb, 0x1120, 0x6007, 0x002e, 0x0804, 0xa46f, 0x6007, 0x002f, + 0x0804, 0xa46f, 0x080c, 0x2df4, 0x1904, 0xa673, 0x00e6, 0x00d6, + 0x00c6, 0x6018, 0xa080, 0x0001, 0x200c, 0xa184, 0x00ff, 0xa086, + 0x0006, 0x0158, 0xa184, 0xff00, 0x8007, 0xa086, 0x0006, 0x0128, + 0x00ce, 0x00de, 0x00ee, 0x0804, 0xa474, 0x2001, 0xb672, 0x2004, + 0xd0e4, 0x0904, 0xa5c9, 0x2071, 0xbc8c, 0x7010, 0x6036, 0x7014, + 0x603a, 0x7108, 0x720c, 0x2001, 0xb653, 0x2004, 0xd0a4, 0x0140, + 0x6018, 0x2068, 0x6810, 0xa106, 0x1118, 0x6814, 0xa206, 0x01f8, + 0x2001, 0xb653, 0x2004, 0xd0ac, 0x1590, 0x2069, 0xb600, 0x6874, + 0xa206, 0x1568, 0x6870, 0xa106, 0x1550, 0x7210, 0x080c, 0x9d06, + 0x0558, 0x080c, 0xb210, 0x0540, 0x622a, 0x6007, 0x0036, 0x6003, + 0x0001, 0x080c, 0x6cff, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, + 0xa286, 0xffff, 0x0150, 0x080c, 0x9d06, 0x01b0, 0xa280, 0x0002, + 0x2004, 0x7110, 0xa106, 0x1180, 0x0c08, 0x7210, 0x2c08, 0xa085, + 0x0001, 0x080c, 0xb176, 0x2c10, 0x2160, 0x0130, 0x08b8, 0x6007, + 0x0037, 0x6013, 0x1500, 0x08d8, 0x6007, 0x0037, 0x6013, 0x1700, + 0x08b0, 0x6007, 0x0012, 0x0898, 0x080c, 0x2df4, 0x1904, 0xa673, + 0x6018, 0xa080, 0x0001, 0x2004, 0xa084, 0xff00, 0x8007, 0xa086, + 0x0006, 0x1904, 0xa474, 0x00e6, 0x00d6, 0x00c6, 0x2001, 0xb672, + 0x2004, 0xd0e4, 0x0904, 0xa635, 0x2069, 0xb600, 0x2071, 0xbc8c, + 0x7008, 0x6036, 0x720c, 0x623a, 0xa286, 0xffff, 0x1150, 0x7208, + 0x00c6, 0x2c08, 0xa085, 0x0001, 0x080c, 0xb176, 0x2c10, 0x00ce, + 0x0588, 0x080c, 0x9d06, 0x0570, 0x00c6, 0x0026, 0x2260, 0x080c, + 0x99d9, 0x002e, 0x00ce, 0x7118, 0xa18c, 0xff00, 0x810f, 0xa186, + 0x0001, 0x0158, 0xa186, 0x0005, 0x0118, 0xa186, 0x0007, 0x1178, + 0xa280, 0x0004, 0x2004, 0xa005, 0x0150, 0x0056, 0x7510, 0x7614, + 0x080c, 0xb227, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, + 0x003b, 0x602b, 0x0009, 0x6013, 0x2a00, 0x6003, 0x0001, 0x080c, + 0x6cff, 0x0c88, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, 0x1700, + 0x6003, 0x0001, 0x080c, 0x6cff, 0x0c30, 0x6007, 0x003b, 0x602b, + 0x000b, 0x6013, 0x0000, 0x0804, 0xa59f, 0x00e6, 0x0026, 0x080c, + 0x537b, 0x0558, 0x080c, 0x536b, 0x080c, 0xb407, 0x1520, 0x2071, + 0xb600, 0x70d4, 0xc085, 0x70d6, 0x00f6, 0x2079, 0x0100, 0x72a0, + 0xa284, 0x00ff, 0x7072, 0x78e6, 0xa284, 0xff00, 0x7274, 0xa205, + 0x7076, 0x78ea, 0x00fe, 0x70df, 0x0000, 0x2001, 0xb653, 0x2004, + 0xd0a4, 0x0120, 0x2011, 0xb8fa, 0x2013, 0x07d0, 0xd0ac, 0x1128, + 0x080c, 0x2aed, 0x0010, 0x080c, 0xb433, 0x002e, 0x00ee, 0x080c, + 0x86a4, 0x0804, 0xa473, 0x080c, 0x86a4, 0x0005, 0x2600, 0x0002, + 0xa681, 0xa681, 0xa681, 0xa681, 0xa681, 0xa683, 0xa681, 0xa681, + 0xa681, 0x080c, 0x151a, 0x080c, 0xb38c, 0x1d68, 0x080c, 0x2df4, + 0x1d50, 0x0089, 0x1138, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c, + 0x6d45, 0x0005, 0x080c, 0x2cd1, 0x6007, 0x0001, 0x6003, 0x0001, + 0x080c, 0x6d45, 0x0005, 0x00d6, 0x0066, 0x6618, 0x2668, 0x6e04, + 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0006, 0x0170, 0xa686, 0x0004, + 0x0158, 0x6e04, 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0128, 0xa686, + 0x0004, 0x0110, 0xa085, 0x0001, 0x006e, 0x00de, 0x0005, 0x00d6, + 0x0449, 0x00de, 0x0005, 0x00d6, 0x0491, 0x11f0, 0x680c, 0xa08c, + 0xff00, 0x6820, 0xa084, 0x00ff, 0xa115, 0x6212, 0x6824, 0x602a, + 0xd1e4, 0x0118, 0x2009, 0x0001, 0x0060, 0xd1ec, 0x0168, 0x6920, + 0xa18c, 0x00ff, 0x6824, 0x080c, 0x2852, 0x1130, 0x2110, 0x2009, + 0x0000, 0x080c, 0x2d16, 0x0018, 0xa085, 0x0001, 0x0008, 0xa006, + 0x00de, 0x0005, 0x2069, 0xbc8d, 0x6800, 0xa082, 0x0010, 0x1228, + 0x6013, 0x0000, 0xa085, 0x0001, 0x0008, 0xa006, 0x0005, 0x6013, + 0x0000, 0x2069, 0xbc8c, 0x6808, 0xa084, 0xff00, 0xa086, 0x0800, + 0x1140, 0x6800, 0xa084, 0x00ff, 0xa08e, 0x0014, 0x0110, 0xa08e, + 0x0010, 0x0005, 0x6004, 0xa0b2, 0x0080, 0x1a0c, 0x151a, 0xa1b6, + 0x0013, 0x1130, 0x2008, 0xa1b2, 0x0040, 0x1a04, 0xa802, 0x0092, + 0xa1b6, 0x0027, 0x0120, 0xa1b6, 0x0014, 0x190c, 0x151a, 0x2001, + 0x0007, 0x080c, 0x4f9c, 0x080c, 0x7102, 0x080c, 0x9ed9, 0x080c, + 0x71e5, 0x0005, 0xa762, 0xa764, 0xa762, 0xa762, 0xa762, 0xa764, + 0xa776, 0xa7fb, 0xa7c6, 0xa7fb, 0xa7d7, 0xa7fb, 0xa776, 0xa7fb, + 0xa7f3, 0xa7fb, 0xa7f3, 0xa7fb, 0xa7fb, 0xa762, 0xa762, 0xa762, + 0xa762, 0xa762, 0xa762, 0xa762, 0xa762, 0xa762, 0xa762, 0xa762, + 0xa764, 0xa762, 0xa7fb, 0xa762, 0xa762, 0xa7fb, 0xa762, 0xa7f8, + 0xa7fb, 0xa762, 0xa762, 0xa762, 0xa762, 0xa7fb, 0xa7fb, 0xa762, + 0xa7fb, 0xa7fb, 0xa762, 0xa770, 0xa762, 0xa762, 0xa762, 0xa762, + 0xa7f7, 0xa7fb, 0xa762, 0xa762, 0xa7fb, 0xa7fb, 0xa762, 0xa762, + 0xa762, 0xa762, 0x080c, 0x151a, 0x080c, 0x7102, 0x2001, 0xb8b6, + 0x2004, 0x6016, 0x6003, 0x0002, 0x080c, 0x71e5, 0x0804, 0xa801, + 0x2001, 0x0000, 0x080c, 0x4f5d, 0x0804, 0xa7fb, 0x00f6, 0x2079, + 0xb652, 0x7804, 0x00fe, 0xd0ac, 0x1904, 0xa7fb, 0x2001, 0x0000, + 0x080c, 0x4f5d, 0x6018, 0xa080, 0x0004, 0x2004, 0xa086, 0x00ff, + 0x1140, 0x00f6, 0x2079, 0xb600, 0x7898, 0x8000, 0x789a, 0x00fe, + 0x00e0, 0x00c6, 0x6018, 0x2060, 0x6000, 0xd0f4, 0x1140, 0x6010, + 0xa005, 0x0128, 0x00ce, 0x080c, 0x3f85, 0x0804, 0xa7fb, 0x00ce, + 0x2001, 0xb600, 0x2004, 0xa086, 0x0002, 0x1138, 0x00f6, 0x2079, + 0xb600, 0x7898, 0x8000, 0x789a, 0x00fe, 0x2001, 0x0002, 0x080c, + 0x4f6f, 0x080c, 0x7102, 0x601f, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x6d45, 0x080c, 0x71e5, 0x00c6, 0x6118, 0x2160, + 0x2009, 0x0001, 0x080c, 0x6a1a, 0x00ce, 0x04d8, 0x6618, 0x00d6, + 0x2668, 0x6e04, 0x00de, 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0006, + 0x0550, 0xa686, 0x0004, 0x0538, 0x2001, 0x0004, 0x0410, 0x2001, + 0xb600, 0x2004, 0xa086, 0x0003, 0x1110, 0x080c, 0x3f85, 0x2001, + 0x0006, 0x04a1, 0x6618, 0x00d6, 0x2668, 0x6e04, 0x00de, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0006, 0x0170, 0x2001, 0x0006, 0x0048, + 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0401, 0x0020, 0x0018, + 0x0010, 0x080c, 0x4f9c, 0x080c, 0x7102, 0x080c, 0x86a4, 0x080c, + 0x71e5, 0x0005, 0x2600, 0x0002, 0xa80d, 0xa80d, 0xa80d, 0xa80d, + 0xa80d, 0xa80f, 0xa80d, 0xa80d, 0xa80d, 0x080c, 0x151a, 0x080c, + 0x7102, 0x080c, 0x86a4, 0x080c, 0x71e5, 0x0005, 0x0016, 0x00d6, + 0x6118, 0x2168, 0x6900, 0xd184, 0x0140, 0x080c, 0x4f6f, 0x2001, + 0x0000, 0x080c, 0x4f5d, 0x080c, 0x2cf7, 0x00de, 0x001e, 0x0005, + 0x00d6, 0x6618, 0x2668, 0x6804, 0xa084, 0xff00, 0x8007, 0x00de, + 0xa0b2, 0x000c, 0x1a0c, 0x151a, 0xa1b6, 0x0015, 0x1110, 0x003b, + 0x0028, 0xa1b6, 0x0016, 0x190c, 0x151a, 0x006b, 0x0005, 0x8d6b, + 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0xa898, 0xa857, 0x8d6b, + 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, + 0x8d6b, 0xa898, 0xa89f, 0x8d6b, 0x8d6b, 0x8d6b, 0x8d6b, 0x00f6, + 0x2079, 0xb652, 0x7804, 0xd0ac, 0x11e0, 0x6018, 0xa07d, 0x01c8, + 0x7800, 0xd0f4, 0x1118, 0x7810, 0xa005, 0x1198, 0x2001, 0x0000, + 0x080c, 0x4f5d, 0x2001, 0x0002, 0x080c, 0x4f6f, 0x601f, 0x0001, + 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x6d45, 0x080c, 0x71e5, + 0x00e8, 0x2011, 0xbc83, 0x2204, 0x8211, 0x220c, 0x080c, 0x2852, + 0x11a8, 0x00c6, 0x080c, 0x501b, 0x0120, 0x00ce, 0x080c, 0x86a4, + 0x0068, 0x6010, 0x0006, 0x6014, 0x0006, 0x080c, 0x4c7e, 0x000e, + 0x6016, 0x000e, 0x6012, 0x00ce, 0x080c, 0x86a4, 0x00fe, 0x0005, + 0x6604, 0xa6b6, 0x001e, 0x1110, 0x080c, 0x86a4, 0x0005, 0x080c, + 0x9021, 0x1138, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x6d45, + 0x0010, 0x080c, 0x86a4, 0x0005, 0x6004, 0xa08a, 0x0080, 0x1a0c, + 0x151a, 0x080c, 0x7102, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, + 0xa182, 0x0040, 0x0002, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8d0, + 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, + 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0xa8ce, 0x080c, 0x151a, + 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0046, 0x0026, 0x6218, 0xa280, + 0x002b, 0x2004, 0xa005, 0x0120, 0x2021, 0x0000, 0x080c, 0xb3d8, + 0x6106, 0x2071, 0xbc80, 0x7444, 0xa4a4, 0xff00, 0x0904, 0xa934, + 0xa486, 0x2000, 0x1130, 0x2009, 0x0001, 0x2011, 0x0200, 0x080c, + 0x6b8c, 0x080c, 0x15fd, 0x090c, 0x151a, 0x6003, 0x0007, 0x2d00, + 0x6837, 0x010d, 0x6803, 0x0000, 0x683b, 0x0000, 0x6c5a, 0x2c00, + 0x685e, 0x6008, 0x68b2, 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, + 0x694a, 0x0016, 0xa084, 0xff00, 0x6846, 0x684f, 0x0000, 0x6853, + 0x0000, 0x6857, 0x0036, 0x080c, 0x547a, 0x001e, 0xa486, 0x2000, + 0x1130, 0x2019, 0x0017, 0x080c, 0xb121, 0x0804, 0xa991, 0xa486, + 0x0400, 0x1130, 0x2019, 0x0002, 0x080c, 0xb0d3, 0x0804, 0xa991, + 0xa486, 0x0200, 0x1110, 0x080c, 0xb0b8, 0xa486, 0x1000, 0x1110, + 0x080c, 0xb106, 0x0804, 0xa991, 0x2069, 0xb975, 0x6a00, 0xd284, + 0x0904, 0xa9f8, 0xa284, 0x0300, 0x1904, 0xa9f1, 0x6804, 0xa005, + 0x0904, 0xa9d9, 0x2d78, 0x6003, 0x0007, 0x080c, 0x15e4, 0x0904, + 0xa998, 0x7800, 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6013, + 0x0000, 0x6803, 0x0000, 0x6837, 0x0116, 0x683b, 0x0000, 0x6008, + 0x68b2, 0x2c00, 0x684a, 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, + 0x6986, 0x6846, 0x7928, 0x698a, 0x792c, 0x698e, 0x7930, 0x6992, + 0x7934, 0x6996, 0x6853, 0x003d, 0x7244, 0xa294, 0x0003, 0xa286, + 0x0002, 0x1118, 0x684f, 0x0040, 0x0040, 0xa286, 0x0001, 0x1118, + 0x684f, 0x0080, 0x0010, 0x684f, 0x0000, 0x20a9, 0x000a, 0x2001, + 0xbc90, 0xad90, 0x0015, 0x200c, 0x810f, 0x2112, 0x8000, 0x8210, + 0x1f04, 0xa983, 0x200c, 0x6982, 0x8000, 0x200c, 0x697e, 0x080c, + 0x547a, 0x002e, 0x004e, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x0005, + 0x2001, 0xb60e, 0x2004, 0xd084, 0x0120, 0x080c, 0x15fd, 0x1904, + 0xa949, 0x6013, 0x0100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, + 0x6cff, 0x080c, 0x71e5, 0x0c28, 0x2069, 0xbc92, 0x2d04, 0xa084, + 0xff00, 0xa086, 0x1200, 0x11a8, 0x2069, 0xbc80, 0x686c, 0xa084, + 0x00ff, 0x0016, 0x6110, 0xa18c, 0x0700, 0xa10d, 0x6112, 0x001e, + 0x6003, 0x0001, 0x6007, 0x0043, 0x080c, 0x6cff, 0x080c, 0x71e5, + 0x0840, 0x6868, 0x602a, 0x686c, 0x602e, 0x6013, 0x0200, 0x6003, + 0x0001, 0x6007, 0x0041, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x0804, + 0xa991, 0x2001, 0xb60d, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, + 0x080c, 0x3f13, 0x6013, 0x0300, 0x0010, 0x6013, 0x0100, 0x6003, + 0x0001, 0x6007, 0x0041, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x0804, + 0xa991, 0x6013, 0x0500, 0x0c98, 0x6013, 0x0600, 0x0804, 0xa9ac, + 0x6013, 0x0200, 0x0804, 0xa9ac, 0xa186, 0x0013, 0x1170, 0x6004, + 0xa08a, 0x0040, 0x0a0c, 0x151a, 0xa08a, 0x0053, 0x1a0c, 0x151a, + 0xa082, 0x0040, 0x2008, 0x0804, 0xaa86, 0xa186, 0x0051, 0x0138, + 0xa186, 0x0047, 0x11d8, 0x6004, 0xa086, 0x0041, 0x0518, 0x2001, + 0x0109, 0x2004, 0xd084, 0x01f0, 0x0126, 0x2091, 0x2800, 0x0006, + 0x0016, 0x0026, 0x080c, 0x6be6, 0x002e, 0x001e, 0x000e, 0x012e, + 0x6000, 0xa086, 0x0002, 0x1170, 0x0804, 0xaac9, 0xa186, 0x0027, + 0x0120, 0xa186, 0x0014, 0x190c, 0x151a, 0x6004, 0xa082, 0x0040, + 0x2008, 0x001a, 0x080c, 0x86ef, 0x0005, 0xaa50, 0xaa52, 0xaa52, + 0xaa76, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, + 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa50, + 0x080c, 0x151a, 0x080c, 0x7102, 0x080c, 0x71e5, 0x0036, 0x00d6, + 0x6010, 0xa06d, 0x01c0, 0xad84, 0xf000, 0x01a8, 0x6003, 0x0002, + 0x6018, 0x2004, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xb155, + 0x6013, 0x0000, 0x6014, 0xa005, 0x1120, 0x2001, 0xb8b7, 0x2004, + 0x6016, 0x6003, 0x0007, 0x00de, 0x003e, 0x0005, 0x00d6, 0x080c, + 0x7102, 0x080c, 0x71e5, 0x080c, 0x9d16, 0x0120, 0x6010, 0x2068, + 0x080c, 0x1614, 0x080c, 0x9ed9, 0x00de, 0x0005, 0x0002, 0xaa9a, + 0xaab7, 0xaaa3, 0xaac3, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, + 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, 0xaa9a, + 0xaa9a, 0xaa9a, 0x080c, 0x151a, 0x6010, 0xa088, 0x0013, 0x2104, + 0xa085, 0x0400, 0x200a, 0x080c, 0x7102, 0x6010, 0xa080, 0x0013, + 0x2004, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, + 0x86d3, 0x0010, 0x6003, 0x0002, 0x080c, 0x71e5, 0x0005, 0x080c, + 0x7102, 0x080c, 0xb393, 0x1120, 0x080c, 0x6b61, 0x080c, 0x86a4, + 0x080c, 0x71e5, 0x0005, 0x080c, 0x7102, 0x2009, 0x0041, 0x0804, + 0xac12, 0xa182, 0x0040, 0x0002, 0xaadf, 0xaae1, 0xaadf, 0xaadf, + 0xaadf, 0xaadf, 0xaadf, 0xaae2, 0xaadf, 0xaadf, 0xaadf, 0xaadf, + 0xaadf, 0xaadf, 0xaadf, 0xaadf, 0xaadf, 0xaaed, 0xaadf, 0x080c, + 0x151a, 0x0005, 0x6003, 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, + 0x3e20, 0x2c10, 0x080c, 0x1863, 0x0005, 0x00d6, 0x080c, 0x6b61, + 0x00de, 0x080c, 0xb3f6, 0x080c, 0x86a4, 0x0005, 0xa182, 0x0040, + 0x0002, 0xab0c, 0xab0c, 0xab0c, 0xab0c, 0xab0c, 0xab0c, 0xab0c, + 0xab0e, 0xab0c, 0xab11, 0xab4a, 0xab0c, 0xab0c, 0xab0c, 0xab0c, + 0xab4a, 0xab0c, 0xab0c, 0xab0c, 0x080c, 0x151a, 0x080c, 0x86ef, + 0x0005, 0x2001, 0xb672, 0x2004, 0xd0e4, 0x0158, 0x2001, 0x0100, + 0x2004, 0xa082, 0x0005, 0x0228, 0x2001, 0x011f, 0x2004, 0x6036, + 0x0010, 0x6037, 0x0000, 0x080c, 0x7198, 0x080c, 0x72a2, 0x6010, + 0x00d6, 0x2068, 0x684c, 0xd0fc, 0x0150, 0xa08c, 0x0003, 0xa18e, + 0x0002, 0x0168, 0x2009, 0x0041, 0x00de, 0x0804, 0xac12, 0x6003, + 0x0007, 0x6017, 0x0000, 0x080c, 0x6b61, 0x00de, 0x0005, 0x080c, + 0xb393, 0x0110, 0x00de, 0x0005, 0x080c, 0x6b61, 0x080c, 0x86a4, + 0x00de, 0x0ca0, 0x0036, 0x080c, 0x7198, 0x080c, 0x72a2, 0x6010, + 0x00d6, 0x2068, 0x6018, 0x2004, 0xd0bc, 0x0188, 0x684c, 0xa084, + 0x0003, 0xa086, 0x0002, 0x0140, 0x687c, 0x632c, 0xa31a, 0x632e, + 0x6880, 0x6328, 0xa31b, 0x632a, 0x6003, 0x0002, 0x0080, 0x2019, + 0x0004, 0x080c, 0xb155, 0x6014, 0xa005, 0x1128, 0x2001, 0xb8b7, + 0x2004, 0x8003, 0x6016, 0x6013, 0x0000, 0x6003, 0x0007, 0x00de, + 0x003e, 0x0005, 0xa186, 0x0013, 0x1150, 0x6004, 0xa086, 0x0042, + 0x190c, 0x151a, 0x080c, 0x7102, 0x080c, 0x71e5, 0x0005, 0xa186, + 0x0027, 0x0118, 0xa186, 0x0014, 0x1180, 0x6004, 0xa086, 0x0042, + 0x190c, 0x151a, 0x2001, 0x0007, 0x080c, 0x4f9c, 0x080c, 0x7102, + 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, 0xa182, 0x0040, 0x0002, + 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb5, + 0xabc1, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, 0xabb3, + 0xabb3, 0xabb3, 0xabb3, 0x080c, 0x151a, 0x0036, 0x0046, 0x20e1, + 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x080c, 0x1863, 0x004e, 0x003e, + 0x0005, 0x6010, 0x00d6, 0x2068, 0x6810, 0x6a14, 0x0006, 0x0046, + 0x0056, 0x6c7c, 0xa422, 0x6d80, 0x2200, 0xa52b, 0x602c, 0xa420, + 0x642e, 0x6028, 0xa529, 0x652a, 0x005e, 0x004e, 0x000e, 0xa20d, + 0x1178, 0x684c, 0xd0fc, 0x0120, 0x2009, 0x0041, 0x00de, 0x0490, + 0x6003, 0x0007, 0x6017, 0x0000, 0x080c, 0x6b61, 0x00de, 0x0005, + 0x0006, 0x00f6, 0x2c78, 0x080c, 0x5377, 0x00fe, 0x000e, 0x0120, + 0x6003, 0x0002, 0x00de, 0x0005, 0x2009, 0xb60d, 0x210c, 0xd19c, + 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, 0x0021, 0x080c, + 0x6b63, 0x00de, 0x0005, 0xd2fc, 0x0140, 0x8002, 0x8000, 0x8212, + 0xa291, 0x0000, 0x2009, 0x0009, 0x0010, 0x2009, 0x0015, 0x6a6a, + 0x6866, 0x0005, 0xa182, 0x0040, 0x0208, 0x0062, 0xa186, 0x0013, + 0x0120, 0xa186, 0x0014, 0x190c, 0x151a, 0x6020, 0xd0dc, 0x090c, + 0x151a, 0x0005, 0xac35, 0xac3c, 0xac48, 0xac54, 0xac35, 0xac35, + 0xac35, 0xac63, 0xac35, 0xac37, 0xac37, 0xac35, 0xac35, 0xac35, + 0xac35, 0xac37, 0xac35, 0xac37, 0xac35, 0x080c, 0x151a, 0x6020, + 0xd0dc, 0x090c, 0x151a, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, + 0x6cff, 0x0126, 0x2091, 0x8000, 0x080c, 0x71e5, 0x012e, 0x0005, + 0x6003, 0x0001, 0x6106, 0x080c, 0x6cff, 0x0126, 0x2091, 0x8000, + 0x080c, 0x71e5, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, 0x2c10, + 0x080c, 0x1fc5, 0x0126, 0x2091, 0x8000, 0x080c, 0x6d62, 0x080c, + 0x72a2, 0x012e, 0x0005, 0xa016, 0x080c, 0x1863, 0x0005, 0x0126, + 0x2091, 0x8000, 0x0036, 0x00d6, 0xa182, 0x0040, 0x0023, 0x00de, + 0x003e, 0x012e, 0x0005, 0xac83, 0xac85, 0xac97, 0xacb2, 0xac83, + 0xac83, 0xac83, 0xacc7, 0xac83, 0xac83, 0xac83, 0xac83, 0xac83, + 0xac83, 0xac83, 0xac83, 0x080c, 0x151a, 0x6010, 0x2068, 0x684c, + 0xd0fc, 0x01f8, 0xa09c, 0x0003, 0xa39e, 0x0003, 0x01d0, 0x6003, + 0x0001, 0x6106, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x0498, 0x6010, + 0x2068, 0x684c, 0xd0fc, 0x0168, 0xa09c, 0x0003, 0xa39e, 0x0003, + 0x0140, 0x6003, 0x0001, 0x6106, 0x080c, 0x6cff, 0x080c, 0x71e5, + 0x0408, 0x6013, 0x0000, 0x6017, 0x0000, 0x2019, 0x0004, 0x080c, + 0xb155, 0x00c0, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0d90, 0xa09c, + 0x0003, 0xa39e, 0x0003, 0x0d68, 0x6003, 0x0003, 0x6106, 0x2c10, + 0x080c, 0x1fc5, 0x080c, 0x6d62, 0x080c, 0x72a2, 0x0018, 0xa016, + 0x080c, 0x1863, 0x0005, 0x080c, 0x7102, 0x6110, 0x81ff, 0x0158, + 0x00d6, 0x2168, 0x080c, 0xb43c, 0x0036, 0x2019, 0x0029, 0x080c, + 0xb155, 0x003e, 0x00de, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, + 0x080c, 0x7198, 0x6110, 0x81ff, 0x0158, 0x00d6, 0x2168, 0x080c, + 0xb43c, 0x0036, 0x2019, 0x0029, 0x080c, 0xb155, 0x003e, 0x00de, + 0x080c, 0x9ed9, 0x080c, 0x72a2, 0x0005, 0xa182, 0x0085, 0x0002, + 0xad01, 0xacff, 0xacff, 0xad0d, 0xacff, 0xacff, 0xacff, 0x080c, + 0x151a, 0x6003, 0x000b, 0x6106, 0x080c, 0x6cff, 0x0126, 0x2091, + 0x8000, 0x080c, 0x71e5, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, + 0xb38c, 0x0118, 0x080c, 0x86a4, 0x00d8, 0x2071, 0xbc80, 0x7224, + 0x6212, 0x7220, 0x080c, 0xb003, 0x0118, 0x6007, 0x0086, 0x0040, + 0x6007, 0x0087, 0x7224, 0xa296, 0xffff, 0x1110, 0x6007, 0x0086, + 0x6003, 0x0001, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x080c, 0x72a2, + 0x00ee, 0x002e, 0x0005, 0xa186, 0x0013, 0x1160, 0x6004, 0xa08a, + 0x0085, 0x0a0c, 0x151a, 0xa08a, 0x008c, 0x1a0c, 0x151a, 0xa082, + 0x0085, 0x00a2, 0xa186, 0x0027, 0x0130, 0xa186, 0x0014, 0x0118, + 0x080c, 0x86ef, 0x0050, 0x2001, 0x0007, 0x080c, 0x4f9c, 0x080c, + 0x7102, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, 0xad5d, 0xad5f, + 0xad5f, 0xad5d, 0xad5d, 0xad5d, 0xad5d, 0x080c, 0x151a, 0x080c, + 0x7102, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, 0xa182, 0x0085, + 0x0a0c, 0x151a, 0xa182, 0x008c, 0x1a0c, 0x151a, 0xa182, 0x0085, + 0x0002, 0xad78, 0xad78, 0xad78, 0xad7a, 0xad78, 0xad78, 0xad78, + 0x080c, 0x151a, 0x0005, 0xa186, 0x0013, 0x0148, 0xa186, 0x0014, + 0x0130, 0xa186, 0x0027, 0x0118, 0x080c, 0x86ef, 0x0030, 0x080c, + 0x7102, 0x080c, 0x9ed9, 0x080c, 0x71e5, 0x0005, 0x0036, 0x080c, + 0xb3f6, 0x603f, 0x0000, 0x2019, 0x000b, 0x0031, 0x601f, 0x0006, + 0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091, 0x8000, + 0x0086, 0x2c40, 0x0096, 0x2049, 0x0000, 0x080c, 0x81b7, 0x009e, + 0x008e, 0x1578, 0x0076, 0x2c38, 0x080c, 0x825d, 0x007e, 0x1548, + 0x6000, 0xa086, 0x0000, 0x0528, 0x601c, 0xa086, 0x0007, 0x0508, + 0x00d6, 0x6000, 0xa086, 0x0004, 0x1150, 0x080c, 0xb3f6, 0x601f, + 0x0007, 0x2001, 0xb8b6, 0x2004, 0x6016, 0x080c, 0x1952, 0x6010, + 0x2068, 0x080c, 0x9d16, 0x0110, 0x080c, 0xb155, 0x00de, 0x6013, + 0x0000, 0x080c, 0xb3f6, 0x601f, 0x0007, 0x2001, 0xb8b6, 0x2004, + 0x6016, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, 0x0036, 0x0156, + 0x2079, 0xbc80, 0x7938, 0x783c, 0x080c, 0x2852, 0x15b0, 0x0016, + 0x00c6, 0x080c, 0x501b, 0x1578, 0x001e, 0x002e, 0x0026, 0x0016, + 0x2019, 0x0029, 0x080c, 0x8320, 0x080c, 0x6e67, 0x0076, 0x2039, + 0x0000, 0x080c, 0x6d74, 0x007e, 0x001e, 0x0076, 0x2039, 0x0000, + 0x080c, 0xaf3e, 0x007e, 0x080c, 0x521c, 0x0026, 0x6204, 0xa294, + 0xff00, 0x8217, 0xa286, 0x0006, 0x0118, 0xa286, 0x0004, 0x1118, + 0x62a0, 0x080c, 0x2d8a, 0x002e, 0x001e, 0x080c, 0x4c7e, 0x6612, + 0x6516, 0xa006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00ce, + 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x2009, 0xb621, + 0x2104, 0xa086, 0x0074, 0x1904, 0xae77, 0x2069, 0xbc8e, 0x690c, + 0xa182, 0x0100, 0x06c0, 0x6908, 0xa184, 0x8000, 0x05e8, 0x2001, + 0xb89e, 0x2004, 0xa005, 0x1160, 0x6018, 0x2070, 0x7010, 0xa084, + 0x00ff, 0x0118, 0x7000, 0xd0f4, 0x0118, 0xa184, 0x0800, 0x0560, + 0x6910, 0xa18a, 0x0001, 0x0610, 0x6914, 0x2069, 0xbcae, 0x6904, + 0x81ff, 0x1198, 0x690c, 0xa182, 0x0100, 0x02a8, 0x6908, 0x81ff, + 0x1178, 0x6910, 0xa18a, 0x0001, 0x0288, 0x6918, 0xa18a, 0x0001, + 0x0298, 0x00d0, 0x6013, 0x0100, 0x00a0, 0x6013, 0x0300, 0x0088, + 0x6013, 0x0500, 0x0070, 0x6013, 0x0700, 0x0058, 0x6013, 0x0900, + 0x0040, 0x6013, 0x0b00, 0x0028, 0x6013, 0x0f00, 0x0010, 0x6013, + 0x2d00, 0xa085, 0x0001, 0x0008, 0xa006, 0x001e, 0x00ee, 0x00de, + 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x0026, 0x0036, 0x0156, 0x6218, + 0x2268, 0x6b04, 0xa394, 0x00ff, 0xa286, 0x0006, 0x0190, 0xa286, + 0x0004, 0x0178, 0xa394, 0xff00, 0x8217, 0xa286, 0x0006, 0x0148, + 0xa286, 0x0004, 0x0130, 0x00c6, 0x2d60, 0x080c, 0x502a, 0x00ce, + 0x04c0, 0x2011, 0xbc96, 0xad98, 0x000a, 0x20a9, 0x0004, 0x080c, + 0x9166, 0x1580, 0x2011, 0xbc9a, 0xad98, 0x0006, 0x20a9, 0x0004, + 0x080c, 0x9166, 0x1538, 0x0046, 0x0016, 0x6aa0, 0xa294, 0x00ff, + 0x8227, 0xa006, 0x2009, 0xb653, 0x210c, 0xd1a4, 0x0138, 0x2009, + 0x0029, 0x080c, 0xb1a4, 0x6800, 0xc0e5, 0x6802, 0x2019, 0x0029, + 0x080c, 0x6e67, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d74, 0x2c08, + 0x080c, 0xaf3e, 0x007e, 0x2001, 0x0007, 0x080c, 0x4f9c, 0x001e, + 0x004e, 0xa006, 0x015e, 0x003e, 0x002e, 0x00de, 0x00ce, 0x0005, + 0x00d6, 0x2069, 0xbc8e, 0x6800, 0xa086, 0x0800, 0x0118, 0x6013, + 0x0000, 0x0008, 0xa006, 0x00de, 0x0005, 0x00c6, 0x00f6, 0x0016, + 0x0026, 0x0036, 0x0156, 0x2079, 0xbc8c, 0x7930, 0x7834, 0x080c, + 0x2852, 0x11a0, 0x080c, 0x501b, 0x1188, 0x2011, 0xbc90, 0xac98, + 0x000a, 0x20a9, 0x0004, 0x080c, 0x9166, 0x1140, 0x2011, 0xbc94, + 0xac98, 0x0006, 0x20a9, 0x0004, 0x080c, 0x9166, 0x015e, 0x003e, + 0x002e, 0x001e, 0x00fe, 0x00ce, 0x0005, 0x00c6, 0x0006, 0x0016, + 0x0026, 0x0036, 0x0156, 0x2011, 0xbc83, 0x2204, 0x8211, 0x220c, + 0x080c, 0x2852, 0x11a0, 0x080c, 0x501b, 0x1188, 0x2011, 0xbc96, + 0xac98, 0x000a, 0x20a9, 0x0004, 0x080c, 0x9166, 0x1140, 0x2011, + 0xbc9a, 0xac98, 0x0006, 0x20a9, 0x0004, 0x080c, 0x9166, 0x015e, + 0x003e, 0x002e, 0x001e, 0x000e, 0x00ce, 0x0005, 0x00e6, 0x00c6, + 0x0086, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, + 0x8000, 0x2740, 0x2029, 0xb8ea, 0x252c, 0x2021, 0xb8f0, 0x2424, + 0x2061, 0xbe00, 0x2071, 0xb600, 0x7648, 0x7068, 0x81ff, 0x0150, + 0x0006, 0xa186, 0xb9f5, 0x000e, 0x0128, 0x8001, 0xa602, 0x1a04, + 0xafbf, 0x0018, 0xa606, 0x0904, 0xafbf, 0x2100, 0xac06, 0x0904, + 0xafb6, 0x080c, 0xb1cc, 0x0904, 0xafb6, 0x671c, 0xa786, 0x0001, + 0x0904, 0xafda, 0xa786, 0x0004, 0x0904, 0xafda, 0xa786, 0x0007, + 0x05e8, 0x2500, 0xac06, 0x05d0, 0x2400, 0xac06, 0x05b8, 0x080c, + 0xb1dc, 0x15a0, 0x88ff, 0x0118, 0x6050, 0xa906, 0x1578, 0x00d6, + 0x6000, 0xa086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1952, 0x001e, + 0xa786, 0x0008, 0x1148, 0x080c, 0x9f14, 0x1130, 0x080c, 0x8ca5, + 0x00de, 0x080c, 0x9ed9, 0x00d0, 0x6010, 0x2068, 0x080c, 0x9d16, + 0x0190, 0xa786, 0x0003, 0x1528, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x080c, 0xb43c, 0x0016, 0x080c, 0x9f88, 0x080c, 0x547a, + 0x001e, 0x080c, 0x9ecd, 0x00de, 0x080c, 0x9ed9, 0xace0, 0x0018, + 0x2001, 0xb617, 0x2004, 0xac02, 0x1210, 0x0804, 0xaf52, 0x012e, + 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, + 0x0005, 0xa786, 0x0006, 0x1150, 0xa386, 0x0005, 0x0128, 0x080c, + 0xb43c, 0x080c, 0xb155, 0x08f8, 0x00de, 0x0c00, 0xa786, 0x000a, + 0x0968, 0x0850, 0x080c, 0xb1dc, 0x19c8, 0x81ff, 0x09b8, 0xa180, + 0x0001, 0x2004, 0xa086, 0x0018, 0x0130, 0xa180, 0x0001, 0x2004, + 0xa086, 0x002d, 0x1958, 0x6000, 0xa086, 0x0002, 0x1938, 0x080c, + 0x9f03, 0x0130, 0x080c, 0x9f14, 0x1908, 0x080c, 0x8ca5, 0x0038, + 0x080c, 0x2cf7, 0x080c, 0x9f14, 0x1110, 0x080c, 0x8ca5, 0x080c, + 0x9ed9, 0x0804, 0xafb6, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170, + 0xa006, 0x080c, 0xb176, 0x001e, 0x0120, 0x601c, 0xa084, 0x000f, + 0x001b, 0x00ee, 0x00ce, 0x0005, 0xb01c, 0xb01c, 0xb01c, 0xb01c, + 0xb01c, 0xb01c, 0xb01e, 0xb01c, 0xa006, 0x0005, 0x0046, 0x0016, + 0x7018, 0xa080, 0x0028, 0x2024, 0xa4a4, 0x00ff, 0x8427, 0x2c00, + 0x2009, 0x0020, 0x080c, 0xb1a4, 0x001e, 0x004e, 0x0036, 0x2019, + 0x0002, 0x080c, 0xad9c, 0x003e, 0xa085, 0x0001, 0x0005, 0x2001, + 0x0001, 0x080c, 0x4f5d, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, + 0x0004, 0x2019, 0xb605, 0x2011, 0xbc96, 0x080c, 0x9166, 0x003e, + 0x002e, 0x001e, 0x015e, 0xa005, 0x0005, 0x00f6, 0x00e6, 0x00c6, + 0x0086, 0x0076, 0x0066, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, + 0x2061, 0xbe00, 0x2079, 0x0001, 0x8fff, 0x0904, 0xb0ab, 0x2071, + 0xb600, 0x7648, 0x7068, 0x8001, 0xa602, 0x1a04, 0xb0ab, 0x88ff, + 0x0128, 0x2800, 0xac06, 0x15b0, 0x2079, 0x0000, 0x080c, 0xb1cc, + 0x0588, 0x2400, 0xac06, 0x0570, 0x671c, 0xa786, 0x0006, 0x1550, + 0xa786, 0x0007, 0x0538, 0x88ff, 0x1140, 0x6018, 0xa206, 0x1510, + 0x85ff, 0x0118, 0x6050, 0xa106, 0x11e8, 0x00d6, 0x6000, 0xa086, + 0x0004, 0x1150, 0x080c, 0xb3f6, 0x601f, 0x0007, 0x2001, 0xb8b6, + 0x2004, 0x6016, 0x080c, 0x1952, 0x6010, 0x2068, 0x080c, 0x9d16, + 0x0120, 0x0046, 0x080c, 0xb155, 0x004e, 0x00de, 0x080c, 0x9ed9, + 0x88ff, 0x1198, 0xace0, 0x0018, 0x2001, 0xb617, 0x2004, 0xac02, + 0x1210, 0x0804, 0xb05c, 0xa006, 0x012e, 0x002e, 0x006e, 0x007e, + 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0xa8c5, 0x0001, 0x0ca0, + 0x0076, 0x0056, 0x0086, 0x2041, 0x0000, 0x2029, 0x0001, 0x2c20, + 0x2019, 0x0002, 0x6218, 0x0096, 0x2049, 0x0000, 0x080c, 0x81b7, + 0x009e, 0x008e, 0x2039, 0x0000, 0x080c, 0x825d, 0x080c, 0xb04d, + 0x005e, 0x007e, 0x0005, 0x0026, 0x0046, 0x0056, 0x0076, 0x00c6, + 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, + 0x0036, 0x080c, 0x501b, 0x11b0, 0x2c10, 0x0056, 0x0086, 0x2041, + 0x0000, 0x2508, 0x2029, 0x0001, 0x0096, 0x2049, 0x0000, 0x080c, + 0x81b7, 0x009e, 0x008e, 0x2039, 0x0000, 0x080c, 0x825d, 0x080c, + 0xb04d, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xb0df, 0x015e, + 0x00ce, 0x007e, 0x005e, 0x004e, 0x002e, 0x0005, 0x0076, 0x0056, + 0x6218, 0x0086, 0x2041, 0x0000, 0x2029, 0x0001, 0x2019, 0x0048, + 0x0096, 0x2049, 0x0000, 0x080c, 0x81b7, 0x009e, 0x008e, 0x2039, + 0x0000, 0x080c, 0x825d, 0x2c20, 0x080c, 0xb04d, 0x005e, 0x007e, + 0x0005, 0x0026, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, + 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, 0x0036, 0x080c, 0x501b, + 0x11c0, 0x2c10, 0x0086, 0x2041, 0x0000, 0x2828, 0x0046, 0x2021, + 0x0001, 0x080c, 0xb3d8, 0x004e, 0x0096, 0x2049, 0x0000, 0x080c, + 0x81b7, 0x009e, 0x008e, 0x2039, 0x0000, 0x080c, 0x825d, 0x080c, + 0xb04d, 0x003e, 0x001e, 0x8108, 0x1f04, 0xb12c, 0x015e, 0x00ce, + 0x007e, 0x005e, 0x004e, 0x002e, 0x0005, 0x0016, 0x00f6, 0x3800, + 0xd08c, 0x0130, 0xad82, 0x1000, 0x02b0, 0xad82, 0xb600, 0x0230, + 0xad82, 0xee00, 0x0280, 0xad82, 0xffff, 0x1268, 0x6800, 0xa07d, + 0x0138, 0x6803, 0x0000, 0x6b52, 0x080c, 0x547a, 0x2f68, 0x0cb0, + 0x6b52, 0x080c, 0x547a, 0x00fe, 0x001e, 0x0005, 0x00e6, 0x0046, + 0x0036, 0x2061, 0xbe00, 0xa005, 0x1138, 0x2071, 0xb600, 0x7448, + 0x7068, 0x8001, 0xa402, 0x12d8, 0x2100, 0xac06, 0x0168, 0x6000, + 0xa086, 0x0000, 0x0148, 0x6008, 0xa206, 0x1130, 0x6018, 0xa1a0, + 0x0006, 0x2424, 0xa406, 0x0140, 0xace0, 0x0018, 0x2001, 0xb617, + 0x2004, 0xac02, 0x1220, 0x0c40, 0xa085, 0x0001, 0x0008, 0xa006, + 0x003e, 0x004e, 0x00ee, 0x0005, 0x00d6, 0x0006, 0x080c, 0x15fd, + 0x000e, 0x090c, 0x151a, 0x6837, 0x010d, 0x685e, 0x0026, 0x2010, + 0x080c, 0x9d06, 0x2001, 0x0000, 0x0120, 0x2200, 0xa080, 0x0014, + 0x2004, 0x002e, 0x684a, 0x6956, 0x6c46, 0x684f, 0x0000, 0x2001, + 0xb8be, 0x2004, 0x6852, 0xa006, 0x68b2, 0x6802, 0x683a, 0x685a, + 0x080c, 0x547a, 0x00de, 0x0005, 0x6700, 0xa786, 0x0000, 0x0158, + 0xa786, 0x0001, 0x0140, 0xa786, 0x000a, 0x0128, 0xa786, 0x0009, + 0x0110, 0xa085, 0x0001, 0x0005, 0x00e6, 0x6018, 0x2070, 0x70a0, + 0xa206, 0x00ee, 0x0005, 0x0016, 0x6004, 0xa08e, 0x001e, 0x11a0, + 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, 0x6032, 0x6007, 0x0085, + 0x6003, 0x000b, 0x601f, 0x0005, 0x2001, 0xb8b7, 0x2004, 0x6016, + 0x080c, 0x6cff, 0x080c, 0x71e5, 0x001e, 0x0005, 0xe000, 0xe000, + 0x0005, 0x6020, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, 0x9ff1, + 0x0030, 0x080c, 0xb3f6, 0x080c, 0x6b61, 0x080c, 0x86a4, 0x0005, + 0xa280, 0x0007, 0x2004, 0xa084, 0x000f, 0x0002, 0xb21f, 0xb21f, + 0xb21f, 0xb224, 0xb21f, 0xb221, 0xb221, 0xb21f, 0xb221, 0xa006, + 0x0005, 0x00c6, 0x2260, 0x00ce, 0xa085, 0x0001, 0x0005, 0xa280, + 0x0007, 0x2004, 0xa084, 0x000f, 0x0002, 0xb236, 0xb236, 0xb236, + 0xb236, 0xb236, 0xb236, 0xb241, 0xb236, 0xb236, 0x6007, 0x003b, + 0x602b, 0x0009, 0x6013, 0x2a00, 0x6003, 0x0001, 0x080c, 0x6cff, + 0x0005, 0x00c6, 0x2260, 0x080c, 0xb3f6, 0x603f, 0x0000, 0x6020, + 0xc0f4, 0xc0cc, 0x6022, 0x6037, 0x0000, 0x00ce, 0x00d6, 0x2268, + 0xa186, 0x0007, 0x1904, 0xb29c, 0x6810, 0xa005, 0x0138, 0xa080, + 0x0013, 0x2004, 0xd0fc, 0x1110, 0x00de, 0x08c0, 0x6007, 0x003a, + 0x6003, 0x0001, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x00c6, 0x2d60, + 0x6100, 0xa186, 0x0002, 0x1904, 0xb325, 0x6010, 0xa005, 0x1138, + 0x6000, 0xa086, 0x0007, 0x190c, 0x151a, 0x0804, 0xb325, 0xa08c, + 0xf000, 0x1130, 0x0028, 0x2068, 0x6800, 0xa005, 0x1de0, 0x2d00, + 0xa080, 0x0013, 0x2004, 0xa084, 0x0003, 0xa086, 0x0002, 0x1180, + 0x6010, 0x2068, 0x684c, 0xc0dc, 0xc0f4, 0x684e, 0x6850, 0xc0f4, + 0xc0fc, 0x6852, 0x2009, 0x0043, 0x080c, 0xac12, 0x0804, 0xb325, + 0x2009, 0x0041, 0x0804, 0xb31f, 0xa186, 0x0005, 0x15f0, 0x6810, + 0xa080, 0x0013, 0x2004, 0xd0bc, 0x1118, 0x00de, 0x0804, 0xb236, + 0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x151a, 0x0804, 0xb254, 0x6007, + 0x003a, 0x6003, 0x0001, 0x080c, 0x6cff, 0x080c, 0x71e5, 0x00c6, + 0x2d60, 0x6100, 0xa186, 0x0002, 0x0120, 0xa186, 0x0004, 0x1904, + 0xb325, 0x2071, 0xb924, 0x7000, 0xa086, 0x0003, 0x1128, 0x7004, + 0xac06, 0x1110, 0x7003, 0x0000, 0x6810, 0xa080, 0x0013, 0x200c, + 0xc1f4, 0xc1dc, 0x2102, 0x8000, 0x200c, 0xc1f4, 0xc1fc, 0xc1bc, + 0x2102, 0x2009, 0x0042, 0x0804, 0xb31f, 0x0036, 0x00d6, 0x00d6, + 0x080c, 0x15fd, 0x003e, 0x090c, 0x151a, 0x6837, 0x010d, 0x6803, + 0x0000, 0x683b, 0x0000, 0x685b, 0x0000, 0x6b5e, 0x6857, 0x0045, + 0x2c00, 0x6862, 0x6034, 0x6872, 0x2360, 0x6020, 0xc0dd, 0x6022, + 0x6018, 0xa080, 0x0028, 0x2004, 0xa084, 0x00ff, 0x8007, 0x6350, + 0x6b4a, 0x6846, 0x684f, 0x0000, 0x6853, 0x0000, 0x6d6a, 0x6e66, + 0x686f, 0x0001, 0x080c, 0x547a, 0x2019, 0x0045, 0x6008, 0x2068, + 0x080c, 0xad9c, 0x2d00, 0x600a, 0x601f, 0x0006, 0x6003, 0x0007, + 0x6017, 0x0000, 0x603f, 0x0000, 0x00de, 0x003e, 0x0038, 0x603f, + 0x0000, 0x6003, 0x0007, 0x080c, 0xac12, 0x00ce, 0x00de, 0x0005, + 0xa186, 0x0013, 0x1128, 0x6004, 0xa082, 0x0085, 0x2008, 0x00c2, + 0xa186, 0x0027, 0x1178, 0x080c, 0x7102, 0x0036, 0x00d6, 0x6010, + 0x2068, 0x2019, 0x0004, 0x080c, 0xb155, 0x00de, 0x003e, 0x080c, + 0x71e5, 0x0005, 0xa186, 0x0014, 0x0d70, 0x080c, 0x86ef, 0x0005, + 0xb351, 0xb34f, 0xb34f, 0xb34f, 0xb34f, 0xb34f, 0xb351, 0x080c, + 0x151a, 0x080c, 0x7102, 0x6003, 0x000c, 0x080c, 0x71e5, 0x0005, + 0xa182, 0x008c, 0x1220, 0xa182, 0x0085, 0x0208, 0x001a, 0x080c, + 0x86ef, 0x0005, 0xb369, 0xb369, 0xb369, 0xb369, 0xb36b, 0xb389, + 0xb369, 0x080c, 0x151a, 0x00d6, 0x2c68, 0x080c, 0x864e, 0x01a0, + 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0xbc8e, 0x210c, 0x6136, + 0x2009, 0xbc8f, 0x210c, 0x613a, 0x600b, 0xffff, 0x6918, 0x611a, + 0x601f, 0x0004, 0x080c, 0x6cff, 0x2d60, 0x080c, 0x86a4, 0x00de, + 0x0005, 0x080c, 0x86a4, 0x0005, 0x00e6, 0x6018, 0x2070, 0x7000, + 0xd0ec, 0x00ee, 0x0005, 0x6010, 0xa08c, 0xf000, 0x0904, 0xb3d7, + 0xa080, 0x0013, 0x200c, 0xd1ec, 0x05d0, 0x2001, 0xb672, 0x2004, + 0xd0ec, 0x05a8, 0x6003, 0x0002, 0x6020, 0xc0e5, 0x6022, 0xd1ac, + 0x0180, 0x00f6, 0x2c78, 0x080c, 0x5373, 0x00fe, 0x0150, 0x2001, + 0xb8b8, 0x2004, 0x603e, 0x2009, 0xb672, 0x210c, 0xd1f4, 0x11e8, + 0x0080, 0x2009, 0xb672, 0x210c, 0xd1f4, 0x0128, 0x6020, 0xc0e4, + 0x6022, 0xa006, 0x00a0, 0x2001, 0xb8b8, 0x200c, 0x8103, 0xa100, + 0x603e, 0x6018, 0xa088, 0x002b, 0x2104, 0xa005, 0x0118, 0xa088, + 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, 0xa085, 0x0001, 0x0005, + 0x0016, 0x00c6, 0x00e6, 0x6150, 0xa2f0, 0x002b, 0x2e04, 0x2060, + 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6050, 0xa106, 0x1138, 0x600c, + 0x2072, 0x080c, 0x6b61, 0x080c, 0x86a4, 0x0010, 0xacf0, 0x0003, + 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, 0x6018, + 0xa0e8, 0x002b, 0x2d04, 0xa005, 0x0140, 0xac06, 0x0120, 0x2d04, + 0xa0e8, 0x0003, 0x0cb8, 0x600c, 0x206a, 0x00de, 0x0005, 0x0026, + 0x0036, 0x0156, 0x2011, 0xb628, 0x2204, 0xa084, 0x00ff, 0x2019, + 0xbc8e, 0x2334, 0xa636, 0x11d8, 0x8318, 0x2334, 0x2204, 0xa084, + 0xff00, 0xa636, 0x11a0, 0x2011, 0xbc90, 0x6018, 0xa098, 0x000a, + 0x20a9, 0x0004, 0x080c, 0x9166, 0x1150, 0x2011, 0xbc94, 0x6018, + 0xa098, 0x0006, 0x20a9, 0x0004, 0x080c, 0x9166, 0x1100, 0x015e, + 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0xb600, 0x080c, 0x4c28, + 0x080c, 0x2aed, 0x00ee, 0x0005, 0x00e6, 0x6018, 0x2070, 0x7000, + 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0x6850, 0xc0e5, 0x6852, + 0x0005, 0x00e6, 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, + 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, 0xb8ea, 0x252c, 0x2021, + 0xb8f0, 0x2424, 0x2061, 0xbe00, 0x2071, 0xb600, 0x7648, 0x7068, + 0xa606, 0x0578, 0x671c, 0xa786, 0x0001, 0x0118, 0xa786, 0x0008, + 0x1500, 0x2500, 0xac06, 0x01e8, 0x2400, 0xac06, 0x01d0, 0x080c, + 0xb1cc, 0x01b8, 0x080c, 0xb1dc, 0x11a0, 0x6000, 0xa086, 0x0004, + 0x1120, 0x0016, 0x080c, 0x1952, 0x001e, 0x080c, 0x9f03, 0x1110, + 0x080c, 0x2cf7, 0x080c, 0x9f14, 0x1110, 0x080c, 0x8ca5, 0x080c, + 0x9ed9, 0xace0, 0x0018, 0x2001, 0xb617, 0x2004, 0xac02, 0x1208, + 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, + 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, + 0x8000, 0x2071, 0xb640, 0xd5a4, 0x0118, 0x7034, 0x8000, 0x7036, + 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178, 0x2500, + 0xa084, 0x0007, 0xa08e, 0x0003, 0x0148, 0xa08e, 0x0004, 0x0130, + 0xa08e, 0x0005, 0x0118, 0x2071, 0xb64a, 0x04c9, 0x001e, 0x00ee, + 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, + 0x8000, 0x2071, 0xb640, 0xd5a4, 0x0118, 0x7034, 0x8000, 0x7036, + 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178, 0x2500, + 0xa084, 0x0007, 0xa08e, 0x0003, 0x0148, 0xa08e, 0x0004, 0x0130, + 0xa08e, 0x0005, 0x0118, 0x2071, 0xb64a, 0x0089, 0x001e, 0x00ee, + 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, + 0x2071, 0xb642, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e04, + 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072, 0x0005, + 0x00e6, 0x2071, 0xb640, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, + 0xb644, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, + 0x8000, 0x2071, 0xb640, 0x7044, 0x8000, 0x7046, 0x00ee, 0x000e, + 0x012e, 0x0005, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, + 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, + 0x4000, 0x8000, 0xdb06 }; +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_length01 = 0xa52b; +#else +unsigned short risc_code_length01 = 0xa52b; +#endif + diff --git a/drivers/scsi/qla2xxx/ql2300.c b/drivers/scsi/qla2xxx/ql2300.c new file mode 100644 index 000000000..e7a93ddda --- /dev/null +++ b/drivers/scsi/qla2xxx/ql2300.c @@ -0,0 +1,114 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (C) 2003 Christoph Hellwig. + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include +#include +#include + +#include "qla_def.h" + +static char qla_driver_name[] = "qla2300"; + +extern unsigned char fw2300ipx_version[]; +extern unsigned char fw2300ipx_version_str[]; +extern unsigned short fw2300ipx_addr01; +extern unsigned short fw2300ipx_code01[]; +extern unsigned short fw2300ipx_length01; + +static struct qla_fw_info qla_fw_tbl[] = { + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2300ipx_code01[0], + .fwlen = &fw2300ipx_length01, + .fwstart = &fw2300ipx_addr01, + }, + { FW_INFO_ADDR_NOMORE, }, +}; + +static struct qla_board_info qla_board_tbl[] = { + { + .drv_name = qla_driver_name, + .isp_name = "ISP2300", + .fw_info = qla_fw_tbl, + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP2312", + .fw_info = qla_fw_tbl, + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP6312", + .fw_info = qla_fw_tbl, + }, +}; + +static struct pci_device_id qla2300_pci_tbl[] = { + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2300, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[0], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2312, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[1], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP6312, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[2], + }, + {0, 0}, +}; +MODULE_DEVICE_TABLE(pci, qla2300_pci_tbl); + +static int __devinit +qla2300_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, + (struct qla_board_info *)id->driver_data); +} + +static void __devexit +qla2300_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + +static struct pci_driver qla2300_pci_driver = { + .name = "qla2300", + .id_table = qla2300_pci_tbl, + .probe = qla2300_probe_one, + .remove = __devexit_p(qla2300_remove_one), +}; + +static int __init +qla2300_init(void) +{ + return pci_module_init(&qla2300_pci_driver); +} + +static void __exit +qla2300_exit(void) +{ + pci_unregister_driver(&qla2300_pci_driver); +} + +module_init(qla2300_init); +module_exit(qla2300_exit); + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic ISP23xx FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff --git a/drivers/scsi/qla2xxx/ql2300_fw.c b/drivers/scsi/qla2xxx/ql2300_fw.c index 624e1fbe5..b8ce7fe5d 100644 --- a/drivers/scsi/qla2xxx/ql2300_fw.c +++ b/drivers/scsi/qla2xxx/ql2300_fw.c @@ -1,10283 +1,7746 @@ /* - * Firmware version 3.03.20 IPX from - * - * ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2300_fw.bin - * - * xxd -g 1 -i ql2300_fw.bin | indent -l80 -i8 -o ql2300_fw.c + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation * + * See LICENSE.qla2xxx for copyright and licensing details. */ -#include +/* + * Firmware Version 3.03.20 (15:39 Feb 01, 2006) + */ -static u8 ql2300_fw_bin[] = { - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x91, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x03, 0x00, 0x14, 0x01, 0x37, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, - 0x49, 0x47, 0x48, 0x54, 0x20, 0x32, 0x30, 0x30, 0x31, 0x20, 0x51, 0x4c, - 0x4f, 0x47, 0x49, 0x43, 0x20, 0x43, 0x4f, 0x52, 0x50, 0x4f, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x49, 0x53, 0x50, 0x32, 0x33, 0x30, 0x30, - 0x20, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x30, 0x33, 0x2e, 0x30, 0x33, - 0x2e, 0x32, 0x30, 0x20, 0x20, 0x20, 0x20, 0x20, 0x24, 0x00, 0x20, 0xa9, - 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x22, 0x00, - 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, - 0x24, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, - 0x20, 0x91, 0x26, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, - 0x40, 0x0f, 0x20, 0x91, 0x28, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, - 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2a, 0x00, 0x20, 0xa9, 0x00, 0x0f, - 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2c, 0x00, 0x20, 0xa9, - 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2e, 0x00, - 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, - 0x20, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0xc1, 0x00, 0x04, 0x20, 0xc9, - 0x1b, 0xff, 0x20, 0x59, 0x00, 0x00, 0x2b, 0x78, 0x78, 0x83, 0x00, 0x04, - 0x20, 0x89, 0x2d, 0x93, 0x20, 0x51, 0x18, 0x00, 0x2a, 0x70, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0xe9, 0x00, 0x01, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, - 0x0e, 0x52, 0x20, 0x29, 0x4d, 0x00, 0x20, 0x31, 0xff, 0xff, 0x20, 0x39, - 0x4c, 0xd0, 0x20, 0x21, 0x02, 0x00, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, - 0x00, 0x00, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x0e, 0x41, 0x04, 0x20, 0xe9, - 0x00, 0x01, 0x20, 0xa1, 0x10, 0x00, 0x90, 0x0e, 0x20, 0x01, 0x0c, 0xc0, - 0x90, 0x84, 0x0f, 0xff, 0x20, 0xa8, 0x41, 0x04, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x01, 0x20, 0x21, 0xa8, 0x41, 0x04, 0x80, 0x01, - 0x1d, 0xe0, 0x75, 0x6e, 0x76, 0x72, 0x77, 0x6a, 0x74, 0x76, 0x74, 0x7a, - 0x00, 0xe6, 0x20, 0x71, 0x1a, 0xd1, 0x24, 0x72, 0x00, 0xee, 0x20, 0xa1, - 0x1c, 0xd0, 0x71, 0x70, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, - 0x91, 0x8c, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x01, 0x91, 0x12, 0x90, 0x0e, - 0x21, 0xa8, 0x41, 0x04, 0x82, 0x11, 0x1d, 0xe0, 0x71, 0x70, 0x34, 0x00, - 0x80, 0x01, 0x91, 0x02, 0x01, 0x20, 0x02, 0x18, 0x20, 0xa8, 0x90, 0x0e, - 0x41, 0x04, 0x20, 0x09, 0x18, 0x00, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, - 0x81, 0x0d, 0x81, 0x0d, 0x91, 0x8c, 0x00, 0x1f, 0x20, 0x01, 0x00, 0x01, - 0x91, 0x12, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x08, 0x00, 0x90, 0x0e, - 0x20, 0xa9, 0x08, 0x00, 0x41, 0x04, 0x82, 0x11, 0x1d, 0xd8, 0x08, 0x0c, - 0x0f, 0x26, 0x08, 0x0c, 0x61, 0x3c, 0x08, 0x0c, 0xb2, 0x69, 0x08, 0x0c, - 0x10, 0xdd, 0x08, 0x0c, 0x12, 0xfc, 0x08, 0x0c, 0x1b, 0xd7, 0x08, 0x0c, - 0x0d, 0x57, 0x08, 0x0c, 0x10, 0x62, 0x08, 0x0c, 0x34, 0xb6, 0x08, 0x0c, - 0x79, 0x46, 0x08, 0x0c, 0x6b, 0x7c, 0x08, 0x0c, 0x8a, 0x69, 0x08, 0x0c, - 0x87, 0x4a, 0x08, 0x0c, 0x24, 0xb7, 0x08, 0x0c, 0x93, 0xa5, 0x08, 0x0c, - 0x80, 0x66, 0x08, 0x0c, 0x22, 0xe8, 0x08, 0x0c, 0x24, 0x1c, 0x08, 0x0c, - 0x24, 0xac, 0x20, 0x91, 0x30, 0x09, 0x78, 0x83, 0x00, 0x00, 0x10, 0x04, - 0x09, 0x1f, 0x78, 0x80, 0x90, 0x86, 0x00, 0x02, 0x11, 0x90, 0x78, 0x83, - 0x40, 0x00, 0x78, 0x37, 0x40, 0x00, 0x78, 0x33, 0x00, 0x10, 0x0e, 0x04, - 0x09, 0x13, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x71, - 0x18, 0x00, 0x70, 0x03, 0x00, 0x00, 0x20, 0x71, 0x18, 0x00, 0x70, 0x00, - 0x90, 0x8e, 0x00, 0x03, 0x11, 0x78, 0x08, 0x0c, 0x4d, 0x09, 0x08, 0x0c, - 0x34, 0xdd, 0x08, 0x0c, 0x79, 0xb7, 0x08, 0x0c, 0x71, 0x22, 0x08, 0x0c, - 0x8b, 0x50, 0x08, 0x0c, 0x87, 0x76, 0x08, 0x0c, 0x2c, 0xdd, 0x0c, 0x58, - 0x00, 0x0b, 0x0c, 0x78, 0x09, 0x44, 0x09, 0x45, 0x0a, 0xe0, 0x09, 0x42, - 0x0b, 0xa0, 0x0d, 0x56, 0x0d, 0x56, 0x0d, 0x56, 0x08, 0x0c, 0x0d, 0xc5, - 0x00, 0x05, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, - 0x90, 0x86, 0x00, 0x01, 0x19, 0x04, 0x0a, 0xb3, 0x08, 0x0c, 0x0e, 0x94, - 0x08, 0x0c, 0x76, 0x37, 0x01, 0x50, 0x08, 0x0c, 0x76, 0x5a, 0x15, 0xa0, - 0x20, 0x79, 0x01, 0x00, 0x78, 0x28, 0x90, 0x85, 0x18, 0x00, 0x78, 0x2a, - 0x04, 0x68, 0x08, 0x0c, 0x75, 0x63, 0x70, 0x00, 0x90, 0x86, 0x00, 0x01, - 0x19, 0x04, 0x0a, 0xb3, 0x70, 0x98, 0x90, 0x86, 0x00, 0x29, 0x19, 0x04, - 0x0a, 0xb3, 0x08, 0x0c, 0x87, 0x33, 0x08, 0x0c, 0x87, 0x25, 0x20, 0x01, - 0x01, 0x61, 0x20, 0x03, 0x00, 0x01, 0x20, 0x79, 0x01, 0x00, 0x78, 0x27, - 0xff, 0xff, 0x7a, 0x28, 0x92, 0x95, 0x5e, 0x2f, 0x7a, 0x2a, 0x20, 0x11, - 0x74, 0xb2, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, 0x74, 0xa5, 0x08, 0x0c, - 0x89, 0x17, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, - 0x80, 0x30, 0x90, 0x1e, 0x73, 0x96, 0x04, 0xd0, 0x08, 0x0c, 0x58, 0x3f, - 0x20, 0x79, 0x01, 0x00, 0x78, 0x44, 0x90, 0x05, 0x19, 0x04, 0x0a, 0xb3, - 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, 0x74, 0xb2, - 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, 0x74, 0xa5, 0x08, 0x0c, 0x89, 0x17, - 0x20, 0x01, 0x02, 0x65, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, - 0x78, 0x40, 0x90, 0x84, 0xff, 0xfb, 0x78, 0x42, 0x20, 0x01, 0x19, 0xa7, - 0x20, 0x04, 0x90, 0x05, 0x11, 0x40, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x08, 0x0c, 0x60, 0xe4, 0x00, 0xce, 0x08, 0x04, 0x0a, 0xb3, 0x78, 0x0f, - 0x00, 0x6b, 0x7a, 0x28, 0x08, 0x0c, 0x76, 0x3f, 0x01, 0x18, 0x92, 0x95, - 0x5e, 0x2f, 0x00, 0x10, 0x92, 0x95, 0x40, 0x2f, 0x7a, 0x2a, 0x20, 0x11, - 0x80, 0x10, 0x73, 0xd8, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x2b, 0x82, 0x08, 0x0c, 0x4c, 0x44, 0x72, 0x48, 0xc2, 0x84, - 0x72, 0x4a, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xac, 0xc1, 0xcc, - 0x21, 0x02, 0x08, 0x0c, 0xa9, 0xb0, 0x20, 0x11, 0x00, 0x04, 0x08, 0x0c, - 0xd0, 0xe8, 0x08, 0x0c, 0x69, 0x47, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x20, - 0x08, 0x0c, 0x2b, 0xc6, 0x02, 0xe0, 0x04, 0x00, 0x08, 0x0c, 0x60, 0xeb, - 0x01, 0x40, 0x70, 0x97, 0x00, 0x01, 0x70, 0xd3, 0x00, 0x00, 0x08, 0x0c, - 0x5a, 0x11, 0x08, 0x04, 0x0a, 0xb3, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0x94, - 0x01, 0x88, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x04, 0xc0, 0xcd, 0x20, 0x12, - 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xd4, 0x11, 0x18, 0x08, 0x0c, 0x2b, 0xc6, - 0x12, 0x70, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x04, 0xc0, 0xbc, 0x00, 0xa8, - 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xd4, 0x1d, 0xb8, 0x20, 0x11, 0x18, 0x0c, - 0x22, 0x04, 0xc0, 0xbd, 0x00, 0x60, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x04, - 0xc0, 0xbd, 0x20, 0x12, 0x08, 0x0c, 0x6a, 0x9b, 0x11, 0x28, 0xd0, 0xa4, - 0x01, 0x18, 0x22, 0x04, 0xc0, 0xfd, 0x20, 0x12, 0x08, 0x0c, 0x6a, 0x61, - 0x01, 0x20, 0x7a, 0x0c, 0xc2, 0xb4, 0x7a, 0x0e, 0x00, 0xa8, 0x70, 0x7f, - 0x00, 0x00, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x30, 0x70, 0xb0, 0x90, 0x05, - 0x11, 0x68, 0x08, 0x0c, 0xd5, 0x2b, 0x00, 0x50, 0x08, 0x0c, 0xd5, 0x2b, - 0x70, 0xdc, 0xd0, 0x9c, 0x11, 0x28, 0x70, 0xb0, 0x90, 0x05, 0x01, 0x10, - 0x08, 0x0c, 0x60, 0xc1, 0x70, 0xe7, 0x00, 0x00, 0x70, 0xe3, 0x00, 0x00, - 0x70, 0xa7, 0x00, 0x00, 0x08, 0x0c, 0x2b, 0xce, 0x02, 0x28, 0x20, 0x11, - 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc4, 0x20, 0x12, 0x72, 0xdc, 0x08, 0x0c, - 0x76, 0x37, 0x11, 0x78, 0x90, 0x16, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x8b, - 0x20, 0x19, 0x19, 0x6d, 0x21, 0x1a, 0x00, 0x1e, 0x70, 0x5f, 0xff, 0xff, - 0x70, 0x63, 0x00, 0xef, 0x70, 0x83, 0x00, 0x00, 0x00, 0x20, 0x20, 0x19, - 0x19, 0x6d, 0x20, 0x1b, 0x00, 0x00, 0x20, 0x79, 0x18, 0x47, 0x78, 0x04, - 0xd0, 0xac, 0x01, 0x08, 0xc2, 0x95, 0x72, 0xde, 0x08, 0x0c, 0x76, 0x37, - 0x01, 0x18, 0x92, 0x96, 0x00, 0x04, 0x05, 0x48, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0xd0, 0xe8, 0x70, 0xab, 0x00, 0x00, 0x70, 0xaf, 0xff, 0xff, - 0x70, 0x03, 0x00, 0x02, 0x20, 0x79, 0x01, 0x00, 0x78, 0x27, 0x00, 0x03, - 0x78, 0x28, 0x90, 0x85, 0x00, 0x03, 0x78, 0x2a, 0x00, 0xfe, 0x08, 0x0c, - 0x30, 0x00, 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0xaa, 0xbf, 0x08, 0x0c, - 0x9a, 0xb1, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, - 0x01, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x8b, 0x61, 0xe2, 0x00, 0x1e, - 0x00, 0xce, 0x01, 0x2e, 0x04, 0x20, 0x70, 0xab, 0x00, 0x00, 0x70, 0xaf, - 0xff, 0xff, 0x70, 0x03, 0x00, 0x02, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x78, 0x27, 0x00, 0x03, 0x78, 0x28, 0x90, 0x85, 0x00, 0x03, 0x78, 0x2a, - 0x00, 0xfe, 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0xaa, 0xbf, 0x08, 0x0c, - 0x9a, 0xb1, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, - 0x01, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x8b, 0x61, 0xe2, 0x00, 0x1e, - 0x00, 0xce, 0x00, 0xfe, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, - 0x08, 0x0c, 0x76, 0x37, 0x11, 0x18, 0x20, 0xa9, 0x08, 0x00, 0x00, 0x10, - 0x20, 0xa9, 0x07, 0x82, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x10, 0x90, 0x0e, - 0x00, 0x10, 0x20, 0x09, 0x00, 0x7e, 0x86, 0xff, 0x01, 0x38, 0x91, 0x80, - 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0x00, 0xd0, 0xbc, - 0x09, 0x0c, 0x33, 0x4c, 0x81, 0x08, 0x1f, 0x04, 0x0a, 0xc7, 0x70, 0x7f, - 0x00, 0x00, 0x70, 0x80, 0x90, 0x84, 0x00, 0xff, 0x70, 0x82, 0x70, 0xb3, - 0x00, 0x00, 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, 0x90, 0x86, 0x00, 0x02, 0x19, 0x04, - 0x0b, 0x9d, 0x70, 0xac, 0x90, 0x86, 0xff, 0xff, 0x01, 0x30, 0x08, 0x0c, - 0x30, 0x00, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0x0b, 0x9d, 0x70, 0xdc, - 0xd0, 0xac, 0x11, 0x10, 0xd0, 0x9c, 0x05, 0x58, 0xd0, 0x84, 0x05, 0x48, - 0x00, 0x06, 0x20, 0x01, 0x01, 0x03, 0x20, 0x03, 0x00, 0x2b, 0x00, 0x0e, - 0xd0, 0x8c, 0x05, 0x08, 0x08, 0x0c, 0x33, 0xaf, 0x11, 0xd0, 0x70, 0xe0, - 0x90, 0x86, 0xff, 0xff, 0x01, 0xb0, 0x08, 0x0c, 0x31, 0xbc, 0x08, 0x0c, - 0x9a, 0xb1, 0x70, 0xdc, 0xd0, 0x94, 0x19, 0x04, 0x0b, 0x9d, 0x20, 0x11, - 0x00, 0x01, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x10, 0x20, 0x11, 0x00, 0x03, - 0x90, 0x1e, 0x08, 0x0c, 0x31, 0xf6, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, - 0x0b, 0x9d, 0x70, 0xe4, 0x90, 0x05, 0x19, 0x04, 0x0b, 0x9d, 0x70, 0xa8, - 0x90, 0x05, 0x19, 0x04, 0x0b, 0x9d, 0x70, 0xdc, 0xd0, 0xa4, 0x01, 0x18, - 0xd0, 0xb4, 0x09, 0x04, 0x0b, 0x9d, 0x08, 0x0c, 0x6a, 0x61, 0x19, 0x04, - 0x0b, 0x9d, 0x08, 0x0c, 0x6a, 0xb4, 0x19, 0x04, 0x0b, 0x9d, 0x08, 0x0c, - 0x6a, 0x9b, 0x01, 0xc0, 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x7f, - 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x18, 0xb8, 0x00, - 0xd0, 0xec, 0x11, 0x38, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x0b, 0x3d, - 0x00, 0xce, 0x01, 0x5e, 0x00, 0x28, 0x00, 0x1e, 0x00, 0xce, 0x01, 0x5e, - 0x08, 0x04, 0x0b, 0x9d, 0x00, 0x06, 0x20, 0x01, 0x01, 0x03, 0x20, 0x03, - 0x00, 0x2b, 0x00, 0x0e, 0x20, 0x11, 0x19, 0xb4, 0x08, 0x0c, 0x0f, 0x96, - 0x20, 0x11, 0x19, 0xce, 0x08, 0x0c, 0x0f, 0x96, 0x70, 0x30, 0xc0, 0x8c, - 0x70, 0x32, 0x70, 0x03, 0x00, 0x03, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x0c, - 0x0e, 0x76, 0x90, 0x06, 0x08, 0x0c, 0x28, 0x1c, 0x08, 0x0c, 0x33, 0xaf, - 0x01, 0x18, 0x08, 0x0c, 0x4d, 0xe1, 0x00, 0x50, 0x00, 0x36, 0x00, 0x46, - 0x20, 0x19, 0xff, 0xff, 0x20, 0x21, 0x00, 0x06, 0x08, 0x0c, 0x4d, 0xfb, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, - 0x76, 0x5a, 0x01, 0x50, 0x08, 0x0c, 0x76, 0x37, 0x78, 0x28, 0x01, 0x18, - 0x90, 0x84, 0xe1, 0xff, 0x00, 0x10, 0x90, 0x84, 0xff, 0xdf, 0x78, 0x2a, - 0x00, 0xfe, 0x20, 0x01, 0x19, 0xe9, 0x20, 0x04, 0x90, 0x86, 0x00, 0x05, - 0x11, 0x20, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, - 0x00, 0x00, 0x08, 0x0c, 0xaa, 0xc9, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x0c, - 0x9b, 0xd3, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, 0x00, 0x46, - 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x01, 0x00, - 0x79, 0x04, 0x91, 0x8c, 0xff, 0xfd, 0x79, 0x06, 0x20, 0x09, 0x00, 0xf7, - 0x08, 0x0c, 0x60, 0xaa, 0x79, 0x40, 0x91, 0x8c, 0x00, 0x10, 0x79, 0x42, - 0x79, 0x24, 0xd1, 0xb4, 0x01, 0x10, 0x78, 0x27, 0x00, 0x40, 0xd1, 0x9c, - 0x01, 0x10, 0x78, 0x27, 0x00, 0x08, 0x00, 0x06, 0x00, 0x36, 0x01, 0x56, - 0x79, 0x54, 0xd1, 0xac, 0x19, 0x04, 0x0c, 0x2d, 0x20, 0x01, 0x19, 0xa8, - 0x20, 0x04, 0x90, 0x05, 0x15, 0x18, 0x08, 0x0c, 0x2c, 0x49, 0x11, 0x48, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x2b, 0xb1, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x2b, 0x94, 0x00, 0xb8, 0x08, 0x0c, 0x2c, 0x51, 0x11, 0x38, - 0x90, 0x06, 0x08, 0x0c, 0x2b, 0xb1, 0x90, 0x06, 0x08, 0x0c, 0x2b, 0x94, - 0x00, 0x68, 0x08, 0x0c, 0x2c, 0x59, 0x1d, 0x50, 0x20, 0x01, 0x19, 0x98, - 0x20, 0x04, 0xd0, 0xfc, 0x01, 0x08, 0x00, 0x20, 0x08, 0x0c, 0x29, 0xbf, - 0x08, 0x04, 0x0d, 0x0d, 0x08, 0x0c, 0x76, 0x48, 0x01, 0x48, 0x08, 0x0c, - 0x76, 0x5a, 0x11, 0x18, 0x08, 0x0c, 0x79, 0x41, 0x00, 0x50, 0x08, 0x0c, - 0x76, 0x3f, 0x0d, 0xd0, 0x08, 0x0c, 0x79, 0x3c, 0x08, 0x0c, 0x79, 0x32, - 0x08, 0x0c, 0x75, 0x63, 0x00, 0x58, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x40, - 0x20, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x60, 0xaa, 0x78, 0x43, 0x00, 0x90, - 0x78, 0x43, 0x00, 0x10, 0x20, 0xa9, 0x09, 0xc4, 0x78, 0x20, 0xd0, 0x9c, - 0x11, 0x38, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x38, 0x78, 0x24, 0xd0, 0xac, - 0x19, 0x04, 0x0d, 0x12, 0x1f, 0x04, 0x0c, 0x0c, 0x00, 0x70, 0x78, 0x24, - 0x08, 0x0c, 0x76, 0x51, 0x01, 0x18, 0xd0, 0xac, 0x19, 0x04, 0x0d, 0x12, - 0x90, 0x84, 0x18, 0x00, 0x0d, 0x98, 0x70, 0x03, 0x00, 0x01, 0x08, 0x04, - 0x0d, 0x12, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x08, 0x04, - 0x0d, 0x25, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x04, 0x90, 0x05, 0x15, 0x18, - 0x08, 0x0c, 0x2c, 0x49, 0x11, 0x48, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x2b, 0xb1, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x2b, 0x94, 0x00, 0xb8, - 0x08, 0x0c, 0x2c, 0x51, 0x11, 0x38, 0x90, 0x06, 0x08, 0x0c, 0x2b, 0xb1, - 0x90, 0x06, 0x08, 0x0c, 0x2b, 0x94, 0x00, 0x68, 0x08, 0x0c, 0x2c, 0x59, - 0x1d, 0x50, 0x20, 0x01, 0x19, 0x98, 0x20, 0x04, 0xd0, 0xfc, 0x01, 0x08, - 0x00, 0x20, 0x08, 0x0c, 0x29, 0xbf, 0x08, 0x04, 0x0d, 0x0d, 0x78, 0x50, - 0x90, 0x85, 0x00, 0x40, 0x78, 0x52, 0x79, 0x38, 0x78, 0x50, 0x90, 0x84, - 0xfb, 0xcf, 0x78, 0x52, 0x08, 0x0c, 0x2c, 0x61, 0x90, 0x85, 0x20, 0x00, - 0x78, 0x52, 0x79, 0x3a, 0x20, 0xa9, 0x00, 0x46, 0x1d, 0x04, 0x0c, 0x66, - 0x08, 0x0c, 0x88, 0xf7, 0x1f, 0x04, 0x0c, 0x66, 0x78, 0x50, 0x90, 0x85, - 0x04, 0x00, 0x90, 0x84, 0xdf, 0xbf, 0x78, 0x52, 0x79, 0x3a, 0x08, 0x0c, - 0x76, 0x48, 0x01, 0x48, 0x08, 0x0c, 0x76, 0x5a, 0x11, 0x18, 0x08, 0x0c, - 0x79, 0x41, 0x00, 0x50, 0x08, 0x0c, 0x76, 0x3f, 0x0d, 0xd0, 0x08, 0x0c, - 0x79, 0x3c, 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x75, 0x63, 0x00, 0x20, - 0x20, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x60, 0xaa, 0x20, 0xa9, 0x00, 0x28, - 0xa0, 0x01, 0x1f, 0x04, 0x0c, 0x8c, 0x78, 0x50, 0x90, 0x85, 0x14, 0x00, - 0x78, 0x52, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x20, 0x78, 0x43, 0x00, 0x90, - 0x78, 0x43, 0x00, 0x10, 0x20, 0x21, 0xe6, 0x78, 0x20, 0x19, 0xea, 0x60, - 0x0d, 0x0c, 0x88, 0xf7, 0x78, 0x20, 0xd0, 0x9c, 0x15, 0x88, 0x08, 0x0c, - 0x76, 0x37, 0x09, 0x04, 0x0c, 0xf2, 0x78, 0x24, 0xd0, 0xac, 0x19, 0x04, - 0x0d, 0x12, 0x08, 0x0c, 0x76, 0x5a, 0x15, 0x30, 0x00, 0x46, 0x20, 0x21, - 0x03, 0x20, 0x84, 0x21, 0x1d, 0xf0, 0x00, 0x4e, 0x78, 0x27, 0x18, 0x00, - 0x08, 0x0c, 0x2c, 0x61, 0x78, 0x24, 0x90, 0x84, 0x18, 0x00, 0x11, 0x68, - 0x94, 0x84, 0x0f, 0xff, 0x11, 0x40, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, - 0x90, 0x84, 0x90, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x0d, 0x33, 0x84, 0x21, - 0x11, 0x58, 0x1d, 0x04, 0x0c, 0xcd, 0x08, 0x0c, 0x88, 0xf7, 0x08, 0x0c, - 0x79, 0x3c, 0x08, 0x0c, 0x79, 0x32, 0x70, 0x03, 0x00, 0x01, 0x04, 0xf0, - 0x83, 0x19, 0x19, 0x40, 0x1d, 0x04, 0x0c, 0xda, 0x08, 0x0c, 0x88, 0xf7, - 0x20, 0x09, 0x19, 0x9b, 0x21, 0x04, 0x90, 0x05, 0x01, 0x18, 0x80, 0x01, - 0x20, 0x0a, 0x11, 0x78, 0x20, 0x0b, 0x00, 0x0a, 0x78, 0x27, 0x00, 0x48, - 0x20, 0xa9, 0x00, 0x02, 0x08, 0x0c, 0x2c, 0x42, 0x79, 0x24, 0x08, 0x0c, - 0x2c, 0x61, 0xd1, 0x9c, 0x01, 0x10, 0x08, 0x0c, 0x2b, 0x82, 0x00, 0xd8, - 0x08, 0x0c, 0x76, 0x48, 0x11, 0x40, 0x94, 0xa2, 0x03, 0xe8, 0x11, 0x28, - 0x08, 0x0c, 0x76, 0x0f, 0x70, 0x03, 0x00, 0x01, 0x00, 0xa8, 0x78, 0x27, - 0x18, 0x00, 0x08, 0x0c, 0x2c, 0x61, 0x78, 0x24, 0x08, 0x0c, 0x76, 0x51, - 0x01, 0x10, 0xd0, 0xac, 0x11, 0x58, 0x90, 0x84, 0x18, 0x00, 0x09, 0x50, - 0x70, 0x03, 0x00, 0x01, 0x00, 0x28, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x28, 0x1c, 0x00, 0x78, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x9c, - 0x11, 0x20, 0x79, 0x04, 0x91, 0x8d, 0x00, 0x02, 0x79, 0x06, 0x78, 0x27, - 0x00, 0x48, 0x78, 0x28, 0x90, 0x85, 0x00, 0x28, 0x78, 0x2a, 0x78, 0x50, - 0x90, 0x85, 0x04, 0x00, 0x78, 0x52, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, - 0x00, 0x00, 0x90, 0x06, 0x78, 0xf2, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x0e, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x4e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x36, 0x00, 0x46, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x56, 0x00, 0x69, 0x0d, 0x0c, 0x88, 0xf7, - 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x9e, 0x70, 0x04, 0x90, 0x86, 0x00, 0x01, 0x11, 0x10, - 0x08, 0x0c, 0x34, 0xdd, 0x00, 0xee, 0x00, 0x05, 0x00, 0x05, 0x2a, 0x70, - 0x20, 0x61, 0x19, 0xac, 0x20, 0x63, 0x00, 0x03, 0x60, 0x07, 0x00, 0x03, - 0x60, 0x0b, 0x00, 0x14, 0x60, 0x0f, 0x01, 0x37, 0x20, 0x01, 0x19, 0x7c, - 0x90, 0x0e, 0x21, 0x02, 0x71, 0x96, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, - 0x90, 0x82, 0x00, 0x02, 0x02, 0x18, 0x70, 0x5f, 0xff, 0xff, 0x00, 0x08, - 0x71, 0x5e, 0x70, 0x67, 0xff, 0xff, 0x71, 0x7e, 0x71, 0x82, 0x08, 0x0c, - 0xd5, 0x2b, 0x70, 0xeb, 0x00, 0xc0, 0x20, 0x61, 0x19, 0x6c, 0x60, 0x03, - 0x09, 0x09, 0x61, 0x06, 0x60, 0x0b, 0x88, 0x00, 0x60, 0x0f, 0x02, 0x00, - 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, 0x00, 0x1f, 0x61, 0x1a, 0x60, 0x1f, - 0x07, 0xd0, 0x20, 0x61, 0x19, 0x74, 0x60, 0x03, 0x80, 0x00, 0x61, 0x06, - 0x61, 0x0a, 0x60, 0x0f, 0x02, 0x00, 0x60, 0x13, 0x00, 0xff, 0x61, 0x16, - 0x60, 0x1b, 0x00, 0x01, 0x61, 0x1e, 0x20, 0x61, 0x19, 0x89, 0x60, 0x03, - 0x51, 0x4c, 0x60, 0x07, 0x4f, 0x47, 0x60, 0x0b, 0x49, 0x43, 0x60, 0x0f, - 0x20, 0x20, 0x20, 0x01, 0x18, 0x2c, 0x21, 0x02, 0x00, 0x05, 0x90, 0x16, - 0x08, 0x0c, 0x67, 0x24, 0x11, 0x78, 0xb8, 0x04, 0x90, 0xc4, 0x00, 0xff, - 0x98, 0xc6, 0x00, 0x06, 0x01, 0x28, 0x90, 0xc4, 0xff, 0x00, 0x98, 0xc6, - 0x06, 0x00, 0x11, 0x20, 0x91, 0x86, 0x00, 0x80, 0x01, 0x08, 0x82, 0x10, - 0x81, 0x08, 0x91, 0x86, 0x08, 0x00, 0x1d, 0x50, 0x22, 0x08, 0x00, 0x05, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xf6, - 0x00, 0x10, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x0d, 0xc7, 0x00, 0x06, - 0x00, 0x16, 0x20, 0x01, 0x80, 0x02, 0x00, 0x06, 0x20, 0x79, 0x00, 0x00, - 0x00, 0x0e, 0x78, 0x82, 0x78, 0x36, 0x00, 0x1e, 0x79, 0x8e, 0x00, 0x0e, - 0x78, 0x8a, 0x00, 0x0e, 0x78, 0x86, 0x39, 0x00, 0x78, 0x9a, 0x00, 0xd6, - 0x20, 0x69, 0x03, 0x00, 0x68, 0x18, 0x78, 0xae, 0x68, 0x1c, 0x78, 0xb2, - 0x20, 0x01, 0x1a, 0x09, 0x20, 0x04, 0x78, 0xb6, 0x20, 0x01, 0x1a, 0x86, - 0x20, 0x04, 0x78, 0xba, 0x68, 0x08, 0x78, 0xbe, 0x00, 0xde, 0x78, 0x33, - 0x00, 0x12, 0x20, 0x91, 0x50, 0x00, 0x01, 0x56, 0x00, 0xd6, 0x00, 0x36, - 0x00, 0x26, 0x20, 0x79, 0x03, 0x00, 0x20, 0x69, 0x1a, 0xa9, 0x7a, 0x08, - 0x22, 0x6a, 0x20, 0x69, 0x1a, 0xaa, 0x7a, 0x18, 0x22, 0x6a, 0x8d, 0x68, - 0x7a, 0x1c, 0x22, 0x6a, 0x78, 0x2c, 0x20, 0x19, 0x1a, 0xb7, 0x20, 0x1a, - 0x20, 0x19, 0x1a, 0xba, 0x90, 0x16, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x68, - 0x78, 0x20, 0x20, 0x1a, 0x82, 0x10, 0x83, 0x18, 0x93, 0x86, 0x1a, 0xcf, - 0x01, 0x08, 0x0c, 0xa8, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x10, 0x20, 0x11, - 0xde, 0xad, 0x20, 0x19, 0x1a, 0xb8, 0x78, 0x2c, 0x20, 0x1a, 0x83, 0x18, - 0x22, 0x1a, 0x78, 0x03, 0x00, 0x00, 0x20, 0x69, 0x1a, 0x89, 0x90, 0x1e, - 0x20, 0xa9, 0x00, 0x20, 0x7b, 0x26, 0x7a, 0x28, 0x22, 0x6a, 0x8d, 0x68, - 0x83, 0x18, 0x1f, 0x04, 0x0e, 0x26, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xde, - 0x01, 0x5e, 0x20, 0x79, 0x18, 0x00, 0x78, 0x03, 0x00, 0x05, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x01, 0x80, - 0x20, 0x01, 0x1a, 0x1c, 0x20, 0x04, 0x90, 0x05, 0x01, 0x28, 0x20, 0x01, - 0x00, 0x8b, 0x20, 0x04, 0xd0, 0xfc, 0x0d, 0xd8, 0x20, 0x01, 0x00, 0x8a, - 0x20, 0x03, 0x00, 0x02, 0x20, 0x03, 0x10, 0x01, 0x08, 0x0c, 0x57, 0xe4, - 0x11, 0x08, 0x00, 0x99, 0x0c, 0xd8, 0x00, 0x05, 0x91, 0x8c, 0x03, 0xff, - 0x20, 0x01, 0x00, 0x03, 0x20, 0x04, 0x90, 0x84, 0x06, 0x00, 0x11, 0x18, - 0x91, 0x8d, 0x28, 0x00, 0x00, 0x10, 0x91, 0x8d, 0x20, 0x00, 0x20, 0x01, - 0x01, 0x7f, 0x21, 0x02, 0x00, 0x05, 0x00, 0x26, 0x01, 0x26, 0x20, 0x11, - 0x00, 0x80, 0x08, 0x0c, 0x0e, 0xee, 0x20, 0xa9, 0x09, 0x00, 0x08, 0x0c, - 0x0f, 0x0f, 0x20, 0x11, 0x00, 0x40, 0x08, 0x0c, 0x0e, 0xee, 0x20, 0xa9, - 0x09, 0x00, 0x08, 0x0c, 0x0f, 0x0f, 0x0c, 0x78, 0x00, 0x26, 0x08, 0x0c, - 0x0e, 0xfb, 0x11, 0x18, 0x20, 0x11, 0x00, 0x40, 0x00, 0x98, 0x20, 0x11, - 0x01, 0x0e, 0x22, 0x14, 0x92, 0x94, 0x00, 0x07, 0x92, 0x96, 0x00, 0x07, - 0x01, 0x18, 0x20, 0x11, 0xa8, 0x80, 0x00, 0x10, 0x20, 0x11, 0x68, 0x40, - 0xd0, 0xe4, 0x70, 0xef, 0x00, 0x00, 0x11, 0x20, 0x70, 0xef, 0x0f, 0xa0, - 0x08, 0x0c, 0x0f, 0x00, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x08, 0x0c, - 0x0e, 0xfb, 0x01, 0x28, 0xd0, 0xa4, 0x11, 0x38, 0x20, 0x11, 0xcd, 0xd5, - 0x00, 0x10, 0x20, 0x11, 0x00, 0x80, 0x08, 0x0c, 0x0f, 0x00, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0x26, 0x70, 0xef, 0x00, 0x00, 0x08, 0x0c, 0x0e, 0xfb, - 0x11, 0x48, 0x08, 0x0c, 0x2c, 0x59, 0x11, 0x18, 0x20, 0x11, 0x84, 0x84, - 0x00, 0x58, 0x20, 0x11, 0x82, 0x82, 0x00, 0x40, 0x08, 0x0c, 0x2c, 0x59, - 0x11, 0x18, 0x20, 0x11, 0xcd, 0xc5, 0x00, 0x10, 0x20, 0x11, 0xca, 0xc2, - 0x08, 0x0c, 0x0f, 0x00, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, - 0x20, 0x71, 0x18, 0x00, 0xd0, 0xb4, 0x70, 0xe8, 0x11, 0x10, 0xc0, 0xe4, - 0x00, 0x48, 0x00, 0x06, 0x3b, 0x00, 0x90, 0x84, 0xff, 0x3f, 0x20, 0xd8, - 0x00, 0x0e, 0x70, 0xef, 0x00, 0x00, 0xc0, 0xe5, 0x00, 0x79, 0x00, 0x0e, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0xd0, 0xe4, - 0x70, 0xe8, 0x11, 0x10, 0xc0, 0xdc, 0x00, 0x08, 0xc0, 0xdd, 0x00, 0x11, - 0x00, 0xee, 0x00, 0x05, 0x70, 0xea, 0x70, 0x00, 0x90, 0x84, 0x00, 0x07, - 0x00, 0x0b, 0x00, 0x05, 0x0e, 0xbd, 0x0e, 0x94, 0x0e, 0x94, 0x0e, 0x76, - 0x0e, 0xa3, 0x0e, 0x94, 0x0e, 0x94, 0x0e, 0xa3, 0x00, 0x16, 0x3b, 0x08, - 0x3a, 0x00, 0x91, 0x04, 0x91, 0x8d, 0x00, 0xc0, 0x21, 0xd8, 0x90, 0x84, - 0xff, 0x3f, 0x92, 0x05, 0x20, 0xd0, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x3a, 0x20, 0x04, 0xd0, 0xdc, 0x00, 0x05, 0x9e, 0x86, 0x18, 0x00, - 0x19, 0x0c, 0x0d, 0xc5, 0x70, 0xe8, 0xd0, 0xe4, 0x01, 0x08, 0xc2, 0xe5, - 0x72, 0xea, 0xd0, 0xe4, 0x11, 0x18, 0x92, 0x94, 0x00, 0xc0, 0x0c, 0x01, - 0x00, 0x05, 0x1d, 0x04, 0x0f, 0x0f, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, - 0x0f, 0x0f, 0x00, 0x05, 0x89, 0x0e, 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x94, - 0x00, 0x3f, 0x91, 0x8c, 0xff, 0xc0, 0x00, 0x05, 0x00, 0x06, 0x22, 0x00, - 0x91, 0x4d, 0x89, 0x4f, 0x89, 0x4d, 0x89, 0x4d, 0x00, 0x0e, 0x00, 0x05, - 0x01, 0xd6, 0x01, 0x46, 0x00, 0x36, 0x00, 0x96, 0x20, 0x61, 0x18, 0x8d, - 0x60, 0x0b, 0x00, 0x00, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, - 0x60, 0x07, 0x00, 0x00, 0x20, 0x09, 0xff, 0xc0, 0x21, 0x05, 0x00, 0x06, - 0x20, 0x01, 0xaa, 0xaa, 0x20, 0x0f, 0x20, 0x19, 0x55, 0x55, 0x90, 0x16, - 0x20, 0x49, 0x0b, 0xff, 0xab, 0x02, 0xa0, 0x01, 0xa0, 0x01, 0xa8, 0x00, - 0x93, 0x06, 0x11, 0x38, 0x21, 0x05, 0x93, 0x06, 0x01, 0x20, 0x82, 0x10, - 0x99, 0xc8, 0x04, 0x00, 0x0c, 0x98, 0x00, 0x0e, 0x20, 0x0f, 0x20, 0x01, - 0x18, 0x9d, 0x92, 0x8a, 0x00, 0x0e, 0x16, 0x38, 0x92, 0x8a, 0x00, 0x06, - 0x20, 0x11, 0x00, 0x06, 0x12, 0x10, 0x20, 0x11, 0x00, 0x00, 0x22, 0x02, - 0x90, 0x06, 0x20, 0x08, 0x82, 0xff, 0x01, 0xb0, 0x82, 0x00, 0x60, 0x0a, - 0x60, 0x0f, 0xff, 0xff, 0x60, 0x03, 0x00, 0x02, 0x60, 0x07, 0x00, 0x00, - 0x00, 0x26, 0x20, 0x19, 0x00, 0x10, 0x92, 0x80, 0x00, 0x01, 0x20, 0xe8, - 0x21, 0xa0, 0x21, 0xa8, 0x41, 0x04, 0x83, 0x19, 0x1d, 0xe0, 0x82, 0x11, - 0x1d, 0xa0, 0x00, 0x2e, 0x00, 0x9e, 0x00, 0x3e, 0x01, 0x4e, 0x01, 0xde, - 0x00, 0x05, 0x20, 0x11, 0x00, 0x0e, 0x08, 0xe8, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x96, 0x33, 0x48, 0x08, 0x0c, 0x0f, 0x16, 0x21, 0x00, 0x93, 0x00, - 0x20, 0x98, 0x22, 0xe0, 0x00, 0x9e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x36, - 0x35, 0x18, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x40, 0x04, - 0x83, 0x19, 0x1d, 0xd8, 0x00, 0x3e, 0x00, 0x05, 0x20, 0xe9, 0x00, 0x01, - 0x71, 0xb8, 0x81, 0xff, 0x11, 0xc0, 0x90, 0x06, 0x20, 0x09, 0x02, 0x00, - 0x20, 0xa9, 0x00, 0x02, 0x92, 0x98, 0x00, 0x18, 0x23, 0xa0, 0x40, 0x01, - 0x20, 0x09, 0x07, 0x00, 0x20, 0xa9, 0x00, 0x02, 0x92, 0x98, 0x00, 0x08, - 0x23, 0xa0, 0x40, 0x01, 0x70, 0x7c, 0x80, 0x07, 0x71, 0x80, 0x81, 0x0f, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0x01, 0x92, 0x98, 0x00, 0x0c, 0x23, 0xa0, - 0x90, 0x0e, 0x08, 0x0c, 0x0d, 0xa5, 0x20, 0x01, 0x00, 0x00, 0x81, 0x0f, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0x01, 0x00, 0x05, 0x89, 0xff, 0x01, 0x40, - 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x40, - 0x00, 0x9e, 0x0c, 0xb0, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, - 0x08, 0x0c, 0x10, 0xb9, 0x09, 0x0c, 0x0d, 0xc5, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x86, 0x00, 0xe6, 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0xc9, 0x20, 0x71, 0x18, 0x00, 0x73, 0xc0, - 0x70, 0x2c, 0x90, 0x16, 0x90, 0x45, 0x01, 0x58, 0x82, 0x10, 0x99, 0x06, - 0x09, 0x0c, 0x0d, 0xc5, 0x23, 0x00, 0x92, 0x02, 0x01, 0x20, 0x1a, 0x0c, - 0x0d, 0xc5, 0xa0, 0x00, 0x0c, 0x98, 0x01, 0x2e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x0e, 0x00, 0xee, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x86, 0x00, 0xe6, - 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x19, 0x10, - 0x70, 0x10, 0x90, 0x05, 0x01, 0x40, 0x70, 0x18, 0x90, 0x45, 0x01, 0x28, - 0x99, 0x06, 0x09, 0x0c, 0x0d, 0xc5, 0xa0, 0x00, 0x0c, 0xc8, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0xee, 0x00, 0x8e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0xc0, 0x80, 0x01, - 0x02, 0x70, 0x70, 0xc2, 0x70, 0x2c, 0x20, 0x48, 0x90, 0x85, 0x00, 0x01, - 0xa8, 0x00, 0x70, 0x2e, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, - 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x4e, 0x0c, 0xd8, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x00, 0x70, 0xc0, - 0x90, 0xca, 0x00, 0x20, 0x02, 0x68, 0x80, 0x01, 0x70, 0xc2, 0x70, 0x2c, - 0x20, 0x48, 0xa8, 0x00, 0x70, 0x2e, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, - 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x4e, 0x0c, 0xd8, - 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x16, 0x89, 0x0e, - 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, 0xa8, 0x62, 0x91, 0x84, - 0xff, 0xc0, 0xa8, 0x5e, 0x00, 0x1e, 0x00, 0x20, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, - 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x87, 0x25, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, - 0x90, 0x26, 0x20, 0x09, 0x00, 0x00, 0x20, 0x49, 0x04, 0x00, 0x29, 0x00, - 0x70, 0x2e, 0x89, 0x40, 0x28, 0x00, 0xa8, 0x02, 0xa9, 0x5e, 0xa8, 0x63, - 0x00, 0x01, 0x84, 0x20, 0x98, 0x86, 0x04, 0x40, 0x01, 0x20, 0x28, 0x48, - 0x91, 0x88, 0x00, 0x40, 0x0c, 0x90, 0x20, 0x71, 0x18, 0x8d, 0x70, 0x00, - 0x90, 0x05, 0x11, 0xa0, 0x20, 0x01, 0x05, 0x34, 0xa8, 0x02, 0x20, 0x48, - 0x20, 0x09, 0x4d, 0x00, 0x89, 0x40, 0x28, 0x00, 0xa8, 0x02, 0xa9, 0x5e, - 0xa8, 0x63, 0x00, 0x01, 0x84, 0x20, 0x98, 0x86, 0x08, 0x00, 0x01, 0x20, - 0x28, 0x48, 0x91, 0x88, 0x00, 0x40, 0x0c, 0x90, 0x20, 0x71, 0x18, 0x8d, - 0x71, 0x04, 0x72, 0x00, 0x82, 0xff, 0x01, 0xd0, 0x73, 0x08, 0x83, 0x18, - 0x83, 0x1f, 0x83, 0x1b, 0x83, 0x1b, 0x73, 0x12, 0x83, 0x19, 0x20, 0x01, - 0x08, 0x00, 0xa8, 0x02, 0x20, 0x48, 0x89, 0x00, 0xa8, 0x02, 0x20, 0x40, - 0xa9, 0x5e, 0xaa, 0x62, 0x84, 0x20, 0x23, 0x00, 0x99, 0x06, 0x01, 0x30, - 0x28, 0x48, 0x91, 0x88, 0x00, 0x40, 0x92, 0x91, 0x00, 0x00, 0x0c, 0x88, - 0xa8, 0x03, 0x00, 0x00, 0x20, 0x71, 0x18, 0x00, 0x74, 0xbe, 0x74, 0xc2, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x16, 0x99, 0x84, 0xfc, 0x00, 0x01, 0xe8, - 0x90, 0x8c, 0xf8, 0x00, 0x11, 0x68, 0x99, 0x82, 0x04, 0x00, 0x02, 0xb8, - 0x99, 0x82, 0x04, 0x40, 0x02, 0x78, 0x99, 0x82, 0x05, 0x34, 0x02, 0x88, - 0x99, 0x82, 0x08, 0x00, 0x12, 0x70, 0x00, 0x40, 0x99, 0x82, 0x08, 0x00, - 0x02, 0x50, 0x20, 0x71, 0x18, 0x8d, 0x70, 0x10, 0x99, 0x02, 0x12, 0x28, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x06, - 0x0c, 0xd8, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x1b, 0x70, 0x07, 0x00, 0x00, - 0x90, 0x06, 0x70, 0x1e, 0x70, 0x22, 0x70, 0x02, 0x20, 0x71, 0x00, 0x00, - 0x70, 0x10, 0x90, 0x85, 0x80, 0x44, 0x70, 0x12, 0x20, 0x71, 0x00, 0x80, - 0x90, 0x06, 0x20, 0xa9, 0x00, 0x40, 0x70, 0x22, 0x1f, 0x04, 0x10, 0xf1, - 0x70, 0x2b, 0x00, 0x20, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0xe6, 0xa0, 0x6f, 0x00, 0x00, 0x20, 0x71, 0x1a, 0x1b, - 0x70, 0x1c, 0x90, 0x88, 0x1a, 0x25, 0x28, 0x0a, 0x80, 0x00, 0x90, 0x84, - 0x00, 0x3f, 0x70, 0x1e, 0x71, 0x20, 0x91, 0x06, 0x09, 0x0c, 0x0d, 0xc5, - 0x70, 0x04, 0x90, 0x05, 0x11, 0x28, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x80, - 0x00, 0xa9, 0x00, 0xfe, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x1b, 0x70, 0x04, - 0x90, 0x05, 0x11, 0x28, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x80, 0x00, 0x21, - 0x00, 0xfe, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x04, 0x90, 0x86, - 0x00, 0x00, 0x11, 0x10, 0x70, 0x07, 0x00, 0x06, 0x70, 0x00, 0x00, 0x02, - 0x11, 0x3a, 0x12, 0xbd, 0x11, 0x38, 0x11, 0x38, 0x12, 0xb1, 0x12, 0xb1, - 0x12, 0xb1, 0x12, 0xb1, 0x08, 0x0c, 0x0d, 0xc5, 0x70, 0x1c, 0x71, 0x20, - 0x91, 0x06, 0x11, 0x48, 0x79, 0x2c, 0x91, 0x84, 0x00, 0x01, 0x11, 0x20, - 0xd1, 0xfc, 0x11, 0x10, 0x70, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x96, - 0x91, 0x80, 0x1a, 0x25, 0x20, 0x04, 0x70, 0x0a, 0x20, 0x48, 0x81, 0x08, - 0x91, 0x8c, 0x00, 0x3f, 0x71, 0x22, 0x78, 0x2b, 0x00, 0x26, 0xa8, 0x8c, - 0x78, 0x02, 0xa8, 0x90, 0x78, 0x06, 0xa8, 0x94, 0x78, 0x0a, 0xa8, 0x98, - 0x78, 0x0e, 0xa8, 0x78, 0x70, 0x0e, 0xa8, 0x70, 0x70, 0x16, 0xa8, 0x74, - 0x70, 0x1a, 0xa8, 0x68, 0x00, 0x9e, 0xd0, 0x84, 0x01, 0x20, 0x70, 0x07, - 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x70, 0x07, 0x00, 0x02, 0x00, 0xb1, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, - 0x91, 0x82, 0x00, 0x40, 0x12, 0x10, 0x21, 0x10, 0x90, 0x06, 0x70, 0x0e, - 0x72, 0x12, 0x82, 0x03, 0x78, 0x12, 0x78, 0x2b, 0x00, 0x20, 0x78, 0x2b, - 0x00, 0x41, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x70, 0x14, 0x20, 0xe0, 0x70, 0x18, - 0x20, 0x98, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x00, 0x88, 0x78, 0x2b, - 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, 0x91, 0x82, 0x00, 0x40, - 0x12, 0x10, 0x21, 0x10, 0x90, 0x06, 0x70, 0x0e, 0x22, 0xa8, 0x40, 0x06, - 0x82, 0x03, 0x78, 0x12, 0x78, 0x2b, 0x00, 0x20, 0x33, 0x00, 0x70, 0x1a, - 0x78, 0x2b, 0x00, 0x01, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x20, 0x09, 0x1a, 0x1b, 0x21, 0x04, 0xc0, 0x95, - 0x20, 0x0a, 0x08, 0x0c, 0x11, 0x17, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, - 0x20, 0x71, 0x1a, 0x1b, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x80, 0x79, 0x2c, - 0xd1, 0xbc, 0x19, 0x0c, 0x0d, 0xbe, 0x78, 0x2b, 0x00, 0x02, 0xd1, 0xfc, - 0x01, 0x20, 0x91, 0x8c, 0x07, 0x00, 0x70, 0x04, 0x00, 0x23, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0x1e, 0x00, 0x05, 0x11, 0x28, 0x11, 0xd0, 0x12, 0x04, - 0x12, 0xdc, 0x0d, 0xc5, 0x12, 0xf7, 0x0d, 0xc5, 0x91, 0x8c, 0x07, 0x00, - 0x15, 0x50, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x70, 0x14, 0x20, 0xe8, - 0x70, 0x18, 0x20, 0xa0, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x00, 0x88, - 0x78, 0x2b, 0x00, 0x40, 0x70, 0x10, 0x20, 0xa8, 0x40, 0x05, 0x34, 0x00, - 0x70, 0x1a, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x70, 0x0c, 0x90, 0x05, - 0x05, 0x78, 0x78, 0x00, 0x78, 0x02, 0x78, 0x04, 0x78, 0x06, 0x08, 0x0c, - 0x11, 0x6d, 0x00, 0x05, 0x70, 0x08, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x6f, - 0x01, 0x00, 0x00, 0x9e, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x11, 0x28, - 0x00, 0x05, 0x70, 0x08, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x6f, 0x02, 0x00, - 0x00, 0x9e, 0x0c, 0xa0, 0x91, 0x8c, 0x07, 0x00, 0x11, 0x50, 0x70, 0x0c, - 0x90, 0x05, 0x01, 0x80, 0x78, 0x00, 0x78, 0x02, 0x78, 0x04, 0x78, 0x06, - 0x08, 0x0c, 0x11, 0x82, 0x00, 0x05, 0x70, 0x08, 0x00, 0x96, 0x20, 0x48, - 0xa8, 0x6f, 0x02, 0x00, 0x00, 0x9e, 0x70, 0x07, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x96, 0x70, 0x08, 0x20, 0x48, 0x78, 0x00, 0xa8, 0x8e, 0x78, 0x04, - 0xa8, 0x92, 0x78, 0x08, 0xa8, 0x96, 0x78, 0x0c, 0xa8, 0x9a, 0xa8, 0x6f, - 0x01, 0x00, 0x00, 0x9e, 0x70, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0xd6, - 0x70, 0x08, 0x20, 0x48, 0x20, 0x01, 0x18, 0xb9, 0x20, 0x04, 0x99, 0x06, - 0x11, 0x28, 0xa8, 0x9c, 0x08, 0x0f, 0x00, 0xde, 0x00, 0x9e, 0x00, 0xa0, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x96, 0x00, 0xd6, 0x70, 0x08, 0x20, 0x48, - 0x00, 0x81, 0x01, 0x50, 0xa8, 0x9c, 0x00, 0x86, 0x29, 0x40, 0x08, 0x0f, - 0x00, 0x8e, 0x00, 0xde, 0x00, 0x9e, 0x08, 0x0c, 0x11, 0x17, 0x00, 0x05, - 0x00, 0xde, 0x00, 0x9e, 0x08, 0x0c, 0x11, 0x17, 0x00, 0x05, 0xa8, 0xa8, - 0xd0, 0x8c, 0x00, 0x05, 0x00, 0x96, 0xa0, 0xa0, 0x90, 0x4d, 0x09, 0x0c, - 0x0d, 0xc5, 0xa0, 0x6c, 0x90, 0x8e, 0x01, 0x00, 0x01, 0x30, 0xa8, 0x7b, - 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x02, 0x08, 0x0c, - 0x6e, 0x92, 0xa0, 0x9f, 0x00, 0x00, 0xa0, 0xa3, 0x00, 0x00, 0x28, 0x48, - 0x08, 0x0c, 0x10, 0x40, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xa6, 0xa0, 0xa0, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa0, 0x6c, 0x90, 0x8e, 0x01, 0x00, - 0x01, 0x28, 0xa8, 0x7b, 0x00, 0x01, 0xa8, 0x83, 0x00, 0x00, 0x00, 0xc0, - 0xa8, 0x0c, 0x20, 0x50, 0xb0, 0x04, 0x90, 0x05, 0x01, 0x98, 0xa8, 0x0e, - 0x20, 0x50, 0x80, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0x8c, 0x00, 0x3f, - 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, 0xa0, 0x76, 0xa1, 0x72, - 0xb0, 0x00, 0xa0, 0x7a, 0x28, 0x10, 0x08, 0x0c, 0x10, 0xf8, 0x00, 0xe8, - 0xa9, 0x7c, 0xa8, 0x94, 0x00, 0x16, 0x00, 0x06, 0x08, 0x0c, 0x6e, 0x92, - 0x00, 0x0e, 0x00, 0x1e, 0xd1, 0xfc, 0x11, 0x38, 0xd1, 0xf4, 0x01, 0x28, - 0x00, 0xc6, 0x20, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, 0x70, 0x08, - 0x20, 0x48, 0xa8, 0x9f, 0x00, 0x00, 0xa8, 0xa3, 0x00, 0x00, 0x08, 0x0c, - 0x10, 0x40, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x11, 0x17, 0x00, 0xae, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0x2b, 0x10, 0x01, - 0x70, 0x07, 0x00, 0x05, 0x70, 0x00, 0xc0, 0x94, 0x70, 0x02, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0x96, 0x20, 0x01, 0x19, 0x2f, 0x20, 0x4c, 0xa8, 0x7c, - 0x78, 0x12, 0xa8, 0x8c, 0x78, 0x02, 0xa8, 0x90, 0x78, 0x06, 0xa8, 0x94, - 0x78, 0x0a, 0xa8, 0x98, 0x78, 0x0e, 0x78, 0x2b, 0x00, 0x20, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x78, 0x2b, 0x00, 0x41, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x00, 0xc0, 0x84, 0x70, 0x02, 0x29, 0x00, 0x70, 0x0a, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x00, 0x88, - 0x78, 0x2b, 0x00, 0x40, 0x00, 0x96, 0x20, 0x01, 0x19, 0x2f, 0x20, 0x4c, - 0xaa, 0x7c, 0x00, 0x9e, 0x08, 0x0c, 0x8d, 0x91, 0x20, 0x09, 0x18, 0x8c, - 0x21, 0x04, 0x90, 0x84, 0xff, 0xfc, 0x20, 0x0a, 0x08, 0x0c, 0x8b, 0xf3, - 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x11, 0x28, 0x00, 0x05, 0x70, 0x07, - 0x00, 0x00, 0x08, 0x0c, 0x11, 0x28, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x22, 0x00, 0x20, 0x79, 0x03, 0x00, 0x20, 0x71, 0x1a, 0x65, 0x70, 0x03, - 0x00, 0x00, 0x78, 0xbf, 0x00, 0xf6, 0x78, 0x1b, 0x48, 0x00, 0x00, 0xc1, - 0x78, 0x03, 0x00, 0x03, 0x78, 0x0f, 0x00, 0x00, 0x20, 0xa9, 0x03, 0xea, - 0x20, 0x61, 0xf0, 0xae, 0x2c, 0x0d, 0x79, 0x12, 0xe1, 0x04, 0x9c, 0xe0, - 0x00, 0x02, 0x79, 0x16, 0x1f, 0x04, 0x13, 0x12, 0x78, 0x07, 0x00, 0x07, - 0x78, 0x03, 0x00, 0x00, 0x78, 0x03, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0xc6, 0x78, 0x03, 0x00, 0x00, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x20, - 0x78, 0x20, 0x08, 0x0c, 0x13, 0x76, 0x0c, 0xc8, 0x20, 0x01, 0x1a, 0x66, - 0x20, 0x03, 0x00, 0x00, 0x78, 0xab, 0x00, 0x04, 0x78, 0xac, 0xd0, 0xac, - 0x1d, 0xe8, 0x78, 0xab, 0x00, 0x02, 0x78, 0x07, 0x00, 0x07, 0x78, 0x27, - 0x00, 0x30, 0x78, 0x2b, 0x04, 0x00, 0x78, 0x27, 0x00, 0x31, 0x78, 0x2b, - 0x1a, 0x89, 0x78, 0x1f, 0xff, 0x00, 0x78, 0x1b, 0xb7, 0x00, 0x20, 0x01, - 0x02, 0x00, 0x20, 0x04, 0xd0, 0xdc, 0x01, 0x10, 0x78, 0x1f, 0x03, 0x03, - 0x20, 0x61, 0x1a, 0x89, 0x60, 0x2f, 0x1c, 0xd0, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x90, 0x82, 0x1c, 0xd0, 0x60, 0x32, 0x60, 0x3b, 0x20, 0xc7, - 0x20, 0x01, 0x33, 0xb6, 0xd0, 0xfc, 0x19, 0x0c, 0x0d, 0xc5, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xc4, 0x11, 0x28, 0x20, 0x01, 0x00, 0x03, - 0x20, 0x04, 0xd0, 0xd4, 0x11, 0x18, 0x78, 0x3f, 0x33, 0xb6, 0x00, 0x20, - 0x90, 0x84, 0xc0, 0x00, 0x78, 0x3f, 0xb3, 0xb6, 0x60, 0x4f, 0x19, 0x3d, - 0x20, 0x01, 0x19, 0x28, 0x20, 0x04, 0x60, 0x42, 0x00, 0xce, 0x00, 0x05, - 0x90, 0x86, 0x00, 0x0d, 0x11, 0xd0, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0xb8, - 0x78, 0x20, 0x00, 0x26, 0x20, 0x10, 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0x80, - 0x22, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x58, 0x00, 0x16, - 0x61, 0x20, 0x91, 0x86, 0x00, 0x09, 0x01, 0x08, 0x00, 0x20, 0x20, 0x09, - 0x00, 0x4c, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x79, 0x08, 0x91, 0x84, 0x00, 0x70, - 0x19, 0x0c, 0x0d, 0xbe, 0xd1, 0x9c, 0x01, 0x58, 0x78, 0x20, 0x90, 0x8c, - 0xf0, 0x00, 0x15, 0xe8, 0x90, 0x8a, 0x00, 0x24, 0x1a, 0x0c, 0x0d, 0xc5, - 0x00, 0x23, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x2e, 0x00, 0x05, 0x13, 0xcf, - 0x13, 0xcf, 0x13, 0xe6, 0x13, 0xeb, 0x13, 0xef, 0x13, 0xf4, 0x14, 0x1c, - 0x14, 0x20, 0x14, 0x2e, 0x14, 0x32, 0x13, 0xcf, 0x14, 0xff, 0x15, 0x03, - 0x15, 0x75, 0x15, 0x7c, 0x13, 0xcf, 0x15, 0x7d, 0x15, 0x7e, 0x15, 0x89, - 0x15, 0x90, 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xcf, - 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xf6, 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xcf, - 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xcf, 0x13, 0xd3, 0x13, 0xd1, 0x08, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0x0d, 0xbe, 0x08, 0x0c, 0x15, 0x9b, 0x20, 0x09, - 0x1a, 0x7e, 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, 0x08, 0x0c, 0x81, 0x3a, - 0x08, 0x0c, 0x1a, 0xd9, 0x00, 0x05, 0x20, 0x09, 0x00, 0x48, 0x20, 0x60, - 0x08, 0x0c, 0xb3, 0x52, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x85, - 0xc0, 0xb5, 0x70, 0x06, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x85, 0x70, 0x06, - 0x00, 0x05, 0x08, 0x0c, 0x15, 0x9b, 0x08, 0x0c, 0x16, 0xfb, 0x00, 0x05, - 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x15, 0x9b, 0x20, 0x60, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x3b, 0xff, 0xff, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x0c, 0xb3, 0x52, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x09, 0x03, 0xe8, 0x81, 0x09, 0x01, 0x60, 0x20, 0x01, - 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x0d, 0xc8, 0x20, 0x01, 0x02, 0x18, - 0x20, 0x04, 0xd0, 0xec, 0x11, 0x10, 0x08, 0x0c, 0x15, 0xa0, 0x20, 0x01, - 0x03, 0x07, 0x20, 0x03, 0x80, 0x00, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x95, - 0x70, 0x06, 0x00, 0x05, 0x08, 0x0c, 0x15, 0x9b, 0x20, 0x60, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x3b, 0xff, 0xff, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x05, 0x08, 0x0c, 0x15, 0x9b, - 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x15, 0x9b, 0x08, 0x0c, 0x14, 0xea, - 0x78, 0x27, 0x00, 0x18, 0x79, 0xac, 0xd1, 0xdc, 0x09, 0x04, 0x14, 0x9b, - 0x78, 0x27, 0x00, 0x15, 0x78, 0x28, 0x78, 0x2b, 0x00, 0x00, 0x90, 0x65, - 0x01, 0x40, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, - 0x00, 0x20, 0x08, 0x04, 0x14, 0xa1, 0x70, 0x04, 0x90, 0x05, 0x01, 0xc8, - 0x11, 0x88, 0x78, 0xab, 0x00, 0x04, 0x78, 0x27, 0x00, 0x18, 0x78, 0x2b, - 0x00, 0x00, 0xd1, 0xbc, 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x01, 0x02, 0x0d, - 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x08, 0x04, 0x14, 0xcf, - 0x78, 0xab, 0x00, 0x04, 0x78, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x15, 0x03, - 0x00, 0x05, 0x78, 0x27, 0x00, 0x18, 0xa0, 0x01, 0x78, 0x28, 0x78, 0x27, - 0x00, 0x11, 0xa0, 0x01, 0x79, 0x28, 0x91, 0x06, 0x01, 0x10, 0x79, 0xac, - 0x08, 0xe0, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x00, 0x70, 0x2c, 0xd0, 0xc4, - 0x01, 0x40, 0x00, 0xee, 0x08, 0x0c, 0x1a, 0xd9, 0x08, 0x0c, 0x13, 0x22, - 0x78, 0x03, 0x00, 0x01, 0x00, 0x05, 0x70, 0x37, 0x00, 0x01, 0xa0, 0x01, - 0x71, 0x50, 0x00, 0xee, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x05, 0x00, - 0x01, 0x10, 0x79, 0xac, 0x08, 0x10, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, - 0x78, 0xab, 0x00, 0x04, 0x78, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x15, 0x03, - 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x00, 0x05, 0x78, 0x28, - 0x78, 0x2b, 0x00, 0x00, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0xc5, 0x60, 0x14, - 0x20, 0x48, 0x78, 0xab, 0x00, 0x04, 0x91, 0x8c, 0x07, 0x00, 0x01, 0xa8, - 0x08, 0x0c, 0x81, 0x3a, 0x08, 0x0c, 0x1a, 0xd9, 0x08, 0x0c, 0xd0, 0xd8, - 0x01, 0x58, 0xa9, 0xac, 0xa9, 0x36, 0xa9, 0xb0, 0xa9, 0x3a, 0xa8, 0x3f, - 0xff, 0xff, 0xa8, 0x43, 0xff, 0xff, 0xa8, 0x80, 0xc0, 0xbd, 0xa8, 0x82, - 0x08, 0x0c, 0xcc, 0xf3, 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, - 0x11, 0x28, 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x48, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x60, 0x24, 0x19, 0x0c, 0xd4, 0xc4, 0x20, 0x29, 0x00, 0xc8, 0x85, 0x29, - 0x01, 0x28, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x0d, 0xc8, - 0x7d, 0xbc, 0x08, 0x0c, 0xf0, 0x57, 0xd5, 0xa4, 0x11, 0x18, 0x08, 0x0c, - 0x15, 0xa0, 0x00, 0x05, 0x08, 0x0c, 0x81, 0x3a, 0x08, 0x0c, 0x1a, 0xd9, - 0x00, 0x05, 0x78, 0x1f, 0x03, 0x00, 0x78, 0x03, 0x00, 0x01, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x66, 0x00, 0x76, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x79, 0x08, 0x91, 0x8c, 0x00, 0x07, 0x91, 0x86, 0x00, 0x03, 0x01, 0x20, - 0x20, 0x01, 0x00, 0x16, 0x08, 0x0c, 0x16, 0x11, 0x00, 0xfe, 0x00, 0x7e, - 0x00, 0x6e, 0x00, 0x1e, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, - 0x00, 0x05, 0x71, 0x04, 0x91, 0x84, 0x00, 0x04, 0x19, 0x0c, 0x0d, 0xc5, - 0xd1, 0x84, 0x11, 0xb1, 0xd1, 0x9c, 0x01, 0x80, 0xc1, 0x9c, 0x71, 0x06, - 0x00, 0x16, 0x08, 0x0c, 0x16, 0xde, 0x00, 0x1e, 0x01, 0x48, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x08, 0x0c, - 0x15, 0xa0, 0x00, 0x05, 0x81, 0xff, 0x19, 0x0c, 0x0d, 0xc5, 0x00, 0x05, - 0x21, 0x00, 0xc1, 0x84, 0xc1, 0xb4, 0x71, 0x06, 0xd0, 0xb4, 0x00, 0x16, - 0x00, 0xe6, 0x19, 0x04, 0x15, 0x6a, 0x20, 0x71, 0x02, 0x00, 0x08, 0x0c, - 0x16, 0xcb, 0x05, 0xe0, 0x08, 0x0c, 0x16, 0xde, 0x05, 0xb0, 0x60, 0x14, - 0x90, 0x05, 0x05, 0xb0, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x64, 0x00, 0x9e, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x29, 0x01, 0x60, 0x90, 0x8e, - 0x00, 0x48, 0x15, 0x50, 0x60, 0x1c, 0xd0, 0x84, 0x11, 0xe0, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x17, 0x68, 0x00, 0xfe, 0x00, 0xb0, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x18, 0xfd, 0x00, 0xfe, 0x20, 0x09, 0x01, 0xf4, - 0x81, 0x09, 0x01, 0x68, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, - 0x0d, 0xc8, 0x20, 0x01, 0x02, 0x18, 0x20, 0x04, 0xd0, 0xec, 0x11, 0x18, - 0x08, 0x0c, 0x15, 0xa0, 0x00, 0x40, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, - 0x00, 0x20, 0x08, 0x0c, 0x13, 0x22, 0x78, 0x03, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0x16, 0xde, 0x0d, 0xd0, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x04, 0x61, - 0x0c, 0x90, 0x04, 0x29, 0x20, 0x60, 0x20, 0x09, 0x00, 0x53, 0x08, 0x0c, - 0xb3, 0x52, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe1, 0x20, 0x08, - 0x00, 0xd1, 0x00, 0x06, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, 0x00, 0x0e, - 0x08, 0x0c, 0x90, 0xde, 0x00, 0x05, 0x00, 0x89, 0x90, 0x05, 0x01, 0x18, - 0x08, 0x0c, 0x8c, 0xe2, 0x0c, 0xd0, 0x00, 0x05, 0x20, 0x01, 0x00, 0x36, - 0x20, 0x09, 0x18, 0x20, 0x21, 0x0c, 0x20, 0x11, 0x18, 0x1f, 0x22, 0x14, - 0x08, 0x0c, 0x16, 0x11, 0x00, 0x05, 0x78, 0x08, 0xd0, 0x9c, 0x0d, 0xe8, - 0x78, 0x20, 0x00, 0x05, 0x08, 0x0c, 0x14, 0xea, 0x00, 0xd6, 0x20, 0x69, - 0x02, 0x00, 0x20, 0x09, 0x01, 0xf4, 0x81, 0x09, 0x05, 0x10, 0x68, 0x04, - 0x90, 0x05, 0x0d, 0xd8, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, - 0x79, 0xbc, 0xd1, 0xa4, 0x15, 0x28, 0x79, 0xb8, 0x91, 0x8c, 0x0f, 0xff, - 0x01, 0x80, 0x91, 0x82, 0x08, 0x41, 0x12, 0x68, 0x91, 0x88, 0x00, 0x07, - 0x91, 0x8c, 0x0f, 0xf8, 0x81, 0x0c, 0x81, 0x0c, 0x81, 0x0c, 0x08, 0x0c, - 0x16, 0x03, 0x68, 0x27, 0x00, 0x01, 0x81, 0x09, 0x1d, 0xd0, 0x04, 0xd9, - 0x68, 0x27, 0x00, 0x02, 0x04, 0xc1, 0x68, 0x04, 0x90, 0x05, 0x11, 0x30, - 0x68, 0x2c, 0xd0, 0xe4, 0x15, 0x00, 0x68, 0x04, 0x90, 0x05, 0x0d, 0xe8, - 0x79, 0xb8, 0xd1, 0xec, 0x11, 0x30, 0x08, 0xc0, 0x08, 0x0c, 0x81, 0x3a, - 0x08, 0x0c, 0x1a, 0xd9, 0x00, 0x90, 0x78, 0x27, 0x00, 0x15, 0x78, 0x2b, - 0x00, 0x00, 0x78, 0x27, 0x00, 0x18, 0x78, 0x2b, 0x00, 0x00, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x20, 0x01, 0x03, 0x07, 0x20, 0x03, - 0x03, 0x00, 0x78, 0x03, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, 0x68, 0x2c, - 0x90, 0x84, 0x54, 0x00, 0x90, 0x86, 0x54, 0x00, 0x0d, 0x30, 0x78, 0x27, - 0x00, 0x15, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x03, 0x00, 0x01, 0x68, 0x00, - 0x90, 0x85, 0x18, 0x00, 0x68, 0x02, 0x00, 0xde, 0x00, 0x05, 0x68, 0x24, - 0x90, 0x84, 0x00, 0x03, 0x1d, 0xe0, 0x00, 0x05, 0x20, 0x01, 0x00, 0x30, - 0x2c, 0x08, 0x62, 0x1c, 0x00, 0x21, 0x78, 0x30, 0x90, 0x86, 0x00, 0x41, - 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x00, 0x06, 0x78, 0x08, - 0xd0, 0x9c, 0x01, 0x40, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, 0x08, 0x0c, - 0x13, 0x94, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x06, - 0x78, 0x32, 0x79, 0x36, 0x7a, 0x3a, 0x78, 0x1b, 0x80, 0x80, 0x00, 0x59, - 0x11, 0x18, 0x00, 0x0e, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x0e, 0x79, 0x2c, - 0x39, 0x00, 0x80, 0x00, 0x20, 0x04, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x09, - 0x18, 0x0c, 0x21, 0x04, 0xc0, 0xf4, 0x20, 0x0a, 0x20, 0x09, 0xff, 0x00, - 0x81, 0x09, 0x09, 0x04, 0x16, 0x8f, 0x7a, 0x18, 0x92, 0x84, 0x00, 0x30, - 0x09, 0x04, 0x16, 0x8a, 0x92, 0x84, 0x00, 0x48, 0x90, 0x86, 0x00, 0x08, - 0x19, 0x04, 0x16, 0x8a, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x8c, - 0x01, 0xf0, 0x00, 0x06, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x00, 0xf6, 0x00, 0x26, - 0x00, 0x16, 0x20, 0x09, 0x1a, 0x81, 0x21, 0x04, 0x80, 0x00, 0x02, 0x08, - 0x20, 0x0a, 0x08, 0x0c, 0x94, 0xb1, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xfe, - 0x01, 0x2e, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, - 0x00, 0x0e, 0x20, 0x01, 0x00, 0x9b, 0x20, 0x04, 0xd0, 0xfc, 0x01, 0xd0, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x00, 0xf6, 0x00, 0x16, 0x20, 0x09, 0x1a, 0x82, 0x21, 0x04, - 0x80, 0x00, 0x02, 0x08, 0x20, 0x0a, 0x08, 0x0c, 0x1e, 0xeb, 0x00, 0x1e, - 0x00, 0xfe, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, - 0x01, 0x2e, 0x00, 0x0e, 0x78, 0x18, 0xd0, 0xbc, 0x19, 0x04, 0x16, 0x3a, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0xd0, 0xf4, 0x15, 0x28, - 0x7a, 0x18, 0x92, 0x84, 0x00, 0x30, 0x05, 0x08, 0x92, 0x84, 0x00, 0x48, - 0x90, 0x86, 0x00, 0x08, 0x11, 0xe0, 0x20, 0x01, 0x19, 0xf7, 0x20, 0x04, - 0x90, 0x05, 0x01, 0xb8, 0x20, 0x01, 0x1a, 0x69, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x00, 0x01, 0x88, 0x20, 0x09, 0x1a, 0x80, 0x21, 0x04, 0x80, 0x00, - 0x02, 0x08, 0x20, 0x0a, 0x08, 0x0c, 0xa7, 0x67, 0x20, 0x09, 0x18, 0x0c, - 0x21, 0x04, 0xc0, 0xf5, 0x20, 0x0a, 0x20, 0x09, 0xff, 0x00, 0x08, 0x04, - 0x16, 0x3a, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x78, 0x32, 0x79, 0x36, - 0x7a, 0x3a, 0x78, 0x1b, 0x80, 0x80, 0x08, 0x0c, 0x16, 0x33, 0x11, 0x08, - 0x00, 0x05, 0x79, 0x2c, 0x39, 0x00, 0x80, 0x00, 0x20, 0x04, 0x08, 0x0c, - 0x0d, 0xc5, 0x70, 0x37, 0x00, 0x01, 0x71, 0x50, 0x70, 0x37, 0x00, 0x02, - 0x70, 0x50, 0x20, 0x60, 0xd1, 0xbc, 0x11, 0x10, 0x70, 0x54, 0x20, 0x60, - 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x05, 0x00, 0x01, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x00, 0x06, 0x00, 0x46, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x00, 0x70, 0x37, 0x00, 0x02, 0x70, 0x58, 0x90, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x90, 0x86, 0x00, 0xbc, 0x11, 0x58, 0x20, 0x21, 0x1a, 0x7f, - 0x24, 0x04, 0x80, 0x00, 0x02, 0x08, 0x20, 0x22, 0x08, 0x0c, 0x81, 0x3a, - 0x08, 0x0c, 0x1a, 0xd9, 0x90, 0x06, 0x00, 0xee, 0x00, 0x4e, 0x00, 0x0e, - 0x00, 0x05, 0x0c, 0x11, 0x11, 0x08, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x16, - 0x20, 0x71, 0x02, 0x00, 0x08, 0x41, 0x61, 0x24, 0xd1, 0xdc, 0x01, 0xf8, - 0x70, 0x1c, 0xd0, 0x8c, 0x09, 0x04, 0x17, 0x5d, 0x70, 0x17, 0x00, 0x00, - 0x20, 0x01, 0x02, 0x64, 0x20, 0x04, 0xd0, 0xbc, 0x09, 0x04, 0x17, 0x5d, - 0x20, 0x01, 0x02, 0x68, 0x00, 0xc6, 0x20, 0x64, 0x61, 0x04, 0x60, 0x38, - 0x00, 0xce, 0x91, 0x8e, 0x00, 0x39, 0x19, 0x04, 0x17, 0x5d, 0x9c, 0x06, - 0x15, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x26, 0x00, 0x08, 0x0c, 0x80, 0x81, - 0x01, 0x2e, 0x73, 0x58, 0x74, 0x5c, 0x60, 0x14, 0x90, 0x5d, 0x05, 0x98, - 0x2b, 0x48, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x19, 0x0c, 0xd4, 0x9f, 0xab, 0x42, 0xac, 0x3e, 0x20, 0x01, - 0x18, 0x69, 0x20, 0x04, 0xd0, 0xb4, 0x11, 0x70, 0x60, 0x1c, 0xd0, 0xe4, - 0x11, 0x58, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x11, 0x20, 0xa8, 0x3b, 0x7f, 0xff, 0xa8, 0x37, 0xff, 0xff, - 0x08, 0x0c, 0x20, 0xe7, 0x11, 0x90, 0x08, 0x0c, 0x19, 0x5a, 0x2a, 0x00, - 0xa8, 0x16, 0x01, 0x30, 0x28, 0x00, 0xa8, 0x0e, 0x2c, 0x05, 0xa8, 0x0a, - 0x2c, 0x00, 0xa8, 0x12, 0x70, 0x37, 0x00, 0x20, 0x78, 0x1f, 0x03, 0x00, - 0x00, 0x1e, 0x00, 0xee, 0x00, 0x05, 0x70, 0x37, 0x00, 0x50, 0x70, 0x37, - 0x00, 0x20, 0x00, 0x1e, 0x00, 0xee, 0x08, 0x0c, 0x15, 0xa0, 0x00, 0x05, - 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x19, 0x0c, 0x6b, 0x5e, 0x2f, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, - 0x00, 0x16, 0x00, 0xc6, 0x3e, 0x60, 0x60, 0x14, 0x20, 0x48, 0x29, 0x40, - 0x90, 0x3e, 0x27, 0x30, 0xa8, 0x64, 0x20, 0x68, 0xa8, 0x1a, 0x9d, 0x84, - 0x00, 0x0f, 0x90, 0x88, 0x20, 0xc7, 0x21, 0x65, 0x00, 0x02, 0x17, 0x9a, - 0x18, 0x08, 0x17, 0x9a, 0x17, 0x9a, 0x17, 0x9e, 0x17, 0xe9, 0x17, 0x9a, - 0x17, 0xbe, 0x17, 0x93, 0x17, 0xff, 0x17, 0x9a, 0x17, 0x9a, 0x17, 0xa3, - 0x18, 0xf5, 0x17, 0xd2, 0x17, 0xc8, 0xa9, 0x64, 0x91, 0x8c, 0x00, 0xff, - 0x91, 0x8e, 0x00, 0x48, 0x09, 0x04, 0x17, 0xff, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x04, 0x18, 0xeb, 0xa8, 0x7c, 0xd0, 0xac, 0x0d, 0xc8, 0x08, 0x04, - 0x18, 0x0f, 0xa8, 0x7c, 0xd0, 0xac, 0x0d, 0xa0, 0x08, 0x04, 0x18, 0x7a, - 0xa8, 0x98, 0x90, 0x1d, 0x11, 0x08, 0xab, 0x9c, 0x90, 0x16, 0xaa, 0xb2, - 0xaa, 0x3e, 0xaa, 0x42, 0x3e, 0x00, 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, - 0x90, 0x80, 0x93, 0x3d, 0x20, 0x05, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, - 0x20, 0x04, 0xa8, 0xae, 0x08, 0x04, 0x18, 0xd3, 0xa8, 0x7c, 0xd0, 0xbc, - 0x09, 0xc8, 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x8c, 0xa8, 0x3e, 0xa8, 0x88, - 0x08, 0x04, 0x18, 0x0f, 0xa8, 0x7c, 0xd0, 0xbc, 0x09, 0x78, 0xa8, 0x90, - 0xa8, 0x42, 0xa8, 0x8c, 0xa8, 0x3e, 0xa8, 0x88, 0x08, 0x04, 0x18, 0x7a, - 0xa8, 0x7c, 0xd0, 0xbc, 0x09, 0x28, 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x8c, - 0xa8, 0x3e, 0xa8, 0x04, 0x90, 0x45, 0x09, 0x0c, 0x0d, 0xc5, 0xa1, 0x64, - 0xa9, 0x1a, 0x91, 0xec, 0x00, 0x0f, 0x9d, 0x80, 0x20, 0xc7, 0x20, 0x65, - 0xa8, 0x88, 0xd1, 0x9c, 0x19, 0x04, 0x18, 0x7a, 0x04, 0x30, 0xa8, 0x7c, - 0xd0, 0xac, 0x09, 0x04, 0x17, 0x9a, 0xa8, 0x04, 0x90, 0x45, 0x09, 0x0c, - 0x0d, 0xc5, 0xa1, 0x64, 0xa9, 0x1a, 0x91, 0xec, 0x00, 0x0f, 0x9d, 0x80, - 0x20, 0xc7, 0x20, 0x65, 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0xd1, 0x9c, - 0x19, 0x04, 0x18, 0x7a, 0x00, 0x80, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, - 0x17, 0x9a, 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0x08, 0x04, 0x18, 0x7a, - 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, 0x17, 0x9a, 0x90, 0x06, 0xa8, 0x42, - 0xa8, 0x3e, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x18, 0x32, 0x18, 0x32, 0x18, 0x34, - 0x18, 0x32, 0x18, 0x32, 0x18, 0x32, 0x18, 0x3e, 0x18, 0x32, 0x18, 0x32, - 0x18, 0x32, 0x18, 0x48, 0x18, 0x32, 0x18, 0x32, 0x18, 0x32, 0x18, 0x52, - 0x18, 0x32, 0x18, 0x32, 0x18, 0x32, 0x18, 0x5c, 0x18, 0x32, 0x18, 0x32, - 0x18, 0x32, 0x18, 0x66, 0x18, 0x32, 0x18, 0x32, 0x18, 0x32, 0x18, 0x70, - 0x08, 0x0c, 0x0d, 0xc5, 0xa5, 0x74, 0xa4, 0x78, 0x9d, 0x86, 0x00, 0x24, - 0x09, 0x04, 0x17, 0xa8, 0xa3, 0x7c, 0xa2, 0x80, 0x08, 0x04, 0x18, 0xd3, - 0xa5, 0x84, 0xa4, 0x88, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xa8, - 0xa3, 0x8c, 0xa2, 0x90, 0x08, 0x04, 0x18, 0xd3, 0xa5, 0x94, 0xa4, 0x98, - 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xa8, 0xa3, 0x9c, 0xa2, 0xa0, - 0x08, 0x04, 0x18, 0xd3, 0xa5, 0xa4, 0xa4, 0xa8, 0x9d, 0x86, 0x00, 0x24, - 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xac, 0xa2, 0xb0, 0x08, 0x04, 0x18, 0xd3, - 0xa5, 0xb4, 0xa4, 0xb8, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xa8, - 0xa3, 0xbc, 0xa2, 0xc0, 0x08, 0x04, 0x18, 0xd3, 0xa5, 0xc4, 0xa4, 0xc8, - 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xcc, 0xa2, 0xd0, - 0x08, 0x04, 0x18, 0xd3, 0xa5, 0xd4, 0xa4, 0xd8, 0x9d, 0x86, 0x00, 0x24, - 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xdc, 0xa2, 0xe0, 0x08, 0x04, 0x18, 0xd3, - 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x18, 0x9d, 0x18, 0x9b, 0x18, 0x9b, 0x18, 0x9b, - 0x18, 0x9b, 0x18, 0x9b, 0x18, 0xa8, 0x18, 0x9b, 0x18, 0x9b, 0x18, 0x9b, - 0x18, 0x9b, 0x18, 0x9b, 0x18, 0xb3, 0x18, 0x9b, 0x18, 0x9b, 0x18, 0x9b, - 0x18, 0x9b, 0x18, 0x9b, 0x18, 0xbe, 0x18, 0x9b, 0x18, 0x9b, 0x18, 0x9b, - 0x18, 0x9b, 0x18, 0x9b, 0x18, 0xc9, 0x08, 0x0c, 0x0d, 0xc5, 0xa5, 0x6c, - 0xa4, 0x70, 0xa7, 0x74, 0xa6, 0x78, 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, - 0x17, 0xa8, 0xa3, 0x7c, 0xa2, 0x80, 0x04, 0x58, 0xa5, 0x84, 0xa4, 0x88, - 0xa7, 0x8c, 0xa6, 0x90, 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, 0x17, 0xa8, - 0xa3, 0x94, 0xa2, 0x98, 0x04, 0x00, 0xa5, 0x9c, 0xa4, 0xa0, 0xa7, 0xa4, - 0xa6, 0xa8, 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xac, - 0xa2, 0xb0, 0x00, 0xa8, 0xa5, 0xb4, 0xa4, 0xb8, 0xa7, 0xbc, 0xa6, 0xc0, - 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xc4, 0xa2, 0xc8, - 0x00, 0x50, 0xa5, 0xcc, 0xa4, 0xd0, 0xa7, 0xd4, 0xa6, 0xd8, 0x9d, 0x86, - 0x00, 0x2c, 0x09, 0x04, 0x17, 0xa8, 0xa3, 0xdc, 0xa2, 0xe0, 0xab, 0x2e, - 0xaa, 0x32, 0xad, 0x1e, 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, 0xa9, 0x88, - 0x8c, 0x60, 0x2c, 0x1d, 0xa8, 0xac, 0xaa, 0xb0, 0xa8, 0x36, 0xaa, 0x3a, - 0x81, 0x09, 0xa9, 0x16, 0x11, 0x60, 0x3e, 0x60, 0x60, 0x1c, 0xc0, 0x85, - 0x60, 0x1e, 0xa8, 0x7c, 0xc0, 0xdd, 0xa8, 0x7e, 0x90, 0x06, 0x00, 0xce, - 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, 0x28, 0x00, 0xa8, 0x0e, 0xab, 0x0a, - 0x2c, 0x00, 0xa8, 0x12, 0x0c, 0x70, 0x08, 0x04, 0x17, 0x9a, 0x20, 0x01, - 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x19, 0x0c, 0x6b, 0x5e, 0x2f, 0xf0, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x00, 0x16, 0x00, 0xc6, 0x3e, 0x60, - 0x60, 0x14, 0x20, 0x48, 0x29, 0x40, 0xa8, 0x0e, 0x20, 0x61, 0x20, 0xc2, - 0xa8, 0x13, 0x20, 0xc2, 0x2c, 0x05, 0xa8, 0x0a, 0xa9, 0x64, 0xa9, 0x1a, - 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x0c, 0x0d, 0xc5, 0x90, 0x06, 0xa8, 0x42, - 0xa8, 0x3e, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, - 0xad, 0xcc, 0xac, 0xd0, 0xaf, 0xd4, 0xae, 0xd8, 0xab, 0xdc, 0xaa, 0xe0, - 0xab, 0x2e, 0xaa, 0x32, 0xad, 0x1e, 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, - 0xa8, 0xac, 0xaa, 0xb0, 0xa8, 0x36, 0xaa, 0x3a, 0xa9, 0x88, 0xa8, 0x64, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x08, 0x11, 0x20, 0x81, 0x09, - 0xa9, 0x16, 0x01, 0x28, 0x00, 0x80, 0x91, 0x8a, 0x00, 0x02, 0xa9, 0x16, - 0x11, 0x60, 0x3e, 0x60, 0x60, 0x1c, 0xc0, 0x85, 0x60, 0x1e, 0xa8, 0x7c, - 0xc0, 0xdd, 0xa8, 0x7e, 0x90, 0x06, 0x00, 0xce, 0x00, 0x1e, 0x01, 0x2e, - 0x00, 0x05, 0xa8, 0x04, 0x90, 0x45, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x0e, - 0xa0, 0x64, 0xa8, 0x1a, 0x90, 0x84, 0x00, 0x0f, 0x90, 0x80, 0x20, 0xc7, - 0x20, 0x15, 0x82, 0xff, 0x09, 0x0c, 0x0d, 0xc5, 0xaa, 0x12, 0x22, 0x05, - 0xa8, 0x0a, 0x0c, 0x08, 0x90, 0x3e, 0x27, 0x30, 0xa8, 0x80, 0xd0, 0xfc, - 0x11, 0x90, 0x2d, 0x00, 0x00, 0x02, 0x1a, 0x4f, 0x19, 0xb1, 0x19, 0xb1, - 0x1a, 0x4f, 0x1a, 0x4f, 0x1a, 0x49, 0x1a, 0x4f, 0x19, 0xb1, 0x1a, 0x00, - 0x1a, 0x00, 0x1a, 0x00, 0x1a, 0x4f, 0x1a, 0x4f, 0x1a, 0x4f, 0x1a, 0x46, - 0x1a, 0x00, 0xc0, 0xfc, 0xa8, 0x82, 0xab, 0x2c, 0xaa, 0x30, 0xad, 0x1c, - 0xac, 0x20, 0xdd, 0x9c, 0x09, 0x04, 0x1a, 0x51, 0x2c, 0x05, 0x90, 0x8a, - 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, - 0x19, 0x9d, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, - 0x19, 0xa1, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, - 0x19, 0xa5, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, - 0x19, 0xa9, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, 0x19, 0x9b, - 0x19, 0xad, 0x08, 0x0c, 0x0d, 0xc5, 0xa7, 0x74, 0xa6, 0x78, 0x08, 0x04, - 0x1a, 0x51, 0xa7, 0x8c, 0xa6, 0x90, 0x08, 0x04, 0x1a, 0x51, 0xa7, 0xa4, - 0xa6, 0xa8, 0x08, 0x04, 0x1a, 0x51, 0xa7, 0xbc, 0xa6, 0xc0, 0x08, 0x04, - 0x1a, 0x51, 0xa7, 0xd4, 0xa6, 0xd8, 0x08, 0x04, 0x1a, 0x51, 0x2c, 0x05, - 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, - 0x00, 0x02, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xd6, 0x19, 0xd4, 0x19, 0xd4, - 0x19, 0xd4, 0x19, 0xdc, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xe2, - 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xe8, 0x19, 0xd4, 0x19, 0xd4, - 0x19, 0xd4, 0x19, 0xee, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xf4, - 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xd4, 0x19, 0xfa, 0x08, 0x0c, 0x0d, 0xc5, - 0xa5, 0x74, 0xa4, 0x78, 0xa3, 0x7c, 0xa2, 0x80, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0x84, 0xa4, 0x88, 0xa3, 0x8c, 0xa2, 0x90, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0x94, 0xa4, 0x98, 0xa3, 0x9c, 0xa2, 0xa0, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0xa4, 0xa4, 0xa8, 0xa3, 0xac, 0xa2, 0xb0, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0xb4, 0xa4, 0xb8, 0xa3, 0xbc, 0xa2, 0xc0, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0xc4, 0xa4, 0xc8, 0xa3, 0xcc, 0xa2, 0xd0, 0x08, 0x04, 0x1a, 0x51, - 0xa5, 0xd4, 0xa4, 0xd8, 0xa3, 0xdc, 0xa2, 0xe0, 0x08, 0x04, 0x1a, 0x51, - 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x1a, 0x23, 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x21, - 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x2a, 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x21, - 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x31, 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x21, - 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x38, 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x21, - 0x1a, 0x21, 0x1a, 0x21, 0x1a, 0x3f, 0x08, 0x0c, 0x0d, 0xc5, 0xa5, 0x6c, - 0xa4, 0x70, 0xa7, 0x74, 0xa6, 0x78, 0xa3, 0x7c, 0xa2, 0x80, 0x04, 0x38, - 0xa5, 0x84, 0xa4, 0x88, 0xa7, 0x8c, 0xa6, 0x90, 0xa3, 0x94, 0xa2, 0x98, - 0x04, 0x00, 0xa5, 0x9c, 0xa4, 0xa0, 0xa7, 0xa4, 0xa6, 0xa8, 0xa3, 0xac, - 0xa2, 0xb0, 0x00, 0xc8, 0xa5, 0xb4, 0xa4, 0xb8, 0xa7, 0xbc, 0xa6, 0xc0, - 0xa3, 0xc4, 0xa2, 0xc8, 0x00, 0x90, 0xa5, 0xcc, 0xa4, 0xd0, 0xa7, 0xd4, - 0xa6, 0xd8, 0xa3, 0xdc, 0xa2, 0xe0, 0x00, 0x58, 0x9d, 0x86, 0x00, 0x0e, - 0x11, 0x30, 0x08, 0x0c, 0x20, 0x7f, 0x19, 0x04, 0x19, 0x5a, 0x90, 0x0e, - 0x00, 0x50, 0x08, 0x0c, 0x0d, 0xc5, 0xab, 0x2e, 0xaa, 0x32, 0xad, 0x1e, - 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, 0x08, 0x0c, 0x20, 0x7f, 0x00, 0x05, - 0x60, 0x14, 0x20, 0x48, 0x61, 0x18, 0x81, 0xff, 0x01, 0x48, 0x81, 0x0c, - 0x81, 0x0c, 0x81, 0x0c, 0x81, 0xff, 0x11, 0x18, 0xa8, 0x87, 0x00, 0x01, - 0x00, 0x08, 0xa9, 0x86, 0x60, 0x1b, 0x00, 0x02, 0xa8, 0x74, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x84, 0x00, 0x08, 0x01, 0x50, 0x00, 0xe9, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, - 0xb3, 0x52, 0x00, 0x05, 0xa9, 0x74, 0xd1, 0xdc, 0x11, 0x08, 0x00, 0x05, - 0xa9, 0x34, 0xa8, 0x8c, 0x91, 0x06, 0x11, 0x58, 0xa9, 0x38, 0xa8, 0x90, - 0x91, 0x06, 0x11, 0x38, 0x60, 0x1c, 0xc0, 0x84, 0x60, 0x1e, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x04, 0xb3, 0x52, 0x00, 0x05, 0x01, 0x26, 0x00, 0xc6, - 0x20, 0x91, 0x22, 0x00, 0x00, 0xce, 0x79, 0x08, 0x91, 0x8c, 0x00, 0x07, - 0x91, 0x86, 0x00, 0x00, 0x05, 0xb0, 0x91, 0x86, 0x00, 0x03, 0x05, 0x98, - 0x60, 0x20, 0x60, 0x23, 0x00, 0x00, 0x00, 0x06, 0x20, 0x31, 0x00, 0x08, - 0x00, 0xc6, 0x78, 0x1f, 0x08, 0x08, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x20, - 0x08, 0x0c, 0x13, 0x94, 0x86, 0x31, 0x1d, 0xb8, 0x00, 0xce, 0x78, 0x1f, - 0x08, 0x00, 0x20, 0x31, 0x01, 0x68, 0x00, 0xc6, 0x78, 0x08, 0xd0, 0x9c, - 0x19, 0x0c, 0x13, 0x94, 0x00, 0xce, 0x20, 0x01, 0x00, 0x38, 0x08, 0x0c, - 0x1b, 0x69, 0x79, 0x30, 0x91, 0x86, 0x00, 0x40, 0x01, 0x60, 0x91, 0x86, - 0x00, 0x42, 0x19, 0x0c, 0x0d, 0xc5, 0x20, 0x01, 0x00, 0x1e, 0x80, 0x01, - 0x1d, 0xf0, 0x86, 0x31, 0x1d, 0x40, 0x08, 0x0c, 0x1b, 0x78, 0x00, 0x0e, - 0x60, 0x22, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x1b, 0x65, 0x78, 0x27, - 0x00, 0x15, 0x78, 0x28, 0x9c, 0x06, 0x1d, 0xb8, 0x78, 0x2b, 0x00, 0x00, - 0x0c, 0xa0, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x78, 0x03, 0x00, 0x00, - 0x78, 0xab, 0x00, 0x04, 0x20, 0x01, 0xf0, 0x00, 0x80, 0x01, 0x09, 0x0c, - 0x0d, 0xc5, 0x7a, 0xac, 0xd2, 0xac, 0x1d, 0xd0, 0x00, 0xfe, 0x08, 0x0c, - 0x76, 0x37, 0x11, 0x88, 0x20, 0x01, 0x01, 0x38, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x01, 0x60, 0x20, 0x03, 0x00, 0x00, 0x20, 0x11, 0x01, 0x2c, - 0xa0, 0x01, 0xa0, 0x01, 0x82, 0x11, 0x1d, 0xe0, 0x00, 0x59, 0x08, 0x04, - 0x76, 0xe4, 0x04, 0x79, 0x00, 0x39, 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, - 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x00, 0x08, 0x0c, 0x2c, 0x6d, 0x20, 0x09, 0x00, 0x3c, 0x08, 0x0c, - 0x24, 0x09, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x70, 0x00, - 0x90, 0x84, 0x00, 0x3c, 0x1d, 0xe0, 0x08, 0x0c, 0x87, 0x25, 0x70, 0xa0, - 0x70, 0xa2, 0x70, 0x98, 0x70, 0x9a, 0x70, 0x9c, 0x70, 0x9e, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x08, 0x0c, 0x13, 0x22, 0x78, 0x03, 0x00, 0x01, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x01, 0x01, 0x38, 0x20, 0x14, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x01, 0x60, 0x20, 0x2c, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, - 0x76, 0x37, 0x11, 0x08, 0x00, 0x05, 0x20, 0x21, 0x02, 0x60, 0x20, 0x01, - 0x01, 0x41, 0x20, 0x1c, 0xd3, 0xdc, 0x11, 0x68, 0x20, 0x01, 0x01, 0x09, - 0x20, 0x1c, 0x93, 0x9c, 0x00, 0x48, 0x11, 0x60, 0x20, 0x01, 0x01, 0x11, - 0x20, 0x1c, 0x83, 0xff, 0x11, 0x10, 0x84, 0x21, 0x1d, 0x70, 0x20, 0x01, - 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x46, 0x20, 0x21, - 0x00, 0x19, 0x20, 0x03, 0x00, 0x48, 0xa0, 0x01, 0xa0, 0x01, 0x20, 0x1c, - 0x93, 0x9c, 0x00, 0x48, 0x01, 0x20, 0x84, 0x21, 0x1d, 0xb0, 0x00, 0x4e, - 0x0c, 0x60, 0x00, 0x4e, 0x0c, 0x40, 0x60, 0x1c, 0xc0, 0x84, 0x60, 0x1e, - 0x00, 0x05, 0x2c, 0x08, 0x62, 0x1c, 0x08, 0x0c, 0x16, 0x11, 0x79, 0x30, - 0x00, 0x05, 0x2c, 0x08, 0x62, 0x1c, 0x08, 0x0c, 0x16, 0xbc, 0x79, 0x30, - 0x00, 0x05, 0x80, 0x01, 0x1d, 0xf0, 0x00, 0x05, 0x20, 0x31, 0x00, 0x64, - 0x78, 0x1c, 0x90, 0x84, 0x00, 0x07, 0x01, 0x70, 0x20, 0x01, 0x00, 0x38, - 0x0c, 0x41, 0x91, 0x86, 0x00, 0x40, 0x09, 0x04, 0x1b, 0xd6, 0x20, 0x01, - 0x00, 0x1e, 0x0c, 0x69, 0x86, 0x31, 0x1d, 0x80, 0x08, 0x0c, 0x0d, 0xc5, - 0x78, 0x1f, 0x02, 0x02, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x0d, 0xac, 0x0c, 0x01, 0x78, 0x1c, 0xd0, 0x84, 0x01, 0x10, - 0x08, 0x61, 0x04, 0xe0, 0x20, 0x01, 0x00, 0x30, 0x08, 0x91, 0x91, 0x86, - 0x00, 0x40, 0x05, 0x68, 0x78, 0x1c, 0xd0, 0x84, 0x1d, 0xa8, 0x78, 0x1f, - 0x01, 0x01, 0x20, 0x01, 0x00, 0x14, 0x08, 0x69, 0x20, 0x01, 0x00, 0x37, - 0x08, 0x21, 0x91, 0x86, 0x00, 0x40, 0x01, 0x40, 0x20, 0x01, 0x00, 0x30, - 0x08, 0x0c, 0x1b, 0x6f, 0x91, 0x86, 0x00, 0x40, 0x19, 0x0c, 0x0d, 0xc5, - 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x69, 0x2c, 0xd1, 0xf4, 0x11, 0x70, - 0xd1, 0xc4, 0x01, 0x60, 0xd1, 0x9c, 0x01, 0x30, 0x68, 0x00, 0x90, 0x85, - 0x18, 0x00, 0x68, 0x02, 0x00, 0xde, 0x00, 0x80, 0x69, 0x08, 0x91, 0x84, - 0x00, 0x07, 0x1d, 0xb0, 0x00, 0xde, 0x78, 0x1f, 0x01, 0x00, 0x79, 0x1c, - 0x91, 0x84, 0x00, 0x07, 0x09, 0x0c, 0x0d, 0xc5, 0xa0, 0x01, 0xa0, 0x01, - 0x78, 0x1f, 0x02, 0x00, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, - 0x20, 0x71, 0x1a, 0x69, 0x20, 0x79, 0x00, 0x90, 0x01, 0x2e, 0x00, 0x05, - 0x92, 0x80, 0x00, 0x05, 0x20, 0x04, 0x20, 0x48, 0xa9, 0x7c, 0xd1, 0xdc, - 0x19, 0x04, 0x1c, 0x78, 0xa9, 0x64, 0x91, 0x84, 0x00, 0x07, 0x00, 0x02, - 0x1b, 0xf4, 0x1c, 0x63, 0x1c, 0x0b, 0x1c, 0x0d, 0x1c, 0x0b, 0x1c, 0x4b, - 0x1c, 0x2b, 0x1c, 0x1a, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x86, 0x00, 0x08, - 0x11, 0x70, 0xa8, 0x7c, 0xd0, 0xb4, 0x09, 0x04, 0x1e, 0xa5, 0x90, 0x06, - 0xa8, 0x42, 0xa8, 0x3e, 0xa9, 0x88, 0x29, 0x00, 0xa8, 0x5a, 0xa8, 0x13, - 0x20, 0xc2, 0x08, 0x04, 0x1c, 0x74, 0x91, 0x86, 0x00, 0x48, 0x09, 0x04, - 0x1c, 0x63, 0x08, 0x0c, 0x0d, 0xc5, 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x13, 0x09, 0x04, 0x1c, 0x63, 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x1b, 0x09, 0x04, 0x1c, 0x63, 0x0c, 0x88, 0xa8, 0x7c, 0xd0, 0xb4, - 0x09, 0x04, 0x1e, 0xa5, 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x3a, 0xa8, 0x8c, - 0xa8, 0x3e, 0xa8, 0x36, 0xa8, 0xac, 0xa8, 0x46, 0xa8, 0xb0, 0xa8, 0x4a, - 0xa9, 0x88, 0x08, 0x04, 0x1c, 0x6b, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x1e, 0x19, 0xd0, 0xa8, 0x7c, 0xd0, 0xb4, 0x09, 0x04, - 0x1e, 0xa5, 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x3a, 0xa8, 0x8c, 0xa8, 0x3e, - 0xa8, 0x36, 0xa8, 0xac, 0xa8, 0x46, 0xa8, 0xb0, 0xa8, 0x4a, 0xa8, 0x04, - 0xa8, 0x5a, 0x20, 0x40, 0xa0, 0x64, 0x90, 0x84, 0x00, 0x0f, 0x90, 0x80, - 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x12, 0xa9, 0x88, 0x04, 0x48, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x86, 0x00, 0x15, 0x15, 0x40, 0xa8, 0x7c, 0xd0, 0xb4, - 0x09, 0x04, 0x1e, 0xa5, 0xa8, 0x04, 0xa8, 0x5a, 0x20, 0x40, 0xa0, 0x64, - 0x90, 0x84, 0x00, 0x0f, 0x90, 0x80, 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x12, - 0xa9, 0x88, 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0x00, 0x88, 0xa8, 0x7c, - 0xd0, 0xb4, 0x09, 0x04, 0x1e, 0xa5, 0xa9, 0x88, 0x90, 0x06, 0xa8, 0x42, - 0xa8, 0x3e, 0x29, 0x00, 0xa8, 0x5a, 0xa8, 0x64, 0x90, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x12, 0xa9, 0x16, 0xa8, 0x7c, - 0xc0, 0xdd, 0xa8, 0x7e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x90, - 0x78, 0x2c, 0xd0, 0xfc, 0x19, 0x0c, 0x1e, 0xeb, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x69, 0x70, 0x00, 0x90, 0x05, 0x19, 0x04, 0x1c, 0xdf, 0x72, 0x06, - 0x92, 0x80, 0x00, 0x05, 0x20, 0x4c, 0x92, 0x80, 0x00, 0x04, 0x20, 0x04, - 0x78, 0x2b, 0x00, 0x04, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x78, 0x03, - 0x00, 0x40, 0x00, 0xfe, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x6c, 0x78, 0x36, - 0xb8, 0x90, 0x00, 0xbe, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x78, 0x03, - 0x00, 0x40, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0x78, 0x1a, 0x78, 0xd7, 0x00, 0x00, 0x00, 0xfe, 0xa8, 0x14, - 0x20, 0x50, 0xa8, 0x58, 0x20, 0x40, 0xa8, 0x10, 0x20, 0x60, 0xa0, 0x64, - 0x90, 0xec, 0x00, 0x0f, 0xa9, 0x44, 0x79, 0x1a, 0x71, 0x16, 0xa8, 0x48, - 0x78, 0x1e, 0x70, 0x1a, 0x90, 0x06, 0x70, 0x0e, 0x70, 0x12, 0x70, 0x04, - 0xa9, 0x40, 0xa8, 0x38, 0x91, 0x06, 0x15, 0x00, 0xa9, 0x3c, 0xa8, 0x34, - 0x91, 0x06, 0x11, 0xe0, 0x00, 0x06, 0x00, 0x16, 0xa9, 0x38, 0xa8, 0x34, - 0x91, 0x05, 0x01, 0x18, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x98, 0x00, 0x1e, - 0x00, 0x0e, 0x8a, 0xff, 0x01, 0xc8, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x09, 0x03, 0x06, 0x20, 0x0b, 0x08, 0x08, 0x00, 0xd9, 0x01, 0x08, - 0x00, 0xc9, 0x01, 0x2e, 0x90, 0x06, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0x36, 0x00, 0x46, 0xab, 0x38, 0xac, 0x34, 0x08, 0x0c, 0x20, 0xe7, - 0x00, 0x4e, 0x00, 0x3e, 0x0d, 0x30, 0x0c, 0x98, 0x90, 0x85, 0x00, 0x01, - 0x0c, 0x80, 0x20, 0x09, 0x03, 0x06, 0x20, 0x0b, 0x48, 0x00, 0x70, 0x27, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x76, 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, - 0x00, 0x36, 0x00, 0x26, 0x8a, 0xff, 0x09, 0x04, 0x1e, 0x9e, 0x70, 0x0c, - 0x72, 0x14, 0x92, 0x3a, 0x70, 0x10, 0x72, 0x18, 0x92, 0x03, 0x0a, 0x04, - 0x1e, 0x9d, 0x97, 0x05, 0x09, 0x04, 0x1e, 0x9d, 0x90, 0x3e, 0x27, 0x30, - 0xa8, 0x80, 0xd0, 0xfc, 0x11, 0x90, 0x2d, 0x00, 0x00, 0x02, 0x1e, 0x22, - 0x1d, 0x61, 0x1d, 0x61, 0x1e, 0x22, 0x1e, 0x22, 0x1d, 0xff, 0x1e, 0x22, - 0x1d, 0x61, 0x1e, 0x06, 0x1d, 0xb0, 0x1d, 0xb0, 0x1e, 0x22, 0x1e, 0x22, - 0x1e, 0x22, 0x1d, 0xf9, 0x1d, 0xb0, 0xc0, 0xfc, 0xa8, 0x82, 0xab, 0x2c, - 0xaa, 0x30, 0xad, 0x1c, 0xac, 0x20, 0xdd, 0x9c, 0x09, 0x04, 0x1e, 0x2f, - 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x1d, 0x4d, 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x4b, - 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x51, 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x4b, - 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x55, 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x4b, - 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x59, 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x4b, - 0x1d, 0x4b, 0x1d, 0x4b, 0x1d, 0x5d, 0x08, 0x0c, 0x0d, 0xc5, 0xa7, 0x74, - 0xa6, 0x78, 0x08, 0x04, 0x1e, 0x2f, 0xa7, 0x8c, 0xa6, 0x90, 0x08, 0x04, - 0x1e, 0x2f, 0xa7, 0xa4, 0xa6, 0xa8, 0x08, 0x04, 0x1e, 0x2f, 0xa7, 0xbc, - 0xa6, 0xc0, 0x08, 0x04, 0x1e, 0x2f, 0xa7, 0xd4, 0xa6, 0xd8, 0x08, 0x04, - 0x1e, 0x2f, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x86, - 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x8c, 0x1d, 0x84, 0x1d, 0x84, - 0x1d, 0x84, 0x1d, 0x92, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x98, - 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x9e, 0x1d, 0x84, 0x1d, 0x84, - 0x1d, 0x84, 0x1d, 0xa4, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0x84, 0x1d, 0xaa, - 0x08, 0x0c, 0x0d, 0xc5, 0xa5, 0x74, 0xa4, 0x78, 0xa3, 0x7c, 0xa2, 0x80, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0x84, 0xa4, 0x88, 0xa3, 0x8c, 0xa2, 0x90, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0x94, 0xa4, 0x98, 0xa3, 0x9c, 0xa2, 0xa0, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0xa4, 0xa4, 0xa8, 0xa3, 0xac, 0xa2, 0xb0, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0xb4, 0xa4, 0xb8, 0xa3, 0xbc, 0xa2, 0xc0, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0xc4, 0xa4, 0xc8, 0xa3, 0xcc, 0xa2, 0xd0, - 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0xd4, 0xa4, 0xd8, 0xa3, 0xdc, 0xa2, 0xe0, - 0x08, 0x04, 0x1e, 0x2f, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, - 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1d, 0xd3, 0x1d, 0xd1, - 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xdb, 0x1d, 0xd1, - 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xe3, 0x1d, 0xd1, - 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xeb, 0x1d, 0xd1, - 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xd1, 0x1d, 0xf2, 0x08, 0x0c, - 0x0d, 0xc5, 0xa5, 0x6c, 0xa4, 0x70, 0xa7, 0x74, 0xa6, 0x78, 0xa3, 0x7c, - 0xa2, 0x80, 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0x84, 0xa4, 0x88, 0xa7, 0x8c, - 0xa6, 0x90, 0xa3, 0x94, 0xa2, 0x98, 0x08, 0x04, 0x1e, 0x2f, 0xa5, 0x9c, - 0xa4, 0xa0, 0xa7, 0xa4, 0xa6, 0xa8, 0xa3, 0xac, 0xa2, 0xb0, 0x08, 0x04, - 0x1e, 0x2f, 0xa5, 0xb4, 0xa4, 0xb8, 0xa7, 0xbc, 0xa6, 0xc0, 0xa3, 0xc4, - 0xa2, 0xc8, 0x04, 0xe8, 0xa5, 0xcc, 0xa4, 0xd0, 0xa7, 0xd4, 0xa6, 0xd8, - 0xa3, 0xdc, 0xa2, 0xe0, 0x04, 0xb0, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x1e, 0x15, 0x18, 0x08, 0x0c, 0x20, 0x7f, 0x19, 0x04, - 0x1c, 0xfc, 0x90, 0x0e, 0x08, 0x04, 0x1e, 0x9e, 0xab, 0x64, 0x93, 0x9c, - 0x00, 0xff, 0x93, 0x86, 0x00, 0x48, 0x11, 0x80, 0x00, 0xc6, 0x70, 0x04, - 0x20, 0x60, 0x60, 0x04, 0x90, 0x86, 0x00, 0x43, 0x00, 0xce, 0x09, 0x04, - 0x1d, 0xb0, 0xab, 0x9c, 0x90, 0x16, 0xad, 0x8c, 0xac, 0x90, 0xaf, 0x94, - 0xae, 0x98, 0x00, 0x98, 0x93, 0x86, 0x00, 0x08, 0x09, 0x04, 0x1d, 0xb0, - 0x08, 0x0c, 0x0d, 0xc5, 0xa9, 0x64, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x86, - 0x00, 0x13, 0x09, 0x04, 0x1d, 0x61, 0x91, 0x86, 0x00, 0x1b, 0x09, 0x04, - 0x1d, 0xb0, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x09, 0x03, 0x0f, 0x21, 0x04, - 0xd0, 0xfc, 0x05, 0x38, 0x00, 0x66, 0x20, 0x09, 0x03, 0x06, 0x21, 0x34, - 0x20, 0x0b, 0x40, 0x00, 0x21, 0x04, 0x90, 0x84, 0x00, 0x30, 0x15, 0xb8, - 0x20, 0x31, 0x10, 0x00, 0x26, 0x00, 0x93, 0x02, 0x92, 0x8b, 0x00, 0x00, - 0xa8, 0x2e, 0xa9, 0x32, 0x02, 0x78, 0x91, 0x05, 0x01, 0x68, 0x20, 0x11, - 0x00, 0x00, 0x26, 0x18, 0x26, 0x00, 0x95, 0x00, 0xa8, 0x1e, 0x94, 0x81, - 0x00, 0x00, 0xa8, 0x22, 0xa8, 0x80, 0xc0, 0xfd, 0xa8, 0x82, 0x00, 0x20, - 0xa8, 0x2f, 0x00, 0x00, 0xa8, 0x33, 0x00, 0x00, 0x00, 0x6e, 0x7b, 0x12, - 0x7a, 0x16, 0x7d, 0x02, 0x7c, 0x06, 0x7f, 0x0a, 0x7e, 0x0e, 0x78, 0x2b, - 0x00, 0x01, 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0xa8, 0x3c, 0x93, 0x00, - 0xa8, 0x3e, 0xa8, 0x40, 0x92, 0x01, 0xa8, 0x42, 0x70, 0x0c, 0x93, 0x00, - 0x70, 0x0e, 0x70, 0x10, 0x92, 0x01, 0x70, 0x12, 0x08, 0x0c, 0x20, 0x7f, - 0x04, 0x48, 0xd6, 0xb4, 0x01, 0x10, 0x20, 0x0b, 0x40, 0x40, 0x20, 0x31, - 0x00, 0x80, 0x95, 0x84, 0x00, 0x7f, 0x01, 0x08, 0x96, 0x32, 0x71, 0x24, - 0x70, 0x00, 0x90, 0x86, 0x00, 0x00, 0x11, 0x98, 0xc1, 0x85, 0x71, 0x26, - 0x20, 0x09, 0x03, 0x06, 0x21, 0x04, 0xd0, 0xb4, 0x19, 0x04, 0x1e, 0x40, - 0x20, 0x0b, 0x40, 0x40, 0x20, 0x09, 0x1a, 0x83, 0x21, 0x04, 0x80, 0x00, - 0x0a, 0x04, 0x1e, 0x40, 0x20, 0x0a, 0x08, 0x04, 0x1e, 0x40, 0xc1, 0x8d, - 0x71, 0x26, 0xd1, 0x84, 0x1d, 0x58, 0x08, 0x04, 0x1e, 0x40, 0x90, 0x06, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, - 0x00, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x26, 0x20, 0x01, 0x01, 0x05, - 0x20, 0x03, 0x00, 0x10, 0x78, 0x2b, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x70, 0x04, 0x20, 0x60, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, - 0x01, 0x18, 0xa8, 0x80, 0xc0, 0xbd, 0xa8, 0x82, 0x78, 0x2c, 0xd0, 0xac, - 0x1d, 0xe8, 0x08, 0x0c, 0x1c, 0xef, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x80, 0x20, 0x61, 0x01, 0x00, 0x62, 0xc8, 0x20, 0x01, 0x00, 0xfa, - 0x80, 0x01, 0x1d, 0xf0, 0x60, 0xc8, 0x92, 0x06, 0x1d, 0xc0, 0x60, 0xc4, - 0xa8, 0x9a, 0x60, 0xc8, 0xa8, 0x96, 0x70, 0x04, 0x20, 0x60, 0x00, 0xc6, - 0x08, 0x0c, 0xcc, 0xf3, 0x00, 0xce, 0x20, 0x01, 0x19, 0xf7, 0x20, 0x04, - 0x9c, 0x06, 0x11, 0x60, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, - 0x08, 0x0c, 0xac, 0x2b, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0xaa, 0xc9, - 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x2e, 0x08, 0x04, 0x20, 0x2f, 0x01, 0x26, - 0x20, 0x91, 0x24, 0x00, 0xa8, 0x58, 0x20, 0x40, 0x79, 0x2c, 0x78, 0x2b, - 0x00, 0x02, 0x91, 0x84, 0x07, 0x00, 0x19, 0x04, 0x1e, 0xa7, 0x70, 0x00, - 0x00, 0x02, 0x20, 0x2f, 0x1e, 0xfd, 0x1f, 0x7d, 0x20, 0x2d, 0x80, 0x01, - 0x70, 0x02, 0x70, 0x27, 0x00, 0x00, 0xd1, 0x9c, 0x11, 0x58, 0x8a, 0xff, - 0x09, 0x04, 0x1f, 0x4a, 0x08, 0x0c, 0x1c, 0xf6, 0x09, 0x04, 0x20, 0x2f, - 0x08, 0x0c, 0x1c, 0xf6, 0x08, 0x04, 0x20, 0x2f, 0x78, 0x2b, 0x00, 0x04, - 0xd1, 0x94, 0x01, 0x48, 0xa8, 0x80, 0xc0, 0xfc, 0xa8, 0x82, 0x8a, 0xff, - 0x15, 0x18, 0xa8, 0x7c, 0xc0, 0xf5, 0xa8, 0x7e, 0x00, 0xf8, 0x00, 0x26, - 0x00, 0x36, 0xab, 0x3c, 0xaa, 0x40, 0x00, 0x16, 0x79, 0x10, 0xa8, 0x2c, - 0x91, 0x00, 0xa8, 0x2e, 0x79, 0x14, 0xa8, 0x30, 0x91, 0x01, 0xa8, 0x32, - 0x00, 0x1e, 0x78, 0x10, 0x93, 0x1a, 0x78, 0x14, 0x92, 0x13, 0x78, 0x00, - 0xa8, 0x1e, 0x78, 0x04, 0xa8, 0x22, 0xab, 0x3e, 0xaa, 0x42, 0x00, 0x3e, - 0x00, 0x2e, 0x08, 0x0c, 0x20, 0x9a, 0xa8, 0x80, 0xc0, 0xfd, 0xa8, 0x82, - 0x2a, 0x00, 0xa8, 0x16, 0x28, 0x00, 0xa8, 0x5a, 0x2c, 0x00, 0xa8, 0x12, - 0x70, 0x03, 0x00, 0x00, 0x20, 0x09, 0x03, 0x06, 0x20, 0x0b, 0x48, 0x00, - 0x70, 0x27, 0x00, 0x00, 0x08, 0x04, 0x20, 0x2f, 0x00, 0xf6, 0x00, 0x26, - 0x78, 0x1c, 0x00, 0x06, 0x78, 0x18, 0x00, 0x06, 0x20, 0x79, 0x01, 0x00, - 0x7a, 0x14, 0x92, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x12, 0x78, 0x16, - 0x00, 0x36, 0x20, 0x19, 0x10, 0x00, 0x83, 0x19, 0x09, 0x0c, 0x0d, 0xc5, - 0x78, 0x20, 0xd0, 0xbc, 0x1d, 0xd0, 0x00, 0x3e, 0x79, 0xc8, 0x00, 0x0e, - 0x91, 0x02, 0x00, 0x1e, 0x00, 0x06, 0x00, 0x16, 0x79, 0xc4, 0x00, 0x0e, - 0x91, 0x03, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, 0x92, 0x84, 0x19, 0x84, - 0x90, 0x85, 0x00, 0x12, 0x78, 0x16, 0x00, 0x2e, 0x00, 0xfe, 0x78, 0x2b, - 0x00, 0x08, 0x70, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x1c, 0xef, 0x08, 0x04, - 0x20, 0x2f, 0x80, 0x01, 0x70, 0x02, 0x70, 0x24, 0x80, 0x04, 0x70, 0x26, - 0xd1, 0x94, 0x01, 0x70, 0x78, 0x2c, 0xd0, 0xfc, 0x19, 0x04, 0x1e, 0xf0, - 0xd1, 0x9c, 0x19, 0x04, 0x20, 0x2b, 0x8a, 0xff, 0x09, 0x04, 0x20, 0x2f, - 0x08, 0x0c, 0x1c, 0xf6, 0x08, 0x04, 0x20, 0x2f, 0x00, 0x26, 0x00, 0x36, - 0xab, 0x3c, 0xaa, 0x40, 0x08, 0x0c, 0x20, 0x9a, 0xdd, 0x9c, 0x19, 0x04, - 0x1f, 0xea, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xc0, - 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xc6, 0x1f, 0xbe, 0x1f, 0xbe, - 0x1f, 0xbe, 0x1f, 0xcc, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xd2, - 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xd8, 0x1f, 0xbe, 0x1f, 0xbe, - 0x1f, 0xbe, 0x1f, 0xde, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xbe, 0x1f, 0xe4, - 0x08, 0x0c, 0x0d, 0xc5, 0xa0, 0x7c, 0x93, 0x1a, 0xa0, 0x80, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0x8c, 0x93, 0x1a, 0xa0, 0x90, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0x9c, 0x93, 0x1a, 0xa0, 0xa0, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0xac, 0x93, 0x1a, 0xa0, 0xb0, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0xbc, 0x93, 0x1a, 0xa0, 0xc0, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0xcc, 0x93, 0x1a, 0xa0, 0xd0, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0xa0, 0xdc, 0x93, 0x1a, 0xa0, 0xe0, 0x92, 0x13, - 0x08, 0x04, 0x1f, 0x1f, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, - 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x20, 0x0d, 0x20, 0x0b, - 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x13, 0x20, 0x0b, - 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x19, 0x20, 0x0b, - 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x1f, 0x20, 0x0b, - 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x0b, 0x20, 0x25, 0x08, 0x0c, - 0x0d, 0xc5, 0xa0, 0x7c, 0x93, 0x1a, 0xa0, 0x80, 0x92, 0x13, 0x08, 0x04, - 0x1f, 0x1f, 0xa0, 0x94, 0x93, 0x1a, 0xa0, 0x98, 0x92, 0x13, 0x08, 0x04, - 0x1f, 0x1f, 0xa0, 0xac, 0x93, 0x1a, 0xa0, 0xb0, 0x92, 0x13, 0x08, 0x04, - 0x1f, 0x1f, 0xa0, 0xc4, 0x93, 0x1a, 0xa0, 0xc8, 0x92, 0x13, 0x08, 0x04, - 0x1f, 0x1f, 0xa0, 0xdc, 0x93, 0x1a, 0xa0, 0xe0, 0x92, 0x13, 0x08, 0x04, - 0x1f, 0x1f, 0x08, 0x04, 0x1f, 0x1b, 0x08, 0x0c, 0x0d, 0xc5, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x69, 0x70, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x09, 0x04, 0x20, 0x7a, 0x20, 0x79, 0x00, 0x90, - 0x20, 0x09, 0x02, 0x07, 0x21, 0x0c, 0xd1, 0x94, 0x01, 0xb8, 0x20, 0x09, - 0x02, 0x0c, 0x21, 0x0c, 0x91, 0x84, 0x00, 0x03, 0x01, 0x88, 0x08, 0x0c, - 0xf0, 0xa0, 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0xc5, 0x00, 0x16, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, - 0x00, 0x1e, 0x20, 0x01, 0x02, 0x0c, 0x21, 0x02, 0x20, 0x09, 0x02, 0x06, - 0x21, 0x04, 0x20, 0x09, 0x02, 0x03, 0x21, 0x0c, 0x91, 0x06, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, 0x78, 0x2c, 0xd0, 0xfc, - 0x09, 0xa8, 0x08, 0x0c, 0x1e, 0xeb, 0x70, 0x00, 0x90, 0x86, 0x00, 0x00, - 0x19, 0x78, 0x78, 0x2b, 0x00, 0x04, 0x78, 0x2c, 0xd0, 0xac, 0x1d, 0xe8, - 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, 0x78, 0x2b, 0x00, 0x02, - 0x70, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x1c, 0xef, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0xa8, 0x80, 0xd0, 0xfc, 0x11, 0xa8, 0x8c, 0x60, 0x2c, 0x05, - 0x90, 0x05, 0x01, 0x10, 0x8a, 0x51, 0x00, 0x05, 0xa0, 0x04, 0x90, 0x05, - 0x01, 0x68, 0xa8, 0x5a, 0x20, 0x40, 0xa0, 0x64, 0x90, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0x20, 0xc7, 0x20, 0x65, 0x8c, 0xff, 0x09, 0x0c, 0x0d, 0xc5, - 0x8a, 0x51, 0x00, 0x05, 0x20, 0x50, 0x00, 0x05, 0xa8, 0x80, 0xd0, 0xfc, - 0x11, 0xb8, 0x8a, 0x50, 0x8c, 0x61, 0x2c, 0x05, 0x90, 0x05, 0x11, 0x90, - 0x28, 0x00, 0x99, 0x06, 0x01, 0x20, 0xa0, 0x00, 0x90, 0x05, 0x11, 0x08, - 0x29, 0x00, 0x20, 0x40, 0xa8, 0x5a, 0xa0, 0x64, 0x90, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0x20, 0xd7, 0x20, 0x65, 0x8c, 0xff, 0x09, 0x0c, 0x0d, 0xc5, - 0x00, 0x05, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, - 0x00, 0x2d, 0x00, 0x31, 0x00, 0x35, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x21, - 0x00, 0x27, 0x00, 0x2d, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, - 0x00, 0x00, 0x00, 0x00, 0x20, 0xba, 0x20, 0xb6, 0x20, 0xba, 0x20, 0xba, - 0x20, 0xc4, 0x00, 0x00, 0x20, 0xba, 0x20, 0xc1, 0x20, 0xc1, 0x20, 0xbe, - 0x20, 0xc1, 0x20, 0xc1, 0x00, 0x00, 0x20, 0xc4, 0x20, 0xc1, 0x00, 0x00, - 0x20, 0xbc, 0x20, 0xbc, 0x00, 0x00, 0x20, 0xbc, 0x20, 0xc4, 0x00, 0x00, - 0x20, 0xbc, 0x20, 0xc2, 0x20, 0xc2, 0x20, 0xc2, 0x00, 0x00, 0x20, 0xc2, - 0x00, 0x00, 0x20, 0xc4, 0x20, 0xc2, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0x86, - 0xab, 0x42, 0xac, 0x3e, 0xa8, 0x88, 0x90, 0x55, 0x09, 0x04, 0x22, 0xc6, - 0x29, 0x40, 0xa0, 0x64, 0x90, 0xec, 0x00, 0x0f, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x08, 0x11, 0x18, 0x20, 0x61, 0x20, 0xc2, 0x00, 0xd0, - 0x9d, 0xe0, 0x20, 0xc7, 0x9d, 0x86, 0x00, 0x07, 0x01, 0x30, 0x9d, 0x86, - 0x00, 0x0e, 0x01, 0x18, 0x9d, 0x86, 0x00, 0x0f, 0x11, 0x20, 0xa0, 0x8c, - 0x94, 0x22, 0xa0, 0x90, 0x93, 0x1b, 0x2c, 0x05, 0x90, 0x65, 0x11, 0x40, - 0x03, 0x10, 0x08, 0x04, 0x22, 0xc6, 0xa0, 0x04, 0x90, 0x45, 0x09, 0x04, - 0x22, 0xc6, 0x08, 0xd8, 0x2c, 0x05, 0x90, 0x05, 0x09, 0x04, 0x21, 0xae, - 0xdd, 0x9c, 0x19, 0x04, 0x21, 0x6a, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, - 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x21, 0x3f, 0x21, 0x3f, - 0x21, 0x41, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x47, 0x21, 0x3f, - 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x4d, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x3f, - 0x21, 0x53, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x59, 0x21, 0x3f, - 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x5f, 0x21, 0x3f, 0x21, 0x3f, 0x21, 0x3f, - 0x21, 0x65, 0x08, 0x0c, 0x0d, 0xc5, 0xa0, 0x7c, 0x94, 0x22, 0xa0, 0x80, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0x8c, 0x94, 0x22, 0xa0, 0x90, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0x9c, 0x94, 0x22, 0xa0, 0xa0, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0xac, 0x94, 0x22, 0xa0, 0xb0, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0xbc, 0x94, 0x22, 0xa0, 0xc0, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0xcc, 0x94, 0x22, 0xa0, 0xd0, - 0x93, 0x1b, 0x08, 0x04, 0x21, 0xa4, 0xa0, 0xdc, 0x94, 0x22, 0xa0, 0xe0, - 0x93, 0x1b, 0x04, 0xd0, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x21, 0x8c, 0x21, 0x8a, 0x21, 0x8a, - 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x91, 0x21, 0x8a, 0x21, 0x8a, - 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x96, 0x21, 0x8a, 0x21, 0x8a, - 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x9b, 0x21, 0x8a, 0x21, 0x8a, - 0x21, 0x8a, 0x21, 0x8a, 0x21, 0x8a, 0x21, 0xa0, 0x08, 0x0c, 0x0d, 0xc5, - 0xa0, 0x7c, 0x94, 0x22, 0xa0, 0x80, 0x93, 0x1b, 0x00, 0x98, 0xa0, 0x94, - 0x94, 0x22, 0xa0, 0x98, 0x93, 0x1b, 0x00, 0x70, 0xa0, 0xac, 0x94, 0x22, - 0xa0, 0xb0, 0x93, 0x1b, 0x00, 0x48, 0xa0, 0xc4, 0x94, 0x22, 0xa0, 0xc8, - 0x93, 0x1b, 0x00, 0x20, 0xa0, 0xdc, 0x94, 0x22, 0xa0, 0xe0, 0x93, 0x1b, - 0x06, 0x30, 0x23, 0x00, 0x94, 0x05, 0x01, 0x60, 0x8a, 0x51, 0x09, 0x04, - 0x22, 0xc6, 0x8c, 0x60, 0x08, 0x04, 0x21, 0x16, 0xa0, 0x04, 0x90, 0x45, - 0x09, 0x04, 0x22, 0xc6, 0x08, 0x04, 0x20, 0xf1, 0x8a, 0x51, 0x09, 0x04, - 0x22, 0xc6, 0x8c, 0x60, 0x2c, 0x05, 0x90, 0x05, 0x11, 0x58, 0xa0, 0x04, - 0x90, 0x45, 0x09, 0x04, 0x22, 0xc6, 0xa0, 0x64, 0x90, 0xec, 0x00, 0x0f, - 0x9d, 0xe0, 0x20, 0xc7, 0x2c, 0x05, 0x20, 0x60, 0xa8, 0x80, 0xc0, 0xfc, - 0xa8, 0x82, 0x08, 0x04, 0x22, 0xbb, 0x2c, 0x05, 0x84, 0x22, 0x84, 0x20, - 0x83, 0x1a, 0x93, 0x99, 0x00, 0x00, 0xac, 0x2e, 0xab, 0x32, 0xdd, 0x9c, - 0x19, 0x04, 0x22, 0x58, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x21, 0xf4, - 0x21, 0xf4, 0x21, 0xf6, 0x21, 0xf4, 0x21, 0xf4, 0x21, 0xf4, 0x22, 0x04, - 0x21, 0xf4, 0x21, 0xf4, 0x21, 0xf4, 0x22, 0x12, 0x21, 0xf4, 0x21, 0xf4, - 0x21, 0xf4, 0x22, 0x20, 0x21, 0xf4, 0x21, 0xf4, 0x21, 0xf4, 0x22, 0x2e, - 0x21, 0xf4, 0x21, 0xf4, 0x21, 0xf4, 0x22, 0x3c, 0x21, 0xf4, 0x21, 0xf4, - 0x21, 0xf4, 0x22, 0x4a, 0x08, 0x0c, 0x0d, 0xc5, 0xa1, 0x7c, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0x80, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, - 0xa0, 0x74, 0x94, 0x20, 0xa0, 0x78, 0x93, 0x19, 0x08, 0x04, 0x22, 0xb6, - 0xa1, 0x8c, 0x24, 0x00, 0x91, 0x22, 0xa1, 0x90, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0x84, 0x94, 0x20, 0xa0, 0x88, 0x93, 0x19, - 0x08, 0x04, 0x22, 0xb6, 0xa1, 0x9c, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xa0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0x94, 0x94, 0x20, - 0xa0, 0x98, 0x93, 0x19, 0x08, 0x04, 0x22, 0xb6, 0xa1, 0xac, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0xb0, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, - 0xa0, 0xa4, 0x94, 0x20, 0xa0, 0xa8, 0x93, 0x19, 0x08, 0x04, 0x22, 0xb6, - 0xa1, 0xbc, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xc0, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0xb4, 0x94, 0x20, 0xa0, 0xb8, 0x93, 0x19, - 0x08, 0x04, 0x22, 0xb6, 0xa1, 0xcc, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xd0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0xc4, 0x94, 0x20, - 0xa0, 0xc8, 0x93, 0x19, 0x08, 0x04, 0x22, 0xb6, 0xa1, 0xdc, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0xe0, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, - 0xa0, 0xd4, 0x94, 0x20, 0xa0, 0xd8, 0x93, 0x19, 0x08, 0x04, 0x22, 0xb6, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x22, 0x76, 0x22, 0x74, 0x22, 0x74, - 0x22, 0x74, 0x22, 0x74, 0x22, 0x74, 0x22, 0x83, 0x22, 0x74, 0x22, 0x74, - 0x22, 0x74, 0x22, 0x74, 0x22, 0x74, 0x22, 0x90, 0x22, 0x74, 0x22, 0x74, - 0x22, 0x74, 0x22, 0x74, 0x22, 0x74, 0x22, 0x9d, 0x22, 0x74, 0x22, 0x74, - 0x22, 0x74, 0x22, 0x74, 0x22, 0x74, 0x22, 0xaa, 0x08, 0x0c, 0x0d, 0xc5, - 0xa1, 0x7c, 0x24, 0x00, 0x91, 0x22, 0xa1, 0x80, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0x6c, 0x94, 0x20, 0xa0, 0x70, 0x93, 0x19, - 0x04, 0x98, 0xa1, 0x94, 0x24, 0x00, 0x91, 0x22, 0xa1, 0x98, 0x23, 0x00, - 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0x84, 0x94, 0x20, 0xa0, 0x88, - 0x93, 0x19, 0x04, 0x30, 0xa1, 0xac, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xb0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0x9c, 0x94, 0x20, - 0xa0, 0xa0, 0x93, 0x19, 0x00, 0xc8, 0xa1, 0xc4, 0x24, 0x00, 0x91, 0x22, - 0xa1, 0xc8, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, 0xa0, 0xb4, - 0x94, 0x20, 0xa0, 0xb8, 0x93, 0x19, 0x00, 0x60, 0xa1, 0xdc, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0xe0, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0xc5, - 0xa0, 0xcc, 0x94, 0x20, 0xa0, 0xd0, 0x93, 0x19, 0xac, 0x1e, 0xab, 0x22, - 0xa8, 0x80, 0xc0, 0xfd, 0xa8, 0x82, 0x28, 0x00, 0xa8, 0x5a, 0x2c, 0x00, - 0xa8, 0x12, 0x2a, 0x00, 0xa8, 0x16, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, - 0x90, 0x06, 0x00, 0x28, 0x00, 0x8e, 0x00, 0xde, 0x00, 0xce, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, 0xd0, 0xbc, - 0x19, 0x0c, 0x0d, 0xbe, 0x90, 0x84, 0x00, 0x07, 0x00, 0x02, 0x22, 0xe7, - 0x1e, 0xeb, 0x22, 0xe7, 0x22, 0xdd, 0x22, 0xe0, 0x22, 0xe3, 0x22, 0xe0, - 0x22, 0xe3, 0x08, 0x0c, 0x1e, 0xeb, 0x00, 0x05, 0x08, 0x0c, 0x11, 0xb2, - 0x00, 0x05, 0x08, 0x0c, 0x1e, 0xeb, 0x08, 0x0c, 0x11, 0xb2, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x26, 0x00, 0x20, 0x79, 0x02, 0x00, 0x20, 0x71, - 0x02, 0x60, 0x20, 0x69, 0x18, 0x00, 0x78, 0x17, 0x00, 0x00, 0x78, 0x9b, - 0x08, 0x14, 0x78, 0xa3, 0x04, 0x06, 0x78, 0x9f, 0x04, 0x10, 0x20, 0x09, - 0x01, 0x3b, 0x20, 0x0b, 0x04, 0x00, 0x78, 0x1b, 0x00, 0x02, 0x78, 0x3b, - 0x00, 0x1f, 0x78, 0x37, 0x00, 0x20, 0x78, 0x03, 0x16, 0x00, 0x01, 0x2e, - 0x00, 0x05, 0x20, 0x91, 0x26, 0x00, 0x78, 0x1c, 0xd0, 0xa4, 0x19, 0x0c, - 0x24, 0x06, 0x79, 0x00, 0xd1, 0xdc, 0x11, 0x18, 0x90, 0x84, 0x00, 0x06, - 0x00, 0x1a, 0x90, 0x84, 0x00, 0x0e, 0x00, 0x02, 0x23, 0x2e, 0x23, 0x26, - 0x80, 0x81, 0x23, 0x26, 0x23, 0x28, 0x23, 0x28, 0x23, 0x28, 0x23, 0x28, - 0x80, 0x67, 0x23, 0x26, 0x23, 0x2a, 0x23, 0x26, 0x23, 0x28, 0x23, 0x26, - 0x23, 0x28, 0x23, 0x26, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x31, 0x00, 0x20, - 0x08, 0x0c, 0x80, 0x67, 0x08, 0x0c, 0x80, 0x81, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0xf0, 0xa0, 0x79, 0x30, 0x91, 0x84, - 0x00, 0x03, 0x01, 0xc0, 0x20, 0x01, 0x19, 0xf7, 0x20, 0x04, 0x90, 0x05, - 0x01, 0x70, 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0xc5, 0x00, 0xc6, 0x20, 0x01, 0x19, 0xf7, 0x20, 0x64, 0x08, 0x0c, - 0xcc, 0xf3, 0x00, 0xce, 0x00, 0xf8, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, - 0x24, 0x09, 0x00, 0xd0, 0x91, 0x84, 0x00, 0x14, 0x01, 0xa0, 0x6a, 0x00, - 0x92, 0x86, 0x00, 0x03, 0x01, 0x60, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x38, - 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x08, 0x0c, 0x75, 0x63, - 0x00, 0x10, 0x08, 0x0c, 0x5f, 0xed, 0x08, 0x0c, 0x81, 0x30, 0x00, 0x41, - 0x00, 0x18, 0x91, 0x84, 0x95, 0x40, 0x1d, 0xc8, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, - 0x20, 0x71, 0x1a, 0x65, 0x08, 0x0c, 0x1a, 0xd9, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x2e, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x71, 0x28, 0x20, 0x01, 0x19, 0x6f, 0x21, 0x02, - 0x20, 0x01, 0x19, 0x77, 0x21, 0x02, 0x20, 0x01, 0x01, 0x3b, 0x21, 0x02, - 0x20, 0x79, 0x02, 0x00, 0x20, 0x01, 0x02, 0x01, 0x78, 0x9e, 0x78, 0xa3, - 0x02, 0x00, 0x91, 0x98, 0x00, 0x07, 0x83, 0x1c, 0x83, 0x1c, 0x83, 0x1c, - 0x93, 0x98, 0x00, 0x05, 0x23, 0x20, 0x91, 0x82, 0x02, 0x04, 0x12, 0x30, - 0x20, 0x11, 0x00, 0x08, 0x84, 0x23, 0x84, 0x23, 0x84, 0x23, 0x04, 0x88, - 0x91, 0x82, 0x02, 0x4c, 0x12, 0x40, 0x20, 0x11, 0x00, 0x07, 0x84, 0x03, - 0x80, 0x03, 0x94, 0x00, 0x94, 0x00, 0x94, 0x20, 0x04, 0x30, 0x91, 0x82, - 0x02, 0xbc, 0x12, 0x38, 0x20, 0x11, 0x00, 0x06, 0x84, 0x03, 0x80, 0x03, - 0x94, 0x00, 0x94, 0x20, 0x00, 0xe0, 0x91, 0x82, 0x03, 0x4c, 0x12, 0x30, - 0x20, 0x11, 0x00, 0x05, 0x84, 0x03, 0x80, 0x03, 0x94, 0x20, 0x00, 0x98, - 0x91, 0x82, 0x04, 0x2c, 0x12, 0x28, 0x20, 0x11, 0x00, 0x04, 0x84, 0x23, - 0x84, 0x23, 0x00, 0x58, 0x91, 0x82, 0x05, 0x9c, 0x12, 0x28, 0x20, 0x11, - 0x00, 0x03, 0x84, 0x03, 0x94, 0x20, 0x00, 0x18, 0x20, 0x11, 0x00, 0x02, - 0x84, 0x23, 0x94, 0x82, 0x02, 0x28, 0x80, 0x02, 0x80, 0x20, 0x83, 0x01, - 0x94, 0x02, 0x01, 0x10, 0x02, 0x08, 0x83, 0x21, 0x82, 0x17, 0x82, 0x03, - 0x94, 0x05, 0x78, 0x9a, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, - 0x20, 0x69, 0x02, 0x00, 0x68, 0x14, 0x90, 0x84, 0xff, 0xc0, 0x91, 0x0d, - 0x69, 0x16, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, - 0x02, 0x00, 0x90, 0x05, 0x68, 0x10, 0x01, 0x10, 0xc0, 0xa5, 0x00, 0x08, - 0xc0, 0xa4, 0x68, 0x12, 0x00, 0xde, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, - 0x20, 0x69, 0x02, 0x00, 0x68, 0x10, 0x90, 0x84, 0xff, 0xf8, 0x91, 0x0d, - 0x69, 0x12, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, 0x79, 0x38, 0x08, 0x0c, - 0x0d, 0xbe, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x79, 0x02, 0xa0, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x79, 0x02, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0x00, 0xfe, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, - 0x2c, 0x67, 0x08, 0x0c, 0x2b, 0x82, 0x60, 0x54, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x80, 0x04, 0x90, 0x84, 0x00, 0x0c, 0x61, 0x50, 0x91, 0x8c, - 0xff, 0xf3, 0x91, 0x05, 0x60, 0x52, 0x60, 0x50, 0x90, 0x84, 0xb1, 0x7f, - 0x90, 0x85, 0x20, 0x00, 0x60, 0x52, 0x20, 0x09, 0x19, 0x9d, 0x20, 0x11, - 0x19, 0x9e, 0x63, 0x58, 0x93, 0x9c, 0x38, 0xf0, 0x23, 0x20, 0x08, 0x0c, - 0x2b, 0xc6, 0x12, 0x38, 0x93, 0x9d, 0x40, 0x03, 0x94, 0xa5, 0x86, 0x03, - 0x23, 0x0a, 0x24, 0x12, 0x00, 0x30, 0x93, 0x9d, 0x02, 0x03, 0x94, 0xa5, - 0x86, 0x03, 0x23, 0x0a, 0x24, 0x12, 0x90, 0x06, 0x08, 0x0c, 0x2b, 0xb1, - 0x90, 0x06, 0x08, 0x0c, 0x2b, 0x94, 0x20, 0xa9, 0x00, 0x12, 0x1d, 0x04, - 0x24, 0x5b, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x24, 0x5b, 0x60, 0x2f, - 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0x60, 0x50, 0x90, 0x85, 0x04, 0x00, - 0x90, 0x84, 0xdf, 0xff, 0x60, 0x52, 0x60, 0x24, 0x60, 0x26, 0x08, 0x0c, - 0x28, 0xac, 0x20, 0x09, 0x00, 0xef, 0x61, 0x32, 0x61, 0x36, 0x08, 0x0c, - 0x28, 0xbc, 0x60, 0xe7, 0x00, 0x00, 0x61, 0xea, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x01, 0x00, 0x02, 0x11, 0x10, 0x20, 0x01, - 0x00, 0x08, 0x60, 0xe2, 0x60, 0x4b, 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x00, - 0x60, 0x2f, 0x00, 0x80, 0x60, 0x2f, 0x00, 0x00, 0x60, 0x07, 0x34, 0x9f, - 0x60, 0xbb, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x18, 0x60, 0xbf, 0x00, 0x00, - 0x1f, 0x04, 0x24, 0x90, 0x60, 0xbb, 0x00, 0x00, 0x60, 0xbf, 0x01, 0x08, - 0x60, 0xbf, 0x00, 0x12, 0x60, 0xbf, 0x04, 0x05, 0x60, 0xbf, 0x00, 0x14, - 0x60, 0xbf, 0x03, 0x20, 0x60, 0xbf, 0x00, 0x18, 0x60, 0x1b, 0x00, 0xf0, - 0x60, 0x1f, 0x00, 0x1e, 0x60, 0x0f, 0x00, 0x6b, 0x60, 0x2b, 0x40, 0x2f, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x40, 0x78, 0xc3, - 0x00, 0x80, 0x78, 0xc3, 0x00, 0x83, 0x78, 0xc3, 0x00, 0x00, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x35, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x18, 0x34, 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x61, 0x24, 0x00, 0x66, - 0x20, 0x31, 0x18, 0x37, 0x26, 0x34, 0x96, 0xb4, 0x00, 0x28, 0x00, 0x6e, - 0x11, 0x38, 0x60, 0x20, 0xd1, 0xbc, 0x01, 0x20, 0xd0, 0xbc, 0x11, 0x68, - 0xd0, 0xb4, 0x11, 0x98, 0x91, 0x84, 0x5e, 0x2c, 0x11, 0x18, 0x91, 0x84, - 0x00, 0x07, 0x00, 0xaa, 0x91, 0x95, 0x00, 0x04, 0x92, 0x84, 0x00, 0x07, - 0x00, 0x82, 0x00, 0x16, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, 0xd1, 0x84, - 0x00, 0x1e, 0x0d, 0x70, 0x0c, 0x98, 0x00, 0x16, 0x20, 0x01, 0x18, 0x8b, - 0x20, 0x0c, 0xd1, 0x94, 0x00, 0x1e, 0x0d, 0x30, 0x0c, 0x58, 0x25, 0x13, - 0x24, 0xf9, 0x24, 0xfc, 0x24, 0xff, 0x25, 0x04, 0x25, 0x06, 0x25, 0x0a, - 0x25, 0x0e, 0x08, 0x0c, 0x93, 0xe2, 0x00, 0xb8, 0x08, 0x0c, 0x94, 0xb1, - 0x00, 0xa0, 0x08, 0x0c, 0x94, 0xb1, 0x08, 0x0c, 0x93, 0xe2, 0x00, 0x78, - 0x00, 0x99, 0x00, 0x68, 0x08, 0x0c, 0x93, 0xe2, 0x00, 0x79, 0x00, 0x48, - 0x08, 0x0c, 0x94, 0xb1, 0x00, 0x59, 0x00, 0x28, 0x08, 0x0c, 0x94, 0xb1, - 0x08, 0x0c, 0x93, 0xe2, 0x00, 0x29, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xa6, 0x61, 0x24, 0x60, 0x28, 0xd0, 0x9c, - 0x01, 0x18, 0xd1, 0x9c, 0x19, 0x04, 0x27, 0x84, 0xd1, 0xf4, 0x19, 0x0c, - 0x0d, 0xbe, 0x08, 0x0c, 0x76, 0x37, 0x09, 0x04, 0x25, 0x6e, 0x08, 0x0c, - 0xd7, 0xe3, 0x11, 0x20, 0x70, 0x00, 0x90, 0x86, 0x00, 0x03, 0x05, 0x70, - 0x60, 0x24, 0x90, 0x84, 0x18, 0x00, 0x05, 0x50, 0x08, 0x0c, 0x76, 0x5a, - 0x01, 0x18, 0x08, 0x0c, 0x76, 0x48, 0x15, 0x20, 0x60, 0x27, 0x00, 0x20, - 0x60, 0x43, 0x00, 0x00, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x68, 0x08, 0x0c, - 0x76, 0x5a, 0x11, 0x50, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x01, - 0x60, 0x27, 0x18, 0x00, 0x08, 0x0c, 0x74, 0xb2, 0x08, 0x04, 0x27, 0x87, - 0x70, 0xa4, 0x90, 0x05, 0x11, 0x50, 0x70, 0xa7, 0x00, 0x01, 0x00, 0xd6, - 0x20, 0x69, 0x01, 0x40, 0x08, 0x0c, 0x76, 0x8b, 0x00, 0xde, 0x19, 0x04, - 0x27, 0x87, 0x08, 0x0c, 0x79, 0x3c, 0x04, 0x28, 0x08, 0x0c, 0x76, 0x5a, - 0x15, 0x90, 0x60, 0x24, 0x90, 0x84, 0x18, 0x00, 0x11, 0x08, 0x04, 0x68, - 0x08, 0x0c, 0x79, 0x3c, 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, - 0x08, 0x0c, 0x75, 0x63, 0x08, 0x04, 0x27, 0x84, 0xd1, 0xac, 0x15, 0x08, - 0x60, 0x24, 0xd0, 0xdc, 0x11, 0x70, 0xd0, 0xe4, 0x11, 0x78, 0xd0, 0xd4, - 0x11, 0x90, 0xd0, 0xcc, 0x01, 0x30, 0x70, 0x98, 0x90, 0x86, 0x00, 0x29, - 0x11, 0x10, 0x08, 0x0c, 0x78, 0x18, 0x08, 0x04, 0x27, 0x84, 0x08, 0x0c, - 0x79, 0x37, 0x00, 0x48, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, 0x00, 0x02, - 0x00, 0x20, 0x08, 0x0c, 0x77, 0x74, 0x08, 0x04, 0x27, 0x84, 0x08, 0x0c, - 0x78, 0xba, 0x08, 0x04, 0x27, 0x84, 0x62, 0x20, 0xd1, 0xbc, 0x01, 0x38, - 0xd2, 0xbc, 0x19, 0x04, 0x27, 0xe1, 0xd2, 0xb4, 0x19, 0x04, 0x27, 0xf4, - 0x00, 0x00, 0xd1, 0xac, 0x09, 0x04, 0x26, 0x99, 0x00, 0x36, 0x63, 0x28, - 0xc3, 0xbc, 0x63, 0x2a, 0x00, 0x3e, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xc0, - 0x60, 0x27, 0x00, 0x20, 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, 0x08, 0x0c, - 0x76, 0x51, 0x11, 0x58, 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, - 0x08, 0x0c, 0x75, 0x63, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0xae, - 0x00, 0x05, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x08, 0x0c, 0x76, 0x0f, - 0x00, 0x16, 0x00, 0x46, 0x00, 0xc6, 0x64, 0x4c, 0x94, 0x86, 0xf0, 0xf0, - 0x11, 0x38, 0x20, 0x61, 0x01, 0x00, 0x64, 0x4a, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x74, 0xda, 0x94, 0x8c, 0xff, 0x00, 0x70, 0x38, - 0xd0, 0x84, 0x01, 0x90, 0x08, 0x0c, 0xd7, 0xe3, 0x11, 0x18, 0x91, 0x86, - 0xf8, 0x00, 0x11, 0x60, 0x70, 0x48, 0xd0, 0x84, 0x11, 0x48, 0xc0, 0x85, - 0x70, 0x4a, 0x00, 0x36, 0x24, 0x18, 0x20, 0x11, 0x80, 0x16, 0x08, 0x0c, - 0x4c, 0x44, 0x00, 0x3e, 0x08, 0x0c, 0xd7, 0xdc, 0x19, 0x04, 0x26, 0x76, - 0x91, 0x96, 0xff, 0x00, 0x05, 0xa8, 0x70, 0x60, 0x90, 0x84, 0x00, 0xff, - 0x81, 0x0f, 0x81, 0xff, 0x01, 0x10, 0x91, 0x16, 0x05, 0x68, 0x71, 0x30, - 0xd1, 0x84, 0x15, 0x50, 0x08, 0x0c, 0x33, 0xaa, 0x01, 0x28, 0xc1, 0x8d, - 0x71, 0x32, 0x08, 0x0c, 0x6a, 0x9b, 0x15, 0x10, 0x62, 0x40, 0x92, 0x94, - 0x00, 0x10, 0x01, 0x30, 0x62, 0x48, 0x92, 0x94, 0xff, 0x00, 0x92, 0x96, - 0xff, 0x00, 0x01, 0xc0, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, 0x26, 0x76, - 0x70, 0x38, 0xd0, 0x8c, 0x11, 0x40, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0xd1, 0xac, 0x19, 0x04, 0x26, 0x76, 0xc1, 0xad, 0x21, 0x02, 0x00, 0x36, - 0x73, 0xd8, 0x20, 0x11, 0x80, 0x13, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x3e, - 0x08, 0x04, 0x26, 0x76, 0x70, 0x38, 0xd0, 0x8c, 0x11, 0x40, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xd1, 0xac, 0x19, 0x04, 0x26, 0x76, 0xc1, 0xad, - 0x21, 0x02, 0x00, 0x36, 0x73, 0xd8, 0x20, 0x11, 0x80, 0x13, 0x08, 0x0c, - 0x4c, 0x44, 0x00, 0x3e, 0x71, 0x30, 0xc1, 0x85, 0x71, 0x32, 0x20, 0x11, - 0x18, 0x48, 0x22, 0x0c, 0xd1, 0xa4, 0x01, 0xf0, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x01, 0x20, 0x11, 0x01, 0x00, 0x08, 0x0c, 0x8a, 0x50, 0x20, 0x19, - 0x00, 0x0e, 0x00, 0xc6, 0x20, 0x61, 0x00, 0x00, 0x08, 0x0c, 0xeb, 0xa1, - 0x00, 0xce, 0x94, 0x84, 0x00, 0xff, 0x90, 0x80, 0x33, 0xb6, 0x20, 0x0d, - 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x21, 0x20, 0x90, 0x06, 0x20, 0x09, - 0x00, 0x0e, 0x08, 0x0c, 0xec, 0x31, 0x00, 0x1e, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x32, 0x1b, 0x00, 0x1e, - 0x00, 0xa8, 0x01, 0x56, 0x00, 0xb6, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, - 0x08, 0x0c, 0x67, 0x24, 0x11, 0x40, 0x70, 0x30, 0xd0, 0x84, 0x11, 0x18, - 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0x10, 0x08, 0x0c, 0x61, 0x48, 0x81, 0x08, - 0x1f, 0x04, 0x26, 0x66, 0x00, 0xbe, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x4e, - 0x08, 0x0c, 0xb2, 0x44, 0x60, 0xe3, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x01, - 0x18, 0x00, 0x20, 0x14, 0x92, 0x96, 0x00, 0x04, 0x11, 0x70, 0xd1, 0x9c, - 0x11, 0xa0, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x14, 0xd2, 0x9c, 0x11, 0x20, - 0x62, 0x04, 0x92, 0x95, 0x00, 0x02, 0x62, 0x06, 0x62, 0x28, 0xc2, 0x9d, - 0x62, 0x2a, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0x18, 0x26, 0x20, 0x03, - 0x00, 0x00, 0x60, 0x27, 0x00, 0x20, 0xd1, 0x94, 0x09, 0x04, 0x27, 0x84, - 0x00, 0x16, 0x62, 0x20, 0xd2, 0xb4, 0x09, 0x04, 0x27, 0x21, 0x08, 0x0c, - 0x88, 0xc3, 0x08, 0x0c, 0xa6, 0xe9, 0x60, 0x27, 0x00, 0x04, 0x00, 0xf6, - 0x20, 0x19, 0x19, 0xf1, 0x23, 0x04, 0x90, 0x7d, 0x09, 0x04, 0x26, 0xf0, - 0x78, 0x04, 0x90, 0x86, 0x00, 0x32, 0x15, 0xf0, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0xe6, 0x00, 0x96, 0x20, 0x69, 0x01, 0x40, 0x78, 0x2c, 0x68, 0x5e, - 0x78, 0x08, 0x68, 0x5a, 0x60, 0x43, 0x00, 0x02, 0x20, 0x01, 0x00, 0x03, - 0x80, 0x01, 0x1d, 0xf0, 0x60, 0x43, 0x00, 0x00, 0x20, 0x01, 0x00, 0x3c, - 0x80, 0x01, 0x1d, 0xf0, 0x08, 0x0c, 0x2d, 0x49, 0x20, 0x01, 0x00, 0x1e, - 0x80, 0x01, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x09, 0x08, 0x0c, 0x2c, 0x42, - 0x69, 0x04, 0xd1, 0xdc, 0x11, 0x40, 0x0c, 0xb0, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0x9a, 0xb1, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x67, - 0x01, 0x03, 0x2f, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0xee, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xfe, 0x00, 0x1e, 0x00, 0xae, 0x00, 0x05, - 0x00, 0xfe, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, 0x90, 0x84, - 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2d, 0x49, 0x00, 0xde, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0xe8, 0x60, 0x28, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x20, - 0x90, 0x9a, 0x00, 0x03, 0x12, 0x58, 0x00, 0x18, 0x90, 0x9a, 0x00, 0xc8, - 0x12, 0x38, 0x80, 0x00, 0x60, 0x2a, 0x00, 0xce, 0x08, 0x0c, 0xa6, 0xc5, - 0x08, 0x04, 0x27, 0x83, 0x20, 0x61, 0x01, 0x00, 0x62, 0xc0, 0x08, 0x0c, - 0xb0, 0xca, 0x20, 0x19, 0x19, 0xf1, 0x23, 0x04, 0x90, 0x65, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x27, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, 0x08, 0x04, - 0x27, 0x83, 0xd2, 0xbc, 0x09, 0x04, 0x27, 0x6a, 0x08, 0x0c, 0x88, 0xd0, - 0x60, 0x14, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x10, 0x60, 0x16, - 0x60, 0x27, 0x00, 0x04, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, - 0x90, 0x84, 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2d, 0x49, 0x00, 0xde, - 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, 0x60, 0x44, 0x08, 0x0c, 0xd7, 0xe3, - 0x01, 0x20, 0x90, 0x9a, 0x00, 0x03, 0x16, 0x58, 0x00, 0x18, 0x90, 0x9a, - 0x00, 0xc8, 0x16, 0x38, 0x80, 0x00, 0x60, 0x46, 0x60, 0x3c, 0x00, 0xce, - 0x90, 0x05, 0x05, 0xb8, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x88, 0xc8, - 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x86, 0x00, 0x06, 0x11, 0x38, - 0x61, 0x14, 0x91, 0x8c, 0x19, 0x84, 0x91, 0x8d, 0x00, 0x12, 0x61, 0x16, - 0x04, 0x30, 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x86, 0x00, 0x09, - 0x0d, 0x98, 0x61, 0x14, 0x91, 0x8c, 0x19, 0x84, 0x91, 0x8d, 0x00, 0x16, - 0x61, 0x16, 0x00, 0xc8, 0x60, 0x27, 0x00, 0x04, 0x00, 0xb0, 0x00, 0x36, - 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xaa, 0x49, 0x00, 0x3e, 0x20, 0x19, - 0x19, 0xf7, 0x23, 0x04, 0x90, 0x65, 0x01, 0x50, 0x20, 0x09, 0x00, 0x4f, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x10, 0x20, 0x09, 0x00, 0x4f, - 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, 0x00, 0x1e, 0xd1, 0x9c, 0x09, 0x04, - 0x27, 0xdc, 0x70, 0x38, 0xd0, 0xac, 0x15, 0x38, 0x00, 0x16, 0x01, 0x56, - 0x60, 0x27, 0x00, 0x08, 0x08, 0x0c, 0x2d, 0x73, 0x20, 0xa9, 0x00, 0x28, - 0xa0, 0x01, 0x1f, 0x04, 0x27, 0x92, 0x61, 0x50, 0x91, 0x85, 0x14, 0x00, - 0x60, 0x52, 0x20, 0xa9, 0x03, 0x66, 0x1d, 0x04, 0x27, 0x9b, 0x08, 0x0c, - 0x88, 0xf7, 0x60, 0x20, 0xd0, 0x9c, 0x11, 0x30, 0x01, 0x5e, 0x61, 0x52, - 0x00, 0x1e, 0x60, 0x27, 0x00, 0x08, 0x04, 0xa0, 0x08, 0x0c, 0x2c, 0x29, - 0x1f, 0x04, 0x27, 0x9b, 0x01, 0x5e, 0x61, 0x52, 0x00, 0x1e, 0x60, 0x27, - 0x00, 0x08, 0x00, 0x16, 0x60, 0x28, 0xc0, 0x9c, 0x60, 0x2a, 0x08, 0x0c, - 0xb2, 0x44, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xf0, 0x7f, 0x08, 0x0c, - 0xf0, 0x9a, 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xfc, 0x11, 0x38, 0x08, 0x0c, - 0xd7, 0xdc, 0x11, 0x20, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x76, 0x7b, - 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, - 0x2c, 0x67, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x03, 0x00, 0x04, - 0x08, 0x0c, 0x0e, 0xa3, 0x00, 0xee, 0x60, 0x27, 0x00, 0x08, 0x08, 0x0c, - 0x0b, 0xa0, 0x00, 0x1e, 0x91, 0x8c, 0xff, 0xd0, 0x61, 0x26, 0x00, 0xae, - 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, 0xd1, 0x84, - 0x00, 0x1e, 0x09, 0x04, 0x25, 0x9b, 0x00, 0x16, 0x20, 0x09, 0x27, 0xed, - 0x00, 0xd0, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, 0xc1, 0x84, 0x21, 0x02, - 0x00, 0x1e, 0x0c, 0x40, 0x00, 0x16, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, - 0xd1, 0x94, 0x00, 0x1e, 0x09, 0x04, 0x25, 0x9b, 0x00, 0x16, 0x20, 0x09, - 0x28, 0x00, 0x00, 0x38, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, 0xc1, 0x94, - 0x21, 0x02, 0x00, 0x1e, 0x08, 0xa8, 0x60, 0x28, 0xc0, 0xbc, 0x60, 0x2a, - 0x20, 0x01, 0x01, 0x56, 0x20, 0x03, 0xbc, 0x91, 0x80, 0x00, 0x20, 0x03, - 0xff, 0xff, 0x60, 0x43, 0x00, 0x01, 0x08, 0x0c, 0x2c, 0x61, 0x60, 0x27, - 0x00, 0x80, 0x60, 0x17, 0x00, 0x00, 0x60, 0x43, 0x00, 0x00, 0x08, 0x17, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, 0x00, 0xf6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x00, 0x71, 0xd0, - 0x70, 0xd2, 0x91, 0x16, 0x09, 0x04, 0x28, 0x6b, 0x81, 0xff, 0x01, 0xa0, - 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2c, 0x67, 0x20, 0x11, 0x80, 0x11, - 0x20, 0x19, 0x01, 0x0e, 0x23, 0x1c, 0x93, 0x9e, 0x00, 0x07, 0x11, 0x18, - 0x20, 0x19, 0x00, 0x01, 0x00, 0x10, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, - 0x4c, 0x44, 0x04, 0x48, 0x20, 0x01, 0x19, 0xa9, 0x20, 0x0c, 0x81, 0xff, - 0x11, 0x40, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0xb4, 0x01, 0x18, - 0x20, 0x19, 0x00, 0x03, 0x00, 0x08, 0x21, 0x18, 0x20, 0x11, 0x80, 0x12, - 0x08, 0x0c, 0x4c, 0x44, 0x08, 0x0c, 0x0e, 0xa3, 0x08, 0x0c, 0x57, 0xd9, - 0xd0, 0xfc, 0x11, 0x88, 0x08, 0x0c, 0xd7, 0xdc, 0x11, 0x70, 0x00, 0xc6, - 0x08, 0x0c, 0x29, 0x07, 0x08, 0x0c, 0xa9, 0xb0, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x19, 0x00, 0x28, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0x32, 0x1b, - 0x00, 0xce, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x28, 0x91, 0x8c, 0x00, 0xff, - 0x21, 0x30, 0x90, 0x94, 0xff, 0x00, 0x11, 0xf0, 0x20, 0x11, 0x18, 0x37, - 0x22, 0x14, 0xd2, 0xac, 0x11, 0xc8, 0x81, 0xff, 0x01, 0xe8, 0x20, 0x11, - 0x18, 0x1f, 0x22, 0x04, 0x91, 0x06, 0x11, 0x90, 0x20, 0x11, 0x18, 0x20, - 0x22, 0x14, 0x92, 0x94, 0xff, 0x00, 0x95, 0x84, 0xff, 0x00, 0x92, 0x06, - 0x11, 0x48, 0x20, 0x11, 0x18, 0x20, 0x22, 0x14, 0x92, 0x94, 0x00, 0xff, - 0x95, 0x84, 0x00, 0xff, 0x92, 0x06, 0x11, 0x20, 0x25, 0x00, 0x08, 0x0c, - 0x83, 0xa5, 0x00, 0x48, 0x95, 0x84, 0x00, 0xff, 0x90, 0x80, 0x33, 0xb6, - 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x90, 0x06, 0x00, 0x05, - 0x90, 0x80, 0x33, 0xb6, 0x20, 0x0d, 0x91, 0x8c, 0x00, 0xff, 0x00, 0x05, - 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x18, 0x18, 0x20, 0x03, - 0x00, 0xef, 0x20, 0xa9, 0x00, 0x10, 0x90, 0x06, 0x68, 0x52, 0x68, 0x56, - 0x1f, 0x04, 0x28, 0xb7, 0x00, 0xde, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, - 0x00, 0x26, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x18, 0x18, 0x21, 0x02, - 0x81, 0x14, 0x82, 0x14, 0x82, 0x14, 0x82, 0x14, 0x20, 0xa9, 0x00, 0x10, - 0x68, 0x53, 0x00, 0x00, 0x90, 0x06, 0x82, 0xff, 0x11, 0x28, 0x91, 0x84, - 0x00, 0x0f, 0x90, 0x80, 0xf8, 0x80, 0x20, 0x05, 0x68, 0x56, 0x82, 0x11, - 0x1f, 0x04, 0x28, 0xcc, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0xc6, 0x20, 0x61, 0x18, 0x00, 0x60, 0x30, 0x01, 0x10, 0xc0, 0x9d, - 0x00, 0x08, 0xc0, 0x9c, 0x60, 0x32, 0x00, 0xce, 0x00, 0x05, 0x01, 0x56, - 0x00, 0xd6, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x69, 0x01, 0x40, - 0x69, 0x80, 0x91, 0x16, 0x01, 0x80, 0x91, 0x12, 0x12, 0x30, 0x82, 0x12, - 0x82, 0x10, 0x22, 0xa8, 0x20, 0x01, 0x04, 0x02, 0x00, 0x18, 0x22, 0xa8, - 0x20, 0x01, 0x04, 0x04, 0x68, 0x0e, 0x1f, 0x04, 0x28, 0xfc, 0x68, 0x0f, - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xde, 0x01, 0x5e, - 0x00, 0x05, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xc4, 0x01, 0x50, 0xd0, 0xa4, - 0x01, 0x40, 0x90, 0x06, 0x00, 0x46, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2e, - 0x08, 0x0c, 0xec, 0x31, 0x00, 0x4e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0x16, - 0x00, 0x26, 0x20, 0x79, 0x01, 0x40, 0x78, 0xc4, 0xd0, 0xdc, 0x09, 0x04, - 0x29, 0x73, 0x08, 0x0c, 0x2b, 0xc6, 0x06, 0x60, 0x90, 0x84, 0x07, 0x00, - 0x90, 0x8e, 0x06, 0x00, 0x11, 0x20, 0x20, 0x11, 0x40, 0x00, 0x90, 0x0e, - 0x04, 0x58, 0x90, 0x8e, 0x05, 0x00, 0x11, 0x20, 0x20, 0x11, 0x80, 0x00, - 0x90, 0x0e, 0x04, 0x20, 0x90, 0x8e, 0x04, 0x00, 0x11, 0x20, 0x90, 0x16, - 0x20, 0x09, 0x00, 0x01, 0x00, 0xe8, 0x90, 0x8e, 0x03, 0x00, 0x11, 0x20, - 0x90, 0x16, 0x20, 0x09, 0x00, 0x02, 0x00, 0xb0, 0x90, 0x8e, 0x02, 0x00, - 0x11, 0x20, 0x90, 0x16, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, 0x90, 0x8e, - 0x01, 0x00, 0x15, 0x48, 0x90, 0x16, 0x20, 0x09, 0x00, 0x08, 0x00, 0x40, - 0x90, 0x84, 0x07, 0x00, 0x90, 0x8e, 0x03, 0x00, 0x15, 0x00, 0x20, 0x11, - 0x00, 0x30, 0x00, 0x58, 0x23, 0x00, 0x90, 0x80, 0x00, 0x20, 0x20, 0x18, - 0x08, 0x0c, 0x93, 0x75, 0x92, 0x8c, 0xff, 0x00, 0x01, 0x10, 0x20, 0x11, - 0x00, 0xff, 0x22, 0x00, 0x80, 0x07, 0x90, 0x85, 0x00, 0x4c, 0x78, 0xc2, - 0x20, 0x09, 0x01, 0x38, 0x22, 0x0a, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x18, - 0x20, 0x09, 0x19, 0x6d, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xfe, - 0x00, 0x05, 0x78, 0xc3, 0x00, 0x00, 0x0c, 0xc8, 0x01, 0x26, 0x20, 0x91, - 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x20, 0x01, 0x01, 0x70, - 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, 0x91, 0x84, 0x00, 0x03, 0x01, 0x10, - 0x08, 0x0c, 0x0d, 0xbe, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x18, - 0x20, 0x09, 0x00, 0x02, 0x00, 0x05, 0x20, 0x01, 0x01, 0x71, 0x20, 0x04, - 0xd0, 0xdc, 0x01, 0x68, 0x20, 0x01, 0x01, 0x70, 0x20, 0x0c, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x8e, 0x00, 0x4c, 0x11, 0x28, 0x20, 0x0c, 0x91, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x00, 0x05, 0x90, 0x0e, 0x20, 0x01, 0x02, 0x27, - 0x20, 0x04, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, 0x91, 0x08, - 0x20, 0x01, 0x02, 0x26, 0x20, 0x04, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, - 0x80, 0x04, 0x91, 0x08, 0x00, 0x05, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x18, - 0x00, 0x20, 0x10, 0x00, 0x08, 0x00, 0x10, 0x00, 0x18, 0x00, 0x01, 0x56, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x01, 0x19, 0x90, - 0x20, 0x04, 0x90, 0x8a, 0x00, 0x07, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x33, - 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x5e, 0x00, 0x05, - 0x29, 0xd9, 0x29, 0xf7, 0x2a, 0x1b, 0x2a, 0x1d, 0x2a, 0x46, 0x2a, 0x48, - 0x2a, 0x4a, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x08, 0x0c, - 0x2c, 0x24, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x00, 0x78, 0x28, - 0x90, 0x84, 0xe1, 0xd7, 0x78, 0x2a, 0x90, 0x06, 0x20, 0xa9, 0x00, 0x09, - 0x08, 0x0c, 0x2b, 0xe2, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x1e, 0x20, 0x11, 0x2a, 0x4b, 0x08, 0x0c, 0x88, 0xd5, - 0x00, 0x05, 0x20, 0x09, 0x19, 0x95, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, - 0x19, 0x9a, 0x20, 0x03, 0x00, 0x36, 0x20, 0x01, 0x19, 0x99, 0x20, 0x03, - 0x00, 0x2a, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x01, 0x90, 0x06, - 0x08, 0x0c, 0x2b, 0x94, 0x20, 0x01, 0xff, 0xff, 0x20, 0xa9, 0x00, 0x09, - 0x08, 0x0c, 0x2b, 0xe2, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x1e, 0x20, 0x11, 0x2a, 0x4b, 0x08, 0x0c, 0x88, 0xd5, - 0x00, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x01, 0x19, 0x9a, 0x20, 0x03, - 0x00, 0x36, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x03, 0x7a, 0x38, - 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x04, 0x01, 0x10, 0x90, 0x06, - 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x2b, 0x94, 0x20, 0x01, - 0x19, 0x96, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0xff, 0xff, 0x20, 0xa9, - 0x00, 0x09, 0x08, 0x0c, 0x2b, 0xe2, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, - 0x00, 0x06, 0x20, 0x09, 0x00, 0x1e, 0x20, 0x11, 0x2a, 0x4b, 0x08, 0x0c, - 0x88, 0xd5, 0x00, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x0d, 0xc5, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x00, 0xf6, - 0x01, 0x56, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x01, 0x00, - 0x20, 0x01, 0x19, 0x92, 0x20, 0x04, 0x90, 0x8a, 0x00, 0x07, 0x1a, 0x0c, - 0x0d, 0xc5, 0x00, 0x43, 0x01, 0x2e, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x2a, 0x6d, 0x2a, 0x89, - 0x2a, 0xc5, 0x2a, 0xf1, 0x2b, 0x11, 0x2b, 0x1d, 0x2b, 0x1f, 0x08, 0x0c, - 0x2b, 0xd6, 0x11, 0x90, 0x20, 0x09, 0x19, 0x98, 0x21, 0x04, 0x7a, 0x38, - 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x04, 0x01, 0x10, 0xc0, 0x8d, - 0x00, 0x08, 0xc0, 0x85, 0x20, 0x0a, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, - 0x00, 0x01, 0x00, 0x30, 0x08, 0x0c, 0x2b, 0x43, 0x20, 0x01, 0xff, 0xff, - 0x08, 0x0c, 0x29, 0xe8, 0x00, 0x05, 0x08, 0x0c, 0x2b, 0x21, 0x05, 0xc0, - 0x20, 0x09, 0x19, 0x99, 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x08, 0x0c, - 0x2b, 0xd6, 0x11, 0x58, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, - 0x00, 0x05, 0x05, 0x18, 0x20, 0x09, 0x19, 0x98, 0x21, 0x04, 0xc0, 0x85, - 0x20, 0x0a, 0x20, 0x09, 0x19, 0x95, 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, - 0x90, 0x86, 0x00, 0x05, 0x01, 0x18, 0x08, 0x0c, 0x2b, 0x29, 0x00, 0xc0, - 0x20, 0x0b, 0x00, 0x00, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, - 0x00, 0x04, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x2b, 0xb1, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x02, - 0x00, 0x28, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x03, 0x00, 0x10, - 0x08, 0x0c, 0x2a, 0x0a, 0x00, 0x05, 0x08, 0x0c, 0x2b, 0x21, 0x05, 0x40, - 0x20, 0x09, 0x19, 0x99, 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x08, 0x0c, - 0x2b, 0xd6, 0x11, 0x48, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x03, - 0x20, 0x01, 0x19, 0x91, 0x20, 0x03, 0x00, 0x00, 0x00, 0xb8, 0x20, 0x09, - 0x19, 0x99, 0x21, 0x04, 0x90, 0x05, 0x11, 0x18, 0x08, 0x0c, 0x2b, 0x66, - 0x00, 0x10, 0x08, 0x0c, 0x2b, 0x36, 0x08, 0x0c, 0x2b, 0x29, 0x20, 0x09, - 0x19, 0x95, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x2a, 0x0a, 0x00, 0x00, 0x00, 0x05, 0x04, 0x79, - 0x01, 0xe8, 0x08, 0x0c, 0x2b, 0xd6, 0x11, 0x98, 0x20, 0x09, 0x19, 0x96, - 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, 0x90, 0x86, 0x00, 0x07, 0x01, 0x08, - 0x00, 0x78, 0x20, 0x01, 0x19, 0x9b, 0x20, 0x03, 0x00, 0x0a, 0x20, 0x09, - 0x19, 0x98, 0x21, 0x04, 0xc0, 0xfd, 0x20, 0x0a, 0x00, 0x38, 0x00, 0xf9, - 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x2a, 0x35, - 0x00, 0x05, 0x00, 0x79, 0x01, 0x48, 0x08, 0x0c, 0x2b, 0xd6, 0x11, 0x18, - 0x08, 0x0c, 0x2a, 0x21, 0x00, 0x18, 0x00, 0x79, 0x08, 0x0c, 0x2a, 0x35, - 0x00, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x09, - 0x19, 0x9a, 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x09, 0x0c, 0x2b, 0x82, - 0x00, 0x05, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x05, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x2b, 0xb1, 0x00, 0x05, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, - 0x00, 0x06, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x2b, 0x94, 0x00, 0x05, 0x20, 0x09, 0x19, 0x95, 0x21, 0x04, - 0x80, 0x00, 0x20, 0x0a, 0x90, 0x86, 0x00, 0x05, 0x01, 0x08, 0x00, 0x68, - 0x20, 0x0b, 0x00, 0x00, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, - 0x00, 0x06, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, - 0x04, 0xd9, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x05, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x2b, 0xb1, 0x00, 0x05, 0x00, 0x86, 0x20, 0x01, 0x19, 0x98, 0x20, 0x04, - 0x90, 0x84, 0x7f, 0xff, 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x09, 0x19, 0x97, - 0x21, 0x44, 0x88, 0x46, 0x28, 0x0a, 0x98, 0x44, 0x0d, 0xd8, 0xd0, 0x8c, - 0x11, 0x20, 0xd0, 0x84, 0x11, 0x20, 0x08, 0x0c, 0x0d, 0xc5, 0x90, 0x06, - 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x00, 0xa1, 0x00, 0x8e, 0x00, 0x05, - 0x00, 0x06, 0x01, 0x56, 0x20, 0x01, 0x19, 0x90, 0x20, 0xa9, 0x00, 0x09, - 0x20, 0x03, 0x00, 0x00, 0x80, 0x00, 0x1f, 0x04, 0x2b, 0x88, 0x20, 0x01, - 0x19, 0x97, 0x20, 0x03, 0x80, 0x00, 0x01, 0x5e, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x90, 0x85, 0x00, 0x00, 0x01, 0x58, - 0x78, 0x38, 0x90, 0x84, 0xff, 0xf9, 0x90, 0x85, 0x00, 0x04, 0x78, 0x3a, - 0x20, 0x09, 0x19, 0x9d, 0x21, 0x0c, 0x79, 0x5a, 0x00, 0x50, 0x78, 0x38, - 0x90, 0x84, 0xff, 0xfb, 0x90, 0x85, 0x00, 0x06, 0x78, 0x3a, 0x20, 0x09, - 0x19, 0x9e, 0x21, 0x0c, 0x79, 0x5a, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x90, 0x85, 0x00, 0x00, 0x01, 0x38, 0x78, 0x38, - 0x90, 0x84, 0xff, 0xfa, 0x90, 0x85, 0x00, 0x04, 0x78, 0x3a, 0x00, 0x30, - 0x78, 0x38, 0x90, 0x84, 0xff, 0xfb, 0x90, 0x85, 0x00, 0x05, 0x78, 0x3a, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, - 0x90, 0x82, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, - 0x01, 0x00, 0x20, 0x04, 0x90, 0x82, 0x00, 0x09, 0x00, 0x0e, 0x00, 0x05, - 0x01, 0x56, 0x20, 0xa9, 0x00, 0x64, 0x78, 0x20, 0x08, 0x0c, 0x2c, 0x61, - 0xd0, 0x9c, 0x11, 0x10, 0x1f, 0x04, 0x2b, 0xd9, 0x01, 0x5e, 0x00, 0x05, - 0x01, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x91, 0x80, 0x00, 0x78, 0x50, - 0x90, 0x85, 0x00, 0x40, 0x78, 0x52, 0x78, 0x50, 0x90, 0x84, 0xfb, 0xcf, - 0x78, 0x52, 0x08, 0x0c, 0x2c, 0x61, 0x90, 0x85, 0x20, 0x00, 0x78, 0x52, - 0x00, 0x0e, 0x20, 0x08, 0x91, 0x86, 0x00, 0x00, 0x11, 0x18, 0x78, 0x3b, - 0x00, 0x07, 0x00, 0x90, 0x91, 0x86, 0x00, 0x01, 0x11, 0x18, 0x78, 0x3b, - 0x00, 0x06, 0x00, 0x60, 0x91, 0x86, 0x00, 0x02, 0x11, 0x18, 0x78, 0x3b, - 0x00, 0x05, 0x00, 0x30, 0x91, 0x86, 0x00, 0x03, 0x11, 0x18, 0x78, 0x3b, - 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x1d, 0x04, 0x2c, 0x0f, 0x08, 0x0c, - 0x88, 0xf7, 0x1f, 0x04, 0x2c, 0x0f, 0x78, 0x50, 0x90, 0x85, 0x04, 0x00, - 0x90, 0x84, 0xdf, 0xbf, 0x78, 0x52, 0x08, 0x0c, 0x2c, 0x61, 0x90, 0x85, - 0x10, 0x00, 0x78, 0x52, 0x00, 0x0e, 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, - 0x78, 0x50, 0x90, 0x84, 0xff, 0xcf, 0x78, 0x52, 0x00, 0x05, 0x00, 0x06, - 0x01, 0x56, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0xa9, 0x00, 0x0a, - 0x78, 0x54, 0xd0, 0xac, 0x11, 0x30, 0x78, 0x20, 0xd0, 0xe4, 0x11, 0x40, - 0x1f, 0x04, 0x2c, 0x33, 0x00, 0x28, 0x78, 0x54, 0xd0, 0x8c, 0x11, 0x10, - 0x1f, 0x04, 0x2c, 0x39, 0x00, 0xfe, 0x01, 0x5e, 0x00, 0x0e, 0x00, 0x05, - 0x1d, 0x04, 0x2c, 0x42, 0x08, 0x0c, 0x88, 0xf7, 0x1f, 0x04, 0x2c, 0x42, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x9c, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x9c, - 0x20, 0x04, 0x90, 0x86, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x19, 0x9c, 0x20, 0x04, 0x90, 0x86, 0x00, 0x02, 0x00, 0x0e, - 0x00, 0x05, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0xa9, 0x21, 0x02, 0x00, 0x0e, - 0x00, 0x05, 0x20, 0x09, 0x01, 0x71, 0x21, 0x04, 0xd0, 0xdc, 0x01, 0x40, - 0x20, 0x09, 0x01, 0x70, 0x21, 0x04, 0x20, 0x0b, 0x00, 0x80, 0xa0, 0x01, - 0xa0, 0x01, 0x20, 0x0a, 0x00, 0x05, 0x00, 0x36, 0x00, 0x46, 0x20, 0x01, - 0x01, 0x41, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x21, 0x00, - 0x01, 0x40, 0x91, 0x86, 0x20, 0x00, 0x01, 0x70, 0x91, 0x86, 0x01, 0x00, - 0x19, 0x04, 0x2c, 0xda, 0x00, 0x48, 0x00, 0x16, 0x20, 0x09, 0x1a, 0x87, - 0x21, 0x04, 0x80, 0x00, 0x02, 0x08, 0x20, 0x0a, 0x00, 0x1e, 0x04, 0xf0, - 0x20, 0x09, 0x00, 0xa2, 0x08, 0x0c, 0x0e, 0x52, 0x20, 0x19, 0x01, 0x60, - 0x23, 0x24, 0x20, 0x11, 0x00, 0x03, 0x20, 0x09, 0x01, 0x69, 0x21, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x21, 0x0c, 0x91, 0x8c, 0x00, 0x07, 0x91, 0x0e, - 0x1d, 0xb0, 0x90, 0x86, 0x00, 0x03, 0x15, 0x48, 0x23, 0x04, 0x00, 0x66, - 0x00, 0x76, 0x20, 0x31, 0x00, 0x02, 0x23, 0x3c, 0x97, 0x3e, 0x01, 0x48, - 0x86, 0x31, 0x1d, 0xd8, 0x20, 0x31, 0x1a, 0x88, 0x26, 0x3c, 0x87, 0x38, - 0x02, 0x08, 0x27, 0x32, 0x23, 0x04, 0x00, 0x7e, 0x00, 0x6e, 0x94, 0x02, - 0x02, 0xa0, 0x19, 0xd0, 0x82, 0x11, 0x19, 0xd8, 0x84, 0xff, 0x01, 0x70, - 0x20, 0x01, 0x01, 0x41, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, - 0x01, 0x00, 0x01, 0x30, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x04, 0xc0, 0xdd, - 0x20, 0x0a, 0x00, 0x08, 0x04, 0x21, 0x20, 0x01, 0x19, 0x81, 0x20, 0x0c, - 0x08, 0x0c, 0x0e, 0x52, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x04, 0xd0, 0xdc, 0x01, 0xb0, 0x20, 0x01, 0x01, 0x60, - 0x20, 0x04, 0x90, 0x05, 0x01, 0x40, 0x20, 0x01, 0x01, 0x41, 0x20, 0x04, - 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x01, 0x00, 0x11, 0x48, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0x16, 0x00, 0x26, 0x00, 0x21, 0x00, 0x2e, - 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x60, 0x14, 0x00, 0x06, 0x20, 0x01, 0x01, 0x61, 0x20, 0x03, 0x00, 0x00, - 0x60, 0x17, 0x00, 0x18, 0xa0, 0x01, 0xa0, 0x01, 0x60, 0x2f, 0x00, 0x08, - 0x61, 0x04, 0x91, 0x8e, 0x00, 0x10, 0x61, 0x06, 0x91, 0x8e, 0x00, 0x10, - 0x61, 0x06, 0x60, 0x17, 0x00, 0x40, 0x04, 0xb9, 0x00, 0x1e, 0x91, 0x84, - 0x00, 0x03, 0x01, 0xe0, 0x00, 0x36, 0x00, 0x16, 0x20, 0x19, 0x01, 0x41, - 0x61, 0x24, 0x91, 0x8c, 0x00, 0x28, 0x11, 0x20, 0x23, 0x04, 0x90, 0x84, - 0x28, 0x00, 0x0d, 0xc0, 0x00, 0x1e, 0x91, 0x9c, 0xff, 0xe4, 0x91, 0x84, - 0x00, 0x01, 0x01, 0x18, 0x93, 0x85, 0x00, 0x09, 0x60, 0x16, 0x91, 0x84, - 0x00, 0x02, 0x01, 0x18, 0x93, 0x85, 0x00, 0x12, 0x60, 0x16, 0x00, 0x3e, - 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xdc, 0x21, 0x02, 0x00, 0xce, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0x76, 0x51, 0x01, 0x08, - 0xc0, 0xbc, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, 0x92, 0x94, 0x00, 0x01, - 0x92, 0x15, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x26, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, 0x92, 0x94, 0x00, 0x01, - 0x92, 0x85, 0x10, 0x00, 0x20, 0x0a, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, - 0x92, 0x94, 0x00, 0x01, 0x92, 0x15, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x20, 0x09, 0x01, 0x40, 0x21, 0x04, - 0x11, 0x28, 0x08, 0x0c, 0x76, 0x51, 0x01, 0x10, 0xc0, 0xbc, 0x00, 0x08, - 0xc0, 0xbd, 0x20, 0x0a, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x01, 0x56, 0x60, 0x50, 0x90, 0x85, 0x00, 0x40, 0x60, 0x52, 0x60, 0x50, - 0x90, 0x84, 0xfb, 0xcf, 0x60, 0x52, 0x08, 0x0c, 0x2c, 0x61, 0x90, 0x85, - 0x20, 0x00, 0x60, 0x52, 0x20, 0xa9, 0x00, 0x12, 0x1d, 0x04, 0x2d, 0x84, - 0x08, 0x0c, 0x88, 0xf7, 0x1f, 0x04, 0x2d, 0x84, 0x60, 0x50, 0x90, 0x85, - 0x04, 0x00, 0x90, 0x84, 0xdf, 0xbf, 0x60, 0x52, 0x01, 0x5e, 0x00, 0x0e, - 0x00, 0x05, 0x2f, 0xff, 0x2f, 0xff, 0x2e, 0x23, 0x2e, 0x23, 0x2e, 0x2f, - 0x2e, 0x2f, 0x2e, 0x3b, 0x2e, 0x3b, 0x2e, 0x49, 0x2e, 0x49, 0x2e, 0x55, - 0x2e, 0x55, 0x2e, 0x63, 0x2e, 0x63, 0x2e, 0x71, 0x2e, 0x71, 0x2e, 0x83, - 0x2e, 0x83, 0x2e, 0x8f, 0x2e, 0x8f, 0x2e, 0x9d, 0x2e, 0x9d, 0x2e, 0xbb, - 0x2e, 0xbb, 0x2e, 0xdb, 0x2e, 0xdb, 0x2e, 0xab, 0x2e, 0xab, 0x2e, 0xcb, - 0x2e, 0xcb, 0x2e, 0xe9, 0x2e, 0xe9, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0xfb, - 0x2e, 0xfb, 0x2f, 0x07, 0x2f, 0x07, 0x2f, 0x15, 0x2f, 0x15, 0x2f, 0x23, - 0x2f, 0x23, 0x2f, 0x33, 0x2f, 0x33, 0x2f, 0x41, 0x2f, 0x41, 0x2f, 0x51, - 0x2f, 0x51, 0x2f, 0x61, 0x2f, 0x61, 0x2f, 0x73, 0x2f, 0x73, 0x2f, 0x81, - 0x2f, 0x81, 0x2f, 0x91, 0x2f, 0x91, 0x2f, 0xb3, 0x2f, 0xb3, 0x2f, 0xd5, - 0x2f, 0xd5, 0x2f, 0xa1, 0x2f, 0xa1, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xe4, - 0x2f, 0xe4, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, 0x2e, 0x81, - 0x2e, 0x81, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0xa0, 0x01, - 0x0c, 0xf0, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, - 0x13, 0x94, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x22, 0xcc, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x0c, - 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x22, 0xcc, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x29, 0x76, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, - 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, - 0x22, 0xcc, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, - 0x13, 0x94, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x29, 0x76, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x04, - 0x2f, 0xf7, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, - 0x22, 0xcc, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, - 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, 0x08, 0x04, 0x2f, 0xf7, 0x01, 0x06, - 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, - 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x04, 0x98, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, 0x08, 0x0c, 0x13, 0x94, - 0x08, 0x0c, 0x23, 0x07, 0x04, 0x10, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x29, 0x76, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, 0x00, 0x98, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x29, 0x76, 0x08, 0x0c, 0x22, 0xcc, - 0x08, 0x0c, 0x24, 0xc0, 0x08, 0x0c, 0x13, 0x94, 0x08, 0x0c, 0x23, 0x07, - 0x00, 0x00, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, - 0x01, 0x2e, 0x00, 0x0e, 0x01, 0x0e, 0x00, 0x0d, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0x26, 0x00, 0x46, 0x90, 0x26, 0x08, 0x0c, 0x6a, 0x61, 0x19, 0x04, - 0x31, 0x37, 0x72, 0xdc, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x05, - 0x11, 0x10, 0xd2, 0x9c, 0x01, 0x48, 0xd2, 0x84, 0x11, 0x38, 0xd2, 0xbc, - 0x19, 0x04, 0x31, 0x37, 0x08, 0x0c, 0x31, 0x3c, 0x08, 0x04, 0x31, 0x37, - 0xd2, 0xcc, 0x19, 0x04, 0x31, 0x37, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x20, - 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, 0x31, 0x37, 0xd2, 0x94, 0x01, 0x20, - 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, 0x31, 0x37, 0x08, 0x0c, 0x33, 0xa5, - 0x01, 0x60, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x28, 0x20, 0x01, 0x18, 0x18, - 0x20, 0x3c, 0x08, 0x04, 0x30, 0xb0, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, - 0x31, 0x37, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, 0x72, 0x94, 0xd2, 0x84, - 0x09, 0x04, 0x30, 0xb0, 0xd2, 0x8c, 0x19, 0x04, 0x30, 0xb0, 0x00, 0x36, - 0x73, 0xac, 0x93, 0x8e, 0xff, 0xff, 0x11, 0x10, 0x20, 0x19, 0x00, 0x01, - 0x83, 0x14, 0x92, 0xe0, 0x1c, 0x80, 0x2c, 0x04, 0x93, 0x8c, 0x00, 0x01, - 0x01, 0x20, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0x90, 0x84, - 0x00, 0xff, 0x97, 0x0e, 0x09, 0x04, 0x30, 0xa6, 0x90, 0x8e, 0x00, 0x00, - 0x09, 0x04, 0x30, 0xa6, 0x90, 0x8e, 0x00, 0xff, 0x11, 0x60, 0x72, 0x30, - 0xd2, 0x84, 0x19, 0x04, 0x30, 0xab, 0x72, 0x94, 0xc2, 0x8d, 0x72, 0x96, - 0x70, 0xaf, 0xff, 0xff, 0x00, 0x3e, 0x08, 0x04, 0x30, 0xb0, 0x20, 0x09, - 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x50, 0x00, 0x26, 0x20, 0x11, - 0x00, 0x10, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, 0x01, 0x18, 0x70, 0xaf, - 0xff, 0xff, 0x04, 0x88, 0x90, 0x0e, 0x08, 0x0c, 0x28, 0x73, 0x08, 0x0c, - 0x66, 0xb9, 0x15, 0x38, 0x90, 0x06, 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xac, - 0x90, 0x05, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x60, 0x08, 0x0c, 0x8c, 0xf7, - 0x00, 0xce, 0x09, 0x0c, 0x90, 0x96, 0xb8, 0xaf, 0x00, 0x00, 0x08, 0x0c, - 0x6a, 0xa3, 0x11, 0x68, 0x70, 0x30, 0xd0, 0x8c, 0x01, 0x30, 0xb8, 0x00, - 0xd0, 0xbc, 0x01, 0x38, 0x08, 0x0c, 0x69, 0x44, 0x01, 0x20, 0x08, 0x0c, - 0x31, 0x55, 0x01, 0x48, 0x00, 0x28, 0x08, 0x0c, 0x32, 0x95, 0x08, 0x0c, - 0x31, 0x81, 0x01, 0x18, 0x83, 0x18, 0x08, 0x04, 0x30, 0x4a, 0x73, 0xae, - 0x00, 0x10, 0x70, 0xaf, 0xff, 0xff, 0x00, 0x3e, 0x08, 0x04, 0x31, 0x37, - 0x97, 0x80, 0x33, 0xb6, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, - 0x20, 0x41, 0x00, 0x7e, 0x70, 0xac, 0x90, 0x96, 0xff, 0xff, 0x11, 0x18, - 0x90, 0x0e, 0x28, 0xa8, 0x00, 0x50, 0x98, 0x12, 0x02, 0x20, 0x20, 0x08, - 0x98, 0x02, 0x20, 0xa8, 0x00, 0x20, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, - 0x31, 0x37, 0x27, 0x00, 0x01, 0x56, 0x00, 0x16, 0x91, 0x06, 0x09, 0x04, - 0x31, 0x2c, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x58, - 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, - 0x01, 0x20, 0x20, 0x09, 0xff, 0xff, 0x08, 0x04, 0x31, 0x34, 0xc4, 0x84, - 0x08, 0x0c, 0x67, 0x24, 0x01, 0x68, 0x08, 0x0c, 0xd7, 0xe3, 0x19, 0x04, - 0x31, 0x2c, 0x08, 0x0c, 0x33, 0xa5, 0x19, 0x04, 0x31, 0x2c, 0x08, 0x0c, - 0x66, 0xb9, 0x19, 0x04, 0x31, 0x34, 0x00, 0x08, 0xc4, 0x85, 0xb8, 0xbb, - 0x05, 0x20, 0xb8, 0xac, 0x90, 0x05, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x60, - 0x08, 0x0c, 0x8c, 0xf7, 0x00, 0xce, 0x09, 0x0c, 0x90, 0x96, 0xb8, 0xaf, - 0x00, 0x00, 0x08, 0x0c, 0x6a, 0xa3, 0x11, 0x30, 0x70, 0x30, 0xd0, 0x8c, - 0x01, 0xf8, 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0xe0, 0x72, 0x94, 0xd2, 0x8c, - 0x01, 0x80, 0x08, 0x0c, 0x6a, 0xa3, 0x90, 0x82, 0x00, 0x06, 0x02, 0xe0, - 0xd4, 0x84, 0x11, 0x18, 0x08, 0x0c, 0x66, 0xde, 0x00, 0x28, 0x08, 0x0c, - 0x33, 0x21, 0x01, 0xa0, 0x08, 0x0c, 0x33, 0x4c, 0x00, 0x88, 0x08, 0x0c, - 0x32, 0x95, 0x08, 0x0c, 0xd7, 0xe3, 0x11, 0x60, 0x08, 0x0c, 0x31, 0x81, - 0x01, 0x88, 0x00, 0x40, 0x08, 0x0c, 0xd7, 0xe3, 0x11, 0x18, 0x08, 0x0c, - 0x33, 0x21, 0x01, 0x10, 0x04, 0x51, 0x01, 0x40, 0x00, 0x1e, 0x81, 0x08, - 0x01, 0x5e, 0x1f, 0x04, 0x30, 0xc9, 0x70, 0xaf, 0xff, 0xff, 0x00, 0x18, - 0x00, 0x1e, 0x01, 0x5e, 0x71, 0xae, 0x00, 0x4e, 0x00, 0x2e, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x16, 0x70, 0xaf, 0x00, 0x01, - 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x66, 0xb9, 0x11, 0x68, 0xb8, 0x13, - 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfe, 0x08, 0x0c, 0x32, 0x95, 0x04, 0xa9, - 0x01, 0x28, 0x70, 0xdc, 0xc0, 0xbd, 0x70, 0xde, 0x08, 0x0c, 0xd5, 0x2b, - 0x00, 0x1e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, 0x00, 0xd6, - 0x00, 0xc6, 0x20, 0x01, 0x18, 0x4c, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, - 0xb8, 0x42, 0x08, 0x0c, 0xb3, 0x25, 0x01, 0xd0, 0x2b, 0x00, 0x60, 0x12, - 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, - 0x66, 0x56, 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x66, 0x6a, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0xa8, 0x80, 0x00, 0x70, 0xaa, 0x01, 0x2e, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, - 0x00, 0xce, 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x76, 0x00, 0xd6, 0x00, 0xc6, 0x20, 0x01, 0x18, 0x4c, 0x20, 0x04, - 0x90, 0x84, 0x00, 0xff, 0xb8, 0x42, 0x08, 0x0c, 0xb3, 0x25, 0x05, 0x48, - 0x2b, 0x00, 0x60, 0x12, 0xb8, 0x00, 0xc0, 0xc4, 0xb8, 0x02, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x01, 0x40, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x06, 0x11, 0x10, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0xa8, 0x80, 0x00, 0x70, 0xaa, 0x01, 0x2e, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0x26, 0x20, 0x09, 0x00, 0x80, 0x08, 0x0c, 0x66, 0xb9, 0x11, 0x40, - 0xb8, 0x13, 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfc, 0x00, 0x39, 0x01, 0x10, - 0x70, 0xe3, 0xff, 0xff, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x76, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, 0xb2, 0x7d, - 0x01, 0xd0, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, - 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x66, 0x6a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0xe4, - 0x80, 0x00, 0x70, 0xe6, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, - 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xde, 0x00, 0x7e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, 0x66, 0xb9, 0x11, 0xb8, - 0xb8, 0x13, 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfd, 0xb8, 0xcf, 0x00, 0x04, - 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x70, 0x2b, 0x00, 0x60, 0x12, 0x63, 0x16, - 0x60, 0x23, 0x00, 0x01, 0x62, 0x0a, 0x08, 0x0c, 0xd5, 0x54, 0x20, 0x09, - 0x00, 0x22, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, - 0x00, 0x36, 0x00, 0x26, 0x00, 0xb6, 0x21, 0xf0, 0x08, 0x0c, 0x96, 0xaf, - 0x08, 0x0c, 0x96, 0x2f, 0x08, 0x0c, 0xb1, 0x11, 0x08, 0x0c, 0xc2, 0xd3, - 0x3e, 0x08, 0x21, 0x30, 0x81, 0xff, 0x01, 0x20, 0x20, 0xa9, 0x00, 0x7e, - 0x90, 0x0e, 0x00, 0x18, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, - 0x08, 0x0c, 0x67, 0x24, 0x11, 0x40, 0x96, 0x86, 0x00, 0x02, 0x11, 0x18, - 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0x10, 0x08, 0x0c, 0x61, 0x48, 0x00, 0x1e, - 0x81, 0x08, 0x1f, 0x04, 0x32, 0x35, 0x96, 0x86, 0x00, 0x01, 0x19, 0x0c, - 0x33, 0x79, 0x00, 0xbe, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x46, 0x00, 0x36, - 0x00, 0x26, 0x00, 0x16, 0x00, 0xb6, 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, - 0x00, 0x26, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x96, 0xa4, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x95, 0x77, 0x2c, 0x08, 0x08, 0x0c, - 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0x1e, 0xba, 0x10, 0xbb, 0x14, 0xbc, 0xc0, - 0x08, 0x0c, 0x61, 0x48, 0xba, 0x12, 0xbb, 0x16, 0xbc, 0xc2, 0x00, 0xbe, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0x00, 0xbe, 0x90, 0x86, 0x00, 0x80, 0x01, 0x50, 0x20, 0x71, - 0x18, 0x00, 0x70, 0xa8, 0x90, 0x05, 0x01, 0x10, 0x80, 0x01, 0x70, 0xaa, - 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x70, 0xe4, - 0x90, 0x05, 0x0d, 0xc0, 0x80, 0x01, 0x70, 0xe6, 0x0c, 0xa8, 0xb8, 0x00, - 0xc0, 0x8c, 0xb8, 0x02, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0xb6, 0x00, 0x46, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x01, 0x56, - 0x21, 0x78, 0x81, 0xff, 0x11, 0x18, 0x20, 0xa9, 0x00, 0x01, 0x00, 0x78, - 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xc4, 0x01, 0x40, 0xd0, 0xa4, 0x01, 0x30, - 0x90, 0x06, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2d, 0x08, 0x0c, 0xec, 0x31, - 0x20, 0xa9, 0x08, 0x00, 0x90, 0x16, 0x00, 0x26, 0x92, 0x8e, 0x00, 0x7e, - 0x09, 0x04, 0x33, 0x00, 0x92, 0x8e, 0x00, 0x7f, 0x09, 0x04, 0x33, 0x00, - 0x92, 0x8e, 0x00, 0x80, 0x05, 0xe8, 0x92, 0x88, 0x10, 0x00, 0x21, 0x0c, - 0x81, 0xff, 0x05, 0xc0, 0x8f, 0xff, 0x11, 0x48, 0x20, 0x01, 0x19, 0x8e, - 0x00, 0x06, 0x20, 0x03, 0x00, 0x01, 0x04, 0xf1, 0x00, 0x0e, 0x20, 0x03, - 0x00, 0x00, 0x00, 0xb6, 0x00, 0xc6, 0x21, 0x58, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x6a, 0x6d, 0x00, 0xce, 0x00, 0xbe, 0x20, 0x19, 0x00, 0x29, - 0x08, 0x0c, 0x96, 0xa4, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, - 0x95, 0x77, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x26, 0x21, 0x58, 0xba, 0x04, - 0x92, 0x94, 0x00, 0xff, 0x92, 0x86, 0x00, 0x06, 0x11, 0x18, 0xb8, 0x07, - 0x04, 0x04, 0x00, 0x28, 0x20, 0x01, 0x00, 0x04, 0x80, 0x07, 0x92, 0x15, - 0xba, 0x06, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x16, 0x2c, 0x08, - 0x08, 0x0c, 0xe9, 0x1c, 0x00, 0x1e, 0x00, 0x7e, 0x00, 0x2e, 0x82, 0x10, - 0x1f, 0x04, 0x32, 0xb7, 0x01, 0x5e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0x46, 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xc4, - 0x01, 0x40, 0xd0, 0xa4, 0x01, 0x30, 0x90, 0x06, 0x22, 0x20, 0x20, 0x09, - 0x00, 0x29, 0x08, 0x0c, 0xec, 0x31, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x4e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x72, 0x94, - 0x82, 0xff, 0x01, 0xe8, 0x08, 0x0c, 0x6a, 0x9b, 0x11, 0xd0, 0x21, 0x00, - 0x08, 0x0c, 0x28, 0xa6, 0x81, 0xff, 0x01, 0xb8, 0x20, 0x19, 0x00, 0x01, - 0x83, 0x14, 0x92, 0xe0, 0x1c, 0x80, 0x2c, 0x04, 0xd3, 0x84, 0x01, 0x20, - 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0x90, 0x84, 0x00, 0xff, - 0x91, 0x16, 0x01, 0x38, 0x90, 0x96, 0x00, 0xff, 0x01, 0x10, 0x83, 0x18, - 0x0c, 0x68, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, 0x00, 0xa9, 0x00, 0x3e, - 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x65, 0x01, 0x58, 0x00, 0x16, - 0x00, 0xc6, 0x20, 0x61, 0x1a, 0xb7, 0x00, 0x1e, 0x61, 0x12, 0x08, 0x0c, - 0x32, 0x50, 0x00, 0x1e, 0x08, 0x0c, 0x66, 0xde, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x21, 0x10, 0x08, 0x0c, - 0xac, 0x6c, 0x08, 0x0c, 0xef, 0x94, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0xcc, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xb6, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x18, 0x20, 0xa9, 0x08, 0x00, - 0x00, 0x10, 0x20, 0xa9, 0x07, 0x82, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x10, - 0x90, 0x0e, 0x00, 0x10, 0x20, 0x09, 0x00, 0x7e, 0x91, 0x80, 0x10, 0x00, - 0x20, 0x04, 0x90, 0x5d, 0x01, 0x30, 0x86, 0xff, 0x01, 0x10, 0xb8, 0x00, - 0xd0, 0xbc, 0x09, 0x0c, 0x66, 0xde, 0x81, 0x08, 0x1f, 0x04, 0x33, 0x8a, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x7f, 0x00, 0x00, 0x60, 0x80, 0x90, 0x84, - 0x00, 0xff, 0x60, 0x82, 0x60, 0xb3, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xce, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x05, - 0x20, 0x11, 0x18, 0x48, 0x22, 0x14, 0xd2, 0xec, 0x00, 0x05, 0x00, 0x26, - 0x20, 0x11, 0x18, 0x67, 0x22, 0x14, 0xd2, 0xdc, 0x00, 0x2e, 0x00, 0x05, - 0x7e, 0xef, 0x7d, 0xe8, 0x7c, 0xe4, 0x80, 0xe2, 0x7b, 0xe1, 0x80, 0xe0, - 0x80, 0xdc, 0x80, 0xda, 0x7a, 0xd9, 0x80, 0xd6, 0x80, 0xd5, 0x80, 0xd4, - 0x80, 0xd3, 0x80, 0xd2, 0x80, 0xd1, 0x79, 0xce, 0x78, 0xcd, 0x80, 0xcc, - 0x80, 0xcb, 0x80, 0xca, 0x80, 0xc9, 0x80, 0xc7, 0x80, 0xc6, 0x77, 0xc5, - 0x76, 0xc3, 0x80, 0xbc, 0x80, 0xba, 0x75, 0xb9, 0x80, 0xb6, 0x74, 0xb5, - 0x73, 0xb4, 0x72, 0xb3, 0x80, 0xb2, 0x80, 0xb1, 0x80, 0xae, 0x71, 0xad, - 0x80, 0xac, 0x70, 0xab, 0x6f, 0xaa, 0x6e, 0xa9, 0x80, 0xa7, 0x6d, 0xa6, - 0x6c, 0xa5, 0x6b, 0xa3, 0x6a, 0x9f, 0x69, 0x9e, 0x68, 0x9d, 0x80, 0x9b, - 0x80, 0x98, 0x67, 0x97, 0x66, 0x90, 0x65, 0x8f, 0x64, 0x88, 0x63, 0x84, - 0x62, 0x82, 0x80, 0x81, 0x80, 0x80, 0x61, 0x7c, 0x60, 0x7a, 0x80, 0x79, - 0x5f, 0x76, 0x80, 0x75, 0x80, 0x74, 0x80, 0x73, 0x80, 0x72, 0x80, 0x71, - 0x80, 0x6e, 0x5e, 0x6d, 0x80, 0x6c, 0x5d, 0x6b, 0x5c, 0x6a, 0x5b, 0x69, - 0x80, 0x67, 0x5a, 0x66, 0x59, 0x65, 0x58, 0x63, 0x57, 0x5c, 0x56, 0x5a, - 0x55, 0x59, 0x80, 0x56, 0x80, 0x55, 0x54, 0x54, 0x53, 0x53, 0x52, 0x52, - 0x51, 0x51, 0x50, 0x4e, 0x4f, 0x4d, 0x80, 0x4c, 0x80, 0x4b, 0x4e, 0x4a, - 0x4d, 0x49, 0x80, 0x47, 0x4c, 0x46, 0x80, 0x45, 0x80, 0x43, 0x80, 0x3c, - 0x80, 0x3a, 0x80, 0x39, 0x80, 0x36, 0x4b, 0x35, 0x80, 0x34, 0x4a, 0x33, - 0x49, 0x32, 0x48, 0x31, 0x80, 0x2e, 0x47, 0x2d, 0x46, 0x2c, 0x45, 0x2b, - 0x44, 0x2a, 0x43, 0x29, 0x42, 0x27, 0x80, 0x26, 0x80, 0x25, 0x41, 0x23, - 0x40, 0x1f, 0x3f, 0x1e, 0x3e, 0x1d, 0x3d, 0x1b, 0x3c, 0x18, 0x80, 0x17, - 0x80, 0x10, 0x3b, 0x0f, 0x3a, 0x08, 0x80, 0x04, 0x39, 0x02, 0x80, 0x01, - 0x80, 0x00, 0x80, 0x00, 0x38, 0x00, 0x37, 0x00, 0x36, 0x00, 0x80, 0x00, - 0x35, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x34, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x33, 0x00, - 0x32, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x31, 0x00, 0x30, 0x00, 0x80, 0x00, 0x80, 0x00, 0x2f, 0x00, - 0x80, 0x00, 0x2e, 0x00, 0x2d, 0x00, 0x2c, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x2b, 0x00, 0x80, 0x00, 0x2a, 0x00, 0x29, 0x00, 0x28, 0x00, - 0x80, 0x00, 0x27, 0x00, 0x26, 0x00, 0x25, 0x00, 0x24, 0x00, 0x23, 0x00, - 0x22, 0x00, 0x80, 0x00, 0x80, 0x00, 0x21, 0x00, 0x20, 0x00, 0x1f, 0x00, - 0x1e, 0x00, 0x1d, 0x00, 0x1c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x1b, 0x00, - 0x1a, 0x00, 0x80, 0x00, 0x19, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x18, 0x00, 0x80, 0x00, 0x17, 0x00, - 0x16, 0x00, 0x15, 0x00, 0x80, 0x00, 0x14, 0x00, 0x13, 0x00, 0x12, 0x00, - 0x11, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x80, 0x00, 0x80, 0x00, 0x0e, 0x00, - 0x0d, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x08, 0x00, 0x07, 0x00, 0x80, 0x00, 0x06, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x05, 0x00, 0x04, 0x00, 0x03, 0x00, 0x80, 0x00, - 0x02, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x01, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x20, 0x71, 0x18, 0x9e, - 0x70, 0x03, 0x00, 0x02, 0x90, 0x06, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4a, - 0x70, 0x4e, 0x70, 0x0e, 0x70, 0x42, 0x70, 0x46, 0x70, 0x3b, 0x18, 0xba, - 0x70, 0x3f, 0x18, 0xba, 0x70, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x10, 0x27, - 0x09, 0x0c, 0x0d, 0xc5, 0x29, 0x00, 0x70, 0x6a, 0xa8, 0x67, 0x00, 0x02, - 0xa8, 0xab, 0xdc, 0xb0, 0x08, 0x0c, 0x10, 0x27, 0x09, 0x0c, 0x0d, 0xc5, - 0x29, 0x00, 0x70, 0x6e, 0xa8, 0x67, 0x00, 0x02, 0xa8, 0xab, 0xdc, 0xb0, - 0x00, 0x05, 0x20, 0x71, 0x18, 0x9e, 0x70, 0x04, 0x00, 0x02, 0x34, 0xe5, - 0x34, 0xe6, 0x34, 0xf9, 0x35, 0x0d, 0x00, 0x05, 0x10, 0x04, 0x34, 0xf6, - 0x0e, 0x04, 0x34, 0xf6, 0x20, 0x79, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x0c, 0x90, 0x05, 0x11, 0x28, 0x70, 0x0f, 0x00, 0x01, - 0x01, 0x2e, 0x04, 0x68, 0x00, 0x05, 0x01, 0x2e, 0x0c, 0xe8, 0x20, 0x79, - 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x4c, 0xa8, 0x6c, 0x90, 0x8e, - 0x01, 0x00, 0x01, 0x28, 0x90, 0x86, 0x02, 0x00, 0x09, 0x04, 0x35, 0xe1, - 0x00, 0x05, 0x70, 0x18, 0x20, 0x48, 0x20, 0x61, 0x18, 0x00, 0x70, 0x1c, - 0x08, 0x07, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x94, 0x00, 0xff, - 0x92, 0x96, 0x00, 0x29, 0x11, 0x20, 0xaa, 0x78, 0xd2, 0xfc, 0x01, 0x28, - 0x00, 0x05, 0x90, 0x86, 0x01, 0x03, 0x01, 0x08, 0x00, 0x05, 0x20, 0x79, - 0x00, 0x00, 0x20, 0x61, 0x18, 0x00, 0x70, 0x1c, 0x08, 0x07, 0x20, 0x61, - 0x18, 0x00, 0x78, 0x80, 0x90, 0x8a, 0x00, 0x40, 0x12, 0x10, 0x61, 0xd0, - 0x00, 0x42, 0x21, 0x00, 0x90, 0x8a, 0x00, 0x3f, 0x1a, 0x04, 0x35, 0xde, - 0x61, 0xd0, 0x08, 0x04, 0x35, 0x73, 0x35, 0xb5, 0x35, 0xed, 0x35, 0xde, - 0x35, 0xf9, 0x36, 0x03, 0x36, 0x09, 0x36, 0x0d, 0x36, 0x1d, 0x36, 0x21, - 0x36, 0x37, 0x36, 0x3d, 0x36, 0x43, 0x36, 0x4e, 0x36, 0x59, 0x36, 0x68, - 0x36, 0x77, 0x36, 0x85, 0x36, 0x9c, 0x36, 0xb7, 0x35, 0xde, 0x37, 0x62, - 0x37, 0xa0, 0x38, 0x46, 0x38, 0x57, 0x38, 0x7a, 0x35, 0xde, 0x35, 0xde, - 0x35, 0xde, 0x38, 0xb2, 0x38, 0xce, 0x38, 0xd7, 0x39, 0x06, 0x39, 0x0c, - 0x35, 0xde, 0x39, 0x52, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, - 0x35, 0xde, 0x39, 0x5d, 0x39, 0x66, 0x39, 0x6e, 0x39, 0x70, 0x35, 0xde, - 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x39, 0x9c, - 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x39, 0xb9, - 0x3a, 0x40, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, - 0x35, 0xde, 0x00, 0x02, 0x3a, 0x6a, 0x3a, 0x6d, 0x3a, 0xcc, 0x3a, 0xe5, - 0x3b, 0x15, 0x3d, 0xb7, 0x35, 0xde, 0x53, 0x98, 0x35, 0xde, 0x35, 0xde, - 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, 0x35, 0xde, - 0x36, 0x37, 0x36, 0x3d, 0x42, 0xec, 0x57, 0xf9, 0x43, 0x0a, 0x54, 0x27, - 0x54, 0x79, 0x55, 0x84, 0x35, 0xde, 0x55, 0xe6, 0x56, 0x22, 0x56, 0x53, - 0x57, 0x5b, 0x56, 0x80, 0x56, 0xdb, 0x35, 0xde, 0x43, 0x0e, 0x44, 0xe1, - 0x44, 0xf7, 0x45, 0x1c, 0x45, 0x81, 0x45, 0xf5, 0x46, 0x15, 0x46, 0x8c, - 0x46, 0xe8, 0x47, 0x44, 0x47, 0x47, 0x47, 0x6c, 0x48, 0x23, 0x48, 0x89, - 0x48, 0x91, 0x49, 0xc6, 0x4b, 0x6e, 0x4b, 0xa2, 0x4e, 0x06, 0x35, 0xde, - 0x4e, 0x24, 0x4e, 0xeb, 0x4f, 0xd4, 0x50, 0x2e, 0x35, 0xde, 0x50, 0xc1, - 0x35, 0xde, 0x50, 0xd7, 0x50, 0xf2, 0x48, 0x91, 0x53, 0x38, 0x71, 0x4c, - 0x00, 0x00, 0x20, 0x21, 0x40, 0x00, 0x08, 0x0c, 0x4c, 0x20, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x35, 0xbf, 0x00, 0x10, 0x01, 0x2e, - 0x0c, 0xc0, 0x7c, 0x36, 0x94, 0x86, 0x40, 0x00, 0x01, 0x18, 0x78, 0x33, - 0x00, 0x11, 0x00, 0x10, 0x78, 0x33, 0x00, 0x10, 0x7c, 0x82, 0x79, 0x86, - 0x7a, 0x8a, 0x7b, 0x8e, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x70, 0x07, 0x00, 0x01, - 0x20, 0x91, 0x50, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x21, 0x40, 0x01, 0x08, 0xb0, 0x20, 0x21, 0x40, 0x02, 0x08, 0x98, - 0x20, 0x21, 0x40, 0x03, 0x08, 0x80, 0x20, 0x21, 0x40, 0x05, 0x08, 0x68, - 0x20, 0x21, 0x40, 0x06, 0x08, 0x50, 0x20, 0x39, 0x00, 0x01, 0x90, 0x2e, - 0x25, 0x20, 0x7b, 0x88, 0x7a, 0x8c, 0x78, 0x84, 0x79, 0x90, 0x81, 0xff, - 0x0d, 0x98, 0x08, 0x04, 0x4c, 0x2d, 0x20, 0x39, 0x00, 0x01, 0x90, 0x2e, - 0x25, 0x20, 0x7b, 0x88, 0x7a, 0x8c, 0x78, 0x84, 0x79, 0x90, 0x08, 0x04, - 0x4c, 0x30, 0x79, 0x84, 0x78, 0x88, 0x21, 0x14, 0x20, 0x0a, 0x08, 0x04, - 0x35, 0xb5, 0x79, 0x84, 0x21, 0x14, 0x08, 0x04, 0x35, 0xb5, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x99, 0x00, 0x21, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x00, 0x21, 0x20, 0xa9, 0x00, 0x1f, 0x40, 0x03, 0x79, 0x84, 0x7a, 0x88, - 0x7b, 0x8c, 0x08, 0x04, 0x35, 0xb5, 0x78, 0x84, 0x20, 0x60, 0x08, 0x04, - 0x36, 0x6a, 0x20, 0x09, 0x00, 0x03, 0x20, 0x11, 0x00, 0x03, 0x20, 0x19, - 0x00, 0x14, 0x78, 0x9b, 0x01, 0x37, 0x78, 0x93, 0xff, 0xff, 0x20, 0x01, - 0x18, 0x8f, 0x20, 0x04, 0x90, 0x05, 0x01, 0x18, 0x78, 0x96, 0x08, 0x04, - 0x35, 0xb5, 0x78, 0x97, 0x00, 0x01, 0x08, 0x04, 0x35, 0xb5, 0x20, 0x39, - 0x00, 0x01, 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x35, 0xf1, 0x20, 0x39, - 0x00, 0x01, 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x35, 0xfd, 0x79, 0xa0, - 0x91, 0x82, 0x00, 0x40, 0x02, 0x10, 0x08, 0x04, 0x35, 0xea, 0x21, 0x38, - 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x35, 0xf1, 0x79, 0xa0, 0x91, 0x82, - 0x00, 0x40, 0x02, 0x10, 0x08, 0x04, 0x35, 0xea, 0x21, 0x38, 0x7d, 0x98, - 0x7c, 0x9c, 0x08, 0x04, 0x35, 0xfd, 0x79, 0xa0, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x10, 0x08, 0x04, 0x35, 0xea, 0x21, 0xe8, 0x79, 0x84, 0x78, 0x88, - 0x20, 0xa9, 0x00, 0x01, 0x21, 0xa0, 0x40, 0x04, 0x08, 0x04, 0x35, 0xb5, - 0x20, 0x61, 0x08, 0x00, 0xe1, 0x0c, 0x90, 0x06, 0x2c, 0x15, 0x92, 0x00, - 0x8c, 0x60, 0x81, 0x09, 0x1d, 0xd8, 0x20, 0x10, 0x90, 0x05, 0x09, 0x04, - 0x35, 0xb5, 0x08, 0x04, 0x35, 0xe4, 0x79, 0xa0, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x10, 0x08, 0x04, 0x35, 0xea, 0x21, 0xe0, 0x20, 0xa9, 0x00, 0x01, - 0x79, 0x84, 0x21, 0x98, 0x40, 0x12, 0x08, 0x04, 0x35, 0xb5, 0x20, 0x69, - 0x18, 0x47, 0x78, 0x84, 0x79, 0x90, 0x91, 0x1a, 0x1a, 0x04, 0x35, 0xea, - 0x80, 0x19, 0x09, 0x04, 0x35, 0xea, 0x68, 0x4a, 0x69, 0x42, 0x78, 0x8c, - 0x68, 0x52, 0x78, 0x88, 0x68, 0x56, 0x90, 0x06, 0x68, 0x5a, 0x68, 0x5e, - 0x08, 0x0c, 0x79, 0x63, 0x08, 0x04, 0x35, 0xb5, 0x20, 0x69, 0x18, 0x47, - 0x78, 0x84, 0x79, 0x94, 0x91, 0x1a, 0x1a, 0x04, 0x35, 0xea, 0x80, 0x19, - 0x09, 0x04, 0x35, 0xea, 0x68, 0x4e, 0x69, 0x46, 0x78, 0x8c, 0x68, 0x62, - 0x78, 0x88, 0x68, 0x66, 0x90, 0x06, 0x68, 0x6a, 0x68, 0x6e, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6b, 0xf8, 0x01, 0x2e, 0x08, 0x04, - 0x35, 0xb5, 0x90, 0x2e, 0x25, 0x20, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x7b, 0x88, 0x7a, 0x8c, - 0x20, 0xa9, 0x00, 0x05, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x18, 0xa6, - 0x41, 0x01, 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x35, 0xe7, 0x20, 0x09, 0x00, 0x20, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x2d, 0x70, 0x1f, 0x36, 0xdb, - 0x00, 0x05, 0xa8, 0x64, 0x20, 0x08, 0x90, 0x84, 0x00, 0xff, 0x90, 0x96, - 0x00, 0x11, 0x01, 0x68, 0x90, 0x96, 0x00, 0x19, 0x01, 0x50, 0x90, 0x96, - 0x00, 0x15, 0x01, 0x38, 0x90, 0x96, 0x00, 0x48, 0x01, 0x20, 0x90, 0x96, - 0x00, 0x29, 0x19, 0x04, 0x35, 0xe7, 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, - 0x09, 0x04, 0x35, 0xe7, 0x71, 0x12, 0x70, 0x10, 0x80, 0x01, 0x05, 0x60, - 0x70, 0x12, 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x35, 0xe7, 0x20, 0x09, 0x00, 0x20, 0x70, 0x68, 0x20, 0x40, - 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, 0x92, 0x90, 0x00, 0x40, - 0x93, 0x99, 0x00, 0x00, 0x94, 0xa1, 0x00, 0x00, 0x95, 0xa9, 0x00, 0x00, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x2d, - 0x70, 0x1f, 0x37, 0x19, 0x00, 0x05, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x96, 0x00, 0x02, 0x01, 0x20, 0x90, 0x96, 0x00, 0x0a, 0x19, 0x04, - 0x35, 0xe7, 0x08, 0x88, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x14, - 0x20, 0x48, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x96, 0x00, 0x29, 0x11, 0x48, 0xc2, 0xfd, 0xaa, 0x7a, - 0x08, 0x0c, 0x62, 0x9f, 0x01, 0x38, 0xa8, 0x7a, 0xa9, 0x82, 0x01, 0x2e, - 0x00, 0x60, 0x08, 0x0c, 0x65, 0xcf, 0x11, 0x30, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1f, 0x37, 0x47, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x0b, - 0x01, 0x2e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, - 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0xa6, 0x40, 0x0a, 0x21, 0x00, - 0x92, 0x10, 0x93, 0x99, 0x00, 0x00, 0x94, 0xa1, 0x00, 0x00, 0x95, 0xa9, - 0x00, 0x00, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0x09, 0x00, 0x20, - 0x01, 0x2e, 0xaf, 0x60, 0x08, 0x04, 0x4c, 0x30, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x37, 0x40, 0x00, 0x78, 0x33, 0x00, 0x10, 0x78, 0x83, 0x40, 0x00, - 0x78, 0x87, 0x49, 0x53, 0x78, 0x8b, 0x50, 0x20, 0x78, 0x8f, 0x20, 0x20, - 0x20, 0x09, 0x01, 0x7f, 0x21, 0x04, 0x78, 0x92, 0x3f, 0x00, 0x78, 0x96, - 0x20, 0x61, 0x01, 0x00, 0x62, 0x00, 0x20, 0x61, 0x02, 0x00, 0x60, 0x3c, - 0x80, 0x07, 0x92, 0x05, 0x78, 0x9a, 0x20, 0x09, 0x04, 0xfd, 0x21, 0x04, - 0x78, 0x9e, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x01, 0x80, 0x20, 0x01, 0x1a, 0x1c, - 0x20, 0x04, 0x90, 0x05, 0x01, 0x28, 0x20, 0x01, 0x00, 0x8b, 0x20, 0x04, - 0xd0, 0xfc, 0x0d, 0xd8, 0x20, 0x01, 0x00, 0x8a, 0x20, 0x03, 0x00, 0x02, - 0x20, 0x03, 0x10, 0x01, 0x20, 0x71, 0x00, 0x80, 0x08, 0x04, 0x04, 0x27, - 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x08, 0x0c, 0x67, 0x24, - 0x19, 0x04, 0x35, 0xea, 0x7e, 0x98, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, - 0x40, 0x00, 0x1a, 0x04, 0x35, 0xea, 0x7c, 0x88, 0x7d, 0x8c, 0x08, 0x0c, - 0x68, 0x87, 0x08, 0x0c, 0x68, 0x56, 0x00, 0x00, 0x15, 0x18, 0x20, 0x61, - 0x1c, 0xd0, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x00, 0x01, 0x48, 0x60, 0x14, 0x90, 0x4d, 0x01, 0x30, 0xa8, 0x6c, - 0x94, 0x06, 0x11, 0x18, 0xa8, 0x70, 0x95, 0x06, 0x01, 0x50, 0x01, 0x2e, - 0x9c, 0xe0, 0x00, 0x18, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, - 0x1a, 0x04, 0x35, 0xe7, 0x0c, 0x30, 0x08, 0x0c, 0xcc, 0xf3, 0x01, 0x2e, - 0x09, 0x04, 0x35, 0xe7, 0x08, 0x04, 0x35, 0xb5, 0x90, 0x0e, 0x20, 0x01, - 0x00, 0x05, 0x08, 0x0c, 0x71, 0x0b, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0xd3, 0xd4, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x08, 0x04, - 0x35, 0xb5, 0x00, 0xa6, 0x29, 0x50, 0xb1, 0x98, 0x08, 0x0c, 0x67, 0x24, - 0x19, 0x04, 0x38, 0x33, 0xb6, 0xa4, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, - 0x40, 0x00, 0x16, 0xe8, 0xb4, 0x9c, 0xb5, 0xa0, 0x08, 0x0c, 0x68, 0x87, - 0x08, 0x0c, 0x68, 0x56, 0x15, 0x20, 0x20, 0x61, 0x1c, 0xd0, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, - 0x60, 0x14, 0x90, 0x4d, 0x01, 0x30, 0xa8, 0x6c, 0x94, 0x06, 0x11, 0x18, - 0xa8, 0x70, 0x95, 0x06, 0x01, 0x58, 0x01, 0x2e, 0x9c, 0xe0, 0x00, 0x18, - 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x20, 0x09, 0x00, 0x0d, - 0x12, 0xb0, 0x0c, 0x28, 0x08, 0x0c, 0xcc, 0xf3, 0x01, 0x2e, 0x20, 0x09, - 0x00, 0x03, 0x01, 0x78, 0x00, 0xe0, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x71, 0x0b, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xd3, 0xd4, 0x08, 0x0c, 0x6e, 0x92, 0x01, 0x2e, 0x00, 0x70, 0xb0, 0x97, - 0x40, 0x05, 0xb1, 0x9a, 0x00, 0x10, 0xb0, 0x97, 0x40, 0x06, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x2a, 0x48, 0x00, 0xae, - 0x00, 0x05, 0xb0, 0x97, 0x40, 0x00, 0x90, 0x06, 0x91, 0x8d, 0x00, 0x01, - 0x20, 0x08, 0x2a, 0x48, 0x00, 0xae, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0x4b, 0xfb, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, - 0x67, 0xeb, 0x09, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x68, 0x8d, 0x09, 0x04, - 0x35, 0xe7, 0x08, 0x04, 0x46, 0x0c, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x69, 0x1b, - 0x09, 0x04, 0x35, 0xe7, 0x20, 0x19, 0x00, 0x05, 0x79, 0xa8, 0x08, 0x0c, - 0x68, 0xa8, 0x09, 0x04, 0x35, 0xe7, 0x78, 0x88, 0x90, 0x8a, 0x10, 0x00, - 0x1a, 0x04, 0x35, 0xea, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, - 0x08, 0x0c, 0x88, 0x4b, 0x79, 0xa8, 0xd1, 0x84, 0x19, 0x04, 0x35, 0xb5, - 0x08, 0x04, 0x46, 0x0c, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x81, 0xff, - 0x01, 0x18, 0x20, 0x09, 0x00, 0x01, 0x04, 0x50, 0x20, 0x29, 0x07, 0xff, - 0x64, 0x5c, 0x24, 0x00, 0x95, 0x06, 0x01, 0xf8, 0x25, 0x08, 0x08, 0x0c, - 0x67, 0x24, 0x11, 0xd8, 0x08, 0x0c, 0x69, 0x1b, 0x11, 0x28, 0x20, 0x09, - 0x00, 0x02, 0x62, 0xc0, 0x25, 0x18, 0x00, 0xc0, 0x20, 0x19, 0x00, 0x04, - 0x90, 0x0e, 0x08, 0x0c, 0x68, 0xa8, 0x11, 0x18, 0x20, 0x09, 0x00, 0x06, - 0x00, 0x78, 0x78, 0x84, 0x90, 0x8a, 0x10, 0x00, 0x12, 0x70, 0x80, 0x03, - 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x08, 0x0c, 0x88, 0x4b, 0x85, 0x29, - 0x1a, 0xe0, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x2e, 0x08, 0x04, - 0x35, 0xe7, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x4b, 0xfb, - 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x67, 0xeb, 0x09, 0x04, 0x35, 0xe7, - 0xba, 0xa0, 0x20, 0x19, 0x00, 0x05, 0x00, 0xc6, 0x90, 0x66, 0x08, 0x0c, - 0x96, 0xa4, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, 0x90, 0x0e, - 0x08, 0x0c, 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0xce, 0x08, 0x0c, 0x68, 0x87, - 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x4b, 0xfb, 0x09, 0x04, 0x35, 0xea, - 0x08, 0x0c, 0x68, 0x87, 0x22, 0x08, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x56, - 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x69, 0x19, 0x10, 0x68, 0x10, 0x69, 0x14, - 0x91, 0x0a, 0x12, 0x08, 0x90, 0x0e, 0x68, 0x16, 0x90, 0x16, 0x90, 0x1e, - 0x20, 0xa9, 0x00, 0x7e, 0x20, 0x69, 0x10, 0x00, 0x2d, 0x04, 0x90, 0x5d, - 0x01, 0x18, 0xb8, 0x4c, 0x00, 0x59, 0x92, 0x10, 0x8d, 0x68, 0x1f, 0x04, - 0x38, 0xe8, 0x23, 0x00, 0x92, 0x18, 0x00, 0xee, 0x00, 0xde, 0x01, 0x5e, - 0x08, 0x04, 0x35, 0xb5, 0x00, 0xf6, 0x00, 0x16, 0x90, 0x7d, 0x01, 0x38, - 0x90, 0x06, 0x80, 0x00, 0x2f, 0x0c, 0x81, 0xff, 0x01, 0x10, 0x21, 0x78, - 0x0c, 0xd0, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0x05, 0x20, 0x69, 0x19, 0x10, - 0x69, 0x10, 0x62, 0xbc, 0x08, 0x04, 0x35, 0xb5, 0x81, 0xff, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x28, 0x20, 0x09, 0x00, 0x07, - 0x01, 0x2e, 0x08, 0x04, 0x35, 0xe7, 0x01, 0x2e, 0x61, 0x5c, 0x91, 0x90, - 0x33, 0xb6, 0x22, 0x15, 0x92, 0x94, 0x00, 0xff, 0x63, 0x7c, 0x83, 0xff, - 0x01, 0x08, 0x62, 0x80, 0x67, 0xdc, 0x97, 0xc4, 0x00, 0x0a, 0x98, 0xc6, - 0x00, 0x0a, 0x11, 0x18, 0x20, 0x31, 0x00, 0x01, 0x00, 0xe8, 0x97, 0xc4, - 0x00, 0x22, 0x98, 0xc6, 0x00, 0x22, 0x11, 0x18, 0x20, 0x31, 0x00, 0x03, - 0x00, 0xa8, 0x97, 0xc4, 0x00, 0x12, 0x98, 0xc6, 0x00, 0x12, 0x11, 0x18, - 0x20, 0x31, 0x00, 0x02, 0x00, 0x68, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x18, - 0x20, 0x31, 0x00, 0x04, 0x00, 0x38, 0xd7, 0x9c, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x05, 0x08, 0x04, 0x35, 0xe7, 0x90, 0x36, 0x7e, 0x9a, 0x7f, 0x9e, - 0x08, 0x04, 0x35, 0xb5, 0x61, 0x4c, 0x62, 0x50, 0x20, 0x19, 0x19, 0x86, - 0x23, 0x1c, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x78, 0x9a, 0x08, 0x04, - 0x35, 0xb5, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x61, 0x38, 0x62, 0x3c, - 0x63, 0x40, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x4c, 0x17, - 0x09, 0x04, 0x35, 0xea, 0xba, 0x44, 0xbb, 0x38, 0x08, 0x04, 0x35, 0xb5, - 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x4c, 0x17, 0x21, 0x10, 0x09, 0x04, - 0x35, 0xea, 0xb8, 0x04, 0x90, 0x8c, 0x00, 0xff, 0x91, 0x8e, 0x00, 0x06, - 0x01, 0x40, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x06, 0x00, 0x20, 0x09, - 0x00, 0x09, 0x19, 0x04, 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x19, 0x00, 0x05, 0x00, 0xc6, 0x90, 0x66, 0x08, 0x0c, 0xac, 0x6c, - 0x08, 0x0c, 0x96, 0xa4, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, - 0x90, 0x0e, 0x08, 0x0c, 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0xce, 0xb8, 0x07, - 0x04, 0x07, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x61, 0x4c, 0x62, 0x50, - 0x78, 0x84, 0x60, 0x4e, 0x7b, 0x88, 0x63, 0x52, 0x20, 0x69, 0x18, 0x47, - 0x83, 0x1f, 0x93, 0x05, 0x68, 0x16, 0x78, 0x8c, 0x20, 0x69, 0x19, 0x86, - 0x2d, 0x1c, 0x20, 0x6a, 0x7e, 0x98, 0x96, 0x82, 0x00, 0x14, 0x12, 0x10, - 0x20, 0x31, 0x07, 0xd0, 0x20, 0x69, 0x19, 0x87, 0x2d, 0x04, 0x26, 0x6a, - 0x78, 0x9a, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x61, 0x38, 0x78, 0x84, 0x60, 0x3a, 0x91, 0x0e, 0xd1, 0xb4, 0x19, 0x0c, - 0x0e, 0xbe, 0xd0, 0x94, 0x01, 0x48, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xfb, - 0x79, 0xb4, 0x91, 0x92, 0x07, 0xd0, 0x12, 0x08, 0x71, 0x3e, 0x00, 0xee, - 0xd0, 0xc4, 0x01, 0xa8, 0x00, 0xd6, 0x78, 0xa8, 0x20, 0x09, 0x19, 0x9d, - 0x20, 0x0a, 0x78, 0xac, 0x20, 0x11, 0x19, 0x9e, 0x20, 0x12, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x38, 0x90, 0x86, 0x00, 0x07, 0x11, 0x18, 0x22, 0x14, - 0x6a, 0x5a, 0x00, 0x10, 0x21, 0x0c, 0x69, 0x5a, 0x00, 0xde, 0x78, 0x88, - 0xd0, 0xec, 0x01, 0x78, 0x60, 0x34, 0xc0, 0x8d, 0x60, 0x36, 0x20, 0x01, - 0x00, 0x50, 0x60, 0x76, 0x60, 0x7a, 0x60, 0x56, 0x60, 0x6b, 0x24, 0x50, - 0x00, 0xc6, 0x20, 0x61, 0x1a, 0xd1, 0x20, 0x62, 0x00, 0xce, 0x20, 0x11, - 0x01, 0x14, 0x22, 0x0c, 0x78, 0x88, 0xd0, 0x8c, 0x01, 0x18, 0x91, 0x8d, - 0x00, 0x80, 0x00, 0x10, 0x91, 0x8c, 0xff, 0x7f, 0x21, 0x12, 0x60, 0x3c, - 0x79, 0x88, 0x61, 0x3e, 0x61, 0x40, 0x91, 0x0d, 0x78, 0x8c, 0x60, 0x42, - 0x7a, 0x88, 0x92, 0x94, 0x10, 0x00, 0x92, 0x05, 0x91, 0x0e, 0xd1, 0xe4, - 0x19, 0x0c, 0x0e, 0xd4, 0x90, 0x84, 0x00, 0x20, 0x01, 0x30, 0x78, 0xb4, - 0x60, 0x46, 0x90, 0x84, 0x00, 0x01, 0x09, 0x0c, 0x42, 0xec, 0x60, 0x40, - 0xd0, 0xcc, 0x01, 0x20, 0x78, 0xb0, 0x20, 0x11, 0x01, 0x14, 0x20, 0x12, - 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, - 0x7a, 0x38, 0xa8, 0x98, 0x90, 0x84, 0xfe, 0xbf, 0x92, 0x15, 0xa8, 0x9c, - 0x90, 0x84, 0xfe, 0xbf, 0x80, 0x02, 0x92, 0x14, 0x78, 0x38, 0x90, 0x84, - 0x01, 0x40, 0x92, 0x15, 0x7a, 0x3a, 0xa8, 0x97, 0x40, 0x00, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0x98, 0x90, 0x05, 0x01, 0xa8, 0x78, 0x88, 0x90, 0x25, 0x09, 0x04, - 0x35, 0xea, 0x78, 0x8c, 0x90, 0x2d, 0x09, 0x04, 0x35, 0xea, 0x90, 0x0e, - 0x08, 0x0c, 0x67, 0x24, 0x11, 0x20, 0xba, 0x44, 0xbb, 0x38, 0xbc, 0x46, - 0xbd, 0x3a, 0x91, 0x86, 0x07, 0xff, 0x01, 0x90, 0x81, 0x08, 0x0c, 0xa0, - 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x78, 0x88, 0x90, 0x0d, - 0x09, 0x04, 0x35, 0xea, 0x78, 0x8c, 0x90, 0x05, 0x09, 0x04, 0x35, 0xea, - 0xba, 0x44, 0xb9, 0x46, 0xbb, 0x38, 0xb8, 0x3a, 0x08, 0x04, 0x35, 0xb5, - 0x20, 0x11, 0xbc, 0x09, 0x00, 0x10, 0x20, 0x11, 0xbc, 0x05, 0x08, 0x0c, - 0x57, 0xe9, 0x19, 0x04, 0x35, 0xe7, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x79, 0x84, 0x91, 0x86, 0x00, 0xff, 0x11, 0x30, 0x20, 0x01, 0x18, 0x18, - 0x20, 0x04, 0x90, 0x85, 0xff, 0x00, 0x00, 0x88, 0x91, 0x82, 0x00, 0x7f, - 0x16, 0xe0, 0x91, 0x88, 0x33, 0xb6, 0x21, 0x0d, 0x91, 0x8c, 0x00, 0xff, - 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x00, 0x26, 0x91, 0x16, 0x00, 0x2e, - 0x05, 0x80, 0x81, 0x0f, 0x91, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0x06, 0x08, 0x0c, 0xb2, 0x7d, 0x00, 0x0e, 0x05, 0x10, 0x60, 0x2e, - 0x62, 0x0a, 0x79, 0x84, 0x00, 0xb6, 0x08, 0x0c, 0x66, 0xbf, 0x2b, 0x08, - 0x00, 0xbe, 0x15, 0x00, 0x61, 0x12, 0x60, 0x23, 0x00, 0x01, 0x08, 0x0c, - 0x4b, 0xe4, 0x01, 0xd0, 0x90, 0x06, 0xa8, 0x66, 0x70, 0x07, 0x00, 0x03, - 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x70, 0x1f, 0x3a, 0xc5, - 0x29, 0x00, 0x60, 0x16, 0x20, 0x09, 0x00, 0x32, 0x08, 0x0c, 0xb3, 0x52, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x01, 0x2e, 0x00, 0xce, 0x08, 0x04, - 0x35, 0xe7, 0x00, 0xce, 0x08, 0x04, 0x35, 0xea, 0x08, 0x0c, 0xb2, 0xd3, - 0x0c, 0xb0, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x09, 0x04, 0x35, 0xe7, - 0x08, 0x04, 0x35, 0xb5, 0x20, 0x61, 0x1a, 0x74, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x00, 0xd0, 0x84, 0x01, 0x70, 0x61, 0x04, 0x62, 0x08, - 0x20, 0x61, 0x18, 0x00, 0x63, 0x54, 0x60, 0x74, 0x78, 0x9a, 0x60, 0xc0, - 0x78, 0x9e, 0x60, 0xbc, 0x78, 0xaa, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, - 0x90, 0x0e, 0x21, 0x10, 0x0c, 0x88, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x76, 0x37, 0x09, 0x04, 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x62, 0x54, 0x60, 0x74, 0x92, 0x02, 0x02, 0x48, 0x90, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x28, 0xdc, 0x08, 0x0c, 0x5a, 0x11, 0x01, 0x2e, - 0x08, 0x04, 0x35, 0xb5, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xea, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x01, 0x19, 0xaa, 0x20, 0x70, - 0x20, 0x61, 0x18, 0x47, 0x60, 0x08, 0x20, 0x72, 0x90, 0x0e, 0x20, 0x11, - 0x14, 0x00, 0x08, 0x0c, 0x93, 0x75, 0x72, 0x06, 0x00, 0xee, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x81, 0xff, 0x01, 0x28, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0b, 0x08, 0x04, - 0x35, 0xb7, 0x78, 0x84, 0xd0, 0xfc, 0x01, 0x58, 0x20, 0x01, 0x00, 0x2a, - 0x20, 0x04, 0x90, 0x05, 0x01, 0x80, 0x90, 0x82, 0x00, 0xe1, 0x02, 0x98, - 0x01, 0x2e, 0x08, 0x04, 0x35, 0xea, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, - 0x90, 0x05, 0x01, 0x28, 0x20, 0x69, 0x18, 0x47, 0x69, 0x08, 0x91, 0x02, - 0x12, 0x30, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xea, 0x01, 0x2e, 0x08, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0xb2, 0x3d, 0x0d, 0xd0, 0x78, 0x84, 0xd0, 0xfc, - 0x09, 0x04, 0x3b, 0x94, 0x00, 0xc6, 0x08, 0x0c, 0x4b, 0xe4, 0x00, 0xce, - 0x0d, 0x88, 0xa8, 0x67, 0x00, 0x00, 0x78, 0x84, 0xa8, 0x0a, 0x78, 0x98, - 0xa8, 0x0e, 0x78, 0x9c, 0xa8, 0x12, 0x20, 0x01, 0x00, 0x2e, 0x20, 0x04, - 0xa8, 0x1a, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, 0xa8, 0x1e, 0x20, 0x01, - 0x00, 0x30, 0x20, 0x04, 0xa8, 0x22, 0x20, 0x01, 0x00, 0x31, 0x20, 0x04, - 0xa8, 0x26, 0x20, 0x01, 0x00, 0x34, 0x20, 0x04, 0xa8, 0x2a, 0x20, 0x01, - 0x00, 0x35, 0x20, 0x04, 0xa8, 0x2e, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, - 0x90, 0x80, 0x00, 0x03, 0x90, 0x84, 0x00, 0xfc, 0x80, 0x04, 0xa8, 0x16, - 0x08, 0x0c, 0x3d, 0x1a, 0x09, 0x28, 0x70, 0x14, 0x20, 0x48, 0xad, 0x2c, - 0xac, 0x28, 0xab, 0x1c, 0xaa, 0x18, 0xa9, 0x30, 0xa8, 0x08, 0xd0, 0xb4, - 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, 0x89, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x1b, 0x08, 0x0c, 0x4c, 0x2d, 0x70, 0x1f, 0x3c, 0x57, - 0x70, 0x23, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x46, 0x00, 0x86, - 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x00, 0xf6, 0x08, 0x0c, 0x3a, 0xff, 0x20, 0x01, 0x19, 0xa0, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x21, 0x00, 0x0a, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, - 0x00, 0x16, 0x60, 0xbb, 0x00, 0x00, 0x60, 0xbf, 0x32, 0xe1, 0x60, 0xbf, - 0x00, 0x12, 0x08, 0x0c, 0x3d, 0x89, 0x08, 0x0c, 0x3d, 0x48, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0x86, 0x29, 0x40, 0x20, 0x71, 0x1a, 0x69, 0x20, 0x79, - 0x00, 0x90, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x84, 0xd0, 0xb4, - 0x01, 0x40, 0x20, 0x01, 0x00, 0x35, 0x20, 0x04, 0x78, 0x0e, 0x20, 0x01, - 0x00, 0x34, 0x20, 0x04, 0x78, 0x0a, 0x00, 0xde, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0x41, 0x30, 0x00, 0x8e, 0x00, 0xee, 0x00, 0xfe, 0x08, 0x0c, - 0x40, 0x52, 0x08, 0x0c, 0x3f, 0x57, 0x05, 0xb8, 0x20, 0x01, 0x02, 0x0b, - 0x20, 0x04, 0x90, 0x84, 0x01, 0x40, 0x1d, 0xb8, 0x08, 0x0c, 0x41, 0xa4, - 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x78, 0xbc, 0x00, 0xfe, 0x90, 0x8c, - 0x00, 0x70, 0x15, 0x60, 0x20, 0x71, 0x02, 0x00, 0x70, 0x37, 0x00, 0x00, - 0x70, 0x50, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x32, 0x00, 0x15, 0x10, - 0x70, 0x37, 0x00, 0x01, 0x70, 0x50, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, - 0xe1, 0x00, 0x11, 0xd0, 0x70, 0x37, 0x00, 0x00, 0x70, 0x54, 0x70, 0x37, - 0x00, 0x00, 0x71, 0x5c, 0x91, 0x06, 0x11, 0x90, 0x20, 0x01, 0x18, 0x20, - 0x20, 0x04, 0x91, 0x06, 0x11, 0x68, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x60, 0x24, 0x90, 0x84, 0x1e, 0x00, 0x00, 0xce, 0x01, 0x38, 0x08, 0x0c, - 0x3f, 0x61, 0x08, 0x0c, 0x3d, 0x43, 0x00, 0x58, 0x08, 0x0c, 0x3d, 0x43, - 0x08, 0x0c, 0x40, 0xc8, 0x08, 0x0c, 0x40, 0x48, 0x20, 0x01, 0x02, 0x0b, - 0x20, 0x04, 0xd0, 0xe4, 0x0d, 0xd8, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, - 0x00, 0x04, 0x20, 0x61, 0x01, 0x00, 0x60, 0x27, 0x00, 0x02, 0x00, 0x1e, - 0x61, 0x06, 0x20, 0x11, 0x02, 0x0d, 0x20, 0x13, 0x00, 0x20, 0x60, 0xbb, - 0x00, 0x00, 0x60, 0xbf, 0x01, 0x08, 0x60, 0xbf, 0x00, 0x12, 0x20, 0x01, - 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0xfd, 0x21, 0x02, 0x08, 0x0c, - 0x12, 0xfc, 0x20, 0x09, 0x00, 0x28, 0x08, 0x0c, 0x24, 0x09, 0x20, 0x01, - 0x02, 0x27, 0x20, 0x0c, 0x21, 0x02, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x4e, - 0x20, 0x01, 0x19, 0xa0, 0x20, 0x04, 0x90, 0x05, 0x11, 0x18, 0x01, 0x2e, - 0x08, 0x04, 0x35, 0xb5, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0c, 0x08, 0x04, - 0x35, 0xb7, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, - 0x00, 0x76, 0x00, 0x86, 0x00, 0x96, 0x00, 0xd6, 0x01, 0x56, 0x70, 0x14, - 0x20, 0x48, 0x70, 0x20, 0x20, 0xa8, 0x80, 0x00, 0x70, 0x22, 0xa8, 0x04, - 0x90, 0x05, 0x09, 0x04, 0x3c, 0xb3, 0x20, 0x48, 0x1f, 0x04, 0x3c, 0x67, - 0x70, 0x68, 0x20, 0x40, 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, - 0xa9, 0x30, 0xa8, 0x08, 0xd0, 0xb4, 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, - 0x20, 0x21, 0x00, 0x00, 0x00, 0x96, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, - 0x00, 0x9e, 0x90, 0x86, 0x01, 0x03, 0x01, 0x70, 0x89, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x1b, 0x08, 0x0c, 0x4c, 0x2d, 0x70, 0x1f, 0x3c, 0x57, 0x00, 0xb0, - 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x1b, 0x21, 0xa8, 0x27, 0xe0, 0x20, 0x98, - 0x27, 0xe8, 0x20, 0xa0, 0x00, 0x06, 0x08, 0x0c, 0x0f, 0x8b, 0x00, 0x0e, - 0x08, 0x0c, 0x4c, 0x30, 0x70, 0x1f, 0x3c, 0x57, 0x01, 0x5e, 0x00, 0xde, - 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, - 0x90, 0x86, 0x01, 0x03, 0x11, 0x18, 0x70, 0x1f, 0x3d, 0x18, 0x04, 0x50, - 0x70, 0x14, 0x20, 0x48, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x20, 0x09, - 0x00, 0x7f, 0x08, 0x0c, 0x66, 0xb9, 0x01, 0x10, 0x90, 0x06, 0x00, 0x30, - 0xb8, 0x13, 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfd, 0x08, 0x0c, 0xd5, 0xa7, - 0x01, 0x5e, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x5e, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x09, 0x04, 0x35, 0xe7, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, - 0x00, 0x86, 0x00, 0x96, 0x00, 0xd6, 0x01, 0x56, 0x70, 0x1f, 0x3c, 0xea, - 0x70, 0x07, 0x00, 0x03, 0x08, 0x04, 0x3c, 0xa8, 0xa8, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x20, 0x21, 0x40, 0x0c, 0x09, 0x04, 0x35, 0xb7, 0x00, 0x76, - 0xad, 0x10, 0xac, 0x0c, 0xab, 0x24, 0xaa, 0x20, 0xa9, 0x30, 0xa8, 0x08, - 0xd0, 0xb4, 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, - 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x1b, 0x21, 0xa8, 0x27, 0xe0, 0x20, 0x98, - 0x27, 0xe8, 0x20, 0xa0, 0x00, 0x06, 0x08, 0x0c, 0x0f, 0x8b, 0x00, 0x0e, - 0x08, 0x0c, 0x4c, 0x30, 0x00, 0x7e, 0x70, 0x1f, 0x3c, 0x57, 0x70, 0x23, - 0x00, 0x01, 0x00, 0x05, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x56, 0x00, 0xc6, - 0xa8, 0x14, 0x90, 0x8a, 0x00, 0x1e, 0x02, 0x18, 0xa8, 0x33, 0x00, 0x1e, - 0x00, 0x10, 0xa8, 0x32, 0x00, 0x78, 0x81, 0xff, 0x01, 0x68, 0x00, 0x16, - 0x08, 0x0c, 0x4b, 0xe4, 0x00, 0x1e, 0x01, 0x30, 0xa8, 0x00, 0x20, 0x40, - 0xa0, 0x08, 0xa8, 0x0a, 0x21, 0x00, 0x0c, 0x58, 0x90, 0x06, 0x00, 0x10, - 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x01, 0x5e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x00, 0x78, 0x80, 0x90, 0x86, 0x00, 0x44, - 0x00, 0xfe, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x01, 0x19, 0xa0, 0x20, 0x03, - 0x00, 0x01, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x61, - 0x02, 0x00, 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, 0x60, 0x1a, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, 0x60, 0xce, 0x61, 0x04, - 0xc1, 0xac, 0x61, 0x06, 0x08, 0x0c, 0x4b, 0xe4, 0xa8, 0x13, 0x00, 0x19, - 0xa8, 0x17, 0x00, 0x01, 0x29, 0x00, 0xa8, 0x5a, 0x20, 0x01, 0x00, 0x2e, - 0x20, 0x04, 0xa8, 0x66, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, 0xa8, 0x6a, - 0x20, 0x61, 0x00, 0x90, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, 0x19, 0xaa, - 0x20, 0x04, 0x60, 0x36, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, - 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0xa8, 0x6e, - 0x60, 0x1a, 0xa8, 0x73, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x78, 0xca, - 0x90, 0x06, 0x60, 0x0a, 0x60, 0x0e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xe6, 0x08, 0x0c, 0x4b, 0xe4, 0x29, 0x40, 0xa0, 0x13, - 0x00, 0x19, 0xa0, 0x17, 0x00, 0x01, 0x28, 0x00, 0xa0, 0x5a, 0x20, 0x01, - 0x00, 0x30, 0x20, 0x04, 0xa8, 0x66, 0x20, 0x01, 0x00, 0x31, 0x20, 0x04, - 0xa8, 0x6a, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, - 0xa8, 0x6e, 0xa8, 0x73, 0x00, 0x00, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, - 0x00, 0x04, 0x20, 0x01, 0x03, 0x00, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, - 0x91, 0x8d, 0x00, 0x02, 0x21, 0x02, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x81, 0xff, 0x01, 0x48, 0x08, 0x0c, 0x2c, 0x59, - 0x11, 0x30, 0x90, 0x06, 0x08, 0x0c, 0x2b, 0xb1, 0x90, 0x06, 0x08, 0x0c, - 0x2b, 0x94, 0x20, 0x01, 0x19, 0x9f, 0x20, 0x03, 0x00, 0x00, 0x78, 0x84, - 0x90, 0x84, 0x00, 0x07, 0x00, 0x02, 0x3d, 0xd8, 0x3d, 0xe1, 0x3d, 0xea, - 0x3d, 0xd5, 0x3d, 0xd5, 0x3d, 0xd5, 0x3d, 0xd5, 0x3d, 0xd5, 0x01, 0x2e, - 0x08, 0x04, 0x35, 0xea, 0x20, 0x09, 0x01, 0x14, 0x21, 0x04, 0x90, 0x85, - 0x08, 0x00, 0x20, 0x0a, 0x08, 0x0c, 0x3f, 0xab, 0x00, 0xc0, 0x20, 0x09, - 0x01, 0x14, 0x21, 0x04, 0x90, 0x85, 0x40, 0x00, 0x20, 0x0a, 0x08, 0x0c, - 0x3f, 0xab, 0x00, 0x78, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x28, 0x01, 0x2e, - 0x20, 0x09, 0x00, 0x16, 0x08, 0x04, 0x35, 0xe7, 0x81, 0xff, 0x01, 0x28, - 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0b, 0x08, 0x04, 0x35, 0xb7, 0x20, 0x01, - 0x01, 0x41, 0x20, 0x04, 0xd0, 0xdc, 0x0d, 0xb0, 0x00, 0x86, 0x00, 0x96, - 0x00, 0xa6, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x08, 0x0c, 0x3a, 0xff, 0x20, 0x09, 0x01, 0x01, 0x21, 0x0c, 0x00, 0x16, - 0x7e, 0xc8, 0x7d, 0xcc, 0x90, 0x06, 0x20, 0x68, 0x20, 0x60, 0x20, 0x58, - 0x08, 0x0c, 0x42, 0x7f, 0x08, 0x0c, 0x41, 0xcf, 0x90, 0x3e, 0x27, 0x20, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x86, 0x29, 0x40, 0x20, 0x71, 0x1a, 0x69, - 0x20, 0x79, 0x00, 0x90, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x84, - 0xd0, 0xb4, 0x01, 0x20, 0x68, 0xd4, 0x78, 0x0e, 0x68, 0xd0, 0x78, 0x0a, - 0x00, 0xde, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0x30, 0x08, 0x0c, - 0x2c, 0x61, 0x08, 0x0c, 0x2c, 0x61, 0x08, 0x0c, 0x2c, 0x61, 0x08, 0x0c, - 0x2c, 0x61, 0x08, 0x0c, 0x41, 0x30, 0x00, 0x8e, 0x00, 0xee, 0x00, 0xfe, - 0x08, 0x0c, 0x40, 0x52, 0x20, 0x09, 0x9c, 0x40, 0x81, 0x09, 0x11, 0xb0, - 0x08, 0x0c, 0x3f, 0x61, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, - 0xff, 0xfd, 0x21, 0x02, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x20, 0x09, - 0x00, 0x17, 0x08, 0x0c, 0x35, 0xe7, 0x0c, 0xf8, 0x20, 0x01, 0x02, 0x0b, - 0x20, 0x04, 0x90, 0x84, 0x01, 0x40, 0x1d, 0x10, 0x00, 0xf6, 0x20, 0x79, - 0x00, 0x00, 0x78, 0x84, 0x00, 0xfe, 0xd0, 0xbc, 0x01, 0x78, 0x20, 0x01, - 0x02, 0x01, 0x20, 0x0c, 0x81, 0xff, 0x01, 0x50, 0x08, 0x0c, 0x40, 0x30, - 0x2d, 0x00, 0x9c, 0x05, 0x9b, 0x05, 0x01, 0x20, 0x08, 0x0c, 0x3f, 0x61, - 0x08, 0x04, 0x3f, 0x0e, 0x08, 0x0c, 0x41, 0xa4, 0x08, 0x0c, 0x40, 0xc8, - 0x08, 0x0c, 0x40, 0x13, 0x08, 0x0c, 0x40, 0x48, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x78, 0x24, 0xd0, 0xac, 0x01, 0x30, 0x8b, 0x58, 0x08, 0x0c, - 0x3f, 0x61, 0x00, 0xfe, 0x08, 0x04, 0x3f, 0x0e, 0x00, 0xfe, 0x08, 0x0c, - 0x3f, 0x57, 0x11, 0x50, 0x8d, 0x68, 0x20, 0x01, 0x00, 0x32, 0x26, 0x02, - 0x20, 0x01, 0x00, 0x33, 0x25, 0x02, 0x08, 0x0c, 0x3f, 0x61, 0x00, 0x80, - 0x87, 0xff, 0x01, 0x38, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, - 0x19, 0x08, 0x87, 0x39, 0x00, 0x38, 0x20, 0x01, 0x1a, 0x65, 0x20, 0x04, - 0x90, 0x86, 0x00, 0x00, 0x19, 0x04, 0x3e, 0x5e, 0x20, 0x01, 0x03, 0x2f, - 0x20, 0x03, 0x00, 0xf6, 0x86, 0x31, 0x12, 0x08, 0x85, 0x29, 0x25, 0x00, - 0x96, 0x05, 0x09, 0x04, 0x3f, 0x0e, 0x78, 0x84, 0xd0, 0xbc, 0x01, 0x28, - 0x2d, 0x00, 0x9c, 0x05, 0x9b, 0x05, 0x19, 0x04, 0x3f, 0x0e, 0xa0, 0x13, - 0x00, 0x19, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, 0x78, 0x84, - 0xd0, 0xac, 0x11, 0x48, 0x20, 0x01, 0x1a, 0x65, 0x20, 0x03, 0x00, 0x03, - 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x09, 0x00, 0x30, 0xa0, 0x17, - 0x00, 0x01, 0x78, 0xb4, 0x90, 0x05, 0x01, 0x08, 0xa0, 0x16, 0x28, 0x00, - 0xa0, 0x5a, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, 0x29, 0x00, - 0xa8, 0x5a, 0xa8, 0x13, 0x00, 0x19, 0x78, 0x84, 0xd0, 0xa4, 0x11, 0x80, - 0xa8, 0x17, 0x00, 0x00, 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x61, - 0x00, 0x90, 0x60, 0x2b, 0x00, 0x08, 0x20, 0x01, 0x02, 0x03, 0x20, 0x04, - 0x1f, 0x04, 0x3e, 0xe5, 0x00, 0xce, 0x00, 0x30, 0xa8, 0x17, 0x00, 0x01, - 0x78, 0xb0, 0x90, 0x05, 0x01, 0x08, 0xa8, 0x16, 0x00, 0xf6, 0x00, 0xc6, - 0x20, 0x79, 0x01, 0x00, 0x20, 0x61, 0x00, 0x90, 0x78, 0x27, 0x00, 0x02, - 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0x60, 0x1a, - 0x00, 0x06, 0x20, 0x01, 0x00, 0x2b, 0x20, 0x04, 0x60, 0x1e, 0x78, 0xc6, - 0x00, 0x0e, 0x78, 0xca, 0x00, 0xce, 0x00, 0xfe, 0x08, 0x04, 0x3e, 0x18, - 0x00, 0x1e, 0x00, 0xc6, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x27, 0x00, 0x02, 0x61, 0x06, 0x20, 0x11, - 0x02, 0x0d, 0x20, 0x13, 0x00, 0x20, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, - 0x91, 0x8c, 0xff, 0xfd, 0x21, 0x02, 0x08, 0x0c, 0x12, 0xfc, 0x78, 0x84, - 0x90, 0x84, 0x00, 0x03, 0x90, 0x86, 0x00, 0x02, 0x01, 0xa0, 0x20, 0x09, - 0x00, 0x28, 0x08, 0x0c, 0x24, 0x09, 0x20, 0x01, 0x02, 0x27, 0x20, 0x0c, - 0x21, 0x02, 0x60, 0x50, 0x90, 0x84, 0xb7, 0xef, 0x60, 0x52, 0x60, 0x2f, - 0x00, 0x00, 0x60, 0x4b, 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, - 0x00, 0x10, 0x00, 0xce, 0x2d, 0x08, 0x2c, 0x10, 0x2b, 0x18, 0x2b, 0x00, - 0x9c, 0x05, 0x9d, 0x05, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x11, 0x18, 0x01, 0x2e, - 0x08, 0x04, 0x35, 0xb5, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0c, 0x08, 0x04, - 0x35, 0xb7, 0x90, 0x85, 0x00, 0x01, 0x1d, 0x04, 0x3f, 0x60, 0x20, 0x91, - 0x60, 0x00, 0x84, 0x20, 0x94, 0x86, 0x00, 0x64, 0x00, 0x05, 0x20, 0x01, - 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, - 0x00, 0x04, 0x20, 0x01, 0x1a, 0x65, 0x20, 0x03, 0x00, 0x00, 0x00, 0x71, - 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0x24, 0x09, 0x20, 0x01, 0x02, 0x27, - 0x20, 0x24, 0x24, 0x02, 0x20, 0x01, 0x01, 0x09, 0x20, 0x03, 0x40, 0x00, - 0x90, 0x26, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x69, - 0x70, 0x00, 0x90, 0x86, 0x00, 0x00, 0x05, 0x20, 0x20, 0x79, 0x00, 0x90, - 0x20, 0x09, 0x02, 0x06, 0x21, 0x04, 0x20, 0x09, 0x02, 0x03, 0x21, 0x0c, - 0x91, 0x06, 0x11, 0x20, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, - 0x78, 0x2c, 0xd0, 0xfc, 0x0d, 0x88, 0x08, 0x0c, 0x41, 0xa4, 0x70, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x1d, 0x58, 0x78, 0x2b, 0x00, 0x04, 0x78, 0x2c, - 0xd0, 0xac, 0x1d, 0xe8, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, - 0x78, 0x2b, 0x00, 0x02, 0x70, 0x03, 0x00, 0x00, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, 0x18, 0x18, - 0x20, 0x0c, 0x79, 0x32, 0x79, 0x36, 0x08, 0x0c, 0x28, 0xbc, 0x78, 0x50, - 0x90, 0x84, 0xfb, 0xff, 0x90, 0x85, 0x00, 0x30, 0x78, 0x52, 0x20, 0x19, - 0x01, 0xf4, 0x83, 0x19, 0x1d, 0xf0, 0x90, 0x84, 0xff, 0xcf, 0x90, 0x85, - 0x20, 0x00, 0x78, 0x52, 0x20, 0xa9, 0x00, 0x46, 0x1d, 0x04, 0x3f, 0xc6, - 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x3f, 0xc6, 0x78, 0x50, 0x90, 0x85, - 0x04, 0x00, 0x90, 0x84, 0xdf, 0xff, 0x78, 0x52, 0x20, 0x01, 0x00, 0x21, - 0x20, 0x04, 0x90, 0x84, 0x00, 0x03, 0x90, 0x86, 0x00, 0x01, 0x11, 0x20, - 0x78, 0x50, 0x90, 0x84, 0xdf, 0xff, 0x78, 0x52, 0x78, 0x4b, 0xf7, 0xf7, - 0x78, 0x43, 0x00, 0x90, 0x78, 0x43, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x28, - 0xa0, 0x01, 0x1f, 0x04, 0x3f, 0xe6, 0x78, 0x50, 0x90, 0x85, 0x14, 0x00, - 0x78, 0x52, 0x20, 0x19, 0x61, 0xa8, 0x78, 0x54, 0xa0, 0x01, 0xa0, 0x01, - 0xd0, 0x8c, 0x11, 0x10, 0x83, 0x19, 0x1d, 0xc8, 0x78, 0x27, 0x00, 0x48, - 0x78, 0x50, 0x90, 0x85, 0x04, 0x00, 0x78, 0x52, 0x78, 0x43, 0x00, 0x40, - 0x20, 0x19, 0x01, 0xf4, 0xa0, 0x01, 0xa0, 0x01, 0x83, 0x19, 0x1d, 0xe0, - 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x78, 0x27, 0x00, 0x20, - 0x78, 0x43, 0x00, 0x00, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x78, 0x27, - 0x00, 0x48, 0x00, 0xfe, 0x00, 0x05, 0x78, 0x84, 0xd0, 0xac, 0x11, 0xc8, - 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x65, 0x20, 0x79, 0x03, 0x20, - 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x01, 0x60, 0x70, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x11, 0x40, 0x00, 0x51, 0xd0, 0xbc, 0x01, 0x08, - 0x87, 0x38, 0x70, 0x03, 0x00, 0x03, 0x78, 0x2b, 0x00, 0x19, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x78, 0xbc, - 0x00, 0xfe, 0x90, 0x8c, 0x00, 0x70, 0x01, 0x78, 0x20, 0x09, 0x00, 0x32, - 0x26, 0x0a, 0x20, 0x09, 0x00, 0x33, 0x25, 0x0a, 0xd0, 0xb4, 0x01, 0x08, - 0x8c, 0x60, 0xd0, 0xac, 0x01, 0x08, 0x8d, 0x68, 0xd0, 0xa4, 0x01, 0x08, - 0x8b, 0x58, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x78, 0x1c, - 0xd0, 0x84, 0x01, 0x10, 0x78, 0x37, 0x00, 0x50, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x01, 0x00, 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, - 0x70, 0xe2, 0x08, 0x0c, 0x3d, 0x39, 0x11, 0x88, 0x20, 0x01, 0x18, 0x20, - 0x20, 0x04, 0x20, 0x09, 0x18, 0x1f, 0x21, 0x0c, 0x91, 0x8c, 0x00, 0xff, - 0x70, 0x6e, 0x71, 0x6a, 0x70, 0x66, 0x91, 0x8d, 0x32, 0x00, 0x71, 0x62, - 0x70, 0x73, 0xe1, 0x09, 0x00, 0x80, 0x70, 0x2c, 0x90, 0x85, 0x00, 0x02, - 0x70, 0x2e, 0x20, 0x09, 0x18, 0x18, 0x21, 0x0c, 0x71, 0x6e, 0x70, 0x63, - 0x01, 0x00, 0x71, 0x66, 0x71, 0x9e, 0x70, 0x6b, 0x00, 0x00, 0x70, 0x73, - 0x08, 0x09, 0x70, 0x77, 0x00, 0x08, 0x70, 0x78, 0x90, 0x80, 0x01, 0x00, - 0x70, 0x7a, 0x70, 0x80, 0x80, 0x00, 0x70, 0x82, 0x70, 0x87, 0xaa, 0xaa, - 0x90, 0x06, 0x70, 0x8a, 0x70, 0x8e, 0x70, 0x7e, 0x70, 0xd6, 0x70, 0xab, - 0x00, 0x36, 0x70, 0xaf, 0x95, 0xd5, 0x70, 0x14, 0x90, 0x84, 0x19, 0x84, - 0x90, 0x85, 0x00, 0x92, 0x70, 0x16, 0x08, 0x0c, 0x41, 0xa4, 0x00, 0xf6, - 0x20, 0x71, 0x1a, 0x65, 0x20, 0x79, 0x03, 0x20, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x00, 0x68, 0x84, 0xd0, 0xb4, 0x01, 0x20, 0x68, 0x9c, 0x78, 0x0e, - 0x68, 0x98, 0x78, 0x0a, 0x00, 0xde, 0x08, 0x0c, 0x3d, 0x39, 0x01, 0x40, - 0x20, 0x01, 0x19, 0x9f, 0x20, 0x0c, 0x20, 0x03, 0x00, 0x01, 0x91, 0x8e, - 0x00, 0x01, 0x01, 0x20, 0x20, 0x09, 0x03, 0xe8, 0x81, 0x09, 0x1d, 0xf0, - 0x79, 0x2c, 0xd1, 0xfc, 0x01, 0x10, 0x78, 0x2b, 0x00, 0x04, 0x20, 0x11, - 0x00, 0x11, 0x08, 0x0c, 0x41, 0x30, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, - 0x41, 0x30, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, - 0x20, 0x71, 0x1a, 0x65, 0x20, 0x79, 0x03, 0x20, 0x79, 0x2c, 0xd1, 0xfc, - 0x09, 0x04, 0x41, 0x2d, 0x78, 0x2b, 0x00, 0x02, 0x90, 0x26, 0xd1, 0x9c, - 0x19, 0x04, 0x41, 0x29, 0x70, 0x00, 0x00, 0x02, 0x41, 0x2d, 0x40, 0xde, - 0x41, 0x0e, 0x41, 0x29, 0xd1, 0xbc, 0x11, 0x70, 0xd1, 0xdc, 0x11, 0x90, - 0x80, 0x01, 0x70, 0x02, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0x30, - 0x09, 0x04, 0x41, 0x2d, 0x08, 0x0c, 0x41, 0x30, 0x08, 0x04, 0x41, 0x2d, - 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x78, 0xbf, 0x00, 0x00, 0x00, 0xfe, - 0x78, 0x10, 0x79, 0x14, 0x78, 0x2b, 0x00, 0x04, 0x78, 0x12, 0x79, 0x16, - 0x20, 0x01, 0x02, 0x01, 0x20, 0x0c, 0x81, 0xff, 0x0d, 0xe8, 0x08, 0x0c, - 0x40, 0x30, 0x20, 0x09, 0x00, 0x01, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x78, 0xb8, 0x00, 0xfe, 0xd0, 0xec, 0x01, 0x10, 0x20, 0x09, 0x00, 0x11, - 0x79, 0x2a, 0x00, 0xf8, 0x80, 0x01, 0x70, 0x02, 0x91, 0x84, 0x08, 0x80, - 0x11, 0x40, 0x78, 0x2c, 0xd0, 0xfc, 0x19, 0x04, 0x40, 0xd2, 0x20, 0x11, - 0x00, 0x01, 0x00, 0xb1, 0x00, 0x90, 0xa0, 0x10, 0x90, 0x92, 0x00, 0x04, - 0x90, 0x86, 0x00, 0x15, 0x11, 0x20, 0xa0, 0x00, 0xa0, 0x5a, 0x20, 0x11, - 0x00, 0x31, 0xa2, 0x12, 0xd1, 0xdc, 0x19, 0x60, 0x08, 0x28, 0x78, 0x2b, - 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0xa0, 0x14, 0x90, 0x05, 0x05, 0x50, 0x80, 0x01, 0x00, 0x36, 0x00, 0x96, - 0xa0, 0x16, 0xa0, 0x58, 0x20, 0x48, 0xa0, 0x10, 0x20, 0x09, 0x00, 0x31, - 0x91, 0x1a, 0x83, 0x1c, 0x83, 0x1c, 0x93, 0x8a, 0x00, 0x07, 0x1a, 0x0c, - 0x0d, 0xc5, 0x93, 0x98, 0x41, 0x5e, 0x23, 0x1d, 0x08, 0x3f, 0x90, 0x80, - 0x00, 0x04, 0x7a, 0x2a, 0x71, 0x00, 0x81, 0x08, 0x71, 0x02, 0x00, 0x9e, - 0x00, 0x3e, 0x90, 0x8a, 0x00, 0x35, 0x11, 0x40, 0x00, 0x96, 0xa0, 0x58, - 0x20, 0x48, 0xa8, 0x04, 0xa0, 0x5a, 0x20, 0x01, 0x00, 0x19, 0x00, 0x9e, - 0xa0, 0x12, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x41, 0x9b, 0x41, 0x92, - 0x41, 0x89, 0x41, 0x80, 0x41, 0x77, 0x41, 0x6e, 0x41, 0x65, 0xa9, 0x64, - 0x79, 0x02, 0xa9, 0x68, 0x79, 0x06, 0xa9, 0x6c, 0x79, 0x12, 0xa9, 0x70, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0x74, 0x79, 0x02, 0xa9, 0x78, 0x79, 0x06, - 0xa9, 0x7c, 0x79, 0x12, 0xa9, 0x80, 0x79, 0x16, 0x00, 0x05, 0xa9, 0x84, - 0x79, 0x02, 0xa9, 0x88, 0x79, 0x06, 0xa9, 0x8c, 0x79, 0x12, 0xa9, 0x90, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0x94, 0x79, 0x02, 0xa9, 0x98, 0x79, 0x06, - 0xa9, 0x9c, 0x79, 0x12, 0xa9, 0xa0, 0x79, 0x16, 0x00, 0x05, 0xa9, 0xa4, - 0x79, 0x02, 0xa9, 0xa8, 0x79, 0x06, 0xa9, 0xac, 0x79, 0x12, 0xa9, 0xb0, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0xb4, 0x79, 0x02, 0xa9, 0xb8, 0x79, 0x06, - 0xa9, 0xbc, 0x79, 0x12, 0xa9, 0xc0, 0x79, 0x16, 0x00, 0x05, 0xa9, 0xc4, - 0x79, 0x02, 0xa9, 0xc8, 0x79, 0x06, 0xa9, 0xcc, 0x79, 0x12, 0xa9, 0xd0, - 0x79, 0x16, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x86, 0x20, 0x71, - 0x1a, 0x69, 0x20, 0x79, 0x00, 0x90, 0x79, 0x2c, 0xd1, 0xfc, 0x01, 0xe8, - 0x78, 0x2b, 0x00, 0x02, 0x29, 0x40, 0x90, 0x26, 0x70, 0x00, 0x00, 0x02, - 0x41, 0xcb, 0x41, 0xb7, 0x41, 0xc2, 0x80, 0x01, 0x70, 0x02, 0xd1, 0x9c, - 0x11, 0x80, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0x30, 0x19, 0x0c, - 0x41, 0x30, 0x00, 0x48, 0x80, 0x01, 0x70, 0x02, 0x78, 0x2c, 0xd0, 0xfc, - 0x1d, 0x38, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0x30, 0x00, 0x8e, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x86, 0x20, 0x61, 0x02, 0x00, 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, - 0x60, 0x1a, 0x20, 0x61, 0x01, 0x00, 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, - 0x60, 0xce, 0x61, 0x04, 0xc1, 0xac, 0x61, 0x06, 0x20, 0x01, 0x00, 0x2c, - 0x20, 0x04, 0x90, 0x05, 0x05, 0x20, 0x20, 0x38, 0x20, 0x01, 0x00, 0x2e, - 0x20, 0x24, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x1c, 0x08, 0x0c, 0x4b, 0xe4, - 0xa8, 0x13, 0x00, 0x19, 0xaf, 0x16, 0x29, 0x00, 0xa8, 0x5a, 0x97, 0x8a, - 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, 0x20, 0x09, 0x00, 0x07, 0x00, 0x10, - 0x27, 0x08, 0x90, 0x3e, 0x00, 0x96, 0xa8, 0x58, 0x20, 0x48, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x19, 0x00, 0x9e, 0x08, 0x0c, 0x42, 0x47, 0x1d, 0x68, - 0x29, 0x00, 0xa8, 0x5a, 0x00, 0xd0, 0x08, 0x0c, 0x4b, 0xe4, 0xa8, 0x13, - 0x00, 0x19, 0xa8, 0x17, 0x00, 0x01, 0x29, 0x00, 0xa8, 0x5a, 0x20, 0x01, - 0x00, 0x2e, 0x20, 0x04, 0xa8, 0x66, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, - 0xa8, 0x6a, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, - 0xa8, 0x6e, 0x20, 0x01, 0x00, 0x2b, 0x20, 0x04, 0xa8, 0x72, 0x20, 0x61, - 0x00, 0x90, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, - 0x60, 0x36, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x24, 0x09, 0x20, 0x01, - 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0x60, 0x1a, 0x00, 0x06, - 0x20, 0x01, 0x00, 0x2b, 0x20, 0x04, 0x60, 0x1e, 0x78, 0xc6, 0x00, 0x0e, - 0x78, 0xca, 0x90, 0x06, 0x60, 0x0a, 0x60, 0x0e, 0x00, 0x8e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x80, - 0xaa, 0x60, 0x22, 0xe8, 0x20, 0xa0, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, - 0x00, 0x88, 0x70, 0x2b, 0x00, 0x26, 0x74, 0x02, 0x73, 0x06, 0x90, 0x06, - 0x70, 0x0a, 0x70, 0x0e, 0x81, 0x0b, 0x81, 0x0b, 0x21, 0xa8, 0x81, 0x0b, - 0x71, 0x12, 0x70, 0x2b, 0x00, 0x41, 0x70, 0x2c, 0xd0, 0xfc, 0x0d, 0xe8, - 0x70, 0x2b, 0x00, 0x02, 0x70, 0x2b, 0x00, 0x40, 0x40, 0x05, 0x74, 0x00, - 0x73, 0x04, 0x87, 0xff, 0x01, 0x90, 0x00, 0x86, 0x00, 0x96, 0x29, 0x40, - 0x00, 0x86, 0x08, 0x0c, 0x4b, 0xe4, 0x00, 0x8e, 0xa0, 0x58, 0x00, 0xa6, - 0x20, 0x50, 0x29, 0x00, 0xb0, 0x06, 0xa0, 0x5a, 0x00, 0xae, 0x00, 0x9e, - 0x00, 0x8e, 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x01, 0x00, 0x2d, 0x20, 0x04, 0x90, 0x05, 0x05, 0x28, 0x20, 0x38, - 0x20, 0x01, 0x00, 0x30, 0x20, 0x24, 0x20, 0x01, 0x00, 0x31, 0x20, 0x1c, - 0x08, 0x0c, 0x4b, 0xe4, 0x29, 0x40, 0xa8, 0x13, 0x00, 0x19, 0xaf, 0x16, - 0x29, 0x00, 0xa8, 0x5a, 0x97, 0x8a, 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, - 0x20, 0x09, 0x00, 0x07, 0x00, 0x10, 0x27, 0x08, 0x90, 0x3e, 0x00, 0x96, - 0xa8, 0x58, 0x20, 0x48, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x00, 0x9e, - 0x08, 0x0c, 0x42, 0x47, 0x1d, 0x68, 0x29, 0x00, 0xa8, 0x5a, 0x00, 0xd8, - 0x08, 0x0c, 0x4b, 0xe4, 0x29, 0x40, 0xa0, 0x13, 0x00, 0x19, 0xa0, 0x17, - 0x00, 0x01, 0x28, 0x00, 0xa0, 0x5a, 0x20, 0x01, 0x00, 0x30, 0x20, 0x04, - 0xa0, 0x66, 0x20, 0x01, 0x00, 0x31, 0x20, 0x04, 0xa0, 0x6a, 0x20, 0x01, - 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0xa0, 0x6e, 0x20, 0x01, - 0x00, 0x2b, 0x20, 0x04, 0xa0, 0x72, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, - 0x00, 0x04, 0x78, 0x84, 0xd0, 0xac, 0x11, 0x80, 0x20, 0x01, 0x01, 0x01, - 0x20, 0x0c, 0x91, 0x8d, 0x02, 0x00, 0x21, 0x02, 0xa0, 0x17, 0x00, 0x00, - 0x20, 0x01, 0x1a, 0x65, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, 0x03, 0x2a, - 0x20, 0x03, 0x00, 0x09, 0x20, 0x01, 0x03, 0x00, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x00, 0x04, - 0x20, 0x0c, 0x91, 0x8d, 0x00, 0x02, 0x21, 0x02, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x07, 0x20, 0xa1, - 0x18, 0x40, 0x20, 0xe9, 0x00, 0x01, 0x90, 0x06, 0x40, 0x04, 0x20, 0xa9, - 0x00, 0x14, 0x20, 0xa1, 0xff, 0xec, 0x20, 0xe9, 0x00, 0x00, 0x90, 0x06, - 0x40, 0x04, 0x20, 0x09, 0x01, 0x3c, 0x20, 0x0a, 0x01, 0x2e, 0x78, 0x80, - 0x90, 0x86, 0x00, 0x52, 0x01, 0x08, 0x00, 0x05, 0x08, 0x04, 0x35, 0xb5, - 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x36, 0xb9, 0x08, 0x0c, 0x76, 0x37, - 0x19, 0x0c, 0x60, 0xf3, 0x60, 0x40, 0x90, 0x84, 0x00, 0x20, 0x09, 0xb1, - 0x20, 0x69, 0x18, 0x47, 0x2d, 0x00, 0x20, 0x09, 0x00, 0x30, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x01, 0x08, 0x0c, - 0x4c, 0x2d, 0x70, 0x1f, 0x43, 0x26, 0x00, 0x05, 0x08, 0x0c, 0x57, 0xe4, - 0x11, 0x30, 0x3b, 0x00, 0x3a, 0x08, 0xc1, 0x94, 0xc0, 0x95, 0x20, 0xd8, - 0x21, 0xd0, 0x20, 0x69, 0x18, 0x47, 0x68, 0x00, 0x90, 0x05, 0x09, 0x04, - 0x35, 0xea, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x68, 0x04, - 0x01, 0x18, 0xc0, 0xa4, 0xc0, 0xac, 0x68, 0x06, 0xd0, 0xac, 0x01, 0x18, - 0xd0, 0xa4, 0x09, 0x04, 0x35, 0xea, 0xd0, 0x94, 0x00, 0xc6, 0x20, 0x61, - 0x01, 0x00, 0x61, 0x04, 0x01, 0x38, 0x62, 0x00, 0x92, 0x92, 0x00, 0x05, - 0x02, 0x18, 0x91, 0x8c, 0xff, 0xdf, 0x00, 0x10, 0x91, 0x8d, 0x00, 0x20, - 0x61, 0x06, 0x00, 0xce, 0xd0, 0x8c, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x61, 0x04, 0x01, 0x18, 0x91, 0x8d, 0x00, 0x10, 0x00, 0x10, 0x91, 0x8c, - 0xff, 0xef, 0x61, 0x06, 0x00, 0xce, 0xd0, 0x84, 0x01, 0x58, 0x6a, 0x28, - 0x92, 0x8a, 0x00, 0x7f, 0x1a, 0x04, 0x35, 0xea, 0x92, 0x88, 0x33, 0xb6, - 0x21, 0x0d, 0x91, 0x8c, 0x00, 0xff, 0x61, 0x66, 0xd0, 0xdc, 0x01, 0x30, - 0x68, 0x28, 0x90, 0x8a, 0x00, 0x7f, 0x1a, 0x04, 0x35, 0xea, 0x60, 0x5e, - 0x68, 0x88, 0x90, 0x84, 0x00, 0x30, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x00, 0x06, 0x20, 0x09, 0x19, 0xb2, 0x90, 0x80, 0x29, 0xb7, - 0x20, 0x05, 0x20, 0x0a, 0x00, 0x0e, 0x20, 0x09, 0x19, 0xb3, 0x90, 0x80, - 0x29, 0xbb, 0x20, 0x05, 0x20, 0x0a, 0x68, 0x08, 0x90, 0x8a, 0x01, 0x00, - 0x0a, 0x04, 0x35, 0xea, 0x90, 0x8a, 0x08, 0x41, 0x1a, 0x04, 0x35, 0xea, - 0x90, 0x84, 0x00, 0x07, 0x19, 0x04, 0x35, 0xea, 0x68, 0x0c, 0x90, 0x05, - 0x09, 0x04, 0x35, 0xea, 0x68, 0x10, 0x90, 0x05, 0x09, 0x04, 0x35, 0xea, - 0x68, 0x48, 0x69, 0x40, 0x91, 0x0a, 0x1a, 0x04, 0x35, 0xea, 0x80, 0x01, - 0x09, 0x04, 0x35, 0xea, 0x68, 0x4c, 0x69, 0x44, 0x91, 0x0a, 0x1a, 0x04, - 0x35, 0xea, 0x80, 0x01, 0x09, 0x04, 0x35, 0xea, 0x20, 0x09, 0x19, 0x81, - 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0xc4, - 0x01, 0x40, 0x78, 0x84, 0x20, 0x0a, 0x20, 0x08, 0x08, 0x0c, 0x0e, 0x52, - 0x3b, 0x00, 0xc0, 0x85, 0x20, 0xd8, 0x68, 0x14, 0x90, 0x8c, 0x00, 0xff, - 0x61, 0x4e, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x60, 0x52, 0x08, 0x0c, - 0x79, 0x63, 0x08, 0x0c, 0x6b, 0x8e, 0x08, 0x0c, 0x6b, 0xf8, 0x68, 0x08, - 0x60, 0x2a, 0x08, 0x0c, 0x23, 0x7b, 0x20, 0x09, 0x01, 0x70, 0x20, 0x0b, - 0x00, 0x80, 0xa0, 0x01, 0xa0, 0x01, 0x20, 0x0b, 0x00, 0x00, 0x00, 0x36, - 0x6b, 0x08, 0x08, 0x0c, 0x29, 0x16, 0x00, 0x3e, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x00, 0x19, 0x04, 0x44, 0xcf, 0x68, 0x18, 0x69, 0x1c, 0x6a, 0x20, - 0x6b, 0x24, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, 0x60, 0x16, - 0x61, 0x1a, 0x62, 0x1e, 0x63, 0x22, 0x6c, 0x04, 0xd4, 0xf4, 0x01, 0x48, - 0x68, 0x30, 0x69, 0x34, 0x6a, 0x38, 0x6b, 0x3c, 0x80, 0x07, 0x81, 0x0f, - 0x82, 0x17, 0x83, 0x1f, 0x00, 0x10, 0x90, 0x84, 0xf0, 0xff, 0x60, 0x06, - 0x61, 0x0a, 0x62, 0x0e, 0x63, 0x12, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, - 0x83, 0x1f, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xa1, 0x19, 0xb4, 0x20, 0xe9, - 0x00, 0x01, 0x40, 0x01, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xa1, 0x19, 0xce, - 0x20, 0xe9, 0x00, 0x01, 0x40, 0x01, 0x08, 0x0c, 0x89, 0x62, 0x00, 0xc6, - 0x90, 0x0e, 0x20, 0xa9, 0x00, 0x01, 0x6b, 0x70, 0xd3, 0x84, 0x05, 0x10, - 0x00, 0x68, 0x20, 0x09, 0x01, 0x00, 0x21, 0x0c, 0x91, 0x8e, 0x00, 0x08, - 0x11, 0x10, 0x83, 0x9d, 0x00, 0x10, 0x83, 0xf5, 0x3e, 0x18, 0x12, 0xb0, - 0x35, 0x08, 0x81, 0x09, 0x08, 0x0c, 0x7f, 0x6f, 0x68, 0x78, 0x60, 0x16, - 0x68, 0x74, 0x20, 0x08, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x60, 0x0a, - 0x91, 0x84, 0x00, 0xff, 0x60, 0x06, 0x81, 0x08, 0x11, 0x18, 0x60, 0x03, - 0x00, 0x03, 0x00, 0x10, 0x60, 0x03, 0x00, 0x01, 0x1f, 0x04, 0x44, 0x1f, - 0x00, 0xce, 0x00, 0xc6, 0x20, 0x61, 0x19, 0x9c, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x11, 0xa8, 0x6a, 0x88, 0x92, 0x84, 0xc0, 0x00, - 0x20, 0x10, 0x92, 0x86, 0x00, 0x00, 0x11, 0x58, 0x20, 0x63, 0x00, 0x00, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x2b, 0xb1, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x2b, 0x94, 0x00, 0x88, 0x92, 0x86, 0x40, 0x00, 0x11, 0x48, - 0x20, 0x63, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x2b, 0xb1, 0x90, 0x06, - 0x08, 0x0c, 0x2b, 0x94, 0x00, 0x28, 0x92, 0x86, 0x80, 0x00, 0x1d, 0x30, - 0x20, 0x63, 0x00, 0x02, 0x00, 0xce, 0x00, 0xe6, 0x2c, 0x70, 0x08, 0x0c, - 0x0e, 0xa3, 0x00, 0xee, 0x68, 0x88, 0xd0, 0xec, 0x01, 0x30, 0x20, 0x11, - 0x01, 0x14, 0x22, 0x04, 0x90, 0x85, 0x01, 0x00, 0x20, 0x12, 0x6a, 0x80, - 0x92, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x30, 0x11, 0x28, 0x92, 0x94, - 0xff, 0xcf, 0x92, 0x95, 0x00, 0x20, 0x6a, 0x82, 0x20, 0x01, 0x19, 0x7c, - 0x6a, 0x80, 0x92, 0x94, 0x00, 0x30, 0x92, 0x8e, 0x00, 0x00, 0x01, 0x70, - 0x92, 0x8e, 0x00, 0x10, 0x01, 0x18, 0x92, 0x8e, 0x00, 0x20, 0x01, 0x40, - 0x20, 0x03, 0xaa, 0xaa, 0x08, 0x0c, 0x29, 0x8b, 0x20, 0x01, 0x19, 0x6d, - 0x21, 0x02, 0x00, 0x08, 0x21, 0x02, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, 0x00, 0xce, 0x08, 0x0c, - 0x76, 0x37, 0x01, 0x28, 0x08, 0x0c, 0x50, 0xcb, 0x01, 0x10, 0x08, 0x0c, - 0x28, 0xdc, 0x60, 0xd4, 0x90, 0x05, 0x01, 0xc0, 0x60, 0x03, 0x00, 0x01, - 0x20, 0x09, 0x44, 0xb7, 0x00, 0xe0, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x68, - 0x20, 0x11, 0x74, 0xb2, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, 0x74, 0xa5, - 0x08, 0x0c, 0x89, 0x17, 0x08, 0x0c, 0x79, 0x37, 0x08, 0x0c, 0x75, 0x63, - 0x00, 0x40, 0x08, 0x0c, 0x5f, 0xed, 0x00, 0x28, 0x60, 0x03, 0x00, 0x04, - 0x20, 0x09, 0x44, 0xcf, 0x00, 0x20, 0x08, 0x0c, 0x6a, 0x05, 0x08, 0x04, - 0x35, 0xb5, 0x20, 0x01, 0x01, 0x70, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x4c, 0x11, 0x18, 0x20, 0x91, 0x30, 0xbd, 0x08, 0x17, - 0x20, 0x91, 0x30, 0x3d, 0x08, 0x17, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, - 0x09, 0x04, 0x35, 0xe7, 0x20, 0x69, 0x18, 0x47, 0x78, 0x90, 0x68, 0x42, - 0x78, 0x94, 0x68, 0x46, 0x2d, 0x00, 0x20, 0x09, 0x00, 0x30, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x01, 0x08, 0x04, - 0x4c, 0x30, 0x90, 0x06, 0x08, 0x0c, 0x28, 0xdc, 0x81, 0xff, 0x19, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xb0, 0x08, 0x0c, 0x79, 0x32, - 0x08, 0x0c, 0x61, 0x2e, 0x08, 0x0c, 0x33, 0xaa, 0x01, 0x18, 0x61, 0x30, - 0xc1, 0x8d, 0x61, 0x32, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x30, 0x08, 0x0c, - 0x76, 0x5a, 0x11, 0x18, 0x08, 0x0c, 0x76, 0x0f, 0x00, 0x38, 0x08, 0x0c, - 0x75, 0x63, 0x00, 0x20, 0x08, 0x0c, 0x60, 0xf3, 0x08, 0x0c, 0x5f, 0xed, - 0x08, 0x04, 0x35, 0xb5, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x08, 0x0c, - 0x76, 0x37, 0x11, 0x10, 0x08, 0x04, 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x61, 0x94, 0x81, 0xff, 0x01, 0x90, 0x70, 0x4f, 0x00, 0x00, - 0x20, 0x01, 0x1c, 0x80, 0x20, 0x09, 0x00, 0x40, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x01, 0x08, 0x0c, 0x4c, 0x30, - 0x70, 0x1f, 0x35, 0xb3, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x4f, 0x00, 0x01, - 0x00, 0xd6, 0x20, 0x69, 0x1c, 0x80, 0x20, 0xa9, 0x00, 0x40, 0x20, 0xe9, - 0x00, 0x01, 0x20, 0xa1, 0x1c, 0x80, 0x20, 0x19, 0xff, 0xff, 0x43, 0x04, - 0x65, 0x5c, 0x95, 0x88, 0x33, 0xb6, 0x21, 0x0d, 0x91, 0x8c, 0x00, 0xff, - 0x21, 0x6a, 0x90, 0x0e, 0x20, 0x11, 0x00, 0x02, 0x21, 0x00, 0x95, 0x06, - 0x01, 0xa8, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x90, 0xb8, 0x14, 0x82, 0x1c, - 0x02, 0x38, 0x93, 0x98, 0x1c, 0x80, 0x90, 0x85, 0xff, 0x00, 0x80, 0x07, - 0x20, 0x1a, 0x00, 0x38, 0x93, 0x98, 0x1c, 0x80, 0x23, 0x24, 0x94, 0xa4, - 0xff, 0x00, 0x94, 0x05, 0x20, 0x1a, 0x82, 0x10, 0x81, 0x08, 0x91, 0x82, - 0x00, 0x80, 0x12, 0x08, 0x0c, 0x18, 0x82, 0x01, 0x80, 0x07, 0x2d, 0x0c, - 0x91, 0x05, 0x20, 0x6a, 0x00, 0xde, 0x20, 0xa9, 0x00, 0x40, 0x20, 0xa1, - 0x1c, 0x80, 0x20, 0x99, 0x1c, 0x80, 0x08, 0x0c, 0x60, 0x7e, 0x08, 0x04, - 0x45, 0x2c, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, - 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xb4, 0x05, 0x58, 0x78, 0x84, 0x90, 0x8e, - 0x00, 0x7e, 0x05, 0x38, 0x90, 0x8e, 0x00, 0x7f, 0x05, 0x20, 0x90, 0x8e, - 0x00, 0x80, 0x05, 0x08, 0x08, 0x0c, 0x33, 0xa5, 0x11, 0x48, 0xb8, 0x00, - 0xd0, 0x8c, 0x11, 0xd8, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x06, 0x11, 0xa8, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, - 0xa8, 0x6a, 0x08, 0x0c, 0xd2, 0xa3, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x45, 0xb7, - 0x00, 0x05, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x20, 0xa9, - 0x00, 0x2b, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x20, 0x98, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, - 0x20, 0xa9, 0x00, 0x08, 0x90, 0x80, 0x00, 0x06, 0x20, 0xa0, 0xb8, 0xc4, - 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, 0x08, 0x0c, - 0x0f, 0x8b, 0x00, 0x70, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x0a, 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, - 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0x8b, 0x89, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x02, 0x20, 0x09, 0x00, 0x2b, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, - 0x7d, 0x98, 0x08, 0x04, 0x4c, 0x30, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x4b, 0xfb, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x68, 0x96, - 0x09, 0x04, 0x35, 0xe7, 0x00, 0x58, 0xa8, 0x78, 0x90, 0x05, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, 0xa9, 0x74, 0xaa, 0x94, - 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x57, 0xdd, 0x09, 0x04, 0x35, 0xb5, - 0x70, 0x1f, 0x46, 0x01, 0x70, 0x07, 0x00, 0x03, 0x00, 0x05, 0x81, 0xff, - 0x19, 0x04, 0x35, 0xe7, 0x78, 0x88, 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, - 0x35, 0xea, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, - 0x6a, 0xa3, 0x01, 0x20, 0x08, 0x0c, 0x6a, 0xab, 0x19, 0x04, 0x35, 0xea, - 0x08, 0x0c, 0x69, 0x1b, 0x09, 0x04, 0x35, 0xe7, 0x20, 0x19, 0x00, 0x04, - 0x90, 0x0e, 0x08, 0x0c, 0x68, 0xa8, 0x09, 0x04, 0x35, 0xe7, 0x79, 0x84, - 0x7a, 0x88, 0x04, 0xc9, 0x08, 0xa8, 0xa8, 0x9c, 0x90, 0x8a, 0x10, 0x00, - 0x12, 0xf8, 0x08, 0x0c, 0x4c, 0x15, 0x01, 0xe0, 0x08, 0x0c, 0x6a, 0xa3, - 0x01, 0x18, 0x08, 0x0c, 0x6a, 0xab, 0x11, 0xb0, 0x08, 0x0c, 0x69, 0x1b, - 0x20, 0x09, 0x00, 0x02, 0x01, 0x68, 0x20, 0x09, 0x00, 0x02, 0x20, 0x19, - 0x00, 0x04, 0x08, 0x0c, 0x68, 0xa8, 0x20, 0x09, 0x00, 0x03, 0x01, 0x20, - 0xa9, 0x98, 0xaa, 0x9c, 0x00, 0xd1, 0x00, 0x60, 0xa8, 0x97, 0x40, 0x05, - 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, - 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x10, 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x05, 0x91, 0x86, - 0x00, 0xff, 0x01, 0x10, 0x00, 0x71, 0x00, 0x60, 0x20, 0x29, 0x00, 0x7e, - 0x20, 0x61, 0x18, 0x00, 0x64, 0x5c, 0x24, 0x00, 0x95, 0x06, 0x01, 0x10, - 0x25, 0x08, 0x00, 0x19, 0x85, 0x29, 0x1e, 0xc8, 0x00, 0x05, 0x08, 0x0c, - 0x67, 0x24, 0x11, 0x38, 0x22, 0x00, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0x91, 0x08, 0x08, 0x0c, 0x88, 0x4b, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, - 0x35, 0xe7, 0x79, 0x8c, 0x20, 0x01, 0x19, 0x80, 0x91, 0x8c, 0x80, 0x00, - 0x21, 0x02, 0x08, 0x0c, 0x4b, 0xfb, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, - 0x6a, 0xa3, 0x01, 0x20, 0x08, 0x0c, 0x6a, 0xab, 0x19, 0x04, 0x35, 0xea, - 0x08, 0x0c, 0x67, 0xeb, 0x09, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x68, 0x9f, - 0x09, 0x04, 0x35, 0xe7, 0x20, 0x01, 0x19, 0x80, 0x20, 0x04, 0xd0, 0xfc, - 0x19, 0x04, 0x35, 0xb5, 0x08, 0x04, 0x46, 0x0c, 0xa9, 0xa0, 0x20, 0x01, - 0x19, 0x80, 0x91, 0x8c, 0x80, 0x00, 0xc1, 0x8d, 0x21, 0x02, 0x08, 0x0c, - 0x4c, 0x08, 0x01, 0xa0, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0x08, 0x0c, - 0x6a, 0xab, 0x11, 0x70, 0x08, 0x0c, 0x67, 0xeb, 0x20, 0x09, 0x00, 0x02, - 0x01, 0x28, 0x08, 0x0c, 0x68, 0x9f, 0x11, 0x70, 0x20, 0x09, 0x00, 0x03, - 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, - 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, - 0xa8, 0x97, 0x40, 0x00, 0x20, 0x01, 0x19, 0x80, 0x20, 0x04, 0xd0, 0xfc, - 0x11, 0x28, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x10, 0x90, 0x06, 0x00, 0x18, - 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x05, - 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x79, 0x8c, 0x20, 0x01, 0x19, 0x7f, - 0x91, 0x8c, 0x80, 0x00, 0x21, 0x02, 0x08, 0x0c, 0x4b, 0xfb, 0x09, 0x04, - 0x35, 0xea, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x20, 0x08, 0x0c, 0x6a, 0xab, - 0x19, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x67, 0xeb, 0x09, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x68, 0x8d, 0x09, 0x04, 0x35, 0xe7, 0x20, 0x01, 0x19, 0x7f, - 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x35, 0xb5, 0x08, 0x04, 0x46, 0x0c, - 0xa9, 0xa0, 0x20, 0x01, 0x19, 0x7f, 0x91, 0x8c, 0x80, 0x00, 0xc1, 0x8d, - 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x08, 0x01, 0xa0, 0x08, 0x0c, 0x6a, 0xa3, - 0x01, 0x18, 0x08, 0x0c, 0x6a, 0xab, 0x11, 0x70, 0x08, 0x0c, 0x67, 0xeb, - 0x20, 0x09, 0x00, 0x02, 0x01, 0x28, 0x08, 0x0c, 0x68, 0x8d, 0x11, 0x70, - 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, - 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, 0x20, 0x01, 0x19, 0x7f, - 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x28, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x00, 0x00, 0x05, 0x61, 0x00, 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, - 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x57, 0xe9, 0x19, 0x04, - 0x35, 0xe7, 0x79, 0xa8, 0xd1, 0x84, 0x11, 0x58, 0xb8, 0x34, 0x80, 0x07, - 0x78, 0x9e, 0xb8, 0x30, 0x80, 0x07, 0x78, 0x9a, 0xbb, 0x2c, 0x83, 0x1f, - 0xba, 0x28, 0x82, 0x17, 0x00, 0x50, 0xb8, 0x24, 0x80, 0x07, 0x78, 0x9e, - 0xb8, 0x20, 0x80, 0x07, 0x78, 0x9a, 0xbb, 0x1c, 0x83, 0x1f, 0xba, 0x18, - 0x82, 0x17, 0xb9, 0x00, 0x91, 0x8c, 0x02, 0x02, 0x08, 0x04, 0x35, 0xb5, - 0x78, 0xa8, 0x90, 0x9c, 0x00, 0x03, 0xd0, 0xac, 0x11, 0x58, 0xd0, 0xb4, - 0x11, 0x48, 0x93, 0x9a, 0x00, 0x03, 0x1a, 0x04, 0x35, 0xe7, 0x62, 0x5c, - 0x78, 0x84, 0x92, 0x06, 0x19, 0x04, 0x47, 0xc7, 0x08, 0x0c, 0x89, 0x4c, - 0x20, 0x01, 0xff, 0xec, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x00, 0x00, 0x06, 0x78, 0xa8, - 0x90, 0x84, 0x00, 0x80, 0x15, 0x28, 0x00, 0x06, 0x00, 0x36, 0x20, 0x01, - 0x1a, 0x83, 0x20, 0x1c, 0x7b, 0x9a, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x1a, 0x84, 0x20, 0x1c, 0x7b, 0x9e, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x1a, 0x85, 0x20, 0x1c, 0x7b, 0xae, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x1a, 0x7f, 0x20, 0x1c, 0x7b, 0xaa, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x1a, 0x86, 0x20, 0x1c, 0x7b, 0xb2, 0x20, 0x03, 0x00, 0x00, 0x00, 0x3e, - 0x00, 0x0e, 0x00, 0x0e, 0x08, 0x04, 0x4c, 0x30, 0x00, 0x0e, 0x20, 0x31, - 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa6, 0x6a, 0xa1, 0x7a, - 0xa7, 0x72, 0xa0, 0x76, 0xa2, 0x8e, 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, - 0x08, 0x0c, 0x10, 0xf8, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, 0x47, 0xe7, - 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x4c, 0x17, - 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x6a, 0xa3, 0x19, 0x04, 0x35, 0xe7, - 0x00, 0xc6, 0x08, 0x0c, 0x4b, 0xe4, 0x00, 0xce, 0x09, 0x04, 0x35, 0xe7, - 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x7e, 0xa8, - 0x08, 0x0c, 0xd2, 0x49, 0x09, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1f, 0x48, 0x0d, 0x00, 0x05, 0x08, 0x0c, 0x42, 0xec, 0x00, 0x06, - 0x00, 0x36, 0x20, 0x01, 0x1a, 0x83, 0x20, 0x1c, 0x7b, 0x9a, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x1a, 0x84, 0x20, 0x1c, 0x7b, 0x9e, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x1a, 0x85, 0x20, 0x1c, 0x7b, 0xae, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x1a, 0x7f, 0x20, 0x1c, 0x7b, 0xaa, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x1a, 0x86, 0x20, 0x1c, 0x7b, 0xb2, 0x20, 0x03, - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x0e, 0x08, 0x04, 0x35, 0xb5, 0xa8, 0x30, - 0x90, 0x86, 0x01, 0x00, 0x09, 0x04, 0x35, 0xe7, 0x89, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, - 0x7d, 0x98, 0x08, 0x04, 0x4c, 0x30, 0x90, 0x06, 0x08, 0x0c, 0x28, 0xdc, - 0x78, 0xa8, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0xff, 0x01, 0x18, - 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x10, - 0x08, 0x0c, 0x60, 0xf3, 0x78, 0x88, 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, - 0x35, 0xea, 0x79, 0x84, 0x91, 0x86, 0x00, 0xff, 0x01, 0x38, 0x91, 0x82, - 0x00, 0x7f, 0x1a, 0x04, 0x35, 0xea, 0x21, 0x00, 0x08, 0x0c, 0x28, 0xa6, - 0x00, 0x26, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, - 0x19, 0xfb, 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x60, 0x7b, - 0x00, 0x00, 0x60, 0x7f, 0x00, 0x00, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x58, - 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x76, 0x7b, 0x08, 0x0c, 0x75, 0x63, 0x00, 0xd0, 0x08, 0x0c, - 0xb2, 0x44, 0x20, 0x61, 0x01, 0x00, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x81, 0x0f, 0x91, 0x05, 0x60, 0x4a, 0x60, 0x43, - 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, 0x19, 0x99, 0x20, 0x0b, - 0x00, 0x00, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, 0x60, 0x19, 0x08, 0x0c, - 0x88, 0xd5, 0x79, 0x84, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x10, 0x20, 0x09, - 0x00, 0xff, 0x7a, 0x88, 0x08, 0x0c, 0x46, 0x6f, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x79, 0x84, 0x08, 0x0c, 0x66, 0xb9, - 0x2b, 0x08, 0x19, 0x04, 0x35, 0xea, 0x08, 0x04, 0x35, 0xb5, 0x81, 0xff, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x60, 0xdc, - 0xd0, 0xac, 0x11, 0x30, 0xd0, 0x9c, 0x11, 0x20, 0x20, 0x09, 0x00, 0x05, - 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x81, 0xff, 0x09, 0x04, - 0x35, 0xea, 0x91, 0x92, 0x00, 0x21, 0x1a, 0x04, 0x35, 0xea, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, - 0x70, 0x2a, 0xaf, 0x60, 0x77, 0x36, 0x08, 0x0c, 0x4c, 0x2d, 0x70, 0x1f, - 0x48, 0xc4, 0x78, 0x80, 0x90, 0x86, 0x00, 0x6e, 0x01, 0x10, 0x70, 0x1f, - 0x52, 0x7d, 0x00, 0x05, 0x20, 0x09, 0x00, 0x80, 0x08, 0x0c, 0x67, 0x24, - 0x11, 0x18, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x20, 0x20, 0x21, 0x40, 0x0a, - 0x08, 0x04, 0x35, 0xb7, 0x00, 0xd6, 0x00, 0x96, 0xa9, 0x64, 0xaa, 0x6c, - 0xab, 0x70, 0xac, 0x74, 0xad, 0x78, 0xae, 0x7c, 0xa8, 0x84, 0x90, 0xbe, - 0x01, 0x00, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x12, 0x09, 0x04, - 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x13, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, - 0x01, 0x14, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x17, 0x09, 0x04, - 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x1a, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, - 0x01, 0x1c, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x21, 0x09, 0x04, - 0x49, 0x44, 0x90, 0xbe, 0x01, 0x31, 0x09, 0x04, 0x49, 0x44, 0x90, 0xbe, - 0x01, 0x71, 0x09, 0x04, 0x49, 0x5d, 0x90, 0xbe, 0x01, 0x73, 0x09, 0x04, - 0x49, 0x5d, 0x90, 0xbe, 0x01, 0xa1, 0x11, 0x28, 0xa8, 0x94, 0x80, 0x07, - 0xa8, 0x96, 0x08, 0x04, 0x49, 0x68, 0x90, 0xbe, 0x02, 0x12, 0x09, 0x04, - 0x49, 0x51, 0x90, 0xbe, 0x02, 0x13, 0x05, 0xe8, 0x90, 0xbe, 0x02, 0x14, - 0x05, 0x00, 0x90, 0xbe, 0x02, 0x17, 0x01, 0x88, 0x90, 0xbe, 0x02, 0x1a, - 0x11, 0x20, 0xa8, 0x9c, 0x80, 0x07, 0xa8, 0x9e, 0x04, 0xe0, 0x90, 0xbe, - 0x02, 0x1f, 0x05, 0xc8, 0x90, 0xbe, 0x03, 0x00, 0x05, 0xb0, 0x00, 0x9e, - 0x00, 0xde, 0x08, 0x04, 0x35, 0xea, 0x70, 0x28, 0x90, 0x80, 0x00, 0x10, - 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, - 0x00, 0x07, 0x08, 0x0c, 0x49, 0xa6, 0x70, 0x28, 0x90, 0x80, 0x00, 0x0e, - 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, - 0x00, 0x01, 0x08, 0x0c, 0x49, 0xa6, 0x00, 0xc8, 0x70, 0x28, 0x90, 0x80, - 0x00, 0x0c, 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, - 0x20, 0xa9, 0x00, 0x01, 0x08, 0x0c, 0x49, 0xb3, 0x00, 0xb8, 0x70, 0x28, - 0x90, 0x80, 0x00, 0x0e, 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, - 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, 0x08, 0x0c, 0x49, 0xb3, 0x70, 0x28, - 0x90, 0x80, 0x00, 0x0c, 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, - 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, 0x04, 0xf1, 0x00, 0xc6, 0x08, 0x0c, - 0x4b, 0xe4, 0x05, 0x50, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x67, - 0x01, 0x19, 0x90, 0x06, 0xa8, 0x82, 0xa8, 0x7f, 0x00, 0x20, 0xa8, 0x8b, - 0x00, 0x01, 0x81, 0x0b, 0xa9, 0xae, 0xa8, 0xb2, 0xaa, 0xb6, 0xab, 0xba, - 0xac, 0xbe, 0xad, 0xc2, 0xa9, 0xc6, 0xa8, 0xca, 0x00, 0xce, 0x00, 0x9e, - 0x00, 0xde, 0xa8, 0x66, 0xa8, 0x22, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, - 0xa8, 0x04, 0x20, 0x48, 0x08, 0x0c, 0xd2, 0x64, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x03, 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x49, 0x9d, 0x00, 0x05, 0x00, 0xce, 0x00, 0x9e, 0x00, 0xde, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0xa8, 0x20, 0x90, 0x86, 0x80, 0x01, - 0x19, 0x04, 0x35, 0xb5, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, - 0x00, 0x16, 0x00, 0x26, 0x35, 0x10, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x02, - 0x41, 0x04, 0x40, 0x04, 0x82, 0x11, 0x1d, 0xc8, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x35, 0x20, - 0x20, 0xa9, 0x00, 0x04, 0x40, 0x02, 0x43, 0x04, 0x42, 0x04, 0x41, 0x04, - 0x40, 0x04, 0x84, 0x21, 0x1d, 0xb8, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x04, 0x35, 0xe7, 0x60, 0xdc, 0xd0, 0xac, 0x11, 0x88, 0x20, 0x09, - 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x30, 0xd0, 0x9c, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x16, 0x08, 0x04, 0x35, 0xe7, 0xd0, 0x9c, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x05, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x78, 0xa8, - 0x20, 0x40, 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x20, 0x91, 0x82, 0x00, 0x7f, - 0x0a, 0x04, 0x35, 0xea, 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, 0x35, 0xea, - 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, 0x35, 0xea, 0x7a, 0x8c, 0x7b, 0x88, - 0x60, 0x7c, 0x93, 0x06, 0x11, 0x58, 0x60, 0x80, 0x92, 0x4e, 0x09, 0x04, - 0x35, 0xea, 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x20, 0x99, 0xcc, 0xff, 0x00, - 0x09, 0x04, 0x35, 0xea, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, - 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x98, 0x93, 0x86, 0x00, 0xff, - 0x01, 0x80, 0x00, 0x26, 0x20, 0x11, 0x80, 0x08, 0x08, 0x0c, 0x6a, 0xc7, - 0x00, 0x2e, 0x01, 0x48, 0x91, 0x8d, 0x80, 0x00, 0x08, 0x0c, 0x6b, 0x11, - 0x11, 0x20, 0x20, 0x01, 0x40, 0x09, 0x08, 0x04, 0x4a, 0x64, 0x08, 0x0c, - 0x4a, 0xf7, 0x09, 0x04, 0x4a, 0x6a, 0x00, 0x86, 0x90, 0xc6, 0x40, 0x00, - 0x00, 0x8e, 0x15, 0x38, 0x00, 0xc6, 0x00, 0x06, 0x00, 0x36, 0xb8, 0x18, - 0xbb, 0x1c, 0x93, 0x05, 0xbb, 0x20, 0x93, 0x05, 0xbb, 0x24, 0x93, 0x05, - 0xbb, 0x28, 0x93, 0x05, 0xbb, 0x2c, 0x93, 0x05, 0xbb, 0x30, 0x93, 0x05, - 0xbb, 0x34, 0x93, 0x05, 0x00, 0x3e, 0x05, 0x70, 0xd8, 0x8c, 0x11, 0x28, - 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x10, 0xc8, 0x9d, 0x04, 0x38, 0x90, 0x0e, - 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x00, 0x0e, 0x00, 0xce, 0x00, 0xb8, 0x90, 0xc6, - 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, 0x00, 0x90, 0x90, 0xc6, 0x40, 0x08, - 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, 0x00, 0x60, 0x90, 0xc6, 0x40, 0x09, - 0x11, 0x08, 0x00, 0x40, 0x90, 0xc6, 0x40, 0x06, 0x11, 0x08, 0x00, 0x20, - 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, 0x00, 0x0a, 0x20, 0x20, 0x01, 0x2e, - 0x08, 0x04, 0x35, 0xb7, 0x00, 0x0e, 0x00, 0xce, 0x2b, 0x00, 0x70, 0x26, - 0x00, 0x16, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xe6, 0x2c, 0x70, 0x08, 0x0c, - 0xb3, 0x25, 0x09, 0x04, 0x4a, 0xbf, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, - 0xd5, 0x54, 0x2e, 0x58, 0x00, 0xee, 0x00, 0xe6, 0x00, 0xc6, 0x08, 0x0c, - 0x4b, 0xe4, 0x00, 0xce, 0x2b, 0x70, 0x11, 0x58, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0xee, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, 0x01, 0x2e, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0x90, 0x0e, 0xa9, 0x66, 0xa9, 0x6a, - 0x29, 0x00, 0x60, 0x16, 0xa9, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xd8, 0x8c, - 0x01, 0x08, 0xc0, 0xf5, 0xa8, 0x6a, 0xd8, 0x9c, 0x11, 0x10, 0x08, 0x0c, - 0x32, 0x50, 0x60, 0x23, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, - 0xd8, 0x9c, 0x01, 0x38, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0x6a, - 0x20, 0x09, 0x00, 0x03, 0x00, 0x30, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0x6a, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0xb3, 0x52, 0x78, 0xa8, - 0xd0, 0x94, 0x01, 0x38, 0x00, 0xee, 0x70, 0x24, 0x00, 0xe6, 0x20, 0x58, - 0xb8, 0xcc, 0xc0, 0x8d, 0xb8, 0xce, 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, 0x01, 0x2e, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x03, 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x4a, 0xce, 0x00, 0x05, 0xa8, 0x30, 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, - 0xd1, 0x8c, 0x01, 0x40, 0x20, 0x08, 0x91, 0x8e, 0xde, 0xad, 0x11, 0x20, - 0x20, 0x21, 0x40, 0x09, 0x08, 0x04, 0x35, 0xb7, 0x90, 0x86, 0x01, 0x00, - 0x70, 0x24, 0x20, 0x58, 0x11, 0x38, 0x20, 0x09, 0x00, 0x04, 0xba, 0x04, - 0x92, 0x94, 0x00, 0xff, 0x08, 0x04, 0x57, 0x29, 0x90, 0x0e, 0xa8, 0x68, - 0xd0, 0xf4, 0x19, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, - 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, - 0x35, 0xb5, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, 0x83, 0xff, 0x09, 0x04, - 0x4b, 0x46, 0x90, 0x2e, 0x08, 0x0c, 0xb2, 0x3d, 0x01, 0x30, 0x90, 0x26, - 0x20, 0xa9, 0x08, 0x00, 0x20, 0x71, 0x10, 0x00, 0x00, 0x30, 0x20, 0x21, - 0x00, 0x7f, 0x20, 0xa9, 0x07, 0x81, 0x20, 0x71, 0x10, 0x7f, 0x2e, 0x04, - 0x90, 0x05, 0x11, 0xb8, 0x21, 0x00, 0x94, 0x06, 0x19, 0x04, 0x4b, 0x57, - 0x24, 0x28, 0x94, 0xce, 0x00, 0x7f, 0x11, 0x20, 0x92, 0xce, 0xff, 0xfd, - 0x15, 0x58, 0x00, 0x30, 0x94, 0xce, 0x00, 0x80, 0x11, 0x30, 0x92, 0xce, - 0xff, 0xfc, 0x15, 0x20, 0x93, 0xce, 0x00, 0xff, 0x15, 0x08, 0xc5, 0xfd, - 0x04, 0x80, 0x20, 0x58, 0xbf, 0x10, 0x27, 0x00, 0x93, 0x06, 0x11, 0xe8, - 0xbe, 0x14, 0x26, 0x00, 0x92, 0x06, 0x11, 0xc8, 0x24, 0x00, 0x91, 0x06, - 0x11, 0x80, 0xd8, 0x84, 0x05, 0x98, 0xd8, 0x94, 0x15, 0x88, 0x08, 0x0c, - 0x6a, 0x43, 0x15, 0x70, 0x20, 0x01, 0x40, 0x00, 0x04, 0x60, 0x08, 0x0c, - 0x6a, 0xa3, 0x15, 0x40, 0x20, 0x01, 0x40, 0x00, 0x04, 0x30, 0x20, 0x01, - 0x40, 0x07, 0x04, 0x18, 0x20, 0x01, 0x40, 0x06, 0x04, 0x00, 0x24, 0x00, - 0x91, 0x06, 0x11, 0x58, 0xbe, 0x14, 0x87, 0xff, 0x11, 0x28, 0x86, 0xff, - 0x09, 0x18, 0x08, 0x0c, 0xb2, 0x3d, 0x19, 0x00, 0x20, 0x01, 0x40, 0x08, - 0x00, 0x90, 0x84, 0x20, 0x8e, 0x70, 0x1f, 0x04, 0x4b, 0x0d, 0x85, 0xff, - 0x11, 0x30, 0x20, 0x01, 0x40, 0x09, 0x00, 0x48, 0x20, 0x01, 0x00, 0x01, - 0x00, 0x30, 0x08, 0x0c, 0x66, 0xb9, 0x1d, 0xd0, 0xbb, 0x12, 0xba, 0x16, - 0x90, 0x06, 0x90, 0x05, 0x00, 0x9e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, - 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, - 0x35, 0xe7, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, - 0x78, 0x84, 0x90, 0x05, 0x09, 0x04, 0x35, 0xea, 0x90, 0x96, 0x00, 0xff, - 0x01, 0x20, 0x90, 0x92, 0x00, 0x04, 0x1a, 0x04, 0x35, 0xea, 0x20, 0x10, - 0x29, 0x18, 0x08, 0x0c, 0x31, 0xf6, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x4b, 0x99, - 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x19, 0x04, 0x35, 0xb5, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x20, 0x91, 0x82, 0x00, 0x7f, 0x0a, 0x04, 0x35, 0xea, - 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, 0x35, 0xea, 0x91, 0x82, 0x08, 0x00, - 0x1a, 0x04, 0x35, 0xea, 0x20, 0x01, 0x94, 0x00, 0x08, 0x0c, 0x57, 0x84, - 0x19, 0x04, 0x35, 0xe7, 0x08, 0x04, 0x35, 0xb5, 0xa9, 0x98, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x18, 0x91, 0x82, 0x00, 0x7f, 0x02, 0x80, 0x91, 0x86, - 0x00, 0xff, 0x01, 0x68, 0x91, 0x82, 0x08, 0x00, 0x12, 0x50, 0x20, 0x01, - 0x94, 0x00, 0x08, 0x0c, 0x57, 0x84, 0x11, 0xa8, 0x00, 0x60, 0xa8, 0x97, - 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, - 0x40, 0x00, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, - 0x00, 0x05, 0x20, 0x09, 0x00, 0x0a, 0x0c, 0x48, 0x08, 0x0c, 0x10, 0x0e, - 0x01, 0x98, 0x90, 0x06, 0xa8, 0x02, 0x70, 0x14, 0x90, 0x05, 0x11, 0x20, - 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x00, 0x40, 0x70, 0x18, 0xa8, 0x02, - 0x00, 0x86, 0x20, 0x40, 0x29, 0x00, 0xa0, 0x06, 0x70, 0x1a, 0x00, 0x8e, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x79, 0x84, 0x08, 0x0c, 0x67, 0x24, - 0x11, 0x30, 0x7e, 0x88, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, - 0x02, 0x08, 0x90, 0x5e, 0x8b, 0xff, 0x00, 0x05, 0xa9, 0x98, 0x08, 0x0c, - 0x67, 0x24, 0x11, 0x30, 0xae, 0x9c, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, - 0x40, 0x00, 0x02, 0x08, 0x90, 0x5e, 0x8b, 0xff, 0x00, 0x05, 0xae, 0x98, - 0x00, 0x08, 0x7e, 0x84, 0x26, 0x08, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x08, - 0x00, 0x08, 0x90, 0x5e, 0x8b, 0xff, 0x00, 0x05, 0x00, 0x16, 0x71, 0x14, - 0x81, 0xff, 0x01, 0x28, 0x21, 0x48, 0xa9, 0x04, 0x08, 0x0c, 0x10, 0x40, - 0x0c, 0xc8, 0x71, 0x16, 0x71, 0x1a, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x31, - 0x00, 0x01, 0x00, 0x10, 0x20, 0x31, 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0xa6, 0x6a, 0xa1, 0x7a, 0xa7, 0x72, 0xa0, 0x76, 0xa2, 0x8e, - 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, 0x08, 0x0c, 0x10, 0xf8, 0x70, 0x07, - 0x00, 0x02, 0x70, 0x1f, 0x35, 0xb5, 0x00, 0x05, 0x00, 0xf6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x00, 0x00, 0x20, 0x01, 0x18, 0xb0, - 0x20, 0x04, 0x90, 0x05, 0x11, 0x90, 0x0e, 0x04, 0x4c, 0x61, 0x7a, 0x36, - 0x78, 0x33, 0x00, 0x12, 0x7a, 0x82, 0x7b, 0x86, 0x7c, 0x8a, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, - 0x11, 0xaa, 0x08, 0x04, 0x4c, 0xc7, 0x00, 0x16, 0x00, 0x86, 0x00, 0x96, - 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, 0x70, 0x44, 0x90, 0x05, - 0x15, 0x40, 0x71, 0x48, 0x91, 0x82, 0x00, 0x10, 0x02, 0x88, 0x70, 0x38, - 0x20, 0x60, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x04, 0x4c, 0xbf, 0xa8, 0x4b, - 0x00, 0x00, 0x29, 0x00, 0x70, 0x46, 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, - 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x46, 0x00, 0x98, 0x70, 0x38, 0x90, 0xe0, - 0x00, 0x04, 0x20, 0x01, 0x18, 0xba, 0x9c, 0x82, 0x18, 0xfa, 0x02, 0x10, - 0x20, 0x61, 0x18, 0xba, 0x2c, 0x00, 0x70, 0x3a, 0x71, 0x48, 0x81, 0xff, - 0x11, 0x08, 0x70, 0x3e, 0x81, 0x08, 0x71, 0x4a, 0x04, 0x60, 0x71, 0x48, - 0x81, 0x08, 0x71, 0x4a, 0x70, 0x44, 0x20, 0x40, 0xa1, 0x44, 0x21, 0x05, - 0x00, 0x16, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, 0x20, 0x60, - 0x00, 0x1e, 0x81, 0x08, 0x21, 0x05, 0x90, 0x05, 0xa1, 0x46, 0x15, 0x20, - 0x08, 0x0c, 0x10, 0x0e, 0x11, 0x30, 0x81, 0x09, 0xa9, 0x46, 0x71, 0x48, - 0x81, 0x09, 0x71, 0x4a, 0x00, 0xd8, 0x90, 0x06, 0xa8, 0x06, 0xa8, 0x4a, - 0xa0, 0x46, 0x28, 0x00, 0xa8, 0x02, 0x29, 0x00, 0xa0, 0x06, 0x70, 0x46, - 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x46, - 0x00, 0x58, 0x22, 0x62, 0x63, 0x06, 0x64, 0x0a, 0x00, 0xee, 0x00, 0xce, - 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x1e, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, - 0x2c, 0x00, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x4c, 0xe9, 0x4c, 0xe9, - 0x4c, 0xeb, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xef, 0x4c, 0xe9, - 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xf3, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xe9, - 0x4c, 0xf7, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xfb, 0x4c, 0xe9, - 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xff, 0x4c, 0xe9, 0x4c, 0xe9, 0x4c, 0xe9, - 0x4d, 0x04, 0x08, 0x0c, 0x0d, 0xc5, 0xa2, 0x76, 0xa3, 0x7a, 0xa4, 0x7e, - 0x08, 0x98, 0xa2, 0x86, 0xa3, 0x8a, 0xa4, 0x8e, 0x08, 0x78, 0xa2, 0x96, - 0xa3, 0x9a, 0xa4, 0x9e, 0x08, 0x58, 0xa2, 0xa6, 0xa3, 0xaa, 0xa4, 0xae, - 0x08, 0x38, 0xa2, 0xb6, 0xa3, 0xba, 0xa4, 0xbe, 0x08, 0x18, 0xa2, 0xc6, - 0xa3, 0xca, 0xa4, 0xce, 0x08, 0x04, 0x4c, 0xc2, 0xa2, 0xd6, 0xa3, 0xda, - 0xa4, 0xde, 0x08, 0x04, 0x4c, 0xc2, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, - 0x70, 0x48, 0x90, 0x05, 0x09, 0x04, 0x4d, 0x9b, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x0e, 0x04, 0x4d, 0x9a, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x00, - 0x00, 0xc6, 0x00, 0x96, 0x00, 0x86, 0x00, 0x76, 0x90, 0x06, 0x20, 0x38, - 0x70, 0x40, 0x20, 0x48, 0x90, 0x05, 0x05, 0x00, 0xa9, 0x48, 0x21, 0x05, - 0x00, 0x16, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, 0x20, 0x60, - 0x00, 0x1e, 0x81, 0x08, 0x21, 0x05, 0x90, 0x05, 0xa9, 0x4a, 0x19, 0x04, - 0x4d, 0x9d, 0xa8, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, 0x70, 0x42, - 0x29, 0x38, 0x20, 0x40, 0xa0, 0x03, 0x00, 0x00, 0x20, 0x01, 0x00, 0x02, - 0x90, 0x80, 0x20, 0xc7, 0x20, 0x05, 0xa0, 0x4a, 0x08, 0x04, 0x4d, 0x9d, - 0x70, 0x3c, 0x20, 0x60, 0x2c, 0x14, 0x63, 0x04, 0x64, 0x08, 0x65, 0x0c, - 0x22, 0x00, 0x78, 0x36, 0x78, 0x33, 0x00, 0x12, 0x78, 0x82, 0x23, 0x00, - 0x78, 0x86, 0x24, 0x00, 0x78, 0x8a, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x87, 0xff, - 0x01, 0x18, 0x27, 0x48, 0x08, 0x0c, 0x10, 0x40, 0x70, 0x48, 0x80, 0x01, - 0x70, 0x4a, 0x90, 0x05, 0x11, 0x70, 0x70, 0x40, 0x20, 0x48, 0x90, 0x05, - 0x01, 0x28, 0x08, 0x0c, 0x10, 0x40, 0x90, 0x06, 0x70, 0x42, 0x70, 0x46, - 0x70, 0x3b, 0x18, 0xba, 0x70, 0x3f, 0x18, 0xba, 0x04, 0x20, 0x70, 0x40, - 0x90, 0x05, 0x15, 0x08, 0x72, 0x38, 0x2c, 0x00, 0x92, 0x06, 0x01, 0x48, - 0x9c, 0x80, 0x00, 0x04, 0x90, 0xfa, 0x18, 0xfa, 0x02, 0x10, 0x20, 0x01, - 0x18, 0xba, 0x70, 0x3e, 0x00, 0xa0, 0x90, 0x06, 0x70, 0x3e, 0x70, 0x3a, - 0x70, 0x44, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x48, 0xa8, 0x00, - 0x90, 0x05, 0x1d, 0xe0, 0x29, 0x00, 0x70, 0x42, 0x20, 0x01, 0x00, 0x02, - 0x90, 0x80, 0x20, 0xc7, 0x20, 0x05, 0xa8, 0x4a, 0x00, 0x00, 0x00, 0x7e, - 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xce, 0x00, 0xfe, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x2c, 0x00, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x4d, 0xbc, - 0x4d, 0xbc, 0x4d, 0xbe, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xc3, - 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xc8, 0x4d, 0xbc, 0x4d, 0xbc, - 0x4d, 0xbc, 0x4d, 0xcd, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xd2, - 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xbc, 0x4d, 0xd7, 0x4d, 0xbc, 0x4d, 0xbc, - 0x4d, 0xbc, 0x4d, 0xdc, 0x08, 0x0c, 0x0d, 0xc5, 0xaa, 0x74, 0xab, 0x78, - 0xac, 0x7c, 0x08, 0x04, 0x4d, 0x48, 0xaa, 0x84, 0xab, 0x88, 0xac, 0x8c, - 0x08, 0x04, 0x4d, 0x48, 0xaa, 0x94, 0xab, 0x98, 0xac, 0x9c, 0x08, 0x04, - 0x4d, 0x48, 0xaa, 0xa4, 0xab, 0xa8, 0xac, 0xac, 0x08, 0x04, 0x4d, 0x48, - 0xaa, 0xb4, 0xab, 0xb8, 0xac, 0xbc, 0x08, 0x04, 0x4d, 0x48, 0xaa, 0xc4, - 0xab, 0xc8, 0xac, 0xcc, 0x08, 0x04, 0x4d, 0x48, 0xaa, 0xd4, 0xab, 0xd8, - 0xac, 0xdc, 0x08, 0x04, 0x4d, 0x48, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xb6, 0x00, 0xc6, 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x67, 0x24, - 0x20, 0x19, 0x00, 0x01, 0xb8, 0x5c, 0xd0, 0xac, 0x01, 0x10, 0x20, 0x19, - 0x00, 0x00, 0x20, 0x11, 0x80, 0x1b, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, - 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xc4, 0x01, 0x20, 0x20, 0x11, 0x80, 0x14, - 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x2e, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, - 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x30, 0xc0, 0x8d, - 0xc0, 0x85, 0xc0, 0xac, 0x60, 0x32, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x58, - 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x76, 0x7b, 0x08, 0x0c, 0x75, 0x63, 0x00, 0x10, 0x08, 0x0c, - 0x5f, 0xed, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x81, 0xff, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x57, 0xe9, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, - 0x6a, 0x9b, 0x01, 0x20, 0x20, 0x09, 0x00, 0x08, 0x08, 0x04, 0x35, 0xe7, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x78, 0x00, 0x26, - 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, 0x01, 0x40, - 0x79, 0x84, 0x08, 0x0c, 0x6b, 0x11, 0x11, 0x20, 0x20, 0x09, 0x40, 0x09, - 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x08, 0x0c, 0x66, 0xb9, 0x19, 0x04, - 0x35, 0xea, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x2b, 0x00, - 0x70, 0x26, 0x08, 0x0c, 0x6a, 0xa3, 0x78, 0x88, 0x11, 0x70, 0x90, 0x84, - 0x00, 0x05, 0x11, 0x58, 0x90, 0x0e, 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, - 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, - 0x35, 0xb5, 0x08, 0x0c, 0x4b, 0xe4, 0x09, 0x04, 0x35, 0xe7, 0x90, 0x06, - 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, - 0xd3, 0x02, 0x09, 0x04, 0x35, 0xe7, 0x78, 0x88, 0xd0, 0x94, 0x01, 0x18, - 0xb8, 0xcc, 0xc0, 0x8d, 0xb8, 0xce, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x4e, 0xcb, 0x00, 0x05, 0x20, 0x61, 0x18, 0x00, 0x08, 0x0c, 0x57, 0xe9, - 0x20, 0x09, 0x00, 0x07, 0x15, 0x60, 0x08, 0x0c, 0x6a, 0x9b, 0x01, 0x18, - 0x20, 0x09, 0x00, 0x08, 0x04, 0x30, 0xa9, 0x98, 0x08, 0x0c, 0x66, 0xb9, - 0x15, 0x30, 0x08, 0x0c, 0x4c, 0x15, 0x05, 0x18, 0x08, 0x0c, 0x6a, 0xa3, - 0xa8, 0x9c, 0x11, 0x68, 0x90, 0x84, 0x00, 0x05, 0x11, 0x50, 0x90, 0x0e, - 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x00, 0xd0, 0xa8, 0x68, 0xc0, 0xfc, 0xa8, 0x6a, - 0x08, 0x0c, 0xd3, 0x02, 0x11, 0xe0, 0xa8, 0x9c, 0xd0, 0x94, 0x01, 0x18, - 0xb8, 0xcc, 0xc0, 0x8d, 0xb8, 0xce, 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, - 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, - 0x40, 0x00, 0xa9, 0x9a, 0x90, 0x06, 0x91, 0x8d, 0x00, 0x01, 0x20, 0x08, - 0x00, 0x05, 0x90, 0x06, 0x00, 0x05, 0xa8, 0x30, 0x20, 0x09, 0x18, 0x0d, - 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x40, 0x20, 0x08, 0x91, 0x8e, 0xde, 0xad, - 0x11, 0x20, 0x20, 0x21, 0x40, 0x09, 0x08, 0x04, 0x35, 0xb7, 0x90, 0x86, - 0x01, 0x00, 0x70, 0x24, 0x20, 0x58, 0x11, 0x10, 0x08, 0x04, 0x57, 0x29, - 0x90, 0x0e, 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, - 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, - 0x57, 0xe9, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, 0x35, 0xe7, - 0x7f, 0x84, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x0c, - 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, - 0x90, 0x0e, 0x21, 0x30, 0x71, 0x26, 0x71, 0x32, 0xa8, 0x60, 0x20, 0xe8, - 0x70, 0x36, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x05, 0x70, 0x2a, 0x20, 0xa0, - 0x08, 0x0c, 0x67, 0x24, 0x19, 0x04, 0x4f, 0x81, 0x08, 0x0c, 0x6a, 0xa3, - 0x01, 0x38, 0x08, 0x0c, 0x6a, 0xab, 0x01, 0x20, 0x08, 0x0c, 0x6a, 0x43, - 0x19, 0x04, 0x4f, 0x81, 0xd7, 0x94, 0x11, 0x10, 0xd7, 0x84, 0x01, 0xa8, - 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, - 0x34, 0x00, 0xd7, 0x94, 0x01, 0x98, 0x20, 0xa9, 0x00, 0x08, 0x40, 0x03, - 0x20, 0x98, 0x20, 0xa0, 0x3d, 0x00, 0x20, 0xe0, 0x20, 0xa9, 0x00, 0x02, - 0x08, 0x0c, 0x49, 0xb3, 0x00, 0x80, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, - 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x04, - 0x40, 0x03, 0x20, 0x98, 0x20, 0xa0, 0x3d, 0x00, 0x20, 0xe0, 0x08, 0x0c, - 0x49, 0xb3, 0x91, 0x86, 0x00, 0x7e, 0x01, 0x70, 0x91, 0x86, 0x00, 0x80, - 0x01, 0x58, 0x08, 0x0c, 0x6a, 0xa3, 0x90, 0xc2, 0x00, 0x06, 0x12, 0x10, - 0xc1, 0xfd, 0x00, 0x20, 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, 0xc1, 0xfd, - 0x41, 0x04, 0xc1, 0xfc, 0xd7, 0x94, 0x05, 0x28, 0xb8, 0xc4, 0x20, 0xe0, - 0xb8, 0xc8, 0x20, 0x60, 0x9c, 0x80, 0x00, 0x00, 0x20, 0x98, 0x20, 0xa9, - 0x00, 0x02, 0x40, 0x03, 0x9c, 0x80, 0x00, 0x03, 0x20, 0x98, 0x20, 0xa9, - 0x00, 0x01, 0x40, 0x05, 0x9c, 0x80, 0x00, 0x04, 0x20, 0x98, 0x34, 0x00, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, 0x20, 0x98, 0x20, 0xa0, 0x3d, 0x00, - 0x20, 0xe0, 0x08, 0x0c, 0x49, 0xa6, 0x9c, 0x80, 0x00, 0x26, 0x20, 0x98, - 0xb8, 0xc4, 0x20, 0xe0, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, 0xd7, 0x94, - 0x01, 0x10, 0x96, 0xb0, 0x00, 0x0b, 0x96, 0xb0, 0x00, 0x05, 0x81, 0x08, - 0x08, 0x0c, 0xb2, 0x3d, 0x01, 0x18, 0x91, 0x86, 0x08, 0x00, 0x00, 0x40, - 0xd7, 0x8c, 0x01, 0x20, 0x91, 0x86, 0x08, 0x00, 0x01, 0x70, 0x00, 0x18, - 0x91, 0x86, 0x00, 0x7e, 0x01, 0x50, 0xd7, 0x94, 0x01, 0x18, 0x96, 0x86, - 0x00, 0x20, 0x00, 0x10, 0x96, 0x86, 0x00, 0x28, 0x01, 0x50, 0x08, 0x04, - 0x4f, 0x0a, 0x86, 0xff, 0x11, 0x20, 0x71, 0x24, 0x81, 0x0b, 0x08, 0x04, - 0x35, 0xb5, 0x70, 0x33, 0x00, 0x01, 0x71, 0x22, 0x70, 0x24, 0x96, 0x00, - 0x70, 0x26, 0x77, 0x2e, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x6b, - 0x00, 0x00, 0xa6, 0x7a, 0x70, 0x34, 0xa0, 0x72, 0x70, 0x28, 0xa0, 0x76, - 0xa2, 0x8e, 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, 0x08, 0x0c, 0x10, 0xf8, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, 0x4f, 0xbd, 0x00, 0x05, 0x70, 0x30, - 0x90, 0x05, 0x11, 0x80, 0x71, 0x20, 0x70, 0x28, 0x20, 0xa0, 0x77, 0x2c, - 0x90, 0x36, 0x70, 0x34, 0x20, 0xe8, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, - 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, 0x08, 0x04, 0x4f, 0x0a, - 0x71, 0x24, 0x81, 0x0b, 0x08, 0x04, 0x35, 0xb5, 0x20, 0x29, 0x00, 0x7e, - 0x79, 0x84, 0x7a, 0x88, 0x7b, 0x8c, 0x7c, 0x98, 0x91, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, - 0x0a, 0x04, 0x35, 0xea, 0x91, 0x84, 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, - 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, 0x0a, 0x04, 0x35, 0xea, 0x92, 0x84, - 0xff, 0x00, 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x35, 0xea, - 0x95, 0x02, 0x0a, 0x04, 0x35, 0xea, 0x92, 0x84, 0x00, 0xff, 0x90, 0xe2, - 0x00, 0x20, 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, 0x0a, 0x04, 0x35, 0xea, - 0x93, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, - 0x35, 0xea, 0x95, 0x02, 0x0a, 0x04, 0x35, 0xea, 0x93, 0x84, 0x00, 0xff, - 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, 0x0a, 0x04, - 0x35, 0xea, 0x94, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, - 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, 0x0a, 0x04, 0x35, 0xea, 0x94, 0x84, - 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x35, 0xea, 0x95, 0x02, - 0x0a, 0x04, 0x35, 0xea, 0x20, 0x61, 0x19, 0x89, 0x61, 0x02, 0x62, 0x06, - 0x63, 0x0a, 0x64, 0x0e, 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x4b, 0xe4, - 0x09, 0x04, 0x35, 0xe7, 0x20, 0x09, 0x00, 0x16, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, - 0x08, 0x0c, 0x4c, 0x2d, 0x70, 0x1f, 0x50, 0x41, 0x00, 0x05, 0x20, 0xa9, - 0x00, 0x16, 0x89, 0x6e, 0x8d, 0x6e, 0x8d, 0x6f, 0x9d, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, 0x9d, 0x84, 0x00, 0x3f, 0x20, 0xe0, - 0x20, 0x69, 0x18, 0x77, 0x20, 0xe9, 0x00, 0x01, 0x2d, 0xa0, 0x40, 0x03, - 0x68, 0x00, 0x90, 0x05, 0x09, 0x04, 0x50, 0xa8, 0x68, 0x04, 0x20, 0x08, - 0x91, 0x8c, 0xff, 0xf8, 0x19, 0x04, 0x50, 0xa8, 0x68, 0x0c, 0x90, 0x05, - 0x09, 0x04, 0x50, 0xa8, 0x90, 0x82, 0xff, 0x01, 0x1a, 0x04, 0x50, 0xa8, - 0x68, 0x10, 0x90, 0x82, 0x00, 0x5c, 0x06, 0xf0, 0x68, 0x24, 0x20, 0x08, - 0x90, 0x82, 0x00, 0x08, 0x06, 0xc8, 0x91, 0x82, 0x04, 0x00, 0x16, 0xb0, - 0x00, 0x56, 0x20, 0x29, 0x00, 0x00, 0x08, 0x0c, 0x8e, 0x80, 0x00, 0x5e, - 0x69, 0x44, 0x68, 0x20, 0x91, 0x02, 0x06, 0x60, 0x68, 0x20, 0x90, 0x82, - 0x00, 0x19, 0x16, 0x40, 0x68, 0x28, 0x69, 0x44, 0x81, 0x0c, 0x91, 0x02, - 0x06, 0x18, 0x68, 0x40, 0x90, 0x82, 0x00, 0x0f, 0x12, 0xf8, 0x08, 0x0c, - 0x10, 0x27, 0x29, 0x00, 0x05, 0x90, 0x68, 0x4e, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0x31, 0x00, 0xb6, 0x20, 0x59, 0x00, 0x00, 0x08, 0x0c, 0x8d, 0x3c, - 0x00, 0xbe, 0x00, 0xee, 0x01, 0xe8, 0x08, 0x0c, 0x8a, 0x84, 0x08, 0x0c, - 0x8a, 0xd3, 0x11, 0x60, 0x68, 0x57, 0x00, 0x00, 0x00, 0xc6, 0x6b, 0x10, - 0x20, 0x61, 0x1a, 0x65, 0x63, 0x0a, 0x00, 0xce, 0x08, 0x04, 0x35, 0xb5, - 0x08, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x8a, 0xcc, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0x31, 0x08, 0x0c, 0x8f, 0x00, 0x08, 0x0c, 0x8f, 0x0f, 0x08, 0x0c, - 0x8d, 0x21, 0x00, 0xee, 0x20, 0x01, 0x18, 0x8a, 0x20, 0x4c, 0x08, 0x0c, - 0x10, 0x40, 0x20, 0x01, 0x18, 0x8a, 0x20, 0x03, 0x00, 0x00, 0x08, 0x04, - 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x92, 0xbf, - 0x08, 0x0c, 0x8a, 0xcc, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x00, 0x06, - 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xcc, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xbc, 0x00, 0x0e, 0x00, 0x05, 0x61, 0x74, - 0x7a, 0x84, 0x63, 0x00, 0x82, 0xff, 0x11, 0x18, 0x79, 0x86, 0x08, 0x04, - 0x35, 0xb5, 0x83, 0xff, 0x19, 0x04, 0x35, 0xea, 0x20, 0x01, 0xff, 0xf0, - 0x92, 0x00, 0x1a, 0x04, 0x35, 0xea, 0x20, 0x19, 0xff, 0xff, 0x60, 0x78, - 0x93, 0x02, 0x92, 0x00, 0x0a, 0x04, 0x35, 0xea, 0x79, 0x86, 0x62, 0x76, - 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x57, 0xe9, 0x19, 0x04, 0x35, 0xe7, - 0x7c, 0x88, 0x7d, 0x84, 0x7e, 0x98, 0x7f, 0x8c, 0x08, 0x0c, 0x4b, 0xe4, - 0x09, 0x04, 0x35, 0xe7, 0x90, 0x0e, 0x90, 0x1e, 0x73, 0x26, 0x73, 0x32, - 0xa8, 0x60, 0x20, 0xe8, 0x70, 0x36, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x03, - 0x70, 0x2a, 0x20, 0xa0, 0x91, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0x8b, 0xff, - 0x01, 0x78, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0x08, 0x0c, 0x6a, 0xab, - 0x11, 0x48, 0x20, 0xa9, 0x00, 0x01, 0xb8, 0x14, 0x40, 0x04, 0xb8, 0x10, - 0x40, 0x04, 0x41, 0x04, 0x93, 0x98, 0x00, 0x03, 0x81, 0x08, 0x91, 0x82, - 0x08, 0x00, 0x01, 0x20, 0x93, 0x86, 0x00, 0x3c, 0x01, 0x70, 0x0c, 0x20, - 0x83, 0xff, 0x11, 0x48, 0x72, 0x24, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, - 0x08, 0x0c, 0x93, 0x75, 0x22, 0x08, 0x08, 0x04, 0x35, 0xb5, 0x70, 0x33, - 0x00, 0x01, 0x71, 0x22, 0x70, 0x24, 0x93, 0x00, 0x70, 0x26, 0x20, 0x61, - 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x6b, 0x00, 0x00, 0xa3, 0x7a, 0x70, 0x28, - 0xa0, 0x76, 0x70, 0x34, 0xa0, 0x72, 0xa4, 0x8e, 0xa5, 0x92, 0xa6, 0x96, - 0xa7, 0x9a, 0x08, 0x0c, 0x10, 0xf8, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, - 0x51, 0x4c, 0x00, 0x05, 0x70, 0x30, 0x90, 0x05, 0x11, 0x78, 0x71, 0x20, - 0x70, 0x28, 0x20, 0xa0, 0x90, 0x1e, 0x70, 0x34, 0x20, 0xe8, 0x20, 0x61, - 0x18, 0xb8, 0x2c, 0x44, 0xa4, 0x8c, 0xa5, 0x90, 0xa6, 0x94, 0xa7, 0x98, - 0x08, 0x04, 0x51, 0x0a, 0x72, 0x24, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, - 0x08, 0x0c, 0x93, 0x75, 0x22, 0x08, 0x08, 0x04, 0x35, 0xb5, 0x00, 0xf6, - 0x00, 0xe6, 0x08, 0x0c, 0x57, 0xe9, 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, - 0x51, 0xdf, 0x20, 0x71, 0x18, 0x9e, 0x74, 0x5c, 0x84, 0xff, 0x20, 0x09, - 0x00, 0x0e, 0x19, 0x04, 0x51, 0xdf, 0xac, 0x9c, 0xad, 0x98, 0xae, 0xa4, - 0xaf, 0xa0, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x27, 0x20, 0x09, 0x00, 0x02, - 0x09, 0x04, 0x51, 0xdf, 0x29, 0x00, 0x70, 0x5e, 0x90, 0x0e, 0x90, 0x1e, - 0x73, 0x56, 0x73, 0x62, 0xa8, 0x60, 0x70, 0x66, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x03, 0x70, 0x5a, 0x20, 0xa0, 0x91, 0xd8, 0x10, 0x00, 0x2b, 0x5c, - 0x8b, 0xff, 0x01, 0x78, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0x08, 0x0c, - 0x6a, 0xab, 0x11, 0x48, 0xb8, 0x14, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x04, - 0xb8, 0x10, 0x40, 0x04, 0x41, 0x04, 0x93, 0x98, 0x00, 0x03, 0x81, 0x08, - 0x91, 0x82, 0x08, 0x00, 0x01, 0x20, 0x93, 0x86, 0x00, 0x3c, 0x01, 0xe8, - 0x0c, 0x20, 0x83, 0xff, 0x11, 0xc0, 0x72, 0x54, 0x90, 0x0e, 0x20, 0x01, - 0x00, 0x03, 0x08, 0x0c, 0x93, 0x75, 0x22, 0x08, 0x00, 0x9e, 0xa8, 0x97, - 0x40, 0x00, 0xa9, 0x9a, 0x71, 0x5c, 0x81, 0xff, 0x09, 0x0c, 0x0d, 0xc5, - 0x21, 0x48, 0x08, 0x0c, 0x10, 0x40, 0x90, 0x06, 0x70, 0x5e, 0x91, 0x8d, - 0x00, 0x01, 0x20, 0x08, 0x04, 0x18, 0x70, 0x63, 0x00, 0x01, 0x71, 0x52, - 0x70, 0x54, 0x93, 0x00, 0x70, 0x56, 0x20, 0x61, 0x18, 0xb9, 0x2c, 0x44, - 0xa3, 0x7a, 0x70, 0x58, 0xa0, 0x76, 0x70, 0x64, 0xa0, 0x72, 0xa4, 0x8e, - 0xa5, 0x92, 0xa6, 0x96, 0xa7, 0x9a, 0xa0, 0x9f, 0x51, 0xeb, 0x00, 0x0e, - 0xa0, 0xa2, 0x08, 0x0c, 0x10, 0xf8, 0x90, 0x06, 0x00, 0x48, 0x00, 0x9e, - 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x30, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0xa0, 0xa0, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x9e, 0xa0, 0x6c, 0x90, 0x8e, 0x01, 0x00, 0x01, 0x38, 0xa8, 0x7b, - 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x02, 0x00, 0xd8, - 0x70, 0x60, 0x90, 0x05, 0x11, 0x58, 0x71, 0x50, 0x70, 0x58, 0x20, 0xa0, - 0x90, 0x1e, 0x70, 0x64, 0x20, 0xe8, 0xa4, 0x8c, 0xa5, 0x90, 0xa6, 0x94, - 0xa7, 0x98, 0x04, 0x28, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, - 0xa8, 0x97, 0x40, 0x00, 0x72, 0x54, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, - 0x08, 0x0c, 0x93, 0x75, 0xaa, 0x9a, 0x71, 0x5c, 0x81, 0xff, 0x09, 0x0c, - 0x0d, 0xc5, 0x21, 0x48, 0x08, 0x0c, 0x10, 0x40, 0x70, 0x5f, 0x00, 0x00, - 0xa0, 0xa0, 0x20, 0x48, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x01, 0x2e, 0xa0, 0x9f, 0x00, 0x00, 0xa0, 0xa3, 0x00, 0x00, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x91, 0xd8, 0x10, 0x00, 0x2b, 0x5c, - 0x8b, 0xff, 0x01, 0x78, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0x08, 0x0c, - 0x6a, 0xab, 0x11, 0x48, 0xb8, 0x14, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x04, - 0xb8, 0x10, 0x40, 0x04, 0x41, 0x04, 0x93, 0x98, 0x00, 0x03, 0x81, 0x08, - 0x91, 0x82, 0x08, 0x00, 0x01, 0x20, 0x93, 0x86, 0x00, 0x3c, 0x05, 0x18, - 0x0c, 0x20, 0x83, 0xff, 0x11, 0xf0, 0x71, 0x54, 0x81, 0x0c, 0xa9, 0x9a, - 0xa8, 0x97, 0x40, 0x00, 0x71, 0x5c, 0x81, 0xff, 0x09, 0x0c, 0x0d, 0xc5, - 0x21, 0x48, 0x08, 0x0c, 0x10, 0x40, 0x90, 0x06, 0x70, 0x5e, 0x91, 0x8d, - 0x00, 0x01, 0x20, 0x08, 0xa0, 0xa0, 0x20, 0x48, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0xa0, 0x9f, 0x00, 0x00, - 0xa0, 0xa3, 0x00, 0x00, 0x00, 0x70, 0x70, 0x63, 0x00, 0x01, 0x71, 0x52, - 0x70, 0x54, 0x93, 0x00, 0x70, 0x56, 0xa3, 0x7a, 0xa4, 0x8e, 0xa5, 0x92, - 0xa6, 0x96, 0xa7, 0x9a, 0x08, 0x0c, 0x10, 0xf8, 0x90, 0x06, 0x00, 0xee, - 0x00, 0x05, 0x00, 0x96, 0xa8, 0x8c, 0x90, 0xbe, 0x70, 0x00, 0x01, 0x48, - 0x90, 0xbe, 0x71, 0x00, 0x01, 0x30, 0x90, 0xbe, 0x72, 0x00, 0x01, 0x18, - 0x00, 0x9e, 0x08, 0x04, 0x35, 0xea, 0xa8, 0x84, 0xa9, 0x88, 0x08, 0x0c, - 0x28, 0x73, 0x15, 0x18, 0x08, 0x0c, 0x66, 0xb9, 0x15, 0x00, 0x71, 0x26, - 0xbe, 0x12, 0xbd, 0x16, 0xae, 0x7c, 0x08, 0x0c, 0x4b, 0xe4, 0x01, 0xc8, - 0x08, 0x0c, 0x4b, 0xe4, 0x01, 0xb0, 0x00, 0x9e, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x23, 0x00, 0x00, 0xa8, 0x04, - 0x20, 0x48, 0x08, 0x0c, 0xd2, 0x84, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x52, 0xb8, - 0x00, 0x05, 0x00, 0x9e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, - 0x71, 0x24, 0x08, 0x0c, 0x33, 0x4c, 0xa8, 0x20, 0x90, 0x86, 0x80, 0x01, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, 0x29, 0x00, - 0x70, 0x22, 0xa8, 0x04, 0x00, 0x96, 0x20, 0x48, 0x89, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x00, 0x9e, - 0x90, 0x80, 0x00, 0x02, 0x00, 0x76, 0x00, 0x06, 0x20, 0x98, 0x20, 0xa0, - 0x27, 0xe0, 0x27, 0xe8, 0x20, 0xa9, 0x00, 0x2a, 0x08, 0x0c, 0x0f, 0x8b, - 0xaa, 0x6c, 0xab, 0x70, 0xac, 0x74, 0xad, 0x78, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0xa0, 0x6b, 0x00, 0x00, 0xae, 0x64, 0xaf, 0x8c, 0x97, 0xc6, - 0x70, 0x00, 0x01, 0x18, 0x97, 0xc6, 0x71, 0x00, 0x11, 0x48, 0x96, 0xc2, - 0x00, 0x04, 0x06, 0x00, 0x20, 0x09, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x7e, - 0x08, 0x04, 0x4c, 0x30, 0x97, 0xc6, 0x72, 0x00, 0x11, 0xb8, 0x96, 0xc2, - 0x00, 0x54, 0x02, 0xa0, 0x00, 0x0e, 0x00, 0x7e, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0xa0, 0x76, 0xa7, 0x72, 0xa0, 0x7b, 0x00, 0x2a, 0xa2, 0x8e, - 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, 0x08, 0x0c, 0x10, 0xf8, 0x70, 0x07, - 0x00, 0x02, 0x70, 0x1f, 0x53, 0x14, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x7e, - 0x08, 0x04, 0x35, 0xea, 0x70, 0x20, 0x20, 0x48, 0xa8, 0x04, 0x20, 0x48, - 0xa8, 0x04, 0x20, 0x48, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, - 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, 0x20, 0x98, - 0x20, 0xa0, 0x27, 0xe0, 0x27, 0xe8, 0x20, 0xa9, 0x00, 0x2a, 0x08, 0x0c, - 0x0f, 0x8b, 0x21, 0x00, 0x22, 0x38, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, - 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, 0x20, 0x09, 0x00, 0x2a, - 0x08, 0x04, 0x4c, 0x30, 0x81, 0xff, 0x19, 0x04, 0x35, 0xe7, 0x79, 0x8c, - 0x20, 0x01, 0x19, 0x7e, 0x91, 0x8c, 0x80, 0x00, 0x21, 0x02, 0x08, 0x0c, - 0x4b, 0xfb, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x20, - 0x08, 0x0c, 0x6a, 0xab, 0x19, 0x04, 0x35, 0xea, 0x08, 0x0c, 0x67, 0xeb, - 0x09, 0x04, 0x35, 0xe7, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x68, 0xb1, 0x01, 0x2e, 0x09, 0x04, 0x35, 0xe7, 0x20, 0x01, 0x19, 0x7e, - 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x35, 0xb5, 0x08, 0x04, 0x46, 0x0c, - 0xa9, 0xa0, 0x20, 0x01, 0x19, 0x7e, 0x91, 0x8c, 0x80, 0x00, 0xc1, 0x8d, - 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x08, 0x01, 0xa0, 0x08, 0x0c, 0x6a, 0xa3, - 0x01, 0x18, 0x08, 0x0c, 0x6a, 0xab, 0x11, 0x70, 0x08, 0x0c, 0x67, 0xeb, - 0x20, 0x09, 0x00, 0x02, 0x01, 0x28, 0x08, 0x0c, 0x68, 0xb1, 0x11, 0x70, - 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, - 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, 0x20, 0x01, 0x19, 0x7e, - 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x28, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x00, 0x00, 0x05, 0x78, 0xa8, 0xd0, 0x8c, 0x11, 0x18, 0xd0, 0x84, - 0x09, 0x04, 0x45, 0x81, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, - 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x30, 0x90, 0x8e, 0x00, 0x04, - 0x01, 0x18, 0x90, 0x8e, 0x00, 0x05, 0x15, 0xa0, 0x78, 0xa8, 0xd0, 0x8c, - 0x01, 0x20, 0xb8, 0x00, 0xc0, 0x8c, 0xb8, 0x02, 0x00, 0x28, 0x08, 0x0c, - 0x57, 0xd5, 0xd0, 0xb4, 0x09, 0x04, 0x45, 0xbb, 0x78, 0x84, 0x90, 0x8e, - 0x00, 0x7e, 0x09, 0x04, 0x45, 0xbb, 0x90, 0x8e, 0x00, 0x7f, 0x09, 0x04, - 0x45, 0xbb, 0x90, 0x8e, 0x00, 0x80, 0x09, 0x04, 0x45, 0xbb, 0xb8, 0x00, - 0xd0, 0x8c, 0x19, 0x04, 0x45, 0xbb, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd2, 0xa3, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x03, 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x53, 0xe0, 0x00, 0x05, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, - 0x08, 0x04, 0x45, 0xbb, 0x08, 0x0c, 0x33, 0xa5, 0x01, 0x08, 0x00, 0x05, - 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x6a, 0x9b, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x08, 0x08, 0x04, 0x35, 0xe7, 0xb8, 0x9c, - 0xd0, 0xa4, 0x11, 0x18, 0xd0, 0xac, 0x19, 0x04, 0x45, 0xbb, 0x90, 0x06, - 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, - 0xd3, 0x02, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x35, 0xe7, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x54, 0x19, 0x00, 0x05, 0xa8, 0x30, - 0x90, 0x86, 0x01, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, - 0x57, 0x29, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x04, - 0x53, 0xb2, 0x81, 0xff, 0x20, 0x09, 0x00, 0x01, 0x19, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x57, 0xe9, 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, 0x35, 0xe7, - 0x08, 0x0c, 0x6a, 0x9b, 0x01, 0x20, 0x20, 0x09, 0x00, 0x08, 0x08, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x08, 0x0c, - 0x6a, 0xa3, 0x20, 0x09, 0x00, 0x09, 0x19, 0x04, 0x35, 0xe7, 0x08, 0x0c, - 0x4b, 0xe4, 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, 0x35, 0xe7, 0x90, 0x06, - 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x79, 0x88, - 0xa9, 0x5a, 0x91, 0x94, 0xfd, 0x00, 0x91, 0x8c, 0x00, 0xff, 0x90, 0x06, - 0x82, 0xff, 0x11, 0x28, 0xc0, 0xed, 0xa9, 0x52, 0x79, 0x8c, 0xa9, 0x56, - 0x00, 0x38, 0x92, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x35, 0xea, 0xc0, 0xe5, - 0xa9, 0x52, 0xa9, 0x56, 0xa8, 0x3e, 0x08, 0x0c, 0xd5, 0x55, 0x20, 0x09, - 0x00, 0x03, 0x09, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x54, 0x70, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x20, 0x09, - 0x00, 0x04, 0x09, 0x04, 0x35, 0xe7, 0x08, 0x04, 0x35, 0xb5, 0x7a, 0xa8, - 0x92, 0x84, 0xc0, 0x00, 0x01, 0x48, 0xd2, 0xec, 0x01, 0xa0, 0x08, 0x0c, - 0x57, 0xe9, 0x11, 0x88, 0x20, 0x09, 0x00, 0x14, 0x08, 0x04, 0x35, 0xe7, - 0xd2, 0xdc, 0x15, 0x78, 0x81, 0xff, 0x20, 0x09, 0x00, 0x01, 0x19, 0x04, - 0x35, 0xe7, 0x08, 0x0c, 0x57, 0xe9, 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, - 0x35, 0xe7, 0xd2, 0xf4, 0x01, 0x38, 0x92, 0x84, 0x50, 0x00, 0xc0, 0xd5, - 0x08, 0x0c, 0x57, 0xaf, 0x08, 0x04, 0x35, 0xb5, 0xd2, 0xfc, 0x01, 0x60, - 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0x79, 0x84, 0x92, 0x84, - 0x90, 0x00, 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0x84, 0x08, 0x04, 0x35, 0xb5, - 0x08, 0x0c, 0x4c, 0x17, 0x09, 0x04, 0x35, 0xea, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x20, 0x09, 0x00, 0x09, 0x19, 0x04, - 0x55, 0x5f, 0x08, 0x0c, 0x4b, 0xe4, 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, - 0x55, 0x5f, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0xaf, 0x60, 0x20, 0x09, - 0x00, 0x08, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x0c, - 0x4c, 0x2d, 0x70, 0x1f, 0x54, 0xcc, 0x00, 0x05, 0xa8, 0x6c, 0x90, 0x86, - 0x05, 0x00, 0x11, 0x38, 0xa8, 0x70, 0x90, 0x05, 0x11, 0x20, 0xa8, 0x74, - 0x90, 0x84, 0xff, 0x00, 0x01, 0x10, 0x19, 0x04, 0x35, 0xea, 0xa8, 0x66, - 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0x4c, 0x17, - 0x11, 0x10, 0x08, 0x04, 0x35, 0xea, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, - 0xd5, 0xc1, 0x20, 0x09, 0x00, 0x03, 0x09, 0x04, 0x55, 0x5f, 0x70, 0x07, - 0x00, 0x03, 0x70, 0x1f, 0x54, 0xf0, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x20, 0x09, 0x00, 0x04, 0x09, 0x04, 0x55, 0x5f, 0x79, 0x84, - 0x7a, 0xa8, 0x92, 0x84, 0x10, 0x00, 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0x84, - 0x08, 0x04, 0x35, 0xb5, 0x00, 0xc6, 0xaa, 0xb0, 0x92, 0x84, 0xc0, 0x00, - 0x01, 0x48, 0xd2, 0xec, 0x01, 0x70, 0x08, 0x0c, 0x57, 0xe9, 0x11, 0x58, - 0x20, 0x09, 0x00, 0x14, 0x08, 0x04, 0x55, 0x4e, 0x20, 0x61, 0x18, 0x00, - 0x08, 0x0c, 0x57, 0xe9, 0x20, 0x09, 0x00, 0x07, 0x15, 0xc8, 0xd2, 0xf4, - 0x01, 0x30, 0x92, 0x84, 0x50, 0x00, 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0xaf, - 0x00, 0x58, 0xd2, 0xfc, 0x01, 0x80, 0x08, 0x0c, 0x4c, 0x15, 0x05, 0x90, - 0xa9, 0x98, 0x92, 0x84, 0x90, 0x00, 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0x84, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, - 0x04, 0x38, 0x08, 0x0c, 0x4c, 0x15, 0x05, 0x10, 0x08, 0x0c, 0x6a, 0xa3, - 0x20, 0x09, 0x00, 0x09, 0x11, 0xb8, 0xa8, 0xc4, 0x90, 0x86, 0x05, 0x00, - 0x11, 0xc8, 0xa8, 0xc8, 0x90, 0x05, 0x11, 0xb0, 0xa8, 0xcc, 0x90, 0x84, - 0xff, 0x00, 0x11, 0x90, 0x08, 0x0c, 0x4c, 0x15, 0x11, 0x08, 0x00, 0x70, - 0x20, 0x09, 0x00, 0x4b, 0x08, 0x0c, 0xd5, 0xc1, 0x20, 0x09, 0x00, 0x03, - 0x01, 0x08, 0x00, 0x78, 0x04, 0x31, 0x19, 0xc0, 0xa8, 0x97, 0x40, 0x05, - 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, - 0x0c, 0xe0, 0x7a, 0xa8, 0xd2, 0xdc, 0x09, 0x04, 0x35, 0xe7, 0x00, 0x16, - 0x79, 0x84, 0x92, 0x84, 0x10, 0x00, 0xc0, 0xfd, 0x08, 0x0c, 0x57, 0x84, - 0x00, 0x1e, 0x19, 0x04, 0x35, 0xe7, 0x08, 0x04, 0x35, 0xb5, 0x00, 0xf6, - 0x2d, 0x78, 0xaa, 0xb0, 0x00, 0x21, 0x00, 0xfe, 0x00, 0x05, 0xaa, 0xb0, - 0xc2, 0xd5, 0xd2, 0xdc, 0x01, 0x50, 0x00, 0x16, 0xa9, 0x98, 0x92, 0x84, - 0x14, 0x00, 0xc0, 0xfd, 0x08, 0x0c, 0x57, 0x84, 0x00, 0x1e, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x07, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x7e, 0xa8, 0x96, 0xb4, - 0x00, 0xff, 0x08, 0x0c, 0x67, 0x24, 0x19, 0x04, 0x35, 0xea, 0x91, 0x86, - 0x00, 0x7f, 0x01, 0x38, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x09, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x4b, 0xe4, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x20, 0x01, 0x01, 0x00, 0x80, 0x07, - 0xa8, 0x0a, 0x08, 0x0c, 0xd2, 0xbd, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x55, 0xbf, - 0x00, 0x05, 0xa8, 0x08, 0x80, 0x07, 0x90, 0x86, 0x01, 0x00, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, 0xa8, 0xe0, 0xa8, 0x66, - 0xa8, 0x10, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x0c, 0xa8, 0x14, - 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, 0x90, 0x80, 0x00, 0x02, - 0x91, 0x08, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, - 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x04, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x04, 0x4c, 0x30, 0x08, 0x0c, 0x4b, 0xe4, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, - 0x91, 0x94, 0xff, 0x00, 0x91, 0x8c, 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, - 0x11, 0x18, 0x70, 0x23, 0x19, 0xb4, 0x00, 0x40, 0x92, 0xc6, 0x00, 0x01, - 0x11, 0x18, 0x70, 0x23, 0x19, 0xce, 0x00, 0x10, 0x08, 0x04, 0x35, 0xea, - 0x20, 0x09, 0x00, 0x1a, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x2d, - 0x70, 0x1f, 0x56, 0x0f, 0x00, 0x05, 0x20, 0x01, 0x18, 0x2e, 0x20, 0x03, - 0x00, 0x01, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, 0xa8, 0x60, - 0x20, 0xe0, 0x20, 0xa9, 0x00, 0x1a, 0x70, 0x20, 0x20, 0xa0, 0x20, 0xe9, - 0x00, 0x01, 0x40, 0x03, 0x08, 0x04, 0x35, 0xb5, 0x08, 0x0c, 0x4b, 0xe4, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, - 0x91, 0x94, 0xff, 0x00, 0x91, 0x8c, 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, - 0x11, 0x18, 0x20, 0x99, 0x19, 0xb4, 0x00, 0x40, 0x92, 0xc6, 0x00, 0x01, - 0x11, 0x18, 0x20, 0x99, 0x19, 0xce, 0x00, 0x10, 0x08, 0x04, 0x35, 0xea, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0xa0, 0xa8, 0x60, 0x20, 0xe8, - 0x20, 0xa9, 0x00, 0x1a, 0x20, 0xe1, 0x00, 0x01, 0x40, 0x03, 0x20, 0x09, - 0x00, 0x1a, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, 0x08, 0x04, 0x4c, 0x30, 0x78, 0x84, - 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, 0x35, 0xea, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0xfb, 0x61, 0x4a, 0x00, 0xce, 0x01, 0x2e, 0x08, 0x04, - 0x35, 0xb5, 0x00, 0xc6, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x60, 0x08, 0x0c, - 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x76, 0x7b, 0x08, 0x0c, 0x75, 0x63, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x61, - 0x18, 0x00, 0x60, 0x30, 0xc0, 0x9d, 0x60, 0x32, 0x08, 0x0c, 0x5f, 0xed, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, - 0x90, 0x8e, 0x00, 0x00, 0x09, 0x04, 0x35, 0xe7, 0x78, 0x84, 0x90, 0x05, - 0x01, 0x88, 0x78, 0x88, 0x20, 0x61, 0x19, 0x9c, 0x2c, 0x0c, 0x20, 0x62, - 0x08, 0x0c, 0x2c, 0x49, 0x01, 0xa0, 0x08, 0x0c, 0x2c, 0x51, 0x01, 0x88, - 0x08, 0x0c, 0x2c, 0x59, 0x01, 0x70, 0x21, 0x62, 0x08, 0x04, 0x35, 0xea, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x38, 0x90, 0x86, 0x00, 0x07, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x01, 0x00, 0x10, 0x20, 0x09, 0x00, 0x00, 0x78, 0x84, - 0x90, 0x86, 0x00, 0x02, 0x15, 0x68, 0x20, 0x61, 0x01, 0x00, 0x60, 0x28, - 0xc0, 0x9c, 0x60, 0x2a, 0x00, 0x26, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, - 0xaa, 0xbf, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, 0x00, 0x2e, - 0x08, 0x0c, 0xa9, 0xd3, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, 0xaa, 0x49, - 0x00, 0x3e, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xf0, 0x7f, 0x08, 0x0c, - 0xf0, 0x9a, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x76, 0x7b, 0x90, 0x06, - 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, 0x00, 0x04, - 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x00, 0x60, 0x27, 0x00, 0x08, - 0x00, 0xce, 0x08, 0x04, 0x35, 0xb5, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, 0x35, 0xe7, 0x79, 0x84, 0x7e, 0xa8, - 0x96, 0xb4, 0x00, 0xff, 0x08, 0x0c, 0x67, 0x24, 0x19, 0x04, 0x35, 0xea, - 0x91, 0x86, 0x00, 0x7f, 0x01, 0x38, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x09, 0x08, 0x04, 0x35, 0xe7, 0x08, 0x0c, 0x4b, 0xe4, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0xa8, 0x67, - 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd2, 0xc0, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x35, 0xe7, 0x70, 0x07, - 0x00, 0x03, 0x70, 0x1f, 0x57, 0x12, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x35, 0xe7, - 0xa8, 0xe0, 0xa8, 0x66, 0xa8, 0x34, 0x80, 0x07, 0x80, 0x0c, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x0c, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, - 0xaf, 0x60, 0x08, 0x04, 0x4c, 0x30, 0xa8, 0x98, 0x90, 0x86, 0x00, 0x0d, - 0x19, 0x04, 0x35, 0xe7, 0x20, 0x21, 0x40, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x0e, 0x04, 0x57, 0x36, 0x00, 0x10, 0x01, 0x2e, 0x0c, 0xc0, - 0x7c, 0x36, 0x94, 0x86, 0x40, 0x00, 0x01, 0x18, 0x78, 0x33, 0x00, 0x11, - 0x00, 0x10, 0x78, 0x33, 0x00, 0x10, 0x78, 0x83, 0x40, 0x05, 0xa9, 0x98, - 0x79, 0x86, 0xa9, 0xa4, 0x79, 0x9a, 0xa9, 0xa8, 0x79, 0x9e, 0x08, 0x0c, - 0x4c, 0x20, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, - 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x70, 0x07, 0x00, 0x01, 0x20, 0x91, - 0x50, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x00, 0xc6, 0x20, 0x61, 0x19, 0xfb, 0x79, 0x84, - 0x61, 0x5a, 0x61, 0x56, 0x60, 0x5f, 0x00, 0x00, 0x60, 0x53, 0x00, 0x09, - 0x78, 0x98, 0x60, 0x72, 0x78, 0x9c, 0x60, 0x6e, 0x78, 0x88, 0x60, 0x6a, - 0x78, 0x8c, 0x60, 0x66, 0x20, 0x01, 0x1a, 0x0b, 0x20, 0x44, 0x20, 0x01, - 0x1a, 0x12, 0xa0, 0x76, 0xa0, 0x60, 0xa0, 0x72, 0xa0, 0x7b, 0x00, 0x01, - 0xa0, 0x7f, 0x00, 0x02, 0xa0, 0x6b, 0x00, 0x00, 0xa0, 0x9f, 0x00, 0x00, - 0x00, 0xce, 0x01, 0x2e, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0xb6, 0x00, 0xc6, 0x90, 0xe4, 0xc0, 0x00, 0x01, 0x68, - 0x00, 0x06, 0xd0, 0xd4, 0x01, 0x30, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, - 0x08, 0x0c, 0x33, 0x6a, 0x00, 0x3e, 0x08, 0x0c, 0xd1, 0x25, 0x00, 0x0e, - 0x11, 0x98, 0xd0, 0xe4, 0x01, 0x60, 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, - 0x90, 0x5d, 0x01, 0x60, 0x08, 0x0c, 0x61, 0x48, 0x08, 0x0c, 0xb2, 0x3d, - 0x01, 0x10, 0xb8, 0x17, 0x00, 0x00, 0x90, 0x06, 0x00, 0xce, 0x00, 0xbe, - 0x01, 0x2e, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xc8, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x01, 0x56, 0x20, 0x10, 0x90, 0x0e, 0x20, 0xa9, - 0x08, 0x00, 0x00, 0x16, 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x05, - 0x01, 0x88, 0x91, 0x86, 0x00, 0x7e, 0x01, 0x70, 0x91, 0x86, 0x00, 0x7f, - 0x01, 0x58, 0x91, 0x86, 0x00, 0x80, 0x01, 0x40, 0x91, 0x86, 0x00, 0xff, - 0x01, 0x28, 0x00, 0x26, 0x22, 0x00, 0x08, 0x0c, 0x57, 0x84, 0x00, 0x2e, - 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x57, 0xb7, 0x01, 0x5e, 0x01, 0x2e, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x67, 0x20, 0x04, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x18, 0x10, - 0x20, 0x04, 0xd0, 0xd4, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0e, - 0x20, 0x04, 0xd0, 0xb4, 0x00, 0x05, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, - 0x90, 0x86, 0x00, 0x03, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x9e, 0x71, 0x08, 0x91, 0x0d, 0x71, 0x0a, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x05, 0x79, 0xa4, 0x81, 0xff, 0x09, 0x04, 0x35, 0xea, 0x91, 0x82, - 0x00, 0x81, 0x1a, 0x04, 0x35, 0xea, 0x81, 0x0c, 0x00, 0x16, 0x08, 0x0c, - 0x4b, 0xe4, 0x01, 0x70, 0x08, 0x0c, 0x0f, 0x16, 0x21, 0x00, 0x22, 0x38, - 0x7d, 0x84, 0x7c, 0x88, 0x7b, 0x8c, 0x7a, 0x90, 0x00, 0x1e, 0x08, 0x0c, - 0x4c, 0x2d, 0x70, 0x1f, 0x58, 0x19, 0x00, 0x05, 0x00, 0x1e, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x35, 0xe7, 0x20, 0x79, 0x00, 0x00, 0x7d, 0x94, - 0x7c, 0x98, 0x7b, 0xa8, 0x7a, 0xac, 0x79, 0xa4, 0x81, 0x0c, 0x20, 0x61, - 0x18, 0xb8, 0x2c, 0x44, 0xa7, 0x70, 0xa0, 0x74, 0x20, 0x71, 0x18, 0x9e, - 0x08, 0x0c, 0x4c, 0x30, 0x70, 0x1f, 0x58, 0x2d, 0x00, 0x05, 0x20, 0x61, - 0x18, 0xb8, 0x2c, 0x44, 0x00, 0x16, 0x00, 0x26, 0xa2, 0x70, 0xa1, 0x74, - 0x08, 0x0c, 0x0f, 0x1e, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, 0x0f, 0xcb, - 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, 0x08, 0x04, 0x35, 0xb5, 0x01, 0x26, - 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x01, 0xc6, 0x01, 0xd6, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x02, 0x00, 0x20, 0x71, 0x18, 0x00, 0x60, 0x44, 0xd0, 0xa4, 0x11, 0xe8, - 0xd0, 0x84, 0x01, 0x18, 0x08, 0x0c, 0x59, 0xed, 0x00, 0x68, 0xd0, 0x8c, - 0x01, 0x18, 0x08, 0x0c, 0x58, 0xf6, 0x00, 0x40, 0xd0, 0x94, 0x01, 0x18, - 0x08, 0x0c, 0x58, 0xc6, 0x00, 0x18, 0xd0, 0x9c, 0x01, 0x08, 0x00, 0x99, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, - 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x16, - 0x61, 0x28, 0xd1, 0x9c, 0x11, 0x10, 0xc1, 0x9d, 0x61, 0x2a, 0x00, 0x1e, - 0x0c, 0x68, 0x70, 0x30, 0xd0, 0x9c, 0x11, 0x20, 0x60, 0x04, 0x90, 0x85, - 0x00, 0x02, 0x60, 0x06, 0x70, 0x98, 0x90, 0x05, 0x01, 0x20, 0x70, 0x9b, - 0x00, 0x00, 0x70, 0x93, 0x00, 0x00, 0x62, 0x4c, 0x92, 0x86, 0xf0, 0xf0, - 0x11, 0x50, 0x60, 0x48, 0x90, 0x86, 0xf0, 0xf0, 0x01, 0x30, 0x62, 0x4a, - 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x04, 0x90, 0x92, 0x94, - 0xff, 0x00, 0x92, 0x96, 0xf7, 0x00, 0x01, 0x78, 0x71, 0x38, 0xd1, 0xa4, - 0x11, 0x60, 0x62, 0x40, 0x92, 0x95, 0x01, 0x00, 0x62, 0x42, 0x92, 0x94, - 0x00, 0x10, 0x01, 0x28, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, 0x60, 0xaa, - 0x00, 0xf0, 0x60, 0x40, 0x90, 0x84, 0x00, 0x10, 0x90, 0x85, 0x01, 0x40, - 0x60, 0x42, 0x60, 0x43, 0x00, 0x00, 0x70, 0x87, 0x00, 0x00, 0x70, 0xa3, - 0x00, 0x01, 0x70, 0xc7, 0x00, 0x00, 0x70, 0xdf, 0x00, 0x00, 0x20, 0x09, - 0x1c, 0x80, 0x20, 0x0b, 0x00, 0x00, 0x70, 0x97, 0x00, 0x00, 0x70, 0x8b, - 0x00, 0x0f, 0x20, 0x09, 0x00, 0x0f, 0x20, 0x11, 0x5f, 0x90, 0x08, 0x0c, - 0x88, 0xd5, 0x00, 0x05, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0x8c, - 0x01, 0x10, 0x70, 0x5f, 0xff, 0xff, 0x70, 0x88, 0x90, 0x05, 0x15, 0x28, - 0x20, 0x11, 0x5f, 0x90, 0x08, 0x0c, 0x88, 0x3d, 0x60, 0x40, 0x90, 0x94, - 0x00, 0x10, 0x92, 0x85, 0x00, 0x20, 0x60, 0x42, 0x20, 0xa9, 0x00, 0xc8, - 0x60, 0x44, 0xd0, 0x8c, 0x11, 0x68, 0x1f, 0x04, 0x58, 0xdc, 0x62, 0x42, - 0x70, 0x9b, 0x00, 0x00, 0x60, 0x40, 0x90, 0x94, 0x00, 0x10, 0x92, 0x85, - 0x00, 0x80, 0x60, 0x42, 0x62, 0x42, 0x00, 0x48, 0x62, 0x42, 0x70, 0x9b, - 0x00, 0x00, 0x70, 0x8f, 0x00, 0x00, 0x90, 0x06, 0x08, 0x0c, 0x61, 0x33, - 0x00, 0x00, 0x00, 0x05, 0x70, 0x8c, 0x90, 0x8a, 0x00, 0x03, 0x1a, 0x0c, - 0x0d, 0xc5, 0x00, 0x0b, 0x00, 0x05, 0x59, 0x00, 0x59, 0x51, 0x59, 0xec, - 0x00, 0xf6, 0x00, 0x16, 0x69, 0x00, 0x91, 0x8c, 0x08, 0x00, 0x70, 0x8f, - 0x00, 0x01, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x68, 0x03, - 0x00, 0xfc, 0x20, 0xa9, 0x00, 0x04, 0x68, 0x00, 0x90, 0x84, 0x00, 0xfc, - 0x01, 0x20, 0x1f, 0x04, 0x59, 0x0f, 0x08, 0x0c, 0x0d, 0xc5, 0x68, 0xa0, - 0x68, 0xa2, 0x68, 0x9c, 0x68, 0x9e, 0x68, 0x98, 0x68, 0x9a, 0xa0, 0x01, - 0x91, 0x8d, 0x16, 0x00, 0x69, 0x02, 0x00, 0x1e, 0x68, 0x37, 0x00, 0x20, - 0x08, 0x0c, 0x61, 0x0f, 0x20, 0x79, 0x1c, 0x00, 0x78, 0x33, 0x11, 0x01, - 0x78, 0x37, 0x00, 0x00, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, - 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1c, 0x0e, 0x20, 0xa9, 0x00, 0x04, - 0x40, 0x03, 0x08, 0x0c, 0xaf, 0x8e, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, - 0x1c, 0x00, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, - 0x00, 0x14, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x0c, 0x60, 0x0f, 0x00, 0x00, - 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, 0x90, 0x06, 0x70, 0x92, 0x60, 0x43, - 0x00, 0x08, 0x60, 0x42, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x70, 0x93, - 0x00, 0x00, 0x90, 0x25, 0x09, 0x04, 0x59, 0xc9, 0x60, 0x20, 0xd0, 0xb4, - 0x19, 0x04, 0x59, 0xc7, 0x71, 0xa0, 0x81, 0xff, 0x09, 0x04, 0x59, 0xb5, - 0x94, 0x86, 0x00, 0x0c, 0x19, 0x04, 0x59, 0xc2, 0x94, 0x80, 0x00, 0x18, - 0x80, 0x04, 0x20, 0xa8, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x11, 0x02, 0x60, - 0x20, 0x19, 0x1c, 0x00, 0x22, 0x0c, 0x23, 0x04, 0x91, 0x06, 0x11, 0xe8, - 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, 0x59, 0x6e, 0x60, 0x43, 0x00, 0x04, - 0x20, 0x61, 0x01, 0x40, 0x60, 0x5b, 0xbc, 0x94, 0x60, 0x5f, 0xf0, 0xf0, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, 0x00, 0x06, 0x70, 0x8f, 0x00, 0x02, - 0x70, 0x9b, 0x00, 0x02, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x5f, 0x97, - 0x08, 0x0c, 0x88, 0xd5, 0x08, 0x0c, 0x61, 0x0f, 0x04, 0xc0, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x79, 0x30, 0x91, 0x8e, 0x11, 0x01, - 0x15, 0x58, 0x78, 0x34, 0x90, 0x05, 0x15, 0x40, 0x79, 0x00, 0x91, 0x8c, - 0x00, 0xff, 0x11, 0x18, 0x78, 0x04, 0x90, 0x05, 0x01, 0x90, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0x11, 0x02, 0x6e, 0x20, 0x19, 0x18, 0x05, 0x20, 0xa9, - 0x00, 0x04, 0x22, 0x0c, 0x23, 0x04, 0x91, 0x02, 0x02, 0x30, 0x11, 0xa0, - 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, 0x59, 0xa9, 0x00, 0x78, 0x70, 0xa3, - 0x00, 0x00, 0x08, 0x0c, 0x61, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, - 0x02, 0x60, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1c, 0x00, 0x20, 0xa9, - 0x00, 0x14, 0x40, 0x03, 0x60, 0x43, 0x00, 0x08, 0x60, 0x43, 0x00, 0x00, - 0x00, 0x10, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x40, 0x90, 0x85, 0x01, 0x00, - 0x60, 0x42, 0x60, 0x20, 0xd0, 0xb4, 0x1d, 0xb8, 0x08, 0x0c, 0xaf, 0x8e, - 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x1c, 0x00, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x14, 0x40, 0x03, 0x60, 0xc3, - 0x00, 0x0c, 0x20, 0x11, 0x19, 0xf2, 0x20, 0x13, 0x00, 0x00, 0x70, 0x93, - 0x00, 0x00, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x08, 0x0c, - 0xa6, 0xe0, 0x08, 0xd8, 0x00, 0x05, 0x70, 0x98, 0x90, 0x8a, 0x00, 0x1d, - 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x0b, 0x00, 0x05, 0x5a, 0x1e, 0x5a, 0x31, - 0x5a, 0x5a, 0x5a, 0x7a, 0x5a, 0xa0, 0x5a, 0xcf, 0x5a, 0xf5, 0x5b, 0x2d, - 0x5b, 0x53, 0x5b, 0x81, 0x5b, 0xbc, 0x5b, 0xf4, 0x5c, 0x12, 0x5c, 0x3d, - 0x5c, 0x5f, 0x5c, 0x7a, 0x5c, 0x84, 0x5c, 0xb8, 0x5c, 0xde, 0x5d, 0x0d, - 0x5d, 0x33, 0x5d, 0x6b, 0x5d, 0xaf, 0x5d, 0xec, 0x5e, 0x0d, 0x5e, 0x66, - 0x5e, 0x88, 0x5e, 0xb6, 0x5e, 0xb6, 0x00, 0xc6, 0x20, 0x61, 0x18, 0x00, - 0x60, 0x03, 0x00, 0x07, 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, 0x90, 0x84, - 0xff, 0xf9, 0x60, 0x06, 0x00, 0xce, 0x00, 0x05, 0x20, 0x61, 0x01, 0x40, - 0x60, 0x5b, 0xbc, 0x94, 0x60, 0x5f, 0xf0, 0xf0, 0x20, 0x61, 0x01, 0x00, - 0x60, 0x43, 0x00, 0x02, 0x70, 0x9b, 0x00, 0x01, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0xd5, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x86, 0x00, 0x14, 0x15, 0x10, 0x60, 0x42, 0x60, 0x20, - 0xd0, 0xb4, 0x11, 0xf0, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, - 0x7a, 0x30, 0x92, 0x96, 0x11, 0x02, 0x11, 0xa0, 0x78, 0x34, 0x90, 0x05, - 0x11, 0x88, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, - 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x3d, 0x70, 0x9b, 0x00, 0x10, 0x08, 0x0c, 0x5c, 0x84, 0x00, 0x10, - 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, - 0x00, 0x03, 0x60, 0x43, 0x00, 0x04, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x3d, 0x08, 0x0c, 0x60, 0x8c, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, - 0x11, 0x02, 0x78, 0x37, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x08, 0x9f, 0x88, - 0x00, 0x0e, 0x20, 0x0b, 0x00, 0x00, 0x81, 0x08, 0x1f, 0x04, 0x5a, 0x6f, - 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x5f, 0x97, - 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x02, - 0x11, 0x78, 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, - 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, - 0x70, 0x9b, 0x00, 0x04, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x60, 0xe4, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x05, 0x08, 0x0c, - 0x60, 0x8c, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x03, 0x78, 0x37, - 0x00, 0x00, 0x08, 0x0c, 0x61, 0x08, 0x08, 0x0c, 0x60, 0xeb, 0x11, 0x70, - 0x70, 0x84, 0x90, 0x05, 0x11, 0x58, 0x71, 0x5c, 0x91, 0x86, 0xff, 0xff, - 0x01, 0x38, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0x44, 0x01, 0x68, - 0x08, 0x0c, 0x60, 0xc1, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, - 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, - 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, - 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, - 0x11, 0x03, 0x11, 0x78, 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, - 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, - 0x00, 0x01, 0x70, 0x9b, 0x00, 0x06, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, - 0x60, 0xe4, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x07, - 0x08, 0x0c, 0x60, 0x8c, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x04, - 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x08, 0x08, 0x0c, 0x60, 0xeb, - 0x11, 0xb8, 0x70, 0x84, 0x90, 0x05, 0x11, 0xa0, 0x71, 0x64, 0x91, 0x86, - 0xff, 0xff, 0x01, 0x80, 0x91, 0x80, 0x33, 0xb6, 0x20, 0x0d, 0x91, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0x44, - 0x01, 0x80, 0x08, 0x0c, 0x50, 0xd1, 0x01, 0x10, 0x08, 0x0c, 0x28, 0xdc, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x3d, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x08, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x04, 0x11, 0x78, - 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, - 0x00, 0x08, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x60, 0xe4, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x09, 0x08, 0x0c, 0x60, 0x8c, - 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x05, 0x78, 0x37, 0x01, 0x00, - 0x08, 0x0c, 0x60, 0xeb, 0x11, 0x50, 0x70, 0x84, 0x90, 0x05, 0x11, 0x38, - 0x08, 0x0c, 0x5e, 0xb7, 0x11, 0x88, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x28, 0xdc, 0x20, 0xa9, 0x00, 0x08, 0x08, 0x0c, 0x61, 0x08, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, - 0x00, 0x10, 0x08, 0x0c, 0x5a, 0x11, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x05, 0xa8, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x3d, 0x90, 0x86, 0x00, 0x14, 0x15, 0x60, 0x08, 0x0c, 0x61, 0x08, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x05, 0x15, 0x20, - 0x78, 0x34, 0x90, 0x84, 0x01, 0x00, 0x20, 0x11, 0x01, 0x00, 0x92, 0x1e, - 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, - 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x0a, 0x00, 0xb1, - 0x00, 0x98, 0x90, 0x05, 0x11, 0x78, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x97, - 0x00, 0x00, 0x70, 0x9b, 0x00, 0x0e, 0x08, 0x0c, 0x5c, 0x5f, 0x00, 0x10, - 0x08, 0x0c, 0x60, 0xe4, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, - 0x00, 0x0b, 0x20, 0x11, 0x1c, 0x0e, 0x20, 0xe9, 0x00, 0x01, 0x22, 0xa0, - 0x20, 0xa9, 0x00, 0x40, 0x20, 0x19, 0xff, 0xff, 0x43, 0x04, 0x08, 0x0c, - 0x60, 0x8c, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x06, 0x78, 0x37, - 0x00, 0x00, 0x08, 0x0c, 0x60, 0xeb, 0x01, 0x18, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x20, 0x70, 0x60, 0x90, 0x85, 0x01, 0x00, 0x20, 0x12, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0x09, 0x02, 0x4e, 0x20, 0x11, 0x1c, 0x0e, 0x22, 0x0e, - 0x82, 0x10, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x28, 0x68, 0x10, - 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x1f, 0x04, 0x5b, 0xe1, - 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xc0, 0x20, 0x11, 0x5f, 0x97, - 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x84, 0x11, 0x78, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x06, - 0x11, 0x38, 0x78, 0x34, 0x90, 0x05, 0x11, 0x20, 0x70, 0x9b, 0x00, 0x0c, - 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x60, 0xe4, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x0d, 0x08, 0x0c, 0x60, 0x8c, 0x20, 0x79, - 0x02, 0x40, 0x78, 0x33, 0x11, 0x07, 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0xa9, 0x00, 0x40, 0x20, 0x11, 0x02, 0x6e, 0x20, 0x09, - 0x02, 0x4e, 0x22, 0x0e, 0x82, 0x10, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, - 0x11, 0x50, 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, - 0x68, 0x14, 0x80, 0x00, 0x68, 0x16, 0x20, 0x11, 0x02, 0x60, 0x1f, 0x04, - 0x5c, 0x25, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xe0, 0x20, 0x11, - 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x84, 0x11, 0x98, - 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, - 0x11, 0x07, 0x11, 0x58, 0x78, 0x34, 0x90, 0x05, 0x11, 0x40, 0x70, 0x97, - 0x00, 0x01, 0x08, 0x0c, 0x60, 0x5e, 0x70, 0x9b, 0x00, 0x0e, 0x00, 0x29, - 0x00, 0x10, 0x08, 0x0c, 0x60, 0xe4, 0x00, 0xfe, 0x00, 0x05, 0x91, 0x8d, - 0x00, 0x01, 0x08, 0x0c, 0x61, 0x33, 0x70, 0x9b, 0x00, 0x0f, 0x70, 0x93, - 0x00, 0x00, 0x20, 0x61, 0x01, 0x40, 0x60, 0x5b, 0xbc, 0x85, 0x60, 0x5f, - 0xb5, 0xb5, 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, 0x00, 0x05, 0x60, 0x43, - 0x00, 0x04, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x31, 0x00, 0x05, 0x70, 0x90, 0x90, 0x05, 0x01, 0x30, 0x20, 0x11, - 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x70, 0x9b, 0x00, 0x00, 0x00, 0x05, - 0x70, 0x9b, 0x00, 0x11, 0x08, 0x0c, 0xaf, 0x8e, 0x08, 0x0c, 0x61, 0x08, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x60, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x40, 0x74, 0x90, 0x94, 0x80, 0x00, 0x18, 0x90, 0x80, - 0x00, 0x07, 0x90, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x40, 0x03, - 0x08, 0x0c, 0x60, 0xeb, 0x11, 0xa0, 0x71, 0x7c, 0x81, 0xff, 0x01, 0x88, - 0x90, 0x0e, 0x70, 0x80, 0x90, 0x84, 0x00, 0xff, 0x01, 0x60, 0x08, 0x0c, - 0x28, 0x73, 0x91, 0x86, 0x00, 0x7e, 0x01, 0x38, 0x91, 0x86, 0x00, 0x80, - 0x01, 0x20, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0x44, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, - 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, - 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, - 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x03, 0x11, 0x78, 0x78, 0x34, - 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x12, - 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x13, 0x08, 0x0c, 0x60, 0x9a, 0x20, 0x79, - 0x02, 0x40, 0x78, 0x33, 0x11, 0x03, 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, - 0x61, 0x08, 0x08, 0x0c, 0x60, 0xeb, 0x11, 0x70, 0x70, 0x84, 0x90, 0x05, - 0x11, 0x58, 0x71, 0x5c, 0x91, 0x86, 0xff, 0xff, 0x01, 0x38, 0x20, 0x11, - 0x00, 0x08, 0x08, 0x0c, 0x5f, 0x44, 0x01, 0x68, 0x08, 0x0c, 0x60, 0xc1, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, - 0x88, 0x3d, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x08, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x04, 0x11, 0x78, - 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, - 0x00, 0x14, 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x15, 0x08, 0x0c, 0x60, 0x9a, - 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x04, 0x78, 0x37, 0x00, 0x00, - 0x08, 0x0c, 0x61, 0x08, 0x08, 0x0c, 0x60, 0xeb, 0x11, 0xb8, 0x70, 0x84, - 0x90, 0x05, 0x11, 0xa0, 0x71, 0x64, 0x91, 0x86, 0xff, 0xff, 0x01, 0x80, - 0x91, 0x80, 0x33, 0xb6, 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0x44, 0x01, 0x80, 0x08, 0x0c, - 0x50, 0xd1, 0x01, 0x10, 0x08, 0x0c, 0x28, 0xdc, 0x20, 0xa9, 0x00, 0x08, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, - 0x5f, 0xc1, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, - 0x05, 0xf0, 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, - 0x00, 0x14, 0x15, 0xa8, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, - 0x7a, 0x30, 0x92, 0x96, 0x11, 0x05, 0x15, 0x68, 0x78, 0x34, 0x90, 0x84, - 0x01, 0x00, 0x20, 0x11, 0x01, 0x00, 0x92, 0x1e, 0x11, 0x68, 0x90, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x61, 0x33, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x00, 0x80, - 0x90, 0x05, 0x11, 0xb8, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x61, 0x33, 0x70, 0x97, 0x00, 0x00, 0x7a, 0x38, 0xd2, 0xf4, - 0x01, 0x10, 0x70, 0xdf, 0x00, 0x08, 0x70, 0x9b, 0x00, 0x16, 0x00, 0x29, - 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x08, 0x0c, - 0xaf, 0x8e, 0x08, 0x0c, 0x61, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, - 0x02, 0x60, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, - 0x00, 0x0e, 0x40, 0x03, 0x20, 0x11, 0x02, 0x6d, 0x22, 0x04, 0x90, 0x84, - 0x01, 0x00, 0x20, 0x11, 0x02, 0x4d, 0x20, 0x12, 0x20, 0x11, 0x02, 0x6e, - 0x70, 0x9b, 0x00, 0x17, 0x08, 0x0c, 0x60, 0xeb, 0x11, 0x50, 0x70, 0x84, - 0x90, 0x05, 0x11, 0x38, 0x08, 0x0c, 0x5e, 0xb7, 0x11, 0x88, 0x90, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x28, 0xdc, 0x20, 0xa9, 0x00, 0x08, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0x10, 0x08, 0x0c, 0x5a, 0x11, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xd8, 0x20, 0x11, 0x5f, 0x97, - 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x84, 0x11, 0x90, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x06, - 0x11, 0x50, 0x78, 0x34, 0x90, 0x05, 0x11, 0x38, 0x90, 0x06, 0x08, 0x0c, - 0x61, 0x33, 0x70, 0x9b, 0x00, 0x18, 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, - 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x19, - 0x08, 0x0c, 0x60, 0x9a, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x06, - 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x09, 0x02, 0x6e, - 0x20, 0x39, 0x1c, 0x0e, 0x20, 0xa9, 0x00, 0x40, 0x21, 0x3e, 0x87, 0x38, - 0x81, 0x08, 0x91, 0x86, 0x02, 0x80, 0x11, 0x28, 0x68, 0x14, 0x80, 0x00, - 0x68, 0x16, 0x20, 0x09, 0x02, 0x60, 0x1f, 0x04, 0x5e, 0x20, 0x20, 0x39, - 0x1c, 0x0e, 0x08, 0x0c, 0x60, 0xeb, 0x11, 0xe8, 0x27, 0x28, 0x25, 0x14, - 0x82, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x00, 0x20, 0x18, 0x92, 0x94, - 0x00, 0xff, 0x80, 0x07, 0x92, 0x05, 0x20, 0x2a, 0x70, 0x60, 0x23, 0x10, - 0x82, 0x14, 0x92, 0xa0, 0x1c, 0x0e, 0x24, 0x14, 0x93, 0x8c, 0x00, 0x01, - 0x01, 0x18, 0x92, 0x94, 0xff, 0x00, 0x00, 0x18, 0x92, 0x94, 0x00, 0xff, - 0x80, 0x07, 0x92, 0x15, 0x22, 0x22, 0x20, 0xa9, 0x00, 0x40, 0x20, 0x09, - 0x02, 0x4e, 0x27, 0x0e, 0x87, 0x38, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, - 0x11, 0x28, 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, - 0x1f, 0x04, 0x5e, 0x53, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x5f, 0xc1, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xe0, - 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x90, 0x86, 0x00, 0x84, - 0x11, 0x98, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, - 0x92, 0x96, 0x11, 0x07, 0x11, 0x58, 0x78, 0x34, 0x90, 0x05, 0x11, 0x40, - 0x70, 0x97, 0x00, 0x01, 0x08, 0x0c, 0x60, 0x5e, 0x70, 0x9b, 0x00, 0x1a, - 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x61, 0x33, 0x70, 0x9b, 0x00, 0x1b, - 0x08, 0x0c, 0xaf, 0x8e, 0x08, 0x0c, 0x61, 0x08, 0x20, 0x11, 0x02, 0x60, - 0x20, 0x09, 0x02, 0x40, 0x74, 0x90, 0x94, 0x80, 0x00, 0x18, 0x90, 0x80, - 0x00, 0x07, 0x90, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x22, 0x0e, - 0x82, 0x10, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x50, 0x68, 0x10, - 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x68, 0x14, 0x80, 0x00, - 0x68, 0x16, 0x20, 0x11, 0x02, 0x60, 0x1f, 0x04, 0x5e, 0x9f, 0x60, 0xc3, - 0x00, 0x84, 0x08, 0x0c, 0x5f, 0xc1, 0x00, 0x05, 0x00, 0x05, 0x00, 0x86, - 0x00, 0x96, 0x20, 0x29, 0x18, 0x48, 0x25, 0x2c, 0x20, 0xa9, 0x00, 0x08, - 0x20, 0x41, 0x1c, 0x0e, 0x20, 0xe9, 0x00, 0x01, 0x28, 0xa0, 0x08, 0x0c, - 0x61, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x40, 0x03, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0x11, 0x00, 0x07, 0xd5, 0xd4, 0x01, 0x08, - 0x90, 0x16, 0x28, 0x00, 0x92, 0x00, 0x20, 0x0c, 0x91, 0xa6, 0xff, 0xff, - 0x11, 0x48, 0xd5, 0xd4, 0x01, 0x10, 0x82, 0x10, 0x00, 0x08, 0x82, 0x11, - 0x1f, 0x04, 0x5e, 0xd1, 0x08, 0x04, 0x5f, 0x40, 0x82, 0xff, 0x11, 0x60, - 0xd5, 0xd4, 0x01, 0x20, 0x91, 0xa6, 0x3f, 0xff, 0x0d, 0x90, 0x00, 0x20, - 0x91, 0xa6, 0x3f, 0xff, 0x09, 0x04, 0x5f, 0x40, 0x91, 0x8d, 0xc0, 0x00, - 0x20, 0xa9, 0x00, 0x10, 0x20, 0x19, 0x00, 0x01, 0xd5, 0xd4, 0x01, 0x10, - 0x20, 0x19, 0x00, 0x10, 0x21, 0x20, 0xd5, 0xd4, 0x01, 0x10, 0x84, 0x23, - 0x00, 0x08, 0x84, 0x24, 0x12, 0x40, 0xd5, 0xd4, 0x01, 0x10, 0x83, 0x19, - 0x00, 0x08, 0x83, 0x18, 0x1f, 0x04, 0x5e, 0xf7, 0x04, 0xd8, 0x23, 0xa8, - 0x20, 0x21, 0x00, 0x01, 0x84, 0x26, 0x84, 0x25, 0x1f, 0x04, 0x5f, 0x09, - 0x23, 0x28, 0x85, 0x29, 0x92, 0xbe, 0x00, 0x07, 0x01, 0x58, 0x00, 0x06, - 0x20, 0x39, 0x00, 0x07, 0x22, 0x00, 0x97, 0x3a, 0x00, 0x0e, 0x27, 0xa8, - 0x95, 0xa8, 0x00, 0x10, 0x1f, 0x04, 0x5f, 0x18, 0x75, 0x5e, 0x95, 0xc8, - 0x33, 0xb6, 0x29, 0x2d, 0x95, 0xac, 0x00, 0xff, 0x75, 0x82, 0x65, 0x32, - 0x65, 0x36, 0x00, 0x16, 0x25, 0x08, 0x08, 0x0c, 0x28, 0xbc, 0x00, 0x1e, - 0x60, 0xe7, 0x00, 0x00, 0x65, 0xea, 0x20, 0x18, 0x23, 0x04, 0x94, 0x05, - 0x20, 0x1a, 0x70, 0x87, 0x00, 0x01, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x4e, 0x20, 0xe1, 0x00, 0x01, 0x28, 0x98, 0x20, 0xa9, 0x00, 0x08, - 0x40, 0x03, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x9e, - 0x00, 0x8e, 0x00, 0x05, 0x01, 0x56, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x22, 0xa8, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0x11, 0x02, 0x4e, 0x22, 0xa0, 0x40, 0x03, - 0x01, 0x4e, 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, 0x01, 0x5e, 0x21, 0x18, - 0x90, 0x26, 0x20, 0x01, 0x00, 0x07, 0x93, 0x9a, 0x00, 0x10, 0x02, 0x18, - 0x84, 0x20, 0x80, 0x01, 0x0c, 0xd0, 0x21, 0x18, 0x84, 0xff, 0x01, 0x20, - 0x93, 0x9a, 0x00, 0x10, 0x84, 0x21, 0x1d, 0xe0, 0x20, 0x21, 0x00, 0x01, - 0x83, 0xff, 0x01, 0x18, 0x84, 0x23, 0x83, 0x19, 0x1d, 0xe8, 0x92, 0x38, - 0x20, 0x29, 0x02, 0x6e, 0x95, 0x28, 0x25, 0x04, 0x94, 0x2c, 0x11, 0xb8, - 0x94, 0x05, 0x20, 0x3a, 0x71, 0x5e, 0x91, 0xa0, 0x33, 0xb6, 0x24, 0x2d, - 0x95, 0xac, 0x00, 0xff, 0x75, 0x82, 0x65, 0x32, 0x65, 0x36, 0x00, 0x16, - 0x25, 0x08, 0x08, 0x0c, 0x28, 0xbc, 0x00, 0x1e, 0x60, 0xe7, 0x00, 0x00, - 0x65, 0xea, 0x70, 0x87, 0x00, 0x01, 0x90, 0x84, 0x00, 0x00, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x8b, 0x00, 0x00, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x71, - 0x01, 0x40, 0x08, 0x0c, 0x60, 0x4d, 0x08, 0x0c, 0xa6, 0xe9, 0x70, 0x04, - 0x90, 0x84, 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2d, 0x49, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x26, 0x20, 0x73, 0x00, 0x00, - 0x78, 0x40, 0x00, 0x26, 0x00, 0x16, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, - 0x60, 0xaa, 0x00, 0x1e, 0x90, 0x94, 0x00, 0x10, 0x92, 0x85, 0x00, 0x80, - 0x78, 0x42, 0x7a, 0x42, 0x00, 0x2e, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x2b, 0xce, - 0x02, 0x28, 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc5, 0x20, 0x12, - 0x20, 0x11, 0x19, 0xf2, 0x20, 0x13, 0x00, 0x00, 0x70, 0x93, 0x00, 0x00, - 0x01, 0x2e, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x08, 0x0c, - 0xa6, 0xe0, 0x61, 0x44, 0xd1, 0x84, 0x01, 0x20, 0x71, 0x98, 0x91, 0x8d, - 0x20, 0x00, 0x00, 0x18, 0x71, 0x8c, 0x91, 0x8d, 0x10, 0x00, 0x20, 0x11, - 0x19, 0x99, 0x21, 0x12, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x5f, 0x97, - 0x08, 0x0c, 0x88, 0xd5, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb2, 0x44, 0x20, 0x09, - 0x00, 0xf7, 0x08, 0x0c, 0x60, 0xaa, 0x20, 0x61, 0x19, 0xfb, 0x90, 0x0e, - 0x61, 0x1a, 0x61, 0x1e, 0x61, 0x7a, 0x61, 0x7e, 0x20, 0x61, 0x18, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, 0x19, 0x99, 0x20, 0x0b, 0x00, 0x00, - 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, 0x60, 0x19, 0x08, 0x0c, 0x88, 0x31, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x04, 0x71, 0x20, 0x71, - 0x01, 0x00, 0x08, 0x0c, 0xa6, 0xe9, 0x20, 0x71, 0x01, 0x40, 0x70, 0x04, - 0x90, 0x84, 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2d, 0x49, 0x08, 0x0c, - 0x76, 0x3f, 0x01, 0x88, 0x08, 0x0c, 0x76, 0x5a, 0x11, 0x70, 0x08, 0x0c, - 0x79, 0x3c, 0x00, 0x16, 0x08, 0x0c, 0x29, 0x8b, 0x20, 0x01, 0x19, 0x6d, - 0x21, 0x02, 0x00, 0x1e, 0x08, 0x0c, 0x79, 0x37, 0x08, 0x0c, 0x75, 0x63, - 0x00, 0x50, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x2c, 0x67, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x08, 0x0c, 0x5f, 0xed, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, - 0xd0, 0xbc, 0x01, 0x58, 0x00, 0x26, 0x00, 0x36, 0x20, 0x11, 0x80, 0x17, - 0x20, 0x01, 0x19, 0x99, 0x20, 0x1c, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x12, 0x20, 0xe9, 0x00, 0x01, - 0x20, 0xa1, 0x1c, 0x80, 0x08, 0x0c, 0x61, 0x08, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0x99, 0x02, 0x6e, 0x00, 0x99, 0x20, 0xa9, 0x00, 0x20, 0x08, 0x0c, - 0x61, 0x02, 0x20, 0x99, 0x02, 0x60, 0x20, 0xa1, 0x1c, 0x92, 0x00, 0x51, - 0x20, 0xa9, 0x00, 0x0e, 0x08, 0x0c, 0x61, 0x05, 0x20, 0x99, 0x02, 0x60, - 0x20, 0xa1, 0x1c, 0xb2, 0x00, 0x09, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x34, 0x10, 0x33, 0x08, 0x21, 0x04, 0x80, 0x07, 0x20, 0x12, 0x81, 0x08, - 0x82, 0x10, 0x1f, 0x04, 0x60, 0x82, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x08, 0x0c, 0xaf, 0x8e, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x1c, 0x00, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x0c, - 0x40, 0x03, 0x00, 0x05, 0x08, 0x0c, 0xaf, 0x8e, 0x08, 0x0c, 0x61, 0x08, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x60, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x0c, 0x40, 0x03, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0x06, 0x20, 0x61, 0x01, 0x00, 0x81, 0x0f, 0x20, 0x01, - 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x11, 0x38, 0x20, 0x01, 0x18, 0x18, - 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, 0x91, 0x05, 0x00, 0x10, 0x91, 0x85, - 0x00, 0xf7, 0x60, 0x4a, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x46, 0x08, 0x0c, 0x6a, 0x9f, 0x01, 0x58, 0x90, 0x06, 0x20, 0x20, - 0x20, 0x09, 0x00, 0x2a, 0x08, 0x0c, 0xec, 0x31, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xc1, 0x95, 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, 0x90, 0x0e, - 0x08, 0x0c, 0x32, 0x1b, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x40, 0x00, 0x36, - 0x20, 0x19, 0xff, 0xff, 0x20, 0x21, 0x00, 0x07, 0x08, 0x0c, 0x4d, 0xfb, - 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0x5f, 0xed, - 0x70, 0x9b, 0x00, 0x00, 0x70, 0x93, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0xd0, 0x9c, 0x01, 0x00, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x01, 0x01, 0x01, 0x20, 0x0c, 0x91, 0x8d, 0x00, 0x06, 0x21, 0x02, - 0x01, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x09, 0x00, 0x01, - 0x00, 0x20, 0x20, 0x09, 0x00, 0x02, 0x00, 0x08, 0x90, 0x0e, 0x68, 0x14, - 0x90, 0x84, 0xff, 0xc0, 0x91, 0x0d, 0x69, 0x16, 0x00, 0x05, 0x00, 0xf6, - 0x01, 0x56, 0x01, 0x46, 0x01, 0xd6, 0x90, 0x06, 0x20, 0xa9, 0x00, 0x80, - 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1c, 0x00, 0x40, 0x04, 0x20, 0x79, - 0x1c, 0x00, 0x78, 0x03, 0x22, 0x00, 0x78, 0x07, 0x00, 0xef, 0x78, 0x0f, - 0x00, 0xef, 0x78, 0x13, 0x01, 0x38, 0x78, 0x23, 0xff, 0xff, 0x78, 0x27, - 0xff, 0xff, 0x01, 0xde, 0x01, 0x4e, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, - 0x19, 0xa7, 0x01, 0x18, 0x20, 0x03, 0x00, 0x01, 0x00, 0x10, 0x20, 0x03, - 0x00, 0x00, 0x00, 0x05, 0x01, 0x56, 0x20, 0xa9, 0x08, 0x00, 0x20, 0x09, - 0x10, 0x00, 0x90, 0x06, 0x20, 0x0a, 0x81, 0x08, 0x1f, 0x04, 0x61, 0x42, - 0x01, 0x5e, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x36, 0x01, 0x56, 0x01, 0x36, - 0x01, 0x46, 0x20, 0x69, 0x18, 0x47, 0x90, 0x06, 0xb8, 0x02, 0xb8, 0xce, - 0xb8, 0x07, 0x07, 0x07, 0xb8, 0x0a, 0xb8, 0x0e, 0xb8, 0x12, 0x91, 0x98, - 0x33, 0xb6, 0x23, 0x1d, 0x93, 0x9c, 0x00, 0xff, 0xbb, 0x16, 0x00, 0x16, - 0x00, 0x26, 0xb8, 0xc2, 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x20, 0x91, 0x92, - 0x00, 0x7e, 0x12, 0x08, 0xbb, 0xc2, 0x20, 0xa9, 0x00, 0x04, 0xb8, 0xc4, - 0x20, 0xe8, 0xb9, 0xc8, 0x91, 0x98, 0x00, 0x06, 0x90, 0x06, 0x23, 0xa0, - 0x40, 0x04, 0x20, 0xa9, 0x00, 0x04, 0x91, 0x98, 0x00, 0x0a, 0x23, 0xa0, - 0x40, 0x04, 0x00, 0x2e, 0x00, 0x1e, 0xb8, 0x3e, 0xb8, 0x42, 0xb8, 0x4e, - 0xb8, 0x52, 0xb8, 0x56, 0xb8, 0x5a, 0xb8, 0x5e, 0xb8, 0x62, 0xb8, 0x66, - 0xb8, 0x6a, 0xb8, 0x6f, 0x01, 0x00, 0xb8, 0x72, 0xb8, 0x76, 0xb8, 0x7a, - 0xb8, 0x8a, 0xb8, 0x8e, 0xb8, 0x93, 0x00, 0x08, 0xb8, 0x96, 0xb8, 0x9a, - 0xb8, 0x9e, 0xb8, 0xbe, 0xb9, 0xa2, 0x00, 0x96, 0xb8, 0xa4, 0x90, 0x4d, - 0x01, 0x10, 0x08, 0x0c, 0x10, 0x40, 0xb8, 0xa7, 0x00, 0x00, 0x00, 0x9e, - 0x90, 0x06, 0xb8, 0x4a, 0x68, 0x10, 0xb8, 0x3a, 0x68, 0x0c, 0xb8, 0x46, - 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xac, 0x90, 0x05, 0x01, 0x98, 0x00, 0xc6, - 0x20, 0x60, 0x9c, 0x82, 0x1c, 0xd0, 0x0a, 0x0c, 0x0d, 0xc5, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x1a, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x8c, 0xf7, 0x00, 0xce, 0x09, 0x0c, 0x90, 0x96, 0xb8, 0xaf, 0x00, 0x00, - 0x68, 0x14, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x42, 0x01, 0x4e, 0x01, 0x3e, - 0x01, 0x5e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xa9, 0x74, 0xae, 0x78, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, - 0x40, 0x00, 0x1a, 0x04, 0x62, 0x30, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, - 0x62, 0x34, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0x90, 0x84, 0x00, 0x03, - 0x19, 0x04, 0x62, 0x3a, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, - 0x05, 0x18, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x06, - 0x15, 0x08, 0xb8, 0xa4, 0x90, 0x0d, 0x19, 0x04, 0x62, 0x4c, 0xb8, 0x50, - 0x90, 0x0d, 0x11, 0x48, 0xa8, 0x02, 0x29, 0x00, 0xb8, 0x52, 0xb8, 0x4e, - 0x08, 0x0c, 0x95, 0x1c, 0x90, 0x06, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xa6, - 0x21, 0x50, 0x29, 0x00, 0xb0, 0x02, 0xa8, 0x03, 0x00, 0x00, 0x00, 0xae, - 0xb8, 0x52, 0x0c, 0x90, 0x20, 0x01, 0x00, 0x05, 0x90, 0x0e, 0x04, 0xb8, - 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x04, 0x98, 0x90, 0x82, 0x00, 0x06, - 0x12, 0x90, 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x60, 0xb8, 0xa0, 0x90, 0x84, - 0xff, 0x80, 0x11, 0x40, 0xb9, 0x00, 0xd1, 0xfc, 0x09, 0x90, 0x20, 0x01, - 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, 0x04, 0x08, 0x20, 0x01, 0x00, 0x28, - 0x00, 0xa8, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, - 0x20, 0x01, 0x00, 0x04, 0x00, 0x68, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x40, 0x20, 0x01, 0x00, 0x29, 0xb9, 0x00, 0xd1, 0xfc, - 0x01, 0x18, 0x20, 0x09, 0x10, 0x00, 0x00, 0x48, 0x90, 0x0e, 0x00, 0x38, - 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x00, 0x18, 0x20, 0x01, 0x00, 0x29, - 0x90, 0x0e, 0x90, 0x05, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0xd0, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, - 0x90, 0x5d, 0x09, 0xa8, 0x08, 0x0c, 0x6a, 0xa3, 0x19, 0x90, 0xb8, 0x00, - 0xd0, 0xbc, 0x09, 0x78, 0x08, 0x04, 0x61, 0xe3, 0x08, 0x0c, 0x68, 0xc0, - 0x09, 0x04, 0x61, 0xfc, 0x08, 0x04, 0x61, 0xe7, 0x00, 0xb6, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa8, 0x74, 0x90, 0x8e, 0x00, 0xff, - 0x11, 0x20, 0x20, 0x01, 0x19, 0x6b, 0x20, 0x5c, 0x00, 0x60, 0xa9, 0x74, - 0x91, 0x82, 0x08, 0x00, 0x16, 0x90, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, - 0x90, 0x5d, 0x01, 0xd0, 0x08, 0x0c, 0x6a, 0x43, 0x11, 0xd0, 0x08, 0x0c, - 0xb2, 0x7d, 0x05, 0x70, 0x2b, 0x00, 0x60, 0x12, 0x29, 0x00, 0x60, 0x16, - 0x60, 0x23, 0x00, 0x09, 0x60, 0x0b, 0x00, 0x00, 0xa8, 0x74, 0x90, 0x8e, - 0x00, 0xff, 0x11, 0x10, 0x60, 0x0b, 0x80, 0x00, 0x20, 0x09, 0x00, 0x43, - 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x06, 0x00, 0xb0, 0x20, 0x01, 0x00, 0x28, - 0x00, 0x90, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, - 0x20, 0x01, 0x00, 0x04, 0x00, 0x38, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, 0x00, 0x10, 0x20, 0x01, - 0x00, 0x29, 0x90, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, - 0x20, 0x01, 0x00, 0x2c, 0x0c, 0xc0, 0x00, 0xb6, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa9, 0x74, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, - 0x63, 0x1d, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, 0x09, 0x04, - 0x62, 0xf5, 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7f, 0x01, 0x90, 0xa8, 0x7c, - 0xd0, 0xfc, 0x11, 0x78, 0x08, 0x0c, 0x6a, 0xab, 0x01, 0x60, 0xa9, 0x94, - 0x81, 0xff, 0x01, 0x30, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x30, 0x90, 0x8e, - 0x00, 0x05, 0x01, 0x18, 0x08, 0x0c, 0x6a, 0xa3, 0x15, 0x98, 0xa8, 0x7c, - 0xd0, 0xfc, 0x01, 0xe0, 0xa8, 0x94, 0x90, 0x05, 0x01, 0xc8, 0x20, 0x60, - 0x00, 0x26, 0x20, 0x10, 0x08, 0x0c, 0xd0, 0xc6, 0x00, 0x2e, 0x11, 0x20, - 0x20, 0x01, 0x00, 0x08, 0x08, 0x04, 0x63, 0x1f, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x0a, 0x01, 0x20, 0x20, 0x01, 0x00, 0x08, 0x08, 0x04, 0x63, 0x1f, - 0x60, 0x1a, 0x60, 0x03, 0x00, 0x08, 0x29, 0x00, 0x60, 0x16, 0x00, 0x58, - 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0xe8, 0x2b, 0x00, 0x60, 0x12, 0x29, 0x00, - 0x60, 0x16, 0x60, 0x0b, 0xff, 0xff, 0x60, 0x23, 0x00, 0x0a, 0x20, 0x09, - 0x00, 0x03, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x06, 0x04, 0x58, 0x20, 0x01, - 0x00, 0x28, 0x04, 0x38, 0x90, 0x82, 0x00, 0x06, 0x12, 0x90, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x60, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x11, 0x40, - 0xb9, 0x00, 0xd1, 0xfc, 0x09, 0x00, 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, - 0x10, 0x00, 0x00, 0xa8, 0x20, 0x01, 0x00, 0x28, 0x00, 0x90, 0x20, 0x09, - 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x50, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x28, - 0x20, 0x01, 0x00, 0x29, 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, 0x90, 0x05, - 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, 0x00, 0x2c, - 0x0c, 0xc0, 0x00, 0xf6, 0x00, 0xb6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0xa8, 0xe0, 0x90, 0x05, 0x15, 0x50, 0xa8, 0xdc, 0x90, 0x82, 0x01, 0x01, - 0x16, 0x30, 0xa8, 0xc8, 0x90, 0x05, 0x15, 0x18, 0xa8, 0xc4, 0x90, 0x82, - 0x01, 0x01, 0x12, 0xf8, 0xa9, 0x74, 0x20, 0x79, 0x18, 0x00, 0x91, 0x82, - 0x08, 0x00, 0x12, 0xe8, 0x78, 0x30, 0x90, 0x84, 0x00, 0x03, 0x11, 0x30, - 0xaa, 0x98, 0xab, 0x94, 0xa8, 0x78, 0x90, 0x84, 0x00, 0x07, 0x00, 0xea, - 0x79, 0x30, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x38, - 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x10, 0x20, 0x01, - 0x00, 0x29, 0x90, 0x0e, 0x00, 0x38, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, - 0x00, 0x18, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x90, 0x06, 0x00, 0x08, - 0x90, 0x05, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0xfe, 0x00, 0x05, 0x63, 0xb4, - 0x63, 0x6f, 0x63, 0x86, 0x63, 0xb4, 0x63, 0xb4, 0x63, 0xb4, 0x63, 0xb4, - 0x63, 0xb4, 0x21, 0x00, 0x90, 0x82, 0x00, 0x7e, 0x12, 0x78, 0x08, 0x0c, - 0x66, 0xb9, 0x01, 0x48, 0x90, 0x46, 0xb8, 0x10, 0x93, 0x06, 0x19, 0x04, - 0x63, 0xbc, 0xb8, 0x14, 0x92, 0x06, 0x15, 0xf0, 0x00, 0x28, 0xbb, 0x12, - 0xba, 0x16, 0x00, 0x10, 0x08, 0x0c, 0x4a, 0xf7, 0x01, 0x50, 0x04, 0xb0, - 0x08, 0x0c, 0x67, 0x24, 0x15, 0x98, 0xb8, 0x10, 0x93, 0x06, 0x15, 0x80, - 0xb8, 0x14, 0x92, 0x06, 0x15, 0x68, 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0x30, - 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x29, 0x00, 0x60, 0x16, - 0x60, 0x0b, 0xff, 0xff, 0x60, 0x23, 0x00, 0x0a, 0xa8, 0x78, 0x90, 0x86, - 0x00, 0x01, 0x11, 0x70, 0x08, 0x0c, 0x32, 0x50, 0x90, 0x06, 0x08, 0x0c, - 0x66, 0x56, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, 0x20, 0x01, - 0x02, 0x00, 0xb8, 0x6e, 0xb8, 0x93, 0x00, 0x02, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x06, 0x00, 0x68, 0x20, 0x01, 0x00, 0x01, - 0x90, 0x0e, 0x00, 0x38, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, 0x00, 0x18, - 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x90, 0x05, 0x00, 0x00, 0x01, 0x2e, - 0x00, 0xbe, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa8, 0x94, 0x90, 0xc6, 0x00, 0x15, - 0x09, 0x04, 0x65, 0xa7, 0x90, 0xc6, 0x00, 0x56, 0x09, 0x04, 0x65, 0xab, - 0x90, 0xc6, 0x00, 0x66, 0x09, 0x04, 0x65, 0xaf, 0x90, 0xc6, 0x00, 0x67, - 0x09, 0x04, 0x65, 0xb3, 0x90, 0xc6, 0x00, 0x68, 0x09, 0x04, 0x65, 0xb7, - 0x90, 0xc6, 0x00, 0x71, 0x09, 0x04, 0x65, 0xbb, 0x90, 0xc6, 0x00, 0x74, - 0x09, 0x04, 0x65, 0xbf, 0x90, 0xc6, 0x00, 0x7c, 0x09, 0x04, 0x65, 0xc3, - 0x90, 0xc6, 0x00, 0x7e, 0x09, 0x04, 0x65, 0xc7, 0x90, 0xc6, 0x00, 0x37, - 0x09, 0x04, 0x65, 0xcb, 0x90, 0x16, 0x20, 0x79, 0x18, 0x00, 0xa9, 0x74, - 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, 0x65, 0xa2, 0x91, 0x82, 0x08, 0x00, - 0x1a, 0x04, 0x65, 0xa2, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x98, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x12, 0x68, 0xa8, 0x94, - 0x90, 0xc6, 0x00, 0x6f, 0x01, 0x48, 0x08, 0x0c, 0xb2, 0x3d, 0x19, 0x04, - 0x65, 0x8b, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x19, 0x04, 0x65, 0x8b, - 0xa8, 0x94, 0x90, 0xc6, 0x00, 0x6f, 0x01, 0x58, 0x90, 0xc6, 0x00, 0x5e, - 0x09, 0x04, 0x64, 0xeb, 0x90, 0xc6, 0x00, 0x64, 0x09, 0x04, 0x65, 0x14, - 0x20, 0x08, 0x08, 0x04, 0x64, 0xad, 0xa9, 0x98, 0xa8, 0xb0, 0x20, 0x40, - 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x20, 0x91, 0x82, 0x00, 0x7f, 0x0a, 0x04, - 0x64, 0xad, 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, 0x64, 0xad, 0x91, 0x82, - 0x08, 0x00, 0x1a, 0x04, 0x64, 0xad, 0xaa, 0xa0, 0xab, 0x9c, 0x78, 0x7c, - 0x93, 0x06, 0x11, 0xa8, 0x78, 0x80, 0x00, 0x96, 0x92, 0x4e, 0x11, 0x28, - 0x22, 0x08, 0x23, 0x10, 0x00, 0x9e, 0x08, 0x04, 0x64, 0xad, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x40, 0x99, 0xcc, 0xff, 0x00, 0x00, 0x9e, 0x11, 0x28, - 0x22, 0x08, 0x23, 0x10, 0x08, 0x04, 0x64, 0xad, 0x00, 0x9e, 0x08, 0x0c, - 0x4a, 0xf7, 0x09, 0x04, 0x64, 0xb7, 0x90, 0x0e, 0x90, 0x16, 0x90, 0xc6, - 0x40, 0x00, 0x15, 0xe0, 0x00, 0x06, 0x08, 0x0c, 0x69, 0x44, 0x11, 0x08, - 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x20, 0xa9, - 0x00, 0x04, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, - 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, - 0x20, 0x98, 0x08, 0x0c, 0x0f, 0x8b, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x35, 0x20, 0xa0, 0xb8, 0xc4, - 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, - 0x0f, 0x8b, 0xa8, 0xc4, 0xab, 0xc8, 0x93, 0x05, 0xab, 0xcc, 0x93, 0x05, - 0xab, 0xd0, 0x93, 0x05, 0xab, 0xd4, 0x93, 0x05, 0xab, 0xd8, 0x93, 0x05, - 0xab, 0xdc, 0x93, 0x05, 0xab, 0xe0, 0x93, 0x05, 0x90, 0x05, 0x05, 0x10, - 0x00, 0x0e, 0x00, 0xc8, 0x90, 0xc6, 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, - 0x00, 0xa0, 0x90, 0xc6, 0x40, 0x08, 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, - 0x00, 0x70, 0x90, 0xc6, 0x40, 0x09, 0x11, 0x08, 0x00, 0x50, 0x90, 0xc6, - 0x40, 0x06, 0x01, 0x38, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, 0x00, 0x0a, - 0x00, 0x10, 0x20, 0x01, 0x40, 0x06, 0xa8, 0x96, 0xa9, 0x9a, 0xaa, 0x9e, - 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x04, 0x78, 0x00, 0x0e, 0x08, 0x0c, - 0xb2, 0x7d, 0x11, 0x30, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, 0x00, 0x03, - 0x90, 0x16, 0x0c, 0x78, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, - 0x29, 0x00, 0x60, 0x16, 0x60, 0x23, 0x00, 0x01, 0xa8, 0x68, 0xd8, 0x8c, - 0x01, 0x08, 0xc0, 0xf5, 0xa8, 0x6a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x32, 0x50, 0x01, 0x2e, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x0c, 0xb3, 0x52, 0xa8, 0xb0, 0xd0, 0x94, 0x01, 0x18, 0xb8, 0xcc, - 0xc0, 0x8d, 0xb8, 0xce, 0x90, 0x06, 0x90, 0x05, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x18, - 0x20, 0x09, 0x00, 0x07, 0x00, 0xf8, 0xa9, 0x98, 0xae, 0xb0, 0x08, 0x0c, - 0x67, 0x24, 0x19, 0x04, 0x64, 0xa8, 0x91, 0x86, 0x00, 0x7f, 0x01, 0x30, - 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0x20, 0x09, 0x00, 0x09, 0x00, 0x80, - 0x00, 0x96, 0x08, 0x0c, 0x10, 0x0e, 0x11, 0x20, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x02, 0x00, 0x40, 0x29, 0x00, 0x00, 0x9e, 0xa8, 0x06, 0x08, 0x0c, - 0xd2, 0xc0, 0x19, 0xb0, 0x20, 0x09, 0x00, 0x03, 0x20, 0x01, 0x40, 0x05, - 0x08, 0x04, 0x64, 0xaf, 0xa9, 0x98, 0xae, 0xb0, 0x08, 0x0c, 0x67, 0x24, - 0x19, 0x04, 0x64, 0xa8, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x0e, 0x11, 0x28, - 0x00, 0x9e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x65, 0x68, 0x29, 0x00, - 0x00, 0x9e, 0xa8, 0x06, 0x00, 0x96, 0x20, 0x48, 0x20, 0xa9, 0x00, 0x2b, - 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, 0x20, 0xa9, - 0x00, 0x08, 0x90, 0x80, 0x00, 0x06, 0x20, 0xa0, 0xbb, 0xc8, 0x93, 0x98, - 0x00, 0x06, 0x23, 0x98, 0x08, 0x0c, 0x0f, 0x8b, 0x00, 0x9e, 0xa8, 0x7b, - 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0xd6, 0x84, - 0x11, 0x68, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xb4, 0x11, 0x18, 0xa8, 0x9b, - 0x00, 0x0b, 0x00, 0xe0, 0xb8, 0x00, 0xd0, 0x8c, 0x01, 0x18, 0xa8, 0x9b, - 0x00, 0x0c, 0x00, 0xb0, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x18, 0xa8, 0x9b, - 0x00, 0x09, 0x00, 0x80, 0x08, 0x0c, 0x57, 0xe9, 0x01, 0x18, 0xa8, 0x9b, - 0x00, 0x07, 0x00, 0x50, 0x08, 0x0c, 0xd2, 0xa3, 0x19, 0x04, 0x64, 0xe4, - 0x20, 0x09, 0x00, 0x03, 0x20, 0x01, 0x40, 0x05, 0x08, 0x04, 0x64, 0xaf, - 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x04, 0x80, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x02, 0x20, 0x09, 0x00, 0x2b, 0xaa, 0xa0, 0xab, 0x9c, - 0xac, 0xa8, 0xad, 0xa4, 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0x52, - 0x08, 0x0c, 0xb7, 0xf1, 0x19, 0x04, 0x64, 0xe4, 0x20, 0x09, 0x00, 0x02, - 0x08, 0xe8, 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x08, 0x04, 0x64, 0xe5, - 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x38, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x08, 0x04, 0x64, 0xe5, - 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x08, 0x04, 0x64, 0xe5, 0x08, 0x0c, - 0x37, 0xe9, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, 0x55, 0x00, 0x08, 0x04, - 0x64, 0xe6, 0x08, 0x0c, 0x46, 0x37, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, - 0x46, 0xb0, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, 0x47, 0x0c, 0x08, 0x04, - 0x64, 0xe6, 0x08, 0x0c, 0x4b, 0xba, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, - 0x4e, 0x82, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, 0x51, 0x67, 0x08, 0x04, - 0x64, 0xe6, 0x08, 0x0c, 0x53, 0x60, 0x08, 0x04, 0x64, 0xe6, 0x08, 0x0c, - 0x3a, 0x25, 0x08, 0x04, 0x64, 0xe6, 0x00, 0xb6, 0xa9, 0x74, 0xae, 0x78, - 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, 0x16, 0x18, 0x91, 0x82, - 0x08, 0x00, 0x12, 0x68, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, - 0x01, 0x40, 0x08, 0x0c, 0x6a, 0xa3, 0x11, 0x48, 0x00, 0xe9, 0x08, 0x0c, - 0x68, 0x4f, 0x90, 0x06, 0x00, 0xb0, 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, - 0x00, 0x90, 0x90, 0x82, 0x00, 0x06, 0x12, 0x40, 0xb9, 0x00, 0xd1, 0xfc, - 0x0d, 0x88, 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, 0x00, 0x38, - 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x00, 0x18, 0x20, 0x01, 0x00, 0x29, - 0x90, 0x0e, 0x90, 0x05, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xb8, 0x50, 0x90, 0x0d, 0x01, 0x50, 0x29, 0x00, 0x00, 0x96, - 0x21, 0x48, 0xa8, 0x02, 0x00, 0x9e, 0xa8, 0x03, 0x00, 0x00, 0xb8, 0x52, - 0x01, 0x2e, 0x00, 0x05, 0x29, 0x00, 0xb8, 0x52, 0xb8, 0x4e, 0xa8, 0x03, - 0x00, 0x00, 0x0c, 0xc0, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xb8, 0x4c, - 0x90, 0x05, 0x01, 0x70, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x04, - 0x90, 0x86, 0x00, 0x02, 0x01, 0x68, 0x00, 0xee, 0xb8, 0x4c, 0xa8, 0x02, - 0x29, 0x00, 0xb8, 0x4e, 0x01, 0x2e, 0x00, 0x05, 0x29, 0x00, 0xb8, 0x52, - 0xb8, 0x4e, 0xa8, 0x03, 0x00, 0x00, 0x0c, 0xc0, 0x70, 0x1c, 0x9b, 0x06, - 0x1d, 0x80, 0xb8, 0x4c, 0x00, 0xa6, 0x20, 0x50, 0xb0, 0x00, 0xa8, 0x02, - 0x29, 0x00, 0xb0, 0x02, 0x00, 0xae, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xb8, 0x4c, 0x90, 0x4d, 0x01, 0x30, - 0xa8, 0x00, 0x90, 0x05, 0x11, 0x08, 0xb8, 0x52, 0xb8, 0x4e, 0x99, 0x05, - 0x01, 0x2e, 0x00, 0x05, 0xb8, 0x4c, 0x90, 0x4d, 0x01, 0x30, 0xa8, 0x00, - 0x90, 0x05, 0x11, 0x08, 0xb8, 0x52, 0xb8, 0x4e, 0x99, 0x05, 0x00, 0x05, - 0x00, 0xb6, 0x01, 0x26, 0x00, 0xc6, 0x00, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x62, 0x10, 0x22, 0x58, 0xba, 0x00, 0x90, 0x05, 0x01, 0x10, 0xc2, 0x85, - 0x00, 0x08, 0xc2, 0x84, 0xba, 0x02, 0x00, 0x2e, 0x00, 0xce, 0x01, 0x2e, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, - 0x80, 0x00, 0x62, 0x10, 0x22, 0x58, 0xba, 0x04, 0x00, 0x06, 0x90, 0x86, - 0x00, 0x06, 0x11, 0x70, 0xb8, 0x9c, 0xd0, 0xac, 0x01, 0x58, 0x08, 0x0c, - 0x6a, 0x9f, 0x01, 0x40, 0x92, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, - 0x00, 0x07, 0x11, 0x10, 0x20, 0x11, 0x06, 0x00, 0x00, 0x0e, 0x92, 0x94, - 0xff, 0x00, 0x92, 0x15, 0xba, 0x06, 0x00, 0x06, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x20, 0xba, 0x90, 0x82, 0xff, 0x09, 0x0c, 0x0d, 0xc5, 0x00, 0x0e, - 0x00, 0xce, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, - 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, 0x62, 0x10, 0x22, 0x58, 0xba, 0x04, - 0x00, 0x06, 0x90, 0x86, 0x00, 0x06, 0x11, 0x68, 0xb8, 0x9c, 0xd0, 0xa4, - 0x01, 0x50, 0x08, 0x0c, 0x6a, 0x9b, 0x11, 0x38, 0x92, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x07, 0x11, 0x10, 0x20, 0x11, 0x00, 0x06, 0x00, 0x0e, - 0x92, 0x94, 0x00, 0xff, 0x80, 0x07, 0x92, 0x15, 0xba, 0x06, 0x00, 0xce, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x91, 0x82, 0x08, 0x00, 0x02, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x26, 0x91, 0x90, - 0x10, 0x00, 0x22, 0x04, 0x90, 0x5d, 0x11, 0x88, 0x00, 0x96, 0x08, 0x0c, - 0x10, 0x0e, 0x29, 0x58, 0x00, 0x9e, 0x01, 0x68, 0x2b, 0x00, 0x20, 0x12, - 0xb8, 0x5c, 0xb8, 0xca, 0xb8, 0x60, 0xb8, 0xc6, 0x90, 0x06, 0xb8, 0xa6, - 0xb8, 0xae, 0x08, 0x0c, 0x61, 0x48, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x26, 0x91, 0x82, 0x08, 0x00, - 0x02, 0x18, 0x90, 0x85, 0x00, 0x01, 0x04, 0xa8, 0x00, 0xd6, 0x91, 0x90, - 0x10, 0x00, 0x22, 0x04, 0x90, 0x5d, 0x05, 0x68, 0x20, 0x13, 0x00, 0x00, - 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x10, 0x08, 0x0c, 0x10, 0x40, 0x00, 0xd6, - 0x00, 0xc6, 0xb8, 0xbc, 0x20, 0x60, 0x8c, 0xff, 0x01, 0x68, 0x60, 0x0c, - 0x00, 0x06, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x10, - 0x08, 0x0c, 0x0f, 0xc0, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, 0x0c, 0x88, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xc6, 0xb8, 0xac, 0x90, 0x65, 0x01, 0x28, - 0x62, 0x1c, 0xd2, 0xc4, 0x01, 0x10, 0x08, 0x0c, 0x90, 0x96, 0x00, 0xce, - 0x2b, 0x48, 0xb8, 0xc8, 0xb8, 0x5e, 0xb8, 0xc4, 0xb8, 0x62, 0x08, 0x0c, - 0x10, 0x50, 0x00, 0xde, 0x90, 0x06, 0x00, 0x2e, 0x01, 0x2e, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, 0x91, 0x82, 0x08, 0x00, 0x02, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x30, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, - 0x90, 0x5d, 0x0d, 0xc0, 0x90, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, - 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x90, 0x06, 0xb8, 0x0a, 0xb8, 0x0e, - 0xb8, 0x00, 0xc0, 0x8c, 0xb8, 0x02, 0x08, 0x0c, 0x76, 0x37, 0x15, 0x10, - 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, 0x01, 0x20, 0x08, 0x0c, 0xb2, 0x3d, - 0x11, 0xd8, 0x00, 0x78, 0x70, 0x40, 0xd0, 0xe4, 0x01, 0xb8, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0x82, 0x70, 0x48, 0x20, 0x62, 0x70, 0x4c, 0x60, 0x06, - 0x70, 0x50, 0x60, 0x0a, 0x70, 0x54, 0x60, 0x0e, 0x00, 0xce, 0x70, 0x3c, - 0x20, 0x69, 0x01, 0x40, 0x90, 0x05, 0x11, 0x10, 0x20, 0x01, 0x00, 0x01, - 0x68, 0x86, 0x20, 0x69, 0x18, 0x00, 0x68, 0xb6, 0x70, 0x40, 0xb8, 0x5e, - 0x70, 0x48, 0xb8, 0x62, 0x70, 0x4c, 0xb8, 0x66, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x02, 0x76, 0xb8, 0xc4, 0x20, 0xe8, 0xb8, 0xc8, 0x90, 0x88, - 0x00, 0x0a, 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x03, 0x20, 0x99, - 0x02, 0x7a, 0x90, 0x88, 0x00, 0x06, 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, - 0x40, 0x03, 0x20, 0x69, 0x02, 0x00, 0x68, 0x17, 0x00, 0x01, 0x70, 0x40, - 0xb8, 0x6a, 0x71, 0x44, 0xb9, 0x6e, 0x70, 0x48, 0xb8, 0x72, 0x70, 0x50, - 0xb8, 0x76, 0x20, 0x69, 0x02, 0x00, 0x68, 0x17, 0x00, 0x00, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x11, 0x10, 0x71, 0x44, 0xb9, 0x6e, 0x91, 0x82, - 0x02, 0x11, 0x12, 0x18, 0x20, 0x09, 0x00, 0x08, 0x04, 0x00, 0x91, 0x82, - 0x02, 0x59, 0x12, 0x18, 0x20, 0x09, 0x00, 0x07, 0x00, 0xd0, 0x91, 0x82, - 0x02, 0xc1, 0x12, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0xa0, 0x91, 0x82, - 0x03, 0x49, 0x12, 0x18, 0x20, 0x09, 0x00, 0x05, 0x00, 0x70, 0x91, 0x82, - 0x04, 0x21, 0x12, 0x18, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0x91, 0x82, - 0x05, 0x81, 0x12, 0x18, 0x20, 0x09, 0x00, 0x03, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x02, 0xb9, 0x92, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, - 0x70, 0x34, 0xb8, 0x96, 0x70, 0x3c, 0xb8, 0x9a, 0x70, 0x54, 0xb8, 0x9e, - 0x00, 0x36, 0xbb, 0xcc, 0xc3, 0x84, 0xba, 0x00, 0x20, 0x09, 0x18, 0x67, - 0x21, 0x0c, 0xd0, 0xbc, 0x01, 0x20, 0xd1, 0xec, 0x01, 0x10, 0xc2, 0xad, - 0x00, 0x08, 0xc2, 0xac, 0xd0, 0xc4, 0x01, 0x48, 0xd1, 0xe4, 0x01, 0x38, - 0xc2, 0xbd, 0xd0, 0xcc, 0x01, 0x28, 0xd3, 0x8c, 0x11, 0x08, 0xc3, 0x85, - 0x00, 0x08, 0xc2, 0xbc, 0xba, 0x02, 0xbb, 0xce, 0x00, 0x3e, 0x00, 0xee, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xb8, 0xa4, 0x90, 0x4d, 0x05, 0x78, 0xa9, 0x00, 0x81, 0xff, - 0x15, 0xc0, 0xaa, 0x04, 0x92, 0x82, 0x00, 0x10, 0x16, 0xc8, 0x01, 0x36, - 0x01, 0x46, 0x01, 0xc6, 0x01, 0xd6, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0x8c, 0x00, 0x3f, 0x21, 0xe0, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x04, 0x20, 0x98, 0x20, 0x09, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x01, - 0x40, 0x02, 0x90, 0x86, 0xff, 0xff, 0x01, 0x20, 0x81, 0x09, 0x1d, 0xd0, - 0x08, 0x0c, 0x0d, 0xc5, 0x3c, 0x00, 0x20, 0xe8, 0x33, 0x00, 0x80, 0x01, - 0x20, 0xa0, 0x46, 0x04, 0x82, 0x10, 0xaa, 0x06, 0x01, 0xde, 0x01, 0xce, - 0x01, 0x4e, 0x01, 0x3e, 0x00, 0x60, 0x08, 0x0c, 0x10, 0x0e, 0x01, 0x70, - 0x29, 0x00, 0xb8, 0xa6, 0xa8, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x68, 0xe0, - 0xa8, 0x07, 0x00, 0x01, 0xae, 0x12, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x96, 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x00, - 0x90, 0x05, 0x11, 0x50, 0x08, 0x0c, 0x68, 0xef, 0x11, 0x58, 0xa8, 0x04, - 0x90, 0x8a, 0x00, 0x02, 0x02, 0x18, 0x80, 0x01, 0xa8, 0x06, 0x00, 0x20, - 0x08, 0x0c, 0x10, 0x40, 0xb8, 0xa7, 0x00, 0x00, 0x00, 0x9e, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x95, 0x1c, - 0x01, 0x2e, 0x00, 0x05, 0x90, 0x1e, 0x00, 0x10, 0x20, 0x19, 0x00, 0x01, - 0x90, 0x0e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xb8, 0x4c, 0x20, 0x48, - 0xb8, 0x00, 0xd0, 0xdc, 0x11, 0x70, 0x89, 0xff, 0x05, 0x00, 0x83, 0xff, - 0x01, 0x20, 0xa8, 0x78, 0x96, 0x06, 0x01, 0x58, 0x00, 0x30, 0xa8, 0x6c, - 0x94, 0x06, 0x11, 0x18, 0xa8, 0x70, 0x95, 0x06, 0x01, 0x20, 0x29, 0x08, - 0xa8, 0x00, 0x20, 0x48, 0x0c, 0x70, 0x08, 0x0c, 0xaa, 0xf1, 0xaa, 0x00, - 0xb8, 0x4c, 0x99, 0x06, 0x11, 0x10, 0xba, 0x4e, 0x00, 0x20, 0x00, 0xa6, - 0x21, 0x50, 0xb2, 0x02, 0x00, 0xae, 0x82, 0xff, 0x11, 0x10, 0xb9, 0x52, - 0x89, 0xff, 0x01, 0x2e, 0x00, 0x05, 0x90, 0x16, 0x04, 0x89, 0x11, 0x10, - 0x20, 0x11, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x69, 0x44, 0x01, 0x28, - 0x08, 0x0c, 0xd1, 0x95, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x69, 0x44, 0x01, 0x28, 0x08, 0x0c, 0xd1, 0x3a, 0x00, 0x10, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x69, 0x44, 0x01, 0x28, - 0x08, 0x0c, 0xd1, 0x92, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x69, 0x44, 0x01, 0x28, 0x08, 0x0c, 0xd1, 0x59, 0x00, 0x10, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x69, 0x44, 0x01, 0x28, - 0x08, 0x0c, 0xd1, 0xd8, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0xb8, 0xa4, 0x90, 0x0d, 0x11, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x01, 0x36, 0x01, 0xc6, 0xa8, 0x00, 0x90, 0x05, 0x11, 0xb8, 0x89, 0x0e, - 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, 0x20, 0xe0, 0x91, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x04, 0x20, 0x98, 0x20, 0xa9, 0x00, 0x01, - 0x20, 0x09, 0x00, 0x10, 0x40, 0x02, 0x96, 0x06, 0x01, 0x28, 0x81, 0x09, - 0x1d, 0xd8, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x01, 0xce, - 0x01, 0x3e, 0x00, 0x05, 0x01, 0x46, 0x01, 0xd6, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x04, 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x10, - 0x20, 0x09, 0xff, 0xff, 0x41, 0x04, 0x01, 0xde, 0x01, 0x4e, 0x01, 0x36, - 0x01, 0xc6, 0xa8, 0x00, 0x90, 0x05, 0x11, 0xb8, 0x89, 0x0e, 0x81, 0x0e, - 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, 0x20, 0xe0, 0x91, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x04, 0x20, 0x98, 0x20, 0xa9, 0x00, 0x01, 0x20, 0x09, - 0x00, 0x10, 0x40, 0x02, 0x96, 0x06, 0x01, 0x28, 0x81, 0x09, 0x1d, 0xd8, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x68, 0x01, 0x46, 0x01, 0xd6, 0x33, 0x00, - 0x80, 0x01, 0x20, 0xa0, 0x3c, 0x00, 0x20, 0xe8, 0x20, 0x01, 0xff, 0xff, - 0x40, 0x04, 0x01, 0xde, 0x01, 0x4e, 0x90, 0x06, 0x01, 0xce, 0x01, 0x3e, - 0x00, 0x05, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xb8, 0xa4, - 0x90, 0x4d, 0x11, 0x28, 0x08, 0x0c, 0x10, 0x0e, 0x01, 0x68, 0x29, 0x00, - 0xb8, 0xa6, 0x08, 0x0c, 0x68, 0xe0, 0xa8, 0x03, 0x00, 0x01, 0xa8, 0x07, - 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0x05, - 0x90, 0x06, 0x0c, 0xd8, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x30, 0xb8, 0xa7, 0x00, 0x00, 0x08, 0x0c, - 0x10, 0x40, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0x05, - 0xb8, 0x9c, 0xd0, 0xa4, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x08, 0x0c, - 0x76, 0x37, 0x01, 0xb0, 0x71, 0xc4, 0x81, 0xff, 0x11, 0x98, 0x71, 0xdc, - 0xd1, 0x9c, 0x01, 0x80, 0x20, 0x01, 0x00, 0x7e, 0x90, 0x80, 0x10, 0x00, - 0x20, 0x04, 0x90, 0x5d, 0x01, 0x48, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0xb8, 0x00, 0xc0, 0xed, 0xb8, 0x02, - 0x20, 0x79, 0x18, 0x47, 0x78, 0x04, 0xd0, 0xa4, 0x01, 0xd0, 0x01, 0x56, - 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, 0x67, 0x24, - 0x11, 0x68, 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x96, - 0x00, 0x04, 0x01, 0x18, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0xb8, 0x00, - 0xc0, 0xed, 0xb8, 0x02, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x69, 0x6b, - 0x01, 0x5e, 0x08, 0x0c, 0x6a, 0x61, 0x01, 0x20, 0x20, 0x01, 0x19, 0x85, - 0x20, 0x0c, 0x00, 0x98, 0x20, 0x79, 0x18, 0x47, 0x78, 0x04, 0xd0, 0xa4, - 0x01, 0x90, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x01, 0x18, 0x2c, 0x20, 0x04, - 0x90, 0x05, 0x01, 0x38, 0x20, 0x01, 0x18, 0x67, 0x20, 0x04, 0xd0, 0xe4, - 0x01, 0x10, 0x20, 0x09, 0x5d, 0xc0, 0x20, 0x11, 0x69, 0xa2, 0x08, 0x0c, - 0x88, 0xd5, 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x20, 0x11, - 0x69, 0xa2, 0x08, 0x0c, 0x88, 0x3d, 0x08, 0x0c, 0x6a, 0x61, 0x01, 0xd8, - 0x20, 0x01, 0x10, 0x7e, 0x20, 0x04, 0x20, 0x58, 0xb9, 0x00, 0xc1, 0xec, - 0xb9, 0x02, 0x08, 0x0c, 0x6a, 0x9f, 0x01, 0x30, 0x20, 0x09, 0x07, 0xd0, - 0x20, 0x11, 0x69, 0xa2, 0x08, 0x0c, 0x88, 0xd5, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x90, 0x06, 0x70, 0x7e, 0x70, 0x60, 0x70, 0x82, 0x08, 0x0c, - 0x30, 0x00, 0x00, 0xee, 0x04, 0xb0, 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, - 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, 0x67, 0x24, 0x15, 0x38, - 0xb8, 0x00, 0xd0, 0xec, 0x05, 0x20, 0x00, 0x46, 0xba, 0xa0, 0x22, 0x20, - 0x90, 0x06, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, 0xec, 0x31, 0xb8, 0x00, - 0xc0, 0xe5, 0xc0, 0xec, 0xb8, 0x02, 0x08, 0x0c, 0x6a, 0x9b, 0x20, 0x01, - 0x07, 0x07, 0x11, 0x28, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x85, - 0x07, 0x00, 0xb8, 0x06, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x96, 0xa4, - 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, 0x90, 0x0e, 0x08, 0x0c, - 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0x4e, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, - 0x69, 0xca, 0x00, 0xce, 0x01, 0x5e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xc0, 0xec, 0xb8, 0x02, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x27, - 0x09, 0x0c, 0x0d, 0xc5, 0x29, 0x58, 0x00, 0x9e, 0x20, 0x01, 0x19, 0x6b, - 0x2b, 0x02, 0x8b, 0x07, 0x80, 0x06, 0x80, 0x06, 0x90, 0x8c, 0x00, 0x3f, - 0xb9, 0xc6, 0x90, 0x8c, 0xff, 0xc0, 0xb9, 0xca, 0xb8, 0xaf, 0x00, 0x00, - 0x20, 0x09, 0x00, 0xff, 0x08, 0x0c, 0x61, 0x48, 0xb8, 0x07, 0x00, 0x06, - 0xb8, 0x13, 0x00, 0xff, 0xb8, 0x17, 0xff, 0xff, 0xb8, 0x6f, 0x02, 0x00, - 0xb8, 0x6c, 0xb8, 0x93, 0x00, 0x02, 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xa3, - 0x00, 0xff, 0xb8, 0xaf, 0x00, 0x00, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, - 0x78, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xac, - 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, 0x90, 0x5d, 0x01, 0x08, 0xb8, 0x00, - 0x00, 0xbe, 0xd0, 0xbc, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0xb8, 0x04, 0x90, 0x8c, 0x00, 0xff, 0x91, 0x96, 0x00, 0x06, 0x01, 0x88, - 0x91, 0x96, 0x00, 0x04, 0x01, 0x70, 0x91, 0x96, 0x00, 0x05, 0x01, 0x58, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x96, 0x00, 0x06, 0x01, 0x28, - 0x91, 0x96, 0x00, 0x04, 0x01, 0x10, 0x91, 0x96, 0x00, 0x05, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x20, 0x01, - 0x10, 0x7e, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0x00, 0xd0, 0xec, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, 0x00, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x06, 0xba, 0xa0, 0x92, 0x90, 0x10, 0x00, 0x22, 0x04, - 0x9b, 0x06, 0x19, 0x0c, 0x0d, 0xc5, 0x00, 0x0e, 0xba, 0x00, 0x90, 0x05, - 0x01, 0x10, 0xc2, 0xfd, 0x00, 0x08, 0xc2, 0xfc, 0xba, 0x02, 0x00, 0x2e, - 0x01, 0x2e, 0x00, 0x05, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xd0, 0xcc, - 0x01, 0x38, 0x20, 0x01, 0x19, 0x83, 0x20, 0x0c, 0x20, 0x11, 0x6a, 0x91, - 0x08, 0x0c, 0x88, 0xd5, 0x00, 0x05, 0x20, 0x11, 0x6a, 0x91, 0x08, 0x0c, - 0x88, 0x3d, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xc0, 0xcc, 0x20, 0x12, - 0x00, 0x05, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0xac, 0x00, 0x05, 0x08, 0x0c, - 0x57, 0xd5, 0xd0, 0xa4, 0x00, 0x05, 0x00, 0x16, 0xb9, 0x04, 0x91, 0x84, - 0x00, 0xff, 0x90, 0x8e, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, - 0xb9, 0x04, 0x91, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x8e, 0x00, 0x06, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x08, 0x0c, 0xd7, 0xe3, - 0x01, 0x58, 0x70, 0xdc, 0x90, 0x84, 0x00, 0x28, 0x01, 0x38, 0x20, 0x01, - 0x10, 0x7f, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0xcc, 0xd0, 0x94, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x36, - 0x00, 0x46, 0x00, 0x76, 0x00, 0xb6, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, - 0x97, 0x80, 0x33, 0xb6, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, - 0x90, 0x06, 0x20, 0x18, 0x20, 0x08, 0x92, 0x84, 0x80, 0x00, 0x01, 0x10, - 0x20, 0x19, 0x00, 0x01, 0x92, 0x94, 0x7f, 0xff, 0x21, 0x00, 0x97, 0x06, - 0x01, 0x90, 0x91, 0xa0, 0x10, 0x00, 0x24, 0x04, 0x90, 0x5d, 0x01, 0x68, - 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x11, 0x38, - 0x83, 0xff, 0x01, 0x18, 0xb8, 0x9c, 0xd0, 0xa4, 0x01, 0x10, 0x82, 0x11, - 0x01, 0x58, 0x81, 0x08, 0x83, 0xff, 0x01, 0x20, 0x91, 0x82, 0x08, 0x00, - 0x0e, 0x28, 0x00, 0x68, 0x91, 0x82, 0x00, 0x7e, 0x0e, 0x08, 0x00, 0x48, - 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x1e, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x1e, 0x90, 0x06, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x46, - 0x00, 0x56, 0x00, 0x76, 0x00, 0xb6, 0x21, 0x00, 0x90, 0x84, 0x7f, 0xff, - 0x90, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x30, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x05, 0x50, 0x91, 0x84, - 0x80, 0x00, 0x05, 0x80, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, 0x97, 0x80, - 0x33, 0xb6, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, 0x90, 0x06, - 0x20, 0x20, 0x24, 0x00, 0x97, 0x06, 0x01, 0xa0, 0x94, 0xa8, 0x10, 0x00, - 0x25, 0x04, 0x90, 0x5d, 0x01, 0x78, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x06, 0x11, 0x48, 0xb8, 0x9c, 0xd0, 0xa4, 0x01, 0x30, - 0xb8, 0x14, 0x92, 0x06, 0x11, 0x18, 0xb8, 0x10, 0x93, 0x06, 0x01, 0x28, - 0x84, 0x20, 0x94, 0x82, 0x08, 0x00, 0x0e, 0x28, 0x00, 0x48, 0x91, 0x8c, - 0x7f, 0xff, 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x91, 0x8c, 0x7f, 0xff, 0x00, 0xbe, 0x00, 0x7e, - 0x00, 0x5e, 0x00, 0x4e, 0x90, 0x06, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, - 0x00, 0xa0, 0x80, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x1d, 0xd8, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0xf8, 0x80, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x1d, 0xd8, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x06, 0x20, 0x01, 0x00, 0xe8, 0x80, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0x1d, 0xd8, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x71, 0x19, 0x10, - 0x70, 0x03, 0x00, 0x01, 0x70, 0x07, 0x00, 0x00, 0x90, 0x06, 0x70, 0x12, - 0x70, 0x16, 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x0a, 0x70, 0x46, 0x20, 0x01, - 0x19, 0x22, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0x48, 0x90, 0x0e, 0x71, 0x0a, 0x08, 0x0c, 0x57, 0xd5, - 0xd0, 0xfc, 0x11, 0x40, 0x08, 0x0c, 0x57, 0xd5, 0x90, 0x0e, 0xd0, 0x9c, - 0x01, 0x08, 0x81, 0x08, 0x71, 0x02, 0x04, 0x70, 0x20, 0x01, 0x18, 0x67, - 0x20, 0x0c, 0x91, 0x84, 0x00, 0x07, 0x00, 0x06, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x00, 0x0e, 0x01, 0x08, 0x90, 0x06, 0x00, 0x02, - 0x6b, 0x98, 0x6b, 0x98, 0x6b, 0x98, 0x6b, 0x98, 0x6b, 0x98, 0x6b, 0xb6, - 0x6b, 0xcb, 0x6b, 0xd9, 0x70, 0x03, 0x00, 0x03, 0x20, 0x09, 0x18, 0x68, - 0x21, 0x0c, 0x91, 0x84, 0xff, 0x00, 0x90, 0x8e, 0xff, 0x00, 0x01, 0x40, - 0x80, 0x07, 0x90, 0x05, 0x11, 0x10, 0x20, 0x01, 0x00, 0x02, 0x80, 0x03, - 0x70, 0x06, 0x00, 0x30, 0x70, 0x07, 0x00, 0x01, 0x00, 0x18, 0x70, 0x03, - 0x00, 0x05, 0x0c, 0x50, 0x20, 0x71, 0x19, 0x10, 0x70, 0x4f, 0x00, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x70, 0xf3, 0x00, 0x01, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x05, 0x70, 0x03, 0x00, 0x00, 0x20, 0x71, 0x19, 0x10, 0x20, 0x09, - 0x18, 0x68, 0x21, 0x0c, 0x91, 0x84, 0x7f, 0x00, 0x80, 0x07, 0x90, 0x8c, - 0x00, 0x0f, 0x01, 0x60, 0x71, 0x4e, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x20, 0x71, 0x18, 0x00, 0x90, 0x8c, 0x00, 0x07, 0x01, 0x28, - 0x70, 0xf2, 0x0c, 0x20, 0x70, 0x4f, 0x00, 0x0f, 0x0c, 0x90, 0x70, 0xf3, - 0x00, 0x05, 0x08, 0xf0, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x50, 0x68, 0x4c, - 0x90, 0x05, 0x11, 0x50, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x10, 0x70, 0x28, - 0xc0, 0x85, 0x70, 0x2a, 0x00, 0xee, 0x90, 0x85, 0x00, 0x01, 0x04, 0x88, - 0x68, 0x44, 0x90, 0x05, 0x01, 0x58, 0x08, 0x0c, 0x79, 0xa4, 0x6a, 0x60, - 0x92, 0x00, 0x70, 0x02, 0x68, 0x64, 0x91, 0x01, 0x70, 0x06, 0x90, 0x06, - 0x70, 0x12, 0x70, 0x16, 0x68, 0x60, 0x70, 0x02, 0x68, 0x64, 0x70, 0x06, - 0x68, 0x68, 0x70, 0x0a, 0x68, 0x6c, 0x70, 0x0e, 0x68, 0x44, 0x90, 0x05, - 0x11, 0x10, 0x70, 0x12, 0x70, 0x16, 0x68, 0x4c, 0x70, 0x1a, 0x70, 0x1c, - 0x90, 0x85, 0x00, 0x40, 0x70, 0x1e, 0x70, 0x37, 0x00, 0x19, 0x70, 0x2b, - 0x00, 0x01, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x10, 0x70, 0x28, 0xc0, 0x84, - 0x70, 0x2a, 0x70, 0x07, 0x00, 0x01, 0x70, 0x0b, 0x00, 0x00, 0x00, 0xee, - 0x90, 0x06, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x26, 0x20, 0x71, - 0x19, 0x48, 0x70, 0x00, 0x90, 0x15, 0x09, 0x04, 0x6e, 0xa5, 0x92, 0x86, - 0x00, 0x03, 0x09, 0x04, 0x6d, 0x3e, 0x92, 0x86, 0x00, 0x05, 0x09, 0x04, - 0x6d, 0x3e, 0x20, 0x71, 0x18, 0x77, 0xa8, 0x7c, 0x90, 0x05, 0x09, 0x04, - 0x6c, 0x99, 0x71, 0x40, 0xa8, 0x68, 0x91, 0x02, 0x0a, 0x04, 0x6e, 0xa5, - 0xa8, 0x78, 0xd0, 0x84, 0x15, 0xd8, 0xa8, 0x53, 0x00, 0x19, 0x20, 0x01, - 0x80, 0x23, 0xa8, 0x4e, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x90, 0x05, - 0x19, 0x04, 0x70, 0x73, 0x0e, 0x04, 0x70, 0xe1, 0x20, 0x71, 0x00, 0x00, - 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x4c, 0x70, 0x82, 0xa8, 0x70, 0x70, 0x86, - 0xa8, 0x6c, 0x70, 0x8a, 0xa8, 0x80, 0x70, 0x8e, 0x70, 0x36, 0x01, 0x46, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x56, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x00, 0x2a, 0xa8, 0x68, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, 0x40, 0x03, 0x01, 0x5e, - 0x01, 0xce, 0x01, 0x3e, 0x01, 0xde, 0x01, 0x4e, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, - 0x08, 0x04, 0x6d, 0x21, 0xa8, 0x53, 0x00, 0x1b, 0x20, 0x01, 0x80, 0x27, - 0x08, 0x20, 0x70, 0x04, 0xd0, 0x8c, 0x19, 0x04, 0x6e, 0xa5, 0xa8, 0x53, - 0x00, 0x1a, 0x20, 0x01, 0x80, 0x24, 0x08, 0x04, 0x6c, 0x5d, 0x00, 0xe6, - 0x00, 0x26, 0x20, 0x71, 0x19, 0x48, 0x70, 0x00, 0x90, 0x15, 0x09, 0x04, - 0x6e, 0xa5, 0x92, 0x86, 0x00, 0x03, 0x09, 0x04, 0x6d, 0x3e, 0x92, 0x86, - 0x00, 0x05, 0x09, 0x04, 0x6d, 0x3e, 0xa8, 0x4f, 0x80, 0x22, 0xa8, 0x53, - 0x00, 0x18, 0x08, 0x04, 0x6d, 0x06, 0xa8, 0x68, 0xd0, 0xfc, 0x15, 0x08, - 0x00, 0xe6, 0x00, 0x26, 0x20, 0x01, 0x19, 0x48, 0x20, 0x04, 0x90, 0x15, - 0x09, 0x04, 0x6e, 0xa5, 0xa9, 0x78, 0xa8, 0x74, 0x91, 0x05, 0x19, 0x04, - 0x6e, 0xa5, 0x92, 0x86, 0x00, 0x03, 0x09, 0x04, 0x6d, 0x3e, 0x92, 0x86, - 0x00, 0x05, 0x09, 0x04, 0x6d, 0x3e, 0xa8, 0x7c, 0xd0, 0xbc, 0x19, 0x04, - 0x6e, 0xa5, 0x22, 0x00, 0x00, 0x02, 0x6e, 0xa5, 0x6d, 0x02, 0x6d, 0x3e, - 0x6d, 0x3e, 0x6e, 0xa5, 0x6d, 0x3e, 0x00, 0x05, 0xa8, 0x68, 0xd0, 0xfc, - 0x15, 0x00, 0x00, 0xe6, 0x00, 0x26, 0x20, 0x09, 0x19, 0x48, 0x21, 0x0c, - 0x81, 0xff, 0x09, 0x04, 0x6e, 0xa5, 0xa8, 0x80, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x01, 0x19, 0x04, 0x6e, 0xa5, 0x91, 0x86, 0x00, 0x03, - 0x09, 0x04, 0x6d, 0x3e, 0x91, 0x86, 0x00, 0x05, 0x09, 0x04, 0x6d, 0x3e, - 0xa8, 0x7c, 0xd0, 0xcc, 0x09, 0x04, 0x6e, 0xa5, 0xa8, 0x4f, 0x80, 0x21, - 0xa8, 0x53, 0x00, 0x17, 0x00, 0x28, 0x00, 0x05, 0xa8, 0x4f, 0x80, 0x20, - 0xa8, 0x53, 0x00, 0x16, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x90, 0x05, - 0x19, 0x04, 0x70, 0x73, 0x0e, 0x04, 0x70, 0xe1, 0x20, 0x71, 0x00, 0x00, - 0xa8, 0x4c, 0x70, 0x82, 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x6c, 0x70, 0x86, - 0x70, 0x36, 0xa8, 0x70, 0x70, 0x8a, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x71, - 0x18, 0x00, 0x20, 0x11, 0x00, 0x01, 0xa8, 0x04, 0x90, 0x0d, 0x70, 0x2c, - 0x11, 0x58, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x96, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x00, 0x9e, 0x0c, 0x58, 0xa8, 0x4f, 0x00, 0x00, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, - 0x00, 0x00, 0x70, 0x10, 0x90, 0x05, 0x19, 0x04, 0x6e, 0x29, 0x78, 0x2c, - 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x90, 0x84, 0x00, 0x03, 0x00, 0x02, 0x6d, 0x5c, 0x6e, 0x29, - 0x6d, 0x80, 0x6d, 0xc6, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x71, 0x18, 0x00, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x68, 0x20, 0x71, - 0x19, 0xfb, 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, - 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, - 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x0c, 0x18, 0x20, 0x71, 0x18, 0x00, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x15, 0x78, 0x78, 0x24, - 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, 0x71, 0x2c, 0xd1, 0x9c, 0x11, 0x48, - 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, 0x91, 0x8a, 0x00, 0x20, 0x02, 0x18, - 0x70, 0x22, 0x00, 0xee, 0x00, 0x58, 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, - 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x72, 0x2f, 0xd0, 0xa4, 0x19, 0xf0, 0x20, 0x71, 0x19, 0xfb, 0x70, 0x44, - 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, - 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x16, 0x70, 0x2c, - 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, - 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x87, 0x25, 0x08, 0x08, 0x00, 0x96, 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, - 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x1d, 0x60, - 0x00, 0xee, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, - 0xd0, 0x9c, 0x11, 0x98, 0x00, 0x9e, 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, - 0x90, 0x0d, 0x15, 0x50, 0x20, 0x71, 0x19, 0xfb, 0x70, 0x44, 0x90, 0x05, - 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x9e, 0x29, 0x08, 0x70, 0x10, - 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, - 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, - 0x11, 0x68, 0x20, 0x71, 0x19, 0xfb, 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, - 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, - 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, - 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x87, 0x25, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x29, 0x08, - 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, - 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, - 0x90, 0x0d, 0x19, 0x04, 0x6e, 0x7d, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0x9c, 0x11, 0x98, 0x70, 0x1c, 0x90, 0x4d, - 0x01, 0x80, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0x11, 0x08, 0x70, 0x1a, - 0xa8, 0x00, 0x70, 0x1e, 0x29, 0x00, 0x78, 0x22, 0x78, 0x2c, 0x90, 0x94, - 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0x9c, 0x0d, 0x68, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x01, 0xb0, - 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, - 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x72, 0x2f, 0xd0, 0xa4, 0x1d, 0x60, 0x00, 0xee, 0x20, 0x71, 0x19, 0xfb, - 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, - 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, - 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, - 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x00, 0xee, - 0x08, 0x04, 0x6e, 0x39, 0xa8, 0x68, 0xd0, 0xfc, 0x19, 0x04, 0x6e, 0xf3, - 0x00, 0x96, 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, 0x90, 0x4d, 0x19, 0x0c, - 0x0f, 0xc0, 0x00, 0x9e, 0x00, 0x20, 0xa8, 0x68, 0xd0, 0xfc, 0x19, 0x04, - 0x6e, 0xf3, 0x00, 0xe6, 0x00, 0x26, 0xa8, 0x4f, 0x00, 0x00, 0x00, 0xf6, - 0x20, 0x79, 0x00, 0x50, 0x20, 0x71, 0x18, 0x00, 0x70, 0xec, 0x80, 0x01, - 0x05, 0x58, 0x1a, 0x04, 0x6e, 0xf0, 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, - 0x00, 0x00, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x16, - 0x01, 0xa8, 0x70, 0x10, 0x90, 0x05, 0x19, 0x04, 0x6f, 0xef, 0x78, 0x2c, - 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x90, 0x84, 0x00, 0x03, 0x00, 0x02, 0x6e, 0xf4, 0x6f, 0xef, - 0x6f, 0x0f, 0x6f, 0x80, 0x08, 0x0c, 0x0d, 0xc5, 0x20, 0x09, 0x19, 0x48, - 0x21, 0x04, 0x00, 0x02, 0x6e, 0xbb, 0x6e, 0xbb, 0x6e, 0xbb, 0x6d, 0x47, - 0x6e, 0xbb, 0x6d, 0x47, 0x70, 0xef, 0x0f, 0xa0, 0x71, 0xe8, 0x81, 0x07, - 0x91, 0x06, 0x90, 0x94, 0x00, 0xc0, 0x91, 0x84, 0xff, 0x3f, 0x92, 0x05, - 0x70, 0xea, 0x3b, 0x08, 0x3a, 0x00, 0x91, 0x04, 0x91, 0x8d, 0x00, 0xc0, - 0x21, 0xd8, 0x90, 0x84, 0xff, 0x3f, 0x92, 0x05, 0x20, 0xd0, 0x08, 0x08, - 0x70, 0xee, 0x08, 0x04, 0x6e, 0xb1, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x20, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, - 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, - 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, - 0x0c, 0x60, 0x20, 0x71, 0x18, 0x00, 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, - 0x90, 0x0d, 0x19, 0x04, 0x6f, 0x6f, 0x78, 0x30, 0x80, 0x07, 0x90, 0x8c, - 0x00, 0x1f, 0x70, 0xf0, 0x91, 0x02, 0x12, 0x20, 0x00, 0xfe, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x78, 0x24, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, - 0x71, 0x2c, 0xd1, 0x9c, 0x11, 0x48, 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, - 0x91, 0x8a, 0x00, 0x20, 0x02, 0x18, 0x70, 0x22, 0x00, 0xee, 0x00, 0x58, - 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, - 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x19, 0xf0, - 0x0e, 0x04, 0x6f, 0x66, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, - 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, - 0x00, 0xde, 0x20, 0x01, 0x19, 0x21, 0x20, 0x0c, 0xc1, 0x84, 0x21, 0x02, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, - 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x01, 0x19, 0x22, 0x20, 0x03, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x19, 0x21, - 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, - 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, - 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x08, 0x04, 0x6f, 0x22, - 0x00, 0x96, 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, - 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x1d, 0x60, 0x00, 0xee, 0x0e, 0x04, - 0x6f, 0xc2, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, - 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, - 0x70, 0x44, 0xc0, 0x84, 0x70, 0x46, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x70, 0x4b, - 0x00, 0x00, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, - 0xd0, 0x9c, 0x11, 0x70, 0x00, 0x9e, 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, - 0x90, 0x0d, 0x11, 0xe0, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x70, 0x44, 0xc0, 0x85, 0x70, 0x46, 0x0c, 0x58, 0x00, 0x9e, 0x29, 0x08, - 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, - 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, - 0x90, 0x0d, 0x11, 0x20, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, - 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, - 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, - 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, - 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, 0x19, 0x04, - 0x70, 0x5e, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, - 0xd0, 0x9c, 0x11, 0xb0, 0x70, 0x1c, 0x90, 0x4d, 0x01, 0x98, 0xa8, 0x4c, - 0x90, 0x05, 0x11, 0x80, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0x11, 0x08, - 0x70, 0x1a, 0xa8, 0x00, 0x70, 0x1e, 0x29, 0x00, 0x78, 0x22, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0x9c, 0x0d, 0x50, - 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, - 0x05, 0xb8, 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, - 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x1d, 0x60, 0x00, 0xee, 0x0e, 0x04, - 0x70, 0x57, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, - 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, - 0x70, 0x44, 0xc0, 0x84, 0x70, 0x46, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x70, 0x4b, - 0x00, 0x00, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x70, 0x44, - 0xc0, 0x85, 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, - 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, - 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, - 0x00, 0xee, 0x08, 0x04, 0x6f, 0xff, 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, - 0x00, 0x00, 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, - 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, - 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x28, 0x1e, 0x04, 0x70, 0x9e, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, - 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x87, 0x25, 0x0e, 0x04, 0x70, 0x88, 0x20, 0x71, 0x19, 0x10, - 0x70, 0x1c, 0x20, 0x48, 0xa8, 0x4c, 0x90, 0x0d, 0x0d, 0x18, 0x20, 0x71, - 0x00, 0x00, 0x71, 0x82, 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x6c, 0x70, 0x86, - 0x70, 0x36, 0xa8, 0x70, 0x70, 0x8a, 0xa8, 0x50, 0x90, 0x82, 0x00, 0x19, - 0x12, 0x78, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, - 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x71, 0x19, 0x10, 0x08, 0x0c, - 0x72, 0x1b, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0xa8, 0x50, 0x90, 0x82, - 0x00, 0x1c, 0x1e, 0x68, 0xa8, 0x80, 0x70, 0x8e, 0x70, 0x36, 0x01, 0x46, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x56, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x00, 0x2a, 0xa8, 0x68, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, 0x40, 0x03, 0x01, 0x5e, - 0x01, 0xce, 0x01, 0x3e, 0x01, 0xde, 0x01, 0x4e, 0x08, 0x90, 0x20, 0x71, - 0x19, 0x10, 0xa8, 0x03, 0x00, 0x00, 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, - 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, - 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x18, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, - 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x87, 0x25, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x06, - 0xa8, 0x7c, 0x00, 0x06, 0xa8, 0x67, 0x01, 0x03, 0x20, 0xa9, 0x00, 0x1c, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1d, 0x20, 0xa0, - 0x90, 0x06, 0x40, 0x04, 0x00, 0x0e, 0x90, 0x84, 0x00, 0xff, 0xa8, 0x7e, - 0x00, 0x0e, 0xa8, 0x7a, 0xa9, 0x82, 0x00, 0x05, 0x20, 0x71, 0x19, 0x10, - 0x70, 0x04, 0x00, 0x02, 0x71, 0x2e, 0x71, 0x2f, 0x72, 0x1a, 0x71, 0x2f, - 0x71, 0x2c, 0x72, 0x1a, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x20, 0x01, - 0x19, 0x48, 0x20, 0x04, 0x00, 0x02, 0x71, 0x39, 0x71, 0x39, 0x71, 0xb3, - 0x71, 0xb4, 0x71, 0x39, 0x71, 0xb4, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x1e, 0x0c, 0x72, 0x3a, 0x70, 0x1c, 0x90, 0x4d, 0x05, 0x08, 0xa8, 0x4c, - 0x90, 0x05, 0x09, 0x04, 0x71, 0x84, 0x0e, 0x04, 0x71, 0x62, 0xa9, 0x4c, - 0x20, 0x71, 0x00, 0x00, 0x71, 0x82, 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x6c, - 0x70, 0x86, 0x70, 0x36, 0xa8, 0x70, 0x70, 0x8a, 0xa8, 0x50, 0x90, 0x82, - 0x00, 0x19, 0x12, 0x78, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x71, 0x19, 0x10, - 0x08, 0x0c, 0x72, 0x1b, 0x01, 0x2e, 0x08, 0x04, 0x71, 0xb2, 0xa8, 0x50, - 0x90, 0x82, 0x00, 0x1c, 0x1e, 0x68, 0xa8, 0x80, 0x70, 0x8e, 0x70, 0x36, - 0x01, 0x46, 0x01, 0xd6, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x56, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x00, 0x2a, 0xa8, 0x68, 0x20, 0xa8, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, 0x40, 0x03, - 0x01, 0x5e, 0x01, 0xce, 0x01, 0x3e, 0x01, 0xde, 0x01, 0x4e, 0x08, 0x90, - 0x20, 0x01, 0x00, 0x5b, 0x20, 0x04, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x72, 0x2f, 0xd0, 0x9c, 0x20, 0x71, 0x19, 0x10, 0x15, 0x10, 0x20, 0x71, - 0x19, 0x10, 0x70, 0x0f, 0x00, 0x01, 0xa9, 0x64, 0x91, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, - 0x81, 0x01, 0x01, 0x08, 0x71, 0x0e, 0x29, 0x00, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x50, 0x68, 0x22, 0x00, 0xde, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, - 0x20, 0x48, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0xa8, 0x00, 0x70, 0x1e, - 0x90, 0x05, 0x11, 0x08, 0x70, 0x1a, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x05, - 0x00, 0xd6, 0x20, 0x08, 0x20, 0x69, 0x19, 0xfb, 0x68, 0x44, 0x90, 0x05, - 0x07, 0x60, 0x01, 0x58, 0x91, 0x86, 0x00, 0x03, 0x05, 0x40, 0x20, 0x01, - 0x18, 0x15, 0x20, 0x04, 0x20, 0x09, 0x1a, 0xd1, 0x21, 0x0c, 0x91, 0x02, - 0x15, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x00, 0x50, - 0x69, 0x3c, 0x68, 0x38, 0x91, 0x06, 0x01, 0x90, 0x0e, 0x04, 0x71, 0xe6, - 0x20, 0x69, 0x00, 0x00, 0x68, 0x37, 0x80, 0x40, 0x68, 0x33, 0x00, 0x12, - 0x68, 0x83, 0x80, 0x40, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x20, 0x69, 0x19, 0xfb, - 0x68, 0x47, 0xff, 0xff, 0x01, 0x2e, 0x00, 0xde, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x1e, 0x0c, 0x72, 0xa5, 0x70, 0x1c, 0x90, 0x4d, 0x05, 0x40, - 0x20, 0x01, 0x00, 0x5b, 0x20, 0x04, 0x90, 0x94, 0x07, 0x80, 0x15, 0xc9, - 0xd0, 0x9c, 0x15, 0x00, 0x20, 0x71, 0x19, 0x10, 0x70, 0x0f, 0x00, 0x01, - 0xa9, 0x64, 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, - 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, 0x81, 0x01, 0x01, 0x08, 0x71, 0x0e, - 0x29, 0x00, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x50, 0x68, 0x22, 0x00, 0xde, - 0x70, 0x1c, 0x20, 0x48, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0xa8, 0x00, - 0x70, 0x1e, 0x90, 0x05, 0x11, 0x08, 0x70, 0x1a, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x1c, 0x90, 0x4d, - 0x01, 0x60, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0xa8, 0x00, 0x70, 0x1e, - 0x90, 0x05, 0x11, 0x08, 0x70, 0x1a, 0x01, 0x2e, 0x08, 0x0c, 0x10, 0x40, - 0x00, 0x05, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, - 0x72, 0x31, 0x00, 0x06, 0x00, 0x16, 0x20, 0x01, 0x80, 0x04, 0x00, 0x06, - 0x08, 0x04, 0x0d, 0xce, 0x00, 0x96, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, - 0x70, 0x44, 0xd0, 0x84, 0x01, 0xd0, 0xc0, 0x84, 0x70, 0x46, 0x78, 0x38, - 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, - 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, - 0x70, 0x4b, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0x05, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x81, 0xd0, 0xa4, 0x0d, 0xb8, 0x71, 0x48, - 0x70, 0x4c, 0x81, 0x08, 0x71, 0x4a, 0x91, 0x02, 0x0e, 0x88, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x78, 0x24, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, - 0x71, 0x2c, 0xd1, 0x9c, 0x11, 0x48, 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, - 0x91, 0x8a, 0x00, 0x20, 0x02, 0x18, 0x70, 0x22, 0x00, 0xee, 0x00, 0x58, - 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, - 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x19, 0xf0, - 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, - 0x11, 0xaa, 0x00, 0xee, 0x70, 0x4b, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, 0x70, 0x44, 0xd0, 0x84, - 0x01, 0xb8, 0xc0, 0x84, 0x70, 0x46, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, - 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, - 0x00, 0x13, 0x00, 0xde, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x11, 0xaa, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, - 0x0d, 0xb8, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x78, 0x24, 0x20, 0x48, - 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x87, 0x25, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x72, 0x2f, 0xd0, 0xa4, 0x1d, 0x70, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x50, 0x69, 0x3c, 0x20, 0x69, 0x19, 0x48, 0x68, 0x08, 0x69, 0x0a, - 0x20, 0x69, 0x19, 0xfb, 0x91, 0x02, 0x11, 0x18, 0x68, 0x44, 0x90, 0x05, - 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x0c, 0x69, 0x46, 0x00, 0xde, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x98, 0x90, 0x8a, 0x00, 0x2a, - 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1d, 0x00, 0x1b, 0x60, 0x27, - 0x1e, 0x00, 0x00, 0x05, 0x73, 0xe6, 0x73, 0x53, 0x73, 0x6f, 0x73, 0x99, - 0x73, 0xd5, 0x74, 0x15, 0x74, 0x27, 0x73, 0x6f, 0x73, 0xfd, 0x73, 0x0e, - 0x73, 0x3c, 0x73, 0xbf, 0x73, 0x0d, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, - 0x02, 0x00, 0x68, 0x04, 0x90, 0x05, 0x11, 0x80, 0x68, 0x08, 0x90, 0x05, - 0x15, 0x18, 0x70, 0x9b, 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, 0x2d, 0x04, - 0x70, 0x02, 0x08, 0x0c, 0x77, 0x74, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, - 0x60, 0x2a, 0x00, 0xb0, 0x70, 0x9b, 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, - 0x2d, 0x04, 0x70, 0x02, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, 0x60, 0x2a, - 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, 0x1a, 0x65, - 0x08, 0x0c, 0x1a, 0xd9, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, - 0x90, 0x05, 0x11, 0x78, 0x68, 0x08, 0x90, 0x05, 0x11, 0x60, 0x70, 0x9b, - 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, 0x2d, 0x04, 0x70, 0x02, 0x08, 0x0c, - 0x78, 0x18, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, 0x60, 0x2a, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0x90, 0x08, 0x0c, 0x2d, 0x39, - 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xe4, 0x11, 0x90, 0x08, 0x0c, 0x74, 0x94, - 0xd1, 0xd4, 0x11, 0x60, 0xd1, 0xdc, 0x11, 0x38, 0xd1, 0xcc, 0x01, 0x50, - 0x70, 0x9b, 0x00, 0x20, 0x08, 0x0c, 0x74, 0x94, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x88, 0x08, 0x0c, 0x2d, 0x39, 0x61, 0x24, 0xd1, 0xcc, 0x11, 0xe8, - 0xd1, 0xdc, 0x11, 0xc0, 0xd1, 0xe4, 0x11, 0x98, 0x91, 0x84, 0x1e, 0x00, - 0x11, 0xd8, 0x08, 0x0c, 0x1b, 0x06, 0x60, 0xe3, 0x00, 0x01, 0x60, 0x0c, - 0xc0, 0xb4, 0x60, 0x0e, 0x08, 0x0c, 0x76, 0x63, 0x20, 0x01, 0x00, 0x80, - 0x08, 0x0c, 0x2d, 0x39, 0x70, 0x9b, 0x00, 0x29, 0x00, 0x58, 0x70, 0x9b, - 0x00, 0x1e, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x20, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x08, 0x0c, - 0x1b, 0x06, 0x60, 0xe3, 0x00, 0x01, 0x60, 0x0c, 0xc0, 0xb4, 0x60, 0x0e, - 0x08, 0x0c, 0x76, 0x63, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, 0x2d, 0x39, - 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x98, 0xd1, 0xdc, 0x11, 0x70, 0xd1, 0xe4, - 0x11, 0x48, 0x91, 0x84, 0x1e, 0x00, 0x11, 0x18, 0x70, 0x9b, 0x00, 0x29, - 0x00, 0x58, 0x70, 0x9b, 0x00, 0x28, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1e, - 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, - 0x00, 0x05, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x80, 0xd1, 0xdc, 0x11, 0x58, - 0xd1, 0xe4, 0x11, 0x30, 0x91, 0x84, 0x1e, 0x00, 0x11, 0x58, 0x70, 0x9b, - 0x00, 0x29, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x20, 0x01, - 0x00, 0xa0, 0x08, 0x0c, 0x2d, 0x39, 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x38, - 0xd1, 0xe4, 0x01, 0x38, 0x08, 0x0c, 0x1b, 0x06, 0x70, 0x9b, 0x00, 0x1e, - 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x05, 0x08, 0x0c, 0x75, 0x17, - 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x88, 0x08, 0x0c, 0x74, 0x94, 0x00, 0x16, - 0x08, 0x0c, 0x1b, 0x06, 0x00, 0x1e, 0xd1, 0xd4, 0x11, 0x28, 0xd1, 0xe4, - 0x01, 0x38, 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x20, 0x70, 0x9b, 0x00, 0x1f, - 0x08, 0x0c, 0x74, 0x94, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0xa0, - 0x08, 0x0c, 0x2d, 0x39, 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x60, - 0xd1, 0xcc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x40, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x21, 0x00, 0x05, 0x08, 0x0c, 0x75, 0x17, 0x61, 0x24, - 0xd1, 0xd4, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x40, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0x90, - 0x08, 0x0c, 0x2d, 0x39, 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x78, - 0xd1, 0xcc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x58, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x28, - 0x70, 0x9b, 0x00, 0x20, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xd8, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xd1, 0xb4, 0x01, 0xb0, 0xc1, 0xb4, 0x21, 0x02, 0x60, 0x27, - 0x02, 0x00, 0x08, 0x0c, 0x2c, 0x61, 0x60, 0x24, 0xd0, 0xcc, 0x01, 0x48, - 0x20, 0x01, 0x00, 0xa0, 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, 0x79, 0x32, - 0x08, 0x0c, 0x61, 0x2e, 0x04, 0x28, 0x60, 0x28, 0xc0, 0xcd, 0x60, 0x2a, - 0x04, 0x08, 0x08, 0x0c, 0x76, 0x51, 0x01, 0x50, 0x08, 0x0c, 0x76, 0x48, - 0x11, 0x38, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x08, 0x0c, - 0x76, 0x0f, 0x00, 0xa0, 0x08, 0x0c, 0x75, 0x14, 0x01, 0x78, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x70, 0x98, 0x90, 0x86, 0x00, 0x1e, - 0x01, 0x20, 0x70, 0x98, 0x90, 0x86, 0x00, 0x22, 0x11, 0x18, 0x70, 0x9b, - 0x00, 0x25, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x21, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, 0x20, 0x11, - 0x74, 0xa5, 0x08, 0x0c, 0x89, 0x17, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x26, - 0x20, 0x09, 0x00, 0x64, 0x20, 0x11, 0x74, 0xa5, 0x08, 0x0c, 0x89, 0x0e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xf6, 0x00, 0x16, - 0x08, 0x0c, 0xa6, 0xe9, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x74, 0x42, - 0x00, 0x1e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x26, - 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0xa6, 0xe9, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x91, 0x80, 0x00, 0x60, 0x28, 0xc0, 0x9c, - 0x60, 0x2a, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, 0x08, 0x0c, 0xa9, 0xd3, 0x08, 0x0c, - 0x88, 0xc3, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, 0xaa, 0x49, 0x00, 0x3e, - 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xf0, 0x7f, 0x08, 0x0c, 0xf0, 0x9a, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x0c, 0x2c, 0x67, 0x08, 0x0c, 0x2b, 0x82, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, 0x00, 0x04, 0x60, 0x27, 0x00, 0x08, - 0x20, 0x11, 0x74, 0xa5, 0x08, 0x0c, 0x89, 0x17, 0x08, 0x0c, 0x76, 0x51, - 0x01, 0x18, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, 0x0b, 0xa0, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0x1c, 0x01, 0x2e, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x11, 0x74, 0xb2, 0x20, 0x71, - 0x19, 0xfb, 0x70, 0x1c, 0x92, 0x06, 0x11, 0x18, 0x70, 0x18, 0x90, 0x05, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x05, - 0x60, 0x20, 0xd0, 0x9c, 0x00, 0x05, 0x68, 0x00, 0x90, 0x84, 0xff, 0xfe, - 0x90, 0x86, 0x00, 0xc0, 0x01, 0xb8, 0x20, 0x01, 0x00, 0xc0, 0x08, 0x0c, - 0x2d, 0x39, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x2d, 0x1d, 0x04, 0x75, 0x24, - 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x75, 0x24, 0x01, 0x5e, 0x00, 0xd6, - 0x20, 0x69, 0x18, 0x00, 0x68, 0x9c, 0x80, 0x01, 0x02, 0x20, 0x01, 0x18, - 0x68, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x68, 0x9f, 0x00, 0x14, 0x68, 0xe8, - 0xd0, 0xdc, 0x0d, 0xc8, 0x68, 0x00, 0x90, 0x86, 0x00, 0x01, 0x1d, 0xa8, - 0x08, 0x0c, 0x89, 0x23, 0x0c, 0x90, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, - 0x08, 0x0c, 0x79, 0x41, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x03, 0x00, 0x00, - 0x90, 0x06, 0x70, 0x9a, 0x60, 0xe2, 0x68, 0x86, 0x08, 0x0c, 0x28, 0xe7, - 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, 0x5f, 0xed, 0x60, 0x27, - 0xff, 0xff, 0x60, 0x2b, 0x18, 0x2f, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x20, 0x01, 0x19, 0x7d, - 0x20, 0x0c, 0x91, 0x86, 0x00, 0x00, 0x01, 0x58, 0x91, 0x86, 0x00, 0x01, - 0x01, 0x58, 0x91, 0x86, 0x00, 0x02, 0x01, 0x58, 0x91, 0x86, 0x00, 0x03, - 0x01, 0x58, 0x08, 0x04, 0x75, 0xff, 0x70, 0x9b, 0x00, 0x22, 0x00, 0x40, - 0x70, 0x9b, 0x00, 0x21, 0x00, 0x28, 0x70, 0x9b, 0x00, 0x23, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x24, 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x28, 0xe7, 0x00, 0x26, 0x08, 0x0c, - 0xb2, 0x44, 0x00, 0x2e, 0x70, 0x00, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x18, - 0x60, 0x2b, 0x00, 0x28, 0x00, 0x10, 0x60, 0x2b, 0x00, 0x20, 0x01, 0x56, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, 0x60, 0x24, - 0xd0, 0xac, 0x01, 0x50, 0x01, 0x2e, 0x01, 0x5e, 0x08, 0x0c, 0xd7, 0xe3, - 0x01, 0x18, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x63, 0x08, 0x04, 0x76, 0x0b, - 0x68, 0x00, 0x90, 0x84, 0x00, 0xa1, 0xc0, 0xbd, 0x68, 0x02, 0x08, 0x0c, - 0x2c, 0x61, 0x69, 0x04, 0xd1, 0xd4, 0x11, 0x40, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2d, 0x39, 0x1f, 0x04, 0x75, 0xa3, 0x08, 0x0c, 0x76, 0x8b, - 0x01, 0x2e, 0x01, 0x5e, 0x08, 0x0c, 0x76, 0x48, 0x01, 0xd8, 0x60, 0x44, - 0x90, 0x05, 0x01, 0x98, 0x20, 0x11, 0x01, 0x14, 0x22, 0x04, 0x90, 0x85, - 0x01, 0x00, 0x20, 0x12, 0x60, 0x50, 0x00, 0x06, 0x90, 0x85, 0x00, 0x20, - 0x60, 0x52, 0x08, 0x0c, 0x76, 0x8b, 0x90, 0x06, 0x80, 0x01, 0x1d, 0xf0, - 0x00, 0x0e, 0x60, 0x52, 0x00, 0x28, 0x68, 0x04, 0xd0, 0xd4, 0x11, 0x10, - 0x08, 0x0c, 0x76, 0x8b, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x18, 0x90, 0x06, - 0x08, 0x0c, 0x2d, 0x63, 0x00, 0x16, 0x00, 0x26, 0x70, 0x00, 0x90, 0x8e, - 0x00, 0x04, 0x01, 0x30, 0x20, 0x09, 0x00, 0xc8, 0x20, 0x11, 0x74, 0xb2, - 0x08, 0x0c, 0x88, 0xd5, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, 0x87, 0x1c, - 0x70, 0x34, 0xc0, 0x85, 0x70, 0x36, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, - 0x00, 0x04, 0x08, 0x0c, 0x72, 0xf5, 0x08, 0x0c, 0x76, 0x48, 0x01, 0x38, - 0x68, 0x04, 0xd0, 0xd4, 0x11, 0x20, 0xd0, 0xdc, 0x11, 0x00, 0x08, 0x0c, - 0x79, 0x37, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, - 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x87, 0x33, 0x08, 0x0c, 0x87, 0x25, - 0x08, 0x0c, 0x79, 0x41, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x03, 0x00, 0x00, - 0x90, 0x06, 0x70, 0x9a, 0x60, 0xe2, 0x68, 0x86, 0x08, 0x0c, 0x28, 0xe7, - 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, - 0x00, 0x10, 0x60, 0x27, 0xff, 0xff, 0x60, 0x2b, 0x18, 0x2f, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x7c, - 0x20, 0x04, 0x90, 0x86, 0xaa, 0xaa, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x08, 0x0c, 0x57, 0xd9, 0x90, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x00, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, 0x57, 0xd9, 0x90, 0x84, - 0x00, 0x30, 0x90, 0x86, 0x00, 0x30, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x08, 0x0c, 0x57, 0xd9, 0x90, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x10, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, 0x57, 0xd9, 0x90, 0x84, - 0x00, 0x30, 0x90, 0x86, 0x00, 0x20, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x36, - 0x00, 0x16, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0x90, 0x8c, 0x00, 0x13, - 0x01, 0x68, 0x00, 0x20, 0x08, 0x0c, 0x29, 0x07, 0x90, 0x0e, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x02, 0x20, 0x19, 0x00, 0x28, 0x08, 0x0c, 0x32, 0x1b, - 0x90, 0x06, 0x00, 0x19, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x0c, 0x2e, 0x04, 0x01, 0x30, 0x08, 0x0c, 0xd7, 0xdc, - 0x11, 0x28, 0x90, 0x85, 0x00, 0x10, 0x00, 0x10, 0x90, 0x84, 0xff, 0xef, - 0x20, 0x72, 0x00, 0xee, 0x00, 0x05, 0x60, 0x50, 0x00, 0x06, 0x60, 0xec, - 0x00, 0x06, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x04, 0x00, 0x06, 0x60, 0x28, - 0x00, 0x06, 0x00, 0x16, 0x61, 0x38, 0x60, 0x50, 0x90, 0x84, 0xfb, 0xff, - 0x90, 0x85, 0x20, 0x00, 0x60, 0x52, 0x61, 0x3a, 0x20, 0xa9, 0x00, 0x12, - 0x1d, 0x04, 0x76, 0xa0, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x76, 0xa0, - 0x60, 0x2f, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0x60, 0x50, 0x90, 0x85, - 0x04, 0x00, 0x90, 0x84, 0xdf, 0xff, 0x60, 0x52, 0x61, 0x3a, 0x00, 0x1e, - 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, 0x00, 0x0e, 0x60, 0x2a, - 0x00, 0x0e, 0x60, 0x06, 0x00, 0x0e, 0x60, 0x0e, 0x00, 0x0e, 0x60, 0xee, - 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x01, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x28, 0xe7, 0x20, 0x01, 0x00, 0xa0, 0x00, 0x06, 0x08, 0x0c, - 0xd7, 0xe3, 0x00, 0x0e, 0x01, 0x30, 0x08, 0x0c, 0x2d, 0x57, 0x90, 0x06, - 0x08, 0x0c, 0x2d, 0x63, 0x00, 0x10, 0x08, 0x0c, 0x2d, 0x39, 0x00, 0x0e, - 0x60, 0x52, 0x60, 0x50, 0x00, 0x06, 0xc0, 0xe5, 0x60, 0x52, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, 0x2b, 0xd6, 0x00, 0xfe, 0x00, 0x0e, - 0x60, 0x52, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x60, 0x20, 0x90, 0x84, 0x00, 0x80, - 0x01, 0x38, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xc5, 0x21, 0x02, - 0x08, 0x04, 0x77, 0x66, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xc4, - 0x21, 0x02, 0x60, 0x28, 0x90, 0x84, 0xe1, 0xff, 0x60, 0x2a, 0x60, 0x27, - 0x02, 0x00, 0x20, 0x01, 0x00, 0x90, 0x08, 0x0c, 0x2d, 0x39, 0x20, 0xa9, - 0x03, 0x66, 0x60, 0x24, 0xd0, 0xcc, 0x15, 0x18, 0x1d, 0x04, 0x77, 0x0d, - 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x77, 0x0d, 0x20, 0x11, 0x00, 0x03, - 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, - 0x08, 0x0c, 0xa9, 0xd3, 0x90, 0x1e, 0x08, 0x0c, 0xaa, 0x49, 0x20, 0x01, - 0x00, 0xa0, 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, - 0x61, 0x2e, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x10, 0x08, 0x0c, 0x0d, 0x33, - 0x90, 0x85, 0x00, 0x01, 0x04, 0xc8, 0x08, 0x0c, 0x1b, 0x06, 0x60, 0xe3, - 0x00, 0x00, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x01, - 0x00, 0x02, 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x04, 0x08, 0x0c, - 0x28, 0xe7, 0x60, 0xe2, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, 0x2d, 0x39, - 0x20, 0xa9, 0x03, 0x66, 0x60, 0x27, 0x1e, 0x00, 0x20, 0x09, 0x1e, 0x00, - 0x08, 0x0c, 0x2c, 0x61, 0x60, 0x24, 0x91, 0x0c, 0x01, 0x40, 0x1d, 0x04, - 0x77, 0x4a, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x77, 0x4a, 0x08, 0x04, - 0x77, 0x16, 0x60, 0x28, 0x90, 0x85, 0x1e, 0x00, 0x60, 0x2a, 0x70, 0xb4, - 0x90, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, 0x00, 0x08, 0x68, 0x86, - 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x10, 0x08, 0x0c, 0x0d, 0x33, 0x90, 0x06, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x70, 0x00, 0x90, 0x86, 0x00, 0x03, 0x11, 0x68, 0x20, 0x01, - 0x02, 0x0b, 0x20, 0x04, 0x90, 0x84, 0x55, 0x40, 0x90, 0x86, 0x55, 0x40, - 0x11, 0x28, 0x20, 0x69, 0x1a, 0x7c, 0x2d, 0x04, 0x80, 0x00, 0x20, 0x6a, - 0x20, 0x69, 0x01, 0x40, 0x60, 0x20, 0x90, 0x84, 0x00, 0xc0, 0x01, 0x20, - 0x68, 0x84, 0x90, 0x05, 0x19, 0x04, 0x77, 0xd9, 0x20, 0x01, 0x00, 0x88, - 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x60, 0xe2, 0x68, 0x86, 0x08, 0x0c, - 0x28, 0xe7, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0x90, 0x05, 0x11, 0x18, - 0x68, 0x08, 0x90, 0x05, 0x01, 0xc0, 0x60, 0x28, 0x90, 0x84, 0xfb, 0xff, - 0x60, 0x2a, 0x60, 0x27, 0x04, 0x00, 0x20, 0x69, 0x19, 0x8f, 0x70, 0x00, - 0x20, 0x6a, 0x70, 0x9b, 0x00, 0x26, 0x70, 0x03, 0x00, 0x01, 0x20, 0xa9, - 0x00, 0x02, 0x1d, 0x04, 0x77, 0xbb, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, - 0x77, 0xbb, 0x08, 0x04, 0x78, 0x10, 0x20, 0x69, 0x01, 0x40, 0x20, 0xa9, - 0x03, 0x84, 0x60, 0x27, 0x1e, 0x00, 0x20, 0x09, 0x1e, 0x00, 0x08, 0x0c, - 0x2c, 0x61, 0x60, 0x24, 0x91, 0x0c, 0x05, 0x08, 0x90, 0x84, 0x1a, 0x00, - 0x11, 0xf0, 0x1d, 0x04, 0x77, 0xc7, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, - 0x77, 0xc7, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, 0x08, 0x0c, 0xa9, 0xd3, 0x90, 0x1e, - 0x08, 0x0c, 0xaa, 0x49, 0x20, 0x01, 0x00, 0xa0, 0x08, 0x0c, 0x2d, 0x39, - 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x90, 0x85, 0x00, 0x01, - 0x00, 0xf8, 0x08, 0x0c, 0x1b, 0x06, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, - 0x2d, 0x39, 0x20, 0x69, 0x01, 0x40, 0x60, 0xe3, 0x00, 0x00, 0x70, 0xb4, - 0x90, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, 0x00, 0x08, 0x68, 0x86, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x01, 0x00, 0x02, - 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x04, 0x08, 0x0c, 0x28, 0xe7, - 0x60, 0xe2, 0x90, 0x06, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x60, 0x20, 0x90, 0x84, 0x00, 0xc0, - 0x01, 0xc8, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, 0x08, 0x0c, 0xa9, 0xd3, 0x90, 0x1e, - 0x08, 0x0c, 0xaa, 0x49, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x00, 0xa0, - 0x08, 0x0c, 0x2d, 0x39, 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, - 0x08, 0x04, 0x78, 0xb2, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xd1, 0xb4, - 0x11, 0x60, 0xc1, 0xb5, 0x21, 0x02, 0x08, 0x0c, 0x74, 0x9a, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, 0x2d, 0x39, 0x60, 0xe3, - 0x00, 0x00, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, 0x90, 0x05, 0x11, 0x18, - 0x68, 0x08, 0x90, 0x05, 0x01, 0x80, 0x60, 0x28, 0x90, 0x84, 0xfd, 0xff, - 0x60, 0x2a, 0x60, 0x27, 0x02, 0x00, 0x20, 0x69, 0x19, 0x8f, 0x70, 0x00, - 0x20, 0x6a, 0x70, 0x9b, 0x00, 0x27, 0x70, 0x03, 0x00, 0x01, 0x08, 0x04, - 0x78, 0xb2, 0x60, 0x27, 0x1e, 0x00, 0x20, 0x09, 0x1e, 0x00, 0x08, 0x0c, - 0x2c, 0x61, 0x60, 0x24, 0x91, 0x0c, 0x01, 0xc8, 0x90, 0x84, 0x1c, 0x00, - 0x11, 0xb0, 0x1d, 0x04, 0x78, 0x69, 0x00, 0x06, 0x00, 0x16, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x08, 0x0c, 0x87, 0x76, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xfb, - 0x70, 0x78, 0x00, 0xee, 0x90, 0x05, 0x19, 0xf8, 0x04, 0x38, 0x00, 0x26, - 0x20, 0x11, 0x74, 0xb2, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0x11, 0x74, 0xa5, - 0x08, 0x0c, 0x89, 0x17, 0x00, 0x2e, 0x20, 0x69, 0x01, 0x40, 0x60, 0xe3, - 0x00, 0x00, 0x70, 0xb4, 0x90, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, - 0x00, 0x08, 0x68, 0x86, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x20, 0x01, 0x00, 0x02, 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x04, - 0x08, 0x0c, 0x28, 0xe7, 0x60, 0xe2, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0xc1, 0xb4, 0x21, 0x02, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0xd7, 0xdc, 0x19, 0x04, - 0x79, 0x20, 0x71, 0x30, 0xd1, 0x84, 0x11, 0x70, 0x08, 0x0c, 0x33, 0xaa, - 0x01, 0x38, 0xc1, 0x8d, 0x71, 0x32, 0x20, 0x11, 0x18, 0x48, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0x20, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, 0x79, 0x20, - 0x20, 0x11, 0x18, 0x48, 0x22, 0x0c, 0xd1, 0xa4, 0x05, 0x38, 0x00, 0x16, - 0x20, 0x19, 0x00, 0x0e, 0x08, 0x0c, 0xeb, 0xa1, 0x01, 0x56, 0x00, 0xb6, - 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x91, 0x86, 0x00, 0x7e, 0x01, 0xa0, - 0x91, 0x86, 0x00, 0x80, 0x01, 0x88, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x70, - 0x21, 0x20, 0x90, 0x06, 0x00, 0x16, 0x20, 0x09, 0x00, 0x0e, 0x08, 0x0c, - 0xec, 0x31, 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, 0x01, 0x00, 0x08, 0x0c, - 0x8a, 0x50, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x78, 0xe9, 0x00, 0xbe, - 0x01, 0x5e, 0x00, 0x1e, 0xd1, 0xac, 0x11, 0x48, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x32, 0x1b, 0x00, 0x1e, - 0x00, 0x78, 0x01, 0x56, 0x00, 0xb6, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, - 0x08, 0x0c, 0x67, 0x24, 0x11, 0x10, 0x08, 0x0c, 0x61, 0x48, 0x81, 0x08, - 0x1f, 0x04, 0x79, 0x16, 0x00, 0xbe, 0x01, 0x5e, 0x08, 0x0c, 0x1b, 0x06, - 0x08, 0x0c, 0xb2, 0x44, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x2e, - 0x08, 0x0c, 0x75, 0x63, 0x00, 0xee, 0x00, 0xce, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x20, 0x01, 0x19, 0x7d, - 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, - 0x00, 0x00, 0x00, 0x05, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x03, 0xaa, 0xaa, - 0x00, 0x05, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, - 0x20, 0x71, 0x18, 0xfa, 0x70, 0x03, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, - 0x08, 0x0c, 0x10, 0x27, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0xab, 0xdc, 0xb0, - 0x29, 0x00, 0x70, 0x4e, 0x08, 0x0c, 0x10, 0x27, 0x09, 0x0c, 0x0d, 0xc5, - 0xa8, 0xab, 0xdc, 0xb0, 0x29, 0x00, 0x70, 0x52, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x6b, 0x00, 0x01, 0xa8, 0x9f, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x00, 0x40, 0x68, 0x48, 0x90, 0x05, 0x11, 0x18, 0x90, 0x85, - 0x00, 0x01, 0x04, 0xb0, 0x68, 0x40, 0x90, 0x05, 0x01, 0x50, 0x04, 0xa1, - 0x6a, 0x50, 0x92, 0x00, 0x70, 0x02, 0x68, 0x54, 0x91, 0x01, 0x70, 0x06, - 0x90, 0x06, 0x70, 0x12, 0x70, 0x16, 0x68, 0x50, 0x70, 0x02, 0x68, 0x54, - 0x70, 0x06, 0x68, 0x58, 0x70, 0x0a, 0x68, 0x5c, 0x70, 0x0e, 0x68, 0x40, - 0x90, 0x05, 0x11, 0x10, 0x70, 0x12, 0x70, 0x16, 0x68, 0x48, 0x70, 0x1a, - 0x70, 0x1c, 0x90, 0x85, 0x00, 0x40, 0x70, 0x1e, 0x20, 0x01, 0x00, 0x19, - 0x70, 0x36, 0x70, 0x2b, 0x00, 0x01, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, - 0x91, 0x8c, 0xff, 0xf7, 0x91, 0x8d, 0x80, 0x00, 0x21, 0x02, 0x00, 0xd6, - 0x20, 0x69, 0x18, 0xfa, 0x68, 0x07, 0x00, 0x01, 0x00, 0xde, 0x08, 0x0c, - 0x7f, 0x74, 0x90, 0x06, 0x00, 0xee, 0x00, 0x05, 0x90, 0x0e, 0x01, 0x56, - 0x20, 0xa9, 0x00, 0x06, 0x80, 0x03, 0x20, 0x11, 0x01, 0x00, 0x22, 0x14, - 0x92, 0x96, 0x00, 0x08, 0x11, 0x10, 0x81, 0x8d, 0x00, 0x10, 0x81, 0xf5, - 0x3e, 0x08, 0x1f, 0x04, 0x79, 0xa8, 0x01, 0x5e, 0x00, 0x05, 0x20, 0x79, - 0x00, 0x40, 0x20, 0x71, 0x18, 0xfa, 0x70, 0x04, 0x00, 0x02, 0x79, 0xc7, - 0x79, 0xc8, 0x7a, 0x00, 0x7a, 0x5b, 0x7b, 0xbb, 0x79, 0xc5, 0x79, 0xc5, - 0x7b, 0xe5, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x20, 0x79, 0x00, 0x40, - 0x78, 0x2c, 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x80, 0x56, 0xd0, 0xa4, - 0x01, 0xf8, 0x78, 0x24, 0x20, 0x48, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x8a, 0x00, 0x40, 0x06, 0x10, - 0x00, 0xc0, 0x20, 0x01, 0x18, 0x00, 0x20, 0x0c, 0x91, 0x86, 0x00, 0x03, - 0x11, 0x68, 0x70, 0x04, 0x00, 0x02, 0x79, 0xf0, 0x79, 0xca, 0x79, 0xf0, - 0x79, 0xee, 0x79, 0xf0, 0x79, 0xf0, 0x79, 0xf0, 0x79, 0xf0, 0x79, 0xf0, - 0x08, 0x0c, 0x7a, 0x5b, 0x78, 0x2c, 0xd0, 0x9c, 0x09, 0x0c, 0x7f, 0x74, - 0x00, 0x05, 0x90, 0x82, 0x00, 0x5a, 0x12, 0x18, 0x21, 0x00, 0x00, 0x3b, - 0x0c, 0x10, 0x08, 0x0c, 0x7a, 0x91, 0x0c, 0x90, 0x00, 0xe3, 0x08, 0xe8, - 0x00, 0x05, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0xb3, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x9d, - 0x7a, 0x91, 0x7c, 0xdb, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0xb3, - 0x7a, 0x91, 0x7a, 0x9d, 0x7d, 0x1c, 0x7d, 0x5d, 0x7d, 0xa4, 0x7d, 0xb8, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0xb3, 0x7a, 0x9d, 0x7a, 0xc7, 0x7a, 0x91, - 0x7b, 0x8f, 0x7e, 0x63, 0x7e, 0x7e, 0x7a, 0x91, 0x7a, 0xb3, 0x7a, 0x91, - 0x7a, 0xc7, 0x7a, 0x91, 0x7a, 0x91, 0x7b, 0x85, 0x7e, 0x7e, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0xdb, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7f, 0xfa, 0x7a, 0x91, 0x7f, 0xa4, 0x7a, 0x91, 0x7f, 0xa4, 0x7a, 0x91, - 0x7a, 0xf0, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x91, 0x20, 0x79, 0x00, 0x40, 0x70, 0x04, 0x90, 0x86, 0x00, 0x03, - 0x11, 0x98, 0x78, 0x2c, 0x08, 0x0c, 0x7f, 0x9d, 0xd0, 0xa4, 0x01, 0x70, - 0x78, 0x24, 0x20, 0x48, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, 0xa8, 0x64, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x8a, 0x00, 0x1a, 0x12, 0x10, 0x00, 0x2b, - 0x0c, 0x50, 0x00, 0xe9, 0x08, 0x0c, 0x7f, 0x74, 0x00, 0x05, 0x7a, 0x91, - 0x7a, 0x9d, 0x7c, 0xc7, 0x7a, 0x91, 0x7a, 0x9d, 0x7a, 0x91, 0x7a, 0x9d, - 0x7a, 0x9d, 0x7a, 0x91, 0x7a, 0x9d, 0x7c, 0xc7, 0x7a, 0x9d, 0x7a, 0x9d, - 0x7a, 0x9d, 0x7a, 0x9d, 0x7a, 0x9d, 0x7a, 0x91, 0x7a, 0x9d, 0x7c, 0xc7, - 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x9d, 0x7a, 0x91, 0x7a, 0x91, 0x7a, 0x91, - 0x7a, 0x9d, 0x00, 0xe6, 0x20, 0x71, 0x18, 0xfa, 0x20, 0x09, 0x04, 0x00, - 0x00, 0x71, 0x00, 0xee, 0x00, 0x05, 0x20, 0x09, 0x10, 0x00, 0x00, 0x49, - 0x00, 0x05, 0x20, 0x09, 0x20, 0x00, 0x00, 0x29, 0x00, 0x05, 0x20, 0x09, - 0x08, 0x00, 0x00, 0x09, 0x00, 0x05, 0x70, 0x07, 0x00, 0x01, 0xa8, 0x68, - 0x90, 0x84, 0x00, 0xff, 0x91, 0x05, 0xa8, 0x6a, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x00, 0x05, 0xa8, 0x64, - 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x0d, 0x08, 0x80, 0x01, 0x11, 0x20, - 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, 0x7c, 0x64, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x12, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x7c, 0x64, - 0x00, 0x05, 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x09, 0x68, - 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, 0x7c, 0x7f, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, - 0x70, 0x4b, 0x7c, 0x7f, 0x00, 0x05, 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, - 0x00, 0xff, 0x09, 0x04, 0x7a, 0x99, 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, - 0x00, 0x01, 0x08, 0x04, 0x7c, 0x9b, 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, - 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x7c, 0x9b, 0x00, 0x05, - 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x01, - 0x19, 0x04, 0x7a, 0x99, 0x70, 0x07, 0x00, 0x01, 0x20, 0x09, 0x18, 0x34, - 0x21, 0x0c, 0x81, 0xff, 0x19, 0x04, 0x7b, 0x5c, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x09, 0x04, 0x7b, 0x47, 0xa9, 0x9c, 0x91, 0x86, - 0x00, 0xff, 0x05, 0xe8, 0xa9, 0x94, 0x91, 0x86, 0x00, 0x6f, 0x01, 0x88, - 0x91, 0x86, 0x00, 0x74, 0x15, 0xb0, 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, - 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, 0x05, 0x78, 0x00, 0x16, 0xa9, 0x98, - 0x08, 0x0c, 0x6b, 0x11, 0x00, 0x1e, 0x15, 0x48, 0x04, 0x00, 0x08, 0x0c, - 0x76, 0x37, 0x01, 0x40, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x16, - 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x04, 0x38, 0x00, 0x26, 0x20, 0x11, - 0x80, 0x08, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, 0x01, 0xb0, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0xa9, 0x98, 0xaa, 0xa0, 0xab, 0x9c, 0x91, 0x8d, - 0x80, 0x00, 0x08, 0x0c, 0x6b, 0x11, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x11, 0x40, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x40, 0x09, 0x20, 0x01, - 0x00, 0x30, 0x90, 0x0e, 0x00, 0x50, 0xa8, 0x68, 0x90, 0x84, 0x00, 0xff, - 0xa8, 0x6a, 0xa8, 0x83, 0x00, 0x00, 0x08, 0x0c, 0x63, 0xc5, 0x11, 0x08, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa8, 0x67, 0x01, 0x39, - 0xa8, 0x7a, 0xa9, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x0c, 0xa0, - 0xa9, 0x94, 0x91, 0x86, 0x00, 0x71, 0x09, 0x04, 0x7b, 0x00, 0x91, 0x86, - 0x00, 0x64, 0x09, 0x04, 0x7b, 0x00, 0x91, 0x86, 0x00, 0x7c, 0x09, 0x04, - 0x7b, 0x00, 0x91, 0x86, 0x00, 0x28, 0x09, 0x04, 0x7b, 0x00, 0x91, 0x86, - 0x00, 0x38, 0x09, 0x04, 0x7b, 0x00, 0x91, 0x86, 0x00, 0x78, 0x09, 0x04, - 0x7b, 0x00, 0x91, 0x86, 0x00, 0x5f, 0x09, 0x04, 0x7b, 0x00, 0x91, 0x86, - 0x00, 0x56, 0x09, 0x04, 0x7b, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x08, 0x60, 0xa8, 0x7c, - 0x90, 0x84, 0x00, 0xc0, 0x90, 0x86, 0x00, 0xc0, 0x11, 0x20, 0x70, 0x07, - 0x00, 0x01, 0x08, 0x04, 0x7e, 0x95, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, - 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x30, 0x20, 0x98, 0x70, 0x50, 0x20, 0x40, 0xa0, 0x60, 0x20, 0xe8, - 0xa0, 0x5c, 0x90, 0x80, 0x00, 0x23, 0x20, 0xa0, 0x40, 0x03, 0xa8, 0x88, - 0x70, 0x12, 0x90, 0x82, 0x04, 0x01, 0x1a, 0x04, 0x7a, 0xa1, 0xaa, 0xb4, - 0x92, 0x8a, 0x00, 0x02, 0x1a, 0x04, 0x7a, 0xa1, 0x82, 0xff, 0x11, 0x38, - 0xa8, 0xb8, 0xa9, 0xbc, 0x91, 0x05, 0x01, 0x18, 0x20, 0x01, 0x7c, 0x22, - 0x00, 0x18, 0x92, 0x80, 0x7c, 0x18, 0x20, 0x05, 0x70, 0x56, 0x70, 0x10, - 0x90, 0x15, 0x09, 0x04, 0x7c, 0x03, 0x08, 0x0c, 0x10, 0x27, 0x11, 0x18, - 0x70, 0x07, 0x00, 0x04, 0x00, 0x05, 0x29, 0x00, 0x70, 0x22, 0x70, 0x54, - 0x20, 0x60, 0xe0, 0x00, 0xa8, 0x66, 0x70, 0x50, 0x20, 0x40, 0xa9, 0x5c, - 0xe0, 0x04, 0x91, 0x00, 0xa0, 0x76, 0xa8, 0x60, 0xa0, 0x72, 0xe0, 0x08, - 0x92, 0x0a, 0x12, 0x10, 0x90, 0x0e, 0x22, 0x00, 0x71, 0x12, 0xe2, 0x0c, - 0x80, 0x03, 0x80, 0x0b, 0x92, 0x96, 0x00, 0x04, 0x01, 0x08, 0x91, 0x08, - 0xa1, 0x7a, 0x81, 0x0b, 0xa1, 0x7e, 0x08, 0x0c, 0x10, 0xf8, 0xa0, 0x6c, - 0x90, 0x8e, 0x01, 0x00, 0x01, 0x70, 0x90, 0x86, 0x02, 0x00, 0x01, 0x18, - 0x70, 0x07, 0x00, 0x07, 0x00, 0x05, 0x70, 0x20, 0x20, 0x48, 0x08, 0x0c, - 0x10, 0x40, 0x70, 0x14, 0x20, 0x48, 0x08, 0x04, 0x7a, 0xa1, 0x70, 0x20, - 0x20, 0x48, 0x70, 0x18, 0xa8, 0x02, 0xa8, 0x07, 0x00, 0x00, 0x29, 0x08, - 0x20, 0x48, 0xa9, 0x06, 0x71, 0x1a, 0x08, 0x04, 0x7b, 0xbb, 0x70, 0x14, - 0x20, 0x48, 0x70, 0x07, 0x00, 0x01, 0xa8, 0xb4, 0x90, 0x05, 0x11, 0x28, - 0xa8, 0xb8, 0xa9, 0xbc, 0x91, 0x05, 0x01, 0x08, 0x00, 0xb9, 0xa8, 0x64, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x1e, 0x09, 0x04, 0x7e, 0x95, - 0x08, 0x04, 0x7c, 0x64, 0x7c, 0x1a, 0x7c, 0x1e, 0x00, 0x02, 0x00, 0x1d, - 0x00, 0x07, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x1b, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x0a, 0x00, 0x1d, 0x00, 0x05, 0x00, 0x04, 0x00, 0x76, 0x00, 0x66, - 0xaf, 0xb8, 0xae, 0xbc, 0xa8, 0x04, 0x20, 0x50, 0xb0, 0xc0, 0xb0, 0xe2, - 0xb0, 0xbc, 0xb0, 0xde, 0xb0, 0xb8, 0xb0, 0xd2, 0xb0, 0xb4, 0xb0, 0xce, - 0xb6, 0xda, 0xb7, 0xd6, 0xb0, 0xb0, 0xb0, 0xca, 0xb0, 0xac, 0xb0, 0xc6, - 0xb0, 0xa8, 0xb0, 0xba, 0xb0, 0xa4, 0xb0, 0xb6, 0xb6, 0xc2, 0xb7, 0xbe, - 0xb0, 0xa0, 0xb0, 0xb2, 0xb0, 0x9c, 0xb0, 0xae, 0xb0, 0x98, 0xb0, 0xa2, - 0xb0, 0x94, 0xb0, 0x9e, 0xb6, 0xaa, 0xb7, 0xa6, 0xb0, 0x90, 0xb0, 0x9a, - 0xb0, 0x8c, 0xb0, 0x96, 0xb0, 0x88, 0xb0, 0x8a, 0xb0, 0x84, 0xb0, 0x86, - 0xb6, 0x92, 0xb7, 0x8e, 0xb0, 0x80, 0xb0, 0x82, 0xb0, 0x7c, 0xb0, 0x7e, - 0xb0, 0x78, 0xb0, 0x72, 0xb0, 0x74, 0xb0, 0x6e, 0xb6, 0x7a, 0xb7, 0x76, - 0xb0, 0x04, 0x90, 0x55, 0x19, 0x58, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x05, - 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, 0x81, 0xff, 0x11, 0x78, 0x08, 0x0c, - 0x61, 0xc2, 0x11, 0x08, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x0b, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xd3, 0xce, 0x08, 0x0c, 0x6e, 0x9f, - 0x01, 0x2e, 0x0c, 0xa0, 0x08, 0x0c, 0xd7, 0xdc, 0x1d, 0x70, 0x20, 0x01, - 0x00, 0x28, 0x90, 0x0e, 0x0c, 0x70, 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, - 0x81, 0xff, 0x11, 0x88, 0xa8, 0x88, 0x90, 0x05, 0x01, 0x88, 0xa8, 0x83, - 0x00, 0x00, 0x08, 0x0c, 0x62, 0x52, 0x11, 0x08, 0x00, 0x05, 0xa8, 0x7a, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, - 0x0c, 0xb8, 0x20, 0x01, 0x00, 0x28, 0x0c, 0xa8, 0x20, 0x01, 0x00, 0x00, - 0x0c, 0x90, 0x04, 0x19, 0x11, 0xd8, 0xa8, 0x88, 0x90, 0x05, 0x01, 0xe0, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x7c, 0xd0, 0xf4, 0x01, 0x20, 0x08, 0x0c, - 0x63, 0x27, 0x11, 0x38, 0x00, 0x05, 0x90, 0x06, 0xa8, 0x7a, 0x08, 0x0c, - 0x62, 0x9f, 0x11, 0x08, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0xa8, 0x7a, 0xa9, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x0c, 0xb0, - 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x0c, 0x98, 0x20, 0x01, 0x00, 0x00, - 0x0c, 0x80, 0x00, 0xc6, 0x20, 0x61, 0x18, 0x00, 0x60, 0xd0, 0x90, 0x05, - 0x01, 0x00, 0x00, 0xce, 0x00, 0x05, 0x70, 0x18, 0xa8, 0x02, 0x29, 0x08, - 0x20, 0x48, 0xa9, 0x06, 0x71, 0x1a, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, - 0x01, 0x18, 0x70, 0x07, 0x00, 0x03, 0x00, 0x30, 0x70, 0x14, 0x20, 0x48, - 0x70, 0x07, 0x00, 0x01, 0x70, 0x48, 0x08, 0x0f, 0x00, 0x05, 0x00, 0xb6, - 0x70, 0x07, 0x00, 0x01, 0xa9, 0x74, 0xa8, 0x78, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x96, 0x00, 0x04, 0x05, 0x40, 0x20, 0xa9, 0x00, 0x01, 0x90, 0x96, - 0x00, 0x01, 0x01, 0x90, 0x90, 0x0e, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x96, - 0x00, 0x02, 0x01, 0x60, 0x90, 0x05, 0x11, 0xd8, 0xa9, 0x74, 0x08, 0x0c, - 0x67, 0x24, 0x11, 0xb8, 0x00, 0x66, 0xae, 0x80, 0x08, 0x0c, 0x68, 0x34, - 0x00, 0x6e, 0x00, 0x88, 0x00, 0x46, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x24, - 0xc4, 0x84, 0x24, 0x12, 0x00, 0x4e, 0x00, 0xc6, 0x08, 0x0c, 0x67, 0x24, - 0x11, 0x10, 0x08, 0x0c, 0x69, 0x34, 0x81, 0x08, 0x1f, 0x04, 0x7d, 0x04, - 0x00, 0xce, 0xa8, 0x7c, 0xd0, 0x84, 0x11, 0x20, 0x08, 0x0c, 0x10, 0x40, - 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x6a, 0x9f, 0x05, 0x80, - 0x20, 0x61, 0x1a, 0x74, 0x61, 0x00, 0xd1, 0x84, 0x01, 0x78, 0xa8, 0x88, - 0x90, 0x84, 0x00, 0xff, 0x15, 0x50, 0x60, 0x00, 0xd0, 0x84, 0x05, 0x20, - 0x60, 0x04, 0x90, 0x05, 0x15, 0x38, 0x60, 0x03, 0x00, 0x00, 0x60, 0x0b, - 0x00, 0x00, 0x00, 0xc8, 0x20, 0x11, 0x00, 0x01, 0xa8, 0x90, 0x90, 0x05, - 0x11, 0x10, 0x20, 0x01, 0x00, 0x1e, 0x80, 0x00, 0x60, 0x16, 0xa8, 0x88, - 0x90, 0x84, 0x00, 0xff, 0x01, 0x78, 0x60, 0x06, 0xa8, 0x88, 0x80, 0x07, - 0x90, 0x84, 0x00, 0xff, 0x01, 0x48, 0x60, 0x0a, 0xa8, 0x88, 0x80, 0x00, - 0x11, 0x08, 0xc2, 0x8d, 0x62, 0x02, 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x5e, - 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x58, 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x52, - 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x55, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x6a, 0x9f, 0x05, 0xe0, 0x20, 0x61, - 0x1a, 0x74, 0x60, 0x00, 0xd0, 0x84, 0x05, 0xb8, 0x62, 0x04, 0x63, 0x08, - 0xd0, 0x8c, 0x15, 0x30, 0xac, 0x78, 0x94, 0x84, 0x00, 0x03, 0x01, 0x70, - 0xa9, 0x88, 0x91, 0x8c, 0x00, 0xff, 0x80, 0x01, 0x11, 0x20, 0x21, 0x00, - 0x92, 0x10, 0x06, 0x20, 0x00, 0x28, 0x80, 0x01, 0x15, 0x08, 0x21, 0x00, - 0x92, 0x12, 0x02, 0xf0, 0x94, 0x84, 0x00, 0x0c, 0x01, 0x88, 0xa9, 0x88, - 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, 0x90, 0x82, 0x00, 0x04, 0x11, 0x20, - 0x21, 0x00, 0x93, 0x18, 0x02, 0x88, 0x00, 0x30, 0x90, 0x82, 0x00, 0x04, - 0x11, 0x68, 0x21, 0x00, 0x93, 0x1a, 0x02, 0x50, 0xa8, 0x90, 0x90, 0x05, - 0x01, 0x10, 0x80, 0x00, 0x60, 0x16, 0x62, 0x06, 0x63, 0x0a, 0x01, 0x2e, - 0x08, 0x04, 0x7f, 0x5e, 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x5b, 0x01, 0x2e, - 0x08, 0x04, 0x7f, 0x58, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, - 0x00, 0x01, 0x20, 0x61, 0x1a, 0x74, 0x63, 0x00, 0xd3, 0x8c, 0x11, 0x20, - 0x63, 0x08, 0x83, 0x18, 0x02, 0x20, 0x63, 0x0a, 0x01, 0x2e, 0x08, 0x04, - 0x7f, 0x6c, 0x01, 0x2e, 0x08, 0x04, 0x7f, 0x5b, 0x00, 0xb6, 0x01, 0x26, - 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0xa8, 0x7c, - 0xd0, 0xac, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x74, 0x60, 0x00, - 0x90, 0x84, 0xfc, 0xff, 0x60, 0x02, 0x00, 0xce, 0x04, 0x40, 0xa8, 0x88, - 0x90, 0x05, 0x05, 0xd8, 0xa8, 0x8c, 0x90, 0x65, 0x05, 0x98, 0x20, 0x01, - 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x01, 0x18, 0x08, 0x0c, 0xb3, 0x06, - 0x00, 0x68, 0x60, 0x17, 0xf4, 0x00, 0x60, 0x5b, 0x00, 0x00, 0xa9, 0x7c, - 0xd1, 0xa4, 0x01, 0x10, 0xa9, 0x80, 0x61, 0x5a, 0x20, 0x09, 0x00, 0x41, - 0x08, 0x0c, 0xb3, 0x52, 0xa9, 0x88, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, - 0x20, 0x00, 0x11, 0x38, 0x00, 0x26, 0x90, 0x0e, 0x20, 0x11, 0xfd, 0xff, - 0x08, 0x0c, 0x8a, 0x50, 0x00, 0x2e, 0xa8, 0x7c, 0xd0, 0xc4, 0x01, 0x48, - 0x20, 0x61, 0x1a, 0x74, 0x60, 0x00, 0xd0, 0x8c, 0x11, 0x20, 0x60, 0x08, - 0x80, 0x00, 0x02, 0x08, 0x60, 0x0a, 0x00, 0xce, 0x01, 0x2e, 0x00, 0xbe, - 0x08, 0x04, 0x7f, 0x5e, 0x00, 0xce, 0x01, 0x2e, 0x00, 0xbe, 0x08, 0x04, - 0x7f, 0x58, 0xa9, 0x84, 0x91, 0x86, 0x00, 0x2e, 0x0d, 0x30, 0x91, 0x86, - 0x00, 0x2d, 0x0d, 0x18, 0x91, 0x86, 0x00, 0x45, 0x05, 0x10, 0x91, 0x86, - 0x00, 0x2a, 0x11, 0x30, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0x94, - 0x21, 0x02, 0x08, 0xb8, 0x91, 0x86, 0x00, 0x20, 0x01, 0x58, 0x91, 0x86, - 0x00, 0x29, 0x1d, 0x10, 0xa9, 0x74, 0x08, 0x0c, 0x67, 0x24, 0x19, 0x68, - 0xb8, 0x00, 0xc0, 0xe4, 0xb8, 0x02, 0x08, 0x48, 0xa8, 0x8c, 0x90, 0x65, - 0x09, 0xb8, 0x60, 0x07, 0x00, 0x24, 0x20, 0x01, 0x19, 0x86, 0x20, 0x04, - 0x60, 0x1a, 0x08, 0x04, 0x7d, 0xf3, 0xa8, 0x8c, 0x90, 0x65, 0x09, 0x60, - 0x00, 0xe6, 0xa8, 0x90, 0x90, 0x75, 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, - 0x90, 0x05, 0x01, 0x50, 0x08, 0x0c, 0xb3, 0x06, 0x8e, 0xff, 0x01, 0x18, - 0x2e, 0x60, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xee, 0x08, 0x04, 0x7d, 0xf3, - 0x60, 0x24, 0xc0, 0xdc, 0xc0, 0xd5, 0x60, 0x26, 0x2e, 0x60, 0x60, 0x07, - 0x00, 0x3a, 0xa8, 0xa0, 0x90, 0x05, 0x01, 0x30, 0x60, 0x07, 0x00, 0x3b, - 0xa8, 0xa4, 0x60, 0x2e, 0xa8, 0xa8, 0x60, 0x16, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xee, 0x08, 0x04, - 0x7d, 0xf3, 0x20, 0x61, 0x1a, 0x74, 0x60, 0x00, 0xd0, 0x84, 0x01, 0x90, - 0xd0, 0x8c, 0x19, 0x04, 0x7f, 0x6c, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x62, 0x04, 0x82, 0x10, 0x02, 0x20, 0x62, 0x06, 0x01, 0x2e, 0x08, 0x04, - 0x7f, 0x6c, 0x01, 0x2e, 0xa8, 0x83, 0x00, 0x16, 0x08, 0x04, 0x7f, 0x65, - 0xa8, 0x83, 0x00, 0x07, 0x08, 0x04, 0x7f, 0x65, 0xa8, 0x64, 0x80, 0x07, - 0x90, 0x84, 0x00, 0xff, 0x01, 0x30, 0x80, 0x01, 0x11, 0x38, 0x70, 0x07, - 0x00, 0x01, 0x00, 0x69, 0x00, 0x05, 0x08, 0x0c, 0x7a, 0x99, 0x00, 0x40, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, - 0x70, 0x4b, 0x7e, 0x95, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x90, 0x3e, 0x20, 0x61, 0x18, 0x00, 0x61, 0xd0, - 0x81, 0xff, 0x19, 0x04, 0x7f, 0x17, 0x61, 0x30, 0xd1, 0x94, 0x19, 0x04, - 0x7f, 0x41, 0xa8, 0x78, 0x20, 0x70, 0x9e, 0x82, 0x1c, 0xd0, 0x0a, 0x04, - 0x7f, 0x0b, 0x60, 0x68, 0x9e, 0x02, 0x1a, 0x04, 0x7f, 0x0b, 0x71, 0x20, - 0x91, 0x86, 0x00, 0x06, 0x19, 0x04, 0x7e, 0xfd, 0x70, 0x10, 0x90, 0x5d, - 0x09, 0x04, 0x7f, 0x17, 0xb8, 0x00, 0xd0, 0xe4, 0x19, 0x04, 0x7f, 0x3b, - 0x20, 0x61, 0x1a, 0x74, 0x61, 0x00, 0x91, 0x84, 0x03, 0x01, 0x90, 0x86, - 0x00, 0x01, 0x15, 0xa0, 0x70, 0x24, 0xd0, 0xdc, 0x19, 0x04, 0x7f, 0x44, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x03, 0x00, 0x00, 0x29, 0x08, 0x70, 0x14, - 0x90, 0x05, 0x11, 0x98, 0x71, 0x16, 0xa8, 0x7c, 0xd0, 0xf4, 0x19, 0x04, - 0x7f, 0x47, 0x08, 0x0c, 0x57, 0xd5, 0xd0, 0x9c, 0x11, 0x18, 0xa8, 0x7c, - 0xc0, 0xcc, 0xa8, 0x7e, 0x2e, 0x60, 0x08, 0x0c, 0x89, 0x70, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, - 0x1d, 0xe0, 0xa9, 0x02, 0x21, 0x48, 0xa8, 0x7c, 0xd0, 0xf4, 0x19, 0x04, - 0x7f, 0x47, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x2e, - 0x00, 0xee, 0xa8, 0x83, 0x00, 0x06, 0x00, 0xbe, 0x08, 0x04, 0x7f, 0x65, - 0xd1, 0x84, 0x0d, 0xb8, 0xd1, 0xc4, 0x11, 0x90, 0x00, 0xa0, 0xa9, 0x74, - 0x08, 0x0c, 0x67, 0x24, 0x15, 0xd0, 0xb8, 0x00, 0xd0, 0xe4, 0x15, 0xb8, - 0x71, 0x20, 0x91, 0x86, 0x00, 0x07, 0x11, 0x18, 0xa8, 0x83, 0x00, 0x02, - 0x04, 0x90, 0xa8, 0x83, 0x00, 0x08, 0x04, 0x78, 0xa8, 0x83, 0x00, 0x0e, - 0x04, 0x60, 0xa8, 0x83, 0x00, 0x17, 0x04, 0x48, 0xa8, 0x83, 0x00, 0x35, - 0x04, 0x30, 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xfc, 0x01, 0xe8, 0xa8, 0x78, - 0x20, 0x70, 0x9e, 0x82, 0x1c, 0xd0, 0x02, 0xc0, 0x60, 0x68, 0x9e, 0x02, - 0x12, 0xa8, 0x71, 0x20, 0x91, 0x86, 0x00, 0x06, 0x11, 0x88, 0x70, 0x10, - 0x90, 0x5d, 0x01, 0x70, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x58, 0x20, 0x39, - 0x00, 0x01, 0x70, 0x00, 0x90, 0x86, 0x00, 0x07, 0x19, 0x04, 0x7e, 0xa1, - 0x70, 0x03, 0x00, 0x02, 0x08, 0x04, 0x7e, 0xa1, 0xa8, 0x83, 0x00, 0x28, - 0x00, 0x10, 0xa8, 0x83, 0x00, 0x29, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, - 0x04, 0x20, 0xa8, 0x83, 0x00, 0x2a, 0x0c, 0xc8, 0xa8, 0x83, 0x00, 0x45, - 0x0c, 0xb0, 0x2e, 0x60, 0x20, 0x19, 0x00, 0x02, 0x60, 0x1b, 0x00, 0x14, - 0x08, 0x0c, 0xe7, 0x54, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, - 0x20, 0x09, 0x00, 0x3e, 0x00, 0x58, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, - 0x20, 0x09, 0x00, 0x06, 0x00, 0x28, 0x20, 0x09, 0x00, 0x16, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x01, 0xa8, 0x84, 0x90, 0x84, 0xff, 0x00, 0x91, 0x05, - 0xa8, 0x86, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, - 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x10, 0x40, 0x00, 0x05, 0x00, 0xd6, - 0x08, 0x0c, 0x89, 0x67, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x00, 0x40, 0x70, 0x2c, - 0xd0, 0x84, 0x01, 0xd8, 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x80, 0x56, - 0xd0, 0x9c, 0x11, 0xa8, 0x20, 0x71, 0x18, 0x00, 0x70, 0xc0, 0x90, 0xea, - 0x00, 0x20, 0x02, 0x78, 0x80, 0x01, 0x70, 0xc2, 0x70, 0x2c, 0x20, 0x48, - 0xa8, 0x00, 0x70, 0x2e, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, 0x20, 0x71, - 0x00, 0x40, 0x29, 0x00, 0x70, 0x22, 0x70, 0x2c, 0x0c, 0x28, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, 0x00, 0x06, 0x90, 0x84, 0x07, 0x80, - 0x19, 0x0c, 0x80, 0x56, 0x00, 0x0e, 0x00, 0x05, 0xa8, 0x98, 0x90, 0x84, - 0x00, 0x03, 0x05, 0xa8, 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0xd8, 0x29, 0x00, - 0x60, 0x16, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x35, - 0x11, 0x38, 0x60, 0x08, 0xc0, 0xfd, 0x60, 0x0a, 0x20, 0x01, 0x19, 0x6b, - 0x20, 0x04, 0x00, 0x98, 0xa8, 0xa0, 0x90, 0x84, 0x00, 0xff, 0xa9, 0x9c, - 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, 0xa9, 0x9c, 0x91, 0x8c, 0x00, 0xff, - 0x08, 0x0c, 0x28, 0x73, 0x15, 0x40, 0x00, 0xb6, 0x08, 0x0c, 0x67, 0x24, - 0x2b, 0x00, 0x00, 0xbe, 0x15, 0x10, 0x60, 0x12, 0x60, 0x23, 0x00, 0x01, - 0x20, 0x09, 0x00, 0x40, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x35, 0x01, 0x10, 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0x05, 0xa8, 0x7b, 0x01, 0x01, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x00, 0x05, 0xa8, 0x7b, 0x00, 0x2c, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, - 0x00, 0x05, 0xa8, 0x7b, 0x00, 0x28, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x00, 0xb6, - 0x70, 0x07, 0x00, 0x01, 0xaa, 0x74, 0x92, 0x82, 0x00, 0x04, 0x1a, 0x04, - 0x80, 0x47, 0xa9, 0x7c, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, - 0xb8, 0x04, 0xd2, 0x84, 0x01, 0x40, 0x05, 0xe8, 0x80, 0x07, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x84, 0x00, 0x06, 0x11, 0x08, 0x04, 0xb0, 0x2b, 0x10, - 0x08, 0x0c, 0xb2, 0x7d, 0x11, 0x18, 0x08, 0x0c, 0xb3, 0x25, 0x05, 0xa8, - 0x62, 0x12, 0xa8, 0x74, 0x00, 0x02, 0x80, 0x25, 0x80, 0x2a, 0x80, 0x2d, - 0x80, 0x33, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, 0xeb, 0xa1, 0x00, 0x60, - 0x08, 0x0c, 0xeb, 0x38, 0x00, 0x48, 0x20, 0x19, 0x00, 0x02, 0xa9, 0x80, - 0x08, 0x0c, 0xeb, 0x53, 0x00, 0x18, 0xa9, 0x80, 0x08, 0x0c, 0xeb, 0x38, - 0x08, 0x0c, 0xb2, 0xd3, 0xa8, 0x87, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0xa8, 0x87, - 0x00, 0x06, 0x0c, 0x80, 0xa8, 0x87, 0x00, 0x02, 0x0c, 0x68, 0xa8, 0x87, - 0x00, 0x05, 0x0c, 0x50, 0xa8, 0x87, 0x00, 0x04, 0x0c, 0x38, 0xa8, 0x87, - 0x00, 0x07, 0x0c, 0x20, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x80, 0x58, - 0x00, 0x06, 0x00, 0x16, 0x20, 0x01, 0x80, 0x03, 0x00, 0x06, 0x08, 0x04, - 0x0d, 0xce, 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x00, 0x05, - 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x20, 0x01, 0x02, 0x00, - 0x20, 0x0c, 0xc1, 0xe5, 0xc1, 0xdc, 0x21, 0x02, 0x20, 0x09, 0x02, 0x18, - 0x21, 0x0c, 0xd1, 0xec, 0x11, 0x20, 0x08, 0x0c, 0x15, 0xa0, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x78, 0x1f, - 0x03, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x78, 0x1c, 0xd0, 0x8c, 0x09, 0x04, - 0x80, 0xd8, 0x68, 0xc0, 0x90, 0xaa, 0x00, 0x05, 0x0a, 0x04, 0x87, 0x1c, - 0x7d, 0x44, 0x7c, 0x40, 0x95, 0x84, 0x00, 0xf6, 0x15, 0x10, 0x94, 0x84, - 0x70, 0x00, 0x01, 0x40, 0x90, 0x8a, 0x20, 0x00, 0x12, 0x60, 0x95, 0x84, - 0x07, 0x00, 0x80, 0x07, 0x08, 0x04, 0x80, 0xdf, 0x70, 0x00, 0x90, 0x84, - 0xff, 0x00, 0x90, 0x86, 0x81, 0x00, 0x0d, 0xa8, 0x00, 0xb0, 0x94, 0x84, - 0x0f, 0xff, 0x11, 0x30, 0x70, 0x00, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, - 0x81, 0x00, 0x11, 0xc0, 0x08, 0x0c, 0xf0, 0x57, 0x08, 0x0c, 0x86, 0x01, - 0x78, 0x17, 0x01, 0x40, 0x00, 0xa8, 0x95, 0x84, 0x00, 0x76, 0x11, 0x18, - 0x08, 0x0c, 0x86, 0x5f, 0x19, 0xc0, 0xd5, 0xa4, 0x01, 0x48, 0x00, 0x46, - 0x00, 0x56, 0x08, 0x0c, 0x81, 0x3a, 0x08, 0x0c, 0x23, 0x6e, 0x00, 0x5e, - 0x00, 0x4e, 0x00, 0x20, 0x08, 0x0c, 0xf0, 0x57, 0x78, 0x17, 0x01, 0x40, - 0x08, 0x0c, 0x76, 0x37, 0x01, 0x68, 0x20, 0x01, 0x01, 0x11, 0x20, 0x04, - 0xd0, 0x8c, 0x01, 0x40, 0x68, 0x93, 0x00, 0x00, 0x20, 0x01, 0x01, 0x10, - 0x20, 0x03, 0x00, 0x08, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x81, 0x1b, - 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x00, 0x02, 0x80, 0xf1, 0x84, 0x09, 0x80, 0xe8, 0x80, 0xe8, - 0x80, 0xe8, 0x80, 0xe8, 0x80, 0xe8, 0x80, 0xe8, 0x78, 0x17, 0x01, 0x40, - 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x70, 0x00, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x94, 0xf0, 0x00, - 0x81, 0x0f, 0x94, 0x84, 0x0f, 0xff, 0x68, 0x92, 0x92, 0x86, 0x20, 0x00, - 0x11, 0x50, 0x68, 0x00, 0x90, 0x86, 0x00, 0x01, 0x11, 0x18, 0x08, 0x0c, - 0x58, 0x3f, 0x00, 0x70, 0x08, 0x0c, 0x81, 0x5a, 0x00, 0x58, 0x92, 0x86, - 0x30, 0x00, 0x11, 0x18, 0x08, 0x0c, 0x83, 0x41, 0x00, 0x28, 0x92, 0x86, - 0x80, 0x00, 0x11, 0x10, 0x08, 0x0c, 0x85, 0x28, 0x78, 0x17, 0x01, 0x40, - 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x78, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x48, - 0x00, 0x26, 0x00, 0x36, 0x20, 0x11, 0x80, 0x48, 0x25, 0x18, 0x08, 0x0c, - 0x4c, 0x44, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x36, 0x00, 0x46, - 0x00, 0x56, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x20, 0x19, 0xff, 0xfe, - 0x7c, 0x30, 0x00, 0x50, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0xf6, - 0x20, 0x79, 0x02, 0x00, 0x7d, 0x44, 0x7c, 0x40, 0x20, 0x19, 0xff, 0xff, - 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x60, 0x20, 0x01, - 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, 0x00, 0x26, - 0x20, 0x11, 0x80, 0x48, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x2e, 0x00, 0xfe, - 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, - 0x70, 0x10, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x96, 0x00, 0x01, - 0x01, 0x20, 0x90, 0x96, 0x00, 0x23, 0x19, 0x04, 0x83, 0x12, 0x91, 0x86, - 0x00, 0x23, 0x15, 0xc0, 0x08, 0x0c, 0x85, 0xc6, 0x09, 0x04, 0x83, 0x12, - 0x61, 0x20, 0x91, 0x86, 0x00, 0x01, 0x01, 0x50, 0x91, 0x86, 0x00, 0x04, - 0x01, 0x38, 0x91, 0x86, 0x00, 0x08, 0x01, 0x20, 0x91, 0x86, 0x00, 0x0a, - 0x19, 0x04, 0x83, 0x12, 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, 0x90, 0x8e, - 0x02, 0x00, 0x11, 0x30, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0xb3, 0x52, - 0x08, 0x04, 0x83, 0x12, 0x90, 0x8e, 0x02, 0x14, 0x01, 0x18, 0x90, 0x8e, - 0x02, 0x10, 0x11, 0x30, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0xb3, 0x52, - 0x08, 0x04, 0x83, 0x12, 0x90, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x83, 0x12, - 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x16, - 0x08, 0x0c, 0xb3, 0x52, 0x08, 0x04, 0x83, 0x12, 0x91, 0x86, 0x00, 0x22, - 0x19, 0x04, 0x83, 0x12, 0x70, 0x30, 0x90, 0x8e, 0x03, 0x00, 0x15, 0x80, - 0x68, 0xdc, 0xd0, 0xa4, 0x05, 0x28, 0xc0, 0xb5, 0x68, 0xde, 0x71, 0x00, - 0x91, 0x8c, 0x00, 0xff, 0x69, 0x7e, 0x70, 0x04, 0x68, 0x82, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x79, 0xe6, 0x78, 0xea, 0x00, 0x06, 0x90, 0x84, - 0x00, 0xff, 0x00, 0x16, 0x20, 0x08, 0x08, 0x0c, 0x28, 0xbc, 0x79, 0x32, - 0x79, 0x36, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xfe, 0x08, 0x0c, 0x28, 0x73, - 0x69, 0x5e, 0x70, 0x3c, 0x00, 0xe6, 0x20, 0x71, 0x01, 0x40, 0x70, 0x86, - 0x20, 0x71, 0x18, 0x00, 0x70, 0xb6, 0x00, 0xee, 0x70, 0x34, 0x90, 0x05, - 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x17, 0x08, 0x04, 0x82, 0xc2, - 0x90, 0x8e, 0x04, 0x00, 0x11, 0x90, 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, - 0x83, 0x12, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x20, 0x20, 0x09, 0x00, 0x1d, - 0x08, 0x04, 0x82, 0xc2, 0x68, 0xdc, 0xc0, 0xa5, 0x68, 0xde, 0x20, 0x09, - 0x00, 0x30, 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x05, 0x00, 0x11, 0x40, - 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x18, - 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x20, 0x10, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x19, 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x21, 0x10, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x1a, 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x52, 0x00, - 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, - 0x00, 0x1b, 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x50, 0x00, 0x11, 0x40, - 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x1c, - 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x13, 0x00, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x34, 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8e, 0x12, 0x00, 0x11, 0x40, - 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x24, - 0x08, 0x04, 0x82, 0xc2, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, 0x24, 0x00, - 0x11, 0x70, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, - 0xd0, 0x9c, 0x09, 0x04, 0x82, 0xc2, 0x08, 0x0c, 0xdf, 0x1a, 0x19, 0x04, - 0x83, 0x12, 0x08, 0x04, 0x82, 0xc0, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, - 0x53, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x2a, 0x08, 0x04, 0x82, 0xc2, - 0x90, 0x8e, 0x0f, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x20, 0x08, 0x04, - 0x82, 0xc2, 0x90, 0x8e, 0x61, 0x04, 0x15, 0x30, 0x20, 0x29, 0x02, 0x05, - 0x20, 0x11, 0x02, 0x6d, 0x82, 0x08, 0x22, 0x04, 0x90, 0x82, 0x00, 0x04, - 0x80, 0x04, 0x80, 0x04, 0x20, 0xa8, 0x20, 0x11, 0x80, 0x15, 0x21, 0x1c, - 0x81, 0x08, 0x00, 0x46, 0x21, 0x24, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x4e, - 0x81, 0x08, 0x0f, 0x04, 0x82, 0x76, 0x91, 0x86, 0x02, 0x80, 0x1d, 0x88, - 0x25, 0x04, 0x80, 0x00, 0x20, 0x2a, 0x20, 0x09, 0x02, 0x60, 0x0c, 0x58, - 0x20, 0x2b, 0x00, 0x00, 0x20, 0x09, 0x00, 0x23, 0x08, 0x04, 0x82, 0xc2, - 0x90, 0x8e, 0x60, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x3f, 0x08, 0x04, - 0x82, 0xc2, 0x90, 0x8e, 0x54, 0x00, 0x11, 0x38, 0x08, 0x0c, 0x86, 0xcc, - 0x19, 0x04, 0x83, 0x12, 0x20, 0x09, 0x00, 0x46, 0x04, 0xa8, 0x90, 0x8e, - 0x55, 0x00, 0x11, 0x48, 0x08, 0x0c, 0x86, 0xf4, 0x11, 0x18, 0x20, 0x09, - 0x00, 0x41, 0x04, 0x60, 0x20, 0x09, 0x00, 0x42, 0x04, 0x48, 0x90, 0x8e, - 0x78, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x45, 0x04, 0x18, 0x90, 0x8e, - 0x10, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x4e, 0x00, 0xe8, 0x90, 0x8e, - 0x63, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x4a, 0x00, 0xb8, 0x90, 0x8c, - 0xff, 0x00, 0x91, 0x8e, 0x56, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x4f, - 0x00, 0x78, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, 0x57, 0x00, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x50, 0x00, 0x38, 0x20, 0x09, 0x00, 0x1d, 0x68, 0x38, - 0xd0, 0xd4, 0x01, 0x10, 0x20, 0x09, 0x00, 0x4c, 0x00, 0x16, 0x20, 0x11, - 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x73, - 0x19, 0x04, 0x83, 0x15, 0x08, 0x0c, 0x66, 0xb9, 0x19, 0x04, 0x83, 0x15, - 0xbe, 0x12, 0xbd, 0x16, 0x00, 0x1e, 0x00, 0x16, 0x08, 0x0c, 0x76, 0x37, - 0x01, 0xc0, 0x68, 0xdc, 0xd0, 0x8c, 0x11, 0x48, 0x70, 0x00, 0x90, 0x84, - 0x00, 0xff, 0x11, 0x88, 0x70, 0x04, 0x90, 0x84, 0xff, 0x00, 0x11, 0x68, - 0x00, 0x40, 0x68, 0x7c, 0x96, 0x06, 0x11, 0x48, 0x68, 0x80, 0x95, 0x06, - 0x90, 0x84, 0xff, 0x00, 0x11, 0x20, 0x95, 0x84, 0x00, 0xff, 0xb8, 0xc2, - 0x00, 0x80, 0xb8, 0xc0, 0x90, 0x05, 0x11, 0x68, 0x91, 0x86, 0x00, 0x46, - 0x11, 0x50, 0x68, 0x7c, 0x96, 0x06, 0x11, 0x38, 0x68, 0x80, 0x95, 0x06, - 0x90, 0x84, 0xff, 0x00, 0x11, 0x10, 0x00, 0x1e, 0x00, 0x98, 0x08, 0x0c, - 0xb2, 0x7d, 0x01, 0xa8, 0x2b, 0x08, 0x61, 0x12, 0x60, 0x23, 0x00, 0x04, - 0x71, 0x20, 0x61, 0x0a, 0x00, 0x1e, 0x91, 0x86, 0x00, 0x4c, 0x11, 0x10, - 0x60, 0x23, 0x00, 0x0a, 0x00, 0x16, 0x00, 0x1e, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x1e, 0x0c, 0xd8, 0x20, 0x01, - 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, 0x20, 0x11, 0x80, 0x49, - 0x08, 0x0c, 0x4c, 0x44, 0x08, 0x0c, 0xb3, 0x25, 0x0d, 0x90, 0x2b, 0x08, - 0x61, 0x12, 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x00, 0x1e, - 0x00, 0x16, 0x91, 0x86, 0x00, 0x17, 0x01, 0x18, 0x91, 0x86, 0x00, 0x30, - 0x11, 0x28, 0x60, 0x07, 0x00, 0x09, 0x60, 0x17, 0x29, 0x00, 0x00, 0x20, - 0x60, 0x07, 0x00, 0x51, 0x60, 0x17, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0xa0, 0x08, 0x0c, - 0x87, 0x3b, 0x11, 0x58, 0x08, 0x0c, 0x33, 0x74, 0x11, 0x40, 0x70, 0x10, - 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x8e, 0x00, 0x08, 0x11, 0x08, - 0x00, 0x09, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x46, 0x70, 0x00, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x33, 0x11, 0xe8, - 0x08, 0x0c, 0x85, 0xc6, 0x09, 0x04, 0x83, 0xa1, 0x71, 0x24, 0x61, 0x0a, - 0x70, 0x30, 0x90, 0x8e, 0x02, 0x00, 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, - 0x15, 0xd0, 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0xb3, 0x52, 0x04, 0xa8, - 0x90, 0x8e, 0x01, 0x00, 0x15, 0x90, 0x70, 0x34, 0x90, 0x05, 0x15, 0x78, - 0x20, 0x09, 0x00, 0x16, 0x08, 0x0c, 0xb3, 0x52, 0x04, 0x50, 0x91, 0x86, - 0x00, 0x32, 0x15, 0x38, 0x70, 0x30, 0x90, 0x8e, 0x14, 0x00, 0x15, 0x18, - 0x20, 0x09, 0x00, 0x38, 0x00, 0x16, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x73, 0x11, 0xb8, 0x08, 0x0c, - 0x66, 0xb9, 0x11, 0xa0, 0xbe, 0x12, 0xbd, 0x16, 0x08, 0x0c, 0xb2, 0x7d, - 0x01, 0x78, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, - 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x00, 0x1e, 0x08, 0x0c, 0xb3, 0x52, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x10, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x4e, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x46, 0x00, 0xe6, - 0x00, 0xd6, 0x20, 0x28, 0x21, 0x30, 0x96, 0x96, 0x00, 0xff, 0x11, 0xb8, - 0x95, 0x92, 0xff, 0xfc, 0x02, 0xa0, 0x95, 0x96, 0xff, 0xfd, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x7f, 0x08, 0x04, 0x84, 0x03, 0x95, 0x96, 0xff, 0xfe, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x7e, 0x08, 0x04, 0x84, 0x03, 0x95, 0x96, - 0xff, 0xfc, 0x11, 0x18, 0x20, 0x09, 0x00, 0x80, 0x04, 0xf0, 0x20, 0x11, - 0x00, 0x00, 0x20, 0x19, 0x18, 0x37, 0x23, 0x1c, 0xd3, 0xac, 0x01, 0x30, - 0x90, 0x26, 0x20, 0xa9, 0x08, 0x00, 0x20, 0x71, 0x10, 0x00, 0x00, 0x30, - 0x20, 0x21, 0x00, 0x81, 0x20, 0xa9, 0x07, 0x7f, 0x20, 0x71, 0x10, 0x81, - 0x2e, 0x1c, 0x93, 0xdd, 0x00, 0x00, 0x11, 0x40, 0x82, 0xff, 0x11, 0xd0, - 0x94, 0x96, 0x00, 0xff, 0x01, 0xb8, 0x24, 0x10, 0xc2, 0xfd, 0x00, 0xa0, - 0xbf, 0x10, 0x26, 0x00, 0x97, 0x06, 0xb8, 0x14, 0x11, 0x20, 0x95, 0x46, - 0x11, 0x10, 0x24, 0x08, 0x00, 0xb0, 0x97, 0x45, 0x11, 0x48, 0x94, 0xc6, - 0x00, 0x7e, 0x01, 0x30, 0x94, 0xc6, 0x00, 0x7f, 0x01, 0x18, 0x94, 0xc6, - 0x00, 0x80, 0x1d, 0x20, 0x84, 0x20, 0x8e, 0x70, 0x1f, 0x04, 0x83, 0xd8, - 0x82, 0xff, 0x11, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x18, 0xc2, 0xfc, - 0x22, 0x08, 0x90, 0x06, 0x00, 0xde, 0x00, 0xee, 0x00, 0x4e, 0x00, 0xbe, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x37, 0x20, 0x0c, 0x91, 0x84, 0x00, 0x80, - 0x01, 0x10, 0xd1, 0x8c, 0x01, 0x38, 0x70, 0x00, 0x90, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0x91, 0x84, 0x00, 0x0f, 0x00, 0x4a, 0x78, 0x17, 0x01, 0x40, - 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x84, 0x31, 0x84, 0x31, 0x84, 0x31, 0x85, 0xd8, 0x84, 0x31, - 0x84, 0x3a, 0x84, 0x65, 0x84, 0xf3, 0x84, 0x31, 0x84, 0x31, 0x84, 0x31, - 0x84, 0x31, 0x84, 0x31, 0x84, 0x31, 0x84, 0x31, 0x84, 0x31, 0x78, 0x17, - 0x01, 0x40, 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x00, 0xb6, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0xe8, - 0x71, 0x20, 0x21, 0x60, 0x9c, 0x8c, 0x00, 0x07, 0x11, 0xc0, 0x9c, 0x8a, - 0x1c, 0xd0, 0x02, 0xa8, 0x68, 0x68, 0x9c, 0x02, 0x12, 0x90, 0x70, 0x08, - 0x90, 0x84, 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x10, 0x91, 0x06, - 0x11, 0x50, 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, 0x11, 0x30, 0x71, 0x24, - 0x61, 0x0a, 0x20, 0x09, 0x00, 0x46, 0x08, 0x0c, 0xb3, 0x52, 0x78, 0x17, - 0x01, 0x40, 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, - 0x9a, 0xb1, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x94, 0x84, - 0x0f, 0xff, 0x09, 0x04, 0x84, 0xc9, 0x71, 0x10, 0xd1, 0xbc, 0x19, 0x04, - 0x84, 0xc9, 0x71, 0x08, 0x70, 0x0c, 0x20, 0x28, 0x91, 0x8c, 0x00, 0xff, - 0x21, 0x30, 0x90, 0x94, 0xff, 0x00, 0x15, 0xb0, 0x81, 0xff, 0x15, 0xa0, - 0x90, 0x80, 0x33, 0xb6, 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x20, 0x01, 0x00, 0x80, 0x91, 0x06, 0x09, 0x04, 0x84, 0xc9, 0x08, 0x0c, - 0x66, 0xb9, 0x19, 0x04, 0x84, 0xc9, 0xbe, 0x12, 0xbd, 0x16, 0xb8, 0x00, - 0xd0, 0xec, 0x15, 0xd8, 0xba, 0x04, 0x92, 0x94, 0xff, 0x00, 0x92, 0x86, - 0x06, 0x00, 0x11, 0xa0, 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0xe8, 0x2b, 0x08, - 0x70, 0x28, 0x60, 0x46, 0x70, 0x2c, 0x60, 0x4a, 0x61, 0x12, 0x60, 0x23, - 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x56, 0x20, 0x09, - 0x00, 0x44, 0x08, 0x0c, 0xe1, 0x92, 0x04, 0x08, 0x08, 0x0c, 0x6a, 0xa3, - 0x11, 0x38, 0xb8, 0x07, 0x06, 0x06, 0x0c, 0x30, 0x19, 0x0c, 0x83, 0xa5, - 0x11, 0xc0, 0x08, 0x98, 0x08, 0x0c, 0xb2, 0x7d, 0x2b, 0x08, 0x01, 0x98, - 0x61, 0x12, 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x92, 0x86, - 0x04, 0x00, 0x11, 0x18, 0x60, 0x07, 0x00, 0x05, 0x00, 0x10, 0x60, 0x07, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x78, 0x17, 0x01, 0x40, 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, - 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, 0x20, 0x11, - 0x80, 0x49, 0x08, 0x0c, 0x4c, 0x44, 0x08, 0x0c, 0xb3, 0x25, 0x0d, 0x48, - 0x2b, 0x08, 0x61, 0x12, 0x60, 0x23, 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, - 0x71, 0x30, 0x61, 0x56, 0x60, 0x17, 0xf3, 0x00, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, - 0x08, 0xb0, 0x00, 0xb6, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0xe8, 0x70, 0x20, - 0x20, 0x60, 0x9c, 0x84, 0x00, 0x07, 0x11, 0xc0, 0x9c, 0x82, 0x1c, 0xd0, - 0x02, 0xa8, 0x68, 0x68, 0x9c, 0x02, 0x12, 0x90, 0x70, 0x08, 0x90, 0x84, - 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x10, 0x91, 0x06, 0x11, 0x50, - 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, 0x11, 0x30, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x45, 0x08, 0x0c, 0xb3, 0x52, 0x78, 0x17, 0x01, 0x40, - 0x20, 0x01, 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, - 0x00, 0xbe, 0x00, 0x05, 0x61, 0x20, 0x91, 0x86, 0x00, 0x02, 0x01, 0x28, - 0x91, 0x86, 0x00, 0x05, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x87, 0x3b, 0x11, 0x80, 0x08, 0x0c, 0x33, 0x74, 0x11, 0x68, - 0x70, 0x10, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, 0x00, 0x00, - 0x11, 0x30, 0x91, 0x84, 0x00, 0x0f, 0x90, 0x8a, 0x00, 0x06, 0x12, 0x08, - 0x00, 0x0b, 0x00, 0x05, 0x85, 0x42, 0x85, 0x43, 0x85, 0x42, 0x85, 0x42, - 0x85, 0xa8, 0x85, 0xb7, 0x00, 0x05, 0x00, 0xb6, 0x70, 0x0c, 0x71, 0x08, - 0x08, 0x0c, 0x28, 0x73, 0x19, 0x04, 0x85, 0xa6, 0x08, 0x0c, 0x66, 0xb9, - 0x19, 0x04, 0x85, 0xa6, 0xbe, 0x12, 0xbd, 0x16, 0x71, 0x10, 0xd1, 0xbc, - 0x05, 0x40, 0x70, 0x2c, 0xd0, 0x84, 0x11, 0x20, 0xb8, 0x00, 0xd0, 0xbc, - 0x19, 0x04, 0x85, 0xa6, 0x08, 0x0c, 0x6a, 0xa3, 0x01, 0x48, 0x90, 0x86, - 0x00, 0x04, 0x01, 0x30, 0x08, 0x0c, 0x6a, 0xab, 0x01, 0x18, 0x90, 0x86, - 0x00, 0x04, 0x15, 0x88, 0x00, 0xc6, 0x08, 0x0c, 0x85, 0xc6, 0x00, 0xce, - 0x05, 0xd8, 0x08, 0x0c, 0xb2, 0x7d, 0x2b, 0x08, 0x05, 0xb8, 0x61, 0x12, - 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x02, 0x71, 0x20, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x88, 0x08, 0x0c, 0xb3, 0x52, 0x04, 0x58, 0x08, 0x0c, - 0x6a, 0xa3, 0x01, 0x48, 0x90, 0x86, 0x00, 0x04, 0x01, 0x30, 0x08, 0x0c, - 0x6a, 0xab, 0x01, 0x18, 0x90, 0x86, 0x00, 0x04, 0x11, 0x80, 0x08, 0x0c, - 0xb2, 0x7d, 0x2b, 0x08, 0x01, 0xd8, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, - 0x60, 0x23, 0x00, 0x05, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x88, - 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x78, 0x08, 0x0c, 0xb2, 0x7d, 0x2b, 0x08, - 0x01, 0x58, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x04, - 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0xbe, 0x00, 0x05, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0x58, 0x00, 0xd1, - 0x01, 0x48, 0x08, 0x0c, 0x85, 0x1e, 0x11, 0x30, 0x71, 0x24, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x89, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x05, 0x71, 0x10, - 0xd1, 0xbc, 0x01, 0x58, 0x00, 0x59, 0x01, 0x48, 0x08, 0x0c, 0x85, 0x1e, - 0x11, 0x30, 0x71, 0x24, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x8a, 0x08, 0x0c, - 0xb3, 0x52, 0x00, 0x05, 0x70, 0x20, 0x20, 0x60, 0x9c, 0x84, 0x00, 0x07, - 0x11, 0x58, 0x9c, 0x82, 0x1c, 0xd0, 0x02, 0x40, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x9c, 0x02, 0x12, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x90, 0x06, 0x0c, 0xe8, 0x00, 0xb6, 0x71, 0x10, 0xd1, 0xbc, 0x11, 0xd8, - 0x70, 0x24, 0x20, 0x60, 0x9c, 0x84, 0x00, 0x07, 0x11, 0xb0, 0x9c, 0x82, - 0x1c, 0xd0, 0x02, 0x98, 0x68, 0x68, 0x9c, 0x02, 0x12, 0x80, 0x70, 0x08, - 0x90, 0x84, 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x10, 0x91, 0x06, - 0x11, 0x40, 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x51, 0x08, 0x0c, 0xb3, 0x52, 0x78, 0x17, 0x01, 0x40, 0x20, 0x01, - 0x19, 0xf1, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x9a, 0xb1, 0x00, 0xbe, - 0x00, 0x05, 0x20, 0x31, 0x01, 0x05, 0x00, 0x69, 0x00, 0x05, 0x20, 0x31, - 0x02, 0x06, 0x00, 0x49, 0x00, 0x05, 0x20, 0x31, 0x02, 0x07, 0x00, 0x29, - 0x00, 0x05, 0x20, 0x31, 0x02, 0x13, 0x00, 0x09, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0x96, 0x00, 0xf6, 0x70, 0x00, 0x90, 0x84, 0xf0, 0x00, 0x90, 0x86, - 0xc0, 0x00, 0x05, 0xd0, 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0xb8, 0x00, 0x66, - 0x00, 0xc6, 0x00, 0x46, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, - 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x73, 0x15, 0xa0, 0x08, 0x0c, 0x66, 0xb9, - 0x15, 0x88, 0xbe, 0x12, 0xbd, 0x16, 0x2b, 0x00, 0x00, 0x4e, 0x00, 0xce, - 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x08, 0x0c, 0x10, 0x0e, 0x05, 0x10, - 0x29, 0x00, 0x60, 0x5a, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x66, 0xac, 0x6a, - 0xa8, 0x5c, 0x90, 0xf8, 0x00, 0x1b, 0x20, 0xa9, 0x00, 0x0e, 0xa8, 0x60, - 0x20, 0xe8, 0x20, 0xe1, 0x00, 0x00, 0x2f, 0xa0, 0x2e, 0x98, 0x40, 0x03, - 0x00, 0x6e, 0x66, 0x16, 0x60, 0x07, 0x00, 0x3e, 0x60, 0x23, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xce, 0x00, 0x05, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0x6e, 0x0c, 0xc0, 0x00, 0x4e, 0x00, 0xce, 0x0c, 0xc8, 0x00, 0xc6, - 0x70, 0x00, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x84, 0xf0, 0x00, 0x81, 0x0f, - 0x90, 0x86, 0x20, 0x00, 0x19, 0x04, 0x86, 0xb6, 0x91, 0x86, 0x00, 0x22, - 0x15, 0xf0, 0x20, 0x01, 0x01, 0x11, 0x20, 0x04, 0x90, 0x05, 0x19, 0x04, - 0x86, 0xb8, 0x70, 0x30, 0x90, 0x8e, 0x04, 0x00, 0x09, 0x04, 0x86, 0xb8, - 0x90, 0x8e, 0x60, 0x00, 0x05, 0xe8, 0x90, 0x8e, 0x54, 0x00, 0x05, 0xd0, - 0x90, 0x8e, 0x03, 0x00, 0x11, 0xd8, 0x20, 0x09, 0x18, 0x37, 0x21, 0x0c, - 0xd1, 0x8c, 0x15, 0x90, 0xd1, 0xa4, 0x15, 0x80, 0x08, 0x0c, 0x6a, 0x61, - 0x05, 0x88, 0x68, 0xb0, 0x90, 0x84, 0x00, 0xff, 0x71, 0x00, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x06, 0x15, 0x18, 0x68, 0x80, 0x69, 0xb0, 0x91, 0x8c, - 0xff, 0x00, 0x91, 0x05, 0x71, 0x04, 0x91, 0x06, 0x11, 0xd8, 0x00, 0xe0, - 0x20, 0x09, 0x01, 0x03, 0x21, 0x0c, 0xd1, 0xb4, 0x11, 0xa8, 0x90, 0x8e, - 0x52, 0x00, 0x09, 0xe8, 0x90, 0x8e, 0x05, 0x00, 0x09, 0xd0, 0x90, 0x8e, - 0x50, 0x00, 0x09, 0xb8, 0x00, 0x58, 0x91, 0x86, 0x00, 0x23, 0x11, 0x40, - 0x08, 0x0c, 0x85, 0xc6, 0x01, 0x28, 0x60, 0x04, 0x90, 0x86, 0x00, 0x02, - 0x01, 0x18, 0x00, 0x00, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, - 0x00, 0xce, 0x00, 0x05, 0x70, 0x30, 0x90, 0x8e, 0x03, 0x00, 0x01, 0x18, - 0x90, 0x8e, 0x52, 0x00, 0x1d, 0x98, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x0d, 0x68, 0x0c, 0x50, - 0x01, 0x56, 0x00, 0x46, 0x00, 0x16, 0x00, 0x36, 0x70, 0x38, 0x20, 0x20, - 0x84, 0x27, 0x94, 0xa4, 0x00, 0x07, 0xd4, 0x84, 0x01, 0x48, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, 0x02, 0x7a, 0x08, 0x0c, - 0xc3, 0x65, 0x11, 0x78, 0xd4, 0x8c, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x19, 0x18, 0x01, 0x20, 0x11, 0x02, 0x7e, 0x08, 0x0c, 0xc3, 0x65, - 0x11, 0x20, 0xd4, 0x94, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x3e, - 0x00, 0x1e, 0x00, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x46, - 0x00, 0x16, 0x00, 0x36, 0x70, 0x38, 0x20, 0x20, 0x84, 0x27, 0x94, 0xa4, - 0x00, 0x07, 0xd4, 0x84, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, - 0x18, 0x05, 0x20, 0x11, 0x02, 0x72, 0x08, 0x0c, 0xc3, 0x65, 0x11, 0x78, - 0xd4, 0x8c, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x18, 0x01, - 0x20, 0x11, 0x02, 0x76, 0x08, 0x0c, 0xc3, 0x65, 0x11, 0x20, 0xd4, 0x94, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x4e, - 0x01, 0x5e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x78, 0x00, - 0xc0, 0xe5, 0xc0, 0xcc, 0x78, 0x02, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x18, 0x00, 0x78, 0x34, 0xd0, 0x84, 0x11, 0x30, 0x20, 0x79, - 0x02, 0x00, 0x78, 0x00, 0x90, 0x85, 0x12, 0x00, 0x78, 0x02, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x34, 0xc0, 0x84, - 0x70, 0x36, 0x00, 0xee, 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x0c, 0x91, 0x84, 0x00, 0x80, 0x01, 0x18, 0xd1, 0x8c, 0x01, 0x18, - 0x90, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xd8, - 0x20, 0x71, 0x19, 0xfb, 0x70, 0x03, 0x00, 0x03, 0x70, 0x0f, 0x03, 0x61, - 0x90, 0x06, 0x70, 0x1a, 0x70, 0x7a, 0x70, 0x12, 0x70, 0x17, 0x1c, 0xd0, - 0x70, 0x07, 0x00, 0x00, 0x70, 0x26, 0x70, 0x2b, 0xa6, 0xff, 0x70, 0x32, - 0x70, 0x3a, 0x70, 0x3f, 0x00, 0x64, 0x70, 0x37, 0xa7, 0x67, 0x70, 0x47, - 0xff, 0xff, 0x70, 0x4a, 0x70, 0x4f, 0x56, 0x67, 0x70, 0x52, 0x70, 0x63, - 0x88, 0xde, 0x08, 0x0c, 0x10, 0x27, 0x09, 0x0c, 0x0d, 0xc5, 0x29, 0x00, - 0x70, 0x42, 0xa8, 0x67, 0x00, 0x03, 0xa8, 0x6f, 0x01, 0x00, 0xa8, 0xab, - 0xdc, 0xb0, 0x00, 0x05, 0x20, 0x71, 0x19, 0xfb, 0x1d, 0x04, 0x88, 0x2c, - 0x20, 0x91, 0x60, 0x00, 0x70, 0x0c, 0x80, 0x01, 0x70, 0x0e, 0x15, 0x40, - 0x20, 0x01, 0x01, 0x3c, 0x20, 0x04, 0x90, 0x05, 0x19, 0x0c, 0x89, 0x4c, - 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x58, 0x3a, 0x00, - 0xd0, 0x8c, 0x11, 0x40, 0x20, 0xd1, 0x00, 0x00, 0x20, 0xd1, 0x00, 0x01, - 0x20, 0xd1, 0x00, 0x00, 0x08, 0x0c, 0x0d, 0xc5, 0x70, 0x0f, 0x03, 0x61, - 0x70, 0x07, 0x00, 0x01, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x89, 0x23, 0x70, 0x48, 0x90, 0x0d, 0x01, 0x48, 0x81, 0x09, 0x71, 0x4a, - 0x11, 0x30, 0x70, 0x4c, 0x08, 0x0f, 0x00, 0x18, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x24, 0x90, 0x0d, 0x01, 0x88, 0x70, 0x20, 0x80, 0x01, - 0x70, 0x22, 0x11, 0x68, 0x70, 0x23, 0x00, 0x09, 0x81, 0x09, 0x71, 0x26, - 0x91, 0x86, 0x03, 0xe8, 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, 0x81, 0xff, - 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, 0x70, 0x30, 0x90, 0x0d, 0x05, 0xa8, - 0x70, 0x2c, 0x80, 0x01, 0x70, 0x2e, 0x15, 0x88, 0x00, 0x16, 0x20, 0x09, - 0x03, 0x06, 0x21, 0x0c, 0x91, 0x84, 0x00, 0x30, 0x01, 0xe8, 0x91, 0x84, - 0x00, 0x48, 0x90, 0x86, 0x00, 0x08, 0x11, 0xc0, 0x70, 0x38, 0x90, 0x05, - 0x01, 0xa8, 0x80, 0x01, 0x70, 0x3a, 0x11, 0x90, 0x08, 0x0c, 0x76, 0x37, - 0x01, 0x78, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x08, 0x0c, 0xa7, 0xf5, - 0x00, 0xee, 0x11, 0x40, 0x20, 0x09, 0x1a, 0x86, 0x21, 0x04, 0x80, 0x00, - 0x02, 0x08, 0x20, 0x0a, 0x00, 0x1e, 0x00, 0x68, 0x00, 0x1e, 0x70, 0x2f, - 0x00, 0x09, 0x81, 0x09, 0x71, 0x32, 0x01, 0x28, 0x91, 0x84, 0x00, 0x7f, - 0x09, 0x0c, 0xa8, 0xab, 0x00, 0x10, 0x70, 0x34, 0x08, 0x0f, 0x70, 0x44, - 0x90, 0x05, 0x01, 0x18, 0x03, 0x10, 0x80, 0x01, 0x70, 0x46, 0x70, 0x54, - 0x90, 0x0d, 0x01, 0x68, 0x70, 0x50, 0x80, 0x01, 0x70, 0x52, 0x11, 0x48, - 0x70, 0x53, 0x00, 0x09, 0x81, 0x09, 0x71, 0x56, 0x11, 0x20, 0x71, 0x58, - 0x71, 0x56, 0x70, 0x60, 0x08, 0x0f, 0x70, 0x18, 0x90, 0x0d, 0x01, 0xd8, - 0x00, 0x16, 0x70, 0x78, 0x90, 0x0d, 0x01, 0x58, 0x70, 0x74, 0x80, 0x01, - 0x70, 0x76, 0x11, 0x38, 0x70, 0x77, 0x00, 0x09, 0x81, 0x09, 0x71, 0x7a, - 0x11, 0x10, 0x70, 0x7c, 0x08, 0x0f, 0x00, 0x1e, 0x70, 0x08, 0x80, 0x01, - 0x70, 0x0a, 0x11, 0x38, 0x70, 0x0b, 0x00, 0x09, 0x81, 0x09, 0x71, 0x1a, - 0x11, 0x10, 0x70, 0x1c, 0x08, 0x0f, 0x01, 0x2e, 0x70, 0x04, 0x00, 0x02, - 0x88, 0x54, 0x88, 0x55, 0x88, 0x71, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xfb, - 0x70, 0x18, 0x90, 0x05, 0x11, 0x20, 0x71, 0x1a, 0x72, 0x1e, 0x70, 0x0b, - 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x20, 0x71, - 0x19, 0xfb, 0x70, 0x1c, 0x92, 0x06, 0x11, 0x20, 0x70, 0x1a, 0x70, 0x1e, - 0x70, 0x7a, 0x70, 0x7e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0xfb, 0xb8, 0x88, 0x91, 0x02, 0x02, 0x08, 0xb9, 0x8a, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb6, 0x71, 0x10, 0x08, 0x0c, - 0x67, 0x24, 0x11, 0x68, 0xb8, 0x88, 0x80, 0x01, 0x02, 0x50, 0xb8, 0x8a, - 0x11, 0x40, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x16, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x1e, 0x01, 0x2e, 0x81, 0x08, 0x91, 0x82, 0x08, 0x00, - 0x02, 0x18, 0x90, 0x0e, 0x70, 0x07, 0x00, 0x02, 0x71, 0x12, 0x00, 0xbe, - 0x00, 0x05, 0x70, 0x14, 0x20, 0x60, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x60, 0x40, 0x90, 0x05, 0x01, 0x28, 0x80, 0x01, 0x60, 0x42, 0x11, 0x10, - 0x08, 0x0c, 0xd3, 0xe5, 0x60, 0x18, 0x90, 0x05, 0x05, 0x58, 0x80, 0x01, - 0x60, 0x1a, 0x15, 0x40, 0x61, 0x20, 0x91, 0x86, 0x00, 0x03, 0x01, 0x48, - 0x91, 0x86, 0x00, 0x06, 0x01, 0x30, 0x91, 0x86, 0x00, 0x09, 0x11, 0xe0, - 0x61, 0x1c, 0xd1, 0xc4, 0x11, 0x00, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xb0, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x84, 0x90, 0x8a, 0x19, 0x9a, 0x02, 0x80, - 0x90, 0x82, 0x19, 0x99, 0xa8, 0x86, 0x90, 0x8a, 0x19, 0x9a, 0x02, 0x10, - 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, - 0x61, 0x1a, 0xa8, 0x7c, 0xd0, 0xe4, 0x01, 0x10, 0x08, 0x0c, 0xcd, 0xbc, - 0x01, 0x2e, 0x9c, 0x88, 0x00, 0x18, 0x71, 0x16, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x91, 0x02, 0x02, 0x20, 0x70, 0x17, 0x1c, 0xd0, 0x70, 0x07, - 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xfb, 0x70, 0x27, - 0x07, 0xd0, 0x70, 0x23, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, - 0x1a, 0x04, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0xfb, 0x71, 0x32, 0x70, 0x2f, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x11, 0x1a, 0x07, 0x20, 0x13, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0xfb, 0x71, 0x1a, 0x72, 0x1e, 0x70, 0x0b, 0x00, 0x09, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x86, 0x00, 0x26, 0x70, 0x5c, 0x80, 0x00, - 0x70, 0x5e, 0x20, 0x01, 0x1a, 0x0b, 0x20, 0x44, 0xa0, 0x6c, 0x90, 0x86, - 0x00, 0x00, 0x01, 0x50, 0x70, 0x70, 0xa0, 0x9a, 0x70, 0x6c, 0xa0, 0x96, - 0x70, 0x68, 0xa0, 0x92, 0x70, 0x64, 0xa0, 0x8e, 0x08, 0x0c, 0x10, 0xf8, - 0x00, 0x2e, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x96, - 0x00, 0xa6, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x01, 0x56, 0x08, 0x0c, 0x87, 0x76, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xfb, 0x71, 0x7a, - 0x72, 0x7e, 0x70, 0x77, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0x06, 0x20, 0x71, 0x19, 0xfb, 0x70, 0x7c, 0x92, 0x06, 0x11, 0x10, - 0x70, 0x7a, 0x70, 0x7e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x69, - 0x18, 0x00, 0x69, 0xe8, 0xd1, 0xe4, 0x15, 0x18, 0x00, 0x26, 0xd1, 0xec, - 0x01, 0x40, 0x6a, 0x54, 0x68, 0x74, 0x92, 0x02, 0x02, 0x88, 0x81, 0x17, - 0x92, 0x94, 0x00, 0xc0, 0x00, 0x88, 0x91, 0x84, 0x00, 0x07, 0x01, 0xa0, - 0x81, 0x09, 0x91, 0x84, 0x00, 0x07, 0x01, 0x10, 0x69, 0xea, 0x00, 0x70, - 0x81, 0x07, 0x90, 0x84, 0x00, 0x07, 0x91, 0x0d, 0x81, 0x07, 0x91, 0x06, - 0x90, 0x94, 0x00, 0xc0, 0x91, 0x84, 0xff, 0x3f, 0x92, 0x05, 0x68, 0xea, - 0x08, 0x0c, 0x0e, 0xee, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, - 0x20, 0x09, 0xff, 0xf4, 0x21, 0x0d, 0x20, 0x61, 0x01, 0x00, 0x60, 0xf0, - 0x91, 0x00, 0x60, 0xf3, 0x00, 0x00, 0x20, 0x09, 0xff, 0xf4, 0x20, 0x0f, - 0x12, 0x20, 0x81, 0x08, 0x21, 0x05, 0x80, 0x00, 0x20, 0x0f, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x74, 0x00, 0xce, - 0x00, 0x05, 0x91, 0x84, 0x00, 0x0f, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, - 0x90, 0x80, 0x1a, 0x74, 0x20, 0x60, 0x00, 0x05, 0xa8, 0x84, 0x90, 0x8a, - 0x19, 0x9a, 0x16, 0x38, 0x90, 0x05, 0x11, 0x50, 0x00, 0xc6, 0x20, 0x61, - 0x1a, 0x74, 0x60, 0x14, 0x00, 0xce, 0x90, 0x05, 0x11, 0x30, 0x20, 0x01, - 0x00, 0x1e, 0x00, 0x18, 0x90, 0x8e, 0xff, 0xff, 0x01, 0xb0, 0x80, 0x03, - 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x61, 0x1a, 0xa8, 0x7c, 0x90, 0x8c, - 0x00, 0xc0, 0x91, 0x8e, 0x00, 0xc0, 0x09, 0x04, 0x89, 0xfa, 0xd0, 0xb4, - 0x11, 0x68, 0xd0, 0xbc, 0x19, 0x04, 0x89, 0xd3, 0x20, 0x09, 0x00, 0x06, - 0x08, 0x0c, 0x8a, 0x27, 0x00, 0x05, 0x90, 0x0e, 0x0c, 0x60, 0x20, 0x01, - 0x19, 0x99, 0x08, 0xb0, 0xd0, 0xfc, 0x01, 0x60, 0x90, 0x8c, 0x00, 0x03, - 0x01, 0x20, 0x91, 0x8e, 0x00, 0x03, 0x19, 0x04, 0x8a, 0x21, 0x90, 0x8c, - 0x20, 0x20, 0x91, 0x8e, 0x20, 0x20, 0x01, 0xa8, 0x60, 0x24, 0xd0, 0xd4, - 0x11, 0xe8, 0x20, 0x09, 0x18, 0x69, 0x21, 0x04, 0xd0, 0x84, 0x11, 0x38, - 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, 0x00, 0x43, 0x08, 0x04, 0xb3, 0x52, - 0x00, 0x05, 0x87, 0xff, 0x1d, 0xe8, 0x20, 0x09, 0x00, 0x42, 0x08, 0x04, - 0xb3, 0x52, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, - 0xd1, 0xac, 0x0d, 0x20, 0x60, 0x24, 0xc0, 0xcd, 0x60, 0x26, 0x0c, 0x00, - 0xc0, 0xd4, 0x60, 0x26, 0xa8, 0x90, 0x60, 0x2e, 0xa8, 0x8c, 0x60, 0x32, - 0x08, 0xe0, 0xd0, 0xfc, 0x01, 0x60, 0x90, 0x8c, 0x00, 0x03, 0x01, 0x20, - 0x91, 0x8e, 0x00, 0x03, 0x19, 0x04, 0x8a, 0x21, 0x90, 0x8c, 0x20, 0x20, - 0x91, 0x8e, 0x20, 0x20, 0x01, 0x70, 0x00, 0x76, 0x00, 0xf6, 0x2c, 0x78, - 0x08, 0x0c, 0x17, 0x68, 0x00, 0xfe, 0x00, 0x7e, 0x87, 0xff, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x42, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x05, 0x61, 0x10, - 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xac, 0x0d, 0x58, - 0x61, 0x24, 0xc1, 0xcd, 0x61, 0x26, 0x0c, 0x38, 0xd0, 0xfc, 0x01, 0x88, - 0x90, 0x8c, 0x20, 0x20, 0x91, 0x8e, 0x20, 0x20, 0x01, 0xa8, 0x90, 0x84, - 0x00, 0x03, 0x90, 0x8e, 0x00, 0x02, 0x01, 0x48, 0x87, 0xff, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x05, 0x00, 0xb9, - 0x0c, 0xe8, 0x87, 0xff, 0x1d, 0xd8, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, - 0xb3, 0x52, 0x0c, 0xb0, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, - 0x00, 0xbe, 0xd1, 0xac, 0x0d, 0x20, 0x61, 0x24, 0xc1, 0xcd, 0x61, 0x26, - 0x0c, 0x00, 0x20, 0x09, 0x00, 0x04, 0x00, 0x19, 0x00, 0x05, 0x20, 0x09, - 0x00, 0x01, 0x00, 0x96, 0x08, 0x0c, 0xd0, 0xd8, 0x05, 0x18, 0x60, 0x14, - 0x20, 0x48, 0xa9, 0x82, 0xa8, 0x00, 0x60, 0x16, 0x91, 0x86, 0x00, 0x01, - 0x11, 0x88, 0xa9, 0x7c, 0x91, 0x8c, 0x81, 0x00, 0x91, 0x8e, 0x81, 0x00, - 0x11, 0x58, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x74, 0x62, 0x00, 0xd2, 0x8c, - 0x11, 0x20, 0x62, 0x04, 0x82, 0x10, 0x02, 0x08, 0x62, 0x06, 0x00, 0xce, - 0x08, 0x0c, 0x6c, 0xde, 0x60, 0x14, 0x90, 0x4d, 0x00, 0x76, 0x20, 0x39, - 0x00, 0x00, 0x19, 0x0c, 0x89, 0x70, 0x00, 0x7e, 0x00, 0x9e, 0x00, 0x05, - 0x01, 0x56, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x74, 0x60, 0x00, 0x81, 0xff, - 0x01, 0x10, 0x92, 0x05, 0x00, 0x08, 0x92, 0x04, 0x60, 0x02, 0x00, 0xce, - 0x01, 0x5e, 0x00, 0x05, 0x68, 0x00, 0xd0, 0x8c, 0x11, 0x38, 0x68, 0x08, - 0x90, 0x05, 0x01, 0x20, 0x80, 0x01, 0x68, 0x0a, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x20, 0x71, 0x19, 0x24, 0x70, 0x03, 0x00, 0x06, 0x70, 0x07, - 0x00, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x70, 0x13, 0x00, 0x01, 0x08, 0x0c, - 0x10, 0x27, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x67, 0x00, 0x06, 0xa8, 0x6b, - 0x00, 0x01, 0xa8, 0xab, 0xdc, 0xb0, 0xa8, 0x9f, 0x00, 0x00, 0x29, 0x00, - 0x70, 0x2e, 0x70, 0x33, 0x00, 0x00, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x96, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x70, 0x2c, - 0x20, 0x48, 0x6a, 0x2c, 0x72, 0x1e, 0x6b, 0x30, 0x73, 0x22, 0x68, 0x34, - 0x70, 0x26, 0xa8, 0x96, 0x68, 0x38, 0x70, 0x2a, 0xa8, 0x9a, 0x68, 0x24, - 0x70, 0x16, 0x68, 0x3c, 0x70, 0x1a, 0x20, 0x09, 0x00, 0x28, 0x20, 0x0a, - 0x90, 0x05, 0x01, 0x48, 0x90, 0x0e, 0x91, 0x88, 0x00, 0x0c, 0x80, 0x01, - 0x1d, 0xe0, 0x21, 0x00, 0x92, 0x10, 0x12, 0x08, 0x83, 0x18, 0xaa, 0x8e, - 0xab, 0x92, 0x70, 0x10, 0xd0, 0x84, 0x01, 0x68, 0xc0, 0x84, 0x70, 0x07, - 0x00, 0x01, 0x70, 0x0f, 0x00, 0x00, 0x00, 0x06, 0x20, 0x09, 0x1a, 0xd1, - 0x21, 0x04, 0x90, 0x82, 0x00, 0x07, 0x20, 0x0a, 0x00, 0x0e, 0xc0, 0x95, - 0x70, 0x12, 0x20, 0x08, 0x20, 0x01, 0x00, 0x3b, 0x08, 0x0c, 0x16, 0x11, - 0x90, 0x06, 0x20, 0x71, 0x19, 0x3d, 0x70, 0x02, 0x70, 0x06, 0x70, 0x2a, - 0x00, 0xee, 0x00, 0x9e, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x09, 0x1a, 0xd1, - 0x21, 0x04, 0x90, 0x80, 0x00, 0x07, 0x20, 0x0a, 0x00, 0x05, 0x00, 0xe6, - 0x01, 0x26, 0x01, 0x56, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x00, - 0x71, 0x54, 0x20, 0x01, 0x00, 0x08, 0x91, 0x0a, 0x06, 0x38, 0x20, 0x01, - 0x18, 0x7d, 0x20, 0xac, 0x90, 0x06, 0x90, 0x80, 0x00, 0x08, 0x1f, 0x04, - 0x8a, 0xe3, 0x71, 0xc0, 0x91, 0x02, 0x02, 0xe0, 0x20, 0x71, 0x18, 0x77, - 0x20, 0xa9, 0x00, 0x07, 0x00, 0xc6, 0x08, 0x0c, 0xb2, 0x7d, 0x60, 0x23, - 0x00, 0x09, 0x60, 0x03, 0x00, 0x04, 0x60, 0x1f, 0x01, 0x01, 0x00, 0x89, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x8c, 0x61, 0x01, 0x2e, - 0x1f, 0x04, 0x8a, 0xef, 0x90, 0x06, 0x00, 0xce, 0x01, 0x5e, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xc8, 0x00, 0xe6, - 0x00, 0xb6, 0x00, 0x96, 0x00, 0x86, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, - 0x71, 0x18, 0x72, 0x0c, 0x76, 0x20, 0x70, 0x04, 0xd0, 0x84, 0x11, 0x28, - 0x20, 0x21, 0x00, 0x24, 0x20, 0x29, 0x00, 0x02, 0x00, 0x20, 0x20, 0x21, - 0x00, 0x2c, 0x20, 0x29, 0x00, 0x0a, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, - 0x0d, 0xc5, 0x29, 0x00, 0x60, 0x16, 0x20, 0x58, 0xac, 0x66, 0x90, 0x06, - 0xa8, 0x02, 0xa8, 0x06, 0xa8, 0x6a, 0xa8, 0x7a, 0xa8, 0xaa, 0xa8, 0x87, - 0x00, 0x05, 0xa8, 0x7f, 0x00, 0x20, 0x70, 0x08, 0xa8, 0x9a, 0x70, 0x10, - 0xa8, 0x9e, 0xae, 0x8a, 0xa8, 0xaf, 0xff, 0xff, 0xa8, 0xb3, 0x00, 0x00, - 0x81, 0x09, 0x01, 0x60, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, - 0xad, 0x66, 0x2b, 0x00, 0xa8, 0x02, 0x29, 0x00, 0xb8, 0x06, 0x20, 0x58, - 0x81, 0x09, 0x1d, 0xa0, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x8e, - 0x00, 0x9e, 0x00, 0xbe, 0x00, 0xee, 0x00, 0x05, 0x20, 0x79, 0x00, 0x00, - 0x20, 0x71, 0x19, 0x24, 0x70, 0x04, 0x00, 0x4b, 0x70, 0x0c, 0x00, 0x02, - 0x8b, 0x5b, 0x8b, 0x54, 0x8b, 0x54, 0x00, 0x05, 0x8b, 0x65, 0x8b, 0xbb, - 0x8b, 0xbb, 0x8b, 0xbb, 0x8b, 0xbc, 0x8b, 0xcd, 0x8b, 0xcd, 0x70, 0x0c, - 0x0c, 0xba, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0xa0, 0x79, 0xa0, - 0x91, 0x06, 0x19, 0x04, 0x8b, 0xad, 0x78, 0x14, 0xd0, 0xbc, 0x19, 0x04, - 0x8b, 0xb6, 0x01, 0x2e, 0x70, 0x18, 0x91, 0x0a, 0x11, 0x28, 0x70, 0x30, - 0x90, 0x05, 0x19, 0x04, 0x8b, 0xff, 0x00, 0x05, 0x12, 0x10, 0x71, 0x14, - 0x91, 0x0a, 0x91, 0x92, 0x00, 0x0a, 0x02, 0x10, 0x20, 0x09, 0x00, 0x0a, - 0x20, 0x01, 0x18, 0x88, 0x20, 0x14, 0x20, 0x01, 0x19, 0x36, 0x20, 0x04, - 0x91, 0x00, 0x92, 0x02, 0x0e, 0x50, 0x08, 0x0c, 0x8d, 0x5c, 0x22, 0x00, - 0x91, 0x02, 0x02, 0x08, 0x22, 0x08, 0x00, 0x96, 0x70, 0x2c, 0x20, 0x48, - 0xa8, 0x73, 0x00, 0x01, 0xa9, 0x76, 0x08, 0x0c, 0x8e, 0x65, 0x21, 0x00, - 0xa8, 0x7e, 0xa8, 0x6f, 0x00, 0x00, 0x00, 0x9e, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x09, 0x1a, 0x1b, 0x21, 0x04, 0xc0, 0x85, 0x20, 0x0a, - 0x70, 0x0f, 0x00, 0x02, 0x01, 0x2e, 0x08, 0x0c, 0x11, 0x17, 0x1d, 0xe8, - 0x00, 0x05, 0x78, 0xa0, 0x79, 0xa0, 0x91, 0x06, 0x09, 0x04, 0x8b, 0x6d, - 0x08, 0x0c, 0x8d, 0x34, 0x01, 0x2e, 0x00, 0x05, 0x78, 0x10, 0xc0, 0xc5, - 0x78, 0x12, 0x08, 0x04, 0x8b, 0x6d, 0x00, 0x05, 0x70, 0x0c, 0x00, 0x02, - 0x8b, 0xc1, 0x8b, 0xc4, 0x8b, 0xc3, 0x08, 0x0c, 0x8b, 0x63, 0x00, 0x05, - 0x80, 0x01, 0x70, 0x0e, 0x00, 0x96, 0x70, 0x2c, 0x20, 0x48, 0xa9, 0x74, - 0x00, 0x9e, 0x00, 0x11, 0x0c, 0xa0, 0x00, 0x05, 0x00, 0x96, 0x70, 0x2c, - 0x20, 0x48, 0x70, 0x18, 0x91, 0x00, 0x72, 0x14, 0x92, 0x1a, 0x11, 0x30, - 0x70, 0x1c, 0xa8, 0x8e, 0x70, 0x20, 0xa8, 0x92, 0x90, 0x06, 0x00, 0x68, - 0x00, 0x06, 0x08, 0x0c, 0x8e, 0x65, 0x21, 0x00, 0xaa, 0x8c, 0x92, 0x10, - 0xaa, 0x8e, 0x12, 0x20, 0xa8, 0x90, 0x90, 0x81, 0x00, 0x00, 0xa8, 0x92, - 0x00, 0x0e, 0x00, 0x9e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0xa2, - 0x70, 0x1a, 0x08, 0x0c, 0x8d, 0x34, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0x24, 0x70, 0x0c, 0x00, 0x02, 0x8b, 0xfd, 0x8b, 0xfd, - 0x8b, 0xfb, 0x70, 0x0f, 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x30, 0x90, 0x05, 0x05, 0x08, 0x20, 0x78, - 0x78, 0x14, 0x20, 0x48, 0xae, 0x88, 0x00, 0xb6, 0x20, 0x59, 0x00, 0x00, - 0x08, 0x0c, 0x8c, 0x6a, 0x00, 0xbe, 0x01, 0xb0, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0x3d, 0x08, 0x0c, 0x8c, 0xb1, 0x00, 0xee, 0x01, 0x78, 0x00, 0x96, - 0x08, 0x0c, 0x10, 0x27, 0x29, 0x00, 0x00, 0x9e, 0x01, 0x48, 0xa8, 0xaa, - 0x04, 0xb9, 0x00, 0x41, 0x20, 0x01, 0x19, 0x47, 0x20, 0x03, 0x00, 0x00, - 0x01, 0x2e, 0x08, 0xc8, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x86, 0x00, 0xa6, 0x29, 0x40, 0x26, 0x50, 0x26, 0x00, 0x90, 0x05, - 0x01, 0x80, 0xa8, 0x64, 0x90, 0x84, 0x00, 0x0f, 0x20, 0x68, 0x9d, 0x88, - 0x20, 0xc7, 0x21, 0x65, 0x00, 0x56, 0x20, 0x29, 0x00, 0x00, 0x08, 0x0c, - 0x8d, 0xea, 0x08, 0x0c, 0x20, 0x7f, 0x1d, 0xd8, 0x00, 0x5e, 0x00, 0xae, - 0x20, 0x01, 0x18, 0x7f, 0x20, 0x04, 0xa8, 0x8a, 0x08, 0x0c, 0x17, 0x68, - 0x78, 0x1f, 0x01, 0x01, 0x78, 0x13, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x8c, 0xc0, 0x01, 0x2e, 0x00, 0x8e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0x70, 0x30, 0x90, 0x05, 0x01, 0x38, 0x20, 0x78, - 0x78, 0x0c, 0x70, 0x32, 0x20, 0x01, 0x19, 0x47, 0x20, 0x03, 0x00, 0x01, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x70, 0x30, 0x60, 0x0e, - 0x2c, 0x00, 0x70, 0x32, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x26, 0x9b, 0x80, 0x8f, 0x33, 0x20, 0x05, 0x90, 0x6d, 0x09, 0x0c, - 0x0d, 0xc5, 0x9b, 0x80, 0x8f, 0x2b, 0x20, 0x05, 0x90, 0x65, 0x09, 0x0c, - 0x0d, 0xc5, 0x61, 0x14, 0x26, 0x00, 0x91, 0x02, 0x02, 0x48, 0x68, 0x28, - 0x91, 0x02, 0x02, 0xf0, 0x90, 0x85, 0x00, 0x01, 0x00, 0x2e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0x68, 0x04, 0xd0, 0x94, 0x01, 0x48, 0x68, 0x54, - 0xd0, 0x84, 0x11, 0x78, 0xc0, 0x85, 0x68, 0x56, 0x20, 0x11, 0x80, 0x26, - 0x08, 0x0c, 0x4c, 0x44, 0x68, 0x4c, 0x00, 0x96, 0x90, 0x4d, 0x09, 0x0c, - 0x0d, 0xc5, 0xa8, 0x04, 0x80, 0x00, 0xa8, 0x06, 0x00, 0x9e, 0x90, 0x06, - 0x20, 0x30, 0x0c, 0x20, 0x68, 0x54, 0xd0, 0x8c, 0x1d, 0x08, 0xc0, 0x8d, - 0x68, 0x56, 0x20, 0x11, 0x80, 0x25, 0x08, 0x0c, 0x4c, 0x44, 0x68, 0x4c, - 0x00, 0x96, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x00, 0x80, 0x00, - 0xa8, 0x02, 0x00, 0x9e, 0x08, 0x88, 0x70, 0x00, 0x20, 0x19, 0x00, 0x08, - 0x83, 0x19, 0x71, 0x04, 0x91, 0x02, 0x11, 0x18, 0x23, 0x00, 0x90, 0x05, - 0x00, 0x20, 0x02, 0x10, 0x93, 0x02, 0x00, 0x08, 0x80, 0x02, 0x00, 0x05, - 0x00, 0xd6, 0x78, 0x14, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, 0x78, 0x1c, - 0x90, 0x84, 0x01, 0x01, 0x90, 0x86, 0x01, 0x01, 0x19, 0x0c, 0x0d, 0xc5, - 0x78, 0x27, 0x00, 0x00, 0x20, 0x69, 0x19, 0x3d, 0x68, 0x04, 0x90, 0x80, - 0x19, 0x3f, 0x2f, 0x08, 0x21, 0x02, 0x69, 0x04, 0x81, 0x08, 0x91, 0x82, - 0x00, 0x08, 0x02, 0x08, 0x90, 0x0e, 0x69, 0x06, 0x91, 0x80, 0x19, 0x3f, - 0x20, 0x03, 0x00, 0x00, 0x00, 0xde, 0x00, 0x05, 0x00, 0x96, 0x00, 0xc6, - 0x20, 0x60, 0x60, 0x14, 0x20, 0x48, 0xa8, 0xa8, 0x00, 0x96, 0x20, 0x48, - 0x90, 0x05, 0x19, 0x0c, 0x10, 0x40, 0x00, 0x9e, 0xa8, 0xab, 0x00, 0x00, - 0x08, 0x0c, 0x0f, 0xc0, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x28, 0x60, 0x1c, - 0xd0, 0xc4, 0x01, 0x10, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x78, 0x60, 0x10, - 0x90, 0x05, 0x01, 0x50, 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x90, 0x67, - 0x00, 0xbe, 0x60, 0x13, 0x00, 0x00, 0x60, 0x1b, 0x00, 0x00, 0x00, 0x10, - 0x2c, 0x00, 0x08, 0x61, 0x00, 0x05, 0x20, 0x09, 0x19, 0x28, 0x21, 0x0c, - 0xd1, 0x94, 0x00, 0x05, 0x20, 0x09, 0x19, 0x28, 0x21, 0x0c, 0xd1, 0xc4, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0x24, 0x71, 0x10, 0xc1, 0x94, 0xc1, 0x85, 0x70, 0x07, 0x00, 0x00, - 0x71, 0x12, 0x20, 0x01, 0x00, 0x3b, 0x08, 0x0c, 0x16, 0x11, 0x00, 0xee, - 0x01, 0x2e, 0x00, 0x05, 0x78, 0x14, 0xd0, 0xbc, 0x11, 0x08, 0x00, 0x05, - 0x78, 0x10, 0xc0, 0xc5, 0x78, 0x12, 0x0c, 0xc0, 0x00, 0x96, 0x00, 0xd6, - 0x90, 0x06, 0x70, 0x06, 0x70, 0x0e, 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x22, - 0x70, 0x16, 0x70, 0x2a, 0x70, 0x26, 0x70, 0x2f, 0x00, 0x00, 0x08, 0x0c, - 0x8e, 0xb3, 0x01, 0x70, 0x08, 0x0c, 0x8e, 0xe8, 0x01, 0x58, 0x29, 0x00, - 0x70, 0x02, 0x70, 0x0a, 0x70, 0x1a, 0x70, 0x13, 0x00, 0x01, 0x70, 0x1f, - 0x00, 0x0a, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x90, 0x0e, 0x0c, 0xd8, - 0x00, 0xe6, 0x00, 0x96, 0x00, 0x86, 0x00, 0xd6, 0x00, 0xc6, 0x20, 0x71, - 0x19, 0x31, 0x72, 0x1c, 0x21, 0x00, 0x92, 0x02, 0x16, 0x18, 0x08, 0x0c, - 0x8e, 0xe8, 0x09, 0x0c, 0x0d, 0xc5, 0x70, 0x18, 0x90, 0x05, 0x11, 0x60, - 0x29, 0x00, 0x70, 0x02, 0x70, 0x0a, 0x70, 0x1a, 0x90, 0x06, 0x70, 0x06, - 0x70, 0x0e, 0xa8, 0x06, 0xa8, 0x02, 0x70, 0x12, 0x70, 0x1e, 0x00, 0x38, - 0x20, 0x40, 0xa8, 0x06, 0x29, 0x00, 0xa0, 0x02, 0x70, 0x1a, 0xa8, 0x03, - 0x00, 0x00, 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x1c, 0x90, 0x80, - 0x00, 0x0a, 0x70, 0x1e, 0x72, 0x1c, 0x08, 0xd0, 0x72, 0x1c, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, - 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0x31, 0x73, 0x00, 0x83, 0x1f, 0x83, 0x1e, - 0x83, 0x1e, 0x93, 0x84, 0x00, 0x3f, 0x20, 0xe8, 0x93, 0x9c, 0xff, 0xc0, - 0x93, 0x98, 0x00, 0x03, 0x71, 0x04, 0x08, 0x0c, 0x8e, 0x65, 0x81, 0x0c, - 0x21, 0x00, 0x93, 0x18, 0x80, 0x03, 0x22, 0x28, 0x20, 0x21, 0x00, 0x78, - 0x94, 0x02, 0x95, 0x32, 0x02, 0x08, 0x20, 0x28, 0x25, 0x00, 0x80, 0x04, - 0x20, 0xa8, 0x23, 0xa0, 0xa0, 0x01, 0xa0, 0x01, 0x40, 0x05, 0x25, 0x08, - 0x08, 0x0c, 0x8e, 0x6e, 0x21, 0x30, 0x70, 0x14, 0x96, 0x00, 0x70, 0x16, - 0x26, 0x00, 0x71, 0x1c, 0x91, 0x02, 0x70, 0x1e, 0x70, 0x04, 0x96, 0x00, - 0x20, 0x08, 0x90, 0x82, 0x00, 0x0a, 0x11, 0x90, 0x70, 0x00, 0x20, 0x48, - 0xa8, 0x00, 0x90, 0x05, 0x11, 0x48, 0x20, 0x09, 0x00, 0x01, 0x00, 0x26, - 0x08, 0x0c, 0x8d, 0x5c, 0x00, 0x2e, 0x70, 0x00, 0x20, 0x48, 0xa8, 0x00, - 0x70, 0x02, 0x70, 0x07, 0x00, 0x00, 0x00, 0x08, 0x71, 0x06, 0x25, 0x00, - 0x92, 0x12, 0x19, 0x04, 0x8d, 0x9b, 0x01, 0x2e, 0x00, 0xee, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x95, 0x80, 0x8f, 0x2b, - 0x20, 0x05, 0x90, 0x75, 0x09, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x8e, 0x40, - 0x01, 0x2e, 0x95, 0x80, 0x8f, 0x27, 0x20, 0x05, 0x90, 0x75, 0x09, 0x0c, - 0x0d, 0xc5, 0x01, 0x56, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x46, 0x01, 0xd6, - 0x83, 0x1f, 0x83, 0x1e, 0x83, 0x1e, 0x93, 0x84, 0x00, 0x3f, 0x20, 0xe0, - 0x93, 0x84, 0xff, 0xc0, 0x91, 0x00, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, - 0xa9, 0x5c, 0x2c, 0x05, 0x91, 0x00, 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x02, - 0x40, 0x03, 0x2e, 0x0c, 0x2d, 0x00, 0x00, 0x02, 0x8e, 0x2a, 0x8e, 0x2a, - 0x8e, 0x2c, 0x8e, 0x2a, 0x8e, 0x2c, 0x8e, 0x2a, 0x8e, 0x2a, 0x8e, 0x2a, - 0x8e, 0x2a, 0x8e, 0x2a, 0x8e, 0x32, 0x8e, 0x2a, 0x8e, 0x32, 0x8e, 0x2a, - 0x8e, 0x2a, 0x8e, 0x2a, 0x08, 0x0c, 0x0d, 0xc5, 0x41, 0x04, 0x20, 0xa9, - 0x00, 0x02, 0x40, 0x02, 0x40, 0x03, 0x00, 0x28, 0x20, 0xa9, 0x00, 0x02, - 0x40, 0x03, 0x41, 0x04, 0x40, 0x03, 0x01, 0xde, 0x01, 0x4e, 0x01, 0xce, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0x96, 0x70, 0x14, 0x80, 0x01, 0x70, 0x16, 0x71, 0x0c, 0x21, 0x10, - 0x00, 0xf1, 0x81, 0x0c, 0x91, 0x88, 0x00, 0x03, 0x73, 0x08, 0x82, 0x10, - 0x92, 0x82, 0x00, 0x0a, 0x11, 0x98, 0x70, 0x08, 0x20, 0x48, 0xa8, 0x00, - 0x90, 0x05, 0x01, 0x58, 0x00, 0x06, 0x08, 0x0c, 0x8e, 0xf7, 0x00, 0x9e, - 0xa8, 0x07, 0x00, 0x00, 0x29, 0x00, 0x70, 0x0a, 0x70, 0x10, 0x80, 0x01, - 0x70, 0x12, 0x70, 0x0f, 0x00, 0x00, 0x00, 0x08, 0x72, 0x0e, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0x06, 0x81, 0x0b, 0x81, 0x0b, 0x21, 0x00, 0x81, 0x0b, - 0x91, 0x00, 0x20, 0x08, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x26, - 0x21, 0x00, 0x90, 0x05, 0x01, 0x58, 0x90, 0x92, 0x00, 0x0c, 0x02, 0x40, - 0x90, 0x0e, 0x81, 0x08, 0x90, 0x82, 0x00, 0x0c, 0x1d, 0xe0, 0x00, 0x2e, - 0x00, 0x0e, 0x00, 0x05, 0x90, 0x0e, 0x0c, 0xd8, 0x2d, 0x00, 0x90, 0xb8, - 0x00, 0x08, 0x20, 0x31, 0x8e, 0xb1, 0x90, 0x1e, 0x68, 0x08, 0x90, 0x05, - 0x01, 0x08, 0x83, 0x18, 0x69, 0x0c, 0x91, 0x0a, 0x02, 0x48, 0x01, 0x40, - 0x83, 0x18, 0x68, 0x10, 0x91, 0x12, 0x02, 0x20, 0x01, 0x18, 0x83, 0x18, - 0x22, 0x08, 0x0c, 0xd0, 0x23, 0x3a, 0x68, 0x04, 0xd0, 0x84, 0x23, 0x00, - 0x20, 0x21, 0x00, 0x01, 0x11, 0x50, 0x90, 0x82, 0x00, 0x03, 0x09, 0x67, - 0x0a, 0x67, 0x84, 0x20, 0x90, 0x82, 0x00, 0x07, 0x09, 0x67, 0x0a, 0x67, - 0x0c, 0xd0, 0x90, 0x82, 0x00, 0x02, 0x09, 0x67, 0x0a, 0x67, 0x84, 0x20, - 0x90, 0x82, 0x00, 0x05, 0x09, 0x67, 0x0a, 0x67, 0x0c, 0xd0, 0x6c, 0x1a, - 0x00, 0x05, 0x00, 0x96, 0x00, 0x46, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x2b, 0x00, 0x90, 0x80, 0x8f, 0x2f, 0x20, 0x05, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0xc5, 0x20, 0x04, 0x90, 0xa0, 0x00, 0x0a, 0x08, 0x0c, 0x10, 0x27, - 0x01, 0xd0, 0x29, 0x00, 0x70, 0x26, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, - 0x00, 0x00, 0x08, 0x0c, 0x10, 0x27, 0x01, 0x88, 0x70, 0x24, 0xa8, 0x02, - 0xa8, 0x07, 0x00, 0x00, 0x29, 0x00, 0x70, 0x26, 0x94, 0xa2, 0x00, 0x0a, - 0x01, 0x10, 0x02, 0x08, 0x0c, 0x90, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x4e, 0x00, 0x9e, 0x00, 0x05, 0x70, 0x24, 0x90, 0x05, 0x0d, 0xc8, - 0x20, 0x48, 0xac, 0x00, 0x08, 0x0c, 0x10, 0x40, 0x24, 0x00, 0x0c, 0xc0, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x24, 0x20, 0x48, 0x90, 0x05, - 0x01, 0x30, 0xa8, 0x00, 0x70, 0x26, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, - 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x24, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x26, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0x96, 0x9e, 0x80, 0x00, 0x09, 0x20, 0x04, 0x90, 0x05, 0x01, 0x38, - 0x20, 0x48, 0xa8, 0x00, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x40, 0x00, 0x0e, - 0x0c, 0xb8, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x96, 0x70, 0x08, 0x90, 0x05, - 0x01, 0x38, 0x20, 0x48, 0xa8, 0x00, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x40, - 0x00, 0x0e, 0x0c, 0xb8, 0x90, 0x06, 0x70, 0x02, 0x70, 0x0a, 0x70, 0x06, - 0x70, 0x0e, 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x22, 0x70, 0x2a, 0x70, 0x26, - 0x70, 0x2e, 0x00, 0x9e, 0x00, 0x05, 0x1a, 0x67, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x19, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x88, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x77, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0xa6, 0xa8, 0xa8, - 0x20, 0x40, 0x20, 0x71, 0x18, 0x77, 0x08, 0x0c, 0x90, 0x53, 0xa0, 0x67, - 0x00, 0x23, 0x60, 0x10, 0x90, 0x5d, 0x09, 0x04, 0x90, 0x28, 0xb8, 0x14, - 0xa0, 0x6e, 0xb9, 0x10, 0xa1, 0x72, 0xb9, 0xa0, 0xa1, 0x76, 0x20, 0x01, - 0x00, 0x03, 0xa0, 0x7e, 0xa8, 0x34, 0xa0, 0x82, 0xa0, 0x7b, 0x00, 0x00, - 0xa8, 0x98, 0x90, 0x05, 0x01, 0x18, 0xa0, 0x78, 0xc0, 0x85, 0xa0, 0x7a, - 0x28, 0x58, 0x20, 0x31, 0x00, 0x18, 0xa0, 0x68, 0x90, 0x8a, 0x00, 0x19, - 0x1a, 0x0c, 0x0d, 0xc5, 0x20, 0x20, 0x20, 0x50, 0x29, 0x40, 0xa8, 0x64, - 0x90, 0xbc, 0x00, 0xff, 0x90, 0x8c, 0x00, 0x0f, 0x91, 0xe0, 0x20, 0xc7, - 0x2c, 0x65, 0x97, 0x86, 0x00, 0x24, 0x2c, 0x05, 0x15, 0x90, 0x90, 0x8a, - 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, - 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x95, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x93, - 0x8f, 0x97, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x99, 0x8f, 0x93, - 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x9b, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x93, - 0x8f, 0x9d, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0x9f, 0x8f, 0x93, - 0x8f, 0x93, 0x8f, 0x93, 0x8f, 0xa1, 0x08, 0x0c, 0x0d, 0xc5, 0xa1, 0x80, - 0x04, 0xb8, 0xa1, 0x90, 0x04, 0xa8, 0xa1, 0xa0, 0x04, 0x98, 0xa1, 0xb0, - 0x04, 0x88, 0xa1, 0xc0, 0x04, 0x78, 0xa1, 0xd0, 0x04, 0x68, 0xa1, 0xe0, - 0x04, 0x58, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x8f, 0xc5, 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc3, - 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc7, 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc3, - 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc9, 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc3, - 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xcb, 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xc3, - 0x8f, 0xc3, 0x8f, 0xc3, 0x8f, 0xcd, 0x08, 0x0c, 0x0d, 0xc5, 0xa1, 0x80, - 0x00, 0x38, 0xa1, 0x98, 0x00, 0x28, 0xa1, 0xb0, 0x00, 0x18, 0xa1, 0xc8, - 0x00, 0x08, 0xa1, 0xe0, 0x26, 0x00, 0x00, 0x02, 0x8f, 0xe9, 0x8f, 0xeb, - 0x8f, 0xed, 0x8f, 0xef, 0x8f, 0xf1, 0x8f, 0xf3, 0x8f, 0xf5, 0x8f, 0xf7, - 0x8f, 0xf9, 0x8f, 0xfb, 0x8f, 0xfd, 0x8f, 0xff, 0x90, 0x01, 0x90, 0x03, - 0x90, 0x05, 0x90, 0x07, 0x90, 0x09, 0x90, 0x0b, 0x90, 0x0d, 0x90, 0x0f, - 0x90, 0x11, 0x90, 0x13, 0x90, 0x15, 0x90, 0x17, 0x90, 0x19, 0x08, 0x0c, - 0x0d, 0xc5, 0xb9, 0xe2, 0x04, 0x68, 0xb9, 0xde, 0x04, 0x58, 0xb9, 0xda, - 0x04, 0x48, 0xb9, 0xd6, 0x04, 0x38, 0xb9, 0xd2, 0x04, 0x28, 0xb9, 0xce, - 0x04, 0x18, 0xb9, 0xca, 0x04, 0x08, 0xb9, 0xc6, 0x00, 0xf8, 0xb9, 0xc2, - 0x00, 0xe8, 0xb9, 0xbe, 0x00, 0xd8, 0xb9, 0xba, 0x00, 0xc8, 0xb9, 0xb6, - 0x00, 0xb8, 0xb9, 0xb2, 0x00, 0xa8, 0xb9, 0xae, 0x00, 0x98, 0xb9, 0xaa, - 0x00, 0x88, 0xb9, 0xa6, 0x00, 0x78, 0xb9, 0xa2, 0x00, 0x68, 0xb9, 0x9e, - 0x00, 0x58, 0xb9, 0x9a, 0x00, 0x48, 0xb9, 0x96, 0x00, 0x38, 0xb9, 0x92, - 0x00, 0x28, 0xb9, 0x8e, 0x00, 0x18, 0xb9, 0x8a, 0x00, 0x08, 0xb9, 0x86, - 0x86, 0x31, 0x84, 0x21, 0x01, 0x30, 0x08, 0x0c, 0x20, 0x7f, 0x09, 0x0c, - 0x0d, 0xc5, 0x08, 0x04, 0x8f, 0x6d, 0x00, 0xae, 0x00, 0xbe, 0x00, 0xce, - 0x00, 0xee, 0x00, 0x05, 0xa8, 0x6c, 0xa0, 0x6e, 0xa8, 0x70, 0xa0, 0x72, - 0xa0, 0x77, 0x00, 0xff, 0x90, 0x06, 0x08, 0x04, 0x8f, 0x4f, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, 0x90, 0x05, - 0x01, 0xb0, 0x20, 0x01, 0x19, 0x25, 0x20, 0x04, 0x90, 0x05, 0x01, 0x88, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x58, - 0x00, 0x36, 0x00, 0x46, 0xbb, 0xa0, 0x20, 0x21, 0x00, 0x04, 0x20, 0x11, - 0x80, 0x14, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xbe, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x90, 0x16, 0x71, 0x0c, 0xa8, 0x34, - 0x91, 0x0a, 0xa9, 0x36, 0x70, 0x08, 0x90, 0x05, 0x01, 0x20, 0x82, 0x10, - 0x91, 0x0a, 0x02, 0x30, 0x01, 0x28, 0x70, 0x10, 0x82, 0x10, 0x91, 0x0a, - 0x02, 0x08, 0x1d, 0xe0, 0xaa, 0x8a, 0xa2, 0x6a, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xd6, 0x00, 0x36, 0x20, 0x79, 0x03, 0x00, 0x78, 0x1b, 0x02, 0x00, - 0x78, 0x18, 0xd0, 0x94, 0x1d, 0xd8, 0x78, 0x1b, 0x02, 0x02, 0xa0, 0x01, - 0xa0, 0x01, 0x78, 0x18, 0xd0, 0x94, 0x1d, 0xa0, 0xb8, 0xac, 0x90, 0x6d, - 0x01, 0x98, 0x20, 0x79, 0x00, 0x00, 0x9c, 0x1e, 0x11, 0x18, 0x68, 0x0c, - 0xb8, 0xae, 0x00, 0x50, 0x9c, 0x06, 0x01, 0x30, 0x2d, 0x78, 0x68, 0x0c, - 0x90, 0x6d, 0x1d, 0xd0, 0x08, 0x0c, 0x0d, 0xc5, 0x6b, 0x0c, 0x7b, 0x0e, - 0x60, 0x0f, 0x00, 0x00, 0x20, 0x79, 0x03, 0x00, 0x78, 0x1b, 0x02, 0x00, - 0x00, 0x3e, 0x00, 0xde, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0x96, 0x00, 0xc6, 0x00, 0x36, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x01, 0x56, 0x20, 0xa9, 0x01, 0xff, 0x20, 0x71, 0x03, 0x00, 0x70, 0x1b, - 0x02, 0x00, 0x70, 0x18, 0xd0, 0x94, 0x01, 0x10, 0x1f, 0x04, 0x90, 0xa3, - 0x70, 0x1b, 0x02, 0x02, 0xa0, 0x01, 0xa0, 0x01, 0x70, 0x18, 0xd0, 0x94, - 0x1d, 0x90, 0xb8, 0xac, 0x90, 0x65, 0x01, 0xf0, 0x60, 0x0c, 0xb8, 0xae, - 0x60, 0x24, 0xc0, 0x8d, 0x60, 0x26, 0x60, 0x03, 0x00, 0x04, 0x60, 0x1b, - 0x00, 0x00, 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x01, 0x01, 0x60, 0x14, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x8b, 0x00, 0x00, 0xa8, 0xa8, - 0xa8, 0xab, 0x00, 0x00, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x10, 0x40, 0x08, 0x0c, 0x8c, 0x61, 0x08, 0xf8, 0x20, 0x71, 0x03, 0x00, - 0x70, 0x1b, 0x02, 0x00, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x3e, 0x00, 0xce, - 0x00, 0x9e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, - 0x00, 0x16, 0x00, 0x06, 0x01, 0x56, 0x08, 0x0c, 0x28, 0x73, 0x01, 0x5e, - 0x11, 0xb0, 0x08, 0x0c, 0x66, 0xb9, 0x19, 0x0c, 0x0d, 0xc5, 0x00, 0x0e, - 0x00, 0x1e, 0xb9, 0x12, 0xb8, 0x16, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x40, - 0x2b, 0x00, 0x60, 0x12, 0x60, 0x23, 0x00, 0x01, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, 0x00, 0x0e, - 0x00, 0x1e, 0x0c, 0xd0, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, - 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0x91, 0x19, - 0x91, 0x19, 0x91, 0x19, 0x91, 0x1b, 0x91, 0x6c, 0x91, 0x19, 0x91, 0x19, - 0x91, 0x19, 0x91, 0xe6, 0x91, 0x19, 0x92, 0x23, 0x91, 0x19, 0x91, 0x19, - 0x91, 0x19, 0x91, 0x19, 0x91, 0x19, 0x08, 0x0c, 0x0d, 0xc5, 0x91, 0x82, - 0x00, 0x40, 0x00, 0x02, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, - 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x30, - 0x91, 0x45, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x2e, 0x91, 0x58, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x96, 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, - 0x9b, 0xd3, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x00, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbb, 0x05, 0x00, 0x00, 0xbe, 0x08, 0x0c, - 0x6c, 0xa3, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, - 0x9a, 0x61, 0x00, 0xd6, 0x61, 0x14, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x30, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, - 0x00, 0xde, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x05, - 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, 0x32, 0x50, 0x61, 0x14, 0x00, 0x96, - 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x20, 0xa8, 0x7b, 0x00, 0x29, - 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, - 0x9b, 0xd3, 0x00, 0x05, 0x60, 0x1b, 0x00, 0x00, 0x91, 0x82, 0x00, 0x40, - 0x00, 0x96, 0x00, 0x02, 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, - 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, 0x91, 0x89, 0x91, 0x87, - 0x91, 0x87, 0x91, 0x87, 0x91, 0xe2, 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, - 0x91, 0x87, 0x91, 0x87, 0x91, 0x87, 0x91, 0x90, 0x91, 0x87, 0x08, 0x0c, - 0x0d, 0xc5, 0x61, 0x14, 0x21, 0x48, 0xa9, 0x38, 0x91, 0x8e, 0xff, 0xff, - 0x09, 0x04, 0x91, 0xe2, 0x60, 0x24, 0xd0, 0x8c, 0x15, 0xd8, 0x08, 0x0c, - 0x8d, 0x17, 0x05, 0xe0, 0x00, 0xe6, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, - 0x8f, 0x37, 0x00, 0x96, 0xa8, 0xa8, 0x20, 0x48, 0x08, 0x0c, 0x6c, 0x3b, - 0x00, 0x9e, 0xa8, 0xab, 0x00, 0x00, 0x60, 0x10, 0x90, 0x05, 0x01, 0x28, - 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x90, 0x67, 0x00, 0xbe, 0xae, 0x88, - 0x00, 0xb6, 0x20, 0x59, 0x00, 0x00, 0x08, 0x0c, 0x8c, 0x6a, 0x00, 0xbe, - 0x01, 0xe0, 0x20, 0x71, 0x19, 0x3d, 0x08, 0x0c, 0x8c, 0xb1, 0x01, 0xb8, - 0x90, 0x86, 0x00, 0x01, 0x11, 0x28, 0x20, 0x01, 0x19, 0x47, 0x20, 0x04, - 0x90, 0x05, 0x11, 0x78, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x0e, 0x29, 0x00, - 0x00, 0x9e, 0x01, 0x48, 0xa8, 0xaa, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, - 0x8c, 0x28, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, - 0x8c, 0x61, 0x0c, 0xd0, 0x08, 0x0c, 0x8d, 0x1c, 0x11, 0x60, 0x60, 0x10, - 0x90, 0x05, 0x01, 0x30, 0x20, 0x58, 0xb8, 0xac, 0x90, 0x05, 0x19, 0x0c, - 0x0d, 0xc5, 0x60, 0x12, 0x2c, 0x00, 0x08, 0x0c, 0x8c, 0xe2, 0x00, 0x05, - 0x08, 0x0c, 0x92, 0x90, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, - 0x00, 0x96, 0x00, 0x02, 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfc, - 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, 0x92, 0x21, 0x91, 0xfa, 0x91, 0xfa, - 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, 0x91, 0xfa, - 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0xac, 0xa8, 0x46, 0xa8, 0xb0, 0xa8, 0x4a, 0xa8, 0x37, - 0x00, 0x00, 0xa8, 0x3b, 0x00, 0x00, 0xa8, 0x84, 0x90, 0x92, 0x19, 0x9a, - 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x13, 0x82, 0x13, - 0x92, 0x10, 0x62, 0x1a, 0x2c, 0x10, 0x08, 0x0c, 0x1b, 0xe0, 0x08, 0x0c, - 0x95, 0x64, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x9b, 0xd3, - 0x01, 0x2e, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x9a, 0x61, 0x08, 0x0c, 0x9b, 0xd3, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, - 0x00, 0x00, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbb, 0x05, 0x00, - 0x00, 0xbe, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, - 0x00, 0x96, 0x00, 0x13, 0x00, 0x9e, 0x00, 0x05, 0x92, 0x50, 0x92, 0x50, - 0x92, 0x50, 0x92, 0x52, 0x92, 0x63, 0x92, 0x50, 0x92, 0x50, 0x92, 0x50, - 0x92, 0x50, 0x92, 0x50, 0x92, 0x50, 0x92, 0x50, 0x92, 0x50, 0x92, 0x50, - 0x92, 0x50, 0x92, 0x50, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xac, 0x2b, - 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0xbb, 0x05, 0x00, 0x00, 0xbe, 0x08, 0x0c, 0x6e, 0x9f, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x04, 0x61, 0x00, 0x05, 0x60, 0x00, - 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x96, 0x00, 0x13, - 0x00, 0x9e, 0x00, 0x05, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x80, - 0x92, 0x90, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, - 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, 0x92, 0x7e, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x36, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x3c, 0x9c, 0x06, 0x11, 0x20, 0x20, 0x19, 0x00, 0x00, 0x08, 0x0c, - 0xaa, 0x49, 0x08, 0x0c, 0xac, 0x2b, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x05, - 0x60, 0x24, 0xd0, 0x8c, 0x11, 0xf0, 0x00, 0xf6, 0x00, 0xe6, 0x60, 0x1b, - 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, 0x60, 0x10, 0x90, 0x05, 0x01, 0x28, - 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x90, 0x67, 0x00, 0xbe, 0x20, 0x71, - 0x19, 0x3d, 0x08, 0x0c, 0x8c, 0xb1, 0x01, 0x60, 0x20, 0x01, 0x18, 0x7f, - 0x20, 0x04, 0xa8, 0x8a, 0x20, 0x31, 0x00, 0x00, 0x2c, 0x78, 0x08, 0x0c, - 0x8c, 0x28, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x96, 0xa8, 0x8b, - 0x00, 0x00, 0xa8, 0xa8, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x40, 0x00, 0x9e, - 0xa8, 0xab, 0x00, 0x00, 0x08, 0x0c, 0x8c, 0x61, 0x0c, 0x80, 0x20, 0x01, - 0x19, 0x25, 0x20, 0x0c, 0x91, 0x8e, 0x00, 0x00, 0x19, 0x0c, 0x8d, 0x17, - 0x05, 0xc8, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x71, 0x10, 0xc1, 0xc5, - 0x71, 0x12, 0x08, 0x0c, 0x8d, 0x21, 0x00, 0xf6, 0x00, 0xc6, 0x20, 0x71, - 0x10, 0x00, 0x00, 0xb6, 0x2e, 0x04, 0x90, 0x5d, 0x01, 0x38, 0xb8, 0xac, - 0x90, 0x65, 0x01, 0x20, 0x08, 0x0c, 0x8c, 0xf7, 0x09, 0x0c, 0x90, 0x96, - 0x8e, 0x70, 0x9e, 0x86, 0x18, 0x00, 0x1d, 0x90, 0x00, 0xbe, 0x00, 0xd6, - 0x00, 0x96, 0x00, 0x46, 0x20, 0x61, 0x1c, 0xd0, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x24, 0x60, 0x20, 0x90, 0x86, 0x00, 0x00, 0x11, 0x91, 0x9c, 0xe0, - 0x00, 0x18, 0x24, 0x00, 0x9c, 0x06, 0x1d, 0xb8, 0x00, 0x4e, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0xd1, 0x00, 0xce, 0x00, 0xfe, 0x20, 0x71, 0x19, 0x24, - 0x71, 0x10, 0xc1, 0xc4, 0x71, 0x12, 0x00, 0xee, 0x00, 0x05, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x09, 0x11, 0x60, 0x61, 0x00, 0x91, 0x86, 0x00, 0x04, - 0x11, 0x38, 0x61, 0x10, 0x81, 0xff, 0x19, 0x0c, 0x0d, 0xc5, 0x2c, 0x00, - 0x08, 0x0c, 0x8c, 0xe2, 0x90, 0x06, 0x00, 0x05, 0x20, 0x71, 0x19, 0x3f, - 0x20, 0x73, 0x00, 0x00, 0x8e, 0x70, 0x9e, 0x86, 0x19, 0x47, 0x1d, 0xd0, - 0x20, 0x71, 0x19, 0x3d, 0x70, 0x06, 0x70, 0x02, 0x20, 0x01, 0x19, 0x30, - 0x20, 0x64, 0x8c, 0xff, 0x01, 0x30, 0x61, 0x20, 0x91, 0x8e, 0x00, 0x00, - 0x19, 0x0c, 0x0d, 0xc5, 0x21, 0x02, 0x20, 0x01, 0x18, 0x8a, 0x20, 0x0c, - 0x81, 0xff, 0x01, 0x48, 0x00, 0x96, 0x21, 0x48, 0x08, 0x0c, 0x10, 0x40, - 0x00, 0x9e, 0x20, 0x01, 0x18, 0x8a, 0x20, 0x03, 0x00, 0x00, 0x20, 0x71, - 0x19, 0x31, 0x08, 0x0c, 0x8f, 0x00, 0x08, 0x04, 0x8f, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0x36, 0x00, 0x46, 0x20, 0xa9, 0x00, 0x10, 0x90, 0x06, 0x80, 0x04, - 0x20, 0x19, 0x01, 0x00, 0x23, 0x1c, 0x93, 0xa6, 0x00, 0x08, 0x11, 0x18, - 0x80, 0x86, 0x81, 0x8e, 0x00, 0x20, 0x80, 0xf6, 0x3e, 0x00, 0x81, 0xf6, - 0x3e, 0x08, 0x12, 0x08, 0x92, 0x00, 0x1f, 0x04, 0x93, 0x56, 0x93, 0xa6, - 0x00, 0x08, 0x11, 0x18, 0x80, 0x86, 0x81, 0x8e, 0x00, 0x20, 0x80, 0xf6, - 0x3e, 0x00, 0x81, 0xf6, 0x3e, 0x08, 0x00, 0x4e, 0x00, 0x3e, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x76, 0x01, 0x56, - 0x20, 0xa9, 0x00, 0x10, 0x90, 0x05, 0x05, 0x10, 0x91, 0x1a, 0x16, 0x00, - 0x82, 0x13, 0x20, 0x39, 0x01, 0x00, 0x27, 0x3c, 0x97, 0xbe, 0x00, 0x08, - 0x11, 0x10, 0x81, 0x8d, 0x00, 0x10, 0x81, 0xf5, 0x3e, 0x08, 0x02, 0x28, - 0x91, 0x1a, 0x12, 0x20, 0x1f, 0x04, 0x93, 0x80, 0x00, 0x28, 0x91, 0x1a, - 0x23, 0x08, 0x82, 0x10, 0x1f, 0x04, 0x93, 0x80, 0x00, 0x06, 0x32, 0x00, - 0x90, 0x84, 0xef, 0xff, 0x20, 0x80, 0x00, 0x0e, 0x01, 0x5e, 0x00, 0x7e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0x06, 0x32, 0x00, 0x90, 0x85, 0x10, 0x00, - 0x0c, 0xa8, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x20, 0x79, 0x19, 0xe8, - 0x01, 0x2e, 0x00, 0xd6, 0x20, 0x69, 0x19, 0xe8, 0x68, 0x03, 0x00, 0x05, - 0x01, 0x56, 0x01, 0x46, 0x01, 0xd6, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x69, - 0x02, 0x00, 0x08, 0x0c, 0xaf, 0x8e, 0x04, 0x01, 0x08, 0x0c, 0xaf, 0x79, - 0x00, 0xe9, 0x08, 0x0c, 0xaf, 0x7c, 0x00, 0xd1, 0x08, 0x0c, 0xaf, 0x7f, - 0x00, 0xb9, 0x08, 0x0c, 0xaf, 0x82, 0x00, 0xa1, 0x08, 0x0c, 0xaf, 0x85, - 0x00, 0x89, 0x08, 0x0c, 0xaf, 0x88, 0x00, 0x71, 0x08, 0x0c, 0xaf, 0x8b, - 0x00, 0x59, 0x01, 0xde, 0x01, 0x4e, 0x01, 0x5e, 0x20, 0x69, 0x00, 0x04, - 0x2d, 0x04, 0x90, 0x85, 0x80, 0x01, 0x20, 0x6a, 0x00, 0xde, 0x00, 0x05, - 0x20, 0xa9, 0x00, 0x20, 0x20, 0xa1, 0x02, 0x40, 0x20, 0x01, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x05, 0x00, 0xc6, 0x60, 0x27, 0x00, 0x01, 0x78, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x00, 0x02, 0x93, 0xf3, 0x94, 0x17, 0x94, 0x58, - 0x93, 0xf9, 0x94, 0x17, 0x93, 0xf3, 0x93, 0xf1, 0x93, 0xf1, 0x08, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0x88, 0xc3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, - 0x00, 0x05, 0x62, 0xc0, 0x82, 0xff, 0x11, 0x10, 0x00, 0xce, 0x00, 0x05, - 0x20, 0x11, 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x78, 0x28, 0x90, 0x92, - 0x00, 0xc8, 0x12, 0x28, 0x80, 0x00, 0x78, 0x2a, 0x08, 0x0c, 0x5f, 0xd7, - 0x0c, 0x88, 0x62, 0xc0, 0x08, 0x0c, 0xb0, 0xca, 0x08, 0x0c, 0x5f, 0x97, - 0x78, 0x07, 0x00, 0x03, 0x78, 0x27, 0x00, 0x00, 0x78, 0x2b, 0x00, 0x00, - 0x0c, 0x28, 0x08, 0x0c, 0x88, 0xc3, 0x62, 0x20, 0xd2, 0xa4, 0x01, 0x70, - 0xd2, 0xcc, 0x01, 0x60, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x24, 0x90, 0x65, - 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x78, 0x24, 0x90, 0x65, 0x09, 0x0c, - 0x0d, 0xc5, 0x78, 0x28, 0x90, 0x92, 0xc3, 0x50, 0x12, 0xc0, 0x80, 0x00, - 0x78, 0x2a, 0x00, 0xce, 0x08, 0x0c, 0x2b, 0xce, 0x02, 0x78, 0x00, 0xc6, - 0x79, 0x24, 0x21, 0x60, 0x60, 0x10, 0x90, 0x6d, 0x09, 0x0c, 0x0d, 0xc5, - 0x78, 0x07, 0x00, 0x00, 0x78, 0x27, 0x00, 0x00, 0x00, 0xce, 0x08, 0x0c, - 0x9a, 0xb1, 0x0c, 0x00, 0x08, 0x0c, 0xa6, 0xc5, 0x08, 0xe8, 0x20, 0x11, - 0x01, 0x30, 0x22, 0x14, 0x08, 0x0c, 0xb0, 0xca, 0x08, 0x0c, 0xf0, 0x94, - 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, 0x08, 0x80, - 0x20, 0x01, 0x1a, 0x04, 0x20, 0x03, 0x00, 0x00, 0x62, 0xc0, 0x82, 0xff, - 0x11, 0x60, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x24, 0x90, 0x65, 0x09, 0x0c, - 0x0d, 0xc5, 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0xb3, 0xa4, 0x00, 0xce, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x78, 0x24, 0x90, 0x05, - 0x09, 0x0c, 0x0d, 0xc5, 0x78, 0x28, 0x90, 0x92, 0xc3, 0x50, 0x16, 0x48, - 0x80, 0x00, 0x78, 0x2a, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x08, 0x0c, - 0x2b, 0xce, 0x02, 0xf0, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x78, 0x1c, - 0x90, 0x5d, 0x09, 0x0c, 0x0d, 0xc5, 0xb8, 0x00, 0xc0, 0xdc, 0xb8, 0x02, - 0x79, 0x24, 0x21, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0xb9, 0x3c, 0x81, 0xff, - 0x09, 0x0c, 0x0d, 0xc5, 0x81, 0x09, 0xb9, 0x3e, 0x78, 0x07, 0x00, 0x00, - 0x78, 0x27, 0x00, 0x00, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x08, 0x0c, - 0x9a, 0xb1, 0x08, 0x68, 0x08, 0x0c, 0xa6, 0xc5, 0x08, 0x50, 0x20, 0x11, - 0x01, 0x30, 0x22, 0x14, 0x08, 0x0c, 0xb0, 0xca, 0x08, 0x0c, 0xf0, 0x94, - 0x78, 0x24, 0x90, 0x65, 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x08, 0x04, 0x94, 0x69, 0x00, 0xc6, - 0x20, 0x01, 0x00, 0x9b, 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x0c, 0x1e, 0xeb, - 0x60, 0x24, 0x60, 0x27, 0x00, 0x02, 0xd0, 0xf4, 0x15, 0xb8, 0x62, 0xc8, - 0x60, 0xc4, 0x92, 0x05, 0x11, 0x70, 0x78, 0x3c, 0x90, 0x65, 0x01, 0x30, - 0x20, 0x09, 0x00, 0x49, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, 0x00, 0x05, - 0x20, 0x11, 0x1a, 0x07, 0x20, 0x13, 0x00, 0x00, 0x0c, 0xc8, 0x79, 0x3c, - 0x81, 0xff, 0x0d, 0xc0, 0x79, 0x44, 0x91, 0x92, 0x75, 0x30, 0x16, 0x28, - 0x81, 0x08, 0x79, 0x46, 0x79, 0x3c, 0x91, 0x88, 0x00, 0x08, 0x21, 0x0c, - 0x91, 0x8e, 0x00, 0x06, 0x11, 0x38, 0x60, 0x14, 0x90, 0x84, 0x19, 0x84, - 0x90, 0x85, 0x00, 0x12, 0x60, 0x16, 0x0c, 0x10, 0x79, 0x3c, 0x91, 0x88, - 0x00, 0x08, 0x21, 0x0c, 0x91, 0x8e, 0x00, 0x09, 0x0d, 0x90, 0x60, 0x14, - 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x16, 0x60, 0x16, 0x08, 0xa0, - 0x79, 0x3c, 0x21, 0x60, 0x20, 0x09, 0x00, 0x4a, 0x08, 0x0c, 0xb3, 0x52, - 0x08, 0x68, 0x78, 0x48, 0xc0, 0x85, 0x78, 0x4a, 0x08, 0x48, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x0f, - 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0x19, 0xe8, 0x60, 0x20, 0x80, 0x00, - 0x60, 0x22, 0x60, 0x10, 0x90, 0x05, 0x01, 0x48, 0x90, 0x80, 0x00, 0x03, - 0x21, 0x02, 0x61, 0x12, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x61, 0x16, 0x61, 0x12, 0x0c, 0xc0, 0x00, 0xd6, 0x20, 0x69, - 0x19, 0xe8, 0xb8, 0x00, 0xd0, 0xd4, 0x01, 0x68, 0x68, 0x20, 0x80, 0x00, - 0x68, 0x22, 0x90, 0x86, 0x00, 0x01, 0x11, 0x10, 0x2b, 0x00, 0x68, 0x1e, - 0x00, 0xde, 0x08, 0x04, 0x9a, 0xb1, 0x00, 0xde, 0x00, 0x05, 0xc0, 0xd5, - 0xb8, 0x02, 0x68, 0x18, 0x90, 0x05, 0x01, 0x68, 0xb8, 0x56, 0xb8, 0x5b, - 0x00, 0x00, 0x00, 0x86, 0x00, 0x06, 0x2b, 0x00, 0x68, 0x1a, 0x00, 0x8e, - 0xa0, 0x5a, 0x00, 0x8e, 0x20, 0x69, 0x19, 0xe8, 0x0c, 0x08, 0xb8, 0x56, - 0xb8, 0x5a, 0x2b, 0x00, 0x68, 0x1a, 0x68, 0x1e, 0x08, 0xd8, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x0f, - 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0x19, 0xe8, 0x60, 0x20, 0x80, 0x00, - 0x60, 0x22, 0x60, 0x08, 0x90, 0x05, 0x01, 0x48, 0x90, 0x80, 0x00, 0x03, - 0x21, 0x02, 0x61, 0x0a, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x61, 0x0e, 0x61, 0x0a, 0x0c, 0xc0, 0x00, 0xc6, 0x60, 0x0f, - 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0x19, 0xe8, 0x60, 0x34, 0x90, 0x05, - 0x01, 0x30, 0x90, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x36, 0x00, 0xce, - 0x00, 0x05, 0x61, 0x3a, 0x61, 0x36, 0x00, 0xce, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x96, 0x00, 0x76, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, - 0x01, 0x26, 0x90, 0x2e, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x38, 0x26, 0x60, - 0x26, 0x78, 0x20, 0x91, 0x80, 0x00, 0x8c, 0xff, 0x09, 0x04, 0x95, 0xf3, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x92, 0x06, 0x19, 0x04, 0x95, 0xee, - 0x87, 0xff, 0x01, 0x20, 0x60, 0x54, 0x91, 0x06, 0x19, 0x04, 0x95, 0xee, - 0x70, 0x3c, 0x9c, 0x06, 0x11, 0x78, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0xaa, 0x49, 0x70, 0x33, 0x00, 0x00, 0x90, 0x06, 0x70, 0x3e, - 0x70, 0x42, 0x70, 0x46, 0x70, 0x4a, 0x00, 0x3e, 0x20, 0x29, 0x00, 0x01, - 0x70, 0x38, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, - 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, - 0x70, 0x36, 0x00, 0x10, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, - 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xf0, 0x60, 0x14, - 0x20, 0x48, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0xb8, 0x60, 0x04, - 0x90, 0x86, 0x00, 0x40, 0x09, 0x0c, 0xac, 0x1b, 0xa8, 0x67, 0x01, 0x03, - 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x00, 0x16, 0x00, 0x36, 0x00, 0x76, - 0x08, 0x0c, 0xd3, 0xce, 0x08, 0x0c, 0xef, 0x85, 0x08, 0x0c, 0x6e, 0x9f, - 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, - 0xb3, 0x06, 0x00, 0xce, 0x08, 0x04, 0x95, 0x8d, 0x2c, 0x78, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0x04, 0x95, 0x8d, 0x85, 0xff, 0x01, 0x20, 0x00, 0x36, - 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x3e, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x58, 0x00, 0x16, 0x00, 0x36, - 0x00, 0x76, 0x08, 0x0c, 0xef, 0x85, 0x08, 0x0c, 0xeb, 0xd4, 0x00, 0x7e, - 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x90, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, - 0x11, 0x68, 0xa8, 0x7b, 0x00, 0x06, 0x00, 0x16, 0x00, 0x36, 0x00, 0x76, - 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x7e, 0x00, 0x3e, - 0x00, 0x1e, 0x08, 0x18, 0x60, 0x20, 0x90, 0x86, 0x00, 0x0a, 0x09, 0x04, - 0x95, 0xd8, 0x08, 0x04, 0x95, 0xd1, 0x00, 0x06, 0x00, 0x66, 0x00, 0x96, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xf6, 0x90, 0x36, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x79, 0x19, 0xe8, 0x78, 0x38, 0x90, 0x65, 0x09, 0x04, - 0x96, 0x84, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x0f, 0x00, 0x00, 0x78, 0x3c, - 0x9c, 0x06, 0x11, 0x68, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, - 0xaa, 0x49, 0x78, 0x33, 0x00, 0x00, 0x90, 0x1e, 0x7b, 0x3e, 0x7b, 0x42, - 0x7b, 0x46, 0x7b, 0x4a, 0x00, 0x3e, 0x08, 0x0c, 0xd0, 0xd8, 0x05, 0x48, - 0x60, 0x14, 0x20, 0x48, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x90, - 0x3e, 0x08, 0x91, 0x8e, 0x00, 0x02, 0x11, 0x88, 0x60, 0x10, 0x90, 0x05, - 0x01, 0x70, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x01, 0x40, 0x60, 0x40, 0x90, 0x05, 0x11, 0xa8, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x42, 0x00, 0x80, 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, - 0x09, 0x0c, 0xac, 0x1b, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x92, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, - 0xb3, 0x06, 0x00, 0x0e, 0x08, 0x04, 0x96, 0x3c, 0x7e, 0x3a, 0x7e, 0x36, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xde, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x6e, - 0x00, 0x0e, 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, - 0x08, 0x0c, 0xeb, 0xd4, 0x0c, 0x50, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, - 0x11, 0x30, 0xab, 0x7a, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xb2, 0xd3, - 0x0c, 0x10, 0x60, 0x20, 0x90, 0x86, 0x00, 0x0a, 0x09, 0xa8, 0x08, 0x68, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x86, 0x90, 0x46, 0x00, 0x99, 0x08, 0x0c, - 0x97, 0x8f, 0x00, 0x8e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xf6, - 0x01, 0x26, 0x20, 0x79, 0x19, 0xe8, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x98, 0x26, 0x08, 0x0c, 0x98, 0xb6, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0x96, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x66, 0x00, 0x16, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x19, 0xe8, 0x76, 0x14, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, - 0x09, 0x04, 0x97, 0x54, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x92, 0x06, - 0x19, 0x04, 0x97, 0x4f, 0x88, 0xff, 0x01, 0x20, 0x60, 0x54, 0x91, 0x06, - 0x19, 0x04, 0x97, 0x4f, 0x70, 0x24, 0x9c, 0x06, 0x15, 0x68, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x20, 0xd0, 0xa4, 0x01, 0x10, 0xd0, 0xcc, 0x15, 0x08, - 0x08, 0x0c, 0x88, 0xc3, 0x08, 0x0c, 0xa6, 0xe9, 0x68, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, - 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, - 0x00, 0x01, 0x00, 0x3e, 0x00, 0x28, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, - 0x08, 0x04, 0x97, 0x4f, 0x70, 0x14, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, - 0x76, 0x16, 0x70, 0x10, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, - 0x01, 0x18, 0x2f, 0x00, 0x70, 0x12, 0x00, 0x10, 0x70, 0x13, 0x00, 0x00, - 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, - 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xe8, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, - 0x15, 0x80, 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, - 0x00, 0x98, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, - 0x00, 0x16, 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0xd3, 0xce, 0x08, 0x0c, - 0xef, 0x85, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0xaa, 0xf1, - 0x00, 0xce, 0x08, 0x04, 0x96, 0xcd, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x08, 0x04, 0x96, 0xcd, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xbe, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x58, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0xef, 0x85, 0x08, 0x0c, 0xeb, 0xd4, - 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0xd0, 0x08, 0x0c, 0xbc, 0xb6, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x02, 0x11, 0x60, 0x60, 0x04, 0x00, 0x06, - 0x90, 0x86, 0x00, 0x85, 0x00, 0x0e, 0x09, 0x04, 0x97, 0x35, 0x90, 0x86, - 0x00, 0x8b, 0x09, 0x04, 0x97, 0x35, 0x08, 0x40, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x05, 0x19, 0x20, 0x60, 0x04, 0x00, 0x06, 0x90, 0x86, 0x00, 0x85, - 0x00, 0x0e, 0x09, 0xc8, 0x90, 0x86, 0x00, 0x8b, 0x09, 0xb0, 0x08, 0x04, - 0x97, 0x48, 0x00, 0xb6, 0x00, 0xa6, 0x00, 0x96, 0x00, 0xc6, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x92, 0x80, 0x10, 0x00, 0x20, 0x04, - 0x90, 0x5d, 0x09, 0x04, 0x98, 0x1f, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0x66, 0x20, 0x71, 0x19, 0xe8, 0xbe, 0x54, 0x70, 0x18, 0x9b, 0x06, - 0x11, 0x08, 0x76, 0x1a, 0x70, 0x1c, 0x9b, 0x06, 0x11, 0x30, 0x86, 0xff, - 0x11, 0x18, 0x70, 0x18, 0x70, 0x1e, 0x00, 0x08, 0x76, 0x1e, 0xb8, 0x58, - 0x90, 0x4d, 0x01, 0x08, 0xae, 0x56, 0x96, 0xd5, 0x00, 0x00, 0x01, 0x10, - 0x29, 0x00, 0xb0, 0x5a, 0xb8, 0x57, 0x00, 0x00, 0xb8, 0x5b, 0x00, 0x00, - 0xb8, 0x00, 0xc0, 0xd4, 0xc0, 0xdc, 0xb8, 0x02, 0x08, 0x0c, 0x66, 0x4c, - 0x09, 0x04, 0x98, 0x1b, 0x76, 0x24, 0x86, 0xff, 0x09, 0x04, 0x98, 0x0a, - 0x96, 0x80, 0x00, 0x05, 0x20, 0x04, 0x99, 0x06, 0x15, 0xd8, 0x00, 0xd6, - 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x05, 0x60, 0x08, 0x0c, - 0x88, 0xc3, 0x08, 0x0c, 0xa6, 0xe9, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, - 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, - 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, - 0x00, 0x3e, 0x00, 0xde, 0x00, 0xc6, 0xb8, 0x3c, 0x90, 0x05, 0x01, 0x10, - 0x80, 0x01, 0xb8, 0x3e, 0x26, 0x60, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xce, - 0x00, 0x48, 0x00, 0xde, 0x00, 0xc6, 0x26, 0x60, 0x60, 0x03, 0x00, 0x09, - 0x63, 0x0a, 0x00, 0xce, 0x08, 0x04, 0x97, 0xc2, 0x89, 0xff, 0x01, 0x58, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0xd3, 0xce, 0x08, 0x0c, 0xef, 0x85, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, - 0xaa, 0xf1, 0x08, 0x04, 0x97, 0xc2, 0x00, 0x6e, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xce, 0x00, 0x9e, 0x00, 0xae, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0x96, 0x00, 0x06, 0x00, 0x66, 0x00, 0xc6, - 0x00, 0xd6, 0x90, 0x36, 0x78, 0x14, 0x90, 0x65, 0x09, 0x04, 0x98, 0x89, - 0x60, 0x0c, 0x00, 0x06, 0x60, 0x0f, 0x00, 0x00, 0x78, 0x24, 0x9c, 0x06, - 0x15, 0x80, 0x20, 0x69, 0x01, 0x00, 0x68, 0x20, 0xd0, 0xa4, 0x01, 0x10, - 0xd0, 0xcc, 0x15, 0x08, 0x08, 0x0c, 0x88, 0xc3, 0x08, 0x0c, 0xa6, 0xe9, - 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xac, 0x1b, 0x78, 0x27, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, - 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, - 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, - 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x40, 0x08, 0x0c, - 0x6a, 0x3b, 0x15, 0x20, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x2c, 0x30, - 0x00, 0xf8, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd6, 0x01, 0xb0, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x08, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x60, 0x08, 0x0c, 0x6a, 0x3b, - 0x11, 0x68, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, - 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, 0xb3, 0x06, - 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0x0e, 0x08, 0x04, 0x98, 0x2d, 0x7e, 0x16, - 0x7e, 0x12, 0x00, 0xde, 0x00, 0xce, 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, - 0xeb, 0xd4, 0x0c, 0x50, 0x08, 0x0c, 0xbc, 0xb6, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x50, 0x60, 0x04, 0x00, 0x06, 0x90, 0x86, 0x00, 0x85, - 0x00, 0x0e, 0x09, 0x90, 0x90, 0x86, 0x00, 0x8b, 0x09, 0x78, 0x08, 0xd0, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x05, 0x19, 0xb0, 0x60, 0x04, 0x00, 0x06, - 0x90, 0x86, 0x00, 0x85, 0x00, 0x0e, 0x0d, 0x18, 0x90, 0x86, 0x00, 0x8b, - 0x0d, 0x00, 0x08, 0x60, 0x00, 0x06, 0x00, 0x66, 0x00, 0x96, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0xd6, 0x78, 0x18, 0x90, 0x5d, 0x09, 0x04, 0x99, 0x36, - 0xb8, 0x54, 0x00, 0x06, 0x90, 0x06, 0xb8, 0x56, 0xb8, 0x5a, 0xb8, 0x00, - 0xc0, 0xd4, 0xc0, 0xdc, 0xb8, 0x02, 0x08, 0x0c, 0x66, 0x4c, 0x09, 0x04, - 0x99, 0x33, 0x7e, 0x24, 0x86, 0xff, 0x09, 0x04, 0x99, 0x26, 0x96, 0x80, - 0x00, 0x05, 0x20, 0x04, 0x99, 0x06, 0x19, 0x04, 0x99, 0x26, 0x00, 0xd6, - 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x09, 0x04, 0x99, 0x1d, - 0x08, 0x0c, 0x88, 0xc3, 0x08, 0x0c, 0xa6, 0xe9, 0x68, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0xac, 0x1b, 0x78, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, - 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, - 0x00, 0x01, 0x00, 0x3e, 0x00, 0xde, 0x00, 0xc6, 0x3e, 0x08, 0x91, 0x8e, - 0x00, 0x02, 0x11, 0x68, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x50, 0x96, 0x80, - 0x00, 0x10, 0x20, 0x0c, 0x81, 0xff, 0x15, 0x18, 0x20, 0x09, 0x19, 0x88, - 0x21, 0x0c, 0x21, 0x02, 0x00, 0xf0, 0xb8, 0x3c, 0x90, 0x05, 0x01, 0x10, - 0x80, 0x01, 0xb8, 0x3e, 0x26, 0x60, 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, - 0xb3, 0x06, 0x00, 0xce, 0x00, 0x48, 0x00, 0xde, 0x00, 0xc6, 0x26, 0x60, - 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x00, 0xce, 0x08, 0x04, 0x98, 0xc9, - 0x89, 0xff, 0x01, 0x38, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xaa, 0xf1, 0x08, 0x04, - 0x98, 0xc9, 0x00, 0x0e, 0x08, 0x04, 0x98, 0xbd, 0x78, 0x1e, 0x78, 0x1a, - 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, 0x00, 0x66, 0xb8, 0x00, - 0xd0, 0xdc, 0x01, 0xa0, 0xb8, 0x4c, 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x78, - 0x96, 0x06, 0x11, 0x70, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x24, 0x90, 0x35, - 0x01, 0x48, 0x90, 0x80, 0x00, 0x05, 0x20, 0x04, 0x99, 0x06, 0x11, 0x20, - 0xb8, 0x00, 0xc0, 0xdc, 0xb8, 0x02, 0x00, 0x29, 0x00, 0x6e, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x78, 0xc0, 0x90, 0x05, 0x11, 0x38, 0x00, 0xc6, 0x26, 0x60, 0x60, 0x03, - 0x00, 0x09, 0x63, 0x0a, 0x00, 0xce, 0x04, 0xb8, 0x08, 0x0c, 0xa6, 0xe9, - 0x78, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x79, 0x01, 0x40, 0x7b, 0x04, 0x93, 0x84, 0x10, 0x00, - 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, - 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x79, 0x01, 0x00, 0x78, 0x24, 0xd0, 0x84, - 0x01, 0x10, 0x78, 0x27, 0x00, 0x01, 0x08, 0x0c, 0xac, 0x1b, 0x00, 0x3e, - 0x08, 0x0c, 0x66, 0x4c, 0x00, 0xc6, 0xb8, 0x3c, 0x90, 0x05, 0x01, 0x10, - 0x80, 0x01, 0xb8, 0x3e, 0x26, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0xd3, 0xce, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x11, 0x01, 0x01, - 0x22, 0x04, 0xc0, 0xc4, 0x20, 0x12, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x14, - 0xc2, 0xe4, 0x22, 0x02, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x04, 0x90, 0x84, - 0x00, 0x07, 0x00, 0x02, 0x99, 0xc2, 0x99, 0xc6, 0x99, 0xe4, 0x9a, 0x0d, - 0x9a, 0x4b, 0x99, 0xc2, 0x99, 0xdd, 0x99, 0xc0, 0x08, 0x0c, 0x0d, 0xc5, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x70, 0x24, 0x90, 0x65, - 0x01, 0x48, 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, 0x60, 0x0c, 0x90, 0x15, - 0x01, 0x58, 0x72, 0x16, 0x60, 0x0f, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, - 0x70, 0x27, 0x00, 0x00, 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, - 0x72, 0x16, 0x72, 0x12, 0x0c, 0xa8, 0x70, 0x07, 0x00, 0x00, 0x70, 0x27, - 0x00, 0x00, 0x70, 0x20, 0x90, 0x05, 0x00, 0x70, 0x60, 0x10, 0x20, 0x58, - 0x08, 0x0c, 0x66, 0x4c, 0xb8, 0x00, 0xc0, 0xdc, 0xb8, 0x02, 0x70, 0x07, - 0x00, 0x00, 0x70, 0x27, 0x00, 0x00, 0x70, 0x20, 0x80, 0x01, 0x70, 0x22, - 0x11, 0x48, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x14, 0xd2, 0xec, 0x11, 0x80, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0xb8, 0x54, 0x90, 0x15, - 0x01, 0x20, 0x72, 0x1e, 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0xa8, 0x72, 0x18, - 0x72, 0x1e, 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0x80, 0xc2, 0xec, 0x22, 0x02, - 0x08, 0x0c, 0x9b, 0xd3, 0x0c, 0x58, 0x70, 0x24, 0x90, 0x65, 0x05, 0xb8, - 0x70, 0x0c, 0x9c, 0x06, 0x11, 0x60, 0x08, 0x0c, 0xaa, 0xf1, 0x60, 0x0c, - 0x90, 0x15, 0x01, 0x20, 0x72, 0x0e, 0x60, 0x0f, 0x00, 0x00, 0x04, 0x48, - 0x72, 0x0e, 0x72, 0x0a, 0x04, 0x30, 0x70, 0x14, 0x9c, 0x06, 0x11, 0x60, - 0x08, 0x0c, 0xaa, 0xf1, 0x60, 0x0c, 0x90, 0x15, 0x01, 0x20, 0x72, 0x16, - 0x60, 0x0f, 0x00, 0x00, 0x00, 0xd0, 0x72, 0x16, 0x72, 0x12, 0x00, 0xb8, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x11, 0x98, 0x60, 0x10, 0x20, 0x58, - 0x08, 0x0c, 0x66, 0x4c, 0xb8, 0x00, 0xc0, 0xdc, 0xb8, 0x02, 0x08, 0x0c, - 0xaa, 0xf1, 0x70, 0x1c, 0x90, 0x65, 0x01, 0x38, 0xb8, 0x54, 0x90, 0x15, - 0x01, 0x10, 0x72, 0x1e, 0x00, 0x10, 0x72, 0x18, 0x72, 0x1e, 0x70, 0x27, - 0x00, 0x00, 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x70, 0x24, - 0x90, 0x65, 0x01, 0x40, 0x08, 0x0c, 0xaa, 0xf1, 0x60, 0x0c, 0x90, 0x15, - 0x01, 0x58, 0x72, 0x0e, 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0xac, 0x1b, - 0x70, 0x27, 0x00, 0x00, 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, - 0x72, 0x0e, 0x72, 0x0a, 0x0c, 0xa8, 0x00, 0xd6, 0x20, 0x69, 0x19, 0xe8, - 0x68, 0x30, 0x90, 0x84, 0x00, 0x03, 0x00, 0x02, 0x9a, 0x6e, 0x9a, 0x70, - 0x9a, 0x94, 0x9a, 0x6c, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xc6, 0x68, 0x40, 0x90, 0x86, 0x00, 0x01, 0x01, 0xb8, 0x68, 0x3c, - 0x90, 0x65, 0x01, 0x30, 0x60, 0x0c, 0x90, 0x15, 0x01, 0x70, 0x6a, 0x3a, - 0x60, 0x0f, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, - 0x20, 0x11, 0x1a, 0x07, 0x20, 0x13, 0x00, 0x00, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x05, 0x68, 0x3a, 0x68, 0x36, 0x0c, 0x90, 0x68, 0x43, 0x00, 0x00, - 0x68, 0x38, 0x90, 0x65, 0x0d, 0x68, 0x60, 0x03, 0x00, 0x03, 0x0c, 0x50, - 0x00, 0xc6, 0x90, 0x06, 0x68, 0x42, 0x68, 0x46, 0x68, 0x4a, 0x68, 0x3c, - 0x90, 0x65, 0x01, 0x60, 0x60, 0x0c, 0x90, 0x15, 0x01, 0x30, 0x6a, 0x3a, - 0x60, 0x0f, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, 0x00, 0x18, 0x68, 0x3e, - 0x68, 0x3a, 0x68, 0x36, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xe5, 0x21, 0x02, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xd1, 0xec, 0x01, 0x20, 0xc1, 0xec, 0x21, 0x02, - 0x08, 0x0c, 0x9b, 0xd3, 0x20, 0x01, 0x19, 0xf4, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x01, 0x0d, 0x58, 0x00, 0xd6, 0x20, 0x69, 0x19, 0xe8, 0x68, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x00, 0x06, 0x90, 0x05, 0x11, 0xc8, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, 0x00, 0x28, 0x11, 0x98, 0x20, 0x01, - 0x19, 0x7c, 0x20, 0x04, 0x90, 0x86, 0xaa, 0xaa, 0x01, 0x68, 0x20, 0x01, - 0x18, 0x8b, 0x20, 0x04, 0xd0, 0x8c, 0x11, 0x18, 0xd0, 0x84, 0x11, 0x18, - 0x00, 0x28, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x0e, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x0e, 0x00, 0x02, 0x9a, 0xee, 0x9b, 0xa7, 0x9b, 0xa7, 0x9b, 0xa7, - 0x9b, 0xa7, 0x9b, 0xa9, 0x9b, 0xa7, 0x9a, 0xec, 0x08, 0x0c, 0x0d, 0xc5, - 0x68, 0x20, 0x90, 0x05, 0x11, 0x10, 0x00, 0xde, 0x00, 0x05, 0x00, 0xc6, - 0x68, 0x0c, 0x90, 0x65, 0x01, 0xf0, 0x61, 0x04, 0x91, 0x8e, 0x00, 0x40, - 0x11, 0x80, 0x20, 0x09, 0x18, 0x37, 0x21, 0x0c, 0x91, 0x8c, 0x00, 0x28, - 0x11, 0x50, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x38, 0x00, 0x06, 0x20, 0x09, - 0x18, 0x8b, 0x21, 0x04, 0xc0, 0x95, 0x20, 0x0a, 0x00, 0x0e, 0x68, 0x07, - 0x00, 0x04, 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, 0x08, 0x0c, 0x9c, 0x7c, - 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x68, 0x14, 0x90, 0x65, 0x01, 0x50, - 0x68, 0x07, 0x00, 0x01, 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, 0x08, 0x0c, - 0x9c, 0x7c, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, - 0x6a, 0x1c, 0x92, 0xdd, 0x00, 0x00, 0x09, 0x04, 0x9b, 0x91, 0xb8, 0x4c, - 0x90, 0x0d, 0x01, 0x18, 0xb8, 0x88, 0x90, 0x05, 0x01, 0xa0, 0xb8, 0x54, - 0x90, 0x5d, 0x01, 0x20, 0x92, 0x0e, 0x09, 0x04, 0x9b, 0x91, 0x00, 0x28, - 0x68, 0x18, 0x92, 0x0e, 0x09, 0x04, 0x9b, 0x91, 0x20, 0x58, 0xb8, 0x4c, - 0x90, 0x0d, 0x0d, 0x88, 0xb8, 0x88, 0x90, 0x05, 0x1d, 0x70, 0x2b, 0x00, - 0x68, 0x1e, 0xbb, 0x3c, 0xb8, 0x38, 0x93, 0x02, 0x1e, 0x40, 0x08, 0x0c, - 0xb2, 0xaa, 0x09, 0x04, 0x9b, 0x91, 0x83, 0x18, 0xbb, 0x3e, 0x61, 0x16, - 0x2b, 0x10, 0x62, 0x12, 0x00, 0x96, 0x21, 0x48, 0xa8, 0x80, 0x90, 0x84, - 0x00, 0xff, 0x60, 0x5e, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x84, 0x00, 0x9e, - 0x90, 0x8a, 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, - 0x80, 0x1b, 0x83, 0x1b, 0x93, 0x18, 0x63, 0x1a, 0x61, 0x14, 0x00, 0x96, - 0x21, 0x48, 0xa9, 0x64, 0x00, 0x9e, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x8e, - 0x00, 0x48, 0x05, 0x38, 0x00, 0xf6, 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, - 0xba, 0xc0, 0x62, 0x9a, 0x20, 0x69, 0x02, 0x00, 0x20, 0x71, 0x02, 0x40, - 0x08, 0x0c, 0xa2, 0x19, 0x20, 0x69, 0x19, 0xe8, 0xbb, 0x00, 0xc3, 0xdd, - 0xbb, 0x02, 0x68, 0x07, 0x00, 0x02, 0x2f, 0x18, 0x6b, 0x26, 0x68, 0x2b, - 0x00, 0x00, 0x78, 0x23, 0x00, 0x03, 0x78, 0x03, 0x00, 0x01, 0x78, 0x07, - 0x00, 0x40, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xee, 0x00, 0xbe, 0x00, 0xce, 0x0c, 0xd0, 0x68, 0x07, - 0x00, 0x06, 0x2c, 0x18, 0x6b, 0x26, 0x68, 0x20, 0x80, 0x01, 0x68, 0x22, - 0x68, 0x2b, 0x00, 0x00, 0x08, 0x0c, 0x66, 0x4c, 0x08, 0x0c, 0xb0, 0xea, - 0x00, 0xee, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xc6, 0x68, 0x0c, 0x90, 0x65, 0x01, 0xd8, 0x61, 0x04, - 0x91, 0x8e, 0x00, 0x40, 0x11, 0x80, 0x20, 0x09, 0x18, 0x37, 0x21, 0x0c, - 0x91, 0x8c, 0x00, 0x28, 0x11, 0x50, 0x08, 0x0c, 0x76, 0x37, 0x01, 0x38, - 0x00, 0x06, 0x20, 0x09, 0x18, 0x8b, 0x21, 0x04, 0xc0, 0x95, 0x20, 0x0a, - 0x00, 0x0e, 0x68, 0x07, 0x00, 0x04, 0x68, 0x26, 0x68, 0x2b, 0x00, 0x00, - 0x08, 0x0c, 0x9c, 0x7c, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x14, 0xc2, 0xed, 0x22, 0x02, 0x00, 0xde, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xd6, 0x20, 0x69, 0x19, 0xe8, 0x68, 0x30, - 0x90, 0x86, 0x00, 0x00, 0x15, 0x70, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x14, - 0xd2, 0xe4, 0x01, 0x30, 0xc2, 0xe4, 0x22, 0x02, 0x08, 0x0c, 0x9a, 0xc0, - 0x20, 0x69, 0x19, 0xe8, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xd1, 0xc4, - 0x15, 0x08, 0x68, 0x38, 0x90, 0x7d, 0x01, 0xd8, 0x6a, 0x04, 0x92, 0x96, - 0x00, 0x00, 0x19, 0x04, 0x9c, 0x70, 0x79, 0x20, 0x91, 0x8e, 0x00, 0x09, - 0x05, 0x68, 0x68, 0x33, 0x00, 0x01, 0x68, 0x3e, 0x68, 0x47, 0x00, 0x00, - 0x68, 0x4b, 0x00, 0x00, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x24, 0x00, - 0x00, 0x2e, 0x08, 0x0c, 0x1c, 0x79, 0x11, 0x58, 0x01, 0x2e, 0x08, 0x0c, - 0xa5, 0x46, 0x00, 0xde, 0x00, 0xfe, 0x00, 0x05, 0xc1, 0xc4, 0x21, 0x02, - 0x08, 0x0c, 0x76, 0xe4, 0x08, 0xd0, 0x01, 0x2e, 0x68, 0x43, 0x00, 0x00, - 0x78, 0x03, 0x00, 0x02, 0x78, 0x0c, 0x90, 0x15, 0x01, 0x40, 0x6a, 0x3a, - 0x78, 0x0f, 0x00, 0x00, 0x68, 0x33, 0x00, 0x00, 0x68, 0x3f, 0x00, 0x00, - 0x0c, 0x40, 0x68, 0x3a, 0x68, 0x36, 0x0c, 0xc0, 0x79, 0x08, 0xd1, 0xfc, - 0x11, 0x98, 0x68, 0x33, 0x00, 0x01, 0x68, 0x3e, 0x68, 0x47, 0x00, 0x00, - 0x68, 0x4b, 0x00, 0x00, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x24, 0x00, - 0x00, 0x2e, 0x08, 0x0c, 0x1c, 0x79, 0x19, 0xd8, 0x01, 0x2e, 0x08, 0x0c, - 0xa4, 0xc7, 0x08, 0x78, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, - 0x00, 0x28, 0x11, 0x88, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x86, - 0xaa, 0xaa, 0x01, 0x58, 0x20, 0x01, 0x19, 0xe9, 0x20, 0x04, 0x90, 0x05, - 0x11, 0xf0, 0x20, 0x01, 0x18, 0x8b, 0x20, 0x0c, 0xc1, 0x85, 0xc1, 0x8c, - 0x21, 0x02, 0x2f, 0x00, 0x68, 0x33, 0x00, 0x01, 0x68, 0x3e, 0x68, 0x47, - 0x00, 0x00, 0x68, 0x4b, 0x00, 0x00, 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, - 0x24, 0x00, 0x00, 0x2e, 0x08, 0x0c, 0x1c, 0x79, 0x19, 0x04, 0x9c, 0x11, - 0x01, 0x2e, 0x6a, 0x3c, 0x22, 0x78, 0x08, 0x0c, 0xa4, 0x51, 0x08, 0x04, - 0x9c, 0x09, 0x20, 0x11, 0x18, 0x8b, 0x22, 0x04, 0xc0, 0x8d, 0x20, 0x12, - 0x08, 0x04, 0x9c, 0x09, 0x6a, 0x04, 0x92, 0x96, 0x00, 0x06, 0x19, 0x04, - 0x9b, 0xcb, 0x6a, 0x30, 0x92, 0x96, 0x00, 0x00, 0x09, 0x04, 0x9b, 0xf3, - 0x08, 0x04, 0x9b, 0xcb, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x0b, - 0x00, 0x05, 0x9c, 0x90, 0x9c, 0x95, 0xa1, 0x49, 0xa1, 0xe2, 0x9c, 0x95, - 0xa1, 0x49, 0xa1, 0xe2, 0x9c, 0x90, 0x9c, 0x95, 0x9c, 0x90, 0x9c, 0x90, - 0x9c, 0x90, 0x9c, 0x90, 0x9c, 0x90, 0x9c, 0x90, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x56, 0x01, 0x36, - 0x01, 0x46, 0x01, 0xc6, 0x01, 0xd6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x00, 0xf6, 0x20, 0x69, 0x02, 0x00, 0x20, 0x71, 0x02, 0x40, 0x60, 0x04, - 0x90, 0x8a, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, 0x61, 0x10, 0x21, 0x58, - 0xb9, 0xc0, 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0x90, 0x8a, - 0x00, 0x40, 0x1a, 0x04, 0x9d, 0x01, 0x00, 0x5b, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, 0x01, 0x4e, 0x01, 0x3e, - 0x01, 0x5e, 0x00, 0xbe, 0x00, 0x05, 0x9e, 0xaa, 0x9e, 0xe5, 0x9f, 0x0e, - 0x9f, 0xd8, 0x9f, 0xfa, 0xa0, 0x00, 0xa0, 0x0d, 0xa0, 0x15, 0xa0, 0x21, - 0xa0, 0x27, 0xa0, 0x38, 0xa0, 0x27, 0xa0, 0x90, 0xa0, 0x15, 0xa0, 0x9c, - 0xa0, 0xa2, 0xa0, 0x21, 0xa0, 0xa2, 0xa0, 0xae, 0x9c, 0xff, 0x9c, 0xff, - 0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, - 0x9c, 0xff, 0x9c, 0xff, 0x9c, 0xff, 0xa9, 0x00, 0xa9, 0x23, 0xa9, 0x34, - 0xa9, 0x54, 0xa9, 0x86, 0xa0, 0x0d, 0x9c, 0xff, 0xa0, 0x0d, 0xa0, 0x27, - 0x9c, 0xff, 0x9f, 0x0e, 0x9f, 0xd8, 0x9c, 0xff, 0xad, 0x12, 0xa0, 0x27, - 0x9c, 0xff, 0xad, 0x2e, 0xa0, 0x27, 0x9c, 0xff, 0xa0, 0x21, 0x9e, 0xa4, - 0x9d, 0x22, 0x9c, 0xff, 0xad, 0x4a, 0xad, 0xb7, 0xae, 0x92, 0x9c, 0xff, - 0xae, 0x9f, 0xa0, 0x0a, 0xae, 0xca, 0x9c, 0xff, 0xa9, 0x90, 0xae, 0xf7, - 0x9c, 0xff, 0x08, 0x0c, 0x0d, 0xc5, 0x21, 0x00, 0x00, 0x5b, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xbe, 0x00, 0x05, 0xaf, 0x92, 0xb0, 0x44, - 0x9d, 0x20, 0x9d, 0x5a, 0x9e, 0x06, 0x9e, 0x11, 0x9d, 0x20, 0xa0, 0x0d, - 0x9d, 0x20, 0x9e, 0x6b, 0x9e, 0x77, 0x9d, 0x75, 0x9d, 0x20, 0x9d, 0x90, - 0x9d, 0xc4, 0xb1, 0xb1, 0xb1, 0xf6, 0xa0, 0x27, 0x08, 0x0c, 0x0d, 0xc5, - 0x00, 0xd6, 0x00, 0x96, 0x08, 0x0c, 0xa0, 0xc1, 0x00, 0x26, 0x00, 0x36, - 0x78, 0x14, 0x20, 0x48, 0xa9, 0x58, 0xd1, 0xcc, 0x11, 0x38, 0x20, 0x09, - 0x24, 0x14, 0x20, 0x11, 0x00, 0x18, 0x20, 0x19, 0x00, 0x18, 0x00, 0x30, - 0x20, 0x09, 0x24, 0x10, 0x20, 0x11, 0x00, 0x14, 0x20, 0x19, 0x00, 0x14, - 0x71, 0x02, 0x72, 0x06, 0x70, 0x0b, 0x08, 0x00, 0xa8, 0x3c, 0x70, 0x0e, - 0xa8, 0x50, 0x70, 0x22, 0xa8, 0x54, 0x70, 0x26, 0x63, 0xc2, 0x08, 0x0c, - 0xa6, 0xbd, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, - 0x78, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xa0, 0x00, 0xbe, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x18, 0x90, 0x84, 0xff, 0x80, 0x01, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, 0x08, 0x0c, 0xa0, 0xc1, - 0x70, 0x03, 0x05, 0x00, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x74, 0x70, 0x0a, - 0xa8, 0x78, 0x70, 0x0e, 0xa8, 0x7c, 0x70, 0x12, 0xa8, 0x80, 0x70, 0x16, - 0xa8, 0x84, 0x70, 0x1a, 0xa8, 0x88, 0x70, 0x1e, 0x60, 0xc3, 0x00, 0x10, - 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x96, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x05, 0x00, 0x78, 0x14, - 0x20, 0x48, 0xa8, 0xcc, 0x70, 0x0a, 0xa8, 0xd0, 0x70, 0x0e, 0xa8, 0xd4, - 0x70, 0x12, 0xa8, 0xd8, 0x70, 0x16, 0xa8, 0xdc, 0x70, 0x1a, 0xa8, 0xe0, - 0x70, 0x1e, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xa0, 0xc1, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x01, - 0x19, 0xa4, 0x20, 0x03, 0x00, 0x00, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x14, - 0x80, 0x03, 0x60, 0xc2, 0xa8, 0x30, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0x98, 0x20, 0x01, 0x19, 0xa4, - 0x00, 0x16, 0x20, 0x0c, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x23, 0xee, - 0x08, 0x0c, 0xde, 0x7c, 0x90, 0x06, 0x08, 0x0c, 0x23, 0xee, 0x00, 0x1e, - 0xa8, 0x04, 0x90, 0x05, 0x01, 0x10, 0x20, 0x48, 0x0c, 0x28, 0x04, 0xd9, - 0x08, 0x0c, 0xa6, 0xbd, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xa1, 0x0c, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x01, 0x19, 0xa4, 0x20, 0x03, - 0x00, 0x00, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x6f, 0x02, 0x00, 0xa8, 0x73, - 0x00, 0x00, 0xa8, 0x14, 0x80, 0x03, 0x60, 0xc2, 0xa8, 0x30, 0x20, 0xa8, - 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0x98, - 0x20, 0x01, 0x19, 0xa4, 0x00, 0x16, 0x20, 0x0c, 0x08, 0x0c, 0xde, 0x7c, - 0x00, 0x1e, 0xa8, 0x04, 0x90, 0x05, 0x01, 0x10, 0x20, 0x48, 0x0c, 0x60, - 0x00, 0x51, 0x78, 0x14, 0x20, 0x48, 0x08, 0x0c, 0x0f, 0xc0, 0x08, 0x0c, - 0xa6, 0xbd, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x60, 0xc0, - 0x80, 0x04, 0x90, 0x84, 0x00, 0x03, 0x90, 0x05, 0x01, 0x30, 0x90, 0x82, - 0x00, 0x04, 0x20, 0xa3, 0x00, 0x00, 0x80, 0x00, 0x1d, 0xe0, 0x00, 0x05, - 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x78, 0x00, 0x78, 0x08, 0x80, 0x07, - 0x70, 0x0a, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xd6, - 0x00, 0xe6, 0x08, 0x0c, 0xa1, 0x0c, 0x78, 0x14, 0x90, 0x84, 0xff, 0x00, - 0x20, 0x73, 0x02, 0x00, 0x8e, 0x70, 0x8e, 0x70, 0x90, 0x96, 0xdf, 0x00, - 0x01, 0x38, 0x90, 0x96, 0xe0, 0x00, 0x01, 0x20, 0x20, 0x73, 0x00, 0x10, - 0x8e, 0x70, 0x00, 0x30, 0x90, 0x95, 0x00, 0x10, 0x22, 0x72, 0x8e, 0x70, - 0x20, 0x73, 0x00, 0x34, 0x8e, 0x70, 0x20, 0x69, 0x18, 0x05, 0x20, 0xa9, - 0x00, 0x04, 0x2d, 0x76, 0x8d, 0x68, 0x8e, 0x70, 0x1f, 0x04, 0x9e, 0x31, - 0x20, 0x69, 0x18, 0x01, 0x20, 0xa9, 0x00, 0x04, 0x2d, 0x76, 0x8d, 0x68, - 0x8e, 0x70, 0x1f, 0x04, 0x9e, 0x3a, 0x90, 0x96, 0xdf, 0x00, 0x01, 0x30, - 0x90, 0x96, 0xe0, 0x00, 0x01, 0x18, 0x60, 0xc3, 0x00, 0x18, 0x00, 0xf0, - 0x20, 0x69, 0x19, 0xb4, 0x90, 0x86, 0xdf, 0x00, 0x01, 0x10, 0x20, 0x69, - 0x19, 0xce, 0x20, 0xa9, 0x00, 0x1a, 0x9e, 0x86, 0x02, 0x60, 0x11, 0x48, - 0x00, 0xc6, 0x20, 0x61, 0x02, 0x00, 0x60, 0x10, 0x80, 0x00, 0x60, 0x12, - 0x00, 0xce, 0x20, 0x71, 0x02, 0x40, 0x2d, 0x04, 0x80, 0x07, 0x20, 0x72, - 0x8d, 0x68, 0x8e, 0x70, 0x1f, 0x04, 0x9e, 0x51, 0x60, 0xc3, 0x00, 0x4c, - 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, - 0xa0, 0xc1, 0x70, 0x03, 0x63, 0x00, 0x70, 0x07, 0x00, 0x28, 0x78, 0x08, - 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xd6, - 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x00, - 0x78, 0x14, 0x70, 0x0e, 0x00, 0xe6, 0x9e, 0xf0, 0x00, 0x04, 0x20, 0x09, - 0x00, 0x01, 0x20, 0x11, 0x00, 0x0c, 0x20, 0x69, 0x19, 0x24, 0x68, 0x10, - 0xd0, 0x84, 0x11, 0x48, 0x20, 0x73, 0x05, 0x00, 0x8e, 0x70, 0x20, 0x73, - 0x00, 0x00, 0x8e, 0x70, 0x81, 0x08, 0x92, 0x90, 0x00, 0x04, 0x20, 0x73, - 0x08, 0x00, 0x8e, 0x70, 0x20, 0x73, 0x00, 0x00, 0x00, 0xee, 0x72, 0x06, - 0x71, 0x0a, 0x62, 0xc2, 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0xde, 0x00, 0x05, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x60, 0x9a, - 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x52, 0x00, - 0x20, 0x69, 0x18, 0x47, 0x68, 0x04, 0xd0, 0x84, 0x01, 0x30, 0x68, 0x28, - 0x00, 0x16, 0x08, 0x0c, 0x28, 0xa6, 0x71, 0x0e, 0x00, 0x1e, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x50, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x99, 0x18, 0x01, 0x20, 0xa1, 0x02, 0x54, 0x40, 0x03, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x20, 0xb8, 0xa0, 0x90, 0x82, 0x00, 0x7f, 0x02, 0x48, - 0x20, 0x01, 0x18, 0x1f, 0x20, 0x04, 0x70, 0x32, 0x20, 0x01, 0x18, 0x20, - 0x20, 0x04, 0x70, 0x36, 0x00, 0x30, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x70, 0x36, 0x60, 0xc3, 0x00, 0x1c, 0x08, 0x04, - 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x05, 0x00, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0x20, 0xb8, 0xa0, 0x90, 0x82, 0x00, 0x7f, 0x02, 0x48, - 0x20, 0x01, 0x18, 0x1f, 0x20, 0x04, 0x70, 0x0a, 0x20, 0x01, 0x18, 0x20, - 0x20, 0x04, 0x70, 0x0e, 0x00, 0x30, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x70, 0x0e, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x50, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x04, 0xa6, 0xbd, - 0x08, 0x0c, 0xa0, 0xc1, 0x90, 0x06, 0x08, 0x0c, 0x6a, 0x6d, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x11, 0x70, 0x20, 0x11, 0x02, 0x40, 0x20, 0x13, - 0x22, 0xff, 0x20, 0x11, 0x02, 0x41, 0x20, 0x13, 0xff, 0xfe, 0x70, 0x03, - 0x04, 0x00, 0x62, 0x0c, 0xc2, 0xb4, 0x62, 0x0e, 0x00, 0x58, 0x78, 0x14, - 0x00, 0x96, 0x90, 0x4d, 0x01, 0x20, 0x90, 0x06, 0xa8, 0x9a, 0xa8, 0xa6, - 0xa8, 0xaa, 0x00, 0x9e, 0x70, 0x03, 0x03, 0x00, 0xb8, 0xa0, 0x90, 0x86, - 0x00, 0x7e, 0x19, 0x04, 0x9f, 0x98, 0x00, 0xd6, 0x20, 0x69, 0x19, 0x6c, - 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x88, 0x68, 0x00, - 0x70, 0x0a, 0x68, 0x08, 0x90, 0x84, 0x20, 0x00, 0x70, 0x12, 0x08, 0x0c, - 0xb2, 0x54, 0x68, 0x0c, 0x70, 0x16, 0x70, 0x1f, 0x27, 0x10, 0x68, 0x18, - 0x70, 0x22, 0x68, 0x1c, 0x70, 0x26, 0x04, 0x28, 0x68, 0x00, 0x70, 0x0a, - 0x68, 0x04, 0x70, 0x0e, 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, - 0x01, 0x10, 0x20, 0x01, 0x00, 0x02, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x08, 0x0c, 0x76, 0x37, 0x11, 0x28, 0x78, 0xe3, 0x00, 0x00, 0x08, 0x0c, - 0x28, 0xe7, 0x78, 0xe2, 0x00, 0xfe, 0x68, 0x08, 0x08, 0x0c, 0x76, 0x37, - 0x11, 0x18, 0x90, 0x84, 0x37, 0xff, 0x00, 0x10, 0x90, 0x84, 0x3f, 0xff, - 0x70, 0x12, 0x08, 0x0c, 0xb2, 0x54, 0x68, 0x0c, 0x70, 0x16, 0x00, 0xde, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x56, 0x40, 0x03, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x99, 0x18, 0x01, 0x20, 0xa1, 0x02, 0x5a, 0x40, 0x03, - 0x00, 0xd6, 0x08, 0x0c, 0xaf, 0x79, 0x20, 0x69, 0x19, 0x74, 0x20, 0x71, - 0x02, 0x4e, 0x68, 0x00, 0xc0, 0xdd, 0x70, 0x02, 0x08, 0x0c, 0x57, 0xd9, - 0xd0, 0xe4, 0x01, 0x10, 0x68, 0x0c, 0x70, 0x0e, 0x00, 0xde, 0x04, 0xe0, - 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0xa8, 0x00, 0x16, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x09, 0x00, 0x02, - 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x0c, 0x60, 0xe0, 0x91, 0x06, - 0x01, 0x30, 0x21, 0x00, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x28, 0xe7, - 0x61, 0xe2, 0x00, 0x1e, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x19, 0x6c, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x20, 0xa9, 0x00, 0x08, - 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0x18, 0x05, 0x20, 0xa1, - 0x02, 0x56, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0x18, 0x01, - 0x20, 0xa1, 0x02, 0x5a, 0x40, 0x03, 0x08, 0x0c, 0xaf, 0x79, 0x20, 0xa1, - 0x02, 0x4e, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x99, 0x19, 0x74, 0x40, 0x03, - 0x60, 0xc3, 0x00, 0x74, 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xc1, - 0x70, 0x03, 0x20, 0x10, 0x70, 0x07, 0x00, 0x14, 0x70, 0x0b, 0x08, 0x00, - 0x70, 0x0f, 0x20, 0x00, 0x90, 0x06, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x47, - 0x79, 0x04, 0x00, 0xfe, 0xd1, 0xac, 0x11, 0x10, 0x90, 0x85, 0x00, 0x20, - 0xd1, 0xa4, 0x01, 0x10, 0x90, 0x85, 0x00, 0x10, 0x90, 0x85, 0x00, 0x02, - 0x00, 0xd6, 0x08, 0x04, 0xa0, 0x71, 0x70, 0x26, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x50, 0x00, - 0x08, 0x04, 0x9f, 0x30, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x21, 0x10, - 0x70, 0x07, 0x00, 0x14, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x04, 0xa6, 0xbd, - 0x08, 0x0c, 0xa1, 0x03, 0x00, 0x10, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, - 0x02, 0x00, 0x60, 0xc3, 0x00, 0x04, 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, - 0xa1, 0x0c, 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, 0x00, 0x03, 0x70, 0x0f, - 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, - 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x00, 0x08, 0x04, 0x9f, 0x30, 0x08, 0x0c, - 0xa1, 0x0c, 0x70, 0x03, 0x01, 0x00, 0x78, 0x2c, 0x90, 0x05, 0x01, 0x10, - 0x70, 0x0a, 0x00, 0x10, 0x70, 0x0b, 0x00, 0x03, 0x78, 0x14, 0x70, 0x0e, - 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xd6, 0x08, 0x0c, - 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x10, 0x70, 0x07, 0x00, 0x14, 0x70, 0x0b, - 0x08, 0x00, 0xb8, 0x94, 0x90, 0x86, 0x00, 0x14, 0x11, 0x98, 0xb9, 0x9c, - 0x91, 0x84, 0x00, 0x30, 0x01, 0x90, 0xb9, 0x98, 0x91, 0x84, 0xc0, 0x00, - 0x11, 0x40, 0xd1, 0xec, 0x01, 0x18, 0x70, 0x0f, 0x21, 0x00, 0x00, 0x58, - 0x70, 0x0f, 0x01, 0x00, 0x00, 0x40, 0x70, 0x0f, 0x04, 0x00, 0x00, 0x28, - 0x70, 0x0f, 0x07, 0x00, 0x00, 0x10, 0x70, 0x0f, 0x08, 0x00, 0x00, 0xf6, - 0x20, 0x79, 0x18, 0x47, 0x79, 0x04, 0x00, 0xfe, 0xd1, 0xac, 0x11, 0x10, - 0x90, 0x85, 0x00, 0x20, 0xd1, 0xa4, 0x01, 0x10, 0x90, 0x85, 0x00, 0x10, - 0x20, 0x09, 0x18, 0x69, 0x21, 0x0c, 0xd1, 0x84, 0x11, 0x10, 0x90, 0x85, - 0x00, 0x02, 0x00, 0x26, 0x20, 0x09, 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xe4, - 0x01, 0x50, 0xc0, 0xc5, 0xba, 0xcc, 0xd2, 0x8c, 0x11, 0x08, 0xc0, 0xcd, - 0x90, 0x94, 0x00, 0x30, 0x92, 0x96, 0x00, 0x10, 0x01, 0x40, 0xd1, 0xec, - 0x01, 0x30, 0x90, 0x94, 0x00, 0x30, 0x92, 0x96, 0x00, 0x10, 0x01, 0x08, - 0xc0, 0xbd, 0x00, 0x2e, 0x70, 0x26, 0x60, 0xc3, 0x00, 0x14, 0x00, 0xde, - 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x10, - 0x70, 0x07, 0x00, 0x14, 0x70, 0x0f, 0x01, 0x00, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x00, - 0x08, 0x04, 0x9e, 0xae, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x01, 0x00, - 0x70, 0x0b, 0x00, 0x03, 0x70, 0x0f, 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, - 0x08, 0x04, 0xa6, 0xbd, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x01, 0x00, - 0x70, 0x0b, 0x00, 0x0b, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, - 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x32, 0x00, - 0x20, 0x21, 0x08, 0x00, 0x00, 0x40, 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, - 0x00, 0x46, 0x20, 0x19, 0x22, 0x00, 0x20, 0x21, 0x01, 0x00, 0x08, 0x0c, - 0xaf, 0x8e, 0xb8, 0x10, 0x93, 0x05, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, - 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, - 0x94, 0x85, 0x00, 0x29, 0x70, 0x12, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xde, - 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x9f, 0x95, 0x00, 0x00, 0x72, 0x22, - 0x70, 0x27, 0xff, 0xff, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0x26, 0x08, 0x0c, 0xaf, 0x8e, 0x70, 0x03, 0x02, 0xff, 0x70, 0x07, - 0xff, 0xfc, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, - 0x68, 0x80, 0x70, 0x0e, 0x00, 0xde, 0x70, 0x13, 0x20, 0x29, 0x0c, 0x10, - 0x70, 0x03, 0x01, 0x00, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0b, 0xfc, 0x02, - 0x70, 0x0f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, - 0x00, 0x46, 0x20, 0x19, 0x33, 0x00, 0x20, 0x21, 0x08, 0x00, 0x00, 0x40, - 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x23, 0x00, - 0x20, 0x21, 0x01, 0x00, 0x08, 0x0c, 0xaf, 0x8e, 0xb8, 0x10, 0x93, 0x05, - 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0xb8, 0x10, - 0x90, 0x05, 0x11, 0x40, 0xb8, 0x14, 0x90, 0x05, 0x11, 0x28, 0x70, 0x0b, - 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfe, 0x00, 0x20, 0x68, 0x7c, 0x70, 0x0a, - 0x68, 0x80, 0x70, 0x0e, 0x00, 0x00, 0x94, 0x85, 0x00, 0x98, 0x70, 0x12, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xde, 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, - 0x7a, 0x08, 0x72, 0x22, 0x2f, 0x10, 0x72, 0x26, 0x20, 0x71, 0x02, 0x4c, - 0x00, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x7a, 0x08, - 0x72, 0x22, 0x78, 0x14, 0x70, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x20, 0x69, 0x02, 0x00, 0x20, 0x71, 0x02, 0x40, 0x60, 0x04, 0x90, 0x8a, - 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0xc5, 0x90, 0x8a, 0x00, 0x92, 0x1a, 0x0c, - 0x0d, 0xc5, 0x61, 0x10, 0x21, 0x58, 0xb9, 0xc0, 0x2c, 0x78, 0x20, 0x61, - 0x01, 0x00, 0x61, 0x9a, 0x90, 0x82, 0x00, 0x85, 0x00, 0x33, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0xa1, 0x7a, - 0xa1, 0x89, 0xa1, 0x94, 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x7a, - 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x78, 0xa1, 0x78, - 0x08, 0x0c, 0x0d, 0xc5, 0x04, 0x11, 0x60, 0xc3, 0x00, 0x00, 0x00, 0x26, - 0x08, 0x0c, 0x2b, 0xce, 0x02, 0x28, 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, - 0xc0, 0xc5, 0x20, 0x12, 0x00, 0x2e, 0x08, 0x04, 0xa6, 0xbd, 0x04, 0x31, - 0x78, 0x08, 0x70, 0x0a, 0x78, 0x14, 0x70, 0x0e, 0x70, 0x17, 0xff, 0xff, - 0x60, 0xc3, 0x00, 0x0c, 0x08, 0x04, 0xa6, 0xbd, 0x04, 0xa1, 0x70, 0x03, - 0x00, 0x03, 0x70, 0x07, 0x03, 0x00, 0x60, 0xc3, 0x00, 0x04, 0x08, 0x04, - 0xa6, 0xbd, 0x00, 0x26, 0x08, 0x0c, 0xaf, 0x8e, 0xb8, 0x10, 0x90, 0x85, - 0x81, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, - 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x70, 0x13, 0x00, 0x09, - 0x08, 0x04, 0xa0, 0xdc, 0x00, 0x26, 0x08, 0x0c, 0xaf, 0x8e, 0xb8, 0x10, - 0x90, 0x85, 0x84, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, - 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x20, 0x01, - 0x00, 0x99, 0x7a, 0x20, 0x92, 0x96, 0x00, 0x05, 0x01, 0x08, 0xc0, 0xbc, - 0x70, 0x12, 0x08, 0x04, 0xa1, 0x3e, 0x00, 0x26, 0x08, 0x0c, 0xaf, 0x8e, - 0xb8, 0x10, 0x90, 0x85, 0x85, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, - 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, - 0x20, 0x01, 0x00, 0x99, 0x7a, 0x20, 0x92, 0x96, 0x00, 0x05, 0x01, 0x08, - 0xc0, 0xbc, 0x70, 0x12, 0x08, 0x04, 0xa1, 0x3e, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x2c, 0x78, 0x20, 0x69, 0x02, 0x00, - 0x20, 0x71, 0x02, 0x40, 0x78, 0x04, 0x90, 0x8a, 0x00, 0x40, 0x0a, 0x0c, - 0x0d, 0xc5, 0x90, 0x8a, 0x00, 0x54, 0x1a, 0x0c, 0x0d, 0xc5, 0x79, 0x10, - 0x21, 0x58, 0xb9, 0xc0, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0x90, 0x82, - 0x00, 0x40, 0x00, 0x33, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x05, 0xa2, 0x19, 0xa2, 0xe0, 0xa2, 0xb3, 0xa4, 0x02, - 0xa2, 0x17, 0xa2, 0x17, 0xa2, 0x17, 0xa2, 0x17, 0xa2, 0x17, 0xa2, 0x17, - 0xa2, 0x17, 0xaa, 0xd8, 0xaa, 0xdd, 0xaa, 0xe2, 0xaa, 0xe7, 0xa2, 0x17, - 0xae, 0xd6, 0xa2, 0x17, 0xaa, 0xd3, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x96, - 0x78, 0x0b, 0xff, 0xff, 0x08, 0x0c, 0xa2, 0x84, 0x79, 0x14, 0x21, 0x48, - 0xa9, 0x78, 0x79, 0x56, 0xae, 0x64, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, - 0x00, 0x08, 0x11, 0x48, 0xa8, 0xb4, 0x70, 0x32, 0xa8, 0xb8, 0x70, 0x36, - 0xa8, 0xbc, 0x70, 0x3a, 0xa8, 0xc0, 0x70, 0x3e, 0x00, 0x08, 0x71, 0x32, - 0xa9, 0x7c, 0x91, 0x84, 0x00, 0x0f, 0x11, 0x18, 0x20, 0x01, 0x00, 0x05, - 0x00, 0x40, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x18, - 0x90, 0x84, 0x00, 0x06, 0x80, 0x04, 0x20, 0x10, 0x78, 0x5c, 0x90, 0x84, - 0x00, 0xff, 0x80, 0x07, 0x92, 0x05, 0x70, 0x42, 0xd1, 0xac, 0x01, 0x58, - 0x70, 0x47, 0x00, 0x02, 0x96, 0x86, 0x00, 0x08, 0x11, 0x18, 0x08, 0x0c, - 0x18, 0xf7, 0x00, 0x10, 0x08, 0x0c, 0x17, 0x68, 0x00, 0x50, 0xd1, 0xb4, - 0x01, 0x18, 0x70, 0x47, 0x00, 0x01, 0x00, 0x28, 0x70, 0x47, 0x00, 0x00, - 0x90, 0x16, 0x22, 0x30, 0x00, 0x10, 0xaa, 0xb0, 0xae, 0xac, 0x72, 0x6a, - 0x76, 0x6e, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe9, 0x00, 0x00, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x23, 0x20, 0x98, 0x20, 0xa1, - 0x02, 0x52, 0x20, 0x69, 0x02, 0x00, 0x68, 0x13, 0x00, 0x18, 0x40, 0x03, - 0x68, 0x13, 0x00, 0x08, 0x60, 0xc3, 0x00, 0x20, 0x60, 0x17, 0x00, 0x09, - 0x20, 0x01, 0x1a, 0x04, 0x20, 0x03, 0x07, 0xd0, 0x20, 0x01, 0x1a, 0x03, - 0x20, 0x03, 0x00, 0x09, 0x00, 0x9e, 0x00, 0x05, 0x68, 0x13, 0x00, 0x08, - 0xba, 0x8c, 0x82, 0x10, 0xb8, 0xcc, 0xd0, 0x84, 0x01, 0x80, 0x20, 0x01, - 0x1a, 0xd0, 0x20, 0x0c, 0x81, 0x08, 0x21, 0x02, 0x20, 0x01, 0x1a, 0xcf, - 0x20, 0x1c, 0x12, 0x18, 0x83, 0x18, 0x23, 0x02, 0x0e, 0xa0, 0x79, 0x4a, - 0x71, 0x2e, 0x7b, 0x46, 0x73, 0x2a, 0x92, 0x94, 0x00, 0xff, 0xba, 0x8e, - 0x82, 0x17, 0x72, 0x1a, 0xba, 0x10, 0x92, 0x95, 0x06, 0x00, 0x72, 0x02, - 0xba, 0x14, 0x72, 0x06, 0x20, 0x69, 0x18, 0x00, 0x6a, 0x7c, 0x72, 0x0a, - 0x6a, 0x80, 0x72, 0x0e, 0x70, 0x13, 0x08, 0x29, 0x2f, 0x10, 0x72, 0x22, - 0x70, 0x27, 0xff, 0xff, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, 0x00, 0x81, - 0x78, 0x14, 0x20, 0x48, 0xa8, 0x90, 0x70, 0x02, 0xa8, 0x8c, 0x70, 0x06, - 0xa8, 0xb0, 0x70, 0x0a, 0xa8, 0xac, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x0c, - 0x00, 0x9e, 0x00, 0xde, 0x08, 0x04, 0xa6, 0xbd, 0x68, 0x13, 0x00, 0x08, - 0xb8, 0x10, 0x90, 0x85, 0x05, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, - 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, - 0x70, 0x13, 0x08, 0x89, 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x7a, 0x08, - 0x72, 0x22, 0x2f, 0x10, 0x72, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x96, 0x08, 0x0c, 0xa3, 0xe0, 0x78, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xd0, 0xd6, 0x11, 0x30, 0x78, 0x14, 0x90, 0x84, 0x07, 0x00, - 0x80, 0x07, 0x00, 0x33, 0x00, 0x10, 0x90, 0x06, 0x00, 0x1b, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0x05, 0xa2, 0xfe, 0xa3, 0x67, 0xa3, 0x77, 0xa3, 0x9d, - 0xa3, 0xa9, 0xa3, 0xba, 0xa3, 0xc2, 0xa2, 0xfc, 0x08, 0x0c, 0x0d, 0xc5, - 0x00, 0x16, 0x00, 0x36, 0xa9, 0x7c, 0x91, 0x8c, 0x00, 0x03, 0x01, 0x18, - 0x91, 0x86, 0x00, 0x03, 0x11, 0x98, 0xab, 0xa8, 0x78, 0x24, 0xd0, 0xcc, - 0x11, 0x68, 0x73, 0x16, 0xa8, 0x98, 0x70, 0x1a, 0xa8, 0x94, 0x70, 0x1e, - 0x00, 0x3e, 0x00, 0x1e, 0x20, 0x01, 0x19, 0xb2, 0x20, 0x04, 0x60, 0xc2, - 0x08, 0x04, 0xa6, 0xbd, 0xc3, 0xe5, 0x0c, 0x88, 0x91, 0x86, 0x00, 0x01, - 0x19, 0x0c, 0x0d, 0xc5, 0xab, 0xa8, 0x78, 0x24, 0xd0, 0xcc, 0x19, 0x04, - 0xa3, 0x64, 0x73, 0x16, 0xa8, 0x98, 0x70, 0x1a, 0xa8, 0x94, 0x70, 0x1e, - 0xa8, 0xa4, 0x70, 0x26, 0xa8, 0xac, 0x70, 0x2e, 0x20, 0x09, 0x00, 0x18, - 0x93, 0x84, 0x03, 0x00, 0x05, 0x70, 0xd3, 0xc4, 0x01, 0x10, 0xa8, 0xac, - 0x91, 0x08, 0xd3, 0xcc, 0x01, 0x10, 0xa8, 0xa4, 0x91, 0x08, 0x68, 0x10, - 0x90, 0x85, 0x00, 0x10, 0x68, 0x12, 0x20, 0x11, 0x02, 0x58, 0x20, 0xe9, - 0x00, 0x00, 0x22, 0xa0, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x08, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x2c, 0x20, 0x98, 0x40, 0x03, - 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x20, 0x11, 0x02, 0x40, 0x22, 0xa0, - 0x20, 0xa9, 0x00, 0x05, 0x40, 0x03, 0x68, 0x10, 0xc0, 0xa4, 0x68, 0x12, - 0x01, 0x5e, 0x91, 0x84, 0x00, 0x03, 0x01, 0x18, 0x20, 0x19, 0x02, 0x45, - 0x20, 0x1a, 0x61, 0xc2, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x04, 0xa6, 0xbd, - 0xc3, 0xe5, 0x08, 0x04, 0xa3, 0x23, 0x20, 0x11, 0x00, 0x08, 0x20, 0x01, - 0x18, 0x0f, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x10, 0x20, 0x11, 0x00, 0x28, - 0x78, 0x24, 0xd0, 0xcc, 0x11, 0x10, 0x72, 0x16, 0x04, 0x70, 0x0c, 0xe8, - 0xc2, 0xe5, 0x20, 0x11, 0x03, 0x02, 0x00, 0x16, 0x78, 0x2c, 0x70, 0x1a, - 0x79, 0x30, 0x71, 0x1e, 0x91, 0x05, 0x01, 0x08, 0xc2, 0xdd, 0x00, 0x1e, - 0x78, 0x24, 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x72, 0x16, 0x70, 0x27, - 0x00, 0x12, 0x70, 0x2f, 0x00, 0x08, 0x70, 0x43, 0x70, 0x00, 0x70, 0x47, - 0x05, 0x00, 0x70, 0x4f, 0x00, 0x0a, 0x20, 0x69, 0x02, 0x00, 0x68, 0x13, - 0x00, 0x09, 0x20, 0x71, 0x02, 0x40, 0x70, 0x0b, 0x25, 0x00, 0x60, 0xc3, - 0x00, 0x32, 0x08, 0x04, 0xa6, 0xbd, 0x20, 0x11, 0x00, 0x28, 0x78, 0x24, - 0xd0, 0xcc, 0x11, 0x28, 0x72, 0x16, 0x60, 0xc3, 0x00, 0x18, 0x08, 0x04, - 0xa6, 0xbd, 0x0c, 0xd0, 0xc2, 0xe5, 0x20, 0x11, 0x01, 0x00, 0x78, 0x24, - 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x72, 0x16, 0x70, 0x2f, 0x00, 0x08, - 0x78, 0x58, 0x90, 0x84, 0x00, 0xff, 0x70, 0x36, 0x60, 0xc3, 0x00, 0x20, - 0x08, 0x04, 0xa6, 0xbd, 0x20, 0x11, 0x00, 0x08, 0x78, 0x24, 0xd0, 0xcc, - 0x01, 0x08, 0xc2, 0xe5, 0x72, 0x16, 0x0c, 0x08, 0x00, 0x36, 0x7b, 0x14, - 0x93, 0x84, 0xff, 0x00, 0x78, 0x16, 0x93, 0x84, 0x00, 0xff, 0x80, 0x01, - 0x11, 0x38, 0x78, 0x24, 0xd0, 0xcc, 0x01, 0x08, 0xc2, 0xe5, 0x72, 0x16, - 0x00, 0x3e, 0x08, 0x88, 0x00, 0x46, 0x20, 0x21, 0x08, 0x00, 0x00, 0x06, - 0x78, 0x24, 0xd0, 0xcc, 0x00, 0x0e, 0x01, 0x08, 0xc4, 0xe5, 0x74, 0x16, - 0x00, 0x4e, 0x70, 0x1e, 0x00, 0x3e, 0x08, 0x18, 0x00, 0xd6, 0x68, 0x13, - 0x00, 0x08, 0xb8, 0x10, 0x90, 0x85, 0x07, 0x00, 0x70, 0x02, 0xb8, 0x14, - 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, - 0x70, 0x0e, 0x78, 0x24, 0xd0, 0xcc, 0x11, 0x68, 0x70, 0x13, 0x08, 0x98, - 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x7a, 0x08, 0x72, 0x22, 0x2f, 0x10, - 0x72, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0xde, 0x00, 0x05, 0x70, 0x13, - 0x08, 0x89, 0x0c, 0x90, 0x00, 0x16, 0x78, 0x14, 0x90, 0x84, 0x07, 0x00, - 0x80, 0x07, 0x00, 0x13, 0x00, 0x1e, 0x00, 0x05, 0xa4, 0x12, 0xa4, 0x12, - 0xa4, 0x14, 0xa4, 0x12, 0xa4, 0x12, 0xa4, 0x12, 0xa4, 0x2e, 0xa4, 0x12, - 0x08, 0x0c, 0x0d, 0xc5, 0x79, 0x14, 0x91, 0x8c, 0x08, 0xff, 0x91, 0x8d, - 0xf6, 0x00, 0x79, 0x16, 0x20, 0x09, 0x00, 0x03, 0x00, 0xb9, 0x20, 0x69, - 0x18, 0x47, 0x68, 0x04, 0xd0, 0xbc, 0x01, 0x30, 0x68, 0x2c, 0x90, 0x84, - 0x00, 0xff, 0x80, 0x07, 0x70, 0x32, 0x00, 0x10, 0x70, 0x33, 0x3f, 0x00, - 0x60, 0xc3, 0x00, 0x01, 0x08, 0x04, 0xa6, 0xbd, 0x20, 0x09, 0x00, 0x03, - 0x00, 0x19, 0x70, 0x33, 0x7f, 0x00, 0x0c, 0xb0, 0x00, 0x16, 0x08, 0x0c, - 0xaf, 0x8e, 0x00, 0x1e, 0xb8, 0x10, 0x90, 0x85, 0x01, 0x00, 0x70, 0x02, - 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0x6a, 0x7c, 0x72, 0x0a, - 0x6a, 0x80, 0x72, 0x0e, 0x70, 0x13, 0x08, 0x88, 0x91, 0x8d, 0x00, 0x08, - 0x71, 0x16, 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x7a, 0x08, 0x72, 0x22, - 0x2f, 0x10, 0x72, 0x26, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x71, 0x60, 0x78, 0x10, 0x20, 0x58, - 0x76, 0xdc, 0x96, 0xb4, 0x00, 0x28, 0x01, 0x10, 0x73, 0x7c, 0x74, 0x80, - 0x25, 0x00, 0x76, 0xdc, 0x96, 0xb4, 0x00, 0x28, 0x01, 0x40, 0x20, 0x01, - 0x04, 0xff, 0x60, 0x62, 0x60, 0x67, 0xff, 0xff, 0x63, 0x6a, 0x64, 0x6e, - 0x00, 0x50, 0x20, 0x01, 0x00, 0xff, 0x90, 0x85, 0x04, 0x00, 0x60, 0x62, - 0x60, 0x67, 0xff, 0xff, 0x60, 0x6b, 0x00, 0x00, 0x61, 0x6e, 0xb8, 0xb8, - 0x60, 0x73, 0x05, 0x30, 0x60, 0x77, 0x00, 0x08, 0xb8, 0x8c, 0x80, 0x00, - 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x90, 0x85, 0x00, 0x20, - 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x82, 0x60, 0x87, - 0xff, 0xff, 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x38, 0x60, 0x8a, - 0xa8, 0x34, 0x60, 0x8e, 0xa8, 0x48, 0x60, 0xc6, 0xa8, 0x44, 0x60, 0xca, - 0x00, 0x9e, 0xb8, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, 0x60, 0xaf, - 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x28, 0x01, 0x28, 0x60, 0x9f, 0x00, 0x00, 0x20, 0x01, - 0x00, 0x92, 0x00, 0x48, 0x60, 0x28, 0xc0, 0xbd, 0x60, 0x2a, 0x60, 0x9f, - 0x00, 0xff, 0x60, 0x27, 0xff, 0xff, 0x20, 0x01, 0x00, 0xb2, 0x60, 0x16, - 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x88, 0xc8, 0x00, 0x3e, 0x00, 0x4e, - 0x00, 0x5e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, - 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x71, 0x60, 0x78, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x20, 0x28, - 0x76, 0xdc, 0xd6, 0xac, 0x11, 0x68, 0x95, 0x82, 0x00, 0x7e, 0x12, 0x50, - 0x25, 0x00, 0x90, 0x94, 0xff, 0x80, 0x11, 0x30, 0x90, 0x80, 0x33, 0xb6, - 0x20, 0x15, 0x92, 0x94, 0x00, 0xff, 0x00, 0x20, 0xb9, 0x10, 0xba, 0x14, - 0x73, 0x7c, 0x74, 0x80, 0x70, 0xdc, 0xd0, 0xac, 0x11, 0x30, 0x95, 0x82, - 0x00, 0x7e, 0x12, 0x18, 0x95, 0x84, 0xff, 0x80, 0x01, 0x38, 0x91, 0x85, - 0x04, 0x00, 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x30, - 0x60, 0x63, 0x04, 0x00, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x61, 0x6e, - 0xb8, 0xb8, 0x60, 0x72, 0x60, 0x77, 0x00, 0x00, 0xb8, 0x64, 0xd0, 0xa4, - 0x01, 0x10, 0x60, 0x77, 0x00, 0x08, 0xb8, 0x8c, 0x80, 0x00, 0x90, 0x84, - 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x90, 0x85, 0x00, 0x20, 0x60, 0x7a, - 0x60, 0x7f, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x82, 0x60, 0x87, 0xff, 0xff, - 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x38, 0x60, 0x8a, 0xa8, 0x34, - 0x60, 0x8e, 0xa8, 0x48, 0x60, 0xc6, 0xa8, 0x44, 0x60, 0xca, 0x00, 0x9e, - 0xb8, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, 0x60, 0xaf, 0x95, 0xd5, - 0x60, 0xd7, 0x00, 0x00, 0xba, 0xc0, 0x62, 0x9e, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x40, 0x78, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x20, 0x09, 0x00, 0x92, - 0x61, 0x16, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x88, 0xc8, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x78, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x20, 0x28, - 0xb9, 0x10, 0xba, 0x14, 0x73, 0x7c, 0x74, 0x80, 0x78, 0x20, 0x90, 0xbe, - 0x00, 0x06, 0x09, 0x04, 0xa6, 0x1a, 0x90, 0xbe, 0x00, 0x0a, 0x19, 0x04, - 0xa5, 0xd6, 0xb8, 0xc0, 0x60, 0x9e, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x7c, - 0xd0, 0xfc, 0x05, 0x58, 0xaf, 0x90, 0x97, 0x84, 0xff, 0x00, 0x91, 0x05, - 0x60, 0x62, 0x87, 0x3f, 0x97, 0x84, 0xff, 0x00, 0x00, 0x06, 0x78, 0x14, - 0x20, 0x48, 0xa8, 0x78, 0xc0, 0xfc, 0x90, 0x05, 0x00, 0x0e, 0x11, 0x60, - 0xaf, 0x94, 0x87, 0xff, 0x01, 0x98, 0x20, 0x39, 0x00, 0x98, 0x97, 0x05, - 0x60, 0x72, 0x78, 0x08, 0x60, 0x82, 0x2f, 0x00, 0x60, 0x86, 0x00, 0x38, - 0x91, 0x85, 0x22, 0x00, 0x60, 0x62, 0x60, 0x73, 0x01, 0x29, 0x60, 0x77, - 0x00, 0x00, 0xb8, 0xc0, 0x60, 0x9e, 0x00, 0x50, 0x20, 0x39, 0x00, 0x29, - 0x97, 0x05, 0x60, 0x72, 0x0c, 0xc0, 0x91, 0x85, 0x02, 0x00, 0x60, 0x62, - 0x60, 0x73, 0x20, 0x29, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x18, 0xaf, 0x94, - 0x87, 0xff, 0x11, 0x20, 0x2f, 0x00, 0x60, 0x82, 0x78, 0x08, 0x60, 0x86, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x60, 0x77, 0x00, 0x00, 0xb8, 0x8c, - 0x80, 0x00, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x60, 0x7a, - 0x60, 0x7f, 0x00, 0x00, 0xa8, 0x38, 0x60, 0x8a, 0xa8, 0x34, 0x60, 0x8e, - 0xa8, 0x48, 0x60, 0xc6, 0xa8, 0x44, 0x60, 0xca, 0xb8, 0x6c, 0x60, 0xce, - 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0x08, 0x0c, 0xaf, 0x73, - 0x20, 0x09, 0x07, 0xd0, 0x60, 0xc4, 0x90, 0x84, 0xff, 0xf0, 0x90, 0x05, - 0x01, 0x10, 0x20, 0x09, 0x1b, 0x58, 0x08, 0x0c, 0x88, 0xc8, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x05, 0x78, 0x04, 0x90, 0x86, 0x00, 0x40, 0x09, 0x04, - 0xa6, 0x56, 0x91, 0x85, 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, - 0x64, 0x6e, 0x60, 0x73, 0x08, 0x09, 0x60, 0x77, 0x00, 0x08, 0x60, 0xaf, - 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xb8, 0x8c, 0x80, 0x00, 0x90, 0x84, - 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, - 0x2f, 0x00, 0x60, 0x82, 0x78, 0x08, 0x60, 0x86, 0x78, 0x14, 0x20, 0x48, - 0xa8, 0x38, 0x60, 0x8a, 0xa8, 0x34, 0x60, 0x8e, 0xa8, 0x48, 0x60, 0xc6, - 0xa8, 0x44, 0x60, 0xca, 0xb8, 0x6c, 0x60, 0xce, 0xba, 0xc0, 0x62, 0x9e, - 0x08, 0x0c, 0xaf, 0x73, 0x20, 0x09, 0x07, 0xd0, 0x60, 0xc4, 0x90, 0x84, - 0xff, 0xf0, 0x90, 0x05, 0x01, 0x10, 0x20, 0x09, 0x1b, 0x58, 0x08, 0x0c, - 0x88, 0xc8, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x05, 0x78, 0x14, 0x20, 0x48, - 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x03, 0x90, 0x86, 0x00, 0x02, 0x09, 0x04, - 0xa6, 0x72, 0x91, 0x85, 0x01, 0x00, 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, - 0x64, 0x6e, 0x60, 0x73, 0x08, 0x80, 0x60, 0x77, 0x00, 0x08, 0xb8, 0x8c, - 0x80, 0x00, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x60, 0x7a, - 0x78, 0x38, 0x60, 0x7e, 0x2f, 0x00, 0x60, 0x86, 0x78, 0x08, 0x60, 0x82, - 0xa8, 0x90, 0x60, 0x8a, 0xa8, 0x8c, 0x60, 0x8e, 0xa8, 0xb0, 0x60, 0xc6, - 0xa8, 0xac, 0x60, 0xca, 0xa8, 0xac, 0x79, 0x30, 0x91, 0x08, 0x79, 0x32, - 0xa8, 0xb0, 0x79, 0x2c, 0x91, 0x09, 0x79, 0x2e, 0xb8, 0x6c, 0x60, 0xce, - 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xba, 0xc0, 0x62, 0x9e, - 0x08, 0x0c, 0xaf, 0x50, 0x08, 0x04, 0xa6, 0x06, 0xb8, 0xcc, 0xd0, 0x84, - 0x01, 0x48, 0xb8, 0x8c, 0x78, 0x14, 0x20, 0x48, 0xb8, 0x8c, 0x78, 0x4a, - 0xa8, 0x36, 0x29, 0x00, 0xa8, 0x3a, 0xb0, 0x46, 0x91, 0x85, 0x06, 0x00, - 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x60, 0x73, 0x08, 0x29, - 0x60, 0x77, 0x00, 0x00, 0x60, 0xaf, 0x95, 0x75, 0x60, 0xd7, 0x00, 0x00, - 0x08, 0x04, 0xa5, 0xe9, 0x91, 0x85, 0x07, 0x00, 0x60, 0x62, 0x62, 0x66, - 0x63, 0x6a, 0x64, 0x6e, 0x78, 0x24, 0xd0, 0xcc, 0x78, 0x26, 0x01, 0x18, - 0x60, 0x73, 0x08, 0x89, 0x00, 0x10, 0x60, 0x73, 0x08, 0x98, 0x60, 0x77, - 0x00, 0x00, 0xb8, 0x8c, 0x80, 0x00, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, - 0x80, 0x07, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, 0x2f, 0x00, 0x60, 0x86, - 0x78, 0x08, 0x60, 0x82, 0xa8, 0x38, 0x60, 0x8a, 0xa8, 0x34, 0x60, 0x8e, - 0xa8, 0x48, 0x60, 0xc6, 0xa8, 0x44, 0x60, 0xca, 0xb8, 0x6c, 0x60, 0xce, - 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0xba, 0xc0, 0x62, 0x9e, - 0x78, 0x24, 0xd0, 0xcc, 0x01, 0x20, 0x08, 0x0c, 0xaf, 0x73, 0x08, 0x04, - 0xa6, 0x06, 0x08, 0x0c, 0xaf, 0x50, 0x08, 0x04, 0xa6, 0x06, 0x7a, 0x10, - 0x00, 0xb6, 0x22, 0x58, 0xba, 0x8c, 0x82, 0x10, 0x92, 0x94, 0x00, 0xff, - 0xba, 0x8e, 0x00, 0xbe, 0x82, 0x17, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, - 0x19, 0xe8, 0x68, 0x43, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, 0x60, 0xa3, - 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x00, 0xf1, 0x08, 0x0c, 0x88, 0xba, - 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0x91, 0x84, - 0x06, 0x00, 0x90, 0x86, 0x06, 0x00, 0x01, 0x28, 0x00, 0x89, 0x08, 0x0c, - 0x88, 0xba, 0x00, 0x1e, 0x00, 0x05, 0xc1, 0xe5, 0x20, 0x01, 0x18, 0x0c, - 0x21, 0x02, 0x20, 0x01, 0x19, 0xe9, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x19, 0xf1, 0x20, 0x03, 0x00, 0x00, 0x0c, 0x88, 0x00, 0x06, 0x60, 0x14, - 0x90, 0x84, 0x18, 0x04, 0x90, 0x85, 0x00, 0x09, 0x60, 0x16, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x00, 0x06, 0x20, 0x61, 0x01, 0x00, - 0x61, 0xa4, 0x60, 0xa7, 0x95, 0xf5, 0x60, 0x14, 0x90, 0x84, 0x18, 0x04, - 0x90, 0x85, 0x00, 0x08, 0x60, 0x16, 0x00, 0x0e, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0x61, 0xa6, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0x16, 0x00, 0x26, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xc0, 0x20, 0x01, 0x1a, 0x04, - 0x20, 0x04, 0x90, 0x05, 0x15, 0xd0, 0x08, 0x0c, 0x76, 0xe4, 0x11, 0x60, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x20, 0xd0, 0xb4, 0x11, 0x20, 0x60, 0x24, - 0xd0, 0x84, 0x09, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x88, 0xba, 0x04, 0x58, - 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, 0x00, 0xc8, 0x69, 0x04, 0x91, 0x94, - 0x40, 0x00, 0x05, 0x40, 0x08, 0x11, 0x08, 0x0c, 0x2d, 0x49, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0xe8, 0x61, 0x28, 0x91, 0x92, 0x00, 0x08, 0x12, 0x58, - 0x81, 0x08, 0x61, 0x2a, 0x61, 0x24, 0x00, 0xce, 0x81, 0xff, 0x01, 0x98, - 0x08, 0x0c, 0x88, 0xba, 0x08, 0x0c, 0xa6, 0xe0, 0x00, 0x70, 0x61, 0x24, - 0x91, 0xe5, 0x00, 0x00, 0x01, 0x40, 0x08, 0x0c, 0xf0, 0x94, 0x08, 0x0c, - 0x88, 0xc3, 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, - 0x00, 0x00, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, - 0x20, 0x01, 0x1a, 0x04, 0x20, 0x04, 0x90, 0x05, 0x1d, 0xb0, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0xe8, 0x61, 0x28, 0x91, 0x92, 0x00, 0x03, 0x1e, 0x08, - 0x81, 0x08, 0x61, 0x2a, 0x00, 0xce, 0x08, 0x0c, 0x88, 0xba, 0x08, 0x0c, - 0x5f, 0xed, 0x20, 0x09, 0x18, 0x46, 0x21, 0x14, 0x82, 0x10, 0x22, 0x0a, - 0x0c, 0x10, 0x00, 0x96, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0x16, - 0x00, 0x26, 0x08, 0x0c, 0x88, 0xd0, 0x20, 0x71, 0x19, 0xe8, 0x71, 0x3c, - 0x81, 0xff, 0x09, 0x04, 0xa7, 0xe9, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xe0, 0x00, 0x36, 0x20, 0x19, - 0x00, 0x02, 0x08, 0x0c, 0xaa, 0x49, 0x00, 0x3e, 0x71, 0x3c, 0x21, 0x60, - 0x08, 0x0c, 0xf0, 0x94, 0x20, 0x09, 0x00, 0x4a, 0x62, 0x20, 0x92, 0x96, - 0x00, 0x09, 0x11, 0x30, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x4a, 0x08, 0x0c, 0xb3, 0x52, 0x08, 0x0c, 0x76, 0xe4, - 0x08, 0x04, 0xa7, 0xe9, 0x08, 0x0c, 0xa7, 0xf5, 0x09, 0x04, 0xa7, 0xe9, - 0x69, 0x04, 0xd1, 0xf4, 0x09, 0x04, 0xa7, 0xf0, 0x08, 0x0c, 0x2d, 0x49, - 0x00, 0xc6, 0x70, 0x3c, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0xc5, 0x60, 0x20, - 0x00, 0xce, 0x90, 0x86, 0x00, 0x06, 0x15, 0x28, 0x61, 0xc8, 0x60, 0xc4, - 0x91, 0x05, 0x15, 0x08, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x04, 0xd0, 0xd4, - 0x01, 0xe0, 0x62, 0x14, 0x92, 0x94, 0x18, 0x00, 0x11, 0x28, 0x62, 0x24, - 0x92, 0x94, 0x00, 0x02, 0x15, 0x60, 0x00, 0x30, 0xc0, 0xd4, 0x20, 0x0a, - 0xd0, 0xcc, 0x01, 0x10, 0x08, 0x0c, 0x2c, 0x7b, 0x60, 0x14, 0x90, 0x84, - 0xe7, 0xfd, 0x90, 0x85, 0x00, 0x10, 0x60, 0x16, 0x70, 0x3c, 0x20, 0x60, - 0x20, 0x09, 0x00, 0x49, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xc0, 0x00, 0x36, - 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xaa, 0x49, 0x00, 0x3e, 0x71, 0x3c, - 0x21, 0x60, 0x08, 0x0c, 0xf0, 0x94, 0x20, 0x09, 0x00, 0x4a, 0x62, 0x20, - 0x92, 0x96, 0x00, 0x09, 0x11, 0x30, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, - 0x00, 0x06, 0x20, 0x09, 0x00, 0x4a, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x05, - 0xd1, 0xec, 0x19, 0x04, 0xa7, 0xa0, 0x08, 0x04, 0xa7, 0xa2, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x96, 0x70, 0x3c, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0xc5, - 0x20, 0x01, 0x03, 0x06, 0x20, 0x0c, 0x91, 0x84, 0x00, 0x30, 0x09, 0x04, - 0xa8, 0xa8, 0x91, 0x84, 0x00, 0x48, 0x90, 0x86, 0x00, 0x08, 0x19, 0x04, - 0xa8, 0xa8, 0x20, 0x09, 0x02, 0x06, 0x21, 0x04, 0x20, 0x09, 0x02, 0x03, - 0x21, 0x0c, 0x91, 0x06, 0x19, 0x04, 0xa8, 0xa8, 0x20, 0x09, 0x02, 0x2a, - 0x21, 0x04, 0x20, 0x09, 0x02, 0x2f, 0x21, 0x0c, 0x91, 0x16, 0x90, 0x84, - 0x03, 0xff, 0x91, 0x8c, 0x03, 0xff, 0x92, 0x94, 0x04, 0x00, 0x01, 0x10, - 0x91, 0x02, 0x00, 0x30, 0x20, 0x10, 0x21, 0x00, 0x92, 0x02, 0x20, 0x09, - 0x02, 0x28, 0x91, 0x02, 0x90, 0x82, 0x00, 0x05, 0x02, 0x50, 0x20, 0x08, - 0x20, 0x01, 0x01, 0x3b, 0x20, 0x04, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, - 0x91, 0x02, 0x1a, 0x04, 0xa8, 0xa8, 0x20, 0x09, 0x1a, 0x84, 0x21, 0x04, - 0x80, 0x00, 0x02, 0x08, 0x20, 0x0a, 0x20, 0x69, 0x01, 0x00, 0x69, 0x14, - 0x91, 0x8c, 0x19, 0x84, 0x91, 0x8d, 0x00, 0x10, 0x69, 0x16, 0x69, 0xc8, - 0x20, 0x11, 0x00, 0x20, 0x68, 0xc8, 0x91, 0x06, 0x15, 0xc0, 0x82, 0x11, - 0x1d, 0xd8, 0x20, 0x01, 0x03, 0x06, 0x20, 0x03, 0x48, 0x00, 0x20, 0x01, - 0x00, 0x9a, 0x20, 0x03, 0x00, 0x04, 0x20, 0x01, 0x1a, 0x69, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x1a, 0x72, 0x20, 0x03, 0x00, 0x00, 0x6a, 0x88, - 0x69, 0x8c, 0x22, 0x00, 0x91, 0x05, 0x11, 0x70, 0x00, 0x96, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xc0, 0xdc, 0xa8, 0x7e, 0xa8, 0x80, 0xc0, 0xfc, - 0xa8, 0x82, 0x00, 0x9e, 0x2c, 0x10, 0x08, 0x0c, 0x1b, 0xe0, 0x00, 0x40, - 0x60, 0x14, 0x20, 0x48, 0xaa, 0x3a, 0xa9, 0x36, 0x6a, 0xc4, 0x69, 0xc8, - 0xa9, 0x46, 0xaa, 0x4a, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, 0x24, 0x00, - 0x00, 0x2e, 0x08, 0x0c, 0x1c, 0x79, 0x19, 0x0c, 0x0d, 0xc5, 0x01, 0x2e, - 0x00, 0x90, 0x20, 0x09, 0x1a, 0x85, 0x21, 0x04, 0x80, 0x00, 0x02, 0x08, - 0x20, 0x0a, 0x69, 0xc8, 0x20, 0x11, 0x00, 0x20, 0x82, 0x11, 0x1d, 0xf0, - 0x68, 0xc8, 0x91, 0x06, 0x1d, 0xc0, 0x69, 0xc4, 0x68, 0xc8, 0x91, 0x05, - 0x01, 0x60, 0x68, 0x24, 0xd0, 0x8c, 0x01, 0x10, 0x68, 0x27, 0x00, 0x02, - 0x70, 0x48, 0xc0, 0x85, 0x70, 0x4a, 0x00, 0x79, 0x70, 0x48, 0xc0, 0x84, - 0x70, 0x4a, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x88, 0xc8, 0x90, 0x06, - 0x00, 0x9e, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, - 0x0c, 0xc8, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x48, - 0xd0, 0x84, 0x01, 0xd8, 0x71, 0x3c, 0x81, 0xff, 0x01, 0xc0, 0x20, 0x71, - 0x01, 0x00, 0x91, 0x88, 0x00, 0x08, 0x21, 0x14, 0x92, 0x8e, 0x00, 0x06, - 0x11, 0x38, 0x70, 0x14, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x12, - 0x70, 0x16, 0x00, 0x48, 0x92, 0x8e, 0x00, 0x09, 0x0d, 0xb0, 0x70, 0x14, - 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x16, 0x70, 0x16, 0x00, 0xee, - 0x00, 0x2e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x10, 0x20, 0x58, 0xbc, 0xa0, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x18, 0x20, 0x58, 0x8b, 0xff, 0x01, 0x90, 0xb8, 0xa0, 0x94, 0x06, - 0x01, 0x18, 0xb8, 0x54, 0x20, 0x58, 0x0c, 0xc0, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xac, 0x6c, 0xad, 0x70, 0xae, 0x78, 0x00, 0x9e, 0x08, 0x0c, - 0x68, 0x56, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x0e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x12, 0x00, - 0x78, 0x38, 0x70, 0x12, 0x78, 0x3c, 0x70, 0x16, 0x00, 0xc6, 0x78, 0x20, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x48, 0x78, 0x10, 0x90, 0x05, 0x01, 0x30, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x10, 0xb9, 0x14, 0x00, 0xbe, 0x00, 0x20, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x7c, 0x61, 0x80, 0x90, 0x84, 0x00, 0xff, - 0x70, 0x0a, 0x71, 0x0e, 0x00, 0xce, 0x60, 0xc3, 0x00, 0x2c, 0x08, 0x04, - 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x0f, 0x00, 0x78, 0x08, - 0xd0, 0x9c, 0x01, 0x28, 0xb8, 0x10, 0x90, 0x84, 0x00, 0xff, 0x70, 0x0a, - 0xb8, 0x14, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa6, 0xbd, - 0x01, 0x56, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x00, 0x08, 0x0c, - 0x89, 0x4c, 0x20, 0xa9, 0x00, 0x06, 0x20, 0x11, 0xff, 0xec, 0x20, 0x19, - 0xff, 0xed, 0x9e, 0xf0, 0x00, 0x02, 0x23, 0x05, 0x20, 0x72, 0x8e, 0x70, - 0x22, 0x05, 0x20, 0x72, 0x8e, 0x70, 0x93, 0x98, 0x00, 0x02, 0x92, 0x90, - 0x00, 0x02, 0x1f, 0x04, 0xa9, 0x43, 0x60, 0xc3, 0x00, 0x1c, 0x01, 0x5e, - 0x08, 0x04, 0xa6, 0xbd, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0xa0, 0xe8, - 0x08, 0x0c, 0xa0, 0xfa, 0x9e, 0x80, 0x00, 0x04, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa0, 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, - 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, - 0x00, 0x9e, 0x78, 0x08, 0x90, 0x88, 0x00, 0x02, 0x21, 0xa8, 0x91, 0x92, - 0x00, 0x10, 0x12, 0x50, 0x40, 0x03, 0x90, 0x80, 0x00, 0x04, 0x80, 0x03, - 0x60, 0xc2, 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0xa9, 0x00, 0x10, 0x40, 0x03, 0x08, 0x0c, 0xaf, 0x79, 0x20, 0xa1, - 0x02, 0x40, 0x22, 0xa8, 0x40, 0x03, 0x0c, 0x68, 0x08, 0x0c, 0xa0, 0xc1, - 0x70, 0x03, 0x62, 0x00, 0x78, 0x08, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, - 0x08, 0x04, 0xa6, 0xbd, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0xa0, 0xc1, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4c, 0x78, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x23, 0x20, 0x98, 0x00, 0x9e, 0x78, 0x08, 0x90, 0x88, - 0x00, 0x02, 0x21, 0xa8, 0x40, 0x03, 0x80, 0x03, 0x60, 0xc2, 0x08, 0x0c, - 0xa6, 0xbd, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x0c, 0x20, 0x60, 0x8c, 0xff, 0x01, 0x78, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x10, 0x08, 0x0c, 0xbc, 0xb6, 0x60, 0x0c, 0x00, 0x06, 0x08, 0x0c, - 0xd5, 0x4c, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0xce, - 0x0c, 0x78, 0x2c, 0x00, 0x70, 0x0e, 0x70, 0x0a, 0x01, 0x2e, 0x00, 0x0e, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x16, - 0x00, 0x06, 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0x91, 0x8c, 0xe7, 0xff, 0x21, 0x02, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, - 0x01, 0x40, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x24, 0x20, 0x60, 0x8c, 0xff, - 0x01, 0xf8, 0x08, 0x0c, 0xa6, 0xe9, 0x6a, 0xc0, 0x68, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0x88, 0xc3, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x08, 0x0c, - 0xb0, 0xca, 0x00, 0xce, 0x20, 0xa9, 0x01, 0xf4, 0x04, 0x61, 0x20, 0x09, - 0x00, 0x13, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x01, 0x5e, - 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x96, - 0x00, 0x01, 0x0d, 0x78, 0x90, 0x96, 0x00, 0x04, 0x0d, 0x60, 0x08, 0x0c, - 0x88, 0xc3, 0x68, 0x14, 0x90, 0x84, 0x00, 0x01, 0x01, 0x10, 0x68, 0xa7, - 0x95, 0xf5, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, 0x20, 0x11, - 0x5f, 0x97, 0x08, 0x0c, 0x88, 0x3d, 0x20, 0xa9, 0x01, 0xf4, 0x00, 0x09, - 0x08, 0xc0, 0x68, 0x24, 0xd0, 0x94, 0x01, 0x40, 0x68, 0x27, 0x00, 0x04, - 0x78, 0x04, 0x90, 0x84, 0x40, 0x00, 0x19, 0x0c, 0x2d, 0x49, 0x00, 0x90, - 0xd0, 0x84, 0x01, 0x18, 0x68, 0x27, 0x40, 0x01, 0x00, 0x10, 0x1f, 0x04, - 0xaa, 0x2b, 0x78, 0x04, 0x90, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, - 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0x91, 0x8c, 0xdb, 0xff, - 0x21, 0x02, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, 0x01, 0x40, 0x20, 0x71, - 0x19, 0xe8, 0x70, 0x3c, 0x20, 0x60, 0x8c, 0xff, 0x09, 0x04, 0xaa, 0xb4, - 0x93, 0x86, 0x00, 0x02, 0x11, 0x28, 0x68, 0x14, 0x90, 0x84, 0x00, 0x02, - 0x09, 0x04, 0xaa, 0xb4, 0x68, 0xaf, 0x95, 0xf5, 0x68, 0x17, 0x00, 0x10, - 0x20, 0x09, 0x00, 0xfa, 0x81, 0x09, 0x1d, 0xf0, 0x69, 0xc6, 0x68, 0xcb, - 0x00, 0x08, 0x08, 0x0c, 0x88, 0xd0, 0x08, 0x0c, 0x20, 0x31, 0x20, 0x01, - 0x00, 0x32, 0x69, 0x20, 0xd1, 0xbc, 0x01, 0x30, 0x80, 0x01, 0x1d, 0xd8, - 0x69, 0x2c, 0x91, 0x8d, 0x00, 0x08, 0x69, 0x2e, 0x20, 0xa9, 0x03, 0xe8, - 0x68, 0x24, 0xd0, 0x94, 0x01, 0x40, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, - 0x90, 0x84, 0x40, 0x00, 0x19, 0x0c, 0x2d, 0x49, 0x00, 0x90, 0xd0, 0x8c, - 0x01, 0x18, 0x68, 0x27, 0x00, 0x02, 0x00, 0x10, 0x1f, 0x04, 0xaa, 0x8a, - 0x78, 0x04, 0x90, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x68, 0x27, - 0x40, 0x00, 0x68, 0x24, 0x83, 0xff, 0x11, 0x40, 0x20, 0x09, 0x00, 0x49, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x01, 0x10, 0x08, 0x0c, 0xb3, 0x52, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0xfe, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xd6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x19, 0xe8, 0x6a, 0x06, - 0x01, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x69, 0x19, 0xe8, 0x6a, 0x32, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0x08, 0x0c, 0xa2, 0x84, 0x70, 0x47, 0x10, 0x00, 0x00, 0x98, - 0x08, 0x0c, 0xa2, 0x84, 0x70, 0x47, 0x40, 0x00, 0x00, 0x70, 0x08, 0x0c, - 0xa2, 0x84, 0x70, 0x47, 0x20, 0x00, 0x00, 0x48, 0x08, 0x0c, 0xa2, 0x84, - 0x70, 0x47, 0x04, 0x00, 0x00, 0x20, 0x08, 0x0c, 0xa2, 0x84, 0x70, 0x47, - 0x02, 0x00, 0x78, 0x54, 0x70, 0x32, 0x60, 0xc3, 0x00, 0x20, 0x08, 0x04, - 0xa6, 0xbd, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x20, 0x90, 0x05, - 0x01, 0x10, 0x80, 0x01, 0x70, 0x22, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x76, 0x00, 0x66, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x14, - 0x26, 0x60, 0x26, 0x78, 0x20, 0x39, 0x00, 0x01, 0x87, 0xff, 0x09, 0x04, - 0xab, 0x96, 0x8c, 0xff, 0x09, 0x04, 0xab, 0x96, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x06, 0x19, 0x04, 0xab, 0x91, 0x88, 0xff, 0x01, 0x38, 0x28, 0x00, - 0x9c, 0x06, 0x19, 0x04, 0xab, 0x91, 0x20, 0x39, 0x00, 0x00, 0x00, 0x50, - 0x60, 0x10, 0x9b, 0x06, 0x19, 0x04, 0xab, 0x91, 0x85, 0xff, 0x01, 0x20, - 0x60, 0x54, 0x91, 0x06, 0x19, 0x04, 0xab, 0x91, 0x70, 0x24, 0x9c, 0x06, - 0x15, 0xb0, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x11, 0x60, - 0x68, 0x24, 0xd0, 0x84, 0x01, 0x48, 0x68, 0x27, 0x00, 0x01, 0x08, 0x0c, - 0x88, 0xc3, 0x08, 0x0c, 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, 0x04, 0x28, - 0x08, 0x0c, 0x88, 0xc3, 0x68, 0x20, 0xd0, 0xb4, 0x01, 0x10, 0x68, 0xa7, - 0x95, 0xf5, 0x68, 0x17, 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, - 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, - 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, - 0x00, 0x3e, 0x70, 0x14, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x16, - 0x70, 0x10, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, - 0x2f, 0x00, 0x70, 0x12, 0x00, 0x10, 0x70, 0x13, 0x00, 0x00, 0x66, 0x0c, - 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, - 0x26, 0x78, 0x89, 0xff, 0x11, 0x68, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd6, 0x01, 0x10, 0x08, 0x0c, - 0xeb, 0xd4, 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0xaa, 0xf1, - 0x88, 0xff, 0x11, 0x90, 0x00, 0xce, 0x08, 0x04, 0xab, 0x0c, 0x2c, 0x78, - 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0xab, 0x0c, 0x90, 0x06, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x60, 0x1b, 0x00, 0x00, 0x00, 0xce, 0x98, 0xc5, - 0x00, 0x01, 0x0c, 0x88, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x09, 0x04, 0xac, 0x0a, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, - 0x19, 0x04, 0xac, 0x05, 0x87, 0xff, 0x01, 0x28, 0x27, 0x00, 0x9c, 0x06, - 0x19, 0x04, 0xac, 0x05, 0x00, 0x40, 0x60, 0x10, 0x9b, 0x06, 0x15, 0xe8, - 0x85, 0xff, 0x01, 0x18, 0x60, 0x54, 0x91, 0x06, 0x15, 0xc0, 0x70, 0x3c, - 0x9c, 0x06, 0x11, 0x68, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, - 0xaa, 0x49, 0x70, 0x33, 0x00, 0x00, 0x90, 0x06, 0x70, 0x3e, 0x70, 0x42, - 0x70, 0x46, 0x70, 0x4a, 0x00, 0x3e, 0x70, 0x38, 0x9c, 0x36, 0x11, 0x10, - 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, - 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x36, 0x00, 0x10, 0x70, 0x37, - 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, - 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x14, - 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd6, 0x01, 0x10, 0x08, 0x0c, 0xeb, 0xd4, - 0x08, 0x0c, 0xb3, 0x06, 0x87, 0xff, 0x11, 0x98, 0x00, 0xce, 0x08, 0x04, - 0xab, 0xb6, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0xab, 0xb6, - 0x90, 0x06, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0x9e, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x1b, - 0x00, 0x00, 0x00, 0xce, 0x97, 0xbd, 0x00, 0x01, 0x0c, 0x80, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0xe8, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x18, 0x70, 0x07, 0x00, 0x05, 0x00, 0x10, 0x70, 0x07, - 0x00, 0x00, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x19, 0xe8, 0x2c, 0x10, 0x76, 0x38, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x05, 0x40, 0x22, 0x00, 0x9c, 0x06, 0x15, 0x08, 0x70, 0x38, - 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x3a, 0x70, 0x34, 0x9c, 0x36, - 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x36, - 0x00, 0x10, 0x70, 0x37, 0x00, 0x00, 0x66, 0x0c, 0x2c, 0x00, 0x9f, 0x06, - 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, 0x09, 0x0c, 0x99, 0xa5, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x20, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0xb0, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x96, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x0c, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x09, 0x04, 0xad, 0x01, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0xa0, 0x00, 0xbe, 0x92, 0x06, 0x19, 0x04, 0xac, 0xfc, 0x70, 0x24, - 0x9c, 0x06, 0x15, 0x20, 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, - 0x09, 0x04, 0xac, 0xd3, 0x08, 0x0c, 0xa6, 0xe9, 0x68, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0xac, 0x1b, 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, - 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, - 0x00, 0x01, 0x00, 0x3e, 0x70, 0x0c, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, - 0x76, 0x0e, 0x70, 0x08, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, - 0x01, 0x18, 0x2f, 0x00, 0x70, 0x0a, 0x00, 0x10, 0x70, 0x0b, 0x00, 0x00, - 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, - 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0xd2, 0xcf, - 0x11, 0x80, 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xd2, 0xe0, 0x15, 0x18, - 0x08, 0x0c, 0xbc, 0xb6, 0x04, 0x00, 0x08, 0x0c, 0xac, 0x1b, 0x68, 0x24, - 0xd0, 0x84, 0x09, 0xb0, 0x68, 0x27, 0x00, 0x01, 0x08, 0x98, 0x08, 0x0c, - 0xd2, 0xe0, 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x90, 0x60, 0x14, - 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd6, 0x01, 0x68, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x03, 0x15, 0x08, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x92, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, - 0xd5, 0x4c, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0xce, - 0x08, 0x04, 0xac, 0x7c, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, - 0xac, 0x7c, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x06, 0x1d, 0x20, 0x08, 0x0c, 0xeb, 0xd4, 0x0c, 0x08, - 0x00, 0xd6, 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x02, 0x00, 0x70, 0x07, - 0x00, 0x14, 0x60, 0xc3, 0x00, 0x14, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, - 0x19, 0x89, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x50, 0x20, 0xa9, - 0x00, 0x04, 0x40, 0x03, 0x70, 0x23, 0x00, 0x04, 0x70, 0x27, 0x78, 0x78, - 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0xa1, 0x0c, - 0x70, 0x0b, 0x08, 0x00, 0x78, 0x14, 0x90, 0x84, 0xff, 0x00, 0x70, 0x0e, - 0x78, 0x14, 0x90, 0x84, 0x00, 0xff, 0x70, 0x22, 0x78, 0x2c, 0x70, 0x26, - 0x78, 0x58, 0x90, 0x84, 0x00, 0xff, 0x90, 0x85, 0x02, 0x00, 0x70, 0x02, - 0x78, 0x58, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x70, 0x06, 0x60, 0xc2, - 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xb6, 0x00, 0xd6, 0x00, 0x16, 0x00, 0xd6, - 0x2f, 0x68, 0x20, 0x09, 0x00, 0x35, 0x08, 0x0c, 0xd7, 0x59, 0x00, 0xde, - 0x19, 0x04, 0xad, 0xaf, 0x08, 0x0c, 0xa0, 0xc1, 0x70, 0x03, 0x13, 0x00, - 0x78, 0x2c, 0x08, 0x0c, 0xae, 0xb5, 0x20, 0x68, 0x68, 0x20, 0x90, 0x86, - 0x00, 0x03, 0x05, 0x60, 0x78, 0x10, 0x20, 0x58, 0xba, 0xa0, 0x08, 0x0c, - 0xb2, 0x3d, 0x11, 0xd8, 0x92, 0x86, 0x00, 0x7e, 0x11, 0x28, 0x70, 0x0b, - 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfe, 0x04, 0x98, 0x92, 0x86, 0x00, 0x7f, - 0x11, 0x28, 0x70, 0x0b, 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfd, 0x04, 0x58, - 0x92, 0x84, 0xff, 0x80, 0x01, 0x80, 0x92, 0x86, 0x00, 0x80, 0x11, 0x28, - 0x70, 0x0b, 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfc, 0x04, 0x00, 0x92, 0xd8, - 0x10, 0x00, 0x2b, 0x5c, 0xb8, 0x10, 0x70, 0x0a, 0xb8, 0x14, 0x70, 0x0e, - 0x00, 0xc0, 0x60, 0x98, 0x70, 0x0e, 0x00, 0xa8, 0x08, 0x0c, 0xb2, 0x3d, - 0x11, 0x30, 0x78, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x82, 0x00, 0x7e, - 0x02, 0x50, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x1f, 0x2d, 0x04, 0x70, 0x0a, - 0x8d, 0x68, 0x2d, 0x04, 0x70, 0x0e, 0x00, 0xde, 0x00, 0x10, 0x60, 0x34, - 0x70, 0x0e, 0x78, 0x38, 0x70, 0x12, 0x78, 0x3c, 0x70, 0x16, 0x60, 0xc3, - 0x00, 0x0c, 0x00, 0x1e, 0x00, 0xde, 0x08, 0x0c, 0xa6, 0xbd, 0x00, 0xbe, - 0x00, 0x05, 0x78, 0x1b, 0x00, 0x01, 0x78, 0x03, 0x00, 0x06, 0x00, 0x1e, - 0x00, 0xde, 0x00, 0xbe, 0x00, 0x05, 0x79, 0x2c, 0x91, 0x80, 0x00, 0x08, - 0x20, 0x0c, 0x91, 0x86, 0x00, 0x06, 0x01, 0xc0, 0x91, 0x86, 0x00, 0x03, - 0x09, 0x04, 0xae, 0x2a, 0x91, 0x86, 0x00, 0x05, 0x09, 0x04, 0xae, 0x12, - 0x91, 0x86, 0x00, 0x04, 0x05, 0xd8, 0x91, 0x86, 0x00, 0x08, 0x09, 0x04, - 0xae, 0x1b, 0x78, 0x07, 0x00, 0x37, 0x78, 0x2f, 0x00, 0x03, 0x78, 0x17, - 0x17, 0x00, 0x08, 0x0c, 0xae, 0x92, 0x00, 0x05, 0x08, 0x0c, 0xae, 0x53, - 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, 0x20, 0x09, 0x40, 0x00, - 0x68, 0x00, 0x00, 0x02, 0xad, 0xf3, 0xad, 0xfe, 0xad, 0xf5, 0xad, 0xfe, - 0xad, 0xfa, 0xad, 0xf3, 0xad, 0xf3, 0xad, 0xfe, 0xad, 0xfe, 0xad, 0xfe, - 0xad, 0xfe, 0xad, 0xf3, 0xad, 0xf3, 0xad, 0xf3, 0xad, 0xf3, 0xad, 0xf3, - 0xad, 0xfe, 0xad, 0xf3, 0xad, 0xfe, 0x08, 0x0c, 0x0d, 0xc5, 0x68, 0x24, - 0xd0, 0xe4, 0x01, 0x10, 0xd0, 0xcc, 0x01, 0x10, 0x90, 0x0e, 0x00, 0x10, - 0x20, 0x09, 0x20, 0x00, 0x68, 0x2c, 0x70, 0x22, 0x68, 0x30, 0x70, 0x26, - 0x08, 0x04, 0xae, 0x4c, 0x08, 0x0c, 0xae, 0x53, 0x00, 0xd6, 0x00, 0x26, - 0x79, 0x2c, 0x21, 0x68, 0x20, 0x09, 0x40, 0x00, 0x6a, 0x00, 0x92, 0x86, - 0x00, 0x02, 0x11, 0x08, 0x90, 0x0e, 0x04, 0xd0, 0x08, 0x0c, 0xae, 0x53, - 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, 0x20, 0x09, 0x40, 0x00, - 0x04, 0x88, 0x04, 0xb9, 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, - 0x20, 0x09, 0x40, 0x00, 0x92, 0x86, 0x00, 0x05, 0x01, 0x18, 0x92, 0x86, - 0x00, 0x02, 0x11, 0x08, 0x90, 0x0e, 0x04, 0x10, 0x04, 0x41, 0x00, 0xd6, - 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, 0x68, 0x14, 0x69, 0x24, 0xc1, 0x85, - 0x69, 0x26, 0x00, 0x96, 0x20, 0x48, 0xa9, 0xac, 0xa8, 0x34, 0x91, 0x12, - 0xa9, 0xb0, 0xa8, 0x38, 0x00, 0x9e, 0x91, 0x03, 0x70, 0x22, 0x72, 0x26, - 0x79, 0x2c, 0x91, 0x80, 0x00, 0x00, 0x20, 0x04, 0x90, 0x8e, 0x00, 0x02, - 0x01, 0x30, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x18, 0x20, 0x09, 0x40, 0x00, - 0x00, 0x08, 0x90, 0x0e, 0x71, 0x2a, 0x60, 0xc3, 0x00, 0x18, 0x00, 0x2e, - 0x00, 0xde, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xb6, 0x00, 0x36, 0x00, 0x46, - 0x00, 0x56, 0x00, 0x66, 0x08, 0x0c, 0xa1, 0x0c, 0x90, 0x06, 0x70, 0x03, - 0x02, 0x00, 0x79, 0x38, 0x71, 0x0a, 0x79, 0x3c, 0x71, 0x0e, 0x78, 0x10, - 0x20, 0x58, 0xb8, 0xa0, 0x08, 0x0c, 0xb2, 0x3d, 0x11, 0x18, 0x90, 0x92, - 0x00, 0x7e, 0x02, 0x68, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x1f, 0x2d, 0x2c, - 0x8d, 0x68, 0x2d, 0x34, 0x90, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0xbb, 0x10, - 0xbc, 0x14, 0x00, 0xde, 0x00, 0x28, 0x90, 0x1e, 0x64, 0x98, 0x20, 0x29, - 0x00, 0x00, 0x66, 0x34, 0x78, 0x2c, 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, - 0x90, 0x86, 0x00, 0x03, 0x11, 0x28, 0x75, 0x12, 0x76, 0x16, 0x73, 0x1a, - 0x74, 0x1e, 0x00, 0x20, 0x73, 0x12, 0x74, 0x16, 0x75, 0x1a, 0x76, 0x1e, - 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xbe, 0x00, 0x05, - 0x08, 0x0c, 0xa1, 0x0c, 0x70, 0x03, 0x01, 0x00, 0x78, 0x2c, 0x70, 0x0a, - 0x78, 0x14, 0x70, 0x0e, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, - 0xa6, 0xbd, 0x08, 0x0c, 0xa0, 0xb8, 0x70, 0x03, 0x14, 0x00, 0x78, 0x38, - 0x70, 0x0a, 0x00, 0x79, 0x78, 0x3c, 0x70, 0x0e, 0x78, 0x2c, 0x70, 0x12, - 0x78, 0x30, 0x70, 0x16, 0x78, 0x34, 0x90, 0x84, 0x00, 0xff, 0x80, 0x07, - 0x70, 0x1a, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0xe6, - 0x20, 0x71, 0x02, 0x40, 0x00, 0x06, 0x00, 0xf6, 0x20, 0x78, 0x78, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xcc, 0xd0, 0x84, 0x01, 0x20, 0x78, 0x44, - 0x70, 0x2a, 0x78, 0x48, 0x70, 0x2e, 0x00, 0xbe, 0x00, 0xfe, 0x00, 0x0e, - 0x00, 0xee, 0x00, 0x05, 0x08, 0x0c, 0xa1, 0x03, 0x70, 0x03, 0x01, 0x00, - 0x78, 0x2c, 0x70, 0x0a, 0x78, 0x14, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, - 0x08, 0x04, 0xa6, 0xbd, 0x00, 0x21, 0x60, 0xc3, 0x00, 0x00, 0x08, 0x04, - 0xa6, 0xbd, 0x00, 0xd6, 0x08, 0x0c, 0xaf, 0x8e, 0xb8, 0x10, 0x90, 0x85, - 0x03, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, - 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x70, 0x13, 0x08, 0x19, - 0x08, 0x0c, 0xa6, 0xab, 0x72, 0x1a, 0x2f, 0x10, 0x72, 0x22, 0x7a, 0x08, - 0x72, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0xde, 0x00, 0x05, 0x00, 0xa9, - 0x79, 0x14, 0x71, 0x2a, 0x60, 0xc3, 0x00, 0x00, 0x60, 0xa7, 0x95, 0x75, - 0x00, 0x26, 0x08, 0x0c, 0x2b, 0xce, 0x02, 0x28, 0x20, 0x11, 0x01, 0x01, - 0x22, 0x04, 0xc0, 0xc5, 0x20, 0x12, 0x00, 0x2e, 0x08, 0x0c, 0xa6, 0xe0, - 0x08, 0x0c, 0x88, 0xba, 0x00, 0x05, 0x00, 0x36, 0x00, 0x96, 0x00, 0xd6, - 0x00, 0xe6, 0x78, 0x58, 0x20, 0x48, 0xaa, 0x7c, 0x92, 0x96, 0x00, 0xc0, - 0x92, 0x94, 0x00, 0xfd, 0xaa, 0x7e, 0xaa, 0x80, 0x92, 0x94, 0x03, 0x00, - 0xaa, 0x82, 0xa9, 0x6c, 0x91, 0x94, 0x00, 0xff, 0xab, 0x74, 0x93, 0x84, - 0x00, 0xff, 0x90, 0x8d, 0xc2, 0x00, 0xa9, 0x6e, 0x93, 0x84, 0xff, 0x00, - 0x92, 0x15, 0xaa, 0x76, 0xa8, 0x70, 0xaa, 0x78, 0xa8, 0x7a, 0xaa, 0x72, - 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, 0xaf, 0x8e, 0x00, 0xde, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x0a, - 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0x98, - 0x40, 0x03, 0x60, 0xa3, 0x00, 0x35, 0xaa, 0x68, 0x92, 0x94, 0x70, 0x00, - 0x92, 0x86, 0x30, 0x00, 0x01, 0x10, 0x60, 0xa3, 0x00, 0x37, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, 0x90, 0x0e, 0x78, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0xc0, 0x90, 0x84, - 0x00, 0x03, 0x11, 0xa8, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0xd0, 0xbc, - 0x01, 0x80, 0x78, 0x24, 0xd0, 0xcc, 0x11, 0x68, 0xd0, 0xc4, 0x11, 0x58, - 0xa8, 0xa8, 0x90, 0x05, 0x11, 0x40, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0xc1, 0xd5, 0x21, 0x02, 0x20, 0x09, 0x19, 0xb3, 0x21, 0x0c, 0x00, 0x9e, - 0x91, 0x8d, 0x00, 0x92, 0x00, 0x10, 0x20, 0x09, 0x00, 0x96, 0x60, 0xab, - 0x00, 0x36, 0x61, 0x16, 0x00, 0x05, 0x20, 0x09, 0x00, 0x09, 0x00, 0xa0, - 0x20, 0x09, 0x00, 0x0a, 0x00, 0x88, 0x20, 0x09, 0x00, 0x0b, 0x00, 0x70, - 0x20, 0x09, 0x00, 0x0c, 0x00, 0x58, 0x20, 0x09, 0x00, 0x0d, 0x00, 0x40, - 0x20, 0x09, 0x00, 0x0e, 0x00, 0x28, 0x20, 0x09, 0x00, 0x0f, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x08, 0x69, 0x12, 0x00, 0x05, 0x08, 0x0c, 0xa0, 0xc1, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x96, 0x00, 0xd6, 0x78, 0x14, 0x20, 0x48, - 0x70, 0x13, 0x01, 0x38, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, - 0x00, 0x28, 0x11, 0x38, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x86, - 0xaa, 0xaa, 0x19, 0x04, 0xb0, 0x33, 0x70, 0x03, 0x54, 0x00, 0x00, 0xc6, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x7c, 0x90, 0x84, 0x00, 0xff, 0xa9, 0x98, - 0x81, 0x0f, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, 0x70, 0x0a, 0x60, 0x80, - 0x70, 0x0e, 0xa9, 0x98, 0x91, 0x8c, 0xff, 0x00, 0x71, 0x12, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x09, 0x18, 0x05, 0x2e, 0x10, 0x92, 0x90, 0x00, 0x06, - 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xaf, 0xc4, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0x09, 0x18, 0x01, 0x21, 0x04, 0x20, 0x12, - 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xaf, 0xce, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x29, 0x20, 0x98, 0x20, 0x09, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, - 0x81, 0x09, 0x1d, 0xc0, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, - 0xaf, 0x79, 0x00, 0xde, 0x20, 0x71, 0x02, 0x40, 0x20, 0x11, 0x02, 0x40, - 0x20, 0x09, 0x00, 0x02, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, - 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x20, 0x09, 0x00, 0x08, - 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, - 0x81, 0x09, 0x1d, 0xc0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, 0x20, 0x98, - 0x20, 0x09, 0x00, 0x08, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, - 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x00, 0xce, 0x60, 0xc3, - 0x00, 0x4c, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, 0x00, 0x28, 0x11, 0x68, 0x08, 0x0c, - 0x76, 0x37, 0x01, 0x50, 0x60, 0x28, 0xc0, 0xbd, 0x60, 0x2a, 0x60, 0x14, - 0x90, 0x84, 0x18, 0x04, 0x90, 0x85, 0x00, 0x29, 0x60, 0x16, 0x00, 0x10, - 0x08, 0x0c, 0xa6, 0xbd, 0x08, 0x0c, 0x88, 0xba, 0x00, 0xde, 0x00, 0x9e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x40, - 0x20, 0x01, 0x22, 0x00, 0x90, 0x85, 0x00, 0xff, 0x70, 0x02, 0x70, 0x07, - 0xff, 0xff, 0x20, 0x71, 0x01, 0x00, 0x70, 0x9b, 0x00, 0xff, 0x00, 0xee, - 0x08, 0x04, 0xaf, 0xa9, 0x08, 0x0c, 0xa0, 0xc1, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x96, 0x00, 0xd6, 0x78, 0x14, 0x20, 0x48, 0x70, 0x13, 0x01, 0x38, - 0x70, 0x03, 0x55, 0x00, 0x00, 0xc6, 0xa8, 0x9c, 0x90, 0x84, 0x00, 0xff, - 0xa9, 0x98, 0x81, 0x0f, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, 0x70, 0x0a, - 0xa9, 0x9c, 0x91, 0x8c, 0xff, 0x00, 0xa8, 0xa0, 0x90, 0x84, 0x00, 0xff, - 0x91, 0x05, 0x70, 0x0e, 0xa9, 0x98, 0x91, 0x8c, 0xff, 0x00, 0x20, 0x61, - 0x18, 0x00, 0x60, 0x7c, 0x90, 0x84, 0x00, 0xff, 0x91, 0x0d, 0x71, 0x12, - 0x61, 0x80, 0x71, 0x16, 0x20, 0x09, 0x00, 0x08, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x29, 0x20, 0x98, 0x2e, 0x10, 0x92, 0x90, - 0x00, 0x06, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, - 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x09, - 0x18, 0x05, 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, - 0xb0, 0x85, 0x20, 0xa9, 0x00, 0x02, 0x20, 0x09, 0x18, 0x01, 0x21, 0x04, - 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xb0, 0x8f, 0x00, 0xd6, - 0x00, 0x16, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, 0xaf, 0x79, 0x00, 0x1e, - 0x00, 0xde, 0x20, 0x71, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x02, 0x20, 0x09, - 0x18, 0x03, 0x20, 0x11, 0x02, 0x40, 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, - 0x82, 0x10, 0x1f, 0x04, 0xb0, 0xa5, 0x20, 0x09, 0x00, 0x08, 0x40, 0x02, - 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xd0, 0x90, 0x06, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0x12, 0x82, 0x10, 0x1f, 0x04, 0xb0, 0xb6, - 0x00, 0xce, 0x60, 0xc3, 0x00, 0x4c, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, - 0x95, 0x75, 0x08, 0x0c, 0xa6, 0xbd, 0x08, 0x0c, 0x88, 0xba, 0x00, 0xde, - 0x00, 0x9e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x92, 0x90, - 0x00, 0x18, 0x82, 0x14, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x69, 0x02, 0x00, - 0x68, 0x13, 0x00, 0x00, 0x22, 0xa8, 0x92, 0x84, 0x00, 0xe0, 0x01, 0x28, - 0x20, 0xa9, 0x00, 0x20, 0x92, 0x92, 0x00, 0x20, 0x00, 0x08, 0x90, 0x16, - 0x20, 0xa1, 0x02, 0x40, 0x90, 0x06, 0x40, 0x04, 0x82, 0xff, 0x01, 0x20, - 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x0c, 0x60, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x78, 0x60, 0x56, - 0x90, 0x06, 0xa8, 0x36, 0xa8, 0x3a, 0xa9, 0x9c, 0xa9, 0x46, 0xa8, 0x4a, - 0x60, 0x23, 0x00, 0x03, 0x60, 0x07, 0x00, 0x40, 0x60, 0x03, 0x00, 0x03, - 0x60, 0x0b, 0xff, 0xff, 0xa8, 0x17, 0x00, 0x01, 0xa8, 0x42, 0xa8, 0x3e, - 0x29, 0x00, 0xa8, 0x5a, 0xa8, 0x13, 0x20, 0xc5, 0x08, 0x0c, 0x95, 0x64, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x9b, 0xd3, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0xa6, 0x00, 0x96, 0x00, 0x66, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x0c, 0x26, 0x60, 0x26, 0x78, - 0x8c, 0xff, 0x09, 0x04, 0xb1, 0x9d, 0x70, 0x24, 0x9c, 0x06, 0x15, 0x20, - 0x20, 0x69, 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x09, 0x04, 0xb1, 0x6f, - 0x08, 0x0c, 0xa6, 0xe9, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xac, 0x1b, - 0x70, 0x27, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, - 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, - 0x2d, 0x39, 0x90, 0x06, 0x08, 0x0c, 0x2d, 0x39, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, - 0x70, 0x0c, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x0e, 0x70, 0x08, - 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, - 0x70, 0x0a, 0x00, 0x10, 0x70, 0x0b, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, - 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0xd2, 0xcf, 0x11, 0x80, 0x08, 0x0c, - 0x32, 0x79, 0x08, 0x0c, 0xd2, 0xe0, 0x15, 0x18, 0x08, 0x0c, 0xbc, 0xb6, - 0x04, 0x00, 0x08, 0x0c, 0xac, 0x1b, 0x68, 0x24, 0xd0, 0x84, 0x09, 0xb0, - 0x68, 0x27, 0x00, 0x01, 0x08, 0x98, 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x18, - 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x90, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xd0, 0xd6, 0x01, 0x68, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x20, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, 0xd5, 0x4c, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0xce, 0x08, 0x04, 0xb1, 0x20, - 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0xb1, 0x20, 0x70, 0x0f, - 0x00, 0x00, 0x70, 0x0b, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x6e, 0x00, 0x9e, - 0x00, 0xae, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x1d, 0x08, 0x08, 0x0c, 0xeb, 0xd4, - 0x08, 0xf0, 0x00, 0xd6, 0x01, 0x56, 0x08, 0x0c, 0xa1, 0x0c, 0x7a, 0x14, - 0x82, 0xff, 0x01, 0x38, 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, 0x00, 0x03, - 0x60, 0xc3, 0x00, 0x08, 0x04, 0x90, 0x70, 0x03, 0x02, 0x00, 0x70, 0x07, - 0x00, 0x00, 0x20, 0x69, 0x18, 0x00, 0x90, 0x1e, 0x68, 0x00, 0x90, 0x86, - 0x00, 0x04, 0x11, 0x10, 0xc3, 0x8d, 0x00, 0x60, 0x08, 0x0c, 0x76, 0x37, - 0x11, 0x10, 0xc3, 0xad, 0x00, 0x08, 0xc3, 0xa5, 0x6a, 0xdc, 0xd2, 0x9c, - 0x11, 0x10, 0xd2, 0xac, 0x01, 0x08, 0xc3, 0x9d, 0x73, 0x0e, 0x08, 0x0c, - 0x89, 0x4c, 0x20, 0xa9, 0x00, 0x06, 0x20, 0x11, 0xff, 0xec, 0x20, 0x19, - 0xff, 0xed, 0x20, 0x71, 0x02, 0x50, 0x23, 0x05, 0x20, 0x72, 0x8e, 0x70, - 0x22, 0x05, 0x20, 0x72, 0x8e, 0x70, 0x93, 0x98, 0x00, 0x02, 0x92, 0x90, - 0x00, 0x02, 0x1f, 0x04, 0xb1, 0xe3, 0x60, 0xc3, 0x00, 0x20, 0x08, 0x0c, - 0xa6, 0xbd, 0x01, 0x5e, 0x00, 0xde, 0x00, 0x05, 0x01, 0x56, 0x08, 0x0c, - 0xa1, 0x0c, 0x7a, 0x14, 0x82, 0xff, 0x01, 0x68, 0x92, 0x86, 0xff, 0xff, - 0x01, 0x18, 0x92, 0x82, 0x00, 0x0e, 0x12, 0x38, 0x70, 0x03, 0x01, 0x00, - 0x70, 0x0b, 0x00, 0x03, 0x60, 0xc3, 0x00, 0x08, 0x04, 0x88, 0x70, 0x03, - 0x02, 0x00, 0x70, 0x07, 0x00, 0x1c, 0x70, 0x0f, 0x00, 0x01, 0x20, 0x11, - 0x19, 0xbe, 0x22, 0x04, 0x80, 0x07, 0x70, 0x1a, 0x82, 0x10, 0x22, 0x04, - 0x80, 0x07, 0x70, 0x1e, 0x04, 0x21, 0x11, 0x20, 0xb8, 0xa0, 0x90, 0x82, - 0x00, 0x7f, 0x02, 0x48, 0x20, 0x01, 0x18, 0x1f, 0x20, 0x04, 0x70, 0x22, - 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, 0x70, 0x26, 0x00, 0x30, 0x20, 0x01, - 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, 0x70, 0x26, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x56, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x1c, - 0x01, 0x5e, 0x08, 0x04, 0xa6, 0xbd, 0x00, 0x06, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xac, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x11, 0x00, 0x03, - 0x08, 0x0c, 0xaa, 0xbf, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0xaa, 0xc9, - 0x08, 0x0c, 0xa9, 0xd3, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, 0xaa, 0x49, - 0x00, 0x3e, 0x00, 0x05, 0x08, 0x0c, 0x33, 0xaf, 0x01, 0x88, 0x00, 0x16, - 0x00, 0xb6, 0x00, 0xc6, 0x70, 0x10, 0x90, 0x85, 0x00, 0x20, 0x70, 0x12, - 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x67, 0x24, 0xb8, 0x5c, 0xc0, 0xac, - 0xb8, 0x5e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x71, - 0x18, 0x8d, 0x70, 0x00, 0x90, 0x05, 0x01, 0x40, 0x20, 0x01, 0x09, 0x76, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x76, 0x70, 0x7a, 0x70, 0x6b, 0xff, 0xe0, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x74, 0x70, 0x56, 0x70, 0x5b, 0x1c, 0xd0, - 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x71, 0x18, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x10, 0x06, 0x08, 0x70, 0x58, - 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, 0x9c, 0xe0, - 0x00, 0x18, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, - 0x1c, 0xd0, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, 0x75, 0x56, - 0x9c, 0xa8, 0x00, 0x18, 0x70, 0x68, 0x95, 0x02, 0x12, 0x30, 0x75, 0x5a, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x70, 0x5b, - 0x1c, 0xd0, 0x0c, 0xc0, 0x90, 0x06, 0x0c, 0xc0, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x10, 0x06, 0x00, 0x70, 0x58, - 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, 0x9c, 0xe0, - 0x00, 0x18, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, - 0x1c, 0xd0, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, 0x75, 0x56, - 0x9c, 0xa8, 0x00, 0x18, 0x70, 0x68, 0x95, 0x02, 0x12, 0x28, 0x75, 0x5a, - 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x70, 0x5b, 0x1c, 0xd0, - 0x0c, 0xc8, 0x90, 0x06, 0x0c, 0xc8, 0x9c, 0x82, 0x1c, 0xd0, 0x0a, 0x0c, - 0x0d, 0xc5, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x1a, 0x0c, - 0x0d, 0xc5, 0x90, 0x06, 0x60, 0x06, 0x60, 0x0a, 0x60, 0x0e, 0x60, 0x16, - 0x60, 0x1a, 0x60, 0x12, 0x60, 0x23, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, - 0x60, 0x1e, 0x60, 0x56, 0x60, 0x5a, 0x60, 0x26, 0x60, 0x2a, 0x60, 0x2e, - 0x60, 0x32, 0x60, 0x36, 0x60, 0x3a, 0x60, 0x3e, 0x60, 0x42, 0x60, 0x2a, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x54, 0x80, 0x00, 0x60, 0x56, 0x90, 0x86, - 0x00, 0x01, 0x01, 0x08, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0x16, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x1e, 0x01, 0x2e, 0x0c, 0xb0, - 0x00, 0x06, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0xc0, 0x60, 0x1c, - 0xd0, 0x84, 0x19, 0x0c, 0x1a, 0x8e, 0x60, 0x17, 0x00, 0x00, 0x60, 0x23, - 0x00, 0x07, 0x20, 0x01, 0x19, 0x86, 0x20, 0x04, 0x00, 0x06, 0x90, 0x82, - 0x00, 0x51, 0x00, 0x0e, 0x02, 0x08, 0x80, 0x04, 0x60, 0x1a, 0x08, 0x0c, - 0xee, 0x87, 0x60, 0x43, 0x00, 0x00, 0x60, 0x13, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x71, 0x18, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x01, 0x06, 0x08, 0x70, 0x58, - 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, 0x9c, 0xe0, - 0x00, 0x18, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x0c, 0xb0, 0x20, 0x61, - 0x1c, 0xd0, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, 0x75, 0x56, - 0x9c, 0xa8, 0x00, 0x18, 0x70, 0x68, 0x95, 0x02, 0x12, 0x30, 0x75, 0x5a, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x70, 0x5b, - 0x1c, 0xd0, 0x0c, 0xc0, 0x90, 0x06, 0x0c, 0xc0, 0x60, 0x20, 0x90, 0x84, - 0x00, 0x0f, 0x00, 0x02, 0xb3, 0x65, 0xb3, 0x6e, 0xb3, 0x89, 0xb3, 0xa4, - 0xd8, 0x2b, 0xd8, 0x48, 0xd8, 0x63, 0xb3, 0x65, 0xb3, 0x6e, 0x91, 0x00, - 0xb3, 0xbd, 0xb3, 0x65, 0xb3, 0x65, 0xb3, 0x65, 0xb3, 0x65, 0x91, 0x86, - 0x00, 0x13, 0x11, 0x28, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x00, 0x05, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, - 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0xb3, 0x87, - 0xbb, 0x05, 0xbc, 0xfd, 0xb3, 0x87, 0xbd, 0x93, 0xb6, 0xa0, 0xb3, 0x87, - 0xb3, 0x87, 0xba, 0x87, 0xc3, 0xb1, 0xb3, 0x87, 0xb3, 0x87, 0xb3, 0x87, - 0xb3, 0x87, 0xb3, 0x87, 0xb3, 0x87, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x66, - 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x13, - 0x00, 0x6e, 0x00, 0x05, 0xb3, 0xa2, 0xca, 0x7e, 0xb3, 0xa2, 0xb3, 0xa2, - 0xb3, 0xa2, 0xb3, 0xa2, 0xb3, 0xa2, 0xb3, 0xa2, 0xca, 0x15, 0xcc, 0x00, - 0xb3, 0xa2, 0xca, 0xbf, 0xcb, 0x3e, 0xca, 0xbf, 0xcb, 0x3e, 0xb3, 0xa2, - 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x00, 0x90, 0x82, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0xc5, 0x60, 0x00, 0x00, 0x02, 0xb3, 0xbb, 0xc3, 0xf8, 0xc4, 0xc0, - 0xc5, 0xf3, 0xc7, 0xa2, 0xb3, 0xbb, 0xb3, 0xbb, 0xb3, 0xbb, 0xc3, 0xcc, - 0xc9, 0xa1, 0xc9, 0xa4, 0xb3, 0xbb, 0xb3, 0xbb, 0xb3, 0xbb, 0xb3, 0xbb, - 0xc9, 0xd3, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, - 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, - 0xb3, 0xd6, 0xb3, 0xd6, 0xb4, 0x19, 0xb4, 0xb8, 0xb5, 0x4d, 0xb3, 0xd6, - 0xb3, 0xd6, 0xb3, 0xd6, 0xb3, 0xd8, 0xb3, 0xd6, 0xb3, 0xd6, 0xb3, 0xd6, - 0xb3, 0xd6, 0xb3, 0xd6, 0xb3, 0xd6, 0xb3, 0xd6, 0x08, 0x0c, 0x0d, 0xc5, - 0x91, 0x86, 0x00, 0x4c, 0x05, 0x88, 0x91, 0x86, 0x00, 0x03, 0x19, 0x0c, - 0x0d, 0xc5, 0x00, 0x96, 0x60, 0x1c, 0xc0, 0xed, 0x60, 0x1e, 0x60, 0x03, - 0x00, 0x03, 0x61, 0x06, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0x90, 0x84, - 0xa0, 0x00, 0xc0, 0xb5, 0xa8, 0x7e, 0xa8, 0xac, 0xa8, 0x46, 0xa8, 0xb0, - 0xa8, 0x4a, 0x90, 0x06, 0xa8, 0x36, 0xa8, 0x3a, 0xa8, 0x84, 0x90, 0x92, - 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x13, - 0x82, 0x13, 0x92, 0x10, 0x62, 0x1a, 0x00, 0x9e, 0x2c, 0x10, 0x08, 0x0c, - 0x1b, 0xe0, 0x08, 0x0c, 0x95, 0x64, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9b, 0xd3, 0x01, 0x2e, 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x08, 0x0c, 0xb5, 0x6f, - 0x08, 0x0c, 0xd7, 0xfb, 0x60, 0x03, 0x00, 0x07, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x96, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x7a, 0x90, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xec, 0x11, 0x10, 0x92, 0x90, 0x00, 0x18, - 0xac, 0x78, 0xc4, 0xfc, 0x00, 0x46, 0xa8, 0xe0, 0x90, 0x05, 0x11, 0x40, - 0xa8, 0xdc, 0x92, 0x1a, 0x01, 0x40, 0x02, 0x20, 0xa8, 0x7b, 0x00, 0x07, - 0x20, 0x10, 0x00, 0x28, 0xa8, 0x7b, 0x00, 0x15, 0x00, 0x10, 0xa8, 0x7b, - 0x00, 0x00, 0x82, 0x14, 0xa8, 0x83, 0x00, 0x00, 0xaa, 0x02, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x24, 0x00, 0x90, 0x05, 0x11, 0x08, 0x00, 0x9a, 0x21, 0x00, 0x90, 0x86, - 0x00, 0x15, 0x11, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x38, 0x21, 0x00, - 0x90, 0x86, 0x00, 0x16, 0x01, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x2a, - 0x94, 0xa4, 0x00, 0x07, 0x84, 0x23, 0x94, 0x05, 0x00, 0x02, 0xb4, 0x80, - 0xb4, 0x80, 0xb4, 0x7b, 0xb4, 0x7e, 0xb4, 0x80, 0xb4, 0x78, 0xb4, 0x6b, - 0xb4, 0x6b, 0xb4, 0x6b, 0xb4, 0x6b, 0xb4, 0x6b, 0xb4, 0x6b, 0xb4, 0x6b, - 0xb4, 0x6b, 0xb4, 0x6b, 0xb4, 0x6b, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x4e, 0x00, 0xfe, - 0x00, 0x9e, 0x00, 0xde, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xbf, 0xab, - 0x00, 0x28, 0x08, 0x0c, 0xc0, 0xe9, 0x00, 0x10, 0x08, 0x0c, 0xc1, 0xdf, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, - 0x2c, 0x00, 0xa8, 0x96, 0x00, 0x0e, 0x08, 0x0c, 0xb6, 0x2d, 0x05, 0x30, - 0xa8, 0x04, 0xa8, 0x0e, 0x00, 0xa6, 0x20, 0x50, 0xb1, 0x00, 0x00, 0xae, - 0x80, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, 0xaa, 0xcc, 0xab, 0xd0, 0xac, 0xd4, - 0xad, 0xd8, 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0x6c, 0x08, 0x0c, - 0xb7, 0xf1, 0x01, 0x60, 0x00, 0x0e, 0x90, 0x05, 0x01, 0x20, 0x00, 0xfe, - 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xde, - 0x08, 0x04, 0xb2, 0xd3, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, 0x08, 0x0c, - 0xb6, 0x93, 0x0c, 0x70, 0x91, 0xb6, 0x00, 0x15, 0x01, 0x70, 0x91, 0xb6, - 0x00, 0x16, 0x01, 0x58, 0x91, 0xb2, 0x00, 0x47, 0x0a, 0x0c, 0x0d, 0xc5, - 0x91, 0xb2, 0x00, 0x50, 0x1a, 0x0c, 0x0d, 0xc5, 0x91, 0x82, 0x00, 0x47, - 0x00, 0xca, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x98, - 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0x08, 0x0c, 0x94, 0xb1, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, - 0xa0, 0x01, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, 0x11, 0x10, 0x08, 0x04, - 0xb4, 0x19, 0x00, 0x05, 0xb4, 0xeb, 0xb4, 0xeb, 0xb4, 0xed, 0xb5, 0x23, - 0xb4, 0xeb, 0xb4, 0xeb, 0xb4, 0xeb, 0xb4, 0xeb, 0xb5, 0x36, 0x08, 0x0c, - 0x0d, 0xc5, 0x00, 0xd6, 0x00, 0x16, 0x00, 0x96, 0x08, 0x0c, 0x9a, 0x61, - 0x08, 0x0c, 0x9b, 0xd3, 0x60, 0x03, 0x00, 0x04, 0x61, 0x14, 0x21, 0x48, - 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0xc0, 0xa8, 0x78, 0xc0, 0xfc, 0x90, 0x05, - 0x11, 0x58, 0xa8, 0x94, 0x90, 0x05, 0x01, 0x40, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x0e, 0x08, 0x0c, 0xb6, 0x93, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xa8, - 0x60, 0x03, 0x00, 0x02, 0xa8, 0xa4, 0xa9, 0xa8, 0x91, 0x05, 0x11, 0x78, - 0xa8, 0xae, 0xa8, 0xb2, 0x0c, 0x78, 0xa8, 0x7f, 0x00, 0x20, 0xa8, 0x8c, - 0xa8, 0x8a, 0xa8, 0xa4, 0xa8, 0xae, 0xa8, 0xa8, 0xa8, 0xb2, 0xa8, 0xc7, - 0x00, 0x00, 0xa8, 0xcb, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x1e, 0x00, 0xde, - 0x00, 0x05, 0x08, 0x0c, 0x9a, 0x61, 0x00, 0xd6, 0x00, 0x96, 0x61, 0x14, - 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x20, 0xa8, 0x7b, 0x00, 0x06, - 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x0c, 0xb2, 0xd3, - 0x08, 0x04, 0x9b, 0xd3, 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, 0x32, 0x50, - 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0xd6, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x20, 0xa8, 0x7b, 0x00, 0x29, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x04, - 0x9b, 0xd3, 0x91, 0x82, 0x00, 0x47, 0x00, 0x02, 0xb5, 0x5d, 0xb5, 0x5f, - 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, - 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5d, 0xb5, 0x5f, 0x08, 0x0c, - 0x0d, 0xc5, 0x00, 0xd6, 0x00, 0x96, 0x60, 0x1f, 0x00, 0x00, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x04, 0xb2, 0xd3, 0x00, 0x26, - 0x00, 0x36, 0x00, 0x56, 0x00, 0x66, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xf6, - 0x00, 0x06, 0x08, 0x0c, 0x10, 0x0e, 0x00, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, - 0xa9, 0x60, 0x21, 0xe8, 0xa9, 0x5c, 0x91, 0x88, 0x00, 0x19, 0x21, 0xa0, - 0x90, 0x0e, 0x20, 0xa9, 0x00, 0x20, 0x41, 0x04, 0xa8, 0x7a, 0x20, 0x79, - 0x18, 0x00, 0x79, 0x90, 0x91, 0x88, 0x00, 0x18, 0x91, 0x8c, 0x0f, 0xff, - 0xa9, 0x72, 0xac, 0x76, 0x29, 0x50, 0x00, 0xa6, 0x20, 0x01, 0x02, 0x05, - 0x20, 0x03, 0x00, 0x00, 0x90, 0x1e, 0x20, 0x29, 0x00, 0x01, 0x91, 0x82, - 0x00, 0x35, 0x12, 0x28, 0x20, 0x11, 0x00, 0x1f, 0x08, 0x0c, 0xcc, 0x85, - 0x04, 0xc0, 0x21, 0x30, 0x20, 0x09, 0x00, 0x34, 0x20, 0x11, 0x00, 0x1f, - 0x08, 0x0c, 0xcc, 0x85, 0x96, 0xb2, 0x00, 0x34, 0xb0, 0x04, 0x90, 0x4d, - 0x01, 0x10, 0x08, 0x0c, 0x0f, 0xc0, 0x08, 0x0c, 0x10, 0x0e, 0x01, 0xd0, - 0x85, 0x28, 0xa8, 0x67, 0x01, 0x10, 0xa8, 0x6b, 0x00, 0x00, 0x29, 0x20, - 0xb4, 0x06, 0x96, 0x8a, 0x00, 0x3d, 0x12, 0x30, 0x26, 0x08, 0x20, 0x11, - 0x00, 0x1b, 0x08, 0x0c, 0xcc, 0x85, 0x00, 0xb8, 0x96, 0xb2, 0x00, 0x3c, - 0x20, 0x09, 0x00, 0x3c, 0x29, 0x50, 0x20, 0x11, 0x00, 0x1b, 0x08, 0x0c, - 0xcc, 0x85, 0x0c, 0x18, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, - 0x00, 0xae, 0x85, 0x2f, 0x95, 0xad, 0x00, 0x50, 0xb5, 0x66, 0xb0, 0x70, - 0xc0, 0xfd, 0xb0, 0x72, 0x00, 0x48, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, - 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, 0x95, 0xad, 0x00, 0x50, 0xb5, 0x66, - 0x2a, 0x48, 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, 0x00, 0x06, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x0e, 0x20, 0x48, 0x90, 0x05, 0x1d, 0xb0, 0x00, 0xfe, - 0x00, 0xae, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0xf6, 0x00, 0x96, 0x00, 0x06, 0x08, 0x0c, - 0x10, 0x0e, 0x00, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, 0xa9, 0x60, 0x21, 0xe8, - 0xa9, 0x5c, 0x91, 0x88, 0x00, 0x19, 0x21, 0xa0, 0x90, 0x0e, 0x20, 0xa9, - 0x00, 0x20, 0x41, 0x04, 0xaa, 0x66, 0xa8, 0x7a, 0x20, 0x79, 0x18, 0x00, - 0x79, 0x90, 0x81, 0x0c, 0x91, 0x88, 0x00, 0x0c, 0x91, 0x82, 0x00, 0x1a, - 0x02, 0x10, 0x20, 0x09, 0x00, 0x1a, 0x21, 0xa8, 0x81, 0x0b, 0xa9, 0x72, - 0xac, 0x76, 0x2e, 0x98, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1f, 0x20, 0xa0, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x0c, 0x91, 0x8d, 0x00, 0x80, 0x21, 0x02, - 0x40, 0x03, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, - 0x00, 0xfe, 0x00, 0xde, 0x00, 0x05, 0x00, 0x16, 0x00, 0xd6, 0x00, 0xf6, - 0x00, 0x96, 0x00, 0x16, 0x20, 0x01, 0x02, 0x05, 0x20, 0x0c, 0x91, 0x8d, - 0x00, 0x80, 0x21, 0x02, 0x00, 0x1e, 0x20, 0x79, 0x02, 0x00, 0x2e, 0x98, - 0xa8, 0x7c, 0xd0, 0xec, 0x01, 0x18, 0x9e, 0x80, 0x00, 0x0c, 0x20, 0x98, - 0x20, 0x21, 0x00, 0x3e, 0x90, 0x1e, 0x92, 0x82, 0x00, 0x20, 0x02, 0x18, - 0x20, 0x11, 0x00, 0x20, 0x20, 0x18, 0x94, 0x86, 0x00, 0x3e, 0x11, 0x70, - 0x00, 0x96, 0x08, 0x0c, 0x10, 0x0e, 0x29, 0x00, 0x00, 0x9e, 0x05, 0xc0, - 0xa8, 0x06, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x02, 0x20, 0xa0, 0x33, 0x00, 0x90, 0x8e, 0x02, 0x60, 0x01, 0x40, - 0x20, 0x09, 0x02, 0x80, 0x91, 0x02, 0x92, 0x0a, 0x02, 0x18, 0x20, 0x10, - 0x21, 0x00, 0x93, 0x18, 0x22, 0x00, 0x94, 0x02, 0x12, 0x28, 0x24, 0x00, - 0x92, 0x02, 0x24, 0x10, 0x93, 0x18, 0x90, 0x06, 0x20, 0x20, 0x22, 0xa8, - 0xa8, 0x00, 0x92, 0x00, 0xa8, 0x02, 0x20, 0xe1, 0x00, 0x00, 0x40, 0x03, - 0x83, 0xff, 0x01, 0x80, 0x33, 0x00, 0x90, 0x86, 0x02, 0x80, 0x11, 0x30, - 0x78, 0x14, 0x80, 0x00, 0x90, 0x85, 0x00, 0x80, 0x78, 0x16, 0x2e, 0x98, - 0x23, 0x10, 0x84, 0xff, 0x09, 0x04, 0xb6, 0x42, 0x08, 0x04, 0xb6, 0x44, - 0x90, 0x85, 0x00, 0x01, 0x78, 0x17, 0x00, 0x00, 0x00, 0x9e, 0x00, 0xfe, - 0x00, 0xde, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x96, - 0x63, 0x14, 0x23, 0x48, 0xa8, 0x7a, 0xa9, 0x82, 0x08, 0x0c, 0x6e, 0x92, - 0x00, 0x9e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x91, 0xb6, 0x00, 0x15, - 0x11, 0x18, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x30, 0x91, 0xb6, 0x00, 0x16, - 0x19, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x20, 0xa9, - 0x00, 0x0e, 0x20, 0xe1, 0x00, 0x00, 0x2e, 0x98, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x20, 0xa0, 0x00, 0x9e, - 0x40, 0x03, 0x91, 0x96, 0x00, 0x16, 0x01, 0xf0, 0x01, 0x36, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x11, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x01, - 0x34, 0x18, 0x83, 0x18, 0x23, 0xa0, 0x40, 0x03, 0x33, 0x18, 0x83, 0x18, - 0x23, 0x98, 0x82, 0x11, 0x1d, 0xb8, 0x20, 0x11, 0x00, 0x06, 0x01, 0x3e, - 0x20, 0xa0, 0x33, 0x18, 0x83, 0x18, 0x23, 0x98, 0x40, 0x03, 0x34, 0x18, - 0x83, 0x18, 0x23, 0xa0, 0x82, 0x11, 0x1d, 0xb8, 0x00, 0x96, 0x08, 0x0c, - 0xd0, 0xd8, 0x01, 0x30, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, - 0xa8, 0x67, 0x01, 0x03, 0x00, 0x9e, 0x08, 0x04, 0xb2, 0xd3, 0x00, 0x96, - 0x00, 0xd6, 0x00, 0x36, 0x73, 0x30, 0x93, 0x86, 0x02, 0x00, 0x11, 0xa8, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xcf, 0x00, 0x00, 0x00, 0xbe, - 0x60, 0x14, 0x90, 0x05, 0x01, 0x30, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x32, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x3e, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x11, 0x1d, 0x48, 0x0c, 0xc8, - 0x00, 0x06, 0x00, 0x16, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x88, 0x60, 0x14, - 0x90, 0x05, 0x11, 0x70, 0x60, 0x0b, 0x00, 0x03, 0x60, 0x1b, 0x00, 0x00, - 0x60, 0x43, 0x00, 0x00, 0x20, 0x09, 0x00, 0x22, 0x08, 0x0c, 0xba, 0xdd, - 0x90, 0x06, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, - 0x0c, 0xd0, 0x00, 0x96, 0x00, 0x16, 0x20, 0xa9, 0x00, 0x14, 0x9e, 0x80, - 0x00, 0x0c, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x98, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, - 0x40, 0x03, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x01, 0x20, 0x99, - 0x02, 0x60, 0x20, 0xa9, 0x00, 0x16, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x0a, - 0xa8, 0x04, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, - 0x00, 0x02, 0x20, 0x99, 0x02, 0x60, 0x20, 0xa9, 0x00, 0x20, 0x40, 0x03, - 0x20, 0x03, 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, - 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0x96, 0x00, 0x16, 0x90, 0x0e, 0x70, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x01, 0x40, 0x70, 0x38, 0x90, 0x84, 0x00, 0xff, 0x80, 0x0c, - 0x70, 0x3c, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, 0x90, 0x80, 0x00, 0x04, - 0x91, 0x08, 0x81, 0x0b, 0x20, 0x11, 0x00, 0x02, 0x20, 0x19, 0x00, 0x0c, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcc, 0x85, 0x08, 0x0c, 0xd0, 0xd8, - 0x01, 0x40, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x64, - 0xa8, 0xe2, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, - 0x00, 0x9e, 0x00, 0x05, 0x00, 0x16, 0x20, 0x09, 0x00, 0x00, 0x70, 0x30, - 0x90, 0x86, 0x02, 0x00, 0x01, 0x10, 0x20, 0x09, 0x00, 0x01, 0x00, 0x96, - 0x60, 0x14, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa9, 0x7a, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x96, 0x70, 0x30, 0x90, 0x86, 0x01, 0x00, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x04, 0x00, 0x10, 0x70, 0x34, 0x80, 0x0c, 0x81, 0x0b, - 0x20, 0x11, 0x00, 0x0c, 0x20, 0x19, 0x00, 0x0c, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x04, 0x00, 0x96, 0x90, 0x05, 0x01, 0x08, 0x20, 0x48, 0x08, 0x0c, - 0xcc, 0x85, 0x00, 0x9e, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x48, 0xa8, 0x04, - 0x90, 0x05, 0x11, 0x58, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x64, 0xa8, 0xe2, - 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x86, 0x20, 0x40, 0xa0, 0x30, 0x80, 0x07, 0x90, 0x86, - 0x01, 0x00, 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0xe0, 0xa0, 0x34, - 0x80, 0x07, 0x80, 0x0c, 0x88, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, - 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x0c, 0xa8, 0x7b, - 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0xaa, 0xa0, - 0xab, 0x9c, 0xac, 0xa8, 0xad, 0xa4, 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, - 0x12, 0x52, 0x00, 0x19, 0x0d, 0x08, 0x00, 0x8e, 0x08, 0x98, 0x00, 0x96, - 0x00, 0x06, 0x08, 0x0c, 0x10, 0x0e, 0x00, 0x0e, 0x01, 0xb0, 0xa8, 0xab, - 0x0d, 0xcb, 0xa8, 0x76, 0x00, 0x0e, 0xa8, 0xa2, 0x00, 0x06, 0xae, 0x6a, - 0x28, 0x00, 0xa8, 0x9e, 0xa9, 0x7a, 0xaf, 0x72, 0xaa, 0x8e, 0xab, 0x92, - 0xac, 0x96, 0xad, 0x9a, 0x00, 0x86, 0x29, 0x40, 0x08, 0x0c, 0x10, 0xf8, - 0x00, 0x8e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0x26, 0x70, 0x08, 0x90, 0x84, 0x00, 0xff, 0x62, 0x10, - 0x00, 0xb6, 0x22, 0x58, 0xba, 0x10, 0x00, 0xbe, 0x92, 0x06, 0x15, 0x20, - 0x70, 0x0c, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0x14, 0x00, 0xbe, - 0x92, 0x06, 0x11, 0xe0, 0x60, 0x43, 0x00, 0x00, 0x2c, 0x68, 0x00, 0x16, - 0x20, 0x09, 0x00, 0x35, 0x08, 0x0c, 0xd7, 0x59, 0x00, 0x1e, 0x11, 0x58, - 0x62, 0x2c, 0x22, 0x68, 0x20, 0x71, 0x02, 0x6c, 0x6b, 0x20, 0x93, 0x86, - 0x00, 0x03, 0x01, 0x30, 0x93, 0x86, 0x00, 0x06, 0x01, 0x28, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x20, 0x00, 0x39, 0x00, 0x10, 0x08, 0x0c, 0xb9, 0x10, - 0x00, 0x2e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, 0x68, 0x14, - 0x20, 0x48, 0x91, 0x86, 0x00, 0x15, 0x09, 0x04, 0xb8, 0xf8, 0x91, 0x8e, - 0x00, 0x16, 0x19, 0x04, 0xb9, 0x0e, 0x70, 0x0c, 0x90, 0x8c, 0xff, 0x00, - 0x91, 0x86, 0x17, 0x00, 0x01, 0x20, 0x91, 0x86, 0x03, 0x00, 0x19, 0x04, - 0xb8, 0xd2, 0x89, 0xff, 0x11, 0x38, 0x68, 0x00, 0x90, 0x86, 0x00, 0x0f, - 0x09, 0x04, 0xb8, 0xb5, 0x08, 0x04, 0xb9, 0x0c, 0x68, 0x08, 0x90, 0x86, - 0xff, 0xff, 0x19, 0x04, 0xb8, 0xfa, 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x60, - 0x90, 0x86, 0x00, 0x20, 0x11, 0x28, 0xa8, 0x3c, 0xa9, 0x40, 0x91, 0x05, - 0x19, 0x04, 0xb8, 0xfa, 0x68, 0x24, 0xd0, 0x84, 0x19, 0x04, 0xb8, 0xfa, - 0xd0, 0xb4, 0x01, 0x58, 0x00, 0x16, 0x20, 0x01, 0x19, 0x86, 0x20, 0x0c, - 0x60, 0x18, 0x91, 0x02, 0x90, 0x82, 0x00, 0x05, 0x00, 0x1e, 0x1a, 0x04, - 0xb8, 0xfa, 0x08, 0x0c, 0xd2, 0xc3, 0x68, 0x5c, 0xa8, 0x82, 0xa8, 0x7c, - 0xc0, 0xdc, 0xc0, 0xf4, 0xc0, 0xd4, 0xa8, 0x7e, 0x00, 0x26, 0x90, 0x0e, - 0x6a, 0x18, 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x93, 0x75, 0xa8, 0x84, - 0x92, 0x0a, 0x02, 0x08, 0x80, 0x11, 0xaa, 0x86, 0x82, 0xff, 0x00, 0x2e, - 0x11, 0x38, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xcd, 0xe3, 0x00, 0xce, - 0x08, 0x04, 0xb9, 0x0c, 0x00, 0xc6, 0xa8, 0x68, 0xd0, 0xfc, 0x11, 0x18, - 0x08, 0x0c, 0x61, 0xc2, 0x00, 0x10, 0x08, 0x0c, 0x65, 0xcf, 0x00, 0xce, - 0x19, 0x04, 0xb8, 0xfa, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0xce, 0x08, 0x04, 0xb9, 0x0c, 0x00, 0xc6, 0x08, 0x0c, 0xb3, 0x25, - 0x01, 0x98, 0x60, 0x17, 0x00, 0x00, 0x68, 0x10, 0x60, 0x12, 0x08, 0x0c, - 0xd5, 0x54, 0x60, 0x23, 0x00, 0x03, 0x69, 0x04, 0x00, 0xc6, 0x2d, 0x60, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, 0x08, 0x0c, 0xb3, 0x52, 0x00, 0xce, - 0x08, 0x04, 0xb9, 0x0c, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x68, 0x42, - 0x00, 0xce, 0x04, 0xd0, 0x70, 0x08, 0x90, 0x86, 0x00, 0x0b, 0x11, 0xc8, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0x00, 0xc1, 0xbc, 0xb9, 0x02, - 0x00, 0xbe, 0x00, 0xc6, 0x2d, 0x60, 0xa8, 0x7b, 0x00, 0x03, 0x08, 0x0c, - 0xd7, 0x9d, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, - 0x00, 0x02, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, - 0x00, 0xe8, 0x70, 0x0c, 0x90, 0x86, 0x2a, 0x00, 0x11, 0x38, 0x20, 0x01, - 0x19, 0x88, 0x20, 0x04, 0x68, 0x42, 0x00, 0xa0, 0x04, 0x79, 0x00, 0xa0, - 0x89, 0xff, 0x09, 0x0c, 0x0d, 0xc5, 0x00, 0xc6, 0x00, 0xd6, 0x2d, 0x60, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x03, 0x08, 0x0c, 0x6c, 0xb9, - 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xde, 0x00, 0xce, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x15, - 0x11, 0x28, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x68, 0x42, 0x00, 0x68, - 0x91, 0x8e, 0x00, 0x16, 0x11, 0x60, 0x00, 0xc6, 0x2d, 0x00, 0x20, 0x60, - 0x08, 0x0c, 0xee, 0x87, 0x08, 0x0c, 0x8a, 0x25, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0xce, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, - 0x00, 0x46, 0x72, 0x28, 0xac, 0xb0, 0xab, 0xac, 0xd2, 0xf4, 0x01, 0x30, - 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x68, 0x42, 0x08, 0x04, 0xb9, 0x8a, - 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xcc, 0xe6, 0x00, 0xce, 0x68, 0x04, - 0x90, 0x86, 0x00, 0x50, 0x11, 0x68, 0x00, 0xc6, 0x2d, 0x00, 0x20, 0x60, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x50, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, 0x04, 0xf0, 0x68, 0x00, 0x90, 0x86, - 0x00, 0x0f, 0x01, 0xa8, 0x89, 0xff, 0x09, 0x0c, 0x0d, 0xc5, 0x68, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x90, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x78, - 0xa8, 0x43, 0x0f, 0xff, 0xa8, 0x3f, 0x0f, 0xff, 0xa8, 0x80, 0xc0, 0xfc, - 0xa8, 0x82, 0x20, 0x01, 0x00, 0x01, 0x68, 0x32, 0x04, 0x00, 0x20, 0x01, - 0x00, 0x07, 0x68, 0x32, 0x00, 0xe0, 0xa8, 0x7c, 0xd0, 0xb4, 0x11, 0x50, - 0xd0, 0xac, 0x0d, 0xb8, 0x68, 0x24, 0xd0, 0xf4, 0x1d, 0x48, 0xa8, 0x38, - 0xa9, 0x34, 0x91, 0x05, 0x0d, 0x80, 0x0c, 0x20, 0xd2, 0xec, 0x1d, 0x68, - 0x70, 0x24, 0x93, 0x06, 0x11, 0x18, 0x70, 0x20, 0x94, 0x06, 0x0d, 0x38, - 0x70, 0x20, 0x68, 0x3e, 0x70, 0x24, 0x68, 0x3a, 0x20, 0x01, 0x00, 0x05, - 0x68, 0x32, 0x08, 0x0c, 0xd4, 0x4b, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x10, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x26, 0x70, 0x08, 0x90, 0x84, 0x00, 0xff, - 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0x10, 0x00, 0xbe, 0x92, 0x06, - 0x19, 0x04, 0xb9, 0xf5, 0x70, 0x0c, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, - 0xba, 0x14, 0x00, 0xbe, 0x92, 0x06, 0x19, 0x04, 0xb9, 0xf5, 0x60, 0x38, - 0x20, 0x68, 0x68, 0x24, 0xc0, 0xdc, 0x68, 0x26, 0x6a, 0x20, 0x92, 0x86, - 0x00, 0x07, 0x09, 0x04, 0xb9, 0xf5, 0x92, 0x86, 0x00, 0x02, 0x09, 0x04, - 0xb9, 0xf5, 0x92, 0x86, 0x00, 0x00, 0x05, 0xe8, 0x68, 0x08, 0x63, 0x3c, - 0x93, 0x06, 0x15, 0xc8, 0x20, 0x71, 0x02, 0x6c, 0x91, 0x86, 0x00, 0x15, - 0x05, 0x70, 0x91, 0x8e, 0x00, 0x16, 0x11, 0x00, 0x00, 0xc6, 0x60, 0x38, - 0x20, 0x60, 0x61, 0x04, 0x91, 0x86, 0x00, 0x4b, 0x01, 0xc0, 0x91, 0x86, - 0x00, 0x4c, 0x01, 0xa8, 0x91, 0x86, 0x00, 0x4d, 0x01, 0x90, 0x91, 0x86, - 0x00, 0x4e, 0x01, 0x78, 0x91, 0x86, 0x00, 0x52, 0x01, 0x60, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x09, 0x0c, 0x0d, 0xc5, - 0xa8, 0x7b, 0x00, 0x03, 0x00, 0x9e, 0x08, 0x0c, 0xd7, 0x9d, 0x60, 0x07, - 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, 0x08, 0x0c, - 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, 0x00, 0x30, 0x60, 0x38, - 0x20, 0x70, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x70, 0x42, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x2e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0x96, 0x00, 0xf6, 0x60, 0x14, 0x20, 0x48, 0x60, 0x10, 0x20, 0x58, - 0x91, 0xb6, 0x00, 0x15, 0x01, 0x30, 0xba, 0x08, 0xbb, 0x0c, 0xbc, 0x00, - 0xc4, 0x8c, 0xbc, 0x02, 0x04, 0x70, 0x00, 0x96, 0x01, 0x56, 0x00, 0x36, - 0x00, 0x26, 0x2b, 0x48, 0x9e, 0x90, 0x00, 0x10, 0x20, 0x19, 0x00, 0x0a, - 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x2e, 0x00, 0x3e, - 0x01, 0x5e, 0x00, 0x9e, 0x19, 0x04, 0xba, 0x66, 0x00, 0x96, 0x01, 0x56, - 0x00, 0x36, 0x00, 0x26, 0x2b, 0x48, 0x9e, 0x90, 0x00, 0x14, 0x20, 0x19, - 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x2e, - 0x00, 0x3e, 0x01, 0x5e, 0x00, 0x9e, 0x15, 0xb0, 0x72, 0x38, 0xba, 0x0a, - 0x73, 0x3c, 0xbb, 0x0e, 0x83, 0xff, 0x01, 0x18, 0xbc, 0x00, 0xc4, 0x8d, - 0xbc, 0x02, 0xa8, 0x04, 0x90, 0x05, 0x11, 0x28, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0xbe, 0x08, 0x04, 0xb6, 0xdc, 0x00, 0x96, 0x20, 0x48, 0xaa, 0x12, - 0xab, 0x16, 0xac, 0x0a, 0x00, 0x9e, 0x80, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, - 0x20, 0x09, 0x00, 0x2b, 0xaa, 0xa0, 0xab, 0x9c, 0xac, 0xa8, 0xad, 0xa4, - 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0x52, 0x08, 0x0c, 0xb7, 0xf1, - 0x01, 0x30, 0x00, 0xfe, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xbe, - 0x00, 0x05, 0x08, 0x0c, 0xbc, 0xb6, 0x0c, 0xb8, 0x2b, 0x78, 0x00, 0xf6, - 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0xfe, 0x00, 0xc6, - 0x08, 0x0c, 0xb2, 0x7d, 0x2f, 0x00, 0x60, 0x12, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x0c, 0x66, 0x96, - 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, 0x08, 0x04, - 0xba, 0x39, 0x21, 0x00, 0x91, 0xb2, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, - 0x91, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xba, 0xef, 0x00, 0x02, 0xba, 0xdd, - 0xba, 0xdd, 0xba, 0xd3, 0xba, 0xdd, 0xba, 0xdd, 0xba, 0xdd, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xdd, 0xba, 0xd1, 0xba, 0xdd, 0xba, 0xdd, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd3, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xdd, 0xba, 0xdd, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, 0xba, 0xd1, - 0xba, 0xdd, 0xba, 0xd1, 0xba, 0xd1, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x66, - 0x00, 0xb6, 0x66, 0x10, 0x26, 0x58, 0xb8, 0xcc, 0xc0, 0x8c, 0xb8, 0xce, - 0x00, 0xbe, 0x00, 0x6e, 0x00, 0x00, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x91, 0x86, 0x00, 0x32, 0x01, 0x18, 0x08, 0x0c, 0x95, 0x47, 0x00, 0x10, - 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, 0xba, 0xdd, - 0xba, 0xdd, 0xbb, 0x03, 0xba, 0xdd, 0xba, 0xdd, 0xbb, 0x03, 0xbb, 0x03, - 0xbb, 0x03, 0xbb, 0x03, 0xba, 0xdd, 0xbb, 0x03, 0xba, 0xdd, 0xbb, 0x03, - 0xba, 0xdd, 0xbb, 0x03, 0xbb, 0x03, 0xbb, 0x03, 0xbb, 0x03, 0x08, 0x0c, - 0x0d, 0xc5, 0x60, 0x04, 0x90, 0xb2, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, - 0x91, 0xb6, 0x00, 0x13, 0x09, 0x04, 0xbb, 0xd8, 0x91, 0xb6, 0x00, 0x27, - 0x19, 0x04, 0xbb, 0x82, 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x04, 0x08, 0x0c, - 0xd2, 0xcf, 0x01, 0xb0, 0x08, 0x0c, 0xd2, 0xe0, 0x01, 0xa8, 0x90, 0x8e, - 0x00, 0x21, 0x09, 0x04, 0xbb, 0x7f, 0x90, 0x8e, 0x00, 0x22, 0x11, 0x30, - 0x08, 0x0c, 0xb7, 0x08, 0x09, 0x04, 0xbb, 0x7b, 0x08, 0x04, 0xbb, 0x7c, - 0x90, 0x8e, 0x00, 0x3d, 0x09, 0x04, 0xbb, 0x7f, 0x08, 0x04, 0xbb, 0x75, - 0x08, 0x0c, 0x32, 0x79, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x6a, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0xa0, 0x00, 0xbe, 0x08, 0x0c, - 0xbc, 0xb6, 0x91, 0x86, 0x00, 0x7e, 0x11, 0x48, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x14, 0xc2, 0x85, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x08, 0xc2, 0xad, - 0x22, 0x02, 0x00, 0x36, 0x00, 0x26, 0x20, 0x19, 0x00, 0x28, 0x21, 0x10, - 0x08, 0x0c, 0xef, 0x94, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x21, 0x10, 0x20, 0x19, 0x00, 0x28, 0x08, 0x0c, 0x96, 0xa4, - 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, 0x60, 0x10, 0x00, 0xb6, - 0x90, 0x5d, 0x01, 0x00, 0x00, 0xbe, 0x2c, 0x08, 0x08, 0x0c, 0xe9, 0x1c, - 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, 0xd7, 0xf8, - 0x00, 0x16, 0x08, 0x0c, 0xd5, 0x4c, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, - 0x08, 0x0c, 0x33, 0x4c, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x30, 0x08, 0x0c, - 0xd5, 0x4c, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x08, 0x0c, 0xbc, 0xb6, 0x0c, 0xb0, 0x08, 0x0c, 0xbc, 0xf2, 0x0c, 0x98, - 0x91, 0x86, 0x00, 0x15, 0x01, 0x18, 0x91, 0x86, 0x00, 0x16, 0x11, 0x48, - 0x08, 0x0c, 0xd8, 0x09, 0x0d, 0x80, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, - 0x09, 0x04, 0xbc, 0xfd, 0x0c, 0x50, 0x91, 0x86, 0x00, 0x14, 0x1d, 0x38, - 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x22, 0x11, 0x18, - 0x08, 0x0c, 0xb7, 0x08, 0x09, 0xf0, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd7, 0xf8, 0x08, 0x0c, 0xd2, 0xcf, 0x11, 0x98, 0x08, 0x0c, 0x32, 0x79, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0xa0, 0x00, 0xbe, 0x08, 0x0c, - 0xbc, 0xb6, 0x91, 0x86, 0x00, 0x7e, 0x11, 0x28, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, 0x08, 0x04, 0xbb, 0x75, 0x08, 0x0c, - 0xd2, 0xe0, 0x11, 0x20, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x04, 0xbb, 0x75, - 0x60, 0x04, 0x90, 0x8e, 0x00, 0x32, 0x11, 0x60, 0x00, 0xe6, 0x00, 0xf6, - 0x20, 0x71, 0x18, 0x9e, 0x20, 0x79, 0x00, 0x00, 0x08, 0x0c, 0x35, 0xe7, - 0x00, 0xfe, 0x00, 0xee, 0x08, 0x04, 0xbb, 0x75, 0x60, 0x04, 0x90, 0x8e, - 0x00, 0x21, 0x0d, 0x40, 0x90, 0x8e, 0x00, 0x22, 0x09, 0x0c, 0xbc, 0xb6, - 0x08, 0x04, 0xbb, 0x75, 0x90, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xbc, 0x92, - 0x20, 0x08, 0x00, 0x02, 0xbc, 0x20, 0xbc, 0x21, 0xbc, 0x24, 0xbc, 0x27, - 0xbc, 0x2a, 0xbc, 0x37, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x3a, 0xbc, 0x47, 0xbc, 0x1e, 0xbc, 0x49, - 0xbc, 0x47, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x47, 0xbc, 0x47, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x79, 0xbc, 0x47, - 0xbc, 0x1e, 0xbc, 0x43, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x44, - 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x1e, 0xbc, 0x47, 0xbc, 0x70, 0xbc, 0x1e, - 0x08, 0x0c, 0x0d, 0xc5, 0x04, 0x30, 0x20, 0x01, 0x00, 0x0b, 0x04, 0x70, - 0x20, 0x01, 0x00, 0x03, 0x04, 0x58, 0x20, 0x01, 0x00, 0x05, 0x04, 0x40, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x04, 0x00, 0xbe, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x00, 0x15, 0x00, 0x20, 0x01, 0x00, 0x01, - 0x00, 0xd8, 0x20, 0x01, 0x00, 0x09, 0x00, 0xc0, 0x08, 0x0c, 0x99, 0xa5, - 0x60, 0x03, 0x00, 0x05, 0x08, 0x0c, 0xd7, 0xfb, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x70, 0x00, 0x18, 0x00, 0x10, 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x04, - 0xbc, 0x8a, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xd7, 0xfb, 0x60, 0x03, - 0x00, 0x04, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0x66, 0x6a, - 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x03, 0x00, 0x02, 0x00, 0x36, 0x20, 0x19, - 0x18, 0x52, 0x23, 0x04, 0x90, 0x84, 0xff, 0x00, 0x11, 0x20, 0x20, 0x01, - 0x19, 0x86, 0x20, 0x1c, 0x00, 0x40, 0x80, 0x07, 0x90, 0x9a, 0x00, 0x04, - 0x0e, 0xc0, 0x80, 0x03, 0x80, 0x1b, 0x83, 0x1b, 0x93, 0x18, 0x63, 0x1a, - 0x00, 0x3e, 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0x08, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0xd5, 0x4c, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, - 0x08, 0xc0, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x9e, 0x20, 0x79, - 0x00, 0x00, 0x08, 0x0c, 0x35, 0xe7, 0x00, 0xfe, 0x00, 0xee, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x38, - 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0xd7, 0xfb, - 0x08, 0x04, 0x9a, 0xb1, 0x26, 0x00, 0x20, 0x08, 0x00, 0x02, 0xbc, 0xa9, - 0xbc, 0x8a, 0xbc, 0xa7, 0xbc, 0x8a, 0xbc, 0x8a, 0xbc, 0xa7, 0xbc, 0xa7, - 0xbc, 0xa7, 0xbc, 0xa7, 0xbc, 0x8a, 0xbc, 0xa7, 0xbc, 0x8a, 0xbc, 0xa7, - 0xbc, 0x8a, 0xbc, 0xa7, 0xbc, 0xa7, 0xbc, 0xa7, 0xbc, 0xa7, 0x08, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x96, 0x00, 0x26, 0x00, 0x16, - 0x08, 0x0c, 0xd0, 0xd8, 0x05, 0x68, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x64, - 0x90, 0x86, 0x01, 0x39, 0x11, 0xa8, 0xa8, 0x94, 0x90, 0x86, 0x00, 0x56, - 0x11, 0x48, 0x08, 0x0c, 0x55, 0x6f, 0x01, 0x30, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x00, 0x28, 0x20, 0x01, 0x00, 0x30, - 0x90, 0x0e, 0x20, 0x11, 0x40, 0x05, 0x08, 0x0c, 0xd6, 0xbd, 0x00, 0x90, - 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x78, 0xa8, 0x07, 0x00, 0x00, 0x00, 0x16, - 0x60, 0x04, 0x90, 0x8e, 0x00, 0x21, 0x01, 0x68, 0x90, 0x8e, 0x00, 0x3d, - 0x01, 0x50, 0x00, 0x1e, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0x01, 0x00, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x9e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x1e, - 0x00, 0x09, 0x0c, 0xc0, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x00, - 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x23, 0x80, 0x01, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0xb6, 0x66, 0x10, 0x26, 0x58, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x90, 0xb2, 0x00, 0x0c, 0x1a, 0x0c, 0x0d, 0xc5, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x4d, 0x11, 0x20, 0x08, 0x0c, 0xd5, 0xdc, 0x08, 0x04, - 0xbd, 0x82, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x43, 0x11, 0x20, 0x08, 0x0c, - 0xd6, 0x25, 0x08, 0x04, 0xbd, 0x82, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x4b, - 0x11, 0x20, 0x08, 0x0c, 0xd6, 0x51, 0x08, 0x04, 0xbd, 0x82, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x33, 0x11, 0x20, 0x08, 0x0c, 0xd5, 0x6e, 0x08, 0x04, - 0xbd, 0x82, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x28, 0x11, 0x20, 0x08, 0x0c, - 0xd3, 0x1e, 0x08, 0x04, 0xbd, 0x82, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x29, - 0x11, 0x20, 0x08, 0x0c, 0xd3, 0x5f, 0x08, 0x04, 0xbd, 0x82, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x1f, 0x11, 0x20, 0x08, 0x0c, 0xb6, 0xad, 0x08, 0x04, - 0xbd, 0x82, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x00, 0x11, 0x18, 0x08, 0x0c, - 0xb9, 0xfb, 0x04, 0xe0, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x22, 0x11, 0x18, - 0x08, 0x0c, 0xb6, 0xe9, 0x04, 0xa8, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x35, - 0x11, 0x18, 0x08, 0x0c, 0xb8, 0x0f, 0x04, 0x70, 0x66, 0x04, 0x96, 0xb6, - 0x00, 0x39, 0x11, 0x18, 0x08, 0x0c, 0xb9, 0x90, 0x04, 0x38, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x3d, 0x11, 0x18, 0x08, 0x0c, 0xb7, 0x21, 0x04, 0x00, - 0x66, 0x04, 0x96, 0xb6, 0x00, 0x44, 0x11, 0x18, 0x08, 0x0c, 0xb7, 0x5d, - 0x00, 0xc8, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x49, 0x11, 0x18, 0x08, 0x0c, - 0xb7, 0x9e, 0x00, 0x90, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x41, 0x11, 0x18, - 0x08, 0x0c, 0xb7, 0x88, 0x00, 0x58, 0x91, 0xb6, 0x00, 0x15, 0x11, 0x10, - 0x00, 0x63, 0x00, 0x30, 0x91, 0xb6, 0x00, 0x16, 0x11, 0x28, 0x00, 0xbe, - 0x08, 0x04, 0xc0, 0x8e, 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0xb3, 0x6d, - 0x0c, 0xd8, 0xbd, 0x9f, 0xbd, 0xad, 0xbd, 0x9f, 0xbd, 0xf4, 0xbd, 0x9f, - 0xbf, 0xab, 0xc0, 0x9b, 0xbd, 0x9f, 0xbd, 0x9f, 0xc0, 0x64, 0xbd, 0x9f, - 0xc0, 0x7a, 0x00, 0x96, 0x60, 0x1f, 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0x00, 0x9e, 0x08, 0x04, - 0xb2, 0xd3, 0xa0, 0x01, 0xa0, 0x01, 0x00, 0x05, 0x66, 0x04, 0x96, 0xb6, - 0x00, 0x04, 0x11, 0x30, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x66, 0x56, - 0x08, 0x04, 0xb2, 0xd3, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, - 0x70, 0x90, 0x90, 0x86, 0x00, 0x74, 0x15, 0x40, 0x08, 0x0c, 0xe8, 0xed, - 0x11, 0xb0, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0x70, 0x30, 0xd0, 0x8c, - 0x01, 0x28, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x10, 0xc0, 0xc5, 0xb8, 0x02, - 0x00, 0xf9, 0x00, 0xbe, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x6a, - 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x98, 0x20, 0x01, - 0x00, 0x0a, 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x0c, 0x32, 0x79, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x20, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xbf, 0x7b, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0xb8, 0x00, 0xd0, 0x84, 0x01, 0x60, - 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x20, 0x69, 0x18, 0x47, 0x68, 0x04, - 0xd0, 0xa4, 0x01, 0x20, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x96, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, 0x00, 0xd6, 0x20, 0x11, - 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x74, 0x19, 0x04, 0xbf, 0x50, - 0x60, 0x10, 0x20, 0x58, 0xba, 0xa0, 0x92, 0x86, 0x00, 0x7e, 0x11, 0x20, - 0x08, 0x0c, 0xc1, 0xea, 0x08, 0x04, 0xbe, 0xbd, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x09, 0x04, 0xbe, 0x5f, 0x00, 0xd6, 0x08, 0x0c, - 0x76, 0x37, 0x01, 0xa0, 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, - 0x6a, 0xc7, 0x00, 0x2e, 0x09, 0x04, 0xbe, 0x5e, 0x08, 0x0c, 0x57, 0xe9, - 0x15, 0x98, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, 0x04, 0x50, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb9, 0x10, 0x00, 0xbe, 0x91, 0x86, 0x00, 0xff, 0x05, 0x80, - 0x00, 0x26, 0x20, 0x11, 0x80, 0x08, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, - 0x05, 0x48, 0x60, 0x14, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x48, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, - 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x09, 0x08, 0x0c, - 0xd6, 0xbd, 0x00, 0x40, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, 0x60, 0x10, 0x20, 0x58, - 0xb9, 0xa0, 0x00, 0x16, 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0x1e, 0x08, 0x0c, 0x33, 0x4c, 0x00, 0xde, 0x08, 0x04, 0xbf, 0x55, - 0x00, 0xde, 0x08, 0x0c, 0xc1, 0xdf, 0x60, 0x10, 0x20, 0x58, 0xba, 0xa0, - 0x92, 0x86, 0x00, 0x80, 0x15, 0x10, 0x60, 0x14, 0x90, 0x05, 0x01, 0xa8, - 0x20, 0x48, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, - 0x11, 0x40, 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, - 0x08, 0x0c, 0xd6, 0xbd, 0x00, 0x30, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x33, 0x02, 0x00, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x66, 0x6a, 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x04, - 0xbf, 0x55, 0x08, 0x0c, 0xbf, 0x63, 0x60, 0x14, 0x90, 0x05, 0x01, 0x90, - 0x20, 0x48, 0xa8, 0x68, 0xd0, 0xf4, 0x01, 0xe8, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x1d, 0x08, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, 0xd6, 0xbd, 0x08, 0xf8, - 0x08, 0x0c, 0xbf, 0x59, 0x01, 0x60, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, - 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0x96, 0x20, 0x01, 0x00, 0x07, - 0x08, 0x0c, 0x66, 0x6a, 0x08, 0xa0, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, - 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x03, 0x08, 0x0c, - 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0xbf, 0x55, 0xb8, 0x5c, - 0xd0, 0xe4, 0x01, 0x78, 0x08, 0x0c, 0xd4, 0xee, 0x08, 0x0c, 0x76, 0x37, - 0x01, 0x18, 0xd0, 0xdc, 0x19, 0x04, 0xbe, 0x7f, 0x20, 0x11, 0x18, 0x37, - 0x22, 0x04, 0xc0, 0xad, 0x20, 0x12, 0x08, 0x04, 0xbe, 0x7f, 0x08, 0x0c, - 0xd5, 0x2b, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xc0, 0xa5, 0x20, 0x12, - 0x00, 0x06, 0x08, 0x0c, 0xea, 0xb9, 0x00, 0x0e, 0x19, 0x04, 0xbe, 0x7f, - 0xc0, 0xb5, 0x20, 0x12, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x6a, - 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x00, 0xc6, 0x20, 0x01, 0x18, 0x0f, - 0x20, 0x04, 0xd0, 0x9c, 0x05, 0x20, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x0c, 0x90, 0x84, 0x00, 0xff, - 0x78, 0xe6, 0x70, 0x7e, 0x70, 0x10, 0x78, 0xea, 0x70, 0x82, 0x90, 0x8c, - 0x00, 0xff, 0x00, 0xee, 0x78, 0x0c, 0xc0, 0xb5, 0x78, 0x0e, 0x00, 0xfe, - 0x08, 0x0c, 0x28, 0xbc, 0x00, 0xf6, 0x21, 0x00, 0x90, 0x0e, 0x08, 0x0c, - 0x28, 0x73, 0x79, 0x5e, 0x00, 0xfe, 0x91, 0x86, 0x00, 0x81, 0x01, 0xf0, - 0x20, 0x09, 0x00, 0x81, 0x00, 0xe0, 0x20, 0x09, 0x00, 0xef, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x79, 0xea, 0x78, 0xe7, 0x00, 0x00, 0x79, 0x32, - 0x79, 0x36, 0x78, 0x0c, 0xc0, 0xb5, 0x78, 0x0e, 0x00, 0xfe, 0x08, 0x0c, - 0x28, 0xbc, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x79, 0x82, 0x21, 0x00, - 0x90, 0x0e, 0x79, 0x7e, 0x08, 0x0c, 0x28, 0x73, 0x79, 0x5e, 0x00, 0xfe, - 0x81, 0x08, 0x08, 0x0c, 0x66, 0xb9, 0x2b, 0x00, 0x00, 0xce, 0x19, 0x04, - 0xbe, 0x7f, 0x60, 0x12, 0x20, 0x09, 0x18, 0x0f, 0x21, 0x0c, 0xd1, 0x9c, - 0x01, 0x50, 0x20, 0x09, 0x02, 0x7c, 0x21, 0x0c, 0x91, 0x8c, 0x00, 0xff, - 0xb9, 0x12, 0x20, 0x09, 0x02, 0x7d, 0x21, 0x0c, 0xb9, 0x16, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x28, 0x08, 0x0c, 0xbc, 0xb6, 0x20, 0x01, 0x00, 0x01, - 0x04, 0x31, 0x00, 0xde, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x20, 0x20, 0x01, 0x18, 0x48, - 0x20, 0x04, 0xd0, 0xac, 0x00, 0x05, 0x00, 0xe6, 0x08, 0x0c, 0xef, 0xed, - 0x01, 0x90, 0x20, 0x71, 0x02, 0x60, 0x71, 0x08, 0x72, 0x0c, 0x91, 0x8c, - 0x00, 0xff, 0x11, 0x18, 0x92, 0x84, 0xff, 0x00, 0x01, 0x40, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x11, 0x10, 0xb9, 0x12, - 0xba, 0x16, 0x00, 0xee, 0x00, 0x05, 0x20, 0x30, 0x90, 0x05, 0x01, 0x58, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x0c, 0x57, 0xe9, - 0x11, 0x20, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x96, 0x26, 0x00, - 0x90, 0x05, 0x11, 0xb0, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x68, - 0x00, 0x9e, 0xd0, 0xfc, 0x11, 0x78, 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, 0x00, 0xbe, 0x20, 0x21, 0x00, 0x04, - 0x20, 0x11, 0x80, 0x14, 0x08, 0x0c, 0x4c, 0x44, 0x00, 0x4e, 0x00, 0x3e, - 0x08, 0x0c, 0x32, 0x79, 0x60, 0x20, 0x90, 0x86, 0x00, 0x0a, 0x11, 0x08, - 0x00, 0x05, 0x08, 0x04, 0xb2, 0xd3, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0x26, - 0x00, 0x16, 0x20, 0x71, 0x18, 0x00, 0x70, 0x90, 0x90, 0x86, 0x00, 0x14, - 0x19, 0x04, 0xc0, 0x5a, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x09, 0x04, 0xc0, 0x0d, 0x00, 0xd6, 0x08, 0x0c, 0x76, 0x37, 0x01, 0xa0, - 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, - 0x09, 0x04, 0xc0, 0x0c, 0x08, 0x0c, 0x57, 0xe9, 0x15, 0x98, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, - 0xde, 0xad, 0x04, 0x50, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0x10, - 0x00, 0xbe, 0x91, 0x86, 0x00, 0xff, 0x05, 0x80, 0x00, 0x26, 0x20, 0x11, - 0x80, 0x08, 0x08, 0x0c, 0x6a, 0xc7, 0x00, 0x2e, 0x05, 0x48, 0x60, 0x14, - 0x90, 0x05, 0x09, 0x0c, 0x0d, 0xc5, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, 0x20, 0x01, 0x00, 0x30, - 0x90, 0x0e, 0x20, 0x11, 0x40, 0x09, 0x08, 0x0c, 0xd6, 0xbd, 0x00, 0x40, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x33, 0xde, 0xad, 0x60, 0x10, 0x20, 0x58, 0xb9, 0xa0, 0x00, 0x16, - 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, 0x08, 0x0c, - 0x33, 0x4c, 0x00, 0xde, 0x08, 0x04, 0xc0, 0x5f, 0x00, 0xde, 0x08, 0x0c, - 0x57, 0xe9, 0x11, 0x70, 0x60, 0x14, 0x90, 0x05, 0x11, 0x58, 0x00, 0x36, - 0x00, 0x46, 0x60, 0x10, 0x20, 0x58, 0xbb, 0xa0, 0x20, 0x21, 0x00, 0x06, - 0x08, 0x0c, 0x4d, 0xfb, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xd6, 0x60, 0x10, - 0x20, 0x58, 0x08, 0x0c, 0x67, 0xbf, 0x08, 0x0c, 0xbd, 0xe2, 0x00, 0xde, - 0x08, 0x0c, 0xc2, 0xb5, 0x15, 0x88, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x90, - 0x90, 0x05, 0x05, 0x60, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x6a, - 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x01, 0xd0, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, 0xd6, 0xbd, 0x00, 0x60, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x29, 0x01, 0x30, - 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0x02, 0x00, - 0x00, 0x9e, 0x08, 0x0c, 0x32, 0x79, 0x60, 0x20, 0x90, 0x86, 0x00, 0x0a, - 0x01, 0x40, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x28, 0x08, 0x0c, 0xbc, 0xb6, - 0x90, 0x06, 0x08, 0x0c, 0xbf, 0x7b, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xee, - 0x00, 0xbe, 0x00, 0x05, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, - 0x00, 0x14, 0x11, 0x60, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, - 0x08, 0x04, 0x9a, 0xb1, 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbf, 0x7b, - 0x20, 0x30, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x04, - 0x11, 0x48, 0x96, 0xb6, 0x00, 0x0b, 0x11, 0x20, 0x20, 0x01, 0x00, 0x07, - 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x04, 0xb2, 0xd3, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x04, 0xbf, 0x7b, 0x00, 0x02, 0xbd, 0x9f, 0xc0, 0xa6, 0xbd, 0x9f, - 0xc0, 0xe9, 0xbd, 0x9f, 0xc1, 0x96, 0xc0, 0x9b, 0xbd, 0xa2, 0xbd, 0x9f, - 0xc1, 0xaa, 0xbd, 0x9f, 0xc1, 0xbc, 0x66, 0x04, 0x96, 0x86, 0x00, 0x03, - 0x09, 0x04, 0xbf, 0xab, 0x96, 0xb6, 0x00, 0x1e, 0x11, 0x10, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, - 0xc1, 0xce, 0x11, 0xa0, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x08, 0x0c, - 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, - 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x04, 0x28, 0x20, 0x09, 0x02, 0x6e, - 0x21, 0x04, 0x90, 0x86, 0x00, 0x09, 0x11, 0x60, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, 0x01, 0x80, 0x80, 0x01, - 0xb8, 0x42, 0x60, 0x1b, 0x00, 0x0a, 0x00, 0x98, 0x20, 0x09, 0x02, 0x6f, - 0x21, 0x04, 0x90, 0x84, 0xff, 0x00, 0x90, 0x8e, 0x19, 0x00, 0x01, 0x58, - 0x90, 0x8e, 0x1e, 0x00, 0x09, 0x90, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd7, 0xf8, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xbf, 0x7b, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x96, 0x00, 0xb6, 0x00, 0x26, - 0x90, 0x16, 0x08, 0x0c, 0xc1, 0xdc, 0x00, 0xd6, 0x20, 0x69, 0x19, 0x7c, - 0x2d, 0x04, 0x90, 0x05, 0x01, 0x68, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x11, 0x38, 0x20, 0x69, 0x18, 0x20, 0x2d, 0x04, - 0x80, 0x00, 0x20, 0x6a, 0x00, 0xde, 0x00, 0x10, 0x00, 0xde, 0x00, 0x88, - 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, - 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0xc1, 0x66, 0x08, 0x0c, - 0xd0, 0xd8, 0x01, 0xb0, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x64, 0x20, 0x10, - 0x90, 0x86, 0x01, 0x39, 0x11, 0x38, 0x60, 0x07, 0x00, 0x16, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0xd7, 0x1a, 0x00, 0xb0, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x64, 0xd0, 0xfc, 0x01, 0x18, 0x20, 0x01, 0x00, 0x01, 0x0c, 0xa8, - 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xdc, 0x01, 0x48, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, 0x11, 0x10, - 0x90, 0x06, 0x0c, 0x38, 0x08, 0x0c, 0xbc, 0xb6, 0x20, 0x09, 0x02, 0x6e, - 0x21, 0x34, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, 0x00, 0x05, 0x05, 0x20, - 0x96, 0x86, 0x00, 0x0b, 0x01, 0xc8, 0x20, 0x09, 0x02, 0x6f, 0x21, 0x04, - 0x90, 0x84, 0xff, 0x00, 0x11, 0x18, 0x96, 0x86, 0x00, 0x09, 0x01, 0xc0, - 0x90, 0x86, 0x19, 0x00, 0x11, 0x68, 0x96, 0x86, 0x00, 0x09, 0x01, 0x90, - 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0x6a, 0x20, 0x01, 0x00, 0x28, - 0x60, 0x1a, 0x60, 0x07, 0x00, 0x52, 0x00, 0x20, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0xbf, 0x7b, 0x00, 0x2e, 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x05, - 0x92, 0x86, 0x01, 0x39, 0x01, 0x60, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xd0, 0xd8, 0x01, 0x40, 0xa8, 0x64, 0x90, 0x86, 0x01, 0x39, 0x01, 0x18, - 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x08, 0x0c, 0x40, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, 0x01, 0x38, 0x80, 0x01, - 0xb8, 0x42, 0x60, 0x1b, 0x00, 0x0a, 0x60, 0x07, 0x00, 0x16, 0x08, 0xf0, - 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, 0x11, 0x38, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x08, 0x0c, 0x60, 0xc1, 0x00, 0xee, 0x00, 0x10, 0x08, 0x0c, - 0x32, 0x50, 0x08, 0x60, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0x6a, - 0x08, 0x0c, 0xc1, 0xdc, 0x11, 0x40, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x03, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x04, 0x9a, 0xb1, 0x08, 0x0c, - 0xbc, 0xb6, 0x90, 0x06, 0x08, 0x04, 0xbf, 0x7b, 0x04, 0x89, 0x11, 0x60, - 0x20, 0x01, 0x00, 0x08, 0x08, 0x0c, 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x05, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x04, 0x9a, 0xb1, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbf, 0x7b, 0x00, 0xf9, 0x11, 0x60, - 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x04, 0x9a, 0xb1, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbf, 0x7b, 0x20, 0x09, 0x02, 0x6e, - 0x21, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x38, 0x20, 0x09, 0x02, 0x6f, - 0x21, 0x04, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x2a, 0x00, 0x00, 0x05, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x16, - 0x61, 0x10, 0x21, 0x58, 0x08, 0x0c, 0x67, 0x33, 0x00, 0x1e, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0x36, 0x00, 0x16, 0x60, 0x10, 0x20, 0x58, 0x20, 0x09, 0x18, 0x37, - 0x21, 0x04, 0x90, 0x85, 0x00, 0x03, 0x20, 0x0a, 0x08, 0x0c, 0xc2, 0x87, - 0x05, 0x60, 0x20, 0x09, 0x18, 0x37, 0x21, 0x04, 0xc0, 0xcd, 0x20, 0x0a, - 0x08, 0x0c, 0x6a, 0x9f, 0x01, 0x58, 0x90, 0x06, 0x20, 0x20, 0x20, 0x09, - 0x00, 0x2a, 0x08, 0x0c, 0xec, 0x31, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0xc1, 0x95, 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0x32, 0x1b, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, - 0x30, 0x00, 0x00, 0xee, 0x00, 0xc6, 0x01, 0x56, 0x20, 0xa9, 0x07, 0x81, - 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, 0x33, 0x4c, 0x81, 0x08, 0x1f, 0x04, - 0xc2, 0x20, 0x01, 0x5e, 0x00, 0xce, 0x08, 0x0c, 0xc1, 0xdf, 0x20, 0x71, - 0x02, 0x60, 0x20, 0x79, 0x02, 0x00, 0x78, 0x17, 0x00, 0x01, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x0c, 0xc1, 0xc5, 0x70, 0x18, 0xd0, 0xfc, 0x01, 0x10, - 0xd0, 0xdc, 0x01, 0x18, 0x70, 0x38, 0xd0, 0xdc, 0x11, 0x08, 0xc1, 0xc4, - 0x78, 0x17, 0x00, 0x00, 0x20, 0x01, 0x18, 0x37, 0x21, 0x02, 0x91, 0x84, - 0x00, 0x50, 0x90, 0x86, 0x00, 0x50, 0x05, 0xd0, 0x20, 0x79, 0x01, 0x00, - 0x2e, 0x04, 0x90, 0x84, 0x00, 0xff, 0x20, 0x69, 0x18, 0x1f, 0x20, 0x6a, - 0x78, 0xe6, 0x00, 0x06, 0x8e, 0x70, 0x2e, 0x04, 0x20, 0x69, 0x18, 0x20, - 0x20, 0x6a, 0x78, 0xea, 0x78, 0x32, 0x78, 0x36, 0x20, 0x10, 0x90, 0x84, - 0xff, 0x00, 0x00, 0x1e, 0x91, 0x05, 0x20, 0x09, 0x18, 0x2c, 0x20, 0x0a, - 0x22, 0x00, 0x90, 0x84, 0x00, 0xff, 0x20, 0x08, 0x08, 0x0c, 0x28, 0xbc, - 0x08, 0x0c, 0x76, 0x37, 0x01, 0x70, 0x20, 0x71, 0x02, 0x60, 0x20, 0x69, - 0x19, 0x82, 0x70, 0x48, 0x20, 0x6a, 0x70, 0x4c, 0x68, 0x06, 0x70, 0x50, - 0x68, 0x0a, 0x70, 0x54, 0x68, 0x0e, 0x08, 0x0c, 0xd4, 0xee, 0x00, 0x40, - 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x6a, 0x08, 0x0c, 0x32, 0x79, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x96, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xe6, 0x01, 0x56, 0x20, 0x19, 0x18, 0x2c, 0x23, 0x1c, 0x83, 0xff, - 0x01, 0xf0, 0x20, 0x71, 0x02, 0x60, 0x72, 0x00, 0x92, 0x94, 0x00, 0xff, - 0x70, 0x04, 0x90, 0x84, 0xff, 0x00, 0x92, 0x05, 0x93, 0x06, 0x11, 0x98, - 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x2b, 0x48, 0x20, 0x19, - 0x00, 0x0a, 0x08, 0x0c, 0xc3, 0x79, 0x11, 0x48, 0x20, 0x11, 0x02, 0x7a, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc3, 0x79, - 0x11, 0x00, 0x01, 0x5e, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, 0x70, 0x34, 0x90, 0x86, - 0x00, 0x14, 0x11, 0xa8, 0x70, 0x38, 0x90, 0x86, 0x08, 0x00, 0x11, 0x88, - 0x70, 0x3c, 0xd0, 0xec, 0x01, 0x60, 0x90, 0x84, 0x0f, 0x00, 0x90, 0x86, - 0x01, 0x00, 0x11, 0x38, 0x70, 0x54, 0xd0, 0xa4, 0x11, 0x10, 0xd0, 0xac, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x96, 0x00, 0xc6, 0x00, 0x76, 0x00, 0x56, - 0x00, 0x46, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x29, 0x19, 0xf1, 0x25, 0x2c, 0x20, 0x21, 0x19, 0xf7, 0x24, 0x24, - 0x20, 0x61, 0x1c, 0xd0, 0x20, 0x71, 0x18, 0x00, 0x72, 0x54, 0x70, 0x74, - 0x92, 0x02, 0x1a, 0x04, 0xc3, 0x45, 0x08, 0x0c, 0x8c, 0xf7, 0x09, 0x04, - 0xc3, 0x3e, 0x08, 0x0c, 0xec, 0x62, 0x09, 0x04, 0xc3, 0x3e, 0x67, 0x20, - 0x97, 0x86, 0x00, 0x07, 0x09, 0x04, 0xc3, 0x3e, 0x25, 0x00, 0x9c, 0x06, - 0x09, 0x04, 0xc3, 0x3e, 0x24, 0x00, 0x9c, 0x06, 0x05, 0xe8, 0x3e, 0x08, - 0x91, 0x86, 0x00, 0x02, 0x11, 0x48, 0x60, 0x10, 0x90, 0x05, 0x01, 0x30, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x15, 0x80, - 0x00, 0xc6, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x10, 0x08, 0x0c, - 0x1a, 0x8e, 0x97, 0x86, 0x00, 0x0a, 0x01, 0x48, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x30, 0x00, 0xce, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x0c, 0xb3, 0x06, - 0x00, 0xe8, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xa8, - 0x97, 0x86, 0x00, 0x03, 0x15, 0x30, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7c, - 0xd0, 0xcc, 0x01, 0x30, 0x00, 0x96, 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, - 0x0f, 0xc0, 0x00, 0x9e, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x92, 0x08, 0x0c, 0xd2, 0xc3, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xce, - 0x9c, 0xe0, 0x00, 0x18, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x10, 0x08, 0x04, - 0xc2, 0xe8, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, - 0x00, 0x7e, 0x00, 0xce, 0x00, 0x9e, 0x00, 0xee, 0x00, 0x05, 0x97, 0x86, - 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, 0xeb, 0xd4, 0x0c, 0x30, 0x97, 0x86, - 0x00, 0x09, 0x11, 0x48, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x0d, 0x08, - 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, 0xb3, 0x52, 0x08, 0xe0, 0x97, 0x86, - 0x00, 0x0a, 0x09, 0x80, 0x08, 0x20, 0x22, 0x0c, 0x23, 0x04, 0x91, 0x06, - 0x11, 0x30, 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, 0xc3, 0x65, 0x90, 0x06, - 0x00, 0x05, 0x23, 0x04, 0x91, 0x02, 0x02, 0x18, 0x20, 0x01, 0x00, 0x01, - 0x00, 0x08, 0x90, 0x06, 0x91, 0x8d, 0x00, 0x01, 0x00, 0x05, 0x01, 0x36, - 0x01, 0xc6, 0x00, 0x16, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0x8c, - 0x00, 0x3f, 0x21, 0xe0, 0x90, 0x84, 0xff, 0xc0, 0x93, 0x00, 0x20, 0x98, - 0x35, 0x18, 0x20, 0xa9, 0x00, 0x01, 0x22, 0x0c, 0x40, 0x02, 0x91, 0x0e, - 0x11, 0x40, 0x82, 0x10, 0x83, 0x19, 0x1d, 0xc8, 0x90, 0x06, 0x00, 0x1e, - 0x01, 0xce, 0x01, 0x3e, 0x00, 0x05, 0x22, 0x0c, 0x91, 0x02, 0x02, 0x18, - 0x20, 0x01, 0x00, 0x01, 0x00, 0x10, 0x20, 0x01, 0x00, 0x00, 0x91, 0x8d, - 0x00, 0x01, 0x00, 0x1e, 0x01, 0xce, 0x01, 0x3e, 0x00, 0x05, 0x22, 0x0c, - 0x81, 0x0f, 0x23, 0x04, 0x91, 0x06, 0x11, 0x30, 0x82, 0x10, 0x83, 0x18, - 0x1f, 0x04, 0xc3, 0xa3, 0x90, 0x06, 0x00, 0x05, 0x91, 0x8d, 0x00, 0x01, - 0x00, 0x05, 0x60, 0x04, 0x90, 0x8a, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, - 0x08, 0x0c, 0xd2, 0xcf, 0x01, 0x20, 0x08, 0x0c, 0xd2, 0xe0, 0x01, 0x68, - 0x00, 0x28, 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xd2, 0xe0, 0x01, 0x38, - 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x08, 0x0c, 0xbc, 0xb6, 0x0c, 0xb0, 0x91, 0x82, 0x00, 0x54, - 0x12, 0x20, 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, - 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, - 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xea, - 0xc3, 0xea, 0xc3, 0xea, 0xc3, 0xea, 0xc3, 0xe8, 0xc3, 0xe8, 0xc3, 0xe8, - 0xc3, 0xea, 0xc3, 0xe8, 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x0b, 0xff, 0xff, - 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, - 0x91, 0x86, 0x00, 0x13, 0x11, 0x28, 0x60, 0x04, 0x90, 0x82, 0x00, 0x40, - 0x08, 0x04, 0xc4, 0x82, 0x91, 0x86, 0x00, 0x27, 0x15, 0x20, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0x96, - 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x98, 0x08, 0x0c, - 0xd2, 0xe0, 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x68, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x29, 0xa8, 0x77, 0x00, 0x00, 0xa9, 0x7c, - 0xc1, 0xc5, 0xa9, 0x7e, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xd2, 0xc3, - 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x04, 0x9a, 0xb1, 0x91, 0x86, - 0x00, 0x14, 0x11, 0x20, 0x60, 0x04, 0x90, 0x82, 0x00, 0x40, 0x00, 0xb8, - 0x91, 0x86, 0x00, 0x46, 0x01, 0x50, 0x91, 0x86, 0x00, 0x45, 0x01, 0x38, - 0x91, 0x86, 0x00, 0x53, 0x01, 0x20, 0x91, 0x86, 0x00, 0x48, 0x19, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0xd8, 0x09, 0x01, 0x30, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x10, 0x08, 0x04, 0xc4, 0xc0, 0x00, 0x05, 0x00, 0x02, - 0xc4, 0x5c, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, - 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x5a, 0xc4, 0x77, - 0xc4, 0x77, 0xc4, 0x77, 0xc4, 0x77, 0xc4, 0x5a, 0xc4, 0x77, 0xc4, 0x5a, - 0xc4, 0x77, 0xc4, 0x5a, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x68, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x06, 0xa8, 0x77, 0x00, 0x00, - 0xa8, 0x80, 0xc0, 0xec, 0xa8, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, - 0xd2, 0xc3, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xd2, 0xe0, 0x09, 0x0c, - 0xbc, 0xb6, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x00, 0x02, 0xc4, 0x99, 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, - 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, 0xc4, 0x97, - 0xc4, 0xb0, 0xc4, 0xb0, 0xc4, 0xb0, 0xc4, 0xb0, 0xc4, 0x97, 0xc4, 0xba, - 0xc4, 0x97, 0xc4, 0xb0, 0xc4, 0x97, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x96, - 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x14, 0x20, 0x48, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x42, 0xa9, 0x7c, 0xd1, 0xac, 0x01, 0x40, 0x60, 0x03, - 0x00, 0x04, 0xa8, 0x7c, 0x90, 0x85, 0x04, 0x00, 0xa8, 0x7e, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x03, 0x00, 0x02, 0x0c, 0xb8, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0xd7, 0xfb, 0x08, 0x0c, 0xd8, 0x00, 0x60, 0x03, 0x00, 0x0f, - 0x08, 0x04, 0x9a, 0xb1, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xb2, 0xd3, - 0x08, 0x04, 0x9a, 0xb1, 0x91, 0x82, 0x00, 0x54, 0x12, 0x20, 0x91, 0x82, - 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc4, 0xdc, 0xc4, 0xdc, - 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xde, 0xc5, 0xbe, 0xc4, 0xdc, - 0xc5, 0xf2, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, - 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc4, 0xdc, 0xc5, 0xf2, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0xb6, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, - 0x76, 0x44, 0x96, 0xb4, 0x0f, 0xff, 0x86, 0xff, 0x15, 0x28, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x00, 0xd0, 0xbc, 0x19, 0x04, 0xc5, 0xad, 0xa8, 0x7b, - 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xae, 0x76, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc7, 0x8b, - 0x08, 0x0c, 0x6c, 0xb9, 0x62, 0x10, 0x22, 0x58, 0xba, 0x3c, 0x82, 0xff, - 0x01, 0x10, 0x82, 0x11, 0xba, 0x3e, 0x70, 0x44, 0xd0, 0xe4, 0x19, 0x04, - 0xc5, 0x8e, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x05, - 0x96, 0x8c, 0x0c, 0x00, 0x01, 0x50, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, - 0xd0, 0xbc, 0x19, 0x04, 0xc5, 0x92, 0x73, 0x48, 0xab, 0x92, 0x73, 0x4c, - 0xab, 0x8e, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, 0x00, 0x02, 0x05, 0x08, - 0x91, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, 0x00, 0x1c, 0x00, 0xe8, - 0xd6, 0xdc, 0x01, 0xa0, 0xa8, 0x7b, 0x00, 0x15, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x70, 0xa9, 0x38, 0xaa, 0x34, 0x21, 0x00, 0x92, 0x05, 0x01, 0x48, - 0x70, 0x48, 0x91, 0x06, 0x11, 0x18, 0x70, 0x4c, 0x92, 0x06, 0x01, 0x18, - 0xa9, 0x92, 0xaa, 0x8e, 0xc6, 0xdc, 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, - 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x67, - 0x01, 0x03, 0xae, 0x76, 0x90, 0x1e, 0xd6, 0xc4, 0x01, 0xd8, 0x96, 0x86, - 0x01, 0x00, 0x11, 0x30, 0x70, 0x64, 0x90, 0x05, 0x11, 0x18, 0xc6, 0xc4, - 0x08, 0x04, 0xc4, 0xe5, 0x73, 0x5c, 0xab, 0x86, 0x83, 0xff, 0x01, 0x70, - 0x93, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, 0x00, 0x08, 0x00, 0x36, - 0x23, 0x08, 0x20, 0x19, 0x00, 0x18, 0x20, 0x11, 0x00, 0x25, 0x08, 0x0c, - 0xcc, 0x85, 0x00, 0x3e, 0xd6, 0xcc, 0x09, 0x04, 0xc4, 0xfa, 0x71, 0x54, - 0xa9, 0x8a, 0x81, 0xff, 0x09, 0x04, 0xc4, 0xfa, 0x91, 0x92, 0x00, 0x21, - 0x12, 0x78, 0x83, 0x04, 0x90, 0x98, 0x00, 0x18, 0x20, 0x11, 0x00, 0x29, - 0x08, 0x0c, 0xcc, 0x85, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x00, - 0x08, 0x0c, 0xd7, 0x86, 0x08, 0x04, 0xc4, 0xfa, 0xa8, 0x68, 0xd0, 0xfc, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, 0xa9, 0x8a, 0x0c, 0x50, 0x00, 0xa6, - 0x29, 0x50, 0x08, 0x0c, 0xcc, 0x24, 0x00, 0xae, 0x08, 0x0c, 0xd7, 0x86, - 0x08, 0x0c, 0xcc, 0x75, 0x08, 0x04, 0xc4, 0xfc, 0x08, 0x0c, 0xd3, 0xd8, - 0x08, 0x04, 0xc5, 0x09, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, 0xc5, 0x15, - 0xa8, 0x80, 0xd0, 0xbc, 0x19, 0x04, 0xc5, 0x15, 0x96, 0x84, 0x04, 0x00, - 0x01, 0x30, 0xa8, 0x38, 0xab, 0x34, 0x93, 0x05, 0x09, 0x04, 0xc5, 0x15, - 0x00, 0xb8, 0x73, 0x48, 0xa8, 0x38, 0x93, 0x06, 0x11, 0x98, 0x73, 0x4c, - 0xa8, 0x34, 0x93, 0x1e, 0x09, 0x04, 0xc5, 0x15, 0x00, 0x68, 0xa8, 0x7c, - 0xd0, 0xac, 0x09, 0x04, 0xc4, 0xed, 0xa8, 0x38, 0xa9, 0x34, 0x91, 0x05, - 0x09, 0x04, 0xc4, 0xed, 0xa8, 0x80, 0xd0, 0xbc, 0x19, 0x04, 0xc4, 0xed, - 0x08, 0x0c, 0xd4, 0x12, 0x08, 0x04, 0xc5, 0x09, 0x00, 0x96, 0x00, 0xf6, - 0x60, 0x03, 0x00, 0x03, 0x60, 0x07, 0x00, 0x43, 0x20, 0x79, 0x02, 0x6c, - 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, 0x7d, 0x08, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x40, 0x60, 0x03, 0x00, 0x02, 0x00, 0xfe, - 0x00, 0x9e, 0x00, 0x05, 0x21, 0x30, 0x22, 0x28, 0x00, 0x58, 0x24, 0x00, - 0xa9, 0xac, 0x91, 0x0a, 0x23, 0x00, 0xaa, 0xb0, 0x92, 0x13, 0x26, 0x00, - 0x91, 0x02, 0x25, 0x00, 0x92, 0x03, 0x0e, 0x90, 0xac, 0x36, 0xab, 0x3a, - 0xae, 0x46, 0xad, 0x4a, 0x00, 0xfe, 0x60, 0x43, 0x00, 0x00, 0x2c, 0x10, - 0x08, 0x0c, 0x1b, 0xe0, 0x08, 0x0c, 0x95, 0x64, 0x08, 0x0c, 0x9b, 0xd3, - 0x00, 0x9e, 0x00, 0x05, 0x00, 0x05, 0x91, 0x82, 0x00, 0x54, 0x12, 0x20, - 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc6, 0x0f, - 0xc6, 0x0f, 0xc6, 0x0f, 0xc6, 0x0f, 0xc6, 0x0f, 0xc6, 0x11, 0xc6, 0xa7, - 0xc6, 0x0f, 0xc6, 0x0f, 0xc6, 0xbe, 0xc7, 0x4e, 0xc6, 0x0f, 0xc6, 0x0f, - 0xc6, 0x0f, 0xc6, 0x0f, 0xc7, 0x63, 0xc6, 0x0f, 0xc6, 0x0f, 0xc6, 0x0f, - 0xc6, 0x0f, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x76, 0x00, 0xa6, 0x00, 0xe6, - 0x00, 0x96, 0x20, 0x71, 0x02, 0x60, 0x61, 0x14, 0x21, 0x50, 0x76, 0x44, - 0xb6, 0x76, 0x96, 0xb4, 0x0f, 0xff, 0xb7, 0x7c, 0xc7, 0xe5, 0xb7, 0x7e, - 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0x3c, 0x82, 0xff, 0x01, 0x10, - 0x82, 0x11, 0xba, 0x3e, 0x00, 0xbe, 0x86, 0xff, 0x09, 0x04, 0xc6, 0xa2, - 0x96, 0x94, 0xff, 0x00, 0x92, 0x84, 0x0c, 0x00, 0x01, 0x20, 0x70, 0x48, - 0xb0, 0x92, 0x70, 0x4c, 0xb0, 0x8e, 0x92, 0x84, 0x03, 0x00, 0x09, 0x04, - 0xc6, 0xa2, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, 0x29, 0x00, - 0xb0, 0x7a, 0xb7, 0x7c, 0xc7, 0xcd, 0xb7, 0x7e, 0xa8, 0x67, 0x01, 0x03, - 0xb0, 0x68, 0xa8, 0x6a, 0xb0, 0x6c, 0xa8, 0x6e, 0xb0, 0x70, 0xa8, 0x72, - 0xae, 0x76, 0x96, 0x8c, 0x0c, 0x00, 0x01, 0x20, 0x73, 0x48, 0xab, 0x92, - 0x73, 0x4c, 0xab, 0x8e, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, 0x00, 0x02, - 0x01, 0x80, 0x91, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, 0x00, 0x1c, - 0x00, 0x60, 0xd6, 0xdc, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x15, 0x00, 0x38, - 0xd6, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, 0xa8, 0x7b, - 0x00, 0x00, 0xaf, 0x7e, 0xb0, 0x80, 0xa8, 0x82, 0xb0, 0x84, 0xa8, 0x86, - 0x90, 0x1e, 0xd6, 0xc4, 0x01, 0x90, 0x73, 0x5c, 0xab, 0x86, 0x83, 0xff, - 0x01, 0x70, 0x93, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, 0x00, 0x08, - 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, 0x00, 0x18, 0x20, 0x11, 0x00, 0x25, - 0x08, 0x0c, 0xcc, 0x85, 0x00, 0x3e, 0xd6, 0xcc, 0x01, 0xe8, 0x71, 0x54, - 0xa9, 0x8a, 0x81, 0xff, 0x01, 0xc8, 0x91, 0x92, 0x00, 0x21, 0x12, 0x60, - 0x83, 0x04, 0x90, 0x98, 0x00, 0x18, 0x20, 0x11, 0x00, 0x29, 0x08, 0x0c, - 0xcc, 0x85, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x00, 0x00, 0x50, - 0xb0, 0x68, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, 0xa9, 0x8a, - 0x0c, 0x68, 0x29, 0x50, 0x08, 0x0c, 0xcc, 0x24, 0x00, 0x9e, 0x00, 0xee, - 0x00, 0xae, 0x00, 0x7e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xa6, 0x60, 0x03, - 0x00, 0x03, 0x20, 0x79, 0x02, 0x6c, 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, - 0x7d, 0x08, 0x60, 0x14, 0x20, 0x50, 0xb4, 0x36, 0xb3, 0x3a, 0xb6, 0x46, - 0xb5, 0x4a, 0x00, 0xae, 0x00, 0xfe, 0x2c, 0x10, 0x08, 0x0c, 0x1b, 0xe0, - 0x08, 0x04, 0xa6, 0xb6, 0x60, 0x03, 0x00, 0x02, 0x60, 0x04, 0x90, 0x86, - 0x00, 0x40, 0x11, 0xc8, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, - 0xd0, 0xac, 0x01, 0x60, 0x60, 0x1c, 0xd0, 0x84, 0x11, 0x30, 0x00, 0xf6, - 0x2c, 0x00, 0x20, 0x78, 0x08, 0x0c, 0x17, 0x68, 0x00, 0xfe, 0x60, 0x03, - 0x00, 0x04, 0x00, 0x10, 0x60, 0x03, 0x00, 0x02, 0x00, 0x9e, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x96, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x42, 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, 0x9b, 0xd3, - 0x61, 0x14, 0x21, 0x48, 0xa9, 0x7c, 0xd1, 0xe4, 0x09, 0x04, 0xc7, 0x49, - 0xd1, 0xcc, 0x05, 0xc8, 0xa9, 0x78, 0xa8, 0x68, 0xd0, 0xfc, 0x05, 0x40, - 0x00, 0x16, 0xa8, 0x7c, 0x00, 0x06, 0xa8, 0x80, 0x00, 0x06, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0xa0, 0x81, 0x0e, - 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, 0x20, 0xe0, 0x91, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, 0x01, 0x56, 0x20, 0xa9, - 0x00, 0x20, 0x40, 0x03, 0x01, 0x5e, 0x00, 0x0e, 0xa8, 0x82, 0x00, 0x0e, - 0xc0, 0xcc, 0xa8, 0x7e, 0x00, 0x1e, 0xa8, 0x74, 0x00, 0x06, 0x21, 0x48, - 0x08, 0x0c, 0x0f, 0xc0, 0x00, 0x1e, 0x04, 0x58, 0x00, 0x16, 0x08, 0x0c, - 0x0f, 0xc0, 0x00, 0x9e, 0xa8, 0x7c, 0xc0, 0xcc, 0xa8, 0x7e, 0xa9, 0x74, - 0x00, 0x16, 0x08, 0x0c, 0xcc, 0x75, 0x00, 0x1e, 0x00, 0xf0, 0xa8, 0x67, - 0x01, 0x03, 0xa9, 0x74, 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, 0x00, 0x02, - 0x01, 0x80, 0x90, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, 0x00, 0x1c, - 0x00, 0x60, 0xd1, 0xdc, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x15, 0x00, 0x38, - 0xd1, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, 0xa8, 0x7b, - 0x00, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x6c, 0xb9, 0x00, 0x1e, 0xd1, 0xe4, - 0x11, 0x20, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, - 0xd3, 0xd8, 0x0c, 0xd8, 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, 0x11, 0x20, - 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0x9a, 0xb1, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0xaa, 0x49, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0xd8, 0x00, - 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x05, 0x60, 0x04, - 0x90, 0x86, 0x00, 0x40, 0x11, 0x20, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, - 0x9a, 0xb1, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xaa, 0x49, 0x08, 0x0c, - 0x9a, 0x61, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0x96, - 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x50, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x29, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x08, 0x0c, 0xd2, 0xc3, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, - 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x05, 0xa8, 0x7b, 0x00, 0x15, 0xd1, 0xfc, - 0x01, 0x80, 0xa8, 0x7b, 0x00, 0x07, 0x80, 0x02, 0x80, 0x00, 0x81, 0x0a, - 0x91, 0x89, 0x00, 0x00, 0x00, 0x06, 0x00, 0x16, 0x20, 0x09, 0x1a, 0x7d, - 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, 0x00, 0x1e, 0x00, 0x0e, 0xa9, 0x92, - 0xa8, 0x8e, 0x00, 0x05, 0x91, 0x82, 0x00, 0x54, 0x12, 0x20, 0x91, 0x82, - 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc7, 0xbe, 0xc7, 0xbe, - 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xc0, 0xc7, 0xbe, 0xc7, 0xbe, - 0xc8, 0x66, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, - 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc7, 0xbe, 0xc9, 0x98, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x76, 0x00, 0xa6, 0x00, 0xe6, 0x00, 0x96, - 0x20, 0x71, 0x02, 0x60, 0x61, 0x14, 0x21, 0x50, 0x76, 0x44, 0xb6, 0x76, - 0x96, 0xb4, 0x0f, 0xff, 0xb7, 0x7c, 0xc7, 0xe5, 0xb7, 0x7e, 0x62, 0x10, - 0x00, 0xb6, 0x22, 0x58, 0xba, 0x3c, 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, - 0xba, 0x3e, 0x00, 0xbe, 0x86, 0xff, 0x09, 0x04, 0xc8, 0x5f, 0x96, 0x94, - 0xff, 0x00, 0x92, 0x84, 0x0c, 0x00, 0x01, 0x20, 0x70, 0x48, 0xb0, 0x92, - 0x70, 0x4c, 0xb0, 0x8e, 0x92, 0x84, 0x03, 0x00, 0x09, 0x04, 0xc8, 0x5f, - 0x96, 0x86, 0x01, 0x00, 0x11, 0x30, 0x70, 0x64, 0x90, 0x05, 0x11, 0x18, - 0xc6, 0xc4, 0xb6, 0x76, 0x0c, 0x38, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, - 0x0d, 0xc5, 0x29, 0x00, 0xb0, 0x7a, 0xb7, 0x7c, 0x97, 0xbd, 0x02, 0x00, - 0xb7, 0x7e, 0xa8, 0x67, 0x01, 0x03, 0xb0, 0x68, 0xa8, 0x6a, 0xb0, 0x6c, - 0xa8, 0x6e, 0xb0, 0x70, 0xa8, 0x72, 0x70, 0x44, 0x90, 0x84, 0xf0, 0x00, - 0x96, 0x35, 0xae, 0x76, 0x96, 0x8c, 0x0c, 0x00, 0x01, 0x20, 0x73, 0x48, - 0xab, 0x92, 0x73, 0x4c, 0xab, 0x8e, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, - 0x00, 0x02, 0x01, 0x80, 0x91, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, - 0x00, 0x1c, 0x00, 0x60, 0xd6, 0xdc, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x15, - 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, - 0xa8, 0x7b, 0x00, 0x00, 0xaf, 0x7e, 0xb0, 0x80, 0xa8, 0x82, 0xb0, 0x84, - 0xa8, 0x86, 0x90, 0x1e, 0xd6, 0xc4, 0x01, 0x90, 0x73, 0x5c, 0xab, 0x86, - 0x83, 0xff, 0x01, 0x70, 0x93, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, - 0x00, 0x08, 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, 0x00, 0x18, 0x20, 0x11, - 0x00, 0x25, 0x08, 0x0c, 0xcc, 0x85, 0x00, 0x3e, 0xd6, 0xcc, 0x01, 0xe8, - 0x71, 0x54, 0xa9, 0x8a, 0x81, 0xff, 0x01, 0xc8, 0x91, 0x92, 0x00, 0x21, - 0x12, 0x60, 0x83, 0x04, 0x90, 0x98, 0x00, 0x18, 0x20, 0x11, 0x00, 0x29, - 0x08, 0x0c, 0xcc, 0x85, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x50, 0xb0, 0x68, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, - 0xa9, 0x8a, 0x0c, 0x68, 0x29, 0x50, 0x08, 0x0c, 0xcc, 0x24, 0x08, 0x0c, - 0x1a, 0x5a, 0x00, 0x9e, 0x00, 0xee, 0x00, 0xae, 0x00, 0x7e, 0x00, 0x05, - 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x60, 0x42, 0x00, 0x96, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x3c, 0xa9, 0x40, 0x91, 0x05, 0x11, 0x18, 0xa8, 0x7c, - 0xc0, 0xdc, 0xa8, 0x7e, 0x60, 0x03, 0x00, 0x02, 0xa9, 0x7c, 0xd1, 0xe4, - 0x09, 0x04, 0xc9, 0x93, 0x60, 0x43, 0x00, 0x00, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x15, 0x00, 0xd1, 0xcc, - 0x09, 0x04, 0xc9, 0x62, 0xa9, 0x78, 0xa8, 0x68, 0xd0, 0xfc, 0x09, 0x04, - 0xc9, 0x23, 0x00, 0x16, 0xa8, 0x7c, 0x00, 0x06, 0xa8, 0x80, 0x00, 0x06, - 0x00, 0xa6, 0x21, 0x50, 0xb1, 0x74, 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, - 0x00, 0x02, 0x09, 0x04, 0xc8, 0xf0, 0x90, 0x86, 0x00, 0x28, 0x19, 0x04, - 0xc8, 0xdc, 0xa8, 0x7b, 0x00, 0x1c, 0xb0, 0x7b, 0x00, 0x1c, 0x08, 0x04, - 0xc8, 0xf8, 0x60, 0x24, 0xd0, 0xf4, 0x11, 0xd0, 0xa8, 0x38, 0xaa, 0x34, - 0x92, 0x05, 0x09, 0xc8, 0xa8, 0x38, 0xaa, 0x90, 0x92, 0x06, 0x11, 0x20, - 0xa8, 0x8c, 0xaa, 0x34, 0x92, 0x06, 0x09, 0x88, 0x60, 0x24, 0xd0, 0xd4, - 0x11, 0x48, 0xa9, 0xac, 0xa8, 0x34, 0x91, 0x02, 0x60, 0x3a, 0xa9, 0xb0, - 0xa8, 0x38, 0x91, 0x03, 0x60, 0x3e, 0x60, 0x24, 0xc0, 0xf5, 0x60, 0x26, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x3c, 0x80, 0x00, 0xb8, 0x3e, - 0x00, 0xbe, 0x90, 0x06, 0xa8, 0x76, 0xa8, 0x92, 0xa8, 0x8e, 0xa8, 0x7c, - 0xc0, 0xe4, 0xa8, 0x7e, 0xd0, 0xcc, 0x01, 0x40, 0xc0, 0xcc, 0xa8, 0x7e, - 0x00, 0x96, 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, 0x0f, 0xc0, 0x00, 0x9e, - 0x08, 0x0c, 0xd4, 0x12, 0x08, 0x04, 0xc9, 0x93, 0xd1, 0xdc, 0x01, 0x58, - 0xa8, 0x7b, 0x00, 0x15, 0xb0, 0x7b, 0x00, 0x15, 0x08, 0x0c, 0xd6, 0xa6, - 0x01, 0x18, 0xb1, 0x74, 0xc1, 0xdc, 0xb1, 0x76, 0x00, 0x78, 0xd1, 0xd4, - 0x01, 0x28, 0xa8, 0x7b, 0x00, 0x07, 0xb0, 0x7b, 0x00, 0x07, 0x00, 0x40, - 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, - 0x19, 0x0c, 0xc7, 0x8b, 0xa8, 0x7c, 0xb0, 0x7e, 0xa8, 0x90, 0xb0, 0x92, - 0xa8, 0x8c, 0xb0, 0x8e, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x19, 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x20, 0x8a, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0x94, 0x00, 0x3f, 0x22, 0xe0, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, 0x40, 0x03, 0x00, 0xae, 0x00, 0x0e, - 0xa8, 0x82, 0x00, 0x0e, 0xc0, 0xcc, 0xa8, 0x7e, 0x08, 0x0c, 0xd7, 0x86, - 0x00, 0x1e, 0xa8, 0x74, 0x00, 0x06, 0x21, 0x48, 0x08, 0x0c, 0x0f, 0xc0, - 0x00, 0x1e, 0x08, 0x04, 0xc9, 0x8f, 0x00, 0x16, 0x00, 0xa6, 0x21, 0x50, - 0xb1, 0x74, 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, 0x00, 0x02, 0x01, 0xe0, - 0x90, 0x86, 0x00, 0x28, 0x11, 0x28, 0xa8, 0x7b, 0x00, 0x1c, 0xb0, 0x7b, - 0x00, 0x1c, 0x00, 0xe0, 0xd1, 0xdc, 0x01, 0x58, 0xa8, 0x7b, 0x00, 0x15, - 0xb0, 0x7b, 0x00, 0x15, 0x08, 0x0c, 0xd6, 0xa6, 0x01, 0x18, 0xb1, 0x74, - 0xc1, 0xdc, 0xb1, 0x76, 0x00, 0x78, 0xd1, 0xd4, 0x01, 0x28, 0xa8, 0x7b, - 0x00, 0x07, 0xb0, 0x7b, 0x00, 0x07, 0x00, 0x40, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc7, 0x8b, - 0xa8, 0x90, 0xb0, 0x92, 0xa8, 0x8c, 0xb0, 0x8e, 0xa8, 0x7c, 0xb0, 0x7e, - 0x00, 0xae, 0x08, 0x0c, 0x0f, 0xc0, 0x00, 0x9e, 0x08, 0x0c, 0xd7, 0x86, - 0xa9, 0x74, 0x00, 0x16, 0x08, 0x0c, 0xcc, 0x75, 0x00, 0x1e, 0x04, 0x68, - 0xa8, 0x67, 0x01, 0x03, 0xa9, 0x74, 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, - 0x00, 0x02, 0x01, 0xb0, 0x90, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, - 0x00, 0x1c, 0x00, 0xd0, 0xd1, 0xdc, 0x01, 0x48, 0xa8, 0x7b, 0x00, 0x15, - 0x08, 0x0c, 0xd6, 0xa6, 0x01, 0x18, 0xa9, 0x74, 0xc1, 0xdc, 0xa9, 0x76, - 0x00, 0x78, 0xd1, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x50, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, - 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc7, 0x8b, 0xa9, 0x74, 0x00, 0x16, - 0x08, 0x0c, 0x6c, 0xb9, 0x00, 0x1e, 0xd1, 0xe4, 0x11, 0x20, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0xd3, 0xd8, 0x0c, 0xd8, - 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, 0xa9, 0x7c, 0xd1, 0xe4, 0x19, 0x0c, - 0x1a, 0x7a, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, 0x00, 0x10, - 0x08, 0x0c, 0x9a, 0x61, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xf0, 0x00, 0x96, - 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x18, 0x08, 0x0c, - 0xbc, 0xb6, 0x00, 0xa0, 0xa8, 0x67, 0x01, 0x03, 0x20, 0x09, 0x18, 0x0c, - 0x21, 0x0c, 0xd1, 0x8c, 0x11, 0xb8, 0xd1, 0x84, 0x11, 0x90, 0x61, 0x08, - 0xa9, 0x7a, 0x91, 0x8e, 0x00, 0x29, 0x11, 0x10, 0x08, 0x0c, 0xef, 0x85, - 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x0c, - 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0x9b, 0xd3, 0xa8, 0x7b, - 0x00, 0x04, 0x0c, 0x90, 0xa8, 0x7b, 0x00, 0x04, 0x0c, 0x78, 0x91, 0x82, - 0x00, 0x54, 0x12, 0x20, 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, - 0x00, 0x05, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, - 0xc9, 0xf1, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, - 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, - 0xc9, 0xef, 0xc9, 0xef, 0xc9, 0xef, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x57, 0xdd, 0x01, 0xf8, 0x60, 0x14, 0x71, 0x44, 0x91, 0x8c, 0x0f, 0xff, - 0x90, 0x16, 0xd1, 0xc4, 0x01, 0x18, 0x72, 0x64, 0x92, 0x94, 0x00, 0xff, - 0x00, 0x96, 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x64, - 0x90, 0x86, 0x01, 0x39, 0x01, 0x28, 0xa8, 0x67, 0x01, 0x03, 0xa9, 0x76, - 0xaa, 0x96, 0x00, 0x30, 0xa8, 0x97, 0x40, 0x00, 0xa9, 0x9a, 0xaa, 0x9e, - 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x04, 0xb2, 0xd3, 0x91, 0x82, - 0x00, 0x85, 0x00, 0x02, 0xca, 0x27, 0xca, 0x25, 0xca, 0x25, 0xca, 0x33, - 0xca, 0x25, 0xca, 0x25, 0xca, 0x25, 0xca, 0x25, 0xca, 0x25, 0xca, 0x25, - 0xca, 0x25, 0xca, 0x25, 0xca, 0x25, 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x03, - 0x00, 0x01, 0x61, 0x06, 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0x56, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, 0x72, 0x24, - 0x62, 0x16, 0x72, 0x20, 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0xf8, 0x22, 0x68, - 0x68, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0xd0, 0x60, 0x10, 0x6d, 0x10, - 0x95, 0x2e, 0x11, 0xb0, 0x00, 0xc6, 0x2d, 0x60, 0x00, 0xd6, 0x08, 0x0c, - 0xcc, 0xe6, 0x00, 0xde, 0x00, 0xce, 0x01, 0x58, 0x70, 0x2c, 0xd0, 0x84, - 0x11, 0x18, 0x08, 0x0c, 0xcc, 0xb0, 0x00, 0x10, 0x68, 0x03, 0x00, 0x02, - 0x60, 0x07, 0x00, 0x86, 0x00, 0x28, 0x08, 0x0c, 0xcc, 0xd2, 0x0d, 0x90, - 0x60, 0x07, 0x00, 0x87, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x72, 0x20, 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0x78, - 0x68, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x01, 0x40, 0x68, 0x24, 0xd0, 0xec, 0x01, 0x28, 0x00, 0xc6, 0x2d, 0x60, - 0x08, 0x0c, 0xd4, 0x12, 0x00, 0xce, 0x00, 0xee, 0x00, 0xde, 0x00, 0x5e, - 0x00, 0x2e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x60, 0x60, 0x04, - 0x90, 0x8a, 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0xc5, 0x90, 0x8a, 0x00, 0x92, - 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x85, 0x00, 0xe2, 0x91, 0x86, - 0x00, 0x27, 0x01, 0x20, 0x91, 0x86, 0x00, 0x14, 0x19, 0x0c, 0x0d, 0xc5, - 0x08, 0x0c, 0x99, 0xa5, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xd0, 0xd8, 0x01, 0x40, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x77, 0x00, 0x00, - 0xa8, 0x7b, 0x00, 0x29, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x04, 0x9a, 0xb1, 0xca, 0xb6, 0xca, 0xb8, 0xca, 0xb8, - 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, - 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, 0xca, 0xb6, 0x08, 0x0c, 0x0d, 0xc5, - 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x28, 0x60, 0x04, 0x90, 0x82, - 0x00, 0x85, 0x20, 0x08, 0x04, 0xb8, 0x91, 0x86, 0x00, 0x27, 0x11, 0xf8, - 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, - 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x50, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x29, - 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xd2, 0xc3, 0x00, 0x9e, 0x08, 0x0c, - 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0xb3, 0x6d, - 0x0c, 0xe0, 0x91, 0x86, 0x00, 0x14, 0x1d, 0xd0, 0x08, 0x0c, 0x99, 0xa5, - 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x0d, 0x60, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x06, - 0xa8, 0x80, 0xc0, 0xec, 0xa8, 0x82, 0x08, 0xf0, 0x00, 0x02, 0xcb, 0x0e, - 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x26, - 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, 0xcb, 0x0c, - 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x34, 0x90, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x20, 0x01, 0x19, 0x86, 0x00, 0x10, 0x20, 0x01, - 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x60, 0x03, 0x00, 0x0c, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x34, 0x90, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x20, 0x01, 0x19, 0x86, 0x00, 0x10, 0x20, 0x01, - 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x60, 0x03, 0x00, 0x0e, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x91, 0x82, 0x00, 0x92, 0x12, 0x20, 0x91, 0x82, - 0x00, 0x85, 0x02, 0x08, 0x00, 0x12, 0x08, 0x04, 0xb3, 0x6d, 0xcb, 0x54, - 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x56, 0xcb, 0xa3, 0xcb, 0x54, - 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x54, 0xcb, 0x54, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x96, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x01, 0x68, 0x60, 0x34, 0x90, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x35, 0x11, 0x18, 0x00, 0x9e, 0x08, 0x04, 0xcb, 0xb7, 0x08, 0x0c, - 0xd0, 0xd8, 0x11, 0x18, 0x08, 0x0c, 0xd2, 0xc3, 0x00, 0x68, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xe4, 0x11, 0x10, 0x08, 0x0c, 0xd2, 0xc3, - 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xd7, 0xc3, 0x08, 0x0c, 0x6e, 0x9f, - 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0xd0, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, 0x60, 0x0b, 0xff, 0xff, 0x20, 0x09, - 0x02, 0x6e, 0x21, 0x0c, 0x61, 0x3a, 0x20, 0x09, 0x02, 0x6f, 0x21, 0x0c, - 0x61, 0x3e, 0x69, 0x10, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x69, 0x54, - 0x61, 0x56, 0x60, 0x23, 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, - 0x9a, 0xb1, 0x2d, 0x60, 0x00, 0xde, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x05, 0xa0, 0x60, 0x34, 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x91, 0x86, 0x00, 0x35, 0x01, 0x30, 0x91, 0x86, 0x00, 0x1e, 0x01, 0x18, - 0x91, 0x86, 0x00, 0x39, 0x15, 0x38, 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, - 0xd7, 0x59, 0x11, 0xf0, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0xd8, 0x61, 0x06, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x23, 0x00, 0x01, 0x69, 0x10, 0x61, 0x12, - 0x69, 0x2c, 0x61, 0x2e, 0x69, 0x30, 0x61, 0x32, 0x69, 0x34, 0x91, 0x8c, - 0x00, 0xff, 0x61, 0x36, 0x69, 0x38, 0x61, 0x3a, 0x69, 0x3c, 0x61, 0x3e, - 0x69, 0x54, 0x61, 0x56, 0x08, 0x0c, 0xd5, 0x54, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x2d, 0x60, 0x00, 0xde, 0x08, 0x04, 0xb2, 0xd3, - 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xc8, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x80, 0xd0, 0xb4, 0x01, 0x28, 0xc0, 0xec, - 0xa8, 0x82, 0xa8, 0x7b, 0x00, 0x06, 0x00, 0x48, 0xd0, 0xbc, 0x01, 0x18, - 0xa8, 0x7b, 0x00, 0x02, 0x00, 0x20, 0xa8, 0x7b, 0x00, 0x05, 0x08, 0x0c, - 0xd3, 0xd4, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, - 0xd2, 0xc3, 0x00, 0x9e, 0x08, 0x04, 0xb2, 0xd3, 0x00, 0x16, 0x00, 0x96, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x40, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x28, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x9e, 0x00, 0x1e, 0x91, 0x86, 0x00, 0x13, 0x01, 0x48, - 0x91, 0x86, 0x00, 0x14, 0x01, 0x30, 0x91, 0x86, 0x00, 0x27, 0x01, 0x18, - 0x08, 0x0c, 0xb3, 0x6d, 0x00, 0x30, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0x56, 0x00, 0x66, - 0x00, 0x96, 0x00, 0xa6, 0x20, 0x29, 0x00, 0x01, 0x91, 0x82, 0x01, 0x01, - 0x12, 0x08, 0x00, 0x10, 0x20, 0x09, 0x01, 0x00, 0x21, 0x30, 0x83, 0x04, - 0x90, 0x98, 0x00, 0x18, 0x20, 0x09, 0x00, 0x20, 0x20, 0x11, 0x00, 0x29, - 0x08, 0x0c, 0xcc, 0x85, 0x96, 0xb2, 0x00, 0x20, 0xb0, 0x04, 0x90, 0x4d, - 0x01, 0x10, 0x08, 0x0c, 0x0f, 0xc0, 0x08, 0x0c, 0x10, 0x0e, 0x05, 0x20, - 0x85, 0x28, 0xa8, 0x67, 0x01, 0x10, 0xa8, 0x6b, 0x00, 0x00, 0x29, 0x20, - 0xb4, 0x06, 0x96, 0x8a, 0x00, 0x3d, 0x12, 0x28, 0x26, 0x08, 0x20, 0x11, - 0x00, 0x1b, 0x04, 0x99, 0x00, 0xa8, 0x96, 0xb2, 0x00, 0x3c, 0x20, 0x09, - 0x00, 0x3c, 0x29, 0x50, 0x20, 0x11, 0x00, 0x1b, 0x04, 0x51, 0x0c, 0x28, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, - 0x95, 0xad, 0x00, 0x03, 0xb5, 0x66, 0x95, 0xac, 0x00, 0x00, 0x00, 0x48, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, - 0x95, 0xad, 0x00, 0x03, 0xb5, 0x66, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, - 0x00, 0x05, 0x00, 0xa6, 0x89, 0xff, 0x01, 0x58, 0xa8, 0x04, 0x90, 0x55, - 0x01, 0x30, 0xa8, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x2a, 0x48, - 0x0c, 0xb8, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0xae, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x02, 0x00, 0x78, 0x14, 0x90, 0x85, 0x00, 0x80, 0x78, 0x16, - 0xd1, 0x84, 0x01, 0x08, 0x81, 0x08, 0x81, 0x0c, 0x20, 0xa9, 0x00, 0x01, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x92, 0x00, 0x20, 0xa0, 0x20, 0xe1, - 0x00, 0x00, 0x23, 0x00, 0x9e, 0x00, 0x20, 0x98, 0x40, 0x03, 0x83, 0x18, - 0x93, 0x86, 0x00, 0x20, 0x11, 0x48, 0x20, 0x18, 0x23, 0x00, 0x9e, 0x00, - 0x20, 0x98, 0x78, 0x14, 0x80, 0x00, 0x90, 0x85, 0x00, 0x80, 0x78, 0x16, - 0x81, 0x09, 0x1d, 0x80, 0x78, 0x17, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x69, 0x20, 0x91, 0x86, 0x00, 0x03, 0x01, 0x18, 0x91, 0x86, 0x00, 0x02, - 0x11, 0xd0, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x2d, 0x60, 0x00, 0x96, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x50, 0x20, 0x01, - 0x00, 0x06, 0xa9, 0x80, 0xc1, 0xd5, 0x08, 0x0c, 0x71, 0x0b, 0x08, 0x0c, - 0x6e, 0x92, 0x08, 0x0c, 0xd2, 0xc3, 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x70, 0x2c, - 0xd0, 0x84, 0x11, 0x70, 0x60, 0x08, 0x20, 0x60, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x40, 0x61, 0x04, 0x91, 0x86, 0x00, 0x85, 0x01, 0x18, - 0x91, 0x86, 0x00, 0x8b, 0x11, 0x08, 0x90, 0x06, 0x00, 0xce, 0x00, 0x05, - 0x00, 0x66, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x31, 0x00, 0x01, - 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x83, 0x01, 0x2e, 0x00, 0x6e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x66, 0x20, 0x31, - 0x00, 0x00, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x6e, - 0x01, 0x2e, 0x00, 0x05, 0xcd, 0x1d, 0xcd, 0x1d, 0xcd, 0x18, 0xcd, 0x3f, - 0xcd, 0x0f, 0xcd, 0x18, 0xcd, 0x3f, 0xcd, 0x18, 0xcd, 0x18, 0x92, 0x65, - 0xcd, 0x18, 0xcd, 0x18, 0xcd, 0x18, 0xcd, 0x0f, 0xcd, 0x0f, 0x08, 0x0c, - 0x0d, 0xc5, 0x00, 0x36, 0x20, 0x19, 0x00, 0x10, 0x08, 0x0c, 0xe7, 0x46, - 0x00, 0x3e, 0x00, 0x05, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0x96, 0x86, 0xff, 0x11, 0xd8, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xc0, 0xa8, 0x64, 0x90, 0x86, 0x01, 0x39, - 0x11, 0x28, 0xa8, 0x7b, 0x00, 0x05, 0xa8, 0x83, 0x00, 0x00, 0x00, 0x28, - 0x90, 0x0e, 0x20, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x71, 0x0b, 0x08, 0x0c, - 0xd3, 0xd4, 0x08, 0x0c, 0x6e, 0x92, 0x08, 0x0c, 0xb3, 0x06, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x9e, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe0, 0x60, 0x00, - 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x02, 0xcd, 0x55, - 0xcd, 0x85, 0xcd, 0x57, 0xcd, 0xa6, 0xcd, 0x80, 0xcd, 0x55, 0xcd, 0x18, - 0xcd, 0x1d, 0xcd, 0x1d, 0xcd, 0x18, 0xcd, 0x18, 0xcd, 0x18, 0xcd, 0x18, - 0xcd, 0x18, 0xcd, 0x18, 0xcd, 0x18, 0x08, 0x0c, 0x0d, 0xc5, 0x86, 0xff, - 0x15, 0x20, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x05, 0x00, 0x00, 0x96, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x68, 0xa8, 0x7c, - 0xd0, 0xcc, 0x01, 0x40, 0x00, 0x96, 0xc0, 0xcc, 0xa8, 0x7e, 0xa8, 0x78, - 0x20, 0x48, 0x08, 0x0c, 0x0f, 0xc0, 0x00, 0x9e, 0x08, 0x0c, 0xd3, 0xd4, - 0x00, 0x9e, 0x08, 0x0c, 0xd7, 0x9d, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, - 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, - 0x9a, 0xb1, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x66, 0x08, 0x0c, - 0x1a, 0x8e, 0x00, 0x6e, 0x08, 0x90, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x24, 0x9c, 0x06, 0x11, 0x20, 0x08, 0x0c, 0xa9, 0xd3, 0x00, 0xee, - 0x08, 0x40, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x50, 0x00, 0x86, 0x00, 0x96, 0x20, 0x49, 0x00, 0x01, 0x2c, 0x40, - 0x08, 0x0c, 0xaa, 0xfb, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x10, 0x08, 0x0c, - 0xa8, 0xd0, 0x00, 0xee, 0x19, 0x04, 0xcd, 0x57, 0x08, 0x04, 0xcd, 0x18, - 0x00, 0x36, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x3c, 0x9c, 0x06, - 0x11, 0x38, 0x90, 0x1e, 0x08, 0x0c, 0xaa, 0x49, 0x00, 0xee, 0x00, 0x3e, - 0x08, 0x04, 0xcd, 0x57, 0x08, 0x0c, 0xac, 0x2b, 0x00, 0xee, 0x00, 0x3e, - 0x19, 0x04, 0xcd, 0x57, 0x08, 0x04, 0xcd, 0x18, 0x00, 0xc6, 0x60, 0x20, - 0x90, 0x84, 0x00, 0x0f, 0x00, 0x13, 0x00, 0xce, 0x00, 0x05, 0xcd, 0xd9, - 0xce, 0xa3, 0xd0, 0x11, 0xcd, 0xe3, 0xb3, 0x06, 0xcd, 0xd9, 0xe7, 0x3c, - 0xd8, 0x05, 0xce, 0xa3, 0x92, 0x37, 0xd0, 0x9d, 0xcd, 0xd2, 0xcd, 0xd2, - 0xcd, 0xd2, 0xcd, 0xd2, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x10, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0xb2, 0xd3, 0x60, 0x1b, 0x00, 0x01, - 0x00, 0x05, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x30, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0x2c, 0x00, 0xa8, 0x96, 0x00, 0x9e, 0x60, 0x00, 0x90, 0x8a, - 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x02, 0xce, 0x02, 0xce, 0x04, - 0xce, 0x28, 0xce, 0x3c, 0xce, 0x62, 0xce, 0x02, 0xcd, 0xd9, 0xcd, 0xd9, - 0xcd, 0xd9, 0xce, 0x3c, 0xce, 0x3c, 0xce, 0x02, 0xce, 0x02, 0xce, 0x02, - 0xce, 0x02, 0xce, 0x46, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0xe6, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x80, 0xc0, 0xb5, 0xa8, 0x82, 0x00, 0x9e, - 0x20, 0x71, 0x19, 0xe8, 0x70, 0x24, 0x9c, 0x06, 0x01, 0xa0, 0x08, 0x0c, - 0xa8, 0xd0, 0x08, 0x0c, 0xd7, 0x9d, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, - 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, - 0x60, 0x1a, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xee, - 0x00, 0x05, 0x60, 0x1b, 0x00, 0x01, 0x0c, 0xd8, 0x00, 0x96, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x80, 0xc0, 0xb5, 0xa8, 0x82, 0x00, 0x9e, 0x08, 0x0c, - 0xd7, 0x9d, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, - 0x00, 0x02, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x00, 0x96, 0x60, 0x1b, 0x00, 0x01, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x80, - 0xc0, 0xb5, 0xa8, 0x82, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x57, 0xdd, - 0x01, 0xb8, 0x60, 0x14, 0x00, 0x96, 0x90, 0x4d, 0x01, 0x90, 0xa8, 0x64, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x06, 0x90, 0x86, 0x01, 0x39, - 0x11, 0x50, 0xa8, 0x67, 0x01, 0x39, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x97, - 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x04, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, - 0x08, 0x04, 0xb2, 0xd3, 0x60, 0x14, 0x00, 0x96, 0x90, 0x4d, 0x05, 0xc0, - 0xa9, 0x7c, 0xd1, 0xe4, 0x05, 0xa8, 0x20, 0x01, 0x18, 0x0f, 0x20, 0x04, - 0xd0, 0xc4, 0x01, 0x10, 0x00, 0x9e, 0x00, 0x05, 0xa8, 0x84, 0x00, 0x9e, - 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x61, 0x1a, 0x20, 0x01, - 0x00, 0x30, 0x2c, 0x08, 0x08, 0x0c, 0x16, 0x11, 0x20, 0x01, 0x03, 0x0c, - 0x20, 0x04, 0x90, 0x86, 0x00, 0x41, 0x11, 0x98, 0x60, 0x14, 0x00, 0x96, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x80, 0xd0, 0xf4, 0x11, 0x30, - 0xc0, 0xf5, 0xa8, 0x82, 0x00, 0x9e, 0x60, 0x1b, 0x00, 0x02, 0x00, 0x68, - 0x00, 0x9e, 0x00, 0xc6, 0x08, 0x0c, 0x23, 0x6e, 0x00, 0xce, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, - 0xb3, 0x52, 0x00, 0x05, 0x00, 0x9e, 0x08, 0x0c, 0x1a, 0x8e, 0x08, 0x04, - 0xce, 0x28, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, - 0x00, 0x0b, 0x00, 0x05, 0xce, 0xba, 0xcd, 0xe0, 0xce, 0xbc, 0xce, 0xba, - 0xce, 0xbc, 0xce, 0xbc, 0xcd, 0xda, 0xce, 0xba, 0xcd, 0xd4, 0xcd, 0xd4, - 0xce, 0xba, 0xce, 0xba, 0xce, 0xba, 0xce, 0xba, 0xce, 0xba, 0xce, 0xba, - 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x00, 0xbe, 0x90, 0x8a, 0x00, 0x0c, 0x1a, 0x0c, - 0x0d, 0xc5, 0x00, 0xb6, 0x00, 0x13, 0x00, 0xbe, 0x00, 0x05, 0xce, 0xd7, - 0xcf, 0xa8, 0xce, 0xd9, 0xcf, 0x19, 0xce, 0xd9, 0xcf, 0x19, 0xce, 0xd9, - 0xce, 0xe7, 0xce, 0xd7, 0xcf, 0x19, 0xce, 0xd7, 0xcf, 0x08, 0x08, 0x0c, - 0x0d, 0xc5, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x16, 0x05, 0xc0, 0x90, 0x8e, - 0x00, 0x04, 0x05, 0xa8, 0x90, 0x8e, 0x00, 0x02, 0x05, 0x90, 0x90, 0x8e, - 0x00, 0x52, 0x09, 0x04, 0xcf, 0xa4, 0x60, 0x04, 0x08, 0x0c, 0xd2, 0xe0, - 0x09, 0x04, 0xcf, 0xc1, 0x90, 0x8e, 0x00, 0x04, 0x11, 0x10, 0x08, 0x0c, - 0x32, 0x79, 0x90, 0x8e, 0x00, 0x21, 0x09, 0x04, 0xcf, 0xc5, 0x90, 0x8e, - 0x00, 0x22, 0x09, 0x04, 0xd0, 0x0c, 0x90, 0x8e, 0x00, 0x3d, 0x09, 0x04, - 0xcf, 0xc5, 0x90, 0x8e, 0x00, 0x39, 0x09, 0x04, 0xcf, 0xc9, 0x90, 0x8e, - 0x00, 0x35, 0x09, 0x04, 0xcf, 0xc9, 0x90, 0x8e, 0x00, 0x1e, 0x01, 0x78, - 0x90, 0x8e, 0x00, 0x01, 0x11, 0x40, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x01, 0x10, 0x08, 0x0c, - 0x32, 0x50, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x04, 0xb3, 0x06, 0x00, 0xc6, - 0x00, 0xd6, 0x61, 0x04, 0x91, 0x86, 0x00, 0x16, 0x09, 0x04, 0xcf, 0x95, - 0x91, 0x86, 0x00, 0x02, 0x19, 0x04, 0xcf, 0x6a, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0x8c, 0x11, 0xc8, 0x08, 0x0c, 0x76, 0x37, 0x11, 0xb0, - 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x38, 0x08, 0x0c, 0x76, 0x5a, 0x11, 0x20, - 0x08, 0x0c, 0x75, 0x41, 0x08, 0x04, 0xcf, 0xf5, 0x20, 0x01, 0x19, 0x7d, - 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x75, 0x63, 0x08, 0x04, 0xcf, 0xf5, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x80, 0x01, 0x30, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xac, 0x19, 0x04, 0xcf, 0xf5, 0xb8, 0xa0, 0x90, 0x82, - 0x00, 0x81, 0x1a, 0x04, 0xcf, 0xf5, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x05, 0x01, 0x90, 0x80, 0x01, 0xb8, 0x42, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x23, 0x00, 0x07, 0x60, 0x1b, 0x03, 0x98, 0x60, 0x43, 0x00, 0x00, - 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x28, 0x2b, 0x00, 0x60, 0x12, 0x60, 0x23, - 0x00, 0x01, 0x04, 0x58, 0x00, 0xde, 0x00, 0xce, 0x60, 0x04, 0x90, 0x8e, - 0x00, 0x02, 0x11, 0xa0, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x86, - 0x00, 0x7e, 0x11, 0x70, 0x20, 0x09, 0x18, 0x37, 0x21, 0x04, 0xc0, 0x85, - 0x20, 0x0a, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x60, 0xc1, - 0x00, 0xee, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x30, 0x08, 0x0c, 0xbc, 0xb6, - 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x32, 0x79, 0x01, 0x2e, 0x00, 0xee, - 0x08, 0x0c, 0xb3, 0x06, 0x00, 0x05, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0x6a, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, - 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xde, 0x00, 0xce, 0x0c, 0x80, - 0x08, 0x0c, 0x32, 0x79, 0x08, 0x04, 0xcf, 0x15, 0x00, 0xc6, 0x00, 0xd6, - 0x61, 0x04, 0x91, 0x86, 0x00, 0x16, 0x0d, 0x38, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, 0x09, 0x04, 0xcf, 0x6a, - 0x80, 0x01, 0xb8, 0x42, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xde, 0x00, 0xce, 0x08, 0x98, 0x08, 0x0c, - 0xbc, 0xb6, 0x08, 0x04, 0xcf, 0x17, 0x08, 0x0c, 0xbc, 0xf2, 0x08, 0x04, - 0xcf, 0x17, 0x00, 0xd6, 0x2c, 0x68, 0x61, 0x04, 0x08, 0x0c, 0xd7, 0x59, - 0x00, 0xde, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0xd3, 0x04, 0x08, 0x60, 0x04, - 0x80, 0x07, 0x61, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x05, 0x60, 0x36, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, - 0x60, 0x3c, 0x60, 0x0a, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, - 0x60, 0x2c, 0x2c, 0x08, 0x20, 0x60, 0x60, 0x24, 0xd0, 0xb4, 0x01, 0x08, - 0xc0, 0x85, 0xc0, 0xb5, 0x60, 0x26, 0x21, 0x60, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0xde, 0x00, 0xce, 0x08, 0x0c, - 0xbc, 0xb6, 0x08, 0x0c, 0x32, 0x50, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x32, 0x79, 0x60, 0x17, 0x00, 0x00, 0x60, 0x23, - 0x00, 0x07, 0x60, 0x1b, 0x03, 0x98, 0x60, 0x43, 0x00, 0x00, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x08, 0x0c, 0xb7, 0x08, 0x19, 0x04, 0xcf, 0xc1, - 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, - 0x00, 0x96, 0x00, 0xd6, 0x00, 0x1b, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, - 0xd0, 0x2c, 0xd0, 0x2c, 0xd0, 0x2c, 0xd0, 0x2c, 0xd0, 0x2c, 0xd0, 0x2c, - 0xd0, 0x2c, 0xd0, 0x2c, 0xd0, 0x2c, 0xcd, 0xd9, 0xd0, 0x2c, 0xcd, 0xe0, - 0xd0, 0x2e, 0xcd, 0xe0, 0xd0, 0x48, 0xd0, 0x2c, 0x08, 0x0c, 0x0d, 0xc5, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x8b, 0x01, 0xb0, 0x60, 0x34, 0x90, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x35, 0x11, 0x30, 0x60, 0x2c, - 0x90, 0x80, 0x00, 0x09, 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, 0x60, 0x07, - 0x00, 0x8b, 0x60, 0x03, 0x00, 0x0d, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0xd7, 0xd7, 0x01, 0x18, 0x08, 0x0c, - 0xd7, 0xea, 0x00, 0x10, 0x08, 0x0c, 0xd7, 0xf8, 0x08, 0x0c, 0xd2, 0xc3, - 0x08, 0x0c, 0xd0, 0xd8, 0x05, 0x70, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd0, 0xd8, 0x01, 0x68, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x7b, 0x00, 0x06, 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x80, 0xc0, 0xed, - 0xa8, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x2c, 0x68, 0x08, 0x0c, 0xb2, 0x7d, - 0x01, 0x50, 0x68, 0x10, 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x00, 0xc6, - 0x2d, 0x60, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xce, 0x00, 0x08, 0x2d, 0x60, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0xc8, 0x08, 0x0c, 0xd7, 0xd7, 0x01, 0x38, 0x60, 0x34, 0x90, 0x86, - 0x40, 0x00, 0x11, 0x18, 0x08, 0x0c, 0x32, 0x50, 0x08, 0xd0, 0x60, 0x34, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, 0x01, 0x18, - 0x91, 0x86, 0x00, 0x35, 0x11, 0x18, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x68, - 0x08, 0x0c, 0xb3, 0x06, 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, - 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x02, 0xd0, 0xb3, 0xd0, 0xb3, 0xd0, 0xb7, - 0xd0, 0xb5, 0xd0, 0xc1, 0xd0, 0xb3, 0xd0, 0xb3, 0xb3, 0x06, 0xd0, 0xb3, - 0xd0, 0xb3, 0xd0, 0xb3, 0xd0, 0xb3, 0xd0, 0xb3, 0xd0, 0xb3, 0xd0, 0xb3, - 0xd0, 0xb3, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xac, 0x2b, 0x61, 0x14, - 0x00, 0x96, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x08, 0x0c, 0x6e, 0x9f, - 0x00, 0x9e, 0x08, 0x04, 0xb2, 0xd3, 0x60, 0x1c, 0xd0, 0x84, 0x19, 0x0c, - 0x1a, 0x8e, 0x0c, 0x88, 0x92, 0x84, 0x00, 0x07, 0x11, 0x58, 0x92, 0x82, - 0x1c, 0xd0, 0x02, 0x40, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x92, 0x02, - 0x12, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe8, - 0x00, 0x96, 0x00, 0x28, 0x00, 0x96, 0x00, 0x06, 0x60, 0x14, 0x20, 0x48, - 0x00, 0x0e, 0x00, 0x06, 0x99, 0x84, 0xf0, 0x00, 0x90, 0x86, 0xf0, 0x00, - 0x01, 0x10, 0x08, 0x0c, 0x10, 0xb9, 0x00, 0x0e, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x36, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x61, 0x1c, 0xd0, 0x20, 0x71, 0x18, 0x00, 0x73, 0x54, - 0x70, 0x74, 0x93, 0x02, 0x16, 0x40, 0x60, 0x20, 0x92, 0x06, 0x11, 0xf8, - 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x80, 0x92, 0x86, 0x00, 0x01, 0x11, 0x68, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x04, 0x11, 0x48, 0x08, 0x0c, 0x32, 0x50, - 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0xc6, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xce, - 0x00, 0x60, 0x08, 0x0c, 0xd4, 0xce, 0x01, 0x48, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x10, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0xc6, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0xce, 0x9c, 0xe0, 0x00, 0x18, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, - 0x08, 0xa0, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x16, 0x91, 0x88, 0x10, 0x00, - 0x21, 0x0c, 0x81, 0xff, 0x01, 0x28, 0x20, 0x61, 0x1a, 0xb7, 0x61, 0x12, - 0x08, 0x0c, 0x32, 0x50, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x1e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0xb0, 0x66, 0x56, - 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x18, 0x08, 0x0c, - 0xd2, 0x07, 0x01, 0x68, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x03, - 0x20, 0x09, 0x00, 0x4b, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xba, 0xa0, 0x08, 0x0c, 0xb3, 0x25, - 0x05, 0x60, 0x60, 0x57, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, - 0xd5, 0x54, 0x60, 0x23, 0x00, 0x03, 0x00, 0x16, 0x08, 0x0c, 0x96, 0xa4, - 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, 0x2c, 0x08, 0x08, 0x0c, - 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0x1e, 0xd1, 0x84, 0x01, 0x28, 0x08, 0x0c, - 0xb2, 0xd3, 0x90, 0x85, 0x00, 0x01, 0x00, 0x70, 0x08, 0x0c, 0x57, 0xdd, - 0x01, 0x28, 0xd1, 0x8c, 0x11, 0x70, 0x08, 0x0c, 0xd2, 0x07, 0x01, 0x48, - 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x29, 0x00, - 0x60, 0x16, 0x0c, 0x90, 0x20, 0x09, 0x00, 0x4d, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x4e, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x46, 0x00, 0x16, 0x08, 0x0c, - 0xb2, 0x7d, 0x2c, 0x78, 0x05, 0xa0, 0x7e, 0x56, 0x2b, 0x00, 0x78, 0x12, - 0x78, 0x23, 0x00, 0x03, 0x00, 0x16, 0x20, 0x21, 0x00, 0x05, 0x08, 0x0c, - 0xd2, 0x19, 0x00, 0x1e, 0x91, 0x86, 0x00, 0x4d, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x4e, 0x01, 0x48, 0x20, 0x01, 0x19, 0x80, 0x20, 0x0c, 0xd1, 0xfc, - 0x01, 0x68, 0x2f, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xd0, 0x20, 0x01, - 0x19, 0x7f, 0x20, 0x0c, 0xd1, 0xfc, 0x01, 0x20, 0x2f, 0x60, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x88, 0x2f, 0x60, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x38, - 0xd1, 0x8c, 0x11, 0x18, 0x04, 0xf1, 0x01, 0x48, 0x00, 0x10, 0x29, 0x00, - 0x78, 0x16, 0x00, 0x1e, 0x00, 0x16, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x1e, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x46, 0x08, 0x0c, 0xb2, 0x7d, 0x2c, 0x78, - 0x05, 0x08, 0x7e, 0x56, 0x2b, 0x00, 0x78, 0x12, 0x78, 0x23, 0x00, 0x03, - 0x00, 0x96, 0x20, 0x21, 0x00, 0x04, 0x04, 0x89, 0x00, 0x9e, 0x20, 0x01, - 0x19, 0x7e, 0x20, 0x0c, 0xd1, 0xfc, 0x01, 0x20, 0x2f, 0x60, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0x60, 0x2f, 0x60, 0x08, 0x0c, 0x57, 0xdd, 0x01, 0x20, - 0xd1, 0x8c, 0x11, 0x60, 0x00, 0x71, 0x01, 0x30, 0x20, 0x09, 0x00, 0x52, - 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x00, 0x4e, 0x00, 0xce, - 0x00, 0xfe, 0x00, 0x05, 0x29, 0x00, 0x78, 0x16, 0x0c, 0x98, 0x00, 0xc6, - 0x08, 0x0c, 0x4b, 0xe4, 0x00, 0xce, 0x11, 0x20, 0x08, 0x0c, 0xb2, 0xd3, - 0x90, 0x06, 0x00, 0x05, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x6b, 0x80, 0x00, - 0x29, 0x00, 0x60, 0x16, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x96, - 0x00, 0x76, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x68, 0x58, - 0x01, 0x58, 0x20, 0x01, 0xd2, 0x1e, 0x00, 0x06, 0x90, 0x0e, 0x24, 0x00, - 0x08, 0x0c, 0x71, 0x0b, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x0e, 0x08, 0x07, - 0x24, 0x18, 0x08, 0x0c, 0x99, 0x3f, 0xba, 0xa0, 0x00, 0x86, 0x20, 0x41, - 0x00, 0x01, 0x20, 0x39, 0x00, 0x01, 0x26, 0x08, 0x08, 0x0c, 0x96, 0xbc, - 0x00, 0x8e, 0x08, 0x0c, 0x95, 0x77, 0x2f, 0x08, 0x26, 0x48, 0x08, 0x0c, - 0xe9, 0x1c, 0xb9, 0x3c, 0x81, 0xff, 0x09, 0x0c, 0x97, 0x8f, 0x08, 0x0c, - 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x7e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x90, - 0x66, 0x0a, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, - 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x20, 0x09, 0x00, 0x1f, 0x08, 0x0c, - 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, - 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0xb3, 0x25, 0x01, 0xb8, 0x66, 0x0a, 0x2b, 0x08, 0x61, 0x12, - 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x08, 0x29, 0x00, 0x60, 0x16, - 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x17, 0x68, 0x00, 0xfe, 0x20, 0x09, - 0x00, 0x21, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x20, 0x09, 0x00, 0x3d, - 0x00, 0xc6, 0x01, 0x26, 0x00, 0x16, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xb2, 0x7d, 0x01, 0x98, 0x66, 0x0a, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, - 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x00, 0x1e, - 0x00, 0x16, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd0, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb3, 0x25, 0x01, 0x88, - 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, - 0x29, 0x00, 0x60, 0x16, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0xb3, 0x52, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, - 0x0c, 0xd8, 0x20, 0x09, 0x00, 0x44, 0x08, 0x30, 0x20, 0x09, 0x00, 0x49, - 0x08, 0x18, 0x00, 0x26, 0x00, 0xb6, 0x62, 0x10, 0x22, 0x58, 0xba, 0x3c, - 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, 0xba, 0x3e, 0x00, 0xbe, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x02, - 0x01, 0x40, 0x90, 0x8e, 0x00, 0x03, 0x01, 0x28, 0x90, 0x8e, 0x00, 0x04, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x06, 0x00, 0x86, 0x00, 0x96, 0x60, 0x20, 0x90, 0x86, 0x00, 0x04, - 0x01, 0xa8, 0x60, 0x14, 0x90, 0x4d, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x80, - 0xa8, 0x64, 0x90, 0x86, 0x01, 0x39, 0x01, 0x70, 0x60, 0x20, 0x90, 0xc6, - 0x00, 0x03, 0x01, 0x40, 0x90, 0xc6, 0x00, 0x02, 0x01, 0x28, 0xa8, 0x68, - 0xd0, 0xfc, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb3, 0x25, 0x01, 0x98, 0x2b, 0x08, - 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, - 0x60, 0x16, 0x08, 0x0c, 0x32, 0x50, 0x20, 0x09, 0x00, 0x28, 0x08, 0x0c, - 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, - 0x90, 0x06, 0x0c, 0xd8, 0x91, 0x86, 0x00, 0x15, 0x11, 0xa8, 0x20, 0x11, - 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x74, 0x11, 0x78, 0x00, 0xb6, - 0x08, 0x0c, 0xbf, 0x63, 0x00, 0xbe, 0x08, 0x0c, 0xc1, 0xdf, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x29, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x78, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x68, - 0x00, 0x9e, 0xd0, 0xfc, 0x01, 0x48, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0xd7, 0x1a, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, - 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x7b, - 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, - 0x00, 0x04, 0xa8, 0x67, 0x01, 0x39, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, 0x00, 0x9e, 0x08, 0x0c, 0xb2, 0xd3, - 0x0c, 0x30, 0x00, 0x96, 0x91, 0x86, 0x00, 0x16, 0x11, 0x28, 0x20, 0x01, - 0x00, 0x04, 0x08, 0x0c, 0x66, 0x6a, 0x00, 0xe8, 0x91, 0x86, 0x00, 0x15, - 0x15, 0x10, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x14, - 0x11, 0xe0, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x67, 0xbf, - 0x00, 0xbe, 0x08, 0x0c, 0xc2, 0xb5, 0x11, 0x98, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x90, 0x00, 0xbe, 0x90, 0x05, 0x01, 0x60, 0x20, 0x01, - 0x00, 0x06, 0x08, 0x0c, 0x66, 0x6a, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x68, - 0xd0, 0xfc, 0x01, 0x70, 0x08, 0x0c, 0xb6, 0xdc, 0x00, 0x48, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x68, 0xd0, 0xfc, 0x05, 0x28, 0x08, 0x0c, 0xbc, 0xb6, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x14, 0x63, 0x10, - 0x23, 0x58, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x7b, 0x00, 0x00, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0x90, 0x0e, 0x08, 0x0c, - 0x69, 0x44, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, - 0xc1, 0x8d, 0xa9, 0x9a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x6e, 0x9f, 0x01, 0x2e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0xf8, 0x60, 0x14, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, - 0x00, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x04, 0xa8, 0x67, - 0x01, 0x39, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, - 0x01, 0x2e, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x40, 0xa8, 0x78, 0x90, 0x86, - 0x00, 0x05, 0x11, 0x08, 0x00, 0x09, 0x00, 0x05, 0xa8, 0x80, 0xc0, 0xad, - 0xa8, 0x82, 0x00, 0x05, 0x60, 0x43, 0x00, 0x00, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x50, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0xc6, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x01, 0x20, 0x60, 0x20, - 0x90, 0x84, 0x00, 0x0f, 0x00, 0x13, 0x00, 0xce, 0x00, 0x05, 0xcd, 0xd9, - 0xd4, 0x04, 0xd4, 0x04, 0xd4, 0x07, 0xec, 0x80, 0xec, 0x9b, 0xec, 0x9e, - 0xcd, 0xd9, 0xcd, 0xd9, 0xcd, 0xd9, 0xcd, 0xd9, 0xcd, 0xd9, 0xcd, 0xd9, - 0xcd, 0xd9, 0xcd, 0xd9, 0x08, 0x0c, 0x0d, 0xc5, 0xa0, 0x01, 0xa0, 0x01, - 0x00, 0x05, 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x01, 0x18, 0xa8, 0x7c, - 0xd0, 0xe4, 0x11, 0x10, 0x00, 0x9e, 0x00, 0x10, 0x00, 0x9e, 0x00, 0x05, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x05, 0x50, 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x15, 0x40, - 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0xb2, 0x7d, 0x05, 0x08, 0x78, 0x10, - 0x60, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x78, 0x20, 0x90, 0x86, 0x00, 0x03, - 0x01, 0x28, 0x78, 0x08, 0x60, 0x3a, 0x2f, 0x00, 0x60, 0x3e, 0x00, 0x20, - 0x78, 0x08, 0x60, 0x3e, 0x2f, 0x00, 0x60, 0x3a, 0x60, 0x2e, 0x60, 0x23, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x35, 0x60, 0x03, 0x00, 0x01, 0x79, 0x54, - 0x61, 0x56, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x2f, 0x60, - 0x00, 0xfe, 0x00, 0x05, 0x2f, 0x60, 0x00, 0xfe, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x42, 0x00, 0x05, 0x00, 0x16, 0x00, 0x96, 0x68, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xe4, 0x01, 0x80, 0xc0, 0xe4, 0xa8, 0x7e, - 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x93, 0x00, 0x00, 0xa8, 0x8f, 0x00, 0x00, - 0xd0, 0xcc, 0x01, 0x30, 0xc0, 0xcc, 0xa8, 0x7e, 0xa8, 0x78, 0x20, 0x48, - 0x08, 0x0c, 0x0f, 0xc0, 0x68, 0x30, 0x60, 0x36, 0x90, 0x8e, 0x00, 0x01, - 0x01, 0x48, 0x68, 0x03, 0x00, 0x02, 0x90, 0x86, 0x00, 0x05, 0x01, 0x70, - 0x90, 0x06, 0x60, 0x2e, 0x60, 0x32, 0x00, 0xd0, 0x68, 0x1c, 0xc0, 0x85, - 0x68, 0x1e, 0x68, 0x03, 0x00, 0x04, 0x68, 0x24, 0xc0, 0xf4, 0x90, 0x85, - 0x0c, 0x00, 0x68, 0x26, 0x68, 0x14, 0x20, 0x48, 0xa8, 0xac, 0x69, 0x38, - 0x91, 0x02, 0xa8, 0xb0, 0x69, 0x3c, 0x91, 0x03, 0x1e, 0x48, 0x68, 0x3c, - 0x60, 0x2e, 0x68, 0x38, 0x90, 0x84, 0xff, 0xfc, 0x68, 0x3a, 0x60, 0x32, - 0x2d, 0x00, 0x60, 0x3a, 0x68, 0x08, 0x60, 0x3e, 0x69, 0x10, 0x61, 0x12, - 0x69, 0x54, 0x61, 0x56, 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x39, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x9e, 0x00, 0x1e, 0x00, 0x05, 0x60, 0x24, 0xd0, 0xd4, 0x05, 0x10, - 0xd0, 0xf4, 0x11, 0xf8, 0x60, 0x38, 0x94, 0x0a, 0x60, 0x3c, 0x93, 0x03, - 0x02, 0x30, 0x91, 0x05, 0x01, 0x20, 0x60, 0x24, 0xc0, 0xd4, 0xc0, 0xf5, - 0x00, 0x98, 0x64, 0x3a, 0x63, 0x3e, 0xac, 0x3e, 0xab, 0x42, 0x00, 0x46, - 0x00, 0x36, 0x24, 0x00, 0xac, 0xac, 0x94, 0x02, 0xa8, 0x36, 0x23, 0x00, - 0xab, 0xb0, 0x93, 0x03, 0xa8, 0x3a, 0x00, 0x3e, 0x00, 0x4e, 0x60, 0x24, - 0xc0, 0xd4, 0x00, 0x00, 0x60, 0x26, 0x00, 0x05, 0xd0, 0xf4, 0x11, 0x38, - 0xa8, 0x3c, 0x60, 0x3a, 0xa8, 0x40, 0x60, 0x3e, 0x60, 0x24, 0xc0, 0xf5, - 0x60, 0x26, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, - 0x00, 0x34, 0x01, 0xb8, 0x90, 0x8e, 0x00, 0x35, 0x01, 0xa0, 0x90, 0x8e, - 0x00, 0x36, 0x01, 0x88, 0x90, 0x8e, 0x00, 0x37, 0x01, 0x70, 0x90, 0x8e, - 0x00, 0x38, 0x01, 0x58, 0x90, 0x8e, 0x00, 0x39, 0x01, 0x40, 0x90, 0x8e, - 0x00, 0x3a, 0x01, 0x28, 0x90, 0x8e, 0x00, 0x3b, 0x01, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, 0x20, 0x01, 0x19, 0x82, 0x20, 0x0c, - 0x80, 0x00, 0x20, 0x14, 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x93, 0x75, - 0x20, 0x01, 0x19, 0x86, 0x82, 0xff, 0x11, 0x10, 0x20, 0x11, 0x00, 0x14, - 0x22, 0x02, 0x20, 0x01, 0x19, 0x84, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, - 0x20, 0x71, 0x19, 0x6c, 0x71, 0x1a, 0x72, 0x1e, 0x20, 0x01, 0x00, 0x64, - 0x08, 0x0c, 0x93, 0x75, 0x20, 0x01, 0x19, 0x87, 0x82, 0xff, 0x11, 0x10, - 0x20, 0x11, 0x00, 0x14, 0x22, 0x02, 0x20, 0x01, 0x19, 0x88, 0x92, 0x88, - 0x00, 0x0a, 0x21, 0x02, 0x20, 0x01, 0x1a, 0x98, 0x21, 0x02, 0x20, 0x01, - 0x00, 0x32, 0x08, 0x0c, 0x16, 0x11, 0x08, 0x0c, 0x6a, 0x84, 0x00, 0xee, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x00, 0xe6, 0x20, 0x01, 0x19, 0x86, 0x20, 0x03, 0x00, 0x28, - 0x20, 0x01, 0x19, 0x87, 0x20, 0x03, 0x00, 0x14, 0x20, 0x71, 0x19, 0x6c, - 0x70, 0x1b, 0x00, 0x00, 0x70, 0x1f, 0x07, 0xd0, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x09, 0x00, 0x1e, 0x21, 0x02, 0x20, 0x01, 0x1a, 0x98, 0x21, 0x02, - 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x16, 0x11, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x96, 0x60, 0x58, 0x90, 0x4d, 0x01, 0x10, - 0x08, 0x0c, 0x10, 0x40, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x80, - 0x2b, 0x08, 0x61, 0x12, 0x0c, 0xa9, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, - 0x60, 0x16, 0x20, 0x09, 0x00, 0x33, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, - 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, - 0x00, 0x15, 0x15, 0x20, 0x70, 0x90, 0x90, 0x86, 0x00, 0x18, 0x01, 0x20, - 0x70, 0x90, 0x90, 0x86, 0x00, 0x14, 0x11, 0xe0, 0x60, 0x14, 0x20, 0x48, - 0xaa, 0x3c, 0xd2, 0xe4, 0x11, 0x60, 0x2c, 0x78, 0x08, 0x0c, 0x9d, 0x4c, - 0x01, 0xd8, 0x70, 0x7c, 0xaa, 0x50, 0x92, 0x06, 0x11, 0x60, 0x70, 0x80, - 0xaa, 0x54, 0x92, 0x06, 0x11, 0x40, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, - 0xba, 0xa0, 0x00, 0xbe, 0x90, 0x0e, 0x08, 0x0c, 0x32, 0x99, 0x08, 0x0c, - 0xb6, 0xdc, 0x00, 0x20, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, 0x00, 0x05, 0x70, 0x60, 0xaa, 0x54, - 0x92, 0x06, 0x0d, 0x48, 0x0c, 0x80, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0x88, 0x2b, 0x08, 0x61, 0x12, - 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, - 0x20, 0x09, 0x00, 0x4d, 0x08, 0x0c, 0xb3, 0x52, 0x90, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x16, 0x08, 0x0c, 0xb2, 0x7d, - 0x01, 0x80, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd5, 0x54, 0x60, 0x23, - 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x00, 0x1e, 0x08, 0x0c, 0xb3, 0x52, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x1e, - 0x90, 0x06, 0x0c, 0xd0, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, - 0x00, 0x56, 0x00, 0x66, 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, - 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, 0x15, 0x68, 0x71, 0x90, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x14, 0x80, 0x03, 0x91, 0x06, 0x15, 0x30, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x01, 0x19, 0xa1, 0x20, 0x03, 0x00, 0x00, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x30, 0x20, 0xa8, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0x94, 0x00, 0x3f, 0x22, 0xe8, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, 0x19, 0xa1, 0x00, 0x16, 0x20, 0x0c, - 0x08, 0x0c, 0xde, 0x2e, 0x00, 0x1e, 0xa8, 0x04, 0x90, 0x05, 0x01, 0x10, - 0x20, 0x48, 0x0c, 0x38, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, - 0x00, 0x10, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, - 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, 0x11, 0xb8, 0x70, 0x90, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x98, 0x60, 0x14, 0x20, 0x48, 0x2c, 0x78, - 0x08, 0x0c, 0x9d, 0x4c, 0x01, 0xa8, 0x70, 0x7c, 0xaa, 0x74, 0x92, 0x06, - 0x11, 0x30, 0x70, 0x80, 0xaa, 0x78, 0x92, 0x06, 0x11, 0x10, 0x08, 0x0c, - 0x32, 0x50, 0x08, 0x0c, 0xb6, 0xdc, 0x00, 0x20, 0x08, 0x0c, 0xbc, 0xb6, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, 0x00, 0x05, - 0x70, 0x60, 0xaa, 0x78, 0x92, 0x06, 0x0d, 0x78, 0x0c, 0x80, 0x00, 0x96, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, - 0x15, 0x50, 0x70, 0x90, 0x90, 0x86, 0x00, 0x04, 0x15, 0x30, 0x60, 0x14, - 0x20, 0x48, 0x2c, 0x78, 0x08, 0x0c, 0x9d, 0x4c, 0x05, 0xf0, 0x70, 0x7c, - 0xaa, 0xcc, 0x92, 0x06, 0x11, 0x80, 0x70, 0x80, 0xaa, 0xd0, 0x92, 0x06, - 0x11, 0x60, 0x08, 0x0c, 0x32, 0x50, 0x00, 0x16, 0xa9, 0x98, 0xaa, 0xb0, - 0x92, 0x84, 0x10, 0x00, 0xc0, 0xfd, 0x08, 0x0c, 0x57, 0x84, 0x00, 0x1e, - 0x00, 0x10, 0x08, 0x0c, 0x55, 0x6f, 0x08, 0x0c, 0xd0, 0xd8, 0x05, 0x08, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, - 0x00, 0x80, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xb8, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0x55, 0x6f, 0x1d, 0x70, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, - 0x00, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x04, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa8, 0x67, 0x01, 0x39, 0x08, 0x0c, 0x6e, 0x9f, - 0x01, 0x2e, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, - 0x00, 0x05, 0x70, 0x60, 0xaa, 0xd0, 0x92, 0x06, 0x09, 0x30, 0x08, 0x88, - 0x00, 0x16, 0x00, 0x26, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x78, 0xa9, 0x38, - 0xaa, 0x34, 0x21, 0x00, 0x92, 0x05, 0x01, 0x50, 0xa8, 0x90, 0x91, 0x06, - 0x11, 0x18, 0xa8, 0x8c, 0x92, 0x06, 0x01, 0x20, 0xa9, 0x92, 0xaa, 0x8e, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0xd6, 0x00, 0x36, 0x08, 0x0c, 0xd0, 0xd8, 0x09, 0x04, 0xd7, 0x16, - 0x00, 0x96, 0x63, 0x14, 0x23, 0x48, 0xa8, 0x7a, 0xa9, 0x82, 0x92, 0x9e, - 0x40, 0x00, 0x15, 0x80, 0x63, 0x10, 0x00, 0xc6, 0x23, 0x58, 0x20, 0x09, - 0x00, 0x00, 0xa8, 0x68, 0xd0, 0xf4, 0x11, 0x40, 0x08, 0x0c, 0x69, 0x44, - 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, - 0xaa, 0x96, 0xa9, 0x9a, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0x8b, - 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x35, 0x20, 0xa0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0x8b, - 0x00, 0xce, 0x00, 0x90, 0xaa, 0x96, 0x39, 0x18, 0x93, 0x98, 0x00, 0x07, - 0x23, 0x1c, 0x60, 0x04, 0x90, 0x86, 0x00, 0x16, 0x01, 0x10, 0xa8, 0x9b, - 0x00, 0x04, 0xab, 0xa2, 0x63, 0x10, 0x23, 0x58, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0xa8, 0x9e, 0xa8, 0x68, 0xc0, 0xf4, 0xa8, 0x6a, 0x08, 0x0c, - 0x6e, 0x92, 0x60, 0x17, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0xde, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xb6, - 0x00, 0x96, 0x00, 0xf6, 0x62, 0x14, 0x22, 0x48, 0x62, 0x10, 0x22, 0x58, - 0x20, 0x79, 0x02, 0x60, 0x90, 0x96, 0x00, 0x00, 0x11, 0xa0, 0xb8, 0x14, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x0e, 0x08, 0x0c, 0x28, 0x73, 0x21, 0x18, - 0x83, 0x1f, 0x93, 0x9c, 0xff, 0x00, 0x78, 0x38, 0x90, 0x84, 0x00, 0xff, - 0x93, 0x1d, 0x7c, 0x3c, 0x20, 0x11, 0x80, 0x18, 0x08, 0x0c, 0x4c, 0x44, - 0x00, 0xa8, 0x90, 0x96, 0x00, 0x01, 0x11, 0x48, 0x89, 0xff, 0x01, 0x80, - 0xa8, 0x9b, 0x00, 0x0d, 0x78, 0x38, 0xa8, 0xa6, 0x78, 0x3c, 0xa8, 0xaa, - 0x00, 0x48, 0x90, 0x96, 0x00, 0x02, 0x11, 0x30, 0xa8, 0x9b, 0x00, 0x0d, - 0x78, 0x38, 0xa8, 0xa6, 0x78, 0x3c, 0xa8, 0xaa, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0x26, 0x00, 0x16, 0x91, 0x86, 0x00, 0x35, 0x01, 0x10, 0x6a, 0x38, - 0x00, 0x08, 0x6a, 0x2c, 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0xf0, 0x22, 0x60, - 0x61, 0x20, 0x91, 0x86, 0x00, 0x03, 0x01, 0x18, 0x91, 0x86, 0x00, 0x06, - 0x11, 0x90, 0x68, 0x38, 0x92, 0x06, 0x01, 0x40, 0x68, 0x3c, 0x92, 0x06, - 0x11, 0x60, 0x61, 0x08, 0x68, 0x38, 0x91, 0x06, 0x11, 0x40, 0x00, 0x20, - 0x60, 0x08, 0x69, 0x3c, 0x91, 0x06, 0x11, 0x18, 0x60, 0x10, 0x69, 0x10, - 0x91, 0x06, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x0c, 0xc8, 0xa9, 0x74, 0xd1, 0xcc, 0x01, 0x98, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x8e, 0x00, 0x02, 0x11, 0x70, 0xa9, 0xa8, 0x91, 0x8c, - 0x00, 0x0f, 0x91, 0x8e, 0x00, 0x01, 0x11, 0x40, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc7, 0x8b, - 0x00, 0x05, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x00, 0x10, 0x00, 0x36, - 0x90, 0x1e, 0x04, 0x99, 0x01, 0xe0, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xc8, - 0x08, 0x0c, 0xd2, 0xc3, 0x60, 0x37, 0x40, 0x00, 0x60, 0x14, 0x60, 0x17, - 0x00, 0x00, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0x08, 0x0c, 0xd2, 0xe0, - 0x11, 0x18, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x40, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x77, 0x00, 0x00, 0x83, 0xff, 0x11, 0x29, 0x08, 0x0c, 0x6e, 0x9f, - 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, 0xa8, 0x80, 0xd0, 0xb4, 0x01, 0x28, - 0xa8, 0x7b, 0x00, 0x06, 0xc0, 0xec, 0xa8, 0x82, 0x00, 0x48, 0xd0, 0xbc, - 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x02, 0x00, 0x20, 0xa8, 0x7b, 0x00, 0x05, - 0x08, 0x0c, 0xd3, 0xd4, 0xa8, 0x77, 0x00, 0x00, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xec, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xf4, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0xe4, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, - 0x00, 0xbe, 0x20, 0x21, 0x00, 0x07, 0x08, 0x0c, 0x4d, 0xfb, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x05, 0x0c, 0x51, 0x1d, 0x81, 0x00, 0x05, 0x20, 0x01, - 0x19, 0x86, 0x20, 0x04, 0x60, 0x1a, 0x00, 0x05, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x42, 0x00, 0x05, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x04, - 0x9a, 0xb1, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x84, 0x01, 0xe0, - 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x79, 0x19, 0xe8, - 0x20, 0x71, 0x18, 0x00, 0x20, 0x61, 0x01, 0x00, 0x08, 0x0c, 0x93, 0xe2, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x01, 0x2e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, - 0x00, 0x1b, 0x00, 0x6e, 0x00, 0xbe, 0x00, 0x05, 0xd8, 0x46, 0xdf, 0x8d, - 0xe1, 0x02, 0xd8, 0x46, 0xd8, 0x46, 0xd8, 0x46, 0xd8, 0x46, 0xd8, 0x46, - 0xd8, 0x7d, 0xe1, 0x86, 0xd8, 0x46, 0xd8, 0x46, 0xd8, 0x46, 0xd8, 0x46, - 0xd8, 0x46, 0xd8, 0x46, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x66, 0x60, 0x00, - 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x13, 0x00, 0x6e, - 0x00, 0x05, 0xd8, 0x61, 0xe6, 0xd5, 0xd8, 0x61, 0xd8, 0x61, 0xd8, 0x61, - 0xd8, 0x61, 0xd8, 0x61, 0xd8, 0x61, 0xe6, 0x82, 0xe7, 0x29, 0xd8, 0x61, - 0xed, 0xb4, 0xed, 0xea, 0xed, 0xb4, 0xed, 0xea, 0xd8, 0x61, 0x08, 0x0c, - 0x0d, 0xc5, 0x60, 0x00, 0x90, 0x82, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0xc5, - 0x60, 0x00, 0x00, 0x0a, 0x00, 0x05, 0xd8, 0x7b, 0xe3, 0x64, 0xe4, 0x33, - 0xe4, 0x56, 0xe5, 0x16, 0xd8, 0x7b, 0xe5, 0xf5, 0xe5, 0x9e, 0xe1, 0x92, - 0xe6, 0x58, 0xe6, 0x6d, 0xd8, 0x7b, 0xd8, 0x7b, 0xd8, 0x7b, 0xd8, 0x7b, - 0xd8, 0x7b, 0x08, 0x0c, 0x0d, 0xc5, 0x91, 0xb2, 0x00, 0x53, 0x1a, 0x0c, - 0x0d, 0xc5, 0x21, 0x00, 0x91, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xdc, 0xfd, - 0x00, 0x02, 0xd8, 0xc7, 0xda, 0xcb, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xda, 0xd4, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xd8, 0xc9, 0xd9, 0x2c, 0xd9, 0x3b, 0xd9, 0x9f, 0xd9, 0xca, 0xda, 0x43, - 0xda, 0xb6, 0xd8, 0xc7, 0xd8, 0xc7, 0xda, 0xd7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xda, 0xec, 0xda, 0xf9, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, - 0xd8, 0xc7, 0xdb, 0x9f, 0xd8, 0xc7, 0xd8, 0xc7, 0xdb, 0xb3, 0xd8, 0xc7, - 0xd8, 0xc7, 0xdb, 0x6e, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xdb, 0xcb, - 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xdc, 0x48, 0xd8, 0xc7, 0xd8, 0xc7, - 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xd8, 0xc7, 0xdc, 0xc5, 0x08, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0x6a, 0x61, 0x11, 0x50, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xcc, 0x11, 0x28, 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, - 0x00, 0x08, 0x11, 0x40, 0x60, 0x07, 0x00, 0x09, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x17, 0x00, 0x00, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, 0x69, 0xfd, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x62, 0x10, - 0x22, 0x58, 0xba, 0xa0, 0x00, 0x26, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, - 0x96, 0xa4, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x95, 0x77, 0x2c, 0x08, - 0x08, 0x0c, 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x66, 0x10, 0x26, 0x58, 0x08, 0x0c, - 0x67, 0x33, 0xbe, 0x04, 0x96, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, - 0x12, 0x68, 0x00, 0x16, 0x00, 0x26, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, - 0xba, 0xa0, 0x00, 0xbe, 0x2c, 0x08, 0x08, 0x0c, 0xf0, 0x15, 0x00, 0x2e, - 0x00, 0x1e, 0x11, 0x78, 0x08, 0x0c, 0xe8, 0x4e, 0x19, 0x04, 0xd9, 0x97, - 0x08, 0x0c, 0xe7, 0xea, 0x11, 0x20, 0x60, 0x07, 0x00, 0x08, 0x08, 0x04, - 0xda, 0xc4, 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, - 0xea, 0xb9, 0x01, 0x28, 0x08, 0x0c, 0xe8, 0x4e, 0x0d, 0x78, 0x08, 0x04, - 0xd9, 0x97, 0x60, 0x17, 0x19, 0x00, 0x0c, 0x88, 0x08, 0x0c, 0x33, 0x74, - 0x19, 0x04, 0xdc, 0xfa, 0x61, 0x06, 0x08, 0x0c, 0xe7, 0x8e, 0x60, 0x07, - 0x00, 0x06, 0x08, 0x04, 0xda, 0xc4, 0x60, 0x07, 0x00, 0x07, 0x08, 0x04, - 0xda, 0xc4, 0x08, 0x0c, 0xee, 0x26, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, - 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, 0x00, 0xd6, 0x66, 0x10, 0x26, 0x58, - 0xbe, 0x04, 0x96, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x12, 0x20, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x66, 0x56, 0x96, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, 0x01, 0x88, 0x96, 0x86, 0x00, 0x04, - 0x01, 0x70, 0xbe, 0x04, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, 0x00, 0x06, - 0x01, 0x40, 0x96, 0x86, 0x00, 0x04, 0x01, 0x28, 0x96, 0x86, 0x00, 0x05, - 0x01, 0x10, 0x00, 0xde, 0x04, 0x80, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, - 0x70, 0x34, 0x90, 0x84, 0x00, 0x03, 0x11, 0x40, 0x70, 0x34, 0x90, 0x82, - 0x00, 0x14, 0x02, 0x20, 0x70, 0x30, 0x90, 0x84, 0x00, 0x03, 0x01, 0x30, - 0x00, 0xee, 0x60, 0x17, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x07, 0x00, 0xb0, - 0x00, 0xee, 0x08, 0x0c, 0xe8, 0xb2, 0x11, 0x90, 0x96, 0x86, 0x00, 0x06, - 0x11, 0x40, 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, 0x90, 0x0e, - 0x08, 0x0c, 0x32, 0x99, 0x00, 0x2e, 0x08, 0x0c, 0x67, 0xbf, 0x60, 0x07, - 0x00, 0x0a, 0x00, 0xde, 0x08, 0x04, 0xda, 0xc4, 0x60, 0x07, 0x00, 0x0b, - 0x00, 0xde, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd7, 0xf8, 0x60, 0x07, 0x00, 0x01, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, - 0xee, 0x26, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, - 0xdc, 0xfa, 0x20, 0x71, 0x02, 0x60, 0x70, 0x34, 0x90, 0xb4, 0x00, 0x03, - 0x19, 0x48, 0x90, 0xb2, 0x00, 0x14, 0x0a, 0x30, 0x70, 0x30, 0x90, 0x84, - 0x00, 0x03, 0x19, 0x10, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, 0x96, 0x86, - 0x07, 0x07, 0x09, 0xe8, 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, - 0x90, 0x0e, 0x08, 0x0c, 0x32, 0x99, 0x00, 0x2e, 0x60, 0x07, 0x00, 0x0c, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xef, 0xf4, 0x08, 0x04, 0xda, 0xc4, - 0x08, 0x0c, 0x6a, 0x61, 0x11, 0x40, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x11, 0x10, 0x08, 0x04, - 0xd8, 0xd6, 0x08, 0x0c, 0x69, 0xfd, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, - 0x96, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x06, 0xc8, 0x11, 0x38, - 0x00, 0x26, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0x96, 0x00, 0x2e, - 0x00, 0x50, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x04, - 0x01, 0x20, 0x96, 0x86, 0x00, 0x06, 0x19, 0x04, 0xd9, 0x97, 0x08, 0x0c, - 0xe8, 0xbf, 0x11, 0x20, 0x60, 0x07, 0x00, 0x0e, 0x08, 0x04, 0xda, 0xc4, - 0x00, 0x46, 0x64, 0x10, 0x24, 0x58, 0xbc, 0xa0, 0x00, 0x46, 0x08, 0x0c, - 0x32, 0x50, 0x08, 0x0c, 0xd7, 0xf8, 0x00, 0x4e, 0x00, 0x16, 0x90, 0x06, - 0x20, 0x09, 0x18, 0x48, 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x48, 0x20, 0x09, - 0x00, 0x29, 0x08, 0x0c, 0xec, 0x31, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, - 0xc0, 0xe5, 0xb8, 0x02, 0x00, 0x1e, 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, - 0x08, 0x04, 0xda, 0xc4, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x66, 0x56, - 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, 0x02, 0x70, 0x08, 0x0c, 0xc3, 0x65, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x90, 0x05, 0x01, 0x68, - 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x82, 0x00, 0x04, 0x0a, 0x04, - 0xd9, 0x97, 0x96, 0x82, 0x00, 0x07, 0x0a, 0x04, 0xd9, 0xf3, 0x08, 0x04, - 0xd9, 0x97, 0x60, 0x17, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, - 0xda, 0xc4, 0x08, 0x0c, 0x6a, 0x61, 0x11, 0x40, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x11, 0x10, - 0x08, 0x04, 0xd8, 0xd6, 0x08, 0x0c, 0x69, 0xfd, 0x66, 0x10, 0x26, 0x58, - 0xbe, 0x04, 0x96, 0x84, 0x00, 0xff, 0x00, 0x06, 0x00, 0x16, 0x90, 0x8e, - 0x00, 0x01, 0x01, 0x18, 0x90, 0x8e, 0x00, 0x00, 0x11, 0x18, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x80, 0x00, 0x1e, 0x00, 0x0e, 0x90, 0x82, 0x00, 0x06, - 0x06, 0xa0, 0x01, 0x50, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, - 0x00, 0x04, 0x01, 0x20, 0x96, 0x86, 0x00, 0x06, 0x19, 0x04, 0xd9, 0x97, - 0x08, 0x0c, 0xe8, 0xed, 0x11, 0x38, 0x08, 0x0c, 0xe7, 0xea, 0x11, 0x20, - 0x60, 0x07, 0x00, 0x10, 0x08, 0x04, 0xda, 0xc4, 0x00, 0x46, 0x64, 0x10, - 0x24, 0x58, 0xbc, 0xa0, 0x00, 0x46, 0x08, 0x0c, 0x32, 0x50, 0x08, 0x0c, - 0xd7, 0xf8, 0x00, 0x4e, 0x00, 0x16, 0x90, 0x06, 0x20, 0x09, 0x18, 0x48, - 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x48, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, - 0xec, 0x31, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xc0, 0xe5, 0xb8, 0x02, - 0x00, 0x1e, 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, 0x04, 0x48, 0x08, 0x0c, - 0xea, 0xb9, 0x01, 0x98, 0x00, 0x16, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, - 0x00, 0x02, 0x01, 0x60, 0x91, 0x86, 0x00, 0x03, 0x01, 0x48, 0x00, 0x1e, - 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, 0x09, 0x20, - 0x08, 0x04, 0xd9, 0x97, 0x00, 0x1e, 0x60, 0x17, 0x19, 0x00, 0x60, 0x07, - 0x00, 0x09, 0x00, 0x70, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, - 0x08, 0x0c, 0xee, 0x26, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, 0xde, 0xcb, - 0x19, 0x04, 0xd9, 0x97, 0x60, 0x07, 0x00, 0x12, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x60, 0x07, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x0c, 0xb0, 0x60, 0x07, 0x00, 0x05, 0x0c, 0x68, 0x08, 0x0c, - 0xee, 0x26, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, - 0xdc, 0xfa, 0x08, 0x0c, 0xde, 0xcb, 0x19, 0x04, 0xd9, 0x97, 0x60, 0x07, - 0x00, 0x20, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, - 0x60, 0x07, 0x00, 0x23, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0xee, 0x26, 0x19, 0x04, - 0xdc, 0xfa, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, - 0xde, 0xcb, 0x19, 0x04, 0xd9, 0x97, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, - 0x20, 0x71, 0x02, 0x60, 0x2c, 0x08, 0x20, 0x11, 0x18, 0x20, 0x22, 0x14, - 0x70, 0x3c, 0x92, 0x06, 0x11, 0xe0, 0x20, 0x11, 0x18, 0x1f, 0x22, 0x14, - 0x70, 0x38, 0x90, 0x84, 0x00, 0xff, 0x92, 0x06, 0x11, 0xa0, 0x72, 0x40, - 0x08, 0x0c, 0xd0, 0xc6, 0x05, 0x70, 0x22, 0x60, 0x60, 0x08, 0x90, 0x86, - 0xff, 0xff, 0x01, 0x20, 0x72, 0x44, 0x60, 0x08, 0x92, 0x06, 0x15, 0x28, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x07, 0x15, 0x08, 0x08, 0x0c, 0xb2, 0xd3, - 0x04, 0xa0, 0x72, 0x44, 0x92, 0x86, 0xff, 0xff, 0x01, 0x80, 0x2c, 0x08, - 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0xb0, 0x22, 0x60, 0x72, 0x40, 0x60, 0x08, - 0x92, 0x06, 0x11, 0x88, 0x60, 0x10, 0x91, 0x90, 0x00, 0x04, 0x22, 0x14, - 0x92, 0x06, 0x01, 0xb8, 0x00, 0x50, 0x72, 0x40, 0x2c, 0x08, 0x90, 0x06, - 0x08, 0x0c, 0xeb, 0xfb, 0x11, 0x80, 0x72, 0x44, 0x92, 0x86, 0xff, 0xff, - 0x01, 0xb0, 0x21, 0x60, 0x60, 0x07, 0x00, 0x26, 0x60, 0x17, 0x17, 0x00, - 0x72, 0x14, 0x92, 0x96, 0xff, 0xff, 0x11, 0x80, 0x60, 0x07, 0x00, 0x25, - 0x00, 0x68, 0x60, 0x20, 0x90, 0x86, 0x00, 0x07, 0x1d, 0x80, 0x60, 0x04, - 0x90, 0x86, 0x00, 0x24, 0x11, 0x10, 0x08, 0x0c, 0xb2, 0xd3, 0x21, 0x60, - 0x60, 0x07, 0x00, 0x25, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x66, 0x56, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, - 0x20, 0x11, 0x02, 0x76, 0x08, 0x0c, 0xc3, 0x65, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x01, 0x5e, 0x01, 0x20, 0x60, 0x07, 0x00, 0x31, 0x08, 0x04, - 0xda, 0xc4, 0x08, 0x0c, 0xbf, 0x7b, 0x08, 0x0c, 0x76, 0x37, 0x11, 0x90, - 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, 0x08, 0x0c, 0x76, 0x51, 0x11, 0x38, - 0x08, 0x0c, 0x79, 0x32, 0x08, 0x0c, 0x61, 0x2e, 0x08, 0x0c, 0x75, 0x63, - 0x00, 0x10, 0x08, 0x0c, 0x76, 0x0f, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, - 0x00, 0x05, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, - 0xde, 0xcb, 0x19, 0x04, 0xd9, 0x97, 0x61, 0x06, 0x08, 0x0c, 0xde, 0xe7, - 0x11, 0x20, 0x60, 0x07, 0x00, 0x2b, 0x08, 0x04, 0xda, 0xc4, 0x60, 0x07, - 0x00, 0x2c, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, 0xee, 0x26, 0x19, 0x04, - 0xdc, 0xfa, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, 0x08, 0x0c, - 0xde, 0xcb, 0x19, 0x04, 0xd9, 0x97, 0x61, 0x06, 0x08, 0x0c, 0xde, 0xec, - 0x11, 0x20, 0x60, 0x07, 0x00, 0x2e, 0x08, 0x04, 0xda, 0xc4, 0x60, 0x07, - 0x00, 0x2f, 0x08, 0x04, 0xda, 0xc4, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, - 0xdc, 0xfa, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x60, 0x10, 0x20, 0x58, - 0xb9, 0x04, 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x01, 0x58, - 0x91, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, 0x00, 0x06, 0x01, 0x28, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x08, 0x04, 0xda, 0xcb, 0x08, 0x0c, - 0x57, 0xd9, 0xd0, 0xe4, 0x09, 0x04, 0xdc, 0x45, 0x20, 0x71, 0x02, 0x6c, - 0x70, 0x10, 0x60, 0x3a, 0x70, 0x14, 0x60, 0x3e, 0x71, 0x08, 0x72, 0x0c, - 0x08, 0x0c, 0x6a, 0x9f, 0x01, 0x40, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, - 0x91, 0x06, 0x11, 0x18, 0xb8, 0x14, 0x92, 0x06, 0x05, 0x10, 0x08, 0x0c, - 0x6a, 0x9b, 0x15, 0xb8, 0x20, 0x69, 0x18, 0x00, 0x68, 0x80, 0x92, 0x06, - 0x15, 0x90, 0x68, 0x7c, 0x91, 0x06, 0x15, 0x78, 0x72, 0x10, 0x08, 0x0c, - 0xd0, 0xc6, 0x05, 0x90, 0x08, 0x0c, 0xdd, 0xb8, 0x05, 0x78, 0x08, 0x0c, - 0xec, 0xad, 0x05, 0x60, 0x62, 0x2e, 0x60, 0x07, 0x00, 0x36, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x72, 0x14, 0x92, 0x86, 0xff, 0xff, - 0x01, 0x50, 0x08, 0x0c, 0xd0, 0xc6, 0x01, 0xc0, 0x92, 0x80, 0x00, 0x02, - 0x20, 0x04, 0x71, 0x10, 0x91, 0x06, 0x11, 0x90, 0x08, 0xe0, 0x72, 0x10, - 0x2c, 0x08, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0xeb, 0xfb, 0x2c, 0x10, - 0x21, 0x60, 0x01, 0x40, 0x08, 0x90, 0x60, 0x07, 0x00, 0x37, 0x60, 0x2f, - 0x00, 0x09, 0x60, 0x17, 0x15, 0x00, 0x08, 0xb8, 0x60, 0x07, 0x00, 0x37, - 0x60, 0x2f, 0x00, 0x03, 0x60, 0x17, 0x17, 0x00, 0x08, 0x80, 0x60, 0x07, - 0x00, 0x12, 0x08, 0x68, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x90, 0x86, 0x00, 0x06, 0x19, 0x04, 0xda, 0xcb, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x08, 0x0c, 0x57, 0xd9, 0xd0, 0xe4, 0x09, 0x04, 0xdc, 0xbd, - 0x20, 0x69, 0x18, 0x00, 0x20, 0x71, 0x02, 0x6c, 0x70, 0x08, 0x60, 0x3a, - 0x72, 0x0c, 0x62, 0x3e, 0x92, 0x86, 0xff, 0xff, 0x11, 0x50, 0x72, 0x08, - 0x00, 0xc6, 0x2c, 0x08, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0xeb, 0xfb, - 0x2c, 0x10, 0x00, 0xce, 0x05, 0xe8, 0x08, 0x0c, 0xd0, 0xc6, 0x05, 0xd0, - 0x71, 0x08, 0x92, 0x80, 0x00, 0x02, 0x20, 0x04, 0x91, 0x06, 0x15, 0xa0, - 0x00, 0xc6, 0x00, 0x26, 0x22, 0x60, 0x08, 0x0c, 0xcc, 0xe6, 0x00, 0x2e, - 0x00, 0xce, 0x71, 0x18, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, - 0x00, 0x01, 0x01, 0x78, 0x91, 0x86, 0x00, 0x05, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x07, 0x11, 0x98, 0x92, 0x80, 0x00, 0x05, 0x20, 0x04, 0x90, 0x05, - 0x01, 0x70, 0x08, 0x0c, 0xdd, 0xb8, 0x09, 0x04, 0xdc, 0x3e, 0x00, 0x56, - 0x75, 0x10, 0x76, 0x14, 0x08, 0x0c, 0xec, 0xc6, 0x00, 0x5e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2f, - 0x00, 0x09, 0x60, 0x17, 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0x78, 0x60, 0x07, 0x00, 0x3b, - 0x60, 0x2f, 0x00, 0x03, 0x60, 0x17, 0x03, 0x00, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0x10, 0x60, 0x07, - 0x00, 0x3b, 0x60, 0x2f, 0x00, 0x0b, 0x60, 0x17, 0x00, 0x00, 0x08, 0x04, - 0xdc, 0x15, 0x00, 0xe6, 0x00, 0x26, 0x08, 0x0c, 0x6a, 0x61, 0x05, 0x50, - 0x08, 0x0c, 0x69, 0xfd, 0x08, 0x0c, 0xee, 0x97, 0x15, 0x18, 0x20, 0x71, - 0x18, 0x00, 0x70, 0xdc, 0x90, 0x85, 0x00, 0x03, 0x70, 0xde, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x72, 0xb0, 0x92, 0x84, 0x00, 0xff, 0x70, 0x7e, - 0x78, 0xe6, 0x92, 0x84, 0xff, 0x00, 0x72, 0x80, 0x92, 0x05, 0x70, 0x82, - 0x78, 0xea, 0x00, 0xfe, 0x70, 0xe7, 0x00, 0x00, 0x08, 0x0c, 0x6a, 0x9f, - 0x01, 0x20, 0x20, 0x11, 0x1a, 0x01, 0x20, 0x13, 0x07, 0xd0, 0xd0, 0xac, - 0x11, 0x28, 0x08, 0x0c, 0x30, 0x00, 0x00, 0x10, 0x08, 0x0c, 0xee, 0xcb, - 0x00, 0x2e, 0x00, 0xee, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x04, 0xda, 0xca, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, 0xdd, 0x11, - 0xdd, 0x3f, 0xdd, 0x50, 0xdd, 0x11, 0xdd, 0x11, 0xdd, 0x13, 0xdd, 0x61, - 0xdd, 0x11, 0xdd, 0x11, 0xdd, 0x11, 0xdd, 0x2d, 0xdd, 0x11, 0xdd, 0x11, - 0xdd, 0x11, 0xdd, 0x6c, 0xdd, 0x82, 0xdd, 0xb3, 0xdd, 0x11, 0x08, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0xee, 0x26, 0x1d, 0x20, 0x08, 0x0c, 0x33, 0x74, - 0x1d, 0x08, 0x70, 0x38, 0x60, 0x16, 0x60, 0x07, 0x00, 0x45, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x00, 0x05, 0x08, 0x0c, 0x32, 0x50, - 0x08, 0x0c, 0xd7, 0xf8, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x95, 0x47, 0x00, 0x05, 0x08, 0x0c, 0xee, 0x26, 0x19, 0x50, - 0x08, 0x0c, 0x33, 0x74, 0x19, 0x38, 0x08, 0x0c, 0xde, 0xcb, 0x1d, 0x60, - 0x70, 0x3c, 0x60, 0x16, 0x60, 0x07, 0x00, 0x4a, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x95, 0x47, 0x00, 0x05, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, - 0xdc, 0xfa, 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xee, 0xd4, 0x60, 0x07, - 0x00, 0x47, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, - 0x20, 0x09, 0x00, 0x42, 0x08, 0x0c, 0xee, 0xd4, 0x60, 0x07, 0x00, 0x47, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x08, 0x0c, 0x33, 0x74, 0x19, 0x04, 0xdc, 0xfa, 0x20, 0x09, - 0x00, 0x46, 0x08, 0x0c, 0xee, 0xd4, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x24, 0x20, 0x04, 0x90, 0x82, 0x00, 0xe1, 0x12, 0x68, - 0x08, 0x0c, 0xdd, 0xd5, 0x09, 0x04, 0xdc, 0xfa, 0x60, 0x07, 0x00, 0x4e, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x60, 0x07, 0x00, 0x12, 0x0c, 0xb0, 0x60, 0x07, 0x00, 0x4f, - 0x60, 0x17, 0x00, 0x00, 0x71, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x81, 0xff, - 0x05, 0x08, 0x91, 0x86, 0x00, 0x01, 0x11, 0x60, 0x71, 0x40, 0x20, 0x01, - 0x19, 0xbe, 0x20, 0x04, 0x91, 0x06, 0x11, 0xb0, 0x71, 0x44, 0x20, 0x01, - 0x19, 0xbf, 0x20, 0x04, 0x91, 0x06, 0x01, 0x90, 0x91, 0x86, 0x00, 0x02, - 0x11, 0x68, 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x60, 0x10, - 0x00, 0x96, 0x20, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc3, 0x79, - 0x00, 0x9e, 0x01, 0x10, 0x60, 0x17, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x60, 0x07, - 0x00, 0x50, 0x70, 0x3c, 0x60, 0x16, 0x0c, 0xa0, 0x00, 0x16, 0x00, 0xe6, - 0x20, 0x71, 0x02, 0x60, 0x00, 0xb6, 0x00, 0xc6, 0x22, 0x60, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0xcc, 0xd0, 0x84, 0x01, 0x50, 0x71, 0x28, 0x60, 0x44, - 0x91, 0x06, 0x11, 0x20, 0x71, 0x2c, 0x60, 0x48, 0x91, 0x06, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0xee, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x96, 0x00, 0x86, - 0x00, 0xe6, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x01, 0x19, 0xa1, - 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x10, 0x27, 0x05, 0xa0, 0x29, 0x00, - 0x60, 0x16, 0x70, 0x90, 0x80, 0x04, 0xa8, 0x16, 0x90, 0x8a, 0x00, 0x1e, - 0x02, 0xd0, 0xa8, 0x33, 0x00, 0x1e, 0x20, 0xa9, 0x00, 0x1e, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, - 0x19, 0xa1, 0x00, 0x16, 0x20, 0x0c, 0x04, 0x71, 0x00, 0x1e, 0x81, 0xff, - 0x01, 0xb8, 0x29, 0x40, 0x08, 0x0c, 0x10, 0x27, 0x01, 0xb0, 0x29, 0x00, - 0xa0, 0x06, 0x21, 0x00, 0x0c, 0x18, 0xa8, 0x32, 0x20, 0xa8, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, - 0x19, 0xa1, 0x00, 0x16, 0x20, 0x0c, 0x00, 0xb1, 0x00, 0x1e, 0x00, 0x00, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x93, - 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0x0f, 0xc0, 0x90, 0x06, - 0x01, 0x2e, 0x01, 0xde, 0x01, 0xce, 0x00, 0xee, 0x00, 0x8e, 0x00, 0x9e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x91, 0x8c, 0xff, 0xff, 0x11, 0xb0, 0x08, 0x0c, 0x23, 0xe2, - 0x20, 0x99, 0x02, 0x6c, 0x20, 0x01, 0x00, 0x14, 0x35, 0x18, 0x93, 0x12, - 0x01, 0x08, 0x12, 0x18, 0x23, 0xa8, 0x40, 0x03, 0x04, 0x00, 0x20, 0xa8, - 0x40, 0x03, 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x23, 0xe2, 0x20, 0x99, - 0x02, 0x60, 0x0c, 0xa8, 0x08, 0x0c, 0x23, 0xe2, 0x20, 0x61, 0x19, 0xa1, - 0x60, 0x04, 0x20, 0x98, 0x60, 0x08, 0x35, 0x18, 0x93, 0x12, 0x01, 0x08, - 0x12, 0x18, 0x23, 0xa8, 0x40, 0x03, 0x00, 0x48, 0x20, 0xa8, 0x40, 0x03, - 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x23, 0xe2, 0x20, 0x99, 0x02, 0x60, - 0x0c, 0xa8, 0x20, 0x61, 0x19, 0xa1, 0x20, 0x19, 0x02, 0x80, 0x33, 0x00, - 0x93, 0x1e, 0x01, 0x10, 0x60, 0x06, 0x00, 0x20, 0x20, 0x01, 0x02, 0x60, - 0x60, 0x06, 0x81, 0x08, 0x21, 0x62, 0x92, 0x92, 0x00, 0x21, 0x92, 0x96, - 0xff, 0xff, 0x62, 0x0a, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x81, 0xff, 0x11, 0xb8, 0x08, 0x0c, 0x23, 0xfa, 0x20, 0xa1, - 0x02, 0x4c, 0x20, 0x01, 0x00, 0x14, 0x35, 0x18, 0x93, 0x12, 0x12, 0x18, - 0x23, 0xa8, 0x40, 0x03, 0x04, 0x18, 0x20, 0xa8, 0x40, 0x03, 0x82, 0xff, - 0x01, 0xf8, 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x23, 0xfa, 0x20, 0xa1, - 0x02, 0x40, 0x0c, 0x98, 0x08, 0x0c, 0x23, 0xfa, 0x20, 0x61, 0x19, 0xa4, - 0x60, 0x04, 0x20, 0xa0, 0x60, 0x08, 0x35, 0x18, 0x93, 0x12, 0x12, 0x18, - 0x23, 0xa8, 0x40, 0x03, 0x00, 0x58, 0x20, 0xa8, 0x40, 0x03, 0x82, 0xff, - 0x01, 0x38, 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x23, 0xfa, 0x20, 0xa1, - 0x02, 0x40, 0x0c, 0x98, 0x20, 0x61, 0x19, 0xa4, 0x20, 0x19, 0x02, 0x60, - 0x34, 0x00, 0x93, 0x1e, 0x01, 0x10, 0x60, 0x06, 0x00, 0x20, 0x20, 0x01, - 0x02, 0x40, 0x60, 0x06, 0x81, 0x08, 0x21, 0x62, 0x92, 0x92, 0x00, 0x21, - 0x92, 0x96, 0xff, 0xff, 0x62, 0x0a, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x66, 0x66, 0x10, - 0x26, 0x58, 0xbe, 0x04, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, - 0x00, 0x06, 0x01, 0x70, 0x96, 0x86, 0x00, 0x04, 0x01, 0x58, 0xbe, 0x04, - 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, 0x00, 0x06, 0x01, 0x28, 0x96, 0x86, - 0x00, 0x04, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x6e, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0xdf, 0x63, 0x00, 0xde, 0x00, 0x05, - 0x00, 0xd6, 0x08, 0x0c, 0xdf, 0x70, 0x15, 0x20, 0x68, 0x0c, 0x90, 0x8c, - 0xff, 0x00, 0x68, 0x20, 0x90, 0x84, 0x00, 0xff, 0x91, 0x15, 0x62, 0x16, - 0x68, 0x24, 0x60, 0x2e, 0xd1, 0xe4, 0x01, 0x30, 0x90, 0x06, 0x08, 0x0c, - 0xef, 0xf4, 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, 0xd1, 0xec, 0x01, 0x80, - 0x69, 0x20, 0x91, 0x8c, 0x00, 0xff, 0x68, 0x24, 0x08, 0x0c, 0x28, 0x73, - 0x11, 0x48, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xef, 0xf4, 0x21, 0x10, - 0x90, 0x0e, 0x08, 0x0c, 0x32, 0x99, 0x00, 0x18, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x08, 0x90, 0x06, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, - 0x08, 0x0c, 0xb3, 0x25, 0x05, 0xa8, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, - 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, - 0x28, 0x73, 0x15, 0x78, 0x08, 0x0c, 0x66, 0xb9, 0x15, 0x60, 0xbe, 0x12, - 0xbd, 0x16, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x2b, 0x00, 0x60, 0x12, - 0x08, 0x0c, 0xee, 0x26, 0x11, 0xd8, 0x08, 0x0c, 0x33, 0x74, 0x11, 0xc0, - 0x08, 0x0c, 0xde, 0xcb, 0x05, 0x10, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x66, 0x6a, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x96, 0x60, 0x17, - 0x00, 0x00, 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x10, - 0x08, 0x0c, 0xb2, 0xd3, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x05, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, - 0x0c, 0xa8, 0x08, 0x0c, 0xb2, 0xd3, 0x90, 0x06, 0x0c, 0x98, 0x20, 0x69, - 0x02, 0x6d, 0x68, 0x00, 0x90, 0x82, 0x00, 0x10, 0x12, 0x28, 0x60, 0x17, - 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x05, - 0x60, 0x17, 0x00, 0x00, 0x20, 0x69, 0x02, 0x6c, 0x68, 0x08, 0x90, 0x84, - 0xff, 0x00, 0x90, 0x86, 0x08, 0x00, 0x11, 0x90, 0x69, 0x04, 0x91, 0x86, - 0x00, 0x18, 0x01, 0x18, 0x91, 0x86, 0x00, 0x14, 0x11, 0x58, 0x81, 0x0f, - 0x68, 0x00, 0x90, 0x84, 0x00, 0xff, 0x91, 0x0d, 0x61, 0x5a, 0x90, 0x8e, - 0x00, 0x14, 0x01, 0x10, 0x90, 0x8e, 0x00, 0x10, 0x00, 0x05, 0x60, 0x04, - 0x90, 0xb2, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, 0x91, 0xb6, 0x00, 0x13, - 0x11, 0x30, 0x20, 0x08, 0x91, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xe0, 0xd2, - 0x04, 0x0a, 0x91, 0xb6, 0x00, 0x27, 0x01, 0x98, 0x91, 0x86, 0x00, 0x15, - 0x01, 0x18, 0x91, 0x86, 0x00, 0x16, 0x11, 0x48, 0x08, 0x0c, 0xd8, 0x09, - 0x01, 0x28, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, 0x09, 0x04, 0xbc, 0xfd, - 0x00, 0x05, 0x91, 0xb6, 0x00, 0x14, 0x19, 0x0c, 0x0d, 0xc5, 0x20, 0x01, - 0x00, 0x07, 0x08, 0x0c, 0x66, 0x96, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0xdf, 0xfc, 0xdf, 0xfe, - 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfe, 0xe0, 0x0d, 0xe0, 0xcb, - 0xe0, 0x51, 0xe0, 0xcb, 0xe0, 0x79, 0xe0, 0xcb, 0xe0, 0x0d, 0xe0, 0xcb, - 0xe0, 0xc3, 0xe0, 0xcb, 0xe0, 0xc3, 0xe0, 0xcb, 0xe0, 0xcb, 0xdf, 0xfc, - 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, - 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfe, 0xdf, 0xfc, - 0xe0, 0xcb, 0xdf, 0xfc, 0xdf, 0xfc, 0xe0, 0xcb, 0xdf, 0xfc, 0xe0, 0xc8, - 0xe0, 0xcb, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xe0, 0xcb, - 0xe0, 0xcb, 0xdf, 0xfc, 0xe0, 0xcb, 0xe0, 0xcb, 0xdf, 0xfc, 0xe0, 0x08, - 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xdf, 0xfc, 0xe0, 0xc7, 0xe0, 0xcb, - 0xdf, 0xfc, 0xdf, 0xfc, 0xe0, 0xcb, 0xe0, 0xcb, 0xdf, 0xfc, 0xdf, 0xfc, - 0xdf, 0xfc, 0xdf, 0xfc, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0xd7, 0xfb, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x9a, 0xb1, - 0x08, 0x04, 0xe0, 0xd1, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, 0x08, 0x04, - 0xe0, 0xcb, 0x08, 0x0c, 0x6a, 0x9b, 0x19, 0x04, 0xe0, 0xcb, 0x90, 0x06, - 0x08, 0x0c, 0x66, 0x56, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, 0x90, 0x86, - 0x00, 0xff, 0x11, 0x40, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x78, 0xa8, - 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x00, 0xb8, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xc0, 0x90, 0x05, 0x09, 0x04, 0xe0, 0xcb, 0x08, 0x0c, 0x33, 0xa5, - 0x19, 0x04, 0xe0, 0xcb, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x38, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x78, 0xa8, - 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0x6a, 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, - 0x9a, 0xb1, 0x61, 0x10, 0x21, 0x58, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, - 0x88, 0x4b, 0x08, 0x04, 0xe0, 0xd1, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, - 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, 0x01, 0x48, - 0x96, 0x86, 0x00, 0x04, 0x01, 0x30, 0x08, 0x0c, 0x90, 0x31, 0x20, 0x01, - 0x00, 0x04, 0x08, 0x0c, 0x66, 0x96, 0x08, 0x0c, 0xf0, 0x43, 0x09, 0x04, - 0xe0, 0xcb, 0x08, 0x0c, 0x99, 0xa5, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, - 0x66, 0x6a, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x03, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, - 0xe0, 0xd1, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, - 0x11, 0x58, 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, 0x20, 0x58, 0xbb, 0xa0, - 0x20, 0x21, 0x00, 0x06, 0x08, 0x0c, 0x4d, 0xfb, 0x00, 0x4e, 0x00, 0x3e, - 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0xe0, 0xef, 0x66, 0x10, 0x26, 0x58, - 0xbe, 0x04, 0x00, 0x66, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, - 0x00, 0x06, 0x00, 0x6e, 0x01, 0x80, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x66, 0x96, 0x92, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x07, 0x01, 0x18, - 0x90, 0x8e, 0x00, 0x04, 0x11, 0x20, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x66, 0x6a, 0x08, 0x0c, 0x6a, 0x9b, 0x11, 0xf8, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xa4, 0x01, 0xd0, 0xbe, 0x04, 0x96, 0xb4, 0x00, 0xff, - 0x96, 0x86, 0x00, 0x06, 0x01, 0xa0, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, - 0x78, 0xa8, 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x08, 0x04, 0xe0, 0x39, - 0x20, 0x01, 0x00, 0x04, 0x00, 0x30, 0x20, 0x01, 0x00, 0x06, 0x04, 0x49, - 0x00, 0x20, 0x00, 0x18, 0x00, 0x10, 0x08, 0x0c, 0x66, 0x96, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x26, 0x00, 0x00, 0x02, 0xe0, 0xe6, 0xe0, 0xe6, 0xe0, 0xe6, 0xe0, 0xe6, - 0xe0, 0xe6, 0xe0, 0xe8, 0xe0, 0xe6, 0xe0, 0xe8, 0xe0, 0xe6, 0xe0, 0xe6, - 0xe0, 0xe8, 0xe0, 0xe6, 0xe0, 0xe6, 0xe0, 0xe6, 0xe0, 0xe8, 0xe0, 0xe8, - 0xe0, 0xe8, 0xe0, 0xe8, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, - 0x08, 0x0c, 0xb2, 0xd3, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0x16, - 0x00, 0xb6, 0x00, 0xd6, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x00, 0xd1, 0x84, - 0x01, 0x38, 0x08, 0x0c, 0x66, 0x6a, 0x90, 0x06, 0x08, 0x0c, 0x66, 0x56, - 0x08, 0x0c, 0x32, 0x79, 0x00, 0xde, 0x00, 0xbe, 0x00, 0x1e, 0x00, 0x05, - 0x66, 0x10, 0x26, 0x58, 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x90, 0xb2, 0x00, 0x0c, 0x1a, 0x0c, 0x0d, 0xc5, 0x91, 0xb6, 0x00, 0x15, - 0x11, 0x10, 0x00, 0x3b, 0x00, 0x28, 0x91, 0xb6, 0x00, 0x16, 0x19, 0x0c, - 0x0d, 0xc5, 0x00, 0x6b, 0x00, 0x05, 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, - 0xbd, 0x9f, 0xe1, 0x84, 0xbd, 0x9f, 0xe1, 0x6e, 0xe1, 0x2f, 0xbd, 0x9f, - 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, - 0xbd, 0x9f, 0xe1, 0x84, 0xbd, 0x9f, 0xe1, 0x6e, 0xe1, 0x75, 0xbd, 0x9f, - 0xbd, 0x9f, 0xbd, 0x9f, 0xbd, 0x9f, 0x00, 0xf6, 0x08, 0x0c, 0x6a, 0x9b, - 0x11, 0xd8, 0x08, 0x0c, 0xd7, 0xe3, 0x11, 0xc0, 0x60, 0x10, 0x90, 0x5d, - 0x01, 0xa8, 0xb8, 0xc0, 0x90, 0x05, 0x01, 0x90, 0x90, 0x06, 0x08, 0x0c, - 0x66, 0x56, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0x6a, 0x60, 0x23, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, - 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xf0, 0x20, 0x11, 0x02, 0x63, - 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x73, 0x11, 0xb0, - 0x08, 0x0c, 0x67, 0x24, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x80, - 0xb8, 0x10, 0x00, 0x06, 0xb8, 0x14, 0x00, 0x06, 0xb8, 0xc0, 0x00, 0x06, - 0x08, 0x0c, 0x61, 0x48, 0x00, 0x0e, 0xb8, 0xc2, 0x00, 0x0e, 0xb8, 0x16, - 0x00, 0x0e, 0xb8, 0x12, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xfe, 0x00, 0x05, - 0x66, 0x04, 0x96, 0xb6, 0x00, 0x1e, 0x11, 0x10, 0x08, 0x0c, 0xb2, 0xd3, - 0x00, 0x05, 0x08, 0x0c, 0xc1, 0xdc, 0x11, 0x48, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x95, 0x47, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x10, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x08, 0x04, 0xb2, 0xd3, - 0x60, 0x04, 0x90, 0x8a, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, - 0xe1, 0xa9, 0xe1, 0xab, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, - 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, - 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0xe1, 0xa9, 0x08, 0x0c, - 0x0d, 0xc5, 0x00, 0x96, 0x00, 0xb6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x00, 0x46, 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, 0xb8, 0xbc, 0x90, 0x05, - 0x11, 0xa8, 0x61, 0x06, 0x20, 0x71, 0x02, 0x60, 0x74, 0x44, 0x94, 0xa4, - 0xff, 0x00, 0x09, 0x04, 0xe2, 0x11, 0x08, 0x0c, 0xef, 0xe8, 0x11, 0x70, - 0x94, 0x86, 0x20, 0x00, 0x11, 0x58, 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, - 0x02, 0x00, 0x08, 0x0c, 0x8a, 0x50, 0x00, 0x20, 0x90, 0x26, 0x08, 0x0c, - 0xee, 0x6b, 0x0c, 0x38, 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, - 0x60, 0x03, 0x00, 0x07, 0xa8, 0x67, 0x01, 0x0d, 0x90, 0x06, 0xa8, 0x02, - 0xa8, 0x6a, 0xac, 0x8a, 0x2c, 0x00, 0xa8, 0x8e, 0x60, 0x08, 0xa8, 0xe2, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x71, 0x30, 0xa9, 0x7a, 0x00, 0x16, - 0xa8, 0x76, 0xa8, 0x7f, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x87, - 0x00, 0x36, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x1e, 0x08, 0x0c, 0xef, 0xe8, - 0x19, 0x04, 0xe2, 0x71, 0x94, 0x86, 0x20, 0x00, 0x11, 0x30, 0x20, 0x19, - 0x00, 0x17, 0x08, 0x0c, 0xeb, 0xa1, 0x08, 0x04, 0xe2, 0x71, 0x94, 0x86, - 0x02, 0x00, 0x11, 0x20, 0x08, 0x0c, 0xeb, 0x38, 0x08, 0x04, 0xe2, 0x71, - 0x94, 0x86, 0x04, 0x00, 0x01, 0x20, 0x94, 0x86, 0x10, 0x00, 0x19, 0x04, - 0xe2, 0x71, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, 0xeb, 0x53, 0x08, 0x04, - 0xe2, 0x71, 0x20, 0x69, 0x1a, 0x74, 0x6a, 0x00, 0xd2, 0x84, 0x09, 0x04, - 0xe2, 0xdb, 0x92, 0x84, 0x03, 0x00, 0x19, 0x04, 0xe2, 0xd4, 0x68, 0x04, - 0x90, 0x05, 0x09, 0x04, 0xe2, 0xbc, 0x2d, 0x78, 0x60, 0x03, 0x00, 0x07, - 0x08, 0x0c, 0x10, 0x27, 0x09, 0x04, 0xe2, 0x7d, 0x78, 0x00, 0xd0, 0x8c, - 0x11, 0x18, 0x78, 0x04, 0x80, 0x01, 0x78, 0x06, 0x60, 0x17, 0x00, 0x00, - 0x20, 0x01, 0x18, 0x0f, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x04, 0xe2, 0xdf, - 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x67, 0x01, 0x16, 0xa8, 0x6a, 0x60, 0x08, - 0xa8, 0xe2, 0x2c, 0x00, 0xa8, 0x7a, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x71, 0x30, 0xa9, 0xb6, 0xa8, 0x76, 0xb9, 0x28, 0xa9, 0xba, 0xb9, 0x2c, - 0xa9, 0xbe, 0xb9, 0x30, 0xa9, 0xc2, 0xb9, 0x34, 0xa9, 0xc6, 0xa8, 0x83, - 0x00, 0x3d, 0x70, 0x44, 0x90, 0x84, 0x00, 0x03, 0x90, 0x80, 0xe2, 0x79, - 0x20, 0x05, 0xa8, 0x7e, 0x20, 0xa9, 0x00, 0x0a, 0x20, 0x01, 0x02, 0x70, - 0xaa, 0x5c, 0x92, 0x90, 0x00, 0x21, 0x20, 0x09, 0x02, 0x05, 0x20, 0x0b, - 0x00, 0x80, 0x20, 0xe1, 0x00, 0x00, 0xab, 0x60, 0x23, 0xe8, 0x20, 0x98, - 0x22, 0xa0, 0x40, 0x03, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x02, 0x7a, - 0x20, 0x0c, 0xa9, 0xb2, 0x80, 0x00, 0x20, 0x0c, 0xa9, 0xae, 0x08, 0x0c, - 0x6e, 0x9f, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, - 0x00, 0x00, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0x84, 0x01, 0x20, - 0x08, 0x0c, 0x10, 0x0e, 0x19, 0x04, 0xe2, 0x26, 0x60, 0x17, 0xf1, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x0c, 0x00, 0x20, 0x69, 0x02, 0x60, 0x68, 0x48, - 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x12, 0x00, 0x11, 0x98, 0x68, 0x6c, - 0x90, 0x84, 0x00, 0xff, 0x00, 0x16, 0x61, 0x14, 0x91, 0x8c, 0xf7, 0x00, - 0x91, 0x0d, 0x61, 0x16, 0x00, 0x1e, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x43, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x28, - 0x68, 0x68, 0x60, 0x2e, 0x68, 0x6c, 0x60, 0x32, 0x60, 0x17, 0xf2, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0xe2, 0x71, 0x20, 0x01, 0x18, 0x0e, - 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, - 0x4c, 0x44, 0x60, 0x17, 0xf3, 0x00, 0x00, 0x10, 0x60, 0x17, 0xf1, 0x00, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x04, 0xe2, 0x71, 0x60, 0x17, 0xf5, 0x00, - 0x0c, 0x98, 0x60, 0x17, 0xf6, 0x00, 0x08, 0x04, 0xe2, 0x91, 0x60, 0x17, - 0xf2, 0x00, 0x08, 0x04, 0xe2, 0x91, 0xa8, 0x67, 0x01, 0x46, 0xa8, 0x6b, - 0x00, 0x00, 0x60, 0x08, 0xa8, 0x86, 0x2c, 0x00, 0xa8, 0x7a, 0x70, 0x44, - 0x90, 0x84, 0x00, 0x03, 0x90, 0x80, 0xe2, 0x79, 0x20, 0x05, 0xa8, 0x7e, - 0x29, 0x28, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0xa8, 0x76, 0xb8, 0x28, - 0xa8, 0x8a, 0xb8, 0x2c, 0xa8, 0x8e, 0xb8, 0x30, 0xa8, 0x92, 0xb8, 0x34, - 0xa8, 0x96, 0xa8, 0x83, 0x00, 0x3d, 0x20, 0x09, 0x02, 0x05, 0x21, 0x04, - 0x90, 0x85, 0x00, 0x80, 0x20, 0x0a, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x11, - 0x02, 0x10, 0x22, 0x14, 0x92, 0x94, 0x0f, 0xff, 0xaa, 0xa2, 0x92, 0x82, - 0x01, 0x11, 0x1a, 0x0c, 0x0d, 0xc5, 0x82, 0x10, 0x82, 0x1c, 0x20, 0x01, - 0x02, 0x6c, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x29, 0x20, 0xa0, 0x20, 0x11, 0xe3, 0x5b, 0x20, 0x41, 0x00, 0x01, - 0x22, 0x3d, 0x97, 0x84, 0x00, 0xff, 0x93, 0x22, 0x12, 0x08, 0x23, 0x00, - 0x20, 0xa8, 0x40, 0x03, 0x93, 0x1a, 0x05, 0x30, 0x82, 0x10, 0xd7, 0xfc, - 0x11, 0x30, 0x8d, 0x68, 0x2d, 0x0a, 0x20, 0x01, 0x02, 0x60, 0x20, 0x98, - 0x0c, 0x68, 0x29, 0x50, 0x08, 0x0c, 0x10, 0x27, 0x01, 0x70, 0x29, 0x00, - 0xb0, 0x02, 0xa8, 0x67, 0x01, 0x47, 0xa8, 0x6b, 0x00, 0x00, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x88, 0x40, - 0x08, 0xd8, 0x25, 0x48, 0xa8, 0x00, 0x90, 0x2d, 0x01, 0x18, 0x08, 0x0c, - 0x10, 0x40, 0x0c, 0xc8, 0x08, 0x0c, 0x10, 0x40, 0x08, 0x04, 0xe2, 0x7d, - 0x25, 0x48, 0x88, 0x47, 0x98, 0x85, 0x00, 0x46, 0xa8, 0x66, 0x20, 0x09, - 0x02, 0x05, 0x20, 0x0b, 0x00, 0x00, 0x08, 0x0c, 0xeb, 0xd4, 0x08, 0x04, - 0xe2, 0x71, 0x80, 0x10, 0x00, 0x04, 0x80, 0x1a, 0x00, 0x06, 0x80, 0x18, - 0x00, 0x08, 0x80, 0x16, 0x00, 0x0a, 0x80, 0x14, 0x91, 0x86, 0x00, 0x13, - 0x11, 0x60, 0x60, 0x04, 0x90, 0x8a, 0x00, 0x54, 0x1a, 0x0c, 0x0d, 0xc5, - 0x90, 0x82, 0x00, 0x40, 0x0a, 0x0c, 0x0d, 0xc5, 0x20, 0x08, 0x08, 0x04, - 0xe3, 0xea, 0x91, 0x86, 0x00, 0x51, 0x01, 0x08, 0x00, 0x48, 0x08, 0x0c, - 0xd8, 0x09, 0x05, 0x00, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, 0x11, 0xe0, - 0x08, 0x04, 0xe4, 0x33, 0x91, 0x86, 0x00, 0x27, 0x01, 0x90, 0x91, 0x86, - 0x00, 0x48, 0x01, 0x28, 0x91, 0x86, 0x00, 0x14, 0x01, 0x60, 0x19, 0x0c, - 0x0d, 0xc5, 0x08, 0x0c, 0xd8, 0x09, 0x01, 0x60, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x04, 0x19, 0x0c, 0x0d, 0xc5, 0x08, 0x04, 0xe5, 0x16, 0x60, 0x04, - 0x90, 0x82, 0x00, 0x40, 0x20, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0xb3, 0x6d, - 0x00, 0x05, 0xe3, 0xb1, 0xe3, 0xb3, 0xe3, 0xb3, 0xe3, 0xda, 0xe3, 0xb1, - 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, - 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, - 0xe3, 0xb1, 0xe3, 0xb1, 0xe3, 0xb1, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x36, 0x00, 0x96, 0x60, 0x14, - 0x90, 0x4d, 0x01, 0xd8, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xc0, 0x60, 0x03, - 0x00, 0x02, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x11, 0x78, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xeb, 0xd4, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x18, 0x90, 0x05, 0x11, 0x20, 0x20, 0x01, - 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x60, 0x03, 0x00, 0x07, 0x00, 0x9e, - 0x00, 0x3e, 0x00, 0x05, 0x00, 0x96, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, - 0x9a, 0xb1, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x20, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0x10, 0x40, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0x02, 0xe3, 0xff, 0xe4, 0x16, 0xe4, 0x01, 0xe4, 0x2d, 0xe3, 0xff, - 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, - 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, - 0xe3, 0xff, 0xe3, 0xff, 0xe3, 0xff, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x96, - 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xb4, - 0x01, 0x38, 0x60, 0x03, 0x00, 0x07, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, - 0xb3, 0x52, 0x00, 0x10, 0x60, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xd0, 0xd8, - 0x01, 0x38, 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, 0xa9, 0x7c, 0x00, 0x9e, - 0xd1, 0xec, 0x11, 0x38, 0x08, 0x0c, 0x8a, 0x25, 0x08, 0x0c, 0xb2, 0xd3, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x08, 0x0c, 0xee, 0x2f, 0x0d, 0xb0, - 0x0c, 0xc8, 0x08, 0x0c, 0x99, 0xa5, 0x20, 0x09, 0x00, 0x41, 0x08, 0x04, - 0xe5, 0x9e, 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe4, 0x4a, 0xe4, 0x4c, - 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, - 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, - 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4d, 0xe4, 0x4a, 0xe4, 0x4a, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0x8a, 0x25, - 0x00, 0xde, 0x08, 0x0c, 0xee, 0x87, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, - 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, - 0xe4, 0x6f, 0xe4, 0xde, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, - 0xe4, 0xde, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0xe4, 0x6d, 0x08, 0x0c, - 0x0d, 0xc5, 0x20, 0x01, 0x01, 0x05, 0x20, 0x04, 0x90, 0x84, 0x18, 0x00, - 0x01, 0xc8, 0x20, 0x01, 0x01, 0x32, 0x20, 0x0c, 0x20, 0x01, 0x01, 0x31, - 0x20, 0x04, 0x91, 0x05, 0x19, 0x04, 0xe4, 0xde, 0x20, 0x09, 0x18, 0x0c, - 0x21, 0x04, 0xd0, 0xd4, 0x09, 0x04, 0xe4, 0xde, 0xc0, 0xd4, 0x20, 0x0a, - 0x20, 0x09, 0x01, 0x05, 0x21, 0x04, 0x90, 0x84, 0xe7, 0xfd, 0x90, 0x85, - 0x00, 0x10, 0x20, 0x0a, 0x20, 0x01, 0x18, 0x67, 0x20, 0x04, 0xd0, 0xe4, - 0x15, 0x28, 0x60, 0x3b, 0x00, 0x00, 0x08, 0x0c, 0x9a, 0x61, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x88, 0x90, 0x8c, - 0x00, 0x03, 0x91, 0x8e, 0x00, 0x02, 0x05, 0x08, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x04, 0xd0, 0xd4, 0x11, 0xe0, 0x08, 0x0c, 0x9b, 0xd3, 0x20, 0x09, - 0x00, 0x41, 0x00, 0x9e, 0x08, 0x04, 0xe5, 0x9e, 0x08, 0x0c, 0x9b, 0xd3, - 0x60, 0x03, 0x00, 0x07, 0x60, 0x1b, 0x00, 0x00, 0x08, 0x0c, 0x8a, 0x25, - 0x00, 0x9e, 0x00, 0x05, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, 0x90, 0x82, - 0x00, 0x05, 0x0a, 0xa8, 0x20, 0x01, 0x01, 0x1f, 0x20, 0x04, 0x60, 0x3a, - 0x08, 0x90, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xd4, 0x21, 0x02, - 0xd1, 0xcc, 0x01, 0x10, 0x08, 0x0c, 0x2c, 0x7b, 0x08, 0x0c, 0x9b, 0xd3, - 0x60, 0x14, 0x20, 0x48, 0xa9, 0x7c, 0xd1, 0xec, 0x11, 0x30, 0x08, 0x0c, - 0x8a, 0x25, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, - 0xee, 0x2f, 0x0d, 0xb8, 0x00, 0x9e, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xc1, 0xd4, 0x21, 0x02, 0x00, 0x36, 0x08, 0x0c, 0x9a, 0x61, - 0x08, 0x0c, 0x9b, 0xd3, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x01, 0x88, - 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x03, 0x90, 0x86, 0x00, 0x02, 0x01, 0x40, - 0xa8, 0xac, 0x63, 0x30, 0x93, 0x1a, 0x63, 0x32, 0xa8, 0xb0, 0x63, 0x2c, - 0x93, 0x1b, 0x63, 0x2e, 0x60, 0x03, 0x00, 0x02, 0x00, 0x80, 0x20, 0x19, - 0x00, 0x04, 0x08, 0x0c, 0xeb, 0xd4, 0x60, 0x18, 0x90, 0x05, 0x11, 0x28, - 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x80, 0x03, 0x60, 0x1a, 0x60, 0x17, - 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, - 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2f, - 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, - 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x2d, 0xe5, 0x7a, 0x08, 0x0c, - 0x0d, 0xc5, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x34, 0xaa, 0x38, - 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xbc, - 0x11, 0x90, 0x92, 0x0d, 0x15, 0x18, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x28, - 0x20, 0x09, 0x00, 0x41, 0x00, 0x9e, 0x08, 0x04, 0xe5, 0x9e, 0x60, 0x03, - 0x00, 0x07, 0x60, 0x1b, 0x00, 0x00, 0x08, 0x0c, 0x8a, 0x25, 0x00, 0x9e, - 0x00, 0x05, 0x61, 0x24, 0xd1, 0xf4, 0x1d, 0x58, 0x00, 0x06, 0x00, 0x46, - 0xac, 0xac, 0x94, 0x22, 0xa9, 0xb0, 0x22, 0x00, 0x91, 0x0b, 0x60, 0x30, - 0x94, 0x20, 0x64, 0x32, 0x60, 0x2c, 0x91, 0x09, 0x61, 0x2e, 0x00, 0x4e, - 0x00, 0x0e, 0x08, 0xd8, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, - 0x00, 0xbe, 0xd1, 0xbc, 0x11, 0x78, 0x20, 0x09, 0x18, 0x0e, 0x21, 0x0c, - 0xd1, 0x9c, 0x01, 0x18, 0x60, 0x03, 0x00, 0x07, 0x00, 0x10, 0x60, 0x03, - 0x00, 0x06, 0x00, 0xe9, 0x08, 0x0c, 0x8a, 0x27, 0x00, 0x9e, 0x00, 0x05, - 0x60, 0x03, 0x00, 0x02, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x24, 0xd0, 0xf4, - 0x01, 0x28, 0x08, 0x0c, 0x16, 0x08, 0x19, 0x04, 0xe5, 0x2f, 0x00, 0x05, - 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x34, 0xa9, 0x38, 0x00, 0x9e, - 0x91, 0x05, 0x11, 0x20, 0x08, 0x0c, 0x16, 0x08, 0x19, 0x04, 0xe5, 0x2f, - 0x00, 0x05, 0xd2, 0xfc, 0x01, 0x40, 0x80, 0x02, 0x80, 0x00, 0x82, 0x12, - 0x92, 0x91, 0x00, 0x00, 0x20, 0x09, 0x00, 0x09, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x15, 0xaa, 0x9a, 0xa8, 0x96, 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x08, 0x00, 0x62, 0x91, 0x86, 0x00, 0x13, 0x01, 0x20, 0x91, 0x86, - 0x00, 0x14, 0x19, 0x0c, 0x0d, 0xc5, 0x60, 0x24, 0xd0, 0xdc, 0x09, 0x0c, - 0x0d, 0xc5, 0x00, 0x05, 0xe5, 0xc2, 0xe5, 0xce, 0xe5, 0xda, 0xe5, 0xe6, - 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc9, 0xe5, 0xc4, - 0xe5, 0xc4, 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc2, 0xe5, 0xc4, - 0xe5, 0xc2, 0xe5, 0xc4, 0xe5, 0xc2, 0xe5, 0xc9, 0x08, 0x0c, 0x0d, 0xc5, - 0x60, 0x24, 0xd0, 0xdc, 0x09, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x60, 0x14, - 0x90, 0x05, 0x19, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x60, 0x03, 0x00, 0x01, - 0x61, 0x06, 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, 0x60, 0x03, 0x00, 0x01, - 0x61, 0x06, 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, 0x60, 0x03, 0x00, 0x03, - 0x61, 0x06, 0x2c, 0x10, 0x08, 0x0c, 0x1b, 0xe0, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x95, 0x64, 0x08, 0x0c, 0x9b, 0xd3, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x36, 0x00, 0x96, - 0x91, 0x82, 0x00, 0x40, 0x00, 0x23, 0x00, 0x9e, 0x00, 0x3e, 0x01, 0x2e, - 0x00, 0x05, 0xe6, 0x15, 0xe6, 0x17, 0xe6, 0x29, 0xe6, 0x43, 0xe6, 0x15, - 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, - 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, - 0xe6, 0x15, 0xe6, 0x15, 0xe6, 0x15, 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0xf8, 0x90, 0x9c, 0x00, 0x03, - 0x93, 0x9e, 0x00, 0x03, 0x01, 0xd0, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x04, 0x70, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x68, 0x90, 0x9c, 0x00, 0x03, - 0x93, 0x9e, 0x00, 0x03, 0x01, 0x40, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xe0, 0x90, 0x1e, - 0x63, 0x16, 0x63, 0x1a, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xeb, 0xd4, - 0x00, 0xa0, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x0d, 0x98, - 0x90, 0x9c, 0x00, 0x03, 0x93, 0x9e, 0x00, 0x03, 0x0d, 0x70, 0x60, 0x03, - 0x00, 0x03, 0x61, 0x06, 0x2c, 0x10, 0x08, 0x0c, 0x1b, 0xe0, 0x08, 0x0c, - 0x95, 0x64, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xa5, - 0x61, 0x14, 0x81, 0xff, 0x01, 0x58, 0x00, 0x96, 0x21, 0x48, 0x08, 0x0c, - 0xef, 0x85, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0xeb, 0xd4, - 0x00, 0x3e, 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, - 0x00, 0x05, 0x08, 0x0c, 0x9a, 0x61, 0x61, 0x14, 0x81, 0xff, 0x01, 0x58, - 0x00, 0x96, 0x21, 0x48, 0x08, 0x0c, 0xef, 0x85, 0x00, 0x36, 0x20, 0x19, - 0x00, 0x29, 0x08, 0x0c, 0xeb, 0xd4, 0x00, 0x3e, 0x00, 0x9e, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x05, 0x91, 0x82, 0x00, 0x85, - 0x00, 0x02, 0xe6, 0x94, 0xe6, 0x92, 0xe6, 0x92, 0xe6, 0xa0, 0xe6, 0x92, - 0xe6, 0x92, 0xe6, 0x92, 0xe6, 0x92, 0xe6, 0x92, 0xe6, 0x92, 0xe6, 0x92, - 0xe6, 0x92, 0xe6, 0x92, 0x08, 0x0c, 0x0d, 0xc5, 0x60, 0x03, 0x00, 0x0b, - 0x61, 0x06, 0x08, 0x0c, 0x94, 0xff, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9a, 0xb1, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x00, 0xe6, - 0x08, 0x0c, 0xee, 0x26, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0xd3, 0x04, 0x50, - 0x20, 0x71, 0x02, 0x60, 0x72, 0x24, 0x62, 0x16, 0x20, 0x01, 0x18, 0x0e, - 0x20, 0x04, 0xd0, 0xe4, 0x01, 0x50, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x20, 0x11, 0x01, 0x4e, 0x08, 0x0c, - 0xb5, 0xf5, 0x72, 0x20, 0x08, 0x0c, 0xea, 0x29, 0x01, 0x18, 0x60, 0x07, - 0x00, 0x86, 0x00, 0x40, 0x60, 0x07, 0x00, 0x87, 0x72, 0x24, 0x92, 0x96, - 0xff, 0xff, 0x11, 0x10, 0x60, 0x07, 0x00, 0x86, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x08, 0x0c, 0x9b, 0xd3, - 0x00, 0xee, 0x00, 0x2e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x60, - 0x60, 0x04, 0x90, 0x8a, 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0xc5, 0x90, 0x8a, - 0x00, 0x92, 0x1a, 0x0c, 0x0d, 0xc5, 0x90, 0x82, 0x00, 0x85, 0x00, 0xa2, - 0x91, 0x86, 0x00, 0x27, 0x01, 0x30, 0x91, 0x86, 0x00, 0x14, 0x01, 0x18, - 0x08, 0x0c, 0xb3, 0x6d, 0x00, 0x50, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x66, 0x96, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, - 0x9a, 0xb1, 0x00, 0x05, 0xe7, 0x05, 0xe7, 0x07, 0xe7, 0x07, 0xe7, 0x05, - 0xe7, 0x05, 0xe7, 0x05, 0xe7, 0x05, 0xe7, 0x05, 0xe7, 0x05, 0xe7, 0x05, - 0xe7, 0x05, 0xe7, 0x05, 0xe7, 0x05, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, - 0x99, 0xa5, 0x08, 0x0c, 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0xc5, 0x91, 0x82, 0x00, 0x92, - 0x1a, 0x0c, 0x0d, 0xc5, 0x91, 0x82, 0x00, 0x85, 0x00, 0x02, 0xe7, 0x26, - 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x28, 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x26, - 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x26, 0xe7, 0x26, - 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x01, 0x48, - 0x91, 0x86, 0x00, 0x14, 0x01, 0x30, 0x91, 0x86, 0x00, 0x27, 0x01, 0x18, - 0x08, 0x0c, 0xb3, 0x6d, 0x00, 0x30, 0x08, 0x0c, 0x99, 0xa5, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0x36, 0x08, 0x0c, - 0xee, 0x87, 0x60, 0x43, 0x00, 0x00, 0x20, 0x19, 0x00, 0x0b, 0x00, 0x11, - 0x00, 0x3e, 0x00, 0x05, 0x60, 0x10, 0x00, 0x06, 0x00, 0x59, 0x00, 0x0e, - 0x60, 0x12, 0x60, 0x23, 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x60, 0x1b, - 0x00, 0x00, 0x60, 0x43, 0x00, 0x00, 0x00, 0x05, 0x01, 0x26, 0x00, 0x36, - 0x20, 0x91, 0x80, 0x00, 0x00, 0x86, 0x2c, 0x40, 0x00, 0x96, 0x90, 0x4e, - 0x08, 0x0c, 0xaa, 0xfb, 0x00, 0x9e, 0x00, 0x8e, 0x15, 0x50, 0x00, 0x76, - 0x2c, 0x38, 0x08, 0x0c, 0xab, 0xa6, 0x00, 0x7e, 0x15, 0x20, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x05, 0x00, 0x60, 0x20, 0x90, 0x86, 0x00, 0x07, - 0x01, 0xe0, 0x00, 0x96, 0x60, 0x1c, 0xd0, 0x84, 0x01, 0x40, 0x08, 0x0c, - 0xee, 0x87, 0x08, 0x0c, 0xd7, 0xfb, 0x08, 0x0c, 0x1a, 0x8e, 0x60, 0x23, - 0x00, 0x07, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x10, - 0x08, 0x0c, 0xeb, 0xd4, 0x00, 0x9e, 0x60, 0x17, 0x00, 0x00, 0x08, 0x0c, - 0xee, 0x87, 0x60, 0x23, 0x00, 0x07, 0x08, 0x0c, 0xd7, 0xfb, 0x00, 0x3e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x36, - 0x01, 0x56, 0x20, 0x79, 0x02, 0x60, 0x79, 0x38, 0x78, 0x3c, 0x08, 0x0c, - 0x28, 0x73, 0x19, 0x04, 0xe7, 0xe4, 0x00, 0x16, 0x00, 0xc6, 0x08, 0x0c, - 0x67, 0x24, 0x19, 0x04, 0xe7, 0xe2, 0x00, 0x1e, 0x00, 0xc6, 0x08, 0x0c, - 0xd7, 0xe3, 0x11, 0x30, 0xb8, 0xc0, 0x90, 0x05, 0x01, 0x18, 0x08, 0x0c, - 0x33, 0xa5, 0x01, 0x48, 0x2b, 0x10, 0x21, 0x60, 0x60, 0x10, 0x00, 0x06, - 0x62, 0x12, 0x08, 0x0c, 0xd7, 0xea, 0x00, 0x0e, 0x60, 0x12, 0x00, 0xce, - 0x00, 0x2e, 0x00, 0x26, 0x00, 0x16, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, - 0xac, 0x6c, 0x08, 0x0c, 0x96, 0xa4, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, - 0x95, 0x77, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, - 0xe9, 0x1c, 0x00, 0x7e, 0x00, 0x26, 0xba, 0x04, 0x92, 0x94, 0xff, 0x00, - 0x82, 0x17, 0x92, 0x86, 0x00, 0x06, 0x01, 0x18, 0x92, 0x86, 0x00, 0x04, - 0x11, 0x18, 0xba, 0xa0, 0x08, 0x0c, 0x33, 0x0e, 0x00, 0x2e, 0xbc, 0xc0, - 0x00, 0x1e, 0x08, 0x0c, 0x61, 0x48, 0xbe, 0x12, 0xbd, 0x16, 0xbc, 0xc2, - 0x90, 0x06, 0x00, 0x10, 0x00, 0xce, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x3e, - 0x00, 0xbe, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xb6, 0x00, 0x16, 0x20, 0x09, 0x18, 0x24, 0x21, 0x04, 0x90, 0x86, - 0x00, 0x74, 0x19, 0x04, 0xe8, 0x43, 0x20, 0x69, 0x02, 0x60, 0x69, 0x44, - 0x91, 0x82, 0x01, 0x00, 0x06, 0xe0, 0x69, 0x40, 0x91, 0x84, 0x80, 0x00, - 0x09, 0x04, 0xe8, 0x40, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x05, - 0x11, 0x40, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xc0, 0x90, 0x05, 0x01, 0x18, - 0x91, 0x84, 0x08, 0x00, 0x05, 0x98, 0x69, 0x48, 0x91, 0x8a, 0x00, 0x01, - 0x06, 0x48, 0x08, 0x0c, 0xef, 0xed, 0x01, 0x18, 0x69, 0x78, 0xd1, 0xfc, - 0x11, 0xb8, 0x20, 0x09, 0x02, 0x05, 0x20, 0x0b, 0x00, 0x01, 0x69, 0x3c, - 0x81, 0xff, 0x11, 0x98, 0x69, 0x44, 0x91, 0x82, 0x01, 0x00, 0x02, 0xa8, - 0x69, 0x40, 0x81, 0xff, 0x11, 0x78, 0x69, 0x48, 0x91, 0x8a, 0x00, 0x01, - 0x02, 0x88, 0x69, 0x50, 0x91, 0x8a, 0x00, 0x01, 0x02, 0x98, 0x00, 0xd0, - 0x60, 0x17, 0x01, 0x00, 0x00, 0xa0, 0x60, 0x17, 0x03, 0x00, 0x00, 0x88, - 0x60, 0x17, 0x05, 0x00, 0x00, 0x70, 0x60, 0x17, 0x07, 0x00, 0x00, 0x58, - 0x60, 0x17, 0x09, 0x00, 0x00, 0x40, 0x60, 0x17, 0x0b, 0x00, 0x00, 0x28, - 0x60, 0x17, 0x0f, 0x00, 0x00, 0x10, 0x60, 0x17, 0x2d, 0x00, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x1e, 0x00, 0xbe, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x26, 0x00, 0x36, - 0x01, 0x56, 0x62, 0x10, 0x22, 0x58, 0xbb, 0x04, 0x93, 0x94, 0x00, 0xff, - 0x92, 0x86, 0x00, 0x06, 0x01, 0x80, 0x92, 0x86, 0x00, 0x04, 0x01, 0x68, - 0x93, 0x94, 0xff, 0x00, 0x82, 0x17, 0x92, 0x86, 0x00, 0x06, 0x01, 0x38, - 0x92, 0x86, 0x00, 0x04, 0x01, 0x20, 0x08, 0x0c, 0x67, 0x33, 0x08, 0x04, - 0xe8, 0xab, 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, - 0x2b, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, - 0x15, 0xa8, 0x20, 0x11, 0x02, 0x7a, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, - 0x2b, 0x48, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, - 0x15, 0x48, 0x00, 0x46, 0x00, 0x16, 0xba, 0xa0, 0x22, 0x20, 0x90, 0x06, - 0x20, 0x09, 0x18, 0x48, 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x38, 0x20, 0x09, - 0x00, 0x29, 0x08, 0x0c, 0xec, 0x31, 0xb8, 0x00, 0xc0, 0xe5, 0xb8, 0x02, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x96, 0xa4, 0x00, 0x76, 0x20, 0x39, - 0x00, 0x00, 0x08, 0x0c, 0x95, 0x77, 0x2c, 0x08, 0x08, 0x0c, 0xe9, 0x1c, - 0x00, 0x7e, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0x96, 0x20, 0x01, - 0x00, 0x07, 0x08, 0x0c, 0x66, 0x6a, 0x00, 0x1e, 0x00, 0x4e, 0x90, 0x06, - 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xd6, 0x20, 0x69, 0x02, 0x6e, 0x68, 0x00, 0x90, 0x86, 0x08, 0x00, - 0x01, 0x18, 0x60, 0x17, 0x00, 0x00, 0x00, 0x08, 0x90, 0x06, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x01, 0x56, 0x20, 0x79, 0x02, 0x6c, 0x79, 0x30, 0x78, 0x34, 0x08, 0x0c, - 0x28, 0x73, 0x11, 0xd0, 0x08, 0x0c, 0x67, 0x24, 0x11, 0xb8, 0x20, 0x11, - 0x02, 0x70, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, - 0x00, 0x0a, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, 0x11, 0x58, 0x20, 0x11, - 0x02, 0x74, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, - 0x00, 0x06, 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, 0x01, 0x5e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x20, 0x11, - 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x28, 0x73, - 0x11, 0xd0, 0x08, 0x0c, 0x67, 0x24, 0x11, 0xb8, 0x20, 0x11, 0x02, 0x76, - 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, 0x00, 0x0a, - 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, 0x11, 0x58, 0x20, 0x11, 0x02, 0x7a, - 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, 0x00, 0x06, - 0x08, 0x0c, 0xc3, 0x79, 0x00, 0x9e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x86, 0x00, 0x76, 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x27, 0x40, 0x20, 0x29, 0x19, 0xf1, - 0x25, 0x2c, 0x20, 0x21, 0x19, 0xf7, 0x24, 0x24, 0x20, 0x61, 0x1c, 0xd0, - 0x20, 0x71, 0x18, 0x00, 0x76, 0x54, 0x70, 0x74, 0x81, 0xff, 0x01, 0x50, - 0x00, 0x06, 0x91, 0x86, 0x1a, 0xb7, 0x00, 0x0e, 0x01, 0x28, 0x80, 0x01, - 0x96, 0x02, 0x1a, 0x04, 0xe9, 0xba, 0x00, 0x18, 0x96, 0x06, 0x09, 0x04, - 0xe9, 0xba, 0x08, 0x0c, 0x8c, 0xf7, 0x09, 0x04, 0xe9, 0xb1, 0x21, 0x00, - 0x9c, 0x06, 0x09, 0x04, 0xe9, 0xb1, 0x67, 0x20, 0x97, 0x86, 0x00, 0x07, - 0x09, 0x04, 0xe9, 0xb1, 0x08, 0x0c, 0xec, 0x72, 0x19, 0x04, 0xe9, 0xb1, - 0x08, 0x0c, 0xf0, 0x0b, 0x09, 0x04, 0xe9, 0xb1, 0x08, 0x0c, 0xec, 0x62, - 0x09, 0x04, 0xe9, 0xb1, 0x67, 0x20, 0x97, 0x86, 0x00, 0x01, 0x11, 0x48, - 0x08, 0x0c, 0x33, 0xa5, 0x09, 0x04, 0xe9, 0xf9, 0x60, 0x04, 0x90, 0x86, - 0x00, 0x00, 0x19, 0x04, 0xe9, 0xf9, 0x97, 0x86, 0x00, 0x04, 0x09, 0x04, - 0xe9, 0xf9, 0x25, 0x00, 0x9c, 0x06, 0x09, 0x04, 0xe9, 0xb1, 0x24, 0x00, - 0x9c, 0x06, 0x05, 0xe8, 0x88, 0xff, 0x01, 0x18, 0x60, 0x54, 0x99, 0x06, - 0x15, 0xc0, 0x00, 0x96, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, - 0x00, 0x16, 0x08, 0x0c, 0x1a, 0x8e, 0x00, 0x1e, 0x97, 0x86, 0x00, 0x0a, - 0x01, 0x48, 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x30, 0x08, 0x0c, 0xbc, 0xb6, - 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, 0x04, 0x18, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0xd8, 0x97, 0x86, 0x00, 0x03, 0x15, 0x70, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7c, 0xd0, 0xcc, 0x01, 0x30, 0x00, 0x96, - 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, 0x0f, 0xc0, 0x00, 0x9e, 0xab, 0x7a, - 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0xef, 0x85, 0x00, 0x16, 0x08, 0x0c, - 0xd3, 0xce, 0x08, 0x0c, 0x6e, 0x92, 0x00, 0x1e, 0x08, 0x0c, 0xd2, 0xc3, - 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, 0x9c, 0xe0, 0x00, 0x18, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x10, 0x08, 0x04, 0xe9, 0x30, - 0x01, 0x2e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, - 0x00, 0x8e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x97, 0x86, 0x00, 0x06, - 0x11, 0x50, 0x93, 0x86, 0x00, 0x05, 0x01, 0x28, 0x08, 0x0c, 0xef, 0x85, - 0x08, 0x0c, 0xeb, 0xd4, 0x08, 0xf8, 0x00, 0x9e, 0x0c, 0x00, 0x97, 0x86, - 0x00, 0x09, 0x11, 0xf8, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x01, 0xc0, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x03, 0x11, 0xa0, 0x08, 0x0c, 0x9a, 0x61, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x18, - 0x60, 0x10, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, 0x00, 0xc6, 0x08, 0x0c, - 0xb2, 0xd3, 0x00, 0xce, 0x00, 0x36, 0x08, 0x0c, 0x9b, 0xd3, 0x00, 0x3e, - 0x00, 0x9e, 0x08, 0x04, 0xe9, 0xb1, 0x97, 0x86, 0x00, 0x0a, 0x09, 0x04, - 0xe9, 0xa1, 0x08, 0x04, 0xe9, 0x96, 0x81, 0xff, 0x09, 0x04, 0xe9, 0xb1, - 0x91, 0x80, 0x00, 0x01, 0x20, 0x04, 0x90, 0x86, 0x00, 0x18, 0x01, 0x38, - 0x91, 0x80, 0x00, 0x01, 0x20, 0x04, 0x90, 0x86, 0x00, 0x2d, 0x19, 0x04, - 0xe9, 0xb1, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, 0x19, 0x04, 0xe9, 0xb1, - 0x08, 0x0c, 0xd2, 0xcf, 0x01, 0x38, 0x08, 0x0c, 0xd2, 0xe0, 0x19, 0x04, - 0xe9, 0xb1, 0x08, 0x0c, 0xbc, 0xb6, 0x00, 0x38, 0x08, 0x0c, 0x32, 0x79, - 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x10, 0x08, 0x0c, 0xbc, 0xb6, 0x08, 0x0c, - 0xb3, 0x06, 0x08, 0x04, 0xe9, 0xb1, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x39, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xe6, 0x00, 0x16, - 0x2c, 0x08, 0x21, 0x70, 0x90, 0x06, 0x08, 0x0c, 0xeb, 0xfb, 0x00, 0x1e, - 0x01, 0x20, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0xee, - 0x00, 0xce, 0x00, 0x05, 0xea, 0x48, 0xea, 0x48, 0xea, 0x48, 0xea, 0x48, - 0xea, 0x48, 0xea, 0x48, 0xea, 0x4a, 0xea, 0x48, 0xea, 0x48, 0xea, 0x48, - 0xea, 0x73, 0xb3, 0x06, 0xb3, 0x06, 0xea, 0x48, 0x90, 0x06, 0x00, 0x05, - 0x00, 0x36, 0x00, 0x46, 0x00, 0x16, 0x70, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x20, 0x09, 0x00, 0x20, 0x08, 0x0c, - 0xec, 0x31, 0x00, 0x1e, 0x00, 0x4e, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, - 0xe7, 0x54, 0x00, 0x3e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x96, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x40, 0x60, 0x14, 0x90, 0x4d, 0x08, 0x0c, - 0xcc, 0xf3, 0x68, 0x7b, 0x00, 0x05, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, - 0x08, 0x0c, 0xb3, 0x06, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x19, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, - 0x1a, 0x0c, 0x0d, 0xc5, 0x00, 0x0b, 0x00, 0x05, 0xea, 0x8e, 0xea, 0x8e, - 0xea, 0xa5, 0xea, 0x95, 0xea, 0xb4, 0xea, 0x8e, 0xea, 0x8e, 0xea, 0x90, - 0xea, 0x8e, 0xea, 0x8e, 0xea, 0x8e, 0xea, 0x8e, 0xea, 0x8e, 0xea, 0x8e, - 0xea, 0x8e, 0xea, 0x8e, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0xb3, 0x06, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x36, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0xe8, 0x70, 0x3c, 0x9c, 0x06, 0x11, 0x28, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0xaa, 0x49, 0x00, 0x10, 0x08, 0x0c, 0xac, 0x2b, 0x00, 0xee, - 0x00, 0x3e, 0x00, 0x96, 0x00, 0xd6, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7b, - 0x00, 0x05, 0x08, 0x0c, 0x6e, 0x9f, 0x08, 0x0c, 0xb3, 0x06, 0x00, 0xde, - 0x00, 0x9e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x60, 0x1c, 0xd0, 0x84, - 0x19, 0x0c, 0x1a, 0x8e, 0x0c, 0x60, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x66, 0x56, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, 0x02, 0x76, 0x08, 0x0c, - 0xc3, 0x65, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x90, 0x05, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x86, 0x00, 0x76, - 0x00, 0x66, 0x00, 0xb6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x27, 0x40, - 0x20, 0x61, 0x1c, 0xd0, 0x20, 0x79, 0x00, 0x01, 0x8f, 0xff, 0x09, 0x04, - 0xeb, 0x2b, 0x20, 0x71, 0x18, 0x00, 0x76, 0x54, 0x70, 0x74, 0x80, 0x01, - 0x96, 0x02, 0x1a, 0x04, 0xeb, 0x2b, 0x88, 0xff, 0x01, 0x20, 0x28, 0x00, - 0x9c, 0x06, 0x15, 0xa0, 0x20, 0x78, 0x08, 0x0c, 0xec, 0x62, 0x05, 0x80, - 0x24, 0x00, 0x9c, 0x06, 0x05, 0x68, 0x67, 0x20, 0x97, 0x86, 0x00, 0x06, - 0x15, 0x48, 0x97, 0x86, 0x00, 0x07, 0x05, 0x30, 0x88, 0xff, 0x11, 0x50, - 0xd5, 0x8c, 0x11, 0x18, 0x60, 0x10, 0x9b, 0x06, 0x11, 0xf8, 0xd5, 0x84, - 0x01, 0x18, 0x60, 0x54, 0x91, 0x06, 0x11, 0xd0, 0x00, 0x96, 0x60, 0x1c, - 0xd0, 0x84, 0x01, 0x40, 0x08, 0x0c, 0xee, 0x87, 0x08, 0x0c, 0xd7, 0xfb, - 0x08, 0x0c, 0x1a, 0x8e, 0x60, 0x23, 0x00, 0x07, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xd0, 0xd8, 0x01, 0x20, 0x00, 0x46, 0x08, 0x0c, 0xeb, 0xd4, - 0x00, 0x4e, 0x00, 0x9e, 0x08, 0x0c, 0xb3, 0x06, 0x88, 0xff, 0x11, 0x98, - 0x9c, 0xe0, 0x00, 0x18, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, - 0x12, 0x10, 0x08, 0x04, 0xea, 0xde, 0x90, 0x06, 0x01, 0x2e, 0x00, 0xbe, - 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x8e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x05, 0x98, 0xc5, 0x00, 0x01, 0x0c, 0xa0, 0x00, 0xb6, 0x00, 0x76, - 0x00, 0x56, 0x00, 0x86, 0x90, 0x46, 0x20, 0x29, 0x00, 0x01, 0x2c, 0x20, - 0x20, 0x19, 0x00, 0x02, 0x62, 0x10, 0x22, 0x58, 0x00, 0x96, 0x90, 0x4e, - 0x08, 0x0c, 0xaa, 0xfb, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, - 0xab, 0xa6, 0x08, 0x0c, 0xea, 0xcf, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0xc6, - 0x01, 0x56, 0x2c, 0x20, 0x21, 0x28, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, - 0x00, 0x16, 0x00, 0x36, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x80, 0x00, 0x56, - 0x00, 0x86, 0x90, 0x46, 0x25, 0x08, 0x20, 0x29, 0x00, 0x01, 0x00, 0x96, - 0x90, 0x4e, 0x08, 0x0c, 0xaa, 0xfb, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, - 0x08, 0x0c, 0xab, 0xa6, 0x00, 0x5e, 0x00, 0x3e, 0x00, 0x1e, 0x81, 0x08, - 0x1f, 0x04, 0xeb, 0x5e, 0x00, 0x36, 0x25, 0x08, 0x20, 0x29, 0x00, 0x03, - 0x08, 0x0c, 0xea, 0xcf, 0x00, 0x3e, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x7e, - 0x00, 0x5e, 0x00, 0x4e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x76, - 0x00, 0x56, 0x62, 0x10, 0x22, 0x58, 0x00, 0x86, 0x90, 0x46, 0x20, 0x29, - 0x00, 0x01, 0x20, 0x19, 0x00, 0x48, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, - 0xaa, 0xfb, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, 0xab, 0xa6, - 0x2c, 0x20, 0x08, 0x0c, 0xea, 0xcf, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0xc6, - 0x01, 0x56, 0x2c, 0x20, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x0e, 0x00, 0x16, - 0x00, 0x36, 0x08, 0x0c, 0x67, 0x24, 0x11, 0x90, 0x00, 0x86, 0x90, 0x46, - 0x28, 0x28, 0x00, 0x46, 0x20, 0x21, 0x00, 0x01, 0x08, 0x0c, 0xee, 0x6b, - 0x00, 0x4e, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, 0xaa, 0xfb, 0x00, 0x9e, - 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, 0xab, 0xa6, 0x00, 0x3e, 0x00, 0x1e, - 0x81, 0x08, 0x1f, 0x04, 0xeb, 0xab, 0x00, 0x36, 0x20, 0x29, 0x00, 0x02, - 0x08, 0x0c, 0xea, 0xcf, 0x00, 0x3e, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x7e, - 0x00, 0x5e, 0x00, 0x4e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, 0x00, 0xf6, - 0x08, 0x0c, 0xd0, 0xd6, 0x01, 0x98, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x46, 0x01, 0x80, 0xa8, 0x00, 0x90, 0x7d, 0x01, 0x38, - 0xa8, 0x03, 0x00, 0x00, 0xab, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x2f, 0x48, - 0x0c, 0xb0, 0xab, 0x82, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0xfe, 0x00, 0x1e, - 0x00, 0x05, 0xa8, 0x00, 0x90, 0x7d, 0x01, 0x30, 0xa8, 0x03, 0x00, 0x00, - 0x08, 0x0c, 0x6e, 0x9f, 0x2f, 0x48, 0x0c, 0xb8, 0x08, 0x0c, 0x6e, 0x9f, - 0x0c, 0x88, 0x00, 0xe6, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x1c, 0xd0, - 0x90, 0x05, 0x11, 0x38, 0x20, 0x71, 0x18, 0x00, 0x74, 0x54, 0x70, 0x74, - 0x80, 0x01, 0x94, 0x02, 0x12, 0xf8, 0x21, 0x00, 0x9c, 0x06, 0x01, 0x88, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x68, 0x60, 0x08, 0x92, 0x06, - 0x11, 0x50, 0x63, 0x20, 0x93, 0x86, 0x00, 0x09, 0x01, 0xb0, 0x60, 0x10, - 0x91, 0xa0, 0x00, 0x04, 0x24, 0x24, 0x94, 0x06, 0x01, 0x40, 0x9c, 0xe0, - 0x00, 0x18, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x20, - 0x0c, 0x20, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0xee, 0x00, 0x05, 0x63, 0x1c, 0xd3, 0xc4, 0x1d, 0x68, - 0x0c, 0x30, 0x00, 0x96, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x0e, 0x00, 0x0e, - 0x09, 0x0c, 0x0d, 0xc5, 0xaa, 0xe2, 0xa8, 0x67, 0x01, 0x0d, 0xa8, 0x8e, - 0x00, 0x26, 0x20, 0x10, 0x08, 0x0c, 0xd0, 0xc6, 0x20, 0x01, 0x00, 0x00, - 0x01, 0x20, 0x22, 0x00, 0x90, 0x80, 0x00, 0x15, 0x20, 0x04, 0x00, 0x2e, - 0xa8, 0x7a, 0x91, 0x86, 0x00, 0x20, 0x01, 0x10, 0xa8, 0xe3, 0xff, 0xff, - 0xa9, 0x86, 0xac, 0x76, 0xa8, 0x7f, 0x00, 0x00, 0x20, 0x01, 0x19, 0x8e, - 0x20, 0x04, 0xa8, 0x82, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x6a, 0xa8, 0x8a, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6e, 0x9f, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x67, 0x00, 0x97, 0x86, 0x00, 0x00, 0x01, 0x58, - 0x97, 0x86, 0x00, 0x01, 0x01, 0x40, 0x97, 0x86, 0x00, 0x0a, 0x01, 0x28, - 0x97, 0x86, 0x00, 0x09, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x00, 0xe6, 0x60, 0x10, 0x90, 0x75, 0x01, 0x38, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0xa0, 0x00, 0xbe, 0x92, 0x06, 0x00, 0xee, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x0c, 0xd8, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x1e, - 0x11, 0xa0, 0x80, 0x07, 0x61, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x05, - 0x60, 0x36, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, - 0x00, 0x05, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x08, 0x0c, - 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x1e, 0x00, 0x05, 0xa0, 0x01, - 0xa0, 0x01, 0x00, 0x05, 0x60, 0x24, 0xd0, 0xe4, 0x01, 0x58, 0xd0, 0xcc, - 0x01, 0x18, 0x08, 0x0c, 0xd4, 0x12, 0x00, 0x30, 0x08, 0x0c, 0xee, 0x87, - 0x08, 0x0c, 0x8a, 0x25, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x92, 0x80, - 0x00, 0x08, 0x20, 0x04, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x02, 0xec, 0xc1, - 0xec, 0xc1, 0xec, 0xc1, 0xec, 0xc3, 0xec, 0xc1, 0xec, 0xc3, 0xec, 0xc3, - 0xec, 0xc1, 0xec, 0xc3, 0xec, 0xc1, 0xec, 0xc1, 0xec, 0xc1, 0xec, 0xc1, - 0xec, 0xc1, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x92, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x02, - 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, - 0xec, 0xe7, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, 0xec, 0xda, - 0xec, 0xda, 0xec, 0xda, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x17, 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x00, 0x96, 0x00, 0xc6, 0x22, 0x60, - 0x08, 0x0c, 0xee, 0x87, 0x60, 0x43, 0x00, 0x00, 0x60, 0x24, 0xc0, 0xf4, - 0xc0, 0xe4, 0x60, 0x26, 0x60, 0x3b, 0x00, 0x00, 0x00, 0xce, 0x00, 0xd6, - 0x22, 0x68, 0x91, 0x86, 0x00, 0x07, 0x19, 0x04, 0xed, 0x40, 0x68, 0x14, - 0x90, 0x05, 0x01, 0x38, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x11, 0x18, - 0x00, 0xde, 0x00, 0x9e, 0x08, 0xa8, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xc6, - 0x2d, 0x60, 0x61, 0x00, 0x91, 0x86, 0x00, 0x02, 0x19, 0x04, 0xed, 0xb0, - 0x60, 0x14, 0x90, 0x05, 0x11, 0x38, 0x60, 0x00, 0x90, 0x86, 0x00, 0x07, - 0x19, 0x0c, 0x0d, 0xc5, 0x08, 0x04, 0xed, 0xb0, 0x20, 0x48, 0x08, 0x0c, - 0xd0, 0xd8, 0x11, 0x30, 0x00, 0x28, 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, - 0x1d, 0xe0, 0x29, 0x00, 0x20, 0x48, 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x03, - 0x90, 0x86, 0x00, 0x02, 0x11, 0x68, 0xa8, 0x7c, 0xc0, 0xdc, 0xc0, 0xf4, - 0xa8, 0x7e, 0xa8, 0x80, 0xc0, 0xfc, 0xa8, 0x82, 0x20, 0x09, 0x00, 0x43, - 0x08, 0x0c, 0xe5, 0x9e, 0x08, 0x04, 0xed, 0xb0, 0x20, 0x09, 0x00, 0x41, - 0x08, 0x04, 0xed, 0xaa, 0x91, 0x86, 0x00, 0x05, 0x15, 0xa0, 0x68, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xbc, 0x11, 0x20, 0x00, 0xde, 0x00, 0x9e, - 0x08, 0x04, 0xec, 0xda, 0xd0, 0xb4, 0x01, 0x28, 0xd0, 0xfc, 0x09, 0x0c, - 0x0d, 0xc5, 0x08, 0x04, 0xec, 0xfb, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x94, 0xff, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0xc6, - 0x2d, 0x60, 0x61, 0x00, 0x91, 0x86, 0x00, 0x02, 0x01, 0x20, 0x91, 0x86, - 0x00, 0x04, 0x19, 0x04, 0xed, 0xb0, 0x68, 0x14, 0x20, 0x48, 0xa9, 0x7c, - 0xc1, 0xf4, 0xc1, 0xdc, 0xa9, 0x7e, 0xa9, 0x80, 0xc1, 0xfc, 0xc1, 0xbc, - 0xa9, 0x82, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x17, 0x68, 0x00, 0xfe, - 0x20, 0x09, 0x00, 0x42, 0x04, 0x98, 0x00, 0x36, 0x08, 0x0c, 0x10, 0x0e, - 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x67, 0x01, 0x0d, 0x90, 0x06, 0xa8, 0x02, - 0xa8, 0x6a, 0xa8, 0x8a, 0x2d, 0x18, 0xab, 0x8e, 0xa8, 0x87, 0x00, 0x45, - 0x2c, 0x00, 0xa8, 0x92, 0x60, 0x38, 0xa8, 0xa2, 0x23, 0x60, 0x60, 0x24, - 0xc0, 0xdd, 0x60, 0x26, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xa0, - 0x00, 0xbe, 0x20, 0x04, 0x63, 0x54, 0xab, 0x7a, 0xa8, 0x76, 0x90, 0x06, - 0xa8, 0x7e, 0xa8, 0x82, 0xad, 0x9a, 0xae, 0x96, 0xa8, 0x9f, 0x00, 0x01, - 0x08, 0x0c, 0x6e, 0x9f, 0x20, 0x19, 0x00, 0x45, 0x60, 0x08, 0x20, 0x68, - 0x08, 0x0c, 0xe7, 0x46, 0x2d, 0x00, 0x60, 0x0a, 0x00, 0x3e, 0x00, 0x38, - 0x60, 0x43, 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, 0x08, 0x0c, 0xe5, 0x9e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, - 0x11, 0x28, 0x60, 0x04, 0x90, 0x82, 0x00, 0x85, 0x20, 0x08, 0x00, 0xc2, - 0x91, 0x86, 0x00, 0x27, 0x11, 0x78, 0x08, 0x0c, 0x99, 0xa5, 0x00, 0x36, - 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, - 0xeb, 0xd4, 0x00, 0x9e, 0x00, 0x3e, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, - 0x91, 0x86, 0x00, 0x14, 0x0d, 0x70, 0x08, 0x0c, 0xb3, 0x6d, 0x00, 0x05, - 0xed, 0xe3, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, - 0xed, 0xe3, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, 0xed, 0xe1, - 0xed, 0xe1, 0x08, 0x0c, 0x0d, 0xc5, 0x08, 0x0c, 0x99, 0xa5, 0x60, 0x03, - 0x00, 0x0c, 0x08, 0x0c, 0x9a, 0xb1, 0x00, 0x05, 0x91, 0x82, 0x00, 0x92, - 0x12, 0x20, 0x91, 0x82, 0x00, 0x85, 0x02, 0x08, 0x00, 0x1a, 0x08, 0x0c, - 0xb3, 0x6d, 0x00, 0x05, 0xee, 0x01, 0xee, 0x01, 0xee, 0x01, 0xee, 0x01, - 0xee, 0x03, 0xee, 0x23, 0xee, 0x01, 0xee, 0x01, 0xee, 0x01, 0xee, 0x01, - 0xee, 0x01, 0xee, 0x01, 0xee, 0x01, 0x08, 0x0c, 0x0d, 0xc5, 0x00, 0xd6, - 0x2c, 0x68, 0x08, 0x0c, 0xb2, 0x7d, 0x01, 0xb0, 0x60, 0x03, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x1e, 0x20, 0x09, 0x02, 0x6e, 0x21, 0x0c, 0x61, 0x3a, - 0x20, 0x09, 0x02, 0x6f, 0x21, 0x0c, 0x61, 0x3e, 0x60, 0x0b, 0xff, 0xff, - 0x69, 0x10, 0x61, 0x12, 0x60, 0x23, 0x00, 0x04, 0x08, 0x0c, 0x94, 0xff, - 0x08, 0x0c, 0x9a, 0xb1, 0x2d, 0x60, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0xde, - 0x00, 0x05, 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x05, 0x00, 0xe6, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xec, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x09, 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xec, 0x05, 0xb0, - 0x60, 0x03, 0x00, 0x02, 0x60, 0x24, 0xc0, 0xe5, 0x60, 0x26, 0xd0, 0xcc, - 0x01, 0x50, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x60, 0x42, 0x20, 0x09, - 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xf4, 0x15, 0x20, 0x00, 0xa0, 0x20, 0x09, - 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xf4, 0x01, 0x28, 0x60, 0x24, 0xc0, 0xe4, - 0x60, 0x26, 0x90, 0x06, 0x00, 0xd8, 0x20, 0x01, 0x19, 0x88, 0x20, 0x0c, - 0x20, 0x01, 0x19, 0x86, 0x20, 0x04, 0x91, 0x00, 0x90, 0x80, 0x00, 0x0a, - 0x60, 0x42, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbc, 0x00, 0xbe, - 0x00, 0x08, 0x21, 0x04, 0x90, 0x05, 0x01, 0x18, 0x90, 0x88, 0x00, 0x03, - 0x0c, 0xd0, 0x2c, 0x0a, 0x60, 0x0f, 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x00, 0xe6, 0x61, 0x54, 0xb8, 0xbc, - 0x20, 0x60, 0x8c, 0xff, 0x01, 0x80, 0x84, 0xff, 0x11, 0x18, 0x60, 0x54, - 0x91, 0x06, 0x11, 0x38, 0x60, 0x0c, 0x20, 0x72, 0x08, 0x0c, 0x8a, 0x25, - 0x08, 0x0c, 0xb2, 0xd3, 0x00, 0x10, 0x9c, 0xf0, 0x00, 0x03, 0x2e, 0x64, - 0x0c, 0x70, 0x00, 0xee, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xbc, 0x90, 0x6d, 0x01, 0x30, - 0x9c, 0x06, 0x01, 0x10, 0x68, 0x0c, 0x0c, 0xd0, 0x60, 0x0c, 0x68, 0x0e, - 0x00, 0xbe, 0x00, 0xde, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, - 0x20, 0x11, 0x18, 0x2c, 0x22, 0x04, 0x90, 0x84, 0x00, 0xff, 0x20, 0x19, - 0x02, 0x6e, 0x23, 0x34, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x36, 0x15, 0x08, - 0x83, 0x18, 0x23, 0x34, 0x22, 0x04, 0x90, 0x84, 0xff, 0x00, 0x96, 0x36, - 0x11, 0xd0, 0x20, 0x11, 0x02, 0x70, 0x20, 0xa9, 0x00, 0x04, 0x60, 0x10, - 0x00, 0x96, 0x20, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc3, 0x79, - 0x00, 0x9e, 0x11, 0x68, 0x20, 0x11, 0x02, 0x74, 0x20, 0xa9, 0x00, 0x04, - 0x60, 0x10, 0x00, 0x96, 0x20, 0x48, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, - 0xc3, 0x79, 0x00, 0x9e, 0x11, 0x00, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x60, 0xc1, - 0x08, 0x0c, 0x30, 0x00, 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, 0x00, 0x26, - 0x08, 0x0c, 0x10, 0x0e, 0x09, 0x0c, 0x0d, 0xc5, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x1a, 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x0c, 0xa8, 0x60, 0x20, 0xe8, - 0x90, 0x06, 0x40, 0x04, 0x91, 0x86, 0x00, 0x46, 0x11, 0x18, 0xa8, 0x67, - 0x01, 0x36, 0x00, 0x38, 0xa8, 0x67, 0x01, 0x38, 0x91, 0x86, 0x00, 0x41, - 0x01, 0x10, 0xa8, 0x7b, 0x00, 0x01, 0x70, 0x38, 0x90, 0x84, 0xff, 0x00, - 0x72, 0x40, 0x92, 0x94, 0xff, 0x00, 0x80, 0x07, 0x92, 0x15, 0xaa, 0x9a, - 0x91, 0x86, 0x00, 0x46, 0x11, 0x68, 0x70, 0x38, 0x90, 0x84, 0x00, 0xff, - 0x72, 0x3c, 0x92, 0x94, 0xff, 0x00, 0x92, 0x15, 0xaa, 0x9e, 0x72, 0x3c, - 0x92, 0x94, 0x00, 0xff, 0xaa, 0xa2, 0x00, 0x60, 0x70, 0x40, 0x90, 0x84, - 0x00, 0xff, 0x72, 0x44, 0x92, 0x94, 0xff, 0x00, 0x92, 0x15, 0xaa, 0x9e, - 0x72, 0x44, 0x92, 0x94, 0x00, 0xff, 0xaa, 0xa2, 0x91, 0x86, 0x00, 0x46, - 0x11, 0x18, 0x9e, 0x90, 0x00, 0x12, 0x00, 0x10, 0x9e, 0x90, 0x00, 0x1a, - 0x22, 0x04, 0x80, 0x07, 0xa8, 0xa6, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, - 0xa8, 0xaa, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xae, 0x82, 0x10, - 0x22, 0x04, 0x80, 0x07, 0xa8, 0xb2, 0x82, 0x10, 0x91, 0x86, 0x00, 0x46, - 0x11, 0xb8, 0x9e, 0x90, 0x00, 0x16, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xb6, - 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xba, 0x82, 0x10, 0x22, 0x04, - 0x80, 0x07, 0xa8, 0xbe, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xc2, - 0x82, 0x10, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x01, 0x00, 0xb0, - 0x9e, 0x90, 0x00, 0x1e, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xb6, 0x82, 0x10, - 0x22, 0x04, 0x80, 0x07, 0xa8, 0xba, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, - 0x00, 0x01, 0x20, 0x11, 0x02, 0x60, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xbe, - 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xc2, 0x91, 0x86, 0x00, 0x46, - 0x11, 0x18, 0x20, 0x11, 0x02, 0x62, 0x00, 0x10, 0x20, 0x11, 0x02, 0x6a, - 0x01, 0x46, 0x01, 0xd6, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x01, 0x20, 0x19, - 0x00, 0x08, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, - 0x20, 0xa0, 0x22, 0x04, 0x80, 0x07, 0x40, 0x04, 0x82, 0x10, 0x83, 0x19, - 0x1d, 0xd0, 0x00, 0x3e, 0x01, 0xce, 0x01, 0x3e, 0x20, 0x11, 0x02, 0x05, - 0x20, 0x13, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x0c, 0x6e, 0x9f, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0xe6, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, - 0x00, 0xbe, 0xd0, 0xfc, 0x01, 0x08, 0x00, 0x11, 0x00, 0xee, 0x00, 0x05, - 0xa8, 0x80, 0xc0, 0xe5, 0xa8, 0x82, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x76, 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, - 0x00, 0x16, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, 0x19, 0xf1, - 0x25, 0x2c, 0x20, 0x21, 0x19, 0xf7, 0x24, 0x24, 0x20, 0x61, 0x1c, 0xd0, - 0x20, 0x71, 0x18, 0x00, 0x76, 0x54, 0x70, 0x74, 0x96, 0x06, 0x05, 0x78, - 0x67, 0x20, 0x97, 0x86, 0x00, 0x01, 0x01, 0x18, 0x97, 0x86, 0x00, 0x08, - 0x15, 0x00, 0x25, 0x00, 0x9c, 0x06, 0x01, 0xe8, 0x24, 0x00, 0x9c, 0x06, - 0x01, 0xd0, 0x08, 0x0c, 0xec, 0x62, 0x01, 0xb8, 0x08, 0x0c, 0xec, 0x72, - 0x11, 0xa0, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x00, 0x16, - 0x08, 0x0c, 0x1a, 0x8e, 0x00, 0x1e, 0x08, 0x0c, 0xd2, 0xcf, 0x11, 0x10, - 0x08, 0x0c, 0x32, 0x79, 0x08, 0x0c, 0xd2, 0xe0, 0x11, 0x10, 0x08, 0x0c, - 0xbc, 0xb6, 0x08, 0x0c, 0xb3, 0x06, 0x9c, 0xe0, 0x00, 0x18, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x08, 0x08, 0x58, 0x01, 0x2e, - 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x18, 0x10, - 0x20, 0x04, 0xd0, 0xdc, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0x9c, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x36, - 0x00, 0x46, 0x08, 0x0c, 0xd7, 0xe3, 0x01, 0x68, 0x20, 0x19, 0xff, 0xff, - 0x90, 0x05, 0x01, 0x28, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, - 0x00, 0xbe, 0x20, 0x21, 0x00, 0x04, 0x08, 0x0c, 0x4d, 0xfb, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x0e, 0x00, 0x05, 0x60, 0x04, 0x90, 0x86, 0x00, 0x01, - 0x11, 0x28, 0x08, 0x0c, 0xac, 0x6c, 0x08, 0x0c, 0xb3, 0x06, 0x90, 0x06, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x46, 0x20, 0x61, - 0x1c, 0xd0, 0x20, 0x71, 0x18, 0x00, 0x74, 0x54, 0x70, 0x74, 0x80, 0x01, - 0x94, 0x02, 0x12, 0xd8, 0x21, 0x00, 0x9c, 0x06, 0x01, 0x68, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x92, 0x06, 0x11, 0x20, 0x60, 0x04, 0x90, 0x86, 0x00, 0x02, 0x01, 0x40, - 0x9c, 0xe0, 0x00, 0x18, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, - 0x12, 0x20, 0x0c, 0x40, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, - 0x00, 0x4e, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x60, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x38, 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, - 0xd0, 0xa4, 0x11, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x90, 0x06, - 0x0c, 0xe8, 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x18, 0x40, 0xd5, 0xa4, 0x01, 0x18, 0x70, 0x04, - 0x80, 0x00, 0x70, 0x06, 0xd5, 0xb4, 0x01, 0x18, 0x70, 0x00, 0x80, 0x00, - 0x70, 0x02, 0xd5, 0xac, 0x01, 0x78, 0x25, 0x00, 0x90, 0x84, 0x00, 0x07, - 0x90, 0x8e, 0x00, 0x03, 0x01, 0x48, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x30, - 0x90, 0x8e, 0x00, 0x05, 0x01, 0x18, 0x20, 0x71, 0xff, 0xf6, 0x00, 0x89, - 0x00, 0x1e, 0x00, 0xee, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, - 0x00, 0x06, 0x00, 0xe6, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xff, 0xee, - 0x00, 0x21, 0x00, 0xee, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x2e, 0x05, - 0x80, 0x00, 0x20, 0x77, 0x12, 0x20, 0x8e, 0x70, 0x2e, 0x05, 0x80, 0x00, - 0x20, 0x77, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xff, 0xec, 0x0c, 0x99, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0xff, 0xf0, 0x0c, 0x69, - 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x18, 0x40, 0x70, 0x14, 0x80, 0x00, 0x70, 0x16, - 0x00, 0xee, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x03, 0x00, 0x0b, - 0x07, 0xd2, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x64, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x01, 0x01, 0x00, 0x08, - 0x44, 0x07, 0x00, 0x03, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x58, 0x0d, 0x00, 0x0b, 0x79, 0xc0, 0x00, 0x03, 0x51, 0x06, 0x00, 0x03, - 0x4c, 0x0a, 0x00, 0x03, 0xba, 0xc0, 0x00, 0x09, 0x00, 0x8a, 0x00, 0x00, - 0x0c, 0x0a, 0x00, 0x0b, 0x15, 0xfe, 0x00, 0x08, 0x34, 0x0a, 0x00, 0x03, - 0xc4, 0xc0, 0x00, 0x09, 0x70, 0x00, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x01, - 0x20, 0x00, 0x00, 0x00, 0x16, 0x80, 0x00, 0x0b, 0x80, 0x8c, 0x00, 0x08, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x40, 0x28, 0x00, 0x00, - 0x40, 0x47, 0x00, 0x0a, 0x80, 0x8c, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, - 0x08, 0x22, 0x00, 0x03, 0x40, 0x22, 0x00, 0x00, 0x00, 0x28, 0x00, 0x0b, - 0x41, 0x22, 0x00, 0x08, 0x94, 0xc0, 0x00, 0x09, 0xff, 0x00, 0x00, 0x08, - 0xff, 0xe0, 0x00, 0x09, 0x05, 0x00, 0x00, 0x08, 0x0a, 0xab, 0x00, 0x03, - 0x44, 0x47, 0x00, 0x02, 0x0e, 0xa8, 0x00, 0x0b, 0x0b, 0xfe, 0x00, 0x08, - 0x11, 0xa0, 0x00, 0x01, 0x12, 0x86, 0x00, 0x03, 0x0c, 0xa0, 0x00, 0x01, - 0x12, 0x86, 0x00, 0x03, 0x91, 0x80, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x09, 0x00, 0x08, 0x44, 0x36, 0x00, 0x0b, - 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x11, 0x00, 0x00, 0x44, 0x3e, 0x00, 0x03, 0x03, 0xfe, 0x00, 0x00, - 0x43, 0xe0, 0x00, 0x01, 0x0e, 0x83, 0x00, 0x0b, 0xc2, 0xc0, 0x00, 0x09, - 0x00, 0xff, 0x00, 0x08, 0x02, 0xe0, 0x00, 0x01, 0x0e, 0x83, 0x00, 0x0b, - 0x91, 0x80, 0x00, 0x01, 0x00, 0x05, 0x00, 0x08, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x00, 0x44, 0x4d, 0x00, 0x0b, 0x02, 0x40, 0x00, 0x02, - 0x0a, 0x80, 0x00, 0x03, 0x00, 0xfe, 0x00, 0x00, 0x32, 0x83, 0x00, 0x0b, - 0x02, 0x48, 0x00, 0x0a, 0x08, 0x5c, 0x00, 0x03, 0x91, 0x80, 0x00, 0x01, - 0x00, 0x06, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x02, 0x00, 0x08, - 0x00, 0x03, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, - 0x44, 0x5b, 0x00, 0x03, 0x11, 0x2a, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x08, - 0x02, 0x2c, 0x00, 0x08, 0x3a, 0x44, 0x00, 0x02, 0x0c, 0x0a, 0x00, 0x0b, - 0x80, 0x8c, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x17, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x11, 0x00, 0x08, 0x44, 0x68, 0x00, 0x03, 0x01, 0xfe, 0x00, 0x08, - 0x42, 0xe0, 0x00, 0x09, 0x0e, 0x74, 0x00, 0x03, 0x00, 0xfe, 0x00, 0x00, - 0x43, 0xe0, 0x00, 0x01, 0x0e, 0x74, 0x00, 0x03, 0x17, 0x34, 0x00, 0x00, - 0x15, 0x30, 0x00, 0x00, 0x16, 0x32, 0x00, 0x08, 0x0d, 0x2a, 0x00, 0x08, - 0x98, 0x80, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x1e, 0x0a, 0x00, 0x08, 0x44, 0x7a, 0x00, 0x03, 0x80, 0x8a, 0x00, 0x08, - 0x00, 0x03, 0x00, 0x08, 0x1a, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, - 0x00, 0x02, 0x00, 0x00, 0x58, 0x80, 0x00, 0x0b, 0x80, 0x66, 0x00, 0x00, - 0x36, 0x79, 0x00, 0x00, 0x44, 0x83, 0x00, 0x03, 0x58, 0x84, 0x00, 0x03, - 0x3e, 0xfe, 0x00, 0x08, 0x7f, 0x4f, 0x00, 0x02, 0x08, 0x8a, 0x00, 0x0b, - 0x0d, 0x00, 0x00, 0x00, 0x00, 0x92, 0x00, 0x0c, 0x80, 0x54, 0x00, 0x08, - 0x00, 0x11, 0x00, 0x08, 0x80, 0x74, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, - 0x1e, 0xfe, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x0b, 0x00, 0xe0, 0x00, 0x0c, - 0x00, 0x0a, 0x00, 0x0b, 0x00, 0xfe, 0x00, 0x00, 0x34, 0x9a, 0x00, 0x03, - 0x1a, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x02, 0x31, 0x00, 0x08, 0x44, 0x99, 0x00, 0x0b, - 0x03, 0xfe, 0x00, 0x00, 0x04, 0xd0, 0x00, 0x01, 0x0c, 0xd4, 0x00, 0x0b, - 0x82, 0xc0, 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x00, 0x08, 0xb2, 0x00, 0x03, 0x14, 0xdc, 0x00, 0x03, - 0x01, 0xfe, 0x00, 0x08, 0x05, 0x80, 0x00, 0x09, 0x7f, 0x06, 0x00, 0x00, - 0x86, 0x90, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x7f, 0x0c, 0x00, 0x00, - 0x02, 0xfe, 0x00, 0x08, 0xff, 0xc0, 0x00, 0x01, 0x00, 0xff, 0x00, 0x08, - 0x06, 0x80, 0x00, 0x09, 0x10, 0xb2, 0x00, 0x03, 0x7f, 0x08, 0x00, 0x08, - 0x84, 0xc0, 0x00, 0x01, 0xff, 0x00, 0x00, 0x08, 0x08, 0xd4, 0x00, 0x03, - 0xb9, 0xc0, 0x00, 0x09, 0x00, 0x30, 0x00, 0x08, 0x0c, 0xc3, 0x00, 0x0b, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x00, 0x08, - 0x1a, 0x0a, 0x00, 0x09, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x09, 0x00, 0x00, 0x44, 0xbc, 0x00, 0x03, 0x80, 0xfe, 0x00, 0x08, - 0x1a, 0x09, 0x00, 0x09, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x0a, 0x00, 0x00, 0x44, 0xc2, 0x00, 0x03, 0x00, 0xfe, 0x00, 0x00, - 0x34, 0xca, 0x00, 0x03, 0x80, 0x72, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, - 0x39, 0x44, 0x00, 0x02, 0x08, 0xc5, 0x00, 0x03, 0x00, 0xce, 0x00, 0x03, - 0x80, 0x72, 0x00, 0x00, 0x20, 0x20, 0x00, 0x08, 0x39, 0x45, 0x00, 0x0a, - 0x08, 0xca, 0x00, 0x03, 0x39, 0x46, 0x00, 0x0a, 0x0c, 0xdb, 0x00, 0x0b, - 0x00, 0x00, 0x00, 0x07, 0x39, 0x43, 0x00, 0x0a, 0x08, 0xdb, 0x00, 0x03, - 0x00, 0xce, 0x00, 0x03, 0x00, 0xfe, 0x00, 0x00, 0x34, 0xd9, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x0f, - 0x86, 0xc0, 0x00, 0x09, 0xfc, 0x00, 0x00, 0x08, 0x08, 0xd4, 0x00, 0x03, - 0x00, 0xb2, 0x00, 0x0b, 0x1c, 0x60, 0x00, 0x00, 0x1b, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x02, 0x31, 0x00, 0x08, 0x44, 0xe4, 0x00, 0x0b, - 0x58, 0xe5, 0x00, 0x0b, 0x01, 0x40, 0x00, 0x08, 0x02, 0x42, 0x00, 0x00, - 0x1f, 0x43, 0x00, 0x02, 0x0c, 0xf3, 0x00, 0x0b, 0x0d, 0x44, 0x00, 0x00, - 0x0d, 0x46, 0x00, 0x08, 0x03, 0x48, 0x00, 0x08, 0x04, 0x4a, 0x00, 0x08, - 0x03, 0x0a, 0x00, 0x08, 0x04, 0x0c, 0x00, 0x00, 0x0d, 0x06, 0x00, 0x00, - 0x0d, 0x08, 0x00, 0x08, 0x00, 0xf7, 0x00, 0x03, 0x03, 0x44, 0x00, 0x08, - 0x04, 0x46, 0x00, 0x08, 0x05, 0x48, 0x00, 0x08, 0x06, 0x4a, 0x00, 0x00, - 0x19, 0x48, 0x00, 0x0a, 0x08, 0xfa, 0x00, 0x03, 0x0d, 0x4a, 0x00, 0x08, - 0x58, 0xfa, 0x00, 0x03, 0x3e, 0xfe, 0x00, 0x08, 0x7f, 0x4f, 0x00, 0x02, - 0x09, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x92, 0x00, 0x0c, 0x80, 0x54, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0x20, 0x20, 0x00, 0x08, 0x40, 0x00, 0x00, 0x0f, - 0x3a, 0x40, 0x00, 0x0a, 0x0c, 0x0d, 0x00, 0x03, 0x2b, 0x24, 0x00, 0x08, - 0x2b, 0x24, 0x00, 0x08, 0x59, 0x0a, 0x00, 0x0b, 0x80, 0x54, 0x00, 0x08, - 0x00, 0x02, 0x00, 0x00, 0x12, 0x42, 0x00, 0x02, 0x09, 0x58, 0x00, 0x03, - 0x3a, 0x45, 0x00, 0x0a, 0x09, 0x47, 0x00, 0x0b, 0x80, 0x72, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x39, 0x45, 0x00, 0x0a, 0x09, 0x17, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x30, 0x10, 0x00, 0x00, 0x1e, 0x10, 0x00, 0x0a, - 0x7f, 0x3c, 0x00, 0x00, 0x09, 0x42, 0x00, 0x0b, 0x1d, 0x00, 0x00, 0x02, - 0x7f, 0x3a, 0x00, 0x00, 0x0d, 0x60, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x09, 0x00, 0x08, 0x45, 0x20, 0x00, 0x0b, - 0x00, 0xfe, 0x00, 0x00, 0x35, 0x3f, 0x00, 0x0b, 0x1c, 0x60, 0x00, 0x00, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x09, 0x00, 0x08, 0x45, 0x28, 0x00, 0x03, 0x00, 0xfe, 0x00, 0x00, - 0x32, 0x5b, 0x00, 0x0b, 0x00, 0x38, 0x00, 0x00, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x19, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x09, 0x00, 0x08, 0x45, 0x31, 0x00, 0x0b, 0x80, 0xc0, 0x00, 0x09, - 0x00, 0xff, 0x00, 0x08, 0x7f, 0x3e, 0x00, 0x08, 0x0d, 0x60, 0x00, 0x00, - 0x0e, 0xfe, 0x00, 0x08, 0x1f, 0x80, 0x00, 0x01, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x09, 0x00, 0x08, 0x45, 0x3b, 0x00, 0x0b, - 0x00, 0x3a, 0x00, 0x08, 0x1d, 0xfe, 0x00, 0x00, 0x01, 0x1c, 0x00, 0x0b, - 0x00, 0x36, 0x00, 0x08, 0x00, 0xe0, 0x00, 0x0c, 0x01, 0x58, 0x00, 0x0b, - 0x80, 0x74, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x01, 0x58, 0x00, 0x0b, 0x3a, 0x44, 0x00, 0x02, - 0x0a, 0x89, 0x00, 0x03, 0x80, 0x74, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2d, 0x0e, 0x00, 0x00, - 0x2d, 0x0e, 0x00, 0x00, 0x36, 0x58, 0x00, 0x03, 0x26, 0xfe, 0x00, 0x08, - 0x26, 0xfe, 0x00, 0x08, 0x27, 0x00, 0x00, 0x08, 0x27, 0x00, 0x00, 0x08, - 0x00, 0xd0, 0x00, 0x09, 0x0d, 0x6a, 0x00, 0x03, 0x80, 0x74, 0x00, 0x00, - 0x40, 0x40, 0x00, 0x08, 0x59, 0x58, 0x00, 0x03, 0x51, 0x06, 0x00, 0x03, - 0x3a, 0x46, 0x00, 0x0a, 0x0d, 0x6a, 0x00, 0x03, 0x3a, 0x47, 0x00, 0x02, - 0x09, 0x65, 0x00, 0x0b, 0x80, 0x54, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x08, 0x01, 0xb4, 0x00, 0x03, 0x92, 0xc0, 0x00, 0x09, - 0x0f, 0xc8, 0x00, 0x00, 0x08, 0x0a, 0x00, 0x03, 0x12, 0x46, 0x00, 0x0a, - 0x0e, 0x52, 0x00, 0x0b, 0x1a, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, - 0x00, 0x02, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x36, 0x2a, 0x00, 0x00, - 0x45, 0x6f, 0x00, 0x03, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x21, 0x02, 0x00, 0x00, 0x21, 0x02, 0x00, 0x00, 0x22, 0x04, 0x00, 0x00, - 0x22, 0x04, 0x00, 0x00, 0x23, 0x06, 0x00, 0x00, 0x23, 0x06, 0x00, 0x00, - 0x24, 0x08, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x25, 0x0a, 0x00, 0x00, - 0x25, 0x0a, 0x00, 0x00, 0x26, 0x0c, 0x00, 0x00, 0x26, 0x0c, 0x00, 0x00, - 0x27, 0x0e, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x28, 0x10, 0x00, 0x00, - 0x28, 0x10, 0x00, 0x00, 0x29, 0x12, 0x00, 0x00, 0x29, 0x12, 0x00, 0x00, - 0x1a, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x52, 0x00, 0x00, 0x45, 0x89, 0x00, 0x0b, - 0x92, 0xc0, 0x00, 0x09, 0x07, 0x80, 0x00, 0x08, 0x0e, 0x6e, 0x00, 0x0b, - 0x12, 0x4b, 0x00, 0x02, 0x09, 0x92, 0x00, 0x03, 0x2e, 0x4d, 0x00, 0x02, - 0x2e, 0x4d, 0x00, 0x02, 0x0a, 0x58, 0x00, 0x03, 0x3a, 0x46, 0x00, 0x0a, - 0x0d, 0xa2, 0x00, 0x0b, 0x59, 0x94, 0x00, 0x03, 0x80, 0x54, 0x00, 0x08, - 0x00, 0x04, 0x00, 0x00, 0x12, 0x43, 0x00, 0x0a, 0x09, 0xb0, 0x00, 0x03, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, - 0x19, 0x48, 0x00, 0x0a, 0x09, 0x9f, 0x00, 0x0b, 0x02, 0x28, 0x00, 0x0c, - 0x18, 0x10, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, 0x01, 0xb0, 0x00, 0x0b, - 0x19, 0x48, 0x00, 0x0a, 0x09, 0xa6, 0x00, 0x0b, 0x12, 0x43, 0x00, 0x0a, - 0x0a, 0x5b, 0x00, 0x03, 0x19, 0x4d, 0x00, 0x0a, 0x09, 0xaa, 0x00, 0x0b, - 0x12, 0x43, 0x00, 0x0a, 0x0a, 0x62, 0x00, 0x03, 0x59, 0xaa, 0x00, 0x0b, - 0x80, 0x54, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x02, 0x28, 0x00, 0x0c, - 0x18, 0x10, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, 0x80, 0x74, 0x00, 0x00, - 0xf0, 0x00, 0x00, 0x08, 0x80, 0x72, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, - 0x0d, 0x30, 0x00, 0x00, 0x3a, 0x42, 0x00, 0x02, 0x0d, 0xba, 0x00, 0x0b, - 0x15, 0xfe, 0x00, 0x08, 0x34, 0x61, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0x0b, - 0x80, 0x74, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x0c, 0x00, 0x08, 0x02, 0x33, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x0b, - 0xbb, 0xe0, 0x00, 0x09, 0x00, 0x30, 0x00, 0x08, 0x0d, 0xd0, 0x00, 0x0b, - 0x18, 0xfe, 0x00, 0x00, 0x3c, 0xe0, 0x00, 0x09, 0x09, 0xcd, 0x00, 0x03, - 0x15, 0xfe, 0x00, 0x08, 0x3c, 0xe0, 0x00, 0x09, 0x09, 0xcd, 0x00, 0x03, - 0x02, 0x23, 0x00, 0x04, 0x80, 0x76, 0x00, 0x08, 0x00, 0x40, 0x00, 0x00, - 0x02, 0x20, 0x00, 0x0b, 0x80, 0x76, 0x00, 0x08, 0x00, 0x41, 0x00, 0x08, - 0x02, 0x20, 0x00, 0x0b, 0xbb, 0xe0, 0x00, 0x09, 0x00, 0x32, 0x00, 0x00, - 0x0d, 0xd5, 0x00, 0x0b, 0x3c, 0x1e, 0x00, 0x08, 0x02, 0x20, 0x00, 0x0b, - 0xbb, 0xe0, 0x00, 0x09, 0x00, 0x3b, 0x00, 0x00, 0x0d, 0xda, 0x00, 0x0b, - 0x3c, 0x20, 0x00, 0x00, 0x02, 0x20, 0x00, 0x0b, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x35, 0x00, 0x08, 0x0d, 0xe0, 0x00, 0x0b, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x03, 0x9e, 0x00, 0x03, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x36, 0x00, 0x08, 0x0a, 0xbd, 0x00, 0x0b, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x37, 0x00, 0x00, 0x0e, 0x01, 0x00, 0x0b, 0x18, 0xfe, 0x00, 0x00, - 0x3c, 0xe0, 0x00, 0x09, 0x0d, 0xcd, 0x00, 0x0b, 0x80, 0x76, 0x00, 0x08, - 0x00, 0x40, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, - 0x00, 0x0d, 0x00, 0x00, 0x26, 0x04, 0x00, 0x08, 0x26, 0x04, 0x00, 0x08, - 0x27, 0x06, 0x00, 0x08, 0x27, 0x06, 0x00, 0x08, 0x28, 0x08, 0x00, 0x00, - 0x28, 0x08, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x04, 0x22, 0x00, 0x00, 0x45, 0xf8, 0x00, 0x0b, - 0x02, 0x28, 0x00, 0x0c, 0x80, 0x54, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x08, 0x80, 0x72, 0x00, 0x00, - 0xb0, 0x00, 0x00, 0x00, 0x01, 0xb4, 0x00, 0x03, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x38, 0x00, 0x00, 0x0e, 0x13, 0x00, 0x0b, 0x18, 0xfe, 0x00, 0x00, - 0x3c, 0xe0, 0x00, 0x09, 0x0a, 0x10, 0x00, 0x03, 0x15, 0xfe, 0x00, 0x08, - 0x3c, 0xe0, 0x00, 0x09, 0x0d, 0xc9, 0x00, 0x03, 0x02, 0x23, 0x00, 0x04, - 0x80, 0x76, 0x00, 0x08, 0x00, 0x40, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x0b, 0x80, 0x76, 0x00, 0x08, - 0x00, 0x42, 0x00, 0x08, 0x02, 0x20, 0x00, 0x0b, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x16, 0x00, 0x00, 0x0e, 0x20, 0x00, 0x0b, 0x80, 0x74, 0x00, 0x00, - 0x08, 0x08, 0x00, 0x08, 0x3a, 0x44, 0x00, 0x02, 0x0c, 0x0c, 0x00, 0x0b, - 0x80, 0x74, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, - 0x3d, 0x30, 0x00, 0x0a, 0x7f, 0x00, 0x00, 0x00, 0xbc, 0x80, 0x00, 0x01, - 0x00, 0x07, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x0b, 0x19, 0x30, 0x00, 0x0a, - 0x7f, 0x00, 0x00, 0x00, 0x98, 0x80, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x08, 0x46, 0x31, 0x00, 0x0b, - 0x40, 0x00, 0x00, 0x0f, 0x22, 0x36, 0x00, 0x0b, 0x08, 0x70, 0x00, 0x08, - 0x40, 0x00, 0x00, 0x0f, 0x7e, 0x33, 0x00, 0x0b, 0xbb, 0xe0, 0x00, 0x09, - 0x00, 0x30, 0x00, 0x08, 0x0e, 0x33, 0x00, 0x03, 0x18, 0xfe, 0x00, 0x00, - 0x3c, 0xe0, 0x00, 0x09, 0x0a, 0x44, 0x00, 0x0b, 0x15, 0xfe, 0x00, 0x08, - 0x3c, 0xe0, 0x00, 0x09, 0x0a, 0x44, 0x00, 0x0b, 0x02, 0x23, 0x00, 0x04, - 0x80, 0x76, 0x00, 0x08, 0x00, 0x40, 0x00, 0x00, 0x02, 0x46, 0x00, 0x0b, - 0x80, 0x76, 0x00, 0x08, 0x00, 0x41, 0x00, 0x08, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x03, 0xba, 0xc0, 0x00, 0x09, - 0x00, 0x90, 0x00, 0x08, 0x0a, 0x4f, 0x00, 0x03, 0x80, 0x74, 0x00, 0x00, - 0x07, 0x06, 0x00, 0x00, 0x02, 0x51, 0x00, 0x0b, 0x80, 0x74, 0x00, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x0f, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x23, 0x00, 0x00, 0x02, 0x8e, 0x00, 0x03, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x08, 0x00, 0x00, 0x02, 0x8e, 0x00, 0x03, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x22, 0x00, 0x08, 0x02, 0x8e, 0x00, 0x03, 0x02, 0x28, 0x00, 0x0c, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x07, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, - 0x18, 0x10, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, 0x02, 0x9a, 0x00, 0x03, - 0x02, 0x28, 0x00, 0x0c, 0x80, 0x10, 0x00, 0x08, 0x00, 0x1b, 0x00, 0x08, - 0x02, 0x33, 0x00, 0x0c, 0x18, 0x10, 0x00, 0x00, 0x02, 0x33, 0x00, 0x0c, - 0x80, 0x74, 0x00, 0x00, 0xf0, 0x80, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x08, 0x0d, 0x30, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x09, 0x00, 0x08, 0x02, 0x8e, 0x00, 0x03, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x05, 0x00, 0x08, 0x02, 0x8e, 0x00, 0x03, - 0x16, 0x48, 0x00, 0x0a, 0x0c, 0x6f, 0x00, 0x0b, 0x80, 0x8c, 0x00, 0x08, - 0x00, 0x01, 0x00, 0x00, 0x80, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, - 0x41, 0x43, 0x00, 0x0a, 0x08, 0x6f, 0x00, 0x03, 0x3a, 0x44, 0x00, 0x02, - 0x0c, 0x0a, 0x00, 0x0b, 0x0d, 0x2a, 0x00, 0x08, 0x02, 0x8e, 0x00, 0x03, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x03, 0x00, 0x08, 0x02, 0x92, 0x00, 0x0b, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x02, 0x92, 0x00, 0x0b, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x02, 0x92, 0x00, 0x0b, - 0x3a, 0x47, 0x00, 0x02, 0x0d, 0x58, 0x00, 0x0b, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x06, 0x00, 0x08, 0x02, 0x92, 0x00, 0x0b, 0x80, 0x74, 0x00, 0x00, - 0xf0, 0x00, 0x00, 0x08, 0x80, 0x72, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, - 0x02, 0x33, 0x00, 0x0c, 0x02, 0x49, 0x00, 0x04, 0x3a, 0x40, 0x00, 0x0a, - 0x08, 0x0a, 0x00, 0x03, 0x80, 0x10, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x08, - 0x02, 0x33, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x0b, 0x80, 0x74, 0x00, 0x00, - 0xf0, 0x80, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x30, 0x00, 0x00, 0x08, - 0x0d, 0x30, 0x00, 0x00, 0x2e, 0x4d, 0x00, 0x02, 0x2e, 0x4d, 0x00, 0x02, - 0x0a, 0xa5, 0x00, 0x0b, 0x80, 0x54, 0x00, 0x08, 0x00, 0x19, 0x00, 0x00, - 0x00, 0x0a, 0x00, 0x0b, 0x80, 0x54, 0x00, 0x08, 0x00, 0x09, 0x00, 0x08, - 0x00, 0x0a, 0x00, 0x0b, 0x3a, 0x44, 0x00, 0x02, 0x0c, 0x0a, 0x00, 0x0b, - 0x02, 0x83, 0x00, 0x0b, 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x44, 0x47, 0x00, 0x02, 0x0a, 0xd1, 0x00, 0x0b, 0xc0, 0xc0, 0x00, 0x01, - 0x00, 0xff, 0x00, 0x08, 0xff, 0xe0, 0x00, 0x09, 0x00, 0xff, 0x00, 0x08, - 0x0e, 0xa8, 0x00, 0x0b, 0xc1, 0xe0, 0x00, 0x01, 0xff, 0xff, 0x00, 0x08, - 0x0e, 0xa8, 0x00, 0x0b, 0x80, 0x10, 0x00, 0x08, 0x00, 0x13, 0x00, 0x00, - 0x02, 0x33, 0x00, 0x0c, 0x80, 0x74, 0x00, 0x00, 0x02, 0x02, 0x00, 0x08, - 0x00, 0x0a, 0x00, 0x0b, 0x3a, 0x40, 0x00, 0x0a, 0x0e, 0xce, 0x00, 0x0b, - 0x80, 0x74, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, - 0x3c, 0xfe, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x43, 0xe0, 0x00, 0x01, 0x0e, 0xcc, 0x00, 0x03, 0x42, 0xfe, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x01, 0x00, 0xff, 0x00, 0x08, 0x00, 0xe0, 0x00, 0x09, - 0x0a, 0xa8, 0x00, 0x03, 0x0d, 0x08, 0x00, 0x08, 0x03, 0x21, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, - 0x03, 0xa7, 0x00, 0x0c, 0x80, 0x8c, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, - 0x04, 0xfe, 0x00, 0x08, 0x33, 0x8a, 0x00, 0x03, 0x04, 0x60, 0x00, 0x00, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x09, 0x00, 0x08, 0x46, 0xdb, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, - 0x80, 0xc0, 0x00, 0x09, 0x00, 0xff, 0x00, 0x08, 0x7f, 0x00, 0x00, 0x00, - 0x80, 0xe0, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x0a, 0xf5, 0x00, 0x0b, - 0x80, 0xe0, 0x00, 0x01, 0x00, 0x05, 0x00, 0x08, 0x0a, 0xf5, 0x00, 0x0b, - 0x80, 0xe0, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, 0x0a, 0xf5, 0x00, 0x0b, - 0x82, 0xc0, 0x00, 0x01, 0xff, 0x00, 0x00, 0x08, 0x7f, 0x04, 0x00, 0x08, - 0x82, 0xe0, 0x00, 0x09, 0x06, 0x00, 0x00, 0x08, 0x0a, 0xf5, 0x00, 0x0b, - 0x82, 0xe0, 0x00, 0x09, 0x05, 0x00, 0x00, 0x08, 0x0a, 0xf5, 0x00, 0x0b, - 0x82, 0xe0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x8a, 0x00, 0x03, - 0xc4, 0xc0, 0x00, 0x09, 0x70, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x09, - 0x10, 0x00, 0x00, 0x00, 0x0b, 0x21, 0x00, 0x03, 0x03, 0x98, 0x00, 0x0c, - 0x39, 0x41, 0x00, 0x02, 0x0b, 0x00, 0x00, 0x03, 0x80, 0x72, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, 0x04, 0x60, 0x00, 0x00, - 0x80, 0xfe, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x22, 0x09, 0x00, 0x08, 0x47, 0x06, 0x00, 0x0b, - 0x11, 0xfe, 0x00, 0x00, 0x33, 0x1c, 0x00, 0x03, 0x91, 0x80, 0x00, 0x01, - 0x00, 0x02, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, 0x06, 0x09, 0x00, 0x08, - 0x47, 0x10, 0x00, 0x03, 0x42, 0xfe, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x01, - 0xff, 0x00, 0x00, 0x08, 0x03, 0xe0, 0x00, 0x09, 0x0f, 0x19, 0x00, 0x03, - 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x03, - 0x91, 0x80, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x03, 0x03, 0x00, 0x0b, - 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x00, 0x03, 0x7b, 0x00, 0x0b, 0x03, 0x98, 0x00, 0x0c, - 0x39, 0x41, 0x00, 0x02, 0x0b, 0x27, 0x00, 0x03, 0x80, 0x72, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, 0x10, 0x42, 0x00, 0x0a, - 0x0b, 0x2c, 0x00, 0x0b, 0x03, 0x60, 0x00, 0x04, 0x11, 0xfe, 0x00, 0x00, - 0x37, 0x31, 0x00, 0x0b, 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x7b, 0x00, 0x0b, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0xfe, 0x00, 0x08, - 0x37, 0x46, 0x00, 0x0b, 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x91, 0x80, 0x00, 0x01, 0x00, 0x05, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x66, 0x00, 0x00, 0x00, 0x09, 0x00, 0x08, 0x47, 0x3c, 0x00, 0x0b, - 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x08, 0x00, 0x1b, 0x00, 0x08, - 0x43, 0x04, 0x00, 0x08, 0x42, 0x06, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x12, 0x00, 0x00, 0x47, 0x44, 0x00, 0x0b, 0x03, 0x5d, 0x00, 0x03, - 0x80, 0x8c, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x06, 0x09, 0x00, 0x08, 0x47, 0x4d, 0x00, 0x0b, 0x80, 0x66, 0x00, 0x00, - 0x22, 0x0a, 0x00, 0x08, 0x47, 0x50, 0x00, 0x0b, 0x42, 0xfe, 0x00, 0x00, - 0xff, 0xc0, 0x00, 0x01, 0xff, 0x00, 0x00, 0x08, 0x7f, 0x04, 0x00, 0x08, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x91, 0x80, 0x00, 0x01, - 0x00, 0x02, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x1a, 0x00, 0x08, 0x47, 0x5c, 0x00, 0x0b, 0x80, 0x72, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x03, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x13, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x11, 0x00, 0x00, 0x47, 0x65, 0x00, 0x0b, 0x02, 0xfe, 0x00, 0x08, - 0x03, 0xe0, 0x00, 0x09, 0x0f, 0x6b, 0x00, 0x03, 0x0d, 0x22, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x0f, 0x82, 0x80, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, - 0x13, 0x80, 0x00, 0x01, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x22, 0x09, 0x00, 0x08, 0x47, 0x71, 0x00, 0x0b, 0x02, 0x00, 0x00, 0x0a, - 0xff, 0xc0, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x7f, 0x06, 0x00, 0x00, - 0x13, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, 0x06, 0x0a, 0x00, 0x08, - 0x47, 0x79, 0x00, 0x03, 0x40, 0x00, 0x00, 0x0f, 0x3a, 0x44, 0x00, 0x02, - 0x0c, 0x0a, 0x00, 0x0b, 0x2f, 0x44, 0x00, 0x0a, 0x2f, 0x44, 0x00, 0x0a, - 0x0e, 0x83, 0x00, 0x0b, 0x80, 0x8a, 0x00, 0x08, 0x00, 0x03, 0x00, 0x08, - 0x80, 0x74, 0x00, 0x00, 0xf0, 0x80, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x08, 0x5b, 0x86, 0x00, 0x0b, 0x80, 0x54, 0x00, 0x08, - 0x00, 0x19, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0b, 0x3a, 0x44, 0x00, 0x02, - 0x0c, 0x0a, 0x00, 0x0b, 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x11, 0x00, 0x08, 0x02, 0x33, 0x00, 0x0c, - 0x42, 0xfe, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x01, 0x00, 0xff, 0x00, 0x08, - 0x7f, 0x10, 0x00, 0x08, 0x02, 0x33, 0x00, 0x0c, 0x43, 0x10, 0x00, 0x08, - 0x02, 0x92, 0x00, 0x0b, 0x39, 0x41, 0x00, 0x02, 0x0b, 0x9b, 0x00, 0x0b, - 0x40, 0x00, 0x00, 0x0f, 0x80, 0x72, 0x00, 0x00, 0x04, 0x04, 0x00, 0x08, - 0x40, 0x00, 0x00, 0x0f, 0x80, 0x10, 0x00, 0x08, 0x00, 0x12, 0x00, 0x08, - 0x02, 0x33, 0x00, 0x0c, 0x03, 0x60, 0x00, 0x04, 0x11, 0x10, 0x00, 0x00, - 0x02, 0x33, 0x00, 0x0c, 0x11, 0xfe, 0x00, 0x00, 0x37, 0xa1, 0x00, 0x0b, - 0x00, 0x0a, 0x00, 0x0b, 0xc2, 0xc0, 0x00, 0x09, 0x00, 0xff, 0x00, 0x08, - 0x7f, 0x00, 0x00, 0x00, 0xc3, 0xc0, 0x00, 0x01, 0xff, 0x00, 0x00, 0x08, - 0x00, 0xd0, 0x00, 0x09, 0x0b, 0xcc, 0x00, 0x03, 0x0d, 0x0a, 0x00, 0x00, - 0x85, 0x80, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x08, 0x09, 0x00, 0x00, 0x47, 0xb6, 0x00, 0x03, 0x04, 0xfe, 0x00, 0x08, - 0x33, 0xc5, 0x00, 0x0b, 0x04, 0x60, 0x00, 0x00, 0x80, 0x62, 0x00, 0x08, - 0x00, 0x04, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x02, 0x11, 0x00, 0x00, - 0x47, 0xbe, 0x00, 0x0b, 0x01, 0xfe, 0x00, 0x08, 0x00, 0xe0, 0x00, 0x09, - 0x0f, 0xc5, 0x00, 0x0b, 0x02, 0xfe, 0x00, 0x08, 0x43, 0xe0, 0x00, 0x01, - 0x0b, 0xcb, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x7f, 0x0a, 0x00, 0x00, - 0xff, 0xe0, 0x00, 0x09, 0x08, 0x00, 0x00, 0x00, 0x0f, 0xaf, 0x00, 0x0b, - 0x0d, 0x08, 0x00, 0x08, 0x40, 0x00, 0x00, 0x0f, 0x43, 0xfe, 0x00, 0x08, - 0x3e, 0x80, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x01, 0x7f, 0xff, 0x00, 0x00, - 0x0d, 0x60, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x08, 0x09, 0x00, 0x00, 0x47, 0xd4, 0x00, 0x0b, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x84, 0xc0, 0x00, 0x01, 0xff, 0x00, 0x00, 0x08, - 0x7f, 0x60, 0x00, 0x0a, 0x7f, 0x60, 0x00, 0x0a, 0x7f, 0x60, 0x00, 0x0a, - 0x7f, 0x60, 0x00, 0x0a, 0x7f, 0x60, 0x00, 0x0a, 0x7f, 0x60, 0x00, 0x0a, - 0x7f, 0x60, 0x00, 0x0a, 0x7f, 0x60, 0x00, 0x0a, 0xff, 0x80, 0x00, 0x09, - 0x10, 0x00, 0x00, 0x00, 0x7f, 0x62, 0x00, 0x08, 0x80, 0x66, 0x00, 0x00, - 0x08, 0x09, 0x00, 0x00, 0x47, 0xe6, 0x00, 0x03, 0x40, 0x00, 0x00, 0x0f, - 0x8d, 0x5b, 0xea, 0xc4, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, - 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, - 0x12, 0xb0 -}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2300ipx_version = 3*1024+3; +#else +unsigned short risc_code_version = 3*1024+3; +#endif -struct firmware ql2300_fw = { - .size = sizeof(ql2300_fw_bin), - .data = ql2300_fw_bin +#ifdef UNIQUE_FW_NAME +unsigned char fw2300ipx_version_str[] = {3, 3,20}; +#else +unsigned char firmware_version[] = {3, 3,20}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2300ipx_VERSION_STRING "3.03.20" +#else +#define FW_VERSION_STRING "3.03.20" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2300ipx_addr01 = 0x0800 ; +#else +unsigned short risc_code_addr01 = 0x0800 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2300ipx_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0470, 0x0000, 0x0000, 0xf091, 0x0000, 0x0003, 0x0003, 0x0014, + 0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x332e, 0x3033, 0x2e32, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, + 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, + 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, + 0x400f, 0x2091, 0x2800, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, + 0x2091, 0x2a00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, + 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, + 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, + 0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78, + 0x7883, 0x0004, 0x2089, 0x2d93, 0x2051, 0x1800, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e52, 0x2029, + 0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9, + 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, + 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff, + 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, + 0x4104, 0x8001, 0x1de0, 0x756e, 0x7672, 0x776a, 0x7476, 0x747a, + 0x00e6, 0x2071, 0x1ad1, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170, + 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, + 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7170, 0x3400, + 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, + 0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, + 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f26, 0x080c, + 0x613c, 0x080c, 0xb269, 0x080c, 0x10dd, 0x080c, 0x12fc, 0x080c, + 0x1bd7, 0x080c, 0x0d57, 0x080c, 0x1062, 0x080c, 0x34b6, 0x080c, + 0x7946, 0x080c, 0x6b7c, 0x080c, 0x8a69, 0x080c, 0x874a, 0x080c, + 0x24b7, 0x080c, 0x93a5, 0x080c, 0x8066, 0x080c, 0x22e8, 0x080c, + 0x241c, 0x080c, 0x24ac, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, + 0x091f, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, + 0x4000, 0x7833, 0x0010, 0x0e04, 0x0913, 0x2091, 0x5000, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x2071, + 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, + 0x1178, 0x080c, 0x4d09, 0x080c, 0x34dd, 0x080c, 0x79b7, 0x080c, + 0x7122, 0x080c, 0x8b50, 0x080c, 0x8776, 0x080c, 0x2cdd, 0x0c58, + 0x000b, 0x0c78, 0x0944, 0x0945, 0x0ae0, 0x0942, 0x0ba0, 0x0d56, + 0x0d56, 0x0d56, 0x080c, 0x0dc5, 0x0005, 0x0126, 0x00f6, 0x2091, + 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab3, 0x080c, 0x0e94, + 0x080c, 0x7637, 0x0150, 0x080c, 0x765a, 0x15a0, 0x2079, 0x0100, + 0x7828, 0x9085, 0x1800, 0x782a, 0x0468, 0x080c, 0x7563, 0x7000, + 0x9086, 0x0001, 0x1904, 0x0ab3, 0x7098, 0x9086, 0x0029, 0x1904, + 0x0ab3, 0x080c, 0x8733, 0x080c, 0x8725, 0x2001, 0x0161, 0x2003, + 0x0001, 0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, + 0x7a2a, 0x2011, 0x74b2, 0x080c, 0x883d, 0x2011, 0x74a5, 0x080c, + 0x8917, 0x2011, 0x5f97, 0x080c, 0x883d, 0x2011, 0x8030, 0x901e, + 0x7396, 0x04d0, 0x080c, 0x583f, 0x2079, 0x0100, 0x7844, 0x9005, + 0x1904, 0x0ab3, 0x2011, 0x5f97, 0x080c, 0x883d, 0x2011, 0x74b2, + 0x080c, 0x883d, 0x2011, 0x74a5, 0x080c, 0x8917, 0x2001, 0x0265, + 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, + 0x2001, 0x19a7, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, + 0x080c, 0x60e4, 0x00ce, 0x0804, 0x0ab3, 0x780f, 0x006b, 0x7a28, + 0x080c, 0x763f, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, + 0x7a2a, 0x2011, 0x8010, 0x73d8, 0x2001, 0x19a8, 0x2003, 0x0001, + 0x080c, 0x2b82, 0x080c, 0x4c44, 0x7248, 0xc284, 0x724a, 0x2001, + 0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xa9b0, 0x2011, + 0x0004, 0x080c, 0xd0e8, 0x080c, 0x6947, 0x080c, 0x7637, 0x1120, + 0x080c, 0x2bc6, 0x02e0, 0x0400, 0x080c, 0x60eb, 0x0140, 0x7097, + 0x0001, 0x70d3, 0x0000, 0x080c, 0x5a11, 0x0804, 0x0ab3, 0x080c, + 0x57d5, 0xd094, 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, + 0x080c, 0x57d9, 0xd0d4, 0x1118, 0x080c, 0x2bc6, 0x1270, 0x2011, + 0x180c, 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x57d9, 0xd0d4, 0x1db8, + 0x2011, 0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, + 0xc0bd, 0x2012, 0x080c, 0x6a9b, 0x1128, 0xd0a4, 0x0118, 0x2204, + 0xc0fd, 0x2012, 0x080c, 0x6a61, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, + 0x00a8, 0x707f, 0x0000, 0x080c, 0x7637, 0x1130, 0x70b0, 0x9005, + 0x1168, 0x080c, 0xd52b, 0x0050, 0x080c, 0xd52b, 0x70dc, 0xd09c, + 0x1128, 0x70b0, 0x9005, 0x0110, 0x080c, 0x60c1, 0x70e7, 0x0000, + 0x70e3, 0x0000, 0x70a7, 0x0000, 0x080c, 0x2bce, 0x0228, 0x2011, + 0x0101, 0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x7637, 0x1178, + 0x9016, 0x0016, 0x080c, 0x298b, 0x2019, 0x196d, 0x211a, 0x001e, + 0x705f, 0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, + 0x196d, 0x201b, 0x0000, 0x2079, 0x1847, 0x7804, 0xd0ac, 0x0108, + 0xc295, 0x72de, 0x080c, 0x7637, 0x0118, 0x9296, 0x0004, 0x0548, + 0x2011, 0x0001, 0x080c, 0xd0e8, 0x70ab, 0x0000, 0x70af, 0xffff, + 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, + 0x0003, 0x782a, 0x00fe, 0x080c, 0x3000, 0x2011, 0x0005, 0x080c, + 0xaabf, 0x080c, 0x9ab1, 0x080c, 0x7637, 0x0148, 0x00c6, 0x2061, + 0x0100, 0x0016, 0x080c, 0x298b, 0x61e2, 0x001e, 0x00ce, 0x012e, + 0x0420, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002, 0x00f6, + 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, + 0x00fe, 0x2011, 0x0005, 0x080c, 0xaabf, 0x080c, 0x9ab1, 0x080c, + 0x7637, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x298b, + 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, + 0x080c, 0x7637, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, + 0x080c, 0x7637, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, + 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, + 0x090c, 0x334c, 0x8108, 0x1f04, 0x0ac7, 0x707f, 0x0000, 0x7080, + 0x9084, 0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00ce, 0x0005, + 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, + 0x0b9d, 0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, 0x3000, 0x080c, + 0x9ab1, 0x0804, 0x0b9d, 0x70dc, 0xd0ac, 0x1110, 0xd09c, 0x0558, + 0xd084, 0x0548, 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, + 0xd08c, 0x0508, 0x080c, 0x33af, 0x11d0, 0x70e0, 0x9086, 0xffff, + 0x01b0, 0x080c, 0x31bc, 0x080c, 0x9ab1, 0x70dc, 0xd094, 0x1904, + 0x0b9d, 0x2011, 0x0001, 0x080c, 0xd7e3, 0x0110, 0x2011, 0x0003, + 0x901e, 0x080c, 0x31f6, 0x080c, 0x9ab1, 0x0804, 0x0b9d, 0x70e4, + 0x9005, 0x1904, 0x0b9d, 0x70a8, 0x9005, 0x1904, 0x0b9d, 0x70dc, + 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x0b9d, 0x080c, 0x6a61, 0x1904, + 0x0b9d, 0x080c, 0x6ab4, 0x1904, 0x0b9d, 0x080c, 0x6a9b, 0x01c0, + 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6724, + 0x1118, 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b3d, + 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0b9d, + 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b4, + 0x080c, 0x0f96, 0x2011, 0x19ce, 0x080c, 0x0f96, 0x7030, 0xc08c, + 0x7032, 0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x0e76, 0x9006, + 0x080c, 0x281c, 0x080c, 0x33af, 0x0118, 0x080c, 0x4de1, 0x0050, + 0x0036, 0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4dfb, + 0x004e, 0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x765a, 0x0150, + 0x080c, 0x7637, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, + 0xffdf, 0x782a, 0x00fe, 0x2001, 0x19e9, 0x2004, 0x9086, 0x0005, + 0x1120, 0x2011, 0x0000, 0x080c, 0xaabf, 0x2011, 0x0000, 0x080c, + 0xaac9, 0x080c, 0x9ab1, 0x080c, 0x9bd3, 0x012e, 0x00be, 0x0005, + 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, + 0x7904, 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x60aa, + 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, + 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, + 0x7954, 0xd1ac, 0x1904, 0x0c2d, 0x2001, 0x19a8, 0x2004, 0x9005, + 0x1518, 0x080c, 0x2c49, 0x1148, 0x2001, 0x0001, 0x080c, 0x2bb1, + 0x2001, 0x0001, 0x080c, 0x2b94, 0x00b8, 0x080c, 0x2c51, 0x1138, + 0x9006, 0x080c, 0x2bb1, 0x9006, 0x080c, 0x2b94, 0x0068, 0x080c, + 0x2c59, 0x1d50, 0x2001, 0x1998, 0x2004, 0xd0fc, 0x0108, 0x0020, + 0x080c, 0x29bf, 0x0804, 0x0d0d, 0x080c, 0x7648, 0x0148, 0x080c, + 0x765a, 0x1118, 0x080c, 0x7941, 0x0050, 0x080c, 0x763f, 0x0dd0, + 0x080c, 0x793c, 0x080c, 0x7932, 0x080c, 0x7563, 0x0058, 0x080c, + 0x7637, 0x0140, 0x2009, 0x00f8, 0x080c, 0x60aa, 0x7843, 0x0090, + 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, + 0x7637, 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d12, 0x1f04, 0x0c0c, + 0x0070, 0x7824, 0x080c, 0x7651, 0x0118, 0xd0ac, 0x1904, 0x0d12, + 0x9084, 0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d12, 0x2001, + 0x0001, 0x080c, 0x281c, 0x0804, 0x0d25, 0x2001, 0x19a8, 0x2004, + 0x9005, 0x1518, 0x080c, 0x2c49, 0x1148, 0x2001, 0x0001, 0x080c, + 0x2bb1, 0x2001, 0x0001, 0x080c, 0x2b94, 0x00b8, 0x080c, 0x2c51, + 0x1138, 0x9006, 0x080c, 0x2bb1, 0x9006, 0x080c, 0x2b94, 0x0068, + 0x080c, 0x2c59, 0x1d50, 0x2001, 0x1998, 0x2004, 0xd0fc, 0x0108, + 0x0020, 0x080c, 0x29bf, 0x0804, 0x0d0d, 0x7850, 0x9085, 0x0040, + 0x7852, 0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2c61, + 0x9085, 0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c66, + 0x080c, 0x88f7, 0x1f04, 0x0c66, 0x7850, 0x9085, 0x0400, 0x9084, + 0xdfbf, 0x7852, 0x793a, 0x080c, 0x7648, 0x0148, 0x080c, 0x765a, + 0x1118, 0x080c, 0x7941, 0x0050, 0x080c, 0x763f, 0x0dd0, 0x080c, + 0x793c, 0x080c, 0x7932, 0x080c, 0x7563, 0x0020, 0x2009, 0x00f8, + 0x080c, 0x60aa, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c8c, 0x7850, + 0x9085, 0x1400, 0x7852, 0x080c, 0x7637, 0x0120, 0x7843, 0x0090, + 0x7843, 0x0010, 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x88f7, + 0x7820, 0xd09c, 0x1588, 0x080c, 0x7637, 0x0904, 0x0cf2, 0x7824, + 0xd0ac, 0x1904, 0x0d12, 0x080c, 0x765a, 0x1530, 0x0046, 0x2021, + 0x0320, 0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2c61, + 0x7824, 0x9084, 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, + 0x1810, 0x2004, 0x9084, 0x9000, 0x0110, 0x080c, 0x0d33, 0x8421, + 0x1158, 0x1d04, 0x0ccd, 0x080c, 0x88f7, 0x080c, 0x793c, 0x080c, + 0x7932, 0x7003, 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0cda, + 0x080c, 0x88f7, 0x2009, 0x199b, 0x2104, 0x9005, 0x0118, 0x8001, + 0x200a, 0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, + 0x080c, 0x2c42, 0x7924, 0x080c, 0x2c61, 0xd19c, 0x0110, 0x080c, + 0x2b82, 0x00d8, 0x080c, 0x7648, 0x1140, 0x94a2, 0x03e8, 0x1128, + 0x080c, 0x760f, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, + 0x2c61, 0x7824, 0x080c, 0x7651, 0x0110, 0xd0ac, 0x1158, 0x9084, + 0x1800, 0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, + 0x281c, 0x0078, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, + 0x918d, 0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, + 0x782a, 0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x19a8, 0x2003, + 0x0000, 0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, + 0x004e, 0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x88f7, + 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, + 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e, 0x7004, 0x9086, + 0x0001, 0x1110, 0x080c, 0x34dd, 0x00ee, 0x0005, 0x0005, 0x2a70, + 0x2061, 0x19ac, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0014, + 0x600f, 0x0137, 0x2001, 0x197c, 0x900e, 0x2102, 0x7196, 0x2001, + 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f, 0xffff, 0x0008, + 0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xd52b, 0x70eb, + 0x00c0, 0x2061, 0x196c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, + 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f, + 0x07d0, 0x2061, 0x1974, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, + 0x1989, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, + 0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6724, + 0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, + 0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, + 0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, + 0x2079, 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, + 0x0dc7, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, + 0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, + 0x7886, 0x3900, 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, + 0x681c, 0x78b2, 0x2001, 0x1a09, 0x2004, 0x78b6, 0x2001, 0x1a86, + 0x2004, 0x78ba, 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, + 0x5000, 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, + 0x1aa9, 0x7a08, 0x226a, 0x2069, 0x1aaa, 0x7a18, 0x226a, 0x8d68, + 0x7a1c, 0x226a, 0x782c, 0x2019, 0x1ab7, 0x201a, 0x2019, 0x1aba, + 0x9016, 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, + 0x9386, 0x1acf, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, + 0xdead, 0x2019, 0x1ab8, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, + 0x0000, 0x2069, 0x1a89, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, + 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0e26, 0x002e, 0x003e, 0x00de, + 0x015e, 0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a1c, 0x2004, 0x9005, + 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, + 0x2003, 0x0002, 0x2003, 0x1001, 0x080c, 0x57e4, 0x1108, 0x0099, + 0x0cd8, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, + 0x0600, 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, + 0x017f, 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, + 0x0eee, 0x20a9, 0x0900, 0x080c, 0x0f0f, 0x2011, 0x0040, 0x080c, + 0x0eee, 0x20a9, 0x0900, 0x080c, 0x0f0f, 0x0c78, 0x0026, 0x080c, + 0x0efb, 0x1118, 0x2011, 0x0040, 0x0098, 0x2011, 0x010e, 0x2214, + 0x9294, 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, + 0x2011, 0x6840, 0xd0e4, 0x70ef, 0x0000, 0x1120, 0x70ef, 0x0fa0, + 0x080c, 0x0f00, 0x002e, 0x0005, 0x0026, 0x080c, 0x0efb, 0x0128, + 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, + 0x0f00, 0x002e, 0x0005, 0x0026, 0x70ef, 0x0000, 0x080c, 0x0efb, + 0x1148, 0x080c, 0x2c59, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, + 0x8282, 0x0040, 0x080c, 0x2c59, 0x1118, 0x2011, 0xcdc5, 0x0010, + 0x2011, 0xcac2, 0x080c, 0x0f00, 0x002e, 0x0005, 0x00e6, 0x0006, + 0x2071, 0x1800, 0xd0b4, 0x70e8, 0x1110, 0xc0e4, 0x0048, 0x0006, + 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x000e, 0x70ef, 0x0000, 0xc0e5, + 0x0079, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, + 0x70e8, 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, + 0x70ea, 0x7000, 0x9084, 0x0007, 0x000b, 0x0005, 0x0ebd, 0x0e94, + 0x0e94, 0x0e76, 0x0ea3, 0x0e94, 0x0e94, 0x0ea3, 0x0016, 0x3b08, + 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, + 0x20d0, 0x001e, 0x0005, 0x2001, 0x183a, 0x2004, 0xd0dc, 0x0005, + 0x9e86, 0x1800, 0x190c, 0x0dc5, 0x70e8, 0xd0e4, 0x0108, 0xc2e5, + 0x72ea, 0xd0e4, 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, + 0x0f0f, 0x2091, 0x6000, 0x1f04, 0x0f0f, 0x0005, 0x890e, 0x810e, + 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, + 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, + 0x0036, 0x0096, 0x2061, 0x188d, 0x600b, 0x0000, 0x600f, 0x0000, + 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, + 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, + 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, + 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, + 0x189d, 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, + 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, + 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, + 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, + 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, + 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, + 0x0096, 0x3348, 0x080c, 0x0f16, 0x2100, 0x9300, 0x2098, 0x22e0, + 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, + 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, + 0x71b8, 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, + 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, + 0x9298, 0x0008, 0x23a0, 0x4001, 0x707c, 0x8007, 0x7180, 0x810f, + 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, + 0x0da5, 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, + 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x1040, + 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x10b9, + 0x090c, 0x0dc5, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, + 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73c0, + 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0dc5, + 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0dc5, 0xa000, 0x0c98, 0x012e, + 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, + 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x1910, 0x7010, 0x9005, + 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0dc5, 0xa000, + 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x0126, 0x2091, 0x8000, 0x70c0, 0x8001, 0x0270, 0x70c2, + 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, + 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x70c0, 0x90ca, 0x0020, + 0x0268, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, + 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, + 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x012e, + 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, + 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, + 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, + 0x0c90, 0x2071, 0x188d, 0x7000, 0x9005, 0x11a0, 0x2001, 0x0534, + 0xa802, 0x2048, 0x2009, 0x4d00, 0x8940, 0x2800, 0xa802, 0xa95e, + 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, + 0x0040, 0x0c90, 0x2071, 0x188d, 0x7104, 0x7200, 0x82ff, 0x01d0, + 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, + 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, + 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, + 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74be, 0x74c2, + 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, + 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, + 0x0534, 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, + 0x0250, 0x2071, 0x188d, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, + 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071, 0x1a1b, + 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071, 0x0000, + 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, + 0x0040, 0x7022, 0x1f04, 0x10f1, 0x702b, 0x0020, 0x00ee, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x1a1b, + 0x701c, 0x9088, 0x1a25, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, + 0x7120, 0x9106, 0x090c, 0x0dc5, 0x7004, 0x9005, 0x1128, 0x00f6, + 0x2079, 0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x00e6, 0x2071, 0x1a1b, 0x7004, 0x9005, 0x1128, + 0x00f6, 0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, + 0x7004, 0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, + 0x113a, 0x12bd, 0x1138, 0x1138, 0x12b1, 0x12b1, 0x12b1, 0x12b1, + 0x080c, 0x0dc5, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, + 0x0001, 0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, + 0x9180, 0x1a25, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, + 0x7122, 0x782b, 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, + 0x780a, 0xa898, 0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, + 0x701a, 0xa868, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, + 0x0005, 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, + 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, + 0x7212, 0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, + 0x001e, 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, + 0x20e0, 0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, + 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, + 0x9006, 0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, + 0x3300, 0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, + 0x001e, 0x0005, 0x2009, 0x1a1b, 0x2104, 0xc095, 0x200a, 0x080c, + 0x1117, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1a1b, 0x00f6, 0x2079, + 0x0080, 0x792c, 0xd1bc, 0x190c, 0x0dbe, 0x782b, 0x0002, 0xd1fc, + 0x0120, 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, + 0x0005, 0x1128, 0x11d0, 0x1204, 0x12dc, 0x0dc5, 0x12f7, 0x0dc5, + 0x918c, 0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, + 0x7018, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, + 0x7010, 0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, + 0x700c, 0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, + 0x116d, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, + 0x7007, 0x0000, 0x080c, 0x1128, 0x0005, 0x7008, 0x0096, 0x2048, + 0xa86f, 0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, + 0x9005, 0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x1182, + 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, + 0x0000, 0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, + 0xa892, 0x7808, 0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, + 0x7007, 0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18b9, + 0x2004, 0x9906, 0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, + 0x00de, 0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, + 0xa89c, 0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, + 0x1117, 0x0005, 0x00de, 0x009e, 0x080c, 0x1117, 0x0005, 0xa8a8, + 0xd08c, 0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0dc5, 0xa06c, + 0x908e, 0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, + 0x4002, 0x080c, 0x6e92, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, + 0x080c, 0x1040, 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, + 0x0dc5, 0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, + 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, + 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, + 0x9080, 0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, + 0x10f8, 0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x6e92, + 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, + 0x080c, 0xb2d3, 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, + 0x0000, 0x080c, 0x1040, 0x7007, 0x0000, 0x080c, 0x1117, 0x00ae, + 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, + 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x0096, 0x2001, 0x192f, + 0x204c, 0xa87c, 0x7812, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, + 0x780a, 0xa898, 0x780e, 0x782b, 0x0020, 0x0126, 0x2091, 0x8000, + 0x782b, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x2900, + 0x700a, 0x012e, 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099, 0x0088, + 0x782b, 0x0040, 0x0096, 0x2001, 0x192f, 0x204c, 0xaa7c, 0x009e, + 0x080c, 0x8d91, 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc, 0x200a, + 0x080c, 0x8bf3, 0x7007, 0x0000, 0x080c, 0x1128, 0x0005, 0x7007, + 0x0000, 0x080c, 0x1128, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, + 0x0300, 0x2071, 0x1a65, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x781b, + 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9, 0x03ea, + 0x2061, 0xf0ae, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, + 0x1f04, 0x1312, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, + 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c, 0x0120, + 0x7820, 0x080c, 0x1376, 0x0cc8, 0x2001, 0x1a66, 0x2003, 0x0000, + 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, + 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b, + 0x1a89, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200, 0x2004, + 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a89, 0x602f, 0x1cd0, + 0x2001, 0x181a, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b, 0x20c7, + 0x2001, 0x33b6, 0xd0fc, 0x190c, 0x0dc5, 0x2001, 0x1810, 0x2004, + 0xd0c4, 0x1128, 0x2001, 0x0003, 0x2004, 0xd0d4, 0x1118, 0x783f, + 0x33b6, 0x0020, 0x9084, 0xc000, 0x783f, 0xb3b6, 0x604f, 0x193d, + 0x2001, 0x1928, 0x2004, 0x6042, 0x00ce, 0x0005, 0x9086, 0x000d, + 0x11d0, 0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, 0x080c, + 0xd0c6, 0x0180, 0x2260, 0x6000, 0x9086, 0x0004, 0x1158, 0x0016, + 0x6120, 0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, 0x080c, + 0xb352, 0x001e, 0x002e, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, + 0x9184, 0x0070, 0x190c, 0x0dbe, 0xd19c, 0x0158, 0x7820, 0x908c, + 0xf000, 0x15e8, 0x908a, 0x0024, 0x1a0c, 0x0dc5, 0x0023, 0x012e, + 0x0005, 0x012e, 0x0005, 0x13cf, 0x13cf, 0x13e6, 0x13eb, 0x13ef, + 0x13f4, 0x141c, 0x1420, 0x142e, 0x1432, 0x13cf, 0x14ff, 0x1503, + 0x1575, 0x157c, 0x13cf, 0x157d, 0x157e, 0x1589, 0x1590, 0x13cf, + 0x13cf, 0x13cf, 0x13cf, 0x13cf, 0x13cf, 0x13cf, 0x13f6, 0x13cf, + 0x13cf, 0x13cf, 0x13cf, 0x13cf, 0x13cf, 0x13d3, 0x13d1, 0x080c, + 0x0dc5, 0x080c, 0x0dbe, 0x080c, 0x159b, 0x2009, 0x1a7e, 0x2104, + 0x8000, 0x200a, 0x080c, 0x813a, 0x080c, 0x1ad9, 0x0005, 0x2009, + 0x0048, 0x2060, 0x080c, 0xb352, 0x012e, 0x0005, 0x7004, 0xc085, + 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, + 0x159b, 0x080c, 0x16fb, 0x0005, 0x080c, 0x0dc5, 0x080c, 0x159b, + 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, + 0x0048, 0x080c, 0xb352, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, + 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, + 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x15a0, 0x2001, + 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, + 0x080c, 0x159b, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, + 0x009e, 0x2009, 0x0048, 0x080c, 0xb352, 0x0005, 0x080c, 0x159b, + 0x080c, 0x0dc5, 0x080c, 0x159b, 0x080c, 0x14ea, 0x7827, 0x0018, + 0x79ac, 0xd1dc, 0x0904, 0x149b, 0x7827, 0x0015, 0x7828, 0x782b, + 0x0000, 0x9065, 0x0140, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x0804, 0x14a1, 0x7004, 0x9005, 0x01c8, 0x1188, 0x78ab, + 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0dc5, + 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0804, 0x14cf, + 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x1503, 0x0005, 0x7827, + 0x0018, 0xa001, 0x7828, 0x7827, 0x0011, 0xa001, 0x7928, 0x9106, + 0x0110, 0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200, 0x702c, 0xd0c4, + 0x0140, 0x00ee, 0x080c, 0x1ad9, 0x080c, 0x1322, 0x7803, 0x0001, + 0x0005, 0x7037, 0x0001, 0xa001, 0x7150, 0x00ee, 0x918c, 0xff00, + 0x9186, 0x0500, 0x0110, 0x79ac, 0x0810, 0x7004, 0xc09d, 0x7006, + 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x1503, 0x2001, 0x020d, + 0x2003, 0x0020, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, + 0x0dc5, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8, + 0x080c, 0x813a, 0x080c, 0x1ad9, 0x080c, 0xd0d8, 0x0158, 0xa9ac, + 0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, + 0xc0bd, 0xa882, 0x080c, 0xccf3, 0x0005, 0x6020, 0x9086, 0x0009, + 0x1128, 0x2009, 0x004c, 0x080c, 0xb352, 0x0048, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xd4c4, 0x2029, + 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, + 0x7dbc, 0x080c, 0xf057, 0xd5a4, 0x1118, 0x080c, 0x15a0, 0x0005, + 0x080c, 0x813a, 0x080c, 0x1ad9, 0x0005, 0x781f, 0x0300, 0x7803, + 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, + 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, + 0x080c, 0x1611, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, + 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0dc5, + 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, + 0x16de, 0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x080c, 0x15a0, 0x0005, 0x81ff, 0x190c, 0x0dc5, 0x0005, + 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, + 0x156a, 0x2071, 0x0200, 0x080c, 0x16cb, 0x05e0, 0x080c, 0x16de, + 0x05b0, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa864, 0x009e, + 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550, + 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x1768, 0x00fe, + 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x18fd, 0x00fe, 0x2009, 0x01f4, + 0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, + 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x15a0, 0x0040, 0x2001, + 0x020d, 0x2003, 0x0020, 0x080c, 0x1322, 0x7803, 0x0001, 0x00ee, + 0x001e, 0x0005, 0x080c, 0x16de, 0x0dd0, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0461, 0x0c90, 0x0429, 0x2060, 0x2009, + 0x0053, 0x080c, 0xb352, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, + 0x00d1, 0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x90de, + 0x0005, 0x0089, 0x9005, 0x0118, 0x080c, 0x8ce2, 0x0cd0, 0x0005, + 0x2001, 0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, + 0x080c, 0x1611, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, + 0x080c, 0x14ea, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, + 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, + 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, + 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, + 0x810c, 0x080c, 0x1603, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, + 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, + 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, + 0x080c, 0x813a, 0x080c, 0x1ad9, 0x0090, 0x7827, 0x0015, 0x782b, + 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, + 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, + 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, + 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, + 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, + 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, + 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, + 0x0016, 0x0026, 0x00c6, 0x080c, 0x1394, 0x00ce, 0x002e, 0x001e, + 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, + 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, + 0x2004, 0x080c, 0x0dc5, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, + 0x2009, 0xff00, 0x8109, 0x0904, 0x168f, 0x7a18, 0x9284, 0x0030, + 0x0904, 0x168a, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x168a, + 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, + 0x0016, 0x2009, 0x1a81, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, + 0x94b1, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, + 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, + 0x0016, 0x2009, 0x1a82, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, + 0x1eeb, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, + 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x163a, 0x0005, 0x2001, + 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, + 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19f7, 0x2004, + 0x9005, 0x01b8, 0x2001, 0x1a69, 0x2004, 0x9086, 0x0000, 0x0188, + 0x2009, 0x1a80, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0xa767, + 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, + 0x163a, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, + 0x8080, 0x080c, 0x1633, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, + 0x2004, 0x080c, 0x0dc5, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, + 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, + 0x9186, 0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x0006, 0x0046, + 0x00e6, 0x2071, 0x0200, 0x7037, 0x0002, 0x7058, 0x9084, 0xff00, + 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, 0x1a7f, 0x2404, 0x8000, + 0x0208, 0x2022, 0x080c, 0x813a, 0x080c, 0x1ad9, 0x9006, 0x00ee, + 0x004e, 0x000e, 0x0005, 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016, + 0x2071, 0x0200, 0x0841, 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, + 0x0904, 0x175d, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, + 0x0904, 0x175d, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, + 0x00ce, 0x918e, 0x0039, 0x1904, 0x175d, 0x9c06, 0x15f0, 0x0126, + 0x2091, 0x2600, 0x080c, 0x8081, 0x012e, 0x7358, 0x745c, 0x6014, + 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x190c, 0xd49f, 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, + 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, + 0x080c, 0x20e7, 0x1190, 0x080c, 0x195a, 0x2a00, 0xa816, 0x0130, + 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, + 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, + 0x0020, 0x001e, 0x00ee, 0x080c, 0x15a0, 0x0005, 0x080c, 0x0dc5, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x6b5e, 0x2ff0, 0x0126, + 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, + 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, + 0x20c7, 0x2165, 0x0002, 0x179a, 0x1808, 0x179a, 0x179a, 0x179e, + 0x17e9, 0x179a, 0x17be, 0x1793, 0x17ff, 0x179a, 0x179a, 0x17a3, + 0x18f5, 0x17d2, 0x17c8, 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, + 0x0904, 0x17ff, 0x9085, 0x0001, 0x0804, 0x18eb, 0xa87c, 0xd0ac, + 0x0dc8, 0x0804, 0x180f, 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x187a, + 0xa898, 0x901d, 0x1108, 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42, + 0x3e00, 0x9080, 0x0008, 0x2004, 0x9080, 0x933d, 0x2005, 0x9005, + 0x090c, 0x0dc5, 0x2004, 0xa8ae, 0x0804, 0x18d3, 0xa87c, 0xd0bc, + 0x09c8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x180f, + 0xa87c, 0xd0bc, 0x0978, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, + 0x0804, 0x187a, 0xa87c, 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c, + 0xa83e, 0xa804, 0x9045, 0x090c, 0x0dc5, 0xa164, 0xa91a, 0x91ec, + 0x000f, 0x9d80, 0x20c7, 0x2065, 0xa888, 0xd19c, 0x1904, 0x187a, + 0x0430, 0xa87c, 0xd0ac, 0x0904, 0x179a, 0xa804, 0x9045, 0x090c, + 0x0dc5, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x20c7, 0x2065, + 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x187a, 0x0080, 0xa87c, + 0xd0ac, 0x0904, 0x179a, 0x9006, 0xa842, 0xa83e, 0x0804, 0x187a, + 0xa87c, 0xd0ac, 0x0904, 0x179a, 0x9006, 0xa842, 0xa83e, 0x2c05, + 0x908a, 0x0036, 0x1a0c, 0x0dc5, 0x9082, 0x001b, 0x0002, 0x1832, + 0x1832, 0x1834, 0x1832, 0x1832, 0x1832, 0x183e, 0x1832, 0x1832, + 0x1832, 0x1848, 0x1832, 0x1832, 0x1832, 0x1852, 0x1832, 0x1832, + 0x1832, 0x185c, 0x1832, 0x1832, 0x1832, 0x1866, 0x1832, 0x1832, + 0x1832, 0x1870, 0x080c, 0x0dc5, 0xa574, 0xa478, 0x9d86, 0x0024, + 0x0904, 0x17a8, 0xa37c, 0xa280, 0x0804, 0x18d3, 0xa584, 0xa488, + 0x9d86, 0x0024, 0x0904, 0x17a8, 0xa38c, 0xa290, 0x0804, 0x18d3, + 0xa594, 0xa498, 0x9d86, 0x0024, 0x0904, 0x17a8, 0xa39c, 0xa2a0, + 0x0804, 0x18d3, 0xa5a4, 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x17a8, + 0xa3ac, 0xa2b0, 0x0804, 0x18d3, 0xa5b4, 0xa4b8, 0x9d86, 0x0024, + 0x0904, 0x17a8, 0xa3bc, 0xa2c0, 0x0804, 0x18d3, 0xa5c4, 0xa4c8, + 0x9d86, 0x0024, 0x0904, 0x17a8, 0xa3cc, 0xa2d0, 0x0804, 0x18d3, + 0xa5d4, 0xa4d8, 0x9d86, 0x0024, 0x0904, 0x17a8, 0xa3dc, 0xa2e0, + 0x0804, 0x18d3, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, + 0x001b, 0x0002, 0x189d, 0x189b, 0x189b, 0x189b, 0x189b, 0x189b, + 0x18a8, 0x189b, 0x189b, 0x189b, 0x189b, 0x189b, 0x18b3, 0x189b, + 0x189b, 0x189b, 0x189b, 0x189b, 0x18be, 0x189b, 0x189b, 0x189b, + 0x189b, 0x189b, 0x18c9, 0x080c, 0x0dc5, 0xa56c, 0xa470, 0xa774, + 0xa678, 0x9d86, 0x002c, 0x0904, 0x17a8, 0xa37c, 0xa280, 0x0458, + 0xa584, 0xa488, 0xa78c, 0xa690, 0x9d86, 0x002c, 0x0904, 0x17a8, + 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, + 0x002c, 0x0904, 0x17a8, 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, + 0xa7bc, 0xa6c0, 0x9d86, 0x002c, 0x0904, 0x17a8, 0xa3c4, 0xa2c8, + 0x0050, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904, + 0x17a8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, + 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, + 0x8109, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, + 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, + 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, 0x0804, 0x179a, 0x2001, + 0x180d, 0x2004, 0xd08c, 0x190c, 0x6b5e, 0x2ff0, 0x0126, 0x2091, + 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, + 0x2061, 0x20c2, 0xa813, 0x20c2, 0x2c05, 0xa80a, 0xa964, 0xa91a, + 0xa87c, 0xd0ac, 0x090c, 0x0dc5, 0x9006, 0xa842, 0xa83e, 0x2c05, + 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0xadcc, 0xacd0, 0xafd4, 0xaed8, + 0xabdc, 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, + 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff, + 0x9086, 0x0008, 0x1120, 0x8109, 0xa916, 0x0128, 0x0080, 0x918a, + 0x0002, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, + 0xc0dd, 0xa87e, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0xa804, + 0x9045, 0x090c, 0x0dc5, 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, + 0x9080, 0x20c7, 0x2015, 0x82ff, 0x090c, 0x0dc5, 0xaa12, 0x2205, + 0xa80a, 0x0c08, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, + 0x0002, 0x1a4f, 0x19b1, 0x19b1, 0x1a4f, 0x1a4f, 0x1a49, 0x1a4f, + 0x19b1, 0x1a00, 0x1a00, 0x1a00, 0x1a4f, 0x1a4f, 0x1a4f, 0x1a46, + 0x1a00, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, + 0x0904, 0x1a51, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, + 0x001b, 0x0002, 0x199d, 0x199b, 0x199b, 0x199b, 0x199b, 0x199b, + 0x19a1, 0x199b, 0x199b, 0x199b, 0x199b, 0x199b, 0x19a5, 0x199b, + 0x199b, 0x199b, 0x199b, 0x199b, 0x19a9, 0x199b, 0x199b, 0x199b, + 0x199b, 0x199b, 0x19ad, 0x080c, 0x0dc5, 0xa774, 0xa678, 0x0804, + 0x1a51, 0xa78c, 0xa690, 0x0804, 0x1a51, 0xa7a4, 0xa6a8, 0x0804, + 0x1a51, 0xa7bc, 0xa6c0, 0x0804, 0x1a51, 0xa7d4, 0xa6d8, 0x0804, + 0x1a51, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dc5, 0x9082, 0x001b, + 0x0002, 0x19d4, 0x19d4, 0x19d6, 0x19d4, 0x19d4, 0x19d4, 0x19dc, + 0x19d4, 0x19d4, 0x19d4, 0x19e2, 0x19d4, 0x19d4, 0x19d4, 0x19e8, + 0x19d4, 0x19d4, 0x19d4, 0x19ee, 0x19d4, 0x19d4, 0x19d4, 0x19f4, + 0x19d4, 0x19d4, 0x19d4, 0x19fa, 0x080c, 0x0dc5, 0xa574, 0xa478, + 0xa37c, 0xa280, 0x0804, 0x1a51, 0xa584, 0xa488, 0xa38c, 0xa290, + 0x0804, 0x1a51, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1a51, + 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1a51, 0xa5b4, 0xa4b8, + 0xa3bc, 0xa2c0, 0x0804, 0x1a51, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, + 0x0804, 0x1a51, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1a51, + 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, 0x001b, 0x0002, + 0x1a23, 0x1a21, 0x1a21, 0x1a21, 0x1a21, 0x1a21, 0x1a2a, 0x1a21, + 0x1a21, 0x1a21, 0x1a21, 0x1a21, 0x1a31, 0x1a21, 0x1a21, 0x1a21, + 0x1a21, 0x1a21, 0x1a38, 0x1a21, 0x1a21, 0x1a21, 0x1a21, 0x1a21, + 0x1a3f, 0x080c, 0x0dc5, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, + 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, + 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x00c8, + 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0090, 0xa5cc, + 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e, + 0x1130, 0x080c, 0x207f, 0x1904, 0x195a, 0x900e, 0x0050, 0x080c, + 0x0dc5, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c, + 0x207f, 0x0005, 0x6014, 0x2048, 0x6118, 0x81ff, 0x0148, 0x810c, + 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, + 0x601b, 0x0002, 0xa874, 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150, + 0x00e9, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, + 0xb352, 0x0005, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, + 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, + 0x601e, 0x2009, 0x0048, 0x0804, 0xb352, 0x0005, 0x0126, 0x00c6, + 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, + 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, + 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, + 0x080c, 0x1394, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, + 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x1394, 0x00ce, 0x2001, + 0x0038, 0x080c, 0x1b69, 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, + 0x0042, 0x190c, 0x0dc5, 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, + 0x1d40, 0x080c, 0x1b78, 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, + 0x1b65, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, + 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, + 0x2001, 0xf000, 0x8001, 0x090c, 0x0dc5, 0x7aac, 0xd2ac, 0x1dd0, + 0x00fe, 0x080c, 0x7637, 0x1188, 0x2001, 0x0138, 0x2003, 0x0000, + 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, + 0x8211, 0x1de0, 0x0059, 0x0804, 0x76e4, 0x0479, 0x0039, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, + 0x0200, 0x080c, 0x2c6d, 0x2009, 0x003c, 0x080c, 0x2409, 0x2001, + 0x015d, 0x2003, 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, + 0x8725, 0x70a0, 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, + 0x020d, 0x2003, 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x1322, + 0x7803, 0x0001, 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, + 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, + 0x7637, 0x1108, 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, + 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, + 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, + 0x015d, 0x2003, 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, + 0x0048, 0xa001, 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, + 0x1db0, 0x004e, 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, + 0x0005, 0x2c08, 0x621c, 0x080c, 0x1611, 0x7930, 0x0005, 0x2c08, + 0x621c, 0x080c, 0x16bc, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, + 0x2031, 0x0064, 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, + 0x0c41, 0x9186, 0x0040, 0x0904, 0x1bd6, 0x2001, 0x001e, 0x0c69, + 0x8631, 0x1d80, 0x080c, 0x0dc5, 0x781f, 0x0202, 0x2001, 0x015d, + 0x2003, 0x0000, 0x2001, 0x0dac, 0x0c01, 0x781c, 0xd084, 0x0110, + 0x0861, 0x04e0, 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, + 0x781c, 0xd084, 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, + 0x2001, 0x0037, 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, + 0x080c, 0x1b6f, 0x9186, 0x0040, 0x190c, 0x0dc5, 0x00d6, 0x2069, + 0x0200, 0x692c, 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, + 0x6800, 0x9085, 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, + 0x0007, 0x1db0, 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, + 0x090c, 0x0dc5, 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, + 0x2091, 0x2400, 0x2071, 0x1a69, 0x2079, 0x0090, 0x012e, 0x0005, + 0x9280, 0x0005, 0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904, 0x1c78, + 0xa964, 0x9184, 0x0007, 0x0002, 0x1bf4, 0x1c63, 0x1c0b, 0x1c0d, + 0x1c0b, 0x1c4b, 0x1c2b, 0x1c1a, 0x918c, 0x00ff, 0x9186, 0x0008, + 0x1170, 0xa87c, 0xd0b4, 0x0904, 0x1ea5, 0x9006, 0xa842, 0xa83e, + 0xa988, 0x2900, 0xa85a, 0xa813, 0x20c2, 0x0804, 0x1c74, 0x9186, + 0x0048, 0x0904, 0x1c63, 0x080c, 0x0dc5, 0x9184, 0x00ff, 0x9086, + 0x0013, 0x0904, 0x1c63, 0x9184, 0x00ff, 0x9086, 0x001b, 0x0904, + 0x1c63, 0x0c88, 0xa87c, 0xd0b4, 0x0904, 0x1ea5, 0xa890, 0xa842, + 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, + 0xa988, 0x0804, 0x1c6b, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, + 0x19d0, 0xa87c, 0xd0b4, 0x0904, 0x1ea5, 0xa890, 0xa842, 0xa83a, + 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa804, + 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x20c7, 0x2005, + 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015, 0x1540, + 0xa87c, 0xd0b4, 0x0904, 0x1ea5, 0xa804, 0xa85a, 0x2040, 0xa064, + 0x9084, 0x000f, 0x9080, 0x20c7, 0x2005, 0xa812, 0xa988, 0x9006, + 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1ea5, 0xa988, + 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084, 0x000f, + 0x9080, 0x20c7, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd, 0xa87e, + 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c, 0x1eeb, + 0x00e6, 0x2071, 0x1a69, 0x7000, 0x9005, 0x1904, 0x1cdf, 0x7206, + 0x9280, 0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b, 0x0004, + 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6, 0x2058, + 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200, 0x7803, + 0x0040, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x781a, + 0x78d7, 0x0000, 0x00fe, 0xa814, 0x2050, 0xa858, 0x2040, 0xa810, + 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944, 0x791a, 0x7116, 0xa848, + 0x781e, 0x701a, 0x9006, 0x700e, 0x7012, 0x7004, 0xa940, 0xa838, + 0x9106, 0x1500, 0xa93c, 0xa834, 0x9106, 0x11e0, 0x0006, 0x0016, + 0xa938, 0xa834, 0x9105, 0x0118, 0x001e, 0x000e, 0x0098, 0x001e, + 0x000e, 0x8aff, 0x01c8, 0x0126, 0x2091, 0x8000, 0x2009, 0x0306, + 0x200b, 0x0808, 0x00d9, 0x0108, 0x00c9, 0x012e, 0x9006, 0x00ee, + 0x00fe, 0x0005, 0x0036, 0x0046, 0xab38, 0xac34, 0x080c, 0x20e7, + 0x004e, 0x003e, 0x0d30, 0x0c98, 0x9085, 0x0001, 0x0c80, 0x2009, + 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, 0x0005, 0x0076, 0x0066, + 0x0056, 0x0046, 0x0036, 0x0026, 0x8aff, 0x0904, 0x1e9e, 0x700c, + 0x7214, 0x923a, 0x7010, 0x7218, 0x9203, 0x0a04, 0x1e9d, 0x9705, + 0x0904, 0x1e9d, 0x903e, 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, + 0x0002, 0x1e22, 0x1d61, 0x1d61, 0x1e22, 0x1e22, 0x1dff, 0x1e22, + 0x1d61, 0x1e06, 0x1db0, 0x1db0, 0x1e22, 0x1e22, 0x1e22, 0x1df9, + 0x1db0, 0xc0fc, 0xa882, 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, + 0x0904, 0x1e2f, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, + 0x001b, 0x0002, 0x1d4d, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d4b, + 0x1d51, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d55, 0x1d4b, + 0x1d4b, 0x1d4b, 0x1d4b, 0x1d4b, 0x1d59, 0x1d4b, 0x1d4b, 0x1d4b, + 0x1d4b, 0x1d4b, 0x1d5d, 0x080c, 0x0dc5, 0xa774, 0xa678, 0x0804, + 0x1e2f, 0xa78c, 0xa690, 0x0804, 0x1e2f, 0xa7a4, 0xa6a8, 0x0804, + 0x1e2f, 0xa7bc, 0xa6c0, 0x0804, 0x1e2f, 0xa7d4, 0xa6d8, 0x0804, + 0x1e2f, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dc5, 0x9082, 0x001b, + 0x0002, 0x1d84, 0x1d84, 0x1d86, 0x1d84, 0x1d84, 0x1d84, 0x1d8c, + 0x1d84, 0x1d84, 0x1d84, 0x1d92, 0x1d84, 0x1d84, 0x1d84, 0x1d98, + 0x1d84, 0x1d84, 0x1d84, 0x1d9e, 0x1d84, 0x1d84, 0x1d84, 0x1da4, + 0x1d84, 0x1d84, 0x1d84, 0x1daa, 0x080c, 0x0dc5, 0xa574, 0xa478, + 0xa37c, 0xa280, 0x0804, 0x1e2f, 0xa584, 0xa488, 0xa38c, 0xa290, + 0x0804, 0x1e2f, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1e2f, + 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1e2f, 0xa5b4, 0xa4b8, + 0xa3bc, 0xa2c0, 0x0804, 0x1e2f, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, + 0x0804, 0x1e2f, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1e2f, + 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, 0x001b, 0x0002, + 0x1dd3, 0x1dd1, 0x1dd1, 0x1dd1, 0x1dd1, 0x1dd1, 0x1ddb, 0x1dd1, + 0x1dd1, 0x1dd1, 0x1dd1, 0x1dd1, 0x1de3, 0x1dd1, 0x1dd1, 0x1dd1, + 0x1dd1, 0x1dd1, 0x1deb, 0x1dd1, 0x1dd1, 0x1dd1, 0x1dd1, 0x1dd1, + 0x1df2, 0x080c, 0x0dc5, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, + 0xa280, 0x0804, 0x1e2f, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, + 0xa298, 0x0804, 0x1e2f, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, + 0xa2b0, 0x0804, 0x1e2f, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, + 0xa2c8, 0x04e8, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, + 0x04b0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x1518, 0x080c, + 0x207f, 0x1904, 0x1cfc, 0x900e, 0x0804, 0x1e9e, 0xab64, 0x939c, + 0x00ff, 0x9386, 0x0048, 0x1180, 0x00c6, 0x7004, 0x2060, 0x6004, + 0x9086, 0x0043, 0x00ce, 0x0904, 0x1db0, 0xab9c, 0x9016, 0xad8c, + 0xac90, 0xaf94, 0xae98, 0x0098, 0x9386, 0x0008, 0x0904, 0x1db0, + 0x080c, 0x0dc5, 0xa964, 0x918c, 0x00ff, 0x9186, 0x0013, 0x0904, + 0x1d61, 0x9186, 0x001b, 0x0904, 0x1db0, 0x080c, 0x0dc5, 0x2009, + 0x030f, 0x2104, 0xd0fc, 0x0538, 0x0066, 0x2009, 0x0306, 0x2134, + 0x200b, 0x4000, 0x2104, 0x9084, 0x0030, 0x15b8, 0x2031, 0x1000, + 0x2600, 0x9302, 0x928b, 0x0000, 0xa82e, 0xa932, 0x0278, 0x9105, + 0x0168, 0x2011, 0x0000, 0x2618, 0x2600, 0x9500, 0xa81e, 0x9481, + 0x0000, 0xa822, 0xa880, 0xc0fd, 0xa882, 0x0020, 0xa82f, 0x0000, + 0xa833, 0x0000, 0x006e, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a, + 0x7e0e, 0x782b, 0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300, + 0xa83e, 0xa840, 0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010, + 0x9201, 0x7012, 0x080c, 0x207f, 0x0448, 0xd6b4, 0x0110, 0x200b, + 0x4040, 0x2031, 0x0080, 0x9584, 0x007f, 0x0108, 0x9632, 0x7124, + 0x7000, 0x9086, 0x0000, 0x1198, 0xc185, 0x7126, 0x2009, 0x0306, + 0x2104, 0xd0b4, 0x1904, 0x1e40, 0x200b, 0x4040, 0x2009, 0x1a83, + 0x2104, 0x8000, 0x0a04, 0x1e40, 0x200a, 0x0804, 0x1e40, 0xc18d, + 0x7126, 0xd184, 0x1d58, 0x0804, 0x1e40, 0x9006, 0x002e, 0x003e, + 0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c, 0x0dc5, 0x0026, + 0x2001, 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7003, 0x0000, + 0x7004, 0x2060, 0x6014, 0x2048, 0x080c, 0xd0d8, 0x0118, 0xa880, + 0xc0bd, 0xa882, 0x782c, 0xd0ac, 0x1de8, 0x080c, 0x1cef, 0x6020, + 0x9086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, + 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, + 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c, 0xccf3, 0x00ce, 0x2001, + 0x19f7, 0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c, 0x2409, + 0x080c, 0xac2b, 0x2011, 0x0000, 0x080c, 0xaac9, 0x080c, 0x9bd3, + 0x002e, 0x0804, 0x202f, 0x0126, 0x2091, 0x2400, 0xa858, 0x2040, + 0x792c, 0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1ea7, 0x7000, + 0x0002, 0x202f, 0x1efd, 0x1f7d, 0x202d, 0x8001, 0x7002, 0x7027, + 0x0000, 0xd19c, 0x1158, 0x8aff, 0x0904, 0x1f4a, 0x080c, 0x1cf6, + 0x0904, 0x202f, 0x080c, 0x1cf6, 0x0804, 0x202f, 0x782b, 0x0004, + 0xd194, 0x0148, 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x1518, 0xa87c, + 0xc0f5, 0xa87e, 0x00f8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x0016, + 0x7910, 0xa82c, 0x9100, 0xa82e, 0x7914, 0xa830, 0x9101, 0xa832, + 0x001e, 0x7810, 0x931a, 0x7814, 0x9213, 0x7800, 0xa81e, 0x7804, + 0xa822, 0xab3e, 0xaa42, 0x003e, 0x002e, 0x080c, 0x209a, 0xa880, + 0xc0fd, 0xa882, 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00, 0xa812, + 0x7003, 0x0000, 0x2009, 0x0306, 0x200b, 0x4800, 0x7027, 0x0000, + 0x0804, 0x202f, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, + 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, + 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x0dc5, 0x7820, 0xd0bc, + 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, + 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, + 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008, 0x7003, + 0x0000, 0x080c, 0x1cef, 0x0804, 0x202f, 0x8001, 0x7002, 0x7024, + 0x8004, 0x7026, 0xd194, 0x0170, 0x782c, 0xd0fc, 0x1904, 0x1ef0, + 0xd19c, 0x1904, 0x202b, 0x8aff, 0x0904, 0x202f, 0x080c, 0x1cf6, + 0x0804, 0x202f, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x080c, 0x209a, + 0xdd9c, 0x1904, 0x1fea, 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0dc5, + 0x9082, 0x001b, 0x0002, 0x1fbe, 0x1fbe, 0x1fc0, 0x1fbe, 0x1fbe, + 0x1fbe, 0x1fc6, 0x1fbe, 0x1fbe, 0x1fbe, 0x1fcc, 0x1fbe, 0x1fbe, + 0x1fbe, 0x1fd2, 0x1fbe, 0x1fbe, 0x1fbe, 0x1fd8, 0x1fbe, 0x1fbe, + 0x1fbe, 0x1fde, 0x1fbe, 0x1fbe, 0x1fbe, 0x1fe4, 0x080c, 0x0dc5, + 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1f1f, 0xa08c, 0x931a, + 0xa090, 0x9213, 0x0804, 0x1f1f, 0xa09c, 0x931a, 0xa0a0, 0x9213, + 0x0804, 0x1f1f, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1f1f, + 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804, 0x1f1f, 0xa0cc, 0x931a, + 0xa0d0, 0x9213, 0x0804, 0x1f1f, 0xa0dc, 0x931a, 0xa0e0, 0x9213, + 0x0804, 0x1f1f, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, + 0x001b, 0x0002, 0x200d, 0x200b, 0x200b, 0x200b, 0x200b, 0x200b, + 0x2013, 0x200b, 0x200b, 0x200b, 0x200b, 0x200b, 0x2019, 0x200b, + 0x200b, 0x200b, 0x200b, 0x200b, 0x201f, 0x200b, 0x200b, 0x200b, + 0x200b, 0x200b, 0x2025, 0x080c, 0x0dc5, 0xa07c, 0x931a, 0xa080, + 0x9213, 0x0804, 0x1f1f, 0xa094, 0x931a, 0xa098, 0x9213, 0x0804, + 0x1f1f, 0xa0ac, 0x931a, 0xa0b0, 0x9213, 0x0804, 0x1f1f, 0xa0c4, + 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1f1f, 0xa0dc, 0x931a, 0xa0e0, + 0x9213, 0x0804, 0x1f1f, 0x0804, 0x1f1b, 0x080c, 0x0dc5, 0x012e, + 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a69, 0x7000, 0x9086, 0x0000, + 0x0904, 0x207a, 0x2079, 0x0090, 0x2009, 0x0207, 0x210c, 0xd194, + 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, 0x0003, 0x0188, 0x080c, + 0xf0a0, 0x2001, 0x0133, 0x2004, 0x9005, 0x090c, 0x0dc5, 0x0016, + 0x2009, 0x0040, 0x080c, 0x2409, 0x001e, 0x2001, 0x020c, 0x2102, + 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, + 0x2009, 0x0040, 0x080c, 0x2409, 0x782c, 0xd0fc, 0x09a8, 0x080c, + 0x1eeb, 0x7000, 0x9086, 0x0000, 0x1978, 0x782b, 0x0004, 0x782c, + 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2409, 0x782b, 0x0002, + 0x7003, 0x0000, 0x080c, 0x1cef, 0x00ee, 0x00fe, 0x0005, 0xa880, + 0xd0fc, 0x11a8, 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, + 0xa004, 0x9005, 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, + 0x9080, 0x20c7, 0x2065, 0x8cff, 0x090c, 0x0dc5, 0x8a51, 0x0005, + 0x2050, 0x0005, 0xa880, 0xd0fc, 0x11b8, 0x8a50, 0x8c61, 0x2c05, + 0x9005, 0x1190, 0x2800, 0x9906, 0x0120, 0xa000, 0x9005, 0x1108, + 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084, 0x000f, 0x9080, 0x20d7, + 0x2065, 0x8cff, 0x090c, 0x0dc5, 0x0005, 0x0000, 0x001d, 0x0021, + 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, 0x001b, 0x0021, + 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, 0x0000, 0x0000, + 0x20ba, 0x20b6, 0x20ba, 0x20ba, 0x20c4, 0x0000, 0x20ba, 0x20c1, + 0x20c1, 0x20be, 0x20c1, 0x20c1, 0x0000, 0x20c4, 0x20c1, 0x0000, + 0x20bc, 0x20bc, 0x0000, 0x20bc, 0x20c4, 0x0000, 0x20bc, 0x20c2, + 0x20c2, 0x20c2, 0x0000, 0x20c2, 0x0000, 0x20c4, 0x20c2, 0x00c6, + 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, 0x0904, 0x22c6, + 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, 0x9086, 0x0008, + 0x1118, 0x2061, 0x20c2, 0x00d0, 0x9de0, 0x20c7, 0x9d86, 0x0007, + 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, 0x1120, 0xa08c, + 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, 0x0310, 0x0804, + 0x22c6, 0xa004, 0x9045, 0x0904, 0x22c6, 0x08d8, 0x2c05, 0x9005, + 0x0904, 0x21ae, 0xdd9c, 0x1904, 0x216a, 0x908a, 0x0036, 0x1a0c, + 0x0dc5, 0x9082, 0x001b, 0x0002, 0x213f, 0x213f, 0x2141, 0x213f, + 0x213f, 0x213f, 0x2147, 0x213f, 0x213f, 0x213f, 0x214d, 0x213f, + 0x213f, 0x213f, 0x2153, 0x213f, 0x213f, 0x213f, 0x2159, 0x213f, + 0x213f, 0x213f, 0x215f, 0x213f, 0x213f, 0x213f, 0x2165, 0x080c, + 0x0dc5, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, 0x21a4, 0xa08c, + 0x9422, 0xa090, 0x931b, 0x0804, 0x21a4, 0xa09c, 0x9422, 0xa0a0, + 0x931b, 0x0804, 0x21a4, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0804, + 0x21a4, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, 0x21a4, 0xa0cc, + 0x9422, 0xa0d0, 0x931b, 0x0804, 0x21a4, 0xa0dc, 0x9422, 0xa0e0, + 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, 0x001b, + 0x0002, 0x218c, 0x218a, 0x218a, 0x218a, 0x218a, 0x218a, 0x2191, + 0x218a, 0x218a, 0x218a, 0x218a, 0x218a, 0x2196, 0x218a, 0x218a, + 0x218a, 0x218a, 0x218a, 0x219b, 0x218a, 0x218a, 0x218a, 0x218a, + 0x218a, 0x21a0, 0x080c, 0x0dc5, 0xa07c, 0x9422, 0xa080, 0x931b, + 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, 0xa0ac, 0x9422, + 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, 0x931b, 0x0020, + 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, 0x9405, 0x0160, + 0x8a51, 0x0904, 0x22c6, 0x8c60, 0x0804, 0x2116, 0xa004, 0x9045, + 0x0904, 0x22c6, 0x0804, 0x20f1, 0x8a51, 0x0904, 0x22c6, 0x8c60, + 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, 0x22c6, 0xa064, + 0x90ec, 0x000f, 0x9de0, 0x20c7, 0x2c05, 0x2060, 0xa880, 0xc0fc, + 0xa882, 0x0804, 0x22bb, 0x2c05, 0x8422, 0x8420, 0x831a, 0x9399, + 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x2258, 0x9082, 0x001b, + 0x0002, 0x21f4, 0x21f4, 0x21f6, 0x21f4, 0x21f4, 0x21f4, 0x2204, + 0x21f4, 0x21f4, 0x21f4, 0x2212, 0x21f4, 0x21f4, 0x21f4, 0x2220, + 0x21f4, 0x21f4, 0x21f4, 0x222e, 0x21f4, 0x21f4, 0x21f4, 0x223c, + 0x21f4, 0x21f4, 0x21f4, 0x224a, 0x080c, 0x0dc5, 0xa17c, 0x2400, + 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa074, 0x9420, + 0xa078, 0x9319, 0x0804, 0x22b6, 0xa18c, 0x2400, 0x9122, 0xa190, + 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa084, 0x9420, 0xa088, 0x9319, + 0x0804, 0x22b6, 0xa19c, 0x2400, 0x9122, 0xa1a0, 0x2300, 0x911b, + 0x0a0c, 0x0dc5, 0xa094, 0x9420, 0xa098, 0x9319, 0x0804, 0x22b6, + 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dc5, + 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x22b6, 0xa1bc, 0x2400, + 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa0b4, 0x9420, + 0xa0b8, 0x9319, 0x0804, 0x22b6, 0xa1cc, 0x2400, 0x9122, 0xa1d0, + 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa0c4, 0x9420, 0xa0c8, 0x9319, + 0x0804, 0x22b6, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, + 0x0a0c, 0x0dc5, 0xa0d4, 0x9420, 0xa0d8, 0x9319, 0x0804, 0x22b6, + 0x9082, 0x001b, 0x0002, 0x2276, 0x2274, 0x2274, 0x2274, 0x2274, + 0x2274, 0x2283, 0x2274, 0x2274, 0x2274, 0x2274, 0x2274, 0x2290, + 0x2274, 0x2274, 0x2274, 0x2274, 0x2274, 0x229d, 0x2274, 0x2274, + 0x2274, 0x2274, 0x2274, 0x22aa, 0x080c, 0x0dc5, 0xa17c, 0x2400, + 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa06c, 0x9420, + 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, 0xa198, 0x2300, + 0x911b, 0x0a0c, 0x0dc5, 0xa084, 0x9420, 0xa088, 0x9319, 0x0430, + 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, 0x0a0c, 0x0dc5, + 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, 0x2400, 0x9122, + 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0dc5, 0xa0b4, 0x9420, 0xa0b8, + 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, 0x2300, 0x911b, + 0x0a0c, 0x0dc5, 0xa0cc, 0x9420, 0xa0d0, 0x9319, 0xac1e, 0xab22, + 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x2a00, + 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, 0x008e, 0x00de, + 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, + 0x190c, 0x0dbe, 0x9084, 0x0007, 0x0002, 0x22e7, 0x1eeb, 0x22e7, + 0x22dd, 0x22e0, 0x22e3, 0x22e0, 0x22e3, 0x080c, 0x1eeb, 0x0005, + 0x080c, 0x11b2, 0x0005, 0x080c, 0x1eeb, 0x080c, 0x11b2, 0x0005, + 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, + 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, + 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, + 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, + 0x2600, 0x781c, 0xd0a4, 0x190c, 0x2406, 0x7900, 0xd1dc, 0x1118, + 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x232e, 0x2326, + 0x8081, 0x2326, 0x2328, 0x2328, 0x2328, 0x2328, 0x8067, 0x2326, + 0x232a, 0x2326, 0x2328, 0x2326, 0x2328, 0x2326, 0x080c, 0x0dc5, + 0x0031, 0x0020, 0x080c, 0x8067, 0x080c, 0x8081, 0x0005, 0x0006, + 0x0016, 0x0026, 0x080c, 0xf0a0, 0x7930, 0x9184, 0x0003, 0x01c0, + 0x2001, 0x19f7, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133, 0x2004, + 0x9005, 0x090c, 0x0dc5, 0x00c6, 0x2001, 0x19f7, 0x2064, 0x080c, + 0xccf3, 0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x2409, 0x00d0, + 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, + 0x7637, 0x1138, 0x080c, 0x7932, 0x080c, 0x612e, 0x080c, 0x7563, + 0x0010, 0x080c, 0x5fed, 0x080c, 0x8130, 0x0041, 0x0018, 0x9184, + 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, + 0x0046, 0x0056, 0x2071, 0x1a65, 0x080c, 0x1ad9, 0x005e, 0x004e, + 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, + 0x7128, 0x2001, 0x196f, 0x2102, 0x2001, 0x1977, 0x2102, 0x2001, + 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, + 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, + 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, + 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, + 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, + 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, + 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, + 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, + 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, + 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, + 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, + 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, + 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, + 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, + 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, + 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, + 0x0dbe, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, + 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, + 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, + 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2c67, 0x080c, + 0x2b82, 0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, + 0x6150, 0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, + 0x9085, 0x2000, 0x6052, 0x2009, 0x199d, 0x2011, 0x199e, 0x6358, + 0x939c, 0x38f0, 0x2320, 0x080c, 0x2bc6, 0x1238, 0x939d, 0x4003, + 0x94a5, 0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, + 0x8603, 0x230a, 0x2412, 0x9006, 0x080c, 0x2bb1, 0x9006, 0x080c, + 0x2b94, 0x20a9, 0x0012, 0x1d04, 0x245b, 0x2091, 0x6000, 0x1f04, + 0x245b, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, + 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x28ac, 0x2009, + 0x00ef, 0x6132, 0x6136, 0x080c, 0x28bc, 0x60e7, 0x0000, 0x61ea, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1110, 0x2001, + 0x0008, 0x60e2, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, + 0x602f, 0x0000, 0x6007, 0x349f, 0x60bb, 0x0000, 0x20a9, 0x0018, + 0x60bf, 0x0000, 0x1f04, 0x2490, 0x60bb, 0x0000, 0x60bf, 0x0108, + 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf, 0x0320, + 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, + 0x602b, 0x402f, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, + 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, + 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001, 0x0005, + 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x0066, + 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028, 0x006e, 0x1138, 0x6020, + 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4, 0x1198, 0x9184, 0x5e2c, + 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195, 0x0004, 0x9284, 0x0007, + 0x0082, 0x0016, 0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0d70, + 0x0c98, 0x0016, 0x2001, 0x188b, 0x200c, 0xd194, 0x001e, 0x0d30, + 0x0c58, 0x2513, 0x24f9, 0x24fc, 0x24ff, 0x2504, 0x2506, 0x250a, + 0x250e, 0x080c, 0x93e2, 0x00b8, 0x080c, 0x94b1, 0x00a0, 0x080c, + 0x94b1, 0x080c, 0x93e2, 0x0078, 0x0099, 0x0068, 0x080c, 0x93e2, + 0x0079, 0x0048, 0x080c, 0x94b1, 0x0059, 0x0028, 0x080c, 0x94b1, + 0x080c, 0x93e2, 0x0029, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, + 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, 0x2784, + 0xd1f4, 0x190c, 0x0dbe, 0x080c, 0x7637, 0x0904, 0x256e, 0x080c, + 0xd7e3, 0x1120, 0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, + 0x1800, 0x0550, 0x080c, 0x765a, 0x0118, 0x080c, 0x7648, 0x1520, + 0x6027, 0x0020, 0x6043, 0x0000, 0x080c, 0xd7e3, 0x0168, 0x080c, + 0x765a, 0x1150, 0x2001, 0x19a8, 0x2003, 0x0001, 0x6027, 0x1800, + 0x080c, 0x74b2, 0x0804, 0x2787, 0x70a4, 0x9005, 0x1150, 0x70a7, + 0x0001, 0x00d6, 0x2069, 0x0140, 0x080c, 0x768b, 0x00de, 0x1904, + 0x2787, 0x080c, 0x793c, 0x0428, 0x080c, 0x765a, 0x1590, 0x6024, + 0x9084, 0x1800, 0x1108, 0x0468, 0x080c, 0x793c, 0x080c, 0x7932, + 0x080c, 0x612e, 0x080c, 0x7563, 0x0804, 0x2784, 0xd1ac, 0x1508, + 0x6024, 0xd0dc, 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, + 0x0130, 0x7098, 0x9086, 0x0029, 0x1110, 0x080c, 0x7818, 0x0804, + 0x2784, 0x080c, 0x7937, 0x0048, 0x2001, 0x197d, 0x2003, 0x0002, + 0x0020, 0x080c, 0x7774, 0x0804, 0x2784, 0x080c, 0x78ba, 0x0804, + 0x2784, 0x6220, 0xd1bc, 0x0138, 0xd2bc, 0x1904, 0x27e1, 0xd2b4, + 0x1904, 0x27f4, 0x0000, 0xd1ac, 0x0904, 0x2699, 0x0036, 0x6328, + 0xc3bc, 0x632a, 0x003e, 0x080c, 0x7637, 0x11c0, 0x6027, 0x0020, + 0x0006, 0x0026, 0x0036, 0x080c, 0x7651, 0x1158, 0x080c, 0x7932, + 0x080c, 0x612e, 0x080c, 0x7563, 0x003e, 0x002e, 0x000e, 0x00ae, + 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, 0x760f, 0x0016, 0x0046, + 0x00c6, 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, + 0x6043, 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038, + 0xd084, 0x0190, 0x080c, 0xd7e3, 0x1118, 0x9186, 0xf800, 0x1160, + 0x7048, 0xd084, 0x1148, 0xc085, 0x704a, 0x0036, 0x2418, 0x2011, + 0x8016, 0x080c, 0x4c44, 0x003e, 0x080c, 0xd7dc, 0x1904, 0x2676, + 0x9196, 0xff00, 0x05a8, 0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, + 0x0110, 0x9116, 0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x33aa, + 0x0128, 0xc18d, 0x7132, 0x080c, 0x6a9b, 0x1510, 0x6240, 0x9294, + 0x0010, 0x0130, 0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, + 0x7030, 0xd08c, 0x0904, 0x2676, 0x7038, 0xd08c, 0x1140, 0x2001, + 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2676, 0xc1ad, 0x2102, 0x0036, + 0x73d8, 0x2011, 0x8013, 0x080c, 0x4c44, 0x003e, 0x0804, 0x2676, + 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, + 0x2676, 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, + 0x4c44, 0x003e, 0x7130, 0xc185, 0x7132, 0x2011, 0x1848, 0x220c, + 0xd1a4, 0x01f0, 0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, + 0x8a50, 0x2019, 0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xeba1, + 0x00ce, 0x9484, 0x00ff, 0x9080, 0x33b6, 0x200d, 0x918c, 0xff00, + 0x810f, 0x2120, 0x9006, 0x2009, 0x000e, 0x080c, 0xec31, 0x001e, + 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x321b, 0x001e, + 0x00a8, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6724, + 0x1140, 0x7030, 0xd084, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, + 0x6148, 0x8108, 0x1f04, 0x2666, 0x00be, 0x015e, 0x00ce, 0x004e, + 0x080c, 0xb244, 0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014, + 0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, + 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, + 0x622a, 0x2003, 0x0001, 0x2001, 0x1826, 0x2003, 0x0000, 0x6027, + 0x0020, 0xd194, 0x0904, 0x2784, 0x0016, 0x6220, 0xd2b4, 0x0904, + 0x2721, 0x080c, 0x88c3, 0x080c, 0xa6e9, 0x6027, 0x0004, 0x00f6, + 0x2019, 0x19f1, 0x2304, 0x907d, 0x0904, 0x26f0, 0x7804, 0x9086, + 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, + 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003, + 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, + 0x080c, 0x2d49, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, + 0x080c, 0x2c42, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, + 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x080c, 0x99a5, 0x080c, + 0x9ab1, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0xb2d3, + 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, + 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, + 0x080c, 0x2d49, 0x00de, 0x00c6, 0x2061, 0x19e8, 0x6028, 0x080c, + 0xd7e3, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, + 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0xa6c5, 0x0804, 0x2783, + 0x2061, 0x0100, 0x62c0, 0x080c, 0xb0ca, 0x2019, 0x19f1, 0x2304, + 0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0xb352, 0x00ce, 0x0804, + 0x2783, 0xd2bc, 0x0904, 0x276a, 0x080c, 0x88d0, 0x6014, 0x9084, + 0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, + 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d49, 0x00de, + 0x00c6, 0x2061, 0x19e8, 0x6044, 0x080c, 0xd7e3, 0x0120, 0x909a, + 0x0003, 0x1658, 0x0018, 0x909a, 0x00c8, 0x1638, 0x8000, 0x6046, + 0x603c, 0x00ce, 0x9005, 0x05b8, 0x2009, 0x07d0, 0x080c, 0x88c8, + 0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c, + 0x1984, 0x918d, 0x0012, 0x6116, 0x0430, 0x9080, 0x0008, 0x2004, + 0x9086, 0x0009, 0x0d98, 0x6114, 0x918c, 0x1984, 0x918d, 0x0016, + 0x6116, 0x00c8, 0x6027, 0x0004, 0x00b0, 0x0036, 0x2019, 0x0001, + 0x080c, 0xaa49, 0x003e, 0x2019, 0x19f7, 0x2304, 0x9065, 0x0150, + 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, 0x1110, 0x2009, 0x004f, + 0x080c, 0xb352, 0x00ce, 0x001e, 0xd19c, 0x0904, 0x27dc, 0x7038, + 0xd0ac, 0x1538, 0x0016, 0x0156, 0x6027, 0x0008, 0x080c, 0x2d73, + 0x20a9, 0x0028, 0xa001, 0x1f04, 0x2792, 0x6150, 0x9185, 0x1400, + 0x6052, 0x20a9, 0x0366, 0x1d04, 0x279b, 0x080c, 0x88f7, 0x6020, + 0xd09c, 0x1130, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x04a0, + 0x080c, 0x2c29, 0x1f04, 0x279b, 0x015e, 0x6152, 0x001e, 0x6027, + 0x0008, 0x0016, 0x6028, 0xc09c, 0x602a, 0x080c, 0xb244, 0x60e3, + 0x0000, 0x080c, 0xf07f, 0x080c, 0xf09a, 0x080c, 0x57d9, 0xd0fc, + 0x1138, 0x080c, 0xd7dc, 0x1120, 0x9085, 0x0001, 0x080c, 0x767b, + 0x9006, 0x080c, 0x2d39, 0x2009, 0x0002, 0x080c, 0x2c67, 0x00e6, + 0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0ea3, 0x00ee, 0x6027, + 0x0008, 0x080c, 0x0ba0, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae, + 0x0005, 0x0016, 0x2001, 0x188b, 0x200c, 0xd184, 0x001e, 0x0904, + 0x259b, 0x0016, 0x2009, 0x27ed, 0x00d0, 0x2001, 0x188b, 0x200c, + 0xc184, 0x2102, 0x001e, 0x0c40, 0x0016, 0x2001, 0x188b, 0x200c, + 0xd194, 0x001e, 0x0904, 0x259b, 0x0016, 0x2009, 0x2800, 0x0038, + 0x2001, 0x188b, 0x200c, 0xc194, 0x2102, 0x001e, 0x08a8, 0x6028, + 0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003, 0xbc91, 0x8000, 0x2003, + 0xffff, 0x6043, 0x0001, 0x080c, 0x2c61, 0x6027, 0x0080, 0x6017, + 0x0000, 0x6043, 0x0000, 0x0817, 0x0006, 0x0016, 0x0026, 0x0036, + 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x71d0, + 0x70d2, 0x9116, 0x0904, 0x286b, 0x81ff, 0x01a0, 0x2009, 0x0000, + 0x080c, 0x2c67, 0x2011, 0x8011, 0x2019, 0x010e, 0x231c, 0x939e, + 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, 0x2019, 0x0000, 0x080c, + 0x4c44, 0x0448, 0x2001, 0x19a9, 0x200c, 0x81ff, 0x1140, 0x2001, + 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, 0x0003, 0x0008, 0x2118, + 0x2011, 0x8012, 0x080c, 0x4c44, 0x080c, 0x0ea3, 0x080c, 0x57d9, + 0xd0fc, 0x1188, 0x080c, 0xd7dc, 0x1170, 0x00c6, 0x080c, 0x2907, + 0x080c, 0xa9b0, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009, 0x0002, + 0x080c, 0x321b, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, 0x002e, + 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, + 0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8, 0x81ff, + 0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011, 0x1820, + 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148, 0x2011, + 0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, 0x1120, + 0x2500, 0x080c, 0x83a5, 0x0048, 0x9584, 0x00ff, 0x9080, 0x33b6, + 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080, 0x33b6, + 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, 0x2001, + 0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, 0x6856, + 0x1f04, 0x28b7, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, 0x2069, + 0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214, 0x8214, + 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, 0x9184, + 0x000f, 0x9080, 0xf880, 0x2005, 0x6856, 0x8211, 0x1f04, 0x28cc, + 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, 0x6030, + 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, 0x0156, + 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, 0x9116, + 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, 0x0402, + 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x28fc, 0x680f, + 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, 0x080c, + 0x57d5, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, 0x2020, + 0x2009, 0x002e, 0x080c, 0xec31, 0x004e, 0x0005, 0x00f6, 0x0016, + 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x2973, 0x080c, + 0x2bc6, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120, 0x2011, + 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011, 0x8000, + 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009, 0x0001, + 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002, 0x00b0, + 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078, 0x908e, + 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084, 0x0700, + 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300, 0x9080, + 0x0020, 0x2018, 0x080c, 0x9375, 0x928c, 0xff00, 0x0110, 0x2011, + 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, 0x0138, + 0x220a, 0x080c, 0x7637, 0x1118, 0x2009, 0x196d, 0x220a, 0x002e, + 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000, + 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0dbe, 0x002e, 0x001e, + 0x000e, 0x012e, 0x0005, 0x2001, 0x180d, 0x2004, 0xd08c, 0x0118, + 0x2009, 0x0002, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, 0x0168, + 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, 0x1128, + 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001, 0x0227, + 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, 0x0226, + 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, 0x0018, + 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800, 0x0156, + 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1990, 0x2004, 0x908a, + 0x0007, 0x1a0c, 0x0dc5, 0x0033, 0x00ee, 0x002e, 0x001e, 0x000e, + 0x015e, 0x0005, 0x29d9, 0x29f7, 0x2a1b, 0x2a1d, 0x2a46, 0x2a48, + 0x2a4a, 0x2001, 0x0001, 0x080c, 0x281c, 0x080c, 0x2c24, 0x2001, + 0x1992, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, 0x9006, + 0x20a9, 0x0009, 0x080c, 0x2be2, 0x2001, 0x1990, 0x2003, 0x0006, + 0x2009, 0x001e, 0x2011, 0x2a4b, 0x080c, 0x88d5, 0x0005, 0x2009, + 0x1995, 0x200b, 0x0000, 0x2001, 0x199a, 0x2003, 0x0036, 0x2001, + 0x1999, 0x2003, 0x002a, 0x2001, 0x1992, 0x2003, 0x0001, 0x9006, + 0x080c, 0x2b94, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2be2, + 0x2001, 0x1990, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x2a4b, + 0x080c, 0x88d5, 0x0005, 0x080c, 0x0dc5, 0x2001, 0x199a, 0x2003, + 0x0036, 0x2001, 0x1992, 0x2003, 0x0003, 0x7a38, 0x9294, 0x0005, + 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, + 0x2b94, 0x2001, 0x1996, 0x2003, 0x0000, 0x2001, 0xffff, 0x20a9, + 0x0009, 0x080c, 0x2be2, 0x2001, 0x1990, 0x2003, 0x0006, 0x2009, + 0x001e, 0x2011, 0x2a4b, 0x080c, 0x88d5, 0x0005, 0x080c, 0x0dc5, + 0x080c, 0x0dc5, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, + 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001, 0x1992, + 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0dc5, 0x0043, 0x012e, 0x015e, + 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2a6d, 0x2a89, + 0x2ac5, 0x2af1, 0x2b11, 0x2b1d, 0x2b1f, 0x080c, 0x2bd6, 0x1190, + 0x2009, 0x1998, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, + 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x1990, 0x2003, + 0x0001, 0x0030, 0x080c, 0x2b43, 0x2001, 0xffff, 0x080c, 0x29e8, + 0x0005, 0x080c, 0x2b21, 0x05c0, 0x2009, 0x1999, 0x2104, 0x8001, + 0x200a, 0x080c, 0x2bd6, 0x1158, 0x7a38, 0x9294, 0x0005, 0x9296, + 0x0005, 0x0518, 0x2009, 0x1998, 0x2104, 0xc085, 0x200a, 0x2009, + 0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118, 0x080c, + 0x2b29, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, 0x9296, + 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x2bb1, + 0x2001, 0x1992, 0x2003, 0x0002, 0x0028, 0x2001, 0x1990, 0x2003, + 0x0003, 0x0010, 0x080c, 0x2a0a, 0x0005, 0x080c, 0x2b21, 0x0540, + 0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x080c, 0x2bd6, 0x1148, + 0x2001, 0x1990, 0x2003, 0x0003, 0x2001, 0x1991, 0x2003, 0x0000, + 0x00b8, 0x2009, 0x1999, 0x2104, 0x9005, 0x1118, 0x080c, 0x2b66, + 0x0010, 0x080c, 0x2b36, 0x080c, 0x2b29, 0x2009, 0x1995, 0x200b, + 0x0000, 0x2001, 0x1992, 0x2003, 0x0001, 0x080c, 0x2a0a, 0x0000, + 0x0005, 0x0479, 0x01e8, 0x080c, 0x2bd6, 0x1198, 0x2009, 0x1996, + 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078, 0x2001, + 0x199b, 0x2003, 0x000a, 0x2009, 0x1998, 0x2104, 0xc0fd, 0x200a, + 0x0038, 0x00f9, 0x2001, 0x1992, 0x2003, 0x0004, 0x080c, 0x2a35, + 0x0005, 0x0079, 0x0148, 0x080c, 0x2bd6, 0x1118, 0x080c, 0x2a21, + 0x0018, 0x0079, 0x080c, 0x2a35, 0x0005, 0x080c, 0x0dc5, 0x080c, + 0x0dc5, 0x2009, 0x199a, 0x2104, 0x8001, 0x200a, 0x090c, 0x2b82, + 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, + 0x0010, 0x2001, 0x0001, 0x080c, 0x2bb1, 0x0005, 0x7a38, 0x9294, + 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, + 0x080c, 0x2b94, 0x0005, 0x2009, 0x1995, 0x2104, 0x8000, 0x200a, + 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, + 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, + 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, + 0x0010, 0x2001, 0x0001, 0x080c, 0x2bb1, 0x0005, 0x0086, 0x2001, + 0x1998, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0dc5, 0x2009, 0x1997, + 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, + 0x1120, 0x080c, 0x0dc5, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, + 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x1990, 0x20a9, 0x0009, + 0x2003, 0x0000, 0x8000, 0x1f04, 0x2b88, 0x2001, 0x1997, 0x2003, + 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, + 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, + 0x2009, 0x199d, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, + 0x9085, 0x0006, 0x783a, 0x2009, 0x199e, 0x210c, 0x795a, 0x00fe, + 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0138, 0x7838, + 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x0030, 0x7838, 0x9084, + 0xfffb, 0x9085, 0x0005, 0x783a, 0x00fe, 0x0005, 0x0006, 0x2001, + 0x0100, 0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, + 0x0100, 0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, + 0x0064, 0x7820, 0x080c, 0x2c61, 0xd09c, 0x1110, 0x1f04, 0x2bd9, + 0x015e, 0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x7850, + 0x9085, 0x0040, 0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, + 0x2c61, 0x9085, 0x2000, 0x7852, 0x000e, 0x2008, 0x9186, 0x0000, + 0x1118, 0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, + 0x0006, 0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, + 0x9186, 0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, + 0x2c0f, 0x080c, 0x88f7, 0x1f04, 0x2c0f, 0x7850, 0x9085, 0x0400, + 0x9084, 0xdfbf, 0x7852, 0x080c, 0x2c61, 0x9085, 0x1000, 0x7852, + 0x000e, 0x001e, 0x012e, 0x0005, 0x7850, 0x9084, 0xffcf, 0x7852, + 0x0005, 0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, + 0x7854, 0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04, 0x2c33, + 0x0028, 0x7854, 0xd08c, 0x1110, 0x1f04, 0x2c39, 0x00fe, 0x015e, + 0x000e, 0x0005, 0x1d04, 0x2c42, 0x080c, 0x88f7, 0x1f04, 0x2c42, + 0x0005, 0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0000, 0x000e, + 0x0005, 0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0001, 0x000e, + 0x0005, 0x0006, 0x2001, 0x199c, 0x2004, 0x9086, 0x0002, 0x000e, + 0x0005, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, + 0x2001, 0x19a9, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, + 0xd0dc, 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, + 0xa001, 0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141, 0x200c, + 0x918c, 0xff00, 0x9186, 0x2100, 0x0140, 0x9186, 0x2000, 0x0170, + 0x9186, 0x0100, 0x1904, 0x2cda, 0x0048, 0x0016, 0x2009, 0x1a87, + 0x2104, 0x8000, 0x0208, 0x200a, 0x001e, 0x04f0, 0x2009, 0x00a2, + 0x080c, 0x0e52, 0x2019, 0x0160, 0x2324, 0x2011, 0x0003, 0x2009, + 0x0169, 0x2104, 0x9084, 0x0007, 0x210c, 0x918c, 0x0007, 0x910e, + 0x1db0, 0x9086, 0x0003, 0x1548, 0x2304, 0x0066, 0x0076, 0x2031, + 0x0002, 0x233c, 0x973e, 0x0148, 0x8631, 0x1dd8, 0x2031, 0x1a88, + 0x263c, 0x8738, 0x0208, 0x2732, 0x2304, 0x007e, 0x006e, 0x9402, + 0x02a0, 0x19d0, 0x8211, 0x19d8, 0x84ff, 0x0170, 0x2001, 0x0141, + 0x200c, 0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009, 0x180c, + 0x2104, 0xc0dd, 0x200a, 0x0008, 0x0421, 0x2001, 0x1981, 0x200c, + 0x080c, 0x0e52, 0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004, + 0xd0dc, 0x01b0, 0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001, + 0x0141, 0x2004, 0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126, + 0x2091, 0x8000, 0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e, + 0x0005, 0x00c6, 0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161, + 0x2003, 0x0000, 0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008, + 0x6104, 0x918e, 0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017, + 0x0040, 0x04b9, 0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, + 0x2019, 0x0141, 0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084, + 0x2800, 0x0dc0, 0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, + 0x9385, 0x0009, 0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012, + 0x6016, 0x003e, 0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, + 0x0005, 0x0016, 0x0026, 0x080c, 0x7651, 0x0108, 0xc0bc, 0x2009, + 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, + 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, + 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, + 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104, + 0x1128, 0x080c, 0x7651, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, + 0x001e, 0x000e, 0x0005, 0x0006, 0x0156, 0x6050, 0x9085, 0x0040, + 0x6052, 0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c, 0x2c61, 0x9085, + 0x2000, 0x6052, 0x20a9, 0x0012, 0x1d04, 0x2d84, 0x080c, 0x88f7, + 0x1f04, 0x2d84, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, + 0x015e, 0x000e, 0x0005, 0x2fff, 0x2fff, 0x2e23, 0x2e23, 0x2e2f, + 0x2e2f, 0x2e3b, 0x2e3b, 0x2e49, 0x2e49, 0x2e55, 0x2e55, 0x2e63, + 0x2e63, 0x2e71, 0x2e71, 0x2e83, 0x2e83, 0x2e8f, 0x2e8f, 0x2e9d, + 0x2e9d, 0x2ebb, 0x2ebb, 0x2edb, 0x2edb, 0x2eab, 0x2eab, 0x2ecb, + 0x2ecb, 0x2ee9, 0x2ee9, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2efb, 0x2efb, 0x2f07, 0x2f07, 0x2f15, + 0x2f15, 0x2f23, 0x2f23, 0x2f33, 0x2f33, 0x2f41, 0x2f41, 0x2f51, + 0x2f51, 0x2f61, 0x2f61, 0x2f73, 0x2f73, 0x2f81, 0x2f81, 0x2f91, + 0x2f91, 0x2fb3, 0x2fb3, 0x2fd5, 0x2fd5, 0x2fa1, 0x2fa1, 0x2fc4, + 0x2fc4, 0x2fe4, 0x2fe4, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, 0x2e81, + 0x2e81, 0x2e81, 0x2e81, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x24c0, 0x0804, 0x2ff7, 0x0106, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, + 0x22cc, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x22cc, 0x080c, 0x24c0, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x24c0, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x22cc, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x22cc, 0x080c, 0x24c0, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x1394, 0x0804, 0x2ff7, 0x0106, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, + 0x24c0, 0x080c, 0x1394, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22cc, 0x080c, + 0x1394, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x24c0, 0x080c, 0x1394, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x22cc, 0x080c, 0x24c0, 0x080c, + 0x1394, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x22cc, 0x080c, 0x1394, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x1394, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x22cc, 0x080c, 0x24c0, 0x080c, 0x1394, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x0804, 0x2ff7, 0x0106, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, + 0x2976, 0x080c, 0x24c0, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, + 0x22cc, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, 0x080c, + 0x24c0, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x24c0, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, 0x080c, 0x2307, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, 0x080c, 0x24c0, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x1394, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x24c0, 0x080c, 0x1394, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, 0x080c, 0x1394, 0x0804, + 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x2976, 0x080c, 0x24c0, 0x080c, 0x1394, 0x080c, + 0x2307, 0x0804, 0x2ff7, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, 0x080c, + 0x24c0, 0x080c, 0x1394, 0x0498, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, + 0x080c, 0x1394, 0x080c, 0x2307, 0x0410, 0x0106, 0x0006, 0x0126, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, + 0x1394, 0x080c, 0x2307, 0x0098, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2976, 0x080c, 0x22cc, + 0x080c, 0x24c0, 0x080c, 0x1394, 0x080c, 0x2307, 0x0000, 0x015e, + 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d, + 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6a61, 0x1904, + 0x3137, 0x72dc, 0x2001, 0x197c, 0x2004, 0x9005, 0x1110, 0xd29c, + 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x3137, 0x080c, 0x313c, + 0x0804, 0x3137, 0xd2cc, 0x1904, 0x3137, 0x080c, 0x7637, 0x1120, + 0x70af, 0xffff, 0x0804, 0x3137, 0xd294, 0x0120, 0x70af, 0xffff, + 0x0804, 0x3137, 0x080c, 0x33a5, 0x0160, 0x080c, 0xd7e3, 0x0128, + 0x2001, 0x1818, 0x203c, 0x0804, 0x30b0, 0x70af, 0xffff, 0x0804, + 0x3137, 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x30b0, + 0xd28c, 0x1904, 0x30b0, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110, + 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0x938c, 0x0001, + 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e, + 0x0904, 0x30a6, 0x908e, 0x0000, 0x0904, 0x30a6, 0x908e, 0x00ff, + 0x1160, 0x7230, 0xd284, 0x1904, 0x30ab, 0x7294, 0xc28d, 0x7296, + 0x70af, 0xffff, 0x003e, 0x0804, 0x30b0, 0x2009, 0x180d, 0x210c, + 0xd18c, 0x0150, 0x0026, 0x2011, 0x0010, 0x080c, 0x6ac7, 0x002e, + 0x0118, 0x70af, 0xffff, 0x0488, 0x900e, 0x080c, 0x2873, 0x080c, + 0x66b9, 0x1538, 0x9006, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, + 0x00c6, 0x2060, 0x080c, 0x8cf7, 0x00ce, 0x090c, 0x9096, 0xb8af, + 0x0000, 0x080c, 0x6aa3, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, + 0xd0bc, 0x0138, 0x080c, 0x6944, 0x0120, 0x080c, 0x3155, 0x0148, + 0x0028, 0x080c, 0x3295, 0x080c, 0x3181, 0x0118, 0x8318, 0x0804, + 0x304a, 0x73ae, 0x0010, 0x70af, 0xffff, 0x003e, 0x0804, 0x3137, + 0x9780, 0x33b6, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, + 0x70ac, 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, + 0x0220, 0x2008, 0x9802, 0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, + 0x3137, 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x312c, 0x2001, + 0x180d, 0x2004, 0xd08c, 0x0158, 0x0026, 0x2011, 0x0010, 0x080c, + 0x6ac7, 0x002e, 0x0120, 0x2009, 0xffff, 0x0804, 0x3134, 0xc484, + 0x080c, 0x6724, 0x0168, 0x080c, 0xd7e3, 0x1904, 0x312c, 0x080c, + 0x33a5, 0x1904, 0x312c, 0x080c, 0x66b9, 0x1904, 0x3134, 0x0008, + 0xc485, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, + 0x080c, 0x8cf7, 0x00ce, 0x090c, 0x9096, 0xb8af, 0x0000, 0x080c, + 0x6aa3, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, + 0x7294, 0xd28c, 0x0180, 0x080c, 0x6aa3, 0x9082, 0x0006, 0x02e0, + 0xd484, 0x1118, 0x080c, 0x66de, 0x0028, 0x080c, 0x3321, 0x01a0, + 0x080c, 0x334c, 0x0088, 0x080c, 0x3295, 0x080c, 0xd7e3, 0x1160, + 0x080c, 0x3181, 0x0188, 0x0040, 0x080c, 0xd7e3, 0x1118, 0x080c, + 0x3321, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, + 0x30c9, 0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae, 0x004e, + 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af, 0x0001, + 0x2009, 0x007e, 0x080c, 0x66b9, 0x1168, 0xb813, 0x00ff, 0xb817, + 0xfffe, 0x080c, 0x3295, 0x04a9, 0x0128, 0x70dc, 0xc0bd, 0x70de, + 0x080c, 0xd52b, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, + 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, + 0xb325, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xd554, 0x6023, 0x0001, + 0x9006, 0x080c, 0x6656, 0x2001, 0x0000, 0x080c, 0x666a, 0x0126, + 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0004, + 0x080c, 0xb352, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, + 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, + 0x9084, 0x00ff, 0xb842, 0x080c, 0xb325, 0x0548, 0x2b00, 0x6012, + 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, + 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x3250, 0x080c, + 0xd554, 0x6023, 0x0001, 0x9006, 0x080c, 0x6656, 0x2001, 0x0002, + 0x080c, 0x666a, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, + 0x012e, 0x2009, 0x0002, 0x080c, 0xb352, 0x9085, 0x0001, 0x00ce, + 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, + 0x0080, 0x080c, 0x66b9, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, + 0x0039, 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, + 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0xb27d, 0x01d0, 0x2b00, + 0x6012, 0x080c, 0xd554, 0x6023, 0x0001, 0x9006, 0x080c, 0x6656, + 0x2001, 0x0002, 0x080c, 0x666a, 0x0126, 0x2091, 0x8000, 0x70e4, + 0x8000, 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xb352, 0x9085, + 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x66b9, 0x11b8, + 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8cf, 0x0004, 0x080c, 0xb27d, + 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, + 0xd554, 0x2009, 0x0022, 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, + 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, + 0x00b6, 0x21f0, 0x080c, 0x96af, 0x080c, 0x962f, 0x080c, 0xb111, + 0x080c, 0xc2d3, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, + 0x900e, 0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6724, + 0x1140, 0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, + 0x6148, 0x001e, 0x8108, 0x1f04, 0x3235, 0x9686, 0x0001, 0x190c, + 0x3379, 0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, + 0x00e6, 0x00c6, 0x0046, 0x0036, 0x0026, 0x0016, 0x00b6, 0x6210, + 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x96a4, 0x0076, + 0x2039, 0x0000, 0x080c, 0x9577, 0x2c08, 0x080c, 0xe91c, 0x007e, + 0x001e, 0xba10, 0xbb14, 0xbcc0, 0x080c, 0x6148, 0xba12, 0xbb16, + 0xbcc2, 0x00be, 0x001e, 0x002e, 0x003e, 0x004e, 0x00ce, 0x00ee, + 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010, 0x2058, 0xb8a0, 0x00be, + 0x9086, 0x0080, 0x0150, 0x2071, 0x1800, 0x70a8, 0x9005, 0x0110, + 0x8001, 0x70aa, 0x000e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x70e4, + 0x9005, 0x0dc0, 0x8001, 0x70e6, 0x0ca8, 0xb800, 0xc08c, 0xb802, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6, 0x0046, 0x0036, 0x0026, + 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078, + 0x080c, 0x57d5, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020, + 0x2009, 0x002d, 0x080c, 0xec31, 0x20a9, 0x0800, 0x9016, 0x0026, + 0x928e, 0x007e, 0x0904, 0x3300, 0x928e, 0x007f, 0x0904, 0x3300, + 0x928e, 0x0080, 0x05e8, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c0, + 0x8fff, 0x1148, 0x2001, 0x198e, 0x0006, 0x2003, 0x0001, 0x04f1, + 0x000e, 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, + 0x080c, 0x6a6d, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x96a4, + 0x0076, 0x2039, 0x0000, 0x080c, 0x9577, 0x00b6, 0x00c6, 0x0026, + 0x2158, 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, + 0x0404, 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, + 0x00ce, 0x00be, 0x0016, 0x2c08, 0x080c, 0xe91c, 0x001e, 0x007e, + 0x002e, 0x8210, 0x1f04, 0x32b7, 0x015e, 0x001e, 0x002e, 0x003e, + 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, + 0x0016, 0x080c, 0x57d5, 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, + 0x2220, 0x2009, 0x0029, 0x080c, 0xec31, 0x001e, 0x002e, 0x004e, + 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7294, 0x82ff, 0x01e8, + 0x080c, 0x6a9b, 0x11d0, 0x2100, 0x080c, 0x28a6, 0x81ff, 0x01b8, + 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, 0x2c04, 0xd384, 0x0120, + 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x9116, 0x0138, + 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, 0x0001, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x0036, 0x2019, 0x0029, 0x00a9, 0x003e, 0x9180, 0x1000, + 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1ab7, 0x001e, + 0x6112, 0x080c, 0x3250, 0x001e, 0x080c, 0x66de, 0x012e, 0x00ce, + 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0xac6c, 0x080c, + 0xef94, 0x002e, 0x001e, 0x0005, 0x2001, 0x1837, 0x2004, 0xd0cc, + 0x0005, 0x00c6, 0x00b6, 0x080c, 0x7637, 0x1118, 0x20a9, 0x0800, + 0x0010, 0x20a9, 0x0782, 0x080c, 0x7637, 0x1110, 0x900e, 0x0010, + 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, + 0x0110, 0xb800, 0xd0bc, 0x090c, 0x66de, 0x8108, 0x1f04, 0x338a, + 0x2061, 0x1800, 0x607f, 0x0000, 0x6080, 0x9084, 0x00ff, 0x6082, + 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1869, 0x2004, + 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005, 0x0026, + 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef, 0x7de8, + 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, + 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, + 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, + 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, + 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, + 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, + 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, + 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, + 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, + 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, + 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, + 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, + 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, + 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, + 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, + 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, + 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, + 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, + 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, + 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, + 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, + 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, + 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, + 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, + 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, + 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189e, + 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, + 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007, 0x0001, + 0x080c, 0x1027, 0x090c, 0x0dc5, 0x2900, 0x706a, 0xa867, 0x0002, + 0xa8ab, 0xdcb0, 0x080c, 0x1027, 0x090c, 0x0dc5, 0x2900, 0x706e, + 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e, 0x7004, + 0x0002, 0x34e5, 0x34e6, 0x34f9, 0x350d, 0x0005, 0x1004, 0x34f6, + 0x0e04, 0x34f6, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, + 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, + 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c, 0x908e, + 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x35e1, 0x0005, 0x7018, + 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, + 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, + 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, + 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, + 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x35de, + 0x61d0, 0x0804, 0x3573, 0x35b5, 0x35ed, 0x35de, 0x35f9, 0x3603, + 0x3609, 0x360d, 0x361d, 0x3621, 0x3637, 0x363d, 0x3643, 0x364e, + 0x3659, 0x3668, 0x3677, 0x3685, 0x369c, 0x36b7, 0x35de, 0x3762, + 0x37a0, 0x3846, 0x3857, 0x387a, 0x35de, 0x35de, 0x35de, 0x38b2, + 0x38ce, 0x38d7, 0x3906, 0x390c, 0x35de, 0x3952, 0x35de, 0x35de, + 0x35de, 0x35de, 0x35de, 0x395d, 0x3966, 0x396e, 0x3970, 0x35de, + 0x35de, 0x35de, 0x35de, 0x35de, 0x35de, 0x399c, 0x35de, 0x35de, + 0x35de, 0x35de, 0x35de, 0x39b9, 0x3a40, 0x35de, 0x35de, 0x35de, + 0x35de, 0x35de, 0x35de, 0x0002, 0x3a6a, 0x3a6d, 0x3acc, 0x3ae5, + 0x3b15, 0x3db7, 0x35de, 0x5398, 0x35de, 0x35de, 0x35de, 0x35de, + 0x35de, 0x35de, 0x35de, 0x35de, 0x3637, 0x363d, 0x42ec, 0x57f9, + 0x430a, 0x5427, 0x5479, 0x5584, 0x35de, 0x55e6, 0x5622, 0x5653, + 0x575b, 0x5680, 0x56db, 0x35de, 0x430e, 0x44e1, 0x44f7, 0x451c, + 0x4581, 0x45f5, 0x4615, 0x468c, 0x46e8, 0x4744, 0x4747, 0x476c, + 0x4823, 0x4889, 0x4891, 0x49c6, 0x4b6e, 0x4ba2, 0x4e06, 0x35de, + 0x4e24, 0x4eeb, 0x4fd4, 0x502e, 0x35de, 0x50c1, 0x35de, 0x50d7, + 0x50f2, 0x4891, 0x5338, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, + 0x4c20, 0x0126, 0x2091, 0x8000, 0x0e04, 0x35bf, 0x0010, 0x012e, + 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, + 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x7007, 0x0001, + 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, + 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, + 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, + 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x81ff, 0x0d98, 0x0804, + 0x4c2d, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, + 0x7990, 0x0804, 0x4c30, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, + 0x35b5, 0x7984, 0x2114, 0x0804, 0x35b5, 0x20e1, 0x0000, 0x2099, + 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, + 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x35b5, 0x7884, 0x2060, 0x0804, + 0x366a, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0014, 0x789b, + 0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005, 0x0118, + 0x7896, 0x0804, 0x35b5, 0x7897, 0x0001, 0x0804, 0x35b5, 0x2039, + 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x35f1, 0x2039, 0x0001, 0x7d98, + 0x7c9c, 0x0804, 0x35fd, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, + 0x35ea, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x35f1, 0x79a0, 0x9182, + 0x0040, 0x0210, 0x0804, 0x35ea, 0x2138, 0x7d98, 0x7c9c, 0x0804, + 0x35fd, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x35ea, 0x21e8, + 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x35b5, + 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, + 0x1dd8, 0x2010, 0x9005, 0x0904, 0x35b5, 0x0804, 0x35e4, 0x79a0, + 0x9182, 0x0040, 0x0210, 0x0804, 0x35ea, 0x21e0, 0x20a9, 0x0001, + 0x7984, 0x2198, 0x4012, 0x0804, 0x35b5, 0x2069, 0x1847, 0x7884, + 0x7990, 0x911a, 0x1a04, 0x35ea, 0x8019, 0x0904, 0x35ea, 0x684a, + 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, + 0x080c, 0x7963, 0x0804, 0x35b5, 0x2069, 0x1847, 0x7884, 0x7994, + 0x911a, 0x1a04, 0x35ea, 0x8019, 0x0904, 0x35ea, 0x684e, 0x6946, + 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, + 0x2091, 0x8000, 0x080c, 0x6bf8, 0x012e, 0x0804, 0x35b5, 0x902e, + 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35e7, 0x7984, + 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a6, + 0x4101, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, 0x35e7, + 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4c2d, + 0x701f, 0x36db, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, + 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, + 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x35e7, 0x810f, + 0x918c, 0x00ff, 0x0904, 0x35e7, 0x7112, 0x7010, 0x8001, 0x0560, + 0x7012, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, 0x35e7, + 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, + 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, + 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4c2d, 0x701f, 0x3719, + 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, + 0x000a, 0x1904, 0x35e7, 0x0888, 0x0126, 0x2091, 0x8000, 0x7014, + 0x2048, 0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, + 0x0029, 0x1148, 0xc2fd, 0xaa7a, 0x080c, 0x629f, 0x0138, 0xa87a, + 0xa982, 0x012e, 0x0060, 0x080c, 0x65cf, 0x1130, 0x7007, 0x0003, + 0x701f, 0x3747, 0x012e, 0x0005, 0x080c, 0x710b, 0x012e, 0x0126, + 0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, + 0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, + 0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, + 0x0804, 0x4c30, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, + 0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, + 0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, + 0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, + 0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a1c, 0x2004, 0x9005, + 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, + 0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, + 0x81ff, 0x1904, 0x35e7, 0x7984, 0x080c, 0x6724, 0x1904, 0x35ea, + 0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x35ea, 0x7c88, + 0x7d8c, 0x080c, 0x6887, 0x080c, 0x6856, 0x0000, 0x1518, 0x2061, + 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, + 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, + 0x0150, 0x012e, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, + 0x1a04, 0x35e7, 0x0c30, 0x080c, 0xccf3, 0x012e, 0x0904, 0x35e7, + 0x0804, 0x35b5, 0x900e, 0x2001, 0x0005, 0x080c, 0x710b, 0x0126, + 0x2091, 0x8000, 0x080c, 0xd3d4, 0x080c, 0x6e9f, 0x012e, 0x0804, + 0x35b5, 0x00a6, 0x2950, 0xb198, 0x080c, 0x6724, 0x1904, 0x3833, + 0xb6a4, 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, + 0x080c, 0x6887, 0x080c, 0x6856, 0x1520, 0x2061, 0x1cd0, 0x0126, + 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, + 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, + 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, + 0x12b0, 0x0c28, 0x080c, 0xccf3, 0x012e, 0x2009, 0x0003, 0x0178, + 0x00e0, 0x900e, 0x2001, 0x0005, 0x080c, 0x710b, 0x0126, 0x2091, + 0x8000, 0x080c, 0xd3d4, 0x080c, 0x6e92, 0x012e, 0x0070, 0xb097, + 0x4005, 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, + 0x2001, 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, + 0x918d, 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, + 0x35e7, 0x080c, 0x4bfb, 0x0904, 0x35ea, 0x080c, 0x67eb, 0x0904, + 0x35e7, 0x080c, 0x688d, 0x0904, 0x35e7, 0x0804, 0x460c, 0x81ff, + 0x1904, 0x35e7, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x080c, 0x691b, + 0x0904, 0x35e7, 0x2019, 0x0005, 0x79a8, 0x080c, 0x68a8, 0x0904, + 0x35e7, 0x7888, 0x908a, 0x1000, 0x1a04, 0x35ea, 0x8003, 0x800b, + 0x810b, 0x9108, 0x080c, 0x884b, 0x79a8, 0xd184, 0x1904, 0x35b5, + 0x0804, 0x460c, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, + 0x0001, 0x0450, 0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, + 0x2508, 0x080c, 0x6724, 0x11d8, 0x080c, 0x691b, 0x1128, 0x2009, + 0x0002, 0x62c0, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, + 0x68a8, 0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, + 0x1270, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x884b, 0x8529, + 0x1ae0, 0x012e, 0x0804, 0x35b5, 0x012e, 0x0804, 0x35e7, 0x012e, + 0x0804, 0x35ea, 0x080c, 0x4bfb, 0x0904, 0x35ea, 0x080c, 0x67eb, + 0x0904, 0x35e7, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, + 0x96a4, 0x0076, 0x903e, 0x080c, 0x9577, 0x900e, 0x080c, 0xe91c, + 0x007e, 0x00ce, 0x080c, 0x6887, 0x0804, 0x35b5, 0x080c, 0x4bfb, + 0x0904, 0x35ea, 0x080c, 0x6887, 0x2208, 0x0804, 0x35b5, 0x0156, + 0x00d6, 0x00e6, 0x2069, 0x1910, 0x6810, 0x6914, 0x910a, 0x1208, + 0x900e, 0x6816, 0x9016, 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000, + 0x2d04, 0x905d, 0x0118, 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04, + 0x38e8, 0x2300, 0x9218, 0x00ee, 0x00de, 0x015e, 0x0804, 0x35b5, + 0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, + 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, + 0x6910, 0x62bc, 0x0804, 0x35b5, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x35e7, 0x0126, 0x2091, 0x8000, 0x080c, 0x57e9, 0x0128, + 0x2009, 0x0007, 0x012e, 0x0804, 0x35e7, 0x012e, 0x615c, 0x9190, + 0x33b6, 0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, + 0x67dc, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, + 0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, + 0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, + 0x0068, 0x080c, 0x7637, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, + 0x0120, 0x2009, 0x0005, 0x0804, 0x35e7, 0x9036, 0x7e9a, 0x7f9e, + 0x0804, 0x35b5, 0x614c, 0x6250, 0x2019, 0x1986, 0x231c, 0x2001, + 0x1987, 0x2004, 0x789a, 0x0804, 0x35b5, 0x0126, 0x2091, 0x8000, + 0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x35b5, 0x080c, 0x4c17, + 0x0904, 0x35ea, 0xba44, 0xbb38, 0x0804, 0x35b5, 0x080c, 0x0dc5, + 0x080c, 0x4c17, 0x2110, 0x0904, 0x35ea, 0xb804, 0x908c, 0x00ff, + 0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, + 0x0009, 0x1904, 0x35e7, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, + 0x00c6, 0x9066, 0x080c, 0xac6c, 0x080c, 0x96a4, 0x0076, 0x903e, + 0x080c, 0x9577, 0x900e, 0x080c, 0xe91c, 0x007e, 0x00ce, 0xb807, + 0x0407, 0x012e, 0x0804, 0x35b5, 0x614c, 0x6250, 0x7884, 0x604e, + 0x7b88, 0x6352, 0x2069, 0x1847, 0x831f, 0x9305, 0x6816, 0x788c, + 0x2069, 0x1986, 0x2d1c, 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210, + 0x2031, 0x07d0, 0x2069, 0x1987, 0x2d04, 0x266a, 0x789a, 0x0804, + 0x35b5, 0x0126, 0x2091, 0x8000, 0x6138, 0x7884, 0x603a, 0x910e, + 0xd1b4, 0x190c, 0x0ebe, 0xd094, 0x0148, 0x00e6, 0x2071, 0x19fb, + 0x79b4, 0x9192, 0x07d0, 0x1208, 0x713e, 0x00ee, 0xd0c4, 0x01a8, + 0x00d6, 0x78a8, 0x2009, 0x199d, 0x200a, 0x78ac, 0x2011, 0x199e, + 0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, 0x2214, + 0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0xd0ec, 0x0178, + 0x6034, 0xc08d, 0x6036, 0x2001, 0x0050, 0x6076, 0x607a, 0x6056, + 0x606b, 0x2450, 0x00c6, 0x2061, 0x1ad1, 0x2062, 0x00ce, 0x2011, + 0x0114, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0080, 0x0010, + 0x918c, 0xff7f, 0x2112, 0x603c, 0x7988, 0x613e, 0x6140, 0x910d, + 0x788c, 0x6042, 0x7a88, 0x9294, 0x1000, 0x9205, 0x910e, 0xd1e4, + 0x190c, 0x0ed4, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, 0x9084, + 0x0001, 0x090c, 0x42ec, 0x6040, 0xd0cc, 0x0120, 0x78b0, 0x2011, + 0x0114, 0x2012, 0x012e, 0x0804, 0x35b5, 0x00f6, 0x2079, 0x1800, + 0x7a38, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, 0xfebf, + 0x8002, 0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, 0xa897, + 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, 0x0005, + 0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x35ea, 0x788c, + 0x902d, 0x0904, 0x35ea, 0x900e, 0x080c, 0x6724, 0x1120, 0xba44, + 0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, 0x0ca0, + 0x080c, 0x4c17, 0x0904, 0x35ea, 0x7888, 0x900d, 0x0904, 0x35ea, + 0x788c, 0x9005, 0x0904, 0x35ea, 0xba44, 0xb946, 0xbb38, 0xb83a, + 0x0804, 0x35b5, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, 0x080c, + 0x57e9, 0x1904, 0x35e7, 0x00c6, 0x2061, 0x0100, 0x7984, 0x9186, + 0x00ff, 0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, 0x0088, + 0x9182, 0x007f, 0x16e0, 0x9188, 0x33b6, 0x210d, 0x918c, 0x00ff, + 0x2001, 0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, 0x810f, + 0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xb27d, 0x000e, + 0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x66bf, 0x2b08, + 0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4be4, 0x01d0, + 0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, 0xa86a, + 0x701f, 0x3ac5, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, 0xb352, + 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x35e7, 0x00ce, + 0x0804, 0x35ea, 0x080c, 0xb2d3, 0x0cb0, 0xa830, 0x9086, 0x0100, + 0x0904, 0x35e7, 0x0804, 0x35b5, 0x2061, 0x1a74, 0x0126, 0x2091, + 0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, 0x1800, + 0x6354, 0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, 0x012e, + 0x0804, 0x35b5, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, 0x35e7, + 0x080c, 0x7637, 0x0904, 0x35e7, 0x0126, 0x2091, 0x8000, 0x6254, + 0x6074, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x28dc, 0x080c, + 0x5a11, 0x012e, 0x0804, 0x35b5, 0x012e, 0x0804, 0x35ea, 0x0006, + 0x0016, 0x00c6, 0x00e6, 0x2001, 0x19aa, 0x2070, 0x2061, 0x1847, + 0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x9375, 0x7206, + 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, + 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x35b7, 0x7884, + 0xd0fc, 0x0158, 0x2001, 0x002a, 0x2004, 0x9005, 0x0180, 0x9082, + 0x00e1, 0x0298, 0x012e, 0x0804, 0x35ea, 0x2001, 0x002a, 0x2004, + 0x9005, 0x0128, 0x2069, 0x1847, 0x6908, 0x9102, 0x1230, 0x012e, + 0x0804, 0x35ea, 0x012e, 0x0804, 0x35e7, 0x080c, 0xb23d, 0x0dd0, + 0x7884, 0xd0fc, 0x0904, 0x3b94, 0x00c6, 0x080c, 0x4be4, 0x00ce, + 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c, + 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004, + 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031, 0x2004, + 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004, + 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc, + 0x8004, 0xa816, 0x080c, 0x3d1a, 0x0928, 0x7014, 0x2048, 0xad2c, + 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, + 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4c2d, 0x701f, 0x3c57, + 0x7023, 0x0001, 0x012e, 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6, + 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3aff, 0x2001, + 0x19a0, 0x2003, 0x0000, 0x2021, 0x000a, 0x2061, 0x0100, 0x6104, + 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, + 0x3d89, 0x080c, 0x3d48, 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, + 0x1a69, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, + 0x0140, 0x2001, 0x0035, 0x2004, 0x780e, 0x2001, 0x0034, 0x2004, + 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x4130, 0x008e, 0x00ee, + 0x00fe, 0x080c, 0x4052, 0x080c, 0x3f57, 0x05b8, 0x2001, 0x020b, + 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c, 0x41a4, 0x00f6, 0x2079, + 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x1560, 0x2071, 0x0200, + 0x7037, 0x0000, 0x7050, 0x9084, 0xff00, 0x9086, 0x3200, 0x1510, + 0x7037, 0x0001, 0x7050, 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, + 0x7037, 0x0000, 0x7054, 0x7037, 0x0000, 0x715c, 0x9106, 0x1190, + 0x2001, 0x1820, 0x2004, 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, + 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138, 0x080c, 0x3f61, 0x080c, + 0x3d43, 0x0058, 0x080c, 0x3d43, 0x080c, 0x40c8, 0x080c, 0x4048, + 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, + 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x001e, 0x6106, 0x2011, + 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, + 0x0012, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, + 0x12fc, 0x2009, 0x0028, 0x080c, 0x2409, 0x2001, 0x0227, 0x200c, + 0x2102, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, + 0x008e, 0x004e, 0x2001, 0x19a0, 0x2004, 0x9005, 0x1118, 0x012e, + 0x0804, 0x35b5, 0x012e, 0x2021, 0x400c, 0x0804, 0x35b7, 0x0016, + 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, + 0x0156, 0x7014, 0x2048, 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, + 0x9005, 0x0904, 0x3cb3, 0x2048, 0x1f04, 0x3c67, 0x7068, 0x2040, + 0xa28c, 0xa390, 0xa494, 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, + 0x2029, 0x0000, 0x2021, 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, + 0x009e, 0x9086, 0x0103, 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4c2d, 0x701f, + 0x3c57, 0x00b0, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, + 0x0006, 0x080c, 0x0f8b, 0x000e, 0x080c, 0x4c30, 0x701f, 0x3c57, + 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, + 0x002e, 0x001e, 0x0005, 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, + 0x1118, 0x701f, 0x3d18, 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, + 0xa86a, 0x2009, 0x007f, 0x080c, 0x66b9, 0x0110, 0x9006, 0x0030, + 0xb813, 0x00ff, 0xb817, 0xfffd, 0x080c, 0xd5a7, 0x015e, 0x00de, + 0x009e, 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, + 0x0904, 0x35e7, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, + 0x0086, 0x0096, 0x00d6, 0x0156, 0x701f, 0x3cea, 0x7007, 0x0003, + 0x0804, 0x3ca8, 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, + 0x35b7, 0x0076, 0xad10, 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, + 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, + 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f8b, 0x000e, + 0x080c, 0x4c30, 0x007e, 0x701f, 0x3c57, 0x7023, 0x0001, 0x0005, + 0x0804, 0x35b5, 0x0156, 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, + 0xa833, 0x001e, 0x0010, 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, + 0x080c, 0x4be4, 0x001e, 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, + 0x2100, 0x0c58, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, + 0x0005, 0x0006, 0x00f6, 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, + 0x00fe, 0x000e, 0x0005, 0x2001, 0x19a0, 0x2003, 0x0001, 0x0005, + 0x00f6, 0x00e6, 0x00c6, 0x2061, 0x0200, 0x2001, 0x19ab, 0x2004, + 0x601a, 0x2061, 0x0100, 0x2001, 0x19aa, 0x2004, 0x60ce, 0x6104, + 0xc1ac, 0x6106, 0x080c, 0x4be4, 0xa813, 0x0019, 0xa817, 0x0001, + 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, + 0x2004, 0xa86a, 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19aa, + 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, 0x2409, 0x2001, 0x002a, + 0x2004, 0x9084, 0xfff8, 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, + 0x0000, 0x78ca, 0x9006, 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, + 0x0005, 0x00e6, 0x080c, 0x4be4, 0x2940, 0xa013, 0x0019, 0xa017, + 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, + 0x0031, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0xa86e, 0xa873, 0x0000, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, + 0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, + 0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, + 0x2091, 0x8000, 0x81ff, 0x0148, 0x080c, 0x2c59, 0x1130, 0x9006, + 0x080c, 0x2bb1, 0x9006, 0x080c, 0x2b94, 0x2001, 0x199f, 0x2003, + 0x0000, 0x7884, 0x9084, 0x0007, 0x0002, 0x3dd8, 0x3de1, 0x3dea, + 0x3dd5, 0x3dd5, 0x3dd5, 0x3dd5, 0x3dd5, 0x012e, 0x0804, 0x35ea, + 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c, 0x3fab, + 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, 0x080c, + 0x3fab, 0x0078, 0x080c, 0x7637, 0x1128, 0x012e, 0x2009, 0x0016, + 0x0804, 0x35e7, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, + 0x35b7, 0x2001, 0x0141, 0x2004, 0xd0dc, 0x0db0, 0x0086, 0x0096, + 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3aff, + 0x2009, 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, + 0x2060, 0x2058, 0x080c, 0x427f, 0x080c, 0x41cf, 0x903e, 0x2720, + 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a69, 0x2079, 0x0090, + 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, + 0x68d0, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x4130, 0x080c, + 0x2c61, 0x080c, 0x2c61, 0x080c, 0x2c61, 0x080c, 0x2c61, 0x080c, + 0x4130, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x4052, 0x2009, 0x9c40, + 0x8109, 0x11b0, 0x080c, 0x3f61, 0x2001, 0x0004, 0x200c, 0x918c, + 0xfffd, 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, + 0x00ae, 0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x35e7, 0x0cf8, + 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, + 0x0000, 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, + 0x81ff, 0x0150, 0x080c, 0x4030, 0x2d00, 0x9c05, 0x9b05, 0x0120, + 0x080c, 0x3f61, 0x0804, 0x3f0e, 0x080c, 0x41a4, 0x080c, 0x40c8, + 0x080c, 0x4013, 0x080c, 0x4048, 0x00f6, 0x2079, 0x0100, 0x7824, + 0xd0ac, 0x0130, 0x8b58, 0x080c, 0x3f61, 0x00fe, 0x0804, 0x3f0e, + 0x00fe, 0x080c, 0x3f57, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, + 0x2001, 0x0033, 0x2502, 0x080c, 0x3f61, 0x0080, 0x87ff, 0x0138, + 0x2001, 0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, + 0x1a65, 0x2004, 0x9086, 0x0000, 0x1904, 0x3e5e, 0x2001, 0x032f, + 0x2003, 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, + 0x3f0e, 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, + 0x3f0e, 0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, + 0xd0ac, 0x1148, 0x2001, 0x1a65, 0x2003, 0x0003, 0x2001, 0x032a, + 0x2003, 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, + 0xa016, 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x2409, 0x2900, + 0xa85a, 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, + 0x00c6, 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, + 0x0203, 0x2004, 0x1f04, 0x3ee5, 0x00ce, 0x0030, 0xa817, 0x0001, + 0x78b0, 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, + 0x2061, 0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, + 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, + 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3e18, 0x001e, 0x00c6, + 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, + 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, + 0x918c, 0xfffd, 0x2102, 0x080c, 0x12fc, 0x7884, 0x9084, 0x0003, + 0x9086, 0x0002, 0x01a0, 0x2009, 0x0028, 0x080c, 0x2409, 0x2001, + 0x0227, 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ef, 0x6052, 0x602f, + 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x00ce, + 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, 0x9d05, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, + 0x0804, 0x35b5, 0x012e, 0x2021, 0x400c, 0x0804, 0x35b7, 0x9085, + 0x0001, 0x1d04, 0x3f60, 0x2091, 0x6000, 0x8420, 0x9486, 0x0064, + 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, 0x2001, 0x032a, 0x2003, + 0x0004, 0x2001, 0x1a65, 0x2003, 0x0000, 0x0071, 0x2009, 0x0048, + 0x080c, 0x2409, 0x2001, 0x0227, 0x2024, 0x2402, 0x2001, 0x0109, + 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a69, + 0x7000, 0x9086, 0x0000, 0x0520, 0x2079, 0x0090, 0x2009, 0x0206, + 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, + 0x080c, 0x2409, 0x782c, 0xd0fc, 0x0d88, 0x080c, 0x41a4, 0x7000, + 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, + 0x2009, 0x0040, 0x080c, 0x2409, 0x782b, 0x0002, 0x7003, 0x0000, + 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x2001, 0x1818, + 0x200c, 0x7932, 0x7936, 0x080c, 0x28bc, 0x7850, 0x9084, 0xfbff, + 0x9085, 0x0030, 0x7852, 0x2019, 0x01f4, 0x8319, 0x1df0, 0x9084, + 0xffcf, 0x9085, 0x2000, 0x7852, 0x20a9, 0x0046, 0x1d04, 0x3fc6, + 0x2091, 0x6000, 0x1f04, 0x3fc6, 0x7850, 0x9085, 0x0400, 0x9084, + 0xdfff, 0x7852, 0x2001, 0x0021, 0x2004, 0x9084, 0x0003, 0x9086, + 0x0001, 0x1120, 0x7850, 0x9084, 0xdfff, 0x7852, 0x784b, 0xf7f7, + 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x0028, 0xa001, 0x1f04, + 0x3fe6, 0x7850, 0x9085, 0x1400, 0x7852, 0x2019, 0x61a8, 0x7854, + 0xa001, 0xa001, 0xd08c, 0x1110, 0x8319, 0x1dc8, 0x7827, 0x0048, + 0x7850, 0x9085, 0x0400, 0x7852, 0x7843, 0x0040, 0x2019, 0x01f4, + 0xa001, 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2d39, + 0x7827, 0x0020, 0x7843, 0x0000, 0x9006, 0x080c, 0x2d39, 0x7827, + 0x0048, 0x00fe, 0x0005, 0x7884, 0xd0ac, 0x11c8, 0x00f6, 0x00e6, + 0x2071, 0x1a65, 0x2079, 0x0320, 0x2001, 0x0201, 0x2004, 0x9005, + 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, 0x0051, 0xd0bc, 0x0108, + 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, 0x00ee, 0x00fe, 0x0005, + 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, 0x0178, + 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, 0x250a, 0xd0b4, 0x0108, + 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, 0x0108, 0x8b58, 0x0005, + 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, 0x0110, 0x7837, 0x0050, + 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, 0x2001, 0x19ab, 0x2004, + 0x70e2, 0x080c, 0x3d39, 0x1188, 0x2001, 0x1820, 0x2004, 0x2009, + 0x181f, 0x210c, 0x918c, 0x00ff, 0x706e, 0x716a, 0x7066, 0x918d, + 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, 0x702c, 0x9085, 0x0002, + 0x702e, 0x2009, 0x1818, 0x210c, 0x716e, 0x7063, 0x0100, 0x7166, + 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, 0x7077, 0x0008, 0x7078, + 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, 0x7082, 0x7087, 0xaaaa, + 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, 0x70ab, 0x0036, 0x70af, + 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, 0x0092, 0x7016, 0x080c, + 0x41a4, 0x00f6, 0x2071, 0x1a65, 0x2079, 0x0320, 0x00d6, 0x2069, + 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, 0x780e, 0x6898, 0x780a, + 0x00de, 0x080c, 0x3d39, 0x0140, 0x2001, 0x199f, 0x200c, 0x2003, + 0x0001, 0x918e, 0x0001, 0x0120, 0x2009, 0x03e8, 0x8109, 0x1df0, + 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, 0x080c, + 0x4130, 0x2011, 0x0001, 0x080c, 0x4130, 0x00fe, 0x00ee, 0x0005, + 0x00f6, 0x00e6, 0x2071, 0x1a65, 0x2079, 0x0320, 0x792c, 0xd1fc, + 0x0904, 0x412d, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, 0x4129, + 0x7000, 0x0002, 0x412d, 0x40de, 0x410e, 0x4129, 0xd1bc, 0x1170, + 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, 0x4130, + 0x0904, 0x412d, 0x080c, 0x4130, 0x0804, 0x412d, 0x00f6, 0x2079, + 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, 0x0004, + 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, + 0x4030, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, 0x00fe, + 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, 0x7002, + 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x40d2, 0x2011, + 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, 0x0015, + 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, 0x1960, + 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, + 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, 0xa058, + 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, 0x938a, + 0x0007, 0x1a0c, 0x0dc5, 0x9398, 0x415e, 0x231d, 0x083f, 0x9080, + 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, 0x908a, + 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, 0x2001, + 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x419b, 0x4192, + 0x4189, 0x4180, 0x4177, 0x416e, 0x4165, 0xa964, 0x7902, 0xa968, + 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, 0x7902, + 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, 0xa984, + 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, 0x0005, + 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, 0x7916, + 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, 0xa9b0, + 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, 0x7912, + 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, 0xa9cc, + 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, 0x2071, + 0x1a69, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, 0x0002, + 0x2940, 0x9026, 0x7000, 0x0002, 0x41cb, 0x41b7, 0x41c2, 0x8001, + 0x7002, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x4130, 0x190c, + 0x4130, 0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc, 0x1d38, 0x2011, + 0x0001, 0x080c, 0x4130, 0x008e, 0x00ee, 0x00fe, 0x0005, 0x00f6, + 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x19ab, 0x2004, + 0x601a, 0x2061, 0x0100, 0x2001, 0x19aa, 0x2004, 0x60ce, 0x6104, + 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, 0x2038, + 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, 0x4be4, + 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, + 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, + 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x4247, 0x1d68, + 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4be4, 0xa813, 0x0019, 0xa817, + 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, 0x2001, + 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, 0x2079, + 0x0100, 0x2001, 0x19aa, 0x2004, 0x6036, 0x2009, 0x0040, 0x080c, + 0x2409, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, + 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x9006, + 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, + 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, 0x2099, + 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, 0x700e, + 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, 0x702c, + 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, 0x7400, + 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, 0x080c, + 0x4be4, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, 0xa05a, + 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, 0x00e6, + 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, 0x0030, + 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4be4, 0x2940, 0xa813, + 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, 0x2138, + 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, 0x2048, + 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x4247, 0x1d68, 0x2900, + 0xa85a, 0x00d8, 0x080c, 0x4be4, 0x2940, 0xa013, 0x0019, 0xa017, + 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, 0x2001, + 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, 0x2003, + 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, 0x918d, + 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a65, 0x2003, 0x0003, + 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, 0x0000, + 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, + 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x20a9, + 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, 0x20a9, + 0x0014, 0x20a1, 0xffec, 0x20e9, 0x0000, 0x9006, 0x4004, 0x2009, + 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, 0x0005, + 0x0804, 0x35b5, 0x7d98, 0x7c9c, 0x0804, 0x36b9, 0x080c, 0x7637, + 0x190c, 0x60f3, 0x6040, 0x9084, 0x0020, 0x09b1, 0x2069, 0x1847, + 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, + 0x0001, 0x080c, 0x4c2d, 0x701f, 0x4326, 0x0005, 0x080c, 0x57e4, + 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, 0x20d8, 0x21d0, 0x2069, + 0x1847, 0x6800, 0x9005, 0x0904, 0x35ea, 0x2001, 0x180d, 0x2004, + 0xd08c, 0x6804, 0x0118, 0xc0a4, 0xc0ac, 0x6806, 0xd0ac, 0x0118, + 0xd0a4, 0x0904, 0x35ea, 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, + 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, + 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, + 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, + 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, 0x007f, 0x1a04, 0x35ea, + 0x9288, 0x33b6, 0x210d, 0x918c, 0x00ff, 0x6166, 0xd0dc, 0x0130, + 0x6828, 0x908a, 0x007f, 0x1a04, 0x35ea, 0x605e, 0x6888, 0x9084, + 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, 0x0006, 0x2009, 0x19b2, + 0x9080, 0x29b7, 0x2005, 0x200a, 0x000e, 0x2009, 0x19b3, 0x9080, + 0x29bb, 0x2005, 0x200a, 0x6808, 0x908a, 0x0100, 0x0a04, 0x35ea, + 0x908a, 0x0841, 0x1a04, 0x35ea, 0x9084, 0x0007, 0x1904, 0x35ea, + 0x680c, 0x9005, 0x0904, 0x35ea, 0x6810, 0x9005, 0x0904, 0x35ea, + 0x6848, 0x6940, 0x910a, 0x1a04, 0x35ea, 0x8001, 0x0904, 0x35ea, + 0x684c, 0x6944, 0x910a, 0x1a04, 0x35ea, 0x8001, 0x0904, 0x35ea, + 0x2009, 0x1981, 0x200b, 0x0000, 0x2001, 0x1869, 0x2004, 0xd0c4, + 0x0140, 0x7884, 0x200a, 0x2008, 0x080c, 0x0e52, 0x3b00, 0xc085, + 0x20d8, 0x6814, 0x908c, 0x00ff, 0x614e, 0x8007, 0x9084, 0x00ff, + 0x6052, 0x080c, 0x7963, 0x080c, 0x6b8e, 0x080c, 0x6bf8, 0x6808, + 0x602a, 0x080c, 0x237b, 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, + 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, 0x080c, 0x2916, 0x003e, + 0x6000, 0x9086, 0x0000, 0x1904, 0x44cf, 0x6818, 0x691c, 0x6a20, + 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, + 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, + 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, + 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, + 0x0004, 0x20a1, 0x19b4, 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, + 0x20a1, 0x19ce, 0x20e9, 0x0001, 0x4001, 0x080c, 0x8962, 0x00c6, + 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x0510, 0x0068, 0x2009, + 0x0100, 0x210c, 0x918e, 0x0008, 0x1110, 0x839d, 0x0010, 0x83f5, + 0x3e18, 0x12b0, 0x3508, 0x8109, 0x080c, 0x7f6f, 0x6878, 0x6016, + 0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, + 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, + 0x1f04, 0x441f, 0x00ce, 0x00c6, 0x2061, 0x199c, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x11a8, 0x6a88, 0x9284, 0xc000, 0x2010, 0x9286, + 0x0000, 0x1158, 0x2063, 0x0000, 0x2001, 0x0001, 0x080c, 0x2bb1, + 0x2001, 0x0001, 0x080c, 0x2b94, 0x0088, 0x9286, 0x4000, 0x1148, + 0x2063, 0x0001, 0x9006, 0x080c, 0x2bb1, 0x9006, 0x080c, 0x2b94, + 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063, 0x0002, 0x00ce, 0x00e6, + 0x2c70, 0x080c, 0x0ea3, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, + 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030, + 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, + 0x2001, 0x197c, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, + 0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, + 0x080c, 0x298b, 0x2001, 0x196d, 0x2102, 0x0008, 0x2102, 0x00c6, + 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, + 0x7637, 0x0128, 0x080c, 0x50cb, 0x0110, 0x080c, 0x28dc, 0x60d4, + 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x44b7, 0x00e0, 0x080c, + 0x7637, 0x1168, 0x2011, 0x74b2, 0x080c, 0x883d, 0x2011, 0x74a5, + 0x080c, 0x8917, 0x080c, 0x7937, 0x080c, 0x7563, 0x0040, 0x080c, + 0x5fed, 0x0028, 0x6003, 0x0004, 0x2009, 0x44cf, 0x0020, 0x080c, + 0x6a05, 0x0804, 0x35b5, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, + 0x9086, 0x004c, 0x1118, 0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, + 0x0817, 0x6000, 0x9086, 0x0000, 0x0904, 0x35e7, 0x2069, 0x1847, + 0x7890, 0x6842, 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x0804, 0x4c30, 0x9006, + 0x080c, 0x28dc, 0x81ff, 0x1904, 0x35e7, 0x080c, 0x7637, 0x11b0, + 0x080c, 0x7932, 0x080c, 0x612e, 0x080c, 0x33aa, 0x0118, 0x6130, + 0xc18d, 0x6132, 0x080c, 0xd7e3, 0x0130, 0x080c, 0x765a, 0x1118, + 0x080c, 0x760f, 0x0038, 0x080c, 0x7563, 0x0020, 0x080c, 0x60f3, + 0x080c, 0x5fed, 0x0804, 0x35b5, 0x81ff, 0x1904, 0x35e7, 0x080c, + 0x7637, 0x1110, 0x0804, 0x35e7, 0x0126, 0x2091, 0x8000, 0x6194, + 0x81ff, 0x0190, 0x704f, 0x0000, 0x2001, 0x1c80, 0x2009, 0x0040, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x4c30, + 0x701f, 0x35b3, 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, + 0x1c80, 0x20a9, 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, + 0xffff, 0x4304, 0x655c, 0x9588, 0x33b6, 0x210d, 0x918c, 0x00ff, + 0x216a, 0x900e, 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, + 0x6724, 0x1190, 0xb814, 0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, + 0xff00, 0x8007, 0x201a, 0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, + 0xff00, 0x9405, 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208, + 0x0c18, 0x8201, 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, + 0x0040, 0x20a1, 0x1c80, 0x2099, 0x1c80, 0x080c, 0x607e, 0x0804, + 0x452c, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x080c, 0x4be4, 0x1120, + 0x2009, 0x0002, 0x0804, 0x35e7, 0x080c, 0x57d5, 0xd0b4, 0x0558, + 0x7884, 0x908e, 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e, + 0x0080, 0x0508, 0x080c, 0x33a5, 0x1148, 0xb800, 0xd08c, 0x11d8, + 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, + 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd2a3, 0x1120, 0x2009, 0x0003, + 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, 0x45b7, 0x0005, 0x080c, + 0x4c17, 0x0904, 0x35ea, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, + 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, + 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, + 0x9080, 0x0006, 0x2098, 0x080c, 0x0f8b, 0x0070, 0x20a9, 0x0004, + 0xa85c, 0x9080, 0x000a, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, + 0x000a, 0x2098, 0x080c, 0x0f8b, 0x8906, 0x8006, 0x8007, 0x90bc, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4c30, 0x81ff, 0x1904, 0x35e7, + 0x080c, 0x4bfb, 0x0904, 0x35ea, 0x080c, 0x6896, 0x0904, 0x35e7, + 0x0058, 0xa878, 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x35e7, + 0xa974, 0xaa94, 0x0804, 0x35b5, 0x080c, 0x57dd, 0x0904, 0x35b5, + 0x701f, 0x4601, 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x35e7, + 0x7888, 0x908a, 0x1000, 0x1a04, 0x35ea, 0x080c, 0x4c17, 0x0904, + 0x35ea, 0x080c, 0x6aa3, 0x0120, 0x080c, 0x6aab, 0x1904, 0x35ea, + 0x080c, 0x691b, 0x0904, 0x35e7, 0x2019, 0x0004, 0x900e, 0x080c, + 0x68a8, 0x0904, 0x35e7, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, + 0x908a, 0x1000, 0x12f8, 0x080c, 0x4c15, 0x01e0, 0x080c, 0x6aa3, + 0x0118, 0x080c, 0x6aab, 0x11b0, 0x080c, 0x691b, 0x2009, 0x0002, + 0x0168, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x68a8, 0x2009, + 0x0003, 0x0120, 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, + 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, + 0x0030, 0x0005, 0xa897, 0x4000, 0x080c, 0x57dd, 0x0110, 0x9006, + 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186, + 0x00ff, 0x0110, 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800, + 0x645c, 0x2400, 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, + 0x0005, 0x080c, 0x6724, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, + 0x9108, 0x080c, 0x884b, 0x0005, 0x81ff, 0x1904, 0x35e7, 0x798c, + 0x2001, 0x1980, 0x918c, 0x8000, 0x2102, 0x080c, 0x4bfb, 0x0904, + 0x35ea, 0x080c, 0x6aa3, 0x0120, 0x080c, 0x6aab, 0x1904, 0x35ea, + 0x080c, 0x67eb, 0x0904, 0x35e7, 0x080c, 0x689f, 0x0904, 0x35e7, + 0x2001, 0x1980, 0x2004, 0xd0fc, 0x1904, 0x35b5, 0x0804, 0x460c, + 0xa9a0, 0x2001, 0x1980, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, + 0x4c08, 0x01a0, 0x080c, 0x6aa3, 0x0118, 0x080c, 0x6aab, 0x1170, + 0x080c, 0x67eb, 0x2009, 0x0002, 0x0128, 0x080c, 0x689f, 0x1170, + 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, + 0x2001, 0x1980, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x57dd, 0x0110, + 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, + 0x81ff, 0x1904, 0x35e7, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, + 0x2102, 0x080c, 0x4bfb, 0x0904, 0x35ea, 0x080c, 0x6aa3, 0x0120, + 0x080c, 0x6aab, 0x1904, 0x35ea, 0x080c, 0x67eb, 0x0904, 0x35e7, + 0x080c, 0x688d, 0x0904, 0x35e7, 0x2001, 0x197f, 0x2004, 0xd0fc, + 0x1904, 0x35b5, 0x0804, 0x460c, 0xa9a0, 0x2001, 0x197f, 0x918c, + 0x8000, 0xc18d, 0x2102, 0x080c, 0x4c08, 0x01a0, 0x080c, 0x6aa3, + 0x0118, 0x080c, 0x6aab, 0x1170, 0x080c, 0x67eb, 0x2009, 0x0002, + 0x0128, 0x080c, 0x688d, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, + 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, + 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, + 0x1128, 0x080c, 0x57dd, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, + 0x0001, 0x2001, 0x0000, 0x0005, 0x6100, 0x0804, 0x35b5, 0x080c, + 0x4c17, 0x0904, 0x35ea, 0x080c, 0x57e9, 0x1904, 0x35e7, 0x79a8, + 0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a, + 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e, + 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, + 0x918c, 0x0202, 0x0804, 0x35b5, 0x78a8, 0x909c, 0x0003, 0xd0ac, + 0x1158, 0xd0b4, 0x1148, 0x939a, 0x0003, 0x1a04, 0x35e7, 0x625c, + 0x7884, 0x9206, 0x1904, 0x47c7, 0x080c, 0x894c, 0x2001, 0xffec, + 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000, + 0x0006, 0x78a8, 0x9084, 0x0080, 0x1528, 0x0006, 0x0036, 0x2001, + 0x1a83, 0x201c, 0x7b9a, 0x2003, 0x0000, 0x2001, 0x1a84, 0x201c, + 0x7b9e, 0x2003, 0x0000, 0x2001, 0x1a85, 0x201c, 0x7bae, 0x2003, + 0x0000, 0x2001, 0x1a7f, 0x201c, 0x7baa, 0x2003, 0x0000, 0x2001, + 0x1a86, 0x201c, 0x7bb2, 0x2003, 0x0000, 0x003e, 0x000e, 0x000e, + 0x0804, 0x4c30, 0x000e, 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, + 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, + 0x080c, 0x10f8, 0x7007, 0x0002, 0x701f, 0x47e7, 0x0005, 0x81ff, + 0x1904, 0x35e7, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x080c, 0x6aa3, + 0x1904, 0x35e7, 0x00c6, 0x080c, 0x4be4, 0x00ce, 0x0904, 0x35e7, + 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xd249, + 0x0904, 0x35e7, 0x7007, 0x0003, 0x701f, 0x480d, 0x0005, 0x080c, + 0x42ec, 0x0006, 0x0036, 0x2001, 0x1a83, 0x201c, 0x7b9a, 0x2003, + 0x0000, 0x2001, 0x1a84, 0x201c, 0x7b9e, 0x2003, 0x0000, 0x2001, + 0x1a85, 0x201c, 0x7bae, 0x2003, 0x0000, 0x2001, 0x1a7f, 0x201c, + 0x7baa, 0x2003, 0x0000, 0x2001, 0x1a86, 0x201c, 0x7bb2, 0x2003, + 0x0000, 0x003e, 0x000e, 0x0804, 0x35b5, 0xa830, 0x9086, 0x0100, + 0x0904, 0x35e7, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x0804, 0x4c30, 0x9006, 0x080c, 0x28dc, 0x78a8, 0x9084, + 0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x35e7, 0x080c, + 0x7637, 0x0110, 0x080c, 0x60f3, 0x7888, 0x908a, 0x1000, 0x1a04, + 0x35ea, 0x7984, 0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, 0x1a04, + 0x35ea, 0x2100, 0x080c, 0x28a6, 0x0026, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x2061, 0x19fb, 0x601b, 0x0000, 0x601f, 0x0000, 0x607b, + 0x0000, 0x607f, 0x0000, 0x080c, 0x7637, 0x1158, 0x080c, 0x7932, + 0x080c, 0x612e, 0x9085, 0x0001, 0x080c, 0x767b, 0x080c, 0x7563, + 0x00d0, 0x080c, 0xb244, 0x2061, 0x0100, 0x2001, 0x1818, 0x2004, + 0x9084, 0x00ff, 0x810f, 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, + 0x0010, 0x2009, 0x1999, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, + 0x6019, 0x080c, 0x88d5, 0x7984, 0x080c, 0x7637, 0x1110, 0x2009, + 0x00ff, 0x7a88, 0x080c, 0x466f, 0x012e, 0x00ce, 0x002e, 0x0804, + 0x35b5, 0x7984, 0x080c, 0x66b9, 0x2b08, 0x1904, 0x35ea, 0x0804, + 0x35b5, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x35e7, 0x60dc, + 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x35e7, + 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, 0x35e7, 0x7984, + 0x81ff, 0x0904, 0x35ea, 0x9192, 0x0021, 0x1a04, 0x35ea, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, + 0x7736, 0x080c, 0x4c2d, 0x701f, 0x48c4, 0x7880, 0x9086, 0x006e, + 0x0110, 0x701f, 0x527d, 0x0005, 0x2009, 0x0080, 0x080c, 0x6724, + 0x1118, 0x080c, 0x6aa3, 0x0120, 0x2021, 0x400a, 0x0804, 0x35b7, + 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, + 0xa884, 0x90be, 0x0100, 0x0904, 0x495d, 0x90be, 0x0112, 0x0904, + 0x495d, 0x90be, 0x0113, 0x0904, 0x495d, 0x90be, 0x0114, 0x0904, + 0x495d, 0x90be, 0x0117, 0x0904, 0x495d, 0x90be, 0x011a, 0x0904, + 0x495d, 0x90be, 0x011c, 0x0904, 0x495d, 0x90be, 0x0121, 0x0904, + 0x4944, 0x90be, 0x0131, 0x0904, 0x4944, 0x90be, 0x0171, 0x0904, + 0x495d, 0x90be, 0x0173, 0x0904, 0x495d, 0x90be, 0x01a1, 0x1128, + 0xa894, 0x8007, 0xa896, 0x0804, 0x4968, 0x90be, 0x0212, 0x0904, + 0x4951, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, + 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, + 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, + 0x00de, 0x0804, 0x35ea, 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, + 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x49a6, 0x7028, + 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, + 0x0001, 0x080c, 0x49a6, 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, + 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x49b3, + 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, + 0x20e8, 0x20a9, 0x0001, 0x080c, 0x49b3, 0x7028, 0x9080, 0x000c, + 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, + 0x00c6, 0x080c, 0x4be4, 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, + 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, + 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, + 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, + 0xa804, 0x2048, 0x080c, 0xd264, 0x1120, 0x2009, 0x0003, 0x0804, + 0x35e7, 0x7007, 0x0003, 0x701f, 0x499d, 0x0005, 0x00ce, 0x009e, + 0x00de, 0x2009, 0x0002, 0x0804, 0x35e7, 0xa820, 0x9086, 0x8001, + 0x1904, 0x35b5, 0x2009, 0x0004, 0x0804, 0x35e7, 0x0016, 0x0026, + 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, + 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046, 0x3520, + 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004, 0x8421, + 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, + 0x2009, 0x0001, 0x0804, 0x35e7, 0x60dc, 0xd0ac, 0x1188, 0x2009, + 0x180d, 0x210c, 0xd18c, 0x0130, 0xd09c, 0x0120, 0x2009, 0x0016, + 0x0804, 0x35e7, 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x35e7, + 0x7984, 0x78a8, 0x2040, 0x080c, 0xb23d, 0x1120, 0x9182, 0x007f, + 0x0a04, 0x35ea, 0x9186, 0x00ff, 0x0904, 0x35ea, 0x9182, 0x0800, + 0x1a04, 0x35ea, 0x7a8c, 0x7b88, 0x607c, 0x9306, 0x1158, 0x6080, + 0x924e, 0x0904, 0x35ea, 0x080c, 0xb23d, 0x1120, 0x99cc, 0xff00, + 0x0904, 0x35ea, 0x0126, 0x2091, 0x8000, 0x2001, 0x180d, 0x2004, + 0xd08c, 0x0198, 0x9386, 0x00ff, 0x0180, 0x0026, 0x2011, 0x8008, + 0x080c, 0x6ac7, 0x002e, 0x0148, 0x918d, 0x8000, 0x080c, 0x6b11, + 0x1120, 0x2001, 0x4009, 0x0804, 0x4a64, 0x080c, 0x4af7, 0x0904, + 0x4a6a, 0x0086, 0x90c6, 0x4000, 0x008e, 0x1538, 0x00c6, 0x0006, + 0x0036, 0xb818, 0xbb1c, 0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305, + 0xbb28, 0x9305, 0xbb2c, 0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305, + 0x003e, 0x0570, 0xd88c, 0x1128, 0x080c, 0x6aa3, 0x0110, 0xc89d, + 0x0438, 0x900e, 0x080c, 0x6944, 0x1108, 0xc185, 0xb800, 0xd0bc, + 0x0108, 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, + 0x2408, 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, + 0x90c6, 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, + 0x2001, 0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x35b7, + 0x000e, 0x00ce, 0x2b00, 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, + 0x2c70, 0x080c, 0xb325, 0x0904, 0x4abf, 0x2b00, 0x6012, 0x080c, + 0xd554, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, 0x4be4, 0x00ce, + 0x2b70, 0x1158, 0x080c, 0xb2d3, 0x00ee, 0x00ce, 0x00be, 0x001e, + 0x012e, 0x2009, 0x0002, 0x0804, 0x35e7, 0x900e, 0xa966, 0xa96a, + 0x2900, 0x6016, 0xa932, 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, + 0xa86a, 0xd89c, 0x1110, 0x080c, 0x3250, 0x6023, 0x0001, 0x9006, + 0x080c, 0x6656, 0xd89c, 0x0138, 0x2001, 0x0004, 0x080c, 0x666a, + 0x2009, 0x0003, 0x0030, 0x2001, 0x0002, 0x080c, 0x666a, 0x2009, + 0x0002, 0x080c, 0xb352, 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024, + 0x00e6, 0x2058, 0xb8cc, 0xc08d, 0xb8ce, 0x9085, 0x0001, 0x00ee, + 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, 0x0003, 0x0804, + 0x35e7, 0x7007, 0x0003, 0x701f, 0x4ace, 0x0005, 0xa830, 0x2009, + 0x180d, 0x210c, 0xd18c, 0x0140, 0x2008, 0x918e, 0xdead, 0x1120, + 0x2021, 0x4009, 0x0804, 0x35b7, 0x9086, 0x0100, 0x7024, 0x2058, + 0x1138, 0x2009, 0x0004, 0xba04, 0x9294, 0x00ff, 0x0804, 0x5729, + 0x900e, 0xa868, 0xd0f4, 0x1904, 0x35b5, 0x080c, 0x6944, 0x1108, + 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x35b5, 0x00e6, + 0x00d6, 0x0096, 0x83ff, 0x0904, 0x4b46, 0x902e, 0x080c, 0xb23d, + 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, + 0x007f, 0x20a9, 0x0781, 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8, + 0x2100, 0x9406, 0x1904, 0x4b57, 0x2428, 0x94ce, 0x007f, 0x1120, + 0x92ce, 0xfffd, 0x1558, 0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, + 0xfffc, 0x1520, 0x93ce, 0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058, + 0xbf10, 0x2700, 0x9306, 0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8, + 0x2400, 0x9106, 0x1180, 0xd884, 0x0598, 0xd894, 0x1588, 0x080c, + 0x6a43, 0x1570, 0x2001, 0x4000, 0x0460, 0x080c, 0x6aa3, 0x1540, + 0x2001, 0x4000, 0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, + 0x0400, 0x2400, 0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, + 0x0918, 0x080c, 0xb23d, 0x1900, 0x2001, 0x4008, 0x0090, 0x8420, + 0x8e70, 0x1f04, 0x4b0d, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, + 0x2001, 0x0001, 0x0030, 0x080c, 0x66b9, 0x1dd0, 0xbb12, 0xba16, + 0x9006, 0x9005, 0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, + 0x2009, 0x0001, 0x0804, 0x35e7, 0x080c, 0x4be4, 0x1120, 0x2009, + 0x0002, 0x0804, 0x35e7, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, + 0x7884, 0x9005, 0x0904, 0x35ea, 0x9096, 0x00ff, 0x0120, 0x9092, + 0x0004, 0x1a04, 0x35ea, 0x2010, 0x2918, 0x080c, 0x31f6, 0x1120, + 0x2009, 0x0003, 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, 0x4b99, + 0x0005, 0xa830, 0x9086, 0x0100, 0x1904, 0x35b5, 0x2009, 0x0004, + 0x0804, 0x35e7, 0x7984, 0x080c, 0xb23d, 0x1120, 0x9182, 0x007f, + 0x0a04, 0x35ea, 0x9186, 0x00ff, 0x0904, 0x35ea, 0x9182, 0x0800, + 0x1a04, 0x35ea, 0x2001, 0x9400, 0x080c, 0x5784, 0x1904, 0x35e7, + 0x0804, 0x35b5, 0xa998, 0x080c, 0xb23d, 0x1118, 0x9182, 0x007f, + 0x0280, 0x9186, 0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, + 0x9400, 0x080c, 0x5784, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, + 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x0005, 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, + 0x0005, 0x2009, 0x000a, 0x0c48, 0x080c, 0x100e, 0x0198, 0x9006, + 0xa802, 0x7014, 0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, + 0x7018, 0xa802, 0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, + 0x9085, 0x0001, 0x0005, 0x7984, 0x080c, 0x6724, 0x1130, 0x7e88, + 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, + 0xa998, 0x080c, 0x6724, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, + 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, + 0x2608, 0x080c, 0x6724, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, + 0x0016, 0x7114, 0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1040, + 0x0cc8, 0x7116, 0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, + 0x2031, 0x0000, 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, + 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10f8, 0x7007, + 0x0002, 0x701f, 0x35b5, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2079, 0x0000, 0x2001, 0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04, + 0x4c61, 0x7a36, 0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x0804, + 0x4cc7, 0x0016, 0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e, + 0x7044, 0x9005, 0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, + 0x2060, 0x080c, 0x100e, 0x0904, 0x4cbf, 0xa84b, 0x0000, 0x2900, + 0x7046, 0x2001, 0x0002, 0x9080, 0x20c7, 0x2005, 0xa846, 0x0098, + 0x7038, 0x90e0, 0x0004, 0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210, + 0x2061, 0x18ba, 0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, + 0x8108, 0x714a, 0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, + 0xa144, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0dc5, 0x2060, + 0x001e, 0x8108, 0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x100e, + 0x1130, 0x8109, 0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, + 0xa806, 0xa84a, 0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, + 0x2001, 0x0002, 0x9080, 0x20c7, 0x2005, 0xa846, 0x0058, 0x2262, + 0x6306, 0x640a, 0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, + 0x00fe, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4ce9, 0x4ce9, + 0x4ceb, 0x4ce9, 0x4ce9, 0x4ce9, 0x4cef, 0x4ce9, 0x4ce9, 0x4ce9, + 0x4cf3, 0x4ce9, 0x4ce9, 0x4ce9, 0x4cf7, 0x4ce9, 0x4ce9, 0x4ce9, + 0x4cfb, 0x4ce9, 0x4ce9, 0x4ce9, 0x4cff, 0x4ce9, 0x4ce9, 0x4ce9, + 0x4d04, 0x080c, 0x0dc5, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, + 0xa38a, 0xa48e, 0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, + 0xa3aa, 0xa4ae, 0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, + 0xa3ca, 0xa4ce, 0x0804, 0x4cc2, 0xa2d6, 0xa3da, 0xa4de, 0x0804, + 0x4cc2, 0x00e6, 0x2071, 0x189e, 0x7048, 0x9005, 0x0904, 0x4d9b, + 0x0126, 0x2091, 0x8000, 0x0e04, 0x4d9a, 0x00f6, 0x2079, 0x0000, + 0x00c6, 0x0096, 0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, + 0x9005, 0x0500, 0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, + 0x0dc5, 0x2060, 0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, + 0x4d9d, 0xa804, 0x9005, 0x090c, 0x0dc5, 0x7042, 0x2938, 0x2040, + 0xa003, 0x0000, 0x2001, 0x0002, 0x9080, 0x20c7, 0x2005, 0xa04a, + 0x0804, 0x4d9d, 0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, + 0x2200, 0x7836, 0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, + 0x788a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x11aa, 0x87ff, 0x0118, 0x2748, 0x080c, 0x1040, 0x7048, 0x8001, + 0x704a, 0x9005, 0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, + 0x1040, 0x9006, 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, + 0x0420, 0x7040, 0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, + 0x9c80, 0x0004, 0x90fa, 0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e, + 0x00a0, 0x9006, 0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0dc5, + 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, + 0x9080, 0x20c7, 0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, + 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, + 0x0002, 0x4dbc, 0x4dbc, 0x4dbe, 0x4dbc, 0x4dbc, 0x4dbc, 0x4dc3, + 0x4dbc, 0x4dbc, 0x4dbc, 0x4dc8, 0x4dbc, 0x4dbc, 0x4dbc, 0x4dcd, + 0x4dbc, 0x4dbc, 0x4dbc, 0x4dd2, 0x4dbc, 0x4dbc, 0x4dbc, 0x4dd7, + 0x4dbc, 0x4dbc, 0x4dbc, 0x4ddc, 0x080c, 0x0dc5, 0xaa74, 0xab78, + 0xac7c, 0x0804, 0x4d48, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4d48, + 0xaa94, 0xab98, 0xac9c, 0x0804, 0x4d48, 0xaaa4, 0xaba8, 0xacac, + 0x0804, 0x4d48, 0xaab4, 0xabb8, 0xacbc, 0x0804, 0x4d48, 0xaac4, + 0xabc8, 0xaccc, 0x0804, 0x4d48, 0xaad4, 0xabd8, 0xacdc, 0x0804, + 0x4d48, 0x0016, 0x0026, 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, + 0x080c, 0x6724, 0x2019, 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, + 0x0000, 0x2011, 0x801b, 0x080c, 0x4c44, 0x00ce, 0x00be, 0x003e, + 0x002e, 0x001e, 0x0005, 0x0026, 0x080c, 0x57d5, 0xd0c4, 0x0120, + 0x2011, 0x8014, 0x080c, 0x4c44, 0x002e, 0x0005, 0x81ff, 0x1904, + 0x35e7, 0x0126, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, + 0x6032, 0x080c, 0x7637, 0x1158, 0x080c, 0x7932, 0x080c, 0x612e, + 0x9085, 0x0001, 0x080c, 0x767b, 0x080c, 0x7563, 0x0010, 0x080c, + 0x5fed, 0x012e, 0x0804, 0x35b5, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x35e7, 0x080c, 0x57e9, 0x0120, 0x2009, 0x0007, 0x0804, + 0x35e7, 0x080c, 0x6a9b, 0x0120, 0x2009, 0x0008, 0x0804, 0x35e7, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x0178, 0x0026, 0x2011, 0x0010, + 0x080c, 0x6ac7, 0x002e, 0x0140, 0x7984, 0x080c, 0x6b11, 0x1120, + 0x2009, 0x4009, 0x0804, 0x35e7, 0x7984, 0x080c, 0x66b9, 0x1904, + 0x35ea, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x2b00, 0x7026, 0x080c, + 0x6aa3, 0x7888, 0x1170, 0x9084, 0x0005, 0x1158, 0x900e, 0x080c, + 0x6944, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, + 0x35b5, 0x080c, 0x4be4, 0x0904, 0x35e7, 0x9006, 0xa866, 0xa832, + 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd302, 0x0904, 0x35e7, 0x7888, + 0xd094, 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x7007, 0x0003, 0x701f, + 0x4ecb, 0x0005, 0x2061, 0x1800, 0x080c, 0x57e9, 0x2009, 0x0007, + 0x1560, 0x080c, 0x6a9b, 0x0118, 0x2009, 0x0008, 0x0430, 0xa998, + 0x080c, 0x66b9, 0x1530, 0x080c, 0x4c15, 0x0518, 0x080c, 0x6aa3, + 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x6944, + 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, + 0xc0fc, 0xa86a, 0x080c, 0xd302, 0x11e0, 0xa89c, 0xd094, 0x0118, + 0xb8cc, 0xc08d, 0xb8ce, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, + 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, + 0x0005, 0x9006, 0x0005, 0xa830, 0x2009, 0x180d, 0x210c, 0xd18c, + 0x0140, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, + 0x35b7, 0x9086, 0x0100, 0x7024, 0x2058, 0x1110, 0x0804, 0x5729, + 0x900e, 0x080c, 0x6944, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, + 0xc18d, 0x0804, 0x35b5, 0x080c, 0x57e9, 0x0120, 0x2009, 0x0007, + 0x0804, 0x35e7, 0x7f84, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, + 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, 0x35e7, 0x900e, 0x2130, + 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, + 0x702a, 0x20a0, 0x080c, 0x6724, 0x1904, 0x4f81, 0x080c, 0x6aa3, + 0x0138, 0x080c, 0x6aab, 0x0120, 0x080c, 0x6a43, 0x1904, 0x4f81, + 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, + 0x0006, 0x2098, 0x3400, 0xd794, 0x0198, 0x20a9, 0x0008, 0x4003, + 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, 0x49b3, + 0x0080, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, 0x3400, + 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, + 0x49b3, 0x9186, 0x007e, 0x0170, 0x9186, 0x0080, 0x0158, 0x080c, + 0x6aa3, 0x90c2, 0x0006, 0x1210, 0xc1fd, 0x0020, 0x080c, 0x6944, + 0x1108, 0xc1fd, 0x4104, 0xc1fc, 0xd794, 0x0528, 0xb8c4, 0x20e0, + 0xb8c8, 0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, + 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, + 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, + 0x20e0, 0x080c, 0x49a6, 0x9c80, 0x0026, 0x2098, 0xb8c4, 0x20e0, + 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, + 0x0005, 0x8108, 0x080c, 0xb23d, 0x0118, 0x9186, 0x0800, 0x0040, + 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, + 0x0150, 0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, + 0x0150, 0x0804, 0x4f0a, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, + 0x35b5, 0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, + 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, + 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10f8, + 0x7007, 0x0002, 0x701f, 0x4fbd, 0x0005, 0x7030, 0x9005, 0x1180, + 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, + 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x4f0a, + 0x7124, 0x810b, 0x0804, 0x35b5, 0x2029, 0x007e, 0x7984, 0x7a88, + 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, + 0x35ea, 0x9502, 0x0a04, 0x35ea, 0x9184, 0x00ff, 0x90e2, 0x0020, + 0x0a04, 0x35ea, 0x9502, 0x0a04, 0x35ea, 0x9284, 0xff00, 0x8007, + 0x90e2, 0x0020, 0x0a04, 0x35ea, 0x9502, 0x0a04, 0x35ea, 0x9284, + 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35ea, 0x9502, 0x0a04, 0x35ea, + 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x35ea, 0x9502, + 0x0a04, 0x35ea, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x35ea, + 0x9502, 0x0a04, 0x35ea, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, + 0x0a04, 0x35ea, 0x9502, 0x0a04, 0x35ea, 0x9484, 0x00ff, 0x90e2, + 0x0020, 0x0a04, 0x35ea, 0x9502, 0x0a04, 0x35ea, 0x2061, 0x1989, + 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x35b5, 0x080c, 0x4be4, + 0x0904, 0x35e7, 0x2009, 0x0016, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, + 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4c2d, 0x701f, 0x5041, + 0x0005, 0x20a9, 0x0016, 0x896e, 0x8d6e, 0x8d6f, 0x9d84, 0xffc0, + 0x9080, 0x0019, 0x2098, 0x9d84, 0x003f, 0x20e0, 0x2069, 0x1877, + 0x20e9, 0x0001, 0x2da0, 0x4003, 0x6800, 0x9005, 0x0904, 0x50a8, + 0x6804, 0x2008, 0x918c, 0xfff8, 0x1904, 0x50a8, 0x680c, 0x9005, + 0x0904, 0x50a8, 0x9082, 0xff01, 0x1a04, 0x50a8, 0x6810, 0x9082, + 0x005c, 0x06f0, 0x6824, 0x2008, 0x9082, 0x0008, 0x06c8, 0x9182, + 0x0400, 0x16b0, 0x0056, 0x2029, 0x0000, 0x080c, 0x8e80, 0x005e, + 0x6944, 0x6820, 0x9102, 0x0660, 0x6820, 0x9082, 0x0019, 0x1640, + 0x6828, 0x6944, 0x810c, 0x9102, 0x0618, 0x6840, 0x9082, 0x000f, + 0x12f8, 0x080c, 0x1027, 0x2900, 0x0590, 0x684e, 0x00e6, 0x2071, + 0x1931, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8d3c, 0x00be, 0x00ee, + 0x01e8, 0x080c, 0x8a84, 0x080c, 0x8ad3, 0x1160, 0x6857, 0x0000, + 0x00c6, 0x6b10, 0x2061, 0x1a65, 0x630a, 0x00ce, 0x0804, 0x35b5, + 0x0804, 0x35ea, 0x080c, 0x8acc, 0x00e6, 0x2071, 0x1931, 0x080c, + 0x8f00, 0x080c, 0x8f0f, 0x080c, 0x8d21, 0x00ee, 0x2001, 0x188a, + 0x204c, 0x080c, 0x1040, 0x2001, 0x188a, 0x2003, 0x0000, 0x0804, + 0x35e7, 0x0126, 0x2091, 0x8000, 0x080c, 0x92bf, 0x080c, 0x8acc, + 0x012e, 0x0804, 0x35b5, 0x0006, 0x080c, 0x57d5, 0xd0cc, 0x000e, + 0x0005, 0x0006, 0x080c, 0x57d9, 0xd0bc, 0x000e, 0x0005, 0x6174, + 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, 0x0804, 0x35b5, 0x83ff, + 0x1904, 0x35ea, 0x2001, 0xfff0, 0x9200, 0x1a04, 0x35ea, 0x2019, + 0xffff, 0x6078, 0x9302, 0x9200, 0x0a04, 0x35ea, 0x7986, 0x6276, + 0x0804, 0x35b5, 0x080c, 0x57e9, 0x1904, 0x35e7, 0x7c88, 0x7d84, + 0x7e98, 0x7f8c, 0x080c, 0x4be4, 0x0904, 0x35e7, 0x900e, 0x901e, + 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, + 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, + 0x6aa3, 0x0118, 0x080c, 0x6aab, 0x1148, 0x20a9, 0x0001, 0xb814, + 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, + 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, + 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x9375, 0x2208, 0x0804, + 0x35b5, 0x7033, 0x0001, 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, + 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, + 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x10f8, 0x7007, + 0x0002, 0x701f, 0x514c, 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, + 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, + 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, 0x510a, 0x7224, 0x900e, + 0x2001, 0x0003, 0x080c, 0x9375, 0x2208, 0x0804, 0x35b5, 0x00f6, + 0x00e6, 0x080c, 0x57e9, 0x2009, 0x0007, 0x1904, 0x51df, 0x2071, + 0x189e, 0x745c, 0x84ff, 0x2009, 0x000e, 0x1904, 0x51df, 0xac9c, + 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, 0x1027, 0x2009, 0x0002, + 0x0904, 0x51df, 0x2900, 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, + 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, + 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6aa3, 0x0118, 0x080c, + 0x6aab, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, + 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, + 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, + 0x0003, 0x080c, 0x9375, 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, + 0x715c, 0x81ff, 0x090c, 0x0dc5, 0x2148, 0x080c, 0x1040, 0x9006, + 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, + 0x7054, 0x9300, 0x7056, 0x2061, 0x18b9, 0x2c44, 0xa37a, 0x7058, + 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, + 0x51eb, 0x000e, 0xa0a2, 0x080c, 0x10f8, 0x9006, 0x0048, 0x009e, + 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0dc5, + 0x00e6, 0x2071, 0x189e, 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, + 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, + 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, + 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, + 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x9375, + 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0dc5, 0x2148, 0x080c, 0x1040, + 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, + 0x6e9f, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, + 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6aa3, + 0x0118, 0x080c, 0x6aab, 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, + 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, + 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, + 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, 0x81ff, 0x090c, 0x0dc5, + 0x2148, 0x080c, 0x1040, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, + 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, + 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, + 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, + 0x080c, 0x10f8, 0x9006, 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, + 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, + 0x009e, 0x0804, 0x35ea, 0xa884, 0xa988, 0x080c, 0x2873, 0x1518, + 0x080c, 0x66b9, 0x1500, 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, + 0x4be4, 0x01c8, 0x080c, 0x4be4, 0x01b0, 0x009e, 0xa867, 0x0000, + 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, + 0xd284, 0x1120, 0x2009, 0x0003, 0x0804, 0x35e7, 0x7007, 0x0003, + 0x701f, 0x52b8, 0x0005, 0x009e, 0x2009, 0x0002, 0x0804, 0x35e7, + 0x7124, 0x080c, 0x334c, 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, + 0x0004, 0x0804, 0x35e7, 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, + 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, + 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, + 0x20a9, 0x002a, 0x080c, 0x0f8b, 0xaa6c, 0xab70, 0xac74, 0xad78, + 0x2061, 0x18b8, 0x2c44, 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, + 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, + 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, 0x4c30, 0x97c6, 0x7200, + 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b8, + 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, + 0xa59a, 0x080c, 0x10f8, 0x7007, 0x0002, 0x701f, 0x5314, 0x0005, + 0x000e, 0x007e, 0x0804, 0x35ea, 0x7020, 0x2048, 0xa804, 0x2048, + 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, + 0x002a, 0x080c, 0x0f8b, 0x2100, 0x2238, 0x2061, 0x18b8, 0x2c44, + 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, 0x002a, 0x0804, 0x4c30, + 0x81ff, 0x1904, 0x35e7, 0x798c, 0x2001, 0x197e, 0x918c, 0x8000, + 0x2102, 0x080c, 0x4bfb, 0x0904, 0x35ea, 0x080c, 0x6aa3, 0x0120, + 0x080c, 0x6aab, 0x1904, 0x35ea, 0x080c, 0x67eb, 0x0904, 0x35e7, + 0x0126, 0x2091, 0x8000, 0x080c, 0x68b1, 0x012e, 0x0904, 0x35e7, + 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1904, 0x35b5, 0x0804, 0x460c, + 0xa9a0, 0x2001, 0x197e, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, + 0x4c08, 0x01a0, 0x080c, 0x6aa3, 0x0118, 0x080c, 0x6aab, 0x1170, + 0x080c, 0x67eb, 0x2009, 0x0002, 0x0128, 0x080c, 0x68b1, 0x1170, + 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, + 0x2001, 0x197e, 0x2004, 0xd0fc, 0x1128, 0x080c, 0x57dd, 0x0110, + 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, + 0x78a8, 0xd08c, 0x1118, 0xd084, 0x0904, 0x4581, 0x080c, 0x4c17, + 0x0904, 0x35ea, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, + 0x35e7, 0x080c, 0x6aa3, 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, + 0x0005, 0x15a0, 0x78a8, 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, + 0x0028, 0x080c, 0x57d5, 0xd0b4, 0x0904, 0x45bb, 0x7884, 0x908e, + 0x007e, 0x0904, 0x45bb, 0x908e, 0x007f, 0x0904, 0x45bb, 0x908e, + 0x0080, 0x0904, 0x45bb, 0xb800, 0xd08c, 0x1904, 0x45bb, 0xa867, + 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd2a3, 0x1120, 0x2009, + 0x0003, 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, 0x53e0, 0x0005, + 0x080c, 0x4c17, 0x0904, 0x35ea, 0x0804, 0x45bb, 0x080c, 0x33a5, + 0x0108, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x0120, 0x2009, + 0x0001, 0x0804, 0x35e7, 0x080c, 0x57e9, 0x0120, 0x2009, 0x0007, + 0x0804, 0x35e7, 0x080c, 0x6a9b, 0x0120, 0x2009, 0x0008, 0x0804, + 0x35e7, 0xb89c, 0xd0a4, 0x1118, 0xd0ac, 0x1904, 0x45bb, 0x9006, + 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd302, 0x1120, + 0x2009, 0x0003, 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, 0x5419, + 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, + 0x5729, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x0804, 0x53b2, 0x81ff, + 0x2009, 0x0001, 0x1904, 0x35e7, 0x080c, 0x57e9, 0x2009, 0x0007, + 0x1904, 0x35e7, 0x080c, 0x6a9b, 0x0120, 0x2009, 0x0008, 0x0804, + 0x35e7, 0x080c, 0x4c17, 0x0904, 0x35ea, 0x080c, 0x6aa3, 0x2009, + 0x0009, 0x1904, 0x35e7, 0x080c, 0x4be4, 0x2009, 0x0002, 0x0904, + 0x35e7, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, + 0xa95a, 0x9194, 0xfd00, 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, + 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, + 0x35ea, 0xc0e5, 0xa952, 0xa956, 0xa83e, 0x080c, 0xd555, 0x2009, + 0x0003, 0x0904, 0x35e7, 0x7007, 0x0003, 0x701f, 0x5470, 0x0005, + 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x35e7, 0x0804, + 0x35b5, 0x7aa8, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, + 0x57e9, 0x1188, 0x2009, 0x0014, 0x0804, 0x35e7, 0xd2dc, 0x1578, + 0x81ff, 0x2009, 0x0001, 0x1904, 0x35e7, 0x080c, 0x57e9, 0x2009, + 0x0007, 0x1904, 0x35e7, 0xd2f4, 0x0138, 0x9284, 0x5000, 0xc0d5, + 0x080c, 0x57af, 0x0804, 0x35b5, 0xd2fc, 0x0160, 0x080c, 0x4c17, + 0x0904, 0x35ea, 0x7984, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x5784, + 0x0804, 0x35b5, 0x080c, 0x4c17, 0x0904, 0x35ea, 0xb804, 0x9084, + 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x555f, 0x080c, + 0x4be4, 0x2009, 0x0002, 0x0904, 0x555f, 0xa85c, 0x9080, 0x001b, + 0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, + 0x4c2d, 0x701f, 0x54cc, 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, + 0xa870, 0x9005, 0x1120, 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, + 0x35ea, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4c17, + 0x1110, 0x0804, 0x35ea, 0x2009, 0x0043, 0x080c, 0xd5c1, 0x2009, + 0x0003, 0x0904, 0x555f, 0x7007, 0x0003, 0x701f, 0x54f0, 0x0005, + 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x555f, 0x7984, + 0x7aa8, 0x9284, 0x1000, 0xc0d5, 0x080c, 0x5784, 0x0804, 0x35b5, + 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0148, 0xd2ec, 0x0170, 0x080c, + 0x57e9, 0x1158, 0x2009, 0x0014, 0x0804, 0x554e, 0x2061, 0x1800, + 0x080c, 0x57e9, 0x2009, 0x0007, 0x15c8, 0xd2f4, 0x0130, 0x9284, + 0x5000, 0xc0d5, 0x080c, 0x57af, 0x0058, 0xd2fc, 0x0180, 0x080c, + 0x4c15, 0x0590, 0xa998, 0x9284, 0x9000, 0xc0d5, 0x080c, 0x5784, + 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, + 0x4c15, 0x0510, 0x080c, 0x6aa3, 0x2009, 0x0009, 0x11b8, 0xa8c4, + 0x9086, 0x0500, 0x11c8, 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, + 0xff00, 0x1190, 0x080c, 0x4c15, 0x1108, 0x0070, 0x2009, 0x004b, + 0x080c, 0xd5c1, 0x2009, 0x0003, 0x0108, 0x0078, 0x0431, 0x19c0, + 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, + 0x0001, 0x2001, 0x0030, 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, + 0xd2dc, 0x0904, 0x35e7, 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, + 0x080c, 0x5784, 0x001e, 0x1904, 0x35e7, 0x0804, 0x35b5, 0x00f6, + 0x2d78, 0xaab0, 0x0021, 0x00fe, 0x0005, 0xaab0, 0xc2d5, 0xd2dc, + 0x0150, 0x0016, 0xa998, 0x9284, 0x1400, 0xc0fd, 0x080c, 0x5784, + 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x35e7, 0x080c, 0x57e9, 0x0120, 0x2009, 0x0007, 0x0804, + 0x35e7, 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6724, 0x1904, + 0x35ea, 0x9186, 0x007f, 0x0138, 0x080c, 0x6aa3, 0x0120, 0x2009, + 0x0009, 0x0804, 0x35e7, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, + 0x0804, 0x35e7, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, + 0x0100, 0x8007, 0xa80a, 0x080c, 0xd2bd, 0x1120, 0x2009, 0x0003, + 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, 0x55bf, 0x0005, 0xa808, + 0x8007, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x35e7, + 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, + 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x4c30, 0x080c, 0x4be4, + 0x1120, 0x2009, 0x0002, 0x0804, 0x35e7, 0x7984, 0x9194, 0xff00, + 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x7023, 0x19b4, 0x0040, + 0x92c6, 0x0001, 0x1118, 0x7023, 0x19ce, 0x0010, 0x0804, 0x35ea, + 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, + 0x0019, 0xaf60, 0x080c, 0x4c2d, 0x701f, 0x560f, 0x0005, 0x2001, + 0x182e, 0x2003, 0x0001, 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, + 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, + 0x0804, 0x35b5, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, + 0x35e7, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, + 0x1118, 0x2099, 0x19b4, 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, + 0x19ce, 0x0010, 0x0804, 0x35ea, 0xa85c, 0x9080, 0x0019, 0x20a0, + 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, + 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, + 0xaf60, 0x0804, 0x4c30, 0x7884, 0x908a, 0x1000, 0x1a04, 0x35ea, + 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, + 0x2061, 0x19fb, 0x614a, 0x00ce, 0x012e, 0x0804, 0x35b5, 0x00c6, + 0x080c, 0x7637, 0x1160, 0x080c, 0x7932, 0x080c, 0x612e, 0x9085, + 0x0001, 0x080c, 0x767b, 0x080c, 0x7563, 0x080c, 0x0dc5, 0x2061, + 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, 0x5fed, 0x00ce, 0x0005, + 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, 0x0000, 0x0904, 0x35e7, + 0x7884, 0x9005, 0x0188, 0x7888, 0x2061, 0x199c, 0x2c0c, 0x2062, + 0x080c, 0x2c49, 0x01a0, 0x080c, 0x2c51, 0x0188, 0x080c, 0x2c59, + 0x0170, 0x2162, 0x0804, 0x35ea, 0x2061, 0x0100, 0x6038, 0x9086, + 0x0007, 0x1118, 0x2009, 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, + 0x9086, 0x0002, 0x1568, 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, + 0x0026, 0x2011, 0x0003, 0x080c, 0xaabf, 0x2011, 0x0002, 0x080c, + 0xaac9, 0x002e, 0x080c, 0xa9d3, 0x0036, 0x901e, 0x080c, 0xaa49, + 0x003e, 0x60e3, 0x0000, 0x080c, 0xf07f, 0x080c, 0xf09a, 0x9085, + 0x0001, 0x080c, 0x767b, 0x9006, 0x080c, 0x2d39, 0x2001, 0x1800, + 0x2003, 0x0004, 0x2001, 0x19a8, 0x2003, 0x0000, 0x6027, 0x0008, + 0x00ce, 0x0804, 0x35b5, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, + 0x35e7, 0x080c, 0x57e9, 0x0120, 0x2009, 0x0007, 0x0804, 0x35e7, + 0x7984, 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x6724, 0x1904, 0x35ea, + 0x9186, 0x007f, 0x0138, 0x080c, 0x6aa3, 0x0120, 0x2009, 0x0009, + 0x0804, 0x35e7, 0x080c, 0x4be4, 0x1120, 0x2009, 0x0002, 0x0804, + 0x35e7, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd2c0, + 0x1120, 0x2009, 0x0003, 0x0804, 0x35e7, 0x7007, 0x0003, 0x701f, + 0x5712, 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, + 0x0804, 0x35e7, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, + 0x9080, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, + 0x4c30, 0xa898, 0x9086, 0x000d, 0x1904, 0x35e7, 0x2021, 0x4005, + 0x0126, 0x2091, 0x8000, 0x0e04, 0x5736, 0x0010, 0x012e, 0x0cc0, + 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, + 0x0010, 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, + 0x799e, 0x080c, 0x4c20, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x190c, 0x11aa, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, + 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, + 0x19fb, 0x7984, 0x615a, 0x6156, 0x605f, 0x0000, 0x6053, 0x0009, + 0x7898, 0x6072, 0x789c, 0x606e, 0x7888, 0x606a, 0x788c, 0x6066, + 0x2001, 0x1a0b, 0x2044, 0x2001, 0x1a12, 0xa076, 0xa060, 0xa072, + 0xa07b, 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, + 0x00ce, 0x012e, 0x0804, 0x35b5, 0x0126, 0x2091, 0x8000, 0x00b6, + 0x00c6, 0x90e4, 0xc000, 0x0168, 0x0006, 0xd0d4, 0x0130, 0x0036, + 0x2019, 0x0029, 0x080c, 0x336a, 0x003e, 0x080c, 0xd125, 0x000e, + 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, + 0x080c, 0x6148, 0x080c, 0xb23d, 0x0110, 0xb817, 0x0000, 0x9006, + 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126, + 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016, + 0x9180, 0x1000, 0x2004, 0x9005, 0x0188, 0x9186, 0x007e, 0x0170, + 0x9186, 0x007f, 0x0158, 0x9186, 0x0080, 0x0140, 0x9186, 0x00ff, + 0x0128, 0x0026, 0x2200, 0x080c, 0x5784, 0x002e, 0x001e, 0x8108, + 0x1f04, 0x57b7, 0x015e, 0x012e, 0x0005, 0x2001, 0x1848, 0x2004, + 0x0005, 0x2001, 0x1867, 0x2004, 0x0005, 0x0006, 0x2001, 0x1810, + 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0b4, + 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016, + 0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, + 0x0005, 0x79a4, 0x81ff, 0x0904, 0x35ea, 0x9182, 0x0081, 0x1a04, + 0x35ea, 0x810c, 0x0016, 0x080c, 0x4be4, 0x0170, 0x080c, 0x0f16, + 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c, 0x7a90, 0x001e, 0x080c, + 0x4c2d, 0x701f, 0x5819, 0x0005, 0x001e, 0x2009, 0x0002, 0x0804, + 0x35e7, 0x2079, 0x0000, 0x7d94, 0x7c98, 0x7ba8, 0x7aac, 0x79a4, + 0x810c, 0x2061, 0x18b8, 0x2c44, 0xa770, 0xa074, 0x2071, 0x189e, + 0x080c, 0x4c30, 0x701f, 0x582d, 0x0005, 0x2061, 0x18b8, 0x2c44, + 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, 0x0f1e, 0x002e, 0x001e, + 0x080c, 0x0fcb, 0x9006, 0xa802, 0xa806, 0x0804, 0x35b5, 0x0126, + 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044, + 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x59ed, 0x0068, 0xd08c, + 0x0118, 0x080c, 0x58f6, 0x0040, 0xd094, 0x0118, 0x080c, 0x58c6, + 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016, + 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x7030, + 0xd09c, 0x1120, 0x6004, 0x9085, 0x0002, 0x6006, 0x7098, 0x9005, + 0x0120, 0x709b, 0x0000, 0x7093, 0x0000, 0x624c, 0x9286, 0xf0f0, + 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, 0x624a, 0x6043, 0x0090, + 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, 0x9296, 0xf700, 0x0178, + 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, 0x0100, 0x6242, 0x9294, + 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x60aa, 0x00f0, 0x6040, + 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, 0x6043, 0x0000, 0x7087, + 0x0000, 0x70a3, 0x0001, 0x70c7, 0x0000, 0x70df, 0x0000, 0x2009, + 0x1c80, 0x200b, 0x0000, 0x7097, 0x0000, 0x708b, 0x000f, 0x2009, + 0x000f, 0x2011, 0x5f90, 0x080c, 0x88d5, 0x0005, 0x2001, 0x1869, + 0x2004, 0xd08c, 0x0110, 0x705f, 0xffff, 0x7088, 0x9005, 0x1528, + 0x2011, 0x5f90, 0x080c, 0x883d, 0x6040, 0x9094, 0x0010, 0x9285, + 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, 0xd08c, 0x1168, 0x1f04, + 0x58dc, 0x6242, 0x709b, 0x0000, 0x6040, 0x9094, 0x0010, 0x9285, + 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, 0x709b, 0x0000, 0x708f, + 0x0000, 0x9006, 0x080c, 0x6133, 0x0000, 0x0005, 0x708c, 0x908a, + 0x0003, 0x1a0c, 0x0dc5, 0x000b, 0x0005, 0x5900, 0x5951, 0x59ec, + 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, 0x708f, 0x0001, 0x2001, + 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, 0x20a9, 0x0004, 0x6800, + 0x9084, 0x00fc, 0x0120, 0x1f04, 0x590f, 0x080c, 0x0dc5, 0x68a0, + 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, 0xa001, 0x918d, 0x1600, + 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, 0x610f, 0x2079, 0x1c00, + 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, 0x0001, 0x2099, 0x1805, + 0x20e9, 0x0001, 0x20a1, 0x1c0e, 0x20a9, 0x0004, 0x4003, 0x080c, + 0xaf8e, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, + 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x600f, 0x0000, + 0x080c, 0x5fc1, 0x00fe, 0x9006, 0x7092, 0x6043, 0x0008, 0x6042, + 0x0005, 0x00f6, 0x7090, 0x7093, 0x0000, 0x9025, 0x0904, 0x59c9, + 0x6020, 0xd0b4, 0x1904, 0x59c7, 0x71a0, 0x81ff, 0x0904, 0x59b5, + 0x9486, 0x000c, 0x1904, 0x59c2, 0x9480, 0x0018, 0x8004, 0x20a8, + 0x080c, 0x6108, 0x2011, 0x0260, 0x2019, 0x1c00, 0x220c, 0x2304, + 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, 0x596e, 0x6043, 0x0004, + 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, + 0x6043, 0x0006, 0x708f, 0x0002, 0x709b, 0x0002, 0x2009, 0x07d0, + 0x2011, 0x5f97, 0x080c, 0x88d5, 0x080c, 0x610f, 0x04c0, 0x080c, + 0x6108, 0x2079, 0x0260, 0x7930, 0x918e, 0x1101, 0x1558, 0x7834, + 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, 0x1118, 0x7804, 0x9005, + 0x0190, 0x080c, 0x6108, 0x2011, 0x026e, 0x2019, 0x1805, 0x20a9, + 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, 0x11a0, 0x8210, 0x8318, + 0x1f04, 0x59a9, 0x0078, 0x70a3, 0x0000, 0x080c, 0x6108, 0x20e1, + 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x20a9, + 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, 0x0000, 0x0010, 0x00fe, + 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, 0x6020, 0xd0b4, 0x1db8, + 0x080c, 0xaf8e, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, + 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, 0x000c, 0x2011, + 0x19f2, 0x2013, 0x0000, 0x7093, 0x0000, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x080c, 0xa6e0, 0x08d8, 0x0005, 0x7098, 0x908a, 0x001d, + 0x1a0c, 0x0dc5, 0x000b, 0x0005, 0x5a1e, 0x5a31, 0x5a5a, 0x5a7a, + 0x5aa0, 0x5acf, 0x5af5, 0x5b2d, 0x5b53, 0x5b81, 0x5bbc, 0x5bf4, + 0x5c12, 0x5c3d, 0x5c5f, 0x5c7a, 0x5c84, 0x5cb8, 0x5cde, 0x5d0d, + 0x5d33, 0x5d6b, 0x5daf, 0x5dec, 0x5e0d, 0x5e66, 0x5e88, 0x5eb6, + 0x5eb6, 0x00c6, 0x2061, 0x1800, 0x6003, 0x0007, 0x2061, 0x0100, + 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, 0x0005, 0x2061, 0x0140, + 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0002, + 0x709b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x5f97, 0x080c, 0x88d5, + 0x0005, 0x00f6, 0x7090, 0x9086, 0x0014, 0x1510, 0x6042, 0x6020, + 0xd0b4, 0x11f0, 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, 0x7a38, 0xd2fc, 0x0128, + 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x2011, 0x5f97, 0x080c, + 0x883d, 0x709b, 0x0010, 0x080c, 0x5c84, 0x0010, 0x7093, 0x0000, + 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0003, 0x6043, 0x0004, 0x2011, + 0x5f97, 0x080c, 0x883d, 0x080c, 0x608c, 0x2079, 0x0240, 0x7833, + 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, 0x9f88, 0x000e, 0x200b, + 0x0000, 0x8108, 0x1f04, 0x5a6f, 0x60c3, 0x0014, 0x080c, 0x5fc1, + 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5f97, + 0x080c, 0x883d, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6108, 0x2079, + 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, 0x7834, 0x9005, 0x1160, + 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, + 0x709b, 0x0004, 0x0029, 0x0010, 0x080c, 0x60e4, 0x00fe, 0x0005, + 0x00f6, 0x709b, 0x0005, 0x080c, 0x608c, 0x2079, 0x0240, 0x7833, + 0x1103, 0x7837, 0x0000, 0x080c, 0x6108, 0x080c, 0x60eb, 0x1170, + 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011, + 0x0008, 0x080c, 0x5f44, 0x0168, 0x080c, 0x60c1, 0x20a9, 0x0008, + 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, + 0x4003, 0x60c3, 0x0014, 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, + 0x7090, 0x9005, 0x0500, 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, + 0x0014, 0x11b8, 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, + 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0006, 0x0029, + 0x0010, 0x080c, 0x60e4, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0007, + 0x080c, 0x608c, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, + 0x080c, 0x6108, 0x080c, 0x60eb, 0x11b8, 0x7084, 0x9005, 0x11a0, + 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x33b6, 0x200d, 0x918c, + 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5f44, 0x0180, 0x080c, + 0x50d1, 0x0110, 0x080c, 0x28dc, 0x20a9, 0x0008, 0x20e1, 0x0000, + 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, + 0x0014, 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, + 0x0500, 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0014, 0x11b8, + 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, + 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, + 0x1110, 0x70c7, 0x0001, 0x709b, 0x0008, 0x0029, 0x0010, 0x080c, + 0x60e4, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0009, 0x080c, 0x608c, + 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, 0x0100, 0x080c, 0x60eb, + 0x1150, 0x7084, 0x9005, 0x1138, 0x080c, 0x5eb7, 0x1188, 0x9085, + 0x0001, 0x080c, 0x28dc, 0x20a9, 0x0008, 0x080c, 0x6108, 0x20e1, + 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, + 0x60c3, 0x0014, 0x080c, 0x5fc1, 0x0010, 0x080c, 0x5a11, 0x00fe, + 0x0005, 0x00f6, 0x7090, 0x9005, 0x05a8, 0x2011, 0x5f97, 0x080c, + 0x883d, 0x9086, 0x0014, 0x1560, 0x080c, 0x6108, 0x2079, 0x0260, + 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, 0x9084, 0x0100, 0x2011, + 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, + 0x1110, 0x70c7, 0x0001, 0x709b, 0x000a, 0x00b1, 0x0098, 0x9005, + 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, + 0x0001, 0x7097, 0x0000, 0x709b, 0x000e, 0x080c, 0x5c5f, 0x0010, + 0x080c, 0x60e4, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000b, 0x2011, + 0x1c0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, + 0x4304, 0x080c, 0x608c, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, + 0x0000, 0x080c, 0x60eb, 0x0118, 0x2013, 0x0000, 0x0020, 0x7060, + 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, 0x2009, 0x024e, 0x2011, + 0x1c0e, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, + 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5be1, 0x60c3, 0x0084, + 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01c0, + 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0084, 0x1178, 0x080c, + 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1138, 0x7834, + 0x9005, 0x1120, 0x709b, 0x000c, 0x0029, 0x0010, 0x080c, 0x60e4, + 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000d, 0x080c, 0x608c, 0x2079, + 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, 0x080c, 0x6108, 0x20a9, + 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, 0x220e, 0x8210, 0x8108, + 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, + 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, 0x5c25, 0x60c3, + 0x0084, 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, + 0x01e0, 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0084, 0x1198, + 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, 0x1158, + 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x605e, 0x709b, + 0x000e, 0x0029, 0x0010, 0x080c, 0x60e4, 0x00fe, 0x0005, 0x918d, + 0x0001, 0x080c, 0x6133, 0x709b, 0x000f, 0x7093, 0x0000, 0x2061, + 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, 0x2061, 0x0100, 0x6043, + 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x5f97, 0x080c, + 0x8831, 0x0005, 0x7090, 0x9005, 0x0130, 0x2011, 0x5f97, 0x080c, + 0x883d, 0x709b, 0x0000, 0x0005, 0x709b, 0x0011, 0x080c, 0xaf8e, + 0x080c, 0x6108, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, + 0x20a1, 0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, + 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, 0x60eb, 0x11a0, 0x717c, + 0x81ff, 0x0188, 0x900e, 0x7080, 0x9084, 0x00ff, 0x0160, 0x080c, + 0x2873, 0x9186, 0x007e, 0x0138, 0x9186, 0x0080, 0x0120, 0x2011, + 0x0008, 0x080c, 0x5f44, 0x60c3, 0x0014, 0x080c, 0x5fc1, 0x0005, + 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x5f97, 0x080c, 0x883d, + 0x9086, 0x0014, 0x11b8, 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0012, + 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, + 0x0013, 0x080c, 0x609a, 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, + 0x0000, 0x080c, 0x6108, 0x080c, 0x60eb, 0x1170, 0x7084, 0x9005, + 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, + 0x5f44, 0x0168, 0x080c, 0x60c1, 0x20a9, 0x0008, 0x20e1, 0x0000, + 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, + 0x0014, 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, + 0x0500, 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0014, 0x11b8, + 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1104, 0x1178, + 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, + 0x1110, 0x70c7, 0x0001, 0x709b, 0x0014, 0x0029, 0x0010, 0x7093, + 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0015, 0x080c, 0x609a, + 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, 0x0000, 0x080c, 0x6108, + 0x080c, 0x60eb, 0x11b8, 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, + 0xffff, 0x0180, 0x9180, 0x33b6, 0x200d, 0x918c, 0xff00, 0x810f, + 0x2011, 0x0008, 0x080c, 0x5f44, 0x0180, 0x080c, 0x50d1, 0x0110, + 0x080c, 0x28dc, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, + 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, + 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05f0, 0x2011, + 0x5f97, 0x080c, 0x883d, 0x9086, 0x0014, 0x15a8, 0x080c, 0x6108, + 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1568, 0x7834, 0x9084, + 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, 0x9085, 0x0001, 0x080c, + 0x6133, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, + 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, 0xd2fc, 0x0128, 0x70c4, + 0x9005, 0x1110, 0x70c7, 0x0001, 0x9085, 0x0001, 0x080c, 0x6133, + 0x7097, 0x0000, 0x7a38, 0xd2f4, 0x0110, 0x70df, 0x0008, 0x709b, + 0x0016, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x080c, + 0xaf8e, 0x080c, 0x6108, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, + 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, 0x4003, 0x2011, 0x026d, + 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, 0x2012, 0x2011, 0x026e, + 0x709b, 0x0017, 0x080c, 0x60eb, 0x1150, 0x7084, 0x9005, 0x1138, + 0x080c, 0x5eb7, 0x1188, 0x9085, 0x0001, 0x080c, 0x28dc, 0x20a9, + 0x0008, 0x080c, 0x6108, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, + 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x5fc1, + 0x0010, 0x080c, 0x5a11, 0x0005, 0x00f6, 0x7090, 0x9005, 0x01d8, + 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0084, 0x1190, 0x080c, + 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1106, 0x1150, 0x7834, + 0x9005, 0x1138, 0x9006, 0x080c, 0x6133, 0x709b, 0x0018, 0x0029, + 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0019, + 0x080c, 0x609a, 0x2079, 0x0240, 0x7833, 0x1106, 0x7837, 0x0000, + 0x080c, 0x6108, 0x2009, 0x026e, 0x2039, 0x1c0e, 0x20a9, 0x0040, + 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, 0x1128, 0x6814, 0x8000, + 0x6816, 0x2009, 0x0260, 0x1f04, 0x5e20, 0x2039, 0x1c0e, 0x080c, + 0x60eb, 0x11e8, 0x2728, 0x2514, 0x8207, 0x9084, 0x00ff, 0x8000, + 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, 0x202a, 0x7060, 0x2310, + 0x8214, 0x92a0, 0x1c0e, 0x2414, 0x938c, 0x0001, 0x0118, 0x9294, + 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, 0x9215, 0x2222, 0x20a9, + 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, 0x8108, 0x9186, 0x0260, + 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, 0x5e53, + 0x60c3, 0x0084, 0x080c, 0x5fc1, 0x00fe, 0x0005, 0x00f6, 0x7090, + 0x9005, 0x01e0, 0x2011, 0x5f97, 0x080c, 0x883d, 0x9086, 0x0084, + 0x1198, 0x080c, 0x6108, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1107, + 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, 0x080c, 0x605e, + 0x709b, 0x001a, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, + 0x9085, 0x0001, 0x080c, 0x6133, 0x709b, 0x001b, 0x080c, 0xaf8e, + 0x080c, 0x6108, 0x2011, 0x0260, 0x2009, 0x0240, 0x7490, 0x9480, + 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x220e, + 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, 0x6812, + 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, 0x1f04, + 0x5e9f, 0x60c3, 0x0084, 0x080c, 0x5fc1, 0x0005, 0x0005, 0x0086, + 0x0096, 0x2029, 0x1848, 0x252c, 0x20a9, 0x0008, 0x2041, 0x1c0e, + 0x20e9, 0x0001, 0x28a0, 0x080c, 0x6108, 0x20e1, 0x0000, 0x2099, + 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0108, + 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, 0xffff, 0x1148, 0xd5d4, + 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x5ed1, 0x0804, 0x5f40, + 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, 0x3fff, 0x0d90, 0x0020, + 0x91a6, 0x3fff, 0x0904, 0x5f40, 0x918d, 0xc000, 0x20a9, 0x0010, + 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, 0xd5d4, + 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, 0x8319, + 0x0008, 0x8318, 0x1f04, 0x5ef7, 0x04d8, 0x23a8, 0x2021, 0x0001, + 0x8426, 0x8425, 0x1f04, 0x5f09, 0x2328, 0x8529, 0x92be, 0x0007, + 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0x973a, 0x000e, 0x27a8, + 0x95a8, 0x0010, 0x1f04, 0x5f18, 0x755e, 0x95c8, 0x33b6, 0x292d, + 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, + 0x28bc, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, 0x9405, + 0x201a, 0x7087, 0x0001, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20e1, + 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, 0x9085, 0x0001, 0x0008, + 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, + 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, 0x013e, 0x01de, 0x01ce, + 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, 0x939a, 0x0010, 0x0218, + 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0x939a, 0x0010, + 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, + 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, 0x2504, 0x942c, 0x11b8, + 0x9405, 0x203a, 0x715e, 0x91a0, 0x33b6, 0x242d, 0x95ac, 0x00ff, + 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, 0x080c, 0x28bc, 0x001e, + 0x60e7, 0x0000, 0x65ea, 0x7087, 0x0001, 0x9084, 0x0000, 0x0005, + 0x00e6, 0x2071, 0x1800, 0x708b, 0x0000, 0x00ee, 0x0005, 0x00e6, + 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, 0x080c, 0x604d, 0x080c, + 0xa6e9, 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2d49, 0x0126, + 0x2091, 0x8000, 0x2071, 0x1826, 0x2073, 0x0000, 0x7840, 0x0026, + 0x0016, 0x2009, 0x00f7, 0x080c, 0x60aa, 0x001e, 0x9094, 0x0010, + 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, + 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x2bce, 0x0228, 0x2011, + 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, 0x19f2, 0x2013, 0x0000, + 0x7093, 0x0000, 0x012e, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, + 0xa6e0, 0x6144, 0xd184, 0x0120, 0x7198, 0x918d, 0x2000, 0x0018, + 0x718c, 0x918d, 0x1000, 0x2011, 0x1999, 0x2112, 0x2009, 0x07d0, + 0x2011, 0x5f97, 0x080c, 0x88d5, 0x0005, 0x0016, 0x0026, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x080c, 0xb244, 0x2009, 0x00f7, 0x080c, + 0x60aa, 0x2061, 0x19fb, 0x900e, 0x611a, 0x611e, 0x617a, 0x617e, + 0x2061, 0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, + 0x6043, 0x0010, 0x2009, 0x1999, 0x200b, 0x0000, 0x2009, 0x002d, + 0x2011, 0x6019, 0x080c, 0x8831, 0x012e, 0x00ce, 0x002e, 0x001e, + 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, + 0x0100, 0x080c, 0xa6e9, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, + 0x0110, 0x080c, 0x2d49, 0x080c, 0x763f, 0x0188, 0x080c, 0x765a, + 0x1170, 0x080c, 0x793c, 0x0016, 0x080c, 0x298b, 0x2001, 0x196d, + 0x2102, 0x001e, 0x080c, 0x7937, 0x080c, 0x7563, 0x0050, 0x2009, + 0x0001, 0x080c, 0x2c67, 0x2001, 0x0001, 0x080c, 0x281c, 0x080c, + 0x5fed, 0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, + 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1999, + 0x201c, 0x080c, 0x4c44, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, + 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x080c, 0x6108, 0x20e9, 0x0000, + 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x6102, 0x2099, + 0x0260, 0x20a1, 0x1c92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x6105, + 0x2099, 0x0260, 0x20a1, 0x1cb2, 0x0009, 0x0005, 0x0016, 0x0026, + 0x3410, 0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, + 0x6082, 0x002e, 0x001e, 0x0005, 0x080c, 0xaf8e, 0x20e1, 0x0001, + 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, + 0x4003, 0x0005, 0x080c, 0xaf8e, 0x080c, 0x6108, 0x20e1, 0x0000, + 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, + 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, + 0x1834, 0x2004, 0x9005, 0x1138, 0x2001, 0x1818, 0x2004, 0x9084, + 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, + 0x0005, 0x0016, 0x0046, 0x080c, 0x6a9f, 0x0158, 0x9006, 0x2020, + 0x2009, 0x002a, 0x080c, 0xec31, 0x2001, 0x180c, 0x200c, 0xc195, + 0x2102, 0x2019, 0x002a, 0x900e, 0x080c, 0x321b, 0x080c, 0xd7e3, + 0x0140, 0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4dfb, + 0x003e, 0x004e, 0x001e, 0x0005, 0x080c, 0x5fed, 0x709b, 0x0000, + 0x7093, 0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, + 0x0100, 0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, + 0x2001, 0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, + 0x000e, 0x0005, 0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, + 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, + 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, + 0x20a1, 0x1c00, 0x4004, 0x2079, 0x1c00, 0x7803, 0x2200, 0x7807, + 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, + 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, + 0x2003, 0x0001, 0x0005, 0x2001, 0x19a7, 0x0118, 0x2003, 0x0001, + 0x0010, 0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, + 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04, 0x6142, 0x015e, 0x0005, + 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x1847, 0x9006, + 0xb802, 0xb8ce, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, + 0x33b6, 0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb8c2, + 0x080c, 0xb23d, 0x1120, 0x9192, 0x007e, 0x1208, 0xbbc2, 0x20a9, + 0x0004, 0xb8c4, 0x20e8, 0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, + 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, + 0x001e, 0xb83e, 0xb842, 0xb84e, 0xb852, 0xb856, 0xb85a, 0xb85e, + 0xb862, 0xb866, 0xb86a, 0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, + 0xb88a, 0xb88e, 0xb893, 0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8be, + 0xb9a2, 0x0096, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1040, 0xb8a7, + 0x0000, 0x009e, 0x9006, 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, + 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0198, 0x00c6, 0x2060, 0x9c82, + 0x1cd0, 0x0a0c, 0x0dc5, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, + 0x0dc5, 0x080c, 0x8cf7, 0x00ce, 0x090c, 0x9096, 0xb8af, 0x0000, + 0x6814, 0x9084, 0x00ff, 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, + 0x00de, 0x0005, 0x0126, 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, + 0x3fff, 0x9082, 0x4000, 0x1a04, 0x6230, 0x9182, 0x0800, 0x1a04, + 0x6234, 0x2001, 0x180c, 0x2004, 0x9084, 0x0003, 0x1904, 0x623a, + 0x9188, 0x1000, 0x2104, 0x905d, 0x0518, 0xb804, 0x9084, 0x00ff, + 0x908e, 0x0006, 0x1508, 0xb8a4, 0x900d, 0x1904, 0x624c, 0xb850, + 0x900d, 0x1148, 0xa802, 0x2900, 0xb852, 0xb84e, 0x080c, 0x951c, + 0x9006, 0x012e, 0x0005, 0x00a6, 0x2150, 0x2900, 0xb002, 0xa803, + 0x0000, 0x00ae, 0xb852, 0x0c90, 0x2001, 0x0005, 0x900e, 0x04b8, + 0x2001, 0x0028, 0x900e, 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, + 0xb23d, 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, + 0x0990, 0x2001, 0x0029, 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, + 0x00a8, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, + 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001, 0x0029, + 0xb900, 0xd1fc, 0x0118, 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, + 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, + 0x012e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, + 0x1000, 0x2104, 0x905d, 0x09a8, 0x080c, 0x6aa3, 0x1990, 0xb800, + 0xd0bc, 0x0978, 0x0804, 0x61e3, 0x080c, 0x68c0, 0x0904, 0x61fc, + 0x0804, 0x61e7, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa874, + 0x908e, 0x00ff, 0x1120, 0x2001, 0x196b, 0x205c, 0x0060, 0xa974, + 0x9182, 0x0800, 0x1690, 0x9188, 0x1000, 0x2104, 0x905d, 0x01d0, + 0x080c, 0x6a43, 0x11d0, 0x080c, 0xb27d, 0x0570, 0x2b00, 0x6012, + 0x2900, 0x6016, 0x6023, 0x0009, 0x600b, 0x0000, 0xa874, 0x908e, + 0x00ff, 0x1110, 0x600b, 0x8000, 0x2009, 0x0043, 0x080c, 0xb352, + 0x9006, 0x00b0, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, + 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, + 0x0004, 0x0010, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, + 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00b6, + 0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, + 0x631d, 0x9188, 0x1000, 0x2104, 0x905d, 0x0904, 0x62f5, 0xb8a0, + 0x9086, 0x007f, 0x0190, 0xa87c, 0xd0fc, 0x1178, 0x080c, 0x6aab, + 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, 0x0004, 0x0130, 0x908e, + 0x0005, 0x0118, 0x080c, 0x6aa3, 0x1598, 0xa87c, 0xd0fc, 0x01e0, + 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, 0x2010, 0x080c, 0xd0c6, + 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, 0x631f, 0x6020, 0x9086, + 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, 0x631f, 0x601a, 0x6003, + 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, 0xb27d, 0x05e8, 0x2b00, + 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0x2009, + 0x0003, 0x080c, 0xb352, 0x9006, 0x0458, 0x2001, 0x0028, 0x0438, + 0x9082, 0x0006, 0x1290, 0x080c, 0xb23d, 0x1160, 0xb8a0, 0x9084, + 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, 0x2001, 0x0029, 0x2009, + 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, 0x2009, 0x180c, 0x210c, + 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, 0xd184, 0x0118, 0x2001, + 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, 0x2001, 0x0029, 0x9005, + 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, 0x002c, 0x0cc0, 0x00f6, + 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, 0x9005, 0x1550, 0xa8dc, + 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, 0x1518, 0xa8c4, 0x9082, + 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, 0x9182, 0x0800, 0x12e8, + 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, 0xab94, 0xa878, 0x9084, + 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, + 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, + 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, + 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, 0x00fe, 0x0005, 0x63b4, + 0x636f, 0x6386, 0x63b4, 0x63b4, 0x63b4, 0x63b4, 0x63b4, 0x2100, + 0x9082, 0x007e, 0x1278, 0x080c, 0x66b9, 0x0148, 0x9046, 0xb810, + 0x9306, 0x1904, 0x63bc, 0xb814, 0x9206, 0x15f0, 0x0028, 0xbb12, + 0xba16, 0x0010, 0x080c, 0x4af7, 0x0150, 0x04b0, 0x080c, 0x6724, + 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, 0x9206, 0x1568, 0x080c, + 0xb27d, 0x0530, 0x2b00, 0x6012, 0x080c, 0xd554, 0x2900, 0x6016, + 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, 0x9086, 0x0001, 0x1170, + 0x080c, 0x3250, 0x9006, 0x080c, 0x6656, 0x2001, 0x0002, 0x080c, + 0x666a, 0x2001, 0x0200, 0xb86e, 0xb893, 0x0002, 0x2009, 0x0003, + 0x080c, 0xb352, 0x9006, 0x0068, 0x2001, 0x0001, 0x900e, 0x0038, + 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, 0x0028, 0x900e, 0x9005, + 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, 0x00b6, 0x00f6, 0x00e6, + 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, 0x0015, 0x0904, 0x65a7, + 0x90c6, 0x0056, 0x0904, 0x65ab, 0x90c6, 0x0066, 0x0904, 0x65af, + 0x90c6, 0x0067, 0x0904, 0x65b3, 0x90c6, 0x0068, 0x0904, 0x65b7, + 0x90c6, 0x0071, 0x0904, 0x65bb, 0x90c6, 0x0074, 0x0904, 0x65bf, + 0x90c6, 0x007c, 0x0904, 0x65c3, 0x90c6, 0x007e, 0x0904, 0x65c7, + 0x90c6, 0x0037, 0x0904, 0x65cb, 0x9016, 0x2079, 0x1800, 0xa974, + 0x9186, 0x00ff, 0x0904, 0x65a2, 0x9182, 0x0800, 0x1a04, 0x65a2, + 0x080c, 0x6724, 0x1198, 0xb804, 0x9084, 0x00ff, 0x9082, 0x0006, + 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, 0x080c, 0xb23d, 0x1904, + 0x658b, 0xb8a0, 0x9084, 0xff80, 0x1904, 0x658b, 0xa894, 0x90c6, + 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, 0x64eb, 0x90c6, 0x0064, + 0x0904, 0x6514, 0x2008, 0x0804, 0x64ad, 0xa998, 0xa8b0, 0x2040, + 0x080c, 0xb23d, 0x1120, 0x9182, 0x007f, 0x0a04, 0x64ad, 0x9186, + 0x00ff, 0x0904, 0x64ad, 0x9182, 0x0800, 0x1a04, 0x64ad, 0xaaa0, + 0xab9c, 0x787c, 0x9306, 0x11a8, 0x7880, 0x0096, 0x924e, 0x1128, + 0x2208, 0x2310, 0x009e, 0x0804, 0x64ad, 0x080c, 0xb23d, 0x1140, + 0x99cc, 0xff00, 0x009e, 0x1128, 0x2208, 0x2310, 0x0804, 0x64ad, + 0x009e, 0x080c, 0x4af7, 0x0904, 0x64b7, 0x900e, 0x9016, 0x90c6, + 0x4000, 0x15e0, 0x0006, 0x080c, 0x6944, 0x1108, 0xc185, 0xb800, + 0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, + 0x2098, 0x080c, 0x0f8b, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x0035, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, + 0x2098, 0x080c, 0x0f8b, 0xa8c4, 0xabc8, 0x9305, 0xabcc, 0x9305, + 0xabd0, 0x9305, 0xabd4, 0x9305, 0xabd8, 0x9305, 0xabdc, 0x9305, + 0xabe0, 0x9305, 0x9005, 0x0510, 0x000e, 0x00c8, 0x90c6, 0x4007, + 0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, + 0x0070, 0x90c6, 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, + 0x2001, 0x4005, 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, + 0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e, 0x0478, 0x000e, 0x080c, + 0xb27d, 0x1130, 0x2001, 0x4005, 0x2009, 0x0003, 0x9016, 0x0c78, + 0x2b00, 0x6012, 0x080c, 0xd554, 0x2900, 0x6016, 0x6023, 0x0001, + 0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, + 0x080c, 0x3250, 0x012e, 0x9006, 0x080c, 0x6656, 0x2001, 0x0002, + 0x080c, 0x666a, 0x2009, 0x0002, 0x080c, 0xb352, 0xa8b0, 0xd094, + 0x0118, 0xb8cc, 0xc08d, 0xb8ce, 0x9006, 0x9005, 0x012e, 0x00ee, + 0x00fe, 0x00be, 0x0005, 0x080c, 0x57e9, 0x0118, 0x2009, 0x0007, + 0x00f8, 0xa998, 0xaeb0, 0x080c, 0x6724, 0x1904, 0x64a8, 0x9186, + 0x007f, 0x0130, 0x080c, 0x6aa3, 0x0118, 0x2009, 0x0009, 0x0080, + 0x0096, 0x080c, 0x100e, 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, + 0x2900, 0x009e, 0xa806, 0x080c, 0xd2c0, 0x19b0, 0x2009, 0x0003, + 0x2001, 0x4005, 0x0804, 0x64af, 0xa998, 0xaeb0, 0x080c, 0x6724, + 0x1904, 0x64a8, 0x0096, 0x080c, 0x100e, 0x1128, 0x009e, 0x2009, + 0x0002, 0x0804, 0x6568, 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, + 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, 0x20e8, + 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, + 0x0006, 0x20a0, 0xbbc8, 0x9398, 0x0006, 0x2398, 0x080c, 0x0f8b, + 0x009e, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, + 0x1168, 0x080c, 0x57d5, 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, + 0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c, 0x00b0, 0x080c, 0x6aa3, + 0x0118, 0xa89b, 0x0009, 0x0080, 0x080c, 0x57e9, 0x0118, 0xa89b, + 0x0007, 0x0050, 0x080c, 0xd2a3, 0x1904, 0x64e4, 0x2009, 0x0003, + 0x2001, 0x4005, 0x0804, 0x64af, 0xa87b, 0x0030, 0xa897, 0x4005, + 0xa804, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, + 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, + 0x2031, 0x0000, 0x2041, 0x1252, 0x080c, 0xb7f1, 0x1904, 0x64e4, + 0x2009, 0x0002, 0x08e8, 0x2001, 0x0028, 0x900e, 0x0804, 0x64e5, + 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, + 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, + 0x0804, 0x64e5, 0x2001, 0x0029, 0x900e, 0x0804, 0x64e5, 0x080c, + 0x37e9, 0x0804, 0x64e6, 0x080c, 0x5500, 0x0804, 0x64e6, 0x080c, + 0x4637, 0x0804, 0x64e6, 0x080c, 0x46b0, 0x0804, 0x64e6, 0x080c, + 0x470c, 0x0804, 0x64e6, 0x080c, 0x4bba, 0x0804, 0x64e6, 0x080c, + 0x4e82, 0x0804, 0x64e6, 0x080c, 0x5167, 0x0804, 0x64e6, 0x080c, + 0x5360, 0x0804, 0x64e6, 0x080c, 0x3a25, 0x0804, 0x64e6, 0x00b6, + 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, + 0x0800, 0x1268, 0x9188, 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, + 0x6aa3, 0x1148, 0x00e9, 0x080c, 0x684f, 0x9006, 0x00b0, 0x2001, + 0x0028, 0x900e, 0x0090, 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, + 0x0d88, 0x2001, 0x0029, 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, + 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, + 0x0126, 0x2091, 0x8000, 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, + 0x2148, 0xa802, 0x009e, 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, + 0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, + 0x8000, 0xb84c, 0x9005, 0x0170, 0x00e6, 0x2071, 0x19e8, 0x7004, + 0x9086, 0x0002, 0x0168, 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, + 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, + 0x701c, 0x9b06, 0x1d80, 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, + 0x2900, 0xb002, 0x00ae, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, + 0x8000, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, + 0xb84e, 0x9905, 0x012e, 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, + 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, + 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, + 0x0110, 0xc285, 0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, + 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, + 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, + 0x0158, 0x080c, 0x6a9f, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, + 0x0007, 0x1110, 0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, + 0xba06, 0x0006, 0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, + 0x0dc5, 0x000e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, + 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, + 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6a9b, 0x1138, + 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, + 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, + 0x0005, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, + 0x0026, 0x9190, 0x1000, 0x2204, 0x905d, 0x1188, 0x0096, 0x080c, + 0x100e, 0x2958, 0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, + 0xb860, 0xb8c6, 0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x6148, 0x9006, + 0x0010, 0x9085, 0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, + 0x0126, 0x2091, 0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, + 0x0001, 0x04a8, 0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0568, + 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x1040, 0x00d6, + 0x00c6, 0xb8bc, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, + 0x2048, 0x080c, 0xd0d8, 0x0110, 0x080c, 0x0fc0, 0x080c, 0xb2d3, + 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x00c6, 0xb8ac, 0x9065, 0x0128, + 0x621c, 0xd2c4, 0x0110, 0x080c, 0x9096, 0x00ce, 0x2b48, 0xb8c8, + 0xb85e, 0xb8c4, 0xb862, 0x080c, 0x1050, 0x00de, 0x9006, 0x002e, + 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800, 0x0218, + 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0, + 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x9006, + 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x7637, 0x1510, + 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0xb23d, 0x11d8, 0x0078, + 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1982, 0x7048, 0x2062, + 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce, 0x703c, + 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069, + 0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c, 0xb866, + 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8, 0xb8c8, 0x9088, + 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a, 0x9088, + 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200, 0x6817, + 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872, 0x7050, + 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e, + 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009, 0x0008, + 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0x9182, + 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349, 0x1218, + 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009, 0x0004, + 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, + 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016, + 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c, 0xb89a, + 0x7054, 0xb89e, 0x0036, 0xbbcc, 0xc384, 0xba00, 0x2009, 0x1867, + 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, + 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c, + 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbce, 0x003e, 0x00ee, + 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, + 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010, + 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007, + 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004, 0x2098, + 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff, 0x0120, + 0x8109, 0x1dd0, 0x080c, 0x0dc5, 0x3c00, 0x20e8, 0x3300, 0x8001, + 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e, + 0x0060, 0x080c, 0x100e, 0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000, + 0x080c, 0x68e0, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001, 0x012e, + 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096, + 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c, 0x68ef, + 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806, 0x0020, + 0x080c, 0x1040, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x080c, 0x951c, 0x012e, 0x0005, 0x901e, 0x0010, + 0x2019, 0x0001, 0x900e, 0x0126, 0x2091, 0x8000, 0xb84c, 0x2048, + 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500, 0x83ff, 0x0120, 0xa878, + 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, + 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70, 0x080c, 0xaaf1, 0xaa00, + 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020, 0x00a6, 0x2150, 0xb202, + 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff, 0x012e, 0x0005, 0x9016, + 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c, 0x6944, 0x0128, + 0x080c, 0xd195, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, 0x6944, + 0x0128, 0x080c, 0xd13a, 0x0010, 0x9085, 0x0001, 0x0005, 0x080c, + 0x6944, 0x0128, 0x080c, 0xd192, 0x0010, 0x9085, 0x0001, 0x0005, + 0x080c, 0x6944, 0x0128, 0x080c, 0xd159, 0x0010, 0x9085, 0x0001, + 0x0005, 0x080c, 0x6944, 0x0128, 0x080c, 0xd1d8, 0x0010, 0x9085, + 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085, 0x0001, 0x0005, + 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, + 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, + 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109, + 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce, 0x013e, 0x0005, + 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0004, 0x20a0, + 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de, 0x014e, 0x0136, + 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, 0x810f, 0x9184, + 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, 0x2098, 0x20a9, + 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, 0x8109, 0x1dd8, + 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300, 0x8001, 0x20a0, + 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de, 0x014e, 0x9006, + 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, + 0x904d, 0x1128, 0x080c, 0x100e, 0x0168, 0x2900, 0xb8a6, 0x080c, + 0x68e0, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085, 0x0001, 0x012e, + 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126, 0x2091, 0x8000, + 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c, 0x1040, 0x9085, + 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4, 0x0005, 0x00b6, + 0x00f6, 0x080c, 0x7637, 0x01b0, 0x71c4, 0x81ff, 0x1198, 0x71dc, + 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000, 0x2004, 0x905d, + 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1118, 0xb800, + 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x01d0, 0x0156, + 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6724, 0x1168, 0xb804, + 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, 0x9086, 0x0006, + 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, 0x1f04, 0x696b, + 0x015e, 0x080c, 0x6a61, 0x0120, 0x2001, 0x1985, 0x200c, 0x0098, + 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0190, 0x2009, 0x07d0, 0x2001, + 0x182c, 0x2004, 0x9005, 0x0138, 0x2001, 0x1867, 0x2004, 0xd0e4, + 0x0110, 0x2009, 0x5dc0, 0x2011, 0x69a2, 0x080c, 0x88d5, 0x00fe, + 0x00be, 0x0005, 0x00b6, 0x2011, 0x69a2, 0x080c, 0x883d, 0x080c, + 0x6a61, 0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, + 0xb902, 0x080c, 0x6a9f, 0x0130, 0x2009, 0x07d0, 0x2011, 0x69a2, + 0x080c, 0x88d5, 0x00e6, 0x2071, 0x1800, 0x9006, 0x707e, 0x7060, + 0x7082, 0x080c, 0x3000, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, + 0x007f, 0x900e, 0x0016, 0x080c, 0x6724, 0x1538, 0xb800, 0xd0ec, + 0x0520, 0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, + 0xec31, 0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x6a9b, 0x2001, + 0x0707, 0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, + 0x2019, 0x0029, 0x080c, 0x96a4, 0x0076, 0x903e, 0x080c, 0x9577, + 0x900e, 0x080c, 0xe91c, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, + 0x69ca, 0x00ce, 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, + 0xb800, 0xc0ec, 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096, + 0x080c, 0x1027, 0x090c, 0x0dc5, 0x2958, 0x009e, 0x2001, 0x196b, + 0x2b02, 0x8b07, 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c, + 0xffc0, 0xb9ca, 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x6148, + 0xb807, 0x0006, 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200, + 0xb86c, 0xb893, 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af, + 0x0000, 0x00ce, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, + 0x00be, 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, + 0x00be, 0xd0bc, 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c, + 0x00ff, 0x9196, 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196, + 0x0005, 0x0158, 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128, + 0x9196, 0x0004, 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e, + 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, + 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, + 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, + 0x0dc5, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, + 0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc, + 0x0138, 0x2001, 0x1983, 0x200c, 0x2011, 0x6a91, 0x080c, 0x88d5, + 0x0005, 0x2011, 0x6a91, 0x080c, 0x883d, 0x2011, 0x1837, 0x2204, + 0xc0cc, 0x2012, 0x0005, 0x080c, 0x57d5, 0xd0ac, 0x0005, 0x080c, + 0x57d5, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, + 0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, + 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xd7e3, + 0x0158, 0x70dc, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, + 0x905d, 0x0110, 0xb8cc, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006, + 0x0016, 0x0036, 0x0046, 0x0076, 0x00b6, 0x2001, 0x1818, 0x203c, + 0x9780, 0x33b6, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018, + 0x2008, 0x9284, 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff, + 0x2100, 0x9706, 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168, + 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118, + 0xb89c, 0xd0a4, 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120, + 0x9182, 0x0800, 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048, + 0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e, + 0x0005, 0x00be, 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e, + 0x0005, 0x0046, 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff, + 0x9080, 0x1000, 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff, + 0x9086, 0x0006, 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1818, + 0x203c, 0x9780, 0x33b6, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, + 0x2020, 0x2400, 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d, + 0x0178, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c, + 0xd0a4, 0x0130, 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128, + 0x8420, 0x9482, 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be, + 0x007e, 0x005e, 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff, + 0x00be, 0x007e, 0x005e, 0x004e, 0x9006, 0x0005, 0x0006, 0x2001, + 0x00a0, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x000e, 0x0005, + 0x0006, 0x2001, 0x00f8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, + 0x000e, 0x0005, 0x0006, 0x2001, 0x00e8, 0x8001, 0xa001, 0xa001, + 0xa001, 0x1dd8, 0x000e, 0x0005, 0x2071, 0x1910, 0x7003, 0x0001, + 0x7007, 0x0000, 0x9006, 0x7012, 0x7016, 0x701a, 0x701e, 0x700a, + 0x7046, 0x2001, 0x1922, 0x2003, 0x0000, 0x0005, 0x0016, 0x00e6, + 0x2071, 0x1948, 0x900e, 0x710a, 0x080c, 0x57d5, 0xd0fc, 0x1140, + 0x080c, 0x57d5, 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x0470, + 0x2001, 0x1867, 0x200c, 0x9184, 0x0007, 0x0006, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x000e, 0x0108, 0x9006, 0x0002, 0x6b98, 0x6b98, + 0x6b98, 0x6b98, 0x6b98, 0x6bb6, 0x6bcb, 0x6bd9, 0x7003, 0x0003, + 0x2009, 0x1868, 0x210c, 0x9184, 0xff00, 0x908e, 0xff00, 0x0140, + 0x8007, 0x9005, 0x1110, 0x2001, 0x0002, 0x8003, 0x7006, 0x0030, + 0x7007, 0x0001, 0x0018, 0x7003, 0x0005, 0x0c50, 0x2071, 0x1910, + 0x704f, 0x0000, 0x2071, 0x1800, 0x70f3, 0x0001, 0x00ee, 0x001e, + 0x0005, 0x7003, 0x0000, 0x2071, 0x1910, 0x2009, 0x1868, 0x210c, + 0x9184, 0x7f00, 0x8007, 0x908c, 0x000f, 0x0160, 0x714e, 0x8004, + 0x8004, 0x8004, 0x8004, 0x2071, 0x1800, 0x908c, 0x0007, 0x0128, + 0x70f2, 0x0c20, 0x704f, 0x000f, 0x0c90, 0x70f3, 0x0005, 0x08f0, + 0x00e6, 0x2071, 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071, + 0x1910, 0x7028, 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488, + 0x6844, 0x9005, 0x0158, 0x080c, 0x79a4, 0x6a60, 0x9200, 0x7002, + 0x6864, 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002, + 0x6864, 0x7006, 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005, + 0x1110, 0x7012, 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040, + 0x701e, 0x7037, 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x1910, + 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee, + 0x9006, 0x00ee, 0x0005, 0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, + 0x9015, 0x0904, 0x6ea5, 0x9286, 0x0003, 0x0904, 0x6d3e, 0x9286, + 0x0005, 0x0904, 0x6d3e, 0x2071, 0x1877, 0xa87c, 0x9005, 0x0904, + 0x6c99, 0x7140, 0xa868, 0x9102, 0x0a04, 0x6ea5, 0xa878, 0xd084, + 0x15d8, 0xa853, 0x0019, 0x2001, 0x8023, 0xa84e, 0x2071, 0x1910, + 0x701c, 0x9005, 0x1904, 0x7073, 0x0e04, 0x70e1, 0x2071, 0x0000, + 0xa850, 0x7032, 0xa84c, 0x7082, 0xa870, 0x7086, 0xa86c, 0x708a, + 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, + 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, + 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, + 0x01de, 0x014e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x11aa, 0x0804, 0x6d21, 0xa853, 0x001b, 0x2001, 0x8027, + 0x0820, 0x7004, 0xd08c, 0x1904, 0x6ea5, 0xa853, 0x001a, 0x2001, + 0x8024, 0x0804, 0x6c5d, 0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, + 0x9015, 0x0904, 0x6ea5, 0x9286, 0x0003, 0x0904, 0x6d3e, 0x9286, + 0x0005, 0x0904, 0x6d3e, 0xa84f, 0x8022, 0xa853, 0x0018, 0x0804, + 0x6d06, 0xa868, 0xd0fc, 0x1508, 0x00e6, 0x0026, 0x2001, 0x1948, + 0x2004, 0x9015, 0x0904, 0x6ea5, 0xa978, 0xa874, 0x9105, 0x1904, + 0x6ea5, 0x9286, 0x0003, 0x0904, 0x6d3e, 0x9286, 0x0005, 0x0904, + 0x6d3e, 0xa87c, 0xd0bc, 0x1904, 0x6ea5, 0x2200, 0x0002, 0x6ea5, + 0x6d02, 0x6d3e, 0x6d3e, 0x6ea5, 0x6d3e, 0x0005, 0xa868, 0xd0fc, + 0x1500, 0x00e6, 0x0026, 0x2009, 0x1948, 0x210c, 0x81ff, 0x0904, + 0x6ea5, 0xa880, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x6ea5, + 0x9186, 0x0003, 0x0904, 0x6d3e, 0x9186, 0x0005, 0x0904, 0x6d3e, + 0xa87c, 0xd0cc, 0x0904, 0x6ea5, 0xa84f, 0x8021, 0xa853, 0x0017, + 0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1910, + 0x701c, 0x9005, 0x1904, 0x7073, 0x0e04, 0x70e1, 0x2071, 0x0000, + 0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, + 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x11aa, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c, + 0x1158, 0xa802, 0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, + 0x8725, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802, + 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, + 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, + 0x9005, 0x1904, 0x6e29, 0x782c, 0x908c, 0x0780, 0x190c, 0x722f, + 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x6d5c, 0x6e29, + 0x6d80, 0x6dc6, 0x080c, 0x0dc5, 0x2071, 0x1800, 0x2900, 0x7822, + 0xa804, 0x900d, 0x1168, 0x2071, 0x19fb, 0x7044, 0x9005, 0x1320, + 0x2001, 0x1949, 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, + 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, + 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x0c18, + 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1578, 0x7824, + 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x1830, + 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, + 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, + 0x080c, 0x8725, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, + 0x19f0, 0x2071, 0x19fb, 0x7044, 0x9005, 0x1320, 0x2001, 0x1949, + 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, + 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, + 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x0808, 0x0096, 0x00e6, + 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x782c, 0x9094, 0x0780, + 0x190c, 0x722f, 0xd0a4, 0x1d60, 0x00ee, 0x782c, 0x9094, 0x0780, + 0x190c, 0x722f, 0xd09c, 0x1198, 0x009e, 0x2900, 0x7822, 0xa804, + 0x900d, 0x1550, 0x2071, 0x19fb, 0x7044, 0x9005, 0x1320, 0x2001, + 0x1949, 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, + 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, + 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1168, 0x2071, + 0x19fb, 0x7044, 0x9005, 0x1320, 0x2001, 0x1949, 0x2004, 0x7046, + 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, + 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, + 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, + 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, + 0x6e7d, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd09c, 0x1198, + 0x701c, 0x904d, 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, + 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, + 0x722f, 0xd09c, 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, + 0xd0a4, 0x01b0, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, + 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, + 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, 0x1d60, 0x00ee, + 0x2071, 0x19fb, 0x7044, 0x9005, 0x1320, 0x2001, 0x1949, 0x2004, + 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, + 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, + 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x00ee, + 0x0804, 0x6e39, 0xa868, 0xd0fc, 0x1904, 0x6ef3, 0x0096, 0xa804, + 0xa807, 0x0000, 0x904d, 0x190c, 0x0fc0, 0x009e, 0x0020, 0xa868, + 0xd0fc, 0x1904, 0x6ef3, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, + 0x2079, 0x0050, 0x2071, 0x1800, 0x70ec, 0x8001, 0x0558, 0x1a04, + 0x6ef0, 0x2071, 0x1910, 0xa803, 0x0000, 0xa864, 0x9084, 0x00ff, + 0x908e, 0x0016, 0x01a8, 0x7010, 0x9005, 0x1904, 0x6fef, 0x782c, + 0x908c, 0x0780, 0x190c, 0x722f, 0x8004, 0x8004, 0x8004, 0x9084, + 0x0003, 0x0002, 0x6ef4, 0x6fef, 0x6f0f, 0x6f80, 0x080c, 0x0dc5, + 0x2009, 0x1948, 0x2104, 0x0002, 0x6ebb, 0x6ebb, 0x6ebb, 0x6d47, + 0x6ebb, 0x6d47, 0x70ef, 0x0fa0, 0x71e8, 0x8107, 0x9106, 0x9094, + 0x00c0, 0x9184, 0xff3f, 0x9205, 0x70ea, 0x3b08, 0x3a00, 0x9104, + 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x0808, + 0x70ee, 0x0804, 0x6eb1, 0x0005, 0x2071, 0x1800, 0x2900, 0x7822, + 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, + 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, + 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x0c60, 0x2071, + 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904, 0x6f6f, 0x7830, + 0x8007, 0x908c, 0x001f, 0x70f0, 0x9102, 0x1220, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, + 0x1148, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, + 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x782c, 0x9094, 0x0780, + 0x190c, 0x722f, 0xd0a4, 0x19f0, 0x0e04, 0x6f66, 0x7838, 0x7938, + 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, + 0x00de, 0x2001, 0x1921, 0x200c, 0xc184, 0x2102, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x2001, 0x1922, + 0x2003, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2001, 0x1921, + 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, + 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, + 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, 0x0804, 0x6f22, + 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x782c, + 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, + 0x6fc2, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, + 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x704b, + 0x0000, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd09c, 0x1170, + 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908, + 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, + 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, + 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, + 0x70c2, 0x080c, 0x8725, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, + 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, + 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x705e, 0x782c, + 0x9094, 0x0780, 0x190c, 0x722f, 0xd09c, 0x11b0, 0x701c, 0x904d, + 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108, + 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, + 0x190c, 0x722f, 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c, + 0x722f, 0xd0a4, 0x05b8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, + 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, + 0x8725, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, 0x1d60, + 0x00ee, 0x0e04, 0x7057, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, + 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, + 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x11aa, 0x704b, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, + 0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, + 0x00ee, 0x0804, 0x6fff, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, + 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, + 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x709e, + 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, + 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, + 0x9200, 0x70c2, 0x080c, 0x8725, 0x0e04, 0x7088, 0x2071, 0x1910, + 0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, + 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, + 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x190c, 0x11aa, 0x2071, 0x1910, 0x080c, 0x721b, 0x002e, + 0x00ee, 0x0005, 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, + 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, + 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, + 0x0890, 0x2071, 0x1910, 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, + 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, + 0x2148, 0xa804, 0x900d, 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, + 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8725, + 0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, + 0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, + 0x9006, 0x4004, 0x000e, 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, + 0xa982, 0x0005, 0x2071, 0x1910, 0x7004, 0x0002, 0x712e, 0x712f, + 0x721a, 0x712f, 0x712c, 0x721a, 0x080c, 0x0dc5, 0x0005, 0x2001, + 0x1948, 0x2004, 0x0002, 0x7139, 0x7139, 0x71b3, 0x71b4, 0x7139, + 0x71b4, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x723a, 0x701c, 0x904d, + 0x0508, 0xa84c, 0x9005, 0x0904, 0x7184, 0x0e04, 0x7162, 0xa94c, + 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, + 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x2071, 0x1910, + 0x080c, 0x721b, 0x012e, 0x0804, 0x71b2, 0xa850, 0x9082, 0x001c, + 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, + 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, + 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, + 0x013e, 0x01de, 0x014e, 0x0890, 0x2001, 0x005b, 0x2004, 0x9094, + 0x0780, 0x190c, 0x722f, 0xd09c, 0x2071, 0x1910, 0x1510, 0x2071, + 0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, + 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, + 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x2071, 0x1910, 0x701c, + 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, + 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x19fb, + 0x6844, 0x9005, 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, + 0x1815, 0x2004, 0x2009, 0x1ad1, 0x210c, 0x9102, 0x1500, 0x0126, + 0x2091, 0x8000, 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, + 0x0e04, 0x71e6, 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, + 0x6883, 0x8040, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x11aa, 0x2069, 0x19fb, 0x6847, 0xffff, 0x012e, 0x00de, + 0x0126, 0x2091, 0x8000, 0x1e0c, 0x72a5, 0x701c, 0x904d, 0x0540, + 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, + 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, + 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, + 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, + 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, + 0x012e, 0x0005, 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, + 0x0160, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, + 0x701a, 0x012e, 0x080c, 0x1040, 0x0005, 0x012e, 0x0005, 0x2091, + 0x8000, 0x0e04, 0x7231, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, + 0x0804, 0x0dce, 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, + 0x01d0, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, + 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x704b, 0x0000, + 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780, 0x1981, 0xd0a4, + 0x0db8, 0x7148, 0x704c, 0x8108, 0x714a, 0x9102, 0x0e88, 0x00e6, + 0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, + 0x1148, 0x2009, 0x1830, 0x210c, 0x918a, 0x0020, 0x0218, 0x7022, + 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x782c, 0x9094, 0x0780, + 0x190c, 0x722f, 0xd0a4, 0x19f0, 0x7838, 0x7938, 0x910e, 0x1de0, + 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, 0x00ee, + 0x704b, 0x0000, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, + 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, + 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, + 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11aa, + 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, + 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8725, 0x782c, + 0x9094, 0x0780, 0x190c, 0x722f, 0xd0a4, 0x1d70, 0x00d6, 0x2069, + 0x0050, 0x693c, 0x2069, 0x1948, 0x6808, 0x690a, 0x2069, 0x19fb, + 0x9102, 0x1118, 0x6844, 0x9005, 0x1320, 0x2001, 0x1949, 0x200c, + 0x6946, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a, 0x002a, + 0x1a0c, 0x0dc5, 0x9082, 0x001d, 0x001b, 0x6027, 0x1e00, 0x0005, + 0x73e6, 0x7353, 0x736f, 0x7399, 0x73d5, 0x7415, 0x7427, 0x736f, + 0x73fd, 0x730e, 0x733c, 0x73bf, 0x730d, 0x0005, 0x00d6, 0x2069, + 0x0200, 0x6804, 0x9005, 0x1180, 0x6808, 0x9005, 0x1518, 0x709b, + 0x0029, 0x2069, 0x198f, 0x2d04, 0x7002, 0x080c, 0x7774, 0x6028, + 0x9085, 0x0600, 0x602a, 0x00b0, 0x709b, 0x0029, 0x2069, 0x198f, + 0x2d04, 0x7002, 0x6028, 0x9085, 0x0600, 0x602a, 0x00e6, 0x0036, + 0x0046, 0x0056, 0x2071, 0x1a65, 0x080c, 0x1ad9, 0x005e, 0x004e, + 0x003e, 0x00ee, 0x00de, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, + 0x9005, 0x1178, 0x6808, 0x9005, 0x1160, 0x709b, 0x0029, 0x2069, + 0x198f, 0x2d04, 0x7002, 0x080c, 0x7818, 0x6028, 0x9085, 0x0600, + 0x602a, 0x00de, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2d39, + 0x000e, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x7494, 0xd1d4, 0x1160, + 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x709b, 0x0020, 0x080c, 0x7494, + 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, + 0x0088, 0x080c, 0x2d39, 0x6124, 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, + 0xd1e4, 0x1198, 0x9184, 0x1e00, 0x11d8, 0x080c, 0x1b06, 0x60e3, + 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x7663, 0x2001, 0x0080, + 0x080c, 0x2d39, 0x709b, 0x0029, 0x0058, 0x709b, 0x001e, 0x0040, + 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b, 0x001f, + 0x0005, 0x080c, 0x1b06, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, + 0x080c, 0x7663, 0x2001, 0x0080, 0x080c, 0x2d39, 0x6124, 0xd1d4, + 0x1198, 0xd1dc, 0x1170, 0xd1e4, 0x1148, 0x9184, 0x1e00, 0x1118, + 0x709b, 0x0029, 0x0058, 0x709b, 0x0028, 0x0040, 0x709b, 0x001e, + 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x6124, + 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, + 0x1158, 0x709b, 0x0029, 0x0040, 0x709b, 0x001e, 0x0028, 0x709b, + 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, + 0x2d39, 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1b06, + 0x709b, 0x001e, 0x0010, 0x709b, 0x001d, 0x0005, 0x080c, 0x7517, + 0x6124, 0xd1dc, 0x1188, 0x080c, 0x7494, 0x0016, 0x080c, 0x1b06, + 0x001e, 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x709b, 0x001e, 0x0020, + 0x709b, 0x001f, 0x080c, 0x7494, 0x0005, 0x0006, 0x2001, 0x00a0, + 0x080c, 0x2d39, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, + 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, + 0x001d, 0x0010, 0x709b, 0x0021, 0x0005, 0x080c, 0x7517, 0x6124, + 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x709b, 0x001e, + 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, 0x0005, 0x0006, + 0x2001, 0x0090, 0x080c, 0x2d39, 0x000e, 0x6124, 0xd1d4, 0x1178, + 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x709b, 0x001e, + 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, 0x0020, 0x0010, 0x709b, + 0x001f, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, + 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c, + 0x7637, 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0, 0xc1b4, + 0x2102, 0x6027, 0x0200, 0x080c, 0x2c61, 0x6024, 0xd0cc, 0x0148, + 0x2001, 0x00a0, 0x080c, 0x2d39, 0x080c, 0x7932, 0x080c, 0x612e, + 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x7651, 0x0150, + 0x080c, 0x7648, 0x1138, 0x2001, 0x0001, 0x080c, 0x281c, 0x080c, + 0x760f, 0x00a0, 0x080c, 0x7514, 0x0178, 0x2001, 0x0001, 0x080c, + 0x281c, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086, 0x0022, + 0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e, 0x00ee, + 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x74a5, 0x080c, + 0x8917, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x74a5, + 0x080c, 0x890e, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, + 0x080c, 0xa6e9, 0x2071, 0x1800, 0x080c, 0x7442, 0x001e, 0x00fe, + 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x0126, 0x2071, 0x1800, 0x080c, 0xa6e9, 0x2061, 0x0100, + 0x2069, 0x0140, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x2011, + 0x0003, 0x080c, 0xaabf, 0x2011, 0x0002, 0x080c, 0xaac9, 0x080c, + 0xa9d3, 0x080c, 0x88c3, 0x0036, 0x901e, 0x080c, 0xaa49, 0x003e, + 0x60e3, 0x0000, 0x080c, 0xf07f, 0x080c, 0xf09a, 0x2009, 0x0004, + 0x080c, 0x2c67, 0x080c, 0x2b82, 0x2001, 0x1800, 0x2003, 0x0004, + 0x6027, 0x0008, 0x2011, 0x74a5, 0x080c, 0x8917, 0x080c, 0x7651, + 0x0118, 0x9006, 0x080c, 0x2d39, 0x080c, 0x0ba0, 0x2001, 0x0001, + 0x080c, 0x281c, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, + 0x002e, 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x74b2, 0x2071, + 0x19fb, 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, + 0x0001, 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, + 0x9084, 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c, + 0x2d39, 0x0156, 0x20a9, 0x002d, 0x1d04, 0x7524, 0x2091, 0x6000, + 0x1f04, 0x7524, 0x015e, 0x00d6, 0x2069, 0x1800, 0x689c, 0x8001, + 0x0220, 0x0118, 0x689e, 0x00de, 0x0005, 0x689f, 0x0014, 0x68e8, + 0xd0dc, 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x8923, + 0x0c90, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, + 0x2071, 0x1800, 0x080c, 0x7941, 0x2001, 0x196d, 0x2003, 0x0000, + 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x28e7, 0x9006, 0x080c, + 0x2d39, 0x080c, 0x5fed, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, + 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, + 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x197d, 0x200c, 0x9186, + 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158, + 0x9186, 0x0003, 0x0158, 0x0804, 0x75ff, 0x709b, 0x0022, 0x0040, + 0x709b, 0x0021, 0x0028, 0x709b, 0x0023, 0x0010, 0x709b, 0x0024, + 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28e7, + 0x0026, 0x080c, 0xb244, 0x002e, 0x7000, 0x908e, 0x0004, 0x0118, + 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, + 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, + 0x080c, 0xd7e3, 0x0118, 0x9006, 0x080c, 0x2d63, 0x0804, 0x760b, + 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2c61, 0x6904, + 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2d39, 0x1f04, 0x75a3, + 0x080c, 0x768b, 0x012e, 0x015e, 0x080c, 0x7648, 0x01d8, 0x6044, + 0x9005, 0x0198, 0x2011, 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, + 0x6050, 0x0006, 0x9085, 0x0020, 0x6052, 0x080c, 0x768b, 0x9006, + 0x8001, 0x1df0, 0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, 0x1110, + 0x080c, 0x768b, 0x080c, 0xd7e3, 0x0118, 0x9006, 0x080c, 0x2d63, + 0x0016, 0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009, 0x00c8, + 0x2011, 0x74b2, 0x080c, 0x88d5, 0x002e, 0x001e, 0x080c, 0x871c, + 0x7034, 0xc085, 0x7036, 0x2001, 0x197d, 0x2003, 0x0004, 0x080c, + 0x72f5, 0x080c, 0x7648, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, + 0x1100, 0x080c, 0x7937, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, + 0x080c, 0x8733, 0x080c, 0x8725, 0x080c, 0x7941, 0x2001, 0x196d, + 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, 0x6886, 0x080c, 0x28e7, + 0x9006, 0x080c, 0x2d39, 0x6043, 0x0090, 0x6043, 0x0010, 0x6027, + 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, + 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, + 0x080c, 0x57d9, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, + 0x0006, 0x080c, 0x57d9, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, + 0x0005, 0x0006, 0x080c, 0x57d9, 0x9084, 0x0030, 0x9086, 0x0010, + 0x000e, 0x0005, 0x0006, 0x080c, 0x57d9, 0x9084, 0x0030, 0x9086, + 0x0020, 0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, + 0x908c, 0x0013, 0x0168, 0x0020, 0x080c, 0x2907, 0x900e, 0x0010, + 0x2009, 0x0002, 0x2019, 0x0028, 0x080c, 0x321b, 0x9006, 0x0019, + 0x001e, 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, + 0x080c, 0xd7dc, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, + 0x2072, 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, + 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, + 0x9084, 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, + 0x1d04, 0x76a0, 0x2091, 0x6000, 0x1f04, 0x76a0, 0x602f, 0x0100, + 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, + 0x613a, 0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, + 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, + 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x28e7, 0x2001, 0x00a0, + 0x0006, 0x080c, 0xd7e3, 0x000e, 0x0130, 0x080c, 0x2d57, 0x9006, + 0x080c, 0x2d63, 0x0010, 0x080c, 0x2d39, 0x000e, 0x6052, 0x6050, + 0x0006, 0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2bd6, + 0x00fe, 0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, + 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, + 0x1800, 0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, + 0xc1c5, 0x2102, 0x0804, 0x7766, 0x2001, 0x180c, 0x200c, 0xc1c4, + 0x2102, 0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, + 0x0090, 0x080c, 0x2d39, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, + 0x1d04, 0x770d, 0x2091, 0x6000, 0x1f04, 0x770d, 0x2011, 0x0003, + 0x080c, 0xaabf, 0x2011, 0x0002, 0x080c, 0xaac9, 0x080c, 0xa9d3, + 0x901e, 0x080c, 0xaa49, 0x2001, 0x00a0, 0x080c, 0x2d39, 0x080c, + 0x7932, 0x080c, 0x612e, 0x080c, 0xd7e3, 0x0110, 0x080c, 0x0d33, + 0x9085, 0x0001, 0x04c8, 0x080c, 0x1b06, 0x60e3, 0x0000, 0x2001, + 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1118, 0x2001, 0x196d, + 0x2004, 0x080c, 0x28e7, 0x60e2, 0x2001, 0x0080, 0x080c, 0x2d39, + 0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c61, + 0x6024, 0x910c, 0x0140, 0x1d04, 0x774a, 0x2091, 0x6000, 0x1f04, + 0x774a, 0x0804, 0x7716, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b4, + 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xd7e3, + 0x0110, 0x080c, 0x0d33, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, + 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, + 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, + 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, + 0x9086, 0x5540, 0x1128, 0x2069, 0x1a7c, 0x2d04, 0x8000, 0x206a, + 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, + 0x1904, 0x77d9, 0x2001, 0x0088, 0x080c, 0x2d39, 0x9006, 0x60e2, + 0x6886, 0x080c, 0x28e7, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, + 0x6808, 0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x6027, + 0x0400, 0x2069, 0x198f, 0x7000, 0x206a, 0x709b, 0x0026, 0x7003, + 0x0001, 0x20a9, 0x0002, 0x1d04, 0x77bb, 0x2091, 0x6000, 0x1f04, + 0x77bb, 0x0804, 0x7810, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, + 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c61, 0x6024, 0x910c, 0x0508, + 0x9084, 0x1a00, 0x11f0, 0x1d04, 0x77c7, 0x2091, 0x6000, 0x1f04, + 0x77c7, 0x2011, 0x0003, 0x080c, 0xaabf, 0x2011, 0x0002, 0x080c, + 0xaac9, 0x080c, 0xa9d3, 0x901e, 0x080c, 0xaa49, 0x2001, 0x00a0, + 0x080c, 0x2d39, 0x080c, 0x7932, 0x080c, 0x612e, 0x9085, 0x0001, + 0x00f8, 0x080c, 0x1b06, 0x2001, 0x0080, 0x080c, 0x2d39, 0x2069, + 0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, + 0x0008, 0x6886, 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, + 0x1118, 0x2001, 0x196d, 0x2004, 0x080c, 0x28e7, 0x60e2, 0x9006, + 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, + 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, + 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8, 0x2011, + 0x0003, 0x080c, 0xaabf, 0x2011, 0x0002, 0x080c, 0xaac9, 0x080c, + 0xa9d3, 0x901e, 0x080c, 0xaa49, 0x2069, 0x0140, 0x2001, 0x00a0, + 0x080c, 0x2d39, 0x080c, 0x7932, 0x080c, 0x612e, 0x0804, 0x78b2, + 0x2001, 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, + 0x749a, 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2d39, 0x60e3, + 0x0000, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, + 0x0180, 0x6028, 0x9084, 0xfdff, 0x602a, 0x6027, 0x0200, 0x2069, + 0x198f, 0x7000, 0x206a, 0x709b, 0x0027, 0x7003, 0x0001, 0x0804, + 0x78b2, 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x2c61, 0x6024, + 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x7869, 0x0006, + 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x8776, 0x00ee, 0x00de, + 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x19fb, 0x7078, 0x00ee, + 0x9005, 0x19f8, 0x0438, 0x0026, 0x2011, 0x74b2, 0x080c, 0x883d, + 0x2011, 0x74a5, 0x080c, 0x8917, 0x002e, 0x2069, 0x0140, 0x60e3, + 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1118, 0x2001, + 0x196d, 0x2004, 0x080c, 0x28e7, 0x60e2, 0x2001, 0x180c, 0x200c, + 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, + 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xd7dc, 0x1904, + 0x7920, 0x7130, 0xd184, 0x1170, 0x080c, 0x33aa, 0x0138, 0xc18d, + 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, + 0x0904, 0x7920, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538, 0x0016, + 0x2019, 0x000e, 0x080c, 0xeba1, 0x0156, 0x00b6, 0x20a9, 0x007f, + 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, + 0x6724, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, + 0xec31, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8a50, 0x001e, + 0x8108, 0x1f04, 0x78e9, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, + 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x321b, 0x001e, + 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x6724, + 0x1110, 0x080c, 0x6148, 0x8108, 0x1f04, 0x7916, 0x00be, 0x015e, + 0x080c, 0x1b06, 0x080c, 0xb244, 0x60e3, 0x0000, 0x080c, 0x612e, + 0x080c, 0x7563, 0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x2001, 0x197d, 0x2003, 0x0001, 0x0005, 0x2001, + 0x197d, 0x2003, 0x0000, 0x0005, 0x2001, 0x197c, 0x2003, 0xaaaa, + 0x0005, 0x2001, 0x197c, 0x2003, 0x0000, 0x0005, 0x2071, 0x18fa, + 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x1027, 0x090c, 0x0dc5, + 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x1027, 0x090c, 0x0dc5, + 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, + 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, + 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, + 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006, 0x9006, 0x7012, + 0x7016, 0x6850, 0x7002, 0x6854, 0x7006, 0x6858, 0x700a, 0x685c, + 0x700e, 0x6840, 0x9005, 0x1110, 0x7012, 0x7016, 0x6848, 0x701a, + 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019, 0x7036, 0x702b, + 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, + 0x2102, 0x00d6, 0x2069, 0x18fa, 0x6807, 0x0001, 0x00de, 0x080c, + 0x7f74, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, + 0x8003, 0x2011, 0x0100, 0x2214, 0x9296, 0x0008, 0x1110, 0x818d, + 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x79a8, 0x015e, 0x0005, 0x2079, + 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, 0x79c7, 0x79c8, 0x7a00, + 0x7a5b, 0x7bbb, 0x79c5, 0x79c5, 0x7be5, 0x080c, 0x0dc5, 0x0005, + 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c, 0x8056, 0xd0a4, + 0x01f8, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, + 0x00ff, 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800, 0x200c, + 0x9186, 0x0003, 0x1168, 0x7004, 0x0002, 0x79f0, 0x79ca, 0x79f0, + 0x79ee, 0x79f0, 0x79f0, 0x79f0, 0x79f0, 0x79f0, 0x080c, 0x7a5b, + 0x782c, 0xd09c, 0x090c, 0x7f74, 0x0005, 0x9082, 0x005a, 0x1218, + 0x2100, 0x003b, 0x0c10, 0x080c, 0x7a91, 0x0c90, 0x00e3, 0x08e8, + 0x0005, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7ab3, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a9d, 0x7a91, 0x7cdb, + 0x7a91, 0x7a91, 0x7a91, 0x7ab3, 0x7a91, 0x7a9d, 0x7d1c, 0x7d5d, + 0x7da4, 0x7db8, 0x7a91, 0x7a91, 0x7ab3, 0x7a9d, 0x7ac7, 0x7a91, + 0x7b8f, 0x7e63, 0x7e7e, 0x7a91, 0x7ab3, 0x7a91, 0x7ac7, 0x7a91, + 0x7a91, 0x7b85, 0x7e7e, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7adb, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7a91, 0x7ffa, 0x7a91, + 0x7fa4, 0x7a91, 0x7fa4, 0x7a91, 0x7af0, 0x7a91, 0x7a91, 0x7a91, + 0x7a91, 0x7a91, 0x7a91, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, + 0x1198, 0x782c, 0x080c, 0x7f9d, 0xd0a4, 0x0170, 0x7824, 0x2048, + 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, + 0x1210, 0x002b, 0x0c50, 0x00e9, 0x080c, 0x7f74, 0x0005, 0x7a91, + 0x7a9d, 0x7cc7, 0x7a91, 0x7a9d, 0x7a91, 0x7a9d, 0x7a9d, 0x7a91, + 0x7a9d, 0x7cc7, 0x7a9d, 0x7a9d, 0x7a9d, 0x7a9d, 0x7a9d, 0x7a91, + 0x7a9d, 0x7cc7, 0x7a91, 0x7a91, 0x7a9d, 0x7a91, 0x7a91, 0x7a91, + 0x7a9d, 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071, 0x00ee, + 0x0005, 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, + 0x0005, 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, + 0x9084, 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, + 0x6e9f, 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, + 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7c64, 0x7007, 0x0003, + 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7c64, 0x0005, 0xa864, + 0x8007, 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, + 0x0804, 0x7c7f, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, + 0x704b, 0x7c7f, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0904, + 0x7a99, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7c9b, 0x7007, + 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7c9b, 0x0005, + 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x7a99, + 0x7007, 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1904, 0x7b5c, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x0904, 0x7b47, 0xa99c, 0x9186, + 0x00ff, 0x05e8, 0xa994, 0x9186, 0x006f, 0x0188, 0x9186, 0x0074, + 0x15b0, 0x0026, 0x2011, 0x0010, 0x080c, 0x6ac7, 0x002e, 0x0578, + 0x0016, 0xa998, 0x080c, 0x6b11, 0x001e, 0x1548, 0x0400, 0x080c, + 0x7637, 0x0140, 0xa897, 0x4005, 0xa89b, 0x0016, 0x2001, 0x0030, + 0x900e, 0x0438, 0x0026, 0x2011, 0x8008, 0x080c, 0x6ac7, 0x002e, + 0x01b0, 0x0016, 0x0026, 0x0036, 0xa998, 0xaaa0, 0xab9c, 0x918d, + 0x8000, 0x080c, 0x6b11, 0x003e, 0x002e, 0x001e, 0x1140, 0xa897, + 0x4005, 0xa89b, 0x4009, 0x2001, 0x0030, 0x900e, 0x0050, 0xa868, + 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x63c5, 0x1108, + 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, + 0x080c, 0x6e9f, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0904, + 0x7b00, 0x9186, 0x0064, 0x0904, 0x7b00, 0x9186, 0x007c, 0x0904, + 0x7b00, 0x9186, 0x0028, 0x0904, 0x7b00, 0x9186, 0x0038, 0x0904, + 0x7b00, 0x9186, 0x0078, 0x0904, 0x7b00, 0x9186, 0x005f, 0x0904, + 0x7b00, 0x9186, 0x0056, 0x0904, 0x7b00, 0xa897, 0x4005, 0xa89b, + 0x0001, 0x2001, 0x0030, 0x900e, 0x0860, 0xa87c, 0x9084, 0x00c0, + 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x7e95, 0x2900, + 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, + 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, + 0x7aa1, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7aa1, 0x82ff, 0x1138, + 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7c22, 0x0018, 0x9280, + 0x7c18, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7c03, 0x080c, + 0x1027, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054, + 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, + 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200, + 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108, + 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10f8, 0xa06c, 0x908e, 0x0100, + 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020, + 0x2048, 0x080c, 0x1040, 0x7014, 0x2048, 0x0804, 0x7aa1, 0x7020, + 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906, + 0x711a, 0x0804, 0x7bbb, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, + 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, + 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7e95, 0x0804, 0x7c64, + 0x7c1a, 0x7c1e, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b, + 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066, + 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, + 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, + 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, + 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, + 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, + 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, + 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, + 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, + 0x1178, 0x080c, 0x61c2, 0x1108, 0x0005, 0x080c, 0x710b, 0x0126, + 0x2091, 0x8000, 0x080c, 0xd3ce, 0x080c, 0x6e9f, 0x012e, 0x0ca0, + 0x080c, 0xd7dc, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, + 0x1834, 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188, 0xa883, + 0x0000, 0x080c, 0x6252, 0x1108, 0x0005, 0xa87a, 0x0126, 0x2091, + 0x8000, 0x080c, 0x6e9f, 0x012e, 0x0cb8, 0x2001, 0x0028, 0x0ca8, + 0x2001, 0x0000, 0x0c90, 0x0419, 0x11d8, 0xa888, 0x9005, 0x01e0, + 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x6327, 0x1138, + 0x0005, 0x9006, 0xa87a, 0x080c, 0x629f, 0x1108, 0x0005, 0x0126, + 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x6e9f, 0x012e, 0x0cb0, + 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x00c6, + 0x2061, 0x1800, 0x60d0, 0x9005, 0x0100, 0x00ce, 0x0005, 0x7018, + 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012, + 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001, + 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, + 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, + 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, + 0x9005, 0x11d8, 0xa974, 0x080c, 0x6724, 0x11b8, 0x0066, 0xae80, + 0x080c, 0x6834, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224, + 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x6724, 0x1110, 0x080c, + 0x6934, 0x8108, 0x1f04, 0x7d04, 0x00ce, 0xa87c, 0xd084, 0x1120, + 0x080c, 0x1040, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, + 0x6e9f, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, + 0x0001, 0x080c, 0x6a9f, 0x0580, 0x2061, 0x1a74, 0x6100, 0xd184, + 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, + 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, + 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000, + 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, + 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, + 0x6202, 0x012e, 0x0804, 0x7f5e, 0x012e, 0x0804, 0x7f58, 0x012e, + 0x0804, 0x7f52, 0x012e, 0x0804, 0x7f55, 0x0126, 0x2091, 0x8000, + 0x7007, 0x0001, 0x080c, 0x6a9f, 0x05e0, 0x2061, 0x1a74, 0x6000, + 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, + 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, + 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, + 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, + 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004, + 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000, + 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x7f5e, 0x012e, 0x0804, + 0x7f5b, 0x012e, 0x0804, 0x7f58, 0x0126, 0x2091, 0x8000, 0x7007, + 0x0001, 0x2061, 0x1a74, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, + 0x0220, 0x630a, 0x012e, 0x0804, 0x7f6c, 0x012e, 0x0804, 0x7f5b, + 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, + 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a74, 0x6000, 0x9084, 0xfcff, + 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, + 0x0598, 0x2001, 0x1834, 0x2004, 0x9005, 0x0118, 0x080c, 0xb306, + 0x0068, 0x6017, 0xf400, 0x605b, 0x0000, 0xa97c, 0xd1a4, 0x0110, + 0xa980, 0x615a, 0x2009, 0x0041, 0x080c, 0xb352, 0xa988, 0x918c, + 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, + 0x080c, 0x8a50, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a74, + 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, + 0x012e, 0x00be, 0x0804, 0x7f5e, 0x00ce, 0x012e, 0x00be, 0x0804, + 0x7f58, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, + 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c, + 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, + 0x0029, 0x1d10, 0xa974, 0x080c, 0x6724, 0x1968, 0xb800, 0xc0e4, + 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, + 0x1986, 0x2004, 0x601a, 0x0804, 0x7df3, 0xa88c, 0x9065, 0x0960, + 0x00e6, 0xa890, 0x9075, 0x2001, 0x1834, 0x2004, 0x9005, 0x0150, + 0x080c, 0xb306, 0x8eff, 0x0118, 0x2e60, 0x080c, 0xb306, 0x00ee, + 0x0804, 0x7df3, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, + 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, + 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, + 0x00ee, 0x0804, 0x7df3, 0x2061, 0x1a74, 0x6000, 0xd084, 0x0190, + 0xd08c, 0x1904, 0x7f6c, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, + 0x0220, 0x6206, 0x012e, 0x0804, 0x7f6c, 0x012e, 0xa883, 0x0016, + 0x0804, 0x7f65, 0xa883, 0x0007, 0x0804, 0x7f65, 0xa864, 0x8007, + 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069, + 0x0005, 0x080c, 0x7a99, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900, + 0x7016, 0x701a, 0x704b, 0x7e95, 0x0005, 0x00b6, 0x00e6, 0x0126, + 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904, + 0x7f17, 0x6130, 0xd194, 0x1904, 0x7f41, 0xa878, 0x2070, 0x9e82, + 0x1cd0, 0x0a04, 0x7f0b, 0x6068, 0x9e02, 0x1a04, 0x7f0b, 0x7120, + 0x9186, 0x0006, 0x1904, 0x7efd, 0x7010, 0x905d, 0x0904, 0x7f17, + 0xb800, 0xd0e4, 0x1904, 0x7f3b, 0x2061, 0x1a74, 0x6100, 0x9184, + 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x7f44, + 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198, + 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x7f47, 0x080c, 0x57d5, 0xd09c, + 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x8970, 0x012e, + 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, + 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x7f47, 0x012e, 0x00ee, 0x00be, + 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x7f65, + 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x6724, + 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, + 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e, + 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c, + 0x57d9, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1cd0, 0x02c0, + 0x6068, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010, + 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, + 0x9086, 0x0007, 0x1904, 0x7ea1, 0x7003, 0x0002, 0x0804, 0x7ea1, + 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, + 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, + 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xe754, 0x012e, 0x00ee, + 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, + 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, + 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6e9f, 0x012e, 0x0005, 0x080c, 0x1040, 0x0005, 0x00d6, + 0x080c, 0x8967, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, + 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, + 0x190c, 0x8056, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea, + 0x0020, 0x0278, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, + 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c, + 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780, + 0x190c, 0x8056, 0x000e, 0x0005, 0xa898, 0x9084, 0x0003, 0x05a8, + 0x080c, 0xb27d, 0x05d8, 0x2900, 0x6016, 0xa864, 0x9084, 0x00ff, + 0x9086, 0x0035, 0x1138, 0x6008, 0xc0fd, 0x600a, 0x2001, 0x196b, + 0x2004, 0x0098, 0xa8a0, 0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00, + 0x9105, 0xa99c, 0x918c, 0x00ff, 0x080c, 0x2873, 0x1540, 0x00b6, + 0x080c, 0x6724, 0x2b00, 0x00be, 0x1510, 0x6012, 0x6023, 0x0001, + 0x2009, 0x0040, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x0110, + 0x2009, 0x0041, 0x080c, 0xb352, 0x0005, 0xa87b, 0x0101, 0x0126, + 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, 0x0005, 0xa87b, 0x002c, + 0x0126, 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, 0x0005, 0xa87b, + 0x0028, 0x0126, 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, 0x080c, + 0xb2d3, 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, + 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x8047, 0xa97c, + 0x9188, 0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, + 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, + 0x080c, 0xb27d, 0x1118, 0x080c, 0xb325, 0x05a8, 0x6212, 0xa874, + 0x0002, 0x8025, 0x802a, 0x802d, 0x8033, 0x2019, 0x0002, 0x080c, + 0xeba1, 0x0060, 0x080c, 0xeb38, 0x0048, 0x2019, 0x0002, 0xa980, + 0x080c, 0xeb53, 0x0018, 0xa980, 0x080c, 0xeb38, 0x080c, 0xb2d3, + 0xa887, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, + 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, + 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, + 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, + 0x0e04, 0x8058, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804, + 0x0dce, 0x2001, 0x1834, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, + 0x2079, 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, + 0x2009, 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x15a0, 0x00fe, + 0x0005, 0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, + 0x0005, 0x781c, 0xd08c, 0x0904, 0x80d8, 0x68c0, 0x90aa, 0x0005, + 0x0a04, 0x871c, 0x7d44, 0x7c40, 0x9584, 0x00f6, 0x1510, 0x9484, + 0x7000, 0x0140, 0x908a, 0x2000, 0x1260, 0x9584, 0x0700, 0x8007, + 0x0804, 0x80df, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x0da8, + 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084, 0xff00, 0x9086, + 0x8100, 0x11c0, 0x080c, 0xf057, 0x080c, 0x8601, 0x7817, 0x0140, + 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x865f, 0x19c0, 0xd5a4, + 0x0148, 0x0046, 0x0056, 0x080c, 0x813a, 0x080c, 0x236e, 0x005e, + 0x004e, 0x0020, 0x080c, 0xf057, 0x7817, 0x0140, 0x080c, 0x7637, + 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140, 0x6893, 0x0000, + 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000, 0x080c, 0x811b, + 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, 0x9ab1, 0x0005, 0x0002, + 0x80f1, 0x8409, 0x80e8, 0x80e8, 0x80e8, 0x80e8, 0x80e8, 0x80e8, + 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, 0x9ab1, + 0x0005, 0x7000, 0x908c, 0xff00, 0x9194, 0xf000, 0x810f, 0x9484, + 0x0fff, 0x6892, 0x9286, 0x2000, 0x1150, 0x6800, 0x9086, 0x0001, + 0x1118, 0x080c, 0x583f, 0x0070, 0x080c, 0x815a, 0x0058, 0x9286, + 0x3000, 0x1118, 0x080c, 0x8341, 0x0028, 0x9286, 0x8000, 0x1110, + 0x080c, 0x8528, 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, + 0x090c, 0x9ab1, 0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, + 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, + 0x2011, 0x8048, 0x2518, 0x080c, 0x4c44, 0x003e, 0x002e, 0x0005, + 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, + 0x7c30, 0x0050, 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, + 0x7d44, 0x7c40, 0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, + 0x0160, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, + 0x2011, 0x8048, 0x080c, 0x4c44, 0x002e, 0x00fe, 0x005e, 0x004e, + 0x003e, 0x0005, 0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, + 0x9096, 0x0001, 0x0120, 0x9096, 0x0023, 0x1904, 0x8312, 0x9186, + 0x0023, 0x15c0, 0x080c, 0x85c6, 0x0904, 0x8312, 0x6120, 0x9186, + 0x0001, 0x0150, 0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, + 0x9186, 0x000a, 0x1904, 0x8312, 0x7124, 0x610a, 0x7030, 0x908e, + 0x0200, 0x1130, 0x2009, 0x0015, 0x080c, 0xb352, 0x0804, 0x8312, + 0x908e, 0x0214, 0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, + 0x080c, 0xb352, 0x0804, 0x8312, 0x908e, 0x0100, 0x1904, 0x8312, + 0x7034, 0x9005, 0x1904, 0x8312, 0x2009, 0x0016, 0x080c, 0xb352, + 0x0804, 0x8312, 0x9186, 0x0022, 0x1904, 0x8312, 0x7030, 0x908e, + 0x0300, 0x1580, 0x68dc, 0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, + 0x918c, 0x00ff, 0x697e, 0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, + 0x79e6, 0x78ea, 0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, + 0x28bc, 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x2873, + 0x695e, 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, + 0x70b6, 0x00ee, 0x7034, 0x9005, 0x1904, 0x8312, 0x2009, 0x0017, + 0x0804, 0x82c2, 0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, + 0x8312, 0x080c, 0x7637, 0x0120, 0x2009, 0x001d, 0x0804, 0x82c2, + 0x68dc, 0xc0a5, 0x68de, 0x2009, 0x0030, 0x0804, 0x82c2, 0x908e, + 0x0500, 0x1140, 0x7034, 0x9005, 0x1904, 0x8312, 0x2009, 0x0018, + 0x0804, 0x82c2, 0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, + 0x82c2, 0x908e, 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x82c2, + 0x908e, 0x5200, 0x1140, 0x7034, 0x9005, 0x1904, 0x8312, 0x2009, + 0x001b, 0x0804, 0x82c2, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, + 0x1904, 0x8312, 0x2009, 0x001c, 0x0804, 0x82c2, 0x908e, 0x1300, + 0x1120, 0x2009, 0x0034, 0x0804, 0x82c2, 0x908e, 0x1200, 0x1140, + 0x7034, 0x9005, 0x1904, 0x8312, 0x2009, 0x0024, 0x0804, 0x82c2, + 0x908c, 0xff00, 0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, + 0x1810, 0x2004, 0xd09c, 0x0904, 0x82c2, 0x080c, 0xdf1a, 0x1904, + 0x8312, 0x0804, 0x82c0, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, + 0x2009, 0x002a, 0x0804, 0x82c2, 0x908e, 0x0f00, 0x1120, 0x2009, + 0x0020, 0x0804, 0x82c2, 0x908e, 0x6104, 0x1530, 0x2029, 0x0205, + 0x2011, 0x026d, 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, + 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, + 0x4c44, 0x004e, 0x8108, 0x0f04, 0x8276, 0x9186, 0x0280, 0x1d88, + 0x2504, 0x8000, 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, + 0x2009, 0x0023, 0x0804, 0x82c2, 0x908e, 0x6000, 0x1120, 0x2009, + 0x003f, 0x0804, 0x82c2, 0x908e, 0x5400, 0x1138, 0x080c, 0x86cc, + 0x1904, 0x8312, 0x2009, 0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, + 0x080c, 0x86f4, 0x1118, 0x2009, 0x0041, 0x0460, 0x2009, 0x0042, + 0x0448, 0x908e, 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, + 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, + 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, + 0x2009, 0x004f, 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, + 0x2009, 0x0050, 0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, + 0x2009, 0x004c, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, + 0x080c, 0x2873, 0x1904, 0x8315, 0x080c, 0x66b9, 0x1904, 0x8315, + 0xbe12, 0xbd16, 0x001e, 0x0016, 0x080c, 0x7637, 0x01c0, 0x68dc, + 0xd08c, 0x1148, 0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, + 0xff00, 0x1168, 0x0040, 0x687c, 0x9606, 0x1148, 0x6880, 0x9506, + 0x9084, 0xff00, 0x1120, 0x9584, 0x00ff, 0xb8c2, 0x0080, 0xb8c0, + 0x9005, 0x1168, 0x9186, 0x0046, 0x1150, 0x687c, 0x9606, 0x1138, + 0x6880, 0x9506, 0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, + 0xb27d, 0x01a8, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, + 0x001e, 0x9186, 0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, + 0x080c, 0xb352, 0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, + 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4c44, + 0x080c, 0xb325, 0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, + 0x610a, 0x001e, 0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, + 0x1128, 0x6007, 0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, + 0x6017, 0x0000, 0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x9547, + 0x08a0, 0x080c, 0x873b, 0x1158, 0x080c, 0x3374, 0x1140, 0x7010, + 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, 0x0005, + 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, 0x9186, + 0x0033, 0x11e8, 0x080c, 0x85c6, 0x0904, 0x83a1, 0x7124, 0x610a, + 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15d0, 0x2009, + 0x0015, 0x080c, 0xb352, 0x04a8, 0x908e, 0x0100, 0x1590, 0x7034, + 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0xb352, 0x0450, 0x9186, + 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518, 0x2009, 0x0038, + 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2873, + 0x11b8, 0x080c, 0x66b9, 0x11a0, 0xbe12, 0xbd16, 0x080c, 0xb27d, + 0x0178, 0x2b08, 0x6112, 0x080c, 0xd554, 0x6023, 0x0004, 0x7120, + 0x610a, 0x001e, 0x080c, 0xb352, 0x080c, 0x9ab1, 0x0010, 0x00ce, + 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046, 0x00e6, + 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592, 0xfffc, + 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804, 0x8403, + 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x8403, 0x9596, + 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000, 0x2019, + 0x1837, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800, 0x2071, + 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071, 0x1081, + 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496, 0x00ff, + 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706, 0xb814, + 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148, 0x94c6, + 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080, 0x1d20, + 0x8420, 0x8e70, 0x1f04, 0x83d8, 0x82ff, 0x1118, 0x9085, 0x0001, + 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e, 0x00be, + 0x0005, 0x2001, 0x1837, 0x200c, 0x9184, 0x0080, 0x0110, 0xd18c, + 0x0138, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f, 0x004a, + 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, 0x9ab1, + 0x0005, 0x8431, 0x8431, 0x8431, 0x85d8, 0x8431, 0x843a, 0x8465, + 0x84f3, 0x8431, 0x8431, 0x8431, 0x8431, 0x8431, 0x8431, 0x8431, + 0x8431, 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, + 0x9ab1, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, + 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6868, 0x9c02, + 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, + 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, + 0x0046, 0x080c, 0xb352, 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, + 0x9005, 0x090c, 0x9ab1, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, + 0x0fff, 0x0904, 0x84c9, 0x7110, 0xd1bc, 0x1904, 0x84c9, 0x7108, + 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0, + 0x81ff, 0x15a0, 0x9080, 0x33b6, 0x200d, 0x918c, 0xff00, 0x810f, + 0x2001, 0x0080, 0x9106, 0x0904, 0x84c9, 0x080c, 0x66b9, 0x1904, + 0x84c9, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294, + 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0xb27d, 0x05e8, 0x2b08, + 0x7028, 0x6046, 0x702c, 0x604a, 0x6112, 0x6023, 0x0006, 0x7120, + 0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xe192, 0x0408, + 0x080c, 0x6aa3, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c, 0x83a5, + 0x11c0, 0x0898, 0x080c, 0xb27d, 0x2b08, 0x0198, 0x6112, 0x6023, + 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005, + 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, + 0x9ab1, 0x7817, 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, + 0x9ab1, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec, + 0x0120, 0x2011, 0x8049, 0x080c, 0x4c44, 0x080c, 0xb325, 0x0d48, + 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156, + 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020, + 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6868, + 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, + 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, + 0x2009, 0x0045, 0x080c, 0xb352, 0x7817, 0x0140, 0x2001, 0x19f1, + 0x2004, 0x9005, 0x090c, 0x9ab1, 0x00be, 0x0005, 0x6120, 0x9186, + 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, + 0x080c, 0x873b, 0x1180, 0x080c, 0x3374, 0x1168, 0x7010, 0x9084, + 0xff00, 0x8007, 0x9086, 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, + 0x0006, 0x1208, 0x000b, 0x0005, 0x8542, 0x8543, 0x8542, 0x8542, + 0x85a8, 0x85b7, 0x0005, 0x00b6, 0x700c, 0x7108, 0x080c, 0x2873, + 0x1904, 0x85a6, 0x080c, 0x66b9, 0x1904, 0x85a6, 0xbe12, 0xbd16, + 0x7110, 0xd1bc, 0x0540, 0x702c, 0xd084, 0x1120, 0xb800, 0xd0bc, + 0x1904, 0x85a6, 0x080c, 0x6aa3, 0x0148, 0x9086, 0x0004, 0x0130, + 0x080c, 0x6aab, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, + 0x85c6, 0x00ce, 0x05d8, 0x080c, 0xb27d, 0x2b08, 0x05b8, 0x6112, + 0x080c, 0xd554, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, + 0x080c, 0xb352, 0x0458, 0x080c, 0x6aa3, 0x0148, 0x9086, 0x0004, + 0x0130, 0x080c, 0x6aab, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, + 0xb27d, 0x2b08, 0x01d8, 0x6112, 0x080c, 0xd554, 0x6023, 0x0005, + 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xb352, 0x0078, 0x080c, + 0xb27d, 0x2b08, 0x0158, 0x6112, 0x080c, 0xd554, 0x6023, 0x0004, + 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0xb352, 0x00be, 0x0005, + 0x7110, 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x851e, 0x1130, + 0x7124, 0x610a, 0x2009, 0x0089, 0x080c, 0xb352, 0x0005, 0x7110, + 0xd1bc, 0x0158, 0x0059, 0x0148, 0x080c, 0x851e, 0x1130, 0x7124, + 0x610a, 0x2009, 0x008a, 0x080c, 0xb352, 0x0005, 0x7020, 0x2060, + 0x9c84, 0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x181a, + 0x2004, 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, + 0x00b6, 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007, + 0x11b0, 0x9c82, 0x1cd0, 0x0298, 0x6868, 0x9c02, 0x1280, 0x7008, + 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, + 0xb914, 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0xb352, 0x7817, + 0x0140, 0x2001, 0x19f1, 0x2004, 0x9005, 0x090c, 0x9ab1, 0x00be, + 0x0005, 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, + 0x0005, 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, + 0x0005, 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, + 0xc000, 0x05d0, 0x080c, 0xb27d, 0x05b8, 0x0066, 0x00c6, 0x0046, + 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x2873, 0x15a0, + 0x080c, 0x66b9, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, + 0x6012, 0x080c, 0xd554, 0x080c, 0x100e, 0x0510, 0x2900, 0x605a, + 0x9006, 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, + 0x000e, 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, + 0x006e, 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, + 0x080c, 0x9547, 0x080c, 0x9ab1, 0x00fe, 0x009e, 0x00ce, 0x0005, + 0x080c, 0xb2d3, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, + 0x7000, 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, + 0x1904, 0x86b6, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, + 0x9005, 0x1904, 0x86b8, 0x7030, 0x908e, 0x0400, 0x0904, 0x86b8, + 0x908e, 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, + 0x11d8, 0x2009, 0x1837, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, + 0x080c, 0x6a61, 0x0588, 0x68b0, 0x9084, 0x00ff, 0x7100, 0x918c, + 0x00ff, 0x9106, 0x1518, 0x6880, 0x69b0, 0x918c, 0xff00, 0x9105, + 0x7104, 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, + 0x11a8, 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, + 0x5000, 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x85c6, + 0x0128, 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, + 0x9085, 0x0001, 0x00ce, 0x0005, 0x7030, 0x908e, 0x0300, 0x0118, + 0x908e, 0x5200, 0x1d98, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, + 0x9086, 0x0008, 0x0d68, 0x0c50, 0x0156, 0x0046, 0x0016, 0x0036, + 0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, + 0x0004, 0x2019, 0x1805, 0x2011, 0x027a, 0x080c, 0xc365, 0x1178, + 0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x027e, + 0x080c, 0xc365, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, + 0x001e, 0x004e, 0x015e, 0x0005, 0x0156, 0x0046, 0x0016, 0x0036, + 0x7038, 0x2020, 0x8427, 0x94a4, 0x0007, 0xd484, 0x0148, 0x20a9, + 0x0004, 0x2019, 0x1805, 0x2011, 0x0272, 0x080c, 0xc365, 0x1178, + 0xd48c, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1801, 0x2011, 0x0276, + 0x080c, 0xc365, 0x1120, 0xd494, 0x0110, 0x9085, 0x0001, 0x003e, + 0x001e, 0x004e, 0x015e, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, + 0xc0e5, 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x1800, + 0x7834, 0xd084, 0x1130, 0x2079, 0x0200, 0x7800, 0x9085, 0x1200, + 0x7802, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7034, 0xc084, + 0x7036, 0x00ee, 0x0005, 0x0016, 0x2001, 0x1837, 0x200c, 0x9184, + 0x0080, 0x0118, 0xd18c, 0x0118, 0x9006, 0x001e, 0x0005, 0x9085, + 0x0001, 0x0cd8, 0x2071, 0x19fb, 0x7003, 0x0003, 0x700f, 0x0361, + 0x9006, 0x701a, 0x707a, 0x7012, 0x7017, 0x1cd0, 0x7007, 0x0000, + 0x7026, 0x702b, 0xa6ff, 0x7032, 0x703a, 0x703f, 0x0064, 0x7037, + 0xa767, 0x7047, 0xffff, 0x704a, 0x704f, 0x5667, 0x7052, 0x7063, + 0x88de, 0x080c, 0x1027, 0x090c, 0x0dc5, 0x2900, 0x7042, 0xa867, + 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19fb, + 0x1d04, 0x882c, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1540, + 0x2001, 0x013c, 0x2004, 0x9005, 0x190c, 0x894c, 0x2001, 0x1869, + 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, 0x0000, + 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0dc5, 0x700f, 0x0361, + 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x080c, 0x8923, 0x7048, + 0x900d, 0x0148, 0x8109, 0x714a, 0x1130, 0x704c, 0x080f, 0x0018, + 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, 0x7020, 0x8001, + 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, 0x9186, 0x03e8, + 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, + 0x900d, 0x05a8, 0x702c, 0x8001, 0x702e, 0x1588, 0x0016, 0x2009, + 0x0306, 0x210c, 0x9184, 0x0030, 0x01e8, 0x9184, 0x0048, 0x9086, + 0x0008, 0x11c0, 0x7038, 0x9005, 0x01a8, 0x8001, 0x703a, 0x1190, + 0x080c, 0x7637, 0x0178, 0x00e6, 0x2071, 0x19e8, 0x080c, 0xa7f5, + 0x00ee, 0x1140, 0x2009, 0x1a86, 0x2104, 0x8000, 0x0208, 0x200a, + 0x001e, 0x0068, 0x001e, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, + 0x9184, 0x007f, 0x090c, 0xa8ab, 0x0010, 0x7034, 0x080f, 0x7044, + 0x9005, 0x0118, 0x0310, 0x8001, 0x7046, 0x7054, 0x900d, 0x0168, + 0x7050, 0x8001, 0x7052, 0x1148, 0x7053, 0x0009, 0x8109, 0x7156, + 0x1120, 0x7158, 0x7156, 0x7060, 0x080f, 0x7018, 0x900d, 0x01d8, + 0x0016, 0x7078, 0x900d, 0x0158, 0x7074, 0x8001, 0x7076, 0x1138, + 0x7077, 0x0009, 0x8109, 0x717a, 0x1110, 0x707c, 0x080f, 0x001e, + 0x7008, 0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, + 0x1110, 0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x8854, 0x8855, + 0x8871, 0x00e6, 0x2071, 0x19fb, 0x7018, 0x9005, 0x1120, 0x711a, + 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, + 0x19fb, 0x701c, 0x9206, 0x1120, 0x701a, 0x701e, 0x707a, 0x707e, + 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x19fb, 0xb888, 0x9102, + 0x0208, 0xb98a, 0x00ee, 0x0005, 0x0005, 0x00b6, 0x7110, 0x080c, + 0x6724, 0x1168, 0xb888, 0x8001, 0x0250, 0xb88a, 0x1140, 0x0126, + 0x2091, 0x8000, 0x0016, 0x080c, 0x9ab1, 0x001e, 0x012e, 0x8108, + 0x9182, 0x0800, 0x0218, 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, + 0x0005, 0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x6040, 0x9005, + 0x0128, 0x8001, 0x6042, 0x1110, 0x080c, 0xd3e5, 0x6018, 0x9005, + 0x0558, 0x8001, 0x601a, 0x1540, 0x6120, 0x9186, 0x0003, 0x0148, + 0x9186, 0x0006, 0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, 0xd1c4, + 0x1100, 0x080c, 0xd0d8, 0x01b0, 0x6014, 0x2048, 0xa884, 0x908a, + 0x199a, 0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, 0x0210, + 0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, + 0xd0e4, 0x0110, 0x080c, 0xcdbc, 0x012e, 0x9c88, 0x0018, 0x7116, + 0x2001, 0x181a, 0x2004, 0x9102, 0x0220, 0x7017, 0x1cd0, 0x7007, + 0x0000, 0x0005, 0x00e6, 0x2071, 0x19fb, 0x7027, 0x07d0, 0x7023, + 0x0009, 0x00ee, 0x0005, 0x2001, 0x1a04, 0x2003, 0x0000, 0x0005, + 0x00e6, 0x2071, 0x19fb, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, + 0x2011, 0x1a07, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19fb, + 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, + 0x705c, 0x8000, 0x705e, 0x2001, 0x1a0b, 0x2044, 0xa06c, 0x9086, + 0x0000, 0x0150, 0x7070, 0xa09a, 0x706c, 0xa096, 0x7068, 0xa092, + 0x7064, 0xa08e, 0x080c, 0x10f8, 0x002e, 0x008e, 0x0005, 0x0006, + 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x0156, 0x080c, 0x8776, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, + 0x19fb, 0x717a, 0x727e, 0x7077, 0x0009, 0x00ee, 0x0005, 0x00e6, + 0x0006, 0x2071, 0x19fb, 0x707c, 0x9206, 0x1110, 0x707a, 0x707e, + 0x000e, 0x00ee, 0x0005, 0x2069, 0x1800, 0x69e8, 0xd1e4, 0x1518, + 0x0026, 0xd1ec, 0x0140, 0x6a54, 0x6874, 0x9202, 0x0288, 0x8117, + 0x9294, 0x00c0, 0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, + 0x0007, 0x0110, 0x69ea, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, + 0x8107, 0x9106, 0x9094, 0x00c0, 0x9184, 0xff3f, 0x9205, 0x68ea, + 0x080c, 0x0eee, 0x002e, 0x0005, 0x0016, 0x00c6, 0x2009, 0xfff4, + 0x210d, 0x2061, 0x0100, 0x60f0, 0x9100, 0x60f3, 0x0000, 0x2009, + 0xfff4, 0x200f, 0x1220, 0x8108, 0x2105, 0x8000, 0x200f, 0x00ce, + 0x001e, 0x0005, 0x00c6, 0x2061, 0x1a74, 0x00ce, 0x0005, 0x9184, + 0x000f, 0x8003, 0x8003, 0x8003, 0x9080, 0x1a74, 0x2060, 0x0005, + 0xa884, 0x908a, 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, + 0x1a74, 0x6014, 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, + 0x908e, 0xffff, 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, + 0xa87c, 0x908c, 0x00c0, 0x918e, 0x00c0, 0x0904, 0x89fa, 0xd0b4, + 0x1168, 0xd0bc, 0x1904, 0x89d3, 0x2009, 0x0006, 0x080c, 0x8a27, + 0x0005, 0x900e, 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, + 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x8a21, 0x908c, + 0x2020, 0x918e, 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, + 0x1869, 0x2104, 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, + 0x0804, 0xb352, 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, + 0xb352, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, + 0x6024, 0xc0cd, 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, + 0xa88c, 0x6032, 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, + 0x918e, 0x0003, 0x1904, 0x8a21, 0x908c, 0x2020, 0x918e, 0x2020, + 0x0170, 0x0076, 0x00f6, 0x2c78, 0x080c, 0x1768, 0x00fe, 0x007e, + 0x87ff, 0x1120, 0x2009, 0x0042, 0x080c, 0xb352, 0x0005, 0x6110, + 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, + 0x6126, 0x0c38, 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, + 0x01a8, 0x9084, 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, + 0x2009, 0x0041, 0x080c, 0xb352, 0x0005, 0x00b9, 0x0ce8, 0x87ff, + 0x1dd8, 0x2009, 0x0043, 0x080c, 0xb352, 0x0cb0, 0x6110, 0x00b6, + 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, + 0x0c00, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, + 0x080c, 0xd0d8, 0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, + 0x9186, 0x0001, 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, + 0x1158, 0x00c6, 0x2061, 0x1a74, 0x6200, 0xd28c, 0x1120, 0x6204, + 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x6cde, 0x6014, 0x904d, + 0x0076, 0x2039, 0x0000, 0x190c, 0x8970, 0x007e, 0x009e, 0x0005, + 0x0156, 0x00c6, 0x2061, 0x1a74, 0x6000, 0x81ff, 0x0110, 0x9205, + 0x0008, 0x9204, 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, + 0x1138, 0x6808, 0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, + 0x0005, 0x2071, 0x1924, 0x7003, 0x0006, 0x7007, 0x0000, 0x700f, + 0x0000, 0x7013, 0x0001, 0x080c, 0x1027, 0x090c, 0x0dc5, 0xa867, + 0x0006, 0xa86b, 0x0001, 0xa8ab, 0xdcb0, 0xa89f, 0x0000, 0x2900, + 0x702e, 0x7033, 0x0000, 0x0005, 0x0126, 0x2091, 0x8000, 0x0096, + 0x00e6, 0x2071, 0x1924, 0x702c, 0x2048, 0x6a2c, 0x721e, 0x6b30, + 0x7322, 0x6834, 0x7026, 0xa896, 0x6838, 0x702a, 0xa89a, 0x6824, + 0x7016, 0x683c, 0x701a, 0x2009, 0x0028, 0x200a, 0x9005, 0x0148, + 0x900e, 0x9188, 0x000c, 0x8001, 0x1de0, 0x2100, 0x9210, 0x1208, + 0x8318, 0xaa8e, 0xab92, 0x7010, 0xd084, 0x0168, 0xc084, 0x7007, + 0x0001, 0x700f, 0x0000, 0x0006, 0x2009, 0x1ad1, 0x2104, 0x9082, + 0x0007, 0x200a, 0x000e, 0xc095, 0x7012, 0x2008, 0x2001, 0x003b, + 0x080c, 0x1611, 0x9006, 0x2071, 0x193d, 0x7002, 0x7006, 0x702a, + 0x00ee, 0x009e, 0x012e, 0x0005, 0x2009, 0x1ad1, 0x2104, 0x9080, + 0x0007, 0x200a, 0x0005, 0x00e6, 0x0126, 0x0156, 0x2091, 0x8000, + 0x2071, 0x1800, 0x7154, 0x2001, 0x0008, 0x910a, 0x0638, 0x2001, + 0x187d, 0x20ac, 0x9006, 0x9080, 0x0008, 0x1f04, 0x8ae3, 0x71c0, + 0x9102, 0x02e0, 0x2071, 0x1877, 0x20a9, 0x0007, 0x00c6, 0x080c, + 0xb27d, 0x6023, 0x0009, 0x6003, 0x0004, 0x601f, 0x0101, 0x0089, + 0x0126, 0x2091, 0x8000, 0x080c, 0x8c61, 0x012e, 0x1f04, 0x8aef, + 0x9006, 0x00ce, 0x015e, 0x012e, 0x00ee, 0x0005, 0x9085, 0x0001, + 0x0cc8, 0x00e6, 0x00b6, 0x0096, 0x0086, 0x0056, 0x0046, 0x0026, + 0x7118, 0x720c, 0x7620, 0x7004, 0xd084, 0x1128, 0x2021, 0x0024, + 0x2029, 0x0002, 0x0020, 0x2021, 0x002c, 0x2029, 0x000a, 0x080c, + 0x100e, 0x090c, 0x0dc5, 0x2900, 0x6016, 0x2058, 0xac66, 0x9006, + 0xa802, 0xa806, 0xa86a, 0xa87a, 0xa8aa, 0xa887, 0x0005, 0xa87f, + 0x0020, 0x7008, 0xa89a, 0x7010, 0xa89e, 0xae8a, 0xa8af, 0xffff, + 0xa8b3, 0x0000, 0x8109, 0x0160, 0x080c, 0x100e, 0x090c, 0x0dc5, + 0xad66, 0x2b00, 0xa802, 0x2900, 0xb806, 0x2058, 0x8109, 0x1da0, + 0x002e, 0x004e, 0x005e, 0x008e, 0x009e, 0x00be, 0x00ee, 0x0005, + 0x2079, 0x0000, 0x2071, 0x1924, 0x7004, 0x004b, 0x700c, 0x0002, + 0x8b5b, 0x8b54, 0x8b54, 0x0005, 0x8b65, 0x8bbb, 0x8bbb, 0x8bbb, + 0x8bbc, 0x8bcd, 0x8bcd, 0x700c, 0x0cba, 0x0126, 0x2091, 0x8000, + 0x78a0, 0x79a0, 0x9106, 0x1904, 0x8bad, 0x7814, 0xd0bc, 0x1904, + 0x8bb6, 0x012e, 0x7018, 0x910a, 0x1128, 0x7030, 0x9005, 0x1904, + 0x8bff, 0x0005, 0x1210, 0x7114, 0x910a, 0x9192, 0x000a, 0x0210, + 0x2009, 0x000a, 0x2001, 0x1888, 0x2014, 0x2001, 0x1936, 0x2004, + 0x9100, 0x9202, 0x0e50, 0x080c, 0x8d5c, 0x2200, 0x9102, 0x0208, + 0x2208, 0x0096, 0x702c, 0x2048, 0xa873, 0x0001, 0xa976, 0x080c, + 0x8e65, 0x2100, 0xa87e, 0xa86f, 0x0000, 0x009e, 0x0126, 0x2091, + 0x8000, 0x2009, 0x1a1b, 0x2104, 0xc085, 0x200a, 0x700f, 0x0002, + 0x012e, 0x080c, 0x1117, 0x1de8, 0x0005, 0x78a0, 0x79a0, 0x9106, + 0x0904, 0x8b6d, 0x080c, 0x8d34, 0x012e, 0x0005, 0x7810, 0xc0c5, + 0x7812, 0x0804, 0x8b6d, 0x0005, 0x700c, 0x0002, 0x8bc1, 0x8bc4, + 0x8bc3, 0x080c, 0x8b63, 0x0005, 0x8001, 0x700e, 0x0096, 0x702c, + 0x2048, 0xa974, 0x009e, 0x0011, 0x0ca0, 0x0005, 0x0096, 0x702c, + 0x2048, 0x7018, 0x9100, 0x7214, 0x921a, 0x1130, 0x701c, 0xa88e, + 0x7020, 0xa892, 0x9006, 0x0068, 0x0006, 0x080c, 0x8e65, 0x2100, + 0xaa8c, 0x9210, 0xaa8e, 0x1220, 0xa890, 0x9081, 0x0000, 0xa892, + 0x000e, 0x009e, 0x0126, 0x2091, 0x8000, 0x78a2, 0x701a, 0x080c, + 0x8d34, 0x012e, 0x0005, 0x00e6, 0x2071, 0x1924, 0x700c, 0x0002, + 0x8bfd, 0x8bfd, 0x8bfb, 0x700f, 0x0001, 0x00ee, 0x0005, 0x0126, + 0x2091, 0x8000, 0x7030, 0x9005, 0x0508, 0x2078, 0x7814, 0x2048, + 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8c6a, 0x00be, 0x01b0, + 0x00e6, 0x2071, 0x193d, 0x080c, 0x8cb1, 0x00ee, 0x0178, 0x0096, + 0x080c, 0x1027, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x04b9, 0x0041, + 0x2001, 0x1947, 0x2003, 0x0000, 0x012e, 0x08c8, 0x012e, 0x0005, + 0x00d6, 0x00c6, 0x0086, 0x00a6, 0x2940, 0x2650, 0x2600, 0x9005, + 0x0180, 0xa864, 0x9084, 0x000f, 0x2068, 0x9d88, 0x20c7, 0x2165, + 0x0056, 0x2029, 0x0000, 0x080c, 0x8dea, 0x080c, 0x207f, 0x1dd8, + 0x005e, 0x00ae, 0x2001, 0x187f, 0x2004, 0xa88a, 0x080c, 0x1768, + 0x781f, 0x0101, 0x7813, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, + 0x8cc0, 0x012e, 0x008e, 0x00ce, 0x00de, 0x0005, 0x7030, 0x9005, + 0x0138, 0x2078, 0x780c, 0x7032, 0x2001, 0x1947, 0x2003, 0x0001, + 0x0005, 0x00e6, 0x2071, 0x1924, 0x7030, 0x600e, 0x2c00, 0x7032, + 0x00ee, 0x0005, 0x00d6, 0x00c6, 0x0026, 0x9b80, 0x8f33, 0x2005, + 0x906d, 0x090c, 0x0dc5, 0x9b80, 0x8f2b, 0x2005, 0x9065, 0x090c, + 0x0dc5, 0x6114, 0x2600, 0x9102, 0x0248, 0x6828, 0x9102, 0x02f0, + 0x9085, 0x0001, 0x002e, 0x00ce, 0x00de, 0x0005, 0x6804, 0xd094, + 0x0148, 0x6854, 0xd084, 0x1178, 0xc085, 0x6856, 0x2011, 0x8026, + 0x080c, 0x4c44, 0x684c, 0x0096, 0x904d, 0x090c, 0x0dc5, 0xa804, + 0x8000, 0xa806, 0x009e, 0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c, + 0x1d08, 0xc08d, 0x6856, 0x2011, 0x8025, 0x080c, 0x4c44, 0x684c, + 0x0096, 0x904d, 0x090c, 0x0dc5, 0xa800, 0x8000, 0xa802, 0x009e, + 0x0888, 0x7000, 0x2019, 0x0008, 0x8319, 0x7104, 0x9102, 0x1118, + 0x2300, 0x9005, 0x0020, 0x0210, 0x9302, 0x0008, 0x8002, 0x0005, + 0x00d6, 0x7814, 0x9005, 0x090c, 0x0dc5, 0x781c, 0x9084, 0x0101, + 0x9086, 0x0101, 0x190c, 0x0dc5, 0x7827, 0x0000, 0x2069, 0x193d, + 0x6804, 0x9080, 0x193f, 0x2f08, 0x2102, 0x6904, 0x8108, 0x9182, + 0x0008, 0x0208, 0x900e, 0x6906, 0x9180, 0x193f, 0x2003, 0x0000, + 0x00de, 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014, 0x2048, 0xa8a8, + 0x0096, 0x2048, 0x9005, 0x190c, 0x1040, 0x009e, 0xa8ab, 0x0000, + 0x080c, 0x0fc0, 0x080c, 0xb2d3, 0x00ce, 0x009e, 0x0005, 0x6020, + 0x9086, 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006, 0x0005, + 0x9085, 0x0001, 0x0005, 0x6000, 0x9086, 0x0000, 0x0178, 0x6010, + 0x9005, 0x0150, 0x00b6, 0x2058, 0x080c, 0x9067, 0x00be, 0x6013, + 0x0000, 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861, 0x0005, 0x2009, + 0x1928, 0x210c, 0xd194, 0x0005, 0x2009, 0x1928, 0x210c, 0xd1c4, + 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x1924, 0x7110, + 0xc194, 0xc185, 0x7007, 0x0000, 0x7112, 0x2001, 0x003b, 0x080c, + 0x1611, 0x00ee, 0x012e, 0x0005, 0x7814, 0xd0bc, 0x1108, 0x0005, + 0x7810, 0xc0c5, 0x7812, 0x0cc0, 0x0096, 0x00d6, 0x9006, 0x7006, + 0x700e, 0x701a, 0x701e, 0x7022, 0x7016, 0x702a, 0x7026, 0x702f, + 0x0000, 0x080c, 0x8eb3, 0x0170, 0x080c, 0x8ee8, 0x0158, 0x2900, + 0x7002, 0x700a, 0x701a, 0x7013, 0x0001, 0x701f, 0x000a, 0x00de, + 0x009e, 0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096, 0x0086, 0x00d6, + 0x00c6, 0x2071, 0x1931, 0x721c, 0x2100, 0x9202, 0x1618, 0x080c, + 0x8ee8, 0x090c, 0x0dc5, 0x7018, 0x9005, 0x1160, 0x2900, 0x7002, + 0x700a, 0x701a, 0x9006, 0x7006, 0x700e, 0xa806, 0xa802, 0x7012, + 0x701e, 0x0038, 0x2040, 0xa806, 0x2900, 0xa002, 0x701a, 0xa803, + 0x0000, 0x7010, 0x8000, 0x7012, 0x701c, 0x9080, 0x000a, 0x701e, + 0x721c, 0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e, 0x009e, 0x00ee, + 0x0005, 0x0096, 0x0156, 0x0136, 0x0146, 0x00e6, 0x0126, 0x2091, + 0x8000, 0x2071, 0x1931, 0x7300, 0x831f, 0x831e, 0x831e, 0x9384, + 0x003f, 0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003, 0x7104, 0x080c, + 0x8e65, 0x810c, 0x2100, 0x9318, 0x8003, 0x2228, 0x2021, 0x0078, + 0x9402, 0x9532, 0x0208, 0x2028, 0x2500, 0x8004, 0x20a8, 0x23a0, + 0xa001, 0xa001, 0x4005, 0x2508, 0x080c, 0x8e6e, 0x2130, 0x7014, + 0x9600, 0x7016, 0x2600, 0x711c, 0x9102, 0x701e, 0x7004, 0x9600, + 0x2008, 0x9082, 0x000a, 0x1190, 0x7000, 0x2048, 0xa800, 0x9005, + 0x1148, 0x2009, 0x0001, 0x0026, 0x080c, 0x8d5c, 0x002e, 0x7000, + 0x2048, 0xa800, 0x7002, 0x7007, 0x0000, 0x0008, 0x7106, 0x2500, + 0x9212, 0x1904, 0x8d9b, 0x012e, 0x00ee, 0x014e, 0x013e, 0x015e, + 0x009e, 0x0005, 0x0016, 0x0026, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x9580, 0x8f2b, 0x2005, 0x9075, 0x090c, 0x0dc5, 0x080c, 0x8e40, + 0x012e, 0x9580, 0x8f27, 0x2005, 0x9075, 0x090c, 0x0dc5, 0x0156, + 0x0136, 0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e, 0x831e, 0x9384, + 0x003f, 0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098, 0xa860, 0x20e8, + 0xa95c, 0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002, 0x4003, 0x2e0c, + 0x2d00, 0x0002, 0x8e2a, 0x8e2a, 0x8e2c, 0x8e2a, 0x8e2c, 0x8e2a, + 0x8e2a, 0x8e2a, 0x8e2a, 0x8e2a, 0x8e32, 0x8e2a, 0x8e32, 0x8e2a, + 0x8e2a, 0x8e2a, 0x080c, 0x0dc5, 0x4104, 0x20a9, 0x0002, 0x4002, + 0x4003, 0x0028, 0x20a9, 0x0002, 0x4003, 0x4104, 0x4003, 0x01de, + 0x014e, 0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e, 0x001e, 0x0005, + 0x0096, 0x7014, 0x8001, 0x7016, 0x710c, 0x2110, 0x00f1, 0x810c, + 0x9188, 0x0003, 0x7308, 0x8210, 0x9282, 0x000a, 0x1198, 0x7008, + 0x2048, 0xa800, 0x9005, 0x0158, 0x0006, 0x080c, 0x8ef7, 0x009e, + 0xa807, 0x0000, 0x2900, 0x700a, 0x7010, 0x8001, 0x7012, 0x700f, + 0x0000, 0x0008, 0x720e, 0x009e, 0x0005, 0x0006, 0x810b, 0x810b, + 0x2100, 0x810b, 0x9100, 0x2008, 0x000e, 0x0005, 0x0006, 0x0026, + 0x2100, 0x9005, 0x0158, 0x9092, 0x000c, 0x0240, 0x900e, 0x8108, + 0x9082, 0x000c, 0x1de0, 0x002e, 0x000e, 0x0005, 0x900e, 0x0cd8, + 0x2d00, 0x90b8, 0x0008, 0x2031, 0x8eb1, 0x901e, 0x6808, 0x9005, + 0x0108, 0x8318, 0x690c, 0x910a, 0x0248, 0x0140, 0x8318, 0x6810, + 0x9112, 0x0220, 0x0118, 0x8318, 0x2208, 0x0cd0, 0x233a, 0x6804, + 0xd084, 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967, + 0x0a67, 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082, + 0x0002, 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67, + 0x0cd0, 0x6c1a, 0x0005, 0x0096, 0x0046, 0x0126, 0x2091, 0x8000, + 0x2b00, 0x9080, 0x8f2f, 0x2005, 0x9005, 0x090c, 0x0dc5, 0x2004, + 0x90a0, 0x000a, 0x080c, 0x1027, 0x01d0, 0x2900, 0x7026, 0xa803, + 0x0000, 0xa807, 0x0000, 0x080c, 0x1027, 0x0188, 0x7024, 0xa802, + 0xa807, 0x0000, 0x2900, 0x7026, 0x94a2, 0x000a, 0x0110, 0x0208, + 0x0c90, 0x9085, 0x0001, 0x012e, 0x004e, 0x009e, 0x0005, 0x7024, + 0x9005, 0x0dc8, 0x2048, 0xac00, 0x080c, 0x1040, 0x2400, 0x0cc0, + 0x0126, 0x2091, 0x8000, 0x7024, 0x2048, 0x9005, 0x0130, 0xa800, + 0x7026, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x7024, 0xa802, 0x2900, 0x7026, 0x012e, 0x0005, + 0x0096, 0x9e80, 0x0009, 0x2004, 0x9005, 0x0138, 0x2048, 0xa800, + 0x0006, 0x080c, 0x1040, 0x000e, 0x0cb8, 0x009e, 0x0005, 0x0096, + 0x7008, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x1040, + 0x000e, 0x0cb8, 0x9006, 0x7002, 0x700a, 0x7006, 0x700e, 0x701a, + 0x701e, 0x7022, 0x702a, 0x7026, 0x702e, 0x009e, 0x0005, 0x1a67, + 0x0000, 0x0000, 0x0000, 0x1931, 0x0000, 0x0000, 0x0000, 0x1888, + 0x0000, 0x0000, 0x0000, 0x1877, 0x0000, 0x0000, 0x0000, 0x00e6, + 0x00c6, 0x00b6, 0x00a6, 0xa8a8, 0x2040, 0x2071, 0x1877, 0x080c, + 0x9053, 0xa067, 0x0023, 0x6010, 0x905d, 0x0904, 0x9028, 0xb814, + 0xa06e, 0xb910, 0xa172, 0xb9a0, 0xa176, 0x2001, 0x0003, 0xa07e, + 0xa834, 0xa082, 0xa07b, 0x0000, 0xa898, 0x9005, 0x0118, 0xa078, + 0xc085, 0xa07a, 0x2858, 0x2031, 0x0018, 0xa068, 0x908a, 0x0019, + 0x1a0c, 0x0dc5, 0x2020, 0x2050, 0x2940, 0xa864, 0x90bc, 0x00ff, + 0x908c, 0x000f, 0x91e0, 0x20c7, 0x2c65, 0x9786, 0x0024, 0x2c05, + 0x1590, 0x908a, 0x0036, 0x1a0c, 0x0dc5, 0x9082, 0x001b, 0x0002, + 0x8f93, 0x8f93, 0x8f95, 0x8f93, 0x8f93, 0x8f93, 0x8f97, 0x8f93, + 0x8f93, 0x8f93, 0x8f99, 0x8f93, 0x8f93, 0x8f93, 0x8f9b, 0x8f93, + 0x8f93, 0x8f93, 0x8f9d, 0x8f93, 0x8f93, 0x8f93, 0x8f9f, 0x8f93, + 0x8f93, 0x8f93, 0x8fa1, 0x080c, 0x0dc5, 0xa180, 0x04b8, 0xa190, + 0x04a8, 0xa1a0, 0x0498, 0xa1b0, 0x0488, 0xa1c0, 0x0478, 0xa1d0, + 0x0468, 0xa1e0, 0x0458, 0x908a, 0x0034, 0x1a0c, 0x0dc5, 0x9082, + 0x001b, 0x0002, 0x8fc5, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc3, + 0x8fc7, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc9, 0x8fc3, + 0x8fc3, 0x8fc3, 0x8fc3, 0x8fc3, 0x8fcb, 0x8fc3, 0x8fc3, 0x8fc3, + 0x8fc3, 0x8fc3, 0x8fcd, 0x080c, 0x0dc5, 0xa180, 0x0038, 0xa198, + 0x0028, 0xa1b0, 0x0018, 0xa1c8, 0x0008, 0xa1e0, 0x2600, 0x0002, + 0x8fe9, 0x8feb, 0x8fed, 0x8fef, 0x8ff1, 0x8ff3, 0x8ff5, 0x8ff7, + 0x8ff9, 0x8ffb, 0x8ffd, 0x8fff, 0x9001, 0x9003, 0x9005, 0x9007, + 0x9009, 0x900b, 0x900d, 0x900f, 0x9011, 0x9013, 0x9015, 0x9017, + 0x9019, 0x080c, 0x0dc5, 0xb9e2, 0x0468, 0xb9de, 0x0458, 0xb9da, + 0x0448, 0xb9d6, 0x0438, 0xb9d2, 0x0428, 0xb9ce, 0x0418, 0xb9ca, + 0x0408, 0xb9c6, 0x00f8, 0xb9c2, 0x00e8, 0xb9be, 0x00d8, 0xb9ba, + 0x00c8, 0xb9b6, 0x00b8, 0xb9b2, 0x00a8, 0xb9ae, 0x0098, 0xb9aa, + 0x0088, 0xb9a6, 0x0078, 0xb9a2, 0x0068, 0xb99e, 0x0058, 0xb99a, + 0x0048, 0xb996, 0x0038, 0xb992, 0x0028, 0xb98e, 0x0018, 0xb98a, + 0x0008, 0xb986, 0x8631, 0x8421, 0x0130, 0x080c, 0x207f, 0x090c, + 0x0dc5, 0x0804, 0x8f6d, 0x00ae, 0x00be, 0x00ce, 0x00ee, 0x0005, + 0xa86c, 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff, 0x9006, 0x0804, + 0x8f4f, 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058, 0xb810, 0x9005, + 0x01b0, 0x2001, 0x1925, 0x2004, 0x9005, 0x0188, 0x2001, 0x1800, + 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0xbba0, 0x2021, + 0x0004, 0x2011, 0x8014, 0x080c, 0x4c44, 0x004e, 0x003e, 0x00be, + 0x001e, 0x000e, 0x0005, 0x9016, 0x710c, 0xa834, 0x910a, 0xa936, + 0x7008, 0x9005, 0x0120, 0x8210, 0x910a, 0x0230, 0x0128, 0x7010, + 0x8210, 0x910a, 0x0208, 0x1de0, 0xaa8a, 0xa26a, 0x0005, 0x00f6, + 0x00d6, 0x0036, 0x2079, 0x0300, 0x781b, 0x0200, 0x7818, 0xd094, + 0x1dd8, 0x781b, 0x0202, 0xa001, 0xa001, 0x7818, 0xd094, 0x1da0, + 0xb8ac, 0x906d, 0x0198, 0x2079, 0x0000, 0x9c1e, 0x1118, 0x680c, + 0xb8ae, 0x0050, 0x9c06, 0x0130, 0x2d78, 0x680c, 0x906d, 0x1dd0, + 0x080c, 0x0dc5, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, + 0x781b, 0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, + 0x0096, 0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, + 0x01ff, 0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, + 0x1f04, 0x90a3, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, + 0x1d90, 0xb8ac, 0x9065, 0x01f0, 0x600c, 0xb8ae, 0x6024, 0xc08d, + 0x6026, 0x6003, 0x0004, 0x601b, 0x0000, 0x6013, 0x0000, 0x601f, + 0x0101, 0x6014, 0x904d, 0x090c, 0x0dc5, 0xa88b, 0x0000, 0xa8a8, + 0xa8ab, 0x0000, 0x904d, 0x090c, 0x0dc5, 0x080c, 0x1040, 0x080c, + 0x8c61, 0x08f8, 0x2071, 0x0300, 0x701b, 0x0200, 0x015e, 0x012e, + 0x003e, 0x00ce, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x00b6, + 0x0016, 0x0006, 0x0156, 0x080c, 0x2873, 0x015e, 0x11b0, 0x080c, + 0x66b9, 0x190c, 0x0dc5, 0x000e, 0x001e, 0xb912, 0xb816, 0x080c, + 0xb27d, 0x0140, 0x2b00, 0x6012, 0x6023, 0x0001, 0x2009, 0x0001, + 0x080c, 0xb352, 0x00be, 0x00ce, 0x0005, 0x000e, 0x001e, 0x0cd0, + 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0dc5, 0x0013, 0x006e, + 0x0005, 0x9119, 0x9119, 0x9119, 0x911b, 0x916c, 0x9119, 0x9119, + 0x9119, 0x91e6, 0x9119, 0x9223, 0x9119, 0x9119, 0x9119, 0x9119, + 0x9119, 0x080c, 0x0dc5, 0x9182, 0x0040, 0x0002, 0x912e, 0x912e, + 0x912e, 0x912e, 0x912e, 0x912e, 0x912e, 0x912e, 0x912e, 0x9130, + 0x9145, 0x912e, 0x912e, 0x912e, 0x912e, 0x9158, 0x080c, 0x0dc5, + 0x0096, 0x080c, 0x9a61, 0x080c, 0x9bd3, 0x6114, 0x2148, 0xa87b, + 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, + 0x6ca3, 0x080c, 0xb2d3, 0x009e, 0x0005, 0x080c, 0x9a61, 0x00d6, + 0x6114, 0x080c, 0xd0d8, 0x0130, 0x0096, 0x6114, 0x2148, 0x080c, + 0x6e9f, 0x009e, 0x00de, 0x080c, 0xb2d3, 0x080c, 0x9bd3, 0x0005, + 0x080c, 0x9a61, 0x080c, 0x3250, 0x6114, 0x0096, 0x2148, 0x080c, + 0xd0d8, 0x0120, 0xa87b, 0x0029, 0x080c, 0x6e9f, 0x009e, 0x080c, + 0xb2d3, 0x080c, 0x9bd3, 0x0005, 0x601b, 0x0000, 0x9182, 0x0040, + 0x0096, 0x0002, 0x9187, 0x9187, 0x9187, 0x9187, 0x9187, 0x9187, + 0x9187, 0x9187, 0x9189, 0x9187, 0x9187, 0x9187, 0x91e2, 0x9187, + 0x9187, 0x9187, 0x9187, 0x9187, 0x9187, 0x9190, 0x9187, 0x080c, + 0x0dc5, 0x6114, 0x2148, 0xa938, 0x918e, 0xffff, 0x0904, 0x91e2, + 0x6024, 0xd08c, 0x15d8, 0x080c, 0x8d17, 0x05e0, 0x00e6, 0x6114, + 0x2148, 0x080c, 0x8f37, 0x0096, 0xa8a8, 0x2048, 0x080c, 0x6c3b, + 0x009e, 0xa8ab, 0x0000, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, + 0x080c, 0x9067, 0x00be, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, + 0x8c6a, 0x00be, 0x01e0, 0x2071, 0x193d, 0x080c, 0x8cb1, 0x01b8, + 0x9086, 0x0001, 0x1128, 0x2001, 0x1947, 0x2004, 0x9005, 0x1178, + 0x0096, 0x080c, 0x100e, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6, + 0x2c78, 0x080c, 0x8c28, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c, + 0x8c61, 0x0cd0, 0x080c, 0x8d1c, 0x1160, 0x6010, 0x9005, 0x0130, + 0x2058, 0xb8ac, 0x9005, 0x190c, 0x0dc5, 0x6012, 0x2c00, 0x080c, + 0x8ce2, 0x0005, 0x080c, 0x9290, 0x009e, 0x0005, 0x9182, 0x0040, + 0x0096, 0x0002, 0x91fa, 0x91fa, 0x91fa, 0x91fc, 0x91fa, 0x91fa, + 0x91fa, 0x9221, 0x91fa, 0x91fa, 0x91fa, 0x91fa, 0x91fa, 0x91fa, + 0x91fa, 0x91fa, 0x080c, 0x0dc5, 0x6003, 0x0003, 0x6106, 0x6014, + 0x2048, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, 0xa837, 0x0000, 0xa83b, + 0x0000, 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, + 0x8013, 0x8213, 0x9210, 0x621a, 0x2c10, 0x080c, 0x1be0, 0x080c, + 0x9564, 0x0126, 0x2091, 0x8000, 0x080c, 0x9bd3, 0x012e, 0x009e, + 0x0005, 0x080c, 0x0dc5, 0x080c, 0x9a61, 0x080c, 0x9bd3, 0x6114, + 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, + 0x00be, 0x080c, 0x6e9f, 0x080c, 0xb2d3, 0x009e, 0x0005, 0x6000, + 0x908a, 0x0010, 0x1a0c, 0x0dc5, 0x0096, 0x0013, 0x009e, 0x0005, + 0x9250, 0x9250, 0x9250, 0x9252, 0x9263, 0x9250, 0x9250, 0x9250, + 0x9250, 0x9250, 0x9250, 0x9250, 0x9250, 0x9250, 0x9250, 0x9250, + 0x080c, 0x0dc5, 0x080c, 0xac2b, 0x6114, 0x2148, 0xa87b, 0x0006, + 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, 0x00be, 0x080c, 0x6e9f, + 0x080c, 0xb2d3, 0x0005, 0x0461, 0x0005, 0x6000, 0x908a, 0x0010, + 0x1a0c, 0x0dc5, 0x0096, 0x0013, 0x009e, 0x0005, 0x927e, 0x927e, + 0x927e, 0x9280, 0x9290, 0x927e, 0x927e, 0x927e, 0x927e, 0x927e, + 0x927e, 0x927e, 0x927e, 0x927e, 0x927e, 0x927e, 0x080c, 0x0dc5, + 0x0036, 0x00e6, 0x2071, 0x19e8, 0x703c, 0x9c06, 0x1120, 0x2019, + 0x0000, 0x080c, 0xaa49, 0x080c, 0xac2b, 0x00ee, 0x003e, 0x0005, + 0x6024, 0xd08c, 0x11f0, 0x00f6, 0x00e6, 0x601b, 0x0000, 0x6014, + 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, 0x9067, + 0x00be, 0x2071, 0x193d, 0x080c, 0x8cb1, 0x0160, 0x2001, 0x187f, + 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c, 0x8c28, 0x00ee, + 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8, 0x2048, 0x080c, + 0x1040, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x8c61, 0x0c80, 0x2001, + 0x1925, 0x200c, 0x918e, 0x0000, 0x190c, 0x8d17, 0x05c8, 0x00e6, + 0x2071, 0x1924, 0x7110, 0xc1c5, 0x7112, 0x080c, 0x8d21, 0x00f6, + 0x00c6, 0x2071, 0x1000, 0x00b6, 0x2e04, 0x905d, 0x0138, 0xb8ac, + 0x9065, 0x0120, 0x080c, 0x8cf7, 0x090c, 0x9096, 0x8e70, 0x9e86, + 0x1800, 0x1d90, 0x00be, 0x00d6, 0x0096, 0x0046, 0x2061, 0x1cd0, + 0x2001, 0x181a, 0x2024, 0x6020, 0x9086, 0x0000, 0x1191, 0x9ce0, + 0x0018, 0x2400, 0x9c06, 0x1db8, 0x004e, 0x009e, 0x00de, 0x00d1, + 0x00ce, 0x00fe, 0x2071, 0x1924, 0x7110, 0xc1c4, 0x7112, 0x00ee, + 0x0005, 0x6020, 0x9086, 0x0009, 0x1160, 0x6100, 0x9186, 0x0004, + 0x1138, 0x6110, 0x81ff, 0x190c, 0x0dc5, 0x2c00, 0x080c, 0x8ce2, + 0x9006, 0x0005, 0x2071, 0x193f, 0x2073, 0x0000, 0x8e70, 0x9e86, + 0x1947, 0x1dd0, 0x2071, 0x193d, 0x7006, 0x7002, 0x2001, 0x1930, + 0x2064, 0x8cff, 0x0130, 0x6120, 0x918e, 0x0000, 0x190c, 0x0dc5, + 0x2102, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0148, 0x0096, 0x2148, + 0x080c, 0x1040, 0x009e, 0x2001, 0x188a, 0x2003, 0x0000, 0x2071, + 0x1931, 0x080c, 0x8f00, 0x0804, 0x8f0f, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x187a, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0126, 0x2091, 0x8000, + 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, 0x2019, 0x0100, + 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020, 0x80f6, + 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200, 0x1f04, 0x9356, 0x93a6, + 0x0008, 0x1118, 0x8086, 0x818e, 0x0020, 0x80f6, 0x3e00, 0x81f6, + 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, + 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x0510, 0x911a, 0x1600, + 0x8213, 0x2039, 0x0100, 0x273c, 0x97be, 0x0008, 0x1110, 0x818d, + 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a, 0x1220, 0x1f04, 0x9380, + 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x9380, 0x0006, 0x3200, + 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e, 0x012e, 0x0005, + 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126, 0x2091, 0x2800, + 0x2079, 0x19e8, 0x012e, 0x00d6, 0x2069, 0x19e8, 0x6803, 0x0005, + 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069, 0x0200, 0x080c, + 0xaf8e, 0x0401, 0x080c, 0xaf79, 0x00e9, 0x080c, 0xaf7c, 0x00d1, + 0x080c, 0xaf7f, 0x00b9, 0x080c, 0xaf82, 0x00a1, 0x080c, 0xaf85, + 0x0089, 0x080c, 0xaf88, 0x0071, 0x080c, 0xaf8b, 0x0059, 0x01de, + 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04, 0x9085, 0x8001, 0x206a, + 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, + 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804, 0x9084, 0x0007, + 0x0002, 0x93f3, 0x9417, 0x9458, 0x93f9, 0x9417, 0x93f3, 0x93f1, + 0x93f1, 0x080c, 0x0dc5, 0x080c, 0x88c3, 0x080c, 0x9ab1, 0x00ce, + 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005, 0x2011, 0x5f97, + 0x080c, 0x883d, 0x7828, 0x9092, 0x00c8, 0x1228, 0x8000, 0x782a, + 0x080c, 0x5fd7, 0x0c88, 0x62c0, 0x080c, 0xb0ca, 0x080c, 0x5f97, + 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000, 0x0c28, 0x080c, + 0x88c3, 0x6220, 0xd2a4, 0x0170, 0xd2cc, 0x0160, 0x782b, 0x0000, + 0x7824, 0x9065, 0x090c, 0x0dc5, 0x2009, 0x0013, 0x080c, 0xb352, + 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0dc5, 0x7828, + 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c, 0x2bce, + 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c, 0x0dc5, + 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x9ab1, 0x0c00, + 0x080c, 0xa6c5, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c, 0xb0ca, + 0x080c, 0xf094, 0x2009, 0x0014, 0x080c, 0xb352, 0x00ce, 0x0880, + 0x2001, 0x1a04, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160, 0x782b, + 0x0000, 0x7824, 0x9065, 0x090c, 0x0dc5, 0x2009, 0x0013, 0x080c, + 0xb3a4, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824, 0x9005, + 0x090c, 0x0dc5, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000, 0x782a, + 0x00de, 0x00ce, 0x00be, 0x080c, 0x2bce, 0x02f0, 0x00b6, 0x00c6, + 0x00d6, 0x781c, 0x905d, 0x090c, 0x0dc5, 0xb800, 0xc0dc, 0xb802, + 0x7924, 0x2160, 0x080c, 0xb2d3, 0xb93c, 0x81ff, 0x090c, 0x0dc5, + 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de, 0x00ce, + 0x00be, 0x080c, 0x9ab1, 0x0868, 0x080c, 0xa6c5, 0x0850, 0x2011, + 0x0130, 0x2214, 0x080c, 0xb0ca, 0x080c, 0xf094, 0x7824, 0x9065, + 0x2009, 0x0014, 0x080c, 0xb352, 0x00de, 0x00ce, 0x00be, 0x0804, + 0x9469, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c, 0x1eeb, + 0x6024, 0x6027, 0x0002, 0xd0f4, 0x15b8, 0x62c8, 0x60c4, 0x9205, + 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c, 0xb352, + 0x00ce, 0x0005, 0x2011, 0x1a07, 0x2013, 0x0000, 0x0cc8, 0x793c, + 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x1628, 0x8108, 0x7946, + 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138, 0x6014, + 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x793c, 0x9188, + 0x0008, 0x210c, 0x918e, 0x0009, 0x0d90, 0x6014, 0x9084, 0x1984, + 0x9085, 0x0016, 0x6016, 0x08a0, 0x793c, 0x2160, 0x2009, 0x004a, + 0x080c, 0xb352, 0x0868, 0x7848, 0xc085, 0x784a, 0x0848, 0x0006, + 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, + 0x2061, 0x19e8, 0x6020, 0x8000, 0x6022, 0x6010, 0x9005, 0x0148, + 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e, 0x000e, + 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0x19e8, 0xb800, + 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086, 0x0001, 0x1110, + 0x2b00, 0x681e, 0x00de, 0x0804, 0x9ab1, 0x00de, 0x0005, 0xc0d5, + 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b, 0x0000, 0x0086, + 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e, 0x2069, 0x19e8, + 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e, 0x08d8, 0x0006, + 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, + 0x2061, 0x19e8, 0x6020, 0x8000, 0x6022, 0x6008, 0x9005, 0x0148, + 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e, 0x000e, + 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000, 0x2c08, + 0x2061, 0x19e8, 0x6034, 0x9005, 0x0130, 0x9080, 0x0003, 0x2102, + 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce, 0x0005, 0x00f6, + 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056, + 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e8, + 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x95f3, + 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x95ee, 0x87ff, 0x0120, + 0x6054, 0x9106, 0x1904, 0x95ee, 0x703c, 0x9c06, 0x1178, 0x0036, + 0x2019, 0x0001, 0x080c, 0xaa49, 0x7033, 0x0000, 0x9006, 0x703e, + 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001, 0x7038, 0x9c36, + 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, + 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, + 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, + 0x080c, 0xd0d8, 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, + 0x15b8, 0x6004, 0x9086, 0x0040, 0x090c, 0xac1b, 0xa867, 0x0103, + 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xd3ce, + 0x080c, 0xef85, 0x080c, 0x6e9f, 0x007e, 0x003e, 0x001e, 0x080c, + 0xd2c3, 0x080c, 0xb306, 0x00ce, 0x0804, 0x958d, 0x2c78, 0x600c, + 0x2060, 0x0804, 0x958d, 0x85ff, 0x0120, 0x0036, 0x080c, 0x9bd3, + 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e, 0x006e, + 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, + 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076, 0x080c, + 0xef85, 0x080c, 0xebd4, 0x007e, 0x003e, 0x001e, 0x0890, 0x6020, + 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016, 0x0036, 0x0076, + 0x080c, 0x6e9f, 0x080c, 0xb2d3, 0x007e, 0x003e, 0x001e, 0x0818, + 0x6020, 0x9086, 0x000a, 0x0904, 0x95d8, 0x0804, 0x95d1, 0x0006, + 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091, + 0x8000, 0x2079, 0x19e8, 0x7838, 0x9065, 0x0904, 0x9684, 0x600c, + 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, 0x1168, 0x0036, 0x2019, + 0x0001, 0x080c, 0xaa49, 0x7833, 0x0000, 0x901e, 0x7b3e, 0x7b42, + 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xd0d8, 0x0548, 0x6014, 0x2048, + 0x6020, 0x9086, 0x0003, 0x1590, 0x3e08, 0x918e, 0x0002, 0x1188, + 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, + 0x0140, 0x6040, 0x9005, 0x11a8, 0x2001, 0x1988, 0x2004, 0x6042, + 0x0080, 0x6004, 0x9086, 0x0040, 0x090c, 0xac1b, 0xa867, 0x0103, + 0xab7a, 0xa877, 0x0000, 0x080c, 0x6e92, 0x080c, 0xd2c3, 0x080c, + 0xb306, 0x000e, 0x0804, 0x963c, 0x7e3a, 0x7e36, 0x012e, 0x00fe, + 0x00de, 0x00ce, 0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086, + 0x0006, 0x1118, 0x080c, 0xebd4, 0x0c50, 0x6020, 0x9086, 0x0009, + 0x1130, 0xab7a, 0x080c, 0x6e9f, 0x080c, 0xb2d3, 0x0c10, 0x6020, + 0x9086, 0x000a, 0x09a8, 0x0868, 0x0016, 0x0026, 0x0086, 0x9046, + 0x0099, 0x080c, 0x978f, 0x008e, 0x002e, 0x001e, 0x0005, 0x00f6, + 0x0126, 0x2079, 0x19e8, 0x2091, 0x8000, 0x080c, 0x9826, 0x080c, + 0x98b6, 0x012e, 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, + 0x2071, 0x19e8, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9754, + 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x974f, 0x88ff, 0x0120, + 0x6054, 0x9106, 0x1904, 0x974f, 0x7024, 0x9c06, 0x1568, 0x2069, + 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x88c3, + 0x080c, 0xa6e9, 0x68c3, 0x0000, 0x080c, 0xac1b, 0x7027, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, + 0x0009, 0x630a, 0x0804, 0x974f, 0x7014, 0x9c36, 0x1110, 0x660c, + 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, + 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, + 0x080c, 0xd0d8, 0x01e8, 0x6020, 0x9086, 0x0003, 0x1580, 0x080c, + 0xd2e0, 0x1118, 0x080c, 0xbcb6, 0x0098, 0xa867, 0x0103, 0xab7a, + 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, 0xd3ce, 0x080c, + 0xef85, 0x080c, 0x6e9f, 0x008e, 0x003e, 0x001e, 0x080c, 0xd2c3, + 0x080c, 0xb306, 0x080c, 0xaaf1, 0x00ce, 0x0804, 0x96cd, 0x2c78, + 0x600c, 0x2060, 0x0804, 0x96cd, 0x012e, 0x000e, 0x001e, 0x006e, + 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, 0x0005, 0x6020, + 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086, 0x080c, 0xef85, + 0x080c, 0xebd4, 0x008e, 0x003e, 0x001e, 0x08d0, 0x080c, 0xbcb6, + 0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006, 0x9086, 0x0085, + 0x000e, 0x0904, 0x9735, 0x9086, 0x008b, 0x0904, 0x9735, 0x0840, + 0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006, 0x9086, 0x0085, + 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, 0x9748, 0x00b6, + 0x00a6, 0x0096, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x9280, + 0x1000, 0x2004, 0x905d, 0x0904, 0x981f, 0x00f6, 0x00e6, 0x00d6, + 0x0066, 0x2071, 0x19e8, 0xbe54, 0x7018, 0x9b06, 0x1108, 0x761a, + 0x701c, 0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, 0x0008, + 0x761e, 0xb858, 0x904d, 0x0108, 0xae56, 0x96d5, 0x0000, 0x0110, + 0x2900, 0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000, 0xb800, 0xc0d4, + 0xc0dc, 0xb802, 0x080c, 0x664c, 0x0904, 0x981b, 0x7624, 0x86ff, + 0x0904, 0x980a, 0x9680, 0x0005, 0x2004, 0x9906, 0x15d8, 0x00d6, + 0x2069, 0x0100, 0x68c0, 0x9005, 0x0560, 0x080c, 0x88c3, 0x080c, + 0xa6e9, 0x68c3, 0x0000, 0x080c, 0xac1b, 0x7027, 0x0000, 0x0036, + 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, + 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0xb83c, + 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xb306, 0x00ce, + 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, + 0x0804, 0x97c2, 0x89ff, 0x0158, 0xa867, 0x0103, 0xab7a, 0xa877, + 0x0000, 0x080c, 0xd3ce, 0x080c, 0xef85, 0x080c, 0x6e9f, 0x080c, + 0xaaf1, 0x0804, 0x97c2, 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, + 0x000e, 0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005, 0x0096, 0x0006, + 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065, 0x0904, 0x9889, + 0x600c, 0x0006, 0x600f, 0x0000, 0x7824, 0x9c06, 0x1580, 0x2069, + 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x88c3, + 0x080c, 0xa6e9, 0x68c3, 0x0000, 0x080c, 0xac1b, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x080c, + 0x6a3b, 0x1520, 0x6003, 0x0009, 0x630a, 0x2c30, 0x00f8, 0x6014, + 0x2048, 0x080c, 0xd0d6, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, + 0x080c, 0xd2e0, 0x1118, 0x080c, 0xbcb6, 0x0060, 0x080c, 0x6a3b, + 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6e9f, + 0x080c, 0xd2c3, 0x080c, 0xb306, 0x080c, 0xaaf1, 0x000e, 0x0804, + 0x982d, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, + 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xebd4, 0x0c50, + 0x080c, 0xbcb6, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006, + 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, + 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, + 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0066, + 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d, 0x0904, 0x9936, + 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a, 0xb800, 0xc0d4, 0xc0dc, + 0xb802, 0x080c, 0x664c, 0x0904, 0x9933, 0x7e24, 0x86ff, 0x0904, + 0x9926, 0x9680, 0x0005, 0x2004, 0x9906, 0x1904, 0x9926, 0x00d6, + 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x991d, 0x080c, 0x88c3, + 0x080c, 0xa6e9, 0x68c3, 0x0000, 0x080c, 0xac1b, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, + 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc, 0x0150, 0x9680, + 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009, 0x1988, 0x210c, 0x2102, + 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x600f, + 0x0000, 0x080c, 0xb306, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, + 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x98c9, 0x89ff, 0x0138, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6e9f, 0x080c, + 0xaaf1, 0x0804, 0x98c9, 0x000e, 0x0804, 0x98bd, 0x781e, 0x781a, + 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e, 0x000e, 0x0005, 0x00e6, + 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0, 0xb84c, 0x904d, + 0x0188, 0xa878, 0x9606, 0x1170, 0x2071, 0x19e8, 0x7024, 0x9035, + 0x0148, 0x9080, 0x0005, 0x2004, 0x9906, 0x1120, 0xb800, 0xc0dc, + 0xb802, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00f6, + 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6, 0x2660, 0x6003, + 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c, 0xa6e9, 0x78c3, 0x0000, + 0x080c, 0xac1b, 0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, + 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d39, 0x9006, + 0x080c, 0x2d39, 0x2079, 0x0100, 0x7824, 0xd084, 0x0110, 0x7827, + 0x0001, 0x080c, 0xac1b, 0x003e, 0x080c, 0x664c, 0x00c6, 0xb83c, + 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0xb2d3, 0x00ce, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd3ce, 0x080c, + 0x6e9f, 0x080c, 0xaaf1, 0x00fe, 0x0005, 0x00b6, 0x00e6, 0x00c6, + 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001, 0x180c, 0x2014, + 0xc2e4, 0x2202, 0x2071, 0x19e8, 0x7004, 0x9084, 0x0007, 0x0002, + 0x99c2, 0x99c6, 0x99e4, 0x9a0d, 0x9a4b, 0x99c2, 0x99dd, 0x99c0, + 0x080c, 0x0dc5, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, + 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0x9015, 0x0158, 0x7216, + 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, + 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8, 0x7007, 0x0000, 0x7027, + 0x0000, 0x7020, 0x9005, 0x0070, 0x6010, 0x2058, 0x080c, 0x664c, + 0xb800, 0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027, 0x0000, 0x7020, + 0x8001, 0x7022, 0x1148, 0x2001, 0x180c, 0x2014, 0xd2ec, 0x1180, + 0x00ce, 0x00ee, 0x00be, 0x0005, 0xb854, 0x9015, 0x0120, 0x721e, + 0x080c, 0x9ab1, 0x0ca8, 0x7218, 0x721e, 0x080c, 0x9ab1, 0x0c80, + 0xc2ec, 0x2202, 0x080c, 0x9bd3, 0x0c58, 0x7024, 0x9065, 0x05b8, + 0x700c, 0x9c06, 0x1160, 0x080c, 0xaaf1, 0x600c, 0x9015, 0x0120, + 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a, 0x0430, 0x7014, + 0x9c06, 0x1160, 0x080c, 0xaaf1, 0x600c, 0x9015, 0x0120, 0x7216, + 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8, 0x6020, 0x9086, + 0x0003, 0x1198, 0x6010, 0x2058, 0x080c, 0x664c, 0xb800, 0xc0dc, + 0xb802, 0x080c, 0xaaf1, 0x701c, 0x9065, 0x0138, 0xb854, 0x9015, + 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027, 0x0000, 0x00ce, + 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0140, 0x080c, 0xaaf1, + 0x600c, 0x9015, 0x0158, 0x720e, 0x600f, 0x0000, 0x080c, 0xac1b, + 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x720e, 0x720a, + 0x0ca8, 0x00d6, 0x2069, 0x19e8, 0x6830, 0x9084, 0x0003, 0x0002, + 0x9a6e, 0x9a70, 0x9a94, 0x9a6c, 0x080c, 0x0dc5, 0x00de, 0x0005, + 0x00c6, 0x6840, 0x9086, 0x0001, 0x01b8, 0x683c, 0x9065, 0x0130, + 0x600c, 0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, + 0x683f, 0x0000, 0x2011, 0x1a07, 0x2013, 0x0000, 0x00ce, 0x00de, + 0x0005, 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000, 0x6838, 0x9065, + 0x0d68, 0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006, 0x6842, 0x6846, + 0x684a, 0x683c, 0x9065, 0x0160, 0x600c, 0x9015, 0x0130, 0x6a3a, + 0x600f, 0x0000, 0x683f, 0x0000, 0x0018, 0x683e, 0x683a, 0x6836, + 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1e5, 0x2102, + 0x0005, 0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120, 0xc1ec, 0x2102, + 0x080c, 0x9bd3, 0x2001, 0x19f4, 0x2004, 0x9086, 0x0001, 0x0d58, + 0x00d6, 0x2069, 0x19e8, 0x6804, 0x9084, 0x0007, 0x0006, 0x9005, + 0x11c8, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1198, 0x2001, + 0x197c, 0x2004, 0x9086, 0xaaaa, 0x0168, 0x2001, 0x188b, 0x2004, + 0xd08c, 0x1118, 0xd084, 0x1118, 0x0028, 0x080c, 0x9bd3, 0x000e, + 0x00de, 0x0005, 0x000e, 0x0002, 0x9aee, 0x9ba7, 0x9ba7, 0x9ba7, + 0x9ba7, 0x9ba9, 0x9ba7, 0x9aec, 0x080c, 0x0dc5, 0x6820, 0x9005, + 0x1110, 0x00de, 0x0005, 0x00c6, 0x680c, 0x9065, 0x01f0, 0x6104, + 0x918e, 0x0040, 0x1180, 0x2009, 0x1837, 0x210c, 0x918c, 0x0028, + 0x1150, 0x080c, 0x7637, 0x0138, 0x0006, 0x2009, 0x188b, 0x2104, + 0xc095, 0x200a, 0x000e, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, + 0x080c, 0x9c7c, 0x00ce, 0x00de, 0x0005, 0x6814, 0x9065, 0x0150, + 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, 0x9c7c, 0x00ce, + 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000, 0x0904, + 0x9b91, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005, 0x01a0, 0xb854, + 0x905d, 0x0120, 0x920e, 0x0904, 0x9b91, 0x0028, 0x6818, 0x920e, + 0x0904, 0x9b91, 0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888, 0x9005, + 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40, 0x080c, + 0xb2aa, 0x0904, 0x9b91, 0x8318, 0xbb3e, 0x6116, 0x2b10, 0x6212, + 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e, 0xa883, 0x0000, + 0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, + 0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096, 0x2148, 0xa964, + 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6, 0x2c78, + 0x2061, 0x0100, 0xbac0, 0x629a, 0x2069, 0x0200, 0x2071, 0x0240, + 0x080c, 0xa219, 0x2069, 0x19e8, 0xbb00, 0xc3dd, 0xbb02, 0x6807, + 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823, 0x0003, 0x7803, + 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce, 0x00de, + 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0x6807, 0x0006, 0x2c18, + 0x6b26, 0x6820, 0x8001, 0x6822, 0x682b, 0x0000, 0x080c, 0x664c, + 0x080c, 0xb0ea, 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de, + 0x0005, 0x00c6, 0x680c, 0x9065, 0x01d8, 0x6104, 0x918e, 0x0040, + 0x1180, 0x2009, 0x1837, 0x210c, 0x918c, 0x0028, 0x1150, 0x080c, + 0x7637, 0x0138, 0x0006, 0x2009, 0x188b, 0x2104, 0xc095, 0x200a, + 0x000e, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x080c, 0x9c7c, + 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x2014, 0xc2ed, 0x2202, + 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069, 0x19e8, 0x6830, + 0x9086, 0x0000, 0x1570, 0x2001, 0x180c, 0x2014, 0xd2e4, 0x0130, + 0xc2e4, 0x2202, 0x080c, 0x9ac0, 0x2069, 0x19e8, 0x2001, 0x180c, + 0x200c, 0xd1c4, 0x1508, 0x6838, 0x907d, 0x01d8, 0x6a04, 0x9296, + 0x0000, 0x1904, 0x9c70, 0x7920, 0x918e, 0x0009, 0x0568, 0x6833, + 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, + 0x2091, 0x2400, 0x002e, 0x080c, 0x1c79, 0x1158, 0x012e, 0x080c, + 0xa546, 0x00de, 0x00fe, 0x0005, 0xc1c4, 0x2102, 0x080c, 0x76e4, + 0x08d0, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002, 0x780c, 0x9015, + 0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, + 0x0c40, 0x683a, 0x6836, 0x0cc0, 0x7908, 0xd1fc, 0x1198, 0x6833, + 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, + 0x2091, 0x2400, 0x002e, 0x080c, 0x1c79, 0x19d8, 0x012e, 0x080c, + 0xa4c7, 0x0878, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1188, + 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, 0x0158, 0x2001, 0x19e9, + 0x2004, 0x9005, 0x11f0, 0x2001, 0x188b, 0x200c, 0xc185, 0xc18c, + 0x2102, 0x2f00, 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, + 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x1c79, + 0x1904, 0x9c11, 0x012e, 0x6a3c, 0x2278, 0x080c, 0xa451, 0x0804, + 0x9c09, 0x2011, 0x188b, 0x2204, 0xc08d, 0x2012, 0x0804, 0x9c09, + 0x6a04, 0x9296, 0x0006, 0x1904, 0x9bcb, 0x6a30, 0x9296, 0x0000, + 0x0904, 0x9bf3, 0x0804, 0x9bcb, 0x6020, 0x9084, 0x000f, 0x000b, + 0x0005, 0x9c90, 0x9c95, 0xa149, 0xa1e2, 0x9c95, 0xa149, 0xa1e2, + 0x9c90, 0x9c95, 0x9c90, 0x9c90, 0x9c90, 0x9c90, 0x9c90, 0x9c90, + 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x0005, 0x00b6, 0x0156, 0x0136, + 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, + 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dc5, + 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, + 0x0040, 0x1a04, 0x9d01, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x9eaa, + 0x9ee5, 0x9f0e, 0x9fd8, 0x9ffa, 0xa000, 0xa00d, 0xa015, 0xa021, + 0xa027, 0xa038, 0xa027, 0xa090, 0xa015, 0xa09c, 0xa0a2, 0xa021, + 0xa0a2, 0xa0ae, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, + 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0x9cff, 0xa900, 0xa923, 0xa934, + 0xa954, 0xa986, 0xa00d, 0x9cff, 0xa00d, 0xa027, 0x9cff, 0x9f0e, + 0x9fd8, 0x9cff, 0xad12, 0xa027, 0x9cff, 0xad2e, 0xa027, 0x9cff, + 0xa021, 0x9ea4, 0x9d22, 0x9cff, 0xad4a, 0xadb7, 0xae92, 0x9cff, + 0xae9f, 0xa00a, 0xaeca, 0x9cff, 0xa990, 0xaef7, 0x9cff, 0x080c, + 0x0dc5, 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, + 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0xaf92, 0xb044, + 0x9d20, 0x9d5a, 0x9e06, 0x9e11, 0x9d20, 0xa00d, 0x9d20, 0x9e6b, + 0x9e77, 0x9d75, 0x9d20, 0x9d90, 0x9dc4, 0xb1b1, 0xb1f6, 0xa027, + 0x080c, 0x0dc5, 0x00d6, 0x0096, 0x080c, 0xa0c1, 0x0026, 0x0036, + 0x7814, 0x2048, 0xa958, 0xd1cc, 0x1138, 0x2009, 0x2414, 0x2011, + 0x0018, 0x2019, 0x0018, 0x0030, 0x2009, 0x2410, 0x2011, 0x0014, + 0x2019, 0x0014, 0x7102, 0x7206, 0x700b, 0x0800, 0xa83c, 0x700e, + 0xa850, 0x7022, 0xa854, 0x7026, 0x63c2, 0x080c, 0xa6bd, 0x003e, + 0x002e, 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, + 0x00be, 0x080c, 0xb23d, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, + 0x0001, 0x0005, 0x00d6, 0x0096, 0x080c, 0xa0c1, 0x7003, 0x0500, + 0x7814, 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, + 0xa880, 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, + 0x080c, 0xa6bd, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, + 0xa0c1, 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, + 0x700e, 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, + 0x701e, 0x60c3, 0x0010, 0x080c, 0xa6bd, 0x009e, 0x00de, 0x0005, + 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0xa0c1, 0x20e9, + 0x0000, 0x2001, 0x19a4, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, + 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x001b, 0x2098, 0x2001, 0x19a4, 0x0016, 0x200c, 0x2001, 0x0001, + 0x080c, 0x23ee, 0x080c, 0xde7c, 0x9006, 0x080c, 0x23ee, 0x001e, + 0xa804, 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0xa6bd, + 0x012e, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, + 0x8000, 0x080c, 0xa10c, 0x20e9, 0x0000, 0x2001, 0x19a4, 0x2003, + 0x0000, 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, + 0x8003, 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x001b, 0x2098, 0x2001, 0x19a4, 0x0016, 0x200c, 0x080c, 0xde7c, + 0x001e, 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, + 0x2048, 0x080c, 0x0fc0, 0x080c, 0xa6bd, 0x012e, 0x009e, 0x00de, + 0x0005, 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, + 0x0004, 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0xa0c1, + 0x7003, 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, + 0xa6bd, 0x00d6, 0x00e6, 0x080c, 0xa10c, 0x7814, 0x9084, 0xff00, + 0x2073, 0x0200, 0x8e70, 0x8e70, 0x9096, 0xdf00, 0x0138, 0x9096, + 0xe000, 0x0120, 0x2073, 0x0010, 0x8e70, 0x0030, 0x9095, 0x0010, + 0x2272, 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, + 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9e31, 0x2069, 0x1801, + 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9e3a, 0x9096, + 0xdf00, 0x0130, 0x9096, 0xe000, 0x0118, 0x60c3, 0x0018, 0x00f0, + 0x2069, 0x19b4, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19ce, 0x20a9, + 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, + 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, + 0x8d68, 0x8e70, 0x1f04, 0x9e51, 0x60c3, 0x004c, 0x080c, 0xa6bd, + 0x00ee, 0x00de, 0x0005, 0x080c, 0xa0c1, 0x7003, 0x6300, 0x7007, + 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa6bd, 0x00d6, + 0x0026, 0x0016, 0x080c, 0xa10c, 0x7003, 0x0200, 0x7814, 0x700e, + 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2069, + 0x1924, 0x6810, 0xd084, 0x1148, 0x2073, 0x0500, 0x8e70, 0x2073, + 0x0000, 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073, 0x0800, 0x8e70, + 0x2073, 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0xa6bd, + 0x001e, 0x002e, 0x00de, 0x0005, 0x2001, 0x1818, 0x2004, 0x609a, + 0x0804, 0xa6bd, 0x080c, 0xa0c1, 0x7003, 0x5200, 0x2069, 0x1847, + 0x6804, 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x28a6, 0x710e, + 0x001e, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, + 0x0000, 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, + 0x20a1, 0x0254, 0x4003, 0x080c, 0xb23d, 0x1120, 0xb8a0, 0x9082, + 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, 0x7032, 0x2001, 0x1820, + 0x2004, 0x7036, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, + 0x7036, 0x60c3, 0x001c, 0x0804, 0xa6bd, 0x080c, 0xa0c1, 0x7003, + 0x0500, 0x080c, 0xb23d, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, + 0x2001, 0x181f, 0x2004, 0x700a, 0x2001, 0x1820, 0x2004, 0x700e, + 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, + 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, + 0x0250, 0x4003, 0x60c3, 0x0010, 0x0804, 0xa6bd, 0x080c, 0xa0c1, + 0x9006, 0x080c, 0x6a6d, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2011, + 0x0240, 0x2013, 0x22ff, 0x2011, 0x0241, 0x2013, 0xfffe, 0x7003, + 0x0400, 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, + 0x0120, 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, + 0xb8a0, 0x9086, 0x007e, 0x1904, 0x9f98, 0x00d6, 0x2069, 0x196c, + 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808, + 0x9084, 0x2000, 0x7012, 0x080c, 0xb254, 0x680c, 0x7016, 0x701f, + 0x2710, 0x6818, 0x7022, 0x681c, 0x7026, 0x0428, 0x6800, 0x700a, + 0x6804, 0x700e, 0x2009, 0x180d, 0x210c, 0xd18c, 0x0110, 0x2001, + 0x0002, 0x00f6, 0x2079, 0x0100, 0x080c, 0x7637, 0x1128, 0x78e3, + 0x0000, 0x080c, 0x28e7, 0x78e2, 0x00fe, 0x6808, 0x080c, 0x7637, + 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, + 0xb254, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, + 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, + 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, + 0xaf79, 0x2069, 0x1974, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, + 0x080c, 0x57d9, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04e0, + 0x2001, 0x1837, 0x2004, 0xd0a4, 0x01a8, 0x0016, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x2009, 0x0002, 0x1118, 0x2001, 0x196d, 0x200c, + 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x28e7, + 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, 0x196c, 0x20e9, 0x0000, + 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, + 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, + 0x20a1, 0x025a, 0x4003, 0x080c, 0xaf79, 0x20a1, 0x024e, 0x20a9, + 0x0008, 0x2099, 0x1974, 0x4003, 0x60c3, 0x0074, 0x0804, 0xa6bd, + 0x080c, 0xa0c1, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, + 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, + 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, + 0x9085, 0x0002, 0x00d6, 0x0804, 0xa071, 0x7026, 0x60c3, 0x0014, + 0x0804, 0xa6bd, 0x080c, 0xa0c1, 0x7003, 0x5000, 0x0804, 0x9f30, + 0x080c, 0xa0c1, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, + 0x0804, 0xa6bd, 0x080c, 0xa103, 0x0010, 0x080c, 0xa10c, 0x7003, + 0x0200, 0x60c3, 0x0004, 0x0804, 0xa6bd, 0x080c, 0xa10c, 0x7003, + 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, + 0xa6bd, 0x080c, 0xa10c, 0x7003, 0x0200, 0x0804, 0x9f30, 0x080c, + 0xa10c, 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, + 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa6bd, + 0x00d6, 0x080c, 0xa10c, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, + 0x0800, 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, + 0x0190, 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, + 0x2100, 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, + 0x700f, 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847, + 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, + 0x9085, 0x0010, 0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085, + 0x0002, 0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5, + 0xbacc, 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, + 0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, + 0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0xa6bd, + 0x080c, 0xa10c, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, + 0x60c3, 0x0014, 0x0804, 0xa6bd, 0x080c, 0xa10c, 0x7003, 0x0200, + 0x0804, 0x9eae, 0x080c, 0xa10c, 0x7003, 0x0100, 0x700b, 0x0003, + 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa6bd, 0x080c, 0xa10c, + 0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0xa6bd, + 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, + 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, + 0x0100, 0x080c, 0xaf8e, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, + 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029, + 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0xa6ab, 0x721a, 0x9f95, + 0x0000, 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, + 0x0026, 0x080c, 0xaf8e, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, + 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013, + 0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, + 0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, + 0x3300, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, + 0x2019, 0x2300, 0x2021, 0x0100, 0x080c, 0xaf8e, 0xb810, 0x9305, + 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, + 0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, + 0x687c, 0x700a, 0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, + 0x004e, 0x003e, 0x00de, 0x080c, 0xa6ab, 0x721a, 0x7a08, 0x7222, + 0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0xa6ab, + 0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, + 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, + 0x2071, 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dc5, 0x908a, + 0x0092, 0x1a0c, 0x0dc5, 0x6110, 0x2158, 0xb9c0, 0x2c78, 0x2061, + 0x0100, 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, + 0x00ce, 0x00be, 0x0005, 0xa17a, 0xa189, 0xa194, 0xa178, 0xa178, + 0xa178, 0xa17a, 0xa178, 0xa178, 0xa178, 0xa178, 0xa178, 0xa178, + 0x080c, 0x0dc5, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2bce, + 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, + 0xa6bd, 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, + 0x60c3, 0x000c, 0x0804, 0xa6bd, 0x04a1, 0x7003, 0x0003, 0x7007, + 0x0300, 0x60c3, 0x0004, 0x0804, 0xa6bd, 0x0026, 0x080c, 0xaf8e, + 0xb810, 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, + 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0xa0dc, + 0x0026, 0x080c, 0xaf8e, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, + 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, + 0x0099, 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, + 0xa13e, 0x0026, 0x080c, 0xaf8e, 0xb810, 0x9085, 0x8500, 0x7002, + 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, + 0x2001, 0x0099, 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, + 0x0804, 0xa13e, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, + 0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, + 0x0dc5, 0x908a, 0x0054, 0x1a0c, 0x0dc5, 0x7910, 0x2158, 0xb9c0, + 0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x00be, 0x0005, 0xa219, 0xa2e0, 0xa2b3, 0xa402, + 0xa217, 0xa217, 0xa217, 0xa217, 0xa217, 0xa217, 0xa217, 0xaad8, + 0xaadd, 0xaae2, 0xaae7, 0xa217, 0xaed6, 0xa217, 0xaad3, 0x080c, + 0x0dc5, 0x0096, 0x780b, 0xffff, 0x080c, 0xa284, 0x7914, 0x2148, + 0xa978, 0x7956, 0xae64, 0x96b4, 0x00ff, 0x9686, 0x0008, 0x1148, + 0xa8b4, 0x7032, 0xa8b8, 0x7036, 0xa8bc, 0x703a, 0xa8c0, 0x703e, + 0x0008, 0x7132, 0xa97c, 0x9184, 0x000f, 0x1118, 0x2001, 0x0005, + 0x0040, 0xd184, 0x0118, 0x2001, 0x0004, 0x0018, 0x9084, 0x0006, + 0x8004, 0x2010, 0x785c, 0x9084, 0x00ff, 0x8007, 0x9205, 0x7042, + 0xd1ac, 0x0158, 0x7047, 0x0002, 0x9686, 0x0008, 0x1118, 0x080c, + 0x18f7, 0x0010, 0x080c, 0x1768, 0x0050, 0xd1b4, 0x0118, 0x7047, + 0x0001, 0x0028, 0x7047, 0x0000, 0x9016, 0x2230, 0x0010, 0xaab0, + 0xaeac, 0x726a, 0x766e, 0x20a9, 0x0008, 0x20e9, 0x0000, 0xa860, + 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x20a1, 0x0252, 0x2069, + 0x0200, 0x6813, 0x0018, 0x4003, 0x6813, 0x0008, 0x60c3, 0x0020, + 0x6017, 0x0009, 0x2001, 0x1a04, 0x2003, 0x07d0, 0x2001, 0x1a03, + 0x2003, 0x0009, 0x009e, 0x0005, 0x6813, 0x0008, 0xba8c, 0x8210, + 0xb8cc, 0xd084, 0x0180, 0x2001, 0x1ad0, 0x200c, 0x8108, 0x2102, + 0x2001, 0x1acf, 0x201c, 0x1218, 0x8318, 0x2302, 0x0ea0, 0x794a, + 0x712e, 0x7b46, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, 0x721a, + 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, 0x1800, + 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0829, 0x2f10, 0x7222, + 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081, 0x7814, 0x2048, + 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a, 0xa8ac, 0x700e, + 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0xa6bd, 0x6813, 0x0008, + 0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, + 0x687c, 0x700a, 0x6880, 0x700e, 0x7013, 0x0889, 0x080c, 0xa6ab, + 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x0005, + 0x00d6, 0x0096, 0x080c, 0xa3e0, 0x7814, 0x2048, 0x080c, 0xd0d6, + 0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033, 0x0010, 0x9006, + 0x001b, 0x009e, 0x00de, 0x0005, 0xa2fe, 0xa367, 0xa377, 0xa39d, + 0xa3a9, 0xa3ba, 0xa3c2, 0xa2fc, 0x080c, 0x0dc5, 0x0016, 0x0036, + 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003, 0x1198, 0xaba8, + 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e, + 0x003e, 0x001e, 0x2001, 0x19b2, 0x2004, 0x60c2, 0x0804, 0xa6bd, + 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0dc5, 0xaba8, 0x7824, + 0xd0cc, 0x1904, 0xa364, 0x7316, 0xa898, 0x701a, 0xa894, 0x701e, + 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018, 0x9384, 0x0300, + 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc, 0x0110, 0xa8a4, + 0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011, 0x0258, 0x20e9, + 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860, 0x20e0, 0xa85c, + 0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000, 0x6812, 0x2011, + 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810, 0xc0a4, 0x6812, + 0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245, 0x201a, 0x61c2, + 0x003e, 0x001e, 0x0804, 0xa6bd, 0xc3e5, 0x0804, 0xa323, 0x2011, + 0x0008, 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0110, 0x2011, 0x0028, + 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8, 0xc2e5, 0x2011, + 0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e, 0x9105, 0x0108, + 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, 0x7027, + 0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047, 0x0500, 0x704f, + 0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071, 0x0240, 0x700b, + 0x2500, 0x60c3, 0x0032, 0x0804, 0xa6bd, 0x2011, 0x0028, 0x7824, + 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804, 0xa6bd, 0x0cd0, + 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, + 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x0020, + 0x0804, 0xa6bd, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0108, 0xc2e5, + 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00, 0x7816, 0x9384, + 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, + 0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006, 0x7824, 0xd0cc, + 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e, 0x003e, 0x0818, + 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700, 0x7002, 0xb814, + 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x7824, + 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0xa6ab, 0x721a, 0x7a08, + 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x7013, + 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007, 0x0013, + 0x001e, 0x0005, 0xa412, 0xa412, 0xa414, 0xa412, 0xa412, 0xa412, + 0xa42e, 0xa412, 0x080c, 0x0dc5, 0x7914, 0x918c, 0x08ff, 0x918d, + 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1847, 0x6804, + 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, + 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0xa6bd, 0x2009, 0x0003, + 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0xaf8e, 0x001e, + 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, + 0x6a7c, 0x720a, 0x6a80, 0x720e, 0x7013, 0x0888, 0x918d, 0x0008, + 0x7116, 0x080c, 0xa6ab, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, + 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, + 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, + 0x76dc, 0x96b4, 0x0028, 0x0110, 0x737c, 0x7480, 0x2500, 0x76dc, + 0x96b4, 0x0028, 0x0140, 0x2001, 0x04ff, 0x6062, 0x6067, 0xffff, + 0x636a, 0x646e, 0x0050, 0x2001, 0x00ff, 0x9085, 0x0400, 0x6062, + 0x6067, 0xffff, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6073, 0x0530, + 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, + 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, + 0xffff, 0x7814, 0x0096, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, + 0xa848, 0x60c6, 0xa844, 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, + 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x2001, 0x1837, 0x2004, + 0x9084, 0x0028, 0x0128, 0x609f, 0x0000, 0x2001, 0x0092, 0x0048, + 0x6028, 0xc0bd, 0x602a, 0x609f, 0x00ff, 0x6027, 0xffff, 0x2001, + 0x00b2, 0x6016, 0x2009, 0x07d0, 0x080c, 0x88c8, 0x003e, 0x004e, + 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, + 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061, + 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0xb8a0, 0x2028, + 0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e, 0x1250, 0x2500, 0x9094, + 0xff80, 0x1130, 0x9080, 0x33b6, 0x2015, 0x9294, 0x00ff, 0x0020, + 0xb910, 0xba14, 0x737c, 0x7480, 0x70dc, 0xd0ac, 0x1130, 0x9582, + 0x007e, 0x1218, 0x9584, 0xff80, 0x0138, 0x9185, 0x0400, 0x6062, + 0x6266, 0x636a, 0x646e, 0x0030, 0x6063, 0x0400, 0x6266, 0x606b, + 0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077, 0x0000, 0xb864, 0xd0a4, + 0x0110, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, + 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, 0x2b00, 0x6082, + 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa838, 0x608a, 0xa834, + 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, 0x009e, 0xb86c, 0x60ce, + 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, + 0x00f6, 0x2079, 0x0140, 0x7803, 0x0000, 0x00fe, 0x2009, 0x0092, + 0x6116, 0x2009, 0x07d0, 0x080c, 0x88c8, 0x003e, 0x004e, 0x005e, + 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, 0x00b6, 0x0096, + 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, + 0x2071, 0x1800, 0x7810, 0x2058, 0xb8a0, 0x2028, 0xb910, 0xba14, + 0x737c, 0x7480, 0x7820, 0x90be, 0x0006, 0x0904, 0xa61a, 0x90be, + 0x000a, 0x1904, 0xa5d6, 0xb8c0, 0x609e, 0x7814, 0x2048, 0xa87c, + 0xd0fc, 0x0558, 0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f, + 0x9784, 0xff00, 0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, + 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, + 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, + 0x6062, 0x6073, 0x0129, 0x6077, 0x0000, 0xb8c0, 0x609e, 0x0050, + 0x2039, 0x0029, 0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, + 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, + 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077, + 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, + 0x607f, 0x0000, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, + 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0x080c, 0xaf73, 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, + 0x0110, 0x2009, 0x1b58, 0x080c, 0x88c8, 0x003e, 0x004e, 0x005e, + 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, 0x7804, 0x9086, + 0x0040, 0x0904, 0xa656, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, + 0x646e, 0x6073, 0x0809, 0x6077, 0x0008, 0x60af, 0x95d5, 0x60d7, + 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, 0x7814, 0x2048, + 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, + 0xb86c, 0x60ce, 0xbac0, 0x629e, 0x080c, 0xaf73, 0x2009, 0x07d0, + 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, + 0x88c8, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, + 0x00be, 0x0005, 0x7814, 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, + 0x0002, 0x0904, 0xa672, 0x9185, 0x0100, 0x6062, 0x6266, 0x636a, + 0x646e, 0x6073, 0x0880, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, + 0x00ff, 0xb88e, 0x8007, 0x607a, 0x7838, 0x607e, 0x2f00, 0x6086, + 0x7808, 0x6082, 0xa890, 0x608a, 0xa88c, 0x608e, 0xa8b0, 0x60c6, + 0xa8ac, 0x60ca, 0xa8ac, 0x7930, 0x9108, 0x7932, 0xa8b0, 0x792c, + 0x9109, 0x792e, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xbac0, 0x629e, 0x080c, 0xaf50, 0x0804, 0xa606, 0xb8cc, 0xd084, + 0x0148, 0xb88c, 0x7814, 0x2048, 0xb88c, 0x784a, 0xa836, 0x2900, + 0xa83a, 0xb046, 0x9185, 0x0600, 0x6062, 0x6266, 0x636a, 0x646e, + 0x6073, 0x0829, 0x6077, 0x0000, 0x60af, 0x9575, 0x60d7, 0x0000, + 0x0804, 0xa5e9, 0x9185, 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, + 0x7824, 0xd0cc, 0x7826, 0x0118, 0x6073, 0x0889, 0x0010, 0x6073, + 0x0898, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, + 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, + 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, 0xa844, 0x60ca, + 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xbac0, 0x629e, + 0x7824, 0xd0cc, 0x0120, 0x080c, 0xaf73, 0x0804, 0xa606, 0x080c, + 0xaf50, 0x0804, 0xa606, 0x7a10, 0x00b6, 0x2258, 0xba8c, 0x8210, + 0x9294, 0x00ff, 0xba8e, 0x00be, 0x8217, 0x0005, 0x00d6, 0x2069, + 0x19e8, 0x6843, 0x0001, 0x00de, 0x0005, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x00f1, 0x080c, 0x88ba, 0x0005, 0x0016, 0x2001, 0x180c, + 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128, 0x0089, 0x080c, + 0x88ba, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c, 0x2102, 0x2001, + 0x19e9, 0x2003, 0x0000, 0x2001, 0x19f1, 0x2003, 0x0000, 0x0c88, + 0x0006, 0x6014, 0x9084, 0x1804, 0x9085, 0x0009, 0x6016, 0x000e, + 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, 0x0100, 0x61a4, 0x60a7, + 0x95f5, 0x6014, 0x9084, 0x1804, 0x9085, 0x0008, 0x6016, 0x000e, + 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, 0x00c6, + 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, + 0x7637, 0x11c0, 0x2001, 0x1a04, 0x2004, 0x9005, 0x15d0, 0x080c, + 0x76e4, 0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, + 0xd084, 0x090c, 0x0dc5, 0x080c, 0x88ba, 0x0458, 0x00c6, 0x2061, + 0x19e8, 0x00c8, 0x6904, 0x9194, 0x4000, 0x0540, 0x0811, 0x080c, + 0x2d49, 0x00c6, 0x2061, 0x19e8, 0x6128, 0x9192, 0x0008, 0x1258, + 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x88ba, + 0x080c, 0xa6e0, 0x0070, 0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, + 0xf094, 0x080c, 0x88c3, 0x2009, 0x0014, 0x080c, 0xb352, 0x00ce, + 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x1a04, + 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19e8, 0x6128, 0x9192, + 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x88ba, 0x080c, + 0x5fed, 0x2009, 0x1846, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, + 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x88d0, 0x2071, + 0x19e8, 0x713c, 0x81ff, 0x0904, 0xa7e9, 0x2061, 0x0100, 0x2069, + 0x0140, 0x080c, 0x7637, 0x11e0, 0x0036, 0x2019, 0x0002, 0x080c, + 0xaa49, 0x003e, 0x713c, 0x2160, 0x080c, 0xf094, 0x2009, 0x004a, + 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, + 0x2009, 0x004a, 0x080c, 0xb352, 0x080c, 0x76e4, 0x0804, 0xa7e9, + 0x080c, 0xa7f5, 0x0904, 0xa7e9, 0x6904, 0xd1f4, 0x0904, 0xa7f0, + 0x080c, 0x2d49, 0x00c6, 0x703c, 0x9065, 0x090c, 0x0dc5, 0x6020, + 0x00ce, 0x9086, 0x0006, 0x1528, 0x61c8, 0x60c4, 0x9105, 0x1508, + 0x2009, 0x180c, 0x2104, 0xd0d4, 0x01e0, 0x6214, 0x9294, 0x1800, + 0x1128, 0x6224, 0x9294, 0x0002, 0x1560, 0x0030, 0xc0d4, 0x200a, + 0xd0cc, 0x0110, 0x080c, 0x2c7b, 0x6014, 0x9084, 0xe7fd, 0x9085, + 0x0010, 0x6016, 0x703c, 0x2060, 0x2009, 0x0049, 0x080c, 0xb352, + 0x00c0, 0x0036, 0x2019, 0x0001, 0x080c, 0xaa49, 0x003e, 0x713c, + 0x2160, 0x080c, 0xf094, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009, + 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x080c, + 0xb352, 0x002e, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005, + 0xd1ec, 0x1904, 0xa7a0, 0x0804, 0xa7a2, 0x00d6, 0x00c6, 0x0096, + 0x703c, 0x9065, 0x090c, 0x0dc5, 0x2001, 0x0306, 0x200c, 0x9184, + 0x0030, 0x0904, 0xa8a8, 0x9184, 0x0048, 0x9086, 0x0008, 0x1904, + 0xa8a8, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, + 0x1904, 0xa8a8, 0x2009, 0x022a, 0x2104, 0x2009, 0x022f, 0x210c, + 0x9116, 0x9084, 0x03ff, 0x918c, 0x03ff, 0x9294, 0x0400, 0x0110, + 0x9102, 0x0030, 0x2010, 0x2100, 0x9202, 0x2009, 0x0228, 0x9102, + 0x9082, 0x0005, 0x0250, 0x2008, 0x2001, 0x013b, 0x2004, 0x8004, + 0x8004, 0x8004, 0x9102, 0x1a04, 0xa8a8, 0x2009, 0x1a84, 0x2104, + 0x8000, 0x0208, 0x200a, 0x2069, 0x0100, 0x6914, 0x918c, 0x1984, + 0x918d, 0x0010, 0x6916, 0x69c8, 0x2011, 0x0020, 0x68c8, 0x9106, + 0x15c0, 0x8211, 0x1dd8, 0x2001, 0x0306, 0x2003, 0x4800, 0x2001, + 0x009a, 0x2003, 0x0004, 0x2001, 0x1a69, 0x2003, 0x0000, 0x2001, + 0x1a72, 0x2003, 0x0000, 0x6a88, 0x698c, 0x2200, 0x9105, 0x1170, + 0x0096, 0x6014, 0x2048, 0xa87c, 0xc0dc, 0xa87e, 0xa880, 0xc0fc, + 0xa882, 0x009e, 0x2c10, 0x080c, 0x1be0, 0x0040, 0x6014, 0x2048, + 0xaa3a, 0xa936, 0x6ac4, 0x69c8, 0xa946, 0xaa4a, 0x0126, 0x00c6, + 0x2091, 0x2400, 0x002e, 0x080c, 0x1c79, 0x190c, 0x0dc5, 0x012e, + 0x0090, 0x2009, 0x1a85, 0x2104, 0x8000, 0x0208, 0x200a, 0x69c8, + 0x2011, 0x0020, 0x8211, 0x1df0, 0x68c8, 0x9106, 0x1dc0, 0x69c4, + 0x68c8, 0x9105, 0x0160, 0x6824, 0xd08c, 0x0110, 0x6827, 0x0002, + 0x7048, 0xc085, 0x704a, 0x0079, 0x7048, 0xc084, 0x704a, 0x2009, + 0x07d0, 0x080c, 0x88c8, 0x9006, 0x009e, 0x00ce, 0x00de, 0x0005, + 0x9085, 0x0001, 0x0cc8, 0x0026, 0x00e6, 0x2071, 0x19e8, 0x7048, + 0xd084, 0x01d8, 0x713c, 0x81ff, 0x01c0, 0x2071, 0x0100, 0x9188, + 0x0008, 0x2114, 0x928e, 0x0006, 0x1138, 0x7014, 0x9084, 0x1984, + 0x9085, 0x0012, 0x7016, 0x0048, 0x928e, 0x0009, 0x0db0, 0x7014, + 0x9084, 0x1984, 0x9085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, + 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, + 0x0126, 0x2091, 0x8000, 0x6010, 0x2058, 0xbca0, 0x2071, 0x19e8, + 0x7018, 0x2058, 0x8bff, 0x0190, 0xb8a0, 0x9406, 0x0118, 0xb854, + 0x2058, 0x0cc0, 0x6014, 0x0096, 0x2048, 0xac6c, 0xad70, 0xae78, + 0x009e, 0x080c, 0x6856, 0x0110, 0x9085, 0x0001, 0x012e, 0x000e, + 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, 0x0005, + 0x080c, 0xa0c1, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, 0x7016, + 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, 0x0130, + 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, 0x1800, + 0x607c, 0x6180, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, 0x60c3, + 0x002c, 0x0804, 0xa6bd, 0x080c, 0xa0c1, 0x7003, 0x0f00, 0x7808, + 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, 0x700e, + 0x60c3, 0x0008, 0x0804, 0xa6bd, 0x0156, 0x080c, 0xa10c, 0x7003, + 0x0200, 0x080c, 0x894c, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, + 0xffed, 0x9ef0, 0x0002, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, + 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xa943, 0x60c3, + 0x001c, 0x015e, 0x0804, 0xa6bd, 0x0016, 0x0026, 0x080c, 0xa0e8, + 0x080c, 0xa0fa, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, 0x7814, + 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, 0x9192, + 0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, 0x080c, + 0xa6bd, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, 0x080c, + 0xaf79, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, 0xa0c1, + 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa6bd, + 0x0016, 0x0026, 0x080c, 0xa0c1, 0x20e9, 0x0000, 0x20a1, 0x024c, + 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, + 0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, + 0x4003, 0x8003, 0x60c2, 0x080c, 0xa6bd, 0x002e, 0x001e, 0x0005, + 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, + 0x700c, 0x2060, 0x8cff, 0x0178, 0x080c, 0xd2e0, 0x1110, 0x080c, + 0xbcb6, 0x600c, 0x0006, 0x080c, 0xd54c, 0x080c, 0xb2d3, 0x080c, + 0xaaf1, 0x00ce, 0x0c78, 0x2c00, 0x700e, 0x700a, 0x012e, 0x000e, + 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, + 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, 0x2069, 0x0100, 0x2079, + 0x0140, 0x2071, 0x19e8, 0x7024, 0x2060, 0x8cff, 0x01f8, 0x080c, + 0xa6e9, 0x6ac0, 0x68c3, 0x0000, 0x080c, 0x88c3, 0x00c6, 0x2061, + 0x0100, 0x080c, 0xb0ca, 0x00ce, 0x20a9, 0x01f4, 0x0461, 0x2009, + 0x0013, 0x080c, 0xb352, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, + 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, + 0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, + 0x88c3, 0x6814, 0x9084, 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, + 0x0008, 0x68c3, 0x0000, 0x2011, 0x5f97, 0x080c, 0x883d, 0x20a9, + 0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, + 0x7804, 0x9084, 0x4000, 0x190c, 0x2d49, 0x0090, 0xd084, 0x0118, + 0x6827, 0x4001, 0x0010, 0x1f04, 0xaa2b, 0x7804, 0x9084, 0x1000, + 0x0138, 0x2001, 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, + 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, + 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, + 0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, + 0x19e8, 0x703c, 0x2060, 0x8cff, 0x0904, 0xaab4, 0x9386, 0x0002, + 0x1128, 0x6814, 0x9084, 0x0002, 0x0904, 0xaab4, 0x68af, 0x95f5, + 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, + 0x0008, 0x080c, 0x88d0, 0x080c, 0x2031, 0x2001, 0x0032, 0x6920, + 0xd1bc, 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e, + 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, + 0x9084, 0x4000, 0x190c, 0x2d49, 0x0090, 0xd08c, 0x0118, 0x6827, + 0x0002, 0x0010, 0x1f04, 0xaa8a, 0x7804, 0x9084, 0x1000, 0x0138, + 0x2001, 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x6827, + 0x4000, 0x6824, 0x83ff, 0x1140, 0x2009, 0x0049, 0x6020, 0x9086, + 0x0009, 0x0110, 0x080c, 0xb352, 0x000e, 0x001e, 0x002e, 0x006e, + 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x2069, 0x19e8, 0x6a06, 0x012e, 0x00de, + 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, 0x19e8, 0x6a32, + 0x012e, 0x00de, 0x0005, 0x080c, 0xa284, 0x7047, 0x1000, 0x0098, + 0x080c, 0xa284, 0x7047, 0x4000, 0x0070, 0x080c, 0xa284, 0x7047, + 0x2000, 0x0048, 0x080c, 0xa284, 0x7047, 0x0400, 0x0020, 0x080c, + 0xa284, 0x7047, 0x0200, 0x7854, 0x7032, 0x60c3, 0x0020, 0x0804, + 0xa6bd, 0x00e6, 0x2071, 0x19e8, 0x7020, 0x9005, 0x0110, 0x8001, + 0x7022, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, + 0x0066, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, 0x7614, + 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, 0x0904, 0xab96, 0x8cff, + 0x0904, 0xab96, 0x6020, 0x9086, 0x0006, 0x1904, 0xab91, 0x88ff, + 0x0138, 0x2800, 0x9c06, 0x1904, 0xab91, 0x2039, 0x0000, 0x0050, + 0x6010, 0x9b06, 0x1904, 0xab91, 0x85ff, 0x0120, 0x6054, 0x9106, + 0x1904, 0xab91, 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, + 0x9005, 0x1160, 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, + 0x88c3, 0x080c, 0xac1b, 0x7027, 0x0000, 0x0428, 0x080c, 0x88c3, + 0x6820, 0xd0b4, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, + 0x0000, 0x080c, 0xac1b, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, + 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d39, + 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, + 0x6827, 0x0001, 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, + 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, + 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, + 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, + 0x0096, 0x2048, 0x080c, 0xd0d6, 0x0110, 0x080c, 0xebd4, 0x009e, + 0x080c, 0xb306, 0x080c, 0xaaf1, 0x88ff, 0x1190, 0x00ce, 0x0804, + 0xab0c, 0x2c78, 0x600c, 0x2060, 0x0804, 0xab0c, 0x9006, 0x012e, + 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, + 0x601b, 0x0000, 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, + 0x00d6, 0x0096, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0x19e8, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, + 0xac0a, 0x6020, 0x9086, 0x0006, 0x1904, 0xac05, 0x87ff, 0x0128, + 0x2700, 0x9c06, 0x1904, 0xac05, 0x0040, 0x6010, 0x9b06, 0x15e8, + 0x85ff, 0x0118, 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168, + 0x0036, 0x2019, 0x0001, 0x080c, 0xaa49, 0x7033, 0x0000, 0x9006, + 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36, 0x1110, + 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, + 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, + 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, + 0x2048, 0x080c, 0xd0d6, 0x0110, 0x080c, 0xebd4, 0x080c, 0xb306, + 0x87ff, 0x1198, 0x00ce, 0x0804, 0xabb6, 0x2c78, 0x600c, 0x2060, + 0x0804, 0xabb6, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, + 0x009e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, + 0x97bd, 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e8, 0x2001, 0x1800, + 0x2004, 0x9086, 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007, + 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, + 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, 0x2c10, 0x7638, + 0x2660, 0x2678, 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7038, + 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, + 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, + 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, + 0x6004, 0x9086, 0x0040, 0x090c, 0x99a5, 0x9085, 0x0001, 0x0020, + 0x2c78, 0x600c, 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e, + 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0x19e8, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0xad01, 0x6010, + 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0xacfc, 0x7024, + 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xacd3, + 0x080c, 0xa6e9, 0x68c3, 0x0000, 0x080c, 0xac1b, 0x7027, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2d39, 0x9006, 0x080c, 0x2d39, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0x9c36, + 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, 0x9f36, + 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066, + 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, + 0x080c, 0xd2cf, 0x1180, 0x080c, 0x3279, 0x080c, 0xd2e0, 0x1518, + 0x080c, 0xbcb6, 0x0400, 0x080c, 0xac1b, 0x6824, 0xd084, 0x09b0, + 0x6827, 0x0001, 0x0898, 0x080c, 0xd2e0, 0x1118, 0x080c, 0xbcb6, + 0x0090, 0x6014, 0x2048, 0x080c, 0xd0d6, 0x0168, 0x6020, 0x9086, + 0x0003, 0x1508, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, + 0x6e92, 0x080c, 0xd2c3, 0x080c, 0xd54c, 0x080c, 0xb306, 0x080c, + 0xaaf1, 0x00ce, 0x0804, 0xac7c, 0x2c78, 0x600c, 0x2060, 0x0804, + 0xac7c, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, + 0xebd4, 0x0c08, 0x00d6, 0x080c, 0xa10c, 0x7003, 0x0200, 0x7007, + 0x0014, 0x60c3, 0x0014, 0x20e1, 0x0001, 0x2099, 0x1989, 0x20e9, + 0x0000, 0x20a1, 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, + 0x7027, 0x7878, 0x080c, 0xa6bd, 0x00de, 0x0005, 0x080c, 0xa10c, + 0x700b, 0x0800, 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084, + 0x00ff, 0x7022, 0x782c, 0x7026, 0x7858, 0x9084, 0x00ff, 0x9085, + 0x0200, 0x7002, 0x7858, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, + 0x0804, 0xa6bd, 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, + 0x0035, 0x080c, 0xd759, 0x00de, 0x1904, 0xadaf, 0x080c, 0xa0c1, + 0x7003, 0x1300, 0x782c, 0x080c, 0xaeb5, 0x2068, 0x6820, 0x9086, + 0x0003, 0x0560, 0x7810, 0x2058, 0xbaa0, 0x080c, 0xb23d, 0x11d8, + 0x9286, 0x007e, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, + 0x9286, 0x007f, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, + 0x9284, 0xff80, 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, + 0x700f, 0xfffc, 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, + 0xb814, 0x700e, 0x00c0, 0x6098, 0x700e, 0x00a8, 0x080c, 0xb23d, + 0x1130, 0x7810, 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, + 0x2069, 0x181f, 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, + 0x0010, 0x6034, 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, + 0x000c, 0x001e, 0x00de, 0x080c, 0xa6bd, 0x00be, 0x0005, 0x781b, + 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c, + 0x9180, 0x0008, 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, + 0x0904, 0xae2a, 0x9186, 0x0005, 0x0904, 0xae12, 0x9186, 0x0004, + 0x05d8, 0x9186, 0x0008, 0x0904, 0xae1b, 0x7807, 0x0037, 0x782f, + 0x0003, 0x7817, 0x1700, 0x080c, 0xae92, 0x0005, 0x080c, 0xae53, + 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x0002, + 0xadf3, 0xadfe, 0xadf5, 0xadfe, 0xadfa, 0xadf3, 0xadf3, 0xadfe, + 0xadfe, 0xadfe, 0xadfe, 0xadf3, 0xadf3, 0xadf3, 0xadf3, 0xadf3, + 0xadfe, 0xadf3, 0xadfe, 0x080c, 0x0dc5, 0x6824, 0xd0e4, 0x0110, + 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c, 0x7022, + 0x6830, 0x7026, 0x0804, 0xae4c, 0x080c, 0xae53, 0x00d6, 0x0026, + 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, 0x1108, + 0x900e, 0x04d0, 0x080c, 0xae53, 0x00d6, 0x0026, 0x792c, 0x2168, + 0x2009, 0x4000, 0x0488, 0x04b9, 0x00d6, 0x0026, 0x792c, 0x2168, + 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, 0x0002, 0x1108, + 0x900e, 0x0410, 0x0441, 0x00d6, 0x0026, 0x792c, 0x2168, 0x6814, + 0x6924, 0xc185, 0x6926, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, + 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180, + 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, + 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, + 0x00de, 0x0804, 0xa6bd, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, + 0x080c, 0xa10c, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, + 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0xb23d, 0x1118, 0x9092, + 0x007e, 0x0268, 0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68, 0x2d34, + 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, + 0x6498, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, + 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, + 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, + 0x00be, 0x0005, 0x080c, 0xa10c, 0x7003, 0x0100, 0x782c, 0x700a, + 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa6bd, 0x080c, + 0xa0b8, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, + 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, + 0x701a, 0x60c3, 0x0010, 0x0804, 0xa6bd, 0x00e6, 0x2071, 0x0240, + 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8cc, 0xd084, + 0x0120, 0x7844, 0x702a, 0x7848, 0x702e, 0x00be, 0x00fe, 0x000e, + 0x00ee, 0x0005, 0x080c, 0xa103, 0x7003, 0x0100, 0x782c, 0x700a, + 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa6bd, 0x0021, 0x60c3, + 0x0000, 0x0804, 0xa6bd, 0x00d6, 0x080c, 0xaf8e, 0xb810, 0x9085, + 0x0300, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, + 0x6880, 0x700e, 0x7013, 0x0819, 0x080c, 0xa6ab, 0x721a, 0x2f10, + 0x7222, 0x7a08, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x00a9, + 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, + 0x2bce, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, + 0x080c, 0xa6e0, 0x080c, 0x88ba, 0x0005, 0x0036, 0x0096, 0x00d6, + 0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0x00fd, + 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, + 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, + 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, + 0x0200, 0x080c, 0xaf8e, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, + 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, + 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, + 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, + 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, + 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, + 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, + 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x19b3, 0x210c, 0x009e, + 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, + 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, + 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040, + 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008, + 0x6912, 0x0005, 0x080c, 0xa0c1, 0x0016, 0x0026, 0x0096, 0x00d6, + 0x7814, 0x2048, 0x7013, 0x0138, 0x2001, 0x1837, 0x2004, 0x9084, + 0x0028, 0x1138, 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, 0x1904, + 0xb033, 0x7003, 0x5400, 0x00c6, 0x2061, 0x1800, 0x607c, 0x9084, + 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0x6080, + 0x700e, 0xa998, 0x918c, 0xff00, 0x7112, 0x20a9, 0x0004, 0x2009, + 0x1805, 0x2e10, 0x9290, 0x0006, 0x2104, 0x2012, 0x8108, 0x8210, + 0x1f04, 0xafc4, 0x20a9, 0x0004, 0x2009, 0x1801, 0x2104, 0x2012, + 0x8108, 0x8210, 0x1f04, 0xafce, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x0029, 0x2098, 0x2009, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, + 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6, 0x2069, 0x0200, 0x080c, + 0xaf79, 0x00de, 0x2071, 0x0240, 0x2011, 0x0240, 0x2009, 0x0002, + 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, + 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, + 0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031, 0x2098, 0x2009, 0x0008, + 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, + 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x2001, + 0x1837, 0x2004, 0x9084, 0x0028, 0x1168, 0x080c, 0x7637, 0x0150, + 0x6028, 0xc0bd, 0x602a, 0x6014, 0x9084, 0x1804, 0x9085, 0x0029, + 0x6016, 0x0010, 0x080c, 0xa6bd, 0x080c, 0x88ba, 0x00de, 0x009e, + 0x002e, 0x001e, 0x0005, 0x00e6, 0x2071, 0x0240, 0x2001, 0x2200, + 0x9085, 0x00ff, 0x7002, 0x7007, 0xffff, 0x2071, 0x0100, 0x709b, + 0x00ff, 0x00ee, 0x0804, 0xafa9, 0x080c, 0xa0c1, 0x0016, 0x0026, + 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x7003, 0x5500, + 0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, + 0x9105, 0x700a, 0xa99c, 0x918c, 0xff00, 0xa8a0, 0x9084, 0x00ff, + 0x9105, 0x700e, 0xa998, 0x918c, 0xff00, 0x2061, 0x1800, 0x607c, + 0x9084, 0x00ff, 0x910d, 0x7112, 0x6180, 0x7116, 0x2009, 0x0008, + 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2e10, 0x9290, + 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, + 0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805, 0x2104, 0x2012, 0x8108, + 0x8210, 0x1f04, 0xb085, 0x20a9, 0x0002, 0x2009, 0x1801, 0x2104, + 0x2012, 0x8108, 0x8210, 0x1f04, 0xb08f, 0x00d6, 0x0016, 0x2069, + 0x0200, 0x080c, 0xaf79, 0x001e, 0x00de, 0x2071, 0x0240, 0x20a9, + 0x0002, 0x2009, 0x1803, 0x2011, 0x0240, 0x2104, 0x2012, 0x8108, + 0x8210, 0x1f04, 0xb0a5, 0x2009, 0x0008, 0x4002, 0x8007, 0x2012, + 0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9, 0x0008, 0x2012, 0x8210, + 0x1f04, 0xb0b6, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x080c, 0xa6bd, 0x080c, 0x88ba, 0x00de, 0x009e, 0x002e, + 0x001e, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, + 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, + 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, + 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, + 0x00de, 0x0005, 0x00d6, 0x0096, 0x6014, 0x2048, 0xa878, 0x6056, + 0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023, 0x0003, + 0x6007, 0x0040, 0x6003, 0x0003, 0x600b, 0xffff, 0xa817, 0x0001, + 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813, 0x20c5, 0x080c, 0x9564, + 0x0126, 0x2091, 0x8000, 0x080c, 0x9bd3, 0x012e, 0x009e, 0x00de, + 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, + 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, 0x760c, 0x2660, 0x2678, + 0x8cff, 0x0904, 0xb19d, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, + 0x68c0, 0x9005, 0x0904, 0xb16f, 0x080c, 0xa6e9, 0x68c3, 0x0000, + 0x080c, 0xac1b, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, + 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2d39, 0x9006, + 0x080c, 0x2d39, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, + 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, + 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, + 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, + 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xd2cf, 0x1180, 0x080c, + 0x3279, 0x080c, 0xd2e0, 0x1518, 0x080c, 0xbcb6, 0x0400, 0x080c, + 0xac1b, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, 0x0898, 0x080c, + 0xd2e0, 0x1118, 0x080c, 0xbcb6, 0x0090, 0x6014, 0x2048, 0x080c, + 0xd0d6, 0x0168, 0x6020, 0x9086, 0x0003, 0x1520, 0xa867, 0x0103, + 0xab7a, 0xa877, 0x0000, 0x080c, 0x6e9f, 0x080c, 0xd2c3, 0x080c, + 0xd54c, 0x080c, 0xb306, 0x080c, 0xaaf1, 0x00ce, 0x0804, 0xb120, + 0x2c78, 0x600c, 0x2060, 0x0804, 0xb120, 0x700f, 0x0000, 0x700b, + 0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1d08, 0x080c, 0xebd4, + 0x08f0, 0x00d6, 0x0156, 0x080c, 0xa10c, 0x7a14, 0x82ff, 0x0138, + 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490, 0x7003, + 0x0200, 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800, 0x9086, + 0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, 0x7637, 0x1110, 0xc3ad, + 0x0008, 0xc3a5, 0x6adc, 0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, + 0x730e, 0x080c, 0x894c, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, + 0xffed, 0x2071, 0x0250, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, + 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xb1e3, 0x60c3, + 0x0020, 0x080c, 0xa6bd, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c, + 0xa10c, 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118, 0x9282, + 0x000e, 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, + 0x0488, 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011, + 0x19be, 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007, 0x701e, + 0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, + 0x2004, 0x7022, 0x2001, 0x1820, 0x2004, 0x7026, 0x0030, 0x2001, + 0x1818, 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1, + 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, + 0x60c3, 0x001c, 0x015e, 0x0804, 0xa6bd, 0x0006, 0x2001, 0x1837, + 0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0xaabf, + 0x2011, 0x0002, 0x080c, 0xaac9, 0x080c, 0xa9d3, 0x0036, 0x901e, + 0x080c, 0xaa49, 0x003e, 0x0005, 0x080c, 0x33af, 0x0188, 0x0016, + 0x00b6, 0x00c6, 0x7010, 0x9085, 0x0020, 0x7012, 0x2009, 0x007e, + 0x080c, 0x6724, 0xb85c, 0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e, + 0x0005, 0x2071, 0x188d, 0x7000, 0x9005, 0x0140, 0x2001, 0x0976, + 0x2071, 0x1800, 0x7076, 0x707a, 0x706b, 0xffe0, 0x2071, 0x1800, + 0x7074, 0x7056, 0x705b, 0x1cd0, 0x0005, 0x00e6, 0x0126, 0x2071, + 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0010, 0x0608, 0x7058, + 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7068, + 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, + 0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502, 0x1230, 0x755a, + 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b, 0x1cd0, 0x0cc0, + 0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7554, 0x9582, 0x0010, + 0x0600, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, + 0x0018, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, + 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502, + 0x1228, 0x755a, 0x9085, 0x0001, 0x00ee, 0x0005, 0x705b, 0x1cd0, + 0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1cd0, 0x0a0c, 0x0dc5, 0x2001, + 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0dc5, 0x9006, 0x6006, 0x600a, + 0x600e, 0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, 0x0000, + 0x601e, 0x6056, 0x605a, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, + 0x603a, 0x603e, 0x6042, 0x602a, 0x2061, 0x1800, 0x6054, 0x8000, + 0x6056, 0x9086, 0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, + 0x0016, 0x080c, 0x9ab1, 0x001e, 0x012e, 0x0cb0, 0x0006, 0x6000, + 0x9086, 0x0000, 0x01c0, 0x601c, 0xd084, 0x190c, 0x1a8e, 0x6017, + 0x0000, 0x6023, 0x0007, 0x2001, 0x1986, 0x2004, 0x0006, 0x9082, + 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xee87, 0x6043, + 0x0000, 0x6013, 0x0000, 0x000e, 0x0005, 0x00e6, 0x0126, 0x2071, + 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0001, 0x0608, 0x7058, + 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7068, + 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, + 0x8529, 0x7556, 0x9ca8, 0x0018, 0x7068, 0x9502, 0x1230, 0x755a, + 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b, 0x1cd0, 0x0cc0, + 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002, 0xb365, 0xb36e, + 0xb389, 0xb3a4, 0xd82b, 0xd848, 0xd863, 0xb365, 0xb36e, 0x9100, + 0xb3bd, 0xb365, 0xb365, 0xb365, 0xb365, 0x9186, 0x0013, 0x1128, + 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x0005, 0x0005, 0x0066, 0x6000, + 0x90b2, 0x0010, 0x1a0c, 0x0dc5, 0x0013, 0x006e, 0x0005, 0xb387, + 0xbb05, 0xbcfd, 0xb387, 0xbd93, 0xb6a0, 0xb387, 0xb387, 0xba87, + 0xc3b1, 0xb387, 0xb387, 0xb387, 0xb387, 0xb387, 0xb387, 0x080c, + 0x0dc5, 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0dc5, 0x0013, + 0x006e, 0x0005, 0xb3a2, 0xca7e, 0xb3a2, 0xb3a2, 0xb3a2, 0xb3a2, + 0xb3a2, 0xb3a2, 0xca15, 0xcc00, 0xb3a2, 0xcabf, 0xcb3e, 0xcabf, + 0xcb3e, 0xb3a2, 0x080c, 0x0dc5, 0x6000, 0x9082, 0x0010, 0x1a0c, + 0x0dc5, 0x6000, 0x0002, 0xb3bb, 0xc3f8, 0xc4c0, 0xc5f3, 0xc7a2, + 0xb3bb, 0xb3bb, 0xb3bb, 0xc3cc, 0xc9a1, 0xc9a4, 0xb3bb, 0xb3bb, + 0xb3bb, 0xb3bb, 0xc9d3, 0x080c, 0x0dc5, 0x0066, 0x6000, 0x90b2, + 0x0010, 0x1a0c, 0x0dc5, 0x0013, 0x006e, 0x0005, 0xb3d6, 0xb3d6, + 0xb419, 0xb4b8, 0xb54d, 0xb3d6, 0xb3d6, 0xb3d6, 0xb3d8, 0xb3d6, + 0xb3d6, 0xb3d6, 0xb3d6, 0xb3d6, 0xb3d6, 0xb3d6, 0x080c, 0x0dc5, + 0x9186, 0x004c, 0x0588, 0x9186, 0x0003, 0x190c, 0x0dc5, 0x0096, + 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, + 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa846, 0xa8b0, + 0xa84a, 0x9006, 0xa836, 0xa83a, 0xa884, 0x9092, 0x199a, 0x0210, + 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, 0x009e, + 0x2c10, 0x080c, 0x1be0, 0x080c, 0x9564, 0x0126, 0x2091, 0x8000, + 0x080c, 0x9bd3, 0x012e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, + 0x00be, 0x2c00, 0x080c, 0xb56f, 0x080c, 0xd7fb, 0x6003, 0x0007, + 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800, 0x7a90, 0x6014, + 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, + 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, + 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b, + 0x0000, 0x8214, 0xa883, 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, + 0x2100, 0x9086, 0x0015, 0x1118, 0x2001, 0x0001, 0x0038, 0x2100, + 0x9086, 0x0016, 0x0118, 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, + 0x8423, 0x9405, 0x0002, 0xb480, 0xb480, 0xb47b, 0xb47e, 0xb480, + 0xb478, 0xb46b, 0xb46b, 0xb46b, 0xb46b, 0xb46b, 0xb46b, 0xb46b, + 0xb46b, 0xb46b, 0xb46b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, + 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e, 0x00de, 0x080c, 0x0dc5, + 0x080c, 0xbfab, 0x0028, 0x080c, 0xc0e9, 0x0010, 0x080c, 0xc1df, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, + 0x000e, 0x080c, 0xb62d, 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, + 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, + 0x0000, 0x2041, 0x126c, 0x080c, 0xb7f1, 0x0160, 0x000e, 0x9005, + 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, + 0x0804, 0xb2d3, 0x2001, 0x002c, 0x900e, 0x080c, 0xb693, 0x0c70, + 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, + 0x0a0c, 0x0dc5, 0x91b2, 0x0050, 0x1a0c, 0x0dc5, 0x9182, 0x0047, + 0x00ca, 0x2001, 0x0109, 0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x94b1, 0x002e, 0x001e, + 0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, + 0xb419, 0x0005, 0xb4eb, 0xb4eb, 0xb4ed, 0xb523, 0xb4eb, 0xb4eb, + 0xb4eb, 0xb4eb, 0xb536, 0x080c, 0x0dc5, 0x00d6, 0x0016, 0x0096, + 0x080c, 0x9a61, 0x080c, 0x9bd3, 0x6003, 0x0004, 0x6114, 0x2148, + 0xa87c, 0xd0fc, 0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, + 0x9005, 0x0140, 0x2001, 0x0000, 0x900e, 0x080c, 0xb693, 0x080c, + 0xb2d3, 0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, + 0xa8ae, 0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, + 0xa8ae, 0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, + 0x001e, 0x00de, 0x0005, 0x080c, 0x9a61, 0x00d6, 0x0096, 0x6114, + 0x2148, 0x080c, 0xd0d8, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6e9f, + 0x009e, 0x00de, 0x080c, 0xb2d3, 0x0804, 0x9bd3, 0x080c, 0x9a61, + 0x080c, 0x3250, 0x080c, 0xd7f8, 0x00d6, 0x0096, 0x6114, 0x2148, + 0x080c, 0xd0d8, 0x0120, 0xa87b, 0x0029, 0x080c, 0x6e9f, 0x009e, + 0x00de, 0x080c, 0xb2d3, 0x0804, 0x9bd3, 0x9182, 0x0047, 0x0002, + 0xb55d, 0xb55f, 0xb55d, 0xb55d, 0xb55d, 0xb55d, 0xb55d, 0xb55d, + 0xb55d, 0xb55d, 0xb55d, 0xb55d, 0xb55f, 0x080c, 0x0dc5, 0x00d6, + 0x0096, 0x601f, 0x0000, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, + 0x0000, 0x080c, 0x6e9f, 0x009e, 0x00de, 0x0804, 0xb2d3, 0x0026, + 0x0036, 0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, + 0x100e, 0x000e, 0x090c, 0x0dc5, 0xa960, 0x21e8, 0xa95c, 0x9188, + 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, + 0x1800, 0x7990, 0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, + 0x2950, 0x00a6, 0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, + 0x0001, 0x9182, 0x0035, 0x1228, 0x2011, 0x001f, 0x080c, 0xcc85, + 0x04c0, 0x2130, 0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xcc85, + 0x96b2, 0x0034, 0xb004, 0x904d, 0x0110, 0x080c, 0x0fc0, 0x080c, + 0x100e, 0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, + 0xb406, 0x968a, 0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, + 0xcc85, 0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, + 0x001b, 0x080c, 0xcc85, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, + 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, + 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, + 0x0050, 0xb566, 0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, + 0x6e9f, 0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, + 0x006e, 0x005e, 0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, + 0x0006, 0x080c, 0x100e, 0x000e, 0x090c, 0x0dc5, 0xa960, 0x21e8, + 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, + 0xaa66, 0xa87a, 0x2079, 0x1800, 0x7990, 0x810c, 0x9188, 0x000c, + 0x9182, 0x001a, 0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, + 0xac76, 0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, + 0x200c, 0x918d, 0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, + 0x6e9f, 0x009e, 0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, + 0x0096, 0x0016, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, + 0x001e, 0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, + 0x000c, 0x2098, 0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, + 0x2011, 0x0020, 0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, + 0x100e, 0x2900, 0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, + 0xa85c, 0x9080, 0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, + 0x2009, 0x0280, 0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, + 0x2200, 0x9402, 0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, + 0x2020, 0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, + 0x83ff, 0x0180, 0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, + 0x9085, 0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xb642, + 0x0804, 0xb644, 0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, + 0x00de, 0x001e, 0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, + 0xa87a, 0xa982, 0x080c, 0x6e92, 0x009e, 0x003e, 0x00de, 0x0005, + 0x91b6, 0x0015, 0x1118, 0x080c, 0xb2d3, 0x0030, 0x91b6, 0x0016, + 0x190c, 0x0dc5, 0x080c, 0xb2d3, 0x0005, 0x20a9, 0x000e, 0x20e1, + 0x0000, 0x2e98, 0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, + 0x20a0, 0x009e, 0x4003, 0x9196, 0x0016, 0x01f0, 0x0136, 0x9080, + 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418, 0x8318, + 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8, 0x2011, + 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003, 0x3418, + 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xd0d8, 0x0130, + 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e, 0x0804, + 0xb2d3, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200, 0x11a8, + 0x6010, 0x00b6, 0x2058, 0xb8cf, 0x0000, 0x00be, 0x6014, 0x9005, + 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32, 0x080c, + 0xb2d3, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48, 0x0cc8, + 0x0006, 0x0016, 0x080c, 0xd7e3, 0x0188, 0x6014, 0x9005, 0x1170, + 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, 0x0000, 0x2009, 0x0022, + 0x080c, 0xbadd, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085, 0x0001, + 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c, 0x20e1, + 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001, 0x2099, + 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804, 0x2048, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, + 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020, 0x4003, + 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, + 0x080c, 0xb2d3, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016, 0x900e, + 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff, 0x800c, + 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108, 0x810b, + 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c, 0xcc85, + 0x080c, 0xd0d8, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000, 0xa864, + 0xa8e2, 0xa867, 0x0103, 0x080c, 0xb2d3, 0x001e, 0x009e, 0x0005, + 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200, 0x0110, 0x2009, + 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0dc5, 0xa97a, 0x080c, + 0x6e9f, 0x009e, 0x080c, 0xb2d3, 0x001e, 0x0005, 0x0016, 0x0096, + 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010, 0x7034, + 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014, 0x2048, + 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xcc85, 0x009e, + 0x080c, 0xd0d8, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807, 0x0000, + 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xb2d3, 0x009e, 0x001e, + 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100, 0x1118, + 0x080c, 0xbcb6, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b, + 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8, + 0xada4, 0x2031, 0x0000, 0x2041, 0x1252, 0x0019, 0x0d08, 0x008e, + 0x0898, 0x0096, 0x0006, 0x080c, 0x100e, 0x000e, 0x01b0, 0xa8ab, + 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e, + 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086, 0x2940, + 0x080c, 0x10f8, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005, 0x00e6, + 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, + 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6, 0x2258, + 0xba14, 0x00be, 0x9206, 0x11e0, 0x6043, 0x0000, 0x2c68, 0x0016, + 0x2009, 0x0035, 0x080c, 0xd759, 0x001e, 0x1158, 0x622c, 0x2268, + 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386, 0x0006, + 0x0128, 0x080c, 0xb2d3, 0x0020, 0x0039, 0x0010, 0x080c, 0xb910, + 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048, 0x9186, + 0x0015, 0x0904, 0xb8f8, 0x918e, 0x0016, 0x1904, 0xb90e, 0x700c, + 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300, 0x1904, + 0xb8d2, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904, 0xb8b5, + 0x0804, 0xb90c, 0x6808, 0x9086, 0xffff, 0x1904, 0xb8fa, 0xa87c, + 0x9084, 0x0060, 0x9086, 0x0020, 0x1128, 0xa83c, 0xa940, 0x9105, + 0x1904, 0xb8fa, 0x6824, 0xd084, 0x1904, 0xb8fa, 0xd0b4, 0x0158, + 0x0016, 0x2001, 0x1986, 0x200c, 0x6018, 0x9102, 0x9082, 0x0005, + 0x001e, 0x1a04, 0xb8fa, 0x080c, 0xd2c3, 0x685c, 0xa882, 0xa87c, + 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, + 0x000a, 0x080c, 0x9375, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, + 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xcde3, 0x00ce, + 0x0804, 0xb90c, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x61c2, + 0x0010, 0x080c, 0x65cf, 0x00ce, 0x1904, 0xb8fa, 0x00c6, 0x2d60, + 0x080c, 0xb2d3, 0x00ce, 0x0804, 0xb90c, 0x00c6, 0x080c, 0xb325, + 0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xd554, 0x6023, + 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0xb2d3, 0x00ce, 0x080c, + 0xb352, 0x00ce, 0x0804, 0xb90c, 0x2001, 0x1988, 0x2004, 0x6842, + 0x00ce, 0x04d0, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, + 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, + 0x0003, 0x080c, 0xd79d, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0002, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x00ce, 0x00e8, 0x700c, + 0x9086, 0x2a00, 0x1138, 0x2001, 0x1988, 0x2004, 0x6842, 0x00a0, + 0x0479, 0x00a0, 0x89ff, 0x090c, 0x0dc5, 0x00c6, 0x00d6, 0x2d60, + 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x6cb9, 0x080c, 0xd2c3, + 0x080c, 0xb306, 0x00de, 0x00ce, 0x080c, 0xb2d3, 0x009e, 0x0005, + 0x9186, 0x0015, 0x1128, 0x2001, 0x1988, 0x2004, 0x6842, 0x0068, + 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xee87, + 0x080c, 0x8a25, 0x080c, 0xb2d3, 0x00ce, 0x080c, 0xb2d3, 0x0005, + 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, + 0x2001, 0x1988, 0x2004, 0x6842, 0x0804, 0xb98a, 0x00c6, 0x2d60, + 0x080c, 0xcce6, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, + 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, + 0x89ff, 0x090c, 0x0dc5, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, + 0xd0ac, 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, + 0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, + 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, + 0x1d48, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, + 0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, + 0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xd44b, 0x080c, + 0x9ab1, 0x0010, 0x080c, 0xb2d3, 0x004e, 0x003e, 0x002e, 0x0005, + 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, + 0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xb9f5, 0x700c, 0x6210, + 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xb9f5, 0x6038, + 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, + 0xb9f5, 0x9286, 0x0002, 0x0904, 0xb9f5, 0x9286, 0x0000, 0x05e8, + 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, + 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, + 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, + 0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, + 0x0096, 0x2048, 0x080c, 0xd0d8, 0x090c, 0x0dc5, 0xa87b, 0x0003, + 0x009e, 0x080c, 0xd79d, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0002, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x00ce, 0x0030, 0x6038, + 0x2070, 0x2001, 0x1988, 0x2004, 0x7042, 0x080c, 0xb2d3, 0x002e, + 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, + 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, + 0xc48c, 0xbc02, 0x0470, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, + 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xc379, + 0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xba66, 0x0096, 0x0156, + 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, + 0x0004, 0x080c, 0xc379, 0x002e, 0x003e, 0x015e, 0x009e, 0x15b0, + 0x7238, 0xba0a, 0x733c, 0xbb0e, 0x83ff, 0x0118, 0xbc00, 0xc48d, + 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, + 0xb6dc, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, + 0x2041, 0x1252, 0x080c, 0xb7f1, 0x0130, 0x00fe, 0x009e, 0x080c, + 0xb2d3, 0x00be, 0x0005, 0x080c, 0xbcb6, 0x0cb8, 0x2b78, 0x00f6, + 0x080c, 0x3250, 0x080c, 0xd7f8, 0x00fe, 0x00c6, 0x080c, 0xb27d, + 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, + 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x666a, 0x080c, 0x6696, + 0x080c, 0x9547, 0x080c, 0x9ab1, 0x00ce, 0x0804, 0xba39, 0x2100, + 0x91b2, 0x0053, 0x1a0c, 0x0dc5, 0x91b2, 0x0040, 0x1a04, 0xbaef, + 0x0002, 0xbadd, 0xbadd, 0xbad3, 0xbadd, 0xbadd, 0xbadd, 0xbad1, + 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, + 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, + 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, + 0xbadd, 0xbad1, 0xbadd, 0xbadd, 0xbad1, 0xbad1, 0xbad1, 0xbad1, + 0xbad1, 0xbad3, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, + 0xbad1, 0xbad1, 0xbad1, 0xbadd, 0xbadd, 0xbad1, 0xbad1, 0xbad1, + 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbad1, 0xbadd, 0xbad1, + 0xbad1, 0x080c, 0x0dc5, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8cc, + 0xc08c, 0xb8ce, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, + 0x9186, 0x0032, 0x0118, 0x080c, 0x9547, 0x0010, 0x080c, 0x94ff, + 0x0126, 0x2091, 0x8000, 0x080c, 0x9ab1, 0x012e, 0x0005, 0x2600, + 0x0002, 0xbadd, 0xbadd, 0xbb03, 0xbadd, 0xbadd, 0xbb03, 0xbb03, + 0xbb03, 0xbb03, 0xbadd, 0xbb03, 0xbadd, 0xbb03, 0xbadd, 0xbb03, + 0xbb03, 0xbb03, 0xbb03, 0x080c, 0x0dc5, 0x6004, 0x90b2, 0x0053, + 0x1a0c, 0x0dc5, 0x91b6, 0x0013, 0x0904, 0xbbd8, 0x91b6, 0x0027, + 0x1904, 0xbb82, 0x080c, 0x99a5, 0x6004, 0x080c, 0xd2cf, 0x01b0, + 0x080c, 0xd2e0, 0x01a8, 0x908e, 0x0021, 0x0904, 0xbb7f, 0x908e, + 0x0022, 0x1130, 0x080c, 0xb708, 0x0904, 0xbb7b, 0x0804, 0xbb7c, + 0x908e, 0x003d, 0x0904, 0xbb7f, 0x0804, 0xbb75, 0x080c, 0x3279, + 0x2001, 0x0007, 0x080c, 0x666a, 0x6010, 0x00b6, 0x2058, 0xb9a0, + 0x00be, 0x080c, 0xbcb6, 0x9186, 0x007e, 0x1148, 0x2001, 0x1837, + 0x2014, 0xc285, 0x080c, 0x7637, 0x1108, 0xc2ad, 0x2202, 0x0036, + 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xef94, 0x002e, 0x003e, + 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x96a4, + 0x0076, 0x903e, 0x080c, 0x9577, 0x6010, 0x00b6, 0x905d, 0x0100, + 0x00be, 0x2c08, 0x080c, 0xe91c, 0x007e, 0x003e, 0x002e, 0x001e, + 0x080c, 0xd7f8, 0x0016, 0x080c, 0xd54c, 0x080c, 0xb2d3, 0x001e, + 0x080c, 0x334c, 0x080c, 0x9ab1, 0x0030, 0x080c, 0xd54c, 0x080c, + 0xb2d3, 0x080c, 0x9ab1, 0x0005, 0x080c, 0xbcb6, 0x0cb0, 0x080c, + 0xbcf2, 0x0c98, 0x9186, 0x0015, 0x0118, 0x9186, 0x0016, 0x1148, + 0x080c, 0xd809, 0x0d80, 0x6000, 0x9086, 0x0002, 0x0904, 0xbcfd, + 0x0c50, 0x9186, 0x0014, 0x1d38, 0x080c, 0x99a5, 0x6004, 0x908e, + 0x0022, 0x1118, 0x080c, 0xb708, 0x09f0, 0x080c, 0x3250, 0x080c, + 0xd7f8, 0x080c, 0xd2cf, 0x1198, 0x080c, 0x3279, 0x6010, 0x00b6, + 0x2058, 0xb9a0, 0x00be, 0x080c, 0xbcb6, 0x9186, 0x007e, 0x1128, + 0x2001, 0x1837, 0x200c, 0xc185, 0x2102, 0x0804, 0xbb75, 0x080c, + 0xd2e0, 0x1120, 0x080c, 0xbcb6, 0x0804, 0xbb75, 0x6004, 0x908e, + 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, + 0x080c, 0x35e7, 0x00fe, 0x00ee, 0x0804, 0xbb75, 0x6004, 0x908e, + 0x0021, 0x0d40, 0x908e, 0x0022, 0x090c, 0xbcb6, 0x0804, 0xbb75, + 0x90b2, 0x0040, 0x1a04, 0xbc92, 0x2008, 0x0002, 0xbc20, 0xbc21, + 0xbc24, 0xbc27, 0xbc2a, 0xbc37, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, + 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, + 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, + 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc3a, 0xbc47, 0xbc1e, 0xbc49, + 0xbc47, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc47, 0xbc47, + 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc1e, + 0xbc79, 0xbc47, 0xbc1e, 0xbc43, 0xbc1e, 0xbc1e, 0xbc1e, 0xbc44, + 0xbc1e, 0xbc1e, 0xbc1e, 0xbc47, 0xbc70, 0xbc1e, 0x080c, 0x0dc5, + 0x0430, 0x2001, 0x000b, 0x0470, 0x2001, 0x0003, 0x0458, 0x2001, + 0x0005, 0x0440, 0x6010, 0x00b6, 0x2058, 0xb804, 0x00be, 0x9084, + 0x00ff, 0x9086, 0x0000, 0x1500, 0x2001, 0x0001, 0x00d8, 0x2001, + 0x0009, 0x00c0, 0x080c, 0x99a5, 0x6003, 0x0005, 0x080c, 0xd7fb, + 0x080c, 0x9ab1, 0x0070, 0x0018, 0x0010, 0x080c, 0x666a, 0x0804, + 0xbc8a, 0x080c, 0x99a5, 0x080c, 0xd7fb, 0x6003, 0x0004, 0x080c, + 0x9ab1, 0x0005, 0x080c, 0x666a, 0x080c, 0x99a5, 0x6003, 0x0002, + 0x0036, 0x2019, 0x1852, 0x2304, 0x9084, 0xff00, 0x1120, 0x2001, + 0x1986, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, 0x0ec0, 0x8003, + 0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, 0x9ab1, 0x0c08, + 0x080c, 0x99a5, 0x080c, 0xd54c, 0x080c, 0xb2d3, 0x080c, 0x9ab1, + 0x08c0, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, + 0x35e7, 0x00fe, 0x00ee, 0x080c, 0x99a5, 0x080c, 0xb2d3, 0x080c, + 0x9ab1, 0x0838, 0x080c, 0x99a5, 0x6003, 0x0002, 0x080c, 0xd7fb, + 0x0804, 0x9ab1, 0x2600, 0x2008, 0x0002, 0xbca9, 0xbc8a, 0xbca7, + 0xbc8a, 0xbc8a, 0xbca7, 0xbca7, 0xbca7, 0xbca7, 0xbc8a, 0xbca7, + 0xbc8a, 0xbca7, 0xbc8a, 0xbca7, 0xbca7, 0xbca7, 0xbca7, 0x080c, + 0x0dc5, 0x080c, 0x99a5, 0x0096, 0x6014, 0x2048, 0x080c, 0x6e9f, + 0x009e, 0x080c, 0xb2d3, 0x080c, 0x9ab1, 0x0005, 0x00e6, 0x0096, + 0x0026, 0x0016, 0x080c, 0xd0d8, 0x0568, 0x6014, 0x2048, 0xa864, + 0x9086, 0x0139, 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, + 0x556f, 0x0130, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, + 0x2001, 0x0030, 0x900e, 0x2011, 0x4005, 0x080c, 0xd6bd, 0x0090, + 0xa868, 0xd0fc, 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, + 0x0021, 0x0168, 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, + 0xa833, 0x0100, 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, + 0x0009, 0x0cc0, 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, + 0x0103, 0xa823, 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, + 0xb804, 0x9084, 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0dc5, 0x6604, + 0x96b6, 0x004d, 0x1120, 0x080c, 0xd5dc, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x0043, 0x1120, 0x080c, 0xd625, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x004b, 0x1120, 0x080c, 0xd651, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x0033, 0x1120, 0x080c, 0xd56e, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x0028, 0x1120, 0x080c, 0xd31e, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x0029, 0x1120, 0x080c, 0xd35f, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x001f, 0x1120, 0x080c, 0xb6ad, 0x0804, 0xbd82, 0x6604, + 0x96b6, 0x0000, 0x1118, 0x080c, 0xb9fb, 0x04e0, 0x6604, 0x96b6, + 0x0022, 0x1118, 0x080c, 0xb6e9, 0x04a8, 0x6604, 0x96b6, 0x0035, + 0x1118, 0x080c, 0xb80f, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, + 0x080c, 0xb990, 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, + 0xb721, 0x0400, 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb75d, + 0x00c8, 0x6604, 0x96b6, 0x0049, 0x1118, 0x080c, 0xb79e, 0x0090, + 0x6604, 0x96b6, 0x0041, 0x1118, 0x080c, 0xb788, 0x0058, 0x91b6, + 0x0015, 0x1110, 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, + 0x0804, 0xc08e, 0x00be, 0x0005, 0x080c, 0xb36d, 0x0cd8, 0xbd9f, + 0xbdad, 0xbd9f, 0xbdf4, 0xbd9f, 0xbfab, 0xc09b, 0xbd9f, 0xbd9f, + 0xc064, 0xbd9f, 0xc07a, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048, + 0xa800, 0x2048, 0xa867, 0x0103, 0x009e, 0x0804, 0xb2d3, 0xa001, + 0xa001, 0x0005, 0x6604, 0x96b6, 0x0004, 0x1130, 0x2001, 0x0001, + 0x080c, 0x6656, 0x0804, 0xb2d3, 0x0005, 0x00e6, 0x2071, 0x1800, + 0x7090, 0x9086, 0x0074, 0x1540, 0x080c, 0xe8ed, 0x11b0, 0x6010, + 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, + 0xc0c5, 0xb802, 0x00f9, 0x00be, 0x2001, 0x0006, 0x080c, 0x666a, + 0x080c, 0x3279, 0x080c, 0xb2d3, 0x0098, 0x2001, 0x000a, 0x080c, + 0x666a, 0x080c, 0x3279, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, + 0x9547, 0x080c, 0x9ab1, 0x0020, 0x2001, 0x0001, 0x080c, 0xbf7b, + 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0160, 0x9006, 0x080c, + 0x6656, 0x2069, 0x1847, 0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006, + 0x080c, 0x6696, 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, + 0x1824, 0x2204, 0x9086, 0x0074, 0x1904, 0xbf50, 0x6010, 0x2058, + 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xc1ea, 0x0804, 0xbebd, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x0904, 0xbe5f, 0x00d6, 0x080c, + 0x7637, 0x01a0, 0x0026, 0x2011, 0x0010, 0x080c, 0x6ac7, 0x002e, + 0x0904, 0xbe5e, 0x080c, 0x57e9, 0x1598, 0x6014, 0x2048, 0xa807, + 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x0450, 0x6010, 0x00b6, + 0x2058, 0xb910, 0x00be, 0x9186, 0x00ff, 0x0580, 0x0026, 0x2011, + 0x8008, 0x080c, 0x6ac7, 0x002e, 0x0548, 0x6014, 0x9005, 0x090c, + 0x0dc5, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, + 0x2001, 0x0030, 0x900e, 0x2011, 0x4009, 0x080c, 0xd6bd, 0x0040, + 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, + 0x6010, 0x2058, 0xb9a0, 0x0016, 0x080c, 0x3279, 0x080c, 0xb2d3, + 0x001e, 0x080c, 0x334c, 0x00de, 0x0804, 0xbf55, 0x00de, 0x080c, + 0xc1df, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, + 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, + 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd6bd, + 0x0030, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, + 0x0006, 0x080c, 0x666a, 0x080c, 0x3279, 0x080c, 0xb2d3, 0x0804, + 0xbf55, 0x080c, 0xbf63, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, + 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, + 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd6bd, 0x08f8, + 0x080c, 0xbf59, 0x0160, 0x9006, 0x080c, 0x6656, 0x2001, 0x0004, + 0x080c, 0x6696, 0x2001, 0x0007, 0x080c, 0x666a, 0x08a0, 0x2001, + 0x0004, 0x080c, 0x666a, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, + 0x9547, 0x080c, 0x9ab1, 0x0804, 0xbf55, 0xb85c, 0xd0e4, 0x0178, + 0x080c, 0xd4ee, 0x080c, 0x7637, 0x0118, 0xd0dc, 0x1904, 0xbe7f, + 0x2011, 0x1837, 0x2204, 0xc0ad, 0x2012, 0x0804, 0xbe7f, 0x080c, + 0xd52b, 0x2011, 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, + 0xeab9, 0x000e, 0x1904, 0xbe7f, 0xc0b5, 0x2012, 0x2001, 0x0006, + 0x080c, 0x666a, 0x9006, 0x080c, 0x6656, 0x00c6, 0x2001, 0x180f, + 0x2004, 0xd09c, 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, + 0x1800, 0x700c, 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea, + 0x7082, 0x908c, 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, + 0x080c, 0x28bc, 0x00f6, 0x2100, 0x900e, 0x080c, 0x2873, 0x795e, + 0x00fe, 0x9186, 0x0081, 0x01f0, 0x2009, 0x0081, 0x00e0, 0x2009, + 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x78e7, 0x0000, 0x7932, + 0x7936, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x28bc, 0x00f6, + 0x2079, 0x1800, 0x7982, 0x2100, 0x900e, 0x797e, 0x080c, 0x2873, + 0x795e, 0x00fe, 0x8108, 0x080c, 0x66b9, 0x2b00, 0x00ce, 0x1904, + 0xbe7f, 0x6012, 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, + 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, + 0xb916, 0x2001, 0x0002, 0x080c, 0x666a, 0x6023, 0x0001, 0x6003, + 0x0001, 0x6007, 0x0002, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0028, + 0x080c, 0xbcb6, 0x2001, 0x0001, 0x0431, 0x00de, 0x009e, 0x00be, + 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, + 0x2004, 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xefed, 0x0190, 0x2071, + 0x0260, 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, + 0x0140, 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, + 0xba16, 0x00ee, 0x0005, 0x2030, 0x9005, 0x0158, 0x2001, 0x0007, + 0x080c, 0x666a, 0x080c, 0x57e9, 0x1120, 0x2001, 0x0007, 0x080c, + 0x6696, 0x2600, 0x9005, 0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, + 0x009e, 0xd0fc, 0x1178, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, + 0xbba0, 0x00be, 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4c44, + 0x004e, 0x003e, 0x080c, 0x3279, 0x6020, 0x9086, 0x000a, 0x1108, + 0x0005, 0x0804, 0xb2d3, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, + 0x1800, 0x7090, 0x9086, 0x0014, 0x1904, 0xc05a, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x0904, 0xc00d, 0x00d6, 0x080c, 0x7637, 0x01a0, + 0x0026, 0x2011, 0x0010, 0x080c, 0x6ac7, 0x002e, 0x0904, 0xc00c, + 0x080c, 0x57e9, 0x1598, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, + 0x0103, 0xa833, 0xdead, 0x0450, 0x6010, 0x00b6, 0x2058, 0xb910, + 0x00be, 0x9186, 0x00ff, 0x0580, 0x0026, 0x2011, 0x8008, 0x080c, + 0x6ac7, 0x002e, 0x0548, 0x6014, 0x9005, 0x090c, 0x0dc5, 0x2048, + 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030, + 0x900e, 0x2011, 0x4009, 0x080c, 0xd6bd, 0x0040, 0x6014, 0x2048, + 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058, + 0xb9a0, 0x0016, 0x080c, 0x3279, 0x080c, 0xb2d3, 0x001e, 0x080c, + 0x334c, 0x00de, 0x0804, 0xc05f, 0x00de, 0x080c, 0x57e9, 0x1170, + 0x6014, 0x9005, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, + 0x2021, 0x0006, 0x080c, 0x4dfb, 0x004e, 0x003e, 0x00d6, 0x6010, + 0x2058, 0x080c, 0x67bf, 0x080c, 0xbde2, 0x00de, 0x080c, 0xc2b5, + 0x1588, 0x6010, 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, + 0x080c, 0x666a, 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, + 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, + 0x4000, 0x080c, 0xd6bd, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x0029, 0x0130, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, + 0x009e, 0x080c, 0x3279, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c, + 0xb2d3, 0x0028, 0x080c, 0xbcb6, 0x9006, 0x080c, 0xbf7b, 0x001e, + 0x002e, 0x00ee, 0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086, + 0x0014, 0x1160, 0x2001, 0x0002, 0x080c, 0x666a, 0x6003, 0x0001, + 0x6007, 0x0001, 0x080c, 0x9547, 0x0804, 0x9ab1, 0x2001, 0x0001, + 0x0804, 0xbf7b, 0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004, + 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x666a, + 0x0804, 0xb2d3, 0x2001, 0x0001, 0x0804, 0xbf7b, 0x0002, 0xbd9f, + 0xc0a6, 0xbd9f, 0xc0e9, 0xbd9f, 0xc196, 0xc09b, 0xbda2, 0xbd9f, + 0xc1aa, 0xbd9f, 0xc1bc, 0x6604, 0x9686, 0x0003, 0x0904, 0xbfab, + 0x96b6, 0x001e, 0x1110, 0x080c, 0xb2d3, 0x0005, 0x00b6, 0x00d6, + 0x00c6, 0x080c, 0xc1ce, 0x11a0, 0x9006, 0x080c, 0x6656, 0x080c, + 0x3250, 0x080c, 0xd7f8, 0x2001, 0x0002, 0x080c, 0x666a, 0x6003, + 0x0001, 0x6007, 0x0002, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0428, + 0x2009, 0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, + 0xb840, 0x9084, 0x00ff, 0x9005, 0x0180, 0x8001, 0xb842, 0x601b, + 0x000a, 0x0098, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x908e, + 0x1900, 0x0158, 0x908e, 0x1e00, 0x0990, 0x080c, 0x3250, 0x080c, + 0xd7f8, 0x2001, 0x0001, 0x080c, 0xbf7b, 0x00ce, 0x00de, 0x00be, + 0x0005, 0x0096, 0x00b6, 0x0026, 0x9016, 0x080c, 0xc1dc, 0x00d6, + 0x2069, 0x197c, 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, + 0x9086, 0x007e, 0x1138, 0x2069, 0x1820, 0x2d04, 0x8000, 0x206a, + 0x00de, 0x0010, 0x00de, 0x0088, 0x9006, 0x080c, 0x6656, 0x2001, + 0x0002, 0x080c, 0x666a, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, + 0x9547, 0x080c, 0x9ab1, 0x0804, 0xc166, 0x080c, 0xd0d8, 0x01b0, + 0x6014, 0x2048, 0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, + 0x0016, 0x2001, 0x0002, 0x080c, 0xd71a, 0x00b0, 0x6014, 0x2048, + 0xa864, 0xd0fc, 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, + 0x2004, 0xd0dc, 0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, + 0x9005, 0x1110, 0x9006, 0x0c38, 0x080c, 0xbcb6, 0x2009, 0x026e, + 0x2134, 0x96b4, 0x00ff, 0x9686, 0x0005, 0x0520, 0x9686, 0x000b, + 0x01c8, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, + 0x0009, 0x01c0, 0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0190, + 0x2001, 0x0004, 0x080c, 0x666a, 0x2001, 0x0028, 0x601a, 0x6007, + 0x0052, 0x0020, 0x2001, 0x0001, 0x080c, 0xbf7b, 0x002e, 0x00be, + 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, 0x2048, 0x080c, + 0xd0d8, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, + 0x0108, 0x0c40, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, + 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, + 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, + 0x60c1, 0x00ee, 0x0010, 0x080c, 0x3250, 0x0860, 0x2001, 0x0004, + 0x080c, 0x666a, 0x080c, 0xc1dc, 0x1140, 0x6003, 0x0001, 0x6007, + 0x0003, 0x080c, 0x9547, 0x0804, 0x9ab1, 0x080c, 0xbcb6, 0x9006, + 0x0804, 0xbf7b, 0x0489, 0x1160, 0x2001, 0x0008, 0x080c, 0x666a, + 0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x9547, 0x0804, 0x9ab1, + 0x2001, 0x0001, 0x0804, 0xbf7b, 0x00f9, 0x1160, 0x2001, 0x000a, + 0x080c, 0x666a, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9547, + 0x0804, 0x9ab1, 0x2001, 0x0001, 0x0804, 0xbf7b, 0x2009, 0x026e, + 0x2104, 0x9086, 0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, + 0xff00, 0x9086, 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, + 0x00c6, 0x0016, 0x6110, 0x2158, 0x080c, 0x6733, 0x001e, 0x00ce, + 0x00be, 0x0005, 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, + 0x6010, 0x2058, 0x2009, 0x1837, 0x2104, 0x9085, 0x0003, 0x200a, + 0x080c, 0xc287, 0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd, 0x200a, + 0x080c, 0x6a9f, 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, + 0xec31, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, + 0x2009, 0x0001, 0x080c, 0x321b, 0x00e6, 0x2071, 0x1800, 0x080c, + 0x3000, 0x00ee, 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, + 0x080c, 0x334c, 0x8108, 0x1f04, 0xc220, 0x015e, 0x00ce, 0x080c, + 0xc1df, 0x2071, 0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, + 0x1837, 0x200c, 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, + 0x7038, 0xd0dc, 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1837, + 0x2102, 0x9184, 0x0050, 0x9086, 0x0050, 0x05d0, 0x2079, 0x0100, + 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006, + 0x8e70, 0x2e04, 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836, + 0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a, + 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x28bc, 0x080c, 0x7637, + 0x0170, 0x2071, 0x0260, 0x2069, 0x1982, 0x7048, 0x206a, 0x704c, + 0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xd4ee, 0x0040, + 0x2001, 0x0006, 0x080c, 0x666a, 0x080c, 0x3279, 0x080c, 0xb2d3, + 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, + 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff, + 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, + 0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, + 0x2b48, 0x2019, 0x000a, 0x080c, 0xc379, 0x1148, 0x2011, 0x027a, + 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xc379, 0x1100, 0x015e, + 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, + 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, + 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, + 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, + 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, + 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f1, + 0x252c, 0x2021, 0x19f7, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, + 0x7254, 0x7074, 0x9202, 0x1a04, 0xc345, 0x080c, 0x8cf7, 0x0904, + 0xc33e, 0x080c, 0xec62, 0x0904, 0xc33e, 0x6720, 0x9786, 0x0007, + 0x0904, 0xc33e, 0x2500, 0x9c06, 0x0904, 0xc33e, 0x2400, 0x9c06, + 0x05e8, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1580, 0x00c6, 0x6000, + 0x9086, 0x0004, 0x1110, 0x080c, 0x1a8e, 0x9786, 0x000a, 0x0148, + 0x080c, 0xd2e0, 0x1130, 0x00ce, 0x080c, 0xbcb6, 0x080c, 0xb306, + 0x00e8, 0x6014, 0x2048, 0x080c, 0xd0d8, 0x01a8, 0x9786, 0x0003, + 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, + 0x2048, 0x080c, 0x0fc0, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, + 0x6e92, 0x080c, 0xd2c3, 0x080c, 0xb306, 0x00ce, 0x9ce0, 0x0018, + 0x7068, 0x9c02, 0x1210, 0x0804, 0xc2e8, 0x012e, 0x000e, 0x002e, + 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786, + 0x0006, 0x1118, 0x080c, 0xebd4, 0x0c30, 0x9786, 0x0009, 0x1148, + 0x6000, 0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c, 0xb352, + 0x08e0, 0x9786, 0x000a, 0x0980, 0x0820, 0x220c, 0x2304, 0x9106, + 0x1130, 0x8210, 0x8318, 0x1f04, 0xc365, 0x9006, 0x0005, 0x2304, + 0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, 0x0001, + 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, 0x908c, + 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, 0x20a9, + 0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, 0x1dc8, + 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, 0x0218, + 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, 0x001e, + 0x01ce, 0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106, 0x1130, + 0x8210, 0x8318, 0x1f04, 0xc3a3, 0x9006, 0x0005, 0x918d, 0x0001, + 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0dc5, 0x080c, 0xd2cf, + 0x0120, 0x080c, 0xd2e0, 0x0168, 0x0028, 0x080c, 0x3279, 0x080c, + 0xd2e0, 0x0138, 0x080c, 0x99a5, 0x080c, 0xb2d3, 0x080c, 0x9ab1, + 0x0005, 0x080c, 0xbcb6, 0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182, + 0x0040, 0x0208, 0x000a, 0x0005, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, + 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3ea, + 0xc3ea, 0xc3ea, 0xc3ea, 0xc3e8, 0xc3e8, 0xc3e8, 0xc3ea, 0xc3e8, + 0x080c, 0x0dc5, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c, + 0x94ff, 0x0126, 0x2091, 0x8000, 0x080c, 0x9ab1, 0x012e, 0x0005, + 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xc482, + 0x9186, 0x0027, 0x1520, 0x080c, 0x99a5, 0x080c, 0x3250, 0x080c, + 0xd7f8, 0x0096, 0x6114, 0x2148, 0x080c, 0xd0d8, 0x0198, 0x080c, + 0xd2e0, 0x1118, 0x080c, 0xbcb6, 0x0068, 0xa867, 0x0103, 0xa87b, + 0x0029, 0xa877, 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6e9f, + 0x080c, 0xd2c3, 0x009e, 0x080c, 0xb2d3, 0x0804, 0x9ab1, 0x9186, + 0x0014, 0x1120, 0x6004, 0x9082, 0x0040, 0x00b8, 0x9186, 0x0046, + 0x0150, 0x9186, 0x0045, 0x0138, 0x9186, 0x0053, 0x0120, 0x9186, + 0x0048, 0x190c, 0x0dc5, 0x080c, 0xd809, 0x0130, 0x6000, 0x9086, + 0x0002, 0x1110, 0x0804, 0xc4c0, 0x0005, 0x0002, 0xc45c, 0xc45a, + 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, 0xc45a, + 0xc45a, 0xc477, 0xc477, 0xc477, 0xc477, 0xc45a, 0xc477, 0xc45a, + 0xc477, 0xc45a, 0x080c, 0x0dc5, 0x080c, 0x99a5, 0x0096, 0x6114, + 0x2148, 0x080c, 0xd0d8, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, + 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, 0x080c, 0x6e9f, 0x080c, + 0xd2c3, 0x009e, 0x080c, 0xb2d3, 0x080c, 0x9ab1, 0x0005, 0x080c, + 0x99a5, 0x080c, 0xd2e0, 0x090c, 0xbcb6, 0x080c, 0xb2d3, 0x080c, + 0x9ab1, 0x0005, 0x0002, 0xc499, 0xc497, 0xc497, 0xc497, 0xc497, + 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, 0xc497, 0xc4b0, 0xc4b0, + 0xc4b0, 0xc4b0, 0xc497, 0xc4ba, 0xc497, 0xc4b0, 0xc497, 0x080c, + 0x0dc5, 0x0096, 0x080c, 0x99a5, 0x6014, 0x2048, 0x2001, 0x1988, + 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140, 0x6003, 0x0004, 0xa87c, + 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005, 0x6003, 0x0002, 0x0cb8, + 0x080c, 0x99a5, 0x080c, 0xd7fb, 0x080c, 0xd800, 0x6003, 0x000f, + 0x0804, 0x9ab1, 0x080c, 0x99a5, 0x080c, 0xb2d3, 0x0804, 0x9ab1, + 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, + 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4de, 0xc5be, 0xc4dc, + 0xc5f2, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, 0xc4dc, + 0xc4dc, 0xc4dc, 0xc4dc, 0xc5f2, 0x080c, 0x0dc5, 0x00b6, 0x0096, + 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff, 0x86ff, 0x1528, 0x6010, + 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc5ad, 0xa87b, 0x0000, 0xa867, + 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, + 0x190c, 0xc78b, 0x080c, 0x6cb9, 0x6210, 0x2258, 0xba3c, 0x82ff, + 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4, 0x1904, 0xc58e, 0x080c, + 0xb2d3, 0x009e, 0x00be, 0x0005, 0x968c, 0x0c00, 0x0150, 0x6010, + 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc592, 0x7348, 0xab92, 0x734c, + 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508, 0x9186, 0x0028, + 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, 0xa87b, 0x0015, + 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0148, + 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118, 0xa992, 0xaa8e, + 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, + 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4, 0x01d8, 0x9686, + 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0x0804, 0xc4e5, + 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, + 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, + 0xcc85, 0x003e, 0xd6cc, 0x0904, 0xc4fa, 0x7154, 0xa98a, 0x81ff, + 0x0904, 0xc4fa, 0x9192, 0x0021, 0x1278, 0x8304, 0x9098, 0x0018, + 0x2011, 0x0029, 0x080c, 0xcc85, 0x2011, 0x0205, 0x2013, 0x0000, + 0x080c, 0xd786, 0x0804, 0xc4fa, 0xa868, 0xd0fc, 0x0120, 0x2009, + 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c, 0xcc24, 0x00ae, + 0x080c, 0xd786, 0x080c, 0xcc75, 0x0804, 0xc4fc, 0x080c, 0xd3d8, + 0x0804, 0xc509, 0xa87c, 0xd0ac, 0x0904, 0xc515, 0xa880, 0xd0bc, + 0x1904, 0xc515, 0x9684, 0x0400, 0x0130, 0xa838, 0xab34, 0x9305, + 0x0904, 0xc515, 0x00b8, 0x7348, 0xa838, 0x9306, 0x1198, 0x734c, + 0xa834, 0x931e, 0x0904, 0xc515, 0x0068, 0xa87c, 0xd0ac, 0x0904, + 0xc4ed, 0xa838, 0xa934, 0x9105, 0x0904, 0xc4ed, 0xa880, 0xd0bc, + 0x1904, 0xc4ed, 0x080c, 0xd412, 0x0804, 0xc509, 0x0096, 0x00f6, + 0x6003, 0x0003, 0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00, + 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003, + 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, + 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, + 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043, + 0x0000, 0x2c10, 0x080c, 0x1be0, 0x080c, 0x9564, 0x080c, 0x9bd3, + 0x009e, 0x0005, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, + 0x0208, 0x000a, 0x0005, 0xc60f, 0xc60f, 0xc60f, 0xc60f, 0xc60f, + 0xc611, 0xc6a7, 0xc60f, 0xc60f, 0xc6be, 0xc74e, 0xc60f, 0xc60f, + 0xc60f, 0xc60f, 0xc763, 0xc60f, 0xc60f, 0xc60f, 0xc60f, 0x080c, + 0x0dc5, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, + 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, + 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, + 0x00be, 0x86ff, 0x0904, 0xc6a2, 0x9694, 0xff00, 0x9284, 0x0c00, + 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, + 0xc6a2, 0x080c, 0x100e, 0x090c, 0x0dc5, 0x2900, 0xb07a, 0xb77c, + 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, + 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, + 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, + 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, + 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, + 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, + 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, + 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, + 0x080c, 0xcc85, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, + 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, + 0x0029, 0x080c, 0xcc85, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, + 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, + 0x080c, 0xcc24, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6, + 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, + 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae, + 0x00fe, 0x2c10, 0x080c, 0x1be0, 0x0804, 0xa6b6, 0x6003, 0x0002, + 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c, + 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078, + 0x080c, 0x1768, 0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002, + 0x009e, 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x0096, 0x2001, 0x1988, + 0x2004, 0x6042, 0x080c, 0x9a61, 0x080c, 0x9bd3, 0x6114, 0x2148, + 0xa97c, 0xd1e4, 0x0904, 0xc749, 0xd1cc, 0x05c8, 0xa978, 0xa868, + 0xd0fc, 0x0540, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f, + 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098, + 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e, + 0xc0cc, 0xa87e, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0fc0, + 0x001e, 0x0458, 0x0016, 0x080c, 0x0fc0, 0x009e, 0xa87c, 0xc0cc, + 0xa87e, 0xa974, 0x0016, 0x080c, 0xcc75, 0x001e, 0x00f0, 0xa867, + 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0180, 0x9086, + 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd1dc, 0x0118, 0xa87b, + 0x0015, 0x0038, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, + 0x0000, 0x0016, 0x080c, 0x6cb9, 0x001e, 0xd1e4, 0x1120, 0x080c, + 0xb2d3, 0x009e, 0x0005, 0x080c, 0xd3d8, 0x0cd8, 0x6004, 0x9086, + 0x0040, 0x1120, 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x2019, 0x0001, + 0x080c, 0xaa49, 0x6003, 0x0002, 0x080c, 0xd800, 0x080c, 0x9a61, + 0x080c, 0x9bd3, 0x0005, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, + 0x99a5, 0x080c, 0x9ab1, 0x2019, 0x0001, 0x080c, 0xaa49, 0x080c, + 0x9a61, 0x080c, 0x3250, 0x080c, 0xd7f8, 0x0096, 0x6114, 0x2148, + 0x080c, 0xd0d8, 0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, + 0x0000, 0x080c, 0x6e9f, 0x080c, 0xd2c3, 0x009e, 0x080c, 0xb2d3, + 0x080c, 0x9bd3, 0x0005, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, + 0x0007, 0x8002, 0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016, + 0x2009, 0x1a7d, 0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992, + 0xa88e, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, + 0x000a, 0x0005, 0xc7be, 0xc7be, 0xc7be, 0xc7be, 0xc7be, 0xc7c0, + 0xc7be, 0xc7be, 0xc866, 0xc7be, 0xc7be, 0xc7be, 0xc7be, 0xc7be, + 0xc7be, 0xc7be, 0xc7be, 0xc7be, 0xc7be, 0xc998, 0x080c, 0x0dc5, + 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, 0x2150, + 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, + 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, + 0x86ff, 0x0904, 0xc85f, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, + 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xc85f, + 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, + 0x0c38, 0x080c, 0x100e, 0x090c, 0x0dc5, 0x2900, 0xb07a, 0xb77c, + 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, + 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000, 0x9635, 0xae76, + 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, + 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, + 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, + 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, + 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, + 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, + 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xcc85, 0x003e, + 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, + 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xcc85, + 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, + 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xcc24, 0x080c, + 0x1a5a, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x2001, 0x1988, + 0x2004, 0x6042, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, + 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002, 0xa97c, 0xd1e4, + 0x0904, 0xc993, 0x6043, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, + 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc962, 0xa978, 0xa868, + 0xd0fc, 0x0904, 0xc923, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, + 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, + 0xc8f0, 0x9086, 0x0028, 0x1904, 0xc8dc, 0xa87b, 0x001c, 0xb07b, + 0x001c, 0x0804, 0xc8f8, 0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, + 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, + 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, + 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, + 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e, 0x00be, 0x9006, + 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, 0xa87e, 0xd0cc, 0x0140, + 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fc0, 0x009e, + 0x080c, 0xd412, 0x0804, 0xc993, 0xd1dc, 0x0158, 0xa87b, 0x0015, + 0xb07b, 0x0015, 0x080c, 0xd6a6, 0x0118, 0xb174, 0xc1dc, 0xb176, + 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, + 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc78b, + 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa860, 0x20e8, + 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, 0x0020, 0x8a06, 0x8006, + 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, 0xffc0, 0x9080, 0x0019, + 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, 0x000e, 0xc0cc, 0xa87e, + 0x080c, 0xd786, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0fc0, + 0x001e, 0x0804, 0xc98f, 0x0016, 0x00a6, 0x2150, 0xb174, 0x9184, + 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, 0x1128, 0xa87b, + 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, 0xa87b, 0x0015, + 0xb07b, 0x0015, 0x080c, 0xd6a6, 0x0118, 0xb174, 0xc1dc, 0xb176, + 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, 0x0007, 0x0040, + 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc78b, + 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, 0x00ae, 0x080c, + 0x0fc0, 0x009e, 0x080c, 0xd786, 0xa974, 0x0016, 0x080c, 0xcc75, + 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, 0x90b6, + 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00d0, + 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xd6a6, 0x0118, 0xa974, + 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, 0x0007, 0x0050, + 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, + 0x190c, 0xc78b, 0xa974, 0x0016, 0x080c, 0x6cb9, 0x001e, 0xd1e4, + 0x1120, 0x080c, 0xb2d3, 0x009e, 0x0005, 0x080c, 0xd3d8, 0x0cd8, + 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c, 0x1a7a, 0x009e, + 0x0005, 0x080c, 0x99a5, 0x0010, 0x080c, 0x9a61, 0x080c, 0xd0d8, + 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xd2e0, 0x1118, 0x080c, + 0xbcb6, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c, 0xd18c, + 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e, 0x0029, 0x1110, + 0x080c, 0xef85, 0xa877, 0x0000, 0x080c, 0x6e9f, 0x009e, 0x080c, + 0xb2d3, 0x080c, 0x9ab1, 0x0804, 0x9bd3, 0xa87b, 0x0004, 0x0c90, + 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, + 0x0208, 0x000a, 0x0005, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, + 0xc9f1, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, + 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0xc9ef, 0x080c, + 0x0dc5, 0x080c, 0x57dd, 0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, + 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, + 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139, 0x0128, 0xa867, + 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, + 0x080c, 0x6e9f, 0x009e, 0x0804, 0xb2d3, 0x9182, 0x0085, 0x0002, + 0xca27, 0xca25, 0xca25, 0xca33, 0xca25, 0xca25, 0xca25, 0xca25, + 0xca25, 0xca25, 0xca25, 0xca25, 0xca25, 0x080c, 0x0dc5, 0x6003, + 0x0001, 0x6106, 0x080c, 0x94ff, 0x0126, 0x2091, 0x8000, 0x080c, + 0x9ab1, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, + 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xd0c6, 0x01f8, 0x2268, + 0x6800, 0x9086, 0x0000, 0x01d0, 0x6010, 0x6d10, 0x952e, 0x11b0, + 0x00c6, 0x2d60, 0x00d6, 0x080c, 0xcce6, 0x00de, 0x00ce, 0x0158, + 0x702c, 0xd084, 0x1118, 0x080c, 0xccb0, 0x0010, 0x6803, 0x0002, + 0x6007, 0x0086, 0x0028, 0x080c, 0xccd2, 0x0d90, 0x6007, 0x0087, + 0x6003, 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x7220, 0x080c, + 0xd0c6, 0x0178, 0x6810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, + 0x0140, 0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60, 0x080c, 0xd412, + 0x00ce, 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, + 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dc5, 0x908a, 0x0092, + 0x1a0c, 0x0dc5, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, + 0x9186, 0x0014, 0x190c, 0x0dc5, 0x080c, 0x99a5, 0x0096, 0x6014, + 0x2048, 0x080c, 0xd0d8, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, + 0xa87b, 0x0029, 0x080c, 0x6e9f, 0x009e, 0x080c, 0xb306, 0x0804, + 0x9ab1, 0xcab6, 0xcab8, 0xcab8, 0xcab6, 0xcab6, 0xcab6, 0xcab6, + 0xcab6, 0xcab6, 0xcab6, 0xcab6, 0xcab6, 0xcab6, 0x080c, 0x0dc5, + 0x080c, 0x99a5, 0x080c, 0xb306, 0x080c, 0x9ab1, 0x0005, 0x9186, + 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x04b8, 0x9186, + 0x0027, 0x11f8, 0x080c, 0x99a5, 0x080c, 0x3250, 0x080c, 0xd7f8, + 0x0096, 0x6014, 0x2048, 0x080c, 0xd0d8, 0x0150, 0xa867, 0x0103, + 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6e9f, 0x080c, 0xd2c3, + 0x009e, 0x080c, 0xb2d3, 0x080c, 0x9ab1, 0x0005, 0x080c, 0xb36d, + 0x0ce0, 0x9186, 0x0014, 0x1dd0, 0x080c, 0x99a5, 0x0096, 0x6014, + 0x2048, 0x080c, 0xd0d8, 0x0d60, 0xa867, 0x0103, 0xa877, 0x0000, + 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x08f0, 0x0002, 0xcb0e, + 0xcb0c, 0xcb0c, 0xcb0c, 0xcb0c, 0xcb0c, 0xcb26, 0xcb0c, 0xcb0c, + 0xcb0c, 0xcb0c, 0xcb0c, 0xcb0c, 0x080c, 0x0dc5, 0x080c, 0x99a5, + 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, + 0x0035, 0x1118, 0x2001, 0x1986, 0x0010, 0x2001, 0x1987, 0x2004, + 0x601a, 0x6003, 0x000c, 0x080c, 0x9ab1, 0x0005, 0x080c, 0x99a5, + 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, + 0x0035, 0x1118, 0x2001, 0x1986, 0x0010, 0x2001, 0x1987, 0x2004, + 0x601a, 0x6003, 0x000e, 0x080c, 0x9ab1, 0x0005, 0x9182, 0x0092, + 0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0xb36d, 0xcb54, + 0xcb54, 0xcb54, 0xcb54, 0xcb56, 0xcba3, 0xcb54, 0xcb54, 0xcb54, + 0xcb54, 0xcb54, 0xcb54, 0xcb54, 0x080c, 0x0dc5, 0x0096, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, + 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, + 0x009e, 0x0804, 0xcbb7, 0x080c, 0xd0d8, 0x1118, 0x080c, 0xd2c3, + 0x0068, 0x6014, 0x2048, 0xa87c, 0xd0e4, 0x1110, 0x080c, 0xd2c3, + 0xa867, 0x0103, 0x080c, 0xd7c3, 0x080c, 0x6e9f, 0x00d6, 0x2c68, + 0x080c, 0xb27d, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, + 0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, + 0x613e, 0x6910, 0x6112, 0x080c, 0xd554, 0x6954, 0x6156, 0x6023, + 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x2d60, 0x00de, 0x080c, + 0xb2d3, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, + 0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, + 0x2c68, 0x080c, 0xd759, 0x11f0, 0x080c, 0xb27d, 0x01d8, 0x6106, + 0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, + 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, + 0x693c, 0x613e, 0x6954, 0x6156, 0x080c, 0xd554, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x2d60, 0x00de, 0x0804, 0xb2d3, 0x0096, 0x6014, + 0x2048, 0x080c, 0xd0d8, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, + 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, + 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xd3d4, 0xa877, + 0x0000, 0x080c, 0x6e9f, 0x080c, 0xd2c3, 0x009e, 0x0804, 0xb2d3, + 0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xd0d8, 0x0140, 0xa867, + 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x6e9f, 0x009e, + 0x001e, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, + 0x0027, 0x0118, 0x080c, 0xb36d, 0x0030, 0x080c, 0x99a5, 0x080c, + 0xb306, 0x080c, 0x9ab1, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, + 0x2029, 0x0001, 0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, + 0x2130, 0x8304, 0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, + 0x080c, 0xcc85, 0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, + 0x0fc0, 0x080c, 0x100e, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, + 0x0000, 0x2920, 0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, + 0x001b, 0x0499, 0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, + 0x2011, 0x001b, 0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, + 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, + 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, + 0xb566, 0x009e, 0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, + 0xa804, 0x9055, 0x0130, 0xa807, 0x0000, 0x080c, 0x6e9f, 0x2a48, + 0x0cb8, 0x080c, 0x6e9f, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, + 0x7814, 0x9085, 0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, + 0x20a9, 0x0001, 0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, + 0x0000, 0x2300, 0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, + 0x1148, 0x2018, 0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, + 0x0080, 0x7816, 0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, + 0x6920, 0x9186, 0x0003, 0x0118, 0x9186, 0x0002, 0x11d0, 0x00c6, + 0x00d6, 0x00e6, 0x2d60, 0x0096, 0x6014, 0x2048, 0x080c, 0xd0d8, + 0x0150, 0x2001, 0x0006, 0xa980, 0xc1d5, 0x080c, 0x710b, 0x080c, + 0x6e92, 0x080c, 0xd2c3, 0x009e, 0x080c, 0xb306, 0x00ee, 0x00de, + 0x00ce, 0x0005, 0x00c6, 0x702c, 0xd084, 0x1170, 0x6008, 0x2060, + 0x6020, 0x9086, 0x0002, 0x1140, 0x6104, 0x9186, 0x0085, 0x0118, + 0x9186, 0x008b, 0x1108, 0x9006, 0x00ce, 0x0005, 0x0066, 0x0126, + 0x2091, 0x8000, 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083, + 0x012e, 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, + 0x0000, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, + 0xcd1d, 0xcd1d, 0xcd18, 0xcd3f, 0xcd0f, 0xcd18, 0xcd3f, 0xcd18, + 0xcd18, 0x9265, 0xcd18, 0xcd18, 0xcd18, 0xcd0f, 0xcd0f, 0x080c, + 0x0dc5, 0x0036, 0x2019, 0x0010, 0x080c, 0xe746, 0x003e, 0x0005, + 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096, 0x86ff, 0x11d8, + 0x6014, 0x2048, 0x080c, 0xd0d8, 0x01c0, 0xa864, 0x9086, 0x0139, + 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001, + 0x0005, 0x080c, 0x710b, 0x080c, 0xd3d4, 0x080c, 0x6e92, 0x080c, + 0xb306, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x6000, + 0x908a, 0x0010, 0x1a0c, 0x0dc5, 0x0002, 0xcd55, 0xcd85, 0xcd57, + 0xcda6, 0xcd80, 0xcd55, 0xcd18, 0xcd1d, 0xcd1d, 0xcd18, 0xcd18, + 0xcd18, 0xcd18, 0xcd18, 0xcd18, 0xcd18, 0x080c, 0x0dc5, 0x86ff, + 0x1520, 0x6020, 0x9086, 0x0006, 0x0500, 0x0096, 0x6014, 0x2048, + 0x080c, 0xd0d8, 0x0168, 0xa87c, 0xd0cc, 0x0140, 0x0096, 0xc0cc, + 0xa87e, 0xa878, 0x2048, 0x080c, 0x0fc0, 0x009e, 0x080c, 0xd3d4, + 0x009e, 0x080c, 0xd79d, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0002, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x9085, 0x0001, 0x0005, + 0x0066, 0x080c, 0x1a8e, 0x006e, 0x0890, 0x00e6, 0x2071, 0x19e8, + 0x7024, 0x9c06, 0x1120, 0x080c, 0xa9d3, 0x00ee, 0x0840, 0x6020, + 0x9084, 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, + 0x0001, 0x2c40, 0x080c, 0xaafb, 0x009e, 0x008e, 0x0010, 0x080c, + 0xa8d0, 0x00ee, 0x1904, 0xcd57, 0x0804, 0xcd18, 0x0036, 0x00e6, + 0x2071, 0x19e8, 0x703c, 0x9c06, 0x1138, 0x901e, 0x080c, 0xaa49, + 0x00ee, 0x003e, 0x0804, 0xcd57, 0x080c, 0xac2b, 0x00ee, 0x003e, + 0x1904, 0xcd57, 0x0804, 0xcd18, 0x00c6, 0x6020, 0x9084, 0x000f, + 0x0013, 0x00ce, 0x0005, 0xcdd9, 0xcea3, 0xd011, 0xcde3, 0xb306, + 0xcdd9, 0xe73c, 0xd805, 0xcea3, 0x9237, 0xd09d, 0xcdd2, 0xcdd2, + 0xcdd2, 0xcdd2, 0x080c, 0x0dc5, 0x080c, 0xd2e0, 0x1110, 0x080c, + 0xbcb6, 0x0005, 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x0804, 0xb2d3, + 0x601b, 0x0001, 0x0005, 0x080c, 0xd0d8, 0x0130, 0x6014, 0x0096, + 0x2048, 0x2c00, 0xa896, 0x009e, 0x6000, 0x908a, 0x0010, 0x1a0c, + 0x0dc5, 0x0002, 0xce02, 0xce04, 0xce28, 0xce3c, 0xce62, 0xce02, + 0xcdd9, 0xcdd9, 0xcdd9, 0xce3c, 0xce3c, 0xce02, 0xce02, 0xce02, + 0xce02, 0xce46, 0x080c, 0x0dc5, 0x00e6, 0x6014, 0x0096, 0x2048, + 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19e8, 0x7024, 0x9c06, + 0x01a0, 0x080c, 0xa8d0, 0x080c, 0xd79d, 0x6007, 0x0085, 0x6003, + 0x000b, 0x6023, 0x0002, 0x2001, 0x1987, 0x2004, 0x601a, 0x080c, + 0x94ff, 0x080c, 0x9ab1, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, + 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, + 0xd79d, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, + 0x94ff, 0x080c, 0x9ab1, 0x0005, 0x0096, 0x601b, 0x0001, 0x6014, + 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x57dd, + 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190, 0xa864, 0xa867, 0x0103, + 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150, 0xa867, 0x0139, 0xa87b, + 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004, 0x080c, 0x6e9f, 0x009e, + 0x0804, 0xb2d3, 0x6014, 0x0096, 0x904d, 0x05c0, 0xa97c, 0xd1e4, + 0x05a8, 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, + 0xa884, 0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, + 0x0030, 0x2c08, 0x080c, 0x1611, 0x2001, 0x030c, 0x2004, 0x9086, + 0x0041, 0x1198, 0x6014, 0x0096, 0x904d, 0x090c, 0x0dc5, 0xa880, + 0xd0f4, 0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b, 0x0002, 0x0068, + 0x009e, 0x00c6, 0x080c, 0x236e, 0x00ce, 0x6000, 0x9086, 0x0004, + 0x1120, 0x2009, 0x0048, 0x080c, 0xb352, 0x0005, 0x009e, 0x080c, + 0x1a8e, 0x0804, 0xce28, 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0dc5, + 0x000b, 0x0005, 0xceba, 0xcde0, 0xcebc, 0xceba, 0xcebc, 0xcebc, + 0xcdda, 0xceba, 0xcdd4, 0xcdd4, 0xceba, 0xceba, 0xceba, 0xceba, + 0xceba, 0xceba, 0x080c, 0x0dc5, 0x6010, 0x00b6, 0x2058, 0xb804, + 0x9084, 0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0dc5, 0x00b6, + 0x0013, 0x00be, 0x0005, 0xced7, 0xcfa8, 0xced9, 0xcf19, 0xced9, + 0xcf19, 0xced9, 0xcee7, 0xced7, 0xcf19, 0xced7, 0xcf08, 0x080c, + 0x0dc5, 0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, + 0x908e, 0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xcfa4, 0x6004, + 0x080c, 0xd2e0, 0x0904, 0xcfc1, 0x908e, 0x0004, 0x1110, 0x080c, + 0x3279, 0x908e, 0x0021, 0x0904, 0xcfc5, 0x908e, 0x0022, 0x0904, + 0xd00c, 0x908e, 0x003d, 0x0904, 0xcfc5, 0x908e, 0x0039, 0x0904, + 0xcfc9, 0x908e, 0x0035, 0x0904, 0xcfc9, 0x908e, 0x001e, 0x0178, + 0x908e, 0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, + 0x9086, 0x0006, 0x0110, 0x080c, 0x3250, 0x080c, 0xbcb6, 0x0804, + 0xb306, 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xcf95, + 0x9186, 0x0002, 0x1904, 0xcf6a, 0x2001, 0x1837, 0x2004, 0xd08c, + 0x11c8, 0x080c, 0x7637, 0x11b0, 0x080c, 0xd7e3, 0x0138, 0x080c, + 0x765a, 0x1120, 0x080c, 0x7541, 0x0804, 0xcff5, 0x2001, 0x197d, + 0x2003, 0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x7563, + 0x0804, 0xcff5, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x0080, 0x0130, + 0x2001, 0x1837, 0x2004, 0xd0ac, 0x1904, 0xcff5, 0xb8a0, 0x9082, + 0x0081, 0x1a04, 0xcff5, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, + 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, + 0x6043, 0x0000, 0x080c, 0xb27d, 0x0128, 0x2b00, 0x6012, 0x6023, + 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, + 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1837, + 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x60c1, + 0x00ee, 0x080c, 0xbcb6, 0x0030, 0x080c, 0xbcb6, 0x080c, 0x3250, + 0x080c, 0xd7f8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x3279, + 0x012e, 0x00ee, 0x080c, 0xb306, 0x0005, 0x2001, 0x0002, 0x080c, + 0x666a, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9547, 0x080c, + 0x9ab1, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x3279, 0x0804, 0xcf15, + 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, + 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xcf6a, 0x8001, 0xb842, + 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x00de, 0x00ce, + 0x0898, 0x080c, 0xbcb6, 0x0804, 0xcf17, 0x080c, 0xbcf2, 0x0804, + 0xcf17, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xd759, 0x00de, 0x0118, + 0x080c, 0xb2d3, 0x0408, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, + 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x603c, 0x600a, 0x2001, 0x1987, 0x2004, 0x601a, 0x602c, 0x2c08, + 0x2060, 0x6024, 0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026, 0x2160, + 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0005, 0x00de, 0x00ce, 0x080c, + 0xbcb6, 0x080c, 0x3250, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, + 0x3279, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x6043, + 0x0000, 0x012e, 0x00ee, 0x0005, 0x080c, 0xb708, 0x1904, 0xcfc1, + 0x0005, 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0dc5, 0x0096, 0x00d6, + 0x001b, 0x00de, 0x009e, 0x0005, 0xd02c, 0xd02c, 0xd02c, 0xd02c, + 0xd02c, 0xd02c, 0xd02c, 0xd02c, 0xd02c, 0xcdd9, 0xd02c, 0xcde0, + 0xd02e, 0xcde0, 0xd048, 0xd02c, 0x080c, 0x0dc5, 0x6004, 0x9086, + 0x008b, 0x01b0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, + 0x1130, 0x602c, 0x9080, 0x0009, 0x200c, 0xc185, 0x2102, 0x6007, + 0x008b, 0x6003, 0x000d, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0005, + 0x080c, 0xd7d7, 0x0118, 0x080c, 0xd7ea, 0x0010, 0x080c, 0xd7f8, + 0x080c, 0xd2c3, 0x080c, 0xd0d8, 0x0570, 0x080c, 0x3250, 0x080c, + 0xd0d8, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, + 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6e9f, 0x2c68, + 0x080c, 0xb27d, 0x0150, 0x6810, 0x6012, 0x080c, 0xd554, 0x00c6, + 0x2d60, 0x080c, 0xb306, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, + 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9547, + 0x080c, 0x9ab1, 0x00c8, 0x080c, 0xd7d7, 0x0138, 0x6034, 0x9086, + 0x4000, 0x1118, 0x080c, 0x3250, 0x08d0, 0x6034, 0x908c, 0xff00, + 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, + 0x3250, 0x0868, 0x080c, 0xb306, 0x0005, 0x6000, 0x908a, 0x0010, + 0x1a0c, 0x0dc5, 0x0002, 0xd0b3, 0xd0b3, 0xd0b7, 0xd0b5, 0xd0c1, + 0xd0b3, 0xd0b3, 0xb306, 0xd0b3, 0xd0b3, 0xd0b3, 0xd0b3, 0xd0b3, + 0xd0b3, 0xd0b3, 0xd0b3, 0x080c, 0x0dc5, 0x080c, 0xac2b, 0x6114, + 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x6e9f, 0x009e, 0x0804, + 0xb2d3, 0x601c, 0xd084, 0x190c, 0x1a8e, 0x0c88, 0x9284, 0x0007, + 0x1158, 0x9282, 0x1cd0, 0x0240, 0x2001, 0x181a, 0x2004, 0x9202, + 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0096, 0x0028, + 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, 0x0006, 0x9984, 0xf000, + 0x9086, 0xf000, 0x0110, 0x080c, 0x10b9, 0x000e, 0x009e, 0x0005, + 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, + 0x1cd0, 0x2071, 0x1800, 0x7354, 0x7074, 0x9302, 0x1640, 0x6020, + 0x9206, 0x11f8, 0x080c, 0xd7e3, 0x0180, 0x9286, 0x0001, 0x1168, + 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, 0x3250, 0x080c, 0xd7f8, + 0x00c6, 0x080c, 0xb306, 0x00ce, 0x0060, 0x080c, 0xd4ce, 0x0148, + 0x080c, 0xd2e0, 0x1110, 0x080c, 0xbcb6, 0x00c6, 0x080c, 0xb2d3, + 0x00ce, 0x9ce0, 0x0018, 0x7068, 0x9c02, 0x1208, 0x08a0, 0x012e, + 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, + 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, 0x2061, 0x1ab7, 0x6112, + 0x080c, 0x3250, 0x9006, 0x0010, 0x9085, 0x0001, 0x001e, 0x00ce, + 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xb27d, + 0x01b0, 0x6656, 0x2b00, 0x6012, 0x080c, 0x57dd, 0x0118, 0x080c, + 0xd207, 0x0168, 0x080c, 0xd554, 0x6023, 0x0003, 0x2009, 0x004b, + 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, + 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0xb325, + 0x0560, 0x6057, 0x0000, 0x2b00, 0x6012, 0x080c, 0xd554, 0x6023, + 0x0003, 0x0016, 0x080c, 0x96a4, 0x0076, 0x903e, 0x080c, 0x9577, + 0x2c08, 0x080c, 0xe91c, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, + 0xb2d3, 0x9085, 0x0001, 0x0070, 0x080c, 0x57dd, 0x0128, 0xd18c, + 0x1170, 0x080c, 0xd207, 0x0148, 0x2009, 0x004c, 0x080c, 0xb352, + 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, + 0x6016, 0x0c90, 0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, + 0x00c6, 0x0046, 0x0016, 0x080c, 0xb27d, 0x2c78, 0x05a0, 0x7e56, + 0x2b00, 0x7812, 0x7823, 0x0003, 0x0016, 0x2021, 0x0005, 0x080c, + 0xd219, 0x001e, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, + 0x2001, 0x1980, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xb2d3, + 0x00d0, 0x2001, 0x197f, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, + 0xb2d3, 0x0088, 0x2f60, 0x080c, 0x57dd, 0x0138, 0xd18c, 0x1118, + 0x04f1, 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, + 0xb352, 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, + 0x00f6, 0x00c6, 0x0046, 0x080c, 0xb27d, 0x2c78, 0x0508, 0x7e56, + 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, + 0x009e, 0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, + 0xb2d3, 0x0060, 0x2f60, 0x080c, 0x57dd, 0x0120, 0xd18c, 0x1160, + 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0xb352, 0x9085, 0x0001, + 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, + 0x080c, 0x4be4, 0x00ce, 0x1120, 0x080c, 0xb2d3, 0x9006, 0x0005, + 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, + 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x6858, + 0x0158, 0x2001, 0xd21e, 0x0006, 0x900e, 0x2400, 0x080c, 0x710b, + 0x080c, 0x6e9f, 0x000e, 0x0807, 0x2418, 0x080c, 0x993f, 0xbaa0, + 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, 0x96bc, + 0x008e, 0x080c, 0x9577, 0x2f08, 0x2648, 0x080c, 0xe91c, 0xb93c, + 0x81ff, 0x090c, 0x978f, 0x080c, 0x9ab1, 0x012e, 0x007e, 0x009e, + 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xb27d, 0x0190, + 0x660a, 0x2b08, 0x6112, 0x080c, 0xd554, 0x6023, 0x0001, 0x2900, + 0x6016, 0x2009, 0x001f, 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, + 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, + 0x080c, 0xb325, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, 0xd554, + 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, 0x1768, + 0x00fe, 0x2009, 0x0021, 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, + 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, 0x0126, + 0x0016, 0x2091, 0x8000, 0x080c, 0xb27d, 0x0198, 0x660a, 0x2b08, + 0x6112, 0x080c, 0xd554, 0x6023, 0x0001, 0x2900, 0x6016, 0x001e, + 0x0016, 0x080c, 0xb352, 0x9085, 0x0001, 0x001e, 0x012e, 0x00ce, + 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, + 0xb325, 0x0188, 0x2b08, 0x6112, 0x080c, 0xd554, 0x6023, 0x0001, + 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xb352, 0x9085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, 0x0830, + 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, 0xba3c, + 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, 0x0005, 0x0006, + 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, 0x0003, 0x0128, + 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, + 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, 0x01a8, 0x6014, + 0x904d, 0x080c, 0xd0d8, 0x0180, 0xa864, 0x9086, 0x0139, 0x0170, + 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, 0x0128, 0xa868, + 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x008e, + 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xb325, + 0x0198, 0x2b08, 0x6112, 0x080c, 0xd554, 0x6023, 0x0001, 0x2900, + 0x6016, 0x080c, 0x3250, 0x2009, 0x0028, 0x080c, 0xb352, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, + 0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, + 0x080c, 0xbf63, 0x00be, 0x080c, 0xc1df, 0x6003, 0x0001, 0x6007, + 0x0029, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0078, 0x6014, 0x0096, + 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, + 0xd71a, 0x080c, 0xbcb6, 0x080c, 0xb2d3, 0x0005, 0x0096, 0x6014, + 0x904d, 0x090c, 0x0dc5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, + 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6e9f, 0x012e, 0x009e, 0x080c, 0xb2d3, 0x0c30, 0x0096, + 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x666a, 0x00e8, + 0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, + 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x67bf, 0x00be, 0x080c, + 0xc2b5, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, + 0x0160, 0x2001, 0x0006, 0x080c, 0x666a, 0x6014, 0x2048, 0xa868, + 0xd0fc, 0x0170, 0x080c, 0xb6dc, 0x0048, 0x6014, 0x2048, 0xa868, + 0xd0fc, 0x0528, 0x080c, 0xbcb6, 0x080c, 0xb2d3, 0x009e, 0x0005, + 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0dc5, 0xa87b, 0x0000, + 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, 0x6944, 0x1108, + 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, + 0x8000, 0x080c, 0x6e9f, 0x012e, 0x080c, 0xb2d3, 0x08f8, 0x6014, + 0x904d, 0x090c, 0x0dc5, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, + 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6e9f, 0x012e, 0x080c, 0xb2d3, 0x0840, 0xa878, 0x9086, + 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, + 0x6043, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, + 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0005, 0x00c6, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f, + 0x0013, 0x00ce, 0x0005, 0xcdd9, 0xd404, 0xd404, 0xd407, 0xec80, + 0xec9b, 0xec9e, 0xcdd9, 0xcdd9, 0xcdd9, 0xcdd9, 0xcdd9, 0xcdd9, + 0xcdd9, 0xcdd9, 0x080c, 0x0dc5, 0xa001, 0xa001, 0x0005, 0x0096, + 0x6014, 0x904d, 0x0118, 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, + 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, + 0x0550, 0x2001, 0x1834, 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, + 0x080c, 0xb27d, 0x0508, 0x7810, 0x6012, 0x080c, 0xd554, 0x7820, + 0x9086, 0x0003, 0x0128, 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, + 0x7808, 0x603e, 0x2f00, 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, + 0x0035, 0x6003, 0x0001, 0x7954, 0x6156, 0x080c, 0x94ff, 0x080c, + 0x9ab1, 0x2f60, 0x00fe, 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1988, + 0x2004, 0x6042, 0x0005, 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c, + 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, + 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, + 0x080c, 0x0fc0, 0x6830, 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, + 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, + 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, + 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, + 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, + 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, + 0x6954, 0x6156, 0x6023, 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, + 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x009e, 0x001e, 0x0005, 0x6024, + 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, + 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, + 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, + 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, + 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, + 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, + 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, + 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, + 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, + 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, + 0x0026, 0x0036, 0x00e6, 0x2001, 0x1982, 0x200c, 0x8000, 0x2014, + 0x2001, 0x0032, 0x080c, 0x9375, 0x2001, 0x1986, 0x82ff, 0x1110, + 0x2011, 0x0014, 0x2202, 0x2001, 0x1984, 0x200c, 0x8000, 0x2014, + 0x2071, 0x196c, 0x711a, 0x721e, 0x2001, 0x0064, 0x080c, 0x9375, + 0x2001, 0x1987, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, + 0x1988, 0x9288, 0x000a, 0x2102, 0x2001, 0x1a98, 0x2102, 0x2001, + 0x0032, 0x080c, 0x1611, 0x080c, 0x6a84, 0x00ee, 0x003e, 0x002e, + 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1986, + 0x2003, 0x0028, 0x2001, 0x1987, 0x2003, 0x0014, 0x2071, 0x196c, + 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0x1988, 0x2009, 0x001e, + 0x2102, 0x2001, 0x1a98, 0x2102, 0x2001, 0x0032, 0x080c, 0x1611, + 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6058, 0x904d, 0x0110, + 0x080c, 0x1040, 0x009e, 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x080c, 0xb27d, 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, + 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, 0xb352, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, + 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1520, 0x7090, 0x9086, + 0x0018, 0x0120, 0x7090, 0x9086, 0x0014, 0x11e0, 0x6014, 0x2048, + 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x9d4c, 0x01d8, 0x707c, + 0xaa50, 0x9206, 0x1160, 0x7080, 0xaa54, 0x9206, 0x1140, 0x6210, + 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c, 0x3299, 0x080c, + 0xb6dc, 0x0020, 0x080c, 0xbcb6, 0x080c, 0xb2d3, 0x00fe, 0x00ee, + 0x009e, 0x0005, 0x7060, 0xaa54, 0x9206, 0x0d48, 0x0c80, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x080c, 0xb27d, 0x0188, 0x2b08, 0x6112, + 0x080c, 0xd554, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x004d, + 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, + 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c, 0xb27d, + 0x0180, 0x2b08, 0x6112, 0x080c, 0xd554, 0x6023, 0x0001, 0x2900, + 0x6016, 0x001e, 0x080c, 0xb352, 0x9085, 0x0001, 0x012e, 0x00ce, + 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026, 0x0036, 0x0046, + 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, + 0x0015, 0x1568, 0x7190, 0x6014, 0x2048, 0xa814, 0x8003, 0x9106, + 0x1530, 0x20e1, 0x0000, 0x2001, 0x19a1, 0x2003, 0x0000, 0x6014, + 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007, 0x9094, 0x003f, + 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0, 0x2001, 0x19a1, + 0x0016, 0x200c, 0x080c, 0xde2e, 0x001e, 0xa804, 0x9005, 0x0110, + 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103, 0x0010, 0x080c, + 0xbcb6, 0x080c, 0xb2d3, 0x00fe, 0x00ee, 0x009e, 0x006e, 0x005e, + 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096, 0x00e6, 0x00f6, + 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x7090, 0x9086, 0x0004, + 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x9d4c, 0x01a8, 0x707c, + 0xaa74, 0x9206, 0x1130, 0x7080, 0xaa78, 0x9206, 0x1110, 0x080c, + 0x3250, 0x080c, 0xb6dc, 0x0020, 0x080c, 0xbcb6, 0x080c, 0xb2d3, + 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa78, 0x9206, 0x0d78, + 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, + 0x1550, 0x7090, 0x9086, 0x0004, 0x1530, 0x6014, 0x2048, 0x2c78, + 0x080c, 0x9d4c, 0x05f0, 0x707c, 0xaacc, 0x9206, 0x1180, 0x7080, + 0xaad0, 0x9206, 0x1160, 0x080c, 0x3250, 0x0016, 0xa998, 0xaab0, + 0x9284, 0x1000, 0xc0fd, 0x080c, 0x5784, 0x001e, 0x0010, 0x080c, + 0x556f, 0x080c, 0xd0d8, 0x0508, 0xa87b, 0x0000, 0xa883, 0x0000, + 0xa897, 0x4000, 0x0080, 0x080c, 0xd0d8, 0x01b8, 0x6014, 0x2048, + 0x080c, 0x556f, 0x1d70, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, + 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, + 0x080c, 0x6e9f, 0x012e, 0x080c, 0xb2d3, 0x00fe, 0x00ee, 0x009e, + 0x0005, 0x7060, 0xaad0, 0x9206, 0x0930, 0x0888, 0x0016, 0x0026, + 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, + 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, + 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, + 0x080c, 0xd0d8, 0x0904, 0xd716, 0x0096, 0x6314, 0x2348, 0xa87a, + 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, + 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x6944, 0x1108, 0xc185, + 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, + 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f8b, 0x20a9, 0x0004, + 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c8, 0x9080, 0x000a, 0x2098, + 0x080c, 0x0f8b, 0x00ce, 0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, + 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, + 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e, 0xa868, 0xc0f4, + 0xa86a, 0x080c, 0x6e92, 0x6017, 0x0000, 0x009e, 0x003e, 0x00de, + 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6, + 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, 0x9096, 0x0000, + 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, 0x2873, 0x2118, + 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c, + 0x2011, 0x8018, 0x080c, 0x4c44, 0x00a8, 0x9096, 0x0001, 0x1148, + 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, + 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6, + 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, 0x003e, 0x002e, + 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38, + 0x0008, 0x6a2c, 0x080c, 0xd0c6, 0x01f0, 0x2260, 0x6120, 0x9186, + 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, 0x9206, 0x0140, + 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, 0x1140, 0x0020, + 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, 0x9106, 0x001e, + 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc, + 0x0198, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1170, 0xa9a8, 0x918c, + 0x000f, 0x918e, 0x0001, 0x1140, 0xa87c, 0xd0ac, 0x0128, 0xa834, + 0xa938, 0x9115, 0x190c, 0xc78b, 0x0005, 0x0036, 0x2019, 0x0001, + 0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, 0xd0d8, 0x01c8, + 0x080c, 0xd2c3, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, 0x0096, + 0x2048, 0xa87c, 0x080c, 0xd2e0, 0x1118, 0x080c, 0xbcb6, 0x0040, + 0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, 0x6e9f, + 0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, 0x0006, + 0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, + 0xa87b, 0x0005, 0x080c, 0xd3d4, 0xa877, 0x0000, 0x0005, 0x2001, + 0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, + 0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, 0x2004, 0xd0e4, + 0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, + 0x00be, 0x2021, 0x0007, 0x080c, 0x4dfb, 0x004e, 0x003e, 0x0005, + 0x0c51, 0x1d81, 0x0005, 0x2001, 0x1986, 0x2004, 0x601a, 0x0005, + 0x2001, 0x1988, 0x2004, 0x6042, 0x0005, 0x080c, 0xb2d3, 0x0804, + 0x9ab1, 0x2001, 0x0109, 0x2004, 0xd084, 0x01e0, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6, + 0x2079, 0x19e8, 0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x93e2, + 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e, + 0x9085, 0x0001, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0010, + 0x1a0c, 0x0dc5, 0x001b, 0x006e, 0x00be, 0x0005, 0xd846, 0xdf8d, + 0xe102, 0xd846, 0xd846, 0xd846, 0xd846, 0xd846, 0xd87d, 0xe186, + 0xd846, 0xd846, 0xd846, 0xd846, 0xd846, 0xd846, 0x080c, 0x0dc5, + 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0dc5, 0x0013, 0x006e, + 0x0005, 0xd861, 0xe6d5, 0xd861, 0xd861, 0xd861, 0xd861, 0xd861, + 0xd861, 0xe682, 0xe729, 0xd861, 0xedb4, 0xedea, 0xedb4, 0xedea, + 0xd861, 0x080c, 0x0dc5, 0x6000, 0x9082, 0x0010, 0x1a0c, 0x0dc5, + 0x6000, 0x000a, 0x0005, 0xd87b, 0xe364, 0xe433, 0xe456, 0xe516, + 0xd87b, 0xe5f5, 0xe59e, 0xe192, 0xe658, 0xe66d, 0xd87b, 0xd87b, + 0xd87b, 0xd87b, 0xd87b, 0x080c, 0x0dc5, 0x91b2, 0x0053, 0x1a0c, + 0x0dc5, 0x2100, 0x91b2, 0x0040, 0x1a04, 0xdcfd, 0x0002, 0xd8c7, + 0xdacb, 0xd8c7, 0xd8c7, 0xd8c7, 0xdad4, 0xd8c7, 0xd8c7, 0xd8c7, + 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, + 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c9, 0xd92c, + 0xd93b, 0xd99f, 0xd9ca, 0xda43, 0xdab6, 0xd8c7, 0xd8c7, 0xdad7, + 0xd8c7, 0xd8c7, 0xdaec, 0xdaf9, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, + 0xd8c7, 0xdb9f, 0xd8c7, 0xd8c7, 0xdbb3, 0xd8c7, 0xd8c7, 0xdb6e, + 0xd8c7, 0xd8c7, 0xd8c7, 0xdbcb, 0xd8c7, 0xd8c7, 0xd8c7, 0xdc48, + 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xd8c7, 0xdcc5, 0x080c, + 0x0dc5, 0x080c, 0x6a61, 0x1150, 0x2001, 0x1837, 0x2004, 0xd0cc, + 0x1128, 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, + 0x602f, 0x0009, 0x6017, 0x0000, 0x0804, 0xdac4, 0x080c, 0x69fd, + 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, + 0x0026, 0x2019, 0x0029, 0x080c, 0x96a4, 0x0076, 0x903e, 0x080c, + 0x9577, 0x2c08, 0x080c, 0xe91c, 0x007e, 0x001e, 0x001e, 0x002e, + 0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658, 0x080c, 0x6733, 0xbe04, + 0x9684, 0x00ff, 0x9082, 0x0006, 0x1268, 0x0016, 0x0026, 0x6210, + 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08, 0x080c, 0xf015, 0x002e, + 0x001e, 0x1178, 0x080c, 0xe84e, 0x1904, 0xd997, 0x080c, 0xe7ea, + 0x1120, 0x6007, 0x0008, 0x0804, 0xdac4, 0x6007, 0x0009, 0x0804, + 0xdac4, 0x080c, 0xeab9, 0x0128, 0x080c, 0xe84e, 0x0d78, 0x0804, + 0xd997, 0x6017, 0x1900, 0x0c88, 0x080c, 0x3374, 0x1904, 0xdcfa, + 0x6106, 0x080c, 0xe78e, 0x6007, 0x0006, 0x0804, 0xdac4, 0x6007, + 0x0007, 0x0804, 0xdac4, 0x080c, 0xee26, 0x1904, 0xdcfa, 0x080c, + 0x3374, 0x1904, 0xdcfa, 0x00d6, 0x6610, 0x2658, 0xbe04, 0x9684, + 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001, 0x0001, 0x080c, 0x6656, + 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0188, 0x9686, 0x0004, + 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0140, 0x9686, + 0x0004, 0x0128, 0x9686, 0x0005, 0x0110, 0x00de, 0x0480, 0x00e6, + 0x2071, 0x0260, 0x7034, 0x9084, 0x0003, 0x1140, 0x7034, 0x9082, + 0x0014, 0x0220, 0x7030, 0x9084, 0x0003, 0x0130, 0x00ee, 0x6017, + 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee, 0x080c, 0xe8b2, 0x1190, + 0x9686, 0x0006, 0x1140, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, + 0x080c, 0x3299, 0x002e, 0x080c, 0x67bf, 0x6007, 0x000a, 0x00de, + 0x0804, 0xdac4, 0x6007, 0x000b, 0x00de, 0x0804, 0xdac4, 0x080c, + 0x3250, 0x080c, 0xd7f8, 0x6007, 0x0001, 0x0804, 0xdac4, 0x080c, + 0xee26, 0x1904, 0xdcfa, 0x080c, 0x3374, 0x1904, 0xdcfa, 0x2071, + 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948, 0x90b2, 0x0014, 0x0a30, + 0x7030, 0x9084, 0x0003, 0x1910, 0x6610, 0x2658, 0xbe04, 0x9686, + 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258, 0xbaa0, 0x900e, 0x080c, + 0x3299, 0x002e, 0x6007, 0x000c, 0x2001, 0x0001, 0x080c, 0xeff4, + 0x0804, 0xdac4, 0x080c, 0x6a61, 0x1140, 0x2001, 0x1837, 0x2004, + 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd8d6, 0x080c, + 0x69fd, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, + 0x06c8, 0x1138, 0x0026, 0x2001, 0x0006, 0x080c, 0x6696, 0x002e, + 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, + 0x0006, 0x1904, 0xd997, 0x080c, 0xe8bf, 0x1120, 0x6007, 0x000e, + 0x0804, 0xdac4, 0x0046, 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, + 0x3250, 0x080c, 0xd7f8, 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, + 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, 0xec31, 0x6010, + 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, + 0x0804, 0xdac4, 0x2001, 0x0001, 0x080c, 0x6656, 0x0156, 0x0016, + 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0270, + 0x080c, 0xc365, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0168, + 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004, 0x0a04, 0xd997, 0x9682, + 0x0007, 0x0a04, 0xd9f3, 0x0804, 0xd997, 0x6017, 0x1900, 0x6007, + 0x0009, 0x0804, 0xdac4, 0x080c, 0x6a61, 0x1140, 0x2001, 0x1837, + 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, 0xd8d6, + 0x080c, 0x69fd, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, 0x0006, + 0x0016, 0x908e, 0x0001, 0x0118, 0x908e, 0x0000, 0x1118, 0x001e, + 0x000e, 0x0080, 0x001e, 0x000e, 0x9082, 0x0006, 0x06a0, 0x0150, + 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, 0x0120, 0x9686, 0x0006, + 0x1904, 0xd997, 0x080c, 0xe8ed, 0x1138, 0x080c, 0xe7ea, 0x1120, + 0x6007, 0x0010, 0x0804, 0xdac4, 0x0046, 0x6410, 0x2458, 0xbca0, + 0x0046, 0x080c, 0x3250, 0x080c, 0xd7f8, 0x004e, 0x0016, 0x9006, + 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, + 0xec31, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, + 0x6007, 0x0001, 0x0448, 0x080c, 0xeab9, 0x0198, 0x0016, 0x968c, + 0x00ff, 0x9186, 0x0002, 0x0160, 0x9186, 0x0003, 0x0148, 0x001e, + 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0920, 0x0804, 0xd997, + 0x001e, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x3374, + 0x1904, 0xdcfa, 0x080c, 0xee26, 0x1904, 0xdcfa, 0x080c, 0xdecb, + 0x1904, 0xd997, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x9547, + 0x080c, 0x9ab1, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, + 0x9547, 0x080c, 0x9ab1, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, + 0xee26, 0x1904, 0xdcfa, 0x080c, 0x3374, 0x1904, 0xdcfa, 0x080c, + 0xdecb, 0x1904, 0xd997, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, + 0x9547, 0x080c, 0x9ab1, 0x0005, 0x080c, 0x3374, 0x1904, 0xdcfa, + 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, + 0x0005, 0x080c, 0xee26, 0x1904, 0xdcfa, 0x080c, 0x3374, 0x1904, + 0xdcfa, 0x080c, 0xdecb, 0x1904, 0xd997, 0x0016, 0x0026, 0x00e6, + 0x2071, 0x0260, 0x2c08, 0x2011, 0x1820, 0x2214, 0x703c, 0x9206, + 0x11e0, 0x2011, 0x181f, 0x2214, 0x7038, 0x9084, 0x00ff, 0x9206, + 0x11a0, 0x7240, 0x080c, 0xd0c6, 0x0570, 0x2260, 0x6008, 0x9086, + 0xffff, 0x0120, 0x7244, 0x6008, 0x9206, 0x1528, 0x6020, 0x9086, + 0x0007, 0x1508, 0x080c, 0xb2d3, 0x04a0, 0x7244, 0x9286, 0xffff, + 0x0180, 0x2c08, 0x080c, 0xd0c6, 0x01b0, 0x2260, 0x7240, 0x6008, + 0x9206, 0x1188, 0x6010, 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, + 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c, 0xebfb, 0x1180, 0x7244, + 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, + 0x7214, 0x9296, 0xffff, 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, + 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, + 0xb2d3, 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x080c, 0x9547, + 0x080c, 0x9ab1, 0x00ee, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, + 0x080c, 0x6656, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, + 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, 0xc365, 0x003e, 0x002e, + 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xdac4, 0x080c, + 0xbf7b, 0x080c, 0x7637, 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, + 0x7651, 0x1138, 0x080c, 0x7932, 0x080c, 0x612e, 0x080c, 0x7563, + 0x0010, 0x080c, 0x760f, 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, + 0x3374, 0x1904, 0xdcfa, 0x080c, 0xdecb, 0x1904, 0xd997, 0x6106, + 0x080c, 0xdee7, 0x1120, 0x6007, 0x002b, 0x0804, 0xdac4, 0x6007, + 0x002c, 0x0804, 0xdac4, 0x080c, 0xee26, 0x1904, 0xdcfa, 0x080c, + 0x3374, 0x1904, 0xdcfa, 0x080c, 0xdecb, 0x1904, 0xd997, 0x6106, + 0x080c, 0xdeec, 0x1120, 0x6007, 0x002e, 0x0804, 0xdac4, 0x6007, + 0x002f, 0x0804, 0xdac4, 0x080c, 0x3374, 0x1904, 0xdcfa, 0x00e6, + 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, + 0x0006, 0x0158, 0x9184, 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, + 0x00ce, 0x00de, 0x00ee, 0x0804, 0xdacb, 0x080c, 0x57d9, 0xd0e4, + 0x0904, 0xdc45, 0x2071, 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, + 0x7108, 0x720c, 0x080c, 0x6a9f, 0x0140, 0x6010, 0x2058, 0xb810, + 0x9106, 0x1118, 0xb814, 0x9206, 0x0510, 0x080c, 0x6a9b, 0x15b8, + 0x2069, 0x1800, 0x6880, 0x9206, 0x1590, 0x687c, 0x9106, 0x1578, + 0x7210, 0x080c, 0xd0c6, 0x0590, 0x080c, 0xddb8, 0x0578, 0x080c, + 0xecad, 0x0560, 0x622e, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, + 0x94ff, 0x080c, 0x9ab1, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, + 0x9286, 0xffff, 0x0150, 0x080c, 0xd0c6, 0x01c0, 0x9280, 0x0002, + 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, + 0x0001, 0x080c, 0xebfb, 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, + 0x0037, 0x602f, 0x0009, 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, + 0x602f, 0x0003, 0x6017, 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, + 0x080c, 0x3374, 0x1904, 0xdcfa, 0x6010, 0x2058, 0xb804, 0x9084, + 0xff00, 0x8007, 0x9086, 0x0006, 0x1904, 0xdacb, 0x00e6, 0x00d6, + 0x00c6, 0x080c, 0x57d9, 0xd0e4, 0x0904, 0xdcbd, 0x2069, 0x1800, + 0x2071, 0x026c, 0x7008, 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, + 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085, 0x0001, 0x080c, 0xebfb, + 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xd0c6, 0x05d0, 0x7108, 0x9280, + 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, + 0xcce6, 0x002e, 0x00ce, 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, + 0x0001, 0x0178, 0x9186, 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, + 0x9280, 0x0005, 0x2004, 0x9005, 0x0170, 0x080c, 0xddb8, 0x0904, + 0xdc3e, 0x0056, 0x7510, 0x7614, 0x080c, 0xecc6, 0x005e, 0x00ce, + 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, + 0x2a00, 0x6003, 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0c78, + 0x6007, 0x003b, 0x602f, 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, + 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0c10, 0x6007, 0x003b, 0x602f, + 0x000b, 0x6017, 0x0000, 0x0804, 0xdc15, 0x00e6, 0x0026, 0x080c, + 0x6a61, 0x0550, 0x080c, 0x69fd, 0x080c, 0xee97, 0x1518, 0x2071, + 0x1800, 0x70dc, 0x9085, 0x0003, 0x70de, 0x00f6, 0x2079, 0x0100, + 0x72b0, 0x9284, 0x00ff, 0x707e, 0x78e6, 0x9284, 0xff00, 0x7280, + 0x9205, 0x7082, 0x78ea, 0x00fe, 0x70e7, 0x0000, 0x080c, 0x6a9f, + 0x0120, 0x2011, 0x1a01, 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, + 0x3000, 0x0010, 0x080c, 0xeecb, 0x002e, 0x00ee, 0x080c, 0xb2d3, + 0x0804, 0xdaca, 0x080c, 0xb2d3, 0x0005, 0x2600, 0x0002, 0xdd11, + 0xdd3f, 0xdd50, 0xdd11, 0xdd11, 0xdd13, 0xdd61, 0xdd11, 0xdd11, + 0xdd11, 0xdd2d, 0xdd11, 0xdd11, 0xdd11, 0xdd6c, 0xdd82, 0xddb3, + 0xdd11, 0x080c, 0x0dc5, 0x080c, 0xee26, 0x1d20, 0x080c, 0x3374, + 0x1d08, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c, + 0x9547, 0x0005, 0x080c, 0x3250, 0x080c, 0xd7f8, 0x6007, 0x0001, + 0x6003, 0x0001, 0x080c, 0x9547, 0x0005, 0x080c, 0xee26, 0x1950, + 0x080c, 0x3374, 0x1938, 0x080c, 0xdecb, 0x1d60, 0x703c, 0x6016, + 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x9547, 0x0005, 0x080c, + 0x3374, 0x1904, 0xdcfa, 0x2009, 0x0041, 0x080c, 0xeed4, 0x6007, + 0x0047, 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0005, + 0x080c, 0x3374, 0x1904, 0xdcfa, 0x2009, 0x0042, 0x080c, 0xeed4, + 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, + 0x0005, 0x080c, 0x3374, 0x1904, 0xdcfa, 0x2009, 0x0046, 0x080c, + 0xeed4, 0x080c, 0xb2d3, 0x0005, 0x2001, 0x1824, 0x2004, 0x9082, + 0x00e1, 0x1268, 0x080c, 0xddd5, 0x0904, 0xdcfa, 0x6007, 0x004e, + 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0005, 0x6007, + 0x0012, 0x0cb0, 0x6007, 0x004f, 0x6017, 0x0000, 0x7134, 0x918c, + 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, 0x7140, 0x2001, + 0x19be, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, 0x19bf, 0x2004, + 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, 0x0276, 0x20a9, + 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xc379, + 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, 0x080c, 0x9547, + 0x080c, 0x9ab1, 0x0005, 0x6007, 0x0050, 0x703c, 0x6016, 0x0ca0, + 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, 0x6010, + 0x2058, 0xb8cc, 0xd084, 0x0150, 0x7128, 0x6044, 0x9106, 0x1120, + 0x712c, 0x6048, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, + 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, 0x0016, 0x0096, 0x0086, + 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, + 0x20e1, 0x0000, 0x2001, 0x19a1, 0x2003, 0x0000, 0x080c, 0x1027, + 0x05a0, 0x2900, 0x6016, 0x7090, 0x8004, 0xa816, 0x908a, 0x001e, + 0x02d0, 0xa833, 0x001e, 0x20a9, 0x001e, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x001b, 0x20a0, 0x2001, 0x19a1, 0x0016, 0x200c, 0x0471, + 0x001e, 0x81ff, 0x01b8, 0x2940, 0x080c, 0x1027, 0x01b0, 0x2900, + 0xa006, 0x2100, 0x0c18, 0xa832, 0x20a8, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x001b, 0x20a0, 0x2001, 0x19a1, 0x0016, 0x200c, 0x00b1, + 0x001e, 0x0000, 0x9085, 0x0001, 0x0048, 0x2071, 0x1800, 0x7093, + 0x0000, 0x6014, 0x2048, 0x080c, 0x0fc0, 0x9006, 0x012e, 0x01de, + 0x01ce, 0x00ee, 0x008e, 0x009e, 0x001e, 0x0005, 0x0006, 0x0016, + 0x0026, 0x0036, 0x00c6, 0x918c, 0xffff, 0x11b0, 0x080c, 0x23e2, + 0x2099, 0x026c, 0x2001, 0x0014, 0x3518, 0x9312, 0x0108, 0x1218, + 0x23a8, 0x4003, 0x0400, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, + 0x23e2, 0x2099, 0x0260, 0x0ca8, 0x080c, 0x23e2, 0x2061, 0x19a1, + 0x6004, 0x2098, 0x6008, 0x3518, 0x9312, 0x0108, 0x1218, 0x23a8, + 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108, 0x080c, 0x23e2, + 0x2099, 0x0260, 0x0ca8, 0x2061, 0x19a1, 0x2019, 0x0280, 0x3300, + 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260, 0x6006, 0x8108, + 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, + 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, + 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x23fa, 0x20a1, 0x024c, 0x2001, + 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0418, 0x20a8, + 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c, 0x23fa, 0x20a1, + 0x0240, 0x0c98, 0x080c, 0x23fa, 0x2061, 0x19a4, 0x6004, 0x20a0, + 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x0058, 0x20a8, + 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c, 0x23fa, 0x20a1, + 0x0240, 0x0c98, 0x2061, 0x19a4, 0x2019, 0x0260, 0x3400, 0x931e, + 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006, 0x8108, 0x2162, + 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, 0x003e, 0x002e, + 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610, 0x2658, 0xbe04, + 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170, 0x9686, 0x0004, + 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x0128, 0x9686, + 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be, 0x0005, 0x00d6, + 0x080c, 0xdf63, 0x00de, 0x0005, 0x00d6, 0x080c, 0xdf70, 0x1520, + 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff, 0x9115, 0x6216, + 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c, 0xeff4, 0x2009, + 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c, 0x00ff, 0x6824, + 0x080c, 0x2873, 0x1148, 0x2001, 0x0001, 0x080c, 0xeff4, 0x2110, + 0x900e, 0x080c, 0x3299, 0x0018, 0x9085, 0x0001, 0x0008, 0x9006, + 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0xb325, 0x05a8, 0x0016, + 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, + 0x2873, 0x1578, 0x080c, 0x66b9, 0x1560, 0xbe12, 0xbd16, 0x00ce, + 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xee26, 0x11d8, 0x080c, + 0x3374, 0x11c0, 0x080c, 0xdecb, 0x0510, 0x2001, 0x0007, 0x080c, + 0x666a, 0x2001, 0x0007, 0x080c, 0x6696, 0x6017, 0x0000, 0x6023, + 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x9547, 0x080c, + 0x9ab1, 0x0010, 0x080c, 0xb2d3, 0x9085, 0x0001, 0x00ce, 0x00be, + 0x0005, 0x080c, 0xb2d3, 0x00ce, 0x002e, 0x001e, 0x0ca8, 0x080c, + 0xb2d3, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, 0x9082, 0x0010, + 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008, 0x9006, 0x0005, + 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084, 0xff00, 0x9086, + 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118, 0x9186, 0x0014, + 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, 0x615a, 0x908e, + 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004, 0x90b2, 0x0053, + 0x1a0c, 0x0dc5, 0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2, 0x0040, + 0x1a04, 0xe0d2, 0x040a, 0x91b6, 0x0027, 0x0198, 0x9186, 0x0015, + 0x0118, 0x9186, 0x0016, 0x1148, 0x080c, 0xd809, 0x0128, 0x6000, + 0x9086, 0x0002, 0x0904, 0xbcfd, 0x0005, 0x91b6, 0x0014, 0x190c, + 0x0dc5, 0x2001, 0x0007, 0x080c, 0x6696, 0x080c, 0x99a5, 0x080c, + 0xb306, 0x080c, 0x9ab1, 0x0005, 0xdffc, 0xdffe, 0xdffc, 0xdffc, + 0xdffc, 0xdffe, 0xe00d, 0xe0cb, 0xe051, 0xe0cb, 0xe079, 0xe0cb, + 0xe00d, 0xe0cb, 0xe0c3, 0xe0cb, 0xe0c3, 0xe0cb, 0xe0cb, 0xdffc, + 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0xdffc, + 0xdffc, 0xdffc, 0xdffe, 0xdffc, 0xe0cb, 0xdffc, 0xdffc, 0xe0cb, + 0xdffc, 0xe0c8, 0xe0cb, 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0xe0cb, + 0xe0cb, 0xdffc, 0xe0cb, 0xe0cb, 0xdffc, 0xe008, 0xdffc, 0xdffc, + 0xdffc, 0xdffc, 0xe0c7, 0xe0cb, 0xdffc, 0xdffc, 0xe0cb, 0xe0cb, + 0xdffc, 0xdffc, 0xdffc, 0xdffc, 0x080c, 0x0dc5, 0x080c, 0x99a5, + 0x080c, 0xd7fb, 0x6003, 0x0002, 0x080c, 0x9ab1, 0x0804, 0xe0d1, + 0x9006, 0x080c, 0x6656, 0x0804, 0xe0cb, 0x080c, 0x6a9b, 0x1904, + 0xe0cb, 0x9006, 0x080c, 0x6656, 0x6010, 0x2058, 0xb810, 0x9086, + 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, + 0x00fe, 0x00b8, 0x6010, 0x2058, 0xb8c0, 0x9005, 0x0904, 0xe0cb, + 0x080c, 0x33a5, 0x1904, 0xe0cb, 0x2001, 0x1800, 0x2004, 0x9086, + 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, + 0x00fe, 0x2001, 0x0002, 0x080c, 0x666a, 0x080c, 0x99a5, 0x6023, + 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x9547, 0x080c, + 0x9ab1, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c, 0x884b, 0x0804, + 0xe0d1, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, + 0x0006, 0x0148, 0x9686, 0x0004, 0x0130, 0x080c, 0x9031, 0x2001, + 0x0004, 0x080c, 0x6696, 0x080c, 0xf043, 0x0904, 0xe0cb, 0x080c, + 0x99a5, 0x2001, 0x0004, 0x080c, 0x666a, 0x6023, 0x0001, 0x6003, + 0x0001, 0x6007, 0x0003, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x0804, + 0xe0d1, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, + 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4dfb, + 0x004e, 0x003e, 0x2001, 0x0006, 0x080c, 0xe0ef, 0x6610, 0x2658, + 0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, + 0x0180, 0x2001, 0x0006, 0x080c, 0x6696, 0x9284, 0x00ff, 0x908e, + 0x0007, 0x0118, 0x908e, 0x0004, 0x1120, 0x2001, 0x0006, 0x080c, + 0x666a, 0x080c, 0x6a9b, 0x11f8, 0x2001, 0x1837, 0x2004, 0xd0a4, + 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, + 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0804, 0xe039, + 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0449, 0x0020, 0x0018, + 0x0010, 0x080c, 0x6696, 0x080c, 0x99a5, 0x080c, 0xb2d3, 0x080c, + 0x9ab1, 0x0005, 0x2600, 0x0002, 0xe0e6, 0xe0e6, 0xe0e6, 0xe0e6, + 0xe0e6, 0xe0e8, 0xe0e6, 0xe0e8, 0xe0e6, 0xe0e6, 0xe0e8, 0xe0e6, + 0xe0e6, 0xe0e6, 0xe0e8, 0xe0e8, 0xe0e8, 0xe0e8, 0x080c, 0x0dc5, + 0x080c, 0x99a5, 0x080c, 0xb2d3, 0x080c, 0x9ab1, 0x0005, 0x0016, + 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138, 0x080c, + 0x666a, 0x9006, 0x080c, 0x6656, 0x080c, 0x3279, 0x00de, 0x00be, + 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00, 0x8007, + 0x90b2, 0x000c, 0x1a0c, 0x0dc5, 0x91b6, 0x0015, 0x1110, 0x003b, + 0x0028, 0x91b6, 0x0016, 0x190c, 0x0dc5, 0x006b, 0x0005, 0xbd9f, + 0xbd9f, 0xbd9f, 0xbd9f, 0xe184, 0xbd9f, 0xe16e, 0xe12f, 0xbd9f, + 0xbd9f, 0xbd9f, 0xbd9f, 0xbd9f, 0xbd9f, 0xbd9f, 0xbd9f, 0xe184, + 0xbd9f, 0xe16e, 0xe175, 0xbd9f, 0xbd9f, 0xbd9f, 0xbd9f, 0x00f6, + 0x080c, 0x6a9b, 0x11d8, 0x080c, 0xd7e3, 0x11c0, 0x6010, 0x905d, + 0x01a8, 0xb8c0, 0x9005, 0x0190, 0x9006, 0x080c, 0x6656, 0x2001, + 0x0002, 0x080c, 0x666a, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x9547, 0x080c, 0x9ab1, 0x00f0, 0x2011, 0x0263, + 0x2204, 0x8211, 0x220c, 0x080c, 0x2873, 0x11b0, 0x080c, 0x6724, + 0x0118, 0x080c, 0xb2d3, 0x0080, 0xb810, 0x0006, 0xb814, 0x0006, + 0xb8c0, 0x0006, 0x080c, 0x6148, 0x000e, 0xb8c2, 0x000e, 0xb816, + 0x000e, 0xb812, 0x080c, 0xb2d3, 0x00fe, 0x0005, 0x6604, 0x96b6, + 0x001e, 0x1110, 0x080c, 0xb2d3, 0x0005, 0x080c, 0xc1dc, 0x1148, + 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x9547, 0x080c, 0x9ab1, + 0x0010, 0x080c, 0xb2d3, 0x0005, 0x0804, 0xb2d3, 0x6004, 0x908a, + 0x0053, 0x1a0c, 0x0dc5, 0x080c, 0x99a5, 0x080c, 0xb306, 0x080c, + 0x9ab1, 0x0005, 0x9182, 0x0040, 0x0002, 0xe1a9, 0xe1a9, 0xe1a9, + 0xe1a9, 0xe1ab, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, + 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, 0xe1a9, + 0xe1a9, 0x080c, 0x0dc5, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6, + 0x0046, 0x0026, 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11a8, 0x6106, + 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xe211, 0x080c, + 0xefe8, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011, + 0x0200, 0x080c, 0x8a50, 0x0020, 0x9026, 0x080c, 0xee6b, 0x0c38, + 0x080c, 0x100e, 0x090c, 0x0dc5, 0x6003, 0x0007, 0xa867, 0x010d, + 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2, + 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f, + 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6e9f, 0x001e, + 0x080c, 0xefe8, 0x1904, 0xe271, 0x9486, 0x2000, 0x1130, 0x2019, + 0x0017, 0x080c, 0xeba1, 0x0804, 0xe271, 0x9486, 0x0200, 0x1120, + 0x080c, 0xeb38, 0x0804, 0xe271, 0x9486, 0x0400, 0x0120, 0x9486, + 0x1000, 0x1904, 0xe271, 0x2019, 0x0002, 0x080c, 0xeb53, 0x0804, + 0xe271, 0x2069, 0x1a74, 0x6a00, 0xd284, 0x0904, 0xe2db, 0x9284, + 0x0300, 0x1904, 0xe2d4, 0x6804, 0x9005, 0x0904, 0xe2bc, 0x2d78, + 0x6003, 0x0007, 0x080c, 0x1027, 0x0904, 0xe27d, 0x7800, 0xd08c, + 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f, + 0x2004, 0xd084, 0x1904, 0xe2df, 0x9006, 0xa802, 0xa867, 0x0116, + 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0, + 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930, + 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003, + 0x9080, 0xe279, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270, + 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1, + 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000, + 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c, + 0x6e9f, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e, + 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004, + 0xd084, 0x0120, 0x080c, 0x100e, 0x1904, 0xe226, 0x6017, 0xf100, + 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x94ff, 0x080c, 0x9ab1, + 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200, + 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700, + 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x080c, + 0x94ff, 0x080c, 0x9ab1, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032, + 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x0804, 0xe271, 0x2001, 0x180e, 0x2004, 0xd0ec, + 0x0120, 0x2011, 0x8049, 0x080c, 0x4c44, 0x6017, 0xf300, 0x0010, + 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x0804, 0xe271, 0x6017, 0xf500, 0x0c98, 0x6017, + 0xf600, 0x0804, 0xe291, 0x6017, 0xf200, 0x0804, 0xe291, 0xa867, + 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044, + 0x9084, 0x0003, 0x9080, 0xe279, 0x2005, 0xa87e, 0x2928, 0x6010, + 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830, + 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104, + 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214, + 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0dc5, 0x8210, + 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0029, 0x20a0, 0x2011, 0xe35b, 0x2041, 0x0001, 0x223d, 0x9784, + 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530, + 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098, + 0x0c68, 0x2950, 0x080c, 0x1027, 0x0170, 0x2900, 0xb002, 0xa867, + 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, + 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c, + 0x1040, 0x0cc8, 0x080c, 0x1040, 0x0804, 0xe27d, 0x2548, 0x8847, + 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c, + 0xebd4, 0x0804, 0xe271, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018, + 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004, + 0x908a, 0x0054, 0x1a0c, 0x0dc5, 0x9082, 0x0040, 0x0a0c, 0x0dc5, + 0x2008, 0x0804, 0xe3ea, 0x9186, 0x0051, 0x0108, 0x0048, 0x080c, + 0xd809, 0x0500, 0x6000, 0x9086, 0x0002, 0x11e0, 0x0804, 0xe433, + 0x9186, 0x0027, 0x0190, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, + 0x0160, 0x190c, 0x0dc5, 0x080c, 0xd809, 0x0160, 0x6000, 0x9086, + 0x0004, 0x190c, 0x0dc5, 0x0804, 0xe516, 0x6004, 0x9082, 0x0040, + 0x2008, 0x001a, 0x080c, 0xb36d, 0x0005, 0xe3b1, 0xe3b3, 0xe3b3, + 0xe3da, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, + 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, 0xe3b1, + 0xe3b1, 0x080c, 0x0dc5, 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x0036, + 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c, 0xd0d8, 0x01c0, 0x6003, + 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1178, + 0x2019, 0x0004, 0x080c, 0xebd4, 0x6017, 0x0000, 0x6018, 0x9005, + 0x1120, 0x2001, 0x1987, 0x2004, 0x601a, 0x6003, 0x0007, 0x009e, + 0x003e, 0x0005, 0x0096, 0x080c, 0x99a5, 0x080c, 0x9ab1, 0x080c, + 0xd0d8, 0x0120, 0x6014, 0x2048, 0x080c, 0x1040, 0x080c, 0xb306, + 0x009e, 0x0005, 0x0002, 0xe3ff, 0xe416, 0xe401, 0xe42d, 0xe3ff, + 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, + 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0xe3ff, 0x080c, + 0x0dc5, 0x0096, 0x080c, 0x99a5, 0x6014, 0x2048, 0xa87c, 0xd0b4, + 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, 0xb352, 0x0010, + 0x6003, 0x0004, 0x080c, 0x9ab1, 0x009e, 0x0005, 0x080c, 0x99a5, + 0x080c, 0xd0d8, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, + 0xd1ec, 0x1138, 0x080c, 0x8a25, 0x080c, 0xb2d3, 0x080c, 0x9ab1, + 0x0005, 0x080c, 0xee2f, 0x0db0, 0x0cc8, 0x080c, 0x99a5, 0x2009, + 0x0041, 0x0804, 0xe59e, 0x9182, 0x0040, 0x0002, 0xe44a, 0xe44c, + 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, + 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44d, + 0xe44a, 0xe44a, 0x080c, 0x0dc5, 0x0005, 0x00d6, 0x080c, 0x8a25, + 0x00de, 0x080c, 0xee87, 0x080c, 0xb2d3, 0x0005, 0x9182, 0x0040, + 0x0002, 0xe46d, 0xe46d, 0xe46d, 0xe46d, 0xe46d, 0xe46d, 0xe46d, + 0xe46d, 0xe46d, 0xe46f, 0xe4de, 0xe46d, 0xe46d, 0xe46d, 0xe46d, + 0xe4de, 0xe46d, 0xe46d, 0xe46d, 0xe46d, 0x080c, 0x0dc5, 0x2001, + 0x0105, 0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, + 0x2001, 0x0131, 0x2004, 0x9105, 0x1904, 0xe4de, 0x2009, 0x180c, + 0x2104, 0xd0d4, 0x0904, 0xe4de, 0xc0d4, 0x200a, 0x2009, 0x0105, + 0x2104, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1867, + 0x2004, 0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x9a61, 0x6014, + 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, + 0x0002, 0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, + 0x9bd3, 0x2009, 0x0041, 0x009e, 0x0804, 0xe59e, 0x080c, 0x9bd3, + 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x8a25, 0x009e, 0x0005, + 0x2001, 0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, + 0x2004, 0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, + 0xd1cc, 0x0110, 0x080c, 0x2c7b, 0x080c, 0x9bd3, 0x6014, 0x2048, + 0xa97c, 0xd1ec, 0x1130, 0x080c, 0x8a25, 0x080c, 0xb2d3, 0x009e, + 0x0005, 0x080c, 0xee2f, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, + 0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x9a61, 0x080c, 0x9bd3, + 0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, + 0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, + 0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xebd4, 0x6018, + 0x9005, 0x1128, 0x2001, 0x1987, 0x2004, 0x8003, 0x601a, 0x6017, + 0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, + 0x0002, 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe52d, + 0xe52d, 0xe52f, 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe52d, + 0xe52d, 0xe52d, 0xe52d, 0xe52d, 0xe57a, 0x080c, 0x0dc5, 0x6014, + 0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, + 0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, + 0x2009, 0x0041, 0x009e, 0x0804, 0xe59e, 0x6003, 0x0007, 0x601b, + 0x0000, 0x080c, 0x8a25, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, + 0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, + 0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, + 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, + 0x180e, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, + 0x0006, 0x00e9, 0x080c, 0x8a27, 0x009e, 0x0005, 0x6003, 0x0002, + 0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x1608, 0x1904, + 0xe52f, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, + 0x9105, 0x1120, 0x080c, 0x1608, 0x1904, 0xe52f, 0x0005, 0xd2fc, + 0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, + 0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, + 0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, + 0x0dc5, 0x6024, 0xd0dc, 0x090c, 0x0dc5, 0x0005, 0xe5c2, 0xe5ce, + 0xe5da, 0xe5e6, 0xe5c2, 0xe5c2, 0xe5c2, 0xe5c2, 0xe5c9, 0xe5c4, + 0xe5c4, 0xe5c2, 0xe5c2, 0xe5c2, 0xe5c2, 0xe5c4, 0xe5c2, 0xe5c4, + 0xe5c2, 0xe5c9, 0x080c, 0x0dc5, 0x6024, 0xd0dc, 0x090c, 0x0dc5, + 0x0005, 0x6014, 0x9005, 0x190c, 0x0dc5, 0x0005, 0x6003, 0x0001, + 0x6106, 0x080c, 0x94ff, 0x0126, 0x2091, 0x8000, 0x080c, 0x9ab1, + 0x012e, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x94ff, 0x0126, + 0x2091, 0x8000, 0x080c, 0x9ab1, 0x012e, 0x0005, 0x6003, 0x0003, + 0x6106, 0x2c10, 0x080c, 0x1be0, 0x0126, 0x2091, 0x8000, 0x080c, + 0x9564, 0x080c, 0x9bd3, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, + 0x0036, 0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, + 0x0005, 0xe615, 0xe617, 0xe629, 0xe643, 0xe615, 0xe615, 0xe615, + 0xe615, 0xe615, 0xe615, 0xe615, 0xe615, 0xe615, 0xe615, 0xe615, + 0xe615, 0xe615, 0xe615, 0xe615, 0xe615, 0x080c, 0x0dc5, 0x6014, + 0x2048, 0xa87c, 0xd0fc, 0x01f8, 0x909c, 0x0003, 0x939e, 0x0003, + 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c, 0x94ff, 0x080c, 0x9ab1, + 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, + 0x939e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x080c, 0x94ff, + 0x080c, 0x9ab1, 0x00e0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, + 0x080c, 0xebd4, 0x00a0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, + 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, + 0x2c10, 0x080c, 0x1be0, 0x080c, 0x9564, 0x080c, 0x9bd3, 0x0005, + 0x080c, 0x99a5, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, + 0xef85, 0x0036, 0x2019, 0x0029, 0x080c, 0xebd4, 0x003e, 0x009e, + 0x080c, 0xb306, 0x080c, 0x9ab1, 0x0005, 0x080c, 0x9a61, 0x6114, + 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xef85, 0x0036, 0x2019, + 0x0029, 0x080c, 0xebd4, 0x003e, 0x009e, 0x080c, 0xb306, 0x080c, + 0x9bd3, 0x0005, 0x9182, 0x0085, 0x0002, 0xe694, 0xe692, 0xe692, + 0xe6a0, 0xe692, 0xe692, 0xe692, 0xe692, 0xe692, 0xe692, 0xe692, + 0xe692, 0xe692, 0x080c, 0x0dc5, 0x6003, 0x000b, 0x6106, 0x080c, + 0x94ff, 0x0126, 0x2091, 0x8000, 0x080c, 0x9ab1, 0x012e, 0x0005, + 0x0026, 0x00e6, 0x080c, 0xee26, 0x0118, 0x080c, 0xb2d3, 0x0450, + 0x2071, 0x0260, 0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, + 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, + 0x014e, 0x080c, 0xb5f5, 0x7220, 0x080c, 0xea29, 0x0118, 0x6007, + 0x0086, 0x0040, 0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, + 0x6007, 0x0086, 0x6003, 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, + 0x080c, 0x9bd3, 0x00ee, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, + 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0dc5, 0x908a, 0x0092, 0x1a0c, + 0x0dc5, 0x9082, 0x0085, 0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, + 0x0014, 0x0118, 0x080c, 0xb36d, 0x0050, 0x2001, 0x0007, 0x080c, + 0x6696, 0x080c, 0x99a5, 0x080c, 0xb306, 0x080c, 0x9ab1, 0x0005, + 0xe705, 0xe707, 0xe707, 0xe705, 0xe705, 0xe705, 0xe705, 0xe705, + 0xe705, 0xe705, 0xe705, 0xe705, 0xe705, 0x080c, 0x0dc5, 0x080c, + 0x99a5, 0x080c, 0xb306, 0x080c, 0x9ab1, 0x0005, 0x9182, 0x0085, + 0x0a0c, 0x0dc5, 0x9182, 0x0092, 0x1a0c, 0x0dc5, 0x9182, 0x0085, + 0x0002, 0xe726, 0xe726, 0xe726, 0xe728, 0xe726, 0xe726, 0xe726, + 0xe726, 0xe726, 0xe726, 0xe726, 0xe726, 0xe726, 0x080c, 0x0dc5, + 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, 0x0014, 0x0130, 0x9186, + 0x0027, 0x0118, 0x080c, 0xb36d, 0x0030, 0x080c, 0x99a5, 0x080c, + 0xb306, 0x080c, 0x9ab1, 0x0005, 0x0036, 0x080c, 0xee87, 0x6043, + 0x0000, 0x2019, 0x000b, 0x0011, 0x003e, 0x0005, 0x6010, 0x0006, + 0x0059, 0x000e, 0x6012, 0x6023, 0x0006, 0x6003, 0x0007, 0x601b, + 0x0000, 0x6043, 0x0000, 0x0005, 0x0126, 0x0036, 0x2091, 0x8000, + 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0xaafb, 0x009e, 0x008e, + 0x1550, 0x0076, 0x2c38, 0x080c, 0xaba6, 0x007e, 0x1520, 0x6000, + 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0, 0x0096, + 0x601c, 0xd084, 0x0140, 0x080c, 0xee87, 0x080c, 0xd7fb, 0x080c, + 0x1a8e, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xd0d8, 0x0110, + 0x080c, 0xebd4, 0x009e, 0x6017, 0x0000, 0x080c, 0xee87, 0x6023, + 0x0007, 0x080c, 0xd7fb, 0x003e, 0x012e, 0x0005, 0x00f6, 0x00c6, + 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, 0x080c, + 0x2873, 0x1904, 0xe7e4, 0x0016, 0x00c6, 0x080c, 0x6724, 0x1904, + 0xe7e2, 0x001e, 0x00c6, 0x080c, 0xd7e3, 0x1130, 0xb8c0, 0x9005, + 0x0118, 0x080c, 0x33a5, 0x0148, 0x2b10, 0x2160, 0x6010, 0x0006, + 0x6212, 0x080c, 0xd7ea, 0x000e, 0x6012, 0x00ce, 0x002e, 0x0026, + 0x0016, 0x2019, 0x0029, 0x080c, 0xac6c, 0x080c, 0x96a4, 0x0076, + 0x903e, 0x080c, 0x9577, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c, + 0xe91c, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286, + 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x330e, + 0x002e, 0xbcc0, 0x001e, 0x080c, 0x6148, 0xbe12, 0xbd16, 0xbcc2, + 0x9006, 0x0010, 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce, + 0x00fe, 0x0005, 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824, + 0x2104, 0x9086, 0x0074, 0x1904, 0xe843, 0x2069, 0x0260, 0x6944, + 0x9182, 0x0100, 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xe840, + 0x2001, 0x197c, 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb8c0, + 0x9005, 0x0118, 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001, + 0x0648, 0x080c, 0xefed, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009, + 0x0205, 0x200b, 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182, + 0x0100, 0x02a8, 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001, + 0x0288, 0x6950, 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100, + 0x00a0, 0x6017, 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017, + 0x0700, 0x0058, 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028, + 0x6017, 0x0f00, 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008, + 0x9006, 0x001e, 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6, + 0x0026, 0x0036, 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff, + 0x9286, 0x0006, 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00, + 0x8217, 0x9286, 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c, + 0x6733, 0x0804, 0xe8ab, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, + 0x2b48, 0x2019, 0x000a, 0x080c, 0xc379, 0x009e, 0x15a8, 0x2011, + 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, + 0xc379, 0x009e, 0x1548, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006, + 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, + 0xec31, 0xb800, 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x96a4, + 0x0076, 0x2039, 0x0000, 0x080c, 0x9577, 0x2c08, 0x080c, 0xe91c, + 0x007e, 0x2001, 0x0007, 0x080c, 0x6696, 0x2001, 0x0007, 0x080c, + 0x666a, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be, + 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800, + 0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, + 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930, + 0x7834, 0x080c, 0x2873, 0x11d0, 0x080c, 0x6724, 0x11b8, 0x2011, + 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, + 0xc379, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, + 0x2b48, 0x2019, 0x0006, 0x080c, 0xc379, 0x009e, 0x015e, 0x003e, + 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, + 0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, + 0x080c, 0x2873, 0x11d0, 0x080c, 0x6724, 0x11b8, 0x2011, 0x0276, + 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xc379, + 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, + 0x2019, 0x0006, 0x080c, 0xc379, 0x009e, 0x015e, 0x003e, 0x002e, + 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, + 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, + 0x2029, 0x19f1, 0x252c, 0x2021, 0x19f7, 0x2424, 0x2061, 0x1cd0, + 0x2071, 0x1800, 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006, 0x9186, + 0x1ab7, 0x000e, 0x0128, 0x8001, 0x9602, 0x1a04, 0xe9ba, 0x0018, + 0x9606, 0x0904, 0xe9ba, 0x080c, 0x8cf7, 0x0904, 0xe9b1, 0x2100, + 0x9c06, 0x0904, 0xe9b1, 0x6720, 0x9786, 0x0007, 0x0904, 0xe9b1, + 0x080c, 0xec72, 0x1904, 0xe9b1, 0x080c, 0xf00b, 0x0904, 0xe9b1, + 0x080c, 0xec62, 0x0904, 0xe9b1, 0x6720, 0x9786, 0x0001, 0x1148, + 0x080c, 0x33a5, 0x0904, 0xe9f9, 0x6004, 0x9086, 0x0000, 0x1904, + 0xe9f9, 0x9786, 0x0004, 0x0904, 0xe9f9, 0x2500, 0x9c06, 0x0904, + 0xe9b1, 0x2400, 0x9c06, 0x05e8, 0x88ff, 0x0118, 0x6054, 0x9906, + 0x15c0, 0x0096, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, + 0x1a8e, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xd2e0, 0x1130, + 0x080c, 0xbcb6, 0x009e, 0x080c, 0xb306, 0x0418, 0x6014, 0x2048, + 0x080c, 0xd0d8, 0x01d8, 0x9786, 0x0003, 0x1570, 0xa867, 0x0103, + 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, 0x0fc0, + 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xef85, 0x0016, 0x080c, + 0xd3ce, 0x080c, 0x6e92, 0x001e, 0x080c, 0xd2c3, 0x009e, 0x080c, + 0xb306, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, + 0x0804, 0xe930, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, + 0x008e, 0x00ce, 0x00ee, 0x0005, 0x9786, 0x0006, 0x1150, 0x9386, + 0x0005, 0x0128, 0x080c, 0xef85, 0x080c, 0xebd4, 0x08f8, 0x009e, + 0x0c00, 0x9786, 0x0009, 0x11f8, 0x6000, 0x9086, 0x0004, 0x01c0, + 0x6000, 0x9086, 0x0003, 0x11a0, 0x080c, 0x9a61, 0x0096, 0x6114, + 0x2148, 0x080c, 0xd0d8, 0x0118, 0x6010, 0x080c, 0x6e9f, 0x009e, + 0x00c6, 0x080c, 0xb2d3, 0x00ce, 0x0036, 0x080c, 0x9bd3, 0x003e, + 0x009e, 0x0804, 0xe9b1, 0x9786, 0x000a, 0x0904, 0xe9a1, 0x0804, + 0xe996, 0x81ff, 0x0904, 0xe9b1, 0x9180, 0x0001, 0x2004, 0x9086, + 0x0018, 0x0138, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, 0x1904, + 0xe9b1, 0x6000, 0x9086, 0x0002, 0x1904, 0xe9b1, 0x080c, 0xd2cf, + 0x0138, 0x080c, 0xd2e0, 0x1904, 0xe9b1, 0x080c, 0xbcb6, 0x0038, + 0x080c, 0x3279, 0x080c, 0xd2e0, 0x1110, 0x080c, 0xbcb6, 0x080c, + 0xb306, 0x0804, 0xe9b1, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, + 0x0005, 0x00c6, 0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, + 0xebfb, 0x001e, 0x0120, 0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, + 0x00ce, 0x0005, 0xea48, 0xea48, 0xea48, 0xea48, 0xea48, 0xea48, + 0xea4a, 0xea48, 0xea48, 0xea48, 0xea73, 0xb306, 0xb306, 0xea48, + 0x9006, 0x0005, 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, + 0xbca0, 0x00be, 0x2c00, 0x2009, 0x0020, 0x080c, 0xec31, 0x001e, + 0x004e, 0x2019, 0x0002, 0x080c, 0xe754, 0x003e, 0x9085, 0x0001, + 0x0005, 0x0096, 0x080c, 0xd0d8, 0x0140, 0x6014, 0x904d, 0x080c, + 0xccf3, 0x687b, 0x0005, 0x080c, 0x6e9f, 0x009e, 0x080c, 0xb306, + 0x9085, 0x0001, 0x0005, 0x0019, 0x9085, 0x0001, 0x0005, 0x6000, + 0x908a, 0x0010, 0x1a0c, 0x0dc5, 0x000b, 0x0005, 0xea8e, 0xea8e, + 0xeaa5, 0xea95, 0xeab4, 0xea8e, 0xea8e, 0xea90, 0xea8e, 0xea8e, + 0xea8e, 0xea8e, 0xea8e, 0xea8e, 0xea8e, 0xea8e, 0x080c, 0x0dc5, + 0x080c, 0xb306, 0x9085, 0x0001, 0x0005, 0x0036, 0x00e6, 0x2071, + 0x19e8, 0x703c, 0x9c06, 0x1128, 0x2019, 0x0001, 0x080c, 0xaa49, + 0x0010, 0x080c, 0xac2b, 0x00ee, 0x003e, 0x0096, 0x00d6, 0x6014, + 0x2048, 0xa87b, 0x0005, 0x080c, 0x6e9f, 0x080c, 0xb306, 0x00de, + 0x009e, 0x9085, 0x0001, 0x0005, 0x601c, 0xd084, 0x190c, 0x1a8e, + 0x0c60, 0x2001, 0x0001, 0x080c, 0x6656, 0x0156, 0x0016, 0x0026, + 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, + 0xc365, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, + 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, + 0x8000, 0x2740, 0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904, + 0xeb2b, 0x2071, 0x1800, 0x7654, 0x7074, 0x8001, 0x9602, 0x1a04, + 0xeb2b, 0x88ff, 0x0120, 0x2800, 0x9c06, 0x15a0, 0x2078, 0x080c, + 0xec62, 0x0580, 0x2400, 0x9c06, 0x0568, 0x6720, 0x9786, 0x0006, + 0x1548, 0x9786, 0x0007, 0x0530, 0x88ff, 0x1150, 0xd58c, 0x1118, + 0x6010, 0x9b06, 0x11f8, 0xd584, 0x0118, 0x6054, 0x9106, 0x11d0, + 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xee87, 0x080c, 0xd7fb, + 0x080c, 0x1a8e, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xd0d8, + 0x0120, 0x0046, 0x080c, 0xebd4, 0x004e, 0x009e, 0x080c, 0xb306, + 0x88ff, 0x1198, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, + 0x1210, 0x0804, 0xeade, 0x9006, 0x012e, 0x00be, 0x006e, 0x007e, + 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, + 0x00b6, 0x0076, 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, + 0x2019, 0x0002, 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xaafb, + 0x009e, 0x008e, 0x903e, 0x080c, 0xaba6, 0x080c, 0xeacf, 0x005e, + 0x007e, 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, + 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, + 0x080c, 0x6724, 0x1180, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, + 0x0001, 0x0096, 0x904e, 0x080c, 0xaafb, 0x009e, 0x008e, 0x903e, + 0x080c, 0xaba6, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xeb5e, + 0x0036, 0x2508, 0x2029, 0x0003, 0x080c, 0xeacf, 0x003e, 0x015e, + 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x00b6, 0x0076, + 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019, + 0x0048, 0x0096, 0x904e, 0x080c, 0xaafb, 0x009e, 0x008e, 0x903e, + 0x080c, 0xaba6, 0x2c20, 0x080c, 0xeacf, 0x005e, 0x007e, 0x00be, + 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, + 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x6724, 0x1190, + 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xee6b, + 0x004e, 0x0096, 0x904e, 0x080c, 0xaafb, 0x009e, 0x008e, 0x903e, + 0x080c, 0xaba6, 0x003e, 0x001e, 0x8108, 0x1f04, 0xebab, 0x0036, + 0x2029, 0x0002, 0x080c, 0xeacf, 0x003e, 0x015e, 0x00ce, 0x007e, + 0x005e, 0x004e, 0x00be, 0x0005, 0x0016, 0x00f6, 0x080c, 0xd0d6, + 0x0198, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0046, 0x0180, 0xa800, + 0x907d, 0x0138, 0xa803, 0x0000, 0xab82, 0x080c, 0x6e9f, 0x2f48, + 0x0cb0, 0xab82, 0x080c, 0x6e9f, 0x00fe, 0x001e, 0x0005, 0xa800, + 0x907d, 0x0130, 0xa803, 0x0000, 0x080c, 0x6e9f, 0x2f48, 0x0cb8, + 0x080c, 0x6e9f, 0x0c88, 0x00e6, 0x0046, 0x0036, 0x2061, 0x1cd0, + 0x9005, 0x1138, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, 0x9402, + 0x12f8, 0x2100, 0x9c06, 0x0188, 0x6000, 0x9086, 0x0000, 0x0168, + 0x6008, 0x9206, 0x1150, 0x6320, 0x9386, 0x0009, 0x01b0, 0x6010, + 0x91a0, 0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, 0x2001, + 0x181a, 0x2004, 0x9c02, 0x1220, 0x0c20, 0x9085, 0x0001, 0x0008, + 0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x631c, 0xd3c4, 0x1d68, + 0x0c30, 0x0096, 0x0006, 0x080c, 0x100e, 0x000e, 0x090c, 0x0dc5, + 0xaae2, 0xa867, 0x010d, 0xa88e, 0x0026, 0x2010, 0x080c, 0xd0c6, + 0x2001, 0x0000, 0x0120, 0x2200, 0x9080, 0x0015, 0x2004, 0x002e, + 0xa87a, 0x9186, 0x0020, 0x0110, 0xa8e3, 0xffff, 0xa986, 0xac76, + 0xa87f, 0x0000, 0x2001, 0x198e, 0x2004, 0xa882, 0x9006, 0xa802, + 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6e9f, 0x012e, + 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786, 0x0001, + 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110, 0x9085, + 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6, 0x2058, + 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8, + 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134, 0x918c, + 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0005, 0x2001, 0x1987, 0x2004, 0x601a, 0x080c, 0x94ff, 0x080c, + 0x9ab1, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4, + 0x0158, 0xd0cc, 0x0118, 0x080c, 0xd412, 0x0030, 0x080c, 0xee87, + 0x080c, 0x8a25, 0x080c, 0xb2d3, 0x0005, 0x9280, 0x0008, 0x2004, + 0x9084, 0x000f, 0x0002, 0xecc1, 0xecc1, 0xecc1, 0xecc3, 0xecc1, + 0xecc3, 0xecc3, 0xecc1, 0xecc3, 0xecc1, 0xecc1, 0xecc1, 0xecc1, + 0xecc1, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008, + 0x2004, 0x9084, 0x000f, 0x0002, 0xecda, 0xecda, 0xecda, 0xecda, + 0xecda, 0xecda, 0xece7, 0xecda, 0xecda, 0xecda, 0xecda, 0xecda, + 0xecda, 0xecda, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, + 0x6003, 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x0005, 0x0096, + 0x00c6, 0x2260, 0x080c, 0xee87, 0x6043, 0x0000, 0x6024, 0xc0f4, + 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186, + 0x0007, 0x1904, 0xed40, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c, + 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a, 0x6003, + 0x0001, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x00c6, 0x2d60, 0x6100, + 0x9186, 0x0002, 0x1904, 0xedb0, 0x6014, 0x9005, 0x1138, 0x6000, + 0x9086, 0x0007, 0x190c, 0x0dc5, 0x0804, 0xedb0, 0x2048, 0x080c, + 0xd0d8, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, + 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1168, 0xa87c, + 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0fc, 0xa882, 0x2009, 0x0043, + 0x080c, 0xe59e, 0x0804, 0xedb0, 0x2009, 0x0041, 0x0804, 0xedaa, + 0x9186, 0x0005, 0x15a0, 0x6814, 0x2048, 0xa87c, 0xd0bc, 0x1120, + 0x00de, 0x009e, 0x0804, 0xecda, 0xd0b4, 0x0128, 0xd0fc, 0x090c, + 0x0dc5, 0x0804, 0xecfb, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, + 0x94ff, 0x080c, 0x9ab1, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, + 0x0120, 0x9186, 0x0004, 0x1904, 0xedb0, 0x6814, 0x2048, 0xa97c, + 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1fc, 0xc1bc, 0xa982, 0x00f6, + 0x2c78, 0x080c, 0x1768, 0x00fe, 0x2009, 0x0042, 0x0498, 0x0036, + 0x080c, 0x100e, 0x090c, 0x0dc5, 0xa867, 0x010d, 0x9006, 0xa802, + 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, 0x2c00, 0xa892, + 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, 0x6010, 0x00b6, + 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a, 0xa876, 0x9006, + 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, 0x080c, 0x6e9f, + 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xe746, 0x2d00, 0x600a, + 0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c, 0xe59e, + 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, + 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, 0x080c, + 0x99a5, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, 0x080c, + 0xebd4, 0x009e, 0x003e, 0x080c, 0x9ab1, 0x0005, 0x9186, 0x0014, + 0x0d70, 0x080c, 0xb36d, 0x0005, 0xede3, 0xede1, 0xede1, 0xede1, + 0xede1, 0xede1, 0xede3, 0xede1, 0xede1, 0xede1, 0xede1, 0xede1, + 0xede1, 0x080c, 0x0dc5, 0x080c, 0x99a5, 0x6003, 0x000c, 0x080c, + 0x9ab1, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, + 0x001a, 0x080c, 0xb36d, 0x0005, 0xee01, 0xee01, 0xee01, 0xee01, + 0xee03, 0xee23, 0xee01, 0xee01, 0xee01, 0xee01, 0xee01, 0xee01, + 0xee01, 0x080c, 0x0dc5, 0x00d6, 0x2c68, 0x080c, 0xb27d, 0x01b0, + 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, 0x613a, + 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, 0x6112, + 0x6023, 0x0004, 0x080c, 0x94ff, 0x080c, 0x9ab1, 0x2d60, 0x080c, + 0xb2d3, 0x00de, 0x0005, 0x080c, 0xb2d3, 0x0005, 0x00e6, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, 0x2009, + 0x1867, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, 0xc0e5, + 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1988, 0x2004, 0x6042, 0x2009, + 0x1867, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1867, 0x210c, + 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, 0x2001, + 0x1988, 0x200c, 0x2001, 0x1986, 0x2004, 0x9100, 0x9080, 0x000a, + 0x6042, 0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be, 0x0008, 0x2104, + 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, 0x0000, + 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154, 0xb8bc, + 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106, 0x1138, + 0x600c, 0x2072, 0x080c, 0x8a25, 0x080c, 0xb2d3, 0x0010, 0x9cf0, + 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, 0x00d6, + 0x00b6, 0x6010, 0x2058, 0xb8bc, 0x906d, 0x0130, 0x9c06, 0x0110, + 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, 0x0005, 0x0026, + 0x0036, 0x0156, 0x2011, 0x182c, 0x2204, 0x9084, 0x00ff, 0x2019, + 0x026e, 0x2334, 0x96b4, 0x00ff, 0x9636, 0x1508, 0x8318, 0x2334, + 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, + 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xc379, + 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, + 0x2048, 0x2019, 0x0006, 0x080c, 0xc379, 0x009e, 0x1100, 0x015e, + 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x60c1, + 0x080c, 0x3000, 0x00ee, 0x0005, 0x0096, 0x0026, 0x080c, 0x100e, + 0x090c, 0x0dc5, 0xa85c, 0x9080, 0x001a, 0x20a0, 0x20a9, 0x000c, + 0xa860, 0x20e8, 0x9006, 0x4004, 0x9186, 0x0046, 0x1118, 0xa867, + 0x0136, 0x0038, 0xa867, 0x0138, 0x9186, 0x0041, 0x0110, 0xa87b, + 0x0001, 0x7038, 0x9084, 0xff00, 0x7240, 0x9294, 0xff00, 0x8007, + 0x9215, 0xaa9a, 0x9186, 0x0046, 0x1168, 0x7038, 0x9084, 0x00ff, + 0x723c, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x723c, 0x9294, 0x00ff, + 0xaaa2, 0x0060, 0x7040, 0x9084, 0x00ff, 0x7244, 0x9294, 0xff00, + 0x9215, 0xaa9e, 0x7244, 0x9294, 0x00ff, 0xaaa2, 0x9186, 0x0046, + 0x1118, 0x9e90, 0x0012, 0x0010, 0x9e90, 0x001a, 0x2204, 0x8007, + 0xa8a6, 0x8210, 0x2204, 0x8007, 0xa8aa, 0x8210, 0x2204, 0x8007, + 0xa8ae, 0x8210, 0x2204, 0x8007, 0xa8b2, 0x8210, 0x9186, 0x0046, + 0x11b8, 0x9e90, 0x0016, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, + 0x8007, 0xa8ba, 0x8210, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, + 0x8007, 0xa8c2, 0x8210, 0x2011, 0x0205, 0x2013, 0x0001, 0x00b0, + 0x9e90, 0x001e, 0x2204, 0x8007, 0xa8b6, 0x8210, 0x2204, 0x8007, + 0xa8ba, 0x2011, 0x0205, 0x2013, 0x0001, 0x2011, 0x0260, 0x2204, + 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, 0x9186, 0x0046, + 0x1118, 0x2011, 0x0262, 0x0010, 0x2011, 0x026a, 0x0146, 0x01d6, + 0x0036, 0x20a9, 0x0001, 0x2019, 0x0008, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x0031, 0x20a0, 0x2204, 0x8007, 0x4004, 0x8210, 0x8319, + 0x1dd0, 0x003e, 0x01ce, 0x013e, 0x2011, 0x0205, 0x2013, 0x0000, + 0x002e, 0x080c, 0x6e9f, 0x009e, 0x0005, 0x00e6, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, + 0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, + 0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, + 0x2029, 0x19f1, 0x252c, 0x2021, 0x19f7, 0x2424, 0x2061, 0x1cd0, + 0x2071, 0x1800, 0x7654, 0x7074, 0x9606, 0x0578, 0x6720, 0x9786, + 0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, + 0x2400, 0x9c06, 0x01d0, 0x080c, 0xec62, 0x01b8, 0x080c, 0xec72, + 0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1a8e, + 0x001e, 0x080c, 0xd2cf, 0x1110, 0x080c, 0x3279, 0x080c, 0xd2e0, + 0x1110, 0x080c, 0xbcb6, 0x080c, 0xb306, 0x9ce0, 0x0018, 0x2001, + 0x181a, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, + 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, + 0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1837, + 0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, + 0xd7e3, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, + 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4dfb, 0x004e, + 0x003e, 0x000e, 0x0005, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, + 0xac6c, 0x080c, 0xb306, 0x9006, 0x0005, 0x00e6, 0x00c6, 0x00b6, + 0x0046, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x7454, 0x7074, 0x8001, + 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, 0x9086, 0x0000, + 0x0148, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1120, 0x6004, 0x9086, + 0x0002, 0x0140, 0x9ce0, 0x0018, 0x2001, 0x181a, 0x2004, 0x9c02, + 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, 0x004e, 0x00be, + 0x00ce, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0a4, 0x0160, + 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0138, 0x2001, 0x1848, 0x2004, + 0xd0a4, 0x1118, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x0126, + 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, 0x1840, 0xd5a4, + 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4, 0x0118, 0x7000, 0x8000, + 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007, 0x908e, 0x0003, + 0x0148, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x2071, + 0xfff6, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, + 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xffee, 0x0021, 0x00ee, + 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000, 0x2077, 0x1220, 0x8e70, + 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6, 0x2071, 0xffec, 0x0c99, + 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff0, 0x0c69, 0x00ee, 0x0005, + 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0x1840, 0x7014, + 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0003, 0x000b, + 0x07d2, 0x0000, 0xc000, 0x0001, 0x8064, 0x0008, 0x0010, 0x0000, + 0x8066, 0x0000, 0x0101, 0x0008, 0x4407, 0x0003, 0x8060, 0x0000, + 0x0400, 0x0000, 0x580d, 0x000b, 0x79c0, 0x0003, 0x5106, 0x0003, + 0x4c0a, 0x0003, 0xbac0, 0x0009, 0x008a, 0x0000, 0x0c0a, 0x000b, + 0x15fe, 0x0008, 0x340a, 0x0003, 0xc4c0, 0x0009, 0x7000, 0x0000, + 0xffa0, 0x0001, 0x2000, 0x0000, 0x1680, 0x000b, 0x808c, 0x0008, + 0x0001, 0x0000, 0x0000, 0x0007, 0x4028, 0x0000, 0x4047, 0x000a, + 0x808c, 0x0008, 0x0002, 0x0000, 0x0822, 0x0003, 0x4022, 0x0000, + 0x0028, 0x000b, 0x4122, 0x0008, 0x94c0, 0x0009, 0xff00, 0x0008, + 0xffe0, 0x0009, 0x0500, 0x0008, 0x0aab, 0x0003, 0x4447, 0x0002, + 0x0ea8, 0x000b, 0x0bfe, 0x0008, 0x11a0, 0x0001, 0x1286, 0x0003, + 0x0ca0, 0x0001, 0x1286, 0x0003, 0x9180, 0x0001, 0x0004, 0x0000, + 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x0009, 0x0008, 0x4436, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008, + 0x0060, 0x0008, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, + 0x0411, 0x0000, 0x443e, 0x0003, 0x03fe, 0x0000, 0x43e0, 0x0001, + 0x0e83, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, 0x02e0, 0x0001, + 0x0e83, 0x000b, 0x9180, 0x0001, 0x0005, 0x0008, 0x8060, 0x0000, + 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0019, 0x0000, + 0x444d, 0x000b, 0x0240, 0x0002, 0x0a80, 0x0003, 0x00fe, 0x0000, + 0x3283, 0x000b, 0x0248, 0x000a, 0x085c, 0x0003, 0x9180, 0x0001, + 0x0006, 0x0008, 0x7f62, 0x0008, 0x8002, 0x0008, 0x0003, 0x0008, + 0x8066, 0x0000, 0x020a, 0x0000, 0x445b, 0x0003, 0x112a, 0x0000, + 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44, 0x0002, 0x0c0a, 0x000b, + 0x808c, 0x0008, 0x0002, 0x0000, 0x1760, 0x0008, 0x8062, 0x0008, + 0x000f, 0x0008, 0x8066, 0x0000, 0x0011, 0x0008, 0x4468, 0x0003, + 0x01fe, 0x0008, 0x42e0, 0x0009, 0x0e74, 0x0003, 0x00fe, 0x0000, + 0x43e0, 0x0001, 0x0e74, 0x0003, 0x1734, 0x0000, 0x1530, 0x0000, + 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001, 0x0010, 0x0000, + 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x1e0a, 0x0008, 0x447a, 0x0003, 0x808a, 0x0008, 0x0003, 0x0008, + 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x5880, 0x000b, + 0x8066, 0x0000, 0x3679, 0x0000, 0x4483, 0x0003, 0x5884, 0x0003, + 0x3efe, 0x0008, 0x7f4f, 0x0002, 0x088a, 0x000b, 0x0d00, 0x0000, + 0x0092, 0x000c, 0x8054, 0x0008, 0x0011, 0x0008, 0x8074, 0x0000, + 0x1010, 0x0008, 0x1efe, 0x0000, 0x300a, 0x000b, 0x00e0, 0x000c, + 0x000a, 0x000b, 0x00fe, 0x0000, 0x349a, 0x0003, 0x1a60, 0x0000, + 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008, + 0x4499, 0x000b, 0x03fe, 0x0000, 0x04d0, 0x0001, 0x0cd4, 0x000b, + 0x82c0, 0x0001, 0x1f00, 0x0000, 0xffa0, 0x0001, 0x0400, 0x0000, + 0x08b2, 0x0003, 0x14dc, 0x0003, 0x01fe, 0x0008, 0x0580, 0x0009, + 0x7f06, 0x0000, 0x8690, 0x0009, 0x0000, 0x0008, 0x7f0c, 0x0000, + 0x02fe, 0x0008, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x0680, 0x0009, + 0x10b2, 0x0003, 0x7f08, 0x0008, 0x84c0, 0x0001, 0xff00, 0x0008, + 0x08d4, 0x0003, 0xb9c0, 0x0009, 0x0030, 0x0008, 0x0cc3, 0x000b, + 0x8060, 0x0000, 0x0400, 0x0000, 0x80fe, 0x0008, 0x1a0a, 0x0009, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0409, 0x0000, 0x44bc, 0x0003, + 0x80fe, 0x0008, 0x1a09, 0x0009, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x040a, 0x0000, 0x44c2, 0x0003, 0x00fe, 0x0000, 0x34ca, 0x0003, + 0x8072, 0x0000, 0x1010, 0x0008, 0x3944, 0x0002, 0x08c5, 0x0003, + 0x00ce, 0x0003, 0x8072, 0x0000, 0x2020, 0x0008, 0x3945, 0x000a, + 0x08ca, 0x0003, 0x3946, 0x000a, 0x0cdb, 0x000b, 0x0000, 0x0007, + 0x3943, 0x000a, 0x08db, 0x0003, 0x00ce, 0x0003, 0x00fe, 0x0000, + 0x34d9, 0x000b, 0x8072, 0x0000, 0x1000, 0x0000, 0x00db, 0x000b, + 0x8072, 0x0000, 0x2000, 0x0000, 0x4000, 0x000f, 0x86c0, 0x0009, + 0xfc00, 0x0008, 0x08d4, 0x0003, 0x00b2, 0x000b, 0x1c60, 0x0000, + 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008, 0x44e4, 0x000b, + 0x58e5, 0x000b, 0x0140, 0x0008, 0x0242, 0x0000, 0x1f43, 0x0002, + 0x0cf3, 0x000b, 0x0d44, 0x0000, 0x0d46, 0x0008, 0x0348, 0x0008, + 0x044a, 0x0008, 0x030a, 0x0008, 0x040c, 0x0000, 0x0d06, 0x0000, + 0x0d08, 0x0008, 0x00f7, 0x0003, 0x0344, 0x0008, 0x0446, 0x0008, + 0x0548, 0x0008, 0x064a, 0x0000, 0x1948, 0x000a, 0x08fa, 0x0003, + 0x0d4a, 0x0008, 0x58fa, 0x0003, 0x3efe, 0x0008, 0x7f4f, 0x0002, + 0x0901, 0x0003, 0x8000, 0x0000, 0x0001, 0x0000, 0x0092, 0x000c, + 0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000, 0x2020, 0x0008, + 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0d, 0x0003, 0x2b24, 0x0008, + 0x2b24, 0x0008, 0x590a, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000, + 0x1242, 0x0002, 0x0958, 0x0003, 0x3a45, 0x000a, 0x0947, 0x000b, + 0x8072, 0x0000, 0x1000, 0x0000, 0x3945, 0x000a, 0x0917, 0x000b, + 0x8072, 0x0000, 0x3010, 0x0000, 0x1e10, 0x000a, 0x7f3c, 0x0000, + 0x0942, 0x000b, 0x1d00, 0x0002, 0x7f3a, 0x0000, 0x0d60, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x4520, 0x000b, + 0x00fe, 0x0000, 0x353f, 0x000b, 0x1c60, 0x0000, 0x8062, 0x0008, + 0x0001, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, 0x4528, 0x0003, + 0x00fe, 0x0000, 0x325b, 0x000b, 0x0038, 0x0000, 0x0060, 0x0008, + 0x8062, 0x0008, 0x0019, 0x0000, 0x8066, 0x0000, 0x0009, 0x0008, + 0x4531, 0x000b, 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f3e, 0x0008, + 0x0d60, 0x0000, 0x0efe, 0x0008, 0x1f80, 0x0001, 0x7f62, 0x0008, + 0x8066, 0x0000, 0x0009, 0x0008, 0x453b, 0x000b, 0x003a, 0x0008, + 0x1dfe, 0x0000, 0x011c, 0x000b, 0x0036, 0x0008, 0x00e0, 0x000c, + 0x0158, 0x000b, 0x8074, 0x0000, 0x2000, 0x0000, 0x8072, 0x0000, + 0x2000, 0x0000, 0x0158, 0x000b, 0x3a44, 0x0002, 0x0a89, 0x0003, + 0x8074, 0x0000, 0x1000, 0x0000, 0x8072, 0x0000, 0x1000, 0x0000, + 0x2d0e, 0x0000, 0x2d0e, 0x0000, 0x3658, 0x0003, 0x26fe, 0x0008, + 0x26fe, 0x0008, 0x2700, 0x0008, 0x2700, 0x0008, 0x00d0, 0x0009, + 0x0d6a, 0x0003, 0x8074, 0x0000, 0x4040, 0x0008, 0x5958, 0x0003, + 0x5106, 0x0003, 0x3a46, 0x000a, 0x0d6a, 0x0003, 0x3a47, 0x0002, + 0x0965, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, + 0x8000, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x01b4, 0x0003, + 0x92c0, 0x0009, 0x0fc8, 0x0000, 0x080a, 0x0003, 0x1246, 0x000a, + 0x0e52, 0x000b, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000, + 0x8066, 0x0000, 0x362a, 0x0000, 0x456f, 0x0003, 0x2000, 0x0000, + 0x2000, 0x0000, 0x2102, 0x0000, 0x2102, 0x0000, 0x2204, 0x0000, + 0x2204, 0x0000, 0x2306, 0x0000, 0x2306, 0x0000, 0x2408, 0x0000, + 0x2408, 0x0000, 0x250a, 0x0000, 0x250a, 0x0000, 0x260c, 0x0000, + 0x260c, 0x0000, 0x270e, 0x0000, 0x270e, 0x0000, 0x2810, 0x0000, + 0x2810, 0x0000, 0x2912, 0x0000, 0x2912, 0x0000, 0x1a60, 0x0000, + 0x8062, 0x0008, 0x0007, 0x0000, 0x8066, 0x0000, 0x0052, 0x0000, + 0x4589, 0x000b, 0x92c0, 0x0009, 0x0780, 0x0008, 0x0e6e, 0x000b, + 0x124b, 0x0002, 0x0992, 0x0003, 0x2e4d, 0x0002, 0x2e4d, 0x0002, + 0x0a58, 0x0003, 0x3a46, 0x000a, 0x0da2, 0x000b, 0x5994, 0x0003, + 0x8054, 0x0008, 0x0004, 0x0000, 0x1243, 0x000a, 0x09b0, 0x0003, + 0x8010, 0x0008, 0x000d, 0x0000, 0x0233, 0x000c, 0x1948, 0x000a, + 0x099f, 0x000b, 0x0228, 0x000c, 0x1810, 0x0000, 0x0233, 0x000c, + 0x01b0, 0x000b, 0x1948, 0x000a, 0x09a6, 0x000b, 0x1243, 0x000a, + 0x0a5b, 0x0003, 0x194d, 0x000a, 0x09aa, 0x000b, 0x1243, 0x000a, + 0x0a62, 0x0003, 0x59aa, 0x000b, 0x8054, 0x0008, 0x0004, 0x0000, + 0x0228, 0x000c, 0x1810, 0x0000, 0x0233, 0x000c, 0x8074, 0x0000, + 0xf000, 0x0008, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, + 0x3a42, 0x0002, 0x0dba, 0x000b, 0x15fe, 0x0008, 0x3461, 0x000b, + 0x000a, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000, 0x8010, 0x0008, + 0x000c, 0x0008, 0x0233, 0x000c, 0x000a, 0x000b, 0xbbe0, 0x0009, + 0x0030, 0x0008, 0x0dd0, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, + 0x09cd, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x09cd, 0x0003, + 0x0223, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, 0x0220, 0x000b, + 0x8076, 0x0008, 0x0041, 0x0008, 0x0220, 0x000b, 0xbbe0, 0x0009, + 0x0032, 0x0000, 0x0dd5, 0x000b, 0x3c1e, 0x0008, 0x0220, 0x000b, + 0xbbe0, 0x0009, 0x003b, 0x0000, 0x0dda, 0x000b, 0x3c20, 0x0000, + 0x0220, 0x000b, 0xbbe0, 0x0009, 0x0035, 0x0008, 0x0de0, 0x000b, + 0x8072, 0x0000, 0x8000, 0x0000, 0x039e, 0x0003, 0xbbe0, 0x0009, + 0x0036, 0x0008, 0x0abd, 0x000b, 0xbbe0, 0x0009, 0x0037, 0x0000, + 0x0e01, 0x000b, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x0dcd, 0x000b, + 0x8076, 0x0008, 0x0040, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, + 0x000d, 0x0000, 0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, + 0x2706, 0x0008, 0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, + 0x290a, 0x0000, 0x8066, 0x0000, 0x0422, 0x0000, 0x45f8, 0x000b, + 0x0228, 0x000c, 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, + 0xf000, 0x0008, 0x8072, 0x0000, 0xb000, 0x0000, 0x01b4, 0x0003, + 0xbbe0, 0x0009, 0x0038, 0x0000, 0x0e13, 0x000b, 0x18fe, 0x0000, + 0x3ce0, 0x0009, 0x0a10, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, + 0x0dc9, 0x0003, 0x0223, 0x0004, 0x8076, 0x0008, 0x0040, 0x0000, + 0x8072, 0x0000, 0x8000, 0x0000, 0x0280, 0x000b, 0x8076, 0x0008, + 0x0042, 0x0008, 0x0220, 0x000b, 0xbbe0, 0x0009, 0x0016, 0x0000, + 0x0e20, 0x000b, 0x8074, 0x0000, 0x0808, 0x0008, 0x3a44, 0x0002, + 0x0c0c, 0x000b, 0x8074, 0x0000, 0x0800, 0x0000, 0x8072, 0x0000, + 0x8000, 0x0000, 0x8000, 0x000f, 0x000a, 0x000b, 0x8072, 0x0000, + 0x8000, 0x0000, 0x000a, 0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, + 0xbc80, 0x0001, 0x0007, 0x0000, 0x022c, 0x000b, 0x1930, 0x000a, + 0x7f00, 0x0000, 0x9880, 0x0001, 0x0007, 0x0000, 0x8060, 0x0000, + 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, 0x000a, 0x0008, + 0x4631, 0x000b, 0x4000, 0x000f, 0x2236, 0x000b, 0x0870, 0x0008, + 0x4000, 0x000f, 0x7e33, 0x000b, 0xbbe0, 0x0009, 0x0030, 0x0008, + 0x0e33, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x0a44, 0x000b, + 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0a44, 0x000b, 0x0223, 0x0004, + 0x8076, 0x0008, 0x0040, 0x0000, 0x0246, 0x000b, 0x8076, 0x0008, + 0x0041, 0x0008, 0x8072, 0x0000, 0x8000, 0x0000, 0x0233, 0x0003, + 0xbac0, 0x0009, 0x0090, 0x0008, 0x0a4f, 0x0003, 0x8074, 0x0000, + 0x0706, 0x0000, 0x0251, 0x000b, 0x8074, 0x0000, 0x0703, 0x0000, + 0x4000, 0x000f, 0x8010, 0x0008, 0x0023, 0x0000, 0x028e, 0x0003, + 0x8010, 0x0008, 0x0008, 0x0000, 0x028e, 0x0003, 0x8010, 0x0008, + 0x0022, 0x0008, 0x028e, 0x0003, 0x0228, 0x000c, 0x8010, 0x0008, + 0x0007, 0x0000, 0x0233, 0x000c, 0x1810, 0x0000, 0x0233, 0x000c, + 0x029a, 0x0003, 0x0228, 0x000c, 0x8010, 0x0008, 0x001b, 0x0008, + 0x0233, 0x000c, 0x1810, 0x0000, 0x0233, 0x000c, 0x8074, 0x0000, + 0xf080, 0x0000, 0x8072, 0x0000, 0x3000, 0x0008, 0x0d30, 0x0000, + 0x000a, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008, 0x028e, 0x0003, + 0x8010, 0x0008, 0x0005, 0x0008, 0x028e, 0x0003, 0x1648, 0x000a, + 0x0c6f, 0x000b, 0x808c, 0x0008, 0x0001, 0x0000, 0x8010, 0x0008, + 0x0004, 0x0000, 0x4143, 0x000a, 0x086f, 0x0003, 0x3a44, 0x0002, + 0x0c0a, 0x000b, 0x0d2a, 0x0008, 0x028e, 0x0003, 0x8010, 0x0008, + 0x0003, 0x0008, 0x0292, 0x000b, 0x8010, 0x0008, 0x000b, 0x0000, + 0x0292, 0x000b, 0x8010, 0x0008, 0x0002, 0x0000, 0x0292, 0x000b, + 0x3a47, 0x0002, 0x0d58, 0x000b, 0x8010, 0x0008, 0x0006, 0x0008, + 0x0292, 0x000b, 0x8074, 0x0000, 0xf000, 0x0008, 0x8072, 0x0000, + 0x3000, 0x0008, 0x0233, 0x000c, 0x0249, 0x0004, 0x3a40, 0x000a, + 0x080a, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008, 0x0233, 0x000c, + 0x000a, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, + 0x3000, 0x0008, 0x0d30, 0x0000, 0x2e4d, 0x0002, 0x2e4d, 0x0002, + 0x0aa5, 0x000b, 0x8054, 0x0008, 0x0019, 0x0000, 0x000a, 0x000b, + 0x8054, 0x0008, 0x0009, 0x0008, 0x000a, 0x000b, 0x3a44, 0x0002, + 0x0c0a, 0x000b, 0x0283, 0x000b, 0x808c, 0x0008, 0x0000, 0x0008, + 0x4447, 0x0002, 0x0ad1, 0x000b, 0xc0c0, 0x0001, 0x00ff, 0x0008, + 0xffe0, 0x0009, 0x00ff, 0x0008, 0x0ea8, 0x000b, 0xc1e0, 0x0001, + 0xffff, 0x0008, 0x0ea8, 0x000b, 0x8010, 0x0008, 0x0013, 0x0000, + 0x0233, 0x000c, 0x8074, 0x0000, 0x0202, 0x0008, 0x000a, 0x000b, + 0x3a40, 0x000a, 0x0ece, 0x000b, 0x8074, 0x0000, 0x0200, 0x0000, + 0x3d00, 0x0000, 0x3cfe, 0x0000, 0x8072, 0x0000, 0x8000, 0x0000, + 0x43e0, 0x0001, 0x0ecc, 0x0003, 0x42fe, 0x0000, 0xffc0, 0x0001, + 0x00ff, 0x0008, 0x00e0, 0x0009, 0x0aa8, 0x0003, 0x0d08, 0x0008, + 0x0321, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, 0x000a, 0x000b, + 0x03a7, 0x000c, 0x808c, 0x0008, 0x0001, 0x0000, 0x04fe, 0x0008, + 0x338a, 0x0003, 0x0460, 0x0000, 0x8062, 0x0008, 0x0001, 0x0000, + 0x8066, 0x0000, 0x0009, 0x0008, 0x46db, 0x0003, 0x0004, 0x0000, + 0x80c0, 0x0009, 0x00ff, 0x0008, 0x7f00, 0x0000, 0x80e0, 0x0001, + 0x0004, 0x0000, 0x0af5, 0x000b, 0x80e0, 0x0001, 0x0005, 0x0008, + 0x0af5, 0x000b, 0x80e0, 0x0001, 0x0006, 0x0008, 0x0af5, 0x000b, + 0x82c0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008, 0x82e0, 0x0009, + 0x0600, 0x0008, 0x0af5, 0x000b, 0x82e0, 0x0009, 0x0500, 0x0008, + 0x0af5, 0x000b, 0x82e0, 0x0009, 0x0400, 0x0000, 0x0f8a, 0x0003, + 0xc4c0, 0x0009, 0x7000, 0x0000, 0xffe0, 0x0009, 0x1000, 0x0000, + 0x0b21, 0x0003, 0x0398, 0x000c, 0x3941, 0x0002, 0x0b00, 0x0003, + 0x8072, 0x0000, 0x0400, 0x0000, 0x000a, 0x000b, 0x0460, 0x0000, + 0x80fe, 0x0008, 0x002b, 0x0008, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x2209, 0x0008, 0x4706, 0x000b, 0x11fe, 0x0000, 0x331c, 0x0003, + 0x9180, 0x0001, 0x0002, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008, 0x4710, 0x0003, + 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00, 0x0008, 0x03e0, 0x0009, + 0x0f19, 0x0003, 0x8072, 0x0000, 0x0400, 0x0000, 0x0046, 0x0003, + 0x9180, 0x0001, 0x0003, 0x0008, 0x0303, 0x000b, 0x8072, 0x0000, + 0x0400, 0x0000, 0x8010, 0x0008, 0x0010, 0x0000, 0x037b, 0x000b, + 0x0398, 0x000c, 0x3941, 0x0002, 0x0b27, 0x0003, 0x8072, 0x0000, + 0x0400, 0x0000, 0x000a, 0x000b, 0x1042, 0x000a, 0x0b2c, 0x000b, + 0x0360, 0x0004, 0x11fe, 0x0000, 0x3731, 0x000b, 0x8072, 0x0000, + 0x0400, 0x0000, 0x8010, 0x0008, 0x000e, 0x0000, 0x037b, 0x000b, + 0x8060, 0x0000, 0x0400, 0x0000, 0x04fe, 0x0008, 0x3746, 0x000b, + 0x808c, 0x0008, 0x0000, 0x0008, 0x9180, 0x0001, 0x0005, 0x0008, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x473c, 0x000b, + 0x0060, 0x0008, 0x8062, 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, + 0x4206, 0x0008, 0x8066, 0x0000, 0x0412, 0x0000, 0x4744, 0x000b, + 0x035d, 0x0003, 0x808c, 0x0008, 0x0001, 0x0000, 0x0460, 0x0000, + 0x8062, 0x0008, 0x002b, 0x0008, 0x8066, 0x0000, 0x0609, 0x0008, + 0x474d, 0x000b, 0x8066, 0x0000, 0x220a, 0x0008, 0x4750, 0x000b, + 0x42fe, 0x0000, 0xffc0, 0x0001, 0xff00, 0x0008, 0x7f04, 0x0008, + 0x8060, 0x0000, 0x0400, 0x0000, 0x9180, 0x0001, 0x0002, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x041a, 0x0008, 0x475c, 0x000b, + 0x8072, 0x0000, 0x0400, 0x0000, 0x0046, 0x0003, 0x8060, 0x0000, + 0x0400, 0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x0411, 0x0000, + 0x4765, 0x000b, 0x02fe, 0x0008, 0x03e0, 0x0009, 0x0f6b, 0x0003, + 0x0d22, 0x0000, 0x4000, 0x000f, 0x8280, 0x0009, 0x0002, 0x0000, + 0x1380, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x2209, 0x0008, + 0x4771, 0x000b, 0x0200, 0x000a, 0xffc0, 0x0001, 0x0007, 0x0000, + 0x7f06, 0x0000, 0x1362, 0x0008, 0x8066, 0x0000, 0x060a, 0x0008, + 0x4779, 0x0003, 0x4000, 0x000f, 0x3a44, 0x0002, 0x0c0a, 0x000b, + 0x2f44, 0x000a, 0x2f44, 0x000a, 0x0e83, 0x000b, 0x808a, 0x0008, + 0x0003, 0x0008, 0x8074, 0x0000, 0xf080, 0x0000, 0x8072, 0x0000, + 0x3000, 0x0008, 0x5b86, 0x000b, 0x8054, 0x0008, 0x0019, 0x0000, + 0x000a, 0x000b, 0x3a44, 0x0002, 0x0c0a, 0x000b, 0x808c, 0x0008, + 0x0000, 0x0008, 0x8010, 0x0008, 0x0011, 0x0008, 0x0233, 0x000c, + 0x42fe, 0x0000, 0xffc0, 0x0001, 0x00ff, 0x0008, 0x7f10, 0x0008, + 0x0233, 0x000c, 0x4310, 0x0008, 0x0292, 0x000b, 0x3941, 0x0002, + 0x0b9b, 0x000b, 0x4000, 0x000f, 0x8072, 0x0000, 0x0404, 0x0008, + 0x4000, 0x000f, 0x8010, 0x0008, 0x0012, 0x0008, 0x0233, 0x000c, + 0x0360, 0x0004, 0x1110, 0x0000, 0x0233, 0x000c, 0x11fe, 0x0000, + 0x37a1, 0x000b, 0x000a, 0x000b, 0xc2c0, 0x0009, 0x00ff, 0x0008, + 0x7f00, 0x0000, 0xc3c0, 0x0001, 0xff00, 0x0008, 0x00d0, 0x0009, + 0x0bcc, 0x0003, 0x0d0a, 0x0000, 0x8580, 0x0001, 0x1000, 0x0000, + 0x7f62, 0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066, 0x0000, + 0x0809, 0x0000, 0x47b6, 0x0003, 0x04fe, 0x0008, 0x33c5, 0x000b, + 0x0460, 0x0000, 0x8062, 0x0008, 0x0004, 0x0000, 0x8066, 0x0000, + 0x0211, 0x0000, 0x47be, 0x000b, 0x01fe, 0x0008, 0x00e0, 0x0009, + 0x0fc5, 0x000b, 0x02fe, 0x0008, 0x43e0, 0x0001, 0x0bcb, 0x000b, + 0x0500, 0x0002, 0x7f0a, 0x0000, 0xffe0, 0x0009, 0x0800, 0x0000, + 0x0faf, 0x000b, 0x0d08, 0x0008, 0x4000, 0x000f, 0x43fe, 0x0008, + 0x3e80, 0x0001, 0xffc0, 0x0001, 0x7fff, 0x0000, 0x0d60, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0809, 0x0000, 0x47d4, 0x000b, + 0x8060, 0x0000, 0x0400, 0x0000, 0x84c0, 0x0001, 0xff00, 0x0008, + 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, + 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, 0x7f60, 0x000a, + 0xff80, 0x0009, 0x1000, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x0809, 0x0000, 0x47e6, 0x0003, 0x4000, 0x000f, 0x8d5b, 0xeac4, + 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, + 0x12b0 }; +#ifdef UNIQUE_FW_NAME +unsigned short fw2300ipx_length01 = 0xf091; +#else +unsigned short risc_code_length01 = 0xf091; +#endif + diff --git a/drivers/scsi/qla2xxx/ql2322.c b/drivers/scsi/qla2xxx/ql2322.c new file mode 100644 index 000000000..3c8cafc12 --- /dev/null +++ b/drivers/scsi/qla2xxx/ql2322.c @@ -0,0 +1,119 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include +#include +#include + +#include "qla_def.h" + +static char qla_driver_name[] = "qla2322"; + +extern unsigned char fw2322ipx_version[]; +extern unsigned char fw2322ipx_version_str[]; +extern unsigned short fw2322ipx_addr01; +extern unsigned short fw2322ipx_code01[]; +extern unsigned short fw2322ipx_length01; +extern unsigned long rseqipx_code_addr01; +extern unsigned short rseqipx_code01[]; +extern unsigned short rseqipx_code_length01; +extern unsigned long xseqipx_code_addr01; +extern unsigned short xseqipx_code01[]; +extern unsigned short xseqipx_code_length01; + +static struct qla_fw_info qla_fw_tbl[] = { + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2322ipx_code01[0], + .fwlen = &fw2322ipx_length01, + .fwstart = &fw2322ipx_addr01, + }, + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = &rseqipx_code01[0], + .fwlen = &rseqipx_code_length01, + .lfwstart = &rseqipx_code_addr01, + }, + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = &xseqipx_code01[0], + .fwlen = &xseqipx_code_length01, + .lfwstart = &xseqipx_code_addr01, + }, + { FW_INFO_ADDR_NOMORE, }, +}; + +static struct qla_board_info qla_board_tbl[] = { + { + .drv_name = qla_driver_name, + .isp_name = "ISP2322", + .fw_info = qla_fw_tbl, + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP6322", + .fw_info = qla_fw_tbl, + }, +}; + +static struct pci_device_id qla2322_pci_tbl[] = { + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2322, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[0], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP6322, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[1], + }, + {0, 0}, +}; +MODULE_DEVICE_TABLE(pci, qla2322_pci_tbl); + +static int __devinit +qla2322_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, + (struct qla_board_info *)id->driver_data); +} + +static void __devexit +qla2322_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + +static struct pci_driver qla2322_pci_driver = { + .name = "qla2322", + .id_table = qla2322_pci_tbl, + .probe = qla2322_probe_one, + .remove = __devexit_p(qla2322_remove_one), +}; + +static int __init +qla2322_init(void) +{ + return pci_module_init(&qla2322_pci_driver); +} + +static void __exit +qla2322_exit(void) +{ + pci_unregister_driver(&qla2322_pci_driver); +} + +module_init(qla2322_init); +module_exit(qla2322_exit); + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic ISP2322 FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff --git a/drivers/scsi/qla2xxx/ql2322_fw.c b/drivers/scsi/qla2xxx/ql2322_fw.c index 3033c0a6d..53599a8e2 100644 --- a/drivers/scsi/qla2xxx/ql2322_fw.c +++ b/drivers/scsi/qla2xxx/ql2322_fw.c @@ -1,11100 +1,8376 @@ /* - * Firmware version 3.03.20 IPX from - * - * ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2322_fw.bin - * - * xxd -g 1 -i ql2322_fw.bin | indent -l80 -i8 -o ql2322_fw.c + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation * + * See LICENSE.qla2xxx for copyright and licensing details. + */ + +/* + * Firmware Version 3.03.20 (15:42 Feb 01, 2006) */ -#include +#ifdef UNIQUE_FW_NAME +unsigned short fw2322ipx_version = 3*1024+3; +#else +unsigned short risc_code_version = 3*1024+3; +#endif -static u8 ql2322_fw_bin[] = { - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x19, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x03, 0x00, 0x14, 0x01, 0x37, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, - 0x49, 0x47, 0x48, 0x54, 0x20, 0x32, 0x30, 0x30, 0x31, 0x20, 0x51, 0x4c, - 0x4f, 0x47, 0x49, 0x43, 0x20, 0x43, 0x4f, 0x52, 0x50, 0x4f, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x49, 0x53, 0x50, 0x32, 0x33, 0x30, 0x30, - 0x20, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x30, 0x33, 0x2e, 0x30, 0x33, - 0x2e, 0x32, 0x30, 0x20, 0x20, 0x20, 0x20, 0x20, 0x24, 0x00, 0x20, 0xa9, - 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x22, 0x00, - 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, - 0x24, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, - 0x20, 0x91, 0x26, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, - 0x40, 0x0f, 0x20, 0x91, 0x28, 0x00, 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, - 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2a, 0x00, 0x20, 0xa9, 0x00, 0x0f, - 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2c, 0x00, 0x20, 0xa9, - 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, 0x2e, 0x00, - 0x20, 0xa9, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x00, 0x40, 0x0f, 0x20, 0x91, - 0x20, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0xc1, 0x00, 0x04, 0x20, 0xc9, - 0x1c, 0xff, 0x20, 0x59, 0x00, 0x00, 0x2b, 0x78, 0x78, 0x83, 0x00, 0x04, - 0x20, 0x89, 0x2b, 0xc2, 0x20, 0x51, 0x18, 0x00, 0x2a, 0x70, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0xe9, 0x00, 0x01, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, - 0x0e, 0x74, 0x00, 0xf6, 0x78, 0x88, 0x90, 0x05, 0x11, 0xf8, 0x20, 0x61, - 0xc0, 0x00, 0x08, 0x0c, 0x20, 0xc6, 0x11, 0x70, 0x20, 0x79, 0x03, 0x00, - 0x08, 0x0c, 0x20, 0xdc, 0x20, 0x61, 0xe0, 0x00, 0x08, 0x0c, 0x20, 0xc6, - 0x11, 0x28, 0x20, 0x79, 0x03, 0x80, 0x08, 0x0c, 0x20, 0xdc, 0x00, 0x60, - 0x00, 0xfe, 0x78, 0x83, 0x40, 0x10, 0x78, 0x37, 0x40, 0x10, 0x78, 0x33, - 0x00, 0x11, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x0c, 0xf8, - 0x00, 0xfe, 0x20, 0x29, 0x56, 0x00, 0x20, 0x31, 0xff, 0xff, 0x20, 0x39, - 0x55, 0xdc, 0x20, 0x21, 0x02, 0x00, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, - 0x00, 0x00, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x0e, 0x41, 0x04, 0x20, 0xe9, - 0x00, 0x01, 0x20, 0xa1, 0x10, 0x00, 0x90, 0x0e, 0x20, 0x01, 0x0d, 0xc1, - 0x90, 0x84, 0x0f, 0xff, 0x20, 0xa8, 0x41, 0x04, 0x20, 0x01, 0x00, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x01, 0x20, 0x21, 0xa8, 0x41, 0x04, 0x80, 0x01, - 0x1d, 0xe0, 0x75, 0x6e, 0x76, 0x72, 0x77, 0x6a, 0x74, 0x76, 0x74, 0x7a, - 0x00, 0xe6, 0x20, 0x71, 0x1b, 0x73, 0x24, 0x72, 0x00, 0xee, 0x20, 0xa1, - 0x1d, 0xdc, 0x71, 0x70, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, - 0x91, 0x8c, 0x00, 0x0f, 0x20, 0x01, 0x00, 0x01, 0x91, 0x12, 0x90, 0x0e, - 0x21, 0xa8, 0x41, 0x04, 0x82, 0x11, 0x1d, 0xe0, 0x71, 0x70, 0x34, 0x00, - 0x80, 0x01, 0x91, 0x02, 0x01, 0x20, 0x02, 0x18, 0x20, 0xa8, 0x90, 0x0e, - 0x41, 0x04, 0x20, 0x09, 0x18, 0x00, 0x81, 0x0d, 0x81, 0x0d, 0x81, 0x0d, - 0x81, 0x0d, 0x81, 0x0d, 0x91, 0x8c, 0x00, 0x1f, 0x20, 0x01, 0x00, 0x01, - 0x91, 0x12, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x08, 0x00, 0x90, 0x0e, - 0x20, 0xa9, 0x08, 0x00, 0x41, 0x04, 0x82, 0x11, 0x1d, 0xd8, 0x08, 0x0c, - 0x0f, 0x71, 0x08, 0x0c, 0x61, 0xab, 0x08, 0x0c, 0xb1, 0x02, 0x08, 0x0c, - 0x11, 0x28, 0x08, 0x0c, 0x13, 0x52, 0x08, 0x0c, 0x1c, 0x1c, 0x08, 0x0c, - 0x95, 0x82, 0x08, 0x0c, 0x0d, 0x17, 0x08, 0x0c, 0x10, 0xad, 0x08, 0x0c, - 0x35, 0x8e, 0x08, 0x0c, 0x7a, 0xca, 0x08, 0x0c, 0x6c, 0xea, 0x08, 0x0c, - 0x8c, 0x5d, 0x08, 0x0c, 0x88, 0xbe, 0x08, 0x0c, 0x22, 0xbf, 0x08, 0x0c, - 0x81, 0xf5, 0x08, 0x0c, 0x20, 0xf5, 0x08, 0x0c, 0x22, 0x33, 0x08, 0x0c, - 0x22, 0xb4, 0x20, 0x91, 0x30, 0x09, 0x78, 0x83, 0x00, 0x00, 0x10, 0x04, - 0x09, 0x43, 0x78, 0x80, 0x90, 0x86, 0x00, 0x02, 0x11, 0x90, 0x78, 0x83, - 0x40, 0x00, 0x78, 0x37, 0x40, 0x00, 0x78, 0x33, 0x00, 0x10, 0x0e, 0x04, - 0x09, 0x37, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x70, 0x03, 0x00, 0x00, 0x78, 0x0c, 0x90, 0x84, 0x00, 0x30, - 0x90, 0x86, 0x00, 0x20, 0x11, 0x68, 0x70, 0x34, 0xc0, 0x8d, 0x70, 0x36, - 0x20, 0x01, 0x00, 0x50, 0x70, 0x76, 0x70, 0x7a, 0x70, 0x56, 0x60, 0x6b, - 0x26, 0x9c, 0x20, 0x71, 0x1b, 0x73, 0x20, 0x72, 0x20, 0x71, 0x18, 0x00, - 0x70, 0x00, 0x90, 0x8e, 0x00, 0x03, 0x11, 0x68, 0x08, 0x0c, 0x4d, 0x66, - 0x08, 0x0c, 0x35, 0xb5, 0x08, 0x0c, 0x7b, 0x32, 0x08, 0x0c, 0x72, 0x75, - 0x08, 0x0c, 0x8d, 0x44, 0x08, 0x0c, 0x88, 0xe7, 0x0c, 0x68, 0x00, 0x0b, - 0x0c, 0x88, 0x09, 0x79, 0x09, 0x7a, 0x0b, 0x15, 0x09, 0x77, 0x0b, 0xcf, - 0x0d, 0x16, 0x0d, 0x16, 0x0d, 0x16, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x05, - 0x01, 0x26, 0x00, 0xf6, 0x20, 0x91, 0x80, 0x00, 0x70, 0x00, 0x90, 0x86, - 0x00, 0x01, 0x19, 0x04, 0x0a, 0xe8, 0x08, 0x0c, 0x0e, 0xc4, 0x08, 0x0c, - 0x77, 0x9e, 0x01, 0x50, 0x08, 0x0c, 0x77, 0xc1, 0x15, 0xb0, 0x20, 0x79, - 0x01, 0x00, 0x78, 0x28, 0x90, 0x85, 0x18, 0x00, 0x78, 0x2a, 0x04, 0x78, - 0x08, 0x0c, 0x76, 0xcd, 0x70, 0x00, 0x90, 0x86, 0x00, 0x01, 0x19, 0x04, - 0x0a, 0xe8, 0x70, 0x98, 0x90, 0x86, 0x00, 0x29, 0x19, 0x04, 0x0a, 0xe8, - 0x08, 0x0c, 0x88, 0xa7, 0x08, 0x0c, 0x88, 0x99, 0x20, 0x01, 0x01, 0x61, - 0x20, 0x03, 0x00, 0x01, 0x20, 0x79, 0x01, 0x00, 0x20, 0x11, 0xff, 0xff, - 0x08, 0x0c, 0x2a, 0xd3, 0x7a, 0x28, 0x92, 0x95, 0x5e, 0x2c, 0x7a, 0x2a, - 0x20, 0x11, 0x76, 0x12, 0x08, 0x0c, 0x89, 0x93, 0x20, 0x11, 0x76, 0x05, - 0x08, 0x0c, 0x8a, 0x9f, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x20, 0x11, 0x80, 0x30, 0x90, 0x1e, 0x73, 0x96, 0x04, 0xd0, 0x08, 0x0c, - 0x58, 0xaa, 0x20, 0x79, 0x01, 0x00, 0x78, 0x44, 0x90, 0x05, 0x19, 0x04, - 0x0a, 0xe8, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, 0x20, 0x11, - 0x76, 0x12, 0x08, 0x0c, 0x89, 0x93, 0x20, 0x11, 0x76, 0x05, 0x08, 0x0c, - 0x8a, 0x9f, 0x20, 0x01, 0x02, 0x65, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, - 0x00, 0x00, 0x78, 0x40, 0x90, 0x84, 0xff, 0xfb, 0x78, 0x42, 0x20, 0x01, - 0x19, 0xa7, 0x20, 0x04, 0x90, 0x05, 0x11, 0x40, 0x00, 0xc6, 0x20, 0x61, - 0x01, 0x00, 0x08, 0x0c, 0x61, 0x53, 0x00, 0xce, 0x08, 0x04, 0x0a, 0xe8, - 0x78, 0x0f, 0x00, 0x6b, 0x7a, 0x28, 0x08, 0x0c, 0x77, 0xa6, 0x01, 0x18, - 0x92, 0x95, 0x5e, 0x2c, 0x00, 0x10, 0x92, 0x95, 0x40, 0x2c, 0x7a, 0x2a, - 0x20, 0x11, 0x80, 0x10, 0x73, 0xd8, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x29, 0x9b, 0x08, 0x0c, 0x4c, 0xa1, 0x72, 0x48, - 0xc2, 0x84, 0x72, 0x4a, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xac, - 0xc1, 0xcc, 0x21, 0x02, 0x20, 0x01, 0x03, 0x90, 0x20, 0x03, 0x04, 0x00, - 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xa4, 0xf1, 0x20, 0x11, 0x00, 0x04, - 0x08, 0x0c, 0xcf, 0x2b, 0x08, 0x0c, 0xad, 0x18, 0x08, 0x0c, 0x6a, 0xb1, - 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x20, 0x08, 0x0c, 0x29, 0xfc, 0x06, 0x00, - 0x04, 0x20, 0x08, 0x0c, 0x61, 0x5a, 0x01, 0x40, 0x70, 0x97, 0x00, 0x01, - 0x70, 0xd3, 0x00, 0x00, 0x08, 0x0c, 0x5a, 0x7c, 0x08, 0x04, 0x0a, 0xe8, - 0x20, 0x01, 0x03, 0x90, 0x20, 0x03, 0x04, 0x04, 0x08, 0x0c, 0x58, 0x40, - 0xd0, 0x94, 0x01, 0x88, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x04, 0xc0, 0xcd, - 0x20, 0x12, 0x08, 0x0c, 0x58, 0x44, 0xd0, 0xd4, 0x11, 0x18, 0x08, 0x0c, - 0x29, 0xfc, 0x12, 0x70, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x04, 0xc0, 0xbc, - 0x00, 0xa8, 0x08, 0x0c, 0x58, 0x44, 0xd0, 0xd4, 0x1d, 0xb8, 0x20, 0x11, - 0x18, 0x0c, 0x22, 0x04, 0xc0, 0xbd, 0x00, 0x60, 0x20, 0x11, 0x18, 0x0c, - 0x22, 0x04, 0xc0, 0xbd, 0x20, 0x12, 0x08, 0x0c, 0x6c, 0x09, 0x11, 0x28, - 0xd0, 0xa4, 0x01, 0x18, 0x22, 0x04, 0xc0, 0xfd, 0x20, 0x12, 0x08, 0x0c, - 0x6b, 0xcf, 0x01, 0x20, 0x7a, 0x0c, 0xc2, 0xb4, 0x7a, 0x0e, 0x00, 0xa8, - 0x70, 0x7f, 0x00, 0x00, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x30, 0x70, 0xb0, - 0x90, 0x05, 0x11, 0x68, 0x08, 0x0c, 0xd3, 0x89, 0x00, 0x50, 0x08, 0x0c, - 0xd3, 0x89, 0x70, 0xdc, 0xd0, 0x9c, 0x11, 0x28, 0x70, 0xb0, 0x90, 0x05, - 0x01, 0x10, 0x08, 0x0c, 0x61, 0x30, 0x70, 0xe7, 0x00, 0x00, 0x70, 0xe3, - 0x00, 0x00, 0x70, 0xa7, 0x00, 0x00, 0x08, 0x0c, 0x2a, 0x04, 0x02, 0x28, - 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc4, 0x20, 0x12, 0x72, 0xdc, - 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x78, 0x90, 0x16, 0x00, 0x16, 0x08, 0x0c, - 0x27, 0xa4, 0x20, 0x19, 0x19, 0x6d, 0x21, 0x1a, 0x00, 0x1e, 0x70, 0x5f, - 0xff, 0xff, 0x70, 0x63, 0x00, 0xef, 0x70, 0x83, 0x00, 0x00, 0x00, 0x20, - 0x20, 0x19, 0x19, 0x6d, 0x20, 0x1b, 0x00, 0x00, 0x20, 0x79, 0x18, 0x47, - 0x78, 0x04, 0xd0, 0xac, 0x01, 0x08, 0xc2, 0x95, 0x72, 0xde, 0x08, 0x0c, - 0x77, 0x9e, 0x01, 0x18, 0x92, 0x96, 0x00, 0x04, 0x05, 0x18, 0x20, 0x11, - 0x00, 0x01, 0x08, 0x0c, 0xcf, 0x2b, 0x70, 0xab, 0x00, 0x00, 0x70, 0xaf, - 0xff, 0xff, 0x70, 0x03, 0x00, 0x02, 0x00, 0xfe, 0x08, 0x0c, 0x30, 0xbf, - 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0xa6, 0x2b, - 0x08, 0x0c, 0xad, 0x18, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x48, 0x00, 0xc6, - 0x20, 0x61, 0x01, 0x00, 0x00, 0x16, 0x08, 0x0c, 0x27, 0xa4, 0x61, 0xe2, - 0x00, 0x1e, 0x00, 0xce, 0x01, 0x2e, 0x00, 0xe0, 0x70, 0xab, 0x00, 0x00, - 0x70, 0xaf, 0xff, 0xff, 0x70, 0x03, 0x00, 0x02, 0x08, 0x0c, 0xac, 0xfc, - 0x20, 0x11, 0x00, 0x05, 0x08, 0x0c, 0xa6, 0x2b, 0x08, 0x0c, 0xad, 0x18, - 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, - 0x00, 0x16, 0x08, 0x0c, 0x27, 0xa4, 0x61, 0xe2, 0x00, 0x1e, 0x00, 0xce, - 0x00, 0xfe, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x18, 0x20, 0xa9, 0x08, 0x00, 0x00, 0x10, 0x20, 0xa9, - 0x07, 0x82, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x10, 0x90, 0x0e, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x7e, 0x86, 0xff, 0x01, 0x38, 0x91, 0x80, 0x10, 0x00, - 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0x00, 0xd0, 0xbc, 0x09, 0x0c, - 0x34, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x0a, 0xfc, 0x70, 0x7f, 0x00, 0x00, - 0x70, 0x80, 0x90, 0x84, 0x00, 0xff, 0x70, 0x82, 0x70, 0xb3, 0x00, 0x00, - 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x00, 0x90, 0x86, 0x00, 0x02, 0x19, 0x04, 0x0b, 0xcc, - 0x70, 0xac, 0x90, 0x86, 0xff, 0xff, 0x01, 0x20, 0x08, 0x0c, 0x30, 0xbf, - 0x08, 0x04, 0x0b, 0xcc, 0x70, 0xdc, 0xd0, 0xac, 0x11, 0x10, 0xd0, 0x9c, - 0x05, 0x38, 0xd0, 0x84, 0x05, 0x28, 0x00, 0x06, 0x20, 0x01, 0x01, 0x03, - 0x20, 0x03, 0x00, 0x2b, 0x00, 0x0e, 0xd0, 0x8c, 0x01, 0xe8, 0x08, 0x0c, - 0x34, 0x87, 0x11, 0xb0, 0x70, 0xe0, 0x90, 0x86, 0xff, 0xff, 0x01, 0x90, - 0x08, 0x0c, 0x32, 0x7b, 0x70, 0xdc, 0xd0, 0x94, 0x19, 0x04, 0x0b, 0xcc, - 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x10, 0x20, 0x11, - 0x00, 0x03, 0x90, 0x1e, 0x08, 0x0c, 0x32, 0xb5, 0x08, 0x04, 0x0b, 0xcc, - 0x70, 0xe4, 0x90, 0x05, 0x19, 0x04, 0x0b, 0xcc, 0x70, 0xa8, 0x90, 0x05, - 0x19, 0x04, 0x0b, 0xcc, 0x70, 0xdc, 0xd0, 0xa4, 0x01, 0x18, 0xd0, 0xb4, - 0x09, 0x04, 0x0b, 0xcc, 0x08, 0x0c, 0x6b, 0xcf, 0x19, 0x04, 0x0b, 0xcc, - 0x08, 0x0c, 0x6c, 0x22, 0x19, 0x04, 0x0b, 0xcc, 0x08, 0x0c, 0x6c, 0x09, - 0x01, 0xc0, 0x01, 0x56, 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, - 0x00, 0x16, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x18, 0xb8, 0x00, 0xd0, 0xec, - 0x11, 0x38, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x0b, 0x6c, 0x00, 0xce, - 0x01, 0x5e, 0x00, 0x28, 0x00, 0x1e, 0x00, 0xce, 0x01, 0x5e, 0x08, 0x04, - 0x0b, 0xcc, 0x00, 0x06, 0x20, 0x01, 0x01, 0x03, 0x20, 0x03, 0x00, 0x2b, - 0x00, 0x0e, 0x20, 0x11, 0x19, 0xb4, 0x08, 0x0c, 0x0f, 0xe1, 0x20, 0x11, - 0x19, 0xce, 0x08, 0x0c, 0x0f, 0xe1, 0x70, 0x30, 0xc0, 0x8c, 0x70, 0x32, - 0x70, 0x03, 0x00, 0x03, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x0c, 0x0e, 0x98, - 0x90, 0x06, 0x08, 0x0c, 0x26, 0x31, 0x08, 0x0c, 0x34, 0x87, 0x01, 0x18, - 0x08, 0x0c, 0x4e, 0x3e, 0x00, 0x50, 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, - 0xff, 0xff, 0x20, 0x21, 0x00, 0x06, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, 0x77, 0xc1, - 0x01, 0x50, 0x08, 0x0c, 0x77, 0x9e, 0x78, 0x28, 0x01, 0x18, 0x90, 0x84, - 0xe1, 0xff, 0x00, 0x10, 0x90, 0x84, 0xff, 0xdf, 0x78, 0x2a, 0x00, 0xfe, - 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x01, 0x19, 0xe9, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x05, 0x11, 0x20, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0xa6, 0x2b, - 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0xa6, 0x35, 0x08, 0x0c, 0xad, 0x18, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x46, - 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x01, 0x00, - 0x79, 0x04, 0x91, 0x8c, 0xff, 0xfd, 0x79, 0x06, 0x20, 0x09, 0x00, 0xf7, - 0x08, 0x0c, 0x61, 0x19, 0x79, 0x40, 0x91, 0x8c, 0x00, 0x10, 0x79, 0x42, - 0x79, 0x24, 0xd1, 0xb4, 0x01, 0x20, 0x20, 0x11, 0x00, 0x40, 0x08, 0x0c, - 0x2a, 0xd3, 0xd1, 0x9c, 0x01, 0x20, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, - 0x2a, 0xd3, 0x00, 0x06, 0x00, 0x36, 0x01, 0x56, 0x00, 0x00, 0x20, 0x01, - 0x19, 0xa8, 0x20, 0x04, 0x90, 0x05, 0x15, 0x18, 0x08, 0x0c, 0x2a, 0x67, - 0x11, 0x48, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x29, 0xca, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x29, 0xad, 0x00, 0xb8, 0x08, 0x0c, 0x2a, 0x6f, - 0x11, 0x38, 0x90, 0x06, 0x08, 0x0c, 0x29, 0xca, 0x90, 0x06, 0x08, 0x0c, - 0x29, 0xad, 0x00, 0x68, 0x08, 0x0c, 0x2a, 0x77, 0x1d, 0x50, 0x20, 0x01, - 0x19, 0x98, 0x20, 0x04, 0xd0, 0xfc, 0x01, 0x08, 0x00, 0x20, 0x08, 0x0c, - 0x27, 0xd8, 0x08, 0x04, 0x0c, 0xc9, 0x20, 0xa9, 0x00, 0x3a, 0x1d, 0x04, - 0x0c, 0x1f, 0x08, 0x0c, 0x8a, 0x7f, 0x1f, 0x04, 0x0c, 0x1f, 0x08, 0x0c, - 0x77, 0xaf, 0x01, 0x48, 0x08, 0x0c, 0x77, 0xc1, 0x11, 0x18, 0x08, 0x0c, - 0x7a, 0xc5, 0x00, 0x50, 0x08, 0x0c, 0x77, 0xa6, 0x0d, 0xd0, 0x08, 0x0c, - 0x7a, 0xc0, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x20, - 0x20, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x61, 0x19, 0x78, 0x50, 0xc0, 0xe5, - 0x78, 0x52, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x20, 0x78, 0x43, 0x00, 0x90, - 0x78, 0x43, 0x00, 0x10, 0x20, 0x21, 0xe6, 0x78, 0x20, 0x19, 0xea, 0x60, - 0x0d, 0x0c, 0x8a, 0x7f, 0x78, 0x20, 0xd0, 0x9c, 0x15, 0xa0, 0x08, 0x0c, - 0x77, 0x9e, 0x09, 0x04, 0x0c, 0xab, 0x78, 0x24, 0xd0, 0xac, 0x19, 0x04, - 0x0c, 0xce, 0x08, 0x0c, 0x77, 0xc1, 0x15, 0x48, 0x00, 0x46, 0x20, 0x21, - 0x03, 0x20, 0x84, 0x21, 0x1d, 0xf0, 0x00, 0x4e, 0x20, 0x11, 0x18, 0x00, - 0x08, 0x0c, 0x2a, 0xd3, 0x08, 0x0c, 0x2a, 0x7f, 0x78, 0x24, 0x90, 0x84, - 0x18, 0x00, 0x11, 0x68, 0x94, 0x84, 0x0f, 0xff, 0x11, 0x40, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0x90, 0x84, 0x90, 0x00, 0x01, 0x10, 0x08, 0x0c, - 0x0c, 0xf1, 0x84, 0x21, 0x11, 0x60, 0x1d, 0x04, 0x0c, 0x7b, 0x08, 0x0c, - 0x8a, 0x7f, 0x08, 0x0c, 0x7a, 0xc0, 0x08, 0x0c, 0x7a, 0xb6, 0x70, 0x03, - 0x00, 0x01, 0x08, 0x04, 0x0c, 0xce, 0x83, 0x19, 0x19, 0x28, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0x90, 0x84, 0x90, 0x00, 0x01, 0x10, 0x08, 0x0c, - 0x0c, 0xf1, 0x1d, 0x04, 0x0c, 0x91, 0x08, 0x0c, 0x8a, 0x7f, 0x20, 0x09, - 0x19, 0x9b, 0x21, 0x04, 0x90, 0x05, 0x01, 0x18, 0x80, 0x01, 0x20, 0x0a, - 0x11, 0x88, 0x20, 0x0b, 0x00, 0x0a, 0x20, 0x11, 0x00, 0x48, 0x08, 0x0c, - 0x2a, 0xd3, 0x20, 0xa9, 0x00, 0x02, 0x08, 0x0c, 0x2a, 0x60, 0x79, 0x24, - 0x08, 0x0c, 0x2a, 0x7f, 0xd1, 0x9c, 0x01, 0x10, 0x08, 0x0c, 0x29, 0x9b, - 0x00, 0xf0, 0x08, 0x0c, 0x77, 0xaf, 0x11, 0x40, 0x94, 0xa2, 0x03, 0xe8, - 0x11, 0x28, 0x08, 0x0c, 0x77, 0x72, 0x70, 0x03, 0x00, 0x01, 0x00, 0xc0, - 0x20, 0x11, 0x18, 0x00, 0x08, 0x0c, 0x2a, 0xd3, 0x08, 0x0c, 0x2a, 0x7f, - 0x78, 0x24, 0x08, 0x0c, 0x77, 0xb8, 0x01, 0x10, 0xd0, 0xac, 0x11, 0x60, - 0x90, 0x84, 0x18, 0x00, 0x09, 0x04, 0x0c, 0x83, 0x70, 0x03, 0x00, 0x01, - 0x00, 0x28, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x26, 0x31, 0x00, 0xa0, - 0x78, 0x50, 0xc0, 0xe4, 0x78, 0x52, 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, - 0xd1, 0x9c, 0x11, 0x20, 0x79, 0x04, 0x91, 0x8d, 0x00, 0x02, 0x79, 0x06, - 0x20, 0x11, 0x00, 0x48, 0x08, 0x0c, 0x2a, 0xd3, 0x78, 0x28, 0x90, 0x85, - 0x00, 0x28, 0x78, 0x2a, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x00, - 0x90, 0x06, 0x78, 0xf2, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x0e, 0x01, 0x2e, - 0x00, 0xfe, 0x00, 0x4e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x56, 0x00, 0x71, 0x0d, 0x0c, - 0x8a, 0x7f, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, 0x70, 0x04, 0x90, 0x86, - 0x00, 0x01, 0x11, 0x10, 0x08, 0x0c, 0x35, 0xb5, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x05, 0x2a, 0x70, 0x20, 0x61, 0x19, 0xac, 0x20, 0x63, 0x00, 0x03, - 0x60, 0x07, 0x00, 0x03, 0x60, 0x0b, 0x00, 0x14, 0x60, 0x0f, 0x01, 0x37, - 0x20, 0x01, 0x19, 0x7c, 0x90, 0x0e, 0x21, 0x02, 0x71, 0x96, 0x20, 0x01, - 0x01, 0x00, 0x20, 0x04, 0x90, 0x82, 0x00, 0x02, 0x02, 0x18, 0x70, 0x5f, - 0xff, 0xff, 0x00, 0x08, 0x71, 0x5e, 0x70, 0x67, 0xff, 0xff, 0x71, 0x7e, - 0x71, 0x82, 0x08, 0x0c, 0xd3, 0x89, 0x70, 0xef, 0x00, 0xc0, 0x20, 0x61, - 0x19, 0x6c, 0x60, 0x03, 0x09, 0x09, 0x61, 0x06, 0x60, 0x0b, 0x88, 0x00, - 0x60, 0x0f, 0x02, 0x00, 0x60, 0x13, 0x00, 0xff, 0x60, 0x17, 0x00, 0x1f, - 0x61, 0x1a, 0x60, 0x1f, 0x07, 0xd0, 0x20, 0x61, 0x19, 0x74, 0x60, 0x03, - 0x80, 0x00, 0x61, 0x06, 0x61, 0x0a, 0x60, 0x0f, 0x02, 0x00, 0x60, 0x13, - 0x00, 0xff, 0x61, 0x16, 0x60, 0x1b, 0x00, 0x01, 0x61, 0x1e, 0x20, 0x61, - 0x19, 0x89, 0x60, 0x03, 0x51, 0x4c, 0x60, 0x07, 0x4f, 0x47, 0x60, 0x0b, - 0x49, 0x43, 0x60, 0x0f, 0x20, 0x20, 0x20, 0x01, 0x18, 0x2c, 0x21, 0x02, - 0x00, 0x05, 0x90, 0x16, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x78, 0xb8, 0x04, - 0x90, 0xc4, 0x00, 0xff, 0x98, 0xc6, 0x00, 0x06, 0x01, 0x28, 0x90, 0xc4, - 0xff, 0x00, 0x98, 0xc6, 0x06, 0x00, 0x11, 0x20, 0x91, 0x86, 0x00, 0x80, - 0x01, 0x08, 0x82, 0x10, 0x81, 0x08, 0x91, 0x86, 0x08, 0x00, 0x1d, 0x50, - 0x22, 0x08, 0x00, 0x05, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x00, 0x00, - 0x00, 0x0e, 0x00, 0xf6, 0x00, 0x10, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, - 0x0d, 0x87, 0x00, 0x06, 0x00, 0x16, 0x20, 0x01, 0x80, 0x02, 0x00, 0x06, - 0x20, 0x79, 0x00, 0x00, 0x00, 0x0e, 0x78, 0x82, 0x78, 0x36, 0x00, 0x1e, - 0x79, 0x8e, 0x00, 0x0e, 0x78, 0x8a, 0x00, 0x0e, 0x78, 0x86, 0x39, 0x00, - 0x78, 0x9a, 0x00, 0xd6, 0x20, 0x69, 0x03, 0x00, 0x68, 0x18, 0x78, 0xae, - 0x68, 0x1c, 0x78, 0xb2, 0x68, 0x08, 0x78, 0xbe, 0x00, 0xde, 0x78, 0x33, - 0x00, 0x12, 0x20, 0x91, 0x50, 0x00, 0x01, 0x56, 0x00, 0xd6, 0x00, 0x36, - 0x00, 0x26, 0x20, 0x79, 0x03, 0x00, 0x20, 0x69, 0x1b, 0x2b, 0x7a, 0x08, - 0x22, 0x6a, 0x20, 0x69, 0x1b, 0x2c, 0x7a, 0x18, 0x22, 0x6a, 0x8d, 0x68, - 0x7a, 0x1c, 0x22, 0x6a, 0x78, 0x2c, 0x20, 0x19, 0x1b, 0x39, 0x20, 0x1a, - 0x20, 0x19, 0x1b, 0x3c, 0x90, 0x16, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x68, - 0x78, 0x20, 0x20, 0x1a, 0x82, 0x10, 0x83, 0x18, 0x93, 0x86, 0x1b, 0x55, - 0x01, 0x08, 0x0c, 0xa8, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x10, 0x20, 0x11, - 0xde, 0xad, 0x20, 0x19, 0x1b, 0x3a, 0x78, 0x2c, 0x20, 0x1a, 0x83, 0x18, - 0x22, 0x1a, 0x78, 0x03, 0x00, 0x00, 0x20, 0x69, 0x1a, 0x81, 0x90, 0x1e, - 0x20, 0xa9, 0x00, 0x20, 0x7b, 0x26, 0x7a, 0x28, 0x22, 0x6a, 0x8d, 0x68, - 0x83, 0x18, 0x1f, 0x04, 0x0d, 0xde, 0x20, 0x69, 0x1a, 0xa1, 0x20, 0x19, - 0x00, 0x50, 0x20, 0xa9, 0x00, 0x20, 0x7b, 0x26, 0x7a, 0x28, 0x22, 0x6a, - 0x8d, 0x68, 0x83, 0x18, 0x1f, 0x04, 0x0d, 0xeb, 0x04, 0x91, 0x00, 0x2e, - 0x00, 0x3e, 0x00, 0xde, 0x01, 0x5e, 0x20, 0x79, 0x18, 0x00, 0x78, 0x03, - 0x00, 0x05, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, - 0xd0, 0x84, 0x01, 0x80, 0x20, 0x01, 0x1a, 0x25, 0x20, 0x04, 0x90, 0x05, - 0x01, 0x28, 0x20, 0x01, 0x00, 0x8b, 0x20, 0x04, 0xd0, 0xfc, 0x0d, 0xd8, - 0x20, 0x01, 0x00, 0x8a, 0x20, 0x03, 0x00, 0x02, 0x20, 0x03, 0x10, 0x01, - 0x08, 0x0c, 0x58, 0x4f, 0x11, 0x70, 0x08, 0x0c, 0x0f, 0x32, 0x01, 0x10, - 0x08, 0x0c, 0x0e, 0x85, 0x08, 0x0c, 0x58, 0x4f, 0x11, 0x30, 0x20, 0x71, - 0x18, 0x00, 0x20, 0x11, 0x80, 0x00, 0x08, 0x0c, 0x0f, 0x46, 0x0c, 0x70, - 0x00, 0x05, 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, - 0x90, 0x86, 0x00, 0x01, 0x11, 0x20, 0x20, 0x01, 0x00, 0x15, 0x08, 0x0c, - 0xac, 0xed, 0x20, 0x79, 0x03, 0x80, 0x20, 0x69, 0x1b, 0x0b, 0x78, 0x18, - 0x68, 0x02, 0x78, 0x1c, 0x68, 0x06, 0x78, 0x40, 0x68, 0x0a, 0x78, 0x44, - 0x68, 0x0e, 0x78, 0x2c, 0x68, 0x12, 0x20, 0x19, 0x1b, 0x16, 0x90, 0x16, - 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x50, 0x78, 0x20, 0x20, 0x1a, 0x82, 0x10, - 0x83, 0x18, 0x82, 0x10, 0x92, 0x82, 0x00, 0x11, 0x0e, 0xa8, 0x20, 0x11, - 0xde, 0xad, 0x6a, 0x2a, 0x78, 0x30, 0x68, 0x1a, 0x78, 0x34, 0x68, 0x1e, - 0x78, 0x38, 0x68, 0x22, 0x78, 0x3c, 0x68, 0x26, 0x78, 0x03, 0x00, 0x00, - 0x20, 0x69, 0x1a, 0xcb, 0x90, 0x1e, 0x20, 0xa9, 0x00, 0x20, 0x7b, 0x26, - 0x78, 0x28, 0x20, 0x6a, 0x8d, 0x68, 0x83, 0x18, 0x1f, 0x04, 0x0e, 0x5f, - 0x20, 0x69, 0x1a, 0xeb, 0x20, 0x19, 0x00, 0xb0, 0x20, 0xa9, 0x00, 0x20, - 0x7b, 0x26, 0x78, 0x28, 0x20, 0x6a, 0x8d, 0x68, 0x83, 0x18, 0x1f, 0x04, - 0x0e, 0x6c, 0x00, 0x05, 0x91, 0x8c, 0x03, 0xff, 0x20, 0x01, 0x00, 0x03, - 0x20, 0x04, 0x90, 0x84, 0x06, 0x00, 0x11, 0x18, 0x91, 0x8d, 0x6c, 0x00, - 0x00, 0x10, 0x91, 0x8d, 0x64, 0x00, 0x20, 0x01, 0x01, 0x7f, 0x21, 0x02, - 0x00, 0x05, 0x00, 0x26, 0x01, 0x26, 0x20, 0x11, 0x00, 0x80, 0x08, 0x0c, - 0x0f, 0x24, 0x20, 0xa9, 0x09, 0x00, 0x08, 0x0c, 0x0f, 0x5a, 0x20, 0x11, - 0x00, 0x40, 0x08, 0x0c, 0x0f, 0x24, 0x20, 0xa9, 0x09, 0x00, 0x08, 0x0c, - 0x0f, 0x5a, 0x0c, 0x78, 0x00, 0x26, 0x08, 0x0c, 0x0f, 0x32, 0x11, 0x88, - 0x20, 0x11, 0x01, 0x0e, 0x22, 0x14, 0x92, 0x94, 0x00, 0x07, 0x92, 0x96, - 0x00, 0x07, 0x01, 0x18, 0x20, 0x11, 0x09, 0x47, 0x00, 0x10, 0x20, 0x11, - 0x1b, 0x47, 0x08, 0x0c, 0x0f, 0x46, 0x00, 0x2e, 0x00, 0x05, 0x20, 0x11, - 0x01, 0x0e, 0x22, 0x14, 0x92, 0x94, 0x00, 0x07, 0x92, 0x96, 0x00, 0x07, - 0x01, 0x18, 0x20, 0x11, 0xa8, 0x80, 0x00, 0x10, 0x20, 0x11, 0x68, 0x40, - 0xd0, 0xe4, 0x70, 0xf3, 0x00, 0x00, 0x11, 0x20, 0x70, 0xf3, 0x0f, 0xa0, - 0x08, 0x0c, 0x0f, 0x37, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x08, 0x0c, - 0x0f, 0x32, 0x01, 0x48, 0xd0, 0xa4, 0x11, 0x38, 0x20, 0x11, 0xcd, 0xd5, - 0x00, 0x10, 0x20, 0x11, 0x00, 0x80, 0x08, 0x0c, 0x0f, 0x37, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0x26, 0x70, 0xf3, 0x00, 0x00, 0x08, 0x0c, 0x0f, 0x32, - 0x11, 0x30, 0x20, 0x11, 0x80, 0x40, 0x08, 0x0c, 0x0f, 0x46, 0x00, 0x2e, - 0x00, 0x05, 0x08, 0x0c, 0x2a, 0x77, 0x11, 0x18, 0x20, 0x11, 0xcd, 0xc5, - 0x00, 0x10, 0x20, 0x11, 0xca, 0xc2, 0x08, 0x0c, 0x0f, 0x37, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x16, 0x00, 0x06, 0x20, 0x71, 0x18, 0x00, - 0xd0, 0xb4, 0x70, 0xec, 0x71, 0xe8, 0x11, 0x18, 0xc0, 0xe4, 0xc1, 0xf4, - 0x00, 0x50, 0x00, 0x06, 0x3b, 0x00, 0x90, 0x84, 0xff, 0x3e, 0x20, 0xd8, - 0x00, 0x0e, 0x70, 0xf3, 0x00, 0x00, 0xc0, 0xe5, 0xc1, 0xf5, 0x00, 0x99, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0xd0, 0xe4, 0x70, 0xec, 0x11, 0x10, 0xc0, 0xdc, 0x00, 0x08, - 0xc0, 0xdd, 0x00, 0x16, 0x71, 0xe8, 0x00, 0x19, 0x00, 0x1e, 0x00, 0xee, - 0x00, 0x05, 0x70, 0xee, 0x71, 0xea, 0x70, 0x00, 0x90, 0x84, 0x00, 0x07, - 0x00, 0x0b, 0x00, 0x05, 0x0e, 0xea, 0x0e, 0xc4, 0x0e, 0xc4, 0x0e, 0x98, - 0x0e, 0xd3, 0x0e, 0xc4, 0x0e, 0xc4, 0x0e, 0xd3, 0xc2, 0x84, 0x00, 0x16, - 0x3b, 0x08, 0x3a, 0x00, 0x91, 0x04, 0x91, 0x8d, 0x00, 0xc1, 0x21, 0xd8, - 0x90, 0x84, 0xff, 0x3e, 0x92, 0x05, 0x20, 0xd0, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x3b, 0x20, 0x04, 0xd0, 0xdc, 0x00, 0x05, 0x9e, 0x86, - 0x18, 0x00, 0x19, 0x0c, 0x0d, 0x85, 0x70, 0xec, 0xd0, 0xe4, 0x01, 0x08, - 0xc2, 0xe5, 0x72, 0xee, 0xd0, 0xe4, 0x11, 0x18, 0x92, 0x94, 0x00, 0xc1, - 0x08, 0xf9, 0x00, 0x05, 0x9e, 0x86, 0x18, 0x00, 0x19, 0x0c, 0x0d, 0x85, - 0x70, 0xe8, 0xd0, 0xf4, 0x01, 0x08, 0xc2, 0xf5, 0x72, 0xea, 0xd0, 0xf4, - 0x11, 0x40, 0x92, 0x84, 0x80, 0x00, 0x80, 0x05, 0xc2, 0x84, 0x92, 0x15, - 0x92, 0x94, 0x00, 0xc1, 0x08, 0x61, 0x00, 0x05, 0x1d, 0x04, 0x0f, 0x5a, - 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x0f, 0x5a, 0x00, 0x05, 0x89, 0x0e, - 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x94, 0x00, 0x3f, 0x91, 0x8c, 0xff, 0xc0, - 0x00, 0x05, 0x00, 0x06, 0x22, 0x00, 0x91, 0x4d, 0x89, 0x4f, 0x89, 0x4d, - 0x89, 0x4d, 0x00, 0x0e, 0x00, 0x05, 0x01, 0xd6, 0x01, 0x46, 0x00, 0x36, - 0x00, 0x96, 0x20, 0x61, 0x18, 0x8d, 0x60, 0x0b, 0x00, 0x00, 0x60, 0x0f, - 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x60, 0x07, 0x00, 0x00, 0x20, 0x09, - 0xff, 0xc0, 0x21, 0x05, 0x00, 0x06, 0x20, 0x01, 0xaa, 0xaa, 0x20, 0x0f, - 0x20, 0x19, 0x55, 0x55, 0x90, 0x16, 0x20, 0x49, 0x0b, 0xff, 0xab, 0x02, - 0xa0, 0x01, 0xa0, 0x01, 0xa8, 0x00, 0x93, 0x06, 0x11, 0x38, 0x21, 0x05, - 0x93, 0x06, 0x01, 0x20, 0x82, 0x10, 0x99, 0xc8, 0x04, 0x00, 0x0c, 0x98, - 0x00, 0x0e, 0x20, 0x0f, 0x20, 0x01, 0x18, 0x9d, 0x92, 0x8a, 0x00, 0x0e, - 0x16, 0x38, 0x92, 0x8a, 0x00, 0x06, 0x20, 0x11, 0x00, 0x06, 0x12, 0x10, - 0x20, 0x11, 0x00, 0x00, 0x22, 0x02, 0x90, 0x06, 0x20, 0x08, 0x82, 0xff, - 0x01, 0xb0, 0x82, 0x00, 0x60, 0x0a, 0x60, 0x0f, 0xff, 0xff, 0x60, 0x03, - 0x00, 0x02, 0x60, 0x07, 0x00, 0x00, 0x00, 0x26, 0x20, 0x19, 0x00, 0x10, - 0x92, 0x80, 0x00, 0x01, 0x20, 0xe8, 0x21, 0xa0, 0x21, 0xa8, 0x41, 0x04, - 0x83, 0x19, 0x1d, 0xe0, 0x82, 0x11, 0x1d, 0xa0, 0x00, 0x2e, 0x00, 0x9e, - 0x00, 0x3e, 0x01, 0x4e, 0x01, 0xde, 0x00, 0x05, 0x20, 0x11, 0x00, 0x0e, - 0x08, 0xe8, 0x00, 0x16, 0x00, 0x26, 0x00, 0x96, 0x33, 0x48, 0x08, 0x0c, - 0x0f, 0x61, 0x21, 0x00, 0x93, 0x00, 0x20, 0x98, 0x22, 0xe0, 0x00, 0x9e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x36, 0x35, 0x18, 0x20, 0xa9, 0x00, 0x01, - 0x40, 0x02, 0x80, 0x07, 0x40, 0x04, 0x83, 0x19, 0x1d, 0xd8, 0x00, 0x3e, - 0x00, 0x05, 0x20, 0xe9, 0x00, 0x01, 0x71, 0xb8, 0x81, 0xff, 0x11, 0xc0, - 0x90, 0x06, 0x20, 0x09, 0x02, 0x00, 0x20, 0xa9, 0x00, 0x02, 0x92, 0x98, - 0x00, 0x18, 0x23, 0xa0, 0x40, 0x01, 0x20, 0x09, 0x07, 0x00, 0x20, 0xa9, - 0x00, 0x02, 0x92, 0x98, 0x00, 0x08, 0x23, 0xa0, 0x40, 0x01, 0x70, 0x7c, - 0x80, 0x07, 0x71, 0x80, 0x81, 0x0f, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x01, - 0x92, 0x98, 0x00, 0x0c, 0x23, 0xa0, 0x90, 0x0e, 0x08, 0x0c, 0x0d, 0x65, - 0x20, 0x01, 0x00, 0x00, 0x81, 0x0f, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x01, - 0x00, 0x05, 0x89, 0xff, 0x01, 0x40, 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, - 0x00, 0x06, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x9e, 0x0c, 0xb0, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x11, 0x04, 0x09, 0x0c, - 0x0d, 0x85, 0x00, 0xee, 0x00, 0x05, 0x00, 0x86, 0x00, 0xe6, 0x00, 0x06, - 0x00, 0x26, 0x00, 0x36, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xc9, - 0x20, 0x71, 0x18, 0x00, 0x73, 0xc0, 0x70, 0x2c, 0x90, 0x16, 0x90, 0x45, - 0x01, 0x58, 0x82, 0x10, 0x99, 0x06, 0x09, 0x0c, 0x0d, 0x85, 0x23, 0x00, - 0x92, 0x02, 0x01, 0x20, 0x1a, 0x0c, 0x0d, 0x85, 0xa0, 0x00, 0x0c, 0x98, - 0x01, 0x2e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x8e, - 0x00, 0x05, 0x00, 0x86, 0x00, 0xe6, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0x10, 0x70, 0x10, 0x90, 0x05, 0x01, 0x40, - 0x70, 0x18, 0x90, 0x45, 0x01, 0x28, 0x99, 0x06, 0x09, 0x0c, 0x0d, 0x85, - 0xa0, 0x00, 0x0c, 0xc8, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x8e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0xc0, 0x80, 0x01, 0x02, 0x70, 0x70, 0xc2, 0x70, 0x2c, - 0x20, 0x48, 0x90, 0x85, 0x00, 0x01, 0xa8, 0x00, 0x70, 0x2e, 0xa8, 0x03, - 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x90, 0x4e, 0x0c, 0xd8, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x70, 0xc0, 0x90, 0xca, 0x00, 0x20, 0x02, 0x68, - 0x80, 0x01, 0x70, 0xc2, 0x70, 0x2c, 0x20, 0x48, 0xa8, 0x00, 0x70, 0x2e, - 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x90, 0x4e, 0x0c, 0xd8, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x16, 0x89, 0x0e, 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, - 0x00, 0x3f, 0xa8, 0x62, 0x91, 0x84, 0xff, 0xc0, 0xa8, 0x5e, 0x00, 0x1e, - 0x00, 0x20, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, - 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x26, 0x20, 0x09, 0x00, 0x00, - 0x20, 0x49, 0x04, 0x00, 0x29, 0x00, 0x70, 0x2e, 0x89, 0x40, 0x28, 0x00, - 0xa8, 0x02, 0xa9, 0x5e, 0xa8, 0x63, 0x00, 0x01, 0x84, 0x20, 0x98, 0x86, - 0x04, 0x40, 0x01, 0x20, 0x28, 0x48, 0x91, 0x88, 0x00, 0x40, 0x0c, 0x90, - 0x20, 0x71, 0x18, 0x8d, 0x70, 0x00, 0x90, 0x05, 0x11, 0xa0, 0x20, 0x01, - 0x05, 0x58, 0xa8, 0x02, 0x20, 0x48, 0x20, 0x09, 0x56, 0x00, 0x89, 0x40, - 0x28, 0x00, 0xa8, 0x02, 0xa9, 0x5e, 0xa8, 0x63, 0x00, 0x01, 0x84, 0x20, - 0x98, 0x86, 0x08, 0x00, 0x01, 0x20, 0x28, 0x48, 0x91, 0x88, 0x00, 0x40, - 0x0c, 0x90, 0x20, 0x71, 0x18, 0x8d, 0x71, 0x04, 0x72, 0x00, 0x82, 0xff, - 0x01, 0xd0, 0x73, 0x08, 0x83, 0x18, 0x83, 0x1f, 0x83, 0x1b, 0x83, 0x1b, - 0x73, 0x12, 0x83, 0x19, 0x20, 0x01, 0x08, 0x00, 0xa8, 0x02, 0x20, 0x48, - 0x89, 0x00, 0xa8, 0x02, 0x20, 0x40, 0xa9, 0x5e, 0xaa, 0x62, 0x84, 0x20, - 0x23, 0x00, 0x99, 0x06, 0x01, 0x30, 0x28, 0x48, 0x91, 0x88, 0x00, 0x40, - 0x92, 0x91, 0x00, 0x00, 0x0c, 0x88, 0xa8, 0x03, 0x00, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x74, 0xbe, 0x74, 0xc2, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x16, - 0x99, 0x84, 0xfc, 0x00, 0x01, 0xe8, 0x90, 0x8c, 0xf8, 0x00, 0x11, 0x68, - 0x99, 0x82, 0x04, 0x00, 0x02, 0xb8, 0x99, 0x82, 0x04, 0x40, 0x02, 0x78, - 0x99, 0x82, 0x05, 0x58, 0x02, 0x88, 0x99, 0x82, 0x08, 0x00, 0x12, 0x70, - 0x00, 0x40, 0x99, 0x82, 0x08, 0x00, 0x02, 0x50, 0x20, 0x71, 0x18, 0x8d, - 0x70, 0x10, 0x99, 0x02, 0x12, 0x28, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, - 0x00, 0xee, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x24, 0x70, 0x07, 0x00, 0x00, 0x90, 0x06, 0x70, 0x1e, 0x70, 0x22, - 0x70, 0x02, 0x20, 0x71, 0x00, 0x00, 0x70, 0x10, 0x90, 0x85, 0x80, 0x44, - 0x70, 0x12, 0x20, 0x71, 0x00, 0x80, 0x90, 0x06, 0x70, 0x2b, 0x00, 0x60, - 0x20, 0xa9, 0x00, 0x40, 0x70, 0x22, 0x1f, 0x04, 0x11, 0x3e, 0x70, 0x2b, - 0x00, 0x60, 0x70, 0x2b, 0x00, 0x20, 0x20, 0xa9, 0x00, 0x40, 0x70, 0x22, - 0x1f, 0x04, 0x11, 0x47, 0x70, 0x2b, 0x00, 0x20, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0xa0, 0x6f, 0x00, 0x00, - 0x20, 0x71, 0x1a, 0x24, 0x70, 0x1c, 0x90, 0x88, 0x1a, 0x2e, 0x28, 0x0a, - 0x80, 0x00, 0x90, 0x84, 0x00, 0x3f, 0x70, 0x1e, 0x71, 0x20, 0x91, 0x06, - 0x09, 0x0c, 0x0d, 0x85, 0x70, 0x04, 0x90, 0x05, 0x11, 0x28, 0x00, 0xf6, - 0x20, 0x79, 0x00, 0x80, 0x00, 0xa9, 0x00, 0xfe, 0x00, 0xee, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x24, 0x70, 0x04, 0x90, 0x05, 0x11, 0x28, 0x00, 0xf6, 0x20, 0x79, - 0x00, 0x80, 0x00, 0x21, 0x00, 0xfe, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, - 0x70, 0x04, 0x90, 0x86, 0x00, 0x00, 0x11, 0x10, 0x70, 0x07, 0x00, 0x06, - 0x70, 0x00, 0x00, 0x02, 0x11, 0x90, 0x13, 0x13, 0x11, 0x8e, 0x11, 0x8e, - 0x13, 0x07, 0x13, 0x07, 0x13, 0x07, 0x13, 0x07, 0x08, 0x0c, 0x0d, 0x85, - 0x70, 0x1c, 0x71, 0x20, 0x91, 0x06, 0x11, 0x48, 0x79, 0x2c, 0x91, 0x84, - 0x00, 0x01, 0x11, 0x20, 0xd1, 0xfc, 0x11, 0x10, 0x70, 0x07, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x96, 0x91, 0x80, 0x1a, 0x2e, 0x20, 0x04, 0x70, 0x0a, - 0x20, 0x48, 0x81, 0x08, 0x91, 0x8c, 0x00, 0x3f, 0x71, 0x22, 0x78, 0x2b, - 0x00, 0x26, 0xa8, 0x8c, 0x78, 0x02, 0xa8, 0x90, 0x78, 0x06, 0xa8, 0x94, - 0x78, 0x0a, 0xa8, 0x98, 0x78, 0x0e, 0xa8, 0x78, 0x70, 0x0e, 0xa8, 0x70, - 0x70, 0x16, 0xa8, 0x74, 0x70, 0x1a, 0xa8, 0x68, 0x00, 0x9e, 0xd0, 0x84, - 0x01, 0x20, 0x70, 0x07, 0x00, 0x01, 0x00, 0x29, 0x00, 0x05, 0x70, 0x07, - 0x00, 0x02, 0x00, 0xb1, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x71, 0x0c, - 0x20, 0x11, 0x00, 0x40, 0x91, 0x82, 0x00, 0x40, 0x12, 0x10, 0x21, 0x10, - 0x90, 0x06, 0x70, 0x0e, 0x72, 0x12, 0x82, 0x03, 0x78, 0x12, 0x78, 0x2b, - 0x00, 0x20, 0x78, 0x2b, 0x00, 0x41, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x26, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x70, 0x14, - 0x20, 0xe0, 0x70, 0x18, 0x20, 0x98, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x00, 0x88, 0x78, 0x2b, 0x00, 0x26, 0x71, 0x0c, 0x20, 0x11, 0x00, 0x40, - 0x91, 0x82, 0x00, 0x40, 0x12, 0x10, 0x21, 0x10, 0x90, 0x06, 0x70, 0x0e, - 0x22, 0xa8, 0x40, 0x06, 0x82, 0x03, 0x78, 0x12, 0x78, 0x2b, 0x00, 0x20, - 0x33, 0x00, 0x70, 0x1a, 0x78, 0x2b, 0x00, 0x01, 0x01, 0x5e, 0x01, 0x4e, - 0x01, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x09, 0x1a, 0x24, - 0x21, 0x04, 0xc0, 0x95, 0x20, 0x0a, 0x08, 0x0c, 0x11, 0x6d, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x24, 0x00, 0xf6, 0x20, 0x79, - 0x00, 0x80, 0x79, 0x2c, 0xd1, 0xbc, 0x19, 0x0c, 0x0d, 0x7e, 0x78, 0x2b, - 0x00, 0x02, 0xd1, 0xfc, 0x01, 0x20, 0x91, 0x8c, 0x07, 0x00, 0x70, 0x04, - 0x00, 0x23, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x1e, 0x00, 0x05, 0x11, 0x7e, - 0x12, 0x26, 0x12, 0x5a, 0x13, 0x32, 0x0d, 0x85, 0x13, 0x4d, 0x0d, 0x85, - 0x91, 0x8c, 0x07, 0x00, 0x15, 0x50, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x70, 0x14, 0x20, 0xe8, 0x70, 0x18, 0x20, 0xa0, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x00, 0x88, 0x78, 0x2b, 0x00, 0x40, 0x70, 0x10, 0x20, 0xa8, - 0x40, 0x05, 0x34, 0x00, 0x70, 0x1a, 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, - 0x70, 0x0c, 0x90, 0x05, 0x05, 0x78, 0x78, 0x00, 0x78, 0x02, 0x78, 0x04, - 0x78, 0x06, 0x08, 0x0c, 0x11, 0xc3, 0x00, 0x05, 0x70, 0x08, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x6f, 0x01, 0x00, 0x00, 0x9e, 0x70, 0x07, 0x00, 0x00, - 0x08, 0x0c, 0x11, 0x7e, 0x00, 0x05, 0x70, 0x08, 0x00, 0x96, 0x20, 0x48, - 0xa8, 0x6f, 0x02, 0x00, 0x00, 0x9e, 0x0c, 0xa0, 0x91, 0x8c, 0x07, 0x00, - 0x11, 0x50, 0x70, 0x0c, 0x90, 0x05, 0x01, 0x80, 0x78, 0x00, 0x78, 0x02, - 0x78, 0x04, 0x78, 0x06, 0x08, 0x0c, 0x11, 0xd8, 0x00, 0x05, 0x70, 0x08, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x6f, 0x02, 0x00, 0x00, 0x9e, 0x70, 0x07, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x96, 0x70, 0x08, 0x20, 0x48, 0x78, 0x00, - 0xa8, 0x8e, 0x78, 0x04, 0xa8, 0x92, 0x78, 0x08, 0xa8, 0x96, 0x78, 0x0c, - 0xa8, 0x9a, 0xa8, 0x6f, 0x01, 0x00, 0x00, 0x9e, 0x70, 0x07, 0x00, 0x00, - 0x00, 0x96, 0x00, 0xd6, 0x70, 0x08, 0x20, 0x48, 0x20, 0x01, 0x18, 0xb9, - 0x20, 0x04, 0x99, 0x06, 0x11, 0x28, 0xa8, 0x9c, 0x08, 0x0f, 0x00, 0xde, - 0x00, 0x9e, 0x00, 0xa0, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x96, 0x00, 0xd6, - 0x70, 0x08, 0x20, 0x48, 0x00, 0x81, 0x01, 0x50, 0xa8, 0x9c, 0x00, 0x86, - 0x29, 0x40, 0x08, 0x0f, 0x00, 0x8e, 0x00, 0xde, 0x00, 0x9e, 0x08, 0x0c, - 0x11, 0x6d, 0x00, 0x05, 0x00, 0xde, 0x00, 0x9e, 0x08, 0x0c, 0x11, 0x6d, - 0x00, 0x05, 0xa8, 0xa8, 0xd0, 0x8c, 0x00, 0x05, 0x00, 0x96, 0xa0, 0xa0, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0xa0, 0x6c, 0x90, 0x8e, 0x01, 0x00, - 0x01, 0x30, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, - 0x40, 0x02, 0x08, 0x0c, 0x70, 0x06, 0xa0, 0x9f, 0x00, 0x00, 0xa0, 0xa3, - 0x00, 0x00, 0x28, 0x48, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0xa6, 0xa0, 0xa0, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0xa0, 0x6c, - 0x90, 0x8e, 0x01, 0x00, 0x01, 0x28, 0xa8, 0x7b, 0x00, 0x01, 0xa8, 0x83, - 0x00, 0x00, 0x00, 0xc0, 0xa8, 0x0c, 0x20, 0x50, 0xb0, 0x04, 0x90, 0x05, - 0x01, 0x98, 0xa8, 0x0e, 0x20, 0x50, 0x80, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0x8c, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, - 0xa0, 0x76, 0xa1, 0x72, 0xb0, 0x00, 0xa0, 0x7a, 0x28, 0x10, 0x08, 0x0c, - 0x11, 0x4e, 0x00, 0xe8, 0xa9, 0x7c, 0xa8, 0x94, 0x00, 0x16, 0x00, 0x06, - 0x08, 0x0c, 0x70, 0x06, 0x00, 0x0e, 0x00, 0x1e, 0xd1, 0xfc, 0x11, 0x38, - 0xd1, 0xf4, 0x01, 0x28, 0x00, 0xc6, 0x20, 0x60, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0xce, 0x70, 0x08, 0x20, 0x48, 0xa8, 0x9f, 0x00, 0x00, 0xa8, 0xa3, - 0x00, 0x00, 0x08, 0x0c, 0x10, 0x8b, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, - 0x11, 0x6d, 0x00, 0xae, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x2b, 0x10, 0x01, 0x70, 0x07, 0x00, 0x05, 0x70, 0x00, 0xc0, 0x94, - 0x70, 0x02, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x96, 0x20, 0x01, 0x19, 0x2f, - 0x20, 0x4c, 0xa8, 0x7c, 0x78, 0x12, 0xa8, 0x8c, 0x78, 0x02, 0xa8, 0x90, - 0x78, 0x06, 0xa8, 0x94, 0x78, 0x0a, 0xa8, 0x98, 0x78, 0x0e, 0x78, 0x2b, - 0x00, 0x20, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x78, 0x2b, 0x00, 0x41, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x00, 0xc0, 0x84, 0x70, 0x02, 0x29, 0x00, - 0x70, 0x0a, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0x05, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x00, 0x88, 0x78, 0x2b, 0x00, 0x40, 0x00, 0x96, 0x20, 0x01, - 0x19, 0x2f, 0x20, 0x4c, 0xaa, 0x7c, 0x00, 0x9e, 0x08, 0x0c, 0x8f, 0x88, - 0x20, 0x09, 0x18, 0x8c, 0x21, 0x04, 0x90, 0x84, 0xff, 0xfc, 0x20, 0x0a, - 0x08, 0x0c, 0x8d, 0xe7, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x11, 0x7e, - 0x00, 0x05, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x11, 0x7e, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x20, 0x79, 0x03, 0x00, 0x20, 0x71, - 0x1a, 0x6e, 0x70, 0x03, 0x00, 0x00, 0x78, 0xbf, 0x00, 0xf6, 0x00, 0x41, - 0x78, 0x07, 0x00, 0x07, 0x78, 0x03, 0x00, 0x00, 0x78, 0x03, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xc6, 0x78, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x01, 0x65, 0x20, 0x03, 0x41, 0x98, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x20, - 0x78, 0x20, 0x08, 0x0c, 0x13, 0xb6, 0x0c, 0xc8, 0x20, 0x01, 0x1a, 0x6f, - 0x20, 0x03, 0x00, 0x00, 0x78, 0xab, 0x00, 0x04, 0x78, 0xac, 0xd0, 0xac, - 0x1d, 0xe8, 0x78, 0xab, 0x00, 0x02, 0x78, 0x07, 0x00, 0x07, 0x78, 0x27, - 0x00, 0x30, 0x78, 0x2b, 0x04, 0x00, 0x78, 0x27, 0x00, 0x31, 0x78, 0x2b, - 0x1a, 0x81, 0x78, 0xe3, 0xff, 0x00, 0x78, 0x1f, 0xff, 0x00, 0x78, 0x1b, - 0xff, 0x00, 0x20, 0x01, 0x1a, 0x70, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x02, 0x00, 0x20, 0x04, 0xd0, 0xdc, 0x01, 0x10, 0x78, 0x1f, 0x03, 0x03, - 0x20, 0x61, 0x1a, 0x81, 0x60, 0x2f, 0x1d, 0xdc, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x90, 0x82, 0x1d, 0xdc, 0x60, 0x32, 0x60, 0x3b, 0x1e, 0xc1, - 0x60, 0x2b, 0x1a, 0xc1, 0x60, 0x07, 0x1a, 0xa1, 0x20, 0x61, 0x1a, 0xa1, - 0x60, 0x6f, 0x19, 0x3d, 0x20, 0x01, 0x19, 0x28, 0x20, 0x04, 0x60, 0x7a, - 0x78, 0x3f, 0x34, 0x8e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x86, 0x00, 0x0d, - 0x11, 0xd0, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0xb8, 0x78, 0x20, 0x00, 0x26, - 0x20, 0x10, 0x08, 0x0c, 0xcf, 0x09, 0x01, 0x80, 0x22, 0x60, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x58, 0x00, 0x16, 0x61, 0x20, 0x91, 0x86, - 0x00, 0x09, 0x01, 0x08, 0x00, 0x20, 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, - 0xb2, 0x0a, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x22, 0x00, 0x79, 0x08, 0x91, 0x84, 0x00, 0x70, 0x19, 0x0c, 0x0d, 0x7e, - 0xd1, 0x9c, 0x05, 0xa0, 0x78, 0x20, 0x90, 0x8c, 0xf0, 0x00, 0x05, 0x40, - 0x20, 0x60, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x50, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x15, 0x30, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x76, - 0xa8, 0x7a, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0x6e, 0x27, 0x00, 0xb6, - 0x60, 0x10, 0x20, 0x58, 0xba, 0x3c, 0x82, 0x11, 0x02, 0x08, 0xba, 0x3e, - 0xb8, 0xd0, 0x90, 0x05, 0x19, 0x0c, 0x68, 0xdf, 0x00, 0xbe, 0x60, 0x44, - 0xd0, 0xfc, 0x19, 0x0c, 0xad, 0x25, 0x08, 0x0c, 0xb1, 0x95, 0x78, 0x08, - 0xd0, 0x9c, 0x19, 0xb0, 0x01, 0x2e, 0x00, 0x05, 0x90, 0x8a, 0x00, 0x24, - 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x2b, 0x01, 0x2e, 0x00, 0x05, 0x04, 0xb0, - 0x01, 0x2e, 0x00, 0x05, 0x14, 0x38, 0x14, 0x5e, 0x14, 0x8e, 0x14, 0x93, - 0x14, 0x97, 0x14, 0x9c, 0x14, 0xc4, 0x14, 0xc8, 0x14, 0xd6, 0x14, 0xda, - 0x14, 0x38, 0x15, 0xa7, 0x15, 0xab, 0x16, 0x1d, 0x16, 0x24, 0x14, 0x38, - 0x16, 0x25, 0x16, 0x26, 0x16, 0x31, 0x16, 0x38, 0x14, 0x38, 0x14, 0x38, - 0x14, 0x38, 0x14, 0x38, 0x14, 0x38, 0x14, 0x38, 0x14, 0x38, 0x14, 0x9e, - 0x14, 0x38, 0x14, 0x66, 0x14, 0x8b, 0x14, 0x52, 0x14, 0x38, 0x14, 0x72, - 0x14, 0x3c, 0x14, 0x3a, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x0d, 0x7e, - 0x08, 0x0c, 0x16, 0x43, 0x20, 0x09, 0x1a, 0x7d, 0x21, 0x04, 0x80, 0x00, - 0x20, 0x0a, 0x08, 0x0c, 0x82, 0xb8, 0x08, 0x0c, 0x1b, 0x1e, 0x00, 0x05, - 0x60, 0x44, 0xd0, 0xfc, 0x19, 0x0c, 0xad, 0x25, 0x20, 0x09, 0x00, 0x55, - 0x08, 0x0c, 0xb2, 0x0a, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x16, 0x43, - 0x20, 0x60, 0x60, 0x44, 0xd0, 0xfc, 0x19, 0x0c, 0xad, 0x25, 0x20, 0x09, - 0x00, 0x55, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0x20, 0x09, 0x00, 0x48, - 0x08, 0x0c, 0x16, 0x43, 0x20, 0x60, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, - 0x20, 0x09, 0x00, 0x54, 0x08, 0x0c, 0x16, 0x43, 0x20, 0x60, 0x60, 0x44, - 0xd0, 0xfc, 0x19, 0x0c, 0xad, 0x25, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, - 0x08, 0x0c, 0x16, 0x43, 0x20, 0x60, 0x00, 0x56, 0x00, 0x66, 0x08, 0x0c, - 0x16, 0x43, 0x20, 0x28, 0x08, 0x0c, 0x16, 0x43, 0x20, 0x30, 0x00, 0x36, - 0x00, 0x46, 0x20, 0x21, 0x00, 0x00, 0x24, 0x18, 0x20, 0x09, 0x00, 0x56, - 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x6e, 0x00, 0x5e, - 0x00, 0x05, 0x08, 0x0c, 0x16, 0x43, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x85, - 0xc0, 0xb5, 0x70, 0x06, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x85, 0x70, 0x06, - 0x00, 0x05, 0x08, 0x0c, 0x16, 0x43, 0x08, 0x0c, 0x17, 0x40, 0x00, 0x05, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x16, 0x43, 0x20, 0x60, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x3b, 0xff, 0xff, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x0c, 0xb2, 0x0a, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x09, 0x03, 0xe8, 0x81, 0x09, 0x01, 0x60, 0x20, 0x01, - 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x0d, 0xc8, 0x20, 0x01, 0x02, 0x18, - 0x20, 0x04, 0xd0, 0xec, 0x11, 0x10, 0x08, 0x0c, 0x16, 0x48, 0x20, 0x01, - 0x03, 0x07, 0x20, 0x03, 0x80, 0x00, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x95, - 0x70, 0x06, 0x00, 0x05, 0x08, 0x0c, 0x16, 0x43, 0x20, 0x60, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x3b, 0xff, 0xff, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x48, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0x08, 0x0c, 0x16, 0x43, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x16, 0x43, 0x08, 0x0c, 0x15, 0x92, - 0x78, 0x27, 0x00, 0x18, 0x79, 0xac, 0xd1, 0xdc, 0x09, 0x04, 0x15, 0x43, - 0x78, 0x27, 0x00, 0x15, 0x78, 0x28, 0x78, 0x2b, 0x00, 0x00, 0x90, 0x65, - 0x01, 0x40, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, - 0x00, 0x20, 0x08, 0x04, 0x15, 0x49, 0x70, 0x04, 0x90, 0x05, 0x01, 0xc8, - 0x11, 0x88, 0x78, 0xab, 0x00, 0x04, 0x78, 0x27, 0x00, 0x18, 0x78, 0x2b, - 0x00, 0x00, 0xd1, 0xbc, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0x01, 0x02, 0x0d, - 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x08, 0x04, 0x15, 0x77, - 0x78, 0xab, 0x00, 0x04, 0x78, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x15, 0xab, - 0x00, 0x05, 0x78, 0x27, 0x00, 0x18, 0xa0, 0x01, 0x78, 0x28, 0x78, 0x27, - 0x00, 0x11, 0xa0, 0x01, 0x79, 0x28, 0x91, 0x06, 0x01, 0x10, 0x79, 0xac, - 0x08, 0xe0, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x00, 0x70, 0x2c, 0xd0, 0xc4, - 0x01, 0x40, 0x00, 0xee, 0x08, 0x0c, 0x1b, 0x1e, 0x08, 0x0c, 0x13, 0x66, - 0x78, 0x03, 0x00, 0x01, 0x00, 0x05, 0x70, 0x37, 0x00, 0x01, 0xa0, 0x01, - 0x71, 0x50, 0x00, 0xee, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x05, 0x00, - 0x01, 0x10, 0x79, 0xac, 0x08, 0x10, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, - 0x78, 0xab, 0x00, 0x04, 0x78, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x15, 0xab, - 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x00, 0x05, 0x78, 0x28, - 0x78, 0x2b, 0x00, 0x00, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0x85, 0x60, 0x14, - 0x20, 0x48, 0x78, 0xab, 0x00, 0x04, 0x91, 0x8c, 0x07, 0x00, 0x01, 0xa8, - 0x08, 0x0c, 0x82, 0xb8, 0x08, 0x0c, 0x1b, 0x1e, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0x58, 0xa9, 0xac, 0xa9, 0x36, 0xa9, 0xb0, 0xa9, 0x3a, 0xa8, 0x3f, - 0xff, 0xff, 0xa8, 0x43, 0xff, 0xff, 0xa8, 0x80, 0xc0, 0xbd, 0xa8, 0x82, - 0x08, 0x0c, 0xca, 0xe9, 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, - 0x11, 0x28, 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x48, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x60, 0x24, 0x19, 0x0c, 0xd3, 0x1e, 0x20, 0x29, 0x00, 0xc8, 0x85, 0x29, - 0x01, 0x28, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x0d, 0xc8, - 0x7d, 0xbc, 0x08, 0x0c, 0xee, 0xb1, 0xd5, 0xa4, 0x11, 0x18, 0x08, 0x0c, - 0x16, 0x48, 0x00, 0x05, 0x08, 0x0c, 0x82, 0xb8, 0x08, 0x0c, 0x1b, 0x1e, - 0x00, 0x05, 0x78, 0x1f, 0x03, 0x00, 0x78, 0x03, 0x00, 0x01, 0x00, 0x05, - 0x00, 0x16, 0x00, 0x66, 0x00, 0x76, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x79, 0x08, 0x91, 0x8c, 0x00, 0x07, 0x91, 0x86, 0x00, 0x03, 0x01, 0x20, - 0x20, 0x01, 0x00, 0x16, 0x08, 0x0c, 0x16, 0xb9, 0x00, 0xfe, 0x00, 0x7e, - 0x00, 0x6e, 0x00, 0x1e, 0x00, 0x05, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, - 0x00, 0x05, 0x71, 0x04, 0x91, 0x84, 0x00, 0x04, 0x19, 0x0c, 0x0d, 0x85, - 0xd1, 0x84, 0x11, 0xb1, 0xd1, 0x9c, 0x01, 0x80, 0xc1, 0x9c, 0x71, 0x06, - 0x00, 0x16, 0x08, 0x0c, 0x17, 0x23, 0x00, 0x1e, 0x01, 0x48, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x08, 0x0c, - 0x16, 0x48, 0x00, 0x05, 0x81, 0xff, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0x05, - 0x21, 0x00, 0xc1, 0x84, 0xc1, 0xb4, 0x71, 0x06, 0xd0, 0xb4, 0x00, 0x16, - 0x00, 0xe6, 0x19, 0x04, 0x16, 0x12, 0x20, 0x71, 0x02, 0x00, 0x08, 0x0c, - 0x17, 0x10, 0x05, 0xe0, 0x08, 0x0c, 0x17, 0x23, 0x05, 0xb0, 0x60, 0x14, - 0x90, 0x05, 0x05, 0xb0, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x64, 0x00, 0x9e, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x29, 0x01, 0x60, 0x90, 0x8e, - 0x00, 0x48, 0x15, 0x50, 0x60, 0x1c, 0xd0, 0x84, 0x11, 0xe0, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x17, 0xad, 0x00, 0xfe, 0x00, 0xb0, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x19, 0x42, 0x00, 0xfe, 0x20, 0x09, 0x01, 0xf4, - 0x81, 0x09, 0x01, 0x68, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, - 0x0d, 0xc8, 0x20, 0x01, 0x02, 0x18, 0x20, 0x04, 0xd0, 0xec, 0x11, 0x18, - 0x08, 0x0c, 0x16, 0x48, 0x00, 0x40, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, - 0x00, 0x20, 0x08, 0x0c, 0x13, 0x66, 0x78, 0x03, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0x17, 0x23, 0x0d, 0xd0, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x50, 0x20, 0x03, 0x00, 0x20, 0x04, 0x61, - 0x0c, 0x90, 0x04, 0x29, 0x20, 0x60, 0x20, 0x09, 0x00, 0x53, 0x08, 0x0c, - 0xb2, 0x0a, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe1, 0x20, 0x08, - 0x00, 0xd1, 0x00, 0x06, 0x70, 0x04, 0xc0, 0x9d, 0x70, 0x06, 0x00, 0x0e, - 0x08, 0x0c, 0x92, 0xd5, 0x00, 0x05, 0x00, 0x89, 0x90, 0x05, 0x01, 0x18, - 0x08, 0x0c, 0x8e, 0xd9, 0x0c, 0xd0, 0x00, 0x05, 0x20, 0x01, 0x00, 0x36, - 0x20, 0x09, 0x18, 0x20, 0x21, 0x0c, 0x20, 0x11, 0x18, 0x1f, 0x22, 0x14, - 0x08, 0x0c, 0x16, 0xb9, 0x00, 0x05, 0x78, 0x08, 0xd0, 0x9c, 0x0d, 0xe8, - 0x78, 0x20, 0x00, 0x05, 0x08, 0x0c, 0x15, 0x92, 0x00, 0xd6, 0x20, 0x69, - 0x02, 0x00, 0x20, 0x09, 0x01, 0xf4, 0x81, 0x09, 0x05, 0x10, 0x68, 0x04, - 0x90, 0x05, 0x0d, 0xd8, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, - 0x79, 0xbc, 0xd1, 0xa4, 0x15, 0x28, 0x79, 0xb8, 0x91, 0x8c, 0x0f, 0xff, - 0x01, 0x80, 0x91, 0x82, 0x08, 0x41, 0x12, 0x68, 0x91, 0x88, 0x00, 0x07, - 0x91, 0x8c, 0x0f, 0xf8, 0x81, 0x0c, 0x81, 0x0c, 0x81, 0x0c, 0x08, 0x0c, - 0x16, 0xab, 0x68, 0x27, 0x00, 0x01, 0x81, 0x09, 0x1d, 0xd0, 0x04, 0xd9, - 0x68, 0x27, 0x00, 0x02, 0x04, 0xc1, 0x68, 0x04, 0x90, 0x05, 0x11, 0x30, - 0x68, 0x2c, 0xd0, 0xe4, 0x15, 0x00, 0x68, 0x04, 0x90, 0x05, 0x0d, 0xe8, - 0x79, 0xb8, 0xd1, 0xec, 0x11, 0x30, 0x08, 0xc0, 0x08, 0x0c, 0x82, 0xb8, - 0x08, 0x0c, 0x1b, 0x1e, 0x00, 0x90, 0x78, 0x27, 0x00, 0x15, 0x78, 0x2b, - 0x00, 0x00, 0x78, 0x27, 0x00, 0x18, 0x78, 0x2b, 0x00, 0x00, 0x20, 0x01, - 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, 0x20, 0x01, 0x03, 0x07, 0x20, 0x03, - 0x03, 0x00, 0x78, 0x03, 0x00, 0x01, 0x00, 0xde, 0x00, 0x05, 0x68, 0x2c, - 0x90, 0x84, 0x54, 0x00, 0x90, 0x86, 0x54, 0x00, 0x0d, 0x30, 0x78, 0x27, - 0x00, 0x15, 0x78, 0x2b, 0x00, 0x00, 0x78, 0x03, 0x00, 0x01, 0x68, 0x00, - 0x90, 0x85, 0x18, 0x00, 0x68, 0x02, 0x00, 0xde, 0x00, 0x05, 0x68, 0x24, - 0x90, 0x84, 0x00, 0x03, 0x1d, 0xe0, 0x00, 0x05, 0x20, 0x01, 0x00, 0x30, - 0x2c, 0x08, 0x62, 0x1c, 0x00, 0x21, 0x78, 0x30, 0x90, 0x86, 0x00, 0x41, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x79, 0x03, 0x00, 0x00, 0x06, - 0x20, 0x71, 0x1a, 0x6e, 0x70, 0x08, 0x90, 0x05, 0x11, 0x10, 0x78, 0xe3, - 0x0c, 0x0c, 0x80, 0x00, 0x70, 0x0a, 0x00, 0x26, 0x20, 0x11, 0x00, 0x06, - 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x50, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, - 0x08, 0x0c, 0x13, 0xd4, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x82, 0x11, - 0x1d, 0x98, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0x06, 0x78, 0x32, 0x79, 0x36, - 0x7a, 0x3a, 0x78, 0x1b, 0x80, 0x80, 0x00, 0xb9, 0x11, 0x78, 0x20, 0x71, - 0x1a, 0x6e, 0x70, 0x08, 0x90, 0x05, 0x01, 0x30, 0x80, 0x01, 0x0a, 0x0c, - 0x0d, 0x85, 0x70, 0x0a, 0x78, 0xe3, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x0e, 0x79, 0x2c, 0x39, 0x00, 0x80, 0x00, - 0x20, 0x04, 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x09, 0xff, 0x00, 0x81, 0x09, - 0x01, 0x20, 0x78, 0x18, 0xd0, 0xbc, 0x1d, 0xd8, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x78, 0x32, 0x79, 0x36, 0x7a, 0x3a, 0x78, 0x1b, - 0x80, 0x80, 0x0c, 0x79, 0x11, 0x08, 0x00, 0x05, 0x79, 0x2c, 0x39, 0x00, - 0x80, 0x00, 0x20, 0x04, 0x08, 0x0c, 0x0d, 0x85, 0x70, 0x37, 0x00, 0x01, - 0x71, 0x50, 0x70, 0x37, 0x00, 0x02, 0x70, 0x50, 0x20, 0x60, 0xd1, 0xbc, - 0x11, 0x10, 0x70, 0x54, 0x20, 0x60, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, - 0x05, 0x00, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x46, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x00, 0x70, 0x37, 0x00, 0x02, - 0x70, 0x58, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, 0x00, 0xbc, - 0x11, 0x58, 0x20, 0x21, 0x1a, 0x7e, 0x24, 0x04, 0x80, 0x00, 0x02, 0x08, - 0x20, 0x22, 0x08, 0x0c, 0x82, 0xb8, 0x08, 0x0c, 0x1b, 0x1e, 0x90, 0x06, - 0x00, 0xee, 0x00, 0x4e, 0x00, 0x0e, 0x00, 0x05, 0x0c, 0x11, 0x11, 0x08, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x71, 0x02, 0x00, 0x08, 0x41, - 0x61, 0x24, 0xd1, 0xdc, 0x01, 0xf8, 0x70, 0x1c, 0xd0, 0x8c, 0x09, 0x04, - 0x17, 0xa2, 0x70, 0x17, 0x00, 0x00, 0x20, 0x01, 0x02, 0x64, 0x20, 0x04, - 0xd0, 0xbc, 0x09, 0x04, 0x17, 0xa2, 0x20, 0x01, 0x02, 0x68, 0x00, 0xc6, - 0x20, 0x64, 0x61, 0x04, 0x60, 0x38, 0x00, 0xce, 0x91, 0x8e, 0x00, 0x39, - 0x19, 0x04, 0x17, 0xa2, 0x9c, 0x06, 0x15, 0xf0, 0x01, 0x26, 0x20, 0x91, - 0x26, 0x00, 0x08, 0x0c, 0x82, 0x10, 0x01, 0x2e, 0x73, 0x58, 0x74, 0x5c, - 0x60, 0x14, 0x90, 0x5d, 0x05, 0x98, 0x2b, 0x48, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x19, 0x0c, 0xd2, 0xf9, - 0xab, 0x42, 0xac, 0x3e, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0xb4, - 0x11, 0x70, 0x60, 0x1c, 0xd0, 0xe4, 0x11, 0x58, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x11, 0x20, 0xa8, 0x3b, - 0x7f, 0xff, 0xa8, 0x37, 0xff, 0xff, 0x08, 0x0c, 0x1e, 0xe1, 0x11, 0x90, - 0x08, 0x0c, 0x19, 0x9f, 0x2a, 0x00, 0xa8, 0x16, 0x01, 0x30, 0x28, 0x00, - 0xa8, 0x0e, 0x2c, 0x05, 0xa8, 0x0a, 0x2c, 0x00, 0xa8, 0x12, 0x70, 0x37, - 0x00, 0x20, 0x78, 0x1f, 0x03, 0x00, 0x00, 0x1e, 0x00, 0xee, 0x00, 0x05, - 0x70, 0x37, 0x00, 0x50, 0x70, 0x37, 0x00, 0x20, 0x00, 0x1e, 0x00, 0xee, - 0x08, 0x0c, 0x16, 0x48, 0x00, 0x05, 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x01, - 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x19, 0x0c, 0x6c, 0xcc, 0x2c, 0xf0, - 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, 0x00, 0x16, 0x00, 0xc6, 0x3e, 0x60, - 0x60, 0x14, 0x20, 0x48, 0x29, 0x40, 0x90, 0x3e, 0x27, 0x30, 0xa8, 0x64, - 0x20, 0x68, 0xa8, 0x1a, 0x9d, 0x84, 0x00, 0x0f, 0x90, 0x88, 0x1e, 0xc1, - 0x21, 0x65, 0x00, 0x02, 0x17, 0xdf, 0x18, 0x4d, 0x17, 0xdf, 0x17, 0xdf, - 0x17, 0xe3, 0x18, 0x2e, 0x17, 0xdf, 0x18, 0x03, 0x17, 0xd8, 0x18, 0x44, - 0x17, 0xdf, 0x17, 0xdf, 0x17, 0xe8, 0x19, 0x3a, 0x18, 0x17, 0x18, 0x0d, - 0xa9, 0x64, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x8e, 0x00, 0x48, 0x09, 0x04, - 0x18, 0x44, 0x90, 0x85, 0x00, 0x01, 0x08, 0x04, 0x19, 0x30, 0xa8, 0x7c, - 0xd0, 0xac, 0x0d, 0xc8, 0x08, 0x04, 0x18, 0x54, 0xa8, 0x7c, 0xd0, 0xac, - 0x0d, 0xa0, 0x08, 0x04, 0x18, 0xbf, 0xa8, 0x98, 0x90, 0x1d, 0x11, 0x08, - 0xab, 0x9c, 0x90, 0x16, 0xaa, 0xb2, 0xaa, 0x3e, 0xaa, 0x42, 0x3e, 0x00, - 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x80, 0x95, 0x36, 0x20, 0x05, - 0x90, 0x05, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0x04, 0xa8, 0xae, 0x08, 0x04, - 0x19, 0x18, 0xa8, 0x7c, 0xd0, 0xbc, 0x09, 0xc8, 0xa8, 0x90, 0xa8, 0x42, - 0xa8, 0x8c, 0xa8, 0x3e, 0xa8, 0x88, 0x08, 0x04, 0x18, 0x54, 0xa8, 0x7c, - 0xd0, 0xbc, 0x09, 0x78, 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x8c, 0xa8, 0x3e, - 0xa8, 0x88, 0x08, 0x04, 0x18, 0xbf, 0xa8, 0x7c, 0xd0, 0xbc, 0x09, 0x28, - 0xa8, 0x90, 0xa8, 0x42, 0xa8, 0x8c, 0xa8, 0x3e, 0xa8, 0x04, 0x90, 0x45, - 0x09, 0x0c, 0x0d, 0x85, 0xa1, 0x64, 0xa9, 0x1a, 0x91, 0xec, 0x00, 0x0f, - 0x9d, 0x80, 0x1e, 0xc1, 0x20, 0x65, 0xa8, 0x88, 0xd1, 0x9c, 0x19, 0x04, - 0x18, 0xbf, 0x04, 0x30, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, 0x17, 0xdf, - 0xa8, 0x04, 0x90, 0x45, 0x09, 0x0c, 0x0d, 0x85, 0xa1, 0x64, 0xa9, 0x1a, - 0x91, 0xec, 0x00, 0x0f, 0x9d, 0x80, 0x1e, 0xc1, 0x20, 0x65, 0x90, 0x06, - 0xa8, 0x42, 0xa8, 0x3e, 0xd1, 0x9c, 0x19, 0x04, 0x18, 0xbf, 0x00, 0x80, - 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, 0x17, 0xdf, 0x90, 0x06, 0xa8, 0x42, - 0xa8, 0x3e, 0x08, 0x04, 0x18, 0xbf, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, - 0x17, 0xdf, 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0x2c, 0x05, 0x90, 0x8a, - 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, - 0x18, 0x77, 0x18, 0x77, 0x18, 0x79, 0x18, 0x77, 0x18, 0x77, 0x18, 0x77, - 0x18, 0x83, 0x18, 0x77, 0x18, 0x77, 0x18, 0x77, 0x18, 0x8d, 0x18, 0x77, - 0x18, 0x77, 0x18, 0x77, 0x18, 0x97, 0x18, 0x77, 0x18, 0x77, 0x18, 0x77, - 0x18, 0xa1, 0x18, 0x77, 0x18, 0x77, 0x18, 0x77, 0x18, 0xab, 0x18, 0x77, - 0x18, 0x77, 0x18, 0x77, 0x18, 0xb5, 0x08, 0x0c, 0x0d, 0x85, 0xa5, 0x74, - 0xa4, 0x78, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xed, 0xa3, 0x7c, - 0xa2, 0x80, 0x08, 0x04, 0x19, 0x18, 0xa5, 0x84, 0xa4, 0x88, 0x9d, 0x86, - 0x00, 0x24, 0x09, 0x04, 0x17, 0xed, 0xa3, 0x8c, 0xa2, 0x90, 0x08, 0x04, - 0x19, 0x18, 0xa5, 0x94, 0xa4, 0x98, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, - 0x17, 0xed, 0xa3, 0x9c, 0xa2, 0xa0, 0x08, 0x04, 0x19, 0x18, 0xa5, 0xa4, - 0xa4, 0xa8, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xed, 0xa3, 0xac, - 0xa2, 0xb0, 0x08, 0x04, 0x19, 0x18, 0xa5, 0xb4, 0xa4, 0xb8, 0x9d, 0x86, - 0x00, 0x24, 0x09, 0x04, 0x17, 0xed, 0xa3, 0xbc, 0xa2, 0xc0, 0x08, 0x04, - 0x19, 0x18, 0xa5, 0xc4, 0xa4, 0xc8, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, - 0x17, 0xed, 0xa3, 0xcc, 0xa2, 0xd0, 0x08, 0x04, 0x19, 0x18, 0xa5, 0xd4, - 0xa4, 0xd8, 0x9d, 0x86, 0x00, 0x24, 0x09, 0x04, 0x17, 0xed, 0xa3, 0xdc, - 0xa2, 0xe0, 0x08, 0x04, 0x19, 0x18, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, - 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x18, 0xe2, - 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xed, - 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xf8, - 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x19, 0x03, - 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x18, 0xe0, 0x19, 0x0e, - 0x08, 0x0c, 0x0d, 0x85, 0xa5, 0x6c, 0xa4, 0x70, 0xa7, 0x74, 0xa6, 0x78, - 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, 0x17, 0xed, 0xa3, 0x7c, 0xa2, 0x80, - 0x04, 0x58, 0xa5, 0x84, 0xa4, 0x88, 0xa7, 0x8c, 0xa6, 0x90, 0x9d, 0x86, - 0x00, 0x2c, 0x09, 0x04, 0x17, 0xed, 0xa3, 0x94, 0xa2, 0x98, 0x04, 0x00, - 0xa5, 0x9c, 0xa4, 0xa0, 0xa7, 0xa4, 0xa6, 0xa8, 0x9d, 0x86, 0x00, 0x2c, - 0x09, 0x04, 0x17, 0xed, 0xa3, 0xac, 0xa2, 0xb0, 0x00, 0xa8, 0xa5, 0xb4, - 0xa4, 0xb8, 0xa7, 0xbc, 0xa6, 0xc0, 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, - 0x17, 0xed, 0xa3, 0xc4, 0xa2, 0xc8, 0x00, 0x50, 0xa5, 0xcc, 0xa4, 0xd0, - 0xa7, 0xd4, 0xa6, 0xd8, 0x9d, 0x86, 0x00, 0x2c, 0x09, 0x04, 0x17, 0xed, - 0xa3, 0xdc, 0xa2, 0xe0, 0xab, 0x2e, 0xaa, 0x32, 0xad, 0x1e, 0xac, 0x22, - 0xaf, 0x26, 0xae, 0x2a, 0xa9, 0x88, 0x8c, 0x60, 0x2c, 0x1d, 0xa8, 0xac, - 0xaa, 0xb0, 0xa8, 0x36, 0xaa, 0x3a, 0x81, 0x09, 0xa9, 0x16, 0x11, 0x60, - 0x3e, 0x60, 0x60, 0x1c, 0xc0, 0x85, 0x60, 0x1e, 0xa8, 0x7c, 0xc0, 0xdd, - 0xa8, 0x7e, 0x90, 0x06, 0x00, 0xce, 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, - 0x28, 0x00, 0xa8, 0x0e, 0xab, 0x0a, 0x2c, 0x00, 0xa8, 0x12, 0x0c, 0x70, - 0x08, 0x04, 0x17, 0xdf, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x19, 0x0c, 0x6c, 0xcc, 0x2f, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x22, 0x00, - 0x00, 0x16, 0x00, 0xc6, 0x3e, 0x60, 0x60, 0x14, 0x20, 0x48, 0x29, 0x40, - 0xa8, 0x0e, 0x20, 0x61, 0x1e, 0xbc, 0xa8, 0x13, 0x1e, 0xbc, 0x2c, 0x05, - 0xa8, 0x0a, 0xa9, 0x64, 0xa9, 0x1a, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x0c, - 0x0d, 0x85, 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0x2c, 0x05, 0x90, 0x8a, - 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0x85, 0xad, 0xcc, 0xac, 0xd0, 0xaf, 0xd4, - 0xae, 0xd8, 0xab, 0xdc, 0xaa, 0xe0, 0xab, 0x2e, 0xaa, 0x32, 0xad, 0x1e, - 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, 0xa8, 0xac, 0xaa, 0xb0, 0xa8, 0x36, - 0xaa, 0x3a, 0xa9, 0x88, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x08, 0x11, 0x20, 0x81, 0x09, 0xa9, 0x16, 0x01, 0x28, 0x00, 0x80, - 0x91, 0x8a, 0x00, 0x02, 0xa9, 0x16, 0x11, 0x60, 0x3e, 0x60, 0x60, 0x1c, - 0xc0, 0x85, 0x60, 0x1e, 0xa8, 0x7c, 0xc0, 0xdd, 0xa8, 0x7e, 0x90, 0x06, - 0x00, 0xce, 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, 0xa8, 0x04, 0x90, 0x45, - 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x0e, 0xa0, 0x64, 0xa8, 0x1a, 0x90, 0x84, - 0x00, 0x0f, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x15, 0x82, 0xff, 0x09, 0x0c, - 0x0d, 0x85, 0xaa, 0x12, 0x22, 0x05, 0xa8, 0x0a, 0x0c, 0x08, 0x90, 0x3e, - 0x27, 0x30, 0xa8, 0x80, 0xd0, 0xfc, 0x11, 0x90, 0x2d, 0x00, 0x00, 0x02, - 0x1a, 0x94, 0x19, 0xf6, 0x19, 0xf6, 0x1a, 0x94, 0x1a, 0x94, 0x1a, 0x8e, - 0x1a, 0x94, 0x19, 0xf6, 0x1a, 0x45, 0x1a, 0x45, 0x1a, 0x45, 0x1a, 0x94, - 0x1a, 0x94, 0x1a, 0x94, 0x1a, 0x8b, 0x1a, 0x45, 0xc0, 0xfc, 0xa8, 0x82, - 0xab, 0x2c, 0xaa, 0x30, 0xad, 0x1c, 0xac, 0x20, 0xdd, 0x9c, 0x09, 0x04, - 0x1a, 0x96, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0x85, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x19, 0xe2, 0x19, 0xe0, 0x19, 0xe0, - 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xe6, 0x19, 0xe0, 0x19, 0xe0, - 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xea, 0x19, 0xe0, 0x19, 0xe0, - 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xee, 0x19, 0xe0, 0x19, 0xe0, - 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xe0, 0x19, 0xf2, 0x08, 0x0c, 0x0d, 0x85, - 0xa7, 0x74, 0xa6, 0x78, 0x08, 0x04, 0x1a, 0x96, 0xa7, 0x8c, 0xa6, 0x90, - 0x08, 0x04, 0x1a, 0x96, 0xa7, 0xa4, 0xa6, 0xa8, 0x08, 0x04, 0x1a, 0x96, - 0xa7, 0xbc, 0xa6, 0xc0, 0x08, 0x04, 0x1a, 0x96, 0xa7, 0xd4, 0xa6, 0xd8, - 0x08, 0x04, 0x1a, 0x96, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, - 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1a, 0x19, 0x1a, 0x19, - 0x1a, 0x1b, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x21, 0x1a, 0x19, - 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x27, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x19, - 0x1a, 0x2d, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x33, 0x1a, 0x19, - 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x39, 0x1a, 0x19, 0x1a, 0x19, 0x1a, 0x19, - 0x1a, 0x3f, 0x08, 0x0c, 0x0d, 0x85, 0xa5, 0x74, 0xa4, 0x78, 0xa3, 0x7c, - 0xa2, 0x80, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0x84, 0xa4, 0x88, 0xa3, 0x8c, - 0xa2, 0x90, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0x94, 0xa4, 0x98, 0xa3, 0x9c, - 0xa2, 0xa0, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0xa4, 0xa4, 0xa8, 0xa3, 0xac, - 0xa2, 0xb0, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0xb4, 0xa4, 0xb8, 0xa3, 0xbc, - 0xa2, 0xc0, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0xc4, 0xa4, 0xc8, 0xa3, 0xcc, - 0xa2, 0xd0, 0x08, 0x04, 0x1a, 0x96, 0xa5, 0xd4, 0xa4, 0xd8, 0xa3, 0xdc, - 0xa2, 0xe0, 0x08, 0x04, 0x1a, 0x96, 0x2c, 0x05, 0x90, 0x8a, 0x00, 0x34, - 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1a, 0x68, - 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x6f, - 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x76, - 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x7d, - 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x66, 0x1a, 0x84, - 0x08, 0x0c, 0x0d, 0x85, 0xa5, 0x6c, 0xa4, 0x70, 0xa7, 0x74, 0xa6, 0x78, - 0xa3, 0x7c, 0xa2, 0x80, 0x04, 0x38, 0xa5, 0x84, 0xa4, 0x88, 0xa7, 0x8c, - 0xa6, 0x90, 0xa3, 0x94, 0xa2, 0x98, 0x04, 0x00, 0xa5, 0x9c, 0xa4, 0xa0, - 0xa7, 0xa4, 0xa6, 0xa8, 0xa3, 0xac, 0xa2, 0xb0, 0x00, 0xc8, 0xa5, 0xb4, - 0xa4, 0xb8, 0xa7, 0xbc, 0xa6, 0xc0, 0xa3, 0xc4, 0xa2, 0xc8, 0x00, 0x90, - 0xa5, 0xcc, 0xa4, 0xd0, 0xa7, 0xd4, 0xa6, 0xd8, 0xa3, 0xdc, 0xa2, 0xe0, - 0x00, 0x58, 0x9d, 0x86, 0x00, 0x0e, 0x11, 0x30, 0x08, 0x0c, 0x1e, 0x97, - 0x19, 0x04, 0x19, 0x9f, 0x90, 0x0e, 0x00, 0x50, 0x08, 0x0c, 0x0d, 0x85, - 0xab, 0x2e, 0xaa, 0x32, 0xad, 0x1e, 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, - 0x08, 0x0c, 0x1e, 0x97, 0x00, 0x05, 0x60, 0x14, 0x20, 0x48, 0x61, 0x18, - 0x81, 0xff, 0x01, 0x48, 0x81, 0x0c, 0x81, 0x0c, 0x81, 0x0c, 0x81, 0xff, - 0x11, 0x18, 0xa8, 0x87, 0x00, 0x01, 0x00, 0x08, 0xa9, 0x86, 0x60, 0x1b, - 0x00, 0x02, 0xa8, 0x74, 0x90, 0x84, 0x00, 0xff, 0x90, 0x84, 0x00, 0x08, - 0x01, 0x50, 0x00, 0xe9, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0xa9, 0x74, - 0xd1, 0xdc, 0x11, 0x08, 0x00, 0x05, 0xa9, 0x34, 0xa8, 0x8c, 0x91, 0x06, - 0x11, 0x58, 0xa9, 0x38, 0xa8, 0x90, 0x91, 0x06, 0x11, 0x38, 0x60, 0x1c, - 0xc0, 0x84, 0x60, 0x1e, 0x20, 0x09, 0x00, 0x48, 0x08, 0x04, 0xb2, 0x0a, - 0x00, 0x05, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, 0x22, 0x00, 0x00, 0xce, - 0x79, 0x08, 0x91, 0x8c, 0x00, 0x07, 0x91, 0x86, 0x00, 0x00, 0x05, 0xb0, - 0x91, 0x86, 0x00, 0x03, 0x05, 0x98, 0x60, 0x20, 0x60, 0x23, 0x00, 0x00, - 0x00, 0x06, 0x20, 0x31, 0x00, 0x08, 0x00, 0xc6, 0x78, 0x1f, 0x08, 0x08, - 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x20, 0x08, 0x0c, 0x13, 0xd4, 0x86, 0x31, - 0x1d, 0xb8, 0x00, 0xce, 0x78, 0x1f, 0x08, 0x00, 0x20, 0x31, 0x01, 0x68, - 0x00, 0xc6, 0x78, 0x08, 0xd0, 0x9c, 0x19, 0x0c, 0x13, 0xd4, 0x00, 0xce, - 0x20, 0x01, 0x00, 0x38, 0x08, 0x0c, 0x1b, 0xae, 0x79, 0x30, 0x91, 0x86, - 0x00, 0x40, 0x01, 0x60, 0x91, 0x86, 0x00, 0x42, 0x19, 0x0c, 0x0d, 0x85, - 0x20, 0x01, 0x00, 0x1e, 0x80, 0x01, 0x1d, 0xf0, 0x86, 0x31, 0x1d, 0x40, - 0x08, 0x0c, 0x1b, 0xbd, 0x00, 0x0e, 0x60, 0x22, 0x01, 0x2e, 0x00, 0x05, - 0x08, 0x0c, 0x1b, 0xaa, 0x78, 0x27, 0x00, 0x15, 0x78, 0x28, 0x9c, 0x06, - 0x1d, 0xb8, 0x78, 0x2b, 0x00, 0x00, 0x0c, 0xa0, 0x00, 0xf6, 0x20, 0x79, - 0x03, 0x00, 0x78, 0x03, 0x00, 0x00, 0x78, 0xab, 0x00, 0x04, 0x20, 0x01, - 0xf0, 0x00, 0x80, 0x01, 0x09, 0x0c, 0x0d, 0x85, 0x7a, 0xac, 0xd2, 0xac, - 0x1d, 0xd0, 0x00, 0xfe, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x88, 0x20, 0x01, - 0x01, 0x38, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x01, 0x60, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x11, 0x01, 0x2c, 0xa0, 0x01, 0xa0, 0x01, 0x82, 0x11, - 0x1d, 0xe0, 0x00, 0x59, 0x08, 0x04, 0x78, 0x40, 0x04, 0x79, 0x00, 0x39, - 0x20, 0x01, 0x01, 0x60, 0x25, 0x02, 0x20, 0x01, 0x01, 0x38, 0x22, 0x02, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x00, 0x08, 0x0c, 0x2a, 0x8b, - 0x20, 0x09, 0x00, 0x3c, 0x08, 0x0c, 0x22, 0x20, 0x20, 0x01, 0x01, 0x5d, - 0x20, 0x03, 0x00, 0x00, 0x70, 0x00, 0x90, 0x84, 0x00, 0x3c, 0x1d, 0xe0, - 0x08, 0x0c, 0x88, 0x99, 0x70, 0xa0, 0x70, 0xa2, 0x70, 0x98, 0x70, 0x9a, - 0x70, 0x9c, 0x70, 0x9e, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, 0x00, 0x20, - 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x08, 0x0c, 0x13, 0x66, 0x78, 0x03, - 0x00, 0x01, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x01, 0x38, - 0x20, 0x14, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x01, 0x60, 0x20, 0x2c, - 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x08, 0x00, 0x05, - 0x20, 0x21, 0x02, 0x60, 0x20, 0x01, 0x01, 0x41, 0x20, 0x1c, 0xd3, 0xdc, - 0x11, 0x68, 0x20, 0x01, 0x01, 0x09, 0x20, 0x1c, 0x93, 0x9c, 0x00, 0x48, - 0x11, 0x60, 0x20, 0x01, 0x01, 0x11, 0x20, 0x1c, 0x83, 0xff, 0x11, 0x10, - 0x84, 0x21, 0x1d, 0x70, 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, - 0x00, 0x05, 0x00, 0x46, 0x20, 0x21, 0x00, 0x19, 0x20, 0x03, 0x00, 0x48, - 0xa0, 0x01, 0xa0, 0x01, 0x20, 0x1c, 0x93, 0x9c, 0x00, 0x48, 0x01, 0x20, - 0x84, 0x21, 0x1d, 0xb0, 0x00, 0x4e, 0x0c, 0x60, 0x00, 0x4e, 0x0c, 0x40, - 0x60, 0x1c, 0xc0, 0x84, 0x60, 0x1e, 0x00, 0x05, 0x2c, 0x08, 0x62, 0x1c, - 0x08, 0x0c, 0x16, 0xb9, 0x79, 0x30, 0x00, 0x05, 0x2c, 0x08, 0x62, 0x1c, - 0x08, 0x0c, 0x17, 0x02, 0x79, 0x30, 0x00, 0x05, 0x80, 0x01, 0x1d, 0xf0, - 0x00, 0x05, 0x20, 0x31, 0x00, 0x64, 0x78, 0x1c, 0x90, 0x84, 0x00, 0x07, - 0x01, 0x70, 0x20, 0x01, 0x00, 0x38, 0x0c, 0x41, 0x91, 0x86, 0x00, 0x40, - 0x09, 0x04, 0x1c, 0x1b, 0x20, 0x01, 0x00, 0x1e, 0x0c, 0x69, 0x86, 0x31, - 0x1d, 0x80, 0x08, 0x0c, 0x0d, 0x85, 0x78, 0x1f, 0x02, 0x02, 0x20, 0x01, - 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x0d, 0xac, 0x0c, 0x01, - 0x78, 0x1c, 0xd0, 0x84, 0x01, 0x10, 0x08, 0x61, 0x04, 0xe0, 0x20, 0x01, - 0x00, 0x30, 0x08, 0x91, 0x91, 0x86, 0x00, 0x40, 0x05, 0x68, 0x78, 0x1c, - 0xd0, 0x84, 0x1d, 0xa8, 0x78, 0x1f, 0x01, 0x01, 0x20, 0x01, 0x00, 0x14, - 0x08, 0x69, 0x20, 0x01, 0x00, 0x37, 0x08, 0x21, 0x91, 0x86, 0x00, 0x40, - 0x01, 0x40, 0x20, 0x01, 0x00, 0x30, 0x08, 0x0c, 0x1b, 0xb4, 0x91, 0x86, - 0x00, 0x40, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, - 0x69, 0x2c, 0xd1, 0xf4, 0x11, 0x70, 0xd1, 0xc4, 0x01, 0x60, 0xd1, 0x9c, - 0x01, 0x30, 0x68, 0x00, 0x90, 0x85, 0x18, 0x00, 0x68, 0x02, 0x00, 0xde, - 0x00, 0x80, 0x69, 0x08, 0x91, 0x84, 0x00, 0x07, 0x1d, 0xb0, 0x00, 0xde, - 0x78, 0x1f, 0x01, 0x00, 0x79, 0x1c, 0x91, 0x84, 0x00, 0x07, 0x09, 0x0c, - 0x0d, 0x85, 0xa0, 0x01, 0xa0, 0x01, 0x78, 0x1f, 0x02, 0x00, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, 0x20, 0x79, 0x03, 0x80, 0x20, 0x01, - 0x19, 0xe8, 0x20, 0x70, 0x01, 0x2e, 0x00, 0x05, 0x2c, 0xf0, 0x01, 0x26, - 0x20, 0x91, 0x24, 0x00, 0x3e, 0x60, 0x60, 0x14, 0x20, 0x48, 0xa9, 0x64, - 0xa9, 0x1a, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x84, 0x00, 0x0f, 0x00, 0x02, - 0x1c, 0x50, 0x1c, 0x50, 0x1c, 0x50, 0x1c, 0x52, 0x1c, 0x50, 0x1c, 0x50, - 0x1c, 0x50, 0x1c, 0x50, 0x1c, 0x44, 0x1c, 0x5a, 0x1c, 0x50, 0x1c, 0x56, - 0x1c, 0x50, 0x1c, 0x50, 0x1c, 0x50, 0x1c, 0x50, 0x90, 0x86, 0x00, 0x08, - 0x11, 0x48, 0xa8, 0x7c, 0xd0, 0xb4, 0x09, 0x04, 0x1d, 0xca, 0x20, 0x11, - 0x1e, 0xbc, 0x22, 0x05, 0xab, 0x88, 0x00, 0xa8, 0x08, 0x0c, 0x0d, 0x85, - 0x91, 0x86, 0x00, 0x13, 0x01, 0x28, 0x0c, 0xd0, 0x91, 0x86, 0x00, 0x1b, - 0x01, 0x08, 0x0c, 0xb0, 0xa8, 0x7c, 0xd0, 0xb4, 0x09, 0x04, 0x1d, 0xca, - 0x91, 0x84, 0x00, 0x0f, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x15, 0x22, 0x05, - 0xab, 0x88, 0x29, 0x08, 0xa8, 0x0a, 0xa9, 0x0e, 0xaa, 0x12, 0xab, 0x16, - 0x90, 0x06, 0xa8, 0x42, 0xa8, 0x3e, 0x01, 0x2e, 0x00, 0x05, 0x2c, 0xf0, - 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, 0x3e, 0x60, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x8c, 0xa9, 0x90, 0xaa, 0xac, 0xab, 0xb0, 0xaa, 0x36, 0xab, 0x3a, - 0xa8, 0x3e, 0xa9, 0x42, 0xa8, 0x46, 0xa9, 0x4a, 0xa9, 0x64, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x86, 0x00, 0x1e, 0x01, 0x98, 0x29, 0x40, 0xa0, 0x64, - 0xa8, 0x1a, 0x90, 0xec, 0x00, 0x0f, 0x9d, 0x80, 0x1e, 0xc1, 0x20, 0x65, - 0x2c, 0x05, 0x28, 0x08, 0x2c, 0x10, 0xab, 0x88, 0xa8, 0x0a, 0xa9, 0x0e, - 0xaa, 0x12, 0xab, 0x16, 0x01, 0x2e, 0x3e, 0x60, 0x00, 0x05, 0xa8, 0x04, - 0x20, 0x40, 0x0c, 0x58, 0x2c, 0xf0, 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, - 0x3e, 0x60, 0x60, 0x14, 0x20, 0x48, 0xa9, 0x7c, 0x29, 0x50, 0xd1, 0xdc, - 0x19, 0x04, 0x1d, 0x94, 0xc1, 0xdd, 0xa9, 0x7e, 0x90, 0x06, 0xa8, 0x42, - 0xa8, 0x3e, 0xa9, 0x88, 0x81, 0x09, 0xa9, 0x16, 0xa9, 0x64, 0xa9, 0x1a, - 0x91, 0x84, 0x00, 0x0f, 0x90, 0x88, 0x1e, 0xc1, 0x21, 0x45, 0x00, 0x02, - 0x1c, 0xc8, 0x1c, 0xd6, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0xca, - 0x1c, 0xc8, 0x1c, 0xc8, 0x1d, 0x2b, 0x1d, 0x2b, 0x1c, 0xc8, 0x1c, 0xc8, - 0x1c, 0xc8, 0x1d, 0x29, 0x1c, 0xc8, 0x1c, 0xc8, 0x08, 0x0c, 0x0d, 0x85, - 0xa8, 0x04, 0x20, 0x50, 0xb1, 0x64, 0xa9, 0x1a, 0x91, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x45, 0xd1, 0x9c, 0x19, 0x04, 0x1d, 0x2b, - 0x90, 0x36, 0x26, 0x38, 0x28, 0x05, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, - 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1c, 0xfb, 0x1c, 0xfb, - 0x1c, 0xfd, 0x1c, 0xfb, 0x1c, 0xfb, 0x1c, 0xfb, 0x1d, 0x03, 0x1c, 0xfb, - 0x1c, 0xfb, 0x1c, 0xfb, 0x1d, 0x09, 0x1c, 0xfb, 0x1c, 0xfb, 0x1c, 0xfb, - 0x1d, 0x0f, 0x1c, 0xfb, 0x1c, 0xfb, 0x1c, 0xfb, 0x1d, 0x15, 0x1c, 0xfb, - 0x1c, 0xfb, 0x1c, 0xfb, 0x1d, 0x1b, 0x1c, 0xfb, 0x1c, 0xfb, 0x1c, 0xfb, - 0x1d, 0x21, 0x08, 0x0c, 0x0d, 0x85, 0xb5, 0x74, 0xb4, 0x78, 0xb3, 0x7c, - 0xb2, 0x80, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0x84, 0xb4, 0x88, 0xb3, 0x8c, - 0xb2, 0x90, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0x94, 0xb4, 0x98, 0xb3, 0x9c, - 0xb2, 0xa0, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0xa4, 0xb4, 0xa8, 0xb3, 0xac, - 0xb2, 0xb0, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0xb4, 0xb4, 0xb8, 0xb3, 0xbc, - 0xb2, 0xc0, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0xc4, 0xb4, 0xc8, 0xb3, 0xcc, - 0xb2, 0xd0, 0x08, 0x04, 0x1d, 0x70, 0xb5, 0xd4, 0xb4, 0xd8, 0xb3, 0xdc, - 0xb2, 0xe0, 0x08, 0x04, 0x1d, 0x70, 0x08, 0x04, 0x1d, 0x70, 0x08, 0x0c, - 0x0d, 0x85, 0x28, 0x05, 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0x85, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1d, 0x4e, 0x1d, 0x4c, 0x1d, 0x4c, - 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x55, 0x1d, 0x4c, 0x1d, 0x4c, - 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x5c, 0x1d, 0x4c, 0x1d, 0x4c, - 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x63, 0x1d, 0x4c, 0x1d, 0x4c, - 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x4c, 0x1d, 0x6a, 0x08, 0x0c, 0x0d, 0x85, - 0xb5, 0x6c, 0xb4, 0x70, 0xb7, 0x74, 0xb6, 0x78, 0xb3, 0x7c, 0xb2, 0x80, - 0x00, 0xd8, 0xb5, 0x84, 0xb4, 0x88, 0xb7, 0x8c, 0xb6, 0x90, 0xb3, 0x94, - 0xb2, 0x98, 0x00, 0xa0, 0xb5, 0x9c, 0xb4, 0xa0, 0xb7, 0xa4, 0xb6, 0xa8, - 0xb3, 0xac, 0xb2, 0xb0, 0x00, 0x68, 0xb5, 0xb4, 0xb4, 0xb8, 0xb7, 0xbc, - 0xb6, 0xc0, 0xb3, 0xc4, 0xb2, 0xc8, 0x00, 0x30, 0xb5, 0xcc, 0xb4, 0xd0, - 0xb7, 0xd4, 0xb6, 0xd8, 0xb3, 0xdc, 0xb2, 0xe0, 0xab, 0x2e, 0xaa, 0x32, - 0xad, 0x1e, 0xac, 0x22, 0xaf, 0x26, 0xae, 0x2a, 0xa9, 0x88, 0x81, 0x09, - 0xa9, 0x16, 0x11, 0x18, 0x90, 0x06, 0x01, 0x2e, 0x00, 0x05, 0x88, 0x40, - 0x28, 0x05, 0x90, 0x05, 0x11, 0x68, 0xb0, 0x04, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0x85, 0x20, 0x50, 0xb1, 0x64, 0xa9, 0x1a, 0x91, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x45, 0x28, 0x05, 0x28, 0x10, 0x2a, 0x08, - 0xa8, 0x0a, 0xa9, 0x0e, 0xaa, 0x12, 0x0c, 0x30, 0x3e, 0x60, 0x63, 0x44, - 0xd3, 0xfc, 0x19, 0x0c, 0x0d, 0x85, 0xa9, 0x3c, 0xaa, 0x40, 0xa8, 0x44, - 0x91, 0x06, 0x11, 0x18, 0xa8, 0x48, 0x92, 0x06, 0x05, 0x08, 0x29, 0x58, - 0xab, 0x48, 0xac, 0x44, 0x29, 0x40, 0x08, 0x0c, 0x1e, 0xe1, 0x19, 0x98, - 0x28, 0x50, 0x2c, 0x40, 0xab, 0x14, 0xa8, 0x80, 0xd0, 0xfc, 0x11, 0x40, - 0xa8, 0x10, 0x20, 0x05, 0xa8, 0x0a, 0x2a, 0x00, 0xa8, 0x0e, 0x20, 0x09, - 0x80, 0x15, 0x00, 0x70, 0x00, 0xc6, 0x3e, 0x60, 0x60, 0x44, 0xc0, 0xa4, - 0x90, 0x85, 0x80, 0x05, 0x60, 0x46, 0x00, 0xce, 0x83, 0x19, 0xab, 0x16, - 0x19, 0x04, 0x1d, 0x7d, 0x20, 0x09, 0x80, 0x05, 0x3e, 0x60, 0x60, 0x44, - 0x91, 0x05, 0x60, 0x46, 0x08, 0x04, 0x1d, 0x7a, 0x08, 0x0c, 0x0d, 0x85, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x96, 0x00, 0xc6, 0x00, 0x26, 0x70, 0x4c, - 0x9c, 0x06, 0x19, 0x0c, 0x0d, 0x85, 0x20, 0x79, 0x00, 0x90, 0x20, 0x01, - 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x78, 0x2b, 0x00, 0x04, 0x70, 0x57, - 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x18, - 0xa8, 0x80, 0xc0, 0xbd, 0xa8, 0x82, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x70, 0x20, 0x61, 0x01, 0x00, 0x62, 0xc8, 0x20, 0x01, 0x00, 0xfa, - 0x80, 0x01, 0x1d, 0xf0, 0x60, 0xc8, 0x92, 0x06, 0x1d, 0xc0, 0x60, 0xc4, - 0xa8, 0x9a, 0x60, 0xc8, 0xa8, 0x96, 0x70, 0x4c, 0x20, 0x60, 0x00, 0xc6, - 0x08, 0x0c, 0xca, 0xe9, 0x08, 0x0c, 0xac, 0xfc, 0x00, 0xce, 0x70, 0x4c, - 0x9c, 0x06, 0x11, 0x50, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x22, 0x20, - 0x08, 0x0c, 0xa7, 0xa1, 0x20, 0x11, 0x00, 0x00, 0x08, 0x0c, 0xa6, 0x35, - 0x00, 0x2e, 0x00, 0xce, 0x00, 0x9e, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x90, 0x78, 0x1c, 0x00, 0x06, 0x78, 0x18, - 0x00, 0x06, 0x20, 0x79, 0x01, 0x00, 0x7a, 0x14, 0x92, 0x84, 0x19, 0x84, - 0x90, 0x85, 0x00, 0x12, 0x78, 0x16, 0x20, 0x19, 0x10, 0x00, 0x83, 0x19, - 0x09, 0x0c, 0x0d, 0x85, 0x78, 0x20, 0xd0, 0xbc, 0x1d, 0xd0, 0x79, 0xc8, - 0x00, 0x0e, 0x91, 0x02, 0x00, 0x1e, 0x00, 0x06, 0x00, 0x16, 0x79, 0xc4, - 0x00, 0x0e, 0x91, 0x03, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, 0x92, 0x84, - 0x19, 0x84, 0x90, 0x85, 0x00, 0x12, 0x78, 0x16, 0x20, 0x79, 0x00, 0x90, - 0x78, 0x2b, 0x00, 0x08, 0x70, 0x57, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x54, 0x90, 0x86, - 0x00, 0x00, 0x09, 0x04, 0x1e, 0x92, 0x20, 0x79, 0x00, 0x90, 0x20, 0x09, - 0x02, 0x07, 0x21, 0x0c, 0xd1, 0x94, 0x01, 0xb8, 0x20, 0x09, 0x02, 0x0c, - 0x21, 0x0c, 0x91, 0x84, 0x00, 0x03, 0x01, 0x88, 0x08, 0x0c, 0xee, 0xfa, - 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0x85, - 0x00, 0x16, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x22, 0x20, 0x00, 0x1e, - 0x20, 0x01, 0x02, 0x0c, 0x21, 0x02, 0x20, 0x09, 0x02, 0x06, 0x21, 0x04, - 0x20, 0x09, 0x02, 0x03, 0x21, 0x0c, 0x91, 0x06, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x40, 0x08, 0x0c, 0x22, 0x20, 0x78, 0x2c, 0xd0, 0xfc, 0x09, 0xa8, - 0x08, 0x0c, 0xad, 0x18, 0x78, 0x2c, 0xd0, 0xfc, 0x1d, 0xe8, 0x08, 0x0c, - 0xac, 0xfc, 0x70, 0x54, 0x90, 0x86, 0x00, 0x00, 0x19, 0x50, 0x78, 0x2b, - 0x00, 0x04, 0x78, 0x2c, 0xd0, 0xac, 0x1d, 0xe8, 0x20, 0x09, 0x00, 0x40, - 0x08, 0x0c, 0x22, 0x20, 0x78, 0x2b, 0x00, 0x02, 0x70, 0x57, 0x00, 0x00, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x08, 0x0c, 0x0d, 0x85, 0x8c, 0x60, - 0x2c, 0x05, 0x90, 0x05, 0x01, 0x10, 0x8a, 0x51, 0x00, 0x05, 0xa0, 0x04, - 0x90, 0x05, 0x01, 0x68, 0xa8, 0x5a, 0x20, 0x40, 0xa0, 0x64, 0x90, 0x84, - 0x00, 0x0f, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x65, 0x8c, 0xff, 0x09, 0x0c, - 0x0d, 0x85, 0x8a, 0x51, 0x00, 0x05, 0x20, 0x50, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x1d, 0x00, 0x21, 0x00, 0x25, 0x00, 0x29, 0x00, 0x2d, 0x00, 0x31, - 0x00, 0x35, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x21, 0x00, 0x27, 0x00, 0x2d, - 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x1e, 0xb4, 0x1e, 0xb0, 0x1e, 0xb4, 0x1e, 0xb4, 0x1e, 0xbe, 0x00, 0x00, - 0x1e, 0xb4, 0x1e, 0xbb, 0x1e, 0xbb, 0x1e, 0xb8, 0x1e, 0xbb, 0x1e, 0xbb, - 0x00, 0x00, 0x1e, 0xbe, 0x1e, 0xbb, 0x00, 0x00, 0x1e, 0xb6, 0x1e, 0xb6, - 0x00, 0x00, 0x1e, 0xb6, 0x1e, 0xbe, 0x00, 0x00, 0x1e, 0xb6, 0x1e, 0xbc, - 0x1e, 0xbc, 0x1e, 0xbc, 0x00, 0x00, 0x1e, 0xbc, 0x00, 0x00, 0x1e, 0xbe, - 0x1e, 0xbc, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0x86, 0xab, 0x42, 0xac, 0x3e, - 0xa8, 0x88, 0x90, 0x55, 0x09, 0x04, 0x20, 0xc0, 0x29, 0x40, 0xa0, 0x64, - 0x90, 0xec, 0x00, 0x0f, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x08, - 0x11, 0x18, 0x20, 0x61, 0x1e, 0xbc, 0x00, 0xd0, 0x9d, 0xe0, 0x1e, 0xc1, - 0x9d, 0x86, 0x00, 0x07, 0x01, 0x30, 0x9d, 0x86, 0x00, 0x0e, 0x01, 0x18, - 0x9d, 0x86, 0x00, 0x0f, 0x11, 0x20, 0xa0, 0x8c, 0x94, 0x22, 0xa0, 0x90, - 0x93, 0x1b, 0x2c, 0x05, 0x90, 0x65, 0x11, 0x40, 0x03, 0x10, 0x08, 0x04, - 0x20, 0xc0, 0xa0, 0x04, 0x90, 0x45, 0x09, 0x04, 0x20, 0xc0, 0x08, 0xd8, - 0x2c, 0x05, 0x90, 0x05, 0x09, 0x04, 0x1f, 0xa8, 0xdd, 0x9c, 0x19, 0x04, - 0x1f, 0x64, 0x90, 0x8a, 0x00, 0x36, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x3b, 0x1f, 0x39, - 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x41, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x39, - 0x1f, 0x47, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x4d, 0x1f, 0x39, - 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x53, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x39, - 0x1f, 0x59, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x39, 0x1f, 0x5f, 0x08, 0x0c, - 0x0d, 0x85, 0xa0, 0x7c, 0x94, 0x22, 0xa0, 0x80, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0x8c, 0x94, 0x22, 0xa0, 0x90, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0x9c, 0x94, 0x22, 0xa0, 0xa0, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0xac, 0x94, 0x22, 0xa0, 0xb0, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0xbc, 0x94, 0x22, 0xa0, 0xc0, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0xcc, 0x94, 0x22, 0xa0, 0xd0, 0x93, 0x1b, 0x08, 0x04, - 0x1f, 0x9e, 0xa0, 0xdc, 0x94, 0x22, 0xa0, 0xe0, 0x93, 0x1b, 0x04, 0xd0, - 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, - 0x00, 0x02, 0x1f, 0x86, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, - 0x1f, 0x84, 0x1f, 0x8b, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, - 0x1f, 0x84, 0x1f, 0x90, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, - 0x1f, 0x84, 0x1f, 0x95, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, 0x1f, 0x84, - 0x1f, 0x84, 0x1f, 0x9a, 0x08, 0x0c, 0x0d, 0x85, 0xa0, 0x7c, 0x94, 0x22, - 0xa0, 0x80, 0x93, 0x1b, 0x00, 0x98, 0xa0, 0x94, 0x94, 0x22, 0xa0, 0x98, - 0x93, 0x1b, 0x00, 0x70, 0xa0, 0xac, 0x94, 0x22, 0xa0, 0xb0, 0x93, 0x1b, - 0x00, 0x48, 0xa0, 0xc4, 0x94, 0x22, 0xa0, 0xc8, 0x93, 0x1b, 0x00, 0x20, - 0xa0, 0xdc, 0x94, 0x22, 0xa0, 0xe0, 0x93, 0x1b, 0x06, 0x30, 0x23, 0x00, - 0x94, 0x05, 0x01, 0x60, 0x8a, 0x51, 0x09, 0x04, 0x20, 0xc0, 0x8c, 0x60, - 0x08, 0x04, 0x1f, 0x10, 0xa0, 0x04, 0x90, 0x45, 0x09, 0x04, 0x20, 0xc0, - 0x08, 0x04, 0x1e, 0xeb, 0x8a, 0x51, 0x09, 0x04, 0x20, 0xc0, 0x8c, 0x60, - 0x2c, 0x05, 0x90, 0x05, 0x11, 0x58, 0xa0, 0x04, 0x90, 0x45, 0x09, 0x04, - 0x20, 0xc0, 0xa0, 0x64, 0x90, 0xec, 0x00, 0x0f, 0x9d, 0xe0, 0x1e, 0xc1, - 0x2c, 0x05, 0x20, 0x60, 0xa8, 0x80, 0xc0, 0xfc, 0xa8, 0x82, 0x08, 0x04, - 0x20, 0xb5, 0x2c, 0x05, 0x84, 0x22, 0x84, 0x20, 0x83, 0x1a, 0x93, 0x99, - 0x00, 0x00, 0xac, 0x2e, 0xab, 0x32, 0xdd, 0x9c, 0x19, 0x04, 0x20, 0x52, - 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xf0, - 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xfe, 0x1f, 0xee, 0x1f, 0xee, - 0x1f, 0xee, 0x20, 0x0c, 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xee, 0x20, 0x1a, - 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xee, 0x20, 0x28, 0x1f, 0xee, 0x1f, 0xee, - 0x1f, 0xee, 0x20, 0x36, 0x1f, 0xee, 0x1f, 0xee, 0x1f, 0xee, 0x20, 0x44, - 0x08, 0x0c, 0x0d, 0x85, 0xa1, 0x7c, 0x24, 0x00, 0x91, 0x22, 0xa1, 0x80, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0x74, 0x94, 0x20, - 0xa0, 0x78, 0x93, 0x19, 0x08, 0x04, 0x20, 0xb0, 0xa1, 0x8c, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0x90, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, - 0xa0, 0x84, 0x94, 0x20, 0xa0, 0x88, 0x93, 0x19, 0x08, 0x04, 0x20, 0xb0, - 0xa1, 0x9c, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xa0, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0x94, 0x94, 0x20, 0xa0, 0x98, 0x93, 0x19, - 0x08, 0x04, 0x20, 0xb0, 0xa1, 0xac, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xb0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0xa4, 0x94, 0x20, - 0xa0, 0xa8, 0x93, 0x19, 0x08, 0x04, 0x20, 0xb0, 0xa1, 0xbc, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0xc0, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, - 0xa0, 0xb4, 0x94, 0x20, 0xa0, 0xb8, 0x93, 0x19, 0x08, 0x04, 0x20, 0xb0, - 0xa1, 0xcc, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xd0, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0xc4, 0x94, 0x20, 0xa0, 0xc8, 0x93, 0x19, - 0x08, 0x04, 0x20, 0xb0, 0xa1, 0xdc, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xe0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0xd4, 0x94, 0x20, - 0xa0, 0xd8, 0x93, 0x19, 0x08, 0x04, 0x20, 0xb0, 0x90, 0x82, 0x00, 0x1b, - 0x00, 0x02, 0x20, 0x70, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, - 0x20, 0x6e, 0x20, 0x7d, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, - 0x20, 0x6e, 0x20, 0x8a, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, - 0x20, 0x6e, 0x20, 0x97, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, 0x20, 0x6e, - 0x20, 0x6e, 0x20, 0xa4, 0x08, 0x0c, 0x0d, 0x85, 0xa1, 0x7c, 0x24, 0x00, - 0x91, 0x22, 0xa1, 0x80, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, - 0xa0, 0x6c, 0x94, 0x20, 0xa0, 0x70, 0x93, 0x19, 0x04, 0x98, 0xa1, 0x94, - 0x24, 0x00, 0x91, 0x22, 0xa1, 0x98, 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, - 0x0d, 0x85, 0xa0, 0x84, 0x94, 0x20, 0xa0, 0x88, 0x93, 0x19, 0x04, 0x30, - 0xa1, 0xac, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xb0, 0x23, 0x00, 0x91, 0x1b, - 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0x9c, 0x94, 0x20, 0xa0, 0xa0, 0x93, 0x19, - 0x00, 0xc8, 0xa1, 0xc4, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xc8, 0x23, 0x00, - 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0xb4, 0x94, 0x20, 0xa0, 0xb8, - 0x93, 0x19, 0x00, 0x60, 0xa1, 0xdc, 0x24, 0x00, 0x91, 0x22, 0xa1, 0xe0, - 0x23, 0x00, 0x91, 0x1b, 0x0a, 0x0c, 0x0d, 0x85, 0xa0, 0xcc, 0x94, 0x20, - 0xa0, 0xd0, 0x93, 0x19, 0xac, 0x1e, 0xab, 0x22, 0xa8, 0x80, 0xc0, 0xfd, - 0xa8, 0x82, 0x28, 0x00, 0xa8, 0x5a, 0x2c, 0x00, 0xa8, 0x12, 0x2a, 0x00, - 0xa8, 0x16, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x90, 0x06, 0x00, 0x28, - 0x00, 0x8e, 0x00, 0xde, 0x00, 0xce, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x00, 0xc6, 0x61, 0x0c, 0x00, 0x16, 0x90, 0x26, 0x24, 0x10, 0x60, 0x04, - 0x94, 0x20, 0x92, 0x91, 0x00, 0x00, 0x2c, 0x04, 0x92, 0x10, 0x9c, 0xe0, - 0x00, 0x02, 0x91, 0x8a, 0x00, 0x02, 0x1d, 0xa8, 0x92, 0x84, 0x00, 0x0f, - 0x94, 0x05, 0x00, 0x1e, 0x00, 0xce, 0x00, 0x05, 0x78, 0x03, 0x00, 0x03, - 0x78, 0x0f, 0x00, 0x00, 0x60, 0x04, 0x78, 0x12, 0x2c, 0x04, 0x78, 0x16, - 0x9c, 0xe0, 0x00, 0x02, 0x91, 0x8a, 0x00, 0x02, 0x1d, 0xb8, 0x00, 0x05, - 0x20, 0x01, 0x00, 0x05, 0x20, 0x04, 0xd0, 0xbc, 0x19, 0x0c, 0x0d, 0x7e, - 0xd0, 0x94, 0x01, 0x10, 0x08, 0x0c, 0x12, 0x08, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x26, 0x00, 0x20, 0x79, 0x02, 0x00, 0x20, 0x71, 0x02, 0x60, - 0x20, 0x69, 0x18, 0x00, 0x78, 0x17, 0x00, 0x00, 0x78, 0x9b, 0x08, 0x14, - 0x78, 0xa3, 0x04, 0x06, 0x78, 0x9f, 0x04, 0x10, 0x20, 0x09, 0x01, 0x3b, - 0x20, 0x0b, 0x04, 0x00, 0x78, 0x1b, 0x00, 0x02, 0x78, 0x3b, 0x00, 0x1f, - 0x78, 0x37, 0x00, 0x20, 0x78, 0x03, 0x16, 0x00, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x91, 0x26, 0x00, 0x78, 0x1c, 0xd0, 0xa4, 0x19, 0x0c, 0x22, 0x1d, - 0x79, 0x00, 0xd1, 0xdc, 0x11, 0x18, 0x90, 0x84, 0x00, 0x06, 0x00, 0x1a, - 0x90, 0x84, 0x00, 0x0e, 0x00, 0x02, 0x21, 0x3b, 0x21, 0x33, 0x82, 0x10, - 0x21, 0x33, 0x21, 0x35, 0x21, 0x35, 0x21, 0x35, 0x21, 0x35, 0x81, 0xf6, - 0x21, 0x33, 0x21, 0x37, 0x21, 0x33, 0x21, 0x35, 0x21, 0x33, 0x21, 0x35, - 0x21, 0x33, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x31, 0x00, 0x20, 0x08, 0x0c, - 0x81, 0xf6, 0x08, 0x0c, 0x82, 0x10, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x08, 0x0c, 0xee, 0xfa, 0x79, 0x30, 0x91, 0x84, 0x00, 0x03, - 0x05, 0x10, 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x01, 0x19, 0xfb, 0x20, 0x04, - 0x90, 0x05, 0x01, 0xa0, 0x20, 0x01, 0x01, 0x33, 0x20, 0x04, 0x90, 0x05, - 0x09, 0x0c, 0x0d, 0x85, 0x00, 0xc6, 0x20, 0x01, 0x19, 0xfb, 0x20, 0x64, - 0x08, 0x0c, 0xad, 0x18, 0x08, 0x0c, 0xca, 0xe9, 0x20, 0x09, 0x00, 0x40, - 0x08, 0x0c, 0x22, 0x20, 0x00, 0xce, 0x04, 0x08, 0x20, 0x09, 0x00, 0x40, - 0x08, 0x0c, 0x22, 0x20, 0x08, 0x0c, 0xad, 0x18, 0x00, 0xd0, 0x91, 0x84, - 0x00, 0x14, 0x01, 0xa0, 0x6a, 0x00, 0x92, 0x86, 0x00, 0x03, 0x01, 0x60, - 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x38, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, - 0x61, 0x9d, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x10, 0x08, 0x0c, 0x60, 0x58, - 0x08, 0x0c, 0x82, 0xae, 0x00, 0x41, 0x00, 0x18, 0x91, 0x84, 0x95, 0x40, - 0x1d, 0xc8, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, 0x1a, 0x6e, 0x08, 0x0c, - 0x1b, 0x1e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x2e, 0x00, 0x20, 0x71, 0x18, 0x00, 0x71, 0x28, - 0x20, 0x01, 0x19, 0x6f, 0x21, 0x02, 0x20, 0x01, 0x19, 0x77, 0x21, 0x02, - 0x20, 0x01, 0x01, 0x3b, 0x21, 0x02, 0x20, 0x79, 0x02, 0x00, 0x20, 0x01, - 0x02, 0x01, 0x78, 0x9e, 0x78, 0xa3, 0x02, 0x00, 0x91, 0x98, 0x00, 0x07, - 0x83, 0x1c, 0x83, 0x1c, 0x83, 0x1c, 0x93, 0x98, 0x00, 0x05, 0x23, 0x20, - 0x91, 0x82, 0x02, 0x04, 0x12, 0x30, 0x20, 0x11, 0x00, 0x08, 0x84, 0x23, - 0x84, 0x23, 0x84, 0x23, 0x04, 0x88, 0x91, 0x82, 0x02, 0x4c, 0x12, 0x40, - 0x20, 0x11, 0x00, 0x07, 0x84, 0x03, 0x80, 0x03, 0x94, 0x00, 0x94, 0x00, - 0x94, 0x20, 0x04, 0x30, 0x91, 0x82, 0x02, 0xbc, 0x12, 0x38, 0x20, 0x11, - 0x00, 0x06, 0x84, 0x03, 0x80, 0x03, 0x94, 0x00, 0x94, 0x20, 0x00, 0xe0, - 0x91, 0x82, 0x03, 0x4c, 0x12, 0x30, 0x20, 0x11, 0x00, 0x05, 0x84, 0x03, - 0x80, 0x03, 0x94, 0x20, 0x00, 0x98, 0x91, 0x82, 0x04, 0x2c, 0x12, 0x28, - 0x20, 0x11, 0x00, 0x04, 0x84, 0x23, 0x84, 0x23, 0x00, 0x58, 0x91, 0x82, - 0x05, 0x9c, 0x12, 0x28, 0x20, 0x11, 0x00, 0x03, 0x84, 0x03, 0x94, 0x20, - 0x00, 0x18, 0x20, 0x11, 0x00, 0x02, 0x84, 0x23, 0x94, 0x82, 0x02, 0x28, - 0x80, 0x02, 0x80, 0x20, 0x83, 0x01, 0x94, 0x02, 0x01, 0x10, 0x02, 0x08, - 0x83, 0x21, 0x82, 0x17, 0x82, 0x03, 0x94, 0x05, 0x78, 0x9a, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x68, 0x14, - 0x90, 0x84, 0xff, 0xc0, 0x91, 0x0d, 0x69, 0x16, 0x00, 0xde, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x90, 0x05, 0x68, 0x10, - 0x01, 0x10, 0xc0, 0xa5, 0x00, 0x08, 0xc0, 0xa4, 0x68, 0x12, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x68, 0x10, - 0x90, 0x84, 0xff, 0xf8, 0x91, 0x0d, 0x69, 0x12, 0x00, 0xde, 0x00, 0x0e, - 0x00, 0x05, 0x79, 0x38, 0x08, 0x0c, 0x0d, 0x7e, 0x00, 0xf6, 0x20, 0x79, - 0x02, 0x00, 0x79, 0x02, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0x79, 0x02, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x00, 0xfe, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x28, 0x00, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, - 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2a, 0x85, 0x08, 0x0c, 0x29, 0x9b, - 0x20, 0x01, 0x19, 0x9d, 0x20, 0x03, 0x07, 0x00, 0x20, 0x01, 0x19, 0x9e, - 0x20, 0x03, 0x07, 0x00, 0x08, 0x0c, 0x2a, 0xf6, 0x90, 0x06, 0x08, 0x0c, - 0x29, 0xca, 0x90, 0x06, 0x08, 0x0c, 0x29, 0xad, 0x20, 0xa9, 0x00, 0x12, - 0x1d, 0x04, 0x22, 0x52, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x22, 0x52, - 0x60, 0x2f, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0x60, 0x50, 0x90, 0x85, - 0x04, 0x00, 0x90, 0x84, 0xdf, 0xff, 0x60, 0x52, 0x62, 0x24, 0x08, 0x0c, - 0x2a, 0xd3, 0x08, 0x0c, 0x26, 0xc5, 0x20, 0x09, 0x00, 0xef, 0x61, 0x32, - 0x61, 0x36, 0x08, 0x0c, 0x26, 0xd5, 0x60, 0xe7, 0x00, 0x00, 0x61, 0xea, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x01, 0x00, 0x02, - 0x11, 0x10, 0x20, 0x01, 0x00, 0x08, 0x60, 0xe2, 0x60, 0x4b, 0xf7, 0xf7, - 0x60, 0x43, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x80, 0x60, 0x2f, 0x00, 0x00, - 0x60, 0x07, 0x34, 0x9f, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x40, 0x60, 0x8b, - 0x00, 0x0b, 0x60, 0x8f, 0x10, 0xb8, 0x60, 0x93, 0x00, 0x00, 0x60, 0x97, - 0x01, 0x98, 0x00, 0xce, 0x60, 0x04, 0x90, 0x85, 0x80, 0x00, 0x60, 0x06, - 0x60, 0xbb, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x18, 0x60, 0xbf, 0x00, 0x00, - 0x1f, 0x04, 0x22, 0x98, 0x60, 0xbb, 0x00, 0x00, 0x60, 0xbf, 0x01, 0x08, - 0x60, 0xbf, 0x00, 0x12, 0x60, 0xbf, 0x04, 0x05, 0x60, 0xbf, 0x00, 0x14, - 0x60, 0xbf, 0x03, 0x20, 0x60, 0xbf, 0x00, 0x18, 0x60, 0x1b, 0x00, 0xf0, - 0x60, 0x1f, 0x00, 0x1e, 0x60, 0x0f, 0x00, 0x6b, 0x60, 0x2b, 0x40, 0x2c, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x40, 0x78, 0xc3, - 0x00, 0x80, 0x78, 0xc3, 0x00, 0x83, 0x78, 0xc3, 0x00, 0x00, 0x00, 0xfe, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x35, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, - 0x18, 0x34, 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x28, 0x00, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x61, 0x24, 0x60, 0x28, - 0x91, 0x0c, 0x00, 0x66, 0x20, 0x31, 0x18, 0x37, 0x26, 0x34, 0x96, 0xb4, - 0x00, 0x28, 0x00, 0x6e, 0x11, 0x38, 0x60, 0x20, 0xd1, 0xbc, 0x01, 0x20, - 0xd0, 0xbc, 0x11, 0x68, 0xd0, 0xb4, 0x11, 0x98, 0x91, 0x84, 0x5e, 0x2c, - 0x11, 0x18, 0x91, 0x84, 0x00, 0x07, 0x00, 0xaa, 0x91, 0x95, 0x00, 0x04, - 0x92, 0x84, 0x00, 0x07, 0x00, 0x82, 0x00, 0x16, 0x20, 0x01, 0x03, 0x87, - 0x20, 0x0c, 0xd1, 0xa4, 0x00, 0x1e, 0x0d, 0x70, 0x0c, 0x98, 0x00, 0x16, - 0x20, 0x01, 0x03, 0x87, 0x20, 0x0c, 0xd1, 0xb4, 0x00, 0x1e, 0x0d, 0x30, - 0x0c, 0x58, 0x23, 0x06, 0x23, 0x03, 0x23, 0x03, 0x23, 0x03, 0x23, 0x05, - 0x23, 0x03, 0x23, 0x03, 0x23, 0x03, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x29, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xa6, - 0x61, 0x24, 0x60, 0x28, 0xd0, 0x9c, 0x01, 0x18, 0xd1, 0x9c, 0x19, 0x04, - 0x25, 0x8b, 0xd1, 0xf4, 0x19, 0x0c, 0x0d, 0x7e, 0x08, 0x0c, 0x77, 0x9e, - 0x09, 0x04, 0x23, 0x63, 0x08, 0x0c, 0xd6, 0x45, 0x11, 0x20, 0x70, 0x00, - 0x90, 0x86, 0x00, 0x03, 0x05, 0x80, 0x60, 0x24, 0x90, 0x84, 0x18, 0x00, - 0x05, 0x60, 0x08, 0x0c, 0x77, 0xc1, 0x01, 0x18, 0x08, 0x0c, 0x77, 0xaf, - 0x15, 0x30, 0x20, 0x11, 0x00, 0x20, 0x08, 0x0c, 0x2a, 0xd3, 0x60, 0x43, - 0x00, 0x00, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x68, 0x08, 0x0c, 0x77, 0xc1, - 0x11, 0x50, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x01, 0x60, 0x27, - 0x18, 0x00, 0x08, 0x0c, 0x76, 0x12, 0x08, 0x04, 0x25, 0x8e, 0x70, 0xa4, - 0x90, 0x05, 0x11, 0x50, 0x70, 0xa7, 0x00, 0x01, 0x00, 0xd6, 0x20, 0x69, - 0x01, 0x40, 0x08, 0x0c, 0x77, 0xf2, 0x00, 0xde, 0x19, 0x04, 0x25, 0x8e, - 0x08, 0x0c, 0x7a, 0xc0, 0x04, 0x28, 0x08, 0x0c, 0x77, 0xc1, 0x15, 0x90, - 0x60, 0x24, 0x90, 0x84, 0x18, 0x00, 0x11, 0x08, 0x04, 0x68, 0x08, 0x0c, - 0x7a, 0xc0, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x0c, - 0x76, 0xcd, 0x08, 0x04, 0x25, 0x8b, 0xd1, 0xac, 0x15, 0x08, 0x60, 0x24, - 0xd0, 0xdc, 0x11, 0x70, 0xd0, 0xe4, 0x11, 0x78, 0xd0, 0xd4, 0x11, 0x90, - 0xd0, 0xcc, 0x01, 0x30, 0x70, 0x98, 0x90, 0x86, 0x00, 0x29, 0x11, 0x10, - 0x08, 0x0c, 0x79, 0x90, 0x08, 0x04, 0x25, 0x8b, 0x08, 0x0c, 0x7a, 0xbb, - 0x00, 0x48, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, 0x00, 0x02, 0x00, 0x20, - 0x08, 0x0c, 0x78, 0xe4, 0x08, 0x04, 0x25, 0x8b, 0x08, 0x0c, 0x7a, 0x3a, - 0x08, 0x04, 0x25, 0x8b, 0x62, 0x20, 0xd1, 0xbc, 0x01, 0x38, 0xd2, 0xbc, - 0x19, 0x04, 0x25, 0xf6, 0xd2, 0xb4, 0x19, 0x04, 0x26, 0x08, 0x00, 0x00, - 0xd1, 0xac, 0x09, 0x04, 0x24, 0x98, 0x00, 0x36, 0x63, 0x28, 0xc3, 0xbc, - 0x63, 0x2a, 0x00, 0x3e, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0xd0, 0x20, 0x11, - 0x00, 0x20, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0x06, 0x00, 0x26, 0x00, 0x36, - 0x08, 0x0c, 0x77, 0xb8, 0x11, 0x58, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, - 0x61, 0x9d, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, - 0x00, 0xae, 0x00, 0x05, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x08, 0x0c, - 0x77, 0x72, 0x00, 0x16, 0x00, 0x46, 0x00, 0xc6, 0x64, 0x4c, 0x94, 0x86, - 0xf0, 0xf0, 0x11, 0x38, 0x20, 0x61, 0x01, 0x00, 0x64, 0x4a, 0x60, 0x43, - 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x74, 0xda, 0x94, 0x8c, 0xff, 0x00, - 0x70, 0x38, 0xd0, 0x84, 0x01, 0x90, 0x08, 0x0c, 0xd6, 0x45, 0x11, 0x18, - 0x91, 0x86, 0xf8, 0x00, 0x11, 0x60, 0x70, 0x48, 0xd0, 0x84, 0x11, 0x48, - 0xc0, 0x85, 0x70, 0x4a, 0x00, 0x36, 0x24, 0x18, 0x20, 0x11, 0x80, 0x16, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x3e, 0x08, 0x0c, 0xd6, 0x3e, 0x19, 0x04, - 0x24, 0x6d, 0x91, 0x96, 0xff, 0x00, 0x05, 0xa8, 0x70, 0x60, 0x90, 0x84, - 0x00, 0xff, 0x81, 0x0f, 0x81, 0xff, 0x01, 0x10, 0x91, 0x16, 0x05, 0x68, - 0x71, 0x30, 0xd1, 0x84, 0x15, 0x50, 0x08, 0x0c, 0x34, 0x82, 0x01, 0x28, - 0xc1, 0x8d, 0x71, 0x32, 0x08, 0x0c, 0x6c, 0x09, 0x15, 0x10, 0x62, 0x40, - 0x92, 0x94, 0x00, 0x10, 0x01, 0x30, 0x62, 0x48, 0x92, 0x94, 0xff, 0x00, - 0x92, 0x96, 0xff, 0x00, 0x01, 0xc0, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, - 0x24, 0x6d, 0x70, 0x38, 0xd0, 0x8c, 0x11, 0x40, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xd1, 0xac, 0x19, 0x04, 0x24, 0x6d, 0xc1, 0xad, 0x21, 0x02, - 0x00, 0x36, 0x73, 0xd8, 0x20, 0x11, 0x80, 0x13, 0x08, 0x0c, 0x4c, 0xa1, - 0x00, 0x3e, 0x08, 0x04, 0x24, 0x6d, 0x70, 0x38, 0xd0, 0x8c, 0x11, 0x40, - 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xd1, 0xac, 0x19, 0x04, 0x24, 0x6d, - 0xc1, 0xad, 0x21, 0x02, 0x00, 0x36, 0x73, 0xd8, 0x20, 0x11, 0x80, 0x13, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x3e, 0x71, 0x30, 0xc1, 0x85, 0x71, 0x32, - 0x20, 0x11, 0x18, 0x48, 0x22, 0x0c, 0xd1, 0xa4, 0x01, 0xf0, 0x00, 0x16, - 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, 0x01, 0x00, 0x08, 0x0c, 0x8c, 0x44, - 0x20, 0x19, 0x00, 0x0e, 0x00, 0xc6, 0x20, 0x61, 0x00, 0x00, 0x08, 0x0c, - 0xe9, 0xf9, 0x00, 0xce, 0x94, 0x84, 0x00, 0xff, 0x90, 0x80, 0x34, 0x8e, - 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x21, 0x20, 0x90, 0x06, - 0x20, 0x09, 0x00, 0x0e, 0x08, 0x0c, 0xea, 0x8d, 0x00, 0x1e, 0x00, 0x16, - 0x20, 0x09, 0x00, 0x02, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x32, 0xda, - 0x00, 0x1e, 0x00, 0xa8, 0x01, 0x56, 0x00, 0xb6, 0x20, 0xa9, 0x00, 0x7f, - 0x90, 0x0e, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x40, 0x70, 0x30, 0xd0, 0x84, - 0x11, 0x18, 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0x10, 0x08, 0x0c, 0x61, 0xb7, - 0x81, 0x08, 0x1f, 0x04, 0x24, 0x5d, 0x00, 0xbe, 0x01, 0x5e, 0x00, 0xce, - 0x00, 0x4e, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xaf, 0xd2, 0x08, 0x0c, - 0xb0, 0x9b, 0x08, 0x0c, 0xad, 0x18, 0x60, 0xe3, 0x00, 0x00, 0x00, 0x1e, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x14, 0x92, 0x96, 0x00, 0x04, 0x11, 0x70, - 0xd1, 0x9c, 0x11, 0xb0, 0x20, 0x11, 0x18, 0x0c, 0x22, 0x14, 0xd2, 0x9c, - 0x11, 0x20, 0x62, 0x04, 0x92, 0x95, 0x00, 0x02, 0x62, 0x06, 0x62, 0x28, - 0xc2, 0x9d, 0x62, 0x2a, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0x18, 0x26, - 0x20, 0x03, 0x00, 0x00, 0x20, 0x11, 0x00, 0x20, 0x08, 0x0c, 0x2a, 0xd3, - 0xd1, 0x94, 0x09, 0x04, 0x25, 0x8b, 0x00, 0x16, 0x08, 0x0c, 0xac, 0xfc, - 0x62, 0x20, 0xd2, 0xb4, 0x09, 0x04, 0x25, 0x26, 0x08, 0x0c, 0x8a, 0x4b, - 0x08, 0x0c, 0xa2, 0xa0, 0x20, 0x11, 0x00, 0x04, 0x08, 0x0c, 0x2a, 0xd3, - 0x00, 0xf6, 0x20, 0x19, 0x19, 0xf4, 0x23, 0x04, 0x90, 0x7d, 0x09, 0x04, - 0x24, 0xf3, 0x78, 0x04, 0x90, 0x86, 0x00, 0x32, 0x15, 0xf0, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0xe6, 0x00, 0x96, 0x20, 0x69, 0x01, 0x40, 0x78, 0x2c, - 0x68, 0x5e, 0x78, 0x08, 0x68, 0x5a, 0x60, 0x43, 0x00, 0x02, 0x20, 0x01, - 0x00, 0x03, 0x80, 0x01, 0x1d, 0xf0, 0x60, 0x43, 0x00, 0x00, 0x20, 0x01, - 0x00, 0x3c, 0x80, 0x01, 0x1d, 0xf0, 0x08, 0x0c, 0x2a, 0xa9, 0x20, 0x01, - 0x00, 0x1e, 0x80, 0x01, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x09, 0x08, 0x0c, - 0x2a, 0x60, 0x69, 0x04, 0xd1, 0xdc, 0x11, 0x40, 0x0c, 0xb0, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, - 0x08, 0x0c, 0x99, 0xed, 0x08, 0x0c, 0xad, 0x18, 0x78, 0x14, 0x20, 0x48, - 0xa8, 0x67, 0x01, 0x03, 0x2f, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x9e, - 0x00, 0xee, 0x00, 0xce, 0x00, 0xde, 0x00, 0xfe, 0x00, 0x1e, 0x00, 0xae, - 0x00, 0x05, 0x00, 0xfe, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, - 0x90, 0x84, 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2a, 0xa9, 0x00, 0xde, - 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, 0x60, 0x34, 0x08, 0x0c, 0xd6, 0x45, - 0x01, 0x20, 0x90, 0x9a, 0x00, 0x03, 0x12, 0x58, 0x00, 0x18, 0x90, 0x9a, - 0x00, 0xc8, 0x12, 0x38, 0x80, 0x00, 0x60, 0x36, 0x00, 0xce, 0x08, 0x0c, - 0xa2, 0x78, 0x08, 0x04, 0x25, 0x88, 0x20, 0x61, 0x01, 0x00, 0x62, 0xc0, - 0x08, 0x0c, 0xac, 0x2d, 0x20, 0x19, 0x19, 0xf4, 0x23, 0x04, 0x90, 0x65, - 0x01, 0x30, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x00, 0x27, 0x08, 0x0c, - 0xb2, 0x0a, 0x00, 0xce, 0x08, 0x04, 0x25, 0x88, 0xd2, 0xbc, 0x09, 0x04, - 0x25, 0x6b, 0x08, 0x0c, 0x8a, 0x58, 0x20, 0x11, 0x00, 0x04, 0x08, 0x0c, - 0x2a, 0xd3, 0x00, 0xd6, 0x20, 0x69, 0x01, 0x40, 0x68, 0x04, 0x90, 0x84, - 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2a, 0xa9, 0x00, 0xde, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0xe8, 0x60, 0x50, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x20, - 0x90, 0x9a, 0x00, 0x03, 0x16, 0x68, 0x00, 0x18, 0x90, 0x9a, 0x00, 0xc8, - 0x16, 0x48, 0x80, 0x00, 0x60, 0x52, 0x60, 0x4c, 0x00, 0xce, 0x90, 0x05, - 0x05, 0xd8, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x8a, 0x50, 0x90, 0x80, - 0x00, 0x08, 0x20, 0x04, 0x90, 0x86, 0x00, 0x06, 0x11, 0x38, 0x20, 0x09, - 0x19, 0x84, 0x20, 0x11, 0x00, 0x12, 0x08, 0x0c, 0x2a, 0xe2, 0x04, 0x50, - 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x86, 0x00, 0x09, 0x0d, 0x98, - 0x20, 0x09, 0x19, 0x84, 0x20, 0x11, 0x00, 0x16, 0x08, 0x0c, 0x2a, 0xe2, - 0x00, 0xe8, 0x20, 0x11, 0x00, 0x04, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0xc0, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, - 0x20, 0x19, 0x19, 0xfb, 0x23, 0x04, 0x90, 0x65, 0x01, 0x60, 0x20, 0x09, - 0x00, 0x4f, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x10, 0x20, 0x09, - 0x00, 0x4f, 0x60, 0x03, 0x00, 0x03, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0xce, - 0x08, 0x0c, 0xad, 0x18, 0x00, 0x1e, 0xd1, 0x9c, 0x09, 0x04, 0x25, 0xef, - 0x70, 0x38, 0xd0, 0xac, 0x15, 0x58, 0x00, 0x16, 0x01, 0x56, 0x20, 0x11, - 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xd3, 0x08, 0x0c, 0x2a, 0xf6, 0x08, 0x0c, - 0x2b, 0x29, 0x60, 0x50, 0xc0, 0xe5, 0x60, 0x52, 0x20, 0xa9, 0x03, 0x67, - 0x0f, 0x04, 0x25, 0xba, 0x1d, 0x04, 0x25, 0xa2, 0x08, 0x0c, 0x8a, 0x7f, - 0x60, 0x20, 0xd0, 0x9c, 0x1d, 0xb8, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x08, 0x0c, 0x2a, 0x0c, 0x00, 0xfe, 0x1d, 0x80, 0x60, 0x50, 0xc0, 0xe4, - 0x60, 0x52, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xd3, 0x01, 0x5e, - 0x00, 0x1e, 0x04, 0xa8, 0x01, 0x5e, 0x00, 0x1e, 0x00, 0x16, 0x60, 0x28, - 0xc0, 0x9c, 0x60, 0x2a, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xaf, 0xd2, - 0x08, 0x0c, 0xb0, 0x9b, 0x08, 0x0c, 0xad, 0x18, 0x60, 0xe3, 0x00, 0x00, - 0x08, 0x0c, 0xee, 0xd9, 0x08, 0x0c, 0xee, 0xf4, 0x08, 0x0c, 0x58, 0x44, - 0xd0, 0xfc, 0x11, 0x38, 0x08, 0x0c, 0xd6, 0x3e, 0x11, 0x20, 0x90, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x77, 0xe2, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0x2a, 0x85, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x70, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x0e, 0xd3, 0x00, 0xee, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xd3, 0x08, 0x0c, 0x0b, 0xcf, - 0x00, 0x1e, 0x91, 0x8c, 0xff, 0xd0, 0x21, 0x10, 0x08, 0x0c, 0x2a, 0xd3, - 0x00, 0xae, 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x03, 0x87, 0x20, 0x0c, - 0xd1, 0xa4, 0x00, 0x1e, 0x09, 0x04, 0x23, 0x90, 0x00, 0x16, 0x20, 0x09, - 0x26, 0x02, 0x00, 0xc0, 0x20, 0x01, 0x03, 0x87, 0x20, 0x03, 0x10, 0x00, - 0x00, 0x1e, 0x0c, 0x38, 0x00, 0x16, 0x20, 0x01, 0x03, 0x87, 0x20, 0x0c, - 0xd1, 0xb4, 0x00, 0x1e, 0x09, 0x04, 0x23, 0x90, 0x00, 0x16, 0x20, 0x09, - 0x26, 0x14, 0x00, 0x30, 0x20, 0x01, 0x03, 0x87, 0x20, 0x03, 0x40, 0x00, - 0x00, 0x1e, 0x08, 0xa8, 0x60, 0x28, 0xc0, 0xbc, 0x60, 0x2a, 0x20, 0x01, - 0x01, 0x56, 0x20, 0x03, 0xbc, 0x91, 0x80, 0x00, 0x20, 0x03, 0xff, 0xff, - 0x60, 0x43, 0x00, 0x01, 0x08, 0x0c, 0x2a, 0x7f, 0x20, 0x11, 0x00, 0x80, - 0x08, 0x0c, 0x2a, 0xd3, 0x60, 0x17, 0x00, 0x00, 0x60, 0x43, 0x00, 0x00, - 0x08, 0x17, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, - 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x18, 0x00, - 0x71, 0xd0, 0x70, 0xd2, 0x91, 0x16, 0x09, 0x04, 0x26, 0x84, 0x81, 0xff, - 0x01, 0xa0, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0x2a, 0x85, 0x20, 0x11, - 0x80, 0x11, 0x20, 0x19, 0x01, 0x0e, 0x23, 0x1c, 0x93, 0x9e, 0x00, 0x07, - 0x11, 0x18, 0x20, 0x19, 0x00, 0x01, 0x00, 0x10, 0x20, 0x19, 0x00, 0x00, - 0x08, 0x0c, 0x4c, 0xa1, 0x04, 0x68, 0x20, 0x01, 0x19, 0xa9, 0x20, 0x0c, - 0x81, 0xff, 0x11, 0x40, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0xb4, - 0x01, 0x18, 0x20, 0x19, 0x00, 0x03, 0x00, 0x08, 0x21, 0x18, 0x20, 0x11, - 0x80, 0x12, 0x08, 0x0c, 0x4c, 0xa1, 0x08, 0x0c, 0x0e, 0xd3, 0x08, 0x0c, - 0x58, 0x44, 0xd0, 0xfc, 0x11, 0xa8, 0x08, 0x0c, 0xd6, 0x3e, 0x11, 0x90, - 0x00, 0xc6, 0x08, 0x0c, 0x27, 0x20, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, - 0xa4, 0xf1, 0x08, 0x0c, 0xad, 0x18, 0x20, 0x61, 0x01, 0x00, 0x20, 0x19, - 0x00, 0x28, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0x32, 0xda, 0x00, 0xce, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x20, 0x28, 0x91, 0x8c, 0x00, 0xff, 0x21, 0x30, - 0x90, 0x94, 0xff, 0x00, 0x11, 0xf0, 0x20, 0x11, 0x18, 0x37, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0xc8, 0x81, 0xff, 0x01, 0xe8, 0x20, 0x11, 0x18, 0x1f, - 0x22, 0x04, 0x91, 0x06, 0x11, 0x90, 0x20, 0x11, 0x18, 0x20, 0x22, 0x14, - 0x92, 0x94, 0xff, 0x00, 0x95, 0x84, 0xff, 0x00, 0x92, 0x06, 0x11, 0x48, - 0x20, 0x11, 0x18, 0x20, 0x22, 0x14, 0x92, 0x94, 0x00, 0xff, 0x95, 0x84, - 0x00, 0xff, 0x92, 0x06, 0x11, 0x20, 0x25, 0x00, 0x08, 0x0c, 0x85, 0x21, - 0x00, 0x48, 0x95, 0x84, 0x00, 0xff, 0x90, 0x80, 0x34, 0x8e, 0x20, 0x0d, - 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x90, 0x06, 0x00, 0x05, 0x90, 0x80, - 0x34, 0x8e, 0x20, 0x0d, 0x91, 0x8c, 0x00, 0xff, 0x00, 0x05, 0x00, 0xd6, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x18, 0x18, 0x20, 0x03, 0x00, 0xef, - 0x20, 0xa9, 0x00, 0x10, 0x90, 0x06, 0x68, 0x52, 0x68, 0x56, 0x1f, 0x04, - 0x26, 0xd0, 0x00, 0xde, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd6, 0x00, 0x26, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x18, 0x18, 0x21, 0x02, 0x81, 0x14, - 0x82, 0x14, 0x82, 0x14, 0x82, 0x14, 0x20, 0xa9, 0x00, 0x10, 0x68, 0x53, - 0x00, 0x00, 0x90, 0x06, 0x82, 0xff, 0x11, 0x28, 0x91, 0x84, 0x00, 0x0f, - 0x90, 0x80, 0xef, 0x08, 0x20, 0x05, 0x68, 0x56, 0x82, 0x11, 0x1f, 0x04, - 0x26, 0xe5, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xc6, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x30, 0x01, 0x10, 0xc0, 0x9d, 0x00, 0x08, - 0xc0, 0x9c, 0x60, 0x32, 0x00, 0xce, 0x00, 0x05, 0x01, 0x56, 0x00, 0xd6, - 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, 0x20, 0x69, 0x01, 0x40, 0x69, 0x80, - 0x91, 0x16, 0x01, 0x80, 0x91, 0x12, 0x12, 0x30, 0x82, 0x12, 0x82, 0x10, - 0x22, 0xa8, 0x20, 0x01, 0x04, 0x02, 0x00, 0x18, 0x22, 0xa8, 0x20, 0x01, - 0x04, 0x04, 0x68, 0x0e, 0x1f, 0x04, 0x27, 0x15, 0x68, 0x0f, 0x00, 0x00, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xde, 0x01, 0x5e, 0x00, 0x05, - 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xc4, 0x01, 0x50, 0xd0, 0xa4, 0x01, 0x40, - 0x90, 0x06, 0x00, 0x46, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2e, 0x08, 0x0c, - 0xea, 0x8d, 0x00, 0x4e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0x16, 0x00, 0x26, - 0x20, 0x79, 0x01, 0x40, 0x78, 0xc4, 0xd0, 0xdc, 0x09, 0x04, 0x27, 0x8c, - 0x08, 0x0c, 0x29, 0xfc, 0x06, 0x60, 0x90, 0x84, 0x07, 0x00, 0x90, 0x8e, - 0x06, 0x00, 0x11, 0x20, 0x20, 0x11, 0x40, 0x00, 0x90, 0x0e, 0x04, 0x58, - 0x90, 0x8e, 0x05, 0x00, 0x11, 0x20, 0x20, 0x11, 0x80, 0x00, 0x90, 0x0e, - 0x04, 0x20, 0x90, 0x8e, 0x04, 0x00, 0x11, 0x20, 0x90, 0x16, 0x20, 0x09, - 0x00, 0x01, 0x00, 0xe8, 0x90, 0x8e, 0x03, 0x00, 0x11, 0x20, 0x90, 0x16, - 0x20, 0x09, 0x00, 0x02, 0x00, 0xb0, 0x90, 0x8e, 0x02, 0x00, 0x11, 0x20, - 0x90, 0x16, 0x20, 0x09, 0x00, 0x04, 0x00, 0x78, 0x90, 0x8e, 0x01, 0x00, - 0x15, 0x48, 0x90, 0x16, 0x20, 0x09, 0x00, 0x08, 0x00, 0x40, 0x90, 0x84, - 0x07, 0x00, 0x90, 0x8e, 0x03, 0x00, 0x15, 0x00, 0x20, 0x11, 0x00, 0x30, - 0x00, 0x58, 0x23, 0x00, 0x90, 0x80, 0x00, 0x20, 0x20, 0x18, 0x08, 0x0c, - 0x95, 0x5b, 0x92, 0x8c, 0xff, 0x00, 0x01, 0x10, 0x20, 0x11, 0x00, 0xff, - 0x22, 0x00, 0x80, 0x07, 0x90, 0x85, 0x00, 0x4c, 0x78, 0xc2, 0x20, 0x09, - 0x01, 0x38, 0x22, 0x0a, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x18, 0x20, 0x09, - 0x19, 0x6d, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0xc3, 0x00, 0x00, 0x0c, 0xc8, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x20, 0x01, 0x01, 0x70, 0x20, 0x0c, - 0x80, 0x00, 0x20, 0x14, 0x91, 0x84, 0x00, 0x03, 0x01, 0x10, 0x08, 0x0c, - 0x0d, 0x7e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x18, 0x20, 0x09, - 0x00, 0x02, 0x00, 0x05, 0x20, 0x01, 0x01, 0x71, 0x20, 0x04, 0xd0, 0xdc, - 0x01, 0x68, 0x20, 0x01, 0x01, 0x70, 0x20, 0x0c, 0x91, 0x8c, 0x00, 0xff, - 0x91, 0x8e, 0x00, 0x4c, 0x11, 0x28, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0x00, 0x05, 0x90, 0x0e, 0x20, 0x01, 0x02, 0x27, 0x20, 0x04, - 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, 0x91, 0x08, 0x20, 0x01, - 0x02, 0x26, 0x20, 0x04, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, - 0x91, 0x08, 0x00, 0x05, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x20, - 0x10, 0x00, 0x08, 0x00, 0x10, 0x00, 0x18, 0x00, 0x01, 0x56, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x01, 0x19, 0x90, 0x20, 0x04, - 0x90, 0x8a, 0x00, 0x07, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x33, 0x00, 0xee, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x01, 0x5e, 0x00, 0x05, 0x27, 0xf2, - 0x28, 0x10, 0x28, 0x34, 0x28, 0x36, 0x28, 0x5f, 0x28, 0x61, 0x28, 0x63, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x26, 0x31, 0x08, 0x0c, 0x2a, 0x4a, - 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x00, 0x78, 0x28, 0x90, 0x84, - 0xe1, 0xd7, 0x78, 0x2a, 0x90, 0x06, 0x20, 0xa9, 0x00, 0x09, 0x08, 0x0c, - 0x2a, 0x18, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x06, 0x20, 0x09, - 0x00, 0x1e, 0x20, 0x11, 0x28, 0x64, 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0x05, - 0x20, 0x09, 0x19, 0x95, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x19, 0x9a, - 0x20, 0x03, 0x00, 0x36, 0x20, 0x01, 0x19, 0x99, 0x20, 0x03, 0x00, 0x2a, - 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, - 0x29, 0xad, 0x20, 0x01, 0xff, 0xff, 0x20, 0xa9, 0x00, 0x09, 0x08, 0x0c, - 0x2a, 0x18, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x06, 0x20, 0x09, - 0x00, 0x1e, 0x20, 0x11, 0x28, 0x64, 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0x05, - 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x01, 0x19, 0x9a, 0x20, 0x03, 0x00, 0x36, - 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x03, 0x7a, 0x38, 0x92, 0x94, - 0x00, 0x05, 0x92, 0x96, 0x00, 0x04, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x29, 0xad, 0x20, 0x01, 0x19, 0x96, - 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0xff, 0xff, 0x20, 0xa9, 0x00, 0x09, - 0x08, 0x0c, 0x2a, 0x18, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x1e, 0x20, 0x11, 0x28, 0x64, 0x08, 0x0c, 0x8a, 0x5d, - 0x00, 0x05, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x05, - 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x56, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, - 0x19, 0x92, 0x20, 0x04, 0x90, 0x8a, 0x00, 0x07, 0x1a, 0x0c, 0x0d, 0x85, - 0x00, 0x43, 0x01, 0x2e, 0x01, 0x5e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x28, 0x86, 0x28, 0xa2, 0x28, 0xde, - 0x29, 0x0a, 0x29, 0x2a, 0x29, 0x36, 0x29, 0x38, 0x08, 0x0c, 0x2a, 0x0c, - 0x11, 0x90, 0x20, 0x09, 0x19, 0x98, 0x21, 0x04, 0x7a, 0x38, 0x92, 0x94, - 0x00, 0x05, 0x92, 0x96, 0x00, 0x04, 0x01, 0x10, 0xc0, 0x8d, 0x00, 0x08, - 0xc0, 0x85, 0x20, 0x0a, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x01, - 0x00, 0x30, 0x08, 0x0c, 0x29, 0x5c, 0x20, 0x01, 0xff, 0xff, 0x08, 0x0c, - 0x28, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x29, 0x3a, 0x05, 0xc0, 0x20, 0x09, - 0x19, 0x99, 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x08, 0x0c, 0x2a, 0x0c, - 0x11, 0x58, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x05, - 0x05, 0x18, 0x20, 0x09, 0x19, 0x98, 0x21, 0x04, 0xc0, 0x85, 0x20, 0x0a, - 0x20, 0x09, 0x19, 0x95, 0x21, 0x04, 0x80, 0x00, 0x20, 0x0a, 0x90, 0x86, - 0x00, 0x05, 0x01, 0x18, 0x08, 0x0c, 0x29, 0x42, 0x00, 0xc0, 0x20, 0x0b, - 0x00, 0x00, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, 0x00, 0x04, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x29, 0xca, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x02, 0x00, 0x28, - 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x03, 0x00, 0x10, 0x08, 0x0c, - 0x28, 0x23, 0x00, 0x05, 0x08, 0x0c, 0x29, 0x3a, 0x05, 0x40, 0x20, 0x09, - 0x19, 0x99, 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x08, 0x0c, 0x2a, 0x0c, - 0x11, 0x48, 0x20, 0x01, 0x19, 0x90, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, - 0x19, 0x91, 0x20, 0x03, 0x00, 0x00, 0x00, 0xb8, 0x20, 0x09, 0x19, 0x99, - 0x21, 0x04, 0x90, 0x05, 0x11, 0x18, 0x08, 0x0c, 0x29, 0x7f, 0x00, 0x10, - 0x08, 0x0c, 0x29, 0x4f, 0x08, 0x0c, 0x29, 0x42, 0x20, 0x09, 0x19, 0x95, - 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x19, 0x92, 0x20, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x28, 0x23, 0x00, 0x00, 0x00, 0x05, 0x04, 0x79, 0x01, 0xe8, - 0x08, 0x0c, 0x2a, 0x0c, 0x11, 0x98, 0x20, 0x09, 0x19, 0x96, 0x21, 0x04, - 0x80, 0x00, 0x20, 0x0a, 0x90, 0x86, 0x00, 0x07, 0x01, 0x08, 0x00, 0x78, - 0x20, 0x01, 0x19, 0x9b, 0x20, 0x03, 0x00, 0x0a, 0x20, 0x09, 0x19, 0x98, - 0x21, 0x04, 0xc0, 0xfd, 0x20, 0x0a, 0x00, 0x38, 0x00, 0xf9, 0x20, 0x01, - 0x19, 0x92, 0x20, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x28, 0x4e, 0x00, 0x05, - 0x00, 0x79, 0x01, 0x48, 0x08, 0x0c, 0x2a, 0x0c, 0x11, 0x18, 0x08, 0x0c, - 0x28, 0x3a, 0x00, 0x18, 0x00, 0x79, 0x08, 0x0c, 0x28, 0x4e, 0x00, 0x05, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x09, 0x19, 0x9a, - 0x21, 0x04, 0x80, 0x01, 0x20, 0x0a, 0x09, 0x0c, 0x29, 0x9b, 0x00, 0x05, - 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x05, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x29, 0xca, - 0x00, 0x05, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, 0x00, 0x06, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x29, 0xad, 0x00, 0x05, 0x20, 0x09, 0x19, 0x95, 0x21, 0x04, 0x80, 0x00, - 0x20, 0x0a, 0x90, 0x86, 0x00, 0x05, 0x01, 0x08, 0x00, 0x68, 0x20, 0x0b, - 0x00, 0x00, 0x7a, 0x38, 0x92, 0x94, 0x00, 0x06, 0x92, 0x96, 0x00, 0x06, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x04, 0xd9, - 0x7a, 0x38, 0x92, 0x94, 0x00, 0x05, 0x92, 0x96, 0x00, 0x05, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x10, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x29, 0xca, - 0x00, 0x05, 0x00, 0x86, 0x20, 0x01, 0x19, 0x98, 0x20, 0x04, 0x90, 0x84, - 0x7f, 0xff, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0x09, 0x19, 0x97, 0x21, 0x44, - 0x88, 0x46, 0x28, 0x0a, 0x98, 0x44, 0x0d, 0xd8, 0xd0, 0x8c, 0x11, 0x20, - 0xd0, 0x84, 0x11, 0x20, 0x08, 0x0c, 0x0d, 0x85, 0x90, 0x06, 0x00, 0x10, - 0x20, 0x01, 0x00, 0x01, 0x00, 0xa1, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x06, - 0x01, 0x56, 0x20, 0x01, 0x19, 0x90, 0x20, 0xa9, 0x00, 0x09, 0x20, 0x03, - 0x00, 0x00, 0x80, 0x00, 0x1f, 0x04, 0x29, 0xa1, 0x20, 0x01, 0x19, 0x97, - 0x20, 0x03, 0x80, 0x00, 0x01, 0x5e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x90, 0x85, 0x00, 0x00, 0x01, 0x58, 0x78, 0x38, - 0x90, 0x84, 0xff, 0xf9, 0x90, 0x85, 0x00, 0x04, 0x78, 0x3a, 0x20, 0x09, - 0x19, 0x9d, 0x21, 0x0c, 0x79, 0x5a, 0x00, 0x50, 0x78, 0x38, 0x90, 0x84, - 0xff, 0xfb, 0x90, 0x85, 0x00, 0x06, 0x78, 0x3a, 0x20, 0x09, 0x19, 0x9e, - 0x21, 0x0c, 0x79, 0x5a, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x90, 0x85, 0x00, 0x00, 0x01, 0x58, 0x78, 0x38, 0x90, 0x84, - 0xff, 0xfa, 0x90, 0x85, 0x00, 0x04, 0x78, 0x3a, 0x78, 0x50, 0x90, 0x84, - 0xff, 0xf0, 0x78, 0x52, 0x00, 0xf8, 0x78, 0x38, 0x90, 0x84, 0xff, 0xfb, - 0x90, 0x85, 0x00, 0x05, 0x78, 0x3a, 0x78, 0x50, 0x90, 0x84, 0xff, 0xf0, - 0x00, 0x16, 0x20, 0x09, 0x01, 0x7f, 0x21, 0x0c, 0x91, 0x8e, 0x00, 0x05, - 0x01, 0x40, 0x20, 0x09, 0x00, 0x03, 0x21, 0x0c, 0x91, 0x8c, 0x06, 0x00, - 0x91, 0x8e, 0x04, 0x00, 0x01, 0x18, 0x90, 0x85, 0x00, 0x0a, 0x00, 0x10, - 0x90, 0x85, 0x00, 0x00, 0x00, 0x1e, 0x78, 0x52, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0x06, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, 0x90, 0x82, 0x00, 0x07, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x01, 0x00, 0x20, 0x04, - 0x90, 0x82, 0x00, 0x09, 0x00, 0x0e, 0x00, 0x05, 0x01, 0x56, 0x20, 0xa9, - 0x00, 0x64, 0x78, 0x20, 0x08, 0x0c, 0x2a, 0x7f, 0xd0, 0x9c, 0x11, 0x10, - 0x1f, 0x04, 0x2a, 0x0f, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x26, 0x00, 0x16, - 0x00, 0x06, 0x20, 0x91, 0x80, 0x00, 0x00, 0x0e, 0x20, 0x08, 0x91, 0x86, - 0x00, 0x00, 0x11, 0x18, 0x78, 0x3b, 0x00, 0x07, 0x00, 0x90, 0x91, 0x86, - 0x00, 0x01, 0x11, 0x18, 0x78, 0x3b, 0x00, 0x06, 0x00, 0x60, 0x91, 0x86, - 0x00, 0x02, 0x11, 0x18, 0x78, 0x3b, 0x00, 0x05, 0x00, 0x30, 0x91, 0x86, - 0x00, 0x03, 0x11, 0x18, 0x78, 0x3b, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, - 0x1d, 0x04, 0x2a, 0x38, 0x08, 0x0c, 0x8a, 0x7f, 0x1f, 0x04, 0x2a, 0x38, - 0x08, 0x0c, 0x2a, 0xf6, 0x08, 0x0c, 0x2b, 0x29, 0x78, 0x50, 0x90, 0x85, - 0x10, 0x00, 0x78, 0x52, 0x00, 0x0e, 0x00, 0x1e, 0x01, 0x2e, 0x00, 0x05, - 0x08, 0x0c, 0x2b, 0x29, 0x00, 0x05, 0x00, 0x06, 0x01, 0x56, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x20, 0xa9, 0x00, 0x0a, 0x78, 0x54, 0xd0, 0xac, - 0x11, 0x00, 0x78, 0x54, 0xd0, 0x8c, 0x11, 0x10, 0x1f, 0x04, 0x2a, 0x57, - 0x00, 0xfe, 0x01, 0x5e, 0x00, 0x0e, 0x00, 0x05, 0x1d, 0x04, 0x2a, 0x60, - 0x08, 0x0c, 0x8a, 0x7f, 0x1f, 0x04, 0x2a, 0x60, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x19, 0x9c, 0x20, 0x04, 0x90, 0x86, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x9c, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x01, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x9c, - 0x20, 0x04, 0x90, 0x86, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x05, 0xa0, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x19, 0xa9, 0x21, 0x02, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x09, - 0x01, 0x71, 0x21, 0x04, 0xd0, 0xdc, 0x01, 0x40, 0x20, 0x09, 0x01, 0x70, - 0x21, 0x04, 0x20, 0x0b, 0x00, 0x80, 0xa0, 0x01, 0xa0, 0x01, 0x20, 0x0a, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0x77, 0xb8, 0x01, 0x08, - 0xc0, 0xbc, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, 0x92, 0x94, 0x00, 0x01, - 0x92, 0x15, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x26, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, 0x92, 0x94, 0x00, 0x01, - 0x92, 0x85, 0x10, 0x00, 0x20, 0x0a, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x20, 0x09, 0x01, 0x40, 0x21, 0x14, - 0x92, 0x94, 0x00, 0x01, 0x92, 0x15, 0x22, 0x0a, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x20, 0x09, 0x01, 0x40, 0x21, 0x04, - 0x11, 0x28, 0x08, 0x0c, 0x77, 0xb8, 0x01, 0x10, 0xc0, 0xbc, 0x00, 0x08, - 0xc0, 0xbd, 0x20, 0x0a, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x03, 0x80, 0x78, 0x43, 0x01, 0x01, 0x78, 0x44, 0xd0, 0x84, - 0x1d, 0xe8, 0x20, 0x01, 0x01, 0x09, 0x22, 0x02, 0x78, 0x43, 0x01, 0x00, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x80, 0x78, 0x43, - 0x02, 0x02, 0x78, 0x44, 0xd0, 0x8c, 0x1d, 0xe8, 0x20, 0x79, 0x01, 0x00, - 0x78, 0x14, 0x91, 0x04, 0x92, 0x05, 0x7a, 0x16, 0x20, 0x79, 0x03, 0x80, - 0x78, 0x43, 0x02, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x60, 0x50, 0x90, 0x84, - 0xfb, 0xff, 0x90, 0x85, 0x00, 0x40, 0x60, 0x52, 0x20, 0xa9, 0x00, 0x02, - 0x08, 0x0c, 0x2a, 0x60, 0x60, 0x50, 0x90, 0x85, 0x04, 0x00, 0x90, 0x84, - 0xff, 0x9f, 0x60, 0x52, 0x20, 0xa9, 0x00, 0x05, 0x08, 0x0c, 0x2a, 0x60, - 0x60, 0x54, 0xd0, 0xbc, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0xa9, 0x00, 0x05, - 0x08, 0x0c, 0x2a, 0x60, 0x60, 0x54, 0xd0, 0xac, 0x09, 0x0c, 0x0d, 0x85, - 0x20, 0x09, 0x19, 0xb0, 0x90, 0x84, 0x7e, 0x00, 0x80, 0x07, 0x80, 0x04, - 0x80, 0x04, 0x20, 0x0a, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x60, 0x50, - 0xc0, 0xcd, 0x60, 0x52, 0x00, 0xce, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x16, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0x06, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x60, 0x30, 0x00, 0x06, 0x60, 0x48, 0x00, 0x06, 0x60, 0xe4, - 0x00, 0x06, 0x60, 0xe8, 0x00, 0x06, 0x60, 0x50, 0x00, 0x06, 0x60, 0xec, - 0x00, 0x06, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x04, 0x00, 0x06, 0xc0, 0xfc, - 0x60, 0x06, 0x20, 0x09, 0x08, 0x00, 0x20, 0x01, 0x03, 0x38, 0x20, 0x03, - 0x03, 0x01, 0x81, 0x09, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0x01, 0x03, 0x38, - 0x20, 0x04, 0xd0, 0x84, 0x1d, 0xc0, 0x60, 0x28, 0x00, 0x06, 0x60, 0xe0, - 0x00, 0x06, 0x68, 0x88, 0x00, 0x06, 0x68, 0x8c, 0x00, 0x06, 0x68, 0x90, - 0x00, 0x06, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x10, 0x68, 0x84, 0x00, 0x06, - 0x60, 0x2f, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x00, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, - 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x20, 0x68, 0x03, 0x00, 0x80, 0x00, 0x0e, - 0x68, 0x86, 0x68, 0x97, 0x41, 0x98, 0x00, 0x0e, 0x68, 0x92, 0x00, 0x0e, - 0x68, 0x8e, 0x00, 0x0e, 0x68, 0x8a, 0x00, 0x0e, 0x60, 0xe2, 0x00, 0x0e, - 0x60, 0x2a, 0x00, 0x0e, 0x60, 0x06, 0x00, 0x0e, 0x60, 0x0e, 0x00, 0x0e, - 0x60, 0xee, 0x00, 0x0e, 0x60, 0x52, 0x00, 0x0e, 0x60, 0xea, 0x00, 0x0e, - 0x60, 0xe6, 0x00, 0x0e, 0x60, 0x4a, 0x00, 0x0e, 0x60, 0x32, 0x60, 0x36, - 0x20, 0x08, 0x08, 0x0c, 0x26, 0xd5, 0x00, 0x0e, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x06, 0x01, 0x56, 0x60, 0x50, 0x90, 0x85, - 0x00, 0x40, 0x60, 0x52, 0x60, 0x50, 0x90, 0x84, 0xfb, 0xcf, 0x60, 0x52, - 0x08, 0x0c, 0x2a, 0x7f, 0x90, 0x85, 0x20, 0x00, 0x60, 0x52, 0x20, 0xa9, - 0x00, 0x12, 0x1d, 0x04, 0x2b, 0xb3, 0x08, 0x0c, 0x8a, 0x7f, 0x1f, 0x04, - 0x2b, 0xb3, 0x60, 0x50, 0x90, 0x85, 0x04, 0x00, 0x90, 0x84, 0xdf, 0xbf, - 0x60, 0x52, 0x01, 0x5e, 0x00, 0x0e, 0x00, 0x05, 0x30, 0xbe, 0x30, 0xbe, - 0x2c, 0xc2, 0x2c, 0xc2, 0x2c, 0xce, 0x2c, 0xce, 0x2c, 0xda, 0x2c, 0xda, - 0x2c, 0xe8, 0x2c, 0xe8, 0x2c, 0xf4, 0x2c, 0xf4, 0x2d, 0x02, 0x2d, 0x02, - 0x2d, 0x10, 0x2d, 0x10, 0x2d, 0x22, 0x2d, 0x22, 0x2d, 0x2e, 0x2d, 0x2e, - 0x2d, 0x3c, 0x2d, 0x3c, 0x2d, 0x5a, 0x2d, 0x5a, 0x2d, 0x7a, 0x2d, 0x7a, - 0x2d, 0x4a, 0x2d, 0x4a, 0x2d, 0x6a, 0x2d, 0x6a, 0x2d, 0x88, 0x2d, 0x88, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x9a, 0x2d, 0x9a, 0x2d, 0xa6, 0x2d, 0xa6, - 0x2d, 0xb4, 0x2d, 0xb4, 0x2d, 0xc2, 0x2d, 0xc2, 0x2d, 0xd2, 0x2d, 0xd2, - 0x2d, 0xe0, 0x2d, 0xe0, 0x2d, 0xf0, 0x2d, 0xf0, 0x2e, 0x00, 0x2e, 0x00, - 0x2e, 0x12, 0x2e, 0x12, 0x2e, 0x20, 0x2e, 0x20, 0x2e, 0x30, 0x2e, 0x30, - 0x2e, 0x52, 0x2e, 0x52, 0x2e, 0x76, 0x2e, 0x76, 0x2e, 0x40, 0x2e, 0x40, - 0x2e, 0x64, 0x2e, 0x64, 0x2e, 0x86, 0x2e, 0x86, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2e, 0x9a, 0x2e, 0x9a, 0x2e, 0xa6, 0x2e, 0xa6, 0x2e, 0xb4, 0x2e, 0xb4, - 0x2e, 0xc2, 0x2e, 0xc2, 0x2e, 0xd2, 0x2e, 0xd2, 0x2e, 0xe0, 0x2e, 0xe0, - 0x2e, 0xf0, 0x2e, 0xf0, 0x2f, 0x00, 0x2f, 0x00, 0x2f, 0x12, 0x2f, 0x12, - 0x2f, 0x20, 0x2f, 0x20, 0x2f, 0x30, 0x2f, 0x30, 0x2f, 0x40, 0x2f, 0x40, - 0x2f, 0x52, 0x2f, 0x52, 0x2f, 0x62, 0x2f, 0x62, 0x2f, 0x74, 0x2f, 0x74, - 0x2f, 0x86, 0x2f, 0x86, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2f, 0x9a, 0x2f, 0x9a, - 0x2f, 0xa8, 0x2f, 0xa8, 0x2f, 0xb8, 0x2f, 0xb8, 0x2f, 0xc8, 0x2f, 0xc8, - 0x2f, 0xda, 0x2f, 0xda, 0x2f, 0xea, 0x2f, 0xea, 0x2f, 0xfc, 0x2f, 0xfc, - 0x30, 0x0e, 0x30, 0x0e, 0x30, 0x22, 0x30, 0x22, 0x30, 0x32, 0x30, 0x32, - 0x30, 0x44, 0x30, 0x44, 0x30, 0x56, 0x30, 0x56, 0x30, 0x6a, 0x30, 0x6a, - 0x30, 0x7b, 0x30, 0x7b, 0x30, 0x8e, 0x30, 0x8e, 0x30, 0xa1, 0x30, 0xa1, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, 0x2d, 0x20, - 0x2d, 0x20, 0x2d, 0x20, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0xa0, 0x01, 0x0c, 0xf0, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, - 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, - 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x21, 0x14, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x21, 0x14, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x04, 0x30, 0xb6, - 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, - 0x08, 0x04, 0x30, 0xb6, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, - 0x04, 0xd8, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, 0x01, 0xd6, - 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, 0x08, 0x0c, - 0xad, 0x62, 0x08, 0x0c, 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, - 0x21, 0x14, 0x04, 0x40, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, 0x01, 0xc6, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, 0x27, 0x8f, - 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0xad, 0x62, - 0x08, 0x0c, 0x21, 0x14, 0x00, 0xa8, 0x01, 0x06, 0x00, 0x06, 0x01, 0x26, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, 0x01, 0x56, 0x08, 0x0c, - 0x27, 0x8f, 0x08, 0x0c, 0x20, 0xea, 0x08, 0x0c, 0xad, 0x62, 0x08, 0x0c, - 0x22, 0xc8, 0x08, 0x0c, 0x13, 0xd4, 0x08, 0x0c, 0x21, 0x14, 0x00, 0x00, - 0x01, 0x5e, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, 0x01, 0x2e, - 0x00, 0x0e, 0x01, 0x0e, 0x00, 0x0d, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x26, - 0x00, 0x46, 0x90, 0x26, 0x08, 0x0c, 0x6b, 0xcf, 0x19, 0x04, 0x31, 0xf6, - 0x72, 0xdc, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x05, 0x11, 0x10, - 0xd2, 0x9c, 0x01, 0x48, 0xd2, 0x84, 0x11, 0x38, 0xd2, 0xbc, 0x19, 0x04, - 0x31, 0xf6, 0x08, 0x0c, 0x31, 0xfb, 0x08, 0x04, 0x31, 0xf6, 0xd2, 0xcc, - 0x19, 0x04, 0x31, 0xf6, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x20, 0x70, 0xaf, - 0xff, 0xff, 0x08, 0x04, 0x31, 0xf6, 0xd2, 0x94, 0x01, 0x20, 0x70, 0xaf, - 0xff, 0xff, 0x08, 0x04, 0x31, 0xf6, 0x08, 0x0c, 0x34, 0x7d, 0x01, 0x60, - 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x28, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, - 0x08, 0x04, 0x31, 0x6f, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, 0x31, 0xf6, - 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, 0x72, 0x94, 0xd2, 0x84, 0x09, 0x04, - 0x31, 0x6f, 0xd2, 0x8c, 0x19, 0x04, 0x31, 0x6f, 0x00, 0x36, 0x73, 0xac, - 0x93, 0x8e, 0xff, 0xff, 0x11, 0x10, 0x20, 0x19, 0x00, 0x01, 0x83, 0x14, - 0x92, 0xe0, 0x1d, 0x80, 0x2c, 0x04, 0x93, 0x8c, 0x00, 0x01, 0x01, 0x20, - 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0x90, 0x84, 0x00, 0xff, - 0x97, 0x0e, 0x09, 0x04, 0x31, 0x65, 0x90, 0x8e, 0x00, 0x00, 0x09, 0x04, - 0x31, 0x65, 0x90, 0x8e, 0x00, 0xff, 0x11, 0x60, 0x72, 0x30, 0xd2, 0x84, - 0x19, 0x04, 0x31, 0x6a, 0x72, 0x94, 0xc2, 0x8d, 0x72, 0x96, 0x70, 0xaf, - 0xff, 0xff, 0x00, 0x3e, 0x08, 0x04, 0x31, 0x6f, 0x20, 0x09, 0x18, 0x0d, - 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x50, 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, - 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, 0x01, 0x18, 0x70, 0xaf, 0xff, 0xff, - 0x04, 0x88, 0x90, 0x0e, 0x08, 0x0c, 0x26, 0x8c, 0x08, 0x0c, 0x67, 0x49, - 0x15, 0x38, 0x90, 0x06, 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xac, 0x90, 0x05, - 0x01, 0x48, 0x00, 0xc6, 0x20, 0x60, 0x08, 0x0c, 0x8e, 0xee, 0x00, 0xce, - 0x09, 0x0c, 0x92, 0x8d, 0xb8, 0xaf, 0x00, 0x00, 0x08, 0x0c, 0x6c, 0x11, - 0x11, 0x68, 0x70, 0x30, 0xd0, 0x8c, 0x01, 0x30, 0xb8, 0x00, 0xd0, 0xbc, - 0x01, 0x38, 0x08, 0x0c, 0x6a, 0xae, 0x01, 0x20, 0x08, 0x0c, 0x32, 0x14, - 0x01, 0x48, 0x00, 0x28, 0x08, 0x0c, 0x33, 0x60, 0x08, 0x0c, 0x32, 0x40, - 0x01, 0x18, 0x83, 0x18, 0x08, 0x04, 0x31, 0x09, 0x73, 0xae, 0x00, 0x10, - 0x70, 0xaf, 0xff, 0xff, 0x00, 0x3e, 0x08, 0x04, 0x31, 0xf6, 0x97, 0x80, - 0x34, 0x8e, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, 0x20, 0x41, - 0x00, 0x7e, 0x70, 0xac, 0x90, 0x96, 0xff, 0xff, 0x11, 0x18, 0x90, 0x0e, - 0x28, 0xa8, 0x00, 0x50, 0x98, 0x12, 0x02, 0x20, 0x20, 0x08, 0x98, 0x02, - 0x20, 0xa8, 0x00, 0x20, 0x70, 0xaf, 0xff, 0xff, 0x08, 0x04, 0x31, 0xf6, - 0x27, 0x00, 0x01, 0x56, 0x00, 0x16, 0x91, 0x06, 0x09, 0x04, 0x31, 0xeb, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x58, 0x00, 0x26, - 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, 0x01, 0x20, - 0x20, 0x09, 0xff, 0xff, 0x08, 0x04, 0x31, 0xf3, 0xc4, 0x84, 0x08, 0x0c, - 0x67, 0xb4, 0x01, 0x68, 0x08, 0x0c, 0xd6, 0x45, 0x19, 0x04, 0x31, 0xeb, - 0x08, 0x0c, 0x34, 0x7d, 0x19, 0x04, 0x31, 0xeb, 0x08, 0x0c, 0x67, 0x49, - 0x19, 0x04, 0x31, 0xf3, 0x00, 0x08, 0xc4, 0x85, 0xb8, 0xbb, 0x05, 0x20, - 0xb8, 0xac, 0x90, 0x05, 0x01, 0x48, 0x00, 0xc6, 0x20, 0x60, 0x08, 0x0c, - 0x8e, 0xee, 0x00, 0xce, 0x09, 0x0c, 0x92, 0x8d, 0xb8, 0xaf, 0x00, 0x00, - 0x08, 0x0c, 0x6c, 0x11, 0x11, 0x30, 0x70, 0x30, 0xd0, 0x8c, 0x01, 0xf8, - 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0xe0, 0x72, 0x94, 0xd2, 0x8c, 0x01, 0x80, - 0x08, 0x0c, 0x6c, 0x11, 0x90, 0x82, 0x00, 0x06, 0x02, 0xe0, 0xd4, 0x84, - 0x11, 0x18, 0x08, 0x0c, 0x67, 0x6e, 0x00, 0x28, 0x08, 0x0c, 0x33, 0xf3, - 0x01, 0xa0, 0x08, 0x0c, 0x34, 0x1e, 0x00, 0x88, 0x08, 0x0c, 0x33, 0x60, - 0x08, 0x0c, 0xd6, 0x45, 0x11, 0x60, 0x08, 0x0c, 0x32, 0x40, 0x01, 0x88, - 0x00, 0x40, 0x08, 0x0c, 0xd6, 0x45, 0x11, 0x18, 0x08, 0x0c, 0x33, 0xf3, - 0x01, 0x10, 0x04, 0x51, 0x01, 0x40, 0x00, 0x1e, 0x81, 0x08, 0x01, 0x5e, - 0x1f, 0x04, 0x31, 0x88, 0x70, 0xaf, 0xff, 0xff, 0x00, 0x18, 0x00, 0x1e, - 0x01, 0x5e, 0x71, 0xae, 0x00, 0x4e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0x16, 0x70, 0xaf, 0x00, 0x01, 0x20, 0x09, - 0x00, 0x7e, 0x08, 0x0c, 0x67, 0x49, 0x11, 0x68, 0xb8, 0x13, 0x00, 0xff, - 0xb8, 0x17, 0xff, 0xfe, 0x08, 0x0c, 0x33, 0x60, 0x04, 0xa9, 0x01, 0x28, - 0x70, 0xdc, 0xc0, 0xbd, 0x70, 0xde, 0x08, 0x0c, 0xd3, 0x89, 0x00, 0x1e, - 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, 0x00, 0xd6, 0x00, 0xc6, - 0x20, 0x01, 0x18, 0x4c, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x42, - 0x08, 0x0c, 0xb1, 0xdd, 0x01, 0xd0, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, - 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, - 0x20, 0x01, 0x00, 0x00, 0x08, 0x0c, 0x66, 0xfa, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0xa8, 0x80, 0x00, 0x70, 0xaa, 0x01, 0x2e, 0x20, 0x09, - 0x00, 0x04, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x76, - 0x00, 0xd6, 0x00, 0xc6, 0x20, 0x01, 0x18, 0x4c, 0x20, 0x04, 0x90, 0x84, - 0x00, 0xff, 0xb8, 0x42, 0x08, 0x0c, 0xb1, 0xdd, 0x05, 0x48, 0x2b, 0x00, - 0x60, 0x12, 0xb8, 0x00, 0xc0, 0xc4, 0xb8, 0x02, 0xb8, 0xa0, 0x90, 0x86, - 0x00, 0x7e, 0x01, 0x40, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x06, 0x11, 0x10, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd3, 0xb6, - 0x60, 0x23, 0x00, 0x01, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x70, 0xa8, 0x80, 0x00, 0x70, 0xaa, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x26, - 0x20, 0x09, 0x00, 0x80, 0x08, 0x0c, 0x67, 0x49, 0x11, 0x40, 0xb8, 0x13, - 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfc, 0x00, 0x39, 0x01, 0x10, 0x70, 0xe3, - 0xff, 0xff, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, - 0x00, 0x76, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0xd0, - 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x01, - 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0xfa, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0xe4, 0x80, 0x00, - 0x70, 0xe6, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, 0xb2, 0x0a, - 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xde, 0x00, 0x7e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, 0x67, 0x49, 0x11, 0xb8, 0xb8, 0x13, - 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfd, 0xb8, 0xd7, 0x00, 0x04, 0x08, 0x0c, - 0xb1, 0x16, 0x01, 0x70, 0x2b, 0x00, 0x60, 0x12, 0x63, 0x16, 0x60, 0x23, - 0x00, 0x01, 0x62, 0x0a, 0x08, 0x0c, 0xd3, 0xb6, 0x20, 0x09, 0x00, 0x22, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x36, - 0x00, 0x26, 0x00, 0xb6, 0x21, 0xf0, 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, - 0x08, 0x0c, 0x97, 0xbb, 0x08, 0x0c, 0x97, 0x27, 0x08, 0x0c, 0xac, 0x4d, - 0x08, 0x0c, 0xc1, 0x79, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, 0x3e, 0x08, - 0x21, 0x30, 0x81, 0xff, 0x01, 0x20, 0x20, 0xa9, 0x00, 0x7e, 0x90, 0x0e, - 0x00, 0x18, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, - 0x67, 0xb4, 0x11, 0x40, 0x96, 0x86, 0x00, 0x02, 0x11, 0x18, 0xb8, 0x00, - 0xd0, 0xbc, 0x11, 0x10, 0x08, 0x0c, 0x61, 0xb7, 0x00, 0x1e, 0x81, 0x08, - 0x1f, 0x04, 0x32, 0xfa, 0x96, 0x86, 0x00, 0x01, 0x19, 0x0c, 0x34, 0x51, - 0x00, 0xbe, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x46, 0x00, 0x36, 0x00, 0x26, - 0x00, 0x16, 0x00, 0xb6, 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, 0x62, 0x10, - 0x22, 0x58, 0xba, 0xa0, 0x00, 0x26, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, - 0x97, 0xb0, 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x96, 0x6d, - 0x2c, 0x08, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, 0x00, 0x1e, 0x01, 0x0e, - 0x09, 0x0c, 0xad, 0x18, 0xba, 0x10, 0xbb, 0x14, 0xbc, 0x84, 0x08, 0x0c, - 0x61, 0xb7, 0xba, 0x12, 0xbb, 0x16, 0xbc, 0x86, 0x00, 0xbe, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0x06, 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x00, 0xbe, 0x90, 0x86, 0x00, 0x80, 0x01, 0x50, 0x20, 0x71, 0x18, 0x00, - 0x70, 0xa8, 0x90, 0x05, 0x01, 0x10, 0x80, 0x01, 0x70, 0xaa, 0x00, 0x0e, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x70, 0xe4, 0x90, 0x05, - 0x0d, 0xc0, 0x80, 0x01, 0x70, 0xe6, 0x0c, 0xa8, 0xb8, 0x00, 0xc0, 0x8c, - 0xb8, 0x02, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0xb6, - 0x00, 0x46, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x01, 0x56, 0x21, 0x78, - 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, 0x81, 0xff, 0x11, 0x18, 0x20, 0xa9, - 0x00, 0x01, 0x00, 0x78, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xc4, 0x01, 0x40, - 0xd0, 0xa4, 0x01, 0x30, 0x90, 0x06, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2d, - 0x08, 0x0c, 0xea, 0x8d, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x16, 0x00, 0x26, - 0x92, 0x8e, 0x00, 0x7e, 0x09, 0x04, 0x33, 0xcf, 0x92, 0x8e, 0x00, 0x7f, - 0x09, 0x04, 0x33, 0xcf, 0x92, 0x8e, 0x00, 0x80, 0x05, 0xf0, 0x92, 0x88, - 0x10, 0x00, 0x21, 0x0c, 0x81, 0xff, 0x05, 0xc8, 0x8f, 0xff, 0x11, 0x50, - 0x20, 0x01, 0x19, 0x8e, 0x00, 0x06, 0x20, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x33, 0xe0, 0x00, 0x0e, 0x20, 0x03, 0x00, 0x00, 0x00, 0xb6, 0x00, 0xc6, - 0x21, 0x58, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x6b, 0xdb, 0x00, 0xce, - 0x00, 0xbe, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x96, 0x6d, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0x26, 0x21, 0x58, 0xba, 0x04, 0x92, 0x94, 0x00, 0xff, 0x92, 0x86, - 0x00, 0x06, 0x11, 0x18, 0xb8, 0x07, 0x04, 0x04, 0x00, 0x28, 0x20, 0x01, - 0x00, 0x04, 0x80, 0x07, 0x92, 0x15, 0xba, 0x06, 0x00, 0x2e, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0x16, 0x2c, 0x08, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x1e, - 0x00, 0x7e, 0x00, 0x2e, 0x82, 0x10, 0x1f, 0x04, 0x33, 0x85, 0x01, 0x0e, - 0x09, 0x0c, 0xad, 0x18, 0x01, 0x5e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0x46, 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xc4, - 0x01, 0x40, 0xd0, 0xa4, 0x01, 0x30, 0x90, 0x06, 0x22, 0x20, 0x20, 0x09, - 0x00, 0x29, 0x08, 0x0c, 0xea, 0x8d, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x4e, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x72, 0x94, - 0x82, 0xff, 0x01, 0xe8, 0x08, 0x0c, 0x6c, 0x09, 0x11, 0xd0, 0x21, 0x00, - 0x08, 0x0c, 0x26, 0xbf, 0x81, 0xff, 0x01, 0xb8, 0x20, 0x19, 0x00, 0x01, - 0x83, 0x14, 0x92, 0xe0, 0x1d, 0x80, 0x2c, 0x04, 0xd3, 0x84, 0x01, 0x20, - 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x00, 0x10, 0x90, 0x84, 0x00, 0xff, - 0x91, 0x16, 0x01, 0x38, 0x90, 0x96, 0x00, 0xff, 0x01, 0x10, 0x83, 0x18, - 0x0c, 0x68, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, 0x00, 0x36, 0x20, 0x19, - 0x00, 0x29, 0x00, 0xc1, 0x00, 0x3e, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, - 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x65, 0x01, 0x58, 0x00, 0x16, - 0x00, 0xc6, 0x20, 0x61, 0x1b, 0x39, 0x00, 0x1e, 0x61, 0x12, 0x08, 0x0c, - 0x33, 0x15, 0x00, 0x1e, 0x08, 0x0c, 0x67, 0x6e, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x21, 0x10, 0x08, 0x0c, - 0xa7, 0xe2, 0x08, 0x0c, 0xed, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0xcc, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xb6, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x18, 0x20, 0xa9, 0x08, 0x00, - 0x00, 0x10, 0x20, 0xa9, 0x07, 0x82, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x10, - 0x90, 0x0e, 0x00, 0x10, 0x20, 0x09, 0x00, 0x7e, 0x91, 0x80, 0x10, 0x00, - 0x20, 0x04, 0x90, 0x5d, 0x01, 0x30, 0x86, 0xff, 0x01, 0x10, 0xb8, 0x00, - 0xd0, 0xbc, 0x09, 0x0c, 0x67, 0x6e, 0x81, 0x08, 0x1f, 0x04, 0x34, 0x62, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x7f, 0x00, 0x00, 0x60, 0x80, 0x90, 0x84, - 0x00, 0xff, 0x60, 0x82, 0x60, 0xb3, 0x00, 0x00, 0x00, 0xbe, 0x00, 0xce, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0xbc, 0x00, 0x05, - 0x20, 0x11, 0x18, 0x48, 0x22, 0x14, 0xd2, 0xec, 0x00, 0x05, 0x00, 0x26, - 0x20, 0x11, 0x18, 0x67, 0x22, 0x14, 0xd2, 0xdc, 0x00, 0x2e, 0x00, 0x05, - 0x7e, 0xef, 0x7d, 0xe8, 0x7c, 0xe4, 0x80, 0xe2, 0x7b, 0xe1, 0x80, 0xe0, - 0x80, 0xdc, 0x80, 0xda, 0x7a, 0xd9, 0x80, 0xd6, 0x80, 0xd5, 0x80, 0xd4, - 0x80, 0xd3, 0x80, 0xd2, 0x80, 0xd1, 0x79, 0xce, 0x78, 0xcd, 0x80, 0xcc, - 0x80, 0xcb, 0x80, 0xca, 0x80, 0xc9, 0x80, 0xc7, 0x80, 0xc6, 0x77, 0xc5, - 0x76, 0xc3, 0x80, 0xbc, 0x80, 0xba, 0x75, 0xb9, 0x80, 0xb6, 0x74, 0xb5, - 0x73, 0xb4, 0x72, 0xb3, 0x80, 0xb2, 0x80, 0xb1, 0x80, 0xae, 0x71, 0xad, - 0x80, 0xac, 0x70, 0xab, 0x6f, 0xaa, 0x6e, 0xa9, 0x80, 0xa7, 0x6d, 0xa6, - 0x6c, 0xa5, 0x6b, 0xa3, 0x6a, 0x9f, 0x69, 0x9e, 0x68, 0x9d, 0x80, 0x9b, - 0x80, 0x98, 0x67, 0x97, 0x66, 0x90, 0x65, 0x8f, 0x64, 0x88, 0x63, 0x84, - 0x62, 0x82, 0x80, 0x81, 0x80, 0x80, 0x61, 0x7c, 0x60, 0x7a, 0x80, 0x79, - 0x5f, 0x76, 0x80, 0x75, 0x80, 0x74, 0x80, 0x73, 0x80, 0x72, 0x80, 0x71, - 0x80, 0x6e, 0x5e, 0x6d, 0x80, 0x6c, 0x5d, 0x6b, 0x5c, 0x6a, 0x5b, 0x69, - 0x80, 0x67, 0x5a, 0x66, 0x59, 0x65, 0x58, 0x63, 0x57, 0x5c, 0x56, 0x5a, - 0x55, 0x59, 0x80, 0x56, 0x80, 0x55, 0x54, 0x54, 0x53, 0x53, 0x52, 0x52, - 0x51, 0x51, 0x50, 0x4e, 0x4f, 0x4d, 0x80, 0x4c, 0x80, 0x4b, 0x4e, 0x4a, - 0x4d, 0x49, 0x80, 0x47, 0x4c, 0x46, 0x80, 0x45, 0x80, 0x43, 0x80, 0x3c, - 0x80, 0x3a, 0x80, 0x39, 0x80, 0x36, 0x4b, 0x35, 0x80, 0x34, 0x4a, 0x33, - 0x49, 0x32, 0x48, 0x31, 0x80, 0x2e, 0x47, 0x2d, 0x46, 0x2c, 0x45, 0x2b, - 0x44, 0x2a, 0x43, 0x29, 0x42, 0x27, 0x80, 0x26, 0x80, 0x25, 0x41, 0x23, - 0x40, 0x1f, 0x3f, 0x1e, 0x3e, 0x1d, 0x3d, 0x1b, 0x3c, 0x18, 0x80, 0x17, - 0x80, 0x10, 0x3b, 0x0f, 0x3a, 0x08, 0x80, 0x04, 0x39, 0x02, 0x80, 0x01, - 0x80, 0x00, 0x80, 0x00, 0x38, 0x00, 0x37, 0x00, 0x36, 0x00, 0x80, 0x00, - 0x35, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x34, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x33, 0x00, - 0x32, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x31, 0x00, 0x30, 0x00, 0x80, 0x00, 0x80, 0x00, 0x2f, 0x00, - 0x80, 0x00, 0x2e, 0x00, 0x2d, 0x00, 0x2c, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x2b, 0x00, 0x80, 0x00, 0x2a, 0x00, 0x29, 0x00, 0x28, 0x00, - 0x80, 0x00, 0x27, 0x00, 0x26, 0x00, 0x25, 0x00, 0x24, 0x00, 0x23, 0x00, - 0x22, 0x00, 0x80, 0x00, 0x80, 0x00, 0x21, 0x00, 0x20, 0x00, 0x1f, 0x00, - 0x1e, 0x00, 0x1d, 0x00, 0x1c, 0x00, 0x80, 0x00, 0x80, 0x00, 0x1b, 0x00, - 0x1a, 0x00, 0x80, 0x00, 0x19, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x18, 0x00, 0x80, 0x00, 0x17, 0x00, - 0x16, 0x00, 0x15, 0x00, 0x80, 0x00, 0x14, 0x00, 0x13, 0x00, 0x12, 0x00, - 0x11, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x80, 0x00, 0x80, 0x00, 0x0e, 0x00, - 0x0d, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0x09, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x08, 0x00, 0x07, 0x00, 0x80, 0x00, 0x06, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x05, 0x00, 0x04, 0x00, 0x03, 0x00, 0x80, 0x00, - 0x02, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x01, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x20, 0x71, 0x18, 0x9e, - 0x70, 0x03, 0x00, 0x02, 0x90, 0x06, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4a, - 0x70, 0x4e, 0x70, 0x0e, 0x70, 0x42, 0x70, 0x46, 0x70, 0x3b, 0x18, 0xba, - 0x70, 0x3f, 0x18, 0xba, 0x70, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x10, 0x72, - 0x09, 0x0c, 0x0d, 0x85, 0x29, 0x00, 0x70, 0x6a, 0xa8, 0x67, 0x00, 0x02, - 0xa8, 0xab, 0xdc, 0xb0, 0x08, 0x0c, 0x10, 0x72, 0x09, 0x0c, 0x0d, 0x85, - 0x29, 0x00, 0x70, 0x6e, 0xa8, 0x67, 0x00, 0x02, 0xa8, 0xab, 0xdc, 0xb0, - 0x00, 0x05, 0x20, 0x71, 0x18, 0x9e, 0x70, 0x04, 0x00, 0x02, 0x35, 0xbd, - 0x35, 0xbe, 0x35, 0xd1, 0x35, 0xe5, 0x00, 0x05, 0x10, 0x04, 0x35, 0xce, - 0x0e, 0x04, 0x35, 0xce, 0x20, 0x79, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x0c, 0x90, 0x05, 0x11, 0x28, 0x70, 0x0f, 0x00, 0x01, - 0x01, 0x2e, 0x04, 0x68, 0x00, 0x05, 0x01, 0x2e, 0x0c, 0xe8, 0x20, 0x79, - 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x4c, 0xa8, 0x6c, 0x90, 0x8e, - 0x01, 0x00, 0x01, 0x28, 0x90, 0x86, 0x02, 0x00, 0x09, 0x04, 0x36, 0xb9, - 0x00, 0x05, 0x70, 0x18, 0x20, 0x48, 0x20, 0x61, 0x18, 0x00, 0x70, 0x1c, - 0x08, 0x07, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x94, 0x00, 0xff, - 0x92, 0x96, 0x00, 0x29, 0x11, 0x20, 0xaa, 0x78, 0xd2, 0xfc, 0x01, 0x28, - 0x00, 0x05, 0x90, 0x86, 0x01, 0x03, 0x01, 0x08, 0x00, 0x05, 0x20, 0x79, - 0x00, 0x00, 0x20, 0x61, 0x18, 0x00, 0x70, 0x1c, 0x08, 0x07, 0x20, 0x61, - 0x18, 0x00, 0x78, 0x80, 0x90, 0x8a, 0x00, 0x40, 0x12, 0x10, 0x61, 0xd0, - 0x00, 0x42, 0x21, 0x00, 0x90, 0x8a, 0x00, 0x3f, 0x1a, 0x04, 0x36, 0xb6, - 0x61, 0xd0, 0x08, 0x04, 0x36, 0x4b, 0x36, 0x8d, 0x36, 0xc5, 0x36, 0xb6, - 0x36, 0xd1, 0x36, 0xdb, 0x36, 0xe1, 0x36, 0xe5, 0x36, 0xf5, 0x36, 0xf9, - 0x37, 0x0f, 0x37, 0x15, 0x37, 0x1b, 0x37, 0x26, 0x37, 0x31, 0x37, 0x40, - 0x37, 0x4f, 0x37, 0x5d, 0x37, 0x74, 0x37, 0x8f, 0x36, 0xb6, 0x38, 0x3a, - 0x38, 0x78, 0x39, 0x1d, 0x39, 0x2e, 0x39, 0x51, 0x36, 0xb6, 0x36, 0xb6, - 0x36, 0xb6, 0x39, 0x89, 0x39, 0xa9, 0x39, 0xb2, 0x39, 0xde, 0x39, 0xe4, - 0x36, 0xb6, 0x3a, 0x2a, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, - 0x36, 0xb6, 0x3a, 0x35, 0x3a, 0x3e, 0x3a, 0x46, 0x3a, 0x48, 0x36, 0xb6, - 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x3a, 0x78, - 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x3a, 0x95, - 0x3b, 0x19, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, - 0x36, 0xb6, 0x00, 0x02, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0xa5, 0x3b, 0xbe, - 0x3b, 0xee, 0x3e, 0x94, 0x36, 0xb6, 0x53, 0xf5, 0x36, 0xb6, 0x36, 0xb6, - 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, 0x36, 0xb6, - 0x37, 0x0f, 0x37, 0x15, 0x43, 0x97, 0x58, 0x64, 0x43, 0xb5, 0x54, 0x84, - 0x54, 0xd6, 0x55, 0xe1, 0x36, 0xb6, 0x56, 0x43, 0x56, 0x7f, 0x56, 0xb0, - 0x57, 0xc0, 0x56, 0xdd, 0x57, 0x40, 0x36, 0xb6, 0x43, 0xb9, 0x45, 0x7f, - 0x45, 0x95, 0x45, 0xba, 0x46, 0x1f, 0x46, 0x93, 0x46, 0xb3, 0x47, 0x2a, - 0x47, 0x86, 0x47, 0xe2, 0x47, 0xe5, 0x48, 0x0a, 0x48, 0x7c, 0x48, 0xe6, - 0x48, 0xee, 0x4a, 0x23, 0x4b, 0xcb, 0x4b, 0xff, 0x4e, 0x63, 0x36, 0xb6, - 0x4e, 0x81, 0x4f, 0x48, 0x50, 0x31, 0x50, 0x8b, 0x36, 0xb6, 0x51, 0x1e, - 0x36, 0xb6, 0x51, 0x34, 0x51, 0x4f, 0x48, 0xee, 0x53, 0x95, 0x71, 0x4c, - 0x00, 0x00, 0x20, 0x21, 0x40, 0x00, 0x08, 0x0c, 0x4c, 0x7d, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x36, 0x97, 0x00, 0x10, 0x01, 0x2e, - 0x0c, 0xc0, 0x7c, 0x36, 0x94, 0x86, 0x40, 0x00, 0x01, 0x18, 0x78, 0x33, - 0x00, 0x11, 0x00, 0x10, 0x78, 0x33, 0x00, 0x10, 0x7c, 0x82, 0x79, 0x86, - 0x7a, 0x8a, 0x7b, 0x8e, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x70, 0x07, 0x00, 0x01, - 0x20, 0x91, 0x50, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x21, 0x40, 0x01, 0x08, 0xb0, 0x20, 0x21, 0x40, 0x02, 0x08, 0x98, - 0x20, 0x21, 0x40, 0x03, 0x08, 0x80, 0x20, 0x21, 0x40, 0x05, 0x08, 0x68, - 0x20, 0x21, 0x40, 0x06, 0x08, 0x50, 0x20, 0x39, 0x00, 0x01, 0x90, 0x2e, - 0x25, 0x20, 0x7b, 0x88, 0x7a, 0x8c, 0x78, 0x84, 0x79, 0x90, 0x81, 0xff, - 0x0d, 0x98, 0x08, 0x04, 0x4c, 0x8a, 0x20, 0x39, 0x00, 0x01, 0x90, 0x2e, - 0x25, 0x20, 0x7b, 0x88, 0x7a, 0x8c, 0x78, 0x84, 0x79, 0x90, 0x08, 0x04, - 0x4c, 0x8d, 0x79, 0x84, 0x78, 0x88, 0x21, 0x14, 0x20, 0x0a, 0x08, 0x04, - 0x36, 0x8d, 0x79, 0x84, 0x21, 0x14, 0x08, 0x04, 0x36, 0x8d, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x99, 0x00, 0x21, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x00, 0x21, 0x20, 0xa9, 0x00, 0x1f, 0x40, 0x03, 0x79, 0x84, 0x7a, 0x88, - 0x7b, 0x8c, 0x08, 0x04, 0x36, 0x8d, 0x78, 0x84, 0x20, 0x60, 0x08, 0x04, - 0x37, 0x42, 0x20, 0x09, 0x00, 0x03, 0x20, 0x11, 0x00, 0x03, 0x20, 0x19, - 0x00, 0x14, 0x78, 0x9b, 0x01, 0x37, 0x78, 0x93, 0xff, 0xff, 0x20, 0x01, - 0x18, 0x8f, 0x20, 0x04, 0x90, 0x05, 0x01, 0x18, 0x78, 0x96, 0x08, 0x04, - 0x36, 0x8d, 0x78, 0x97, 0x00, 0x01, 0x08, 0x04, 0x36, 0x8d, 0x20, 0x39, - 0x00, 0x01, 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x36, 0xc9, 0x20, 0x39, - 0x00, 0x01, 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x36, 0xd5, 0x79, 0xa0, - 0x91, 0x82, 0x00, 0x40, 0x02, 0x10, 0x08, 0x04, 0x36, 0xc2, 0x21, 0x38, - 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, 0x36, 0xc9, 0x79, 0xa0, 0x91, 0x82, - 0x00, 0x40, 0x02, 0x10, 0x08, 0x04, 0x36, 0xc2, 0x21, 0x38, 0x7d, 0x98, - 0x7c, 0x9c, 0x08, 0x04, 0x36, 0xd5, 0x79, 0xa0, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x10, 0x08, 0x04, 0x36, 0xc2, 0x21, 0xe8, 0x79, 0x84, 0x78, 0x88, - 0x20, 0xa9, 0x00, 0x01, 0x21, 0xa0, 0x40, 0x04, 0x08, 0x04, 0x36, 0x8d, - 0x20, 0x61, 0x08, 0x00, 0xe1, 0x0c, 0x90, 0x06, 0x2c, 0x15, 0x92, 0x00, - 0x8c, 0x60, 0x81, 0x09, 0x1d, 0xd8, 0x20, 0x10, 0x90, 0x05, 0x09, 0x04, - 0x36, 0x8d, 0x08, 0x04, 0x36, 0xbc, 0x79, 0xa0, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x10, 0x08, 0x04, 0x36, 0xc2, 0x21, 0xe0, 0x20, 0xa9, 0x00, 0x01, - 0x79, 0x84, 0x21, 0x98, 0x40, 0x12, 0x08, 0x04, 0x36, 0x8d, 0x20, 0x69, - 0x18, 0x47, 0x78, 0x84, 0x79, 0x90, 0x91, 0x1a, 0x1a, 0x04, 0x36, 0xc2, - 0x80, 0x19, 0x09, 0x04, 0x36, 0xc2, 0x68, 0x4a, 0x69, 0x42, 0x78, 0x8c, - 0x68, 0x52, 0x78, 0x88, 0x68, 0x56, 0x90, 0x06, 0x68, 0x5a, 0x68, 0x5e, - 0x08, 0x0c, 0x7a, 0xe7, 0x08, 0x04, 0x36, 0x8d, 0x20, 0x69, 0x18, 0x47, - 0x78, 0x84, 0x79, 0x94, 0x91, 0x1a, 0x1a, 0x04, 0x36, 0xc2, 0x80, 0x19, - 0x09, 0x04, 0x36, 0xc2, 0x68, 0x4e, 0x69, 0x46, 0x78, 0x8c, 0x68, 0x62, - 0x78, 0x88, 0x68, 0x66, 0x90, 0x06, 0x68, 0x6a, 0x68, 0x6e, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6d, 0x66, 0x01, 0x2e, 0x08, 0x04, - 0x36, 0x8d, 0x90, 0x2e, 0x25, 0x20, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, 0x79, 0x84, 0x7b, 0x88, 0x7a, 0x8c, - 0x20, 0xa9, 0x00, 0x05, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x18, 0xa6, - 0x41, 0x01, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x20, 0x09, 0x00, 0x20, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x37, 0xb3, - 0x00, 0x05, 0xa8, 0x64, 0x20, 0x08, 0x90, 0x84, 0x00, 0xff, 0x90, 0x96, - 0x00, 0x11, 0x01, 0x68, 0x90, 0x96, 0x00, 0x19, 0x01, 0x50, 0x90, 0x96, - 0x00, 0x15, 0x01, 0x38, 0x90, 0x96, 0x00, 0x48, 0x01, 0x20, 0x90, 0x96, - 0x00, 0x29, 0x19, 0x04, 0x36, 0xbf, 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, - 0x09, 0x04, 0x36, 0xbf, 0x71, 0x12, 0x70, 0x10, 0x80, 0x01, 0x05, 0x60, - 0x70, 0x12, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x20, 0x09, 0x00, 0x20, 0x70, 0x68, 0x20, 0x40, - 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, 0x92, 0x90, 0x00, 0x40, - 0x93, 0x99, 0x00, 0x00, 0x94, 0xa1, 0x00, 0x00, 0x95, 0xa9, 0x00, 0x00, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x8a, - 0x70, 0x1f, 0x37, 0xf1, 0x00, 0x05, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x96, 0x00, 0x02, 0x01, 0x20, 0x90, 0x96, 0x00, 0x0a, 0x19, 0x04, - 0x36, 0xbf, 0x08, 0x88, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x14, - 0x20, 0x48, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x96, 0x00, 0x29, 0x11, 0x48, 0xc2, 0xfd, 0xaa, 0x7a, - 0x08, 0x0c, 0x63, 0x0a, 0x01, 0x38, 0xa8, 0x7a, 0xa9, 0x82, 0x01, 0x2e, - 0x00, 0x60, 0x08, 0x0c, 0x66, 0x3a, 0x11, 0x30, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1f, 0x38, 0x1f, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x72, 0x5e, - 0x01, 0x2e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, 0x00, 0x05, - 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0xa6, 0x40, 0x0a, 0x21, 0x00, - 0x92, 0x10, 0x93, 0x99, 0x00, 0x00, 0x94, 0xa1, 0x00, 0x00, 0x95, 0xa9, - 0x00, 0x00, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0x09, 0x00, 0x20, - 0x01, 0x2e, 0xaf, 0x60, 0x08, 0x04, 0x4c, 0x8d, 0x20, 0x91, 0x80, 0x00, - 0x78, 0x37, 0x40, 0x00, 0x78, 0x33, 0x00, 0x10, 0x78, 0x83, 0x40, 0x00, - 0x78, 0x87, 0x49, 0x53, 0x78, 0x8b, 0x50, 0x20, 0x78, 0x8f, 0x20, 0x20, - 0x20, 0x09, 0x01, 0x7f, 0x21, 0x04, 0x78, 0x92, 0x3f, 0x00, 0x78, 0x96, - 0x20, 0x61, 0x01, 0x00, 0x62, 0x00, 0x20, 0x61, 0x02, 0x00, 0x60, 0x3c, - 0x80, 0x07, 0x92, 0x05, 0x78, 0x9a, 0x20, 0x09, 0x04, 0xfd, 0x21, 0x04, - 0x78, 0x9e, 0x20, 0x91, 0x50, 0x00, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x01, 0x80, 0x20, 0x01, 0x1a, 0x25, - 0x20, 0x04, 0x90, 0x05, 0x01, 0x28, 0x20, 0x01, 0x00, 0x8b, 0x20, 0x04, - 0xd0, 0xfc, 0x0d, 0xd8, 0x20, 0x01, 0x00, 0x8a, 0x20, 0x03, 0x00, 0x02, - 0x20, 0x03, 0x10, 0x01, 0x20, 0x71, 0x00, 0x80, 0x08, 0x04, 0x04, 0x27, - 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x79, 0x84, 0x08, 0x0c, 0x67, 0xb4, - 0x19, 0x04, 0x36, 0xc2, 0x7e, 0x98, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, - 0x40, 0x00, 0x1a, 0x04, 0x36, 0xc2, 0x7c, 0x88, 0x7d, 0x8c, 0x08, 0x0c, - 0x69, 0xf1, 0x08, 0x0c, 0x69, 0x7e, 0x15, 0x18, 0x20, 0x61, 0x1d, 0xdc, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, - 0x01, 0x48, 0x60, 0x14, 0x90, 0x4d, 0x01, 0x30, 0xa8, 0x6c, 0x94, 0x06, - 0x11, 0x18, 0xa8, 0x70, 0x95, 0x06, 0x01, 0x50, 0x01, 0x2e, 0x9c, 0xe0, - 0x00, 0x1c, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x1a, 0x04, - 0x36, 0xbf, 0x0c, 0x30, 0x08, 0x0c, 0xca, 0xe9, 0x01, 0x2e, 0x09, 0x04, - 0x36, 0xbf, 0x08, 0x04, 0x36, 0x8d, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x05, - 0x08, 0x0c, 0x72, 0x5e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xd2, 0x26, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, - 0x00, 0xa6, 0x29, 0x50, 0xb1, 0x98, 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x04, - 0x39, 0x0a, 0xb6, 0xa4, 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, - 0x16, 0xe8, 0xb4, 0x9c, 0xb5, 0xa0, 0x08, 0x0c, 0x69, 0xf1, 0x08, 0x0c, - 0x69, 0x7e, 0x15, 0x20, 0x20, 0x61, 0x1d, 0xdc, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, 0x60, 0x14, - 0x90, 0x4d, 0x01, 0x30, 0xa8, 0x6c, 0x94, 0x06, 0x11, 0x18, 0xa8, 0x70, - 0x95, 0x06, 0x01, 0x58, 0x01, 0x2e, 0x9c, 0xe0, 0x00, 0x1c, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x20, 0x09, 0x00, 0x0d, 0x12, 0xb0, - 0x0c, 0x28, 0x08, 0x0c, 0xca, 0xe9, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x03, - 0x01, 0x78, 0x00, 0xe0, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x72, 0x5e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xd2, 0x26, - 0x08, 0x0c, 0x70, 0x06, 0x01, 0x2e, 0x00, 0x70, 0xb0, 0x97, 0x40, 0x05, - 0xb1, 0x9a, 0x00, 0x10, 0xb0, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x2a, 0x48, 0x00, 0xae, 0x00, 0x05, - 0xb0, 0x97, 0x40, 0x00, 0x90, 0x06, 0x91, 0x8d, 0x00, 0x01, 0x20, 0x08, - 0x2a, 0x48, 0x00, 0xae, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, - 0x08, 0x0c, 0x4c, 0x58, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x68, 0x7b, - 0x09, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x69, 0xf7, 0x09, 0x04, 0x36, 0xbf, - 0x08, 0x04, 0x46, 0xaa, 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, - 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x6a, 0x85, 0x09, 0x04, - 0x36, 0xbf, 0x20, 0x19, 0x00, 0x05, 0x79, 0xa8, 0x08, 0x0c, 0x6a, 0x12, - 0x09, 0x04, 0x36, 0xbf, 0x78, 0x88, 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, - 0x36, 0xc2, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x08, 0x0c, - 0x89, 0xa1, 0x79, 0xa8, 0xd1, 0x84, 0x19, 0x04, 0x36, 0x8d, 0x08, 0x04, - 0x46, 0xaa, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x81, 0xff, 0x01, 0x18, - 0x20, 0x09, 0x00, 0x01, 0x04, 0x50, 0x20, 0x29, 0x07, 0xff, 0x64, 0x5c, - 0x24, 0x00, 0x95, 0x06, 0x01, 0xf8, 0x25, 0x08, 0x08, 0x0c, 0x67, 0xb4, - 0x11, 0xd8, 0x08, 0x0c, 0x6a, 0x85, 0x11, 0x28, 0x20, 0x09, 0x00, 0x02, - 0x62, 0xc0, 0x25, 0x18, 0x00, 0xc0, 0x20, 0x19, 0x00, 0x04, 0x90, 0x0e, - 0x08, 0x0c, 0x6a, 0x12, 0x11, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0x78, - 0x78, 0x84, 0x90, 0x8a, 0x10, 0x00, 0x12, 0x70, 0x80, 0x03, 0x80, 0x0b, - 0x81, 0x0b, 0x91, 0x08, 0x08, 0x0c, 0x89, 0xa1, 0x85, 0x29, 0x1a, 0xe0, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x2e, 0x08, 0x04, 0x36, 0xbf, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x4c, 0x58, 0x09, 0x04, - 0x36, 0xc2, 0x08, 0x0c, 0x68, 0x7b, 0x09, 0x04, 0x36, 0xbf, 0x08, 0x0c, - 0xac, 0xfc, 0xba, 0xa0, 0x20, 0x19, 0x00, 0x05, 0x00, 0xc6, 0x90, 0x66, - 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x96, 0x6d, - 0x90, 0x0e, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, 0x00, 0xce, 0x08, 0x0c, - 0xad, 0x18, 0x08, 0x0c, 0x69, 0xf1, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, - 0x4c, 0x58, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x69, 0xf1, 0x22, 0x08, - 0x08, 0x04, 0x36, 0x8d, 0x01, 0x56, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xc6, - 0x20, 0x69, 0x19, 0x10, 0x68, 0x10, 0x69, 0x14, 0x91, 0x0a, 0x12, 0x08, - 0x90, 0x0e, 0x68, 0x16, 0x90, 0x16, 0x90, 0x1e, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x28, 0x90, 0x65, 0x01, 0x18, 0x82, 0x10, 0x60, 0x0c, 0x0c, 0xd8, - 0x23, 0x00, 0x92, 0x18, 0x00, 0xce, 0x00, 0xee, 0x00, 0xde, 0x01, 0x5e, - 0x08, 0x04, 0x36, 0x8d, 0x00, 0xf6, 0x00, 0x16, 0x90, 0x7d, 0x01, 0x38, - 0x90, 0x06, 0x80, 0x00, 0x2f, 0x0c, 0x81, 0xff, 0x01, 0x10, 0x21, 0x78, - 0x0c, 0xd0, 0x00, 0x1e, 0x00, 0xfe, 0x00, 0x05, 0x20, 0x69, 0x19, 0x10, - 0x69, 0x10, 0x62, 0xbc, 0x08, 0x04, 0x36, 0x8d, 0x81, 0xff, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x28, 0x20, 0x09, 0x00, 0x07, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0xbf, 0x01, 0x2e, 0x61, 0x5c, 0x91, 0x90, - 0x34, 0x8e, 0x22, 0x15, 0x92, 0x94, 0x00, 0xff, 0x63, 0x7c, 0x83, 0xff, - 0x01, 0x08, 0x62, 0x80, 0x67, 0xdc, 0x97, 0xc4, 0x00, 0x0a, 0x98, 0xc6, - 0x00, 0x0a, 0x11, 0x18, 0x20, 0x31, 0x00, 0x01, 0x00, 0xe8, 0x97, 0xc4, - 0x00, 0x22, 0x98, 0xc6, 0x00, 0x22, 0x11, 0x18, 0x20, 0x31, 0x00, 0x03, - 0x00, 0xa8, 0x97, 0xc4, 0x00, 0x12, 0x98, 0xc6, 0x00, 0x12, 0x11, 0x18, - 0x20, 0x31, 0x00, 0x02, 0x00, 0x68, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x18, - 0x20, 0x31, 0x00, 0x04, 0x00, 0x38, 0xd7, 0x9c, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x05, 0x08, 0x04, 0x36, 0xbf, 0x90, 0x36, 0x7e, 0x9a, 0x7f, 0x9e, - 0x08, 0x04, 0x36, 0x8d, 0x61, 0x4c, 0x62, 0x50, 0x20, 0x19, 0x19, 0x86, - 0x23, 0x1c, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x78, 0x9a, 0x08, 0x04, - 0x36, 0x8d, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x61, 0x38, 0x62, 0x3c, - 0x63, 0x40, 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x74, - 0x09, 0x04, 0x36, 0xc2, 0xba, 0x44, 0xbb, 0x38, 0x08, 0x04, 0x36, 0x8d, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x4c, 0x74, 0x21, 0x10, 0x09, 0x04, - 0x36, 0xc2, 0xb8, 0x04, 0x90, 0x8c, 0x00, 0xff, 0x91, 0x8e, 0x00, 0x06, - 0x01, 0x40, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x06, 0x00, 0x20, 0x09, - 0x00, 0x09, 0x19, 0x04, 0x36, 0xbf, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x19, 0x00, 0x05, 0x00, 0xc6, 0x90, 0x66, 0x08, 0x0c, 0xac, 0xfc, - 0x08, 0x0c, 0xa7, 0xe2, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, - 0x08, 0x0c, 0x96, 0x6d, 0x90, 0x0e, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, - 0x00, 0xce, 0x08, 0x0c, 0xad, 0x18, 0xb8, 0x07, 0x04, 0x07, 0x01, 0x2e, - 0x08, 0x04, 0x36, 0x8d, 0x61, 0x4c, 0x62, 0x50, 0x78, 0x84, 0x60, 0x4e, - 0x7b, 0x88, 0x63, 0x52, 0x20, 0x69, 0x18, 0x47, 0x83, 0x1f, 0x93, 0x05, - 0x68, 0x16, 0x78, 0x8c, 0x20, 0x69, 0x19, 0x86, 0x2d, 0x1c, 0x20, 0x6a, - 0x7e, 0x98, 0x96, 0x82, 0x00, 0x14, 0x12, 0x10, 0x20, 0x31, 0x07, 0xd0, - 0x20, 0x69, 0x19, 0x87, 0x2d, 0x04, 0x26, 0x6a, 0x78, 0x9a, 0x08, 0x04, - 0x36, 0x8d, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x61, 0x38, 0x78, 0x84, - 0x60, 0x3a, 0x91, 0x0e, 0xd1, 0xb4, 0x19, 0x0c, 0x0e, 0xeb, 0xd0, 0xc4, - 0x01, 0xa8, 0x00, 0xd6, 0x78, 0xa8, 0x20, 0x09, 0x19, 0x9d, 0x20, 0x0a, - 0x78, 0xac, 0x20, 0x11, 0x19, 0x9e, 0x20, 0x12, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x38, 0x90, 0x86, 0x00, 0x07, 0x11, 0x18, 0x22, 0x14, 0x6a, 0x5a, - 0x00, 0x10, 0x21, 0x0c, 0x69, 0x5a, 0x00, 0xde, 0x78, 0x88, 0xd0, 0xec, - 0x01, 0x78, 0x60, 0x34, 0xc0, 0x8d, 0x60, 0x36, 0x20, 0x01, 0x00, 0x50, - 0x60, 0x76, 0x60, 0x7a, 0x60, 0x56, 0x60, 0x6b, 0x26, 0x9c, 0x00, 0xc6, - 0x20, 0x61, 0x1b, 0x73, 0x20, 0x62, 0x00, 0xce, 0x20, 0x11, 0x01, 0x16, - 0x22, 0x0c, 0x78, 0x88, 0xd0, 0x8c, 0x01, 0x18, 0x91, 0x8d, 0x00, 0x40, - 0x00, 0x10, 0x91, 0x8c, 0xff, 0x7f, 0x21, 0x12, 0x61, 0x34, 0xd1, 0x8c, - 0x20, 0x01, 0x00, 0x00, 0x01, 0x08, 0x60, 0x3c, 0x79, 0x88, 0x61, 0x3e, - 0x61, 0x40, 0x91, 0x0d, 0x78, 0x8c, 0x60, 0x42, 0x62, 0x34, 0xd2, 0x8c, - 0x01, 0x20, 0x7a, 0x88, 0x92, 0x94, 0x10, 0x00, 0x92, 0x05, 0x91, 0x0e, - 0xd1, 0xe4, 0x19, 0x0c, 0x0f, 0x06, 0x90, 0x84, 0x00, 0x20, 0x01, 0x30, - 0x78, 0xb4, 0x60, 0x46, 0x90, 0x84, 0x00, 0x01, 0x09, 0x0c, 0x43, 0x97, - 0x60, 0x40, 0xd0, 0xcc, 0x01, 0x20, 0x78, 0xb0, 0x20, 0x11, 0x01, 0x14, - 0x20, 0x12, 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x00, 0xf6, 0x20, 0x79, - 0x18, 0x00, 0x7a, 0x38, 0xa8, 0x98, 0x90, 0x84, 0xfe, 0xbf, 0x92, 0x15, - 0xa8, 0x9c, 0x90, 0x84, 0xfe, 0xbf, 0x80, 0x02, 0x92, 0x14, 0x78, 0x38, - 0x90, 0x84, 0x01, 0x40, 0x92, 0x15, 0x7a, 0x3a, 0xa8, 0x97, 0x40, 0x00, - 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0xfe, - 0x00, 0x05, 0x78, 0x98, 0x90, 0x05, 0x01, 0xa8, 0x78, 0x88, 0x90, 0x25, - 0x09, 0x04, 0x36, 0xc2, 0x78, 0x8c, 0x90, 0x2d, 0x09, 0x04, 0x36, 0xc2, - 0x90, 0x0e, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x20, 0xba, 0x44, 0xbb, 0x38, - 0xbc, 0x46, 0xbd, 0x3a, 0x91, 0x86, 0x07, 0xff, 0x01, 0x90, 0x81, 0x08, - 0x0c, 0xa0, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x78, 0x88, - 0x90, 0x0d, 0x09, 0x04, 0x36, 0xc2, 0x78, 0x8c, 0x90, 0x05, 0x09, 0x04, - 0x36, 0xc2, 0xba, 0x44, 0xb9, 0x46, 0xbb, 0x38, 0xb8, 0x3a, 0x08, 0x04, - 0x36, 0x8d, 0x20, 0x11, 0xbc, 0x09, 0x00, 0x10, 0x20, 0x11, 0xbc, 0x05, - 0x08, 0x0c, 0x58, 0x54, 0x19, 0x04, 0x36, 0xbf, 0x00, 0xc6, 0x20, 0x61, - 0x01, 0x00, 0x79, 0x84, 0x91, 0x86, 0x00, 0xff, 0x11, 0x30, 0x20, 0x01, - 0x18, 0x18, 0x20, 0x04, 0x90, 0x85, 0xff, 0x00, 0x00, 0x88, 0x91, 0x82, - 0x00, 0x7f, 0x16, 0xe0, 0x91, 0x88, 0x34, 0x8e, 0x21, 0x0d, 0x91, 0x8c, - 0x00, 0xff, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x00, 0x26, 0x91, 0x16, - 0x00, 0x2e, 0x05, 0x80, 0x81, 0x0f, 0x91, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x06, 0x08, 0x0c, 0xb1, 0x16, 0x00, 0x0e, 0x05, 0x10, - 0x60, 0x2e, 0x62, 0x0a, 0x79, 0x84, 0x00, 0xb6, 0x08, 0x0c, 0x67, 0x4f, - 0x2b, 0x08, 0x00, 0xbe, 0x15, 0x00, 0x61, 0x12, 0x60, 0x23, 0x00, 0x01, - 0x08, 0x0c, 0x4c, 0x41, 0x01, 0xd0, 0x90, 0x06, 0xa8, 0x66, 0x70, 0x07, - 0x00, 0x03, 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x70, 0x1f, - 0x3b, 0x9e, 0x29, 0x00, 0x60, 0x16, 0x20, 0x09, 0x00, 0x32, 0x08, 0x0c, - 0xb2, 0x0a, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x01, 0x2e, 0x00, 0xce, - 0x08, 0x04, 0x36, 0xbf, 0x00, 0xce, 0x08, 0x04, 0x36, 0xc2, 0x08, 0x0c, - 0xb1, 0x6c, 0x0c, 0xb0, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x09, 0x04, - 0x36, 0xbf, 0x08, 0x04, 0x36, 0x8d, 0x20, 0x61, 0x1a, 0x73, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x00, 0xd0, 0x84, 0x01, 0x70, 0x61, 0x04, - 0x62, 0x08, 0x20, 0x61, 0x18, 0x00, 0x63, 0x54, 0x60, 0x74, 0x78, 0x9a, - 0x60, 0xc0, 0x78, 0x9e, 0x60, 0xbc, 0x78, 0xaa, 0x01, 0x2e, 0x08, 0x04, - 0x36, 0x8d, 0x90, 0x0e, 0x21, 0x10, 0x0c, 0x88, 0x81, 0xff, 0x19, 0x04, - 0x36, 0xbf, 0x08, 0x0c, 0x77, 0x9e, 0x09, 0x04, 0x36, 0xbf, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x62, 0x54, 0x60, 0x74, 0x92, 0x02, 0x02, 0x48, - 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x26, 0xf5, 0x08, 0x0c, 0x5a, 0x7c, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x2e, 0x08, 0x04, 0x36, 0xc2, - 0x00, 0x06, 0x00, 0x16, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x01, 0x19, 0xaa, - 0x20, 0x70, 0x20, 0x61, 0x18, 0x47, 0x60, 0x08, 0x20, 0x72, 0x90, 0x0e, - 0x20, 0x11, 0x14, 0x00, 0x08, 0x0c, 0x95, 0x5b, 0x72, 0x06, 0x00, 0xee, - 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x81, 0xff, 0x01, 0x28, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0b, - 0x08, 0x04, 0x36, 0x8f, 0x78, 0x84, 0xd0, 0xfc, 0x01, 0x58, 0x20, 0x01, - 0x00, 0x2a, 0x20, 0x04, 0x90, 0x05, 0x01, 0x80, 0x90, 0x82, 0x00, 0xe1, - 0x02, 0x98, 0x01, 0x2e, 0x08, 0x04, 0x36, 0xc2, 0x20, 0x01, 0x00, 0x2a, - 0x20, 0x04, 0x90, 0x05, 0x01, 0x28, 0x20, 0x69, 0x18, 0x47, 0x69, 0x08, - 0x91, 0x02, 0x12, 0x30, 0x01, 0x2e, 0x08, 0x04, 0x36, 0xc2, 0x01, 0x2e, - 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0xb0, 0x94, 0x0d, 0xd0, 0x78, 0x84, - 0xd0, 0xfc, 0x09, 0x04, 0x3c, 0x6d, 0x00, 0xc6, 0x08, 0x0c, 0x4c, 0x41, - 0x00, 0xce, 0x0d, 0x88, 0xa8, 0x67, 0x00, 0x00, 0x78, 0x84, 0xa8, 0x0a, - 0x78, 0x98, 0xa8, 0x0e, 0x78, 0x9c, 0xa8, 0x12, 0x20, 0x01, 0x00, 0x2e, - 0x20, 0x04, 0xa8, 0x1a, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, 0xa8, 0x1e, - 0x20, 0x01, 0x00, 0x30, 0x20, 0x04, 0xa8, 0x22, 0x20, 0x01, 0x00, 0x31, - 0x20, 0x04, 0xa8, 0x26, 0x20, 0x01, 0x00, 0x34, 0x20, 0x04, 0xa8, 0x2a, - 0x20, 0x01, 0x00, 0x35, 0x20, 0x04, 0xa8, 0x2e, 0x20, 0x01, 0x00, 0x2a, - 0x20, 0x04, 0x90, 0x80, 0x00, 0x03, 0x90, 0x84, 0x00, 0xfc, 0x80, 0x04, - 0xa8, 0x16, 0x08, 0x0c, 0x3d, 0xf7, 0x09, 0x28, 0x70, 0x14, 0x20, 0x48, - 0xad, 0x2c, 0xac, 0x28, 0xab, 0x1c, 0xaa, 0x18, 0xa9, 0x30, 0xa8, 0x08, - 0xd0, 0xb4, 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, - 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x1b, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, - 0x3d, 0x34, 0x70, 0x23, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, - 0xac, 0xfc, 0x00, 0x46, 0x00, 0x86, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x08, 0x0c, 0x3b, 0xd8, - 0x20, 0x01, 0x19, 0xa0, 0x20, 0x03, 0x00, 0x00, 0x20, 0x21, 0x00, 0x0a, - 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0x00, 0x16, 0x60, 0xbb, 0x00, 0x00, - 0x60, 0xbf, 0x32, 0xe1, 0x60, 0xbf, 0x00, 0x12, 0x08, 0x0c, 0x3e, 0x66, - 0x08, 0x0c, 0x3e, 0x25, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x86, 0x29, 0x40, - 0x20, 0x71, 0x19, 0xe8, 0x20, 0x79, 0x00, 0x90, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x00, 0x68, 0x84, 0xd0, 0xb4, 0x01, 0x40, 0x20, 0x01, 0x00, 0x35, - 0x20, 0x04, 0x78, 0x0e, 0x20, 0x01, 0x00, 0x34, 0x20, 0x04, 0x78, 0x0a, - 0x00, 0xde, 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0xdb, 0x00, 0x8e, - 0x00, 0xee, 0x00, 0xfe, 0x08, 0x0c, 0x40, 0xfd, 0x08, 0x0c, 0x40, 0x2a, - 0x05, 0xb8, 0x20, 0x01, 0x02, 0x0b, 0x20, 0x04, 0x90, 0x84, 0x01, 0x40, - 0x1d, 0xb8, 0x08, 0x0c, 0x42, 0x4f, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x78, 0xbc, 0x00, 0xfe, 0x90, 0x8c, 0x00, 0x70, 0x15, 0x60, 0x20, 0x71, - 0x02, 0x00, 0x70, 0x37, 0x00, 0x00, 0x70, 0x50, 0x90, 0x84, 0xff, 0x00, - 0x90, 0x86, 0x32, 0x00, 0x15, 0x10, 0x70, 0x37, 0x00, 0x01, 0x70, 0x50, - 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0xe1, 0x00, 0x11, 0xd0, 0x70, 0x37, - 0x00, 0x00, 0x70, 0x54, 0x70, 0x37, 0x00, 0x00, 0x71, 0x5c, 0x91, 0x06, - 0x11, 0x90, 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, 0x91, 0x06, 0x11, 0x68, - 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x60, 0x24, 0x90, 0x84, 0x1e, 0x00, - 0x00, 0xce, 0x01, 0x38, 0x08, 0x0c, 0x40, 0x34, 0x08, 0x0c, 0x3e, 0x20, - 0x00, 0x58, 0x08, 0x0c, 0x3e, 0x20, 0x08, 0x0c, 0x41, 0x73, 0x08, 0x0c, - 0x40, 0xf3, 0x20, 0x01, 0x02, 0x0b, 0x20, 0x04, 0xd0, 0xe4, 0x0d, 0xd8, - 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, 0x20, 0x61, 0x01, 0x00, - 0x60, 0x27, 0x00, 0x02, 0x00, 0x1e, 0x61, 0x06, 0x20, 0x11, 0x02, 0x0d, - 0x20, 0x13, 0x00, 0x20, 0x60, 0xbb, 0x00, 0x00, 0x60, 0xbf, 0x01, 0x08, - 0x60, 0xbf, 0x00, 0x12, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, - 0xff, 0xfd, 0x21, 0x02, 0x08, 0x0c, 0x13, 0x52, 0x20, 0x09, 0x00, 0x28, - 0x08, 0x0c, 0x22, 0x20, 0x20, 0x01, 0x02, 0x27, 0x20, 0x0c, 0x21, 0x02, - 0x08, 0x0c, 0xad, 0x18, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x4e, 0x20, 0x01, - 0x19, 0xa0, 0x20, 0x04, 0x90, 0x05, 0x11, 0x18, 0x01, 0x2e, 0x08, 0x04, - 0x36, 0x8d, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0c, 0x08, 0x04, 0x36, 0x8f, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, - 0x00, 0x86, 0x00, 0x96, 0x00, 0xd6, 0x01, 0x56, 0x70, 0x14, 0x20, 0x48, - 0x70, 0x20, 0x20, 0xa8, 0x80, 0x00, 0x70, 0x22, 0xa8, 0x04, 0x90, 0x05, - 0x09, 0x04, 0x3d, 0x90, 0x20, 0x48, 0x1f, 0x04, 0x3d, 0x44, 0x70, 0x68, - 0x20, 0x40, 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, 0xa5, 0x98, 0xa9, 0x30, - 0xa8, 0x08, 0xd0, 0xb4, 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, - 0x00, 0x00, 0x00, 0x96, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, 0x00, 0x9e, - 0x90, 0x86, 0x01, 0x03, 0x01, 0x70, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x1b, - 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x3d, 0x34, 0x00, 0xb0, 0x89, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x1b, 0x21, 0xa8, 0x27, 0xe0, 0x20, 0x98, 0x27, 0xe8, - 0x20, 0xa0, 0x00, 0x06, 0x08, 0x0c, 0x0f, 0xd6, 0x00, 0x0e, 0x08, 0x0c, - 0x4c, 0x8d, 0x70, 0x1f, 0x3d, 0x34, 0x01, 0x5e, 0x00, 0xde, 0x00, 0x9e, - 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x70, 0x14, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x86, - 0x01, 0x03, 0x11, 0x18, 0x70, 0x1f, 0x3d, 0xf5, 0x04, 0x50, 0x70, 0x14, - 0x20, 0x48, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x20, 0x09, 0x00, 0x7f, - 0x08, 0x0c, 0x67, 0x49, 0x01, 0x10, 0x90, 0x06, 0x00, 0x30, 0xb8, 0x13, - 0x00, 0xff, 0xb8, 0x17, 0xff, 0xfd, 0x08, 0x0c, 0xd4, 0x09, 0x01, 0x5e, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x09, 0x04, 0x36, 0xbf, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0x86, - 0x00, 0x96, 0x00, 0xd6, 0x01, 0x56, 0x70, 0x1f, 0x3d, 0xc7, 0x70, 0x07, - 0x00, 0x03, 0x08, 0x04, 0x3d, 0x85, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, - 0x20, 0x21, 0x40, 0x0c, 0x09, 0x04, 0x36, 0x8f, 0x00, 0x76, 0xad, 0x10, - 0xac, 0x0c, 0xab, 0x24, 0xaa, 0x20, 0xa9, 0x30, 0xa8, 0x08, 0xd0, 0xb4, - 0x11, 0x20, 0x20, 0x29, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, 0x89, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x1b, 0x21, 0xa8, 0x27, 0xe0, 0x20, 0x98, 0x27, 0xe8, - 0x20, 0xa0, 0x00, 0x06, 0x08, 0x0c, 0x0f, 0xd6, 0x00, 0x0e, 0x08, 0x0c, - 0x4c, 0x8d, 0x00, 0x7e, 0x70, 0x1f, 0x3d, 0x34, 0x70, 0x23, 0x00, 0x01, - 0x00, 0x05, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x56, 0x00, 0xc6, 0xa8, 0x14, - 0x90, 0x8a, 0x00, 0x1e, 0x02, 0x18, 0xa8, 0x33, 0x00, 0x1e, 0x00, 0x10, - 0xa8, 0x32, 0x00, 0x78, 0x81, 0xff, 0x01, 0x68, 0x00, 0x16, 0x08, 0x0c, - 0x4c, 0x41, 0x00, 0x1e, 0x01, 0x30, 0xa8, 0x00, 0x20, 0x40, 0xa0, 0x08, - 0xa8, 0x0a, 0x21, 0x00, 0x0c, 0x58, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0xce, 0x01, 0x5e, 0x00, 0x05, 0x00, 0x06, 0x00, 0xf6, - 0x20, 0x79, 0x00, 0x00, 0x78, 0x80, 0x90, 0x86, 0x00, 0x44, 0x00, 0xfe, - 0x00, 0x0e, 0x00, 0x05, 0x20, 0x01, 0x19, 0xa0, 0x20, 0x03, 0x00, 0x01, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x20, 0x61, 0x02, 0x00, - 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, 0x60, 0x1a, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, 0x60, 0xce, 0x61, 0x04, 0xc1, 0xac, - 0x61, 0x06, 0x08, 0x0c, 0x4c, 0x41, 0xa8, 0x13, 0x00, 0x19, 0xa8, 0x17, - 0x00, 0x01, 0x29, 0x00, 0xa8, 0x5a, 0x20, 0x01, 0x00, 0x2e, 0x20, 0x04, - 0xa8, 0x66, 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, 0xa8, 0x6a, 0x20, 0x61, - 0x00, 0x90, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, - 0x60, 0x36, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x22, 0x20, 0x20, 0x01, - 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0xa8, 0x6e, 0x60, 0x1a, - 0xa8, 0x73, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x78, 0xca, 0x90, 0x06, - 0x60, 0x0a, 0x60, 0x0e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xe6, 0x08, 0x0c, 0x4c, 0x41, 0x29, 0x40, 0xa0, 0x13, 0x00, 0x19, - 0xa0, 0x17, 0x00, 0x01, 0x28, 0x00, 0xa0, 0x5a, 0x20, 0x01, 0x00, 0x30, - 0x20, 0x04, 0xa8, 0x66, 0x20, 0x01, 0x00, 0x31, 0x20, 0x04, 0xa8, 0x6a, - 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0xa8, 0x6e, - 0xa8, 0x73, 0x00, 0x00, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, - 0x20, 0x01, 0x03, 0x00, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x02, 0x0d, - 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8d, - 0x00, 0x02, 0x21, 0x02, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x81, 0xff, 0x01, 0x48, 0x08, 0x0c, 0x2a, 0x77, 0x11, 0x30, - 0x90, 0x06, 0x08, 0x0c, 0x29, 0xca, 0x90, 0x06, 0x08, 0x0c, 0x29, 0xad, - 0x20, 0x01, 0x19, 0x9f, 0x20, 0x03, 0x00, 0x00, 0x78, 0x84, 0x90, 0x84, - 0x00, 0x07, 0x00, 0x02, 0x3e, 0xb5, 0x3e, 0xb6, 0x3e, 0xb7, 0x3e, 0xb2, - 0x3e, 0xb2, 0x3e, 0xb2, 0x3e, 0xb2, 0x3e, 0xb2, 0x01, 0x2e, 0x08, 0x04, - 0x36, 0xc2, 0x0c, 0xe0, 0x0c, 0xd8, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x28, - 0x01, 0x2e, 0x20, 0x09, 0x00, 0x16, 0x08, 0x04, 0x36, 0xbf, 0x81, 0xff, - 0x01, 0x28, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0b, 0x08, 0x04, 0x36, 0x8f, - 0x20, 0x01, 0x01, 0x41, 0x20, 0x04, 0xd0, 0xdc, 0x0d, 0xb0, 0x08, 0x0c, - 0xac, 0xfc, 0x00, 0x86, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x08, 0x0c, 0x3b, 0xd8, 0x20, 0x09, - 0x01, 0x01, 0x21, 0x0c, 0x00, 0x16, 0x7e, 0xc8, 0x7d, 0xcc, 0x90, 0x06, - 0x20, 0x68, 0x20, 0x60, 0x20, 0x58, 0x08, 0x0c, 0x43, 0x2a, 0x08, 0x0c, - 0x42, 0x7a, 0x90, 0x3e, 0x27, 0x20, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x86, - 0x29, 0x40, 0x20, 0x71, 0x19, 0xe8, 0x20, 0x79, 0x00, 0x90, 0x00, 0xd6, - 0x20, 0x69, 0x00, 0x00, 0x68, 0x84, 0xd0, 0xb4, 0x01, 0x20, 0x68, 0xd4, - 0x78, 0x0e, 0x68, 0xd0, 0x78, 0x0a, 0x00, 0xde, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0x41, 0xdb, 0x08, 0x0c, 0x2a, 0x7f, 0x08, 0x0c, 0x2a, 0x7f, - 0x08, 0x0c, 0x2a, 0x7f, 0x08, 0x0c, 0x2a, 0x7f, 0x08, 0x0c, 0x41, 0xdb, - 0x00, 0x8e, 0x00, 0xee, 0x00, 0xfe, 0x08, 0x0c, 0x40, 0xfd, 0x20, 0x09, - 0x9c, 0x40, 0x81, 0x09, 0x11, 0xb0, 0x08, 0x0c, 0x40, 0x34, 0x20, 0x01, - 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0xfd, 0x21, 0x02, 0x00, 0x1e, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, - 0x00, 0x9e, 0x00, 0x8e, 0x20, 0x09, 0x00, 0x17, 0x08, 0x0c, 0x36, 0xbf, - 0x0c, 0xf8, 0x20, 0x01, 0x02, 0x0b, 0x20, 0x04, 0x90, 0x84, 0x01, 0x40, - 0x1d, 0x10, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x00, 0x78, 0x84, 0x00, 0xfe, - 0xd0, 0xbc, 0x01, 0x78, 0x20, 0x01, 0x02, 0x01, 0x20, 0x0c, 0x81, 0xff, - 0x01, 0x50, 0x08, 0x0c, 0x40, 0xdb, 0x2d, 0x00, 0x9c, 0x05, 0x9b, 0x05, - 0x01, 0x20, 0x08, 0x0c, 0x40, 0x34, 0x08, 0x04, 0x3f, 0xdd, 0x08, 0x0c, - 0x42, 0x4f, 0x08, 0x0c, 0x41, 0x73, 0x08, 0x0c, 0x40, 0xbe, 0x08, 0x0c, - 0x40, 0xf3, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x78, 0x24, 0xd0, 0xac, - 0x01, 0x30, 0x8b, 0x58, 0x08, 0x0c, 0x40, 0x34, 0x00, 0xfe, 0x08, 0x04, - 0x3f, 0xdd, 0x00, 0xfe, 0x08, 0x0c, 0x40, 0x2a, 0x11, 0x50, 0x8d, 0x68, - 0x20, 0x01, 0x00, 0x32, 0x26, 0x02, 0x20, 0x01, 0x00, 0x33, 0x25, 0x02, - 0x08, 0x0c, 0x40, 0x34, 0x00, 0x80, 0x87, 0xff, 0x01, 0x38, 0x20, 0x01, - 0x02, 0x01, 0x20, 0x04, 0x90, 0x05, 0x19, 0x08, 0x87, 0x39, 0x00, 0x38, - 0x20, 0x01, 0x1a, 0x6e, 0x20, 0x04, 0x90, 0x86, 0x00, 0x00, 0x19, 0x04, - 0x3f, 0x2d, 0x20, 0x01, 0x03, 0x2f, 0x20, 0x03, 0x00, 0xf6, 0x86, 0x31, - 0x12, 0x08, 0x85, 0x29, 0x25, 0x00, 0x96, 0x05, 0x09, 0x04, 0x3f, 0xdd, - 0x78, 0x84, 0xd0, 0xbc, 0x01, 0x28, 0x2d, 0x00, 0x9c, 0x05, 0x9b, 0x05, - 0x19, 0x04, 0x3f, 0xdd, 0xa0, 0x13, 0x00, 0x19, 0x20, 0x01, 0x03, 0x2a, - 0x20, 0x03, 0x00, 0x04, 0x78, 0x84, 0xd0, 0xac, 0x11, 0x48, 0x20, 0x01, - 0x1a, 0x6e, 0x20, 0x03, 0x00, 0x03, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, - 0x00, 0x09, 0x00, 0x30, 0xa0, 0x17, 0x00, 0x01, 0x78, 0xb4, 0x90, 0x05, - 0x01, 0x08, 0xa0, 0x16, 0x28, 0x00, 0xa0, 0x5a, 0x20, 0x09, 0x00, 0x40, - 0x08, 0x0c, 0x22, 0x20, 0x29, 0x00, 0xa8, 0x5a, 0xa8, 0x13, 0x00, 0x19, - 0x78, 0x84, 0xd0, 0xa4, 0x11, 0x80, 0xa8, 0x17, 0x00, 0x00, 0x00, 0xc6, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0x61, 0x00, 0x90, 0x60, 0x2b, 0x00, 0x08, - 0x20, 0x01, 0x02, 0x03, 0x20, 0x04, 0x1f, 0x04, 0x3f, 0xb4, 0x00, 0xce, - 0x00, 0x30, 0xa8, 0x17, 0x00, 0x01, 0x78, 0xb0, 0x90, 0x05, 0x01, 0x08, - 0xa8, 0x16, 0x00, 0xf6, 0x00, 0xc6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x61, - 0x00, 0x90, 0x78, 0x27, 0x00, 0x02, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, - 0x90, 0x84, 0xff, 0xf8, 0x60, 0x1a, 0x00, 0x06, 0x20, 0x01, 0x00, 0x2b, - 0x20, 0x04, 0x60, 0x1e, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, 0x00, 0xce, - 0x00, 0xfe, 0x08, 0x04, 0x3e, 0xe7, 0x00, 0x1e, 0x00, 0xc6, 0x20, 0x01, - 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, 0x20, 0x61, 0x01, 0x00, 0x60, 0x27, - 0x00, 0x02, 0x61, 0x06, 0x20, 0x11, 0x02, 0x0d, 0x20, 0x13, 0x00, 0x20, - 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0xfd, 0x21, 0x02, - 0x08, 0x0c, 0x13, 0x52, 0x78, 0x84, 0x90, 0x84, 0x00, 0x03, 0x90, 0x86, - 0x00, 0x02, 0x01, 0xb0, 0x20, 0x09, 0x00, 0x28, 0x08, 0x0c, 0x22, 0x20, - 0x20, 0x01, 0x02, 0x27, 0x20, 0x0c, 0x21, 0x02, 0x60, 0x50, 0x90, 0x84, - 0xb7, 0xff, 0x08, 0x0c, 0x2b, 0x29, 0x60, 0x52, 0x60, 0x2f, 0x00, 0x00, - 0x60, 0x4b, 0xf7, 0xf7, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, - 0x08, 0x0c, 0xad, 0x18, 0x00, 0xce, 0x2d, 0x08, 0x2c, 0x10, 0x2b, 0x18, - 0x2b, 0x00, 0x9c, 0x05, 0x9d, 0x05, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x11, 0x18, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x2e, 0x20, 0x21, 0x40, 0x0c, - 0x08, 0x04, 0x36, 0x8f, 0x90, 0x85, 0x00, 0x01, 0x1d, 0x04, 0x40, 0x33, - 0x20, 0x91, 0x60, 0x00, 0x84, 0x20, 0x94, 0x86, 0x00, 0x64, 0x00, 0x05, - 0x20, 0x01, 0x01, 0x05, 0x20, 0x03, 0x00, 0x10, 0x20, 0x01, 0x03, 0x2a, - 0x20, 0x03, 0x00, 0x04, 0x20, 0x01, 0x1a, 0x6e, 0x20, 0x03, 0x00, 0x00, - 0x00, 0x71, 0x20, 0x09, 0x00, 0x48, 0x08, 0x0c, 0x22, 0x20, 0x20, 0x01, - 0x02, 0x27, 0x20, 0x24, 0x24, 0x02, 0x20, 0x01, 0x01, 0x09, 0x20, 0x03, - 0x40, 0x00, 0x90, 0x26, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0xe8, 0x70, 0x54, 0x90, 0x86, 0x00, 0x00, 0x05, 0x20, 0x20, 0x79, - 0x00, 0x90, 0x20, 0x09, 0x02, 0x06, 0x21, 0x04, 0x20, 0x09, 0x02, 0x03, - 0x21, 0x0c, 0x91, 0x06, 0x11, 0x20, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, - 0x22, 0x20, 0x78, 0x2c, 0xd0, 0xfc, 0x0d, 0x88, 0x08, 0x0c, 0x42, 0x4f, - 0x70, 0x54, 0x90, 0x86, 0x00, 0x00, 0x1d, 0x58, 0x78, 0x2b, 0x00, 0x04, - 0x78, 0x2c, 0xd0, 0xac, 0x1d, 0xe8, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, - 0x22, 0x20, 0x78, 0x2b, 0x00, 0x02, 0x70, 0x57, 0x00, 0x00, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x01, - 0x18, 0x18, 0x20, 0x0c, 0x79, 0x32, 0x79, 0x36, 0x08, 0x0c, 0x26, 0xd5, - 0x08, 0x0c, 0x2a, 0xf6, 0x08, 0x0c, 0x2b, 0x29, 0x78, 0x4b, 0xf7, 0xf7, - 0x78, 0x43, 0x00, 0x90, 0x78, 0x43, 0x00, 0x10, 0x78, 0x50, 0xc0, 0xe5, - 0x78, 0x52, 0x20, 0x19, 0x61, 0xa8, 0x78, 0x20, 0xd0, 0x9c, 0x01, 0x10, - 0x83, 0x19, 0x1d, 0xd8, 0x78, 0x50, 0xc0, 0xe4, 0x78, 0x52, 0x20, 0x11, - 0x00, 0x48, 0x08, 0x0c, 0x2a, 0xd3, 0x78, 0x43, 0x00, 0x40, 0x20, 0x19, - 0x01, 0xf4, 0xa0, 0x01, 0xa0, 0x01, 0x83, 0x19, 0x1d, 0xe0, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x11, 0x00, 0x20, 0x08, 0x0c, - 0x2a, 0xd3, 0x78, 0x43, 0x00, 0x00, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, - 0x20, 0x11, 0x00, 0x48, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0x84, 0xd0, 0xac, 0x11, 0xc8, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x6e, 0x20, 0x79, 0x03, 0x20, 0x20, 0x01, 0x02, 0x01, 0x20, 0x04, - 0x90, 0x05, 0x01, 0x60, 0x70, 0x00, 0x90, 0x86, 0x00, 0x00, 0x11, 0x40, - 0x00, 0x51, 0xd0, 0xbc, 0x01, 0x08, 0x87, 0x38, 0x70, 0x03, 0x00, 0x03, - 0x78, 0x2b, 0x00, 0x19, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x03, 0x00, 0x78, 0xbc, 0x00, 0xfe, 0x90, 0x8c, 0x00, 0x70, - 0x01, 0x78, 0x20, 0x09, 0x00, 0x32, 0x26, 0x0a, 0x20, 0x09, 0x00, 0x33, - 0x25, 0x0a, 0xd0, 0xb4, 0x01, 0x08, 0x8c, 0x60, 0xd0, 0xac, 0x01, 0x08, - 0x8d, 0x68, 0xd0, 0xa4, 0x01, 0x08, 0x8b, 0x58, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x02, 0x00, 0x78, 0x1c, 0xd0, 0x84, 0x01, 0x10, 0x78, 0x37, - 0x00, 0x50, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x01, 0x00, - 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, 0x70, 0xe2, 0x08, 0x0c, 0x3e, 0x16, - 0x11, 0x88, 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, 0x20, 0x09, 0x18, 0x1f, - 0x21, 0x0c, 0x91, 0x8c, 0x00, 0xff, 0x70, 0x6e, 0x71, 0x6a, 0x70, 0x66, - 0x91, 0x8d, 0x32, 0x00, 0x71, 0x62, 0x70, 0x73, 0xe1, 0x09, 0x00, 0x80, - 0x70, 0x2c, 0x90, 0x85, 0x00, 0x02, 0x70, 0x2e, 0x20, 0x09, 0x18, 0x18, - 0x21, 0x0c, 0x71, 0x6e, 0x70, 0x63, 0x01, 0x00, 0x71, 0x66, 0x71, 0x9e, - 0x70, 0x6b, 0x00, 0x00, 0x70, 0x73, 0x08, 0x09, 0x70, 0x77, 0x00, 0x08, - 0x70, 0x78, 0x90, 0x80, 0x01, 0x00, 0x70, 0x7a, 0x70, 0x80, 0x80, 0x00, - 0x70, 0x82, 0x70, 0x87, 0xaa, 0xaa, 0x90, 0x06, 0x70, 0x8a, 0x70, 0x8e, - 0x70, 0x7e, 0x70, 0xd6, 0x70, 0xab, 0x00, 0x36, 0x70, 0xaf, 0x95, 0xd5, - 0x70, 0x14, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x92, 0x70, 0x16, - 0x08, 0x0c, 0x42, 0x4f, 0x00, 0xf6, 0x20, 0x71, 0x1a, 0x6e, 0x20, 0x79, - 0x03, 0x20, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x84, 0xd0, 0xb4, - 0x01, 0x20, 0x68, 0x9c, 0x78, 0x0e, 0x68, 0x98, 0x78, 0x0a, 0x00, 0xde, - 0x08, 0x0c, 0x3e, 0x16, 0x01, 0x40, 0x20, 0x01, 0x19, 0x9f, 0x20, 0x0c, - 0x20, 0x03, 0x00, 0x01, 0x91, 0x8e, 0x00, 0x01, 0x01, 0x20, 0x20, 0x09, - 0x03, 0xe8, 0x81, 0x09, 0x1d, 0xf0, 0x79, 0x2c, 0xd1, 0xfc, 0x01, 0x10, - 0x78, 0x2b, 0x00, 0x04, 0x20, 0x11, 0x00, 0x11, 0x08, 0x0c, 0x41, 0xdb, - 0x20, 0x11, 0x00, 0x01, 0x08, 0x0c, 0x41, 0xdb, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x6e, 0x20, 0x79, - 0x03, 0x20, 0x79, 0x2c, 0xd1, 0xfc, 0x09, 0x04, 0x41, 0xd8, 0x78, 0x2b, - 0x00, 0x02, 0x90, 0x26, 0xd1, 0x9c, 0x19, 0x04, 0x41, 0xd4, 0x70, 0x00, - 0x00, 0x02, 0x41, 0xd8, 0x41, 0x89, 0x41, 0xb9, 0x41, 0xd4, 0xd1, 0xbc, - 0x11, 0x70, 0xd1, 0xdc, 0x11, 0x90, 0x80, 0x01, 0x70, 0x02, 0x20, 0x11, - 0x00, 0x01, 0x08, 0x0c, 0x41, 0xdb, 0x09, 0x04, 0x41, 0xd8, 0x08, 0x0c, - 0x41, 0xdb, 0x08, 0x04, 0x41, 0xd8, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, - 0x78, 0xbf, 0x00, 0x00, 0x00, 0xfe, 0x78, 0x10, 0x79, 0x14, 0x78, 0x2b, - 0x00, 0x04, 0x78, 0x12, 0x79, 0x16, 0x20, 0x01, 0x02, 0x01, 0x20, 0x0c, - 0x81, 0xff, 0x0d, 0xe8, 0x08, 0x0c, 0x40, 0xdb, 0x20, 0x09, 0x00, 0x01, - 0x00, 0xf6, 0x20, 0x79, 0x03, 0x00, 0x78, 0xb8, 0x00, 0xfe, 0xd0, 0xec, - 0x01, 0x10, 0x20, 0x09, 0x00, 0x11, 0x79, 0x2a, 0x00, 0xf8, 0x80, 0x01, - 0x70, 0x02, 0x91, 0x84, 0x08, 0x80, 0x11, 0x40, 0x78, 0x2c, 0xd0, 0xfc, - 0x19, 0x04, 0x41, 0x7d, 0x20, 0x11, 0x00, 0x01, 0x00, 0xb1, 0x00, 0x90, - 0xa0, 0x10, 0x90, 0x92, 0x00, 0x04, 0x90, 0x86, 0x00, 0x15, 0x11, 0x20, - 0xa0, 0x00, 0xa0, 0x5a, 0x20, 0x11, 0x00, 0x31, 0xa2, 0x12, 0xd1, 0xdc, - 0x19, 0x60, 0x08, 0x28, 0x78, 0x2b, 0x00, 0x04, 0x70, 0x03, 0x00, 0x00, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0xa0, 0x14, 0x90, 0x05, 0x05, 0x50, - 0x80, 0x01, 0x00, 0x36, 0x00, 0x96, 0xa0, 0x16, 0xa0, 0x58, 0x20, 0x48, - 0xa0, 0x10, 0x20, 0x09, 0x00, 0x31, 0x91, 0x1a, 0x83, 0x1c, 0x83, 0x1c, - 0x93, 0x8a, 0x00, 0x07, 0x1a, 0x0c, 0x0d, 0x85, 0x93, 0x98, 0x42, 0x09, - 0x23, 0x1d, 0x08, 0x3f, 0x90, 0x80, 0x00, 0x04, 0x7a, 0x2a, 0x71, 0x00, - 0x81, 0x08, 0x71, 0x02, 0x00, 0x9e, 0x00, 0x3e, 0x90, 0x8a, 0x00, 0x35, - 0x11, 0x40, 0x00, 0x96, 0xa0, 0x58, 0x20, 0x48, 0xa8, 0x04, 0xa0, 0x5a, - 0x20, 0x01, 0x00, 0x19, 0x00, 0x9e, 0xa0, 0x12, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x42, 0x46, 0x42, 0x3d, 0x42, 0x34, 0x42, 0x2b, 0x42, 0x22, - 0x42, 0x19, 0x42, 0x10, 0xa9, 0x64, 0x79, 0x02, 0xa9, 0x68, 0x79, 0x06, - 0xa9, 0x6c, 0x79, 0x12, 0xa9, 0x70, 0x79, 0x16, 0x00, 0x05, 0xa9, 0x74, - 0x79, 0x02, 0xa9, 0x78, 0x79, 0x06, 0xa9, 0x7c, 0x79, 0x12, 0xa9, 0x80, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0x84, 0x79, 0x02, 0xa9, 0x88, 0x79, 0x06, - 0xa9, 0x8c, 0x79, 0x12, 0xa9, 0x90, 0x79, 0x16, 0x00, 0x05, 0xa9, 0x94, - 0x79, 0x02, 0xa9, 0x98, 0x79, 0x06, 0xa9, 0x9c, 0x79, 0x12, 0xa9, 0xa0, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0xa4, 0x79, 0x02, 0xa9, 0xa8, 0x79, 0x06, - 0xa9, 0xac, 0x79, 0x12, 0xa9, 0xb0, 0x79, 0x16, 0x00, 0x05, 0xa9, 0xb4, - 0x79, 0x02, 0xa9, 0xb8, 0x79, 0x06, 0xa9, 0xbc, 0x79, 0x12, 0xa9, 0xc0, - 0x79, 0x16, 0x00, 0x05, 0xa9, 0xc4, 0x79, 0x02, 0xa9, 0xc8, 0x79, 0x06, - 0xa9, 0xcc, 0x79, 0x12, 0xa9, 0xd0, 0x79, 0x16, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0x86, 0x20, 0x71, 0x19, 0xe8, 0x20, 0x79, 0x00, 0x90, - 0x79, 0x2c, 0xd1, 0xfc, 0x01, 0xe8, 0x78, 0x2b, 0x00, 0x02, 0x29, 0x40, - 0x90, 0x26, 0x70, 0x54, 0x00, 0x02, 0x42, 0x76, 0x42, 0x62, 0x42, 0x6d, - 0x80, 0x01, 0x70, 0x56, 0xd1, 0x9c, 0x11, 0x80, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0x41, 0xdb, 0x19, 0x0c, 0x41, 0xdb, 0x00, 0x48, 0x80, 0x01, - 0x70, 0x56, 0x78, 0x2c, 0xd0, 0xfc, 0x1d, 0x38, 0x20, 0x11, 0x00, 0x01, - 0x08, 0x0c, 0x41, 0xdb, 0x00, 0x8e, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x86, 0x20, 0x61, 0x02, 0x00, - 0x20, 0x01, 0x19, 0xab, 0x20, 0x04, 0x60, 0x1a, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, 0x60, 0xce, 0x61, 0x04, 0xc1, 0xac, - 0x61, 0x06, 0x20, 0x01, 0x00, 0x2c, 0x20, 0x04, 0x90, 0x05, 0x05, 0x20, - 0x20, 0x38, 0x20, 0x01, 0x00, 0x2e, 0x20, 0x24, 0x20, 0x01, 0x00, 0x2f, - 0x20, 0x1c, 0x08, 0x0c, 0x4c, 0x41, 0xa8, 0x13, 0x00, 0x19, 0xaf, 0x16, - 0x29, 0x00, 0xa8, 0x5a, 0x97, 0x8a, 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, - 0x20, 0x09, 0x00, 0x07, 0x00, 0x10, 0x27, 0x08, 0x90, 0x3e, 0x00, 0x96, - 0xa8, 0x58, 0x20, 0x48, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x00, 0x9e, - 0x08, 0x0c, 0x42, 0xf2, 0x1d, 0x68, 0x29, 0x00, 0xa8, 0x5a, 0x00, 0xd0, - 0x08, 0x0c, 0x4c, 0x41, 0xa8, 0x13, 0x00, 0x19, 0xa8, 0x17, 0x00, 0x01, - 0x29, 0x00, 0xa8, 0x5a, 0x20, 0x01, 0x00, 0x2e, 0x20, 0x04, 0xa8, 0x66, - 0x20, 0x01, 0x00, 0x2f, 0x20, 0x04, 0xa8, 0x6a, 0x20, 0x01, 0x00, 0x2a, - 0x20, 0x04, 0x90, 0x84, 0xff, 0xf8, 0xa8, 0x6e, 0x20, 0x01, 0x00, 0x2b, - 0x20, 0x04, 0xa8, 0x72, 0x20, 0x61, 0x00, 0x90, 0x20, 0x79, 0x01, 0x00, - 0x20, 0x01, 0x19, 0xaa, 0x20, 0x04, 0x60, 0x36, 0x20, 0x09, 0x00, 0x40, - 0x08, 0x0c, 0x22, 0x20, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, - 0xff, 0xf8, 0x60, 0x1a, 0x00, 0x06, 0x20, 0x01, 0x00, 0x2b, 0x20, 0x04, - 0x60, 0x1e, 0x78, 0xc6, 0x00, 0x0e, 0x78, 0xca, 0x90, 0x06, 0x60, 0x0a, - 0x60, 0x0e, 0x00, 0x8e, 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x00, 0x80, 0xaa, 0x60, 0x22, 0xe8, 0x20, 0xa0, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x00, 0x88, 0x70, 0x2b, 0x00, 0x26, - 0x74, 0x02, 0x73, 0x06, 0x90, 0x06, 0x70, 0x0a, 0x70, 0x0e, 0x81, 0x0b, - 0x81, 0x0b, 0x21, 0xa8, 0x81, 0x0b, 0x71, 0x12, 0x70, 0x2b, 0x00, 0x41, - 0x70, 0x2c, 0xd0, 0xfc, 0x0d, 0xe8, 0x70, 0x2b, 0x00, 0x02, 0x70, 0x2b, - 0x00, 0x40, 0x40, 0x05, 0x74, 0x00, 0x73, 0x04, 0x87, 0xff, 0x01, 0x90, - 0x00, 0x86, 0x00, 0x96, 0x29, 0x40, 0x00, 0x86, 0x08, 0x0c, 0x4c, 0x41, - 0x00, 0x8e, 0xa0, 0x58, 0x00, 0xa6, 0x20, 0x50, 0x29, 0x00, 0xb0, 0x06, - 0xa0, 0x5a, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x85, 0x00, 0x01, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x01, 0x00, 0x2d, 0x20, 0x04, - 0x90, 0x05, 0x05, 0x28, 0x20, 0x38, 0x20, 0x01, 0x00, 0x30, 0x20, 0x24, - 0x20, 0x01, 0x00, 0x31, 0x20, 0x1c, 0x08, 0x0c, 0x4c, 0x41, 0x29, 0x40, - 0xa8, 0x13, 0x00, 0x19, 0xaf, 0x16, 0x29, 0x00, 0xa8, 0x5a, 0x97, 0x8a, - 0x00, 0x07, 0x02, 0x20, 0x21, 0x38, 0x20, 0x09, 0x00, 0x07, 0x00, 0x10, - 0x27, 0x08, 0x90, 0x3e, 0x00, 0x96, 0xa8, 0x58, 0x20, 0x48, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x19, 0x00, 0x9e, 0x08, 0x0c, 0x42, 0xf2, 0x1d, 0x68, - 0x29, 0x00, 0xa8, 0x5a, 0x00, 0xd8, 0x08, 0x0c, 0x4c, 0x41, 0x29, 0x40, - 0xa0, 0x13, 0x00, 0x19, 0xa0, 0x17, 0x00, 0x01, 0x28, 0x00, 0xa0, 0x5a, - 0x20, 0x01, 0x00, 0x30, 0x20, 0x04, 0xa0, 0x66, 0x20, 0x01, 0x00, 0x31, - 0x20, 0x04, 0xa0, 0x6a, 0x20, 0x01, 0x00, 0x2a, 0x20, 0x04, 0x90, 0x84, - 0xff, 0xf8, 0xa0, 0x6e, 0x20, 0x01, 0x00, 0x2b, 0x20, 0x04, 0xa0, 0x72, - 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x04, 0x78, 0x84, 0xd0, 0xac, - 0x11, 0x80, 0x20, 0x01, 0x01, 0x01, 0x20, 0x0c, 0x91, 0x8d, 0x02, 0x00, - 0x21, 0x02, 0xa0, 0x17, 0x00, 0x00, 0x20, 0x01, 0x1a, 0x6e, 0x20, 0x03, - 0x00, 0x03, 0x20, 0x01, 0x03, 0x2a, 0x20, 0x03, 0x00, 0x09, 0x20, 0x01, - 0x03, 0x00, 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x02, 0x0d, 0x20, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8d, 0x00, 0x02, - 0x21, 0x02, 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0xa9, 0x00, 0x07, 0x20, 0xa1, 0x18, 0x40, 0x20, 0xe9, 0x00, 0x01, - 0x90, 0x06, 0x40, 0x04, 0x20, 0xa9, 0x00, 0x14, 0x20, 0xa1, 0xff, 0xec, - 0x20, 0xe9, 0x00, 0x00, 0x90, 0x06, 0x40, 0x04, 0x20, 0x09, 0x01, 0x3c, - 0x20, 0x0a, 0x01, 0x2e, 0x78, 0x80, 0x90, 0x86, 0x00, 0x52, 0x01, 0x08, - 0x00, 0x05, 0x08, 0x04, 0x36, 0x8d, 0x7d, 0x98, 0x7c, 0x9c, 0x08, 0x04, - 0x37, 0x91, 0x08, 0x0c, 0x77, 0x9e, 0x19, 0x0c, 0x61, 0x62, 0x60, 0x40, - 0x90, 0x84, 0x00, 0x20, 0x09, 0xb1, 0x20, 0x69, 0x18, 0x47, 0x2d, 0x00, - 0x20, 0x09, 0x00, 0x30, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, - 0x20, 0x39, 0x00, 0x01, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x43, 0xd1, - 0x00, 0x05, 0x08, 0x0c, 0x58, 0x4f, 0x11, 0x30, 0x3b, 0x00, 0x3a, 0x08, - 0xc1, 0x94, 0xc0, 0x95, 0x20, 0xd8, 0x21, 0xd0, 0x20, 0x69, 0x18, 0x47, - 0x68, 0x00, 0x90, 0x05, 0x09, 0x04, 0x36, 0xc2, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x68, 0x04, 0x01, 0x18, 0xc0, 0xa4, 0xc0, 0xac, - 0x68, 0x06, 0xd0, 0xac, 0x01, 0x18, 0xd0, 0xa4, 0x09, 0x04, 0x36, 0xc2, - 0xd0, 0x94, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0x01, 0x38, - 0x62, 0x00, 0x92, 0x92, 0x00, 0x05, 0x02, 0x18, 0x91, 0x8c, 0xff, 0xdf, - 0x00, 0x10, 0x91, 0x8d, 0x00, 0x20, 0x61, 0x06, 0x00, 0xce, 0xd0, 0x8c, - 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x61, 0x04, 0x01, 0x18, 0x91, 0x8d, - 0x00, 0x10, 0x00, 0x10, 0x91, 0x8c, 0xff, 0xef, 0x61, 0x06, 0x00, 0xce, - 0xd0, 0x84, 0x01, 0x58, 0x6a, 0x28, 0x92, 0x8a, 0x00, 0x7f, 0x1a, 0x04, - 0x36, 0xc2, 0x92, 0x88, 0x34, 0x8e, 0x21, 0x0d, 0x91, 0x8c, 0x00, 0xff, - 0x61, 0x66, 0xd0, 0xdc, 0x01, 0x30, 0x68, 0x28, 0x90, 0x8a, 0x00, 0x7f, - 0x1a, 0x04, 0x36, 0xc2, 0x60, 0x5e, 0x68, 0x88, 0x90, 0x84, 0x00, 0x30, - 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, 0x00, 0x06, 0x20, 0x09, - 0x19, 0xb2, 0x90, 0x80, 0x27, 0xd0, 0x20, 0x05, 0x20, 0x0a, 0x20, 0x08, - 0x20, 0x01, 0x00, 0x18, 0x08, 0x0c, 0xac, 0xed, 0x20, 0x09, 0x03, 0x90, - 0x20, 0x0b, 0x04, 0x00, 0x00, 0x0e, 0x20, 0x09, 0x19, 0xb3, 0x90, 0x80, - 0x27, 0xd4, 0x20, 0x05, 0x20, 0x0a, 0x68, 0x08, 0x90, 0x8a, 0x01, 0x00, - 0x0a, 0x04, 0x36, 0xc2, 0x90, 0x8a, 0x08, 0x41, 0x1a, 0x04, 0x36, 0xc2, - 0x90, 0x84, 0x00, 0x07, 0x19, 0x04, 0x36, 0xc2, 0x68, 0x0c, 0x90, 0x05, - 0x09, 0x04, 0x36, 0xc2, 0x68, 0x10, 0x90, 0x05, 0x09, 0x04, 0x36, 0xc2, - 0x68, 0x48, 0x69, 0x40, 0x91, 0x0a, 0x1a, 0x04, 0x36, 0xc2, 0x80, 0x01, - 0x09, 0x04, 0x36, 0xc2, 0x68, 0x4c, 0x69, 0x44, 0x91, 0x0a, 0x1a, 0x04, - 0x36, 0xc2, 0x80, 0x01, 0x09, 0x04, 0x36, 0xc2, 0x68, 0x14, 0x90, 0x8c, - 0x00, 0xff, 0x61, 0x4e, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x60, 0x52, - 0x08, 0x0c, 0x7a, 0xe7, 0x08, 0x0c, 0x6c, 0xfc, 0x08, 0x0c, 0x6d, 0x66, - 0x68, 0x08, 0x60, 0x2a, 0x08, 0x0c, 0x21, 0x92, 0x20, 0x09, 0x01, 0x70, - 0x20, 0x0b, 0x00, 0x80, 0xa0, 0x01, 0xa0, 0x01, 0x20, 0x0b, 0x00, 0x00, - 0x00, 0x36, 0x6b, 0x08, 0x08, 0x0c, 0x27, 0x2f, 0x00, 0x3e, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x19, 0x04, 0x45, 0x6d, 0x68, 0x18, 0x69, 0x1c, - 0x6a, 0x20, 0x6b, 0x24, 0x80, 0x07, 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, - 0x60, 0x16, 0x61, 0x1a, 0x62, 0x1e, 0x63, 0x22, 0x6c, 0x04, 0xd4, 0xf4, - 0x01, 0x48, 0x68, 0x30, 0x69, 0x34, 0x6a, 0x38, 0x6b, 0x3c, 0x80, 0x07, - 0x81, 0x0f, 0x82, 0x17, 0x83, 0x1f, 0x00, 0x10, 0x90, 0x84, 0xf0, 0xff, - 0x60, 0x06, 0x61, 0x0a, 0x62, 0x0e, 0x63, 0x12, 0x80, 0x07, 0x81, 0x0f, - 0x82, 0x17, 0x83, 0x1f, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xa1, 0x19, 0xb4, - 0x20, 0xe9, 0x00, 0x01, 0x40, 0x01, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xa1, - 0x19, 0xce, 0x20, 0xe9, 0x00, 0x01, 0x40, 0x01, 0x08, 0x0c, 0x8b, 0x26, - 0x00, 0xc6, 0x90, 0x0e, 0x20, 0xa9, 0x00, 0x01, 0x6b, 0x70, 0xd3, 0x84, - 0x01, 0xc8, 0x00, 0x20, 0x83, 0x9d, 0x12, 0xb0, 0x35, 0x08, 0x81, 0x09, - 0x08, 0x0c, 0x80, 0xfe, 0x68, 0x78, 0x60, 0x16, 0x68, 0x74, 0x20, 0x08, - 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x60, 0x0a, 0x91, 0x84, 0x00, 0xff, - 0x60, 0x06, 0x81, 0x08, 0x11, 0x18, 0x60, 0x03, 0x00, 0x03, 0x00, 0x10, - 0x60, 0x03, 0x00, 0x01, 0x1f, 0x04, 0x44, 0xc2, 0x00, 0xce, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0x9c, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x11, 0xa8, 0x6a, 0x88, 0x92, 0x84, 0xc0, 0x00, 0x20, 0x10, 0x92, 0x86, - 0x00, 0x00, 0x11, 0x58, 0x20, 0x63, 0x00, 0x00, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x29, 0xca, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x29, 0xad, - 0x00, 0x88, 0x92, 0x86, 0x40, 0x00, 0x11, 0x48, 0x20, 0x63, 0x00, 0x01, - 0x90, 0x06, 0x08, 0x0c, 0x29, 0xca, 0x90, 0x06, 0x08, 0x0c, 0x29, 0xad, - 0x00, 0x28, 0x92, 0x86, 0x80, 0x00, 0x1d, 0x30, 0x20, 0x63, 0x00, 0x02, - 0x00, 0xce, 0x00, 0xe6, 0x2c, 0x70, 0x08, 0x0c, 0x0e, 0xd3, 0x00, 0xee, - 0x08, 0x0c, 0x2a, 0xf6, 0x08, 0x0c, 0x2b, 0x29, 0x68, 0x88, 0xd0, 0xec, - 0x01, 0x30, 0x20, 0x11, 0x01, 0x14, 0x22, 0x04, 0x90, 0x85, 0x01, 0x80, - 0x20, 0x12, 0x6a, 0x80, 0x92, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x30, - 0x11, 0x28, 0x92, 0x94, 0xff, 0xcf, 0x92, 0x95, 0x00, 0x20, 0x6a, 0x82, - 0x20, 0x01, 0x19, 0x7c, 0x6a, 0x80, 0x92, 0x94, 0x00, 0x30, 0x92, 0x8e, - 0x00, 0x00, 0x01, 0x70, 0x92, 0x8e, 0x00, 0x10, 0x01, 0x18, 0x92, 0x8e, - 0x00, 0x20, 0x01, 0x40, 0x20, 0x03, 0xaa, 0xaa, 0x08, 0x0c, 0x27, 0xa4, - 0x20, 0x01, 0x19, 0x6d, 0x21, 0x02, 0x00, 0x08, 0x21, 0x02, 0x00, 0xc6, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, - 0x00, 0xce, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x28, 0x08, 0x0c, 0x51, 0x28, - 0x01, 0x10, 0x08, 0x0c, 0x26, 0xf5, 0x60, 0xd4, 0x90, 0x05, 0x01, 0xc0, - 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x45, 0x55, 0x00, 0xe0, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x68, 0x20, 0x11, 0x76, 0x12, 0x08, 0x0c, 0x89, 0x93, - 0x20, 0x11, 0x76, 0x05, 0x08, 0x0c, 0x8a, 0x9f, 0x08, 0x0c, 0x7a, 0xbb, - 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x40, 0x08, 0x0c, 0x60, 0x58, 0x00, 0x28, - 0x60, 0x03, 0x00, 0x04, 0x20, 0x09, 0x45, 0x6d, 0x00, 0x20, 0x08, 0x0c, - 0x6b, 0x73, 0x08, 0x04, 0x36, 0x8d, 0x20, 0x01, 0x01, 0x70, 0x20, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x4c, 0x11, 0x18, 0x20, 0x91, - 0x31, 0xbd, 0x08, 0x17, 0x20, 0x91, 0x31, 0x3d, 0x08, 0x17, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x00, 0x09, 0x04, 0x36, 0xbf, 0x20, 0x69, 0x18, 0x47, - 0x78, 0x90, 0x68, 0x42, 0x78, 0x94, 0x68, 0x46, 0x2d, 0x00, 0x20, 0x09, - 0x00, 0x30, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, - 0x00, 0x01, 0x08, 0x04, 0x4c, 0x8d, 0x90, 0x06, 0x08, 0x0c, 0x26, 0xf5, - 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0xb0, - 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x0c, 0x34, 0x82, - 0x01, 0x18, 0x61, 0x30, 0xc1, 0x8d, 0x61, 0x32, 0x08, 0x0c, 0xd6, 0x45, - 0x01, 0x30, 0x08, 0x0c, 0x77, 0xc1, 0x11, 0x18, 0x08, 0x0c, 0x77, 0x72, - 0x00, 0x38, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x20, 0x08, 0x0c, 0x61, 0x62, - 0x08, 0x0c, 0x60, 0x58, 0x08, 0x04, 0x36, 0x8d, 0x81, 0xff, 0x19, 0x04, - 0x36, 0xbf, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x10, 0x08, 0x04, 0x36, 0xbf, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x61, 0x94, 0x81, 0xff, 0x01, 0x90, - 0x70, 0x4f, 0x00, 0x00, 0x20, 0x01, 0x1d, 0x80, 0x20, 0x09, 0x00, 0x40, - 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x01, - 0x08, 0x0c, 0x4c, 0x8d, 0x70, 0x1f, 0x36, 0x8b, 0x01, 0x2e, 0x00, 0x05, - 0x70, 0x4f, 0x00, 0x01, 0x00, 0xd6, 0x20, 0x69, 0x1d, 0x80, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1d, 0x80, 0x20, 0x19, - 0xff, 0xff, 0x43, 0x04, 0x65, 0x5c, 0x95, 0x88, 0x34, 0x8e, 0x21, 0x0d, - 0x91, 0x8c, 0x00, 0xff, 0x21, 0x6a, 0x90, 0x0e, 0x20, 0x11, 0x00, 0x02, - 0x21, 0x00, 0x95, 0x06, 0x01, 0xa8, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x90, - 0xb8, 0x14, 0x82, 0x1c, 0x02, 0x38, 0x93, 0x98, 0x1d, 0x80, 0x90, 0x85, - 0xff, 0x00, 0x80, 0x07, 0x20, 0x1a, 0x00, 0x38, 0x93, 0x98, 0x1d, 0x80, - 0x23, 0x24, 0x94, 0xa4, 0xff, 0x00, 0x94, 0x05, 0x20, 0x1a, 0x82, 0x10, - 0x81, 0x08, 0x91, 0x82, 0x00, 0x80, 0x12, 0x08, 0x0c, 0x18, 0x82, 0x01, - 0x80, 0x07, 0x2d, 0x0c, 0x91, 0x05, 0x20, 0x6a, 0x00, 0xde, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0xa1, 0x1d, 0x80, 0x20, 0x99, 0x1d, 0x80, 0x08, 0x0c, - 0x60, 0xed, 0x08, 0x04, 0x45, 0xca, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, - 0x36, 0xc2, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xb4, 0x05, 0x58, - 0x78, 0x84, 0x90, 0x8e, 0x00, 0x7e, 0x05, 0x38, 0x90, 0x8e, 0x00, 0x7f, - 0x05, 0x20, 0x90, 0x8e, 0x00, 0x80, 0x05, 0x08, 0x08, 0x0c, 0x34, 0x7d, - 0x11, 0x48, 0xb8, 0x00, 0xd0, 0x8c, 0x11, 0xd8, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x11, 0xa8, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd0, 0xec, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1f, 0x46, 0x55, 0x00, 0x05, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, - 0x36, 0xc2, 0x20, 0xa9, 0x00, 0x2b, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, - 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, - 0x20, 0xa0, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x08, 0x90, 0x80, 0x00, 0x06, - 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, - 0x20, 0x98, 0x08, 0x0c, 0x0f, 0xd6, 0x00, 0x70, 0x20, 0xa9, 0x00, 0x04, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x0a, 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0xd6, - 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, - 0xff, 0xc0, 0x90, 0x80, 0x00, 0x02, 0x20, 0x09, 0x00, 0x2b, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x04, 0x4c, 0x8d, 0x81, 0xff, - 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x58, 0x09, 0x04, 0x36, 0xc2, - 0x08, 0x0c, 0x6a, 0x00, 0x09, 0x04, 0x36, 0xbf, 0x00, 0x58, 0xa8, 0x78, - 0x90, 0x05, 0x01, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x36, 0xbf, - 0xa9, 0x74, 0xaa, 0x94, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, 0x58, 0x48, - 0x09, 0x04, 0x36, 0x8d, 0x70, 0x1f, 0x46, 0x9f, 0x70, 0x07, 0x00, 0x03, - 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x78, 0x88, 0x90, 0x8a, - 0x10, 0x00, 0x1a, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, - 0x36, 0xc2, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x20, 0x08, 0x0c, 0x6c, 0x19, - 0x19, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x6a, 0x85, 0x09, 0x04, 0x36, 0xbf, - 0x20, 0x19, 0x00, 0x04, 0x90, 0x0e, 0x08, 0x0c, 0x6a, 0x12, 0x09, 0x04, - 0x36, 0xbf, 0x79, 0x84, 0x7a, 0x88, 0x04, 0xc9, 0x08, 0xa8, 0xa8, 0x9c, - 0x90, 0x8a, 0x10, 0x00, 0x12, 0xf8, 0x08, 0x0c, 0x4c, 0x72, 0x01, 0xe0, - 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0xb0, - 0x08, 0x0c, 0x6a, 0x85, 0x20, 0x09, 0x00, 0x02, 0x01, 0x68, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x6a, 0x12, 0x20, 0x09, - 0x00, 0x03, 0x01, 0x20, 0xa9, 0x98, 0xaa, 0x9c, 0x00, 0xd1, 0x00, 0x60, - 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, - 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, - 0xa8, 0x97, 0x40, 0x00, 0x08, 0x0c, 0x58, 0x48, 0x01, 0x10, 0x90, 0x06, - 0x00, 0x18, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, - 0x00, 0x05, 0x91, 0x86, 0x00, 0xff, 0x01, 0x10, 0x00, 0x71, 0x00, 0x60, - 0x20, 0x29, 0x00, 0x7e, 0x20, 0x61, 0x18, 0x00, 0x64, 0x5c, 0x24, 0x00, - 0x95, 0x06, 0x01, 0x10, 0x25, 0x08, 0x00, 0x19, 0x85, 0x29, 0x1e, 0xc8, - 0x00, 0x05, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x38, 0x22, 0x00, 0x80, 0x03, - 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x08, 0x0c, 0x89, 0xa1, 0x00, 0x05, - 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x79, 0x8c, 0x20, 0x01, 0x19, 0x80, - 0x91, 0x8c, 0x80, 0x00, 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x58, 0x09, 0x04, - 0x36, 0xc2, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x20, 0x08, 0x0c, 0x6c, 0x19, - 0x19, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x68, 0x7b, 0x09, 0x04, 0x36, 0xbf, - 0x08, 0x0c, 0x6a, 0x09, 0x09, 0x04, 0x36, 0xbf, 0x20, 0x01, 0x19, 0x80, - 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x36, 0x8d, 0x08, 0x04, 0x46, 0xaa, - 0xa9, 0xa0, 0x20, 0x01, 0x19, 0x80, 0x91, 0x8c, 0x80, 0x00, 0xc1, 0x8d, - 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x65, 0x01, 0xa0, 0x08, 0x0c, 0x6c, 0x11, - 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0x70, 0x08, 0x0c, 0x68, 0x7b, - 0x20, 0x09, 0x00, 0x02, 0x01, 0x28, 0x08, 0x0c, 0x6a, 0x09, 0x11, 0x70, - 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, - 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, 0x20, 0x01, 0x19, 0x80, - 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x28, 0x08, 0x0c, 0x58, 0x48, 0x01, 0x10, - 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x00, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x79, 0x8c, - 0x20, 0x01, 0x19, 0x7f, 0x91, 0x8c, 0x80, 0x00, 0x21, 0x02, 0x08, 0x0c, - 0x4c, 0x58, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x20, - 0x08, 0x0c, 0x6c, 0x19, 0x19, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x68, 0x7b, - 0x09, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x69, 0xf7, 0x09, 0x04, 0x36, 0xbf, - 0x20, 0x01, 0x19, 0x7f, 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x04, 0x36, 0x8d, - 0x08, 0x04, 0x46, 0xaa, 0xa9, 0xa0, 0x20, 0x01, 0x19, 0x7f, 0x91, 0x8c, - 0x80, 0x00, 0xc1, 0x8d, 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x65, 0x01, 0xa0, - 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0x70, - 0x08, 0x0c, 0x68, 0x7b, 0x20, 0x09, 0x00, 0x02, 0x01, 0x28, 0x08, 0x0c, - 0x69, 0xf7, 0x11, 0x70, 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, 0x40, 0x05, - 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, - 0x20, 0x01, 0x19, 0x7f, 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x28, 0x08, 0x0c, - 0x58, 0x48, 0x01, 0x10, 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x05, 0x61, 0x00, 0x08, 0x04, - 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, - 0x58, 0x54, 0x19, 0x04, 0x36, 0xbf, 0x79, 0xa8, 0xd1, 0x84, 0x11, 0x58, - 0xb8, 0x34, 0x80, 0x07, 0x78, 0x9e, 0xb8, 0x30, 0x80, 0x07, 0x78, 0x9a, - 0xbb, 0x2c, 0x83, 0x1f, 0xba, 0x28, 0x82, 0x17, 0x00, 0x50, 0xb8, 0x24, - 0x80, 0x07, 0x78, 0x9e, 0xb8, 0x20, 0x80, 0x07, 0x78, 0x9a, 0xbb, 0x1c, - 0x83, 0x1f, 0xba, 0x18, 0x82, 0x17, 0xb9, 0x00, 0x91, 0x8c, 0x02, 0x02, - 0x08, 0x04, 0x36, 0x8d, 0x78, 0xa8, 0x90, 0x9c, 0x00, 0x03, 0xd0, 0xac, - 0x11, 0x50, 0xd0, 0xb4, 0x11, 0x40, 0x93, 0x9a, 0x00, 0x03, 0x1a, 0x04, - 0x36, 0xbf, 0x62, 0x5c, 0x78, 0x84, 0x92, 0x06, 0x15, 0x48, 0x08, 0x0c, - 0x8b, 0x10, 0x20, 0x01, 0xff, 0xec, 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x20, 0x39, 0x00, 0x00, 0x00, 0x06, - 0x78, 0xa8, 0x90, 0x84, 0x00, 0x80, 0x11, 0x18, 0x00, 0x0e, 0x08, 0x04, - 0x4c, 0x8d, 0x00, 0x0e, 0x20, 0x31, 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0xa6, 0x6a, 0xa1, 0x7a, 0xa7, 0x72, 0xa0, 0x76, 0xa2, 0x8e, - 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, 0x08, 0x0c, 0x11, 0x4e, 0x70, 0x07, - 0x00, 0x02, 0x70, 0x1f, 0x48, 0x62, 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, - 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, - 0x6c, 0x11, 0x19, 0x04, 0x36, 0xbf, 0x00, 0xc6, 0x08, 0x0c, 0x4c, 0x41, - 0x00, 0xce, 0x09, 0x04, 0x36, 0xbf, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0x7e, 0xa8, 0x08, 0x0c, 0xd0, 0x92, 0x09, 0x04, - 0x36, 0xbf, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x48, 0x66, 0x00, 0x05, - 0x08, 0x0c, 0x43, 0x97, 0x08, 0x04, 0x36, 0x8d, 0xa8, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x09, 0x04, 0x36, 0xbf, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x1b, - 0x20, 0x09, 0x00, 0x0c, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, - 0x08, 0x04, 0x4c, 0x8d, 0x90, 0x06, 0x08, 0x0c, 0x26, 0xf5, 0x78, 0xa8, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0xff, 0x01, 0x18, 0x81, 0xff, - 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x10, 0x08, 0x0c, - 0x61, 0x62, 0x78, 0x88, 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, 0x36, 0xc2, - 0x79, 0x84, 0x91, 0x86, 0x00, 0xff, 0x01, 0x38, 0x91, 0x82, 0x00, 0x7f, - 0x1a, 0x04, 0x36, 0xc2, 0x21, 0x00, 0x08, 0x0c, 0x26, 0xbf, 0x00, 0x26, - 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x61, 0x1a, 0x04, - 0x60, 0x1b, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0x60, 0x7b, 0x00, 0x00, - 0x60, 0x7f, 0x00, 0x00, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x58, 0x08, 0x0c, - 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x77, 0xe2, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0xf0, 0x08, 0x0c, 0xac, 0xfc, - 0x08, 0x0c, 0xb0, 0x9b, 0x08, 0x0c, 0xad, 0x18, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, 0x81, 0x0f, - 0x91, 0x05, 0x60, 0x4a, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, - 0x20, 0x09, 0x19, 0x99, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x09, 0x00, 0x2d, - 0x20, 0x11, 0x60, 0x88, 0x08, 0x0c, 0x8a, 0x5d, 0x79, 0x84, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x10, 0x20, 0x09, 0x00, 0xff, 0x7a, 0x88, 0x08, 0x0c, - 0x47, 0x0d, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x2e, 0x08, 0x04, 0x36, 0x8d, - 0x79, 0x84, 0x08, 0x0c, 0x67, 0x49, 0x2b, 0x08, 0x19, 0x04, 0x36, 0xc2, - 0x08, 0x04, 0x36, 0x8d, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x04, 0x36, 0xbf, 0x60, 0xdc, 0xd0, 0xac, 0x11, 0x30, 0xd0, 0x9c, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x05, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, - 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, - 0x79, 0x84, 0x81, 0xff, 0x09, 0x04, 0x36, 0xc2, 0x91, 0x92, 0x00, 0x21, - 0x1a, 0x04, 0x36, 0xc2, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x70, 0x2a, 0xaf, 0x60, 0x77, 0x36, - 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x49, 0x21, 0x78, 0x80, 0x90, 0x86, - 0x00, 0x6e, 0x01, 0x10, 0x70, 0x1f, 0x52, 0xda, 0x00, 0x05, 0x20, 0x09, - 0x00, 0x80, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x18, 0x08, 0x0c, 0x6c, 0x11, - 0x01, 0x20, 0x20, 0x21, 0x40, 0x0a, 0x08, 0x04, 0x36, 0x8f, 0x00, 0xd6, - 0x00, 0x96, 0xa9, 0x64, 0xaa, 0x6c, 0xab, 0x70, 0xac, 0x74, 0xad, 0x78, - 0xae, 0x7c, 0xa8, 0x84, 0x90, 0xbe, 0x01, 0x00, 0x09, 0x04, 0x49, 0xba, - 0x90, 0xbe, 0x01, 0x12, 0x09, 0x04, 0x49, 0xba, 0x90, 0xbe, 0x01, 0x13, - 0x09, 0x04, 0x49, 0xba, 0x90, 0xbe, 0x01, 0x14, 0x09, 0x04, 0x49, 0xba, - 0x90, 0xbe, 0x01, 0x17, 0x09, 0x04, 0x49, 0xba, 0x90, 0xbe, 0x01, 0x1a, - 0x09, 0x04, 0x49, 0xba, 0x90, 0xbe, 0x01, 0x1c, 0x09, 0x04, 0x49, 0xba, - 0x90, 0xbe, 0x01, 0x21, 0x09, 0x04, 0x49, 0xa1, 0x90, 0xbe, 0x01, 0x31, - 0x09, 0x04, 0x49, 0xa1, 0x90, 0xbe, 0x01, 0x71, 0x09, 0x04, 0x49, 0xba, - 0x90, 0xbe, 0x01, 0x73, 0x09, 0x04, 0x49, 0xba, 0x90, 0xbe, 0x01, 0xa1, - 0x11, 0x28, 0xa8, 0x94, 0x80, 0x07, 0xa8, 0x96, 0x08, 0x04, 0x49, 0xc5, - 0x90, 0xbe, 0x02, 0x12, 0x09, 0x04, 0x49, 0xae, 0x90, 0xbe, 0x02, 0x13, - 0x05, 0xe8, 0x90, 0xbe, 0x02, 0x14, 0x05, 0x00, 0x90, 0xbe, 0x02, 0x17, - 0x01, 0x88, 0x90, 0xbe, 0x02, 0x1a, 0x11, 0x20, 0xa8, 0x9c, 0x80, 0x07, - 0xa8, 0x9e, 0x04, 0xe0, 0x90, 0xbe, 0x02, 0x1f, 0x05, 0xc8, 0x90, 0xbe, - 0x03, 0x00, 0x05, 0xb0, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x04, 0x36, 0xc2, - 0x70, 0x28, 0x90, 0x80, 0x00, 0x10, 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, - 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x07, 0x08, 0x0c, 0x4a, 0x03, - 0x70, 0x28, 0x90, 0x80, 0x00, 0x0e, 0x20, 0x98, 0x20, 0xa0, 0x70, 0x34, - 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, 0x08, 0x0c, 0x4a, 0x03, - 0x00, 0xc8, 0x70, 0x28, 0x90, 0x80, 0x00, 0x0c, 0x20, 0x98, 0x20, 0xa0, - 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, 0x08, 0x0c, - 0x4a, 0x10, 0x00, 0xb8, 0x70, 0x28, 0x90, 0x80, 0x00, 0x0e, 0x20, 0x98, - 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, - 0x08, 0x0c, 0x4a, 0x10, 0x70, 0x28, 0x90, 0x80, 0x00, 0x0c, 0x20, 0x98, - 0x20, 0xa0, 0x70, 0x34, 0x20, 0xe0, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x01, - 0x04, 0xf1, 0x00, 0xc6, 0x08, 0x0c, 0x4c, 0x41, 0x05, 0x50, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x67, 0x01, 0x19, 0x90, 0x06, 0xa8, 0x82, - 0xa8, 0x7f, 0x00, 0x20, 0xa8, 0x8b, 0x00, 0x01, 0x81, 0x0b, 0xa9, 0xae, - 0xa8, 0xb2, 0xaa, 0xb6, 0xab, 0xba, 0xac, 0xbe, 0xad, 0xc2, 0xa9, 0xc6, - 0xa8, 0xca, 0x00, 0xce, 0x00, 0x9e, 0x00, 0xde, 0xa8, 0x66, 0xa8, 0x22, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0xa8, 0x04, 0x20, 0x48, 0x08, 0x0c, - 0xd0, 0xad, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x49, 0xfa, 0x00, 0x05, 0x00, 0xce, - 0x00, 0x9e, 0x00, 0xde, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, - 0xa8, 0x20, 0x90, 0x86, 0x80, 0x01, 0x19, 0x04, 0x36, 0x8d, 0x20, 0x09, - 0x00, 0x04, 0x08, 0x04, 0x36, 0xbf, 0x00, 0x16, 0x00, 0x26, 0x35, 0x10, - 0x20, 0xa9, 0x00, 0x02, 0x40, 0x02, 0x41, 0x04, 0x40, 0x04, 0x82, 0x11, - 0x1d, 0xc8, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x00, 0x46, 0x35, 0x20, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x02, - 0x43, 0x04, 0x42, 0x04, 0x41, 0x04, 0x40, 0x04, 0x84, 0x21, 0x1d, 0xb8, - 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x81, 0xff, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, 0x60, 0xdc, - 0xd0, 0xac, 0x11, 0x88, 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, - 0x01, 0x30, 0xd0, 0x9c, 0x01, 0x20, 0x20, 0x09, 0x00, 0x16, 0x08, 0x04, - 0x36, 0xbf, 0xd0, 0x9c, 0x11, 0x20, 0x20, 0x09, 0x00, 0x05, 0x08, 0x04, - 0x36, 0xbf, 0x79, 0x84, 0x78, 0xa8, 0x20, 0x40, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x20, 0x91, 0x82, 0x00, 0x7f, 0x0a, 0x04, 0x36, 0xc2, 0x91, 0x86, - 0x00, 0xff, 0x09, 0x04, 0x36, 0xc2, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, - 0x36, 0xc2, 0x7a, 0x8c, 0x7b, 0x88, 0x60, 0x7c, 0x93, 0x06, 0x11, 0x58, - 0x60, 0x80, 0x92, 0x4e, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x20, 0x99, 0xcc, 0xff, 0x00, 0x09, 0x04, 0x36, 0xc2, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x01, 0x98, 0x93, 0x86, 0x00, 0xff, 0x01, 0x80, 0x00, 0x26, 0x20, 0x11, - 0x80, 0x08, 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, 0x01, 0x48, 0x91, 0x8d, - 0x80, 0x00, 0x08, 0x0c, 0x6c, 0x7f, 0x11, 0x20, 0x20, 0x01, 0x40, 0x09, - 0x08, 0x04, 0x4a, 0xc1, 0x08, 0x0c, 0x4b, 0x54, 0x09, 0x04, 0x4a, 0xc7, - 0x00, 0x86, 0x90, 0xc6, 0x40, 0x00, 0x00, 0x8e, 0x15, 0x38, 0x00, 0xc6, - 0x00, 0x06, 0x00, 0x36, 0xb8, 0x18, 0xbb, 0x1c, 0x93, 0x05, 0xbb, 0x20, - 0x93, 0x05, 0xbb, 0x24, 0x93, 0x05, 0xbb, 0x28, 0x93, 0x05, 0xbb, 0x2c, - 0x93, 0x05, 0xbb, 0x30, 0x93, 0x05, 0xbb, 0x34, 0x93, 0x05, 0x00, 0x3e, - 0x05, 0x70, 0xd8, 0x8c, 0x11, 0x28, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x10, - 0xc8, 0x9d, 0x04, 0x38, 0x90, 0x0e, 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, - 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x00, 0x0e, - 0x00, 0xce, 0x00, 0xb8, 0x90, 0xc6, 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, - 0x00, 0x90, 0x90, 0xc6, 0x40, 0x08, 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, - 0x00, 0x60, 0x90, 0xc6, 0x40, 0x09, 0x11, 0x08, 0x00, 0x40, 0x90, 0xc6, - 0x40, 0x06, 0x11, 0x08, 0x00, 0x20, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, - 0x00, 0x0a, 0x20, 0x20, 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8f, 0x00, 0x0e, - 0x00, 0xce, 0x2b, 0x00, 0x70, 0x26, 0x00, 0x16, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0xe6, 0x2c, 0x70, 0x08, 0x0c, 0xb1, 0xdd, 0x09, 0x04, 0x4b, 0x1c, - 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x2e, 0x58, 0x00, 0xee, - 0x00, 0xe6, 0x00, 0xc6, 0x08, 0x0c, 0x4c, 0x41, 0x00, 0xce, 0x2b, 0x70, - 0x11, 0x58, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xee, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x1e, 0x01, 0x2e, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, - 0x90, 0x0e, 0xa9, 0x66, 0xa9, 0x6a, 0x29, 0x00, 0x60, 0x16, 0xa9, 0x32, - 0xa8, 0x68, 0xc0, 0xfd, 0xd8, 0x8c, 0x01, 0x08, 0xc0, 0xf5, 0xa8, 0x6a, - 0xd8, 0x9c, 0x11, 0x10, 0x08, 0x0c, 0x33, 0x15, 0x60, 0x23, 0x00, 0x01, - 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0xd8, 0x9c, 0x01, 0x38, 0x20, 0x01, - 0x00, 0x04, 0x08, 0x0c, 0x66, 0xfa, 0x20, 0x09, 0x00, 0x03, 0x00, 0x30, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x0c, 0xb2, 0x0a, 0x78, 0xa8, 0xd0, 0x94, 0x01, 0x38, 0x00, 0xee, - 0x70, 0x24, 0x00, 0xe6, 0x20, 0x58, 0xb8, 0xd4, 0xc0, 0x8d, 0xb8, 0xd6, - 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, - 0x01, 0x2e, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x4b, 0x2b, 0x00, 0x05, 0xa8, 0x30, - 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x40, 0x20, 0x08, - 0x91, 0x8e, 0xde, 0xad, 0x11, 0x20, 0x20, 0x21, 0x40, 0x09, 0x08, 0x04, - 0x36, 0x8f, 0x90, 0x86, 0x01, 0x00, 0x70, 0x24, 0x20, 0x58, 0x11, 0x38, - 0x20, 0x09, 0x00, 0x04, 0xba, 0x04, 0x92, 0x94, 0x00, 0xff, 0x08, 0x04, - 0x57, 0x8e, 0x90, 0x0e, 0xa8, 0x68, 0xd0, 0xf4, 0x19, 0x04, 0x36, 0x8d, - 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, 0x36, 0x8d, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0x96, 0x83, 0xff, 0x09, 0x04, 0x4b, 0xa3, 0x90, 0x2e, 0x08, 0x0c, - 0xb0, 0x94, 0x01, 0x30, 0x90, 0x26, 0x20, 0xa9, 0x08, 0x00, 0x20, 0x71, - 0x10, 0x00, 0x00, 0x30, 0x20, 0x21, 0x00, 0x7f, 0x20, 0xa9, 0x07, 0x81, - 0x20, 0x71, 0x10, 0x7f, 0x2e, 0x04, 0x90, 0x05, 0x11, 0xb8, 0x21, 0x00, - 0x94, 0x06, 0x19, 0x04, 0x4b, 0xb4, 0x24, 0x28, 0x94, 0xce, 0x00, 0x7f, - 0x11, 0x20, 0x92, 0xce, 0xff, 0xfd, 0x15, 0x58, 0x00, 0x30, 0x94, 0xce, - 0x00, 0x80, 0x11, 0x30, 0x92, 0xce, 0xff, 0xfc, 0x15, 0x20, 0x93, 0xce, - 0x00, 0xff, 0x15, 0x08, 0xc5, 0xfd, 0x04, 0x80, 0x20, 0x58, 0xbf, 0x10, - 0x27, 0x00, 0x93, 0x06, 0x11, 0xe8, 0xbe, 0x14, 0x26, 0x00, 0x92, 0x06, - 0x11, 0xc8, 0x24, 0x00, 0x91, 0x06, 0x11, 0x80, 0xd8, 0x84, 0x05, 0x98, - 0xd8, 0x94, 0x15, 0x88, 0x08, 0x0c, 0x6b, 0xb1, 0x15, 0x70, 0x20, 0x01, - 0x40, 0x00, 0x04, 0x60, 0x08, 0x0c, 0x6c, 0x11, 0x15, 0x40, 0x20, 0x01, - 0x40, 0x00, 0x04, 0x30, 0x20, 0x01, 0x40, 0x07, 0x04, 0x18, 0x20, 0x01, - 0x40, 0x06, 0x04, 0x00, 0x24, 0x00, 0x91, 0x06, 0x11, 0x58, 0xbe, 0x14, - 0x87, 0xff, 0x11, 0x28, 0x86, 0xff, 0x09, 0x18, 0x08, 0x0c, 0xb0, 0x94, - 0x19, 0x00, 0x20, 0x01, 0x40, 0x08, 0x00, 0x90, 0x84, 0x20, 0x8e, 0x70, - 0x1f, 0x04, 0x4b, 0x6a, 0x85, 0xff, 0x11, 0x30, 0x20, 0x01, 0x40, 0x09, - 0x00, 0x48, 0x20, 0x01, 0x00, 0x01, 0x00, 0x30, 0x08, 0x0c, 0x67, 0x49, - 0x1d, 0xd0, 0xbb, 0x12, 0xba, 0x16, 0x90, 0x06, 0x90, 0x05, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x78, 0x84, 0x90, 0x05, 0x09, 0x04, - 0x36, 0xc2, 0x90, 0x96, 0x00, 0xff, 0x01, 0x20, 0x90, 0x92, 0x00, 0x04, - 0x1a, 0x04, 0x36, 0xc2, 0x20, 0x10, 0x29, 0x18, 0x08, 0x0c, 0x32, 0xb5, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, - 0x00, 0x03, 0x70, 0x1f, 0x4b, 0xf6, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x19, 0x04, 0x36, 0x8d, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, - 0x36, 0xbf, 0x79, 0x84, 0x08, 0x0c, 0xb0, 0x94, 0x11, 0x20, 0x91, 0x82, - 0x00, 0x7f, 0x0a, 0x04, 0x36, 0xc2, 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, - 0x36, 0xc2, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, 0x36, 0xc2, 0x20, 0x01, - 0x94, 0x00, 0x08, 0x0c, 0x57, 0xe9, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x04, - 0x36, 0x8d, 0xa9, 0x98, 0x08, 0x0c, 0xb0, 0x94, 0x11, 0x18, 0x91, 0x82, - 0x00, 0x7f, 0x02, 0x80, 0x91, 0x86, 0x00, 0xff, 0x01, 0x68, 0x91, 0x82, - 0x08, 0x00, 0x12, 0x50, 0x20, 0x01, 0x94, 0x00, 0x08, 0x0c, 0x57, 0xe9, - 0x11, 0xa8, 0x00, 0x60, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, - 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, 0x90, 0x0e, 0x90, 0x85, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x05, 0x20, 0x09, 0x00, 0x0a, - 0x0c, 0x48, 0x08, 0x0c, 0x10, 0x59, 0x01, 0x98, 0x90, 0x06, 0xa8, 0x02, - 0x70, 0x14, 0x90, 0x05, 0x11, 0x20, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, - 0x00, 0x40, 0x70, 0x18, 0xa8, 0x02, 0x00, 0x86, 0x20, 0x40, 0x29, 0x00, - 0xa0, 0x06, 0x70, 0x1a, 0x00, 0x8e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x79, 0x84, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x30, 0x7e, 0x88, 0x96, 0x84, - 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, 0x02, 0x08, 0x90, 0x5e, 0x8b, 0xff, - 0x00, 0x05, 0xa9, 0x98, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x30, 0xae, 0x9c, - 0x96, 0x84, 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, 0x02, 0x08, 0x90, 0x5e, - 0x8b, 0xff, 0x00, 0x05, 0xae, 0x98, 0x00, 0x08, 0x7e, 0x84, 0x26, 0x08, - 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x08, 0x00, 0x08, 0x90, 0x5e, 0x8b, 0xff, - 0x00, 0x05, 0x00, 0x16, 0x71, 0x14, 0x81, 0xff, 0x01, 0x28, 0x21, 0x48, - 0xa9, 0x04, 0x08, 0x0c, 0x10, 0x8b, 0x0c, 0xc8, 0x71, 0x16, 0x71, 0x1a, - 0x00, 0x1e, 0x00, 0x05, 0x20, 0x31, 0x00, 0x01, 0x00, 0x10, 0x20, 0x31, - 0x00, 0x00, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa6, 0x6a, 0xa1, 0x7a, - 0xa7, 0x72, 0xa0, 0x76, 0xa2, 0x8e, 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, - 0x08, 0x0c, 0x11, 0x4e, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, 0x36, 0x8d, - 0x00, 0x05, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, - 0x00, 0x00, 0x20, 0x01, 0x18, 0xb0, 0x20, 0x04, 0x90, 0x05, 0x11, 0x90, - 0x0e, 0x04, 0x4c, 0xbe, 0x7a, 0x36, 0x78, 0x33, 0x00, 0x12, 0x7a, 0x82, - 0x7b, 0x86, 0x7c, 0x8a, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, - 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x08, 0x04, 0x4d, 0x24, - 0x00, 0x16, 0x00, 0x86, 0x00, 0x96, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x9e, 0x70, 0x44, 0x90, 0x05, 0x15, 0x40, 0x71, 0x48, 0x91, 0x82, - 0x00, 0x10, 0x02, 0x88, 0x70, 0x38, 0x20, 0x60, 0x08, 0x0c, 0x10, 0x59, - 0x09, 0x04, 0x4d, 0x1c, 0xa8, 0x4b, 0x00, 0x00, 0x29, 0x00, 0x70, 0x46, - 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x05, 0xa8, 0x46, - 0x00, 0x98, 0x70, 0x38, 0x90, 0xe0, 0x00, 0x04, 0x20, 0x01, 0x18, 0xba, - 0x9c, 0x82, 0x18, 0xfa, 0x02, 0x10, 0x20, 0x61, 0x18, 0xba, 0x2c, 0x00, - 0x70, 0x3a, 0x71, 0x48, 0x81, 0xff, 0x11, 0x08, 0x70, 0x3e, 0x81, 0x08, - 0x71, 0x4a, 0x04, 0x60, 0x71, 0x48, 0x81, 0x08, 0x71, 0x4a, 0x70, 0x44, - 0x20, 0x40, 0xa1, 0x44, 0x21, 0x05, 0x00, 0x16, 0x90, 0x8a, 0x00, 0x36, - 0x1a, 0x0c, 0x0d, 0x85, 0x20, 0x60, 0x00, 0x1e, 0x81, 0x08, 0x21, 0x05, - 0x90, 0x05, 0xa1, 0x46, 0x15, 0x20, 0x08, 0x0c, 0x10, 0x59, 0x11, 0x30, - 0x81, 0x09, 0xa9, 0x46, 0x71, 0x48, 0x81, 0x09, 0x71, 0x4a, 0x00, 0xd8, - 0x90, 0x06, 0xa8, 0x06, 0xa8, 0x4a, 0xa0, 0x46, 0x28, 0x00, 0xa8, 0x02, - 0x29, 0x00, 0xa0, 0x06, 0x70, 0x46, 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, - 0x1e, 0xc1, 0x20, 0x05, 0xa8, 0x46, 0x00, 0x58, 0x22, 0x62, 0x63, 0x06, - 0x64, 0x0a, 0x00, 0xee, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x1e, - 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, 0x2c, 0x00, 0x90, 0x82, 0x00, 0x1b, - 0x00, 0x02, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x48, 0x4d, 0x46, 0x4d, 0x46, - 0x4d, 0x46, 0x4d, 0x4c, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x50, - 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x54, 0x4d, 0x46, 0x4d, 0x46, - 0x4d, 0x46, 0x4d, 0x58, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x5c, - 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x46, 0x4d, 0x61, 0x08, 0x0c, 0x0d, 0x85, - 0xa2, 0x76, 0xa3, 0x7a, 0xa4, 0x7e, 0x08, 0x98, 0xa2, 0x86, 0xa3, 0x8a, - 0xa4, 0x8e, 0x08, 0x78, 0xa2, 0x96, 0xa3, 0x9a, 0xa4, 0x9e, 0x08, 0x58, - 0xa2, 0xa6, 0xa3, 0xaa, 0xa4, 0xae, 0x08, 0x38, 0xa2, 0xb6, 0xa3, 0xba, - 0xa4, 0xbe, 0x08, 0x18, 0xa2, 0xc6, 0xa3, 0xca, 0xa4, 0xce, 0x08, 0x04, - 0x4d, 0x1f, 0xa2, 0xd6, 0xa3, 0xda, 0xa4, 0xde, 0x08, 0x04, 0x4d, 0x1f, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, 0x70, 0x48, 0x90, 0x05, 0x09, 0x04, - 0x4d, 0xf8, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x4d, 0xf7, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x96, 0x00, 0x86, - 0x00, 0x76, 0x90, 0x06, 0x20, 0x38, 0x70, 0x40, 0x20, 0x48, 0x90, 0x05, - 0x05, 0x00, 0xa9, 0x48, 0x21, 0x05, 0x00, 0x16, 0x90, 0x8a, 0x00, 0x36, - 0x1a, 0x0c, 0x0d, 0x85, 0x20, 0x60, 0x00, 0x1e, 0x81, 0x08, 0x21, 0x05, - 0x90, 0x05, 0xa9, 0x4a, 0x19, 0x04, 0x4d, 0xfa, 0xa8, 0x04, 0x90, 0x05, - 0x09, 0x0c, 0x0d, 0x85, 0x70, 0x42, 0x29, 0x38, 0x20, 0x40, 0xa0, 0x03, - 0x00, 0x00, 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x05, - 0xa0, 0x4a, 0x08, 0x04, 0x4d, 0xfa, 0x70, 0x3c, 0x20, 0x60, 0x2c, 0x14, - 0x63, 0x04, 0x64, 0x08, 0x65, 0x0c, 0x22, 0x00, 0x78, 0x36, 0x78, 0x33, - 0x00, 0x12, 0x78, 0x82, 0x23, 0x00, 0x78, 0x86, 0x24, 0x00, 0x78, 0x8a, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, - 0x19, 0x0c, 0x12, 0x00, 0x87, 0xff, 0x01, 0x18, 0x27, 0x48, 0x08, 0x0c, - 0x10, 0x8b, 0x70, 0x48, 0x80, 0x01, 0x70, 0x4a, 0x90, 0x05, 0x11, 0x70, - 0x70, 0x40, 0x20, 0x48, 0x90, 0x05, 0x01, 0x28, 0x08, 0x0c, 0x10, 0x8b, - 0x90, 0x06, 0x70, 0x42, 0x70, 0x46, 0x70, 0x3b, 0x18, 0xba, 0x70, 0x3f, - 0x18, 0xba, 0x04, 0x20, 0x70, 0x40, 0x90, 0x05, 0x15, 0x08, 0x72, 0x38, - 0x2c, 0x00, 0x92, 0x06, 0x01, 0x48, 0x9c, 0x80, 0x00, 0x04, 0x90, 0xfa, - 0x18, 0xfa, 0x02, 0x10, 0x20, 0x01, 0x18, 0xba, 0x70, 0x3e, 0x00, 0xa0, - 0x90, 0x06, 0x70, 0x3e, 0x70, 0x3a, 0x70, 0x44, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0x85, 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, 0x1d, 0xe0, 0x29, 0x00, - 0x70, 0x42, 0x20, 0x01, 0x00, 0x02, 0x90, 0x80, 0x1e, 0xc1, 0x20, 0x05, - 0xa8, 0x4a, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xce, - 0x00, 0xfe, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x2c, 0x00, 0x90, 0x82, - 0x00, 0x1b, 0x00, 0x02, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x1b, 0x4e, 0x19, - 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x20, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x19, - 0x4e, 0x25, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x2a, 0x4e, 0x19, - 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x2f, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x19, - 0x4e, 0x34, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x19, 0x4e, 0x39, 0x08, 0x0c, - 0x0d, 0x85, 0xaa, 0x74, 0xab, 0x78, 0xac, 0x7c, 0x08, 0x04, 0x4d, 0xa5, - 0xaa, 0x84, 0xab, 0x88, 0xac, 0x8c, 0x08, 0x04, 0x4d, 0xa5, 0xaa, 0x94, - 0xab, 0x98, 0xac, 0x9c, 0x08, 0x04, 0x4d, 0xa5, 0xaa, 0xa4, 0xab, 0xa8, - 0xac, 0xac, 0x08, 0x04, 0x4d, 0xa5, 0xaa, 0xb4, 0xab, 0xb8, 0xac, 0xbc, - 0x08, 0x04, 0x4d, 0xa5, 0xaa, 0xc4, 0xab, 0xc8, 0xac, 0xcc, 0x08, 0x04, - 0x4d, 0xa5, 0xaa, 0xd4, 0xab, 0xd8, 0xac, 0xdc, 0x08, 0x04, 0x4d, 0xa5, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xb6, 0x00, 0xc6, 0x20, 0x09, - 0x00, 0x7e, 0x08, 0x0c, 0x67, 0xb4, 0x20, 0x19, 0x00, 0x01, 0xb8, 0x5c, - 0xd0, 0xac, 0x01, 0x10, 0x20, 0x19, 0x00, 0x00, 0x20, 0x11, 0x80, 0x1b, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xc4, - 0x01, 0x20, 0x20, 0x11, 0x80, 0x14, 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x2e, - 0x00, 0x05, 0x81, 0xff, 0x19, 0x04, 0x36, 0xbf, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x60, 0x30, 0xc0, 0x8d, 0xc0, 0x85, 0xc0, 0xac, 0x60, 0x32, - 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x58, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, - 0x61, 0x9d, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x77, 0xe2, 0x08, 0x0c, - 0x76, 0xcd, 0x00, 0x10, 0x08, 0x0c, 0x60, 0x58, 0x01, 0x2e, 0x08, 0x04, - 0x36, 0x8d, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, - 0x36, 0xbf, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, - 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x6c, 0x09, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x08, 0x08, 0x04, 0x36, 0xbf, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, - 0xd0, 0x8c, 0x01, 0x78, 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, - 0x6c, 0x35, 0x00, 0x2e, 0x01, 0x40, 0x79, 0x84, 0x08, 0x0c, 0x6c, 0x7f, - 0x11, 0x20, 0x20, 0x09, 0x40, 0x09, 0x08, 0x04, 0x36, 0xbf, 0x79, 0x84, - 0x08, 0x0c, 0x67, 0x49, 0x19, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x4c, 0x74, - 0x09, 0x04, 0x36, 0xc2, 0x2b, 0x00, 0x70, 0x26, 0x08, 0x0c, 0x6c, 0x11, - 0x78, 0x88, 0x11, 0x70, 0x90, 0x84, 0x00, 0x05, 0x11, 0x58, 0x90, 0x0e, - 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, - 0x01, 0x08, 0xc1, 0x8d, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x41, - 0x09, 0x04, 0x36, 0xbf, 0x90, 0x06, 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd1, 0x54, 0x09, 0x04, 0x36, 0xbf, - 0x78, 0x88, 0xd0, 0x94, 0x01, 0x18, 0xb8, 0xd4, 0xc0, 0x8d, 0xb8, 0xd6, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x4f, 0x28, 0x00, 0x05, 0x20, 0x61, - 0x18, 0x00, 0x08, 0x0c, 0x58, 0x54, 0x20, 0x09, 0x00, 0x07, 0x15, 0x60, - 0x08, 0x0c, 0x6c, 0x09, 0x01, 0x18, 0x20, 0x09, 0x00, 0x08, 0x04, 0x30, - 0xa9, 0x98, 0x08, 0x0c, 0x67, 0x49, 0x15, 0x30, 0x08, 0x0c, 0x4c, 0x72, - 0x05, 0x18, 0x08, 0x0c, 0x6c, 0x11, 0xa8, 0x9c, 0x11, 0x68, 0x90, 0x84, - 0x00, 0x05, 0x11, 0x50, 0x90, 0x0e, 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, - 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x00, 0xd0, - 0xa8, 0x68, 0xc0, 0xfc, 0xa8, 0x6a, 0x08, 0x0c, 0xd1, 0x54, 0x11, 0xe0, - 0xa8, 0x9c, 0xd0, 0x94, 0x01, 0x18, 0xb8, 0xd4, 0xc0, 0x8d, 0xb8, 0xd6, - 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, - 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, - 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, 0x40, 0x00, 0xa9, 0x9a, 0x90, 0x06, - 0x91, 0x8d, 0x00, 0x01, 0x20, 0x08, 0x00, 0x05, 0x90, 0x06, 0x00, 0x05, - 0xa8, 0x30, 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x40, - 0x20, 0x08, 0x91, 0x8e, 0xde, 0xad, 0x11, 0x20, 0x20, 0x21, 0x40, 0x09, - 0x08, 0x04, 0x36, 0x8f, 0x90, 0x86, 0x01, 0x00, 0x70, 0x24, 0x20, 0x58, - 0x11, 0x10, 0x08, 0x04, 0x57, 0x8e, 0x90, 0x0e, 0x08, 0x0c, 0x6a, 0xae, - 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, - 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x07, 0x08, 0x04, 0x36, 0xbf, 0x7f, 0x84, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, 0x90, 0x0e, 0x21, 0x30, 0x71, 0x26, - 0x71, 0x32, 0xa8, 0x60, 0x20, 0xe8, 0x70, 0x36, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x05, 0x70, 0x2a, 0x20, 0xa0, 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x04, - 0x4f, 0xde, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x38, 0x08, 0x0c, 0x6c, 0x19, - 0x01, 0x20, 0x08, 0x0c, 0x6b, 0xb1, 0x19, 0x04, 0x4f, 0xde, 0xd7, 0x94, - 0x11, 0x10, 0xd7, 0x84, 0x01, 0xa8, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, - 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, 0x34, 0x00, 0xd7, 0x94, 0x01, 0x98, - 0x20, 0xa9, 0x00, 0x08, 0x40, 0x03, 0x20, 0x98, 0x20, 0xa0, 0x3d, 0x00, - 0x20, 0xe0, 0x20, 0xa9, 0x00, 0x02, 0x08, 0x0c, 0x4a, 0x10, 0x00, 0x80, - 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, - 0x34, 0x00, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x03, 0x20, 0x98, 0x20, 0xa0, - 0x3d, 0x00, 0x20, 0xe0, 0x08, 0x0c, 0x4a, 0x10, 0x91, 0x86, 0x00, 0x7e, - 0x01, 0x70, 0x91, 0x86, 0x00, 0x80, 0x01, 0x58, 0x08, 0x0c, 0x6c, 0x11, - 0x90, 0xc2, 0x00, 0x06, 0x12, 0x10, 0xc1, 0xfd, 0x00, 0x20, 0x08, 0x0c, - 0x6a, 0xae, 0x11, 0x08, 0xc1, 0xfd, 0x41, 0x04, 0xc1, 0xfc, 0xd7, 0x94, - 0x05, 0x28, 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x20, 0x60, 0x9c, 0x80, - 0x00, 0x00, 0x20, 0x98, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, 0x9c, 0x80, - 0x00, 0x03, 0x20, 0x98, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x05, 0x9c, 0x80, - 0x00, 0x04, 0x20, 0x98, 0x34, 0x00, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, - 0x20, 0x98, 0x20, 0xa0, 0x3d, 0x00, 0x20, 0xe0, 0x08, 0x0c, 0x4a, 0x03, - 0x9c, 0x80, 0x00, 0x26, 0x20, 0x98, 0xb8, 0xc4, 0x20, 0xe0, 0x20, 0xa9, - 0x00, 0x02, 0x40, 0x03, 0xd7, 0x94, 0x01, 0x10, 0x96, 0xb0, 0x00, 0x0b, - 0x96, 0xb0, 0x00, 0x05, 0x81, 0x08, 0x08, 0x0c, 0xb0, 0x94, 0x01, 0x18, - 0x91, 0x86, 0x08, 0x00, 0x00, 0x40, 0xd7, 0x8c, 0x01, 0x20, 0x91, 0x86, - 0x08, 0x00, 0x01, 0x70, 0x00, 0x18, 0x91, 0x86, 0x00, 0x7e, 0x01, 0x50, - 0xd7, 0x94, 0x01, 0x18, 0x96, 0x86, 0x00, 0x20, 0x00, 0x10, 0x96, 0x86, - 0x00, 0x28, 0x01, 0x50, 0x08, 0x04, 0x4f, 0x67, 0x86, 0xff, 0x11, 0x20, - 0x71, 0x24, 0x81, 0x0b, 0x08, 0x04, 0x36, 0x8d, 0x70, 0x33, 0x00, 0x01, - 0x71, 0x22, 0x70, 0x24, 0x96, 0x00, 0x70, 0x26, 0x77, 0x2e, 0x20, 0x61, - 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x6b, 0x00, 0x00, 0xa6, 0x7a, 0x70, 0x34, - 0xa0, 0x72, 0x70, 0x28, 0xa0, 0x76, 0xa2, 0x8e, 0xa3, 0x92, 0xa4, 0x96, - 0xa5, 0x9a, 0x08, 0x0c, 0x11, 0x4e, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, - 0x50, 0x1a, 0x00, 0x05, 0x70, 0x30, 0x90, 0x05, 0x11, 0x80, 0x71, 0x20, - 0x70, 0x28, 0x20, 0xa0, 0x77, 0x2c, 0x90, 0x36, 0x70, 0x34, 0x20, 0xe8, - 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, - 0xa5, 0x98, 0x08, 0x04, 0x4f, 0x67, 0x71, 0x24, 0x81, 0x0b, 0x08, 0x04, - 0x36, 0x8d, 0x20, 0x29, 0x00, 0x7e, 0x79, 0x84, 0x7a, 0x88, 0x7b, 0x8c, - 0x7c, 0x98, 0x91, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, - 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, 0x0a, 0x04, 0x36, 0xc2, 0x91, 0x84, - 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, - 0x0a, 0x04, 0x36, 0xc2, 0x92, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0xe2, - 0x00, 0x20, 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, 0x0a, 0x04, 0x36, 0xc2, - 0x92, 0x84, 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x36, 0xc2, - 0x95, 0x02, 0x0a, 0x04, 0x36, 0xc2, 0x93, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, 0x0a, 0x04, - 0x36, 0xc2, 0x93, 0x84, 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, - 0x36, 0xc2, 0x95, 0x02, 0x0a, 0x04, 0x36, 0xc2, 0x94, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x90, 0xe2, 0x00, 0x20, 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, - 0x0a, 0x04, 0x36, 0xc2, 0x94, 0x84, 0x00, 0xff, 0x90, 0xe2, 0x00, 0x20, - 0x0a, 0x04, 0x36, 0xc2, 0x95, 0x02, 0x0a, 0x04, 0x36, 0xc2, 0x20, 0x61, - 0x19, 0x89, 0x61, 0x02, 0x62, 0x06, 0x63, 0x0a, 0x64, 0x0e, 0x08, 0x04, - 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x41, 0x09, 0x04, 0x36, 0xbf, 0x20, 0x09, - 0x00, 0x16, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, - 0x50, 0x9e, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x16, 0x89, 0x6e, 0x8d, 0x6e, - 0x8d, 0x6f, 0x9d, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, - 0x9d, 0x84, 0x00, 0x3f, 0x20, 0xe0, 0x20, 0x69, 0x18, 0x77, 0x20, 0xe9, - 0x00, 0x01, 0x2d, 0xa0, 0x40, 0x03, 0x68, 0x00, 0x90, 0x05, 0x09, 0x04, - 0x51, 0x05, 0x68, 0x04, 0x20, 0x08, 0x91, 0x8c, 0xff, 0xf8, 0x19, 0x04, - 0x51, 0x05, 0x68, 0x0c, 0x90, 0x05, 0x09, 0x04, 0x51, 0x05, 0x90, 0x82, - 0xff, 0x01, 0x1a, 0x04, 0x51, 0x05, 0x68, 0x10, 0x90, 0x82, 0x00, 0x5c, - 0x06, 0xf0, 0x68, 0x24, 0x20, 0x08, 0x90, 0x82, 0x00, 0x08, 0x06, 0xc8, - 0x91, 0x82, 0x04, 0x00, 0x16, 0xb0, 0x00, 0x56, 0x20, 0x29, 0x00, 0x00, - 0x08, 0x0c, 0x90, 0x77, 0x00, 0x5e, 0x69, 0x44, 0x68, 0x20, 0x91, 0x02, - 0x06, 0x60, 0x68, 0x20, 0x90, 0x82, 0x00, 0x19, 0x16, 0x40, 0x68, 0x28, - 0x69, 0x44, 0x81, 0x0c, 0x91, 0x02, 0x06, 0x18, 0x68, 0x40, 0x90, 0x82, - 0x00, 0x0f, 0x12, 0xf8, 0x08, 0x0c, 0x10, 0x72, 0x29, 0x00, 0x05, 0x90, - 0x68, 0x4e, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x31, 0x00, 0xb6, 0x20, 0x59, - 0x00, 0x00, 0x08, 0x0c, 0x8f, 0x33, 0x00, 0xbe, 0x00, 0xee, 0x01, 0xe8, - 0x08, 0x0c, 0x8c, 0x78, 0x08, 0x0c, 0x8c, 0xc7, 0x11, 0x60, 0x68, 0x57, - 0x00, 0x00, 0x00, 0xc6, 0x6b, 0x10, 0x20, 0x61, 0x1a, 0x6e, 0x63, 0x0e, - 0x00, 0xce, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x04, 0x36, 0xc2, 0x08, 0x0c, - 0x8c, 0xc0, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x31, 0x08, 0x0c, 0x90, 0xf7, - 0x08, 0x0c, 0x91, 0x06, 0x08, 0x0c, 0x8f, 0x18, 0x00, 0xee, 0x20, 0x01, - 0x18, 0x8a, 0x20, 0x4c, 0x08, 0x0c, 0x10, 0x8b, 0x20, 0x01, 0x18, 0x8a, - 0x20, 0x03, 0x00, 0x00, 0x08, 0x04, 0x36, 0xbf, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x94, 0xb8, 0x08, 0x0c, 0x8c, 0xc0, 0x01, 0x2e, - 0x08, 0x04, 0x36, 0x8d, 0x00, 0x06, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xcc, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, 0x58, 0x44, 0xd0, 0xbc, - 0x00, 0x0e, 0x00, 0x05, 0x61, 0x74, 0x7a, 0x84, 0x63, 0x00, 0x82, 0xff, - 0x11, 0x18, 0x79, 0x86, 0x08, 0x04, 0x36, 0x8d, 0x83, 0xff, 0x19, 0x04, - 0x36, 0xc2, 0x20, 0x01, 0xff, 0xf0, 0x92, 0x00, 0x1a, 0x04, 0x36, 0xc2, - 0x20, 0x19, 0xff, 0xff, 0x60, 0x78, 0x93, 0x02, 0x92, 0x00, 0x0a, 0x04, - 0x36, 0xc2, 0x79, 0x86, 0x62, 0x76, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, - 0x58, 0x54, 0x19, 0x04, 0x36, 0xbf, 0x7c, 0x88, 0x7d, 0x84, 0x7e, 0x98, - 0x7f, 0x8c, 0x08, 0x0c, 0x4c, 0x41, 0x09, 0x04, 0x36, 0xbf, 0x90, 0x0e, - 0x90, 0x1e, 0x73, 0x26, 0x73, 0x32, 0xa8, 0x60, 0x20, 0xe8, 0x70, 0x36, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x03, 0x70, 0x2a, 0x20, 0xa0, 0x91, 0xd8, - 0x10, 0x00, 0x2b, 0x5c, 0x8b, 0xff, 0x01, 0x78, 0x08, 0x0c, 0x6c, 0x11, - 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0x48, 0x20, 0xa9, 0x00, 0x01, - 0xb8, 0x14, 0x40, 0x04, 0xb8, 0x10, 0x40, 0x04, 0x41, 0x04, 0x93, 0x98, - 0x00, 0x03, 0x81, 0x08, 0x91, 0x82, 0x08, 0x00, 0x01, 0x20, 0x93, 0x86, - 0x00, 0x3c, 0x01, 0x70, 0x0c, 0x20, 0x83, 0xff, 0x11, 0x48, 0x72, 0x24, - 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, 0x08, 0x0c, 0x95, 0x5b, 0x22, 0x08, - 0x08, 0x04, 0x36, 0x8d, 0x70, 0x33, 0x00, 0x01, 0x71, 0x22, 0x70, 0x24, - 0x93, 0x00, 0x70, 0x26, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x6b, - 0x00, 0x00, 0xa3, 0x7a, 0x70, 0x28, 0xa0, 0x76, 0x70, 0x34, 0xa0, 0x72, - 0xa4, 0x8e, 0xa5, 0x92, 0xa6, 0x96, 0xa7, 0x9a, 0x08, 0x0c, 0x11, 0x4e, - 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, 0x51, 0xa9, 0x00, 0x05, 0x70, 0x30, - 0x90, 0x05, 0x11, 0x78, 0x71, 0x20, 0x70, 0x28, 0x20, 0xa0, 0x90, 0x1e, - 0x70, 0x34, 0x20, 0xe8, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa4, 0x8c, - 0xa5, 0x90, 0xa6, 0x94, 0xa7, 0x98, 0x08, 0x04, 0x51, 0x67, 0x72, 0x24, - 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, 0x08, 0x0c, 0x95, 0x5b, 0x22, 0x08, - 0x08, 0x04, 0x36, 0x8d, 0x00, 0xf6, 0x00, 0xe6, 0x08, 0x0c, 0x58, 0x54, - 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, 0x52, 0x3c, 0x20, 0x71, 0x18, 0x9e, - 0x74, 0x5c, 0x84, 0xff, 0x20, 0x09, 0x00, 0x0e, 0x19, 0x04, 0x52, 0x3c, - 0xac, 0x9c, 0xad, 0x98, 0xae, 0xa4, 0xaf, 0xa0, 0x00, 0x96, 0x08, 0x0c, - 0x10, 0x72, 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, 0x52, 0x3c, 0x29, 0x00, - 0x70, 0x5e, 0x90, 0x0e, 0x90, 0x1e, 0x73, 0x56, 0x73, 0x62, 0xa8, 0x60, - 0x70, 0x66, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x03, 0x70, 0x5a, 0x20, 0xa0, - 0x91, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0x8b, 0xff, 0x01, 0x78, 0x08, 0x0c, - 0x6c, 0x11, 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0x48, 0xb8, 0x14, - 0x20, 0xa9, 0x00, 0x01, 0x40, 0x04, 0xb8, 0x10, 0x40, 0x04, 0x41, 0x04, - 0x93, 0x98, 0x00, 0x03, 0x81, 0x08, 0x91, 0x82, 0x08, 0x00, 0x01, 0x20, - 0x93, 0x86, 0x00, 0x3c, 0x01, 0xe8, 0x0c, 0x20, 0x83, 0xff, 0x11, 0xc0, - 0x72, 0x54, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, 0x08, 0x0c, 0x95, 0x5b, - 0x22, 0x08, 0x00, 0x9e, 0xa8, 0x97, 0x40, 0x00, 0xa9, 0x9a, 0x71, 0x5c, - 0x81, 0xff, 0x09, 0x0c, 0x0d, 0x85, 0x21, 0x48, 0x08, 0x0c, 0x10, 0x8b, - 0x90, 0x06, 0x70, 0x5e, 0x91, 0x8d, 0x00, 0x01, 0x20, 0x08, 0x04, 0x18, - 0x70, 0x63, 0x00, 0x01, 0x71, 0x52, 0x70, 0x54, 0x93, 0x00, 0x70, 0x56, - 0x20, 0x61, 0x18, 0xb9, 0x2c, 0x44, 0xa3, 0x7a, 0x70, 0x58, 0xa0, 0x76, - 0x70, 0x64, 0xa0, 0x72, 0xa4, 0x8e, 0xa5, 0x92, 0xa6, 0x96, 0xa7, 0x9a, - 0xa0, 0x9f, 0x52, 0x48, 0x00, 0x0e, 0xa0, 0xa2, 0x08, 0x0c, 0x11, 0x4e, - 0x90, 0x06, 0x00, 0x48, 0x00, 0x9e, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, - 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0xa0, 0xa0, 0x90, 0x4d, 0x09, 0x0c, - 0x0d, 0x85, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, 0xa0, 0x6c, 0x90, 0x8e, - 0x01, 0x00, 0x01, 0x38, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, - 0xa8, 0x97, 0x40, 0x02, 0x00, 0xd8, 0x70, 0x60, 0x90, 0x05, 0x11, 0x58, - 0x71, 0x50, 0x70, 0x58, 0x20, 0xa0, 0x90, 0x1e, 0x70, 0x64, 0x20, 0xe8, - 0xa4, 0x8c, 0xa5, 0x90, 0xa6, 0x94, 0xa7, 0x98, 0x04, 0x28, 0xa8, 0x7b, - 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0x72, 0x54, - 0x90, 0x0e, 0x20, 0x01, 0x00, 0x03, 0x08, 0x0c, 0x95, 0x5b, 0xaa, 0x9a, - 0x71, 0x5c, 0x81, 0xff, 0x09, 0x0c, 0x0d, 0x85, 0x21, 0x48, 0x08, 0x0c, - 0x10, 0x8b, 0x70, 0x5f, 0x00, 0x00, 0xa0, 0xa0, 0x20, 0x48, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0xa0, 0x9f, - 0x00, 0x00, 0xa0, 0xa3, 0x00, 0x00, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x91, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0x8b, 0xff, 0x01, 0x78, 0x08, 0x0c, - 0x6c, 0x11, 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, 0x11, 0x48, 0xb8, 0x14, - 0x20, 0xa9, 0x00, 0x01, 0x40, 0x04, 0xb8, 0x10, 0x40, 0x04, 0x41, 0x04, - 0x93, 0x98, 0x00, 0x03, 0x81, 0x08, 0x91, 0x82, 0x08, 0x00, 0x01, 0x20, - 0x93, 0x86, 0x00, 0x3c, 0x05, 0x18, 0x0c, 0x20, 0x83, 0xff, 0x11, 0xf0, - 0x71, 0x54, 0x81, 0x0c, 0xa9, 0x9a, 0xa8, 0x97, 0x40, 0x00, 0x71, 0x5c, - 0x81, 0xff, 0x09, 0x0c, 0x0d, 0x85, 0x21, 0x48, 0x08, 0x0c, 0x10, 0x8b, - 0x90, 0x06, 0x70, 0x5e, 0x91, 0x8d, 0x00, 0x01, 0x20, 0x08, 0xa0, 0xa0, - 0x20, 0x48, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, - 0x01, 0x2e, 0xa0, 0x9f, 0x00, 0x00, 0xa0, 0xa3, 0x00, 0x00, 0x00, 0x70, - 0x70, 0x63, 0x00, 0x01, 0x71, 0x52, 0x70, 0x54, 0x93, 0x00, 0x70, 0x56, - 0xa3, 0x7a, 0xa4, 0x8e, 0xa5, 0x92, 0xa6, 0x96, 0xa7, 0x9a, 0x08, 0x0c, - 0x11, 0x4e, 0x90, 0x06, 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, 0xa8, 0x8c, - 0x90, 0xbe, 0x70, 0x00, 0x01, 0x48, 0x90, 0xbe, 0x71, 0x00, 0x01, 0x30, - 0x90, 0xbe, 0x72, 0x00, 0x01, 0x18, 0x00, 0x9e, 0x08, 0x04, 0x36, 0xc2, - 0xa8, 0x84, 0xa9, 0x88, 0x08, 0x0c, 0x26, 0x8c, 0x15, 0x18, 0x08, 0x0c, - 0x67, 0x49, 0x15, 0x00, 0x71, 0x26, 0xbe, 0x12, 0xbd, 0x16, 0xae, 0x7c, - 0x08, 0x0c, 0x4c, 0x41, 0x01, 0xc8, 0x08, 0x0c, 0x4c, 0x41, 0x01, 0xb0, - 0x00, 0x9e, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, - 0xa8, 0x23, 0x00, 0x00, 0xa8, 0x04, 0x20, 0x48, 0x08, 0x0c, 0xd0, 0xcd, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, - 0x00, 0x03, 0x70, 0x1f, 0x53, 0x15, 0x00, 0x05, 0x00, 0x9e, 0x20, 0x09, - 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, 0x71, 0x24, 0x08, 0x0c, 0x34, 0x1e, - 0xa8, 0x20, 0x90, 0x86, 0x80, 0x01, 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, - 0x08, 0x04, 0x36, 0xbf, 0x29, 0x00, 0x70, 0x22, 0xa8, 0x04, 0x00, 0x96, - 0x20, 0x48, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, - 0x90, 0x84, 0xff, 0xc0, 0x00, 0x9e, 0x90, 0x80, 0x00, 0x02, 0x00, 0x76, - 0x00, 0x06, 0x20, 0x98, 0x20, 0xa0, 0x27, 0xe0, 0x27, 0xe8, 0x20, 0xa9, - 0x00, 0x2a, 0x08, 0x0c, 0x0f, 0xd6, 0xaa, 0x6c, 0xab, 0x70, 0xac, 0x74, - 0xad, 0x78, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x6b, 0x00, 0x00, - 0xae, 0x64, 0xaf, 0x8c, 0x97, 0xc6, 0x70, 0x00, 0x01, 0x18, 0x97, 0xc6, - 0x71, 0x00, 0x11, 0x48, 0x96, 0xc2, 0x00, 0x04, 0x06, 0x00, 0x20, 0x09, - 0x00, 0x04, 0x00, 0x0e, 0x00, 0x7e, 0x08, 0x04, 0x4c, 0x8d, 0x97, 0xc6, - 0x72, 0x00, 0x11, 0xb8, 0x96, 0xc2, 0x00, 0x54, 0x02, 0xa0, 0x00, 0x0e, - 0x00, 0x7e, 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa0, 0x76, 0xa7, 0x72, - 0xa0, 0x7b, 0x00, 0x2a, 0xa2, 0x8e, 0xa3, 0x92, 0xa4, 0x96, 0xa5, 0x9a, - 0x08, 0x0c, 0x11, 0x4e, 0x70, 0x07, 0x00, 0x02, 0x70, 0x1f, 0x53, 0x71, - 0x00, 0x05, 0x00, 0x0e, 0x00, 0x7e, 0x08, 0x04, 0x36, 0xc2, 0x70, 0x20, - 0x20, 0x48, 0xa8, 0x04, 0x20, 0x48, 0xa8, 0x04, 0x20, 0x48, 0x89, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x02, 0x20, 0x98, 0x20, 0xa0, 0x27, 0xe0, 0x27, 0xe8, - 0x20, 0xa9, 0x00, 0x2a, 0x08, 0x0c, 0x0f, 0xd6, 0x21, 0x00, 0x22, 0x38, - 0x20, 0x61, 0x18, 0xb8, 0x2c, 0x44, 0xa2, 0x8c, 0xa3, 0x90, 0xa4, 0x94, - 0xa5, 0x98, 0x20, 0x09, 0x00, 0x2a, 0x08, 0x04, 0x4c, 0x8d, 0x81, 0xff, - 0x19, 0x04, 0x36, 0xbf, 0x79, 0x8c, 0x20, 0x01, 0x19, 0x7e, 0x91, 0x8c, - 0x80, 0x00, 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x58, 0x09, 0x04, 0x36, 0xc2, - 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x20, 0x08, 0x0c, 0x6c, 0x19, 0x19, 0x04, - 0x36, 0xc2, 0x08, 0x0c, 0x68, 0x7b, 0x09, 0x04, 0x36, 0xbf, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x6a, 0x1b, 0x01, 0x2e, 0x09, 0x04, - 0x36, 0xbf, 0x20, 0x01, 0x19, 0x7e, 0x20, 0x04, 0xd0, 0xfc, 0x19, 0x04, - 0x36, 0x8d, 0x08, 0x04, 0x46, 0xaa, 0xa9, 0xa0, 0x20, 0x01, 0x19, 0x7e, - 0x91, 0x8c, 0x80, 0x00, 0xc1, 0x8d, 0x21, 0x02, 0x08, 0x0c, 0x4c, 0x65, - 0x01, 0xa0, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x19, - 0x11, 0x70, 0x08, 0x0c, 0x68, 0x7b, 0x20, 0x09, 0x00, 0x02, 0x01, 0x28, - 0x08, 0x0c, 0x6a, 0x1b, 0x11, 0x70, 0x20, 0x09, 0x00, 0x03, 0xa8, 0x97, - 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, 0x40, 0x06, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, 0x00, 0x05, 0xa8, 0x97, - 0x40, 0x00, 0x20, 0x01, 0x19, 0x7e, 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x28, - 0x08, 0x0c, 0x58, 0x48, 0x01, 0x10, 0x90, 0x06, 0x00, 0x18, 0x90, 0x0e, - 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x05, 0x78, 0xa8, - 0xd0, 0x8c, 0x11, 0x18, 0xd0, 0x84, 0x09, 0x04, 0x46, 0x1f, 0x08, 0x0c, - 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x6c, 0x11, - 0x01, 0x30, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x18, 0x90, 0x8e, 0x00, 0x05, - 0x15, 0xa0, 0x78, 0xa8, 0xd0, 0x8c, 0x01, 0x20, 0xb8, 0x00, 0xc0, 0x8c, - 0xb8, 0x02, 0x00, 0x28, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xb4, 0x09, 0x04, - 0x46, 0x59, 0x78, 0x84, 0x90, 0x8e, 0x00, 0x7e, 0x09, 0x04, 0x46, 0x59, - 0x90, 0x8e, 0x00, 0x7f, 0x09, 0x04, 0x46, 0x59, 0x90, 0x8e, 0x00, 0x80, - 0x09, 0x04, 0x46, 0x59, 0xb8, 0x00, 0xd0, 0x8c, 0x19, 0x04, 0x46, 0x59, - 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, - 0xd0, 0xec, 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x54, 0x3d, 0x00, 0x05, 0x08, 0x0c, - 0x4c, 0x74, 0x09, 0x04, 0x36, 0xc2, 0x08, 0x04, 0x46, 0x59, 0x08, 0x0c, - 0x34, 0x7d, 0x01, 0x08, 0x00, 0x05, 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, - 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, - 0x08, 0x0c, 0x58, 0x54, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, - 0x36, 0xbf, 0x08, 0x0c, 0x6c, 0x09, 0x01, 0x20, 0x20, 0x09, 0x00, 0x08, - 0x08, 0x04, 0x36, 0xbf, 0xb8, 0x9c, 0xd0, 0xa4, 0x11, 0x18, 0xd0, 0xac, - 0x19, 0x04, 0x46, 0x59, 0x90, 0x06, 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd1, 0x54, 0x11, 0x20, 0x20, 0x09, - 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, - 0x54, 0x76, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x57, 0x8e, 0x08, 0x0c, 0x4c, 0x74, - 0x09, 0x04, 0x36, 0xc2, 0x08, 0x04, 0x54, 0x0f, 0x81, 0xff, 0x20, 0x09, - 0x00, 0x01, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x58, 0x54, 0x20, 0x09, - 0x00, 0x07, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x6c, 0x09, 0x01, 0x20, - 0x20, 0x09, 0x00, 0x08, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x74, - 0x09, 0x04, 0x36, 0xc2, 0x08, 0x0c, 0x6c, 0x11, 0x20, 0x09, 0x00, 0x09, - 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x41, 0x20, 0x09, 0x00, 0x02, - 0x09, 0x04, 0x36, 0xbf, 0x90, 0x06, 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, - 0xc0, 0xfd, 0xa8, 0x6a, 0x79, 0x88, 0xa9, 0x5a, 0x91, 0x94, 0xfd, 0x00, - 0x91, 0x8c, 0x00, 0xff, 0x90, 0x06, 0x82, 0xff, 0x11, 0x28, 0xc0, 0xed, - 0xa9, 0x52, 0x79, 0x8c, 0xa9, 0x56, 0x00, 0x38, 0x92, 0x8e, 0x01, 0x00, - 0x19, 0x04, 0x36, 0xc2, 0xc0, 0xe5, 0xa9, 0x52, 0xa9, 0x56, 0xa8, 0x3e, - 0x08, 0x0c, 0xd3, 0xb7, 0x20, 0x09, 0x00, 0x03, 0x09, 0x04, 0x36, 0xbf, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x54, 0xcd, 0x00, 0x05, 0xa8, 0x30, - 0x90, 0x86, 0x01, 0x00, 0x20, 0x09, 0x00, 0x04, 0x09, 0x04, 0x36, 0xbf, - 0x08, 0x04, 0x36, 0x8d, 0x7a, 0xa8, 0x92, 0x84, 0xc0, 0x00, 0x01, 0x48, - 0xd2, 0xec, 0x01, 0xa0, 0x08, 0x0c, 0x58, 0x54, 0x11, 0x88, 0x20, 0x09, - 0x00, 0x14, 0x08, 0x04, 0x36, 0xbf, 0xd2, 0xdc, 0x15, 0x78, 0x81, 0xff, - 0x20, 0x09, 0x00, 0x01, 0x19, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x58, 0x54, - 0x20, 0x09, 0x00, 0x07, 0x19, 0x04, 0x36, 0xbf, 0xd2, 0xf4, 0x01, 0x38, - 0x92, 0x84, 0x50, 0x00, 0xc0, 0xd5, 0x08, 0x0c, 0x58, 0x1a, 0x08, 0x04, - 0x36, 0x8d, 0xd2, 0xfc, 0x01, 0x60, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, - 0x36, 0xc2, 0x79, 0x84, 0x92, 0x84, 0x90, 0x00, 0xc0, 0xd5, 0x08, 0x0c, - 0x57, 0xe9, 0x08, 0x04, 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x74, 0x09, 0x04, - 0x36, 0xc2, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, - 0x20, 0x09, 0x00, 0x09, 0x19, 0x04, 0x55, 0xbc, 0x08, 0x0c, 0x4c, 0x41, - 0x20, 0x09, 0x00, 0x02, 0x09, 0x04, 0x55, 0xbc, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x1b, 0xaf, 0x60, 0x20, 0x09, 0x00, 0x08, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x55, 0x29, - 0x00, 0x05, 0xa8, 0x6c, 0x90, 0x86, 0x05, 0x00, 0x11, 0x38, 0xa8, 0x70, - 0x90, 0x05, 0x11, 0x20, 0xa8, 0x74, 0x90, 0x84, 0xff, 0x00, 0x01, 0x10, - 0x19, 0x04, 0x36, 0xc2, 0xa8, 0x66, 0xa8, 0x32, 0xa8, 0x68, 0xc0, 0xfd, - 0xa8, 0x6a, 0x08, 0x0c, 0x4c, 0x74, 0x11, 0x10, 0x08, 0x04, 0x36, 0xc2, - 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, 0xd4, 0x23, 0x20, 0x09, 0x00, 0x03, - 0x09, 0x04, 0x55, 0xbc, 0x70, 0x07, 0x00, 0x03, 0x70, 0x1f, 0x55, 0x4d, - 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, 0x20, 0x09, 0x00, 0x04, - 0x09, 0x04, 0x55, 0xbc, 0x79, 0x84, 0x7a, 0xa8, 0x92, 0x84, 0x10, 0x00, - 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0xe9, 0x08, 0x04, 0x36, 0x8d, 0x00, 0xc6, - 0xaa, 0xb0, 0x92, 0x84, 0xc0, 0x00, 0x01, 0x48, 0xd2, 0xec, 0x01, 0x70, - 0x08, 0x0c, 0x58, 0x54, 0x11, 0x58, 0x20, 0x09, 0x00, 0x14, 0x08, 0x04, - 0x55, 0xab, 0x20, 0x61, 0x18, 0x00, 0x08, 0x0c, 0x58, 0x54, 0x20, 0x09, - 0x00, 0x07, 0x15, 0xc8, 0xd2, 0xf4, 0x01, 0x30, 0x92, 0x84, 0x50, 0x00, - 0xc0, 0xd5, 0x08, 0x0c, 0x58, 0x1a, 0x00, 0x58, 0xd2, 0xfc, 0x01, 0x80, - 0x08, 0x0c, 0x4c, 0x72, 0x05, 0x90, 0xa9, 0x98, 0x92, 0x84, 0x90, 0x00, - 0xc0, 0xd5, 0x08, 0x0c, 0x57, 0xe9, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, - 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0x04, 0x38, 0x08, 0x0c, 0x4c, 0x72, - 0x05, 0x10, 0x08, 0x0c, 0x6c, 0x11, 0x20, 0x09, 0x00, 0x09, 0x11, 0xb8, - 0xa8, 0xc4, 0x90, 0x86, 0x05, 0x00, 0x11, 0xc8, 0xa8, 0xc8, 0x90, 0x05, - 0x11, 0xb0, 0xa8, 0xcc, 0x90, 0x84, 0xff, 0x00, 0x11, 0x90, 0x08, 0x0c, - 0x4c, 0x72, 0x11, 0x08, 0x00, 0x70, 0x20, 0x09, 0x00, 0x4b, 0x08, 0x0c, - 0xd4, 0x23, 0x20, 0x09, 0x00, 0x03, 0x01, 0x08, 0x00, 0x78, 0x04, 0x31, - 0x19, 0xc0, 0xa8, 0x97, 0x40, 0x05, 0xa9, 0x9a, 0x00, 0x10, 0xa8, 0x97, - 0x40, 0x06, 0x90, 0x0e, 0x90, 0x85, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, - 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe0, 0x7a, 0xa8, 0xd2, 0xdc, - 0x09, 0x04, 0x36, 0xbf, 0x00, 0x16, 0x79, 0x84, 0x92, 0x84, 0x10, 0x00, - 0xc0, 0xfd, 0x08, 0x0c, 0x57, 0xe9, 0x00, 0x1e, 0x19, 0x04, 0x36, 0xbf, - 0x08, 0x04, 0x36, 0x8d, 0x00, 0xf6, 0x2d, 0x78, 0xaa, 0xb0, 0x00, 0x21, - 0x00, 0xfe, 0x00, 0x05, 0xaa, 0xb0, 0xc2, 0xd5, 0xd2, 0xdc, 0x01, 0x50, - 0x00, 0x16, 0xa9, 0x98, 0x92, 0x84, 0x14, 0x00, 0xc0, 0xfd, 0x08, 0x0c, - 0x57, 0xe9, 0x00, 0x1e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x81, 0xff, - 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, - 0x58, 0x54, 0x01, 0x20, 0x20, 0x09, 0x00, 0x07, 0x08, 0x04, 0x36, 0xbf, - 0x79, 0x84, 0x7e, 0xa8, 0x96, 0xb4, 0x00, 0xff, 0x08, 0x0c, 0x67, 0xb4, - 0x19, 0x04, 0x36, 0xc2, 0x91, 0x86, 0x00, 0x7f, 0x01, 0x38, 0x08, 0x0c, - 0x6c, 0x11, 0x01, 0x20, 0x20, 0x09, 0x00, 0x09, 0x08, 0x04, 0x36, 0xbf, - 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, - 0x36, 0xbf, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, - 0x20, 0x01, 0x01, 0x00, 0x80, 0x07, 0xa8, 0x0a, 0x08, 0x0c, 0xd1, 0x06, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, - 0x00, 0x03, 0x70, 0x1f, 0x56, 0x1c, 0x00, 0x05, 0xa8, 0x08, 0x80, 0x07, - 0x90, 0x86, 0x01, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, - 0x36, 0xbf, 0xa8, 0xe0, 0xa8, 0x66, 0xa8, 0x10, 0x80, 0x07, 0x90, 0x84, - 0x00, 0xff, 0x80, 0x0c, 0xa8, 0x14, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, - 0x80, 0x04, 0x90, 0x80, 0x00, 0x02, 0x91, 0x08, 0x89, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x04, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0x08, 0x04, - 0x4c, 0x8d, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x79, 0x84, 0x91, 0x94, 0xff, 0x00, 0x91, 0x8c, - 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, 0x11, 0x18, 0x70, 0x23, 0x19, 0xb4, - 0x00, 0x40, 0x92, 0xc6, 0x00, 0x01, 0x11, 0x18, 0x70, 0x23, 0x19, 0xce, - 0x00, 0x10, 0x08, 0x04, 0x36, 0xc2, 0x20, 0x09, 0x00, 0x1a, 0x7a, 0x8c, - 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, - 0xaf, 0x60, 0x08, 0x0c, 0x4c, 0x8a, 0x70, 0x1f, 0x56, 0x6c, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x2e, 0x20, 0x03, 0x00, 0x01, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x19, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe0, 0x20, 0xa9, 0x00, 0x1a, - 0x70, 0x20, 0x20, 0xa0, 0x20, 0xe9, 0x00, 0x01, 0x40, 0x03, 0x08, 0x04, - 0x36, 0x8d, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x79, 0x84, 0x91, 0x94, 0xff, 0x00, 0x91, 0x8c, - 0x00, 0xff, 0x82, 0x17, 0x82, 0xff, 0x11, 0x18, 0x20, 0x99, 0x19, 0xb4, - 0x00, 0x40, 0x92, 0xc6, 0x00, 0x01, 0x11, 0x18, 0x20, 0x99, 0x19, 0xce, - 0x00, 0x10, 0x08, 0x04, 0x36, 0xc2, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, - 0x20, 0xa0, 0xa8, 0x60, 0x20, 0xe8, 0x20, 0xa9, 0x00, 0x1a, 0x20, 0xe1, - 0x00, 0x01, 0x40, 0x03, 0x20, 0x09, 0x00, 0x1a, 0x7a, 0x8c, 0x7b, 0x88, - 0x7c, 0x9c, 0x7d, 0x98, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0xaf, 0x60, - 0x08, 0x04, 0x4c, 0x8d, 0x78, 0x84, 0x90, 0x8a, 0x10, 0x00, 0x1a, 0x04, - 0x36, 0xc2, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x80, 0x03, 0x80, 0x0b, - 0x81, 0x0b, 0x91, 0x08, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x04, 0x61, 0x4a, - 0x00, 0xce, 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x00, 0xc6, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x60, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, - 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x77, 0xe2, 0x08, 0x0c, 0x76, 0xcd, - 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x61, 0x18, 0x00, 0x60, 0x30, 0xc0, 0x9d, - 0x60, 0x32, 0x08, 0x0c, 0x60, 0x58, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, - 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x8e, 0x00, 0x00, 0x09, 0x04, - 0x36, 0xbf, 0x78, 0x84, 0x90, 0x05, 0x01, 0x88, 0x78, 0x88, 0x20, 0x61, - 0x19, 0x9c, 0x2c, 0x0c, 0x20, 0x62, 0x08, 0x0c, 0x2a, 0x67, 0x01, 0xa0, - 0x08, 0x0c, 0x2a, 0x6f, 0x01, 0x88, 0x08, 0x0c, 0x2a, 0x77, 0x01, 0x70, - 0x21, 0x62, 0x08, 0x04, 0x36, 0xc2, 0x20, 0x61, 0x01, 0x00, 0x60, 0x38, - 0x90, 0x86, 0x00, 0x07, 0x11, 0x18, 0x20, 0x09, 0x00, 0x01, 0x00, 0x10, - 0x20, 0x09, 0x00, 0x00, 0x78, 0x84, 0x90, 0x86, 0x00, 0x02, 0x15, 0xa8, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x28, 0xc0, 0x9c, 0x60, 0x2a, 0x08, 0x0c, - 0xac, 0xfc, 0x00, 0x26, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xa6, 0x2b, - 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0xa6, 0x35, 0x00, 0x2e, 0x08, 0x0c, - 0xa5, 0x16, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, - 0x08, 0x0c, 0xad, 0x18, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xee, 0xd9, - 0x08, 0x0c, 0xee, 0xf4, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x77, 0xe2, - 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, - 0x00, 0x04, 0x20, 0x01, 0x19, 0xa8, 0x20, 0x03, 0x00, 0x00, 0x00, 0x26, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0x2e, 0x00, 0xce, - 0x08, 0x04, 0x36, 0x8d, 0x81, 0xff, 0x01, 0x20, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x07, 0x08, 0x04, 0x36, 0xbf, 0x79, 0x84, 0x7e, 0xa8, 0x96, 0xb4, - 0x00, 0xff, 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x04, 0x36, 0xc2, 0x91, 0x86, - 0x00, 0x7f, 0x01, 0x38, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x20, 0x20, 0x09, - 0x00, 0x09, 0x08, 0x04, 0x36, 0xbf, 0x08, 0x0c, 0x4c, 0x41, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x36, 0xbf, 0xa8, 0x67, 0x00, 0x00, - 0xa8, 0x68, 0xc0, 0xfd, 0xa8, 0x6a, 0x08, 0x0c, 0xd1, 0x09, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x03, 0x08, 0x04, 0x36, 0xbf, 0x70, 0x07, 0x00, 0x03, - 0x70, 0x1f, 0x57, 0x77, 0x00, 0x05, 0xa8, 0x30, 0x90, 0x86, 0x01, 0x00, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x04, 0x08, 0x04, 0x36, 0xbf, 0xa8, 0xe0, - 0xa8, 0x66, 0xa8, 0x34, 0x80, 0x07, 0x80, 0x0c, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x0c, 0x7a, 0x8c, 0x7b, 0x88, 0x7c, 0x9c, 0x7d, 0x98, 0xaf, 0x60, - 0x08, 0x04, 0x4c, 0x8d, 0xa8, 0x98, 0x90, 0x86, 0x00, 0x0d, 0x19, 0x04, - 0x36, 0xbf, 0x20, 0x21, 0x40, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x0e, 0x04, 0x57, 0x9b, 0x00, 0x10, 0x01, 0x2e, 0x0c, 0xc0, 0x7c, 0x36, - 0x94, 0x86, 0x40, 0x00, 0x01, 0x18, 0x78, 0x33, 0x00, 0x11, 0x00, 0x10, - 0x78, 0x33, 0x00, 0x10, 0x78, 0x83, 0x40, 0x05, 0xa9, 0x98, 0x79, 0x86, - 0xa9, 0xa4, 0x79, 0x9a, 0xa9, 0xa8, 0x79, 0x9e, 0x08, 0x0c, 0x4c, 0x7d, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, - 0x19, 0x0c, 0x12, 0x00, 0x70, 0x07, 0x00, 0x01, 0x20, 0x91, 0x50, 0x00, - 0x70, 0x0f, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x04, 0x79, 0x84, 0x61, 0x5a, - 0x61, 0x56, 0x60, 0x5f, 0x00, 0x00, 0x60, 0x53, 0x00, 0x09, 0x78, 0x98, - 0x60, 0x72, 0x78, 0x9c, 0x60, 0x6e, 0x78, 0x88, 0x60, 0x6a, 0x78, 0x8c, - 0x60, 0x66, 0x20, 0x01, 0x1a, 0x14, 0x20, 0x44, 0x20, 0x01, 0x1a, 0x1b, - 0xa0, 0x76, 0xa0, 0x60, 0xa0, 0x72, 0xa0, 0x7b, 0x00, 0x01, 0xa0, 0x7f, - 0x00, 0x02, 0xa0, 0x6b, 0x00, 0x00, 0xa0, 0x9f, 0x00, 0x00, 0x00, 0xce, - 0x01, 0x2e, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0xb6, 0x00, 0xc6, 0x90, 0xe4, 0xc0, 0x00, 0x01, 0x98, 0x00, 0x06, - 0xd0, 0xd4, 0x01, 0x60, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, - 0xac, 0xfc, 0x01, 0x06, 0x08, 0x0c, 0x34, 0x42, 0x01, 0x0e, 0x09, 0x0c, - 0xad, 0x18, 0x00, 0x3e, 0x08, 0x0c, 0xcf, 0x68, 0x00, 0x0e, 0x11, 0x98, - 0xd0, 0xe4, 0x01, 0x60, 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, - 0x01, 0x60, 0x08, 0x0c, 0x61, 0xb7, 0x08, 0x0c, 0xb0, 0x94, 0x01, 0x10, - 0xb8, 0x17, 0x00, 0x00, 0x90, 0x06, 0x00, 0xce, 0x00, 0xbe, 0x01, 0x2e, - 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xc8, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x01, 0x56, 0x20, 0x10, 0x90, 0x0e, 0x20, 0xa9, 0x08, 0x00, - 0x00, 0x16, 0x91, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x05, 0x01, 0x88, - 0x91, 0x86, 0x00, 0x7e, 0x01, 0x70, 0x91, 0x86, 0x00, 0x7f, 0x01, 0x58, - 0x91, 0x86, 0x00, 0x80, 0x01, 0x40, 0x91, 0x86, 0x00, 0xff, 0x01, 0x28, - 0x00, 0x26, 0x22, 0x00, 0x08, 0x0c, 0x57, 0xe9, 0x00, 0x2e, 0x00, 0x1e, - 0x81, 0x08, 0x1f, 0x04, 0x58, 0x22, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0x00, 0x05, 0x20, 0x01, 0x18, 0x67, - 0x20, 0x04, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, - 0xd0, 0xd4, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, - 0xd0, 0xb4, 0x00, 0x05, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x03, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x9e, - 0x71, 0x08, 0x91, 0x0d, 0x71, 0x0a, 0x00, 0xee, 0x00, 0x1e, 0x00, 0x05, - 0x79, 0xa4, 0x81, 0xff, 0x09, 0x04, 0x36, 0xc2, 0x91, 0x82, 0x00, 0x81, - 0x1a, 0x04, 0x36, 0xc2, 0x81, 0x0c, 0x00, 0x16, 0x08, 0x0c, 0x4c, 0x41, - 0x01, 0x70, 0x08, 0x0c, 0x0f, 0x61, 0x21, 0x00, 0x22, 0x38, 0x7d, 0x84, - 0x7c, 0x88, 0x7b, 0x8c, 0x7a, 0x90, 0x00, 0x1e, 0x08, 0x0c, 0x4c, 0x8a, - 0x70, 0x1f, 0x58, 0x84, 0x00, 0x05, 0x00, 0x1e, 0x20, 0x09, 0x00, 0x02, - 0x08, 0x04, 0x36, 0xbf, 0x20, 0x79, 0x00, 0x00, 0x7d, 0x94, 0x7c, 0x98, - 0x7b, 0xa8, 0x7a, 0xac, 0x79, 0xa4, 0x81, 0x0c, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0xa7, 0x70, 0xa0, 0x74, 0x20, 0x71, 0x18, 0x9e, 0x08, 0x0c, - 0x4c, 0x8d, 0x70, 0x1f, 0x58, 0x98, 0x00, 0x05, 0x20, 0x61, 0x18, 0xb8, - 0x2c, 0x44, 0x00, 0x16, 0x00, 0x26, 0xa2, 0x70, 0xa1, 0x74, 0x08, 0x0c, - 0x0f, 0x69, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, 0x10, 0x16, 0x90, 0x06, - 0xa8, 0x02, 0xa8, 0x06, 0x08, 0x04, 0x36, 0x8d, 0x01, 0x26, 0x01, 0x56, - 0x01, 0x36, 0x01, 0x46, 0x01, 0xc6, 0x01, 0xd6, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x02, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x60, 0x44, 0xd0, 0xa4, 0x11, 0xe8, 0xd0, 0x84, - 0x01, 0x18, 0x08, 0x0c, 0x5a, 0x58, 0x00, 0x68, 0xd0, 0x8c, 0x01, 0x18, - 0x08, 0x0c, 0x59, 0x61, 0x00, 0x40, 0xd0, 0x94, 0x01, 0x18, 0x08, 0x0c, - 0x59, 0x31, 0x00, 0x18, 0xd0, 0x9c, 0x01, 0x08, 0x00, 0x99, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x16, 0x61, 0x28, - 0xd1, 0x9c, 0x11, 0x10, 0xc1, 0x9d, 0x61, 0x2a, 0x00, 0x1e, 0x0c, 0x68, - 0x70, 0x30, 0xd0, 0x9c, 0x11, 0x20, 0x60, 0x04, 0x90, 0x85, 0x00, 0x02, - 0x60, 0x06, 0x70, 0x98, 0x90, 0x05, 0x01, 0x20, 0x70, 0x9b, 0x00, 0x00, - 0x70, 0x93, 0x00, 0x00, 0x62, 0x4c, 0x92, 0x86, 0xf0, 0xf0, 0x11, 0x50, - 0x60, 0x48, 0x90, 0x86, 0xf0, 0xf0, 0x01, 0x30, 0x62, 0x4a, 0x60, 0x43, - 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x04, 0x90, 0x92, 0x94, 0xff, 0x00, - 0x92, 0x96, 0xf7, 0x00, 0x01, 0x78, 0x71, 0x38, 0xd1, 0xa4, 0x11, 0x60, - 0x62, 0x40, 0x92, 0x95, 0x01, 0x00, 0x62, 0x42, 0x92, 0x94, 0x00, 0x10, - 0x01, 0x28, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, 0x61, 0x19, 0x00, 0xf0, - 0x60, 0x40, 0x90, 0x84, 0x00, 0x10, 0x90, 0x85, 0x01, 0x40, 0x60, 0x42, - 0x60, 0x43, 0x00, 0x00, 0x70, 0x87, 0x00, 0x00, 0x70, 0xa3, 0x00, 0x01, - 0x70, 0xc7, 0x00, 0x00, 0x70, 0xdf, 0x00, 0x00, 0x20, 0x09, 0x1d, 0x80, - 0x20, 0x0b, 0x00, 0x00, 0x70, 0x97, 0x00, 0x00, 0x70, 0x8b, 0x00, 0x0f, - 0x20, 0x09, 0x00, 0x0f, 0x20, 0x11, 0x5f, 0xfb, 0x08, 0x0c, 0x8a, 0x5d, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x10, - 0x70, 0x5f, 0xff, 0xff, 0x70, 0x88, 0x90, 0x05, 0x15, 0x28, 0x20, 0x11, - 0x5f, 0xfb, 0x08, 0x0c, 0x89, 0x93, 0x60, 0x40, 0x90, 0x94, 0x00, 0x10, - 0x92, 0x85, 0x00, 0x20, 0x60, 0x42, 0x20, 0xa9, 0x00, 0xc8, 0x60, 0x44, - 0xd0, 0x8c, 0x11, 0x68, 0x1f, 0x04, 0x59, 0x47, 0x62, 0x42, 0x70, 0x9b, - 0x00, 0x00, 0x60, 0x40, 0x90, 0x94, 0x00, 0x10, 0x92, 0x85, 0x00, 0x80, - 0x60, 0x42, 0x62, 0x42, 0x00, 0x48, 0x62, 0x42, 0x70, 0x9b, 0x00, 0x00, - 0x70, 0x8f, 0x00, 0x00, 0x90, 0x06, 0x08, 0x0c, 0x61, 0xa2, 0x00, 0x00, - 0x00, 0x05, 0x70, 0x8c, 0x90, 0x8a, 0x00, 0x03, 0x1a, 0x0c, 0x0d, 0x85, - 0x00, 0x0b, 0x00, 0x05, 0x59, 0x6b, 0x59, 0xbc, 0x5a, 0x57, 0x00, 0xf6, - 0x00, 0x16, 0x69, 0x00, 0x91, 0x8c, 0x08, 0x00, 0x70, 0x8f, 0x00, 0x01, - 0x20, 0x01, 0x01, 0x5d, 0x20, 0x03, 0x00, 0x00, 0x68, 0x03, 0x00, 0xfc, - 0x20, 0xa9, 0x00, 0x04, 0x68, 0x00, 0x90, 0x84, 0x00, 0xfc, 0x01, 0x20, - 0x1f, 0x04, 0x59, 0x7a, 0x08, 0x0c, 0x0d, 0x85, 0x68, 0xa0, 0x68, 0xa2, - 0x68, 0x9c, 0x68, 0x9e, 0x68, 0x98, 0x68, 0x9a, 0xa0, 0x01, 0x91, 0x8d, - 0x16, 0x00, 0x69, 0x02, 0x00, 0x1e, 0x68, 0x37, 0x00, 0x20, 0x08, 0x0c, - 0x61, 0x7e, 0x20, 0x79, 0x1d, 0x00, 0x78, 0x33, 0x11, 0x01, 0x78, 0x37, - 0x00, 0x00, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, - 0x00, 0x01, 0x20, 0xa1, 0x1d, 0x0e, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x03, - 0x08, 0x0c, 0xaa, 0xf1, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x1d, 0x00, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x14, - 0x40, 0x03, 0x60, 0xc3, 0x00, 0x0c, 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, - 0x60, 0x2c, 0x00, 0xfe, 0x90, 0x06, 0x70, 0x92, 0x60, 0x43, 0x00, 0x08, - 0x60, 0x42, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x70, 0x93, 0x00, 0x00, - 0x90, 0x25, 0x09, 0x04, 0x5a, 0x34, 0x60, 0x20, 0xd0, 0xb4, 0x19, 0x04, - 0x5a, 0x32, 0x71, 0xa0, 0x81, 0xff, 0x09, 0x04, 0x5a, 0x20, 0x94, 0x86, - 0x00, 0x0c, 0x19, 0x04, 0x5a, 0x2d, 0x94, 0x80, 0x00, 0x18, 0x80, 0x04, - 0x20, 0xa8, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x11, 0x02, 0x60, 0x20, 0x19, - 0x1d, 0x00, 0x22, 0x0c, 0x23, 0x04, 0x91, 0x06, 0x11, 0xe8, 0x82, 0x10, - 0x83, 0x18, 0x1f, 0x04, 0x59, 0xd9, 0x60, 0x43, 0x00, 0x04, 0x20, 0x61, - 0x01, 0x40, 0x60, 0x5b, 0xbc, 0x94, 0x60, 0x5f, 0xf0, 0xf0, 0x20, 0x61, - 0x01, 0x00, 0x60, 0x43, 0x00, 0x06, 0x70, 0x8f, 0x00, 0x02, 0x70, 0x9b, - 0x00, 0x02, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, - 0x8a, 0x5d, 0x08, 0x0c, 0x61, 0x7e, 0x04, 0xc0, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0x79, 0x02, 0x60, 0x79, 0x30, 0x91, 0x8e, 0x11, 0x01, 0x15, 0x58, - 0x78, 0x34, 0x90, 0x05, 0x15, 0x40, 0x79, 0x00, 0x91, 0x8c, 0x00, 0xff, - 0x11, 0x18, 0x78, 0x04, 0x90, 0x05, 0x01, 0x90, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0x11, 0x02, 0x6e, 0x20, 0x19, 0x18, 0x05, 0x20, 0xa9, 0x00, 0x04, - 0x22, 0x0c, 0x23, 0x04, 0x91, 0x02, 0x02, 0x30, 0x11, 0xa0, 0x82, 0x10, - 0x83, 0x18, 0x1f, 0x04, 0x5a, 0x14, 0x00, 0x78, 0x70, 0xa3, 0x00, 0x00, - 0x08, 0x0c, 0x61, 0x77, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x60, - 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1d, 0x00, 0x20, 0xa9, 0x00, 0x14, - 0x40, 0x03, 0x60, 0x43, 0x00, 0x08, 0x60, 0x43, 0x00, 0x00, 0x00, 0x10, - 0x00, 0xfe, 0x00, 0x05, 0x60, 0x40, 0x90, 0x85, 0x01, 0x00, 0x60, 0x42, - 0x60, 0x20, 0xd0, 0xb4, 0x1d, 0xb8, 0x08, 0x0c, 0xaa, 0xf1, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0x99, 0x1d, 0x00, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x40, 0x20, 0xa9, 0x00, 0x14, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x0c, - 0x20, 0x11, 0x19, 0xf5, 0x20, 0x13, 0x00, 0x00, 0x70, 0x93, 0x00, 0x00, - 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x08, 0x0c, 0xa2, 0x93, - 0x08, 0xd8, 0x00, 0x05, 0x70, 0x98, 0x90, 0x8a, 0x00, 0x1d, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x0b, 0x00, 0x05, 0x5a, 0x89, 0x5a, 0x9c, 0x5a, 0xc5, - 0x5a, 0xe5, 0x5b, 0x0b, 0x5b, 0x3a, 0x5b, 0x60, 0x5b, 0x98, 0x5b, 0xbe, - 0x5b, 0xec, 0x5c, 0x27, 0x5c, 0x5f, 0x5c, 0x7d, 0x5c, 0xa8, 0x5c, 0xca, - 0x5c, 0xe5, 0x5c, 0xef, 0x5d, 0x23, 0x5d, 0x49, 0x5d, 0x78, 0x5d, 0x9e, - 0x5d, 0xd6, 0x5e, 0x1a, 0x5e, 0x57, 0x5e, 0x78, 0x5e, 0xd1, 0x5e, 0xf3, - 0x5f, 0x21, 0x5f, 0x21, 0x00, 0xc6, 0x20, 0x61, 0x18, 0x00, 0x60, 0x03, - 0x00, 0x07, 0x20, 0x61, 0x01, 0x00, 0x60, 0x04, 0x90, 0x84, 0xff, 0xf9, - 0x60, 0x06, 0x00, 0xce, 0x00, 0x05, 0x20, 0x61, 0x01, 0x40, 0x60, 0x5b, - 0xbc, 0x94, 0x60, 0x5f, 0xf0, 0xf0, 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, - 0x00, 0x02, 0x70, 0x9b, 0x00, 0x01, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, - 0x60, 0x02, 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, - 0x90, 0x86, 0x00, 0x14, 0x15, 0x10, 0x60, 0x42, 0x60, 0x20, 0xd0, 0xb4, - 0x11, 0xf0, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, - 0x92, 0x96, 0x11, 0x02, 0x11, 0xa0, 0x78, 0x34, 0x90, 0x05, 0x11, 0x88, - 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, - 0x70, 0xc7, 0x00, 0x01, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x70, 0x9b, 0x00, 0x10, 0x08, 0x0c, 0x5c, 0xef, 0x00, 0x10, 0x70, 0x93, - 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x03, - 0x60, 0x43, 0x00, 0x04, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x08, 0x0c, 0x60, 0xfb, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x02, - 0x78, 0x37, 0x00, 0x00, 0x20, 0xa9, 0x00, 0x08, 0x9f, 0x88, 0x00, 0x0e, - 0x20, 0x0b, 0x00, 0x00, 0x81, 0x08, 0x1f, 0x04, 0x5a, 0xda, 0x60, 0xc3, - 0x00, 0x14, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, - 0x89, 0x93, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x02, 0x11, 0x78, - 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, - 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, - 0x00, 0x04, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x61, 0x53, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x05, 0x08, 0x0c, 0x60, 0xfb, - 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x03, 0x78, 0x37, 0x00, 0x00, - 0x08, 0x0c, 0x61, 0x77, 0x08, 0x0c, 0x61, 0x5a, 0x11, 0x70, 0x70, 0x84, - 0x90, 0x05, 0x11, 0x58, 0x71, 0x5c, 0x91, 0x86, 0xff, 0xff, 0x01, 0x38, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0xaf, 0x01, 0x68, 0x08, 0x0c, - 0x61, 0x30, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, - 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, - 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x60, 0x02, - 0x08, 0x0c, 0x89, 0x93, 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, - 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x03, - 0x11, 0x78, 0x78, 0x34, 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, - 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, - 0x70, 0x9b, 0x00, 0x06, 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x61, 0x53, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x07, 0x08, 0x0c, - 0x60, 0xfb, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x04, 0x78, 0x37, - 0x00, 0x00, 0x08, 0x0c, 0x61, 0x77, 0x08, 0x0c, 0x61, 0x5a, 0x11, 0xb8, - 0x70, 0x84, 0x90, 0x05, 0x11, 0xa0, 0x71, 0x64, 0x91, 0x86, 0xff, 0xff, - 0x01, 0x80, 0x91, 0x80, 0x34, 0x8e, 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0xaf, 0x01, 0x80, - 0x08, 0x0c, 0x51, 0x2e, 0x01, 0x10, 0x08, 0x0c, 0x26, 0xf5, 0x20, 0xa9, - 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, - 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, - 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x04, 0x11, 0x78, 0x78, 0x34, - 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x08, - 0x00, 0x29, 0x00, 0x10, 0x08, 0x0c, 0x61, 0x53, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x09, 0x08, 0x0c, 0x60, 0xfb, 0x20, 0x79, - 0x02, 0x40, 0x78, 0x33, 0x11, 0x05, 0x78, 0x37, 0x01, 0x00, 0x08, 0x0c, - 0x61, 0x5a, 0x11, 0x50, 0x70, 0x84, 0x90, 0x05, 0x11, 0x38, 0x08, 0x0c, - 0x5f, 0x22, 0x11, 0x88, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0x26, 0xf5, - 0x20, 0xa9, 0x00, 0x08, 0x08, 0x0c, 0x61, 0x77, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, - 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0x10, - 0x08, 0x0c, 0x5a, 0x7c, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, - 0x90, 0x05, 0x05, 0xa8, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x90, 0x86, 0x00, 0x14, 0x15, 0x60, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, - 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x05, 0x15, 0x20, 0x78, 0x34, - 0x90, 0x84, 0x01, 0x00, 0x20, 0x11, 0x01, 0x00, 0x92, 0x1e, 0x11, 0x60, - 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, 0x11, 0x10, - 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x0a, 0x00, 0xb1, 0x00, 0x98, - 0x90, 0x05, 0x11, 0x78, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x97, 0x00, 0x00, - 0x70, 0x9b, 0x00, 0x0e, 0x08, 0x0c, 0x5c, 0xca, 0x00, 0x10, 0x08, 0x0c, - 0x61, 0x53, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x0b, - 0x20, 0x11, 0x1d, 0x0e, 0x20, 0xe9, 0x00, 0x01, 0x22, 0xa0, 0x20, 0xa9, - 0x00, 0x40, 0x20, 0x19, 0xff, 0xff, 0x43, 0x04, 0x08, 0x0c, 0x60, 0xfb, - 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x06, 0x78, 0x37, 0x00, 0x00, - 0x08, 0x0c, 0x61, 0x5a, 0x01, 0x18, 0x20, 0x13, 0x00, 0x00, 0x00, 0x20, - 0x70, 0x60, 0x90, 0x85, 0x01, 0x00, 0x20, 0x12, 0x20, 0xa9, 0x00, 0x40, - 0x20, 0x09, 0x02, 0x4e, 0x20, 0x11, 0x1d, 0x0e, 0x22, 0x0e, 0x82, 0x10, - 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x28, 0x68, 0x10, 0x80, 0x00, - 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x1f, 0x04, 0x5c, 0x4c, 0x60, 0xc3, - 0x00, 0x84, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x01, 0xc0, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, - 0x89, 0x93, 0x90, 0x86, 0x00, 0x84, 0x11, 0x78, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x06, 0x11, 0x38, - 0x78, 0x34, 0x90, 0x05, 0x11, 0x20, 0x70, 0x9b, 0x00, 0x0c, 0x00, 0x29, - 0x00, 0x10, 0x08, 0x0c, 0x61, 0x53, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x9b, 0x00, 0x0d, 0x08, 0x0c, 0x60, 0xfb, 0x20, 0x79, 0x02, 0x40, - 0x78, 0x33, 0x11, 0x07, 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0xa9, 0x00, 0x40, 0x20, 0x11, 0x02, 0x6e, 0x20, 0x09, 0x02, 0x4e, - 0x22, 0x0e, 0x82, 0x10, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x50, - 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x68, 0x14, - 0x80, 0x00, 0x68, 0x16, 0x20, 0x11, 0x02, 0x60, 0x1f, 0x04, 0x5c, 0x90, - 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xe0, 0x20, 0x11, 0x60, 0x02, - 0x08, 0x0c, 0x89, 0x93, 0x90, 0x86, 0x00, 0x84, 0x11, 0x98, 0x08, 0x0c, - 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x07, - 0x11, 0x58, 0x78, 0x34, 0x90, 0x05, 0x11, 0x40, 0x70, 0x97, 0x00, 0x01, - 0x08, 0x0c, 0x60, 0xcd, 0x70, 0x9b, 0x00, 0x0e, 0x00, 0x29, 0x00, 0x10, - 0x08, 0x0c, 0x61, 0x53, 0x00, 0xfe, 0x00, 0x05, 0x91, 0x8d, 0x00, 0x01, - 0x08, 0x0c, 0x61, 0xa2, 0x70, 0x9b, 0x00, 0x0f, 0x70, 0x93, 0x00, 0x00, - 0x20, 0x61, 0x01, 0x40, 0x60, 0x5b, 0xbc, 0x85, 0x60, 0x5f, 0xb5, 0xb5, - 0x20, 0x61, 0x01, 0x00, 0x60, 0x43, 0x00, 0x05, 0x60, 0x43, 0x00, 0x04, - 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x87, - 0x00, 0x05, 0x70, 0x90, 0x90, 0x05, 0x01, 0x30, 0x20, 0x11, 0x60, 0x02, - 0x08, 0x0c, 0x89, 0x93, 0x70, 0x9b, 0x00, 0x00, 0x00, 0x05, 0x70, 0x9b, - 0x00, 0x11, 0x08, 0x0c, 0xaa, 0xf1, 0x08, 0x0c, 0x61, 0x77, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x99, 0x02, 0x60, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x40, 0x74, 0x90, 0x94, 0x80, 0x00, 0x18, 0x90, 0x80, 0x00, 0x07, - 0x90, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x40, 0x03, 0x08, 0x0c, - 0x61, 0x5a, 0x11, 0xa0, 0x71, 0x7c, 0x81, 0xff, 0x01, 0x88, 0x90, 0x0e, - 0x70, 0x80, 0x90, 0x84, 0x00, 0xff, 0x01, 0x60, 0x08, 0x0c, 0x26, 0x8c, - 0x91, 0x86, 0x00, 0x7e, 0x01, 0x38, 0x91, 0x86, 0x00, 0x80, 0x01, 0x20, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x5f, 0xaf, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x60, 0x2c, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, - 0x05, 0x00, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, 0x90, 0x86, - 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, - 0x7a, 0x30, 0x92, 0x96, 0x11, 0x03, 0x11, 0x78, 0x78, 0x34, 0x90, 0x05, - 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, - 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x12, 0x00, 0x29, - 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x9b, 0x00, 0x13, 0x08, 0x0c, 0x61, 0x09, 0x20, 0x79, 0x02, 0x40, - 0x78, 0x33, 0x11, 0x03, 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x77, - 0x08, 0x0c, 0x61, 0x5a, 0x11, 0x70, 0x70, 0x84, 0x90, 0x05, 0x11, 0x58, - 0x71, 0x5c, 0x91, 0x86, 0xff, 0xff, 0x01, 0x38, 0x20, 0x11, 0x00, 0x08, - 0x08, 0x0c, 0x5f, 0xaf, 0x01, 0x68, 0x08, 0x0c, 0x61, 0x30, 0x20, 0xa9, - 0x00, 0x08, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, - 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, - 0x90, 0x05, 0x05, 0x00, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x90, 0x86, 0x00, 0x14, 0x11, 0xb8, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, - 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x04, 0x11, 0x78, 0x78, 0x34, - 0x90, 0x05, 0x11, 0x60, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x70, 0x9b, 0x00, 0x14, - 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x15, 0x08, 0x0c, 0x61, 0x09, 0x20, 0x79, - 0x02, 0x40, 0x78, 0x33, 0x11, 0x04, 0x78, 0x37, 0x00, 0x00, 0x08, 0x0c, - 0x61, 0x77, 0x08, 0x0c, 0x61, 0x5a, 0x11, 0xb8, 0x70, 0x84, 0x90, 0x05, - 0x11, 0xa0, 0x71, 0x64, 0x91, 0x86, 0xff, 0xff, 0x01, 0x80, 0x91, 0x80, - 0x34, 0x8e, 0x20, 0x0d, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x20, 0x11, - 0x00, 0x08, 0x08, 0x0c, 0x5f, 0xaf, 0x01, 0x80, 0x08, 0x0c, 0x51, 0x2e, - 0x01, 0x10, 0x08, 0x0c, 0x26, 0xf5, 0x20, 0xa9, 0x00, 0x08, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, 0x60, 0x2c, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x05, 0xf0, - 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, 0x90, 0x86, 0x00, 0x14, - 0x15, 0xa8, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, - 0x92, 0x96, 0x11, 0x05, 0x15, 0x68, 0x78, 0x34, 0x90, 0x84, 0x01, 0x00, - 0x20, 0x11, 0x01, 0x00, 0x92, 0x1e, 0x11, 0x68, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x61, 0xa2, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, - 0x90, 0x05, 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x00, 0x80, 0x90, 0x05, - 0x11, 0xb8, 0x7a, 0x38, 0xd2, 0xfc, 0x01, 0x28, 0x70, 0xc4, 0x90, 0x05, - 0x11, 0x10, 0x70, 0xc7, 0x00, 0x01, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, - 0x61, 0xa2, 0x70, 0x97, 0x00, 0x00, 0x7a, 0x38, 0xd2, 0xf4, 0x01, 0x10, - 0x70, 0xdf, 0x00, 0x08, 0x70, 0x9b, 0x00, 0x16, 0x00, 0x29, 0x00, 0x10, - 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x08, 0x0c, 0xaa, 0xf1, - 0x08, 0x0c, 0x61, 0x77, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x60, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x0e, - 0x40, 0x03, 0x20, 0x11, 0x02, 0x6d, 0x22, 0x04, 0x90, 0x84, 0x01, 0x00, - 0x20, 0x11, 0x02, 0x4d, 0x20, 0x12, 0x20, 0x11, 0x02, 0x6e, 0x70, 0x9b, - 0x00, 0x17, 0x08, 0x0c, 0x61, 0x5a, 0x11, 0x50, 0x70, 0x84, 0x90, 0x05, - 0x11, 0x38, 0x08, 0x0c, 0x5f, 0x22, 0x11, 0x88, 0x90, 0x85, 0x00, 0x01, - 0x08, 0x0c, 0x26, 0xf5, 0x20, 0xa9, 0x00, 0x08, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x4e, 0x40, 0x03, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x0c, - 0x60, 0x2c, 0x00, 0x10, 0x08, 0x0c, 0x5a, 0x7c, 0x00, 0x05, 0x00, 0xf6, - 0x70, 0x90, 0x90, 0x05, 0x01, 0xd8, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, - 0x89, 0x93, 0x90, 0x86, 0x00, 0x84, 0x11, 0x90, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, 0x11, 0x06, 0x11, 0x50, - 0x78, 0x34, 0x90, 0x05, 0x11, 0x38, 0x90, 0x06, 0x08, 0x0c, 0x61, 0xa2, - 0x70, 0x9b, 0x00, 0x18, 0x00, 0x29, 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x70, 0x9b, 0x00, 0x19, 0x08, 0x0c, - 0x61, 0x09, 0x20, 0x79, 0x02, 0x40, 0x78, 0x33, 0x11, 0x06, 0x78, 0x37, - 0x00, 0x00, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x09, 0x02, 0x6e, 0x20, 0x39, - 0x1d, 0x0e, 0x20, 0xa9, 0x00, 0x40, 0x21, 0x3e, 0x87, 0x38, 0x81, 0x08, - 0x91, 0x86, 0x02, 0x80, 0x11, 0x28, 0x68, 0x14, 0x80, 0x00, 0x68, 0x16, - 0x20, 0x09, 0x02, 0x60, 0x1f, 0x04, 0x5e, 0x8b, 0x20, 0x39, 0x1d, 0x0e, - 0x08, 0x0c, 0x61, 0x5a, 0x11, 0xe8, 0x27, 0x28, 0x25, 0x14, 0x82, 0x07, - 0x90, 0x84, 0x00, 0xff, 0x80, 0x00, 0x20, 0x18, 0x92, 0x94, 0x00, 0xff, - 0x80, 0x07, 0x92, 0x05, 0x20, 0x2a, 0x70, 0x60, 0x23, 0x10, 0x82, 0x14, - 0x92, 0xa0, 0x1d, 0x0e, 0x24, 0x14, 0x93, 0x8c, 0x00, 0x01, 0x01, 0x18, - 0x92, 0x94, 0xff, 0x00, 0x00, 0x18, 0x92, 0x94, 0x00, 0xff, 0x80, 0x07, - 0x92, 0x15, 0x22, 0x22, 0x20, 0xa9, 0x00, 0x40, 0x20, 0x09, 0x02, 0x4e, - 0x27, 0x0e, 0x87, 0x38, 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x28, - 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x1f, 0x04, - 0x5e, 0xbe, 0x60, 0xc3, 0x00, 0x84, 0x08, 0x0c, 0x60, 0x2c, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x90, 0x90, 0x05, 0x01, 0xe0, 0x20, 0x11, - 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, 0x90, 0x86, 0x00, 0x84, 0x11, 0x98, - 0x08, 0x0c, 0x61, 0x77, 0x20, 0x79, 0x02, 0x60, 0x7a, 0x30, 0x92, 0x96, - 0x11, 0x07, 0x11, 0x58, 0x78, 0x34, 0x90, 0x05, 0x11, 0x40, 0x70, 0x97, - 0x00, 0x01, 0x08, 0x0c, 0x60, 0xcd, 0x70, 0x9b, 0x00, 0x1a, 0x00, 0x29, - 0x00, 0x10, 0x70, 0x93, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x08, 0x0c, 0x61, 0xa2, 0x70, 0x9b, 0x00, 0x1b, 0x08, 0x0c, - 0xaa, 0xf1, 0x08, 0x0c, 0x61, 0x77, 0x20, 0x11, 0x02, 0x60, 0x20, 0x09, - 0x02, 0x40, 0x74, 0x90, 0x94, 0x80, 0x00, 0x18, 0x90, 0x80, 0x00, 0x07, - 0x90, 0x84, 0x03, 0xf8, 0x80, 0x04, 0x20, 0xa8, 0x22, 0x0e, 0x82, 0x10, - 0x81, 0x08, 0x91, 0x86, 0x02, 0x60, 0x11, 0x50, 0x68, 0x10, 0x80, 0x00, - 0x68, 0x12, 0x20, 0x09, 0x02, 0x40, 0x68, 0x14, 0x80, 0x00, 0x68, 0x16, - 0x20, 0x11, 0x02, 0x60, 0x1f, 0x04, 0x5f, 0x0a, 0x60, 0xc3, 0x00, 0x84, - 0x08, 0x0c, 0x60, 0x2c, 0x00, 0x05, 0x00, 0x05, 0x00, 0x86, 0x00, 0x96, - 0x20, 0x29, 0x18, 0x48, 0x25, 0x2c, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x41, - 0x1d, 0x0e, 0x20, 0xe9, 0x00, 0x01, 0x28, 0xa0, 0x08, 0x0c, 0x61, 0x77, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x40, 0x03, 0x20, 0xa9, - 0x00, 0x08, 0x20, 0x11, 0x00, 0x07, 0xd5, 0xd4, 0x01, 0x08, 0x90, 0x16, - 0x28, 0x00, 0x92, 0x00, 0x20, 0x0c, 0x91, 0xa6, 0xff, 0xff, 0x11, 0x48, - 0xd5, 0xd4, 0x01, 0x10, 0x82, 0x10, 0x00, 0x08, 0x82, 0x11, 0x1f, 0x04, - 0x5f, 0x3c, 0x08, 0x04, 0x5f, 0xab, 0x82, 0xff, 0x11, 0x60, 0xd5, 0xd4, - 0x01, 0x20, 0x91, 0xa6, 0x3f, 0xff, 0x0d, 0x90, 0x00, 0x20, 0x91, 0xa6, - 0x3f, 0xff, 0x09, 0x04, 0x5f, 0xab, 0x91, 0x8d, 0xc0, 0x00, 0x20, 0xa9, - 0x00, 0x10, 0x20, 0x19, 0x00, 0x01, 0xd5, 0xd4, 0x01, 0x10, 0x20, 0x19, - 0x00, 0x10, 0x21, 0x20, 0xd5, 0xd4, 0x01, 0x10, 0x84, 0x23, 0x00, 0x08, - 0x84, 0x24, 0x12, 0x40, 0xd5, 0xd4, 0x01, 0x10, 0x83, 0x19, 0x00, 0x08, - 0x83, 0x18, 0x1f, 0x04, 0x5f, 0x62, 0x04, 0xd8, 0x23, 0xa8, 0x20, 0x21, - 0x00, 0x01, 0x84, 0x26, 0x84, 0x25, 0x1f, 0x04, 0x5f, 0x74, 0x23, 0x28, - 0x85, 0x29, 0x92, 0xbe, 0x00, 0x07, 0x01, 0x58, 0x00, 0x06, 0x20, 0x39, - 0x00, 0x07, 0x22, 0x00, 0x97, 0x3a, 0x00, 0x0e, 0x27, 0xa8, 0x95, 0xa8, - 0x00, 0x10, 0x1f, 0x04, 0x5f, 0x83, 0x75, 0x5e, 0x95, 0xc8, 0x34, 0x8e, - 0x29, 0x2d, 0x95, 0xac, 0x00, 0xff, 0x75, 0x82, 0x65, 0x32, 0x65, 0x36, - 0x00, 0x16, 0x25, 0x08, 0x08, 0x0c, 0x26, 0xd5, 0x00, 0x1e, 0x60, 0xe7, - 0x00, 0x00, 0x65, 0xea, 0x20, 0x18, 0x23, 0x04, 0x94, 0x05, 0x20, 0x1a, - 0x70, 0x87, 0x00, 0x01, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, - 0x20, 0xe1, 0x00, 0x01, 0x28, 0x98, 0x20, 0xa9, 0x00, 0x08, 0x40, 0x03, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x9e, 0x00, 0x8e, - 0x00, 0x05, 0x01, 0x56, 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x36, 0x01, 0x46, - 0x22, 0xa8, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0x11, 0x02, 0x4e, 0x22, 0xa0, 0x40, 0x03, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0xde, 0x01, 0xce, 0x01, 0x5e, 0x21, 0x18, 0x90, 0x26, - 0x20, 0x01, 0x00, 0x07, 0x93, 0x9a, 0x00, 0x10, 0x02, 0x18, 0x84, 0x20, - 0x80, 0x01, 0x0c, 0xd0, 0x21, 0x18, 0x84, 0xff, 0x01, 0x20, 0x93, 0x9a, - 0x00, 0x10, 0x84, 0x21, 0x1d, 0xe0, 0x20, 0x21, 0x00, 0x01, 0x83, 0xff, - 0x01, 0x18, 0x84, 0x23, 0x83, 0x19, 0x1d, 0xe8, 0x92, 0x38, 0x20, 0x29, - 0x02, 0x6e, 0x95, 0x28, 0x25, 0x04, 0x94, 0x2c, 0x11, 0xb8, 0x94, 0x05, - 0x20, 0x3a, 0x71, 0x5e, 0x91, 0xa0, 0x34, 0x8e, 0x24, 0x2d, 0x95, 0xac, - 0x00, 0xff, 0x75, 0x82, 0x65, 0x32, 0x65, 0x36, 0x00, 0x16, 0x25, 0x08, - 0x08, 0x0c, 0x26, 0xd5, 0x00, 0x1e, 0x60, 0xe7, 0x00, 0x00, 0x65, 0xea, - 0x70, 0x87, 0x00, 0x01, 0x90, 0x84, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x8b, 0x00, 0x00, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x20, 0x71, 0x01, 0x40, - 0x08, 0x0c, 0x60, 0xbc, 0x08, 0x0c, 0xa2, 0xa0, 0x70, 0x04, 0x90, 0x84, - 0x40, 0x00, 0x01, 0x10, 0x08, 0x0c, 0x2a, 0xa9, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x18, 0x26, 0x20, 0x73, 0x00, 0x00, 0x78, 0x40, - 0x00, 0x26, 0x00, 0x16, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, 0x61, 0x19, - 0x00, 0x1e, 0x90, 0x94, 0x00, 0x10, 0x92, 0x85, 0x00, 0x80, 0x78, 0x42, - 0x7a, 0x42, 0x00, 0x2e, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x2a, 0x04, 0x02, 0x28, - 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc5, 0x20, 0x12, 0x20, 0x11, - 0x19, 0xf5, 0x20, 0x13, 0x00, 0x00, 0x70, 0x93, 0x00, 0x00, 0x01, 0x2e, - 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, 0x08, 0x0c, 0xa2, 0x93, - 0x61, 0x44, 0xd1, 0x84, 0x01, 0x20, 0x71, 0x98, 0x91, 0x8d, 0x20, 0x00, - 0x00, 0x18, 0x71, 0x8c, 0x91, 0x8d, 0x10, 0x00, 0x20, 0x11, 0x19, 0x99, - 0x21, 0x12, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, - 0x8a, 0x5d, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xb0, 0x9b, - 0x08, 0x0c, 0xad, 0x18, 0x20, 0x09, 0x00, 0xf7, 0x08, 0x0c, 0x61, 0x19, - 0x20, 0x61, 0x1a, 0x04, 0x90, 0x0e, 0x61, 0x1a, 0x61, 0x1e, 0x61, 0x7a, - 0x61, 0x7e, 0x20, 0x61, 0x18, 0x00, 0x60, 0x03, 0x00, 0x01, 0x20, 0x61, - 0x01, 0x00, 0x60, 0x43, 0x00, 0x90, 0x60, 0x43, 0x00, 0x10, 0x20, 0x09, - 0x19, 0x99, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x09, 0x00, 0x2d, 0x20, 0x11, - 0x60, 0x88, 0x08, 0x0c, 0x89, 0x87, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x04, 0x71, 0x20, 0x71, 0x01, 0x00, 0x08, 0x0c, 0xa2, 0xa0, - 0x20, 0x71, 0x01, 0x40, 0x70, 0x04, 0x90, 0x84, 0x40, 0x00, 0x01, 0x10, - 0x08, 0x0c, 0x2a, 0xa9, 0x08, 0x0c, 0x77, 0xa6, 0x01, 0x88, 0x08, 0x0c, - 0x77, 0xc1, 0x11, 0x70, 0x08, 0x0c, 0x7a, 0xc0, 0x00, 0x16, 0x08, 0x0c, - 0x27, 0xa4, 0x20, 0x01, 0x19, 0x6d, 0x21, 0x02, 0x00, 0x1e, 0x08, 0x0c, - 0x7a, 0xbb, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x50, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0x2a, 0x85, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x26, 0x31, - 0x08, 0x0c, 0x60, 0x58, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xbc, 0x01, 0x58, 0x00, 0x26, - 0x00, 0x36, 0x20, 0x11, 0x80, 0x17, 0x20, 0x01, 0x19, 0x99, 0x20, 0x1c, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x20, 0xa9, - 0x00, 0x12, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, 0x1d, 0x80, 0x08, 0x0c, - 0x61, 0x77, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x99, 0x02, 0x6e, 0x00, 0x99, - 0x20, 0xa9, 0x00, 0x20, 0x08, 0x0c, 0x61, 0x71, 0x20, 0x99, 0x02, 0x60, - 0x20, 0xa1, 0x1d, 0x92, 0x00, 0x51, 0x20, 0xa9, 0x00, 0x0e, 0x08, 0x0c, - 0x61, 0x74, 0x20, 0x99, 0x02, 0x60, 0x20, 0xa1, 0x1d, 0xb2, 0x00, 0x09, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x34, 0x10, 0x33, 0x08, 0x21, 0x04, - 0x80, 0x07, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0x60, 0xf1, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0xaa, 0xf1, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0x99, 0x1d, 0x00, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x40, 0x20, 0xa9, 0x00, 0x0c, 0x40, 0x03, 0x00, 0x05, 0x08, 0x0c, - 0xaa, 0xf1, 0x08, 0x0c, 0x61, 0x77, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x99, - 0x02, 0x60, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, 0x20, 0xa9, - 0x00, 0x0c, 0x40, 0x03, 0x00, 0x05, 0x00, 0xc6, 0x00, 0x06, 0x20, 0x61, - 0x01, 0x00, 0x81, 0x0f, 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, - 0x11, 0x38, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x91, 0x05, 0x00, 0x10, 0x91, 0x85, 0x00, 0xf7, 0x60, 0x4a, 0x00, 0x0e, - 0x00, 0xce, 0x00, 0x05, 0x00, 0x16, 0x00, 0x46, 0x08, 0x0c, 0x6c, 0x0d, - 0x01, 0x58, 0x90, 0x06, 0x20, 0x20, 0x20, 0x09, 0x00, 0x2a, 0x08, 0x0c, - 0xea, 0x8d, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0x95, 0x21, 0x02, - 0x20, 0x19, 0x00, 0x2a, 0x90, 0x0e, 0x08, 0x0c, 0x32, 0xda, 0x08, 0x0c, - 0xd6, 0x45, 0x01, 0x40, 0x00, 0x36, 0x20, 0x19, 0xff, 0xff, 0x20, 0x21, - 0x00, 0x07, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x1e, - 0x00, 0x05, 0x08, 0x0c, 0x60, 0x58, 0x70, 0x9b, 0x00, 0x00, 0x70, 0x93, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, - 0xd0, 0x9c, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x01, 0x01, 0x20, 0x0c, - 0x91, 0x8d, 0x00, 0x06, 0x21, 0x02, 0x01, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x20, 0x09, 0x00, 0x01, 0x00, 0x20, 0x20, 0x09, 0x00, 0x02, - 0x00, 0x08, 0x90, 0x0e, 0x68, 0x14, 0x90, 0x84, 0xff, 0xc0, 0x91, 0x0d, - 0x69, 0x16, 0x00, 0x05, 0x00, 0xf6, 0x01, 0x56, 0x01, 0x46, 0x01, 0xd6, - 0x90, 0x06, 0x20, 0xa9, 0x00, 0x80, 0x20, 0xe9, 0x00, 0x01, 0x20, 0xa1, - 0x1d, 0x00, 0x40, 0x04, 0x20, 0x79, 0x1d, 0x00, 0x78, 0x03, 0x22, 0x00, - 0x78, 0x07, 0x00, 0xef, 0x78, 0x0f, 0x00, 0xef, 0x78, 0x13, 0x01, 0x38, - 0x78, 0x23, 0xff, 0xff, 0x78, 0x27, 0xff, 0xff, 0x01, 0xde, 0x01, 0x4e, - 0x01, 0x5e, 0x00, 0xfe, 0x00, 0x05, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, - 0x00, 0x01, 0x00, 0x05, 0x20, 0x01, 0x19, 0xa7, 0x01, 0x18, 0x20, 0x03, - 0x00, 0x01, 0x00, 0x10, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x01, 0x56, - 0x20, 0xa9, 0x08, 0x00, 0x20, 0x09, 0x10, 0x00, 0x90, 0x06, 0x20, 0x0a, - 0x81, 0x08, 0x1f, 0x04, 0x61, 0xb1, 0x01, 0x5e, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x36, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x20, 0x69, 0x18, 0x47, - 0x90, 0x06, 0xb8, 0x02, 0xb8, 0xd6, 0xb8, 0x07, 0x07, 0x07, 0xb8, 0x0a, - 0xb8, 0x0e, 0xb8, 0x12, 0x91, 0x98, 0x34, 0x8e, 0x23, 0x1d, 0x93, 0x9c, - 0x00, 0xff, 0xbb, 0x16, 0x00, 0x16, 0x00, 0x26, 0xb8, 0x86, 0x08, 0x0c, - 0xb0, 0x94, 0x11, 0x20, 0x91, 0x92, 0x00, 0x7e, 0x12, 0x08, 0xbb, 0x86, - 0x20, 0xa9, 0x00, 0x04, 0xb8, 0xc4, 0x20, 0xe8, 0xb9, 0xc8, 0x91, 0x98, - 0x00, 0x06, 0x90, 0x06, 0x23, 0xa0, 0x40, 0x04, 0x20, 0xa9, 0x00, 0x04, - 0x91, 0x98, 0x00, 0x0a, 0x23, 0xa0, 0x40, 0x04, 0x00, 0x2e, 0x00, 0x1e, - 0xb8, 0x3e, 0xb8, 0x42, 0xb8, 0xce, 0xb8, 0xd2, 0xb8, 0x5e, 0xb8, 0x62, - 0xb8, 0x66, 0xb8, 0x6a, 0xb8, 0x6f, 0x01, 0x00, 0xb8, 0x72, 0xb8, 0x76, - 0xb8, 0x7a, 0xb8, 0x8a, 0xb8, 0x8e, 0xb8, 0x93, 0x00, 0x08, 0xb8, 0x96, - 0xb8, 0x9a, 0xb8, 0x9e, 0xb8, 0xbe, 0xb9, 0xa2, 0x00, 0x96, 0xb8, 0xa4, - 0x90, 0x4d, 0x01, 0x10, 0x08, 0x0c, 0x10, 0x8b, 0xb8, 0xa7, 0x00, 0x00, - 0x00, 0x9e, 0x90, 0x06, 0xb8, 0x4a, 0x68, 0x10, 0xb8, 0x3a, 0x68, 0x0c, - 0xb8, 0x46, 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xac, 0x90, 0x05, 0x01, 0x98, - 0x00, 0xc6, 0x20, 0x60, 0x9c, 0x82, 0x1d, 0xdc, 0x0a, 0x0c, 0x0d, 0x85, - 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x1a, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0x8e, 0xee, 0x00, 0xce, 0x09, 0x0c, 0x92, 0x8d, 0xb8, 0xaf, - 0x00, 0x00, 0x68, 0x14, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x42, 0x01, 0x4e, - 0x01, 0x3e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa9, 0x74, 0xae, 0x78, 0x96, 0x84, 0x3f, 0xff, - 0x90, 0x82, 0x40, 0x00, 0x1a, 0x04, 0x62, 0x8d, 0x91, 0x82, 0x08, 0x00, - 0x1a, 0x04, 0x62, 0x91, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0x90, 0x84, - 0x00, 0x03, 0x19, 0x04, 0x62, 0x97, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, - 0x90, 0x5d, 0x01, 0x98, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x8e, - 0x00, 0x06, 0x11, 0x88, 0xb8, 0xa4, 0x90, 0x0d, 0x19, 0x04, 0x62, 0xa9, - 0x08, 0x0c, 0x66, 0x69, 0x90, 0x06, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x05, 0x90, 0x0e, 0x04, 0xb8, 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, - 0x04, 0x98, 0x90, 0x82, 0x00, 0x06, 0x12, 0x90, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x60, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x11, 0x40, 0xb9, 0x00, - 0xd1, 0xfc, 0x0d, 0x10, 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, - 0x04, 0x08, 0x20, 0x01, 0x00, 0x28, 0x00, 0xa8, 0x20, 0x09, 0x18, 0x0c, - 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x68, - 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x40, 0x20, 0x01, - 0x00, 0x29, 0xb9, 0x00, 0xd1, 0xfc, 0x01, 0x18, 0x20, 0x09, 0x10, 0x00, - 0x00, 0x48, 0x90, 0x0e, 0x00, 0x38, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, - 0x00, 0x18, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x90, 0x05, 0x01, 0x2e, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0xd0, 0x84, 0x19, 0xd0, - 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x65, 0x09, 0xa8, 0x08, 0x0c, - 0x6c, 0x11, 0x19, 0x90, 0xb8, 0x00, 0xd0, 0xbc, 0x09, 0x78, 0x08, 0x04, - 0x62, 0x50, 0x08, 0x0c, 0x6a, 0x2a, 0x09, 0x04, 0x62, 0x59, 0x08, 0x04, - 0x62, 0x54, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x04, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x28, 0x70, 0x30, 0x90, 0x80, 0x00, 0x04, 0x20, 0x04, - 0x9b, 0x06, 0x00, 0xee, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa8, 0x74, 0x90, 0x8e, 0x00, 0xff, 0x11, 0x20, - 0x20, 0x01, 0x19, 0x6b, 0x20, 0x5c, 0x00, 0x60, 0xa9, 0x74, 0x91, 0x82, - 0x08, 0x00, 0x16, 0x90, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, - 0x01, 0xd0, 0x08, 0x0c, 0x6b, 0xb1, 0x11, 0xd0, 0x08, 0x0c, 0xb1, 0x16, - 0x05, 0x70, 0x2b, 0x00, 0x60, 0x12, 0x29, 0x00, 0x60, 0x16, 0x60, 0x23, - 0x00, 0x09, 0x60, 0x2b, 0x00, 0x00, 0xa8, 0x74, 0x90, 0x8e, 0x00, 0xff, - 0x11, 0x10, 0x60, 0x2b, 0x80, 0x00, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, - 0xb2, 0x0a, 0x90, 0x06, 0x00, 0xb0, 0x20, 0x01, 0x00, 0x28, 0x00, 0x90, - 0x20, 0x09, 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x04, 0x00, 0x38, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, - 0x90, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x2c, 0x0c, 0xc0, 0x00, 0xb6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xa9, 0x74, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, 0x63, 0x88, - 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, 0x09, 0x04, 0x63, 0x60, - 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7f, 0x01, 0x90, 0xa8, 0x7c, 0xd0, 0xfc, - 0x11, 0x78, 0x08, 0x0c, 0x6c, 0x19, 0x01, 0x60, 0xa9, 0x94, 0x81, 0xff, - 0x01, 0x30, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x30, 0x90, 0x8e, 0x00, 0x05, - 0x01, 0x18, 0x08, 0x0c, 0x6c, 0x11, 0x15, 0x98, 0xa8, 0x7c, 0xd0, 0xfc, - 0x01, 0xe0, 0xa8, 0x94, 0x90, 0x05, 0x01, 0xc8, 0x20, 0x60, 0x00, 0x26, - 0x20, 0x10, 0x08, 0x0c, 0xcf, 0x09, 0x00, 0x2e, 0x11, 0x20, 0x20, 0x01, - 0x00, 0x08, 0x08, 0x04, 0x63, 0x8a, 0x60, 0x20, 0x90, 0x86, 0x00, 0x0a, - 0x01, 0x20, 0x20, 0x01, 0x00, 0x08, 0x08, 0x04, 0x63, 0x8a, 0x60, 0x1a, - 0x60, 0x03, 0x00, 0x08, 0x29, 0x00, 0x60, 0x16, 0x00, 0x58, 0x08, 0x0c, - 0xb1, 0x16, 0x05, 0xe8, 0x2b, 0x00, 0x60, 0x12, 0x29, 0x00, 0x60, 0x16, - 0x60, 0x0b, 0xff, 0xff, 0x60, 0x23, 0x00, 0x0a, 0x20, 0x09, 0x00, 0x03, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x06, 0x04, 0x58, 0x20, 0x01, 0x00, 0x28, - 0x04, 0x38, 0x90, 0x82, 0x00, 0x06, 0x12, 0x90, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x60, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x11, 0x40, 0xb9, 0x00, - 0xd1, 0xfc, 0x09, 0x00, 0x20, 0x01, 0x00, 0x29, 0x20, 0x09, 0x10, 0x00, - 0x00, 0xa8, 0x20, 0x01, 0x00, 0x28, 0x00, 0x90, 0x20, 0x09, 0x18, 0x0c, - 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x50, - 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x28, 0x20, 0x01, - 0x00, 0x29, 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, 0x90, 0x05, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, 0x00, 0x2c, 0x0c, 0xc0, - 0x00, 0xf6, 0x00, 0xb6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa8, 0xe0, - 0x90, 0x05, 0x15, 0x50, 0xa8, 0xdc, 0x90, 0x82, 0x01, 0x01, 0x16, 0x30, - 0xa8, 0xc8, 0x90, 0x05, 0x15, 0x18, 0xa8, 0xc4, 0x90, 0x82, 0x01, 0x01, - 0x12, 0xf8, 0xa9, 0x74, 0x20, 0x79, 0x18, 0x00, 0x91, 0x82, 0x08, 0x00, - 0x12, 0xe8, 0x78, 0x30, 0x90, 0x84, 0x00, 0x03, 0x11, 0x30, 0xaa, 0x98, - 0xab, 0x94, 0xa8, 0x78, 0x90, 0x84, 0x00, 0x07, 0x00, 0xea, 0x79, 0x30, - 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x38, 0xd1, 0x84, - 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x10, 0x20, 0x01, 0x00, 0x29, - 0x90, 0x0e, 0x00, 0x38, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, 0x00, 0x18, - 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x90, 0x06, 0x00, 0x08, 0x90, 0x05, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0xfe, 0x00, 0x05, 0x64, 0x1f, 0x63, 0xda, - 0x63, 0xf1, 0x64, 0x1f, 0x64, 0x1f, 0x64, 0x1f, 0x64, 0x1f, 0x64, 0x1f, - 0x21, 0x00, 0x90, 0x82, 0x00, 0x7e, 0x12, 0x78, 0x08, 0x0c, 0x67, 0x49, - 0x01, 0x48, 0x90, 0x46, 0xb8, 0x10, 0x93, 0x06, 0x19, 0x04, 0x64, 0x27, - 0xb8, 0x14, 0x92, 0x06, 0x15, 0xf0, 0x00, 0x28, 0xbb, 0x12, 0xba, 0x16, - 0x00, 0x10, 0x08, 0x0c, 0x4b, 0x54, 0x01, 0x50, 0x04, 0xb0, 0x08, 0x0c, - 0x67, 0xb4, 0x15, 0x98, 0xb8, 0x10, 0x93, 0x06, 0x15, 0x80, 0xb8, 0x14, - 0x92, 0x06, 0x15, 0x68, 0x08, 0x0c, 0xb1, 0x16, 0x05, 0x30, 0x2b, 0x00, - 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x29, 0x00, 0x60, 0x16, 0x60, 0x0b, - 0xff, 0xff, 0x60, 0x23, 0x00, 0x0a, 0xa8, 0x78, 0x90, 0x86, 0x00, 0x01, - 0x11, 0x70, 0x08, 0x0c, 0x33, 0x15, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, - 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x20, 0x01, 0x02, 0x00, - 0xb8, 0x6e, 0xb8, 0x93, 0x00, 0x02, 0x20, 0x09, 0x00, 0x03, 0x08, 0x0c, - 0xb2, 0x0a, 0x90, 0x06, 0x00, 0x68, 0x20, 0x01, 0x00, 0x01, 0x90, 0x0e, - 0x00, 0x38, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, 0x00, 0x18, 0x20, 0x01, - 0x00, 0x28, 0x90, 0x0e, 0x90, 0x05, 0x00, 0x00, 0x01, 0x2e, 0x00, 0xbe, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa8, 0x94, 0x90, 0xc6, 0x00, 0x15, 0x09, 0x04, - 0x66, 0x12, 0x90, 0xc6, 0x00, 0x56, 0x09, 0x04, 0x66, 0x16, 0x90, 0xc6, - 0x00, 0x66, 0x09, 0x04, 0x66, 0x1a, 0x90, 0xc6, 0x00, 0x67, 0x09, 0x04, - 0x66, 0x1e, 0x90, 0xc6, 0x00, 0x68, 0x09, 0x04, 0x66, 0x22, 0x90, 0xc6, - 0x00, 0x71, 0x09, 0x04, 0x66, 0x26, 0x90, 0xc6, 0x00, 0x74, 0x09, 0x04, - 0x66, 0x2a, 0x90, 0xc6, 0x00, 0x7c, 0x09, 0x04, 0x66, 0x2e, 0x90, 0xc6, - 0x00, 0x7e, 0x09, 0x04, 0x66, 0x32, 0x90, 0xc6, 0x00, 0x37, 0x09, 0x04, - 0x66, 0x36, 0x90, 0x16, 0x20, 0x79, 0x18, 0x00, 0xa9, 0x74, 0x91, 0x86, - 0x00, 0xff, 0x09, 0x04, 0x66, 0x0d, 0x91, 0x82, 0x08, 0x00, 0x1a, 0x04, - 0x66, 0x0d, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x98, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x12, 0x68, 0xa8, 0x94, 0x90, 0xc6, - 0x00, 0x6f, 0x01, 0x48, 0x08, 0x0c, 0xb0, 0x94, 0x19, 0x04, 0x65, 0xf6, - 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, 0x19, 0x04, 0x65, 0xf6, 0xa8, 0x94, - 0x90, 0xc6, 0x00, 0x6f, 0x01, 0x58, 0x90, 0xc6, 0x00, 0x5e, 0x09, 0x04, - 0x65, 0x56, 0x90, 0xc6, 0x00, 0x64, 0x09, 0x04, 0x65, 0x7f, 0x20, 0x08, - 0x08, 0x04, 0x65, 0x18, 0xa9, 0x98, 0xa8, 0xb0, 0x20, 0x40, 0x08, 0x0c, - 0xb0, 0x94, 0x11, 0x20, 0x91, 0x82, 0x00, 0x7f, 0x0a, 0x04, 0x65, 0x18, - 0x91, 0x86, 0x00, 0xff, 0x09, 0x04, 0x65, 0x18, 0x91, 0x82, 0x08, 0x00, - 0x1a, 0x04, 0x65, 0x18, 0xaa, 0xa0, 0xab, 0x9c, 0x78, 0x7c, 0x93, 0x06, - 0x11, 0xa8, 0x78, 0x80, 0x00, 0x96, 0x92, 0x4e, 0x11, 0x28, 0x22, 0x08, - 0x23, 0x10, 0x00, 0x9e, 0x08, 0x04, 0x65, 0x18, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x40, 0x99, 0xcc, 0xff, 0x00, 0x00, 0x9e, 0x11, 0x28, 0x22, 0x08, - 0x23, 0x10, 0x08, 0x04, 0x65, 0x18, 0x00, 0x9e, 0x08, 0x0c, 0x4b, 0x54, - 0x09, 0x04, 0x65, 0x22, 0x90, 0x0e, 0x90, 0x16, 0x90, 0xc6, 0x40, 0x00, - 0x15, 0xe0, 0x00, 0x06, 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, 0xc1, 0x85, - 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0x20, 0xa9, 0x00, 0x04, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, 0x20, 0xa0, - 0xb8, 0xc4, 0x20, 0xe0, 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, - 0x08, 0x0c, 0x0f, 0xd6, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x35, 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0xd6, - 0xa8, 0xc4, 0xab, 0xc8, 0x93, 0x05, 0xab, 0xcc, 0x93, 0x05, 0xab, 0xd0, - 0x93, 0x05, 0xab, 0xd4, 0x93, 0x05, 0xab, 0xd8, 0x93, 0x05, 0xab, 0xdc, - 0x93, 0x05, 0xab, 0xe0, 0x93, 0x05, 0x90, 0x05, 0x05, 0x10, 0x00, 0x0e, - 0x00, 0xc8, 0x90, 0xc6, 0x40, 0x07, 0x11, 0x10, 0x24, 0x08, 0x00, 0xa0, - 0x90, 0xc6, 0x40, 0x08, 0x11, 0x18, 0x27, 0x08, 0x26, 0x10, 0x00, 0x70, - 0x90, 0xc6, 0x40, 0x09, 0x11, 0x08, 0x00, 0x50, 0x90, 0xc6, 0x40, 0x06, - 0x01, 0x38, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, 0x00, 0x0a, 0x00, 0x10, - 0x20, 0x01, 0x40, 0x06, 0xa8, 0x96, 0xa9, 0x9a, 0xaa, 0x9e, 0x20, 0x01, - 0x00, 0x30, 0x90, 0x0e, 0x04, 0x78, 0x00, 0x0e, 0x08, 0x0c, 0xb1, 0x16, - 0x11, 0x30, 0x20, 0x01, 0x40, 0x05, 0x20, 0x09, 0x00, 0x03, 0x90, 0x16, - 0x0c, 0x78, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x29, 0x00, - 0x60, 0x16, 0x60, 0x23, 0x00, 0x01, 0xa8, 0x68, 0xd8, 0x8c, 0x01, 0x08, - 0xc0, 0xf5, 0xa8, 0x6a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x33, 0x15, 0x01, 0x2e, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x20, 0x09, 0x00, 0x02, 0x08, 0x0c, - 0xb2, 0x0a, 0xa8, 0xb0, 0xd0, 0x94, 0x01, 0x18, 0xb8, 0xd4, 0xc0, 0x8d, - 0xb8, 0xd6, 0x90, 0x06, 0x90, 0x05, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x18, 0x20, 0x09, - 0x00, 0x07, 0x00, 0xf8, 0xa9, 0x98, 0xae, 0xb0, 0x08, 0x0c, 0x67, 0xb4, - 0x19, 0x04, 0x65, 0x13, 0x91, 0x86, 0x00, 0x7f, 0x01, 0x30, 0x08, 0x0c, - 0x6c, 0x11, 0x01, 0x18, 0x20, 0x09, 0x00, 0x09, 0x00, 0x80, 0x00, 0x96, - 0x08, 0x0c, 0x10, 0x59, 0x11, 0x20, 0x00, 0x9e, 0x20, 0x09, 0x00, 0x02, - 0x00, 0x40, 0x29, 0x00, 0x00, 0x9e, 0xa8, 0x06, 0x08, 0x0c, 0xd1, 0x09, - 0x19, 0xb0, 0x20, 0x09, 0x00, 0x03, 0x20, 0x01, 0x40, 0x05, 0x08, 0x04, - 0x65, 0x1a, 0xa9, 0x98, 0xae, 0xb0, 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x04, - 0x65, 0x13, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x59, 0x11, 0x28, 0x00, 0x9e, - 0x20, 0x09, 0x00, 0x02, 0x08, 0x04, 0x65, 0xd3, 0x29, 0x00, 0x00, 0x9e, - 0xa8, 0x06, 0x00, 0x96, 0x20, 0x48, 0x20, 0xa9, 0x00, 0x2b, 0xb8, 0xc4, - 0x20, 0xe0, 0xb8, 0xc8, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x08, - 0x90, 0x80, 0x00, 0x06, 0x20, 0xa0, 0xbb, 0xc8, 0x93, 0x98, 0x00, 0x06, - 0x23, 0x98, 0x08, 0x0c, 0x0f, 0xd6, 0x00, 0x9e, 0xa8, 0x7b, 0x00, 0x00, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, 0xd6, 0x84, 0x11, 0x68, - 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xb4, 0x11, 0x18, 0xa8, 0x9b, 0x00, 0x0b, - 0x00, 0xe0, 0xb8, 0x00, 0xd0, 0x8c, 0x01, 0x18, 0xa8, 0x9b, 0x00, 0x0c, - 0x00, 0xb0, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x18, 0xa8, 0x9b, 0x00, 0x09, - 0x00, 0x80, 0x08, 0x0c, 0x58, 0x54, 0x01, 0x18, 0xa8, 0x9b, 0x00, 0x07, - 0x00, 0x50, 0x08, 0x0c, 0xd0, 0xec, 0x19, 0x04, 0x65, 0x4f, 0x20, 0x09, - 0x00, 0x03, 0x20, 0x01, 0x40, 0x05, 0x08, 0x04, 0x65, 0x1a, 0xa8, 0x7b, - 0x00, 0x30, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x04, 0x80, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x02, 0x20, 0x09, 0x00, 0x2b, 0xaa, 0xa0, 0xab, 0x9c, 0xac, 0xa8, - 0xad, 0xa4, 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0xa8, 0x08, 0x0c, - 0xb6, 0x91, 0x19, 0x04, 0x65, 0x4f, 0x20, 0x09, 0x00, 0x02, 0x08, 0xe8, - 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x08, 0x04, 0x65, 0x50, 0x20, 0x09, - 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, - 0x00, 0x38, 0xd1, 0x84, 0x01, 0x18, 0x20, 0x01, 0x00, 0x04, 0x00, 0x10, - 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x08, 0x04, 0x65, 0x50, 0x20, 0x01, - 0x00, 0x29, 0x90, 0x0e, 0x08, 0x04, 0x65, 0x50, 0x08, 0x0c, 0x38, 0xc0, - 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x55, 0x5d, 0x08, 0x04, 0x65, 0x51, - 0x08, 0x0c, 0x46, 0xd5, 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x47, 0x4e, - 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x47, 0xaa, 0x08, 0x04, 0x65, 0x51, - 0x08, 0x0c, 0x4c, 0x17, 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x4e, 0xdf, - 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x51, 0xc4, 0x08, 0x04, 0x65, 0x51, - 0x08, 0x0c, 0x53, 0xbd, 0x08, 0x04, 0x65, 0x51, 0x08, 0x0c, 0x3a, 0xfe, - 0x08, 0x04, 0x65, 0x51, 0x00, 0xb6, 0xa9, 0x74, 0xae, 0x78, 0x96, 0x84, - 0x3f, 0xff, 0x90, 0x82, 0x40, 0x00, 0x16, 0x08, 0x91, 0x82, 0x08, 0x00, - 0x12, 0x58, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, 0x01, 0x30, - 0x08, 0x0c, 0x6c, 0x11, 0x11, 0x38, 0x00, 0xd9, 0x90, 0x06, 0x00, 0xb0, - 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x00, 0x90, 0x90, 0x82, 0x00, 0x06, - 0x12, 0x40, 0xb9, 0x00, 0xd1, 0xfc, 0x0d, 0x98, 0x20, 0x01, 0x00, 0x29, - 0x20, 0x09, 0x10, 0x00, 0x00, 0x38, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, - 0x00, 0x18, 0x20, 0x01, 0x00, 0x29, 0x90, 0x0e, 0x90, 0x05, 0x00, 0xbe, - 0x00, 0x05, 0xa8, 0x77, 0x00, 0x00, 0xb8, 0xd0, 0x90, 0x05, 0x19, 0x04, - 0x66, 0xda, 0xb8, 0x88, 0x90, 0x05, 0x19, 0x04, 0x66, 0xda, 0xb8, 0x38, - 0xb9, 0x3c, 0x91, 0x02, 0x1a, 0x04, 0x66, 0xda, 0x2b, 0x10, 0x08, 0x0c, - 0xb1, 0x43, 0x09, 0x04, 0x66, 0xd6, 0x81, 0x08, 0xb9, 0x3e, 0x62, 0x12, - 0x29, 0x00, 0x60, 0x16, 0x60, 0x23, 0x00, 0x03, 0x60, 0x0b, 0xff, 0xff, - 0x60, 0x07, 0x00, 0x40, 0xa8, 0x78, 0x60, 0x5e, 0xa8, 0x80, 0x60, 0x66, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x7c, 0xd0, 0xac, 0x05, 0xb8, 0xc0, 0xdd, - 0xa8, 0x7e, 0xa8, 0x88, 0x80, 0x01, 0x15, 0x60, 0x20, 0x11, 0x18, 0x0d, - 0x22, 0x14, 0xd2, 0x8c, 0x19, 0x0c, 0x6c, 0xd6, 0xa8, 0x16, 0xa8, 0x64, - 0x90, 0x94, 0x00, 0xf7, 0x92, 0x96, 0x00, 0x11, 0x11, 0xf8, 0x90, 0x84, - 0x00, 0xff, 0xc0, 0xbd, 0x60, 0x1e, 0xa8, 0xac, 0xaa, 0xb0, 0xa8, 0x36, - 0xaa, 0x3a, 0x20, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x1d, 0xf0, 0x20, 0x01, - 0x80, 0x04, 0x60, 0x03, 0x00, 0x04, 0x60, 0x46, 0x00, 0xf6, 0x20, 0x79, - 0x03, 0x80, 0x78, 0x18, 0xd0, 0xbc, 0x1d, 0xe8, 0x78, 0x33, 0x00, 0x10, - 0x2c, 0x00, 0x78, 0x36, 0x78, 0x1b, 0x80, 0x80, 0x00, 0xfe, 0x00, 0x05, - 0x08, 0x0c, 0x17, 0xad, 0x60, 0x1c, 0xc0, 0xbd, 0x60, 0x1e, 0x0c, 0x38, - 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x19, 0x0c, 0x6c, 0xe0, - 0xd0, 0xb4, 0x19, 0x0c, 0x1c, 0x9c, 0x20, 0x01, 0x80, 0x04, 0x60, 0x03, - 0x00, 0x02, 0x08, 0xe8, 0x81, 0xff, 0x11, 0x10, 0xb8, 0x8b, 0x00, 0x01, - 0x29, 0x08, 0xb8, 0xcc, 0xb9, 0xce, 0x90, 0x05, 0x11, 0x10, 0xb9, 0xd2, - 0x00, 0x20, 0x00, 0x96, 0x20, 0x48, 0xa9, 0x02, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0xb6, 0x01, 0x26, 0x00, 0xc6, 0x00, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x62, 0x10, 0x22, 0x58, 0xba, 0x00, 0x90, 0x05, 0x01, 0x10, 0xc2, 0x85, - 0x00, 0x08, 0xc2, 0x84, 0xba, 0x02, 0x00, 0x2e, 0x00, 0xce, 0x01, 0x2e, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, - 0x80, 0x00, 0x62, 0x10, 0x22, 0x58, 0xba, 0x04, 0x00, 0x06, 0x90, 0x86, - 0x00, 0x06, 0x11, 0x70, 0xb8, 0x9c, 0xd0, 0xac, 0x01, 0x58, 0x08, 0x0c, - 0x6c, 0x0d, 0x01, 0x40, 0x92, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, - 0x00, 0x07, 0x11, 0x10, 0x20, 0x11, 0x06, 0x00, 0x00, 0x0e, 0x92, 0x94, - 0xff, 0x00, 0x92, 0x15, 0xba, 0x06, 0x00, 0x06, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x20, 0xba, 0x90, 0x82, 0xff, 0x09, 0x0c, 0x0d, 0x85, 0x00, 0x0e, - 0x00, 0xce, 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x26, - 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, 0x62, 0x10, 0x22, 0x58, 0xba, 0x04, - 0x00, 0x06, 0x90, 0x86, 0x00, 0x06, 0x11, 0x68, 0xb8, 0x9c, 0xd0, 0xa4, - 0x01, 0x50, 0x08, 0x0c, 0x6c, 0x09, 0x11, 0x38, 0x92, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x07, 0x11, 0x10, 0x20, 0x11, 0x00, 0x06, 0x00, 0x0e, - 0x92, 0x94, 0x00, 0xff, 0x80, 0x07, 0x92, 0x15, 0xba, 0x06, 0x00, 0xce, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x05, 0x91, 0x82, 0x08, 0x00, 0x02, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x26, 0x91, 0x90, - 0x10, 0x00, 0x22, 0x04, 0x90, 0x5d, 0x11, 0x88, 0x00, 0x96, 0x08, 0x0c, - 0x10, 0x59, 0x29, 0x58, 0x00, 0x9e, 0x01, 0x68, 0x2b, 0x00, 0x20, 0x12, - 0xb8, 0x5c, 0xb8, 0xca, 0xb8, 0x60, 0xb8, 0xc6, 0x90, 0x06, 0xb8, 0xa6, - 0xb8, 0xae, 0x08, 0x0c, 0x61, 0xb7, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x26, 0x91, 0x82, 0x08, 0x00, - 0x02, 0x18, 0x90, 0x85, 0x00, 0x01, 0x04, 0xa8, 0x00, 0xd6, 0x91, 0x90, - 0x10, 0x00, 0x22, 0x04, 0x90, 0x5d, 0x05, 0x68, 0x20, 0x13, 0x00, 0x00, - 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x10, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0xd6, - 0x00, 0xc6, 0xb8, 0xbc, 0x20, 0x60, 0x8c, 0xff, 0x01, 0x68, 0x60, 0x0c, - 0x00, 0x06, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x10, - 0x08, 0x0c, 0x10, 0x0b, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, 0x0c, 0x88, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xc6, 0xb8, 0xac, 0x90, 0x65, 0x01, 0x28, - 0x62, 0x1c, 0xd2, 0xc4, 0x01, 0x10, 0x08, 0x0c, 0x92, 0x8d, 0x00, 0xce, - 0x2b, 0x48, 0xb8, 0xc8, 0xb8, 0x5e, 0xb8, 0xc4, 0xb8, 0x62, 0x08, 0x0c, - 0x10, 0x9b, 0x00, 0xde, 0x90, 0x06, 0x00, 0x2e, 0x01, 0x2e, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0x16, 0x91, 0x82, 0x08, 0x00, 0x02, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x30, 0x91, 0x88, 0x10, 0x00, 0x21, 0x04, - 0x90, 0x5d, 0x0d, 0xc0, 0x90, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, - 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, 0x90, 0x06, 0xb8, 0x0a, 0xb8, 0x0e, - 0xb8, 0x00, 0xc0, 0x8c, 0xb8, 0x02, 0x08, 0x0c, 0x77, 0x9e, 0x15, 0x10, - 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, 0x01, 0x20, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0xd8, 0x00, 0x78, 0x70, 0x40, 0xd0, 0xe4, 0x01, 0xb8, 0x00, 0xc6, - 0x20, 0x61, 0x19, 0x82, 0x70, 0x48, 0x20, 0x62, 0x70, 0x4c, 0x60, 0x06, - 0x70, 0x50, 0x60, 0x0a, 0x70, 0x54, 0x60, 0x0e, 0x00, 0xce, 0x70, 0x3c, - 0x20, 0x69, 0x01, 0x40, 0x90, 0x05, 0x11, 0x10, 0x20, 0x01, 0x00, 0x01, - 0x68, 0x86, 0x20, 0x69, 0x18, 0x00, 0x68, 0xb6, 0x70, 0x40, 0xb8, 0x5e, - 0x70, 0x48, 0xb8, 0x62, 0x70, 0x4c, 0xb8, 0x66, 0x20, 0xe1, 0x00, 0x00, - 0x20, 0x99, 0x02, 0x76, 0xb8, 0xc4, 0x20, 0xe8, 0xb8, 0xc8, 0x90, 0x88, - 0x00, 0x0a, 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x03, 0x20, 0x99, - 0x02, 0x7a, 0x90, 0x88, 0x00, 0x06, 0x21, 0xa0, 0x20, 0xa9, 0x00, 0x04, - 0x40, 0x03, 0x20, 0x69, 0x02, 0x00, 0x68, 0x17, 0x00, 0x01, 0x70, 0x40, - 0xb8, 0x6a, 0x71, 0x44, 0xb9, 0x6e, 0x70, 0x48, 0xb8, 0x72, 0x70, 0x50, - 0xb8, 0x76, 0x20, 0x69, 0x02, 0x00, 0x68, 0x17, 0x00, 0x00, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x11, 0x10, 0x71, 0x44, 0xb9, 0x6e, 0x91, 0x82, - 0x02, 0x11, 0x12, 0x18, 0x20, 0x09, 0x00, 0x08, 0x04, 0x00, 0x91, 0x82, - 0x02, 0x59, 0x12, 0x18, 0x20, 0x09, 0x00, 0x07, 0x00, 0xd0, 0x91, 0x82, - 0x02, 0xc1, 0x12, 0x18, 0x20, 0x09, 0x00, 0x06, 0x00, 0xa0, 0x91, 0x82, - 0x03, 0x49, 0x12, 0x18, 0x20, 0x09, 0x00, 0x05, 0x00, 0x70, 0x91, 0x82, - 0x04, 0x21, 0x12, 0x18, 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0x91, 0x82, - 0x05, 0x81, 0x12, 0x18, 0x20, 0x09, 0x00, 0x03, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x02, 0xb9, 0x92, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, - 0x70, 0x34, 0xb8, 0x96, 0x70, 0x3c, 0xb8, 0x9a, 0x70, 0x54, 0xb8, 0x9e, - 0x00, 0x36, 0xbb, 0xd4, 0xc3, 0x84, 0xba, 0x00, 0x20, 0x09, 0x18, 0x67, - 0x21, 0x0c, 0xd0, 0xbc, 0x01, 0x20, 0xd1, 0xec, 0x01, 0x10, 0xc2, 0xad, - 0x00, 0x08, 0xc2, 0xac, 0xd0, 0xc4, 0x01, 0x48, 0xd1, 0xe4, 0x01, 0x38, - 0xc2, 0xbd, 0xd0, 0xcc, 0x01, 0x28, 0xd3, 0x8c, 0x11, 0x08, 0xc3, 0x85, - 0x00, 0x08, 0xc2, 0xbc, 0xba, 0x02, 0xbb, 0xd6, 0x00, 0x3e, 0x00, 0xee, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xb8, 0xa4, 0x90, 0x4d, 0x05, 0x78, 0xa9, 0x00, 0x81, 0xff, - 0x15, 0xc0, 0xaa, 0x04, 0x92, 0x82, 0x00, 0x10, 0x16, 0xc8, 0x01, 0x36, - 0x01, 0x46, 0x01, 0xc6, 0x01, 0xd6, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0x8c, 0x00, 0x3f, 0x21, 0xe0, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x04, 0x20, 0x98, 0x20, 0x09, 0x00, 0x10, 0x20, 0xa9, 0x00, 0x01, - 0x40, 0x02, 0x90, 0x86, 0xff, 0xff, 0x01, 0x20, 0x81, 0x09, 0x1d, 0xd0, - 0x08, 0x0c, 0x0d, 0x85, 0x3c, 0x00, 0x20, 0xe8, 0x33, 0x00, 0x80, 0x01, - 0x20, 0xa0, 0x46, 0x04, 0x82, 0x10, 0xaa, 0x06, 0x01, 0xde, 0x01, 0xce, - 0x01, 0x4e, 0x01, 0x3e, 0x00, 0x60, 0x08, 0x0c, 0x10, 0x59, 0x01, 0x70, - 0x29, 0x00, 0xb8, 0xa6, 0xa8, 0x03, 0x00, 0x00, 0x08, 0x0c, 0x6a, 0x4a, - 0xa8, 0x07, 0x00, 0x01, 0xae, 0x12, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x96, 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x00, - 0x90, 0x05, 0x11, 0x50, 0x08, 0x0c, 0x6a, 0x59, 0x11, 0x58, 0xa8, 0x04, - 0x90, 0x8a, 0x00, 0x02, 0x02, 0x18, 0x80, 0x01, 0xa8, 0x06, 0x00, 0x20, - 0x08, 0x0c, 0x10, 0x8b, 0xb8, 0xa7, 0x00, 0x00, 0x00, 0x9e, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0x96, 0x00, 0xc6, 0xb8, 0x88, 0x90, 0x05, 0x19, 0x04, - 0x69, 0x3f, 0xb8, 0xd0, 0x90, 0x4d, 0x09, 0x04, 0x69, 0x3f, 0x20, 0x01, - 0x03, 0x82, 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x01, - 0x19, 0x04, 0x69, 0x3d, 0x08, 0x0c, 0xb1, 0x43, 0x09, 0x04, 0x69, 0x3d, - 0x82, 0x10, 0xba, 0x3e, 0xa8, 0x00, 0xb8, 0xd2, 0x90, 0x05, 0x11, 0x08, - 0xb8, 0xce, 0x2b, 0x00, 0x60, 0x12, 0x29, 0x00, 0x60, 0x16, 0x60, 0x23, - 0x00, 0x03, 0x60, 0x0b, 0xff, 0xff, 0x60, 0x07, 0x00, 0x40, 0xa8, 0x78, - 0x60, 0x5e, 0xa8, 0x80, 0x90, 0x84, 0x00, 0xff, 0x60, 0x66, 0xa8, 0x83, - 0x00, 0x00, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0xc8, 0xc0, 0xdd, 0xa8, 0x7e, - 0xa8, 0x88, 0x80, 0x01, 0x15, 0x58, 0xa8, 0x16, 0xa8, 0x64, 0x90, 0x94, - 0x00, 0xf7, 0x92, 0x96, 0x00, 0x11, 0x15, 0x20, 0x90, 0x84, 0x00, 0xff, - 0xc0, 0xbd, 0x60, 0x1e, 0xa8, 0xac, 0xaa, 0xb0, 0xa8, 0x36, 0xaa, 0x3a, - 0x20, 0x01, 0x80, 0x04, 0x60, 0x03, 0x00, 0x04, 0x00, 0x30, 0x08, 0x0c, - 0x1c, 0x9c, 0x20, 0x01, 0x80, 0x04, 0x60, 0x03, 0x00, 0x02, 0x60, 0x46, - 0x20, 0x01, 0x00, 0x10, 0x2c, 0x08, 0x08, 0x0c, 0xac, 0xed, 0xb8, 0x38, - 0xba, 0x3c, 0x92, 0x02, 0x0a, 0x04, 0x68, 0xe5, 0x00, 0x10, 0xb8, 0x8b, - 0x00, 0x01, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x17, 0xad, - 0x60, 0x1c, 0xc0, 0xbd, 0x60, 0x1e, 0x08, 0xf0, 0x00, 0xb6, 0x00, 0x96, - 0x00, 0x16, 0x20, 0xa9, 0x08, 0x00, 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, - 0x67, 0xb4, 0x11, 0x58, 0xb8, 0xd0, 0x90, 0x4d, 0x01, 0x40, 0x3e, 0x00, - 0x90, 0x86, 0x00, 0x02, 0x11, 0x18, 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0x08, - 0x00, 0x41, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x69, 0x4e, 0x00, 0x1e, - 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x96, 0x00, 0x16, 0xb8, 0xd0, - 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x00, 0xb8, 0xd2, 0x90, 0x05, 0x11, 0x08, - 0xb8, 0xce, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, - 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0xd2, 0x20, 0x08, 0x0c, 0x70, 0x12, - 0x0c, 0x60, 0x00, 0x1e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x86, 0x90, 0x46, - 0xb8, 0xd0, 0x90, 0x4d, 0x01, 0xb0, 0xa8, 0x6c, 0x94, 0x06, 0x11, 0x18, - 0xa8, 0x70, 0x95, 0x06, 0x01, 0x28, 0x29, 0x40, 0xa8, 0x00, 0x90, 0x4d, - 0x01, 0x60, 0x0c, 0xa8, 0xa8, 0x00, 0x88, 0xff, 0x11, 0x28, 0xb8, 0xd2, - 0x90, 0x05, 0x11, 0x18, 0xb8, 0xce, 0x00, 0x08, 0xa0, 0x02, 0xa8, 0x03, - 0x00, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x90, 0x1e, 0x00, 0x10, 0x20, 0x19, - 0x00, 0x01, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x00, 0x96, - 0x00, 0xc6, 0x00, 0x86, 0x00, 0x26, 0x20, 0x71, 0x19, 0xe8, 0x90, 0x46, - 0x70, 0x28, 0x90, 0x65, 0x01, 0xe8, 0x60, 0x14, 0x20, 0x68, 0x83, 0xff, - 0x01, 0x20, 0x60, 0x5c, 0x96, 0x06, 0x01, 0x58, 0x00, 0x30, 0xa8, 0x6c, - 0x94, 0x06, 0x11, 0x18, 0xa8, 0x70, 0x95, 0x06, 0x01, 0x20, 0x2c, 0x40, - 0x60, 0x0c, 0x20, 0x60, 0x0c, 0x60, 0x60, 0x0c, 0x00, 0x06, 0x00, 0x66, - 0x28, 0x30, 0x08, 0x0c, 0xa4, 0x20, 0x00, 0x6e, 0x00, 0x0e, 0x83, 0xff, - 0x05, 0x08, 0x0c, 0x08, 0x90, 0x46, 0xb8, 0xd0, 0x90, 0x4d, 0x01, 0xe0, - 0x83, 0xff, 0x01, 0x20, 0xa8, 0x78, 0x96, 0x06, 0x01, 0x58, 0x00, 0x30, - 0xa8, 0x6c, 0x94, 0x06, 0x11, 0x18, 0xa8, 0x70, 0x95, 0x06, 0x01, 0x20, - 0x29, 0x40, 0xa8, 0x00, 0x20, 0x48, 0x0c, 0x70, 0xb8, 0xd0, 0xaa, 0x00, - 0x00, 0x26, 0x99, 0x06, 0x11, 0x10, 0xba, 0xd2, 0x00, 0x08, 0xa2, 0x02, - 0x00, 0x0e, 0x83, 0xff, 0x01, 0x08, 0x0c, 0x10, 0x00, 0x2e, 0x00, 0x8e, - 0x00, 0xce, 0x00, 0x9e, 0x00, 0xee, 0x01, 0x2e, 0x00, 0x05, 0x90, 0x16, - 0x04, 0x89, 0x11, 0x10, 0x20, 0x11, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x6a, 0xae, 0x01, 0x28, 0x08, 0x0c, 0xcf, 0xdc, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x6a, 0xae, 0x01, 0x28, 0x08, 0x0c, - 0xcf, 0x7d, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x6a, 0xae, 0x01, 0x28, 0x08, 0x0c, 0xcf, 0xd9, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x6a, 0xae, 0x01, 0x28, 0x08, 0x0c, - 0xcf, 0x9c, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0x6a, 0xae, 0x01, 0x28, 0x08, 0x0c, 0xd0, 0x1f, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0xb8, 0xa4, 0x90, 0x0d, 0x11, 0x18, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x01, 0x36, 0x01, 0xc6, 0xa8, 0x00, 0x90, 0x05, - 0x11, 0xb8, 0x89, 0x0e, 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, - 0x20, 0xe0, 0x91, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x04, 0x20, 0x98, - 0x20, 0xa9, 0x00, 0x01, 0x20, 0x09, 0x00, 0x10, 0x40, 0x02, 0x96, 0x06, - 0x01, 0x28, 0x81, 0x09, 0x1d, 0xd8, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, - 0x90, 0x06, 0x01, 0xce, 0x01, 0x3e, 0x00, 0x05, 0x01, 0x46, 0x01, 0xd6, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x04, 0x20, 0xa0, - 0x20, 0xa9, 0x00, 0x10, 0x20, 0x09, 0xff, 0xff, 0x41, 0x04, 0x01, 0xde, - 0x01, 0x4e, 0x01, 0x36, 0x01, 0xc6, 0xa8, 0x00, 0x90, 0x05, 0x11, 0xb8, - 0x89, 0x0e, 0x81, 0x0e, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x3f, 0x20, 0xe0, - 0x91, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x04, 0x20, 0x98, 0x20, 0xa9, - 0x00, 0x01, 0x20, 0x09, 0x00, 0x10, 0x40, 0x02, 0x96, 0x06, 0x01, 0x28, - 0x81, 0x09, 0x1d, 0xd8, 0x90, 0x85, 0x00, 0x01, 0x00, 0x68, 0x01, 0x46, - 0x01, 0xd6, 0x33, 0x00, 0x80, 0x01, 0x20, 0xa0, 0x3c, 0x00, 0x20, 0xe8, - 0x20, 0x01, 0xff, 0xff, 0x40, 0x04, 0x01, 0xde, 0x01, 0x4e, 0x90, 0x06, - 0x01, 0xce, 0x01, 0x3e, 0x00, 0x05, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xb8, 0xa4, 0x90, 0x4d, 0x11, 0x28, 0x08, 0x0c, 0x10, 0x59, - 0x01, 0x68, 0x29, 0x00, 0xb8, 0xa6, 0x08, 0x0c, 0x6a, 0x4a, 0xa8, 0x03, - 0x00, 0x01, 0xa8, 0x07, 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0x96, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xb8, 0xa4, 0x90, 0x4d, 0x01, 0x30, 0xb8, 0xa7, - 0x00, 0x00, 0x08, 0x0c, 0x10, 0x8b, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0xb8, 0x9c, 0xd0, 0xa4, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0xf6, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0xb0, 0x71, 0xc4, 0x81, 0xff, - 0x11, 0x98, 0x71, 0xdc, 0xd1, 0x9c, 0x01, 0x80, 0x20, 0x01, 0x00, 0x7e, - 0x90, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x48, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0xb8, 0x00, - 0xc0, 0xed, 0xb8, 0x02, 0x20, 0x79, 0x18, 0x47, 0x78, 0x04, 0xd0, 0xa4, - 0x01, 0xd0, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, - 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x68, 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x90, 0x96, 0x00, 0x04, 0x01, 0x18, 0x90, 0x86, 0x00, 0x06, - 0x11, 0x18, 0xb8, 0x00, 0xc0, 0xed, 0xb8, 0x02, 0x00, 0x1e, 0x81, 0x08, - 0x1f, 0x04, 0x6a, 0xd5, 0x01, 0x5e, 0x08, 0x0c, 0x6b, 0xcf, 0x01, 0x20, - 0x20, 0x01, 0x19, 0x85, 0x20, 0x0c, 0x00, 0x98, 0x20, 0x79, 0x18, 0x47, - 0x78, 0x04, 0xd0, 0xa4, 0x01, 0x90, 0x20, 0x09, 0x07, 0xd0, 0x20, 0x01, - 0x18, 0x2c, 0x20, 0x04, 0x90, 0x05, 0x01, 0x38, 0x20, 0x01, 0x18, 0x67, - 0x20, 0x04, 0xd0, 0xe4, 0x01, 0x10, 0x20, 0x09, 0x5d, 0xc0, 0x20, 0x11, - 0x6b, 0x0c, 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, - 0x00, 0xb6, 0x20, 0x11, 0x6b, 0x0c, 0x08, 0x0c, 0x89, 0x93, 0x08, 0x0c, - 0x6b, 0xcf, 0x01, 0xd8, 0x20, 0x01, 0x10, 0x7e, 0x20, 0x04, 0x20, 0x58, - 0xb9, 0x00, 0xc1, 0xec, 0xb9, 0x02, 0x08, 0x0c, 0x6c, 0x0d, 0x01, 0x30, - 0x20, 0x09, 0x07, 0xd0, 0x20, 0x11, 0x6b, 0x0c, 0x08, 0x0c, 0x8a, 0x5d, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x90, 0x06, 0x70, 0x7e, 0x70, 0x60, - 0x70, 0x82, 0x08, 0x0c, 0x30, 0xbf, 0x00, 0xee, 0x04, 0xd0, 0x01, 0x56, - 0x00, 0xc6, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, 0x08, 0x0c, - 0x67, 0xb4, 0x15, 0x58, 0xb8, 0x00, 0xd0, 0xec, 0x05, 0x40, 0x00, 0x46, - 0xba, 0xa0, 0x22, 0x20, 0x90, 0x06, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, - 0xea, 0x8d, 0xb8, 0x00, 0xc0, 0xe5, 0xc0, 0xec, 0xb8, 0x02, 0x08, 0x0c, - 0x6c, 0x09, 0x20, 0x01, 0x07, 0x07, 0x11, 0x28, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x85, 0x07, 0x00, 0xb8, 0x06, 0x08, 0x0c, 0xac, 0xfc, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, - 0x08, 0x0c, 0x96, 0x6d, 0x90, 0x0e, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, - 0x00, 0x4e, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, - 0x6b, 0x34, 0x00, 0xce, 0x01, 0x5e, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xc0, 0xec, 0xb8, 0x02, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x72, - 0x09, 0x0c, 0x0d, 0x85, 0x29, 0x58, 0x00, 0x9e, 0x20, 0x01, 0x19, 0x6b, - 0x2b, 0x02, 0x8b, 0x07, 0x80, 0x06, 0x80, 0x06, 0x90, 0x8c, 0x00, 0x3f, - 0xb9, 0xc6, 0x90, 0x8c, 0xff, 0xc0, 0xb9, 0xca, 0xb8, 0xaf, 0x00, 0x00, - 0x20, 0x09, 0x00, 0xff, 0x08, 0x0c, 0x61, 0xb7, 0xb8, 0x07, 0x00, 0x06, - 0xb8, 0x13, 0x00, 0xff, 0xb8, 0x17, 0xff, 0xff, 0xb8, 0x6f, 0x02, 0x00, - 0xb8, 0x6c, 0xb8, 0x93, 0x00, 0x02, 0xb8, 0xbb, 0x05, 0x20, 0xb8, 0xa3, - 0x00, 0xff, 0xb8, 0xaf, 0x00, 0x00, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, - 0x78, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xac, - 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, 0x90, 0x5d, 0x01, 0x08, 0xb8, 0x00, - 0x00, 0xbe, 0xd0, 0xbc, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0xb8, 0x04, 0x90, 0x8c, 0x00, 0xff, 0x91, 0x96, 0x00, 0x06, 0x01, 0x88, - 0x91, 0x96, 0x00, 0x04, 0x01, 0x70, 0x91, 0x96, 0x00, 0x05, 0x01, 0x58, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x96, 0x00, 0x06, 0x01, 0x28, - 0x91, 0x96, 0x00, 0x04, 0x01, 0x10, 0x91, 0x96, 0x00, 0x05, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x20, 0x01, - 0x10, 0x7e, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0x00, 0xd0, 0xec, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, 0x00, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x06, 0xba, 0xa0, 0x92, 0x90, 0x10, 0x00, 0x22, 0x04, - 0x9b, 0x06, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0x0e, 0xba, 0x00, 0x90, 0x05, - 0x01, 0x10, 0xc2, 0xfd, 0x00, 0x08, 0xc2, 0xfc, 0xba, 0x02, 0x00, 0x2e, - 0x01, 0x2e, 0x00, 0x05, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xd0, 0xcc, - 0x01, 0x38, 0x20, 0x01, 0x19, 0x83, 0x20, 0x0c, 0x20, 0x11, 0x6b, 0xff, - 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0x05, 0x20, 0x11, 0x6b, 0xff, 0x08, 0x0c, - 0x89, 0x93, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xc0, 0xcc, 0x20, 0x12, - 0x00, 0x05, 0x08, 0x0c, 0x58, 0x40, 0xd0, 0xac, 0x00, 0x05, 0x08, 0x0c, - 0x58, 0x40, 0xd0, 0xa4, 0x00, 0x05, 0x00, 0x16, 0xb9, 0x04, 0x91, 0x84, - 0x00, 0xff, 0x90, 0x8e, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, - 0xb9, 0x04, 0x91, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x8e, 0x00, 0x06, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, 0x08, 0x0c, 0xd6, 0x45, - 0x01, 0x58, 0x70, 0xdc, 0x90, 0x84, 0x00, 0x28, 0x01, 0x38, 0x20, 0x01, - 0x10, 0x7f, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x10, 0xb8, 0xd4, 0xd0, 0x94, - 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x36, - 0x00, 0x46, 0x00, 0x76, 0x00, 0xb6, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, - 0x97, 0x80, 0x34, 0x8e, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, - 0x90, 0x06, 0x20, 0x18, 0x20, 0x08, 0x92, 0x84, 0x80, 0x00, 0x01, 0x10, - 0x20, 0x19, 0x00, 0x01, 0x92, 0x94, 0x7f, 0xff, 0x21, 0x00, 0x97, 0x06, - 0x01, 0x90, 0x91, 0xa0, 0x10, 0x00, 0x24, 0x04, 0x90, 0x5d, 0x01, 0x68, - 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x11, 0x38, - 0x83, 0xff, 0x01, 0x18, 0xb8, 0x9c, 0xd0, 0xa4, 0x01, 0x10, 0x82, 0x11, - 0x01, 0x58, 0x81, 0x08, 0x83, 0xff, 0x01, 0x20, 0x91, 0x82, 0x08, 0x00, - 0x0e, 0x28, 0x00, 0x68, 0x91, 0x82, 0x00, 0x7e, 0x0e, 0x08, 0x00, 0x48, - 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x1e, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x1e, 0x90, 0x06, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x46, - 0x00, 0x56, 0x00, 0x76, 0x00, 0xb6, 0x21, 0x00, 0x90, 0x84, 0x7f, 0xff, - 0x90, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, 0x01, 0x30, 0xb8, 0x04, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x05, 0x50, 0x91, 0x84, - 0x80, 0x00, 0x05, 0x80, 0x20, 0x01, 0x18, 0x18, 0x20, 0x3c, 0x97, 0x80, - 0x34, 0x8e, 0x20, 0x3d, 0x97, 0xbc, 0xff, 0x00, 0x87, 0x3f, 0x90, 0x06, - 0x20, 0x20, 0x24, 0x00, 0x97, 0x06, 0x01, 0xa0, 0x94, 0xa8, 0x10, 0x00, - 0x25, 0x04, 0x90, 0x5d, 0x01, 0x78, 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x06, 0x11, 0x48, 0xb8, 0x9c, 0xd0, 0xa4, 0x01, 0x30, - 0xb8, 0x14, 0x92, 0x06, 0x11, 0x18, 0xb8, 0x10, 0x93, 0x06, 0x01, 0x28, - 0x84, 0x20, 0x94, 0x82, 0x08, 0x00, 0x0e, 0x28, 0x00, 0x48, 0x91, 0x8c, - 0x7f, 0xff, 0x00, 0xbe, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x91, 0x8c, 0x7f, 0xff, 0x00, 0xbe, 0x00, 0x7e, - 0x00, 0x5e, 0x00, 0x4e, 0x90, 0x06, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, - 0x00, 0xa0, 0x80, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x1d, 0xd8, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0xf8, 0x80, 0x01, - 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, 0x1d, 0xd8, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x06, 0x20, 0x01, 0x00, 0xe8, 0x80, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0xa0, 0x01, 0x1d, 0xd8, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x71, 0x19, 0x10, - 0x70, 0x03, 0x00, 0x01, 0x70, 0x07, 0x00, 0x00, 0x90, 0x06, 0x70, 0x12, - 0x70, 0x16, 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x0a, 0x70, 0x46, 0x20, 0x01, - 0x19, 0x22, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x16, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0x48, 0x90, 0x0e, 0x71, 0x0a, 0x08, 0x0c, 0x58, 0x40, - 0xd0, 0xfc, 0x11, 0x40, 0x08, 0x0c, 0x58, 0x40, 0x90, 0x0e, 0xd0, 0x9c, - 0x01, 0x08, 0x81, 0x08, 0x71, 0x02, 0x04, 0x70, 0x20, 0x01, 0x18, 0x67, - 0x20, 0x0c, 0x91, 0x84, 0x00, 0x07, 0x00, 0x06, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x00, 0x0e, 0x01, 0x08, 0x90, 0x06, 0x00, 0x02, - 0x6d, 0x06, 0x6d, 0x06, 0x6d, 0x06, 0x6d, 0x06, 0x6d, 0x06, 0x6d, 0x24, - 0x6d, 0x39, 0x6d, 0x47, 0x70, 0x03, 0x00, 0x03, 0x20, 0x09, 0x18, 0x68, - 0x21, 0x0c, 0x91, 0x84, 0xff, 0x00, 0x90, 0x8e, 0xff, 0x00, 0x01, 0x40, - 0x80, 0x07, 0x90, 0x05, 0x11, 0x10, 0x20, 0x01, 0x00, 0x02, 0x80, 0x03, - 0x70, 0x06, 0x00, 0x30, 0x70, 0x07, 0x00, 0x01, 0x00, 0x18, 0x70, 0x03, - 0x00, 0x05, 0x0c, 0x50, 0x20, 0x71, 0x19, 0x10, 0x70, 0x4f, 0x00, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x70, 0xf7, 0x00, 0x01, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x05, 0x70, 0x03, 0x00, 0x00, 0x20, 0x71, 0x19, 0x10, 0x20, 0x09, - 0x18, 0x68, 0x21, 0x0c, 0x91, 0x84, 0x7f, 0x00, 0x80, 0x07, 0x90, 0x8c, - 0x00, 0x0f, 0x01, 0x60, 0x71, 0x4e, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x20, 0x71, 0x18, 0x00, 0x90, 0x8c, 0x00, 0x07, 0x01, 0x28, - 0x70, 0xf6, 0x0c, 0x20, 0x70, 0x4f, 0x00, 0x0f, 0x0c, 0x90, 0x70, 0xf7, - 0x00, 0x05, 0x08, 0xf0, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x50, 0x68, 0x4c, - 0x90, 0x05, 0x11, 0x50, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x10, 0x70, 0x28, - 0xc0, 0x85, 0x70, 0x2a, 0x00, 0xee, 0x90, 0x85, 0x00, 0x01, 0x04, 0x88, - 0x68, 0x44, 0x90, 0x05, 0x01, 0x58, 0x08, 0x0c, 0x7b, 0x28, 0x6a, 0x60, - 0x92, 0x00, 0x70, 0x02, 0x68, 0x64, 0x91, 0x01, 0x70, 0x06, 0x90, 0x06, - 0x70, 0x12, 0x70, 0x16, 0x68, 0x60, 0x70, 0x02, 0x68, 0x64, 0x70, 0x06, - 0x68, 0x68, 0x70, 0x0a, 0x68, 0x6c, 0x70, 0x0e, 0x68, 0x44, 0x90, 0x05, - 0x11, 0x10, 0x70, 0x12, 0x70, 0x16, 0x68, 0x4c, 0x70, 0x1a, 0x70, 0x1c, - 0x90, 0x85, 0x00, 0x40, 0x70, 0x1e, 0x70, 0x37, 0x00, 0x19, 0x70, 0x2b, - 0x00, 0x01, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x10, 0x70, 0x28, 0xc0, 0x84, - 0x70, 0x2a, 0x70, 0x07, 0x00, 0x01, 0x70, 0x0b, 0x00, 0x00, 0x00, 0xee, - 0x90, 0x06, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x26, 0x20, 0x71, - 0x19, 0x48, 0x70, 0x00, 0x90, 0x15, 0x09, 0x04, 0x70, 0x17, 0x92, 0x86, - 0x00, 0x03, 0x09, 0x04, 0x6e, 0xac, 0x92, 0x86, 0x00, 0x05, 0x09, 0x04, - 0x6e, 0xac, 0x20, 0x71, 0x18, 0x77, 0xa8, 0x7c, 0x90, 0x05, 0x09, 0x04, - 0x6e, 0x07, 0x71, 0x40, 0xa8, 0x68, 0x91, 0x02, 0x0a, 0x04, 0x70, 0x17, - 0xa8, 0x78, 0xd0, 0x84, 0x15, 0xd8, 0xa8, 0x53, 0x00, 0x19, 0x20, 0x01, - 0x80, 0x23, 0xa8, 0x4e, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x90, 0x05, - 0x19, 0x04, 0x71, 0xc6, 0x0e, 0x04, 0x72, 0x34, 0x20, 0x71, 0x00, 0x00, - 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x4c, 0x70, 0x82, 0xa8, 0x70, 0x70, 0x86, - 0xa8, 0x6c, 0x70, 0x8a, 0xa8, 0x80, 0x70, 0x8e, 0x70, 0x36, 0x01, 0x46, - 0x01, 0xd6, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x56, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x00, 0x2a, 0xa8, 0x68, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, 0x40, 0x03, 0x01, 0x5e, - 0x01, 0xce, 0x01, 0x3e, 0x01, 0xde, 0x01, 0x4e, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, - 0x08, 0x04, 0x6e, 0x8f, 0xa8, 0x53, 0x00, 0x1b, 0x20, 0x01, 0x80, 0x27, - 0x08, 0x20, 0x70, 0x04, 0xd0, 0x8c, 0x19, 0x04, 0x70, 0x17, 0xa8, 0x53, - 0x00, 0x1a, 0x20, 0x01, 0x80, 0x24, 0x08, 0x04, 0x6d, 0xcb, 0x00, 0xe6, - 0x00, 0x26, 0x20, 0x71, 0x19, 0x48, 0x70, 0x00, 0x90, 0x15, 0x09, 0x04, - 0x70, 0x17, 0x92, 0x86, 0x00, 0x03, 0x09, 0x04, 0x6e, 0xac, 0x92, 0x86, - 0x00, 0x05, 0x09, 0x04, 0x6e, 0xac, 0xa8, 0x4f, 0x80, 0x22, 0xa8, 0x53, - 0x00, 0x18, 0x08, 0x04, 0x6e, 0x74, 0xa8, 0x68, 0xd0, 0xfc, 0x15, 0x08, - 0x00, 0xe6, 0x00, 0x26, 0x20, 0x01, 0x19, 0x48, 0x20, 0x04, 0x90, 0x15, - 0x09, 0x04, 0x70, 0x17, 0xa9, 0x78, 0xa8, 0x74, 0x91, 0x05, 0x19, 0x04, - 0x70, 0x17, 0x92, 0x86, 0x00, 0x03, 0x09, 0x04, 0x6e, 0xac, 0x92, 0x86, - 0x00, 0x05, 0x09, 0x04, 0x6e, 0xac, 0xa8, 0x7c, 0xd0, 0xbc, 0x19, 0x04, - 0x70, 0x17, 0x22, 0x00, 0x00, 0x02, 0x70, 0x17, 0x6e, 0x70, 0x6e, 0xac, - 0x6e, 0xac, 0x70, 0x17, 0x6e, 0xac, 0x00, 0x05, 0xa8, 0x68, 0xd0, 0xfc, - 0x15, 0x00, 0x00, 0xe6, 0x00, 0x26, 0x20, 0x09, 0x19, 0x48, 0x21, 0x0c, - 0x81, 0xff, 0x09, 0x04, 0x70, 0x17, 0xa8, 0x80, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x01, 0x19, 0x04, 0x70, 0x17, 0x91, 0x86, 0x00, 0x03, - 0x09, 0x04, 0x6e, 0xac, 0x91, 0x86, 0x00, 0x05, 0x09, 0x04, 0x6e, 0xac, - 0xa8, 0x7c, 0xd0, 0xcc, 0x09, 0x04, 0x70, 0x17, 0xa8, 0x4f, 0x80, 0x21, - 0xa8, 0x53, 0x00, 0x17, 0x00, 0x28, 0x00, 0x05, 0xa8, 0x4f, 0x80, 0x20, - 0xa8, 0x53, 0x00, 0x16, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x90, 0x05, - 0x19, 0x04, 0x71, 0xc6, 0x0e, 0x04, 0x72, 0x34, 0x20, 0x71, 0x00, 0x00, - 0xa8, 0x4c, 0x70, 0x82, 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x6c, 0x70, 0x86, - 0x70, 0x36, 0xa8, 0x70, 0x70, 0x8a, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x20, 0x11, 0x00, 0x01, 0xa8, 0x04, 0x90, 0x0d, 0x70, 0x2c, - 0x11, 0x58, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x96, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x00, 0x9e, 0x0c, 0x58, 0xa8, 0x4f, 0x00, 0x00, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, - 0x00, 0x00, 0x70, 0x10, 0x90, 0x05, 0x19, 0x04, 0x6f, 0x9d, 0x78, 0x2c, - 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x90, 0x84, 0x00, 0x03, 0x00, 0x02, 0x6e, 0xca, 0x6f, 0x9d, - 0x6e, 0xee, 0x6f, 0x3a, 0x08, 0x0c, 0x0d, 0x85, 0x20, 0x71, 0x18, 0x00, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x68, 0x20, 0x71, - 0x1a, 0x04, 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, - 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, - 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x0c, 0x18, 0x20, 0x71, 0x18, 0x00, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x15, 0xa0, 0x78, 0x24, - 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, 0x71, 0x2c, 0xd1, 0x9c, 0x11, 0x70, - 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, 0x91, 0x8a, 0x00, 0x20, 0x02, 0x40, - 0x70, 0x22, 0x20, 0x01, 0x1d, 0xc0, 0x20, 0x0c, 0x81, 0x08, 0x21, 0x02, - 0x00, 0xee, 0x00, 0x58, 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, 0xa8, 0x02, - 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x88, 0x99, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, - 0xd0, 0xa4, 0x19, 0xc8, 0x20, 0x71, 0x1a, 0x04, 0x70, 0x44, 0x90, 0x05, - 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, - 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, - 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, - 0x08, 0x04, 0x6e, 0xf5, 0x00, 0x96, 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, - 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, 0x1d, 0x60, - 0x00, 0xee, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, - 0xd0, 0x9c, 0x11, 0x98, 0x00, 0x9e, 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, - 0x90, 0x0d, 0x15, 0x50, 0x20, 0x71, 0x1a, 0x04, 0x70, 0x44, 0x90, 0x05, - 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x9e, 0x29, 0x08, 0x70, 0x10, - 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, - 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, - 0x11, 0x68, 0x20, 0x71, 0x1a, 0x04, 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, - 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, - 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, - 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x88, 0x99, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x29, 0x08, - 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, - 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, - 0x90, 0x0d, 0x19, 0x04, 0x6f, 0xf1, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x73, 0x82, 0xd0, 0x9c, 0x11, 0x98, 0x70, 0x1c, 0x90, 0x4d, - 0x01, 0x80, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0x11, 0x08, 0x70, 0x1a, - 0xa8, 0x00, 0x70, 0x1e, 0x29, 0x00, 0x78, 0x22, 0x78, 0x2c, 0x90, 0x94, - 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0x9c, 0x0d, 0x68, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, 0x01, 0xb0, - 0x00, 0xe6, 0x78, 0x24, 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, - 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x88, 0x99, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x73, 0x82, 0xd0, 0xa4, 0x1d, 0x60, 0x00, 0xee, 0x20, 0x71, 0x1a, 0x04, - 0x70, 0x44, 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x04, - 0x70, 0x46, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, - 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, - 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x00, 0xee, - 0x08, 0x04, 0x6f, 0xad, 0xa8, 0x68, 0xd0, 0xfc, 0x15, 0xe0, 0x00, 0x96, - 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, 0x90, 0x4d, 0x19, 0x0c, 0x10, 0x0b, - 0x00, 0x9e, 0x00, 0x18, 0xa8, 0x68, 0xd0, 0xfc, 0x15, 0x80, 0x00, 0xe6, - 0x00, 0x26, 0xa8, 0x4f, 0x00, 0x00, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, - 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x8e, 0x00, 0x16, 0x01, 0xa8, 0x70, 0x10, 0x90, 0x05, - 0x19, 0x04, 0x71, 0x42, 0x78, 0x2c, 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, - 0x73, 0x82, 0x80, 0x04, 0x80, 0x04, 0x80, 0x04, 0x90, 0x84, 0x00, 0x03, - 0x00, 0x02, 0x70, 0x46, 0x71, 0x42, 0x70, 0x61, 0x70, 0xd3, 0x08, 0x0c, - 0x0d, 0x85, 0x20, 0x09, 0x19, 0x48, 0x21, 0x04, 0x00, 0x02, 0x70, 0x26, - 0x70, 0x26, 0x70, 0x26, 0x6e, 0xb5, 0x70, 0x26, 0x6e, 0xb5, 0x00, 0x05, - 0x20, 0x71, 0x18, 0x00, 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, - 0x11, 0x20, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x16, - 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x88, 0x99, 0x0c, 0x60, 0x20, 0x71, 0x18, 0x00, 0x29, 0x00, - 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x19, 0x04, 0x70, 0xc2, 0x78, 0x30, - 0xd0, 0xdc, 0x11, 0x20, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x78, 0x24, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, 0x71, 0x2c, 0xd1, 0x9c, - 0x11, 0x70, 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, 0x91, 0x8a, 0x00, 0x20, - 0x02, 0x40, 0x70, 0x22, 0x20, 0x01, 0x1d, 0xc0, 0x20, 0x0c, 0x81, 0x08, - 0x21, 0x02, 0x00, 0xee, 0x00, 0x58, 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, - 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x88, 0x99, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x73, 0x82, 0xd0, 0xa4, 0x19, 0xc8, 0x0e, 0x04, 0x70, 0xb9, 0x78, 0x38, - 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, - 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x20, 0x01, 0x19, 0x21, - 0x20, 0x0c, 0xc1, 0x84, 0x21, 0x02, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, - 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x20, 0x01, - 0x19, 0x22, 0x20, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x01, 0x19, 0x21, 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, - 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x16, 0x70, 0x2c, - 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, - 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x88, 0x99, 0x08, 0x04, 0x70, 0x70, 0x00, 0x96, 0x00, 0xe6, 0x78, 0x24, - 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, - 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, - 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, - 0x1d, 0x60, 0x00, 0xee, 0x0e, 0x04, 0x71, 0x15, 0x78, 0x38, 0x79, 0x38, - 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, - 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x70, 0x44, 0xc0, 0x84, 0x70, 0x46, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, - 0x19, 0x0c, 0x12, 0x00, 0x70, 0x4b, 0x00, 0x00, 0x78, 0x2c, 0x90, 0x94, - 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0x9c, 0x11, 0x70, 0x00, 0x9e, - 0x29, 0x00, 0x78, 0x22, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0xe0, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x70, 0x44, 0xc0, 0x85, 0x70, 0x46, - 0x0c, 0x58, 0x00, 0x9e, 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, - 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, - 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x20, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, - 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, - 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, - 0x08, 0x0c, 0x88, 0x99, 0x00, 0xfe, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, - 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, - 0xa8, 0x04, 0x90, 0x0d, 0x19, 0x04, 0x71, 0xb1, 0x78, 0x2c, 0x90, 0x94, - 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0x9c, 0x11, 0xb0, 0x70, 0x1c, - 0x90, 0x4d, 0x01, 0x98, 0xa8, 0x4c, 0x90, 0x05, 0x11, 0x80, 0x70, 0x10, - 0x80, 0x01, 0x70, 0x12, 0x11, 0x08, 0x70, 0x1a, 0xa8, 0x00, 0x70, 0x1e, - 0x29, 0x00, 0x78, 0x22, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x73, 0x82, 0xd0, 0x9c, 0x0d, 0x50, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, - 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, 0x05, 0xb8, 0x00, 0xe6, 0x78, 0x24, - 0x20, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, - 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, - 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, - 0x1d, 0x60, 0x00, 0xee, 0x0e, 0x04, 0x71, 0xaa, 0x78, 0x38, 0x79, 0x38, - 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, - 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x70, 0x44, 0xc0, 0x84, 0x70, 0x46, - 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, - 0x19, 0x0c, 0x12, 0x00, 0x70, 0x4b, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x70, 0x44, 0xc0, 0x85, 0x70, 0x46, 0x00, 0xfe, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, - 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, 0xa8, 0x02, 0x82, 0x10, - 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, 0x70, 0xc0, 0x92, 0x00, - 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x00, 0xee, 0x08, 0x04, 0x71, 0x52, - 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, 0x00, 0x00, 0x29, 0x08, 0x70, 0x10, - 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, 0x71, 0x1a, 0x01, 0x10, - 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, 0xa8, 0x04, 0x90, 0x0d, - 0x11, 0x28, 0x1e, 0x04, 0x71, 0xf1, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, - 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, - 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x0e, 0x04, - 0x71, 0xdb, 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x20, 0x48, 0xa8, 0x4c, - 0x90, 0x0d, 0x0d, 0x18, 0x20, 0x71, 0x00, 0x00, 0x71, 0x82, 0xa8, 0x50, - 0x70, 0x32, 0xa8, 0x6c, 0x70, 0x86, 0x70, 0x36, 0xa8, 0x70, 0x70, 0x8a, - 0xa8, 0x50, 0x90, 0x82, 0x00, 0x19, 0x12, 0x78, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, - 0x20, 0x71, 0x19, 0x10, 0x08, 0x0c, 0x73, 0x6e, 0x00, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0xa8, 0x50, 0x90, 0x82, 0x00, 0x1c, 0x1e, 0x68, 0xa8, 0x80, - 0x70, 0x8e, 0x70, 0x36, 0x01, 0x46, 0x01, 0xd6, 0x01, 0x36, 0x01, 0xc6, - 0x01, 0x56, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x00, 0x2a, 0xa8, 0x68, - 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x21, - 0x20, 0x98, 0x40, 0x03, 0x01, 0x5e, 0x01, 0xce, 0x01, 0x3e, 0x01, 0xde, - 0x01, 0x4e, 0x08, 0x90, 0x20, 0x71, 0x19, 0x10, 0xa8, 0x03, 0x00, 0x00, - 0x29, 0x08, 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x18, 0x90, 0x4d, - 0x71, 0x1a, 0x01, 0x10, 0xa9, 0x02, 0x00, 0x08, 0x71, 0x1e, 0x21, 0x48, - 0xa8, 0x04, 0x90, 0x0d, 0x11, 0x18, 0x00, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x71, 0x18, 0x00, 0x90, 0x16, 0x70, 0x2c, 0x21, 0x48, 0xa9, 0x04, - 0xa8, 0x02, 0x82, 0x10, 0x29, 0x00, 0x81, 0xff, 0x1d, 0xc8, 0x70, 0x2e, - 0x70, 0xc0, 0x92, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x00, 0x2e, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x06, 0xa8, 0x7c, 0x00, 0x06, 0xa8, 0x67, - 0x01, 0x03, 0x20, 0xa9, 0x00, 0x1c, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x1d, 0x20, 0xa0, 0x90, 0x06, 0x40, 0x04, 0x00, 0x0e, - 0x90, 0x84, 0x00, 0xff, 0xa8, 0x7e, 0x00, 0x0e, 0xa8, 0x7a, 0xa9, 0x82, - 0x00, 0x05, 0x20, 0x71, 0x19, 0x10, 0x70, 0x04, 0x00, 0x02, 0x72, 0x81, - 0x72, 0x82, 0x73, 0x6d, 0x72, 0x82, 0x72, 0x7f, 0x73, 0x6d, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x05, 0x20, 0x01, 0x19, 0x48, 0x20, 0x04, 0x00, 0x02, - 0x72, 0x8c, 0x72, 0x8c, 0x73, 0x06, 0x73, 0x07, 0x72, 0x8c, 0x73, 0x07, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x1e, 0x0c, 0x73, 0x8d, 0x70, 0x1c, - 0x90, 0x4d, 0x05, 0x08, 0xa8, 0x4c, 0x90, 0x05, 0x09, 0x04, 0x72, 0xd7, - 0x0e, 0x04, 0x72, 0xb5, 0xa9, 0x4c, 0x20, 0x71, 0x00, 0x00, 0x71, 0x82, - 0xa8, 0x50, 0x70, 0x32, 0xa8, 0x6c, 0x70, 0x86, 0x70, 0x36, 0xa8, 0x70, - 0x70, 0x8a, 0xa8, 0x50, 0x90, 0x82, 0x00, 0x19, 0x12, 0x78, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, - 0x12, 0x00, 0x20, 0x71, 0x19, 0x10, 0x08, 0x0c, 0x73, 0x6e, 0x01, 0x2e, - 0x08, 0x04, 0x73, 0x05, 0xa8, 0x50, 0x90, 0x82, 0x00, 0x1c, 0x1e, 0x68, - 0xa8, 0x80, 0x70, 0x8e, 0x70, 0x36, 0x01, 0x46, 0x01, 0xd6, 0x01, 0x36, - 0x01, 0xc6, 0x01, 0x56, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x00, 0x2a, - 0xa8, 0x68, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x21, 0x20, 0x98, 0x40, 0x03, 0x01, 0x5e, 0x01, 0xce, 0x01, 0x3e, - 0x01, 0xde, 0x01, 0x4e, 0x08, 0x90, 0x20, 0x01, 0x00, 0x5b, 0x20, 0x04, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0x9c, 0x20, 0x71, - 0x19, 0x10, 0x15, 0x10, 0x20, 0x71, 0x19, 0x10, 0x70, 0x0f, 0x00, 0x01, - 0xa9, 0x64, 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, - 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, 0x81, 0x01, 0x01, 0x08, 0x71, 0x0e, - 0x29, 0x00, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x50, 0x68, 0x22, 0x00, 0xde, - 0x20, 0x71, 0x19, 0x10, 0x70, 0x1c, 0x20, 0x48, 0x70, 0x10, 0x80, 0x01, - 0x70, 0x12, 0xa8, 0x00, 0x70, 0x1e, 0x90, 0x05, 0x11, 0x08, 0x70, 0x1a, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x08, 0x20, 0x69, - 0x1a, 0x04, 0x68, 0x44, 0x90, 0x05, 0x07, 0x60, 0x01, 0x58, 0x91, 0x86, - 0x00, 0x03, 0x05, 0x40, 0x20, 0x01, 0x18, 0x15, 0x20, 0x04, 0x20, 0x09, - 0x1b, 0x73, 0x21, 0x0c, 0x91, 0x02, 0x15, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x69, 0x00, 0x50, 0x69, 0x3c, 0x68, 0x38, 0x91, 0x06, - 0x01, 0x90, 0x0e, 0x04, 0x73, 0x39, 0x20, 0x69, 0x00, 0x00, 0x68, 0x37, - 0x80, 0x40, 0x68, 0x33, 0x00, 0x12, 0x68, 0x83, 0x80, 0x40, 0x20, 0x91, - 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, - 0x12, 0x00, 0x20, 0x69, 0x1a, 0x04, 0x68, 0x47, 0xff, 0xff, 0x01, 0x2e, - 0x00, 0xde, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x1e, 0x0c, 0x73, 0xfd, - 0x70, 0x1c, 0x90, 0x4d, 0x05, 0x40, 0x20, 0x01, 0x00, 0x5b, 0x20, 0x04, - 0x90, 0x94, 0x07, 0x80, 0x15, 0xc9, 0xd0, 0x9c, 0x15, 0x00, 0x20, 0x71, - 0x19, 0x10, 0x70, 0x0f, 0x00, 0x01, 0xa9, 0x64, 0x91, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, - 0x81, 0x01, 0x01, 0x08, 0x71, 0x0e, 0x29, 0x00, 0x00, 0xd6, 0x20, 0x69, - 0x00, 0x50, 0x68, 0x22, 0x00, 0xde, 0x70, 0x1c, 0x20, 0x48, 0x70, 0x10, - 0x80, 0x01, 0x70, 0x12, 0xa8, 0x00, 0x70, 0x1e, 0x90, 0x05, 0x11, 0x08, - 0x70, 0x1a, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x70, 0x1c, 0x90, 0x4d, 0x01, 0x60, 0x70, 0x10, 0x80, 0x01, - 0x70, 0x12, 0xa8, 0x00, 0x70, 0x1e, 0x90, 0x05, 0x11, 0x08, 0x70, 0x1a, - 0x01, 0x2e, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x05, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x91, 0x80, 0x00, 0x0e, 0x04, 0x73, 0x84, 0x00, 0x06, 0x00, 0x16, - 0x20, 0x01, 0x80, 0x04, 0x00, 0x06, 0x08, 0x04, 0x0d, 0x8e, 0x00, 0x96, - 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, 0x70, 0x44, 0xd0, 0x84, 0x01, 0xd0, - 0xc0, 0x84, 0x70, 0x46, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, - 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, - 0x00, 0xde, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, - 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x70, 0x4b, 0x00, 0x00, 0x00, 0xfe, - 0x00, 0x9e, 0x00, 0x05, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x81, - 0xd0, 0xa4, 0x0d, 0xb8, 0x71, 0x48, 0x70, 0x4c, 0x81, 0x08, 0x71, 0x4a, - 0x91, 0x02, 0x0e, 0x88, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x78, 0x24, - 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, 0x71, 0x2c, 0xd1, 0x9c, 0x11, 0x70, - 0x20, 0x09, 0x18, 0x30, 0x21, 0x0c, 0x91, 0x8a, 0x00, 0x20, 0x02, 0x40, - 0x70, 0x22, 0x20, 0x01, 0x1d, 0xc0, 0x20, 0x0c, 0x81, 0x08, 0x21, 0x02, - 0x00, 0xee, 0x00, 0x58, 0x00, 0xee, 0x20, 0x48, 0x70, 0x2c, 0xa8, 0x02, - 0x29, 0x00, 0x70, 0x2e, 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, - 0x88, 0x99, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, - 0xd0, 0xa4, 0x19, 0xc8, 0x78, 0x38, 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, - 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, - 0x00, 0xde, 0x20, 0x91, 0x40, 0x80, 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, - 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, 0x00, 0xee, 0x70, 0x4b, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x00, 0x50, - 0x70, 0x44, 0xd0, 0x84, 0x01, 0xb8, 0xc0, 0x84, 0x70, 0x46, 0x78, 0x38, - 0x79, 0x38, 0x91, 0x0e, 0x1d, 0xe0, 0x00, 0xd6, 0x20, 0x69, 0x00, 0x00, - 0x68, 0x36, 0x68, 0x33, 0x00, 0x13, 0x00, 0xde, 0x20, 0x91, 0x40, 0x80, - 0x20, 0x01, 0x00, 0x89, 0x20, 0x04, 0xd0, 0x84, 0x19, 0x0c, 0x12, 0x00, - 0x00, 0xfe, 0x00, 0x05, 0x78, 0x2c, 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, - 0x73, 0x82, 0xd0, 0xa4, 0x0d, 0xb8, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, - 0x78, 0x24, 0x20, 0x48, 0x70, 0x2c, 0xa8, 0x02, 0x29, 0x00, 0x70, 0x2e, - 0x70, 0xc0, 0x80, 0x00, 0x70, 0xc2, 0x08, 0x0c, 0x88, 0x99, 0x78, 0x2c, - 0x90, 0x94, 0x07, 0x80, 0x19, 0x0c, 0x73, 0x82, 0xd0, 0xa4, 0x1d, 0x70, - 0x00, 0xd6, 0x20, 0x69, 0x00, 0x50, 0x69, 0x3c, 0x20, 0x69, 0x19, 0x48, - 0x68, 0x08, 0x69, 0x0a, 0x20, 0x69, 0x1a, 0x04, 0x91, 0x02, 0x11, 0x18, - 0x68, 0x44, 0x90, 0x05, 0x13, 0x20, 0x20, 0x01, 0x19, 0x49, 0x20, 0x0c, - 0x69, 0x46, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x70, 0x98, - 0x90, 0x8a, 0x00, 0x2a, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1d, - 0x00, 0x3b, 0x00, 0x26, 0x20, 0x11, 0x1e, 0x00, 0x08, 0x0c, 0x2a, 0xd3, - 0x00, 0x2e, 0x00, 0x05, 0x75, 0x42, 0x74, 0xaf, 0x74, 0xcb, 0x74, 0xf5, - 0x75, 0x31, 0x75, 0x71, 0x75, 0x83, 0x74, 0xcb, 0x75, 0x59, 0x74, 0x6a, - 0x74, 0x98, 0x75, 0x1b, 0x74, 0x69, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, - 0x02, 0x00, 0x68, 0x04, 0x90, 0x05, 0x11, 0x80, 0x68, 0x08, 0x90, 0x05, - 0x15, 0x18, 0x70, 0x9b, 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, 0x2d, 0x04, - 0x70, 0x02, 0x08, 0x0c, 0x78, 0xe4, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, - 0x60, 0x2a, 0x00, 0xb0, 0x70, 0x9b, 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, - 0x2d, 0x04, 0x70, 0x02, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, 0x60, 0x2a, - 0x00, 0xe6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x20, 0x71, 0x1a, 0x6e, - 0x08, 0x0c, 0x1b, 0x1e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xee, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, - 0x90, 0x05, 0x11, 0x78, 0x68, 0x08, 0x90, 0x05, 0x11, 0x60, 0x70, 0x9b, - 0x00, 0x29, 0x20, 0x69, 0x19, 0x8f, 0x2d, 0x04, 0x70, 0x02, 0x08, 0x0c, - 0x79, 0x90, 0x60, 0x28, 0x90, 0x85, 0x06, 0x00, 0x60, 0x2a, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0x90, 0x08, 0x0c, 0x2a, 0x99, - 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xe4, 0x11, 0x90, 0x08, 0x0c, 0x75, 0xf4, - 0xd1, 0xd4, 0x11, 0x60, 0xd1, 0xdc, 0x11, 0x38, 0xd1, 0xcc, 0x01, 0x50, - 0x70, 0x9b, 0x00, 0x20, 0x08, 0x0c, 0x75, 0xf4, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x88, 0x08, 0x0c, 0x2a, 0x99, 0x61, 0x24, 0xd1, 0xcc, 0x11, 0xe8, - 0xd1, 0xdc, 0x11, 0xc0, 0xd1, 0xe4, 0x11, 0x98, 0x91, 0x84, 0x1e, 0x00, - 0x11, 0xd8, 0x08, 0x0c, 0x1b, 0x4b, 0x60, 0xe3, 0x00, 0x01, 0x60, 0x0c, - 0xc0, 0xb4, 0x60, 0x0e, 0x08, 0x0c, 0x77, 0xca, 0x20, 0x01, 0x00, 0x80, - 0x08, 0x0c, 0x2a, 0x99, 0x70, 0x9b, 0x00, 0x29, 0x00, 0x58, 0x70, 0x9b, - 0x00, 0x1e, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x20, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x08, 0x0c, - 0x1b, 0x4b, 0x60, 0xe3, 0x00, 0x01, 0x60, 0x0c, 0xc0, 0xb4, 0x60, 0x0e, - 0x08, 0x0c, 0x77, 0xca, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, 0x2a, 0x99, - 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x98, 0xd1, 0xdc, 0x11, 0x70, 0xd1, 0xe4, - 0x11, 0x48, 0x91, 0x84, 0x1e, 0x00, 0x11, 0x18, 0x70, 0x9b, 0x00, 0x29, - 0x00, 0x58, 0x70, 0x9b, 0x00, 0x28, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1e, - 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, - 0x00, 0x05, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x80, 0xd1, 0xdc, 0x11, 0x58, - 0xd1, 0xe4, 0x11, 0x30, 0x91, 0x84, 0x1e, 0x00, 0x11, 0x58, 0x70, 0x9b, - 0x00, 0x29, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x1d, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x20, 0x01, - 0x00, 0xa0, 0x08, 0x0c, 0x2a, 0x99, 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x38, - 0xd1, 0xe4, 0x01, 0x38, 0x08, 0x0c, 0x1b, 0x4b, 0x70, 0x9b, 0x00, 0x1e, - 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x05, 0x08, 0x0c, 0x76, 0x7d, - 0x61, 0x24, 0xd1, 0xdc, 0x11, 0x88, 0x08, 0x0c, 0x75, 0xf4, 0x00, 0x16, - 0x08, 0x0c, 0x1b, 0x4b, 0x00, 0x1e, 0xd1, 0xd4, 0x11, 0x28, 0xd1, 0xe4, - 0x01, 0x38, 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x20, 0x70, 0x9b, 0x00, 0x1f, - 0x08, 0x0c, 0x75, 0xf4, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0xa0, - 0x08, 0x0c, 0x2a, 0x99, 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x60, - 0xd1, 0xcc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x40, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x21, 0x00, 0x05, 0x08, 0x0c, 0x76, 0x7d, 0x61, 0x24, - 0xd1, 0xd4, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x40, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x28, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x00, 0x90, - 0x08, 0x0c, 0x2a, 0x99, 0x00, 0x0e, 0x61, 0x24, 0xd1, 0xd4, 0x11, 0x78, - 0xd1, 0xcc, 0x11, 0x50, 0xd1, 0xdc, 0x11, 0x28, 0xd1, 0xe4, 0x01, 0x58, - 0x70, 0x9b, 0x00, 0x1e, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x1d, 0x00, 0x28, - 0x70, 0x9b, 0x00, 0x20, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x1f, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0xf8, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xd1, 0xb4, 0x01, 0xd0, 0xc1, 0xb4, 0x21, 0x02, 0x00, 0x26, - 0x20, 0x11, 0x02, 0x00, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0x2e, 0x08, 0x0c, - 0x2a, 0x7f, 0x60, 0x24, 0xd0, 0xcc, 0x01, 0x48, 0x20, 0x01, 0x00, 0xa0, - 0x08, 0x0c, 0x2a, 0x99, 0x08, 0x0c, 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, - 0x04, 0x28, 0x60, 0x28, 0xc0, 0xcd, 0x60, 0x2a, 0x04, 0x08, 0x08, 0x0c, - 0x77, 0xb8, 0x01, 0x50, 0x08, 0x0c, 0x77, 0xaf, 0x11, 0x38, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x26, 0x31, 0x08, 0x0c, 0x77, 0x72, 0x00, 0xa0, - 0x08, 0x0c, 0x76, 0x7a, 0x01, 0x78, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0x26, 0x31, 0x70, 0x98, 0x90, 0x86, 0x00, 0x1e, 0x01, 0x20, 0x70, 0x98, - 0x90, 0x86, 0x00, 0x22, 0x11, 0x18, 0x70, 0x9b, 0x00, 0x25, 0x00, 0x10, - 0x70, 0x9b, 0x00, 0x21, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, 0x20, 0x11, 0x76, 0x05, 0x08, 0x0c, - 0x8a, 0x9f, 0x00, 0x2e, 0x00, 0x16, 0x00, 0x26, 0x20, 0x09, 0x00, 0x64, - 0x20, 0x11, 0x76, 0x05, 0x08, 0x0c, 0x8a, 0x96, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xf6, 0x00, 0x16, 0x08, 0x0c, 0xa2, 0xa0, - 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x75, 0x9e, 0x00, 0x1e, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x71, 0x18, 0x00, - 0x08, 0x0c, 0xa2, 0xa0, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, - 0x20, 0x91, 0x80, 0x00, 0x60, 0x28, 0xc0, 0x9c, 0x60, 0x2a, 0x08, 0x0c, - 0xac, 0xfc, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xa6, 0x2b, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0xa6, 0x35, 0x08, 0x0c, 0xa5, 0x16, 0x08, 0x0c, - 0x8a, 0x4b, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, - 0x08, 0x0c, 0xad, 0x18, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0xee, 0xd9, - 0x08, 0x0c, 0xee, 0xf4, 0x20, 0x09, 0x00, 0x04, 0x08, 0x0c, 0x2a, 0x85, - 0x08, 0x0c, 0x29, 0x9b, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, 0x00, 0x04, - 0x20, 0x11, 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xd3, 0x20, 0x11, 0x76, 0x05, - 0x08, 0x0c, 0x8a, 0x9f, 0x08, 0x0c, 0x77, 0xb8, 0x01, 0x18, 0x90, 0x06, - 0x08, 0x0c, 0x2a, 0x99, 0x08, 0x0c, 0x0b, 0xcf, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x26, 0x31, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x26, - 0x00, 0xe6, 0x20, 0x11, 0x76, 0x12, 0x20, 0x71, 0x1a, 0x04, 0x70, 0x1c, - 0x92, 0x06, 0x11, 0x18, 0x70, 0x18, 0x90, 0x05, 0x01, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x05, 0x60, 0x20, 0xd0, 0x9c, - 0x00, 0x05, 0x68, 0x00, 0x90, 0x84, 0xff, 0xfe, 0x90, 0x86, 0x00, 0xc0, - 0x01, 0xb8, 0x20, 0x01, 0x00, 0xc0, 0x08, 0x0c, 0x2a, 0x99, 0x01, 0x56, - 0x20, 0xa9, 0x00, 0x2d, 0x1d, 0x04, 0x76, 0x8a, 0x20, 0x91, 0x60, 0x00, - 0x1f, 0x04, 0x76, 0x8a, 0x01, 0x5e, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x00, - 0x68, 0x9c, 0x80, 0x01, 0x02, 0x20, 0x01, 0x18, 0x68, 0x9e, 0x00, 0xde, - 0x00, 0x05, 0x68, 0x9f, 0x00, 0x14, 0x68, 0xec, 0xd0, 0xdc, 0x0d, 0xc8, - 0x68, 0x00, 0x90, 0x86, 0x00, 0x01, 0x1d, 0xa8, 0x08, 0x0c, 0x8a, 0xab, - 0x0c, 0x90, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, - 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x7a, 0xc5, - 0x20, 0x01, 0x19, 0x6d, 0x20, 0x03, 0x00, 0x00, 0x90, 0x06, 0x70, 0x9a, - 0x60, 0xe2, 0x68, 0x86, 0x08, 0x0c, 0x27, 0x00, 0x90, 0x06, 0x08, 0x0c, - 0x2a, 0x99, 0x08, 0x0c, 0x60, 0x58, 0x00, 0x26, 0x20, 0x11, 0xff, 0xff, - 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0x2e, 0x60, 0x2b, 0x18, 0x2c, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, - 0x20, 0x01, 0x19, 0x7d, 0x20, 0x0c, 0x91, 0x86, 0x00, 0x00, 0x01, 0x58, - 0x91, 0x86, 0x00, 0x01, 0x01, 0x58, 0x91, 0x86, 0x00, 0x02, 0x01, 0x58, - 0x91, 0x86, 0x00, 0x03, 0x01, 0x58, 0x08, 0x04, 0x77, 0x62, 0x70, 0x9b, - 0x00, 0x22, 0x00, 0x40, 0x70, 0x9b, 0x00, 0x21, 0x00, 0x28, 0x70, 0x9b, - 0x00, 0x23, 0x00, 0x10, 0x70, 0x9b, 0x00, 0x24, 0x60, 0xe3, 0x00, 0x00, - 0x68, 0x87, 0x00, 0x01, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x27, 0x00, - 0x08, 0x0c, 0xac, 0xfc, 0x00, 0x26, 0x08, 0x0c, 0xaf, 0xd2, 0x08, 0x0c, - 0xb0, 0x9b, 0x00, 0x2e, 0x08, 0x0c, 0xad, 0x18, 0x70, 0x00, 0x90, 0x8e, - 0x00, 0x04, 0x01, 0x18, 0x60, 0x2b, 0x00, 0x28, 0x00, 0x10, 0x60, 0x2b, - 0x00, 0x20, 0x01, 0x56, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0xa9, - 0x00, 0x05, 0x60, 0x24, 0xd0, 0xac, 0x01, 0x50, 0x01, 0x2e, 0x01, 0x5e, - 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x18, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0xc3, - 0x08, 0x04, 0x77, 0x6e, 0x68, 0x00, 0x90, 0x84, 0x00, 0xa1, 0xc0, 0xbd, - 0x68, 0x02, 0x08, 0x0c, 0x2a, 0x7f, 0x69, 0x04, 0xd1, 0xd4, 0x11, 0x40, - 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x1f, 0x04, 0x77, 0x13, - 0x08, 0x0c, 0x77, 0xf2, 0x01, 0x2e, 0x01, 0x5e, 0x08, 0x0c, 0x77, 0xaf, - 0x01, 0x70, 0x60, 0x44, 0x90, 0x05, 0x01, 0x30, 0x08, 0x0c, 0x77, 0xf2, - 0x90, 0x06, 0x80, 0x01, 0x1d, 0xf0, 0x00, 0x28, 0x68, 0x04, 0xd0, 0xd4, - 0x11, 0x10, 0x08, 0x0c, 0x77, 0xf2, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x18, - 0x90, 0x06, 0x08, 0x0c, 0x2a, 0xc3, 0x00, 0x16, 0x00, 0x26, 0x70, 0x00, - 0x90, 0x8e, 0x00, 0x04, 0x01, 0x30, 0x20, 0x09, 0x00, 0xc8, 0x20, 0x11, - 0x76, 0x12, 0x08, 0x0c, 0x8a, 0x5d, 0x00, 0x2e, 0x00, 0x1e, 0x08, 0x0c, - 0x88, 0x90, 0x70, 0x34, 0xc0, 0x85, 0x70, 0x36, 0x20, 0x01, 0x19, 0x7d, - 0x20, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x74, 0x4d, 0x08, 0x0c, 0x77, 0xaf, - 0x01, 0x38, 0x68, 0x04, 0xd0, 0xd4, 0x11, 0x20, 0xd0, 0xdc, 0x11, 0x00, - 0x08, 0x0c, 0x7a, 0xbb, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x88, 0xa7, 0x08, 0x0c, - 0x88, 0x99, 0x08, 0x0c, 0x7a, 0xc5, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x03, - 0x00, 0x00, 0x90, 0x06, 0x70, 0x9a, 0x60, 0xe2, 0x68, 0x86, 0x08, 0x0c, - 0x27, 0x00, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, 0x60, 0x43, 0x00, 0x90, - 0x60, 0x43, 0x00, 0x10, 0x00, 0x26, 0x20, 0x11, 0xff, 0xff, 0x08, 0x0c, - 0x2a, 0xd3, 0x00, 0x2e, 0x60, 0x2b, 0x18, 0x2c, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, - 0x90, 0x86, 0xaa, 0xaa, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, - 0x58, 0x44, 0x90, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, 0x58, 0x44, 0x90, 0x84, 0x00, 0x30, - 0x90, 0x86, 0x00, 0x30, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, - 0x58, 0x44, 0x90, 0x84, 0x00, 0x30, 0x90, 0x86, 0x00, 0x10, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x08, 0x0c, 0x58, 0x44, 0x90, 0x84, 0x00, 0x30, - 0x90, 0x86, 0x00, 0x20, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x36, 0x00, 0x16, - 0x20, 0x01, 0x18, 0x0c, 0x20, 0x04, 0x90, 0x8c, 0x00, 0x13, 0x01, 0x68, - 0x00, 0x20, 0x08, 0x0c, 0x27, 0x20, 0x90, 0x0e, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x28, 0x08, 0x0c, 0x32, 0xda, 0x90, 0x06, - 0x00, 0x19, 0x00, 0x1e, 0x00, 0x3e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x0c, 0x2e, 0x04, 0x01, 0x30, 0x08, 0x0c, 0xd6, 0x3e, 0x11, 0x28, - 0x90, 0x85, 0x00, 0x10, 0x00, 0x10, 0x90, 0x84, 0xff, 0xef, 0x20, 0x72, - 0x00, 0xee, 0x00, 0x05, 0x60, 0x50, 0x00, 0x06, 0x60, 0xec, 0x00, 0x06, - 0x60, 0x0c, 0x00, 0x06, 0x60, 0x04, 0x00, 0x06, 0x60, 0x28, 0x00, 0x06, - 0x08, 0x0c, 0x2a, 0xf6, 0x08, 0x0c, 0x2b, 0x29, 0x60, 0x2f, 0x01, 0x00, - 0x60, 0x2f, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x40, 0x60, 0x2f, 0x00, 0x00, - 0x20, 0xa9, 0x00, 0x02, 0x08, 0x0c, 0x2a, 0x60, 0x00, 0x26, 0x20, 0x11, - 0x00, 0x40, 0x08, 0x0c, 0x2a, 0xd3, 0x00, 0x2e, 0x00, 0x0e, 0x60, 0x2a, - 0x00, 0x0e, 0x60, 0x06, 0x00, 0x0e, 0x60, 0x0e, 0x00, 0x0e, 0x60, 0xee, - 0x60, 0xe3, 0x00, 0x00, 0x68, 0x87, 0x00, 0x01, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x27, 0x00, 0x20, 0x01, 0x00, 0xa0, 0x00, 0x06, 0x08, 0x0c, - 0xd6, 0x45, 0x00, 0x0e, 0x01, 0x30, 0x08, 0x0c, 0x2a, 0xb7, 0x90, 0x06, - 0x08, 0x0c, 0x2a, 0xc3, 0x00, 0x10, 0x08, 0x0c, 0x2a, 0x99, 0x00, 0x0e, - 0x60, 0x52, 0x60, 0x50, 0x00, 0x06, 0xc0, 0xe5, 0x60, 0x52, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x0c, 0x00, 0xfe, 0x00, 0x0e, - 0x60, 0x52, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, - 0x01, 0x40, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0xad, 0x5a, 0x01, 0x58, - 0x20, 0x01, 0x03, 0x86, 0x20, 0x04, 0xd0, 0xb4, 0x11, 0x30, 0x20, 0x01, - 0x00, 0x16, 0x08, 0x0c, 0xac, 0xed, 0x08, 0x04, 0x78, 0xd6, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xc4, 0x21, 0x02, 0x60, 0x28, 0x90, 0x84, - 0xe1, 0xff, 0x60, 0x2a, 0x20, 0x11, 0x02, 0x00, 0x08, 0x0c, 0x2a, 0xd3, - 0x20, 0x01, 0x00, 0x90, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0xa9, 0x03, 0x66, - 0x60, 0x24, 0xd0, 0xcc, 0x15, 0x60, 0x1d, 0x04, 0x78, 0x6e, 0x20, 0x91, - 0x60, 0x00, 0x1f, 0x04, 0x78, 0x6e, 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x11, - 0x00, 0x03, 0x08, 0x0c, 0xa6, 0x2b, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, - 0xa6, 0x35, 0x08, 0x0c, 0xa5, 0x16, 0x90, 0x1e, 0x08, 0x0c, 0xa5, 0x96, - 0x20, 0x01, 0x03, 0x86, 0x20, 0x03, 0x70, 0x00, 0x08, 0x0c, 0xad, 0x18, - 0x20, 0x01, 0x00, 0xa0, 0x08, 0x0c, 0x2a, 0x99, 0x08, 0x0c, 0x7a, 0xb6, - 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x10, 0x08, 0x0c, - 0x0c, 0xf1, 0x90, 0x85, 0x00, 0x01, 0x08, 0x04, 0x78, 0xdc, 0x08, 0x0c, - 0x1b, 0x4b, 0x60, 0xe3, 0x00, 0x00, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, - 0xd0, 0x8c, 0x20, 0x01, 0x00, 0x02, 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, - 0x20, 0x04, 0x08, 0x0c, 0x27, 0x00, 0x60, 0xe2, 0x20, 0x01, 0x00, 0x80, - 0x08, 0x0c, 0x2a, 0x99, 0x20, 0xa9, 0x03, 0x66, 0x20, 0x11, 0x1e, 0x00, - 0x08, 0x0c, 0x2a, 0xd3, 0x20, 0x09, 0x1e, 0x00, 0x08, 0x0c, 0x2a, 0x7f, - 0x60, 0x24, 0x91, 0x0c, 0x01, 0x40, 0x1d, 0x04, 0x78, 0xb4, 0x20, 0x91, - 0x60, 0x00, 0x1f, 0x04, 0x78, 0xb4, 0x08, 0x04, 0x78, 0x77, 0x20, 0x01, - 0x03, 0x86, 0x20, 0x03, 0x70, 0x00, 0x60, 0x28, 0x90, 0x85, 0x1e, 0x00, - 0x60, 0x2a, 0x70, 0xb4, 0x90, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, - 0x00, 0x08, 0x68, 0x86, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x10, 0x08, 0x0c, - 0x0c, 0xf1, 0x90, 0x06, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x70, 0x00, 0x90, 0x86, 0x00, 0x03, - 0x11, 0x68, 0x20, 0x01, 0x02, 0x0b, 0x20, 0x04, 0x90, 0x84, 0x55, 0x40, - 0x90, 0x86, 0x55, 0x40, 0x11, 0x28, 0x20, 0x69, 0x1a, 0x7b, 0x2d, 0x04, - 0x80, 0x00, 0x20, 0x6a, 0x20, 0x69, 0x01, 0x40, 0x60, 0x20, 0x90, 0x84, - 0x00, 0xc0, 0x01, 0x20, 0x68, 0x84, 0x90, 0x05, 0x19, 0x04, 0x79, 0x4d, - 0x20, 0x01, 0x00, 0x88, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x60, 0xe2, - 0x68, 0x86, 0x08, 0x0c, 0x27, 0x00, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, - 0x90, 0x05, 0x11, 0x18, 0x68, 0x08, 0x90, 0x05, 0x01, 0xd0, 0x60, 0x28, - 0x90, 0x84, 0xfb, 0xff, 0x60, 0x2a, 0x20, 0x11, 0x04, 0x00, 0x08, 0x0c, - 0x2a, 0xd3, 0x20, 0x69, 0x19, 0x8f, 0x70, 0x00, 0x20, 0x6a, 0x70, 0x9b, - 0x00, 0x26, 0x70, 0x03, 0x00, 0x01, 0x20, 0xa9, 0x00, 0x02, 0x1d, 0x04, - 0x79, 0x2d, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, 0x79, 0x2d, 0x08, 0x04, - 0x79, 0x88, 0x20, 0x69, 0x01, 0x40, 0x20, 0xa9, 0x03, 0x84, 0x20, 0x11, - 0x1e, 0x00, 0x08, 0x0c, 0x2a, 0xd3, 0x20, 0x09, 0x1e, 0x00, 0x08, 0x0c, - 0x2a, 0x7f, 0x60, 0x24, 0x91, 0x0c, 0x05, 0x28, 0x90, 0x84, 0x1a, 0x00, - 0x15, 0x10, 0x1d, 0x04, 0x79, 0x39, 0x20, 0x91, 0x60, 0x00, 0x1f, 0x04, - 0x79, 0x39, 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, - 0xa6, 0x2b, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, 0xa6, 0x35, 0x08, 0x0c, - 0xa5, 0x16, 0x90, 0x1e, 0x08, 0x0c, 0xa5, 0x96, 0x08, 0x0c, 0xad, 0x18, - 0x20, 0x01, 0x00, 0xa0, 0x08, 0x0c, 0x2a, 0x99, 0x08, 0x0c, 0x7a, 0xb6, - 0x08, 0x0c, 0x61, 0x9d, 0x90, 0x85, 0x00, 0x01, 0x00, 0xf8, 0x08, 0x0c, - 0x1b, 0x4b, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x69, - 0x01, 0x40, 0x60, 0xe3, 0x00, 0x00, 0x70, 0xb4, 0x90, 0x05, 0x11, 0x18, - 0x68, 0x87, 0x00, 0x01, 0x00, 0x08, 0x68, 0x86, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x01, 0x00, 0x02, 0x11, 0x18, 0x20, 0x01, - 0x19, 0x6d, 0x20, 0x04, 0x08, 0x0c, 0x27, 0x00, 0x60, 0xe2, 0x90, 0x06, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x60, 0x20, 0x90, 0x84, 0x00, 0xc0, 0x01, 0xe8, 0x08, 0x0c, - 0xac, 0xfc, 0x20, 0x11, 0x00, 0x03, 0x08, 0x0c, 0xa6, 0x2b, 0x20, 0x11, - 0x00, 0x02, 0x08, 0x0c, 0xa6, 0x35, 0x08, 0x0c, 0xa5, 0x16, 0x90, 0x1e, - 0x08, 0x0c, 0xa5, 0x96, 0x08, 0x0c, 0xad, 0x18, 0x20, 0x69, 0x01, 0x40, - 0x20, 0x01, 0x00, 0xa0, 0x08, 0x0c, 0x2a, 0x99, 0x08, 0x0c, 0x7a, 0xb6, - 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x04, 0x7a, 0x32, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0xd1, 0xb4, 0x11, 0x60, 0xc1, 0xb5, 0x21, 0x02, 0x08, 0x0c, - 0x75, 0xfa, 0x20, 0x69, 0x01, 0x40, 0x20, 0x01, 0x00, 0x80, 0x08, 0x0c, - 0x2a, 0x99, 0x60, 0xe3, 0x00, 0x00, 0x20, 0x69, 0x02, 0x00, 0x68, 0x04, - 0x90, 0x05, 0x11, 0x18, 0x68, 0x08, 0x90, 0x05, 0x01, 0x90, 0x60, 0x28, - 0x90, 0x84, 0xfd, 0xff, 0x60, 0x2a, 0x20, 0x11, 0x02, 0x00, 0x08, 0x0c, - 0x2a, 0xd3, 0x20, 0x69, 0x19, 0x8f, 0x70, 0x00, 0x20, 0x6a, 0x70, 0x9b, - 0x00, 0x27, 0x70, 0x03, 0x00, 0x01, 0x08, 0x04, 0x7a, 0x32, 0x20, 0x11, - 0x1e, 0x00, 0x08, 0x0c, 0x2a, 0xd3, 0x20, 0x09, 0x1e, 0x00, 0x08, 0x0c, - 0x2a, 0x7f, 0x60, 0x24, 0x91, 0x0c, 0x01, 0xc8, 0x90, 0x84, 0x1c, 0x00, - 0x11, 0xb0, 0x1d, 0x04, 0x79, 0xe7, 0x00, 0x06, 0x00, 0x16, 0x00, 0xc6, - 0x00, 0xd6, 0x00, 0xe6, 0x08, 0x0c, 0x88, 0xe7, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x04, - 0x70, 0x78, 0x00, 0xee, 0x90, 0x05, 0x19, 0xe8, 0x04, 0x38, 0x00, 0x26, - 0x20, 0x11, 0x76, 0x12, 0x08, 0x0c, 0x89, 0x93, 0x20, 0x11, 0x76, 0x05, - 0x08, 0x0c, 0x8a, 0x9f, 0x00, 0x2e, 0x20, 0x69, 0x01, 0x40, 0x60, 0xe3, - 0x00, 0x00, 0x70, 0xb4, 0x90, 0x05, 0x11, 0x18, 0x68, 0x87, 0x00, 0x01, - 0x00, 0x08, 0x68, 0x86, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, - 0x20, 0x01, 0x00, 0x02, 0x11, 0x18, 0x20, 0x01, 0x19, 0x6d, 0x20, 0x04, - 0x08, 0x0c, 0x27, 0x00, 0x60, 0xe2, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, - 0xc1, 0xb4, 0x21, 0x02, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xc6, 0x00, 0xe6, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0xd6, 0x3e, 0x19, 0x04, - 0x7a, 0xa0, 0x71, 0x30, 0xd1, 0x84, 0x11, 0x70, 0x08, 0x0c, 0x34, 0x82, - 0x01, 0x38, 0xc1, 0x8d, 0x71, 0x32, 0x20, 0x11, 0x18, 0x48, 0x22, 0x14, - 0xd2, 0xac, 0x11, 0x20, 0x70, 0x30, 0xd0, 0x8c, 0x09, 0x04, 0x7a, 0xa0, - 0x20, 0x11, 0x18, 0x48, 0x22, 0x0c, 0xd1, 0xa4, 0x05, 0x38, 0x00, 0x16, - 0x20, 0x19, 0x00, 0x0e, 0x08, 0x0c, 0xe9, 0xf9, 0x01, 0x56, 0x00, 0xb6, - 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, 0x91, 0x86, 0x00, 0x7e, 0x01, 0xa0, - 0x91, 0x86, 0x00, 0x80, 0x01, 0x88, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x70, - 0x21, 0x20, 0x90, 0x06, 0x00, 0x16, 0x20, 0x09, 0x00, 0x0e, 0x08, 0x0c, - 0xea, 0x8d, 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, 0x01, 0x00, 0x08, 0x0c, - 0x8c, 0x44, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0x7a, 0x69, 0x00, 0xbe, - 0x01, 0x5e, 0x00, 0x1e, 0xd1, 0xac, 0x11, 0x48, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x02, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0x32, 0xda, 0x00, 0x1e, - 0x00, 0x78, 0x01, 0x56, 0x00, 0xb6, 0x20, 0xa9, 0x00, 0x7f, 0x90, 0x0e, - 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x10, 0x08, 0x0c, 0x61, 0xb7, 0x81, 0x08, - 0x1f, 0x04, 0x7a, 0x96, 0x00, 0xbe, 0x01, 0x5e, 0x08, 0x0c, 0x1b, 0x4b, - 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xb0, 0x9b, 0x08, 0x0c, 0xad, 0x18, - 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x0c, 0x76, 0xcd, - 0x00, 0xee, 0x00, 0xce, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x00, 0x05, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, 0x00, 0x01, - 0x00, 0x05, 0x20, 0x01, 0x19, 0x7d, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, - 0x20, 0x01, 0x19, 0x7c, 0x20, 0x03, 0xaa, 0xaa, 0x00, 0x05, 0x20, 0x01, - 0x19, 0x7c, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, 0x20, 0x71, 0x18, 0xfa, - 0x70, 0x03, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x10, 0x72, - 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0xab, 0xdc, 0xb0, 0x29, 0x00, 0x70, 0x4e, - 0x08, 0x0c, 0x10, 0x72, 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0xab, 0xdc, 0xb0, - 0x29, 0x00, 0x70, 0x52, 0xa8, 0x67, 0x00, 0x00, 0xa8, 0x6b, 0x00, 0x01, - 0xa8, 0x9f, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x00, 0x40, - 0x68, 0x48, 0x90, 0x05, 0x11, 0x18, 0x90, 0x85, 0x00, 0x01, 0x04, 0xb0, - 0x68, 0x40, 0x90, 0x05, 0x01, 0x50, 0x04, 0xa1, 0x6a, 0x50, 0x92, 0x00, - 0x70, 0x02, 0x68, 0x54, 0x91, 0x01, 0x70, 0x06, 0x90, 0x06, 0x70, 0x12, - 0x70, 0x16, 0x68, 0x50, 0x70, 0x02, 0x68, 0x54, 0x70, 0x06, 0x68, 0x58, - 0x70, 0x0a, 0x68, 0x5c, 0x70, 0x0e, 0x68, 0x40, 0x90, 0x05, 0x11, 0x10, - 0x70, 0x12, 0x70, 0x16, 0x68, 0x48, 0x70, 0x1a, 0x70, 0x1c, 0x90, 0x85, - 0x00, 0x40, 0x70, 0x1e, 0x20, 0x01, 0x00, 0x19, 0x70, 0x36, 0x70, 0x2b, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x04, 0x20, 0x0c, 0x91, 0x8c, 0xff, 0xf7, - 0x91, 0x8d, 0x80, 0x00, 0x21, 0x02, 0x00, 0xd6, 0x20, 0x69, 0x18, 0xfa, - 0x68, 0x07, 0x00, 0x01, 0x00, 0xde, 0x08, 0x0c, 0x81, 0x03, 0x90, 0x06, - 0x00, 0xee, 0x00, 0x05, 0x90, 0x0e, 0x01, 0x56, 0x20, 0xa9, 0x00, 0x06, - 0x80, 0x03, 0x81, 0x8d, 0x1f, 0x04, 0x7b, 0x2c, 0x01, 0x5e, 0x00, 0x05, - 0x20, 0x79, 0x00, 0x40, 0x20, 0x71, 0x18, 0xfa, 0x70, 0x04, 0x00, 0x02, - 0x7b, 0x42, 0x7b, 0x43, 0x7b, 0x8f, 0x7b, 0xea, 0x7d, 0x4a, 0x7b, 0x40, - 0x7b, 0x40, 0x7d, 0x74, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x05, 0x20, 0x79, - 0x00, 0x40, 0x20, 0x01, 0x1d, 0xc0, 0x20, 0x03, 0x00, 0x00, 0x78, 0x2c, - 0x90, 0x8c, 0x07, 0x80, 0x19, 0x0c, 0x81, 0xe5, 0xd0, 0xa4, 0x05, 0x78, - 0x20, 0x01, 0x1d, 0xc0, 0x20, 0x04, 0x90, 0x82, 0x00, 0x80, 0x16, 0x48, - 0x1d, 0x04, 0x7b, 0x60, 0x20, 0x01, 0x1a, 0x07, 0x20, 0x0c, 0x81, 0x09, - 0x05, 0x10, 0x20, 0x91, 0x60, 0x00, 0x21, 0x02, 0x78, 0x24, 0x20, 0x48, - 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x8a, 0x00, 0x40, 0x06, 0x10, 0x00, 0xc0, 0x20, 0x01, 0x18, 0x00, - 0x20, 0x0c, 0x91, 0x86, 0x00, 0x03, 0x11, 0x68, 0x70, 0x04, 0x00, 0x02, - 0x7b, 0x7f, 0x7b, 0x49, 0x7b, 0x7f, 0x7b, 0x7d, 0x7b, 0x7f, 0x7b, 0x7f, - 0x7b, 0x7f, 0x7b, 0x7f, 0x7b, 0x7f, 0x08, 0x0c, 0x7b, 0xea, 0x78, 0x2c, - 0xd0, 0x9c, 0x09, 0x0c, 0x81, 0x03, 0x00, 0x05, 0x90, 0x82, 0x00, 0x5a, - 0x12, 0x18, 0x21, 0x00, 0x00, 0x3b, 0x0c, 0x10, 0x08, 0x0c, 0x7c, 0x20, - 0x0c, 0x90, 0x00, 0xe3, 0x08, 0xe8, 0x00, 0x05, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x42, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x2c, 0x7c, 0x20, 0x7e, 0x6a, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x42, 0x7c, 0x20, 0x7c, 0x2c, 0x7e, 0xab, - 0x7e, 0xec, 0x7f, 0x33, 0x7f, 0x47, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x42, - 0x7c, 0x2c, 0x7c, 0x56, 0x7c, 0x20, 0x7d, 0x1e, 0x7f, 0xf2, 0x80, 0x0d, - 0x7c, 0x20, 0x7c, 0x42, 0x7c, 0x20, 0x7c, 0x56, 0x7c, 0x20, 0x7c, 0x20, - 0x7d, 0x14, 0x80, 0x0d, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x6a, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x81, 0x89, 0x7c, 0x20, 0x81, 0x33, - 0x7c, 0x20, 0x81, 0x33, 0x7c, 0x20, 0x7c, 0x7f, 0x7c, 0x20, 0x7c, 0x20, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x20, 0x79, 0x00, 0x40, - 0x70, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x98, 0x78, 0x2c, 0x08, 0x0c, - 0x81, 0x2c, 0xd0, 0xa4, 0x01, 0x70, 0x78, 0x24, 0x20, 0x48, 0x90, 0x06, - 0xa8, 0x02, 0xa8, 0x06, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x8a, - 0x00, 0x1a, 0x12, 0x10, 0x00, 0x2b, 0x0c, 0x50, 0x00, 0xe9, 0x08, 0x0c, - 0x81, 0x03, 0x00, 0x05, 0x7c, 0x20, 0x7c, 0x2c, 0x7e, 0x56, 0x7c, 0x20, - 0x7c, 0x2c, 0x7c, 0x20, 0x7c, 0x2c, 0x7c, 0x2c, 0x7c, 0x20, 0x7c, 0x2c, - 0x7e, 0x56, 0x7c, 0x2c, 0x7c, 0x2c, 0x7c, 0x2c, 0x7c, 0x2c, 0x7c, 0x2c, - 0x7c, 0x20, 0x7c, 0x2c, 0x7e, 0x56, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x2c, - 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x20, 0x7c, 0x2c, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0xfa, 0x20, 0x09, 0x04, 0x00, 0x00, 0x71, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x09, 0x10, 0x00, 0x00, 0x49, 0x00, 0x05, 0x20, 0x09, 0x20, 0x00, - 0x00, 0x29, 0x00, 0x05, 0x20, 0x09, 0x08, 0x00, 0x00, 0x09, 0x00, 0x05, - 0x70, 0x07, 0x00, 0x01, 0xa8, 0x68, 0x90, 0x84, 0x00, 0xff, 0x91, 0x05, - 0xa8, 0x6a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, - 0x01, 0x2e, 0x00, 0x05, 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, - 0x0d, 0x08, 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, - 0x7d, 0xf3, 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, 0x29, 0x00, 0x70, 0x16, - 0x70, 0x1a, 0x70, 0x4b, 0x7d, 0xf3, 0x00, 0x05, 0xa8, 0x64, 0x80, 0x07, - 0x90, 0x84, 0x00, 0xff, 0x09, 0x68, 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, - 0x00, 0x01, 0x08, 0x04, 0x7e, 0x0e, 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, - 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x7e, 0x0e, 0x00, 0x05, - 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x09, 0x04, 0x7c, 0x28, - 0x80, 0x01, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, 0x7e, 0x2a, - 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, - 0x70, 0x4b, 0x7e, 0x2a, 0x00, 0x05, 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x01, 0x19, 0x04, 0x7c, 0x28, 0x70, 0x07, - 0x00, 0x01, 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, 0x81, 0xff, 0x19, 0x04, - 0x7c, 0xeb, 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x09, 0x04, - 0x7c, 0xd6, 0xa9, 0x9c, 0x91, 0x86, 0x00, 0xff, 0x05, 0xe8, 0xa9, 0x94, - 0x91, 0x86, 0x00, 0x6f, 0x01, 0x88, 0x91, 0x86, 0x00, 0x74, 0x15, 0xb0, - 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, - 0x05, 0x78, 0x00, 0x16, 0xa9, 0x98, 0x08, 0x0c, 0x6c, 0x7f, 0x00, 0x1e, - 0x15, 0x48, 0x04, 0x00, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x40, 0xa8, 0x97, - 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x16, 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, - 0x04, 0x38, 0x00, 0x26, 0x20, 0x11, 0x80, 0x08, 0x08, 0x0c, 0x6c, 0x35, - 0x00, 0x2e, 0x01, 0xb0, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0xa9, 0x98, - 0xaa, 0xa0, 0xab, 0x9c, 0x91, 0x8d, 0x80, 0x00, 0x08, 0x0c, 0x6c, 0x7f, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x11, 0x40, 0xa8, 0x97, 0x40, 0x05, - 0xa8, 0x9b, 0x40, 0x09, 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x00, 0x50, - 0xa8, 0x68, 0x90, 0x84, 0x00, 0xff, 0xa8, 0x6a, 0xa8, 0x83, 0x00, 0x00, - 0x08, 0x0c, 0x64, 0x30, 0x11, 0x08, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0xa8, 0x67, 0x01, 0x39, 0xa8, 0x7a, 0xa9, 0x82, 0x08, 0x0c, - 0x70, 0x12, 0x01, 0x2e, 0x0c, 0xa0, 0xa9, 0x94, 0x91, 0x86, 0x00, 0x71, - 0x09, 0x04, 0x7c, 0x8f, 0x91, 0x86, 0x00, 0x64, 0x09, 0x04, 0x7c, 0x8f, - 0x91, 0x86, 0x00, 0x7c, 0x09, 0x04, 0x7c, 0x8f, 0x91, 0x86, 0x00, 0x28, - 0x09, 0x04, 0x7c, 0x8f, 0x91, 0x86, 0x00, 0x38, 0x09, 0x04, 0x7c, 0x8f, - 0x91, 0x86, 0x00, 0x78, 0x09, 0x04, 0x7c, 0x8f, 0x91, 0x86, 0x00, 0x5f, - 0x09, 0x04, 0x7c, 0x8f, 0x91, 0x86, 0x00, 0x56, 0x09, 0x04, 0x7c, 0x8f, - 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x01, 0x20, 0x01, 0x00, 0x30, - 0x90, 0x0e, 0x08, 0x60, 0xa8, 0x7c, 0x90, 0x84, 0x00, 0xc0, 0x90, 0x86, - 0x00, 0xc0, 0x11, 0x20, 0x70, 0x07, 0x00, 0x01, 0x08, 0x04, 0x80, 0x24, - 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x30, 0x20, 0x98, 0x70, 0x50, - 0x20, 0x40, 0xa0, 0x60, 0x20, 0xe8, 0xa0, 0x5c, 0x90, 0x80, 0x00, 0x23, - 0x20, 0xa0, 0x40, 0x03, 0xa8, 0x88, 0x70, 0x12, 0x90, 0x82, 0x04, 0x01, - 0x1a, 0x04, 0x7c, 0x30, 0xaa, 0xb4, 0x92, 0x8a, 0x00, 0x02, 0x1a, 0x04, - 0x7c, 0x30, 0x82, 0xff, 0x11, 0x38, 0xa8, 0xb8, 0xa9, 0xbc, 0x91, 0x05, - 0x01, 0x18, 0x20, 0x01, 0x7d, 0xb1, 0x00, 0x18, 0x92, 0x80, 0x7d, 0xa7, - 0x20, 0x05, 0x70, 0x56, 0x70, 0x10, 0x90, 0x15, 0x09, 0x04, 0x7d, 0x92, - 0x08, 0x0c, 0x10, 0x72, 0x11, 0x18, 0x70, 0x07, 0x00, 0x04, 0x00, 0x05, - 0x29, 0x00, 0x70, 0x22, 0x70, 0x54, 0x20, 0x60, 0xe0, 0x00, 0xa8, 0x66, - 0x70, 0x50, 0x20, 0x40, 0xa9, 0x5c, 0xe0, 0x04, 0x91, 0x00, 0xa0, 0x76, - 0xa8, 0x60, 0xa0, 0x72, 0xe0, 0x08, 0x92, 0x0a, 0x12, 0x10, 0x90, 0x0e, - 0x22, 0x00, 0x71, 0x12, 0xe2, 0x0c, 0x80, 0x03, 0x80, 0x0b, 0x92, 0x96, - 0x00, 0x04, 0x01, 0x08, 0x91, 0x08, 0xa1, 0x7a, 0x81, 0x0b, 0xa1, 0x7e, - 0x08, 0x0c, 0x11, 0x4e, 0xa0, 0x6c, 0x90, 0x8e, 0x01, 0x00, 0x01, 0x70, - 0x90, 0x86, 0x02, 0x00, 0x01, 0x18, 0x70, 0x07, 0x00, 0x07, 0x00, 0x05, - 0x70, 0x20, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x8b, 0x70, 0x14, 0x20, 0x48, - 0x08, 0x04, 0x7c, 0x30, 0x70, 0x20, 0x20, 0x48, 0x70, 0x18, 0xa8, 0x02, - 0xa8, 0x07, 0x00, 0x00, 0x29, 0x08, 0x20, 0x48, 0xa9, 0x06, 0x71, 0x1a, - 0x08, 0x04, 0x7d, 0x4a, 0x70, 0x14, 0x20, 0x48, 0x70, 0x07, 0x00, 0x01, - 0xa8, 0xb4, 0x90, 0x05, 0x11, 0x28, 0xa8, 0xb8, 0xa9, 0xbc, 0x91, 0x05, - 0x01, 0x08, 0x00, 0xb9, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x1e, 0x09, 0x04, 0x80, 0x24, 0x08, 0x04, 0x7d, 0xf3, 0x7d, 0xa9, - 0x7d, 0xad, 0x00, 0x02, 0x00, 0x1d, 0x00, 0x07, 0x00, 0x04, 0x00, 0x0a, - 0x00, 0x1b, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x1d, 0x00, 0x05, - 0x00, 0x04, 0x00, 0x76, 0x00, 0x66, 0xaf, 0xb8, 0xae, 0xbc, 0xa8, 0x04, - 0x20, 0x50, 0xb0, 0xc0, 0xb0, 0xe2, 0xb0, 0xbc, 0xb0, 0xde, 0xb0, 0xb8, - 0xb0, 0xd2, 0xb0, 0xb4, 0xb0, 0xce, 0xb6, 0xda, 0xb7, 0xd6, 0xb0, 0xb0, - 0xb0, 0xca, 0xb0, 0xac, 0xb0, 0xc6, 0xb0, 0xa8, 0xb0, 0xba, 0xb0, 0xa4, - 0xb0, 0xb6, 0xb6, 0xc2, 0xb7, 0xbe, 0xb0, 0xa0, 0xb0, 0xb2, 0xb0, 0x9c, - 0xb0, 0xae, 0xb0, 0x98, 0xb0, 0xa2, 0xb0, 0x94, 0xb0, 0x9e, 0xb6, 0xaa, - 0xb7, 0xa6, 0xb0, 0x90, 0xb0, 0x9a, 0xb0, 0x8c, 0xb0, 0x96, 0xb0, 0x88, - 0xb0, 0x8a, 0xb0, 0x84, 0xb0, 0x86, 0xb6, 0x92, 0xb7, 0x8e, 0xb0, 0x80, - 0xb0, 0x82, 0xb0, 0x7c, 0xb0, 0x7e, 0xb0, 0x78, 0xb0, 0x72, 0xb0, 0x74, - 0xb0, 0x6e, 0xb6, 0x7a, 0xb7, 0x76, 0xb0, 0x04, 0x90, 0x55, 0x19, 0x58, - 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x05, 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, - 0x81, 0xff, 0x11, 0x78, 0x08, 0x0c, 0x62, 0x2f, 0x11, 0x08, 0x00, 0x05, - 0x08, 0x0c, 0x72, 0x5e, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xd2, 0x20, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x0c, 0xa0, 0x08, 0x0c, - 0xd6, 0x3e, 0x1d, 0x70, 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, 0x0c, 0x70, - 0x20, 0x09, 0x18, 0x34, 0x21, 0x0c, 0x81, 0xff, 0x11, 0x88, 0xa8, 0x88, - 0x90, 0x05, 0x01, 0x88, 0xa8, 0x83, 0x00, 0x00, 0x08, 0x0c, 0x62, 0xbd, - 0x11, 0x08, 0x00, 0x05, 0xa8, 0x7a, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x0c, 0xb8, 0x20, 0x01, 0x00, 0x28, - 0x0c, 0xa8, 0x20, 0x01, 0x00, 0x00, 0x0c, 0x90, 0x04, 0x19, 0x11, 0xd8, - 0xa8, 0x88, 0x90, 0x05, 0x01, 0xe0, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x7c, - 0xd0, 0xf4, 0x01, 0x20, 0x08, 0x0c, 0x63, 0x92, 0x11, 0x38, 0x00, 0x05, - 0x90, 0x06, 0xa8, 0x7a, 0x08, 0x0c, 0x63, 0x0a, 0x11, 0x08, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0xa8, 0x7a, 0xa9, 0x82, 0x08, 0x0c, - 0x70, 0x12, 0x01, 0x2e, 0x0c, 0xb0, 0x20, 0x01, 0x00, 0x28, 0x90, 0x0e, - 0x0c, 0x98, 0x20, 0x01, 0x00, 0x00, 0x0c, 0x80, 0x00, 0xc6, 0x20, 0x61, - 0x18, 0x00, 0x60, 0xd0, 0x90, 0x05, 0x01, 0x00, 0x00, 0xce, 0x00, 0x05, - 0x70, 0x18, 0xa8, 0x02, 0x29, 0x08, 0x20, 0x48, 0xa9, 0x06, 0x71, 0x1a, - 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, 0x01, 0x18, 0x70, 0x07, 0x00, 0x03, - 0x00, 0x30, 0x70, 0x14, 0x20, 0x48, 0x70, 0x07, 0x00, 0x01, 0x70, 0x48, - 0x08, 0x0f, 0x00, 0x05, 0x00, 0xb6, 0x70, 0x07, 0x00, 0x01, 0xa9, 0x74, - 0xa8, 0x78, 0x90, 0x84, 0x00, 0xff, 0x90, 0x96, 0x00, 0x04, 0x05, 0x40, - 0x20, 0xa9, 0x00, 0x01, 0x90, 0x96, 0x00, 0x01, 0x01, 0x90, 0x90, 0x0e, - 0x20, 0xa9, 0x08, 0x00, 0x90, 0x96, 0x00, 0x02, 0x01, 0x60, 0x90, 0x05, - 0x11, 0xd8, 0xa9, 0x74, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0xb8, 0x00, 0x66, - 0xae, 0x80, 0x08, 0x0c, 0x68, 0xc4, 0x00, 0x6e, 0x00, 0x88, 0x00, 0x46, - 0x20, 0x11, 0x18, 0x0c, 0x22, 0x24, 0xc4, 0x84, 0x24, 0x12, 0x00, 0x4e, - 0x00, 0xc6, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0x10, 0x08, 0x0c, 0x6a, 0x9e, - 0x81, 0x08, 0x1f, 0x04, 0x7e, 0x93, 0x00, 0xce, 0xa8, 0x7c, 0xd0, 0x84, - 0x11, 0x20, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0xbe, 0x00, 0x05, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x00, 0xbe, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, - 0x08, 0x0c, 0x6c, 0x0d, 0x05, 0x80, 0x20, 0x61, 0x1a, 0x73, 0x61, 0x00, - 0xd1, 0x84, 0x01, 0x78, 0xa8, 0x88, 0x90, 0x84, 0x00, 0xff, 0x15, 0x50, - 0x60, 0x00, 0xd0, 0x84, 0x05, 0x20, 0x60, 0x04, 0x90, 0x05, 0x15, 0x38, - 0x60, 0x03, 0x00, 0x00, 0x60, 0x0b, 0x00, 0x00, 0x00, 0xc8, 0x20, 0x11, - 0x00, 0x01, 0xa8, 0x90, 0x90, 0x05, 0x11, 0x10, 0x20, 0x01, 0x00, 0x1e, - 0x80, 0x00, 0x60, 0x16, 0xa8, 0x88, 0x90, 0x84, 0x00, 0xff, 0x01, 0x78, - 0x60, 0x06, 0xa8, 0x88, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x01, 0x48, - 0x60, 0x0a, 0xa8, 0x88, 0x80, 0x00, 0x11, 0x08, 0xc2, 0x8d, 0x62, 0x02, - 0x01, 0x2e, 0x08, 0x04, 0x80, 0xed, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xe7, - 0x01, 0x2e, 0x08, 0x04, 0x80, 0xe1, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xe4, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0x08, 0x0c, - 0x6c, 0x0d, 0x05, 0xe0, 0x20, 0x61, 0x1a, 0x73, 0x60, 0x00, 0xd0, 0x84, - 0x05, 0xb8, 0x62, 0x04, 0x63, 0x08, 0xd0, 0x8c, 0x15, 0x30, 0xac, 0x78, - 0x94, 0x84, 0x00, 0x03, 0x01, 0x70, 0xa9, 0x88, 0x91, 0x8c, 0x00, 0xff, - 0x80, 0x01, 0x11, 0x20, 0x21, 0x00, 0x92, 0x10, 0x06, 0x20, 0x00, 0x28, - 0x80, 0x01, 0x15, 0x08, 0x21, 0x00, 0x92, 0x12, 0x02, 0xf0, 0x94, 0x84, - 0x00, 0x0c, 0x01, 0x88, 0xa9, 0x88, 0x81, 0x0f, 0x91, 0x8c, 0x00, 0xff, - 0x90, 0x82, 0x00, 0x04, 0x11, 0x20, 0x21, 0x00, 0x93, 0x18, 0x02, 0x88, - 0x00, 0x30, 0x90, 0x82, 0x00, 0x04, 0x11, 0x68, 0x21, 0x00, 0x93, 0x1a, - 0x02, 0x50, 0xa8, 0x90, 0x90, 0x05, 0x01, 0x10, 0x80, 0x00, 0x60, 0x16, - 0x62, 0x06, 0x63, 0x0a, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xed, 0x01, 0x2e, - 0x08, 0x04, 0x80, 0xea, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xe7, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x07, 0x00, 0x01, 0x20, 0x61, 0x1a, 0x73, - 0x63, 0x00, 0xd3, 0x8c, 0x11, 0x20, 0x63, 0x08, 0x83, 0x18, 0x02, 0x20, - 0x63, 0x0a, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xfb, 0x01, 0x2e, 0x08, 0x04, - 0x80, 0xea, 0x00, 0xb6, 0x01, 0x26, 0x00, 0xc6, 0x20, 0x91, 0x80, 0x00, - 0x70, 0x07, 0x00, 0x01, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x48, 0x00, 0xc6, - 0x20, 0x61, 0x1a, 0x73, 0x60, 0x00, 0x90, 0x84, 0xfc, 0xff, 0x60, 0x02, - 0x00, 0xce, 0x04, 0x40, 0xa8, 0x88, 0x90, 0x05, 0x05, 0xd8, 0xa8, 0x8c, - 0x90, 0x65, 0x05, 0x98, 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, - 0x01, 0x18, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x68, 0x60, 0x17, 0xf4, 0x00, - 0x60, 0x63, 0x00, 0x00, 0xa9, 0x7c, 0xd1, 0xa4, 0x01, 0x10, 0xa9, 0x80, - 0x61, 0x62, 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xb2, 0x0a, 0xa9, 0x88, - 0x91, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x20, 0x00, 0x11, 0x38, 0x00, 0x26, - 0x90, 0x0e, 0x20, 0x11, 0xfd, 0xff, 0x08, 0x0c, 0x8c, 0x44, 0x00, 0x2e, - 0xa8, 0x7c, 0xd0, 0xc4, 0x01, 0x48, 0x20, 0x61, 0x1a, 0x73, 0x60, 0x00, - 0xd0, 0x8c, 0x11, 0x20, 0x60, 0x08, 0x80, 0x00, 0x02, 0x08, 0x60, 0x0a, - 0x00, 0xce, 0x01, 0x2e, 0x00, 0xbe, 0x08, 0x04, 0x80, 0xed, 0x00, 0xce, - 0x01, 0x2e, 0x00, 0xbe, 0x08, 0x04, 0x80, 0xe7, 0xa9, 0x84, 0x91, 0x86, - 0x00, 0x2e, 0x0d, 0x30, 0x91, 0x86, 0x00, 0x2d, 0x0d, 0x18, 0x91, 0x86, - 0x00, 0x45, 0x05, 0x10, 0x91, 0x86, 0x00, 0x2a, 0x11, 0x30, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0x94, 0x21, 0x02, 0x08, 0xb8, 0x91, 0x86, - 0x00, 0x20, 0x01, 0x58, 0x91, 0x86, 0x00, 0x29, 0x1d, 0x10, 0xa9, 0x74, - 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x68, 0xb8, 0x00, 0xc0, 0xe4, 0xb8, 0x02, - 0x08, 0x48, 0xa8, 0x8c, 0x90, 0x65, 0x09, 0xb8, 0x60, 0x07, 0x00, 0x24, - 0x20, 0x01, 0x19, 0x86, 0x20, 0x04, 0x60, 0x1a, 0x08, 0x04, 0x7f, 0x82, - 0xa8, 0x8c, 0x90, 0x65, 0x09, 0x60, 0x00, 0xe6, 0xa8, 0x90, 0x90, 0x75, - 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x01, 0x50, 0x08, 0x0c, - 0xb1, 0xa7, 0x8e, 0xff, 0x01, 0x18, 0x2e, 0x60, 0x08, 0x0c, 0xb1, 0xa7, - 0x00, 0xee, 0x08, 0x04, 0x7f, 0x82, 0x60, 0x24, 0xc0, 0xdc, 0xc0, 0xd5, - 0x60, 0x26, 0x2e, 0x60, 0x60, 0x07, 0x00, 0x3a, 0xa8, 0xa0, 0x90, 0x05, - 0x01, 0x30, 0x60, 0x07, 0x00, 0x3b, 0xa8, 0xa4, 0x60, 0x2e, 0xa8, 0xa8, - 0x60, 0x16, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, - 0x96, 0x17, 0x00, 0xee, 0x08, 0x04, 0x7f, 0x82, 0x20, 0x61, 0x1a, 0x73, - 0x60, 0x00, 0xd0, 0x84, 0x01, 0x90, 0xd0, 0x8c, 0x19, 0x04, 0x80, 0xfb, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x62, 0x04, 0x82, 0x10, 0x02, 0x20, - 0x62, 0x06, 0x01, 0x2e, 0x08, 0x04, 0x80, 0xfb, 0x01, 0x2e, 0xa8, 0x83, - 0x00, 0x16, 0x08, 0x04, 0x80, 0xf4, 0xa8, 0x83, 0x00, 0x07, 0x08, 0x04, - 0x80, 0xf4, 0xa8, 0x64, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x01, 0x30, - 0x80, 0x01, 0x11, 0x38, 0x70, 0x07, 0x00, 0x01, 0x00, 0x69, 0x00, 0x05, - 0x08, 0x0c, 0x7c, 0x28, 0x00, 0x40, 0x70, 0x07, 0x00, 0x03, 0x70, 0x12, - 0x29, 0x00, 0x70, 0x16, 0x70, 0x1a, 0x70, 0x4b, 0x80, 0x24, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x90, 0x3e, - 0x20, 0x61, 0x18, 0x00, 0x61, 0xd0, 0x81, 0xff, 0x19, 0x04, 0x80, 0xa6, - 0x61, 0x30, 0xd1, 0x94, 0x19, 0x04, 0x80, 0xd0, 0xa8, 0x78, 0x20, 0x70, - 0x9e, 0x82, 0x1d, 0xdc, 0x0a, 0x04, 0x80, 0x9a, 0x60, 0x68, 0x9e, 0x02, - 0x1a, 0x04, 0x80, 0x9a, 0x71, 0x20, 0x91, 0x86, 0x00, 0x06, 0x19, 0x04, - 0x80, 0x8c, 0x70, 0x10, 0x90, 0x5d, 0x09, 0x04, 0x80, 0xa6, 0xb8, 0x00, - 0xd0, 0xe4, 0x19, 0x04, 0x80, 0xca, 0x20, 0x61, 0x1a, 0x73, 0x61, 0x00, - 0x91, 0x84, 0x03, 0x01, 0x90, 0x86, 0x00, 0x01, 0x15, 0xa0, 0x70, 0x24, - 0xd0, 0xdc, 0x19, 0x04, 0x80, 0xd3, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x03, - 0x00, 0x00, 0x29, 0x08, 0x70, 0x14, 0x90, 0x05, 0x11, 0x98, 0x71, 0x16, - 0xa8, 0x7c, 0xd0, 0xf4, 0x19, 0x04, 0x80, 0xd6, 0x08, 0x0c, 0x58, 0x40, - 0xd0, 0x9c, 0x11, 0x18, 0xa8, 0x7c, 0xc0, 0xcc, 0xa8, 0x7e, 0x2e, 0x60, - 0x08, 0x0c, 0x8b, 0x34, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, - 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, 0x1d, 0xe0, 0xa9, 0x02, 0x21, 0x48, - 0xa8, 0x7c, 0xd0, 0xf4, 0x19, 0x04, 0x80, 0xd6, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0xbe, 0x00, 0x05, 0x01, 0x2e, 0x00, 0xee, 0xa8, 0x83, 0x00, 0x06, - 0x00, 0xbe, 0x08, 0x04, 0x80, 0xf4, 0xd1, 0x84, 0x0d, 0xb8, 0xd1, 0xc4, - 0x11, 0x90, 0x00, 0xa0, 0xa9, 0x74, 0x08, 0x0c, 0x67, 0xb4, 0x15, 0xd0, - 0xb8, 0x00, 0xd0, 0xe4, 0x15, 0xb8, 0x71, 0x20, 0x91, 0x86, 0x00, 0x07, - 0x11, 0x18, 0xa8, 0x83, 0x00, 0x02, 0x04, 0x90, 0xa8, 0x83, 0x00, 0x08, - 0x04, 0x78, 0xa8, 0x83, 0x00, 0x0e, 0x04, 0x60, 0xa8, 0x83, 0x00, 0x17, - 0x04, 0x48, 0xa8, 0x83, 0x00, 0x35, 0x04, 0x30, 0x08, 0x0c, 0x58, 0x44, - 0xd0, 0xfc, 0x01, 0xe8, 0xa8, 0x78, 0x20, 0x70, 0x9e, 0x82, 0x1d, 0xdc, - 0x02, 0xc0, 0x60, 0x68, 0x9e, 0x02, 0x12, 0xa8, 0x71, 0x20, 0x91, 0x86, - 0x00, 0x06, 0x11, 0x88, 0x70, 0x10, 0x90, 0x5d, 0x01, 0x70, 0xb8, 0x00, - 0xd0, 0xbc, 0x01, 0x58, 0x20, 0x39, 0x00, 0x01, 0x70, 0x00, 0x90, 0x86, - 0x00, 0x07, 0x19, 0x04, 0x80, 0x30, 0x70, 0x03, 0x00, 0x02, 0x08, 0x04, - 0x80, 0x30, 0xa8, 0x83, 0x00, 0x28, 0x00, 0x10, 0xa8, 0x83, 0x00, 0x29, - 0x01, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x04, 0x20, 0xa8, 0x83, 0x00, 0x2a, - 0x0c, 0xc8, 0xa8, 0x83, 0x00, 0x45, 0x0c, 0xb0, 0x2e, 0x60, 0x20, 0x19, - 0x00, 0x02, 0x60, 0x1b, 0x00, 0x14, 0x08, 0x0c, 0xe5, 0x86, 0x01, 0x2e, - 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x09, 0x00, 0x3e, 0x00, 0x58, - 0x20, 0x09, 0x00, 0x04, 0x00, 0x40, 0x20, 0x09, 0x00, 0x06, 0x00, 0x28, - 0x20, 0x09, 0x00, 0x16, 0x00, 0x10, 0x20, 0x09, 0x00, 0x01, 0xa8, 0x84, - 0x90, 0x84, 0xff, 0x00, 0x91, 0x05, 0xa8, 0x86, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, - 0x10, 0x8b, 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0x8b, 0x2b, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x00, 0x40, 0x70, 0x2c, 0xd0, 0x84, 0x01, 0xd8, 0x90, 0x8c, - 0x07, 0x80, 0x19, 0x0c, 0x81, 0xe5, 0xd0, 0x9c, 0x11, 0xa8, 0x20, 0x71, - 0x18, 0x00, 0x70, 0xc0, 0x90, 0xea, 0x00, 0x20, 0x02, 0x78, 0x80, 0x01, - 0x70, 0xc2, 0x70, 0x2c, 0x20, 0x48, 0xa8, 0x00, 0x70, 0x2e, 0x90, 0x06, - 0xa8, 0x02, 0xa8, 0x06, 0x20, 0x71, 0x00, 0x40, 0x29, 0x00, 0x70, 0x22, - 0x70, 0x2c, 0x0c, 0x28, 0x01, 0x2e, 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, - 0x00, 0x06, 0x90, 0x84, 0x07, 0x80, 0x19, 0x0c, 0x81, 0xe5, 0x00, 0x0e, - 0x00, 0x05, 0xa8, 0x98, 0x90, 0x84, 0x00, 0x03, 0x05, 0xa8, 0x08, 0x0c, - 0xb1, 0x16, 0x05, 0xd8, 0x29, 0x00, 0x60, 0x16, 0xa8, 0x64, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x86, 0x00, 0x35, 0x11, 0x38, 0x60, 0x28, 0xc0, 0xfd, - 0x60, 0x2a, 0x20, 0x01, 0x19, 0x6b, 0x20, 0x04, 0x00, 0x98, 0xa8, 0xa0, - 0x90, 0x84, 0x00, 0xff, 0xa9, 0x9c, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, - 0xa9, 0x9c, 0x91, 0x8c, 0x00, 0xff, 0x08, 0x0c, 0x26, 0x8c, 0x15, 0x40, - 0x00, 0xb6, 0x08, 0x0c, 0x67, 0xb4, 0x2b, 0x00, 0x00, 0xbe, 0x15, 0x10, - 0x60, 0x12, 0x60, 0x23, 0x00, 0x01, 0x20, 0x09, 0x00, 0x40, 0xa8, 0x64, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x35, 0x01, 0x10, 0x20, 0x09, - 0x00, 0x41, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0xa8, 0x7b, 0x01, 0x01, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, - 0x00, 0x05, 0xa8, 0x7b, 0x00, 0x2c, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x00, 0x05, 0xa8, 0x7b, 0x00, 0x28, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x36, - 0x00, 0x26, 0x00, 0x16, 0x00, 0xb6, 0x70, 0x07, 0x00, 0x01, 0xaa, 0x74, - 0x92, 0x82, 0x00, 0x04, 0x1a, 0x04, 0x81, 0xd6, 0xa9, 0x7c, 0x91, 0x88, - 0x10, 0x00, 0x21, 0x04, 0x90, 0x5d, 0xb8, 0x04, 0xd2, 0x84, 0x01, 0x40, - 0x05, 0xe8, 0x80, 0x07, 0x90, 0x84, 0x00, 0xff, 0x90, 0x84, 0x00, 0x06, - 0x11, 0x08, 0x04, 0xb0, 0x2b, 0x10, 0x08, 0x0c, 0xb1, 0x16, 0x11, 0x18, - 0x08, 0x0c, 0xb1, 0xdd, 0x05, 0xa8, 0x62, 0x12, 0xa8, 0x74, 0x00, 0x02, - 0x81, 0xb4, 0x81, 0xb9, 0x81, 0xbc, 0x81, 0xc2, 0x20, 0x19, 0x00, 0x02, - 0x08, 0x0c, 0xe9, 0xf9, 0x00, 0x60, 0x08, 0x0c, 0xe9, 0x84, 0x00, 0x48, - 0x20, 0x19, 0x00, 0x02, 0xa9, 0x80, 0x08, 0x0c, 0xe9, 0xa3, 0x00, 0x18, - 0xa9, 0x80, 0x08, 0x0c, 0xe9, 0x84, 0x08, 0x0c, 0xb1, 0x6c, 0xa8, 0x87, - 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0x05, 0xa8, 0x87, 0x00, 0x06, 0x0c, 0x80, 0xa8, 0x87, - 0x00, 0x02, 0x0c, 0x68, 0xa8, 0x87, 0x00, 0x05, 0x0c, 0x50, 0xa8, 0x87, - 0x00, 0x04, 0x0c, 0x38, 0xa8, 0x87, 0x00, 0x07, 0x0c, 0x20, 0x20, 0x91, - 0x80, 0x00, 0x0e, 0x04, 0x81, 0xe7, 0x00, 0x06, 0x00, 0x16, 0x20, 0x01, - 0x80, 0x03, 0x00, 0x06, 0x08, 0x04, 0x0d, 0x8e, 0x20, 0x01, 0x18, 0x34, - 0x20, 0x04, 0x90, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, - 0x03, 0x00, 0x20, 0x01, 0x02, 0x00, 0x20, 0x0c, 0xc1, 0xe5, 0xc1, 0xdc, - 0x21, 0x02, 0x20, 0x09, 0x02, 0x18, 0x21, 0x0c, 0xd1, 0xec, 0x11, 0x20, - 0x08, 0x0c, 0x16, 0x48, 0x00, 0xfe, 0x00, 0x05, 0x20, 0x01, 0x02, 0x0d, - 0x20, 0x03, 0x00, 0x20, 0x78, 0x1f, 0x03, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x78, 0x1c, 0xd0, 0x8c, 0x09, 0x04, 0x82, 0x68, 0x68, 0xc0, 0x90, 0xaa, - 0x00, 0x05, 0x0a, 0x04, 0x88, 0x90, 0x7d, 0x44, 0x7c, 0x40, 0xd5, 0x9c, - 0x19, 0x0c, 0x0d, 0x85, 0x95, 0x84, 0x00, 0xf6, 0x15, 0x08, 0x94, 0x84, - 0x70, 0x00, 0x01, 0x38, 0x90, 0x8a, 0x20, 0x00, 0x12, 0x58, 0x95, 0x84, - 0x07, 0x00, 0x80, 0x07, 0x04, 0xf0, 0x70, 0x00, 0x90, 0x84, 0xff, 0x00, - 0x90, 0x86, 0x81, 0x00, 0x0d, 0xb0, 0x00, 0xb0, 0x94, 0x84, 0x0f, 0xff, - 0x11, 0x30, 0x70, 0x00, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x81, 0x00, - 0x11, 0xc0, 0x08, 0x0c, 0xee, 0xb1, 0x08, 0x0c, 0x87, 0x77, 0x78, 0x17, - 0x01, 0x40, 0x00, 0xa8, 0x95, 0x84, 0x00, 0x76, 0x11, 0x18, 0x08, 0x0c, - 0x87, 0xd3, 0x19, 0xc8, 0xd5, 0xa4, 0x01, 0x48, 0x00, 0x46, 0x00, 0x56, - 0x08, 0x0c, 0x82, 0xb8, 0x08, 0x0c, 0x21, 0x85, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x20, 0x08, 0x0c, 0xee, 0xb1, 0x78, 0x17, 0x01, 0x40, 0x08, 0x0c, - 0x77, 0x9e, 0x01, 0x68, 0x20, 0x01, 0x01, 0x11, 0x20, 0x04, 0xd0, 0x8c, - 0x01, 0x40, 0x68, 0x93, 0x00, 0x00, 0x20, 0x01, 0x01, 0x10, 0x20, 0x03, - 0x00, 0x08, 0x20, 0x03, 0x00, 0x00, 0x04, 0x89, 0x00, 0x05, 0x00, 0x02, - 0x82, 0x75, 0x85, 0x85, 0x82, 0x72, 0x82, 0x72, 0x82, 0x72, 0x82, 0x72, - 0x82, 0x72, 0x82, 0x72, 0x78, 0x17, 0x01, 0x40, 0x00, 0x05, 0x70, 0x00, - 0x90, 0x8c, 0xff, 0x00, 0x91, 0x94, 0xf0, 0x00, 0x81, 0x0f, 0x94, 0x84, - 0x0f, 0xff, 0x68, 0x92, 0x92, 0x86, 0x20, 0x00, 0x11, 0x50, 0x68, 0x00, - 0x90, 0x86, 0x00, 0x01, 0x11, 0x18, 0x08, 0x0c, 0x58, 0xaa, 0x00, 0x70, - 0x08, 0x0c, 0x82, 0xd8, 0x00, 0x58, 0x92, 0x86, 0x30, 0x00, 0x11, 0x18, - 0x08, 0x0c, 0x84, 0xbf, 0x00, 0x28, 0x92, 0x86, 0x80, 0x00, 0x11, 0x10, - 0x08, 0x0c, 0x86, 0xa4, 0x78, 0x17, 0x01, 0x40, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x78, 0x20, 0x01, 0x18, 0x00, - 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x48, 0x00, 0x26, 0x00, 0x36, - 0x20, 0x11, 0x80, 0x48, 0x25, 0x18, 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x05, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0xf6, - 0x20, 0x79, 0x02, 0x00, 0x20, 0x19, 0xff, 0xfe, 0x7c, 0x30, 0x00, 0x50, - 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, - 0x7d, 0x44, 0x7c, 0x40, 0x20, 0x19, 0xff, 0xff, 0x20, 0x01, 0x18, 0x10, - 0x20, 0x04, 0xd0, 0x8c, 0x01, 0x60, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, - 0x90, 0x86, 0x00, 0x03, 0x11, 0x30, 0x00, 0x26, 0x20, 0x11, 0x80, 0x48, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x2e, 0x00, 0xfe, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x70, 0x10, 0x90, 0x84, - 0xff, 0x00, 0x80, 0x07, 0x90, 0x96, 0x00, 0x01, 0x01, 0x20, 0x90, 0x96, - 0x00, 0x23, 0x19, 0x04, 0x84, 0x90, 0x91, 0x86, 0x00, 0x23, 0x15, 0xc0, - 0x08, 0x0c, 0x87, 0x42, 0x09, 0x04, 0x84, 0x90, 0x61, 0x20, 0x91, 0x86, - 0x00, 0x01, 0x01, 0x50, 0x91, 0x86, 0x00, 0x04, 0x01, 0x38, 0x91, 0x86, - 0x00, 0x08, 0x01, 0x20, 0x91, 0x86, 0x00, 0x0a, 0x19, 0x04, 0x84, 0x90, - 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, 0x90, 0x8e, 0x02, 0x00, 0x11, 0x30, - 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0xb2, 0x0a, 0x08, 0x04, 0x84, 0x90, - 0x90, 0x8e, 0x02, 0x14, 0x01, 0x18, 0x90, 0x8e, 0x02, 0x10, 0x11, 0x30, - 0x20, 0x09, 0x00, 0x15, 0x08, 0x0c, 0xb2, 0x0a, 0x08, 0x04, 0x84, 0x90, - 0x90, 0x8e, 0x01, 0x00, 0x19, 0x04, 0x84, 0x90, 0x70, 0x34, 0x90, 0x05, - 0x19, 0x04, 0x84, 0x90, 0x20, 0x09, 0x00, 0x16, 0x08, 0x0c, 0xb2, 0x0a, - 0x08, 0x04, 0x84, 0x90, 0x91, 0x86, 0x00, 0x22, 0x19, 0x04, 0x84, 0x90, - 0x70, 0x30, 0x90, 0x8e, 0x03, 0x00, 0x15, 0x80, 0x68, 0xdc, 0xd0, 0xa4, - 0x05, 0x28, 0xc0, 0xb5, 0x68, 0xde, 0x71, 0x00, 0x91, 0x8c, 0x00, 0xff, - 0x69, 0x7e, 0x70, 0x04, 0x68, 0x82, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, - 0x79, 0xe6, 0x78, 0xea, 0x00, 0x06, 0x90, 0x84, 0x00, 0xff, 0x00, 0x16, - 0x20, 0x08, 0x08, 0x0c, 0x26, 0xd5, 0x79, 0x32, 0x79, 0x36, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0xfe, 0x08, 0x0c, 0x26, 0x8c, 0x69, 0x5e, 0x70, 0x3c, - 0x00, 0xe6, 0x20, 0x71, 0x01, 0x40, 0x70, 0x86, 0x20, 0x71, 0x18, 0x00, - 0x70, 0xb6, 0x00, 0xee, 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x84, 0x90, - 0x20, 0x09, 0x00, 0x17, 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, 0x04, 0x00, - 0x11, 0x90, 0x70, 0x34, 0x90, 0x05, 0x19, 0x04, 0x84, 0x90, 0x08, 0x0c, - 0x77, 0x9e, 0x01, 0x20, 0x20, 0x09, 0x00, 0x1d, 0x08, 0x04, 0x84, 0x40, - 0x68, 0xdc, 0xc0, 0xa5, 0x68, 0xde, 0x20, 0x09, 0x00, 0x30, 0x08, 0x04, - 0x84, 0x40, 0x90, 0x8e, 0x05, 0x00, 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, - 0x19, 0x04, 0x84, 0x90, 0x20, 0x09, 0x00, 0x18, 0x08, 0x04, 0x84, 0x40, - 0x90, 0x8e, 0x20, 0x10, 0x11, 0x20, 0x20, 0x09, 0x00, 0x19, 0x08, 0x04, - 0x84, 0x40, 0x90, 0x8e, 0x21, 0x10, 0x11, 0x20, 0x20, 0x09, 0x00, 0x1a, - 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, 0x52, 0x00, 0x11, 0x40, 0x70, 0x34, - 0x90, 0x05, 0x19, 0x04, 0x84, 0x90, 0x20, 0x09, 0x00, 0x1b, 0x08, 0x04, - 0x84, 0x40, 0x90, 0x8e, 0x50, 0x00, 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, - 0x19, 0x04, 0x84, 0x90, 0x20, 0x09, 0x00, 0x1c, 0x08, 0x04, 0x84, 0x40, - 0x90, 0x8e, 0x13, 0x00, 0x11, 0x20, 0x20, 0x09, 0x00, 0x34, 0x08, 0x04, - 0x84, 0x40, 0x90, 0x8e, 0x12, 0x00, 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, - 0x19, 0x04, 0x84, 0x90, 0x20, 0x09, 0x00, 0x24, 0x08, 0x04, 0x84, 0x40, - 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, 0x24, 0x00, 0x11, 0x70, 0x20, 0x09, - 0x00, 0x2d, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0x9c, 0x09, 0x04, - 0x84, 0x40, 0x08, 0x0c, 0xdd, 0x8d, 0x19, 0x04, 0x84, 0x90, 0x08, 0x04, - 0x84, 0x3e, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, 0x53, 0x00, 0x11, 0x20, - 0x20, 0x09, 0x00, 0x2a, 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, 0x0f, 0x00, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x20, 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, - 0x61, 0x04, 0x15, 0x30, 0x20, 0x29, 0x02, 0x05, 0x20, 0x11, 0x02, 0x6d, - 0x82, 0x08, 0x22, 0x04, 0x90, 0x82, 0x00, 0x04, 0x80, 0x04, 0x80, 0x04, - 0x20, 0xa8, 0x20, 0x11, 0x80, 0x15, 0x21, 0x1c, 0x81, 0x08, 0x00, 0x46, - 0x21, 0x24, 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x4e, 0x81, 0x08, 0x0f, 0x04, - 0x83, 0xf4, 0x91, 0x86, 0x02, 0x80, 0x1d, 0x88, 0x25, 0x04, 0x80, 0x00, - 0x20, 0x2a, 0x20, 0x09, 0x02, 0x60, 0x0c, 0x58, 0x20, 0x2b, 0x00, 0x00, - 0x20, 0x09, 0x00, 0x23, 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, 0x60, 0x00, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x3f, 0x08, 0x04, 0x84, 0x40, 0x90, 0x8e, - 0x54, 0x00, 0x11, 0x38, 0x08, 0x0c, 0x88, 0x40, 0x19, 0x04, 0x84, 0x90, - 0x20, 0x09, 0x00, 0x46, 0x04, 0xa8, 0x90, 0x8e, 0x55, 0x00, 0x11, 0x48, - 0x08, 0x0c, 0x88, 0x68, 0x11, 0x18, 0x20, 0x09, 0x00, 0x41, 0x04, 0x60, - 0x20, 0x09, 0x00, 0x42, 0x04, 0x48, 0x90, 0x8e, 0x78, 0x00, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x45, 0x04, 0x18, 0x90, 0x8e, 0x10, 0x00, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x4e, 0x00, 0xe8, 0x90, 0x8e, 0x63, 0x00, 0x11, 0x18, - 0x20, 0x09, 0x00, 0x4a, 0x00, 0xb8, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x8e, - 0x56, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x4f, 0x00, 0x78, 0x90, 0x8c, - 0xff, 0x00, 0x91, 0x8e, 0x57, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x50, - 0x00, 0x38, 0x20, 0x09, 0x00, 0x1d, 0x68, 0x38, 0xd0, 0xd4, 0x01, 0x10, - 0x20, 0x09, 0x00, 0x4c, 0x00, 0x16, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, - 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x26, 0x8c, 0x19, 0x04, 0x84, 0x93, - 0x08, 0x0c, 0x67, 0x49, 0x19, 0x04, 0x84, 0x93, 0xbe, 0x12, 0xbd, 0x16, - 0x00, 0x1e, 0x00, 0x16, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0xc0, 0x68, 0xdc, - 0xd0, 0x8c, 0x11, 0x48, 0x70, 0x00, 0x90, 0x84, 0x00, 0xff, 0x11, 0x88, - 0x70, 0x04, 0x90, 0x84, 0xff, 0x00, 0x11, 0x68, 0x00, 0x40, 0x68, 0x7c, - 0x96, 0x06, 0x11, 0x48, 0x68, 0x80, 0x95, 0x06, 0x90, 0x84, 0xff, 0x00, - 0x11, 0x20, 0x95, 0x84, 0x00, 0xff, 0xb8, 0x86, 0x00, 0x80, 0xb8, 0x84, - 0x90, 0x05, 0x11, 0x68, 0x91, 0x86, 0x00, 0x46, 0x11, 0x50, 0x68, 0x7c, - 0x96, 0x06, 0x11, 0x38, 0x68, 0x80, 0x95, 0x06, 0x90, 0x84, 0xff, 0x00, - 0x11, 0x10, 0x00, 0x1e, 0x00, 0x98, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0xa8, - 0x2b, 0x08, 0x61, 0x12, 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, - 0x00, 0x1e, 0x91, 0x86, 0x00, 0x4c, 0x11, 0x10, 0x60, 0x23, 0x00, 0x0a, - 0x00, 0x16, 0x00, 0x1e, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0x1e, 0x0c, 0xd8, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, - 0xd0, 0xec, 0x01, 0x20, 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, 0x4c, 0xa1, - 0x08, 0x0c, 0xb1, 0xdd, 0x0d, 0x90, 0x2b, 0x08, 0x61, 0x12, 0x60, 0x23, - 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x00, 0x1e, 0x00, 0x16, 0x91, 0x86, - 0x00, 0x17, 0x01, 0x18, 0x91, 0x86, 0x00, 0x30, 0x11, 0x28, 0x60, 0x07, - 0x00, 0x09, 0x60, 0x17, 0x29, 0x00, 0x00, 0x20, 0x60, 0x07, 0x00, 0x51, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x09, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x1e, 0x08, 0xa0, 0x08, 0x0c, 0x88, 0xaf, 0x11, 0x58, - 0x08, 0x0c, 0x34, 0x4c, 0x11, 0x40, 0x70, 0x10, 0x90, 0x84, 0xff, 0x00, - 0x80, 0x07, 0x90, 0x8e, 0x00, 0x08, 0x11, 0x08, 0x00, 0x09, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0xc6, 0x00, 0x46, 0x70, 0x00, 0x90, 0x8c, 0xff, 0x00, - 0x81, 0x0f, 0x91, 0x86, 0x00, 0x33, 0x11, 0xe8, 0x08, 0x0c, 0x87, 0x42, - 0x09, 0x04, 0x85, 0x1d, 0x71, 0x24, 0x61, 0x0a, 0x70, 0x30, 0x90, 0x8e, - 0x02, 0x00, 0x11, 0x40, 0x70, 0x34, 0x90, 0x05, 0x15, 0xc0, 0x20, 0x09, - 0x00, 0x15, 0x08, 0x0c, 0xb2, 0x0a, 0x04, 0x98, 0x90, 0x8e, 0x01, 0x00, - 0x15, 0x80, 0x70, 0x34, 0x90, 0x05, 0x15, 0x68, 0x20, 0x09, 0x00, 0x16, - 0x08, 0x0c, 0xb2, 0x0a, 0x04, 0x40, 0x91, 0x86, 0x00, 0x32, 0x15, 0x28, - 0x70, 0x30, 0x90, 0x8e, 0x14, 0x00, 0x15, 0x08, 0x20, 0x09, 0x00, 0x38, - 0x00, 0x16, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, - 0x08, 0x0c, 0x26, 0x8c, 0x11, 0xa8, 0x08, 0x0c, 0x67, 0x49, 0x11, 0x90, - 0xbe, 0x12, 0xbd, 0x16, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x68, 0x2b, 0x08, - 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, - 0x61, 0x0a, 0x00, 0x1e, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x10, 0x00, 0xce, - 0x00, 0x1e, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0x46, 0x00, 0xe6, 0x00, 0xd6, 0x20, 0x28, 0x21, 0x30, 0x96, 0x96, - 0x00, 0xff, 0x11, 0xb8, 0x95, 0x92, 0xff, 0xfc, 0x02, 0xa0, 0x95, 0x96, - 0xff, 0xfd, 0x11, 0x20, 0x20, 0x09, 0x00, 0x7f, 0x08, 0x04, 0x85, 0x7f, - 0x95, 0x96, 0xff, 0xfe, 0x11, 0x20, 0x20, 0x09, 0x00, 0x7e, 0x08, 0x04, - 0x85, 0x7f, 0x95, 0x96, 0xff, 0xfc, 0x11, 0x18, 0x20, 0x09, 0x00, 0x80, - 0x04, 0xf0, 0x20, 0x11, 0x00, 0x00, 0x20, 0x19, 0x18, 0x37, 0x23, 0x1c, - 0xd3, 0xac, 0x01, 0x30, 0x90, 0x26, 0x20, 0xa9, 0x08, 0x00, 0x20, 0x71, - 0x10, 0x00, 0x00, 0x30, 0x20, 0x21, 0x00, 0x81, 0x20, 0xa9, 0x07, 0x7f, - 0x20, 0x71, 0x10, 0x81, 0x2e, 0x1c, 0x93, 0xdd, 0x00, 0x00, 0x11, 0x40, - 0x82, 0xff, 0x11, 0xd0, 0x94, 0x96, 0x00, 0xff, 0x01, 0xb8, 0x24, 0x10, - 0xc2, 0xfd, 0x00, 0xa0, 0xbf, 0x10, 0x26, 0x00, 0x97, 0x06, 0xb8, 0x14, - 0x11, 0x20, 0x95, 0x46, 0x11, 0x10, 0x24, 0x08, 0x00, 0xb0, 0x97, 0x45, - 0x11, 0x48, 0x94, 0xc6, 0x00, 0x7e, 0x01, 0x30, 0x94, 0xc6, 0x00, 0x7f, - 0x01, 0x18, 0x94, 0xc6, 0x00, 0x80, 0x1d, 0x20, 0x84, 0x20, 0x8e, 0x70, - 0x1f, 0x04, 0x85, 0x54, 0x82, 0xff, 0x11, 0x18, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x18, 0xc2, 0xfc, 0x22, 0x08, 0x90, 0x06, 0x00, 0xde, 0x00, 0xee, - 0x00, 0x4e, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, 0x18, 0x37, 0x20, 0x0c, - 0x91, 0x84, 0x00, 0x80, 0x01, 0x10, 0xd1, 0x8c, 0x01, 0x38, 0x70, 0x00, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x84, 0x00, 0x0f, 0x00, 0x1a, - 0x78, 0x17, 0x01, 0x40, 0x00, 0x05, 0x85, 0xa7, 0x85, 0xa7, 0x85, 0xa7, - 0x87, 0x54, 0x85, 0xa7, 0x85, 0xaa, 0x85, 0xcf, 0x86, 0x58, 0x85, 0xa7, - 0x85, 0xa7, 0x85, 0xa7, 0x85, 0xa7, 0x85, 0xa7, 0x85, 0xa7, 0x85, 0xa7, - 0x85, 0xa7, 0x78, 0x17, 0x01, 0x40, 0x00, 0x05, 0x00, 0xb6, 0x71, 0x10, - 0xd1, 0xbc, 0x01, 0xe8, 0x71, 0x20, 0x21, 0x60, 0x9c, 0x8c, 0x00, 0x03, - 0x11, 0xc0, 0x9c, 0x8a, 0x1d, 0xdc, 0x02, 0xa8, 0x68, 0x68, 0x9c, 0x02, - 0x12, 0x90, 0x70, 0x08, 0x90, 0x84, 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, - 0xb9, 0x10, 0x91, 0x06, 0x11, 0x50, 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, - 0x11, 0x30, 0x71, 0x24, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x46, 0x08, 0x0c, - 0xb2, 0x0a, 0x78, 0x17, 0x01, 0x40, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0xc6, 0x94, 0x84, 0x0f, 0xff, 0x09, 0x04, 0x86, 0x34, 0x71, 0x10, - 0xd1, 0xbc, 0x19, 0x04, 0x86, 0x34, 0x71, 0x08, 0x70, 0x0c, 0x20, 0x28, - 0x91, 0x8c, 0x00, 0xff, 0x21, 0x30, 0x90, 0x94, 0xff, 0x00, 0x15, 0xc8, - 0x81, 0xff, 0x15, 0xb8, 0x90, 0x80, 0x34, 0x8e, 0x20, 0x0d, 0x91, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x20, 0x01, 0x00, 0x80, 0x91, 0x06, 0x09, 0x04, - 0x86, 0x34, 0x91, 0x82, 0x08, 0x01, 0x1a, 0x04, 0x86, 0x34, 0x91, 0x90, - 0x10, 0x00, 0x22, 0x04, 0x90, 0x5d, 0x05, 0xe0, 0xbe, 0x12, 0xbd, 0x16, - 0xb8, 0x00, 0xd0, 0xec, 0x15, 0xb8, 0xba, 0x04, 0x92, 0x94, 0xff, 0x00, - 0x92, 0x86, 0x06, 0x00, 0x11, 0x90, 0x08, 0x0c, 0xb1, 0x16, 0x05, 0x98, - 0x2b, 0x08, 0x70, 0x28, 0x60, 0x4e, 0x70, 0x2c, 0x60, 0x52, 0x61, 0x12, - 0x60, 0x23, 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x5e, - 0x08, 0x0c, 0xe0, 0x09, 0x00, 0xf8, 0x08, 0x0c, 0x6c, 0x11, 0x11, 0x38, - 0xb8, 0x07, 0x06, 0x06, 0x0c, 0x40, 0x19, 0x0c, 0x85, 0x21, 0x11, 0xb0, - 0x08, 0x80, 0x08, 0x0c, 0xb1, 0x16, 0x2b, 0x08, 0x01, 0x88, 0x61, 0x12, - 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x92, 0x86, 0x04, 0x00, - 0x11, 0x18, 0x60, 0x07, 0x00, 0x05, 0x00, 0x10, 0x60, 0x07, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x78, 0x17, 0x01, 0x40, - 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, - 0xd0, 0xec, 0x01, 0x20, 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, 0x4c, 0xa1, - 0x08, 0x0c, 0xb1, 0xdd, 0x0d, 0x78, 0x2b, 0x08, 0x61, 0x12, 0x60, 0x23, - 0x00, 0x06, 0x71, 0x20, 0x61, 0x0a, 0x71, 0x30, 0x61, 0x5e, 0x60, 0x17, - 0xf3, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x41, 0x20, 0x09, - 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x08, 0xe0, 0x00, 0xb6, 0x71, 0x10, - 0xd1, 0xbc, 0x05, 0xd0, 0x70, 0x20, 0x20, 0x60, 0x9c, 0x84, 0x00, 0x03, - 0x15, 0xa8, 0x9c, 0x82, 0x1d, 0xdc, 0x06, 0x90, 0x68, 0x68, 0x9c, 0x02, - 0x16, 0x78, 0x94, 0x84, 0x0f, 0xff, 0x90, 0x82, 0x00, 0x0c, 0x06, 0x50, - 0x70, 0x08, 0x90, 0x84, 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x10, - 0x91, 0x06, 0x15, 0x10, 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, 0x11, 0xf0, - 0x71, 0x24, 0x61, 0x0a, 0x60, 0x1c, 0xd0, 0xfc, 0x11, 0xc8, 0x20, 0x01, - 0x02, 0x71, 0x20, 0x04, 0x90, 0x05, 0x11, 0x80, 0x94, 0x84, 0x0f, 0xff, - 0x90, 0x82, 0x00, 0x0c, 0x01, 0x58, 0x00, 0x66, 0x20, 0x31, 0x01, 0x00, - 0xa0, 0x01, 0xa0, 0x01, 0x86, 0x31, 0x1d, 0xe0, 0x00, 0x6e, 0x60, 0x1c, - 0xd0, 0xfc, 0x11, 0x20, 0x20, 0x09, 0x00, 0x45, 0x08, 0x0c, 0xb2, 0x0a, - 0x78, 0x17, 0x01, 0x40, 0x00, 0xbe, 0x00, 0x05, 0x61, 0x20, 0x91, 0x86, - 0x00, 0x02, 0x01, 0x28, 0x91, 0x86, 0x00, 0x05, 0x01, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x88, 0xaf, 0x11, 0x80, 0x08, 0x0c, - 0x34, 0x4c, 0x11, 0x68, 0x70, 0x10, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x90, 0x86, 0x00, 0x00, 0x11, 0x30, 0x91, 0x84, 0x00, 0x0f, 0x90, 0x8a, - 0x00, 0x06, 0x12, 0x08, 0x00, 0x0b, 0x00, 0x05, 0x86, 0xbe, 0x86, 0xbf, - 0x86, 0xbe, 0x86, 0xbe, 0x87, 0x24, 0x87, 0x33, 0x00, 0x05, 0x00, 0xb6, - 0x70, 0x0c, 0x71, 0x08, 0x08, 0x0c, 0x26, 0x8c, 0x19, 0x04, 0x87, 0x22, - 0x08, 0x0c, 0x67, 0x49, 0x19, 0x04, 0x87, 0x22, 0xbe, 0x12, 0xbd, 0x16, - 0x71, 0x10, 0xd1, 0xbc, 0x05, 0x40, 0x70, 0x2c, 0xd0, 0x84, 0x11, 0x20, - 0xb8, 0x00, 0xd0, 0xbc, 0x19, 0x04, 0x87, 0x22, 0x08, 0x0c, 0x6c, 0x11, - 0x01, 0x48, 0x90, 0x86, 0x00, 0x04, 0x01, 0x30, 0x08, 0x0c, 0x6c, 0x19, - 0x01, 0x18, 0x90, 0x86, 0x00, 0x04, 0x15, 0x88, 0x00, 0xc6, 0x08, 0x0c, - 0x87, 0x42, 0x00, 0xce, 0x05, 0xd8, 0x08, 0x0c, 0xb1, 0x16, 0x2b, 0x08, - 0x05, 0xb8, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x02, - 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x88, 0x08, 0x0c, 0xb2, 0x0a, - 0x04, 0x58, 0x08, 0x0c, 0x6c, 0x11, 0x01, 0x48, 0x90, 0x86, 0x00, 0x04, - 0x01, 0x30, 0x08, 0x0c, 0x6c, 0x19, 0x01, 0x18, 0x90, 0x86, 0x00, 0x04, - 0x11, 0x80, 0x08, 0x0c, 0xb1, 0x16, 0x2b, 0x08, 0x01, 0xd8, 0x61, 0x12, - 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x05, 0x71, 0x20, 0x61, 0x0a, - 0x20, 0x09, 0x00, 0x88, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x78, 0x08, 0x0c, - 0xb1, 0x16, 0x2b, 0x08, 0x01, 0x58, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, - 0x60, 0x23, 0x00, 0x04, 0x71, 0x20, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x01, - 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0xbe, 0x00, 0x05, 0x71, 0x10, 0xd1, 0xbc, - 0x01, 0x58, 0x00, 0xd1, 0x01, 0x48, 0x08, 0x0c, 0x86, 0x9a, 0x11, 0x30, - 0x71, 0x24, 0x61, 0x0a, 0x20, 0x09, 0x00, 0x89, 0x08, 0x0c, 0xb2, 0x0a, - 0x00, 0x05, 0x71, 0x10, 0xd1, 0xbc, 0x01, 0x58, 0x00, 0x59, 0x01, 0x48, - 0x08, 0x0c, 0x86, 0x9a, 0x11, 0x30, 0x71, 0x24, 0x61, 0x0a, 0x20, 0x09, - 0x00, 0x8a, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0x70, 0x20, 0x20, 0x60, - 0x9c, 0x84, 0x00, 0x03, 0x11, 0x58, 0x9c, 0x82, 0x1d, 0xdc, 0x02, 0x40, - 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x18, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe8, 0x00, 0xb6, 0x71, 0x10, - 0xd1, 0xbc, 0x11, 0xd8, 0x70, 0x24, 0x20, 0x60, 0x9c, 0x84, 0x00, 0x03, - 0x11, 0xb0, 0x9c, 0x82, 0x1d, 0xdc, 0x02, 0x98, 0x68, 0x68, 0x9c, 0x02, - 0x12, 0x80, 0x70, 0x08, 0x90, 0x84, 0x00, 0xff, 0x61, 0x10, 0x21, 0x58, - 0xb9, 0x10, 0x91, 0x06, 0x11, 0x40, 0x70, 0x0c, 0xb9, 0x14, 0x91, 0x06, - 0x11, 0x20, 0x20, 0x09, 0x00, 0x51, 0x08, 0x0c, 0xb2, 0x0a, 0x78, 0x17, - 0x01, 0x40, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x31, 0x01, 0x05, 0x00, 0x69, - 0x00, 0x05, 0x20, 0x31, 0x02, 0x06, 0x00, 0x49, 0x00, 0x05, 0x20, 0x31, - 0x02, 0x07, 0x00, 0x29, 0x00, 0x05, 0x20, 0x31, 0x02, 0x13, 0x00, 0x09, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0x96, 0x00, 0xf6, 0x70, 0x00, 0x90, 0x84, - 0xf0, 0x00, 0x90, 0x86, 0xc0, 0x00, 0x05, 0xc0, 0x08, 0x0c, 0xb1, 0x16, - 0x05, 0xa8, 0x00, 0x66, 0x00, 0xc6, 0x00, 0x46, 0x20, 0x11, 0x02, 0x63, - 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x26, 0x8c, 0x15, 0x90, - 0x08, 0x0c, 0x67, 0x49, 0x15, 0x78, 0xbe, 0x12, 0xbd, 0x16, 0x2b, 0x00, - 0x00, 0x4e, 0x00, 0xce, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x08, 0x0c, - 0x10, 0x59, 0x05, 0x00, 0x29, 0x00, 0x60, 0x62, 0x90, 0x06, 0xa8, 0x02, - 0xa8, 0x66, 0xac, 0x6a, 0xa8, 0x5c, 0x90, 0xf8, 0x00, 0x1b, 0x20, 0xa9, - 0x00, 0x0e, 0xa8, 0x60, 0x20, 0xe8, 0x20, 0xe1, 0x00, 0x00, 0x2f, 0xa0, - 0x2e, 0x98, 0x40, 0x03, 0x00, 0x6e, 0x66, 0x16, 0x60, 0x07, 0x00, 0x3e, - 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, - 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xce, 0x00, 0x05, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x6e, 0x0c, 0xc0, 0x00, 0x4e, 0x00, 0xce, 0x0c, 0xc8, 0x00, 0xc6, - 0x70, 0x00, 0x90, 0x8c, 0xff, 0x00, 0x91, 0x84, 0xf0, 0x00, 0x81, 0x0f, - 0x90, 0x86, 0x20, 0x00, 0x19, 0x04, 0x88, 0x2a, 0x91, 0x86, 0x00, 0x22, - 0x15, 0xf0, 0x20, 0x01, 0x01, 0x11, 0x20, 0x04, 0x90, 0x05, 0x19, 0x04, - 0x88, 0x2c, 0x70, 0x30, 0x90, 0x8e, 0x04, 0x00, 0x09, 0x04, 0x88, 0x2c, - 0x90, 0x8e, 0x60, 0x00, 0x05, 0xe8, 0x90, 0x8e, 0x54, 0x00, 0x05, 0xd0, - 0x90, 0x8e, 0x03, 0x00, 0x11, 0xd8, 0x20, 0x09, 0x18, 0x37, 0x21, 0x0c, - 0xd1, 0x8c, 0x15, 0x90, 0xd1, 0xa4, 0x15, 0x80, 0x08, 0x0c, 0x6b, 0xcf, - 0x05, 0x88, 0x68, 0xb0, 0x90, 0x84, 0x00, 0xff, 0x71, 0x00, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x06, 0x15, 0x18, 0x68, 0x80, 0x69, 0xb0, 0x91, 0x8c, - 0xff, 0x00, 0x91, 0x05, 0x71, 0x04, 0x91, 0x06, 0x11, 0xd8, 0x00, 0xe0, - 0x20, 0x09, 0x01, 0x03, 0x21, 0x0c, 0xd1, 0xb4, 0x11, 0xa8, 0x90, 0x8e, - 0x52, 0x00, 0x09, 0xe8, 0x90, 0x8e, 0x05, 0x00, 0x09, 0xd0, 0x90, 0x8e, - 0x50, 0x00, 0x09, 0xb8, 0x00, 0x58, 0x91, 0x86, 0x00, 0x23, 0x11, 0x40, - 0x08, 0x0c, 0x87, 0x42, 0x01, 0x28, 0x60, 0x04, 0x90, 0x86, 0x00, 0x02, - 0x01, 0x18, 0x00, 0x00, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, - 0x00, 0xce, 0x00, 0x05, 0x70, 0x30, 0x90, 0x8e, 0x03, 0x00, 0x01, 0x18, - 0x90, 0x8e, 0x52, 0x00, 0x1d, 0x98, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x0d, 0x68, 0x0c, 0x50, - 0x01, 0x56, 0x00, 0x46, 0x00, 0x16, 0x00, 0x36, 0x70, 0x38, 0x20, 0x20, - 0x84, 0x27, 0x94, 0xa4, 0x00, 0x07, 0xd4, 0x84, 0x01, 0x48, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, 0x02, 0x7a, 0x08, 0x0c, - 0xc2, 0x0e, 0x11, 0x78, 0xd4, 0x8c, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x19, 0x18, 0x01, 0x20, 0x11, 0x02, 0x7e, 0x08, 0x0c, 0xc2, 0x0e, - 0x11, 0x20, 0xd4, 0x94, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x3e, - 0x00, 0x1e, 0x00, 0x4e, 0x01, 0x5e, 0x00, 0x05, 0x01, 0x56, 0x00, 0x46, - 0x00, 0x16, 0x00, 0x36, 0x70, 0x38, 0x20, 0x20, 0x84, 0x27, 0x94, 0xa4, - 0x00, 0x07, 0xd4, 0x84, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, - 0x18, 0x05, 0x20, 0x11, 0x02, 0x72, 0x08, 0x0c, 0xc2, 0x0e, 0x11, 0x78, - 0xd4, 0x8c, 0x01, 0x48, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x18, 0x01, - 0x20, 0x11, 0x02, 0x76, 0x08, 0x0c, 0xc2, 0x0e, 0x11, 0x20, 0xd4, 0x94, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x4e, - 0x01, 0x5e, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x02, 0x00, 0x78, 0x00, - 0xc0, 0xe5, 0xc0, 0xcc, 0x78, 0x02, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x18, 0x00, 0x78, 0x34, 0xd0, 0x84, 0x11, 0x30, 0x20, 0x79, - 0x02, 0x00, 0x78, 0x00, 0x90, 0x85, 0x12, 0x00, 0x78, 0x02, 0x00, 0xfe, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x34, 0xc0, 0x84, - 0x70, 0x36, 0x00, 0xee, 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x0c, 0x91, 0x84, 0x00, 0x80, 0x01, 0x18, 0xd1, 0x8c, 0x01, 0x18, - 0x90, 0x06, 0x00, 0x1e, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xd8, - 0x20, 0x71, 0x1a, 0x04, 0x70, 0x03, 0x00, 0x03, 0x70, 0x0f, 0x03, 0x61, - 0x90, 0x06, 0x70, 0x1a, 0x70, 0x7a, 0x70, 0x12, 0x70, 0x17, 0x1d, 0xdc, - 0x70, 0x07, 0x00, 0x00, 0x70, 0x26, 0x70, 0x2b, 0xa2, 0xc0, 0x70, 0x32, - 0x70, 0x37, 0xa3, 0x3d, 0x70, 0x47, 0xff, 0xff, 0x70, 0x4a, 0x70, 0x4f, - 0x56, 0xc4, 0x70, 0x52, 0x70, 0x63, 0x8a, 0x66, 0x08, 0x0c, 0x10, 0x72, - 0x09, 0x0c, 0x0d, 0x85, 0x29, 0x00, 0x70, 0x42, 0xa8, 0x67, 0x00, 0x03, - 0xa8, 0x6f, 0x01, 0x00, 0xa8, 0xab, 0xdc, 0xb0, 0x00, 0x05, 0x20, 0x71, - 0x1a, 0x04, 0x1d, 0x04, 0x89, 0x82, 0x20, 0x91, 0x60, 0x00, 0x70, 0x0c, - 0x80, 0x01, 0x70, 0x0e, 0x15, 0x90, 0x20, 0x01, 0x01, 0x3c, 0x20, 0x04, - 0x90, 0x05, 0x19, 0x0c, 0x8b, 0x10, 0x20, 0x01, 0x18, 0x69, 0x20, 0x04, - 0xd0, 0xc4, 0x01, 0x58, 0x3a, 0x00, 0xd0, 0x8c, 0x11, 0x40, 0x20, 0xd1, - 0x00, 0x00, 0x20, 0xd1, 0x00, 0x01, 0x20, 0xd1, 0x00, 0x00, 0x08, 0x0c, - 0x0d, 0x85, 0x70, 0x0f, 0x03, 0x61, 0x70, 0x07, 0x00, 0x01, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, 0x18, 0x00, 0x69, 0xec, 0xd1, 0xe4, - 0x11, 0x38, 0xd1, 0xdc, 0x11, 0x18, 0x08, 0x0c, 0x8a, 0xd4, 0x00, 0x10, - 0x08, 0x0c, 0x8a, 0xab, 0x70, 0x48, 0x90, 0x0d, 0x01, 0x48, 0x81, 0x09, - 0x71, 0x4a, 0x11, 0x30, 0x70, 0x4c, 0x08, 0x0f, 0x00, 0x18, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x24, 0x90, 0x0d, 0x01, 0x88, 0x70, 0x20, - 0x80, 0x01, 0x70, 0x22, 0x11, 0x68, 0x70, 0x23, 0x00, 0x09, 0x81, 0x09, - 0x71, 0x26, 0x91, 0x86, 0x03, 0xe8, 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, - 0x81, 0xff, 0x11, 0x10, 0x70, 0x28, 0x08, 0x0f, 0x70, 0x30, 0x90, 0x0d, - 0x01, 0x80, 0x70, 0x2c, 0x80, 0x01, 0x70, 0x2e, 0x11, 0x60, 0x70, 0x2f, - 0x00, 0x09, 0x81, 0x09, 0x71, 0x32, 0x01, 0x28, 0x91, 0x84, 0x00, 0x7f, - 0x09, 0x0c, 0xa3, 0xeb, 0x00, 0x10, 0x70, 0x34, 0x08, 0x0f, 0x70, 0x44, - 0x90, 0x05, 0x01, 0x18, 0x03, 0x10, 0x80, 0x01, 0x70, 0x46, 0x70, 0x54, - 0x90, 0x0d, 0x01, 0x68, 0x70, 0x50, 0x80, 0x01, 0x70, 0x52, 0x11, 0x48, - 0x70, 0x53, 0x00, 0x09, 0x81, 0x09, 0x71, 0x56, 0x11, 0x20, 0x71, 0x58, - 0x71, 0x56, 0x70, 0x60, 0x08, 0x0f, 0x70, 0x18, 0x90, 0x0d, 0x01, 0xd8, - 0x00, 0x16, 0x70, 0x78, 0x90, 0x0d, 0x01, 0x58, 0x70, 0x74, 0x80, 0x01, - 0x70, 0x76, 0x11, 0x38, 0x70, 0x77, 0x00, 0x09, 0x81, 0x09, 0x71, 0x7a, - 0x11, 0x10, 0x70, 0x7c, 0x08, 0x0f, 0x00, 0x1e, 0x70, 0x08, 0x80, 0x01, - 0x70, 0x0a, 0x11, 0x38, 0x70, 0x0b, 0x00, 0x09, 0x81, 0x09, 0x71, 0x1a, - 0x11, 0x10, 0x70, 0x1c, 0x08, 0x0f, 0x01, 0x2e, 0x70, 0x04, 0x00, 0x02, - 0x89, 0xaa, 0x89, 0xab, 0x89, 0xd5, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x04, - 0x70, 0x18, 0x90, 0x05, 0x11, 0x20, 0x71, 0x1a, 0x72, 0x1e, 0x70, 0x0b, - 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x20, 0x71, - 0x1a, 0x04, 0x70, 0x1c, 0x92, 0x06, 0x11, 0x20, 0x70, 0x1a, 0x70, 0x1e, - 0x70, 0x7a, 0x70, 0x7e, 0x00, 0x0e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x1a, 0x04, 0xb8, 0x88, 0x91, 0x02, 0x02, 0x08, 0xb9, 0x8a, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb6, 0x20, 0x31, 0x00, 0x10, - 0x71, 0x10, 0x08, 0x0c, 0x67, 0xb4, 0x11, 0xa8, 0xb8, 0x88, 0x80, 0x01, - 0x02, 0x90, 0xb8, 0x8a, 0x11, 0x80, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x00, 0x66, 0xb8, 0xd0, 0x90, 0x05, 0x01, 0x38, 0x00, 0x26, 0xba, 0x3c, - 0x00, 0x16, 0x08, 0x0c, 0x68, 0xdf, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x6e, - 0x01, 0x2e, 0x81, 0x08, 0x91, 0x82, 0x08, 0x00, 0x12, 0x20, 0x86, 0x31, - 0x01, 0x28, 0x71, 0x12, 0x0c, 0x00, 0x90, 0x0e, 0x70, 0x07, 0x00, 0x02, - 0x71, 0x12, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x31, 0x00, 0x10, 0x70, 0x14, - 0x20, 0x60, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x48, 0x90, 0x05, - 0x01, 0x28, 0x80, 0x01, 0x60, 0x4a, 0x11, 0x10, 0x08, 0x0c, 0xd2, 0x37, - 0x60, 0x18, 0x90, 0x05, 0x09, 0x04, 0x8a, 0x2d, 0x00, 0xf6, 0x20, 0x79, - 0x03, 0x00, 0x79, 0x18, 0xd1, 0xb4, 0x19, 0x04, 0x8a, 0x40, 0x78, 0x1b, - 0x20, 0x20, 0xa0, 0x01, 0x79, 0x18, 0xd1, 0xb4, 0x01, 0x20, 0x78, 0x1b, - 0x20, 0x00, 0x08, 0x04, 0x8a, 0x40, 0x80, 0x01, 0x60, 0x1a, 0x01, 0x06, - 0x78, 0x1b, 0x20, 0x00, 0xa0, 0x01, 0x79, 0x18, 0xd1, 0xac, 0x1d, 0xd0, - 0x01, 0x0e, 0x00, 0xfe, 0x15, 0x40, 0x61, 0x20, 0x91, 0x86, 0x00, 0x03, - 0x01, 0x48, 0x91, 0x86, 0x00, 0x06, 0x01, 0x30, 0x91, 0x86, 0x00, 0x09, - 0x11, 0xe0, 0x61, 0x1c, 0xd1, 0xc4, 0x11, 0x00, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0xb0, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x84, 0x90, 0x8a, 0x19, 0x9a, - 0x02, 0x80, 0x90, 0x82, 0x19, 0x99, 0xa8, 0x86, 0x90, 0x8a, 0x19, 0x9a, - 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, - 0x91, 0x08, 0x61, 0x1a, 0x08, 0x0c, 0xd6, 0x71, 0x01, 0x10, 0x08, 0x0c, - 0xcb, 0xd9, 0x01, 0x2e, 0x9c, 0x88, 0x00, 0x1c, 0x71, 0x16, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x04, 0x91, 0x02, 0x12, 0x28, 0x86, 0x31, 0x01, 0x38, - 0x21, 0x60, 0x08, 0x04, 0x89, 0xd9, 0x70, 0x17, 0x1d, 0xdc, 0x70, 0x07, - 0x00, 0x00, 0x00, 0x05, 0x00, 0xfe, 0x0c, 0x58, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x04, 0x70, 0x27, 0x07, 0xd0, 0x70, 0x23, 0x00, 0x09, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x01, 0x1a, 0x0d, 0x20, 0x03, 0x00, 0x00, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x04, 0x71, 0x32, 0x70, 0x2f, 0x00, 0x09, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x11, 0x1a, 0x10, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x1a, 0x04, 0x71, 0x1a, 0x72, 0x1e, - 0x70, 0x0b, 0x00, 0x09, 0x00, 0xee, 0x00, 0x05, 0x00, 0x86, 0x00, 0x26, - 0x70, 0x5c, 0x80, 0x00, 0x70, 0x5e, 0x20, 0x01, 0x1a, 0x14, 0x20, 0x44, - 0xa0, 0x6c, 0x90, 0x86, 0x00, 0x00, 0x01, 0x50, 0x70, 0x70, 0xa0, 0x9a, - 0x70, 0x6c, 0xa0, 0x96, 0x70, 0x68, 0xa0, 0x92, 0x70, 0x64, 0xa0, 0x8e, - 0x08, 0x0c, 0x11, 0x4e, 0x00, 0x2e, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x06, - 0x00, 0x16, 0x00, 0x96, 0x00, 0xa6, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x01, 0x56, 0x08, 0x0c, 0x88, 0xe7, 0x01, 0x5e, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0xae, - 0x00, 0x9e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x1a, 0x04, 0x71, 0x7a, 0x72, 0x7e, 0x70, 0x77, 0x00, 0x09, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0x06, 0x20, 0x71, 0x1a, 0x04, 0x70, 0x7c, - 0x92, 0x06, 0x11, 0x10, 0x70, 0x7a, 0x70, 0x7e, 0x00, 0x0e, 0x00, 0xee, - 0x00, 0x05, 0x20, 0x69, 0x18, 0x00, 0x69, 0xec, 0xd1, 0xe4, 0x15, 0x18, - 0x00, 0x26, 0xd1, 0xec, 0x01, 0x40, 0x6a, 0x54, 0x68, 0x74, 0x92, 0x02, - 0x02, 0x88, 0x81, 0x17, 0x92, 0x94, 0x00, 0xc1, 0x00, 0x88, 0x91, 0x84, - 0x00, 0x07, 0x01, 0xa0, 0x81, 0x09, 0x91, 0x84, 0x00, 0x07, 0x01, 0x10, - 0x69, 0xee, 0x00, 0x70, 0x81, 0x07, 0x90, 0x84, 0x00, 0x07, 0x91, 0x0d, - 0x81, 0x07, 0x91, 0x06, 0x90, 0x94, 0x00, 0xc1, 0x91, 0x84, 0xff, 0x3e, - 0x92, 0x05, 0x68, 0xee, 0x08, 0x0c, 0x0f, 0x24, 0x00, 0x2e, 0x00, 0x05, - 0x69, 0xe8, 0x91, 0x84, 0x00, 0x3f, 0x05, 0xb8, 0x81, 0x09, 0x91, 0x84, - 0x00, 0x3f, 0x01, 0xa8, 0x6a, 0x54, 0x68, 0x74, 0x92, 0x02, 0x02, 0x20, - 0xd1, 0xbc, 0x01, 0x68, 0xc1, 0xbc, 0x00, 0x18, 0xd1, 0xbc, 0x11, 0x48, - 0xc1, 0xbd, 0x21, 0x10, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, - 0x0f, 0x46, 0x00, 0xee, 0x04, 0x00, 0x69, 0xea, 0x00, 0xf0, 0x00, 0x26, - 0x81, 0x07, 0x90, 0x94, 0x00, 0x07, 0x01, 0x28, 0x80, 0x01, 0x80, 0x07, - 0x90, 0x85, 0x00, 0x07, 0x00, 0x50, 0x20, 0x10, 0x80, 0x04, 0x80, 0x04, - 0x80, 0x04, 0x90, 0x84, 0x00, 0x07, 0x92, 0x05, 0x80, 0x07, 0x90, 0x85, - 0x00, 0x28, 0x90, 0x86, 0x00, 0x40, 0x20, 0x10, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x08, 0x0c, 0x0f, 0x46, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0x16, 0x00, 0xc6, 0x20, 0x09, 0xff, 0xf4, 0x21, 0x0d, 0x20, 0x61, - 0x01, 0x00, 0x60, 0xf0, 0x91, 0x00, 0x60, 0xf3, 0x00, 0x00, 0x20, 0x09, - 0xff, 0xf4, 0x20, 0x0f, 0x12, 0x20, 0x81, 0x08, 0x21, 0x05, 0x80, 0x00, - 0x20, 0x0f, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x20, 0x61, - 0x1a, 0x73, 0x00, 0xce, 0x00, 0x05, 0x91, 0x84, 0x00, 0x0f, 0x80, 0x03, - 0x80, 0x03, 0x80, 0x03, 0x90, 0x80, 0x1a, 0x73, 0x20, 0x60, 0x00, 0x05, - 0xa8, 0x84, 0x90, 0x8a, 0x19, 0x9a, 0x16, 0x38, 0x90, 0x05, 0x11, 0x50, - 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x73, 0x60, 0x14, 0x00, 0xce, 0x90, 0x05, - 0x11, 0x30, 0x20, 0x01, 0x00, 0x1e, 0x00, 0x18, 0x90, 0x8e, 0xff, 0xff, - 0x01, 0xb0, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x61, 0x1a, - 0xa8, 0x7c, 0x90, 0x8c, 0x00, 0xc0, 0x91, 0x8e, 0x00, 0xc0, 0x09, 0x04, - 0x8b, 0xee, 0xd0, 0xb4, 0x11, 0x68, 0xd0, 0xbc, 0x19, 0x04, 0x8b, 0xc7, - 0x20, 0x09, 0x00, 0x06, 0x08, 0x0c, 0x8c, 0x1b, 0x00, 0x05, 0x90, 0x0e, - 0x0c, 0x60, 0x20, 0x01, 0x19, 0x99, 0x08, 0xb0, 0xd0, 0xfc, 0x05, 0xe0, - 0x90, 0x8c, 0x20, 0x23, 0x15, 0x68, 0x87, 0xff, 0x15, 0x58, 0xa9, 0xa8, - 0x81, 0xff, 0x15, 0x40, 0x61, 0x24, 0x91, 0x8c, 0x05, 0x00, 0x15, 0x20, - 0x61, 0x00, 0x91, 0x8e, 0x00, 0x07, 0x15, 0x00, 0x20, 0x09, 0x18, 0x69, - 0x21, 0x0c, 0xd1, 0x84, 0x11, 0xd8, 0x60, 0x03, 0x00, 0x03, 0x60, 0x07, - 0x00, 0x43, 0x60, 0x47, 0xb0, 0x35, 0x08, 0x0c, 0x1c, 0x6f, 0xa8, 0x7c, - 0xc0, 0xdd, 0xa8, 0x7e, 0x60, 0x0f, 0x00, 0x00, 0x00, 0xf6, 0x20, 0x79, - 0x03, 0x80, 0x78, 0x18, 0xd0, 0xbc, 0x1d, 0xe8, 0x78, 0x33, 0x00, 0x13, - 0x2c, 0x00, 0x78, 0x36, 0x78, 0x1b, 0x80, 0x80, 0x00, 0xfe, 0x00, 0x05, - 0x90, 0x8c, 0x00, 0x03, 0x01, 0x20, 0x91, 0x8e, 0x00, 0x03, 0x19, 0x04, - 0x8c, 0x15, 0x90, 0x8c, 0x20, 0x20, 0x91, 0x8e, 0x20, 0x20, 0x01, 0xa8, - 0x60, 0x24, 0xd0, 0xd4, 0x11, 0xe8, 0x20, 0x09, 0x18, 0x69, 0x21, 0x04, - 0xd0, 0x84, 0x11, 0x38, 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, 0x00, 0x43, - 0x08, 0x04, 0xb2, 0x0a, 0x00, 0x05, 0x87, 0xff, 0x1d, 0xe8, 0x20, 0x09, - 0x00, 0x42, 0x08, 0x04, 0xb2, 0x0a, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, - 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xac, 0x0d, 0x20, 0x60, 0x24, 0xc0, 0xcd, - 0x60, 0x26, 0x0c, 0x00, 0xc0, 0xd4, 0x60, 0x26, 0xa8, 0x90, 0x60, 0x2e, - 0xa8, 0x8c, 0x60, 0x32, 0x08, 0xe0, 0xd0, 0xfc, 0x01, 0x60, 0x90, 0x8c, - 0x00, 0x03, 0x01, 0x20, 0x91, 0x8e, 0x00, 0x03, 0x19, 0x04, 0x8c, 0x15, - 0x90, 0x8c, 0x20, 0x20, 0x91, 0x8e, 0x20, 0x20, 0x01, 0x70, 0x00, 0x76, - 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x17, 0xad, 0x00, 0xfe, 0x00, 0x7e, - 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, 0x00, 0x42, 0x08, 0x0c, 0xb2, 0x0a, - 0x00, 0x05, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, - 0xd1, 0xac, 0x0d, 0x58, 0x61, 0x24, 0xc1, 0xcd, 0x61, 0x26, 0x0c, 0x38, - 0xd0, 0xfc, 0x01, 0x88, 0x90, 0x8c, 0x20, 0x20, 0x91, 0x8e, 0x20, 0x20, - 0x01, 0xa8, 0x90, 0x84, 0x00, 0x03, 0x90, 0x8e, 0x00, 0x02, 0x01, 0x48, - 0x87, 0xff, 0x11, 0x20, 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xb2, 0x0a, - 0x00, 0x05, 0x00, 0xb9, 0x0c, 0xe8, 0x87, 0xff, 0x1d, 0xd8, 0x20, 0x09, - 0x00, 0x43, 0x08, 0x0c, 0xb2, 0x0a, 0x0c, 0xb0, 0x61, 0x10, 0x00, 0xb6, - 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xac, 0x0d, 0x20, 0x61, 0x24, - 0xc1, 0xcd, 0x61, 0x26, 0x0c, 0x00, 0x20, 0x09, 0x00, 0x04, 0x00, 0x19, - 0x00, 0x05, 0x20, 0x09, 0x00, 0x01, 0x00, 0x96, 0x08, 0x0c, 0xcf, 0x1b, - 0x05, 0x18, 0x60, 0x14, 0x20, 0x48, 0xa9, 0x82, 0xa8, 0x00, 0x60, 0x16, - 0x91, 0x86, 0x00, 0x01, 0x11, 0x88, 0xa9, 0x7c, 0x91, 0x8c, 0x81, 0x00, - 0x91, 0x8e, 0x81, 0x00, 0x11, 0x58, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x73, - 0x62, 0x00, 0xd2, 0x8c, 0x11, 0x20, 0x62, 0x04, 0x82, 0x10, 0x02, 0x08, - 0x62, 0x06, 0x00, 0xce, 0x08, 0x0c, 0x6e, 0x4c, 0x60, 0x14, 0x90, 0x4d, - 0x00, 0x76, 0x20, 0x39, 0x00, 0x00, 0x19, 0x0c, 0x8b, 0x34, 0x00, 0x7e, - 0x00, 0x9e, 0x00, 0x05, 0x01, 0x56, 0x00, 0xc6, 0x20, 0x61, 0x1a, 0x73, - 0x60, 0x00, 0x81, 0xff, 0x01, 0x10, 0x92, 0x05, 0x00, 0x08, 0x92, 0x04, - 0x60, 0x02, 0x00, 0xce, 0x01, 0x5e, 0x00, 0x05, 0x68, 0x00, 0xd0, 0x8c, - 0x11, 0x38, 0x68, 0x08, 0x90, 0x05, 0x01, 0x20, 0x80, 0x01, 0x68, 0x0a, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x20, 0x71, 0x19, 0x24, 0x70, 0x03, - 0x00, 0x06, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x70, 0x13, - 0x00, 0x01, 0x08, 0x0c, 0x10, 0x72, 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x67, - 0x00, 0x06, 0xa8, 0x6b, 0x00, 0x01, 0xa8, 0xab, 0xdc, 0xb0, 0xa8, 0x9f, - 0x00, 0x00, 0x29, 0x00, 0x70, 0x2e, 0x70, 0x33, 0x00, 0x00, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x96, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0x24, 0x70, 0x2c, 0x20, 0x48, 0x6a, 0x2c, 0x72, 0x1e, 0x6b, 0x30, - 0x73, 0x22, 0x68, 0x34, 0x70, 0x26, 0xa8, 0x96, 0x68, 0x38, 0x70, 0x2a, - 0xa8, 0x9a, 0x68, 0x24, 0x70, 0x16, 0x68, 0x3c, 0x70, 0x1a, 0x20, 0x09, - 0x00, 0x28, 0x20, 0x0a, 0x90, 0x05, 0x01, 0x48, 0x90, 0x0e, 0x91, 0x88, - 0x00, 0x0c, 0x80, 0x01, 0x1d, 0xe0, 0x21, 0x00, 0x92, 0x10, 0x12, 0x08, - 0x83, 0x18, 0xaa, 0x8e, 0xab, 0x92, 0x70, 0x10, 0xd0, 0x84, 0x01, 0x68, - 0xc0, 0x84, 0x70, 0x07, 0x00, 0x01, 0x70, 0x0f, 0x00, 0x00, 0x00, 0x06, - 0x20, 0x09, 0x1b, 0x73, 0x21, 0x04, 0x90, 0x82, 0x00, 0x07, 0x20, 0x0a, - 0x00, 0x0e, 0xc0, 0x95, 0x70, 0x12, 0x20, 0x08, 0x20, 0x01, 0x00, 0x3b, - 0x08, 0x0c, 0x16, 0xb9, 0x90, 0x06, 0x20, 0x71, 0x19, 0x3d, 0x70, 0x02, - 0x70, 0x06, 0x70, 0x2a, 0x00, 0xee, 0x00, 0x9e, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x09, 0x1b, 0x73, 0x21, 0x04, 0x90, 0x80, 0x00, 0x07, 0x20, 0x0a, - 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x01, 0x56, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x18, 0x00, 0x71, 0x54, 0x20, 0x01, 0x00, 0x08, 0x91, 0x0a, - 0x06, 0x38, 0x20, 0x01, 0x18, 0x7d, 0x20, 0xac, 0x90, 0x06, 0x90, 0x80, - 0x00, 0x08, 0x1f, 0x04, 0x8c, 0xd7, 0x71, 0xc0, 0x91, 0x02, 0x02, 0xe0, - 0x20, 0x71, 0x18, 0x77, 0x20, 0xa9, 0x00, 0x07, 0x00, 0xc6, 0x08, 0x0c, - 0xb1, 0x16, 0x60, 0x23, 0x00, 0x09, 0x60, 0x03, 0x00, 0x04, 0x60, 0x1f, - 0x01, 0x01, 0x00, 0x89, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0x8e, 0x58, 0x01, 0x2e, 0x1f, 0x04, 0x8c, 0xe3, 0x90, 0x06, 0x00, 0xce, - 0x01, 0x5e, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, - 0x0c, 0xc8, 0x00, 0xe6, 0x00, 0xb6, 0x00, 0x96, 0x00, 0x86, 0x00, 0x56, - 0x00, 0x46, 0x00, 0x26, 0x71, 0x18, 0x72, 0x0c, 0x76, 0x20, 0x70, 0x04, - 0xd0, 0x84, 0x11, 0x28, 0x20, 0x21, 0x00, 0x24, 0x20, 0x29, 0x00, 0x02, - 0x00, 0x20, 0x20, 0x21, 0x00, 0x2c, 0x20, 0x29, 0x00, 0x0a, 0x08, 0x0c, - 0x10, 0x59, 0x09, 0x0c, 0x0d, 0x85, 0x29, 0x00, 0x60, 0x16, 0x20, 0x58, - 0xac, 0x66, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x06, 0xa8, 0x6a, 0xa8, 0x7a, - 0xa8, 0xaa, 0xa8, 0x87, 0x00, 0x05, 0xa8, 0x7f, 0x00, 0x20, 0x70, 0x08, - 0xa8, 0x9a, 0x70, 0x10, 0xa8, 0x9e, 0xae, 0x8a, 0xa8, 0xaf, 0xff, 0xff, - 0xa8, 0xb3, 0x00, 0x00, 0x81, 0x09, 0x01, 0x60, 0x08, 0x0c, 0x10, 0x59, - 0x09, 0x0c, 0x0d, 0x85, 0xad, 0x66, 0x2b, 0x00, 0xa8, 0x02, 0x29, 0x00, - 0xb8, 0x06, 0x20, 0x58, 0x81, 0x09, 0x1d, 0xa0, 0x00, 0x2e, 0x00, 0x4e, - 0x00, 0x5e, 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0xee, 0x00, 0x05, - 0x20, 0x79, 0x00, 0x00, 0x20, 0x71, 0x19, 0x24, 0x70, 0x04, 0x00, 0x4b, - 0x70, 0x0c, 0x00, 0x02, 0x8d, 0x4f, 0x8d, 0x48, 0x8d, 0x48, 0x00, 0x05, - 0x8d, 0x59, 0x8d, 0xaf, 0x8d, 0xaf, 0x8d, 0xaf, 0x8d, 0xb0, 0x8d, 0xc1, - 0x8d, 0xc1, 0x70, 0x0c, 0x0c, 0xba, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x78, 0xa0, 0x79, 0xa0, 0x91, 0x06, 0x19, 0x04, 0x8d, 0xa1, 0x78, 0x14, - 0xd0, 0xbc, 0x19, 0x04, 0x8d, 0xaa, 0x01, 0x2e, 0x70, 0x18, 0x91, 0x0a, - 0x11, 0x28, 0x70, 0x30, 0x90, 0x05, 0x19, 0x04, 0x8d, 0xf3, 0x00, 0x05, - 0x12, 0x10, 0x71, 0x14, 0x91, 0x0a, 0x91, 0x92, 0x00, 0x0a, 0x02, 0x10, - 0x20, 0x09, 0x00, 0x0a, 0x20, 0x01, 0x18, 0x88, 0x20, 0x14, 0x20, 0x01, - 0x19, 0x36, 0x20, 0x04, 0x91, 0x00, 0x92, 0x02, 0x0e, 0x50, 0x08, 0x0c, - 0x8f, 0x53, 0x22, 0x00, 0x91, 0x02, 0x02, 0x08, 0x22, 0x08, 0x00, 0x96, - 0x70, 0x2c, 0x20, 0x48, 0xa8, 0x73, 0x00, 0x01, 0xa9, 0x76, 0x08, 0x0c, - 0x90, 0x5c, 0x21, 0x00, 0xa8, 0x7e, 0xa8, 0x6f, 0x00, 0x00, 0x00, 0x9e, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0x1a, 0x24, 0x21, 0x04, - 0xc0, 0x85, 0x20, 0x0a, 0x70, 0x0f, 0x00, 0x02, 0x01, 0x2e, 0x08, 0x0c, - 0x11, 0x6d, 0x1d, 0xe8, 0x00, 0x05, 0x78, 0xa0, 0x79, 0xa0, 0x91, 0x06, - 0x09, 0x04, 0x8d, 0x61, 0x08, 0x0c, 0x8f, 0x2b, 0x01, 0x2e, 0x00, 0x05, - 0x78, 0x10, 0xc0, 0xc5, 0x78, 0x12, 0x08, 0x04, 0x8d, 0x61, 0x00, 0x05, - 0x70, 0x0c, 0x00, 0x02, 0x8d, 0xb5, 0x8d, 0xb8, 0x8d, 0xb7, 0x08, 0x0c, - 0x8d, 0x57, 0x00, 0x05, 0x80, 0x01, 0x70, 0x0e, 0x00, 0x96, 0x70, 0x2c, - 0x20, 0x48, 0xa9, 0x74, 0x00, 0x9e, 0x00, 0x11, 0x0c, 0xa0, 0x00, 0x05, - 0x00, 0x96, 0x70, 0x2c, 0x20, 0x48, 0x70, 0x18, 0x91, 0x00, 0x72, 0x14, - 0x92, 0x1a, 0x11, 0x30, 0x70, 0x1c, 0xa8, 0x8e, 0x70, 0x20, 0xa8, 0x92, - 0x90, 0x06, 0x00, 0x68, 0x00, 0x06, 0x08, 0x0c, 0x90, 0x5c, 0x21, 0x00, - 0xaa, 0x8c, 0x92, 0x10, 0xaa, 0x8e, 0x12, 0x20, 0xa8, 0x90, 0x90, 0x81, - 0x00, 0x00, 0xa8, 0x92, 0x00, 0x0e, 0x00, 0x9e, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x78, 0xa2, 0x70, 0x1a, 0x08, 0x0c, 0x8f, 0x2b, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x70, 0x0c, 0x00, 0x02, - 0x8d, 0xf1, 0x8d, 0xf1, 0x8d, 0xef, 0x70, 0x0f, 0x00, 0x01, 0x00, 0xee, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x30, 0x90, 0x05, - 0x05, 0x08, 0x20, 0x78, 0x78, 0x14, 0x20, 0x48, 0xae, 0x88, 0x00, 0xb6, - 0x20, 0x59, 0x00, 0x00, 0x08, 0x0c, 0x8e, 0x61, 0x00, 0xbe, 0x01, 0xb0, - 0x00, 0xe6, 0x20, 0x71, 0x19, 0x3d, 0x08, 0x0c, 0x8e, 0xa8, 0x00, 0xee, - 0x01, 0x78, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x72, 0x29, 0x00, 0x00, 0x9e, - 0x01, 0x48, 0xa8, 0xaa, 0x04, 0xd1, 0x00, 0x41, 0x20, 0x01, 0x19, 0x47, - 0x20, 0x03, 0x00, 0x00, 0x01, 0x2e, 0x08, 0xc8, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x86, 0x00, 0xa6, 0x29, 0x40, 0x26, 0x50, - 0x26, 0x00, 0x90, 0x05, 0x01, 0x80, 0xa8, 0x64, 0x90, 0x84, 0x00, 0x0f, - 0x20, 0x68, 0x9d, 0x88, 0x1e, 0xc1, 0x21, 0x65, 0x00, 0x56, 0x20, 0x29, - 0x00, 0x00, 0x08, 0x0c, 0x8f, 0xe1, 0x08, 0x0c, 0x1e, 0x97, 0x1d, 0xd8, - 0x00, 0x5e, 0x00, 0xae, 0x20, 0x01, 0x18, 0x7f, 0x20, 0x04, 0xa8, 0x8a, - 0x00, 0xc6, 0x2f, 0x60, 0x08, 0x0c, 0x17, 0xad, 0x00, 0xce, 0x78, 0x1f, - 0x01, 0x01, 0x78, 0x13, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x8e, 0xb7, 0x01, 0x2e, 0x00, 0x8e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x05, 0x70, 0x30, 0x90, 0x05, 0x01, 0x38, 0x20, 0x78, 0x78, 0x0c, - 0x70, 0x32, 0x20, 0x01, 0x19, 0x47, 0x20, 0x03, 0x00, 0x01, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x70, 0x30, 0x60, 0x0e, 0x2c, 0x00, - 0x70, 0x32, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x26, - 0x9b, 0x80, 0x91, 0x2a, 0x20, 0x05, 0x90, 0x6d, 0x09, 0x0c, 0x0d, 0x85, - 0x9b, 0x80, 0x91, 0x22, 0x20, 0x05, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0x85, - 0x61, 0x14, 0x26, 0x00, 0x91, 0x02, 0x02, 0x48, 0x68, 0x28, 0x91, 0x02, - 0x02, 0xf0, 0x90, 0x85, 0x00, 0x01, 0x00, 0x2e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x05, 0x68, 0x04, 0xd0, 0x94, 0x01, 0x48, 0x68, 0x54, 0xd0, 0x84, - 0x11, 0x78, 0xc0, 0x85, 0x68, 0x56, 0x20, 0x11, 0x80, 0x26, 0x08, 0x0c, - 0x4c, 0xa1, 0x68, 0x4c, 0x00, 0x96, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, - 0xa8, 0x04, 0x80, 0x00, 0xa8, 0x06, 0x00, 0x9e, 0x90, 0x06, 0x20, 0x30, - 0x0c, 0x20, 0x68, 0x54, 0xd0, 0x8c, 0x1d, 0x08, 0xc0, 0x8d, 0x68, 0x56, - 0x20, 0x11, 0x80, 0x25, 0x08, 0x0c, 0x4c, 0xa1, 0x68, 0x4c, 0x00, 0x96, - 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x00, 0x80, 0x00, 0xa8, 0x02, - 0x00, 0x9e, 0x08, 0x88, 0x70, 0x00, 0x20, 0x19, 0x00, 0x08, 0x83, 0x19, - 0x71, 0x04, 0x91, 0x02, 0x11, 0x18, 0x23, 0x00, 0x90, 0x05, 0x00, 0x20, - 0x02, 0x10, 0x93, 0x02, 0x00, 0x08, 0x80, 0x02, 0x00, 0x05, 0x00, 0xd6, - 0x78, 0x14, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0x85, 0x78, 0x1c, 0x90, 0x84, - 0x01, 0x01, 0x90, 0x86, 0x01, 0x01, 0x19, 0x0c, 0x0d, 0x85, 0x78, 0x27, - 0x00, 0x00, 0x20, 0x69, 0x19, 0x3d, 0x68, 0x04, 0x90, 0x80, 0x19, 0x3f, - 0x2f, 0x08, 0x21, 0x02, 0x69, 0x04, 0x81, 0x08, 0x91, 0x82, 0x00, 0x08, - 0x02, 0x08, 0x90, 0x0e, 0x69, 0x06, 0x91, 0x80, 0x19, 0x3f, 0x20, 0x03, - 0x00, 0x00, 0x00, 0xde, 0x00, 0x05, 0x00, 0x96, 0x00, 0xc6, 0x20, 0x60, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0xa8, 0x00, 0x96, 0x20, 0x48, 0x90, 0x05, - 0x19, 0x0c, 0x10, 0x8b, 0x00, 0x9e, 0xa8, 0xab, 0x00, 0x00, 0x08, 0x0c, - 0x10, 0x0b, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x05, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x28, 0x60, 0x1c, 0xd0, 0xc4, - 0x01, 0x10, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x78, 0x60, 0x10, 0x90, 0x05, - 0x01, 0x50, 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x92, 0x5e, 0x00, 0xbe, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x1b, 0x00, 0x00, 0x00, 0x10, 0x2c, 0x00, - 0x08, 0x61, 0x00, 0x05, 0x20, 0x09, 0x19, 0x28, 0x21, 0x0c, 0xd1, 0x94, - 0x00, 0x05, 0x20, 0x09, 0x19, 0x28, 0x21, 0x0c, 0xd1, 0xc4, 0x00, 0x05, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, - 0x71, 0x10, 0xc1, 0x94, 0xc1, 0x85, 0x70, 0x07, 0x00, 0x00, 0x71, 0x12, - 0x20, 0x01, 0x00, 0x3b, 0x08, 0x0c, 0x16, 0xb9, 0x00, 0xee, 0x01, 0x2e, - 0x00, 0x05, 0x78, 0x14, 0xd0, 0xbc, 0x11, 0x08, 0x00, 0x05, 0x78, 0x10, - 0xc0, 0xc5, 0x78, 0x12, 0x0c, 0xc0, 0x00, 0x96, 0x00, 0xd6, 0x90, 0x06, - 0x70, 0x06, 0x70, 0x0e, 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x22, 0x70, 0x16, - 0x70, 0x2a, 0x70, 0x26, 0x70, 0x2f, 0x00, 0x00, 0x08, 0x0c, 0x90, 0xaa, - 0x01, 0x70, 0x08, 0x0c, 0x90, 0xdf, 0x01, 0x58, 0x29, 0x00, 0x70, 0x02, - 0x70, 0x0a, 0x70, 0x1a, 0x70, 0x13, 0x00, 0x01, 0x70, 0x1f, 0x00, 0x0a, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x90, 0x0e, 0x0c, 0xd8, 0x00, 0xe6, - 0x00, 0x96, 0x00, 0x86, 0x00, 0xd6, 0x00, 0xc6, 0x20, 0x71, 0x19, 0x31, - 0x72, 0x1c, 0x21, 0x00, 0x92, 0x02, 0x16, 0x18, 0x08, 0x0c, 0x90, 0xdf, - 0x09, 0x0c, 0x0d, 0x85, 0x70, 0x18, 0x90, 0x05, 0x11, 0x60, 0x29, 0x00, - 0x70, 0x02, 0x70, 0x0a, 0x70, 0x1a, 0x90, 0x06, 0x70, 0x06, 0x70, 0x0e, - 0xa8, 0x06, 0xa8, 0x02, 0x70, 0x12, 0x70, 0x1e, 0x00, 0x38, 0x20, 0x40, - 0xa8, 0x06, 0x29, 0x00, 0xa0, 0x02, 0x70, 0x1a, 0xa8, 0x03, 0x00, 0x00, - 0x70, 0x10, 0x80, 0x00, 0x70, 0x12, 0x70, 0x1c, 0x90, 0x80, 0x00, 0x0a, - 0x70, 0x1e, 0x72, 0x1c, 0x08, 0xd0, 0x72, 0x1c, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x8e, 0x00, 0x9e, 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, 0x01, 0x56, - 0x01, 0x36, 0x01, 0x46, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x19, 0x31, 0x73, 0x00, 0x83, 0x1f, 0x83, 0x1e, 0x83, 0x1e, - 0x93, 0x84, 0x00, 0x3f, 0x20, 0xe8, 0x93, 0x9c, 0xff, 0xc0, 0x93, 0x98, - 0x00, 0x03, 0x71, 0x04, 0x08, 0x0c, 0x90, 0x5c, 0x81, 0x0c, 0x21, 0x00, - 0x93, 0x18, 0x80, 0x03, 0x22, 0x28, 0x20, 0x21, 0x00, 0x78, 0x94, 0x02, - 0x95, 0x32, 0x02, 0x08, 0x20, 0x28, 0x25, 0x00, 0x80, 0x04, 0x20, 0xa8, - 0x23, 0xa0, 0xa0, 0x01, 0xa0, 0x01, 0x40, 0x05, 0x25, 0x08, 0x08, 0x0c, - 0x90, 0x65, 0x21, 0x30, 0x70, 0x14, 0x96, 0x00, 0x70, 0x16, 0x26, 0x00, - 0x71, 0x1c, 0x91, 0x02, 0x70, 0x1e, 0x70, 0x04, 0x96, 0x00, 0x20, 0x08, - 0x90, 0x82, 0x00, 0x0a, 0x11, 0x90, 0x70, 0x00, 0x20, 0x48, 0xa8, 0x00, - 0x90, 0x05, 0x11, 0x48, 0x20, 0x09, 0x00, 0x01, 0x00, 0x26, 0x08, 0x0c, - 0x8f, 0x53, 0x00, 0x2e, 0x70, 0x00, 0x20, 0x48, 0xa8, 0x00, 0x70, 0x02, - 0x70, 0x07, 0x00, 0x00, 0x00, 0x08, 0x71, 0x06, 0x25, 0x00, 0x92, 0x12, - 0x19, 0x04, 0x8f, 0x92, 0x01, 0x2e, 0x00, 0xee, 0x01, 0x4e, 0x01, 0x3e, - 0x01, 0x5e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x95, 0x80, 0x91, 0x22, 0x20, 0x05, - 0x90, 0x75, 0x09, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x90, 0x37, 0x01, 0x2e, - 0x95, 0x80, 0x91, 0x1e, 0x20, 0x05, 0x90, 0x75, 0x09, 0x0c, 0x0d, 0x85, - 0x01, 0x56, 0x01, 0x36, 0x01, 0xc6, 0x01, 0x46, 0x01, 0xd6, 0x83, 0x1f, - 0x83, 0x1e, 0x83, 0x1e, 0x93, 0x84, 0x00, 0x3f, 0x20, 0xe0, 0x93, 0x84, - 0xff, 0xc0, 0x91, 0x00, 0x20, 0x98, 0xa8, 0x60, 0x20, 0xe8, 0xa9, 0x5c, - 0x2c, 0x05, 0x91, 0x00, 0x20, 0xa0, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, - 0x2e, 0x0c, 0x2d, 0x00, 0x00, 0x02, 0x90, 0x21, 0x90, 0x21, 0x90, 0x23, - 0x90, 0x21, 0x90, 0x23, 0x90, 0x21, 0x90, 0x21, 0x90, 0x21, 0x90, 0x21, - 0x90, 0x21, 0x90, 0x29, 0x90, 0x21, 0x90, 0x29, 0x90, 0x21, 0x90, 0x21, - 0x90, 0x21, 0x08, 0x0c, 0x0d, 0x85, 0x41, 0x04, 0x20, 0xa9, 0x00, 0x02, - 0x40, 0x02, 0x40, 0x03, 0x00, 0x28, 0x20, 0xa9, 0x00, 0x02, 0x40, 0x03, - 0x41, 0x04, 0x40, 0x03, 0x01, 0xde, 0x01, 0x4e, 0x01, 0xce, 0x01, 0x3e, - 0x01, 0x5e, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x96, - 0x70, 0x14, 0x80, 0x01, 0x70, 0x16, 0x71, 0x0c, 0x21, 0x10, 0x00, 0xf1, - 0x81, 0x0c, 0x91, 0x88, 0x00, 0x03, 0x73, 0x08, 0x82, 0x10, 0x92, 0x82, - 0x00, 0x0a, 0x11, 0x98, 0x70, 0x08, 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, - 0x01, 0x58, 0x00, 0x06, 0x08, 0x0c, 0x90, 0xee, 0x00, 0x9e, 0xa8, 0x07, - 0x00, 0x00, 0x29, 0x00, 0x70, 0x0a, 0x70, 0x10, 0x80, 0x01, 0x70, 0x12, - 0x70, 0x0f, 0x00, 0x00, 0x00, 0x08, 0x72, 0x0e, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0x06, 0x81, 0x0b, 0x81, 0x0b, 0x21, 0x00, 0x81, 0x0b, 0x91, 0x00, - 0x20, 0x08, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x26, 0x21, 0x00, - 0x90, 0x05, 0x01, 0x58, 0x90, 0x92, 0x00, 0x0c, 0x02, 0x40, 0x90, 0x0e, - 0x81, 0x08, 0x90, 0x82, 0x00, 0x0c, 0x1d, 0xe0, 0x00, 0x2e, 0x00, 0x0e, - 0x00, 0x05, 0x90, 0x0e, 0x0c, 0xd8, 0x2d, 0x00, 0x90, 0xb8, 0x00, 0x08, - 0x20, 0x31, 0x90, 0xa8, 0x90, 0x1e, 0x68, 0x08, 0x90, 0x05, 0x01, 0x08, - 0x83, 0x18, 0x69, 0x0c, 0x91, 0x0a, 0x02, 0x48, 0x01, 0x40, 0x83, 0x18, - 0x68, 0x10, 0x91, 0x12, 0x02, 0x20, 0x01, 0x18, 0x83, 0x18, 0x22, 0x08, - 0x0c, 0xd0, 0x23, 0x3a, 0x68, 0x04, 0xd0, 0x84, 0x23, 0x00, 0x20, 0x21, - 0x00, 0x01, 0x11, 0x50, 0x90, 0x82, 0x00, 0x03, 0x09, 0x67, 0x0a, 0x67, - 0x84, 0x20, 0x90, 0x82, 0x00, 0x07, 0x09, 0x67, 0x0a, 0x67, 0x0c, 0xd0, - 0x90, 0x82, 0x00, 0x02, 0x09, 0x67, 0x0a, 0x67, 0x84, 0x20, 0x90, 0x82, - 0x00, 0x05, 0x09, 0x67, 0x0a, 0x67, 0x0c, 0xd0, 0x6c, 0x1a, 0x00, 0x05, - 0x00, 0x96, 0x00, 0x46, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x2b, 0x00, - 0x90, 0x80, 0x91, 0x26, 0x20, 0x05, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0x85, - 0x20, 0x04, 0x90, 0xa0, 0x00, 0x0a, 0x08, 0x0c, 0x10, 0x72, 0x01, 0xd0, - 0x29, 0x00, 0x70, 0x26, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, - 0x08, 0x0c, 0x10, 0x72, 0x01, 0x88, 0x70, 0x24, 0xa8, 0x02, 0xa8, 0x07, - 0x00, 0x00, 0x29, 0x00, 0x70, 0x26, 0x94, 0xa2, 0x00, 0x0a, 0x01, 0x10, - 0x02, 0x08, 0x0c, 0x90, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0x4e, - 0x00, 0x9e, 0x00, 0x05, 0x70, 0x24, 0x90, 0x05, 0x0d, 0xc8, 0x20, 0x48, - 0xac, 0x00, 0x08, 0x0c, 0x10, 0x8b, 0x24, 0x00, 0x0c, 0xc0, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x70, 0x24, 0x20, 0x48, 0x90, 0x05, 0x01, 0x30, - 0xa8, 0x00, 0x70, 0x26, 0xa8, 0x03, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, - 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x70, 0x24, - 0xa8, 0x02, 0x29, 0x00, 0x70, 0x26, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x96, - 0x9e, 0x80, 0x00, 0x09, 0x20, 0x04, 0x90, 0x05, 0x01, 0x38, 0x20, 0x48, - 0xa8, 0x00, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x0e, 0x0c, 0xb8, - 0x00, 0x9e, 0x00, 0x05, 0x00, 0x96, 0x70, 0x08, 0x90, 0x05, 0x01, 0x38, - 0x20, 0x48, 0xa8, 0x00, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x0e, - 0x0c, 0xb8, 0x90, 0x06, 0x70, 0x02, 0x70, 0x0a, 0x70, 0x06, 0x70, 0x0e, - 0x70, 0x1a, 0x70, 0x1e, 0x70, 0x22, 0x70, 0x2a, 0x70, 0x26, 0x70, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x1a, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x19, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x88, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0xa6, 0xa8, 0xa8, 0x20, 0x40, - 0x20, 0x71, 0x18, 0x77, 0x08, 0x0c, 0x92, 0x4a, 0xa0, 0x67, 0x00, 0x23, - 0x60, 0x10, 0x90, 0x5d, 0x09, 0x04, 0x92, 0x1f, 0xb8, 0x14, 0xa0, 0x6e, - 0xb9, 0x10, 0xa1, 0x72, 0xb9, 0xa0, 0xa1, 0x76, 0x20, 0x01, 0x00, 0x03, - 0xa0, 0x7e, 0xa8, 0x34, 0xa0, 0x82, 0xa0, 0x7b, 0x00, 0x00, 0xa8, 0x98, - 0x90, 0x05, 0x01, 0x18, 0xa0, 0x78, 0xc0, 0x85, 0xa0, 0x7a, 0x28, 0x58, - 0x20, 0x31, 0x00, 0x18, 0xa0, 0x68, 0x90, 0x8a, 0x00, 0x19, 0x1a, 0x0c, - 0x0d, 0x85, 0x20, 0x20, 0x20, 0x50, 0x29, 0x40, 0xa8, 0x64, 0x90, 0xbc, - 0x00, 0xff, 0x90, 0x8c, 0x00, 0x0f, 0x91, 0xe0, 0x1e, 0xc1, 0x2c, 0x65, - 0x97, 0x86, 0x00, 0x24, 0x2c, 0x05, 0x15, 0x90, 0x90, 0x8a, 0x00, 0x36, - 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, 0x00, 0x02, 0x91, 0x8a, - 0x91, 0x8a, 0x91, 0x8c, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x8e, - 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x90, 0x91, 0x8a, 0x91, 0x8a, - 0x91, 0x8a, 0x91, 0x92, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x94, - 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x8a, 0x91, 0x96, 0x91, 0x8a, 0x91, 0x8a, - 0x91, 0x8a, 0x91, 0x98, 0x08, 0x0c, 0x0d, 0x85, 0xa1, 0x80, 0x04, 0xb8, - 0xa1, 0x90, 0x04, 0xa8, 0xa1, 0xa0, 0x04, 0x98, 0xa1, 0xb0, 0x04, 0x88, - 0xa1, 0xc0, 0x04, 0x78, 0xa1, 0xd0, 0x04, 0x68, 0xa1, 0xe0, 0x04, 0x58, - 0x90, 0x8a, 0x00, 0x34, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x1b, - 0x00, 0x02, 0x91, 0xbc, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, - 0x91, 0xba, 0x91, 0xbe, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, - 0x91, 0xba, 0x91, 0xc0, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, - 0x91, 0xba, 0x91, 0xc2, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, 0x91, 0xba, - 0x91, 0xba, 0x91, 0xc4, 0x08, 0x0c, 0x0d, 0x85, 0xa1, 0x80, 0x00, 0x38, - 0xa1, 0x98, 0x00, 0x28, 0xa1, 0xb0, 0x00, 0x18, 0xa1, 0xc8, 0x00, 0x08, - 0xa1, 0xe0, 0x26, 0x00, 0x00, 0x02, 0x91, 0xe0, 0x91, 0xe2, 0x91, 0xe4, - 0x91, 0xe6, 0x91, 0xe8, 0x91, 0xea, 0x91, 0xec, 0x91, 0xee, 0x91, 0xf0, - 0x91, 0xf2, 0x91, 0xf4, 0x91, 0xf6, 0x91, 0xf8, 0x91, 0xfa, 0x91, 0xfc, - 0x91, 0xfe, 0x92, 0x00, 0x92, 0x02, 0x92, 0x04, 0x92, 0x06, 0x92, 0x08, - 0x92, 0x0a, 0x92, 0x0c, 0x92, 0x0e, 0x92, 0x10, 0x08, 0x0c, 0x0d, 0x85, - 0xb9, 0xe2, 0x04, 0x68, 0xb9, 0xde, 0x04, 0x58, 0xb9, 0xda, 0x04, 0x48, - 0xb9, 0xd6, 0x04, 0x38, 0xb9, 0xd2, 0x04, 0x28, 0xb9, 0xce, 0x04, 0x18, - 0xb9, 0xca, 0x04, 0x08, 0xb9, 0xc6, 0x00, 0xf8, 0xb9, 0xc2, 0x00, 0xe8, - 0xb9, 0xbe, 0x00, 0xd8, 0xb9, 0xba, 0x00, 0xc8, 0xb9, 0xb6, 0x00, 0xb8, - 0xb9, 0xb2, 0x00, 0xa8, 0xb9, 0xae, 0x00, 0x98, 0xb9, 0xaa, 0x00, 0x88, - 0xb9, 0xa6, 0x00, 0x78, 0xb9, 0xa2, 0x00, 0x68, 0xb9, 0x9e, 0x00, 0x58, - 0xb9, 0x9a, 0x00, 0x48, 0xb9, 0x96, 0x00, 0x38, 0xb9, 0x92, 0x00, 0x28, - 0xb9, 0x8e, 0x00, 0x18, 0xb9, 0x8a, 0x00, 0x08, 0xb9, 0x86, 0x86, 0x31, - 0x84, 0x21, 0x01, 0x30, 0x08, 0x0c, 0x1e, 0x97, 0x09, 0x0c, 0x0d, 0x85, - 0x08, 0x04, 0x91, 0x64, 0x00, 0xae, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xee, - 0x00, 0x05, 0xa8, 0x6c, 0xa0, 0x6e, 0xa8, 0x70, 0xa0, 0x72, 0xa0, 0x77, - 0x00, 0xff, 0x90, 0x06, 0x08, 0x04, 0x91, 0x46, 0x00, 0x06, 0x00, 0x16, - 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, 0x90, 0x05, 0x01, 0xb0, - 0x20, 0x01, 0x19, 0x25, 0x20, 0x04, 0x90, 0x05, 0x01, 0x88, 0x20, 0x01, - 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x58, 0x00, 0x36, - 0x00, 0x46, 0xbb, 0xa0, 0x20, 0x21, 0x00, 0x04, 0x20, 0x11, 0x80, 0x14, - 0x08, 0x0c, 0x4c, 0xa1, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xbe, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x90, 0x16, 0x71, 0x0c, 0xa8, 0x34, 0x91, 0x0a, - 0xa9, 0x36, 0x70, 0x08, 0x90, 0x05, 0x01, 0x20, 0x82, 0x10, 0x91, 0x0a, - 0x02, 0x30, 0x01, 0x28, 0x70, 0x10, 0x82, 0x10, 0x91, 0x0a, 0x02, 0x08, - 0x1d, 0xe0, 0xaa, 0x8a, 0xa2, 0x6a, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xd6, - 0x00, 0x36, 0x20, 0x79, 0x03, 0x00, 0x78, 0x1b, 0x02, 0x00, 0x78, 0x18, - 0xd0, 0x94, 0x1d, 0xd8, 0x78, 0x1b, 0x02, 0x02, 0xa0, 0x01, 0xa0, 0x01, - 0x78, 0x18, 0xd0, 0x94, 0x1d, 0xa0, 0xb8, 0xac, 0x90, 0x6d, 0x01, 0x98, - 0x20, 0x79, 0x00, 0x00, 0x9c, 0x1e, 0x11, 0x18, 0x68, 0x0c, 0xb8, 0xae, - 0x00, 0x50, 0x9c, 0x06, 0x01, 0x30, 0x2d, 0x78, 0x68, 0x0c, 0x90, 0x6d, - 0x1d, 0xd0, 0x08, 0x0c, 0x0d, 0x85, 0x6b, 0x0c, 0x7b, 0x0e, 0x60, 0x0f, - 0x00, 0x00, 0x20, 0x79, 0x03, 0x00, 0x78, 0x1b, 0x02, 0x00, 0x00, 0x3e, - 0x00, 0xde, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, - 0x00, 0xc6, 0x00, 0x36, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x01, 0x56, - 0x20, 0xa9, 0x01, 0xff, 0x20, 0x71, 0x03, 0x00, 0x70, 0x1b, 0x02, 0x00, - 0x70, 0x18, 0xd0, 0x94, 0x01, 0x10, 0x1f, 0x04, 0x92, 0x9a, 0x70, 0x1b, - 0x02, 0x02, 0xa0, 0x01, 0xa0, 0x01, 0x70, 0x18, 0xd0, 0x94, 0x1d, 0x90, - 0xb8, 0xac, 0x90, 0x65, 0x01, 0xf0, 0x60, 0x0c, 0xb8, 0xae, 0x60, 0x24, - 0xc0, 0x8d, 0x60, 0x26, 0x60, 0x03, 0x00, 0x04, 0x60, 0x1b, 0x00, 0x00, - 0x60, 0x13, 0x00, 0x00, 0x60, 0x1f, 0x01, 0x01, 0x60, 0x14, 0x90, 0x4d, - 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x8b, 0x00, 0x00, 0xa8, 0xa8, 0xa8, 0xab, - 0x00, 0x00, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x10, 0x8b, - 0x08, 0x0c, 0x8e, 0x58, 0x08, 0xf8, 0x20, 0x71, 0x03, 0x00, 0x70, 0x1b, - 0x02, 0x00, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x16, - 0x00, 0x06, 0x01, 0x56, 0x08, 0x0c, 0x26, 0x8c, 0x01, 0x5e, 0x11, 0xb0, - 0x08, 0x0c, 0x67, 0x49, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0x0e, 0x00, 0x1e, - 0xb9, 0x12, 0xb8, 0x16, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x40, 0x2b, 0x00, - 0x60, 0x12, 0x60, 0x23, 0x00, 0x01, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, - 0xb2, 0x0a, 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x1e, - 0x0c, 0xd0, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0x93, 0x10, 0x93, 0x10, - 0x93, 0x10, 0x93, 0x12, 0x93, 0x5b, 0x93, 0x10, 0x93, 0x10, 0x93, 0x10, - 0x93, 0xd5, 0x93, 0x10, 0x94, 0x0d, 0x93, 0x10, 0x93, 0x10, 0x93, 0x10, - 0x93, 0x10, 0x93, 0x10, 0x08, 0x0c, 0x0d, 0x85, 0x91, 0x82, 0x00, 0x40, - 0x00, 0x02, 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, - 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x27, 0x93, 0x38, - 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x25, 0x93, 0x49, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x00, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbb, 0x05, 0x00, 0x00, 0xbe, - 0x08, 0x0c, 0x6e, 0x11, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, - 0x08, 0x0c, 0x9a, 0x48, 0x00, 0xd6, 0x61, 0x14, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0x30, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0x70, 0x12, - 0x00, 0x9e, 0x00, 0xde, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x0c, - 0x9a, 0x48, 0x08, 0x0c, 0x33, 0x15, 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x20, 0xa8, 0x7b, 0x00, 0x29, 0x08, 0x0c, - 0x70, 0x12, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x60, 0x1b, - 0x00, 0x00, 0x91, 0x82, 0x00, 0x40, 0x00, 0x96, 0x00, 0x02, 0x93, 0x76, - 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, - 0x93, 0x76, 0x93, 0x78, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0xd1, - 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, 0x93, 0x76, - 0x93, 0x7f, 0x93, 0x76, 0x08, 0x0c, 0x0d, 0x85, 0x61, 0x14, 0x21, 0x48, - 0xa9, 0x38, 0x91, 0x8e, 0xff, 0xff, 0x09, 0x04, 0x93, 0xd1, 0x60, 0x24, - 0xd0, 0x8c, 0x15, 0xd8, 0x08, 0x0c, 0x8f, 0x0e, 0x05, 0xe0, 0x00, 0xe6, - 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0x91, 0x2e, 0x00, 0x96, 0xa8, 0xa8, - 0x20, 0x48, 0x08, 0x0c, 0x6d, 0xa9, 0x00, 0x9e, 0xa8, 0xab, 0x00, 0x00, - 0x60, 0x10, 0x90, 0x05, 0x01, 0x28, 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, - 0x92, 0x5e, 0x00, 0xbe, 0xae, 0x88, 0x00, 0xb6, 0x20, 0x59, 0x00, 0x00, - 0x08, 0x0c, 0x8e, 0x61, 0x00, 0xbe, 0x01, 0xe0, 0x20, 0x71, 0x19, 0x3d, - 0x08, 0x0c, 0x8e, 0xa8, 0x01, 0xb8, 0x90, 0x86, 0x00, 0x01, 0x11, 0x28, - 0x20, 0x01, 0x19, 0x47, 0x20, 0x04, 0x90, 0x05, 0x11, 0x78, 0x00, 0x96, - 0x08, 0x0c, 0x10, 0x59, 0x29, 0x00, 0x00, 0x9e, 0x01, 0x48, 0xa8, 0xaa, - 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x8e, 0x1c, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x8e, 0x58, 0x0c, 0xd0, 0x08, 0x0c, - 0x8f, 0x13, 0x11, 0x60, 0x60, 0x10, 0x90, 0x05, 0x01, 0x30, 0x20, 0x58, - 0xb8, 0xac, 0x90, 0x05, 0x19, 0x0c, 0x0d, 0x85, 0x60, 0x12, 0x2c, 0x00, - 0x08, 0x0c, 0x8e, 0xd9, 0x00, 0x05, 0x08, 0x0c, 0x94, 0x89, 0x00, 0x9e, - 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, 0x00, 0x96, 0x00, 0x02, 0x93, 0xe9, - 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xeb, 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xe9, - 0x94, 0x0b, 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xe9, - 0x93, 0xe9, 0x93, 0xe9, 0x93, 0xe9, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x03, - 0x00, 0x03, 0x61, 0x06, 0x60, 0x14, 0x20, 0x48, 0xa8, 0xac, 0xa8, 0x36, - 0xa8, 0xb0, 0xa8, 0x3a, 0xa8, 0x47, 0x00, 0x00, 0xa8, 0x4b, 0x00, 0x00, - 0xa8, 0x84, 0x90, 0x92, 0x19, 0x9a, 0x02, 0x10, 0x20, 0x01, 0x19, 0x99, - 0x80, 0x03, 0x80, 0x13, 0x82, 0x13, 0x92, 0x10, 0x62, 0x1a, 0x08, 0x0c, - 0x1c, 0x26, 0x20, 0x09, 0x80, 0x30, 0x08, 0x0c, 0x96, 0x5e, 0x00, 0x9e, - 0x00, 0x05, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x9a, 0x48, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x00, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0xbb, 0x05, 0x00, 0x00, 0xbe, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x61, 0x44, - 0xd1, 0xfc, 0x01, 0x20, 0xd1, 0xac, 0x11, 0x10, 0x60, 0x03, 0x00, 0x03, - 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x96, - 0x00, 0x23, 0x00, 0x9e, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x05, 0x94, 0x43, - 0x94, 0x43, 0x94, 0x43, 0x94, 0x45, 0x94, 0x56, 0x94, 0x43, 0x94, 0x43, - 0x94, 0x43, 0x94, 0x43, 0x94, 0x43, 0x94, 0x43, 0x94, 0x43, 0x94, 0x43, - 0x94, 0x43, 0x94, 0x43, 0x94, 0x43, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, - 0xae, 0xe3, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbb, 0x05, 0x00, 0x00, 0xbe, 0x08, 0x0c, - 0x70, 0x12, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x04, 0x91, 0x00, 0x05, - 0x08, 0x0c, 0xac, 0xfc, 0x60, 0x00, 0x61, 0x44, 0xd1, 0xfc, 0x01, 0x30, - 0xd1, 0xac, 0x11, 0x20, 0x60, 0x03, 0x00, 0x03, 0x20, 0x09, 0x00, 0x03, - 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x96, 0x00, 0x33, - 0x00, 0x9e, 0x01, 0x06, 0x08, 0x0c, 0xad, 0x18, 0x01, 0x0e, 0x00, 0x05, - 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x94, 0x82, 0x94, 0x89, 0x94, 0x80, - 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, - 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x94, 0x80, 0x08, 0x0c, 0x0d, 0x85, - 0x00, 0x36, 0x00, 0xe6, 0x08, 0x0c, 0xae, 0xe3, 0x00, 0xee, 0x00, 0x3e, - 0x00, 0x05, 0x60, 0x24, 0xd0, 0x8c, 0x11, 0xf0, 0x00, 0xf6, 0x00, 0xe6, - 0x60, 0x1b, 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, 0x60, 0x10, 0x90, 0x05, - 0x01, 0x28, 0x00, 0xb6, 0x20, 0x58, 0x08, 0x0c, 0x92, 0x5e, 0x00, 0xbe, - 0x20, 0x71, 0x19, 0x3d, 0x08, 0x0c, 0x8e, 0xa8, 0x01, 0x60, 0x20, 0x01, - 0x18, 0x7f, 0x20, 0x04, 0xa8, 0x8a, 0x20, 0x31, 0x00, 0x00, 0x2c, 0x78, - 0x08, 0x0c, 0x8e, 0x1c, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x96, - 0xa8, 0x8b, 0x00, 0x00, 0xa8, 0xa8, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x8b, - 0x00, 0x9e, 0xa8, 0xab, 0x00, 0x00, 0x08, 0x0c, 0x8e, 0x58, 0x0c, 0x80, - 0x20, 0x01, 0x19, 0x25, 0x20, 0x0c, 0x91, 0x8e, 0x00, 0x00, 0x19, 0x0c, - 0x8f, 0x0e, 0x05, 0xc8, 0x00, 0xe6, 0x20, 0x71, 0x19, 0x24, 0x71, 0x10, - 0xc1, 0xc5, 0x71, 0x12, 0x08, 0x0c, 0x8f, 0x18, 0x00, 0xf6, 0x00, 0xc6, - 0x20, 0x71, 0x10, 0x00, 0x00, 0xb6, 0x2e, 0x04, 0x90, 0x5d, 0x01, 0x38, - 0xb8, 0xac, 0x90, 0x65, 0x01, 0x20, 0x08, 0x0c, 0x8e, 0xee, 0x09, 0x0c, - 0x92, 0x8d, 0x8e, 0x70, 0x9e, 0x86, 0x18, 0x00, 0x1d, 0x90, 0x00, 0xbe, - 0x00, 0xd6, 0x00, 0x96, 0x00, 0x46, 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x01, - 0x18, 0x1a, 0x20, 0x24, 0x60, 0x20, 0x90, 0x86, 0x00, 0x00, 0x11, 0x91, - 0x9c, 0xe0, 0x00, 0x1c, 0x24, 0x00, 0x9c, 0x06, 0x1d, 0xb8, 0x00, 0x4e, - 0x00, 0x9e, 0x00, 0xde, 0x00, 0xd1, 0x00, 0xce, 0x00, 0xfe, 0x20, 0x71, - 0x19, 0x24, 0x71, 0x10, 0xc1, 0xc4, 0x71, 0x12, 0x00, 0xee, 0x00, 0x05, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x60, 0x61, 0x00, 0x91, 0x86, - 0x00, 0x04, 0x11, 0x38, 0x61, 0x10, 0x81, 0xff, 0x19, 0x0c, 0x0d, 0x85, - 0x2c, 0x00, 0x08, 0x0c, 0x8e, 0xd9, 0x90, 0x06, 0x00, 0x05, 0x20, 0x71, - 0x19, 0x3f, 0x20, 0x73, 0x00, 0x00, 0x8e, 0x70, 0x9e, 0x86, 0x19, 0x47, - 0x1d, 0xd0, 0x20, 0x71, 0x19, 0x3d, 0x70, 0x06, 0x70, 0x02, 0x20, 0x01, - 0x19, 0x30, 0x20, 0x64, 0x8c, 0xff, 0x01, 0x30, 0x61, 0x20, 0x91, 0x8e, - 0x00, 0x00, 0x19, 0x0c, 0x0d, 0x85, 0x21, 0x02, 0x20, 0x01, 0x18, 0x8a, - 0x20, 0x0c, 0x81, 0xff, 0x01, 0x48, 0x00, 0x96, 0x21, 0x48, 0x08, 0x0c, - 0x10, 0x8b, 0x00, 0x9e, 0x20, 0x01, 0x18, 0x8a, 0x20, 0x03, 0x00, 0x00, - 0x20, 0x71, 0x19, 0x31, 0x08, 0x0c, 0x90, 0xf7, 0x08, 0x04, 0x91, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x7a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x36, 0x00, 0x46, 0x20, 0xa9, 0x00, 0x10, 0x90, 0x06, - 0x80, 0x04, 0x80, 0x86, 0x81, 0x8e, 0x12, 0x08, 0x92, 0x00, 0x1f, 0x04, - 0x95, 0x4f, 0x80, 0x86, 0x81, 0x8e, 0x00, 0x4e, 0x00, 0x3e, 0x01, 0x2e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x76, 0x01, 0x56, - 0x20, 0xa9, 0x00, 0x10, 0x90, 0x05, 0x01, 0xc8, 0x91, 0x1a, 0x12, 0xb8, - 0x82, 0x13, 0x81, 0x8d, 0x02, 0x28, 0x91, 0x1a, 0x12, 0x20, 0x1f, 0x04, - 0x95, 0x66, 0x00, 0x28, 0x91, 0x1a, 0x23, 0x08, 0x82, 0x10, 0x1f, 0x04, - 0x95, 0x66, 0x00, 0x06, 0x32, 0x00, 0x90, 0x84, 0xef, 0xff, 0x20, 0x80, - 0x00, 0x0e, 0x01, 0x5e, 0x00, 0x7e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x06, - 0x32, 0x00, 0x90, 0x85, 0x10, 0x00, 0x0c, 0xa8, 0x01, 0x26, 0x20, 0x91, - 0x28, 0x00, 0x20, 0x79, 0x19, 0xe8, 0x01, 0x2e, 0x00, 0xd6, 0x20, 0x69, - 0x19, 0xe8, 0x68, 0x03, 0x00, 0x05, 0x01, 0x56, 0x01, 0x46, 0x01, 0xd6, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, 0xaa, 0xf1, - 0x04, 0xc9, 0x08, 0x0c, 0xaa, 0xdc, 0x04, 0xb1, 0x08, 0x0c, 0xaa, 0xdf, - 0x04, 0x99, 0x08, 0x0c, 0xaa, 0xe2, 0x04, 0x81, 0x08, 0x0c, 0xaa, 0xe5, - 0x04, 0x69, 0x08, 0x0c, 0xaa, 0xe8, 0x04, 0x51, 0x08, 0x0c, 0xaa, 0xeb, - 0x04, 0x39, 0x08, 0x0c, 0xaa, 0xee, 0x04, 0x21, 0x01, 0xde, 0x01, 0x4e, - 0x01, 0x5e, 0x68, 0x57, 0x00, 0x00, 0x00, 0xf6, 0x20, 0x79, 0x03, 0x80, - 0x04, 0x19, 0x78, 0x07, 0x00, 0x03, 0x78, 0x03, 0x00, 0x00, 0x78, 0x03, - 0x00, 0x01, 0x20, 0x69, 0x00, 0x04, 0x2d, 0x04, 0x90, 0x84, 0xff, 0xfe, - 0x90, 0x85, 0x80, 0x00, 0x20, 0x6a, 0x20, 0x69, 0x01, 0x00, 0x68, 0x28, - 0x90, 0x84, 0xff, 0xfc, 0x68, 0x2a, 0x00, 0xfe, 0x20, 0x01, 0x1b, 0x5d, - 0x20, 0x03, 0x00, 0x00, 0x00, 0xde, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x20, - 0x20, 0xa1, 0x02, 0x40, 0x20, 0x01, 0x00, 0x00, 0x40, 0x04, 0x00, 0x05, - 0x00, 0xc6, 0x78, 0x03, 0x00, 0x00, 0x90, 0x06, 0x78, 0x27, 0x00, 0x30, - 0x78, 0x2b, 0x04, 0x00, 0x78, 0x27, 0x00, 0x31, 0x78, 0x2b, 0x1a, 0xf6, - 0x78, 0x1f, 0xff, 0x00, 0x78, 0x1b, 0xff, 0x00, 0x20, 0x61, 0x1a, 0xeb, - 0x60, 0x2f, 0x19, 0xe8, 0x60, 0x33, 0x18, 0x00, 0x60, 0x37, 0x1a, 0x04, - 0x60, 0x3b, 0x1e, 0xc1, 0x60, 0x3f, 0x1e, 0xd1, 0x60, 0x42, 0x60, 0x47, - 0x1a, 0xc1, 0x00, 0xce, 0x00, 0x05, 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x01, 0x01, 0xb0, 0x00, 0xc6, - 0x61, 0x46, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, 0x20, 0x61, 0x19, 0xe8, - 0x60, 0x2c, 0x80, 0x00, 0x60, 0x2e, 0x60, 0x1c, 0x90, 0x05, 0x01, 0x30, - 0x90, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x1e, 0x00, 0xce, 0x00, 0x05, - 0x61, 0x22, 0x61, 0x1e, 0x0c, 0xd8, 0x61, 0x46, 0x2c, 0x08, 0x20, 0x01, - 0x00, 0x12, 0x08, 0x0c, 0xac, 0xed, 0x00, 0x05, 0x00, 0x16, 0x20, 0x09, - 0x80, 0x20, 0x61, 0x46, 0x2c, 0x08, 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x01, 0x11, 0x28, 0x20, 0x01, - 0x00, 0x19, 0x08, 0x0c, 0xac, 0xed, 0x00, 0x88, 0x00, 0xc6, 0x20, 0x61, - 0x19, 0xe8, 0x60, 0x2c, 0x80, 0x00, 0x60, 0x2e, 0x60, 0x0c, 0x90, 0x05, - 0x01, 0x28, 0x90, 0x80, 0x00, 0x03, 0x21, 0x02, 0x61, 0x0e, 0x00, 0x10, - 0x61, 0x12, 0x61, 0x0e, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x01, - 0x03, 0x82, 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x01, - 0x01, 0x98, 0x00, 0xc6, 0x61, 0x46, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, - 0x20, 0x61, 0x19, 0xe8, 0x60, 0x44, 0x90, 0x05, 0x01, 0x30, 0x90, 0x80, - 0x00, 0x03, 0x21, 0x02, 0x61, 0x46, 0x00, 0xce, 0x00, 0x05, 0x61, 0x4a, - 0x61, 0x46, 0x0c, 0xd8, 0x61, 0x46, 0x60, 0x0f, 0x00, 0x00, 0x2c, 0x08, - 0x20, 0x01, 0x00, 0x13, 0x08, 0x0c, 0xac, 0xed, 0x00, 0x05, 0x60, 0x44, - 0xd0, 0xdc, 0x01, 0x10, 0x08, 0x0c, 0xa7, 0x8a, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x96, 0x00, 0x76, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, - 0x01, 0x26, 0x90, 0x2e, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x48, 0x26, 0x60, - 0x26, 0x78, 0x20, 0x91, 0x80, 0x00, 0x8c, 0xff, 0x09, 0x04, 0x96, 0xf1, - 0x9c, 0x86, 0x1b, 0x55, 0x09, 0x04, 0x96, 0xec, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0x92, 0x06, 0x19, 0x04, 0x96, 0xec, 0x87, 0xff, 0x01, 0x20, - 0x60, 0x5c, 0x91, 0x06, 0x19, 0x04, 0x96, 0xec, 0x70, 0x4c, 0x9c, 0x06, - 0x11, 0x88, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, - 0x70, 0x3f, 0x00, 0x00, 0x90, 0x06, 0x70, 0x4e, 0x70, 0x6a, 0x70, 0x52, - 0x70, 0x6e, 0x08, 0x0c, 0xaf, 0xf4, 0x00, 0x3e, 0x20, 0x29, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x67, 0x70, 0x48, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, - 0x76, 0x4a, 0x70, 0x44, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, - 0x01, 0x18, 0x2f, 0x00, 0x70, 0x46, 0x00, 0x10, 0x70, 0x47, 0x00, 0x00, - 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, - 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0xf0, 0x60, 0x14, 0x20, 0x48, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, - 0x15, 0x88, 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, 0x09, 0x0c, 0xa7, 0x8a, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x76, 0x08, 0x0c, 0xd2, 0x20, 0x08, 0x0c, 0xed, 0xdf, - 0x08, 0x0c, 0x70, 0x12, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x0c, - 0xd1, 0x0c, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, 0x08, 0x04, 0x96, 0x83, - 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, 0x96, 0x83, 0x01, 0x2e, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, 0x00, 0x5e, 0x00, 0x6e, - 0x00, 0x7e, 0x00, 0x9e, 0x00, 0xbe, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, - 0x00, 0xfe, 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x58, - 0x00, 0x16, 0x00, 0x36, 0x00, 0x76, 0x08, 0x0c, 0xed, 0xdf, 0x08, 0x0c, - 0xea, 0x30, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0xc0, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x09, 0x11, 0x68, 0xa8, 0x7b, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x76, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0x48, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x0a, 0x09, 0x04, 0x96, 0xd6, 0x08, 0x04, 0x96, 0xcf, 0x00, 0x06, - 0x00, 0x66, 0x00, 0x96, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xf6, 0x90, 0x36, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x79, 0x19, 0xe8, 0x78, 0x48, - 0x90, 0x65, 0x09, 0x04, 0x97, 0x90, 0x60, 0x0c, 0x00, 0x06, 0x60, 0x0f, - 0x00, 0x00, 0x78, 0x4c, 0x9c, 0x06, 0x11, 0xb0, 0x00, 0x36, 0x20, 0x19, - 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, 0x78, 0x3f, 0x00, 0x00, 0x90, 0x1e, - 0x7b, 0x4e, 0x7b, 0x6a, 0x7b, 0x52, 0x7b, 0x6e, 0x08, 0x0c, 0xaf, 0xf4, - 0x00, 0x3e, 0x00, 0x0e, 0x90, 0x05, 0x11, 0x18, 0x60, 0x0c, 0x60, 0x0f, - 0x00, 0x00, 0x00, 0x06, 0x9c, 0x86, 0x1b, 0x55, 0x05, 0xb0, 0x00, 0xe6, - 0x2f, 0x70, 0x08, 0x0c, 0x96, 0x67, 0x00, 0xee, 0x08, 0x0c, 0xcf, 0x1b, - 0x05, 0x48, 0x60, 0x14, 0x20, 0x48, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, - 0x15, 0xa8, 0x3e, 0x08, 0x91, 0x8e, 0x00, 0x02, 0x11, 0x88, 0x60, 0x10, - 0x90, 0x05, 0x01, 0x70, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x01, 0x40, 0x60, 0x48, 0x90, 0x05, 0x11, 0xc0, 0x20, 0x01, - 0x19, 0x88, 0x20, 0x04, 0x60, 0x4a, 0x00, 0x98, 0x60, 0x04, 0x90, 0x86, - 0x00, 0x40, 0x09, 0x0c, 0xa7, 0x8a, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, - 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x06, 0x08, 0x0c, 0xd1, 0x0c, - 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x0e, - 0x08, 0x04, 0x97, 0x34, 0x7e, 0x4a, 0x7e, 0x46, 0x01, 0x2e, 0x00, 0xfe, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x05, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, 0xea, 0x30, - 0x0c, 0x38, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x11, 0x30, 0xab, 0x7a, - 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, 0xb1, 0x6c, 0x0c, 0x10, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x0a, 0x09, 0x90, 0x08, 0x50, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x86, 0x90, 0x46, 0x00, 0xa9, 0x08, 0x0c, 0x98, 0xa3, 0x00, 0x8e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xf6, 0x01, 0x26, 0x20, 0x79, - 0x19, 0xe8, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x98, 0xec, 0x08, 0x0c, - 0x99, 0x82, 0x08, 0x0c, 0x69, 0x48, 0x01, 0x2e, 0x00, 0xfe, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0x96, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x00, 0x66, 0x00, 0x16, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x71, 0x19, 0xe8, 0x76, 0x20, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, - 0x09, 0x04, 0x98, 0x68, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x92, 0x06, - 0x19, 0x04, 0x98, 0x63, 0x88, 0xff, 0x01, 0x20, 0x60, 0x5c, 0x91, 0x06, - 0x19, 0x04, 0x98, 0x63, 0x70, 0x30, 0x9c, 0x06, 0x15, 0x80, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x20, 0xd0, 0xa4, 0x01, 0x10, 0xd0, 0xcc, 0x15, 0x08, - 0x08, 0x0c, 0x8a, 0x4b, 0x08, 0x0c, 0xa2, 0xa0, 0x68, 0xc3, 0x00, 0x00, - 0x08, 0x0c, 0xa7, 0x8a, 0x70, 0x33, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, - 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, - 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, - 0x00, 0x01, 0x00, 0x3e, 0x00, 0x40, 0x70, 0x08, 0xc0, 0xad, 0x70, 0x0a, - 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x08, 0x04, 0x98, 0x63, 0x70, 0x20, - 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x22, 0x70, 0x1c, 0x9c, 0x36, - 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x1e, - 0x00, 0x10, 0x70, 0x1f, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, - 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, - 0x00, 0x00, 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xe8, 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, - 0x15, 0x80, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, - 0x00, 0x98, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, - 0x00, 0x16, 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0xd2, 0x20, 0x08, 0x0c, - 0xed, 0xdf, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0x0c, 0xd1, 0x0c, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, 0xa6, 0x5d, - 0x00, 0xce, 0x08, 0x04, 0x97, 0xdb, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x08, 0x04, 0x97, 0xdb, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xbe, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x58, 0x00, 0x16, - 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0xed, 0xdf, 0x08, 0x0c, 0xea, 0x30, - 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, 0x08, 0xd0, 0x08, 0x0c, 0xbb, 0x5c, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x02, 0x11, 0x60, 0x60, 0x04, 0x00, 0x06, - 0x90, 0x86, 0x00, 0x85, 0x00, 0x0e, 0x09, 0x04, 0x98, 0x49, 0x90, 0x86, - 0x00, 0x8b, 0x09, 0x04, 0x98, 0x49, 0x08, 0x40, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x05, 0x19, 0x20, 0x60, 0x04, 0x00, 0x06, 0x90, 0x86, 0x00, 0x85, - 0x00, 0x0e, 0x09, 0xc8, 0x90, 0x86, 0x00, 0x8b, 0x09, 0xb0, 0x08, 0x04, - 0x98, 0x5c, 0x00, 0x06, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0x96, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0x66, 0x00, 0x16, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x92, 0x80, 0x10, 0x00, 0x20, 0x04, 0x90, 0x5d, 0x20, 0x79, 0x19, 0xe8, - 0x90, 0x36, 0x78, 0x28, 0x20, 0x60, 0x8c, 0xff, 0x05, 0x38, 0x60, 0x10, - 0x9b, 0x06, 0x15, 0x00, 0x60, 0x43, 0xff, 0xff, 0x08, 0x0c, 0xaf, 0x2e, - 0x01, 0xd8, 0x61, 0x0c, 0x00, 0x16, 0x08, 0x0c, 0xa4, 0x20, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, - 0x00, 0x16, 0x00, 0x36, 0x00, 0x86, 0x08, 0x0c, 0xd2, 0x20, 0x08, 0x0c, - 0xed, 0xdf, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x8e, 0x00, 0x3e, 0x00, 0x1e, - 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, 0x08, 0xd8, 0x2c, 0x30, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0xb8, 0x08, 0x0c, 0x69, 0x65, 0x01, 0x2e, 0x00, 0x1e, - 0x00, 0x6e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x9e, 0x00, 0xee, 0x00, 0xfe, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x96, 0x00, 0x06, 0x00, 0x66, 0x00, 0xc6, - 0x00, 0xd6, 0x90, 0x36, 0x78, 0x20, 0x90, 0x65, 0x09, 0x04, 0x99, 0x55, - 0x60, 0x0c, 0x00, 0x06, 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, 0x60, 0x0f, - 0x00, 0x00, 0x78, 0x30, 0x9c, 0x06, 0x15, 0x98, 0x20, 0x69, 0x01, 0x00, - 0x68, 0x20, 0xd0, 0xa4, 0x01, 0x10, 0xd0, 0xcc, 0x15, 0x08, 0x08, 0x0c, - 0x8a, 0x4b, 0x08, 0x0c, 0xa2, 0xa0, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, - 0xa7, 0x8a, 0x78, 0x33, 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, - 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, - 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x69, - 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, - 0x00, 0x3e, 0x00, 0x58, 0x08, 0x0c, 0x6b, 0xa9, 0x15, 0x38, 0x60, 0x03, - 0x00, 0x09, 0x63, 0x0a, 0x78, 0x08, 0xc0, 0xad, 0x78, 0x0a, 0x2c, 0x30, - 0x00, 0xf8, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x19, 0x01, 0xb0, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x08, 0x08, 0x0c, 0xd1, 0x32, - 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x60, 0x08, 0x0c, 0x6b, 0xa9, - 0x11, 0x68, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, - 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, 0xd1, 0x0c, 0x08, 0x0c, 0xb1, 0xa7, - 0x08, 0x0c, 0xa6, 0x5d, 0x00, 0x0e, 0x08, 0x04, 0x98, 0xf3, 0x7e, 0x22, - 0x7e, 0x1e, 0x00, 0xde, 0x00, 0xce, 0x00, 0x6e, 0x00, 0x0e, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x11, 0x18, 0x08, 0x0c, - 0xea, 0x30, 0x0c, 0x50, 0x08, 0x0c, 0xbb, 0x5c, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x50, 0x60, 0x04, 0x00, 0x06, 0x90, 0x86, 0x00, 0x85, - 0x00, 0x0e, 0x09, 0x90, 0x90, 0x86, 0x00, 0x8b, 0x09, 0x78, 0x08, 0xd0, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x05, 0x19, 0xb0, 0x60, 0x04, 0x00, 0x06, - 0x90, 0x86, 0x00, 0x85, 0x00, 0x0e, 0x0d, 0x18, 0x90, 0x86, 0x00, 0x8b, - 0x0d, 0x00, 0x08, 0x60, 0x00, 0x06, 0x00, 0x96, 0x00, 0xb6, 0x00, 0xc6, - 0x00, 0x66, 0x90, 0x36, 0x78, 0x28, 0x90, 0x65, 0x05, 0x10, 0x60, 0x10, - 0x20, 0x58, 0x60, 0x0c, 0x00, 0x06, 0x3e, 0x08, 0x91, 0x8e, 0x00, 0x02, - 0x11, 0x18, 0xb8, 0x00, 0xd0, 0xbc, 0x11, 0xa8, 0x60, 0x43, 0xff, 0xff, - 0x08, 0x0c, 0xaf, 0x2e, 0x01, 0x80, 0x61, 0x0c, 0x08, 0x0c, 0xa4, 0x20, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x0e, - 0x08, 0xf0, 0x2c, 0x30, 0x0c, 0xe0, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x9e, 0x00, 0x0e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, - 0x00, 0x66, 0x08, 0x0c, 0x62, 0xaf, 0x11, 0xb0, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x30, 0x90, 0x80, 0x00, 0x05, 0x20, 0x04, 0x90, 0x4d, 0x01, 0x70, - 0xa8, 0x78, 0x96, 0x06, 0x11, 0x58, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x30, - 0x90, 0x35, 0x01, 0x30, 0x90, 0x80, 0x00, 0x05, 0x20, 0x04, 0x99, 0x06, - 0x11, 0x08, 0x00, 0x29, 0x00, 0x6e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0xee, - 0x00, 0x05, 0x00, 0xc6, 0x26, 0x60, 0x60, 0x43, 0xff, 0xff, 0x08, 0x0c, - 0xaf, 0x2e, 0x01, 0x78, 0x08, 0x0c, 0xa4, 0x20, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x67, 0x01, 0x03, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0xd2, 0x20, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xc6, 0x08, 0x0c, 0xac, 0xfc, - 0x01, 0x06, 0x20, 0x71, 0x01, 0x01, 0x2e, 0x04, 0xc0, 0xc4, 0x20, 0x72, - 0x60, 0x44, 0xd0, 0xfc, 0x11, 0x38, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x71, 0x19, 0xe8, - 0x70, 0x30, 0x90, 0x05, 0x0d, 0xa0, 0x9c, 0x06, 0x19, 0x0c, 0x0d, 0x85, - 0x70, 0x36, 0x08, 0x0c, 0x8a, 0x4b, 0x70, 0x04, 0x90, 0x84, 0x00, 0x07, - 0x00, 0x02, 0x9a, 0x1b, 0x9a, 0x1d, 0x9a, 0x24, 0x9a, 0x2e, 0x9a, 0x3c, - 0x9a, 0x1b, 0x9a, 0x29, 0x9a, 0x19, 0x08, 0x0c, 0x0d, 0x85, 0x04, 0x28, - 0x00, 0x05, 0x08, 0x0c, 0xaf, 0x19, 0x70, 0x07, 0x00, 0x00, 0x70, 0x33, - 0x00, 0x00, 0x00, 0xe8, 0x00, 0x66, 0x90, 0x36, 0x08, 0x0c, 0xa4, 0x20, - 0x00, 0x6e, 0x70, 0x07, 0x00, 0x00, 0x70, 0x33, 0x00, 0x00, 0x00, 0x98, - 0x08, 0x0c, 0xaf, 0x04, 0x01, 0x40, 0x08, 0x0c, 0xaf, 0x19, 0x01, 0x28, - 0x00, 0x66, 0x90, 0x36, 0x08, 0x0c, 0xa4, 0x20, 0x00, 0x6e, 0x70, 0x33, - 0x00, 0x00, 0x00, 0x28, 0x08, 0x0c, 0xaf, 0x04, 0x08, 0x0c, 0xa7, 0x8a, - 0x00, 0x00, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, 0x00, 0xce, 0x00, 0xee, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, 0xac, 0xfc, - 0x01, 0x06, 0x60, 0x44, 0xd0, 0xfc, 0x11, 0x30, 0x01, 0x0e, 0x09, 0x0c, - 0xad, 0x18, 0x00, 0xce, 0x00, 0xde, 0x00, 0x05, 0x20, 0x69, 0x19, 0xe8, - 0x68, 0x4c, 0x90, 0x05, 0x0d, 0xa8, 0x9c, 0x06, 0x19, 0x0c, 0x0d, 0x85, - 0x68, 0x52, 0x00, 0xe6, 0x2d, 0x70, 0x08, 0x0c, 0x96, 0x67, 0x00, 0xee, - 0x08, 0x0c, 0x8a, 0x58, 0x00, 0x16, 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, - 0x22, 0x20, 0x00, 0x1e, 0x68, 0x3c, 0x90, 0x84, 0x00, 0x03, 0x00, 0x02, - 0x9a, 0x76, 0x9a, 0x77, 0x9a, 0x96, 0x9a, 0x74, 0x08, 0x0c, 0x0d, 0x85, - 0x04, 0x90, 0x68, 0x68, 0x90, 0x86, 0x00, 0x01, 0x01, 0x98, 0x60, 0x0c, - 0x90, 0x15, 0x01, 0x68, 0x6a, 0x4a, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x44, - 0x90, 0x84, 0x7f, 0x7f, 0x60, 0x46, 0x90, 0x06, 0x68, 0x42, 0x68, 0x4e, - 0x68, 0x3f, 0x00, 0x00, 0x00, 0xf0, 0x68, 0x4a, 0x68, 0x46, 0x0c, 0x98, - 0x68, 0x6b, 0x00, 0x00, 0x68, 0x48, 0x90, 0x65, 0x0d, 0x70, 0x60, 0x03, - 0x00, 0x02, 0x0c, 0x58, 0x60, 0x44, 0x90, 0x84, 0x7f, 0x7f, 0x60, 0x46, - 0x90, 0x06, 0x68, 0x42, 0x68, 0x4e, 0x68, 0x6a, 0x68, 0x52, 0x68, 0x6e, - 0x60, 0x0c, 0x90, 0x15, 0x01, 0x20, 0x6a, 0x4a, 0x60, 0x0f, 0x00, 0x00, - 0x00, 0x10, 0x68, 0x4a, 0x68, 0x46, 0x08, 0x0c, 0xaf, 0xf4, 0x68, 0x4f, - 0x00, 0x00, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, 0x00, 0xce, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x05, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x0b, - 0x00, 0x05, 0x9a, 0xc9, 0x9a, 0xcc, 0x9f, 0x80, 0xa0, 0x19, 0x9a, 0xcc, - 0x9f, 0x80, 0xa0, 0x19, 0x9a, 0xc9, 0x9a, 0xcc, 0x9a, 0xc9, 0x9a, 0xc9, - 0x9a, 0xc9, 0x9a, 0xc9, 0x9a, 0xc9, 0x9a, 0xc9, 0x9a, 0xc9, 0x08, 0x0c, - 0x99, 0xed, 0x00, 0x05, 0x00, 0xb6, 0x01, 0x56, 0x01, 0x36, 0x01, 0x46, - 0x01, 0xc6, 0x01, 0xd6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, - 0x20, 0x69, 0x02, 0x00, 0x20, 0x71, 0x02, 0x40, 0x60, 0x04, 0x90, 0x8a, - 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0x85, 0x61, 0x10, 0x21, 0x58, 0xb9, 0x84, - 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0x90, 0x8a, 0x00, 0x40, - 0x1a, 0x04, 0x9b, 0x38, 0x00, 0x5b, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, - 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, 0x01, 0x4e, 0x01, 0x3e, 0x01, 0x5e, - 0x00, 0xbe, 0x00, 0x05, 0x9c, 0xe1, 0x9d, 0x1c, 0x9d, 0x45, 0x9e, 0x0f, - 0x9e, 0x31, 0x9e, 0x37, 0x9e, 0x44, 0x9e, 0x4c, 0x9e, 0x58, 0x9e, 0x5e, - 0x9e, 0x6f, 0x9e, 0x5e, 0x9e, 0xc7, 0x9e, 0x4c, 0x9e, 0xd3, 0x9e, 0xd9, - 0x9e, 0x58, 0x9e, 0xd9, 0x9e, 0xe5, 0x9b, 0x36, 0x9b, 0x36, 0x9b, 0x36, - 0x9b, 0x36, 0x9b, 0x36, 0x9b, 0x36, 0x9b, 0x36, 0x9b, 0x36, 0x9b, 0x36, - 0x9b, 0x36, 0x9b, 0x36, 0xa4, 0x41, 0xa4, 0x64, 0xa4, 0x75, 0xa4, 0x95, - 0xa4, 0xc7, 0x9e, 0x44, 0x9b, 0x36, 0x9e, 0x44, 0x9e, 0x5e, 0x9b, 0x36, - 0x9d, 0x45, 0x9e, 0x0f, 0x9b, 0x36, 0xa8, 0x88, 0x9e, 0x5e, 0x9b, 0x36, - 0xa8, 0xa4, 0x9e, 0x5e, 0x9b, 0x36, 0x9e, 0x58, 0x9c, 0xdb, 0x9b, 0x59, - 0x9b, 0x36, 0xa8, 0xc0, 0xa9, 0x2d, 0xaa, 0x11, 0x9b, 0x36, 0xaa, 0x1e, - 0x9e, 0x41, 0xaa, 0x49, 0x9b, 0x36, 0xa4, 0xd1, 0xaa, 0x55, 0x9b, 0x36, - 0x08, 0x0c, 0x0d, 0x85, 0x21, 0x00, 0x00, 0x5b, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x01, 0xde, 0x01, 0xce, 0x01, 0x4e, 0x01, 0x3e, - 0x01, 0x5e, 0x00, 0xbe, 0x00, 0x05, 0xaa, 0xf5, 0xab, 0xa7, 0x9b, 0x57, - 0x9b, 0x91, 0x9c, 0x3d, 0x9c, 0x48, 0x9b, 0x57, 0x9e, 0x44, 0x9b, 0x57, - 0x9c, 0xa2, 0x9c, 0xae, 0x9b, 0xac, 0x9b, 0x57, 0x9b, 0xc7, 0x9b, 0xfb, - 0xb0, 0x08, 0xb0, 0x4d, 0x9e, 0x5e, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0xd6, - 0x00, 0x96, 0x08, 0x0c, 0x9e, 0xf8, 0x00, 0x26, 0x00, 0x36, 0x78, 0x14, - 0x20, 0x48, 0xa9, 0x58, 0xd1, 0xcc, 0x11, 0x38, 0x20, 0x09, 0x24, 0x14, - 0x20, 0x11, 0x00, 0x18, 0x20, 0x19, 0x00, 0x18, 0x00, 0x30, 0x20, 0x09, - 0x24, 0x10, 0x20, 0x11, 0x00, 0x14, 0x20, 0x19, 0x00, 0x14, 0x71, 0x02, - 0x72, 0x06, 0x70, 0x0b, 0x08, 0x00, 0xa8, 0x3c, 0x70, 0x0e, 0xa8, 0x50, - 0x70, 0x22, 0xa8, 0x54, 0x70, 0x26, 0x63, 0xc2, 0x08, 0x0c, 0xa2, 0x70, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x78, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xa0, 0x00, 0xbe, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x18, 0x90, 0x84, 0xff, 0x80, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, - 0x05, 0x00, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x74, 0x70, 0x0a, 0xa8, 0x78, - 0x70, 0x0e, 0xa8, 0x7c, 0x70, 0x12, 0xa8, 0x80, 0x70, 0x16, 0xa8, 0x84, - 0x70, 0x1a, 0xa8, 0x88, 0x70, 0x1e, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x0c, - 0xa2, 0x70, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, - 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x05, 0x00, 0x78, 0x14, 0x20, 0x48, - 0xa8, 0xcc, 0x70, 0x0a, 0xa8, 0xd0, 0x70, 0x0e, 0xa8, 0xd4, 0x70, 0x12, - 0xa8, 0xd8, 0x70, 0x16, 0xa8, 0xdc, 0x70, 0x1a, 0xa8, 0xe0, 0x70, 0x1e, - 0x60, 0xc3, 0x00, 0x10, 0x08, 0x0c, 0xa2, 0x70, 0x00, 0x9e, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9e, 0xf8, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x01, 0x19, 0xa4, - 0x20, 0x03, 0x00, 0x00, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x14, 0x80, 0x03, - 0x60, 0xc2, 0xa8, 0x30, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x1b, 0x20, 0x98, 0x20, 0x01, 0x19, 0xa4, 0x00, 0x16, - 0x20, 0x0c, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x22, 0x05, 0x08, 0x0c, - 0xdc, 0xef, 0x90, 0x06, 0x08, 0x0c, 0x22, 0x05, 0x00, 0x1e, 0xa8, 0x04, - 0x90, 0x05, 0x01, 0x10, 0x20, 0x48, 0x0c, 0x28, 0x04, 0xd9, 0x08, 0x0c, - 0xa2, 0x70, 0x01, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x96, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x9f, 0x43, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0x01, 0x19, 0xa4, 0x20, 0x03, 0x00, 0x00, - 0x78, 0x14, 0x20, 0x48, 0xa8, 0x6f, 0x02, 0x00, 0xa8, 0x73, 0x00, 0x00, - 0xa8, 0x14, 0x80, 0x03, 0x60, 0xc2, 0xa8, 0x30, 0x20, 0xa8, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0x98, 0x20, 0x01, - 0x19, 0xa4, 0x00, 0x16, 0x20, 0x0c, 0x08, 0x0c, 0xdc, 0xef, 0x00, 0x1e, - 0xa8, 0x04, 0x90, 0x05, 0x01, 0x10, 0x20, 0x48, 0x0c, 0x60, 0x00, 0x51, - 0x78, 0x14, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, 0x08, 0x0c, 0xa2, 0x70, - 0x01, 0x2e, 0x00, 0x9e, 0x00, 0xde, 0x00, 0x05, 0x60, 0xc0, 0x80, 0x04, - 0x90, 0x84, 0x00, 0x03, 0x90, 0x05, 0x01, 0x30, 0x90, 0x82, 0x00, 0x04, - 0x20, 0xa3, 0x00, 0x00, 0x80, 0x00, 0x1d, 0xe0, 0x00, 0x05, 0x08, 0x0c, - 0x9e, 0xf8, 0x70, 0x03, 0x78, 0x00, 0x78, 0x08, 0x80, 0x07, 0x70, 0x0a, - 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xd6, 0x00, 0xe6, - 0x08, 0x0c, 0x9f, 0x43, 0x78, 0x14, 0x90, 0x84, 0xff, 0x00, 0x20, 0x73, - 0x02, 0x00, 0x8e, 0x70, 0x8e, 0x70, 0x90, 0x96, 0xdf, 0x00, 0x01, 0x38, - 0x90, 0x96, 0xe0, 0x00, 0x01, 0x20, 0x20, 0x73, 0x00, 0x10, 0x8e, 0x70, - 0x00, 0x30, 0x90, 0x95, 0x00, 0x10, 0x22, 0x72, 0x8e, 0x70, 0x20, 0x73, - 0x00, 0x34, 0x8e, 0x70, 0x20, 0x69, 0x18, 0x05, 0x20, 0xa9, 0x00, 0x04, - 0x2d, 0x76, 0x8d, 0x68, 0x8e, 0x70, 0x1f, 0x04, 0x9c, 0x68, 0x20, 0x69, - 0x18, 0x01, 0x20, 0xa9, 0x00, 0x04, 0x2d, 0x76, 0x8d, 0x68, 0x8e, 0x70, - 0x1f, 0x04, 0x9c, 0x71, 0x90, 0x96, 0xdf, 0x00, 0x01, 0x30, 0x90, 0x96, - 0xe0, 0x00, 0x01, 0x18, 0x60, 0xc3, 0x00, 0x18, 0x00, 0xf0, 0x20, 0x69, - 0x19, 0xb4, 0x90, 0x86, 0xdf, 0x00, 0x01, 0x10, 0x20, 0x69, 0x19, 0xce, - 0x20, 0xa9, 0x00, 0x1a, 0x9e, 0x86, 0x02, 0x60, 0x11, 0x48, 0x00, 0xc6, - 0x20, 0x61, 0x02, 0x00, 0x60, 0x10, 0x80, 0x00, 0x60, 0x12, 0x00, 0xce, - 0x20, 0x71, 0x02, 0x40, 0x2d, 0x04, 0x80, 0x07, 0x20, 0x72, 0x8d, 0x68, - 0x8e, 0x70, 0x1f, 0x04, 0x9c, 0x88, 0x60, 0xc3, 0x00, 0x4c, 0x08, 0x0c, - 0xa2, 0x70, 0x00, 0xee, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x9e, 0xf8, - 0x70, 0x03, 0x63, 0x00, 0x70, 0x07, 0x00, 0x28, 0x78, 0x08, 0x70, 0x0e, - 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xd6, 0x00, 0x26, - 0x00, 0x16, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x02, 0x00, 0x78, 0x14, - 0x70, 0x0e, 0x00, 0xe6, 0x9e, 0xf0, 0x00, 0x04, 0x20, 0x09, 0x00, 0x01, - 0x20, 0x11, 0x00, 0x0c, 0x20, 0x69, 0x19, 0x24, 0x68, 0x10, 0xd0, 0x84, - 0x11, 0x48, 0x20, 0x73, 0x05, 0x00, 0x8e, 0x70, 0x20, 0x73, 0x00, 0x00, - 0x8e, 0x70, 0x81, 0x08, 0x92, 0x90, 0x00, 0x04, 0x20, 0x73, 0x08, 0x00, - 0x8e, 0x70, 0x20, 0x73, 0x00, 0x00, 0x00, 0xee, 0x72, 0x06, 0x71, 0x0a, - 0x62, 0xc2, 0x08, 0x0c, 0xa2, 0x70, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x60, 0x9a, 0x08, 0x04, - 0xa2, 0x70, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x52, 0x00, 0x20, 0x69, - 0x18, 0x47, 0x68, 0x04, 0xd0, 0x84, 0x01, 0x30, 0x68, 0x28, 0x00, 0x16, - 0x08, 0x0c, 0x26, 0xbf, 0x71, 0x0e, 0x00, 0x1e, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, 0x00, 0x00, - 0x20, 0xa1, 0x02, 0x50, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, - 0x18, 0x01, 0x20, 0xa1, 0x02, 0x54, 0x40, 0x03, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x20, 0xb8, 0xa0, 0x90, 0x82, 0x00, 0x7f, 0x02, 0x48, 0x20, 0x01, - 0x18, 0x1f, 0x20, 0x04, 0x70, 0x32, 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, - 0x70, 0x36, 0x00, 0x30, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x70, 0x36, 0x60, 0xc3, 0x00, 0x1c, 0x08, 0x04, 0xa2, 0x70, - 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x05, 0x00, 0x08, 0x0c, 0xb0, 0x94, - 0x11, 0x20, 0xb8, 0xa0, 0x90, 0x82, 0x00, 0x7f, 0x02, 0x48, 0x20, 0x01, - 0x18, 0x1f, 0x20, 0x04, 0x70, 0x0a, 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, - 0x70, 0x0e, 0x00, 0x30, 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, - 0x00, 0xff, 0x70, 0x0e, 0x20, 0xa9, 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, - 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x50, - 0x40, 0x03, 0x60, 0xc3, 0x00, 0x10, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, - 0x9e, 0xf8, 0x90, 0x06, 0x08, 0x0c, 0x6b, 0xdb, 0xb8, 0xa0, 0x90, 0x86, - 0x00, 0x7e, 0x11, 0x70, 0x20, 0x11, 0x02, 0x40, 0x20, 0x13, 0x22, 0xff, - 0x20, 0x11, 0x02, 0x41, 0x20, 0x13, 0xff, 0xfe, 0x70, 0x03, 0x04, 0x00, - 0x62, 0x0c, 0xc2, 0xb4, 0x62, 0x0e, 0x00, 0x58, 0x78, 0x14, 0x00, 0x96, - 0x90, 0x4d, 0x01, 0x20, 0x90, 0x06, 0xa8, 0x9a, 0xa8, 0xa6, 0xa8, 0xaa, - 0x00, 0x9e, 0x70, 0x03, 0x03, 0x00, 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, - 0x19, 0x04, 0x9d, 0xcf, 0x00, 0xd6, 0x20, 0x69, 0x19, 0x6c, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x88, 0x68, 0x00, 0x70, 0x0a, - 0x68, 0x08, 0x90, 0x84, 0x20, 0x00, 0x70, 0x12, 0x08, 0x0c, 0xb0, 0xab, - 0x68, 0x0c, 0x70, 0x16, 0x70, 0x1f, 0x27, 0x10, 0x68, 0x18, 0x70, 0x22, - 0x68, 0x1c, 0x70, 0x26, 0x04, 0x28, 0x68, 0x00, 0x70, 0x0a, 0x68, 0x04, - 0x70, 0x0e, 0x20, 0x09, 0x18, 0x0d, 0x21, 0x0c, 0xd1, 0x8c, 0x01, 0x10, - 0x20, 0x01, 0x00, 0x02, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x28, 0x78, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x27, 0x00, - 0x78, 0xe2, 0x00, 0xfe, 0x68, 0x08, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x18, - 0x90, 0x84, 0x37, 0xff, 0x00, 0x10, 0x90, 0x84, 0x3f, 0xff, 0x70, 0x12, - 0x08, 0x0c, 0xb0, 0xab, 0x68, 0x0c, 0x70, 0x16, 0x00, 0xde, 0x20, 0xa9, - 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x56, 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x99, 0x18, 0x01, 0x20, 0xa1, 0x02, 0x5a, 0x40, 0x03, 0x00, 0xd6, - 0x08, 0x0c, 0xaa, 0xdc, 0x20, 0x69, 0x19, 0x74, 0x20, 0x71, 0x02, 0x4e, - 0x68, 0x00, 0xc0, 0xdd, 0x70, 0x02, 0x08, 0x0c, 0x58, 0x44, 0xd0, 0xe4, - 0x01, 0x10, 0x68, 0x0c, 0x70, 0x0e, 0x00, 0xde, 0x04, 0xe0, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0xa8, 0x00, 0x16, 0x20, 0x01, - 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x20, 0x09, 0x00, 0x02, 0x11, 0x18, - 0x20, 0x01, 0x19, 0x6d, 0x20, 0x0c, 0x60, 0xe0, 0x91, 0x06, 0x01, 0x30, - 0x21, 0x00, 0x60, 0xe3, 0x00, 0x00, 0x08, 0x0c, 0x27, 0x00, 0x61, 0xe2, - 0x00, 0x1e, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x19, 0x6c, 0x20, 0xe9, - 0x00, 0x00, 0x20, 0xa1, 0x02, 0x4e, 0x20, 0xa9, 0x00, 0x08, 0x40, 0x03, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0x18, 0x05, 0x20, 0xa1, 0x02, 0x56, - 0x40, 0x03, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x99, 0x18, 0x01, 0x20, 0xa1, - 0x02, 0x5a, 0x40, 0x03, 0x08, 0x0c, 0xaa, 0xdc, 0x20, 0xa1, 0x02, 0x4e, - 0x20, 0xa9, 0x00, 0x08, 0x20, 0x99, 0x19, 0x74, 0x40, 0x03, 0x60, 0xc3, - 0x00, 0x74, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, - 0x20, 0x10, 0x70, 0x07, 0x00, 0x14, 0x70, 0x0b, 0x08, 0x00, 0x70, 0x0f, - 0x20, 0x00, 0x90, 0x06, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x47, 0x79, 0x04, - 0x00, 0xfe, 0xd1, 0xac, 0x11, 0x10, 0x90, 0x85, 0x00, 0x20, 0xd1, 0xa4, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x10, 0x90, 0x85, 0x00, 0x02, 0x00, 0xd6, - 0x08, 0x04, 0x9e, 0xa8, 0x70, 0x26, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x04, - 0xa2, 0x70, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x50, 0x00, 0x08, 0x04, - 0x9d, 0x67, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x21, 0x10, 0x70, 0x07, - 0x00, 0x14, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, - 0x9f, 0x3a, 0x00, 0x10, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x02, 0x00, - 0x60, 0xc3, 0x00, 0x04, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, 0x9f, 0x43, - 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, 0x00, 0x03, 0x70, 0x0f, 0x2a, 0x00, - 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, 0x9f, 0x43, - 0x70, 0x03, 0x02, 0x00, 0x08, 0x04, 0x9d, 0x67, 0x08, 0x0c, 0x9f, 0x43, - 0x70, 0x03, 0x01, 0x00, 0x78, 0x2c, 0x90, 0x05, 0x01, 0x10, 0x70, 0x0a, - 0x00, 0x10, 0x70, 0x0b, 0x00, 0x03, 0x78, 0x14, 0x70, 0x0e, 0x60, 0xc3, - 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xd6, 0x08, 0x0c, 0x9f, 0x43, - 0x70, 0x03, 0x02, 0x10, 0x70, 0x07, 0x00, 0x14, 0x70, 0x0b, 0x08, 0x00, - 0xb8, 0x94, 0x90, 0x86, 0x00, 0x14, 0x11, 0x98, 0xb9, 0x9c, 0x91, 0x84, - 0x00, 0x30, 0x01, 0x90, 0xb9, 0x98, 0x91, 0x84, 0xc0, 0x00, 0x11, 0x40, - 0xd1, 0xec, 0x01, 0x18, 0x70, 0x0f, 0x21, 0x00, 0x00, 0x58, 0x70, 0x0f, - 0x01, 0x00, 0x00, 0x40, 0x70, 0x0f, 0x04, 0x00, 0x00, 0x28, 0x70, 0x0f, - 0x07, 0x00, 0x00, 0x10, 0x70, 0x0f, 0x08, 0x00, 0x00, 0xf6, 0x20, 0x79, - 0x18, 0x47, 0x79, 0x04, 0x00, 0xfe, 0xd1, 0xac, 0x11, 0x10, 0x90, 0x85, - 0x00, 0x20, 0xd1, 0xa4, 0x01, 0x10, 0x90, 0x85, 0x00, 0x10, 0x20, 0x09, - 0x18, 0x69, 0x21, 0x0c, 0xd1, 0x84, 0x11, 0x10, 0x90, 0x85, 0x00, 0x02, - 0x00, 0x26, 0x20, 0x09, 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xe4, 0x01, 0x50, - 0xc0, 0xc5, 0xba, 0xd4, 0xd2, 0x8c, 0x11, 0x08, 0xc0, 0xcd, 0x90, 0x94, - 0x00, 0x30, 0x92, 0x96, 0x00, 0x10, 0x01, 0x40, 0xd1, 0xec, 0x01, 0x30, - 0x90, 0x94, 0x00, 0x30, 0x92, 0x96, 0x00, 0x10, 0x01, 0x08, 0xc0, 0xbd, - 0x00, 0x2e, 0x70, 0x26, 0x60, 0xc3, 0x00, 0x14, 0x00, 0xde, 0x08, 0x04, - 0xa2, 0x70, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x02, 0x10, 0x70, 0x07, - 0x00, 0x14, 0x70, 0x0f, 0x01, 0x00, 0x60, 0xc3, 0x00, 0x14, 0x08, 0x04, - 0xa2, 0x70, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x02, 0x00, 0x08, 0x04, - 0x9c, 0xe5, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, - 0x00, 0x03, 0x70, 0x0f, 0x2a, 0x00, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, - 0xa2, 0x70, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, - 0x00, 0x0b, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x00, 0x26, - 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x32, 0x00, 0x20, 0x21, - 0x08, 0x00, 0x00, 0x40, 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, - 0x20, 0x19, 0x22, 0x00, 0x20, 0x21, 0x01, 0x00, 0x08, 0x0c, 0xaa, 0xf1, - 0xb8, 0x10, 0x93, 0x05, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, - 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x94, 0x85, - 0x00, 0x29, 0x70, 0x12, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xde, 0x08, 0x0c, - 0xa2, 0x64, 0x72, 0x1a, 0x9f, 0x95, 0x00, 0x00, 0x72, 0x22, 0x70, 0x27, - 0xff, 0xff, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x26, - 0x08, 0x0c, 0xaa, 0xf1, 0x70, 0x03, 0x02, 0xff, 0x70, 0x07, 0xff, 0xfc, - 0x00, 0xd6, 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, - 0x70, 0x0e, 0x00, 0xde, 0x70, 0x13, 0x20, 0x29, 0x0c, 0x10, 0x70, 0x03, - 0x01, 0x00, 0x70, 0x07, 0x00, 0x00, 0x70, 0x0b, 0xfc, 0x02, 0x70, 0x0f, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x26, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, - 0x20, 0x19, 0x33, 0x00, 0x20, 0x21, 0x08, 0x00, 0x00, 0x40, 0x00, 0x26, - 0x00, 0xd6, 0x00, 0x36, 0x00, 0x46, 0x20, 0x19, 0x23, 0x00, 0x20, 0x21, - 0x01, 0x00, 0x08, 0x0c, 0xaa, 0xf1, 0xb8, 0x10, 0x93, 0x05, 0x70, 0x02, - 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0xb8, 0x10, 0x90, 0x05, - 0x11, 0x40, 0xb8, 0x14, 0x90, 0x05, 0x11, 0x28, 0x70, 0x0b, 0x00, 0xff, - 0x70, 0x0f, 0xff, 0xfe, 0x00, 0x20, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, - 0x70, 0x0e, 0x00, 0x00, 0x94, 0x85, 0x00, 0x98, 0x70, 0x12, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0xde, 0x08, 0x0c, 0xa2, 0x64, 0x72, 0x1a, 0x7a, 0x08, - 0x72, 0x22, 0x2f, 0x10, 0x72, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x2e, - 0x00, 0x05, 0x08, 0x0c, 0xa2, 0x64, 0x72, 0x1a, 0x7a, 0x08, 0x72, 0x22, - 0x78, 0x14, 0x70, 0x26, 0x20, 0x71, 0x02, 0x4c, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x69, - 0x02, 0x00, 0x20, 0x71, 0x02, 0x40, 0x60, 0x04, 0x90, 0x8a, 0x00, 0x85, - 0x0a, 0x0c, 0x0d, 0x85, 0x90, 0x8a, 0x00, 0x92, 0x1a, 0x0c, 0x0d, 0x85, - 0x61, 0x10, 0x21, 0x58, 0xb9, 0x84, 0x2c, 0x78, 0x20, 0x61, 0x01, 0x00, - 0x61, 0x9a, 0x90, 0x82, 0x00, 0x85, 0x00, 0x33, 0x00, 0xfe, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x9f, 0xb1, 0x9f, 0xc0, - 0x9f, 0xcb, 0x9f, 0xaf, 0x9f, 0xaf, 0x9f, 0xaf, 0x9f, 0xb1, 0x9f, 0xaf, - 0x9f, 0xaf, 0x9f, 0xaf, 0x9f, 0xaf, 0x9f, 0xaf, 0x9f, 0xaf, 0x08, 0x0c, - 0x0d, 0x85, 0x04, 0x11, 0x60, 0xc3, 0x00, 0x00, 0x00, 0x26, 0x08, 0x0c, - 0x2a, 0x04, 0x02, 0x28, 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc5, - 0x20, 0x12, 0x00, 0x2e, 0x08, 0x04, 0xa2, 0x70, 0x04, 0x31, 0x78, 0x08, - 0x70, 0x0a, 0x78, 0x14, 0x70, 0x0e, 0x70, 0x17, 0xff, 0xff, 0x60, 0xc3, - 0x00, 0x0c, 0x08, 0x04, 0xa2, 0x70, 0x04, 0xa1, 0x70, 0x03, 0x00, 0x03, - 0x70, 0x07, 0x03, 0x00, 0x60, 0xc3, 0x00, 0x04, 0x08, 0x04, 0xa2, 0x70, - 0x00, 0x26, 0x08, 0x0c, 0xaa, 0xf1, 0xb8, 0x10, 0x90, 0x85, 0x81, 0x00, - 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0x68, 0x7c, - 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x70, 0x13, 0x00, 0x09, 0x08, 0x04, - 0x9f, 0x13, 0x00, 0x26, 0x08, 0x0c, 0xaa, 0xf1, 0xb8, 0x10, 0x90, 0x85, - 0x84, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, - 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x20, 0x01, 0x00, 0x99, - 0x7a, 0x20, 0x92, 0x96, 0x00, 0x05, 0x01, 0x08, 0xc0, 0xbc, 0x70, 0x12, - 0x08, 0x04, 0x9f, 0x75, 0x00, 0x26, 0x08, 0x0c, 0xaa, 0xf1, 0xb8, 0x10, - 0x90, 0x85, 0x85, 0x00, 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, - 0x18, 0x00, 0x68, 0x7c, 0x70, 0x0a, 0x68, 0x80, 0x70, 0x0e, 0x20, 0x01, - 0x00, 0x99, 0x7a, 0x20, 0x92, 0x96, 0x00, 0x05, 0x01, 0x08, 0xc0, 0xbc, - 0x70, 0x12, 0x08, 0x04, 0x9f, 0x75, 0x00, 0xb6, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x2c, 0x78, 0x20, 0x69, 0x02, 0x00, 0x20, 0x71, - 0x02, 0x40, 0x78, 0x04, 0x90, 0x8a, 0x00, 0x40, 0x0a, 0x0c, 0x0d, 0x85, - 0x90, 0x8a, 0x00, 0x57, 0x1a, 0x0c, 0x0d, 0x85, 0x79, 0x10, 0x21, 0x58, - 0xb9, 0x84, 0x20, 0x61, 0x01, 0x00, 0x61, 0x9a, 0x90, 0x82, 0x00, 0x40, - 0x00, 0x33, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0xbe, - 0x00, 0x05, 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x7f, 0xa0, 0x4e, - 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x4e, 0xa0, 0x4e, - 0xa6, 0x44, 0xa6, 0x49, 0xa6, 0x4e, 0xa6, 0x53, 0xa0, 0x4e, 0xa0, 0x4e, - 0xa0, 0x4e, 0xa6, 0x3f, 0x08, 0x0c, 0x0d, 0x85, 0x68, 0x13, 0x00, 0x08, - 0xba, 0x8c, 0x82, 0x10, 0xb8, 0xd4, 0xd0, 0x84, 0x01, 0x80, 0x20, 0x01, - 0x1b, 0x72, 0x20, 0x0c, 0x81, 0x08, 0x21, 0x02, 0x20, 0x01, 0x1b, 0x71, - 0x20, 0x1c, 0x12, 0x18, 0x83, 0x18, 0x23, 0x02, 0x0e, 0xa0, 0x79, 0x52, - 0x71, 0x2e, 0x7b, 0x4e, 0x73, 0x2a, 0x92, 0x94, 0x00, 0xff, 0xba, 0x8e, - 0x82, 0x17, 0x72, 0x1a, 0xba, 0x10, 0x92, 0x95, 0x06, 0x00, 0x72, 0x02, - 0xba, 0x14, 0x72, 0x06, 0x20, 0x69, 0x18, 0x00, 0x6a, 0x7c, 0x72, 0x0a, - 0x6a, 0x80, 0x72, 0x0e, 0x70, 0x13, 0x08, 0x29, 0x2f, 0x10, 0x72, 0x22, - 0x70, 0x27, 0xff, 0xff, 0x00, 0x05, 0x00, 0x16, 0x78, 0x14, 0x90, 0x84, - 0x07, 0x00, 0x80, 0x07, 0x00, 0x13, 0x00, 0x1e, 0x00, 0x05, 0xa0, 0x8f, - 0xa0, 0x8f, 0xa0, 0x91, 0xa0, 0x8f, 0xa0, 0x8f, 0xa0, 0x8f, 0xa0, 0xab, - 0xa0, 0x8f, 0x08, 0x0c, 0x0d, 0x85, 0x79, 0x14, 0x91, 0x8c, 0x08, 0xff, - 0x91, 0x8d, 0xf6, 0x00, 0x79, 0x16, 0x20, 0x09, 0x00, 0x03, 0x00, 0xb9, - 0x20, 0x69, 0x18, 0x47, 0x68, 0x04, 0xd0, 0xbc, 0x01, 0x30, 0x68, 0x2c, - 0x90, 0x84, 0x00, 0xff, 0x80, 0x07, 0x70, 0x32, 0x00, 0x10, 0x70, 0x33, - 0x3f, 0x00, 0x60, 0xc3, 0x00, 0x01, 0x08, 0x04, 0xa2, 0x70, 0x20, 0x09, - 0x00, 0x03, 0x00, 0x19, 0x70, 0x33, 0x7f, 0x00, 0x0c, 0xb0, 0x00, 0x16, - 0x08, 0x0c, 0xaa, 0xf1, 0x00, 0x1e, 0xb8, 0x10, 0x90, 0x85, 0x01, 0x00, - 0x70, 0x02, 0xb8, 0x14, 0x70, 0x06, 0x20, 0x69, 0x18, 0x00, 0x6a, 0x7c, - 0x72, 0x0a, 0x6a, 0x80, 0x72, 0x0e, 0x70, 0x13, 0x08, 0x88, 0x91, 0x8d, - 0x00, 0x08, 0x71, 0x16, 0x08, 0x0c, 0xa2, 0x64, 0x72, 0x1a, 0x7a, 0x08, - 0x72, 0x22, 0x2f, 0x10, 0x72, 0x26, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x71, 0x60, 0x78, 0x10, - 0x20, 0x58, 0x76, 0xdc, 0x96, 0xb4, 0x00, 0x28, 0x01, 0x10, 0x73, 0x7c, - 0x74, 0x80, 0x25, 0x00, 0x76, 0xdc, 0x96, 0xb4, 0x00, 0x28, 0x01, 0x40, - 0x20, 0x01, 0x04, 0xff, 0x60, 0x62, 0x60, 0x67, 0xff, 0xff, 0x63, 0x6a, - 0x64, 0x6e, 0x00, 0x50, 0x20, 0x01, 0x00, 0xff, 0x90, 0x85, 0x04, 0x00, - 0x60, 0x62, 0x60, 0x67, 0xff, 0xff, 0x60, 0x6b, 0x00, 0x00, 0x61, 0x6e, - 0xb8, 0xb8, 0x60, 0x73, 0x05, 0x30, 0x60, 0x77, 0x00, 0x08, 0xb8, 0x8c, - 0x80, 0x00, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x90, 0x85, - 0x00, 0x20, 0x60, 0x7a, 0x60, 0x7f, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x82, - 0x60, 0x87, 0xff, 0xff, 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x48, - 0x60, 0x8a, 0xa8, 0x44, 0x60, 0x8e, 0xa8, 0x38, 0x60, 0xc6, 0xa8, 0x34, - 0x60, 0xca, 0x00, 0x9e, 0xb8, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, - 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0x90, 0x84, 0x00, 0x28, 0x01, 0x28, 0x60, 0x9f, 0x00, 0x00, - 0x20, 0x01, 0x00, 0x92, 0x00, 0x58, 0x60, 0x28, 0xc0, 0xbd, 0x60, 0x2a, - 0x60, 0x9f, 0x00, 0xff, 0x20, 0x11, 0xff, 0xff, 0x08, 0x0c, 0x2a, 0xd3, - 0x20, 0x01, 0x00, 0xb2, 0x20, 0x10, 0x90, 0x0e, 0x08, 0x0c, 0x2a, 0xe2, - 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, 0x8a, 0x50, 0x00, 0x3e, 0x00, 0x4e, - 0x00, 0x5e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xb6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, - 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x71, 0x60, 0x78, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x20, 0x28, - 0x76, 0xdc, 0xd6, 0xac, 0x11, 0x68, 0x95, 0x82, 0x00, 0x7e, 0x12, 0x50, - 0x25, 0x00, 0x90, 0x94, 0xff, 0x80, 0x11, 0x30, 0x90, 0x80, 0x34, 0x8e, - 0x20, 0x15, 0x92, 0x94, 0x00, 0xff, 0x00, 0x20, 0xb9, 0x10, 0xba, 0x14, - 0x73, 0x7c, 0x74, 0x80, 0x70, 0xdc, 0xd0, 0xac, 0x11, 0x30, 0x95, 0x82, - 0x00, 0x7e, 0x12, 0x18, 0x95, 0x84, 0xff, 0x80, 0x01, 0x38, 0x91, 0x85, - 0x04, 0x00, 0x60, 0x62, 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x00, 0x30, - 0x60, 0x63, 0x04, 0x00, 0x62, 0x66, 0x60, 0x6b, 0x00, 0x00, 0x61, 0x6e, - 0xb8, 0xb8, 0x60, 0x72, 0x60, 0x77, 0x00, 0x00, 0xb8, 0x64, 0xd0, 0xa4, - 0x01, 0x10, 0x60, 0x77, 0x00, 0x08, 0xb8, 0x8c, 0x80, 0x00, 0x90, 0x84, - 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x90, 0x85, 0x00, 0x20, 0x60, 0x7a, - 0x60, 0x7f, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x82, 0x60, 0x87, 0xff, 0xff, - 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x48, 0x60, 0x8a, 0xa8, 0x44, - 0x60, 0x8e, 0xa8, 0x38, 0x60, 0xc6, 0xa8, 0x34, 0x60, 0xca, 0x00, 0x9e, - 0xb8, 0x6c, 0x60, 0xce, 0x60, 0xab, 0x00, 0x36, 0x60, 0xaf, 0x95, 0xd5, - 0x60, 0xd7, 0x00, 0x00, 0xba, 0x84, 0x62, 0x9e, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x40, 0x78, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x90, 0x0e, 0x20, 0x11, - 0x00, 0x92, 0x08, 0x0c, 0x2a, 0xe2, 0x20, 0x09, 0x07, 0xd0, 0x08, 0x0c, - 0x8a, 0x50, 0x00, 0x3e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x56, 0x00, 0x46, 0x00, 0x36, - 0x20, 0x61, 0x01, 0x00, 0x20, 0x71, 0x18, 0x00, 0x78, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0x20, 0x28, 0xb9, 0x10, 0xba, 0x14, 0x73, 0x7c, 0x74, 0x80, - 0x78, 0x20, 0x00, 0x02, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, - 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, - 0xa1, 0xf1, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0xa1, 0xef, 0x08, 0x0c, - 0x0d, 0x85, 0xb8, 0x84, 0x60, 0x9e, 0x78, 0x14, 0x20, 0x48, 0xa8, 0x7c, - 0xd0, 0xfc, 0x05, 0x58, 0xaf, 0x90, 0x97, 0x84, 0xff, 0x00, 0x91, 0x05, - 0x60, 0x62, 0x87, 0x3f, 0x97, 0x84, 0xff, 0x00, 0x00, 0x06, 0x78, 0x14, - 0x20, 0x48, 0xa8, 0x78, 0xc0, 0xfc, 0x90, 0x05, 0x00, 0x0e, 0x11, 0x60, - 0xaf, 0x94, 0x87, 0xff, 0x01, 0x98, 0x20, 0x39, 0x00, 0x98, 0x97, 0x05, - 0x60, 0x72, 0x78, 0x08, 0x60, 0x82, 0x2f, 0x00, 0x60, 0x86, 0x00, 0x38, - 0x91, 0x85, 0x22, 0x00, 0x60, 0x62, 0x60, 0x73, 0x01, 0x29, 0x60, 0x77, - 0x00, 0x00, 0xb8, 0x84, 0x60, 0x9e, 0x00, 0x50, 0x20, 0x39, 0x00, 0x29, - 0x97, 0x05, 0x60, 0x72, 0x0c, 0xc0, 0x91, 0x85, 0x02, 0x00, 0x60, 0x62, - 0x60, 0x73, 0x20, 0x29, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x18, 0xaf, 0x94, - 0x87, 0xff, 0x11, 0x20, 0x2f, 0x00, 0x60, 0x82, 0x78, 0x08, 0x60, 0x86, - 0x62, 0x66, 0x63, 0x6a, 0x64, 0x6e, 0x60, 0x77, 0x00, 0x00, 0xb8, 0x8c, - 0x80, 0x00, 0x90, 0x84, 0x00, 0xff, 0xb8, 0x8e, 0x80, 0x07, 0x60, 0x7a, - 0x60, 0x7f, 0x00, 0x00, 0xa8, 0x48, 0x60, 0x8a, 0xa8, 0x44, 0x60, 0x8e, - 0xa8, 0x38, 0x60, 0xc6, 0xa8, 0x34, 0x60, 0xca, 0xb8, 0x6c, 0x60, 0xce, - 0x60, 0xaf, 0x95, 0xd5, 0x60, 0xd7, 0x00, 0x00, 0x08, 0x0c, 0xaa, 0xd1, - 0x20, 0x09, 0x07, 0xd0, 0x60, 0xc4, 0x90, 0x84, 0xff, 0xf0, 0x90, 0x05, - 0x01, 0x10, 0x20, 0x09, 0x1b, 0x58, 0x08, 0x0c, 0x8a, 0x50, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x05, 0x7a, 0x40, 0x92, 0x94, 0x00, 0xff, 0x82, 0x17, - 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x19, 0xe8, 0x68, 0x6b, 0x00, 0x01, - 0x00, 0xde, 0x00, 0x05, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, - 0x00, 0xf1, 0x08, 0x0c, 0x8a, 0x42, 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0x91, 0x84, 0x06, 0x00, 0x90, 0x86, 0x06, 0x00, - 0x01, 0x28, 0x00, 0x89, 0x08, 0x0c, 0x8a, 0x42, 0x00, 0x1e, 0x00, 0x05, - 0xc1, 0xe5, 0x20, 0x01, 0x18, 0x0c, 0x21, 0x02, 0x20, 0x01, 0x19, 0xe9, - 0x20, 0x03, 0x00, 0x00, 0x20, 0x01, 0x19, 0xf4, 0x20, 0x03, 0x00, 0x00, - 0x0c, 0x88, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x20, 0x09, 0x18, 0x04, - 0x20, 0x11, 0x00, 0x09, 0x08, 0x0c, 0x2a, 0xe2, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x16, 0x00, 0xc6, 0x00, 0x06, 0x08, 0x0c, - 0xac, 0xfc, 0x01, 0x06, 0x20, 0x61, 0x01, 0x00, 0x61, 0xa4, 0x60, 0xa7, - 0x95, 0xf5, 0x00, 0x16, 0x00, 0x26, 0x20, 0x09, 0x18, 0x04, 0x20, 0x11, - 0x00, 0x08, 0x08, 0x0c, 0x2a, 0xe2, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x0e, - 0x09, 0x0c, 0xad, 0x18, 0x00, 0x0e, 0xa0, 0x01, 0xa0, 0x01, 0xa0, 0x01, - 0x61, 0xa6, 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0x16, 0x00, 0x26, 0x20, 0x61, 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, - 0x08, 0x0c, 0x77, 0x9e, 0x15, 0x10, 0x20, 0x01, 0x1a, 0x0d, 0x20, 0x04, - 0x90, 0x05, 0x19, 0x04, 0xa3, 0x1f, 0x08, 0x0c, 0x78, 0x40, 0x11, 0xa8, - 0x20, 0x69, 0x03, 0x80, 0x68, 0x43, 0x01, 0x01, 0x68, 0x44, 0xd0, 0x84, - 0x1d, 0xe8, 0x20, 0x61, 0x01, 0x00, 0x60, 0x20, 0xd0, 0xb4, 0x11, 0x20, - 0x60, 0x24, 0xd0, 0x84, 0x09, 0x0c, 0x0d, 0x85, 0x68, 0x43, 0x01, 0x00, - 0x08, 0x0c, 0x8a, 0x42, 0x04, 0xb0, 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, - 0x00, 0xf0, 0x69, 0x04, 0x91, 0x94, 0x40, 0x00, 0x05, 0x98, 0x08, 0x0c, - 0xa2, 0xa0, 0x08, 0x0c, 0x2a, 0xa9, 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, - 0x61, 0x34, 0x91, 0x92, 0x00, 0x08, 0x12, 0x78, 0x81, 0x08, 0x61, 0x36, - 0x08, 0x0c, 0xac, 0xfc, 0x61, 0x30, 0x08, 0x0c, 0xad, 0x18, 0x00, 0xce, - 0x81, 0xff, 0x01, 0xc8, 0x08, 0x0c, 0x8a, 0x42, 0x08, 0x0c, 0xa2, 0x93, - 0x00, 0xa0, 0x08, 0x0c, 0xac, 0xfc, 0x61, 0x30, 0x91, 0xe5, 0x00, 0x00, - 0x01, 0x50, 0x08, 0x0c, 0xee, 0xee, 0x08, 0x0c, 0x8a, 0x4b, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0xb2, 0x0a, 0x08, 0x0c, - 0xad, 0x18, 0x00, 0xce, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xde, - 0x00, 0xce, 0x00, 0x05, 0x20, 0x01, 0x1a, 0x0d, 0x20, 0x04, 0x90, 0x05, - 0x1d, 0xb0, 0x00, 0xc6, 0x20, 0x61, 0x19, 0xe8, 0x61, 0x34, 0x91, 0x92, - 0x00, 0x03, 0x1a, 0xd8, 0x81, 0x08, 0x61, 0x36, 0x00, 0xce, 0x08, 0x0c, - 0x8a, 0x42, 0x08, 0x0c, 0x60, 0x58, 0x20, 0x09, 0x18, 0x46, 0x21, 0x14, - 0x82, 0x10, 0x22, 0x0a, 0x0c, 0x10, 0x00, 0x96, 0x00, 0xc6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0x16, 0x00, 0x26, 0x08, 0x0c, 0x8a, 0x58, 0x08, 0x0c, - 0xac, 0xfc, 0x20, 0x01, 0x03, 0x87, 0x20, 0x03, 0x02, 0x02, 0x20, 0x71, - 0x19, 0xe8, 0x71, 0x4c, 0x81, 0xff, 0x09, 0x04, 0xa3, 0xd9, 0x20, 0x61, - 0x01, 0x00, 0x20, 0x69, 0x01, 0x40, 0x08, 0x0c, 0x77, 0x9e, 0x15, 0x18, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x02, 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, - 0x08, 0x0c, 0xee, 0xee, 0x70, 0x4c, 0x90, 0x65, 0x01, 0x80, 0x20, 0x09, - 0x00, 0x4a, 0x62, 0x20, 0x92, 0x96, 0x00, 0x09, 0x11, 0x30, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x20, 0x09, 0x00, 0x4a, 0x60, 0x03, - 0x00, 0x03, 0x08, 0x0c, 0xb2, 0x0a, 0x20, 0x01, 0x03, 0x86, 0x20, 0x03, - 0x50, 0x40, 0x08, 0x0c, 0x78, 0x40, 0x08, 0x04, 0xa3, 0xd9, 0x69, 0x04, - 0xd1, 0xf4, 0x09, 0x04, 0xa3, 0xe6, 0x08, 0x0c, 0x2a, 0xa9, 0x00, 0xc6, - 0x70, 0x4c, 0x90, 0x65, 0x09, 0x0c, 0x0d, 0x85, 0x60, 0x20, 0x00, 0xce, - 0x90, 0x86, 0x00, 0x06, 0x15, 0x20, 0x61, 0xc8, 0x60, 0xc4, 0x91, 0x05, - 0x15, 0x00, 0x71, 0x4c, 0x91, 0x88, 0x00, 0x11, 0x21, 0x04, 0xd0, 0xe4, - 0x01, 0xd0, 0x62, 0x14, 0x92, 0x94, 0x18, 0x00, 0x11, 0x28, 0x62, 0x24, - 0x92, 0x94, 0x00, 0x02, 0x15, 0xe0, 0x00, 0x10, 0xc0, 0xe4, 0x20, 0x0a, - 0x60, 0x14, 0x90, 0x84, 0xe7, 0xfd, 0x90, 0x85, 0x00, 0x10, 0x60, 0x16, - 0x70, 0x4c, 0x20, 0x60, 0x08, 0x0c, 0x9a, 0x48, 0x20, 0x09, 0x00, 0x49, - 0x08, 0x0c, 0xb2, 0x0a, 0x04, 0x50, 0x08, 0x0c, 0xee, 0xee, 0x70, 0x4c, - 0x90, 0x65, 0x90, 0x86, 0x1b, 0x55, 0x11, 0x58, 0x08, 0x0c, 0xaf, 0xd2, - 0x15, 0x00, 0x20, 0x61, 0x1b, 0x55, 0x60, 0x64, 0x80, 0x00, 0x60, 0x66, - 0x08, 0x0c, 0x60, 0x58, 0x00, 0xc0, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, 0x71, 0x4c, 0x21, 0x60, 0x20, 0x09, - 0x00, 0x4a, 0x62, 0x20, 0x92, 0x96, 0x00, 0x09, 0x11, 0x30, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x20, 0x09, 0x00, 0x4a, 0x60, 0x03, - 0x00, 0x03, 0x08, 0x0c, 0xb2, 0x0a, 0x20, 0x01, 0x03, 0x87, 0x20, 0x03, - 0x02, 0x00, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xee, - 0x00, 0xde, 0x00, 0xce, 0x00, 0x9e, 0x00, 0x05, 0xd1, 0xec, 0x19, 0x04, - 0xa3, 0x7f, 0x08, 0x04, 0xa3, 0x81, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0xe8, 0x70, 0x6c, 0xd0, 0x84, 0x01, 0xe8, 0xc0, 0x84, 0x70, 0x6e, - 0x71, 0x4c, 0x81, 0xff, 0x01, 0xc0, 0x20, 0x71, 0x01, 0x00, 0x91, 0x88, - 0x00, 0x08, 0x21, 0x14, 0x92, 0x8e, 0x00, 0x06, 0x11, 0x38, 0x20, 0x09, - 0x19, 0x84, 0x20, 0x11, 0x00, 0x12, 0x08, 0x0c, 0x2a, 0xe2, 0x00, 0x48, - 0x92, 0x8e, 0x00, 0x09, 0x0d, 0xb0, 0x20, 0x09, 0x19, 0x84, 0x20, 0x11, - 0x00, 0x16, 0x08, 0x0c, 0x2a, 0xe2, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x05, - 0x90, 0x36, 0x20, 0x01, 0x19, 0xf2, 0x20, 0x04, 0x90, 0x05, 0x01, 0x28, - 0x9c, 0x06, 0x01, 0x28, 0x2c, 0x30, 0x60, 0x0c, 0x0c, 0xc8, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x00, 0xf6, 0x20, 0x79, 0x19, 0xe8, 0x61, 0x0c, - 0x90, 0x06, 0x60, 0x0e, 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, 0x86, 0xff, - 0x11, 0x40, 0x78, 0x24, 0x9c, 0x06, 0x11, 0x18, 0x78, 0x26, 0x78, 0x2a, - 0x00, 0x50, 0x79, 0x2a, 0x00, 0x40, 0x00, 0xc6, 0x26, 0x60, 0x61, 0x0e, - 0x00, 0xce, 0x78, 0x24, 0x9c, 0x06, 0x11, 0x08, 0x7e, 0x26, 0x08, 0x0c, - 0xa6, 0x5d, 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0xfe, 0x00, 0x05, 0x08, 0x0c, - 0x9e, 0xf8, 0x70, 0x03, 0x12, 0x00, 0x78, 0x38, 0x70, 0x12, 0x78, 0x3c, - 0x70, 0x16, 0x00, 0xc6, 0x78, 0x20, 0x90, 0x86, 0x00, 0x04, 0x11, 0x48, - 0x78, 0x10, 0x90, 0x05, 0x01, 0x30, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x10, - 0xb9, 0x14, 0x00, 0xbe, 0x00, 0x20, 0x20, 0x61, 0x18, 0x00, 0x60, 0x7c, - 0x61, 0x80, 0x90, 0x84, 0x00, 0xff, 0x70, 0x0a, 0x71, 0x0e, 0x00, 0xce, - 0x60, 0xc3, 0x00, 0x2c, 0x08, 0x04, 0xa2, 0x70, 0x08, 0x0c, 0x9e, 0xf8, - 0x70, 0x03, 0x0f, 0x00, 0x78, 0x08, 0xd0, 0x9c, 0x01, 0x28, 0xb8, 0x10, - 0x90, 0x84, 0x00, 0xff, 0x70, 0x0a, 0xb8, 0x14, 0x70, 0x0e, 0x60, 0xc3, - 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x01, 0x56, 0x08, 0x0c, 0x9f, 0x43, - 0x70, 0x03, 0x02, 0x00, 0x08, 0x0c, 0x8b, 0x10, 0x20, 0xa9, 0x00, 0x06, - 0x20, 0x11, 0xff, 0xec, 0x20, 0x19, 0xff, 0xed, 0x9e, 0xf0, 0x00, 0x02, - 0x23, 0x05, 0x20, 0x72, 0x8e, 0x70, 0x22, 0x05, 0x20, 0x72, 0x8e, 0x70, - 0x93, 0x98, 0x00, 0x02, 0x92, 0x90, 0x00, 0x02, 0x1f, 0x04, 0xa4, 0x84, - 0x60, 0xc3, 0x00, 0x1c, 0x01, 0x5e, 0x08, 0x04, 0xa2, 0x70, 0x00, 0x16, - 0x00, 0x26, 0x08, 0x0c, 0x9f, 0x1f, 0x08, 0x0c, 0x9f, 0x31, 0x9e, 0x80, - 0x00, 0x04, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa0, 0x78, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, - 0x90, 0x80, 0x00, 0x21, 0x20, 0x98, 0x00, 0x9e, 0x78, 0x08, 0x90, 0x88, - 0x00, 0x02, 0x21, 0xa8, 0x91, 0x92, 0x00, 0x10, 0x12, 0x50, 0x40, 0x03, - 0x90, 0x80, 0x00, 0x04, 0x80, 0x03, 0x60, 0xc2, 0x08, 0x0c, 0xa2, 0x70, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x20, 0xa9, 0x00, 0x10, 0x40, 0x03, - 0x08, 0x0c, 0xaa, 0xdc, 0x20, 0xa1, 0x02, 0x40, 0x22, 0xa8, 0x40, 0x03, - 0x0c, 0x68, 0x08, 0x0c, 0x9e, 0xf8, 0x70, 0x03, 0x62, 0x00, 0x78, 0x08, - 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, 0x00, 0x16, - 0x00, 0x26, 0x08, 0x0c, 0x9e, 0xf8, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x4c, 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, - 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x23, 0x20, 0x98, - 0x00, 0x9e, 0x78, 0x08, 0x90, 0x88, 0x00, 0x02, 0x21, 0xa8, 0x40, 0x03, - 0x80, 0x03, 0x60, 0xc2, 0x08, 0x0c, 0xa2, 0x70, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x10, 0x20, 0x60, 0x8c, 0xff, - 0x01, 0x88, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x10, 0x08, 0x0c, 0xbb, 0x5c, - 0x60, 0x0c, 0x00, 0x06, 0x08, 0x0c, 0xd3, 0xae, 0x60, 0x0f, 0x00, 0x00, - 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x0c, 0xa6, 0x5d, 0x00, 0xce, 0x0c, 0x68, - 0x2c, 0x00, 0x70, 0x12, 0x70, 0x0e, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, 0x00, 0xf6, 0x00, 0xe6, - 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x16, 0x00, 0x06, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0x91, 0x8c, - 0xe7, 0xff, 0x21, 0x02, 0x20, 0x69, 0x01, 0x00, 0x20, 0x79, 0x01, 0x40, - 0x20, 0x71, 0x19, 0xe8, 0x70, 0x30, 0x20, 0x60, 0x8c, 0xff, 0x05, 0x48, - 0x08, 0x0c, 0xa2, 0xa0, 0x6a, 0xc0, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, - 0x8a, 0x4b, 0x00, 0xc6, 0x20, 0x61, 0x01, 0x00, 0x08, 0x0c, 0xac, 0x2d, - 0x00, 0xce, 0x20, 0xa9, 0x01, 0xf4, 0x04, 0xb1, 0x08, 0x0c, 0x99, 0xed, - 0x60, 0x44, 0xd0, 0xac, 0x11, 0x28, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, - 0x60, 0x4a, 0x00, 0x20, 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0xb2, 0x0a, - 0x00, 0x0e, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0xfe, 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x00, 0x20, 0x04, 0x90, 0x96, 0x00, 0x01, 0x0d, 0x78, 0x90, 0x96, - 0x00, 0x04, 0x0d, 0x60, 0x08, 0x0c, 0x8a, 0x4b, 0x68, 0x14, 0x90, 0x84, - 0x00, 0x01, 0x01, 0x10, 0x68, 0xa7, 0x95, 0xf5, 0x68, 0x17, 0x00, 0x08, - 0x68, 0xc3, 0x00, 0x00, 0x20, 0x11, 0x60, 0x02, 0x08, 0x0c, 0x89, 0x93, - 0x20, 0xa9, 0x01, 0xf4, 0x00, 0x09, 0x08, 0xc0, 0x68, 0x24, 0xd0, 0x94, - 0x01, 0x40, 0x68, 0x27, 0x00, 0x04, 0x78, 0x04, 0x90, 0x84, 0x40, 0x00, - 0x19, 0x0c, 0x2a, 0xa9, 0x00, 0x90, 0xd0, 0x84, 0x01, 0x18, 0x68, 0x27, - 0x40, 0x01, 0x00, 0x10, 0x1f, 0x04, 0xa5, 0x78, 0x78, 0x04, 0x90, 0x84, - 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, - 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, 0x00, 0x05, 0x01, 0x26, 0x01, 0x56, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, - 0x00, 0x16, 0x00, 0x06, 0x20, 0x91, 0x80, 0x00, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x0c, 0x91, 0x8c, 0xdb, 0xff, 0x21, 0x02, 0x20, 0x69, 0x01, 0x00, - 0x20, 0x79, 0x01, 0x40, 0x20, 0x71, 0x03, 0x80, 0x70, 0x1c, 0x00, 0x06, - 0x70, 0x1f, 0x02, 0x02, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x4c, 0x20, 0x60, - 0x8c, 0xff, 0x09, 0x04, 0xa6, 0x19, 0x08, 0x0c, 0xaf, 0x84, 0x09, 0x04, - 0xa6, 0x19, 0x93, 0x86, 0x00, 0x02, 0x11, 0x28, 0x68, 0x14, 0x90, 0x84, - 0x00, 0x02, 0x09, 0x04, 0xa6, 0x19, 0x68, 0xaf, 0x95, 0xf5, 0x68, 0x17, - 0x00, 0x10, 0x20, 0x09, 0x00, 0xfa, 0x81, 0x09, 0x1d, 0xf0, 0x69, 0xc6, - 0x68, 0xcb, 0x00, 0x08, 0x08, 0x0c, 0x8a, 0x58, 0x08, 0x0c, 0x1e, 0x44, - 0x20, 0x01, 0x00, 0x32, 0x69, 0x20, 0xd1, 0xbc, 0x01, 0x30, 0x80, 0x01, - 0x1d, 0xd8, 0x69, 0x2c, 0x91, 0x8d, 0x00, 0x08, 0x69, 0x2e, 0x00, 0x16, - 0x20, 0x09, 0x00, 0x40, 0x08, 0x0c, 0x22, 0x20, 0x00, 0x1e, 0x20, 0xa9, - 0x03, 0xe8, 0x68, 0x24, 0xd0, 0x94, 0x01, 0x40, 0x68, 0x27, 0x00, 0x04, - 0x78, 0x04, 0x90, 0x84, 0x40, 0x00, 0x19, 0x0c, 0x2a, 0xa9, 0x00, 0x90, - 0xd0, 0x8c, 0x01, 0x18, 0x68, 0x27, 0x00, 0x02, 0x00, 0x10, 0x1f, 0x04, - 0xa5, 0xe7, 0x78, 0x04, 0x90, 0x84, 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, - 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, - 0x68, 0x27, 0x40, 0x00, 0x68, 0x24, 0x83, 0xff, 0x11, 0x80, 0x20, 0x09, - 0x00, 0x49, 0x60, 0x20, 0x90, 0x86, 0x00, 0x09, 0x01, 0x50, 0x08, 0x0c, - 0x9a, 0x48, 0x60, 0x44, 0xd0, 0xac, 0x11, 0x18, 0x60, 0x03, 0x00, 0x02, - 0x00, 0x10, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x0e, 0x20, 0x71, 0x03, 0x80, - 0xd0, 0x8c, 0x11, 0x10, 0x70, 0x1f, 0x02, 0x00, 0x00, 0x0e, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, - 0x01, 0x5e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x69, 0x19, 0xe8, 0x6a, 0x06, 0x01, 0x2e, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x69, - 0x19, 0xe8, 0x6a, 0x3e, 0x01, 0x2e, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, - 0xa0, 0x50, 0x70, 0x47, 0x10, 0x00, 0x00, 0x98, 0x08, 0x0c, 0xa0, 0x50, - 0x70, 0x47, 0x40, 0x00, 0x00, 0x70, 0x08, 0x0c, 0xa0, 0x50, 0x70, 0x47, - 0x20, 0x00, 0x00, 0x48, 0x08, 0x0c, 0xa0, 0x50, 0x70, 0x47, 0x04, 0x00, - 0x00, 0x20, 0x08, 0x0c, 0xa0, 0x50, 0x70, 0x47, 0x02, 0x00, 0x78, 0x5c, - 0x70, 0x32, 0x60, 0xc3, 0x00, 0x20, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xe6, - 0x20, 0x71, 0x19, 0xe8, 0x70, 0x2c, 0x90, 0x05, 0x01, 0x10, 0x80, 0x01, - 0x70, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, - 0x00, 0xc6, 0x00, 0x76, 0x00, 0x66, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x20, 0x26, 0x60, 0x26, 0x78, - 0x20, 0x39, 0x00, 0x01, 0x87, 0xff, 0x09, 0x04, 0xa7, 0x02, 0x8c, 0xff, - 0x09, 0x04, 0xa7, 0x02, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x19, 0x04, - 0xa6, 0xfd, 0x88, 0xff, 0x01, 0x38, 0x28, 0x00, 0x9c, 0x06, 0x19, 0x04, - 0xa6, 0xfd, 0x20, 0x39, 0x00, 0x00, 0x00, 0x50, 0x60, 0x10, 0x9b, 0x06, - 0x19, 0x04, 0xa6, 0xfd, 0x85, 0xff, 0x01, 0x20, 0x60, 0x5c, 0x91, 0x06, - 0x19, 0x04, 0xa6, 0xfd, 0x70, 0x30, 0x9c, 0x06, 0x15, 0xb0, 0x20, 0x69, - 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x11, 0x60, 0x68, 0x24, 0xd0, 0x84, - 0x01, 0x48, 0x68, 0x27, 0x00, 0x01, 0x08, 0x0c, 0x8a, 0x4b, 0x08, 0x0c, - 0xa7, 0x8a, 0x70, 0x33, 0x00, 0x00, 0x04, 0x28, 0x08, 0x0c, 0x8a, 0x4b, - 0x68, 0x20, 0xd0, 0xb4, 0x01, 0x10, 0x68, 0xa7, 0x95, 0xf5, 0x68, 0x17, - 0x00, 0x08, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xa7, 0x8a, 0x70, 0x33, - 0x00, 0x00, 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, - 0x10, 0x00, 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, - 0x90, 0x06, 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, - 0xd0, 0x84, 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x70, 0x20, - 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x22, 0x70, 0x1c, 0x9c, 0x36, - 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x1e, - 0x00, 0x10, 0x70, 0x1f, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, - 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x89, 0xff, - 0x11, 0x68, 0x60, 0x0f, 0x00, 0x00, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, - 0x08, 0x0c, 0xcf, 0x19, 0x01, 0x10, 0x08, 0x0c, 0xea, 0x30, 0x00, 0x9e, - 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, 0xa6, 0x5d, 0x88, 0xff, 0x11, 0x90, - 0x00, 0xce, 0x08, 0x04, 0xa6, 0x78, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, - 0x08, 0x04, 0xa6, 0x78, 0x90, 0x06, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x6e, - 0x00, 0x7e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x60, 0x1b, 0x00, 0x00, 0x00, 0xce, 0x98, 0xc5, 0x00, 0x01, 0x0c, 0x88, - 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x96, 0x00, 0xc6, 0x00, 0x66, - 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x19, 0xe8, 0x76, 0x48, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x09, 0x04, - 0xa7, 0x79, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x19, 0x04, 0xa7, 0x74, - 0x87, 0xff, 0x01, 0x28, 0x27, 0x00, 0x9c, 0x06, 0x19, 0x04, 0xa7, 0x74, - 0x00, 0x48, 0x60, 0x10, 0x9b, 0x06, 0x19, 0x04, 0xa7, 0x74, 0x85, 0xff, - 0x01, 0x18, 0x60, 0x5c, 0x91, 0x06, 0x15, 0xd0, 0x70, 0x4c, 0x9c, 0x06, - 0x11, 0x78, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, - 0x70, 0x3f, 0x00, 0x00, 0x90, 0x06, 0x70, 0x4e, 0x70, 0x6a, 0x70, 0x52, - 0x70, 0x6e, 0x08, 0x0c, 0xaf, 0xf4, 0x00, 0x3e, 0x70, 0x48, 0x9c, 0x36, - 0x11, 0x10, 0x66, 0x0c, 0x76, 0x4a, 0x70, 0x44, 0x9c, 0x36, 0x11, 0x40, - 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x46, 0x00, 0x10, - 0x70, 0x47, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, - 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x19, 0x01, 0x10, 0x08, 0x0c, - 0xea, 0x30, 0x08, 0x0c, 0xb1, 0xa7, 0x87, 0xff, 0x11, 0x98, 0x00, 0xce, - 0x08, 0x04, 0xa7, 0x22, 0x2c, 0x78, 0x60, 0x0c, 0x20, 0x60, 0x08, 0x04, - 0xa7, 0x22, 0x90, 0x06, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0x9e, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, - 0x60, 0x1b, 0x00, 0x00, 0x00, 0xce, 0x97, 0xbd, 0x00, 0x01, 0x0c, 0x80, - 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x90, 0x06, 0x70, 0x32, 0x70, 0x0a, - 0x70, 0x04, 0x90, 0x86, 0x00, 0x03, 0x01, 0x58, 0x20, 0x01, 0x18, 0x00, - 0x20, 0x04, 0x90, 0x86, 0x00, 0x02, 0x11, 0x18, 0x70, 0x07, 0x00, 0x05, - 0x00, 0x10, 0x70, 0x07, 0x00, 0x00, 0x00, 0xee, 0x00, 0x05, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x2c, 0x10, 0x76, 0x48, - 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x05, 0x40, 0x22, 0x00, 0x9c, 0x06, - 0x15, 0x08, 0x70, 0x48, 0x9c, 0x36, 0x11, 0x10, 0x66, 0x0c, 0x76, 0x4a, - 0x70, 0x44, 0x9c, 0x36, 0x11, 0x40, 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, - 0x2f, 0x00, 0x70, 0x46, 0x00, 0x10, 0x70, 0x47, 0x00, 0x00, 0x66, 0x0c, - 0x2c, 0x00, 0x9f, 0x06, 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, - 0x60, 0x0f, 0x00, 0x00, 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, 0x09, 0x0c, - 0x99, 0xed, 0x90, 0x85, 0x00, 0x01, 0x00, 0x20, 0x2c, 0x78, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0xb0, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x6e, - 0x00, 0xce, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x00, 0x96, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x66, 0x00, 0x26, 0x00, 0x06, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0x19, 0xe8, 0x76, 0x10, - 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x09, 0x04, 0xa8, 0x77, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xa0, 0x00, 0xbe, 0x92, 0x06, 0x19, 0x04, - 0xa8, 0x72, 0x70, 0x30, 0x9c, 0x06, 0x15, 0x20, 0x20, 0x69, 0x01, 0x00, - 0x68, 0xc0, 0x90, 0x05, 0x09, 0x04, 0xa8, 0x49, 0x08, 0x0c, 0xa2, 0xa0, - 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xa7, 0x8a, 0x70, 0x33, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, - 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, - 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, - 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x70, 0x10, 0x9c, 0x36, - 0x11, 0x10, 0x66, 0x0c, 0x76, 0x12, 0x70, 0x0c, 0x9c, 0x36, 0x11, 0x40, - 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x0e, 0x00, 0x10, - 0x70, 0x0f, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, - 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, - 0x08, 0x0c, 0xd1, 0x21, 0x11, 0x80, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, - 0xd1, 0x32, 0x15, 0x18, 0x08, 0x0c, 0xbb, 0x5c, 0x04, 0x00, 0x08, 0x0c, - 0xa7, 0x8a, 0x68, 0x24, 0xd0, 0x84, 0x09, 0xb0, 0x68, 0x27, 0x00, 0x01, - 0x08, 0x98, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, - 0x00, 0x90, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x19, 0x01, 0x68, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x08, 0xa8, 0x67, 0x01, 0x03, - 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x06, 0x08, 0x0c, - 0xd1, 0x0c, 0x08, 0x0c, 0xd3, 0xae, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, - 0xa6, 0x5d, 0x00, 0xce, 0x08, 0x04, 0xa7, 0xf2, 0x2c, 0x78, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0x04, 0xa7, 0xf2, 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, - 0x00, 0x6e, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, 0x00, 0x06, 0x1d, 0x20, 0x08, 0x0c, - 0xea, 0x30, 0x0c, 0x08, 0x00, 0xd6, 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x03, - 0x02, 0x00, 0x70, 0x07, 0x00, 0x14, 0x60, 0xc3, 0x00, 0x14, 0x20, 0xe1, - 0x00, 0x01, 0x20, 0x99, 0x19, 0x89, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, - 0x02, 0x50, 0x20, 0xa9, 0x00, 0x04, 0x40, 0x03, 0x70, 0x23, 0x00, 0x04, - 0x70, 0x27, 0x78, 0x78, 0x08, 0x0c, 0xa2, 0x70, 0x00, 0xde, 0x00, 0x05, - 0x08, 0x0c, 0x9f, 0x43, 0x70, 0x0b, 0x08, 0x00, 0x78, 0x14, 0x90, 0x84, - 0xff, 0x00, 0x70, 0x0e, 0x78, 0x14, 0x90, 0x84, 0x00, 0xff, 0x70, 0x22, - 0x78, 0x2c, 0x70, 0x26, 0x78, 0x60, 0x90, 0x84, 0x00, 0xff, 0x90, 0x85, - 0x02, 0x00, 0x70, 0x02, 0x78, 0x60, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, - 0x70, 0x06, 0x60, 0xc2, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xb6, 0x00, 0xd6, - 0x00, 0x16, 0x00, 0xd6, 0x2f, 0x68, 0x20, 0x09, 0x00, 0x35, 0x08, 0x0c, - 0xd5, 0xbb, 0x00, 0xde, 0x19, 0x04, 0xa9, 0x25, 0x08, 0x0c, 0x9e, 0xf8, - 0x70, 0x03, 0x13, 0x00, 0x78, 0x2c, 0x08, 0x0c, 0xaa, 0x34, 0x20, 0x68, - 0x68, 0x20, 0x90, 0x86, 0x00, 0x03, 0x05, 0x60, 0x78, 0x10, 0x20, 0x58, - 0xba, 0xa0, 0x08, 0x0c, 0xb0, 0x94, 0x11, 0xd8, 0x92, 0x86, 0x00, 0x7e, - 0x11, 0x28, 0x70, 0x0b, 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfe, 0x04, 0x98, - 0x92, 0x86, 0x00, 0x7f, 0x11, 0x28, 0x70, 0x0b, 0x00, 0xff, 0x70, 0x0f, - 0xff, 0xfd, 0x04, 0x58, 0x92, 0x84, 0xff, 0x80, 0x01, 0x80, 0x92, 0x86, - 0x00, 0x80, 0x11, 0x28, 0x70, 0x0b, 0x00, 0xff, 0x70, 0x0f, 0xff, 0xfc, - 0x04, 0x00, 0x92, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0xb8, 0x10, 0x70, 0x0a, - 0xb8, 0x14, 0x70, 0x0e, 0x00, 0xc0, 0xb8, 0x84, 0x70, 0x0e, 0x00, 0xa8, - 0x08, 0x0c, 0xb0, 0x94, 0x11, 0x30, 0x78, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x90, 0x82, 0x00, 0x7e, 0x02, 0x50, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x1f, - 0x2d, 0x04, 0x70, 0x0a, 0x8d, 0x68, 0x2d, 0x04, 0x70, 0x0e, 0x00, 0xde, - 0x00, 0x10, 0x60, 0x34, 0x70, 0x0e, 0x78, 0x38, 0x70, 0x12, 0x78, 0x3c, - 0x70, 0x16, 0x60, 0xc3, 0x00, 0x0c, 0x00, 0x1e, 0x00, 0xde, 0x08, 0x0c, - 0xa2, 0x70, 0x00, 0xbe, 0x00, 0x05, 0x78, 0x1b, 0x00, 0x01, 0x78, 0x03, - 0x00, 0x06, 0x00, 0x1e, 0x00, 0xde, 0x00, 0xbe, 0x00, 0x05, 0x79, 0x2c, - 0x91, 0x80, 0x00, 0x08, 0x20, 0x0c, 0x91, 0x86, 0x00, 0x06, 0x01, 0xc0, - 0x91, 0x86, 0x00, 0x03, 0x09, 0x04, 0xa9, 0xa4, 0x91, 0x86, 0x00, 0x05, - 0x09, 0x04, 0xa9, 0x8c, 0x91, 0x86, 0x00, 0x04, 0x05, 0xf0, 0x91, 0x86, - 0x00, 0x08, 0x09, 0x04, 0xa9, 0x95, 0x78, 0x07, 0x00, 0x37, 0x78, 0x2f, - 0x00, 0x03, 0x78, 0x17, 0x17, 0x00, 0x08, 0x0c, 0xaa, 0x11, 0x00, 0x05, - 0x08, 0x0c, 0xa9, 0xd2, 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, - 0x20, 0x09, 0x40, 0x00, 0x68, 0x00, 0x6a, 0x44, 0xd2, 0xfc, 0x11, 0xf8, - 0x00, 0x02, 0xa9, 0x6c, 0xa9, 0x77, 0xa9, 0x6e, 0xa9, 0x77, 0xa9, 0x73, - 0xa9, 0x6c, 0xa9, 0x6c, 0xa9, 0x77, 0xa9, 0x77, 0xa9, 0x77, 0xa9, 0x77, - 0xa9, 0x6c, 0xa9, 0x6c, 0xa9, 0x6c, 0xa9, 0x6c, 0xa9, 0x6c, 0xa9, 0x77, - 0xa9, 0x6c, 0xa9, 0x77, 0x08, 0x0c, 0x0d, 0x85, 0x68, 0x24, 0xd0, 0xe4, - 0x01, 0x10, 0xd0, 0xcc, 0x01, 0x10, 0x90, 0x0e, 0x00, 0x10, 0x20, 0x09, - 0x20, 0x00, 0x68, 0x2c, 0x70, 0x22, 0x68, 0x30, 0x70, 0x26, 0x08, 0x04, - 0xa9, 0xcb, 0x08, 0x0c, 0xa9, 0xd2, 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, - 0x21, 0x68, 0x20, 0x09, 0x40, 0x00, 0x6a, 0x00, 0x92, 0x86, 0x00, 0x02, - 0x11, 0x08, 0x90, 0x0e, 0x08, 0x04, 0xa9, 0xcb, 0x08, 0x0c, 0xa9, 0xd2, - 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, 0x20, 0x09, 0x40, 0x00, - 0x04, 0xb0, 0x04, 0xe1, 0x00, 0xd6, 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, - 0x20, 0x09, 0x40, 0x00, 0x92, 0x86, 0x00, 0x05, 0x01, 0x18, 0x92, 0x86, - 0x00, 0x02, 0x11, 0x08, 0x90, 0x0e, 0x04, 0x38, 0x04, 0x69, 0x00, 0xd6, - 0x00, 0x26, 0x79, 0x2c, 0x21, 0x68, 0x68, 0x14, 0x69, 0x24, 0xc1, 0x85, - 0x69, 0x26, 0x00, 0x96, 0x20, 0x48, 0xa9, 0xac, 0xa8, 0x34, 0x91, 0x12, - 0xa9, 0xb0, 0xa8, 0x38, 0x00, 0x9e, 0x91, 0x03, 0x70, 0x22, 0x72, 0x26, - 0x79, 0x2c, 0x91, 0x80, 0x00, 0x11, 0x20, 0x04, 0xd0, 0xfc, 0x11, 0x48, - 0x91, 0x80, 0x00, 0x00, 0x20, 0x04, 0x90, 0x8e, 0x00, 0x02, 0x01, 0x30, - 0x90, 0x8e, 0x00, 0x04, 0x01, 0x18, 0x20, 0x09, 0x40, 0x00, 0x00, 0x08, - 0x90, 0x0e, 0x71, 0x2a, 0x60, 0xc3, 0x00, 0x18, 0x00, 0x2e, 0x00, 0xde, - 0x08, 0x04, 0xa2, 0x70, 0x00, 0xb6, 0x00, 0x36, 0x00, 0x46, 0x00, 0x56, - 0x00, 0x66, 0x08, 0x0c, 0x9f, 0x43, 0x90, 0x06, 0x70, 0x03, 0x02, 0x00, - 0x79, 0x38, 0x71, 0x0a, 0x79, 0x3c, 0x71, 0x0e, 0x78, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0x08, 0x0c, 0xb0, 0x94, 0x11, 0x18, 0x90, 0x92, 0x00, 0x7e, - 0x02, 0x68, 0x00, 0xd6, 0x20, 0x69, 0x18, 0x1f, 0x2d, 0x2c, 0x8d, 0x68, - 0x2d, 0x34, 0x90, 0xd8, 0x10, 0x00, 0x2b, 0x5c, 0xbb, 0x10, 0xbc, 0x14, - 0x00, 0xde, 0x00, 0x28, 0x90, 0x1e, 0xbc, 0x84, 0x20, 0x29, 0x00, 0x00, - 0x66, 0x34, 0x78, 0x2c, 0x90, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x03, 0x11, 0x28, 0x75, 0x12, 0x76, 0x16, 0x73, 0x1a, 0x74, 0x1e, - 0x00, 0x20, 0x73, 0x12, 0x74, 0x16, 0x75, 0x1a, 0x76, 0x1e, 0x00, 0x6e, - 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, - 0x9f, 0x43, 0x70, 0x03, 0x01, 0x00, 0x78, 0x2c, 0x70, 0x0a, 0x78, 0x14, - 0x70, 0x0e, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, 0xa2, 0x70, - 0x08, 0x0c, 0x9e, 0xef, 0x70, 0x03, 0x14, 0x00, 0x78, 0x38, 0x70, 0x0a, - 0x00, 0x79, 0x78, 0x3c, 0x70, 0x0e, 0x78, 0x2c, 0x70, 0x12, 0x78, 0x30, - 0x70, 0x16, 0x78, 0x34, 0x90, 0x84, 0x00, 0xff, 0x80, 0x07, 0x70, 0x1a, - 0x60, 0xc3, 0x00, 0x10, 0x08, 0x04, 0xa2, 0x70, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x40, 0x00, 0x06, 0x00, 0xf6, 0x20, 0x78, 0x78, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0xd4, 0xd0, 0x84, 0x01, 0x20, 0x78, 0x4c, 0x70, 0x2a, - 0x78, 0x50, 0x70, 0x2e, 0x00, 0xbe, 0x00, 0xfe, 0x00, 0x0e, 0x00, 0xee, - 0x00, 0x05, 0x08, 0x0c, 0x9f, 0x3a, 0x70, 0x03, 0x01, 0x00, 0x78, 0x2c, - 0x70, 0x0a, 0x78, 0x14, 0x70, 0x0e, 0x60, 0xc3, 0x00, 0x08, 0x08, 0x04, - 0xa2, 0x70, 0x00, 0xa9, 0x79, 0x14, 0x71, 0x2a, 0x60, 0xc3, 0x00, 0x00, - 0x60, 0xa7, 0x95, 0x75, 0x00, 0x26, 0x08, 0x0c, 0x2a, 0x04, 0x02, 0x28, - 0x20, 0x11, 0x01, 0x01, 0x22, 0x04, 0xc0, 0xc5, 0x20, 0x12, 0x00, 0x2e, - 0x08, 0x0c, 0xa2, 0x93, 0x08, 0x0c, 0x8a, 0x42, 0x00, 0x05, 0x00, 0x36, - 0x00, 0x96, 0x00, 0xd6, 0x00, 0xe6, 0x78, 0x60, 0x20, 0x48, 0xaa, 0x7c, - 0x92, 0x96, 0x00, 0xc0, 0x92, 0x94, 0x00, 0xfd, 0xaa, 0x7e, 0xaa, 0x80, - 0x92, 0x94, 0x03, 0x00, 0xaa, 0x82, 0xa9, 0x6c, 0x91, 0x94, 0x00, 0xff, - 0xab, 0x74, 0x93, 0x84, 0x00, 0xff, 0x90, 0x8d, 0xc2, 0x00, 0xa9, 0x6e, - 0x93, 0x84, 0xff, 0x00, 0x92, 0x15, 0xaa, 0x76, 0xa8, 0x70, 0xaa, 0x78, - 0xa8, 0x7a, 0xaa, 0x72, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, - 0xaa, 0xf1, 0x00, 0xde, 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x40, - 0x20, 0xa9, 0x00, 0x0a, 0xa8, 0x60, 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0x98, 0x40, 0x03, 0x60, 0xa3, 0x00, 0x35, 0xaa, 0x68, - 0x92, 0x94, 0x70, 0x00, 0x92, 0x86, 0x30, 0x00, 0x01, 0x10, 0x60, 0xa3, - 0x00, 0x37, 0x00, 0xee, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, - 0x90, 0x0e, 0x78, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, - 0x01, 0xc0, 0x90, 0x84, 0x00, 0x03, 0x11, 0xa8, 0x20, 0x01, 0x18, 0x0c, - 0x20, 0x04, 0xd0, 0xbc, 0x01, 0x80, 0x78, 0x24, 0xd0, 0xcc, 0x11, 0x68, - 0xd0, 0xc4, 0x11, 0x58, 0xa8, 0xa8, 0x90, 0x05, 0x11, 0x40, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xd5, 0x21, 0x02, 0x20, 0x09, 0x19, 0xb3, - 0x21, 0x0c, 0x00, 0x9e, 0x91, 0x8d, 0x00, 0x92, 0x00, 0x10, 0x20, 0x09, - 0x00, 0x96, 0x60, 0xab, 0x00, 0x36, 0x00, 0x26, 0x21, 0x10, 0x90, 0x0e, - 0x08, 0x0c, 0x2a, 0xe2, 0x00, 0x2e, 0x00, 0x05, 0x20, 0x09, 0x00, 0x09, - 0x00, 0xa0, 0x20, 0x09, 0x00, 0x0a, 0x00, 0x88, 0x20, 0x09, 0x00, 0x0b, - 0x00, 0x70, 0x20, 0x09, 0x00, 0x0c, 0x00, 0x58, 0x20, 0x09, 0x00, 0x0d, - 0x00, 0x40, 0x20, 0x09, 0x00, 0x0e, 0x00, 0x28, 0x20, 0x09, 0x00, 0x0f, - 0x00, 0x10, 0x20, 0x09, 0x00, 0x08, 0x69, 0x12, 0x00, 0x05, 0x08, 0x0c, - 0x9e, 0xf8, 0x00, 0x16, 0x00, 0x26, 0x00, 0x96, 0x00, 0xd6, 0x78, 0x14, - 0x20, 0x48, 0x70, 0x13, 0x01, 0x38, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x28, 0x11, 0x38, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, - 0x90, 0x86, 0xaa, 0xaa, 0x19, 0x04, 0xab, 0x96, 0x70, 0x03, 0x54, 0x00, - 0x00, 0xc6, 0x20, 0x61, 0x18, 0x00, 0x60, 0x7c, 0x90, 0x84, 0x00, 0xff, - 0xa9, 0x98, 0x81, 0x0f, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, 0x70, 0x0a, - 0x60, 0x80, 0x70, 0x0e, 0xa9, 0x98, 0x91, 0x8c, 0xff, 0x00, 0x71, 0x12, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0x09, 0x18, 0x05, 0x2e, 0x10, 0x92, 0x90, - 0x00, 0x06, 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, - 0xab, 0x27, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x09, 0x18, 0x01, 0x21, 0x04, - 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xab, 0x31, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x29, 0x20, 0x98, 0x20, 0x09, - 0x00, 0x06, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, - 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x00, - 0x08, 0x0c, 0xaa, 0xdc, 0x00, 0xde, 0x20, 0x71, 0x02, 0x40, 0x20, 0x11, - 0x02, 0x40, 0x20, 0x09, 0x00, 0x02, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, - 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x20, 0x09, - 0x00, 0x08, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, - 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, - 0x20, 0x98, 0x20, 0x09, 0x00, 0x08, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, - 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x00, 0xce, - 0x60, 0xc3, 0x00, 0x4c, 0x60, 0xa3, 0x00, 0x56, 0x60, 0xa7, 0x95, 0x75, - 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, 0x00, 0x28, 0x11, 0x68, - 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x50, 0x60, 0x28, 0xc0, 0xbd, 0x60, 0x2a, - 0x20, 0x09, 0x18, 0x04, 0x20, 0x11, 0x00, 0x29, 0x08, 0x0c, 0x2a, 0xe2, - 0x00, 0x10, 0x08, 0x0c, 0xa2, 0x70, 0x08, 0x0c, 0x8a, 0x42, 0x00, 0xde, - 0x00, 0x9e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x40, 0x20, 0x01, 0x22, 0x00, 0x90, 0x85, 0x00, 0xff, 0x70, 0x02, - 0x70, 0x07, 0xff, 0xff, 0x20, 0x71, 0x01, 0x00, 0x70, 0x9b, 0x00, 0xff, - 0x00, 0xee, 0x08, 0x04, 0xab, 0x0c, 0x08, 0x0c, 0x9e, 0xf8, 0x00, 0x16, - 0x00, 0x26, 0x00, 0x96, 0x00, 0xd6, 0x78, 0x14, 0x20, 0x48, 0x70, 0x13, - 0x01, 0x38, 0x70, 0x03, 0x55, 0x00, 0x00, 0xc6, 0xa8, 0x9c, 0x90, 0x84, - 0x00, 0xff, 0xa9, 0x98, 0x81, 0x0f, 0x91, 0x8c, 0xff, 0x00, 0x91, 0x05, - 0x70, 0x0a, 0xa9, 0x9c, 0x91, 0x8c, 0xff, 0x00, 0xa8, 0xa0, 0x90, 0x84, - 0x00, 0xff, 0x91, 0x05, 0x70, 0x0e, 0xa9, 0x98, 0x91, 0x8c, 0xff, 0x00, - 0x20, 0x61, 0x18, 0x00, 0x60, 0x7c, 0x90, 0x84, 0x00, 0xff, 0x91, 0x0d, - 0x71, 0x12, 0x61, 0x80, 0x71, 0x16, 0x20, 0x09, 0x00, 0x08, 0xa8, 0x60, - 0x20, 0xe0, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x29, 0x20, 0x98, 0x2e, 0x10, - 0x92, 0x90, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x01, 0x40, 0x02, 0x80, 0x07, - 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xc0, 0x20, 0xa9, 0x00, 0x04, - 0x20, 0x09, 0x18, 0x05, 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, - 0x1f, 0x04, 0xab, 0xe8, 0x20, 0xa9, 0x00, 0x02, 0x20, 0x09, 0x18, 0x01, - 0x21, 0x04, 0x20, 0x12, 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xab, 0xf2, - 0x00, 0xd6, 0x00, 0x16, 0x20, 0x69, 0x02, 0x00, 0x08, 0x0c, 0xaa, 0xdc, - 0x00, 0x1e, 0x00, 0xde, 0x20, 0x71, 0x02, 0x40, 0x20, 0xa9, 0x00, 0x02, - 0x20, 0x09, 0x18, 0x03, 0x20, 0x11, 0x02, 0x40, 0x21, 0x04, 0x20, 0x12, - 0x81, 0x08, 0x82, 0x10, 0x1f, 0x04, 0xac, 0x08, 0x20, 0x09, 0x00, 0x08, - 0x40, 0x02, 0x80, 0x07, 0x20, 0x12, 0x82, 0x10, 0x81, 0x09, 0x1d, 0xd0, - 0x90, 0x06, 0x20, 0xa9, 0x00, 0x08, 0x20, 0x12, 0x82, 0x10, 0x1f, 0x04, - 0xac, 0x19, 0x00, 0xce, 0x60, 0xc3, 0x00, 0x4c, 0x60, 0xa3, 0x00, 0x56, - 0x60, 0xa7, 0x95, 0x75, 0x08, 0x0c, 0xa2, 0x70, 0x08, 0x0c, 0x8a, 0x42, - 0x00, 0xde, 0x00, 0x9e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, - 0x92, 0x90, 0x00, 0x18, 0x82, 0x14, 0x20, 0xe9, 0x00, 0x00, 0x20, 0x69, - 0x02, 0x00, 0x68, 0x13, 0x00, 0x00, 0x22, 0xa8, 0x92, 0x84, 0x00, 0xe0, - 0x01, 0x28, 0x20, 0xa9, 0x00, 0x20, 0x92, 0x92, 0x00, 0x20, 0x00, 0x08, - 0x90, 0x16, 0x20, 0xa1, 0x02, 0x40, 0x90, 0x06, 0x40, 0x04, 0x82, 0xff, - 0x01, 0x20, 0x68, 0x10, 0x80, 0x00, 0x68, 0x12, 0x0c, 0x60, 0x00, 0xde, - 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0xa6, - 0x00, 0x96, 0x00, 0x66, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x19, 0xe8, 0x76, 0x10, 0x26, 0x60, 0x26, 0x78, 0x8c, 0xff, 0x09, 0x04, - 0xac, 0xd9, 0x70, 0x30, 0x9c, 0x06, 0x15, 0x20, 0x20, 0x69, 0x01, 0x00, - 0x68, 0xc0, 0x90, 0x05, 0x09, 0x04, 0xac, 0xab, 0x08, 0x0c, 0xa2, 0xa0, - 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xa7, 0x8a, 0x70, 0x33, 0x00, 0x00, - 0x00, 0x36, 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, - 0x01, 0x38, 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, - 0x08, 0x0c, 0x2a, 0x99, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, - 0x01, 0x10, 0x68, 0x27, 0x00, 0x01, 0x00, 0x3e, 0x70, 0x10, 0x9c, 0x36, - 0x11, 0x10, 0x66, 0x0c, 0x76, 0x12, 0x70, 0x0c, 0x9c, 0x36, 0x11, 0x40, - 0x2c, 0x00, 0x9f, 0x36, 0x01, 0x18, 0x2f, 0x00, 0x70, 0x0e, 0x00, 0x10, - 0x70, 0x0f, 0x00, 0x00, 0x66, 0x0c, 0x00, 0x66, 0x2c, 0x00, 0x9f, 0x06, - 0x01, 0x10, 0x7e, 0x0e, 0x00, 0x08, 0x26, 0x78, 0x60, 0x0f, 0x00, 0x00, - 0x08, 0x0c, 0xd1, 0x21, 0x11, 0x80, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, - 0xd1, 0x32, 0x15, 0x18, 0x08, 0x0c, 0xbb, 0x5c, 0x04, 0x00, 0x08, 0x0c, - 0xa7, 0x8a, 0x68, 0x24, 0xd0, 0x84, 0x09, 0xb0, 0x68, 0x27, 0x00, 0x01, - 0x08, 0x98, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, - 0x00, 0x90, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x19, 0x01, 0x68, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x03, 0x15, 0x20, 0xa8, 0x67, 0x01, 0x03, - 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, - 0xd1, 0x0c, 0x08, 0x0c, 0xd3, 0xae, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, - 0xa6, 0x5d, 0x00, 0xce, 0x08, 0x04, 0xac, 0x5c, 0x2c, 0x78, 0x60, 0x0c, - 0x20, 0x60, 0x08, 0x04, 0xac, 0x5c, 0x70, 0x13, 0x00, 0x00, 0x70, 0x0f, - 0x00, 0x00, 0x01, 0x2e, 0x00, 0x6e, 0x00, 0x9e, 0x00, 0xae, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x06, 0x1d, 0x08, 0x08, 0x0c, 0xea, 0x30, 0x08, 0xf0, 0x00, 0xf6, - 0x00, 0x36, 0x20, 0x79, 0x03, 0x80, 0x7b, 0x18, 0xd3, 0xbc, 0x1d, 0xe8, - 0x78, 0x32, 0x79, 0x36, 0x7a, 0x3a, 0x78, 0x1b, 0x80, 0x80, 0x00, 0x3e, - 0x00, 0xfe, 0x00, 0x05, 0x00, 0x16, 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x01, 0x11, 0x88, 0x20, 0x01, - 0x00, 0x15, 0x0c, 0x29, 0x20, 0x09, 0x10, 0x00, 0x20, 0x01, 0x03, 0x82, - 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, 0x00, 0x03, 0x01, 0x20, - 0x81, 0x09, 0x1d, 0xb0, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x1e, 0x00, 0x05, - 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, - 0x00, 0x03, 0x11, 0x20, 0x20, 0x01, 0x03, 0x80, 0x20, 0x03, 0x00, 0x01, - 0x00, 0x05, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x90, 0x0e, - 0x20, 0x71, 0x19, 0xe8, 0x04, 0x69, 0x01, 0x06, 0x01, 0x90, 0x70, 0x04, - 0x90, 0x86, 0x00, 0x03, 0x01, 0x48, 0x20, 0xa9, 0x10, 0x00, 0x60, 0x44, - 0xd0, 0xfc, 0x01, 0xd8, 0x1f, 0x04, 0xad, 0x35, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0xac, 0xfc, 0x60, 0x44, 0xd0, 0xfc, 0x01, 0x90, 0x70, 0x30, - 0x9c, 0x06, 0x11, 0x48, 0x08, 0x0c, 0x99, 0xed, 0x60, 0x44, 0xd0, 0xdc, - 0x01, 0x50, 0xc0, 0xdc, 0x60, 0x46, 0x70, 0x0a, 0x70, 0x42, 0x70, 0x4c, - 0x9c, 0x06, 0x19, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x9a, 0x48, 0x01, 0x0e, - 0x19, 0x19, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x05, - 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, 0x90, 0x84, 0x00, 0x07, 0x90, 0x86, - 0x00, 0x03, 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x24, 0x00, 0x78, 0x08, - 0xd0, 0xa4, 0x19, 0x0c, 0x0d, 0x7e, 0xd0, 0x9c, 0x01, 0x28, 0x78, 0x20, - 0x90, 0x8c, 0xf0, 0x00, 0x11, 0xb8, 0x00, 0x12, 0x01, 0x2e, 0x00, 0x05, - 0xad, 0x82, 0xad, 0xc0, 0xad, 0xef, 0xae, 0x37, 0xae, 0x47, 0xae, 0x58, - 0xae, 0x67, 0xae, 0x75, 0xae, 0xa2, 0xae, 0xa6, 0xad, 0x82, 0xad, 0x82, - 0xae, 0xa9, 0xae, 0xc5, 0xad, 0x82, 0xad, 0x82, 0x08, 0x0c, 0x0d, 0x85, - 0x01, 0x2e, 0x00, 0x05, 0x20, 0x60, 0x60, 0x44, 0xd0, 0xbc, 0x01, 0x40, - 0xc0, 0xbc, 0x60, 0x46, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x12, 0x01, 0x2e, 0x00, 0x05, 0xad, 0xa7, 0xad, 0xa9, - 0xad, 0xa7, 0xad, 0xaf, 0xad, 0xa7, 0xad, 0xa7, 0xad, 0xa7, 0xad, 0xa7, - 0xad, 0xa7, 0xad, 0xa9, 0xad, 0xa7, 0xad, 0xa9, 0xad, 0xa7, 0xad, 0xa9, - 0xad, 0xa7, 0xad, 0xa7, 0xad, 0xa7, 0xad, 0xa9, 0xad, 0xa7, 0x08, 0x0c, - 0x0d, 0x85, 0x20, 0x09, 0x00, 0x13, 0x08, 0x0c, 0xb2, 0x0a, 0x01, 0x2e, - 0x00, 0x05, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xdc, 0x01, 0x30, - 0x08, 0x0c, 0x8c, 0x19, 0x08, 0x0c, 0xb1, 0x6c, 0x01, 0x2e, 0x00, 0x05, - 0x20, 0x09, 0x00, 0x49, 0x08, 0x0c, 0xb2, 0x0a, 0x01, 0x2e, 0x00, 0x05, - 0x08, 0x0c, 0xac, 0xfc, 0x20, 0x01, 0x1a, 0x0d, 0x20, 0x03, 0x00, 0x00, - 0x70, 0x30, 0x90, 0x65, 0x11, 0x30, 0x70, 0x04, 0x90, 0x86, 0x00, 0x03, - 0x01, 0xe0, 0x08, 0x0c, 0x0d, 0x85, 0x70, 0x34, 0x90, 0x92, 0xc3, 0x50, - 0x12, 0x58, 0x80, 0x00, 0x70, 0x36, 0x70, 0x04, 0x90, 0x86, 0x00, 0x03, - 0x01, 0x10, 0x70, 0x07, 0x00, 0x00, 0x78, 0x1f, 0x08, 0x08, 0x00, 0x58, - 0x08, 0x0c, 0xb0, 0xc0, 0x01, 0x40, 0x08, 0x0c, 0xee, 0xee, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x09, 0x00, 0x14, 0x08, 0x0c, 0xb2, 0x0a, 0x78, 0x1f, - 0x01, 0x00, 0x08, 0x0c, 0xad, 0x18, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, - 0xac, 0xfc, 0x71, 0x4c, 0x81, 0xff, 0x11, 0x28, 0x20, 0x11, 0x1a, 0x10, - 0x20, 0x13, 0x00, 0x00, 0x04, 0xc0, 0x20, 0x61, 0x01, 0x00, 0x71, 0x50, - 0x91, 0x92, 0x75, 0x30, 0x16, 0x78, 0x81, 0x08, 0x71, 0x52, 0x71, 0x4c, - 0x91, 0x86, 0x1b, 0x55, 0x01, 0x20, 0x20, 0x01, 0x03, 0x91, 0x20, 0x03, - 0x04, 0x00, 0x91, 0x88, 0x00, 0x08, 0x21, 0x0c, 0x91, 0x8e, 0x00, 0x06, - 0x11, 0x60, 0x60, 0x14, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x00, 0x12, - 0x71, 0x4c, 0x91, 0x8e, 0x1b, 0x55, 0x11, 0x08, 0xc0, 0xfd, 0x60, 0x16, - 0x00, 0xb0, 0x71, 0x4c, 0x91, 0x88, 0x00, 0x08, 0x21, 0x0c, 0x91, 0x8e, - 0x00, 0x09, 0x0d, 0x68, 0x60, 0x14, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, - 0x00, 0x16, 0x71, 0x4c, 0x91, 0x8e, 0x1b, 0x55, 0x11, 0x08, 0xc0, 0xfd, - 0x60, 0x16, 0x00, 0x18, 0x70, 0x6c, 0xc0, 0x85, 0x70, 0x6e, 0x78, 0x1f, - 0x02, 0x00, 0x08, 0x0c, 0xad, 0x18, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, - 0xac, 0xfc, 0x71, 0x4c, 0x21, 0x60, 0x60, 0x03, 0x00, 0x03, 0x20, 0x09, - 0x00, 0x4a, 0x08, 0x0c, 0xb2, 0x0a, 0x78, 0x1f, 0x02, 0x00, 0x08, 0x0c, - 0xad, 0x18, 0x01, 0x2e, 0x00, 0x05, 0x78, 0x08, 0xd0, 0x9c, 0x0d, 0xe8, - 0x78, 0x20, 0x20, 0x60, 0x60, 0x03, 0x00, 0x03, 0x08, 0x0c, 0xac, 0xfc, - 0x08, 0x0c, 0x1d, 0xcc, 0x78, 0x1f, 0x04, 0x00, 0x08, 0x0c, 0xad, 0x18, - 0x01, 0x2e, 0x00, 0x05, 0x78, 0x08, 0xd0, 0x9c, 0x0d, 0xe8, 0x78, 0x20, - 0x20, 0x60, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0x1e, 0x14, 0x78, 0x1f, - 0x04, 0x00, 0x08, 0x0c, 0xad, 0x18, 0x01, 0x2e, 0x00, 0x05, 0x70, 0x30, - 0x90, 0x65, 0x01, 0x48, 0x60, 0x44, 0xc0, 0xbc, 0x60, 0x46, 0x71, 0x04, - 0x91, 0x86, 0x00, 0x03, 0x01, 0x10, 0x08, 0x0c, 0x9a, 0xb4, 0x01, 0x2e, - 0x00, 0x05, 0x00, 0xf6, 0x70, 0x3c, 0x90, 0x86, 0x00, 0x02, 0x05, 0x28, - 0x70, 0x4c, 0x90, 0x7d, 0x05, 0x10, 0x78, 0x44, 0xc0, 0xbc, 0x78, 0x46, - 0x78, 0x20, 0x90, 0x86, 0x00, 0x09, 0x01, 0x18, 0x08, 0x0c, 0xa1, 0xca, - 0x00, 0xc0, 0x78, 0x28, 0xd0, 0xfc, 0x11, 0x18, 0x08, 0x0c, 0xa1, 0x49, - 0x00, 0x90, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, 0x00, 0x28, - 0x11, 0x30, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x86, 0xaa, 0xaa, - 0x11, 0x20, 0x20, 0x01, 0x03, 0x87, 0x20, 0x03, 0x10, 0x00, 0x08, 0x0c, - 0xa0, 0xce, 0x00, 0xfe, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x78, 0x40, - 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x05, 0x20, 0x09, - 0x1b, 0x66, 0x21, 0x04, 0xd0, 0xbc, 0x01, 0xa8, 0xc0, 0xbc, 0x20, 0x0a, - 0x20, 0x09, 0x01, 0x0b, 0x21, 0x04, 0x90, 0x85, 0x00, 0x02, 0x20, 0x0a, - 0x20, 0x09, 0x01, 0x01, 0x21, 0x04, 0xc0, 0xac, 0x20, 0x0a, 0x20, 0x09, - 0x01, 0x05, 0x21, 0x04, 0x90, 0x84, 0x19, 0x84, 0x90, 0x85, 0x80, 0x92, - 0x20, 0x0a, 0x01, 0x2e, 0x00, 0x05, 0x08, 0x0c, 0x8a, 0x58, 0x20, 0x09, - 0x01, 0x0b, 0x21, 0x04, 0xd0, 0x8c, 0x01, 0xa8, 0xc0, 0x8c, 0x20, 0x0a, - 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0xd0, 0x94, 0x11, 0x30, 0x20, 0x09, - 0x01, 0x01, 0x21, 0x04, 0x90, 0x85, 0x00, 0x20, 0x20, 0x0a, 0x20, 0x09, - 0x1b, 0x66, 0x20, 0x0b, 0x00, 0x00, 0x20, 0x01, 0x00, 0x1b, 0x08, 0x0c, - 0xac, 0xed, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, - 0x60, 0x44, 0xc0, 0xbc, 0x60, 0x46, 0xd0, 0xfc, 0x01, 0xb8, 0x70, 0x4c, - 0x9c, 0x06, 0x11, 0x90, 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, - 0x70, 0x4f, 0x00, 0x00, 0x20, 0x01, 0x01, 0x09, 0x20, 0x04, 0xd0, 0x8c, - 0x11, 0x38, 0x20, 0x01, 0x01, 0x08, 0x20, 0x04, 0xd0, 0xbc, 0x11, 0x10, - 0x70, 0x3f, 0x00, 0x00, 0x08, 0x0c, 0xa7, 0xa1, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x26, 0x70, 0x10, 0x9c, 0x06, 0x11, 0x78, 0x08, 0x0c, 0xa6, 0x5d, - 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, 0x60, 0x0c, 0x90, 0x15, 0x01, 0x20, - 0x72, 0x12, 0x60, 0x0f, 0x00, 0x00, 0x00, 0x10, 0x72, 0x12, 0x72, 0x0e, - 0x90, 0x06, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x70, 0x20, 0x9c, 0x06, - 0x11, 0x78, 0x08, 0x0c, 0xa6, 0x5d, 0x60, 0x44, 0xc0, 0xfc, 0x60, 0x46, - 0x60, 0x0c, 0x90, 0x15, 0x01, 0x20, 0x72, 0x22, 0x60, 0x0f, 0x00, 0x00, - 0x00, 0x10, 0x72, 0x22, 0x72, 0x1e, 0x90, 0x06, 0x00, 0x2e, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0x36, 0x78, 0x30, 0x9c, 0x06, 0x15, 0x58, 0x20, 0x69, - 0x01, 0x00, 0x68, 0xc0, 0x90, 0x05, 0x01, 0xf8, 0x08, 0x0c, 0x8a, 0x4b, - 0x08, 0x0c, 0xa2, 0xa0, 0x68, 0xc3, 0x00, 0x00, 0x08, 0x0c, 0xa7, 0x8a, - 0x20, 0x69, 0x01, 0x40, 0x6b, 0x04, 0x93, 0x84, 0x10, 0x00, 0x01, 0x38, - 0x20, 0x01, 0x01, 0x00, 0x08, 0x0c, 0x2a, 0x99, 0x90, 0x06, 0x08, 0x0c, - 0x2a, 0x99, 0x20, 0x69, 0x01, 0x00, 0x68, 0x24, 0xd0, 0x84, 0x01, 0x10, - 0x68, 0x27, 0x00, 0x01, 0x90, 0x85, 0x00, 0x01, 0x00, 0x38, 0x78, 0x08, - 0xc0, 0xad, 0x78, 0x0a, 0x60, 0x03, 0x00, 0x09, 0x63, 0x0a, 0x90, 0x06, - 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x61, 0x00, 0x20, 0x19, 0x01, 0x00, 0x20, 0x01, 0x03, 0x82, 0x20, 0x04, - 0xd0, 0x9c, 0x01, 0x90, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x28, 0x00, - 0x00, 0x16, 0x00, 0x36, 0x08, 0x0c, 0xad, 0x62, 0x00, 0x3e, 0x00, 0x1e, - 0x01, 0x2e, 0x00, 0xce, 0x62, 0x00, 0x22, 0x00, 0x91, 0x06, 0x0d, 0x58, - 0x22, 0x00, 0x00, 0x10, 0x83, 0x19, 0x1d, 0x38, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, - 0xac, 0xfc, 0x01, 0x06, 0x20, 0x71, 0x19, 0xe8, 0x20, 0x69, 0x01, 0x00, - 0x70, 0x4c, 0x20, 0x60, 0x90, 0x86, 0x1b, 0x55, 0x15, 0xb8, 0x68, 0x14, - 0xd0, 0x8c, 0x01, 0x88, 0x68, 0x17, 0x00, 0x10, 0x20, 0x09, 0x00, 0x19, - 0x81, 0x09, 0x1d, 0xf0, 0x20, 0x01, 0x00, 0x32, 0x69, 0x20, 0xd1, 0xbc, - 0x01, 0x30, 0x80, 0x01, 0x1d, 0xd8, 0x69, 0x2c, 0x91, 0x8d, 0x00, 0x08, - 0x69, 0x2e, 0x68, 0x24, 0xd0, 0x8c, 0x01, 0x10, 0x68, 0x27, 0x00, 0x02, - 0x68, 0xd0, 0x90, 0x05, 0x01, 0x18, 0x90, 0x82, 0x00, 0x05, 0x02, 0x38, - 0x60, 0x60, 0x80, 0x00, 0x60, 0x62, 0x20, 0x01, 0x03, 0x91, 0x20, 0x03, - 0x04, 0x00, 0x08, 0x0c, 0x9a, 0x48, 0x68, 0x2c, 0x90, 0x84, 0xff, 0xfd, - 0x68, 0x2e, 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0xd0, 0x94, 0x11, 0x20, - 0x68, 0x04, 0x90, 0x85, 0x00, 0x20, 0x68, 0x06, 0x20, 0x69, 0x00, 0x00, - 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, 0x8d, 0xff, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x08, 0x0c, - 0xac, 0xfc, 0x01, 0x06, 0x20, 0x71, 0x19, 0xe8, 0x20, 0x69, 0x01, 0x00, - 0x08, 0x0c, 0xaf, 0x84, 0x68, 0xd0, 0x90, 0x05, 0x01, 0x58, 0x90, 0x82, - 0x00, 0x05, 0x12, 0x40, 0x08, 0x0c, 0x2b, 0x33, 0x20, 0x01, 0x03, 0x91, - 0x20, 0x03, 0x04, 0x00, 0x20, 0x69, 0x00, 0x00, 0x01, 0x0e, 0x09, 0x0c, - 0xad, 0x18, 0x8d, 0xff, 0x00, 0xce, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x16, 0x20, 0x01, 0x01, 0x34, 0x20, 0x04, 0x90, 0x05, 0x01, 0x40, - 0x90, 0x82, 0x00, 0x05, 0x12, 0x28, 0x20, 0x01, 0x03, 0x91, 0x20, 0x03, - 0x04, 0x04, 0x00, 0x20, 0x20, 0x01, 0x03, 0x91, 0x20, 0x03, 0x04, 0x00, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x01, 0x56, 0x08, 0x0c, 0x9f, 0x43, - 0x7a, 0x14, 0x82, 0xff, 0x01, 0x38, 0x70, 0x03, 0x01, 0x00, 0x70, 0x0b, - 0x00, 0x03, 0x60, 0xc3, 0x00, 0x08, 0x04, 0x90, 0x70, 0x03, 0x02, 0x00, - 0x70, 0x07, 0x00, 0x00, 0x20, 0x69, 0x18, 0x00, 0x90, 0x1e, 0x68, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x10, 0xc3, 0x8d, 0x00, 0x60, 0x08, 0x0c, - 0x77, 0x9e, 0x11, 0x10, 0xc3, 0xad, 0x00, 0x08, 0xc3, 0xa5, 0x6a, 0xdc, - 0xd2, 0x9c, 0x11, 0x10, 0xd2, 0xac, 0x01, 0x08, 0xc3, 0x9d, 0x73, 0x0e, - 0x08, 0x0c, 0x8b, 0x10, 0x20, 0xa9, 0x00, 0x06, 0x20, 0x11, 0xff, 0xec, - 0x20, 0x19, 0xff, 0xed, 0x20, 0x71, 0x02, 0x50, 0x23, 0x05, 0x20, 0x72, - 0x8e, 0x70, 0x22, 0x05, 0x20, 0x72, 0x8e, 0x70, 0x93, 0x98, 0x00, 0x02, - 0x92, 0x90, 0x00, 0x02, 0x1f, 0x04, 0xb0, 0x3a, 0x60, 0xc3, 0x00, 0x20, - 0x08, 0x0c, 0xa2, 0x70, 0x01, 0x5e, 0x00, 0xde, 0x00, 0x05, 0x01, 0x56, - 0x08, 0x0c, 0x9f, 0x43, 0x7a, 0x14, 0x82, 0xff, 0x01, 0x68, 0x92, 0x86, - 0xff, 0xff, 0x01, 0x18, 0x92, 0x82, 0x00, 0x0e, 0x12, 0x38, 0x70, 0x03, - 0x01, 0x00, 0x70, 0x0b, 0x00, 0x03, 0x60, 0xc3, 0x00, 0x08, 0x04, 0x88, - 0x70, 0x03, 0x02, 0x00, 0x70, 0x07, 0x00, 0x1c, 0x70, 0x0f, 0x00, 0x01, - 0x20, 0x11, 0x19, 0xbe, 0x22, 0x04, 0x80, 0x07, 0x70, 0x1a, 0x82, 0x10, - 0x22, 0x04, 0x80, 0x07, 0x70, 0x1e, 0x04, 0x21, 0x11, 0x20, 0xb8, 0xa0, - 0x90, 0x82, 0x00, 0x7f, 0x02, 0x48, 0x20, 0x01, 0x18, 0x1f, 0x20, 0x04, - 0x70, 0x22, 0x20, 0x01, 0x18, 0x20, 0x20, 0x04, 0x70, 0x26, 0x00, 0x30, - 0x20, 0x01, 0x18, 0x18, 0x20, 0x04, 0x90, 0x84, 0x00, 0xff, 0x70, 0x26, - 0x20, 0xa9, 0x00, 0x04, 0x20, 0xe1, 0x00, 0x01, 0x20, 0x99, 0x18, 0x05, - 0x20, 0xe9, 0x00, 0x00, 0x20, 0xa1, 0x02, 0x56, 0x40, 0x03, 0x60, 0xc3, - 0x00, 0x1c, 0x01, 0x5e, 0x08, 0x04, 0xa2, 0x70, 0x00, 0x06, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0xac, 0x00, 0x0e, 0x00, 0x05, 0x20, 0x11, - 0x00, 0x03, 0x08, 0x0c, 0xa6, 0x2b, 0x20, 0x11, 0x00, 0x02, 0x08, 0x0c, - 0xa6, 0x35, 0x08, 0x0c, 0xa5, 0x16, 0x00, 0x36, 0x90, 0x1e, 0x08, 0x0c, - 0xa5, 0x96, 0x00, 0x3e, 0x00, 0x05, 0x08, 0x0c, 0x34, 0x87, 0x01, 0x88, - 0x00, 0x16, 0x00, 0xb6, 0x00, 0xc6, 0x70, 0x10, 0x90, 0x85, 0x00, 0x20, - 0x70, 0x12, 0x20, 0x09, 0x00, 0x7e, 0x08, 0x0c, 0x67, 0xb4, 0xb8, 0x5c, - 0xc0, 0xac, 0xb8, 0x5e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x1e, 0x00, 0x05, - 0x00, 0xd6, 0x00, 0xf6, 0x71, 0x04, 0x91, 0x86, 0x00, 0x04, 0x11, 0x30, - 0x74, 0x10, 0x9e, 0x90, 0x00, 0x04, 0x9e, 0x98, 0x00, 0x03, 0x00, 0x88, - 0x91, 0x86, 0x00, 0x01, 0x11, 0x30, 0x74, 0x20, 0x9e, 0x90, 0x00, 0x08, - 0x9e, 0x98, 0x00, 0x07, 0x00, 0x40, 0x91, 0x86, 0x00, 0x02, 0x15, 0x38, - 0x74, 0x28, 0x9e, 0x90, 0x00, 0x0a, 0x9e, 0x98, 0x00, 0x09, 0x61, 0x10, - 0x24, 0x68, 0x68, 0x0c, 0x90, 0x7d, 0x01, 0xe8, 0x78, 0x10, 0x91, 0x06, - 0x11, 0x28, 0x2f, 0x68, 0x78, 0x0c, 0x90, 0x7d, 0x1d, 0xc8, 0x00, 0xa8, - 0x78, 0x0c, 0x68, 0x0e, 0x7c, 0x0e, 0x2f, 0x12, 0x23, 0x04, 0x9f, 0x06, - 0x11, 0x08, 0x2d, 0x1a, 0x90, 0x06, 0x70, 0x32, 0x70, 0x36, 0x70, 0x04, - 0x90, 0x86, 0x00, 0x03, 0x01, 0x10, 0x70, 0x07, 0x00, 0x00, 0x90, 0x06, - 0x00, 0xfe, 0x00, 0xde, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x0c, 0xd0, - 0x20, 0x71, 0x18, 0x8d, 0x70, 0x00, 0x90, 0x05, 0x01, 0x40, 0x20, 0x01, - 0x08, 0x12, 0x20, 0x71, 0x18, 0x00, 0x70, 0x76, 0x70, 0x7a, 0x70, 0x6b, - 0xff, 0xd4, 0x20, 0x71, 0x18, 0x00, 0x70, 0x74, 0x70, 0x56, 0x70, 0x5b, - 0x1d, 0xdc, 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x71, 0x18, 0x00, - 0x20, 0x91, 0x80, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x10, 0x06, 0x08, - 0x70, 0x58, 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, - 0x9c, 0xe0, 0x00, 0x1c, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x0c, 0xb0, - 0x20, 0x61, 0x1d, 0xdc, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, - 0x75, 0x56, 0x9c, 0xa8, 0x00, 0x1c, 0x70, 0x68, 0x95, 0x02, 0x12, 0x30, - 0x75, 0x5a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, - 0x70, 0x5b, 0x1d, 0xdc, 0x0c, 0xc0, 0x90, 0x06, 0x0c, 0xc0, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x10, 0x06, 0x00, - 0x70, 0x58, 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x48, - 0x9c, 0xe0, 0x00, 0x1c, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x0c, 0xb0, - 0x20, 0x61, 0x1d, 0xdc, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, 0x85, 0x29, - 0x75, 0x56, 0x9c, 0xa8, 0x00, 0x1c, 0x70, 0x68, 0x95, 0x02, 0x12, 0x28, - 0x75, 0x5a, 0x90, 0x85, 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x70, 0x5b, - 0x1d, 0xdc, 0x0c, 0xc8, 0x90, 0x06, 0x0c, 0xc8, 0x9c, 0x82, 0x1d, 0xdc, - 0x0a, 0x0c, 0x0d, 0x85, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, - 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x06, 0x60, 0x06, 0x60, 0x0a, 0x60, 0x0e, - 0x60, 0x16, 0x60, 0x1a, 0x60, 0x12, 0x60, 0x23, 0x00, 0x00, 0x60, 0x03, - 0x00, 0x00, 0x60, 0x1e, 0x60, 0x5e, 0x60, 0x62, 0x60, 0x26, 0x60, 0x2a, - 0x60, 0x2e, 0x60, 0x32, 0x60, 0x36, 0x60, 0x3a, 0x60, 0x3e, 0x60, 0x4a, - 0x60, 0x2a, 0x60, 0x46, 0x60, 0x42, 0x20, 0x61, 0x18, 0x00, 0x60, 0x54, - 0x80, 0x00, 0x60, 0x56, 0x00, 0x05, 0x90, 0x06, 0x60, 0x0e, 0x60, 0x16, - 0x60, 0x1a, 0x60, 0x12, 0x60, 0x22, 0x60, 0x02, 0x60, 0x1e, 0x60, 0x5e, - 0x60, 0x62, 0x60, 0x4a, 0x60, 0x46, 0x20, 0x61, 0x18, 0x00, 0x60, 0x54, - 0x80, 0x00, 0x60, 0x56, 0x00, 0x05, 0x00, 0x06, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x00, 0x01, 0xd8, 0x60, 0x1c, 0xd0, 0x84, 0x19, 0x0c, 0x1a, 0xd3, - 0x60, 0x23, 0x00, 0x07, 0x20, 0x01, 0x19, 0x86, 0x20, 0x04, 0x00, 0x06, - 0x90, 0x82, 0x00, 0x51, 0x00, 0x0e, 0x02, 0x08, 0x80, 0x04, 0x60, 0x1a, - 0x08, 0x0c, 0xec, 0xe1, 0x60, 0x4b, 0x00, 0x00, 0x60, 0x44, 0xd0, 0xfc, - 0x11, 0x31, 0x90, 0x06, 0x60, 0x46, 0x60, 0x16, 0x60, 0x12, 0x00, 0x0e, - 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, 0x20, 0x01, 0x19, 0xfb, - 0x20, 0x04, 0x9c, 0x06, 0x11, 0x30, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, - 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x3e, 0x08, 0x0c, 0xa7, 0xa1, 0x01, 0x0e, - 0x09, 0x0c, 0xad, 0x18, 0x00, 0x05, 0x00, 0xe6, 0x01, 0x26, 0x20, 0x71, - 0x18, 0x00, 0x20, 0x91, 0x80, 0x00, 0x75, 0x54, 0x95, 0x82, 0x00, 0x01, - 0x06, 0x08, 0x70, 0x58, 0x20, 0x60, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, - 0x01, 0x48, 0x9c, 0xe0, 0x00, 0x1c, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, - 0x0c, 0xb0, 0x20, 0x61, 0x1d, 0xdc, 0x0c, 0x98, 0x60, 0x03, 0x00, 0x08, - 0x85, 0x29, 0x75, 0x56, 0x9c, 0xa8, 0x00, 0x1c, 0x70, 0x68, 0x95, 0x02, - 0x12, 0x30, 0x75, 0x5a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xee, - 0x00, 0x05, 0x70, 0x5b, 0x1d, 0xdc, 0x0c, 0xc0, 0x90, 0x06, 0x0c, 0xc0, - 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x02, 0xb2, 0x1e, 0xb2, 0x28, - 0xb2, 0x43, 0xb2, 0x5e, 0xd6, 0x9a, 0xd6, 0xb7, 0xd6, 0xd2, 0xb2, 0x1e, - 0xb2, 0x28, 0x92, 0xf7, 0xb2, 0x77, 0xb2, 0x1e, 0xb2, 0x1e, 0xb2, 0x1e, - 0xb2, 0x1e, 0xb2, 0x1e, 0x91, 0x86, 0x00, 0x13, 0x11, 0x30, 0x60, 0x44, - 0xd0, 0xfc, 0x01, 0x10, 0x08, 0x0c, 0x99, 0xed, 0x00, 0x05, 0x00, 0x05, - 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, - 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0xb2, 0x41, 0xb9, 0xbc, 0xbb, 0xa3, - 0xb2, 0x41, 0xbc, 0x39, 0xb5, 0x40, 0xb2, 0x41, 0xb2, 0x41, 0xb9, 0x3e, - 0xc2, 0x5a, 0xb2, 0x41, 0xb2, 0x41, 0xb2, 0x41, 0xb2, 0x41, 0xb2, 0x41, - 0xb2, 0x41, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, - 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, - 0xb2, 0x5c, 0xc8, 0x75, 0xb2, 0x5c, 0xb2, 0x5c, 0xb2, 0x5c, 0xb2, 0x5c, - 0xb2, 0x5c, 0xb2, 0x5c, 0xc8, 0x0c, 0xc9, 0xf8, 0xb2, 0x5c, 0xc8, 0xb2, - 0xc9, 0x36, 0xc8, 0xb2, 0xc9, 0x36, 0xb2, 0x5c, 0x08, 0x0c, 0x0d, 0x85, - 0x60, 0x00, 0x90, 0x82, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x60, 0x00, - 0x00, 0x02, 0xb2, 0x75, 0xc2, 0xa4, 0xc3, 0x3e, 0xc4, 0xc1, 0xc5, 0x30, - 0xb2, 0x75, 0xb2, 0x75, 0xb2, 0x75, 0xc2, 0x73, 0xc7, 0x8d, 0xc7, 0x90, - 0xb2, 0x75, 0xb2, 0x75, 0xb2, 0x75, 0xb2, 0x75, 0xc7, 0xc0, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x05, 0xb2, 0x90, 0xb2, 0x90, - 0xb2, 0xce, 0xb3, 0x6d, 0xb3, 0xed, 0xb2, 0x90, 0xb2, 0x90, 0xb2, 0x90, - 0xb2, 0x92, 0xb2, 0x90, 0xb2, 0x90, 0xb2, 0x90, 0xb2, 0x90, 0xb2, 0x90, - 0xb2, 0x90, 0xb2, 0x90, 0x08, 0x0c, 0x0d, 0x85, 0x91, 0x86, 0x00, 0x4c, - 0x05, 0x60, 0x91, 0x86, 0x00, 0x03, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0x96, - 0x60, 0x1c, 0xc0, 0xed, 0x60, 0x1e, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0x90, 0x84, 0xa0, 0x00, 0xc0, 0xb5, - 0xa8, 0x7e, 0xa8, 0xac, 0xa8, 0x36, 0xa8, 0xb0, 0xa8, 0x3a, 0x90, 0x06, - 0xa8, 0x46, 0xa8, 0x4a, 0xa8, 0x84, 0x90, 0x92, 0x19, 0x9a, 0x02, 0x10, - 0x20, 0x01, 0x19, 0x99, 0x80, 0x03, 0x80, 0x13, 0x82, 0x13, 0x92, 0x10, - 0x62, 0x1a, 0x00, 0x9e, 0x08, 0x0c, 0x1c, 0x26, 0x20, 0x09, 0x80, 0x30, - 0x08, 0x0c, 0x96, 0x5e, 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x08, 0x0c, 0xb4, 0x0f, 0x08, 0x0c, - 0xd6, 0x5d, 0x60, 0x03, 0x00, 0x07, 0x00, 0x05, 0x00, 0xd6, 0x00, 0x96, - 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x7a, 0x90, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x7c, 0xd0, 0xec, 0x11, 0x10, 0x92, 0x90, 0x00, 0x18, 0xac, 0x78, - 0xc4, 0xfc, 0x00, 0x46, 0xa8, 0xe0, 0x90, 0x05, 0x11, 0x40, 0xa8, 0xdc, - 0x92, 0x1a, 0x01, 0x40, 0x02, 0x20, 0xa8, 0x7b, 0x00, 0x07, 0x20, 0x10, - 0x00, 0x28, 0xa8, 0x7b, 0x00, 0x15, 0x00, 0x10, 0xa8, 0x7b, 0x00, 0x00, - 0x82, 0x14, 0xa8, 0x83, 0x00, 0x00, 0xaa, 0x02, 0x00, 0x06, 0x00, 0x16, - 0x00, 0x26, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x00, 0xf6, 0x24, 0x00, - 0x90, 0x05, 0x11, 0x08, 0x00, 0x9a, 0x21, 0x00, 0x90, 0x86, 0x00, 0x15, - 0x11, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x38, 0x21, 0x00, 0x90, 0x86, - 0x00, 0x16, 0x01, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x2a, 0x94, 0xa4, - 0x00, 0x07, 0x84, 0x23, 0x94, 0x05, 0x00, 0x02, 0xb3, 0x35, 0xb3, 0x35, - 0xb3, 0x30, 0xb3, 0x33, 0xb3, 0x35, 0xb3, 0x2d, 0xb3, 0x20, 0xb3, 0x20, - 0xb3, 0x20, 0xb3, 0x20, 0xb3, 0x20, 0xb3, 0x20, 0xb3, 0x20, 0xb3, 0x20, - 0xb3, 0x20, 0xb3, 0x20, 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x4e, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0xde, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xbe, 0x51, 0x00, 0x28, - 0x08, 0x0c, 0xbf, 0x8f, 0x00, 0x10, 0x08, 0x0c, 0xc0, 0x85, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x2c, 0x00, - 0xa8, 0x96, 0x00, 0x0e, 0x08, 0x0c, 0xb4, 0xcd, 0x05, 0x30, 0xa8, 0x04, - 0xa8, 0x0e, 0x00, 0xa6, 0x20, 0x50, 0xb1, 0x00, 0x00, 0xae, 0x80, 0x06, - 0x80, 0x06, 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, - 0x90, 0x80, 0x00, 0x02, 0xaa, 0xcc, 0xab, 0xd0, 0xac, 0xd4, 0xad, 0xd8, - 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0xc2, 0x08, 0x0c, 0xb6, 0x91, - 0x01, 0x60, 0x00, 0x0e, 0x90, 0x05, 0x01, 0x20, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0xde, 0x00, 0x05, 0x00, 0xfe, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x04, - 0xb1, 0x6c, 0x20, 0x01, 0x00, 0x2c, 0x90, 0x0e, 0x08, 0x0c, 0xb5, 0x33, - 0x0c, 0x70, 0x91, 0xb6, 0x00, 0x15, 0x01, 0x70, 0x91, 0xb6, 0x00, 0x16, - 0x01, 0x58, 0x91, 0xb2, 0x00, 0x47, 0x0a, 0x0c, 0x0d, 0x85, 0x91, 0xb2, - 0x00, 0x50, 0x1a, 0x0c, 0x0d, 0x85, 0x91, 0x82, 0x00, 0x47, 0x00, 0x42, - 0x08, 0x0c, 0xaf, 0x61, 0x01, 0x20, 0x90, 0x86, 0x00, 0x02, 0x09, 0x04, - 0xb2, 0xce, 0x00, 0x05, 0xb3, 0x8f, 0xb3, 0x8f, 0xb3, 0x91, 0xb3, 0xc3, - 0xb3, 0x8f, 0xb3, 0x8f, 0xb3, 0x8f, 0xb3, 0x8f, 0xb3, 0xd6, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0xd6, 0x00, 0x16, 0x00, 0x96, 0x60, 0x03, 0x00, 0x04, - 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0xc0, 0xa8, 0x78, - 0xc0, 0xfc, 0x90, 0x05, 0x11, 0x58, 0xa8, 0x94, 0x90, 0x05, 0x01, 0x40, - 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, 0x08, 0x0c, 0xb5, 0x33, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0xa8, 0x60, 0x03, 0x00, 0x02, 0xa8, 0xa4, 0xa9, 0xa8, - 0x91, 0x05, 0x11, 0x78, 0xa8, 0xae, 0xa8, 0xb2, 0x0c, 0x78, 0xa8, 0x7f, - 0x00, 0x20, 0xa8, 0x8c, 0xa8, 0x8a, 0xa8, 0xa4, 0xa8, 0xae, 0xa8, 0xa8, - 0xa8, 0xb2, 0xa8, 0xc7, 0x00, 0x00, 0xa8, 0xcb, 0x00, 0x00, 0x00, 0x9e, - 0x00, 0x1e, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, 0x9a, 0x48, 0x00, 0xd6, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x20, - 0xa8, 0x7b, 0x00, 0x06, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x00, 0xde, - 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x04, 0x9a, 0xb3, 0x08, 0x0c, 0x9a, 0x48, - 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0xd6, 0x00, 0x96, - 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x20, 0xa8, 0x7b, - 0x00, 0x29, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x0c, - 0xb1, 0x6c, 0x08, 0x04, 0x9a, 0xb3, 0x91, 0x82, 0x00, 0x47, 0x00, 0x02, - 0xb3, 0xfd, 0xb3, 0xff, 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, - 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, 0xb3, 0xfd, - 0xb3, 0xff, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0xd6, 0x00, 0x96, 0x60, 0x1f, - 0x00, 0x00, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, - 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x00, 0xde, 0x08, 0x04, - 0xb1, 0x6c, 0x00, 0x26, 0x00, 0x36, 0x00, 0x56, 0x00, 0x66, 0x00, 0x96, - 0x00, 0xa6, 0x00, 0xf6, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x59, 0x00, 0x0e, - 0x09, 0x0c, 0x0d, 0x85, 0xa9, 0x60, 0x21, 0xe8, 0xa9, 0x5c, 0x91, 0x88, - 0x00, 0x19, 0x21, 0xa0, 0x90, 0x0e, 0x20, 0xa9, 0x00, 0x20, 0x41, 0x04, - 0xa8, 0x7a, 0x20, 0x79, 0x18, 0x00, 0x79, 0x90, 0x91, 0x88, 0x00, 0x18, - 0x91, 0x8c, 0x0f, 0xff, 0xa9, 0x72, 0xac, 0x76, 0x29, 0x50, 0x00, 0xa6, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x90, 0x1e, 0x20, 0x29, - 0x00, 0x01, 0x91, 0x82, 0x00, 0x35, 0x12, 0x28, 0x20, 0x11, 0x00, 0x1f, - 0x08, 0x0c, 0xca, 0x7b, 0x04, 0xc0, 0x21, 0x30, 0x20, 0x09, 0x00, 0x34, - 0x20, 0x11, 0x00, 0x1f, 0x08, 0x0c, 0xca, 0x7b, 0x96, 0xb2, 0x00, 0x34, - 0xb0, 0x04, 0x90, 0x4d, 0x01, 0x10, 0x08, 0x0c, 0x10, 0x0b, 0x08, 0x0c, - 0x10, 0x59, 0x01, 0xd0, 0x85, 0x28, 0xa8, 0x67, 0x01, 0x10, 0xa8, 0x6b, - 0x00, 0x00, 0x29, 0x20, 0xb4, 0x06, 0x96, 0x8a, 0x00, 0x3d, 0x12, 0x30, - 0x26, 0x08, 0x20, 0x11, 0x00, 0x1b, 0x08, 0x0c, 0xca, 0x7b, 0x00, 0xb8, - 0x96, 0xb2, 0x00, 0x3c, 0x20, 0x09, 0x00, 0x3c, 0x29, 0x50, 0x20, 0x11, - 0x00, 0x1b, 0x08, 0x0c, 0xca, 0x7b, 0x0c, 0x18, 0x20, 0x01, 0x02, 0x05, - 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, 0x95, 0xad, 0x00, 0x50, - 0xb5, 0x66, 0xb0, 0x70, 0xc0, 0xfd, 0xb0, 0x72, 0x00, 0x48, 0x20, 0x01, - 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, 0x95, 0xad, - 0x00, 0x50, 0xb5, 0x66, 0x2a, 0x48, 0xa8, 0x04, 0xa8, 0x07, 0x00, 0x00, - 0x00, 0x06, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x0e, 0x20, 0x48, 0x90, 0x05, - 0x1d, 0xb0, 0x00, 0xfe, 0x00, 0xae, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, - 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xf6, 0x00, 0x96, - 0x00, 0x06, 0x08, 0x0c, 0x10, 0x59, 0x00, 0x0e, 0x09, 0x0c, 0x0d, 0x85, - 0xa9, 0x60, 0x21, 0xe8, 0xa9, 0x5c, 0x91, 0x88, 0x00, 0x19, 0x21, 0xa0, - 0x90, 0x0e, 0x20, 0xa9, 0x00, 0x20, 0x41, 0x04, 0xaa, 0x66, 0xa8, 0x7a, - 0x20, 0x79, 0x18, 0x00, 0x79, 0x90, 0x81, 0x0c, 0x91, 0x88, 0x00, 0x0c, - 0x91, 0x82, 0x00, 0x1a, 0x02, 0x10, 0x20, 0x09, 0x00, 0x1a, 0x21, 0xa8, - 0x81, 0x0b, 0xa9, 0x72, 0xac, 0x76, 0x2e, 0x98, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x1f, 0x20, 0xa0, 0x20, 0x01, 0x02, 0x05, 0x20, 0x0c, 0x91, 0x8d, - 0x00, 0x80, 0x21, 0x02, 0x40, 0x03, 0x20, 0x03, 0x00, 0x00, 0x08, 0x0c, - 0x70, 0x12, 0x00, 0x9e, 0x00, 0xfe, 0x00, 0xde, 0x00, 0x05, 0x00, 0x16, - 0x00, 0xd6, 0x00, 0xf6, 0x00, 0x96, 0x00, 0x16, 0x20, 0x01, 0x02, 0x05, - 0x20, 0x0c, 0x91, 0x8d, 0x00, 0x80, 0x21, 0x02, 0x00, 0x1e, 0x20, 0x79, - 0x02, 0x00, 0x2e, 0x98, 0xa8, 0x7c, 0xd0, 0xec, 0x01, 0x18, 0x9e, 0x80, - 0x00, 0x0c, 0x20, 0x98, 0x20, 0x21, 0x00, 0x3e, 0x90, 0x1e, 0x92, 0x82, - 0x00, 0x20, 0x02, 0x18, 0x20, 0x11, 0x00, 0x20, 0x20, 0x18, 0x94, 0x86, - 0x00, 0x3e, 0x11, 0x70, 0x00, 0x96, 0x08, 0x0c, 0x10, 0x59, 0x29, 0x00, - 0x00, 0x9e, 0x05, 0xc0, 0xa8, 0x06, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x33, 0x00, 0x90, 0x8e, - 0x02, 0x60, 0x01, 0x40, 0x20, 0x09, 0x02, 0x80, 0x91, 0x02, 0x92, 0x0a, - 0x02, 0x18, 0x20, 0x10, 0x21, 0x00, 0x93, 0x18, 0x22, 0x00, 0x94, 0x02, - 0x12, 0x28, 0x24, 0x00, 0x92, 0x02, 0x24, 0x10, 0x93, 0x18, 0x90, 0x06, - 0x20, 0x20, 0x22, 0xa8, 0xa8, 0x00, 0x92, 0x00, 0xa8, 0x02, 0x20, 0xe1, - 0x00, 0x00, 0x40, 0x03, 0x83, 0xff, 0x01, 0x80, 0x33, 0x00, 0x90, 0x86, - 0x02, 0x80, 0x11, 0x30, 0x78, 0x14, 0x80, 0x00, 0x90, 0x85, 0x00, 0x80, - 0x78, 0x16, 0x2e, 0x98, 0x23, 0x10, 0x84, 0xff, 0x09, 0x04, 0xb4, 0xe2, - 0x08, 0x04, 0xb4, 0xe4, 0x90, 0x85, 0x00, 0x01, 0x78, 0x17, 0x00, 0x00, - 0x00, 0x9e, 0x00, 0xfe, 0x00, 0xde, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, - 0x00, 0x36, 0x00, 0x96, 0x63, 0x14, 0x23, 0x48, 0xa8, 0x7a, 0xa9, 0x82, - 0x08, 0x0c, 0x70, 0x06, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x05, - 0x91, 0xb6, 0x00, 0x15, 0x11, 0x18, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x30, - 0x91, 0xb6, 0x00, 0x16, 0x19, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x05, 0x20, 0xa9, 0x00, 0x0e, 0x20, 0xe1, 0x00, 0x00, 0x2e, 0x98, - 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, - 0x20, 0xa0, 0x00, 0x9e, 0x40, 0x03, 0x91, 0x96, 0x00, 0x16, 0x01, 0xf0, - 0x01, 0x36, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x11, 0x00, 0x06, - 0x20, 0xa9, 0x00, 0x01, 0x34, 0x18, 0x83, 0x18, 0x23, 0xa0, 0x40, 0x03, - 0x33, 0x18, 0x83, 0x18, 0x23, 0x98, 0x82, 0x11, 0x1d, 0xb8, 0x20, 0x11, - 0x00, 0x06, 0x01, 0x3e, 0x20, 0xa0, 0x33, 0x18, 0x83, 0x18, 0x23, 0x98, - 0x40, 0x03, 0x34, 0x18, 0x83, 0x18, 0x23, 0xa0, 0x82, 0x11, 0x1d, 0xb8, - 0x00, 0x96, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x30, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0x00, 0x9e, 0x08, 0x04, - 0xb1, 0x6c, 0x00, 0x96, 0x00, 0xd6, 0x00, 0x36, 0x73, 0x30, 0x93, 0x86, - 0x02, 0x00, 0x11, 0xa8, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xd7, - 0x00, 0x00, 0x00, 0xbe, 0x60, 0x14, 0x90, 0x05, 0x01, 0x30, 0x20, 0x48, - 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xab, 0x32, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x3e, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x11, - 0x1d, 0x48, 0x0c, 0xc8, 0x00, 0x06, 0x00, 0x16, 0x08, 0x0c, 0xd6, 0x45, - 0x01, 0x88, 0x60, 0x14, 0x90, 0x05, 0x11, 0x70, 0x60, 0x0b, 0x00, 0x03, - 0x60, 0x1b, 0x00, 0x00, 0x60, 0x4b, 0x00, 0x00, 0x20, 0x09, 0x00, 0x22, - 0x08, 0x0c, 0xb9, 0x94, 0x90, 0x06, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x05, - 0x90, 0x85, 0x00, 0x01, 0x0c, 0xd0, 0x00, 0x96, 0x00, 0x16, 0x20, 0xa9, - 0x00, 0x14, 0x9e, 0x80, 0x00, 0x0c, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x98, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, - 0x00, 0x01, 0x20, 0x99, 0x02, 0x60, 0x20, 0xa9, 0x00, 0x16, 0x40, 0x03, - 0x20, 0xa9, 0x00, 0x0a, 0xa8, 0x04, 0x20, 0x48, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x02, 0x20, 0xa0, 0x40, 0x03, 0x20, 0x01, - 0x02, 0x05, 0x20, 0x03, 0x00, 0x02, 0x20, 0x99, 0x02, 0x60, 0x20, 0xa9, - 0x00, 0x20, 0x40, 0x03, 0x20, 0x03, 0x00, 0x00, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x1e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x96, 0x00, 0x16, 0x90, 0x0e, - 0x70, 0x30, 0x90, 0x86, 0x01, 0x00, 0x01, 0x40, 0x70, 0x38, 0x90, 0x84, - 0x00, 0xff, 0x80, 0x0c, 0x70, 0x3c, 0x90, 0x84, 0x00, 0xff, 0x80, 0x04, - 0x90, 0x80, 0x00, 0x04, 0x91, 0x08, 0x81, 0x0b, 0x20, 0x11, 0x00, 0x02, - 0x20, 0x19, 0x00, 0x0c, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xca, 0x7b, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x40, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, - 0x00, 0x00, 0xa8, 0x64, 0xa8, 0xe2, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x1e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x16, 0x20, 0x09, - 0x00, 0x00, 0x70, 0x30, 0x90, 0x86, 0x02, 0x00, 0x01, 0x10, 0x20, 0x09, - 0x00, 0x01, 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, - 0xa9, 0x7a, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x96, 0x70, 0x30, 0x90, 0x86, - 0x01, 0x00, 0x11, 0x18, 0x20, 0x09, 0x00, 0x04, 0x00, 0x10, 0x70, 0x34, - 0x80, 0x0c, 0x81, 0x0b, 0x20, 0x11, 0x00, 0x0c, 0x20, 0x19, 0x00, 0x0c, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x04, 0x00, 0x96, 0x90, 0x05, 0x01, 0x08, - 0x20, 0x48, 0x08, 0x0c, 0xca, 0x7b, 0x00, 0x9e, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0x48, 0xa8, 0x04, 0x90, 0x05, 0x11, 0x58, 0xa8, 0x07, 0x00, 0x00, - 0xa8, 0x64, 0xa8, 0xe2, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x9e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x86, 0x20, 0x40, 0xa0, 0x30, - 0x80, 0x07, 0x90, 0x86, 0x01, 0x00, 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, - 0x00, 0xe0, 0xa0, 0x34, 0x80, 0x07, 0x80, 0x0c, 0x88, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x0c, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, - 0x40, 0x00, 0xaa, 0xa0, 0xab, 0x9c, 0xac, 0xa8, 0xad, 0xa4, 0x20, 0x31, - 0x00, 0x00, 0x20, 0x41, 0x12, 0xa8, 0x00, 0x19, 0x0d, 0x08, 0x00, 0x8e, - 0x08, 0x98, 0x00, 0x96, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x59, 0x00, 0x0e, - 0x01, 0xb0, 0xa8, 0xab, 0x0d, 0xcb, 0xa8, 0x76, 0x00, 0x0e, 0xa8, 0xa2, - 0x00, 0x06, 0xae, 0x6a, 0x28, 0x00, 0xa8, 0x9e, 0xa9, 0x7a, 0xaf, 0x72, - 0xaa, 0x8e, 0xab, 0x92, 0xac, 0x96, 0xad, 0x9a, 0x00, 0x86, 0x29, 0x40, - 0x08, 0x0c, 0x11, 0x4e, 0x00, 0x8e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x9e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x26, 0x70, 0x08, 0x90, 0x84, - 0x00, 0xff, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0x10, 0x00, 0xbe, - 0x92, 0x06, 0x15, 0x20, 0x70, 0x0c, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, - 0xba, 0x14, 0x00, 0xbe, 0x92, 0x06, 0x11, 0xe0, 0x60, 0x4b, 0x00, 0x00, - 0x2c, 0x68, 0x00, 0x16, 0x20, 0x09, 0x00, 0x35, 0x08, 0x0c, 0xd5, 0xbb, - 0x00, 0x1e, 0x11, 0x58, 0x62, 0x2c, 0x22, 0x68, 0x20, 0x71, 0x02, 0x6c, - 0x6b, 0x20, 0x93, 0x86, 0x00, 0x03, 0x01, 0x30, 0x93, 0x86, 0x00, 0x06, - 0x01, 0x28, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x20, 0x00, 0x39, 0x00, 0x10, - 0x08, 0x0c, 0xb7, 0xc7, 0x00, 0x2e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, - 0x00, 0x96, 0x68, 0x14, 0x20, 0x48, 0x91, 0x86, 0x00, 0x15, 0x09, 0x04, - 0xb7, 0xa6, 0x91, 0x8e, 0x00, 0x16, 0x19, 0x04, 0xb7, 0xc5, 0x70, 0x0c, - 0x90, 0x8c, 0xff, 0x00, 0x91, 0x86, 0x17, 0x00, 0x01, 0x20, 0x91, 0x86, - 0x03, 0x00, 0x19, 0x04, 0xb7, 0x80, 0x89, 0xff, 0x11, 0x38, 0x68, 0x00, - 0x90, 0x86, 0x00, 0x0f, 0x09, 0x04, 0xb7, 0x62, 0x08, 0x04, 0xb7, 0xc3, - 0x68, 0x08, 0x90, 0x86, 0xff, 0xff, 0x19, 0x04, 0xb7, 0xa8, 0xa8, 0x7c, - 0x90, 0x84, 0x00, 0x60, 0x90, 0x86, 0x00, 0x20, 0x11, 0x50, 0xa8, 0xac, - 0xa9, 0x34, 0x91, 0x06, 0x19, 0x04, 0xb7, 0xa8, 0xa8, 0xb0, 0xa9, 0x38, - 0x91, 0x06, 0x19, 0x04, 0xb7, 0xa8, 0x68, 0x24, 0xd0, 0x84, 0x19, 0x04, - 0xb7, 0xa8, 0xd0, 0xb4, 0x01, 0x58, 0x00, 0x16, 0x20, 0x01, 0x19, 0x86, - 0x20, 0x0c, 0x60, 0x18, 0x91, 0x02, 0x90, 0x82, 0x00, 0x05, 0x00, 0x1e, - 0x1a, 0x04, 0xb7, 0xa8, 0x08, 0x0c, 0xd1, 0x0c, 0x68, 0x10, 0x00, 0x96, - 0x20, 0x48, 0xa9, 0xa0, 0x00, 0x9e, 0x68, 0x5c, 0xa8, 0x7a, 0xa9, 0x76, - 0x68, 0x64, 0xa8, 0x82, 0xa8, 0x7c, 0xc0, 0xdc, 0xc0, 0xf4, 0xc0, 0xd4, - 0xa8, 0x7e, 0x00, 0x26, 0x90, 0x0e, 0x6a, 0x18, 0x20, 0x01, 0x00, 0x0a, - 0x08, 0x0c, 0x95, 0x5b, 0xa8, 0x84, 0x92, 0x0a, 0x02, 0x08, 0x80, 0x11, - 0xaa, 0x86, 0x82, 0xff, 0x00, 0x2e, 0x11, 0x38, 0x00, 0xc6, 0x2d, 0x60, - 0x08, 0x0c, 0xcc, 0x01, 0x00, 0xce, 0x08, 0x04, 0xb7, 0xc3, 0x00, 0xc6, - 0xa8, 0x68, 0xd0, 0xfc, 0x11, 0x18, 0x08, 0x0c, 0x62, 0x2f, 0x00, 0x10, - 0x08, 0x0c, 0x66, 0x3a, 0x00, 0xce, 0x19, 0x04, 0xb7, 0xa8, 0x00, 0xc6, - 0x2d, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, 0x08, 0x04, 0xb7, 0xc3, - 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0xdd, 0x01, 0x98, 0x60, 0x17, 0x00, 0x00, - 0x68, 0x10, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x03, - 0x69, 0x04, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, - 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0xce, 0x08, 0x04, 0xb7, 0xc3, 0x20, 0x01, - 0x19, 0x88, 0x20, 0x04, 0x68, 0x4a, 0x00, 0xce, 0x08, 0x04, 0xb7, 0xc3, - 0x70, 0x08, 0x90, 0x86, 0x00, 0x0b, 0x11, 0xc8, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb9, 0x00, 0xc1, 0xbc, 0xb9, 0x02, 0x00, 0xbe, 0x00, 0xc6, - 0x2d, 0x60, 0xa8, 0x7b, 0x00, 0x03, 0x08, 0x0c, 0xd5, 0xff, 0x60, 0x07, - 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xce, 0x04, 0x30, 0x70, 0x0c, - 0x90, 0x86, 0x2a, 0x00, 0x11, 0x38, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, - 0x68, 0x4a, 0x00, 0xe8, 0x04, 0xc1, 0x00, 0xe8, 0x89, 0xff, 0x09, 0x0c, - 0x0d, 0x85, 0x00, 0xc6, 0x00, 0xd6, 0x2d, 0x60, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x7b, 0x00, 0x03, 0x08, 0x0c, 0x6e, 0x27, 0x08, 0x0c, 0xd1, 0x0c, - 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x26, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xba, 0x3c, 0x08, 0x0c, 0x68, 0xdf, 0x00, 0xbe, 0x00, 0x2e, 0x00, 0xde, - 0x00, 0xce, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x86, - 0x00, 0x15, 0x11, 0x28, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x68, 0x4a, - 0x00, 0x68, 0x91, 0x8e, 0x00, 0x16, 0x11, 0x60, 0x00, 0xc6, 0x2d, 0x00, - 0x20, 0x60, 0x08, 0x0c, 0xec, 0xe1, 0x08, 0x0c, 0x8c, 0x19, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0xce, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0x26, - 0x00, 0x36, 0x00, 0x46, 0x72, 0x28, 0xac, 0xb0, 0xab, 0xac, 0xd2, 0xf4, - 0x01, 0x30, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x68, 0x4a, 0x08, 0x04, - 0xb8, 0x41, 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xca, 0xdc, 0x00, 0xce, - 0x68, 0x04, 0x90, 0x86, 0x00, 0x50, 0x11, 0x68, 0x00, 0xc6, 0x2d, 0x00, - 0x20, 0x60, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x50, 0x20, 0x09, - 0x80, 0x23, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xce, 0x04, 0xf0, 0x68, 0x00, - 0x90, 0x86, 0x00, 0x0f, 0x01, 0xa8, 0x89, 0xff, 0x09, 0x0c, 0x0d, 0x85, - 0x68, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x90, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x78, 0xa8, 0x43, 0x0f, 0xff, 0xa8, 0x3f, 0x0f, 0xff, 0xa8, 0x80, - 0xc0, 0xfc, 0xa8, 0x82, 0x20, 0x01, 0x00, 0x01, 0x68, 0x32, 0x04, 0x00, - 0x20, 0x01, 0x00, 0x07, 0x68, 0x32, 0x00, 0xe0, 0xa8, 0x7c, 0xd0, 0xb4, - 0x11, 0x50, 0xd0, 0xac, 0x0d, 0xb8, 0x68, 0x24, 0xd0, 0xf4, 0x1d, 0x48, - 0xa8, 0x38, 0xa9, 0x34, 0x91, 0x05, 0x0d, 0x80, 0x0c, 0x20, 0xd2, 0xec, - 0x1d, 0x68, 0x70, 0x24, 0x93, 0x06, 0x11, 0x18, 0x70, 0x20, 0x94, 0x06, - 0x0d, 0x38, 0x70, 0x20, 0x68, 0x3e, 0x70, 0x24, 0x68, 0x3a, 0x20, 0x01, - 0x00, 0x05, 0x68, 0x32, 0x08, 0x0c, 0xd2, 0xa0, 0x08, 0x0c, 0x9a, 0xb3, - 0x00, 0x10, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x26, 0x70, 0x08, 0x90, 0x84, - 0x00, 0xff, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0x10, 0x00, 0xbe, - 0x92, 0x06, 0x19, 0x04, 0xb8, 0xac, 0x70, 0x0c, 0x62, 0x10, 0x00, 0xb6, - 0x22, 0x58, 0xba, 0x14, 0x00, 0xbe, 0x92, 0x06, 0x19, 0x04, 0xb8, 0xac, - 0x60, 0x38, 0x20, 0x68, 0x68, 0x24, 0xc0, 0xdc, 0x68, 0x26, 0x6a, 0x20, - 0x92, 0x86, 0x00, 0x07, 0x09, 0x04, 0xb8, 0xac, 0x92, 0x86, 0x00, 0x02, - 0x09, 0x04, 0xb8, 0xac, 0x92, 0x86, 0x00, 0x00, 0x05, 0xe8, 0x68, 0x08, - 0x63, 0x3c, 0x93, 0x06, 0x15, 0xc8, 0x20, 0x71, 0x02, 0x6c, 0x91, 0x86, - 0x00, 0x15, 0x05, 0x70, 0x91, 0x8e, 0x00, 0x16, 0x11, 0x00, 0x00, 0xc6, - 0x60, 0x38, 0x20, 0x60, 0x61, 0x04, 0x91, 0x86, 0x00, 0x4b, 0x01, 0xc0, - 0x91, 0x86, 0x00, 0x4c, 0x01, 0xa8, 0x91, 0x86, 0x00, 0x4d, 0x01, 0x90, - 0x91, 0x86, 0x00, 0x4e, 0x01, 0x78, 0x91, 0x86, 0x00, 0x52, 0x01, 0x60, - 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x09, 0x0c, - 0x0d, 0x85, 0xa8, 0x7b, 0x00, 0x03, 0x00, 0x9e, 0x08, 0x0c, 0xd5, 0xff, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xce, 0x00, 0x30, - 0x60, 0x38, 0x20, 0x70, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x70, 0x4a, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x2e, 0x00, 0xde, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0x96, 0x00, 0xf6, 0x60, 0x14, 0x20, 0x48, 0x60, 0x10, - 0x20, 0x58, 0x91, 0xb6, 0x00, 0x15, 0x01, 0x30, 0xba, 0x08, 0xbb, 0x0c, - 0xbc, 0x00, 0xc4, 0x8c, 0xbc, 0x02, 0x04, 0x70, 0x00, 0x96, 0x01, 0x56, - 0x00, 0x36, 0x00, 0x26, 0x2b, 0x48, 0x9e, 0x90, 0x00, 0x10, 0x20, 0x19, - 0x00, 0x0a, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x2e, - 0x00, 0x3e, 0x01, 0x5e, 0x00, 0x9e, 0x19, 0x04, 0xb9, 0x1d, 0x00, 0x96, - 0x01, 0x56, 0x00, 0x36, 0x00, 0x26, 0x2b, 0x48, 0x9e, 0x90, 0x00, 0x14, - 0x20, 0x19, 0x00, 0x06, 0x20, 0xa9, 0x00, 0x04, 0x08, 0x0c, 0xc2, 0x22, - 0x00, 0x2e, 0x00, 0x3e, 0x01, 0x5e, 0x00, 0x9e, 0x15, 0xb0, 0x72, 0x38, - 0xba, 0x0a, 0x73, 0x3c, 0xbb, 0x0e, 0x83, 0xff, 0x01, 0x18, 0xbc, 0x00, - 0xc4, 0x8d, 0xbc, 0x02, 0xa8, 0x04, 0x90, 0x05, 0x11, 0x28, 0x00, 0xfe, - 0x00, 0x9e, 0x00, 0xbe, 0x08, 0x04, 0xb5, 0x7c, 0x00, 0x96, 0x20, 0x48, - 0xaa, 0x12, 0xab, 0x16, 0xac, 0x0a, 0x00, 0x9e, 0x80, 0x06, 0x80, 0x06, - 0x80, 0x07, 0x90, 0xbc, 0x00, 0x3f, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x02, 0x20, 0x09, 0x00, 0x2b, 0xaa, 0xa0, 0xab, 0x9c, 0xac, 0xa8, - 0xad, 0xa4, 0x20, 0x31, 0x00, 0x00, 0x20, 0x41, 0x12, 0xa8, 0x08, 0x0c, - 0xb6, 0x91, 0x01, 0x30, 0x00, 0xfe, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0xbb, 0x5c, 0x0c, 0xb8, 0x2b, 0x78, - 0x00, 0xf6, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0xfe, - 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0x16, 0x2f, 0x00, 0x60, 0x12, 0x60, 0x17, - 0x00, 0x00, 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x0c, - 0x67, 0x26, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0xce, - 0x08, 0x04, 0xb8, 0xf0, 0x21, 0x00, 0x91, 0xb2, 0x00, 0x53, 0x1a, 0x0c, - 0x0d, 0x85, 0x91, 0xb2, 0x00, 0x40, 0x1a, 0x04, 0xb9, 0xa6, 0x00, 0x02, - 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0x8a, 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0x94, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x94, 0xb9, 0x88, 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x8a, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, 0xb9, 0x88, - 0xb9, 0x88, 0xb9, 0x94, 0xb9, 0x88, 0xb9, 0x88, 0x08, 0x0c, 0x0d, 0x85, - 0x00, 0x66, 0x00, 0xb6, 0x66, 0x10, 0x26, 0x58, 0xb8, 0xd4, 0xc0, 0x8c, - 0xb8, 0xd6, 0x00, 0xbe, 0x00, 0x6e, 0x00, 0x00, 0x60, 0x03, 0x00, 0x01, - 0x61, 0x06, 0x91, 0x86, 0x00, 0x32, 0x01, 0x18, 0x08, 0x0c, 0x96, 0x1e, - 0x00, 0x10, 0x08, 0x0c, 0x96, 0x17, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x9a, 0xb3, 0x01, 0x2e, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, - 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0xba, 0xb9, 0x94, 0xb9, 0x94, 0xb9, 0xba, - 0xb9, 0xba, 0xb9, 0xba, 0xb9, 0xba, 0xb9, 0x94, 0xb9, 0xba, 0xb9, 0x94, - 0xb9, 0xba, 0xb9, 0x94, 0xb9, 0xba, 0xb9, 0xba, 0xb9, 0xba, 0xb9, 0xba, - 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x04, 0x90, 0xb2, 0x00, 0x53, 0x1a, 0x0c, - 0x0d, 0x85, 0x91, 0xb6, 0x00, 0x13, 0x09, 0x04, 0xba, 0x91, 0x91, 0xb6, - 0x00, 0x27, 0x19, 0x04, 0xba, 0x3d, 0x08, 0x0c, 0x99, 0xed, 0x60, 0x04, - 0x08, 0x0c, 0xd1, 0x21, 0x01, 0xb0, 0x08, 0x0c, 0xd1, 0x32, 0x01, 0xa8, - 0x90, 0x8e, 0x00, 0x21, 0x09, 0x04, 0xba, 0x3a, 0x90, 0x8e, 0x00, 0x22, - 0x11, 0x30, 0x08, 0x0c, 0xb5, 0xa8, 0x09, 0x04, 0xba, 0x36, 0x08, 0x04, - 0xba, 0x37, 0x90, 0x8e, 0x00, 0x3d, 0x09, 0x04, 0xba, 0x3a, 0x08, 0x04, - 0xba, 0x30, 0x08, 0x0c, 0x33, 0x44, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x66, 0xfa, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0xa0, 0x00, 0xbe, - 0x08, 0x0c, 0xbb, 0x5c, 0x91, 0x86, 0x00, 0x7e, 0x11, 0x48, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x14, 0xc2, 0x85, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x08, - 0xc2, 0xad, 0x22, 0x02, 0x08, 0x0c, 0xac, 0xfc, 0x00, 0x36, 0x00, 0x26, - 0x20, 0x19, 0x00, 0x28, 0x21, 0x10, 0x08, 0x0c, 0xed, 0xee, 0x00, 0x2e, - 0x00, 0x3e, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x21, 0x10, 0x20, 0x19, - 0x00, 0x28, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, - 0x96, 0x6d, 0x60, 0x10, 0x00, 0xb6, 0x90, 0x5d, 0x01, 0x00, 0x00, 0xbe, - 0x2c, 0x08, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0x1e, 0x08, 0x0c, 0xad, 0x18, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0x16, - 0x08, 0x0c, 0xd3, 0xae, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x1e, 0x08, 0x0c, - 0x34, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x30, 0x08, 0x0c, 0xd3, 0xae, - 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, 0x08, 0x0c, - 0xbb, 0x5c, 0x0c, 0xb0, 0x08, 0x0c, 0xbb, 0x98, 0x0c, 0x98, 0x91, 0x86, - 0x00, 0x15, 0x01, 0x18, 0x91, 0x86, 0x00, 0x16, 0x11, 0x40, 0x08, 0x0c, - 0xaf, 0x61, 0x0d, 0x80, 0x90, 0x86, 0x00, 0x02, 0x09, 0x04, 0xbb, 0xa3, - 0x0c, 0x58, 0x91, 0x86, 0x00, 0x14, 0x1d, 0x40, 0x08, 0x0c, 0x99, 0xed, - 0x60, 0x04, 0x90, 0x8e, 0x00, 0x22, 0x11, 0x18, 0x08, 0x0c, 0xb5, 0xa8, - 0x09, 0xf8, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x08, 0x0c, - 0xd1, 0x21, 0x11, 0x90, 0x08, 0x0c, 0x33, 0x44, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb9, 0xa0, 0x00, 0xbe, 0x08, 0x0c, 0xbb, 0x5c, 0x91, 0x86, - 0x00, 0x7e, 0x11, 0x28, 0x20, 0x01, 0x18, 0x37, 0x20, 0x0c, 0xc1, 0x85, - 0x21, 0x02, 0x08, 0x00, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x20, 0x08, 0x0c, - 0xbb, 0x5c, 0x08, 0x04, 0xba, 0x30, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x32, - 0x11, 0x60, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x9e, 0x20, 0x79, - 0x00, 0x00, 0x08, 0x0c, 0x36, 0xbf, 0x00, 0xfe, 0x00, 0xee, 0x08, 0x04, - 0xba, 0x30, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x21, 0x0d, 0x40, 0x90, 0x8e, - 0x00, 0x22, 0x09, 0x0c, 0xbb, 0x5c, 0x08, 0x04, 0xba, 0x30, 0x90, 0xb2, - 0x00, 0x40, 0x1a, 0x04, 0xbb, 0x3c, 0x20, 0x08, 0x00, 0x02, 0xba, 0xd9, - 0xba, 0xda, 0xba, 0xdd, 0xba, 0xe0, 0xba, 0xe3, 0xba, 0xf0, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xf3, - 0xba, 0xfe, 0xba, 0xd7, 0xba, 0xff, 0xba, 0xfe, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xfe, 0xba, 0xfe, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xd7, 0xbb, 0x27, 0xba, 0xfe, 0xba, 0xd7, 0xba, 0xfa, 0xba, 0xd7, - 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xfb, 0xba, 0xd7, 0xba, 0xd7, 0xba, 0xd7, - 0xba, 0xfe, 0xbb, 0x22, 0xba, 0xd7, 0x08, 0x0c, 0x0d, 0x85, 0x04, 0x20, - 0x20, 0x01, 0x00, 0x0b, 0x04, 0x48, 0x20, 0x01, 0x00, 0x03, 0x04, 0x30, - 0x20, 0x01, 0x00, 0x05, 0x04, 0x18, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0x04, 0x00, 0xbe, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x00, - 0x11, 0xd8, 0x20, 0x01, 0x00, 0x01, 0x00, 0xb0, 0x20, 0x01, 0x00, 0x09, - 0x00, 0x98, 0x60, 0x03, 0x00, 0x05, 0x08, 0x0c, 0xd6, 0x5d, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x58, 0x00, 0x18, 0x00, 0x10, 0x08, 0x0c, 0x66, 0xfa, - 0x04, 0xb8, 0x08, 0x0c, 0xd6, 0x5d, 0x60, 0x03, 0x00, 0x04, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x05, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x02, - 0x00, 0x36, 0x20, 0x19, 0x18, 0x52, 0x23, 0x04, 0x90, 0x84, 0xff, 0x00, - 0x11, 0x20, 0x20, 0x01, 0x19, 0x86, 0x20, 0x1c, 0x00, 0x40, 0x80, 0x07, - 0x90, 0x9a, 0x00, 0x04, 0x0e, 0xc0, 0x80, 0x03, 0x80, 0x1b, 0x83, 0x1b, - 0x93, 0x18, 0x63, 0x1a, 0x00, 0x3e, 0x08, 0x0c, 0x9a, 0xb3, 0x0c, 0x18, - 0x08, 0x0c, 0xd3, 0xae, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0xf0, 0x00, 0xe6, - 0x00, 0xf6, 0x20, 0x71, 0x18, 0x9e, 0x20, 0x79, 0x00, 0x00, 0x08, 0x0c, - 0x36, 0xbf, 0x00, 0xfe, 0x00, 0xee, 0x08, 0x0c, 0x99, 0xed, 0x08, 0x0c, - 0xb1, 0x6c, 0x08, 0x78, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0xd6, 0x5d, - 0x08, 0x04, 0x9a, 0xb3, 0x26, 0x00, 0x20, 0x08, 0x00, 0x02, 0xbb, 0x53, - 0xbb, 0x36, 0xbb, 0x51, 0xbb, 0x36, 0xbb, 0x36, 0xbb, 0x51, 0xbb, 0x51, - 0xbb, 0x51, 0xbb, 0x51, 0xbb, 0x36, 0xbb, 0x51, 0xbb, 0x36, 0xbb, 0x51, - 0xbb, 0x36, 0xbb, 0x51, 0xbb, 0x51, 0xbb, 0x51, 0xbb, 0x51, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0x70, 0x12, - 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x96, - 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0xcf, 0x1b, 0x05, 0x68, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x64, 0x90, 0x86, 0x01, 0x39, 0x11, 0xa8, 0xa8, 0x94, - 0x90, 0x86, 0x00, 0x56, 0x11, 0x48, 0x08, 0x0c, 0x55, 0xcc, 0x01, 0x30, - 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x00, 0x28, - 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x05, 0x08, 0x0c, - 0xd5, 0x1f, 0x00, 0x90, 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x78, 0xa8, 0x07, - 0x00, 0x00, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x21, 0x01, 0x68, - 0x90, 0x8e, 0x00, 0x3d, 0x01, 0x50, 0x00, 0x1e, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x33, 0x01, 0x00, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x9e, 0x00, 0xee, - 0x00, 0x05, 0x00, 0x1e, 0x00, 0x09, 0x0c, 0xc0, 0x00, 0x96, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x23, - 0x80, 0x01, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xb6, 0x66, 0x10, 0x26, 0x58, - 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0xb2, 0x00, 0x0c, 0x1a, 0x0c, - 0x0d, 0x85, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x4d, 0x11, 0x20, 0x08, 0x0c, - 0xd4, 0x3e, 0x08, 0x04, 0xbc, 0x28, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x43, - 0x11, 0x20, 0x08, 0x0c, 0xd4, 0x87, 0x08, 0x04, 0xbc, 0x28, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x4b, 0x11, 0x20, 0x08, 0x0c, 0xd4, 0xb3, 0x08, 0x04, - 0xbc, 0x28, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x33, 0x11, 0x20, 0x08, 0x0c, - 0xd3, 0xd0, 0x08, 0x04, 0xbc, 0x28, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x28, - 0x11, 0x20, 0x08, 0x0c, 0xd1, 0x70, 0x08, 0x04, 0xbc, 0x28, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x29, 0x11, 0x20, 0x08, 0x0c, 0xd1, 0xb1, 0x08, 0x04, - 0xbc, 0x28, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x1f, 0x11, 0x20, 0x08, 0x0c, - 0xb5, 0x4d, 0x08, 0x04, 0xbc, 0x28, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x00, - 0x11, 0x18, 0x08, 0x0c, 0xb8, 0xb2, 0x04, 0xe0, 0x66, 0x04, 0x96, 0xb6, - 0x00, 0x22, 0x11, 0x18, 0x08, 0x0c, 0xb5, 0x89, 0x04, 0xa8, 0x66, 0x04, - 0x96, 0xb6, 0x00, 0x35, 0x11, 0x18, 0x08, 0x0c, 0xb6, 0xaf, 0x04, 0x70, - 0x66, 0x04, 0x96, 0xb6, 0x00, 0x39, 0x11, 0x18, 0x08, 0x0c, 0xb8, 0x47, - 0x04, 0x38, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x3d, 0x11, 0x18, 0x08, 0x0c, - 0xb5, 0xc1, 0x04, 0x00, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x44, 0x11, 0x18, - 0x08, 0x0c, 0xb5, 0xfd, 0x00, 0xc8, 0x66, 0x04, 0x96, 0xb6, 0x00, 0x49, - 0x11, 0x18, 0x08, 0x0c, 0xb6, 0x3e, 0x00, 0x90, 0x66, 0x04, 0x96, 0xb6, - 0x00, 0x41, 0x11, 0x18, 0x08, 0x0c, 0xb6, 0x28, 0x00, 0x58, 0x91, 0xb6, - 0x00, 0x15, 0x11, 0x10, 0x00, 0x63, 0x00, 0x30, 0x91, 0xb6, 0x00, 0x16, - 0x11, 0x28, 0x00, 0xbe, 0x08, 0x04, 0xbf, 0x34, 0x00, 0xbe, 0x00, 0x05, - 0x08, 0x0c, 0xb2, 0x27, 0x0c, 0xd8, 0xbc, 0x45, 0xbc, 0x53, 0xbc, 0x45, - 0xbc, 0x9a, 0xbc, 0x45, 0xbe, 0x51, 0xbf, 0x41, 0xbc, 0x45, 0xbc, 0x45, - 0xbf, 0x0a, 0xbc, 0x45, 0xbf, 0x20, 0x00, 0x96, 0x60, 0x1f, 0x00, 0x00, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x00, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, - 0x00, 0x9e, 0x08, 0x04, 0xb1, 0x6c, 0xa0, 0x01, 0xa0, 0x01, 0x00, 0x05, - 0x66, 0x04, 0x96, 0xb6, 0x00, 0x04, 0x11, 0x30, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0x66, 0xe6, 0x08, 0x04, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x70, 0x90, 0x90, 0x86, 0x00, 0x74, 0x15, 0x40, - 0x08, 0x0c, 0xe7, 0x2e, 0x11, 0xb0, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0x70, 0x30, 0xd0, 0x8c, 0x01, 0x28, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x10, - 0xc0, 0xc5, 0xb8, 0x02, 0x00, 0xf9, 0x00, 0xbe, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x98, 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x0c, - 0x33, 0x44, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x20, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x0c, 0xbe, 0x21, 0x00, 0xee, 0x00, 0x05, 0x00, 0xd6, 0xb8, 0x00, - 0xd0, 0x84, 0x01, 0x60, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x69, - 0x18, 0x47, 0x68, 0x04, 0xd0, 0xa4, 0x01, 0x20, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x67, 0x26, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x96, - 0x00, 0xd6, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x74, - 0x19, 0x04, 0xbd, 0xf6, 0x60, 0x10, 0x20, 0x58, 0xba, 0xa0, 0x92, 0x86, - 0x00, 0x7e, 0x11, 0x20, 0x08, 0x0c, 0xc0, 0x90, 0x08, 0x04, 0xbd, 0x63, - 0x20, 0x01, 0x18, 0x0d, 0x20, 0x04, 0xd0, 0x8c, 0x09, 0x04, 0xbd, 0x05, - 0x00, 0xd6, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0xa0, 0x00, 0x26, 0x20, 0x11, - 0x00, 0x10, 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, 0x09, 0x04, 0xbd, 0x04, - 0x08, 0x0c, 0x58, 0x54, 0x15, 0x98, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, - 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, 0x04, 0x50, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb9, 0x10, 0x00, 0xbe, 0x91, 0x86, - 0x00, 0xff, 0x05, 0x80, 0x00, 0x26, 0x20, 0x11, 0x80, 0x08, 0x08, 0x0c, - 0x6c, 0x35, 0x00, 0x2e, 0x05, 0x48, 0x60, 0x14, 0x90, 0x05, 0x09, 0x0c, - 0x0d, 0x85, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x39, 0x11, 0x40, 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x20, 0x11, - 0x40, 0x09, 0x08, 0x0c, 0xd5, 0x1f, 0x00, 0x40, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, - 0x60, 0x10, 0x20, 0x58, 0xb9, 0xa0, 0x00, 0x16, 0x08, 0x0c, 0x33, 0x44, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x1e, 0x08, 0x0c, 0x34, 0x1e, 0x00, 0xde, - 0x08, 0x04, 0xbd, 0xfb, 0x00, 0xde, 0x08, 0x0c, 0xc0, 0x85, 0x60, 0x10, - 0x20, 0x58, 0xba, 0xa0, 0x92, 0x86, 0x00, 0x80, 0x15, 0x10, 0x60, 0x14, - 0x90, 0x05, 0x01, 0xa8, 0x20, 0x48, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, - 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, 0xd5, 0x1f, 0x00, 0x30, 0xa8, 0x07, - 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0x02, 0x00, 0x20, 0x01, - 0x00, 0x06, 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, - 0xb1, 0x6c, 0x08, 0x04, 0xbd, 0xfb, 0x08, 0x0c, 0xbe, 0x09, 0x60, 0x14, - 0x90, 0x05, 0x01, 0x90, 0x20, 0x48, 0xa8, 0x68, 0xd0, 0xf4, 0x01, 0xe8, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x1d, 0x08, - 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, - 0xd5, 0x1f, 0x08, 0xf8, 0x08, 0x0c, 0xbd, 0xff, 0x01, 0x60, 0x90, 0x06, - 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x67, 0x26, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, 0x08, 0xa0, 0x20, 0x01, - 0x00, 0x04, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x03, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x08, 0x04, - 0xbd, 0xfb, 0xb8, 0x5c, 0xd0, 0xe4, 0x01, 0x78, 0x08, 0x0c, 0xd3, 0x48, - 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x18, 0xd0, 0xdc, 0x19, 0x04, 0xbd, 0x25, - 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, 0xc0, 0xad, 0x20, 0x12, 0x08, 0x04, - 0xbd, 0x25, 0x08, 0x0c, 0xd3, 0x89, 0x20, 0x11, 0x18, 0x37, 0x22, 0x04, - 0xc0, 0xa5, 0x20, 0x12, 0x00, 0x06, 0x08, 0x0c, 0xe9, 0x05, 0x00, 0x0e, - 0x19, 0x04, 0xbd, 0x25, 0xc0, 0xb5, 0x20, 0x12, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x66, 0xfa, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x00, 0xc6, - 0x20, 0x01, 0x18, 0x0f, 0x20, 0x04, 0xd0, 0x9c, 0x05, 0x20, 0x00, 0xf6, - 0x20, 0x79, 0x01, 0x00, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x70, 0x0c, - 0x90, 0x84, 0x00, 0xff, 0x78, 0xe6, 0x70, 0x7e, 0x70, 0x10, 0x78, 0xea, - 0x70, 0x82, 0x90, 0x8c, 0x00, 0xff, 0x00, 0xee, 0x78, 0x0c, 0xc0, 0xb5, - 0x78, 0x0e, 0x00, 0xfe, 0x08, 0x0c, 0x26, 0xd5, 0x00, 0xf6, 0x21, 0x00, - 0x90, 0x0e, 0x08, 0x0c, 0x26, 0x8c, 0x79, 0x5e, 0x00, 0xfe, 0x91, 0x86, - 0x00, 0x81, 0x01, 0xf0, 0x20, 0x09, 0x00, 0x81, 0x00, 0xe0, 0x20, 0x09, - 0x00, 0xef, 0x00, 0xf6, 0x20, 0x79, 0x01, 0x00, 0x79, 0xea, 0x78, 0xe7, - 0x00, 0x00, 0x79, 0x32, 0x79, 0x36, 0x78, 0x0c, 0xc0, 0xb5, 0x78, 0x0e, - 0x00, 0xfe, 0x08, 0x0c, 0x26, 0xd5, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, - 0x79, 0x82, 0x21, 0x00, 0x90, 0x0e, 0x79, 0x7e, 0x08, 0x0c, 0x26, 0x8c, - 0x79, 0x5e, 0x00, 0xfe, 0x81, 0x08, 0x08, 0x0c, 0x67, 0x49, 0x2b, 0x00, - 0x00, 0xce, 0x19, 0x04, 0xbd, 0x25, 0x60, 0x12, 0x20, 0x09, 0x18, 0x0f, - 0x21, 0x0c, 0xd1, 0x9c, 0x01, 0x50, 0x20, 0x09, 0x02, 0x7c, 0x21, 0x0c, - 0x91, 0x8c, 0x00, 0xff, 0xb9, 0x12, 0x20, 0x09, 0x02, 0x7d, 0x21, 0x0c, - 0xb9, 0x16, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x23, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x28, 0x08, 0x0c, 0xbb, 0x5c, - 0x20, 0x01, 0x00, 0x01, 0x04, 0x31, 0x00, 0xde, 0x00, 0x9e, 0x00, 0xbe, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0xa4, 0x01, 0x20, - 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0xd0, 0xac, 0x00, 0x05, 0x00, 0xe6, - 0x08, 0x0c, 0xee, 0x47, 0x01, 0x90, 0x20, 0x71, 0x02, 0x60, 0x71, 0x08, - 0x72, 0x0c, 0x91, 0x8c, 0x00, 0xff, 0x11, 0x18, 0x92, 0x84, 0xff, 0x00, - 0x01, 0x40, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x84, 0xff, 0x80, - 0x11, 0x10, 0xb9, 0x12, 0xba, 0x16, 0x00, 0xee, 0x00, 0x05, 0x20, 0x30, - 0x90, 0x05, 0x01, 0x58, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, - 0x08, 0x0c, 0x58, 0x54, 0x11, 0x20, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, - 0x67, 0x26, 0x26, 0x00, 0x90, 0x05, 0x11, 0xb0, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x68, 0x00, 0x9e, 0xd0, 0xfc, 0x11, 0x78, 0x00, 0x36, - 0x00, 0x46, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, 0x00, 0xbe, - 0x20, 0x21, 0x00, 0x04, 0x20, 0x11, 0x80, 0x14, 0x08, 0x0c, 0x4c, 0xa1, - 0x00, 0x4e, 0x00, 0x3e, 0x08, 0x0c, 0x33, 0x44, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x0a, 0x11, 0x08, 0x00, 0x05, 0x08, 0x04, 0xb1, 0x6c, 0x00, 0xb6, - 0x00, 0xe6, 0x00, 0x26, 0x00, 0x16, 0x20, 0x71, 0x18, 0x00, 0x70, 0x90, - 0x90, 0x86, 0x00, 0x14, 0x19, 0x04, 0xbf, 0x00, 0x20, 0x01, 0x18, 0x0d, - 0x20, 0x04, 0xd0, 0x8c, 0x09, 0x04, 0xbe, 0xb3, 0x00, 0xd6, 0x08, 0x0c, - 0x77, 0x9e, 0x01, 0xa0, 0x00, 0x26, 0x20, 0x11, 0x00, 0x10, 0x08, 0x0c, - 0x6c, 0x35, 0x00, 0x2e, 0x09, 0x04, 0xbe, 0xb2, 0x08, 0x0c, 0x58, 0x54, - 0x15, 0x98, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, 0x04, 0x50, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb9, 0x10, 0x00, 0xbe, 0x91, 0x86, 0x00, 0xff, 0x05, 0x80, - 0x00, 0x26, 0x20, 0x11, 0x80, 0x08, 0x08, 0x0c, 0x6c, 0x35, 0x00, 0x2e, - 0x05, 0x48, 0x60, 0x14, 0x90, 0x05, 0x09, 0x0c, 0x0d, 0x85, 0x20, 0x48, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, - 0x20, 0x01, 0x00, 0x30, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x09, 0x08, 0x0c, - 0xd5, 0x1f, 0x00, 0x40, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x07, 0x00, 0x00, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x33, 0xde, 0xad, 0x60, 0x10, 0x20, 0x58, - 0xb9, 0xa0, 0x00, 0x16, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x1e, 0x08, 0x0c, 0x34, 0x1e, 0x00, 0xde, 0x08, 0x04, 0xbf, 0x05, - 0x00, 0xde, 0x08, 0x0c, 0x58, 0x54, 0x11, 0x70, 0x60, 0x14, 0x90, 0x05, - 0x11, 0x58, 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, 0x20, 0x58, 0xbb, 0xa0, - 0x20, 0x21, 0x00, 0x06, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0xd6, 0x60, 0x10, 0x20, 0x58, 0x08, 0x0c, 0x68, 0x4f, 0x08, 0x0c, - 0xbc, 0x88, 0x00, 0xde, 0x08, 0x0c, 0xc1, 0x5b, 0x15, 0x88, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x90, 0x90, 0x05, 0x05, 0x60, 0x20, 0x01, 0x00, 0x06, - 0x08, 0x0c, 0x66, 0xfa, 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x01, 0xd0, - 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x11, 0x40, - 0x20, 0x01, 0x00, 0x00, 0x90, 0x0e, 0x20, 0x11, 0x40, 0x00, 0x08, 0x0c, - 0xd5, 0x1f, 0x00, 0x60, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, - 0x00, 0x29, 0x01, 0x30, 0xa8, 0x07, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x33, 0x02, 0x00, 0x00, 0x9e, 0x08, 0x0c, 0x33, 0x44, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x0a, 0x01, 0x40, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x28, - 0x08, 0x0c, 0xbb, 0x5c, 0x90, 0x06, 0x08, 0x0c, 0xbe, 0x21, 0x00, 0x1e, - 0x00, 0x2e, 0x00, 0xee, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x11, 0x18, 0x24, - 0x22, 0x04, 0x90, 0x86, 0x00, 0x14, 0x11, 0x60, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x04, 0x9a, 0xb3, 0x20, 0x01, 0x00, 0x01, - 0x08, 0x04, 0xbe, 0x21, 0x20, 0x30, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x48, 0x96, 0xb6, 0x00, 0x0b, 0x11, 0x20, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x04, 0xb1, 0x6c, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbe, 0x21, 0x00, 0x02, 0xbc, 0x45, - 0xbf, 0x4c, 0xbc, 0x45, 0xbf, 0x8f, 0xbc, 0x45, 0xc0, 0x3c, 0xbf, 0x41, - 0xbc, 0x48, 0xbc, 0x45, 0xc0, 0x50, 0xbc, 0x45, 0xc0, 0x62, 0x66, 0x04, - 0x96, 0x86, 0x00, 0x03, 0x09, 0x04, 0xbe, 0x51, 0x96, 0xb6, 0x00, 0x1e, - 0x11, 0x10, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xd6, - 0x00, 0xc6, 0x08, 0x0c, 0xc0, 0x74, 0x11, 0xa0, 0x90, 0x06, 0x08, 0x0c, - 0x66, 0xe6, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x02, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x04, 0x28, - 0x20, 0x09, 0x02, 0x6e, 0x21, 0x04, 0x90, 0x86, 0x00, 0x09, 0x11, 0x60, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, - 0x01, 0x80, 0x80, 0x01, 0xb8, 0x42, 0x60, 0x1b, 0x00, 0x0a, 0x00, 0x98, - 0x20, 0x09, 0x02, 0x6f, 0x21, 0x04, 0x90, 0x84, 0xff, 0x00, 0x90, 0x8e, - 0x19, 0x00, 0x01, 0x58, 0x90, 0x8e, 0x1e, 0x00, 0x09, 0x90, 0x08, 0x0c, - 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, - 0xbe, 0x21, 0x00, 0xce, 0x00, 0xde, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x96, - 0x00, 0xb6, 0x00, 0x26, 0x90, 0x16, 0x08, 0x0c, 0xc0, 0x82, 0x00, 0xd6, - 0x20, 0x69, 0x19, 0x7c, 0x2d, 0x04, 0x90, 0x05, 0x01, 0x68, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, 0x11, 0x38, 0x20, 0x69, - 0x18, 0x20, 0x2d, 0x04, 0x80, 0x00, 0x20, 0x6a, 0x00, 0xde, 0x00, 0x10, - 0x00, 0xde, 0x00, 0x88, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x02, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x08, 0x04, - 0xc0, 0x0c, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xb0, 0x60, 0x14, 0x20, 0x48, - 0xa8, 0x64, 0x20, 0x10, 0x90, 0x86, 0x01, 0x39, 0x11, 0x38, 0x60, 0x07, - 0x00, 0x16, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, 0xd5, 0x7c, 0x00, 0xb0, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x64, 0xd0, 0xfc, 0x01, 0x18, 0x20, 0x01, - 0x00, 0x01, 0x0c, 0xa8, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xdc, - 0x01, 0x48, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x05, 0x11, 0x10, 0x90, 0x06, 0x0c, 0x38, 0x08, 0x0c, 0xbb, 0x5c, - 0x20, 0x09, 0x02, 0x6e, 0x21, 0x34, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, - 0x00, 0x05, 0x05, 0x20, 0x96, 0x86, 0x00, 0x0b, 0x01, 0xc8, 0x20, 0x09, - 0x02, 0x6f, 0x21, 0x04, 0x90, 0x84, 0xff, 0x00, 0x11, 0x18, 0x96, 0x86, - 0x00, 0x09, 0x01, 0xc0, 0x90, 0x86, 0x19, 0x00, 0x11, 0x68, 0x96, 0x86, - 0x00, 0x09, 0x01, 0x90, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0xfa, - 0x20, 0x01, 0x00, 0x28, 0x60, 0x1a, 0x60, 0x07, 0x00, 0x52, 0x00, 0x20, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xbe, 0x21, 0x00, 0x2e, 0x00, 0xbe, - 0x00, 0x9e, 0x00, 0x05, 0x92, 0x86, 0x01, 0x39, 0x01, 0x60, 0x60, 0x14, - 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x40, 0xa8, 0x64, 0x90, 0x86, - 0x01, 0x39, 0x01, 0x18, 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x08, 0x0c, 0x40, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, - 0x01, 0x38, 0x80, 0x01, 0xb8, 0x42, 0x60, 0x1b, 0x00, 0x0a, 0x60, 0x07, - 0x00, 0x16, 0x08, 0xf0, 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x7e, 0x11, 0x38, - 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x61, 0x30, 0x00, 0xee, - 0x00, 0x10, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x60, 0x20, 0x01, 0x00, 0x04, - 0x08, 0x0c, 0x66, 0xfa, 0x08, 0x0c, 0xc0, 0x82, 0x11, 0x40, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x03, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x04, - 0x9a, 0xb3, 0x08, 0x0c, 0xbb, 0x5c, 0x90, 0x06, 0x08, 0x04, 0xbe, 0x21, - 0x04, 0x89, 0x11, 0x60, 0x20, 0x01, 0x00, 0x08, 0x08, 0x0c, 0x66, 0xfa, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x05, 0x08, 0x0c, 0x96, 0x1e, - 0x08, 0x04, 0x9a, 0xb3, 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbe, 0x21, - 0x00, 0xf9, 0x11, 0x60, 0x20, 0x01, 0x00, 0x0a, 0x08, 0x0c, 0x66, 0xfa, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, - 0x08, 0x04, 0x9a, 0xb3, 0x20, 0x01, 0x00, 0x01, 0x08, 0x04, 0xbe, 0x21, - 0x20, 0x09, 0x02, 0x6e, 0x21, 0x04, 0x90, 0x86, 0x00, 0x03, 0x11, 0x38, - 0x20, 0x09, 0x02, 0x6f, 0x21, 0x04, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, - 0x2a, 0x00, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0xc6, 0x00, 0x16, 0x61, 0x10, 0x21, 0x58, 0x08, 0x0c, 0x67, 0xc3, - 0x00, 0x1e, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0x36, 0x00, 0x16, 0x60, 0x10, 0x20, 0x58, - 0x20, 0x09, 0x18, 0x37, 0x21, 0x04, 0x90, 0x85, 0x00, 0x03, 0x20, 0x0a, - 0x08, 0x0c, 0xc1, 0x2d, 0x05, 0x60, 0x20, 0x09, 0x18, 0x37, 0x21, 0x04, - 0xc0, 0xcd, 0x20, 0x0a, 0x08, 0x0c, 0x6c, 0x0d, 0x01, 0x58, 0x90, 0x06, - 0x20, 0x20, 0x20, 0x09, 0x00, 0x2a, 0x08, 0x0c, 0xea, 0x8d, 0x20, 0x01, - 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0x95, 0x21, 0x02, 0x20, 0x19, 0x00, 0x2a, - 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x32, 0xda, 0x00, 0xe6, 0x20, 0x71, - 0x18, 0x00, 0x08, 0x0c, 0x30, 0xbf, 0x00, 0xee, 0x00, 0xc6, 0x01, 0x56, - 0x20, 0xa9, 0x07, 0x81, 0x20, 0x09, 0x00, 0x7f, 0x08, 0x0c, 0x34, 0x1e, - 0x81, 0x08, 0x1f, 0x04, 0xc0, 0xc6, 0x01, 0x5e, 0x00, 0xce, 0x08, 0x0c, - 0xc0, 0x85, 0x20, 0x71, 0x02, 0x60, 0x20, 0x79, 0x02, 0x00, 0x78, 0x17, - 0x00, 0x01, 0x20, 0x01, 0x18, 0x37, 0x20, 0x0c, 0xc1, 0xc5, 0x70, 0x18, - 0xd0, 0xfc, 0x01, 0x10, 0xd0, 0xdc, 0x01, 0x18, 0x70, 0x38, 0xd0, 0xdc, - 0x11, 0x08, 0xc1, 0xc4, 0x78, 0x17, 0x00, 0x00, 0x20, 0x01, 0x18, 0x37, - 0x21, 0x02, 0x91, 0x84, 0x00, 0x50, 0x90, 0x86, 0x00, 0x50, 0x05, 0xd0, - 0x20, 0x79, 0x01, 0x00, 0x2e, 0x04, 0x90, 0x84, 0x00, 0xff, 0x20, 0x69, - 0x18, 0x1f, 0x20, 0x6a, 0x78, 0xe6, 0x00, 0x06, 0x8e, 0x70, 0x2e, 0x04, - 0x20, 0x69, 0x18, 0x20, 0x20, 0x6a, 0x78, 0xea, 0x78, 0x32, 0x78, 0x36, - 0x20, 0x10, 0x90, 0x84, 0xff, 0x00, 0x00, 0x1e, 0x91, 0x05, 0x20, 0x09, - 0x18, 0x2c, 0x20, 0x0a, 0x22, 0x00, 0x90, 0x84, 0x00, 0xff, 0x20, 0x08, - 0x08, 0x0c, 0x26, 0xd5, 0x08, 0x0c, 0x77, 0x9e, 0x01, 0x70, 0x20, 0x71, - 0x02, 0x60, 0x20, 0x69, 0x19, 0x82, 0x70, 0x48, 0x20, 0x6a, 0x70, 0x4c, - 0x68, 0x06, 0x70, 0x50, 0x68, 0x0a, 0x70, 0x54, 0x68, 0x0e, 0x08, 0x0c, - 0xd3, 0x48, 0x00, 0x40, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0xfa, - 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x1e, 0x00, 0x3e, - 0x00, 0xde, 0x00, 0xee, 0x00, 0xfe, 0x00, 0xbe, 0x00, 0x05, 0x00, 0x96, - 0x00, 0x26, 0x00, 0x36, 0x00, 0xe6, 0x01, 0x56, 0x20, 0x19, 0x18, 0x2c, - 0x23, 0x1c, 0x83, 0xff, 0x01, 0xf0, 0x20, 0x71, 0x02, 0x60, 0x72, 0x00, - 0x92, 0x94, 0x00, 0xff, 0x70, 0x04, 0x90, 0x84, 0xff, 0x00, 0x92, 0x05, - 0x93, 0x06, 0x11, 0x98, 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, - 0x2b, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, 0x11, 0x48, - 0x20, 0x11, 0x02, 0x7a, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x00, 0x06, - 0x08, 0x0c, 0xc2, 0x22, 0x11, 0x00, 0x01, 0x5e, 0x00, 0xee, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, - 0x70, 0x34, 0x90, 0x86, 0x00, 0x14, 0x11, 0xa8, 0x70, 0x38, 0x90, 0x86, - 0x08, 0x00, 0x11, 0x88, 0x70, 0x3c, 0xd0, 0xec, 0x01, 0x60, 0x90, 0x84, - 0x0f, 0x00, 0x90, 0x86, 0x01, 0x00, 0x11, 0x38, 0x70, 0x54, 0xd0, 0xa4, - 0x11, 0x10, 0xd0, 0xac, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, - 0x00, 0x01, 0x00, 0xee, 0x00, 0x05, 0x00, 0xe6, 0x00, 0x96, 0x00, 0xc6, - 0x00, 0x76, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, 0x00, 0x06, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, 0x19, 0xf4, 0x25, 0x2c, 0x20, 0x21, - 0x19, 0xfb, 0x24, 0x24, 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x71, 0x18, 0x00, - 0x72, 0x54, 0x70, 0x74, 0x92, 0x02, 0x1a, 0x04, 0xc1, 0xee, 0x08, 0x0c, - 0x8e, 0xee, 0x09, 0x04, 0xc1, 0xe7, 0x08, 0x0c, 0xea, 0xbe, 0x09, 0x04, - 0xc1, 0xe7, 0x67, 0x20, 0x97, 0x86, 0x00, 0x07, 0x09, 0x04, 0xc1, 0xe7, - 0x25, 0x00, 0x9c, 0x06, 0x09, 0x04, 0xc1, 0xe7, 0x24, 0x00, 0x9c, 0x06, - 0x09, 0x04, 0xc1, 0xe7, 0x3e, 0x08, 0x91, 0x86, 0x00, 0x02, 0x11, 0x48, - 0x60, 0x10, 0x90, 0x05, 0x01, 0x30, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, - 0x00, 0xbe, 0xd0, 0xbc, 0x15, 0x90, 0x00, 0xc6, 0x60, 0x43, 0xff, 0xff, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x10, 0x08, 0x0c, 0x1a, 0xd3, - 0x97, 0x86, 0x00, 0x0a, 0x01, 0x48, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x30, - 0x00, 0xce, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xe8, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xa8, 0x97, 0x86, - 0x00, 0x03, 0x15, 0x30, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7c, 0xd0, 0xcc, - 0x01, 0x30, 0x00, 0x96, 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, - 0x00, 0x9e, 0xab, 0x7a, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x06, - 0x08, 0x0c, 0xd1, 0x0c, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, 0x9c, 0xe0, - 0x00, 0x1c, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x10, 0x08, 0x04, 0xc1, 0x8e, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x7e, - 0x00, 0xce, 0x00, 0x9e, 0x00, 0xee, 0x00, 0x05, 0x97, 0x86, 0x00, 0x06, - 0x11, 0x18, 0x08, 0x0c, 0xea, 0x30, 0x0c, 0x30, 0x97, 0x86, 0x00, 0x09, - 0x11, 0x48, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x0d, 0x08, 0x20, 0x09, - 0x00, 0x4c, 0x08, 0x0c, 0xb2, 0x0a, 0x08, 0xe0, 0x97, 0x86, 0x00, 0x0a, - 0x09, 0x80, 0x08, 0x20, 0x22, 0x0c, 0x23, 0x04, 0x91, 0x06, 0x11, 0x30, - 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, 0xc2, 0x0e, 0x90, 0x06, 0x00, 0x05, - 0x23, 0x04, 0x91, 0x02, 0x02, 0x18, 0x20, 0x01, 0x00, 0x01, 0x00, 0x08, - 0x90, 0x06, 0x91, 0x8d, 0x00, 0x01, 0x00, 0x05, 0x01, 0x36, 0x01, 0xc6, - 0x00, 0x16, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0x8c, 0x00, 0x3f, - 0x21, 0xe0, 0x90, 0x84, 0xff, 0xc0, 0x93, 0x00, 0x20, 0x98, 0x35, 0x18, - 0x20, 0xa9, 0x00, 0x01, 0x22, 0x0c, 0x40, 0x02, 0x91, 0x0e, 0x11, 0x40, - 0x82, 0x10, 0x83, 0x19, 0x1d, 0xc8, 0x90, 0x06, 0x00, 0x1e, 0x01, 0xce, - 0x01, 0x3e, 0x00, 0x05, 0x22, 0x0c, 0x91, 0x02, 0x02, 0x18, 0x20, 0x01, - 0x00, 0x01, 0x00, 0x10, 0x20, 0x01, 0x00, 0x00, 0x91, 0x8d, 0x00, 0x01, - 0x00, 0x1e, 0x01, 0xce, 0x01, 0x3e, 0x00, 0x05, 0x22, 0x0c, 0x81, 0x0f, - 0x23, 0x04, 0x91, 0x06, 0x11, 0x30, 0x82, 0x10, 0x83, 0x18, 0x1f, 0x04, - 0xc2, 0x4c, 0x90, 0x06, 0x00, 0x05, 0x91, 0x8d, 0x00, 0x01, 0x00, 0x05, - 0x60, 0x04, 0x90, 0x8a, 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0x85, 0x08, 0x0c, - 0xd1, 0x21, 0x01, 0x20, 0x08, 0x0c, 0xd1, 0x32, 0x01, 0x58, 0x00, 0x28, - 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, 0xd1, 0x32, 0x01, 0x28, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x0c, 0xbb, 0x5c, - 0x0c, 0xc0, 0x91, 0x82, 0x00, 0x57, 0x12, 0x20, 0x91, 0x82, 0x00, 0x40, - 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, - 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, - 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x94, 0xc2, 0x94, 0xc2, 0x94, 0xc2, 0x94, - 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x92, 0xc2, 0x94, 0xc2, 0x92, 0xc2, 0x92, - 0xc2, 0x92, 0xc2, 0x92, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x0b, 0xff, 0xff, - 0x60, 0x03, 0x00, 0x0f, 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0xd6, 0x5d, 0x20, 0x09, 0x80, 0x00, 0x08, 0x0c, 0x96, 0x17, - 0x01, 0x2e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x28, 0x60, 0x04, - 0x90, 0x82, 0x00, 0x40, 0x08, 0x04, 0xc3, 0x1c, 0x91, 0x86, 0x00, 0x27, - 0x15, 0x20, 0x08, 0x0c, 0x99, 0xed, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, - 0xd6, 0x5a, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0x98, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, - 0x00, 0x68, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x29, 0xa8, 0x77, - 0x00, 0x00, 0xa9, 0x7c, 0xc1, 0xc5, 0xa9, 0x7e, 0x08, 0x0c, 0x70, 0x12, - 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x04, - 0x9a, 0xb3, 0x91, 0x86, 0x00, 0x14, 0x11, 0x20, 0x60, 0x04, 0x90, 0x82, - 0x00, 0x40, 0x00, 0x30, 0x91, 0x86, 0x00, 0x53, 0x01, 0x10, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x05, 0x00, 0x02, 0xc2, 0xfa, 0xc2, 0xf8, 0xc2, 0xf8, - 0xc2, 0xf8, 0xc2, 0xf8, 0xc2, 0xf8, 0xc2, 0xf8, 0xc2, 0xf8, 0xc2, 0xf8, - 0xc2, 0xf8, 0xc2, 0xf8, 0xc3, 0x13, 0xc3, 0x13, 0xc3, 0x13, 0xc3, 0x13, - 0xc2, 0xf8, 0xc3, 0x13, 0xc2, 0xf8, 0xc3, 0x13, 0xc2, 0xf8, 0xc2, 0xf8, - 0xc2, 0xf8, 0xc2, 0xf8, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x99, 0xed, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x68, - 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x06, 0xa8, 0x77, 0x00, 0x00, - 0xa8, 0x80, 0xc0, 0xec, 0xa8, 0x82, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, - 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xd1, 0x32, 0x09, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x00, 0x02, 0xc3, 0x36, 0xc3, 0x34, 0xc3, 0x34, - 0xc3, 0x34, 0xc3, 0x34, 0xc3, 0x34, 0xc3, 0x34, 0xc3, 0x34, 0xc3, 0x34, - 0xc3, 0x34, 0xc3, 0x34, 0xc3, 0x38, 0xc3, 0x38, 0xc3, 0x38, 0xc3, 0x38, - 0xc3, 0x34, 0xc3, 0x3a, 0xc3, 0x34, 0xc3, 0x38, 0xc3, 0x34, 0xc3, 0x34, - 0xc3, 0x34, 0xc3, 0x34, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x04, 0x9a, 0xb3, - 0x91, 0x82, 0x00, 0x57, 0x12, 0x20, 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, - 0x00, 0x0a, 0x00, 0x05, 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, - 0xc3, 0x5d, 0xc3, 0x96, 0xc4, 0x88, 0xc3, 0x5d, 0xc4, 0x94, 0xc3, 0x5d, - 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, - 0xc3, 0x5d, 0xc3, 0x5d, 0xc3, 0x5d, 0xc4, 0x94, 0xc3, 0x5f, 0xc3, 0x5d, - 0xc4, 0x92, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0xb6, 0x00, 0x96, 0x61, 0x14, - 0x21, 0x48, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xd0, 0xbc, 0x15, 0x08, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x77, 0x00, 0x00, - 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, - 0x19, 0x0c, 0xc5, 0x19, 0x08, 0x0c, 0x6e, 0x27, 0x62, 0x10, 0x22, 0x58, - 0xba, 0x3c, 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, 0xba, 0x3e, 0xb8, 0xd0, - 0x90, 0x05, 0x01, 0x10, 0x08, 0x0c, 0x68, 0xdf, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x05, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0xe0, - 0xa8, 0x38, 0xa9, 0x34, 0x91, 0x05, 0x09, 0xc0, 0xa8, 0x80, 0xd0, 0xbc, - 0x19, 0xa8, 0x08, 0x0c, 0xd2, 0x67, 0x0c, 0x80, 0x00, 0xb6, 0x00, 0x96, - 0x61, 0x14, 0x21, 0x48, 0x60, 0x1c, 0xd0, 0xfc, 0x11, 0x10, 0x76, 0x44, - 0x00, 0x08, 0x90, 0x36, 0x96, 0xb4, 0x0f, 0xff, 0x86, 0xff, 0x15, 0x90, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xd0, 0xbc, 0x19, 0x04, 0xc4, 0x77, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xae, 0x76, 0xa8, 0x7c, - 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, - 0xc5, 0x19, 0x08, 0x0c, 0x6e, 0x27, 0x62, 0x10, 0x22, 0x58, 0xba, 0x3c, - 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, 0xba, 0x3e, 0xb8, 0xd0, 0x90, 0x05, - 0x01, 0x10, 0x08, 0x0c, 0x68, 0xdf, 0x60, 0x1c, 0xd0, 0xfc, 0x11, 0x48, - 0x70, 0x44, 0xd0, 0xe4, 0x19, 0x04, 0xc4, 0x58, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x9e, 0x00, 0xbe, 0x00, 0x05, 0x20, 0x09, 0x02, 0x11, 0x21, 0x0c, - 0x08, 0x0c, 0x0d, 0x85, 0x96, 0x8c, 0x0c, 0x00, 0x01, 0x50, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x00, 0xd0, 0xbc, 0x19, 0x04, 0xc4, 0x5c, 0x73, 0x48, - 0xab, 0x92, 0x73, 0x4c, 0xab, 0x8e, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, - 0x00, 0x02, 0x05, 0x08, 0x91, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, - 0x00, 0x1c, 0x00, 0xe8, 0xd6, 0xdc, 0x01, 0xa0, 0xa8, 0x7b, 0x00, 0x15, - 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x70, 0xa9, 0x38, 0xaa, 0x34, 0x21, 0x00, - 0x92, 0x05, 0x01, 0x48, 0x70, 0x48, 0x91, 0x06, 0x11, 0x18, 0x70, 0x4c, - 0x92, 0x06, 0x01, 0x18, 0xa9, 0x92, 0xaa, 0x8e, 0xc6, 0xdc, 0x00, 0x38, - 0xd6, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, 0xa8, 0x7b, - 0x00, 0x00, 0xa8, 0x67, 0x01, 0x03, 0xae, 0x76, 0x90, 0x1e, 0xd6, 0xc4, - 0x01, 0xd8, 0x96, 0x86, 0x01, 0x00, 0x11, 0x30, 0x70, 0x64, 0x90, 0x05, - 0x11, 0x18, 0xc6, 0xc4, 0x08, 0x04, 0xc3, 0xa2, 0x73, 0x5c, 0xab, 0x86, - 0x83, 0xff, 0x01, 0x70, 0x93, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, - 0x00, 0x08, 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, 0x00, 0x18, 0x20, 0x11, - 0x00, 0x25, 0x08, 0x0c, 0xca, 0x7b, 0x00, 0x3e, 0xd6, 0xcc, 0x09, 0x04, - 0xc3, 0xb7, 0x71, 0x54, 0xa9, 0x8a, 0x81, 0xff, 0x09, 0x04, 0xc3, 0xb7, - 0x91, 0x92, 0x00, 0x21, 0x12, 0x78, 0x83, 0x04, 0x90, 0x98, 0x00, 0x18, - 0x20, 0x11, 0x00, 0x29, 0x08, 0x0c, 0xca, 0x7b, 0x20, 0x11, 0x02, 0x05, - 0x20, 0x13, 0x00, 0x00, 0x08, 0x0c, 0xd5, 0xe8, 0x08, 0x04, 0xc3, 0xb7, - 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, 0xa9, 0x8a, - 0x0c, 0x50, 0x00, 0xa6, 0x29, 0x50, 0x08, 0x0c, 0xca, 0x1a, 0x00, 0xae, - 0x08, 0x0c, 0xd5, 0xe8, 0x08, 0x0c, 0xca, 0x6b, 0x08, 0x04, 0xc3, 0xb9, - 0x08, 0x0c, 0xd2, 0x2a, 0x08, 0x04, 0xc3, 0xce, 0xa8, 0x7c, 0xd0, 0xac, - 0x09, 0x04, 0xc3, 0xdf, 0xa8, 0x80, 0xd0, 0xbc, 0x19, 0x04, 0xc3, 0xdf, - 0x96, 0x84, 0x04, 0x00, 0x01, 0x30, 0xa8, 0x38, 0xab, 0x34, 0x93, 0x05, - 0x09, 0x04, 0xc3, 0xdf, 0x00, 0xb8, 0x73, 0x48, 0xa8, 0x38, 0x93, 0x06, - 0x11, 0x98, 0x73, 0x4c, 0xa8, 0x34, 0x93, 0x1e, 0x09, 0x04, 0xc3, 0xdf, - 0x00, 0x68, 0xa8, 0x7c, 0xd0, 0xac, 0x09, 0x04, 0xc3, 0xaa, 0xa8, 0x38, - 0xa9, 0x34, 0x91, 0x05, 0x09, 0x04, 0xc3, 0xaa, 0xa8, 0x80, 0xd0, 0xbc, - 0x19, 0x04, 0xc3, 0xaa, 0x08, 0x0c, 0xd2, 0x67, 0x08, 0x04, 0xc3, 0xce, - 0x00, 0xf6, 0x20, 0x79, 0x02, 0x6c, 0x7c, 0x04, 0x7b, 0x00, 0x7e, 0x0c, - 0x7d, 0x08, 0x00, 0xfe, 0x00, 0x21, 0x00, 0x05, 0x00, 0x11, 0x00, 0x05, - 0x00, 0x05, 0x00, 0x96, 0x60, 0x03, 0x00, 0x02, 0x60, 0x07, 0x00, 0x43, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, 0x00, 0x9e, - 0x00, 0x05, 0x21, 0x30, 0x22, 0x28, 0x00, 0x58, 0x24, 0x00, 0xa9, 0xac, - 0x91, 0x0a, 0x23, 0x00, 0xaa, 0xb0, 0x92, 0x13, 0x26, 0x00, 0x91, 0x02, - 0x25, 0x00, 0x92, 0x03, 0x0e, 0x90, 0xac, 0x46, 0xab, 0x4a, 0xae, 0x36, - 0xad, 0x3a, 0x60, 0x44, 0xd0, 0xfc, 0x19, 0x0c, 0xad, 0x25, 0x60, 0x4b, - 0x00, 0x00, 0x08, 0x0c, 0x1c, 0x9c, 0x11, 0x18, 0x61, 0x44, 0x08, 0x0c, - 0x96, 0x43, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x82, 0x00, 0x57, 0x12, 0x20, - 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc4, 0xe0, - 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, - 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe2, 0xc4, 0xe0, 0xc4, 0xe0, - 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xf3, 0xc4, 0xe0, 0xc4, 0xe0, 0xc4, 0xe0, - 0xc4, 0xe0, 0xc5, 0x17, 0xc4, 0xe0, 0xc4, 0xe0, 0x08, 0x0c, 0x0d, 0x85, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x40, 0x11, 0x10, 0x08, 0x0c, 0x99, 0xed, - 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, 0x60, 0x03, 0x00, 0x02, - 0x08, 0x0c, 0xd6, 0x62, 0x08, 0x0c, 0x9a, 0x48, 0x00, 0x05, 0x60, 0x04, - 0x90, 0x86, 0x00, 0x40, 0x11, 0x10, 0x08, 0x0c, 0x99, 0xed, 0x20, 0x19, - 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, 0x08, 0x0c, 0x9a, 0x48, 0x08, 0x0c, - 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x50, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, - 0x00, 0x29, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, - 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x0c, - 0x0d, 0x85, 0xa8, 0x7b, 0x00, 0x15, 0xd1, 0xfc, 0x01, 0x80, 0xa8, 0x7b, - 0x00, 0x07, 0x80, 0x02, 0x80, 0x00, 0x81, 0x0a, 0x91, 0x89, 0x00, 0x00, - 0x00, 0x06, 0x00, 0x16, 0x20, 0x09, 0x1a, 0x7c, 0x21, 0x04, 0x80, 0x00, - 0x20, 0x0a, 0x00, 0x1e, 0x00, 0x0e, 0xa9, 0x92, 0xa8, 0x8e, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x57, 0x12, 0x20, 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, - 0x00, 0x0a, 0x00, 0x05, 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, - 0xc5, 0x4f, 0xc5, 0x51, 0xc5, 0x4f, 0xc5, 0x4f, 0xc6, 0x0e, 0xc5, 0x4f, - 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, - 0xc5, 0x4f, 0xc5, 0x4f, 0xc5, 0x4f, 0xc7, 0x4e, 0xc5, 0x4f, 0xc7, 0x58, - 0xc5, 0x4f, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x1c, 0xd0, 0xbc, 0x01, 0x78, - 0xd0, 0x84, 0x01, 0x68, 0xd0, 0xf4, 0x01, 0x20, 0xc0, 0x84, 0x60, 0x1e, - 0x08, 0x04, 0xc3, 0x3e, 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, 0xa8, 0x7c, - 0xc0, 0xe5, 0xa8, 0x7e, 0x00, 0x9e, 0x00, 0x76, 0x00, 0xa6, 0x00, 0xe6, - 0x00, 0x96, 0x20, 0x71, 0x02, 0x60, 0x61, 0x14, 0x21, 0x50, 0x60, 0x1c, - 0xd0, 0xfc, 0x11, 0x10, 0x76, 0x44, 0x00, 0x08, 0x90, 0x36, 0xb6, 0x76, - 0x96, 0xb4, 0x0f, 0xff, 0xb7, 0x7c, 0xc7, 0xe5, 0xb7, 0x7e, 0x62, 0x10, - 0x00, 0xb6, 0x22, 0x58, 0xba, 0x3c, 0x82, 0xff, 0x01, 0x10, 0x82, 0x11, - 0xba, 0x3e, 0x00, 0xbe, 0x86, 0xff, 0x09, 0x04, 0xc6, 0x07, 0x96, 0x94, - 0xff, 0x00, 0x92, 0x84, 0x0c, 0x00, 0x01, 0x20, 0x70, 0x48, 0xb0, 0x92, - 0x70, 0x4c, 0xb0, 0x8e, 0x92, 0x84, 0x03, 0x00, 0x09, 0x04, 0xc6, 0x07, - 0x96, 0x86, 0x01, 0x00, 0x11, 0x30, 0x70, 0x64, 0x90, 0x05, 0x11, 0x18, - 0xc6, 0xc4, 0xb6, 0x76, 0x0c, 0x38, 0x08, 0x0c, 0x10, 0x59, 0x09, 0x0c, - 0x0d, 0x85, 0x29, 0x00, 0xb0, 0x7a, 0xb7, 0x7c, 0x97, 0xbd, 0x02, 0x00, - 0xb7, 0x7e, 0xa8, 0x67, 0x01, 0x03, 0xb0, 0x68, 0xa8, 0x6a, 0xb0, 0x6c, - 0xa8, 0x6e, 0xb0, 0x70, 0xa8, 0x72, 0x70, 0x44, 0x90, 0x84, 0xf0, 0x00, - 0x96, 0x35, 0xae, 0x76, 0x96, 0x8c, 0x0c, 0x00, 0x01, 0x20, 0x73, 0x48, - 0xab, 0x92, 0x73, 0x4c, 0xab, 0x8e, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, - 0x00, 0x02, 0x01, 0x80, 0x91, 0x86, 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, - 0x00, 0x1c, 0x00, 0x60, 0xd6, 0xdc, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x15, - 0x00, 0x38, 0xd6, 0xd4, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x10, - 0xa8, 0x7b, 0x00, 0x00, 0xaf, 0x7e, 0xb0, 0x80, 0xa8, 0x82, 0xb0, 0x84, - 0xa8, 0x86, 0x90, 0x1e, 0xd6, 0xc4, 0x01, 0x90, 0x73, 0x5c, 0xab, 0x86, - 0x83, 0xff, 0x01, 0x70, 0x93, 0x8a, 0x00, 0x09, 0x02, 0x10, 0x20, 0x19, - 0x00, 0x08, 0x00, 0x36, 0x23, 0x08, 0x20, 0x19, 0x00, 0x18, 0x20, 0x11, - 0x00, 0x25, 0x08, 0x0c, 0xca, 0x7b, 0x00, 0x3e, 0xd6, 0xcc, 0x01, 0xe8, - 0x71, 0x54, 0xa9, 0x8a, 0x81, 0xff, 0x01, 0xc8, 0x91, 0x92, 0x00, 0x21, - 0x12, 0x60, 0x83, 0x04, 0x90, 0x98, 0x00, 0x18, 0x20, 0x11, 0x00, 0x29, - 0x08, 0x0c, 0xca, 0x7b, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x50, 0xb0, 0x68, 0xd0, 0xfc, 0x01, 0x20, 0x20, 0x09, 0x00, 0x20, - 0xa9, 0x8a, 0x0c, 0x68, 0x29, 0x50, 0x08, 0x0c, 0xca, 0x1a, 0x08, 0x0c, - 0x1a, 0x9f, 0x00, 0x9e, 0x00, 0xee, 0x00, 0xae, 0x00, 0x7e, 0x00, 0x05, - 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, 0x60, 0x4a, 0x00, 0x96, 0x61, 0x14, - 0x21, 0x48, 0xa8, 0x3c, 0xa9, 0x40, 0x91, 0x05, 0x11, 0x18, 0xa8, 0x7c, - 0xc0, 0xdc, 0xa8, 0x7e, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0xd6, 0x6b, - 0x09, 0x04, 0xc7, 0x49, 0x60, 0x4b, 0x00, 0x00, 0x60, 0x10, 0x00, 0xb6, - 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x15, 0x00, 0xd1, 0xcc, - 0x09, 0x04, 0xc7, 0x0d, 0xa9, 0x78, 0xa8, 0x68, 0xd0, 0xfc, 0x09, 0x04, - 0xc6, 0xce, 0x00, 0x16, 0xa8, 0x7c, 0x00, 0x06, 0xa8, 0x80, 0x00, 0x06, - 0x00, 0xa6, 0x21, 0x50, 0xb1, 0x74, 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, - 0x00, 0x02, 0x09, 0x04, 0xc6, 0x9b, 0x90, 0x86, 0x00, 0x28, 0x19, 0x04, - 0xc6, 0x87, 0xa8, 0x7b, 0x00, 0x1c, 0xb0, 0x7b, 0x00, 0x1c, 0x08, 0x04, - 0xc6, 0xa3, 0x60, 0x24, 0xd0, 0xf4, 0x11, 0xd0, 0xa8, 0x38, 0xaa, 0x34, - 0x92, 0x05, 0x09, 0xc8, 0xa8, 0x38, 0xaa, 0x90, 0x92, 0x06, 0x11, 0x20, - 0xa8, 0x8c, 0xaa, 0x34, 0x92, 0x06, 0x09, 0x88, 0x60, 0x24, 0xd0, 0xd4, - 0x11, 0x48, 0xa9, 0xac, 0xa8, 0x34, 0x91, 0x02, 0x60, 0x3a, 0xa9, 0xb0, - 0xa8, 0x38, 0x91, 0x03, 0x60, 0x3e, 0x60, 0x24, 0xc0, 0xf5, 0x60, 0x26, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x3c, 0x80, 0x00, 0xb8, 0x3e, - 0x00, 0xbe, 0x60, 0x1c, 0xc0, 0xfc, 0x60, 0x1e, 0x90, 0x06, 0xa8, 0x76, - 0xa8, 0x92, 0xa8, 0x8e, 0xa8, 0x7c, 0xc0, 0xe4, 0xa8, 0x7e, 0xd0, 0xcc, - 0x01, 0x40, 0xc0, 0xcc, 0xa8, 0x7e, 0x00, 0x96, 0xa8, 0x78, 0x20, 0x48, - 0x08, 0x0c, 0x10, 0x0b, 0x00, 0x9e, 0x08, 0x0c, 0xd2, 0x67, 0x08, 0x04, - 0xc7, 0x49, 0xd1, 0xdc, 0x01, 0x58, 0xa8, 0x7b, 0x00, 0x15, 0xb0, 0x7b, - 0x00, 0x15, 0x08, 0x0c, 0xd5, 0x08, 0x01, 0x18, 0xb1, 0x74, 0xc1, 0xdc, - 0xb1, 0x76, 0x00, 0x78, 0xd1, 0xd4, 0x01, 0x28, 0xa8, 0x7b, 0x00, 0x07, - 0xb0, 0x7b, 0x00, 0x07, 0x00, 0x40, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, - 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc5, 0x19, 0xa8, 0x7c, - 0xb0, 0x7e, 0xa8, 0x90, 0xb0, 0x92, 0xa8, 0x8c, 0xb0, 0x8e, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x19, 0x20, 0xa0, 0x20, 0xa9, - 0x00, 0x20, 0x8a, 0x06, 0x80, 0x06, 0x80, 0x07, 0x90, 0x94, 0x00, 0x3f, - 0x22, 0xe0, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, 0x00, 0x19, 0x20, 0x98, - 0x40, 0x03, 0x00, 0xae, 0x00, 0x0e, 0xa8, 0x82, 0x00, 0x0e, 0xc0, 0xcc, - 0xa8, 0x7e, 0x08, 0x0c, 0xd5, 0xe8, 0x00, 0x1e, 0xa8, 0x74, 0x00, 0x06, - 0x21, 0x48, 0x08, 0x0c, 0x10, 0x0b, 0x00, 0x1e, 0x08, 0x04, 0xc7, 0x3a, - 0x00, 0x16, 0x00, 0xa6, 0x21, 0x50, 0xb1, 0x74, 0x91, 0x84, 0x00, 0xff, - 0x90, 0xb6, 0x00, 0x02, 0x01, 0xe0, 0x90, 0x86, 0x00, 0x28, 0x11, 0x28, - 0xa8, 0x7b, 0x00, 0x1c, 0xb0, 0x7b, 0x00, 0x1c, 0x00, 0xe0, 0xd1, 0xdc, - 0x01, 0x58, 0xa8, 0x7b, 0x00, 0x15, 0xb0, 0x7b, 0x00, 0x15, 0x08, 0x0c, - 0xd5, 0x08, 0x01, 0x18, 0xb1, 0x74, 0xc1, 0xdc, 0xb1, 0x76, 0x00, 0x78, - 0xd1, 0xd4, 0x01, 0x28, 0xa8, 0x7b, 0x00, 0x07, 0xb0, 0x7b, 0x00, 0x07, - 0x00, 0x40, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, - 0x91, 0x15, 0x19, 0x0c, 0xc5, 0x19, 0xa8, 0x90, 0xb0, 0x92, 0xa8, 0x8c, - 0xb0, 0x8e, 0xa8, 0x7c, 0xb0, 0x7e, 0x00, 0xae, 0x08, 0x0c, 0x10, 0x0b, - 0x00, 0x9e, 0x08, 0x0c, 0xd5, 0xe8, 0xa9, 0x74, 0x00, 0x16, 0x08, 0x0c, - 0xca, 0x6b, 0x00, 0x1e, 0x04, 0x68, 0xa8, 0x67, 0x01, 0x03, 0xa9, 0x74, - 0x91, 0x84, 0x00, 0xff, 0x90, 0xb6, 0x00, 0x02, 0x01, 0xb0, 0x90, 0x86, - 0x00, 0x28, 0x11, 0x18, 0xa8, 0x7b, 0x00, 0x1c, 0x00, 0xd0, 0xd1, 0xdc, - 0x01, 0x48, 0xa8, 0x7b, 0x00, 0x15, 0x08, 0x0c, 0xd5, 0x08, 0x01, 0x18, - 0xa9, 0x74, 0xc1, 0xdc, 0xa9, 0x76, 0x00, 0x78, 0xd1, 0xd4, 0x01, 0x18, - 0xa8, 0x7b, 0x00, 0x07, 0x00, 0x50, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x7c, - 0xd0, 0xac, 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, - 0xc5, 0x19, 0xa9, 0x74, 0x00, 0x16, 0x08, 0x0c, 0x6e, 0x27, 0x00, 0x1e, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xba, 0x3c, 0xb8, 0xd0, 0x00, 0x16, - 0x90, 0x05, 0x19, 0x0c, 0x68, 0xdf, 0x00, 0x1e, 0x00, 0xbe, 0xd1, 0xe4, - 0x11, 0x20, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, - 0xd2, 0x2a, 0x0c, 0xd8, 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, 0xa9, 0x7c, - 0x08, 0x0c, 0xd6, 0x6b, 0x19, 0x0c, 0x1a, 0xbf, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0xa8, 0x3c, 0xa9, 0x40, 0x91, 0x05, - 0x01, 0xe8, 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x67, - 0x01, 0x03, 0x00, 0xb6, 0x60, 0x10, 0x20, 0x58, 0xa8, 0x34, 0xa9, 0x38, - 0x91, 0x15, 0x11, 0xa0, 0x08, 0x0c, 0x6e, 0x27, 0xba, 0x3c, 0x82, 0x11, - 0x02, 0x08, 0xba, 0x3e, 0xb8, 0xd0, 0x90, 0x05, 0x01, 0x10, 0x08, 0x0c, - 0x68, 0xdf, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x05, - 0xa8, 0x7c, 0xc0, 0xdc, 0xa8, 0x7e, 0x08, 0xf8, 0xb8, 0x00, 0xd0, 0xbc, - 0x11, 0x20, 0xa8, 0x34, 0x08, 0x0c, 0xc5, 0x19, 0x0c, 0x28, 0xa8, 0x80, - 0xd0, 0xbc, 0x1d, 0xc8, 0x08, 0x0c, 0xd2, 0x67, 0x0c, 0x60, 0x08, 0x0c, - 0x99, 0xed, 0x00, 0x10, 0x08, 0x0c, 0x9a, 0x48, 0x60, 0x1c, 0xd0, 0x84, - 0x01, 0x10, 0x08, 0x0c, 0x1a, 0xd3, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xf0, - 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x18, - 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0xa0, 0xa8, 0x67, 0x01, 0x03, 0x20, 0x09, - 0x18, 0x0c, 0x21, 0x0c, 0xd1, 0x8c, 0x11, 0x98, 0xd1, 0x84, 0x11, 0x70, - 0x61, 0x08, 0xa9, 0x7a, 0x91, 0x8e, 0x00, 0x29, 0x11, 0x10, 0x08, 0x0c, - 0xed, 0xdf, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, - 0x08, 0x04, 0xb1, 0xa7, 0xa8, 0x7b, 0x00, 0x04, 0x0c, 0xb0, 0xa8, 0x7b, - 0x00, 0x04, 0x0c, 0x98, 0x91, 0x82, 0x00, 0x57, 0x12, 0x20, 0x91, 0x82, - 0x00, 0x40, 0x02, 0x08, 0x00, 0x0a, 0x00, 0x05, 0xc7, 0xdf, 0xc7, 0xdf, - 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xe1, 0xc7, 0xdf, 0xc7, 0xdf, - 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, - 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, 0xc7, 0xdf, - 0xc8, 0x05, 0xc7, 0xdf, 0xc7, 0xdf, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, - 0x58, 0x48, 0x01, 0xf8, 0x60, 0x14, 0x71, 0x44, 0x91, 0x8c, 0x0f, 0xff, - 0x90, 0x16, 0xd1, 0xc4, 0x01, 0x18, 0x72, 0x64, 0x92, 0x94, 0x00, 0xff, - 0x00, 0x96, 0x90, 0x4d, 0x01, 0x88, 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x64, - 0x90, 0x86, 0x01, 0x39, 0x01, 0x28, 0xa8, 0x67, 0x01, 0x03, 0xa9, 0x76, - 0xaa, 0x96, 0x00, 0x30, 0xa8, 0x97, 0x40, 0x00, 0xa9, 0x9a, 0xaa, 0x9e, - 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x08, 0x04, 0xb1, 0x6c, 0x08, 0x0c, - 0x58, 0x48, 0x0d, 0xd8, 0x60, 0x14, 0x90, 0x0e, 0x90, 0x16, 0x0c, 0x10, - 0x91, 0x82, 0x00, 0x85, 0x00, 0x02, 0xc8, 0x1e, 0xc8, 0x1c, 0xc8, 0x1c, - 0xc8, 0x2a, 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, - 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0xc8, 0x1c, 0x08, 0x0c, 0x0d, 0x85, - 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x01, 0x2e, 0x00, 0x05, - 0x00, 0x26, 0x00, 0x56, 0x00, 0xd6, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, - 0x72, 0x24, 0x62, 0x16, 0x72, 0x20, 0x08, 0x0c, 0xcf, 0x09, 0x01, 0xf8, - 0x22, 0x68, 0x68, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0xd0, 0x60, 0x10, - 0x6d, 0x10, 0x95, 0x2e, 0x11, 0xb0, 0x00, 0xc6, 0x2d, 0x60, 0x00, 0xd6, - 0x08, 0x0c, 0xca, 0xdc, 0x00, 0xde, 0x00, 0xce, 0x01, 0x58, 0x70, 0x2c, - 0xd0, 0x84, 0x11, 0x18, 0x08, 0x0c, 0xca, 0xa6, 0x00, 0x10, 0x68, 0x03, - 0x00, 0x02, 0x60, 0x07, 0x00, 0x86, 0x00, 0x28, 0x08, 0x0c, 0xca, 0xc8, - 0x0d, 0x90, 0x60, 0x07, 0x00, 0x87, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x72, 0x20, 0x08, 0x0c, 0xcf, 0x09, - 0x01, 0x78, 0x68, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x01, 0x40, 0x68, 0x24, 0xd0, 0xec, 0x01, 0x28, 0x00, 0xc6, - 0x2d, 0x60, 0x08, 0x0c, 0xd2, 0x67, 0x00, 0xce, 0x00, 0xee, 0x00, 0xde, - 0x00, 0x5e, 0x00, 0x2e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x60, - 0x60, 0x04, 0x90, 0x8a, 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0x85, 0x90, 0x8a, - 0x00, 0x92, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x85, 0x00, 0xe2, - 0x91, 0x86, 0x00, 0x27, 0x01, 0x20, 0x91, 0x86, 0x00, 0x14, 0x19, 0x0c, - 0x0d, 0x85, 0x08, 0x0c, 0x99, 0xed, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x40, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x77, - 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x29, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, - 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x04, 0x9a, 0xb3, 0xc8, 0xad, 0xc8, 0xaf, - 0xc8, 0xaf, 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, - 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, 0xc8, 0xad, 0x08, 0x0c, - 0x0d, 0x85, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, - 0x11, 0x30, 0x60, 0x04, 0x90, 0x82, 0x00, 0x85, 0x20, 0x08, 0x08, 0x04, - 0xc8, 0xfe, 0x91, 0x86, 0x00, 0x27, 0x15, 0x58, 0x08, 0x0c, 0x99, 0xed, - 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0x96, 0x60, 0x14, - 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x50, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x29, 0x08, 0x0c, 0x70, 0x12, - 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, - 0x91, 0x86, 0x00, 0x89, 0x01, 0x18, 0x91, 0x86, 0x00, 0x8a, 0x11, 0x40, - 0x08, 0x0c, 0xaf, 0x61, 0x01, 0x28, 0x90, 0x86, 0x00, 0x0c, 0x09, 0x04, - 0xc9, 0x36, 0x00, 0x00, 0x08, 0x0c, 0xb2, 0x27, 0x0c, 0x70, 0x91, 0x86, - 0x00, 0x14, 0x1d, 0x60, 0x08, 0x0c, 0x99, 0xed, 0x00, 0x96, 0x60, 0x14, - 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x0d, 0x00, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x7b, 0x00, 0x06, 0xa8, 0x80, 0xc0, 0xec, - 0xa8, 0x82, 0x08, 0x90, 0x00, 0x02, 0xc9, 0x0e, 0xc9, 0x0c, 0xc9, 0x0c, - 0xc9, 0x0c, 0xc9, 0x0c, 0xc9, 0x0c, 0xc9, 0x22, 0xc9, 0x0c, 0xc9, 0x0c, - 0xc9, 0x0c, 0xc9, 0x0c, 0xc9, 0x0c, 0xc9, 0x0c, 0x08, 0x0c, 0x0d, 0x85, - 0x60, 0x34, 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, - 0x01, 0x18, 0x91, 0x86, 0x00, 0x35, 0x11, 0x18, 0x20, 0x01, 0x19, 0x86, - 0x00, 0x10, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x60, 0x03, - 0x00, 0x0c, 0x00, 0x05, 0x60, 0x34, 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, - 0x91, 0x86, 0x00, 0x39, 0x01, 0x18, 0x91, 0x86, 0x00, 0x35, 0x11, 0x18, - 0x20, 0x01, 0x19, 0x86, 0x00, 0x10, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, - 0x60, 0x1a, 0x60, 0x03, 0x00, 0x0e, 0x00, 0x05, 0x91, 0x82, 0x00, 0x92, - 0x12, 0x20, 0x91, 0x82, 0x00, 0x85, 0x02, 0x08, 0x00, 0x12, 0x08, 0x04, - 0xb2, 0x27, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4e, - 0xc9, 0x9b, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4c, 0xc9, 0x4c, - 0xc9, 0x4c, 0xc9, 0x4c, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x96, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x01, 0x68, - 0x60, 0x34, 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, - 0x01, 0x18, 0x91, 0x86, 0x00, 0x35, 0x11, 0x18, 0x00, 0x9e, 0x08, 0x04, - 0xc9, 0xaf, 0x08, 0x0c, 0xcf, 0x1b, 0x11, 0x18, 0x08, 0x0c, 0xd1, 0x0c, - 0x00, 0x68, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xd6, 0x71, 0x11, 0x10, - 0x08, 0x0c, 0xd1, 0x0c, 0xa8, 0x67, 0x01, 0x03, 0x08, 0x0c, 0xd6, 0x25, - 0x08, 0x0c, 0x70, 0x12, 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, 0xb1, 0x16, - 0x01, 0xd0, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, 0x60, 0x0b, - 0xff, 0xff, 0x20, 0x09, 0x02, 0x6e, 0x21, 0x0c, 0x61, 0x3a, 0x20, 0x09, - 0x02, 0x6f, 0x21, 0x0c, 0x61, 0x3e, 0x69, 0x10, 0x61, 0x12, 0x08, 0x0c, - 0xd3, 0xb6, 0x69, 0x5c, 0x61, 0x5e, 0x60, 0x23, 0x00, 0x01, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x2d, 0x60, 0x00, 0xde, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x05, 0xa0, 0x60, 0x34, 0x90, 0x8c, - 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x35, 0x01, 0x30, 0x91, 0x86, - 0x00, 0x1e, 0x01, 0x18, 0x91, 0x86, 0x00, 0x39, 0x15, 0x38, 0x00, 0xd6, - 0x2c, 0x68, 0x08, 0x0c, 0xd5, 0xbb, 0x11, 0xf0, 0x08, 0x0c, 0xb1, 0x16, - 0x01, 0xd8, 0x61, 0x06, 0x60, 0x03, 0x00, 0x01, 0x60, 0x23, 0x00, 0x01, - 0x69, 0x10, 0x61, 0x12, 0x69, 0x2c, 0x61, 0x2e, 0x69, 0x30, 0x61, 0x32, - 0x69, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x61, 0x36, 0x69, 0x38, 0x61, 0x3a, - 0x69, 0x3c, 0x61, 0x3e, 0x69, 0x5c, 0x61, 0x5e, 0x08, 0x0c, 0xd3, 0xb6, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x2d, 0x60, 0x00, 0xde, - 0x08, 0x04, 0xb1, 0x6c, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0xc8, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x80, 0xd0, 0xb4, - 0x01, 0x28, 0xc0, 0xec, 0xa8, 0x82, 0xa8, 0x7b, 0x00, 0x06, 0x00, 0x48, - 0xd0, 0xbc, 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x02, 0x00, 0x20, 0xa8, 0x7b, - 0x00, 0x05, 0x08, 0x0c, 0xd2, 0x26, 0xa8, 0x77, 0x00, 0x00, 0x08, 0x0c, - 0x70, 0x12, 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x04, 0xb1, 0x6c, - 0x00, 0x16, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, - 0x01, 0x40, 0xa8, 0x67, 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x28, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x00, 0x1e, 0x91, 0x86, - 0x00, 0x13, 0x01, 0x58, 0x91, 0x86, 0x00, 0x14, 0x01, 0x30, 0x91, 0x86, - 0x00, 0x27, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0x27, 0x00, 0x20, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x00, 0x56, 0x00, 0x66, - 0x00, 0x96, 0x00, 0xa6, 0x20, 0x29, 0x00, 0x01, 0x91, 0x82, 0x01, 0x01, - 0x12, 0x08, 0x00, 0x10, 0x20, 0x09, 0x01, 0x00, 0x21, 0x30, 0x83, 0x04, - 0x90, 0x98, 0x00, 0x18, 0x20, 0x09, 0x00, 0x20, 0x20, 0x11, 0x00, 0x29, - 0x08, 0x0c, 0xca, 0x7b, 0x96, 0xb2, 0x00, 0x20, 0xb0, 0x04, 0x90, 0x4d, - 0x01, 0x10, 0x08, 0x0c, 0x10, 0x0b, 0x08, 0x0c, 0x10, 0x59, 0x05, 0x20, - 0x85, 0x28, 0xa8, 0x67, 0x01, 0x10, 0xa8, 0x6b, 0x00, 0x00, 0x29, 0x20, - 0xb4, 0x06, 0x96, 0x8a, 0x00, 0x3d, 0x12, 0x28, 0x26, 0x08, 0x20, 0x11, - 0x00, 0x1b, 0x04, 0x99, 0x00, 0xa8, 0x96, 0xb2, 0x00, 0x3c, 0x20, 0x09, - 0x00, 0x3c, 0x29, 0x50, 0x20, 0x11, 0x00, 0x1b, 0x04, 0x51, 0x0c, 0x28, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, - 0x95, 0xad, 0x00, 0x03, 0xb5, 0x66, 0x95, 0xac, 0x00, 0x00, 0x00, 0x48, - 0x20, 0x01, 0x02, 0x05, 0x20, 0x03, 0x00, 0x00, 0x00, 0xae, 0x85, 0x2f, - 0x95, 0xad, 0x00, 0x03, 0xb5, 0x66, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, - 0x00, 0x05, 0x00, 0xa6, 0x89, 0xff, 0x01, 0x58, 0xa8, 0x04, 0x90, 0x55, - 0x01, 0x30, 0xa8, 0x07, 0x00, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x2a, 0x48, - 0x0c, 0xb8, 0x08, 0x0c, 0x70, 0x12, 0x00, 0xae, 0x00, 0x05, 0x00, 0xf6, - 0x20, 0x79, 0x02, 0x00, 0x78, 0x14, 0x90, 0x85, 0x00, 0x80, 0x78, 0x16, - 0xd1, 0x84, 0x01, 0x08, 0x81, 0x08, 0x81, 0x0c, 0x20, 0xa9, 0x00, 0x01, - 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x92, 0x00, 0x20, 0xa0, 0x20, 0xe1, - 0x00, 0x00, 0x23, 0x00, 0x9e, 0x00, 0x20, 0x98, 0x40, 0x03, 0x83, 0x18, - 0x93, 0x86, 0x00, 0x20, 0x11, 0x48, 0x20, 0x18, 0x23, 0x00, 0x9e, 0x00, - 0x20, 0x98, 0x78, 0x14, 0x80, 0x00, 0x90, 0x85, 0x00, 0x80, 0x78, 0x16, - 0x81, 0x09, 0x1d, 0x80, 0x78, 0x17, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x05, - 0x69, 0x20, 0x91, 0x86, 0x00, 0x03, 0x01, 0x18, 0x91, 0x86, 0x00, 0x02, - 0x11, 0xd0, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xe6, 0x2d, 0x60, 0x00, 0x96, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x50, 0x20, 0x01, - 0x00, 0x06, 0xa9, 0x80, 0xc1, 0xd5, 0x08, 0x0c, 0x72, 0x5e, 0x08, 0x0c, - 0x70, 0x06, 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0xa7, - 0x00, 0xee, 0x00, 0xde, 0x00, 0xce, 0x00, 0x05, 0x00, 0xc6, 0x70, 0x2c, - 0xd0, 0x84, 0x11, 0x70, 0x60, 0x08, 0x20, 0x60, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x40, 0x61, 0x04, 0x91, 0x86, 0x00, 0x85, 0x01, 0x18, - 0x91, 0x86, 0x00, 0x8b, 0x11, 0x08, 0x90, 0x06, 0x00, 0xce, 0x00, 0x05, - 0x00, 0x66, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x31, 0x00, 0x01, - 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x83, 0x01, 0x2e, 0x00, 0x6e, - 0x00, 0x05, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x66, 0x20, 0x31, - 0x00, 0x00, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x6e, - 0x01, 0x2e, 0x00, 0x05, 0xcb, 0x2a, 0xcb, 0x2a, 0xcb, 0x25, 0xcb, 0x4e, - 0xcb, 0x06, 0xcb, 0x25, 0xcb, 0x08, 0xcb, 0x25, 0xcb, 0x25, 0x94, 0x58, - 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x06, 0xcb, 0x06, 0xcb, 0x06, - 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x10, 0x90, 0x80, 0x00, 0x00, 0x20, 0x04, - 0xd0, 0xbc, 0x19, 0x0c, 0xcb, 0x4e, 0x00, 0x36, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x80, 0x00, 0x9e, 0xd0, 0xcc, 0x01, 0x18, 0x20, 0x19, - 0x00, 0x0c, 0x00, 0x38, 0xd0, 0x94, 0x01, 0x18, 0x20, 0x19, 0x00, 0x0d, - 0x00, 0x10, 0x20, 0x19, 0x00, 0x10, 0x08, 0x0c, 0xe5, 0x78, 0x00, 0x3e, - 0x00, 0x05, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x00, 0x96, 0x86, 0xff, 0x11, 0xe8, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0xd0, 0x60, 0x43, 0xff, 0xff, 0xa8, 0x64, 0x90, 0x86, - 0x01, 0x39, 0x11, 0x28, 0xa8, 0x7b, 0x00, 0x05, 0xa8, 0x83, 0x00, 0x00, - 0x00, 0x28, 0x90, 0x0e, 0x20, 0x01, 0x00, 0x05, 0x08, 0x0c, 0x72, 0x5e, - 0x08, 0x0c, 0xd2, 0x26, 0x08, 0x0c, 0x70, 0x06, 0x08, 0x0c, 0xb1, 0xa7, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x9e, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe0, - 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xd6, 0x7f, 0x90, 0x8a, 0x00, 0x10, - 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x2b, 0x01, 0x06, 0x08, 0x0c, 0xad, 0x18, - 0x01, 0x0e, 0x00, 0x05, 0xcb, 0x6c, 0xcb, 0x9c, 0xcb, 0x6e, 0xcb, 0xc3, - 0xcb, 0x97, 0xcb, 0x6c, 0xcb, 0x25, 0xcb, 0x2a, 0xcb, 0x2a, 0xcb, 0x25, - 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x25, 0xcb, 0x25, - 0x08, 0x0c, 0x0d, 0x85, 0x86, 0xff, 0x15, 0x20, 0x60, 0x20, 0x90, 0x86, - 0x00, 0x06, 0x05, 0x00, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0x68, 0xa8, 0x7c, 0xd0, 0xcc, 0x01, 0x40, 0x00, 0x96, - 0xc0, 0xcc, 0xa8, 0x7e, 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, - 0x00, 0x9e, 0x08, 0x0c, 0xd2, 0x26, 0x00, 0x9e, 0x08, 0x0c, 0xd5, 0xff, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x95, 0xf9, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0x66, 0x08, 0x0c, 0x1a, 0xd3, 0x00, 0x6e, 0x08, 0x90, - 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x30, 0x9c, 0x06, 0x11, 0x20, - 0x08, 0x0c, 0xa5, 0x16, 0x00, 0xee, 0x08, 0x40, 0x60, 0x20, 0x90, 0x84, - 0x00, 0x0f, 0x90, 0x86, 0x00, 0x06, 0x11, 0x50, 0x00, 0x86, 0x00, 0x96, - 0x20, 0x49, 0x00, 0x01, 0x2c, 0x40, 0x08, 0x0c, 0xa6, 0x67, 0x00, 0x9e, - 0x00, 0x8e, 0x00, 0x40, 0x00, 0x66, 0x08, 0x0c, 0xa4, 0x12, 0x19, 0x0c, - 0x0d, 0x85, 0x08, 0x0c, 0xa4, 0x20, 0x00, 0x6e, 0x00, 0xee, 0x19, 0x04, - 0xcb, 0x6e, 0x08, 0x04, 0xcb, 0x25, 0x00, 0x36, 0x00, 0xe6, 0x20, 0x71, - 0x19, 0xe8, 0x70, 0x4c, 0x9c, 0x06, 0x11, 0x38, 0x90, 0x1e, 0x08, 0x0c, - 0xa5, 0x96, 0x00, 0xee, 0x00, 0x3e, 0x08, 0x04, 0xcb, 0x6e, 0x08, 0x0c, - 0xa7, 0xa1, 0x00, 0xee, 0x00, 0x3e, 0x19, 0x04, 0xcb, 0x6e, 0x08, 0x04, - 0xcb, 0x25, 0x00, 0xc6, 0x00, 0x66, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, - 0x00, 0x1b, 0x00, 0x6e, 0x00, 0xce, 0x00, 0x05, 0xcb, 0xf9, 0xcc, 0xe2, - 0xce, 0x50, 0xcc, 0x01, 0xb1, 0xa7, 0xcb, 0xf9, 0xe5, 0x6e, 0xd6, 0x67, - 0xcc, 0xe2, 0x94, 0x1f, 0xce, 0xdc, 0xcb, 0xf2, 0xcb, 0xf2, 0xcb, 0xf2, - 0xcb, 0xf2, 0xcb, 0xf2, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xd1, 0x32, - 0x11, 0x10, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x05, 0x08, 0x0c, 0x99, 0xed, - 0x08, 0x04, 0xb1, 0x6c, 0x60, 0x1b, 0x00, 0x01, 0x00, 0x05, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0x30, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0x2c, 0x00, - 0xa8, 0x96, 0x00, 0x9e, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0xd6, 0x7f, - 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x13, 0x08, 0x04, - 0xad, 0x18, 0xcc, 0x25, 0xcc, 0x27, 0xcc, 0x51, 0xcc, 0x65, 0xcc, 0x92, - 0xcc, 0x25, 0xcb, 0xf9, 0xcb, 0xf9, 0xcb, 0xf9, 0xcc, 0x6c, 0xcc, 0x6c, - 0xcc, 0x25, 0xcc, 0x25, 0xcc, 0x25, 0xcc, 0x25, 0xcc, 0x76, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0xe6, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x80, - 0xc0, 0xb5, 0xa8, 0x82, 0x00, 0x9e, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x30, - 0x9c, 0x06, 0x01, 0xd0, 0x00, 0x66, 0x08, 0x0c, 0xa4, 0x12, 0x19, 0x0c, - 0x0d, 0x85, 0x08, 0x0c, 0xa4, 0x20, 0x00, 0x6e, 0x08, 0x0c, 0xd5, 0xff, - 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, - 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x95, 0xf9, 0x00, 0xee, 0x00, 0x05, 0x60, 0x1b, 0x00, 0x01, - 0x0c, 0xd8, 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x80, 0xc0, 0xb5, - 0xa8, 0x82, 0x00, 0x9e, 0x08, 0x0c, 0xd5, 0xff, 0x60, 0x07, 0x00, 0x85, - 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, 0x00, 0x02, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x95, 0xf9, 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, - 0xae, 0xe3, 0x08, 0x0c, 0xad, 0x18, 0x0c, 0x28, 0x00, 0x96, 0x60, 0x1b, - 0x00, 0x01, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x80, 0xc0, 0xb5, 0xa8, 0x82, - 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0x58, 0x48, 0x01, 0xb8, 0x60, 0x14, - 0x00, 0x96, 0x90, 0x4d, 0x01, 0x90, 0xa8, 0x64, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x7b, 0x00, 0x06, 0x90, 0x86, 0x01, 0x39, 0x11, 0x50, 0xa8, 0x67, - 0x01, 0x39, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, - 0x00, 0x04, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x08, 0x04, 0xb1, 0x6c, - 0x60, 0x14, 0x00, 0x96, 0x90, 0x4d, 0x09, 0x04, 0xcc, 0xdd, 0xa9, 0x7c, - 0xd1, 0xe4, 0x11, 0x60, 0x61, 0x1c, 0xd1, 0xfc, 0x09, 0x04, 0xcc, 0xdd, - 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x3c, 0x81, 0x09, 0x02, 0x08, - 0xb9, 0x3e, 0x00, 0xbe, 0x08, 0x0c, 0xad, 0x18, 0x20, 0x01, 0x18, 0x0f, - 0x20, 0x04, 0xd0, 0xc4, 0x01, 0x10, 0x00, 0x9e, 0x00, 0x05, 0xa8, 0x84, - 0x00, 0x9e, 0x80, 0x03, 0x80, 0x0b, 0x81, 0x0b, 0x91, 0x08, 0x61, 0x1a, - 0x20, 0x01, 0x00, 0x30, 0x2c, 0x08, 0x08, 0x0c, 0x16, 0xb9, 0x20, 0x01, - 0x03, 0x0c, 0x20, 0x04, 0x90, 0x86, 0x00, 0x41, 0x11, 0x98, 0x60, 0x14, - 0x00, 0x96, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x80, 0xd0, 0xf4, - 0x11, 0x30, 0xc0, 0xf5, 0xa8, 0x82, 0x00, 0x9e, 0x60, 0x1b, 0x00, 0x02, - 0x00, 0x68, 0x00, 0x9e, 0x00, 0xc6, 0x08, 0x0c, 0x21, 0x85, 0x00, 0xce, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x20, 0x09, 0x00, 0x48, - 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x05, 0x00, 0x9e, 0x08, 0x0c, 0x1a, 0xd3, - 0x08, 0x04, 0xcc, 0x51, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x0b, 0x00, 0x05, 0xcc, 0xf9, 0xcb, 0xfe, 0xcc, 0xfb, - 0xcc, 0xf9, 0xcc, 0xfb, 0xcc, 0xfb, 0xcb, 0xfa, 0xcc, 0xf9, 0xcb, 0xf4, - 0xcb, 0xf4, 0xcc, 0xf9, 0xcc, 0xf9, 0xcc, 0xf9, 0xcc, 0xf9, 0xcc, 0xf9, - 0xcc, 0xf9, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x00, 0xbe, 0x90, 0x8a, 0x00, 0x0c, - 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0xb6, 0x00, 0x13, 0x00, 0xbe, 0x00, 0x05, - 0xcd, 0x16, 0xcd, 0xe7, 0xcd, 0x18, 0xcd, 0x58, 0xcd, 0x18, 0xcd, 0x58, - 0xcd, 0x18, 0xcd, 0x26, 0xcd, 0x16, 0xcd, 0x58, 0xcd, 0x16, 0xcd, 0x47, - 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x16, 0x05, 0xc0, - 0x90, 0x8e, 0x00, 0x04, 0x05, 0xa8, 0x90, 0x8e, 0x00, 0x02, 0x05, 0x90, - 0x90, 0x8e, 0x00, 0x52, 0x09, 0x04, 0xcd, 0xe3, 0x60, 0x04, 0x08, 0x0c, - 0xd1, 0x32, 0x09, 0x04, 0xce, 0x00, 0x90, 0x8e, 0x00, 0x04, 0x11, 0x10, - 0x08, 0x0c, 0x33, 0x44, 0x90, 0x8e, 0x00, 0x21, 0x09, 0x04, 0xce, 0x04, - 0x90, 0x8e, 0x00, 0x22, 0x09, 0x04, 0xce, 0x4b, 0x90, 0x8e, 0x00, 0x3d, - 0x09, 0x04, 0xce, 0x04, 0x90, 0x8e, 0x00, 0x39, 0x09, 0x04, 0xce, 0x08, - 0x90, 0x8e, 0x00, 0x35, 0x09, 0x04, 0xce, 0x08, 0x90, 0x8e, 0x00, 0x1e, - 0x01, 0x78, 0x90, 0x8e, 0x00, 0x01, 0x11, 0x40, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0x04, 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x01, 0x10, - 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x04, 0xb1, 0xa7, - 0x00, 0xc6, 0x00, 0xd6, 0x61, 0x04, 0x91, 0x86, 0x00, 0x16, 0x09, 0x04, - 0xcd, 0xd4, 0x91, 0x86, 0x00, 0x02, 0x19, 0x04, 0xcd, 0xa9, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0x8c, 0x11, 0xc8, 0x08, 0x0c, 0x77, 0x9e, - 0x11, 0xb0, 0x08, 0x0c, 0xd6, 0x45, 0x01, 0x38, 0x08, 0x0c, 0x77, 0xc1, - 0x11, 0x20, 0x08, 0x0c, 0x76, 0xa7, 0x08, 0x04, 0xce, 0x34, 0x20, 0x01, - 0x19, 0x7d, 0x20, 0x03, 0x00, 0x01, 0x20, 0x01, 0x18, 0x00, 0x20, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x76, 0xcd, 0x08, 0x04, 0xce, 0x34, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0xa0, 0x90, 0x86, 0x00, 0x80, 0x01, 0x30, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0xac, 0x19, 0x04, 0xce, 0x34, 0xb8, 0xa0, - 0x90, 0x82, 0x00, 0x81, 0x1a, 0x04, 0xce, 0x34, 0xb8, 0x40, 0x90, 0x84, - 0x00, 0xff, 0x90, 0x05, 0x01, 0x90, 0x80, 0x01, 0xb8, 0x42, 0x60, 0x17, - 0x00, 0x00, 0x60, 0x23, 0x00, 0x07, 0x60, 0x1b, 0x03, 0x98, 0x60, 0x4b, - 0x00, 0x00, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x28, 0x2b, 0x00, 0x60, 0x12, - 0x60, 0x23, 0x00, 0x01, 0x04, 0x58, 0x00, 0xde, 0x00, 0xce, 0x60, 0x04, - 0x90, 0x8e, 0x00, 0x02, 0x11, 0xa0, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x90, 0x86, 0x00, 0x7e, 0x11, 0x70, 0x20, 0x09, 0x18, 0x37, 0x21, 0x04, - 0xc0, 0x85, 0x20, 0x0a, 0x00, 0xe6, 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, - 0x61, 0x30, 0x00, 0xee, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x30, 0x08, 0x0c, - 0xbb, 0x5c, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0xe6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x33, 0x44, 0x01, 0x2e, - 0x00, 0xee, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x20, 0x01, 0x00, 0x02, - 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, - 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0xde, 0x00, 0xce, - 0x0c, 0x80, 0x08, 0x0c, 0x33, 0x44, 0x08, 0x04, 0xcd, 0x54, 0x00, 0xc6, - 0x00, 0xd6, 0x61, 0x04, 0x91, 0x86, 0x00, 0x16, 0x0d, 0x38, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x40, 0x90, 0x84, 0x00, 0xff, 0x90, 0x05, 0x09, 0x04, - 0xcd, 0xa9, 0x80, 0x01, 0xb8, 0x42, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0xde, 0x00, 0xce, 0x08, 0x98, - 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x04, 0xcd, 0x56, 0x08, 0x0c, 0xbb, 0x98, - 0x08, 0x04, 0xcd, 0x56, 0x00, 0xd6, 0x2c, 0x68, 0x61, 0x04, 0x08, 0x0c, - 0xd5, 0xbb, 0x00, 0xde, 0x01, 0x18, 0x08, 0x0c, 0xb1, 0x6c, 0x04, 0x08, - 0x60, 0x04, 0x80, 0x07, 0x61, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x05, - 0x60, 0x36, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, - 0x00, 0x02, 0x60, 0x3c, 0x60, 0x0a, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, - 0x60, 0x1a, 0x60, 0x2c, 0x2c, 0x08, 0x20, 0x60, 0x60, 0x24, 0xd0, 0xb4, - 0x01, 0x08, 0xc0, 0x85, 0xc0, 0xb5, 0x60, 0x26, 0x21, 0x60, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0x05, 0x00, 0xde, 0x00, 0xce, - 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, 0x33, 0x15, 0x00, 0xe6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x33, 0x44, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x23, 0x00, 0x07, 0x60, 0x1b, 0x03, 0x98, 0x60, 0x4b, 0x00, 0x00, - 0x01, 0x2e, 0x00, 0xee, 0x00, 0x05, 0x08, 0x0c, 0xb5, 0xa8, 0x19, 0x04, - 0xce, 0x00, 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x96, 0x00, 0xd6, 0x00, 0x1b, 0x00, 0xde, 0x00, 0x9e, - 0x00, 0x05, 0xce, 0x6b, 0xce, 0x6b, 0xce, 0x6b, 0xce, 0x6b, 0xce, 0x6b, - 0xce, 0x6b, 0xce, 0x6b, 0xce, 0x6b, 0xce, 0x6b, 0xcb, 0xf9, 0xce, 0x6b, - 0xcb, 0xfe, 0xce, 0x6d, 0xcb, 0xfe, 0xce, 0x87, 0xce, 0x6b, 0x08, 0x0c, - 0x0d, 0x85, 0x60, 0x04, 0x90, 0x86, 0x00, 0x8b, 0x01, 0xb0, 0x60, 0x34, - 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x35, 0x11, 0x30, - 0x60, 0x2c, 0x90, 0x80, 0x00, 0x09, 0x20, 0x0c, 0xc1, 0x85, 0x21, 0x02, - 0x60, 0x07, 0x00, 0x8b, 0x60, 0x03, 0x00, 0x0d, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x96, 0x17, 0x00, 0x05, 0x08, 0x0c, 0xd6, 0x39, 0x01, 0x18, - 0x08, 0x0c, 0xd6, 0x4c, 0x00, 0x10, 0x08, 0x0c, 0xd6, 0x5a, 0x08, 0x0c, - 0xd1, 0x0c, 0x08, 0x0c, 0xcf, 0x1b, 0x05, 0x70, 0x08, 0x0c, 0x33, 0x15, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x68, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x7b, 0x00, 0x06, 0xa8, 0x77, 0x00, 0x00, 0xa8, 0x80, - 0xc0, 0xed, 0xa8, 0x82, 0x08, 0x0c, 0x70, 0x12, 0x2c, 0x68, 0x08, 0x0c, - 0xb1, 0x16, 0x01, 0x50, 0x68, 0x10, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, - 0x00, 0xc6, 0x2d, 0x60, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, 0x00, 0x08, - 0x2d, 0x60, 0x60, 0x17, 0x00, 0x00, 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0xc8, 0x08, 0x0c, 0xd6, 0x39, 0x01, 0x38, 0x60, 0x34, - 0x90, 0x86, 0x40, 0x00, 0x11, 0x18, 0x08, 0x0c, 0x33, 0x15, 0x08, 0xd0, - 0x60, 0x34, 0x90, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x39, - 0x01, 0x18, 0x91, 0x86, 0x00, 0x35, 0x11, 0x18, 0x08, 0x0c, 0x33, 0x15, - 0x08, 0x68, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x60, 0x00, 0x90, 0x8a, - 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x02, 0xce, 0xf2, 0xce, 0xf2, - 0xce, 0xfa, 0xce, 0xf4, 0xcf, 0x04, 0xce, 0xf2, 0xce, 0xf2, 0xb1, 0xa7, - 0xce, 0xf2, 0xce, 0xf2, 0xce, 0xf2, 0xce, 0xf2, 0xce, 0xf2, 0xce, 0xf2, - 0xce, 0xf2, 0xce, 0xf2, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xac, 0xfc, - 0x08, 0x0c, 0xae, 0xe3, 0x08, 0x0c, 0xad, 0x18, 0x61, 0x14, 0x00, 0x96, - 0x21, 0x48, 0xa8, 0x7b, 0x00, 0x06, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, - 0x08, 0x04, 0xb1, 0x6c, 0x60, 0x1c, 0xd0, 0x84, 0x19, 0x0c, 0x1a, 0xd3, - 0x0c, 0x88, 0x92, 0x84, 0x00, 0x03, 0x11, 0x58, 0x92, 0x82, 0x1d, 0xdc, - 0x02, 0x40, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x92, 0x02, 0x12, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe8, 0x00, 0x96, - 0x00, 0x28, 0x00, 0x96, 0x00, 0x06, 0x60, 0x14, 0x20, 0x48, 0x00, 0x0e, - 0x00, 0x06, 0x99, 0x84, 0xf0, 0x00, 0x90, 0x86, 0xf0, 0x00, 0x01, 0x10, - 0x08, 0x0c, 0x11, 0x04, 0x00, 0x0e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0xc6, 0x00, 0x36, 0x00, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x71, 0x18, 0x00, 0x73, 0x54, 0x70, 0x74, - 0x93, 0x02, 0x16, 0x40, 0x60, 0x20, 0x92, 0x06, 0x11, 0xf8, 0x08, 0x0c, - 0xd6, 0x45, 0x01, 0x80, 0x92, 0x86, 0x00, 0x01, 0x11, 0x68, 0x60, 0x04, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x48, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, - 0xd6, 0x5a, 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0xce, 0x00, 0x60, - 0x08, 0x0c, 0xd3, 0x28, 0x01, 0x48, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x10, - 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, - 0x9c, 0xe0, 0x00, 0x1c, 0x70, 0x68, 0x9c, 0x02, 0x12, 0x08, 0x08, 0xa0, - 0x01, 0x2e, 0x00, 0x0e, 0x00, 0x3e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x16, 0x91, 0x88, 0x10, 0x00, 0x21, 0x0c, - 0x81, 0xff, 0x01, 0x28, 0x20, 0x61, 0x1b, 0x39, 0x61, 0x12, 0x08, 0x0c, - 0x33, 0x15, 0x90, 0x06, 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0xb0, 0x66, 0x5e, 0x2b, 0x00, - 0x60, 0x12, 0x08, 0x0c, 0x58, 0x48, 0x01, 0x18, 0x08, 0x0c, 0xd0, 0x4e, - 0x01, 0x68, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x03, 0x20, 0x09, - 0x00, 0x4b, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xba, 0xa0, 0x08, 0x0c, 0xb1, 0xdd, 0x05, 0x80, - 0x60, 0x5f, 0x00, 0x00, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, 0xd3, 0xb6, - 0x60, 0x23, 0x00, 0x03, 0x00, 0x16, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, - 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x96, 0x6d, 0x2c, 0x08, - 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x1e, - 0xd1, 0x84, 0x01, 0x28, 0x08, 0x0c, 0xb1, 0x6c, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x70, 0x08, 0x0c, 0x58, 0x48, 0x01, 0x28, 0xd1, 0x8c, 0x11, 0x70, - 0x08, 0x0c, 0xd0, 0x4e, 0x01, 0x48, 0x20, 0x09, 0x00, 0x4c, 0x08, 0x0c, - 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, - 0x90, 0x06, 0x0c, 0xd8, 0x29, 0x00, 0x60, 0x16, 0x0c, 0x90, 0x20, 0x09, - 0x00, 0x4d, 0x00, 0x10, 0x20, 0x09, 0x00, 0x4e, 0x00, 0xf6, 0x00, 0xc6, - 0x00, 0x46, 0x00, 0x16, 0x08, 0x0c, 0xb1, 0x16, 0x2c, 0x78, 0x05, 0xa0, - 0x7e, 0x5e, 0x2b, 0x00, 0x78, 0x12, 0x78, 0x23, 0x00, 0x03, 0x00, 0x16, - 0x20, 0x21, 0x00, 0x05, 0x08, 0x0c, 0xd0, 0x60, 0x00, 0x1e, 0x91, 0x86, - 0x00, 0x4d, 0x01, 0x18, 0x91, 0x86, 0x00, 0x4e, 0x01, 0x48, 0x20, 0x01, - 0x19, 0x80, 0x20, 0x0c, 0xd1, 0xfc, 0x01, 0x68, 0x2f, 0x60, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0xd0, 0x20, 0x01, 0x19, 0x7f, 0x20, 0x0c, 0xd1, 0xfc, - 0x01, 0x20, 0x2f, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x88, 0x2f, 0x60, - 0x08, 0x0c, 0x58, 0x48, 0x01, 0x38, 0xd1, 0x8c, 0x11, 0x18, 0x04, 0xf1, - 0x01, 0x48, 0x00, 0x10, 0x29, 0x00, 0x78, 0x16, 0x00, 0x1e, 0x00, 0x16, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, 0x00, 0x4e, - 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0x46, - 0x08, 0x0c, 0xb1, 0x16, 0x2c, 0x78, 0x05, 0x08, 0x7e, 0x5e, 0x2b, 0x00, - 0x78, 0x12, 0x78, 0x23, 0x00, 0x03, 0x00, 0x96, 0x20, 0x21, 0x00, 0x04, - 0x04, 0x89, 0x00, 0x9e, 0x20, 0x01, 0x19, 0x7e, 0x20, 0x0c, 0xd1, 0xfc, - 0x01, 0x20, 0x2f, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x60, 0x2f, 0x60, - 0x08, 0x0c, 0x58, 0x48, 0x01, 0x20, 0xd1, 0x8c, 0x11, 0x60, 0x00, 0x71, - 0x01, 0x30, 0x20, 0x09, 0x00, 0x52, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x4e, 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x29, 0x00, - 0x78, 0x16, 0x0c, 0x98, 0x00, 0xc6, 0x08, 0x0c, 0x4c, 0x41, 0x00, 0xce, - 0x11, 0x20, 0x08, 0x0c, 0xb1, 0x6c, 0x90, 0x06, 0x00, 0x05, 0xa8, 0x67, - 0x00, 0x00, 0xa8, 0x6b, 0x80, 0x00, 0x29, 0x00, 0x60, 0x16, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x05, 0x00, 0x96, 0x00, 0x76, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0x69, 0x9d, 0x01, 0x58, - 0x20, 0x01, 0xd0, 0x67, 0x00, 0x06, 0x90, 0x0e, 0x24, 0x00, 0x08, 0x0c, - 0x72, 0x5e, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x0e, 0x08, 0x07, 0x24, 0x18, - 0x08, 0x0c, 0x99, 0xb3, 0xba, 0xa0, 0x00, 0x86, 0x20, 0x41, 0x00, 0x01, - 0x20, 0x39, 0x00, 0x01, 0x26, 0x08, 0x08, 0x0c, 0x97, 0xca, 0x00, 0x8e, - 0x08, 0x0c, 0x96, 0x6d, 0x2f, 0x08, 0x26, 0x48, 0x08, 0x0c, 0xe7, 0x5d, - 0xb9, 0x3c, 0x81, 0xff, 0x09, 0x0c, 0x98, 0xa3, 0x08, 0x0c, 0xad, 0x18, - 0x01, 0x2e, 0x00, 0x7e, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x90, 0x66, 0x0a, - 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x01, - 0x29, 0x00, 0x60, 0x16, 0x20, 0x09, 0x00, 0x1f, 0x08, 0x0c, 0xb2, 0x0a, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, - 0x0c, 0xd8, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, - 0xb1, 0xdd, 0x01, 0xb8, 0x66, 0x0a, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, - 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x08, 0x29, 0x00, 0x60, 0x16, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0x17, 0xad, 0x00, 0xfe, 0x20, 0x09, 0x00, 0x21, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, - 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x20, 0x09, 0x00, 0x3d, 0x00, 0xc6, - 0x01, 0x26, 0x00, 0x16, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb1, 0x16, - 0x01, 0x98, 0x66, 0x0a, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, - 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x00, 0x1e, 0x00, 0x16, - 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd0, 0x00, 0xc6, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb1, 0xdd, 0x01, 0x88, 0x2b, 0x08, - 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, - 0x60, 0x16, 0x20, 0x09, 0x00, 0x00, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, - 0x20, 0x09, 0x00, 0x44, 0x08, 0x30, 0x20, 0x09, 0x00, 0x49, 0x08, 0x18, - 0x00, 0x26, 0x00, 0xb6, 0x62, 0x10, 0x22, 0x58, 0xba, 0x3c, 0x82, 0xff, - 0x01, 0x18, 0x82, 0x11, 0xba, 0x3e, 0x11, 0x40, 0xb8, 0xd0, 0x90, 0x05, - 0x01, 0x28, 0xb8, 0x88, 0x90, 0x05, 0x11, 0x10, 0xb8, 0x8b, 0x00, 0x01, - 0x00, 0xbe, 0x00, 0x2e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x60, 0x04, - 0x90, 0x8e, 0x00, 0x02, 0x01, 0x40, 0x90, 0x8e, 0x00, 0x03, 0x01, 0x28, - 0x90, 0x8e, 0x00, 0x04, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x86, 0x00, 0x96, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x04, 0x01, 0xa8, 0x60, 0x14, 0x90, 0x4d, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0x80, 0xa8, 0x64, 0x90, 0x86, 0x01, 0x39, 0x01, 0x70, - 0x60, 0x20, 0x90, 0xc6, 0x00, 0x03, 0x01, 0x40, 0x90, 0xc6, 0x00, 0x02, - 0x01, 0x28, 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x10, 0x90, 0x06, 0x00, 0x10, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x9e, 0x00, 0x8e, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb1, 0xdd, - 0x01, 0x98, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, - 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x08, 0x0c, 0x33, 0x15, 0x20, 0x09, - 0x00, 0x28, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, - 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x91, 0x86, 0x00, 0x15, - 0x11, 0xa8, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, 0x90, 0x86, 0x00, 0x74, - 0x11, 0x78, 0x00, 0xb6, 0x08, 0x0c, 0xbe, 0x09, 0x00, 0xbe, 0x08, 0x0c, - 0xc0, 0x85, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x29, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x78, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x68, 0x00, 0x9e, 0xd0, 0xfc, 0x01, 0x48, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0xd5, 0x7c, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x09, 0x0c, - 0x0d, 0x85, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, - 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x04, 0xa8, 0x67, 0x01, 0x39, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x00, 0x9e, - 0x08, 0x0c, 0xb1, 0x6c, 0x0c, 0x30, 0x00, 0x96, 0x91, 0x86, 0x00, 0x16, - 0x11, 0x28, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, 0x66, 0xfa, 0x00, 0xe8, - 0x91, 0x86, 0x00, 0x15, 0x15, 0x10, 0x20, 0x11, 0x18, 0x24, 0x22, 0x04, - 0x90, 0x86, 0x00, 0x14, 0x11, 0xe0, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0x08, 0x0c, 0x68, 0x4f, 0x00, 0xbe, 0x08, 0x0c, 0xc1, 0x5b, 0x11, 0x98, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x90, 0x00, 0xbe, 0x90, 0x05, - 0x01, 0x60, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x68, 0xd0, 0xfc, 0x01, 0x70, 0x08, 0x0c, 0xb5, 0x7c, - 0x00, 0x48, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x68, 0xd0, 0xfc, 0x05, 0x28, - 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x9e, 0x00, 0x05, - 0x60, 0x14, 0x63, 0x10, 0x23, 0x58, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, - 0x90, 0x0e, 0x08, 0x0c, 0x6a, 0xae, 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, - 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, 0xa9, 0x9a, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x08, 0x0c, 0xb1, 0x6c, - 0x08, 0xf8, 0x60, 0x14, 0x90, 0x4d, 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x7b, - 0x00, 0x30, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, - 0x00, 0x04, 0xa8, 0x67, 0x01, 0x39, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x40, - 0xa8, 0x78, 0x90, 0x86, 0x00, 0x05, 0x11, 0x08, 0x00, 0x09, 0x00, 0x05, - 0xa8, 0x80, 0xc0, 0xad, 0xa8, 0x82, 0x00, 0x05, 0x60, 0x4b, 0x00, 0x00, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x50, - 0x20, 0x09, 0x80, 0x23, 0x08, 0x0c, 0x96, 0x17, 0x00, 0x05, 0x00, 0xc6, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, - 0x01, 0x30, 0x00, 0x66, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x1b, - 0x00, 0x6e, 0x00, 0xce, 0x00, 0x05, 0xcb, 0xf9, 0xd2, 0x59, 0xd2, 0x59, - 0xd2, 0x5c, 0xea, 0xdc, 0xea, 0xf7, 0xea, 0xfa, 0xcb, 0xf9, 0xcb, 0xf9, - 0xcb, 0xf9, 0xcb, 0xf9, 0xcb, 0xf9, 0xcb, 0xf9, 0xcb, 0xf9, 0xcb, 0xf9, - 0xcb, 0xf9, 0x08, 0x0c, 0x0d, 0x85, 0xa0, 0x01, 0xa0, 0x01, 0x00, 0x05, - 0x00, 0x96, 0x60, 0x14, 0x90, 0x4d, 0x01, 0x18, 0xa8, 0x7c, 0xd0, 0xe4, - 0x11, 0x10, 0x00, 0x9e, 0x00, 0x10, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xbc, 0x05, 0x50, - 0x20, 0x01, 0x18, 0x34, 0x20, 0x04, 0x90, 0x05, 0x15, 0x40, 0x00, 0xf6, - 0x2c, 0x78, 0x08, 0x0c, 0xb1, 0x16, 0x05, 0x08, 0x78, 0x10, 0x60, 0x12, - 0x08, 0x0c, 0xd3, 0xb6, 0x78, 0x20, 0x90, 0x86, 0x00, 0x03, 0x01, 0x28, - 0x78, 0x08, 0x60, 0x3a, 0x2f, 0x00, 0x60, 0x3e, 0x00, 0x20, 0x78, 0x08, - 0x60, 0x3e, 0x2f, 0x00, 0x60, 0x3a, 0x60, 0x2e, 0x60, 0x23, 0x00, 0x01, - 0x60, 0x07, 0x00, 0x35, 0x60, 0x03, 0x00, 0x01, 0x79, 0x5c, 0x61, 0x5e, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x2f, 0x60, 0x00, 0xfe, - 0x00, 0x05, 0x2f, 0x60, 0x00, 0xfe, 0x20, 0x01, 0x19, 0x88, 0x20, 0x04, - 0x60, 0x4a, 0x00, 0x05, 0x00, 0x16, 0x00, 0x96, 0x68, 0x14, 0x20, 0x48, - 0x68, 0x1c, 0xd0, 0xfc, 0xc0, 0xfc, 0x68, 0x1e, 0xa8, 0x7c, 0x11, 0x08, - 0xd0, 0xe4, 0x01, 0x80, 0xc0, 0xe4, 0xa8, 0x7e, 0xa8, 0x77, 0x00, 0x00, - 0xa8, 0x93, 0x00, 0x00, 0xa8, 0x8f, 0x00, 0x00, 0xd0, 0xcc, 0x01, 0x30, - 0xc0, 0xcc, 0xa8, 0x7e, 0xa8, 0x78, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, - 0x68, 0x30, 0x60, 0x36, 0x90, 0x8e, 0x00, 0x01, 0x01, 0x48, 0x68, 0x03, - 0x00, 0x02, 0x90, 0x86, 0x00, 0x05, 0x01, 0x70, 0x90, 0x06, 0x60, 0x2e, - 0x60, 0x32, 0x00, 0xd0, 0x68, 0x1c, 0xc0, 0x85, 0x68, 0x1e, 0x68, 0x03, - 0x00, 0x04, 0x68, 0x24, 0xc0, 0xf4, 0x90, 0x85, 0x0c, 0x00, 0x68, 0x26, - 0x68, 0x14, 0x20, 0x48, 0xa8, 0xac, 0x69, 0x38, 0x91, 0x02, 0xa8, 0xb0, - 0x69, 0x3c, 0x91, 0x03, 0x1e, 0x48, 0x68, 0x3c, 0x60, 0x2e, 0x68, 0x38, - 0x90, 0x84, 0xff, 0xfc, 0x68, 0x3a, 0x60, 0x32, 0x2d, 0x00, 0x60, 0x3a, - 0x68, 0x08, 0x60, 0x3e, 0x69, 0x10, 0x61, 0x12, 0x69, 0x5c, 0x61, 0x5e, - 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x39, 0x60, 0x03, 0x00, 0x01, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0x9e, 0x00, 0x1e, - 0x00, 0x05, 0x60, 0x24, 0xd0, 0xd4, 0x05, 0x10, 0xd0, 0xf4, 0x11, 0xf8, - 0x60, 0x38, 0x94, 0x0a, 0x60, 0x3c, 0x93, 0x03, 0x02, 0x30, 0x91, 0x05, - 0x01, 0x20, 0x60, 0x24, 0xc0, 0xd4, 0xc0, 0xf5, 0x00, 0x98, 0x64, 0x3a, - 0x63, 0x3e, 0xac, 0x3e, 0xab, 0x42, 0x00, 0x46, 0x00, 0x36, 0x24, 0x00, - 0xac, 0xac, 0x94, 0x02, 0xa8, 0x36, 0x23, 0x00, 0xab, 0xb0, 0x93, 0x03, - 0xa8, 0x3a, 0x00, 0x3e, 0x00, 0x4e, 0x60, 0x24, 0xc0, 0xd4, 0x00, 0x00, - 0x60, 0x26, 0x00, 0x05, 0xd0, 0xf4, 0x11, 0x38, 0xa8, 0x3c, 0x60, 0x3a, - 0xa8, 0x40, 0x60, 0x3e, 0x60, 0x24, 0xc0, 0xf5, 0x60, 0x26, 0x00, 0x05, - 0x00, 0x06, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x34, 0x01, 0xb8, - 0x90, 0x8e, 0x00, 0x35, 0x01, 0xa0, 0x90, 0x8e, 0x00, 0x36, 0x01, 0x88, - 0x90, 0x8e, 0x00, 0x37, 0x01, 0x70, 0x90, 0x8e, 0x00, 0x38, 0x01, 0x58, - 0x90, 0x8e, 0x00, 0x39, 0x01, 0x40, 0x90, 0x8e, 0x00, 0x3a, 0x01, 0x28, - 0x90, 0x8e, 0x00, 0x3b, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, - 0x00, 0xe6, 0x20, 0x01, 0x19, 0x82, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, - 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x95, 0x5b, 0x20, 0x01, 0x19, 0x86, - 0x82, 0xff, 0x11, 0x10, 0x20, 0x11, 0x00, 0x14, 0x22, 0x02, 0x20, 0x01, - 0x19, 0x84, 0x20, 0x0c, 0x80, 0x00, 0x20, 0x14, 0x20, 0x71, 0x19, 0x6c, - 0x71, 0x1a, 0x72, 0x1e, 0x20, 0x01, 0x00, 0x64, 0x08, 0x0c, 0x95, 0x5b, - 0x20, 0x01, 0x19, 0x87, 0x82, 0xff, 0x11, 0x10, 0x20, 0x11, 0x00, 0x14, - 0x22, 0x02, 0x20, 0x01, 0x19, 0x88, 0x92, 0x88, 0x00, 0x0a, 0x21, 0x02, - 0x20, 0x01, 0x00, 0x17, 0x08, 0x0c, 0xac, 0xed, 0x20, 0x01, 0x1a, 0x90, - 0x21, 0x02, 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x16, 0xb9, 0x08, 0x0c, - 0x6b, 0xf2, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0xe6, 0x20, 0x01, 0x19, 0x86, - 0x20, 0x03, 0x00, 0x28, 0x20, 0x01, 0x19, 0x87, 0x20, 0x03, 0x00, 0x14, - 0x20, 0x71, 0x19, 0x6c, 0x70, 0x1b, 0x00, 0x00, 0x70, 0x1f, 0x07, 0xd0, - 0x20, 0x01, 0x19, 0x88, 0x20, 0x09, 0x00, 0x1e, 0x21, 0x02, 0x20, 0x01, - 0x00, 0x17, 0x08, 0x0c, 0xac, 0xed, 0x20, 0x01, 0x1a, 0x90, 0x21, 0x02, - 0x20, 0x01, 0x00, 0x32, 0x08, 0x0c, 0x16, 0xb9, 0x00, 0xee, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x96, 0x60, 0x60, 0x90, 0x4d, 0x01, 0x10, - 0x08, 0x0c, 0x10, 0x8b, 0x00, 0x9e, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x80, - 0x2b, 0x08, 0x61, 0x12, 0x0c, 0xa9, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, - 0x60, 0x16, 0x20, 0x09, 0x00, 0x33, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, - 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, - 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, - 0x00, 0x15, 0x15, 0x20, 0x70, 0x90, 0x90, 0x86, 0x00, 0x18, 0x01, 0x20, - 0x70, 0x90, 0x90, 0x86, 0x00, 0x14, 0x11, 0xe0, 0x60, 0x14, 0x20, 0x48, - 0xaa, 0x3c, 0xd2, 0xe4, 0x11, 0x60, 0x2c, 0x78, 0x08, 0x0c, 0x9b, 0x83, - 0x01, 0xd8, 0x70, 0x7c, 0xaa, 0x50, 0x92, 0x06, 0x11, 0x60, 0x70, 0x80, - 0xaa, 0x54, 0x92, 0x06, 0x11, 0x40, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, - 0xba, 0xa0, 0x00, 0xbe, 0x90, 0x0e, 0x08, 0x0c, 0x33, 0x64, 0x08, 0x0c, - 0xb5, 0x7c, 0x00, 0x20, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, 0x00, 0x05, 0x70, 0x60, 0xaa, 0x54, - 0x92, 0x06, 0x0d, 0x48, 0x0c, 0x80, 0x00, 0xc6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x08, 0x0c, 0xb1, 0x16, 0x01, 0x88, 0x2b, 0x08, 0x61, 0x12, - 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, - 0x20, 0x09, 0x00, 0x4d, 0x08, 0x0c, 0xb2, 0x0a, 0x90, 0x85, 0x00, 0x01, - 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xd8, 0x00, 0xc6, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x00, 0x16, 0x08, 0x0c, 0xb1, 0x16, - 0x01, 0x80, 0x2b, 0x08, 0x61, 0x12, 0x08, 0x0c, 0xd3, 0xb6, 0x60, 0x23, - 0x00, 0x01, 0x29, 0x00, 0x60, 0x16, 0x00, 0x1e, 0x08, 0x0c, 0xb2, 0x0a, - 0x90, 0x85, 0x00, 0x01, 0x01, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x00, 0x1e, - 0x90, 0x06, 0x0c, 0xd0, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, - 0x00, 0x56, 0x00, 0x66, 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, - 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, 0x15, 0x68, 0x71, 0x90, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x14, 0x80, 0x03, 0x91, 0x06, 0x15, 0x30, 0x20, 0xe1, - 0x00, 0x00, 0x20, 0x01, 0x19, 0xa1, 0x20, 0x03, 0x00, 0x00, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x30, 0x20, 0xa8, 0x89, 0x06, 0x80, 0x06, 0x80, 0x07, - 0x90, 0x94, 0x00, 0x3f, 0x22, 0xe8, 0x90, 0x84, 0xff, 0xc0, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, 0x19, 0xa1, 0x00, 0x16, 0x20, 0x0c, - 0x08, 0x0c, 0xdc, 0xa1, 0x00, 0x1e, 0xa8, 0x04, 0x90, 0x05, 0x01, 0x10, - 0x20, 0x48, 0x0c, 0x38, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x67, 0x01, 0x03, - 0x00, 0x10, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xfe, - 0x00, 0xee, 0x00, 0x9e, 0x00, 0x6e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x96, 0x00, 0xe6, 0x00, 0xf6, - 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, 0x11, 0xb8, 0x70, 0x90, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x98, 0x60, 0x14, 0x20, 0x48, 0x2c, 0x78, - 0x08, 0x0c, 0x9b, 0x83, 0x01, 0xa8, 0x70, 0x7c, 0xaa, 0x74, 0x92, 0x06, - 0x11, 0x30, 0x70, 0x80, 0xaa, 0x78, 0x92, 0x06, 0x11, 0x10, 0x08, 0x0c, - 0x33, 0x15, 0x08, 0x0c, 0xb5, 0x7c, 0x00, 0x20, 0x08, 0x0c, 0xbb, 0x5c, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, 0x00, 0x05, - 0x70, 0x60, 0xaa, 0x78, 0x92, 0x06, 0x0d, 0x78, 0x0c, 0x80, 0x00, 0x96, - 0x00, 0xe6, 0x00, 0xf6, 0x20, 0x71, 0x18, 0x00, 0x91, 0x86, 0x00, 0x15, - 0x15, 0x50, 0x70, 0x90, 0x90, 0x86, 0x00, 0x04, 0x15, 0x30, 0x60, 0x14, - 0x20, 0x48, 0x2c, 0x78, 0x08, 0x0c, 0x9b, 0x83, 0x05, 0xf0, 0x70, 0x7c, - 0xaa, 0xcc, 0x92, 0x06, 0x11, 0x80, 0x70, 0x80, 0xaa, 0xd0, 0x92, 0x06, - 0x11, 0x60, 0x08, 0x0c, 0x33, 0x15, 0x00, 0x16, 0xa9, 0x98, 0xaa, 0xb0, - 0x92, 0x84, 0x10, 0x00, 0xc0, 0xfd, 0x08, 0x0c, 0x57, 0xe9, 0x00, 0x1e, - 0x00, 0x10, 0x08, 0x0c, 0x55, 0xcc, 0x08, 0x0c, 0xcf, 0x1b, 0x05, 0x08, - 0xa8, 0x7b, 0x00, 0x00, 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x97, 0x40, 0x00, - 0x00, 0x80, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xb8, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0x55, 0xcc, 0x1d, 0x70, 0xa8, 0x7b, 0x00, 0x30, 0xa8, 0x83, - 0x00, 0x00, 0xa8, 0x97, 0x40, 0x05, 0xa8, 0x9b, 0x00, 0x04, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0xa8, 0x67, 0x01, 0x39, 0x08, 0x0c, 0x70, 0x12, - 0x01, 0x2e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xfe, 0x00, 0xee, 0x00, 0x9e, - 0x00, 0x05, 0x70, 0x60, 0xaa, 0xd0, 0x92, 0x06, 0x09, 0x30, 0x08, 0x88, - 0x00, 0x16, 0x00, 0x26, 0xa8, 0x7c, 0xd0, 0xac, 0x01, 0x78, 0xa9, 0x38, - 0xaa, 0x34, 0x21, 0x00, 0x92, 0x05, 0x01, 0x50, 0xa8, 0x90, 0x91, 0x06, - 0x11, 0x18, 0xa8, 0x8c, 0x92, 0x06, 0x01, 0x20, 0xa9, 0x92, 0xaa, 0x8e, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xb6, - 0x00, 0xd6, 0x00, 0x36, 0x08, 0x0c, 0xcf, 0x1b, 0x09, 0x04, 0xd5, 0x78, - 0x00, 0x96, 0x63, 0x14, 0x23, 0x48, 0xa8, 0x7a, 0xa9, 0x82, 0x92, 0x9e, - 0x40, 0x00, 0x15, 0x80, 0x63, 0x10, 0x00, 0xc6, 0x23, 0x58, 0x20, 0x09, - 0x00, 0x00, 0xa8, 0x68, 0xd0, 0xf4, 0x11, 0x40, 0x08, 0x0c, 0x6a, 0xae, - 0x11, 0x08, 0xc1, 0x85, 0xb8, 0x00, 0xd0, 0xbc, 0x01, 0x08, 0xc1, 0x8d, - 0xaa, 0x96, 0xa9, 0x9a, 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, 0x20, 0xa0, 0xb8, 0xc4, 0x20, 0xe0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x06, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0xd6, - 0x20, 0xa9, 0x00, 0x04, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x35, 0x20, 0xa0, - 0xb8, 0xc8, 0x90, 0x80, 0x00, 0x0a, 0x20, 0x98, 0x08, 0x0c, 0x0f, 0xd6, - 0x00, 0xce, 0x00, 0x90, 0xaa, 0x96, 0x39, 0x18, 0x93, 0x98, 0x00, 0x07, - 0x23, 0x1c, 0x60, 0x04, 0x90, 0x86, 0x00, 0x16, 0x01, 0x10, 0xa8, 0x9b, - 0x00, 0x04, 0xab, 0xa2, 0x63, 0x10, 0x23, 0x58, 0xb8, 0x04, 0x90, 0x84, - 0x00, 0xff, 0xa8, 0x9e, 0xa8, 0x68, 0xc0, 0xf4, 0xa8, 0x6a, 0x08, 0x0c, - 0x70, 0x06, 0x60, 0x17, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x3e, 0x00, 0xde, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x00, 0x46, 0x00, 0xb6, - 0x00, 0x96, 0x00, 0xf6, 0x62, 0x14, 0x22, 0x48, 0x62, 0x10, 0x22, 0x58, - 0x20, 0x79, 0x02, 0x60, 0x90, 0x96, 0x00, 0x00, 0x11, 0xa0, 0xb8, 0x14, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x0e, 0x08, 0x0c, 0x26, 0x8c, 0x21, 0x18, - 0x83, 0x1f, 0x93, 0x9c, 0xff, 0x00, 0x78, 0x38, 0x90, 0x84, 0x00, 0xff, - 0x93, 0x1d, 0x7c, 0x3c, 0x20, 0x11, 0x80, 0x18, 0x08, 0x0c, 0x4c, 0xa1, - 0x00, 0xa8, 0x90, 0x96, 0x00, 0x01, 0x11, 0x48, 0x89, 0xff, 0x01, 0x80, - 0xa8, 0x9b, 0x00, 0x0d, 0x78, 0x38, 0xa8, 0xa6, 0x78, 0x3c, 0xa8, 0xaa, - 0x00, 0x48, 0x90, 0x96, 0x00, 0x02, 0x11, 0x30, 0xa8, 0x9b, 0x00, 0x0d, - 0x78, 0x38, 0xa8, 0xa6, 0x78, 0x3c, 0xa8, 0xaa, 0x00, 0xfe, 0x00, 0x9e, - 0x00, 0xbe, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0x26, 0x00, 0x16, 0x91, 0x86, 0x00, 0x35, 0x01, 0x10, 0x6a, 0x38, - 0x00, 0x08, 0x6a, 0x2c, 0x08, 0x0c, 0xcf, 0x09, 0x01, 0xf0, 0x22, 0x60, - 0x61, 0x20, 0x91, 0x86, 0x00, 0x03, 0x01, 0x18, 0x91, 0x86, 0x00, 0x06, - 0x11, 0x90, 0x68, 0x38, 0x92, 0x06, 0x01, 0x40, 0x68, 0x3c, 0x92, 0x06, - 0x11, 0x60, 0x61, 0x08, 0x68, 0x38, 0x91, 0x06, 0x11, 0x40, 0x00, 0x20, - 0x60, 0x08, 0x69, 0x3c, 0x91, 0x06, 0x11, 0x18, 0x60, 0x10, 0x69, 0x10, - 0x91, 0x06, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0xce, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x0c, 0xc8, 0xa9, 0x74, 0xd1, 0xcc, 0x01, 0x98, 0x91, 0x8c, - 0x00, 0xff, 0x91, 0x8e, 0x00, 0x02, 0x11, 0x70, 0xa9, 0xa8, 0x91, 0x8c, - 0x00, 0x0f, 0x91, 0x8e, 0x00, 0x01, 0x11, 0x40, 0xa8, 0x7c, 0xd0, 0xac, - 0x01, 0x28, 0xa8, 0x34, 0xa9, 0x38, 0x91, 0x15, 0x19, 0x0c, 0xc5, 0x19, - 0x00, 0x05, 0x00, 0x36, 0x20, 0x19, 0x00, 0x01, 0x00, 0x10, 0x00, 0x36, - 0x90, 0x1e, 0x04, 0x99, 0x01, 0xe0, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xc8, - 0x08, 0x0c, 0xd1, 0x0c, 0x60, 0x37, 0x40, 0x00, 0x60, 0x14, 0x60, 0x17, - 0x00, 0x00, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0x08, 0x0c, 0xd1, 0x32, - 0x11, 0x18, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x40, 0xa8, 0x67, 0x01, 0x03, - 0xa8, 0x77, 0x00, 0x00, 0x83, 0xff, 0x11, 0x29, 0x08, 0x0c, 0x70, 0x12, - 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, 0xa8, 0x80, 0xd0, 0xb4, 0x01, 0x28, - 0xa8, 0x7b, 0x00, 0x06, 0xc0, 0xec, 0xa8, 0x82, 0x00, 0x48, 0xd0, 0xbc, - 0x01, 0x18, 0xa8, 0x7b, 0x00, 0x02, 0x00, 0x20, 0xa8, 0x7b, 0x00, 0x05, - 0x08, 0x0c, 0xd2, 0x26, 0xa8, 0x77, 0x00, 0x00, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xec, 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, - 0x18, 0x10, 0x20, 0x04, 0xd0, 0xf4, 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, - 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0xe4, 0x00, 0x0e, 0x00, 0x05, - 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, - 0x00, 0xbe, 0x20, 0x21, 0x00, 0x07, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x4e, - 0x00, 0x3e, 0x00, 0x05, 0x0c, 0x51, 0x1d, 0x81, 0x00, 0x05, 0x20, 0x01, - 0x19, 0x86, 0x20, 0x04, 0x60, 0x1a, 0x00, 0x05, 0x20, 0x01, 0x19, 0x88, - 0x20, 0x04, 0x60, 0x4a, 0x00, 0x05, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x04, - 0x9a, 0xb3, 0x61, 0x1c, 0xd1, 0xfc, 0xa9, 0x7c, 0x11, 0x08, 0xd1, 0xe4, - 0x00, 0x05, 0x60, 0x1c, 0xd0, 0xfc, 0xa8, 0x7c, 0x11, 0x08, 0xd0, 0xe4, - 0x00, 0x05, 0x60, 0x1c, 0xd0, 0xfc, 0xc0, 0xfc, 0x60, 0x1e, 0xa8, 0x7c, - 0x11, 0x08, 0xd0, 0xe4, 0x00, 0x05, 0x60, 0x44, 0xd0, 0xfc, 0x11, 0x38, - 0xd0, 0xbc, 0x01, 0xa0, 0xc0, 0xbc, 0x60, 0x46, 0x20, 0x01, 0x00, 0x02, - 0x00, 0x80, 0xd0, 0xac, 0x11, 0x68, 0xd0, 0xdc, 0x11, 0x28, 0x90, 0x8c, - 0x00, 0x0f, 0x91, 0x86, 0x00, 0x05, 0x11, 0x18, 0x20, 0x01, 0x00, 0x03, - 0x00, 0x20, 0x20, 0x01, 0x00, 0x01, 0x00, 0x08, 0x60, 0x00, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0x66, 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x00, 0x1b, 0x00, 0x6e, 0x00, 0xbe, 0x00, 0x05, 0xd6, 0xb5, - 0xdd, 0xfe, 0xdf, 0x62, 0xd6, 0xb5, 0xd6, 0xb5, 0xd6, 0xb5, 0xd6, 0xb5, - 0xd6, 0xb5, 0xd6, 0xec, 0xdf, 0xe6, 0xd6, 0xb5, 0xd6, 0xb5, 0xd6, 0xb5, - 0xd6, 0xb5, 0xd6, 0xb5, 0xd6, 0xb5, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x66, - 0x60, 0x00, 0x90, 0xb2, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x13, - 0x00, 0x6e, 0x00, 0x05, 0xd6, 0xd0, 0xe5, 0x0b, 0xd6, 0xd0, 0xd6, 0xd0, - 0xd6, 0xd0, 0xd6, 0xd0, 0xd6, 0xd0, 0xd6, 0xd0, 0xe4, 0xba, 0xe5, 0x5d, - 0xd6, 0xd0, 0xec, 0x10, 0xec, 0x44, 0xec, 0x10, 0xec, 0x44, 0xd6, 0xd0, - 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x00, 0x90, 0x82, 0x00, 0x10, 0x1a, 0x0c, - 0x0d, 0x85, 0x60, 0x00, 0x00, 0x0a, 0x00, 0x05, 0xd6, 0xea, 0xe1, 0xc3, - 0xe2, 0x8e, 0xe2, 0xb1, 0xe3, 0x2d, 0xd6, 0xea, 0xe4, 0x2a, 0xe3, 0xb5, - 0xdf, 0xf0, 0xe4, 0x92, 0xe4, 0xa7, 0xd6, 0xea, 0xd6, 0xea, 0xd6, 0xea, - 0xd6, 0xea, 0xd6, 0xea, 0x08, 0x0c, 0x0d, 0x85, 0x91, 0xb2, 0x00, 0x53, - 0x1a, 0x0c, 0x0d, 0x85, 0x21, 0x00, 0x91, 0xb2, 0x00, 0x40, 0x1a, 0x04, - 0xdb, 0x70, 0x00, 0x02, 0xd7, 0x36, 0xd9, 0x3e, 0xd7, 0x36, 0xd7, 0x36, - 0xd7, 0x36, 0xd9, 0x47, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, - 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, - 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, - 0xd7, 0x36, 0xd7, 0x38, 0xd7, 0x9f, 0xd7, 0xae, 0xd8, 0x12, 0xd8, 0x3d, - 0xd8, 0xb6, 0xd9, 0x29, 0xd7, 0x36, 0xd7, 0x36, 0xd9, 0x4a, 0xd7, 0x36, - 0xd7, 0x36, 0xd9, 0x5f, 0xd9, 0x6c, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, - 0xd7, 0x36, 0xd7, 0x36, 0xda, 0x12, 0xd7, 0x36, 0xd7, 0x36, 0xda, 0x26, - 0xd7, 0x36, 0xd7, 0x36, 0xd9, 0xe1, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, - 0xda, 0x3e, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xda, 0xbb, 0xd7, 0x36, - 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xd7, 0x36, 0xdb, 0x38, - 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x6b, 0xcf, 0x11, 0x50, 0x20, 0x01, - 0x18, 0x37, 0x20, 0x04, 0xd0, 0xcc, 0x11, 0x28, 0x90, 0x84, 0x00, 0x09, - 0x90, 0x86, 0x00, 0x08, 0x11, 0x40, 0x60, 0x07, 0x00, 0x09, 0x60, 0x2f, - 0x00, 0x09, 0x60, 0x17, 0x00, 0x00, 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, - 0x6b, 0x6b, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x36, 0x00, 0x26, 0x00, 0x16, - 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, 0x00, 0x26, 0x20, 0x19, 0x00, 0x29, - 0x08, 0x0c, 0xac, 0xfc, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, 0x90, 0x3e, - 0x08, 0x0c, 0x96, 0x6d, 0x2c, 0x08, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, - 0x00, 0x1e, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x1e, 0x00, 0x2e, 0x00, 0x3e, - 0x00, 0xce, 0x00, 0xee, 0x66, 0x10, 0x26, 0x58, 0x08, 0x0c, 0x67, 0xc3, - 0xbe, 0x04, 0x96, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x12, 0x68, - 0x00, 0x16, 0x00, 0x26, 0x62, 0x10, 0x00, 0xb6, 0x22, 0x58, 0xba, 0xa0, - 0x00, 0xbe, 0x2c, 0x08, 0x08, 0x0c, 0xee, 0x6f, 0x00, 0x2e, 0x00, 0x1e, - 0x11, 0x78, 0x08, 0x0c, 0xe6, 0x8b, 0x19, 0x04, 0xd8, 0x0a, 0x08, 0x0c, - 0xe6, 0x27, 0x11, 0x20, 0x60, 0x07, 0x00, 0x08, 0x08, 0x04, 0xd9, 0x37, - 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, 0xe9, 0x05, - 0x01, 0x28, 0x08, 0x0c, 0xe6, 0x8b, 0x0d, 0x78, 0x08, 0x04, 0xd8, 0x0a, - 0x60, 0x17, 0x19, 0x00, 0x0c, 0x88, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, - 0xdb, 0x6d, 0x61, 0x06, 0x08, 0x0c, 0xe5, 0xc7, 0x60, 0x07, 0x00, 0x06, - 0x08, 0x04, 0xd9, 0x37, 0x60, 0x07, 0x00, 0x07, 0x08, 0x04, 0xd9, 0x37, - 0x08, 0x0c, 0xec, 0x80, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0x34, 0x4c, - 0x19, 0x04, 0xdb, 0x6d, 0x00, 0xd6, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, - 0x96, 0x84, 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x12, 0x20, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x66, 0xe6, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, - 0x96, 0x86, 0x00, 0x06, 0x01, 0x88, 0x96, 0x86, 0x00, 0x04, 0x01, 0x70, - 0xbe, 0x04, 0x96, 0xb4, 0x00, 0xff, 0x96, 0x86, 0x00, 0x06, 0x01, 0x40, - 0x96, 0x86, 0x00, 0x04, 0x01, 0x28, 0x96, 0x86, 0x00, 0x05, 0x01, 0x10, - 0x00, 0xde, 0x04, 0x80, 0x00, 0xe6, 0x20, 0x71, 0x02, 0x60, 0x70, 0x34, - 0x90, 0x84, 0x00, 0x03, 0x11, 0x40, 0x70, 0x34, 0x90, 0x82, 0x00, 0x14, - 0x02, 0x20, 0x70, 0x30, 0x90, 0x84, 0x00, 0x03, 0x01, 0x30, 0x00, 0xee, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x2f, 0x00, 0x07, 0x00, 0xb0, 0x00, 0xee, - 0x08, 0x0c, 0xe6, 0xf3, 0x11, 0x90, 0x96, 0x86, 0x00, 0x06, 0x11, 0x40, - 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, 0x90, 0x0e, 0x08, 0x0c, - 0x33, 0x64, 0x00, 0x2e, 0x08, 0x0c, 0x68, 0x4f, 0x60, 0x07, 0x00, 0x0a, - 0x00, 0xde, 0x08, 0x04, 0xd9, 0x37, 0x60, 0x07, 0x00, 0x0b, 0x00, 0xde, - 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, - 0x60, 0x07, 0x00, 0x01, 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, 0xec, 0x80, - 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, - 0x20, 0x71, 0x02, 0x60, 0x70, 0x34, 0x90, 0xb4, 0x00, 0x03, 0x19, 0x48, - 0x90, 0xb2, 0x00, 0x14, 0x0a, 0x30, 0x70, 0x30, 0x90, 0x84, 0x00, 0x03, - 0x19, 0x10, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, 0x96, 0x86, 0x07, 0x07, - 0x09, 0xe8, 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, 0xba, 0xa0, 0x90, 0x0e, - 0x08, 0x0c, 0x33, 0x64, 0x00, 0x2e, 0x60, 0x07, 0x00, 0x0c, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0xee, 0x4e, 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, - 0x6b, 0xcf, 0x11, 0x40, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0x90, 0x84, - 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x11, 0x10, 0x08, 0x04, 0xd7, 0x45, - 0x08, 0x0c, 0x6b, 0x6b, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, 0x96, 0x84, - 0x00, 0xff, 0x90, 0x82, 0x00, 0x06, 0x06, 0xc8, 0x11, 0x38, 0x00, 0x26, - 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0x67, 0x26, 0x00, 0x2e, 0x00, 0x50, - 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x04, 0x01, 0x20, - 0x96, 0x86, 0x00, 0x06, 0x19, 0x04, 0xd8, 0x0a, 0x08, 0x0c, 0xe7, 0x00, - 0x11, 0x20, 0x60, 0x07, 0x00, 0x0e, 0x08, 0x04, 0xd9, 0x37, 0x00, 0x46, - 0x64, 0x10, 0x24, 0x58, 0xbc, 0xa0, 0x00, 0x46, 0x08, 0x0c, 0x33, 0x15, - 0x08, 0x0c, 0xd6, 0x5a, 0x00, 0x4e, 0x00, 0x16, 0x90, 0x06, 0x20, 0x09, - 0x18, 0x48, 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x48, 0x20, 0x09, 0x00, 0x29, - 0x08, 0x0c, 0xea, 0x8d, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xc0, 0xe5, - 0xb8, 0x02, 0x00, 0x1e, 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, 0x08, 0x04, - 0xd9, 0x37, 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0x66, 0xe6, 0x01, 0x56, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, - 0x18, 0x05, 0x20, 0x11, 0x02, 0x70, 0x08, 0x0c, 0xc2, 0x0e, 0x00, 0x3e, - 0x00, 0x2e, 0x00, 0x1e, 0x01, 0x5e, 0x90, 0x05, 0x01, 0x68, 0x96, 0xb4, - 0xff, 0x00, 0x86, 0x37, 0x96, 0x82, 0x00, 0x04, 0x0a, 0x04, 0xd8, 0x0a, - 0x96, 0x82, 0x00, 0x07, 0x0a, 0x04, 0xd8, 0x66, 0x08, 0x04, 0xd8, 0x0a, - 0x60, 0x17, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, 0x08, 0x04, 0xd9, 0x37, - 0x08, 0x0c, 0x6b, 0xcf, 0x11, 0x40, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, - 0x90, 0x84, 0x00, 0x09, 0x90, 0x86, 0x00, 0x08, 0x11, 0x10, 0x08, 0x04, - 0xd7, 0x45, 0x08, 0x0c, 0x6b, 0x6b, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, - 0x96, 0x84, 0x00, 0xff, 0x00, 0x06, 0x00, 0x16, 0x90, 0x8e, 0x00, 0x01, - 0x01, 0x18, 0x90, 0x8e, 0x00, 0x00, 0x11, 0x18, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x80, 0x00, 0x1e, 0x00, 0x0e, 0x90, 0x82, 0x00, 0x06, 0x06, 0xa0, - 0x01, 0x50, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x04, - 0x01, 0x20, 0x96, 0x86, 0x00, 0x06, 0x19, 0x04, 0xd8, 0x0a, 0x08, 0x0c, - 0xe7, 0x2e, 0x11, 0x38, 0x08, 0x0c, 0xe6, 0x27, 0x11, 0x20, 0x60, 0x07, - 0x00, 0x10, 0x08, 0x04, 0xd9, 0x37, 0x00, 0x46, 0x64, 0x10, 0x24, 0x58, - 0xbc, 0xa0, 0x00, 0x46, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, 0xd6, 0x5a, - 0x00, 0x4e, 0x00, 0x16, 0x90, 0x06, 0x20, 0x09, 0x18, 0x48, 0x21, 0x0c, - 0xd1, 0xa4, 0x01, 0x48, 0x20, 0x09, 0x00, 0x29, 0x08, 0x0c, 0xea, 0x8d, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x00, 0xc0, 0xe5, 0xb8, 0x02, 0x00, 0x1e, - 0x00, 0x4e, 0x60, 0x07, 0x00, 0x01, 0x04, 0x48, 0x08, 0x0c, 0xe9, 0x05, - 0x01, 0x98, 0x00, 0x16, 0x96, 0x8c, 0x00, 0xff, 0x91, 0x86, 0x00, 0x02, - 0x01, 0x60, 0x91, 0x86, 0x00, 0x03, 0x01, 0x48, 0x00, 0x1e, 0x96, 0xb4, - 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, 0x09, 0x20, 0x08, 0x04, - 0xd8, 0x0a, 0x00, 0x1e, 0x60, 0x17, 0x19, 0x00, 0x60, 0x07, 0x00, 0x09, - 0x00, 0x70, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, - 0xec, 0x80, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0xdd, 0x3e, 0x19, 0x04, - 0xd8, 0x0a, 0x60, 0x07, 0x00, 0x12, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, 0x60, 0x07, 0x00, 0x01, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, - 0x0c, 0xb0, 0x60, 0x07, 0x00, 0x05, 0x0c, 0x68, 0x08, 0x0c, 0xec, 0x80, - 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, - 0x08, 0x0c, 0xdd, 0x3e, 0x19, 0x04, 0xd8, 0x0a, 0x60, 0x07, 0x00, 0x20, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, - 0x00, 0x05, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x60, 0x07, - 0x00, 0x23, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x05, 0x08, 0x0c, 0xec, 0x80, 0x19, 0x04, 0xdb, 0x6d, - 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0xdd, 0x3e, - 0x19, 0x04, 0xd8, 0x0a, 0x00, 0x16, 0x00, 0x26, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x60, 0x2c, 0x08, 0x20, 0x11, 0x18, 0x20, 0x22, 0x14, 0x70, 0x3c, - 0x92, 0x06, 0x11, 0xe0, 0x20, 0x11, 0x18, 0x1f, 0x22, 0x14, 0x70, 0x38, - 0x90, 0x84, 0x00, 0xff, 0x92, 0x06, 0x11, 0xa0, 0x72, 0x40, 0x08, 0x0c, - 0xcf, 0x09, 0x05, 0x70, 0x22, 0x60, 0x60, 0x08, 0x90, 0x86, 0xff, 0xff, - 0x01, 0x20, 0x72, 0x44, 0x60, 0x08, 0x92, 0x06, 0x15, 0x28, 0x60, 0x20, - 0x90, 0x86, 0x00, 0x07, 0x15, 0x08, 0x08, 0x0c, 0xb1, 0x6c, 0x04, 0xa0, - 0x72, 0x44, 0x92, 0x86, 0xff, 0xff, 0x01, 0x80, 0x2c, 0x08, 0x08, 0x0c, - 0xcf, 0x09, 0x01, 0xb0, 0x22, 0x60, 0x72, 0x40, 0x60, 0x08, 0x92, 0x06, - 0x11, 0x88, 0x60, 0x10, 0x91, 0x90, 0x00, 0x04, 0x22, 0x14, 0x92, 0x06, - 0x01, 0xb8, 0x00, 0x50, 0x72, 0x40, 0x2c, 0x08, 0x90, 0x06, 0x08, 0x0c, - 0xea, 0x57, 0x11, 0x80, 0x72, 0x44, 0x92, 0x86, 0xff, 0xff, 0x01, 0xb0, - 0x21, 0x60, 0x60, 0x07, 0x00, 0x26, 0x60, 0x17, 0x17, 0x00, 0x72, 0x14, - 0x92, 0x96, 0xff, 0xff, 0x11, 0x80, 0x60, 0x07, 0x00, 0x25, 0x00, 0x68, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x07, 0x1d, 0x80, 0x60, 0x04, 0x90, 0x86, - 0x00, 0x24, 0x11, 0x10, 0x08, 0x0c, 0xb1, 0x6c, 0x21, 0x60, 0x60, 0x07, - 0x00, 0x25, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0xee, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x05, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x66, 0xe6, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, - 0x02, 0x76, 0x08, 0x0c, 0xc2, 0x0e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x01, 0x20, 0x60, 0x07, 0x00, 0x31, 0x08, 0x04, 0xd9, 0x37, - 0x08, 0x0c, 0xbe, 0x21, 0x08, 0x0c, 0x77, 0x9e, 0x11, 0x90, 0x00, 0x06, - 0x00, 0x26, 0x00, 0x36, 0x08, 0x0c, 0x77, 0xb8, 0x11, 0x38, 0x08, 0x0c, - 0x7a, 0xb6, 0x08, 0x0c, 0x61, 0x9d, 0x08, 0x0c, 0x76, 0xcd, 0x00, 0x10, - 0x08, 0x0c, 0x77, 0x72, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x0e, 0x00, 0x05, - 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0xdd, 0x3e, - 0x19, 0x04, 0xd8, 0x0a, 0x61, 0x06, 0x08, 0x0c, 0xdd, 0x5a, 0x11, 0x20, - 0x60, 0x07, 0x00, 0x2b, 0x08, 0x04, 0xd9, 0x37, 0x60, 0x07, 0x00, 0x2c, - 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, 0xec, 0x80, 0x19, 0x04, 0xdb, 0x6d, - 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x08, 0x0c, 0xdd, 0x3e, - 0x19, 0x04, 0xd8, 0x0a, 0x61, 0x06, 0x08, 0x0c, 0xdd, 0x5f, 0x11, 0x20, - 0x60, 0x07, 0x00, 0x2e, 0x08, 0x04, 0xd9, 0x37, 0x60, 0x07, 0x00, 0x2f, - 0x08, 0x04, 0xd9, 0x37, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, - 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x60, 0x10, 0x20, 0x58, 0xb9, 0x04, - 0x91, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x06, 0x01, 0x58, 0x91, 0x84, - 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, 0x00, 0x06, 0x01, 0x28, 0x00, 0xce, - 0x00, 0xde, 0x00, 0xee, 0x08, 0x04, 0xd9, 0x3e, 0x08, 0x0c, 0x58, 0x44, - 0xd0, 0xe4, 0x09, 0x04, 0xda, 0xb8, 0x20, 0x71, 0x02, 0x6c, 0x70, 0x10, - 0x60, 0x3a, 0x70, 0x14, 0x60, 0x3e, 0x71, 0x08, 0x72, 0x0c, 0x08, 0x0c, - 0x6c, 0x0d, 0x01, 0x40, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, 0x91, 0x06, - 0x11, 0x18, 0xb8, 0x14, 0x92, 0x06, 0x05, 0x10, 0x08, 0x0c, 0x6c, 0x09, - 0x15, 0xb8, 0x20, 0x69, 0x18, 0x00, 0x68, 0x80, 0x92, 0x06, 0x15, 0x90, - 0x68, 0x7c, 0x91, 0x06, 0x15, 0x78, 0x72, 0x10, 0x08, 0x0c, 0xcf, 0x09, - 0x05, 0x90, 0x08, 0x0c, 0xdc, 0x2b, 0x05, 0x78, 0x08, 0x0c, 0xeb, 0x09, - 0x05, 0x60, 0x62, 0x2e, 0x60, 0x07, 0x00, 0x36, 0x60, 0x03, 0x00, 0x01, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x72, 0x14, 0x92, 0x86, 0xff, 0xff, 0x01, 0x50, - 0x08, 0x0c, 0xcf, 0x09, 0x01, 0xc0, 0x92, 0x80, 0x00, 0x02, 0x20, 0x04, - 0x71, 0x10, 0x91, 0x06, 0x11, 0x90, 0x08, 0xe0, 0x72, 0x10, 0x2c, 0x08, - 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0xea, 0x57, 0x2c, 0x10, 0x21, 0x60, - 0x01, 0x40, 0x08, 0x90, 0x60, 0x07, 0x00, 0x37, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x17, 0x15, 0x00, 0x08, 0xb8, 0x60, 0x07, 0x00, 0x37, 0x60, 0x2f, - 0x00, 0x03, 0x60, 0x17, 0x17, 0x00, 0x08, 0x80, 0x60, 0x07, 0x00, 0x12, - 0x08, 0x68, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0x86, - 0x00, 0x06, 0x19, 0x04, 0xd9, 0x3e, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, - 0x08, 0x0c, 0x58, 0x44, 0xd0, 0xe4, 0x09, 0x04, 0xdb, 0x30, 0x20, 0x69, - 0x18, 0x00, 0x20, 0x71, 0x02, 0x6c, 0x70, 0x08, 0x60, 0x3a, 0x72, 0x0c, - 0x62, 0x3e, 0x92, 0x86, 0xff, 0xff, 0x11, 0x50, 0x72, 0x08, 0x00, 0xc6, - 0x2c, 0x08, 0x90, 0x85, 0x00, 0x01, 0x08, 0x0c, 0xea, 0x57, 0x2c, 0x10, - 0x00, 0xce, 0x05, 0xe8, 0x08, 0x0c, 0xcf, 0x09, 0x05, 0xd0, 0x71, 0x08, - 0x92, 0x80, 0x00, 0x02, 0x20, 0x04, 0x91, 0x06, 0x15, 0xa0, 0x00, 0xc6, - 0x00, 0x26, 0x22, 0x60, 0x08, 0x0c, 0xca, 0xdc, 0x00, 0x2e, 0x00, 0xce, - 0x71, 0x18, 0x91, 0x8c, 0xff, 0x00, 0x81, 0x0f, 0x91, 0x86, 0x00, 0x01, - 0x01, 0x78, 0x91, 0x86, 0x00, 0x05, 0x01, 0x18, 0x91, 0x86, 0x00, 0x07, - 0x11, 0x98, 0x92, 0x80, 0x00, 0x05, 0x20, 0x04, 0x90, 0x05, 0x01, 0x70, - 0x08, 0x0c, 0xdc, 0x2b, 0x09, 0x04, 0xda, 0xb1, 0x00, 0x56, 0x75, 0x10, - 0x76, 0x14, 0x08, 0x0c, 0xeb, 0x22, 0x00, 0x5e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x17, 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x96, 0x17, 0x0c, 0x78, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2f, - 0x00, 0x03, 0x60, 0x17, 0x03, 0x00, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x0c, 0x10, 0x60, 0x07, 0x00, 0x3b, - 0x60, 0x2f, 0x00, 0x0b, 0x60, 0x17, 0x00, 0x00, 0x08, 0x04, 0xda, 0x88, - 0x00, 0xe6, 0x00, 0x26, 0x08, 0x0c, 0x6b, 0xcf, 0x05, 0x50, 0x08, 0x0c, - 0x6b, 0x6b, 0x08, 0x0c, 0xec, 0xf1, 0x15, 0x18, 0x20, 0x71, 0x18, 0x00, - 0x70, 0xdc, 0x90, 0x85, 0x00, 0x03, 0x70, 0xde, 0x00, 0xf6, 0x20, 0x79, - 0x01, 0x00, 0x72, 0xb0, 0x92, 0x84, 0x00, 0xff, 0x70, 0x7e, 0x78, 0xe6, - 0x92, 0x84, 0xff, 0x00, 0x72, 0x80, 0x92, 0x05, 0x70, 0x82, 0x78, 0xea, - 0x00, 0xfe, 0x70, 0xe7, 0x00, 0x00, 0x08, 0x0c, 0x6c, 0x0d, 0x01, 0x20, - 0x20, 0x11, 0x1a, 0x0a, 0x20, 0x13, 0x07, 0xd0, 0xd0, 0xac, 0x11, 0x28, - 0x08, 0x0c, 0x30, 0xbf, 0x00, 0x10, 0x08, 0x0c, 0xed, 0x25, 0x00, 0x2e, - 0x00, 0xee, 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x04, 0xd9, 0x3d, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, 0xdb, 0x84, 0xdb, 0xb2, - 0xdb, 0xc3, 0xdb, 0x84, 0xdb, 0x84, 0xdb, 0x86, 0xdb, 0xd4, 0xdb, 0x84, - 0xdb, 0x84, 0xdb, 0x84, 0xdb, 0xa0, 0xdb, 0x84, 0xdb, 0x84, 0xdb, 0x84, - 0xdb, 0xdf, 0xdb, 0xf5, 0xdc, 0x26, 0xdb, 0x84, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0xec, 0x80, 0x1d, 0x20, 0x08, 0x0c, 0x34, 0x4c, 0x1d, 0x08, - 0x70, 0x38, 0x60, 0x16, 0x60, 0x07, 0x00, 0x45, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0x33, 0x15, 0x08, 0x0c, - 0xd6, 0x5a, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0xec, 0x80, 0x19, 0x50, 0x08, 0x0c, - 0x34, 0x4c, 0x19, 0x38, 0x08, 0x0c, 0xdd, 0x3e, 0x1d, 0x60, 0x70, 0x3c, - 0x60, 0x16, 0x60, 0x07, 0x00, 0x4a, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x00, 0x05, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, - 0x20, 0x09, 0x00, 0x41, 0x08, 0x0c, 0xed, 0x2e, 0x60, 0x07, 0x00, 0x47, - 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, - 0x00, 0x05, 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x20, 0x09, - 0x00, 0x42, 0x08, 0x0c, 0xed, 0x2e, 0x60, 0x07, 0x00, 0x47, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, - 0x08, 0x0c, 0x34, 0x4c, 0x19, 0x04, 0xdb, 0x6d, 0x20, 0x09, 0x00, 0x46, - 0x08, 0x0c, 0xed, 0x2e, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x20, 0x01, - 0x18, 0x24, 0x20, 0x04, 0x90, 0x82, 0x00, 0xe1, 0x12, 0x68, 0x08, 0x0c, - 0xdc, 0x48, 0x09, 0x04, 0xdb, 0x6d, 0x60, 0x07, 0x00, 0x4e, 0x60, 0x03, - 0x00, 0x01, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, - 0x60, 0x07, 0x00, 0x12, 0x0c, 0xb0, 0x60, 0x07, 0x00, 0x4f, 0x60, 0x17, - 0x00, 0x00, 0x71, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x81, 0xff, 0x05, 0x08, - 0x91, 0x86, 0x00, 0x01, 0x11, 0x60, 0x71, 0x40, 0x20, 0x01, 0x19, 0xbe, - 0x20, 0x04, 0x91, 0x06, 0x11, 0xb0, 0x71, 0x44, 0x20, 0x01, 0x19, 0xbf, - 0x20, 0x04, 0x91, 0x06, 0x01, 0x90, 0x91, 0x86, 0x00, 0x02, 0x11, 0x68, - 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x60, 0x10, 0x00, 0x96, - 0x20, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, - 0x01, 0x10, 0x60, 0x17, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x08, 0x0c, - 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, 0x60, 0x07, 0x00, 0x50, - 0x70, 0x3c, 0x60, 0x16, 0x0c, 0xa0, 0x00, 0x16, 0x00, 0xe6, 0x20, 0x71, - 0x02, 0x60, 0x00, 0xb6, 0x00, 0xc6, 0x22, 0x60, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xd4, 0xd0, 0x84, 0x01, 0x50, 0x71, 0x28, 0x60, 0x4c, 0x91, 0x06, - 0x11, 0x20, 0x71, 0x2c, 0x60, 0x50, 0x91, 0x06, 0x01, 0x10, 0x90, 0x06, - 0x00, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0xce, 0x00, 0xbe, 0x00, 0xee, - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x16, 0x00, 0x96, 0x00, 0x86, 0x00, 0xe6, - 0x01, 0xc6, 0x01, 0xd6, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x18, 0x00, 0x20, 0xe1, 0x00, 0x00, 0x20, 0x01, 0x19, 0xa1, 0x20, 0x03, - 0x00, 0x00, 0x08, 0x0c, 0x10, 0x72, 0x05, 0xa0, 0x29, 0x00, 0x60, 0x16, - 0x70, 0x90, 0x80, 0x04, 0xa8, 0x16, 0x90, 0x8a, 0x00, 0x1e, 0x02, 0xd0, - 0xa8, 0x33, 0x00, 0x1e, 0x20, 0xa9, 0x00, 0x1e, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, 0x19, 0xa1, - 0x00, 0x16, 0x20, 0x0c, 0x04, 0x71, 0x00, 0x1e, 0x81, 0xff, 0x01, 0xb8, - 0x29, 0x40, 0x08, 0x0c, 0x10, 0x72, 0x01, 0xb0, 0x29, 0x00, 0xa0, 0x06, - 0x21, 0x00, 0x0c, 0x18, 0xa8, 0x32, 0x20, 0xa8, 0xa8, 0x60, 0x20, 0xe8, - 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1b, 0x20, 0xa0, 0x20, 0x01, 0x19, 0xa1, - 0x00, 0x16, 0x20, 0x0c, 0x00, 0xb1, 0x00, 0x1e, 0x00, 0x00, 0x90, 0x85, - 0x00, 0x01, 0x00, 0x48, 0x20, 0x71, 0x18, 0x00, 0x70, 0x93, 0x00, 0x00, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, 0x90, 0x06, 0x01, 0x2e, - 0x01, 0xde, 0x01, 0xce, 0x00, 0xee, 0x00, 0x8e, 0x00, 0x9e, 0x00, 0x1e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, - 0x91, 0x8c, 0xff, 0xff, 0x11, 0xb0, 0x08, 0x0c, 0x21, 0xf9, 0x20, 0x99, - 0x02, 0x6c, 0x20, 0x01, 0x00, 0x14, 0x35, 0x18, 0x93, 0x12, 0x01, 0x08, - 0x12, 0x18, 0x23, 0xa8, 0x40, 0x03, 0x04, 0x00, 0x20, 0xa8, 0x40, 0x03, - 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x21, 0xf9, 0x20, 0x99, 0x02, 0x60, - 0x0c, 0xa8, 0x08, 0x0c, 0x21, 0xf9, 0x20, 0x61, 0x19, 0xa1, 0x60, 0x04, - 0x20, 0x98, 0x60, 0x08, 0x35, 0x18, 0x93, 0x12, 0x01, 0x08, 0x12, 0x18, - 0x23, 0xa8, 0x40, 0x03, 0x00, 0x48, 0x20, 0xa8, 0x40, 0x03, 0x22, 0xa8, - 0x81, 0x08, 0x08, 0x0c, 0x21, 0xf9, 0x20, 0x99, 0x02, 0x60, 0x0c, 0xa8, - 0x20, 0x61, 0x19, 0xa1, 0x20, 0x19, 0x02, 0x80, 0x33, 0x00, 0x93, 0x1e, - 0x01, 0x10, 0x60, 0x06, 0x00, 0x20, 0x20, 0x01, 0x02, 0x60, 0x60, 0x06, - 0x81, 0x08, 0x21, 0x62, 0x92, 0x92, 0x00, 0x21, 0x92, 0x96, 0xff, 0xff, - 0x62, 0x0a, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, - 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x00, 0xc6, - 0x81, 0xff, 0x11, 0xb8, 0x08, 0x0c, 0x22, 0x11, 0x20, 0xa1, 0x02, 0x4c, - 0x20, 0x01, 0x00, 0x14, 0x35, 0x18, 0x93, 0x12, 0x12, 0x18, 0x23, 0xa8, - 0x40, 0x03, 0x04, 0x18, 0x20, 0xa8, 0x40, 0x03, 0x82, 0xff, 0x01, 0xf8, - 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x22, 0x11, 0x20, 0xa1, 0x02, 0x40, - 0x0c, 0x98, 0x08, 0x0c, 0x22, 0x11, 0x20, 0x61, 0x19, 0xa4, 0x60, 0x04, - 0x20, 0xa0, 0x60, 0x08, 0x35, 0x18, 0x93, 0x12, 0x12, 0x18, 0x23, 0xa8, - 0x40, 0x03, 0x00, 0x58, 0x20, 0xa8, 0x40, 0x03, 0x82, 0xff, 0x01, 0x38, - 0x22, 0xa8, 0x81, 0x08, 0x08, 0x0c, 0x22, 0x11, 0x20, 0xa1, 0x02, 0x40, - 0x0c, 0x98, 0x20, 0x61, 0x19, 0xa4, 0x20, 0x19, 0x02, 0x60, 0x34, 0x00, - 0x93, 0x1e, 0x01, 0x10, 0x60, 0x06, 0x00, 0x20, 0x20, 0x01, 0x02, 0x40, - 0x60, 0x06, 0x81, 0x08, 0x21, 0x62, 0x92, 0x92, 0x00, 0x21, 0x92, 0x96, - 0xff, 0xff, 0x62, 0x0a, 0x00, 0xce, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x66, 0x66, 0x10, 0x26, 0x58, - 0xbe, 0x04, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, - 0x01, 0x70, 0x96, 0x86, 0x00, 0x04, 0x01, 0x58, 0xbe, 0x04, 0x96, 0xb4, - 0x00, 0xff, 0x96, 0x86, 0x00, 0x06, 0x01, 0x28, 0x96, 0x86, 0x00, 0x04, - 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x6e, 0x00, 0xbe, 0x00, 0x05, - 0x00, 0xd6, 0x08, 0x0c, 0xdd, 0xd4, 0x00, 0xde, 0x00, 0x05, 0x00, 0xd6, - 0x08, 0x0c, 0xdd, 0xe1, 0x15, 0x20, 0x68, 0x0c, 0x90, 0x8c, 0xff, 0x00, - 0x68, 0x20, 0x90, 0x84, 0x00, 0xff, 0x91, 0x15, 0x62, 0x16, 0x68, 0x24, - 0x60, 0x2e, 0xd1, 0xe4, 0x01, 0x30, 0x90, 0x06, 0x08, 0x0c, 0xee, 0x4e, - 0x20, 0x09, 0x00, 0x01, 0x00, 0x78, 0xd1, 0xec, 0x01, 0x80, 0x69, 0x20, - 0x91, 0x8c, 0x00, 0xff, 0x68, 0x24, 0x08, 0x0c, 0x26, 0x8c, 0x11, 0x48, - 0x20, 0x01, 0x00, 0x01, 0x08, 0x0c, 0xee, 0x4e, 0x21, 0x10, 0x90, 0x0e, - 0x08, 0x0c, 0x33, 0x64, 0x00, 0x18, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, - 0x90, 0x06, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xc6, 0x08, 0x0c, - 0xb1, 0xdd, 0x05, 0x98, 0x00, 0x16, 0x00, 0x26, 0x00, 0xc6, 0x20, 0x11, - 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, 0x22, 0x0c, 0x08, 0x0c, 0x26, 0x8c, - 0x15, 0x68, 0x08, 0x0c, 0x67, 0x49, 0x15, 0x50, 0xbe, 0x12, 0xbd, 0x16, - 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x2b, 0x00, 0x60, 0x12, 0x08, 0x0c, - 0xec, 0x80, 0x11, 0xc8, 0x08, 0x0c, 0x34, 0x4c, 0x11, 0xb0, 0x08, 0x0c, - 0xdd, 0x3e, 0x05, 0x00, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, - 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x67, 0x26, 0x60, 0x17, 0x00, 0x00, - 0x60, 0x23, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x1e, 0x00, 0x10, 0x08, 0x0c, 0xb1, 0x6c, 0x90, 0x85, - 0x00, 0x01, 0x00, 0xce, 0x00, 0xbe, 0x00, 0x05, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0xce, 0x00, 0x2e, 0x00, 0x1e, 0x0c, 0xa8, 0x08, 0x0c, 0xb1, 0x6c, - 0x90, 0x06, 0x0c, 0x98, 0x20, 0x69, 0x02, 0x6d, 0x68, 0x00, 0x90, 0x82, - 0x00, 0x10, 0x12, 0x28, 0x60, 0x17, 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x08, 0x90, 0x06, 0x00, 0x05, 0x60, 0x17, 0x00, 0x00, 0x20, 0x69, - 0x02, 0x6c, 0x68, 0x08, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, 0x08, 0x00, - 0x11, 0x90, 0x69, 0x04, 0x91, 0x86, 0x00, 0x18, 0x01, 0x18, 0x91, 0x86, - 0x00, 0x14, 0x11, 0x58, 0x81, 0x0f, 0x68, 0x00, 0x90, 0x84, 0x00, 0xff, - 0x91, 0x0d, 0x61, 0x62, 0x90, 0x8e, 0x00, 0x14, 0x01, 0x10, 0x90, 0x8e, - 0x00, 0x10, 0x00, 0x05, 0x60, 0x04, 0x90, 0xb2, 0x00, 0x53, 0x1a, 0x0c, - 0x0d, 0x85, 0x91, 0xb6, 0x00, 0x13, 0x11, 0x30, 0x20, 0x08, 0x91, 0xb2, - 0x00, 0x40, 0x1a, 0x04, 0xdf, 0x36, 0x04, 0x02, 0x91, 0xb6, 0x00, 0x27, - 0x01, 0x90, 0x91, 0x86, 0x00, 0x15, 0x01, 0x18, 0x91, 0x86, 0x00, 0x16, - 0x11, 0x40, 0x08, 0x0c, 0xaf, 0x61, 0x01, 0x20, 0x90, 0x86, 0x00, 0x02, - 0x09, 0x04, 0xbb, 0xa3, 0x00, 0x05, 0x91, 0xb6, 0x00, 0x14, 0x19, 0x0c, - 0x0d, 0x85, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x67, 0x26, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, - 0xde, 0x6c, 0xde, 0x6e, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6e, - 0xde, 0x7b, 0xdf, 0x33, 0xde, 0xbd, 0xdf, 0x33, 0xde, 0xe1, 0xdf, 0x33, - 0xde, 0x7b, 0xdf, 0x33, 0xdf, 0x2b, 0xdf, 0x33, 0xdf, 0x2b, 0xdf, 0x33, - 0xdf, 0x33, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, - 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, - 0xde, 0x6e, 0xde, 0x6c, 0xdf, 0x33, 0xde, 0x6c, 0xde, 0x6c, 0xdf, 0x33, - 0xde, 0x6c, 0xdf, 0x30, 0xdf, 0x33, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, - 0xde, 0x6c, 0xdf, 0x33, 0xdf, 0x33, 0xde, 0x6c, 0xdf, 0x33, 0xdf, 0x33, - 0xde, 0x6c, 0xde, 0x76, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, - 0xdf, 0x2f, 0xdf, 0x33, 0xde, 0x6c, 0xde, 0x6c, 0xdf, 0x33, 0xdf, 0x33, - 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0xde, 0x6c, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0xd6, 0x5d, 0x60, 0x03, 0x00, 0x02, 0x08, 0x0c, 0x9a, 0xb3, - 0x08, 0x04, 0xdf, 0x35, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x08, 0x04, - 0xdf, 0x33, 0x08, 0x0c, 0x6c, 0x09, 0x19, 0x04, 0xdf, 0x33, 0x90, 0x06, - 0x08, 0x0c, 0x66, 0xe6, 0x60, 0x10, 0x20, 0x58, 0xb8, 0x10, 0x90, 0x86, - 0x00, 0xff, 0x11, 0x40, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x78, 0xa8, - 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x00, 0xb8, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0x84, 0x90, 0x05, 0x09, 0x04, 0xdf, 0x33, 0x08, 0x0c, 0x34, 0x7d, - 0x19, 0x04, 0xdf, 0x33, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x02, 0x11, 0x38, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, 0x78, 0xa8, - 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x20, 0x01, 0x00, 0x02, 0x08, 0x0c, - 0x66, 0xfa, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x02, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x61, 0x10, - 0x21, 0x58, 0x20, 0x09, 0x00, 0x01, 0x08, 0x0c, 0x89, 0xa1, 0x08, 0x04, - 0xdf, 0x35, 0x66, 0x10, 0x26, 0x58, 0xbe, 0x04, 0x96, 0xb4, 0xff, 0x00, - 0x86, 0x37, 0x96, 0x86, 0x00, 0x06, 0x01, 0x48, 0x96, 0x86, 0x00, 0x04, - 0x01, 0x30, 0x08, 0x0c, 0x92, 0x28, 0x20, 0x01, 0x00, 0x04, 0x08, 0x0c, - 0x67, 0x26, 0x08, 0x0c, 0xee, 0x9d, 0x09, 0x04, 0xdf, 0x33, 0x20, 0x01, - 0x00, 0x04, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x03, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x04, - 0xdf, 0x35, 0x20, 0x01, 0x18, 0x00, 0x20, 0x04, 0x90, 0x86, 0x00, 0x03, - 0x11, 0x58, 0x00, 0x36, 0x00, 0x46, 0x60, 0x10, 0x20, 0x58, 0xbb, 0xa0, - 0x20, 0x21, 0x00, 0x06, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x4e, 0x00, 0x3e, - 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, 0xdf, 0x4f, 0x66, 0x10, 0x26, 0x58, - 0xbe, 0x04, 0x00, 0x66, 0x96, 0xb4, 0xff, 0x00, 0x86, 0x37, 0x96, 0x86, - 0x00, 0x06, 0x00, 0x6e, 0x01, 0x80, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x67, 0x26, 0x92, 0x84, 0x00, 0xff, 0x90, 0x8e, 0x00, 0x07, 0x01, 0x18, - 0x90, 0x8e, 0x00, 0x04, 0x11, 0x20, 0x20, 0x01, 0x00, 0x06, 0x08, 0x0c, - 0x66, 0xfa, 0x08, 0x0c, 0x6c, 0x09, 0x11, 0xf8, 0x20, 0x01, 0x18, 0x37, - 0x20, 0x04, 0xd0, 0xa4, 0x01, 0xd0, 0xbe, 0x04, 0x96, 0xb4, 0x00, 0xff, - 0x96, 0x86, 0x00, 0x06, 0x01, 0xa0, 0x00, 0xf6, 0x20, 0x79, 0x18, 0x00, - 0x78, 0xa8, 0x80, 0x00, 0x78, 0xaa, 0x00, 0xfe, 0x08, 0x04, 0xde, 0xa7, - 0x20, 0x01, 0x00, 0x04, 0x00, 0x30, 0x20, 0x01, 0x00, 0x06, 0x04, 0x09, - 0x00, 0x20, 0x00, 0x18, 0x00, 0x10, 0x08, 0x0c, 0x67, 0x26, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x26, 0x00, 0x00, 0x02, 0xdf, 0x4a, 0xdf, 0x4a, - 0xdf, 0x4a, 0xdf, 0x4a, 0xdf, 0x4a, 0xdf, 0x4c, 0xdf, 0x4a, 0xdf, 0x4c, - 0xdf, 0x4a, 0xdf, 0x4a, 0xdf, 0x4c, 0xdf, 0x4a, 0xdf, 0x4a, 0xdf, 0x4a, - 0xdf, 0x4c, 0xdf, 0x4c, 0xdf, 0x4c, 0xdf, 0x4c, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x00, 0x16, 0x00, 0xb6, 0x00, 0xd6, - 0x61, 0x10, 0x21, 0x58, 0xb9, 0x00, 0xd1, 0x84, 0x01, 0x38, 0x08, 0x0c, - 0x66, 0xfa, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x08, 0x0c, 0x33, 0x44, - 0x00, 0xde, 0x00, 0xbe, 0x00, 0x1e, 0x00, 0x05, 0x66, 0x10, 0x26, 0x58, - 0xb8, 0x04, 0x90, 0x84, 0xff, 0x00, 0x80, 0x07, 0x90, 0xb2, 0x00, 0x0c, - 0x1a, 0x0c, 0x0d, 0x85, 0x91, 0xb6, 0x00, 0x15, 0x11, 0x10, 0x00, 0x3b, - 0x00, 0x28, 0x91, 0xb6, 0x00, 0x16, 0x19, 0x0c, 0x0d, 0x85, 0x00, 0x6b, - 0x00, 0x05, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, 0xdf, 0xe4, - 0xbc, 0x45, 0xdf, 0xce, 0xdf, 0x8f, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, - 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, 0xdf, 0xe4, - 0xbc, 0x45, 0xdf, 0xce, 0xdf, 0xd5, 0xbc, 0x45, 0xbc, 0x45, 0xbc, 0x45, - 0xbc, 0x45, 0x00, 0xf6, 0x08, 0x0c, 0x6c, 0x09, 0x11, 0xd8, 0x08, 0x0c, - 0xd6, 0x45, 0x11, 0xc0, 0x60, 0x10, 0x90, 0x5d, 0x01, 0xa8, 0xb8, 0x84, - 0x90, 0x05, 0x01, 0x90, 0x90, 0x06, 0x08, 0x0c, 0x66, 0xe6, 0x20, 0x01, - 0x00, 0x02, 0x08, 0x0c, 0x66, 0xfa, 0x60, 0x23, 0x00, 0x01, 0x60, 0x03, - 0x00, 0x01, 0x60, 0x07, 0x00, 0x02, 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0xf0, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, - 0x22, 0x0c, 0x08, 0x0c, 0x26, 0x8c, 0x11, 0xb0, 0x08, 0x0c, 0x67, 0xb4, - 0x01, 0x18, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x80, 0xb8, 0x10, 0x00, 0x06, - 0xb8, 0x14, 0x00, 0x06, 0xb8, 0x84, 0x00, 0x06, 0x08, 0x0c, 0x61, 0xb7, - 0x00, 0x0e, 0xb8, 0x86, 0x00, 0x0e, 0xb8, 0x16, 0x00, 0x0e, 0xb8, 0x12, - 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xfe, 0x00, 0x05, 0x66, 0x04, 0x96, 0xb6, - 0x00, 0x1e, 0x11, 0x10, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x0c, - 0xc0, 0x82, 0x11, 0x48, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x01, - 0x08, 0x0c, 0x96, 0x1e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x10, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x08, 0x04, 0xb1, 0x6c, 0x60, 0x04, 0x90, 0x8a, - 0x00, 0x53, 0x1a, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0x99, 0xed, 0x08, 0x0c, - 0xb1, 0xa7, 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe0, 0x07, - 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x09, 0xe0, 0x07, 0xe0, 0x07, - 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, - 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, - 0xe0, 0x07, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x96, 0x00, 0xb6, 0x00, 0xd6, - 0x00, 0xe6, 0x00, 0xf6, 0x00, 0x46, 0x00, 0x26, 0x62, 0x10, 0x22, 0x58, - 0xb8, 0xbc, 0x90, 0x05, 0x11, 0xb0, 0x60, 0x07, 0x00, 0x44, 0x20, 0x71, - 0x02, 0x60, 0x74, 0x44, 0x94, 0xa4, 0xff, 0x00, 0x09, 0x04, 0xe0, 0x70, - 0x08, 0x0c, 0xee, 0x42, 0x11, 0x70, 0x94, 0x86, 0x20, 0x00, 0x11, 0x58, - 0x20, 0x09, 0x00, 0x01, 0x20, 0x11, 0x02, 0x00, 0x08, 0x0c, 0x8c, 0x44, - 0x00, 0x20, 0x90, 0x26, 0x08, 0x0c, 0xec, 0xc5, 0x0c, 0x30, 0x08, 0x0c, - 0x10, 0x59, 0x09, 0x0c, 0x0d, 0x85, 0x60, 0x03, 0x00, 0x07, 0xa8, 0x67, - 0x01, 0x0d, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x6a, 0xac, 0x8a, 0x2c, 0x00, - 0xa8, 0x8e, 0x60, 0x08, 0xa8, 0xe2, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, - 0x71, 0x30, 0xa9, 0x7a, 0x00, 0x16, 0xa8, 0x76, 0xa8, 0x7f, 0x00, 0x00, - 0xa8, 0x83, 0x00, 0x00, 0xa8, 0x87, 0x00, 0x36, 0x08, 0x0c, 0x70, 0x12, - 0x00, 0x1e, 0x08, 0x0c, 0xee, 0x42, 0x19, 0x04, 0xe0, 0xd0, 0x94, 0x86, - 0x20, 0x00, 0x11, 0x30, 0x20, 0x19, 0x00, 0x17, 0x08, 0x0c, 0xe9, 0xf9, - 0x08, 0x04, 0xe0, 0xd0, 0x94, 0x86, 0x02, 0x00, 0x11, 0x20, 0x08, 0x0c, - 0xe9, 0x84, 0x08, 0x04, 0xe0, 0xd0, 0x94, 0x86, 0x04, 0x00, 0x01, 0x20, - 0x94, 0x86, 0x10, 0x00, 0x19, 0x04, 0xe0, 0xd0, 0x20, 0x19, 0x00, 0x02, - 0x08, 0x0c, 0xe9, 0xa3, 0x08, 0x04, 0xe0, 0xd0, 0x20, 0x69, 0x1a, 0x73, - 0x6a, 0x00, 0xd2, 0x84, 0x09, 0x04, 0xe1, 0x3a, 0x92, 0x84, 0x03, 0x00, - 0x19, 0x04, 0xe1, 0x33, 0x68, 0x04, 0x90, 0x05, 0x09, 0x04, 0xe1, 0x1b, - 0x2d, 0x78, 0x60, 0x03, 0x00, 0x07, 0x08, 0x0c, 0x10, 0x72, 0x09, 0x04, - 0xe0, 0xdc, 0x78, 0x00, 0xd0, 0x8c, 0x11, 0x18, 0x78, 0x04, 0x80, 0x01, - 0x78, 0x06, 0x60, 0x17, 0x00, 0x00, 0x20, 0x01, 0x18, 0x0f, 0x20, 0x04, - 0xd0, 0x84, 0x19, 0x04, 0xe1, 0x3e, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x67, - 0x01, 0x16, 0xa8, 0x6a, 0x60, 0x08, 0xa8, 0xe2, 0x2c, 0x00, 0xa8, 0x7a, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x71, 0x30, 0xa9, 0xb6, 0xa8, 0x76, - 0xb9, 0x28, 0xa9, 0xba, 0xb9, 0x2c, 0xa9, 0xbe, 0xb9, 0x30, 0xa9, 0xc2, - 0xb9, 0x34, 0xa9, 0xc6, 0xa8, 0x83, 0x00, 0x3d, 0x70, 0x44, 0x90, 0x84, - 0x00, 0x03, 0x90, 0x80, 0xe0, 0xd8, 0x20, 0x05, 0xa8, 0x7e, 0x20, 0xa9, - 0x00, 0x0a, 0x20, 0x01, 0x02, 0x70, 0xaa, 0x5c, 0x92, 0x90, 0x00, 0x21, - 0x20, 0x09, 0x02, 0x05, 0x20, 0x0b, 0x00, 0x80, 0x20, 0xe1, 0x00, 0x00, - 0xab, 0x60, 0x23, 0xe8, 0x20, 0x98, 0x22, 0xa0, 0x40, 0x03, 0x20, 0x0b, - 0x00, 0x00, 0x20, 0x01, 0x02, 0x7a, 0x20, 0x0c, 0xa9, 0xb2, 0x80, 0x00, - 0x20, 0x0c, 0xa9, 0xae, 0x08, 0x0c, 0x70, 0x15, 0x00, 0x2e, 0x00, 0x4e, - 0x00, 0xfe, 0x00, 0xee, 0x00, 0xde, 0x00, 0xbe, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x20, 0x01, 0x18, 0x10, - 0x20, 0x04, 0xd0, 0x84, 0x01, 0x20, 0x08, 0x0c, 0x10, 0x59, 0x19, 0x04, - 0xe0, 0x85, 0x60, 0x17, 0xf1, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x0c, 0x00, - 0x20, 0x69, 0x02, 0x60, 0x68, 0x48, 0x90, 0x84, 0xff, 0x00, 0x90, 0x86, - 0x12, 0x00, 0x11, 0x98, 0x68, 0x6c, 0x90, 0x84, 0x00, 0xff, 0x00, 0x16, - 0x61, 0x14, 0x91, 0x8c, 0xf7, 0x00, 0x91, 0x0d, 0x61, 0x16, 0x00, 0x1e, - 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x43, 0x20, 0x09, 0xa0, 0x25, - 0x08, 0x0c, 0x96, 0x17, 0x08, 0x28, 0x68, 0x68, 0x60, 0x2e, 0x68, 0x6c, - 0x60, 0x32, 0x60, 0x17, 0xf2, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x08, 0x04, - 0xe0, 0xd0, 0x20, 0x01, 0x18, 0x0e, 0x20, 0x04, 0xd0, 0xec, 0x01, 0x20, - 0x20, 0x11, 0x80, 0x49, 0x08, 0x0c, 0x4c, 0xa1, 0x60, 0x17, 0xf3, 0x00, - 0x00, 0x10, 0x60, 0x17, 0xf1, 0x00, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x08, 0x04, - 0xe0, 0xd0, 0x60, 0x17, 0xf5, 0x00, 0x0c, 0x98, 0x60, 0x17, 0xf6, 0x00, - 0x08, 0x04, 0xe0, 0xf0, 0x60, 0x17, 0xf2, 0x00, 0x08, 0x04, 0xe0, 0xf0, - 0xa8, 0x67, 0x01, 0x46, 0xa8, 0x6b, 0x00, 0x00, 0x60, 0x08, 0xa8, 0x86, - 0x2c, 0x00, 0xa8, 0x7a, 0x70, 0x44, 0x90, 0x84, 0x00, 0x03, 0x90, 0x80, - 0xe0, 0xd8, 0x20, 0x05, 0xa8, 0x7e, 0x29, 0x28, 0x60, 0x10, 0x20, 0x58, - 0xb8, 0xa0, 0xa8, 0x76, 0xb8, 0x28, 0xa8, 0x8a, 0xb8, 0x2c, 0xa8, 0x8e, - 0xb8, 0x30, 0xa8, 0x92, 0xb8, 0x34, 0xa8, 0x96, 0xa8, 0x83, 0x00, 0x3d, - 0x20, 0x09, 0x02, 0x05, 0x21, 0x04, 0x90, 0x85, 0x00, 0x80, 0x20, 0x0a, - 0x20, 0xe1, 0x00, 0x00, 0x20, 0x11, 0x02, 0x10, 0x22, 0x14, 0x92, 0x94, - 0x0f, 0xff, 0xaa, 0xa2, 0x92, 0x82, 0x01, 0x11, 0x1a, 0x0c, 0x0d, 0x85, - 0x82, 0x10, 0x82, 0x1c, 0x20, 0x01, 0x02, 0x6c, 0x20, 0x98, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x29, 0x20, 0xa0, 0x20, 0x11, - 0xe1, 0xba, 0x20, 0x41, 0x00, 0x01, 0x22, 0x3d, 0x97, 0x84, 0x00, 0xff, - 0x93, 0x22, 0x12, 0x08, 0x23, 0x00, 0x20, 0xa8, 0x40, 0x03, 0x93, 0x1a, - 0x05, 0x30, 0x82, 0x10, 0xd7, 0xfc, 0x11, 0x30, 0x8d, 0x68, 0x2d, 0x0a, - 0x20, 0x01, 0x02, 0x60, 0x20, 0x98, 0x0c, 0x68, 0x29, 0x50, 0x08, 0x0c, - 0x10, 0x72, 0x01, 0x70, 0x29, 0x00, 0xb0, 0x02, 0xa8, 0x67, 0x01, 0x47, - 0xa8, 0x6b, 0x00, 0x00, 0xa8, 0x60, 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, - 0x00, 0x1b, 0x20, 0xa0, 0x88, 0x40, 0x08, 0xd8, 0x25, 0x48, 0xa8, 0x00, - 0x90, 0x2d, 0x01, 0x18, 0x08, 0x0c, 0x10, 0x8b, 0x0c, 0xc8, 0x08, 0x0c, - 0x10, 0x8b, 0x08, 0x04, 0xe0, 0xdc, 0x25, 0x48, 0x88, 0x47, 0x98, 0x85, - 0x00, 0x46, 0xa8, 0x66, 0x20, 0x09, 0x02, 0x05, 0x20, 0x0b, 0x00, 0x00, - 0x08, 0x0c, 0xea, 0x30, 0x08, 0x04, 0xe0, 0xd0, 0x80, 0x10, 0x00, 0x04, - 0x80, 0x1a, 0x00, 0x06, 0x80, 0x18, 0x00, 0x08, 0x80, 0x16, 0x00, 0x0a, - 0x80, 0x14, 0x91, 0x86, 0x00, 0x13, 0x11, 0x60, 0x60, 0x04, 0x90, 0x8a, - 0x00, 0x57, 0x1a, 0x0c, 0x0d, 0x85, 0x90, 0x82, 0x00, 0x40, 0x0a, 0x0c, - 0x0d, 0x85, 0x20, 0x08, 0x08, 0x04, 0xe2, 0x46, 0x91, 0x86, 0x00, 0x51, - 0x01, 0x08, 0x00, 0x40, 0x08, 0x0c, 0xaf, 0x61, 0x01, 0xe8, 0x90, 0x86, - 0x00, 0x02, 0x09, 0x04, 0xe2, 0x8e, 0x00, 0xc0, 0x91, 0x86, 0x00, 0x27, - 0x01, 0x80, 0x91, 0x86, 0x00, 0x48, 0x01, 0x28, 0x91, 0x86, 0x00, 0x14, - 0x01, 0x50, 0x19, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xaf, 0x61, 0x01, 0x50, - 0x90, 0x86, 0x00, 0x04, 0x09, 0x04, 0xe3, 0x2d, 0x00, 0x28, 0x60, 0x04, - 0x90, 0x82, 0x00, 0x40, 0x20, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0xb2, 0x27, - 0x00, 0x05, 0xe2, 0x0d, 0xe2, 0x0f, 0xe2, 0x0f, 0xe2, 0x36, 0xe2, 0x0d, - 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, - 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, - 0xe2, 0x0d, 0xe2, 0x0d, 0xe2, 0x0d, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x36, 0x00, 0x96, 0x60, 0x14, - 0x90, 0x4d, 0x01, 0xd8, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0xc0, 0x60, 0x03, - 0x00, 0x02, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, - 0xd0, 0xbc, 0x11, 0x78, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xea, 0x30, - 0x60, 0x17, 0x00, 0x00, 0x60, 0x18, 0x90, 0x05, 0x11, 0x20, 0x20, 0x01, - 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x60, 0x03, 0x00, 0x07, 0x00, 0x9e, - 0x00, 0x3e, 0x00, 0x05, 0x00, 0x96, 0x08, 0x0c, 0x99, 0xed, 0x08, 0x0c, - 0x9a, 0xb3, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x20, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0x10, 0x8b, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x9e, 0x00, 0x05, - 0x00, 0x02, 0xe2, 0x5b, 0xe2, 0x70, 0xe2, 0x5d, 0xe2, 0x85, 0xe2, 0x5b, - 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, - 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, - 0xe2, 0x5b, 0xe2, 0x5b, 0xe2, 0x5b, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x96, - 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xb4, 0x01, 0x38, 0x60, 0x03, - 0x00, 0x07, 0x20, 0x09, 0x00, 0x43, 0x08, 0x0c, 0xb2, 0x0a, 0x00, 0x10, - 0x60, 0x03, 0x00, 0x04, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x9e, 0x00, 0x05, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x38, 0x61, 0x14, 0x00, 0x96, 0x21, 0x48, - 0xa9, 0x7c, 0x00, 0x9e, 0xd1, 0xec, 0x11, 0x38, 0x08, 0x0c, 0x8c, 0x19, - 0x08, 0x0c, 0xb1, 0x6c, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, 0x08, 0x0c, - 0xec, 0x89, 0x0d, 0xb0, 0x0c, 0xc8, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, - 0x00, 0x41, 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x00, 0x05, - 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, 0xe2, 0xa5, 0xe2, 0xa7, 0xe2, 0xa5, - 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, - 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa5, - 0xe2, 0xa5, 0xe2, 0xa5, 0xe2, 0xa8, 0xe2, 0xa5, 0xe2, 0xa5, 0x08, 0x0c, - 0x0d, 0x85, 0x00, 0x05, 0x00, 0xd6, 0x08, 0x0c, 0x8c, 0x19, 0x00, 0xde, - 0x08, 0x0c, 0xec, 0xe1, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x91, 0x82, - 0x00, 0x40, 0x00, 0x02, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, - 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xca, - 0xe2, 0xf5, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xf5, - 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0xe2, 0xc8, 0x08, 0x0c, 0x0d, 0x85, - 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x68, - 0x90, 0x8c, 0x00, 0x03, 0x91, 0x8e, 0x00, 0x02, 0x01, 0x80, 0x61, 0x44, - 0xd1, 0xe4, 0x11, 0x68, 0x20, 0x09, 0x00, 0x41, 0x00, 0x9e, 0x08, 0x04, - 0xe3, 0xb5, 0x60, 0x03, 0x00, 0x07, 0x60, 0x1b, 0x00, 0x00, 0x08, 0x0c, - 0x8c, 0x19, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x14, 0x20, 0x48, 0xa9, 0x7c, - 0xd1, 0xec, 0x11, 0x30, 0x08, 0x0c, 0x8c, 0x19, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x9e, 0x00, 0x05, 0x08, 0x0c, 0xec, 0x89, 0x0d, 0xb8, 0x00, 0x9e, - 0x00, 0x05, 0x20, 0x01, 0x18, 0x0c, 0x20, 0x0c, 0xc1, 0xd4, 0x21, 0x02, - 0x00, 0x36, 0x08, 0x0c, 0x9a, 0x48, 0x08, 0x0c, 0x9a, 0xb3, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, - 0x00, 0xbe, 0xd0, 0xbc, 0x01, 0x88, 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x03, - 0x90, 0x86, 0x00, 0x02, 0x01, 0x40, 0xa8, 0xac, 0x63, 0x30, 0x93, 0x1a, - 0x63, 0x32, 0xa8, 0xb0, 0x63, 0x2c, 0x93, 0x1b, 0x63, 0x2e, 0x60, 0x03, - 0x00, 0x02, 0x00, 0x80, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xea, 0x30, - 0x60, 0x18, 0x90, 0x05, 0x11, 0x28, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, - 0x80, 0x03, 0x60, 0x1a, 0x60, 0x17, 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, - 0x00, 0x9e, 0x00, 0x3e, 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, 0x00, 0x02, - 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, - 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x46, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, - 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, 0xe3, 0x44, - 0xe3, 0x44, 0xe3, 0x91, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x14, 0x00, 0x96, - 0x20, 0x48, 0xa8, 0x34, 0xaa, 0x38, 0x61, 0x10, 0x00, 0xb6, 0x21, 0x58, - 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xbc, 0x11, 0x90, 0x92, 0x0d, 0x15, 0x18, - 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x28, 0x20, 0x09, 0x00, 0x41, 0x00, 0x9e, - 0x08, 0x04, 0xe3, 0xb5, 0x60, 0x03, 0x00, 0x07, 0x60, 0x1b, 0x00, 0x00, - 0x08, 0x0c, 0x8c, 0x19, 0x00, 0x9e, 0x00, 0x05, 0x61, 0x24, 0xd1, 0xf4, - 0x1d, 0x58, 0x00, 0x06, 0x00, 0x46, 0xac, 0xac, 0x94, 0x22, 0xa9, 0xb0, - 0x22, 0x00, 0x91, 0x0b, 0x60, 0x30, 0x94, 0x20, 0x64, 0x32, 0x60, 0x2c, - 0x91, 0x09, 0x61, 0x2e, 0x00, 0x4e, 0x00, 0x0e, 0x08, 0xd8, 0x61, 0x10, - 0x00, 0xb6, 0x21, 0x58, 0xb9, 0x00, 0x00, 0xbe, 0xd1, 0xbc, 0x11, 0x78, - 0x20, 0x09, 0x18, 0x0e, 0x21, 0x0c, 0xd1, 0x9c, 0x01, 0x18, 0x60, 0x03, - 0x00, 0x07, 0x00, 0x10, 0x60, 0x03, 0x00, 0x06, 0x00, 0xe9, 0x08, 0x0c, - 0x8c, 0x1b, 0x00, 0x9e, 0x00, 0x05, 0x60, 0x03, 0x00, 0x02, 0x00, 0x9e, - 0x00, 0x05, 0x60, 0x24, 0xd0, 0xf4, 0x01, 0x28, 0x08, 0x0c, 0x16, 0xb0, - 0x19, 0x04, 0xe3, 0x46, 0x00, 0x05, 0x60, 0x14, 0x00, 0x96, 0x20, 0x48, - 0xa8, 0x34, 0xa9, 0x38, 0x00, 0x9e, 0x91, 0x05, 0x11, 0x20, 0x08, 0x0c, - 0x16, 0xb0, 0x19, 0x04, 0xe3, 0x46, 0x00, 0x05, 0xd2, 0xfc, 0x01, 0x40, - 0x80, 0x02, 0x80, 0x00, 0x82, 0x12, 0x92, 0x91, 0x00, 0x00, 0x20, 0x09, - 0x00, 0x09, 0x00, 0x10, 0x20, 0x09, 0x00, 0x15, 0xaa, 0x9a, 0xa8, 0x96, - 0x00, 0x05, 0x91, 0x82, 0x00, 0x40, 0x02, 0x08, 0x00, 0x62, 0x91, 0x86, - 0x00, 0x13, 0x01, 0x20, 0x91, 0x86, 0x00, 0x14, 0x19, 0x0c, 0x0d, 0x85, - 0x60, 0x24, 0xd0, 0xdc, 0x09, 0x0c, 0x0d, 0x85, 0x00, 0x05, 0xe3, 0xd9, - 0xe3, 0xe5, 0xe3, 0xf1, 0xe3, 0xfd, 0xe3, 0xd9, 0xe3, 0xd9, 0xe3, 0xd9, - 0xe3, 0xd9, 0xe3, 0xe0, 0xe3, 0xdb, 0xe3, 0xdb, 0xe3, 0xd9, 0xe3, 0xd9, - 0xe3, 0xd9, 0xe3, 0xd9, 0xe3, 0xdb, 0xe3, 0xd9, 0xe3, 0xdb, 0xe3, 0xd9, - 0xe3, 0xe0, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x24, 0xd0, 0xdc, 0x09, 0x0c, - 0x0d, 0x85, 0x00, 0x05, 0x60, 0x14, 0x90, 0x05, 0x19, 0x0c, 0x0d, 0x85, - 0x00, 0x05, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x95, 0xf9, 0x01, 0x2e, - 0x00, 0x05, 0x60, 0x03, 0x00, 0x04, 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x20, 0x09, 0xa0, 0x01, 0x08, 0x0c, 0x96, 0x17, 0x01, 0x2e, - 0x00, 0x05, 0x60, 0x03, 0x00, 0x03, 0x61, 0x06, 0x60, 0x47, 0x00, 0x00, - 0x08, 0x0c, 0x1c, 0x6f, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x60, 0x14, - 0x00, 0x96, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x88, 0x90, 0x84, - 0x00, 0x03, 0x90, 0x86, 0x00, 0x02, 0x01, 0xa0, 0x60, 0x24, 0xd0, 0xcc, - 0x11, 0x48, 0xd0, 0xc4, 0x11, 0x38, 0xa8, 0xa8, 0x90, 0x05, 0x11, 0x20, - 0x61, 0x44, 0x91, 0x8d, 0xb0, 0x35, 0x00, 0x18, 0x61, 0x44, 0x91, 0x8d, - 0xa0, 0x35, 0x00, 0x9e, 0x08, 0x0c, 0x96, 0x5e, 0x01, 0x2e, 0x00, 0x05, - 0x61, 0x44, 0x91, 0x8d, 0xa0, 0x32, 0x0c, 0xb8, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x00, 0x36, 0x00, 0x96, 0x91, 0x82, 0x00, 0x40, 0x00, 0x23, - 0x00, 0x9e, 0x00, 0x3e, 0x01, 0x2e, 0x00, 0x05, 0xe4, 0x4a, 0xe4, 0x4c, - 0xe4, 0x61, 0xe4, 0x7b, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, - 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, - 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, 0xe4, 0x4a, - 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, - 0x05, 0x10, 0x90, 0x9c, 0x00, 0x03, 0x93, 0x9e, 0x00, 0x03, 0x01, 0xe8, - 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x20, 0x09, 0xa0, 0x22, 0x08, 0x0c, 0x96, 0x17, 0x04, 0x80, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x01, 0x68, 0x90, 0x9c, 0x00, 0x03, - 0x93, 0x9e, 0x00, 0x03, 0x01, 0x40, 0x60, 0x03, 0x00, 0x01, 0x61, 0x06, - 0x20, 0x09, 0xa0, 0x01, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xf0, 0x90, 0x1e, - 0x63, 0x16, 0x63, 0x1a, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, 0xea, 0x30, - 0x00, 0xb0, 0x60, 0x14, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x0d, 0x98, - 0x90, 0x9c, 0x00, 0x03, 0x93, 0x9e, 0x00, 0x03, 0x0d, 0x70, 0x60, 0x03, - 0x00, 0x03, 0x61, 0x06, 0x60, 0x47, 0x00, 0x00, 0x08, 0x0c, 0x1c, 0x6f, - 0x61, 0x44, 0x91, 0x8d, 0xa0, 0x35, 0x08, 0x0c, 0x96, 0x5e, 0x00, 0x05, - 0x08, 0x0c, 0x99, 0xed, 0x61, 0x14, 0x81, 0xff, 0x01, 0x58, 0x00, 0x96, - 0x21, 0x48, 0x08, 0x0c, 0xed, 0xdf, 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, - 0x08, 0x0c, 0xea, 0x30, 0x00, 0x3e, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0xa7, - 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, 0x08, 0x0c, 0x9a, 0x48, 0x61, 0x14, - 0x81, 0xff, 0x01, 0x58, 0x00, 0x96, 0x21, 0x48, 0x08, 0x0c, 0xed, 0xdf, - 0x00, 0x36, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0xea, 0x30, 0x00, 0x3e, - 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x91, 0x82, 0x00, 0x85, - 0x00, 0x02, 0xe4, 0xcc, 0xe4, 0xca, 0xe4, 0xca, 0xe4, 0xd8, 0xe4, 0xca, - 0xe4, 0xca, 0xe4, 0xca, 0xe4, 0xca, 0xe4, 0xca, 0xe4, 0xca, 0xe4, 0xca, - 0xe4, 0xca, 0xe4, 0xca, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x03, 0x00, 0x0b, - 0x61, 0x06, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x96, 0x17, 0x01, 0x2e, 0x00, 0x05, 0x00, 0x26, 0x00, 0xe6, - 0x08, 0x0c, 0xec, 0x80, 0x01, 0x18, 0x08, 0x0c, 0xb1, 0x6c, 0x04, 0x40, - 0x20, 0x71, 0x02, 0x60, 0x72, 0x24, 0x62, 0x16, 0x20, 0x01, 0x18, 0x0e, - 0x20, 0x04, 0xd0, 0xe4, 0x01, 0x50, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x20, 0x11, 0x01, 0x4e, 0x08, 0x0c, - 0xb4, 0x95, 0x72, 0x20, 0x08, 0x0c, 0xe8, 0x75, 0x01, 0x18, 0x60, 0x07, - 0x00, 0x86, 0x00, 0x40, 0x60, 0x07, 0x00, 0x87, 0x72, 0x24, 0x92, 0x96, - 0xff, 0xff, 0x11, 0x10, 0x60, 0x07, 0x00, 0x86, 0x60, 0x03, 0x00, 0x01, - 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xee, 0x00, 0x2e, - 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, 0x11, 0x60, 0x60, 0x04, 0x90, 0x8a, - 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0x85, 0x90, 0x8a, 0x00, 0x92, 0x1a, 0x0c, - 0x0d, 0x85, 0x90, 0x82, 0x00, 0x85, 0x00, 0xa2, 0x91, 0x86, 0x00, 0x27, - 0x01, 0x30, 0x91, 0x86, 0x00, 0x14, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0x27, - 0x00, 0x50, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x67, 0x26, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, - 0xe5, 0x3b, 0xe5, 0x3d, 0xe5, 0x3d, 0xe5, 0x3b, 0xe5, 0x3b, 0xe5, 0x3b, - 0xe5, 0x3b, 0xe5, 0x3b, 0xe5, 0x3b, 0xe5, 0x3b, 0xe5, 0x3b, 0xe5, 0x3b, - 0xe5, 0x3b, 0x08, 0x0c, 0x0d, 0x85, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x05, 0x91, 0x82, 0x00, 0x85, 0x0a, 0x0c, 0x0d, 0x85, - 0x91, 0x82, 0x00, 0x92, 0x1a, 0x0c, 0x0d, 0x85, 0x91, 0x82, 0x00, 0x85, - 0x00, 0x02, 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5c, 0xe5, 0x5a, - 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5a, 0xe5, 0x5a, - 0xe5, 0x5a, 0xe5, 0x5a, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0x05, 0x91, 0x86, - 0x00, 0x13, 0x01, 0x48, 0x91, 0x86, 0x00, 0x14, 0x01, 0x30, 0x91, 0x86, - 0x00, 0x27, 0x01, 0x18, 0x08, 0x0c, 0xb2, 0x27, 0x00, 0x20, 0x08, 0x0c, - 0x99, 0xed, 0x08, 0x0c, 0xb1, 0xa7, 0x00, 0x05, 0x00, 0x36, 0x08, 0x0c, - 0xec, 0xe1, 0x60, 0x4b, 0x00, 0x00, 0x20, 0x19, 0x00, 0x0b, 0x00, 0x11, - 0x00, 0x3e, 0x00, 0x05, 0x60, 0x10, 0x00, 0x06, 0x00, 0x59, 0x00, 0x0e, - 0x60, 0x12, 0x60, 0x23, 0x00, 0x06, 0x60, 0x03, 0x00, 0x07, 0x60, 0x1b, - 0x00, 0x00, 0x60, 0x4b, 0x00, 0x00, 0x00, 0x05, 0x01, 0x26, 0x00, 0x36, - 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0xac, 0xfc, 0x01, 0x06, 0x00, 0x86, - 0x2c, 0x40, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, 0xa6, 0x67, 0x00, 0x9e, - 0x00, 0x8e, 0x15, 0x58, 0x00, 0x76, 0x2c, 0x38, 0x08, 0x0c, 0xa7, 0x12, - 0x00, 0x7e, 0x15, 0x28, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x05, 0x08, - 0x60, 0x20, 0x90, 0x86, 0x00, 0x07, 0x01, 0xe8, 0x00, 0x96, 0x60, 0x1c, - 0xd0, 0x84, 0x01, 0x40, 0x08, 0x0c, 0xec, 0xe1, 0x08, 0x0c, 0xd6, 0x5d, - 0x08, 0x0c, 0x1a, 0xd3, 0x60, 0x23, 0x00, 0x07, 0x60, 0x14, 0x20, 0x48, - 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x10, 0x08, 0x0c, 0xea, 0x30, 0x00, 0x9e, - 0x90, 0x06, 0x60, 0x46, 0x60, 0x16, 0x08, 0x0c, 0xec, 0xe1, 0x60, 0x23, - 0x00, 0x07, 0x08, 0x0c, 0xd6, 0x5d, 0x01, 0x0e, 0x09, 0x0c, 0xad, 0x18, - 0x00, 0x3e, 0x01, 0x2e, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xc6, 0x00, 0xb6, - 0x00, 0x36, 0x01, 0x56, 0x20, 0x79, 0x02, 0x60, 0x79, 0x38, 0x78, 0x3c, - 0x08, 0x0c, 0x26, 0x8c, 0x19, 0x04, 0xe6, 0x21, 0x00, 0x16, 0x00, 0xc6, - 0x08, 0x0c, 0x67, 0xb4, 0x19, 0x04, 0xe6, 0x1f, 0x00, 0x1e, 0x00, 0xc6, - 0x08, 0x0c, 0xd6, 0x45, 0x11, 0x30, 0xb8, 0x84, 0x90, 0x05, 0x01, 0x18, - 0x08, 0x0c, 0x34, 0x7d, 0x01, 0x48, 0x2b, 0x10, 0x21, 0x60, 0x60, 0x10, - 0x00, 0x06, 0x62, 0x12, 0x08, 0x0c, 0xd6, 0x4c, 0x00, 0x0e, 0x60, 0x12, - 0x00, 0xce, 0x00, 0x2e, 0x00, 0x26, 0x00, 0x16, 0x08, 0x0c, 0xac, 0xfc, - 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0xa7, 0xe2, 0x08, 0x0c, 0x97, 0xb0, - 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0x96, 0x6d, 0x00, 0x7e, 0x00, 0x1e, - 0x00, 0x76, 0x90, 0x3e, 0x08, 0x0c, 0xe7, 0x5d, 0x00, 0x7e, 0x08, 0x0c, - 0xad, 0x18, 0x00, 0x26, 0xba, 0x04, 0x92, 0x94, 0xff, 0x00, 0x82, 0x17, - 0x92, 0x86, 0x00, 0x06, 0x01, 0x18, 0x92, 0x86, 0x00, 0x04, 0x11, 0x18, - 0xba, 0xa0, 0x08, 0x0c, 0x33, 0xe0, 0x00, 0x2e, 0xbc, 0x84, 0x00, 0x1e, - 0x08, 0x0c, 0x61, 0xb7, 0xbe, 0x12, 0xbd, 0x16, 0xbc, 0x86, 0x90, 0x06, - 0x00, 0x10, 0x00, 0xce, 0x00, 0x1e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0xbe, - 0x00, 0xce, 0x00, 0xfe, 0x00, 0x05, 0x00, 0xc6, 0x00, 0xd6, 0x00, 0xb6, - 0x00, 0x16, 0x20, 0x09, 0x18, 0x24, 0x21, 0x04, 0x90, 0x86, 0x00, 0x74, - 0x19, 0x04, 0xe6, 0x80, 0x20, 0x69, 0x02, 0x60, 0x69, 0x44, 0x91, 0x82, - 0x01, 0x00, 0x06, 0xe0, 0x69, 0x40, 0x91, 0x84, 0x80, 0x00, 0x09, 0x04, - 0xe6, 0x7d, 0x20, 0x01, 0x19, 0x7c, 0x20, 0x04, 0x90, 0x05, 0x11, 0x40, - 0x60, 0x10, 0x20, 0x58, 0xb8, 0x84, 0x90, 0x05, 0x01, 0x18, 0x91, 0x84, - 0x08, 0x00, 0x05, 0x98, 0x69, 0x48, 0x91, 0x8a, 0x00, 0x01, 0x06, 0x48, - 0x08, 0x0c, 0xee, 0x47, 0x01, 0x18, 0x69, 0x78, 0xd1, 0xfc, 0x11, 0xb8, - 0x20, 0x09, 0x02, 0x05, 0x20, 0x0b, 0x00, 0x01, 0x69, 0x3c, 0x81, 0xff, - 0x11, 0x98, 0x69, 0x44, 0x91, 0x82, 0x01, 0x00, 0x02, 0xa8, 0x69, 0x40, - 0x81, 0xff, 0x11, 0x78, 0x69, 0x48, 0x91, 0x8a, 0x00, 0x01, 0x02, 0x88, - 0x69, 0x50, 0x91, 0x8a, 0x00, 0x01, 0x02, 0x98, 0x00, 0xd0, 0x60, 0x17, - 0x01, 0x00, 0x00, 0xa0, 0x60, 0x17, 0x03, 0x00, 0x00, 0x88, 0x60, 0x17, - 0x05, 0x00, 0x00, 0x70, 0x60, 0x17, 0x07, 0x00, 0x00, 0x58, 0x60, 0x17, - 0x09, 0x00, 0x00, 0x40, 0x60, 0x17, 0x0b, 0x00, 0x00, 0x28, 0x60, 0x17, - 0x0f, 0x00, 0x00, 0x10, 0x60, 0x17, 0x2d, 0x00, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x08, 0x90, 0x06, 0x00, 0x1e, 0x00, 0xbe, 0x00, 0xde, 0x00, 0xce, - 0x00, 0x05, 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, - 0x62, 0x10, 0x22, 0x58, 0xbb, 0x04, 0x93, 0x94, 0x00, 0xff, 0x92, 0x86, - 0x00, 0x06, 0x01, 0x80, 0x92, 0x86, 0x00, 0x04, 0x01, 0x68, 0x93, 0x94, - 0xff, 0x00, 0x82, 0x17, 0x92, 0x86, 0x00, 0x06, 0x01, 0x38, 0x92, 0x86, - 0x00, 0x04, 0x01, 0x20, 0x08, 0x0c, 0x67, 0xc3, 0x08, 0x04, 0xe6, 0xec, - 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, - 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, 0x15, 0xc8, - 0x20, 0x11, 0x02, 0x7a, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, 0x2b, 0x48, - 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, 0x15, 0x68, - 0x00, 0x46, 0x00, 0x16, 0xba, 0xa0, 0x22, 0x20, 0x90, 0x06, 0x20, 0x09, - 0x18, 0x48, 0x21, 0x0c, 0xd1, 0xa4, 0x01, 0x38, 0x20, 0x09, 0x00, 0x29, - 0x08, 0x0c, 0xea, 0x8d, 0xb8, 0x00, 0xc0, 0xe5, 0xb8, 0x02, 0x08, 0x0c, - 0xac, 0xfc, 0x20, 0x19, 0x00, 0x29, 0x08, 0x0c, 0x97, 0xb0, 0x00, 0x76, - 0x20, 0x39, 0x00, 0x00, 0x08, 0x0c, 0x96, 0x6d, 0x2c, 0x08, 0x08, 0x0c, - 0xe7, 0x5d, 0x00, 0x7e, 0x08, 0x0c, 0xad, 0x18, 0x20, 0x01, 0x00, 0x07, - 0x08, 0x0c, 0x67, 0x26, 0x20, 0x01, 0x00, 0x07, 0x08, 0x0c, 0x66, 0xfa, - 0x00, 0x1e, 0x00, 0x4e, 0x90, 0x06, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, - 0x00, 0xbe, 0x00, 0xce, 0x00, 0x05, 0x00, 0xd6, 0x20, 0x69, 0x02, 0x6e, - 0x68, 0x00, 0x90, 0x86, 0x08, 0x00, 0x01, 0x18, 0x60, 0x17, 0x00, 0x00, - 0x00, 0x08, 0x90, 0x06, 0x00, 0xde, 0x00, 0x05, 0x00, 0xb6, 0x00, 0xf6, - 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x20, 0x79, 0x02, 0x6c, - 0x79, 0x30, 0x78, 0x34, 0x08, 0x0c, 0x26, 0x8c, 0x11, 0xd0, 0x08, 0x0c, - 0x67, 0xb4, 0x11, 0xb8, 0x20, 0x11, 0x02, 0x70, 0x20, 0xa9, 0x00, 0x04, - 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, - 0x00, 0x9e, 0x11, 0x58, 0x20, 0x11, 0x02, 0x74, 0x20, 0xa9, 0x00, 0x04, - 0x00, 0x96, 0x2b, 0x48, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc2, 0x22, - 0x00, 0x9e, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0xfe, - 0x00, 0xbe, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x06, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x01, 0x56, 0x20, 0x11, 0x02, 0x63, 0x22, 0x04, 0x82, 0x11, - 0x22, 0x0c, 0x08, 0x0c, 0x26, 0x8c, 0x11, 0xd0, 0x08, 0x0c, 0x67, 0xb4, - 0x11, 0xb8, 0x20, 0x11, 0x02, 0x76, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, - 0x2b, 0x48, 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, - 0x11, 0x58, 0x20, 0x11, 0x02, 0x7a, 0x20, 0xa9, 0x00, 0x04, 0x00, 0x96, - 0x2b, 0x48, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, - 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xbe, - 0x00, 0x05, 0x00, 0xe6, 0x00, 0xc6, 0x00, 0x86, 0x00, 0x76, 0x00, 0x66, - 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, - 0x08, 0x0c, 0xad, 0x5a, 0x01, 0x06, 0x19, 0x0c, 0xac, 0xfc, 0x27, 0x40, - 0x20, 0x29, 0x19, 0xf4, 0x25, 0x2c, 0x20, 0x21, 0x19, 0xfb, 0x24, 0x24, - 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x71, 0x18, 0x00, 0x76, 0x54, 0x70, 0x74, - 0x81, 0xff, 0x01, 0x50, 0x00, 0x06, 0x91, 0x86, 0x1b, 0x39, 0x00, 0x0e, - 0x01, 0x28, 0x80, 0x01, 0x96, 0x02, 0x1a, 0x04, 0xe8, 0x03, 0x00, 0x18, - 0x96, 0x06, 0x09, 0x04, 0xe8, 0x03, 0x08, 0x0c, 0x8e, 0xee, 0x09, 0x04, - 0xe7, 0xfa, 0x21, 0x00, 0x9c, 0x06, 0x09, 0x04, 0xe7, 0xfa, 0x67, 0x20, - 0x97, 0x86, 0x00, 0x07, 0x09, 0x04, 0xe7, 0xfa, 0x08, 0x0c, 0xea, 0xce, - 0x19, 0x04, 0xe7, 0xfa, 0x08, 0x0c, 0xee, 0x65, 0x09, 0x04, 0xe7, 0xfa, - 0x08, 0x0c, 0xea, 0xbe, 0x09, 0x04, 0xe7, 0xfa, 0x67, 0x20, 0x97, 0x86, - 0x00, 0x01, 0x11, 0x48, 0x08, 0x0c, 0x34, 0x7d, 0x09, 0x04, 0xe8, 0x45, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x00, 0x19, 0x04, 0xe8, 0x45, 0x97, 0x86, - 0x00, 0x04, 0x09, 0x04, 0xe8, 0x45, 0x25, 0x00, 0x9c, 0x06, 0x09, 0x04, - 0xe7, 0xfa, 0x24, 0x00, 0x9c, 0x06, 0x09, 0x04, 0xe7, 0xfa, 0x88, 0xff, - 0x01, 0x18, 0x60, 0x5c, 0x99, 0x06, 0x15, 0xd0, 0x00, 0x96, 0x60, 0x43, - 0xff, 0xff, 0x60, 0x00, 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x00, 0x16, - 0x08, 0x0c, 0x1a, 0xd3, 0x00, 0x1e, 0x97, 0x86, 0x00, 0x0a, 0x01, 0x48, - 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x30, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x9e, - 0x08, 0x0c, 0xb1, 0xa7, 0x04, 0x18, 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0xd8, 0x97, 0x86, 0x00, 0x03, 0x15, 0x88, 0xa8, 0x67, - 0x01, 0x03, 0xa8, 0x7c, 0xd0, 0xcc, 0x01, 0x30, 0x00, 0x96, 0xa8, 0x78, - 0x20, 0x48, 0x08, 0x0c, 0x10, 0x0b, 0x00, 0x9e, 0xab, 0x7a, 0xa8, 0x77, - 0x00, 0x00, 0x08, 0x0c, 0xed, 0xdf, 0x00, 0x16, 0x08, 0x0c, 0xd2, 0x20, - 0x08, 0x0c, 0x70, 0x06, 0x00, 0x1e, 0x08, 0x0c, 0xd1, 0x0c, 0x00, 0x9e, - 0x08, 0x0c, 0xb1, 0xa7, 0x9c, 0xe0, 0x00, 0x1c, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x9c, 0x02, 0x12, 0x10, 0x08, 0x04, 0xe7, 0x76, 0x01, 0x0e, - 0x19, 0x0c, 0xad, 0x18, 0x01, 0x2e, 0x00, 0x2e, 0x00, 0x4e, 0x00, 0x5e, - 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x8e, 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, - 0x97, 0x86, 0x00, 0x06, 0x11, 0x50, 0x93, 0x86, 0x00, 0x05, 0x01, 0x28, - 0x08, 0x0c, 0xed, 0xdf, 0x08, 0x0c, 0xea, 0x30, 0x08, 0xe0, 0x00, 0x9e, - 0x08, 0xe8, 0x97, 0x86, 0x00, 0x09, 0x11, 0xf8, 0x60, 0x00, 0x90, 0x86, - 0x00, 0x04, 0x01, 0xc0, 0x60, 0x00, 0x90, 0x86, 0x00, 0x03, 0x11, 0xa0, - 0x08, 0x0c, 0x9a, 0x48, 0x00, 0x96, 0x61, 0x14, 0x21, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x01, 0x18, 0x60, 0x10, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, - 0x00, 0xc6, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xce, 0x00, 0x36, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x3e, 0x00, 0x9e, 0x08, 0x04, 0xe7, 0xfa, 0x97, 0x86, - 0x00, 0x0a, 0x09, 0x04, 0xe7, 0xea, 0x08, 0x04, 0xe7, 0xdf, 0x81, 0xff, - 0x09, 0x04, 0xe7, 0xfa, 0x91, 0x80, 0x00, 0x01, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x18, 0x01, 0x38, 0x91, 0x80, 0x00, 0x01, 0x20, 0x04, 0x90, 0x86, - 0x00, 0x2d, 0x19, 0x04, 0xe7, 0xfa, 0x60, 0x00, 0x90, 0x86, 0x00, 0x02, - 0x19, 0x04, 0xe7, 0xfa, 0x08, 0x0c, 0xd1, 0x21, 0x01, 0x38, 0x08, 0x0c, - 0xd1, 0x32, 0x19, 0x04, 0xe7, 0xfa, 0x08, 0x0c, 0xbb, 0x5c, 0x00, 0x38, - 0x08, 0x0c, 0x33, 0x44, 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x10, 0x08, 0x0c, - 0xbb, 0x5c, 0x08, 0x0c, 0xb1, 0xa7, 0x08, 0x04, 0xe7, 0xfa, 0xa8, 0x64, - 0x90, 0x84, 0x00, 0xff, 0x90, 0x86, 0x00, 0x39, 0x00, 0x05, 0x00, 0xc6, - 0x00, 0xe6, 0x00, 0x16, 0x2c, 0x08, 0x21, 0x70, 0x90, 0x06, 0x08, 0x0c, - 0xea, 0x57, 0x00, 0x1e, 0x01, 0x20, 0x60, 0x20, 0x90, 0x84, 0x00, 0x0f, - 0x00, 0x1b, 0x00, 0xee, 0x00, 0xce, 0x00, 0x05, 0xe8, 0x94, 0xe8, 0x94, - 0xe8, 0x94, 0xe8, 0x94, 0xe8, 0x94, 0xe8, 0x94, 0xe8, 0x96, 0xe8, 0x94, - 0xe8, 0x94, 0xe8, 0x94, 0xe8, 0xbf, 0xb1, 0xa7, 0xb1, 0xa7, 0xe8, 0x94, - 0x90, 0x06, 0x00, 0x05, 0x00, 0x36, 0x00, 0x46, 0x00, 0x16, 0x70, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xbc, 0xa0, 0x00, 0xbe, 0x2c, 0x00, 0x20, 0x09, - 0x00, 0x20, 0x08, 0x0c, 0xea, 0x8d, 0x00, 0x1e, 0x00, 0x4e, 0x20, 0x19, - 0x00, 0x02, 0x08, 0x0c, 0xe5, 0x86, 0x00, 0x3e, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0x96, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x40, 0x60, 0x14, - 0x90, 0x4d, 0x08, 0x0c, 0xca, 0xe9, 0x68, 0x7b, 0x00, 0x05, 0x08, 0x0c, - 0x70, 0x12, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0xa7, 0x90, 0x85, 0x00, 0x01, - 0x00, 0x05, 0x00, 0x19, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x60, 0x00, - 0x90, 0x8a, 0x00, 0x10, 0x1a, 0x0c, 0x0d, 0x85, 0x00, 0x0b, 0x00, 0x05, - 0xe8, 0xda, 0xe8, 0xda, 0xe8, 0xf1, 0xe8, 0xe1, 0xe9, 0x00, 0xe8, 0xda, - 0xe8, 0xda, 0xe8, 0xdc, 0xe8, 0xda, 0xe8, 0xda, 0xe8, 0xda, 0xe8, 0xda, - 0xe8, 0xda, 0xe8, 0xda, 0xe8, 0xda, 0xe8, 0xda, 0x08, 0x0c, 0x0d, 0x85, - 0x08, 0x0c, 0xb1, 0xa7, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x36, - 0x00, 0xe6, 0x20, 0x71, 0x19, 0xe8, 0x70, 0x4c, 0x9c, 0x06, 0x11, 0x28, - 0x20, 0x19, 0x00, 0x01, 0x08, 0x0c, 0xa5, 0x96, 0x00, 0x10, 0x08, 0x0c, - 0xa7, 0xa1, 0x00, 0xee, 0x00, 0x3e, 0x00, 0x96, 0x00, 0xd6, 0x60, 0x14, - 0x20, 0x48, 0xa8, 0x7b, 0x00, 0x05, 0x08, 0x0c, 0x70, 0x12, 0x08, 0x0c, - 0xb1, 0xa7, 0x00, 0xde, 0x00, 0x9e, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x60, 0x1c, 0xd0, 0x84, 0x19, 0x0c, 0x1a, 0xd3, 0x0c, 0x60, 0x20, 0x01, - 0x00, 0x01, 0x08, 0x0c, 0x66, 0xe6, 0x01, 0x56, 0x00, 0x16, 0x00, 0x26, - 0x00, 0x36, 0x20, 0xa9, 0x00, 0x04, 0x20, 0x19, 0x18, 0x05, 0x20, 0x11, - 0x02, 0x76, 0x08, 0x0c, 0xc2, 0x0e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x1e, - 0x01, 0x5e, 0x90, 0x05, 0x00, 0x05, 0x00, 0xf6, 0x00, 0xe6, 0x00, 0xc6, - 0x00, 0x86, 0x00, 0x76, 0x00, 0x66, 0x00, 0xb6, 0x01, 0x26, 0x20, 0x91, - 0x80, 0x00, 0x27, 0x40, 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x79, 0x00, 0x01, - 0x8f, 0xff, 0x09, 0x04, 0xe9, 0x77, 0x20, 0x71, 0x18, 0x00, 0x76, 0x54, - 0x70, 0x74, 0x80, 0x01, 0x96, 0x02, 0x1a, 0x04, 0xe9, 0x77, 0x88, 0xff, - 0x01, 0x20, 0x28, 0x00, 0x9c, 0x06, 0x15, 0xa0, 0x20, 0x78, 0x08, 0x0c, - 0xea, 0xbe, 0x05, 0x80, 0x24, 0x00, 0x9c, 0x06, 0x05, 0x68, 0x67, 0x20, - 0x97, 0x86, 0x00, 0x06, 0x15, 0x48, 0x97, 0x86, 0x00, 0x07, 0x05, 0x30, - 0x88, 0xff, 0x11, 0x50, 0xd5, 0x8c, 0x11, 0x18, 0x60, 0x10, 0x9b, 0x06, - 0x11, 0xf8, 0xd5, 0x84, 0x01, 0x18, 0x60, 0x5c, 0x91, 0x06, 0x11, 0xd0, - 0x00, 0x96, 0x60, 0x1c, 0xd0, 0x84, 0x01, 0x40, 0x08, 0x0c, 0xec, 0xe1, - 0x08, 0x0c, 0xd6, 0x5d, 0x08, 0x0c, 0x1a, 0xd3, 0x60, 0x23, 0x00, 0x07, - 0x60, 0x14, 0x20, 0x48, 0x08, 0x0c, 0xcf, 0x1b, 0x01, 0x20, 0x00, 0x46, - 0x08, 0x0c, 0xea, 0x30, 0x00, 0x4e, 0x00, 0x9e, 0x08, 0x0c, 0xb1, 0xa7, - 0x88, 0xff, 0x11, 0x98, 0x9c, 0xe0, 0x00, 0x1c, 0x20, 0x01, 0x18, 0x1a, - 0x20, 0x04, 0x9c, 0x02, 0x12, 0x10, 0x08, 0x04, 0xe9, 0x2a, 0x90, 0x06, - 0x01, 0x2e, 0x00, 0xbe, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0x8e, 0x00, 0xce, - 0x00, 0xee, 0x00, 0xfe, 0x00, 0x05, 0x98, 0xc5, 0x00, 0x01, 0x0c, 0xa0, - 0x08, 0x0c, 0xac, 0xfc, 0x00, 0xb6, 0x00, 0x76, 0x00, 0x56, 0x00, 0x86, - 0x90, 0x46, 0x20, 0x29, 0x00, 0x01, 0x2c, 0x20, 0x20, 0x19, 0x00, 0x02, - 0x62, 0x10, 0x22, 0x58, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, 0xa6, 0x67, - 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, 0xa7, 0x12, 0x08, 0x0c, - 0xe9, 0x1b, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0xbe, 0x08, 0x0c, 0xad, 0x18, - 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x00, 0xb6, 0x00, 0x46, 0x00, 0x56, - 0x00, 0x76, 0x00, 0xc6, 0x01, 0x56, 0x2c, 0x20, 0x21, 0x28, 0x20, 0xa9, - 0x00, 0x7f, 0x90, 0x0e, 0x00, 0x16, 0x00, 0x36, 0x08, 0x0c, 0x67, 0xb4, - 0x11, 0x80, 0x00, 0x56, 0x00, 0x86, 0x90, 0x46, 0x25, 0x08, 0x20, 0x29, - 0x00, 0x01, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, 0xa6, 0x67, 0x00, 0x9e, - 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, 0xa7, 0x12, 0x00, 0x5e, 0x00, 0x3e, - 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, 0xe9, 0xb0, 0x00, 0x36, 0x25, 0x08, - 0x20, 0x29, 0x00, 0x03, 0x08, 0x0c, 0xe9, 0x1b, 0x00, 0x3e, 0x01, 0x5e, - 0x00, 0xce, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, 0x00, 0xbe, 0x08, 0x0c, - 0xad, 0x18, 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x00, 0xb6, 0x00, 0x76, - 0x00, 0x56, 0x62, 0x10, 0x22, 0x58, 0x00, 0x86, 0x90, 0x46, 0x20, 0x29, - 0x00, 0x01, 0x20, 0x19, 0x00, 0x48, 0x00, 0x96, 0x90, 0x4e, 0x08, 0x0c, - 0xa6, 0x67, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, 0x08, 0x0c, 0xa7, 0x12, - 0x2c, 0x20, 0x08, 0x0c, 0xe9, 0x1b, 0x00, 0x5e, 0x00, 0x7e, 0x00, 0xbe, - 0x08, 0x0c, 0xad, 0x18, 0x00, 0x05, 0x08, 0x0c, 0xac, 0xfc, 0x00, 0xb6, - 0x00, 0x46, 0x00, 0x56, 0x00, 0x76, 0x00, 0xc6, 0x01, 0x56, 0x2c, 0x20, - 0x20, 0xa9, 0x08, 0x00, 0x90, 0x0e, 0x00, 0x16, 0x00, 0x36, 0x08, 0x0c, - 0x67, 0xb4, 0x11, 0x90, 0x00, 0x86, 0x90, 0x46, 0x28, 0x28, 0x00, 0x46, - 0x20, 0x21, 0x00, 0x01, 0x08, 0x0c, 0xec, 0xc5, 0x00, 0x4e, 0x00, 0x96, - 0x90, 0x4e, 0x08, 0x0c, 0xa6, 0x67, 0x00, 0x9e, 0x00, 0x8e, 0x90, 0x3e, - 0x08, 0x0c, 0xa7, 0x12, 0x00, 0x3e, 0x00, 0x1e, 0x81, 0x08, 0x1f, 0x04, - 0xea, 0x05, 0x00, 0x36, 0x20, 0x29, 0x00, 0x02, 0x08, 0x0c, 0xe9, 0x1b, - 0x00, 0x3e, 0x01, 0x5e, 0x00, 0xce, 0x00, 0x7e, 0x00, 0x5e, 0x00, 0x4e, - 0x00, 0xbe, 0x08, 0x0c, 0xad, 0x18, 0x00, 0x05, 0x00, 0x16, 0x00, 0xf6, - 0x08, 0x0c, 0xcf, 0x19, 0x01, 0x98, 0xa8, 0x64, 0x90, 0x84, 0x00, 0xff, - 0x90, 0x86, 0x00, 0x46, 0x01, 0x80, 0xa8, 0x00, 0x90, 0x7d, 0x01, 0x38, - 0xa8, 0x03, 0x00, 0x00, 0xab, 0x82, 0x08, 0x0c, 0x70, 0x12, 0x2f, 0x48, - 0x0c, 0xb0, 0xab, 0x82, 0x08, 0x0c, 0x70, 0x12, 0x00, 0xfe, 0x00, 0x1e, - 0x00, 0x05, 0xa8, 0x00, 0x90, 0x7d, 0x01, 0x30, 0xa8, 0x03, 0x00, 0x00, - 0x08, 0x0c, 0x70, 0x12, 0x2f, 0x48, 0x0c, 0xb8, 0x08, 0x0c, 0x70, 0x12, - 0x0c, 0x88, 0x00, 0xe6, 0x00, 0x46, 0x00, 0x36, 0x20, 0x61, 0x1d, 0xdc, - 0x90, 0x05, 0x11, 0x38, 0x20, 0x71, 0x18, 0x00, 0x74, 0x54, 0x70, 0x74, - 0x80, 0x01, 0x94, 0x02, 0x12, 0xf8, 0x21, 0x00, 0x9c, 0x06, 0x01, 0x88, - 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, 0x01, 0x68, 0x60, 0x08, 0x92, 0x06, - 0x11, 0x50, 0x63, 0x20, 0x93, 0x86, 0x00, 0x09, 0x01, 0xb0, 0x60, 0x10, - 0x91, 0xa0, 0x00, 0x04, 0x24, 0x24, 0x94, 0x06, 0x01, 0x40, 0x9c, 0xe0, - 0x00, 0x1c, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x20, - 0x0c, 0x20, 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x3e, - 0x00, 0x4e, 0x00, 0xee, 0x00, 0x05, 0x63, 0x1c, 0xd3, 0xc4, 0x1d, 0x68, - 0x0c, 0x30, 0x00, 0x96, 0x00, 0x06, 0x08, 0x0c, 0x10, 0x59, 0x00, 0x0e, - 0x09, 0x0c, 0x0d, 0x85, 0xaa, 0xe2, 0xa8, 0x67, 0x01, 0x0d, 0xa8, 0x8e, - 0x00, 0x26, 0x20, 0x10, 0x08, 0x0c, 0xcf, 0x09, 0x20, 0x01, 0x00, 0x00, - 0x01, 0x20, 0x22, 0x00, 0x90, 0x80, 0x00, 0x17, 0x20, 0x04, 0x00, 0x2e, - 0xa8, 0x7a, 0x91, 0x86, 0x00, 0x20, 0x01, 0x10, 0xa8, 0xe3, 0xff, 0xff, - 0xa9, 0x86, 0xac, 0x76, 0xa8, 0x7f, 0x00, 0x00, 0x20, 0x01, 0x19, 0x8e, - 0x20, 0x04, 0xa8, 0x82, 0x90, 0x06, 0xa8, 0x02, 0xa8, 0x6a, 0xa8, 0x8a, - 0x01, 0x26, 0x20, 0x91, 0x80, 0x00, 0x08, 0x0c, 0x70, 0x12, 0x01, 0x2e, - 0x00, 0x9e, 0x00, 0x05, 0x67, 0x00, 0x97, 0x86, 0x00, 0x00, 0x01, 0x58, - 0x97, 0x86, 0x00, 0x01, 0x01, 0x40, 0x97, 0x86, 0x00, 0x0a, 0x01, 0x28, - 0x97, 0x86, 0x00, 0x09, 0x01, 0x10, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x00, 0xe6, 0x60, 0x10, 0x90, 0x75, 0x01, 0x38, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0xa0, 0x00, 0xbe, 0x92, 0x06, 0x00, 0xee, 0x00, 0x05, 0x90, 0x85, - 0x00, 0x01, 0x0c, 0xd8, 0x00, 0x16, 0x60, 0x04, 0x90, 0x8e, 0x00, 0x1e, - 0x11, 0xa0, 0x80, 0x07, 0x61, 0x34, 0x91, 0x8c, 0x00, 0xff, 0x91, 0x05, - 0x60, 0x36, 0x60, 0x07, 0x00, 0x85, 0x60, 0x03, 0x00, 0x0b, 0x60, 0x23, - 0x00, 0x05, 0x20, 0x01, 0x19, 0x87, 0x20, 0x04, 0x60, 0x1a, 0x20, 0x09, - 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0x1e, 0x00, 0x05, 0xa0, 0x01, - 0xa0, 0x01, 0x00, 0x05, 0x60, 0x24, 0xd0, 0xe4, 0x01, 0x58, 0xd0, 0xcc, - 0x01, 0x18, 0x08, 0x0c, 0xd2, 0x67, 0x00, 0x30, 0x08, 0x0c, 0xec, 0xe1, - 0x08, 0x0c, 0x8c, 0x19, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0x05, 0x92, 0x80, - 0x00, 0x08, 0x20, 0x04, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x02, 0xeb, 0x1d, - 0xeb, 0x1d, 0xeb, 0x1d, 0xeb, 0x1f, 0xeb, 0x1d, 0xeb, 0x1f, 0xeb, 0x1f, - 0xeb, 0x1d, 0xeb, 0x1f, 0xeb, 0x1d, 0xeb, 0x1d, 0xeb, 0x1d, 0xeb, 0x1d, - 0xeb, 0x1d, 0x90, 0x06, 0x00, 0x05, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, - 0x92, 0x80, 0x00, 0x08, 0x20, 0x04, 0x90, 0x84, 0x00, 0x0f, 0x00, 0x02, - 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, - 0xeb, 0x43, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, 0xeb, 0x36, - 0xeb, 0x36, 0xeb, 0x36, 0x60, 0x07, 0x00, 0x3b, 0x60, 0x2f, 0x00, 0x09, - 0x60, 0x17, 0x2a, 0x00, 0x60, 0x03, 0x00, 0x01, 0x20, 0x09, 0x80, 0x20, - 0x08, 0x0c, 0x96, 0x17, 0x00, 0x05, 0x00, 0x96, 0x00, 0xc6, 0x22, 0x60, - 0x08, 0x0c, 0xec, 0xe1, 0x60, 0x4b, 0x00, 0x00, 0x60, 0x24, 0xc0, 0xf4, - 0xc0, 0xe4, 0x60, 0x26, 0x60, 0x3b, 0x00, 0x00, 0x00, 0xce, 0x00, 0xd6, - 0x22, 0x68, 0x91, 0x86, 0x00, 0x07, 0x19, 0x04, 0xeb, 0x9c, 0x68, 0x14, - 0x90, 0x05, 0x01, 0x38, 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xfc, 0x11, 0x18, - 0x00, 0xde, 0x00, 0x9e, 0x08, 0xa8, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xc6, - 0x2d, 0x60, 0x61, 0x00, 0x91, 0x86, 0x00, 0x02, 0x19, 0x04, 0xec, 0x0c, - 0x60, 0x14, 0x90, 0x05, 0x11, 0x38, 0x60, 0x00, 0x90, 0x86, 0x00, 0x07, - 0x19, 0x0c, 0x0d, 0x85, 0x08, 0x04, 0xec, 0x0c, 0x20, 0x48, 0x08, 0x0c, - 0xcf, 0x1b, 0x11, 0x30, 0x00, 0x28, 0x20, 0x48, 0xa8, 0x00, 0x90, 0x05, - 0x1d, 0xe0, 0x29, 0x00, 0x20, 0x48, 0xa8, 0x7c, 0x90, 0x84, 0x00, 0x03, - 0x90, 0x86, 0x00, 0x02, 0x11, 0x68, 0xa8, 0x7c, 0xc0, 0xdc, 0xc0, 0xf4, - 0xa8, 0x7e, 0xa8, 0x80, 0xc0, 0xfc, 0xa8, 0x82, 0x20, 0x09, 0x00, 0x43, - 0x08, 0x0c, 0xe3, 0xb5, 0x08, 0x04, 0xec, 0x0c, 0x20, 0x09, 0x00, 0x41, - 0x08, 0x04, 0xec, 0x06, 0x91, 0x86, 0x00, 0x05, 0x15, 0xa0, 0x68, 0x14, - 0x20, 0x48, 0xa8, 0x7c, 0xd0, 0xbc, 0x11, 0x20, 0x00, 0xde, 0x00, 0x9e, - 0x08, 0x04, 0xeb, 0x36, 0xd0, 0xb4, 0x01, 0x28, 0xd0, 0xfc, 0x09, 0x0c, - 0x0d, 0x85, 0x08, 0x04, 0xeb, 0x57, 0x60, 0x07, 0x00, 0x3a, 0x60, 0x03, - 0x00, 0x01, 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, 0x00, 0xc6, - 0x2d, 0x60, 0x61, 0x00, 0x91, 0x86, 0x00, 0x02, 0x01, 0x20, 0x91, 0x86, - 0x00, 0x04, 0x19, 0x04, 0xec, 0x0c, 0x68, 0x14, 0x20, 0x48, 0xa9, 0x7c, - 0xc1, 0xf4, 0xc1, 0xdc, 0xa9, 0x7e, 0xa9, 0x80, 0xc1, 0xfc, 0xc1, 0xbc, - 0xa9, 0x82, 0x00, 0xf6, 0x2c, 0x78, 0x08, 0x0c, 0x17, 0xad, 0x00, 0xfe, - 0x20, 0x09, 0x00, 0x42, 0x04, 0x98, 0x00, 0x36, 0x08, 0x0c, 0x10, 0x59, - 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x67, 0x01, 0x0d, 0x90, 0x06, 0xa8, 0x02, - 0xa8, 0x6a, 0xa8, 0x8a, 0x2d, 0x18, 0xab, 0x8e, 0xa8, 0x87, 0x00, 0x45, - 0x2c, 0x00, 0xa8, 0x92, 0x60, 0x38, 0xa8, 0xa2, 0x23, 0x60, 0x60, 0x24, - 0xc0, 0xdd, 0x60, 0x26, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xa0, - 0x00, 0xbe, 0x20, 0x04, 0x63, 0x5c, 0xab, 0x7a, 0xa8, 0x76, 0x90, 0x06, - 0xa8, 0x7e, 0xa8, 0x82, 0xad, 0x9a, 0xae, 0x96, 0xa8, 0x9f, 0x00, 0x01, - 0x08, 0x0c, 0x70, 0x12, 0x20, 0x19, 0x00, 0x45, 0x60, 0x08, 0x20, 0x68, - 0x08, 0x0c, 0xe5, 0x78, 0x2d, 0x00, 0x60, 0x0a, 0x00, 0x3e, 0x00, 0x38, - 0x60, 0x4b, 0x00, 0x00, 0x60, 0x03, 0x00, 0x07, 0x08, 0x0c, 0xe3, 0xb5, - 0x00, 0xce, 0x00, 0xde, 0x00, 0x9e, 0x00, 0x05, 0x91, 0x86, 0x00, 0x13, - 0x11, 0x28, 0x60, 0x04, 0x90, 0x82, 0x00, 0x85, 0x20, 0x08, 0x00, 0xc2, - 0x91, 0x86, 0x00, 0x27, 0x11, 0x78, 0x08, 0x0c, 0x99, 0xed, 0x00, 0x36, - 0x00, 0x96, 0x60, 0x14, 0x20, 0x48, 0x20, 0x19, 0x00, 0x04, 0x08, 0x0c, - 0xea, 0x30, 0x00, 0x9e, 0x00, 0x3e, 0x08, 0x0c, 0x9a, 0xb3, 0x00, 0x05, - 0x91, 0x86, 0x00, 0x14, 0x0d, 0x70, 0x08, 0x0c, 0xb2, 0x27, 0x00, 0x05, - 0xec, 0x3f, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, - 0xec, 0x3f, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, 0xec, 0x3d, - 0xec, 0x3d, 0x08, 0x0c, 0x0d, 0x85, 0x60, 0x03, 0x00, 0x0c, 0x08, 0x0c, - 0x9a, 0xb3, 0x00, 0x05, 0x91, 0x82, 0x00, 0x92, 0x12, 0x20, 0x91, 0x82, - 0x00, 0x85, 0x02, 0x08, 0x00, 0x1a, 0x08, 0x0c, 0xb2, 0x27, 0x00, 0x05, - 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5d, 0xec, 0x7d, - 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, 0xec, 0x5b, - 0xec, 0x5b, 0x08, 0x0c, 0x0d, 0x85, 0x00, 0xd6, 0x2c, 0x68, 0x08, 0x0c, - 0xb1, 0x16, 0x01, 0xb0, 0x60, 0x03, 0x00, 0x01, 0x60, 0x07, 0x00, 0x1e, - 0x20, 0x09, 0x02, 0x6e, 0x21, 0x0c, 0x61, 0x3a, 0x20, 0x09, 0x02, 0x6f, - 0x21, 0x0c, 0x61, 0x3e, 0x60, 0x0b, 0xff, 0xff, 0x69, 0x10, 0x61, 0x12, - 0x60, 0x23, 0x00, 0x04, 0x20, 0x09, 0x80, 0x20, 0x08, 0x0c, 0x96, 0x17, - 0x2d, 0x60, 0x08, 0x0c, 0xb1, 0x6c, 0x00, 0xde, 0x00, 0x05, 0x08, 0x0c, - 0xb1, 0x6c, 0x00, 0x05, 0x00, 0xe6, 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, - 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xec, 0x00, 0xee, 0x00, 0x05, 0x20, 0x09, - 0x18, 0x67, 0x21, 0x0c, 0xd1, 0xec, 0x05, 0xb0, 0x60, 0x03, 0x00, 0x02, - 0x60, 0x24, 0xc0, 0xe5, 0x60, 0x26, 0xd0, 0xcc, 0x01, 0x50, 0x20, 0x01, - 0x19, 0x88, 0x20, 0x04, 0x60, 0x4a, 0x20, 0x09, 0x18, 0x67, 0x21, 0x0c, - 0xd1, 0xf4, 0x15, 0x20, 0x00, 0xa0, 0x20, 0x09, 0x18, 0x67, 0x21, 0x0c, - 0xd1, 0xf4, 0x01, 0x28, 0x60, 0x24, 0xc0, 0xe4, 0x60, 0x26, 0x90, 0x06, - 0x00, 0xd8, 0x20, 0x01, 0x19, 0x88, 0x20, 0x0c, 0x20, 0x01, 0x19, 0x86, - 0x20, 0x04, 0x91, 0x00, 0x90, 0x80, 0x00, 0x0a, 0x60, 0x4a, 0x60, 0x10, - 0x00, 0xb6, 0x20, 0x58, 0xb8, 0xbc, 0x00, 0xbe, 0x00, 0x08, 0x21, 0x04, - 0x90, 0x05, 0x01, 0x18, 0x90, 0x88, 0x00, 0x03, 0x0c, 0xd0, 0x2c, 0x0a, - 0x60, 0x0f, 0x00, 0x00, 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x00, 0x16, - 0x00, 0xc6, 0x00, 0xe6, 0x61, 0x5c, 0xb8, 0xbc, 0x20, 0x60, 0x8c, 0xff, - 0x01, 0x80, 0x84, 0xff, 0x11, 0x18, 0x60, 0x5c, 0x91, 0x06, 0x11, 0x38, - 0x60, 0x0c, 0x20, 0x72, 0x08, 0x0c, 0x8c, 0x19, 0x08, 0x0c, 0xb1, 0x6c, - 0x00, 0x10, 0x9c, 0xf0, 0x00, 0x03, 0x2e, 0x64, 0x0c, 0x70, 0x00, 0xee, - 0x00, 0xce, 0x00, 0x1e, 0x00, 0x05, 0x00, 0xd6, 0x00, 0xb6, 0x60, 0x10, - 0x20, 0x58, 0xb8, 0xbc, 0x90, 0x6d, 0x01, 0x30, 0x9c, 0x06, 0x01, 0x10, - 0x68, 0x0c, 0x0c, 0xd0, 0x60, 0x0c, 0x68, 0x0e, 0x00, 0xbe, 0x00, 0xde, - 0x00, 0x05, 0x00, 0x26, 0x00, 0x36, 0x01, 0x56, 0x20, 0x11, 0x18, 0x2c, - 0x22, 0x04, 0x90, 0x84, 0x00, 0xff, 0x20, 0x19, 0x02, 0x6e, 0x23, 0x34, - 0x96, 0xb4, 0x00, 0xff, 0x96, 0x36, 0x15, 0x08, 0x83, 0x18, 0x23, 0x34, - 0x22, 0x04, 0x90, 0x84, 0xff, 0x00, 0x96, 0x36, 0x11, 0xd0, 0x20, 0x11, - 0x02, 0x70, 0x20, 0xa9, 0x00, 0x04, 0x60, 0x10, 0x00, 0x96, 0x20, 0x48, - 0x20, 0x19, 0x00, 0x0a, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, 0x11, 0x68, - 0x20, 0x11, 0x02, 0x74, 0x20, 0xa9, 0x00, 0x04, 0x60, 0x10, 0x00, 0x96, - 0x20, 0x48, 0x20, 0x19, 0x00, 0x06, 0x08, 0x0c, 0xc2, 0x22, 0x00, 0x9e, - 0x11, 0x00, 0x01, 0x5e, 0x00, 0x3e, 0x00, 0x2e, 0x00, 0x05, 0x00, 0xe6, - 0x20, 0x71, 0x18, 0x00, 0x08, 0x0c, 0x61, 0x30, 0x08, 0x0c, 0x30, 0xbf, - 0x00, 0xee, 0x00, 0x05, 0x00, 0x96, 0x00, 0x26, 0x08, 0x0c, 0x10, 0x59, - 0x09, 0x0c, 0x0d, 0x85, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x1a, 0x20, 0xa0, - 0x20, 0xa9, 0x00, 0x0c, 0xa8, 0x60, 0x20, 0xe8, 0x90, 0x06, 0x40, 0x04, - 0x91, 0x86, 0x00, 0x46, 0x11, 0x18, 0xa8, 0x67, 0x01, 0x36, 0x00, 0x38, - 0xa8, 0x67, 0x01, 0x38, 0x91, 0x86, 0x00, 0x41, 0x01, 0x10, 0xa8, 0x7b, - 0x00, 0x01, 0x70, 0x38, 0x90, 0x84, 0xff, 0x00, 0x72, 0x40, 0x92, 0x94, - 0xff, 0x00, 0x80, 0x07, 0x92, 0x15, 0xaa, 0x9a, 0x91, 0x86, 0x00, 0x46, - 0x11, 0x68, 0x70, 0x38, 0x90, 0x84, 0x00, 0xff, 0x72, 0x3c, 0x92, 0x94, - 0xff, 0x00, 0x92, 0x15, 0xaa, 0x9e, 0x72, 0x3c, 0x92, 0x94, 0x00, 0xff, - 0xaa, 0xa2, 0x00, 0x60, 0x70, 0x40, 0x90, 0x84, 0x00, 0xff, 0x72, 0x44, - 0x92, 0x94, 0xff, 0x00, 0x92, 0x15, 0xaa, 0x9e, 0x72, 0x44, 0x92, 0x94, - 0x00, 0xff, 0xaa, 0xa2, 0x91, 0x86, 0x00, 0x46, 0x11, 0x18, 0x9e, 0x90, - 0x00, 0x12, 0x00, 0x10, 0x9e, 0x90, 0x00, 0x1a, 0x22, 0x04, 0x80, 0x07, - 0xa8, 0xa6, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xaa, 0x82, 0x10, - 0x22, 0x04, 0x80, 0x07, 0xa8, 0xae, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, - 0xa8, 0xb2, 0x82, 0x10, 0x91, 0x86, 0x00, 0x46, 0x11, 0xb8, 0x9e, 0x90, - 0x00, 0x16, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xb6, 0x82, 0x10, 0x22, 0x04, - 0x80, 0x07, 0xa8, 0xba, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xbe, - 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xc2, 0x82, 0x10, 0x20, 0x11, - 0x02, 0x05, 0x20, 0x13, 0x00, 0x01, 0x00, 0xb0, 0x9e, 0x90, 0x00, 0x1e, - 0x22, 0x04, 0x80, 0x07, 0xa8, 0xb6, 0x82, 0x10, 0x22, 0x04, 0x80, 0x07, - 0xa8, 0xba, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x01, 0x20, 0x11, - 0x02, 0x60, 0x22, 0x04, 0x80, 0x07, 0xa8, 0xbe, 0x82, 0x10, 0x22, 0x04, - 0x80, 0x07, 0xa8, 0xc2, 0x91, 0x86, 0x00, 0x46, 0x11, 0x18, 0x20, 0x11, - 0x02, 0x62, 0x00, 0x10, 0x20, 0x11, 0x02, 0x6a, 0x01, 0x46, 0x01, 0xd6, - 0x00, 0x36, 0x20, 0xa9, 0x00, 0x01, 0x20, 0x19, 0x00, 0x08, 0xa8, 0x60, - 0x20, 0xe8, 0xa8, 0x5c, 0x90, 0x80, 0x00, 0x31, 0x20, 0xa0, 0x22, 0x04, - 0x80, 0x07, 0x40, 0x04, 0x82, 0x10, 0x83, 0x19, 0x1d, 0xd0, 0x00, 0x3e, - 0x01, 0xce, 0x01, 0x3e, 0x20, 0x11, 0x02, 0x05, 0x20, 0x13, 0x00, 0x00, - 0x00, 0x2e, 0x08, 0x0c, 0x70, 0x12, 0x00, 0x9e, 0x00, 0x05, 0x00, 0xe6, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xb8, 0x00, 0x00, 0xbe, 0xd0, 0xfc, - 0x01, 0x08, 0x00, 0x11, 0x00, 0xee, 0x00, 0x05, 0xa8, 0x80, 0xc0, 0xe5, - 0xa8, 0x82, 0x00, 0x05, 0x00, 0xe6, 0x00, 0xd6, 0x00, 0xc6, 0x00, 0x76, - 0x00, 0x66, 0x00, 0x56, 0x00, 0x46, 0x00, 0x26, 0x00, 0x16, 0x01, 0x26, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x29, 0x19, 0xf4, 0x25, 0x2c, 0x20, 0x21, - 0x19, 0xfb, 0x24, 0x24, 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x71, 0x18, 0x00, - 0x76, 0x54, 0x70, 0x74, 0x96, 0x06, 0x05, 0x78, 0x67, 0x20, 0x97, 0x86, - 0x00, 0x01, 0x01, 0x18, 0x97, 0x86, 0x00, 0x08, 0x15, 0x00, 0x25, 0x00, - 0x9c, 0x06, 0x01, 0xe8, 0x24, 0x00, 0x9c, 0x06, 0x01, 0xd0, 0x08, 0x0c, - 0xea, 0xbe, 0x01, 0xb8, 0x08, 0x0c, 0xea, 0xce, 0x11, 0xa0, 0x60, 0x00, - 0x90, 0x86, 0x00, 0x04, 0x11, 0x20, 0x00, 0x16, 0x08, 0x0c, 0x1a, 0xd3, - 0x00, 0x1e, 0x08, 0x0c, 0xd1, 0x21, 0x11, 0x10, 0x08, 0x0c, 0x33, 0x44, - 0x08, 0x0c, 0xd1, 0x32, 0x11, 0x10, 0x08, 0x0c, 0xbb, 0x5c, 0x08, 0x0c, - 0xb1, 0xa7, 0x9c, 0xe0, 0x00, 0x1c, 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, - 0x9c, 0x02, 0x12, 0x08, 0x08, 0x58, 0x01, 0x2e, 0x00, 0x1e, 0x00, 0x2e, - 0x00, 0x4e, 0x00, 0x5e, 0x00, 0x6e, 0x00, 0x7e, 0x00, 0xce, 0x00, 0xde, - 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, 0xd0, 0xdc, - 0x00, 0x05, 0x00, 0x06, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0x9c, - 0x00, 0x0e, 0x00, 0x05, 0x00, 0x06, 0x00, 0x36, 0x00, 0x46, 0x08, 0x0c, - 0xd6, 0x45, 0x01, 0x68, 0x20, 0x19, 0xff, 0xff, 0x90, 0x05, 0x01, 0x28, - 0x60, 0x10, 0x00, 0xb6, 0x20, 0x58, 0xbb, 0xa0, 0x00, 0xbe, 0x20, 0x21, - 0x00, 0x04, 0x08, 0x0c, 0x4e, 0x58, 0x00, 0x4e, 0x00, 0x3e, 0x00, 0x0e, - 0x00, 0x05, 0x60, 0x04, 0x90, 0x86, 0x00, 0x01, 0x11, 0x28, 0x08, 0x0c, - 0xa7, 0xe2, 0x08, 0x0c, 0xb1, 0xa7, 0x90, 0x06, 0x00, 0x05, 0x00, 0xe6, - 0x00, 0xc6, 0x00, 0xb6, 0x00, 0x46, 0x20, 0x61, 0x1d, 0xdc, 0x20, 0x71, - 0x18, 0x00, 0x74, 0x54, 0x70, 0x74, 0x80, 0x01, 0x94, 0x02, 0x12, 0xd8, - 0x21, 0x00, 0x9c, 0x06, 0x01, 0x68, 0x60, 0x00, 0x90, 0x86, 0x00, 0x00, - 0x01, 0x48, 0x60, 0x10, 0x20, 0x58, 0xb8, 0xa0, 0x92, 0x06, 0x11, 0x20, - 0x60, 0x04, 0x90, 0x86, 0x00, 0x02, 0x01, 0x40, 0x9c, 0xe0, 0x00, 0x1c, - 0x20, 0x01, 0x18, 0x1a, 0x20, 0x04, 0x9c, 0x02, 0x12, 0x20, 0x0c, 0x40, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x08, 0x90, 0x06, 0x00, 0x4e, 0x00, 0xbe, - 0x00, 0xce, 0x00, 0xee, 0x00, 0x05, 0x20, 0x01, 0x18, 0x10, 0x20, 0x04, - 0xd0, 0xa4, 0x01, 0x60, 0x20, 0x01, 0x18, 0x37, 0x20, 0x04, 0xd0, 0xa4, - 0x01, 0x38, 0x20, 0x01, 0x18, 0x48, 0x20, 0x04, 0xd0, 0xa4, 0x11, 0x18, - 0x90, 0x85, 0x00, 0x01, 0x00, 0x05, 0x90, 0x06, 0x0c, 0xe8, 0x01, 0x26, - 0x00, 0x06, 0x00, 0xe6, 0x00, 0x16, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x18, 0x40, 0xd5, 0xa4, 0x01, 0x18, 0x70, 0x04, 0x80, 0x00, 0x70, 0x06, - 0xd5, 0xb4, 0x01, 0x18, 0x70, 0x00, 0x80, 0x00, 0x70, 0x02, 0xd5, 0xac, - 0x01, 0x78, 0x25, 0x00, 0x90, 0x84, 0x00, 0x07, 0x90, 0x8e, 0x00, 0x03, - 0x01, 0x48, 0x90, 0x8e, 0x00, 0x04, 0x01, 0x30, 0x90, 0x8e, 0x00, 0x05, - 0x01, 0x18, 0x20, 0x71, 0xff, 0xf6, 0x00, 0x89, 0x00, 0x1e, 0x00, 0xee, - 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, - 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, 0xff, 0xee, 0x00, 0x21, 0x00, 0xee, - 0x00, 0x0e, 0x01, 0x2e, 0x00, 0x05, 0x2e, 0x05, 0x80, 0x00, 0x20, 0x77, - 0x12, 0x20, 0x8e, 0x70, 0x2e, 0x05, 0x80, 0x00, 0x20, 0x77, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0xff, 0xec, 0x0c, 0x99, 0x00, 0xee, 0x00, 0x05, - 0x00, 0xe6, 0x20, 0x71, 0xff, 0xf0, 0x0c, 0x69, 0x00, 0xee, 0x00, 0x05, - 0x01, 0x26, 0x00, 0x06, 0x00, 0xe6, 0x20, 0x91, 0x80, 0x00, 0x20, 0x71, - 0x18, 0x40, 0x70, 0x14, 0x80, 0x00, 0x70, 0x16, 0x00, 0xee, 0x00, 0x0e, - 0x01, 0x2e, 0x00, 0x05, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x08, - 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x02, 0x00, - 0x04, 0x00, 0x08, 0x00, 0x10, 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, - 0xaa, 0x6e, 0x00, 0x0b, 0x00, 0x03, 0x00, 0x00, 0x0a, 0x4e, 0x00, 0x01, - 0xc0, 0x00, 0x00, 0x08, 0x80, 0x64, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x01, 0x01, 0x00, 0x03, 0xc0, 0x07, 0x00, 0x08, - 0x80, 0xe0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x00, 0x80, 0xe2, 0x00, 0x08, - 0xff, 0x00, 0x00, 0x08, 0x01, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0xa1, 0x01, 0x00, 0x0b, 0xc0, 0x0f, 0x00, 0x08, 0x0d, 0x02, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x60, 0xc6, 0x00, 0x08, - 0x80, 0xe0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x58, 0x19, 0x00, 0x03, - 0x7b, 0x08, 0x00, 0x03, 0x52, 0x41, 0x00, 0x0b, 0xc8, 0x13, 0x00, 0x09, - 0xba, 0xc0, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x03, 0x88, 0x13, 0x00, 0x0a, - 0x70, 0x42, 0x00, 0x03, 0x88, 0x13, 0x00, 0x00, 0x15, 0xfc, 0x00, 0x0b, - 0xb0, 0x13, 0x00, 0x09, 0xc4, 0xc0, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, - 0xff, 0xa0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x03, 0x93, 0xcd, 0x00, 0x08, - 0x80, 0x8c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x40, 0xd4, 0x00, 0x0a, 0x40, 0x47, 0x00, 0x08, - 0x80, 0x8c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, - 0x08, 0x32, 0x00, 0x00, 0x40, 0x22, 0x00, 0x03, 0x00, 0x38, 0x00, 0x08, - 0x41, 0x22, 0x00, 0x09, 0xea, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x09, - 0xff, 0xe0, 0x00, 0x08, 0x05, 0x00, 0x00, 0x0b, 0x0b, 0xf4, 0x00, 0x02, - 0x44, 0x47, 0x00, 0x03, 0x8b, 0xf1, 0x00, 0x08, 0x0b, 0xfe, 0x00, 0x01, - 0x11, 0xa0, 0x00, 0x0b, 0x13, 0xd3, 0x00, 0x01, 0x0c, 0xa0, 0x00, 0x0b, - 0x13, 0xd3, 0x00, 0x01, 0x91, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc0, 0x46, 0x00, 0x08, - 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x11, 0x00, 0x0b, 0xc0, 0x4e, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x01, - 0x43, 0xe0, 0x00, 0x03, 0x8b, 0xd0, 0x00, 0x09, 0xc2, 0xc0, 0x00, 0x08, - 0x00, 0xff, 0x00, 0x01, 0x02, 0xe0, 0x00, 0x03, 0x8b, 0xd0, 0x00, 0x01, - 0x91, 0x80, 0x00, 0x08, 0x00, 0x05, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x03, 0xc0, 0x5d, 0x00, 0x02, 0x02, 0x40, 0x00, 0x0b, - 0x0b, 0xcd, 0x00, 0x08, 0x00, 0xfc, 0x00, 0x03, 0x33, 0xd0, 0x00, 0x0a, - 0x02, 0x44, 0x00, 0x03, 0x08, 0x6f, 0x00, 0x04, 0x02, 0x1a, 0x00, 0x01, - 0x91, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x02, 0x34, 0x00, 0x08, - 0x7f, 0x04, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x04, 0x0a, 0x00, 0x03, - 0xc0, 0x6e, 0x00, 0x0a, 0x02, 0x48, 0x00, 0x0b, 0x08, 0x79, 0x00, 0x01, - 0x91, 0x80, 0x00, 0x08, 0x00, 0x06, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x08, - 0x80, 0x02, 0x00, 0x08, 0x00, 0x03, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x02, 0x0a, 0x00, 0x0b, 0xc0, 0x78, 0x00, 0x00, 0x11, 0x2a, 0x00, 0x08, - 0x00, 0x2e, 0x00, 0x08, 0x02, 0x2c, 0x00, 0x02, 0x3a, 0x44, 0x00, 0x03, - 0x88, 0x13, 0x00, 0x08, 0x80, 0x8c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, - 0x17, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x11, 0x00, 0x03, 0xc0, 0x85, 0x00, 0x08, - 0x01, 0xfe, 0x00, 0x09, 0x42, 0xe0, 0x00, 0x0b, 0x8b, 0xc0, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x01, 0x43, 0xe0, 0x00, 0x0b, 0x8b, 0xc0, 0x00, 0x00, - 0x17, 0x34, 0x00, 0x00, 0x15, 0x30, 0x00, 0x08, 0x16, 0x32, 0x00, 0x08, - 0x0d, 0x2a, 0x00, 0x01, 0x98, 0x80, 0x00, 0x08, 0x00, 0x12, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x1e, 0x0a, 0x00, 0x03, 0xc0, 0x97, 0x00, 0x08, - 0x80, 0x8a, 0x00, 0x08, 0x00, 0x03, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x58, 0x9d, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x36, 0x79, 0x00, 0x0b, 0xc0, 0xa0, 0x00, 0x0b, - 0x58, 0xa1, 0x00, 0x08, 0x80, 0x54, 0x00, 0x08, 0x00, 0x11, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x08, 0x10, 0x10, 0x00, 0x08, 0x1e, 0xfc, 0x00, 0x03, - 0x30, 0x13, 0x00, 0x04, 0x00, 0xaa, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, - 0x1c, 0x60, 0x00, 0x00, 0x1b, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x02, 0x31, 0x00, 0x03, 0xc0, 0xae, 0x00, 0x03, 0x58, 0xaf, 0x00, 0x08, - 0x01, 0x40, 0x00, 0x00, 0x02, 0x42, 0x00, 0x02, 0x1f, 0x43, 0x00, 0x03, - 0x88, 0xb9, 0x00, 0x00, 0x0d, 0x44, 0x00, 0x08, 0x0d, 0x46, 0x00, 0x08, - 0x03, 0x48, 0x00, 0x08, 0x04, 0x4a, 0x00, 0x0b, 0x00, 0xbd, 0x00, 0x08, - 0x03, 0x44, 0x00, 0x08, 0x04, 0x46, 0x00, 0x08, 0x05, 0x48, 0x00, 0x00, - 0x06, 0x4a, 0x00, 0x0a, 0x19, 0x48, 0x00, 0x03, 0x08, 0xc0, 0x00, 0x08, - 0x0d, 0x4a, 0x00, 0x03, 0x58, 0xc0, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x80, 0x74, 0x00, 0x08, 0x20, 0x20, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x02, 0x70, 0x43, 0x00, 0x03, 0x88, 0x16, 0x00, 0x02, - 0x70, 0x40, 0x00, 0x0b, 0x89, 0x49, 0x00, 0x00, 0x48, 0x20, 0x00, 0x08, - 0x0b, 0xfe, 0x00, 0x09, 0x10, 0xa0, 0x00, 0x03, 0x11, 0x40, 0x00, 0x01, - 0x0c, 0xa0, 0x00, 0x03, 0x11, 0x40, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x90, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, - 0xc0, 0xd7, 0x00, 0x01, 0x80, 0xe0, 0x00, 0x08, 0x00, 0x03, 0x00, 0x0b, - 0x89, 0x40, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x90, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, 0xc0, 0xe2, 0x00, 0x08, - 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x04, 0x11, 0x00, 0x0b, 0xc0, 0xe8, 0x00, 0x08, - 0x4a, 0xfe, 0x00, 0x09, 0x03, 0xe0, 0x00, 0x0b, 0x89, 0x40, 0x00, 0x09, - 0xcb, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x01, 0x02, 0xe0, 0x00, 0x0b, - 0x89, 0x40, 0x00, 0x00, 0x49, 0xb4, 0x00, 0x02, 0x4b, 0x4e, 0x00, 0x0b, - 0x89, 0x51, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x18, 0xfe, 0x00, 0x01, 0x10, 0xe0, 0x00, 0x0b, 0x88, 0xfa, 0x00, 0x02, - 0x19, 0x2f, 0x00, 0x08, 0x7f, 0x32, 0x00, 0x08, 0x15, 0xfe, 0x00, 0x01, - 0x10, 0xe0, 0x00, 0x0b, 0x88, 0xff, 0x00, 0x02, 0x16, 0x2f, 0x00, 0x08, - 0x7f, 0x2c, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x90, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc1, 0x06, 0x00, 0x0a, - 0x00, 0x4f, 0x00, 0x0b, 0x89, 0x37, 0x00, 0x0a, 0x00, 0x40, 0x00, 0x0b, - 0x09, 0x21, 0x00, 0x02, 0x00, 0x4e, 0x00, 0x0b, 0x09, 0x21, 0x00, 0x02, - 0x00, 0x30, 0x00, 0x02, 0x7f, 0x2f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x03, 0xc1, 0x12, 0x00, 0x08, - 0x10, 0x10, 0x00, 0x04, 0x02, 0x01, 0x00, 0x03, 0xb1, 0x1a, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x0c, 0x01, 0xeb, 0x00, 0x03, 0x78, 0x16, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x00, 0x08, 0x06, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x1f, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, 0x03, 0x10, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x03, 0x01, 0x18, 0x00, 0x0a, 0x00, 0x2f, 0x00, 0x00, - 0x7f, 0x00, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x0b, - 0xc1, 0x25, 0x00, 0x04, 0x01, 0xc4, 0x00, 0x0a, 0x00, 0x40, 0x00, 0x0b, - 0x09, 0x3a, 0x00, 0x04, 0x02, 0x31, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x90, 0x80, 0x00, 0x08, 0x00, 0x06, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x03, 0xc1, 0x33, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x40, 0x00, 0x00, 0x03, 0x01, 0x18, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x1e, 0x00, 0x03, 0x01, 0x3c, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x04, 0x03, 0x87, 0x00, 0x08, - 0x10, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x03, 0x00, 0x16, 0x00, 0x02, - 0x4b, 0x4e, 0x00, 0x03, 0x09, 0x46, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x0b, 0x61, 0x46, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x08, - 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x03, 0x00, 0x16, 0x00, 0x08, - 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x08, 0x80, 0xe0, 0x00, 0x08, 0x02, 0x02, 0x00, 0x0b, - 0x61, 0x49, 0x00, 0x0b, 0x00, 0x14, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x90, 0x80, 0x00, 0x08, 0x00, 0x11, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, - 0xc1, 0x58, 0x00, 0x0a, 0x00, 0x4f, 0x00, 0x0b, 0x89, 0xb5, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x90, 0x80, 0x00, 0x08, - 0x00, 0x05, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x00, 0x09, 0x00, 0x0b, 0xc1, 0x62, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x02, 0x09, 0x00, 0x0b, 0xc1, 0x68, 0x00, 0x0a, 0x01, 0x4b, 0x00, 0x03, - 0x09, 0xb5, 0x00, 0x08, 0x80, 0x62, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x02, 0x11, 0x00, 0x03, 0xc1, 0x6f, 0x00, 0x08, - 0x01, 0xfe, 0x00, 0x01, 0x02, 0xd0, 0x00, 0x0b, 0x89, 0xb5, 0x00, 0x04, - 0x01, 0xcd, 0x00, 0x03, 0x09, 0xb5, 0x00, 0x08, 0x03, 0xa0, 0x00, 0x08, - 0x80, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, - 0x00, 0x43, 0x00, 0x08, 0x49, 0x08, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x90, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x04, 0x1a, 0x00, 0x03, 0xc1, 0x84, 0x00, 0x03, - 0xe1, 0x85, 0x00, 0x08, 0x49, 0x08, 0x00, 0x08, 0x48, 0x0a, 0x00, 0x08, - 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x04, 0x11, 0x00, 0x0b, 0xc1, 0x8f, 0x00, 0x08, 0x04, 0xfe, 0x00, 0x09, - 0x02, 0xa0, 0x00, 0x03, 0x91, 0x96, 0x00, 0x02, 0x05, 0x00, 0x00, 0x0b, - 0x09, 0xb2, 0x00, 0x0b, 0x01, 0x97, 0x00, 0x00, 0x05, 0xfe, 0x00, 0x01, - 0x03, 0xa0, 0x00, 0x0b, 0x11, 0xb2, 0x00, 0x00, 0x0d, 0x0c, 0x00, 0x08, - 0x0d, 0x0e, 0x00, 0x08, 0x0d, 0x10, 0x00, 0x00, 0x0d, 0x12, 0x00, 0x08, - 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x08, 0x32, 0x00, 0x0b, 0xc1, 0xa2, 0x00, 0x00, - 0x80, 0x0a, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x90, 0x80, 0x00, 0x08, 0x00, 0x11, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x0a, 0x12, 0x00, 0x03, - 0xc1, 0xac, 0x00, 0x08, 0x50, 0x06, 0x00, 0x08, 0x10, 0x0e, 0x00, 0x0c, - 0x01, 0xd8, 0x00, 0x03, 0x78, 0x16, 0x00, 0x03, 0x00, 0x13, 0x00, 0x08, - 0x02, 0x08, 0x00, 0x08, 0x03, 0x0a, 0x00, 0x03, 0x01, 0x99, 0x00, 0x04, - 0x01, 0xc4, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x21, 0x00, 0x04, 0x03, 0x87, 0x00, 0x08, - 0x10, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, 0x48, 0x10, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x08, 0x49, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x08, - 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x03, 0x00, 0x16, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x90, 0x80, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0xb4, 0x0a, 0x00, 0x0b, 0xc1, 0xcb, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x04, 0x11, 0x00, 0x03, 0xc1, 0xd2, 0x00, 0x02, - 0x02, 0x10, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x09, - 0x03, 0xe0, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x83, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, - 0x0a, 0x80, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x0e, 0x0a, 0x00, 0x0b, 0xc1, 0xe0, 0x00, 0x02, 0x03, 0x00, 0x00, 0x01, - 0xff, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x7f, 0x06, 0x00, 0x02, - 0x0a, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x06, 0x0a, 0x00, 0x0b, 0xc1, 0xe9, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, - 0x0d, 0xa0, 0x00, 0x08, 0x0d, 0xa2, 0x00, 0x08, 0x0d, 0xa4, 0x00, 0x09, - 0x88, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0xa0, 0x12, 0x00, 0x00, 0x0d, 0xa6, 0x00, 0x08, 0x0d, 0xa8, 0x00, 0x00, - 0x0d, 0xaa, 0x00, 0x00, 0x0d, 0xac, 0x00, 0x03, 0xc1, 0xf9, 0x00, 0x09, - 0x88, 0x80, 0x00, 0x08, 0x00, 0x09, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0xa0, 0x3a, 0x00, 0x03, 0xc1, 0xff, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x09, 0x88, 0x80, 0x00, 0x08, 0x00, 0x05, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, 0xc2, 0x08, 0x00, 0x08, - 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x21, 0x00, 0x0b, 0xc2, 0x0e, 0x00, 0x00, - 0x00, 0xfe, 0x00, 0x01, 0x01, 0xd0, 0x00, 0x03, 0x8a, 0x17, 0x00, 0x08, - 0x02, 0xfe, 0x00, 0x09, 0x03, 0xd0, 0x00, 0x0b, 0x0a, 0x17, 0x00, 0x00, - 0x0d, 0x06, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0xa0, 0x41, 0x00, 0x0b, 0xc2, 0x1f, 0x00, 0x02, 0x02, 0x43, 0x00, 0x0b, - 0x8a, 0x26, 0x00, 0x00, 0x54, 0xac, 0x00, 0x00, 0x55, 0xae, 0x00, 0x08, - 0x0d, 0xa8, 0x00, 0x00, 0x0d, 0xaa, 0x00, 0x00, 0x50, 0xb0, 0x00, 0x00, - 0x51, 0xb2, 0x00, 0x00, 0x0d, 0xb4, 0x00, 0x08, 0x0d, 0xb6, 0x00, 0x08, - 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0xa4, 0x52, 0x00, 0x0b, 0xc2, 0x2f, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x0a, 0x39, 0x45, 0x00, 0x0b, 0x8a, 0x3b, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x08, 0x40, 0x40, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, - 0x39, 0x45, 0x00, 0x03, 0x8a, 0x39, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x40, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x39, 0x45, 0x00, 0x0b, - 0x0a, 0x33, 0x00, 0x0b, 0x02, 0x3b, 0x00, 0x0a, 0x3a, 0x40, 0x00, 0x03, - 0x88, 0x19, 0x00, 0x01, 0xab, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x24, 0x00, 0x03, 0x5a, 0x46, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x02, 0x12, 0x42, 0x00, 0x03, 0x0a, 0x8c, 0x00, 0x0a, - 0x3a, 0x45, 0x00, 0x0b, 0x0a, 0x7b, 0x00, 0x0a, 0x1e, 0x10, 0x00, 0x00, - 0x7f, 0x3c, 0x00, 0x0b, 0x0a, 0x78, 0x00, 0x02, 0x1d, 0x00, 0x00, 0x00, - 0x7f, 0x3a, 0x00, 0x00, 0x0d, 0x60, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc2, 0x56, 0x00, 0x08, - 0x00, 0xfc, 0x00, 0x03, 0xb2, 0x75, 0x00, 0x00, 0x1c, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x00, 0x09, 0x00, 0x0b, 0xc2, 0x5e, 0x00, 0x08, 0x00, 0xfc, 0x00, 0x0b, - 0x33, 0xa9, 0x00, 0x00, 0x00, 0x38, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, - 0x80, 0x62, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x00, 0x09, 0x00, 0x0b, 0xc2, 0x67, 0x00, 0x09, 0x80, 0xc0, 0x00, 0x08, - 0x00, 0xff, 0x00, 0x08, 0x7f, 0x3e, 0x00, 0x00, 0x0d, 0x60, 0x00, 0x08, - 0x0e, 0xfe, 0x00, 0x01, 0x1f, 0x80, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc2, 0x71, 0x00, 0x08, - 0x00, 0x3a, 0x00, 0x00, 0x1d, 0xfe, 0x00, 0x0b, 0x02, 0x52, 0x00, 0x08, - 0x00, 0x36, 0x00, 0x04, 0x00, 0xaa, 0x00, 0x0b, 0x02, 0x8c, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0x20, 0x00, 0x00, 0x0b, 0x02, 0x8c, 0x00, 0x02, - 0x3a, 0x44, 0x00, 0x0b, 0x0b, 0xd6, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x01, 0xad, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x7f, 0x0e, 0x00, 0x03, 0xb3, 0xa6, 0x00, 0x01, 0xa7, 0xd0, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x09, 0xa6, 0xd0, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x09, 0x00, 0xd0, 0x00, 0x03, 0x8a, 0x9c, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x08, 0x40, 0x40, 0x00, 0x03, 0x5a, 0x8c, 0x00, 0x03, - 0x52, 0x41, 0x00, 0x0a, 0x3a, 0x46, 0x00, 0x03, 0x8a, 0x9c, 0x00, 0x02, - 0x3a, 0x47, 0x00, 0x03, 0x0a, 0x97, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, - 0x02, 0xfc, 0x00, 0x09, 0x92, 0xc0, 0x00, 0x00, 0x0f, 0xc8, 0x00, 0x0b, - 0x08, 0x13, 0x00, 0x0a, 0x12, 0x46, 0x00, 0x0b, 0x8b, 0xa0, 0x00, 0x00, - 0x1a, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x36, 0x7a, 0x00, 0x0b, 0xc2, 0xa1, 0x00, 0x09, - 0x92, 0xc0, 0x00, 0x08, 0x07, 0x80, 0x00, 0x03, 0x8b, 0xba, 0x00, 0x02, - 0x12, 0x4b, 0x00, 0x0b, 0x0a, 0xaa, 0x00, 0x02, 0x2e, 0x4d, 0x00, 0x02, - 0x2e, 0x4d, 0x00, 0x03, 0x0b, 0xa6, 0x00, 0x0a, 0x3a, 0x46, 0x00, 0x0b, - 0x8a, 0xba, 0x00, 0x0b, 0x5a, 0xac, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x0a, 0x12, 0x43, 0x00, 0x0b, 0x0a, 0xfa, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x04, 0x03, 0x87, 0x00, 0x0a, - 0x19, 0x48, 0x00, 0x0b, 0x0a, 0xb7, 0x00, 0x0c, 0x03, 0x7c, 0x00, 0x00, - 0x18, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x03, 0x02, 0xfa, 0x00, 0x0a, - 0x19, 0x48, 0x00, 0x0b, 0x0a, 0xbe, 0x00, 0x0a, 0x12, 0x43, 0x00, 0x03, - 0x0b, 0xa9, 0x00, 0x0a, 0x19, 0x4d, 0x00, 0x03, 0x0a, 0xc2, 0x00, 0x0a, - 0x12, 0x43, 0x00, 0x0b, 0x0b, 0xb0, 0x00, 0x03, 0x5a, 0xc2, 0x00, 0x08, - 0x80, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x19, 0x2e, 0x00, 0x08, - 0x7f, 0x32, 0x00, 0x0a, 0x19, 0x47, 0x00, 0x03, 0x0a, 0xf4, 0x00, 0x02, - 0x19, 0x4f, 0x00, 0x0b, 0x0a, 0xd2, 0x00, 0x0c, 0x03, 0x7c, 0x00, 0x00, - 0x18, 0x10, 0x00, 0x04, 0x02, 0x01, 0x00, 0x0b, 0xb2, 0xed, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x0c, 0x01, 0xeb, 0x00, 0x03, 0x02, 0xfa, 0x00, 0x00, - 0x1a, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc2, 0xd7, 0x00, 0x0a, - 0x00, 0x4c, 0x00, 0x0b, 0x8a, 0xf4, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x98, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x03, - 0xc2, 0xe1, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0x98, 0x80, 0x00, 0x08, 0x00, 0x12, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x1e, 0x0a, 0x00, 0x0b, 0xc2, 0xe9, 0x00, 0x00, - 0x18, 0x26, 0x00, 0x00, 0x19, 0x28, 0x00, 0x03, 0x02, 0xfa, 0x00, 0x00, - 0x08, 0x06, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x00, 0x03, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x03, - 0x02, 0xfa, 0x00, 0x0c, 0x03, 0x7c, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, 0x18, 0x10, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x00, 0x80, 0x74, 0x00, 0x08, 0xf0, 0x00, 0x00, 0x00, - 0x0d, 0x30, 0x00, 0x02, 0x3a, 0x42, 0x00, 0x03, 0x8b, 0x02, 0x00, 0x00, - 0x15, 0xfc, 0x00, 0x03, 0xb0, 0x7e, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0x05, 0x01, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x0c, 0x00, 0x04, 0x03, 0x87, 0x00, 0x03, 0x00, 0x13, 0x00, 0x09, - 0xbb, 0xe0, 0x00, 0x08, 0x00, 0x30, 0x00, 0x0b, 0x8b, 0x1e, 0x00, 0x00, - 0x18, 0xfe, 0x00, 0x09, 0x3c, 0xe0, 0x00, 0x03, 0x0b, 0x1b, 0x00, 0x08, - 0x15, 0xfe, 0x00, 0x09, 0x3c, 0xe0, 0x00, 0x03, 0x0b, 0x1b, 0x00, 0x08, - 0x13, 0xfe, 0x00, 0x09, 0x3c, 0xe0, 0x00, 0x0b, 0x8b, 0x17, 0x00, 0x0c, - 0x03, 0x75, 0x00, 0x08, 0x0d, 0x26, 0x00, 0x0b, 0x03, 0x18, 0x00, 0x04, - 0x03, 0x77, 0x00, 0x08, 0x80, 0x76, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0b, - 0x03, 0x72, 0x00, 0x08, 0x80, 0x76, 0x00, 0x08, 0x00, 0x41, 0x00, 0x0b, - 0x03, 0x72, 0x00, 0x09, 0xbb, 0xe0, 0x00, 0x00, 0x00, 0x32, 0x00, 0x03, - 0x8b, 0x23, 0x00, 0x08, 0x3c, 0x1e, 0x00, 0x0b, 0x03, 0x72, 0x00, 0x09, - 0xbb, 0xe0, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x0b, 0x8b, 0x28, 0x00, 0x00, - 0x3c, 0xdc, 0x00, 0x0b, 0x03, 0x72, 0x00, 0x09, 0xbb, 0xe0, 0x00, 0x08, - 0x00, 0x35, 0x00, 0x0b, 0x8b, 0x2e, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x0b, 0x04, 0xe5, 0x00, 0x09, 0xbb, 0xe0, 0x00, 0x08, - 0x00, 0x36, 0x00, 0x0b, 0x0c, 0x06, 0x00, 0x09, 0xbb, 0xe0, 0x00, 0x00, - 0x00, 0x37, 0x00, 0x0b, 0x8b, 0x53, 0x00, 0x00, 0x18, 0xfe, 0x00, 0x09, - 0x3c, 0xe0, 0x00, 0x0b, 0x8b, 0x1b, 0x00, 0x08, 0x80, 0x76, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x1a, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, - 0x00, 0x0d, 0x00, 0x09, 0xa6, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x7f, 0x04, 0x00, 0x01, 0xa7, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x06, 0x00, 0x01, 0xa8, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x7f, 0x08, 0x00, 0x09, 0xa9, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x7f, 0x0a, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x04, 0x22, 0x00, 0x03, - 0xc3, 0x4a, 0x00, 0x0c, 0x03, 0x7c, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x80, 0x74, 0x00, 0x08, 0xf0, 0x00, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x02, 0xfc, 0x00, 0x09, - 0xbb, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0b, 0x8b, 0x65, 0x00, 0x00, - 0x18, 0xfe, 0x00, 0x09, 0x3c, 0xe0, 0x00, 0x0b, 0x0b, 0x62, 0x00, 0x08, - 0x15, 0xfe, 0x00, 0x09, 0x3c, 0xe0, 0x00, 0x0b, 0x8b, 0x11, 0x00, 0x04, - 0x03, 0x77, 0x00, 0x08, 0x80, 0x76, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x03, 0xcd, 0x00, 0x08, - 0x80, 0x76, 0x00, 0x08, 0x00, 0x42, 0x00, 0x0b, 0x03, 0x72, 0x00, 0x09, - 0xbb, 0xe0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x0b, 0x8b, 0x72, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x08, 0x08, 0x08, 0x00, 0x02, 0x3a, 0x44, 0x00, 0x0b, - 0x88, 0x18, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x02, 0x14, 0x30, 0x00, 0x0b, 0x03, 0x78, 0x00, 0x0a, - 0x3d, 0x30, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x01, 0xbc, 0x80, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x03, 0x03, 0x80, 0x00, 0x0a, 0x19, 0x30, 0x00, 0x00, - 0x7f, 0x00, 0x00, 0x01, 0x98, 0x80, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x03, 0xc3, 0x85, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x0b, 0x23, 0x8a, 0x00, 0x08, 0x08, 0x70, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x02, 0x70, 0x40, 0x00, 0x03, 0x0b, 0x87, 0x00, 0x0b, - 0xe3, 0x94, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x80, 0xe0, 0x00, 0x08, - 0x02, 0x02, 0x00, 0x0b, 0x63, 0x8d, 0x00, 0x08, 0x80, 0xe0, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x0b, 0x03, 0x87, 0x00, 0x09, 0xba, 0xc0, 0x00, 0x08, - 0x00, 0x90, 0x00, 0x0b, 0x0b, 0x9d, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, - 0x07, 0x06, 0x00, 0x0b, 0x03, 0x9f, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, - 0x07, 0x03, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x23, 0x00, 0x0b, 0x03, 0xdb, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x0b, 0x03, 0xdb, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x22, 0x00, 0x0b, 0x03, 0xdb, 0x00, 0x0c, 0x03, 0x7c, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x00, 0x00, 0x07, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, - 0x18, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x03, 0x03, 0xe5, 0x00, 0x0c, - 0x03, 0x7c, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, 0x00, 0x1b, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x00, 0x18, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, - 0x80, 0x74, 0x00, 0x00, 0xf0, 0x80, 0x00, 0x00, 0x0d, 0x30, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, - 0x03, 0xdb, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, 0x00, 0x05, 0x00, 0x0b, - 0x03, 0xdb, 0x00, 0x0a, 0x16, 0x48, 0x00, 0x03, 0x88, 0x8c, 0x00, 0x08, - 0x80, 0x8c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x41, 0x43, 0x00, 0x0b, - 0x08, 0x8c, 0x00, 0x02, 0x3a, 0x44, 0x00, 0x03, 0x88, 0x13, 0x00, 0x08, - 0x0d, 0x2a, 0x00, 0x0b, 0x03, 0xdb, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x03, 0x00, 0x0b, 0x03, 0xdd, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x0b, 0x00, 0x0b, 0x03, 0xdd, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x0b, 0x03, 0xdd, 0x00, 0x02, 0x3a, 0x47, 0x00, 0x0b, - 0x8a, 0x8c, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, 0x00, 0x06, 0x00, 0x0b, - 0x03, 0xdd, 0x00, 0x00, 0x80, 0x74, 0x00, 0x08, 0xf0, 0x00, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x0c, 0x03, 0x97, 0x00, 0x0a, 0x3a, 0x40, 0x00, 0x0b, - 0x08, 0x13, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, - 0xf0, 0x80, 0x00, 0x00, 0x0d, 0x30, 0x00, 0x02, 0x2e, 0x4d, 0x00, 0x02, - 0x2e, 0x4d, 0x00, 0x03, 0x0b, 0xee, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, - 0x00, 0x19, 0x00, 0x03, 0x00, 0x13, 0x00, 0x08, 0x80, 0x54, 0x00, 0x08, - 0x00, 0x09, 0x00, 0x03, 0x00, 0x13, 0x00, 0x02, 0x3a, 0x44, 0x00, 0x03, - 0x88, 0x13, 0x00, 0x03, 0x03, 0xd0, 0x00, 0x08, 0x80, 0x8c, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x02, 0x44, 0x47, 0x00, 0x03, 0x0c, 0x1a, 0x00, 0x01, - 0xc0, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x09, 0xff, 0xe0, 0x00, 0x08, - 0x00, 0xff, 0x00, 0x03, 0x8b, 0xf1, 0x00, 0x01, 0xc1, 0xe0, 0x00, 0x08, - 0xff, 0xff, 0x00, 0x03, 0x8b, 0xf1, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, - 0x00, 0x13, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, 0x80, 0x74, 0x00, 0x08, - 0x02, 0x02, 0x00, 0x03, 0x00, 0x13, 0x00, 0x0a, 0x3a, 0x40, 0x00, 0x03, - 0x8c, 0x17, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x3d, 0x00, 0x00, 0x00, 0x3c, 0xfe, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x01, 0x43, 0xe0, 0x00, 0x0b, 0x8c, 0x15, 0x00, 0x00, - 0x42, 0xfe, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x09, - 0x00, 0xe0, 0x00, 0x0b, 0x0b, 0xf1, 0x00, 0x08, 0x0d, 0x08, 0x00, 0x03, - 0x04, 0x6a, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x0c, 0x04, 0xee, 0x00, 0x08, 0x80, 0x8c, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x04, 0xfc, 0x00, 0x03, 0x34, 0xd1, 0x00, 0x00, - 0x04, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x03, 0xc4, 0x24, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x09, 0x80, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x00, - 0x7f, 0x00, 0x00, 0x01, 0x80, 0xe0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x03, - 0x0c, 0x3e, 0x00, 0x01, 0x80, 0xe0, 0x00, 0x08, 0x00, 0x05, 0x00, 0x03, - 0x0c, 0x3e, 0x00, 0x01, 0x80, 0xe0, 0x00, 0x08, 0x00, 0x06, 0x00, 0x03, - 0x0c, 0x3e, 0x00, 0x01, 0x82, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x08, - 0x7f, 0x04, 0x00, 0x09, 0x82, 0xe0, 0x00, 0x08, 0x06, 0x00, 0x00, 0x03, - 0x0c, 0x3e, 0x00, 0x09, 0x82, 0xe0, 0x00, 0x08, 0x05, 0x00, 0x00, 0x03, - 0x0c, 0x3e, 0x00, 0x09, 0x82, 0xe0, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x8c, 0xd1, 0x00, 0x09, 0xc4, 0xc0, 0x00, 0x00, 0x70, 0x00, 0x00, 0x09, - 0xff, 0xe0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x0b, 0x0c, 0x6a, 0x00, 0x04, - 0x04, 0xdf, 0x00, 0x02, 0x39, 0x41, 0x00, 0x03, 0x0c, 0x49, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0x13, 0x00, 0x00, - 0x04, 0x60, 0x00, 0x08, 0x80, 0xfe, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x22, 0x09, 0x00, 0x0b, - 0xc4, 0x4f, 0x00, 0x08, 0x11, 0xfc, 0x00, 0x03, 0x34, 0x65, 0x00, 0x01, - 0x91, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x06, 0x09, 0x00, 0x03, 0xc4, 0x59, 0x00, 0x00, 0x42, 0xfe, 0x00, 0x01, - 0xff, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x09, 0x03, 0xe0, 0x00, 0x0b, - 0x8c, 0x62, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0b, - 0x00, 0x56, 0x00, 0x01, 0x91, 0x80, 0x00, 0x08, 0x00, 0x03, 0x00, 0x0b, - 0x04, 0x4c, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0b, 0x04, 0xc4, 0x00, 0x04, - 0x04, 0xdf, 0x00, 0x02, 0x39, 0x41, 0x00, 0x03, 0x0c, 0x70, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0x13, 0x00, 0x0a, - 0x6e, 0x42, 0x00, 0x03, 0x0c, 0x75, 0x00, 0x0c, 0x04, 0xa9, 0x00, 0x08, - 0x11, 0xfc, 0x00, 0x03, 0xb4, 0x7a, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x80, 0x10, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0b, - 0x04, 0xc4, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0xfc, 0x00, 0x03, 0xb4, 0x8f, 0x00, 0x08, 0x80, 0x8c, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x01, 0x91, 0x80, 0x00, 0x08, 0x00, 0x05, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0b, - 0xc4, 0x85, 0x00, 0x08, 0x00, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x08, - 0x00, 0x1b, 0x00, 0x08, 0x43, 0x04, 0x00, 0x08, 0x42, 0x06, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x04, 0x12, 0x00, 0x03, 0xc4, 0x8d, 0x00, 0x03, - 0x04, 0xa6, 0x00, 0x08, 0x80, 0x8c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x08, 0x00, 0x2b, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x06, 0x09, 0x00, 0x03, 0xc4, 0x96, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x22, 0x0a, 0x00, 0x03, 0xc4, 0x99, 0x00, 0x00, - 0x42, 0xfe, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x08, - 0x7f, 0x04, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0x91, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x04, 0x1a, 0x00, 0x03, 0xc4, 0xa5, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x56, 0x00, 0x00, - 0x80, 0x60, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x6b, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x04, 0x11, 0x00, 0x0b, 0xc4, 0xae, 0x00, 0x08, - 0x02, 0xfe, 0x00, 0x09, 0x03, 0xe0, 0x00, 0x03, 0x8c, 0xb4, 0x00, 0x00, - 0x0d, 0x22, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x09, 0x82, 0x80, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x01, 0x6b, 0x80, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x08, 0x22, 0x09, 0x00, 0x0b, 0xc4, 0xba, 0x00, 0x0a, - 0x02, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x7f, 0x06, 0x00, 0x08, 0x6b, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x08, - 0x06, 0x0a, 0x00, 0x0b, 0xc4, 0xc2, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x02, - 0x3a, 0x44, 0x00, 0x03, 0x88, 0x13, 0x00, 0x0a, 0x2f, 0x44, 0x00, 0x0a, - 0x2f, 0x44, 0x00, 0x03, 0x8b, 0xd0, 0x00, 0x08, 0x80, 0x8a, 0x00, 0x08, - 0x00, 0x03, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, 0xf0, 0x80, 0x00, 0x03, - 0x5c, 0xcd, 0x00, 0x08, 0x80, 0x54, 0x00, 0x00, 0x00, 0x19, 0x00, 0x03, - 0x00, 0x13, 0x00, 0x02, 0x3a, 0x44, 0x00, 0x03, 0x88, 0x13, 0x00, 0x08, - 0x80, 0x8c, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x80, 0x10, 0x00, 0x08, - 0x00, 0x11, 0x00, 0x04, 0x03, 0x87, 0x00, 0x00, 0x42, 0xfe, 0x00, 0x01, - 0xff, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x08, 0x7f, 0x10, 0x00, 0x04, - 0x03, 0x87, 0x00, 0x08, 0x43, 0x10, 0x00, 0x0b, 0x03, 0xdd, 0x00, 0x02, - 0x39, 0x41, 0x00, 0x0b, 0x0c, 0xe2, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x00, - 0x80, 0x72, 0x00, 0x08, 0x04, 0x04, 0x00, 0x0f, 0x40, 0x00, 0x00, 0x08, - 0x80, 0x10, 0x00, 0x08, 0x00, 0x12, 0x00, 0x04, 0x03, 0x87, 0x00, 0x0c, - 0x04, 0xa9, 0x00, 0x00, 0x11, 0x10, 0x00, 0x04, 0x03, 0x87, 0x00, 0x08, - 0x11, 0xfc, 0x00, 0x0b, 0xb4, 0xe8, 0x00, 0x03, 0x00, 0x13, 0x00, 0x09, - 0xc2, 0xc0, 0x00, 0x08, 0x00, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x01, - 0xc3, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x09, 0x00, 0xd0, 0x00, 0x0b, - 0x0d, 0x13, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x01, 0x85, 0x80, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x08, 0x09, 0x00, 0x0b, - 0xc4, 0xfd, 0x00, 0x00, 0x04, 0xfc, 0x00, 0x0b, 0x35, 0x0c, 0x00, 0x00, - 0x04, 0x60, 0x00, 0x08, 0x80, 0x62, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0x80, 0x66, 0x00, 0x00, 0x02, 0x11, 0x00, 0x0b, 0xc5, 0x05, 0x00, 0x08, - 0x01, 0xfe, 0x00, 0x09, 0x00, 0xe0, 0x00, 0x0b, 0x8d, 0x0c, 0x00, 0x08, - 0x02, 0xfe, 0x00, 0x01, 0x43, 0xe0, 0x00, 0x03, 0x0d, 0x12, 0x00, 0x02, - 0x05, 0x00, 0x00, 0x00, 0x7f, 0x0a, 0x00, 0x09, 0xff, 0xe0, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x03, 0x8c, 0xf6, 0x00, 0x08, 0x0d, 0x08, 0x00, 0x0f, - 0x40, 0x00, 0x00, 0x08, 0x43, 0xfe, 0x00, 0x01, 0x3e, 0x80, 0x00, 0x00, - 0x0d, 0x60, 0x00, 0x08, 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, - 0x08, 0x09, 0x00, 0x03, 0xc5, 0x19, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x84, 0xc0, 0x00, 0x08, 0xff, 0x00, 0x00, 0x02, - 0x7f, 0x70, 0x00, 0x09, 0xff, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, - 0x7f, 0x62, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0x08, 0x09, 0x00, 0x0b, - 0xc5, 0x24, 0x00, 0x0f, 0x40, 0x00, 0xe4, 0xa8, 0xa3, 0xb9, 0x00, 0x13, - 0x00, 0x03, 0x00, 0x00, 0x12, 0x52, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x05, - 0x00, 0x32, 0x00, 0x00, 0x00, 0x10, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xbb, 0x39, 0x00, 0x0b, 0x80, 0x07, 0x00, 0x04, 0x01, 0x13, 0x00, 0x04, - 0x01, 0x25, 0x00, 0x10, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, - 0xc0, 0xb0, 0x00, 0x10, 0xc0, 0xb1, 0x00, 0x10, 0xc0, 0xb2, 0x00, 0x00, - 0xc0, 0xb3, 0x00, 0x10, 0xc0, 0xb4, 0x00, 0x00, 0xc0, 0xb5, 0x00, 0x00, - 0xc0, 0xb6, 0x00, 0x10, 0xc0, 0xb7, 0x00, 0x10, 0xc0, 0xb8, 0x00, 0x00, - 0xc0, 0xb9, 0x00, 0x00, 0xc0, 0xba, 0x00, 0x00, 0xc0, 0xc2, 0x00, 0x10, - 0xc0, 0xc3, 0x00, 0x00, 0xc0, 0xc4, 0x00, 0x10, 0xc0, 0xc5, 0x00, 0x10, - 0xc0, 0xc6, 0x00, 0x00, 0xc0, 0xc7, 0x00, 0x00, 0xc0, 0xc8, 0x00, 0x10, - 0xc0, 0xc9, 0x00, 0x10, 0xc0, 0xca, 0x00, 0x00, 0xc0, 0xcb, 0x00, 0x10, - 0xc0, 0xcc, 0x00, 0x00, 0xc0, 0xcd, 0x00, 0x00, 0xc0, 0xce, 0x00, 0x10, - 0xc0, 0xcf, 0x00, 0x15, 0x00, 0x39, 0x00, 0x10, 0xff, 0x00, 0x00, 0x15, - 0x00, 0x3a, 0x00, 0x10, 0xff, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x00, 0x10, - 0xff, 0x00, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x10, 0xff, 0x00, 0x00, 0x12, - 0x3a, 0x40, 0x00, 0x0b, 0x10, 0x31, 0x00, 0x02, 0x79, 0x40, 0x00, 0x1b, - 0x11, 0x37, 0x00, 0x02, 0x3a, 0x42, 0x00, 0x1b, 0x10, 0x35, 0x00, 0x03, - 0xb0, 0x35, 0x00, 0x03, 0xa1, 0xe2, 0x00, 0x02, 0x3a, 0x41, 0x00, 0x1b, - 0x10, 0x39, 0x00, 0x12, 0x79, 0x41, 0x00, 0x1b, 0x13, 0x17, 0x00, 0x13, - 0xe0, 0x54, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x13, - 0x10, 0x54, 0x00, 0x00, 0x0c, 0xfe, 0x00, 0x13, 0x60, 0x47, 0x00, 0x02, - 0x3a, 0x44, 0x00, 0x1b, 0x10, 0x47, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x13, 0x13, 0xcd, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x10, - 0x00, 0x05, 0x00, 0x13, 0x14, 0x5f, 0x00, 0x12, 0x3a, 0x46, 0x00, 0x0b, - 0x10, 0x54, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, - 0x10, 0x4f, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x10, 0x00, 0x05, 0x00, 0x0b, - 0x10, 0x54, 0x00, 0x00, 0x12, 0xfe, 0x00, 0x03, 0x60, 0x54, 0x00, 0x01, - 0x0f, 0xe8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x16, 0x95, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x10, 0xc1, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x11, 0x00, 0x1b, 0x80, 0x59, 0x00, 0x10, - 0xb2, 0xff, 0x00, 0x01, 0xb3, 0xe0, 0x00, 0x1c, 0x10, 0xd5, 0x00, 0x0b, - 0xf0, 0x2d, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1b, - 0x10, 0x71, 0x00, 0x00, 0x0a, 0xfe, 0x00, 0x0b, 0x60, 0x65, 0x00, 0x00, - 0x3c, 0x0b, 0x00, 0x03, 0x00, 0x6d, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x0a, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0x3c, 0x0a, 0x00, 0x1b, - 0x80, 0x6c, 0x00, 0x10, 0x3c, 0x0a, 0x00, 0x02, 0x0c, 0x00, 0x00, 0x10, - 0xff, 0x0c, 0x00, 0x13, 0x00, 0xd2, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x10, - 0x00, 0x12, 0x00, 0x1b, 0x10, 0x84, 0x00, 0x10, 0x08, 0xfe, 0x00, 0x0b, - 0x60, 0x78, 0x00, 0x10, 0x3c, 0x09, 0x00, 0x03, 0x00, 0x80, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x08, 0x88, 0x00, 0x10, - 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0x3c, 0x0a, 0x00, 0x0b, 0x80, 0x7f, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x02, - 0x0c, 0x00, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x13, 0x00, 0xd2, 0x00, 0x11, - 0x3b, 0xe8, 0x00, 0x00, 0x00, 0x13, 0x00, 0x0b, 0x10, 0x8a, 0x00, 0x00, - 0x3c, 0xb0, 0x00, 0x14, 0x00, 0xe5, 0x00, 0x13, 0x00, 0xd2, 0x00, 0x11, - 0x3b, 0xe8, 0x00, 0x00, 0x00, 0x19, 0x00, 0x0b, 0x10, 0x9d, 0x00, 0x10, - 0x04, 0xfe, 0x00, 0x1b, 0x60, 0x91, 0x00, 0x10, 0x3c, 0x05, 0x00, 0x13, - 0x00, 0x99, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x04, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0x3c, 0x0a, 0x00, 0x0b, 0x80, 0x98, 0x00, 0x00, - 0x3c, 0x04, 0x00, 0x02, 0x0c, 0x00, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x13, - 0x00, 0xd2, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x10, 0x00, 0x1b, 0x00, 0x1b, - 0x10, 0xa6, 0x00, 0x10, 0xc0, 0x14, 0x00, 0x00, 0xc0, 0x13, 0x00, 0x00, - 0xc0, 0x10, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, - 0x00, 0xd2, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x00, 0x00, 0x15, 0x00, 0x1b, - 0x10, 0xb2, 0x00, 0x04, 0x01, 0x1c, 0x00, 0x14, 0x01, 0x2e, 0x00, 0x15, - 0x00, 0x39, 0x00, 0x00, 0x80, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x04, - 0x01, 0x13, 0x00, 0x04, 0x01, 0x25, 0x00, 0x14, 0x00, 0xfe, 0x00, 0x13, - 0x00, 0x2d, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x00, 0x00, 0x16, 0x00, 0x0b, - 0x10, 0xc4, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, - 0x10, 0xbe, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, - 0x10, 0xbe, 0x00, 0x15, 0x00, 0x39, 0x00, 0x10, 0x10, 0x10, 0x00, 0x13, - 0x00, 0xd2, 0x00, 0x15, 0x00, 0x39, 0x00, 0x00, 0x50, 0x40, 0x00, 0x15, - 0x00, 0xb8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x14, 0x09, 0x25, 0x00, 0x13, - 0x00, 0xd2, 0x00, 0x11, 0x3b, 0xe8, 0x00, 0x10, 0x00, 0x17, 0x00, 0x1b, - 0x10, 0xc9, 0x00, 0x10, 0x3c, 0xc3, 0x00, 0x13, 0x00, 0xd2, 0x00, 0x11, - 0x3b, 0xe8, 0x00, 0x10, 0x00, 0x18, 0x00, 0x0b, 0x10, 0xce, 0x00, 0x00, - 0x3c, 0xc2, 0x00, 0x13, 0x00, 0xd2, 0x00, 0x05, 0x00, 0xce, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x3b, 0xcf, 0x00, 0x14, 0x08, 0xe7, 0x00, 0x15, - 0x00, 0x39, 0x00, 0x00, 0x80, 0x00, 0x00, 0x13, 0x00, 0x2d, 0x00, 0x01, - 0xb2, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xc1, 0x80, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x80, 0xdb, 0x00, 0x02, 0xb2, 0x00, 0x00, 0x11, 0xff, 0xc8, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x10, 0xc1, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x0a, 0x00, 0x01, 0xb0, 0xd0, 0x00, 0x1b, - 0x80, 0xe4, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0xb0, 0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb1, 0x09, 0x00, 0x0b, 0x80, 0xec, 0x00, 0x01, - 0xb1, 0xe8, 0x00, 0x10, 0xff, 0xff, 0x00, 0x13, 0x10, 0xfd, 0x00, 0x00, - 0x11, 0xfe, 0x00, 0x1b, 0x60, 0xf4, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x13, - 0x00, 0xfc, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0x11, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x0b, 0x80, 0xfb, 0x00, 0x00, - 0xb0, 0x11, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0xbc, 0x88, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xc4, 0x11, 0x00, 0x0b, - 0x81, 0x05, 0x00, 0x11, 0xbc, 0x88, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc6, 0x09, 0x00, 0x1b, - 0x81, 0x0b, 0x00, 0x11, 0xbc, 0x88, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xc7, 0x09, 0x00, 0x0b, - 0x81, 0x11, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbb, 0x88, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x02, 0x69, 0x00, 0x1b, - 0x81, 0x1a, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbb, 0x88, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x02, 0x6a, 0x00, 0x1b, - 0x81, 0x23, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbb, 0x88, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0x0f, 0x59, 0x00, 0x1b, - 0x81, 0x2c, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbb, 0x88, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0x0f, 0x5a, 0x00, 0x0b, - 0x81, 0x35, 0x00, 0x17, 0x40, 0x00, 0x00, 0x00, 0xd0, 0xff, 0x00, 0x12, - 0xff, 0x40, 0x00, 0x0b, 0x10, 0x31, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x10, - 0x01, 0x01, 0x00, 0x03, 0x91, 0x3c, 0x00, 0x05, 0x00, 0x79, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x03, 0x91, 0x3f, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, - 0x11, 0x67, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, - 0x11, 0x7f, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x03, - 0x11, 0x9d, 0x00, 0x11, 0x02, 0xe8, 0x00, 0x10, 0x00, 0x03, 0x00, 0x03, - 0x11, 0xce, 0x00, 0x05, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x0e, 0x00, 0x00, 0xc0, 0x0d, 0x00, 0x10, 0xc0, 0x03, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xbd, 0x88, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xc0, 0x0a, 0x00, 0x0b, 0x81, 0x5a, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, 0x81, 0x5e, 0x00, 0x12, - 0x3a, 0x45, 0x00, 0x13, 0x11, 0x66, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x10, 0x10, 0x00, 0x04, - 0x09, 0x11, 0x00, 0x03, 0x00, 0x4f, 0x00, 0x12, 0x78, 0x49, 0x00, 0x03, - 0x11, 0xdc, 0x00, 0x10, 0x0d, 0xfe, 0x00, 0x03, 0x61, 0x50, 0x00, 0x12, - 0x0c, 0x10, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb3, 0x09, 0x00, 0x0b, - 0x81, 0x74, 0x00, 0x10, 0xb3, 0xfe, 0x00, 0x13, 0x61, 0x7c, 0x00, 0x10, - 0xb3, 0x0b, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, - 0x81, 0x7a, 0x00, 0x03, 0x01, 0xd1, 0x00, 0x00, 0xc0, 0x0b, 0x00, 0x10, - 0xc0, 0x0a, 0x00, 0x03, 0x01, 0xd1, 0x00, 0x00, 0x78, 0xb0, 0x00, 0x12, - 0xb0, 0x44, 0x00, 0x03, 0x11, 0xdc, 0x00, 0x02, 0xb0, 0x49, 0x00, 0x03, - 0x11, 0xdc, 0x00, 0x10, 0x71, 0xff, 0x00, 0x12, 0xff, 0x38, 0x00, 0x10, - 0xff, 0x71, 0x00, 0x10, 0x0d, 0xfe, 0x00, 0x03, 0x61, 0x4e, 0x00, 0x12, - 0x0c, 0x10, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb3, 0x09, 0x00, 0x1b, - 0x81, 0x92, 0x00, 0x10, 0xb3, 0xfe, 0x00, 0x03, 0x61, 0x9a, 0x00, 0x00, - 0xb3, 0x09, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, - 0x81, 0x98, 0x00, 0x03, 0x01, 0xd1, 0x00, 0x10, 0xc0, 0x09, 0x00, 0x00, - 0xc0, 0x08, 0x00, 0x03, 0x01, 0xd1, 0x00, 0x00, 0x78, 0xb0, 0x00, 0x12, - 0xb0, 0x44, 0x00, 0x03, 0x11, 0xdc, 0x00, 0x02, 0xb0, 0x49, 0x00, 0x03, - 0x11, 0xdc, 0x00, 0x10, 0x71, 0xff, 0x00, 0x12, 0xff, 0x38, 0x00, 0x10, - 0xff, 0x71, 0x00, 0x10, 0x0d, 0xfe, 0x00, 0x03, 0x61, 0x4e, 0x00, 0x12, - 0x0c, 0x10, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb3, 0x09, 0x00, 0x1b, - 0x81, 0xb0, 0x00, 0x10, 0xb3, 0xfe, 0x00, 0x03, 0x61, 0xb8, 0x00, 0x00, - 0xb3, 0x05, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, - 0x81, 0xb6, 0x00, 0x13, 0x01, 0xba, 0x00, 0x10, 0xc0, 0x05, 0x00, 0x00, - 0xc0, 0x04, 0x00, 0x02, 0x03, 0x3f, 0x00, 0x02, 0xff, 0x27, 0x00, 0x00, - 0x0d, 0xb8, 0x00, 0x14, 0x03, 0xc2, 0x00, 0x00, 0x0d, 0xb8, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0xbc, 0x88, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb3, 0x09, 0x00, 0x1b, 0x81, 0xc7, 0x00, 0x11, - 0xb3, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0b, 0x11, 0x4e, 0x00, 0x05, - 0x00, 0x02, 0x00, 0x10, 0x00, 0x05, 0x00, 0x03, 0x01, 0x50, 0x00, 0x12, - 0x78, 0x49, 0x00, 0x03, 0x11, 0xdc, 0x00, 0x03, 0x01, 0x50, 0x00, 0x00, - 0x0d, 0xb8, 0x00, 0x12, 0x03, 0x45, 0x00, 0x0b, 0x11, 0xd7, 0x00, 0x02, - 0x03, 0x3f, 0x00, 0x14, 0x03, 0xc2, 0x00, 0x03, 0x01, 0x4e, 0x00, 0x02, - 0x03, 0x3f, 0x00, 0x02, 0xff, 0x27, 0x00, 0x14, 0x03, 0xc2, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x03, 0x01, 0x4e, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x01, 0x01, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x03, 0x01, 0x5f, 0x00, 0x01, 0x2b, 0xd8, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xba, 0x00, 0x03, 0xb1, 0xe5, 0x00, 0x05, - 0x00, 0x2a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0xba, 0xc8, 0x00, 0x00, - 0x07, 0x00, 0x00, 0x0b, 0x12, 0xd2, 0x00, 0x11, 0x15, 0xe8, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x13, 0x12, 0x48, 0x00, 0x11, 0x15, 0xe8, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x03, 0x11, 0xf4, 0x00, 0x05, 0x00, 0x15, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x2b, 0x00, 0x05, 0x00, 0x15, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x02, 0xba, 0x43, 0x00, 0x03, 0x12, 0x2c, 0x00, 0x03, - 0xb1, 0xf8, 0x00, 0x05, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, - 0xba, 0x42, 0x00, 0x03, 0x12, 0x32, 0x00, 0x12, 0x10, 0x4b, 0x00, 0x0b, - 0x12, 0x2b, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x1b, 0x2a, 0x00, 0x1b, - 0x82, 0x04, 0x00, 0x11, 0x20, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xb0, 0x00, 0x01, 0x21, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0xff, 0xb1, 0x00, 0x01, 0x22, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0xff, 0xb2, 0x00, 0x11, 0x23, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xb3, 0x00, 0x01, 0x24, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0xff, 0xb4, 0x00, 0x11, 0x25, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xb5, 0x00, 0x01, 0x28, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0xff, 0xb8, 0x00, 0x11, 0x29, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xb9, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb0, 0x32, 0x00, 0x0b, - 0x82, 0x22, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, - 0x00, 0x0f, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb8, 0x12, 0x00, 0x0b, - 0x82, 0x28, 0x00, 0x05, 0x00, 0x15, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, - 0x00, 0x35, 0x00, 0x00, 0x1e, 0xfe, 0x00, 0x13, 0x62, 0x40, 0x00, 0x14, - 0x02, 0x77, 0x00, 0x00, 0x1e, 0xfe, 0x00, 0x0c, 0x62, 0x77, 0x00, 0x03, - 0x02, 0x2b, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x20, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x82, 0x37, 0x00, 0x02, 0xb0, 0x2f, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x20, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x0a, 0x00, 0x1b, 0x82, 0x3e, 0x00, 0x03, 0x01, 0xff, 0x00, 0x15, - 0x00, 0xb8, 0x00, 0x10, 0x00, 0x05, 0x00, 0x14, 0x09, 0x25, 0x00, 0x00, - 0x13, 0xb8, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x04, 0x04, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x03, 0x02, 0x2b, 0x00, 0x05, 0x00, 0x15, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x12, 0xba, 0x42, 0x00, 0x13, 0x12, 0x56, 0x00, 0x03, - 0xb2, 0x4c, 0x00, 0x01, 0x2b, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x12, - 0xff, 0x4f, 0x00, 0x0b, 0x11, 0xe2, 0x00, 0x02, 0xba, 0x43, 0x00, 0x1b, - 0x12, 0x32, 0x00, 0x00, 0x1e, 0xfe, 0x00, 0x0c, 0x62, 0x77, 0x00, 0x03, - 0x02, 0x2b, 0x00, 0x01, 0x28, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, - 0xff, 0xb8, 0x00, 0x11, 0x29, 0xd8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xb9, 0x00, 0x14, 0x02, 0xe8, 0x00, 0x02, 0x3a, 0x42, 0x00, 0x0b, - 0x12, 0x2b, 0x00, 0x00, 0x1c, 0x30, 0x00, 0x15, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x02, 0x1f, 0x43, 0x00, 0x1b, 0x12, 0x67, 0x00, 0x01, - 0xff, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x02, 0x69, 0x00, 0x01, - 0xff, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x11, 0x00, 0x0b, 0x82, 0x6c, 0x00, 0x00, - 0xb0, 0xff, 0x00, 0x11, 0x16, 0xa0, 0x00, 0x00, 0xff, 0x16, 0x00, 0x1b, - 0x22, 0x73, 0x00, 0x02, 0xb1, 0x00, 0x00, 0x03, 0x02, 0x74, 0x00, 0x10, - 0xb1, 0xff, 0x00, 0x01, 0x17, 0xa0, 0x00, 0x10, 0xff, 0x17, 0x00, 0x13, - 0x02, 0x32, 0x00, 0x00, 0x16, 0xff, 0x00, 0x01, 0x18, 0xa0, 0x00, 0x10, - 0xff, 0x00, 0x00, 0x0b, 0x22, 0x7e, 0x00, 0x02, 0x17, 0x00, 0x00, 0x13, - 0x12, 0xd1, 0x00, 0x13, 0x02, 0x7f, 0x00, 0x10, 0x17, 0xff, 0x00, 0x11, - 0x19, 0xa0, 0x00, 0x13, 0x22, 0xd1, 0x00, 0x11, 0x00, 0xd0, 0x00, 0x13, - 0x12, 0xd1, 0x00, 0x00, 0x1c, 0x30, 0x00, 0x00, 0x1b, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb1, 0x31, 0x00, 0x0b, 0x82, 0x87, 0x00, 0x13, - 0xb2, 0x88, 0x00, 0x00, 0xb1, 0x20, 0x00, 0x10, 0xb2, 0x21, 0x00, 0x02, - 0x1f, 0x43, 0x00, 0x1b, 0x12, 0x94, 0x00, 0x10, 0xc0, 0x22, 0x00, 0x00, - 0xc0, 0x23, 0x00, 0x00, 0xb3, 0x24, 0x00, 0x00, 0xb4, 0x25, 0x00, 0x10, - 0xb3, 0xb5, 0x00, 0x00, 0xb4, 0xb6, 0x00, 0x13, 0x02, 0x98, 0x00, 0x00, - 0xb3, 0x22, 0x00, 0x00, 0xb4, 0x23, 0x00, 0x00, 0xb5, 0x24, 0x00, 0x10, - 0xb6, 0x25, 0x00, 0x03, 0xb2, 0x98, 0x00, 0x05, 0x00, 0x2a, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x12, 0x15, 0x00, 0x00, 0x00, 0xff, 0x15, 0x00, 0x00, - 0x16, 0xff, 0x00, 0x01, 0xb5, 0x80, 0x00, 0x00, 0xff, 0x16, 0x00, 0x0b, - 0x22, 0xa3, 0x00, 0x02, 0x17, 0x00, 0x00, 0x13, 0x02, 0xa4, 0x00, 0x10, - 0x17, 0xff, 0x00, 0x01, 0xb6, 0x80, 0x00, 0x10, 0xff, 0x17, 0x00, 0x12, - 0x1e, 0x10, 0x00, 0x10, 0xff, 0x1e, 0x00, 0x03, 0x62, 0xd1, 0x00, 0x02, - 0x1d, 0x00, 0x00, 0x10, 0xff, 0x1d, 0x00, 0x10, 0xc0, 0x30, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, - 0x82, 0xaf, 0x00, 0x10, 0xb0, 0xfe, 0x00, 0x0b, 0x62, 0xd0, 0x00, 0x00, - 0x1c, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, 0x82, 0xb7, 0x00, 0x10, - 0xb0, 0xfe, 0x00, 0x1b, 0x62, 0xbd, 0x00, 0x05, 0x00, 0xce, 0x00, 0x10, - 0x00, 0x05, 0x00, 0x03, 0x08, 0xe7, 0x00, 0x10, 0xb0, 0x1c, 0x00, 0x00, - 0x1c, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x19, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, 0x82, 0xc3, 0x00, 0x01, - 0xb0, 0xc8, 0x00, 0x10, 0x00, 0xff, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x10, - 0xc0, 0x30, 0x00, 0x11, 0xbe, 0x80, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, 0x82, 0xcc, 0x00, 0x00, - 0xb0, 0x1d, 0x00, 0x10, 0x1d, 0xff, 0x00, 0x13, 0x02, 0xab, 0x00, 0x00, - 0xb0, 0x1b, 0x00, 0x17, 0x40, 0x00, 0x00, 0x02, 0x3a, 0x41, 0x00, 0x03, - 0x12, 0xda, 0x00, 0x13, 0xb2, 0xd4, 0x00, 0x05, 0x00, 0x2a, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x05, 0x00, 0x15, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x2b, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x1b, 0x2a, 0x00, 0x1b, - 0x82, 0xdf, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x00, 0x13, 0xb8, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, - 0x04, 0x04, 0x00, 0x14, 0x09, 0x25, 0x00, 0x13, 0x00, 0x39, 0x00, 0x02, - 0x1e, 0x00, 0x00, 0x10, 0xff, 0x1e, 0x00, 0x12, 0x1d, 0x10, 0x00, 0x10, - 0xff, 0x1d, 0x00, 0x10, 0xc0, 0x30, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, 0x82, 0xf0, 0x00, 0x10, - 0xb0, 0xfe, 0x00, 0x1b, 0x63, 0x15, 0x00, 0x00, 0x1c, 0xff, 0x00, 0x01, - 0x1a, 0xe0, 0x00, 0x13, 0x12, 0xff, 0x00, 0x00, 0x1c, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x00, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x1b, 0x82, 0xfb, 0x00, 0x10, 0xb0, 0xfe, 0x00, 0x1b, - 0x62, 0xff, 0x00, 0x00, 0x1a, 0xff, 0x00, 0x00, 0xff, 0x1c, 0x00, 0x00, - 0x1c, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x19, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, 0x83, 0x05, 0x00, 0x01, - 0xb0, 0xc8, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00, 0x01, - 0xbf, 0x80, 0x00, 0x10, 0xff, 0x1d, 0x00, 0x10, 0xc0, 0x30, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x83, 0x0f, 0x00, 0x10, 0xb0, 0xfe, 0x00, 0x1b, 0x63, 0x15, 0x00, 0x05, - 0x00, 0xce, 0x00, 0x10, 0x00, 0x06, 0x00, 0x03, 0x08, 0xe7, 0x00, 0x00, - 0xb0, 0x1b, 0x00, 0x17, 0x40, 0x00, 0x00, 0x10, 0x79, 0xb0, 0x00, 0x00, - 0xd0, 0xff, 0x00, 0x12, 0xff, 0x40, 0x00, 0x1b, 0x10, 0x39, 0x00, 0x15, - 0x00, 0xd1, 0x00, 0x10, 0x01, 0x01, 0x00, 0x13, 0x93, 0x1d, 0x00, 0x05, - 0x00, 0x79, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x93, 0x20, 0x00, 0x15, - 0x00, 0xd1, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x13, 0xfe, 0x00, 0x13, - 0x63, 0x71, 0x00, 0x12, 0xb0, 0x4e, 0x00, 0x1b, 0x13, 0x9a, 0x00, 0x00, - 0x78, 0xb0, 0x00, 0x02, 0xb0, 0x45, 0x00, 0x03, 0x13, 0xa0, 0x00, 0x12, - 0x78, 0x4a, 0x00, 0x03, 0x13, 0xa0, 0x00, 0x00, 0x75, 0xff, 0x00, 0x11, - 0xff, 0xc8, 0x00, 0x10, 0x18, 0x00, 0x00, 0x1b, 0x13, 0xa0, 0x00, 0x01, - 0x0f, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1b, 0x13, 0x3c, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x00, - 0x00, 0x0e, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0x8f, 0x0a, 0x00, 0x1b, 0x83, 0x3a, 0x00, 0x13, 0x03, 0xa6, 0x00, 0x01, - 0x0f, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1b, 0x13, 0x47, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x1a, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x0b, - 0x83, 0x45, 0x00, 0x13, 0x03, 0xa6, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x03, 0x13, 0x4e, 0x00, 0x05, 0x00, 0xce, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x10, 0x0f, 0xcf, 0x00, 0x03, 0x08, 0xe1, 0x00, 0x02, - 0xd1, 0x42, 0x00, 0x13, 0x13, 0x67, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x13, 0xe8, 0x00, 0x01, 0x1b, 0x55, 0x00, 0x0b, - 0x13, 0x67, 0x00, 0x05, 0x00, 0x31, 0x00, 0x11, 0x1b, 0x6d, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb4, 0x09, 0x00, 0x1b, 0x83, 0x59, 0x00, 0x02, - 0xb4, 0x00, 0x00, 0x10, 0xff, 0xb4, 0x00, 0x05, 0x00, 0x31, 0x00, 0x11, - 0x1b, 0x6d, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb4, 0x0a, 0x00, 0x1b, - 0x83, 0x60, 0x00, 0x12, 0xd0, 0x42, 0x00, 0x03, 0x13, 0x71, 0x00, 0x15, - 0x00, 0xb8, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x14, 0x09, 0x25, 0x00, 0x03, - 0x00, 0x54, 0x00, 0x00, 0x13, 0xb8, 0x00, 0x02, 0x10, 0x45, 0x00, 0x03, - 0x13, 0x6f, 0x00, 0x12, 0x10, 0x3f, 0x00, 0x02, 0xff, 0x27, 0x00, 0x14, - 0x03, 0xc2, 0x00, 0x14, 0x09, 0x25, 0x00, 0x13, 0x03, 0x71, 0x00, 0x12, - 0x10, 0x3f, 0x00, 0x14, 0x03, 0xc2, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x02, 0x39, 0x44, 0x00, 0x13, 0x13, 0x7a, 0x00, 0x15, - 0x00, 0x39, 0x00, 0x00, 0x50, 0x40, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x14, 0x09, 0x25, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbd, 0x88, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, - 0x83, 0x81, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xc0, 0x0a, 0x00, 0x0b, 0x83, 0x85, 0x00, 0x10, 0xc0, 0x14, 0x00, 0x00, - 0xc0, 0x13, 0x00, 0x00, 0xc0, 0x10, 0x00, 0x00, 0xa4, 0xff, 0x00, 0x03, - 0x63, 0x92, 0x00, 0x11, 0xff, 0xa8, 0x00, 0x10, 0x00, 0x05, 0x00, 0x0b, - 0x23, 0x92, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x10, 0x04, 0x04, 0x00, 0x15, - 0x00, 0x3a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x3a, 0x47, 0x00, 0x03, - 0x13, 0x99, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x15, - 0x00, 0x3a, 0x00, 0x10, 0x40, 0x40, 0x00, 0x04, 0x08, 0xec, 0x00, 0x13, - 0x00, 0x39, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x10, 0x00, 0x03, 0x00, 0x15, - 0x00, 0x3a, 0x00, 0x10, 0x02, 0x02, 0x00, 0x14, 0x09, 0x25, 0x00, 0x03, - 0x03, 0x89, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x15, - 0x00, 0x3a, 0x00, 0x10, 0x02, 0x02, 0x00, 0x14, 0x09, 0x25, 0x00, 0x03, - 0x03, 0x89, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, 0x83, 0xad, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x0b, 0x83, 0xb3, 0x00, 0x10, - 0xb0, 0xfe, 0x00, 0x13, 0x63, 0xb8, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x03, - 0x03, 0xba, 0x00, 0x10, 0xc0, 0x12, 0x00, 0x10, 0xc0, 0x11, 0x00, 0x12, - 0x10, 0x4b, 0x00, 0x03, 0x13, 0x4e, 0x00, 0x02, 0x10, 0x3b, 0x00, 0x10, - 0xff, 0x03, 0x00, 0x05, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x0d, 0x00, 0x13, 0x03, 0x4e, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x10, - 0xc3, 0xb1, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0xb8, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x0b, 0x83, 0xcb, 0x00, 0x17, - 0x40, 0x00, 0x00, 0x02, 0xd1, 0x42, 0x00, 0x1b, 0x14, 0x85, 0x00, 0x12, - 0x3a, 0x43, 0x00, 0x03, 0x13, 0xde, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x10, 0x0d, 0xb0, 0x00, 0x13, 0x63, 0xde, 0x00, 0x00, - 0x0b, 0xff, 0x00, 0x01, 0xb0, 0xe0, 0x00, 0x03, 0x14, 0x07, 0x00, 0x10, - 0x09, 0xff, 0x00, 0x01, 0xb0, 0xe0, 0x00, 0x03, 0x13, 0xeb, 0x00, 0x10, - 0x05, 0xff, 0x00, 0x01, 0xb0, 0xe0, 0x00, 0x03, 0x13, 0xe2, 0x00, 0x00, - 0xc0, 0x0e, 0x00, 0x00, 0x05, 0xfe, 0x00, 0x13, 0x63, 0xe8, 0x00, 0x00, - 0x05, 0x0d, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x14, - 0x04, 0x6c, 0x00, 0x02, 0x3a, 0x47, 0x00, 0x1b, 0x14, 0x6b, 0x00, 0x13, - 0x04, 0x02, 0x00, 0x00, 0x09, 0xfe, 0x00, 0x13, 0x64, 0x04, 0x00, 0x00, - 0x09, 0x0d, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, - 0x04, 0x9a, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xba, 0x09, 0x00, 0x1b, 0x83, 0xf5, 0x00, 0x11, - 0x03, 0xc8, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x00, 0xff, 0xb6, 0x00, 0x11, - 0xb6, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x15, 0x3f, 0x00, 0x11, - 0xb6, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x13, 0x15, 0x61, 0x00, 0x11, - 0xb6, 0xe8, 0x00, 0x10, 0x00, 0x03, 0x00, 0x03, 0x16, 0x53, 0x00, 0x04, - 0x08, 0xec, 0x00, 0x13, 0x04, 0x6b, 0x00, 0x10, 0x0b, 0xfe, 0x00, 0x13, - 0x64, 0x6b, 0x00, 0x10, 0x0b, 0x0d, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x14, 0x04, 0x9a, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xba, 0x09, 0x00, 0x0b, - 0x84, 0x11, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, - 0x00, 0x21, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, - 0x84, 0x17, 0x00, 0x01, 0xb0, 0xa8, 0x00, 0x00, 0x19, 0x9a, 0x00, 0x13, - 0x24, 0x1d, 0x00, 0x05, 0x00, 0xb0, 0x00, 0x00, 0x19, 0x99, 0x00, 0x12, - 0xb0, 0x50, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x02, 0xff, 0x50, 0x00, 0x02, - 0xff, 0x50, 0x00, 0x01, 0xb0, 0x80, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, - 0x00, 0x06, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x0a, 0x00, 0x1b, 0x84, 0x2a, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x19, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x84, 0x30, 0x00, 0x01, 0xb0, 0xc8, 0x00, 0x10, - 0x00, 0xff, 0x00, 0x01, 0xff, 0xe8, 0x00, 0x10, 0x00, 0x48, 0x00, 0x0b, - 0x14, 0xa9, 0x00, 0x05, 0x00, 0x02, 0x00, 0x10, 0x00, 0x06, 0x00, 0x12, - 0x0c, 0x10, 0x00, 0x10, 0xff, 0x0c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb1, 0x09, 0x00, 0x0b, - 0x84, 0x41, 0x00, 0x00, 0xb1, 0x0b, 0x00, 0x0b, 0x64, 0x45, 0x00, 0x10, - 0xb1, 0x0a, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x0b, - 0x84, 0x47, 0x00, 0x02, 0x03, 0x2b, 0x00, 0x10, 0xff, 0x03, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0x03, 0x0a, 0x00, 0x1b, 0x84, 0x4f, 0x00, 0x00, - 0x11, 0xfe, 0x00, 0x0b, 0x64, 0x54, 0x00, 0x00, 0x0d, 0x12, 0x00, 0x13, - 0x04, 0x5d, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0x11, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x10, - 0x0d, 0xb0, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x0b, - 0x84, 0x5c, 0x00, 0x00, 0x0d, 0x11, 0x00, 0x13, 0x04, 0x6b, 0x00, 0x02, - 0xd1, 0x42, 0x00, 0x03, 0x14, 0x62, 0x00, 0x13, 0x04, 0x85, 0x00, 0x00, - 0x05, 0xfe, 0x00, 0x13, 0x64, 0x6b, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x00, 0x05, 0x0d, 0x00, 0x14, 0x04, 0x6c, 0x00, 0x02, - 0x3a, 0x47, 0x00, 0x1b, 0x14, 0x6b, 0x00, 0x04, 0x08, 0xec, 0x00, 0x13, - 0x00, 0x47, 0x00, 0x01, 0xc7, 0xc8, 0x00, 0x10, 0x00, 0x28, 0x00, 0x0b, - 0x14, 0x84, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, 0x84, 0x76, 0x00, 0x02, - 0xb0, 0x4f, 0x00, 0x13, 0x14, 0x84, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x13, 0x14, 0x82, 0x00, 0x01, 0x0f, 0xe8, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x13, 0x14, 0x82, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, - 0x80, 0x80, 0x00, 0x03, 0x04, 0x84, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, - 0x40, 0x40, 0x00, 0x17, 0x40, 0x00, 0x00, 0x00, 0x12, 0xfe, 0x00, 0x1b, - 0x60, 0x4f, 0x00, 0x15, 0x00, 0x12, 0x00, 0x01, 0x1b, 0x55, 0x00, 0x15, - 0x00, 0x11, 0x00, 0x01, 0x1b, 0x55, 0x00, 0x01, 0x12, 0x88, 0x00, 0x10, - 0x00, 0x03, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xc0, 0x0a, 0x00, 0x0b, 0x84, 0x90, 0x00, 0x05, 0x00, 0xb0, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x01, 0x12, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x1b, - 0x84, 0x98, 0x00, 0x03, 0x00, 0x4f, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0x03, 0x09, 0x00, 0x1b, - 0x84, 0xa1, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb9, 0x09, 0x00, 0x1b, - 0x84, 0xa7, 0x00, 0x17, 0x40, 0x00, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x10, - 0x06, 0x00, 0x00, 0x14, 0x06, 0x83, 0x00, 0x04, 0x05, 0x1b, 0x00, 0x00, - 0xb0, 0x5a, 0x00, 0x00, 0xb1, 0x5b, 0x00, 0x05, 0x00, 0x54, 0x00, 0x10, - 0x08, 0x29, 0x00, 0x10, 0x0d, 0x58, 0x00, 0x15, 0x00, 0x59, 0x00, 0x10, - 0xff, 0xff, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, - 0x00, 0x1e, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x84, 0xb9, 0x00, 0x00, 0xb0, 0x5c, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x1f, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x84, 0xbf, 0x00, 0x01, 0xb0, 0xc8, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x0b, - 0x14, 0xc6, 0x00, 0x15, 0x00, 0xff, 0x00, 0x10, 0x00, 0x05, 0x00, 0x13, - 0x04, 0xce, 0x00, 0x02, 0xb0, 0x40, 0x00, 0x03, 0x14, 0xcb, 0x00, 0x15, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0x13, 0x04, 0xce, 0x00, 0x01, - 0xb0, 0xc8, 0x00, 0x10, 0x00, 0x06, 0x00, 0x02, 0xff, 0x60, 0x00, 0x10, - 0xff, 0xb2, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb1, 0x09, 0x00, 0x1b, 0x84, 0xd6, 0x00, 0x12, - 0xb1, 0x70, 0x00, 0x11, 0xff, 0xc8, 0x00, 0x10, 0xff, 0x00, 0x00, 0x11, - 0xb2, 0xd0, 0x00, 0x10, 0xff, 0x60, 0x00, 0x02, 0xb0, 0x45, 0x00, 0x13, - 0x14, 0xe1, 0x00, 0x15, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, - 0x04, 0xeb, 0x00, 0x02, 0xb0, 0x46, 0x00, 0x03, 0x14, 0xe6, 0x00, 0x15, - 0x00, 0xb2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x04, 0xeb, 0x00, 0x15, - 0x00, 0xb2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xb0, 0x00, 0x10, - 0xc0, 0xb1, 0x00, 0x13, 0x04, 0xf1, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x11, 0x00, 0x0b, 0x84, 0xf0, 0x00, 0x10, 0xb1, 0x6a, 0x00, 0x10, - 0xb0, 0x6b, 0x00, 0x00, 0xb2, 0x61, 0x00, 0x15, 0x00, 0x44, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x23, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x62, 0x41, 0x00, 0x1b, - 0x84, 0xfb, 0x00, 0x03, 0x94, 0xfc, 0x00, 0x15, 0x00, 0xa0, 0x00, 0x00, - 0x00, 0x20, 0x00, 0x12, 0xd0, 0x41, 0x00, 0x0b, 0x14, 0xff, 0x00, 0x15, - 0x00, 0xd1, 0x00, 0x10, 0x02, 0x02, 0x00, 0x13, 0x95, 0x03, 0x00, 0x00, - 0x75, 0xff, 0x00, 0x11, 0xff, 0xc8, 0x00, 0x00, 0x18, 0x04, 0x00, 0x01, - 0xff, 0xd8, 0x00, 0x10, 0x00, 0x09, 0x00, 0x13, 0x95, 0x09, 0x00, 0x00, - 0xff, 0x75, 0x00, 0x03, 0x95, 0x0b, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0xbd, 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0xb1, 0x00, 0x10, 0x07, 0xd0, 0x00, 0x05, 0x00, 0xb0, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x0b, - 0x85, 0x19, 0x00, 0x13, 0x04, 0x6b, 0x00, 0x00, 0xba, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x35, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x85, 0x20, 0x00, 0x02, 0xb0, 0x40, 0x00, 0x03, - 0x15, 0x3c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x01, 0x1b, 0x71, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x11, 0x00, 0x0b, 0x85, 0x29, 0x00, 0x02, 0xb1, 0x00, 0x00, 0x10, - 0xff, 0xb1, 0x00, 0x1b, 0x25, 0x30, 0x00, 0x12, 0xb0, 0x00, 0x00, 0x00, - 0xff, 0xb0, 0x00, 0x13, 0x25, 0x2a, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x12, 0x00, 0x0b, 0x85, 0x32, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x1b, - 0x85, 0x3a, 0x00, 0x03, 0x05, 0x3e, 0x00, 0x10, 0xc0, 0xb1, 0x00, 0x00, - 0xc0, 0xb0, 0x00, 0x17, 0x40, 0x00, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x10, - 0x05, 0x00, 0x00, 0x14, 0x06, 0x83, 0x00, 0x05, 0x00, 0x54, 0x00, 0x10, - 0x08, 0x89, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, 0x85, 0x4b, 0x00, 0x10, - 0xb0, 0x58, 0x00, 0x00, 0x0d, 0x59, 0x00, 0x00, 0xb9, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x23, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x11, 0x00, 0x1b, 0x85, 0x53, 0x00, 0x10, 0xb1, 0x5c, 0x00, 0x10, - 0xb0, 0x5d, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x11, 0x00, 0x1b, 0x85, 0x5a, 0x00, 0x00, - 0xb1, 0x5e, 0x00, 0x00, 0xb0, 0x5f, 0x00, 0x03, 0x95, 0x5d, 0x00, 0x15, - 0x00, 0xa0, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x03, 0x06, 0x68, 0x00, 0x05, - 0x00, 0xb6, 0x00, 0x00, 0x07, 0x00, 0x00, 0x14, 0x06, 0x83, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb7, 0x09, 0x00, 0x0b, 0x85, 0x6b, 0x00, 0x12, 0xb7, 0x49, 0x00, 0x03, - 0x15, 0x71, 0x00, 0x05, 0x00, 0x54, 0x00, 0x10, 0x08, 0x89, 0x00, 0x03, - 0x05, 0x73, 0x00, 0x05, 0x00, 0x54, 0x00, 0x10, 0x08, 0x98, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x85, 0x7a, 0x00, 0x10, 0xb0, 0x58, 0x00, 0x00, - 0x0d, 0x59, 0x00, 0x01, 0xb9, 0xc8, 0x00, 0x10, 0xf0, 0x00, 0x00, 0x01, - 0xff, 0xe8, 0x00, 0x10, 0xf0, 0x00, 0x00, 0x1b, 0x15, 0xa3, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, - 0x00, 0x05, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x85, 0x89, 0x00, 0x01, 0xb0, 0xc8, 0x00, 0x00, - 0xf7, 0x00, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x00, - 0xf1, 0x00, 0x00, 0x13, 0x15, 0xea, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x00, - 0xf2, 0x00, 0x00, 0x13, 0x15, 0xef, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x10, - 0xf3, 0x00, 0x00, 0x03, 0x16, 0x14, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x00, - 0xf4, 0x00, 0x00, 0x13, 0x16, 0x19, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x10, - 0xf5, 0x00, 0x00, 0x13, 0x15, 0xea, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x10, - 0xf6, 0x00, 0x00, 0x03, 0x16, 0x2b, 0x00, 0x05, 0x00, 0xce, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x00, 0xb0, 0xcf, 0x00, 0x03, 0x08, 0xe1, 0x00, 0x00, - 0xb9, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x25, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x39, 0x00, 0x0b, 0x85, 0xa8, 0x00, 0x12, - 0xb7, 0x49, 0x00, 0x13, 0x15, 0xad, 0x00, 0x02, 0xb5, 0x2c, 0x00, 0x00, - 0xff, 0xb5, 0x00, 0x00, 0xb1, 0x62, 0x00, 0x00, 0xb0, 0x63, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb3, 0x09, 0x00, 0x0b, 0x85, 0xb3, 0x00, 0x01, 0xb3, 0xc8, 0x00, 0x10, - 0x00, 0x03, 0x00, 0x03, 0x15, 0xbb, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x01, - 0xff, 0xe8, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1b, 0x15, 0xbd, 0x00, 0x00, - 0xc2, 0xb7, 0x00, 0x13, 0x06, 0x47, 0x00, 0x01, 0xb2, 0xe8, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x13, 0x15, 0xc4, 0x00, 0x05, 0x00, 0xce, 0x00, 0x10, - 0x00, 0x0a, 0x00, 0x10, 0xb2, 0xcf, 0x00, 0x03, 0x08, 0xe1, 0x00, 0x10, - 0xb4, 0x65, 0x00, 0x10, 0xb6, 0x67, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x01, 0xb5, 0xc8, 0x00, 0x10, 0x03, 0x00, 0x00, 0x13, - 0x15, 0xe9, 0x00, 0x12, 0xb5, 0x48, 0x00, 0x13, 0x15, 0xd0, 0x00, 0x00, - 0xb6, 0xff, 0x00, 0x11, 0xb7, 0x80, 0x00, 0x10, 0xff, 0xb7, 0x00, 0x02, - 0xb5, 0x49, 0x00, 0x13, 0x15, 0xd5, 0x00, 0x10, 0xb4, 0xff, 0x00, 0x11, - 0xb7, 0x80, 0x00, 0x10, 0xff, 0xb7, 0x00, 0x15, 0x00, 0x44, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0x68, 0x41, 0x00, 0x1b, 0x85, 0xdb, 0x00, 0x15, - 0x00, 0x44, 0x00, 0x00, 0x00, 0x19, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x34, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x50, 0x29, 0x00, 0x1b, - 0x85, 0xe2, 0x00, 0x15, 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x11, - 0xb7, 0xc8, 0x00, 0x10, 0x00, 0x03, 0x00, 0x13, 0x15, 0xe9, 0x00, 0x10, - 0xff, 0x55, 0x00, 0x13, 0x06, 0x47, 0x00, 0x05, 0x00, 0xb5, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x10, 0x00, 0x18, 0x00, 0x13, - 0x06, 0x47, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x11, 0x00, 0x1b, 0x85, 0xf6, 0x00, 0x10, - 0xb1, 0xff, 0x00, 0x01, 0xb0, 0xd0, 0x00, 0x03, 0x15, 0xff, 0x00, 0x05, - 0x00, 0xb5, 0x00, 0x10, 0x0b, 0x02, 0x00, 0x10, 0xb0, 0x62, 0x00, 0x10, - 0xb1, 0x63, 0x00, 0x03, 0x06, 0x01, 0x00, 0x05, 0x00, 0xb5, 0x00, 0x00, - 0x03, 0x02, 0x00, 0x15, 0x00, 0x65, 0x00, 0x10, 0x00, 0x12, 0x00, 0x05, - 0x00, 0x67, 0x00, 0x00, 0x00, 0x08, 0x00, 0x15, 0x00, 0x6c, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x05, 0x00, 0x6d, 0x00, 0x10, 0x05, 0x00, 0x00, 0x15, - 0x00, 0x6f, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x15, 0x00, 0x44, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x05, 0x00, 0x52, 0x00, 0x00, 0x25, 0x00, 0x00, 0x15, - 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x00, - 0x00, 0x32, 0x00, 0x13, 0x06, 0x47, 0x00, 0x05, 0x00, 0xb5, 0x00, 0x10, - 0x00, 0x28, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x10, 0x00, 0x18, 0x00, 0x13, - 0x06, 0x47, 0x00, 0x05, 0x00, 0xb5, 0x00, 0x00, 0x01, 0x00, 0x00, 0x05, - 0x00, 0x67, 0x00, 0x00, 0x00, 0x08, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x86, 0x24, 0x00, 0x01, 0xb0, 0xc8, 0x00, 0x10, 0x00, 0xff, 0x00, 0x10, - 0xff, 0x69, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x20, 0x00, 0x13, - 0x06, 0x47, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x10, 0x00, 0x05, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb6, 0x09, 0x00, 0x0b, 0x86, 0x32, 0x00, 0x01, - 0xb6, 0xc8, 0x00, 0x10, 0xff, 0x00, 0x00, 0x00, 0xff, 0xb0, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x0b, 0x86, 0x38, 0x00, 0x01, - 0xb6, 0xc8, 0x00, 0x10, 0x00, 0xff, 0x00, 0x12, 0xff, 0x10, 0x00, 0x1b, - 0x16, 0x41, 0x00, 0x00, 0xff, 0xb5, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x13, 0x06, 0x47, 0x00, 0x10, 0xff, 0x63, 0x00, 0x05, - 0x00, 0xb5, 0x00, 0x00, 0x08, 0x00, 0x00, 0x15, 0x00, 0xb7, 0x00, 0x10, - 0x00, 0x18, 0x00, 0x13, 0x06, 0x47, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x86, 0x4e, 0x00, 0x10, 0xb5, 0x61, 0x00, 0x13, 0x96, 0x50, 0x00, 0x10, - 0xb7, 0xa0, 0x00, 0x03, 0x06, 0x68, 0x00, 0x05, 0x00, 0xb6, 0x00, 0x10, - 0x03, 0x00, 0x00, 0x14, 0x06, 0x83, 0x00, 0x05, 0x00, 0x54, 0x00, 0x10, - 0x08, 0x19, 0x00, 0x10, 0x0d, 0x58, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x86, 0x60, 0x00, 0x00, 0xb0, 0x59, 0x00, 0x03, 0x96, 0x62, 0x00, 0x10, - 0xc0, 0xa0, 0x00, 0x10, 0x71, 0xff, 0x00, 0x02, 0xff, 0x28, 0x00, 0x10, - 0xff, 0x71, 0x00, 0x03, 0x06, 0x68, 0x00, 0x12, 0xd0, 0x41, 0x00, 0x0b, - 0x16, 0x68, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x10, 0x02, 0x02, 0x00, 0x00, - 0x75, 0xff, 0x00, 0x11, 0xff, 0xc8, 0x00, 0x00, 0x18, 0x04, 0x00, 0x01, - 0xff, 0xd8, 0x00, 0x10, 0x00, 0x09, 0x00, 0x13, 0x96, 0x71, 0x00, 0x00, - 0xff, 0x75, 0x00, 0x03, 0x96, 0x73, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0xbd, 0x88, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xff, 0x31, 0x00, 0x05, - 0x00, 0xb0, 0x00, 0x10, 0x00, 0x09, 0x00, 0x15, 0x00, 0xb1, 0x00, 0x10, - 0x07, 0xd0, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x1b, - 0x86, 0x81, 0x00, 0x13, 0x04, 0x6b, 0x00, 0x15, 0x00, 0x44, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x05, 0x00, 0x98, 0x00, 0x10, 0x00, 0x56, 0x00, 0x15, - 0x00, 0x99, 0x00, 0x00, 0x95, 0x75, 0x00, 0x04, 0x08, 0xa8, 0x00, 0x00, - 0xb0, 0x96, 0x00, 0x12, 0xb2, 0x70, 0x00, 0x10, 0xff, 0x56, 0x00, 0x14, - 0x08, 0xca, 0x00, 0x10, 0xb0, 0x52, 0x00, 0x10, 0xb1, 0x53, 0x00, 0x00, - 0xb6, 0xff, 0x00, 0x11, 0xb2, 0xd0, 0x00, 0x10, 0xff, 0x50, 0x00, 0x10, - 0xb3, 0x51, 0x00, 0x17, 0x40, 0x00, 0x00, 0x01, 0x12, 0xe8, 0x00, 0x01, - 0x1b, 0x55, 0x00, 0x03, 0x18, 0x45, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, - 0x12, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0x10, 0x09, 0x00, 0x0b, 0x86, 0xa1, 0x00, 0x15, - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0xc0, 0x14, 0x00, 0x00, - 0x12, 0x13, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xba, 0x09, 0x00, 0x0b, 0x86, 0xad, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x10, - 0x00, 0x05, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0x1a, 0x09, 0x00, 0x0b, 0x86, 0xb5, 0x00, 0x12, 0x10, 0x4b, 0x00, 0x1b, - 0x16, 0xbe, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x0b, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x16, 0x21, 0x00, 0x1b, - 0x86, 0xbd, 0x00, 0x10, 0x15, 0xfe, 0x00, 0x0b, 0x66, 0xdd, 0x00, 0x04, - 0x07, 0x04, 0x00, 0x02, 0x3a, 0x42, 0x00, 0x0b, 0x17, 0x03, 0x00, 0x01, - 0x10, 0xc8, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x0b, 0x17, 0x66, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x86, 0xcd, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x03, 0x16, 0xd4, 0x00, 0x11, 0xb0, 0xe8, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x1b, 0x17, 0x02, 0x00, 0x11, 0x13, 0x88, 0x00, 0x10, - 0x00, 0x0a, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x86, 0xd9, 0x00, 0x02, 0xb0, 0x4f, 0x00, 0x1b, - 0x16, 0xf9, 0x00, 0x13, 0x07, 0x02, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x86, 0xe4, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x1b, - 0x86, 0xe7, 0x00, 0x10, 0xb0, 0xfe, 0x00, 0x03, 0x66, 0xec, 0x00, 0x00, - 0xb0, 0x12, 0x00, 0x13, 0x06, 0xee, 0x00, 0x10, 0xc0, 0x12, 0x00, 0x10, - 0xc0, 0x11, 0x00, 0x15, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, - 0x39, 0x44, 0x00, 0x13, 0x16, 0xf7, 0x00, 0x15, 0x00, 0x39, 0x00, 0x00, - 0x50, 0x40, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x00, 0xc0, 0x13, 0x00, 0x03, 0x07, 0x03, 0x00, 0x10, - 0x02, 0xfe, 0x00, 0x03, 0x66, 0xfe, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, - 0x20, 0x20, 0x00, 0x03, 0x07, 0x03, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x10, 0x10, 0x00, 0x04, - 0x09, 0x11, 0x00, 0x03, 0x00, 0x54, 0x00, 0x03, 0xb7, 0x04, 0x00, 0x05, - 0x00, 0x2a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xba, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x1b, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x09, 0x00, 0x0b, 0x87, 0x0c, 0x00, 0x00, 0xc0, 0x2c, 0x00, 0x00, - 0xb0, 0x2d, 0x00, 0x12, 0x10, 0x4b, 0x00, 0x13, 0x17, 0x27, 0x00, 0x00, - 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x23, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb1, 0x29, 0x00, 0x1b, 0x87, 0x16, 0x00, 0x00, - 0xb1, 0x20, 0x00, 0x10, 0xb2, 0x21, 0x00, 0x00, 0xb3, 0x22, 0x00, 0x00, - 0xb4, 0x23, 0x00, 0x00, 0xb5, 0x24, 0x00, 0x00, 0xc0, 0x25, 0x00, 0x10, - 0xb5, 0x26, 0x00, 0x10, 0xc0, 0x27, 0x00, 0x10, 0xb5, 0x16, 0x00, 0x10, - 0xc0, 0x17, 0x00, 0x00, 0xb5, 0x18, 0x00, 0x00, 0xc0, 0x19, 0x00, 0x10, - 0xc0, 0x28, 0x00, 0x00, 0xc0, 0x29, 0x00, 0x10, 0xc0, 0x1e, 0x00, 0x13, - 0x07, 0x5d, 0x00, 0x12, 0x10, 0x44, 0x00, 0x03, 0x17, 0x57, 0x00, 0x02, - 0x10, 0x34, 0x00, 0x00, 0xff, 0x10, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x02, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0x1b, 0x29, 0x00, 0x0b, 0x87, 0x30, 0x00, 0x00, 0x1c, 0x30, 0x00, 0x00, - 0x1b, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb1, 0x31, 0x00, 0x0b, - 0x87, 0x35, 0x00, 0x02, 0x1f, 0x43, 0x00, 0x0b, 0x17, 0x3c, 0x00, 0x10, - 0xb3, 0xb5, 0x00, 0x00, 0xb4, 0xb6, 0x00, 0x00, 0xc0, 0xb3, 0x00, 0x10, - 0xc0, 0xb4, 0x00, 0x00, 0xb1, 0x20, 0x00, 0x10, 0xb2, 0x21, 0x00, 0x00, - 0xb3, 0x22, 0x00, 0x00, 0xb4, 0x23, 0x00, 0x00, 0xb5, 0x24, 0x00, 0x10, - 0xb6, 0x25, 0x00, 0x10, 0xb5, 0x16, 0x00, 0x00, 0xb6, 0x17, 0x00, 0x00, - 0x18, 0x26, 0x00, 0x00, 0x19, 0x27, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb0, 0x11, 0x00, 0x0b, 0x87, 0x4b, 0x00, 0x00, 0xb0, 0x28, 0x00, 0x00, - 0xb1, 0x29, 0x00, 0x12, 0x1e, 0x10, 0x00, 0x10, 0xff, 0x1e, 0x00, 0x13, - 0x67, 0x5d, 0x00, 0x02, 0x1d, 0x00, 0x00, 0x10, 0xff, 0x1d, 0x00, 0x04, - 0x02, 0xab, 0x00, 0x02, 0x3a, 0x42, 0x00, 0x03, 0x17, 0x5d, 0x00, 0x03, - 0x07, 0x65, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0x1b, 0x79, 0x00, 0x0b, - 0x87, 0x5c, 0x00, 0x03, 0xb7, 0x5d, 0x00, 0x05, 0x00, 0x2a, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x05, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x1e, 0xfe, 0x00, 0x03, 0x67, 0x65, 0x00, 0x03, 0x02, 0x77, 0x00, 0x17, - 0x40, 0x00, 0x00, 0x00, 0xba, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, - 0x00, 0x1b, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb0, 0x51, 0x00, 0x1b, - 0x87, 0x6b, 0x00, 0x00, 0xb0, 0xa3, 0x00, 0x10, 0xb6, 0x97, 0x00, 0x10, - 0xb9, 0x46, 0x00, 0x15, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x10, 0x00, 0x15, - 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, - 0xb5, 0x09, 0x00, 0x0b, 0x87, 0x78, 0x00, 0x14, 0x08, 0xca, 0x00, 0x04, - 0x08, 0xb9, 0x00, 0x12, 0xb4, 0x70, 0x00, 0x10, 0xff, 0xb4, 0x00, 0x10, - 0xb4, 0x8e, 0x00, 0x10, 0xb0, 0x8a, 0x00, 0x10, 0xb1, 0x8b, 0x00, 0x12, - 0x10, 0x4d, 0x00, 0x03, 0x17, 0x83, 0x00, 0x13, 0x07, 0xb0, 0x00, 0x12, - 0x10, 0x4b, 0x00, 0x13, 0x17, 0x96, 0x00, 0x05, 0x00, 0x8c, 0x00, 0x10, - 0x08, 0x29, 0x00, 0x10, 0xc0, 0x8d, 0x00, 0x01, 0xb2, 0xd8, 0x00, 0x10, - 0x06, 0x00, 0x00, 0x10, 0xff, 0x88, 0x00, 0x10, 0xb3, 0x89, 0x00, 0x00, - 0x13, 0x90, 0x00, 0x10, 0xb5, 0x91, 0x00, 0x00, 0xc0, 0x8f, 0x00, 0x10, - 0x1a, 0xb9, 0x00, 0x04, 0x05, 0x1b, 0x00, 0x13, 0x97, 0x91, 0x00, 0x10, - 0xb0, 0x92, 0x00, 0x10, 0xb1, 0x93, 0x00, 0x13, 0x97, 0x94, 0x00, 0x13, - 0x07, 0xab, 0x00, 0x05, 0x00, 0x8c, 0x00, 0x00, 0x08, 0x09, 0x00, 0x15, - 0x00, 0x8d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0xb2, 0xd8, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x10, 0xff, 0x88, 0x00, 0x10, 0xb3, 0x89, 0x00, 0x00, - 0x13, 0x90, 0x00, 0x10, 0xb5, 0x91, 0x00, 0x00, 0xc0, 0x8f, 0x00, 0x00, - 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, 0x00, 0x0f, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x11, 0x00, 0x0b, 0x87, 0xa6, 0x00, 0x13, - 0x97, 0xa7, 0x00, 0x00, 0xb1, 0x92, 0x00, 0x00, 0xb0, 0x93, 0x00, 0x03, - 0x97, 0xaa, 0x00, 0x10, 0x19, 0xa1, 0x00, 0x00, 0x18, 0xa2, 0x00, 0x15, - 0x00, 0xb1, 0x00, 0x10, 0x00, 0x96, 0x00, 0x03, 0x08, 0x21, 0x00, 0x00, - 0xb5, 0x90, 0x00, 0x10, 0x13, 0x91, 0x00, 0x01, 0x10, 0xc8, 0x00, 0x10, - 0x00, 0x0f, 0x00, 0x01, 0xff, 0xe8, 0x00, 0x10, 0x00, 0x05, 0x00, 0x13, - 0x17, 0xd7, 0x00, 0x01, 0xb2, 0xd8, 0x00, 0x00, 0x07, 0x00, 0x00, 0x10, - 0xff, 0x88, 0x00, 0x10, 0xb3, 0x89, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x10, 0x00, 0x09, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x87, 0xc2, 0x00, 0x02, 0xb0, 0x49, 0x00, 0x13, 0x17, 0xca, 0x00, 0x05, - 0x00, 0x8c, 0x00, 0x10, 0x08, 0x89, 0x00, 0x15, 0x00, 0xb1, 0x00, 0x10, - 0x00, 0x96, 0x00, 0x13, 0x07, 0xce, 0x00, 0x05, 0x00, 0x8c, 0x00, 0x10, - 0x08, 0x98, 0x00, 0x15, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x92, 0x00, 0x10, - 0xc0, 0x8d, 0x00, 0x00, 0xc0, 0x8f, 0x00, 0x13, 0x97, 0xd0, 0x00, 0x00, - 0xc0, 0x92, 0x00, 0x10, 0xc0, 0x93, 0x00, 0x13, 0x97, 0xd3, 0x00, 0x10, - 0x19, 0xa1, 0x00, 0x00, 0x18, 0xa2, 0x00, 0x03, 0x08, 0x21, 0x00, 0x01, - 0xb2, 0xd8, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0xff, 0x88, 0x00, 0x10, - 0xb3, 0x89, 0x00, 0x05, 0x00, 0x8c, 0x00, 0x10, 0x08, 0x80, 0x00, 0x15, - 0x00, 0x8d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x13, 0x88, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x1b, - 0x87, 0xe6, 0x00, 0x10, 0xb0, 0x8f, 0x00, 0x00, 0xb5, 0x90, 0x00, 0x10, - 0x13, 0x91, 0x00, 0x00, 0x1a, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x0d, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x21, 0x00, 0x1b, - 0x87, 0xef, 0x00, 0x03, 0x97, 0xf0, 0x00, 0x10, 0xb3, 0x92, 0x00, 0x10, - 0xb2, 0x93, 0x00, 0x03, 0x97, 0xf3, 0x00, 0x00, 0xb1, 0xa1, 0x00, 0x10, - 0xb0, 0xa2, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x11, 0x00, 0x1b, 0x87, 0xfd, 0x00, 0x00, - 0xb3, 0xff, 0x00, 0x01, 0xb0, 0x80, 0x00, 0x00, 0xff, 0xb3, 0x00, 0x1b, - 0x28, 0x04, 0x00, 0x02, 0xb2, 0x00, 0x00, 0x03, 0x08, 0x05, 0x00, 0x10, - 0xb2, 0xff, 0x00, 0x11, 0xb1, 0x80, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x12, 0x00, 0x0b, 0x88, 0x0c, 0x00, 0x15, - 0x00, 0xb1, 0x00, 0x00, 0x00, 0x92, 0x00, 0x02, 0x10, 0x4c, 0x00, 0x03, - 0x18, 0x1f, 0x00, 0x11, 0xc2, 0xe8, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x0b, - 0x18, 0x17, 0x00, 0x15, 0x00, 0xff, 0x00, 0x00, 0x08, 0x00, 0x00, 0x13, - 0x08, 0x1f, 0x00, 0x11, 0xc2, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x00, 0x0b, - 0x18, 0x1d, 0x00, 0x15, 0x00, 0xff, 0x00, 0x10, 0x18, 0x00, 0x00, 0x13, - 0x08, 0x1f, 0x00, 0x15, 0x00, 0xff, 0x00, 0x00, 0x10, 0x00, 0x00, 0x11, - 0xb1, 0xd0, 0x00, 0x10, 0xff, 0xb1, 0x00, 0x15, 0x00, 0x9a, 0x00, 0x10, - 0x00, 0x36, 0x00, 0x05, 0x00, 0x9b, 0x00, 0x00, 0x95, 0xd5, 0x00, 0x12, - 0xd0, 0x41, 0x00, 0x1b, 0x18, 0x25, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x10, - 0x02, 0x02, 0x00, 0x13, 0x98, 0x29, 0x00, 0x12, 0x10, 0x4e, 0x00, 0x13, - 0x18, 0x2e, 0x00, 0x12, 0xb1, 0x2f, 0x00, 0x10, 0xff, 0xb1, 0x00, 0x00, - 0xb1, 0x75, 0x00, 0x13, 0x98, 0x2f, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x01, 0x19, 0xc8, 0x00, 0x10, 0xff, 0xf0, 0x00, 0x1b, - 0x18, 0x38, 0x00, 0x15, 0x00, 0xb1, 0x00, 0x10, 0x07, 0xd0, 0x00, 0x03, - 0x08, 0x3a, 0x00, 0x15, 0x00, 0xb1, 0x00, 0x00, 0x1b, 0x58, 0x00, 0x05, - 0x00, 0xb0, 0x00, 0x10, 0x00, 0x09, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0xbd, 0x88, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x1b, - 0x88, 0x43, 0x00, 0x03, 0x07, 0x03, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0xa4, 0xff, 0x00, 0x03, 0x68, 0x93, 0x00, 0x11, - 0xff, 0xa8, 0x00, 0x10, 0x00, 0x05, 0x00, 0x0b, 0x28, 0x93, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x01, 0x1b, 0x6c, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb2, 0x11, 0x00, 0x0b, 0x88, 0x50, 0x00, 0x02, 0xb2, 0x00, 0x00, 0x10, - 0xff, 0xb2, 0x00, 0x05, 0x00, 0x31, 0x00, 0x01, 0x1b, 0x6c, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x0a, 0x00, 0x1b, 0x88, 0x57, 0x00, 0x15, - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x12, 0x13, 0x00, 0x05, - 0x00, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x15, 0x00, 0xa3, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0xc6, 0x97, 0x00, 0x05, 0x00, 0x46, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x15, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x10, 0x00, 0x11, - 0xc4, 0xd8, 0x00, 0x00, 0x32, 0x00, 0x00, 0x10, 0xff, 0x88, 0x00, 0x00, - 0xc5, 0x89, 0x00, 0x10, 0xc4, 0x8a, 0x00, 0x10, 0xc5, 0x8b, 0x00, 0x10, - 0xc0, 0x8e, 0x00, 0x05, 0x00, 0x8c, 0x00, 0x10, 0xe1, 0x09, 0x00, 0x10, - 0xc0, 0x8d, 0x00, 0x15, 0x00, 0x90, 0x00, 0x01, 0x1b, 0x55, 0x00, 0x05, - 0x00, 0x91, 0x00, 0x10, 0xff, 0xff, 0x00, 0x00, 0xb2, 0x92, 0x00, 0x00, - 0xb3, 0x93, 0x00, 0x15, 0x00, 0x9a, 0x00, 0x10, 0x00, 0x56, 0x00, 0x05, - 0x00, 0x9b, 0x00, 0x10, 0x95, 0xf5, 0x00, 0x12, 0xd0, 0x42, 0x00, 0x03, - 0x18, 0x86, 0x00, 0x05, 0x00, 0xb0, 0x00, 0x10, 0x80, 0x80, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x0b, 0x88, 0x81, 0x00, 0x15, - 0x00, 0xb8, 0x00, 0x10, 0x00, 0x0c, 0x00, 0x14, 0x09, 0x25, 0x00, 0x03, - 0x08, 0x88, 0x00, 0x05, 0x00, 0x75, 0x00, 0x10, 0x80, 0x92, 0x00, 0x15, - 0x00, 0xb1, 0x00, 0x10, 0x07, 0xd0, 0x00, 0x05, 0x00, 0xb0, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x01, 0xbd, 0x88, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x12, 0x00, 0x1b, - 0x88, 0x91, 0x00, 0x03, 0x07, 0x03, 0x00, 0x15, 0x00, 0xd1, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x01, 0x12, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x0b, - 0x88, 0x9a, 0x00, 0x01, 0x12, 0x88, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xc0, 0x0a, 0x00, 0x0b, - 0x88, 0xa0, 0x00, 0x10, 0xb0, 0xfe, 0x00, 0x03, 0x68, 0xa5, 0x00, 0x00, - 0xb0, 0x12, 0x00, 0x03, 0x07, 0x03, 0x00, 0x10, 0xc0, 0x12, 0x00, 0x10, - 0xc0, 0x11, 0x00, 0x03, 0x07, 0x03, 0x00, 0x00, 0xba, 0x30, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x10, 0x00, 0x21, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb0, 0x19, 0x00, 0x1b, 0x88, 0xad, 0x00, 0x02, 0xb2, 0x00, 0x00, 0x11, - 0xff, 0xc8, 0x00, 0x10, 0x00, 0xff, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x10, - 0xb2, 0xb7, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, 0x00, 0x23, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x0a, 0x00, 0x0b, 0x88, 0xb7, 0x00, 0x17, - 0x40, 0x00, 0x00, 0x00, 0xba, 0x30, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x23, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb4, 0x09, 0x00, 0x0b, - 0x88, 0xbe, 0x00, 0x02, 0xb4, 0x00, 0x00, 0x11, 0xff, 0xc8, 0x00, 0x10, - 0x00, 0xff, 0x00, 0x10, 0xff, 0xb4, 0x00, 0x10, 0xb4, 0xb7, 0x00, 0x05, - 0x00, 0x31, 0x00, 0x00, 0x00, 0x23, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb4, 0x0a, 0x00, 0x1b, 0x88, 0xc8, 0x00, 0x17, 0x40, 0x00, 0x00, 0x00, - 0xba, 0x30, 0x00, 0x01, 0xc7, 0xc8, 0x00, 0x00, 0x00, 0x20, 0x00, 0x1b, - 0x18, 0xd6, 0x00, 0x05, 0x00, 0x31, 0x00, 0x10, 0x00, 0x28, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x09, 0x00, 0x0b, 0x88, 0xd2, 0x00, 0x11, - 0xb2, 0xc8, 0x00, 0x00, 0xff, 0x80, 0x00, 0x03, 0x18, 0xd9, 0x00, 0x10, - 0xc4, 0xb0, 0x00, 0x10, 0xc5, 0xb1, 0x00, 0x03, 0x08, 0xdb, 0x00, 0x10, - 0xc6, 0xb1, 0x00, 0x00, 0xc0, 0xb0, 0x00, 0x05, 0x00, 0x31, 0x00, 0x00, - 0x00, 0x04, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb2, 0x11, 0x00, 0x1b, - 0x88, 0xdf, 0x00, 0x17, 0x40, 0x00, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x07, 0x07, 0x00, 0x14, - 0x09, 0x25, 0x00, 0x13, 0x00, 0x2d, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x10, - 0x00, 0x09, 0x00, 0x15, 0x00, 0x3a, 0x00, 0x10, 0x07, 0x07, 0x00, 0x03, - 0x09, 0x25, 0x00, 0x04, 0x01, 0x1c, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x00, 0xba, 0x09, 0x00, 0x1b, - 0x88, 0xf4, 0x00, 0x04, 0x08, 0xa8, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, 0xb2, 0x0a, 0x00, 0x1b, - 0x88, 0xfd, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x0d, 0x88, 0x00, 0x10, 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0x03, 0x09, 0x00, 0x1b, 0x89, 0x05, 0x00, 0x02, - 0x03, 0x27, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x11, 0x0d, 0x88, 0x00, 0x10, - 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb2, 0x0a, 0x00, 0x0b, 0x89, 0x0d, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x10, - 0x00, 0x06, 0x00, 0x03, 0x09, 0x25, 0x00, 0x14, 0x01, 0x2e, 0x00, 0x04, - 0x08, 0xa8, 0x00, 0x15, 0x00, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x13, 0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, - 0x00, 0x33, 0x00, 0x10, 0xb2, 0x0a, 0x00, 0x0b, 0x89, 0x1a, 0x00, 0x12, - 0x10, 0x27, 0x00, 0x10, 0xff, 0xb2, 0x00, 0x11, 0x13, 0x88, 0x00, 0x10, - 0x00, 0x11, 0x00, 0x00, 0xff, 0x31, 0x00, 0x15, 0x00, 0x33, 0x00, 0x10, - 0xb2, 0x0a, 0x00, 0x1b, 0x89, 0x22, 0x00, 0x15, 0x00, 0xb8, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x13, 0x49, 0x25, 0x00, 0x00, 0xb8, 0x38, 0x00, 0x17, - 0x40, 0x00, 0x9a, 0x8c, 0xaf, 0x3d +#ifdef UNIQUE_FW_NAME +unsigned char fw2322ipx_version_str[] = {3, 3,20}; +#else +unsigned char firmware_version[] = {3, 3,20}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2322ipx_VERSION_STRING "3.03.20" +#else +#define FW_VERSION_STRING "3.03.20" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2322ipx_addr01 = 0x0800 ; +#else +unsigned short risc_code_addr01 = 0x0800 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2322ipx_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0470, 0x0000, 0x0000, 0xe719, 0x0000, 0x0003, 0x0003, 0x0014, + 0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x332e, 0x3033, 0x2e32, 0x3020, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, + 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, + 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, + 0x400f, 0x2091, 0x2800, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, + 0x2091, 0x2a00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, + 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, + 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, + 0x0000, 0x20c1, 0x0004, 0x20c9, 0x1cff, 0x2059, 0x0000, 0x2b78, + 0x7883, 0x0004, 0x2089, 0x2bc2, 0x2051, 0x1800, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e74, 0x00f6, + 0x7888, 0x9005, 0x11f8, 0x2061, 0xc000, 0x080c, 0x20c6, 0x1170, + 0x2079, 0x0300, 0x080c, 0x20dc, 0x2061, 0xe000, 0x080c, 0x20c6, + 0x1128, 0x2079, 0x0380, 0x080c, 0x20dc, 0x0060, 0x00fe, 0x7883, + 0x4010, 0x7837, 0x4010, 0x7833, 0x0011, 0x2091, 0x5000, 0x2091, + 0x4080, 0x0cf8, 0x00fe, 0x2029, 0x5600, 0x2031, 0xffff, 0x2039, + 0x55dc, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, + 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, + 0x2001, 0x0dc1, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, + 0x9086, 0x0000, 0x0120, 0x21a8, 0x4104, 0x8001, 0x1de0, 0x756e, + 0x7672, 0x776a, 0x7476, 0x747a, 0x00e6, 0x2071, 0x1b73, 0x2472, + 0x00ee, 0x20a1, 0x1ddc, 0x7170, 0x810d, 0x810d, 0x810d, 0x810d, + 0x918c, 0x000f, 0x2001, 0x0001, 0x9112, 0x900e, 0x21a8, 0x4104, + 0x8211, 0x1de0, 0x7170, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, + 0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d, + 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, + 0x0001, 0x20a1, 0x0800, 0x900e, 0x20a9, 0x0800, 0x4104, 0x8211, + 0x1dd8, 0x080c, 0x0f71, 0x080c, 0x61ab, 0x080c, 0xb102, 0x080c, + 0x1128, 0x080c, 0x1352, 0x080c, 0x1c1c, 0x080c, 0x9582, 0x080c, + 0x0d17, 0x080c, 0x10ad, 0x080c, 0x358e, 0x080c, 0x7aca, 0x080c, + 0x6cea, 0x080c, 0x8c5d, 0x080c, 0x88be, 0x080c, 0x22bf, 0x080c, + 0x81f5, 0x080c, 0x20f5, 0x080c, 0x2233, 0x080c, 0x22b4, 0x2091, + 0x3009, 0x7883, 0x0000, 0x1004, 0x0943, 0x7880, 0x9086, 0x0002, + 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, 0x0010, 0x0e04, + 0x0937, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x190c, 0x1200, 0x2071, 0x1800, 0x7003, 0x0000, 0x780c, + 0x9084, 0x0030, 0x9086, 0x0020, 0x1168, 0x7034, 0xc08d, 0x7036, + 0x2001, 0x0050, 0x7076, 0x707a, 0x7056, 0x606b, 0x269c, 0x2071, + 0x1b73, 0x2072, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, + 0x080c, 0x4d66, 0x080c, 0x35b5, 0x080c, 0x7b32, 0x080c, 0x7275, + 0x080c, 0x8d44, 0x080c, 0x88e7, 0x0c68, 0x000b, 0x0c88, 0x0979, + 0x097a, 0x0b15, 0x0977, 0x0bcf, 0x0d16, 0x0d16, 0x0d16, 0x080c, + 0x0d85, 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, + 0x0001, 0x1904, 0x0ae8, 0x080c, 0x0ec4, 0x080c, 0x779e, 0x0150, + 0x080c, 0x77c1, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, + 0x782a, 0x0478, 0x080c, 0x76cd, 0x7000, 0x9086, 0x0001, 0x1904, + 0x0ae8, 0x7098, 0x9086, 0x0029, 0x1904, 0x0ae8, 0x080c, 0x88a7, + 0x080c, 0x8899, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, + 0x2011, 0xffff, 0x080c, 0x2ad3, 0x7a28, 0x9295, 0x5e2c, 0x7a2a, + 0x2011, 0x7612, 0x080c, 0x8993, 0x2011, 0x7605, 0x080c, 0x8a9f, + 0x2011, 0x6002, 0x080c, 0x8993, 0x2011, 0x8030, 0x901e, 0x7396, + 0x04d0, 0x080c, 0x58aa, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, + 0x0ae8, 0x2011, 0x6002, 0x080c, 0x8993, 0x2011, 0x7612, 0x080c, + 0x8993, 0x2011, 0x7605, 0x080c, 0x8a9f, 0x2001, 0x0265, 0x2001, + 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, + 0x19a7, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, + 0x6153, 0x00ce, 0x0804, 0x0ae8, 0x780f, 0x006b, 0x7a28, 0x080c, + 0x77a6, 0x0118, 0x9295, 0x5e2c, 0x0010, 0x9295, 0x402c, 0x7a2a, + 0x2011, 0x8010, 0x73d8, 0x2001, 0x19a8, 0x2003, 0x0001, 0x080c, + 0x299b, 0x080c, 0x4ca1, 0x7248, 0xc284, 0x724a, 0x2001, 0x180c, + 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x2001, 0x0390, 0x2003, 0x0400, + 0x080c, 0xacfc, 0x080c, 0xa4f1, 0x2011, 0x0004, 0x080c, 0xcf2b, + 0x080c, 0xad18, 0x080c, 0x6ab1, 0x080c, 0x779e, 0x1120, 0x080c, + 0x29fc, 0x0600, 0x0420, 0x080c, 0x615a, 0x0140, 0x7097, 0x0001, + 0x70d3, 0x0000, 0x080c, 0x5a7c, 0x0804, 0x0ae8, 0x2001, 0x0390, + 0x2003, 0x0404, 0x080c, 0x5840, 0xd094, 0x0188, 0x2011, 0x180c, + 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5844, 0xd0d4, 0x1118, 0x080c, + 0x29fc, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x00a8, 0x080c, + 0x5844, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x0060, + 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x6c09, 0x1128, + 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, 0x080c, 0x6bcf, 0x0120, + 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707f, 0x0000, 0x080c, 0x779e, + 0x1130, 0x70b0, 0x9005, 0x1168, 0x080c, 0xd389, 0x0050, 0x080c, + 0xd389, 0x70dc, 0xd09c, 0x1128, 0x70b0, 0x9005, 0x0110, 0x080c, + 0x6130, 0x70e7, 0x0000, 0x70e3, 0x0000, 0x70a7, 0x0000, 0x080c, + 0x2a04, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x72dc, + 0x080c, 0x779e, 0x1178, 0x9016, 0x0016, 0x080c, 0x27a4, 0x2019, + 0x196d, 0x211a, 0x001e, 0x705f, 0xffff, 0x7063, 0x00ef, 0x7083, + 0x0000, 0x0020, 0x2019, 0x196d, 0x201b, 0x0000, 0x2079, 0x1847, + 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72de, 0x080c, 0x779e, 0x0118, + 0x9296, 0x0004, 0x0518, 0x2011, 0x0001, 0x080c, 0xcf2b, 0x70ab, + 0x0000, 0x70af, 0xffff, 0x7003, 0x0002, 0x00fe, 0x080c, 0x30bf, + 0x080c, 0xacfc, 0x2011, 0x0005, 0x080c, 0xa62b, 0x080c, 0xad18, + 0x080c, 0x779e, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, + 0x27a4, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x00e0, 0x70ab, 0x0000, + 0x70af, 0xffff, 0x7003, 0x0002, 0x080c, 0xacfc, 0x2011, 0x0005, + 0x080c, 0xa62b, 0x080c, 0xad18, 0x080c, 0x779e, 0x0148, 0x00c6, + 0x2061, 0x0100, 0x0016, 0x080c, 0x27a4, 0x61e2, 0x001e, 0x00ce, + 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x779e, 0x1118, + 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x779e, 0x1110, + 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, 0x1000, + 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x341e, 0x8108, + 0x1f04, 0x0afc, 0x707f, 0x0000, 0x7080, 0x9084, 0x00ff, 0x7082, + 0x70b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, + 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0bcc, 0x70ac, 0x9086, + 0xffff, 0x0120, 0x080c, 0x30bf, 0x0804, 0x0bcc, 0x70dc, 0xd0ac, + 0x1110, 0xd09c, 0x0538, 0xd084, 0x0528, 0x0006, 0x2001, 0x0103, + 0x2003, 0x002b, 0x000e, 0xd08c, 0x01e8, 0x080c, 0x3487, 0x11b0, + 0x70e0, 0x9086, 0xffff, 0x0190, 0x080c, 0x327b, 0x70dc, 0xd094, + 0x1904, 0x0bcc, 0x2011, 0x0001, 0x080c, 0xd645, 0x0110, 0x2011, + 0x0003, 0x901e, 0x080c, 0x32b5, 0x0804, 0x0bcc, 0x70e4, 0x9005, + 0x1904, 0x0bcc, 0x70a8, 0x9005, 0x1904, 0x0bcc, 0x70dc, 0xd0a4, + 0x0118, 0xd0b4, 0x0904, 0x0bcc, 0x080c, 0x6bcf, 0x1904, 0x0bcc, + 0x080c, 0x6c22, 0x1904, 0x0bcc, 0x080c, 0x6c09, 0x01c0, 0x0156, + 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x67b4, 0x1118, + 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b6c, 0x00ce, + 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0bcc, 0x0006, + 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b4, 0x080c, + 0x0fe1, 0x2011, 0x19ce, 0x080c, 0x0fe1, 0x7030, 0xc08c, 0x7032, + 0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x0e98, 0x9006, 0x080c, + 0x2631, 0x080c, 0x3487, 0x0118, 0x080c, 0x4e3e, 0x0050, 0x0036, + 0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4e58, 0x004e, + 0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x77c1, 0x0150, 0x080c, + 0x779e, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, + 0x782a, 0x00fe, 0x080c, 0xacfc, 0x2001, 0x19e9, 0x2004, 0x9086, + 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0xa62b, 0x2011, 0x0000, + 0x080c, 0xa635, 0x080c, 0xad18, 0x012e, 0x00be, 0x0005, 0x0016, + 0x0026, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, + 0x7904, 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x6119, + 0x7940, 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0120, 0x2011, + 0x0040, 0x080c, 0x2ad3, 0xd19c, 0x0120, 0x2011, 0x0008, 0x080c, + 0x2ad3, 0x0006, 0x0036, 0x0156, 0x0000, 0x2001, 0x19a8, 0x2004, + 0x9005, 0x1518, 0x080c, 0x2a67, 0x1148, 0x2001, 0x0001, 0x080c, + 0x29ca, 0x2001, 0x0001, 0x080c, 0x29ad, 0x00b8, 0x080c, 0x2a6f, + 0x1138, 0x9006, 0x080c, 0x29ca, 0x9006, 0x080c, 0x29ad, 0x0068, + 0x080c, 0x2a77, 0x1d50, 0x2001, 0x1998, 0x2004, 0xd0fc, 0x0108, + 0x0020, 0x080c, 0x27d8, 0x0804, 0x0cc9, 0x20a9, 0x003a, 0x1d04, + 0x0c1f, 0x080c, 0x8a7f, 0x1f04, 0x0c1f, 0x080c, 0x77af, 0x0148, + 0x080c, 0x77c1, 0x1118, 0x080c, 0x7ac5, 0x0050, 0x080c, 0x77a6, + 0x0dd0, 0x080c, 0x7ac0, 0x080c, 0x7ab6, 0x080c, 0x76cd, 0x0020, + 0x2009, 0x00f8, 0x080c, 0x6119, 0x7850, 0xc0e5, 0x7852, 0x080c, + 0x779e, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, + 0x2019, 0xea60, 0x0d0c, 0x8a7f, 0x7820, 0xd09c, 0x15a0, 0x080c, + 0x779e, 0x0904, 0x0cab, 0x7824, 0xd0ac, 0x1904, 0x0cce, 0x080c, + 0x77c1, 0x1548, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e, + 0x2011, 0x1800, 0x080c, 0x2ad3, 0x080c, 0x2a7f, 0x7824, 0x9084, + 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004, + 0x9084, 0x9000, 0x0110, 0x080c, 0x0cf1, 0x8421, 0x1160, 0x1d04, + 0x0c7b, 0x080c, 0x8a7f, 0x080c, 0x7ac0, 0x080c, 0x7ab6, 0x7003, + 0x0001, 0x0804, 0x0cce, 0x8319, 0x1928, 0x2001, 0x1810, 0x2004, + 0x9084, 0x9000, 0x0110, 0x080c, 0x0cf1, 0x1d04, 0x0c91, 0x080c, + 0x8a7f, 0x2009, 0x199b, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, + 0x1188, 0x200b, 0x000a, 0x2011, 0x0048, 0x080c, 0x2ad3, 0x20a9, + 0x0002, 0x080c, 0x2a60, 0x7924, 0x080c, 0x2a7f, 0xd19c, 0x0110, + 0x080c, 0x299b, 0x00f0, 0x080c, 0x77af, 0x1140, 0x94a2, 0x03e8, + 0x1128, 0x080c, 0x7772, 0x7003, 0x0001, 0x00c0, 0x2011, 0x1800, + 0x080c, 0x2ad3, 0x080c, 0x2a7f, 0x7824, 0x080c, 0x77b8, 0x0110, + 0xd0ac, 0x1160, 0x9084, 0x1800, 0x0904, 0x0c83, 0x7003, 0x0001, + 0x0028, 0x2001, 0x0001, 0x080c, 0x2631, 0x00a0, 0x7850, 0xc0e4, + 0x7852, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, + 0x0002, 0x7906, 0x2011, 0x0048, 0x080c, 0x2ad3, 0x7828, 0x9085, + 0x0028, 0x782a, 0x2001, 0x19a8, 0x2003, 0x0000, 0x9006, 0x78f2, + 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x002e, 0x001e, + 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x00b6, 0x00c6, + 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0071, 0x0d0c, 0x8a7f, 0x015e, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x002e, + 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0x189e, 0x7004, 0x9086, + 0x0001, 0x1110, 0x080c, 0x35b5, 0x00ee, 0x0005, 0x0005, 0x2a70, + 0x2061, 0x19ac, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x0014, + 0x600f, 0x0137, 0x2001, 0x197c, 0x900e, 0x2102, 0x7196, 0x2001, + 0x0100, 0x2004, 0x9082, 0x0002, 0x0218, 0x705f, 0xffff, 0x0008, + 0x715e, 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xd389, 0x70ef, + 0x00c0, 0x2061, 0x196c, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, + 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f, + 0x07d0, 0x2061, 0x1974, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, + 0x1989, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, + 0x2020, 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x67b4, + 0x1178, 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, + 0xff00, 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, + 0x8108, 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, + 0x2079, 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, + 0x0d87, 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, + 0x000e, 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, + 0x7886, 0x3900, 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, + 0x681c, 0x78b2, 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, + 0x5000, 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, + 0x1b2b, 0x7a08, 0x226a, 0x2069, 0x1b2c, 0x7a18, 0x226a, 0x8d68, + 0x7a1c, 0x226a, 0x782c, 0x2019, 0x1b39, 0x201a, 0x2019, 0x1b3c, + 0x9016, 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, + 0x9386, 0x1b55, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, + 0xdead, 0x2019, 0x1b3a, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, + 0x0000, 0x2069, 0x1a81, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, + 0x226a, 0x8d68, 0x8318, 0x1f04, 0x0dde, 0x2069, 0x1aa1, 0x2019, + 0x0050, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, 0x8318, + 0x1f04, 0x0deb, 0x0491, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, + 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x0180, 0x2001, 0x1a25, 0x2004, 0x9005, 0x0128, 0x2001, + 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, + 0x2003, 0x1001, 0x080c, 0x584f, 0x1170, 0x080c, 0x0f32, 0x0110, + 0x080c, 0x0e85, 0x080c, 0x584f, 0x1130, 0x2071, 0x1800, 0x2011, + 0x8000, 0x080c, 0x0f46, 0x0c70, 0x0005, 0x2001, 0x0382, 0x2004, + 0x9084, 0x0007, 0x9086, 0x0001, 0x1120, 0x2001, 0x0015, 0x080c, + 0xaced, 0x2079, 0x0380, 0x2069, 0x1b0b, 0x7818, 0x6802, 0x781c, + 0x6806, 0x7840, 0x680a, 0x7844, 0x680e, 0x782c, 0x6812, 0x2019, + 0x1b16, 0x9016, 0x7808, 0xd09c, 0x0150, 0x7820, 0x201a, 0x8210, + 0x8318, 0x8210, 0x9282, 0x0011, 0x0ea8, 0x2011, 0xdead, 0x6a2a, + 0x7830, 0x681a, 0x7834, 0x681e, 0x7838, 0x6822, 0x783c, 0x6826, + 0x7803, 0x0000, 0x2069, 0x1acb, 0x901e, 0x20a9, 0x0020, 0x7b26, + 0x7828, 0x206a, 0x8d68, 0x8318, 0x1f04, 0x0e5f, 0x2069, 0x1aeb, + 0x2019, 0x00b0, 0x20a9, 0x0020, 0x7b26, 0x7828, 0x206a, 0x8d68, + 0x8318, 0x1f04, 0x0e6c, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, + 0x2004, 0x9084, 0x0600, 0x1118, 0x918d, 0x6c00, 0x0010, 0x918d, + 0x6400, 0x2001, 0x017f, 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, + 0x0080, 0x080c, 0x0f24, 0x20a9, 0x0900, 0x080c, 0x0f5a, 0x2011, + 0x0040, 0x080c, 0x0f24, 0x20a9, 0x0900, 0x080c, 0x0f5a, 0x0c78, + 0x0026, 0x080c, 0x0f32, 0x1188, 0x2011, 0x010e, 0x2214, 0x9294, + 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0x0947, 0x0010, 0x2011, + 0x1b47, 0x080c, 0x0f46, 0x002e, 0x0005, 0x2011, 0x010e, 0x2214, + 0x9294, 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, + 0x2011, 0x6840, 0xd0e4, 0x70f3, 0x0000, 0x1120, 0x70f3, 0x0fa0, + 0x080c, 0x0f37, 0x002e, 0x0005, 0x0026, 0x080c, 0x0f32, 0x0148, + 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, + 0x0f37, 0x002e, 0x0005, 0x0026, 0x70f3, 0x0000, 0x080c, 0x0f32, + 0x1130, 0x2011, 0x8040, 0x080c, 0x0f46, 0x002e, 0x0005, 0x080c, + 0x2a77, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, 0x080c, + 0x0f37, 0x002e, 0x0005, 0x00e6, 0x0016, 0x0006, 0x2071, 0x1800, + 0xd0b4, 0x70ec, 0x71e8, 0x1118, 0xc0e4, 0xc1f4, 0x0050, 0x0006, + 0x3b00, 0x9084, 0xff3e, 0x20d8, 0x000e, 0x70f3, 0x0000, 0xc0e5, + 0xc1f5, 0x0099, 0x000e, 0x001e, 0x00ee, 0x0005, 0x00e6, 0x2071, + 0x1800, 0xd0e4, 0x70ec, 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0016, + 0x71e8, 0x0019, 0x001e, 0x00ee, 0x0005, 0x70ee, 0x71ea, 0x7000, + 0x9084, 0x0007, 0x000b, 0x0005, 0x0eea, 0x0ec4, 0x0ec4, 0x0e98, + 0x0ed3, 0x0ec4, 0x0ec4, 0x0ed3, 0xc284, 0x0016, 0x3b08, 0x3a00, + 0x9104, 0x918d, 0x00c1, 0x21d8, 0x9084, 0xff3e, 0x9205, 0x20d0, + 0x001e, 0x0005, 0x2001, 0x183b, 0x2004, 0xd0dc, 0x0005, 0x9e86, + 0x1800, 0x190c, 0x0d85, 0x70ec, 0xd0e4, 0x0108, 0xc2e5, 0x72ee, + 0xd0e4, 0x1118, 0x9294, 0x00c1, 0x08f9, 0x0005, 0x9e86, 0x1800, + 0x190c, 0x0d85, 0x70e8, 0xd0f4, 0x0108, 0xc2f5, 0x72ea, 0xd0f4, + 0x1140, 0x9284, 0x8000, 0x8005, 0xc284, 0x9215, 0x9294, 0x00c1, + 0x0861, 0x0005, 0x1d04, 0x0f5a, 0x2091, 0x6000, 0x1f04, 0x0f5a, + 0x0005, 0x890e, 0x810e, 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, + 0x0005, 0x0006, 0x2200, 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, + 0x0005, 0x01d6, 0x0146, 0x0036, 0x0096, 0x2061, 0x188d, 0x600b, + 0x0000, 0x600f, 0x0000, 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, + 0xffc0, 0x2105, 0x0006, 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, + 0x9016, 0x2049, 0x0bff, 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, + 0x1138, 0x2105, 0x9306, 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, + 0x000e, 0x200f, 0x2001, 0x189d, 0x928a, 0x000e, 0x1638, 0x928a, + 0x0006, 0x2011, 0x0006, 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, + 0x2008, 0x82ff, 0x01b0, 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, + 0x0002, 0x6007, 0x0000, 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, + 0x20e8, 0x21a0, 0x21a8, 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, + 0x002e, 0x009e, 0x003e, 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, + 0x08e8, 0x0016, 0x0026, 0x0096, 0x3348, 0x080c, 0x0f61, 0x2100, + 0x9300, 0x2098, 0x22e0, 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, + 0x20a9, 0x0001, 0x4002, 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, + 0x0005, 0x20e9, 0x0001, 0x71b8, 0x81ff, 0x11c0, 0x9006, 0x2009, + 0x0200, 0x20a9, 0x0002, 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, + 0x0700, 0x20a9, 0x0002, 0x9298, 0x0008, 0x23a0, 0x4001, 0x707c, + 0x8007, 0x7180, 0x810f, 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, + 0x23a0, 0x900e, 0x080c, 0x0d65, 0x2001, 0x0000, 0x810f, 0x20a9, + 0x0002, 0x4001, 0x0005, 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, + 0x0006, 0x080c, 0x108b, 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x080c, 0x1104, 0x090c, 0x0d85, 0x00ee, 0x0005, 0x0086, + 0x00e6, 0x0006, 0x0026, 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, + 0x2071, 0x1800, 0x73c0, 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, + 0x9906, 0x090c, 0x0d85, 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0d85, + 0xa000, 0x0c98, 0x012e, 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, + 0x0005, 0x0086, 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0x1910, 0x7010, 0x9005, 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, + 0x090c, 0x0d85, 0xa000, 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, + 0x0005, 0x00e6, 0x2071, 0x1800, 0x0126, 0x2091, 0x8000, 0x70c0, + 0x8001, 0x0270, 0x70c2, 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, + 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, + 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, + 0x70c0, 0x90ca, 0x0020, 0x0268, 0x8001, 0x70c2, 0x702c, 0x2048, + 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, + 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, + 0x890e, 0x810e, 0x810f, 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, + 0xa85e, 0x001e, 0x0020, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, + 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, + 0x080c, 0x8899, 0x012e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, + 0x2009, 0x0000, 0x2049, 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, + 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, + 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188d, 0x7000, 0x9005, + 0x11a0, 0x2001, 0x0558, 0xa802, 0x2048, 0x2009, 0x5600, 0x8940, + 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, + 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, 0x2071, 0x188d, 0x7104, + 0x7200, 0x82ff, 0x01d0, 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, + 0x7312, 0x8319, 0x2001, 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, + 0x2040, 0xa95e, 0xaa62, 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, + 0x9188, 0x0040, 0x9291, 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, + 0x1800, 0x74be, 0x74c2, 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, + 0x01e8, 0x908c, 0xf800, 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, + 0x0440, 0x0278, 0x9982, 0x0558, 0x0288, 0x9982, 0x0800, 0x1270, + 0x0040, 0x9982, 0x0800, 0x0250, 0x2071, 0x188d, 0x7010, 0x9902, + 0x1228, 0x9085, 0x0001, 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, + 0x00e6, 0x2071, 0x1a24, 0x7007, 0x0000, 0x9006, 0x701e, 0x7022, + 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012, 0x2071, + 0x0080, 0x9006, 0x702b, 0x0060, 0x20a9, 0x0040, 0x7022, 0x1f04, + 0x113e, 0x702b, 0x0060, 0x702b, 0x0020, 0x20a9, 0x0040, 0x7022, + 0x1f04, 0x1147, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, + 0x8000, 0x00e6, 0xa06f, 0x0000, 0x2071, 0x1a24, 0x701c, 0x9088, + 0x1a2e, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, + 0x090c, 0x0d85, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, + 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, + 0x00e6, 0x2071, 0x1a24, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, + 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, + 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1190, 0x1313, + 0x118e, 0x118e, 0x1307, 0x1307, 0x1307, 0x1307, 0x080c, 0x0d85, + 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, + 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x1a2e, + 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, + 0x0026, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, + 0x780e, 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, + 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, + 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, + 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, + 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, + 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, + 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, + 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, + 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, + 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, + 0x2009, 0x1a24, 0x2104, 0xc095, 0x200a, 0x080c, 0x116d, 0x0005, + 0x0016, 0x00e6, 0x2071, 0x1a24, 0x00f6, 0x2079, 0x0080, 0x792c, + 0xd1bc, 0x190c, 0x0d7e, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, + 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x117e, + 0x1226, 0x125a, 0x1332, 0x0d85, 0x134d, 0x0d85, 0x918c, 0x0700, + 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, + 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, + 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, + 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11c3, 0x0005, + 0x7008, 0x0096, 0x2048, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, + 0x080c, 0x117e, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, + 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, + 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x11d8, 0x0005, 0x7008, + 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, + 0x0096, 0x7008, 0x2048, 0x7800, 0xa88e, 0x7804, 0xa892, 0x7808, + 0xa896, 0x780c, 0xa89a, 0xa86f, 0x0100, 0x009e, 0x7007, 0x0000, + 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18b9, 0x2004, 0x9906, + 0x1128, 0xa89c, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, + 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa89c, 0x0086, + 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x116d, 0x0005, + 0x00de, 0x009e, 0x080c, 0x116d, 0x0005, 0xa8a8, 0xd08c, 0x0005, + 0x0096, 0xa0a0, 0x904d, 0x090c, 0x0d85, 0xa06c, 0x908e, 0x0100, + 0x0130, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, 0x080c, + 0x7006, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x2848, 0x080c, 0x108b, + 0x009e, 0x0005, 0x00a6, 0xa0a0, 0x904d, 0x090c, 0x0d85, 0xa06c, + 0x908e, 0x0100, 0x0128, 0xa87b, 0x0001, 0xa883, 0x0000, 0x00c0, + 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, + 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0xa076, 0xa172, 0xb000, 0xa07a, 0x2810, 0x080c, 0x114e, 0x00e8, + 0xa97c, 0xa894, 0x0016, 0x0006, 0x080c, 0x7006, 0x000e, 0x001e, + 0xd1fc, 0x1138, 0xd1f4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xb16c, + 0x00ce, 0x7008, 0x2048, 0xa89f, 0x0000, 0xa8a3, 0x0000, 0x080c, + 0x108b, 0x7007, 0x0000, 0x080c, 0x116d, 0x00ae, 0x0005, 0x0126, + 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, 0xc094, + 0x7002, 0x012e, 0x0005, 0x0096, 0x2001, 0x192f, 0x204c, 0xa87c, + 0x7812, 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, + 0x780e, 0x782b, 0x0020, 0x0126, 0x2091, 0x8000, 0x782b, 0x0041, + 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x2900, 0x700a, 0x012e, + 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, + 0x0096, 0x2001, 0x192f, 0x204c, 0xaa7c, 0x009e, 0x080c, 0x8f88, + 0x2009, 0x188c, 0x2104, 0x9084, 0xfffc, 0x200a, 0x080c, 0x8de7, + 0x7007, 0x0000, 0x080c, 0x117e, 0x0005, 0x7007, 0x0000, 0x080c, + 0x117e, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, 0x2071, + 0x1a6e, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x0041, 0x7807, 0x0007, + 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, 0x00c6, 0x7803, + 0x0000, 0x2001, 0x0165, 0x2003, 0x4198, 0x7808, 0xd09c, 0x0120, + 0x7820, 0x080c, 0x13b6, 0x0cc8, 0x2001, 0x1a6f, 0x2003, 0x0000, + 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, + 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b, + 0x1a81, 0x78e3, 0xff00, 0x781f, 0xff00, 0x781b, 0xff00, 0x2001, + 0x1a70, 0x2003, 0x0000, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, + 0x781f, 0x0303, 0x2061, 0x1a81, 0x602f, 0x1ddc, 0x2001, 0x181a, + 0x2004, 0x9082, 0x1ddc, 0x6032, 0x603b, 0x1ec1, 0x602b, 0x1ac1, + 0x6007, 0x1aa1, 0x2061, 0x1aa1, 0x606f, 0x193d, 0x2001, 0x1928, + 0x2004, 0x607a, 0x783f, 0x348e, 0x00ce, 0x0005, 0x9086, 0x000d, + 0x11d0, 0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, 0x080c, + 0xcf09, 0x0180, 0x2260, 0x6000, 0x9086, 0x0004, 0x1158, 0x0016, + 0x6120, 0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, 0x080c, + 0xb20a, 0x001e, 0x002e, 0x0005, 0x0126, 0x2091, 0x2200, 0x7908, + 0x9184, 0x0070, 0x190c, 0x0d7e, 0xd19c, 0x05a0, 0x7820, 0x908c, + 0xf000, 0x0540, 0x2060, 0x6020, 0x9086, 0x0003, 0x1550, 0x6000, + 0x9086, 0x0004, 0x1530, 0x6114, 0x2148, 0xa876, 0xa87a, 0xa867, + 0x0103, 0x080c, 0x6e27, 0x00b6, 0x6010, 0x2058, 0xba3c, 0x8211, + 0x0208, 0xba3e, 0xb8d0, 0x9005, 0x190c, 0x68df, 0x00be, 0x6044, + 0xd0fc, 0x190c, 0xad25, 0x080c, 0xb195, 0x7808, 0xd09c, 0x19b0, + 0x012e, 0x0005, 0x908a, 0x0024, 0x1a0c, 0x0d85, 0x002b, 0x012e, + 0x0005, 0x04b0, 0x012e, 0x0005, 0x1438, 0x145e, 0x148e, 0x1493, + 0x1497, 0x149c, 0x14c4, 0x14c8, 0x14d6, 0x14da, 0x1438, 0x15a7, + 0x15ab, 0x161d, 0x1624, 0x1438, 0x1625, 0x1626, 0x1631, 0x1638, + 0x1438, 0x1438, 0x1438, 0x1438, 0x1438, 0x1438, 0x1438, 0x149e, + 0x1438, 0x1466, 0x148b, 0x1452, 0x1438, 0x1472, 0x143c, 0x143a, + 0x080c, 0x0d85, 0x080c, 0x0d7e, 0x080c, 0x1643, 0x2009, 0x1a7d, + 0x2104, 0x8000, 0x200a, 0x080c, 0x82b8, 0x080c, 0x1b1e, 0x0005, + 0x6044, 0xd0fc, 0x190c, 0xad25, 0x2009, 0x0055, 0x080c, 0xb20a, + 0x012e, 0x0005, 0x080c, 0x1643, 0x2060, 0x6044, 0xd0fc, 0x190c, + 0xad25, 0x2009, 0x0055, 0x080c, 0xb20a, 0x0005, 0x2009, 0x0048, + 0x080c, 0x1643, 0x2060, 0x080c, 0xb20a, 0x0005, 0x2009, 0x0054, + 0x080c, 0x1643, 0x2060, 0x6044, 0xd0fc, 0x190c, 0xad25, 0x080c, + 0xb20a, 0x0005, 0x080c, 0x1643, 0x2060, 0x0056, 0x0066, 0x080c, + 0x1643, 0x2028, 0x080c, 0x1643, 0x2030, 0x0036, 0x0046, 0x2021, + 0x0000, 0x2418, 0x2009, 0x0056, 0x080c, 0xb20a, 0x004e, 0x003e, + 0x006e, 0x005e, 0x0005, 0x080c, 0x1643, 0x0005, 0x7004, 0xc085, + 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, 0x0005, 0x080c, + 0x1643, 0x080c, 0x1740, 0x0005, 0x080c, 0x0d85, 0x080c, 0x1643, + 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, + 0x0048, 0x080c, 0xb20a, 0x2001, 0x015d, 0x2003, 0x0000, 0x2009, + 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, + 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, 0x1648, 0x2001, + 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, 0x7006, 0x0005, + 0x080c, 0x1643, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, + 0x009e, 0x2009, 0x0048, 0x080c, 0xb20a, 0x0005, 0x080c, 0x1643, + 0x080c, 0x0d85, 0x080c, 0x1643, 0x080c, 0x1592, 0x7827, 0x0018, + 0x79ac, 0xd1dc, 0x0904, 0x1543, 0x7827, 0x0015, 0x7828, 0x782b, + 0x0000, 0x9065, 0x0140, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x0804, 0x1549, 0x7004, 0x9005, 0x01c8, 0x1188, 0x78ab, + 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0d85, + 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0804, 0x1577, + 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x15ab, 0x0005, 0x7827, + 0x0018, 0xa001, 0x7828, 0x7827, 0x0011, 0xa001, 0x7928, 0x9106, + 0x0110, 0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200, 0x702c, 0xd0c4, + 0x0140, 0x00ee, 0x080c, 0x1b1e, 0x080c, 0x1366, 0x7803, 0x0001, + 0x0005, 0x7037, 0x0001, 0xa001, 0x7150, 0x00ee, 0x918c, 0xff00, + 0x9186, 0x0500, 0x0110, 0x79ac, 0x0810, 0x7004, 0xc09d, 0x7006, + 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x15ab, 0x2001, 0x020d, + 0x2003, 0x0020, 0x0005, 0x7828, 0x782b, 0x0000, 0x9065, 0x090c, + 0x0d85, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, 0x0700, 0x01a8, + 0x080c, 0x82b8, 0x080c, 0x1b1e, 0x080c, 0xcf1b, 0x0158, 0xa9ac, + 0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, 0xffff, 0xa880, + 0xc0bd, 0xa882, 0x080c, 0xcae9, 0x0005, 0x6020, 0x9086, 0x0009, + 0x1128, 0x2009, 0x004c, 0x080c, 0xb20a, 0x0048, 0x6010, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xd31e, 0x2029, + 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, + 0x7dbc, 0x080c, 0xeeb1, 0xd5a4, 0x1118, 0x080c, 0x1648, 0x0005, + 0x080c, 0x82b8, 0x080c, 0x1b1e, 0x0005, 0x781f, 0x0300, 0x7803, + 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, + 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, + 0x080c, 0x16b9, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, + 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0d85, + 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, + 0x1723, 0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x080c, 0x1648, 0x0005, 0x81ff, 0x190c, 0x0d85, 0x0005, + 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, + 0x1612, 0x2071, 0x0200, 0x080c, 0x1710, 0x05e0, 0x080c, 0x1723, + 0x05b0, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa864, 0x009e, + 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550, + 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x17ad, 0x00fe, + 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x1942, 0x00fe, 0x2009, 0x01f4, + 0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, + 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x1648, 0x0040, 0x2001, + 0x020d, 0x2003, 0x0020, 0x080c, 0x1366, 0x7803, 0x0001, 0x00ee, + 0x001e, 0x0005, 0x080c, 0x1723, 0x0dd0, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0461, 0x0c90, 0x0429, 0x2060, 0x2009, + 0x0053, 0x080c, 0xb20a, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, + 0x00d1, 0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x92d5, + 0x0005, 0x0089, 0x9005, 0x0118, 0x080c, 0x8ed9, 0x0cd0, 0x0005, + 0x2001, 0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, + 0x080c, 0x16b9, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, + 0x080c, 0x1592, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, + 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, + 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, + 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, + 0x810c, 0x080c, 0x16ab, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x04d9, + 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, 0xd0e4, + 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, 0x08c0, + 0x080c, 0x82b8, 0x080c, 0x1b1e, 0x0090, 0x7827, 0x0015, 0x782b, + 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, 0x2003, + 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, 0x00de, + 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, 0x7827, + 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, 0x1800, + 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, 0x0005, + 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, + 0x0005, 0x00f6, 0x00e6, 0x2079, 0x0300, 0x0006, 0x2071, 0x1a6e, + 0x7008, 0x9005, 0x1110, 0x78e3, 0x0c0c, 0x8000, 0x700a, 0x0026, + 0x2011, 0x0006, 0x7808, 0xd09c, 0x0150, 0x0016, 0x0026, 0x00c6, + 0x080c, 0x13d4, 0x00ce, 0x002e, 0x001e, 0x8211, 0x1d98, 0x002e, + 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x00b9, + 0x1178, 0x2071, 0x1a6e, 0x7008, 0x9005, 0x0130, 0x8001, 0x0a0c, + 0x0d85, 0x700a, 0x78e3, 0x0c00, 0x000e, 0x00ee, 0x00fe, 0x0005, + 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d85, 0x2009, + 0xff00, 0x8109, 0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005, 0x9085, + 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0c79, + 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, 0x0d85, + 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, 0x2060, 0xd1bc, + 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, + 0x9085, 0x0001, 0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, + 0x7037, 0x0002, 0x7058, 0x9084, 0xff00, 0x8007, 0x9086, 0x00bc, + 0x1158, 0x2021, 0x1a7e, 0x2404, 0x8000, 0x0208, 0x2022, 0x080c, + 0x82b8, 0x080c, 0x1b1e, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, + 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016, 0x2071, 0x0200, 0x0841, + 0x6124, 0xd1dc, 0x01f8, 0x701c, 0xd08c, 0x0904, 0x17a2, 0x7017, + 0x0000, 0x2001, 0x0264, 0x2004, 0xd0bc, 0x0904, 0x17a2, 0x2001, + 0x0268, 0x00c6, 0x2064, 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, + 0x1904, 0x17a2, 0x9c06, 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, + 0x8210, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, + 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x190c, 0xd2f9, + 0xab42, 0xac3e, 0x2001, 0x1869, 0x2004, 0xd0b4, 0x1170, 0x601c, + 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, + 0x1120, 0xa83b, 0x7fff, 0xa837, 0xffff, 0x080c, 0x1ee1, 0x1190, + 0x080c, 0x199f, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, + 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, + 0x00ee, 0x0005, 0x7037, 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, + 0x080c, 0x1648, 0x0005, 0x080c, 0x0d85, 0x2001, 0x180d, 0x2004, + 0xd08c, 0x190c, 0x6ccc, 0x2cf0, 0x0126, 0x2091, 0x2200, 0x0016, + 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, + 0x2068, 0xa81a, 0x9d84, 0x000f, 0x9088, 0x1ec1, 0x2165, 0x0002, + 0x17df, 0x184d, 0x17df, 0x17df, 0x17e3, 0x182e, 0x17df, 0x1803, + 0x17d8, 0x1844, 0x17df, 0x17df, 0x17e8, 0x193a, 0x1817, 0x180d, + 0xa964, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0904, 0x1844, 0x9085, + 0x0001, 0x0804, 0x1930, 0xa87c, 0xd0ac, 0x0dc8, 0x0804, 0x1854, + 0xa87c, 0xd0ac, 0x0da0, 0x0804, 0x18bf, 0xa898, 0x901d, 0x1108, + 0xab9c, 0x9016, 0xaab2, 0xaa3e, 0xaa42, 0x3e00, 0x9080, 0x0008, + 0x2004, 0x9080, 0x9536, 0x2005, 0x9005, 0x090c, 0x0d85, 0x2004, + 0xa8ae, 0x0804, 0x1918, 0xa87c, 0xd0bc, 0x09c8, 0xa890, 0xa842, + 0xa88c, 0xa83e, 0xa888, 0x0804, 0x1854, 0xa87c, 0xd0bc, 0x0978, + 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, 0x0804, 0x18bf, 0xa87c, + 0xd0bc, 0x0928, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, + 0x090c, 0x0d85, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1ec1, + 0x2065, 0xa888, 0xd19c, 0x1904, 0x18bf, 0x0430, 0xa87c, 0xd0ac, + 0x0904, 0x17df, 0xa804, 0x9045, 0x090c, 0x0d85, 0xa164, 0xa91a, + 0x91ec, 0x000f, 0x9d80, 0x1ec1, 0x2065, 0x9006, 0xa842, 0xa83e, + 0xd19c, 0x1904, 0x18bf, 0x0080, 0xa87c, 0xd0ac, 0x0904, 0x17df, + 0x9006, 0xa842, 0xa83e, 0x0804, 0x18bf, 0xa87c, 0xd0ac, 0x0904, + 0x17df, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0036, 0x1a0c, + 0x0d85, 0x9082, 0x001b, 0x0002, 0x1877, 0x1877, 0x1879, 0x1877, + 0x1877, 0x1877, 0x1883, 0x1877, 0x1877, 0x1877, 0x188d, 0x1877, + 0x1877, 0x1877, 0x1897, 0x1877, 0x1877, 0x1877, 0x18a1, 0x1877, + 0x1877, 0x1877, 0x18ab, 0x1877, 0x1877, 0x1877, 0x18b5, 0x080c, + 0x0d85, 0xa574, 0xa478, 0x9d86, 0x0024, 0x0904, 0x17ed, 0xa37c, + 0xa280, 0x0804, 0x1918, 0xa584, 0xa488, 0x9d86, 0x0024, 0x0904, + 0x17ed, 0xa38c, 0xa290, 0x0804, 0x1918, 0xa594, 0xa498, 0x9d86, + 0x0024, 0x0904, 0x17ed, 0xa39c, 0xa2a0, 0x0804, 0x1918, 0xa5a4, + 0xa4a8, 0x9d86, 0x0024, 0x0904, 0x17ed, 0xa3ac, 0xa2b0, 0x0804, + 0x1918, 0xa5b4, 0xa4b8, 0x9d86, 0x0024, 0x0904, 0x17ed, 0xa3bc, + 0xa2c0, 0x0804, 0x1918, 0xa5c4, 0xa4c8, 0x9d86, 0x0024, 0x0904, + 0x17ed, 0xa3cc, 0xa2d0, 0x0804, 0x1918, 0xa5d4, 0xa4d8, 0x9d86, + 0x0024, 0x0904, 0x17ed, 0xa3dc, 0xa2e0, 0x0804, 0x1918, 0x2c05, + 0x908a, 0x0034, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x18e2, + 0x18e0, 0x18e0, 0x18e0, 0x18e0, 0x18e0, 0x18ed, 0x18e0, 0x18e0, + 0x18e0, 0x18e0, 0x18e0, 0x18f8, 0x18e0, 0x18e0, 0x18e0, 0x18e0, + 0x18e0, 0x1903, 0x18e0, 0x18e0, 0x18e0, 0x18e0, 0x18e0, 0x190e, + 0x080c, 0x0d85, 0xa56c, 0xa470, 0xa774, 0xa678, 0x9d86, 0x002c, + 0x0904, 0x17ed, 0xa37c, 0xa280, 0x0458, 0xa584, 0xa488, 0xa78c, + 0xa690, 0x9d86, 0x002c, 0x0904, 0x17ed, 0xa394, 0xa298, 0x0400, + 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0x9d86, 0x002c, 0x0904, 0x17ed, + 0xa3ac, 0xa2b0, 0x00a8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0x9d86, + 0x002c, 0x0904, 0x17ed, 0xa3c4, 0xa2c8, 0x0050, 0xa5cc, 0xa4d0, + 0xa7d4, 0xa6d8, 0x9d86, 0x002c, 0x0904, 0x17ed, 0xa3dc, 0xa2e0, + 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8c60, + 0x2c1d, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x8109, 0xa916, 0x1160, + 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, + 0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, 0xa80e, 0xab0a, 0x2c00, + 0xa812, 0x0c70, 0x0804, 0x17df, 0x2001, 0x180d, 0x2004, 0xd08c, + 0x190c, 0x6ccc, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, + 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, 0x1ebc, 0xa813, + 0x1ebc, 0x2c05, 0xa80a, 0xa964, 0xa91a, 0xa87c, 0xd0ac, 0x090c, + 0x0d85, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, 0x0034, 0x1a0c, + 0x0d85, 0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, 0xaae0, 0xab2e, + 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, 0xaab0, 0xa836, + 0xaa3a, 0xa988, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0008, 0x1120, + 0x8109, 0xa916, 0x0128, 0x0080, 0x918a, 0x0002, 0xa916, 0x1160, + 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, + 0x00ce, 0x001e, 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0d85, + 0xa80e, 0xa064, 0xa81a, 0x9084, 0x000f, 0x9080, 0x1ec1, 0x2015, + 0x82ff, 0x090c, 0x0d85, 0xaa12, 0x2205, 0xa80a, 0x0c08, 0x903e, + 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1a94, 0x19f6, + 0x19f6, 0x1a94, 0x1a94, 0x1a8e, 0x1a94, 0x19f6, 0x1a45, 0x1a45, + 0x1a45, 0x1a94, 0x1a94, 0x1a94, 0x1a8b, 0x1a45, 0xc0fc, 0xa882, + 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1a96, 0x2c05, + 0x908a, 0x0034, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x19e2, + 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e6, 0x19e0, 0x19e0, + 0x19e0, 0x19e0, 0x19e0, 0x19ea, 0x19e0, 0x19e0, 0x19e0, 0x19e0, + 0x19e0, 0x19ee, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19e0, 0x19f2, + 0x080c, 0x0d85, 0xa774, 0xa678, 0x0804, 0x1a96, 0xa78c, 0xa690, + 0x0804, 0x1a96, 0xa7a4, 0xa6a8, 0x0804, 0x1a96, 0xa7bc, 0xa6c0, + 0x0804, 0x1a96, 0xa7d4, 0xa6d8, 0x0804, 0x1a96, 0x2c05, 0x908a, + 0x0036, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x1a19, 0x1a19, + 0x1a1b, 0x1a19, 0x1a19, 0x1a19, 0x1a21, 0x1a19, 0x1a19, 0x1a19, + 0x1a27, 0x1a19, 0x1a19, 0x1a19, 0x1a2d, 0x1a19, 0x1a19, 0x1a19, + 0x1a33, 0x1a19, 0x1a19, 0x1a19, 0x1a39, 0x1a19, 0x1a19, 0x1a19, + 0x1a3f, 0x080c, 0x0d85, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, + 0x1a96, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x1a96, 0xa594, + 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1a96, 0xa5a4, 0xa4a8, 0xa3ac, + 0xa2b0, 0x0804, 0x1a96, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, + 0x1a96, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1a96, 0xa5d4, + 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1a96, 0x2c05, 0x908a, 0x0034, + 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x1a68, 0x1a66, 0x1a66, + 0x1a66, 0x1a66, 0x1a66, 0x1a6f, 0x1a66, 0x1a66, 0x1a66, 0x1a66, + 0x1a66, 0x1a76, 0x1a66, 0x1a66, 0x1a66, 0x1a66, 0x1a66, 0x1a7d, + 0x1a66, 0x1a66, 0x1a66, 0x1a66, 0x1a66, 0x1a84, 0x080c, 0x0d85, + 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, + 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, + 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, + 0xa6c0, 0xa3c4, 0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, + 0xa3dc, 0xa2e0, 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1e97, + 0x1904, 0x199f, 0x900e, 0x0050, 0x080c, 0x0d85, 0xab2e, 0xaa32, + 0xad1e, 0xac22, 0xaf26, 0xae2a, 0x080c, 0x1e97, 0x0005, 0x6014, + 0x2048, 0x6118, 0x81ff, 0x0148, 0x810c, 0x810c, 0x810c, 0x81ff, + 0x1118, 0xa887, 0x0001, 0x0008, 0xa986, 0x601b, 0x0002, 0xa874, + 0x9084, 0x00ff, 0x9084, 0x0008, 0x0150, 0x00e9, 0x6000, 0x9086, + 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0xb20a, 0x0005, 0xa974, + 0xd1dc, 0x1108, 0x0005, 0xa934, 0xa88c, 0x9106, 0x1158, 0xa938, + 0xa890, 0x9106, 0x1138, 0x601c, 0xc084, 0x601e, 0x2009, 0x0048, + 0x0804, 0xb20a, 0x0005, 0x0126, 0x00c6, 0x2091, 0x2200, 0x00ce, + 0x7908, 0x918c, 0x0007, 0x9186, 0x0000, 0x05b0, 0x9186, 0x0003, + 0x0598, 0x6020, 0x6023, 0x0000, 0x0006, 0x2031, 0x0008, 0x00c6, + 0x781f, 0x0808, 0x7808, 0xd09c, 0x0120, 0x080c, 0x13d4, 0x8631, + 0x1db8, 0x00ce, 0x781f, 0x0800, 0x2031, 0x0168, 0x00c6, 0x7808, + 0xd09c, 0x190c, 0x13d4, 0x00ce, 0x2001, 0x0038, 0x080c, 0x1bae, + 0x7930, 0x9186, 0x0040, 0x0160, 0x9186, 0x0042, 0x190c, 0x0d85, + 0x2001, 0x001e, 0x8001, 0x1df0, 0x8631, 0x1d40, 0x080c, 0x1bbd, + 0x000e, 0x6022, 0x012e, 0x0005, 0x080c, 0x1baa, 0x7827, 0x0015, + 0x7828, 0x9c06, 0x1db8, 0x782b, 0x0000, 0x0ca0, 0x00f6, 0x2079, + 0x0300, 0x7803, 0x0000, 0x78ab, 0x0004, 0x2001, 0xf000, 0x8001, + 0x090c, 0x0d85, 0x7aac, 0xd2ac, 0x1dd0, 0x00fe, 0x080c, 0x779e, + 0x1188, 0x2001, 0x0138, 0x2003, 0x0000, 0x2001, 0x0160, 0x2003, + 0x0000, 0x2011, 0x012c, 0xa001, 0xa001, 0x8211, 0x1de0, 0x0059, + 0x0804, 0x7840, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502, 0x2001, + 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, 0x2a8b, + 0x2009, 0x003c, 0x080c, 0x2220, 0x2001, 0x015d, 0x2003, 0x0000, + 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x8899, 0x70a0, 0x70a2, + 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003, 0x0020, + 0x00f6, 0x2079, 0x0300, 0x080c, 0x1366, 0x7803, 0x0001, 0x00fe, + 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, + 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x779e, 0x1108, 0x0005, + 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, + 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111, 0x201c, + 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, 0x0000, + 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001, 0xa001, + 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, 0x0c60, + 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, 0x621c, + 0x080c, 0x16b9, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, 0x1702, + 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0064, 0x781c, + 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, 0x0040, + 0x0904, 0x1c1b, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, 0x080c, + 0x0d85, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, + 0x0dac, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, 0x2001, + 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084, 0x1da8, + 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037, 0x0821, + 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1bb4, 0x9186, + 0x0040, 0x190c, 0x0d85, 0x00d6, 0x2069, 0x0200, 0x692c, 0xd1f4, + 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, 0x1800, + 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, 0x00de, + 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0d85, 0xa001, + 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400, 0x2079, + 0x0380, 0x2001, 0x19e8, 0x2070, 0x012e, 0x0005, 0x2cf0, 0x0126, + 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa964, 0xa91a, 0x918c, + 0x00ff, 0x9184, 0x000f, 0x0002, 0x1c50, 0x1c50, 0x1c50, 0x1c52, + 0x1c50, 0x1c50, 0x1c50, 0x1c50, 0x1c44, 0x1c5a, 0x1c50, 0x1c56, + 0x1c50, 0x1c50, 0x1c50, 0x1c50, 0x9086, 0x0008, 0x1148, 0xa87c, + 0xd0b4, 0x0904, 0x1dca, 0x2011, 0x1ebc, 0x2205, 0xab88, 0x00a8, + 0x080c, 0x0d85, 0x9186, 0x0013, 0x0128, 0x0cd0, 0x9186, 0x001b, + 0x0108, 0x0cb0, 0xa87c, 0xd0b4, 0x0904, 0x1dca, 0x9184, 0x000f, + 0x9080, 0x1ec1, 0x2015, 0x2205, 0xab88, 0x2908, 0xa80a, 0xa90e, + 0xaa12, 0xab16, 0x9006, 0xa842, 0xa83e, 0x012e, 0x0005, 0x2cf0, + 0x0126, 0x2091, 0x2400, 0x3e60, 0x6014, 0x2048, 0xa88c, 0xa990, + 0xaaac, 0xabb0, 0xaa36, 0xab3a, 0xa83e, 0xa942, 0xa846, 0xa94a, + 0xa964, 0x918c, 0x00ff, 0x9186, 0x001e, 0x0198, 0x2940, 0xa064, + 0xa81a, 0x90ec, 0x000f, 0x9d80, 0x1ec1, 0x2065, 0x2c05, 0x2808, + 0x2c10, 0xab88, 0xa80a, 0xa90e, 0xaa12, 0xab16, 0x012e, 0x3e60, + 0x0005, 0xa804, 0x2040, 0x0c58, 0x2cf0, 0x0126, 0x2091, 0x2400, + 0x3e60, 0x6014, 0x2048, 0xa97c, 0x2950, 0xd1dc, 0x1904, 0x1d94, + 0xc1dd, 0xa97e, 0x9006, 0xa842, 0xa83e, 0xa988, 0x8109, 0xa916, + 0xa964, 0xa91a, 0x9184, 0x000f, 0x9088, 0x1ec1, 0x2145, 0x0002, + 0x1cc8, 0x1cd6, 0x1cc8, 0x1cc8, 0x1cc8, 0x1cca, 0x1cc8, 0x1cc8, + 0x1d2b, 0x1d2b, 0x1cc8, 0x1cc8, 0x1cc8, 0x1d29, 0x1cc8, 0x1cc8, + 0x080c, 0x0d85, 0xa804, 0x2050, 0xb164, 0xa91a, 0x9184, 0x000f, + 0x9080, 0x1ec1, 0x2045, 0xd19c, 0x1904, 0x1d2b, 0x9036, 0x2638, + 0x2805, 0x908a, 0x0036, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, + 0x1cfb, 0x1cfb, 0x1cfd, 0x1cfb, 0x1cfb, 0x1cfb, 0x1d03, 0x1cfb, + 0x1cfb, 0x1cfb, 0x1d09, 0x1cfb, 0x1cfb, 0x1cfb, 0x1d0f, 0x1cfb, + 0x1cfb, 0x1cfb, 0x1d15, 0x1cfb, 0x1cfb, 0x1cfb, 0x1d1b, 0x1cfb, + 0x1cfb, 0x1cfb, 0x1d21, 0x080c, 0x0d85, 0xb574, 0xb478, 0xb37c, + 0xb280, 0x0804, 0x1d70, 0xb584, 0xb488, 0xb38c, 0xb290, 0x0804, + 0x1d70, 0xb594, 0xb498, 0xb39c, 0xb2a0, 0x0804, 0x1d70, 0xb5a4, + 0xb4a8, 0xb3ac, 0xb2b0, 0x0804, 0x1d70, 0xb5b4, 0xb4b8, 0xb3bc, + 0xb2c0, 0x0804, 0x1d70, 0xb5c4, 0xb4c8, 0xb3cc, 0xb2d0, 0x0804, + 0x1d70, 0xb5d4, 0xb4d8, 0xb3dc, 0xb2e0, 0x0804, 0x1d70, 0x0804, + 0x1d70, 0x080c, 0x0d85, 0x2805, 0x908a, 0x0034, 0x1a0c, 0x0d85, + 0x9082, 0x001b, 0x0002, 0x1d4e, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d4c, + 0x1d4c, 0x1d55, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d5c, + 0x1d4c, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d4c, 0x1d63, 0x1d4c, 0x1d4c, + 0x1d4c, 0x1d4c, 0x1d4c, 0x1d6a, 0x080c, 0x0d85, 0xb56c, 0xb470, + 0xb774, 0xb678, 0xb37c, 0xb280, 0x00d8, 0xb584, 0xb488, 0xb78c, + 0xb690, 0xb394, 0xb298, 0x00a0, 0xb59c, 0xb4a0, 0xb7a4, 0xb6a8, + 0xb3ac, 0xb2b0, 0x0068, 0xb5b4, 0xb4b8, 0xb7bc, 0xb6c0, 0xb3c4, + 0xb2c8, 0x0030, 0xb5cc, 0xb4d0, 0xb7d4, 0xb6d8, 0xb3dc, 0xb2e0, + 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa988, 0x8109, + 0xa916, 0x1118, 0x9006, 0x012e, 0x0005, 0x8840, 0x2805, 0x9005, + 0x1168, 0xb004, 0x9005, 0x090c, 0x0d85, 0x2050, 0xb164, 0xa91a, + 0x9184, 0x000f, 0x9080, 0x1ec1, 0x2045, 0x2805, 0x2810, 0x2a08, + 0xa80a, 0xa90e, 0xaa12, 0x0c30, 0x3e60, 0x6344, 0xd3fc, 0x190c, + 0x0d85, 0xa93c, 0xaa40, 0xa844, 0x9106, 0x1118, 0xa848, 0x9206, + 0x0508, 0x2958, 0xab48, 0xac44, 0x2940, 0x080c, 0x1ee1, 0x1998, + 0x2850, 0x2c40, 0xab14, 0xa880, 0xd0fc, 0x1140, 0xa810, 0x2005, + 0xa80a, 0x2a00, 0xa80e, 0x2009, 0x8015, 0x0070, 0x00c6, 0x3e60, + 0x6044, 0xc0a4, 0x9085, 0x8005, 0x6046, 0x00ce, 0x8319, 0xab16, + 0x1904, 0x1d7d, 0x2009, 0x8005, 0x3e60, 0x6044, 0x9105, 0x6046, + 0x0804, 0x1d7a, 0x080c, 0x0d85, 0x00f6, 0x00e6, 0x0096, 0x00c6, + 0x0026, 0x704c, 0x9c06, 0x190c, 0x0d85, 0x2079, 0x0090, 0x2001, + 0x0105, 0x2003, 0x0010, 0x782b, 0x0004, 0x7057, 0x0000, 0x6014, + 0x2048, 0x080c, 0xcf1b, 0x0118, 0xa880, 0xc0bd, 0xa882, 0x6020, + 0x9086, 0x0006, 0x1170, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, + 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, 0x60c8, + 0xa896, 0x704c, 0x2060, 0x00c6, 0x080c, 0xcae9, 0x080c, 0xacfc, + 0x00ce, 0x704c, 0x9c06, 0x1150, 0x2009, 0x0040, 0x080c, 0x2220, + 0x080c, 0xa7a1, 0x2011, 0x0000, 0x080c, 0xa635, 0x002e, 0x00ce, + 0x009e, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0090, 0x781c, + 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, + 0x9085, 0x0012, 0x7816, 0x2019, 0x1000, 0x8319, 0x090c, 0x0d85, + 0x7820, 0xd0bc, 0x1dd0, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, + 0x0016, 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, + 0x1984, 0x9085, 0x0012, 0x7816, 0x2079, 0x0090, 0x782b, 0x0008, + 0x7057, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x19e8, + 0x7054, 0x9086, 0x0000, 0x0904, 0x1e92, 0x2079, 0x0090, 0x2009, + 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, + 0x0003, 0x0188, 0x080c, 0xeefa, 0x2001, 0x0133, 0x2004, 0x9005, + 0x090c, 0x0d85, 0x0016, 0x2009, 0x0040, 0x080c, 0x2220, 0x001e, + 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, + 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x2220, 0x782c, + 0xd0fc, 0x09a8, 0x080c, 0xad18, 0x782c, 0xd0fc, 0x1de8, 0x080c, + 0xacfc, 0x7054, 0x9086, 0x0000, 0x1950, 0x782b, 0x0004, 0x782c, + 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2220, 0x782b, 0x0002, + 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x080c, 0x0d85, 0x8c60, + 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005, 0x0168, + 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1ec1, 0x2065, + 0x8cff, 0x090c, 0x0d85, 0x8a51, 0x0005, 0x2050, 0x0005, 0x0000, + 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, 0x0000, + 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, 0x0023, + 0x0000, 0x0000, 0x1eb4, 0x1eb0, 0x1eb4, 0x1eb4, 0x1ebe, 0x0000, + 0x1eb4, 0x1ebb, 0x1ebb, 0x1eb8, 0x1ebb, 0x1ebb, 0x0000, 0x1ebe, + 0x1ebb, 0x0000, 0x1eb6, 0x1eb6, 0x0000, 0x1eb6, 0x1ebe, 0x0000, + 0x1eb6, 0x1ebc, 0x1ebc, 0x1ebc, 0x0000, 0x1ebc, 0x0000, 0x1ebe, + 0x1ebc, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, 0x9055, + 0x0904, 0x20c0, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9084, 0x00ff, + 0x9086, 0x0008, 0x1118, 0x2061, 0x1ebc, 0x00d0, 0x9de0, 0x1ec1, + 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, 0x000f, + 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, 0x1140, + 0x0310, 0x0804, 0x20c0, 0xa004, 0x9045, 0x0904, 0x20c0, 0x08d8, + 0x2c05, 0x9005, 0x0904, 0x1fa8, 0xdd9c, 0x1904, 0x1f64, 0x908a, + 0x0036, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x1f39, 0x1f39, + 0x1f3b, 0x1f39, 0x1f39, 0x1f39, 0x1f41, 0x1f39, 0x1f39, 0x1f39, + 0x1f47, 0x1f39, 0x1f39, 0x1f39, 0x1f4d, 0x1f39, 0x1f39, 0x1f39, + 0x1f53, 0x1f39, 0x1f39, 0x1f39, 0x1f59, 0x1f39, 0x1f39, 0x1f39, + 0x1f5f, 0x080c, 0x0d85, 0xa07c, 0x9422, 0xa080, 0x931b, 0x0804, + 0x1f9e, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x1f9e, 0xa09c, + 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1f9e, 0xa0ac, 0x9422, 0xa0b0, + 0x931b, 0x0804, 0x1f9e, 0xa0bc, 0x9422, 0xa0c0, 0x931b, 0x0804, + 0x1f9e, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x1f9e, 0xa0dc, + 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, 0x0d85, + 0x9082, 0x001b, 0x0002, 0x1f86, 0x1f84, 0x1f84, 0x1f84, 0x1f84, + 0x1f84, 0x1f8b, 0x1f84, 0x1f84, 0x1f84, 0x1f84, 0x1f84, 0x1f90, + 0x1f84, 0x1f84, 0x1f84, 0x1f84, 0x1f84, 0x1f95, 0x1f84, 0x1f84, + 0x1f84, 0x1f84, 0x1f84, 0x1f9a, 0x080c, 0x0d85, 0xa07c, 0x9422, + 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, 0x0070, + 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, 0xa0c8, + 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, 0x2300, + 0x9405, 0x0160, 0x8a51, 0x0904, 0x20c0, 0x8c60, 0x0804, 0x1f10, + 0xa004, 0x9045, 0x0904, 0x20c0, 0x0804, 0x1eeb, 0x8a51, 0x0904, + 0x20c0, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, 0x0904, + 0x20c0, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1ec1, 0x2c05, 0x2060, + 0xa880, 0xc0fc, 0xa882, 0x0804, 0x20b5, 0x2c05, 0x8422, 0x8420, + 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, 0x2052, + 0x9082, 0x001b, 0x0002, 0x1fee, 0x1fee, 0x1ff0, 0x1fee, 0x1fee, + 0x1fee, 0x1ffe, 0x1fee, 0x1fee, 0x1fee, 0x200c, 0x1fee, 0x1fee, + 0x1fee, 0x201a, 0x1fee, 0x1fee, 0x1fee, 0x2028, 0x1fee, 0x1fee, + 0x1fee, 0x2036, 0x1fee, 0x1fee, 0x1fee, 0x2044, 0x080c, 0x0d85, + 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0d85, + 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x20b0, 0xa18c, 0x2400, + 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa084, 0x9420, + 0xa088, 0x9319, 0x0804, 0x20b0, 0xa19c, 0x2400, 0x9122, 0xa1a0, + 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa094, 0x9420, 0xa098, 0x9319, + 0x0804, 0x20b0, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, + 0x0a0c, 0x0d85, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, 0x20b0, + 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, 0x0d85, + 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x20b0, 0xa1cc, 0x2400, + 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa0c4, 0x9420, + 0xa0c8, 0x9319, 0x0804, 0x20b0, 0xa1dc, 0x2400, 0x9122, 0xa1e0, + 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa0d4, 0x9420, 0xa0d8, 0x9319, + 0x0804, 0x20b0, 0x9082, 0x001b, 0x0002, 0x2070, 0x206e, 0x206e, + 0x206e, 0x206e, 0x206e, 0x207d, 0x206e, 0x206e, 0x206e, 0x206e, + 0x206e, 0x208a, 0x206e, 0x206e, 0x206e, 0x206e, 0x206e, 0x2097, + 0x206e, 0x206e, 0x206e, 0x206e, 0x206e, 0x20a4, 0x080c, 0x0d85, + 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, 0x0d85, + 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, 0x9122, + 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa084, 0x9420, 0xa088, + 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, 0x911b, + 0x0a0c, 0x0d85, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, 0xa1c4, + 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa0b4, + 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, 0xa1e0, + 0x2300, 0x911b, 0x0a0c, 0x0d85, 0xa0cc, 0x9420, 0xa0d0, 0x9319, + 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, 0x2c00, + 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, 0x0028, + 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x00c6, 0x610c, + 0x0016, 0x9026, 0x2410, 0x6004, 0x9420, 0x9291, 0x0000, 0x2c04, + 0x9210, 0x9ce0, 0x0002, 0x918a, 0x0002, 0x1da8, 0x9284, 0x000f, + 0x9405, 0x001e, 0x00ce, 0x0005, 0x7803, 0x0003, 0x780f, 0x0000, + 0x6004, 0x7812, 0x2c04, 0x7816, 0x9ce0, 0x0002, 0x918a, 0x0002, + 0x1db8, 0x0005, 0x2001, 0x0005, 0x2004, 0xd0bc, 0x190c, 0x0d7e, + 0xd094, 0x0110, 0x080c, 0x1208, 0x0005, 0x0126, 0x2091, 0x2600, + 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, 0x1800, 0x7817, 0x0000, + 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, 0x0410, 0x2009, 0x013b, + 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, 0x001f, 0x7837, 0x0020, + 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, 0x2600, 0x781c, 0xd0a4, + 0x190c, 0x221d, 0x7900, 0xd1dc, 0x1118, 0x9084, 0x0006, 0x001a, + 0x9084, 0x000e, 0x0002, 0x213b, 0x2133, 0x8210, 0x2133, 0x2135, + 0x2135, 0x2135, 0x2135, 0x81f6, 0x2133, 0x2137, 0x2133, 0x2135, + 0x2133, 0x2135, 0x2133, 0x080c, 0x0d85, 0x0031, 0x0020, 0x080c, + 0x81f6, 0x080c, 0x8210, 0x0005, 0x0006, 0x0016, 0x0026, 0x080c, + 0xeefa, 0x7930, 0x9184, 0x0003, 0x0510, 0x080c, 0xacfc, 0x2001, + 0x19fb, 0x2004, 0x9005, 0x01a0, 0x2001, 0x0133, 0x2004, 0x9005, + 0x090c, 0x0d85, 0x00c6, 0x2001, 0x19fb, 0x2064, 0x080c, 0xad18, + 0x080c, 0xcae9, 0x2009, 0x0040, 0x080c, 0x2220, 0x00ce, 0x0408, + 0x2009, 0x0040, 0x080c, 0x2220, 0x080c, 0xad18, 0x00d0, 0x9184, + 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, 0x779e, + 0x1138, 0x080c, 0x7ab6, 0x080c, 0x619d, 0x080c, 0x76cd, 0x0010, + 0x080c, 0x6058, 0x080c, 0x82ae, 0x0041, 0x0018, 0x9184, 0x9540, + 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, 0x0046, + 0x0056, 0x2071, 0x1a6e, 0x080c, 0x1b1e, 0x005e, 0x004e, 0x003e, + 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, 0x7128, + 0x2001, 0x196f, 0x2102, 0x2001, 0x1977, 0x2102, 0x2001, 0x013b, + 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, 0x0200, + 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, 0x2320, + 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, 0x8423, + 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, 0x8003, + 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, 0x2011, + 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, 0x034c, + 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, 0x9182, + 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, 0x9182, + 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, 0x2011, + 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, 0x9402, + 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, 0x012e, + 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, 0xffc0, + 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, 0x0200, + 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, 0x00de, + 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, 0xfff8, + 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, 0x0d7e, + 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, + 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, + 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, 0x0100, + 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x2a85, 0x080c, 0x299b, + 0x2001, 0x199d, 0x2003, 0x0700, 0x2001, 0x199e, 0x2003, 0x0700, + 0x080c, 0x2af6, 0x9006, 0x080c, 0x29ca, 0x9006, 0x080c, 0x29ad, + 0x20a9, 0x0012, 0x1d04, 0x2252, 0x2091, 0x6000, 0x1f04, 0x2252, + 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, + 0xdfff, 0x6052, 0x6224, 0x080c, 0x2ad3, 0x080c, 0x26c5, 0x2009, + 0x00ef, 0x6132, 0x6136, 0x080c, 0x26d5, 0x60e7, 0x0000, 0x61ea, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1110, 0x2001, + 0x0008, 0x60e2, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, + 0x602f, 0x0000, 0x6007, 0x349f, 0x00c6, 0x2061, 0x0140, 0x608b, + 0x000b, 0x608f, 0x10b8, 0x6093, 0x0000, 0x6097, 0x0198, 0x00ce, + 0x6004, 0x9085, 0x8000, 0x6006, 0x60bb, 0x0000, 0x20a9, 0x0018, + 0x60bf, 0x0000, 0x1f04, 0x2298, 0x60bb, 0x0000, 0x60bf, 0x0108, + 0x60bf, 0x0012, 0x60bf, 0x0405, 0x60bf, 0x0014, 0x60bf, 0x0320, + 0x60bf, 0x0018, 0x601b, 0x00f0, 0x601f, 0x001e, 0x600f, 0x006b, + 0x602b, 0x402c, 0x012e, 0x0005, 0x00f6, 0x2079, 0x0140, 0x78c3, + 0x0080, 0x78c3, 0x0083, 0x78c3, 0x0000, 0x00fe, 0x0005, 0x2001, + 0x1835, 0x2003, 0x0000, 0x2001, 0x1834, 0x2003, 0x0001, 0x0005, + 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, 0x6028, + 0x910c, 0x0066, 0x2031, 0x1837, 0x2634, 0x96b4, 0x0028, 0x006e, + 0x1138, 0x6020, 0xd1bc, 0x0120, 0xd0bc, 0x1168, 0xd0b4, 0x1198, + 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, 0x00aa, 0x9195, 0x0004, + 0x9284, 0x0007, 0x0082, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1a4, + 0x001e, 0x0d70, 0x0c98, 0x0016, 0x2001, 0x0387, 0x200c, 0xd1b4, + 0x001e, 0x0d30, 0x0c58, 0x2306, 0x2303, 0x2303, 0x2303, 0x2305, + 0x2303, 0x2303, 0x2303, 0x080c, 0x0d85, 0x0029, 0x002e, 0x001e, + 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, 0xd09c, 0x0118, + 0xd19c, 0x1904, 0x258b, 0xd1f4, 0x190c, 0x0d7e, 0x080c, 0x779e, + 0x0904, 0x2363, 0x080c, 0xd645, 0x1120, 0x7000, 0x9086, 0x0003, + 0x0580, 0x6024, 0x9084, 0x1800, 0x0560, 0x080c, 0x77c1, 0x0118, + 0x080c, 0x77af, 0x1530, 0x2011, 0x0020, 0x080c, 0x2ad3, 0x6043, + 0x0000, 0x080c, 0xd645, 0x0168, 0x080c, 0x77c1, 0x1150, 0x2001, + 0x19a8, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x7612, 0x0804, + 0x258e, 0x70a4, 0x9005, 0x1150, 0x70a7, 0x0001, 0x00d6, 0x2069, + 0x0140, 0x080c, 0x77f2, 0x00de, 0x1904, 0x258e, 0x080c, 0x7ac0, + 0x0428, 0x080c, 0x77c1, 0x1590, 0x6024, 0x9084, 0x1800, 0x1108, + 0x0468, 0x080c, 0x7ac0, 0x080c, 0x7ab6, 0x080c, 0x619d, 0x080c, + 0x76cd, 0x0804, 0x258b, 0xd1ac, 0x1508, 0x6024, 0xd0dc, 0x1170, + 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7098, 0x9086, + 0x0029, 0x1110, 0x080c, 0x7990, 0x0804, 0x258b, 0x080c, 0x7abb, + 0x0048, 0x2001, 0x197d, 0x2003, 0x0002, 0x0020, 0x080c, 0x78e4, + 0x0804, 0x258b, 0x080c, 0x7a3a, 0x0804, 0x258b, 0x6220, 0xd1bc, + 0x0138, 0xd2bc, 0x1904, 0x25f6, 0xd2b4, 0x1904, 0x2608, 0x0000, + 0xd1ac, 0x0904, 0x2498, 0x0036, 0x6328, 0xc3bc, 0x632a, 0x003e, + 0x080c, 0x779e, 0x11d0, 0x2011, 0x0020, 0x080c, 0x2ad3, 0x0006, + 0x0026, 0x0036, 0x080c, 0x77b8, 0x1158, 0x080c, 0x7ab6, 0x080c, + 0x619d, 0x080c, 0x76cd, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005, + 0x003e, 0x002e, 0x000e, 0x080c, 0x7772, 0x0016, 0x0046, 0x00c6, + 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043, + 0x0090, 0x6043, 0x0010, 0x74da, 0x948c, 0xff00, 0x7038, 0xd084, + 0x0190, 0x080c, 0xd645, 0x1118, 0x9186, 0xf800, 0x1160, 0x7048, + 0xd084, 0x1148, 0xc085, 0x704a, 0x0036, 0x2418, 0x2011, 0x8016, + 0x080c, 0x4ca1, 0x003e, 0x080c, 0xd63e, 0x1904, 0x246d, 0x9196, + 0xff00, 0x05a8, 0x7060, 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, + 0x9116, 0x0568, 0x7130, 0xd184, 0x1550, 0x080c, 0x3482, 0x0128, + 0xc18d, 0x7132, 0x080c, 0x6c09, 0x1510, 0x6240, 0x9294, 0x0010, + 0x0130, 0x6248, 0x9294, 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, + 0xd08c, 0x0904, 0x246d, 0x7038, 0xd08c, 0x1140, 0x2001, 0x180c, + 0x200c, 0xd1ac, 0x1904, 0x246d, 0xc1ad, 0x2102, 0x0036, 0x73d8, + 0x2011, 0x8013, 0x080c, 0x4ca1, 0x003e, 0x0804, 0x246d, 0x7038, + 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, 0x246d, + 0xc1ad, 0x2102, 0x0036, 0x73d8, 0x2011, 0x8013, 0x080c, 0x4ca1, + 0x003e, 0x7130, 0xc185, 0x7132, 0x2011, 0x1848, 0x220c, 0xd1a4, + 0x01f0, 0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8c44, + 0x2019, 0x000e, 0x00c6, 0x2061, 0x0000, 0x080c, 0xe9f9, 0x00ce, + 0x9484, 0x00ff, 0x9080, 0x348e, 0x200d, 0x918c, 0xff00, 0x810f, + 0x2120, 0x9006, 0x2009, 0x000e, 0x080c, 0xea8d, 0x001e, 0x0016, + 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x32da, 0x001e, 0x00a8, + 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x67b4, 0x1140, + 0x7030, 0xd084, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x61b7, + 0x8108, 0x1f04, 0x245d, 0x00be, 0x015e, 0x00ce, 0x004e, 0x080c, + 0xacfc, 0x080c, 0xafd2, 0x080c, 0xb09b, 0x080c, 0xad18, 0x60e3, + 0x0000, 0x001e, 0x2001, 0x1800, 0x2014, 0x9296, 0x0004, 0x1170, + 0xd19c, 0x11b0, 0x2011, 0x180c, 0x2214, 0xd29c, 0x1120, 0x6204, + 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, + 0x2001, 0x1826, 0x2003, 0x0000, 0x2011, 0x0020, 0x080c, 0x2ad3, + 0xd194, 0x0904, 0x258b, 0x0016, 0x080c, 0xacfc, 0x6220, 0xd2b4, + 0x0904, 0x2526, 0x080c, 0x8a4b, 0x080c, 0xa2a0, 0x2011, 0x0004, + 0x080c, 0x2ad3, 0x00f6, 0x2019, 0x19f4, 0x2304, 0x907d, 0x0904, + 0x24f3, 0x7804, 0x9086, 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, + 0x0096, 0x2069, 0x0140, 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, + 0x0002, 0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, + 0x003c, 0x8001, 0x1df0, 0x080c, 0x2aa9, 0x2001, 0x001e, 0x8001, + 0x0240, 0x20a9, 0x0009, 0x080c, 0x2a60, 0x6904, 0xd1dc, 0x1140, + 0x0cb0, 0x2001, 0x0100, 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, + 0x080c, 0x99ed, 0x080c, 0xad18, 0x7814, 0x2048, 0xa867, 0x0103, + 0x2f60, 0x080c, 0xb16c, 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, + 0x001e, 0x00ae, 0x0005, 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, + 0x9084, 0x4000, 0x0110, 0x080c, 0x2aa9, 0x00de, 0x00c6, 0x2061, + 0x19e8, 0x6034, 0x080c, 0xd645, 0x0120, 0x909a, 0x0003, 0x1258, + 0x0018, 0x909a, 0x00c8, 0x1238, 0x8000, 0x6036, 0x00ce, 0x080c, + 0xa278, 0x0804, 0x2588, 0x2061, 0x0100, 0x62c0, 0x080c, 0xac2d, + 0x2019, 0x19f4, 0x2304, 0x9065, 0x0130, 0x6003, 0x0001, 0x2009, + 0x0027, 0x080c, 0xb20a, 0x00ce, 0x0804, 0x2588, 0xd2bc, 0x0904, + 0x256b, 0x080c, 0x8a58, 0x2011, 0x0004, 0x080c, 0x2ad3, 0x00d6, + 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2aa9, + 0x00de, 0x00c6, 0x2061, 0x19e8, 0x6050, 0x080c, 0xd645, 0x0120, + 0x909a, 0x0003, 0x1668, 0x0018, 0x909a, 0x00c8, 0x1648, 0x8000, + 0x6052, 0x604c, 0x00ce, 0x9005, 0x05d8, 0x2009, 0x07d0, 0x080c, + 0x8a50, 0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x2009, + 0x1984, 0x2011, 0x0012, 0x080c, 0x2ae2, 0x0450, 0x9080, 0x0008, + 0x2004, 0x9086, 0x0009, 0x0d98, 0x2009, 0x1984, 0x2011, 0x0016, + 0x080c, 0x2ae2, 0x00e8, 0x2011, 0x0004, 0x080c, 0x2ad3, 0x00c0, + 0x0036, 0x2019, 0x0001, 0x080c, 0xa596, 0x003e, 0x2019, 0x19fb, + 0x2304, 0x9065, 0x0160, 0x2009, 0x004f, 0x6020, 0x9086, 0x0009, + 0x1110, 0x2009, 0x004f, 0x6003, 0x0003, 0x080c, 0xb20a, 0x00ce, + 0x080c, 0xad18, 0x001e, 0xd19c, 0x0904, 0x25ef, 0x7038, 0xd0ac, + 0x1558, 0x0016, 0x0156, 0x2011, 0x0008, 0x080c, 0x2ad3, 0x080c, + 0x2af6, 0x080c, 0x2b29, 0x6050, 0xc0e5, 0x6052, 0x20a9, 0x0367, + 0x0f04, 0x25ba, 0x1d04, 0x25a2, 0x080c, 0x8a7f, 0x6020, 0xd09c, + 0x1db8, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2a0c, 0x00fe, 0x1d80, + 0x6050, 0xc0e4, 0x6052, 0x2011, 0x0008, 0x080c, 0x2ad3, 0x015e, + 0x001e, 0x04a8, 0x015e, 0x001e, 0x0016, 0x6028, 0xc09c, 0x602a, + 0x080c, 0xacfc, 0x080c, 0xafd2, 0x080c, 0xb09b, 0x080c, 0xad18, + 0x60e3, 0x0000, 0x080c, 0xeed9, 0x080c, 0xeef4, 0x080c, 0x5844, + 0xd0fc, 0x1138, 0x080c, 0xd63e, 0x1120, 0x9085, 0x0001, 0x080c, + 0x77e2, 0x9006, 0x080c, 0x2a99, 0x2009, 0x0002, 0x080c, 0x2a85, + 0x00e6, 0x2071, 0x1800, 0x7003, 0x0004, 0x080c, 0x0ed3, 0x00ee, + 0x2011, 0x0008, 0x080c, 0x2ad3, 0x080c, 0x0bcf, 0x001e, 0x918c, + 0xffd0, 0x2110, 0x080c, 0x2ad3, 0x00ae, 0x0005, 0x0016, 0x2001, + 0x0387, 0x200c, 0xd1a4, 0x001e, 0x0904, 0x2390, 0x0016, 0x2009, + 0x2602, 0x00c0, 0x2001, 0x0387, 0x2003, 0x1000, 0x001e, 0x0c38, + 0x0016, 0x2001, 0x0387, 0x200c, 0xd1b4, 0x001e, 0x0904, 0x2390, + 0x0016, 0x2009, 0x2614, 0x0030, 0x2001, 0x0387, 0x2003, 0x4000, + 0x001e, 0x08a8, 0x6028, 0xc0bc, 0x602a, 0x2001, 0x0156, 0x2003, + 0xbc91, 0x8000, 0x2003, 0xffff, 0x6043, 0x0001, 0x080c, 0x2a7f, + 0x2011, 0x0080, 0x080c, 0x2ad3, 0x6017, 0x0000, 0x6043, 0x0000, + 0x0817, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, + 0x2091, 0x8000, 0x2071, 0x1800, 0x71d0, 0x70d2, 0x9116, 0x0904, + 0x2684, 0x81ff, 0x01a0, 0x2009, 0x0000, 0x080c, 0x2a85, 0x2011, + 0x8011, 0x2019, 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019, + 0x0001, 0x0010, 0x2019, 0x0000, 0x080c, 0x4ca1, 0x0468, 0x2001, + 0x19a9, 0x200c, 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, + 0x0118, 0x2019, 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c, + 0x4ca1, 0x080c, 0x0ed3, 0x080c, 0x5844, 0xd0fc, 0x11a8, 0x080c, + 0xd63e, 0x1190, 0x00c6, 0x080c, 0x2720, 0x080c, 0xacfc, 0x080c, + 0xa4f1, 0x080c, 0xad18, 0x2061, 0x0100, 0x2019, 0x0028, 0x2009, + 0x0002, 0x080c, 0x32da, 0x00ce, 0x012e, 0x00fe, 0x00ee, 0x003e, + 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, 0x00ff, 0x2130, + 0x9094, 0xff00, 0x11f0, 0x2011, 0x1837, 0x2214, 0xd2ac, 0x11c8, + 0x81ff, 0x01e8, 0x2011, 0x181f, 0x2204, 0x9106, 0x1190, 0x2011, + 0x1820, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, 0x9206, 0x1148, + 0x2011, 0x1820, 0x2214, 0x9294, 0x00ff, 0x9584, 0x00ff, 0x9206, + 0x1120, 0x2500, 0x080c, 0x8521, 0x0048, 0x9584, 0x00ff, 0x9080, + 0x348e, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, 0x0005, 0x9080, + 0x348e, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, 0x2069, 0x0140, + 0x2001, 0x1818, 0x2003, 0x00ef, 0x20a9, 0x0010, 0x9006, 0x6852, + 0x6856, 0x1f04, 0x26d0, 0x00de, 0x0005, 0x0006, 0x00d6, 0x0026, + 0x2069, 0x0140, 0x2001, 0x1818, 0x2102, 0x8114, 0x8214, 0x8214, + 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, 0x82ff, 0x1128, + 0x9184, 0x000f, 0x9080, 0xef08, 0x2005, 0x6856, 0x8211, 0x1f04, + 0x26e5, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, 0x2061, 0x1800, + 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, 0x00ce, 0x0005, + 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, 0x0140, 0x6980, + 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, 0x22a8, 0x2001, + 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, 0x1f04, 0x2715, + 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, 0x015e, 0x0005, + 0x080c, 0x5840, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0x9006, 0x0046, + 0x2020, 0x2009, 0x002e, 0x080c, 0xea8d, 0x004e, 0x0005, 0x00f6, + 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, 0x0904, 0x278c, + 0x080c, 0x29fc, 0x0660, 0x9084, 0x0700, 0x908e, 0x0600, 0x1120, + 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, 0x1120, 0x2011, + 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, 0x9016, 0x2009, + 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, 0x2009, 0x0002, + 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, 0x0004, 0x0078, + 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, 0x0040, 0x9084, + 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, 0x0058, 0x2300, + 0x9080, 0x0020, 0x2018, 0x080c, 0x955b, 0x928c, 0xff00, 0x0110, + 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, 0x78c2, 0x2009, + 0x0138, 0x220a, 0x080c, 0x779e, 0x1118, 0x2009, 0x196d, 0x220a, + 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, + 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, + 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, 0x0d7e, 0x002e, + 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x180d, 0x2004, 0xd08c, + 0x0118, 0x2009, 0x0002, 0x0005, 0x2001, 0x0171, 0x2004, 0xd0dc, + 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, 0x918e, 0x004c, + 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, 0x900e, 0x2001, + 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x2001, + 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9108, 0x0005, + 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, 0x1000, 0x1800, + 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, 0x1990, 0x2004, + 0x908a, 0x0007, 0x1a0c, 0x0d85, 0x0033, 0x00ee, 0x002e, 0x001e, + 0x000e, 0x015e, 0x0005, 0x27f2, 0x2810, 0x2834, 0x2836, 0x285f, + 0x2861, 0x2863, 0x2001, 0x0001, 0x080c, 0x2631, 0x080c, 0x2a4a, + 0x2001, 0x1992, 0x2003, 0x0000, 0x7828, 0x9084, 0xe1d7, 0x782a, + 0x9006, 0x20a9, 0x0009, 0x080c, 0x2a18, 0x2001, 0x1990, 0x2003, + 0x0006, 0x2009, 0x001e, 0x2011, 0x2864, 0x080c, 0x8a5d, 0x0005, + 0x2009, 0x1995, 0x200b, 0x0000, 0x2001, 0x199a, 0x2003, 0x0036, + 0x2001, 0x1999, 0x2003, 0x002a, 0x2001, 0x1992, 0x2003, 0x0001, + 0x9006, 0x080c, 0x29ad, 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, + 0x2a18, 0x2001, 0x1990, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, + 0x2864, 0x080c, 0x8a5d, 0x0005, 0x080c, 0x0d85, 0x2001, 0x199a, + 0x2003, 0x0036, 0x2001, 0x1992, 0x2003, 0x0003, 0x7a38, 0x9294, + 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, + 0x080c, 0x29ad, 0x2001, 0x1996, 0x2003, 0x0000, 0x2001, 0xffff, + 0x20a9, 0x0009, 0x080c, 0x2a18, 0x2001, 0x1990, 0x2003, 0x0006, + 0x2009, 0x001e, 0x2011, 0x2864, 0x080c, 0x8a5d, 0x0005, 0x080c, + 0x0d85, 0x080c, 0x0d85, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, + 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2001, + 0x1992, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0d85, 0x0043, 0x012e, + 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, 0x2886, + 0x28a2, 0x28de, 0x290a, 0x292a, 0x2936, 0x2938, 0x080c, 0x2a0c, + 0x1190, 0x2009, 0x1998, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, + 0x0004, 0x0110, 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x1990, + 0x2003, 0x0001, 0x0030, 0x080c, 0x295c, 0x2001, 0xffff, 0x080c, + 0x2801, 0x0005, 0x080c, 0x293a, 0x05c0, 0x2009, 0x1999, 0x2104, + 0x8001, 0x200a, 0x080c, 0x2a0c, 0x1158, 0x7a38, 0x9294, 0x0005, + 0x9296, 0x0005, 0x0518, 0x2009, 0x1998, 0x2104, 0xc085, 0x200a, + 0x2009, 0x1995, 0x2104, 0x8000, 0x200a, 0x9086, 0x0005, 0x0118, + 0x080c, 0x2942, 0x00c0, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, + 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, + 0x29ca, 0x2001, 0x1992, 0x2003, 0x0002, 0x0028, 0x2001, 0x1990, + 0x2003, 0x0003, 0x0010, 0x080c, 0x2823, 0x0005, 0x080c, 0x293a, + 0x0540, 0x2009, 0x1999, 0x2104, 0x8001, 0x200a, 0x080c, 0x2a0c, + 0x1148, 0x2001, 0x1990, 0x2003, 0x0003, 0x2001, 0x1991, 0x2003, + 0x0000, 0x00b8, 0x2009, 0x1999, 0x2104, 0x9005, 0x1118, 0x080c, + 0x297f, 0x0010, 0x080c, 0x294f, 0x080c, 0x2942, 0x2009, 0x1995, + 0x200b, 0x0000, 0x2001, 0x1992, 0x2003, 0x0001, 0x080c, 0x2823, + 0x0000, 0x0005, 0x0479, 0x01e8, 0x080c, 0x2a0c, 0x1198, 0x2009, + 0x1996, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, 0x0108, 0x0078, + 0x2001, 0x199b, 0x2003, 0x000a, 0x2009, 0x1998, 0x2104, 0xc0fd, + 0x200a, 0x0038, 0x00f9, 0x2001, 0x1992, 0x2003, 0x0004, 0x080c, + 0x284e, 0x0005, 0x0079, 0x0148, 0x080c, 0x2a0c, 0x1118, 0x080c, + 0x283a, 0x0018, 0x0079, 0x080c, 0x284e, 0x0005, 0x080c, 0x0d85, + 0x080c, 0x0d85, 0x2009, 0x199a, 0x2104, 0x8001, 0x200a, 0x090c, + 0x299b, 0x0005, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, + 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ca, 0x0005, 0x7a38, + 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, + 0x0001, 0x080c, 0x29ad, 0x0005, 0x2009, 0x1995, 0x2104, 0x8000, + 0x200a, 0x9086, 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, + 0x9294, 0x0006, 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, + 0x0001, 0x04d9, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, + 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, 0x29ca, 0x0005, 0x0086, + 0x2001, 0x1998, 0x2004, 0x9084, 0x7fff, 0x090c, 0x0d85, 0x2009, + 0x1997, 0x2144, 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, + 0xd084, 0x1120, 0x080c, 0x0d85, 0x9006, 0x0010, 0x2001, 0x0001, + 0x00a1, 0x008e, 0x0005, 0x0006, 0x0156, 0x2001, 0x1990, 0x20a9, + 0x0009, 0x2003, 0x0000, 0x8000, 0x1f04, 0x29a1, 0x2001, 0x1997, + 0x2003, 0x8000, 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, + 0x9085, 0x0000, 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, + 0x783a, 0x2009, 0x199d, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084, + 0xfffb, 0x9085, 0x0006, 0x783a, 0x2009, 0x199e, 0x210c, 0x795a, + 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0158, + 0x7838, 0x9084, 0xfffa, 0x9085, 0x0004, 0x783a, 0x7850, 0x9084, + 0xfff0, 0x7852, 0x00f8, 0x7838, 0x9084, 0xfffb, 0x9085, 0x0005, + 0x783a, 0x7850, 0x9084, 0xfff0, 0x0016, 0x2009, 0x017f, 0x210c, + 0x918e, 0x0005, 0x0140, 0x2009, 0x0003, 0x210c, 0x918c, 0x0600, + 0x918e, 0x0400, 0x0118, 0x9085, 0x000a, 0x0010, 0x9085, 0x0000, + 0x001e, 0x7852, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, + 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, + 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, 0x7820, + 0x080c, 0x2a7f, 0xd09c, 0x1110, 0x1f04, 0x2a0f, 0x015e, 0x0005, + 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x000e, 0x2008, 0x9186, + 0x0000, 0x1118, 0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118, + 0x783b, 0x0006, 0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005, + 0x0030, 0x9186, 0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006, + 0x1d04, 0x2a38, 0x080c, 0x8a7f, 0x1f04, 0x2a38, 0x080c, 0x2af6, + 0x080c, 0x2b29, 0x7850, 0x9085, 0x1000, 0x7852, 0x000e, 0x001e, + 0x012e, 0x0005, 0x080c, 0x2b29, 0x0005, 0x0006, 0x0156, 0x00f6, + 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd0ac, 0x1100, 0x7854, + 0xd08c, 0x1110, 0x1f04, 0x2a57, 0x00fe, 0x015e, 0x000e, 0x0005, + 0x1d04, 0x2a60, 0x080c, 0x8a7f, 0x1f04, 0x2a60, 0x0005, 0x0006, + 0x2001, 0x199c, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, + 0x2001, 0x199c, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, 0x0006, + 0x2001, 0x199c, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, 0xa001, + 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, 0x19a9, + 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, 0x0140, + 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, 0x200a, + 0x0005, 0x0016, 0x0026, 0x080c, 0x77b8, 0x0108, 0xc0bc, 0x2009, + 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, + 0x0005, 0x0016, 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, + 0x9285, 0x1000, 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, + 0x002e, 0x001e, 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104, + 0x1128, 0x080c, 0x77b8, 0x0110, 0xc0bc, 0x0008, 0xc0bd, 0x200a, + 0x001e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0101, + 0x7844, 0xd084, 0x1de8, 0x2001, 0x0109, 0x2202, 0x7843, 0x0100, + 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0380, 0x7843, 0x0202, 0x7844, + 0xd08c, 0x1de8, 0x2079, 0x0100, 0x7814, 0x9104, 0x9205, 0x7a16, + 0x2079, 0x0380, 0x7843, 0x0200, 0x00fe, 0x0005, 0x0016, 0x0026, + 0x0036, 0x00c6, 0x2061, 0x0100, 0x6050, 0x9084, 0xfbff, 0x9085, + 0x0040, 0x6052, 0x20a9, 0x0002, 0x080c, 0x2a60, 0x6050, 0x9085, + 0x0400, 0x9084, 0xff9f, 0x6052, 0x20a9, 0x0005, 0x080c, 0x2a60, + 0x6054, 0xd0bc, 0x090c, 0x0d85, 0x20a9, 0x0005, 0x080c, 0x2a60, + 0x6054, 0xd0ac, 0x090c, 0x0d85, 0x2009, 0x19b0, 0x9084, 0x7e00, + 0x8007, 0x8004, 0x8004, 0x200a, 0x00ce, 0x003e, 0x002e, 0x001e, + 0x0005, 0x0006, 0x00c6, 0x2061, 0x0100, 0x6050, 0xc0cd, 0x6052, + 0x00ce, 0x000e, 0x0005, 0x0016, 0x00c6, 0x00d6, 0x0006, 0x2061, + 0x0100, 0x2069, 0x0140, 0x6030, 0x0006, 0x6048, 0x0006, 0x60e4, + 0x0006, 0x60e8, 0x0006, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, + 0x0006, 0x6004, 0x0006, 0xc0fc, 0x6006, 0x2009, 0x0800, 0x2001, + 0x0338, 0x2003, 0x0301, 0x8109, 0x090c, 0x0d85, 0x2001, 0x0338, + 0x2004, 0xd084, 0x1dc0, 0x6028, 0x0006, 0x60e0, 0x0006, 0x6888, + 0x0006, 0x688c, 0x0006, 0x6890, 0x0006, 0x080c, 0x779e, 0x1110, + 0x6884, 0x0006, 0x602f, 0x0100, 0x602f, 0x0000, 0xa001, 0xa001, + 0xa001, 0xa001, 0x602f, 0x0040, 0x602f, 0x0000, 0x080c, 0x779e, + 0x1120, 0x6803, 0x0080, 0x000e, 0x6886, 0x6897, 0x4198, 0x000e, + 0x6892, 0x000e, 0x688e, 0x000e, 0x688a, 0x000e, 0x60e2, 0x000e, + 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x000e, + 0x6052, 0x000e, 0x60ea, 0x000e, 0x60e6, 0x000e, 0x604a, 0x000e, + 0x6032, 0x6036, 0x2008, 0x080c, 0x26d5, 0x000e, 0x00de, 0x00ce, + 0x001e, 0x0005, 0x0006, 0x0156, 0x6050, 0x9085, 0x0040, 0x6052, + 0x6050, 0x9084, 0xfbcf, 0x6052, 0x080c, 0x2a7f, 0x9085, 0x2000, + 0x6052, 0x20a9, 0x0012, 0x1d04, 0x2bb3, 0x080c, 0x8a7f, 0x1f04, + 0x2bb3, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, 0x015e, + 0x000e, 0x0005, 0x30be, 0x30be, 0x2cc2, 0x2cc2, 0x2cce, 0x2cce, + 0x2cda, 0x2cda, 0x2ce8, 0x2ce8, 0x2cf4, 0x2cf4, 0x2d02, 0x2d02, + 0x2d10, 0x2d10, 0x2d22, 0x2d22, 0x2d2e, 0x2d2e, 0x2d3c, 0x2d3c, + 0x2d5a, 0x2d5a, 0x2d7a, 0x2d7a, 0x2d4a, 0x2d4a, 0x2d6a, 0x2d6a, + 0x2d88, 0x2d88, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d9a, 0x2d9a, 0x2da6, 0x2da6, 0x2db4, 0x2db4, + 0x2dc2, 0x2dc2, 0x2dd2, 0x2dd2, 0x2de0, 0x2de0, 0x2df0, 0x2df0, + 0x2e00, 0x2e00, 0x2e12, 0x2e12, 0x2e20, 0x2e20, 0x2e30, 0x2e30, + 0x2e52, 0x2e52, 0x2e76, 0x2e76, 0x2e40, 0x2e40, 0x2e64, 0x2e64, + 0x2e86, 0x2e86, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2e9a, 0x2e9a, 0x2ea6, 0x2ea6, 0x2eb4, 0x2eb4, + 0x2ec2, 0x2ec2, 0x2ed2, 0x2ed2, 0x2ee0, 0x2ee0, 0x2ef0, 0x2ef0, + 0x2f00, 0x2f00, 0x2f12, 0x2f12, 0x2f20, 0x2f20, 0x2f30, 0x2f30, + 0x2f40, 0x2f40, 0x2f52, 0x2f52, 0x2f62, 0x2f62, 0x2f74, 0x2f74, + 0x2f86, 0x2f86, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2f9a, 0x2f9a, 0x2fa8, 0x2fa8, 0x2fb8, 0x2fb8, + 0x2fc8, 0x2fc8, 0x2fda, 0x2fda, 0x2fea, 0x2fea, 0x2ffc, 0x2ffc, + 0x300e, 0x300e, 0x3022, 0x3022, 0x3032, 0x3032, 0x3044, 0x3044, + 0x3056, 0x3056, 0x306a, 0x306a, 0x307b, 0x307b, 0x308e, 0x308e, + 0x30a1, 0x30a1, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, 0x2d20, + 0x2d20, 0x2d20, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x22c8, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ea, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0x22c8, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22c8, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0x22c8, 0x080c, 0x2114, 0x0804, 0x30b6, + 0xa001, 0x0cf0, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x13d4, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x22c8, + 0x080c, 0x13d4, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0x13d4, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0x22c8, 0x080c, 0x13d4, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x13d4, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x22c8, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0x22c8, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x22c8, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0x22c8, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0x22c8, + 0x080c, 0x13d4, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, + 0x080c, 0x13d4, 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x13d4, 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x20ea, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0xad62, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0xad62, + 0x080c, 0x22c8, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0xad62, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0xad62, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x2114, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0xad62, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x13d4, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x13d4, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0xad62, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x13d4, + 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ea, 0x080c, 0xad62, + 0x080c, 0x13d4, 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x20ea, + 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x22c8, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0xad62, 0x0804, 0x30b6, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x22c8, + 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, + 0x080c, 0xad62, 0x080c, 0x2114, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x2114, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x13d4, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x22c8, + 0x080c, 0x13d4, 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, + 0x080c, 0xad62, 0x080c, 0x13d4, 0x0804, 0x30b6, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, 0x22c8, 0x080c, 0x13d4, + 0x0804, 0x30b6, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, 0x13d4, + 0x080c, 0x2114, 0x04d8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, 0x080c, 0xad62, 0x080c, + 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, 0x0440, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x278f, + 0x080c, 0x20ea, 0x080c, 0x13d4, 0x080c, 0xad62, 0x080c, 0x2114, + 0x00a8, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, + 0x0156, 0x080c, 0x278f, 0x080c, 0x20ea, 0x080c, 0xad62, 0x080c, + 0x22c8, 0x080c, 0x13d4, 0x080c, 0x2114, 0x0000, 0x015e, 0x014e, + 0x013e, 0x01de, 0x01ce, 0x012e, 0x000e, 0x010e, 0x000d, 0x00b6, + 0x00c6, 0x0026, 0x0046, 0x9026, 0x080c, 0x6bcf, 0x1904, 0x31f6, + 0x72dc, 0x2001, 0x197c, 0x2004, 0x9005, 0x1110, 0xd29c, 0x0148, + 0xd284, 0x1138, 0xd2bc, 0x1904, 0x31f6, 0x080c, 0x31fb, 0x0804, + 0x31f6, 0xd2cc, 0x1904, 0x31f6, 0x080c, 0x779e, 0x1120, 0x70af, + 0xffff, 0x0804, 0x31f6, 0xd294, 0x0120, 0x70af, 0xffff, 0x0804, + 0x31f6, 0x080c, 0x347d, 0x0160, 0x080c, 0xd645, 0x0128, 0x2001, + 0x1818, 0x203c, 0x0804, 0x316f, 0x70af, 0xffff, 0x0804, 0x31f6, + 0x2001, 0x1818, 0x203c, 0x7294, 0xd284, 0x0904, 0x316f, 0xd28c, + 0x1904, 0x316f, 0x0036, 0x73ac, 0x938e, 0xffff, 0x1110, 0x2019, + 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, 0x938c, 0x0001, 0x0120, + 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, 0x970e, 0x0904, + 0x3165, 0x908e, 0x0000, 0x0904, 0x3165, 0x908e, 0x00ff, 0x1160, + 0x7230, 0xd284, 0x1904, 0x316a, 0x7294, 0xc28d, 0x7296, 0x70af, + 0xffff, 0x003e, 0x0804, 0x316f, 0x2009, 0x180d, 0x210c, 0xd18c, + 0x0150, 0x0026, 0x2011, 0x0010, 0x080c, 0x6c35, 0x002e, 0x0118, + 0x70af, 0xffff, 0x0488, 0x900e, 0x080c, 0x268c, 0x080c, 0x6749, + 0x1538, 0x9006, 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, + 0x2060, 0x080c, 0x8eee, 0x00ce, 0x090c, 0x928d, 0xb8af, 0x0000, + 0x080c, 0x6c11, 0x1168, 0x7030, 0xd08c, 0x0130, 0xb800, 0xd0bc, + 0x0138, 0x080c, 0x6aae, 0x0120, 0x080c, 0x3214, 0x0148, 0x0028, + 0x080c, 0x3360, 0x080c, 0x3240, 0x0118, 0x8318, 0x0804, 0x3109, + 0x73ae, 0x0010, 0x70af, 0xffff, 0x003e, 0x0804, 0x31f6, 0x9780, + 0x348e, 0x203d, 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70ac, + 0x9096, 0xffff, 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, + 0x2008, 0x9802, 0x20a8, 0x0020, 0x70af, 0xffff, 0x0804, 0x31f6, + 0x2700, 0x0156, 0x0016, 0x9106, 0x0904, 0x31eb, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x0158, 0x0026, 0x2011, 0x0010, 0x080c, 0x6c35, + 0x002e, 0x0120, 0x2009, 0xffff, 0x0804, 0x31f3, 0xc484, 0x080c, + 0x67b4, 0x0168, 0x080c, 0xd645, 0x1904, 0x31eb, 0x080c, 0x347d, + 0x1904, 0x31eb, 0x080c, 0x6749, 0x1904, 0x31f3, 0x0008, 0xc485, + 0xb8bb, 0x0520, 0xb8ac, 0x9005, 0x0148, 0x00c6, 0x2060, 0x080c, + 0x8eee, 0x00ce, 0x090c, 0x928d, 0xb8af, 0x0000, 0x080c, 0x6c11, + 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, 0x7294, + 0xd28c, 0x0180, 0x080c, 0x6c11, 0x9082, 0x0006, 0x02e0, 0xd484, + 0x1118, 0x080c, 0x676e, 0x0028, 0x080c, 0x33f3, 0x01a0, 0x080c, + 0x341e, 0x0088, 0x080c, 0x3360, 0x080c, 0xd645, 0x1160, 0x080c, + 0x3240, 0x0188, 0x0040, 0x080c, 0xd645, 0x1118, 0x080c, 0x33f3, + 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, 0x3188, + 0x70af, 0xffff, 0x0018, 0x001e, 0x015e, 0x71ae, 0x004e, 0x002e, + 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70af, 0x0001, 0x2009, + 0x007e, 0x080c, 0x6749, 0x1168, 0xb813, 0x00ff, 0xb817, 0xfffe, + 0x080c, 0x3360, 0x04a9, 0x0128, 0x70dc, 0xc0bd, 0x70de, 0x080c, + 0xd389, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, + 0x2001, 0x184c, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, 0xb1dd, + 0x01d0, 0x2b00, 0x6012, 0x080c, 0xd3b6, 0x6023, 0x0001, 0x9006, + 0x080c, 0x66e6, 0x2001, 0x0000, 0x080c, 0x66fa, 0x0126, 0x2091, + 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, 0x2009, 0x0004, 0x080c, + 0xb20a, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, + 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x184c, 0x2004, 0x9084, + 0x00ff, 0xb842, 0x080c, 0xb1dd, 0x0548, 0x2b00, 0x6012, 0xb800, + 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, 0x9084, + 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x3315, 0x080c, 0xd3b6, + 0x6023, 0x0001, 0x9006, 0x080c, 0x66e6, 0x2001, 0x0002, 0x080c, + 0x66fa, 0x0126, 0x2091, 0x8000, 0x70a8, 0x8000, 0x70aa, 0x012e, + 0x2009, 0x0002, 0x080c, 0xb20a, 0x9085, 0x0001, 0x00ce, 0x00de, + 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, 0x0080, + 0x080c, 0x6749, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, 0x0039, + 0x0110, 0x70e3, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, 0x0016, + 0x0076, 0x00d6, 0x00c6, 0x080c, 0xb116, 0x01d0, 0x2b00, 0x6012, + 0x080c, 0xd3b6, 0x6023, 0x0001, 0x9006, 0x080c, 0x66e6, 0x2001, + 0x0002, 0x080c, 0x66fa, 0x0126, 0x2091, 0x8000, 0x70e4, 0x8000, + 0x70e6, 0x012e, 0x2009, 0x0002, 0x080c, 0xb20a, 0x9085, 0x0001, + 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, 0x0126, + 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x6749, 0x11b8, 0xb813, + 0x00ff, 0xb817, 0xfffd, 0xb8d7, 0x0004, 0x080c, 0xb116, 0x0170, + 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, 0xd3b6, + 0x2009, 0x0022, 0x080c, 0xb20a, 0x9085, 0x0001, 0x012e, 0x00de, + 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, 0x00b6, + 0x21f0, 0x080c, 0xacfc, 0x0106, 0x080c, 0x97bb, 0x080c, 0x9727, + 0x080c, 0xac4d, 0x080c, 0xc179, 0x010e, 0x090c, 0xad18, 0x3e08, + 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, 0x900e, 0x0018, 0x20a9, + 0x007f, 0x900e, 0x0016, 0x080c, 0x67b4, 0x1140, 0x9686, 0x0002, + 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, 0x61b7, 0x001e, 0x8108, + 0x1f04, 0x32fa, 0x9686, 0x0001, 0x190c, 0x3451, 0x00be, 0x002e, + 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0046, + 0x0036, 0x0026, 0x0016, 0x00b6, 0x080c, 0xacfc, 0x0106, 0x6210, + 0x2258, 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x97b0, 0x0076, + 0x2039, 0x0000, 0x080c, 0x966d, 0x2c08, 0x080c, 0xe75d, 0x007e, + 0x001e, 0x010e, 0x090c, 0xad18, 0xba10, 0xbb14, 0xbc84, 0x080c, + 0x61b7, 0xba12, 0xbb16, 0xbc86, 0x00be, 0x001e, 0x002e, 0x003e, + 0x004e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, 0x6010, + 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, 0x1800, + 0x70a8, 0x9005, 0x0110, 0x8001, 0x70aa, 0x000e, 0x00ee, 0x0005, + 0x2071, 0x1800, 0x70e4, 0x9005, 0x0dc0, 0x8001, 0x70e6, 0x0ca8, + 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x00b6, + 0x0046, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x080c, 0xacfc, + 0x0106, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0078, 0x080c, 0x5840, + 0xd0c4, 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2020, 0x2009, 0x002d, + 0x080c, 0xea8d, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e, + 0x0904, 0x33cf, 0x928e, 0x007f, 0x0904, 0x33cf, 0x928e, 0x0080, + 0x05f0, 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c8, 0x8fff, 0x1150, + 0x2001, 0x198e, 0x0006, 0x2003, 0x0001, 0x080c, 0x33e0, 0x000e, + 0x2003, 0x0000, 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c, + 0x6bdb, 0x00ce, 0x00be, 0x2019, 0x0029, 0x080c, 0x97b0, 0x0076, + 0x2039, 0x0000, 0x080c, 0x966d, 0x00b6, 0x00c6, 0x0026, 0x2158, + 0xba04, 0x9294, 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404, + 0x0028, 0x2001, 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce, + 0x00be, 0x0016, 0x2c08, 0x080c, 0xe75d, 0x001e, 0x007e, 0x002e, + 0x8210, 0x1f04, 0x3385, 0x010e, 0x090c, 0xad18, 0x015e, 0x001e, + 0x002e, 0x003e, 0x004e, 0x00be, 0x00ce, 0x00ee, 0x00fe, 0x0005, + 0x0046, 0x0026, 0x0016, 0x080c, 0x5840, 0xd0c4, 0x0140, 0xd0a4, + 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, 0xea8d, 0x001e, + 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7294, + 0x82ff, 0x01e8, 0x080c, 0x6c09, 0x11d0, 0x2100, 0x080c, 0x26bf, + 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1d80, 0x2c04, + 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, 0x9084, 0x00ff, + 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, 0x0c68, 0x9085, + 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x080c, 0xacfc, 0x0106, 0x0036, 0x2019, + 0x0029, 0x00c1, 0x003e, 0x010e, 0x090c, 0xad18, 0x9180, 0x1000, + 0x2004, 0x9065, 0x0158, 0x0016, 0x00c6, 0x2061, 0x1b39, 0x001e, + 0x6112, 0x080c, 0x3315, 0x001e, 0x080c, 0x676e, 0x012e, 0x00ce, + 0x001e, 0x0005, 0x0016, 0x0026, 0x2110, 0x080c, 0xa7e2, 0x080c, + 0xedee, 0x002e, 0x001e, 0x0005, 0x2001, 0x1837, 0x2004, 0xd0cc, + 0x0005, 0x00c6, 0x00b6, 0x080c, 0x779e, 0x1118, 0x20a9, 0x0800, + 0x0010, 0x20a9, 0x0782, 0x080c, 0x779e, 0x1110, 0x900e, 0x0010, + 0x2009, 0x007e, 0x9180, 0x1000, 0x2004, 0x905d, 0x0130, 0x86ff, + 0x0110, 0xb800, 0xd0bc, 0x090c, 0x676e, 0x8108, 0x1f04, 0x3462, + 0x2061, 0x1800, 0x607f, 0x0000, 0x6080, 0x9084, 0x00ff, 0x6082, + 0x60b3, 0x0000, 0x00be, 0x00ce, 0x0005, 0x2001, 0x1869, 0x2004, + 0xd0bc, 0x0005, 0x2011, 0x1848, 0x2214, 0xd2ec, 0x0005, 0x0026, + 0x2011, 0x1867, 0x2214, 0xd2dc, 0x002e, 0x0005, 0x7eef, 0x7de8, + 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, + 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, + 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, + 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, + 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, + 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, + 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, + 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, + 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, + 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, + 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, + 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, + 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, + 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, + 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, + 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, + 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, + 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, + 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, + 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, + 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, + 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, + 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, + 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, + 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, + 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0x189e, + 0x7003, 0x0002, 0x9006, 0x7016, 0x701a, 0x704a, 0x704e, 0x700e, + 0x7042, 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x7007, 0x0001, + 0x080c, 0x1072, 0x090c, 0x0d85, 0x2900, 0x706a, 0xa867, 0x0002, + 0xa8ab, 0xdcb0, 0x080c, 0x1072, 0x090c, 0x0d85, 0x2900, 0x706e, + 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x189e, 0x7004, + 0x0002, 0x35bd, 0x35be, 0x35d1, 0x35e5, 0x0005, 0x1004, 0x35ce, + 0x0e04, 0x35ce, 0x2079, 0x0000, 0x0126, 0x2091, 0x8000, 0x700c, + 0x9005, 0x1128, 0x700f, 0x0001, 0x012e, 0x0468, 0x0005, 0x012e, + 0x0ce8, 0x2079, 0x0000, 0x2061, 0x18b8, 0x2c4c, 0xa86c, 0x908e, + 0x0100, 0x0128, 0x9086, 0x0200, 0x0904, 0x36b9, 0x0005, 0x7018, + 0x2048, 0x2061, 0x1800, 0x701c, 0x0807, 0x7014, 0x2048, 0xa864, + 0x9094, 0x00ff, 0x9296, 0x0029, 0x1120, 0xaa78, 0xd2fc, 0x0128, + 0x0005, 0x9086, 0x0103, 0x0108, 0x0005, 0x2079, 0x0000, 0x2061, + 0x1800, 0x701c, 0x0807, 0x2061, 0x1800, 0x7880, 0x908a, 0x0040, + 0x1210, 0x61d0, 0x0042, 0x2100, 0x908a, 0x003f, 0x1a04, 0x36b6, + 0x61d0, 0x0804, 0x364b, 0x368d, 0x36c5, 0x36b6, 0x36d1, 0x36db, + 0x36e1, 0x36e5, 0x36f5, 0x36f9, 0x370f, 0x3715, 0x371b, 0x3726, + 0x3731, 0x3740, 0x374f, 0x375d, 0x3774, 0x378f, 0x36b6, 0x383a, + 0x3878, 0x391d, 0x392e, 0x3951, 0x36b6, 0x36b6, 0x36b6, 0x3989, + 0x39a9, 0x39b2, 0x39de, 0x39e4, 0x36b6, 0x3a2a, 0x36b6, 0x36b6, + 0x36b6, 0x36b6, 0x36b6, 0x3a35, 0x3a3e, 0x3a46, 0x3a48, 0x36b6, + 0x36b6, 0x36b6, 0x36b6, 0x36b6, 0x36b6, 0x3a78, 0x36b6, 0x36b6, + 0x36b6, 0x36b6, 0x36b6, 0x3a95, 0x3b19, 0x36b6, 0x36b6, 0x36b6, + 0x36b6, 0x36b6, 0x36b6, 0x0002, 0x3b43, 0x3b46, 0x3ba5, 0x3bbe, + 0x3bee, 0x3e94, 0x36b6, 0x53f5, 0x36b6, 0x36b6, 0x36b6, 0x36b6, + 0x36b6, 0x36b6, 0x36b6, 0x36b6, 0x370f, 0x3715, 0x4397, 0x5864, + 0x43b5, 0x5484, 0x54d6, 0x55e1, 0x36b6, 0x5643, 0x567f, 0x56b0, + 0x57c0, 0x56dd, 0x5740, 0x36b6, 0x43b9, 0x457f, 0x4595, 0x45ba, + 0x461f, 0x4693, 0x46b3, 0x472a, 0x4786, 0x47e2, 0x47e5, 0x480a, + 0x487c, 0x48e6, 0x48ee, 0x4a23, 0x4bcb, 0x4bff, 0x4e63, 0x36b6, + 0x4e81, 0x4f48, 0x5031, 0x508b, 0x36b6, 0x511e, 0x36b6, 0x5134, + 0x514f, 0x48ee, 0x5395, 0x714c, 0x0000, 0x2021, 0x4000, 0x080c, + 0x4c7d, 0x0126, 0x2091, 0x8000, 0x0e04, 0x3697, 0x0010, 0x012e, + 0x0cc0, 0x7c36, 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, + 0x7833, 0x0010, 0x7c82, 0x7986, 0x7a8a, 0x7b8e, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x7007, 0x0001, + 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, 0x2021, 0x4001, + 0x08b0, 0x2021, 0x4002, 0x0898, 0x2021, 0x4003, 0x0880, 0x2021, + 0x4005, 0x0868, 0x2021, 0x4006, 0x0850, 0x2039, 0x0001, 0x902e, + 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x81ff, 0x0d98, 0x0804, + 0x4c8a, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, + 0x7990, 0x0804, 0x4c8d, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, + 0x368d, 0x7984, 0x2114, 0x0804, 0x368d, 0x20e1, 0x0000, 0x2099, + 0x0021, 0x20e9, 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, + 0x7984, 0x7a88, 0x7b8c, 0x0804, 0x368d, 0x7884, 0x2060, 0x0804, + 0x3742, 0x2009, 0x0003, 0x2011, 0x0003, 0x2019, 0x0014, 0x789b, + 0x0137, 0x7893, 0xffff, 0x2001, 0x188f, 0x2004, 0x9005, 0x0118, + 0x7896, 0x0804, 0x368d, 0x7897, 0x0001, 0x0804, 0x368d, 0x2039, + 0x0001, 0x7d98, 0x7c9c, 0x0804, 0x36c9, 0x2039, 0x0001, 0x7d98, + 0x7c9c, 0x0804, 0x36d5, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, + 0x36c2, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x36c9, 0x79a0, 0x9182, + 0x0040, 0x0210, 0x0804, 0x36c2, 0x2138, 0x7d98, 0x7c9c, 0x0804, + 0x36d5, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x36c2, 0x21e8, + 0x7984, 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x368d, + 0x2061, 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, + 0x1dd8, 0x2010, 0x9005, 0x0904, 0x368d, 0x0804, 0x36bc, 0x79a0, + 0x9182, 0x0040, 0x0210, 0x0804, 0x36c2, 0x21e0, 0x20a9, 0x0001, + 0x7984, 0x2198, 0x4012, 0x0804, 0x368d, 0x2069, 0x1847, 0x7884, + 0x7990, 0x911a, 0x1a04, 0x36c2, 0x8019, 0x0904, 0x36c2, 0x684a, + 0x6942, 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, + 0x080c, 0x7ae7, 0x0804, 0x368d, 0x2069, 0x1847, 0x7884, 0x7994, + 0x911a, 0x1a04, 0x36c2, 0x8019, 0x0904, 0x36c2, 0x684e, 0x6946, + 0x788c, 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, + 0x2091, 0x8000, 0x080c, 0x6d66, 0x012e, 0x0804, 0x368d, 0x902e, + 0x2520, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x36bf, 0x7984, + 0x7b88, 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x18a6, + 0x4101, 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, + 0x2009, 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4c8a, + 0x701f, 0x37b3, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, + 0x0011, 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, + 0x9096, 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x36bf, 0x810f, + 0x918c, 0x00ff, 0x0904, 0x36bf, 0x7112, 0x7010, 0x8001, 0x0560, + 0x7012, 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, + 0x2009, 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, + 0x9290, 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, + 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x4c8a, 0x701f, 0x37f1, + 0x0005, 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, + 0x000a, 0x1904, 0x36bf, 0x0888, 0x0126, 0x2091, 0x8000, 0x7014, + 0x2048, 0xa868, 0xc0fd, 0xa86a, 0xa864, 0x9084, 0x00ff, 0x9096, + 0x0029, 0x1148, 0xc2fd, 0xaa7a, 0x080c, 0x630a, 0x0138, 0xa87a, + 0xa982, 0x012e, 0x0060, 0x080c, 0x663a, 0x1130, 0x7007, 0x0003, + 0x701f, 0x381f, 0x012e, 0x0005, 0x080c, 0x725e, 0x012e, 0x0126, + 0x2091, 0x8000, 0x20a9, 0x0005, 0x20e1, 0x0001, 0x2099, 0x18a6, + 0x400a, 0x2100, 0x9210, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, + 0x0000, 0xa85c, 0x9080, 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, + 0x0804, 0x4c8d, 0x2091, 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, + 0x7883, 0x4000, 0x7887, 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, + 0x2009, 0x017f, 0x2104, 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, + 0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, + 0x04fd, 0x2104, 0x789e, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x0180, 0x2001, 0x1a25, 0x2004, 0x9005, + 0x0128, 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, + 0x2003, 0x0002, 0x2003, 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, + 0x81ff, 0x1904, 0x36bf, 0x7984, 0x080c, 0x67b4, 0x1904, 0x36c2, + 0x7e98, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x36c2, 0x7c88, + 0x7d8c, 0x080c, 0x69f1, 0x080c, 0x697e, 0x1518, 0x2061, 0x1ddc, + 0x0126, 0x2091, 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, + 0x904d, 0x0130, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, + 0x012e, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a04, + 0x36bf, 0x0c30, 0x080c, 0xcae9, 0x012e, 0x0904, 0x36bf, 0x0804, + 0x368d, 0x900e, 0x2001, 0x0005, 0x080c, 0x725e, 0x0126, 0x2091, + 0x8000, 0x080c, 0xd226, 0x080c, 0x7012, 0x012e, 0x0804, 0x368d, + 0x00a6, 0x2950, 0xb198, 0x080c, 0x67b4, 0x1904, 0x390a, 0xb6a4, + 0x9684, 0x3fff, 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, + 0x69f1, 0x080c, 0x697e, 0x1520, 0x2061, 0x1ddc, 0x0126, 0x2091, + 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, + 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, + 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, + 0x0c28, 0x080c, 0xcae9, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, + 0x900e, 0x2001, 0x0005, 0x080c, 0x725e, 0x0126, 0x2091, 0x8000, + 0x080c, 0xd226, 0x080c, 0x7006, 0x012e, 0x0070, 0xb097, 0x4005, + 0xb19a, 0x0010, 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, + 0x0030, 0x2a48, 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, + 0x0001, 0x2008, 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x36bf, + 0x080c, 0x4c58, 0x0904, 0x36c2, 0x080c, 0x687b, 0x0904, 0x36bf, + 0x080c, 0x69f7, 0x0904, 0x36bf, 0x0804, 0x46aa, 0x81ff, 0x1904, + 0x36bf, 0x080c, 0x4c74, 0x0904, 0x36c2, 0x080c, 0x6a85, 0x0904, + 0x36bf, 0x2019, 0x0005, 0x79a8, 0x080c, 0x6a12, 0x0904, 0x36bf, + 0x7888, 0x908a, 0x1000, 0x1a04, 0x36c2, 0x8003, 0x800b, 0x810b, + 0x9108, 0x080c, 0x89a1, 0x79a8, 0xd184, 0x1904, 0x368d, 0x0804, + 0x46aa, 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, + 0x0450, 0x2029, 0x07ff, 0x645c, 0x2400, 0x9506, 0x01f8, 0x2508, + 0x080c, 0x67b4, 0x11d8, 0x080c, 0x6a85, 0x1128, 0x2009, 0x0002, + 0x62c0, 0x2518, 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x6a12, + 0x1118, 0x2009, 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, + 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, 0x89a1, 0x8529, 0x1ae0, + 0x012e, 0x0804, 0x368d, 0x012e, 0x0804, 0x36bf, 0x012e, 0x0804, + 0x36c2, 0x080c, 0x4c58, 0x0904, 0x36c2, 0x080c, 0x687b, 0x0904, + 0x36bf, 0x080c, 0xacfc, 0xbaa0, 0x2019, 0x0005, 0x00c6, 0x9066, + 0x080c, 0x97b0, 0x0076, 0x903e, 0x080c, 0x966d, 0x900e, 0x080c, + 0xe75d, 0x007e, 0x00ce, 0x080c, 0xad18, 0x080c, 0x69f1, 0x0804, + 0x368d, 0x080c, 0x4c58, 0x0904, 0x36c2, 0x080c, 0x69f1, 0x2208, + 0x0804, 0x368d, 0x0156, 0x00d6, 0x00e6, 0x00c6, 0x2069, 0x1910, + 0x6810, 0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, 0x901e, + 0x2071, 0x19e8, 0x7028, 0x9065, 0x0118, 0x8210, 0x600c, 0x0cd8, + 0x2300, 0x9218, 0x00ce, 0x00ee, 0x00de, 0x015e, 0x0804, 0x368d, + 0x00f6, 0x0016, 0x907d, 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, + 0x0110, 0x2178, 0x0cd0, 0x001e, 0x00fe, 0x0005, 0x2069, 0x1910, + 0x6910, 0x62bc, 0x0804, 0x368d, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x36bf, 0x0126, 0x2091, 0x8000, 0x080c, 0x5854, 0x0128, + 0x2009, 0x0007, 0x012e, 0x0804, 0x36bf, 0x012e, 0x615c, 0x9190, + 0x348e, 0x2215, 0x9294, 0x00ff, 0x637c, 0x83ff, 0x0108, 0x6280, + 0x67dc, 0x97c4, 0x000a, 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, + 0x00e8, 0x97c4, 0x0022, 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, + 0x00a8, 0x97c4, 0x0012, 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, + 0x0068, 0x080c, 0x779e, 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, + 0x0120, 0x2009, 0x0005, 0x0804, 0x36bf, 0x9036, 0x7e9a, 0x7f9e, + 0x0804, 0x368d, 0x614c, 0x6250, 0x2019, 0x1986, 0x231c, 0x2001, + 0x1987, 0x2004, 0x789a, 0x0804, 0x368d, 0x0126, 0x2091, 0x8000, + 0x6138, 0x623c, 0x6340, 0x012e, 0x0804, 0x368d, 0x080c, 0x4c74, + 0x0904, 0x36c2, 0xba44, 0xbb38, 0x0804, 0x368d, 0x080c, 0x0d85, + 0x080c, 0x4c74, 0x2110, 0x0904, 0x36c2, 0xb804, 0x908c, 0x00ff, + 0x918e, 0x0006, 0x0140, 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, + 0x0009, 0x1904, 0x36bf, 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, + 0x00c6, 0x9066, 0x080c, 0xacfc, 0x080c, 0xa7e2, 0x080c, 0x97b0, + 0x0076, 0x903e, 0x080c, 0x966d, 0x900e, 0x080c, 0xe75d, 0x007e, + 0x00ce, 0x080c, 0xad18, 0xb807, 0x0407, 0x012e, 0x0804, 0x368d, + 0x614c, 0x6250, 0x7884, 0x604e, 0x7b88, 0x6352, 0x2069, 0x1847, + 0x831f, 0x9305, 0x6816, 0x788c, 0x2069, 0x1986, 0x2d1c, 0x206a, + 0x7e98, 0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, 0x1987, + 0x2d04, 0x266a, 0x789a, 0x0804, 0x368d, 0x0126, 0x2091, 0x8000, + 0x6138, 0x7884, 0x603a, 0x910e, 0xd1b4, 0x190c, 0x0eeb, 0xd0c4, + 0x01a8, 0x00d6, 0x78a8, 0x2009, 0x199d, 0x200a, 0x78ac, 0x2011, + 0x199e, 0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, 0x1118, + 0x2214, 0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, 0xd0ec, + 0x0178, 0x6034, 0xc08d, 0x6036, 0x2001, 0x0050, 0x6076, 0x607a, + 0x6056, 0x606b, 0x269c, 0x00c6, 0x2061, 0x1b73, 0x2062, 0x00ce, + 0x2011, 0x0116, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, 0x0040, + 0x0010, 0x918c, 0xff7f, 0x2112, 0x6134, 0xd18c, 0x2001, 0x0000, + 0x0108, 0x603c, 0x7988, 0x613e, 0x6140, 0x910d, 0x788c, 0x6042, + 0x6234, 0xd28c, 0x0120, 0x7a88, 0x9294, 0x1000, 0x9205, 0x910e, + 0xd1e4, 0x190c, 0x0f06, 0x9084, 0x0020, 0x0130, 0x78b4, 0x6046, + 0x9084, 0x0001, 0x090c, 0x4397, 0x6040, 0xd0cc, 0x0120, 0x78b0, + 0x2011, 0x0114, 0x2012, 0x012e, 0x0804, 0x368d, 0x00f6, 0x2079, + 0x1800, 0x7a38, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, + 0xfebf, 0x8002, 0x9214, 0x7838, 0x9084, 0x0140, 0x9215, 0x7a3a, + 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, + 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x36c2, + 0x788c, 0x902d, 0x0904, 0x36c2, 0x900e, 0x080c, 0x67b4, 0x1120, + 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, + 0x0ca0, 0x080c, 0x4c74, 0x0904, 0x36c2, 0x7888, 0x900d, 0x0904, + 0x36c2, 0x788c, 0x9005, 0x0904, 0x36c2, 0xba44, 0xb946, 0xbb38, + 0xb83a, 0x0804, 0x368d, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, + 0x080c, 0x5854, 0x1904, 0x36bf, 0x00c6, 0x2061, 0x0100, 0x7984, + 0x9186, 0x00ff, 0x1130, 0x2001, 0x1818, 0x2004, 0x9085, 0xff00, + 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188, 0x348e, 0x210d, 0x918c, + 0x00ff, 0x2001, 0x1818, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, + 0x810f, 0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0xb116, + 0x000e, 0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x674f, + 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4c41, + 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, + 0xa86a, 0x701f, 0x3b9e, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, + 0xb20a, 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x36bf, + 0x00ce, 0x0804, 0x36c2, 0x080c, 0xb16c, 0x0cb0, 0xa830, 0x9086, + 0x0100, 0x0904, 0x36bf, 0x0804, 0x368d, 0x2061, 0x1a73, 0x0126, + 0x2091, 0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, + 0x1800, 0x6354, 0x6074, 0x789a, 0x60c0, 0x789e, 0x60bc, 0x78aa, + 0x012e, 0x0804, 0x368d, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, + 0x36bf, 0x080c, 0x779e, 0x0904, 0x36bf, 0x0126, 0x2091, 0x8000, + 0x6254, 0x6074, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x26f5, + 0x080c, 0x5a7c, 0x012e, 0x0804, 0x368d, 0x012e, 0x0804, 0x36c2, + 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, 0x19aa, 0x2070, 0x2061, + 0x1847, 0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x955b, + 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x368f, + 0x7884, 0xd0fc, 0x0158, 0x2001, 0x002a, 0x2004, 0x9005, 0x0180, + 0x9082, 0x00e1, 0x0298, 0x012e, 0x0804, 0x36c2, 0x2001, 0x002a, + 0x2004, 0x9005, 0x0128, 0x2069, 0x1847, 0x6908, 0x9102, 0x1230, + 0x012e, 0x0804, 0x36c2, 0x012e, 0x0804, 0x36bf, 0x080c, 0xb094, + 0x0dd0, 0x7884, 0xd0fc, 0x0904, 0x3c6d, 0x00c6, 0x080c, 0x4c41, + 0x00ce, 0x0d88, 0xa867, 0x0000, 0x7884, 0xa80a, 0x7898, 0xa80e, + 0x789c, 0xa812, 0x2001, 0x002e, 0x2004, 0xa81a, 0x2001, 0x002f, + 0x2004, 0xa81e, 0x2001, 0x0030, 0x2004, 0xa822, 0x2001, 0x0031, + 0x2004, 0xa826, 0x2001, 0x0034, 0x2004, 0xa82a, 0x2001, 0x0035, + 0x2004, 0xa82e, 0x2001, 0x002a, 0x2004, 0x9080, 0x0003, 0x9084, + 0x00fc, 0x8004, 0xa816, 0x080c, 0x3df7, 0x0928, 0x7014, 0x2048, + 0xad2c, 0xac28, 0xab1c, 0xaa18, 0xa930, 0xa808, 0xd0b4, 0x1120, + 0x2029, 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x080c, 0x4c8a, 0x701f, + 0x3d34, 0x7023, 0x0001, 0x012e, 0x0005, 0x080c, 0xacfc, 0x0046, + 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x080c, 0x3bd8, 0x2001, 0x19a0, 0x2003, 0x0000, 0x2021, 0x000a, + 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, 0x60bf, 0x32e1, + 0x60bf, 0x0012, 0x080c, 0x3e66, 0x080c, 0x3e25, 0x00f6, 0x00e6, + 0x0086, 0x2940, 0x2071, 0x19e8, 0x2079, 0x0090, 0x00d6, 0x2069, + 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, 0x2004, 0x780e, + 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, + 0x41db, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x40fd, 0x080c, 0x402a, + 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, 0x1db8, 0x080c, + 0x424f, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, 0x908c, 0x0070, + 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, 0x9084, 0xff00, + 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, 0x9084, 0xff00, + 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, 0x7037, 0x0000, + 0x715c, 0x9106, 0x1190, 0x2001, 0x1820, 0x2004, 0x9106, 0x1168, + 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, 0x00ce, 0x0138, + 0x080c, 0x4034, 0x080c, 0x3e20, 0x0058, 0x080c, 0x3e20, 0x080c, + 0x4173, 0x080c, 0x40f3, 0x2001, 0x020b, 0x2004, 0xd0e4, 0x0dd8, + 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, + 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, 0x60bb, 0x0000, + 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, 0x200c, 0x918c, + 0xfffd, 0x2102, 0x080c, 0x1352, 0x2009, 0x0028, 0x080c, 0x2220, + 0x2001, 0x0227, 0x200c, 0x2102, 0x080c, 0xad18, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001, + 0x19a0, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x368d, 0x012e, + 0x2021, 0x400c, 0x0804, 0x368f, 0x0016, 0x0026, 0x0036, 0x0046, + 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048, + 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3d90, + 0x2048, 0x1f04, 0x3d44, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, + 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, + 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103, + 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, + 0x9080, 0x001b, 0x080c, 0x4c8a, 0x701f, 0x3d34, 0x00b0, 0x8906, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, + 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0fd6, + 0x000e, 0x080c, 0x4c8d, 0x701f, 0x3d34, 0x015e, 0x00de, 0x009e, + 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, + 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x3df5, + 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f, + 0x080c, 0x6749, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817, + 0xfffd, 0x080c, 0xd409, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, + 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x36bf, 0x0016, + 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, + 0x0156, 0x701f, 0x3dc7, 0x7007, 0x0003, 0x0804, 0x3d85, 0xa830, + 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x368f, 0x0076, 0xad10, + 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, + 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, + 0x20a0, 0x0006, 0x080c, 0x0fd6, 0x000e, 0x080c, 0x4c8d, 0x007e, + 0x701f, 0x3d34, 0x7023, 0x0001, 0x0005, 0x0804, 0x368d, 0x0156, + 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010, + 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4c41, 0x001e, + 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006, + 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6, + 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005, + 0x2001, 0x19a0, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, + 0x2061, 0x0200, 0x2001, 0x19ab, 0x2004, 0x601a, 0x2061, 0x0100, + 0x2001, 0x19aa, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c, + 0x4c41, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, + 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061, + 0x0090, 0x2079, 0x0100, 0x2001, 0x19aa, 0x2004, 0x6036, 0x2009, + 0x0040, 0x080c, 0x2220, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006, + 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c, + 0x4c41, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, + 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a, + 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000, + 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000, + 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, + 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, + 0x0148, 0x080c, 0x2a77, 0x1130, 0x9006, 0x080c, 0x29ca, 0x9006, + 0x080c, 0x29ad, 0x2001, 0x199f, 0x2003, 0x0000, 0x7884, 0x9084, + 0x0007, 0x0002, 0x3eb5, 0x3eb6, 0x3eb7, 0x3eb2, 0x3eb2, 0x3eb2, + 0x3eb2, 0x3eb2, 0x012e, 0x0804, 0x36c2, 0x0ce0, 0x0cd8, 0x080c, + 0x779e, 0x1128, 0x012e, 0x2009, 0x0016, 0x0804, 0x36bf, 0x81ff, + 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x368f, 0x2001, 0x0141, + 0x2004, 0xd0dc, 0x0db0, 0x080c, 0xacfc, 0x0086, 0x0096, 0x00a6, + 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x3bd8, 0x2009, + 0x0101, 0x210c, 0x0016, 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, + 0x2058, 0x080c, 0x432a, 0x080c, 0x427a, 0x903e, 0x2720, 0x00f6, + 0x00e6, 0x0086, 0x2940, 0x2071, 0x19e8, 0x2079, 0x0090, 0x00d6, + 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, + 0x780a, 0x00de, 0x2011, 0x0001, 0x080c, 0x41db, 0x080c, 0x2a7f, + 0x080c, 0x2a7f, 0x080c, 0x2a7f, 0x080c, 0x2a7f, 0x080c, 0x41db, + 0x008e, 0x00ee, 0x00fe, 0x080c, 0x40fd, 0x2009, 0x9c40, 0x8109, + 0x11b0, 0x080c, 0x4034, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, + 0x2102, 0x001e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, + 0x009e, 0x008e, 0x2009, 0x0017, 0x080c, 0x36bf, 0x0cf8, 0x2001, + 0x020b, 0x2004, 0x9084, 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, + 0x7884, 0x00fe, 0xd0bc, 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, + 0x0150, 0x080c, 0x40db, 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, + 0x4034, 0x0804, 0x3fdd, 0x080c, 0x424f, 0x080c, 0x4173, 0x080c, + 0x40be, 0x080c, 0x40f3, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, + 0x0130, 0x8b58, 0x080c, 0x4034, 0x00fe, 0x0804, 0x3fdd, 0x00fe, + 0x080c, 0x402a, 0x1150, 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, + 0x0033, 0x2502, 0x080c, 0x4034, 0x0080, 0x87ff, 0x0138, 0x2001, + 0x0201, 0x2004, 0x9005, 0x1908, 0x8739, 0x0038, 0x2001, 0x1a6e, + 0x2004, 0x9086, 0x0000, 0x1904, 0x3f2d, 0x2001, 0x032f, 0x2003, + 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0x9605, 0x0904, 0x3fdd, + 0x7884, 0xd0bc, 0x0128, 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3fdd, + 0xa013, 0x0019, 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, + 0x1148, 0x2001, 0x1a6e, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, + 0x0009, 0x0030, 0xa017, 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, + 0x2800, 0xa05a, 0x2009, 0x0040, 0x080c, 0x2220, 0x2900, 0xa85a, + 0xa813, 0x0019, 0x7884, 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, + 0x20a9, 0x0004, 0x2061, 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, + 0x2004, 0x1f04, 0x3fb4, 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, + 0x9005, 0x0108, 0xa816, 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, + 0x0090, 0x7827, 0x0002, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, + 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x3ee7, 0x001e, 0x00c6, 0x2001, + 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, + 0x2011, 0x020d, 0x2013, 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, + 0xfffd, 0x2102, 0x080c, 0x1352, 0x7884, 0x9084, 0x0003, 0x9086, + 0x0002, 0x01b0, 0x2009, 0x0028, 0x080c, 0x2220, 0x2001, 0x0227, + 0x200c, 0x2102, 0x6050, 0x9084, 0xb7ff, 0x080c, 0x2b29, 0x6052, + 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, + 0x080c, 0xad18, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, 0x9c05, + 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, + 0x008e, 0x1118, 0x012e, 0x0804, 0x368d, 0x012e, 0x2021, 0x400c, + 0x0804, 0x368f, 0x9085, 0x0001, 0x1d04, 0x4033, 0x2091, 0x6000, + 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, 0x0010, + 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a6e, 0x2003, 0x0000, + 0x0071, 0x2009, 0x0048, 0x080c, 0x2220, 0x2001, 0x0227, 0x2024, + 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, 0x00f6, + 0x00e6, 0x2071, 0x19e8, 0x7054, 0x9086, 0x0000, 0x0520, 0x2079, + 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0x9106, + 0x1120, 0x2009, 0x0040, 0x080c, 0x2220, 0x782c, 0xd0fc, 0x0d88, + 0x080c, 0x424f, 0x7054, 0x9086, 0x0000, 0x1d58, 0x782b, 0x0004, + 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x2220, 0x782b, + 0x0002, 0x7057, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, + 0x0100, 0x2001, 0x1818, 0x200c, 0x7932, 0x7936, 0x080c, 0x26d5, + 0x080c, 0x2af6, 0x080c, 0x2b29, 0x784b, 0xf7f7, 0x7843, 0x0090, + 0x7843, 0x0010, 0x7850, 0xc0e5, 0x7852, 0x2019, 0x61a8, 0x7820, + 0xd09c, 0x0110, 0x8319, 0x1dd8, 0x7850, 0xc0e4, 0x7852, 0x2011, + 0x0048, 0x080c, 0x2ad3, 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, + 0xa001, 0x8319, 0x1de0, 0x2001, 0x0100, 0x080c, 0x2a99, 0x2011, + 0x0020, 0x080c, 0x2ad3, 0x7843, 0x0000, 0x9006, 0x080c, 0x2a99, + 0x2011, 0x0048, 0x080c, 0x2ad3, 0x00fe, 0x0005, 0x7884, 0xd0ac, + 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a6e, 0x2079, 0x0320, 0x2001, + 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, 0x1140, + 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, 0x0019, + 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, + 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, 0x0033, + 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, 0xd0a4, + 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, 0xd084, + 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, + 0x2001, 0x19ab, 0x2004, 0x70e2, 0x080c, 0x3e16, 0x1188, 0x2001, + 0x1820, 0x2004, 0x2009, 0x181f, 0x210c, 0x918c, 0x00ff, 0x706e, + 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, 0x0080, + 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1818, 0x210c, 0x716e, + 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, + 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, 0x8000, + 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, 0x70d6, + 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, 0x9085, + 0x0092, 0x7016, 0x080c, 0x424f, 0x00f6, 0x2071, 0x1a6e, 0x2079, + 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, 0x689c, + 0x780e, 0x6898, 0x780a, 0x00de, 0x080c, 0x3e16, 0x0140, 0x2001, + 0x199f, 0x200c, 0x2003, 0x0001, 0x918e, 0x0001, 0x0120, 0x2009, + 0x03e8, 0x8109, 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, + 0x2011, 0x0011, 0x080c, 0x41db, 0x2011, 0x0001, 0x080c, 0x41db, + 0x00fe, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a6e, 0x2079, + 0x0320, 0x792c, 0xd1fc, 0x0904, 0x41d8, 0x782b, 0x0002, 0x9026, + 0xd19c, 0x1904, 0x41d4, 0x7000, 0x0002, 0x41d8, 0x4189, 0x41b9, + 0x41d4, 0xd1bc, 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, + 0x0001, 0x080c, 0x41db, 0x0904, 0x41d8, 0x080c, 0x41db, 0x0804, + 0x41d8, 0x00f6, 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, + 0x7914, 0x782b, 0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, + 0x81ff, 0x0de8, 0x080c, 0x40db, 0x2009, 0x0001, 0x00f6, 0x2079, + 0x0300, 0x78b8, 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, + 0x00f8, 0x8001, 0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, + 0x1904, 0x417d, 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, + 0x0004, 0x9086, 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, + 0xa212, 0xd1dc, 0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, + 0x00ee, 0x00fe, 0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, + 0x0096, 0xa016, 0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, + 0x831c, 0x831c, 0x938a, 0x0007, 0x1a0c, 0x0d85, 0x9398, 0x4209, + 0x231d, 0x083f, 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, + 0x009e, 0x003e, 0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, + 0xa804, 0xa05a, 0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, + 0x0005, 0x4246, 0x423d, 0x4234, 0x422b, 0x4222, 0x4219, 0x4210, + 0xa964, 0x7902, 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, + 0x0005, 0xa974, 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, + 0x7916, 0x0005, 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, + 0xa990, 0x7916, 0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, + 0x7912, 0xa9a0, 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, + 0xa9ac, 0x7912, 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, + 0x7906, 0xa9bc, 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, + 0xa9c8, 0x7906, 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, + 0x00e6, 0x0086, 0x2071, 0x19e8, 0x2079, 0x0090, 0x792c, 0xd1fc, + 0x01e8, 0x782b, 0x0002, 0x2940, 0x9026, 0x7054, 0x0002, 0x4276, + 0x4262, 0x426d, 0x8001, 0x7056, 0xd19c, 0x1180, 0x2011, 0x0001, + 0x080c, 0x41db, 0x190c, 0x41db, 0x0048, 0x8001, 0x7056, 0x782c, + 0xd0fc, 0x1d38, 0x2011, 0x0001, 0x080c, 0x41db, 0x008e, 0x00ee, + 0x00fe, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, + 0x2001, 0x19ab, 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x19aa, + 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, + 0x9005, 0x0520, 0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, + 0x201c, 0x080c, 0x4c41, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, + 0x978a, 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, + 0x903e, 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, + 0x080c, 0x42f2, 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4c41, + 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, + 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, + 0x2004, 0x9084, 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, + 0x2061, 0x0090, 0x2079, 0x0100, 0x2001, 0x19aa, 0x2004, 0x6036, + 0x2009, 0x0040, 0x080c, 0x2220, 0x2001, 0x002a, 0x2004, 0x9084, + 0xfff8, 0x601a, 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, + 0x000e, 0x78ca, 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, + 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, + 0x20e1, 0x0000, 0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, + 0x9006, 0x700a, 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, + 0x702b, 0x0041, 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, + 0x0040, 0x4005, 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, + 0x2940, 0x0086, 0x080c, 0x4c41, 0x008e, 0xa058, 0x00a6, 0x2050, + 0x2900, 0xb006, 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, + 0x00ee, 0x0005, 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, + 0x2038, 0x2001, 0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, + 0x4c41, 0x2940, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, + 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, + 0x0096, 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, + 0x42f2, 0x1d68, 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4c41, 0x2940, + 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, + 0x2004, 0xa066, 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, + 0x2004, 0x9084, 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, + 0x2001, 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, + 0x0101, 0x200c, 0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, + 0x1a6e, 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, + 0x0300, 0x2003, 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, + 0x0004, 0x200c, 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, + 0x2091, 0x8000, 0x20a9, 0x0007, 0x20a1, 0x1840, 0x20e9, 0x0001, + 0x9006, 0x4004, 0x20a9, 0x0014, 0x20a1, 0xffec, 0x20e9, 0x0000, + 0x9006, 0x4004, 0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, + 0x0052, 0x0108, 0x0005, 0x0804, 0x368d, 0x7d98, 0x7c9c, 0x0804, + 0x3791, 0x080c, 0x779e, 0x190c, 0x6162, 0x6040, 0x9084, 0x0020, + 0x09b1, 0x2069, 0x1847, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, + 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x4c8a, 0x701f, 0x43d1, + 0x0005, 0x080c, 0x584f, 0x1130, 0x3b00, 0x3a08, 0xc194, 0xc095, + 0x20d8, 0x21d0, 0x2069, 0x1847, 0x6800, 0x9005, 0x0904, 0x36c2, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x6804, 0x0118, 0xc0a4, 0xc0ac, + 0x6806, 0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x36c2, 0xd094, 0x00c6, + 0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0x9292, 0x0005, 0x0218, + 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, 0x00ce, 0xd08c, + 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0x918d, 0x0010, 0x0010, + 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, 0x6a28, 0x928a, + 0x007f, 0x1a04, 0x36c2, 0x9288, 0x348e, 0x210d, 0x918c, 0x00ff, + 0x6166, 0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, 0x1a04, 0x36c2, + 0x605e, 0x6888, 0x9084, 0x0030, 0x8004, 0x8004, 0x8004, 0x8004, + 0x0006, 0x2009, 0x19b2, 0x9080, 0x27d0, 0x2005, 0x200a, 0x2008, + 0x2001, 0x0018, 0x080c, 0xaced, 0x2009, 0x0390, 0x200b, 0x0400, + 0x000e, 0x2009, 0x19b3, 0x9080, 0x27d4, 0x2005, 0x200a, 0x6808, + 0x908a, 0x0100, 0x0a04, 0x36c2, 0x908a, 0x0841, 0x1a04, 0x36c2, + 0x9084, 0x0007, 0x1904, 0x36c2, 0x680c, 0x9005, 0x0904, 0x36c2, + 0x6810, 0x9005, 0x0904, 0x36c2, 0x6848, 0x6940, 0x910a, 0x1a04, + 0x36c2, 0x8001, 0x0904, 0x36c2, 0x684c, 0x6944, 0x910a, 0x1a04, + 0x36c2, 0x8001, 0x0904, 0x36c2, 0x6814, 0x908c, 0x00ff, 0x614e, + 0x8007, 0x9084, 0x00ff, 0x6052, 0x080c, 0x7ae7, 0x080c, 0x6cfc, + 0x080c, 0x6d66, 0x6808, 0x602a, 0x080c, 0x2192, 0x2009, 0x0170, + 0x200b, 0x0080, 0xa001, 0xa001, 0x200b, 0x0000, 0x0036, 0x6b08, + 0x080c, 0x272f, 0x003e, 0x6000, 0x9086, 0x0000, 0x1904, 0x456d, + 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, + 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0148, 0x6830, + 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, 0x0010, + 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, 0x8007, 0x810f, + 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0x19b4, 0x20e9, 0x0001, + 0x4001, 0x20a9, 0x0004, 0x20a1, 0x19ce, 0x20e9, 0x0001, 0x4001, + 0x080c, 0x8b26, 0x00c6, 0x900e, 0x20a9, 0x0001, 0x6b70, 0xd384, + 0x01c8, 0x0020, 0x839d, 0x12b0, 0x3508, 0x8109, 0x080c, 0x80fe, + 0x6878, 0x6016, 0x6874, 0x2008, 0x9084, 0xff00, 0x8007, 0x600a, + 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, + 0x6003, 0x0001, 0x1f04, 0x44c2, 0x00ce, 0x00c6, 0x2061, 0x199c, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x11a8, 0x6a88, 0x9284, 0xc000, + 0x2010, 0x9286, 0x0000, 0x1158, 0x2063, 0x0000, 0x2001, 0x0001, + 0x080c, 0x29ca, 0x2001, 0x0001, 0x080c, 0x29ad, 0x0088, 0x9286, + 0x4000, 0x1148, 0x2063, 0x0001, 0x9006, 0x080c, 0x29ca, 0x9006, + 0x080c, 0x29ad, 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063, 0x0002, + 0x00ce, 0x00e6, 0x2c70, 0x080c, 0x0ed3, 0x00ee, 0x080c, 0x2af6, + 0x080c, 0x2b29, 0x6888, 0xd0ec, 0x0130, 0x2011, 0x0114, 0x2204, + 0x9085, 0x0180, 0x2012, 0x6a80, 0x9284, 0x0030, 0x9086, 0x0030, + 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, 0x2001, 0x197c, + 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, 0x928e, 0x0010, + 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x27a4, + 0x2001, 0x196d, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, + 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x779e, 0x0128, + 0x080c, 0x5128, 0x0110, 0x080c, 0x26f5, 0x60d4, 0x9005, 0x01c0, + 0x6003, 0x0001, 0x2009, 0x4555, 0x00e0, 0x080c, 0x779e, 0x1168, + 0x2011, 0x7612, 0x080c, 0x8993, 0x2011, 0x7605, 0x080c, 0x8a9f, + 0x080c, 0x7abb, 0x080c, 0x76cd, 0x0040, 0x080c, 0x6058, 0x0028, + 0x6003, 0x0004, 0x2009, 0x456d, 0x0020, 0x080c, 0x6b73, 0x0804, + 0x368d, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, + 0x1118, 0x2091, 0x31bd, 0x0817, 0x2091, 0x313d, 0x0817, 0x6000, + 0x9086, 0x0000, 0x0904, 0x36bf, 0x2069, 0x1847, 0x7890, 0x6842, + 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x2039, 0x0001, 0x0804, 0x4c8d, 0x9006, 0x080c, 0x26f5, + 0x81ff, 0x1904, 0x36bf, 0x080c, 0x779e, 0x11b0, 0x080c, 0x7ab6, + 0x080c, 0x619d, 0x080c, 0x3482, 0x0118, 0x6130, 0xc18d, 0x6132, + 0x080c, 0xd645, 0x0130, 0x080c, 0x77c1, 0x1118, 0x080c, 0x7772, + 0x0038, 0x080c, 0x76cd, 0x0020, 0x080c, 0x6162, 0x080c, 0x6058, + 0x0804, 0x368d, 0x81ff, 0x1904, 0x36bf, 0x080c, 0x779e, 0x1110, + 0x0804, 0x36bf, 0x0126, 0x2091, 0x8000, 0x6194, 0x81ff, 0x0190, + 0x704f, 0x0000, 0x2001, 0x1d80, 0x2009, 0x0040, 0x7a8c, 0x7b88, + 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x4c8d, 0x701f, 0x368b, + 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1d80, 0x20a9, + 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1d80, 0x2019, 0xffff, 0x4304, + 0x655c, 0x9588, 0x348e, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, + 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x67b4, 0x1190, + 0xb814, 0x821c, 0x0238, 0x9398, 0x1d80, 0x9085, 0xff00, 0x8007, + 0x201a, 0x0038, 0x9398, 0x1d80, 0x2324, 0x94a4, 0xff00, 0x9405, + 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, + 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, + 0x1d80, 0x2099, 0x1d80, 0x080c, 0x60ed, 0x0804, 0x45ca, 0x080c, + 0x4c74, 0x0904, 0x36c2, 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, + 0x0804, 0x36bf, 0x080c, 0x5840, 0xd0b4, 0x0558, 0x7884, 0x908e, + 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, + 0x080c, 0x347d, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, + 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, + 0xa86a, 0x080c, 0xd0ec, 0x1120, 0x2009, 0x0003, 0x0804, 0x36bf, + 0x7007, 0x0003, 0x701f, 0x4655, 0x0005, 0x080c, 0x4c74, 0x0904, + 0x36c2, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, 0x2098, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, + 0x9080, 0x0006, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, + 0x2098, 0x080c, 0x0fd6, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, + 0x000a, 0x20a0, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x000a, 0x2098, + 0x080c, 0x0fd6, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x0804, 0x4c8d, 0x81ff, 0x1904, 0x36bf, 0x080c, 0x4c58, + 0x0904, 0x36c2, 0x080c, 0x6a00, 0x0904, 0x36bf, 0x0058, 0xa878, + 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x36bf, 0xa974, 0xaa94, + 0x0804, 0x368d, 0x080c, 0x5848, 0x0904, 0x368d, 0x701f, 0x469f, + 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x36bf, 0x7888, 0x908a, + 0x1000, 0x1a04, 0x36c2, 0x080c, 0x4c74, 0x0904, 0x36c2, 0x080c, + 0x6c11, 0x0120, 0x080c, 0x6c19, 0x1904, 0x36c2, 0x080c, 0x6a85, + 0x0904, 0x36bf, 0x2019, 0x0004, 0x900e, 0x080c, 0x6a12, 0x0904, + 0x36bf, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, + 0x12f8, 0x080c, 0x4c72, 0x01e0, 0x080c, 0x6c11, 0x0118, 0x080c, + 0x6c19, 0x11b0, 0x080c, 0x6a85, 0x2009, 0x0002, 0x0168, 0x2009, + 0x0002, 0x2019, 0x0004, 0x080c, 0x6a12, 0x2009, 0x0003, 0x0120, + 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, + 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, + 0xa897, 0x4000, 0x080c, 0x5848, 0x0110, 0x9006, 0x0018, 0x900e, + 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, + 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x645c, 0x2400, + 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, + 0x67b4, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, + 0x89a1, 0x0005, 0x81ff, 0x1904, 0x36bf, 0x798c, 0x2001, 0x1980, + 0x918c, 0x8000, 0x2102, 0x080c, 0x4c58, 0x0904, 0x36c2, 0x080c, + 0x6c11, 0x0120, 0x080c, 0x6c19, 0x1904, 0x36c2, 0x080c, 0x687b, + 0x0904, 0x36bf, 0x080c, 0x6a09, 0x0904, 0x36bf, 0x2001, 0x1980, + 0x2004, 0xd0fc, 0x1904, 0x368d, 0x0804, 0x46aa, 0xa9a0, 0x2001, + 0x1980, 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4c65, 0x01a0, + 0x080c, 0x6c11, 0x0118, 0x080c, 0x6c19, 0x1170, 0x080c, 0x687b, + 0x2009, 0x0002, 0x0128, 0x080c, 0x6a09, 0x1170, 0x2009, 0x0003, + 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, + 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x1980, + 0x2004, 0xd0fc, 0x1128, 0x080c, 0x5848, 0x0110, 0x9006, 0x0018, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x81ff, 0x1904, + 0x36bf, 0x798c, 0x2001, 0x197f, 0x918c, 0x8000, 0x2102, 0x080c, + 0x4c58, 0x0904, 0x36c2, 0x080c, 0x6c11, 0x0120, 0x080c, 0x6c19, + 0x1904, 0x36c2, 0x080c, 0x687b, 0x0904, 0x36bf, 0x080c, 0x69f7, + 0x0904, 0x36bf, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1904, 0x368d, + 0x0804, 0x46aa, 0xa9a0, 0x2001, 0x197f, 0x918c, 0x8000, 0xc18d, + 0x2102, 0x080c, 0x4c65, 0x01a0, 0x080c, 0x6c11, 0x0118, 0x080c, + 0x6c19, 0x1170, 0x080c, 0x687b, 0x2009, 0x0002, 0x0128, 0x080c, + 0x69f7, 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, + 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, + 0xa897, 0x4000, 0x2001, 0x197f, 0x2004, 0xd0fc, 0x1128, 0x080c, + 0x5848, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, 0x0001, 0x2001, + 0x0000, 0x0005, 0x6100, 0x0804, 0x368d, 0x080c, 0x4c74, 0x0904, + 0x36c2, 0x080c, 0x5854, 0x1904, 0x36bf, 0x79a8, 0xd184, 0x1158, + 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a, 0xbb2c, 0x831f, + 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e, 0xb820, 0x8007, + 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, 0x918c, 0x0202, + 0x0804, 0x368d, 0x78a8, 0x909c, 0x0003, 0xd0ac, 0x1150, 0xd0b4, + 0x1140, 0x939a, 0x0003, 0x1a04, 0x36bf, 0x625c, 0x7884, 0x9206, + 0x1548, 0x080c, 0x8b10, 0x2001, 0xffec, 0x2009, 0x000c, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0000, 0x0006, 0x78a8, 0x9084, + 0x0080, 0x1118, 0x000e, 0x0804, 0x4c8d, 0x000e, 0x2031, 0x0000, + 0x2061, 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, + 0xa392, 0xa496, 0xa59a, 0x080c, 0x114e, 0x7007, 0x0002, 0x701f, + 0x4862, 0x0005, 0x81ff, 0x1904, 0x36bf, 0x080c, 0x4c74, 0x0904, + 0x36c2, 0x080c, 0x6c11, 0x1904, 0x36bf, 0x00c6, 0x080c, 0x4c41, + 0x00ce, 0x0904, 0x36bf, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, + 0x7ea8, 0x080c, 0xd092, 0x0904, 0x36bf, 0x7007, 0x0003, 0x701f, + 0x4866, 0x0005, 0x080c, 0x4397, 0x0804, 0x368d, 0xa830, 0x9086, + 0x0100, 0x0904, 0x36bf, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009, 0x000c, 0x7a8c, 0x7b88, + 0x7c9c, 0x7d98, 0x0804, 0x4c8d, 0x9006, 0x080c, 0x26f5, 0x78a8, + 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118, 0x81ff, 0x1904, 0x36bf, + 0x080c, 0x779e, 0x0110, 0x080c, 0x6162, 0x7888, 0x908a, 0x1000, + 0x1a04, 0x36c2, 0x7984, 0x9186, 0x00ff, 0x0138, 0x9182, 0x007f, + 0x1a04, 0x36c2, 0x2100, 0x080c, 0x26bf, 0x0026, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x2061, 0x1a04, 0x601b, 0x0000, 0x601f, 0x0000, + 0x607b, 0x0000, 0x607f, 0x0000, 0x080c, 0x779e, 0x1158, 0x080c, + 0x7ab6, 0x080c, 0x619d, 0x9085, 0x0001, 0x080c, 0x77e2, 0x080c, + 0x76cd, 0x00f0, 0x080c, 0xacfc, 0x080c, 0xb09b, 0x080c, 0xad18, + 0x2061, 0x0100, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x810f, + 0x9105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1999, + 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, 0x6088, 0x080c, 0x8a5d, + 0x7984, 0x080c, 0x779e, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, + 0x470d, 0x012e, 0x00ce, 0x002e, 0x0804, 0x368d, 0x7984, 0x080c, + 0x6749, 0x2b08, 0x1904, 0x36c2, 0x0804, 0x368d, 0x81ff, 0x0120, + 0x2009, 0x0001, 0x0804, 0x36bf, 0x60dc, 0xd0ac, 0x1130, 0xd09c, + 0x1120, 0x2009, 0x0005, 0x0804, 0x36bf, 0x080c, 0x4c41, 0x1120, + 0x2009, 0x0002, 0x0804, 0x36bf, 0x7984, 0x81ff, 0x0904, 0x36c2, + 0x9192, 0x0021, 0x1a04, 0x36c2, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, + 0xa85c, 0x9080, 0x0019, 0x702a, 0xaf60, 0x7736, 0x080c, 0x4c8a, + 0x701f, 0x4921, 0x7880, 0x9086, 0x006e, 0x0110, 0x701f, 0x52da, + 0x0005, 0x2009, 0x0080, 0x080c, 0x67b4, 0x1118, 0x080c, 0x6c11, + 0x0120, 0x2021, 0x400a, 0x0804, 0x368f, 0x00d6, 0x0096, 0xa964, + 0xaa6c, 0xab70, 0xac74, 0xad78, 0xae7c, 0xa884, 0x90be, 0x0100, + 0x0904, 0x49ba, 0x90be, 0x0112, 0x0904, 0x49ba, 0x90be, 0x0113, + 0x0904, 0x49ba, 0x90be, 0x0114, 0x0904, 0x49ba, 0x90be, 0x0117, + 0x0904, 0x49ba, 0x90be, 0x011a, 0x0904, 0x49ba, 0x90be, 0x011c, + 0x0904, 0x49ba, 0x90be, 0x0121, 0x0904, 0x49a1, 0x90be, 0x0131, + 0x0904, 0x49a1, 0x90be, 0x0171, 0x0904, 0x49ba, 0x90be, 0x0173, + 0x0904, 0x49ba, 0x90be, 0x01a1, 0x1128, 0xa894, 0x8007, 0xa896, + 0x0804, 0x49c5, 0x90be, 0x0212, 0x0904, 0x49ae, 0x90be, 0x0213, + 0x05e8, 0x90be, 0x0214, 0x0500, 0x90be, 0x0217, 0x0188, 0x90be, + 0x021a, 0x1120, 0xa89c, 0x8007, 0xa89e, 0x04e0, 0x90be, 0x021f, + 0x05c8, 0x90be, 0x0300, 0x05b0, 0x009e, 0x00de, 0x0804, 0x36c2, + 0x7028, 0x9080, 0x0010, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, + 0x20a9, 0x0007, 0x080c, 0x4a03, 0x7028, 0x9080, 0x000e, 0x2098, + 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4a03, + 0x00c8, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, + 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4a10, 0x00b8, 0x7028, 0x9080, + 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, + 0x080c, 0x4a10, 0x7028, 0x9080, 0x000c, 0x2098, 0x20a0, 0x7034, + 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x04f1, 0x00c6, 0x080c, 0x4c41, + 0x0550, 0xa868, 0xc0fd, 0xa86a, 0xa867, 0x0119, 0x9006, 0xa882, + 0xa87f, 0x0020, 0xa88b, 0x0001, 0x810b, 0xa9ae, 0xa8b2, 0xaab6, + 0xabba, 0xacbe, 0xadc2, 0xa9c6, 0xa8ca, 0x00ce, 0x009e, 0x00de, + 0xa866, 0xa822, 0xa868, 0xc0fd, 0xa86a, 0xa804, 0x2048, 0x080c, + 0xd0ad, 0x1120, 0x2009, 0x0003, 0x0804, 0x36bf, 0x7007, 0x0003, + 0x701f, 0x49fa, 0x0005, 0x00ce, 0x009e, 0x00de, 0x2009, 0x0002, + 0x0804, 0x36bf, 0xa820, 0x9086, 0x8001, 0x1904, 0x368d, 0x2009, + 0x0004, 0x0804, 0x36bf, 0x0016, 0x0026, 0x3510, 0x20a9, 0x0002, + 0x4002, 0x4104, 0x4004, 0x8211, 0x1dc8, 0x002e, 0x001e, 0x0005, + 0x0016, 0x0026, 0x0036, 0x0046, 0x3520, 0x20a9, 0x0004, 0x4002, + 0x4304, 0x4204, 0x4104, 0x4004, 0x8421, 0x1db8, 0x004e, 0x003e, + 0x002e, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, + 0x36bf, 0x60dc, 0xd0ac, 0x1188, 0x2009, 0x180d, 0x210c, 0xd18c, + 0x0130, 0xd09c, 0x0120, 0x2009, 0x0016, 0x0804, 0x36bf, 0xd09c, + 0x1120, 0x2009, 0x0005, 0x0804, 0x36bf, 0x7984, 0x78a8, 0x2040, + 0x080c, 0xb094, 0x1120, 0x9182, 0x007f, 0x0a04, 0x36c2, 0x9186, + 0x00ff, 0x0904, 0x36c2, 0x9182, 0x0800, 0x1a04, 0x36c2, 0x7a8c, + 0x7b88, 0x607c, 0x9306, 0x1158, 0x6080, 0x924e, 0x0904, 0x36c2, + 0x080c, 0xb094, 0x1120, 0x99cc, 0xff00, 0x0904, 0x36c2, 0x0126, + 0x2091, 0x8000, 0x2001, 0x180d, 0x2004, 0xd08c, 0x0198, 0x9386, + 0x00ff, 0x0180, 0x0026, 0x2011, 0x8008, 0x080c, 0x6c35, 0x002e, + 0x0148, 0x918d, 0x8000, 0x080c, 0x6c7f, 0x1120, 0x2001, 0x4009, + 0x0804, 0x4ac1, 0x080c, 0x4b54, 0x0904, 0x4ac7, 0x0086, 0x90c6, + 0x4000, 0x008e, 0x1538, 0x00c6, 0x0006, 0x0036, 0xb818, 0xbb1c, + 0x9305, 0xbb20, 0x9305, 0xbb24, 0x9305, 0xbb28, 0x9305, 0xbb2c, + 0x9305, 0xbb30, 0x9305, 0xbb34, 0x9305, 0x003e, 0x0570, 0xd88c, + 0x1128, 0x080c, 0x6c11, 0x0110, 0xc89d, 0x0438, 0x900e, 0x080c, + 0x6aae, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x000e, + 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x0090, 0x90c6, + 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, 0x4009, 0x1108, + 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, 0x4005, 0x2009, + 0x000a, 0x2020, 0x012e, 0x0804, 0x368f, 0x000e, 0x00ce, 0x2b00, + 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0xb1dd, + 0x0904, 0x4b1c, 0x2b00, 0x6012, 0x080c, 0xd3b6, 0x2e58, 0x00ee, + 0x00e6, 0x00c6, 0x080c, 0x4c41, 0x00ce, 0x2b70, 0x1158, 0x080c, + 0xb16c, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, + 0x0804, 0x36bf, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, + 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0xd89c, 0x1110, + 0x080c, 0x3315, 0x6023, 0x0001, 0x9006, 0x080c, 0x66e6, 0xd89c, + 0x0138, 0x2001, 0x0004, 0x080c, 0x66fa, 0x2009, 0x0003, 0x0030, + 0x2001, 0x0002, 0x080c, 0x66fa, 0x2009, 0x0002, 0x080c, 0xb20a, + 0x78a8, 0xd094, 0x0138, 0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8d4, + 0xc08d, 0xb8d6, 0x9085, 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, + 0x012e, 0x1120, 0x2009, 0x0003, 0x0804, 0x36bf, 0x7007, 0x0003, + 0x701f, 0x4b2b, 0x0005, 0xa830, 0x2009, 0x180d, 0x210c, 0xd18c, + 0x0140, 0x2008, 0x918e, 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, + 0x368f, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, + 0xba04, 0x9294, 0x00ff, 0x0804, 0x578e, 0x900e, 0xa868, 0xd0f4, + 0x1904, 0x368d, 0x080c, 0x6aae, 0x1108, 0xc185, 0xb800, 0xd0bc, + 0x0108, 0xc18d, 0x0804, 0x368d, 0x00e6, 0x00d6, 0x0096, 0x83ff, + 0x0904, 0x4ba3, 0x902e, 0x080c, 0xb094, 0x0130, 0x9026, 0x20a9, + 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, + 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b8, 0x2100, 0x9406, 0x1904, + 0x4bb4, 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1558, + 0x0030, 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x1520, 0x93ce, + 0x00ff, 0x1508, 0xc5fd, 0x0480, 0x2058, 0xbf10, 0x2700, 0x9306, + 0x11e8, 0xbe14, 0x2600, 0x9206, 0x11c8, 0x2400, 0x9106, 0x1180, + 0xd884, 0x0598, 0xd894, 0x1588, 0x080c, 0x6bb1, 0x1570, 0x2001, + 0x4000, 0x0460, 0x080c, 0x6c11, 0x1540, 0x2001, 0x4000, 0x0430, + 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, 0x9106, + 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0918, 0x080c, 0xb094, + 0x1900, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, 0x4b6a, + 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, 0x0030, + 0x080c, 0x6749, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, 0x009e, + 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, + 0x36bf, 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, + 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, 0x0904, + 0x36c2, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, 0x36c2, + 0x2010, 0x2918, 0x080c, 0x32b5, 0x1120, 0x2009, 0x0003, 0x0804, + 0x36bf, 0x7007, 0x0003, 0x701f, 0x4bf6, 0x0005, 0xa830, 0x9086, + 0x0100, 0x1904, 0x368d, 0x2009, 0x0004, 0x0804, 0x36bf, 0x7984, + 0x080c, 0xb094, 0x1120, 0x9182, 0x007f, 0x0a04, 0x36c2, 0x9186, + 0x00ff, 0x0904, 0x36c2, 0x9182, 0x0800, 0x1a04, 0x36c2, 0x2001, + 0x9400, 0x080c, 0x57e9, 0x1904, 0x36bf, 0x0804, 0x368d, 0xa998, + 0x080c, 0xb094, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, 0x00ff, + 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9400, 0x080c, 0x57e9, + 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, 0x000a, + 0x0c48, 0x080c, 0x1059, 0x0198, 0x9006, 0xa802, 0x7014, 0x9005, + 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, 0x0086, + 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, 0x0005, + 0x7984, 0x080c, 0x67b4, 0x1130, 0x7e88, 0x9684, 0x3fff, 0x9082, + 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, 0x67b4, + 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, 0x905e, + 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, 0x67b4, + 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, 0x81ff, + 0x0128, 0x2148, 0xa904, 0x080c, 0x108b, 0x0cc8, 0x7116, 0x711a, + 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, 0x2061, + 0x18b8, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, 0xa392, + 0xa496, 0xa59a, 0x080c, 0x114e, 0x7007, 0x0002, 0x701f, 0x368d, + 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, 0x2001, + 0x18b0, 0x2004, 0x9005, 0x1190, 0x0e04, 0x4cbe, 0x7a36, 0x7833, + 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x190c, 0x1200, 0x0804, 0x4d24, 0x0016, 0x0086, + 0x0096, 0x00c6, 0x00e6, 0x2071, 0x189e, 0x7044, 0x9005, 0x1540, + 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, 0x1059, + 0x0904, 0x4d1c, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, 0x0002, + 0x9080, 0x1ec1, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, 0x0004, + 0x2001, 0x18ba, 0x9c82, 0x18fa, 0x0210, 0x2061, 0x18ba, 0x2c00, + 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, 0x0460, + 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, 0x0016, + 0x908a, 0x0036, 0x1a0c, 0x0d85, 0x2060, 0x001e, 0x8108, 0x2105, + 0x9005, 0xa146, 0x1520, 0x080c, 0x1059, 0x1130, 0x8109, 0xa946, + 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, 0xa046, + 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, 0x9080, + 0x1ec1, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, 0x00ee, + 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, 0x2c00, + 0x9082, 0x001b, 0x0002, 0x4d46, 0x4d46, 0x4d48, 0x4d46, 0x4d46, + 0x4d46, 0x4d4c, 0x4d46, 0x4d46, 0x4d46, 0x4d50, 0x4d46, 0x4d46, + 0x4d46, 0x4d54, 0x4d46, 0x4d46, 0x4d46, 0x4d58, 0x4d46, 0x4d46, + 0x4d46, 0x4d5c, 0x4d46, 0x4d46, 0x4d46, 0x4d61, 0x080c, 0x0d85, + 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, 0x0878, + 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, 0x0838, + 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, 0x0804, + 0x4d1f, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x4d1f, 0x00e6, 0x2071, + 0x189e, 0x7048, 0x9005, 0x0904, 0x4df8, 0x0126, 0x2091, 0x8000, + 0x0e04, 0x4df7, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, 0x0086, + 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, 0xa948, + 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0d85, 0x2060, 0x001e, + 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x4dfa, 0xa804, 0x9005, + 0x090c, 0x0d85, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, 0x2001, + 0x0002, 0x9080, 0x1ec1, 0x2005, 0xa04a, 0x0804, 0x4dfa, 0x703c, + 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, 0x7833, + 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x87ff, 0x0118, + 0x2748, 0x080c, 0x108b, 0x7048, 0x8001, 0x704a, 0x9005, 0x1170, + 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x108b, 0x9006, 0x7042, + 0x7046, 0x703b, 0x18ba, 0x703f, 0x18ba, 0x0420, 0x7040, 0x9005, + 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, 0x90fa, + 0x18fa, 0x0210, 0x2001, 0x18ba, 0x703e, 0x00a0, 0x9006, 0x703e, + 0x703a, 0x7044, 0x9005, 0x090c, 0x0d85, 0x2048, 0xa800, 0x9005, + 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1ec1, 0x2005, + 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, 0x012e, + 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x4e19, 0x4e19, + 0x4e1b, 0x4e19, 0x4e19, 0x4e19, 0x4e20, 0x4e19, 0x4e19, 0x4e19, + 0x4e25, 0x4e19, 0x4e19, 0x4e19, 0x4e2a, 0x4e19, 0x4e19, 0x4e19, + 0x4e2f, 0x4e19, 0x4e19, 0x4e19, 0x4e34, 0x4e19, 0x4e19, 0x4e19, + 0x4e39, 0x080c, 0x0d85, 0xaa74, 0xab78, 0xac7c, 0x0804, 0x4da5, + 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4da5, 0xaa94, 0xab98, 0xac9c, + 0x0804, 0x4da5, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4da5, 0xaab4, + 0xabb8, 0xacbc, 0x0804, 0x4da5, 0xaac4, 0xabc8, 0xaccc, 0x0804, + 0x4da5, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x4da5, 0x0016, 0x0026, + 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, 0x080c, 0x67b4, 0x2019, + 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, 0x801b, + 0x080c, 0x4ca1, 0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, 0x0005, + 0x0026, 0x080c, 0x5840, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, + 0x4ca1, 0x002e, 0x0005, 0x81ff, 0x1904, 0x36bf, 0x0126, 0x2091, + 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x779e, + 0x1158, 0x080c, 0x7ab6, 0x080c, 0x619d, 0x9085, 0x0001, 0x080c, + 0x77e2, 0x080c, 0x76cd, 0x0010, 0x080c, 0x6058, 0x012e, 0x0804, + 0x368d, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x36bf, 0x080c, + 0x5854, 0x0120, 0x2009, 0x0007, 0x0804, 0x36bf, 0x080c, 0x6c09, + 0x0120, 0x2009, 0x0008, 0x0804, 0x36bf, 0x2001, 0x180d, 0x2004, + 0xd08c, 0x0178, 0x0026, 0x2011, 0x0010, 0x080c, 0x6c35, 0x002e, + 0x0140, 0x7984, 0x080c, 0x6c7f, 0x1120, 0x2009, 0x4009, 0x0804, + 0x36bf, 0x7984, 0x080c, 0x6749, 0x1904, 0x36c2, 0x080c, 0x4c74, + 0x0904, 0x36c2, 0x2b00, 0x7026, 0x080c, 0x6c11, 0x7888, 0x1170, + 0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x6aae, 0x1108, 0xc185, + 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x368d, 0x080c, 0x4c41, + 0x0904, 0x36bf, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, + 0x080c, 0xd154, 0x0904, 0x36bf, 0x7888, 0xd094, 0x0118, 0xb8d4, + 0xc08d, 0xb8d6, 0x7007, 0x0003, 0x701f, 0x4f28, 0x0005, 0x2061, + 0x1800, 0x080c, 0x5854, 0x2009, 0x0007, 0x1560, 0x080c, 0x6c09, + 0x0118, 0x2009, 0x0008, 0x0430, 0xa998, 0x080c, 0x6749, 0x1530, + 0x080c, 0x4c72, 0x0518, 0x080c, 0x6c11, 0xa89c, 0x1168, 0x9084, + 0x0005, 0x1150, 0x900e, 0x080c, 0x6aae, 0x1108, 0xc185, 0xb800, + 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, 0xc0fc, 0xa86a, 0x080c, + 0xd154, 0x11e0, 0xa89c, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, + 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, + 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, 0x0005, 0x9006, 0x0005, + 0xa830, 0x2009, 0x180d, 0x210c, 0xd18c, 0x0140, 0x2008, 0x918e, + 0xdead, 0x1120, 0x2021, 0x4009, 0x0804, 0x368f, 0x9086, 0x0100, + 0x7024, 0x2058, 0x1110, 0x0804, 0x578e, 0x900e, 0x080c, 0x6aae, + 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x368d, + 0x080c, 0x5854, 0x0120, 0x2009, 0x0007, 0x0804, 0x36bf, 0x7f84, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4c41, 0x1120, 0x2009, + 0x0002, 0x0804, 0x36bf, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860, + 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, + 0x67b4, 0x1904, 0x4fde, 0x080c, 0x6c11, 0x0138, 0x080c, 0x6c19, + 0x0120, 0x080c, 0x6bb1, 0x1904, 0x4fde, 0xd794, 0x1110, 0xd784, + 0x01a8, 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x3400, + 0xd794, 0x0198, 0x20a9, 0x0008, 0x4003, 0x2098, 0x20a0, 0x3d00, + 0x20e0, 0x20a9, 0x0002, 0x080c, 0x4a10, 0x0080, 0xb8c4, 0x20e0, + 0xb8c8, 0x9080, 0x000a, 0x2098, 0x3400, 0x20a9, 0x0004, 0x4003, + 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x4a10, 0x9186, 0x007e, + 0x0170, 0x9186, 0x0080, 0x0158, 0x080c, 0x6c11, 0x90c2, 0x0006, + 0x1210, 0xc1fd, 0x0020, 0x080c, 0x6aae, 0x1108, 0xc1fd, 0x4104, + 0xc1fc, 0xd794, 0x0528, 0xb8c4, 0x20e0, 0xb8c8, 0x2060, 0x9c80, + 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, 0x9c80, 0x0003, 0x2098, + 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, 0x2098, 0x3400, 0x20a9, + 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x080c, 0x4a03, + 0x9c80, 0x0026, 0x2098, 0xb8c4, 0x20e0, 0x20a9, 0x0002, 0x4003, + 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, 0x0005, 0x8108, 0x080c, + 0xb094, 0x0118, 0x9186, 0x0800, 0x0040, 0xd78c, 0x0120, 0x9186, + 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, 0x0150, 0xd794, 0x0118, + 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, 0x0150, 0x0804, 0x4f67, + 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, 0x368d, 0x7033, 0x0001, + 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, 0x2061, 0x18b8, 0x2c44, + 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, 0x7028, 0xa076, 0xa28e, + 0xa392, 0xa496, 0xa59a, 0x080c, 0x114e, 0x7007, 0x0002, 0x701f, + 0x501a, 0x0005, 0x7030, 0x9005, 0x1180, 0x7120, 0x7028, 0x20a0, + 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa28c, + 0xa390, 0xa494, 0xa598, 0x0804, 0x4f67, 0x7124, 0x810b, 0x0804, + 0x368d, 0x2029, 0x007e, 0x7984, 0x7a88, 0x7b8c, 0x7c98, 0x9184, + 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x36c2, 0x9502, 0x0a04, + 0x36c2, 0x9184, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x36c2, 0x9502, + 0x0a04, 0x36c2, 0x9284, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, + 0x36c2, 0x9502, 0x0a04, 0x36c2, 0x9284, 0x00ff, 0x90e2, 0x0020, + 0x0a04, 0x36c2, 0x9502, 0x0a04, 0x36c2, 0x9384, 0xff00, 0x8007, + 0x90e2, 0x0020, 0x0a04, 0x36c2, 0x9502, 0x0a04, 0x36c2, 0x9384, + 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x36c2, 0x9502, 0x0a04, 0x36c2, + 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x36c2, 0x9502, + 0x0a04, 0x36c2, 0x9484, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x36c2, + 0x9502, 0x0a04, 0x36c2, 0x2061, 0x1989, 0x6102, 0x6206, 0x630a, + 0x640e, 0x0804, 0x368d, 0x080c, 0x4c41, 0x0904, 0x36bf, 0x2009, + 0x0016, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, + 0xaf60, 0x080c, 0x4c8a, 0x701f, 0x509e, 0x0005, 0x20a9, 0x0016, + 0x896e, 0x8d6e, 0x8d6f, 0x9d84, 0xffc0, 0x9080, 0x0019, 0x2098, + 0x9d84, 0x003f, 0x20e0, 0x2069, 0x1877, 0x20e9, 0x0001, 0x2da0, + 0x4003, 0x6800, 0x9005, 0x0904, 0x5105, 0x6804, 0x2008, 0x918c, + 0xfff8, 0x1904, 0x5105, 0x680c, 0x9005, 0x0904, 0x5105, 0x9082, + 0xff01, 0x1a04, 0x5105, 0x6810, 0x9082, 0x005c, 0x06f0, 0x6824, + 0x2008, 0x9082, 0x0008, 0x06c8, 0x9182, 0x0400, 0x16b0, 0x0056, + 0x2029, 0x0000, 0x080c, 0x9077, 0x005e, 0x6944, 0x6820, 0x9102, + 0x0660, 0x6820, 0x9082, 0x0019, 0x1640, 0x6828, 0x6944, 0x810c, + 0x9102, 0x0618, 0x6840, 0x9082, 0x000f, 0x12f8, 0x080c, 0x1072, + 0x2900, 0x0590, 0x684e, 0x00e6, 0x2071, 0x1931, 0x00b6, 0x2059, + 0x0000, 0x080c, 0x8f33, 0x00be, 0x00ee, 0x01e8, 0x080c, 0x8c78, + 0x080c, 0x8cc7, 0x1160, 0x6857, 0x0000, 0x00c6, 0x6b10, 0x2061, + 0x1a6e, 0x630e, 0x00ce, 0x0804, 0x368d, 0x0804, 0x36c2, 0x080c, + 0x8cc0, 0x00e6, 0x2071, 0x1931, 0x080c, 0x90f7, 0x080c, 0x9106, + 0x080c, 0x8f18, 0x00ee, 0x2001, 0x188a, 0x204c, 0x080c, 0x108b, + 0x2001, 0x188a, 0x2003, 0x0000, 0x0804, 0x36bf, 0x0126, 0x2091, + 0x8000, 0x080c, 0x94b8, 0x080c, 0x8cc0, 0x012e, 0x0804, 0x368d, + 0x0006, 0x080c, 0x5840, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, + 0x5844, 0xd0bc, 0x000e, 0x0005, 0x6174, 0x7a84, 0x6300, 0x82ff, + 0x1118, 0x7986, 0x0804, 0x368d, 0x83ff, 0x1904, 0x36c2, 0x2001, + 0xfff0, 0x9200, 0x1a04, 0x36c2, 0x2019, 0xffff, 0x6078, 0x9302, + 0x9200, 0x0a04, 0x36c2, 0x7986, 0x6276, 0x0804, 0x368d, 0x080c, + 0x5854, 0x1904, 0x36bf, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, + 0x4c41, 0x0904, 0x36bf, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, + 0x20e8, 0x7036, 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, + 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6c11, 0x0118, 0x080c, + 0x6c19, 0x1148, 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, + 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, + 0x003c, 0x0170, 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, + 0x0003, 0x080c, 0x955b, 0x2208, 0x0804, 0x368d, 0x7033, 0x0001, + 0x7122, 0x7024, 0x9300, 0x7026, 0x2061, 0x18b8, 0x2c44, 0xa06b, + 0x0000, 0xa37a, 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, + 0xa696, 0xa79a, 0x080c, 0x114e, 0x7007, 0x0002, 0x701f, 0x51a9, + 0x0005, 0x7030, 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, + 0x7034, 0x20e8, 0x2061, 0x18b8, 0x2c44, 0xa48c, 0xa590, 0xa694, + 0xa798, 0x0804, 0x5167, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, + 0x955b, 0x2208, 0x0804, 0x368d, 0x00f6, 0x00e6, 0x080c, 0x5854, + 0x2009, 0x0007, 0x1904, 0x523c, 0x2071, 0x189e, 0x745c, 0x84ff, + 0x2009, 0x000e, 0x1904, 0x523c, 0xac9c, 0xad98, 0xaea4, 0xafa0, + 0x0096, 0x080c, 0x1072, 0x2009, 0x0002, 0x0904, 0x523c, 0x2900, + 0x705e, 0x900e, 0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, + 0x9080, 0x0003, 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, + 0x0178, 0x080c, 0x6c11, 0x0118, 0x080c, 0x6c19, 0x1148, 0xb814, + 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, + 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, + 0x83ff, 0x11c0, 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x955b, + 0x2208, 0x009e, 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, + 0x0d85, 0x2148, 0x080c, 0x108b, 0x9006, 0x705e, 0x918d, 0x0001, + 0x2008, 0x0418, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, + 0x2061, 0x18b9, 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, + 0xa48e, 0xa592, 0xa696, 0xa79a, 0xa09f, 0x5248, 0x000e, 0xa0a2, + 0x080c, 0x114e, 0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, + 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, + 0x00f6, 0xa0a0, 0x904d, 0x090c, 0x0d85, 0x00e6, 0x2071, 0x189e, + 0xa06c, 0x908e, 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, + 0xa897, 0x4002, 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, + 0x20a0, 0x901e, 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, + 0x0428, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, + 0x900e, 0x2001, 0x0003, 0x080c, 0x955b, 0xaa9a, 0x715c, 0x81ff, + 0x090c, 0x0d85, 0x2148, 0x080c, 0x108b, 0x705f, 0x0000, 0xa0a0, + 0x2048, 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0xa09f, + 0x0000, 0xa0a3, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, + 0x2b5c, 0x8bff, 0x0178, 0x080c, 0x6c11, 0x0118, 0x080c, 0x6c19, + 0x1148, 0xb814, 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, + 0x9398, 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, + 0x0518, 0x0c20, 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, + 0x4000, 0x715c, 0x81ff, 0x090c, 0x0d85, 0x2148, 0x080c, 0x108b, + 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, + 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0xa09f, 0x0000, 0xa0a3, + 0x0000, 0x0070, 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, + 0xa37a, 0xa48e, 0xa592, 0xa696, 0xa79a, 0x080c, 0x114e, 0x9006, + 0x00ee, 0x0005, 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, + 0x7100, 0x0130, 0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x36c2, + 0xa884, 0xa988, 0x080c, 0x268c, 0x1518, 0x080c, 0x6749, 0x1500, + 0x7126, 0xbe12, 0xbd16, 0xae7c, 0x080c, 0x4c41, 0x01c8, 0x080c, + 0x4c41, 0x01b0, 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, + 0xa823, 0x0000, 0xa804, 0x2048, 0x080c, 0xd0cd, 0x1120, 0x2009, + 0x0003, 0x0804, 0x36bf, 0x7007, 0x0003, 0x701f, 0x5315, 0x0005, + 0x009e, 0x2009, 0x0002, 0x0804, 0x36bf, 0x7124, 0x080c, 0x341e, + 0xa820, 0x9086, 0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x36bf, + 0x2900, 0x7022, 0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, + 0x90bc, 0x003f, 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, + 0x0006, 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, + 0x0fd6, 0xaa6c, 0xab70, 0xac74, 0xad78, 0x2061, 0x18b8, 0x2c44, + 0xa06b, 0x0000, 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, + 0x7100, 0x1148, 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, + 0x007e, 0x0804, 0x4c8d, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, + 0x02a0, 0x000e, 0x007e, 0x2061, 0x18b8, 0x2c44, 0xa076, 0xa772, + 0xa07b, 0x002a, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x114e, + 0x7007, 0x0002, 0x701f, 0x5371, 0x0005, 0x000e, 0x007e, 0x0804, + 0x36c2, 0x7020, 0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0x2098, 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0fd6, + 0x2100, 0x2238, 0x2061, 0x18b8, 0x2c44, 0xa28c, 0xa390, 0xa494, + 0xa598, 0x2009, 0x002a, 0x0804, 0x4c8d, 0x81ff, 0x1904, 0x36bf, + 0x798c, 0x2001, 0x197e, 0x918c, 0x8000, 0x2102, 0x080c, 0x4c58, + 0x0904, 0x36c2, 0x080c, 0x6c11, 0x0120, 0x080c, 0x6c19, 0x1904, + 0x36c2, 0x080c, 0x687b, 0x0904, 0x36bf, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6a1b, 0x012e, 0x0904, 0x36bf, 0x2001, 0x197e, 0x2004, + 0xd0fc, 0x1904, 0x368d, 0x0804, 0x46aa, 0xa9a0, 0x2001, 0x197e, + 0x918c, 0x8000, 0xc18d, 0x2102, 0x080c, 0x4c65, 0x01a0, 0x080c, + 0x6c11, 0x0118, 0x080c, 0x6c19, 0x1170, 0x080c, 0x687b, 0x2009, + 0x0002, 0x0128, 0x080c, 0x6a1b, 0x1170, 0x2009, 0x0003, 0xa897, + 0x4005, 0xa99a, 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, + 0x2001, 0x0030, 0x0005, 0xa897, 0x4000, 0x2001, 0x197e, 0x2004, + 0xd0fc, 0x1128, 0x080c, 0x5848, 0x0110, 0x9006, 0x0018, 0x900e, + 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, + 0xd084, 0x0904, 0x461f, 0x080c, 0x4c74, 0x0904, 0x36c2, 0x080c, + 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, 0x080c, 0x6c11, + 0x0130, 0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, + 0xd08c, 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x5840, + 0xd0b4, 0x0904, 0x4659, 0x7884, 0x908e, 0x007e, 0x0904, 0x4659, + 0x908e, 0x007f, 0x0904, 0x4659, 0x908e, 0x0080, 0x0904, 0x4659, + 0xb800, 0xd08c, 0x1904, 0x4659, 0xa867, 0x0000, 0xa868, 0xc0fd, + 0xa86a, 0x080c, 0xd0ec, 0x1120, 0x2009, 0x0003, 0x0804, 0x36bf, + 0x7007, 0x0003, 0x701f, 0x543d, 0x0005, 0x080c, 0x4c74, 0x0904, + 0x36c2, 0x0804, 0x4659, 0x080c, 0x347d, 0x0108, 0x0005, 0x2009, + 0x1834, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x36bf, + 0x080c, 0x5854, 0x0120, 0x2009, 0x0007, 0x0804, 0x36bf, 0x080c, + 0x6c09, 0x0120, 0x2009, 0x0008, 0x0804, 0x36bf, 0xb89c, 0xd0a4, + 0x1118, 0xd0ac, 0x1904, 0x4659, 0x9006, 0xa866, 0xa832, 0xa868, + 0xc0fd, 0xa86a, 0x080c, 0xd154, 0x1120, 0x2009, 0x0003, 0x0804, + 0x36bf, 0x7007, 0x0003, 0x701f, 0x5476, 0x0005, 0xa830, 0x9086, + 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x578e, 0x080c, 0x4c74, + 0x0904, 0x36c2, 0x0804, 0x540f, 0x81ff, 0x2009, 0x0001, 0x1904, + 0x36bf, 0x080c, 0x5854, 0x2009, 0x0007, 0x1904, 0x36bf, 0x080c, + 0x6c09, 0x0120, 0x2009, 0x0008, 0x0804, 0x36bf, 0x080c, 0x4c74, + 0x0904, 0x36c2, 0x080c, 0x6c11, 0x2009, 0x0009, 0x1904, 0x36bf, + 0x080c, 0x4c41, 0x2009, 0x0002, 0x0904, 0x36bf, 0x9006, 0xa866, + 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x7988, 0xa95a, 0x9194, 0xfd00, + 0x918c, 0x00ff, 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, + 0xa956, 0x0038, 0x928e, 0x0100, 0x1904, 0x36c2, 0xc0e5, 0xa952, + 0xa956, 0xa83e, 0x080c, 0xd3b7, 0x2009, 0x0003, 0x0904, 0x36bf, + 0x7007, 0x0003, 0x701f, 0x54cd, 0x0005, 0xa830, 0x9086, 0x0100, + 0x2009, 0x0004, 0x0904, 0x36bf, 0x0804, 0x368d, 0x7aa8, 0x9284, + 0xc000, 0x0148, 0xd2ec, 0x01a0, 0x080c, 0x5854, 0x1188, 0x2009, + 0x0014, 0x0804, 0x36bf, 0xd2dc, 0x1578, 0x81ff, 0x2009, 0x0001, + 0x1904, 0x36bf, 0x080c, 0x5854, 0x2009, 0x0007, 0x1904, 0x36bf, + 0xd2f4, 0x0138, 0x9284, 0x5000, 0xc0d5, 0x080c, 0x581a, 0x0804, + 0x368d, 0xd2fc, 0x0160, 0x080c, 0x4c74, 0x0904, 0x36c2, 0x7984, + 0x9284, 0x9000, 0xc0d5, 0x080c, 0x57e9, 0x0804, 0x368d, 0x080c, + 0x4c74, 0x0904, 0x36c2, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, + 0x2009, 0x0009, 0x1904, 0x55bc, 0x080c, 0x4c41, 0x2009, 0x0002, + 0x0904, 0x55bc, 0xa85c, 0x9080, 0x001b, 0xaf60, 0x2009, 0x0008, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x080c, 0x4c8a, 0x701f, 0x5529, + 0x0005, 0xa86c, 0x9086, 0x0500, 0x1138, 0xa870, 0x9005, 0x1120, + 0xa874, 0x9084, 0xff00, 0x0110, 0x1904, 0x36c2, 0xa866, 0xa832, + 0xa868, 0xc0fd, 0xa86a, 0x080c, 0x4c74, 0x1110, 0x0804, 0x36c2, + 0x2009, 0x0043, 0x080c, 0xd423, 0x2009, 0x0003, 0x0904, 0x55bc, + 0x7007, 0x0003, 0x701f, 0x554d, 0x0005, 0xa830, 0x9086, 0x0100, + 0x2009, 0x0004, 0x0904, 0x55bc, 0x7984, 0x7aa8, 0x9284, 0x1000, + 0xc0d5, 0x080c, 0x57e9, 0x0804, 0x368d, 0x00c6, 0xaab0, 0x9284, + 0xc000, 0x0148, 0xd2ec, 0x0170, 0x080c, 0x5854, 0x1158, 0x2009, + 0x0014, 0x0804, 0x55ab, 0x2061, 0x1800, 0x080c, 0x5854, 0x2009, + 0x0007, 0x15c8, 0xd2f4, 0x0130, 0x9284, 0x5000, 0xc0d5, 0x080c, + 0x581a, 0x0058, 0xd2fc, 0x0180, 0x080c, 0x4c72, 0x0590, 0xa998, + 0x9284, 0x9000, 0xc0d5, 0x080c, 0x57e9, 0xa87b, 0x0000, 0xa883, + 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x4c72, 0x0510, 0x080c, + 0x6c11, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, + 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, + 0x4c72, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xd423, 0x2009, + 0x0003, 0x0108, 0x0078, 0x0431, 0x19c0, 0xa897, 0x4005, 0xa99a, + 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x36bf, + 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x57e9, 0x001e, + 0x1904, 0x36bf, 0x0804, 0x368d, 0x00f6, 0x2d78, 0xaab0, 0x0021, + 0x00fe, 0x0005, 0xaab0, 0xc2d5, 0xd2dc, 0x0150, 0x0016, 0xa998, + 0x9284, 0x1400, 0xc0fd, 0x080c, 0x57e9, 0x001e, 0x9085, 0x0001, + 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x36bf, 0x080c, + 0x5854, 0x0120, 0x2009, 0x0007, 0x0804, 0x36bf, 0x7984, 0x7ea8, + 0x96b4, 0x00ff, 0x080c, 0x67b4, 0x1904, 0x36c2, 0x9186, 0x007f, + 0x0138, 0x080c, 0x6c11, 0x0120, 0x2009, 0x0009, 0x0804, 0x36bf, + 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, 0xa867, + 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, + 0x080c, 0xd106, 0x1120, 0x2009, 0x0003, 0x0804, 0x36bf, 0x7007, + 0x0003, 0x701f, 0x561c, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100, + 0x1120, 0x2009, 0x0004, 0x0804, 0x36bf, 0xa8e0, 0xa866, 0xa810, + 0x8007, 0x9084, 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, + 0x8004, 0x9080, 0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x0804, 0x4c8d, 0x080c, 0x4c41, 0x1120, 0x2009, 0x0002, + 0x0804, 0x36bf, 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, + 0x82ff, 0x1118, 0x7023, 0x19b4, 0x0040, 0x92c6, 0x0001, 0x1118, + 0x7023, 0x19ce, 0x0010, 0x0804, 0x36c2, 0x2009, 0x001a, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, + 0x4c8a, 0x701f, 0x566c, 0x0005, 0x2001, 0x182e, 0x2003, 0x0001, + 0xa85c, 0x9080, 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, + 0x7020, 0x20a0, 0x20e9, 0x0001, 0x4003, 0x0804, 0x368d, 0x080c, + 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, 0x7984, 0x9194, + 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x19b4, + 0x0040, 0x92c6, 0x0001, 0x1118, 0x2099, 0x19ce, 0x0010, 0x0804, + 0x36c2, 0xa85c, 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, + 0x001a, 0x20e1, 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, + 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x4c8d, + 0x7884, 0x908a, 0x1000, 0x1a04, 0x36c2, 0x0126, 0x2091, 0x8000, + 0x8003, 0x800b, 0x810b, 0x9108, 0x00c6, 0x2061, 0x1a04, 0x614a, + 0x00ce, 0x012e, 0x0804, 0x368d, 0x00c6, 0x080c, 0x779e, 0x1160, + 0x080c, 0x7ab6, 0x080c, 0x619d, 0x9085, 0x0001, 0x080c, 0x77e2, + 0x080c, 0x76cd, 0x080c, 0x0d85, 0x2061, 0x1800, 0x6030, 0xc09d, + 0x6032, 0x080c, 0x6058, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, + 0x2004, 0x908e, 0x0000, 0x0904, 0x36bf, 0x7884, 0x9005, 0x0188, + 0x7888, 0x2061, 0x199c, 0x2c0c, 0x2062, 0x080c, 0x2a67, 0x01a0, + 0x080c, 0x2a6f, 0x0188, 0x080c, 0x2a77, 0x0170, 0x2162, 0x0804, + 0x36c2, 0x2061, 0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009, + 0x0001, 0x0010, 0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x15a8, + 0x2061, 0x0100, 0x6028, 0xc09c, 0x602a, 0x080c, 0xacfc, 0x0026, + 0x2011, 0x0003, 0x080c, 0xa62b, 0x2011, 0x0002, 0x080c, 0xa635, + 0x002e, 0x080c, 0xa516, 0x0036, 0x901e, 0x080c, 0xa596, 0x003e, + 0x080c, 0xad18, 0x60e3, 0x0000, 0x080c, 0xeed9, 0x080c, 0xeef4, + 0x9085, 0x0001, 0x080c, 0x77e2, 0x9006, 0x080c, 0x2a99, 0x2001, + 0x1800, 0x2003, 0x0004, 0x2001, 0x19a8, 0x2003, 0x0000, 0x0026, + 0x2011, 0x0008, 0x080c, 0x2ad3, 0x002e, 0x00ce, 0x0804, 0x368d, + 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x36bf, 0x080c, 0x5854, + 0x0120, 0x2009, 0x0007, 0x0804, 0x36bf, 0x7984, 0x7ea8, 0x96b4, + 0x00ff, 0x080c, 0x67b4, 0x1904, 0x36c2, 0x9186, 0x007f, 0x0138, + 0x080c, 0x6c11, 0x0120, 0x2009, 0x0009, 0x0804, 0x36bf, 0x080c, + 0x4c41, 0x1120, 0x2009, 0x0002, 0x0804, 0x36bf, 0xa867, 0x0000, + 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xd109, 0x1120, 0x2009, 0x0003, + 0x0804, 0x36bf, 0x7007, 0x0003, 0x701f, 0x5777, 0x0005, 0xa830, + 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x36bf, 0xa8e0, + 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, 0x000c, 0x7a8c, + 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x4c8d, 0xa898, 0x9086, + 0x000d, 0x1904, 0x36bf, 0x2021, 0x4005, 0x0126, 0x2091, 0x8000, + 0x0e04, 0x579b, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, + 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7883, 0x4005, + 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, 0x080c, 0x4c7d, + 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, + 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, 0x012e, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0x1a04, 0x7984, 0x615a, + 0x6156, 0x605f, 0x0000, 0x6053, 0x0009, 0x7898, 0x6072, 0x789c, + 0x606e, 0x7888, 0x606a, 0x788c, 0x6066, 0x2001, 0x1a14, 0x2044, + 0x2001, 0x1a1b, 0xa076, 0xa060, 0xa072, 0xa07b, 0x0001, 0xa07f, + 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, 0x012e, 0x0804, + 0x368d, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, 0x90e4, 0xc000, + 0x0198, 0x0006, 0xd0d4, 0x0160, 0x0036, 0x2019, 0x0029, 0x080c, + 0xacfc, 0x0106, 0x080c, 0x3442, 0x010e, 0x090c, 0xad18, 0x003e, + 0x080c, 0xcf68, 0x000e, 0x1198, 0xd0e4, 0x0160, 0x9180, 0x1000, + 0x2004, 0x905d, 0x0160, 0x080c, 0x61b7, 0x080c, 0xb094, 0x0110, + 0xb817, 0x0000, 0x9006, 0x00ce, 0x00be, 0x012e, 0x0005, 0x9085, + 0x0001, 0x0cc8, 0x0126, 0x2091, 0x8000, 0x0156, 0x2010, 0x900e, + 0x20a9, 0x0800, 0x0016, 0x9180, 0x1000, 0x2004, 0x9005, 0x0188, + 0x9186, 0x007e, 0x0170, 0x9186, 0x007f, 0x0158, 0x9186, 0x0080, + 0x0140, 0x9186, 0x00ff, 0x0128, 0x0026, 0x2200, 0x080c, 0x57e9, + 0x002e, 0x001e, 0x8108, 0x1f04, 0x5822, 0x015e, 0x012e, 0x0005, + 0x2001, 0x1848, 0x2004, 0x0005, 0x2001, 0x1867, 0x2004, 0x0005, + 0x0006, 0x2001, 0x1810, 0x2004, 0xd0d4, 0x000e, 0x0005, 0x2001, + 0x180e, 0x2004, 0xd0b4, 0x0005, 0x2001, 0x1800, 0x2004, 0x9086, + 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, 0x189e, 0x7108, 0x910d, + 0x710a, 0x00ee, 0x001e, 0x0005, 0x79a4, 0x81ff, 0x0904, 0x36c2, + 0x9182, 0x0081, 0x1a04, 0x36c2, 0x810c, 0x0016, 0x080c, 0x4c41, + 0x0170, 0x080c, 0x0f61, 0x2100, 0x2238, 0x7d84, 0x7c88, 0x7b8c, + 0x7a90, 0x001e, 0x080c, 0x4c8a, 0x701f, 0x5884, 0x0005, 0x001e, + 0x2009, 0x0002, 0x0804, 0x36bf, 0x2079, 0x0000, 0x7d94, 0x7c98, + 0x7ba8, 0x7aac, 0x79a4, 0x810c, 0x2061, 0x18b8, 0x2c44, 0xa770, + 0xa074, 0x2071, 0x189e, 0x080c, 0x4c8d, 0x701f, 0x5898, 0x0005, + 0x2061, 0x18b8, 0x2c44, 0x0016, 0x0026, 0xa270, 0xa174, 0x080c, + 0x0f69, 0x002e, 0x001e, 0x080c, 0x1016, 0x9006, 0xa802, 0xa806, + 0x0804, 0x368d, 0x0126, 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, + 0x2071, 0x1800, 0x6044, 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, + 0x5a58, 0x0068, 0xd08c, 0x0118, 0x080c, 0x5961, 0x0040, 0xd094, + 0x0118, 0x080c, 0x5931, 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, + 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, + 0x012e, 0x0005, 0x0016, 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, + 0x001e, 0x0c68, 0x7030, 0xd09c, 0x1120, 0x6004, 0x9085, 0x0002, + 0x6006, 0x7098, 0x9005, 0x0120, 0x709b, 0x0000, 0x7093, 0x0000, + 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, + 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, + 0x9296, 0xf700, 0x0178, 0x7138, 0xd1a4, 0x1160, 0x6240, 0x9295, + 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, + 0x6119, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, + 0x6043, 0x0000, 0x7087, 0x0000, 0x70a3, 0x0001, 0x70c7, 0x0000, + 0x70df, 0x0000, 0x2009, 0x1d80, 0x200b, 0x0000, 0x7097, 0x0000, + 0x708b, 0x000f, 0x2009, 0x000f, 0x2011, 0x5ffb, 0x080c, 0x8a5d, + 0x0005, 0x2001, 0x1869, 0x2004, 0xd08c, 0x0110, 0x705f, 0xffff, + 0x7088, 0x9005, 0x1528, 0x2011, 0x5ffb, 0x080c, 0x8993, 0x6040, + 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, + 0xd08c, 0x1168, 0x1f04, 0x5947, 0x6242, 0x709b, 0x0000, 0x6040, + 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, + 0x709b, 0x0000, 0x708f, 0x0000, 0x9006, 0x080c, 0x61a2, 0x0000, + 0x0005, 0x708c, 0x908a, 0x0003, 0x1a0c, 0x0d85, 0x000b, 0x0005, + 0x596b, 0x59bc, 0x5a57, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, + 0x708f, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, + 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x597a, + 0x080c, 0x0d85, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, + 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, + 0x617e, 0x2079, 0x1d00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, + 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1d0e, 0x20a9, + 0x0004, 0x4003, 0x080c, 0xaaf1, 0x20e1, 0x0001, 0x2099, 0x1d00, + 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, + 0x000c, 0x600f, 0x0000, 0x080c, 0x602c, 0x00fe, 0x9006, 0x7092, + 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x7090, 0x7093, 0x0000, + 0x9025, 0x0904, 0x5a34, 0x6020, 0xd0b4, 0x1904, 0x5a32, 0x71a0, + 0x81ff, 0x0904, 0x5a20, 0x9486, 0x000c, 0x1904, 0x5a2d, 0x9480, + 0x0018, 0x8004, 0x20a8, 0x080c, 0x6177, 0x2011, 0x0260, 0x2019, + 0x1d00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, + 0x59d9, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, + 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x708f, 0x0002, 0x709b, + 0x0002, 0x2009, 0x07d0, 0x2011, 0x6002, 0x080c, 0x8a5d, 0x080c, + 0x617e, 0x04c0, 0x080c, 0x6177, 0x2079, 0x0260, 0x7930, 0x918e, + 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, + 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x6177, 0x2011, 0x026e, + 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, + 0x11a0, 0x8210, 0x8318, 0x1f04, 0x5a14, 0x0078, 0x70a3, 0x0000, + 0x080c, 0x6177, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, + 0x20a1, 0x1d00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, + 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, + 0x6020, 0xd0b4, 0x1db8, 0x080c, 0xaaf1, 0x20e1, 0x0001, 0x2099, + 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, + 0x60c3, 0x000c, 0x2011, 0x19f5, 0x2013, 0x0000, 0x7093, 0x0000, + 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa293, 0x08d8, 0x0005, + 0x7098, 0x908a, 0x001d, 0x1a0c, 0x0d85, 0x000b, 0x0005, 0x5a89, + 0x5a9c, 0x5ac5, 0x5ae5, 0x5b0b, 0x5b3a, 0x5b60, 0x5b98, 0x5bbe, + 0x5bec, 0x5c27, 0x5c5f, 0x5c7d, 0x5ca8, 0x5cca, 0x5ce5, 0x5cef, + 0x5d23, 0x5d49, 0x5d78, 0x5d9e, 0x5dd6, 0x5e1a, 0x5e57, 0x5e78, + 0x5ed1, 0x5ef3, 0x5f21, 0x5f21, 0x00c6, 0x2061, 0x1800, 0x6003, + 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, + 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, + 0x0100, 0x6043, 0x0002, 0x709b, 0x0001, 0x2009, 0x07d0, 0x2011, + 0x6002, 0x080c, 0x8a5d, 0x0005, 0x00f6, 0x7090, 0x9086, 0x0014, + 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x6177, 0x2079, + 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, + 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, + 0x2011, 0x6002, 0x080c, 0x8993, 0x709b, 0x0010, 0x080c, 0x5cef, + 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0003, + 0x6043, 0x0004, 0x2011, 0x6002, 0x080c, 0x8993, 0x080c, 0x60fb, + 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, + 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5ada, 0x60c3, + 0x0014, 0x080c, 0x602c, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, + 0x0500, 0x2011, 0x6002, 0x080c, 0x8993, 0x9086, 0x0014, 0x11b8, + 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, + 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, + 0x1110, 0x70c7, 0x0001, 0x709b, 0x0004, 0x0029, 0x0010, 0x080c, + 0x6153, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x0005, 0x080c, 0x60fb, + 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x6177, + 0x080c, 0x615a, 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, + 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5faf, 0x0168, 0x080c, + 0x6130, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, + 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x602c, + 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x6002, + 0x080c, 0x8993, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6177, 0x2079, + 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, + 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, + 0x709b, 0x0006, 0x0029, 0x0010, 0x080c, 0x6153, 0x00fe, 0x0005, + 0x00f6, 0x709b, 0x0007, 0x080c, 0x60fb, 0x2079, 0x0240, 0x7833, + 0x1104, 0x7837, 0x0000, 0x080c, 0x6177, 0x080c, 0x615a, 0x11b8, + 0x7084, 0x9005, 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, + 0x348e, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, + 0x5faf, 0x0180, 0x080c, 0x512e, 0x0110, 0x080c, 0x26f5, 0x20a9, + 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, + 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x602c, 0x00fe, 0x0005, + 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x6002, 0x080c, 0x8993, + 0x9086, 0x0014, 0x11b8, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0008, + 0x0029, 0x0010, 0x080c, 0x6153, 0x00fe, 0x0005, 0x00f6, 0x709b, + 0x0009, 0x080c, 0x60fb, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, + 0x0100, 0x080c, 0x615a, 0x1150, 0x7084, 0x9005, 0x1138, 0x080c, + 0x5f22, 0x1188, 0x9085, 0x0001, 0x080c, 0x26f5, 0x20a9, 0x0008, + 0x080c, 0x6177, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, + 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x602c, 0x0010, + 0x080c, 0x5a7c, 0x00fe, 0x0005, 0x00f6, 0x7090, 0x9005, 0x05a8, + 0x2011, 0x6002, 0x080c, 0x8993, 0x9086, 0x0014, 0x1560, 0x080c, + 0x6177, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, + 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x000a, + 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70c4, + 0x9005, 0x1110, 0x70c7, 0x0001, 0x7097, 0x0000, 0x709b, 0x000e, + 0x080c, 0x5cca, 0x0010, 0x080c, 0x6153, 0x00fe, 0x0005, 0x00f6, + 0x709b, 0x000b, 0x2011, 0x1d0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, + 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x60fb, 0x2079, 0x0240, + 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x615a, 0x0118, 0x2013, + 0x0000, 0x0020, 0x7060, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, + 0x2009, 0x024e, 0x2011, 0x1d0e, 0x220e, 0x8210, 0x8108, 0x9186, + 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, + 0x5c4c, 0x60c3, 0x0084, 0x080c, 0x602c, 0x00fe, 0x0005, 0x00f6, + 0x7090, 0x9005, 0x01c0, 0x2011, 0x6002, 0x080c, 0x8993, 0x9086, + 0x0084, 0x1178, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x709b, 0x000c, 0x0029, + 0x0010, 0x080c, 0x6153, 0x00fe, 0x0005, 0x00f6, 0x709b, 0x000d, + 0x080c, 0x60fb, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, + 0x080c, 0x6177, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, + 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, + 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, + 0x1f04, 0x5c90, 0x60c3, 0x0084, 0x080c, 0x602c, 0x00fe, 0x0005, + 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x6002, 0x080c, 0x8993, + 0x9086, 0x0084, 0x1198, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, 0x0001, + 0x080c, 0x60cd, 0x709b, 0x000e, 0x0029, 0x0010, 0x080c, 0x6153, + 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x61a2, 0x709b, 0x000f, + 0x7093, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, + 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, + 0x2011, 0x6002, 0x080c, 0x8987, 0x0005, 0x7090, 0x9005, 0x0130, + 0x2011, 0x6002, 0x080c, 0x8993, 0x709b, 0x0000, 0x0005, 0x709b, + 0x0011, 0x080c, 0xaaf1, 0x080c, 0x6177, 0x20e1, 0x0000, 0x2099, + 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x7490, 0x9480, 0x0018, + 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, + 0x615a, 0x11a0, 0x717c, 0x81ff, 0x0188, 0x900e, 0x7080, 0x9084, + 0x00ff, 0x0160, 0x080c, 0x268c, 0x9186, 0x007e, 0x0138, 0x9186, + 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5faf, 0x60c3, 0x0014, + 0x080c, 0x602c, 0x0005, 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, + 0x6002, 0x080c, 0x8993, 0x9086, 0x0014, 0x11b8, 0x080c, 0x6177, + 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, + 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, + 0x0001, 0x709b, 0x0012, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, + 0x0005, 0x00f6, 0x709b, 0x0013, 0x080c, 0x6109, 0x2079, 0x0240, + 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x6177, 0x080c, 0x615a, + 0x1170, 0x7084, 0x9005, 0x1158, 0x715c, 0x9186, 0xffff, 0x0138, + 0x2011, 0x0008, 0x080c, 0x5faf, 0x0168, 0x080c, 0x6130, 0x20a9, + 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, + 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x602c, 0x00fe, 0x0005, + 0x00f6, 0x7090, 0x9005, 0x0500, 0x2011, 0x6002, 0x080c, 0x8993, + 0x9086, 0x0014, 0x11b8, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x709b, 0x0014, + 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x709b, + 0x0015, 0x080c, 0x6109, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, + 0x0000, 0x080c, 0x6177, 0x080c, 0x615a, 0x11b8, 0x7084, 0x9005, + 0x11a0, 0x7164, 0x9186, 0xffff, 0x0180, 0x9180, 0x348e, 0x200d, + 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5faf, 0x0180, + 0x080c, 0x512e, 0x0110, 0x080c, 0x26f5, 0x20a9, 0x0008, 0x20e1, + 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, + 0x60c3, 0x0014, 0x080c, 0x602c, 0x00fe, 0x0005, 0x00f6, 0x7090, + 0x9005, 0x05f0, 0x2011, 0x6002, 0x080c, 0x8993, 0x9086, 0x0014, + 0x15a8, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, + 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, + 0x9085, 0x0001, 0x080c, 0x61a2, 0x7a38, 0xd2fc, 0x0128, 0x70c4, + 0x9005, 0x1110, 0x70c7, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, + 0xd2fc, 0x0128, 0x70c4, 0x9005, 0x1110, 0x70c7, 0x0001, 0x9085, + 0x0001, 0x080c, 0x61a2, 0x7097, 0x0000, 0x7a38, 0xd2f4, 0x0110, + 0x70df, 0x0008, 0x709b, 0x0016, 0x0029, 0x0010, 0x7093, 0x0000, + 0x00fe, 0x0005, 0x080c, 0xaaf1, 0x080c, 0x6177, 0x20e1, 0x0000, + 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, + 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, + 0x2012, 0x2011, 0x026e, 0x709b, 0x0017, 0x080c, 0x615a, 0x1150, + 0x7084, 0x9005, 0x1138, 0x080c, 0x5f22, 0x1188, 0x9085, 0x0001, + 0x080c, 0x26f5, 0x20a9, 0x0008, 0x080c, 0x6177, 0x20e1, 0x0000, + 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, + 0x0014, 0x080c, 0x602c, 0x0010, 0x080c, 0x5a7c, 0x0005, 0x00f6, + 0x7090, 0x9005, 0x01d8, 0x2011, 0x6002, 0x080c, 0x8993, 0x9086, + 0x0084, 0x1190, 0x080c, 0x6177, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x61a2, + 0x709b, 0x0018, 0x0029, 0x0010, 0x7093, 0x0000, 0x00fe, 0x0005, + 0x00f6, 0x709b, 0x0019, 0x080c, 0x6109, 0x2079, 0x0240, 0x7833, + 0x1106, 0x7837, 0x0000, 0x080c, 0x6177, 0x2009, 0x026e, 0x2039, + 0x1d0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, + 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x5e8b, + 0x2039, 0x1d0e, 0x080c, 0x615a, 0x11e8, 0x2728, 0x2514, 0x8207, + 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, + 0x202a, 0x7060, 0x2310, 0x8214, 0x92a0, 0x1d0e, 0x2414, 0x938c, + 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, + 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, + 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, + 0x0240, 0x1f04, 0x5ebe, 0x60c3, 0x0084, 0x080c, 0x602c, 0x00fe, + 0x0005, 0x00f6, 0x7090, 0x9005, 0x01e0, 0x2011, 0x6002, 0x080c, + 0x8993, 0x9086, 0x0084, 0x1198, 0x080c, 0x6177, 0x2079, 0x0260, + 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x7097, + 0x0001, 0x080c, 0x60cd, 0x709b, 0x001a, 0x0029, 0x0010, 0x7093, + 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x61a2, 0x709b, + 0x001b, 0x080c, 0xaaf1, 0x080c, 0x6177, 0x2011, 0x0260, 0x2009, + 0x0240, 0x7490, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, + 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, + 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, + 0x2011, 0x0260, 0x1f04, 0x5f0a, 0x60c3, 0x0084, 0x080c, 0x602c, + 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1848, 0x252c, 0x20a9, + 0x0008, 0x2041, 0x1d0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x6177, + 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, + 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, + 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, + 0x5f3c, 0x0804, 0x5fab, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, + 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5fab, 0x918d, + 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, + 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, + 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x5f62, 0x04d8, + 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x5f74, 0x2328, + 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, + 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x5f83, 0x755e, + 0x95c8, 0x348e, 0x292d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, + 0x0016, 0x2508, 0x080c, 0x26d5, 0x001e, 0x60e7, 0x0000, 0x65ea, + 0x2018, 0x2304, 0x9405, 0x201a, 0x7087, 0x0001, 0x20e9, 0x0000, + 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, + 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, + 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, + 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, + 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, + 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, + 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, + 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x715e, 0x91a0, 0x348e, + 0x242d, 0x95ac, 0x00ff, 0x7582, 0x6532, 0x6536, 0x0016, 0x2508, + 0x080c, 0x26d5, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x7087, 0x0001, + 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x708b, 0x0000, + 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, + 0x080c, 0x60bc, 0x080c, 0xa2a0, 0x7004, 0x9084, 0x4000, 0x0110, + 0x080c, 0x2aa9, 0x0126, 0x2091, 0x8000, 0x2071, 0x1826, 0x2073, + 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x6119, + 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, + 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, + 0x2a04, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, + 0x19f5, 0x2013, 0x0000, 0x7093, 0x0000, 0x012e, 0x60a3, 0x0056, + 0x60a7, 0x9575, 0x080c, 0xa293, 0x6144, 0xd184, 0x0120, 0x7198, + 0x918d, 0x2000, 0x0018, 0x718c, 0x918d, 0x1000, 0x2011, 0x1999, + 0x2112, 0x2009, 0x07d0, 0x2011, 0x6002, 0x080c, 0x8a5d, 0x0005, + 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xacfc, + 0x080c, 0xb09b, 0x080c, 0xad18, 0x2009, 0x00f7, 0x080c, 0x6119, + 0x2061, 0x1a04, 0x900e, 0x611a, 0x611e, 0x617a, 0x617e, 0x2061, + 0x1800, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, + 0x0010, 0x2009, 0x1999, 0x200b, 0x0000, 0x2009, 0x002d, 0x2011, + 0x6088, 0x080c, 0x8987, 0x012e, 0x00ce, 0x002e, 0x001e, 0x0005, + 0x00e6, 0x0006, 0x0126, 0x2091, 0x8000, 0x0471, 0x2071, 0x0100, + 0x080c, 0xa2a0, 0x2071, 0x0140, 0x7004, 0x9084, 0x4000, 0x0110, + 0x080c, 0x2aa9, 0x080c, 0x77a6, 0x0188, 0x080c, 0x77c1, 0x1170, + 0x080c, 0x7ac0, 0x0016, 0x080c, 0x27a4, 0x2001, 0x196d, 0x2102, + 0x001e, 0x080c, 0x7abb, 0x080c, 0x76cd, 0x0050, 0x2009, 0x0001, + 0x080c, 0x2a85, 0x2001, 0x0001, 0x080c, 0x2631, 0x080c, 0x6058, + 0x012e, 0x000e, 0x00ee, 0x0005, 0x2001, 0x180e, 0x2004, 0xd0bc, + 0x0158, 0x0026, 0x0036, 0x2011, 0x8017, 0x2001, 0x1999, 0x201c, + 0x080c, 0x4ca1, 0x003e, 0x002e, 0x0005, 0x20a9, 0x0012, 0x20e9, + 0x0001, 0x20a1, 0x1d80, 0x080c, 0x6177, 0x20e9, 0x0000, 0x2099, + 0x026e, 0x0099, 0x20a9, 0x0020, 0x080c, 0x6171, 0x2099, 0x0260, + 0x20a1, 0x1d92, 0x0051, 0x20a9, 0x000e, 0x080c, 0x6174, 0x2099, + 0x0260, 0x20a1, 0x1db2, 0x0009, 0x0005, 0x0016, 0x0026, 0x3410, + 0x3308, 0x2104, 0x8007, 0x2012, 0x8108, 0x8210, 0x1f04, 0x60f1, + 0x002e, 0x001e, 0x0005, 0x080c, 0xaaf1, 0x20e1, 0x0001, 0x2099, + 0x1d00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, + 0x0005, 0x080c, 0xaaf1, 0x080c, 0x6177, 0x20e1, 0x0000, 0x2099, + 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000c, 0x4003, + 0x0005, 0x00c6, 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0x1834, + 0x2004, 0x9005, 0x1138, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, + 0x9105, 0x0010, 0x9185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, + 0x0016, 0x0046, 0x080c, 0x6c0d, 0x0158, 0x9006, 0x2020, 0x2009, + 0x002a, 0x080c, 0xea8d, 0x2001, 0x180c, 0x200c, 0xc195, 0x2102, + 0x2019, 0x002a, 0x900e, 0x080c, 0x32da, 0x080c, 0xd645, 0x0140, + 0x0036, 0x2019, 0xffff, 0x2021, 0x0007, 0x080c, 0x4e58, 0x003e, + 0x004e, 0x001e, 0x0005, 0x080c, 0x6058, 0x709b, 0x0000, 0x7093, + 0x0000, 0x0005, 0x0006, 0x2001, 0x180c, 0x2004, 0xd09c, 0x0100, + 0x000e, 0x0005, 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, + 0x0101, 0x200c, 0x918d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, + 0x0005, 0x2009, 0x0001, 0x0020, 0x2009, 0x0002, 0x0008, 0x900e, + 0x6814, 0x9084, 0xffc0, 0x910d, 0x6916, 0x0005, 0x00f6, 0x0156, + 0x0146, 0x01d6, 0x9006, 0x20a9, 0x0080, 0x20e9, 0x0001, 0x20a1, + 0x1d00, 0x4004, 0x2079, 0x1d00, 0x7803, 0x2200, 0x7807, 0x00ef, + 0x780f, 0x00ef, 0x7813, 0x0138, 0x7823, 0xffff, 0x7827, 0xffff, + 0x01de, 0x014e, 0x015e, 0x00fe, 0x0005, 0x2001, 0x1800, 0x2003, + 0x0001, 0x0005, 0x2001, 0x19a7, 0x0118, 0x2003, 0x0001, 0x0010, + 0x2003, 0x0000, 0x0005, 0x0156, 0x20a9, 0x0800, 0x2009, 0x1000, + 0x9006, 0x200a, 0x8108, 0x1f04, 0x61b1, 0x015e, 0x0005, 0x00d6, + 0x0036, 0x0156, 0x0136, 0x0146, 0x2069, 0x1847, 0x9006, 0xb802, + 0xb8d6, 0xb807, 0x0707, 0xb80a, 0xb80e, 0xb812, 0x9198, 0x348e, + 0x231d, 0x939c, 0x00ff, 0xbb16, 0x0016, 0x0026, 0xb886, 0x080c, + 0xb094, 0x1120, 0x9192, 0x007e, 0x1208, 0xbb86, 0x20a9, 0x0004, + 0xb8c4, 0x20e8, 0xb9c8, 0x9198, 0x0006, 0x9006, 0x23a0, 0x4004, + 0x20a9, 0x0004, 0x9198, 0x000a, 0x23a0, 0x4004, 0x002e, 0x001e, + 0xb83e, 0xb842, 0xb8ce, 0xb8d2, 0xb85e, 0xb862, 0xb866, 0xb86a, + 0xb86f, 0x0100, 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, + 0x0008, 0xb896, 0xb89a, 0xb89e, 0xb8be, 0xb9a2, 0x0096, 0xb8a4, + 0x904d, 0x0110, 0x080c, 0x108b, 0xb8a7, 0x0000, 0x009e, 0x9006, + 0xb84a, 0x6810, 0xb83a, 0x680c, 0xb846, 0xb8bb, 0x0520, 0xb8ac, + 0x9005, 0x0198, 0x00c6, 0x2060, 0x9c82, 0x1ddc, 0x0a0c, 0x0d85, + 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0d85, 0x080c, 0x8eee, + 0x00ce, 0x090c, 0x928d, 0xb8af, 0x0000, 0x6814, 0x9084, 0x00ff, + 0xb842, 0x014e, 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, + 0x2091, 0x8000, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, + 0x1a04, 0x628d, 0x9182, 0x0800, 0x1a04, 0x6291, 0x2001, 0x180c, + 0x2004, 0x9084, 0x0003, 0x1904, 0x6297, 0x9188, 0x1000, 0x2104, + 0x905d, 0x0198, 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1188, + 0xb8a4, 0x900d, 0x1904, 0x62a9, 0x080c, 0x6669, 0x9006, 0x012e, + 0x0005, 0x2001, 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, + 0x0498, 0x9082, 0x0006, 0x1290, 0x080c, 0xb094, 0x1160, 0xb8a0, + 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0d10, 0x2001, 0x0029, + 0x2009, 0x1000, 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, + 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, + 0x2001, 0x0004, 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, + 0x2009, 0x1000, 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, + 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, + 0x180c, 0x2004, 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x9065, + 0x09a8, 0x080c, 0x6c11, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, + 0x6250, 0x080c, 0x6a2a, 0x0904, 0x6259, 0x0804, 0x6254, 0x00e6, + 0x2071, 0x19e8, 0x7004, 0x9086, 0x0002, 0x1128, 0x7030, 0x9080, + 0x0004, 0x2004, 0x9b06, 0x00ee, 0x0005, 0x00b6, 0x00e6, 0x0126, + 0x2091, 0x8000, 0xa874, 0x908e, 0x00ff, 0x1120, 0x2001, 0x196b, + 0x205c, 0x0060, 0xa974, 0x9182, 0x0800, 0x1690, 0x9188, 0x1000, + 0x2104, 0x905d, 0x01d0, 0x080c, 0x6bb1, 0x11d0, 0x080c, 0xb116, + 0x0570, 0x2b00, 0x6012, 0x2900, 0x6016, 0x6023, 0x0009, 0x602b, + 0x0000, 0xa874, 0x908e, 0x00ff, 0x1110, 0x602b, 0x8000, 0x2009, + 0x0043, 0x080c, 0xb20a, 0x9006, 0x00b0, 0x2001, 0x0028, 0x0090, + 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, + 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, 0x0029, 0x0010, + 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, + 0x002c, 0x0cc0, 0x00b6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa974, + 0x9182, 0x0800, 0x1a04, 0x6388, 0x9188, 0x1000, 0x2104, 0x905d, + 0x0904, 0x6360, 0xb8a0, 0x9086, 0x007f, 0x0190, 0xa87c, 0xd0fc, + 0x1178, 0x080c, 0x6c19, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, + 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x6c11, 0x1598, + 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, + 0x2010, 0x080c, 0xcf09, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, + 0x638a, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, + 0x638a, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, + 0xb116, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, + 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0xb20a, 0x9006, 0x0458, + 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0xb094, + 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, + 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, + 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, + 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, + 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, + 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, + 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, + 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, + 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, + 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, + 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, + 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, + 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, + 0x00fe, 0x0005, 0x641f, 0x63da, 0x63f1, 0x641f, 0x641f, 0x641f, + 0x641f, 0x641f, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x6749, + 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x6427, 0xb814, 0x9206, + 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x4b54, 0x0150, + 0x04b0, 0x080c, 0x67b4, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, + 0x9206, 0x1568, 0x080c, 0xb116, 0x0530, 0x2b00, 0x6012, 0x080c, + 0xd3b6, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, + 0x9086, 0x0001, 0x1170, 0x080c, 0x3315, 0x9006, 0x080c, 0x66e6, + 0x2001, 0x0002, 0x080c, 0x66fa, 0x2001, 0x0200, 0xb86e, 0xb893, + 0x0002, 0x2009, 0x0003, 0x080c, 0xb20a, 0x9006, 0x0068, 0x2001, + 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, + 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, + 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, + 0x0015, 0x0904, 0x6612, 0x90c6, 0x0056, 0x0904, 0x6616, 0x90c6, + 0x0066, 0x0904, 0x661a, 0x90c6, 0x0067, 0x0904, 0x661e, 0x90c6, + 0x0068, 0x0904, 0x6622, 0x90c6, 0x0071, 0x0904, 0x6626, 0x90c6, + 0x0074, 0x0904, 0x662a, 0x90c6, 0x007c, 0x0904, 0x662e, 0x90c6, + 0x007e, 0x0904, 0x6632, 0x90c6, 0x0037, 0x0904, 0x6636, 0x9016, + 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x660d, 0x9182, + 0x0800, 0x1a04, 0x660d, 0x080c, 0x67b4, 0x1198, 0xb804, 0x9084, + 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, + 0x080c, 0xb094, 0x1904, 0x65f6, 0xb8a0, 0x9084, 0xff80, 0x1904, + 0x65f6, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, + 0x6556, 0x90c6, 0x0064, 0x0904, 0x657f, 0x2008, 0x0804, 0x6518, + 0xa998, 0xa8b0, 0x2040, 0x080c, 0xb094, 0x1120, 0x9182, 0x007f, + 0x0a04, 0x6518, 0x9186, 0x00ff, 0x0904, 0x6518, 0x9182, 0x0800, + 0x1a04, 0x6518, 0xaaa0, 0xab9c, 0x787c, 0x9306, 0x11a8, 0x7880, + 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x6518, + 0x080c, 0xb094, 0x1140, 0x99cc, 0xff00, 0x009e, 0x1128, 0x2208, + 0x2310, 0x0804, 0x6518, 0x009e, 0x080c, 0x4b54, 0x0904, 0x6522, + 0x900e, 0x9016, 0x90c6, 0x4000, 0x15e0, 0x0006, 0x080c, 0x6aae, + 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x20a9, 0x0004, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8c4, 0x20e0, + 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fd6, 0x20a9, 0x0004, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c4, 0x20e0, + 0xb8c8, 0x9080, 0x000a, 0x2098, 0x080c, 0x0fd6, 0xa8c4, 0xabc8, + 0x9305, 0xabcc, 0x9305, 0xabd0, 0x9305, 0xabd4, 0x9305, 0xabd8, + 0x9305, 0xabdc, 0x9305, 0xabe0, 0x9305, 0x9005, 0x0510, 0x000e, + 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, 0x00a0, 0x90c6, 0x4008, + 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, 0x4009, 0x1108, 0x0050, + 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, 0x2009, 0x000a, 0x0010, + 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, 0x2001, 0x0030, 0x900e, + 0x0478, 0x000e, 0x080c, 0xb116, 0x1130, 0x2001, 0x4005, 0x2009, + 0x0003, 0x9016, 0x0c78, 0x2b00, 0x6012, 0x080c, 0xd3b6, 0x2900, + 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, 0xc0f5, 0xa86a, + 0x0126, 0x2091, 0x8000, 0x080c, 0x3315, 0x012e, 0x9006, 0x080c, + 0x66e6, 0x2001, 0x0002, 0x080c, 0x66fa, 0x2009, 0x0002, 0x080c, + 0xb20a, 0xa8b0, 0xd094, 0x0118, 0xb8d4, 0xc08d, 0xb8d6, 0x9006, + 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x080c, 0x5854, + 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, 0x080c, 0x67b4, + 0x1904, 0x6513, 0x9186, 0x007f, 0x0130, 0x080c, 0x6c11, 0x0118, + 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x1059, 0x1120, 0x009e, + 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, 0x080c, 0xd109, + 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x651a, 0xa998, + 0xaeb0, 0x080c, 0x67b4, 0x1904, 0x6513, 0x0096, 0x080c, 0x1059, + 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x65d3, 0x2900, 0x009e, + 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8c4, 0x20e0, 0xb8c8, + 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, + 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbc8, 0x9398, 0x0006, + 0x2398, 0x080c, 0x0fd6, 0x009e, 0xa87b, 0x0000, 0xa883, 0x0000, + 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x5840, 0xd0b4, 0x1118, + 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, 0xa89b, 0x000c, + 0x00b0, 0x080c, 0x6c11, 0x0118, 0xa89b, 0x0009, 0x0080, 0x080c, + 0x5854, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, 0xd0ec, 0x1904, + 0x654f, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, 0x651a, 0xa87b, + 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, 0x8007, 0x90bc, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0xaaa0, + 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, 0x12a8, 0x080c, + 0xb691, 0x1904, 0x654f, 0x2009, 0x0002, 0x08e8, 0x2001, 0x0028, + 0x900e, 0x0804, 0x6550, 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, + 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, + 0x2001, 0x0029, 0x900e, 0x0804, 0x6550, 0x2001, 0x0029, 0x900e, + 0x0804, 0x6550, 0x080c, 0x38c0, 0x0804, 0x6551, 0x080c, 0x555d, + 0x0804, 0x6551, 0x080c, 0x46d5, 0x0804, 0x6551, 0x080c, 0x474e, + 0x0804, 0x6551, 0x080c, 0x47aa, 0x0804, 0x6551, 0x080c, 0x4c17, + 0x0804, 0x6551, 0x080c, 0x4edf, 0x0804, 0x6551, 0x080c, 0x51c4, + 0x0804, 0x6551, 0x080c, 0x53bd, 0x0804, 0x6551, 0x080c, 0x3afe, + 0x0804, 0x6551, 0x00b6, 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, + 0x4000, 0x1608, 0x9182, 0x0800, 0x1258, 0x9188, 0x1000, 0x2104, + 0x905d, 0x0130, 0x080c, 0x6c11, 0x1138, 0x00d9, 0x9006, 0x00b0, + 0x2001, 0x0028, 0x900e, 0x0090, 0x9082, 0x0006, 0x1240, 0xb900, + 0xd1fc, 0x0d98, 0x2001, 0x0029, 0x2009, 0x1000, 0x0038, 0x2001, + 0x0029, 0x900e, 0x0018, 0x2001, 0x0029, 0x900e, 0x9005, 0x00be, + 0x0005, 0xa877, 0x0000, 0xb8d0, 0x9005, 0x1904, 0x66da, 0xb888, + 0x9005, 0x1904, 0x66da, 0xb838, 0xb93c, 0x9102, 0x1a04, 0x66da, + 0x2b10, 0x080c, 0xb143, 0x0904, 0x66d6, 0x8108, 0xb93e, 0x6212, + 0x2900, 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040, + 0xa878, 0x605e, 0xa880, 0x6066, 0xa883, 0x0000, 0xa87c, 0xd0ac, + 0x05b8, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1560, 0x2011, 0x180d, + 0x2214, 0xd28c, 0x190c, 0x6cd6, 0xa816, 0xa864, 0x9094, 0x00f7, + 0x9296, 0x0011, 0x11f8, 0x9084, 0x00ff, 0xc0bd, 0x601e, 0xa8ac, + 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x000f, 0x8001, 0x1df0, 0x2001, + 0x8004, 0x6003, 0x0004, 0x6046, 0x00f6, 0x2079, 0x0380, 0x7818, + 0xd0bc, 0x1de8, 0x7833, 0x0010, 0x2c00, 0x7836, 0x781b, 0x8080, + 0x00fe, 0x0005, 0x080c, 0x17ad, 0x601c, 0xc0bd, 0x601e, 0x0c38, + 0x2009, 0x180d, 0x210c, 0xd18c, 0x190c, 0x6ce0, 0xd0b4, 0x190c, + 0x1c9c, 0x2001, 0x8004, 0x6003, 0x0002, 0x08e8, 0x81ff, 0x1110, + 0xb88b, 0x0001, 0x2908, 0xb8cc, 0xb9ce, 0x9005, 0x1110, 0xb9d2, + 0x0020, 0x0096, 0x2048, 0xa902, 0x009e, 0x0005, 0x00b6, 0x0126, + 0x00c6, 0x0026, 0x2091, 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, + 0x0110, 0xc285, 0x0008, 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, + 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, + 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, + 0x0158, 0x080c, 0x6c0d, 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, + 0x0007, 0x1110, 0x2011, 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, + 0xba06, 0x0006, 0x9086, 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, + 0x0d85, 0x000e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, + 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, + 0x0006, 0x1168, 0xb89c, 0xd0a4, 0x0150, 0x080c, 0x6c09, 0x1138, + 0x9284, 0x00ff, 0x9086, 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, + 0x9294, 0x00ff, 0x8007, 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, + 0x0005, 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, + 0x0026, 0x9190, 0x1000, 0x2204, 0x905d, 0x1188, 0x0096, 0x080c, + 0x1059, 0x2958, 0x009e, 0x0168, 0x2b00, 0x2012, 0xb85c, 0xb8ca, + 0xb860, 0xb8c6, 0x9006, 0xb8a6, 0xb8ae, 0x080c, 0x61b7, 0x9006, + 0x0010, 0x9085, 0x0001, 0x002e, 0x00de, 0x0005, 0x00b6, 0x0096, + 0x0126, 0x2091, 0x8000, 0x0026, 0x9182, 0x0800, 0x0218, 0x9085, + 0x0001, 0x04a8, 0x00d6, 0x9190, 0x1000, 0x2204, 0x905d, 0x0568, + 0x2013, 0x0000, 0xb8a4, 0x904d, 0x0110, 0x080c, 0x108b, 0x00d6, + 0x00c6, 0xb8bc, 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6014, + 0x2048, 0x080c, 0xcf1b, 0x0110, 0x080c, 0x100b, 0x080c, 0xb16c, + 0x00ce, 0x0c88, 0x00ce, 0x00de, 0x00c6, 0xb8ac, 0x9065, 0x0128, + 0x621c, 0xd2c4, 0x0110, 0x080c, 0x928d, 0x00ce, 0x2b48, 0xb8c8, + 0xb85e, 0xb8c4, 0xb862, 0x080c, 0x109b, 0x00de, 0x9006, 0x002e, + 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182, 0x0800, 0x0218, + 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104, 0x905d, 0x0dc0, + 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x9006, + 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, 0x779e, 0x1510, + 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0xb094, 0x11d8, 0x0078, + 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1982, 0x7048, 0x2062, + 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e, 0x00ce, 0x703c, + 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069, + 0x1800, 0x68b6, 0x7040, 0xb85e, 0x7048, 0xb862, 0x704c, 0xb866, + 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8c4, 0x20e8, 0xb8c8, 0x9088, + 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, 0x027a, 0x9088, + 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, 0x0200, 0x6817, + 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, 0xb872, 0x7050, + 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, 0x9086, 0x007e, + 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, 0x2009, 0x0008, + 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, 0x9182, + 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, 0x0349, 0x1218, + 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218, 0x2009, 0x0004, + 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, 0x2009, + 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x0016, + 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, 0x703c, 0xb89a, + 0x7054, 0xb89e, 0x0036, 0xbbd4, 0xc384, 0xba00, 0x2009, 0x1867, + 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, 0x0008, 0xc2ac, + 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, 0x0128, 0xd38c, + 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbd6, 0x003e, 0x00ee, + 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091, 0x8000, 0xb8a4, + 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, 0x9282, 0x0010, + 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, 0x8006, 0x8007, + 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, 0x0004, 0x2098, + 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, 0xffff, 0x0120, + 0x8109, 0x1dd0, 0x080c, 0x0d85, 0x3c00, 0x20e8, 0x3300, 0x8001, + 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, 0x014e, 0x013e, + 0x0060, 0x080c, 0x1059, 0x0170, 0x2900, 0xb8a6, 0xa803, 0x0000, + 0x080c, 0x6a4a, 0xa807, 0x0001, 0xae12, 0x9085, 0x0001, 0x012e, + 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x0096, + 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150, 0x080c, 0x6a59, + 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001, 0xa806, 0x0020, + 0x080c, 0x108b, 0xb8a7, 0x0000, 0x009e, 0x012e, 0x0005, 0x0096, + 0x00c6, 0xb888, 0x9005, 0x1904, 0x693f, 0xb8d0, 0x904d, 0x0904, + 0x693f, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, + 0x1904, 0x693d, 0x080c, 0xb143, 0x0904, 0x693d, 0x8210, 0xba3e, + 0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x2b00, 0x6012, 0x2900, + 0x6016, 0x6023, 0x0003, 0x600b, 0xffff, 0x6007, 0x0040, 0xa878, + 0x605e, 0xa880, 0x9084, 0x00ff, 0x6066, 0xa883, 0x0000, 0xa87c, + 0xd0ac, 0x01c8, 0xc0dd, 0xa87e, 0xa888, 0x8001, 0x1558, 0xa816, + 0xa864, 0x9094, 0x00f7, 0x9296, 0x0011, 0x1520, 0x9084, 0x00ff, + 0xc0bd, 0x601e, 0xa8ac, 0xaab0, 0xa836, 0xaa3a, 0x2001, 0x8004, + 0x6003, 0x0004, 0x0030, 0x080c, 0x1c9c, 0x2001, 0x8004, 0x6003, + 0x0002, 0x6046, 0x2001, 0x0010, 0x2c08, 0x080c, 0xaced, 0xb838, + 0xba3c, 0x9202, 0x0a04, 0x68e5, 0x0010, 0xb88b, 0x0001, 0x00ce, + 0x009e, 0x0005, 0x080c, 0x17ad, 0x601c, 0xc0bd, 0x601e, 0x08f0, + 0x00b6, 0x0096, 0x0016, 0x20a9, 0x0800, 0x900e, 0x0016, 0x080c, + 0x67b4, 0x1158, 0xb8d0, 0x904d, 0x0140, 0x3e00, 0x9086, 0x0002, + 0x1118, 0xb800, 0xd0bc, 0x1108, 0x0041, 0x001e, 0x8108, 0x1f04, + 0x694e, 0x001e, 0x00be, 0x009e, 0x0005, 0x0096, 0x0016, 0xb8d0, + 0x904d, 0x0188, 0xa800, 0xb8d2, 0x9005, 0x1108, 0xb8ce, 0x9006, + 0xa802, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd220, + 0x080c, 0x7012, 0x0c60, 0x001e, 0x009e, 0x0005, 0x0086, 0x9046, + 0xb8d0, 0x904d, 0x01b0, 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, + 0x0128, 0x2940, 0xa800, 0x904d, 0x0160, 0x0ca8, 0xa800, 0x88ff, + 0x1128, 0xb8d2, 0x9005, 0x1118, 0xb8ce, 0x0008, 0xa002, 0xa803, + 0x0000, 0x008e, 0x0005, 0x901e, 0x0010, 0x2019, 0x0001, 0x0126, + 0x2091, 0x8000, 0x00e6, 0x0096, 0x00c6, 0x0086, 0x0026, 0x2071, + 0x19e8, 0x9046, 0x7028, 0x9065, 0x01e8, 0x6014, 0x2068, 0x83ff, + 0x0120, 0x605c, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, + 0xa870, 0x9506, 0x0120, 0x2c40, 0x600c, 0x2060, 0x0c60, 0x600c, + 0x0006, 0x0066, 0x2830, 0x080c, 0xa420, 0x006e, 0x000e, 0x83ff, + 0x0508, 0x0c08, 0x9046, 0xb8d0, 0x904d, 0x01e0, 0x83ff, 0x0120, + 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, 0xa870, + 0x9506, 0x0120, 0x2940, 0xa800, 0x2048, 0x0c70, 0xb8d0, 0xaa00, + 0x0026, 0x9906, 0x1110, 0xbad2, 0x0008, 0xa202, 0x000e, 0x83ff, + 0x0108, 0x0c10, 0x002e, 0x008e, 0x00ce, 0x009e, 0x00ee, 0x012e, + 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c, + 0x6aae, 0x0128, 0x080c, 0xcfdc, 0x0010, 0x9085, 0x0001, 0x0005, + 0x080c, 0x6aae, 0x0128, 0x080c, 0xcf7d, 0x0010, 0x9085, 0x0001, + 0x0005, 0x080c, 0x6aae, 0x0128, 0x080c, 0xcfd9, 0x0010, 0x9085, + 0x0001, 0x0005, 0x080c, 0x6aae, 0x0128, 0x080c, 0xcf9c, 0x0010, + 0x9085, 0x0001, 0x0005, 0x080c, 0x6aae, 0x0128, 0x080c, 0xd01f, + 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085, + 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, + 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, + 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, + 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce, + 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de, + 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, + 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, + 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, + 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300, + 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de, + 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091, + 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x1059, 0x0168, 0x2900, + 0xb8a6, 0x080c, 0x6a4a, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085, + 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126, + 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c, + 0x108b, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4, + 0x0005, 0x00b6, 0x00f6, 0x080c, 0x779e, 0x01b0, 0x71c4, 0x81ff, + 0x1198, 0x71dc, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000, + 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, + 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1847, 0x7804, 0xd0a4, + 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x67b4, + 0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, + 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, + 0x1f04, 0x6ad5, 0x015e, 0x080c, 0x6bcf, 0x0120, 0x2001, 0x1985, + 0x200c, 0x0098, 0x2079, 0x1847, 0x7804, 0xd0a4, 0x0190, 0x2009, + 0x07d0, 0x2001, 0x182c, 0x2004, 0x9005, 0x0138, 0x2001, 0x1867, + 0x2004, 0xd0e4, 0x0110, 0x2009, 0x5dc0, 0x2011, 0x6b0c, 0x080c, + 0x8a5d, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x2011, 0x6b0c, 0x080c, + 0x8993, 0x080c, 0x6bcf, 0x01d8, 0x2001, 0x107e, 0x2004, 0x2058, + 0xb900, 0xc1ec, 0xb902, 0x080c, 0x6c0d, 0x0130, 0x2009, 0x07d0, + 0x2011, 0x6b0c, 0x080c, 0x8a5d, 0x00e6, 0x2071, 0x1800, 0x9006, + 0x707e, 0x7060, 0x7082, 0x080c, 0x30bf, 0x00ee, 0x04d0, 0x0156, + 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x67b4, 0x1558, + 0xb800, 0xd0ec, 0x0540, 0x0046, 0xbaa0, 0x2220, 0x9006, 0x2009, + 0x0029, 0x080c, 0xea8d, 0xb800, 0xc0e5, 0xc0ec, 0xb802, 0x080c, + 0x6c09, 0x2001, 0x0707, 0x1128, 0xb804, 0x9084, 0x00ff, 0x9085, + 0x0700, 0xb806, 0x080c, 0xacfc, 0x2019, 0x0029, 0x080c, 0x97b0, + 0x0076, 0x903e, 0x080c, 0x966d, 0x900e, 0x080c, 0xe75d, 0x007e, + 0x004e, 0x080c, 0xad18, 0x001e, 0x8108, 0x1f04, 0x6b34, 0x00ce, + 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, + 0xb802, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x0096, 0x080c, 0x1072, + 0x090c, 0x0d85, 0x2958, 0x009e, 0x2001, 0x196b, 0x2b02, 0x8b07, + 0x8006, 0x8006, 0x908c, 0x003f, 0xb9c6, 0x908c, 0xffc0, 0xb9ca, + 0xb8af, 0x0000, 0x2009, 0x00ff, 0x080c, 0x61b7, 0xb807, 0x0006, + 0xb813, 0x00ff, 0xb817, 0xffff, 0xb86f, 0x0200, 0xb86c, 0xb893, + 0x0002, 0xb8bb, 0x0520, 0xb8a3, 0x00ff, 0xb8af, 0x0000, 0x00ce, + 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ac, + 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, 0xd0bc, + 0x0005, 0x0006, 0x0016, 0x0026, 0xb804, 0x908c, 0x00ff, 0x9196, + 0x0006, 0x0188, 0x9196, 0x0004, 0x0170, 0x9196, 0x0005, 0x0158, + 0x908c, 0xff00, 0x810f, 0x9196, 0x0006, 0x0128, 0x9196, 0x0004, + 0x0110, 0x9196, 0x0005, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, + 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0ec, + 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000, 0x0006, + 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, 0x190c, 0x0d85, 0x000e, + 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0xba02, 0x002e, + 0x012e, 0x0005, 0x2011, 0x1837, 0x2204, 0xd0cc, 0x0138, 0x2001, + 0x1983, 0x200c, 0x2011, 0x6bff, 0x080c, 0x8a5d, 0x0005, 0x2011, + 0x6bff, 0x080c, 0x8993, 0x2011, 0x1837, 0x2204, 0xc0cc, 0x2012, + 0x0005, 0x080c, 0x5840, 0xd0ac, 0x0005, 0x080c, 0x5840, 0xd0a4, + 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, 0x908e, 0x0006, 0x001e, + 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, 0x8007, 0x908e, 0x0006, + 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, 0xd645, 0x0158, 0x70dc, + 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, 0x2004, 0x905d, 0x0110, + 0xb8d4, 0xd094, 0x00fe, 0x00be, 0x0005, 0x0006, 0x0016, 0x0036, + 0x0046, 0x0076, 0x00b6, 0x2001, 0x1818, 0x203c, 0x9780, 0x348e, + 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2018, 0x2008, 0x9284, + 0x8000, 0x0110, 0x2019, 0x0001, 0x9294, 0x7fff, 0x2100, 0x9706, + 0x0190, 0x91a0, 0x1000, 0x2404, 0x905d, 0x0168, 0xb804, 0x9084, + 0x00ff, 0x9086, 0x0006, 0x1138, 0x83ff, 0x0118, 0xb89c, 0xd0a4, + 0x0110, 0x8211, 0x0158, 0x8108, 0x83ff, 0x0120, 0x9182, 0x0800, + 0x0e28, 0x0068, 0x9182, 0x007e, 0x0e08, 0x0048, 0x00be, 0x007e, + 0x004e, 0x003e, 0x001e, 0x9085, 0x0001, 0x000e, 0x0005, 0x00be, + 0x007e, 0x004e, 0x003e, 0x001e, 0x9006, 0x000e, 0x0005, 0x0046, + 0x0056, 0x0076, 0x00b6, 0x2100, 0x9084, 0x7fff, 0x9080, 0x1000, + 0x2004, 0x905d, 0x0130, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, + 0x0550, 0x9184, 0x8000, 0x0580, 0x2001, 0x1818, 0x203c, 0x9780, + 0x348e, 0x203d, 0x97bc, 0xff00, 0x873f, 0x9006, 0x2020, 0x2400, + 0x9706, 0x01a0, 0x94a8, 0x1000, 0x2504, 0x905d, 0x0178, 0xb804, + 0x9084, 0x00ff, 0x9086, 0x0006, 0x1148, 0xb89c, 0xd0a4, 0x0130, + 0xb814, 0x9206, 0x1118, 0xb810, 0x9306, 0x0128, 0x8420, 0x9482, + 0x0800, 0x0e28, 0x0048, 0x918c, 0x7fff, 0x00be, 0x007e, 0x005e, + 0x004e, 0x9085, 0x0001, 0x0005, 0x918c, 0x7fff, 0x00be, 0x007e, + 0x005e, 0x004e, 0x9006, 0x0005, 0x0006, 0x2001, 0x00a0, 0x8001, + 0xa001, 0xa001, 0xa001, 0x1dd8, 0x000e, 0x0005, 0x0006, 0x2001, + 0x00f8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, 0x000e, 0x0005, + 0x0006, 0x2001, 0x00e8, 0x8001, 0xa001, 0xa001, 0xa001, 0x1dd8, + 0x000e, 0x0005, 0x2071, 0x1910, 0x7003, 0x0001, 0x7007, 0x0000, + 0x9006, 0x7012, 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x2001, + 0x1922, 0x2003, 0x0000, 0x0005, 0x0016, 0x00e6, 0x2071, 0x1948, + 0x900e, 0x710a, 0x080c, 0x5840, 0xd0fc, 0x1140, 0x080c, 0x5840, + 0x900e, 0xd09c, 0x0108, 0x8108, 0x7102, 0x0470, 0x2001, 0x1867, + 0x200c, 0x9184, 0x0007, 0x0006, 0x2001, 0x180d, 0x2004, 0xd08c, + 0x000e, 0x0108, 0x9006, 0x0002, 0x6d06, 0x6d06, 0x6d06, 0x6d06, + 0x6d06, 0x6d24, 0x6d39, 0x6d47, 0x7003, 0x0003, 0x2009, 0x1868, + 0x210c, 0x9184, 0xff00, 0x908e, 0xff00, 0x0140, 0x8007, 0x9005, + 0x1110, 0x2001, 0x0002, 0x8003, 0x7006, 0x0030, 0x7007, 0x0001, + 0x0018, 0x7003, 0x0005, 0x0c50, 0x2071, 0x1910, 0x704f, 0x0000, + 0x2071, 0x1800, 0x70f7, 0x0001, 0x00ee, 0x001e, 0x0005, 0x7003, + 0x0000, 0x2071, 0x1910, 0x2009, 0x1868, 0x210c, 0x9184, 0x7f00, + 0x8007, 0x908c, 0x000f, 0x0160, 0x714e, 0x8004, 0x8004, 0x8004, + 0x8004, 0x2071, 0x1800, 0x908c, 0x0007, 0x0128, 0x70f6, 0x0c20, + 0x704f, 0x000f, 0x0c90, 0x70f7, 0x0005, 0x08f0, 0x00e6, 0x2071, + 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071, 0x1910, 0x7028, + 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, + 0x0158, 0x080c, 0x7b28, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, + 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, + 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, + 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, + 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x1910, 0x7028, 0xc084, + 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, + 0x0005, 0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, + 0x7017, 0x9286, 0x0003, 0x0904, 0x6eac, 0x9286, 0x0005, 0x0904, + 0x6eac, 0x2071, 0x1877, 0xa87c, 0x9005, 0x0904, 0x6e07, 0x7140, + 0xa868, 0x9102, 0x0a04, 0x7017, 0xa878, 0xd084, 0x15d8, 0xa853, + 0x0019, 0x2001, 0x8023, 0xa84e, 0x2071, 0x1910, 0x701c, 0x9005, + 0x1904, 0x71c6, 0x0e04, 0x7234, 0x2071, 0x0000, 0xa850, 0x7032, + 0xa84c, 0x7082, 0xa870, 0x7086, 0xa86c, 0x708a, 0xa880, 0x708e, + 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, + 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, + 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, + 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, + 0x0804, 0x6e8f, 0xa853, 0x001b, 0x2001, 0x8027, 0x0820, 0x7004, + 0xd08c, 0x1904, 0x7017, 0xa853, 0x001a, 0x2001, 0x8024, 0x0804, + 0x6dcb, 0x00e6, 0x0026, 0x2071, 0x1948, 0x7000, 0x9015, 0x0904, + 0x7017, 0x9286, 0x0003, 0x0904, 0x6eac, 0x9286, 0x0005, 0x0904, + 0x6eac, 0xa84f, 0x8022, 0xa853, 0x0018, 0x0804, 0x6e74, 0xa868, + 0xd0fc, 0x1508, 0x00e6, 0x0026, 0x2001, 0x1948, 0x2004, 0x9015, + 0x0904, 0x7017, 0xa978, 0xa874, 0x9105, 0x1904, 0x7017, 0x9286, + 0x0003, 0x0904, 0x6eac, 0x9286, 0x0005, 0x0904, 0x6eac, 0xa87c, + 0xd0bc, 0x1904, 0x7017, 0x2200, 0x0002, 0x7017, 0x6e70, 0x6eac, + 0x6eac, 0x7017, 0x6eac, 0x0005, 0xa868, 0xd0fc, 0x1500, 0x00e6, + 0x0026, 0x2009, 0x1948, 0x210c, 0x81ff, 0x0904, 0x7017, 0xa880, + 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x7017, 0x9186, 0x0003, + 0x0904, 0x6eac, 0x9186, 0x0005, 0x0904, 0x6eac, 0xa87c, 0xd0cc, + 0x0904, 0x7017, 0xa84f, 0x8021, 0xa853, 0x0017, 0x0028, 0x0005, + 0xa84f, 0x8020, 0xa853, 0x0016, 0x2071, 0x1910, 0x701c, 0x9005, + 0x1904, 0x71c6, 0x0e04, 0x7234, 0x2071, 0x0000, 0xa84c, 0x7082, + 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x2071, + 0x1800, 0x2011, 0x0001, 0xa804, 0x900d, 0x702c, 0x1158, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, 0x002e, + 0x00ee, 0x0005, 0x0096, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x009e, 0x0c58, 0xa84f, 0x0000, 0x00f6, 0x2079, + 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, + 0x6f9d, 0x782c, 0x908c, 0x0780, 0x190c, 0x7382, 0x8004, 0x8004, + 0x8004, 0x9084, 0x0003, 0x0002, 0x6eca, 0x6f9d, 0x6eee, 0x6f3a, + 0x080c, 0x0d85, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, + 0x1168, 0x2071, 0x1a04, 0x7044, 0x9005, 0x1320, 0x2001, 0x1949, + 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, + 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, + 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, 0x0c18, 0x2071, 0x1800, + 0x2900, 0x7822, 0xa804, 0x900d, 0x15a0, 0x7824, 0x00e6, 0x2071, + 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c, 0x918a, + 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, + 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8899, 0x782c, 0x9094, 0x0780, + 0x190c, 0x7382, 0xd0a4, 0x19c8, 0x2071, 0x1a04, 0x7044, 0x9005, + 0x1320, 0x2001, 0x1949, 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, + 0x0804, 0x6ef5, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, + 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, + 0x8899, 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, 0x1d60, + 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd09c, 0x1198, + 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1550, 0x2071, 0x1a04, + 0x7044, 0x9005, 0x1320, 0x2001, 0x1949, 0x2004, 0x7046, 0x00fe, + 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, + 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, + 0xa804, 0x900d, 0x1168, 0x2071, 0x1a04, 0x7044, 0x9005, 0x1320, + 0x2001, 0x1949, 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, + 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, + 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, + 0x8899, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, + 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, + 0x2148, 0xa804, 0x900d, 0x1904, 0x6ff1, 0x782c, 0x9094, 0x0780, + 0x190c, 0x7382, 0xd09c, 0x1198, 0x701c, 0x904d, 0x0180, 0x7010, + 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, + 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd09c, 0x0d68, 0x782c, + 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, 0x01b0, 0x00e6, 0x7824, + 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, + 0x8000, 0x70c2, 0x080c, 0x8899, 0x782c, 0x9094, 0x0780, 0x190c, + 0x7382, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x1a04, 0x7044, 0x9005, + 0x1320, 0x2001, 0x1949, 0x2004, 0x7046, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, + 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, + 0x70c2, 0x080c, 0x8899, 0x00ee, 0x0804, 0x6fad, 0xa868, 0xd0fc, + 0x15e0, 0x0096, 0xa804, 0xa807, 0x0000, 0x904d, 0x190c, 0x100b, + 0x009e, 0x0018, 0xa868, 0xd0fc, 0x1580, 0x00e6, 0x0026, 0xa84f, + 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1910, 0xa803, 0x0000, + 0xa864, 0x9084, 0x00ff, 0x908e, 0x0016, 0x01a8, 0x7010, 0x9005, + 0x1904, 0x7142, 0x782c, 0x908c, 0x0780, 0x190c, 0x7382, 0x8004, + 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, 0x7046, 0x7142, 0x7061, + 0x70d3, 0x080c, 0x0d85, 0x2009, 0x1948, 0x2104, 0x0002, 0x7026, + 0x7026, 0x7026, 0x6eb5, 0x7026, 0x6eb5, 0x0005, 0x2071, 0x1800, + 0x2900, 0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, + 0x0c60, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1904, + 0x70c2, 0x7830, 0xd0dc, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, + 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, + 0x1830, 0x210c, 0x918a, 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, + 0x200c, 0x8108, 0x2102, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, + 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8899, + 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, 0x19c8, 0x0e04, + 0x70b9, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, + 0x6836, 0x6833, 0x0013, 0x00de, 0x2001, 0x1921, 0x200c, 0xc184, + 0x2102, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x1200, 0x2001, 0x1922, 0x2003, 0x0000, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x2001, 0x1921, 0x200c, 0xc185, 0x2102, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, + 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, + 0x8899, 0x0804, 0x7070, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, + 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, + 0x080c, 0x8899, 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, + 0x1d60, 0x00ee, 0x0e04, 0x7115, 0x7838, 0x7938, 0x910e, 0x1de0, + 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, + 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x1200, 0x704b, 0x0000, 0x782c, 0x9094, 0x0780, 0x190c, + 0x7382, 0xd09c, 0x1170, 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, + 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, + 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, + 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, + 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, + 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, + 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, + 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, + 0x1904, 0x71b1, 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd09c, + 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, 0x9005, 0x1180, 0x7010, + 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, 0x2900, 0x7822, + 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd09c, 0x0d50, 0x782c, + 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, 0x05b8, 0x00e6, 0x7824, + 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70c0, + 0x8000, 0x70c2, 0x080c, 0x8899, 0x782c, 0x9094, 0x0780, 0x190c, + 0x7382, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x71aa, 0x7838, 0x7938, + 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, + 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x190c, 0x1200, 0x704b, 0x0000, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x7044, 0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee, + 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, + 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, + 0x70c2, 0x080c, 0x8899, 0x00ee, 0x0804, 0x7152, 0x2071, 0x1910, + 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, + 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, + 0x1128, 0x1e04, 0x71f1, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, + 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, + 0x1dc8, 0x702e, 0x70c0, 0x9200, 0x70c2, 0x080c, 0x8899, 0x0e04, + 0x71db, 0x2071, 0x1910, 0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18, + 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, + 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, 0x1278, 0x2091, 0x4080, + 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x2071, 0x1910, + 0x080c, 0x736e, 0x002e, 0x00ee, 0x0005, 0xa850, 0x9082, 0x001c, + 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, 0x01d6, 0x0136, 0x01c6, + 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, 0xa868, 0x20a8, 0xa860, + 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x4003, 0x015e, 0x01ce, + 0x013e, 0x01de, 0x014e, 0x0890, 0x2071, 0x1910, 0xa803, 0x0000, + 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, + 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1118, 0x002e, + 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, + 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70c0, 0x9200, + 0x70c2, 0x080c, 0x8899, 0x002e, 0x00ee, 0x0005, 0x0006, 0xa87c, + 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, 0x9084, 0x00ff, + 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, 0x1910, 0x7004, + 0x0002, 0x7281, 0x7282, 0x736d, 0x7282, 0x727f, 0x736d, 0x080c, + 0x0d85, 0x0005, 0x2001, 0x1948, 0x2004, 0x0002, 0x728c, 0x728c, + 0x7306, 0x7307, 0x728c, 0x7307, 0x0126, 0x2091, 0x8000, 0x1e0c, + 0x738d, 0x701c, 0x904d, 0x0508, 0xa84c, 0x9005, 0x0904, 0x72d7, + 0x0e04, 0x72b5, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, + 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0xa850, 0x9082, 0x0019, + 0x1278, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x1200, 0x2071, 0x1910, 0x080c, 0x736e, 0x012e, 0x0804, 0x7305, + 0xa850, 0x9082, 0x001c, 0x1e68, 0xa880, 0x708e, 0x7036, 0x0146, + 0x01d6, 0x0136, 0x01c6, 0x0156, 0x20e9, 0x0000, 0x20a1, 0x002a, + 0xa868, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, + 0x4003, 0x015e, 0x01ce, 0x013e, 0x01de, 0x014e, 0x0890, 0x2001, + 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, 0x7382, 0xd09c, 0x2071, + 0x1910, 0x1510, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, 0x9184, + 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, 0x8101, + 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, 0x00de, + 0x2071, 0x1910, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, + 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x00d6, + 0x2008, 0x2069, 0x1a04, 0x6844, 0x9005, 0x0760, 0x0158, 0x9186, + 0x0003, 0x0540, 0x2001, 0x1815, 0x2004, 0x2009, 0x1b73, 0x210c, + 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, 0x2069, 0x0050, 0x693c, + 0x6838, 0x9106, 0x0190, 0x0e04, 0x7339, 0x2069, 0x0000, 0x6837, + 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x2069, 0x1a04, 0x6847, + 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, 0x8000, 0x1e0c, 0x73fd, + 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, + 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1910, 0x700f, 0x0001, 0xa964, + 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, 0x918c, 0x00ff, + 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, 0x0050, 0x6822, + 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, 0x7012, 0xa800, 0x701e, + 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, 0x0005, 0x0126, 0x2091, + 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, 0x8001, 0x7012, 0xa800, + 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x080c, 0x108b, 0x0005, + 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, 0x7384, 0x0006, 0x0016, + 0x2001, 0x8004, 0x0006, 0x0804, 0x0d8e, 0x0096, 0x00f6, 0x2079, + 0x0050, 0x7044, 0xd084, 0x01d0, 0xc084, 0x7046, 0x7838, 0x7938, + 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, + 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x1200, 0x704b, 0x0000, 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, + 0x0780, 0x1981, 0xd0a4, 0x0db8, 0x7148, 0x704c, 0x8108, 0x714a, + 0x9102, 0x0e88, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, + 0x0040, 0x712c, 0xd19c, 0x1170, 0x2009, 0x1830, 0x210c, 0x918a, + 0x0020, 0x0240, 0x7022, 0x2001, 0x1dc0, 0x200c, 0x8108, 0x2102, + 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8899, 0x782c, 0x9094, 0x0780, + 0x190c, 0x7382, 0xd0a4, 0x19c8, 0x7838, 0x7938, 0x910e, 0x1de0, + 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, 0x00ee, + 0x704b, 0x0000, 0x00fe, 0x009e, 0x0005, 0x00f6, 0x2079, 0x0050, + 0x7044, 0xd084, 0x01b8, 0xc084, 0x7046, 0x7838, 0x7938, 0x910e, + 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, + 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1200, + 0x00fe, 0x0005, 0x782c, 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, + 0x0db8, 0x00e6, 0x2071, 0x1800, 0x7824, 0x2048, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8899, 0x782c, + 0x9094, 0x0780, 0x190c, 0x7382, 0xd0a4, 0x1d70, 0x00d6, 0x2069, + 0x0050, 0x693c, 0x2069, 0x1948, 0x6808, 0x690a, 0x2069, 0x1a04, + 0x9102, 0x1118, 0x6844, 0x9005, 0x1320, 0x2001, 0x1949, 0x200c, + 0x6946, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x7098, 0x908a, 0x002a, + 0x1a0c, 0x0d85, 0x9082, 0x001d, 0x003b, 0x0026, 0x2011, 0x1e00, + 0x080c, 0x2ad3, 0x002e, 0x0005, 0x7542, 0x74af, 0x74cb, 0x74f5, + 0x7531, 0x7571, 0x7583, 0x74cb, 0x7559, 0x746a, 0x7498, 0x751b, + 0x7469, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, + 0x6808, 0x9005, 0x1518, 0x709b, 0x0029, 0x2069, 0x198f, 0x2d04, + 0x7002, 0x080c, 0x78e4, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, + 0x709b, 0x0029, 0x2069, 0x198f, 0x2d04, 0x7002, 0x6028, 0x9085, + 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a6e, + 0x080c, 0x1b1e, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, + 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, + 0x1160, 0x709b, 0x0029, 0x2069, 0x198f, 0x2d04, 0x7002, 0x080c, + 0x7990, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, + 0x2001, 0x0090, 0x080c, 0x2a99, 0x000e, 0x6124, 0xd1e4, 0x1190, + 0x080c, 0x75f4, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, + 0x709b, 0x0020, 0x080c, 0x75f4, 0x0028, 0x709b, 0x001d, 0x0010, + 0x709b, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2a99, 0x6124, + 0xd1cc, 0x11e8, 0xd1dc, 0x11c0, 0xd1e4, 0x1198, 0x9184, 0x1e00, + 0x11d8, 0x080c, 0x1b4b, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, + 0x080c, 0x77ca, 0x2001, 0x0080, 0x080c, 0x2a99, 0x709b, 0x0029, + 0x0058, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028, 0x709b, + 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x080c, 0x1b4b, 0x60e3, + 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x77ca, 0x2001, 0x0080, + 0x080c, 0x2a99, 0x6124, 0xd1d4, 0x1198, 0xd1dc, 0x1170, 0xd1e4, + 0x1148, 0x9184, 0x1e00, 0x1118, 0x709b, 0x0029, 0x0058, 0x709b, + 0x0028, 0x0040, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, + 0x709b, 0x001f, 0x0005, 0x6124, 0xd1d4, 0x1180, 0xd1dc, 0x1158, + 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, 0x709b, 0x0029, 0x0040, + 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x001f, + 0x0005, 0x2001, 0x00a0, 0x080c, 0x2a99, 0x6124, 0xd1dc, 0x1138, + 0xd1e4, 0x0138, 0x080c, 0x1b4b, 0x709b, 0x001e, 0x0010, 0x709b, + 0x001d, 0x0005, 0x080c, 0x767d, 0x6124, 0xd1dc, 0x1188, 0x080c, + 0x75f4, 0x0016, 0x080c, 0x1b4b, 0x001e, 0xd1d4, 0x1128, 0xd1e4, + 0x0138, 0x709b, 0x001e, 0x0020, 0x709b, 0x001f, 0x080c, 0x75f4, + 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, 0x2a99, 0x000e, 0x6124, + 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, + 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, 0x709b, 0x0021, + 0x0005, 0x080c, 0x767d, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, + 0xd1e4, 0x0140, 0x709b, 0x001e, 0x0028, 0x709b, 0x001d, 0x0010, + 0x709b, 0x001f, 0x0005, 0x0006, 0x2001, 0x0090, 0x080c, 0x2a99, + 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, 0xd1dc, 0x1128, + 0xd1e4, 0x0158, 0x709b, 0x001e, 0x0040, 0x709b, 0x001d, 0x0028, + 0x709b, 0x0020, 0x0010, 0x709b, 0x001f, 0x0005, 0x0016, 0x00c6, + 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, + 0x1800, 0x2091, 0x8000, 0x080c, 0x779e, 0x11f8, 0x2001, 0x180c, + 0x200c, 0xd1b4, 0x01d0, 0xc1b4, 0x2102, 0x0026, 0x2011, 0x0200, + 0x080c, 0x2ad3, 0x002e, 0x080c, 0x2a7f, 0x6024, 0xd0cc, 0x0148, + 0x2001, 0x00a0, 0x080c, 0x2a99, 0x080c, 0x7ab6, 0x080c, 0x619d, + 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x77b8, 0x0150, + 0x080c, 0x77af, 0x1138, 0x2001, 0x0001, 0x080c, 0x2631, 0x080c, + 0x7772, 0x00a0, 0x080c, 0x767a, 0x0178, 0x2001, 0x0001, 0x080c, + 0x2631, 0x7098, 0x9086, 0x001e, 0x0120, 0x7098, 0x9086, 0x0022, + 0x1118, 0x709b, 0x0025, 0x0010, 0x709b, 0x0021, 0x012e, 0x00ee, + 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x7605, 0x080c, + 0x8a9f, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x7605, + 0x080c, 0x8a96, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, + 0x080c, 0xa2a0, 0x2071, 0x1800, 0x080c, 0x759e, 0x001e, 0x00fe, + 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x0126, 0x2071, 0x1800, 0x080c, 0xa2a0, 0x2061, 0x0100, + 0x2069, 0x0140, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x080c, + 0xacfc, 0x2011, 0x0003, 0x080c, 0xa62b, 0x2011, 0x0002, 0x080c, + 0xa635, 0x080c, 0xa516, 0x080c, 0x8a4b, 0x0036, 0x901e, 0x080c, + 0xa596, 0x003e, 0x080c, 0xad18, 0x60e3, 0x0000, 0x080c, 0xeed9, + 0x080c, 0xeef4, 0x2009, 0x0004, 0x080c, 0x2a85, 0x080c, 0x299b, + 0x2001, 0x1800, 0x2003, 0x0004, 0x2011, 0x0008, 0x080c, 0x2ad3, + 0x2011, 0x7605, 0x080c, 0x8a9f, 0x080c, 0x77b8, 0x0118, 0x9006, + 0x080c, 0x2a99, 0x080c, 0x0bcf, 0x2001, 0x0001, 0x080c, 0x2631, + 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, + 0x0005, 0x0026, 0x00e6, 0x2011, 0x7612, 0x2071, 0x1a04, 0x701c, + 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, 0x0001, 0x00ee, + 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, 0xfffe, + 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c, 0x2a99, 0x0156, + 0x20a9, 0x002d, 0x1d04, 0x768a, 0x2091, 0x6000, 0x1f04, 0x768a, + 0x015e, 0x00d6, 0x2069, 0x1800, 0x689c, 0x8001, 0x0220, 0x0118, + 0x689e, 0x00de, 0x0005, 0x689f, 0x0014, 0x68ec, 0xd0dc, 0x0dc8, + 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x8aab, 0x0c90, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, + 0x080c, 0x7ac5, 0x2001, 0x196d, 0x2003, 0x0000, 0x9006, 0x709a, + 0x60e2, 0x6886, 0x080c, 0x2700, 0x9006, 0x080c, 0x2a99, 0x080c, + 0x6058, 0x0026, 0x2011, 0xffff, 0x080c, 0x2ad3, 0x002e, 0x602b, + 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, + 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x2001, 0x197d, + 0x200c, 0x9186, 0x0000, 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, + 0x0002, 0x0158, 0x9186, 0x0003, 0x0158, 0x0804, 0x7762, 0x709b, + 0x0022, 0x0040, 0x709b, 0x0021, 0x0028, 0x709b, 0x0023, 0x0010, + 0x709b, 0x0024, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, + 0x080c, 0x2700, 0x080c, 0xacfc, 0x0026, 0x080c, 0xafd2, 0x080c, + 0xb09b, 0x002e, 0x080c, 0xad18, 0x7000, 0x908e, 0x0004, 0x0118, + 0x602b, 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, + 0x8000, 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, + 0x080c, 0xd645, 0x0118, 0x9006, 0x080c, 0x2ac3, 0x0804, 0x776e, + 0x6800, 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x2a7f, 0x6904, + 0xd1d4, 0x1140, 0x2001, 0x0100, 0x080c, 0x2a99, 0x1f04, 0x7713, + 0x080c, 0x77f2, 0x012e, 0x015e, 0x080c, 0x77af, 0x0170, 0x6044, + 0x9005, 0x0130, 0x080c, 0x77f2, 0x9006, 0x8001, 0x1df0, 0x0028, + 0x6804, 0xd0d4, 0x1110, 0x080c, 0x77f2, 0x080c, 0xd645, 0x0118, + 0x9006, 0x080c, 0x2ac3, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004, + 0x0130, 0x2009, 0x00c8, 0x2011, 0x7612, 0x080c, 0x8a5d, 0x002e, + 0x001e, 0x080c, 0x8890, 0x7034, 0xc085, 0x7036, 0x2001, 0x197d, + 0x2003, 0x0004, 0x080c, 0x744d, 0x080c, 0x77af, 0x0138, 0x6804, + 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, 0x7abb, 0x00ee, 0x00de, + 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, + 0x0140, 0x2071, 0x1800, 0x080c, 0x88a7, 0x080c, 0x8899, 0x080c, + 0x7ac5, 0x2001, 0x196d, 0x2003, 0x0000, 0x9006, 0x709a, 0x60e2, + 0x6886, 0x080c, 0x2700, 0x9006, 0x080c, 0x2a99, 0x6043, 0x0090, + 0x6043, 0x0010, 0x0026, 0x2011, 0xffff, 0x080c, 0x2ad3, 0x002e, + 0x602b, 0x182c, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, + 0x197c, 0x2004, 0x9086, 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, + 0x5844, 0x9084, 0x0030, 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, + 0x080c, 0x5844, 0x9084, 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, + 0x0006, 0x080c, 0x5844, 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, + 0x0005, 0x0006, 0x080c, 0x5844, 0x9084, 0x0030, 0x9086, 0x0020, + 0x000e, 0x0005, 0x0036, 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, + 0x0013, 0x0168, 0x0020, 0x080c, 0x2720, 0x900e, 0x0010, 0x2009, + 0x0002, 0x2019, 0x0028, 0x080c, 0x32da, 0x9006, 0x0019, 0x001e, + 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, + 0xd63e, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, + 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, + 0x6004, 0x0006, 0x6028, 0x0006, 0x080c, 0x2af6, 0x080c, 0x2b29, + 0x602f, 0x0100, 0x602f, 0x0000, 0x602f, 0x0040, 0x602f, 0x0000, + 0x20a9, 0x0002, 0x080c, 0x2a60, 0x0026, 0x2011, 0x0040, 0x080c, + 0x2ad3, 0x002e, 0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, + 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, + 0x080c, 0x2700, 0x2001, 0x00a0, 0x0006, 0x080c, 0xd645, 0x000e, + 0x0130, 0x080c, 0x2ab7, 0x9006, 0x080c, 0x2ac3, 0x0010, 0x080c, + 0x2a99, 0x000e, 0x6052, 0x6050, 0x0006, 0xc0e5, 0x6052, 0x00f6, + 0x2079, 0x0100, 0x080c, 0x2a0c, 0x00fe, 0x000e, 0x6052, 0x0005, + 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, + 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0xad5a, 0x0158, + 0x2001, 0x0386, 0x2004, 0xd0b4, 0x1130, 0x2001, 0x0016, 0x080c, + 0xaced, 0x0804, 0x78d6, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, + 0x6028, 0x9084, 0xe1ff, 0x602a, 0x2011, 0x0200, 0x080c, 0x2ad3, + 0x2001, 0x0090, 0x080c, 0x2a99, 0x20a9, 0x0366, 0x6024, 0xd0cc, + 0x1560, 0x1d04, 0x786e, 0x2091, 0x6000, 0x1f04, 0x786e, 0x080c, + 0xacfc, 0x2011, 0x0003, 0x080c, 0xa62b, 0x2011, 0x0002, 0x080c, + 0xa635, 0x080c, 0xa516, 0x901e, 0x080c, 0xa596, 0x2001, 0x0386, + 0x2003, 0x7000, 0x080c, 0xad18, 0x2001, 0x00a0, 0x080c, 0x2a99, + 0x080c, 0x7ab6, 0x080c, 0x619d, 0x080c, 0xd645, 0x0110, 0x080c, + 0x0cf1, 0x9085, 0x0001, 0x0804, 0x78dc, 0x080c, 0x1b4b, 0x60e3, + 0x0000, 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1118, + 0x2001, 0x196d, 0x2004, 0x080c, 0x2700, 0x60e2, 0x2001, 0x0080, + 0x080c, 0x2a99, 0x20a9, 0x0366, 0x2011, 0x1e00, 0x080c, 0x2ad3, + 0x2009, 0x1e00, 0x080c, 0x2a7f, 0x6024, 0x910c, 0x0140, 0x1d04, + 0x78b4, 0x2091, 0x6000, 0x1f04, 0x78b4, 0x0804, 0x7877, 0x2001, + 0x0386, 0x2003, 0x7000, 0x6028, 0x9085, 0x1e00, 0x602a, 0x70b4, + 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, 0xd645, + 0x0110, 0x080c, 0x0cf1, 0x9006, 0x00ee, 0x00de, 0x00ce, 0x003e, + 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, + 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x7000, + 0x9086, 0x0003, 0x1168, 0x2001, 0x020b, 0x2004, 0x9084, 0x5540, + 0x9086, 0x5540, 0x1128, 0x2069, 0x1a7b, 0x2d04, 0x8000, 0x206a, + 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, + 0x1904, 0x794d, 0x2001, 0x0088, 0x080c, 0x2a99, 0x9006, 0x60e2, + 0x6886, 0x080c, 0x2700, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, + 0x6808, 0x9005, 0x01d0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x2011, + 0x0400, 0x080c, 0x2ad3, 0x2069, 0x198f, 0x7000, 0x206a, 0x709b, + 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, 0x1d04, 0x792d, 0x2091, + 0x6000, 0x1f04, 0x792d, 0x0804, 0x7988, 0x2069, 0x0140, 0x20a9, + 0x0384, 0x2011, 0x1e00, 0x080c, 0x2ad3, 0x2009, 0x1e00, 0x080c, + 0x2a7f, 0x6024, 0x910c, 0x0528, 0x9084, 0x1a00, 0x1510, 0x1d04, + 0x7939, 0x2091, 0x6000, 0x1f04, 0x7939, 0x080c, 0xacfc, 0x2011, + 0x0003, 0x080c, 0xa62b, 0x2011, 0x0002, 0x080c, 0xa635, 0x080c, + 0xa516, 0x901e, 0x080c, 0xa596, 0x080c, 0xad18, 0x2001, 0x00a0, + 0x080c, 0x2a99, 0x080c, 0x7ab6, 0x080c, 0x619d, 0x9085, 0x0001, + 0x00f8, 0x080c, 0x1b4b, 0x2001, 0x0080, 0x080c, 0x2a99, 0x2069, + 0x0140, 0x60e3, 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, + 0x0008, 0x6886, 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, + 0x1118, 0x2001, 0x196d, 0x2004, 0x080c, 0x2700, 0x60e2, 0x9006, + 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, + 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, + 0x0100, 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01e8, 0x080c, + 0xacfc, 0x2011, 0x0003, 0x080c, 0xa62b, 0x2011, 0x0002, 0x080c, + 0xa635, 0x080c, 0xa516, 0x901e, 0x080c, 0xa596, 0x080c, 0xad18, + 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, 0x2a99, 0x080c, 0x7ab6, + 0x080c, 0x619d, 0x0804, 0x7a32, 0x2001, 0x180c, 0x200c, 0xd1b4, + 0x1160, 0xc1b5, 0x2102, 0x080c, 0x75fa, 0x2069, 0x0140, 0x2001, + 0x0080, 0x080c, 0x2a99, 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, + 0x9005, 0x1118, 0x6808, 0x9005, 0x0190, 0x6028, 0x9084, 0xfdff, + 0x602a, 0x2011, 0x0200, 0x080c, 0x2ad3, 0x2069, 0x198f, 0x7000, + 0x206a, 0x709b, 0x0027, 0x7003, 0x0001, 0x0804, 0x7a32, 0x2011, + 0x1e00, 0x080c, 0x2ad3, 0x2009, 0x1e00, 0x080c, 0x2a7f, 0x6024, + 0x910c, 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x79e7, 0x0006, + 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x88e7, 0x00ee, 0x00de, + 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0x1a04, 0x7078, 0x00ee, + 0x9005, 0x19e8, 0x0438, 0x0026, 0x2011, 0x7612, 0x080c, 0x8993, + 0x2011, 0x7605, 0x080c, 0x8a9f, 0x002e, 0x2069, 0x0140, 0x60e3, + 0x0000, 0x70b4, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, + 0x2001, 0x180d, 0x2004, 0xd08c, 0x2001, 0x0002, 0x1118, 0x2001, + 0x196d, 0x2004, 0x080c, 0x2700, 0x60e2, 0x2001, 0x180c, 0x200c, + 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, + 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xd63e, 0x1904, + 0x7aa0, 0x7130, 0xd184, 0x1170, 0x080c, 0x3482, 0x0138, 0xc18d, + 0x7132, 0x2011, 0x1848, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, + 0x0904, 0x7aa0, 0x2011, 0x1848, 0x220c, 0xd1a4, 0x0538, 0x0016, + 0x2019, 0x000e, 0x080c, 0xe9f9, 0x0156, 0x00b6, 0x20a9, 0x007f, + 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, + 0x67b4, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, + 0xea8d, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x8c44, 0x001e, + 0x8108, 0x1f04, 0x7a69, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, + 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x32da, 0x001e, + 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x67b4, + 0x1110, 0x080c, 0x61b7, 0x8108, 0x1f04, 0x7a96, 0x00be, 0x015e, + 0x080c, 0x1b4b, 0x080c, 0xacfc, 0x080c, 0xb09b, 0x080c, 0xad18, + 0x60e3, 0x0000, 0x080c, 0x619d, 0x080c, 0x76cd, 0x00ee, 0x00ce, + 0x004e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x2001, 0x197d, + 0x2003, 0x0001, 0x0005, 0x2001, 0x197d, 0x2003, 0x0000, 0x0005, + 0x2001, 0x197c, 0x2003, 0xaaaa, 0x0005, 0x2001, 0x197c, 0x2003, + 0x0000, 0x0005, 0x2071, 0x18fa, 0x7003, 0x0000, 0x7007, 0x0000, + 0x080c, 0x1072, 0x090c, 0x0d85, 0xa8ab, 0xdcb0, 0x2900, 0x704e, + 0x080c, 0x1072, 0x090c, 0x0d85, 0xa8ab, 0xdcb0, 0x2900, 0x7052, + 0xa867, 0x0000, 0xa86b, 0x0001, 0xa89f, 0x0000, 0x0005, 0x00e6, + 0x2071, 0x0040, 0x6848, 0x9005, 0x1118, 0x9085, 0x0001, 0x04b0, + 0x6840, 0x9005, 0x0150, 0x04a1, 0x6a50, 0x9200, 0x7002, 0x6854, + 0x9101, 0x7006, 0x9006, 0x7012, 0x7016, 0x6850, 0x7002, 0x6854, + 0x7006, 0x6858, 0x700a, 0x685c, 0x700e, 0x6840, 0x9005, 0x1110, + 0x7012, 0x7016, 0x6848, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, + 0x2001, 0x0019, 0x7036, 0x702b, 0x0001, 0x2001, 0x0004, 0x200c, + 0x918c, 0xfff7, 0x918d, 0x8000, 0x2102, 0x00d6, 0x2069, 0x18fa, + 0x6807, 0x0001, 0x00de, 0x080c, 0x8103, 0x9006, 0x00ee, 0x0005, + 0x900e, 0x0156, 0x20a9, 0x0006, 0x8003, 0x818d, 0x1f04, 0x7b2c, + 0x015e, 0x0005, 0x2079, 0x0040, 0x2071, 0x18fa, 0x7004, 0x0002, + 0x7b42, 0x7b43, 0x7b8f, 0x7bea, 0x7d4a, 0x7b40, 0x7b40, 0x7d74, + 0x080c, 0x0d85, 0x0005, 0x2079, 0x0040, 0x2001, 0x1dc0, 0x2003, + 0x0000, 0x782c, 0x908c, 0x0780, 0x190c, 0x81e5, 0xd0a4, 0x0578, + 0x2001, 0x1dc0, 0x2004, 0x9082, 0x0080, 0x1648, 0x1d04, 0x7b60, + 0x2001, 0x1a07, 0x200c, 0x8109, 0x0510, 0x2091, 0x6000, 0x2102, + 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, + 0x908a, 0x0040, 0x0610, 0x00c0, 0x2001, 0x1800, 0x200c, 0x9186, + 0x0003, 0x1168, 0x7004, 0x0002, 0x7b7f, 0x7b49, 0x7b7f, 0x7b7d, + 0x7b7f, 0x7b7f, 0x7b7f, 0x7b7f, 0x7b7f, 0x080c, 0x7bea, 0x782c, + 0xd09c, 0x090c, 0x8103, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100, + 0x003b, 0x0c10, 0x080c, 0x7c20, 0x0c90, 0x00e3, 0x08e8, 0x0005, + 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c42, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c2c, 0x7c20, 0x7e6a, 0x7c20, + 0x7c20, 0x7c20, 0x7c42, 0x7c20, 0x7c2c, 0x7eab, 0x7eec, 0x7f33, + 0x7f47, 0x7c20, 0x7c20, 0x7c42, 0x7c2c, 0x7c56, 0x7c20, 0x7d1e, + 0x7ff2, 0x800d, 0x7c20, 0x7c42, 0x7c20, 0x7c56, 0x7c20, 0x7c20, + 0x7d14, 0x800d, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c20, 0x7c20, 0x7c20, 0x7c6a, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x7c20, 0x8189, 0x7c20, 0x8133, + 0x7c20, 0x8133, 0x7c20, 0x7c7f, 0x7c20, 0x7c20, 0x7c20, 0x7c20, + 0x7c20, 0x7c20, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198, + 0x782c, 0x080c, 0x812c, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, + 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, + 0x002b, 0x0c50, 0x00e9, 0x080c, 0x8103, 0x0005, 0x7c20, 0x7c2c, + 0x7e56, 0x7c20, 0x7c2c, 0x7c20, 0x7c2c, 0x7c2c, 0x7c20, 0x7c2c, + 0x7e56, 0x7c2c, 0x7c2c, 0x7c2c, 0x7c2c, 0x7c2c, 0x7c20, 0x7c2c, + 0x7e56, 0x7c20, 0x7c20, 0x7c2c, 0x7c20, 0x7c20, 0x7c20, 0x7c2c, + 0x00e6, 0x2071, 0x18fa, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, + 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005, + 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084, + 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, + 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, + 0x1120, 0x7007, 0x0001, 0x0804, 0x7df3, 0x7007, 0x0003, 0x7012, + 0x2900, 0x7016, 0x701a, 0x704b, 0x7df3, 0x0005, 0xa864, 0x8007, + 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, + 0x7e0e, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, + 0x7e0e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0904, 0x7c28, + 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x7e2a, 0x7007, 0x0003, + 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, 0x7e2a, 0x0005, 0xa864, + 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x7c28, 0x7007, + 0x0001, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1904, 0x7ceb, 0x2001, + 0x180d, 0x2004, 0xd08c, 0x0904, 0x7cd6, 0xa99c, 0x9186, 0x00ff, + 0x05e8, 0xa994, 0x9186, 0x006f, 0x0188, 0x9186, 0x0074, 0x15b0, + 0x0026, 0x2011, 0x0010, 0x080c, 0x6c35, 0x002e, 0x0578, 0x0016, + 0xa998, 0x080c, 0x6c7f, 0x001e, 0x1548, 0x0400, 0x080c, 0x779e, + 0x0140, 0xa897, 0x4005, 0xa89b, 0x0016, 0x2001, 0x0030, 0x900e, + 0x0438, 0x0026, 0x2011, 0x8008, 0x080c, 0x6c35, 0x002e, 0x01b0, + 0x0016, 0x0026, 0x0036, 0xa998, 0xaaa0, 0xab9c, 0x918d, 0x8000, + 0x080c, 0x6c7f, 0x003e, 0x002e, 0x001e, 0x1140, 0xa897, 0x4005, + 0xa89b, 0x4009, 0x2001, 0x0030, 0x900e, 0x0050, 0xa868, 0x9084, + 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, 0x6430, 0x1108, 0x0005, + 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, 0xa87a, 0xa982, 0x080c, + 0x7012, 0x012e, 0x0ca0, 0xa994, 0x9186, 0x0071, 0x0904, 0x7c8f, + 0x9186, 0x0064, 0x0904, 0x7c8f, 0x9186, 0x007c, 0x0904, 0x7c8f, + 0x9186, 0x0028, 0x0904, 0x7c8f, 0x9186, 0x0038, 0x0904, 0x7c8f, + 0x9186, 0x0078, 0x0904, 0x7c8f, 0x9186, 0x005f, 0x0904, 0x7c8f, + 0x9186, 0x0056, 0x0904, 0x7c8f, 0xa897, 0x4005, 0xa89b, 0x0001, + 0x2001, 0x0030, 0x900e, 0x0860, 0xa87c, 0x9084, 0x00c0, 0x9086, + 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x8024, 0x2900, 0x7016, + 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0030, + 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, 0xa05c, 0x9080, 0x0023, + 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, 0x0401, 0x1a04, 0x7c30, + 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7c30, 0x82ff, 0x1138, 0xa8b8, + 0xa9bc, 0x9105, 0x0118, 0x2001, 0x7db1, 0x0018, 0x9280, 0x7da7, + 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, 0x7d92, 0x080c, 0x1072, + 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, 0x7022, 0x7054, 0x2060, + 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, 0xe004, 0x9100, 0xa076, + 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, 0x900e, 0x2200, 0x7112, + 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, 0x0108, 0x9108, 0xa17a, + 0x810b, 0xa17e, 0x080c, 0x114e, 0xa06c, 0x908e, 0x0100, 0x0170, + 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, 0x0005, 0x7020, 0x2048, + 0x080c, 0x108b, 0x7014, 0x2048, 0x0804, 0x7c30, 0x7020, 0x2048, + 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, 0x2048, 0xa906, 0x711a, + 0x0804, 0x7d4a, 0x7014, 0x2048, 0x7007, 0x0001, 0xa8b4, 0x9005, + 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, 0x00b9, 0xa864, 0x9084, + 0x00ff, 0x9086, 0x001e, 0x0904, 0x8024, 0x0804, 0x7df3, 0x7da9, + 0x7dad, 0x0002, 0x001d, 0x0007, 0x0004, 0x000a, 0x001b, 0x0005, + 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, 0x0076, 0x0066, 0xafb8, + 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, 0xb0bc, 0xb0de, 0xb0b8, + 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, 0xb0b0, 0xb0ca, 0xb0ac, + 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, 0xb6c2, 0xb7be, 0xb0a0, + 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, 0xb094, 0xb09e, 0xb6aa, + 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, 0xb088, 0xb08a, 0xb084, + 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, 0xb07c, 0xb07e, 0xb078, + 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, 0xb004, 0x9055, 0x1958, + 0x006e, 0x007e, 0x0005, 0x2009, 0x1834, 0x210c, 0x81ff, 0x1178, + 0x080c, 0x622f, 0x1108, 0x0005, 0x080c, 0x725e, 0x0126, 0x2091, + 0x8000, 0x080c, 0xd220, 0x080c, 0x7012, 0x012e, 0x0ca0, 0x080c, + 0xd63e, 0x1d70, 0x2001, 0x0028, 0x900e, 0x0c70, 0x2009, 0x1834, + 0x210c, 0x81ff, 0x1188, 0xa888, 0x9005, 0x0188, 0xa883, 0x0000, + 0x080c, 0x62bd, 0x1108, 0x0005, 0xa87a, 0x0126, 0x2091, 0x8000, + 0x080c, 0x7012, 0x012e, 0x0cb8, 0x2001, 0x0028, 0x0ca8, 0x2001, + 0x0000, 0x0c90, 0x0419, 0x11d8, 0xa888, 0x9005, 0x01e0, 0xa883, + 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x6392, 0x1138, 0x0005, + 0x9006, 0xa87a, 0x080c, 0x630a, 0x1108, 0x0005, 0x0126, 0x2091, + 0x8000, 0xa87a, 0xa982, 0x080c, 0x7012, 0x012e, 0x0cb0, 0x2001, + 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, 0x00c6, 0x2061, + 0x1800, 0x60d0, 0x9005, 0x0100, 0x00ce, 0x0005, 0x7018, 0xa802, + 0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, 0x7012, 0x0118, + 0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, 0x0001, 0x7048, + 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, 0xa878, 0x9084, + 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, 0x9096, 0x0001, + 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, 0x0160, 0x9005, + 0x11d8, 0xa974, 0x080c, 0x67b4, 0x11b8, 0x0066, 0xae80, 0x080c, + 0x68c4, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, 0x2224, 0xc484, + 0x2412, 0x004e, 0x00c6, 0x080c, 0x67b4, 0x1110, 0x080c, 0x6a9e, + 0x8108, 0x1f04, 0x7e93, 0x00ce, 0xa87c, 0xd084, 0x1120, 0x080c, + 0x108b, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, + 0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, + 0x080c, 0x6c0d, 0x0580, 0x2061, 0x1a73, 0x6100, 0xd184, 0x0178, + 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, + 0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, + 0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, + 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, 0x8007, 0x9084, + 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, 0xc28d, 0x6202, + 0x012e, 0x0804, 0x80ed, 0x012e, 0x0804, 0x80e7, 0x012e, 0x0804, + 0x80e1, 0x012e, 0x0804, 0x80e4, 0x0126, 0x2091, 0x8000, 0x7007, + 0x0001, 0x080c, 0x6c0d, 0x05e0, 0x2061, 0x1a73, 0x6000, 0xd084, + 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, 0x9484, 0x0003, + 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, 0x2100, 0x9210, + 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, 0x02f0, 0x9484, + 0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, 0x9082, 0x0004, + 0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, 0x0004, 0x1168, + 0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, 0x8000, 0x6016, + 0x6206, 0x630a, 0x012e, 0x0804, 0x80ed, 0x012e, 0x0804, 0x80ea, + 0x012e, 0x0804, 0x80e7, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, + 0x2061, 0x1a73, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, + 0x630a, 0x012e, 0x0804, 0x80fb, 0x012e, 0x0804, 0x80ea, 0x00b6, + 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0xa87c, 0xd0ac, + 0x0148, 0x00c6, 0x2061, 0x1a73, 0x6000, 0x9084, 0xfcff, 0x6002, + 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, 0x9065, 0x0598, + 0x2001, 0x1834, 0x2004, 0x9005, 0x0118, 0x080c, 0xb1a7, 0x0068, + 0x6017, 0xf400, 0x6063, 0x0000, 0xa97c, 0xd1a4, 0x0110, 0xa980, + 0x6162, 0x2009, 0x0041, 0x080c, 0xb20a, 0xa988, 0x918c, 0xff00, + 0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, 0xfdff, 0x080c, + 0x8c44, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, 0x1a73, 0x6000, + 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, + 0x00be, 0x0804, 0x80ed, 0x00ce, 0x012e, 0x00be, 0x0804, 0x80e7, + 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, 0x0d18, 0x9186, + 0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, 0x180c, 0x200c, + 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, 0x9186, 0x0029, + 0x1d10, 0xa974, 0x080c, 0x67b4, 0x1968, 0xb800, 0xc0e4, 0xb802, + 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, 0x2001, 0x1986, + 0x2004, 0x601a, 0x0804, 0x7f82, 0xa88c, 0x9065, 0x0960, 0x00e6, + 0xa890, 0x9075, 0x2001, 0x1834, 0x2004, 0x9005, 0x0150, 0x080c, + 0xb1a7, 0x8eff, 0x0118, 0x2e60, 0x080c, 0xb1a7, 0x00ee, 0x0804, + 0x7f82, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, + 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, 0x602e, 0xa8a8, + 0x6016, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x00ee, + 0x0804, 0x7f82, 0x2061, 0x1a73, 0x6000, 0xd084, 0x0190, 0xd08c, + 0x1904, 0x80fb, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, 0x0220, + 0x6206, 0x012e, 0x0804, 0x80fb, 0x012e, 0xa883, 0x0016, 0x0804, + 0x80f4, 0xa883, 0x0007, 0x0804, 0x80f4, 0xa864, 0x8007, 0x9084, + 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, 0x0069, 0x0005, + 0x080c, 0x7c28, 0x0040, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, + 0x701a, 0x704b, 0x8024, 0x0005, 0x00b6, 0x00e6, 0x0126, 0x2091, + 0x8000, 0x903e, 0x2061, 0x1800, 0x61d0, 0x81ff, 0x1904, 0x80a6, + 0x6130, 0xd194, 0x1904, 0x80d0, 0xa878, 0x2070, 0x9e82, 0x1ddc, + 0x0a04, 0x809a, 0x6068, 0x9e02, 0x1a04, 0x809a, 0x7120, 0x9186, + 0x0006, 0x1904, 0x808c, 0x7010, 0x905d, 0x0904, 0x80a6, 0xb800, + 0xd0e4, 0x1904, 0x80ca, 0x2061, 0x1a73, 0x6100, 0x9184, 0x0301, + 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, 0x80d3, 0xa883, + 0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, 0x1198, 0x7116, + 0xa87c, 0xd0f4, 0x1904, 0x80d6, 0x080c, 0x5840, 0xd09c, 0x1118, + 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x8b34, 0x012e, 0x00ee, + 0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, 0xa902, 0x2148, + 0xa87c, 0xd0f4, 0x1904, 0x80d6, 0x012e, 0x00ee, 0x00be, 0x0005, + 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, 0x80f4, 0xd184, + 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, 0x67b4, 0x15d0, + 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, 0x1118, 0xa883, + 0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, 0x000e, 0x0460, + 0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, 0x080c, 0x5844, + 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1ddc, 0x02c0, 0x6068, + 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, 0x7010, 0x905d, + 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0x9086, + 0x0007, 0x1904, 0x8030, 0x7003, 0x0002, 0x0804, 0x8030, 0xa883, + 0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, 0x00be, 0x0420, + 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, 0x2e60, 0x2019, + 0x0002, 0x601b, 0x0014, 0x080c, 0xe586, 0x012e, 0x00ee, 0x00be, + 0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, + 0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, 0x0001, 0xa884, + 0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, 0x8000, 0x080c, + 0x7012, 0x012e, 0x0005, 0x080c, 0x108b, 0x0005, 0x00d6, 0x080c, + 0x8b2b, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, 0x0780, 0x190c, + 0x81e5, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70c0, 0x90ea, 0x0020, + 0x0278, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0x9006, + 0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, 0x702c, 0x0c28, + 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, 0x0780, 0x190c, + 0x81e5, 0x000e, 0x0005, 0xa898, 0x9084, 0x0003, 0x05a8, 0x080c, + 0xb116, 0x05d8, 0x2900, 0x6016, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x0035, 0x1138, 0x6028, 0xc0fd, 0x602a, 0x2001, 0x196b, 0x2004, + 0x0098, 0xa8a0, 0x9084, 0x00ff, 0xa99c, 0x918c, 0xff00, 0x9105, + 0xa99c, 0x918c, 0x00ff, 0x080c, 0x268c, 0x1540, 0x00b6, 0x080c, + 0x67b4, 0x2b00, 0x00be, 0x1510, 0x6012, 0x6023, 0x0001, 0x2009, + 0x0040, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0035, 0x0110, 0x2009, + 0x0041, 0x080c, 0xb20a, 0x0005, 0xa87b, 0x0101, 0x0126, 0x2091, + 0x8000, 0x080c, 0x7012, 0x012e, 0x0005, 0xa87b, 0x002c, 0x0126, + 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x0005, 0xa87b, 0x0028, + 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x080c, 0xb16c, + 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x7007, + 0x0001, 0xaa74, 0x9282, 0x0004, 0x1a04, 0x81d6, 0xa97c, 0x9188, + 0x1000, 0x2104, 0x905d, 0xb804, 0xd284, 0x0140, 0x05e8, 0x8007, + 0x9084, 0x00ff, 0x9084, 0x0006, 0x1108, 0x04b0, 0x2b10, 0x080c, + 0xb116, 0x1118, 0x080c, 0xb1dd, 0x05a8, 0x6212, 0xa874, 0x0002, + 0x81b4, 0x81b9, 0x81bc, 0x81c2, 0x2019, 0x0002, 0x080c, 0xe9f9, + 0x0060, 0x080c, 0xe984, 0x0048, 0x2019, 0x0002, 0xa980, 0x080c, + 0xe9a3, 0x0018, 0xa980, 0x080c, 0xe984, 0x080c, 0xb16c, 0xa887, + 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x00be, + 0x001e, 0x002e, 0x003e, 0x00ce, 0x00de, 0x0005, 0xa887, 0x0006, + 0x0c80, 0xa887, 0x0002, 0x0c68, 0xa887, 0x0005, 0x0c50, 0xa887, + 0x0004, 0x0c38, 0xa887, 0x0007, 0x0c20, 0x2091, 0x8000, 0x0e04, + 0x81e7, 0x0006, 0x0016, 0x2001, 0x8003, 0x0006, 0x0804, 0x0d8e, + 0x2001, 0x1834, 0x2004, 0x9005, 0x0005, 0x0005, 0x00f6, 0x2079, + 0x0300, 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, + 0x0218, 0x210c, 0xd1ec, 0x1120, 0x080c, 0x1648, 0x00fe, 0x0005, + 0x2001, 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, + 0x781c, 0xd08c, 0x0904, 0x8268, 0x68c0, 0x90aa, 0x0005, 0x0a04, + 0x8890, 0x7d44, 0x7c40, 0xd59c, 0x190c, 0x0d85, 0x9584, 0x00f6, + 0x1508, 0x9484, 0x7000, 0x0138, 0x908a, 0x2000, 0x1258, 0x9584, + 0x0700, 0x8007, 0x04f0, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, + 0x0db0, 0x00b0, 0x9484, 0x0fff, 0x1130, 0x7000, 0x9084, 0xff00, + 0x9086, 0x8100, 0x11c0, 0x080c, 0xeeb1, 0x080c, 0x8777, 0x7817, + 0x0140, 0x00a8, 0x9584, 0x0076, 0x1118, 0x080c, 0x87d3, 0x19c8, + 0xd5a4, 0x0148, 0x0046, 0x0056, 0x080c, 0x82b8, 0x080c, 0x2185, + 0x005e, 0x004e, 0x0020, 0x080c, 0xeeb1, 0x7817, 0x0140, 0x080c, + 0x779e, 0x0168, 0x2001, 0x0111, 0x2004, 0xd08c, 0x0140, 0x6893, + 0x0000, 0x2001, 0x0110, 0x2003, 0x0008, 0x2003, 0x0000, 0x0489, + 0x0005, 0x0002, 0x8275, 0x8585, 0x8272, 0x8272, 0x8272, 0x8272, + 0x8272, 0x8272, 0x7817, 0x0140, 0x0005, 0x7000, 0x908c, 0xff00, + 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x6892, 0x9286, 0x2000, + 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x58aa, 0x0070, + 0x080c, 0x82d8, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, 0x84bf, + 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x86a4, 0x7817, 0x0140, + 0x0005, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, + 0x2004, 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, + 0x2518, 0x080c, 0x4ca1, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, + 0x0056, 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, + 0x0036, 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, + 0x2019, 0xffff, 0x2001, 0x1810, 0x2004, 0xd08c, 0x0160, 0x2001, + 0x1800, 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, + 0x080c, 0x4ca1, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, + 0x00b6, 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, + 0x0120, 0x9096, 0x0023, 0x1904, 0x8490, 0x9186, 0x0023, 0x15c0, + 0x080c, 0x8742, 0x0904, 0x8490, 0x6120, 0x9186, 0x0001, 0x0150, + 0x9186, 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, + 0x1904, 0x8490, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, + 0x2009, 0x0015, 0x080c, 0xb20a, 0x0804, 0x8490, 0x908e, 0x0214, + 0x0118, 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0xb20a, + 0x0804, 0x8490, 0x908e, 0x0100, 0x1904, 0x8490, 0x7034, 0x9005, + 0x1904, 0x8490, 0x2009, 0x0016, 0x080c, 0xb20a, 0x0804, 0x8490, + 0x9186, 0x0022, 0x1904, 0x8490, 0x7030, 0x908e, 0x0300, 0x1580, + 0x68dc, 0xd0a4, 0x0528, 0xc0b5, 0x68de, 0x7100, 0x918c, 0x00ff, + 0x697e, 0x7004, 0x6882, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, + 0x0006, 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x26d5, 0x7932, + 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x268c, 0x695e, 0x703c, + 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70b6, 0x00ee, + 0x7034, 0x9005, 0x1904, 0x8490, 0x2009, 0x0017, 0x0804, 0x8440, + 0x908e, 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x8490, 0x080c, + 0x779e, 0x0120, 0x2009, 0x001d, 0x0804, 0x8440, 0x68dc, 0xc0a5, + 0x68de, 0x2009, 0x0030, 0x0804, 0x8440, 0x908e, 0x0500, 0x1140, + 0x7034, 0x9005, 0x1904, 0x8490, 0x2009, 0x0018, 0x0804, 0x8440, + 0x908e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x8440, 0x908e, + 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x8440, 0x908e, 0x5200, + 0x1140, 0x7034, 0x9005, 0x1904, 0x8490, 0x2009, 0x001b, 0x0804, + 0x8440, 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x8490, + 0x2009, 0x001c, 0x0804, 0x8440, 0x908e, 0x1300, 0x1120, 0x2009, + 0x0034, 0x0804, 0x8440, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, + 0x1904, 0x8490, 0x2009, 0x0024, 0x0804, 0x8440, 0x908c, 0xff00, + 0x918e, 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x1810, 0x2004, + 0xd09c, 0x0904, 0x8440, 0x080c, 0xdd8d, 0x1904, 0x8490, 0x0804, + 0x843e, 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, + 0x0804, 0x8440, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, + 0x8440, 0x908e, 0x6104, 0x1530, 0x2029, 0x0205, 0x2011, 0x026d, + 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, 0x8004, 0x20a8, 0x2011, + 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x4ca1, 0x004e, + 0x8108, 0x0f04, 0x83f4, 0x9186, 0x0280, 0x1d88, 0x2504, 0x8000, + 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, 0x0000, 0x2009, 0x0023, + 0x0804, 0x8440, 0x908e, 0x6000, 0x1120, 0x2009, 0x003f, 0x0804, + 0x8440, 0x908e, 0x5400, 0x1138, 0x080c, 0x8840, 0x1904, 0x8490, + 0x2009, 0x0046, 0x04a8, 0x908e, 0x5500, 0x1148, 0x080c, 0x8868, + 0x1118, 0x2009, 0x0041, 0x0460, 0x2009, 0x0042, 0x0448, 0x908e, + 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, 0x908e, 0x1000, 0x1118, + 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, 0x1118, 0x2009, 0x004a, + 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, 0x1118, 0x2009, 0x004f, + 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, 0x1118, 0x2009, 0x0050, + 0x0038, 0x2009, 0x001d, 0x6838, 0xd0d4, 0x0110, 0x2009, 0x004c, + 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x268c, + 0x1904, 0x8493, 0x080c, 0x6749, 0x1904, 0x8493, 0xbe12, 0xbd16, + 0x001e, 0x0016, 0x080c, 0x779e, 0x01c0, 0x68dc, 0xd08c, 0x1148, + 0x7000, 0x9084, 0x00ff, 0x1188, 0x7004, 0x9084, 0xff00, 0x1168, + 0x0040, 0x687c, 0x9606, 0x1148, 0x6880, 0x9506, 0x9084, 0xff00, + 0x1120, 0x9584, 0x00ff, 0xb886, 0x0080, 0xb884, 0x9005, 0x1168, + 0x9186, 0x0046, 0x1150, 0x687c, 0x9606, 0x1138, 0x6880, 0x9506, + 0x9084, 0xff00, 0x1110, 0x001e, 0x0098, 0x080c, 0xb116, 0x01a8, + 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, + 0x004c, 0x1110, 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0xb20a, + 0x00ce, 0x00be, 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180e, 0x2004, + 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4ca1, 0x080c, 0xb1dd, + 0x0d90, 0x2b08, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, + 0x0016, 0x9186, 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, + 0x0009, 0x6017, 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, + 0x602f, 0x0009, 0x6003, 0x0001, 0x080c, 0x961e, 0x08a0, 0x080c, + 0x88af, 0x1158, 0x080c, 0x344c, 0x1140, 0x7010, 0x9084, 0xff00, + 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, 0x0005, 0x00b6, 0x00c6, + 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, 0x9186, 0x0033, 0x11e8, + 0x080c, 0x8742, 0x0904, 0x851d, 0x7124, 0x610a, 0x7030, 0x908e, + 0x0200, 0x1140, 0x7034, 0x9005, 0x15c0, 0x2009, 0x0015, 0x080c, + 0xb20a, 0x0498, 0x908e, 0x0100, 0x1580, 0x7034, 0x9005, 0x1568, + 0x2009, 0x0016, 0x080c, 0xb20a, 0x0440, 0x9186, 0x0032, 0x1528, + 0x7030, 0x908e, 0x1400, 0x1508, 0x2009, 0x0038, 0x0016, 0x2011, + 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x268c, 0x11a8, 0x080c, + 0x6749, 0x1190, 0xbe12, 0xbd16, 0x080c, 0xb116, 0x0168, 0x2b08, + 0x6112, 0x080c, 0xd3b6, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, + 0x080c, 0xb20a, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, + 0x0005, 0x00b6, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, + 0x00ff, 0x11b8, 0x9592, 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, + 0x2009, 0x007f, 0x0804, 0x857f, 0x9596, 0xfffe, 0x1120, 0x2009, + 0x007e, 0x0804, 0x857f, 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, + 0x04f0, 0x2011, 0x0000, 0x2019, 0x1837, 0x231c, 0xd3ac, 0x0130, + 0x9026, 0x20a9, 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, + 0x20a9, 0x077f, 0x2071, 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, + 0x82ff, 0x11d0, 0x9496, 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, + 0xbf10, 0x2600, 0x9706, 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, + 0x00b0, 0x9745, 0x1148, 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, + 0x0118, 0x94c6, 0x0080, 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x8554, + 0x82ff, 0x1118, 0x9085, 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, + 0x00de, 0x00ee, 0x004e, 0x00be, 0x0005, 0x2001, 0x1837, 0x200c, + 0x9184, 0x0080, 0x0110, 0xd18c, 0x0138, 0x7000, 0x908c, 0xff00, + 0x810f, 0x9184, 0x000f, 0x001a, 0x7817, 0x0140, 0x0005, 0x85a7, + 0x85a7, 0x85a7, 0x8754, 0x85a7, 0x85aa, 0x85cf, 0x8658, 0x85a7, + 0x85a7, 0x85a7, 0x85a7, 0x85a7, 0x85a7, 0x85a7, 0x85a7, 0x7817, + 0x0140, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, + 0x9c8c, 0x0003, 0x11c0, 0x9c8a, 0x1ddc, 0x02a8, 0x6868, 0x9c02, + 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, + 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, + 0x0046, 0x080c, 0xb20a, 0x7817, 0x0140, 0x00be, 0x0005, 0x00b6, + 0x00c6, 0x9484, 0x0fff, 0x0904, 0x8634, 0x7110, 0xd1bc, 0x1904, + 0x8634, 0x7108, 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, + 0xff00, 0x15c8, 0x81ff, 0x15b8, 0x9080, 0x348e, 0x200d, 0x918c, + 0xff00, 0x810f, 0x2001, 0x0080, 0x9106, 0x0904, 0x8634, 0x9182, + 0x0801, 0x1a04, 0x8634, 0x9190, 0x1000, 0x2204, 0x905d, 0x05e0, + 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15b8, 0xba04, 0x9294, 0xff00, + 0x9286, 0x0600, 0x1190, 0x080c, 0xb116, 0x0598, 0x2b08, 0x7028, + 0x604e, 0x702c, 0x6052, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, + 0x7130, 0x615e, 0x080c, 0xe009, 0x00f8, 0x080c, 0x6c11, 0x1138, + 0xb807, 0x0606, 0x0c40, 0x190c, 0x8521, 0x11b0, 0x0880, 0x080c, + 0xb116, 0x2b08, 0x0188, 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, + 0x9286, 0x0400, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001, + 0x6003, 0x0001, 0x080c, 0x961e, 0x7817, 0x0140, 0x00ce, 0x00be, + 0x0005, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, + 0x080c, 0x4ca1, 0x080c, 0xb1dd, 0x0d78, 0x2b08, 0x6112, 0x6023, + 0x0006, 0x7120, 0x610a, 0x7130, 0x615e, 0x6017, 0xf300, 0x6003, + 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9617, 0x08e0, + 0x00b6, 0x7110, 0xd1bc, 0x05d0, 0x7020, 0x2060, 0x9c84, 0x0003, + 0x15a8, 0x9c82, 0x1ddc, 0x0690, 0x6868, 0x9c02, 0x1678, 0x9484, + 0x0fff, 0x9082, 0x000c, 0x0650, 0x7008, 0x9084, 0x00ff, 0x6110, + 0x2158, 0xb910, 0x9106, 0x1510, 0x700c, 0xb914, 0x9106, 0x11f0, + 0x7124, 0x610a, 0x601c, 0xd0fc, 0x11c8, 0x2001, 0x0271, 0x2004, + 0x9005, 0x1180, 0x9484, 0x0fff, 0x9082, 0x000c, 0x0158, 0x0066, + 0x2031, 0x0100, 0xa001, 0xa001, 0x8631, 0x1de0, 0x006e, 0x601c, + 0xd0fc, 0x1120, 0x2009, 0x0045, 0x080c, 0xb20a, 0x7817, 0x0140, + 0x00be, 0x0005, 0x6120, 0x9186, 0x0002, 0x0128, 0x9186, 0x0005, + 0x0110, 0x9085, 0x0001, 0x0005, 0x080c, 0x88af, 0x1180, 0x080c, + 0x344c, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, 0x0000, + 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, 0x0005, + 0x86be, 0x86bf, 0x86be, 0x86be, 0x8724, 0x8733, 0x0005, 0x00b6, + 0x700c, 0x7108, 0x080c, 0x268c, 0x1904, 0x8722, 0x080c, 0x6749, + 0x1904, 0x8722, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x0540, 0x702c, + 0xd084, 0x1120, 0xb800, 0xd0bc, 0x1904, 0x8722, 0x080c, 0x6c11, + 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6c19, 0x0118, 0x9086, + 0x0004, 0x1588, 0x00c6, 0x080c, 0x8742, 0x00ce, 0x05d8, 0x080c, + 0xb116, 0x2b08, 0x05b8, 0x6112, 0x080c, 0xd3b6, 0x6023, 0x0002, + 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, 0xb20a, 0x0458, 0x080c, + 0x6c11, 0x0148, 0x9086, 0x0004, 0x0130, 0x080c, 0x6c19, 0x0118, + 0x9086, 0x0004, 0x1180, 0x080c, 0xb116, 0x2b08, 0x01d8, 0x6112, + 0x080c, 0xd3b6, 0x6023, 0x0005, 0x7120, 0x610a, 0x2009, 0x0088, + 0x080c, 0xb20a, 0x0078, 0x080c, 0xb116, 0x2b08, 0x0158, 0x6112, + 0x080c, 0xd3b6, 0x6023, 0x0004, 0x7120, 0x610a, 0x2009, 0x0001, + 0x080c, 0xb20a, 0x00be, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x00d1, + 0x0148, 0x080c, 0x869a, 0x1130, 0x7124, 0x610a, 0x2009, 0x0089, + 0x080c, 0xb20a, 0x0005, 0x7110, 0xd1bc, 0x0158, 0x0059, 0x0148, + 0x080c, 0x869a, 0x1130, 0x7124, 0x610a, 0x2009, 0x008a, 0x080c, + 0xb20a, 0x0005, 0x7020, 0x2060, 0x9c84, 0x0003, 0x1158, 0x9c82, + 0x1ddc, 0x0240, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1218, 0x9085, + 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, 0x7110, 0xd1bc, 0x11d8, + 0x7024, 0x2060, 0x9c84, 0x0003, 0x11b0, 0x9c82, 0x1ddc, 0x0298, + 0x6868, 0x9c02, 0x1280, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, + 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, 0x9106, 0x1120, 0x2009, + 0x0051, 0x080c, 0xb20a, 0x7817, 0x0140, 0x00be, 0x0005, 0x2031, + 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005, 0x2031, + 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, + 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000, 0x05c0, + 0x080c, 0xb116, 0x05a8, 0x0066, 0x00c6, 0x0046, 0x2011, 0x0263, + 0x2204, 0x8211, 0x220c, 0x080c, 0x268c, 0x1590, 0x080c, 0x6749, + 0x1578, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012, 0x080c, + 0xd3b6, 0x080c, 0x1059, 0x0500, 0x2900, 0x6062, 0x9006, 0xa802, + 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e, 0xa860, + 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e, 0x6616, + 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c, 0x961e, + 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, 0xb16c, 0x006e, 0x0cc0, + 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, 0x908c, 0xff00, 0x9184, + 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, 0x882a, 0x9186, 0x0022, + 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, 0x1904, 0x882c, 0x7030, + 0x908e, 0x0400, 0x0904, 0x882c, 0x908e, 0x6000, 0x05e8, 0x908e, + 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, 0x2009, 0x1837, 0x210c, + 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, 0x6bcf, 0x0588, 0x68b0, + 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, 0x9106, 0x1518, 0x6880, + 0x69b0, 0x918c, 0xff00, 0x9105, 0x7104, 0x9106, 0x11d8, 0x00e0, + 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, 0x908e, 0x5200, 0x09e8, + 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, 0x09b8, 0x0058, 0x9186, + 0x0023, 0x1140, 0x080c, 0x8742, 0x0128, 0x6004, 0x9086, 0x0002, + 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ce, 0x0005, + 0x7030, 0x908e, 0x0300, 0x0118, 0x908e, 0x5200, 0x1d98, 0x2001, + 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x0d68, 0x0c50, + 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427, 0x94a4, + 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, + 0x027a, 0x080c, 0xc20e, 0x1178, 0xd48c, 0x0148, 0x20a9, 0x0004, + 0x2019, 0x1801, 0x2011, 0x027e, 0x080c, 0xc20e, 0x1120, 0xd494, + 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e, 0x0005, + 0x0156, 0x0046, 0x0016, 0x0036, 0x7038, 0x2020, 0x8427, 0x94a4, + 0x0007, 0xd484, 0x0148, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, + 0x0272, 0x080c, 0xc20e, 0x1178, 0xd48c, 0x0148, 0x20a9, 0x0004, + 0x2019, 0x1801, 0x2011, 0x0276, 0x080c, 0xc20e, 0x1120, 0xd494, + 0x0110, 0x9085, 0x0001, 0x003e, 0x001e, 0x004e, 0x015e, 0x0005, + 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, 0xc0cc, 0x7802, 0x00fe, + 0x0005, 0x00f6, 0x2079, 0x1800, 0x7834, 0xd084, 0x1130, 0x2079, + 0x0200, 0x7800, 0x9085, 0x1200, 0x7802, 0x00fe, 0x0005, 0x00e6, + 0x2071, 0x1800, 0x7034, 0xc084, 0x7036, 0x00ee, 0x0005, 0x0016, + 0x2001, 0x1837, 0x200c, 0x9184, 0x0080, 0x0118, 0xd18c, 0x0118, + 0x9006, 0x001e, 0x0005, 0x9085, 0x0001, 0x0cd8, 0x2071, 0x1a04, + 0x7003, 0x0003, 0x700f, 0x0361, 0x9006, 0x701a, 0x707a, 0x7012, + 0x7017, 0x1ddc, 0x7007, 0x0000, 0x7026, 0x702b, 0xa2c0, 0x7032, + 0x7037, 0xa33d, 0x7047, 0xffff, 0x704a, 0x704f, 0x56c4, 0x7052, + 0x7063, 0x8a66, 0x080c, 0x1072, 0x090c, 0x0d85, 0x2900, 0x7042, + 0xa867, 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, + 0x1a04, 0x1d04, 0x8982, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, + 0x1590, 0x2001, 0x013c, 0x2004, 0x9005, 0x190c, 0x8b10, 0x2001, + 0x1869, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, 0x20d1, + 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0d85, 0x700f, + 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x2069, 0x1800, + 0x69ec, 0xd1e4, 0x1138, 0xd1dc, 0x1118, 0x080c, 0x8ad4, 0x0010, + 0x080c, 0x8aab, 0x7048, 0x900d, 0x0148, 0x8109, 0x714a, 0x1130, + 0x704c, 0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, + 0x0188, 0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, + 0x7126, 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, + 0x7028, 0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, + 0x1160, 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, + 0x090c, 0xa3eb, 0x0010, 0x7034, 0x080f, 0x7044, 0x9005, 0x0118, + 0x0310, 0x8001, 0x7046, 0x7054, 0x900d, 0x0168, 0x7050, 0x8001, + 0x7052, 0x1148, 0x7053, 0x0009, 0x8109, 0x7156, 0x1120, 0x7158, + 0x7156, 0x7060, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7078, + 0x900d, 0x0158, 0x7074, 0x8001, 0x7076, 0x1138, 0x7077, 0x0009, + 0x8109, 0x717a, 0x1110, 0x707c, 0x080f, 0x001e, 0x7008, 0x8001, + 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, + 0x080f, 0x012e, 0x7004, 0x0002, 0x89aa, 0x89ab, 0x89d5, 0x00e6, + 0x2071, 0x1a04, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, + 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1a04, 0x701c, + 0x9206, 0x1120, 0x701a, 0x701e, 0x707a, 0x707e, 0x000e, 0x00ee, + 0x0005, 0x00e6, 0x2071, 0x1a04, 0xb888, 0x9102, 0x0208, 0xb98a, + 0x00ee, 0x0005, 0x0005, 0x00b6, 0x2031, 0x0010, 0x7110, 0x080c, + 0x67b4, 0x11a8, 0xb888, 0x8001, 0x0290, 0xb88a, 0x1180, 0x0126, + 0x2091, 0x8000, 0x0066, 0xb8d0, 0x9005, 0x0138, 0x0026, 0xba3c, + 0x0016, 0x080c, 0x68df, 0x001e, 0x002e, 0x006e, 0x012e, 0x8108, + 0x9182, 0x0800, 0x1220, 0x8631, 0x0128, 0x7112, 0x0c00, 0x900e, + 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x2031, 0x0010, 0x7014, + 0x2060, 0x0126, 0x2091, 0x8000, 0x6048, 0x9005, 0x0128, 0x8001, + 0x604a, 0x1110, 0x080c, 0xd237, 0x6018, 0x9005, 0x0904, 0x8a2d, + 0x00f6, 0x2079, 0x0300, 0x7918, 0xd1b4, 0x1904, 0x8a40, 0x781b, + 0x2020, 0xa001, 0x7918, 0xd1b4, 0x0120, 0x781b, 0x2000, 0x0804, + 0x8a40, 0x8001, 0x601a, 0x0106, 0x781b, 0x2000, 0xa001, 0x7918, + 0xd1ac, 0x1dd0, 0x010e, 0x00fe, 0x1540, 0x6120, 0x9186, 0x0003, + 0x0148, 0x9186, 0x0006, 0x0130, 0x9186, 0x0009, 0x11e0, 0x611c, + 0xd1c4, 0x1100, 0x080c, 0xcf1b, 0x01b0, 0x6014, 0x2048, 0xa884, + 0x908a, 0x199a, 0x0280, 0x9082, 0x1999, 0xa886, 0x908a, 0x199a, + 0x0210, 0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, + 0x080c, 0xd671, 0x0110, 0x080c, 0xcbd9, 0x012e, 0x9c88, 0x001c, + 0x7116, 0x2001, 0x181a, 0x2004, 0x9102, 0x1228, 0x8631, 0x0138, + 0x2160, 0x0804, 0x89d9, 0x7017, 0x1ddc, 0x7007, 0x0000, 0x0005, + 0x00fe, 0x0c58, 0x00e6, 0x2071, 0x1a04, 0x7027, 0x07d0, 0x7023, + 0x0009, 0x00ee, 0x0005, 0x2001, 0x1a0d, 0x2003, 0x0000, 0x0005, + 0x00e6, 0x2071, 0x1a04, 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, + 0x2011, 0x1a10, 0x2013, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1a04, + 0x711a, 0x721e, 0x700b, 0x0009, 0x00ee, 0x0005, 0x0086, 0x0026, + 0x705c, 0x8000, 0x705e, 0x2001, 0x1a14, 0x2044, 0xa06c, 0x9086, + 0x0000, 0x0150, 0x7070, 0xa09a, 0x706c, 0xa096, 0x7068, 0xa092, + 0x7064, 0xa08e, 0x080c, 0x114e, 0x002e, 0x008e, 0x0005, 0x0006, + 0x0016, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x0156, 0x080c, 0x88e7, 0x015e, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x00be, 0x00ae, 0x009e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, + 0x1a04, 0x717a, 0x727e, 0x7077, 0x0009, 0x00ee, 0x0005, 0x00e6, + 0x0006, 0x2071, 0x1a04, 0x707c, 0x9206, 0x1110, 0x707a, 0x707e, + 0x000e, 0x00ee, 0x0005, 0x2069, 0x1800, 0x69ec, 0xd1e4, 0x1518, + 0x0026, 0xd1ec, 0x0140, 0x6a54, 0x6874, 0x9202, 0x0288, 0x8117, + 0x9294, 0x00c1, 0x0088, 0x9184, 0x0007, 0x01a0, 0x8109, 0x9184, + 0x0007, 0x0110, 0x69ee, 0x0070, 0x8107, 0x9084, 0x0007, 0x910d, + 0x8107, 0x9106, 0x9094, 0x00c1, 0x9184, 0xff3e, 0x9205, 0x68ee, + 0x080c, 0x0f24, 0x002e, 0x0005, 0x69e8, 0x9184, 0x003f, 0x05b8, + 0x8109, 0x9184, 0x003f, 0x01a8, 0x6a54, 0x6874, 0x9202, 0x0220, + 0xd1bc, 0x0168, 0xc1bc, 0x0018, 0xd1bc, 0x1148, 0xc1bd, 0x2110, + 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f46, 0x00ee, 0x0400, 0x69ea, + 0x00f0, 0x0026, 0x8107, 0x9094, 0x0007, 0x0128, 0x8001, 0x8007, + 0x9085, 0x0007, 0x0050, 0x2010, 0x8004, 0x8004, 0x8004, 0x9084, + 0x0007, 0x9205, 0x8007, 0x9085, 0x0028, 0x9086, 0x0040, 0x2010, + 0x00e6, 0x2071, 0x1800, 0x080c, 0x0f46, 0x00ee, 0x002e, 0x0005, + 0x0016, 0x00c6, 0x2009, 0xfff4, 0x210d, 0x2061, 0x0100, 0x60f0, + 0x9100, 0x60f3, 0x0000, 0x2009, 0xfff4, 0x200f, 0x1220, 0x8108, + 0x2105, 0x8000, 0x200f, 0x00ce, 0x001e, 0x0005, 0x00c6, 0x2061, + 0x1a73, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003, 0x8003, 0x8003, + 0x9080, 0x1a73, 0x2060, 0x0005, 0xa884, 0x908a, 0x199a, 0x1638, + 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a73, 0x6014, 0x00ce, 0x9005, + 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff, 0x01b0, 0x8003, + 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c, 0x00c0, 0x918e, + 0x00c0, 0x0904, 0x8bee, 0xd0b4, 0x1168, 0xd0bc, 0x1904, 0x8bc7, + 0x2009, 0x0006, 0x080c, 0x8c1b, 0x0005, 0x900e, 0x0c60, 0x2001, + 0x1999, 0x08b0, 0xd0fc, 0x05e0, 0x908c, 0x2023, 0x1568, 0x87ff, + 0x1558, 0xa9a8, 0x81ff, 0x1540, 0x6124, 0x918c, 0x0500, 0x1520, + 0x6100, 0x918e, 0x0007, 0x1500, 0x2009, 0x1869, 0x210c, 0xd184, + 0x11d8, 0x6003, 0x0003, 0x6007, 0x0043, 0x6047, 0xb035, 0x080c, + 0x1c6f, 0xa87c, 0xc0dd, 0xa87e, 0x600f, 0x0000, 0x00f6, 0x2079, + 0x0380, 0x7818, 0xd0bc, 0x1de8, 0x7833, 0x0013, 0x2c00, 0x7836, + 0x781b, 0x8080, 0x00fe, 0x0005, 0x908c, 0x0003, 0x0120, 0x918e, + 0x0003, 0x1904, 0x8c15, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, + 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1869, 0x2104, 0xd084, 0x1138, + 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0xb20a, 0x0005, 0x87ff, + 0x1de8, 0x2009, 0x0042, 0x0804, 0xb20a, 0x6110, 0x00b6, 0x2158, + 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, 0x6026, 0x0c00, + 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, 0x08e0, 0xd0fc, + 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, 0x1904, 0x8c15, + 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076, 0x00f6, 0x2c78, + 0x080c, 0x17ad, 0x00fe, 0x007e, 0x87ff, 0x1120, 0x2009, 0x0042, + 0x080c, 0xb20a, 0x0005, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, + 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, 0xd0fc, 0x0188, + 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, 0x0003, 0x908e, + 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, 0xb20a, + 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, 0x080c, + 0xb20a, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, + 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, 0x0004, 0x0019, + 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xcf1b, 0x0518, 0x6014, + 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001, 0x1188, 0xa97c, + 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, 0x2061, 0x1a73, + 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, + 0x080c, 0x6e4c, 0x6014, 0x904d, 0x0076, 0x2039, 0x0000, 0x190c, + 0x8b34, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, 0x2061, 0x1a73, + 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, 0x6002, 0x00ce, + 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, 0x9005, 0x0120, + 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x2071, 0x1924, 0x7003, + 0x0006, 0x7007, 0x0000, 0x700f, 0x0000, 0x7013, 0x0001, 0x080c, + 0x1072, 0x090c, 0x0d85, 0xa867, 0x0006, 0xa86b, 0x0001, 0xa8ab, + 0xdcb0, 0xa89f, 0x0000, 0x2900, 0x702e, 0x7033, 0x0000, 0x0005, + 0x0126, 0x2091, 0x8000, 0x0096, 0x00e6, 0x2071, 0x1924, 0x702c, + 0x2048, 0x6a2c, 0x721e, 0x6b30, 0x7322, 0x6834, 0x7026, 0xa896, + 0x6838, 0x702a, 0xa89a, 0x6824, 0x7016, 0x683c, 0x701a, 0x2009, + 0x0028, 0x200a, 0x9005, 0x0148, 0x900e, 0x9188, 0x000c, 0x8001, + 0x1de0, 0x2100, 0x9210, 0x1208, 0x8318, 0xaa8e, 0xab92, 0x7010, + 0xd084, 0x0168, 0xc084, 0x7007, 0x0001, 0x700f, 0x0000, 0x0006, + 0x2009, 0x1b73, 0x2104, 0x9082, 0x0007, 0x200a, 0x000e, 0xc095, + 0x7012, 0x2008, 0x2001, 0x003b, 0x080c, 0x16b9, 0x9006, 0x2071, + 0x193d, 0x7002, 0x7006, 0x702a, 0x00ee, 0x009e, 0x012e, 0x0005, + 0x2009, 0x1b73, 0x2104, 0x9080, 0x0007, 0x200a, 0x0005, 0x00e6, + 0x0126, 0x0156, 0x2091, 0x8000, 0x2071, 0x1800, 0x7154, 0x2001, + 0x0008, 0x910a, 0x0638, 0x2001, 0x187d, 0x20ac, 0x9006, 0x9080, + 0x0008, 0x1f04, 0x8cd7, 0x71c0, 0x9102, 0x02e0, 0x2071, 0x1877, + 0x20a9, 0x0007, 0x00c6, 0x080c, 0xb116, 0x6023, 0x0009, 0x6003, + 0x0004, 0x601f, 0x0101, 0x0089, 0x0126, 0x2091, 0x8000, 0x080c, + 0x8e58, 0x012e, 0x1f04, 0x8ce3, 0x9006, 0x00ce, 0x015e, 0x012e, + 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x00e6, 0x00b6, 0x0096, + 0x0086, 0x0056, 0x0046, 0x0026, 0x7118, 0x720c, 0x7620, 0x7004, + 0xd084, 0x1128, 0x2021, 0x0024, 0x2029, 0x0002, 0x0020, 0x2021, + 0x002c, 0x2029, 0x000a, 0x080c, 0x1059, 0x090c, 0x0d85, 0x2900, + 0x6016, 0x2058, 0xac66, 0x9006, 0xa802, 0xa806, 0xa86a, 0xa87a, + 0xa8aa, 0xa887, 0x0005, 0xa87f, 0x0020, 0x7008, 0xa89a, 0x7010, + 0xa89e, 0xae8a, 0xa8af, 0xffff, 0xa8b3, 0x0000, 0x8109, 0x0160, + 0x080c, 0x1059, 0x090c, 0x0d85, 0xad66, 0x2b00, 0xa802, 0x2900, + 0xb806, 0x2058, 0x8109, 0x1da0, 0x002e, 0x004e, 0x005e, 0x008e, + 0x009e, 0x00be, 0x00ee, 0x0005, 0x2079, 0x0000, 0x2071, 0x1924, + 0x7004, 0x004b, 0x700c, 0x0002, 0x8d4f, 0x8d48, 0x8d48, 0x0005, + 0x8d59, 0x8daf, 0x8daf, 0x8daf, 0x8db0, 0x8dc1, 0x8dc1, 0x700c, + 0x0cba, 0x0126, 0x2091, 0x8000, 0x78a0, 0x79a0, 0x9106, 0x1904, + 0x8da1, 0x7814, 0xd0bc, 0x1904, 0x8daa, 0x012e, 0x7018, 0x910a, + 0x1128, 0x7030, 0x9005, 0x1904, 0x8df3, 0x0005, 0x1210, 0x7114, + 0x910a, 0x9192, 0x000a, 0x0210, 0x2009, 0x000a, 0x2001, 0x1888, + 0x2014, 0x2001, 0x1936, 0x2004, 0x9100, 0x9202, 0x0e50, 0x080c, + 0x8f53, 0x2200, 0x9102, 0x0208, 0x2208, 0x0096, 0x702c, 0x2048, + 0xa873, 0x0001, 0xa976, 0x080c, 0x905c, 0x2100, 0xa87e, 0xa86f, + 0x0000, 0x009e, 0x0126, 0x2091, 0x8000, 0x2009, 0x1a24, 0x2104, + 0xc085, 0x200a, 0x700f, 0x0002, 0x012e, 0x080c, 0x116d, 0x1de8, + 0x0005, 0x78a0, 0x79a0, 0x9106, 0x0904, 0x8d61, 0x080c, 0x8f2b, + 0x012e, 0x0005, 0x7810, 0xc0c5, 0x7812, 0x0804, 0x8d61, 0x0005, + 0x700c, 0x0002, 0x8db5, 0x8db8, 0x8db7, 0x080c, 0x8d57, 0x0005, + 0x8001, 0x700e, 0x0096, 0x702c, 0x2048, 0xa974, 0x009e, 0x0011, + 0x0ca0, 0x0005, 0x0096, 0x702c, 0x2048, 0x7018, 0x9100, 0x7214, + 0x921a, 0x1130, 0x701c, 0xa88e, 0x7020, 0xa892, 0x9006, 0x0068, + 0x0006, 0x080c, 0x905c, 0x2100, 0xaa8c, 0x9210, 0xaa8e, 0x1220, + 0xa890, 0x9081, 0x0000, 0xa892, 0x000e, 0x009e, 0x0126, 0x2091, + 0x8000, 0x78a2, 0x701a, 0x080c, 0x8f2b, 0x012e, 0x0005, 0x00e6, + 0x2071, 0x1924, 0x700c, 0x0002, 0x8df1, 0x8df1, 0x8def, 0x700f, + 0x0001, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x7030, 0x9005, + 0x0508, 0x2078, 0x7814, 0x2048, 0xae88, 0x00b6, 0x2059, 0x0000, + 0x080c, 0x8e61, 0x00be, 0x01b0, 0x00e6, 0x2071, 0x193d, 0x080c, + 0x8ea8, 0x00ee, 0x0178, 0x0096, 0x080c, 0x1072, 0x2900, 0x009e, + 0x0148, 0xa8aa, 0x04d1, 0x0041, 0x2001, 0x1947, 0x2003, 0x0000, + 0x012e, 0x08c8, 0x012e, 0x0005, 0x00d6, 0x00c6, 0x0086, 0x00a6, + 0x2940, 0x2650, 0x2600, 0x9005, 0x0180, 0xa864, 0x9084, 0x000f, + 0x2068, 0x9d88, 0x1ec1, 0x2165, 0x0056, 0x2029, 0x0000, 0x080c, + 0x8fe1, 0x080c, 0x1e97, 0x1dd8, 0x005e, 0x00ae, 0x2001, 0x187f, + 0x2004, 0xa88a, 0x00c6, 0x2f60, 0x080c, 0x17ad, 0x00ce, 0x781f, + 0x0101, 0x7813, 0x0000, 0x0126, 0x2091, 0x8000, 0x080c, 0x8eb7, + 0x012e, 0x008e, 0x00ce, 0x00de, 0x0005, 0x7030, 0x9005, 0x0138, + 0x2078, 0x780c, 0x7032, 0x2001, 0x1947, 0x2003, 0x0001, 0x0005, + 0x00e6, 0x2071, 0x1924, 0x7030, 0x600e, 0x2c00, 0x7032, 0x00ee, + 0x0005, 0x00d6, 0x00c6, 0x0026, 0x9b80, 0x912a, 0x2005, 0x906d, + 0x090c, 0x0d85, 0x9b80, 0x9122, 0x2005, 0x9065, 0x090c, 0x0d85, + 0x6114, 0x2600, 0x9102, 0x0248, 0x6828, 0x9102, 0x02f0, 0x9085, + 0x0001, 0x002e, 0x00ce, 0x00de, 0x0005, 0x6804, 0xd094, 0x0148, + 0x6854, 0xd084, 0x1178, 0xc085, 0x6856, 0x2011, 0x8026, 0x080c, + 0x4ca1, 0x684c, 0x0096, 0x904d, 0x090c, 0x0d85, 0xa804, 0x8000, + 0xa806, 0x009e, 0x9006, 0x2030, 0x0c20, 0x6854, 0xd08c, 0x1d08, + 0xc08d, 0x6856, 0x2011, 0x8025, 0x080c, 0x4ca1, 0x684c, 0x0096, + 0x904d, 0x090c, 0x0d85, 0xa800, 0x8000, 0xa802, 0x009e, 0x0888, + 0x7000, 0x2019, 0x0008, 0x8319, 0x7104, 0x9102, 0x1118, 0x2300, + 0x9005, 0x0020, 0x0210, 0x9302, 0x0008, 0x8002, 0x0005, 0x00d6, + 0x7814, 0x9005, 0x090c, 0x0d85, 0x781c, 0x9084, 0x0101, 0x9086, + 0x0101, 0x190c, 0x0d85, 0x7827, 0x0000, 0x2069, 0x193d, 0x6804, + 0x9080, 0x193f, 0x2f08, 0x2102, 0x6904, 0x8108, 0x9182, 0x0008, + 0x0208, 0x900e, 0x6906, 0x9180, 0x193f, 0x2003, 0x0000, 0x00de, + 0x0005, 0x0096, 0x00c6, 0x2060, 0x6014, 0x2048, 0xa8a8, 0x0096, + 0x2048, 0x9005, 0x190c, 0x108b, 0x009e, 0xa8ab, 0x0000, 0x080c, + 0x100b, 0x080c, 0xb16c, 0x00ce, 0x009e, 0x0005, 0x6020, 0x9086, + 0x0009, 0x1128, 0x601c, 0xd0c4, 0x0110, 0x9006, 0x0005, 0x9085, + 0x0001, 0x0005, 0x6000, 0x9086, 0x0000, 0x0178, 0x6010, 0x9005, + 0x0150, 0x00b6, 0x2058, 0x080c, 0x925e, 0x00be, 0x6013, 0x0000, + 0x601b, 0x0000, 0x0010, 0x2c00, 0x0861, 0x0005, 0x2009, 0x1928, + 0x210c, 0xd194, 0x0005, 0x2009, 0x1928, 0x210c, 0xd1c4, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, 0x1924, 0x7110, 0xc194, + 0xc185, 0x7007, 0x0000, 0x7112, 0x2001, 0x003b, 0x080c, 0x16b9, + 0x00ee, 0x012e, 0x0005, 0x7814, 0xd0bc, 0x1108, 0x0005, 0x7810, + 0xc0c5, 0x7812, 0x0cc0, 0x0096, 0x00d6, 0x9006, 0x7006, 0x700e, + 0x701a, 0x701e, 0x7022, 0x7016, 0x702a, 0x7026, 0x702f, 0x0000, + 0x080c, 0x90aa, 0x0170, 0x080c, 0x90df, 0x0158, 0x2900, 0x7002, + 0x700a, 0x701a, 0x7013, 0x0001, 0x701f, 0x000a, 0x00de, 0x009e, + 0x0005, 0x900e, 0x0cd8, 0x00e6, 0x0096, 0x0086, 0x00d6, 0x00c6, + 0x2071, 0x1931, 0x721c, 0x2100, 0x9202, 0x1618, 0x080c, 0x90df, + 0x090c, 0x0d85, 0x7018, 0x9005, 0x1160, 0x2900, 0x7002, 0x700a, + 0x701a, 0x9006, 0x7006, 0x700e, 0xa806, 0xa802, 0x7012, 0x701e, + 0x0038, 0x2040, 0xa806, 0x2900, 0xa002, 0x701a, 0xa803, 0x0000, + 0x7010, 0x8000, 0x7012, 0x701c, 0x9080, 0x000a, 0x701e, 0x721c, + 0x08d0, 0x721c, 0x00ce, 0x00de, 0x008e, 0x009e, 0x00ee, 0x0005, + 0x0096, 0x0156, 0x0136, 0x0146, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0x1931, 0x7300, 0x831f, 0x831e, 0x831e, 0x9384, 0x003f, + 0x20e8, 0x939c, 0xffc0, 0x9398, 0x0003, 0x7104, 0x080c, 0x905c, + 0x810c, 0x2100, 0x9318, 0x8003, 0x2228, 0x2021, 0x0078, 0x9402, + 0x9532, 0x0208, 0x2028, 0x2500, 0x8004, 0x20a8, 0x23a0, 0xa001, + 0xa001, 0x4005, 0x2508, 0x080c, 0x9065, 0x2130, 0x7014, 0x9600, + 0x7016, 0x2600, 0x711c, 0x9102, 0x701e, 0x7004, 0x9600, 0x2008, + 0x9082, 0x000a, 0x1190, 0x7000, 0x2048, 0xa800, 0x9005, 0x1148, + 0x2009, 0x0001, 0x0026, 0x080c, 0x8f53, 0x002e, 0x7000, 0x2048, + 0xa800, 0x7002, 0x7007, 0x0000, 0x0008, 0x7106, 0x2500, 0x9212, + 0x1904, 0x8f92, 0x012e, 0x00ee, 0x014e, 0x013e, 0x015e, 0x009e, + 0x0005, 0x0016, 0x0026, 0x00e6, 0x0126, 0x2091, 0x8000, 0x9580, + 0x9122, 0x2005, 0x9075, 0x090c, 0x0d85, 0x080c, 0x9037, 0x012e, + 0x9580, 0x911e, 0x2005, 0x9075, 0x090c, 0x0d85, 0x0156, 0x0136, + 0x01c6, 0x0146, 0x01d6, 0x831f, 0x831e, 0x831e, 0x9384, 0x003f, + 0x20e0, 0x9384, 0xffc0, 0x9100, 0x2098, 0xa860, 0x20e8, 0xa95c, + 0x2c05, 0x9100, 0x20a0, 0x20a9, 0x0002, 0x4003, 0x2e0c, 0x2d00, + 0x0002, 0x9021, 0x9021, 0x9023, 0x9021, 0x9023, 0x9021, 0x9021, + 0x9021, 0x9021, 0x9021, 0x9029, 0x9021, 0x9029, 0x9021, 0x9021, + 0x9021, 0x080c, 0x0d85, 0x4104, 0x20a9, 0x0002, 0x4002, 0x4003, + 0x0028, 0x20a9, 0x0002, 0x4003, 0x4104, 0x4003, 0x01de, 0x014e, + 0x01ce, 0x013e, 0x015e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, + 0x7014, 0x8001, 0x7016, 0x710c, 0x2110, 0x00f1, 0x810c, 0x9188, + 0x0003, 0x7308, 0x8210, 0x9282, 0x000a, 0x1198, 0x7008, 0x2048, + 0xa800, 0x9005, 0x0158, 0x0006, 0x080c, 0x90ee, 0x009e, 0xa807, + 0x0000, 0x2900, 0x700a, 0x7010, 0x8001, 0x7012, 0x700f, 0x0000, + 0x0008, 0x720e, 0x009e, 0x0005, 0x0006, 0x810b, 0x810b, 0x2100, + 0x810b, 0x9100, 0x2008, 0x000e, 0x0005, 0x0006, 0x0026, 0x2100, + 0x9005, 0x0158, 0x9092, 0x000c, 0x0240, 0x900e, 0x8108, 0x9082, + 0x000c, 0x1de0, 0x002e, 0x000e, 0x0005, 0x900e, 0x0cd8, 0x2d00, + 0x90b8, 0x0008, 0x2031, 0x90a8, 0x901e, 0x6808, 0x9005, 0x0108, + 0x8318, 0x690c, 0x910a, 0x0248, 0x0140, 0x8318, 0x6810, 0x9112, + 0x0220, 0x0118, 0x8318, 0x2208, 0x0cd0, 0x233a, 0x6804, 0xd084, + 0x2300, 0x2021, 0x0001, 0x1150, 0x9082, 0x0003, 0x0967, 0x0a67, + 0x8420, 0x9082, 0x0007, 0x0967, 0x0a67, 0x0cd0, 0x9082, 0x0002, + 0x0967, 0x0a67, 0x8420, 0x9082, 0x0005, 0x0967, 0x0a67, 0x0cd0, + 0x6c1a, 0x0005, 0x0096, 0x0046, 0x0126, 0x2091, 0x8000, 0x2b00, + 0x9080, 0x9126, 0x2005, 0x9005, 0x090c, 0x0d85, 0x2004, 0x90a0, + 0x000a, 0x080c, 0x1072, 0x01d0, 0x2900, 0x7026, 0xa803, 0x0000, + 0xa807, 0x0000, 0x080c, 0x1072, 0x0188, 0x7024, 0xa802, 0xa807, + 0x0000, 0x2900, 0x7026, 0x94a2, 0x000a, 0x0110, 0x0208, 0x0c90, + 0x9085, 0x0001, 0x012e, 0x004e, 0x009e, 0x0005, 0x7024, 0x9005, + 0x0dc8, 0x2048, 0xac00, 0x080c, 0x108b, 0x2400, 0x0cc0, 0x0126, + 0x2091, 0x8000, 0x7024, 0x2048, 0x9005, 0x0130, 0xa800, 0x7026, + 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x7024, 0xa802, 0x2900, 0x7026, 0x012e, 0x0005, 0x0096, + 0x9e80, 0x0009, 0x2004, 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, + 0x080c, 0x108b, 0x000e, 0x0cb8, 0x009e, 0x0005, 0x0096, 0x7008, + 0x9005, 0x0138, 0x2048, 0xa800, 0x0006, 0x080c, 0x108b, 0x000e, + 0x0cb8, 0x9006, 0x7002, 0x700a, 0x7006, 0x700e, 0x701a, 0x701e, + 0x7022, 0x702a, 0x7026, 0x702e, 0x009e, 0x0005, 0x1a71, 0x0000, + 0x0000, 0x0000, 0x1931, 0x0000, 0x0000, 0x0000, 0x1888, 0x0000, + 0x0000, 0x0000, 0x1877, 0x0000, 0x0000, 0x0000, 0x00e6, 0x00c6, + 0x00b6, 0x00a6, 0xa8a8, 0x2040, 0x2071, 0x1877, 0x080c, 0x924a, + 0xa067, 0x0023, 0x6010, 0x905d, 0x0904, 0x921f, 0xb814, 0xa06e, + 0xb910, 0xa172, 0xb9a0, 0xa176, 0x2001, 0x0003, 0xa07e, 0xa834, + 0xa082, 0xa07b, 0x0000, 0xa898, 0x9005, 0x0118, 0xa078, 0xc085, + 0xa07a, 0x2858, 0x2031, 0x0018, 0xa068, 0x908a, 0x0019, 0x1a0c, + 0x0d85, 0x2020, 0x2050, 0x2940, 0xa864, 0x90bc, 0x00ff, 0x908c, + 0x000f, 0x91e0, 0x1ec1, 0x2c65, 0x9786, 0x0024, 0x2c05, 0x1590, + 0x908a, 0x0036, 0x1a0c, 0x0d85, 0x9082, 0x001b, 0x0002, 0x918a, + 0x918a, 0x918c, 0x918a, 0x918a, 0x918a, 0x918e, 0x918a, 0x918a, + 0x918a, 0x9190, 0x918a, 0x918a, 0x918a, 0x9192, 0x918a, 0x918a, + 0x918a, 0x9194, 0x918a, 0x918a, 0x918a, 0x9196, 0x918a, 0x918a, + 0x918a, 0x9198, 0x080c, 0x0d85, 0xa180, 0x04b8, 0xa190, 0x04a8, + 0xa1a0, 0x0498, 0xa1b0, 0x0488, 0xa1c0, 0x0478, 0xa1d0, 0x0468, + 0xa1e0, 0x0458, 0x908a, 0x0034, 0x1a0c, 0x0d85, 0x9082, 0x001b, + 0x0002, 0x91bc, 0x91ba, 0x91ba, 0x91ba, 0x91ba, 0x91ba, 0x91be, + 0x91ba, 0x91ba, 0x91ba, 0x91ba, 0x91ba, 0x91c0, 0x91ba, 0x91ba, + 0x91ba, 0x91ba, 0x91ba, 0x91c2, 0x91ba, 0x91ba, 0x91ba, 0x91ba, + 0x91ba, 0x91c4, 0x080c, 0x0d85, 0xa180, 0x0038, 0xa198, 0x0028, + 0xa1b0, 0x0018, 0xa1c8, 0x0008, 0xa1e0, 0x2600, 0x0002, 0x91e0, + 0x91e2, 0x91e4, 0x91e6, 0x91e8, 0x91ea, 0x91ec, 0x91ee, 0x91f0, + 0x91f2, 0x91f4, 0x91f6, 0x91f8, 0x91fa, 0x91fc, 0x91fe, 0x9200, + 0x9202, 0x9204, 0x9206, 0x9208, 0x920a, 0x920c, 0x920e, 0x9210, + 0x080c, 0x0d85, 0xb9e2, 0x0468, 0xb9de, 0x0458, 0xb9da, 0x0448, + 0xb9d6, 0x0438, 0xb9d2, 0x0428, 0xb9ce, 0x0418, 0xb9ca, 0x0408, + 0xb9c6, 0x00f8, 0xb9c2, 0x00e8, 0xb9be, 0x00d8, 0xb9ba, 0x00c8, + 0xb9b6, 0x00b8, 0xb9b2, 0x00a8, 0xb9ae, 0x0098, 0xb9aa, 0x0088, + 0xb9a6, 0x0078, 0xb9a2, 0x0068, 0xb99e, 0x0058, 0xb99a, 0x0048, + 0xb996, 0x0038, 0xb992, 0x0028, 0xb98e, 0x0018, 0xb98a, 0x0008, + 0xb986, 0x8631, 0x8421, 0x0130, 0x080c, 0x1e97, 0x090c, 0x0d85, + 0x0804, 0x9164, 0x00ae, 0x00be, 0x00ce, 0x00ee, 0x0005, 0xa86c, + 0xa06e, 0xa870, 0xa072, 0xa077, 0x00ff, 0x9006, 0x0804, 0x9146, + 0x0006, 0x0016, 0x00b6, 0x6010, 0x2058, 0xb810, 0x9005, 0x01b0, + 0x2001, 0x1925, 0x2004, 0x9005, 0x0188, 0x2001, 0x1800, 0x2004, + 0x9086, 0x0003, 0x1158, 0x0036, 0x0046, 0xbba0, 0x2021, 0x0004, + 0x2011, 0x8014, 0x080c, 0x4ca1, 0x004e, 0x003e, 0x00be, 0x001e, + 0x000e, 0x0005, 0x9016, 0x710c, 0xa834, 0x910a, 0xa936, 0x7008, + 0x9005, 0x0120, 0x8210, 0x910a, 0x0230, 0x0128, 0x7010, 0x8210, + 0x910a, 0x0208, 0x1de0, 0xaa8a, 0xa26a, 0x0005, 0x00f6, 0x00d6, + 0x0036, 0x2079, 0x0300, 0x781b, 0x0200, 0x7818, 0xd094, 0x1dd8, + 0x781b, 0x0202, 0xa001, 0xa001, 0x7818, 0xd094, 0x1da0, 0xb8ac, + 0x906d, 0x0198, 0x2079, 0x0000, 0x9c1e, 0x1118, 0x680c, 0xb8ae, + 0x0050, 0x9c06, 0x0130, 0x2d78, 0x680c, 0x906d, 0x1dd0, 0x080c, + 0x0d85, 0x6b0c, 0x7b0e, 0x600f, 0x0000, 0x2079, 0x0300, 0x781b, + 0x0200, 0x003e, 0x00de, 0x00fe, 0x0005, 0x00e6, 0x00d6, 0x0096, + 0x00c6, 0x0036, 0x0126, 0x2091, 0x8000, 0x0156, 0x20a9, 0x01ff, + 0x2071, 0x0300, 0x701b, 0x0200, 0x7018, 0xd094, 0x0110, 0x1f04, + 0x929a, 0x701b, 0x0202, 0xa001, 0xa001, 0x7018, 0xd094, 0x1d90, + 0xb8ac, 0x9065, 0x01f0, 0x600c, 0xb8ae, 0x6024, 0xc08d, 0x6026, + 0x6003, 0x0004, 0x601b, 0x0000, 0x6013, 0x0000, 0x601f, 0x0101, + 0x6014, 0x904d, 0x090c, 0x0d85, 0xa88b, 0x0000, 0xa8a8, 0xa8ab, + 0x0000, 0x904d, 0x090c, 0x0d85, 0x080c, 0x108b, 0x080c, 0x8e58, + 0x08f8, 0x2071, 0x0300, 0x701b, 0x0200, 0x015e, 0x012e, 0x003e, + 0x00ce, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x00b6, 0x0016, + 0x0006, 0x0156, 0x080c, 0x268c, 0x015e, 0x11b0, 0x080c, 0x6749, + 0x190c, 0x0d85, 0x000e, 0x001e, 0xb912, 0xb816, 0x080c, 0xb116, + 0x0140, 0x2b00, 0x6012, 0x6023, 0x0001, 0x2009, 0x0001, 0x080c, + 0xb20a, 0x00be, 0x00ce, 0x0005, 0x000e, 0x001e, 0x0cd0, 0x0066, + 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0d85, 0x0013, 0x006e, 0x0005, + 0x9310, 0x9310, 0x9310, 0x9312, 0x935b, 0x9310, 0x9310, 0x9310, + 0x93d5, 0x9310, 0x940d, 0x9310, 0x9310, 0x9310, 0x9310, 0x9310, + 0x080c, 0x0d85, 0x9182, 0x0040, 0x0002, 0x9325, 0x9325, 0x9325, + 0x9325, 0x9325, 0x9325, 0x9325, 0x9325, 0x9325, 0x9327, 0x9338, + 0x9325, 0x9325, 0x9325, 0x9325, 0x9349, 0x080c, 0x0d85, 0x0096, + 0x6114, 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, + 0x0500, 0x00be, 0x080c, 0x6e11, 0x080c, 0xb16c, 0x009e, 0x0005, + 0x080c, 0x9a48, 0x00d6, 0x6114, 0x080c, 0xcf1b, 0x0130, 0x0096, + 0x6114, 0x2148, 0x080c, 0x7012, 0x009e, 0x00de, 0x080c, 0xb16c, + 0x0005, 0x080c, 0x9a48, 0x080c, 0x3315, 0x6114, 0x0096, 0x2148, + 0x080c, 0xcf1b, 0x0120, 0xa87b, 0x0029, 0x080c, 0x7012, 0x009e, + 0x080c, 0xb16c, 0x0005, 0x601b, 0x0000, 0x9182, 0x0040, 0x0096, + 0x0002, 0x9376, 0x9376, 0x9376, 0x9376, 0x9376, 0x9376, 0x9376, + 0x9376, 0x9378, 0x9376, 0x9376, 0x9376, 0x93d1, 0x9376, 0x9376, + 0x9376, 0x9376, 0x9376, 0x9376, 0x937f, 0x9376, 0x080c, 0x0d85, + 0x6114, 0x2148, 0xa938, 0x918e, 0xffff, 0x0904, 0x93d1, 0x6024, + 0xd08c, 0x15d8, 0x080c, 0x8f0e, 0x05e0, 0x00e6, 0x6114, 0x2148, + 0x080c, 0x912e, 0x0096, 0xa8a8, 0x2048, 0x080c, 0x6da9, 0x009e, + 0xa8ab, 0x0000, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, + 0x925e, 0x00be, 0xae88, 0x00b6, 0x2059, 0x0000, 0x080c, 0x8e61, + 0x00be, 0x01e0, 0x2071, 0x193d, 0x080c, 0x8ea8, 0x01b8, 0x9086, + 0x0001, 0x1128, 0x2001, 0x1947, 0x2004, 0x9005, 0x1178, 0x0096, + 0x080c, 0x1059, 0x2900, 0x009e, 0x0148, 0xa8aa, 0x00f6, 0x2c78, + 0x080c, 0x8e1c, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x080c, 0x8e58, + 0x0cd0, 0x080c, 0x8f13, 0x1160, 0x6010, 0x9005, 0x0130, 0x2058, + 0xb8ac, 0x9005, 0x190c, 0x0d85, 0x6012, 0x2c00, 0x080c, 0x8ed9, + 0x0005, 0x080c, 0x9489, 0x009e, 0x0005, 0x9182, 0x0040, 0x0096, + 0x0002, 0x93e9, 0x93e9, 0x93e9, 0x93eb, 0x93e9, 0x93e9, 0x93e9, + 0x940b, 0x93e9, 0x93e9, 0x93e9, 0x93e9, 0x93e9, 0x93e9, 0x93e9, + 0x93e9, 0x080c, 0x0d85, 0x6003, 0x0003, 0x6106, 0x6014, 0x2048, + 0xa8ac, 0xa836, 0xa8b0, 0xa83a, 0xa847, 0x0000, 0xa84b, 0x0000, + 0xa884, 0x9092, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, + 0x8213, 0x9210, 0x621a, 0x080c, 0x1c26, 0x2009, 0x8030, 0x080c, + 0x965e, 0x009e, 0x0005, 0x080c, 0x0d85, 0x080c, 0x9a48, 0x6114, + 0x2148, 0xa87b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, + 0x00be, 0x080c, 0x7012, 0x080c, 0xb16c, 0x009e, 0x0005, 0x080c, + 0xacfc, 0x6144, 0xd1fc, 0x0120, 0xd1ac, 0x1110, 0x6003, 0x0003, + 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0d85, 0x0096, 0x0023, 0x009e, + 0x080c, 0xad18, 0x0005, 0x9443, 0x9443, 0x9443, 0x9445, 0x9456, + 0x9443, 0x9443, 0x9443, 0x9443, 0x9443, 0x9443, 0x9443, 0x9443, + 0x9443, 0x9443, 0x9443, 0x080c, 0x0d85, 0x080c, 0xaee3, 0x6114, + 0x2148, 0xa87b, 0x0006, 0x6010, 0x00b6, 0x2058, 0xb8bb, 0x0500, + 0x00be, 0x080c, 0x7012, 0x080c, 0xb16c, 0x0005, 0x0491, 0x0005, + 0x080c, 0xacfc, 0x6000, 0x6144, 0xd1fc, 0x0130, 0xd1ac, 0x1120, + 0x6003, 0x0003, 0x2009, 0x0003, 0x908a, 0x0010, 0x1a0c, 0x0d85, + 0x0096, 0x0033, 0x009e, 0x0106, 0x080c, 0xad18, 0x010e, 0x0005, + 0x9480, 0x9480, 0x9480, 0x9482, 0x9489, 0x9480, 0x9480, 0x9480, + 0x9480, 0x9480, 0x9480, 0x9480, 0x9480, 0x9480, 0x9480, 0x9480, + 0x080c, 0x0d85, 0x0036, 0x00e6, 0x080c, 0xaee3, 0x00ee, 0x003e, + 0x0005, 0x6024, 0xd08c, 0x11f0, 0x00f6, 0x00e6, 0x601b, 0x0000, + 0x6014, 0x2048, 0x6010, 0x9005, 0x0128, 0x00b6, 0x2058, 0x080c, + 0x925e, 0x00be, 0x2071, 0x193d, 0x080c, 0x8ea8, 0x0160, 0x2001, + 0x187f, 0x2004, 0xa88a, 0x2031, 0x0000, 0x2c78, 0x080c, 0x8e1c, + 0x00ee, 0x00fe, 0x0005, 0x0096, 0xa88b, 0x0000, 0xa8a8, 0x2048, + 0x080c, 0x108b, 0x009e, 0xa8ab, 0x0000, 0x080c, 0x8e58, 0x0c80, + 0x2001, 0x1925, 0x200c, 0x918e, 0x0000, 0x190c, 0x8f0e, 0x05c8, + 0x00e6, 0x2071, 0x1924, 0x7110, 0xc1c5, 0x7112, 0x080c, 0x8f18, + 0x00f6, 0x00c6, 0x2071, 0x1000, 0x00b6, 0x2e04, 0x905d, 0x0138, + 0xb8ac, 0x9065, 0x0120, 0x080c, 0x8eee, 0x090c, 0x928d, 0x8e70, + 0x9e86, 0x1800, 0x1d90, 0x00be, 0x00d6, 0x0096, 0x0046, 0x2061, + 0x1ddc, 0x2001, 0x181a, 0x2024, 0x6020, 0x9086, 0x0000, 0x1191, + 0x9ce0, 0x001c, 0x2400, 0x9c06, 0x1db8, 0x004e, 0x009e, 0x00de, + 0x00d1, 0x00ce, 0x00fe, 0x2071, 0x1924, 0x7110, 0xc1c4, 0x7112, + 0x00ee, 0x0005, 0x6020, 0x9086, 0x0009, 0x1160, 0x6100, 0x9186, + 0x0004, 0x1138, 0x6110, 0x81ff, 0x190c, 0x0d85, 0x2c00, 0x080c, + 0x8ed9, 0x9006, 0x0005, 0x2071, 0x193f, 0x2073, 0x0000, 0x8e70, + 0x9e86, 0x1947, 0x1dd0, 0x2071, 0x193d, 0x7006, 0x7002, 0x2001, + 0x1930, 0x2064, 0x8cff, 0x0130, 0x6120, 0x918e, 0x0000, 0x190c, + 0x0d85, 0x2102, 0x2001, 0x188a, 0x200c, 0x81ff, 0x0148, 0x0096, + 0x2148, 0x080c, 0x108b, 0x009e, 0x2001, 0x188a, 0x2003, 0x0000, + 0x2071, 0x1931, 0x080c, 0x90f7, 0x0804, 0x9106, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x187a, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0126, 0x2091, + 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, 0x8086, + 0x818e, 0x1208, 0x9200, 0x1f04, 0x954f, 0x8086, 0x818e, 0x004e, + 0x003e, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0076, 0x0156, + 0x20a9, 0x0010, 0x9005, 0x01c8, 0x911a, 0x12b8, 0x8213, 0x818d, + 0x0228, 0x911a, 0x1220, 0x1f04, 0x9566, 0x0028, 0x911a, 0x2308, + 0x8210, 0x1f04, 0x9566, 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, + 0x000e, 0x015e, 0x007e, 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, + 0x1000, 0x0ca8, 0x0126, 0x2091, 0x2800, 0x2079, 0x19e8, 0x012e, + 0x00d6, 0x2069, 0x19e8, 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, + 0x20e9, 0x0000, 0x2069, 0x0200, 0x080c, 0xaaf1, 0x04c9, 0x080c, + 0xaadc, 0x04b1, 0x080c, 0xaadf, 0x0499, 0x080c, 0xaae2, 0x0481, + 0x080c, 0xaae5, 0x0469, 0x080c, 0xaae8, 0x0451, 0x080c, 0xaaeb, + 0x0439, 0x080c, 0xaaee, 0x0421, 0x01de, 0x014e, 0x015e, 0x6857, + 0x0000, 0x00f6, 0x2079, 0x0380, 0x0419, 0x7807, 0x0003, 0x7803, + 0x0000, 0x7803, 0x0001, 0x2069, 0x0004, 0x2d04, 0x9084, 0xfffe, + 0x9085, 0x8000, 0x206a, 0x2069, 0x0100, 0x6828, 0x9084, 0xfffc, + 0x682a, 0x00fe, 0x2001, 0x1b5d, 0x2003, 0x0000, 0x00de, 0x0005, + 0x20a9, 0x0020, 0x20a1, 0x0240, 0x2001, 0x0000, 0x4004, 0x0005, + 0x00c6, 0x7803, 0x0000, 0x9006, 0x7827, 0x0030, 0x782b, 0x0400, + 0x7827, 0x0031, 0x782b, 0x1af6, 0x781f, 0xff00, 0x781b, 0xff00, + 0x2061, 0x1aeb, 0x602f, 0x19e8, 0x6033, 0x1800, 0x6037, 0x1a04, + 0x603b, 0x1ec1, 0x603f, 0x1ed1, 0x6042, 0x6047, 0x1ac1, 0x00ce, + 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0001, + 0x01b0, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, 0x2061, 0x19e8, + 0x602c, 0x8000, 0x602e, 0x601c, 0x9005, 0x0130, 0x9080, 0x0003, + 0x2102, 0x611e, 0x00ce, 0x0005, 0x6122, 0x611e, 0x0cd8, 0x6146, + 0x2c08, 0x2001, 0x0012, 0x080c, 0xaced, 0x0005, 0x0016, 0x2009, + 0x8020, 0x6146, 0x2c08, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, + 0x9086, 0x0001, 0x1128, 0x2001, 0x0019, 0x080c, 0xaced, 0x0088, + 0x00c6, 0x2061, 0x19e8, 0x602c, 0x8000, 0x602e, 0x600c, 0x9005, + 0x0128, 0x9080, 0x0003, 0x2102, 0x610e, 0x0010, 0x6112, 0x610e, + 0x00ce, 0x001e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, + 0x9086, 0x0001, 0x0198, 0x00c6, 0x6146, 0x600f, 0x0000, 0x2c08, + 0x2061, 0x19e8, 0x6044, 0x9005, 0x0130, 0x9080, 0x0003, 0x2102, + 0x6146, 0x00ce, 0x0005, 0x614a, 0x6146, 0x0cd8, 0x6146, 0x600f, + 0x0000, 0x2c08, 0x2001, 0x0013, 0x080c, 0xaced, 0x0005, 0x6044, + 0xd0dc, 0x0110, 0x080c, 0xa78a, 0x0005, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, 0x0056, 0x0036, 0x0026, + 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, 0x19e8, 0x7648, 0x2660, + 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, 0x96f1, 0x9c86, 0x1b55, + 0x0904, 0x96ec, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x96ec, + 0x87ff, 0x0120, 0x605c, 0x9106, 0x1904, 0x96ec, 0x704c, 0x9c06, + 0x1188, 0x0036, 0x2019, 0x0001, 0x080c, 0xa596, 0x703f, 0x0000, + 0x9006, 0x704e, 0x706a, 0x7052, 0x706e, 0x080c, 0xaff4, 0x003e, + 0x2029, 0x0001, 0x080c, 0x9667, 0x7048, 0x9c36, 0x1110, 0x660c, + 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, + 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xcf1b, + 0x01f0, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1588, 0x6004, + 0x9086, 0x0040, 0x090c, 0xa78a, 0xa867, 0x0103, 0xab7a, 0xa877, + 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0xd220, 0x080c, 0xeddf, + 0x080c, 0x7012, 0x007e, 0x003e, 0x001e, 0x080c, 0xd10c, 0x080c, + 0xb1a7, 0x00ce, 0x0804, 0x9683, 0x2c78, 0x600c, 0x2060, 0x0804, + 0x9683, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e, 0x006e, + 0x007e, 0x009e, 0x00be, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, + 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0076, 0x080c, + 0xeddf, 0x080c, 0xea30, 0x007e, 0x003e, 0x001e, 0x08c0, 0x6020, + 0x9086, 0x0009, 0x1168, 0xa87b, 0x0006, 0x0016, 0x0036, 0x0076, + 0x080c, 0x7012, 0x080c, 0xb16c, 0x007e, 0x003e, 0x001e, 0x0848, + 0x6020, 0x9086, 0x000a, 0x0904, 0x96d6, 0x0804, 0x96cf, 0x0006, + 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, 0x9036, 0x0126, 0x2091, + 0x8000, 0x2079, 0x19e8, 0x7848, 0x9065, 0x0904, 0x9790, 0x600c, + 0x0006, 0x600f, 0x0000, 0x784c, 0x9c06, 0x11b0, 0x0036, 0x2019, + 0x0001, 0x080c, 0xa596, 0x783f, 0x0000, 0x901e, 0x7b4e, 0x7b6a, + 0x7b52, 0x7b6e, 0x080c, 0xaff4, 0x003e, 0x000e, 0x9005, 0x1118, + 0x600c, 0x600f, 0x0000, 0x0006, 0x9c86, 0x1b55, 0x05b0, 0x00e6, + 0x2f70, 0x080c, 0x9667, 0x00ee, 0x080c, 0xcf1b, 0x0548, 0x6014, + 0x2048, 0x6020, 0x9086, 0x0003, 0x15a8, 0x3e08, 0x918e, 0x0002, + 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x0140, 0x6048, 0x9005, 0x11c0, 0x2001, 0x1988, 0x2004, + 0x604a, 0x0098, 0x6004, 0x9086, 0x0040, 0x090c, 0xa78a, 0xa867, + 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x7006, 0x080c, 0xd10c, + 0x6044, 0xc0fc, 0x6046, 0x080c, 0xb1a7, 0x000e, 0x0804, 0x9734, + 0x7e4a, 0x7e46, 0x012e, 0x00fe, 0x00de, 0x00ce, 0x009e, 0x006e, + 0x000e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xea30, + 0x0c38, 0x6020, 0x9086, 0x0009, 0x1130, 0xab7a, 0x080c, 0x7012, + 0x080c, 0xb16c, 0x0c10, 0x6020, 0x9086, 0x000a, 0x0990, 0x0850, + 0x0016, 0x0026, 0x0086, 0x9046, 0x00a9, 0x080c, 0x98a3, 0x008e, + 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079, 0x19e8, 0x2091, + 0x8000, 0x080c, 0x98ec, 0x080c, 0x9982, 0x080c, 0x6948, 0x012e, + 0x00fe, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, + 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, + 0x7620, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9868, 0x6010, 0x2058, + 0xb8a0, 0x9206, 0x1904, 0x9863, 0x88ff, 0x0120, 0x605c, 0x9106, + 0x1904, 0x9863, 0x7030, 0x9c06, 0x1580, 0x2069, 0x0100, 0x6820, + 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, 0x8a4b, 0x080c, 0xa2a0, + 0x68c3, 0x0000, 0x080c, 0xa78a, 0x7033, 0x0000, 0x0036, 0x2069, + 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, + 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x7008, 0xc0ad, 0x700a, + 0x6003, 0x0009, 0x630a, 0x0804, 0x9863, 0x7020, 0x9c36, 0x1110, + 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, + 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c, 0x0066, 0x2c00, + 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6044, + 0xc0fc, 0x6046, 0x6014, 0x2048, 0x080c, 0xcf1b, 0x01e8, 0x6020, + 0x9086, 0x0003, 0x1580, 0x080c, 0xd132, 0x1118, 0x080c, 0xbb5c, + 0x0098, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, + 0x0086, 0x080c, 0xd220, 0x080c, 0xeddf, 0x080c, 0x7012, 0x008e, + 0x003e, 0x001e, 0x080c, 0xd10c, 0x080c, 0xb1a7, 0x080c, 0xa65d, + 0x00ce, 0x0804, 0x97db, 0x2c78, 0x600c, 0x2060, 0x0804, 0x97db, + 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, + 0x009e, 0x00be, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, + 0x0036, 0x0086, 0x080c, 0xeddf, 0x080c, 0xea30, 0x008e, 0x003e, + 0x001e, 0x08d0, 0x080c, 0xbb5c, 0x6020, 0x9086, 0x0002, 0x1160, + 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0904, 0x9849, 0x9086, + 0x008b, 0x0904, 0x9849, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920, + 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, + 0x09b0, 0x0804, 0x985c, 0x0006, 0x00f6, 0x00e6, 0x0096, 0x00b6, + 0x00c6, 0x0066, 0x0016, 0x0126, 0x2091, 0x8000, 0x9280, 0x1000, + 0x2004, 0x905d, 0x2079, 0x19e8, 0x9036, 0x7828, 0x2060, 0x8cff, + 0x0538, 0x6010, 0x9b06, 0x1500, 0x6043, 0xffff, 0x080c, 0xaf2e, + 0x01d8, 0x610c, 0x0016, 0x080c, 0xa420, 0x6014, 0x2048, 0xa867, + 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, + 0xd220, 0x080c, 0xeddf, 0x080c, 0x7012, 0x008e, 0x003e, 0x001e, + 0x080c, 0xb1a7, 0x00ce, 0x08d8, 0x2c30, 0x600c, 0x2060, 0x08b8, + 0x080c, 0x6965, 0x012e, 0x001e, 0x006e, 0x00ce, 0x00be, 0x009e, + 0x00ee, 0x00fe, 0x000e, 0x0005, 0x0096, 0x0006, 0x0066, 0x00c6, + 0x00d6, 0x9036, 0x7820, 0x9065, 0x0904, 0x9955, 0x600c, 0x0006, + 0x6044, 0xc0fc, 0x6046, 0x600f, 0x0000, 0x7830, 0x9c06, 0x1598, + 0x2069, 0x0100, 0x6820, 0xd0a4, 0x0110, 0xd0cc, 0x1508, 0x080c, + 0x8a4b, 0x080c, 0xa2a0, 0x68c3, 0x0000, 0x080c, 0xa78a, 0x7833, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, + 0x2001, 0x0100, 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, + 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0058, + 0x080c, 0x6ba9, 0x1538, 0x6003, 0x0009, 0x630a, 0x7808, 0xc0ad, + 0x780a, 0x2c30, 0x00f8, 0x6014, 0x2048, 0x080c, 0xcf19, 0x01b0, + 0x6020, 0x9086, 0x0003, 0x1508, 0x080c, 0xd132, 0x1118, 0x080c, + 0xbb5c, 0x0060, 0x080c, 0x6ba9, 0x1168, 0xa867, 0x0103, 0xab7a, + 0xa877, 0x0000, 0x080c, 0x7012, 0x080c, 0xd10c, 0x080c, 0xb1a7, + 0x080c, 0xa65d, 0x000e, 0x0804, 0x98f3, 0x7e22, 0x7e1e, 0x00de, + 0x00ce, 0x006e, 0x000e, 0x009e, 0x0005, 0x6020, 0x9086, 0x0006, + 0x1118, 0x080c, 0xea30, 0x0c50, 0x080c, 0xbb5c, 0x6020, 0x9086, + 0x0002, 0x1150, 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0990, + 0x9086, 0x008b, 0x0978, 0x08d0, 0x6020, 0x9086, 0x0005, 0x19b0, + 0x6004, 0x0006, 0x9086, 0x0085, 0x000e, 0x0d18, 0x9086, 0x008b, + 0x0d00, 0x0860, 0x0006, 0x0096, 0x00b6, 0x00c6, 0x0066, 0x9036, + 0x7828, 0x9065, 0x0510, 0x6010, 0x2058, 0x600c, 0x0006, 0x3e08, + 0x918e, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x11a8, 0x6043, 0xffff, + 0x080c, 0xaf2e, 0x0180, 0x610c, 0x080c, 0xa420, 0x6014, 0x2048, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x7012, 0x080c, + 0xb1a7, 0x000e, 0x08f0, 0x2c30, 0x0ce0, 0x006e, 0x00ce, 0x00be, + 0x009e, 0x000e, 0x0005, 0x00e6, 0x00d6, 0x0096, 0x0066, 0x080c, + 0x62af, 0x11b0, 0x2071, 0x19e8, 0x7030, 0x9080, 0x0005, 0x2004, + 0x904d, 0x0170, 0xa878, 0x9606, 0x1158, 0x2071, 0x19e8, 0x7030, + 0x9035, 0x0130, 0x9080, 0x0005, 0x2004, 0x9906, 0x1108, 0x0029, + 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00c6, 0x2660, 0x6043, + 0xffff, 0x080c, 0xaf2e, 0x0178, 0x080c, 0xa420, 0x6014, 0x2048, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xd220, 0x080c, + 0x7012, 0x080c, 0xb1a7, 0x00ce, 0x0005, 0x00b6, 0x00e6, 0x00c6, + 0x080c, 0xacfc, 0x0106, 0x2071, 0x0101, 0x2e04, 0xc0c4, 0x2072, + 0x6044, 0xd0fc, 0x1138, 0x010e, 0x090c, 0xad18, 0x00ce, 0x00ee, + 0x00be, 0x0005, 0x2071, 0x19e8, 0x7030, 0x9005, 0x0da0, 0x9c06, + 0x190c, 0x0d85, 0x7036, 0x080c, 0x8a4b, 0x7004, 0x9084, 0x0007, + 0x0002, 0x9a1b, 0x9a1d, 0x9a24, 0x9a2e, 0x9a3c, 0x9a1b, 0x9a29, + 0x9a19, 0x080c, 0x0d85, 0x0428, 0x0005, 0x080c, 0xaf19, 0x7007, + 0x0000, 0x7033, 0x0000, 0x00e8, 0x0066, 0x9036, 0x080c, 0xa420, + 0x006e, 0x7007, 0x0000, 0x7033, 0x0000, 0x0098, 0x080c, 0xaf04, + 0x0140, 0x080c, 0xaf19, 0x0128, 0x0066, 0x9036, 0x080c, 0xa420, + 0x006e, 0x7033, 0x0000, 0x0028, 0x080c, 0xaf04, 0x080c, 0xa78a, + 0x0000, 0x010e, 0x090c, 0xad18, 0x00ce, 0x00ee, 0x00be, 0x0005, + 0x00d6, 0x00c6, 0x080c, 0xacfc, 0x0106, 0x6044, 0xd0fc, 0x1130, + 0x010e, 0x090c, 0xad18, 0x00ce, 0x00de, 0x0005, 0x2069, 0x19e8, + 0x684c, 0x9005, 0x0da8, 0x9c06, 0x190c, 0x0d85, 0x6852, 0x00e6, + 0x2d70, 0x080c, 0x9667, 0x00ee, 0x080c, 0x8a58, 0x0016, 0x2009, + 0x0040, 0x080c, 0x2220, 0x001e, 0x683c, 0x9084, 0x0003, 0x0002, + 0x9a76, 0x9a77, 0x9a96, 0x9a74, 0x080c, 0x0d85, 0x0490, 0x6868, + 0x9086, 0x0001, 0x0198, 0x600c, 0x9015, 0x0168, 0x6a4a, 0x600f, + 0x0000, 0x6044, 0x9084, 0x7f7f, 0x6046, 0x9006, 0x6842, 0x684e, + 0x683f, 0x0000, 0x00f0, 0x684a, 0x6846, 0x0c98, 0x686b, 0x0000, + 0x6848, 0x9065, 0x0d70, 0x6003, 0x0002, 0x0c58, 0x6044, 0x9084, + 0x7f7f, 0x6046, 0x9006, 0x6842, 0x684e, 0x686a, 0x6852, 0x686e, + 0x600c, 0x9015, 0x0120, 0x6a4a, 0x600f, 0x0000, 0x0010, 0x684a, + 0x6846, 0x080c, 0xaff4, 0x684f, 0x0000, 0x010e, 0x090c, 0xad18, + 0x00ce, 0x00de, 0x0005, 0x0005, 0x6020, 0x9084, 0x000f, 0x000b, + 0x0005, 0x9ac9, 0x9acc, 0x9f80, 0xa019, 0x9acc, 0x9f80, 0xa019, + 0x9ac9, 0x9acc, 0x9ac9, 0x9ac9, 0x9ac9, 0x9ac9, 0x9ac9, 0x9ac9, + 0x9ac9, 0x080c, 0x99ed, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, + 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, + 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d85, 0x6110, + 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040, + 0x1a04, 0x9b38, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, + 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x9ce1, 0x9d1c, + 0x9d45, 0x9e0f, 0x9e31, 0x9e37, 0x9e44, 0x9e4c, 0x9e58, 0x9e5e, + 0x9e6f, 0x9e5e, 0x9ec7, 0x9e4c, 0x9ed3, 0x9ed9, 0x9e58, 0x9ed9, + 0x9ee5, 0x9b36, 0x9b36, 0x9b36, 0x9b36, 0x9b36, 0x9b36, 0x9b36, + 0x9b36, 0x9b36, 0x9b36, 0x9b36, 0xa441, 0xa464, 0xa475, 0xa495, + 0xa4c7, 0x9e44, 0x9b36, 0x9e44, 0x9e5e, 0x9b36, 0x9d45, 0x9e0f, + 0x9b36, 0xa888, 0x9e5e, 0x9b36, 0xa8a4, 0x9e5e, 0x9b36, 0x9e58, + 0x9cdb, 0x9b59, 0x9b36, 0xa8c0, 0xa92d, 0xaa11, 0x9b36, 0xaa1e, + 0x9e41, 0xaa49, 0x9b36, 0xa4d1, 0xaa55, 0x9b36, 0x080c, 0x0d85, + 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, + 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0xaaf5, 0xaba7, 0x9b57, + 0x9b91, 0x9c3d, 0x9c48, 0x9b57, 0x9e44, 0x9b57, 0x9ca2, 0x9cae, + 0x9bac, 0x9b57, 0x9bc7, 0x9bfb, 0xb008, 0xb04d, 0x9e5e, 0x080c, + 0x0d85, 0x00d6, 0x0096, 0x080c, 0x9ef8, 0x0026, 0x0036, 0x7814, + 0x2048, 0xa958, 0xd1cc, 0x1138, 0x2009, 0x2414, 0x2011, 0x0018, + 0x2019, 0x0018, 0x0030, 0x2009, 0x2410, 0x2011, 0x0014, 0x2019, + 0x0014, 0x7102, 0x7206, 0x700b, 0x0800, 0xa83c, 0x700e, 0xa850, + 0x7022, 0xa854, 0x7026, 0x63c2, 0x080c, 0xa270, 0x003e, 0x002e, + 0x009e, 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, + 0x080c, 0xb094, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001, + 0x0005, 0x00d6, 0x0096, 0x080c, 0x9ef8, 0x7003, 0x0500, 0x7814, + 0x2048, 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, + 0x7016, 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, + 0xa270, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x9ef8, + 0x7003, 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, + 0xa8d4, 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, + 0x60c3, 0x0010, 0x080c, 0xa270, 0x009e, 0x00de, 0x0005, 0x00d6, + 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, 0x9ef8, 0x20e9, 0x0000, + 0x2001, 0x19a4, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003, + 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, + 0x2098, 0x2001, 0x19a4, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c, + 0x2205, 0x080c, 0xdcef, 0x9006, 0x080c, 0x2205, 0x001e, 0xa804, + 0x9005, 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0xa270, 0x012e, + 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, + 0x080c, 0x9f43, 0x20e9, 0x0000, 0x2001, 0x19a4, 0x2003, 0x0000, + 0x7814, 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003, + 0x60c2, 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, + 0x2098, 0x2001, 0x19a4, 0x0016, 0x200c, 0x080c, 0xdcef, 0x001e, + 0xa804, 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, + 0x080c, 0x100b, 0x080c, 0xa270, 0x012e, 0x009e, 0x00de, 0x0005, + 0x60c0, 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004, + 0x20a3, 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x9ef8, 0x7003, + 0x7800, 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0xa270, + 0x00d6, 0x00e6, 0x080c, 0x9f43, 0x7814, 0x9084, 0xff00, 0x2073, + 0x0200, 0x8e70, 0x8e70, 0x9096, 0xdf00, 0x0138, 0x9096, 0xe000, + 0x0120, 0x2073, 0x0010, 0x8e70, 0x0030, 0x9095, 0x0010, 0x2272, + 0x8e70, 0x2073, 0x0034, 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, + 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9c68, 0x2069, 0x1801, 0x20a9, + 0x0004, 0x2d76, 0x8d68, 0x8e70, 0x1f04, 0x9c71, 0x9096, 0xdf00, + 0x0130, 0x9096, 0xe000, 0x0118, 0x60c3, 0x0018, 0x00f0, 0x2069, + 0x19b4, 0x9086, 0xdf00, 0x0110, 0x2069, 0x19ce, 0x20a9, 0x001a, + 0x9e86, 0x0260, 0x1148, 0x00c6, 0x2061, 0x0200, 0x6010, 0x8000, + 0x6012, 0x00ce, 0x2071, 0x0240, 0x2d04, 0x8007, 0x2072, 0x8d68, + 0x8e70, 0x1f04, 0x9c88, 0x60c3, 0x004c, 0x080c, 0xa270, 0x00ee, + 0x00de, 0x0005, 0x080c, 0x9ef8, 0x7003, 0x6300, 0x7007, 0x0028, + 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa270, 0x00d6, 0x0026, + 0x0016, 0x080c, 0x9f43, 0x7003, 0x0200, 0x7814, 0x700e, 0x00e6, + 0x9ef0, 0x0004, 0x2009, 0x0001, 0x2011, 0x000c, 0x2069, 0x1924, + 0x6810, 0xd084, 0x1148, 0x2073, 0x0500, 0x8e70, 0x2073, 0x0000, + 0x8e70, 0x8108, 0x9290, 0x0004, 0x2073, 0x0800, 0x8e70, 0x2073, + 0x0000, 0x00ee, 0x7206, 0x710a, 0x62c2, 0x080c, 0xa270, 0x001e, + 0x002e, 0x00de, 0x0005, 0x2001, 0x1818, 0x2004, 0x609a, 0x0804, + 0xa270, 0x080c, 0x9ef8, 0x7003, 0x5200, 0x2069, 0x1847, 0x6804, + 0xd084, 0x0130, 0x6828, 0x0016, 0x080c, 0x26bf, 0x710e, 0x001e, + 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, + 0x20a1, 0x0250, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, + 0x0254, 0x4003, 0x080c, 0xb094, 0x1120, 0xb8a0, 0x9082, 0x007f, + 0x0248, 0x2001, 0x181f, 0x2004, 0x7032, 0x2001, 0x1820, 0x2004, + 0x7036, 0x0030, 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x7036, + 0x60c3, 0x001c, 0x0804, 0xa270, 0x080c, 0x9ef8, 0x7003, 0x0500, + 0x080c, 0xb094, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, + 0x181f, 0x2004, 0x700a, 0x2001, 0x1820, 0x2004, 0x700e, 0x0030, + 0x2001, 0x1818, 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, + 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, + 0x4003, 0x60c3, 0x0010, 0x0804, 0xa270, 0x080c, 0x9ef8, 0x9006, + 0x080c, 0x6bdb, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2011, 0x0240, + 0x2013, 0x22ff, 0x2011, 0x0241, 0x2013, 0xfffe, 0x7003, 0x0400, + 0x620c, 0xc2b4, 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, + 0x9006, 0xa89a, 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, + 0x9086, 0x007e, 0x1904, 0x9dcf, 0x00d6, 0x2069, 0x196c, 0x2001, + 0x1837, 0x2004, 0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808, 0x9084, + 0x2000, 0x7012, 0x080c, 0xb0ab, 0x680c, 0x7016, 0x701f, 0x2710, + 0x6818, 0x7022, 0x681c, 0x7026, 0x0428, 0x6800, 0x700a, 0x6804, + 0x700e, 0x2009, 0x180d, 0x210c, 0xd18c, 0x0110, 0x2001, 0x0002, + 0x00f6, 0x2079, 0x0100, 0x080c, 0x779e, 0x1128, 0x78e3, 0x0000, + 0x080c, 0x2700, 0x78e2, 0x00fe, 0x6808, 0x080c, 0x779e, 0x1118, + 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, 0x7012, 0x080c, 0xb0ab, + 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, + 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, + 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x00d6, 0x080c, 0xaadc, + 0x2069, 0x1974, 0x2071, 0x024e, 0x6800, 0xc0dd, 0x7002, 0x080c, + 0x5844, 0xd0e4, 0x0110, 0x680c, 0x700e, 0x00de, 0x04e0, 0x2001, + 0x1837, 0x2004, 0xd0a4, 0x01a8, 0x0016, 0x2001, 0x180d, 0x2004, + 0xd08c, 0x2009, 0x0002, 0x1118, 0x2001, 0x196d, 0x200c, 0x60e0, + 0x9106, 0x0130, 0x2100, 0x60e3, 0x0000, 0x080c, 0x2700, 0x61e2, + 0x001e, 0x20e1, 0x0001, 0x2099, 0x196c, 0x20e9, 0x0000, 0x20a1, + 0x024e, 0x20a9, 0x0008, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1805, + 0x20a1, 0x0256, 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, + 0x025a, 0x4003, 0x080c, 0xaadc, 0x20a1, 0x024e, 0x20a9, 0x0008, + 0x2099, 0x1974, 0x4003, 0x60c3, 0x0074, 0x0804, 0xa270, 0x080c, + 0x9ef8, 0x7003, 0x2010, 0x7007, 0x0014, 0x700b, 0x0800, 0x700f, + 0x2000, 0x9006, 0x00f6, 0x2079, 0x1847, 0x7904, 0x00fe, 0xd1ac, + 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x9085, + 0x0002, 0x00d6, 0x0804, 0x9ea8, 0x7026, 0x60c3, 0x0014, 0x0804, + 0xa270, 0x080c, 0x9ef8, 0x7003, 0x5000, 0x0804, 0x9d67, 0x080c, + 0x9ef8, 0x7003, 0x2110, 0x7007, 0x0014, 0x60c3, 0x0014, 0x0804, + 0xa270, 0x080c, 0x9f3a, 0x0010, 0x080c, 0x9f43, 0x7003, 0x0200, + 0x60c3, 0x0004, 0x0804, 0xa270, 0x080c, 0x9f43, 0x7003, 0x0100, + 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa270, + 0x080c, 0x9f43, 0x7003, 0x0200, 0x0804, 0x9d67, 0x080c, 0x9f43, + 0x7003, 0x0100, 0x782c, 0x9005, 0x0110, 0x700a, 0x0010, 0x700b, + 0x0003, 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa270, 0x00d6, + 0x080c, 0x9f43, 0x7003, 0x0210, 0x7007, 0x0014, 0x700b, 0x0800, + 0xb894, 0x9086, 0x0014, 0x1198, 0xb99c, 0x9184, 0x0030, 0x0190, + 0xb998, 0x9184, 0xc000, 0x1140, 0xd1ec, 0x0118, 0x700f, 0x2100, + 0x0058, 0x700f, 0x0100, 0x0040, 0x700f, 0x0400, 0x0028, 0x700f, + 0x0700, 0x0010, 0x700f, 0x0800, 0x00f6, 0x2079, 0x1847, 0x7904, + 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, 0x0110, 0x9085, + 0x0010, 0x2009, 0x1869, 0x210c, 0xd184, 0x1110, 0x9085, 0x0002, + 0x0026, 0x2009, 0x1867, 0x210c, 0xd1e4, 0x0150, 0xc0c5, 0xbad4, + 0xd28c, 0x1108, 0xc0cd, 0x9094, 0x0030, 0x9296, 0x0010, 0x0140, + 0xd1ec, 0x0130, 0x9094, 0x0030, 0x9296, 0x0010, 0x0108, 0xc0bd, + 0x002e, 0x7026, 0x60c3, 0x0014, 0x00de, 0x0804, 0xa270, 0x080c, + 0x9f43, 0x7003, 0x0210, 0x7007, 0x0014, 0x700f, 0x0100, 0x60c3, + 0x0014, 0x0804, 0xa270, 0x080c, 0x9f43, 0x7003, 0x0200, 0x0804, + 0x9ce5, 0x080c, 0x9f43, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, + 0x2a00, 0x60c3, 0x0008, 0x0804, 0xa270, 0x080c, 0x9f43, 0x7003, + 0x0100, 0x700b, 0x000b, 0x60c3, 0x0008, 0x0804, 0xa270, 0x0026, + 0x00d6, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, 0x0040, + 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, + 0x080c, 0xaaf1, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, + 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x9485, 0x0029, 0x7012, + 0x004e, 0x003e, 0x00de, 0x080c, 0xa264, 0x721a, 0x9f95, 0x0000, + 0x7222, 0x7027, 0xffff, 0x2071, 0x024c, 0x002e, 0x0005, 0x0026, + 0x080c, 0xaaf1, 0x7003, 0x02ff, 0x7007, 0xfffc, 0x00d6, 0x2069, + 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x00de, 0x7013, 0x2029, + 0x0c10, 0x7003, 0x0100, 0x7007, 0x0000, 0x700b, 0xfc02, 0x700f, + 0x0000, 0x0005, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, 0x3300, + 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, + 0x2300, 0x2021, 0x0100, 0x080c, 0xaaf1, 0xb810, 0x9305, 0x7002, + 0xb814, 0x7006, 0x2069, 0x1800, 0xb810, 0x9005, 0x1140, 0xb814, + 0x9005, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0020, 0x687c, + 0x700a, 0x6880, 0x700e, 0x0000, 0x9485, 0x0098, 0x7012, 0x004e, + 0x003e, 0x00de, 0x080c, 0xa264, 0x721a, 0x7a08, 0x7222, 0x2f10, + 0x7226, 0x2071, 0x024c, 0x002e, 0x0005, 0x080c, 0xa264, 0x721a, + 0x7a08, 0x7222, 0x7814, 0x7026, 0x2071, 0x024c, 0x002e, 0x0005, + 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, 0x2071, + 0x0240, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d85, 0x908a, 0x0092, + 0x1a0c, 0x0d85, 0x6110, 0x2158, 0xb984, 0x2c78, 0x2061, 0x0100, + 0x619a, 0x9082, 0x0085, 0x0033, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x00be, 0x0005, 0x9fb1, 0x9fc0, 0x9fcb, 0x9faf, 0x9faf, 0x9faf, + 0x9fb1, 0x9faf, 0x9faf, 0x9faf, 0x9faf, 0x9faf, 0x9faf, 0x080c, + 0x0d85, 0x0411, 0x60c3, 0x0000, 0x0026, 0x080c, 0x2a04, 0x0228, + 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x0804, 0xa270, + 0x0431, 0x7808, 0x700a, 0x7814, 0x700e, 0x7017, 0xffff, 0x60c3, + 0x000c, 0x0804, 0xa270, 0x04a1, 0x7003, 0x0003, 0x7007, 0x0300, + 0x60c3, 0x0004, 0x0804, 0xa270, 0x0026, 0x080c, 0xaaf1, 0xb810, + 0x9085, 0x8100, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x687c, + 0x700a, 0x6880, 0x700e, 0x7013, 0x0009, 0x0804, 0x9f13, 0x0026, + 0x080c, 0xaaf1, 0xb810, 0x9085, 0x8400, 0x7002, 0xb814, 0x7006, + 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, 0x0099, + 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, 0x9f75, + 0x0026, 0x080c, 0xaaf1, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, + 0x7006, 0x2069, 0x1800, 0x687c, 0x700a, 0x6880, 0x700e, 0x2001, + 0x0099, 0x7a20, 0x9296, 0x0005, 0x0108, 0xc0bc, 0x7012, 0x0804, + 0x9f75, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2c78, 0x2069, + 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040, 0x0a0c, 0x0d85, + 0x908a, 0x0057, 0x1a0c, 0x0d85, 0x7910, 0x2158, 0xb984, 0x2061, + 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, 0x00ee, 0x00de, + 0x00ce, 0x00be, 0x0005, 0xa04e, 0xa04e, 0xa04e, 0xa07f, 0xa04e, + 0xa04e, 0xa04e, 0xa04e, 0xa04e, 0xa04e, 0xa04e, 0xa644, 0xa649, + 0xa64e, 0xa653, 0xa04e, 0xa04e, 0xa04e, 0xa63f, 0x080c, 0x0d85, + 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8d4, 0xd084, 0x0180, 0x2001, + 0x1b72, 0x200c, 0x8108, 0x2102, 0x2001, 0x1b71, 0x201c, 0x1218, + 0x8318, 0x2302, 0x0ea0, 0x7952, 0x712e, 0x7b4e, 0x732a, 0x9294, + 0x00ff, 0xba8e, 0x8217, 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, + 0xba14, 0x7206, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, 0x720e, + 0x7013, 0x0829, 0x2f10, 0x7222, 0x7027, 0xffff, 0x0005, 0x0016, + 0x7814, 0x9084, 0x0700, 0x8007, 0x0013, 0x001e, 0x0005, 0xa08f, + 0xa08f, 0xa091, 0xa08f, 0xa08f, 0xa08f, 0xa0ab, 0xa08f, 0x080c, + 0x0d85, 0x7914, 0x918c, 0x08ff, 0x918d, 0xf600, 0x7916, 0x2009, + 0x0003, 0x00b9, 0x2069, 0x1847, 0x6804, 0xd0bc, 0x0130, 0x682c, + 0x9084, 0x00ff, 0x8007, 0x7032, 0x0010, 0x7033, 0x3f00, 0x60c3, + 0x0001, 0x0804, 0xa270, 0x2009, 0x0003, 0x0019, 0x7033, 0x7f00, + 0x0cb0, 0x0016, 0x080c, 0xaaf1, 0x001e, 0xb810, 0x9085, 0x0100, + 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6a7c, 0x720a, 0x6a80, + 0x720e, 0x7013, 0x0888, 0x918d, 0x0008, 0x7116, 0x080c, 0xa264, + 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x0005, 0x00b6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0036, 0x2061, 0x0100, + 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, 0x76dc, 0x96b4, 0x0028, + 0x0110, 0x737c, 0x7480, 0x2500, 0x76dc, 0x96b4, 0x0028, 0x0140, + 0x2001, 0x04ff, 0x6062, 0x6067, 0xffff, 0x636a, 0x646e, 0x0050, + 0x2001, 0x00ff, 0x9085, 0x0400, 0x6062, 0x6067, 0xffff, 0x606b, + 0x0000, 0x616e, 0xb8b8, 0x6073, 0x0530, 0x6077, 0x0008, 0xb88c, + 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, + 0x607f, 0x0000, 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, + 0x2048, 0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, + 0x60ca, 0x009e, 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, + 0x60d7, 0x0000, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x0128, + 0x609f, 0x0000, 0x2001, 0x0092, 0x0058, 0x6028, 0xc0bd, 0x602a, + 0x609f, 0x00ff, 0x2011, 0xffff, 0x080c, 0x2ad3, 0x2001, 0x00b2, + 0x2010, 0x900e, 0x080c, 0x2ae2, 0x2009, 0x07d0, 0x080c, 0x8a50, + 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00be, + 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, + 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7160, 0x7810, 0x2058, + 0xb8a0, 0x2028, 0x76dc, 0xd6ac, 0x1168, 0x9582, 0x007e, 0x1250, + 0x2500, 0x9094, 0xff80, 0x1130, 0x9080, 0x348e, 0x2015, 0x9294, + 0x00ff, 0x0020, 0xb910, 0xba14, 0x737c, 0x7480, 0x70dc, 0xd0ac, + 0x1130, 0x9582, 0x007e, 0x1218, 0x9584, 0xff80, 0x0138, 0x9185, + 0x0400, 0x6062, 0x6266, 0x636a, 0x646e, 0x0030, 0x6063, 0x0400, + 0x6266, 0x606b, 0x0000, 0x616e, 0xb8b8, 0x6072, 0x6077, 0x0000, + 0xb864, 0xd0a4, 0x0110, 0x6077, 0x0008, 0xb88c, 0x8000, 0x9084, + 0x00ff, 0xb88e, 0x8007, 0x9085, 0x0020, 0x607a, 0x607f, 0x0000, + 0x2b00, 0x6082, 0x6087, 0xffff, 0x7814, 0x0096, 0x2048, 0xa848, + 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, 0x009e, + 0xb86c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xba84, 0x629e, 0x00f6, 0x2079, 0x0140, 0x7803, 0x0000, 0x00fe, + 0x900e, 0x2011, 0x0092, 0x080c, 0x2ae2, 0x2009, 0x07d0, 0x080c, + 0x8a50, 0x003e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, 0x00ee, + 0x00be, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, + 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, + 0xb8a0, 0x2028, 0xb910, 0xba14, 0x737c, 0x7480, 0x7820, 0x0002, + 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, + 0xa1ef, 0xa1ef, 0xa1f1, 0xa1ef, 0xa1ef, 0xa1ef, 0xa1ef, 0x080c, + 0x0d85, 0xb884, 0x609e, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x0558, + 0xaf90, 0x9784, 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, + 0x0006, 0x7814, 0x2048, 0xa878, 0xc0fc, 0x9005, 0x000e, 0x1160, + 0xaf94, 0x87ff, 0x0198, 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, + 0x6082, 0x2f00, 0x6086, 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, + 0x0129, 0x6077, 0x0000, 0xb884, 0x609e, 0x0050, 0x2039, 0x0029, + 0x9705, 0x6072, 0x0cc0, 0x9185, 0x0200, 0x6062, 0x6073, 0x2029, + 0xa87c, 0xd0fc, 0x0118, 0xaf94, 0x87ff, 0x1120, 0x2f00, 0x6082, + 0x7808, 0x6086, 0x6266, 0x636a, 0x646e, 0x6077, 0x0000, 0xb88c, + 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, + 0xa848, 0x608a, 0xa844, 0x608e, 0xa838, 0x60c6, 0xa834, 0x60ca, + 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x080c, 0xaad1, + 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, + 0x1b58, 0x080c, 0x8a50, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, + 0x00ee, 0x009e, 0x00be, 0x0005, 0x7a40, 0x9294, 0x00ff, 0x8217, + 0x0005, 0x00d6, 0x2069, 0x19e8, 0x686b, 0x0001, 0x00de, 0x0005, + 0x60a3, 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x8a42, 0x0005, + 0x0016, 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, + 0x0128, 0x0089, 0x080c, 0x8a42, 0x001e, 0x0005, 0xc1e5, 0x2001, + 0x180c, 0x2102, 0x2001, 0x19e9, 0x2003, 0x0000, 0x2001, 0x19f4, + 0x2003, 0x0000, 0x0c88, 0x0006, 0x0016, 0x0026, 0x2009, 0x1804, + 0x2011, 0x0009, 0x080c, 0x2ae2, 0x002e, 0x001e, 0x000e, 0x0005, + 0x0016, 0x00c6, 0x0006, 0x080c, 0xacfc, 0x0106, 0x2061, 0x0100, + 0x61a4, 0x60a7, 0x95f5, 0x0016, 0x0026, 0x2009, 0x1804, 0x2011, + 0x0008, 0x080c, 0x2ae2, 0x002e, 0x001e, 0x010e, 0x090c, 0xad18, + 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, 0x0005, + 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, 0x0140, + 0x080c, 0x779e, 0x1510, 0x2001, 0x1a0d, 0x2004, 0x9005, 0x1904, + 0xa31f, 0x080c, 0x7840, 0x11a8, 0x2069, 0x0380, 0x6843, 0x0101, + 0x6844, 0xd084, 0x1de8, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, + 0x6024, 0xd084, 0x090c, 0x0d85, 0x6843, 0x0100, 0x080c, 0x8a42, + 0x04b0, 0x00c6, 0x2061, 0x19e8, 0x00f0, 0x6904, 0x9194, 0x4000, + 0x0598, 0x080c, 0xa2a0, 0x080c, 0x2aa9, 0x00c6, 0x2061, 0x19e8, + 0x6134, 0x9192, 0x0008, 0x1278, 0x8108, 0x6136, 0x080c, 0xacfc, + 0x6130, 0x080c, 0xad18, 0x00ce, 0x81ff, 0x01c8, 0x080c, 0x8a42, + 0x080c, 0xa293, 0x00a0, 0x080c, 0xacfc, 0x6130, 0x91e5, 0x0000, + 0x0150, 0x080c, 0xeeee, 0x080c, 0x8a4b, 0x6003, 0x0001, 0x2009, + 0x0014, 0x080c, 0xb20a, 0x080c, 0xad18, 0x00ce, 0x0000, 0x002e, + 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x1a0d, 0x2004, 0x9005, + 0x1db0, 0x00c6, 0x2061, 0x19e8, 0x6134, 0x9192, 0x0003, 0x1ad8, + 0x8108, 0x6136, 0x00ce, 0x080c, 0x8a42, 0x080c, 0x6058, 0x2009, + 0x1846, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, 0x00c6, 0x00d6, + 0x00e6, 0x0016, 0x0026, 0x080c, 0x8a58, 0x080c, 0xacfc, 0x2001, + 0x0387, 0x2003, 0x0202, 0x2071, 0x19e8, 0x714c, 0x81ff, 0x0904, + 0xa3d9, 0x2061, 0x0100, 0x2069, 0x0140, 0x080c, 0x779e, 0x1518, + 0x0036, 0x2019, 0x0002, 0x080c, 0xa596, 0x003e, 0x080c, 0xeeee, + 0x704c, 0x9065, 0x0180, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009, + 0x1130, 0x6114, 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x6003, + 0x0003, 0x080c, 0xb20a, 0x2001, 0x0386, 0x2003, 0x5040, 0x080c, + 0x7840, 0x0804, 0xa3d9, 0x6904, 0xd1f4, 0x0904, 0xa3e6, 0x080c, + 0x2aa9, 0x00c6, 0x704c, 0x9065, 0x090c, 0x0d85, 0x6020, 0x00ce, + 0x9086, 0x0006, 0x1520, 0x61c8, 0x60c4, 0x9105, 0x1500, 0x714c, + 0x9188, 0x0011, 0x2104, 0xd0e4, 0x01d0, 0x6214, 0x9294, 0x1800, + 0x1128, 0x6224, 0x9294, 0x0002, 0x15e0, 0x0010, 0xc0e4, 0x200a, + 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, 0x704c, 0x2060, + 0x080c, 0x9a48, 0x2009, 0x0049, 0x080c, 0xb20a, 0x0450, 0x080c, + 0xeeee, 0x704c, 0x9065, 0x9086, 0x1b55, 0x1158, 0x080c, 0xafd2, + 0x1500, 0x2061, 0x1b55, 0x6064, 0x8000, 0x6066, 0x080c, 0x6058, + 0x00c0, 0x0036, 0x2019, 0x0001, 0x080c, 0xa596, 0x003e, 0x714c, + 0x2160, 0x2009, 0x004a, 0x6220, 0x9296, 0x0009, 0x1130, 0x6114, + 0x2148, 0xa87b, 0x0006, 0x2009, 0x004a, 0x6003, 0x0003, 0x080c, + 0xb20a, 0x2001, 0x0387, 0x2003, 0x0200, 0x080c, 0xad18, 0x002e, + 0x001e, 0x00ee, 0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, + 0xa37f, 0x0804, 0xa381, 0x0026, 0x00e6, 0x2071, 0x19e8, 0x706c, + 0xd084, 0x01e8, 0xc084, 0x706e, 0x714c, 0x81ff, 0x01c0, 0x2071, + 0x0100, 0x9188, 0x0008, 0x2114, 0x928e, 0x0006, 0x1138, 0x2009, + 0x1984, 0x2011, 0x0012, 0x080c, 0x2ae2, 0x0048, 0x928e, 0x0009, + 0x0db0, 0x2009, 0x1984, 0x2011, 0x0016, 0x080c, 0x2ae2, 0x00ee, + 0x002e, 0x0005, 0x9036, 0x2001, 0x19f2, 0x2004, 0x9005, 0x0128, + 0x9c06, 0x0128, 0x2c30, 0x600c, 0x0cc8, 0x9085, 0x0001, 0x0005, + 0x00f6, 0x2079, 0x19e8, 0x610c, 0x9006, 0x600e, 0x6044, 0xc0fc, + 0x6046, 0x86ff, 0x1140, 0x7824, 0x9c06, 0x1118, 0x7826, 0x782a, + 0x0050, 0x792a, 0x0040, 0x00c6, 0x2660, 0x610e, 0x00ce, 0x7824, + 0x9c06, 0x1108, 0x7e26, 0x080c, 0xa65d, 0x080c, 0xd10c, 0x00fe, + 0x0005, 0x080c, 0x9ef8, 0x7003, 0x1200, 0x7838, 0x7012, 0x783c, + 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, 0x7810, 0x9005, + 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, 0x0020, 0x2061, + 0x1800, 0x607c, 0x6180, 0x9084, 0x00ff, 0x700a, 0x710e, 0x00ce, + 0x60c3, 0x002c, 0x0804, 0xa270, 0x080c, 0x9ef8, 0x7003, 0x0f00, + 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, 0x700a, 0xb814, + 0x700e, 0x60c3, 0x0008, 0x0804, 0xa270, 0x0156, 0x080c, 0x9f43, + 0x7003, 0x0200, 0x080c, 0x8b10, 0x20a9, 0x0006, 0x2011, 0xffec, + 0x2019, 0xffed, 0x9ef0, 0x0002, 0x2305, 0x2072, 0x8e70, 0x2205, + 0x2072, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xa484, + 0x60c3, 0x001c, 0x015e, 0x0804, 0xa270, 0x0016, 0x0026, 0x080c, + 0x9f1f, 0x080c, 0x9f31, 0x9e80, 0x0004, 0x20e9, 0x0000, 0x20a0, + 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, 0xa85c, + 0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, 0x21a8, + 0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004, 0x8003, 0x60c2, + 0x080c, 0xa270, 0x002e, 0x001e, 0x0005, 0x20a9, 0x0010, 0x4003, + 0x080c, 0xaadc, 0x20a1, 0x0240, 0x22a8, 0x4003, 0x0c68, 0x080c, + 0x9ef8, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, 0x0008, 0x0804, + 0xa270, 0x0016, 0x0026, 0x080c, 0x9ef8, 0x20e9, 0x0000, 0x20a1, + 0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, 0x20e0, + 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808, 0x9088, 0x0002, + 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0xa270, 0x002e, 0x001e, + 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0x19e8, 0x7010, 0x2060, 0x8cff, 0x0188, 0x080c, 0xd132, 0x1110, + 0x080c, 0xbb5c, 0x600c, 0x0006, 0x080c, 0xd3ae, 0x600f, 0x0000, + 0x080c, 0xb16c, 0x080c, 0xa65d, 0x00ce, 0x0c68, 0x2c00, 0x7012, + 0x700e, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, + 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, + 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19e8, 0x7030, 0x2060, + 0x8cff, 0x0548, 0x080c, 0xa2a0, 0x6ac0, 0x68c3, 0x0000, 0x080c, + 0x8a4b, 0x00c6, 0x2061, 0x0100, 0x080c, 0xac2d, 0x00ce, 0x20a9, + 0x01f4, 0x04b1, 0x080c, 0x99ed, 0x6044, 0xd0ac, 0x1128, 0x2001, + 0x1988, 0x2004, 0x604a, 0x0020, 0x2009, 0x0013, 0x080c, 0xb20a, + 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, + 0x015e, 0x012e, 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001, + 0x0d78, 0x9096, 0x0004, 0x0d60, 0x080c, 0x8a4b, 0x6814, 0x9084, + 0x0001, 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, + 0x2011, 0x6002, 0x080c, 0x8993, 0x20a9, 0x01f4, 0x0009, 0x08c0, + 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, + 0x190c, 0x2aa9, 0x0090, 0xd084, 0x0118, 0x6827, 0x4001, 0x0010, + 0x1f04, 0xa578, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, + 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, 0x0005, 0x0126, 0x0156, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, + 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, + 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x0380, 0x701c, 0x0006, + 0x701f, 0x0202, 0x2071, 0x19e8, 0x704c, 0x2060, 0x8cff, 0x0904, + 0xa619, 0x080c, 0xaf84, 0x0904, 0xa619, 0x9386, 0x0002, 0x1128, + 0x6814, 0x9084, 0x0002, 0x0904, 0xa619, 0x68af, 0x95f5, 0x6817, + 0x0010, 0x2009, 0x00fa, 0x8109, 0x1df0, 0x69c6, 0x68cb, 0x0008, + 0x080c, 0x8a58, 0x080c, 0x1e44, 0x2001, 0x0032, 0x6920, 0xd1bc, + 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e, 0x0016, + 0x2009, 0x0040, 0x080c, 0x2220, 0x001e, 0x20a9, 0x03e8, 0x6824, + 0xd094, 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, + 0x2aa9, 0x0090, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, 0x1f04, + 0xa5e7, 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, + 0x2a99, 0x9006, 0x080c, 0x2a99, 0x6827, 0x4000, 0x6824, 0x83ff, + 0x1180, 0x2009, 0x0049, 0x6020, 0x9086, 0x0009, 0x0150, 0x080c, + 0x9a48, 0x6044, 0xd0ac, 0x1118, 0x6003, 0x0002, 0x0010, 0x080c, + 0xb20a, 0x000e, 0x2071, 0x0380, 0xd08c, 0x1110, 0x701f, 0x0200, + 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, + 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x2069, + 0x19e8, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, 0x2091, + 0x8000, 0x2069, 0x19e8, 0x6a3e, 0x012e, 0x00de, 0x0005, 0x080c, + 0xa050, 0x7047, 0x1000, 0x0098, 0x080c, 0xa050, 0x7047, 0x4000, + 0x0070, 0x080c, 0xa050, 0x7047, 0x2000, 0x0048, 0x080c, 0xa050, + 0x7047, 0x0400, 0x0020, 0x080c, 0xa050, 0x7047, 0x0200, 0x785c, + 0x7032, 0x60c3, 0x0020, 0x0804, 0xa270, 0x00e6, 0x2071, 0x19e8, + 0x702c, 0x9005, 0x0110, 0x8001, 0x702e, 0x00ee, 0x0005, 0x00f6, + 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0x19e8, 0x7620, 0x2660, 0x2678, 0x2039, 0x0001, + 0x87ff, 0x0904, 0xa702, 0x8cff, 0x0904, 0xa702, 0x6020, 0x9086, + 0x0006, 0x1904, 0xa6fd, 0x88ff, 0x0138, 0x2800, 0x9c06, 0x1904, + 0xa6fd, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, 0x1904, 0xa6fd, + 0x85ff, 0x0120, 0x605c, 0x9106, 0x1904, 0xa6fd, 0x7030, 0x9c06, + 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, 0x6824, 0xd084, + 0x0148, 0x6827, 0x0001, 0x080c, 0x8a4b, 0x080c, 0xa78a, 0x7033, + 0x0000, 0x0428, 0x080c, 0x8a4b, 0x6820, 0xd0b4, 0x0110, 0x68a7, + 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0xa78a, 0x7033, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, + 0x2001, 0x0100, 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, + 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7020, + 0x9c36, 0x1110, 0x660c, 0x7622, 0x701c, 0x9c36, 0x1140, 0x2c00, + 0x9f36, 0x0118, 0x2f00, 0x701e, 0x0010, 0x701f, 0x0000, 0x660c, + 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, + 0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, 0x080c, 0xcf19, + 0x0110, 0x080c, 0xea30, 0x009e, 0x080c, 0xb1a7, 0x080c, 0xa65d, + 0x88ff, 0x1190, 0x00ce, 0x0804, 0xa678, 0x2c78, 0x600c, 0x2060, + 0x0804, 0xa678, 0x9006, 0x012e, 0x000e, 0x006e, 0x007e, 0x00ce, + 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x98c5, + 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, 0x00c6, 0x0066, + 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, 0x7648, + 0x2660, 0x2678, 0x8cff, 0x0904, 0xa779, 0x6020, 0x9086, 0x0006, + 0x1904, 0xa774, 0x87ff, 0x0128, 0x2700, 0x9c06, 0x1904, 0xa774, + 0x0048, 0x6010, 0x9b06, 0x1904, 0xa774, 0x85ff, 0x0118, 0x605c, + 0x9106, 0x15d0, 0x704c, 0x9c06, 0x1178, 0x0036, 0x2019, 0x0001, + 0x080c, 0xa596, 0x703f, 0x0000, 0x9006, 0x704e, 0x706a, 0x7052, + 0x706e, 0x080c, 0xaff4, 0x003e, 0x7048, 0x9c36, 0x1110, 0x660c, + 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, + 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, + 0x080c, 0xcf19, 0x0110, 0x080c, 0xea30, 0x080c, 0xb1a7, 0x87ff, + 0x1198, 0x00ce, 0x0804, 0xa722, 0x2c78, 0x600c, 0x2060, 0x0804, + 0xa722, 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, + 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, + 0x0001, 0x0c80, 0x00e6, 0x2071, 0x19e8, 0x9006, 0x7032, 0x700a, + 0x7004, 0x9086, 0x0003, 0x0158, 0x2001, 0x1800, 0x2004, 0x9086, + 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0x19e8, 0x2c10, 0x7648, 0x2660, 0x2678, + 0x8cff, 0x0540, 0x2200, 0x9c06, 0x1508, 0x7048, 0x9c36, 0x1110, + 0x660c, 0x764a, 0x7044, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, + 0x2f00, 0x7046, 0x0010, 0x7047, 0x0000, 0x660c, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6004, 0x9086, + 0x0040, 0x090c, 0x99ed, 0x9085, 0x0001, 0x0020, 0x2c78, 0x600c, + 0x2060, 0x08b0, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, + 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, + 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19e8, 0x7610, + 0x2660, 0x2678, 0x8cff, 0x0904, 0xa877, 0x6010, 0x00b6, 0x2058, + 0xb8a0, 0x00be, 0x9206, 0x1904, 0xa872, 0x7030, 0x9c06, 0x1520, + 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xa849, 0x080c, 0xa2a0, + 0x68c3, 0x0000, 0x080c, 0xa78a, 0x7033, 0x0000, 0x0036, 0x2069, + 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, + 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, 0x1110, 0x660c, + 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, + 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xd121, + 0x1180, 0x080c, 0x3344, 0x080c, 0xd132, 0x1518, 0x080c, 0xbb5c, + 0x0400, 0x080c, 0xa78a, 0x6824, 0xd084, 0x09b0, 0x6827, 0x0001, + 0x0898, 0x080c, 0xd132, 0x1118, 0x080c, 0xbb5c, 0x0090, 0x6014, + 0x2048, 0x080c, 0xcf19, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x7006, 0x080c, + 0xd10c, 0x080c, 0xd3ae, 0x080c, 0xb1a7, 0x080c, 0xa65d, 0x00ce, + 0x0804, 0xa7f2, 0x2c78, 0x600c, 0x2060, 0x0804, 0xa7f2, 0x012e, + 0x000e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, + 0x0005, 0x6020, 0x9086, 0x0006, 0x1d20, 0x080c, 0xea30, 0x0c08, + 0x00d6, 0x080c, 0x9f43, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, + 0x0014, 0x20e1, 0x0001, 0x2099, 0x1989, 0x20e9, 0x0000, 0x20a1, + 0x0250, 0x20a9, 0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878, + 0x080c, 0xa270, 0x00de, 0x0005, 0x080c, 0x9f43, 0x700b, 0x0800, + 0x7814, 0x9084, 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, + 0x782c, 0x7026, 0x7860, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, + 0x7860, 0x9084, 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0xa270, + 0x00b6, 0x00d6, 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, + 0xd5bb, 0x00de, 0x1904, 0xa925, 0x080c, 0x9ef8, 0x7003, 0x1300, + 0x782c, 0x080c, 0xaa34, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560, + 0x7810, 0x2058, 0xbaa0, 0x080c, 0xb094, 0x11d8, 0x9286, 0x007e, + 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, + 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, + 0x0180, 0x9286, 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, + 0x0400, 0x92d8, 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, + 0x00c0, 0xb884, 0x700e, 0x00a8, 0x080c, 0xb094, 0x1130, 0x7810, + 0x2058, 0xb8a0, 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181f, + 0x2d04, 0x700a, 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, + 0x700e, 0x7838, 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, + 0x00de, 0x080c, 0xa270, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803, + 0x0006, 0x001e, 0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008, + 0x200c, 0x9186, 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0xa9a4, + 0x9186, 0x0005, 0x0904, 0xa98c, 0x9186, 0x0004, 0x05f0, 0x9186, + 0x0008, 0x0904, 0xa995, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817, + 0x1700, 0x080c, 0xaa11, 0x0005, 0x080c, 0xa9d2, 0x00d6, 0x0026, + 0x792c, 0x2168, 0x2009, 0x4000, 0x6800, 0x6a44, 0xd2fc, 0x11f8, + 0x0002, 0xa96c, 0xa977, 0xa96e, 0xa977, 0xa973, 0xa96c, 0xa96c, + 0xa977, 0xa977, 0xa977, 0xa977, 0xa96c, 0xa96c, 0xa96c, 0xa96c, + 0xa96c, 0xa977, 0xa96c, 0xa977, 0x080c, 0x0d85, 0x6824, 0xd0e4, + 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, 0x2009, 0x2000, 0x682c, + 0x7022, 0x6830, 0x7026, 0x0804, 0xa9cb, 0x080c, 0xa9d2, 0x00d6, + 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x6a00, 0x9286, 0x0002, + 0x1108, 0x900e, 0x0804, 0xa9cb, 0x080c, 0xa9d2, 0x00d6, 0x0026, + 0x792c, 0x2168, 0x2009, 0x4000, 0x04b0, 0x04e1, 0x00d6, 0x0026, + 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, 0x9286, + 0x0002, 0x1108, 0x900e, 0x0438, 0x0469, 0x00d6, 0x0026, 0x792c, + 0x2168, 0x6814, 0x6924, 0xc185, 0x6926, 0x0096, 0x2048, 0xa9ac, + 0xa834, 0x9112, 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, + 0x792c, 0x9180, 0x0011, 0x2004, 0xd0fc, 0x1148, 0x9180, 0x0000, + 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, 0x2009, + 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, 0x00de, + 0x0804, 0xa270, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, 0x080c, + 0x9f43, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, 0x710e, + 0x7810, 0x2058, 0xb8a0, 0x080c, 0xb094, 0x1118, 0x9092, 0x007e, + 0x0268, 0x00d6, 0x2069, 0x181f, 0x2d2c, 0x8d68, 0x2d34, 0x90d8, + 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, 0xbc84, + 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, 0x9086, + 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, 0x7312, + 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, 0x00be, + 0x0005, 0x080c, 0x9f43, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, + 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0xa270, 0x080c, 0x9eef, + 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, 0x782c, + 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, 0x701a, + 0x60c3, 0x0010, 0x0804, 0xa270, 0x00e6, 0x2071, 0x0240, 0x0006, + 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8d4, 0xd084, 0x0120, + 0x784c, 0x702a, 0x7850, 0x702e, 0x00be, 0x00fe, 0x000e, 0x00ee, + 0x0005, 0x080c, 0x9f3a, 0x7003, 0x0100, 0x782c, 0x700a, 0x7814, + 0x700e, 0x60c3, 0x0008, 0x0804, 0xa270, 0x00a9, 0x7914, 0x712a, + 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, 0x2a04, 0x0228, + 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, 0x080c, 0xa293, + 0x080c, 0x8a42, 0x0005, 0x0036, 0x0096, 0x00d6, 0x00e6, 0x7860, + 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0x00fd, 0xaa7e, 0xaa80, + 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, 0xab74, 0x9384, + 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, 0x9215, 0xaa76, + 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, 0x0200, 0x080c, + 0xaaf1, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000a, + 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, 0x4003, 0x60a3, + 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, 0x0110, 0x60a3, + 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, 0x900e, 0x7814, + 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, 0x0003, 0x11a8, + 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, 0xd0cc, 0x1168, + 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, 0x180c, 0x200c, + 0xc1d5, 0x2102, 0x2009, 0x19b3, 0x210c, 0x009e, 0x918d, 0x0092, + 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x0026, 0x2110, 0x900e, + 0x080c, 0x2ae2, 0x002e, 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, + 0x000a, 0x0088, 0x2009, 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, + 0x2009, 0x000d, 0x0040, 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, + 0x0010, 0x2009, 0x0008, 0x6912, 0x0005, 0x080c, 0x9ef8, 0x0016, + 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, 0x0138, 0x2001, + 0x1837, 0x2004, 0x9084, 0x0028, 0x1138, 0x2001, 0x197c, 0x2004, + 0x9086, 0xaaaa, 0x1904, 0xab96, 0x7003, 0x5400, 0x00c6, 0x2061, + 0x1800, 0x607c, 0x9084, 0x00ff, 0xa998, 0x810f, 0x918c, 0xff00, + 0x9105, 0x700a, 0x6080, 0x700e, 0xa998, 0x918c, 0xff00, 0x7112, + 0x20a9, 0x0004, 0x2009, 0x1805, 0x2e10, 0x9290, 0x0006, 0x2104, + 0x2012, 0x8108, 0x8210, 0x1f04, 0xab27, 0x20a9, 0x0004, 0x2009, + 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xab31, 0xa860, + 0x20e0, 0xa85c, 0x9080, 0x0029, 0x2098, 0x2009, 0x0006, 0x20a9, + 0x0001, 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0x00d6, + 0x2069, 0x0200, 0x080c, 0xaadc, 0x00de, 0x2071, 0x0240, 0x2011, + 0x0240, 0x2009, 0x0002, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, + 0x8210, 0x8109, 0x1dc0, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, + 0x8007, 0x2012, 0x8210, 0x8109, 0x1dc0, 0xa85c, 0x9080, 0x0031, + 0x2098, 0x2009, 0x0008, 0x20a9, 0x0001, 0x4002, 0x8007, 0x2012, + 0x8210, 0x8109, 0x1dc0, 0x00ce, 0x60c3, 0x004c, 0x60a3, 0x0056, + 0x60a7, 0x9575, 0x2001, 0x1837, 0x2004, 0x9084, 0x0028, 0x1168, + 0x080c, 0x779e, 0x0150, 0x6028, 0xc0bd, 0x602a, 0x2009, 0x1804, + 0x2011, 0x0029, 0x080c, 0x2ae2, 0x0010, 0x080c, 0xa270, 0x080c, + 0x8a42, 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00e6, 0x2071, + 0x0240, 0x2001, 0x2200, 0x9085, 0x00ff, 0x7002, 0x7007, 0xffff, + 0x2071, 0x0100, 0x709b, 0x00ff, 0x00ee, 0x0804, 0xab0c, 0x080c, + 0x9ef8, 0x0016, 0x0026, 0x0096, 0x00d6, 0x7814, 0x2048, 0x7013, + 0x0138, 0x7003, 0x5500, 0x00c6, 0xa89c, 0x9084, 0x00ff, 0xa998, + 0x810f, 0x918c, 0xff00, 0x9105, 0x700a, 0xa99c, 0x918c, 0xff00, + 0xa8a0, 0x9084, 0x00ff, 0x9105, 0x700e, 0xa998, 0x918c, 0xff00, + 0x2061, 0x1800, 0x607c, 0x9084, 0x00ff, 0x910d, 0x7112, 0x6180, + 0x7116, 0x2009, 0x0008, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0029, + 0x2098, 0x2e10, 0x9290, 0x0006, 0x20a9, 0x0001, 0x4002, 0x8007, + 0x2012, 0x8210, 0x8109, 0x1dc0, 0x20a9, 0x0004, 0x2009, 0x1805, + 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xabe8, 0x20a9, 0x0002, + 0x2009, 0x1801, 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xabf2, + 0x00d6, 0x0016, 0x2069, 0x0200, 0x080c, 0xaadc, 0x001e, 0x00de, + 0x2071, 0x0240, 0x20a9, 0x0002, 0x2009, 0x1803, 0x2011, 0x0240, + 0x2104, 0x2012, 0x8108, 0x8210, 0x1f04, 0xac08, 0x2009, 0x0008, + 0x4002, 0x8007, 0x2012, 0x8210, 0x8109, 0x1dd0, 0x9006, 0x20a9, + 0x0008, 0x2012, 0x8210, 0x1f04, 0xac19, 0x00ce, 0x60c3, 0x004c, + 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0xa270, 0x080c, 0x8a42, + 0x00de, 0x009e, 0x002e, 0x001e, 0x0005, 0x00d6, 0x9290, 0x0018, + 0x8214, 0x20e9, 0x0000, 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, + 0x9284, 0x00e0, 0x0128, 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, + 0x9016, 0x20a1, 0x0240, 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, + 0x8000, 0x6812, 0x0c60, 0x00de, 0x0005, 0x00f6, 0x00e6, 0x00d6, + 0x00c6, 0x00a6, 0x0096, 0x0066, 0x0126, 0x2091, 0x8000, 0x2071, + 0x19e8, 0x7610, 0x2660, 0x2678, 0x8cff, 0x0904, 0xacd9, 0x7030, + 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0xacab, + 0x080c, 0xa2a0, 0x68c3, 0x0000, 0x080c, 0xa78a, 0x7033, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7010, 0x9c36, + 0x1110, 0x660c, 0x7612, 0x700c, 0x9c36, 0x1140, 0x2c00, 0x9f36, + 0x0118, 0x2f00, 0x700e, 0x0010, 0x700f, 0x0000, 0x660c, 0x0066, + 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, + 0x080c, 0xd121, 0x1180, 0x080c, 0x3344, 0x080c, 0xd132, 0x1518, + 0x080c, 0xbb5c, 0x0400, 0x080c, 0xa78a, 0x6824, 0xd084, 0x09b0, + 0x6827, 0x0001, 0x0898, 0x080c, 0xd132, 0x1118, 0x080c, 0xbb5c, + 0x0090, 0x6014, 0x2048, 0x080c, 0xcf19, 0x0168, 0x6020, 0x9086, + 0x0003, 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, + 0x7012, 0x080c, 0xd10c, 0x080c, 0xd3ae, 0x080c, 0xb1a7, 0x080c, + 0xa65d, 0x00ce, 0x0804, 0xac5c, 0x2c78, 0x600c, 0x2060, 0x0804, + 0xac5c, 0x7013, 0x0000, 0x700f, 0x0000, 0x012e, 0x006e, 0x009e, + 0x00ae, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, + 0x0006, 0x1d08, 0x080c, 0xea30, 0x08f0, 0x00f6, 0x0036, 0x2079, + 0x0380, 0x7b18, 0xd3bc, 0x1de8, 0x7832, 0x7936, 0x7a3a, 0x781b, + 0x8080, 0x003e, 0x00fe, 0x0005, 0x0016, 0x2001, 0x0382, 0x2004, + 0x9084, 0x0007, 0x9086, 0x0001, 0x1188, 0x2001, 0x0015, 0x0c29, + 0x2009, 0x1000, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, + 0x0003, 0x0120, 0x8109, 0x1db0, 0x080c, 0x0d85, 0x001e, 0x0005, + 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, 0x0003, 0x1120, + 0x2001, 0x0380, 0x2003, 0x0001, 0x0005, 0x0156, 0x0016, 0x0026, + 0x00e6, 0x900e, 0x2071, 0x19e8, 0x0469, 0x0106, 0x0190, 0x7004, + 0x9086, 0x0003, 0x0148, 0x20a9, 0x1000, 0x6044, 0xd0fc, 0x01d8, + 0x1f04, 0xad35, 0x080c, 0x0d85, 0x080c, 0xacfc, 0x6044, 0xd0fc, + 0x0190, 0x7030, 0x9c06, 0x1148, 0x080c, 0x99ed, 0x6044, 0xd0dc, + 0x0150, 0xc0dc, 0x6046, 0x700a, 0x7042, 0x704c, 0x9c06, 0x190c, + 0x0d85, 0x080c, 0x9a48, 0x010e, 0x1919, 0x00ee, 0x002e, 0x001e, + 0x015e, 0x0005, 0x2001, 0x0382, 0x2004, 0x9084, 0x0007, 0x9086, + 0x0003, 0x0005, 0x0126, 0x2091, 0x2400, 0x7808, 0xd0a4, 0x190c, + 0x0d7e, 0xd09c, 0x0128, 0x7820, 0x908c, 0xf000, 0x11b8, 0x0012, + 0x012e, 0x0005, 0xad82, 0xadc0, 0xadef, 0xae37, 0xae47, 0xae58, + 0xae67, 0xae75, 0xaea2, 0xaea6, 0xad82, 0xad82, 0xaea9, 0xaec5, + 0xad82, 0xad82, 0x080c, 0x0d85, 0x012e, 0x0005, 0x2060, 0x6044, + 0xd0bc, 0x0140, 0xc0bc, 0x6046, 0x6000, 0x908a, 0x0010, 0x1a0c, + 0x0d85, 0x0012, 0x012e, 0x0005, 0xada7, 0xada9, 0xada7, 0xadaf, + 0xada7, 0xada7, 0xada7, 0xada7, 0xada7, 0xada9, 0xada7, 0xada9, + 0xada7, 0xada9, 0xada7, 0xada7, 0xada7, 0xada9, 0xada7, 0x080c, + 0x0d85, 0x2009, 0x0013, 0x080c, 0xb20a, 0x012e, 0x0005, 0x6014, + 0x2048, 0xa87c, 0xd0dc, 0x0130, 0x080c, 0x8c19, 0x080c, 0xb16c, + 0x012e, 0x0005, 0x2009, 0x0049, 0x080c, 0xb20a, 0x012e, 0x0005, + 0x080c, 0xacfc, 0x2001, 0x1a0d, 0x2003, 0x0000, 0x7030, 0x9065, + 0x1130, 0x7004, 0x9086, 0x0003, 0x01e0, 0x080c, 0x0d85, 0x7034, + 0x9092, 0xc350, 0x1258, 0x8000, 0x7036, 0x7004, 0x9086, 0x0003, + 0x0110, 0x7007, 0x0000, 0x781f, 0x0808, 0x0058, 0x080c, 0xb0c0, + 0x0140, 0x080c, 0xeeee, 0x6003, 0x0001, 0x2009, 0x0014, 0x080c, + 0xb20a, 0x781f, 0x0100, 0x080c, 0xad18, 0x012e, 0x0005, 0x080c, + 0xacfc, 0x714c, 0x81ff, 0x1128, 0x2011, 0x1a10, 0x2013, 0x0000, + 0x04c0, 0x2061, 0x0100, 0x7150, 0x9192, 0x7530, 0x1678, 0x8108, + 0x7152, 0x714c, 0x9186, 0x1b55, 0x0120, 0x2001, 0x0391, 0x2003, + 0x0400, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1160, 0x6014, + 0x9084, 0x1984, 0x9085, 0x0012, 0x714c, 0x918e, 0x1b55, 0x1108, + 0xc0fd, 0x6016, 0x00b0, 0x714c, 0x9188, 0x0008, 0x210c, 0x918e, + 0x0009, 0x0d68, 0x6014, 0x9084, 0x1984, 0x9085, 0x0016, 0x714c, + 0x918e, 0x1b55, 0x1108, 0xc0fd, 0x6016, 0x0018, 0x706c, 0xc085, + 0x706e, 0x781f, 0x0200, 0x080c, 0xad18, 0x012e, 0x0005, 0x080c, + 0xacfc, 0x714c, 0x2160, 0x6003, 0x0003, 0x2009, 0x004a, 0x080c, + 0xb20a, 0x781f, 0x0200, 0x080c, 0xad18, 0x012e, 0x0005, 0x7808, + 0xd09c, 0x0de8, 0x7820, 0x2060, 0x6003, 0x0003, 0x080c, 0xacfc, + 0x080c, 0x1dcc, 0x781f, 0x0400, 0x080c, 0xad18, 0x012e, 0x0005, + 0x7808, 0xd09c, 0x0de8, 0x7820, 0x2060, 0x080c, 0xacfc, 0x080c, + 0x1e14, 0x781f, 0x0400, 0x080c, 0xad18, 0x012e, 0x0005, 0x7030, + 0x9065, 0x0148, 0x6044, 0xc0bc, 0x6046, 0x7104, 0x9186, 0x0003, + 0x0110, 0x080c, 0x9ab4, 0x012e, 0x0005, 0x00f6, 0x703c, 0x9086, + 0x0002, 0x0528, 0x704c, 0x907d, 0x0510, 0x7844, 0xc0bc, 0x7846, + 0x7820, 0x9086, 0x0009, 0x0118, 0x080c, 0xa1ca, 0x00c0, 0x7828, + 0xd0fc, 0x1118, 0x080c, 0xa149, 0x0090, 0x2001, 0x1837, 0x2004, + 0x9084, 0x0028, 0x1130, 0x2001, 0x197c, 0x2004, 0x9086, 0xaaaa, + 0x1120, 0x2001, 0x0387, 0x2003, 0x1000, 0x080c, 0xa0ce, 0x00fe, + 0x012e, 0x0005, 0x080c, 0x7840, 0x012e, 0x0005, 0x080c, 0x0d85, + 0x0005, 0x2009, 0x1b66, 0x2104, 0xd0bc, 0x01a8, 0xc0bc, 0x200a, + 0x2009, 0x010b, 0x2104, 0x9085, 0x0002, 0x200a, 0x2009, 0x0101, + 0x2104, 0xc0ac, 0x200a, 0x2009, 0x0105, 0x2104, 0x9084, 0x1984, + 0x9085, 0x8092, 0x200a, 0x012e, 0x0005, 0x080c, 0x8a58, 0x2009, + 0x010b, 0x2104, 0xd08c, 0x01a8, 0xc08c, 0x200a, 0x2001, 0x1848, + 0x2004, 0xd094, 0x1130, 0x2009, 0x0101, 0x2104, 0x9085, 0x0020, + 0x200a, 0x2009, 0x1b66, 0x200b, 0x0000, 0x2001, 0x001b, 0x080c, + 0xaced, 0x012e, 0x0005, 0x00e6, 0x2071, 0x19e8, 0x6044, 0xc0bc, + 0x6046, 0xd0fc, 0x01b8, 0x704c, 0x9c06, 0x1190, 0x2019, 0x0001, + 0x080c, 0xa596, 0x704f, 0x0000, 0x2001, 0x0109, 0x2004, 0xd08c, + 0x1138, 0x2001, 0x0108, 0x2004, 0xd0bc, 0x1110, 0x703f, 0x0000, + 0x080c, 0xa7a1, 0x00ee, 0x0005, 0x0026, 0x7010, 0x9c06, 0x1178, + 0x080c, 0xa65d, 0x6044, 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, + 0x7212, 0x600f, 0x0000, 0x0010, 0x7212, 0x720e, 0x9006, 0x002e, + 0x0005, 0x0026, 0x7020, 0x9c06, 0x1178, 0x080c, 0xa65d, 0x6044, + 0xc0fc, 0x6046, 0x600c, 0x9015, 0x0120, 0x7222, 0x600f, 0x0000, + 0x0010, 0x7222, 0x721e, 0x9006, 0x002e, 0x0005, 0x00d6, 0x0036, + 0x7830, 0x9c06, 0x1558, 0x2069, 0x0100, 0x68c0, 0x9005, 0x01f8, + 0x080c, 0x8a4b, 0x080c, 0xa2a0, 0x68c3, 0x0000, 0x080c, 0xa78a, + 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, + 0x080c, 0x2a99, 0x9006, 0x080c, 0x2a99, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x9085, 0x0001, 0x0038, 0x7808, + 0xc0ad, 0x780a, 0x6003, 0x0009, 0x630a, 0x9006, 0x003e, 0x00de, + 0x0005, 0x0016, 0x0026, 0x0036, 0x6100, 0x2019, 0x0100, 0x2001, + 0x0382, 0x2004, 0xd09c, 0x0190, 0x00c6, 0x0126, 0x2091, 0x2800, + 0x0016, 0x0036, 0x080c, 0xad62, 0x003e, 0x001e, 0x012e, 0x00ce, + 0x6200, 0x2200, 0x9106, 0x0d58, 0x2200, 0x0010, 0x8319, 0x1d38, + 0x003e, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x080c, + 0xacfc, 0x0106, 0x2071, 0x19e8, 0x2069, 0x0100, 0x704c, 0x2060, + 0x9086, 0x1b55, 0x15b8, 0x6814, 0xd08c, 0x0188, 0x6817, 0x0010, + 0x2009, 0x0019, 0x8109, 0x1df0, 0x2001, 0x0032, 0x6920, 0xd1bc, + 0x0130, 0x8001, 0x1dd8, 0x692c, 0x918d, 0x0008, 0x692e, 0x6824, + 0xd08c, 0x0110, 0x6827, 0x0002, 0x68d0, 0x9005, 0x0118, 0x9082, + 0x0005, 0x0238, 0x6060, 0x8000, 0x6062, 0x2001, 0x0391, 0x2003, + 0x0400, 0x080c, 0x9a48, 0x682c, 0x9084, 0xfffd, 0x682e, 0x2001, + 0x1848, 0x2004, 0xd094, 0x1120, 0x6804, 0x9085, 0x0020, 0x6806, + 0x2069, 0x0000, 0x010e, 0x090c, 0xad18, 0x8dff, 0x00ce, 0x00de, + 0x00ee, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0xacfc, 0x0106, + 0x2071, 0x19e8, 0x2069, 0x0100, 0x080c, 0xaf84, 0x68d0, 0x9005, + 0x0158, 0x9082, 0x0005, 0x1240, 0x080c, 0x2b33, 0x2001, 0x0391, + 0x2003, 0x0400, 0x2069, 0x0000, 0x010e, 0x090c, 0xad18, 0x8dff, + 0x00ce, 0x00de, 0x00ee, 0x0005, 0x0016, 0x2001, 0x0134, 0x2004, + 0x9005, 0x0140, 0x9082, 0x0005, 0x1228, 0x2001, 0x0391, 0x2003, + 0x0404, 0x0020, 0x2001, 0x0391, 0x2003, 0x0400, 0x001e, 0x0005, + 0x00d6, 0x0156, 0x080c, 0x9f43, 0x7a14, 0x82ff, 0x0138, 0x7003, + 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0490, 0x7003, 0x0200, + 0x7007, 0x0000, 0x2069, 0x1800, 0x901e, 0x6800, 0x9086, 0x0004, + 0x1110, 0xc38d, 0x0060, 0x080c, 0x779e, 0x1110, 0xc3ad, 0x0008, + 0xc3a5, 0x6adc, 0xd29c, 0x1110, 0xd2ac, 0x0108, 0xc39d, 0x730e, + 0x080c, 0x8b10, 0x20a9, 0x0006, 0x2011, 0xffec, 0x2019, 0xffed, + 0x2071, 0x0250, 0x2305, 0x2072, 0x8e70, 0x2205, 0x2072, 0x8e70, + 0x9398, 0x0002, 0x9290, 0x0002, 0x1f04, 0xb03a, 0x60c3, 0x0020, + 0x080c, 0xa270, 0x015e, 0x00de, 0x0005, 0x0156, 0x080c, 0x9f43, + 0x7a14, 0x82ff, 0x0168, 0x9286, 0xffff, 0x0118, 0x9282, 0x000e, + 0x1238, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, 0x0008, 0x0488, + 0x7003, 0x0200, 0x7007, 0x001c, 0x700f, 0x0001, 0x2011, 0x19be, + 0x2204, 0x8007, 0x701a, 0x8210, 0x2204, 0x8007, 0x701e, 0x0421, + 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181f, 0x2004, + 0x7022, 0x2001, 0x1820, 0x2004, 0x7026, 0x0030, 0x2001, 0x1818, + 0x2004, 0x9084, 0x00ff, 0x7026, 0x20a9, 0x0004, 0x20e1, 0x0001, + 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, 0x4003, 0x60c3, + 0x001c, 0x015e, 0x0804, 0xa270, 0x0006, 0x2001, 0x1837, 0x2004, + 0xd0ac, 0x000e, 0x0005, 0x2011, 0x0003, 0x080c, 0xa62b, 0x2011, + 0x0002, 0x080c, 0xa635, 0x080c, 0xa516, 0x0036, 0x901e, 0x080c, + 0xa596, 0x003e, 0x0005, 0x080c, 0x3487, 0x0188, 0x0016, 0x00b6, + 0x00c6, 0x7010, 0x9085, 0x0020, 0x7012, 0x2009, 0x007e, 0x080c, + 0x67b4, 0xb85c, 0xc0ac, 0xb85e, 0x00ce, 0x00be, 0x001e, 0x0005, + 0x00d6, 0x00f6, 0x7104, 0x9186, 0x0004, 0x1130, 0x7410, 0x9e90, + 0x0004, 0x9e98, 0x0003, 0x0088, 0x9186, 0x0001, 0x1130, 0x7420, + 0x9e90, 0x0008, 0x9e98, 0x0007, 0x0040, 0x9186, 0x0002, 0x1538, + 0x7428, 0x9e90, 0x000a, 0x9e98, 0x0009, 0x6110, 0x2468, 0x680c, + 0x907d, 0x01e8, 0x7810, 0x9106, 0x1128, 0x2f68, 0x780c, 0x907d, + 0x1dc8, 0x00a8, 0x780c, 0x680e, 0x7c0e, 0x2f12, 0x2304, 0x9f06, + 0x1108, 0x2d1a, 0x9006, 0x7032, 0x7036, 0x7004, 0x9086, 0x0003, + 0x0110, 0x7007, 0x0000, 0x9006, 0x00fe, 0x00de, 0x0005, 0x9085, + 0x0001, 0x0cd0, 0x2071, 0x188d, 0x7000, 0x9005, 0x0140, 0x2001, + 0x0812, 0x2071, 0x1800, 0x7076, 0x707a, 0x706b, 0xffd4, 0x2071, + 0x1800, 0x7074, 0x7056, 0x705b, 0x1ddc, 0x0005, 0x00e6, 0x0126, + 0x2071, 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0010, 0x0608, + 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, + 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, + 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068, 0x9502, 0x1230, + 0x755a, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b, 0x1ddc, + 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, 0x7554, 0x9582, + 0x0010, 0x0600, 0x7058, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, + 0x9ce0, 0x001c, 0x7068, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, + 0x0c98, 0x6003, 0x0008, 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068, + 0x9502, 0x1228, 0x755a, 0x9085, 0x0001, 0x00ee, 0x0005, 0x705b, + 0x1ddc, 0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1ddc, 0x0a0c, 0x0d85, + 0x2001, 0x181a, 0x2004, 0x9c02, 0x1a0c, 0x0d85, 0x9006, 0x6006, + 0x600a, 0x600e, 0x6016, 0x601a, 0x6012, 0x6023, 0x0000, 0x6003, + 0x0000, 0x601e, 0x605e, 0x6062, 0x6026, 0x602a, 0x602e, 0x6032, + 0x6036, 0x603a, 0x603e, 0x604a, 0x602a, 0x6046, 0x6042, 0x2061, + 0x1800, 0x6054, 0x8000, 0x6056, 0x0005, 0x9006, 0x600e, 0x6016, + 0x601a, 0x6012, 0x6022, 0x6002, 0x601e, 0x605e, 0x6062, 0x604a, + 0x6046, 0x2061, 0x1800, 0x6054, 0x8000, 0x6056, 0x0005, 0x0006, + 0x6000, 0x9086, 0x0000, 0x01d8, 0x601c, 0xd084, 0x190c, 0x1ad3, + 0x6023, 0x0007, 0x2001, 0x1986, 0x2004, 0x0006, 0x9082, 0x0051, + 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xece1, 0x604b, 0x0000, + 0x6044, 0xd0fc, 0x1131, 0x9006, 0x6046, 0x6016, 0x6012, 0x000e, + 0x0005, 0x080c, 0xacfc, 0x0106, 0x2001, 0x19fb, 0x2004, 0x9c06, + 0x1130, 0x0036, 0x2019, 0x0001, 0x080c, 0xa596, 0x003e, 0x080c, + 0xa7a1, 0x010e, 0x090c, 0xad18, 0x0005, 0x00e6, 0x0126, 0x2071, + 0x1800, 0x2091, 0x8000, 0x7554, 0x9582, 0x0001, 0x0608, 0x7058, + 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, 0x9ce0, 0x001c, 0x7068, + 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1ddc, 0x0c98, 0x6003, 0x0008, + 0x8529, 0x7556, 0x9ca8, 0x001c, 0x7068, 0x9502, 0x1230, 0x755a, + 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x705b, 0x1ddc, 0x0cc0, + 0x9006, 0x0cc0, 0x6020, 0x9084, 0x000f, 0x0002, 0xb21e, 0xb228, + 0xb243, 0xb25e, 0xd69a, 0xd6b7, 0xd6d2, 0xb21e, 0xb228, 0x92f7, + 0xb277, 0xb21e, 0xb21e, 0xb21e, 0xb21e, 0xb21e, 0x9186, 0x0013, + 0x1130, 0x6044, 0xd0fc, 0x0110, 0x080c, 0x99ed, 0x0005, 0x0005, + 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0d85, 0x0013, 0x006e, + 0x0005, 0xb241, 0xb9bc, 0xbba3, 0xb241, 0xbc39, 0xb540, 0xb241, + 0xb241, 0xb93e, 0xc25a, 0xb241, 0xb241, 0xb241, 0xb241, 0xb241, + 0xb241, 0x080c, 0x0d85, 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, + 0x0d85, 0x0013, 0x006e, 0x0005, 0xb25c, 0xc875, 0xb25c, 0xb25c, + 0xb25c, 0xb25c, 0xb25c, 0xb25c, 0xc80c, 0xc9f8, 0xb25c, 0xc8b2, + 0xc936, 0xc8b2, 0xc936, 0xb25c, 0x080c, 0x0d85, 0x6000, 0x9082, + 0x0010, 0x1a0c, 0x0d85, 0x6000, 0x0002, 0xb275, 0xc2a4, 0xc33e, + 0xc4c1, 0xc530, 0xb275, 0xb275, 0xb275, 0xc273, 0xc78d, 0xc790, + 0xb275, 0xb275, 0xb275, 0xb275, 0xc7c0, 0x080c, 0x0d85, 0x0066, + 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0d85, 0x0013, 0x006e, 0x0005, + 0xb290, 0xb290, 0xb2ce, 0xb36d, 0xb3ed, 0xb290, 0xb290, 0xb290, + 0xb292, 0xb290, 0xb290, 0xb290, 0xb290, 0xb290, 0xb290, 0xb290, + 0x080c, 0x0d85, 0x9186, 0x004c, 0x0560, 0x9186, 0x0003, 0x190c, + 0x0d85, 0x0096, 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, + 0x6014, 0x2048, 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, + 0xa836, 0xa8b0, 0xa83a, 0x9006, 0xa846, 0xa84a, 0xa884, 0x9092, + 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, + 0x621a, 0x009e, 0x080c, 0x1c26, 0x2009, 0x8030, 0x080c, 0x965e, + 0x0005, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x080c, + 0xb40f, 0x080c, 0xd65d, 0x6003, 0x0007, 0x0005, 0x00d6, 0x0096, + 0x00f6, 0x2079, 0x1800, 0x7a90, 0x6014, 0x2048, 0xa87c, 0xd0ec, + 0x1110, 0x9290, 0x0018, 0xac78, 0xc4fc, 0x0046, 0xa8e0, 0x9005, + 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, 0xa87b, 0x0007, 0x2010, + 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b, 0x0000, 0x8214, 0xa883, + 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, 0x2100, 0x9086, 0x0015, + 0x1118, 0x2001, 0x0001, 0x0038, 0x2100, 0x9086, 0x0016, 0x0118, + 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, 0x8423, 0x9405, 0x0002, + 0xb335, 0xb335, 0xb330, 0xb333, 0xb335, 0xb32d, 0xb320, 0xb320, + 0xb320, 0xb320, 0xb320, 0xb320, 0xb320, 0xb320, 0xb320, 0xb320, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x000e, 0x004e, + 0x00fe, 0x009e, 0x00de, 0x080c, 0x0d85, 0x080c, 0xbe51, 0x0028, + 0x080c, 0xbf8f, 0x0010, 0x080c, 0xc085, 0x00fe, 0x00ee, 0x00de, + 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, 0x000e, 0x080c, 0xb4cd, + 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, 0xb100, 0x00ae, 0x8006, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, 0x0000, 0x2041, 0x12c2, + 0x080c, 0xb691, 0x0160, 0x000e, 0x9005, 0x0120, 0x00fe, 0x009e, + 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, 0x0804, 0xb16c, 0x2001, + 0x002c, 0x900e, 0x080c, 0xb533, 0x0c70, 0x91b6, 0x0015, 0x0170, + 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, 0x0a0c, 0x0d85, 0x91b2, + 0x0050, 0x1a0c, 0x0d85, 0x9182, 0x0047, 0x0042, 0x080c, 0xaf61, + 0x0120, 0x9086, 0x0002, 0x0904, 0xb2ce, 0x0005, 0xb38f, 0xb38f, + 0xb391, 0xb3c3, 0xb38f, 0xb38f, 0xb38f, 0xb38f, 0xb3d6, 0x080c, + 0x0d85, 0x00d6, 0x0016, 0x0096, 0x6003, 0x0004, 0x6114, 0x2148, + 0xa87c, 0xd0fc, 0x01c0, 0xa878, 0xc0fc, 0x9005, 0x1158, 0xa894, + 0x9005, 0x0140, 0x2001, 0x0000, 0x900e, 0x080c, 0xb533, 0x080c, + 0xb16c, 0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, + 0xa8ae, 0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, + 0xa8ae, 0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, + 0x001e, 0x00de, 0x0005, 0x080c, 0x9a48, 0x00d6, 0x0096, 0x6114, + 0x2148, 0x080c, 0xcf1b, 0x0120, 0xa87b, 0x0006, 0x080c, 0x7012, + 0x009e, 0x00de, 0x080c, 0xb16c, 0x0804, 0x9ab3, 0x080c, 0x9a48, + 0x080c, 0x3315, 0x080c, 0xd65a, 0x00d6, 0x0096, 0x6114, 0x2148, + 0x080c, 0xcf1b, 0x0120, 0xa87b, 0x0029, 0x080c, 0x7012, 0x009e, + 0x00de, 0x080c, 0xb16c, 0x0804, 0x9ab3, 0x9182, 0x0047, 0x0002, + 0xb3fd, 0xb3ff, 0xb3fd, 0xb3fd, 0xb3fd, 0xb3fd, 0xb3fd, 0xb3fd, + 0xb3fd, 0xb3fd, 0xb3fd, 0xb3fd, 0xb3ff, 0x080c, 0x0d85, 0x00d6, + 0x0096, 0x601f, 0x0000, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, + 0x0000, 0x080c, 0x7012, 0x009e, 0x00de, 0x0804, 0xb16c, 0x0026, + 0x0036, 0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, + 0x1059, 0x000e, 0x090c, 0x0d85, 0xa960, 0x21e8, 0xa95c, 0x9188, + 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, + 0x1800, 0x7990, 0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, + 0x2950, 0x00a6, 0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, + 0x0001, 0x9182, 0x0035, 0x1228, 0x2011, 0x001f, 0x080c, 0xca7b, + 0x04c0, 0x2130, 0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xca7b, + 0x96b2, 0x0034, 0xb004, 0x904d, 0x0110, 0x080c, 0x100b, 0x080c, + 0x1059, 0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, + 0xb406, 0x968a, 0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, + 0xca7b, 0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, + 0x001b, 0x080c, 0xca7b, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, + 0x00ae, 0x852f, 0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, + 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, + 0x0050, 0xb566, 0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, + 0x7012, 0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, + 0x006e, 0x005e, 0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, + 0x0006, 0x080c, 0x1059, 0x000e, 0x090c, 0x0d85, 0xa960, 0x21e8, + 0xa95c, 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, + 0xaa66, 0xa87a, 0x2079, 0x1800, 0x7990, 0x810c, 0x9188, 0x000c, + 0x9182, 0x001a, 0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, + 0xac76, 0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, + 0x200c, 0x918d, 0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, + 0x7012, 0x009e, 0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, + 0x0096, 0x0016, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, + 0x001e, 0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, + 0x000c, 0x2098, 0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, + 0x2011, 0x0020, 0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, + 0x1059, 0x2900, 0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, + 0xa85c, 0x9080, 0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, + 0x2009, 0x0280, 0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, + 0x2200, 0x9402, 0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, + 0x2020, 0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, + 0x83ff, 0x0180, 0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, + 0x9085, 0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0xb4e2, + 0x0804, 0xb4e4, 0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, + 0x00de, 0x001e, 0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, + 0xa87a, 0xa982, 0x080c, 0x7006, 0x009e, 0x003e, 0x00de, 0x0005, + 0x91b6, 0x0015, 0x1118, 0x080c, 0xb16c, 0x0030, 0x91b6, 0x0016, + 0x190c, 0x0d85, 0x080c, 0xb16c, 0x0005, 0x20a9, 0x000e, 0x20e1, + 0x0000, 0x2e98, 0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, + 0x20a0, 0x009e, 0x4003, 0x9196, 0x0016, 0x01f0, 0x0136, 0x9080, + 0x001b, 0x20a0, 0x2011, 0x0006, 0x20a9, 0x0001, 0x3418, 0x8318, + 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, 0x8211, 0x1db8, 0x2011, + 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, 0x2398, 0x4003, 0x3418, + 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, 0x080c, 0xcf1b, 0x0130, + 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0x009e, 0x0804, + 0xb16c, 0x0096, 0x00d6, 0x0036, 0x7330, 0x9386, 0x0200, 0x11a8, + 0x6010, 0x00b6, 0x2058, 0xb8d7, 0x0000, 0x00be, 0x6014, 0x9005, + 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xab32, 0x080c, + 0xb16c, 0x003e, 0x00de, 0x009e, 0x0005, 0x0011, 0x1d48, 0x0cc8, + 0x0006, 0x0016, 0x080c, 0xd645, 0x0188, 0x6014, 0x9005, 0x1170, + 0x600b, 0x0003, 0x601b, 0x0000, 0x604b, 0x0000, 0x2009, 0x0022, + 0x080c, 0xb994, 0x9006, 0x001e, 0x000e, 0x0005, 0x9085, 0x0001, + 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, 0x9e80, 0x000c, 0x20e1, + 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0001, 0x2099, + 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, 0x000a, 0xa804, 0x2048, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, + 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, 0x20a9, 0x0020, 0x4003, + 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, + 0x080c, 0xb16c, 0x001e, 0x009e, 0x0005, 0x0096, 0x0016, 0x900e, + 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, 0x9084, 0x00ff, 0x800c, + 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, 0x0004, 0x9108, 0x810b, + 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, 0x2048, 0x080c, 0xca7b, + 0x080c, 0xcf1b, 0x0140, 0x6014, 0x2048, 0xa807, 0x0000, 0xa864, + 0xa8e2, 0xa867, 0x0103, 0x080c, 0xb16c, 0x001e, 0x009e, 0x0005, + 0x0016, 0x2009, 0x0000, 0x7030, 0x9086, 0x0200, 0x0110, 0x2009, + 0x0001, 0x0096, 0x6014, 0x904d, 0x090c, 0x0d85, 0xa97a, 0x080c, + 0x7012, 0x009e, 0x080c, 0xb16c, 0x001e, 0x0005, 0x0016, 0x0096, + 0x7030, 0x9086, 0x0100, 0x1118, 0x2009, 0x0004, 0x0010, 0x7034, + 0x800c, 0x810b, 0x2011, 0x000c, 0x2019, 0x000c, 0x6014, 0x2048, + 0xa804, 0x0096, 0x9005, 0x0108, 0x2048, 0x080c, 0xca7b, 0x009e, + 0x080c, 0xcf1b, 0x0148, 0xa804, 0x9005, 0x1158, 0xa807, 0x0000, + 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0xb16c, 0x009e, 0x001e, + 0x0005, 0x0086, 0x2040, 0xa030, 0x8007, 0x9086, 0x0100, 0x1118, + 0x080c, 0xbb5c, 0x00e0, 0xa034, 0x8007, 0x800c, 0x8806, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b, + 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8, + 0xada4, 0x2031, 0x0000, 0x2041, 0x12a8, 0x0019, 0x0d08, 0x008e, + 0x0898, 0x0096, 0x0006, 0x080c, 0x1059, 0x000e, 0x01b0, 0xa8ab, + 0x0dcb, 0xa876, 0x000e, 0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e, + 0xa97a, 0xaf72, 0xaa8e, 0xab92, 0xac96, 0xad9a, 0x0086, 0x2940, + 0x080c, 0x114e, 0x008e, 0x9085, 0x0001, 0x009e, 0x0005, 0x00e6, + 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, + 0xba10, 0x00be, 0x9206, 0x1520, 0x700c, 0x6210, 0x00b6, 0x2258, + 0xba14, 0x00be, 0x9206, 0x11e0, 0x604b, 0x0000, 0x2c68, 0x0016, + 0x2009, 0x0035, 0x080c, 0xd5bb, 0x001e, 0x1158, 0x622c, 0x2268, + 0x2071, 0x026c, 0x6b20, 0x9386, 0x0003, 0x0130, 0x9386, 0x0006, + 0x0128, 0x080c, 0xb16c, 0x0020, 0x0039, 0x0010, 0x080c, 0xb7c7, + 0x002e, 0x00de, 0x00ee, 0x0005, 0x0096, 0x6814, 0x2048, 0x9186, + 0x0015, 0x0904, 0xb7a6, 0x918e, 0x0016, 0x1904, 0xb7c5, 0x700c, + 0x908c, 0xff00, 0x9186, 0x1700, 0x0120, 0x9186, 0x0300, 0x1904, + 0xb780, 0x89ff, 0x1138, 0x6800, 0x9086, 0x000f, 0x0904, 0xb762, + 0x0804, 0xb7c3, 0x6808, 0x9086, 0xffff, 0x1904, 0xb7a8, 0xa87c, + 0x9084, 0x0060, 0x9086, 0x0020, 0x1150, 0xa8ac, 0xa934, 0x9106, + 0x1904, 0xb7a8, 0xa8b0, 0xa938, 0x9106, 0x1904, 0xb7a8, 0x6824, + 0xd084, 0x1904, 0xb7a8, 0xd0b4, 0x0158, 0x0016, 0x2001, 0x1986, + 0x200c, 0x6018, 0x9102, 0x9082, 0x0005, 0x001e, 0x1a04, 0xb7a8, + 0x080c, 0xd10c, 0x6810, 0x0096, 0x2048, 0xa9a0, 0x009e, 0x685c, + 0xa87a, 0xa976, 0x6864, 0xa882, 0xa87c, 0xc0dc, 0xc0f4, 0xc0d4, + 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, 0x000a, 0x080c, 0x955b, + 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, 0x82ff, 0x002e, 0x1138, + 0x00c6, 0x2d60, 0x080c, 0xcc01, 0x00ce, 0x0804, 0xb7c3, 0x00c6, + 0xa868, 0xd0fc, 0x1118, 0x080c, 0x622f, 0x0010, 0x080c, 0x663a, + 0x00ce, 0x1904, 0xb7a8, 0x00c6, 0x2d60, 0x080c, 0xb16c, 0x00ce, + 0x0804, 0xb7c3, 0x00c6, 0x080c, 0xb1dd, 0x0198, 0x6017, 0x0000, + 0x6810, 0x6012, 0x080c, 0xd3b6, 0x6023, 0x0003, 0x6904, 0x00c6, + 0x2d60, 0x080c, 0xb16c, 0x00ce, 0x080c, 0xb20a, 0x00ce, 0x0804, + 0xb7c3, 0x2001, 0x1988, 0x2004, 0x684a, 0x00ce, 0x0804, 0xb7c3, + 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, 0x2058, 0xb900, + 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa87b, 0x0003, 0x080c, + 0xd5ff, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x2009, + 0x8020, 0x080c, 0x9617, 0x00ce, 0x0430, 0x700c, 0x9086, 0x2a00, + 0x1138, 0x2001, 0x1988, 0x2004, 0x684a, 0x00e8, 0x04c1, 0x00e8, + 0x89ff, 0x090c, 0x0d85, 0x00c6, 0x00d6, 0x2d60, 0xa867, 0x0103, + 0xa87b, 0x0003, 0x080c, 0x6e27, 0x080c, 0xd10c, 0x080c, 0xb1a7, + 0x0026, 0x6010, 0x00b6, 0x2058, 0xba3c, 0x080c, 0x68df, 0x00be, + 0x002e, 0x00de, 0x00ce, 0x080c, 0xb16c, 0x009e, 0x0005, 0x9186, + 0x0015, 0x1128, 0x2001, 0x1988, 0x2004, 0x684a, 0x0068, 0x918e, + 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xece1, 0x080c, + 0x8c19, 0x080c, 0xb16c, 0x00ce, 0x080c, 0xb16c, 0x0005, 0x0026, + 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, 0x2001, + 0x1988, 0x2004, 0x684a, 0x0804, 0xb841, 0x00c6, 0x2d60, 0x080c, + 0xcadc, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1168, 0x00c6, 0x2d00, + 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x2009, 0x8023, 0x080c, + 0x9617, 0x00ce, 0x04f0, 0x6800, 0x9086, 0x000f, 0x01a8, 0x89ff, + 0x090c, 0x0d85, 0x6800, 0x9086, 0x0004, 0x1190, 0xa87c, 0xd0ac, + 0x0178, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, 0xc0fc, 0xa882, + 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, 0x0007, 0x6832, 0x00e0, + 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, 0x6824, 0xd0f4, 0x1d48, + 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c20, 0xd2ec, 0x1d68, 0x7024, + 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, 0x7020, 0x683e, 0x7024, + 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, 0xd2a0, 0x080c, 0x9ab3, + 0x0010, 0x080c, 0xb16c, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, + 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, + 0xba10, 0x00be, 0x9206, 0x1904, 0xb8ac, 0x700c, 0x6210, 0x00b6, + 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, 0xb8ac, 0x6038, 0x2068, + 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, 0x0007, 0x0904, 0xb8ac, + 0x9286, 0x0002, 0x0904, 0xb8ac, 0x9286, 0x0000, 0x05e8, 0x6808, + 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, 0x9186, 0x0015, 0x0570, + 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, 0x2060, 0x6104, 0x9186, + 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, 0x9186, 0x004d, 0x0190, + 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, 0x0160, 0x6014, 0x0096, + 0x2048, 0x080c, 0xcf1b, 0x090c, 0x0d85, 0xa87b, 0x0003, 0x009e, + 0x080c, 0xd5ff, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x2009, 0x8020, 0x080c, 0x9617, 0x00ce, 0x0030, 0x6038, 0x2070, + 0x2001, 0x1988, 0x2004, 0x704a, 0x080c, 0xb16c, 0x002e, 0x00de, + 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, 0x6014, 0x2048, 0x6010, + 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, 0xbb0c, 0xbc00, 0xc48c, + 0xbc02, 0x0470, 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, + 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, 0x080c, 0xc222, 0x002e, + 0x003e, 0x015e, 0x009e, 0x1904, 0xb91d, 0x0096, 0x0156, 0x0036, + 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, 0x0006, 0x20a9, 0x0004, + 0x080c, 0xc222, 0x002e, 0x003e, 0x015e, 0x009e, 0x15b0, 0x7238, + 0xba0a, 0x733c, 0xbb0e, 0x83ff, 0x0118, 0xbc00, 0xc48d, 0xbc02, + 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, 0xb57c, + 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, + 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, + 0x12a8, 0x080c, 0xb691, 0x0130, 0x00fe, 0x009e, 0x080c, 0xb16c, + 0x00be, 0x0005, 0x080c, 0xbb5c, 0x0cb8, 0x2b78, 0x00f6, 0x080c, + 0x3315, 0x080c, 0xd65a, 0x00fe, 0x00c6, 0x080c, 0xb116, 0x2f00, + 0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, + 0x0001, 0x2001, 0x0007, 0x080c, 0x66fa, 0x080c, 0x6726, 0x080c, + 0x961e, 0x080c, 0x9ab3, 0x00ce, 0x0804, 0xb8f0, 0x2100, 0x91b2, + 0x0053, 0x1a0c, 0x0d85, 0x91b2, 0x0040, 0x1a04, 0xb9a6, 0x0002, + 0xb994, 0xb994, 0xb98a, 0xb994, 0xb994, 0xb994, 0xb988, 0xb988, + 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, + 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, + 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb994, + 0xb988, 0xb994, 0xb994, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, + 0xb98a, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, + 0xb988, 0xb988, 0xb994, 0xb994, 0xb988, 0xb988, 0xb988, 0xb988, + 0xb988, 0xb988, 0xb988, 0xb988, 0xb988, 0xb994, 0xb988, 0xb988, + 0x080c, 0x0d85, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8d4, 0xc08c, + 0xb8d6, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, 0x9186, + 0x0032, 0x0118, 0x080c, 0x961e, 0x0010, 0x080c, 0x9617, 0x0126, + 0x2091, 0x8000, 0x080c, 0x9ab3, 0x012e, 0x0005, 0x2600, 0x0002, + 0xb994, 0xb994, 0xb9ba, 0xb994, 0xb994, 0xb9ba, 0xb9ba, 0xb9ba, + 0xb9ba, 0xb994, 0xb9ba, 0xb994, 0xb9ba, 0xb994, 0xb9ba, 0xb9ba, + 0xb9ba, 0xb9ba, 0x080c, 0x0d85, 0x6004, 0x90b2, 0x0053, 0x1a0c, + 0x0d85, 0x91b6, 0x0013, 0x0904, 0xba91, 0x91b6, 0x0027, 0x1904, + 0xba3d, 0x080c, 0x99ed, 0x6004, 0x080c, 0xd121, 0x01b0, 0x080c, + 0xd132, 0x01a8, 0x908e, 0x0021, 0x0904, 0xba3a, 0x908e, 0x0022, + 0x1130, 0x080c, 0xb5a8, 0x0904, 0xba36, 0x0804, 0xba37, 0x908e, + 0x003d, 0x0904, 0xba3a, 0x0804, 0xba30, 0x080c, 0x3344, 0x2001, + 0x0007, 0x080c, 0x66fa, 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, + 0x080c, 0xbb5c, 0x9186, 0x007e, 0x1148, 0x2001, 0x1837, 0x2014, + 0xc285, 0x080c, 0x779e, 0x1108, 0xc2ad, 0x2202, 0x080c, 0xacfc, + 0x0036, 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xedee, 0x002e, + 0x003e, 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, + 0x97b0, 0x0076, 0x903e, 0x080c, 0x966d, 0x6010, 0x00b6, 0x905d, + 0x0100, 0x00be, 0x2c08, 0x080c, 0xe75d, 0x007e, 0x003e, 0x002e, + 0x001e, 0x080c, 0xad18, 0x080c, 0xd65a, 0x0016, 0x080c, 0xd3ae, + 0x080c, 0xb16c, 0x001e, 0x080c, 0x341e, 0x080c, 0x9ab3, 0x0030, + 0x080c, 0xd3ae, 0x080c, 0xb16c, 0x080c, 0x9ab3, 0x0005, 0x080c, + 0xbb5c, 0x0cb0, 0x080c, 0xbb98, 0x0c98, 0x9186, 0x0015, 0x0118, + 0x9186, 0x0016, 0x1140, 0x080c, 0xaf61, 0x0d80, 0x9086, 0x0002, + 0x0904, 0xbba3, 0x0c58, 0x9186, 0x0014, 0x1d40, 0x080c, 0x99ed, + 0x6004, 0x908e, 0x0022, 0x1118, 0x080c, 0xb5a8, 0x09f8, 0x080c, + 0x3315, 0x080c, 0xd65a, 0x080c, 0xd121, 0x1190, 0x080c, 0x3344, + 0x6010, 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xbb5c, 0x9186, + 0x007e, 0x1128, 0x2001, 0x1837, 0x200c, 0xc185, 0x2102, 0x0800, + 0x080c, 0xd132, 0x1120, 0x080c, 0xbb5c, 0x0804, 0xba30, 0x6004, + 0x908e, 0x0032, 0x1160, 0x00e6, 0x00f6, 0x2071, 0x189e, 0x2079, + 0x0000, 0x080c, 0x36bf, 0x00fe, 0x00ee, 0x0804, 0xba30, 0x6004, + 0x908e, 0x0021, 0x0d40, 0x908e, 0x0022, 0x090c, 0xbb5c, 0x0804, + 0xba30, 0x90b2, 0x0040, 0x1a04, 0xbb3c, 0x2008, 0x0002, 0xbad9, + 0xbada, 0xbadd, 0xbae0, 0xbae3, 0xbaf0, 0xbad7, 0xbad7, 0xbad7, + 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, + 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, + 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbaf3, 0xbafe, 0xbad7, + 0xbaff, 0xbafe, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbafe, + 0xbafe, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, 0xbad7, + 0xbad7, 0xbb27, 0xbafe, 0xbad7, 0xbafa, 0xbad7, 0xbad7, 0xbad7, + 0xbafb, 0xbad7, 0xbad7, 0xbad7, 0xbafe, 0xbb22, 0xbad7, 0x080c, + 0x0d85, 0x0420, 0x2001, 0x000b, 0x0448, 0x2001, 0x0003, 0x0430, + 0x2001, 0x0005, 0x0418, 0x6010, 0x00b6, 0x2058, 0xb804, 0x00be, + 0x9084, 0x00ff, 0x9086, 0x0000, 0x11d8, 0x2001, 0x0001, 0x00b0, + 0x2001, 0x0009, 0x0098, 0x6003, 0x0005, 0x080c, 0xd65d, 0x080c, + 0x9ab3, 0x0058, 0x0018, 0x0010, 0x080c, 0x66fa, 0x04b8, 0x080c, + 0xd65d, 0x6003, 0x0004, 0x080c, 0x9ab3, 0x0005, 0x080c, 0x66fa, + 0x6003, 0x0002, 0x0036, 0x2019, 0x1852, 0x2304, 0x9084, 0xff00, + 0x1120, 0x2001, 0x1986, 0x201c, 0x0040, 0x8007, 0x909a, 0x0004, + 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e, 0x080c, + 0x9ab3, 0x0c18, 0x080c, 0xd3ae, 0x080c, 0xb16c, 0x08f0, 0x00e6, + 0x00f6, 0x2071, 0x189e, 0x2079, 0x0000, 0x080c, 0x36bf, 0x00fe, + 0x00ee, 0x080c, 0x99ed, 0x080c, 0xb16c, 0x0878, 0x6003, 0x0002, + 0x080c, 0xd65d, 0x0804, 0x9ab3, 0x2600, 0x2008, 0x0002, 0xbb53, + 0xbb36, 0xbb51, 0xbb36, 0xbb36, 0xbb51, 0xbb51, 0xbb51, 0xbb51, + 0xbb36, 0xbb51, 0xbb36, 0xbb51, 0xbb36, 0xbb51, 0xbb51, 0xbb51, + 0xbb51, 0x080c, 0x0d85, 0x0096, 0x6014, 0x2048, 0x080c, 0x7012, + 0x009e, 0x080c, 0xb16c, 0x0005, 0x00e6, 0x0096, 0x0026, 0x0016, + 0x080c, 0xcf1b, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139, + 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x55cc, 0x0130, + 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030, + 0x900e, 0x2011, 0x4005, 0x080c, 0xd51f, 0x0090, 0xa868, 0xd0fc, + 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168, + 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100, + 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, + 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823, + 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, + 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0d85, 0x6604, 0x96b6, 0x004d, + 0x1120, 0x080c, 0xd43e, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x0043, + 0x1120, 0x080c, 0xd487, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x004b, + 0x1120, 0x080c, 0xd4b3, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x0033, + 0x1120, 0x080c, 0xd3d0, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x0028, + 0x1120, 0x080c, 0xd170, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x0029, + 0x1120, 0x080c, 0xd1b1, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x001f, + 0x1120, 0x080c, 0xb54d, 0x0804, 0xbc28, 0x6604, 0x96b6, 0x0000, + 0x1118, 0x080c, 0xb8b2, 0x04e0, 0x6604, 0x96b6, 0x0022, 0x1118, + 0x080c, 0xb589, 0x04a8, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, + 0xb6af, 0x0470, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xb847, + 0x0438, 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0xb5c1, 0x0400, + 0x6604, 0x96b6, 0x0044, 0x1118, 0x080c, 0xb5fd, 0x00c8, 0x6604, + 0x96b6, 0x0049, 0x1118, 0x080c, 0xb63e, 0x0090, 0x6604, 0x96b6, + 0x0041, 0x1118, 0x080c, 0xb628, 0x0058, 0x91b6, 0x0015, 0x1110, + 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xbf34, + 0x00be, 0x0005, 0x080c, 0xb227, 0x0cd8, 0xbc45, 0xbc53, 0xbc45, + 0xbc9a, 0xbc45, 0xbe51, 0xbf41, 0xbc45, 0xbc45, 0xbf0a, 0xbc45, + 0xbf20, 0x0096, 0x601f, 0x0000, 0x6014, 0x2048, 0xa800, 0x2048, + 0xa867, 0x0103, 0x009e, 0x0804, 0xb16c, 0xa001, 0xa001, 0x0005, + 0x6604, 0x96b6, 0x0004, 0x1130, 0x2001, 0x0001, 0x080c, 0x66e6, + 0x0804, 0xb16c, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7090, 0x9086, + 0x0074, 0x1540, 0x080c, 0xe72e, 0x11b0, 0x6010, 0x00b6, 0x2058, + 0x7030, 0xd08c, 0x0128, 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, + 0x00f9, 0x00be, 0x2001, 0x0006, 0x080c, 0x66fa, 0x080c, 0x3344, + 0x080c, 0xb16c, 0x0098, 0x2001, 0x000a, 0x080c, 0x66fa, 0x080c, + 0x3344, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x961e, 0x080c, + 0x9ab3, 0x0020, 0x2001, 0x0001, 0x080c, 0xbe21, 0x00ee, 0x0005, + 0x00d6, 0xb800, 0xd084, 0x0160, 0x9006, 0x080c, 0x66e6, 0x2069, + 0x1847, 0x6804, 0xd0a4, 0x0120, 0x2001, 0x0006, 0x080c, 0x6726, + 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6, 0x2011, 0x1824, 0x2204, + 0x9086, 0x0074, 0x1904, 0xbdf6, 0x6010, 0x2058, 0xbaa0, 0x9286, + 0x007e, 0x1120, 0x080c, 0xc090, 0x0804, 0xbd63, 0x2001, 0x180d, + 0x2004, 0xd08c, 0x0904, 0xbd05, 0x00d6, 0x080c, 0x779e, 0x01a0, + 0x0026, 0x2011, 0x0010, 0x080c, 0x6c35, 0x002e, 0x0904, 0xbd04, + 0x080c, 0x5854, 0x1598, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, + 0x0103, 0xa833, 0xdead, 0x0450, 0x6010, 0x00b6, 0x2058, 0xb910, + 0x00be, 0x9186, 0x00ff, 0x0580, 0x0026, 0x2011, 0x8008, 0x080c, + 0x6c35, 0x002e, 0x0548, 0x6014, 0x9005, 0x090c, 0x0d85, 0x2048, + 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030, + 0x900e, 0x2011, 0x4009, 0x080c, 0xd51f, 0x0040, 0x6014, 0x2048, + 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058, + 0xb9a0, 0x0016, 0x080c, 0x3344, 0x080c, 0xb16c, 0x001e, 0x080c, + 0x341e, 0x00de, 0x0804, 0xbdfb, 0x00de, 0x080c, 0xc085, 0x6010, + 0x2058, 0xbaa0, 0x9286, 0x0080, 0x1510, 0x6014, 0x9005, 0x01a8, + 0x2048, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, + 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xd51f, 0x0030, 0xa807, + 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x2001, 0x0006, 0x080c, + 0x66fa, 0x080c, 0x3344, 0x080c, 0xb16c, 0x0804, 0xbdfb, 0x080c, + 0xbe09, 0x6014, 0x9005, 0x0190, 0x2048, 0xa868, 0xd0f4, 0x01e8, + 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x1d08, 0x2001, 0x0000, + 0x900e, 0x2011, 0x4000, 0x080c, 0xd51f, 0x08f8, 0x080c, 0xbdff, + 0x0160, 0x9006, 0x080c, 0x66e6, 0x2001, 0x0004, 0x080c, 0x6726, + 0x2001, 0x0007, 0x080c, 0x66fa, 0x08a0, 0x2001, 0x0004, 0x080c, + 0x66fa, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x961e, 0x080c, + 0x9ab3, 0x0804, 0xbdfb, 0xb85c, 0xd0e4, 0x0178, 0x080c, 0xd348, + 0x080c, 0x779e, 0x0118, 0xd0dc, 0x1904, 0xbd25, 0x2011, 0x1837, + 0x2204, 0xc0ad, 0x2012, 0x0804, 0xbd25, 0x080c, 0xd389, 0x2011, + 0x1837, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xe905, 0x000e, + 0x1904, 0xbd25, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x66fa, + 0x9006, 0x080c, 0x66e6, 0x00c6, 0x2001, 0x180f, 0x2004, 0xd09c, + 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c, + 0x9084, 0x00ff, 0x78e6, 0x707e, 0x7010, 0x78ea, 0x7082, 0x908c, + 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x26d5, + 0x00f6, 0x2100, 0x900e, 0x080c, 0x268c, 0x795e, 0x00fe, 0x9186, + 0x0081, 0x01f0, 0x2009, 0x0081, 0x00e0, 0x2009, 0x00ef, 0x00f6, + 0x2079, 0x0100, 0x79ea, 0x78e7, 0x0000, 0x7932, 0x7936, 0x780c, + 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x26d5, 0x00f6, 0x2079, 0x1800, + 0x7982, 0x2100, 0x900e, 0x797e, 0x080c, 0x268c, 0x795e, 0x00fe, + 0x8108, 0x080c, 0x6749, 0x2b00, 0x00ce, 0x1904, 0xbd25, 0x6012, + 0x2009, 0x180f, 0x210c, 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, + 0x918c, 0x00ff, 0xb912, 0x2009, 0x027d, 0x210c, 0xb916, 0x2001, + 0x0002, 0x080c, 0x66fa, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0028, 0x080c, 0xbb5c, + 0x2001, 0x0001, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, 0x2001, + 0x1810, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1848, 0x2004, 0xd0ac, + 0x0005, 0x00e6, 0x080c, 0xee47, 0x0190, 0x2071, 0x0260, 0x7108, + 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, 0x6010, + 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, 0x00ee, + 0x0005, 0x2030, 0x9005, 0x0158, 0x2001, 0x0007, 0x080c, 0x66fa, + 0x080c, 0x5854, 0x1120, 0x2001, 0x0007, 0x080c, 0x6726, 0x2600, + 0x9005, 0x11b0, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, + 0x1178, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, + 0x2021, 0x0004, 0x2011, 0x8014, 0x080c, 0x4ca1, 0x004e, 0x003e, + 0x080c, 0x3344, 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804, + 0xb16c, 0x00b6, 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7090, + 0x9086, 0x0014, 0x1904, 0xbf00, 0x2001, 0x180d, 0x2004, 0xd08c, + 0x0904, 0xbeb3, 0x00d6, 0x080c, 0x779e, 0x01a0, 0x0026, 0x2011, + 0x0010, 0x080c, 0x6c35, 0x002e, 0x0904, 0xbeb2, 0x080c, 0x5854, + 0x1598, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, + 0xdead, 0x0450, 0x6010, 0x00b6, 0x2058, 0xb910, 0x00be, 0x9186, + 0x00ff, 0x0580, 0x0026, 0x2011, 0x8008, 0x080c, 0x6c35, 0x002e, + 0x0548, 0x6014, 0x9005, 0x090c, 0x0d85, 0x2048, 0xa864, 0x9084, + 0x00ff, 0x9086, 0x0039, 0x1140, 0x2001, 0x0030, 0x900e, 0x2011, + 0x4009, 0x080c, 0xd51f, 0x0040, 0x6014, 0x2048, 0xa807, 0x0000, + 0xa867, 0x0103, 0xa833, 0xdead, 0x6010, 0x2058, 0xb9a0, 0x0016, + 0x080c, 0x3344, 0x080c, 0xb16c, 0x001e, 0x080c, 0x341e, 0x00de, + 0x0804, 0xbf05, 0x00de, 0x080c, 0x5854, 0x1170, 0x6014, 0x9005, + 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, + 0x080c, 0x4e58, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, + 0x684f, 0x080c, 0xbc88, 0x00de, 0x080c, 0xc15b, 0x1588, 0x6010, + 0x2058, 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x66fa, + 0x0096, 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, + 0xd51f, 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, + 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, + 0x3344, 0x6020, 0x9086, 0x000a, 0x0140, 0x080c, 0xb16c, 0x0028, + 0x080c, 0xbb5c, 0x9006, 0x080c, 0xbe21, 0x001e, 0x002e, 0x00ee, + 0x00be, 0x0005, 0x2011, 0x1824, 0x2204, 0x9086, 0x0014, 0x1160, + 0x2001, 0x0002, 0x080c, 0x66fa, 0x6003, 0x0001, 0x6007, 0x0001, + 0x080c, 0x961e, 0x0804, 0x9ab3, 0x2001, 0x0001, 0x0804, 0xbe21, + 0x2030, 0x2011, 0x1824, 0x2204, 0x9086, 0x0004, 0x1148, 0x96b6, + 0x000b, 0x1120, 0x2001, 0x0007, 0x080c, 0x66fa, 0x0804, 0xb16c, + 0x2001, 0x0001, 0x0804, 0xbe21, 0x0002, 0xbc45, 0xbf4c, 0xbc45, + 0xbf8f, 0xbc45, 0xc03c, 0xbf41, 0xbc48, 0xbc45, 0xc050, 0xbc45, + 0xc062, 0x6604, 0x9686, 0x0003, 0x0904, 0xbe51, 0x96b6, 0x001e, + 0x1110, 0x080c, 0xb16c, 0x0005, 0x00b6, 0x00d6, 0x00c6, 0x080c, + 0xc074, 0x11a0, 0x9006, 0x080c, 0x66e6, 0x080c, 0x3315, 0x080c, + 0xd65a, 0x2001, 0x0002, 0x080c, 0x66fa, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0428, 0x2009, 0x026e, + 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, 0xb840, 0x9084, + 0x00ff, 0x9005, 0x0180, 0x8001, 0xb842, 0x601b, 0x000a, 0x0098, + 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x908e, 0x1900, 0x0158, + 0x908e, 0x1e00, 0x0990, 0x080c, 0x3315, 0x080c, 0xd65a, 0x2001, + 0x0001, 0x080c, 0xbe21, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, + 0x00b6, 0x0026, 0x9016, 0x080c, 0xc082, 0x00d6, 0x2069, 0x197c, + 0x2d04, 0x9005, 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, + 0x1138, 0x2069, 0x1820, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, + 0x00de, 0x0088, 0x9006, 0x080c, 0x66e6, 0x2001, 0x0002, 0x080c, + 0x66fa, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x961e, 0x080c, + 0x9ab3, 0x0804, 0xc00c, 0x080c, 0xcf1b, 0x01b0, 0x6014, 0x2048, + 0xa864, 0x2010, 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001, + 0x0002, 0x080c, 0xd57c, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, + 0x0118, 0x2001, 0x0001, 0x0ca8, 0x2001, 0x180e, 0x2004, 0xd0dc, + 0x0148, 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, + 0x9006, 0x0c38, 0x080c, 0xbb5c, 0x2009, 0x026e, 0x2134, 0x96b4, + 0x00ff, 0x9686, 0x0005, 0x0520, 0x9686, 0x000b, 0x01c8, 0x2009, + 0x026f, 0x2104, 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01c0, + 0x9086, 0x1900, 0x1168, 0x9686, 0x0009, 0x0190, 0x2001, 0x0004, + 0x080c, 0x66fa, 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0020, + 0x2001, 0x0001, 0x080c, 0xbe21, 0x002e, 0x00be, 0x009e, 0x0005, + 0x9286, 0x0139, 0x0160, 0x6014, 0x2048, 0x080c, 0xcf1b, 0x0140, + 0xa864, 0x9086, 0x0139, 0x0118, 0xa868, 0xd0fc, 0x0108, 0x0c40, + 0x6010, 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0138, 0x8001, + 0xb842, 0x601b, 0x000a, 0x6007, 0x0016, 0x08f0, 0xb8a0, 0x9086, + 0x007e, 0x1138, 0x00e6, 0x2071, 0x1800, 0x080c, 0x6130, 0x00ee, + 0x0010, 0x080c, 0x3315, 0x0860, 0x2001, 0x0004, 0x080c, 0x66fa, + 0x080c, 0xc082, 0x1140, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, + 0x961e, 0x0804, 0x9ab3, 0x080c, 0xbb5c, 0x9006, 0x0804, 0xbe21, + 0x0489, 0x1160, 0x2001, 0x0008, 0x080c, 0x66fa, 0x6003, 0x0001, + 0x6007, 0x0005, 0x080c, 0x961e, 0x0804, 0x9ab3, 0x2001, 0x0001, + 0x0804, 0xbe21, 0x00f9, 0x1160, 0x2001, 0x000a, 0x080c, 0x66fa, + 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x961e, 0x0804, 0x9ab3, + 0x2001, 0x0001, 0x0804, 0xbe21, 0x2009, 0x026e, 0x2104, 0x9086, + 0x0003, 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, + 0x2a00, 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, + 0x6110, 0x2158, 0x080c, 0x67c3, 0x001e, 0x00ce, 0x00be, 0x0005, + 0x00b6, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, + 0x2009, 0x1837, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xc12d, + 0x0560, 0x2009, 0x1837, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x6c0d, + 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xea8d, 0x2001, + 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, + 0x080c, 0x32da, 0x00e6, 0x2071, 0x1800, 0x080c, 0x30bf, 0x00ee, + 0x00c6, 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x341e, + 0x8108, 0x1f04, 0xc0c6, 0x015e, 0x00ce, 0x080c, 0xc085, 0x2071, + 0x0260, 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1837, 0x200c, + 0xc1c5, 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, + 0x1108, 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1837, 0x2102, 0x9184, + 0x0050, 0x9086, 0x0050, 0x05d0, 0x2079, 0x0100, 0x2e04, 0x9084, + 0x00ff, 0x2069, 0x181f, 0x206a, 0x78e6, 0x0006, 0x8e70, 0x2e04, + 0x2069, 0x1820, 0x206a, 0x78ea, 0x7832, 0x7836, 0x2010, 0x9084, + 0xff00, 0x001e, 0x9105, 0x2009, 0x182c, 0x200a, 0x2200, 0x9084, + 0x00ff, 0x2008, 0x080c, 0x26d5, 0x080c, 0x779e, 0x0170, 0x2071, + 0x0260, 0x2069, 0x1982, 0x7048, 0x206a, 0x704c, 0x6806, 0x7050, + 0x680a, 0x7054, 0x680e, 0x080c, 0xd348, 0x0040, 0x2001, 0x0006, + 0x080c, 0x66fa, 0x080c, 0x3344, 0x080c, 0xb16c, 0x001e, 0x003e, + 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, 0x0026, 0x0036, + 0x00e6, 0x0156, 0x2019, 0x182c, 0x231c, 0x83ff, 0x01f0, 0x2071, + 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, 0xff00, 0x9205, + 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, 0x2b48, 0x2019, + 0x000a, 0x080c, 0xc222, 0x1148, 0x2011, 0x027a, 0x20a9, 0x0004, + 0x2019, 0x0006, 0x080c, 0xc222, 0x1100, 0x015e, 0x00ee, 0x003e, + 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9086, + 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, 0x703c, 0xd0ec, + 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, 0x7054, 0xd0a4, + 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, 0x00ee, + 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, + 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19f4, 0x252c, 0x2021, + 0x19fb, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7254, 0x7074, + 0x9202, 0x1a04, 0xc1ee, 0x080c, 0x8eee, 0x0904, 0xc1e7, 0x080c, + 0xeabe, 0x0904, 0xc1e7, 0x6720, 0x9786, 0x0007, 0x0904, 0xc1e7, + 0x2500, 0x9c06, 0x0904, 0xc1e7, 0x2400, 0x9c06, 0x0904, 0xc1e7, + 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, 0x0130, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1590, 0x00c6, 0x6043, 0xffff, + 0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x1ad3, 0x9786, 0x000a, + 0x0148, 0x080c, 0xd132, 0x1130, 0x00ce, 0x080c, 0xbb5c, 0x080c, + 0xb1a7, 0x00e8, 0x6014, 0x2048, 0x080c, 0xcf1b, 0x01a8, 0x9786, + 0x0003, 0x1530, 0xa867, 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, + 0xa878, 0x2048, 0x080c, 0x100b, 0x009e, 0xab7a, 0xa877, 0x0000, + 0x080c, 0x7006, 0x080c, 0xd10c, 0x080c, 0xb1a7, 0x00ce, 0x9ce0, + 0x001c, 0x7068, 0x9c02, 0x1210, 0x0804, 0xc18e, 0x012e, 0x000e, + 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, + 0x9786, 0x0006, 0x1118, 0x080c, 0xea30, 0x0c30, 0x9786, 0x0009, + 0x1148, 0x6000, 0x9086, 0x0004, 0x0d08, 0x2009, 0x004c, 0x080c, + 0xb20a, 0x08e0, 0x9786, 0x000a, 0x0980, 0x0820, 0x220c, 0x2304, + 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, 0xc20e, 0x9006, 0x0005, + 0x2304, 0x9102, 0x0218, 0x2001, 0x0001, 0x0008, 0x9006, 0x918d, + 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, 0x8906, 0x8006, 0x8007, + 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9300, 0x2098, 0x3518, + 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, 0x1140, 0x8210, 0x8319, + 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x9102, + 0x0218, 0x2001, 0x0001, 0x0010, 0x2001, 0x0000, 0x918d, 0x0001, + 0x001e, 0x01ce, 0x013e, 0x0005, 0x220c, 0x810f, 0x2304, 0x9106, + 0x1130, 0x8210, 0x8318, 0x1f04, 0xc24c, 0x9006, 0x0005, 0x918d, + 0x0001, 0x0005, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0d85, 0x080c, + 0xd121, 0x0120, 0x080c, 0xd132, 0x0158, 0x0028, 0x080c, 0x3344, + 0x080c, 0xd132, 0x0128, 0x080c, 0x99ed, 0x080c, 0xb16c, 0x0005, + 0x080c, 0xbb5c, 0x0cc0, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, + 0x0208, 0x000a, 0x0005, 0xc292, 0xc292, 0xc292, 0xc292, 0xc292, + 0xc292, 0xc292, 0xc292, 0xc292, 0xc292, 0xc292, 0xc294, 0xc294, + 0xc294, 0xc294, 0xc292, 0xc292, 0xc292, 0xc294, 0xc292, 0xc292, + 0xc292, 0xc292, 0x080c, 0x0d85, 0x600b, 0xffff, 0x6003, 0x000f, + 0x6106, 0x0126, 0x2091, 0x8000, 0x080c, 0xd65d, 0x2009, 0x8000, + 0x080c, 0x9617, 0x012e, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, + 0x9082, 0x0040, 0x0804, 0xc31c, 0x9186, 0x0027, 0x1520, 0x080c, + 0x99ed, 0x080c, 0x3315, 0x080c, 0xd65a, 0x0096, 0x6114, 0x2148, + 0x080c, 0xcf1b, 0x0198, 0x080c, 0xd132, 0x1118, 0x080c, 0xbb5c, + 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0xa97c, + 0xc1c5, 0xa97e, 0x080c, 0x7012, 0x080c, 0xd10c, 0x009e, 0x080c, + 0xb16c, 0x0804, 0x9ab3, 0x9186, 0x0014, 0x1120, 0x6004, 0x9082, + 0x0040, 0x0030, 0x9186, 0x0053, 0x0110, 0x080c, 0x0d85, 0x0005, + 0x0002, 0xc2fa, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, + 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, 0xc313, 0xc313, 0xc313, 0xc313, + 0xc2f8, 0xc313, 0xc2f8, 0xc313, 0xc2f8, 0xc2f8, 0xc2f8, 0xc2f8, + 0x080c, 0x0d85, 0x080c, 0x99ed, 0x0096, 0x6114, 0x2148, 0x080c, + 0xcf1b, 0x0168, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, + 0xa880, 0xc0ec, 0xa882, 0x080c, 0x7012, 0x080c, 0xd10c, 0x009e, + 0x080c, 0xb16c, 0x0005, 0x080c, 0x99ed, 0x080c, 0xd132, 0x090c, + 0xbb5c, 0x080c, 0xb16c, 0x0005, 0x0002, 0xc336, 0xc334, 0xc334, + 0xc334, 0xc334, 0xc334, 0xc334, 0xc334, 0xc334, 0xc334, 0xc334, + 0xc338, 0xc338, 0xc338, 0xc338, 0xc334, 0xc33a, 0xc334, 0xc338, + 0xc334, 0xc334, 0xc334, 0xc334, 0x080c, 0x0d85, 0x080c, 0x0d85, + 0x080c, 0x0d85, 0x080c, 0xb16c, 0x0804, 0x9ab3, 0x9182, 0x0057, + 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xc35d, 0xc35d, + 0xc35d, 0xc35d, 0xc35d, 0xc396, 0xc488, 0xc35d, 0xc494, 0xc35d, + 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, 0xc35d, + 0xc35d, 0xc494, 0xc35f, 0xc35d, 0xc492, 0x080c, 0x0d85, 0x00b6, + 0x0096, 0x6114, 0x2148, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1508, + 0xa87b, 0x0000, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87c, 0xd0ac, + 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc519, 0x080c, 0x6e27, + 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0xb8d0, + 0x9005, 0x0110, 0x080c, 0x68df, 0x080c, 0xb16c, 0x009e, 0x00be, + 0x0005, 0xa87c, 0xd0ac, 0x09e0, 0xa838, 0xa934, 0x9105, 0x09c0, + 0xa880, 0xd0bc, 0x19a8, 0x080c, 0xd267, 0x0c80, 0x00b6, 0x0096, + 0x6114, 0x2148, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, 0x9036, + 0x96b4, 0x0fff, 0x86ff, 0x1590, 0x6010, 0x2058, 0xb800, 0xd0bc, + 0x1904, 0xc477, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, + 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc519, 0x080c, + 0x6e27, 0x6210, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, + 0xb8d0, 0x9005, 0x0110, 0x080c, 0x68df, 0x601c, 0xd0fc, 0x1148, + 0x7044, 0xd0e4, 0x1904, 0xc458, 0x080c, 0xb16c, 0x009e, 0x00be, + 0x0005, 0x2009, 0x0211, 0x210c, 0x080c, 0x0d85, 0x968c, 0x0c00, + 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xc45c, 0x7348, + 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0508, + 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, 0x01a0, + 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, 0x2100, + 0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, 0x0118, + 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, + 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, 0xd6c4, + 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, + 0x0804, 0xc3a2, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, + 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, + 0x0025, 0x080c, 0xca7b, 0x003e, 0xd6cc, 0x0904, 0xc3b7, 0x7154, + 0xa98a, 0x81ff, 0x0904, 0xc3b7, 0x9192, 0x0021, 0x1278, 0x8304, + 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xca7b, 0x2011, 0x0205, + 0x2013, 0x0000, 0x080c, 0xd5e8, 0x0804, 0xc3b7, 0xa868, 0xd0fc, + 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, 0x080c, + 0xca1a, 0x00ae, 0x080c, 0xd5e8, 0x080c, 0xca6b, 0x0804, 0xc3b9, + 0x080c, 0xd22a, 0x0804, 0xc3ce, 0xa87c, 0xd0ac, 0x0904, 0xc3df, + 0xa880, 0xd0bc, 0x1904, 0xc3df, 0x9684, 0x0400, 0x0130, 0xa838, + 0xab34, 0x9305, 0x0904, 0xc3df, 0x00b8, 0x7348, 0xa838, 0x9306, + 0x1198, 0x734c, 0xa834, 0x931e, 0x0904, 0xc3df, 0x0068, 0xa87c, + 0xd0ac, 0x0904, 0xc3aa, 0xa838, 0xa934, 0x9105, 0x0904, 0xc3aa, + 0xa880, 0xd0bc, 0x1904, 0xc3aa, 0x080c, 0xd267, 0x0804, 0xc3ce, + 0x00f6, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x00fe, + 0x0021, 0x0005, 0x0011, 0x0005, 0x0005, 0x0096, 0x6003, 0x0002, + 0x6007, 0x0043, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0128, 0x009e, + 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0xa9ac, 0x910a, 0x2300, + 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, 0x9203, 0x0e90, 0xac46, + 0xab4a, 0xae36, 0xad3a, 0x6044, 0xd0fc, 0x190c, 0xad25, 0x604b, + 0x0000, 0x080c, 0x1c9c, 0x1118, 0x6144, 0x080c, 0x9643, 0x009e, + 0x0005, 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, + 0x0005, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, + 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e2, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, + 0xc4f3, 0xc4e0, 0xc4e0, 0xc4e0, 0xc4e0, 0xc517, 0xc4e0, 0xc4e0, + 0x080c, 0x0d85, 0x6004, 0x9086, 0x0040, 0x1110, 0x080c, 0x99ed, + 0x2019, 0x0001, 0x080c, 0xa596, 0x6003, 0x0002, 0x080c, 0xd662, + 0x080c, 0x9a48, 0x0005, 0x6004, 0x9086, 0x0040, 0x1110, 0x080c, + 0x99ed, 0x2019, 0x0001, 0x080c, 0xa596, 0x080c, 0x9a48, 0x080c, + 0x3315, 0x080c, 0xd65a, 0x0096, 0x6114, 0x2148, 0x080c, 0xcf1b, + 0x0150, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, + 0x7012, 0x080c, 0xd10c, 0x009e, 0x080c, 0xb16c, 0x0005, 0x080c, + 0x0d85, 0xa87b, 0x0015, 0xd1fc, 0x0180, 0xa87b, 0x0007, 0x8002, + 0x8000, 0x810a, 0x9189, 0x0000, 0x0006, 0x0016, 0x2009, 0x1a7c, + 0x2104, 0x8000, 0x200a, 0x001e, 0x000e, 0xa992, 0xa88e, 0x0005, + 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, + 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc551, 0xc54f, 0xc54f, + 0xc60e, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, 0xc54f, + 0xc54f, 0xc54f, 0xc54f, 0xc74e, 0xc54f, 0xc758, 0xc54f, 0x080c, + 0x0d85, 0x601c, 0xd0bc, 0x0178, 0xd084, 0x0168, 0xd0f4, 0x0120, + 0xc084, 0x601e, 0x0804, 0xc33e, 0x6114, 0x0096, 0x2148, 0xa87c, + 0xc0e5, 0xa87e, 0x009e, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, + 0x0260, 0x6114, 0x2150, 0x601c, 0xd0fc, 0x1110, 0x7644, 0x0008, + 0x9036, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, 0x6210, + 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, + 0x86ff, 0x0904, 0xc607, 0x9694, 0xff00, 0x9284, 0x0c00, 0x0120, + 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, 0xc607, + 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, 0xc6c4, 0xb676, + 0x0c38, 0x080c, 0x1059, 0x090c, 0x0d85, 0x2900, 0xb07a, 0xb77c, + 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, + 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, 0xf000, 0x9635, 0xae76, + 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, + 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, 0x0028, 0x1118, 0xa87b, + 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd6d4, + 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0xaf7e, 0xb080, + 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, 0x0190, 0x735c, 0xab86, + 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, + 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, 0x080c, 0xca7b, 0x003e, + 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, 0x01c8, 0x9192, 0x0021, + 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xca7b, + 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, 0xb068, 0xd0fc, 0x0120, + 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, 0x080c, 0xca1a, 0x080c, + 0x1a9f, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x2001, 0x1988, + 0x2004, 0x604a, 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, + 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, 0x0002, 0x080c, 0xd66b, + 0x0904, 0xc749, 0x604b, 0x0000, 0x6010, 0x00b6, 0x2058, 0xb800, + 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, 0xc70d, 0xa978, 0xa868, + 0xd0fc, 0x0904, 0xc6ce, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, + 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x0904, + 0xc69b, 0x9086, 0x0028, 0x1904, 0xc687, 0xa87b, 0x001c, 0xb07b, + 0x001c, 0x0804, 0xc6a3, 0x6024, 0xd0f4, 0x11d0, 0xa838, 0xaa34, + 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, 0x1120, 0xa88c, 0xaa34, + 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, 0xa9ac, 0xa834, 0x9102, + 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, 0x6024, 0xc0f5, 0x6026, + 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, 0xb83e, 0x00be, 0x601c, + 0xc0fc, 0x601e, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, + 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, + 0x080c, 0x100b, 0x009e, 0x080c, 0xd267, 0x0804, 0xc749, 0xd1dc, + 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd508, 0x0118, + 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, + 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, + 0x9115, 0x190c, 0xc519, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, + 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, + 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, + 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, + 0x000e, 0xc0cc, 0xa87e, 0x080c, 0xd5e8, 0x001e, 0xa874, 0x0006, + 0x2148, 0x080c, 0x100b, 0x001e, 0x0804, 0xc73a, 0x0016, 0x00a6, + 0x2150, 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, + 0x0028, 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, + 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xd508, 0x0118, + 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, + 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, + 0x9115, 0x190c, 0xc519, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, + 0xb07e, 0x00ae, 0x080c, 0x100b, 0x009e, 0x080c, 0xd5e8, 0xa974, + 0x0016, 0x080c, 0xca6b, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, + 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, + 0xa87b, 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, + 0xd508, 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, + 0xa87b, 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, + 0xa834, 0xa938, 0x9115, 0x190c, 0xc519, 0xa974, 0x0016, 0x080c, + 0x6e27, 0x001e, 0x6010, 0x00b6, 0x2058, 0xba3c, 0xb8d0, 0x0016, + 0x9005, 0x190c, 0x68df, 0x001e, 0x00be, 0xd1e4, 0x1120, 0x080c, + 0xb16c, 0x009e, 0x0005, 0x080c, 0xd22a, 0x0cd8, 0x6114, 0x0096, + 0x2148, 0xa97c, 0x080c, 0xd66b, 0x190c, 0x1abf, 0x009e, 0x0005, + 0x0096, 0x6114, 0x2148, 0xa83c, 0xa940, 0x9105, 0x01e8, 0xa877, + 0x0000, 0xa87b, 0x0000, 0xa867, 0x0103, 0x00b6, 0x6010, 0x2058, + 0xa834, 0xa938, 0x9115, 0x11a0, 0x080c, 0x6e27, 0xba3c, 0x8211, + 0x0208, 0xba3e, 0xb8d0, 0x9005, 0x0110, 0x080c, 0x68df, 0x080c, + 0xb16c, 0x00be, 0x009e, 0x0005, 0xa87c, 0xc0dc, 0xa87e, 0x08f8, + 0xb800, 0xd0bc, 0x1120, 0xa834, 0x080c, 0xc519, 0x0c28, 0xa880, + 0xd0bc, 0x1dc8, 0x080c, 0xd267, 0x0c60, 0x080c, 0x99ed, 0x0010, + 0x080c, 0x9a48, 0x601c, 0xd084, 0x0110, 0x080c, 0x1ad3, 0x080c, + 0xcf1b, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xd132, 0x1118, + 0x080c, 0xbb5c, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, 0x210c, + 0xd18c, 0x1198, 0xd184, 0x1170, 0x6108, 0xa97a, 0x918e, 0x0029, + 0x1110, 0x080c, 0xeddf, 0xa877, 0x0000, 0x080c, 0x7012, 0x009e, + 0x0804, 0xb1a7, 0xa87b, 0x0004, 0x0cb0, 0xa87b, 0x0004, 0x0c98, + 0x9182, 0x0057, 0x1220, 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, + 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7e1, 0xc7df, 0xc7df, + 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc7df, + 0xc7df, 0xc7df, 0xc7df, 0xc7df, 0xc805, 0xc7df, 0xc7df, 0x080c, + 0x0d85, 0x080c, 0x5848, 0x01f8, 0x6014, 0x7144, 0x918c, 0x0fff, + 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff, 0x0096, 0x904d, + 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139, 0x0128, 0xa867, + 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000, 0xa99a, 0xaa9e, + 0x080c, 0x7012, 0x009e, 0x0804, 0xb16c, 0x080c, 0x5848, 0x0dd8, + 0x6014, 0x900e, 0x9016, 0x0c10, 0x9182, 0x0085, 0x0002, 0xc81e, + 0xc81c, 0xc81c, 0xc82a, 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0xc81c, + 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0x080c, 0x0d85, 0x6003, 0x0001, + 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0x8020, 0x080c, 0x9617, + 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, 0x00e6, 0x2071, 0x0260, + 0x7224, 0x6216, 0x7220, 0x080c, 0xcf09, 0x01f8, 0x2268, 0x6800, + 0x9086, 0x0000, 0x01d0, 0x6010, 0x6d10, 0x952e, 0x11b0, 0x00c6, + 0x2d60, 0x00d6, 0x080c, 0xcadc, 0x00de, 0x00ce, 0x0158, 0x702c, + 0xd084, 0x1118, 0x080c, 0xcaa6, 0x0010, 0x6803, 0x0002, 0x6007, + 0x0086, 0x0028, 0x080c, 0xcac8, 0x0d90, 0x6007, 0x0087, 0x6003, + 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x7220, 0x080c, 0xcf09, + 0x0178, 0x6810, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, + 0x6824, 0xd0ec, 0x0128, 0x00c6, 0x2d60, 0x080c, 0xd267, 0x00ce, + 0x00ee, 0x00de, 0x005e, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, + 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0d85, 0x908a, 0x0092, 0x1a0c, + 0x0d85, 0x9082, 0x0085, 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, + 0x0014, 0x190c, 0x0d85, 0x080c, 0x99ed, 0x0096, 0x6014, 0x2048, + 0x080c, 0xcf1b, 0x0140, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, + 0x0029, 0x080c, 0x7012, 0x009e, 0x080c, 0xb1a7, 0x0804, 0x9ab3, + 0xc8ad, 0xc8af, 0xc8af, 0xc8ad, 0xc8ad, 0xc8ad, 0xc8ad, 0xc8ad, + 0xc8ad, 0xc8ad, 0xc8ad, 0xc8ad, 0xc8ad, 0x080c, 0x0d85, 0x080c, + 0xb1a7, 0x0005, 0x9186, 0x0013, 0x1130, 0x6004, 0x9082, 0x0085, + 0x2008, 0x0804, 0xc8fe, 0x9186, 0x0027, 0x1558, 0x080c, 0x99ed, + 0x080c, 0x3315, 0x080c, 0xd65a, 0x0096, 0x6014, 0x2048, 0x080c, + 0xcf1b, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, + 0x080c, 0x7012, 0x080c, 0xd10c, 0x009e, 0x080c, 0xb16c, 0x0005, + 0x9186, 0x0089, 0x0118, 0x9186, 0x008a, 0x1140, 0x080c, 0xaf61, + 0x0128, 0x9086, 0x000c, 0x0904, 0xc936, 0x0000, 0x080c, 0xb227, + 0x0c70, 0x9186, 0x0014, 0x1d60, 0x080c, 0x99ed, 0x0096, 0x6014, + 0x2048, 0x080c, 0xcf1b, 0x0d00, 0xa867, 0x0103, 0xa877, 0x0000, + 0xa87b, 0x0006, 0xa880, 0xc0ec, 0xa882, 0x0890, 0x0002, 0xc90e, + 0xc90c, 0xc90c, 0xc90c, 0xc90c, 0xc90c, 0xc922, 0xc90c, 0xc90c, + 0xc90c, 0xc90c, 0xc90c, 0xc90c, 0x080c, 0x0d85, 0x6034, 0x908c, + 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, + 0x2001, 0x1986, 0x0010, 0x2001, 0x1987, 0x2004, 0x601a, 0x6003, + 0x000c, 0x0005, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, + 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1986, 0x0010, 0x2001, + 0x1987, 0x2004, 0x601a, 0x6003, 0x000e, 0x0005, 0x9182, 0x0092, + 0x1220, 0x9182, 0x0085, 0x0208, 0x0012, 0x0804, 0xb227, 0xc94c, + 0xc94c, 0xc94c, 0xc94c, 0xc94e, 0xc99b, 0xc94c, 0xc94c, 0xc94c, + 0xc94c, 0xc94c, 0xc94c, 0xc94c, 0x080c, 0x0d85, 0x0096, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0168, 0x6034, 0x908c, + 0xff00, 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, + 0x009e, 0x0804, 0xc9af, 0x080c, 0xcf1b, 0x1118, 0x080c, 0xd10c, + 0x0068, 0x6014, 0x2048, 0x080c, 0xd671, 0x1110, 0x080c, 0xd10c, + 0xa867, 0x0103, 0x080c, 0xd625, 0x080c, 0x7012, 0x00d6, 0x2c68, + 0x080c, 0xb116, 0x01d0, 0x6003, 0x0001, 0x6007, 0x001e, 0x600b, + 0xffff, 0x2009, 0x026e, 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, + 0x613e, 0x6910, 0x6112, 0x080c, 0xd3b6, 0x695c, 0x615e, 0x6023, + 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x2d60, 0x00de, 0x080c, + 0xb16c, 0x009e, 0x0005, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x05a0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, + 0x0130, 0x9186, 0x001e, 0x0118, 0x9186, 0x0039, 0x1538, 0x00d6, + 0x2c68, 0x080c, 0xd5bb, 0x11f0, 0x080c, 0xb116, 0x01d8, 0x6106, + 0x6003, 0x0001, 0x6023, 0x0001, 0x6910, 0x6112, 0x692c, 0x612e, + 0x6930, 0x6132, 0x6934, 0x918c, 0x00ff, 0x6136, 0x6938, 0x613a, + 0x693c, 0x613e, 0x695c, 0x615e, 0x080c, 0xd3b6, 0x2009, 0x8020, + 0x080c, 0x9617, 0x2d60, 0x00de, 0x0804, 0xb16c, 0x0096, 0x6014, + 0x2048, 0x080c, 0xcf1b, 0x01c8, 0xa867, 0x0103, 0xa880, 0xd0b4, + 0x0128, 0xc0ec, 0xa882, 0xa87b, 0x0006, 0x0048, 0xd0bc, 0x0118, + 0xa87b, 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xd226, 0xa877, + 0x0000, 0x080c, 0x7012, 0x080c, 0xd10c, 0x009e, 0x0804, 0xb16c, + 0x0016, 0x0096, 0x6014, 0x2048, 0x080c, 0xcf1b, 0x0140, 0xa867, + 0x0103, 0xa87b, 0x0028, 0xa877, 0x0000, 0x080c, 0x7012, 0x009e, + 0x001e, 0x9186, 0x0013, 0x0158, 0x9186, 0x0014, 0x0130, 0x9186, + 0x0027, 0x0118, 0x080c, 0xb227, 0x0020, 0x080c, 0x99ed, 0x080c, + 0xb1a7, 0x0005, 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, + 0x9182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304, + 0x9098, 0x0018, 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xca7b, + 0x96b2, 0x0020, 0xb004, 0x904d, 0x0110, 0x080c, 0x100b, 0x080c, + 0x1059, 0x0520, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, + 0xb406, 0x968a, 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499, + 0x00a8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, + 0x0451, 0x0c28, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, + 0x95ad, 0x0003, 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, + 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, + 0x006e, 0x005e, 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, + 0x0130, 0xa807, 0x0000, 0x080c, 0x7012, 0x2a48, 0x0cb8, 0x080c, + 0x7012, 0x00ae, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, + 0x0080, 0x7816, 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, + 0xa860, 0x20e8, 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, + 0x9e00, 0x2098, 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018, + 0x2300, 0x9e00, 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, + 0x8109, 0x1d80, 0x7817, 0x0000, 0x00fe, 0x0005, 0x6920, 0x9186, + 0x0003, 0x0118, 0x9186, 0x0002, 0x11d0, 0x00c6, 0x00d6, 0x00e6, + 0x2d60, 0x0096, 0x6014, 0x2048, 0x080c, 0xcf1b, 0x0150, 0x2001, + 0x0006, 0xa980, 0xc1d5, 0x080c, 0x725e, 0x080c, 0x7006, 0x080c, + 0xd10c, 0x009e, 0x080c, 0xb1a7, 0x00ee, 0x00de, 0x00ce, 0x0005, + 0x00c6, 0x702c, 0xd084, 0x1170, 0x6008, 0x2060, 0x6020, 0x9086, + 0x0002, 0x1140, 0x6104, 0x9186, 0x0085, 0x0118, 0x9186, 0x008b, + 0x1108, 0x9006, 0x00ce, 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, + 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e, 0x006e, + 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, 0x6020, + 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xcb2a, 0xcb2a, + 0xcb25, 0xcb4e, 0xcb06, 0xcb25, 0xcb08, 0xcb25, 0xcb25, 0x9458, + 0xcb25, 0xcb25, 0xcb25, 0xcb06, 0xcb06, 0xcb06, 0x080c, 0x0d85, + 0x6010, 0x9080, 0x0000, 0x2004, 0xd0bc, 0x190c, 0xcb4e, 0x0036, + 0x6014, 0x0096, 0x2048, 0xa880, 0x009e, 0xd0cc, 0x0118, 0x2019, + 0x000c, 0x0038, 0xd094, 0x0118, 0x2019, 0x000d, 0x0010, 0x2019, + 0x0010, 0x080c, 0xe578, 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, + 0x0001, 0x0005, 0x0096, 0x86ff, 0x11e8, 0x6014, 0x2048, 0x080c, + 0xcf1b, 0x01d0, 0x6043, 0xffff, 0xa864, 0x9086, 0x0139, 0x1128, + 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, 0x900e, 0x2001, 0x0005, + 0x080c, 0x725e, 0x080c, 0xd226, 0x080c, 0x7006, 0x080c, 0xb1a7, + 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, 0x0ce0, 0x080c, 0xacfc, + 0x080c, 0xd67f, 0x908a, 0x0010, 0x1a0c, 0x0d85, 0x002b, 0x0106, + 0x080c, 0xad18, 0x010e, 0x0005, 0xcb6c, 0xcb9c, 0xcb6e, 0xcbc3, + 0xcb97, 0xcb6c, 0xcb25, 0xcb2a, 0xcb2a, 0xcb25, 0xcb25, 0xcb25, + 0xcb25, 0xcb25, 0xcb25, 0xcb25, 0x080c, 0x0d85, 0x86ff, 0x1520, + 0x6020, 0x9086, 0x0006, 0x0500, 0x0096, 0x6014, 0x2048, 0x080c, + 0xcf1b, 0x0168, 0xa87c, 0xd0cc, 0x0140, 0x0096, 0xc0cc, 0xa87e, + 0xa878, 0x2048, 0x080c, 0x100b, 0x009e, 0x080c, 0xd226, 0x009e, + 0x080c, 0xd5ff, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x2009, 0x8020, 0x080c, 0x95f9, 0x9085, 0x0001, 0x0005, 0x0066, + 0x080c, 0x1ad3, 0x006e, 0x0890, 0x00e6, 0x2071, 0x19e8, 0x7030, + 0x9c06, 0x1120, 0x080c, 0xa516, 0x00ee, 0x0840, 0x6020, 0x9084, + 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001, + 0x2c40, 0x080c, 0xa667, 0x009e, 0x008e, 0x0040, 0x0066, 0x080c, + 0xa412, 0x190c, 0x0d85, 0x080c, 0xa420, 0x006e, 0x00ee, 0x1904, + 0xcb6e, 0x0804, 0xcb25, 0x0036, 0x00e6, 0x2071, 0x19e8, 0x704c, + 0x9c06, 0x1138, 0x901e, 0x080c, 0xa596, 0x00ee, 0x003e, 0x0804, + 0xcb6e, 0x080c, 0xa7a1, 0x00ee, 0x003e, 0x1904, 0xcb6e, 0x0804, + 0xcb25, 0x00c6, 0x0066, 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, + 0x00ce, 0x0005, 0xcbf9, 0xcce2, 0xce50, 0xcc01, 0xb1a7, 0xcbf9, + 0xe56e, 0xd667, 0xcce2, 0x941f, 0xcedc, 0xcbf2, 0xcbf2, 0xcbf2, + 0xcbf2, 0xcbf2, 0x080c, 0x0d85, 0x080c, 0xd132, 0x1110, 0x080c, + 0xbb5c, 0x0005, 0x080c, 0x99ed, 0x0804, 0xb16c, 0x601b, 0x0001, + 0x0005, 0x080c, 0xcf1b, 0x0130, 0x6014, 0x0096, 0x2048, 0x2c00, + 0xa896, 0x009e, 0x080c, 0xacfc, 0x080c, 0xd67f, 0x908a, 0x0010, + 0x1a0c, 0x0d85, 0x0013, 0x0804, 0xad18, 0xcc25, 0xcc27, 0xcc51, + 0xcc65, 0xcc92, 0xcc25, 0xcbf9, 0xcbf9, 0xcbf9, 0xcc6c, 0xcc6c, + 0xcc25, 0xcc25, 0xcc25, 0xcc25, 0xcc76, 0x080c, 0x0d85, 0x00e6, + 0x6014, 0x0096, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x2071, + 0x19e8, 0x7030, 0x9c06, 0x01d0, 0x0066, 0x080c, 0xa412, 0x190c, + 0x0d85, 0x080c, 0xa420, 0x006e, 0x080c, 0xd5ff, 0x6007, 0x0085, + 0x6003, 0x000b, 0x6023, 0x0002, 0x2001, 0x1987, 0x2004, 0x601a, + 0x2009, 0x8020, 0x080c, 0x95f9, 0x00ee, 0x0005, 0x601b, 0x0001, + 0x0cd8, 0x0096, 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, + 0x080c, 0xd5ff, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x2009, 0x8020, 0x080c, 0x95f9, 0x0005, 0x080c, 0xacfc, 0x080c, + 0xaee3, 0x080c, 0xad18, 0x0c28, 0x0096, 0x601b, 0x0001, 0x6014, + 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x5848, + 0x01b8, 0x6014, 0x0096, 0x904d, 0x0190, 0xa864, 0xa867, 0x0103, + 0xa87b, 0x0006, 0x9086, 0x0139, 0x1150, 0xa867, 0x0139, 0xa87b, + 0x0030, 0xa897, 0x4005, 0xa89b, 0x0004, 0x080c, 0x7012, 0x009e, + 0x0804, 0xb16c, 0x6014, 0x0096, 0x904d, 0x0904, 0xccdd, 0xa97c, + 0xd1e4, 0x1160, 0x611c, 0xd1fc, 0x0904, 0xccdd, 0x6110, 0x00b6, + 0x2158, 0xb93c, 0x8109, 0x0208, 0xb93e, 0x00be, 0x080c, 0xad18, + 0x2001, 0x180f, 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, + 0x009e, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0030, + 0x2c08, 0x080c, 0x16b9, 0x2001, 0x030c, 0x2004, 0x9086, 0x0041, + 0x1198, 0x6014, 0x0096, 0x904d, 0x090c, 0x0d85, 0xa880, 0xd0f4, + 0x1130, 0xc0f5, 0xa882, 0x009e, 0x601b, 0x0002, 0x0068, 0x009e, + 0x00c6, 0x080c, 0x2185, 0x00ce, 0x6000, 0x9086, 0x0004, 0x1120, + 0x2009, 0x0048, 0x080c, 0xb20a, 0x0005, 0x009e, 0x080c, 0x1ad3, + 0x0804, 0xcc51, 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0d85, 0x000b, + 0x0005, 0xccf9, 0xcbfe, 0xccfb, 0xccf9, 0xccfb, 0xccfb, 0xcbfa, + 0xccf9, 0xcbf4, 0xcbf4, 0xccf9, 0xccf9, 0xccf9, 0xccf9, 0xccf9, + 0xccf9, 0x080c, 0x0d85, 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, + 0x00ff, 0x00be, 0x908a, 0x000c, 0x1a0c, 0x0d85, 0x00b6, 0x0013, + 0x00be, 0x0005, 0xcd16, 0xcde7, 0xcd18, 0xcd58, 0xcd18, 0xcd58, + 0xcd18, 0xcd26, 0xcd16, 0xcd58, 0xcd16, 0xcd47, 0x080c, 0x0d85, + 0x6004, 0x908e, 0x0016, 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, + 0x0002, 0x0590, 0x908e, 0x0052, 0x0904, 0xcde3, 0x6004, 0x080c, + 0xd132, 0x0904, 0xce00, 0x908e, 0x0004, 0x1110, 0x080c, 0x3344, + 0x908e, 0x0021, 0x0904, 0xce04, 0x908e, 0x0022, 0x0904, 0xce4b, + 0x908e, 0x003d, 0x0904, 0xce04, 0x908e, 0x0039, 0x0904, 0xce08, + 0x908e, 0x0035, 0x0904, 0xce08, 0x908e, 0x001e, 0x0178, 0x908e, + 0x0001, 0x1140, 0x6010, 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, + 0x0006, 0x0110, 0x080c, 0x3315, 0x080c, 0xbb5c, 0x0804, 0xb1a7, + 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0904, 0xcdd4, 0x9186, + 0x0002, 0x1904, 0xcda9, 0x2001, 0x1837, 0x2004, 0xd08c, 0x11c8, + 0x080c, 0x779e, 0x11b0, 0x080c, 0xd645, 0x0138, 0x080c, 0x77c1, + 0x1120, 0x080c, 0x76a7, 0x0804, 0xce34, 0x2001, 0x197d, 0x2003, + 0x0001, 0x2001, 0x1800, 0x2003, 0x0001, 0x080c, 0x76cd, 0x0804, + 0xce34, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x0080, 0x0130, 0x2001, + 0x1837, 0x2004, 0xd0ac, 0x1904, 0xce34, 0xb8a0, 0x9082, 0x0081, + 0x1a04, 0xce34, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, 0x8001, + 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b, + 0x0000, 0x080c, 0xb116, 0x0128, 0x2b00, 0x6012, 0x6023, 0x0001, + 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, 0x6010, + 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1837, 0x2104, + 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x6130, 0x00ee, + 0x080c, 0xbb5c, 0x0030, 0x080c, 0xbb5c, 0x080c, 0x3315, 0x080c, + 0xd65a, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x3344, 0x012e, + 0x00ee, 0x080c, 0xb1a7, 0x0005, 0x2001, 0x0002, 0x080c, 0x66fa, + 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x961e, 0x080c, 0x9ab3, + 0x00de, 0x00ce, 0x0c80, 0x080c, 0x3344, 0x0804, 0xcd54, 0x00c6, + 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, 0xb840, + 0x9084, 0x00ff, 0x9005, 0x0904, 0xcda9, 0x8001, 0xb842, 0x6003, + 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x00de, 0x00ce, 0x0898, + 0x080c, 0xbb5c, 0x0804, 0xcd56, 0x080c, 0xbb98, 0x0804, 0xcd56, + 0x00d6, 0x2c68, 0x6104, 0x080c, 0xd5bb, 0x00de, 0x0118, 0x080c, + 0xb16c, 0x0408, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, + 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x603c, + 0x600a, 0x2001, 0x1987, 0x2004, 0x601a, 0x602c, 0x2c08, 0x2060, + 0x6024, 0xd0b4, 0x0108, 0xc085, 0xc0b5, 0x6026, 0x2160, 0x2009, + 0x8020, 0x080c, 0x9617, 0x0005, 0x00de, 0x00ce, 0x080c, 0xbb5c, + 0x080c, 0x3315, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x3344, + 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, 0x604b, 0x0000, + 0x012e, 0x00ee, 0x0005, 0x080c, 0xb5a8, 0x1904, 0xce00, 0x0005, + 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0d85, 0x0096, 0x00d6, 0x001b, + 0x00de, 0x009e, 0x0005, 0xce6b, 0xce6b, 0xce6b, 0xce6b, 0xce6b, + 0xce6b, 0xce6b, 0xce6b, 0xce6b, 0xcbf9, 0xce6b, 0xcbfe, 0xce6d, + 0xcbfe, 0xce87, 0xce6b, 0x080c, 0x0d85, 0x6004, 0x9086, 0x008b, + 0x01b0, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0035, 0x1130, + 0x602c, 0x9080, 0x0009, 0x200c, 0xc185, 0x2102, 0x6007, 0x008b, + 0x6003, 0x000d, 0x2009, 0x8020, 0x080c, 0x9617, 0x0005, 0x080c, + 0xd639, 0x0118, 0x080c, 0xd64c, 0x0010, 0x080c, 0xd65a, 0x080c, + 0xd10c, 0x080c, 0xcf1b, 0x0570, 0x080c, 0x3315, 0x080c, 0xcf1b, + 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, 0xa877, + 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x7012, 0x2c68, 0x080c, + 0xb116, 0x0150, 0x6810, 0x6012, 0x080c, 0xd3b6, 0x00c6, 0x2d60, + 0x080c, 0xb1a7, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, 0x6023, + 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x961e, 0x080c, + 0x9ab3, 0x00c8, 0x080c, 0xd639, 0x0138, 0x6034, 0x9086, 0x4000, + 0x1118, 0x080c, 0x3315, 0x08d0, 0x6034, 0x908c, 0xff00, 0x810f, + 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, 0x3315, + 0x0868, 0x080c, 0xb1a7, 0x0005, 0x6000, 0x908a, 0x0010, 0x1a0c, + 0x0d85, 0x0002, 0xcef2, 0xcef2, 0xcefa, 0xcef4, 0xcf04, 0xcef2, + 0xcef2, 0xb1a7, 0xcef2, 0xcef2, 0xcef2, 0xcef2, 0xcef2, 0xcef2, + 0xcef2, 0xcef2, 0x080c, 0x0d85, 0x080c, 0xacfc, 0x080c, 0xaee3, + 0x080c, 0xad18, 0x6114, 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, + 0x7012, 0x009e, 0x0804, 0xb16c, 0x601c, 0xd084, 0x190c, 0x1ad3, + 0x0c88, 0x9284, 0x0003, 0x1158, 0x9282, 0x1ddc, 0x0240, 0x2001, + 0x181a, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, + 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, + 0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x1104, + 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7354, 0x7074, + 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xd645, 0x0180, + 0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, + 0x3315, 0x080c, 0xd65a, 0x00c6, 0x080c, 0xb1a7, 0x00ce, 0x0060, + 0x080c, 0xd328, 0x0148, 0x080c, 0xd132, 0x1110, 0x080c, 0xbb5c, + 0x00c6, 0x080c, 0xb16c, 0x00ce, 0x9ce0, 0x001c, 0x7068, 0x9c02, + 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, + 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, + 0x2061, 0x1b39, 0x6112, 0x080c, 0x3315, 0x9006, 0x0010, 0x9085, + 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x080c, 0xb116, 0x01b0, 0x665e, 0x2b00, 0x6012, 0x080c, + 0x5848, 0x0118, 0x080c, 0xd04e, 0x0168, 0x080c, 0xd3b6, 0x6023, + 0x0003, 0x2009, 0x004b, 0x080c, 0xb20a, 0x9085, 0x0001, 0x012e, + 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, + 0xbaa0, 0x080c, 0xb1dd, 0x0580, 0x605f, 0x0000, 0x2b00, 0x6012, + 0x080c, 0xd3b6, 0x6023, 0x0003, 0x0016, 0x080c, 0xacfc, 0x080c, + 0x97b0, 0x0076, 0x903e, 0x080c, 0x966d, 0x2c08, 0x080c, 0xe75d, + 0x007e, 0x080c, 0xad18, 0x001e, 0xd184, 0x0128, 0x080c, 0xb16c, + 0x9085, 0x0001, 0x0070, 0x080c, 0x5848, 0x0128, 0xd18c, 0x1170, + 0x080c, 0xd04e, 0x0148, 0x2009, 0x004c, 0x080c, 0xb20a, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, + 0x0c90, 0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, + 0x0046, 0x0016, 0x080c, 0xb116, 0x2c78, 0x05a0, 0x7e5e, 0x2b00, + 0x7812, 0x7823, 0x0003, 0x0016, 0x2021, 0x0005, 0x080c, 0xd060, + 0x001e, 0x9186, 0x004d, 0x0118, 0x9186, 0x004e, 0x0148, 0x2001, + 0x1980, 0x200c, 0xd1fc, 0x0168, 0x2f60, 0x080c, 0xb16c, 0x00d0, + 0x2001, 0x197f, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xb16c, + 0x0088, 0x2f60, 0x080c, 0x5848, 0x0138, 0xd18c, 0x1118, 0x04f1, + 0x0148, 0x0010, 0x2900, 0x7816, 0x001e, 0x0016, 0x080c, 0xb20a, + 0x9085, 0x0001, 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, + 0x00c6, 0x0046, 0x080c, 0xb116, 0x2c78, 0x0508, 0x7e5e, 0x2b00, + 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, 0x0004, 0x0489, 0x009e, + 0x2001, 0x197e, 0x200c, 0xd1fc, 0x0120, 0x2f60, 0x080c, 0xb16c, + 0x0060, 0x2f60, 0x080c, 0x5848, 0x0120, 0xd18c, 0x1160, 0x0071, + 0x0130, 0x2009, 0x0052, 0x080c, 0xb20a, 0x9085, 0x0001, 0x004e, + 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, 0x0c98, 0x00c6, 0x080c, + 0x4c41, 0x00ce, 0x1120, 0x080c, 0xb16c, 0x9006, 0x0005, 0xa867, + 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, 0x9085, 0x0001, 0x0005, + 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0xacfc, 0x080c, + 0x699d, 0x0158, 0x2001, 0xd067, 0x0006, 0x900e, 0x2400, 0x080c, + 0x725e, 0x080c, 0x7012, 0x000e, 0x0807, 0x2418, 0x080c, 0x99b3, + 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x080c, + 0x97ca, 0x008e, 0x080c, 0x966d, 0x2f08, 0x2648, 0x080c, 0xe75d, + 0xb93c, 0x81ff, 0x090c, 0x98a3, 0x080c, 0xad18, 0x012e, 0x007e, + 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xb116, + 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, 0x0001, + 0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0xb20a, 0x9085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x080c, 0xb1dd, 0x01b8, 0x660a, 0x2b08, 0x6112, 0x080c, + 0xd3b6, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, 0x080c, + 0x17ad, 0x00fe, 0x2009, 0x0021, 0x080c, 0xb20a, 0x9085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, 0x00c6, + 0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0xb116, 0x0198, 0x660a, + 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, 0x0001, 0x2900, 0x6016, + 0x001e, 0x0016, 0x080c, 0xb20a, 0x9085, 0x0001, 0x001e, 0x012e, + 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, 0x8000, + 0x080c, 0xb1dd, 0x0188, 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, + 0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0xb20a, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x0044, + 0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, 0x2258, + 0xba3c, 0x82ff, 0x0118, 0x8211, 0xba3e, 0x1140, 0xb8d0, 0x9005, + 0x0128, 0xb888, 0x9005, 0x1110, 0xb88b, 0x0001, 0x00be, 0x002e, + 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, + 0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, + 0x000e, 0x0005, 0x0006, 0x0086, 0x0096, 0x6020, 0x9086, 0x0004, + 0x01a8, 0x6014, 0x904d, 0x080c, 0xcf1b, 0x0180, 0xa864, 0x9086, + 0x0139, 0x0170, 0x6020, 0x90c6, 0x0003, 0x0140, 0x90c6, 0x0002, + 0x0128, 0xa868, 0xd0fc, 0x0110, 0x9006, 0x0010, 0x9085, 0x0001, + 0x009e, 0x008e, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, + 0x080c, 0xb1dd, 0x0198, 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, + 0x0001, 0x2900, 0x6016, 0x080c, 0x3315, 0x2009, 0x0028, 0x080c, + 0xb20a, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, + 0x9186, 0x0015, 0x11a8, 0x2011, 0x1824, 0x2204, 0x9086, 0x0074, + 0x1178, 0x00b6, 0x080c, 0xbe09, 0x00be, 0x080c, 0xc085, 0x6003, + 0x0001, 0x6007, 0x0029, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0078, + 0x6014, 0x0096, 0x2048, 0xa868, 0x009e, 0xd0fc, 0x0148, 0x2001, + 0x0001, 0x080c, 0xd57c, 0x080c, 0xbb5c, 0x080c, 0xb16c, 0x0005, + 0x0096, 0x6014, 0x904d, 0x090c, 0x0d85, 0xa87b, 0x0030, 0xa883, + 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, + 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x009e, 0x080c, 0xb16c, + 0x0c30, 0x0096, 0x9186, 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, + 0x66fa, 0x00e8, 0x9186, 0x0015, 0x1510, 0x2011, 0x1824, 0x2204, + 0x9086, 0x0014, 0x11e0, 0x6010, 0x00b6, 0x2058, 0x080c, 0x684f, + 0x00be, 0x080c, 0xc15b, 0x1198, 0x6010, 0x00b6, 0x2058, 0xb890, + 0x00be, 0x9005, 0x0160, 0x2001, 0x0006, 0x080c, 0x66fa, 0x6014, + 0x2048, 0xa868, 0xd0fc, 0x0170, 0x080c, 0xb57c, 0x0048, 0x6014, + 0x2048, 0xa868, 0xd0fc, 0x0528, 0x080c, 0xbb5c, 0x080c, 0xb16c, + 0x009e, 0x0005, 0x6014, 0x6310, 0x2358, 0x904d, 0x090c, 0x0d85, + 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x900e, 0x080c, + 0x6aae, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xa99a, + 0x0126, 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x080c, 0xb16c, + 0x08f8, 0x6014, 0x904d, 0x090c, 0x0d85, 0xa87b, 0x0030, 0xa883, + 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0xa867, 0x0139, 0x0126, + 0x2091, 0x8000, 0x080c, 0x7012, 0x012e, 0x080c, 0xb16c, 0x0840, + 0xa878, 0x9086, 0x0005, 0x1108, 0x0009, 0x0005, 0xa880, 0xc0ad, + 0xa882, 0x0005, 0x604b, 0x0000, 0x6017, 0x0000, 0x6003, 0x0001, + 0x6007, 0x0050, 0x2009, 0x8023, 0x080c, 0x9617, 0x0005, 0x00c6, + 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0130, 0x0066, + 0x6020, 0x9084, 0x000f, 0x001b, 0x006e, 0x00ce, 0x0005, 0xcbf9, + 0xd259, 0xd259, 0xd25c, 0xeadc, 0xeaf7, 0xeafa, 0xcbf9, 0xcbf9, + 0xcbf9, 0xcbf9, 0xcbf9, 0xcbf9, 0xcbf9, 0xcbf9, 0xcbf9, 0x080c, + 0x0d85, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d, 0x0118, + 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001, 0x1834, + 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0xb116, 0x0508, + 0x7810, 0x6012, 0x080c, 0xd3b6, 0x7820, 0x9086, 0x0003, 0x0128, + 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, + 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, + 0x795c, 0x615e, 0x2009, 0x8020, 0x080c, 0x9617, 0x2f60, 0x00fe, + 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1988, 0x2004, 0x604a, 0x0005, + 0x0016, 0x0096, 0x6814, 0x2048, 0x681c, 0xd0fc, 0xc0fc, 0x681e, + 0xa87c, 0x1108, 0xd0e4, 0x0180, 0xc0e4, 0xa87e, 0xa877, 0x0000, + 0xa893, 0x0000, 0xa88f, 0x0000, 0xd0cc, 0x0130, 0xc0cc, 0xa87e, + 0xa878, 0x2048, 0x080c, 0x100b, 0x6830, 0x6036, 0x908e, 0x0001, + 0x0148, 0x6803, 0x0002, 0x9086, 0x0005, 0x0170, 0x9006, 0x602e, + 0x6032, 0x00d0, 0x681c, 0xc085, 0x681e, 0x6803, 0x0004, 0x6824, + 0xc0f4, 0x9085, 0x0c00, 0x6826, 0x6814, 0x2048, 0xa8ac, 0x6938, + 0x9102, 0xa8b0, 0x693c, 0x9103, 0x1e48, 0x683c, 0x602e, 0x6838, + 0x9084, 0xfffc, 0x683a, 0x6032, 0x2d00, 0x603a, 0x6808, 0x603e, + 0x6910, 0x6112, 0x695c, 0x615e, 0x6023, 0x0001, 0x6007, 0x0039, + 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x009e, 0x001e, + 0x0005, 0x6024, 0xd0d4, 0x0510, 0xd0f4, 0x11f8, 0x6038, 0x940a, + 0x603c, 0x9303, 0x0230, 0x9105, 0x0120, 0x6024, 0xc0d4, 0xc0f5, + 0x0098, 0x643a, 0x633e, 0xac3e, 0xab42, 0x0046, 0x0036, 0x2400, + 0xacac, 0x9402, 0xa836, 0x2300, 0xabb0, 0x9303, 0xa83a, 0x003e, + 0x004e, 0x6024, 0xc0d4, 0x0000, 0x6026, 0x0005, 0xd0f4, 0x1138, + 0xa83c, 0x603a, 0xa840, 0x603e, 0x6024, 0xc0f5, 0x6026, 0x0005, + 0x0006, 0x0016, 0x6004, 0x908e, 0x0034, 0x01b8, 0x908e, 0x0035, + 0x01a0, 0x908e, 0x0036, 0x0188, 0x908e, 0x0037, 0x0170, 0x908e, + 0x0038, 0x0158, 0x908e, 0x0039, 0x0140, 0x908e, 0x003a, 0x0128, + 0x908e, 0x003b, 0x0110, 0x9085, 0x0001, 0x001e, 0x000e, 0x0005, + 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, 0x1982, 0x200c, + 0x8000, 0x2014, 0x2001, 0x0032, 0x080c, 0x955b, 0x2001, 0x1986, + 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1984, 0x200c, + 0x8000, 0x2014, 0x2071, 0x196c, 0x711a, 0x721e, 0x2001, 0x0064, + 0x080c, 0x955b, 0x2001, 0x1987, 0x82ff, 0x1110, 0x2011, 0x0014, + 0x2202, 0x2001, 0x1988, 0x9288, 0x000a, 0x2102, 0x2001, 0x0017, + 0x080c, 0xaced, 0x2001, 0x1a90, 0x2102, 0x2001, 0x0032, 0x080c, + 0x16b9, 0x080c, 0x6bf2, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, + 0x0005, 0x0006, 0x0016, 0x00e6, 0x2001, 0x1986, 0x2003, 0x0028, + 0x2001, 0x1987, 0x2003, 0x0014, 0x2071, 0x196c, 0x701b, 0x0000, + 0x701f, 0x07d0, 0x2001, 0x1988, 0x2009, 0x001e, 0x2102, 0x2001, + 0x0017, 0x080c, 0xaced, 0x2001, 0x1a90, 0x2102, 0x2001, 0x0032, + 0x080c, 0x16b9, 0x00ee, 0x001e, 0x000e, 0x0005, 0x0096, 0x6060, + 0x904d, 0x0110, 0x080c, 0x108b, 0x009e, 0x0005, 0x0005, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x080c, 0xb116, 0x0180, 0x2b08, 0x6112, + 0x0ca9, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0033, 0x080c, + 0xb20a, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, + 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x1520, + 0x7090, 0x9086, 0x0018, 0x0120, 0x7090, 0x9086, 0x0014, 0x11e0, + 0x6014, 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x9b83, + 0x01d8, 0x707c, 0xaa50, 0x9206, 0x1160, 0x7080, 0xaa54, 0x9206, + 0x1140, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c, + 0x3364, 0x080c, 0xb57c, 0x0020, 0x080c, 0xbb5c, 0x080c, 0xb16c, + 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa54, 0x9206, 0x0d48, + 0x0c80, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0xb116, 0x0188, + 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, 0x0001, 0x2900, 0x6016, + 0x2009, 0x004d, 0x080c, 0xb20a, 0x9085, 0x0001, 0x012e, 0x00ce, + 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016, + 0x080c, 0xb116, 0x0180, 0x2b08, 0x6112, 0x080c, 0xd3b6, 0x6023, + 0x0001, 0x2900, 0x6016, 0x001e, 0x080c, 0xb20a, 0x9085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026, + 0x0036, 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071, + 0x1800, 0x9186, 0x0015, 0x1568, 0x7190, 0x6014, 0x2048, 0xa814, + 0x8003, 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x19a1, 0x2003, + 0x0000, 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007, + 0x9094, 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0, + 0x2001, 0x19a1, 0x0016, 0x200c, 0x080c, 0xdca1, 0x001e, 0xa804, + 0x9005, 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103, + 0x0010, 0x080c, 0xbb5c, 0x080c, 0xb16c, 0x00fe, 0x00ee, 0x009e, + 0x006e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096, + 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x7090, + 0x9086, 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x9b83, + 0x01a8, 0x707c, 0xaa74, 0x9206, 0x1130, 0x7080, 0xaa78, 0x9206, + 0x1110, 0x080c, 0x3315, 0x080c, 0xb57c, 0x0020, 0x080c, 0xbb5c, + 0x080c, 0xb16c, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7060, 0xaa78, + 0x9206, 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, + 0x9186, 0x0015, 0x1550, 0x7090, 0x9086, 0x0004, 0x1530, 0x6014, + 0x2048, 0x2c78, 0x080c, 0x9b83, 0x05f0, 0x707c, 0xaacc, 0x9206, + 0x1180, 0x7080, 0xaad0, 0x9206, 0x1160, 0x080c, 0x3315, 0x0016, + 0xa998, 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x57e9, 0x001e, + 0x0010, 0x080c, 0x55cc, 0x080c, 0xcf1b, 0x0508, 0xa87b, 0x0000, + 0xa883, 0x0000, 0xa897, 0x4000, 0x0080, 0x080c, 0xcf1b, 0x01b8, + 0x6014, 0x2048, 0x080c, 0x55cc, 0x1d70, 0xa87b, 0x0030, 0xa883, + 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000, + 0xa867, 0x0139, 0x080c, 0x7012, 0x012e, 0x080c, 0xb16c, 0x00fe, + 0x00ee, 0x009e, 0x0005, 0x7060, 0xaad0, 0x9206, 0x0930, 0x0888, + 0x0016, 0x0026, 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100, + 0x9205, 0x0150, 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120, + 0xa992, 0xaa8e, 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6, + 0x00d6, 0x0036, 0x080c, 0xcf1b, 0x0904, 0xd578, 0x0096, 0x6314, + 0x2348, 0xa87a, 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6, + 0x2358, 0x2009, 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x6aae, + 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a, + 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, + 0xb8c4, 0x20e0, 0xb8c8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0fd6, + 0x20a9, 0x0004, 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8c8, 0x9080, + 0x000a, 0x2098, 0x080c, 0x0fd6, 0x00ce, 0x0090, 0xaa96, 0x3918, + 0x9398, 0x0007, 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b, + 0x0004, 0xaba2, 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e, + 0xa868, 0xc0f4, 0xa86a, 0x080c, 0x7006, 0x6017, 0x0000, 0x009e, + 0x003e, 0x00de, 0x00be, 0x0005, 0x0026, 0x0036, 0x0046, 0x00b6, + 0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, 0x2258, 0x2079, 0x0260, + 0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, 0x00ff, 0x900e, 0x080c, + 0x268c, 0x2118, 0x831f, 0x939c, 0xff00, 0x7838, 0x9084, 0x00ff, + 0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, 0x4ca1, 0x00a8, 0x9096, + 0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, 0x000d, 0x7838, 0xa8a6, + 0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, 0x1130, 0xa89b, 0x000d, + 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, 0x009e, 0x00be, 0x004e, + 0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, 0x0016, 0x9186, 0x0035, + 0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, 0xcf09, 0x01f0, 0x2260, + 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x1190, 0x6838, + 0x9206, 0x0140, 0x683c, 0x9206, 0x1160, 0x6108, 0x6838, 0x9106, + 0x1140, 0x0020, 0x6008, 0x693c, 0x9106, 0x1118, 0x6010, 0x6910, + 0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, 0x9085, 0x0001, 0x0cc8, + 0xa974, 0xd1cc, 0x0198, 0x918c, 0x00ff, 0x918e, 0x0002, 0x1170, + 0xa9a8, 0x918c, 0x000f, 0x918e, 0x0001, 0x1140, 0xa87c, 0xd0ac, + 0x0128, 0xa834, 0xa938, 0x9115, 0x190c, 0xc519, 0x0005, 0x0036, + 0x2019, 0x0001, 0x0010, 0x0036, 0x901e, 0x0499, 0x01e0, 0x080c, + 0xcf1b, 0x01c8, 0x080c, 0xd10c, 0x6037, 0x4000, 0x6014, 0x6017, + 0x0000, 0x0096, 0x2048, 0xa87c, 0x080c, 0xd132, 0x1118, 0x080c, + 0xbb5c, 0x0040, 0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, + 0x080c, 0x7012, 0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, + 0xa87b, 0x0006, 0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, + 0x0002, 0x0020, 0xa87b, 0x0005, 0x080c, 0xd226, 0xa877, 0x0000, + 0x0005, 0x2001, 0x1810, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, + 0x1810, 0x2004, 0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x1810, + 0x2004, 0xd0e4, 0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, + 0x2058, 0xbba0, 0x00be, 0x2021, 0x0007, 0x080c, 0x4e58, 0x004e, + 0x003e, 0x0005, 0x0c51, 0x1d81, 0x0005, 0x2001, 0x1986, 0x2004, + 0x601a, 0x0005, 0x2001, 0x1988, 0x2004, 0x604a, 0x0005, 0x080c, + 0xb16c, 0x0804, 0x9ab3, 0x611c, 0xd1fc, 0xa97c, 0x1108, 0xd1e4, + 0x0005, 0x601c, 0xd0fc, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x601c, + 0xd0fc, 0xc0fc, 0x601e, 0xa87c, 0x1108, 0xd0e4, 0x0005, 0x6044, + 0xd0fc, 0x1138, 0xd0bc, 0x01a0, 0xc0bc, 0x6046, 0x2001, 0x0002, + 0x0080, 0xd0ac, 0x1168, 0xd0dc, 0x1128, 0x908c, 0x000f, 0x9186, + 0x0005, 0x1118, 0x2001, 0x0003, 0x0020, 0x2001, 0x0001, 0x0008, + 0x6000, 0x0005, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0010, 0x1a0c, + 0x0d85, 0x001b, 0x006e, 0x00be, 0x0005, 0xd6b5, 0xddfe, 0xdf62, + 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6ec, 0xdfe6, 0xd6b5, + 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0xd6b5, 0x080c, 0x0d85, 0x0066, + 0x6000, 0x90b2, 0x0010, 0x1a0c, 0x0d85, 0x0013, 0x006e, 0x0005, + 0xd6d0, 0xe50b, 0xd6d0, 0xd6d0, 0xd6d0, 0xd6d0, 0xd6d0, 0xd6d0, + 0xe4ba, 0xe55d, 0xd6d0, 0xec10, 0xec44, 0xec10, 0xec44, 0xd6d0, + 0x080c, 0x0d85, 0x6000, 0x9082, 0x0010, 0x1a0c, 0x0d85, 0x6000, + 0x000a, 0x0005, 0xd6ea, 0xe1c3, 0xe28e, 0xe2b1, 0xe32d, 0xd6ea, + 0xe42a, 0xe3b5, 0xdff0, 0xe492, 0xe4a7, 0xd6ea, 0xd6ea, 0xd6ea, + 0xd6ea, 0xd6ea, 0x080c, 0x0d85, 0x91b2, 0x0053, 0x1a0c, 0x0d85, + 0x2100, 0x91b2, 0x0040, 0x1a04, 0xdb70, 0x0002, 0xd736, 0xd93e, + 0xd736, 0xd736, 0xd736, 0xd947, 0xd736, 0xd736, 0xd736, 0xd736, + 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, + 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, 0xd738, 0xd79f, 0xd7ae, + 0xd812, 0xd83d, 0xd8b6, 0xd929, 0xd736, 0xd736, 0xd94a, 0xd736, + 0xd736, 0xd95f, 0xd96c, 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, + 0xda12, 0xd736, 0xd736, 0xda26, 0xd736, 0xd736, 0xd9e1, 0xd736, + 0xd736, 0xd736, 0xda3e, 0xd736, 0xd736, 0xd736, 0xdabb, 0xd736, + 0xd736, 0xd736, 0xd736, 0xd736, 0xd736, 0xdb38, 0x080c, 0x0d85, + 0x080c, 0x6bcf, 0x1150, 0x2001, 0x1837, 0x2004, 0xd0cc, 0x1128, + 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, + 0x0009, 0x6017, 0x0000, 0x0804, 0xd937, 0x080c, 0x6b6b, 0x00e6, + 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, + 0x2019, 0x0029, 0x080c, 0xacfc, 0x080c, 0x97b0, 0x0076, 0x903e, + 0x080c, 0x966d, 0x2c08, 0x080c, 0xe75d, 0x007e, 0x001e, 0x080c, + 0xad18, 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6610, 0x2658, + 0x080c, 0x67c3, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1268, + 0x0016, 0x0026, 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x2c08, + 0x080c, 0xee6f, 0x002e, 0x001e, 0x1178, 0x080c, 0xe68b, 0x1904, + 0xd80a, 0x080c, 0xe627, 0x1120, 0x6007, 0x0008, 0x0804, 0xd937, + 0x6007, 0x0009, 0x0804, 0xd937, 0x080c, 0xe905, 0x0128, 0x080c, + 0xe68b, 0x0d78, 0x0804, 0xd80a, 0x6017, 0x1900, 0x0c88, 0x080c, + 0x344c, 0x1904, 0xdb6d, 0x6106, 0x080c, 0xe5c7, 0x6007, 0x0006, + 0x0804, 0xd937, 0x6007, 0x0007, 0x0804, 0xd937, 0x080c, 0xec80, + 0x1904, 0xdb6d, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x00d6, 0x6610, + 0x2658, 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001, + 0x0001, 0x080c, 0x66e6, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, + 0x0188, 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686, + 0x0006, 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005, 0x0110, + 0x00de, 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084, 0x0003, + 0x1140, 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084, 0x0003, + 0x0130, 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee, + 0x080c, 0xe6f3, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026, 0x6210, + 0x2258, 0xbaa0, 0x900e, 0x080c, 0x3364, 0x002e, 0x080c, 0x684f, + 0x6007, 0x000a, 0x00de, 0x0804, 0xd937, 0x6007, 0x000b, 0x00de, + 0x0804, 0xd937, 0x080c, 0x3315, 0x080c, 0xd65a, 0x6007, 0x0001, + 0x0804, 0xd937, 0x080c, 0xec80, 0x1904, 0xdb6d, 0x080c, 0x344c, + 0x1904, 0xdb6d, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948, + 0x90b2, 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910, 0x6610, + 0x2658, 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258, + 0xbaa0, 0x900e, 0x080c, 0x3364, 0x002e, 0x6007, 0x000c, 0x2001, + 0x0001, 0x080c, 0xee4e, 0x0804, 0xd937, 0x080c, 0x6bcf, 0x1140, + 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, + 0x0804, 0xd745, 0x080c, 0x6b6b, 0x6610, 0x2658, 0xbe04, 0x9684, + 0x00ff, 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026, 0x2001, 0x0006, + 0x080c, 0x6726, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686, + 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xd80a, 0x080c, 0xe700, + 0x1120, 0x6007, 0x000e, 0x0804, 0xd937, 0x0046, 0x6410, 0x2458, + 0xbca0, 0x0046, 0x080c, 0x3315, 0x080c, 0xd65a, 0x004e, 0x0016, + 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, + 0x080c, 0xea8d, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, + 0x004e, 0x6007, 0x0001, 0x0804, 0xd937, 0x2001, 0x0001, 0x080c, + 0x66e6, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, + 0x1805, 0x2011, 0x0270, 0x080c, 0xc20e, 0x003e, 0x002e, 0x001e, + 0x015e, 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004, + 0x0a04, 0xd80a, 0x9682, 0x0007, 0x0a04, 0xd866, 0x0804, 0xd80a, + 0x6017, 0x1900, 0x6007, 0x0009, 0x0804, 0xd937, 0x080c, 0x6bcf, + 0x1140, 0x2001, 0x1837, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, + 0x1110, 0x0804, 0xd745, 0x080c, 0x6b6b, 0x6610, 0x2658, 0xbe04, + 0x9684, 0x00ff, 0x0006, 0x0016, 0x908e, 0x0001, 0x0118, 0x908e, + 0x0000, 0x1118, 0x001e, 0x000e, 0x0080, 0x001e, 0x000e, 0x9082, + 0x0006, 0x06a0, 0x0150, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, + 0x0120, 0x9686, 0x0006, 0x1904, 0xd80a, 0x080c, 0xe72e, 0x1138, + 0x080c, 0xe627, 0x1120, 0x6007, 0x0010, 0x0804, 0xd937, 0x0046, + 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x3315, 0x080c, 0xd65a, + 0x004e, 0x0016, 0x9006, 0x2009, 0x1848, 0x210c, 0xd1a4, 0x0148, + 0x2009, 0x0029, 0x080c, 0xea8d, 0x6010, 0x2058, 0xb800, 0xc0e5, + 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x0448, 0x080c, 0xe905, + 0x0198, 0x0016, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0160, 0x9186, + 0x0003, 0x0148, 0x001e, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, + 0x0920, 0x0804, 0xd80a, 0x001e, 0x6017, 0x1900, 0x6007, 0x0009, + 0x0070, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x080c, 0xec80, 0x1904, + 0xdb6d, 0x080c, 0xdd3e, 0x1904, 0xd80a, 0x6007, 0x0012, 0x6003, + 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0005, 0x6007, 0x0001, + 0x6003, 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0cb0, 0x6007, + 0x0005, 0x0c68, 0x080c, 0xec80, 0x1904, 0xdb6d, 0x080c, 0x344c, + 0x1904, 0xdb6d, 0x080c, 0xdd3e, 0x1904, 0xd80a, 0x6007, 0x0020, + 0x6003, 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0005, 0x080c, + 0x344c, 0x1904, 0xdb6d, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, + 0x961e, 0x080c, 0x9ab3, 0x0005, 0x080c, 0xec80, 0x1904, 0xdb6d, + 0x080c, 0x344c, 0x1904, 0xdb6d, 0x080c, 0xdd3e, 0x1904, 0xd80a, + 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x2c08, 0x2011, 0x1820, + 0x2214, 0x703c, 0x9206, 0x11e0, 0x2011, 0x181f, 0x2214, 0x7038, + 0x9084, 0x00ff, 0x9206, 0x11a0, 0x7240, 0x080c, 0xcf09, 0x0570, + 0x2260, 0x6008, 0x9086, 0xffff, 0x0120, 0x7244, 0x6008, 0x9206, + 0x1528, 0x6020, 0x9086, 0x0007, 0x1508, 0x080c, 0xb16c, 0x04a0, + 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08, 0x080c, 0xcf09, 0x01b0, + 0x2260, 0x7240, 0x6008, 0x9206, 0x1188, 0x6010, 0x9190, 0x0004, + 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08, 0x9006, 0x080c, + 0xea57, 0x1180, 0x7244, 0x9286, 0xffff, 0x01b0, 0x2160, 0x6007, + 0x0026, 0x6017, 0x1700, 0x7214, 0x9296, 0xffff, 0x1180, 0x6007, + 0x0025, 0x0068, 0x6020, 0x9086, 0x0007, 0x1d80, 0x6004, 0x9086, + 0x0024, 0x1110, 0x080c, 0xb16c, 0x2160, 0x6007, 0x0025, 0x6003, + 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x00ee, 0x002e, 0x001e, + 0x0005, 0x2001, 0x0001, 0x080c, 0x66e6, 0x0156, 0x0016, 0x0026, + 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, + 0xc20e, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, + 0x0804, 0xd937, 0x080c, 0xbe21, 0x080c, 0x779e, 0x1190, 0x0006, + 0x0026, 0x0036, 0x080c, 0x77b8, 0x1138, 0x080c, 0x7ab6, 0x080c, + 0x619d, 0x080c, 0x76cd, 0x0010, 0x080c, 0x7772, 0x003e, 0x002e, + 0x000e, 0x0005, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x080c, 0xdd3e, + 0x1904, 0xd80a, 0x6106, 0x080c, 0xdd5a, 0x1120, 0x6007, 0x002b, + 0x0804, 0xd937, 0x6007, 0x002c, 0x0804, 0xd937, 0x080c, 0xec80, + 0x1904, 0xdb6d, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x080c, 0xdd3e, + 0x1904, 0xd80a, 0x6106, 0x080c, 0xdd5f, 0x1120, 0x6007, 0x002e, + 0x0804, 0xd937, 0x6007, 0x002f, 0x0804, 0xd937, 0x080c, 0x344c, + 0x1904, 0xdb6d, 0x00e6, 0x00d6, 0x00c6, 0x6010, 0x2058, 0xb904, + 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158, 0x9184, 0xff00, 0x8007, + 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, 0xd93e, + 0x080c, 0x5844, 0xd0e4, 0x0904, 0xdab8, 0x2071, 0x026c, 0x7010, + 0x603a, 0x7014, 0x603e, 0x7108, 0x720c, 0x080c, 0x6c0d, 0x0140, + 0x6010, 0x2058, 0xb810, 0x9106, 0x1118, 0xb814, 0x9206, 0x0510, + 0x080c, 0x6c09, 0x15b8, 0x2069, 0x1800, 0x6880, 0x9206, 0x1590, + 0x687c, 0x9106, 0x1578, 0x7210, 0x080c, 0xcf09, 0x0590, 0x080c, + 0xdc2b, 0x0578, 0x080c, 0xeb09, 0x0560, 0x622e, 0x6007, 0x0036, + 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x00ce, 0x00de, + 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff, 0x0150, 0x080c, 0xcf09, + 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110, 0x9106, 0x1190, 0x08e0, + 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c, 0xea57, 0x2c10, 0x2160, + 0x0140, 0x0890, 0x6007, 0x0037, 0x602f, 0x0009, 0x6017, 0x1500, + 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003, 0x6017, 0x1700, 0x0880, + 0x6007, 0x0012, 0x0868, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x6010, + 0x2058, 0xb804, 0x9084, 0xff00, 0x8007, 0x9086, 0x0006, 0x1904, + 0xd93e, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0x5844, 0xd0e4, 0x0904, + 0xdb30, 0x2069, 0x1800, 0x2071, 0x026c, 0x7008, 0x603a, 0x720c, + 0x623e, 0x9286, 0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0x9085, + 0x0001, 0x080c, 0xea57, 0x2c10, 0x00ce, 0x05e8, 0x080c, 0xcf09, + 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004, 0x9106, 0x15a0, 0x00c6, + 0x0026, 0x2260, 0x080c, 0xcadc, 0x002e, 0x00ce, 0x7118, 0x918c, + 0xff00, 0x810f, 0x9186, 0x0001, 0x0178, 0x9186, 0x0005, 0x0118, + 0x9186, 0x0007, 0x1198, 0x9280, 0x0005, 0x2004, 0x9005, 0x0170, + 0x080c, 0xdc2b, 0x0904, 0xdab1, 0x0056, 0x7510, 0x7614, 0x080c, + 0xeb22, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, + 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, + 0x080c, 0x9617, 0x0c78, 0x6007, 0x003b, 0x602f, 0x0003, 0x6017, + 0x0300, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x0c10, + 0x6007, 0x003b, 0x602f, 0x000b, 0x6017, 0x0000, 0x0804, 0xda88, + 0x00e6, 0x0026, 0x080c, 0x6bcf, 0x0550, 0x080c, 0x6b6b, 0x080c, + 0xecf1, 0x1518, 0x2071, 0x1800, 0x70dc, 0x9085, 0x0003, 0x70de, + 0x00f6, 0x2079, 0x0100, 0x72b0, 0x9284, 0x00ff, 0x707e, 0x78e6, + 0x9284, 0xff00, 0x7280, 0x9205, 0x7082, 0x78ea, 0x00fe, 0x70e7, + 0x0000, 0x080c, 0x6c0d, 0x0120, 0x2011, 0x1a0a, 0x2013, 0x07d0, + 0xd0ac, 0x1128, 0x080c, 0x30bf, 0x0010, 0x080c, 0xed25, 0x002e, + 0x00ee, 0x080c, 0xb16c, 0x0804, 0xd93d, 0x080c, 0xb16c, 0x0005, + 0x2600, 0x0002, 0xdb84, 0xdbb2, 0xdbc3, 0xdb84, 0xdb84, 0xdb86, + 0xdbd4, 0xdb84, 0xdb84, 0xdb84, 0xdba0, 0xdb84, 0xdb84, 0xdb84, + 0xdbdf, 0xdbf5, 0xdc26, 0xdb84, 0x080c, 0x0d85, 0x080c, 0xec80, + 0x1d20, 0x080c, 0x344c, 0x1d08, 0x7038, 0x6016, 0x6007, 0x0045, + 0x6003, 0x0001, 0x080c, 0x961e, 0x0005, 0x080c, 0x3315, 0x080c, + 0xd65a, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x961e, 0x0005, + 0x080c, 0xec80, 0x1950, 0x080c, 0x344c, 0x1938, 0x080c, 0xdd3e, + 0x1d60, 0x703c, 0x6016, 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, + 0x961e, 0x0005, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x2009, 0x0041, + 0x080c, 0xed2e, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, 0x961e, + 0x080c, 0x9ab3, 0x0005, 0x080c, 0x344c, 0x1904, 0xdb6d, 0x2009, + 0x0042, 0x080c, 0xed2e, 0x6007, 0x0047, 0x6003, 0x0001, 0x080c, + 0x961e, 0x080c, 0x9ab3, 0x0005, 0x080c, 0x344c, 0x1904, 0xdb6d, + 0x2009, 0x0046, 0x080c, 0xed2e, 0x080c, 0xb16c, 0x0005, 0x2001, + 0x1824, 0x2004, 0x9082, 0x00e1, 0x1268, 0x080c, 0xdc48, 0x0904, + 0xdb6d, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, 0x961e, 0x080c, + 0x9ab3, 0x0005, 0x6007, 0x0012, 0x0cb0, 0x6007, 0x004f, 0x6017, + 0x0000, 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, + 0x1160, 0x7140, 0x2001, 0x19be, 0x2004, 0x9106, 0x11b0, 0x7144, + 0x2001, 0x19bf, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, + 0x2011, 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, + 0x000a, 0x080c, 0xc222, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, + 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x0005, 0x6007, 0x0050, + 0x703c, 0x6016, 0x0ca0, 0x0016, 0x00e6, 0x2071, 0x0260, 0x00b6, + 0x00c6, 0x2260, 0x6010, 0x2058, 0xb8d4, 0xd084, 0x0150, 0x7128, + 0x604c, 0x9106, 0x1120, 0x712c, 0x6050, 0x9106, 0x0110, 0x9006, + 0x0010, 0x9085, 0x0001, 0x00ce, 0x00be, 0x00ee, 0x001e, 0x0005, + 0x0016, 0x0096, 0x0086, 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, + 0x8000, 0x2071, 0x1800, 0x20e1, 0x0000, 0x2001, 0x19a1, 0x2003, + 0x0000, 0x080c, 0x1072, 0x05a0, 0x2900, 0x6016, 0x7090, 0x8004, + 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9, 0x001e, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x19a1, + 0x0016, 0x200c, 0x0471, 0x001e, 0x81ff, 0x01b8, 0x2940, 0x080c, + 0x1072, 0x01b0, 0x2900, 0xa006, 0x2100, 0x0c18, 0xa832, 0x20a8, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, 0x19a1, + 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001, 0x0048, + 0x2071, 0x1800, 0x7093, 0x0000, 0x6014, 0x2048, 0x080c, 0x100b, + 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e, 0x001e, + 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c, 0xffff, + 0x11b0, 0x080c, 0x21f9, 0x2099, 0x026c, 0x2001, 0x0014, 0x3518, + 0x9312, 0x0108, 0x1218, 0x23a8, 0x4003, 0x0400, 0x20a8, 0x4003, + 0x22a8, 0x8108, 0x080c, 0x21f9, 0x2099, 0x0260, 0x0ca8, 0x080c, + 0x21f9, 0x2061, 0x19a1, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312, + 0x0108, 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, + 0x8108, 0x080c, 0x21f9, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x19a1, + 0x2019, 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, + 0x0260, 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, + 0x620a, 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, + 0x0016, 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x2211, + 0x20a1, 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, + 0x4003, 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, + 0x080c, 0x2211, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x2211, 0x2061, + 0x19a4, 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, + 0x4003, 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, + 0x080c, 0x2211, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x19a4, 0x2019, + 0x0260, 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, + 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, + 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, + 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, + 0x0170, 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, + 0x0006, 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, + 0x00be, 0x0005, 0x00d6, 0x080c, 0xddd4, 0x00de, 0x0005, 0x00d6, + 0x080c, 0xdde1, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, + 0x00ff, 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, + 0x080c, 0xee4e, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, + 0x918c, 0x00ff, 0x6824, 0x080c, 0x268c, 0x1148, 0x2001, 0x0001, + 0x080c, 0xee4e, 0x2110, 0x900e, 0x080c, 0x3364, 0x0018, 0x9085, + 0x0001, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, + 0xb1dd, 0x0598, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, + 0x8211, 0x220c, 0x080c, 0x268c, 0x1568, 0x080c, 0x6749, 0x1550, + 0xbe12, 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, + 0xec80, 0x11c8, 0x080c, 0x344c, 0x11b0, 0x080c, 0xdd3e, 0x0500, + 0x2001, 0x0007, 0x080c, 0x66fa, 0x2001, 0x0007, 0x080c, 0x6726, + 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, + 0x080c, 0x961e, 0x0010, 0x080c, 0xb16c, 0x9085, 0x0001, 0x00ce, + 0x00be, 0x0005, 0x080c, 0xb16c, 0x00ce, 0x002e, 0x001e, 0x0ca8, + 0x080c, 0xb16c, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, 0x9082, + 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008, 0x9006, + 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084, 0xff00, + 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118, 0x9186, + 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, 0x6162, + 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004, 0x90b2, + 0x0053, 0x1a0c, 0x0d85, 0x91b6, 0x0013, 0x1130, 0x2008, 0x91b2, + 0x0040, 0x1a04, 0xdf36, 0x0402, 0x91b6, 0x0027, 0x0190, 0x9186, + 0x0015, 0x0118, 0x9186, 0x0016, 0x1140, 0x080c, 0xaf61, 0x0120, + 0x9086, 0x0002, 0x0904, 0xbba3, 0x0005, 0x91b6, 0x0014, 0x190c, + 0x0d85, 0x2001, 0x0007, 0x080c, 0x6726, 0x080c, 0x99ed, 0x080c, + 0xb1a7, 0x080c, 0x9ab3, 0x0005, 0xde6c, 0xde6e, 0xde6c, 0xde6c, + 0xde6c, 0xde6e, 0xde7b, 0xdf33, 0xdebd, 0xdf33, 0xdee1, 0xdf33, + 0xde7b, 0xdf33, 0xdf2b, 0xdf33, 0xdf2b, 0xdf33, 0xdf33, 0xde6c, + 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0xde6c, + 0xde6c, 0xde6c, 0xde6e, 0xde6c, 0xdf33, 0xde6c, 0xde6c, 0xdf33, + 0xde6c, 0xdf30, 0xdf33, 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0xdf33, + 0xdf33, 0xde6c, 0xdf33, 0xdf33, 0xde6c, 0xde76, 0xde6c, 0xde6c, + 0xde6c, 0xde6c, 0xdf2f, 0xdf33, 0xde6c, 0xde6c, 0xdf33, 0xdf33, + 0xde6c, 0xde6c, 0xde6c, 0xde6c, 0x080c, 0x0d85, 0x080c, 0xd65d, + 0x6003, 0x0002, 0x080c, 0x9ab3, 0x0804, 0xdf35, 0x9006, 0x080c, + 0x66e6, 0x0804, 0xdf33, 0x080c, 0x6c09, 0x1904, 0xdf33, 0x9006, + 0x080c, 0x66e6, 0x6010, 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, + 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x00b8, + 0x6010, 0x2058, 0xb884, 0x9005, 0x0904, 0xdf33, 0x080c, 0x347d, + 0x1904, 0xdf33, 0x2001, 0x1800, 0x2004, 0x9086, 0x0002, 0x1138, + 0x00f6, 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x2001, + 0x0002, 0x080c, 0x66fa, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x6110, 0x2158, 0x2009, + 0x0001, 0x080c, 0x89a1, 0x0804, 0xdf35, 0x6610, 0x2658, 0xbe04, + 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0148, 0x9686, 0x0004, + 0x0130, 0x080c, 0x9228, 0x2001, 0x0004, 0x080c, 0x6726, 0x080c, + 0xee9d, 0x0904, 0xdf33, 0x2001, 0x0004, 0x080c, 0x66fa, 0x6023, + 0x0001, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x961e, 0x0804, + 0xdf35, 0x2001, 0x1800, 0x2004, 0x9086, 0x0003, 0x1158, 0x0036, + 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, 0x4e58, + 0x004e, 0x003e, 0x2001, 0x0006, 0x080c, 0xdf4f, 0x6610, 0x2658, + 0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x006e, + 0x0180, 0x2001, 0x0006, 0x080c, 0x6726, 0x9284, 0x00ff, 0x908e, + 0x0007, 0x0118, 0x908e, 0x0004, 0x1120, 0x2001, 0x0006, 0x080c, + 0x66fa, 0x080c, 0x6c09, 0x11f8, 0x2001, 0x1837, 0x2004, 0xd0a4, + 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, + 0x2079, 0x1800, 0x78a8, 0x8000, 0x78aa, 0x00fe, 0x0804, 0xdea7, + 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0409, 0x0020, 0x0018, + 0x0010, 0x080c, 0x6726, 0x080c, 0xb16c, 0x0005, 0x2600, 0x0002, + 0xdf4a, 0xdf4a, 0xdf4a, 0xdf4a, 0xdf4a, 0xdf4c, 0xdf4a, 0xdf4c, + 0xdf4a, 0xdf4a, 0xdf4c, 0xdf4a, 0xdf4a, 0xdf4a, 0xdf4c, 0xdf4c, + 0xdf4c, 0xdf4c, 0x080c, 0x0d85, 0x080c, 0xb16c, 0x0005, 0x0016, + 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138, 0x080c, + 0x66fa, 0x9006, 0x080c, 0x66e6, 0x080c, 0x3344, 0x00de, 0x00be, + 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00, 0x8007, + 0x90b2, 0x000c, 0x1a0c, 0x0d85, 0x91b6, 0x0015, 0x1110, 0x003b, + 0x0028, 0x91b6, 0x0016, 0x190c, 0x0d85, 0x006b, 0x0005, 0xbc45, + 0xbc45, 0xbc45, 0xbc45, 0xdfe4, 0xbc45, 0xdfce, 0xdf8f, 0xbc45, + 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0xdfe4, + 0xbc45, 0xdfce, 0xdfd5, 0xbc45, 0xbc45, 0xbc45, 0xbc45, 0x00f6, + 0x080c, 0x6c09, 0x11d8, 0x080c, 0xd645, 0x11c0, 0x6010, 0x905d, + 0x01a8, 0xb884, 0x9005, 0x0190, 0x9006, 0x080c, 0x66e6, 0x2001, + 0x0002, 0x080c, 0x66fa, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x961e, 0x080c, 0x9ab3, 0x00f0, 0x2011, 0x0263, + 0x2204, 0x8211, 0x220c, 0x080c, 0x268c, 0x11b0, 0x080c, 0x67b4, + 0x0118, 0x080c, 0xb16c, 0x0080, 0xb810, 0x0006, 0xb814, 0x0006, + 0xb884, 0x0006, 0x080c, 0x61b7, 0x000e, 0xb886, 0x000e, 0xb816, + 0x000e, 0xb812, 0x080c, 0xb16c, 0x00fe, 0x0005, 0x6604, 0x96b6, + 0x001e, 0x1110, 0x080c, 0xb16c, 0x0005, 0x080c, 0xc082, 0x1148, + 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x961e, 0x080c, 0x9ab3, + 0x0010, 0x080c, 0xb16c, 0x0005, 0x0804, 0xb16c, 0x6004, 0x908a, + 0x0053, 0x1a0c, 0x0d85, 0x080c, 0x99ed, 0x080c, 0xb1a7, 0x0005, + 0x9182, 0x0040, 0x0002, 0xe007, 0xe007, 0xe007, 0xe007, 0xe009, + 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, + 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0x080c, + 0x0d85, 0x0096, 0x00b6, 0x00d6, 0x00e6, 0x00f6, 0x0046, 0x0026, + 0x6210, 0x2258, 0xb8bc, 0x9005, 0x11b0, 0x6007, 0x0044, 0x2071, + 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xe070, 0x080c, 0xee42, + 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, 0x2011, 0x0200, + 0x080c, 0x8c44, 0x0020, 0x9026, 0x080c, 0xecc5, 0x0c30, 0x080c, + 0x1059, 0x090c, 0x0d85, 0x6003, 0x0007, 0xa867, 0x010d, 0x9006, + 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, 0xa8e2, 0x6010, + 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, 0xa87f, 0x0000, + 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x7012, 0x001e, 0x080c, + 0xee42, 0x1904, 0xe0d0, 0x9486, 0x2000, 0x1130, 0x2019, 0x0017, + 0x080c, 0xe9f9, 0x0804, 0xe0d0, 0x9486, 0x0200, 0x1120, 0x080c, + 0xe984, 0x0804, 0xe0d0, 0x9486, 0x0400, 0x0120, 0x9486, 0x1000, + 0x1904, 0xe0d0, 0x2019, 0x0002, 0x080c, 0xe9a3, 0x0804, 0xe0d0, + 0x2069, 0x1a73, 0x6a00, 0xd284, 0x0904, 0xe13a, 0x9284, 0x0300, + 0x1904, 0xe133, 0x6804, 0x9005, 0x0904, 0xe11b, 0x2d78, 0x6003, + 0x0007, 0x080c, 0x1072, 0x0904, 0xe0dc, 0x7800, 0xd08c, 0x1118, + 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, 0x180f, 0x2004, + 0xd084, 0x1904, 0xe13e, 0x9006, 0xa802, 0xa867, 0x0116, 0xa86a, + 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, 0xb8a0, 0x7130, + 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, 0xb930, 0xa9c2, + 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, 0x0003, 0x9080, + 0xe0d8, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, 0x0270, 0xaa5c, + 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, 0x20e1, 0x0000, + 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, 0x0000, 0x2001, + 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, 0x080c, 0x7015, + 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, 0x009e, 0x0005, + 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x1810, 0x2004, 0xd084, + 0x0120, 0x080c, 0x1059, 0x1904, 0xe085, 0x6017, 0xf100, 0x6003, + 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, 0x9617, 0x0c00, + 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, 0x1200, 0x1198, + 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, 0xf700, 0x910d, + 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, 0x2009, 0xa025, + 0x080c, 0x9617, 0x0828, 0x6868, 0x602e, 0x686c, 0x6032, 0x6017, + 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, + 0x9617, 0x0804, 0xe0d0, 0x2001, 0x180e, 0x2004, 0xd0ec, 0x0120, + 0x2011, 0x8049, 0x080c, 0x4ca1, 0x6017, 0xf300, 0x0010, 0x6017, + 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x2009, 0xa022, 0x080c, + 0x9617, 0x0804, 0xe0d0, 0x6017, 0xf500, 0x0c98, 0x6017, 0xf600, + 0x0804, 0xe0f0, 0x6017, 0xf200, 0x0804, 0xe0f0, 0xa867, 0x0146, + 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, 0x7044, 0x9084, + 0x0003, 0x9080, 0xe0d8, 0x2005, 0xa87e, 0x2928, 0x6010, 0x2058, + 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, 0xb830, 0xa892, + 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, 0x2104, 0x9085, + 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, 0x2214, 0x9294, + 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0d85, 0x8210, 0x821c, + 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0029, + 0x20a0, 0x2011, 0xe1ba, 0x2041, 0x0001, 0x223d, 0x9784, 0x00ff, + 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, 0x0530, 0x8210, + 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, 0x2098, 0x0c68, + 0x2950, 0x080c, 0x1072, 0x0170, 0x2900, 0xb002, 0xa867, 0x0147, + 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, + 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, 0x080c, 0x108b, + 0x0cc8, 0x080c, 0x108b, 0x0804, 0xe0dc, 0x2548, 0x8847, 0x9885, + 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, 0x080c, 0xea30, + 0x0804, 0xe0d0, 0x8010, 0x0004, 0x801a, 0x0006, 0x8018, 0x0008, + 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, + 0x0057, 0x1a0c, 0x0d85, 0x9082, 0x0040, 0x0a0c, 0x0d85, 0x2008, + 0x0804, 0xe246, 0x9186, 0x0051, 0x0108, 0x0040, 0x080c, 0xaf61, + 0x01e8, 0x9086, 0x0002, 0x0904, 0xe28e, 0x00c0, 0x9186, 0x0027, + 0x0180, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, 0x0150, 0x190c, + 0x0d85, 0x080c, 0xaf61, 0x0150, 0x9086, 0x0004, 0x0904, 0xe32d, + 0x0028, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0xb227, + 0x0005, 0xe20d, 0xe20f, 0xe20f, 0xe236, 0xe20d, 0xe20d, 0xe20d, + 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0xe20d, + 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0xe20d, 0x080c, 0x0d85, 0x080c, + 0x99ed, 0x080c, 0x9ab3, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, + 0x080c, 0xcf1b, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xea30, + 0x6017, 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1987, 0x2004, + 0x601a, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, + 0x99ed, 0x080c, 0x9ab3, 0x080c, 0xcf1b, 0x0120, 0x6014, 0x2048, + 0x080c, 0x108b, 0x080c, 0xb1a7, 0x009e, 0x0005, 0x0002, 0xe25b, + 0xe270, 0xe25d, 0xe285, 0xe25b, 0xe25b, 0xe25b, 0xe25b, 0xe25b, + 0xe25b, 0xe25b, 0xe25b, 0xe25b, 0xe25b, 0xe25b, 0xe25b, 0xe25b, + 0xe25b, 0xe25b, 0xe25b, 0x080c, 0x0d85, 0x0096, 0x6014, 0x2048, + 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, + 0xb20a, 0x0010, 0x6003, 0x0004, 0x080c, 0x9ab3, 0x009e, 0x0005, + 0x080c, 0xcf1b, 0x0138, 0x6114, 0x0096, 0x2148, 0xa97c, 0x009e, + 0xd1ec, 0x1138, 0x080c, 0x8c19, 0x080c, 0xb16c, 0x080c, 0x9ab3, + 0x0005, 0x080c, 0xec89, 0x0db0, 0x0cc8, 0x6003, 0x0001, 0x6007, + 0x0041, 0x2009, 0xa022, 0x080c, 0x9617, 0x0005, 0x9182, 0x0040, + 0x0002, 0xe2a5, 0xe2a7, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, + 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, 0xe2a5, + 0xe2a5, 0xe2a5, 0xe2a8, 0xe2a5, 0xe2a5, 0x080c, 0x0d85, 0x0005, + 0x00d6, 0x080c, 0x8c19, 0x00de, 0x080c, 0xece1, 0x080c, 0xb16c, + 0x0005, 0x9182, 0x0040, 0x0002, 0xe2c8, 0xe2c8, 0xe2c8, 0xe2c8, + 0xe2c8, 0xe2c8, 0xe2c8, 0xe2c8, 0xe2c8, 0xe2ca, 0xe2f5, 0xe2c8, + 0xe2c8, 0xe2c8, 0xe2c8, 0xe2f5, 0xe2c8, 0xe2c8, 0xe2c8, 0xe2c8, + 0x080c, 0x0d85, 0x6014, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0168, + 0x908c, 0x0003, 0x918e, 0x0002, 0x0180, 0x6144, 0xd1e4, 0x1168, + 0x2009, 0x0041, 0x009e, 0x0804, 0xe3b5, 0x6003, 0x0007, 0x601b, + 0x0000, 0x080c, 0x8c19, 0x009e, 0x0005, 0x6014, 0x2048, 0xa97c, + 0xd1ec, 0x1130, 0x080c, 0x8c19, 0x080c, 0xb16c, 0x009e, 0x0005, + 0x080c, 0xec89, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, 0x200c, + 0xc1d4, 0x2102, 0x0036, 0x080c, 0x9a48, 0x080c, 0x9ab3, 0x6014, + 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, + 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, 0xa8ac, + 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, 0x6003, + 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xea30, 0x6018, 0x9005, + 0x1128, 0x2001, 0x1987, 0x2004, 0x8003, 0x601a, 0x6017, 0x0000, + 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, 0x0002, + 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, + 0xe346, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, 0xe344, + 0xe344, 0xe344, 0xe344, 0xe391, 0x080c, 0x0d85, 0x6014, 0x0096, + 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, + 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, 0x2009, + 0x0041, 0x009e, 0x0804, 0xe3b5, 0x6003, 0x0007, 0x601b, 0x0000, + 0x080c, 0x8c19, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, 0x0006, + 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, 0x9420, + 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, 0x6110, + 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, 0x180e, + 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, 0x0006, + 0x00e9, 0x080c, 0x8c1b, 0x009e, 0x0005, 0x6003, 0x0002, 0x009e, + 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x16b0, 0x1904, 0xe346, + 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, 0x9105, + 0x1120, 0x080c, 0x16b0, 0x1904, 0xe346, 0x0005, 0xd2fc, 0x0140, + 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, 0x0010, + 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, 0x0208, + 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, 0x0d85, + 0x6024, 0xd0dc, 0x090c, 0x0d85, 0x0005, 0xe3d9, 0xe3e5, 0xe3f1, + 0xe3fd, 0xe3d9, 0xe3d9, 0xe3d9, 0xe3d9, 0xe3e0, 0xe3db, 0xe3db, + 0xe3d9, 0xe3d9, 0xe3d9, 0xe3d9, 0xe3db, 0xe3d9, 0xe3db, 0xe3d9, + 0xe3e0, 0x080c, 0x0d85, 0x6024, 0xd0dc, 0x090c, 0x0d85, 0x0005, + 0x6014, 0x9005, 0x190c, 0x0d85, 0x0005, 0x6003, 0x0001, 0x6106, + 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x95f9, 0x012e, + 0x0005, 0x6003, 0x0004, 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, + 0xa001, 0x080c, 0x9617, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, + 0x6047, 0x0000, 0x080c, 0x1c6f, 0x0126, 0x2091, 0x8000, 0x6014, + 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x9084, 0x0003, 0x9086, + 0x0002, 0x01a0, 0x6024, 0xd0cc, 0x1148, 0xd0c4, 0x1138, 0xa8a8, + 0x9005, 0x1120, 0x6144, 0x918d, 0xb035, 0x0018, 0x6144, 0x918d, + 0xa035, 0x009e, 0x080c, 0x965e, 0x012e, 0x0005, 0x6144, 0x918d, + 0xa032, 0x0cb8, 0x0126, 0x2091, 0x8000, 0x0036, 0x0096, 0x9182, + 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, 0xe44a, 0xe44c, + 0xe461, 0xe47b, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, + 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, 0xe44a, + 0xe44a, 0xe44a, 0x080c, 0x0d85, 0x6014, 0x2048, 0xa87c, 0xd0fc, + 0x0510, 0x909c, 0x0003, 0x939e, 0x0003, 0x01e8, 0x6003, 0x0001, + 0x6106, 0x0126, 0x2091, 0x8000, 0x2009, 0xa022, 0x080c, 0x9617, + 0x0480, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0168, 0x909c, 0x0003, + 0x939e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106, 0x2009, 0xa001, + 0x080c, 0x9617, 0x00f0, 0x901e, 0x6316, 0x631a, 0x2019, 0x0004, + 0x080c, 0xea30, 0x00b0, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x0d98, + 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, 0x6003, 0x0003, 0x6106, + 0x6047, 0x0000, 0x080c, 0x1c6f, 0x6144, 0x918d, 0xa035, 0x080c, + 0x965e, 0x0005, 0x080c, 0x99ed, 0x6114, 0x81ff, 0x0158, 0x0096, + 0x2148, 0x080c, 0xeddf, 0x0036, 0x2019, 0x0029, 0x080c, 0xea30, + 0x003e, 0x009e, 0x080c, 0xb1a7, 0x080c, 0x9ab3, 0x0005, 0x080c, + 0x9a48, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, 0xeddf, + 0x0036, 0x2019, 0x0029, 0x080c, 0xea30, 0x003e, 0x009e, 0x080c, + 0xb1a7, 0x0005, 0x9182, 0x0085, 0x0002, 0xe4cc, 0xe4ca, 0xe4ca, + 0xe4d8, 0xe4ca, 0xe4ca, 0xe4ca, 0xe4ca, 0xe4ca, 0xe4ca, 0xe4ca, + 0xe4ca, 0xe4ca, 0x080c, 0x0d85, 0x6003, 0x000b, 0x6106, 0x0126, + 0x2091, 0x8000, 0x2009, 0x8020, 0x080c, 0x9617, 0x012e, 0x0005, + 0x0026, 0x00e6, 0x080c, 0xec80, 0x0118, 0x080c, 0xb16c, 0x0440, + 0x2071, 0x0260, 0x7224, 0x6216, 0x2001, 0x180e, 0x2004, 0xd0e4, + 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2011, + 0x014e, 0x080c, 0xb495, 0x7220, 0x080c, 0xe875, 0x0118, 0x6007, + 0x0086, 0x0040, 0x6007, 0x0087, 0x7224, 0x9296, 0xffff, 0x1110, + 0x6007, 0x0086, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, + 0x00ee, 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, + 0x0085, 0x0a0c, 0x0d85, 0x908a, 0x0092, 0x1a0c, 0x0d85, 0x9082, + 0x0085, 0x00a2, 0x9186, 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, + 0x080c, 0xb227, 0x0050, 0x2001, 0x0007, 0x080c, 0x6726, 0x080c, + 0x99ed, 0x080c, 0xb1a7, 0x080c, 0x9ab3, 0x0005, 0xe53b, 0xe53d, + 0xe53d, 0xe53b, 0xe53b, 0xe53b, 0xe53b, 0xe53b, 0xe53b, 0xe53b, + 0xe53b, 0xe53b, 0xe53b, 0x080c, 0x0d85, 0x080c, 0xb1a7, 0x080c, + 0x9ab3, 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0d85, 0x9182, 0x0092, + 0x1a0c, 0x0d85, 0x9182, 0x0085, 0x0002, 0xe55a, 0xe55a, 0xe55a, + 0xe55c, 0xe55a, 0xe55a, 0xe55a, 0xe55a, 0xe55a, 0xe55a, 0xe55a, + 0xe55a, 0xe55a, 0x080c, 0x0d85, 0x0005, 0x9186, 0x0013, 0x0148, + 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0xb227, + 0x0020, 0x080c, 0x99ed, 0x080c, 0xb1a7, 0x0005, 0x0036, 0x080c, + 0xece1, 0x604b, 0x0000, 0x2019, 0x000b, 0x0011, 0x003e, 0x0005, + 0x6010, 0x0006, 0x0059, 0x000e, 0x6012, 0x6023, 0x0006, 0x6003, + 0x0007, 0x601b, 0x0000, 0x604b, 0x0000, 0x0005, 0x0126, 0x0036, + 0x2091, 0x8000, 0x080c, 0xacfc, 0x0106, 0x0086, 0x2c40, 0x0096, + 0x904e, 0x080c, 0xa667, 0x009e, 0x008e, 0x1558, 0x0076, 0x2c38, + 0x080c, 0xa712, 0x007e, 0x1528, 0x6000, 0x9086, 0x0000, 0x0508, + 0x6020, 0x9086, 0x0007, 0x01e8, 0x0096, 0x601c, 0xd084, 0x0140, + 0x080c, 0xece1, 0x080c, 0xd65d, 0x080c, 0x1ad3, 0x6023, 0x0007, + 0x6014, 0x2048, 0x080c, 0xcf1b, 0x0110, 0x080c, 0xea30, 0x009e, + 0x9006, 0x6046, 0x6016, 0x080c, 0xece1, 0x6023, 0x0007, 0x080c, + 0xd65d, 0x010e, 0x090c, 0xad18, 0x003e, 0x012e, 0x0005, 0x00f6, + 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, + 0x080c, 0x268c, 0x1904, 0xe621, 0x0016, 0x00c6, 0x080c, 0x67b4, + 0x1904, 0xe61f, 0x001e, 0x00c6, 0x080c, 0xd645, 0x1130, 0xb884, + 0x9005, 0x0118, 0x080c, 0x347d, 0x0148, 0x2b10, 0x2160, 0x6010, + 0x0006, 0x6212, 0x080c, 0xd64c, 0x000e, 0x6012, 0x00ce, 0x002e, + 0x0026, 0x0016, 0x080c, 0xacfc, 0x2019, 0x0029, 0x080c, 0xa7e2, + 0x080c, 0x97b0, 0x0076, 0x903e, 0x080c, 0x966d, 0x007e, 0x001e, + 0x0076, 0x903e, 0x080c, 0xe75d, 0x007e, 0x080c, 0xad18, 0x0026, + 0xba04, 0x9294, 0xff00, 0x8217, 0x9286, 0x0006, 0x0118, 0x9286, + 0x0004, 0x1118, 0xbaa0, 0x080c, 0x33e0, 0x002e, 0xbc84, 0x001e, + 0x080c, 0x61b7, 0xbe12, 0xbd16, 0xbc86, 0x9006, 0x0010, 0x00ce, + 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce, 0x00fe, 0x0005, 0x00c6, + 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1824, 0x2104, 0x9086, 0x0074, + 0x1904, 0xe680, 0x2069, 0x0260, 0x6944, 0x9182, 0x0100, 0x06e0, + 0x6940, 0x9184, 0x8000, 0x0904, 0xe67d, 0x2001, 0x197c, 0x2004, + 0x9005, 0x1140, 0x6010, 0x2058, 0xb884, 0x9005, 0x0118, 0x9184, + 0x0800, 0x0598, 0x6948, 0x918a, 0x0001, 0x0648, 0x080c, 0xee47, + 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009, 0x0205, 0x200b, 0x0001, + 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182, 0x0100, 0x02a8, 0x6940, + 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001, 0x0288, 0x6950, 0x918a, + 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100, 0x00a0, 0x6017, 0x0300, + 0x0088, 0x6017, 0x0500, 0x0070, 0x6017, 0x0700, 0x0058, 0x6017, + 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028, 0x6017, 0x0f00, 0x0010, + 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008, 0x9006, 0x001e, 0x00be, + 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6, 0x0026, 0x0036, 0x0156, + 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff, 0x9286, 0x0006, 0x0180, + 0x9286, 0x0004, 0x0168, 0x9394, 0xff00, 0x8217, 0x9286, 0x0006, + 0x0138, 0x9286, 0x0004, 0x0120, 0x080c, 0x67c3, 0x0804, 0xe6ec, + 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, + 0x080c, 0xc222, 0x009e, 0x15c8, 0x2011, 0x027a, 0x20a9, 0x0004, + 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xc222, 0x009e, 0x1568, + 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x1848, 0x210c, + 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, 0xea8d, 0xb800, 0xc0e5, + 0xb802, 0x080c, 0xacfc, 0x2019, 0x0029, 0x080c, 0x97b0, 0x0076, + 0x2039, 0x0000, 0x080c, 0x966d, 0x2c08, 0x080c, 0xe75d, 0x007e, + 0x080c, 0xad18, 0x2001, 0x0007, 0x080c, 0x6726, 0x2001, 0x0007, + 0x080c, 0x66fa, 0x001e, 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, + 0x00be, 0x00ce, 0x0005, 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, + 0x0800, 0x0118, 0x6017, 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, + 0x00b6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, + 0x7930, 0x7834, 0x080c, 0x268c, 0x11d0, 0x080c, 0x67b4, 0x11b8, + 0x2011, 0x0270, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, + 0x080c, 0xc222, 0x009e, 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, + 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xc222, 0x009e, 0x015e, + 0x003e, 0x002e, 0x001e, 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, + 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, + 0x220c, 0x080c, 0x268c, 0x11d0, 0x080c, 0x67b4, 0x11b8, 0x2011, + 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, + 0xc222, 0x009e, 0x1158, 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, + 0x2b48, 0x2019, 0x0006, 0x080c, 0xc222, 0x009e, 0x015e, 0x003e, + 0x002e, 0x001e, 0x000e, 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, + 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, + 0x080c, 0xad5a, 0x0106, 0x190c, 0xacfc, 0x2740, 0x2029, 0x19f4, + 0x252c, 0x2021, 0x19fb, 0x2424, 0x2061, 0x1ddc, 0x2071, 0x1800, + 0x7654, 0x7074, 0x81ff, 0x0150, 0x0006, 0x9186, 0x1b39, 0x000e, + 0x0128, 0x8001, 0x9602, 0x1a04, 0xe803, 0x0018, 0x9606, 0x0904, + 0xe803, 0x080c, 0x8eee, 0x0904, 0xe7fa, 0x2100, 0x9c06, 0x0904, + 0xe7fa, 0x6720, 0x9786, 0x0007, 0x0904, 0xe7fa, 0x080c, 0xeace, + 0x1904, 0xe7fa, 0x080c, 0xee65, 0x0904, 0xe7fa, 0x080c, 0xeabe, + 0x0904, 0xe7fa, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x347d, + 0x0904, 0xe845, 0x6004, 0x9086, 0x0000, 0x1904, 0xe845, 0x9786, + 0x0004, 0x0904, 0xe845, 0x2500, 0x9c06, 0x0904, 0xe7fa, 0x2400, + 0x9c06, 0x0904, 0xe7fa, 0x88ff, 0x0118, 0x605c, 0x9906, 0x15d0, + 0x0096, 0x6043, 0xffff, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, + 0x080c, 0x1ad3, 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xd132, + 0x1130, 0x080c, 0xbb5c, 0x009e, 0x080c, 0xb1a7, 0x0418, 0x6014, + 0x2048, 0x080c, 0xcf1b, 0x01d8, 0x9786, 0x0003, 0x1588, 0xa867, + 0x0103, 0xa87c, 0xd0cc, 0x0130, 0x0096, 0xa878, 0x2048, 0x080c, + 0x100b, 0x009e, 0xab7a, 0xa877, 0x0000, 0x080c, 0xeddf, 0x0016, + 0x080c, 0xd220, 0x080c, 0x7006, 0x001e, 0x080c, 0xd10c, 0x009e, + 0x080c, 0xb1a7, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, + 0x1210, 0x0804, 0xe776, 0x010e, 0x190c, 0xad18, 0x012e, 0x002e, + 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, + 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128, 0x080c, 0xeddf, + 0x080c, 0xea30, 0x08e0, 0x009e, 0x08e8, 0x9786, 0x0009, 0x11f8, + 0x6000, 0x9086, 0x0004, 0x01c0, 0x6000, 0x9086, 0x0003, 0x11a0, + 0x080c, 0x9a48, 0x0096, 0x6114, 0x2148, 0x080c, 0xcf1b, 0x0118, + 0x6010, 0x080c, 0x7012, 0x009e, 0x00c6, 0x080c, 0xb16c, 0x00ce, + 0x0036, 0x080c, 0x9ab3, 0x003e, 0x009e, 0x0804, 0xe7fa, 0x9786, + 0x000a, 0x0904, 0xe7ea, 0x0804, 0xe7df, 0x81ff, 0x0904, 0xe7fa, + 0x9180, 0x0001, 0x2004, 0x9086, 0x0018, 0x0138, 0x9180, 0x0001, + 0x2004, 0x9086, 0x002d, 0x1904, 0xe7fa, 0x6000, 0x9086, 0x0002, + 0x1904, 0xe7fa, 0x080c, 0xd121, 0x0138, 0x080c, 0xd132, 0x1904, + 0xe7fa, 0x080c, 0xbb5c, 0x0038, 0x080c, 0x3344, 0x080c, 0xd132, + 0x1110, 0x080c, 0xbb5c, 0x080c, 0xb1a7, 0x0804, 0xe7fa, 0xa864, + 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, 0x00e6, 0x0016, + 0x2c08, 0x2170, 0x9006, 0x080c, 0xea57, 0x001e, 0x0120, 0x6020, + 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, 0xe894, 0xe894, + 0xe894, 0xe894, 0xe894, 0xe894, 0xe896, 0xe894, 0xe894, 0xe894, + 0xe8bf, 0xb1a7, 0xb1a7, 0xe894, 0x9006, 0x0005, 0x0036, 0x0046, + 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, 0x2c00, 0x2009, + 0x0020, 0x080c, 0xea8d, 0x001e, 0x004e, 0x2019, 0x0002, 0x080c, + 0xe586, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, 0x080c, 0xcf1b, + 0x0140, 0x6014, 0x904d, 0x080c, 0xcae9, 0x687b, 0x0005, 0x080c, + 0x7012, 0x009e, 0x080c, 0xb1a7, 0x9085, 0x0001, 0x0005, 0x0019, + 0x9085, 0x0001, 0x0005, 0x6000, 0x908a, 0x0010, 0x1a0c, 0x0d85, + 0x000b, 0x0005, 0xe8da, 0xe8da, 0xe8f1, 0xe8e1, 0xe900, 0xe8da, + 0xe8da, 0xe8dc, 0xe8da, 0xe8da, 0xe8da, 0xe8da, 0xe8da, 0xe8da, + 0xe8da, 0xe8da, 0x080c, 0x0d85, 0x080c, 0xb1a7, 0x9085, 0x0001, + 0x0005, 0x0036, 0x00e6, 0x2071, 0x19e8, 0x704c, 0x9c06, 0x1128, + 0x2019, 0x0001, 0x080c, 0xa596, 0x0010, 0x080c, 0xa7a1, 0x00ee, + 0x003e, 0x0096, 0x00d6, 0x6014, 0x2048, 0xa87b, 0x0005, 0x080c, + 0x7012, 0x080c, 0xb1a7, 0x00de, 0x009e, 0x9085, 0x0001, 0x0005, + 0x601c, 0xd084, 0x190c, 0x1ad3, 0x0c60, 0x2001, 0x0001, 0x080c, + 0x66e6, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, + 0x1805, 0x2011, 0x0276, 0x080c, 0xc20e, 0x003e, 0x002e, 0x001e, + 0x015e, 0x9005, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076, + 0x0066, 0x00b6, 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0x1ddc, + 0x2079, 0x0001, 0x8fff, 0x0904, 0xe977, 0x2071, 0x1800, 0x7654, + 0x7074, 0x8001, 0x9602, 0x1a04, 0xe977, 0x88ff, 0x0120, 0x2800, + 0x9c06, 0x15a0, 0x2078, 0x080c, 0xeabe, 0x0580, 0x2400, 0x9c06, + 0x0568, 0x6720, 0x9786, 0x0006, 0x1548, 0x9786, 0x0007, 0x0530, + 0x88ff, 0x1150, 0xd58c, 0x1118, 0x6010, 0x9b06, 0x11f8, 0xd584, + 0x0118, 0x605c, 0x9106, 0x11d0, 0x0096, 0x601c, 0xd084, 0x0140, + 0x080c, 0xece1, 0x080c, 0xd65d, 0x080c, 0x1ad3, 0x6023, 0x0007, + 0x6014, 0x2048, 0x080c, 0xcf1b, 0x0120, 0x0046, 0x080c, 0xea30, + 0x004e, 0x009e, 0x080c, 0xb1a7, 0x88ff, 0x1198, 0x9ce0, 0x001c, + 0x2001, 0x181a, 0x2004, 0x9c02, 0x1210, 0x0804, 0xe92a, 0x9006, + 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, + 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x080c, 0xacfc, 0x00b6, 0x0076, + 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, + 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0xa667, 0x009e, 0x008e, + 0x903e, 0x080c, 0xa712, 0x080c, 0xe91b, 0x005e, 0x007e, 0x00be, + 0x080c, 0xad18, 0x0005, 0x080c, 0xacfc, 0x00b6, 0x0046, 0x0056, + 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, 0x007f, 0x900e, + 0x0016, 0x0036, 0x080c, 0x67b4, 0x1180, 0x0056, 0x0086, 0x9046, + 0x2508, 0x2029, 0x0001, 0x0096, 0x904e, 0x080c, 0xa667, 0x009e, + 0x008e, 0x903e, 0x080c, 0xa712, 0x005e, 0x003e, 0x001e, 0x8108, + 0x1f04, 0xe9b0, 0x0036, 0x2508, 0x2029, 0x0003, 0x080c, 0xe91b, + 0x003e, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c, + 0xad18, 0x0005, 0x080c, 0xacfc, 0x00b6, 0x0076, 0x0056, 0x6210, + 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, 0x2019, 0x0048, 0x0096, + 0x904e, 0x080c, 0xa667, 0x009e, 0x008e, 0x903e, 0x080c, 0xa712, + 0x2c20, 0x080c, 0xe91b, 0x005e, 0x007e, 0x00be, 0x080c, 0xad18, + 0x0005, 0x080c, 0xacfc, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, + 0x0156, 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c, + 0x67b4, 0x1190, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001, + 0x080c, 0xecc5, 0x004e, 0x0096, 0x904e, 0x080c, 0xa667, 0x009e, + 0x008e, 0x903e, 0x080c, 0xa712, 0x003e, 0x001e, 0x8108, 0x1f04, + 0xea05, 0x0036, 0x2029, 0x0002, 0x080c, 0xe91b, 0x003e, 0x015e, + 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x080c, 0xad18, 0x0005, + 0x0016, 0x00f6, 0x080c, 0xcf19, 0x0198, 0xa864, 0x9084, 0x00ff, + 0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, 0x0000, + 0xab82, 0x080c, 0x7012, 0x2f48, 0x0cb0, 0xab82, 0x080c, 0x7012, + 0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, 0x0000, + 0x080c, 0x7012, 0x2f48, 0x0cb8, 0x080c, 0x7012, 0x0c88, 0x00e6, + 0x0046, 0x0036, 0x2061, 0x1ddc, 0x9005, 0x1138, 0x2071, 0x1800, + 0x7454, 0x7074, 0x8001, 0x9402, 0x12f8, 0x2100, 0x9c06, 0x0188, + 0x6000, 0x9086, 0x0000, 0x0168, 0x6008, 0x9206, 0x1150, 0x6320, + 0x9386, 0x0009, 0x01b0, 0x6010, 0x91a0, 0x0004, 0x2424, 0x9406, + 0x0140, 0x9ce0, 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1220, + 0x0c20, 0x9085, 0x0001, 0x0008, 0x9006, 0x003e, 0x004e, 0x00ee, + 0x0005, 0x631c, 0xd3c4, 0x1d68, 0x0c30, 0x0096, 0x0006, 0x080c, + 0x1059, 0x000e, 0x090c, 0x0d85, 0xaae2, 0xa867, 0x010d, 0xa88e, + 0x0026, 0x2010, 0x080c, 0xcf09, 0x2001, 0x0000, 0x0120, 0x2200, + 0x9080, 0x0017, 0x2004, 0x002e, 0xa87a, 0x9186, 0x0020, 0x0110, + 0xa8e3, 0xffff, 0xa986, 0xac76, 0xa87f, 0x0000, 0x2001, 0x198e, + 0x2004, 0xa882, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x0126, 0x2091, + 0x8000, 0x080c, 0x7012, 0x012e, 0x009e, 0x0005, 0x6700, 0x9786, + 0x0000, 0x0158, 0x9786, 0x0001, 0x0140, 0x9786, 0x000a, 0x0128, + 0x9786, 0x0009, 0x0110, 0x9085, 0x0001, 0x0005, 0x00e6, 0x6010, + 0x9075, 0x0138, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x00ee, + 0x0005, 0x9085, 0x0001, 0x0cd8, 0x0016, 0x6004, 0x908e, 0x001e, + 0x11a0, 0x8007, 0x6134, 0x918c, 0x00ff, 0x9105, 0x6036, 0x6007, + 0x0085, 0x6003, 0x000b, 0x6023, 0x0005, 0x2001, 0x1987, 0x2004, + 0x601a, 0x2009, 0x8020, 0x080c, 0x9617, 0x001e, 0x0005, 0xa001, + 0xa001, 0x0005, 0x6024, 0xd0e4, 0x0158, 0xd0cc, 0x0118, 0x080c, + 0xd267, 0x0030, 0x080c, 0xece1, 0x080c, 0x8c19, 0x080c, 0xb16c, + 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, 0xeb1d, + 0xeb1d, 0xeb1d, 0xeb1f, 0xeb1d, 0xeb1f, 0xeb1f, 0xeb1d, 0xeb1f, + 0xeb1d, 0xeb1d, 0xeb1d, 0xeb1d, 0xeb1d, 0x9006, 0x0005, 0x9085, + 0x0001, 0x0005, 0x9280, 0x0008, 0x2004, 0x9084, 0x000f, 0x0002, + 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0xeb43, 0xeb36, + 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0xeb36, 0x6007, 0x003b, + 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, 0x2009, 0x8020, + 0x080c, 0x9617, 0x0005, 0x0096, 0x00c6, 0x2260, 0x080c, 0xece1, + 0x604b, 0x0000, 0x6024, 0xc0f4, 0xc0e4, 0x6026, 0x603b, 0x0000, + 0x00ce, 0x00d6, 0x2268, 0x9186, 0x0007, 0x1904, 0xeb9c, 0x6814, + 0x9005, 0x0138, 0x2048, 0xa87c, 0xd0fc, 0x1118, 0x00de, 0x009e, + 0x08a8, 0x6007, 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, + 0x9617, 0x00c6, 0x2d60, 0x6100, 0x9186, 0x0002, 0x1904, 0xec0c, + 0x6014, 0x9005, 0x1138, 0x6000, 0x9086, 0x0007, 0x190c, 0x0d85, + 0x0804, 0xec0c, 0x2048, 0x080c, 0xcf1b, 0x1130, 0x0028, 0x2048, + 0xa800, 0x9005, 0x1de0, 0x2900, 0x2048, 0xa87c, 0x9084, 0x0003, + 0x9086, 0x0002, 0x1168, 0xa87c, 0xc0dc, 0xc0f4, 0xa87e, 0xa880, + 0xc0fc, 0xa882, 0x2009, 0x0043, 0x080c, 0xe3b5, 0x0804, 0xec0c, + 0x2009, 0x0041, 0x0804, 0xec06, 0x9186, 0x0005, 0x15a0, 0x6814, + 0x2048, 0xa87c, 0xd0bc, 0x1120, 0x00de, 0x009e, 0x0804, 0xeb36, + 0xd0b4, 0x0128, 0xd0fc, 0x090c, 0x0d85, 0x0804, 0xeb57, 0x6007, + 0x003a, 0x6003, 0x0001, 0x2009, 0x8020, 0x080c, 0x9617, 0x00c6, + 0x2d60, 0x6100, 0x9186, 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, + 0xec0c, 0x6814, 0x2048, 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, + 0xc1fc, 0xc1bc, 0xa982, 0x00f6, 0x2c78, 0x080c, 0x17ad, 0x00fe, + 0x2009, 0x0042, 0x0498, 0x0036, 0x080c, 0x1059, 0x090c, 0x0d85, + 0xa867, 0x010d, 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, + 0xa887, 0x0045, 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, + 0xc0dd, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, + 0x635c, 0xab7a, 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, + 0xa89f, 0x0001, 0x080c, 0x7012, 0x2019, 0x0045, 0x6008, 0x2068, + 0x080c, 0xe578, 0x2d00, 0x600a, 0x003e, 0x0038, 0x604b, 0x0000, + 0x6003, 0x0007, 0x080c, 0xe3b5, 0x00ce, 0x00de, 0x009e, 0x0005, + 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, + 0x9186, 0x0027, 0x1178, 0x080c, 0x99ed, 0x0036, 0x0096, 0x6014, + 0x2048, 0x2019, 0x0004, 0x080c, 0xea30, 0x009e, 0x003e, 0x080c, + 0x9ab3, 0x0005, 0x9186, 0x0014, 0x0d70, 0x080c, 0xb227, 0x0005, + 0xec3f, 0xec3d, 0xec3d, 0xec3d, 0xec3d, 0xec3d, 0xec3f, 0xec3d, + 0xec3d, 0xec3d, 0xec3d, 0xec3d, 0xec3d, 0x080c, 0x0d85, 0x6003, + 0x000c, 0x080c, 0x9ab3, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, + 0x0085, 0x0208, 0x001a, 0x080c, 0xb227, 0x0005, 0xec5b, 0xec5b, + 0xec5b, 0xec5b, 0xec5d, 0xec7d, 0xec5b, 0xec5b, 0xec5b, 0xec5b, + 0xec5b, 0xec5b, 0xec5b, 0x080c, 0x0d85, 0x00d6, 0x2c68, 0x080c, + 0xb116, 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, + 0x210c, 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, + 0x6910, 0x6112, 0x6023, 0x0004, 0x2009, 0x8020, 0x080c, 0x9617, + 0x2d60, 0x080c, 0xb16c, 0x00de, 0x0005, 0x080c, 0xb16c, 0x0005, + 0x00e6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, + 0x0005, 0x2009, 0x1867, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, + 0x6024, 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1988, 0x2004, + 0x604a, 0x2009, 0x1867, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, + 0x1867, 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, + 0x00d8, 0x2001, 0x1988, 0x200c, 0x2001, 0x1986, 0x2004, 0x9100, + 0x9080, 0x000a, 0x604a, 0x6010, 0x00b6, 0x2058, 0xb8bc, 0x00be, + 0x0008, 0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, + 0x600f, 0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, + 0x615c, 0xb8bc, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x605c, + 0x9106, 0x1138, 0x600c, 0x2072, 0x080c, 0x8c19, 0x080c, 0xb16c, + 0x0010, 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, + 0x0005, 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8bc, 0x906d, 0x0130, + 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, + 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182c, 0x2204, 0x9084, + 0x00ff, 0x2019, 0x026e, 0x2334, 0x96b4, 0x00ff, 0x9636, 0x1508, + 0x8318, 0x2334, 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, + 0x0270, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, + 0x080c, 0xc222, 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, + 0x6010, 0x0096, 0x2048, 0x2019, 0x0006, 0x080c, 0xc222, 0x009e, + 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, + 0x080c, 0x6130, 0x080c, 0x30bf, 0x00ee, 0x0005, 0x0096, 0x0026, + 0x080c, 0x1059, 0x090c, 0x0d85, 0xa85c, 0x9080, 0x001a, 0x20a0, + 0x20a9, 0x000c, 0xa860, 0x20e8, 0x9006, 0x4004, 0x9186, 0x0046, + 0x1118, 0xa867, 0x0136, 0x0038, 0xa867, 0x0138, 0x9186, 0x0041, + 0x0110, 0xa87b, 0x0001, 0x7038, 0x9084, 0xff00, 0x7240, 0x9294, + 0xff00, 0x8007, 0x9215, 0xaa9a, 0x9186, 0x0046, 0x1168, 0x7038, + 0x9084, 0x00ff, 0x723c, 0x9294, 0xff00, 0x9215, 0xaa9e, 0x723c, + 0x9294, 0x00ff, 0xaaa2, 0x0060, 0x7040, 0x9084, 0x00ff, 0x7244, + 0x9294, 0xff00, 0x9215, 0xaa9e, 0x7244, 0x9294, 0x00ff, 0xaaa2, + 0x9186, 0x0046, 0x1118, 0x9e90, 0x0012, 0x0010, 0x9e90, 0x001a, + 0x2204, 0x8007, 0xa8a6, 0x8210, 0x2204, 0x8007, 0xa8aa, 0x8210, + 0x2204, 0x8007, 0xa8ae, 0x8210, 0x2204, 0x8007, 0xa8b2, 0x8210, + 0x9186, 0x0046, 0x11b8, 0x9e90, 0x0016, 0x2204, 0x8007, 0xa8b6, + 0x8210, 0x2204, 0x8007, 0xa8ba, 0x8210, 0x2204, 0x8007, 0xa8be, + 0x8210, 0x2204, 0x8007, 0xa8c2, 0x8210, 0x2011, 0x0205, 0x2013, + 0x0001, 0x00b0, 0x9e90, 0x001e, 0x2204, 0x8007, 0xa8b6, 0x8210, + 0x2204, 0x8007, 0xa8ba, 0x2011, 0x0205, 0x2013, 0x0001, 0x2011, + 0x0260, 0x2204, 0x8007, 0xa8be, 0x8210, 0x2204, 0x8007, 0xa8c2, + 0x9186, 0x0046, 0x1118, 0x2011, 0x0262, 0x0010, 0x2011, 0x026a, + 0x0146, 0x01d6, 0x0036, 0x20a9, 0x0001, 0x2019, 0x0008, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0x2204, 0x8007, 0x4004, + 0x8210, 0x8319, 0x1dd0, 0x003e, 0x01ce, 0x013e, 0x2011, 0x0205, + 0x2013, 0x0000, 0x002e, 0x080c, 0x7012, 0x009e, 0x0005, 0x00e6, + 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, + 0x00ee, 0x0005, 0xa880, 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, + 0x00c6, 0x0076, 0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, + 0x2091, 0x8000, 0x2029, 0x19f4, 0x252c, 0x2021, 0x19fb, 0x2424, + 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7654, 0x7074, 0x9606, 0x0578, + 0x6720, 0x9786, 0x0001, 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, + 0x9c06, 0x01e8, 0x2400, 0x9c06, 0x01d0, 0x080c, 0xeabe, 0x01b8, + 0x080c, 0xeace, 0x11a0, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, + 0x080c, 0x1ad3, 0x001e, 0x080c, 0xd121, 0x1110, 0x080c, 0x3344, + 0x080c, 0xd132, 0x1110, 0x080c, 0xbb5c, 0x080c, 0xb1a7, 0x9ce0, + 0x001c, 0x2001, 0x181a, 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, + 0x001e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, + 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, 0xd0dc, 0x0005, 0x0006, + 0x2001, 0x1837, 0x2004, 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, + 0x0046, 0x080c, 0xd645, 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, + 0x6010, 0x00b6, 0x2058, 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, + 0x4e58, 0x004e, 0x003e, 0x000e, 0x0005, 0x6004, 0x9086, 0x0001, + 0x1128, 0x080c, 0xa7e2, 0x080c, 0xb1a7, 0x9006, 0x0005, 0x00e6, + 0x00c6, 0x00b6, 0x0046, 0x2061, 0x1ddc, 0x2071, 0x1800, 0x7454, + 0x7074, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, 0x0168, 0x6000, + 0x9086, 0x0000, 0x0148, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1120, + 0x6004, 0x9086, 0x0002, 0x0140, 0x9ce0, 0x001c, 0x2001, 0x181a, + 0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, 0x0008, 0x9006, + 0x004e, 0x00be, 0x00ce, 0x00ee, 0x0005, 0x2001, 0x1810, 0x2004, + 0xd0a4, 0x0160, 0x2001, 0x1837, 0x2004, 0xd0a4, 0x0138, 0x2001, + 0x1848, 0x2004, 0xd0a4, 0x1118, 0x9085, 0x0001, 0x0005, 0x9006, + 0x0ce8, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, + 0x1840, 0xd5a4, 0x0118, 0x7004, 0x8000, 0x7006, 0xd5b4, 0x0118, + 0x7000, 0x8000, 0x7002, 0xd5ac, 0x0178, 0x2500, 0x9084, 0x0007, + 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, 0x908e, 0x0005, + 0x0118, 0x2071, 0xfff6, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e, + 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xffee, + 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e05, 0x8000, 0x2077, + 0x1220, 0x8e70, 0x2e05, 0x8000, 0x2077, 0x0005, 0x00e6, 0x2071, + 0xffec, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, 0xfff0, 0x0c69, + 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, + 0x1840, 0x7014, 0x8000, 0x7016, 0x00ee, 0x000e, 0x012e, 0x0005, + 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, + 0xaa6e }; +#ifdef UNIQUE_FW_NAME +unsigned short fw2322ipx_length01 = 0xe719; +#else +unsigned short risc_code_length01 = 0xe719; +#endif + +/* + * + */ + +unsigned long rseqipx_code_addr01 = 0x0001c000 ; +unsigned short rseqipx_code01[] = { +0x000b, 0x0003, 0x0000, 0x0a4e, 0x0001, 0xc000, 0x0008, 0x8064, + 0x0000, 0x0010, 0x0000, 0x8066, 0x0008, 0x0101, 0x0003, 0xc007, + 0x0008, 0x80e0, 0x0008, 0xff00, 0x0000, 0x80e2, 0x0008, 0xff00, + 0x0008, 0x0162, 0x0000, 0x8066, 0x0008, 0xa101, 0x000b, 0xc00f, + 0x0008, 0x0d02, 0x0000, 0x8060, 0x0000, 0x0400, 0x000b, 0x60c6, + 0x0008, 0x80e0, 0x0000, 0x0100, 0x000b, 0x5819, 0x0003, 0x7b08, + 0x0003, 0x5241, 0x000b, 0xc813, 0x0009, 0xbac0, 0x0000, 0x008a, + 0x0003, 0x8813, 0x000a, 0x7042, 0x0003, 0x8813, 0x0000, 0x15fc, + 0x000b, 0xb013, 0x0009, 0xc4c0, 0x0000, 0x7000, 0x0001, 0xffa0, + 0x0000, 0x2000, 0x0003, 0x93cd, 0x0008, 0x808c, 0x0000, 0x0001, + 0x0007, 0x0000, 0x0007, 0x0000, 0x0000, 0x40d4, 0x000a, 0x4047, + 0x0008, 0x808c, 0x0000, 0x0002, 0x0007, 0x0000, 0x000b, 0x0832, + 0x0000, 0x4022, 0x0003, 0x0038, 0x0008, 0x4122, 0x0009, 0xeac0, + 0x0008, 0xff00, 0x0009, 0xffe0, 0x0008, 0x0500, 0x000b, 0x0bf4, + 0x0002, 0x4447, 0x0003, 0x8bf1, 0x0008, 0x0bfe, 0x0001, 0x11a0, + 0x000b, 0x13d3, 0x0001, 0x0ca0, 0x000b, 0x13d3, 0x0001, 0x9180, + 0x0000, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc046, 0x0008, 0x808c, + 0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x0004, + 0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc04e, 0x0000, 0x03fe, + 0x0001, 0x43e0, 0x0003, 0x8bd0, 0x0009, 0xc2c0, 0x0008, 0x00ff, + 0x0001, 0x02e0, 0x0003, 0x8bd0, 0x0001, 0x9180, 0x0008, 0x0005, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0000, 0x0019, 0x0003, 0xc05d, 0x0002, 0x0240, 0x000b, 0x0bcd, + 0x0008, 0x00fc, 0x0003, 0x33d0, 0x000a, 0x0244, 0x0003, 0x086f, + 0x0004, 0x021a, 0x0001, 0x9180, 0x0000, 0x0007, 0x0008, 0x7f62, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0002, 0x0234, 0x0008, 0x7f04, + 0x0000, 0x8066, 0x0000, 0x040a, 0x0003, 0xc06e, 0x000a, 0x0248, + 0x000b, 0x0879, 0x0001, 0x9180, 0x0008, 0x0006, 0x0008, 0x7f62, + 0x0008, 0x8002, 0x0008, 0x0003, 0x0000, 0x8066, 0x0000, 0x020a, + 0x000b, 0xc078, 0x0000, 0x112a, 0x0008, 0x002e, 0x0008, 0x022c, + 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c, 0x0000, 0x0002, + 0x0008, 0x1760, 0x0008, 0x8062, 0x0008, 0x000f, 0x0000, 0x8066, + 0x0008, 0x0011, 0x0003, 0xc085, 0x0008, 0x01fe, 0x0009, 0x42e0, + 0x000b, 0x8bc0, 0x0000, 0x00fe, 0x0001, 0x43e0, 0x000b, 0x8bc0, + 0x0000, 0x1734, 0x0000, 0x1530, 0x0008, 0x1632, 0x0008, 0x0d2a, + 0x0001, 0x9880, 0x0008, 0x0012, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x1e0a, 0x0003, 0xc097, + 0x0008, 0x808a, 0x0008, 0x0003, 0x0000, 0x1a60, 0x0008, 0x8062, + 0x0000, 0x0002, 0x000b, 0x589d, 0x0000, 0x8066, 0x0000, 0x3679, + 0x000b, 0xc0a0, 0x000b, 0x58a1, 0x0008, 0x8054, 0x0008, 0x0011, + 0x0000, 0x8074, 0x0008, 0x1010, 0x0008, 0x1efc, 0x0003, 0x3013, + 0x0004, 0x00aa, 0x0003, 0x0013, 0x0000, 0x1c60, 0x0000, 0x1b62, + 0x0000, 0x8066, 0x0008, 0x0231, 0x0003, 0xc0ae, 0x0003, 0x58af, + 0x0008, 0x0140, 0x0000, 0x0242, 0x0002, 0x1f43, 0x0003, 0x88b9, + 0x0000, 0x0d44, 0x0008, 0x0d46, 0x0008, 0x0348, 0x0008, 0x044a, + 0x000b, 0x00bd, 0x0008, 0x0344, 0x0008, 0x0446, 0x0008, 0x0548, + 0x0000, 0x064a, 0x000a, 0x1948, 0x0003, 0x08c0, 0x0008, 0x0d4a, + 0x0003, 0x58c0, 0x0008, 0x8054, 0x0000, 0x0001, 0x0000, 0x8074, + 0x0008, 0x2020, 0x000f, 0x4000, 0x0002, 0x7043, 0x0003, 0x8816, + 0x0002, 0x7040, 0x000b, 0x8949, 0x0000, 0x4820, 0x0008, 0x0bfe, + 0x0009, 0x10a0, 0x0003, 0x1140, 0x0001, 0x0ca0, 0x0003, 0x1140, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0008, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc0d7, + 0x0001, 0x80e0, 0x0008, 0x0003, 0x000b, 0x8940, 0x0000, 0x8060, + 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0004, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc0e2, 0x0008, 0x0060, + 0x0008, 0x8062, 0x0000, 0x0004, 0x0000, 0x8066, 0x0000, 0x0411, + 0x000b, 0xc0e8, 0x0008, 0x4afe, 0x0009, 0x03e0, 0x000b, 0x8940, + 0x0009, 0xcbc0, 0x0008, 0x00ff, 0x0001, 0x02e0, 0x000b, 0x8940, + 0x0000, 0x49b4, 0x0002, 0x4b4e, 0x000b, 0x8951, 0x0008, 0x808a, + 0x0000, 0x0004, 0x0000, 0x18fe, 0x0001, 0x10e0, 0x000b, 0x88fa, + 0x0002, 0x192f, 0x0008, 0x7f32, 0x0008, 0x15fe, 0x0001, 0x10e0, + 0x000b, 0x88ff, 0x0002, 0x162f, 0x0008, 0x7f2c, 0x0000, 0x8060, + 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0007, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc106, 0x000a, 0x004f, + 0x000b, 0x8937, 0x000a, 0x0040, 0x000b, 0x0921, 0x0002, 0x004e, + 0x000b, 0x0921, 0x0002, 0x0030, 0x0002, 0x7f2f, 0x0000, 0x7f00, + 0x0000, 0x8066, 0x0008, 0x000a, 0x0003, 0xc112, 0x0008, 0x1010, + 0x0004, 0x0201, 0x0003, 0xb11a, 0x0004, 0x0387, 0x000c, 0x01eb, + 0x0003, 0x7816, 0x0003, 0x0013, 0x0000, 0x0806, 0x0008, 0x8010, + 0x0000, 0x001f, 0x0004, 0x0387, 0x0000, 0x0310, 0x0004, 0x0387, + 0x0003, 0x0118, 0x000a, 0x002f, 0x0000, 0x7f00, 0x0000, 0x8066, + 0x0008, 0x000a, 0x000b, 0xc125, 0x0004, 0x01c4, 0x000a, 0x0040, + 0x000b, 0x093a, 0x0004, 0x0231, 0x0000, 0x8000, 0x0000, 0x0002, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0006, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x000a, 0x0003, 0xc133, + 0x0000, 0x8072, 0x0000, 0x4000, 0x0003, 0x0118, 0x0008, 0x8010, + 0x0008, 0x001e, 0x0003, 0x013c, 0x0008, 0x8010, 0x0008, 0x001d, + 0x0004, 0x0387, 0x0008, 0x1010, 0x0004, 0x0387, 0x0003, 0x0016, + 0x0002, 0x4b4e, 0x0003, 0x0946, 0x0008, 0x808a, 0x0000, 0x0004, + 0x000b, 0x6146, 0x000f, 0x8000, 0x0008, 0x808a, 0x0000, 0x0004, + 0x0003, 0x0016, 0x0008, 0x808a, 0x0000, 0x0004, 0x0007, 0x0000, + 0x0007, 0x0000, 0x0008, 0x80e0, 0x0008, 0x0202, 0x000b, 0x6149, + 0x000b, 0x0014, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, + 0x0008, 0x0011, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009, + 0x000b, 0xc158, 0x000a, 0x004f, 0x000b, 0x89b5, 0x0000, 0x8060, + 0x0000, 0x0400, 0x0009, 0x9080, 0x0008, 0x0005, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc162, 0x0008, 0x0060, + 0x0008, 0x8062, 0x0000, 0x001f, 0x0000, 0x8066, 0x0000, 0x0209, + 0x000b, 0xc168, 0x000a, 0x014b, 0x0003, 0x09b5, 0x0008, 0x8062, + 0x0008, 0x000f, 0x0000, 0x8066, 0x0000, 0x0211, 0x0003, 0xc16f, + 0x0008, 0x01fe, 0x0001, 0x02d0, 0x000b, 0x89b5, 0x0004, 0x01cd, + 0x0003, 0x09b5, 0x0008, 0x03a0, 0x0008, 0x8004, 0x0000, 0x0002, + 0x0000, 0x8006, 0x0000, 0x0043, 0x0008, 0x4908, 0x0008, 0x808a, + 0x0000, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, + 0x0008, 0x0000, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x041a, + 0x0003, 0xc184, 0x0003, 0xe185, 0x0008, 0x4908, 0x0008, 0x480a, + 0x0008, 0x808a, 0x0000, 0x0004, 0x0008, 0x0060, 0x0008, 0x8062, + 0x0008, 0x002b, 0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc18f, + 0x0008, 0x04fe, 0x0009, 0x02a0, 0x0003, 0x9196, 0x0002, 0x0500, + 0x000b, 0x09b2, 0x000b, 0x0197, 0x0000, 0x05fe, 0x0001, 0x03a0, + 0x000b, 0x11b2, 0x0000, 0x0d0c, 0x0008, 0x0d0e, 0x0008, 0x0d10, + 0x0000, 0x0d12, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x000d, + 0x0000, 0x8066, 0x0008, 0x0832, 0x000b, 0xc1a2, 0x0000, 0x800a, + 0x0000, 0x8005, 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, + 0x0008, 0x0011, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0a12, + 0x0003, 0xc1ac, 0x0008, 0x5006, 0x0008, 0x100e, 0x000c, 0x01d8, + 0x0003, 0x7816, 0x0003, 0x0013, 0x0008, 0x0208, 0x0008, 0x030a, + 0x0003, 0x0199, 0x0004, 0x01c4, 0x0008, 0x808a, 0x0000, 0x0004, + 0x0008, 0x8010, 0x0008, 0x0021, 0x0004, 0x0387, 0x0008, 0x1010, + 0x0004, 0x0387, 0x0000, 0x4810, 0x0004, 0x0387, 0x0008, 0x4910, + 0x0004, 0x0387, 0x0008, 0x808a, 0x0000, 0x0004, 0x0003, 0x0016, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0009, 0x9080, 0x0000, 0x0002, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0xb40a, 0x000b, 0xc1cb, + 0x000f, 0x4000, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x0a62, + 0x0000, 0x8066, 0x0000, 0x0411, 0x0003, 0xc1d2, 0x0002, 0x0210, + 0x0001, 0xffc0, 0x0000, 0x0007, 0x0009, 0x03e0, 0x000f, 0x4000, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0001, 0x8380, 0x0000, 0x0002, + 0x0009, 0x0a80, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0e0a, + 0x000b, 0xc1e0, 0x0002, 0x0300, 0x0001, 0xffc0, 0x0000, 0x0007, + 0x0000, 0x7f06, 0x0002, 0x0a00, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x060a, 0x000b, 0xc1e9, 0x000f, 0x4000, 0x0000, 0x0da0, + 0x0008, 0x0da2, 0x0008, 0x0da4, 0x0009, 0x8880, 0x0000, 0x0001, + 0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066, + 0x0008, 0xa012, 0x0000, 0x0da6, 0x0008, 0x0da8, 0x0000, 0x0daa, + 0x0000, 0x0dac, 0x0003, 0xc1f9, 0x0009, 0x8880, 0x0008, 0x0009, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0xa03a, 0x0003, 0xc1ff, + 0x000f, 0x4000, 0x0009, 0x8880, 0x0008, 0x0005, 0x0000, 0x8060, + 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x0009, + 0x000b, 0xc208, 0x0008, 0x0060, 0x0008, 0x8062, 0x0000, 0x000d, + 0x0000, 0x8066, 0x0008, 0x0021, 0x000b, 0xc20e, 0x0000, 0x00fe, + 0x0001, 0x01d0, 0x0003, 0x8a17, 0x0008, 0x02fe, 0x0009, 0x03d0, + 0x000b, 0x0a17, 0x0000, 0x0d06, 0x000f, 0x4000, 0x0000, 0x8006, + 0x0000, 0x0001, 0x000f, 0x4000, 0x0008, 0x0060, 0x0008, 0x8062, + 0x0008, 0x002b, 0x0000, 0x8066, 0x0008, 0xa041, 0x000b, 0xc21f, + 0x0002, 0x0243, 0x000b, 0x8a26, 0x0000, 0x54ac, 0x0000, 0x55ae, + 0x0008, 0x0da8, 0x0000, 0x0daa, 0x0000, 0x50b0, 0x0000, 0x51b2, + 0x0000, 0x0db4, 0x0008, 0x0db6, 0x0008, 0x0060, 0x0008, 0x8062, + 0x0000, 0x0007, 0x0000, 0x8066, 0x0008, 0xa452, 0x000b, 0xc22f, + 0x000f, 0x4000, 0x000a, 0x3945, 0x000b, 0x8a3b, 0x0000, 0x8072, + 0x0008, 0x4040, 0x0007, 0x0000, 0x000a, 0x3945, 0x0003, 0x8a39, + 0x000f, 0x4000, 0x0000, 0x8072, 0x0000, 0x4000, 0x0007, 0x0000, + 0x0007, 0x0000, 0x0007, 0x0000, 0x000a, 0x3945, 0x000b, 0x0a33, + 0x000b, 0x023b, 0x000a, 0x3a40, 0x0003, 0x8819, 0x0001, 0xabd0, + 0x0008, 0x0000, 0x0000, 0x7f24, 0x0003, 0x5a46, 0x0008, 0x8054, + 0x0000, 0x0002, 0x0002, 0x1242, 0x0003, 0x0a8c, 0x000a, 0x3a45, + 0x000b, 0x0a7b, 0x000a, 0x1e10, 0x0000, 0x7f3c, 0x000b, 0x0a78, + 0x0002, 0x1d00, 0x0000, 0x7f3a, 0x0000, 0x0d60, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc256, 0x0008, 0x00fc, + 0x0003, 0xb275, 0x0000, 0x1c60, 0x0008, 0x8062, 0x0000, 0x0001, + 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc25e, 0x0008, 0x00fc, + 0x000b, 0x33a9, 0x0000, 0x0038, 0x0008, 0x0060, 0x0008, 0x8062, + 0x0000, 0x0019, 0x0000, 0x8066, 0x0008, 0x0009, 0x000b, 0xc267, + 0x0009, 0x80c0, 0x0008, 0x00ff, 0x0008, 0x7f3e, 0x0000, 0x0d60, + 0x0008, 0x0efe, 0x0001, 0x1f80, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x0009, 0x0003, 0xc271, 0x0008, 0x003a, 0x0000, 0x1dfe, + 0x000b, 0x0252, 0x0008, 0x0036, 0x0004, 0x00aa, 0x000b, 0x028c, + 0x0000, 0x8074, 0x0000, 0x2000, 0x000b, 0x028c, 0x0002, 0x3a44, + 0x000b, 0x0bd6, 0x0000, 0x8074, 0x0000, 0x1000, 0x0001, 0xadd0, + 0x0008, 0x0000, 0x0008, 0x7f0e, 0x0003, 0xb3a6, 0x0001, 0xa7d0, + 0x0008, 0x0000, 0x0000, 0x7f00, 0x0009, 0xa6d0, 0x0008, 0x0000, + 0x0009, 0x00d0, 0x0003, 0x8a9c, 0x0000, 0x8074, 0x0008, 0x4040, + 0x0003, 0x5a8c, 0x0003, 0x5241, 0x000a, 0x3a46, 0x0003, 0x8a9c, + 0x0002, 0x3a47, 0x0003, 0x0a97, 0x0008, 0x8054, 0x0000, 0x0004, + 0x0000, 0x8074, 0x0000, 0x8000, 0x0003, 0x02fc, 0x0009, 0x92c0, + 0x0000, 0x0fc8, 0x000b, 0x0813, 0x000a, 0x1246, 0x000b, 0x8ba0, + 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x0002, 0x0000, 0x8066, + 0x0000, 0x367a, 0x000b, 0xc2a1, 0x0009, 0x92c0, 0x0008, 0x0780, + 0x0003, 0x8bba, 0x0002, 0x124b, 0x000b, 0x0aaa, 0x0002, 0x2e4d, + 0x0002, 0x2e4d, 0x0003, 0x0ba6, 0x000a, 0x3a46, 0x000b, 0x8aba, + 0x000b, 0x5aac, 0x0008, 0x8054, 0x0000, 0x0004, 0x000a, 0x1243, + 0x000b, 0x0afa, 0x0008, 0x8010, 0x0000, 0x000d, 0x0004, 0x0387, + 0x000a, 0x1948, 0x000b, 0x0ab7, 0x000c, 0x037c, 0x0000, 0x1810, + 0x0004, 0x0387, 0x0003, 0x02fa, 0x000a, 0x1948, 0x000b, 0x0abe, + 0x000a, 0x1243, 0x0003, 0x0ba9, 0x000a, 0x194d, 0x0003, 0x0ac2, + 0x000a, 0x1243, 0x000b, 0x0bb0, 0x0003, 0x5ac2, 0x0008, 0x8054, + 0x0000, 0x0004, 0x000a, 0x192e, 0x0008, 0x7f32, 0x000a, 0x1947, + 0x0003, 0x0af4, 0x0002, 0x194f, 0x000b, 0x0ad2, 0x000c, 0x037c, + 0x0000, 0x1810, 0x0004, 0x0201, 0x000b, 0xb2ed, 0x0004, 0x0387, + 0x000c, 0x01eb, 0x0003, 0x02fa, 0x0000, 0x1a60, 0x0008, 0x8062, + 0x0000, 0x001f, 0x0000, 0x8066, 0x0008, 0x0009, 0x0003, 0xc2d7, + 0x000a, 0x004c, 0x000b, 0x8af4, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0001, 0x9880, 0x0000, 0x0007, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0000, 0x320a, 0x0003, 0xc2e1, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0001, 0x9880, 0x0008, 0x0012, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x1e0a, 0x000b, 0xc2e9, 0x0000, 0x1826, 0x0000, 0x1928, + 0x0003, 0x02fa, 0x0000, 0x0806, 0x0008, 0x8010, 0x0000, 0x001f, + 0x0004, 0x0387, 0x0000, 0x0310, 0x0004, 0x0387, 0x0003, 0x02fa, + 0x000c, 0x037c, 0x0008, 0x8010, 0x0000, 0x0001, 0x0004, 0x0387, + 0x0000, 0x1810, 0x0004, 0x0387, 0x0000, 0x8074, 0x0008, 0xf000, + 0x0000, 0x0d30, 0x0002, 0x3a42, 0x0003, 0x8b02, 0x0000, 0x15fc, + 0x0003, 0xb07e, 0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0x0501, + 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0387, 0x0003, 0x0013, + 0x0009, 0xbbe0, 0x0008, 0x0030, 0x000b, 0x8b1e, 0x0000, 0x18fe, + 0x0009, 0x3ce0, 0x0003, 0x0b1b, 0x0008, 0x15fe, 0x0009, 0x3ce0, + 0x0003, 0x0b1b, 0x0008, 0x13fe, 0x0009, 0x3ce0, 0x000b, 0x8b17, + 0x000c, 0x0375, 0x0008, 0x0d26, 0x000b, 0x0318, 0x0004, 0x0377, + 0x0008, 0x8076, 0x0000, 0x0040, 0x000b, 0x0372, 0x0008, 0x8076, + 0x0008, 0x0041, 0x000b, 0x0372, 0x0009, 0xbbe0, 0x0000, 0x0032, + 0x0003, 0x8b23, 0x0008, 0x3c1e, 0x000b, 0x0372, 0x0009, 0xbbe0, + 0x0000, 0x003b, 0x000b, 0x8b28, 0x0000, 0x3cdc, 0x000b, 0x0372, + 0x0009, 0xbbe0, 0x0008, 0x0035, 0x000b, 0x8b2e, 0x0000, 0x8072, + 0x0000, 0x8000, 0x000b, 0x04e5, 0x0009, 0xbbe0, 0x0008, 0x0036, + 0x000b, 0x0c06, 0x0009, 0xbbe0, 0x0000, 0x0037, 0x000b, 0x8b53, + 0x0000, 0x18fe, 0x0009, 0x3ce0, 0x000b, 0x8b1b, 0x0008, 0x8076, + 0x0000, 0x0040, 0x0000, 0x1a60, 0x0008, 0x8062, 0x0000, 0x000d, + 0x0009, 0xa6d0, 0x0008, 0x0000, 0x0008, 0x7f04, 0x0001, 0xa7d0, + 0x0008, 0x0000, 0x0000, 0x7f06, 0x0001, 0xa8d0, 0x0008, 0x0000, + 0x0008, 0x7f08, 0x0009, 0xa9d0, 0x0008, 0x0000, 0x0000, 0x7f0a, + 0x0000, 0x8066, 0x0000, 0x0422, 0x0003, 0xc34a, 0x000c, 0x037c, + 0x0008, 0x8054, 0x0000, 0x0004, 0x0000, 0x8074, 0x0008, 0xf000, + 0x0000, 0x8072, 0x0000, 0x8000, 0x0003, 0x02fc, 0x0009, 0xbbe0, + 0x0000, 0x0038, 0x000b, 0x8b65, 0x0000, 0x18fe, 0x0009, 0x3ce0, + 0x000b, 0x0b62, 0x0008, 0x15fe, 0x0009, 0x3ce0, 0x000b, 0x8b11, + 0x0004, 0x0377, 0x0008, 0x8076, 0x0000, 0x0040, 0x0000, 0x8072, + 0x0000, 0x8000, 0x0003, 0x03cd, 0x0008, 0x8076, 0x0008, 0x0042, + 0x000b, 0x0372, 0x0009, 0xbbe0, 0x0000, 0x0016, 0x000b, 0x8b72, + 0x0000, 0x8074, 0x0008, 0x0808, 0x0002, 0x3a44, 0x000b, 0x8818, + 0x0000, 0x8074, 0x0000, 0x0800, 0x0000, 0x8072, 0x0000, 0x8000, + 0x000f, 0x8000, 0x0003, 0x0013, 0x0000, 0x8072, 0x0000, 0x8000, + 0x0003, 0x0013, 0x0002, 0x1430, 0x000b, 0x0378, 0x000a, 0x3d30, + 0x0000, 0x7f00, 0x0001, 0xbc80, 0x0000, 0x0007, 0x0003, 0x0380, + 0x000a, 0x1930, 0x0000, 0x7f00, 0x0001, 0x9880, 0x0000, 0x0007, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x000a, 0x0003, 0xc385, 0x000f, 0x4000, 0x000b, 0x238a, + 0x0008, 0x0870, 0x000f, 0x4000, 0x0002, 0x7040, 0x0003, 0x0b87, + 0x000b, 0xe394, 0x0008, 0x808a, 0x0000, 0x0004, 0x0007, 0x0000, + 0x0007, 0x0000, 0x0008, 0x80e0, 0x0008, 0x0202, 0x000b, 0x638d, + 0x0008, 0x80e0, 0x0000, 0x0100, 0x000b, 0x0387, 0x0009, 0xbac0, + 0x0008, 0x0090, 0x000b, 0x0b9d, 0x0000, 0x8074, 0x0000, 0x0706, + 0x000b, 0x039f, 0x0000, 0x8074, 0x0000, 0x0703, 0x000f, 0x4000, + 0x0008, 0x8010, 0x0000, 0x0023, 0x000b, 0x03db, 0x0008, 0x8010, + 0x0000, 0x0008, 0x000b, 0x03db, 0x0008, 0x8010, 0x0008, 0x0022, + 0x000b, 0x03db, 0x000c, 0x037c, 0x0008, 0x8010, 0x0000, 0x0007, + 0x0004, 0x0387, 0x0000, 0x1810, 0x0004, 0x0387, 0x0003, 0x03e5, + 0x000c, 0x037c, 0x0008, 0x8010, 0x0008, 0x001b, 0x0004, 0x0387, + 0x0000, 0x1810, 0x0004, 0x0387, 0x0000, 0x8074, 0x0000, 0xf080, + 0x0000, 0x0d30, 0x0003, 0x0013, 0x0008, 0x8010, 0x0008, 0x0009, + 0x000b, 0x03db, 0x0008, 0x8010, 0x0008, 0x0005, 0x000b, 0x03db, + 0x000a, 0x1648, 0x0003, 0x888c, 0x0008, 0x808c, 0x0000, 0x0001, + 0x0007, 0x0000, 0x0008, 0x8010, 0x0000, 0x0004, 0x000a, 0x4143, + 0x000b, 0x088c, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x0d2a, + 0x000b, 0x03db, 0x0008, 0x8010, 0x0008, 0x0003, 0x000b, 0x03dd, + 0x0008, 0x8010, 0x0000, 0x000b, 0x000b, 0x03dd, 0x0008, 0x8010, + 0x0000, 0x0002, 0x000b, 0x03dd, 0x0002, 0x3a47, 0x000b, 0x8a8c, + 0x0008, 0x8010, 0x0008, 0x0006, 0x000b, 0x03dd, 0x0000, 0x8074, + 0x0008, 0xf000, 0x0004, 0x0387, 0x000c, 0x0397, 0x000a, 0x3a40, + 0x000b, 0x0813, 0x0008, 0x8010, 0x0008, 0x000c, 0x0004, 0x0387, + 0x0003, 0x0013, 0x0000, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, + 0x0002, 0x2e4d, 0x0002, 0x2e4d, 0x0003, 0x0bee, 0x0008, 0x8054, + 0x0000, 0x0019, 0x0003, 0x0013, 0x0008, 0x8054, 0x0008, 0x0009, + 0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0003, 0x03d0, + 0x0008, 0x808c, 0x0008, 0x0000, 0x0002, 0x4447, 0x0003, 0x0c1a, + 0x0001, 0xc0c0, 0x0008, 0x00ff, 0x0009, 0xffe0, 0x0008, 0x00ff, + 0x0003, 0x8bf1, 0x0001, 0xc1e0, 0x0008, 0xffff, 0x0003, 0x8bf1, + 0x0008, 0x8010, 0x0000, 0x0013, 0x0004, 0x0387, 0x0000, 0x8074, + 0x0008, 0x0202, 0x0003, 0x0013, 0x000a, 0x3a40, 0x0003, 0x8c17, + 0x0000, 0x8074, 0x0000, 0x0200, 0x0000, 0x3d00, 0x0000, 0x3cfe, + 0x0000, 0x8072, 0x0000, 0x8000, 0x0001, 0x43e0, 0x000b, 0x8c15, + 0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0x00ff, 0x0009, 0x00e0, + 0x000b, 0x0bf1, 0x0008, 0x0d08, 0x0003, 0x046a, 0x0000, 0x8072, + 0x0000, 0x8000, 0x0003, 0x0013, 0x000c, 0x04ee, 0x0008, 0x808c, + 0x0000, 0x0001, 0x0000, 0x04fc, 0x0003, 0x34d1, 0x0000, 0x0460, + 0x0008, 0x8062, 0x0000, 0x0001, 0x0000, 0x8066, 0x0008, 0x0009, + 0x0003, 0xc424, 0x0000, 0x0004, 0x0009, 0x80c0, 0x0008, 0x00ff, + 0x0000, 0x7f00, 0x0001, 0x80e0, 0x0000, 0x0004, 0x0003, 0x0c3e, + 0x0001, 0x80e0, 0x0008, 0x0005, 0x0003, 0x0c3e, 0x0001, 0x80e0, + 0x0008, 0x0006, 0x0003, 0x0c3e, 0x0001, 0x82c0, 0x0008, 0xff00, + 0x0008, 0x7f04, 0x0009, 0x82e0, 0x0008, 0x0600, 0x0003, 0x0c3e, + 0x0009, 0x82e0, 0x0008, 0x0500, 0x0003, 0x0c3e, 0x0009, 0x82e0, + 0x0000, 0x0400, 0x0003, 0x8cd1, 0x0009, 0xc4c0, 0x0000, 0x7000, + 0x0009, 0xffe0, 0x0000, 0x1000, 0x000b, 0x0c6a, 0x0004, 0x04df, + 0x0002, 0x3941, 0x0003, 0x0c49, 0x0000, 0x8072, 0x0000, 0x0400, + 0x0003, 0x0013, 0x0000, 0x0460, 0x0008, 0x80fe, 0x0008, 0x002b, + 0x0008, 0x7f62, 0x0000, 0x8066, 0x0008, 0x2209, 0x000b, 0xc44f, + 0x0008, 0x11fc, 0x0003, 0x3465, 0x0001, 0x9180, 0x0000, 0x0002, + 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x0609, 0x0003, 0xc459, 0x0000, 0x42fe, 0x0001, 0xffc0, + 0x0008, 0xff00, 0x0009, 0x03e0, 0x000b, 0x8c62, 0x0000, 0x8072, + 0x0000, 0x0400, 0x000b, 0x0056, 0x0001, 0x9180, 0x0008, 0x0003, + 0x000b, 0x044c, 0x0000, 0x8072, 0x0000, 0x0400, 0x0008, 0x8010, + 0x0000, 0x0010, 0x000b, 0x04c4, 0x0004, 0x04df, 0x0002, 0x3941, + 0x0003, 0x0c70, 0x0000, 0x8072, 0x0000, 0x0400, 0x0003, 0x0013, + 0x000a, 0x6e42, 0x0003, 0x0c75, 0x000c, 0x04a9, 0x0008, 0x11fc, + 0x0003, 0xb47a, 0x0000, 0x8072, 0x0000, 0x0400, 0x0008, 0x8010, + 0x0000, 0x000e, 0x000b, 0x04c4, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0000, 0x04fc, 0x0003, 0xb48f, 0x0008, 0x808c, 0x0008, 0x0000, + 0x0001, 0x9180, 0x0008, 0x0005, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x0009, 0x000b, 0xc485, 0x0008, 0x0060, 0x0008, 0x8062, + 0x0008, 0x001b, 0x0008, 0x4304, 0x0008, 0x4206, 0x0000, 0x8066, + 0x0000, 0x0412, 0x0003, 0xc48d, 0x0003, 0x04a6, 0x0008, 0x808c, + 0x0000, 0x0001, 0x0000, 0x0460, 0x0008, 0x8062, 0x0008, 0x002b, + 0x0000, 0x8066, 0x0008, 0x0609, 0x0003, 0xc496, 0x0000, 0x8066, + 0x0008, 0x220a, 0x0003, 0xc499, 0x0000, 0x42fe, 0x0001, 0xffc0, + 0x0008, 0xff00, 0x0008, 0x7f04, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0001, 0x9180, 0x0000, 0x0002, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0008, 0x041a, 0x0003, 0xc4a5, 0x0000, 0x8072, 0x0000, 0x0400, + 0x000b, 0x0056, 0x0000, 0x8060, 0x0000, 0x0400, 0x0008, 0x6b62, + 0x0000, 0x8066, 0x0000, 0x0411, 0x000b, 0xc4ae, 0x0008, 0x02fe, + 0x0009, 0x03e0, 0x0003, 0x8cb4, 0x0000, 0x0d22, 0x000f, 0x4000, + 0x0009, 0x8280, 0x0000, 0x0002, 0x0001, 0x6b80, 0x0008, 0x7f62, + 0x0000, 0x8066, 0x0008, 0x2209, 0x000b, 0xc4ba, 0x000a, 0x0200, + 0x0001, 0xffc0, 0x0000, 0x0007, 0x0000, 0x7f06, 0x0008, 0x6b62, + 0x0000, 0x8066, 0x0008, 0x060a, 0x000b, 0xc4c2, 0x000f, 0x4000, + 0x0002, 0x3a44, 0x0003, 0x8813, 0x000a, 0x2f44, 0x000a, 0x2f44, + 0x0003, 0x8bd0, 0x0008, 0x808a, 0x0008, 0x0003, 0x0000, 0x8074, + 0x0000, 0xf080, 0x0003, 0x5ccd, 0x0008, 0x8054, 0x0000, 0x0019, + 0x0003, 0x0013, 0x0002, 0x3a44, 0x0003, 0x8813, 0x0008, 0x808c, + 0x0008, 0x0000, 0x0008, 0x8010, 0x0008, 0x0011, 0x0004, 0x0387, + 0x0000, 0x42fe, 0x0001, 0xffc0, 0x0008, 0x00ff, 0x0008, 0x7f10, + 0x0004, 0x0387, 0x0008, 0x4310, 0x000b, 0x03dd, 0x0002, 0x3941, + 0x000b, 0x0ce2, 0x000f, 0x4000, 0x0000, 0x8072, 0x0008, 0x0404, + 0x000f, 0x4000, 0x0008, 0x8010, 0x0008, 0x0012, 0x0004, 0x0387, + 0x000c, 0x04a9, 0x0000, 0x1110, 0x0004, 0x0387, 0x0008, 0x11fc, + 0x000b, 0xb4e8, 0x0003, 0x0013, 0x0009, 0xc2c0, 0x0008, 0x00ff, + 0x0000, 0x7f00, 0x0001, 0xc3c0, 0x0008, 0xff00, 0x0009, 0x00d0, + 0x000b, 0x0d13, 0x0000, 0x0d0a, 0x0001, 0x8580, 0x0000, 0x1000, + 0x0008, 0x7f62, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, 0x8066, + 0x0000, 0x0809, 0x000b, 0xc4fd, 0x0000, 0x04fc, 0x000b, 0x350c, + 0x0000, 0x0460, 0x0008, 0x8062, 0x0000, 0x0004, 0x0000, 0x8066, + 0x0000, 0x0211, 0x000b, 0xc505, 0x0008, 0x01fe, 0x0009, 0x00e0, + 0x000b, 0x8d0c, 0x0008, 0x02fe, 0x0001, 0x43e0, 0x0003, 0x0d12, + 0x0002, 0x0500, 0x0000, 0x7f0a, 0x0009, 0xffe0, 0x0000, 0x0800, + 0x0003, 0x8cf6, 0x0008, 0x0d08, 0x000f, 0x4000, 0x0008, 0x43fe, + 0x0001, 0x3e80, 0x0000, 0x0d60, 0x0008, 0x7f62, 0x0000, 0x8066, + 0x0000, 0x0809, 0x0003, 0xc519, 0x0000, 0x8060, 0x0000, 0x0400, + 0x0001, 0x84c0, 0x0008, 0xff00, 0x0002, 0x7f70, 0x0009, 0xff80, + 0x0000, 0x1000, 0x0008, 0x7f62, 0x0000, 0x8066, 0x0000, 0x0809, + 0x000b, 0xc524, 0x000f, 0x4000, 0xe4a8, 0xa3b9 +}; +unsigned short rseqipx_code_length01 = 0x0a4e; +/* + * + */ -struct firmware ql2322_fw = { - .size = sizeof(ql2322_fw_bin), - .data = ql2322_fw_bin +unsigned long xseqipx_code_addr01 = 0x0001e000 ; +unsigned short xseqipx_code01[] = { +0x0013, 0x0003, 0x0000, 0x1252, 0x0001, 0xe000, 0x0005, 0x0032, + 0x0000, 0x0010, 0x0015, 0x0033, 0x0010, 0xbb39, 0x000b, 0x8007, + 0x0004, 0x0113, 0x0004, 0x0125, 0x0010, 0xc000, 0x0000, 0xc001, + 0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0010, 0xc0b2, 0x0000, 0xc0b3, + 0x0010, 0xc0b4, 0x0000, 0xc0b5, 0x0000, 0xc0b6, 0x0010, 0xc0b7, + 0x0010, 0xc0b8, 0x0000, 0xc0b9, 0x0000, 0xc0ba, 0x0000, 0xc0c2, + 0x0010, 0xc0c3, 0x0000, 0xc0c4, 0x0010, 0xc0c5, 0x0010, 0xc0c6, + 0x0000, 0xc0c7, 0x0000, 0xc0c8, 0x0010, 0xc0c9, 0x0010, 0xc0ca, + 0x0000, 0xc0cb, 0x0010, 0xc0cc, 0x0000, 0xc0cd, 0x0000, 0xc0ce, + 0x0010, 0xc0cf, 0x0015, 0x0039, 0x0010, 0xff00, 0x0015, 0x003a, + 0x0010, 0xff00, 0x0005, 0x00d0, 0x0010, 0xff00, 0x0015, 0x00d1, + 0x0010, 0xff00, 0x0012, 0x3a40, 0x000b, 0x1031, 0x0002, 0x7940, + 0x001b, 0x1137, 0x0002, 0x3a42, 0x001b, 0x1035, 0x0003, 0xb035, + 0x0003, 0xa1e2, 0x0002, 0x3a41, 0x001b, 0x1039, 0x0012, 0x7941, + 0x001b, 0x1317, 0x0013, 0xe054, 0x0001, 0x0fe8, 0x0000, 0x0001, + 0x0013, 0x1054, 0x0000, 0x0cfe, 0x0013, 0x6047, 0x0002, 0x3a44, + 0x001b, 0x1047, 0x0011, 0x02e8, 0x0010, 0x0000, 0x0013, 0x13cd, + 0x0011, 0x02e8, 0x0010, 0x0005, 0x0013, 0x145f, 0x0012, 0x3a46, + 0x000b, 0x1054, 0x0011, 0x02e8, 0x0010, 0x0000, 0x0013, 0x104f, + 0x0011, 0x02e8, 0x0010, 0x0005, 0x000b, 0x1054, 0x0000, 0x12fe, + 0x0003, 0x6054, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0003, 0x1695, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0010, 0xc131, 0x0015, 0x0033, + 0x0010, 0xb211, 0x001b, 0x8059, 0x0010, 0xb2ff, 0x0001, 0xb3e0, + 0x001c, 0x10d5, 0x000b, 0xf02d, 0x0011, 0x3be8, 0x0000, 0x0010, + 0x001b, 0x1071, 0x0000, 0x0afe, 0x000b, 0x6065, 0x0000, 0x3c0b, + 0x0003, 0x006d, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x0a88, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x3c0a, + 0x001b, 0x806c, 0x0010, 0x3c0a, 0x0002, 0x0c00, 0x0010, 0xff0c, + 0x0013, 0x00d2, 0x0011, 0x3be8, 0x0010, 0x0012, 0x001b, 0x1084, + 0x0010, 0x08fe, 0x000b, 0x6078, 0x0010, 0x3c09, 0x0003, 0x0080, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0888, 0x0010, 0x0003, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x3c0a, 0x000b, 0x807f, + 0x0000, 0x3c08, 0x0002, 0x0c00, 0x0010, 0xff0c, 0x0013, 0x00d2, + 0x0011, 0x3be8, 0x0000, 0x0013, 0x000b, 0x108a, 0x0000, 0x3cb0, + 0x0014, 0x00e5, 0x0013, 0x00d2, 0x0011, 0x3be8, 0x0000, 0x0019, + 0x000b, 0x109d, 0x0010, 0x04fe, 0x001b, 0x6091, 0x0010, 0x3c05, + 0x0013, 0x0099, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0488, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x3c0a, + 0x000b, 0x8098, 0x0000, 0x3c04, 0x0002, 0x0c00, 0x0010, 0xff0c, + 0x0013, 0x00d2, 0x0011, 0x3be8, 0x0010, 0x001b, 0x001b, 0x10a6, + 0x0010, 0xc014, 0x0000, 0xc013, 0x0000, 0xc010, 0x0015, 0x000f, + 0x0010, 0x0000, 0x0013, 0x00d2, 0x0011, 0x3be8, 0x0000, 0x0015, + 0x001b, 0x10b2, 0x0004, 0x011c, 0x0014, 0x012e, 0x0015, 0x0039, + 0x0000, 0x8000, 0x0017, 0x8000, 0x0004, 0x0113, 0x0004, 0x0125, + 0x0014, 0x00fe, 0x0013, 0x002d, 0x0011, 0x3be8, 0x0000, 0x0016, + 0x000b, 0x10c4, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0003, 0x10be, + 0x0001, 0x0fe8, 0x0000, 0x0002, 0x0003, 0x10be, 0x0015, 0x0039, + 0x0010, 0x1010, 0x0013, 0x00d2, 0x0015, 0x0039, 0x0000, 0x5040, + 0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x0925, 0x0013, 0x00d2, + 0x0011, 0x3be8, 0x0010, 0x0017, 0x001b, 0x10c9, 0x0010, 0x3cc3, + 0x0013, 0x00d2, 0x0011, 0x3be8, 0x0010, 0x0018, 0x000b, 0x10ce, + 0x0000, 0x3cc2, 0x0013, 0x00d2, 0x0005, 0x00ce, 0x0000, 0x0001, + 0x0000, 0x3bcf, 0x0014, 0x08e7, 0x0015, 0x0039, 0x0000, 0x8000, + 0x0013, 0x002d, 0x0001, 0xb288, 0x0000, 0x0002, 0x0001, 0xc180, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x80db, + 0x0002, 0xb200, 0x0011, 0xffc8, 0x0000, 0x0007, 0x0010, 0xffb2, + 0x0010, 0xc131, 0x0015, 0x0033, 0x0010, 0xb20a, 0x0001, 0xb0d0, + 0x001b, 0x80e4, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0xb088, + 0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb109, + 0x000b, 0x80ec, 0x0001, 0xb1e8, 0x0010, 0xffff, 0x0013, 0x10fd, + 0x0000, 0x11fe, 0x001b, 0x60f4, 0x0000, 0xb012, 0x0013, 0x00fc, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb00a, 0x000b, 0x80fb, + 0x0000, 0xb011, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0xbc88, 0x0000, 0x001f, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xc411, 0x000b, 0x8105, 0x0011, 0xbc88, 0x0010, 0x0018, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc609, 0x001b, 0x810b, + 0x0011, 0xbc88, 0x0000, 0x0037, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xc709, 0x000b, 0x8111, 0x0017, 0x4000, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0001, 0xbb88, 0x0000, 0x0001, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0x0269, 0x001b, 0x811a, 0x0017, 0x4000, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbb88, 0x0000, 0x0001, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0x026a, 0x001b, 0x8123, + 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbb88, + 0x0010, 0x000f, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x0f59, + 0x001b, 0x812c, 0x0017, 0x4000, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0001, 0xbb88, 0x0010, 0x000f, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0x0f5a, 0x000b, 0x8135, 0x0017, 0x4000, 0x0000, 0xd0ff, + 0x0012, 0xff40, 0x000b, 0x1031, 0x0015, 0x00d1, 0x0010, 0x0101, + 0x0003, 0x913c, 0x0005, 0x0079, 0x0000, 0x0001, 0x0003, 0x913f, + 0x0015, 0x00d1, 0x0000, 0x0100, 0x0011, 0x02e8, 0x0000, 0x0002, + 0x0003, 0x1167, 0x0011, 0x02e8, 0x0000, 0x0001, 0x0003, 0x117f, + 0x0011, 0x02e8, 0x0000, 0x0004, 0x0003, 0x119d, 0x0011, 0x02e8, + 0x0010, 0x0003, 0x0003, 0x11ce, 0x0005, 0x0002, 0x0010, 0x0000, + 0x0000, 0xc00e, 0x0000, 0xc00d, 0x0010, 0xc003, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0001, 0xbd88, 0x0010, 0x0009, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x815a, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x815e, 0x0012, 0x3a45, + 0x0013, 0x1166, 0x0015, 0x003a, 0x0000, 0x2000, 0x0015, 0x003a, + 0x0010, 0x1010, 0x0004, 0x0911, 0x0003, 0x004f, 0x0012, 0x7849, + 0x0003, 0x11dc, 0x0010, 0x0dfe, 0x0003, 0x6150, 0x0012, 0x0c10, + 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, + 0x000b, 0x8174, 0x0010, 0xb3fe, 0x0013, 0x617c, 0x0010, 0xb30b, + 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x817a, 0x0003, 0x01d1, + 0x0000, 0xc00b, 0x0010, 0xc00a, 0x0003, 0x01d1, 0x0000, 0x78b0, + 0x0012, 0xb044, 0x0003, 0x11dc, 0x0002, 0xb049, 0x0003, 0x11dc, + 0x0010, 0x71ff, 0x0012, 0xff38, 0x0010, 0xff71, 0x0010, 0x0dfe, + 0x0003, 0x614e, 0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x8192, 0x0010, 0xb3fe, + 0x0003, 0x619a, 0x0000, 0xb309, 0x0015, 0x0033, 0x0010, 0xc00a, + 0x001b, 0x8198, 0x0003, 0x01d1, 0x0010, 0xc009, 0x0000, 0xc008, + 0x0003, 0x01d1, 0x0000, 0x78b0, 0x0012, 0xb044, 0x0003, 0x11dc, + 0x0002, 0xb049, 0x0003, 0x11dc, 0x0010, 0x71ff, 0x0012, 0xff38, + 0x0010, 0xff71, 0x0010, 0x0dfe, 0x0003, 0x614e, 0x0012, 0x0c10, + 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, + 0x001b, 0x81b0, 0x0010, 0xb3fe, 0x0003, 0x61b8, 0x0000, 0xb305, + 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x81b6, 0x0013, 0x01ba, + 0x0010, 0xc005, 0x0000, 0xc004, 0x0002, 0x033f, 0x0002, 0xff27, + 0x0000, 0x0db8, 0x0014, 0x03c2, 0x0000, 0x0db8, 0x0014, 0x0925, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0xbc88, 0x0010, 0x0000, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb309, 0x001b, 0x81c7, + 0x0011, 0xb3e8, 0x0000, 0x0002, 0x000b, 0x114e, 0x0005, 0x0002, + 0x0010, 0x0005, 0x0003, 0x0150, 0x0012, 0x7849, 0x0003, 0x11dc, + 0x0003, 0x0150, 0x0000, 0x0db8, 0x0012, 0x0345, 0x000b, 0x11d7, + 0x0002, 0x033f, 0x0014, 0x03c2, 0x0003, 0x014e, 0x0002, 0x033f, + 0x0002, 0xff27, 0x0014, 0x03c2, 0x0014, 0x0925, 0x0003, 0x014e, + 0x0015, 0x00b8, 0x0000, 0x0001, 0x0015, 0x003a, 0x0010, 0x0101, + 0x0014, 0x0925, 0x0003, 0x015f, 0x0001, 0x2bd8, 0x0010, 0x0000, + 0x0000, 0xffba, 0x0003, 0xb1e5, 0x0005, 0x002a, 0x0000, 0x0002, + 0x0001, 0xbac8, 0x0000, 0x0700, 0x000b, 0x12d2, 0x0011, 0x15e8, + 0x0000, 0x0002, 0x0013, 0x1248, 0x0011, 0x15e8, 0x0000, 0x0001, + 0x0003, 0x11f4, 0x0005, 0x0015, 0x0010, 0x0000, 0x0003, 0x022b, + 0x0005, 0x0015, 0x0010, 0x0000, 0x0002, 0xba43, 0x0003, 0x122c, + 0x0003, 0xb1f8, 0x0005, 0x002a, 0x0000, 0x0004, 0x0012, 0xba42, + 0x0003, 0x1232, 0x0012, 0x104b, 0x000b, 0x122b, 0x0000, 0x1a30, + 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a, + 0x001b, 0x8204, 0x0011, 0x20d8, 0x0010, 0x0000, 0x0000, 0xffb0, + 0x0001, 0x21d8, 0x0010, 0x0000, 0x0010, 0xffb1, 0x0001, 0x22d8, + 0x0010, 0x0000, 0x0010, 0xffb2, 0x0011, 0x23d8, 0x0010, 0x0000, + 0x0000, 0xffb3, 0x0001, 0x24d8, 0x0010, 0x0000, 0x0010, 0xffb4, + 0x0011, 0x25d8, 0x0010, 0x0000, 0x0000, 0xffb5, 0x0001, 0x28d8, + 0x0010, 0x0000, 0x0010, 0xffb8, 0x0011, 0x29d8, 0x0010, 0x0000, + 0x0000, 0xffb9, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0007, + 0x0015, 0x0033, 0x0010, 0xb032, 0x000b, 0x8222, 0x0000, 0x1a30, + 0x0005, 0x0031, 0x0010, 0x000f, 0x0015, 0x0033, 0x0010, 0xb812, + 0x000b, 0x8228, 0x0005, 0x0015, 0x0010, 0x0000, 0x0013, 0x0035, + 0x0000, 0x1efe, 0x0013, 0x6240, 0x0014, 0x0277, 0x0000, 0x1efe, + 0x000c, 0x6277, 0x0003, 0x022b, 0x0000, 0x1a30, 0x0005, 0x0031, + 0x0000, 0x0020, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8237, + 0x0002, 0xb02f, 0x0000, 0xffb0, 0x0005, 0x0031, 0x0000, 0x0020, + 0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x823e, 0x0003, 0x01ff, + 0x0015, 0x00b8, 0x0010, 0x0005, 0x0014, 0x0925, 0x0000, 0x13b8, + 0x0015, 0x003a, 0x0010, 0x0404, 0x0014, 0x0925, 0x0003, 0x022b, + 0x0005, 0x0015, 0x0000, 0x0001, 0x0012, 0xba42, 0x0013, 0x1256, + 0x0003, 0xb24c, 0x0001, 0x2bd8, 0x0010, 0x0000, 0x0012, 0xff4f, + 0x000b, 0x11e2, 0x0002, 0xba43, 0x001b, 0x1232, 0x0000, 0x1efe, + 0x000c, 0x6277, 0x0003, 0x022b, 0x0001, 0x28d8, 0x0010, 0x0000, + 0x0010, 0xffb8, 0x0011, 0x29d8, 0x0010, 0x0000, 0x0000, 0xffb9, + 0x0014, 0x02e8, 0x0002, 0x3a42, 0x000b, 0x122b, 0x0000, 0x1c30, + 0x0015, 0x00ff, 0x0000, 0x0002, 0x0002, 0x1f43, 0x001b, 0x1267, + 0x0001, 0xff88, 0x0000, 0x0002, 0x0003, 0x0269, 0x0001, 0xff88, + 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb011, + 0x000b, 0x826c, 0x0000, 0xb0ff, 0x0011, 0x16a0, 0x0000, 0xff16, + 0x001b, 0x2273, 0x0002, 0xb100, 0x0003, 0x0274, 0x0010, 0xb1ff, + 0x0001, 0x17a0, 0x0010, 0xff17, 0x0013, 0x0232, 0x0000, 0x16ff, + 0x0001, 0x18a0, 0x0010, 0xff00, 0x000b, 0x227e, 0x0002, 0x1700, + 0x0013, 0x12d1, 0x0013, 0x027f, 0x0010, 0x17ff, 0x0011, 0x19a0, + 0x0013, 0x22d1, 0x0011, 0x00d0, 0x0013, 0x12d1, 0x0000, 0x1c30, + 0x0000, 0x1b31, 0x0015, 0x0033, 0x0000, 0xb131, 0x000b, 0x8287, + 0x0013, 0xb288, 0x0000, 0xb120, 0x0010, 0xb221, 0x0002, 0x1f43, + 0x001b, 0x1294, 0x0010, 0xc022, 0x0000, 0xc023, 0x0000, 0xb324, + 0x0000, 0xb425, 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0013, 0x0298, + 0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524, 0x0010, 0xb625, + 0x0003, 0xb298, 0x0005, 0x002a, 0x0000, 0x0001, 0x0012, 0x1500, + 0x0000, 0xff15, 0x0000, 0x16ff, 0x0001, 0xb580, 0x0000, 0xff16, + 0x000b, 0x22a3, 0x0002, 0x1700, 0x0013, 0x02a4, 0x0010, 0x17ff, + 0x0001, 0xb680, 0x0010, 0xff17, 0x0012, 0x1e10, 0x0010, 0xff1e, + 0x0003, 0x62d1, 0x0002, 0x1d00, 0x0010, 0xff1d, 0x0010, 0xc030, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82af, + 0x0010, 0xb0fe, 0x000b, 0x62d0, 0x0000, 0x1c30, 0x0005, 0x0031, + 0x0000, 0x0001, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82b7, + 0x0010, 0xb0fe, 0x001b, 0x62bd, 0x0005, 0x00ce, 0x0010, 0x0005, + 0x0003, 0x08e7, 0x0010, 0xb01c, 0x0000, 0x1c30, 0x0005, 0x0031, + 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x82c3, + 0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0000, 0xff1f, 0x0010, 0xc030, + 0x0011, 0xbe80, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, + 0x000b, 0x82cc, 0x0000, 0xb01d, 0x0010, 0x1dff, 0x0013, 0x02ab, + 0x0000, 0xb01b, 0x0017, 0x4000, 0x0002, 0x3a41, 0x0003, 0x12da, + 0x0013, 0xb2d4, 0x0005, 0x002a, 0x0000, 0x0004, 0x0005, 0x0015, + 0x0010, 0x0000, 0x0003, 0x022b, 0x0000, 0x1a30, 0x0005, 0x0031, + 0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b2a, 0x001b, 0x82df, + 0x0015, 0x00b8, 0x0000, 0x0004, 0x0014, 0x0925, 0x0000, 0x13b8, + 0x0015, 0x003a, 0x0010, 0x0404, 0x0014, 0x0925, 0x0013, 0x0039, + 0x0002, 0x1e00, 0x0010, 0xff1e, 0x0012, 0x1d10, 0x0010, 0xff1d, + 0x0010, 0xc030, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, + 0x000b, 0x82f0, 0x0010, 0xb0fe, 0x001b, 0x6315, 0x0000, 0x1cff, + 0x0001, 0x1ae0, 0x0013, 0x12ff, 0x0000, 0x1c30, 0x0005, 0x0031, + 0x0010, 0x0000, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x82fb, + 0x0010, 0xb0fe, 0x001b, 0x62ff, 0x0000, 0x1aff, 0x0000, 0xff1c, + 0x0000, 0x1c30, 0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, + 0x0000, 0xb009, 0x001b, 0x8305, 0x0001, 0xb0c8, 0x0010, 0x000f, + 0x0000, 0xff1f, 0x0001, 0xbf80, 0x0010, 0xff1d, 0x0010, 0xc030, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x830f, + 0x0010, 0xb0fe, 0x001b, 0x6315, 0x0005, 0x00ce, 0x0010, 0x0006, + 0x0003, 0x08e7, 0x0000, 0xb01b, 0x0017, 0x4000, 0x0010, 0x79b0, + 0x0000, 0xd0ff, 0x0012, 0xff40, 0x001b, 0x1039, 0x0015, 0x00d1, + 0x0010, 0x0101, 0x0013, 0x931d, 0x0005, 0x0079, 0x0000, 0x0002, + 0x0003, 0x9320, 0x0015, 0x00d1, 0x0000, 0x0100, 0x0010, 0x13fe, + 0x0013, 0x6371, 0x0012, 0xb04e, 0x001b, 0x139a, 0x0000, 0x78b0, + 0x0002, 0xb045, 0x0003, 0x13a0, 0x0012, 0x784a, 0x0003, 0x13a0, + 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0010, 0x1800, 0x001b, 0x13a0, + 0x0001, 0x0fe8, 0x0000, 0x0001, 0x001b, 0x133c, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0x8f0a, 0x001b, 0x833a, 0x0013, 0x03a6, + 0x0001, 0x0fe8, 0x0000, 0x0002, 0x001b, 0x1347, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0005, 0x0031, 0x0000, 0x001a, 0x0015, 0x0033, + 0x0010, 0xc00a, 0x000b, 0x8345, 0x0013, 0x03a6, 0x0001, 0x0fe8, + 0x0010, 0x0000, 0x0003, 0x134e, 0x0005, 0x00ce, 0x0000, 0x0007, + 0x0010, 0x0fcf, 0x0003, 0x08e1, 0x0002, 0xd142, 0x0013, 0x1367, + 0x0015, 0x00d1, 0x0000, 0x0400, 0x0011, 0x13e8, 0x0001, 0x1b55, + 0x000b, 0x1367, 0x0005, 0x0031, 0x0011, 0x1b6d, 0x0015, 0x0033, + 0x0010, 0xb409, 0x001b, 0x8359, 0x0002, 0xb400, 0x0010, 0xffb4, + 0x0005, 0x0031, 0x0011, 0x1b6d, 0x0015, 0x0033, 0x0010, 0xb40a, + 0x001b, 0x8360, 0x0012, 0xd042, 0x0003, 0x1371, 0x0015, 0x00b8, + 0x0000, 0x000d, 0x0014, 0x0925, 0x0003, 0x0054, 0x0000, 0x13b8, + 0x0002, 0x1045, 0x0003, 0x136f, 0x0012, 0x103f, 0x0002, 0xff27, + 0x0014, 0x03c2, 0x0014, 0x0925, 0x0013, 0x0371, 0x0012, 0x103f, + 0x0014, 0x03c2, 0x0015, 0x000f, 0x0010, 0x0000, 0x0002, 0x3944, + 0x0013, 0x137a, 0x0015, 0x0039, 0x0000, 0x5040, 0x0015, 0x00b8, + 0x0000, 0x0008, 0x0014, 0x0925, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0001, 0xbd88, 0x0010, 0x000c, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xc00a, 0x001b, 0x8381, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xc00a, 0x000b, 0x8385, 0x0010, 0xc014, 0x0000, 0xc013, + 0x0000, 0xc010, 0x0000, 0xa4ff, 0x0003, 0x6392, 0x0011, 0xffa8, + 0x0010, 0x0005, 0x000b, 0x2392, 0x0015, 0x00d1, 0x0010, 0x0404, + 0x0015, 0x003a, 0x0000, 0x8000, 0x0002, 0x3a47, 0x0003, 0x1399, + 0x0015, 0x003a, 0x0000, 0x8000, 0x0015, 0x003a, 0x0010, 0x4040, + 0x0004, 0x08ec, 0x0013, 0x0039, 0x0015, 0x00b8, 0x0010, 0x0003, + 0x0015, 0x003a, 0x0010, 0x0202, 0x0014, 0x0925, 0x0003, 0x0389, + 0x0015, 0x00b8, 0x0000, 0x0002, 0x0015, 0x003a, 0x0010, 0x0202, + 0x0014, 0x0925, 0x0003, 0x0389, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x1388, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb009, 0x000b, 0x83ad, 0x0011, 0x1388, 0x0010, 0x0003, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x83b3, + 0x0010, 0xb0fe, 0x0013, 0x63b8, 0x0000, 0xb012, 0x0003, 0x03ba, + 0x0010, 0xc012, 0x0010, 0xc011, 0x0012, 0x104b, 0x0003, 0x134e, + 0x0002, 0x103b, 0x0010, 0xff03, 0x0005, 0x0002, 0x0010, 0x0000, + 0x0000, 0xc00d, 0x0013, 0x034e, 0x0000, 0xffb0, 0x0010, 0xc3b1, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xb888, 0x0010, 0x0011, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x83cb, + 0x0017, 0x4000, 0x0002, 0xd142, 0x001b, 0x1485, 0x0012, 0x3a43, + 0x0003, 0x13de, 0x0015, 0x003a, 0x0000, 0x0800, 0x0010, 0x0db0, + 0x0013, 0x63de, 0x0000, 0x0bff, 0x0001, 0xb0e0, 0x0003, 0x1407, + 0x0010, 0x09ff, 0x0001, 0xb0e0, 0x0003, 0x13eb, 0x0010, 0x05ff, + 0x0001, 0xb0e0, 0x0003, 0x13e2, 0x0000, 0xc00e, 0x0000, 0x05fe, + 0x0013, 0x63e8, 0x0000, 0x050d, 0x0005, 0x0002, 0x0000, 0x0004, + 0x0014, 0x046c, 0x0002, 0x3a47, 0x001b, 0x146b, 0x0013, 0x0402, + 0x0000, 0x09fe, 0x0013, 0x6404, 0x0000, 0x090d, 0x0005, 0x0002, + 0x0000, 0x0001, 0x0014, 0x049a, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xba09, 0x001b, 0x83f5, 0x0011, 0x03c8, 0x0010, 0x000f, + 0x0000, 0xffb6, 0x0011, 0xb6e8, 0x0000, 0x0001, 0x0003, 0x153f, + 0x0011, 0xb6e8, 0x0000, 0x0002, 0x0013, 0x1561, 0x0011, 0xb6e8, + 0x0010, 0x0003, 0x0003, 0x1653, 0x0004, 0x08ec, 0x0013, 0x046b, + 0x0010, 0x0bfe, 0x0013, 0x646b, 0x0010, 0x0b0d, 0x0005, 0x0002, + 0x0000, 0x0002, 0x0014, 0x049a, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xba09, 0x000b, 0x8411, 0x0000, 0xb930, 0x0005, 0x0031, + 0x0010, 0x0021, 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x8417, + 0x0001, 0xb0a8, 0x0000, 0x199a, 0x0013, 0x241d, 0x0005, 0x00b0, + 0x0000, 0x1999, 0x0012, 0xb050, 0x0000, 0xffb0, 0x0002, 0xff50, + 0x0002, 0xff50, 0x0001, 0xb080, 0x0000, 0xffb0, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0006, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb00a, 0x001b, 0x842a, 0x0000, 0xb930, + 0x0005, 0x0031, 0x0000, 0x0019, 0x0015, 0x0033, 0x0000, 0xb009, + 0x000b, 0x8430, 0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0001, 0xffe8, + 0x0010, 0x0048, 0x000b, 0x14a9, 0x0005, 0x0002, 0x0010, 0x0006, + 0x0012, 0x0c10, 0x0010, 0xff0c, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xb109, 0x000b, 0x8441, 0x0000, 0xb10b, 0x000b, 0x6445, + 0x0010, 0xb10a, 0x0015, 0x0033, 0x0010, 0xc00a, 0x000b, 0x8447, + 0x0002, 0x032b, 0x0010, 0xff03, 0x0011, 0x0d88, 0x0010, 0x0011, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0x030a, 0x001b, 0x844f, + 0x0000, 0x11fe, 0x000b, 0x6454, 0x0000, 0x0d12, 0x0013, 0x045d, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0x1188, 0x0010, 0x0003, + 0x0000, 0xff31, 0x0010, 0x0db0, 0x0015, 0x0033, 0x0000, 0xb00a, + 0x000b, 0x845c, 0x0000, 0x0d11, 0x0013, 0x046b, 0x0002, 0xd142, + 0x0003, 0x1462, 0x0013, 0x0485, 0x0000, 0x05fe, 0x0013, 0x646b, + 0x0005, 0x0002, 0x0000, 0x0004, 0x0000, 0x050d, 0x0014, 0x046c, + 0x0002, 0x3a47, 0x001b, 0x146b, 0x0004, 0x08ec, 0x0013, 0x0047, + 0x0001, 0xc7c8, 0x0010, 0x0028, 0x000b, 0x1484, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x000a, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x8476, 0x0002, 0xb04f, + 0x0013, 0x1484, 0x0001, 0x0fe8, 0x0010, 0x0000, 0x0013, 0x1482, + 0x0001, 0x0fe8, 0x0000, 0x0002, 0x0013, 0x1482, 0x0015, 0x003a, + 0x0010, 0x8080, 0x0003, 0x0484, 0x0015, 0x003a, 0x0010, 0x4040, + 0x0017, 0x4000, 0x0000, 0x12fe, 0x001b, 0x604f, 0x0015, 0x0012, + 0x0001, 0x1b55, 0x0015, 0x0011, 0x0001, 0x1b55, 0x0001, 0x1288, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, + 0x000b, 0x8490, 0x0005, 0x00b0, 0x0000, 0x8000, 0x0001, 0x1288, + 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb00a, + 0x001b, 0x8498, 0x0003, 0x004f, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0x0309, 0x001b, 0x84a1, 0x0011, 0x0d88, 0x0010, 0x0005, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb909, 0x001b, 0x84a7, + 0x0017, 0x4000, 0x0005, 0x00b6, 0x0010, 0x0600, 0x0014, 0x0683, + 0x0004, 0x051b, 0x0000, 0xb05a, 0x0000, 0xb15b, 0x0005, 0x0054, + 0x0010, 0x0829, 0x0010, 0x0d58, 0x0015, 0x0059, 0x0010, 0xffff, + 0x0000, 0xb930, 0x0005, 0x0031, 0x0010, 0x001e, 0x0015, 0x0033, + 0x0000, 0xb009, 0x001b, 0x84b9, 0x0000, 0xb05c, 0x0005, 0x0031, + 0x0000, 0x001f, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x84bf, + 0x0001, 0xb0c8, 0x0010, 0x000f, 0x000b, 0x14c6, 0x0015, 0x00ff, + 0x0010, 0x0005, 0x0013, 0x04ce, 0x0002, 0xb040, 0x0003, 0x14cb, + 0x0015, 0x00ff, 0x0000, 0x0004, 0x0013, 0x04ce, 0x0001, 0xb0c8, + 0x0010, 0x0006, 0x0002, 0xff60, 0x0010, 0xffb2, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0019, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0010, 0xb109, 0x001b, 0x84d6, 0x0012, 0xb170, + 0x0011, 0xffc8, 0x0010, 0xff00, 0x0011, 0xb2d0, 0x0010, 0xff60, + 0x0002, 0xb045, 0x0013, 0x14e1, 0x0015, 0x00b2, 0x0000, 0x0002, + 0x0003, 0x04eb, 0x0002, 0xb046, 0x0003, 0x14e6, 0x0015, 0x00b2, + 0x0000, 0x0001, 0x0003, 0x04eb, 0x0015, 0x00b2, 0x0010, 0x0000, + 0x0000, 0xc0b0, 0x0010, 0xc0b1, 0x0013, 0x04f1, 0x0000, 0xb930, + 0x0005, 0x0031, 0x0010, 0x002b, 0x0015, 0x0033, 0x0000, 0xb011, + 0x000b, 0x84f0, 0x0010, 0xb16a, 0x0010, 0xb06b, 0x0000, 0xb261, + 0x0015, 0x0044, 0x0010, 0x0018, 0x0000, 0xb930, 0x0005, 0x0031, + 0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0x6241, 0x001b, 0x84fb, + 0x0003, 0x94fc, 0x0015, 0x00a0, 0x0000, 0x0020, 0x0012, 0xd041, + 0x000b, 0x14ff, 0x0015, 0x00d1, 0x0010, 0x0202, 0x0013, 0x9503, + 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8, + 0x0010, 0x0009, 0x0013, 0x9509, 0x0000, 0xff75, 0x0003, 0x950b, + 0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31, 0x0015, 0x00b1, + 0x0010, 0x07d0, 0x0005, 0x00b0, 0x0010, 0x0009, 0x0015, 0x0033, + 0x0000, 0xb012, 0x000b, 0x8519, 0x0013, 0x046b, 0x0000, 0xba30, + 0x0005, 0x0031, 0x0010, 0x0035, 0x0015, 0x0033, 0x0000, 0xb009, + 0x000b, 0x8520, 0x0002, 0xb040, 0x0003, 0x153c, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0005, 0x0031, 0x0001, 0x1b71, 0x0015, 0x0033, + 0x0000, 0xb011, 0x000b, 0x8529, 0x0002, 0xb100, 0x0010, 0xffb1, + 0x001b, 0x2530, 0x0012, 0xb000, 0x0000, 0xffb0, 0x0013, 0x252a, + 0x0015, 0x0033, 0x0000, 0xb012, 0x000b, 0x8532, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0013, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x853a, 0x0003, 0x053e, + 0x0010, 0xc0b1, 0x0000, 0xc0b0, 0x0017, 0x4000, 0x0005, 0x00b6, + 0x0010, 0x0500, 0x0014, 0x0683, 0x0005, 0x0054, 0x0010, 0x0889, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x854b, + 0x0010, 0xb058, 0x0000, 0x0d59, 0x0000, 0xb930, 0x0005, 0x0031, + 0x0000, 0x0023, 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x8553, + 0x0010, 0xb15c, 0x0010, 0xb05d, 0x0005, 0x0031, 0x0010, 0x002b, + 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x855a, 0x0000, 0xb15e, + 0x0000, 0xb05f, 0x0003, 0x955d, 0x0015, 0x00a0, 0x0010, 0x000c, + 0x0003, 0x0668, 0x0005, 0x00b6, 0x0000, 0x0700, 0x0014, 0x0683, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb709, 0x000b, 0x856b, + 0x0012, 0xb749, 0x0003, 0x1571, 0x0005, 0x0054, 0x0010, 0x0889, + 0x0003, 0x0573, 0x0005, 0x0054, 0x0010, 0x0898, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x0002, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x857a, 0x0010, 0xb058, + 0x0000, 0x0d59, 0x0001, 0xb9c8, 0x0010, 0xf000, 0x0001, 0xffe8, + 0x0010, 0xf000, 0x001b, 0x15a3, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb009, 0x000b, 0x8589, 0x0001, 0xb0c8, 0x0000, 0xf700, + 0x0000, 0xffb0, 0x0011, 0xb0e8, 0x0000, 0xf100, 0x0013, 0x15ea, + 0x0011, 0xb0e8, 0x0000, 0xf200, 0x0013, 0x15ef, 0x0011, 0xb0e8, + 0x0010, 0xf300, 0x0003, 0x1614, 0x0011, 0xb0e8, 0x0000, 0xf400, + 0x0013, 0x1619, 0x0011, 0xb0e8, 0x0010, 0xf500, 0x0013, 0x15ea, + 0x0011, 0xb0e8, 0x0010, 0xf600, 0x0003, 0x162b, 0x0005, 0x00ce, + 0x0010, 0x0009, 0x0000, 0xb0cf, 0x0003, 0x08e1, 0x0000, 0xb930, + 0x0005, 0x0031, 0x0000, 0x0025, 0x0015, 0x0033, 0x0000, 0xb039, + 0x000b, 0x85a8, 0x0012, 0xb749, 0x0013, 0x15ad, 0x0002, 0xb52c, + 0x0000, 0xffb5, 0x0000, 0xb162, 0x0000, 0xb063, 0x0005, 0x0031, + 0x0000, 0x001f, 0x0015, 0x0033, 0x0000, 0xb309, 0x000b, 0x85b3, + 0x0001, 0xb3c8, 0x0010, 0x0003, 0x0003, 0x15bb, 0x0010, 0xffb2, + 0x0001, 0xffe8, 0x0010, 0x0003, 0x001b, 0x15bd, 0x0000, 0xc2b7, + 0x0013, 0x0647, 0x0001, 0xb2e8, 0x0000, 0x0001, 0x0013, 0x15c4, + 0x0005, 0x00ce, 0x0010, 0x000a, 0x0010, 0xb2cf, 0x0003, 0x08e1, + 0x0010, 0xb465, 0x0010, 0xb667, 0x0015, 0x00b7, 0x0010, 0x0018, + 0x0001, 0xb5c8, 0x0010, 0x0300, 0x0013, 0x15e9, 0x0012, 0xb548, + 0x0013, 0x15d0, 0x0000, 0xb6ff, 0x0011, 0xb780, 0x0010, 0xffb7, + 0x0002, 0xb549, 0x0013, 0x15d5, 0x0010, 0xb4ff, 0x0011, 0xb780, + 0x0010, 0xffb7, 0x0015, 0x0044, 0x0010, 0x0018, 0x0005, 0x0031, + 0x0000, 0x002c, 0x0015, 0x0033, 0x0000, 0x6841, 0x001b, 0x85db, + 0x0015, 0x0044, 0x0000, 0x0019, 0x0005, 0x0031, 0x0000, 0x0034, + 0x0015, 0x0033, 0x0000, 0x5029, 0x001b, 0x85e2, 0x0015, 0x0044, + 0x0000, 0x0008, 0x0011, 0xb7c8, 0x0010, 0x0003, 0x0013, 0x15e9, + 0x0010, 0xff55, 0x0013, 0x0647, 0x0005, 0x00b5, 0x0000, 0x0008, + 0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x0647, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0000, 0x000b, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb011, 0x001b, 0x85f6, 0x0010, 0xb1ff, + 0x0001, 0xb0d0, 0x0003, 0x15ff, 0x0005, 0x00b5, 0x0010, 0x0b02, + 0x0010, 0xb062, 0x0010, 0xb163, 0x0003, 0x0601, 0x0005, 0x00b5, + 0x0000, 0x0302, 0x0015, 0x0065, 0x0010, 0x0012, 0x0005, 0x0067, + 0x0000, 0x0008, 0x0015, 0x006c, 0x0000, 0x7000, 0x0005, 0x006d, + 0x0010, 0x0500, 0x0015, 0x006f, 0x0010, 0x000a, 0x0015, 0x0044, + 0x0000, 0x0001, 0x0005, 0x0052, 0x0000, 0x2500, 0x0015, 0x0044, + 0x0000, 0x0008, 0x0015, 0x00b7, 0x0000, 0x0032, 0x0013, 0x0647, + 0x0005, 0x00b5, 0x0010, 0x0028, 0x0015, 0x00b7, 0x0010, 0x0018, + 0x0013, 0x0647, 0x0005, 0x00b5, 0x0000, 0x0100, 0x0005, 0x0067, + 0x0000, 0x0008, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, + 0x0010, 0x0018, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, + 0x001b, 0x8624, 0x0001, 0xb0c8, 0x0010, 0x00ff, 0x0010, 0xff69, + 0x0015, 0x00b7, 0x0000, 0x0020, 0x0013, 0x0647, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0005, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb609, 0x000b, 0x8632, 0x0001, 0xb6c8, + 0x0010, 0xff00, 0x0000, 0xffb0, 0x0015, 0x0033, 0x0000, 0xb00a, + 0x000b, 0x8638, 0x0001, 0xb6c8, 0x0010, 0x00ff, 0x0012, 0xff10, + 0x001b, 0x1641, 0x0000, 0xffb5, 0x0015, 0x00b7, 0x0010, 0x0018, + 0x0013, 0x0647, 0x0010, 0xff63, 0x0005, 0x00b5, 0x0000, 0x0800, + 0x0015, 0x00b7, 0x0010, 0x0018, 0x0013, 0x0647, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x0d88, 0x0010, 0x0009, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x864e, 0x0010, 0xb561, + 0x0013, 0x9650, 0x0010, 0xb7a0, 0x0003, 0x0668, 0x0005, 0x00b6, + 0x0010, 0x0300, 0x0014, 0x0683, 0x0005, 0x0054, 0x0010, 0x0819, + 0x0010, 0x0d58, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, + 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, + 0x001b, 0x8660, 0x0000, 0xb059, 0x0003, 0x9662, 0x0010, 0xc0a0, + 0x0010, 0x71ff, 0x0002, 0xff28, 0x0010, 0xff71, 0x0003, 0x0668, + 0x0012, 0xd041, 0x000b, 0x1668, 0x0015, 0x00d1, 0x0010, 0x0202, + 0x0000, 0x75ff, 0x0011, 0xffc8, 0x0000, 0x1804, 0x0001, 0xffd8, + 0x0010, 0x0009, 0x0013, 0x9671, 0x0000, 0xff75, 0x0003, 0x9673, + 0x0015, 0x00d1, 0x0000, 0x0200, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0001, 0xbd88, 0x0000, 0x0008, 0x0000, 0xff31, 0x0005, 0x00b0, + 0x0010, 0x0009, 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0015, 0x0033, + 0x0000, 0xb012, 0x001b, 0x8681, 0x0013, 0x046b, 0x0015, 0x0044, + 0x0000, 0x0008, 0x0005, 0x0098, 0x0010, 0x0056, 0x0015, 0x0099, + 0x0000, 0x9575, 0x0004, 0x08a8, 0x0000, 0xb096, 0x0012, 0xb270, + 0x0010, 0xff56, 0x0014, 0x08ca, 0x0010, 0xb052, 0x0010, 0xb153, + 0x0000, 0xb6ff, 0x0011, 0xb2d0, 0x0010, 0xff50, 0x0010, 0xb351, + 0x0017, 0x4000, 0x0001, 0x12e8, 0x0001, 0x1b55, 0x0003, 0x1845, + 0x0015, 0x00d1, 0x0000, 0x0400, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0001, 0x1288, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0x1009, 0x000b, 0x86a1, 0x0015, 0x000f, 0x0000, 0x0001, + 0x0010, 0xc014, 0x0000, 0x1213, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x1388, 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xba09, 0x000b, 0x86ad, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x1388, 0x0010, 0x0005, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0x1a09, 0x000b, 0x86b5, 0x0012, 0x104b, 0x001b, 0x16be, + 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x000b, 0x0015, 0x0033, + 0x0000, 0x1621, 0x001b, 0x86bd, 0x0010, 0x15fe, 0x000b, 0x66dd, + 0x0004, 0x0704, 0x0002, 0x3a42, 0x000b, 0x1703, 0x0001, 0x10c8, + 0x0010, 0x000f, 0x000b, 0x1766, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x1388, 0x0000, 0x0008, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb009, 0x000b, 0x86cd, 0x0011, 0xb0e8, 0x0010, 0x0009, + 0x0003, 0x16d4, 0x0011, 0xb0e8, 0x0000, 0x0001, 0x001b, 0x1702, + 0x0011, 0x1388, 0x0010, 0x000a, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb009, 0x000b, 0x86d9, 0x0002, 0xb04f, 0x001b, 0x16f9, + 0x0013, 0x0702, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb009, + 0x001b, 0x86e4, 0x0015, 0x0033, 0x0010, 0xc00a, 0x001b, 0x86e7, + 0x0010, 0xb0fe, 0x0003, 0x66ec, 0x0000, 0xb012, 0x0013, 0x06ee, + 0x0010, 0xc012, 0x0010, 0xc011, 0x0015, 0x000f, 0x0010, 0x0000, + 0x0002, 0x3944, 0x0013, 0x16f7, 0x0015, 0x0039, 0x0000, 0x5040, + 0x0015, 0x00b8, 0x0000, 0x0008, 0x0014, 0x0925, 0x0000, 0xc013, + 0x0003, 0x0703, 0x0010, 0x02fe, 0x0003, 0x66fe, 0x0015, 0x003a, + 0x0010, 0x2020, 0x0003, 0x0703, 0x0015, 0x003a, 0x0000, 0x2000, + 0x0015, 0x003a, 0x0010, 0x1010, 0x0004, 0x0911, 0x0003, 0x0054, + 0x0003, 0xb704, 0x0005, 0x002a, 0x0000, 0x0004, 0x0000, 0xba30, + 0x0005, 0x0031, 0x0010, 0x001b, 0x0015, 0x0033, 0x0000, 0xb009, + 0x000b, 0x870c, 0x0000, 0xc02c, 0x0000, 0xb02d, 0x0012, 0x104b, + 0x0013, 0x1727, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0000, 0x0023, + 0x0015, 0x0033, 0x0000, 0xb129, 0x001b, 0x8716, 0x0000, 0xb120, + 0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423, 0x0000, 0xb524, + 0x0000, 0xc025, 0x0010, 0xb526, 0x0010, 0xc027, 0x0010, 0xb516, + 0x0010, 0xc017, 0x0000, 0xb518, 0x0000, 0xc019, 0x0010, 0xc028, + 0x0000, 0xc029, 0x0010, 0xc01e, 0x0013, 0x075d, 0x0012, 0x1044, + 0x0003, 0x1757, 0x0002, 0x1034, 0x0000, 0xff10, 0x0000, 0x1a30, + 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b29, + 0x000b, 0x8730, 0x0000, 0x1c30, 0x0000, 0x1b31, 0x0015, 0x0033, + 0x0000, 0xb131, 0x000b, 0x8735, 0x0002, 0x1f43, 0x000b, 0x173c, + 0x0010, 0xb3b5, 0x0000, 0xb4b6, 0x0000, 0xc0b3, 0x0010, 0xc0b4, + 0x0000, 0xb120, 0x0010, 0xb221, 0x0000, 0xb322, 0x0000, 0xb423, + 0x0000, 0xb524, 0x0010, 0xb625, 0x0010, 0xb516, 0x0000, 0xb617, + 0x0000, 0x1826, 0x0000, 0x1927, 0x0000, 0x1a30, 0x0005, 0x0031, + 0x0010, 0x000f, 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x874b, + 0x0000, 0xb028, 0x0000, 0xb129, 0x0012, 0x1e10, 0x0010, 0xff1e, + 0x0013, 0x675d, 0x0002, 0x1d00, 0x0010, 0xff1d, 0x0004, 0x02ab, + 0x0002, 0x3a42, 0x0003, 0x175d, 0x0003, 0x0765, 0x0000, 0x1a30, + 0x0005, 0x0031, 0x0000, 0x0002, 0x0015, 0x0033, 0x0000, 0x1b79, + 0x000b, 0x875c, 0x0003, 0xb75d, 0x0005, 0x002a, 0x0000, 0x0001, + 0x0005, 0x0015, 0x0000, 0x0001, 0x0000, 0x1efe, 0x0003, 0x6765, + 0x0003, 0x0277, 0x0017, 0x4000, 0x0000, 0xba30, 0x0005, 0x0031, + 0x0010, 0x001b, 0x0015, 0x0033, 0x0010, 0xb051, 0x001b, 0x876b, + 0x0000, 0xb0a3, 0x0010, 0xb697, 0x0010, 0xb946, 0x0015, 0x00a5, + 0x0000, 0x0010, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x1388, + 0x0000, 0x0002, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb509, + 0x000b, 0x8778, 0x0014, 0x08ca, 0x0004, 0x08b9, 0x0012, 0xb470, + 0x0010, 0xffb4, 0x0010, 0xb48e, 0x0010, 0xb08a, 0x0010, 0xb18b, + 0x0012, 0x104d, 0x0003, 0x1783, 0x0013, 0x07b0, 0x0012, 0x104b, + 0x0013, 0x1796, 0x0005, 0x008c, 0x0010, 0x0829, 0x0010, 0xc08d, + 0x0001, 0xb2d8, 0x0010, 0x0600, 0x0010, 0xff88, 0x0010, 0xb389, + 0x0000, 0x1390, 0x0010, 0xb591, 0x0000, 0xc08f, 0x0010, 0x1ab9, + 0x0004, 0x051b, 0x0013, 0x9791, 0x0010, 0xb092, 0x0010, 0xb193, + 0x0013, 0x9794, 0x0013, 0x07ab, 0x0005, 0x008c, 0x0000, 0x0809, + 0x0015, 0x008d, 0x0000, 0x0008, 0x0001, 0xb2d8, 0x0000, 0x0100, + 0x0010, 0xff88, 0x0010, 0xb389, 0x0000, 0x1390, 0x0010, 0xb591, + 0x0000, 0xc08f, 0x0000, 0x1a30, 0x0005, 0x0031, 0x0010, 0x000f, + 0x0015, 0x0033, 0x0000, 0xb011, 0x000b, 0x87a6, 0x0013, 0x97a7, + 0x0000, 0xb192, 0x0000, 0xb093, 0x0003, 0x97aa, 0x0010, 0x19a1, + 0x0000, 0x18a2, 0x0015, 0x00b1, 0x0010, 0x0096, 0x0003, 0x0821, + 0x0000, 0xb590, 0x0010, 0x1391, 0x0001, 0x10c8, 0x0010, 0x000f, + 0x0001, 0xffe8, 0x0010, 0x0005, 0x0013, 0x17d7, 0x0001, 0xb2d8, + 0x0000, 0x0700, 0x0010, 0xff88, 0x0010, 0xb389, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x1388, 0x0010, 0x0009, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x87c2, 0x0002, 0xb049, + 0x0013, 0x17ca, 0x0005, 0x008c, 0x0010, 0x0889, 0x0015, 0x00b1, + 0x0010, 0x0096, 0x0013, 0x07ce, 0x0005, 0x008c, 0x0010, 0x0898, + 0x0015, 0x00b1, 0x0000, 0x0092, 0x0010, 0xc08d, 0x0000, 0xc08f, + 0x0013, 0x97d0, 0x0000, 0xc092, 0x0010, 0xc093, 0x0013, 0x97d3, + 0x0010, 0x19a1, 0x0000, 0x18a2, 0x0003, 0x0821, 0x0001, 0xb2d8, + 0x0000, 0x0100, 0x0010, 0xff88, 0x0010, 0xb389, 0x0005, 0x008c, + 0x0010, 0x0880, 0x0015, 0x008d, 0x0000, 0x0008, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x000e, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x001b, 0x87e6, 0x0010, 0xb08f, + 0x0000, 0xb590, 0x0010, 0x1391, 0x0000, 0x1a30, 0x0005, 0x0031, + 0x0000, 0x000d, 0x0015, 0x0033, 0x0000, 0xb021, 0x001b, 0x87ef, + 0x0003, 0x97f0, 0x0010, 0xb392, 0x0010, 0xb293, 0x0003, 0x97f3, + 0x0000, 0xb1a1, 0x0010, 0xb0a2, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x1388, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xb211, 0x001b, 0x87fd, 0x0000, 0xb3ff, 0x0001, 0xb080, + 0x0000, 0xffb3, 0x001b, 0x2804, 0x0002, 0xb200, 0x0003, 0x0805, + 0x0010, 0xb2ff, 0x0011, 0xb180, 0x0010, 0xffb2, 0x0011, 0x1388, + 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xb212, + 0x000b, 0x880c, 0x0015, 0x00b1, 0x0000, 0x0092, 0x0002, 0x104c, + 0x0003, 0x181f, 0x0011, 0xc2e8, 0x0010, 0x000c, 0x000b, 0x1817, + 0x0015, 0x00ff, 0x0000, 0x0800, 0x0013, 0x081f, 0x0011, 0xc2e8, + 0x0000, 0x0020, 0x000b, 0x181d, 0x0015, 0x00ff, 0x0010, 0x1800, + 0x0013, 0x081f, 0x0015, 0x00ff, 0x0000, 0x1000, 0x0011, 0xb1d0, + 0x0010, 0xffb1, 0x0015, 0x009a, 0x0010, 0x0036, 0x0005, 0x009b, + 0x0000, 0x95d5, 0x0012, 0xd041, 0x001b, 0x1825, 0x0015, 0x00d1, + 0x0010, 0x0202, 0x0013, 0x9829, 0x0012, 0x104e, 0x0013, 0x182e, + 0x0012, 0xb12f, 0x0010, 0xffb1, 0x0000, 0xb175, 0x0013, 0x982f, + 0x0015, 0x00d1, 0x0000, 0x0200, 0x0001, 0x19c8, 0x0010, 0xfff0, + 0x001b, 0x1838, 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0003, 0x083a, + 0x0015, 0x00b1, 0x0000, 0x1b58, 0x0005, 0x00b0, 0x0010, 0x0009, + 0x0015, 0x0030, 0x0000, 0x0400, 0x0001, 0xbd88, 0x0000, 0x000b, + 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xb012, 0x001b, 0x8843, + 0x0003, 0x0703, 0x0015, 0x0030, 0x0000, 0x0400, 0x0000, 0xa4ff, + 0x0003, 0x6893, 0x0011, 0xffa8, 0x0010, 0x0005, 0x000b, 0x2893, + 0x0005, 0x0031, 0x0001, 0x1b6c, 0x0015, 0x0033, 0x0010, 0xb211, + 0x000b, 0x8850, 0x0002, 0xb200, 0x0010, 0xffb2, 0x0005, 0x0031, + 0x0001, 0x1b6c, 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x8857, + 0x0015, 0x000f, 0x0000, 0x0001, 0x0000, 0x1213, 0x0005, 0x0010, + 0x0000, 0x8000, 0x0015, 0x00a3, 0x0000, 0x0200, 0x0000, 0xc697, + 0x0005, 0x0046, 0x0000, 0x0002, 0x0015, 0x00a5, 0x0000, 0x0010, + 0x0011, 0xc4d8, 0x0000, 0x3200, 0x0010, 0xff88, 0x0000, 0xc589, + 0x0010, 0xc48a, 0x0010, 0xc58b, 0x0010, 0xc08e, 0x0005, 0x008c, + 0x0010, 0xe109, 0x0010, 0xc08d, 0x0015, 0x0090, 0x0001, 0x1b55, + 0x0005, 0x0091, 0x0010, 0xffff, 0x0000, 0xb292, 0x0000, 0xb393, + 0x0015, 0x009a, 0x0010, 0x0056, 0x0005, 0x009b, 0x0010, 0x95f5, + 0x0012, 0xd042, 0x0003, 0x1886, 0x0005, 0x00b0, 0x0010, 0x8080, + 0x0011, 0x1388, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb00a, 0x000b, 0x8881, 0x0015, 0x00b8, 0x0010, 0x000c, + 0x0014, 0x0925, 0x0003, 0x0888, 0x0005, 0x0075, 0x0010, 0x8092, + 0x0015, 0x00b1, 0x0010, 0x07d0, 0x0005, 0x00b0, 0x0010, 0x0009, + 0x0001, 0xbd88, 0x0000, 0x000b, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0000, 0xb012, 0x001b, 0x8891, 0x0003, 0x0703, 0x0015, 0x00d1, + 0x0000, 0x0400, 0x0001, 0x1288, 0x0010, 0x0003, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0000, 0xb009, 0x000b, 0x889a, 0x0001, 0x1288, + 0x0010, 0x0003, 0x0000, 0xff31, 0x0015, 0x0033, 0x0010, 0xc00a, + 0x000b, 0x88a0, 0x0010, 0xb0fe, 0x0003, 0x68a5, 0x0000, 0xb012, + 0x0003, 0x0703, 0x0010, 0xc012, 0x0010, 0xc011, 0x0003, 0x0703, + 0x0000, 0xba30, 0x0005, 0x0031, 0x0010, 0x0021, 0x0015, 0x0033, + 0x0010, 0xb019, 0x001b, 0x88ad, 0x0002, 0xb200, 0x0011, 0xffc8, + 0x0010, 0x00ff, 0x0010, 0xffb2, 0x0010, 0xb2b7, 0x0005, 0x0031, + 0x0000, 0x0023, 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x88b7, + 0x0017, 0x4000, 0x0000, 0xba30, 0x0005, 0x0031, 0x0000, 0x0023, + 0x0015, 0x0033, 0x0010, 0xb409, 0x000b, 0x88be, 0x0002, 0xb400, + 0x0011, 0xffc8, 0x0010, 0x00ff, 0x0010, 0xffb4, 0x0010, 0xb4b7, + 0x0005, 0x0031, 0x0000, 0x0023, 0x0015, 0x0033, 0x0010, 0xb40a, + 0x001b, 0x88c8, 0x0017, 0x4000, 0x0000, 0xba30, 0x0001, 0xc7c8, + 0x0000, 0x0020, 0x001b, 0x18d6, 0x0005, 0x0031, 0x0010, 0x0028, + 0x0015, 0x0033, 0x0010, 0xb209, 0x000b, 0x88d2, 0x0011, 0xb2c8, + 0x0000, 0xff80, 0x0003, 0x18d9, 0x0010, 0xc4b0, 0x0010, 0xc5b1, + 0x0003, 0x08db, 0x0010, 0xc6b1, 0x0000, 0xc0b0, 0x0005, 0x0031, + 0x0000, 0x0004, 0x0015, 0x0033, 0x0010, 0xb211, 0x001b, 0x88df, + 0x0017, 0x4000, 0x0015, 0x00b8, 0x0010, 0x0009, 0x0015, 0x003a, + 0x0010, 0x0707, 0x0014, 0x0925, 0x0013, 0x002d, 0x0015, 0x00b8, + 0x0010, 0x0009, 0x0015, 0x003a, 0x0010, 0x0707, 0x0003, 0x0925, + 0x0004, 0x011c, 0x0015, 0x0030, 0x0000, 0x0400, 0x0011, 0x0d88, + 0x0000, 0x0004, 0x0000, 0xff31, 0x0015, 0x0033, 0x0000, 0xba09, + 0x001b, 0x88f4, 0x0004, 0x08a8, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0000, 0x0010, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xb20a, 0x001b, 0x88fd, 0x0015, 0x0030, 0x0000, 0x0400, + 0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0x0309, 0x001b, 0x8905, 0x0002, 0x0327, 0x0010, 0xffb2, + 0x0011, 0x0d88, 0x0010, 0x0011, 0x0000, 0xff31, 0x0015, 0x0033, + 0x0010, 0xb20a, 0x000b, 0x890d, 0x0015, 0x00b8, 0x0010, 0x0006, + 0x0003, 0x0925, 0x0014, 0x012e, 0x0004, 0x08a8, 0x0015, 0x0030, + 0x0000, 0x0400, 0x0011, 0x1388, 0x0000, 0x0010, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0010, 0xb20a, 0x000b, 0x891a, 0x0012, 0x1027, + 0x0010, 0xffb2, 0x0011, 0x1388, 0x0010, 0x0011, 0x0000, 0xff31, + 0x0015, 0x0033, 0x0010, 0xb20a, 0x001b, 0x8922, 0x0015, 0x00b8, + 0x0000, 0x0007, 0x0013, 0x4925, 0x0000, 0xb838, 0x0017, 0x4000, + 0x9a8c, 0xaf3d }; +unsigned short xseqipx_code_length01 = 0x1252; diff --git a/drivers/scsi/qla2xxx/ql2400.c b/drivers/scsi/qla2xxx/ql2400.c new file mode 100644 index 000000000..77914fcfa --- /dev/null +++ b/drivers/scsi/qla2xxx/ql2400.c @@ -0,0 +1,138 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include +#include +#include + +#include "qla_def.h" + +static char qla_driver_name[] = "qla2400"; + +extern uint32_t fw2400_version_str[]; +extern uint32_t fw2400_addr01; +extern uint32_t fw2400_code01[]; +extern uint32_t fw2400_length01; +extern uint32_t fw2400_addr02; +extern uint32_t fw2400_code02[]; +extern uint32_t fw2400_length02; + +static struct qla_fw_info qla_fw_tbl[] = { + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = (unsigned short *)&fw2400_code01[0], + .fwlen = (unsigned short *)&fw2400_length01, + .lfwstart = (unsigned long *)&fw2400_addr01, + }, + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = (unsigned short *)&fw2400_code02[0], + .fwlen = (unsigned short *)&fw2400_length02, + .lfwstart = (unsigned long *)&fw2400_addr02, + }, + { FW_INFO_ADDR_NOMORE, }, +}; + +static struct qla_board_info qla_board_tbl[] = { + { + .drv_name = qla_driver_name, + .isp_name = "ISP2422", + .fw_info = qla_fw_tbl, + .fw_fname = "ql2400_fw.bin", + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP2432", + .fw_info = qla_fw_tbl, + .fw_fname = "ql2400_fw.bin", + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP5422", + .fw_info = qla_fw_tbl, + .fw_fname = "ql2400_fw.bin", + }, + { + .drv_name = qla_driver_name, + .isp_name = "ISP5432", + .fw_info = qla_fw_tbl, + .fw_fname = "ql2400_fw.bin", + }, +}; + +static struct pci_device_id qla24xx_pci_tbl[] = { + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2422, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[0], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP2432, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[1], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP5422, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[2], + }, + { + .vendor = PCI_VENDOR_ID_QLOGIC, + .device = PCI_DEVICE_ID_QLOGIC_ISP5432, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = (unsigned long)&qla_board_tbl[3], + }, + + {0, 0}, +}; +MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl); + +static int __devinit +qla24xx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, + (struct qla_board_info *)id->driver_data); +} + +static void __devexit +qla24xx_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + +static struct pci_driver qla24xx_pci_driver = { + .name = "qla2400", + .id_table = qla24xx_pci_tbl, + .probe = qla24xx_probe_one, + .remove = __devexit_p(qla24xx_remove_one), +}; + +static int __init +qla24xx_init(void) +{ + return pci_module_init(&qla24xx_pci_driver); +} + +static void __exit +qla24xx_exit(void) +{ + pci_unregister_driver(&qla24xx_pci_driver); +} + +module_init(qla24xx_init); +module_exit(qla24xx_exit); + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic ISP24xx FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(QLA2XXX_VERSION); diff --git a/drivers/scsi/qla2xxx/ql2400_fw.c b/drivers/scsi/qla2xxx/ql2400_fw.c index de4e84092..282b2d33e 100644 --- a/drivers/scsi/qla2xxx/ql2400_fw.c +++ b/drivers/scsi/qla2xxx/ql2400_fw.c @@ -1,16705 +1,12346 @@ /* - * Firmware version 4.0.23 from - * - * ftp://ftp.qlogic.com/outgoing/linux/firmware/ql2400_fw.bin - * - * xxd -g 1 -i ql2400_fw.bin | indent -l80 -i8 -o ql2400_fw.c + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation * + * See LICENSE.qla2xxx for copyright and licensing details. */ +#include + +/* + * Firmware Version 4.00.18 (14:53 Jan 30, 2006) + */ + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_version = 4*1024+0; +#else +uint32_t risc_code_version = 4*1024+0; +#endif + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_version_str[] = {4, 0,18}; +#else +uint32_t firmware_version[] = {4, 0,18}; +#endif -#include +#ifdef UNIQUE_FW_NAME +#define fw2400_VERSION_STRING "4.00.18" +#else +#define FW_VERSION_STRING "4.00.18" +#endif -static u8 ql2400_fw_bin[] = { - 0x04, 0x01, 0xf1, 0x98, 0x00, 0x10, 0xe0, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0xa3, 0x63, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, - 0x48, 0x54, 0x20, 0x32, 0x30, 0x30, 0x35, 0x20, 0x51, 0x4c, 0x4f, 0x47, - 0x49, 0x43, 0x20, 0x43, 0x4f, 0x52, 0x50, 0x4f, 0x52, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x49, 0x53, 0x50, 0x32, 0x34, 0x78, 0x78, - 0x20, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x20, 0x20, 0x20, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x2e, 0x30, 0x2e, - 0x32, 0x33, 0x20, 0x20, 0x20, 0x20, 0x20, 0x24, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x10, 0x01, 0x4f, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x10, 0xb0, 0xcd, 0x50, 0x0c, 0x08, 0x00, 0x80, 0x0c, 0x18, 0x00, - 0x50, 0x0c, 0x10, 0x00, 0x80, 0x0c, 0x18, 0x00, 0x54, 0x04, 0x20, 0x00, - 0x80, 0x10, 0x20, 0x00, 0x80, 0x04, 0x08, 0x00, 0x80, 0x08, 0x10, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x50, 0x0c, 0x08, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x07, 0xf6, 0x44, 0x00, 0x20, 0x00, 0x80, 0x10, 0x20, 0x00, - 0x40, 0x10, 0x00, 0x00, 0x44, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x0c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x14, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x18, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x1c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x24, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x28, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x2c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x30, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x34, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x38, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x3c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x40, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x44, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x48, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x4c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x50, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x54, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x58, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x5c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x60, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x64, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x68, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x6c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x70, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x74, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x78, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x7c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x84, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x88, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x8c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x90, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0x94, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0x98, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x9c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xa0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xa4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xa8, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xac, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xb0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xb4, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xb8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xbc, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xc0, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xc4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xc8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xcc, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xd0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xd8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xd4, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xdc, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xe4, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xe8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xec, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xf0, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x44, 0xf4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x44, 0xf8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0xfc, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x08, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x0c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x14, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x18, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x1c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x20, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x24, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x28, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x2c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x34, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x38, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x3c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x40, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x44, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x4c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x50, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x54, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x58, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x5c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x64, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x68, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x70, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x74, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x78, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x7c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x80, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x84, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x88, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x8c, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x90, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0x94, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0x98, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x9c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xa0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xa4, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xa8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xac, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xb0, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xb4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xb8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xbc, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xc0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xc4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xc8, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xcc, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xd0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xd4, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xd8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xdc, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xe0, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xe4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xe8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xec, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xf0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x45, 0xf4, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x45, 0xf8, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0xfc, 0x00, 0x00, 0x4a, 0x03, 0xc0, 0x20, - 0x00, 0x00, 0x40, 0x00, 0x4a, 0x03, 0xc0, 0x11, 0x40, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x60, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x00, 0x00, 0x00, 0xbf, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xbf, 0xe0, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0xd0, - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x72, 0x09, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x73, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x74, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x74, 0x09, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x77, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x70, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x61, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x61, 0x50, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x61, 0x70, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x61, 0x90, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x61, 0xb0, - 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, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x63, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x10, 0xe0, 0x04, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x08, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x10, 0xe9, 0x02, - 0x00, 0x10, 0xca, 0x00, 0x00, 0x00, 0x0a, 0xa3, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x10, 0xf3, 0xa5, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x42, - 0x00, 0xff, 0xff, 0xff, 0x00, 0x10, 0xfa, 0xe7, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x05, 0x42, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xf0, 0x00, 0x00, 0x02, 0x1f, 0xff, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x90, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x02, 0xf0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x02, 0x1f, 0x00, - 0x45, 0x78, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x42, 0x00, 0x08, 0x00, 0x00, 0x02, 0x08, 0xff, - 0x45, 0x78, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x02, 0x09, 0x19, 0x04, 0x00, 0x17, 0xfc, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x06, 0x25, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x80, 0x24, 0x32, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x15, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x00, 0x00, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x7a, 0x17, 0x50, 0x04, 0x00, 0x00, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x03, 0x84, 0x00, 0x05, 0x4e, - 0x44, 0x00, 0x08, 0x00, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0xc0, 0x20, 0x00, 0x00, 0x00, 0x04, 0x42, 0x03, 0xe0, 0x00, - 0x60, 0x00, 0x00, 0x0f, 0x59, 0xe0, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x21, 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0x78, 0xe8, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x28, 0x00, - 0x00, 0x10, 0x01, 0x80, 0x58, 0x14, 0x08, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x09, 0x58, 0x14, 0x20, 0x02, 0x58, 0x14, 0x10, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x06, 0x1c, 0x04, 0x02, 0x00, 0x24, - 0x82, 0x14, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf7, 0xf6, - 0x42, 0x00, 0x28, 0x00, 0x00, 0x10, 0x01, 0x80, 0x58, 0x14, 0xa0, 0x00, - 0x80, 0x50, 0xa1, 0xc0, 0x04, 0x00, 0x00, 0x0b, 0x58, 0x14, 0xa8, 0x01, - 0x40, 0x50, 0x00, 0x00, 0x80, 0x54, 0x04, 0x80, 0x04, 0x00, 0x00, 0x04, - 0x58, 0x14, 0xb0, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x82, 0x14, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf7, 0xf4, - 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x78, 0xe8, - 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x28, 0x00, 0x00, 0x10, 0x01, 0x80, - 0x58, 0x14, 0x08, 0x01, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x13, - 0x58, 0x14, 0x20, 0x02, 0x58, 0x14, 0x10, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x06, 0x1c, 0x04, 0x02, 0x00, 0x04, 0x82, 0x14, 0x2c, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf7, 0xf6, 0x4a, 0x03, 0xc0, 0x20, - 0x00, 0x00, 0x40, 0x10, 0x4a, 0x03, 0xc0, 0x11, 0x40, 0x10, 0x00, 0x11, - 0x04, 0x00, 0x60, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x06, 0xb9, 0x4c, 0x14, 0x00, 0x00, 0x42, 0x00, 0x28, 0x00, - 0x00, 0x10, 0xca, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xa3, 0x63, - 0x40, 0x08, 0x00, 0x00, 0x80, 0x14, 0x04, 0x80, 0x82, 0x00, 0x1d, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x04, 0x02, 0x00, 0x03, 0x40, 0x00, 0x18, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x48, 0x0b, 0xc8, 0x40, 0x48, 0x0f, 0xc8, 0x42, 0x04, 0x01, 0x10, 0x00, - 0x40, 0x0c, 0x00, 0x00, 0x80, 0x08, 0x14, 0x00, 0x40, 0x14, 0x00, 0x00, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x07, 0xf0, 0x5c, 0x00, 0x28, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xd4, 0xa3, 0x40, 0x08, 0x00, 0x00, - 0x80, 0x14, 0x04, 0x80, 0x82, 0x00, 0x1d, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x04, 0x02, 0x00, 0x03, 0x40, 0x00, 0x18, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x48, 0x0b, 0xc8, 0x40, - 0x48, 0x0f, 0xc8, 0x42, 0x04, 0x01, 0x10, 0x00, 0x40, 0x0c, 0x00, 0x00, - 0x80, 0x08, 0x14, 0x00, 0x40, 0x14, 0x00, 0x00, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x02, 0x07, 0xf0, 0x48, 0x17, 0x50, 0x0c, 0x45, 0x78, 0x28, 0x00, - 0x4a, 0x03, 0xc0, 0x14, 0x00, 0x1c, 0x00, 0x1c, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x80, - 0x24, 0x22, 0x00, 0x01, 0x04, 0x00, 0x0a, 0xab, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x80, - 0x24, 0x32, 0x00, 0x01, 0x04, 0x00, 0x0a, 0xa5, 0x59, 0xc4, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x80, 0x00, 0x01, 0x20, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x24, 0x22, 0x04, 0x02, 0x00, 0x05, - 0x59, 0xa8, 0x00, 0x6c, 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x50, 0x6c, - 0x04, 0x01, 0xf0, 0x0a, 0x59, 0xe0, 0x00, 0x03, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x03, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x6c, 0x84, 0x00, 0x05, 0x42, - 0x48, 0x03, 0x50, 0x6c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x82, 0x14, 0x14, 0x80, 0x00, 0x17, 0xff, 0xff, 0x04, 0x02, 0x10, 0x09, - 0x80, 0x04, 0x09, 0x02, 0x82, 0x14, 0x14, 0x80, 0x00, 0x13, 0xff, 0xff, - 0x04, 0x02, 0x10, 0x05, 0x80, 0x04, 0x09, 0x02, 0x82, 0x14, 0x14, 0x80, - 0x00, 0x11, 0xff, 0xff, 0x04, 0x00, 0x1a, 0x84, 0x48, 0x07, 0x50, 0x0d, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0x98, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x48, 0x07, 0x50, 0x0a, 0x4a, 0x03, 0xc8, 0x10, 0x00, 0x10, 0x00, 0x00, - 0x4a, 0x03, 0xc8, 0x11, 0x00, 0x10, 0xa3, 0x63, 0x4a, 0x03, 0xc8, 0x12, - 0x00, 0x10, 0xca, 0x00, 0x4a, 0x03, 0xc8, 0x13, 0x00, 0x10, 0xd4, 0xa2, - 0x4a, 0x03, 0xc8, 0x29, 0x00, 0x00, 0x00, 0x04, 0x59, 0xe4, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x03, 0x40, 0x1d, 0x48, 0x03, 0xc8, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x04, 0x01, 0xfb, 0x86, - 0x42, 0x02, 0xc0, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x59, 0xaa, 0xb0, 0x0a, - 0x59, 0xaa, 0xa0, 0x0a, 0x59, 0xaa, 0xa8, 0x0a, 0x59, 0xaa, 0xc8, 0x0d, - 0x49, 0x67, 0x50, 0x66, 0x59, 0xa8, 0x00, 0x0a, 0x48, 0x03, 0x50, 0x0b, - 0x04, 0x01, 0xfa, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x7f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x06, 0xea, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x45, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x19, 0x4d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x74, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x08, 0xac, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x74, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x93, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xd8, 0x04, 0x01, 0xfa, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1d, 0xdd, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4f, 0x3c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x35, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5d, 0x7b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x13, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x11, 0x8b, 0x42, 0x03, 0xe0, 0x00, 0xf0, 0x00, 0x00, 0x01, - 0x4a, 0x03, 0x50, 0x6d, 0x00, 0x00, 0x00, 0x26, 0x4a, 0x03, 0x50, 0x6e, - 0x00, 0x00, 0x00, 0x1d, 0x4a, 0x03, 0x50, 0x6f, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x03, 0x50, 0x70, 0x00, 0x00, 0x00, 0x00, 0x59, 0xe0, 0x00, 0x02, - 0x8c, 0x00, 0x05, 0x1e, 0x42, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0xfe, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x01, 0xfe, - 0x50, 0x00, 0x08, 0x00, 0x48, 0x07, 0x50, 0x55, 0x80, 0x04, 0x09, 0x20, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x3e, 0x04, 0x02, 0x00, 0x0b, - 0x59, 0xa8, 0x00, 0x6c, 0x84, 0x00, 0x05, 0x48, 0x48, 0x03, 0x50, 0x6c, - 0x4a, 0x03, 0x50, 0x6d, 0x00, 0x00, 0x00, 0x5a, 0x4a, 0x03, 0x50, 0x6e, - 0x00, 0x00, 0x00, 0x58, 0x4a, 0x03, 0x50, 0x70, 0x00, 0x00, 0x00, 0x0f, - 0x04, 0x01, 0xf0, 0x3c, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x3f, - 0x04, 0x00, 0x00, 0x0a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x4e, - 0x04, 0x00, 0x00, 0x07, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x55, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x56, - 0x04, 0x02, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x6c, 0x84, 0x00, 0x05, 0x4a, - 0x48, 0x03, 0x50, 0x6c, 0x4a, 0x03, 0x50, 0x6d, 0x00, 0x00, 0x00, 0x55, - 0x4a, 0x03, 0x50, 0x6e, 0x00, 0x00, 0x00, 0x52, 0x4a, 0x03, 0x50, 0x70, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x26, 0x59, 0xe0, 0x00, 0x03, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x20, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x47, 0x04, 0x00, 0x00, 0x10, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x45, 0x04, 0x02, 0x00, 0x1a, 0x59, 0xa8, 0x00, 0x6c, - 0x84, 0x00, 0x05, 0x46, 0x48, 0x03, 0x50, 0x6c, 0x4a, 0x03, 0x50, 0x6d, - 0x00, 0x00, 0x00, 0x43, 0x4a, 0x03, 0x50, 0x6e, 0x00, 0x00, 0x00, 0x3e, - 0x4a, 0x03, 0x50, 0x6f, 0x00, 0x00, 0x00, 0x25, 0x4a, 0x03, 0x50, 0x70, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x0c, 0x59, 0xa8, 0x00, 0x6c, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x6c, 0x4a, 0x03, 0x50, 0x6d, - 0x00, 0x00, 0x00, 0x43, 0x4a, 0x03, 0x50, 0x6e, 0x00, 0x00, 0x00, 0x3e, - 0x4a, 0x03, 0x50, 0x6f, 0x00, 0x00, 0x00, 0x25, 0x4a, 0x03, 0x50, 0x70, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x0c, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x09, 0xde, - 0x4a, 0x03, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x0f, 0x42, 0x03, 0xe0, 0x00, - 0x20, 0x00, 0x05, 0x11, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x01, 0x00, 0x00, - 0x4a, 0x03, 0xc0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x70, 0x13, - 0x59, 0xe0, 0x00, 0x20, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x0f, 0x4a, 0x03, 0xc0, 0x20, 0x00, 0x00, 0x40, 0x00, - 0x4a, 0x03, 0xc0, 0x11, 0x40, 0x00, 0x00, 0x10, 0x04, 0x00, 0x60, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0xe0, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0xc0, 0x17, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0xb0, 0x60, 0x00, 0x00, 0x59, 0xa8, 0x08, 0x70, 0x40, 0x07, 0xf8, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x00, 0x04, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x41, 0x6c, 0x00, 0x00, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x19, 0xb4, - 0x0c, 0x01, 0xf8, 0x04, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x00, 0x08, 0x00, 0x10, 0x03, 0x49, 0x00, 0x10, 0x03, 0x5c, - 0x00, 0x10, 0x04, 0x2c, 0x00, 0x10, 0x03, 0x48, 0x00, 0x10, 0xd4, 0x71, - 0x00, 0x10, 0x03, 0x48, 0x00, 0x10, 0x03, 0x48, 0x00, 0x10, 0x04, 0xab, - 0x04, 0x01, 0xf9, 0xa7, 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xac, 0x71, - 0x58, 0x04, 0x00, 0x1d, 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x0d, 0x84, 0x00, 0x05, 0x00, 0x48, 0x00, 0x08, 0x1d, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfa, 0xa9, - 0x49, 0xf3, 0xc8, 0x57, 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xfa, 0x8f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xe4, 0x04, 0x02, 0x00, 0x33, - 0x59, 0x94, 0x00, 0x23, 0x82, 0x00, 0x05, 0x80, 0x00, 0x10, 0x3e, 0xab, - 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x22, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x02, 0x00, 0x2c, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0xc0, 0x48, 0x03, 0x88, 0x06, 0x04, 0x01, 0xf0, 0x27, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0xb8, 0x59, 0xa8, 0x00, 0x16, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0xb4, - 0x49, 0x7b, 0x50, 0x0f, 0x4a, 0x03, 0x88, 0x93, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xd3, 0x59, 0xc4, 0x10, 0x06, 0x04, 0x02, 0x00, 0x06, - 0x82, 0x08, 0x15, 0x40, 0x00, 0x00, 0x00, 0xf1, 0x82, 0x08, 0x15, 0x00, - 0xbb, 0xff, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x03, 0x82, 0x08, 0x15, 0x40, - 0x44, 0x00, 0x00, 0xf1, 0x48, 0x0b, 0x88, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x8c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0xa2, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x30, - 0x49, 0x7b, 0x50, 0x12, 0x04, 0x01, 0xf0, 0x37, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0xea, 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x10, 0x8f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x8c, - 0x59, 0xc4, 0x00, 0xa3, 0x82, 0x00, 0x05, 0x00, 0xff, 0xef, 0xff, 0xff, - 0x48, 0x03, 0x88, 0xa3, 0x59, 0xa8, 0x00, 0x48, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3d, 0xe7, - 0x04, 0x01, 0xf0, 0x83, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x46, - 0x48, 0x03, 0x50, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xc2, - 0x59, 0xc4, 0x10, 0x06, 0x04, 0x02, 0x00, 0x06, 0x82, 0x08, 0x15, 0x40, - 0x44, 0x00, 0x00, 0x01, 0x82, 0x08, 0x15, 0x00, 0xff, 0xff, 0xff, 0x0f, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x08, 0x15, 0x40, 0x44, 0x00, 0x00, 0xf1, - 0x48, 0x0b, 0x88, 0x06, 0x49, 0x7b, 0x90, 0x05, 0x4a, 0x03, 0x88, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x30, 0x00, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x0c, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xda, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0xa8, 0x10, 0x0f, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x10, 0x59, 0xa8, 0x18, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x7f, - 0x85, 0x0e, 0x1d, 0x0a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0x5a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x09, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x50, 0x12, - 0x00, 0x00, 0x00, 0x01, 0x85, 0x0e, 0x1d, 0x0e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x39, 0x38, 0x04, 0x01, 0xf0, 0x4f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x14, 0x04, 0x00, 0x00, 0x05, 0x59, 0xc4, 0x10, 0x02, - 0x84, 0x08, 0x15, 0x0c, 0x48, 0x0b, 0x88, 0x02, 0x04, 0x01, 0xf0, 0x12, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x06, - 0x59, 0xa8, 0x00, 0x1c, 0x80, 0x00, 0x05, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x8b, 0x49, 0x04, 0x01, 0xf0, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0x49, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x06, - 0x04, 0x02, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x1c, 0x80, 0x00, 0x05, 0x40, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x3f, 0x0a, 0x49, 0x7b, 0x50, 0x25, - 0x49, 0x7b, 0x50, 0x24, 0x49, 0x7b, 0x50, 0x17, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x59, 0xa8, 0x10, 0x23, 0x04, 0x02, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x59, 0x80, 0x00, 0x15, 0x80, - 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x50, 0x27, 0x04, 0x01, 0xf0, 0x05, - 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x48, 0x03, 0x50, 0x27, 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x00, 0x02, 0x84, 0x08, 0x15, 0x44, 0x48, 0x0b, 0x50, 0x23, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x59, 0x48, 0x07, 0x88, 0x80, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x68, 0xfb, 0x49, 0x7b, 0x50, 0x25, 0x49, 0x7b, 0x50, 0x1a, - 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x03, 0x78, 0xe4, - 0x00, 0x00, 0x00, 0xc0, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x07, - 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1a, 0xdd, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x1b, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1a, 0xdd, - 0x04, 0x01, 0xf0, 0x72, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x03, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x1c, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x1a, 0x4a, 0x03, 0x88, 0x02, - 0x00, 0x00, 0xff, 0xbf, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x16, - 0x59, 0x9c, 0x00, 0x18, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x00, 0x10, - 0x59, 0xa8, 0x00, 0x24, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1b, 0xe7, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x5b, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x41, 0x7a, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x0c, 0x04, 0x01, 0xf0, 0x55, - 0x59, 0xa8, 0x00, 0x25, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x52, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x05, - 0x59, 0xa8, 0x00, 0x1a, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x4c, - 0x04, 0x01, 0xf0, 0x03, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x00, 0x00, 0x49, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, 0x04, 0x02, 0x00, 0x46, - 0x59, 0x9c, 0x00, 0x18, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xb0, 0x04, 0x02, 0x00, 0x40, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x00, 0x00, 0x0d, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x41, 0x7a, 0x88, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x04, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x1a, 0x04, 0x02, 0x00, 0x34, - 0x81, 0x46, 0x88, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf8, - 0x4a, 0x03, 0x88, 0x02, 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0xac, 0xb8, 0x04, 0x01, 0xfa, 0x5f, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0xac, 0xc5, 0x04, 0x01, 0xfa, 0x5c, 0x85, 0x0e, 0x1d, 0x02, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x01, 0xf9, 0x50, 0x80, 0x00, 0x05, 0x80, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x14, 0xc3, 0x59, 0x9c, 0x00, 0x18, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0xc5, - 0x04, 0x01, 0xf0, 0x09, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0x64, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xe4, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0xc4, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x0f, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x00, 0xfb, 0xff, 0xff, 0xff, - 0x48, 0x03, 0x88, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x7d, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x94, 0x00, 0x22, 0x59, 0x94, 0x08, 0x23, - 0x80, 0x04, 0x05, 0x40, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7b, 0x28, 0x23, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x50, 0x59, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0x50, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x50, 0x5b, - 0x00, 0x00, 0x00, 0x17, 0x4a, 0x03, 0x50, 0x5c, 0x00, 0x00, 0x00, 0x02, - 0x4a, 0x03, 0x50, 0x0f, 0x00, 0xff, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0x49, 0x4a, 0x03, 0x50, 0x27, 0x20, 0x20, 0x00, 0x00, - 0x4a, 0x03, 0x50, 0x28, 0x88, 0x00, 0x02, 0x00, 0x4a, 0x03, 0x50, 0x29, - 0x00, 0xff, 0x00, 0x1f, 0x4a, 0x03, 0x50, 0x2a, 0x00, 0x00, 0x07, 0xd0, - 0x4a, 0x03, 0x50, 0x2b, 0x80, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x50, 0x2c, - 0x00, 0x00, 0x02, 0x00, 0x4a, 0x03, 0x50, 0x2d, 0x00, 0xff, 0x00, 0x00, - 0x4a, 0x03, 0x50, 0x2e, 0x00, 0x01, 0x00, 0x00, 0x4a, 0x03, 0x50, 0x37, - 0x51, 0x4c, 0x4f, 0x47, 0x4a, 0x03, 0x50, 0x38, 0x49, 0x43, 0x20, 0x20, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x41, 0x7a, 0x88, 0x00, - 0x41, 0x78, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x02, 0x00, 0x02, 0x80, 0x04, 0x08, 0x00, 0x81, 0x46, 0x88, 0x00, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x07, 0xf6, - 0x5c, 0x02, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x04, 0x01, 0xf8, 0x0c, 0x48, 0x5f, 0xc8, 0x57, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x4d, 0x78, 0x00, 0x00, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x02, 0x04, 0x01, 0xf0, 0x09, - 0x40, 0x68, 0x00, 0x00, 0x40, 0x6c, 0x08, 0x00, 0x40, 0x70, 0x10, 0x00, - 0x48, 0x5f, 0xc8, 0x57, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x02, 0x04, 0x00, 0x60, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x8d, - 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0xc0, 0x25, 0x80, 0x04, 0x09, 0x20, - 0x48, 0x07, 0xc0, 0x26, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc0, 0x23, - 0x80, 0x00, 0x01, 0x20, 0x48, 0x03, 0xc0, 0x24, 0x5c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x03, 0xc0, 0x21, 0x80, 0x00, 0x01, 0x20, - 0x48, 0x03, 0xc0, 0x22, 0x41, 0xf8, 0x00, 0x00, 0x48, 0x03, 0xc0, 0x27, - 0x80, 0x00, 0x01, 0x20, 0x48, 0x03, 0xc0, 0x28, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x80, - 0x24, 0x32, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x57, 0x04, 0x00, 0x10, 0x53, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x46, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0xb9, 0x72, 0x46, 0x00, 0x08, 0x00, 0xfa, 0xce, 0xfa, 0xce, - 0x80, 0x04, 0x08, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x58, 0x08, 0x00, 0x13, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x58, 0x08, 0x00, 0x19, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x58, 0x08, 0x00, 0x1a, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x58, 0x08, 0x00, 0x1b, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x58, 0x08, 0x00, 0x1c, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x58, 0x08, 0x00, 0x1f, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x7a, 0x40, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x50, 0x08, 0x00, 0x00, 0x44, 0x00, 0x08, 0x00, 0x80, 0x08, 0x10, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x80, 0x0c, 0x18, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x7b, 0x00, 0x48, 0x0c, 0x10, 0x03, 0x58, 0x08, 0x00, 0x05, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x80, 0x0c, 0x18, 0x40, - 0x04, 0x02, 0x17, 0xfb, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x7c, 0x00, - 0x58, 0x08, 0x00, 0x02, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x58, 0x08, 0x00, 0x03, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x58, 0x08, 0x00, 0x20, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x58, 0x08, 0x00, 0x21, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x58, 0x08, 0x00, 0x22, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x58, 0x08, 0x00, 0x23, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x10, 0x00, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x5f, 0xc0, 0x20, 0x90, 0x5c, 0xb9, 0xc0, - 0x82, 0x5c, 0xbd, 0x40, 0x00, 0x00, 0x00, 0x12, 0x48, 0x5f, 0xc0, 0x11, - 0x42, 0x03, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x23, - 0x04, 0x01, 0xf7, 0xff, 0x4a, 0x03, 0xc8, 0x50, 0x00, 0x10, 0xb9, 0x8e, - 0x4a, 0x03, 0xc8, 0x51, 0x00, 0x10, 0xc9, 0x8d, 0x4a, 0x03, 0xc8, 0x53, - 0x00, 0x00, 0x08, 0x00, 0x4a, 0x03, 0xc8, 0x55, 0x00, 0x01, 0xeb, 0x5a, - 0x59, 0xe4, 0x00, 0x01, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x3f, 0x00, - 0x48, 0x03, 0xc8, 0x01, 0x4a, 0x03, 0xb1, 0x04, 0x70, 0x00, 0x00, 0x02, - 0x4a, 0x03, 0xa8, 0x04, 0x70, 0x00, 0x00, 0x02, 0x4a, 0x03, 0xb0, 0x04, - 0x70, 0x00, 0x00, 0x02, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0xbb, - 0x49, 0x78, 0x00, 0x01, 0x49, 0x78, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x03, 0x60, 0x00, 0x4d, 0xb0, 0x00, 0x00, 0x49, 0xb3, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x68, 0x8c, 0x00, 0x05, 0x30, - 0x04, 0x02, 0x07, 0xfe, 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf8, 0x66, 0x5c, 0x00, 0x10, 0x00, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x02, 0x8b, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf8, 0x5d, 0x5c, 0x00, 0x10, 0x00, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x02, 0x8b, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf8, 0x54, 0x5c, 0x00, 0x10, 0x00, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x02, 0x8b, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x04, 0x01, 0xf7, 0xe2, 0x8c, 0x00, 0x05, 0x0c, - 0x59, 0xa8, 0x08, 0x68, 0x04, 0x02, 0x00, 0x03, 0x84, 0x04, 0x0d, 0x30, - 0x04, 0x01, 0xf0, 0x06, 0x84, 0x04, 0x0d, 0x70, 0x48, 0x07, 0x50, 0x68, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x44, - 0x48, 0x07, 0x50, 0x68, 0x83, 0x6c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x06, 0x09, 0x00, 0x10, 0x05, 0xeb, - 0x00, 0x10, 0x05, 0xeb, 0x00, 0x10, 0x05, 0xd3, 0x00, 0x10, 0x05, 0xfc, - 0x00, 0x10, 0x05, 0xeb, 0x00, 0x10, 0x05, 0xeb, 0x00, 0x10, 0x05, 0xfc, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x13, - 0x59, 0xc4, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x01, 0x80, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x42, 0x00, 0x40, 0x00, 0x04, 0x01, 0xf0, 0x06, - 0x42, 0x00, 0x10, 0x00, 0x22, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x12, 0x00, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x29, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x04, 0x04, 0x01, 0xf0, 0x26, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xa8, 0x00, 0x68, 0x8c, 0x00, 0x05, 0x34, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x74, 0x05, 0x70, 0x05, 0x04, 0x01, 0xf8, 0x1d, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x08, - 0x04, 0x01, 0xf7, 0xfc, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x68, - 0x8c, 0x00, 0x05, 0x34, 0x04, 0x02, 0x00, 0x0a, 0x59, 0xa8, 0x00, 0x6c, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, - 0x24, 0x05, 0x20, 0x05, 0x04, 0x01, 0xf0, 0x0c, 0x42, 0x00, 0x10, 0x00, - 0x74, 0x05, 0x70, 0x05, 0x04, 0x01, 0xf0, 0x09, 0x1c, 0x01, 0xf0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x82, 0x08, 0x15, 0x40, 0x00, 0x1c, 0x00, 0x00, 0x48, 0x0b, 0xc0, 0x13, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x68, 0x8c, 0x00, 0x05, 0x30, - 0x04, 0x00, 0x00, 0x02, 0x84, 0x08, 0x15, 0x70, 0x48, 0x0b, 0x50, 0x68, - 0x8c, 0x00, 0x05, 0x30, 0x04, 0x02, 0x00, 0x05, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x70, 0x00, 0x80, 0x08, 0x11, 0x14, 0x04, 0x01, 0xff, 0xf0, - 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0x00, 0x00, 0x50, 0x04, 0x18, 0x00, - 0x80, 0x0c, 0x04, 0x00, 0x80, 0x04, 0x08, 0x00, 0x80, 0x10, 0x20, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x80, 0x08, 0x05, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x02, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x78, 0x00, 0x00, 0x41, 0x78, 0x08, 0x00, 0x41, 0x78, 0x10, 0x00, - 0x41, 0x78, 0x18, 0x00, 0x41, 0x78, 0x20, 0x00, 0x41, 0x78, 0x28, 0x00, - 0x41, 0x78, 0x30, 0x00, 0x41, 0x78, 0x38, 0x00, 0x41, 0x78, 0x40, 0x00, - 0x41, 0x78, 0x48, 0x00, 0x41, 0x78, 0x50, 0x00, 0x41, 0x78, 0x58, 0x00, - 0x41, 0x78, 0x60, 0x00, 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x70, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x41, 0x78, 0x80, 0x00, 0x41, 0x78, 0x88, 0x00, - 0x41, 0x78, 0x90, 0x00, 0x41, 0x78, 0x98, 0x00, 0x41, 0x78, 0xa0, 0x00, - 0x41, 0x78, 0xa8, 0x00, 0x41, 0x78, 0xb0, 0x00, 0x41, 0x78, 0xb8, 0x00, - 0x41, 0x78, 0xc0, 0x00, 0x41, 0x78, 0xc8, 0x00, 0x41, 0x78, 0xd0, 0x00, - 0x41, 0x78, 0xd8, 0x00, 0x41, 0x78, 0xe0, 0x00, 0x41, 0x78, 0xe8, 0x00, - 0x41, 0x78, 0xf0, 0x00, 0x41, 0x78, 0xf8, 0x00, 0x41, 0x79, 0x00, 0x00, - 0x41, 0x79, 0x08, 0x00, 0x41, 0x79, 0x10, 0x00, 0x41, 0x79, 0x18, 0x00, - 0x41, 0x79, 0x20, 0x00, 0x41, 0x79, 0x28, 0x00, 0x41, 0x79, 0x30, 0x00, - 0x41, 0x79, 0x38, 0x00, 0x41, 0x79, 0x40, 0x00, 0x41, 0x79, 0x48, 0x00, - 0x41, 0x79, 0x50, 0x00, 0x41, 0x79, 0x58, 0x00, 0x41, 0x79, 0x60, 0x00, - 0x41, 0x79, 0x68, 0x00, 0x41, 0x79, 0x70, 0x00, 0x41, 0x79, 0x78, 0x00, - 0x41, 0x79, 0x80, 0x00, 0x41, 0x79, 0x88, 0x00, 0x42, 0x01, 0x90, 0x00, - 0x00, 0x10, 0xad, 0x04, 0x42, 0x01, 0x98, 0x00, 0x00, 0x10, 0xac, 0xdb, - 0x41, 0x79, 0xa0, 0x00, 0x41, 0x79, 0xa8, 0x00, 0x41, 0x79, 0xb0, 0x00, - 0x41, 0x79, 0xb8, 0x00, 0x41, 0x79, 0xc8, 0x00, 0x41, 0x79, 0xc0, 0x00, - 0x41, 0x79, 0xd0, 0x00, 0x41, 0x79, 0xd8, 0x00, 0x41, 0x79, 0xe0, 0x00, - 0x41, 0x79, 0xe8, 0x00, 0x41, 0x79, 0xf0, 0x00, 0x41, 0x79, 0xf8, 0x00, - 0x41, 0x7a, 0x00, 0x00, 0x41, 0x7a, 0x08, 0x00, 0x41, 0x7a, 0x10, 0x00, - 0x41, 0x7a, 0x18, 0x00, 0x41, 0x7a, 0x20, 0x00, 0x42, 0x02, 0x28, 0x00, - 0x00, 0x00, 0x61, 0x00, 0x41, 0x7a, 0x30, 0x00, 0x41, 0x7a, 0x38, 0x00, - 0x41, 0x7a, 0x40, 0x00, 0x41, 0x7a, 0x48, 0x00, 0x41, 0x7a, 0x50, 0x00, - 0x41, 0x7a, 0x58, 0x00, 0x41, 0x7a, 0x60, 0x00, 0x41, 0x7a, 0x68, 0x00, - 0x41, 0x7a, 0x70, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x41, 0x7a, 0x80, 0x00, - 0x41, 0x7a, 0x88, 0x00, 0x41, 0x7a, 0x90, 0x00, 0x41, 0x7a, 0x98, 0x00, - 0x41, 0x7a, 0xe8, 0x00, 0x41, 0x7a, 0xf8, 0x00, 0x42, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x7c, 0x00, 0x42, 0x03, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xd4, - 0x42, 0x03, 0x18, 0x00, 0x00, 0x00, 0xbf, 0x1d, 0x42, 0x03, 0x20, 0x00, - 0x00, 0x00, 0xbf, 0x32, 0x42, 0x03, 0x28, 0x00, 0x00, 0x10, 0xaf, 0x9c, - 0x42, 0x03, 0x30, 0x00, 0x00, 0x02, 0x08, 0xff, 0x42, 0x03, 0x40, 0x00, - 0x00, 0x10, 0xac, 0x71, 0x42, 0x03, 0x38, 0x00, 0x00, 0x10, 0xac, 0x90, - 0x42, 0x03, 0x48, 0x00, 0x00, 0x10, 0xad, 0x12, 0x42, 0x03, 0x50, 0x00, - 0x00, 0x10, 0xac, 0x00, 0x42, 0x03, 0x58, 0x00, 0x00, 0x10, 0xa4, 0x00, - 0x42, 0x03, 0x08, 0x00, 0x00, 0x10, 0xac, 0xd2, 0x41, 0x7b, 0x60, 0x00, - 0x42, 0x03, 0x68, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x42, 0x03, 0xc8, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x42, 0x03, 0x70, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x42, 0x03, 0x78, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x42, 0x03, 0x88, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x42, 0x03, 0x90, 0x00, 0x00, 0x00, 0x60, 0x00, 0x42, 0x03, 0x98, 0x00, - 0x00, 0x10, 0xb6, 0xaa, 0x42, 0x03, 0xa0, 0x00, 0x00, 0x00, 0x76, 0x00, - 0x42, 0x03, 0xa8, 0x00, 0x00, 0x00, 0x74, 0x00, 0x42, 0x03, 0xb0, 0x00, - 0x00, 0x00, 0x72, 0x00, 0x42, 0x03, 0xb8, 0x00, 0x00, 0x00, 0x71, 0x00, - 0x42, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x42, 0x03, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x03, 0xe8, 0x00, 0x00, 0x02, 0x00, 0xeb, - 0x41, 0x7b, 0xd8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x44, 0x00, 0x08, 0x00, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x55, 0x55, 0x41, 0x78, 0x20, 0x00, - 0x82, 0x10, 0x24, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, - 0x80, 0x04, 0x2c, 0x00, 0x44, 0x0c, 0x28, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x80, 0x18, 0x30, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x50, 0x14, 0x00, 0x00, 0x80, 0x0c, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, - 0x50, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x05, 0x80, 0x04, 0x02, 0x07, 0xf2, - 0x5c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x08, 0x00, 0x80, 0x14, 0x28, 0x40, - 0x48, 0x17, 0xc8, 0x61, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x08, 0x1e, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x09, 0x49, 0x78, 0x1c, 0x0c, - 0x4a, 0x00, 0x1a, 0x0c, 0x00, 0x00, 0x02, 0x00, 0x4a, 0x00, 0x18, 0x04, - 0x07, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x0f, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x00, 0x18, 0x05, 0x04, 0x01, 0xfd, 0xed, 0x9c, 0x04, 0x09, 0xc0, - 0x48, 0x04, 0x18, 0x06, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x08, 0x0b, 0x40, 0x06, 0xd0, 0x00, 0x42, 0x02, 0xb8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x59, 0xa8, 0x18, 0x0c, 0x48, 0x0f, 0xc8, 0x57, - 0x82, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x14, 0x82, 0x08, 0x24, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x40, 0x10, 0x00, 0x00, 0x80, 0x0c, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x06, 0x44, 0x08, 0x08, 0x00, 0x40, 0x08, 0x08, 0x00, - 0x40, 0x10, 0x10, 0x00, 0x81, 0x5e, 0xb8, 0x00, 0x04, 0x01, 0xf7, 0xf7, - 0x45, 0x78, 0x08, 0x00, 0x49, 0x5f, 0x50, 0x1f, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x04, 0x41, 0x2d, 0x88, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x5c, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x09, 0x49, 0x6b, 0xc8, 0x57, - 0x81, 0x5e, 0xb8, 0x40, 0x41, 0x6a, 0x58, 0x00, 0x59, 0x2e, 0xd0, 0x00, - 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, 0x81, 0x2e, 0x59, 0xc0, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x22, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x41, 0x7a, 0x58, 0x00, - 0x04, 0x01, 0xf7, 0xf9, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x04, - 0x41, 0x2d, 0x88, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x81, 0x5e, 0xb8, 0x40, 0x04, 0x00, 0x10, 0x08, 0x41, 0x6a, 0x58, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2e, 0xd0, 0x00, 0x49, 0x7a, 0x58, 0x00, - 0x49, 0x7a, 0x58, 0x01, 0x81, 0x2e, 0x59, 0xc0, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x22, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x41, 0x7a, 0xb8, 0x00, 0x41, 0x7a, 0x58, 0x00, - 0x04, 0x01, 0xf7, 0xf8, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x6a, 0x58, 0x00, 0x41, 0x2e, 0xd0, 0x00, 0x81, 0x5e, 0xb8, 0x00, - 0x59, 0xc8, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x12, 0x00, - 0x48, 0x03, 0x90, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x07, - 0x59, 0x2c, 0x00, 0x01, 0x49, 0x7a, 0x58, 0x01, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xff, 0xed, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xf9, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xaf, 0xc6, 0x4a, 0x00, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x59, 0xe0, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x80, 0x80, - 0x48, 0x03, 0xc0, 0x03, 0x4a, 0x03, 0xb8, 0x05, 0x90, 0x00, 0x00, 0x01, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x70, 0x00, 0x00, 0x00, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x00, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x80, 0x00, 0x00, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0x7b, 0xb8, 0x07, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfe, 0x4a, 0x03, 0xb8, 0x05, - 0x30, 0x00, 0x00, 0x00, 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, - 0x60, 0x00, 0x00, 0x01, 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, - 0x70, 0x00, 0x00, 0x01, 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, - 0x30, 0x00, 0x00, 0x02, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x49, 0x7b, 0xb8, 0x07, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfe, - 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x00, 0x59, 0xdc, 0x00, 0x06, - 0x4a, 0x03, 0xb8, 0x05, 0x60, 0x00, 0x00, 0x01, 0x04, 0x01, 0xff, 0x91, - 0x04, 0x00, 0x0d, 0x7b, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xc4, - 0x45, 0x2c, 0x10, 0x00, 0x4a, 0x02, 0x58, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x58, 0x02, 0x00, 0x00, 0x01, 0x00, 0x4a, 0x02, 0x58, 0x09, - 0x00, 0x10, 0x69, 0xa6, 0x49, 0x7a, 0x58, 0x0a, 0x49, 0x7a, 0x58, 0x0b, - 0x49, 0x7a, 0x58, 0x0c, 0x04, 0x01, 0xff, 0x83, 0x04, 0x00, 0x0d, 0x6d, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xc5, 0x45, 0x2c, 0x10, 0x00, - 0x4a, 0x02, 0x58, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x58, 0x02, - 0x00, 0x00, 0x01, 0x00, 0x4a, 0x02, 0x58, 0x09, 0x00, 0x10, 0x10, 0xd8, - 0x49, 0x7a, 0x58, 0x03, 0x49, 0x7a, 0x58, 0x07, 0x49, 0x7a, 0x58, 0x08, - 0x49, 0x7a, 0x58, 0x0a, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0xe0, 0x00, 0x00, 0x01, - 0x59, 0xdc, 0x00, 0x06, 0x8c, 0x00, 0x05, 0x22, 0x04, 0x00, 0x07, 0xfc, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x10, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x4c, 0x38, 0x00, 0x00, 0x40, 0x08, 0x70, 0x00, 0x4a, 0x00, 0x70, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xaf, 0xc6, - 0x82, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x78, 0x00, 0x00, - 0x58, 0x38, 0x00, 0x05, 0x48, 0x08, 0x70, 0x05, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x06, 0x48, 0x0b, 0xc8, 0x57, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x44, 0x08, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x08, 0x70, 0x06, 0x58, 0x38, 0x00, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x08, 0x0c, 0x5c, 0x00, 0x70, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x38, 0x00, 0x00, - 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xaf, 0xc6, 0x58, 0x38, 0x00, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x08, 0x03, 0x5c, 0x00, 0x70, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xaf, 0xc6, - 0x58, 0x38, 0x00, 0x01, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x12, 0x58, 0x38, 0x00, 0x00, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x07, 0xd4, 0x00, 0x10, 0x07, 0xd3, 0x00, 0x10, 0x07, 0xd3, - 0x00, 0x10, 0x07, 0xd3, 0x00, 0x10, 0x07, 0xd3, 0x00, 0x10, 0x07, 0xd3, - 0x00, 0x10, 0x07, 0xd3, 0x00, 0x10, 0x07, 0xd3, 0x04, 0x01, 0xfd, 0x1c, - 0x58, 0x38, 0x08, 0x08, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x27, - 0x58, 0x38, 0x00, 0x06, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x00, 0x70, 0x02, - 0x40, 0x00, 0x68, 0x00, 0x58, 0x34, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x02, 0x48, 0x00, 0x70, 0x05, 0x48, 0x00, 0x70, 0x06, - 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, 0x59, 0xdc, 0x00, 0x06, - 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x00, 0x58, 0x34, 0x00, 0x07, - 0x48, 0x03, 0xb8, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x58, 0x34, 0x00, 0x08, - 0x48, 0x03, 0xb8, 0x01, 0x48, 0x03, 0xc8, 0x57, 0x58, 0x34, 0x00, 0x05, - 0x48, 0x00, 0x70, 0x03, 0x58, 0x34, 0x00, 0x03, 0x48, 0x00, 0x70, 0x04, - 0x48, 0x03, 0xb8, 0x03, 0x48, 0x03, 0xc8, 0x57, 0x58, 0x34, 0x00, 0x01, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x00, 0x70, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x28, 0x4a, 0x00, 0x70, 0x01, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x3d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x2f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x89, - 0x04, 0x00, 0x00, 0x17, 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x00, - 0x48, 0x07, 0xb8, 0x00, 0x48, 0x0b, 0xb8, 0x01, 0x4a, 0x00, 0x70, 0x03, - 0x00, 0x00, 0x00, 0x40, 0x48, 0x0c, 0x70, 0x09, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x79, - 0x58, 0x38, 0x00, 0x08, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x48, 0x00, 0x70, 0x04, 0x48, 0x03, 0xb8, 0x03, 0x4a, 0x00, 0x70, 0x01, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x01, 0xf0, 0x22, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x47, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x50, 0x04, 0x01, 0xf7, 0xb7, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x58, 0x38, 0x08, 0x03, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x02, 0x10, 0x03, 0x40, 0x04, 0x10, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x48, 0x00, 0x70, 0x03, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0b, 0xb8, 0x02, - 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x02, 0x59, 0xdc, 0x00, 0x06, - 0x4a, 0x03, 0xb8, 0x05, 0x70, 0x00, 0x00, 0x01, 0x59, 0xdc, 0x00, 0x06, - 0x4a, 0x03, 0xb8, 0x05, 0x10, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x3b, 0xc8, 0x57, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x58, 0x38, 0x08, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x10, 0x03, 0x40, 0x04, 0x10, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x48, 0x00, 0x70, 0x03, 0x48, 0x0b, 0xb8, 0x02, - 0x48, 0x03, 0xc8, 0x57, 0x4a, 0x03, 0xb8, 0x05, 0x10, 0x00, 0x00, 0x02, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xaf, 0xc6, 0x59, 0xdc, 0x08, 0x06, 0x48, 0x07, 0xc8, 0x57, - 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x3e, - 0x04, 0x00, 0x00, 0x07, 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x02, 0x0c, 0x98, - 0x58, 0x38, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x0c, 0x01, 0xf8, 0x04, 0x5c, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0xc3, 0x00, 0x10, 0x08, 0x67, - 0x00, 0x10, 0x08, 0x77, 0x00, 0x10, 0x04, 0xef, 0x00, 0x10, 0x04, 0xef, - 0x00, 0x10, 0x04, 0xef, 0x00, 0x10, 0x04, 0xef, 0x00, 0x10, 0x11, 0x06, - 0x48, 0x07, 0xc8, 0x56, 0x82, 0x04, 0x0d, 0x00, 0x43, 0x00, 0x0f, 0x80, - 0x04, 0x02, 0x00, 0x09, 0x58, 0x38, 0x00, 0x03, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x1c, 0x59, 0xdc, 0x00, 0x00, 0x48, 0x03, 0xb8, 0x00, - 0x59, 0xdc, 0x00, 0x01, 0x48, 0x03, 0xb8, 0x01, 0x04, 0x01, 0xf7, 0xaf, - 0x58, 0x38, 0x08, 0x02, 0x4a, 0x00, 0x08, 0x02, 0x00, 0x00, 0x02, 0x00, - 0x04, 0x01, 0xf0, 0x1d, 0x48, 0x07, 0xc8, 0x56, 0x82, 0x04, 0x0d, 0x00, - 0x43, 0x00, 0x0f, 0x80, 0x04, 0x02, 0x00, 0x09, 0x58, 0x38, 0x00, 0x03, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0c, 0x59, 0xdc, 0x00, 0x00, - 0x48, 0x03, 0xb8, 0x00, 0x59, 0xdc, 0x00, 0x01, 0x48, 0x03, 0xb8, 0x01, - 0x04, 0x01, 0xf7, 0xb7, 0x58, 0x38, 0x00, 0x02, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x04, 0x01, 0xf0, 0x0b, 0x4c, 0x34, 0x00, 0x00, 0x58, 0x38, 0x68, 0x02, - 0x59, 0xdc, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x00, 0x68, 0x07, - 0x59, 0xdc, 0x00, 0x01, 0x48, 0x00, 0x68, 0x08, 0x4a, 0x00, 0x68, 0x02, - 0x00, 0x00, 0x01, 0x00, 0x5c, 0x00, 0x68, 0x00, 0x4a, 0x00, 0x70, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x4c, 0x30, 0x00, 0x00, 0x58, 0x38, 0x60, 0x02, - 0x48, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf8, 0x07, 0x04, 0x00, 0x00, 0x04, - 0x58, 0x30, 0x00, 0x09, 0x40, 0x30, 0xd0, 0x00, 0x08, 0x01, 0xf8, 0x00, - 0x5c, 0x00, 0x60, 0x00, 0x04, 0x01, 0xf7, 0x25, 0x80, 0x30, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x09, 0x59, 0xa8, 0x00, 0x0b, 0x80, 0x30, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x07, 0x59, 0xa8, 0x00, 0x0c, 0x80, 0x30, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x04, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xaf, 0xd1, 0x4a, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x78, 0x70, 0x01, 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x20, - 0x4a, 0x03, 0x80, 0x06, 0x60, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x80, 0x09, - 0xf4, 0xf6, 0x00, 0x00, 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x00, - 0x4a, 0x03, 0x80, 0x06, 0x60, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x80, 0x09, - 0xf4, 0xf6, 0x00, 0x00, 0x4a, 0x03, 0xc8, 0x22, 0x00, 0x00, 0x00, 0x10, - 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x09, - 0x4a, 0x03, 0x70, 0xe9, 0x00, 0x00, 0x3a, 0x0f, 0x4a, 0x03, 0x70, 0xe8, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x03, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf8, 0x0a, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x5c, 0x00, 0x00, - 0x82, 0x5c, 0xbd, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0xc0, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x5c, 0xb9, 0xc0, 0x04, 0x00, 0x00, 0x09, 0x4a, 0x03, 0x88, 0x07, - 0x00, 0x00, 0x00, 0x04, 0x59, 0xb8, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, - 0x04, 0x00, 0x00, 0x04, 0x59, 0xb8, 0x00, 0xe0, 0x04, 0x01, 0xf8, 0x7c, - 0x04, 0x01, 0xf7, 0xfb, 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x20, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x08, 0x59, 0xc0, 0x00, 0x07, - 0x4a, 0x03, 0x80, 0x06, 0x20, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x00, 0x07, - 0x4a, 0x03, 0x80, 0x06, 0x80, 0x00, 0x00, 0x0a, 0x59, 0xc0, 0x00, 0x07, - 0x4a, 0x03, 0x80, 0x06, 0x80, 0x00, 0x00, 0x0b, 0x59, 0xc0, 0x00, 0x07, - 0x4a, 0x03, 0x80, 0x06, 0x40, 0x00, 0x00, 0x01, 0x83, 0xc0, 0x05, 0x80, - 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x00, 0x04, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x04, 0x01, 0xf7, 0xed, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x20, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x59, 0xc0, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x07, - 0x4a, 0x03, 0x80, 0x06, 0x90, 0x00, 0x00, 0x01, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0xc0, 0x05, 0x80, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, 0x01, 0xf7, 0xf0, - 0x80, 0x5c, 0xb9, 0xc0, 0x04, 0x02, 0x00, 0x1d, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x83, 0xb8, 0xac, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x39, 0x4a, 0x03, 0x70, 0xfb, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x70, 0x20, 0x00, 0x10, 0x0f, 0xd8, - 0x59, 0xa8, 0x00, 0x36, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x48, 0x03, 0x70, 0x21, 0x4a, 0x03, 0x70, 0x35, 0x00, 0x10, 0xb5, 0xaa, - 0x4a, 0x03, 0x70, 0x30, 0x00, 0x10, 0xac, 0x0f, 0x4a, 0x03, 0x70, 0x31, - 0x00, 0x10, 0xa4, 0x00, 0x4a, 0x03, 0x70, 0x32, 0x00, 0x10, 0xac, 0xe6, - 0x4a, 0x03, 0x70, 0x36, 0x00, 0x10, 0xac, 0xf1, 0x59, 0x84, 0x00, 0x02, - 0x48, 0x03, 0x70, 0x34, 0x4a, 0x03, 0x70, 0x38, 0x00, 0x10, 0x0f, 0xcf, - 0x4a, 0x03, 0x70, 0xfb, 0x00, 0x00, 0x00, 0x01, 0x41, 0x78, 0xa0, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x83, 0xb8, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x39, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x83, 0xb8, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x39, - 0x80, 0x5c, 0xb9, 0xc0, 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x70, 0xe4, - 0xaa, 0xaa, 0xaa, 0xaa, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x70, 0xe4, - 0xa2, 0xaa, 0xaa, 0x82, 0x4a, 0x03, 0x70, 0xe5, 0xaa, 0xaa, 0xaa, 0xaa, - 0x4a, 0x03, 0x70, 0xe6, 0xaa, 0xaa, 0xaa, 0xaa, 0x4a, 0x03, 0x70, 0xfb, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x70, 0xe6, 0xaa, 0xaa, 0xaa, 0xaa, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x20, 0x4a, 0x03, 0x80, 0x06, - 0x90, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1e, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x4a, 0x03, 0x80, 0x06, 0x90, 0x00, 0x00, 0x00, - 0x59, 0xc0, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1e, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x03, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x38, 0x00, 0x00, 0x40, 0x02, 0x60, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x0f, 0x83, 0x32, 0x65, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x09, 0x59, 0x30, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, 0x4c, 0xfc, 0x00, 0x00, - 0x4d, 0x38, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, - 0x4d, 0x4c, 0x00, 0x00, 0x4d, 0x48, 0x00, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x64, 0x00, 0x00, 0x4d, 0x04, 0x00, 0x00, - 0x4c, 0xc8, 0x00, 0x00, 0x4c, 0xcc, 0x00, 0x00, 0x4c, 0xf4, 0x00, 0x00, - 0x4c, 0xf8, 0x00, 0x00, 0x4c, 0xfc, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x00, 0x16, 0x5c, 0x01, 0xf8, 0x00, 0x5c, 0x01, 0xf0, 0x00, - 0x5c, 0x01, 0xe8, 0x00, 0x5c, 0x01, 0x98, 0x00, 0x5c, 0x01, 0x90, 0x00, - 0x5c, 0x02, 0x08, 0x00, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x02, 0x90, 0x00, 0x5c, 0x02, 0x98, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x70, 0x00, - 0x5c, 0x01, 0xf8, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x3b, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x00, 0x3d, - 0x83, 0x30, 0x05, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x81, 0x32, 0x65, 0x80, 0x80, 0x00, 0x01, 0x30, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x0c, 0x01, 0xf0, 0x13, 0x83, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x25, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x0d, 0x00, 0xc0, 0x00, 0x00, 0x38, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xe4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x54, - 0x00, 0x00, 0x00, 0x53, 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x09, 0xff, - 0x00, 0x10, 0x09, 0xfa, 0x00, 0x10, 0x0a, 0x1f, 0x00, 0x10, 0x09, 0xe6, - 0x00, 0x10, 0x09, 0xf2, 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x0a, 0x1a, - 0x00, 0x10, 0x0a, 0x5b, 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x09, 0xdb, - 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x0a, 0x5e, - 0x00, 0x10, 0x0a, 0x64, 0x00, 0x10, 0x0a, 0x75, 0x00, 0x10, 0x0a, 0x86, - 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x0a, 0x8f, 0x00, 0x10, 0x0a, 0x9b, - 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x09, 0xdb, 0x00, 0x10, 0x09, 0xdb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x00, 0x10, 0x09, 0xe4, - 0x00, 0x10, 0x0b, 0x36, 0x00, 0x10, 0x0a, 0x2c, 0x00, 0x10, 0x0a, 0x50, - 0x00, 0x10, 0x09, 0xe4, 0x00, 0x10, 0x09, 0xe4, 0x00, 0x10, 0x09, 0xe4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x04, 0x00, 0x07, 0xfa, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x04, 0x01, 0xf8, 0xaa, 0x40, 0x00, 0x28, 0x00, 0x41, 0x78, 0x20, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x56, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x48, 0x03, 0xc8, 0x56, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x30, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1a, - 0x04, 0x02, 0x00, 0x10, 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, - 0x04, 0x00, 0x00, 0x14, 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x1c, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x60, 0x11, 0xff, 0xff, 0xff, 0xff, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x09, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x01, 0xf7, 0xf4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x04, 0x00, 0x07, 0xf6, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x83, 0x30, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x60, 0xd6, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x59, 0xb8, 0x08, 0xea, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0xac, 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xfa, 0x04, 0x00, 0x00, 0x1b, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x18, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x29, 0x04, 0x02, 0x00, 0x12, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0x30, 0x08, 0x07, 0x84, 0x04, 0x0d, 0x26, 0x48, 0x06, 0x60, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x00, 0x7b, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x40, 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x00, 0x00, 0x08, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x04, 0x00, 0x07, 0xf4, 0x59, 0x88, 0x00, 0x53, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0x53, 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x40, - 0x42, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x5a, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xb5, 0xb1, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x30, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x59, 0xd8, 0x4a, 0x03, 0x70, 0xe4, - 0x02, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x41, 0x30, 0x08, 0x00, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xe4, 0x49, 0x33, 0xc8, 0x57, - 0x81, 0x32, 0x61, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf8, 0x35, 0x40, 0x00, 0x28, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xb4, 0x04, 0x01, 0xf8, 0xae, 0x04, 0x00, 0x00, 0x07, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x59, 0x30, 0x04, 0x14, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x8a, 0xfb, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x81, 0x32, 0x61, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf8, 0xa1, - 0x04, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x08, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x4e, 0x48, 0x02, 0x5a, 0x08, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0xe0, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x5f, 0xc8, 0x57, 0x5c, 0x00, 0x00, 0x00, 0x4d, 0x78, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb8, 0x00, - 0x00, 0x00, 0x80, 0x05, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x04, 0xf4, - 0x49, 0x33, 0xc8, 0x57, 0x83, 0x30, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x30, 0x0c, 0x00, - 0x00, 0x10, 0xb0, 0x9b, 0x50, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x10, 0x02, 0x44, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf7, 0xf4, 0x48, 0x07, 0xc8, 0x56, - 0x59, 0xb8, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x07, 0xfd, - 0x59, 0xb8, 0x00, 0xe0, 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x42, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x41, 0x30, 0x08, 0x00, 0x04, 0x01, 0xf0, 0x2d, 0x82, 0x00, 0x05, 0x00, - 0xf0, 0x00, 0x00, 0x00, 0x82, 0x04, 0x0d, 0x00, 0x0f, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0xc8, 0x57, 0x59, 0xb8, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x00, 0x03, 0x48, 0x07, 0x70, 0xe1, - 0x1c, 0x01, 0xf0, 0x00, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x07, 0xfa, - 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x09, 0x5c, 0x00, 0x08, 0x00, - 0x82, 0x10, 0x04, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x17, 0xf4, - 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xfe, 0xbf, 0x5c, 0x00, 0x08, 0x00, - 0x04, 0x01, 0xf7, 0xf0, 0x59, 0xb8, 0x00, 0xe2, 0x59, 0xb8, 0x20, 0xe2, - 0x80, 0x10, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x80, 0x10, 0x21, 0x14, - 0x04, 0x01, 0xf0, 0x06, 0x59, 0xb8, 0x00, 0xe2, 0x59, 0xb8, 0x20, 0xe2, - 0x80, 0x10, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x04, 0x01, 0xf0, 0x01, - 0x40, 0x10, 0x18, 0x00, 0x80, 0x0c, 0x19, 0x0a, 0x82, 0x10, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x82, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x80, 0x0c, 0x24, 0x80, 0x82, 0x10, 0x25, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x00, 0xf0, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x0d, 0x00, 0x0f, 0xff, 0xff, 0xff, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x07, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xd2, - 0x50, 0x08, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x00, 0x03, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x00, 0x10, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x59, 0xb8, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x00, 0x0c, 0x04, 0x01, 0xff, 0xd5, - 0x82, 0x10, 0x04, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x07, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xfe, 0x8b, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf0, 0x20, - 0x59, 0xb8, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x00, 0x1d, - 0x4a, 0x03, 0x70, 0xe4, 0x00, 0x30, 0x00, 0x00, 0x48, 0x07, 0x70, 0xe1, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x08, 0x10, 0x40, - 0x04, 0x00, 0x00, 0x12, 0x59, 0xb8, 0x08, 0xe4, 0x8c, 0x04, 0x0d, 0x28, - 0x04, 0x02, 0x07, 0xfc, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xd2, - 0x50, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x00, 0x00, 0x02, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x44, 0x00, 0x10, 0x00, 0x8c, 0x04, 0x0d, 0x2c, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0xf8, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x80, 0x08, 0x10, 0x40, 0x04, 0x02, 0x07, 0xd3, - 0x41, 0xf8, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x38, 0x00, 0x00, 0x59, 0x30, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0x06, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x70, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x01, 0x59, 0xc8, 0xa0, 0x20, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x02, 0x59, 0xc8, 0x08, 0x20, 0x8c, 0x50, 0xa5, 0x2e, - 0x04, 0x00, 0x00, 0x02, 0x90, 0x04, 0x09, 0xc0, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x59, 0xaa, - 0x5c, 0x00, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xff, 0xf0, - 0x04, 0x00, 0x00, 0x45, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, - 0x59, 0xc8, 0x20, 0x21, 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x01, - 0x59, 0xc8, 0x28, 0x21, 0x82, 0x14, 0x2d, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x37, - 0x59, 0x32, 0x68, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xf8, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x8a, 0xe3, 0x59, 0x9c, 0x00, 0x19, - 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x02, 0x00, 0x18, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0xf8, 0x04, 0x02, 0x00, 0x15, 0x59, 0x30, 0x08, 0x11, - 0x48, 0x07, 0xc8, 0x57, 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x1c, - 0x04, 0x02, 0x00, 0x0e, 0x84, 0x00, 0x05, 0x5c, 0x48, 0x02, 0x5c, 0x08, - 0x59, 0x2c, 0x0a, 0x04, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x00, 0x03, - 0x59, 0x30, 0x08, 0x11, 0x48, 0x06, 0x58, 0x03, 0x4a, 0x02, 0x60, 0x11, - 0x7f, 0xff, 0xff, 0xff, 0x48, 0x16, 0x60, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0f, 0xf8, 0x04, 0x02, 0x00, 0x14, 0x04, 0x01, 0xfa, 0x07, - 0x40, 0x28, 0x00, 0x00, 0x48, 0x02, 0x60, 0x0d, 0x04, 0x00, 0x00, 0x05, - 0x48, 0x32, 0x60, 0x0b, 0x50, 0x20, 0x00, 0x00, 0x48, 0x02, 0x60, 0x0a, - 0x48, 0x22, 0x60, 0x0c, 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x1c, - 0x04, 0x02, 0x00, 0x04, 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x02, 0x08, 0x6e, 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x40, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x88, 0x00, 0x53, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x53, - 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x40, 0x42, 0x00, 0x00, 0x00, - 0xc0, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0x26, 0x4c, 0xf8, 0x00, 0x00, - 0x58, 0xf4, 0x00, 0x00, 0x80, 0x01, 0xf5, 0x40, 0x04, 0x01, 0xf8, 0x20, - 0x41, 0x78, 0x18, 0x00, 0x04, 0x01, 0xf8, 0xe7, 0x04, 0x02, 0x00, 0x14, - 0x44, 0x14, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x2a, 0x04, 0x00, 0x00, 0x11, - 0x40, 0x04, 0x38, 0x00, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x14, 0x20, 0x00, 0x04, 0x01, 0xf8, 0xde, 0x04, 0x02, 0x00, 0x0b, - 0x80, 0x1c, 0x38, 0x00, 0x50, 0x1c, 0x00, 0x00, 0x44, 0x00, 0x08, 0x00, - 0x04, 0x01, 0xf8, 0x10, 0x80, 0x1c, 0x05, 0x80, 0x04, 0x00, 0x00, 0x04, - 0x44, 0x10, 0x38, 0x00, 0x80, 0x1c, 0x38, 0x40, 0x44, 0x14, 0x38, 0x00, - 0x04, 0x01, 0xf8, 0x19, 0x5c, 0x01, 0xf0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0xf9, 0xf1, 0xc0, 0x04, 0x02, 0x00, 0x03, 0x58, 0xf4, 0x12, 0x02, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0xf9, 0xf1, 0xc0, 0x04, 0x02, 0x00, 0x06, - 0x58, 0xf4, 0x04, 0x01, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x80, 0xf4, 0x04, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x58, 0xf8, 0x04, 0x01, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x02, 0x80, 0xf8, 0x04, 0x00, - 0x50, 0x00, 0x28, 0x00, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, 0x20, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0xf9, 0xf1, 0xc0, 0x04, 0x02, 0x00, 0x08, - 0x58, 0xf4, 0x04, 0x01, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x01, 0xec, 0x01, - 0x04, 0x01, 0xf0, 0x0b, 0x58, 0xf8, 0x04, 0x01, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x01, 0xf4, 0x01, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x09, 0x58, 0xf4, 0x02, 0x02, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x01, 0xea, 0x02, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x40, 0xfa, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x49, 0x79, 0xe8, 0x00, - 0x41, 0x79, 0xf0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0xf5, 0xe9, 0xc0, 0x04, 0x00, 0x00, 0x09, 0x80, 0xf9, 0xf1, 0xc0, - 0x04, 0x02, 0x0f, 0xf5, 0x4d, 0x2c, 0x00, 0x00, 0x40, 0xf6, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x41, 0x79, 0xe8, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0xf4, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xf8, 0x04, 0x02, 0x00, 0x36, - 0x59, 0x30, 0x08, 0x07, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x31, 0x00, - 0x04, 0x02, 0x00, 0x32, 0x8c, 0x04, 0x0d, 0x22, 0x04, 0x00, 0x00, 0x32, - 0x59, 0x30, 0x00, 0x1f, 0x80, 0x01, 0xed, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x29, 0x58, 0xf4, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0xdc, 0xb3, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0xf4, 0x0a, 0x02, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfe, - 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xff, 0x86, 0x58, 0xf4, 0x0a, 0x02, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x04, 0x02, 0x10, 0x59, - 0x80, 0x04, 0x08, 0x00, 0x48, 0x05, 0xea, 0x02, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x5d, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x0a, 0x58, 0xf4, 0x00, 0x00, - 0x80, 0x01, 0xed, 0x40, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0xf4, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xdd, 0xb9, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x58, 0xf4, 0x04, 0x01, - 0x82, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x48, 0x05, 0xec, 0x01, - 0x80, 0xf4, 0x04, 0x00, 0x59, 0x30, 0x08, 0x12, 0x44, 0x04, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x45, 0x78, 0x00, 0x00, 0x5c, 0x01, 0xe8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x59, 0xb8, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x24, 0x04, 0x02, 0x00, 0x23, - 0x4a, 0x03, 0x70, 0xe4, 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x59, 0xb8, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x24, 0x04, 0x02, 0x00, 0x1b, - 0x59, 0x30, 0x08, 0x07, 0x84, 0x04, 0x0d, 0x62, 0x48, 0x06, 0x60, 0x07, - 0x4a, 0x03, 0x70, 0xe4, 0x00, 0x02, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x25, - 0x49, 0x2e, 0x60, 0x1f, 0x4a, 0x02, 0x5a, 0x01, 0x00, 0x00, 0xdc, 0xb3, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x1d, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x0c, 0x08, 0x0f, 0x48, 0x06, 0x58, 0x03, - 0x59, 0x30, 0x18, 0x11, 0x40, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x0d, 0x49, 0x7a, 0x5a, 0x02, 0x4a, 0x02, 0x5c, 0x01, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x11, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x10, 0x40, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf7, 0xd6, 0x4a, 0x02, 0x5a, 0x02, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x5c, 0x01, 0x00, 0x00, 0x00, 0x06, 0x49, 0x7a, 0x58, 0x04, - 0x40, 0x0c, 0x00, 0x00, 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x58, 0x05, - 0x41, 0x2d, 0xe8, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xa9, - 0x5c, 0x02, 0x58, 0x00, 0x4a, 0x02, 0x60, 0x1f, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x01, 0xf7, 0xc3, 0x4d, 0x2c, 0x00, 0x00, 0x58, 0xf6, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x40, 0xf6, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf7, 0xf5, 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x07, 0xf8, 0x4a, 0x02, 0x5a, 0x01, - 0x00, 0x00, 0xdd, 0xb9, 0x4a, 0x02, 0x5c, 0x01, 0x00, 0x00, 0x00, 0x02, - 0x49, 0x2d, 0xe8, 0x00, 0x41, 0x2d, 0xe8, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf7, 0xa5, 0x04, 0x01, 0xff, 0x30, 0x82, 0xf4, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x80, 0x0c, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, - 0x50, 0x04, 0x00, 0x00, 0x80, 0x10, 0x05, 0x80, 0x04, 0x00, 0x00, 0x16, - 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x08, 0x10, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x80, 0xf9, 0xf1, 0xc0, 0x04, 0x00, 0x00, 0x11, - 0x58, 0xf4, 0x12, 0x02, 0x82, 0x08, 0x14, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x82, 0xf8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x0c, 0x04, 0x00, - 0x40, 0x00, 0x08, 0x00, 0x50, 0x04, 0x00, 0x00, 0x80, 0x10, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x80, 0x08, 0x10, 0x40, 0x04, 0x02, 0x07, 0xfa, 0x04, 0x01, 0xf0, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xfd, 0x4c, 0xf4, 0x00, 0x00, 0x4c, 0xf8, 0x00, 0x00, - 0x40, 0x01, 0xe8, 0x00, 0x59, 0x2c, 0x0a, 0x06, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x21, 0x82, 0xf4, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x1b, 0x58, 0xf4, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0xdc, 0xb3, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0xf4, 0x00, 0x00, 0x80, 0x01, 0xf5, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x58, 0xf8, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xdd, 0xb9, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x41, 0x78, 0x38, 0x00, - 0x58, 0xf4, 0x40, 0x03, 0x04, 0x01, 0xf8, 0x3d, 0x04, 0x02, 0x00, 0x09, - 0x04, 0x01, 0xff, 0x2e, 0x49, 0x7a, 0x60, 0x1f, 0x59, 0x30, 0x08, 0x07, - 0x84, 0x04, 0x0d, 0x22, 0x48, 0x06, 0x60, 0x07, 0x5c, 0x01, 0xf0, 0x00, - 0x5c, 0x01, 0xe8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xff, 0x26, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf7, 0xf6, - 0x82, 0xf4, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, 0x04, 0x02, 0x0f, 0x20, - 0x04, 0x01, 0xf7, 0xf2, 0x4c, 0xf4, 0x00, 0x00, 0x4c, 0xf8, 0x00, 0x00, - 0x40, 0x01, 0xe8, 0x00, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x20, 0x82, 0xf4, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x1a, 0x58, 0xf4, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0xdc, 0xb3, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0xf4, 0x00, 0x00, 0x80, 0x01, 0xf5, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x58, 0xf8, 0x02, 0x01, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xdd, 0xb9, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x41, 0x78, 0x38, 0x00, - 0x58, 0xf4, 0x40, 0x03, 0x04, 0x01, 0xf8, 0x13, 0x04, 0x02, 0x00, 0x08, - 0x04, 0x01, 0xff, 0x04, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7a, 0x60, 0x1f, 0x5c, 0x01, 0xf0, 0x00, 0x5c, 0x01, 0xe8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xfe, 0xfd, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf7, 0xf9, 0x4c, 0x04, 0x00, 0x00, - 0x82, 0xf4, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, 0x04, 0x02, 0x0e, 0xf6, - 0x5c, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xf3, 0x48, 0x03, 0xc8, 0x56, - 0x40, 0x1c, 0x20, 0x00, 0x41, 0x78, 0x18, 0x00, 0x4c, 0x20, 0x00, 0x00, - 0x04, 0x01, 0xff, 0x86, 0x5c, 0x00, 0x40, 0x00, 0x04, 0x02, 0x00, 0x2c, - 0x40, 0x20, 0x20, 0x00, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xff, 0x80, 0x04, 0x02, 0x00, 0x27, 0x04, 0x01, 0xfe, 0xae, - 0x40, 0x08, 0x28, 0x00, 0x82, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x40, 0x00, 0x30, 0x00, 0x50, 0x18, 0x20, 0x00, 0x40, 0x10, 0x00, 0x00, - 0x80, 0x1c, 0x05, 0x80, 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xff, 0x73, 0x04, 0x02, 0x00, 0x1a, - 0x82, 0x18, 0x34, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x14, 0x28, 0x40, - 0x04, 0x02, 0x07, 0xf5, 0x80, 0xf9, 0xf1, 0xc0, 0x04, 0x00, 0x00, 0x13, - 0x58, 0xf4, 0x2a, 0x02, 0x82, 0x14, 0x2c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x82, 0xf8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x40, 0x00, 0x30, 0x00, - 0x50, 0x18, 0x20, 0x00, 0x40, 0x10, 0x00, 0x00, 0x80, 0x1c, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xff, 0x5f, 0x04, 0x02, 0x00, 0x06, 0x82, 0x18, 0x34, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x80, 0x14, 0x28, 0x40, 0x04, 0x02, 0x07, 0xf5, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xfd, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x38, 0x02, 0x07, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0xfc, - 0x50, 0x20, 0x00, 0x00, 0x80, 0x38, 0x7c, 0x00, 0x58, 0x3c, 0x28, 0x00, - 0x58, 0x3c, 0x20, 0x01, 0x58, 0x38, 0x04, 0x04, 0x80, 0x00, 0x15, 0x40, - 0x04, 0x02, 0x00, 0x02, 0x58, 0x38, 0x14, 0x07, 0x58, 0xc8, 0x34, 0x01, - 0x58, 0x38, 0x0c, 0x08, 0x59, 0x30, 0x38, 0x07, 0x49, 0x7a, 0x60, 0x12, - 0x49, 0x7a, 0x60, 0x13, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x00, 0xb3, - 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0xea, - 0x59, 0x2c, 0x04, 0x09, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x07, 0xe7, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x10, 0x11, - 0x58, 0x38, 0x00, 0x01, 0x80, 0x00, 0x75, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x38, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x00, 0x40, 0x00, 0x40, 0x04, 0x00, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x82, 0x04, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x02, 0x17, 0xf1, 0x80, 0x20, 0x44, 0x00, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x38, 0x7c, 0x00, 0x58, 0x3c, 0x28, 0x00, 0x58, 0x3c, 0x20, 0x01, - 0x58, 0x3c, 0x10, 0x02, 0x59, 0x2c, 0x0a, 0x07, 0x59, 0x2c, 0x4c, 0x08, - 0x59, 0x2c, 0x30, 0x0d, 0x59, 0x30, 0x38, 0x07, 0x49, 0x7a, 0x60, 0x12, - 0x49, 0x7a, 0x60, 0x13, 0x48, 0x16, 0x60, 0x0e, 0x48, 0x12, 0x60, 0x0f, - 0x48, 0x0a, 0x60, 0x10, 0x48, 0x1a, 0x60, 0x11, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x06, 0x60, 0x0d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xbb, - 0x80, 0x20, 0x40, 0x00, 0x50, 0x20, 0x18, 0x00, 0x80, 0x0c, 0x19, 0xc0, - 0x04, 0x02, 0x00, 0x0c, 0x58, 0x38, 0x00, 0x01, 0x80, 0x00, 0x75, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x58, 0x38, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x0f, 0xd8, 0x50, 0x00, 0x40, 0x00, 0x50, 0x20, 0x18, 0x00, - 0x48, 0x3a, 0x60, 0x0b, 0x48, 0x0e, 0x60, 0x0a, 0x48, 0x22, 0x60, 0x0c, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x00, 0xbb, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x2c, 0x02, 0x08, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x02, 0x00, 0x17, - 0x50, 0x20, 0x00, 0x00, 0x80, 0x30, 0x6c, 0x00, 0x40, 0x24, 0x00, 0x00, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, - 0x00, 0x10, 0x0d, 0x91, 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, - 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, - 0x00, 0x10, 0x0d, 0x91, 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x91, - 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x91, - 0x00, 0x10, 0x0d, 0x88, 0x00, 0x10, 0x0d, 0x88, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x5a, 0x08, - 0x50, 0x20, 0x00, 0x00, 0x80, 0x30, 0x6c, 0x00, 0x58, 0x34, 0x38, 0x01, - 0x48, 0x1e, 0x60, 0x0f, 0x04, 0x01, 0xf0, 0x07, 0x58, 0x34, 0x18, 0x02, - 0x58, 0x34, 0x28, 0x00, 0x58, 0x34, 0x38, 0x01, 0x48, 0x0e, 0x60, 0x10, - 0x48, 0x16, 0x60, 0x0e, 0x48, 0x1e, 0x60, 0x0f, 0x04, 0x01, 0xf2, 0x1f, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x31, 0xf8, 0x08, 0x59, 0x30, 0x0a, 0x06, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x09, 0x06, - 0x04, 0x02, 0x00, 0x02, 0x80, 0x04, 0x08, 0x00, 0x48, 0x05, 0xfc, 0x06, - 0x4a, 0x02, 0x62, 0x06, 0x00, 0x00, 0x00, 0x02, 0x59, 0x2c, 0x04, 0x09, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x0b, - 0x04, 0x01, 0xf8, 0x36, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x05, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0xfc, 0x00, 0x00, 0x58, 0xfc, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x00, 0x0c, 0x58, 0xfc, 0x00, 0x0b, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x09, 0x58, 0xfc, 0x04, 0x07, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x58, 0xfc, 0x08, 0x0b, - 0x8c, 0x04, 0x0d, 0x16, 0x04, 0x00, 0x00, 0x17, 0x58, 0xfc, 0x00, 0x07, - 0x04, 0x01, 0xf0, 0x0a, 0x58, 0xfc, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x12, - 0x04, 0x02, 0x00, 0x14, 0x58, 0xfc, 0x0c, 0x09, 0x8c, 0x04, 0x0d, 0x16, - 0x04, 0x02, 0x00, 0x03, 0x5c, 0x01, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x58, 0xfc, 0x00, 0x0a, 0x59, 0x30, 0x08, 0x11, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x09, 0x59, 0x30, 0x00, 0x07, 0x84, 0x00, 0x05, 0x00, - 0x48, 0x02, 0x60, 0x07, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x5c, 0x01, 0xf8, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x01, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0xfd, 0xf8, 0x09, - 0x04, 0x01, 0xf7, 0xec, 0x04, 0x01, 0xf8, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0xb8, 0x08, 0xea, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x1e, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x1b, 0x59, 0x30, 0x04, 0x06, 0x4c, 0x00, 0x00, 0x00, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x41, 0x42, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x41, 0x30, 0x08, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x04, 0x01, 0xfc, 0xe1, - 0x5c, 0x00, 0x30, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x80, 0x18, 0x30, 0x40, 0x04, 0x02, 0x07, 0xf4, 0x42, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x41, 0x30, 0x08, 0x00, 0x04, 0x01, 0xfc, 0xd5, - 0x5c, 0x00, 0x00, 0x00, 0x48, 0x02, 0x64, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x00, 0x07, 0x84, 0x00, 0x05, 0x00, 0x48, 0x02, 0x60, 0x07, - 0x04, 0x01, 0xf7, 0xfc, 0x59, 0xc0, 0x00, 0x07, 0x4a, 0x03, 0x80, 0x06, - 0x30, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x07, 0xfe, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x4d, 0xc0, 0x00, 0x00, 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x20, 0x04, 0x01, 0xff, 0xf0, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x00, 0x04, 0x01, 0xff, 0xed, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x13, - 0x4a, 0x03, 0x88, 0x91, 0x00, 0x00, 0xff, 0xff, 0x49, 0x7b, 0x88, 0x80, - 0x49, 0x7b, 0x88, 0x92, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x90, - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x75, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xf8, 0x0e, - 0x5c, 0x03, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x4d, 0xe0, - 0x04, 0x01, 0xf8, 0x2d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x76, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xf8, 0x05, - 0x48, 0x17, 0x88, 0x92, 0x48, 0x0b, 0x88, 0x80, 0x5c, 0x03, 0x80, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x6f, 0xc8, 0x57, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x0b, 0x4c, 0x08, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x48, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x12, 0x65, 0x59, 0xa8, 0x00, 0x69, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x06, 0x59, 0xa8, 0x10, 0x6a, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x19, 0xf7, - 0x4a, 0x03, 0x88, 0x91, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x08, 0xd1, - 0x4a, 0x03, 0x70, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xc4, 0x10, 0x80, 0x49, 0x7b, 0x88, 0x80, 0x59, 0xc4, 0x28, 0x92, - 0x49, 0x7b, 0x88, 0x92, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x02, 0x60, 0x59, 0xc4, 0x18, 0xa4, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x10, 0x59, 0xc4, 0x18, 0x05, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x0e, 0x59, 0xc4, 0x18, 0xa4, - 0x82, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x0c, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x10, 0x04, 0x82, 0x0c, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x10, 0x03, 0x80, 0x10, 0x20, 0x40, - 0x04, 0x02, 0x07, 0xec, 0x49, 0x7b, 0x88, 0x91, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x10, 0x00, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x19, - 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x92, 0x50, 0x00, 0x18, 0x00, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x05, 0x80, 0x10, 0x20, 0x40, - 0x04, 0x02, 0x07, 0xf7, 0x5c, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf7, 0xf0, - 0x5c, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf7, 0xec, 0x48, 0x03, 0xc8, 0x56, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x0a, 0x04, 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xae, - 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xc6, 0x00, 0x10, 0x0e, 0xae, - 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xae, - 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xc6, 0x00, 0x10, 0x0e, 0xae, - 0x00, 0x10, 0x0e, 0xb0, 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xae, - 0x00, 0x10, 0x0e, 0xae, 0x00, 0x10, 0x0e, 0xae, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x3b, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x02, 0x0a, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x5f, 0x59, 0x2c, 0x1a, 0x07, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x0f, 0xd8, 0x50, 0x00, 0x10, 0x00, 0x50, 0x08, 0x00, 0x00, - 0x59, 0x30, 0x20, 0x13, 0x48, 0x02, 0x60, 0x0a, 0x49, 0x2e, 0x60, 0x0b, - 0x48, 0x0a, 0x60, 0x0c, 0x48, 0x0e, 0x60, 0x0d, 0x48, 0x12, 0x60, 0x12, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x00, 0x10, 0x00, 0x50, 0x08, 0x00, 0x00, 0x59, 0x2c, 0x1a, 0x07, - 0x48, 0x02, 0x60, 0x0a, 0x49, 0x2e, 0x60, 0x0b, 0x48, 0x0a, 0x60, 0x0c, - 0x48, 0x0e, 0x60, 0x0d, 0x49, 0x7a, 0x60, 0x12, 0x04, 0x01, 0xf7, 0xf2, - 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x02, 0x00, 0x41, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x3e, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x00, 0xc4, 0x59, 0x30, 0x00, 0x13, 0x59, 0x30, 0x10, 0x12, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0c, 0x42, 0x00, 0x78, 0x00, - 0x80, 0x00, 0x00, 0x05, 0x59, 0x2c, 0x12, 0x08, 0x82, 0x08, 0x05, 0x00, - 0xff, 0xff, 0x7f, 0xff, 0x48, 0x02, 0x5a, 0x08, 0x8c, 0x08, 0x15, 0x1e, - 0x04, 0x02, 0x00, 0x2d, 0x82, 0x3c, 0x7d, 0x40, 0x00, 0x00, 0x00, 0x20, - 0x04, 0x01, 0xf0, 0x2a, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x1f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0x30, 0x04, 0x14, 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x14, - 0x04, 0x02, 0x00, 0x07, 0x59, 0x9c, 0x18, 0x19, 0x8c, 0x0c, 0x1d, 0x12, - 0x04, 0x02, 0x00, 0x04, 0x82, 0x0c, 0x1d, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x1d, 0x59, 0x30, 0x20, 0x13, 0x04, 0x01, 0xf8, 0xff, - 0x04, 0x02, 0x00, 0x1a, 0x42, 0x00, 0x78, 0x00, 0x80, 0x00, 0x00, 0x05, - 0x59, 0x30, 0x50, 0x0d, 0x59, 0x2c, 0x02, 0x08, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x02, 0x00, 0x05, 0x82, 0x3c, 0x7d, 0x40, - 0x00, 0x00, 0x00, 0x20, 0x59, 0x30, 0x40, 0x0c, 0x04, 0x01, 0xf0, 0x04, - 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x5a, 0x08, 0x04, 0x01, 0xf8, 0xae, - 0x50, 0x20, 0x18, 0x00, 0x48, 0x0e, 0x60, 0x0a, 0x48, 0x32, 0x60, 0x0b, - 0x48, 0x22, 0x60, 0x0c, 0x48, 0x2a, 0x60, 0x0d, 0x48, 0x0f, 0xc8, 0x57, - 0x48, 0x33, 0xc8, 0x57, 0x48, 0x23, 0xc8, 0x57, 0x48, 0x2b, 0xc8, 0x57, - 0x80, 0x00, 0x05, 0x80, 0x48, 0x3e, 0x60, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x90, 0x00, 0x04, 0x81, 0x30, 0x05, 0x80, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x32, 0x58, 0x08, 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x59, 0x30, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xa4, 0x5c, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x00, 0x00, 0x10, 0x59, 0x2c, 0x00, 0x0f, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x02, 0x58, 0x07, 0x41, 0x78, 0x08, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, - 0x4a, 0x02, 0x5c, 0x06, 0x00, 0x00, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x04, 0x01, 0xf0, 0x15, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x4e, 0x48, 0x02, 0x5a, 0x08, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x02, 0x00, 0x09, 0x81, 0x18, 0x00, 0xca, 0x81, 0xc8, 0x0c, 0x00, - 0x58, 0x04, 0x09, 0x39, 0x59, 0x2c, 0x00, 0x0d, 0x80, 0x04, 0x04, 0x80, - 0x59, 0x2c, 0x08, 0x0f, 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x58, 0x0b, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0xe0, - 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x90, 0x00, 0x04, 0x81, 0x30, 0x05, 0x80, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x40, 0x48, 0x02, 0x5a, 0x08, - 0x04, 0x01, 0xf7, 0xbf, 0x49, 0x1b, 0xc8, 0x57, 0x49, 0xd3, 0xc8, 0x57, - 0x4d, 0xd0, 0x00, 0x00, 0x41, 0x78, 0x08, 0x00, 0x80, 0x07, 0xa0, 0xca, - 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x76, 0x00, 0x4a, 0x03, 0xa0, 0x05, - 0x80, 0x00, 0x00, 0x02, 0x02, 0x00, 0x48, 0x00, 0x00, 0x02, 0x06, 0xcf, - 0x59, 0xd0, 0x10, 0x06, 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x8c, 0x08, 0x15, 0x1e, 0x04, 0x00, 0x07, 0xf7, 0x59, 0xd0, 0x10, 0x06, - 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x02, 0x07, 0xf3, - 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x04, 0x08, 0x00, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xeb, - 0x5c, 0x03, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x1b, 0xc8, 0x57, - 0x49, 0xd3, 0xc8, 0x57, 0x4d, 0xd0, 0x00, 0x00, 0x41, 0x78, 0x08, 0x00, - 0x80, 0x07, 0xa0, 0xca, 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x76, 0x00, - 0x4a, 0x03, 0xa0, 0x05, 0x80, 0x00, 0x00, 0x01, 0x59, 0xd0, 0x00, 0x06, - 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x04, 0x08, 0x00, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xf8, - 0x5c, 0x03, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xd0, 0x00, 0x06, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x00, 0x1e, 0x59, 0x90, 0x28, 0x04, - 0x48, 0x17, 0xc8, 0x57, 0x80, 0x14, 0x29, 0xc0, 0x04, 0x00, 0x00, 0x13, - 0x59, 0x90, 0x00, 0x0a, 0x59, 0x90, 0x08, 0x0b, 0x59, 0x90, 0x10, 0x0c, - 0x59, 0x90, 0x18, 0x0d, 0x48, 0x00, 0x28, 0x0a, 0x48, 0x04, 0x28, 0x0b, - 0x48, 0x08, 0x28, 0x0c, 0x48, 0x0c, 0x28, 0x0d, 0x59, 0xd0, 0x00, 0x00, - 0x59, 0xd0, 0x08, 0x01, 0x59, 0xd0, 0x10, 0x02, 0x59, 0xd0, 0x18, 0x03, - 0x59, 0xd0, 0x20, 0x04, 0x48, 0x00, 0x28, 0x0e, 0x48, 0x04, 0x28, 0x0f, - 0x48, 0x08, 0x28, 0x10, 0x48, 0x0c, 0x28, 0x11, 0x48, 0x10, 0x28, 0x12, - 0x59, 0x90, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x48, 0x03, 0x20, 0x06, 0x4a, 0x03, 0xa0, 0x05, 0x30, 0x00, 0x00, 0x00, - 0x59, 0xd0, 0x00, 0x06, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x80, 0x20, 0x40, 0x00, 0x50, 0x20, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x28, 0x50, 0x40, 0x1c, 0x01, 0xf0, 0x00, - 0x58, 0x30, 0x00, 0x01, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0e, - 0x48, 0x02, 0x60, 0x0b, 0x40, 0x00, 0x60, 0x00, 0x58, 0x30, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x0f, 0xd8, 0x50, 0x00, 0x40, 0x00, 0x80, 0x20, 0x41, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x80, 0x28, 0x50, 0x40, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x00, 0x50, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0b, - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f, 0xd3, - 0x00, 0x10, 0x0f, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f, 0xd3, - 0x00, 0x10, 0x0f, 0xd2, 0x00, 0x10, 0x0f, 0xcf, 0x00, 0x10, 0x0f, 0xd3, - 0x00, 0x10, 0x0f, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x0f, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x0f, 0xd3, 0x00, 0x10, 0x0f, 0xd3, 0x00, 0x10, 0x0f, 0xd3, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f, 0xd3, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x13, 0xc8, 0x57, - 0x49, 0x2f, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x12, 0x60, 0x12, - 0x59, 0x2c, 0x52, 0x07, 0x80, 0x28, 0x51, 0xc0, 0x04, 0x00, 0x00, 0x4a, - 0x41, 0x2c, 0x60, 0x00, 0x04, 0x01, 0xf8, 0x4b, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x03, - 0x58, 0x30, 0x00, 0x0d, 0x80, 0x10, 0x24, 0x80, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x00, 0x45, 0x40, 0x04, 0x00, 0x00, 0x3f, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0b, 0x80, 0x30, 0x14, 0x00, - 0x58, 0x08, 0x00, 0x02, 0x80, 0x10, 0x24, 0x80, 0x04, 0x00, 0x10, 0x1e, - 0x80, 0x10, 0x21, 0xc0, 0x04, 0x00, 0x00, 0x09, 0x80, 0x28, 0x50, 0x40, - 0x04, 0x00, 0x00, 0x34, 0x80, 0x20, 0x40, 0x00, 0x04, 0x01, 0xf7, 0xf4, - 0x58, 0x30, 0x00, 0x01, 0x80, 0x00, 0x65, 0x40, 0x04, 0x00, 0x00, 0x2f, - 0x04, 0x01, 0xf7, 0xe6, 0x80, 0x28, 0x50, 0x40, 0x04, 0x00, 0x00, 0x2c, - 0x80, 0x20, 0x40, 0x00, 0x50, 0x20, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x0a, 0x58, 0x30, 0x00, 0x01, 0x80, 0x00, 0x65, 0x40, - 0x04, 0x00, 0x00, 0x25, 0x58, 0x30, 0x02, 0x04, 0x82, 0x00, 0x4d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x24, 0x44, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x20, 0x40, 0x00, 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x1e, - 0x48, 0x02, 0x5a, 0x08, 0x04, 0x01, 0xf0, 0x13, 0x80, 0x10, 0x20, 0x80, - 0x80, 0x10, 0x20, 0x00, 0x48, 0x12, 0x60, 0x10, 0x48, 0x13, 0xc8, 0x57, - 0x58, 0x08, 0x08, 0x02, 0x40, 0x10, 0x00, 0x00, 0x80, 0x04, 0x24, 0x80, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x58, 0x08, 0x00, 0x00, - 0x58, 0x08, 0x18, 0x01, 0x80, 0x10, 0x24, 0x00, 0x48, 0x12, 0x60, 0x0e, - 0x48, 0x0e, 0x60, 0x0f, 0x48, 0x13, 0xc8, 0x57, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x5e, 0x48, 0x02, 0x5a, 0x08, 0x48, 0x33, 0xc8, 0x57, - 0x48, 0x23, 0xc8, 0x57, 0x48, 0x2b, 0xc8, 0x57, 0x48, 0x32, 0x60, 0x0b, - 0x48, 0x22, 0x60, 0x0c, 0x48, 0x2a, 0x60, 0x0d, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x30, 0x02, 0x04, 0x82, 0x00, 0x4d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x24, 0x44, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x29, 0x04, 0x02, 0x00, 0x1b, 0x50, 0x20, 0x40, 0x00, - 0x59, 0x2c, 0x04, 0x09, 0x80, 0x00, 0x05, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x10, 0x11, 0x58, 0x30, 0x00, 0x01, 0x80, 0x00, 0x65, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x58, 0x30, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x0f, 0xd8, 0x50, 0x00, 0x40, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x17, 0xf1, 0x80, 0x20, 0x44, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xe0, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x0e, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x08, 0x4c, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, 0x59, 0xe4, 0xb8, 0x00, - 0x48, 0x5f, 0xc8, 0x57, 0x82, 0x5c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x04, 0x00, 0x00, 0x04, 0x59, 0xe4, 0x08, 0x62, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x5c, 0x05, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x8c, 0x5c, 0xbd, 0x0e, - 0x04, 0x02, 0x08, 0x07, 0x8c, 0x5c, 0xbd, 0x0c, 0x04, 0x02, 0x08, 0x09, - 0x8c, 0x5c, 0xbd, 0x0a, 0x04, 0x02, 0x08, 0x79, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xb0, 0xbb, 0x58, 0x3c, 0x00, 0x01, - 0x58, 0x3c, 0x08, 0x02, 0x80, 0x04, 0x05, 0x40, 0x04, 0x00, 0x00, 0x40, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xaf, 0xc5, 0x50, 0x06, 0x58, 0x00, - 0x59, 0x2c, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0xe4, 0x08, 0x50, 0x59, 0xe4, 0x18, 0x53, - 0x40, 0x0c, 0x00, 0x00, 0x80, 0x04, 0x04, 0x00, 0x59, 0xe4, 0x08, 0x52, - 0x48, 0x07, 0xc8, 0x57, 0x80, 0x04, 0x14, 0x80, 0x04, 0x02, 0x10, 0x08, - 0x40, 0x00, 0x10, 0x00, 0x48, 0x0b, 0xc8, 0x57, 0x4a, 0x00, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x04, 0x01, 0xf0, 0x2a, 0x59, 0xe4, 0x10, 0x50, 0x48, 0x0b, 0xc8, 0x57, - 0x49, 0x78, 0x78, 0x00, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, - 0x59, 0x2c, 0x00, 0x03, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x59, 0x2c, 0x00, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0a, 0x58, 0x03, - 0x59, 0x2c, 0x00, 0x07, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x07, - 0x59, 0x2c, 0x10, 0x07, 0x48, 0x0b, 0xc8, 0x57, 0x58, 0x3c, 0x00, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x80, 0x08, 0x04, 0x80, 0x04, 0x00, 0x10, 0x03, - 0x58, 0x3c, 0x10, 0x01, 0x48, 0x0b, 0xc8, 0x57, 0x58, 0x3c, 0x08, 0x02, - 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, 0x4a, 0x02, 0x58, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x58, 0x09, 0x00, 0x10, 0x10, 0xd8, - 0x48, 0x0a, 0x58, 0x07, 0x48, 0x06, 0x58, 0x08, 0x59, 0xe4, 0x00, 0x53, - 0x80, 0x00, 0x00, 0xc4, 0x48, 0x02, 0x58, 0x05, 0x41, 0x2c, 0x10, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x5c, 0x02, 0x58, 0x00, 0x4a, 0x03, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xaf, 0xc5, - 0x50, 0x3c, 0x78, 0x00, 0x4a, 0x00, 0x78, 0x02, 0x00, 0x00, 0x01, 0x00, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xb0, 0xbb, 0x58, 0x3c, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x78, 0x00, - 0x04, 0x01, 0xf0, 0x19, 0x49, 0x78, 0x78, 0x00, 0x58, 0x3c, 0x18, 0x06, - 0x58, 0x3c, 0x00, 0x05, 0x80, 0x0c, 0x18, 0x00, 0x48, 0x0c, 0x78, 0x06, - 0x80, 0x0c, 0x05, 0x80, 0x04, 0x02, 0x00, 0x02, 0x49, 0x78, 0x78, 0x06, - 0x58, 0x3c, 0x08, 0x07, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x0e, - 0x58, 0x3c, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x48, 0x00, 0x78, 0x08, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x09, 0x49, 0x78, 0x78, 0x08, - 0x58, 0x3c, 0x20, 0x06, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x58, - 0x59, 0xe4, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4a, 0x00, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x82, 0x04, 0x0d, 0x00, - 0x43, 0x00, 0x0f, 0x80, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x38, 0x00, 0x09, 0x48, 0x03, 0xc0, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x47, 0x58, 0x3a, 0x58, 0x08, 0x59, 0x2c, 0x00, 0x00, - 0x48, 0x00, 0x70, 0x08, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x02, - 0x49, 0x78, 0x70, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0xc3, - 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x3c, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x58, 0x30, 0x00, 0x0a, 0x80, 0x02, 0x5d, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x2e, 0x60, 0x08, - 0x4c, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x60, - 0x5c, 0x00, 0x60, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x30, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x02, 0x00, 0x10, 0x59, 0x30, 0x78, 0x0b, 0x58, 0x3c, 0x00, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0e, 0x48, 0x02, 0x60, 0x0b, - 0x40, 0x00, 0x78, 0x00, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x48, 0x00, 0x60, 0x03, 0x58, 0x3c, 0x00, 0x00, 0x48, 0x00, 0x60, 0x05, - 0x40, 0x30, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x04, 0x01, 0xf0, 0x0c, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x4c, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x00, 0x60, 0x00, 0x40, 0x32, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x2e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0x78, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xaf, 0xc6, - 0x58, 0x38, 0x08, 0x01, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x11, 0x58, 0x38, 0x60, 0x02, 0x58, 0x30, 0x00, 0x0a, - 0x81, 0x2c, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0d, 0x59, 0xe0, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x07, 0xfe, 0x59, 0xdc, 0x00, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x07, 0xf8, 0x4a, 0x00, 0x70, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x19, 0x58, 0x38, 0x60, 0x06, - 0x40, 0x30, 0x50, 0x00, 0x80, 0x30, 0x61, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x30, 0x00, 0x0a, 0x81, 0x2c, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x40, 0x30, 0x50, 0x00, 0x58, 0x30, 0x60, 0x00, - 0x04, 0x01, 0xf7, 0xf8, 0x40, 0x28, 0x00, 0x00, 0x80, 0x30, 0x05, 0x80, - 0x58, 0x30, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x48, 0x00, 0x50, 0x00, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x07, 0x48, 0x28, 0x70, 0x05, - 0x04, 0x01, 0xf0, 0x05, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x02, - 0x48, 0x00, 0x70, 0x05, 0x48, 0x00, 0x70, 0x06, 0x40, 0x32, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xaf, 0xc6, 0x58, 0x38, 0x00, 0x01, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x07, 0xc3, - 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x48, 0x07, 0x90, 0x00, 0x59, 0xc8, 0x00, 0x00, 0x80, 0x04, 0x05, 0x00, - 0x04, 0x02, 0x07, 0xfe, 0x49, 0x7b, 0x90, 0x05, 0x4a, 0x03, 0x90, 0x35, - 0x00, 0x88, 0x02, 0x00, 0x59, 0xa8, 0x00, 0x0d, 0x80, 0x00, 0x00, 0xe0, - 0x48, 0x03, 0x90, 0x0e, 0x4a, 0x03, 0x90, 0x11, 0x00, 0x00, 0x00, 0x24, - 0x4a, 0x03, 0x90, 0x0f, 0x00, 0x10, 0xd8, 0xd4, 0x4a, 0x03, 0x90, 0x10, - 0x00, 0x10, 0xd8, 0xd4, 0x4a, 0x03, 0x90, 0x15, 0x00, 0x00, 0x00, 0x7f, - 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x40, 0x4a, 0x03, 0x90, 0x00, - 0x00, 0x00, 0x16, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x08, 0xba, 0x59, 0xc8, 0x08, 0x00, - 0x8c, 0x04, 0x0d, 0x16, 0x04, 0x02, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x0c, 0x01, 0xf0, 0x05, 0x48, 0x07, 0xc8, 0x57, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x11, 0xc4, 0x00, 0x10, 0x11, 0xc2, 0x00, 0x10, 0x55, 0x12, - 0x00, 0x10, 0x11, 0xc2, 0x00, 0x10, 0x11, 0xc6, 0x00, 0x10, 0x11, 0xc2, - 0x00, 0x10, 0x11, 0xc6, 0x00, 0x10, 0x11, 0xc6, 0x00, 0x10, 0x11, 0xc2, - 0x00, 0x10, 0x11, 0xc2, 0x00, 0x10, 0x11, 0xc2, 0x00, 0x10, 0x11, 0xc2, - 0x00, 0x10, 0x11, 0xc6, 0x00, 0x10, 0x11, 0xc2, 0x00, 0x10, 0x11, 0xc6, - 0x00, 0x10, 0x11, 0xc2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x08, 0x0c, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x60, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x1b, - 0x04, 0x01, 0xf0, 0x06, 0x82, 0x04, 0x05, 0x00, 0x00, 0x7f, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0xed, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xfa, 0x04, 0x01, 0xf0, 0x2b, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x14, 0x04, 0x00, 0x00, 0x14, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x4a, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3d, 0xcb, 0x04, 0x01, 0xf0, 0x07, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf8, 0x17, - 0x04, 0x01, 0xf0, 0x15, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x29, - 0x04, 0x01, 0xf8, 0x10, 0x04, 0x01, 0xf0, 0x0e, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x01, 0x40, 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x3c, 0x04, 0x01, 0xf8, 0x09, 0x04, 0x01, 0xf0, 0x07, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x14, 0x04, 0x01, 0xf8, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, - 0x4c, 0x14, 0x00, 0x00, 0x04, 0x01, 0xfc, 0x0c, 0x5c, 0x00, 0x28, 0x00, - 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa8, 0x08, 0x04, - 0x59, 0xa8, 0x00, 0x28, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xf0, 0x00, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x50, 0x28, 0x59, 0xa8, 0x00, 0x2c, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x80, 0x04, 0x05, 0x40, - 0x48, 0x03, 0x50, 0x2c, 0x48, 0x07, 0x88, 0x82, 0x82, 0x04, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x80, 0x0c, 0x19, 0x08, 0x82, 0x0c, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x40, 0x0c, 0x20, 0x00, 0x90, 0x10, 0x29, 0xc0, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x01, 0xe4, 0x04, 0x02, 0x10, 0x05, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x10, 0x20, 0xc6, - 0x04, 0x01, 0xf0, 0x31, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x02, 0x30, - 0x04, 0x02, 0x10, 0x09, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x80, 0x10, 0x00, 0xc2, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x10, 0x04, 0x00, - 0x80, 0x10, 0x04, 0x00, 0x80, 0x10, 0x24, 0x00, 0x04, 0x01, 0xf0, 0x26, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x02, 0x98, 0x04, 0x02, 0x10, 0x08, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x10, 0x00, 0xc2, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x10, 0x04, 0x00, 0x80, 0x10, 0x24, 0x00, - 0x04, 0x01, 0xf0, 0x1c, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x03, 0x28, - 0x04, 0x02, 0x10, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x80, 0x10, 0x00, 0xc2, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x10, 0x24, 0x00, - 0x04, 0x01, 0xf0, 0x13, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x04, 0x04, - 0x04, 0x02, 0x10, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x80, 0x10, 0x20, 0xc4, 0x04, 0x01, 0xf0, 0x0c, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x05, 0x6c, 0x04, 0x02, 0x10, 0x06, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x10, 0x00, 0xc2, 0x80, 0x10, 0x24, 0x00, - 0x04, 0x01, 0xf0, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x80, 0x10, 0x20, 0xc2, 0x82, 0x10, 0x04, 0x80, 0x00, 0x00, 0x01, 0x10, - 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x20, 0x00, 0x80, 0x08, 0x00, 0xd0, - 0x80, 0x14, 0x05, 0x40, 0x80, 0x10, 0x05, 0x40, 0x48, 0x03, 0x90, 0x35, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x08, 0x15, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xe4, 0x40, 0x68, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x7c, 0x48, 0x07, 0x90, 0x00, 0x59, 0xc8, 0x00, 0x00, - 0x80, 0x04, 0x05, 0x00, 0x04, 0x02, 0x07, 0xfe, 0x8c, 0x04, 0x0d, 0x04, - 0x04, 0x00, 0x00, 0x03, 0x59, 0xc8, 0x00, 0x35, 0x48, 0x03, 0x90, 0x35, - 0x59, 0xc8, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x12, 0x00, - 0x48, 0x03, 0x90, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x49, 0x7b, 0x88, 0xa9, 0x4a, 0x03, 0x88, 0x07, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7b, 0x88, 0x07, 0x59, 0xc4, 0x00, 0x05, 0x48, 0x03, 0x88, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x7f, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x01, 0xf4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x49, 0x7b, 0x88, 0x0e, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x99, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x32, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xb4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x99, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xc4, 0x00, 0x05, 0x48, 0x03, 0x88, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x80, 0x00, 0x08, 0xd0, - 0x48, 0x07, 0x50, 0x51, 0x48, 0x07, 0x50, 0x52, 0x48, 0x07, 0x50, 0x53, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xd1, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x01, 0xd4, 0xc0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x04, 0x01, 0xfa, 0x3e, 0x4a, 0x03, 0x88, 0xa7, - 0x00, 0x00, 0xf7, 0xf7, 0x4a, 0x03, 0x88, 0xa3, 0x80, 0x00, 0x40, 0x3c, - 0x4a, 0x03, 0x88, 0xae, 0x00, 0x00, 0x61, 0xa8, 0x4a, 0x03, 0x88, 0x01, - 0x00, 0x03, 0x20, 0x63, 0x4a, 0x03, 0x88, 0x10, 0x00, 0x41, 0x01, 0x08, - 0x4a, 0x03, 0x88, 0x11, 0x00, 0x52, 0x06, 0x08, 0x4a, 0x03, 0x88, 0x12, - 0x00, 0x45, 0x03, 0x20, 0x4a, 0x03, 0x88, 0x13, 0x00, 0x44, 0x04, 0x05, - 0x4a, 0x03, 0x88, 0x1c, 0x00, 0x41, 0x32, 0xe1, 0x4a, 0x03, 0x88, 0x50, - 0x80, 0x00, 0x01, 0x08, 0x4a, 0x03, 0x88, 0x60, 0x00, 0x00, 0x00, 0x08, - 0x4a, 0x03, 0x88, 0x70, 0x00, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x88, 0x51, - 0x80, 0x00, 0x05, 0x08, 0x4a, 0x03, 0x88, 0x61, 0x00, 0x80, 0x00, 0x00, - 0x4a, 0x03, 0x88, 0x71, 0x00, 0x80, 0x00, 0x00, 0x4a, 0x03, 0x88, 0x52, - 0x80, 0x00, 0x07, 0x08, 0x4a, 0x03, 0x88, 0x62, 0x00, 0x80, 0x00, 0x00, - 0x4a, 0x03, 0x88, 0x72, 0x00, 0x80, 0x00, 0x00, 0x4a, 0x03, 0x88, 0x53, - 0x80, 0x00, 0x06, 0x08, 0x49, 0x7b, 0x88, 0x63, 0x4a, 0x03, 0x88, 0x73, - 0x00, 0x80, 0x00, 0x00, 0x4a, 0x03, 0x88, 0x82, 0x00, 0x00, 0x08, 0x40, - 0x4a, 0x03, 0x88, 0xa5, 0x00, 0x00, 0x00, 0xff, 0x4a, 0x03, 0x88, 0xa6, - 0x00, 0x00, 0x00, 0x1e, 0x4a, 0x03, 0x88, 0xb0, 0x00, 0x00, 0x75, 0x30, - 0x4a, 0x03, 0x88, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x03, 0x88, 0x06, - 0xc0, 0xe0, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x85, 0x0e, 0x1d, 0x4e, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xaf, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x99, 0x4c, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x84, 0x00, 0x05, 0x48, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xc1, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x38, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x5c, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x18, 0xa5, 0x59, 0xc4, 0x08, 0x05, 0x59, 0xc4, 0x00, 0x06, - 0x80, 0x04, 0x0d, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x82, 0x04, 0x05, 0x00, 0x00, 0xe0, 0x08, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x02, 0x08, 0xd5, 0x04, 0x01, 0xf0, 0x07, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x80, 0x08, 0x00, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xe4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x59, 0xc4, 0xb8, 0x05, - 0x59, 0xc4, 0x00, 0x06, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x02, 0x00, 0x8b, 0x48, 0x5f, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x1e, - 0x59, 0xc4, 0x00, 0x05, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x00, 0x00, 0x42, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xe4, - 0x04, 0x02, 0x00, 0x3f, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf0, 0x38, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x06, 0x48, 0x03, 0x50, 0x14, 0x42, 0x00, 0x60, 0x00, - 0xff, 0x20, 0x3f, 0xff, 0x42, 0x00, 0x68, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0xb0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x6d, 0x8c, 0x5c, 0xbd, 0x34, - 0x04, 0x02, 0x00, 0x27, 0x4a, 0x03, 0x50, 0x2f, 0x00, 0x00, 0xaa, 0xaa, - 0x59, 0xc4, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x02, 0x00, 0x12, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x13, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0xa8, 0x00, 0x16, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x02, 0x00, 0x07, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x12, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4e, 0xa0, 0x04, 0x01, 0xf0, 0x50, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x0b, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x08, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4e, 0x4a, 0x04, 0x01, 0xf0, 0x43, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4e, 0xfc, 0x04, 0x01, 0xf0, 0x40, - 0x8c, 0x5c, 0xbd, 0x34, 0x04, 0x00, 0x00, 0x3c, 0x59, 0xc4, 0x00, 0x05, - 0x8c, 0x00, 0x05, 0x3a, 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xe6, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x03, 0x88, 0x05, 0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x10, 0x4a, 0x03, 0x88, 0x05, - 0x04, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xd3, - 0x04, 0x02, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x60, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x7e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x19, 0x46, 0x40, 0x00, 0xc0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xc4, 0x83, 0x6c, 0x15, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x02, 0x00, 0x0c, 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x02, 0x00, 0x17, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x05, 0x59, 0xc4, 0x10, 0xa3, - 0x82, 0x08, 0x15, 0x40, 0x00, 0x00, 0x00, 0x08, 0x48, 0x0b, 0x88, 0xa3, - 0x59, 0xc4, 0x10, 0x06, 0x84, 0x08, 0x15, 0x40, 0x48, 0x0b, 0x88, 0x06, - 0x4a, 0x03, 0x88, 0x05, 0x04, 0x00, 0x00, 0x00, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x7b, 0x50, 0x13, 0x8d, 0x0e, 0x1d, 0x18, - 0x04, 0x02, 0x00, 0x05, 0x48, 0x03, 0xc8, 0x56, 0x85, 0x0e, 0x1d, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3d, 0xec, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0xea, 0x8c, 0x5c, 0xbd, 0x3c, 0x04, 0x02, 0x08, 0x58, - 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x00, 0x00, 0x36, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x99, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x03, 0x52, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x4c, 0x58, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x4d, 0x5c, 0x00, 0xb0, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf6, - 0x04, 0x01, 0xf0, 0x04, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x1f, 0x59, 0xc4, 0x00, 0x06, 0x84, 0x00, 0x05, 0x00, - 0x48, 0x03, 0x88, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, - 0x49, 0x7b, 0x88, 0x80, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0xd8, - 0x59, 0xc4, 0x00, 0x0d, 0x8c, 0x00, 0x05, 0x00, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0xa1, 0xe6, 0x59, 0xc4, 0x00, 0xa3, 0x82, 0x00, 0x05, 0x00, - 0xfc, 0xf8, 0xff, 0xff, 0x48, 0x03, 0x88, 0xa3, 0x4a, 0x03, 0x50, 0x49, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x05, 0xfc, 0x04, 0x01, 0xfb, 0x77, 0x49, 0x7b, 0x50, 0x4f, - 0x4a, 0x03, 0x50, 0x46, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xd4, 0x71, 0x82, 0x5c, 0xbd, 0x00, 0xbb, 0xff, 0xff, 0xfe, - 0x48, 0x5f, 0x88, 0x05, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x10, 0x04, 0x48, 0x0b, 0xc8, 0x57, - 0x8c, 0x08, 0x15, 0x00, 0x04, 0x00, 0x00, 0x06, 0x48, 0x03, 0xc8, 0x56, - 0x49, 0x7b, 0x28, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xed, - 0x04, 0x01, 0xf0, 0x0a, 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x01, 0xf0, - 0x04, 0x00, 0x00, 0x07, 0x48, 0x03, 0xc8, 0x56, 0x41, 0x7a, 0x30, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x41, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x68, 0x0f, 0x4a, 0x03, 0x88, 0x05, 0x80, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x08, 0xa3, 0x48, 0x07, 0xc8, 0x57, - 0x84, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x88, 0xa3, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, - 0x4d, 0x14, 0x00, 0x00, 0x4a, 0x03, 0x88, 0x05, 0x40, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x95, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x59, 0xc4, 0x10, 0x04, 0x8c, 0x08, 0x15, 0x00, 0x04, 0x00, 0x00, 0x55, - 0x59, 0x8e, 0x60, 0x0d, 0x49, 0x7b, 0x28, 0x07, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x32, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x32, 0x04, 0x02, 0x00, 0x2e, 0x59, 0x30, 0x00, 0x1c, - 0x48, 0x03, 0x88, 0x33, 0x4a, 0x03, 0x88, 0x07, 0x00, 0x01, 0x80, 0x00, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x49, 0x7b, 0x88, 0x07, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x64, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x75, 0x30, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x59, 0xc4, 0x08, 0xa4, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xaa, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x05, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x40, 0x02, 0x58, 0x00, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x31, 0xd8, 0x21, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x09, 0x08, 0x01, 0xf8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf0, 0x47, 0x59, 0x8c, 0x00, 0x0f, - 0x82, 0x00, 0x1c, 0x80, 0x00, 0x00, 0x00, 0xc8, 0x04, 0x02, 0x10, 0x10, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x18, 0x0f, 0x59, 0xc4, 0x00, 0xa4, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xaa, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x2c, 0x04, 0x01, 0xf0, 0x34, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x64, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x2f, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x27, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x04, 0x01, 0xf0, 0x28, - 0x8c, 0x08, 0x15, 0x08, 0x04, 0x00, 0x00, 0x26, 0x41, 0x7a, 0x30, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x2b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x41, 0x59, 0x92, 0x60, 0x04, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x13, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x68, 0xef, 0x04, 0x02, 0x00, 0x0e, - 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xaa, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x31, - 0x04, 0x01, 0xf0, 0x0c, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0x06, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x81, 0x0c, 0x0d, 0x80, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x47, 0x48, 0x03, 0xc8, 0x57, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x23, 0x85, 0x0e, 0x1d, 0x0e, - 0x49, 0x7b, 0x50, 0x49, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xdb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x12, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x11, - 0x59, 0xc4, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, 0x00, 0x01, 0x80, 0x00, - 0x82, 0x00, 0x1d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x1d, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x1d, 0x80, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xf4, - 0x85, 0x0e, 0x1d, 0x4e, 0x59, 0xa8, 0x08, 0x49, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x07, 0x59, 0xc4, 0x00, 0x0d, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf0, 0x02, 0x40, 0x04, 0x18, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0xf6, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x12, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x05, 0xfc, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x4c, - 0x04, 0x02, 0x00, 0x0c, 0x04, 0x01, 0xf8, 0x50, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0x42, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x80, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x00, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x49, 0x7b, 0x88, 0xac, 0x49, 0x7b, 0x88, 0xad, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfe, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x07, 0x50, 0x0f, 0x80, 0x04, 0x11, 0x08, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x49, 0x7b, 0x88, 0xac, - 0x80, 0x00, 0x05, 0x80, 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x06, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0xa3, 0x51, 0x50, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0xad, - 0x80, 0x08, 0x10, 0x40, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf5, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x08, 0x00, - 0x04, 0x01, 0xff, 0xeb, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xc4, 0x08, 0x92, 0x48, 0x07, 0xc8, 0x57, - 0x80, 0x04, 0x15, 0x80, 0x04, 0x00, 0x00, 0x10, 0x80, 0x04, 0x14, 0x80, - 0x04, 0x02, 0x10, 0x07, 0x80, 0x08, 0x10, 0x80, 0x80, 0x08, 0x10, 0x00, - 0x40, 0x08, 0xb0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, - 0x04, 0x01, 0xf0, 0x04, 0x40, 0x08, 0xb0, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x10, 0x48, 0x03, 0x88, 0x86, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfe, 0x49, 0x7b, 0x88, 0x86, 0x5c, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x10, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x05, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x9c, 0x1f, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x08, 0x6c, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x10, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x0b, 0x59, 0xc8, 0x08, 0x35, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x80, 0x04, 0x09, 0x10, - 0x80, 0x04, 0x08, 0x00, 0x59, 0xa8, 0x00, 0x69, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x5a, - 0x48, 0x07, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xc9, 0x88, 0x35, 0x82, 0xc5, 0x8d, 0x00, 0x00, 0x00, 0x1f, 0x00, - 0x80, 0xc5, 0x89, 0x10, 0x48, 0xc7, 0xc8, 0x57, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x50, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x50, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x50, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x50, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x3d, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x06, - 0x5c, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x15, 0xd2, - 0x00, 0x10, 0x15, 0xe5, 0x00, 0x10, 0x15, 0xf9, 0x00, 0x10, 0x15, 0xfb, - 0x00, 0x10, 0x16, 0x22, 0x00, 0x10, 0x16, 0x24, 0x00, 0x10, 0x16, 0x26, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xfa, 0x21, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf9, 0xb1, - 0x04, 0x01, 0xfa, 0xa7, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x3d, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x16, 0x27, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x5c, 0x4d, 0x49, 0x7b, 0x50, 0x42, 0x4a, 0x03, 0x50, 0x4d, - 0x00, 0x00, 0x00, 0x36, 0x4a, 0x03, 0x50, 0x4c, 0x00, 0x00, 0x00, 0x2a, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x3f, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf9, 0x9c, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x3d, 0x00, 0x00, 0x00, 0x06, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x16, 0x27, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5c, 0x4d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x03, 0x50, 0x4d, - 0x00, 0x00, 0x00, 0x36, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x3f, - 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xfa, 0x97, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x90, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x05, 0x41, 0x78, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf9, 0x74, 0x49, 0x7b, 0x50, 0x43, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x3d, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x16, 0x27, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5c, 0x4d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x3f, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x06, 0x5c, 0x00, 0x70, 0x00, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x16, 0x3d, 0x00, 0x10, 0x16, 0x5c, - 0x00, 0x10, 0x16, 0xb0, 0x00, 0x10, 0x16, 0xc7, 0x00, 0x10, 0x16, 0xde, - 0x00, 0x10, 0x16, 0xe7, 0x00, 0x10, 0x16, 0xe9, 0x04, 0x01, 0xfa, 0x10, - 0x04, 0x02, 0x00, 0x1b, 0x59, 0xa8, 0x10, 0x45, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xfa, 0x57, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x90, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x08, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x84, 0x08, 0x15, 0x40, 0x04, 0x01, 0xf0, 0x04, 0x84, 0x08, 0x15, 0x42, - 0x04, 0x01, 0xf0, 0x02, 0x84, 0x08, 0x15, 0x44, 0x48, 0x0b, 0x50, 0x45, - 0x4a, 0x03, 0x50, 0x3d, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, - 0x04, 0x01, 0xf8, 0xcb, 0x04, 0x01, 0xff, 0x82, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0x8f, 0x04, 0x00, 0x00, 0x52, 0x04, 0x01, 0xf9, 0xef, - 0x04, 0x02, 0x00, 0x2a, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xfa, 0x37, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x90, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x44, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, 0x04, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0xc4, 0x08, 0x01, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x01, 0x80, 0x00, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x36, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xfa, 0x21, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x90, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, - 0x04, 0x00, 0x00, 0x06, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0xa8, 0x00, 0x45, 0x84, 0x00, 0x05, 0x42, 0x04, 0x01, 0xf0, 0x03, - 0x59, 0xa8, 0x00, 0x45, 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x50, 0x45, - 0x59, 0xa8, 0x00, 0x42, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x42, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf8, 0x61, 0x04, 0x01, 0xf0, 0x1e, 0x49, 0x7b, 0x50, 0x42, - 0x59, 0xc4, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x01, 0x80, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x05, 0x41, 0x78, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf9, 0x51, 0x4a, 0x03, 0x50, 0x3f, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x04, 0x4a, 0x03, 0x50, 0x3d, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xff, 0x42, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0x3b, 0x04, 0x00, 0x00, 0x15, 0x59, 0xa8, 0x00, 0x4c, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0x50, 0x4c, 0x04, 0x01, 0xf9, 0x98, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x50, 0x3d, 0x00, 0x00, 0x00, 0x03, - 0x49, 0x7b, 0x50, 0x3e, 0x04, 0x01, 0xf0, 0x0c, 0x59, 0xa8, 0x00, 0x4c, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x03, 0x04, 0x01, 0xf8, 0x9e, - 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0x4b, 0x04, 0x01, 0xf8, 0x2f, - 0x49, 0x7b, 0x50, 0x42, 0x4a, 0x03, 0x50, 0x3f, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xff, 0x2b, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x24, - 0x04, 0x00, 0x00, 0x15, 0x04, 0x01, 0xf9, 0x84, 0x04, 0x02, 0x00, 0x0f, - 0x59, 0xa8, 0x00, 0x43, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x43, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x00, 0x0c, - 0x4a, 0x03, 0x50, 0x4f, 0x00, 0x00, 0x00, 0x0a, 0x49, 0x7b, 0x50, 0x46, - 0x59, 0xa8, 0x00, 0x45, 0x84, 0x00, 0x05, 0x5e, 0x48, 0x03, 0x50, 0x45, - 0x48, 0x03, 0xc8, 0x57, 0x04, 0x01, 0xf0, 0x05, 0x04, 0x01, 0xf8, 0x17, - 0x4a, 0x03, 0x50, 0x3f, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xff, 0x3d, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x0d, 0x04, 0x00, 0x00, 0x07, - 0x04, 0x01, 0xf9, 0x6d, 0x04, 0x02, 0x00, 0x03, 0x04, 0x01, 0xff, 0x1b, - 0x04, 0x01, 0xf0, 0x03, 0x04, 0x01, 0xf8, 0x0c, 0x04, 0x01, 0xff, 0x34, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0xa8, 0x00, 0x4d, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0x50, 0x4d, 0x04, 0x00, 0x08, 0x91, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf9, 0xa6, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x90, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf8, 0xf0, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x59, 0xc4, 0x08, 0x01, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x01, 0x80, 0x00, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x05, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x02, 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x6a, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x42, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x42, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x18, - 0x49, 0x7b, 0x50, 0x42, 0x59, 0xc4, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x01, 0x80, 0x00, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x4a, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf9, 0x55, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x90, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x90, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x9f, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x20, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x45, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xa8, 0x40, 0x44, 0x80, 0x20, 0x41, 0x02, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x23, 0x50, 0x44, - 0x80, 0x20, 0x45, 0x00, 0x04, 0x00, 0x07, 0xfa, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x08, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x05, 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x13, - 0x5c, 0x00, 0x40, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0x10, 0x00, 0x4a, 0x03, 0xc8, 0x40, 0x00, 0x10, 0xac, 0x3d, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x09, 0x40, 0x00, 0x00, 0x00, - 0x04, 0x01, 0x17, 0xff, 0x4a, 0x03, 0x50, 0x44, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0x50, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x08, 0x55, 0x82, 0x04, 0x0d, 0x80, 0x01, 0x39, 0x10, 0x77, - 0x04, 0x02, 0x00, 0x08, 0x59, 0xe0, 0x08, 0x13, 0x8c, 0x04, 0x0d, 0x00, - 0x04, 0x00, 0x00, 0x05, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x02, 0x41, 0x78, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x40, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x1d, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x01, 0xf8, 0xfc, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x01, 0xf9, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf8, 0xf4, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf8, 0xfb, 0x59, 0xc4, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xfe, 0x7f, 0xff, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x01, 0x59, 0xa8, 0x00, 0x51, - 0x80, 0x00, 0x01, 0x10, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x04, 0x01, 0xf8, 0xf0, 0x04, 0x01, 0xf0, 0x3c, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x01, 0xf8, 0xdc, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfb, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x01, 0xf8, 0xe3, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf8, 0xd4, 0x82, 0x04, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xdf, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x01, 0xf8, 0xdb, 0x59, 0xc4, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xfe, 0x7f, 0xff, 0x82, 0x00, 0x05, 0x40, 0x00, 0x01, 0x00, 0x00, - 0x48, 0x03, 0x88, 0x01, 0x59, 0xa8, 0x00, 0x53, 0x80, 0x00, 0x01, 0x10, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x01, 0xf8, 0xd0, - 0x04, 0x01, 0xf0, 0x1c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x01, 0xf8, 0xc0, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x01, 0xf8, 0xc7, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf8, 0xb8, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xdf, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x04, 0x01, 0xf8, 0xbf, 0x59, 0xc4, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xfe, 0x7f, 0xff, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x80, 0x00, 0x48, 0x03, 0x88, 0x01, 0x59, 0xa8, 0x00, 0x52, - 0x80, 0x00, 0x01, 0x10, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x04, 0x01, 0xf8, 0xb4, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x00, 0x00, 0x04, 0x01, 0xff, 0x96, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa8, 0x08, 0x55, - 0x82, 0x04, 0x0d, 0x80, 0x01, 0x39, 0x10, 0x77, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xe0, 0x08, 0x13, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x02, - 0x41, 0x78, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf9, 0x31, - 0x5c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x26, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x10, - 0x59, 0xa8, 0x00, 0x69, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf9, 0xe6, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x85, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x90, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x8c, 0x04, 0x01, 0xf0, 0x24, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xa8, 0x00, 0x69, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x01, 0xf9, 0xd3, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x72, 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0x6f, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x79, - 0x04, 0x01, 0xf0, 0x11, 0x59, 0xa8, 0x00, 0x69, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x04, 0x01, 0xf9, 0xc4, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x63, 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0x6f, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x68, 0x04, 0x01, 0xf1, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x00, 0x00, 0x04, 0x01, 0xff, 0xb7, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x00, 0x00, 0x29, 0x59, 0xc4, 0x00, 0x0d, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf8, 0x3d, 0x59, 0xc4, 0x00, 0x0d, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x02, 0x07, 0xf8, 0x59, 0xc4, 0x08, 0x08, - 0x84, 0x04, 0x0d, 0x50, 0x48, 0x07, 0x88, 0x08, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0xc8, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x00, 0x00, 0x17, 0x59, 0xc4, 0x00, 0x0d, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x02, 0x00, 0x14, 0x04, 0x01, 0xf8, 0x2b, 0x59, 0xc4, 0x00, 0x0d, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x02, 0x00, 0x10, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf8, 0x23, 0x04, 0x01, 0xf7, 0xfd, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x59, 0xc4, 0x00, 0x0d, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x05, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x04, 0x01, 0xf8, 0x15, 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfe, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0x01, 0xf8, 0x1c, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x0d, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x14, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x68, 0x08, 0x00, - 0x48, 0x07, 0x88, 0x0e, 0x59, 0xc4, 0x08, 0x0f, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x40, 0x05, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x08, 0x00, 0x40, 0x6c, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x04, 0x0d, 0x40, 0x84, 0x04, 0x0d, 0x40, - 0x48, 0x07, 0x88, 0x0e, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x80, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x82, 0x00, 0x0d, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x59, 0xc4, 0x08, 0xa3, - 0x04, 0x01, 0xf0, 0x06, 0x59, 0xc4, 0x08, 0xa3, 0x84, 0x04, 0x0d, 0x30, - 0x04, 0x01, 0xf0, 0x03, 0x59, 0xc4, 0x08, 0xa3, 0x84, 0x04, 0x0d, 0x32, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x88, 0xa3, 0x48, 0x07, 0x88, 0xa3, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x00, 0xa3, 0x84, 0x00, 0x05, 0x56, - 0x48, 0x03, 0x88, 0xa3, 0x84, 0x00, 0x05, 0x16, 0x48, 0x03, 0x88, 0xa3, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x5f, 0xc8, 0x57, 0x48, 0x63, 0xc8, 0x57, - 0x4c, 0x64, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, 0x48, 0x63, 0x50, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x4c, 0x04, 0x02, 0x00, 0x63, - 0x82, 0x60, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x0c, 0x42, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x04, 0x11, 0x10, 0x80, 0x08, 0x15, 0x80, 0x04, 0x00, 0x00, 0x1f, - 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0xff, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x59, 0xc4, 0x10, 0xa3, 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x04, 0x00, 0x00, 0x09, 0x59, 0xc4, 0x10, 0xa7, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x08, 0x15, 0x80, 0x00, 0x00, 0xff, 0x00, - 0x42, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x10, - 0x8d, 0x0e, 0x1d, 0x02, 0x04, 0x02, 0x00, 0x07, 0x8d, 0x0e, 0x1d, 0x00, - 0x04, 0x02, 0x00, 0x0c, 0x59, 0x9c, 0x10, 0x17, 0x8c, 0x08, 0x15, 0x1a, - 0x04, 0x00, 0x00, 0x37, 0x85, 0x0e, 0x1d, 0x42, 0x42, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x05, - 0x85, 0x0e, 0x1d, 0x40, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x41, 0x7a, 0x78, 0x00, 0x59, 0xa8, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x02, 0x00, 0x04, 0x8d, 0x0e, 0x1d, 0x0a, 0x04, 0x02, 0x00, 0x30, - 0x85, 0x0e, 0x1d, 0x4a, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x18, 0x09, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x15, - 0x4d, 0x40, 0x00, 0x00, 0x82, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x64, 0x30, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9c, 0x1c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5d, 0x72, 0x5c, 0x02, 0x80, 0x00, 0x59, 0x9c, 0x08, 0x17, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x10, 0x49, 0x3f, 0xc8, 0x57, - 0x49, 0x43, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x42, - 0x04, 0x01, 0xf0, 0x0b, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x09, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1f, 0x49, 0x7b, 0x88, 0x80, - 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x00, 0xc8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xff, 0x61, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0x68, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xff, 0x59, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfd, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0x60, 0x59, 0xc4, 0x08, 0xa8, - 0x04, 0x01, 0xff, 0x4b, 0x04, 0x01, 0xff, 0x4a, 0x59, 0xc4, 0x00, 0xa8, - 0x80, 0x04, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfb, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x88, 0x07, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7b, 0x88, 0x07, 0x59, 0xc4, 0x00, 0x05, 0x48, 0x03, 0x88, 0x05, - 0x49, 0x7b, 0x50, 0x69, 0x49, 0x7b, 0x50, 0x6a, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf8, 0x24, 0x04, 0x01, 0xf8, 0x2f, - 0x40, 0x40, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x40, 0x85, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x1d, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xf8, 0x18, 0x04, 0x01, 0xf8, 0x23, - 0x40, 0x40, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x40, 0x85, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x00, 0x11, 0x42, 0x00, 0x58, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xf8, 0x0b, - 0x04, 0x01, 0xf8, 0x16, 0x40, 0x40, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x40, 0x85, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x04, - 0x4a, 0x03, 0x50, 0x69, 0x00, 0x00, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x56, - 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0x50, 0x00, 0x04, 0x01, 0xf8, 0x12, - 0x04, 0x01, 0xf8, 0x38, 0x40, 0x34, 0x70, 0x00, 0x40, 0x34, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x3d, 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf8, 0x0b, 0x04, 0x01, 0xf8, 0x31, 0x40, 0x34, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x37, 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf8, 0x05, 0x04, 0x01, 0xf8, 0x1d, 0x04, 0x01, 0xf8, 0x35, - 0x40, 0x04, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x04, 0x01, 0xf8, 0x14, 0x40, 0x28, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x26, - 0x40, 0x2c, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x27, 0x40, 0x30, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x25, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x29, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf8, 0x26, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf0, 0x21, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x1d, - 0x04, 0x01, 0xf9, 0x2e, 0x4a, 0x03, 0xd0, 0x00, 0x00, 0x05, 0x00, 0x04, - 0x04, 0x01, 0xf9, 0x2b, 0x4a, 0x03, 0xd0, 0x00, 0x00, 0x05, 0x00, 0x05, - 0x04, 0x01, 0xf9, 0x28, 0x4a, 0x03, 0xd0, 0x00, 0x00, 0x05, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x0f, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf0, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xf0, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xf0, 0x1b, 0x04, 0x01, 0xf9, 0x12, 0x82, 0x08, 0x2c, 0x00, - 0x00, 0x10, 0xa3, 0x51, 0x50, 0x14, 0x28, 0x00, 0x82, 0x08, 0x15, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x13, 0x04, 0x01, 0xf9, 0x0b, - 0x80, 0x08, 0x10, 0x40, 0x80, 0x14, 0x29, 0x02, 0x40, 0x04, 0x00, 0x00, - 0x80, 0x14, 0x05, 0x00, 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0xd0, 0x00, - 0x00, 0x07, 0x00, 0x06, 0x04, 0x01, 0xf9, 0x03, 0x4a, 0x03, 0xd0, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x04, 0x01, 0xf0, 0x06, 0x4a, 0x03, 0xd0, 0x00, - 0x00, 0x07, 0x00, 0x04, 0x04, 0x01, 0xf8, 0xfd, 0x4a, 0x03, 0xd0, 0x00, - 0x00, 0x07, 0x00, 0x05, 0x04, 0x01, 0xf7, 0xec, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0x78, 0x08, 0x00, 0x82, 0x08, 0x2c, 0x00, 0x00, 0x10, 0xa3, 0x51, - 0x50, 0x14, 0x28, 0x00, 0x82, 0x08, 0x15, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf8, 0xf1, 0x4a, 0x03, 0xd0, 0x00, - 0x00, 0x05, 0x00, 0x01, 0x04, 0x01, 0xf8, 0xee, 0x59, 0xe8, 0x18, 0x00, - 0x80, 0x08, 0x10, 0x40, 0x80, 0x14, 0x29, 0x02, 0x8c, 0x0c, 0x1d, 0x06, - 0x04, 0x00, 0x00, 0x04, 0x40, 0x14, 0x00, 0x00, 0x80, 0x04, 0x0d, 0x40, - 0x04, 0x01, 0xf8, 0xe6, 0x4a, 0x03, 0xd0, 0x00, 0x00, 0x07, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0b, 0xc8, 0x57, - 0x48, 0x0b, 0x50, 0x6a, 0x59, 0xc4, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xef, 0xff, 0x48, 0x03, 0x88, 0x01, 0x41, 0x78, 0x18, 0x00, - 0x04, 0x01, 0xf8, 0xc4, 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xff, 0x7a, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x04, 0x01, 0xff, 0x7d, 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xff, 0x71, 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xff, 0x75, - 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xff, 0x6a, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xff, 0x6d, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xff, 0x64, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0xf5, 0x04, 0x01, 0xff, 0x67, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xff, 0x5b, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x04, 0x01, 0xff, 0x5e, 0x59, 0xa8, 0x10, 0x6a, - 0x04, 0x01, 0xf8, 0x65, 0x42, 0x00, 0x18, 0x00, 0x00, 0x02, 0x00, 0xf5, - 0x04, 0x01, 0xf8, 0x97, 0x59, 0xa8, 0x10, 0x6a, 0x04, 0x01, 0xf8, 0x79, - 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xff, 0x4b, - 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xff, 0x4f, 0x59, 0xc4, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x10, 0x00, 0x48, 0x03, 0x88, 0x01, - 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x15, 0x04, 0x01, 0xff, 0x3f, - 0x04, 0x01, 0xff, 0x4a, 0x40, 0x40, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x02, 0x4c, 0x00, 0x00, 0x00, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x01, 0xff, 0x34, 0x5c, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x68, 0x00, 0x04, 0x01, 0xff, 0x37, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x01, 0xff, 0x2b, 0x04, 0x01, 0xff, 0x36, - 0x40, 0x40, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfd, - 0x4c, 0x00, 0x00, 0x00, 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x01, 0xff, 0x20, 0x5c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x68, 0x00, - 0x04, 0x01, 0xff, 0x23, 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x01, 0xff, 0x17, 0x04, 0x01, 0xff, 0x22, 0x40, 0x40, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x40, 0x4c, 0x00, 0x00, 0x00, - 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xff, 0x0c, - 0x5c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x68, 0x00, 0x04, 0x01, 0xff, 0x0f, - 0x41, 0x78, 0x58, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xff, 0x03, - 0x04, 0x01, 0xff, 0x0e, 0x40, 0x40, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xbf, 0x4c, 0x00, 0x00, 0x00, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xfe, 0xf8, 0x5c, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x68, 0x00, 0x04, 0x01, 0xfe, 0xfb, 0x4a, 0x03, 0x88, 0x86, - 0x00, 0x00, 0x20, 0x20, 0x04, 0x01, 0xf0, 0x4c, 0x48, 0x0b, 0xc8, 0x57, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x01, 0x00, 0x00, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x2d, 0x04, 0x01, 0xf0, 0x0f, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x90, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x24, 0x04, 0x01, 0xf0, 0x06, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x80, 0x00, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x1e, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x0b, 0xc8, 0x57, 0x82, 0x08, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xa1, - 0x04, 0x01, 0xf8, 0x16, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc1, - 0x04, 0x01, 0xf8, 0x13, 0x04, 0x01, 0xf0, 0x11, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x08, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x04, 0x00, 0xa1, 0x04, 0x01, 0xf8, 0x0c, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x20, 0x00, 0xc1, 0x04, 0x01, 0xf8, 0x09, 0x04, 0x01, 0xf0, 0x07, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0xa1, 0x04, 0x01, 0xf8, 0x05, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x04, 0x01, 0xf8, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0f, 0xc8, 0x57, 0x41, 0x78, 0x58, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x41, 0x78, 0x68, 0x00, - 0x04, 0x01, 0xfe, 0xb7, 0x40, 0x0c, 0x68, 0x00, 0x80, 0x34, 0x69, 0x60, - 0x04, 0x01, 0xfe, 0xba, 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xfe, 0xb1, 0x40, 0x0c, 0x68, 0x00, 0x04, 0x01, 0xfe, 0xb5, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xfe, 0xac, - 0x04, 0x01, 0xfe, 0xb7, 0x40, 0x40, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x07, 0xfc, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, - 0x41, 0x78, 0xb8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, - 0x04, 0x02, 0x01, 0x02, 0x59, 0xa8, 0xc0, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x03, 0x8c, 0x60, 0xc5, 0x06, - 0x04, 0x00, 0x00, 0x0f, 0x8c, 0x60, 0xc5, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x8c, 0x60, 0xc5, 0x0e, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0xcb, 0x0c, - 0x04, 0x01, 0xf0, 0xf6, 0x04, 0x01, 0xf9, 0xe9, 0x04, 0x02, 0x00, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x04, - 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0xee, - 0x8c, 0x60, 0xc5, 0x04, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x50, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0xe9, 0x59, 0xa8, 0xc0, 0x0f, - 0x82, 0x60, 0xc5, 0x00, 0x00, 0x00, 0x00, 0xff, 0x59, 0xa8, 0x10, 0x12, - 0x8c, 0x08, 0x15, 0x00, 0x04, 0x00, 0x00, 0x5f, 0x8c, 0x08, 0x15, 0x02, - 0x04, 0x02, 0x00, 0x5d, 0x59, 0xa8, 0xb8, 0x1b, 0x82, 0x5c, 0x0d, 0x80, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0xb8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x80, 0x5c, 0x11, 0x04, 0x82, 0x08, 0x64, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x50, 0x30, 0x08, 0x00, 0x82, 0x5c, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x1b, 0x1a, - 0x00, 0x10, 0x1b, 0x15, 0x00, 0x10, 0x1b, 0x19, 0x00, 0x10, 0x1b, 0x17, - 0x80, 0x04, 0x09, 0x10, 0x04, 0x01, 0xf0, 0x04, 0x80, 0x04, 0x09, 0x30, - 0x04, 0x01, 0xf0, 0x02, 0x80, 0x04, 0x09, 0x20, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0xff, - 0x04, 0x00, 0x00, 0x0f, 0x4c, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x00, 0x08, 0x00, 0x80, 0x04, 0x09, 0x10, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x80, 0x5c, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x32, 0x80, 0x60, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x30, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x2e, 0x04, 0x01, 0xf0, 0x0a, - 0x83, 0x0c, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x2e, - 0x59, 0xa8, 0x10, 0x12, 0x84, 0x08, 0x15, 0x42, 0x48, 0x0b, 0x50, 0x12, - 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x2b, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x49, 0xda, 0x5c, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x1f, - 0x41, 0x7a, 0x88, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, - 0x04, 0x02, 0x00, 0x19, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xf9, - 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xc5, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x23, 0x04, 0x00, 0x00, 0x11, - 0x04, 0x01, 0xf0, 0x0e, 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, - 0x04, 0x02, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xc5, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x1e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xe7, 0x04, 0x00, 0x00, 0x03, 0x80, 0x5c, 0xb8, 0x00, - 0x04, 0x01, 0xf7, 0xb0, 0x48, 0x5f, 0x50, 0x1b, 0x04, 0x01, 0xf0, 0x88, - 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x85, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x59, 0xa8, 0x00, 0x1b, - 0x82, 0x00, 0x15, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x05, - 0x80, 0x00, 0x0d, 0x80, 0x40, 0x18, 0xb0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x04, 0x01, 0xf0, 0x09, 0x80, 0x18, 0xb4, 0x80, 0x04, 0x00, 0x10, 0x04, - 0x40, 0x00, 0x08, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf0, 0x04, - 0x4a, 0x03, 0x50, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x73, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x82, 0x04, 0x04, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x60, 0x45, 0x80, 0x04, 0x00, 0x00, 0x5e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x55, 0x04, 0x02, 0x00, 0x63, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x49, 0xda, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x02, 0x07, 0xd7, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x84, 0x5c, 0xbd, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x08, - 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x49, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb6, 0x04, 0x02, 0x00, 0x4e, - 0x04, 0x01, 0xf0, 0x02, 0x84, 0x5c, 0xbd, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xc5, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x02, 0x00, 0x06, 0x8d, 0x0e, 0x1d, 0x02, 0x04, 0x00, 0x00, 0x35, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x32, - 0x59, 0xa8, 0x10, 0x12, 0x8c, 0x08, 0x15, 0x02, 0x04, 0x00, 0x00, 0x25, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x44, 0x04, 0x00, 0x00, 0x34, - 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x43, 0x13, 0x04, 0x01, 0xf0, 0x2f, 0x04, 0x01, 0xf8, 0xf8, - 0x04, 0x00, 0x00, 0x2d, 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xb5, 0xb8, - 0x49, 0x36, 0x60, 0x09, 0x49, 0x7a, 0x60, 0x08, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x20, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1c, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x04, 0x01, 0xf0, 0x13, - 0x49, 0x37, 0xc8, 0x57, 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x1e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xe7, 0x04, 0x00, 0x00, 0x12, - 0x04, 0x01, 0xf0, 0x09, 0x59, 0xa8, 0x00, 0x12, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf8, 0xcf, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x23, 0x04, 0x00, 0x00, 0x09, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0x96, 0x4a, 0x03, 0x50, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x05, 0x49, 0x37, 0xc8, 0x57, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0x50, 0x1b, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x42, 0x00, 0x30, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0xb1, 0x04, 0x02, 0x00, 0x05, 0x04, 0x01, 0xf8, 0x05, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x50, 0x24, 0x00, 0x00, 0xff, 0xff, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0xd5, 0x04, 0x00, 0x00, 0x14, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x59, 0xa8, 0x00, 0x25, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x25, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0b, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, - 0x4c, 0x5c, 0x00, 0x00, 0x40, 0x08, 0xb8, 0x00, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0x07, 0xfd, 0x42, 0x00, 0x30, 0x00, 0x00, 0xff, 0xff, 0xfd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, 0x04, 0x02, 0x00, 0x1a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x17, - 0x49, 0x36, 0x60, 0x09, 0x59, 0x34, 0x00, 0x0a, 0x84, 0x00, 0x05, 0x44, - 0x48, 0x02, 0x68, 0x0a, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x05, - 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x02, - 0x48, 0xee, 0x60, 0x21, 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x48, 0x5e, 0x60, 0x1c, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x22, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf7, 0xfd, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x12, 0x59, 0x30, 0x50, 0x09, - 0x48, 0x2b, 0xc8, 0x57, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x0d, 0x04, 0x01, 0xf8, 0x13, 0x04, 0x02, 0x00, 0x0b, - 0x58, 0x28, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfc, - 0x04, 0x00, 0x00, 0x08, 0x59, 0xa8, 0x00, 0x1a, 0x80, 0x00, 0x00, 0x40, - 0x48, 0x03, 0xc8, 0x57, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0x50, 0x1a, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x25, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0xc8, 0x57, 0x04, 0x00, 0x17, 0xfc, - 0x48, 0x03, 0x50, 0x25, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x08, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x09, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x3f, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x80, 0x60, 0xc1, 0xc0, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x04, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x07, 0xf0, 0x41, 0x7a, 0x88, 0x00, 0x41, 0x44, 0x00, 0x00, - 0x81, 0xac, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, - 0x04, 0x00, 0x00, 0x1a, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x1e, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xce, 0xf7, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcf, 0x9c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0x05, - 0x49, 0x37, 0xc8, 0x57, 0x4a, 0x02, 0x6c, 0x00, 0x00, 0x00, 0x04, 0x04, - 0x04, 0x01, 0xf0, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x4f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd2, 0x8a, 0x81, 0x46, 0x88, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xe0, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x80, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x64, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x12, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x1f, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x1c, - 0x59, 0x34, 0xba, 0x02, 0x82, 0x5c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x48, 0x5f, 0xc8, 0x57, 0x41, 0x78, 0xc0, 0x00, 0x41, 0x78, 0xc8, 0x00, - 0x82, 0x60, 0x04, 0x00, 0x00, 0x10, 0xb5, 0xf0, 0x50, 0x00, 0x20, 0x00, - 0x80, 0x60, 0xc1, 0xc0, 0x04, 0x00, 0x00, 0x08, 0x82, 0x10, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x2d, 0x80, 0x00, 0x00, 0x00, 0xff, - 0x04, 0x00, 0x00, 0x0c, 0x80, 0x5c, 0x05, 0x80, 0x04, 0x00, 0x00, 0x0d, - 0x80, 0x10, 0x21, 0x10, 0x80, 0x64, 0xc8, 0x00, 0x82, 0x64, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x07, 0xf5, 0x80, 0x60, 0xc0, 0x00, - 0x82, 0x60, 0x05, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x02, 0x07, 0xeb, - 0x48, 0x13, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x12, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x00, 0x7e, 0xef, 0x00, 0x00, 0x7d, 0xe8, 0x00, 0x00, 0x7c, 0xe4, - 0x00, 0x00, 0x80, 0xe2, 0x00, 0x00, 0x7b, 0xe1, 0x00, 0x00, 0x80, 0xe0, - 0x00, 0x00, 0x80, 0xdc, 0x00, 0x00, 0x80, 0xda, 0x00, 0x00, 0x7a, 0xd9, - 0x00, 0x00, 0x80, 0xd6, 0x00, 0x00, 0x80, 0xd5, 0x00, 0x00, 0x80, 0xd4, - 0x00, 0x00, 0x80, 0xd3, 0x00, 0x00, 0x80, 0xd2, 0x00, 0x00, 0x80, 0xd1, - 0x00, 0x00, 0x79, 0xce, 0x00, 0x00, 0x78, 0xcd, 0x00, 0x00, 0x80, 0xcc, - 0x00, 0x00, 0x80, 0xcb, 0x00, 0x00, 0x80, 0xca, 0x00, 0x00, 0x80, 0xc9, - 0x00, 0x00, 0x80, 0xc7, 0x00, 0x00, 0x80, 0xc6, 0x00, 0x00, 0x77, 0xc5, - 0x00, 0x00, 0x76, 0xc3, 0x00, 0x00, 0x80, 0xbc, 0x00, 0x00, 0x80, 0xba, - 0x00, 0x00, 0x75, 0xb9, 0x00, 0x00, 0x80, 0xb6, 0x00, 0x00, 0x74, 0xb5, - 0x00, 0x00, 0x73, 0xb4, 0x00, 0x00, 0x72, 0xb3, 0x00, 0x00, 0x80, 0xb2, - 0x00, 0x00, 0x80, 0xb1, 0x00, 0x00, 0x80, 0xae, 0x00, 0x00, 0x71, 0xad, - 0x00, 0x00, 0x80, 0xac, 0x00, 0x00, 0x70, 0xab, 0x00, 0x00, 0x6f, 0xaa, - 0x00, 0x00, 0x6e, 0xa9, 0x00, 0x00, 0x80, 0xa7, 0x00, 0x00, 0x6d, 0xa6, - 0x00, 0x00, 0x6c, 0xa5, 0x00, 0x00, 0x6b, 0xa3, 0x00, 0x00, 0x6a, 0x9f, - 0x00, 0x00, 0x69, 0x9e, 0x00, 0x00, 0x68, 0x9d, 0x00, 0x00, 0x80, 0x9b, - 0x00, 0x00, 0x80, 0x98, 0x00, 0x00, 0x67, 0x97, 0x00, 0x00, 0x66, 0x90, - 0x00, 0x00, 0x65, 0x8f, 0x00, 0x00, 0x64, 0x88, 0x00, 0x00, 0x63, 0x84, - 0x00, 0x00, 0x62, 0x82, 0x00, 0x00, 0x80, 0x81, 0x00, 0x00, 0x80, 0x80, - 0x00, 0x00, 0x61, 0x7c, 0x00, 0x00, 0x60, 0x7a, 0x00, 0x00, 0x80, 0x79, - 0x00, 0x00, 0x5f, 0x76, 0x00, 0x00, 0x80, 0x75, 0x00, 0x00, 0x80, 0x74, - 0x00, 0x00, 0x80, 0x73, 0x00, 0x00, 0x80, 0x72, 0x00, 0x00, 0x80, 0x71, - 0x00, 0x00, 0x80, 0x6e, 0x00, 0x00, 0x5e, 0x6d, 0x00, 0x00, 0x80, 0x6c, - 0x00, 0x00, 0x5d, 0x6b, 0x00, 0x00, 0x5c, 0x6a, 0x00, 0x00, 0x5b, 0x69, - 0x00, 0x00, 0x80, 0x67, 0x00, 0x00, 0x5a, 0x66, 0x00, 0x00, 0x59, 0x65, - 0x00, 0x00, 0x58, 0x63, 0x00, 0x00, 0x57, 0x5c, 0x00, 0x00, 0x56, 0x5a, - 0x00, 0x00, 0x55, 0x59, 0x00, 0x00, 0x80, 0x56, 0x00, 0x00, 0x80, 0x55, - 0x00, 0x00, 0x54, 0x54, 0x00, 0x00, 0x53, 0x53, 0x00, 0x00, 0x52, 0x52, - 0x00, 0x00, 0x51, 0x51, 0x00, 0x00, 0x50, 0x4e, 0x00, 0x00, 0x4f, 0x4d, - 0x00, 0x00, 0x80, 0x4c, 0x00, 0x00, 0x80, 0x4b, 0x00, 0x00, 0x4e, 0x4a, - 0x00, 0x00, 0x4d, 0x49, 0x00, 0x00, 0x80, 0x47, 0x00, 0x00, 0x4c, 0x46, - 0x00, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x43, 0x00, 0x00, 0x80, 0x3c, - 0x00, 0x00, 0x80, 0x3a, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x80, 0x36, - 0x00, 0x00, 0x4b, 0x35, 0x00, 0x00, 0x80, 0x34, 0x00, 0x00, 0x4a, 0x33, - 0x00, 0x00, 0x49, 0x32, 0x00, 0x00, 0x48, 0x31, 0x00, 0x00, 0x80, 0x2e, - 0x00, 0x00, 0x47, 0x2d, 0x00, 0x00, 0x46, 0x2c, 0x00, 0x00, 0x45, 0x2b, - 0x00, 0x00, 0x44, 0x2a, 0x00, 0x00, 0x43, 0x29, 0x00, 0x00, 0x42, 0x27, - 0x00, 0x00, 0x80, 0x26, 0x00, 0x00, 0x80, 0x25, 0x00, 0x00, 0x41, 0x23, - 0x00, 0x00, 0x40, 0x1f, 0x00, 0x00, 0x3f, 0x1e, 0x00, 0x00, 0x3e, 0x1d, - 0x00, 0x00, 0x3d, 0x1b, 0x00, 0x00, 0x3c, 0x18, 0x00, 0x00, 0x80, 0x17, - 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x3b, 0x0f, 0x00, 0x00, 0x3a, 0x08, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x39, 0x02, 0x00, 0x00, 0x80, 0x01, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x38, 0x00, - 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x33, 0x00, - 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x2f, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x2d, 0x00, - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, - 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x23, 0x00, - 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1f, 0x00, - 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x1b, 0x00, - 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x19, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x17, 0x00, - 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00, - 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0f, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x2f, 0x40, 0x16, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0xa0, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x83, 0xa0, 0x05, 0x80, 0x00, 0x10, 0xac, 0x71, 0x04, 0x00, 0x00, 0x0c, - 0x49, 0x2f, 0xc8, 0x57, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x04, 0x01, 0xf0, 0x0f, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x83, 0xe0, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x50, 0x50, 0x00, 0x00, 0x80, 0x50, 0xa0, 0x00, 0x50, 0x50, 0x08, 0x00, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x05, 0x40, 0x44, 0x00, 0xa8, 0x00, - 0x80, 0x50, 0xa0, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xf7, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x02, 0x06, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x7f, 0x04, 0x02, 0x10, 0xc8, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x1e, 0x8d, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1f, 0x17, 0x00, 0x10, 0x1f, 0x39, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0x8d, 0x00, 0x10, 0x1f, 0x5b, - 0x00, 0x10, 0x1f, 0x6c, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1f, 0x79, 0x00, 0x10, 0x1f, 0x91, 0x00, 0x10, 0x1f, 0xa9, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1f, 0xd8, 0x00, 0x10, 0x20, 0x0a, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x20, 0x33, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x20, 0x8e, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x20, 0xa5, - 0x00, 0x10, 0x20, 0xd6, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x21, 0x0b, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x21, 0x5d, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x21, 0x62, 0x00, 0x10, 0x21, 0xe6, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x21, 0xed, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x21, 0xef, 0x00, 0x10, 0x22, 0x6d, - 0x00, 0x10, 0x23, 0xad, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x23, 0xbc, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x23, 0xd9, - 0x00, 0x10, 0x24, 0x2c, 0x00, 0x10, 0x24, 0x88, 0x00, 0x10, 0x24, 0x9b, - 0x00, 0x10, 0x24, 0xb9, 0x00, 0x10, 0x26, 0xfd, 0x00, 0x10, 0x2a, 0x86, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x2b, 0xc5, 0x00, 0x10, 0x2c, 0x39, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x2c, 0xa7, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x2d, 0x45, 0x00, 0x10, 0x2d, 0xf5, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x2e, 0x2c, 0x00, 0x10, 0x2e, 0x84, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x2e, 0xdc, 0x00, 0x10, 0x30, 0x42, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x30, 0x56, 0x00, 0x10, 0x30, 0xe1, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x31, 0x51, 0x00, 0x10, 0x31, 0x55, - 0x00, 0x10, 0x31, 0x74, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x32, 0x16, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x32, 0x43, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x32, 0x72, 0x00, 0x10, 0x1e, 0xcd, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x32, 0xd7, 0x00, 0x10, 0x34, 0x30, - 0x00, 0x10, 0x34, 0x8d, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x34, 0xf3, - 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x1e, 0xcd, 0x00, 0x10, 0x35, 0x48, - 0x00, 0x10, 0x35, 0xda, 0x00, 0x10, 0x1e, 0xcd, 0x48, 0xef, 0xc8, 0x57, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x45, - 0x48, 0xef, 0xc8, 0x57, 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xcb, 0x83, 0xa0, 0x05, 0x80, - 0x00, 0x10, 0xac, 0x71, 0x04, 0x00, 0x00, 0x0d, 0x58, 0xee, 0x58, 0x0a, - 0x4d, 0x2c, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x56, 0x41, 0xa2, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x40, 0xee, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x5c, 0x02, 0x58, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x04, 0x02, 0x60, 0x07, - 0x59, 0xa0, 0x00, 0x1d, 0x84, 0x00, 0x05, 0x42, 0x48, 0x03, 0x40, 0x1d, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x1e, 0xa1, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa0, 0x02, 0x06, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x40, 0x00, - 0x04, 0x00, 0x00, 0x06, 0x90, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x11, 0x48, 0x03, 0xc0, 0x11, 0x04, 0x01, 0xf0, 0x05, - 0x90, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x10, - 0x48, 0x03, 0xc0, 0x11, 0x04, 0x01, 0xf8, 0x44, 0x59, 0xe0, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x0c, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x42, 0x03, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x40, 0xee, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x59, 0xa0, 0x00, 0x1d, 0x84, 0x00, 0x05, 0x04, 0x48, 0x03, 0x40, 0x1d, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x00, - 0x59, 0xa0, 0x02, 0x06, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x40, 0x00, - 0x04, 0x00, 0x07, 0xf0, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xed, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x42, 0x06, - 0x00, 0x00, 0x40, 0x01, 0x04, 0x01, 0xf7, 0xc0, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x02, 0x04, 0x01, 0xf7, 0xbc, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x03, - 0x04, 0x01, 0xf7, 0xb8, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x42, 0x06, - 0x00, 0x00, 0x40, 0x05, 0x04, 0x01, 0xf7, 0xb4, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x06, 0x04, 0x01, 0xf7, 0xb0, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x0b, - 0x04, 0x01, 0xf7, 0xac, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x42, 0x06, - 0x00, 0x00, 0x40, 0x0c, 0x04, 0x01, 0xf7, 0xa8, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x42, 0x06, 0x00, 0x00, 0x40, 0x0c, 0x04, 0x01, 0xf7, 0xa4, - 0x58, 0xec, 0xa8, 0x0a, 0x80, 0x54, 0xa9, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0xa0, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x82, 0x54, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x59, 0xa0, 0x02, 0x06, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa0, 0x04, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa0, 0x02, 0x07, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xa0, 0x04, 0x07, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa0, 0x02, 0x08, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa0, 0x04, 0x08, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xa0, 0x02, 0x09, 0x48, 0x03, 0xc8, 0x57, 0x83, 0xe0, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x83, 0xa0, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x50, 0x50, 0x00, 0x00, - 0x44, 0x00, 0xa8, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x90, 0x00, 0x01, 0xc0, - 0x44, 0x00, 0xa8, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x50, 0xa0, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf8, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa0, 0x04, 0x06, 0x80, 0x00, 0x00, 0xc2, 0x59, 0xa0, 0x0a, 0x07, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x05, 0x40, 0x84, 0x00, 0x05, 0x40, - 0x59, 0xa0, 0x0c, 0x07, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x18, - 0x59, 0xa8, 0x08, 0x6c, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x02, 0x07, 0xbb, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x10, 0x00, 0x8c, 0x08, 0x15, 0x00, - 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x05, 0x48, 0x03, 0x00, 0x04, - 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0x5c, - 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0xa3, 0x48, 0x03, 0x88, 0x0e, - 0x04, 0x01, 0xf7, 0x55, 0x59, 0xa0, 0x04, 0x06, 0x80, 0x00, 0x00, 0xc2, - 0x59, 0xa0, 0x0c, 0x07, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x1a, - 0x59, 0xa8, 0x08, 0x6c, 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x02, 0x07, 0x9d, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x10, 0x00, 0x8c, 0x08, 0x15, 0x00, - 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x07, 0x48, 0x03, 0x00, 0x04, - 0x59, 0x80, 0x08, 0x05, 0x48, 0x07, 0x44, 0x06, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0x3c, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x07, 0x83, 0x48, 0x03, 0x88, 0x0e, 0x59, 0xc4, 0x08, 0x0f, - 0x48, 0x07, 0x44, 0x06, 0x04, 0x01, 0xf7, 0x33, 0x59, 0xa0, 0x1c, 0x06, - 0x59, 0xa0, 0x02, 0x07, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x58, 0x0c, 0x08, 0x03, 0x80, 0x00, 0x05, 0x80, 0x50, 0x0c, 0x10, 0x00, - 0x80, 0x08, 0x04, 0x00, 0x80, 0x0c, 0x18, 0x00, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x48, 0x03, 0x44, 0x06, 0x90, 0x00, 0x01, 0xc0, - 0x48, 0x03, 0x42, 0x07, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x07, 0x23, - 0x04, 0x01, 0xf7, 0x6a, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0x42, 0x07, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x44, 0x07, - 0x00, 0x00, 0x00, 0x17, 0x59, 0xa8, 0x00, 0x0c, 0x48, 0x03, 0x42, 0x08, - 0x90, 0x00, 0x01, 0xc0, 0x48, 0x03, 0x44, 0x08, 0x4a, 0x03, 0x42, 0x09, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf7, 0x15, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x59, 0xa0, 0x0a, 0x08, 0x59, 0xa0, 0x04, 0x08, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, 0x59, 0xa0, 0x02, 0x0a, - 0x82, 0x00, 0x24, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x17, 0x55, - 0x59, 0xa0, 0x24, 0x06, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x10, 0x05, 0x40, - 0x59, 0xa8, 0x28, 0x0c, 0x80, 0x14, 0x24, 0x80, 0x04, 0x00, 0x17, 0x4f, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xda, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x59, 0xa0, 0x0a, 0x08, 0x59, 0xa0, 0x04, 0x08, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, 0x59, 0xa0, 0x02, 0x0a, - 0x82, 0x00, 0x24, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x17, 0x3d, - 0x59, 0xa0, 0x24, 0x06, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x10, 0x05, 0x40, - 0x59, 0xa8, 0x28, 0x0c, 0x80, 0x14, 0x24, 0x80, 0x04, 0x00, 0x17, 0x37, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x59, 0xa0, 0x24, 0x07, - 0x59, 0xa0, 0x02, 0x07, 0x90, 0x10, 0x21, 0xc0, 0x80, 0x10, 0x25, 0x40, - 0x59, 0xa0, 0x1a, 0x0a, 0x59, 0xa0, 0x04, 0x06, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x41, 0x78, 0x10, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x82, 0x00, 0x04, 0x80, - 0x24, 0x32, 0x00, 0x01, 0x04, 0x00, 0x10, 0x16, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x00, 0x13, 0x82, 0x0c, 0x04, 0x80, - 0x00, 0x00, 0x7a, 0x00, 0x04, 0x00, 0x10, 0x10, 0x82, 0x0c, 0x04, 0x80, - 0x00, 0x00, 0x7c, 0xff, 0x04, 0x02, 0x10, 0x0d, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, - 0x59, 0x80, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x07, 0xf9, - 0x04, 0x00, 0x00, 0x08, 0x80, 0x08, 0x10, 0x00, 0x44, 0x10, 0x18, 0x00, - 0x80, 0x08, 0x11, 0xc0, 0x04, 0x00, 0x06, 0xbe, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf6, 0xbb, 0x4a, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf7, 0x02, 0x59, 0xa0, 0x1a, 0x0a, 0x59, 0xa0, 0x04, 0x06, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x41, 0x78, 0x10, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x04, 0x80, 0x24, 0x32, 0x00, 0x01, 0x04, 0x00, 0x10, 0x16, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x00, 0x13, - 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x7a, 0x00, 0x04, 0x00, 0x10, 0x10, - 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x7c, 0xff, 0x04, 0x02, 0x10, 0x0d, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x08, 0x10, 0x00, - 0x50, 0x0c, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x48, 0x07, 0x42, 0x07, 0x82, 0x00, 0x0d, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x90, 0x04, 0x09, 0xc0, 0x48, 0x07, 0x44, 0x07, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x06, 0x8c, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf6, 0x89, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf6, 0xd0, - 0x59, 0xa0, 0x04, 0x06, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x20, - 0x59, 0xa0, 0x12, 0x07, 0x59, 0xa0, 0x1c, 0x07, 0x59, 0xa0, 0x22, 0x08, - 0x48, 0x0b, 0x50, 0x51, 0x48, 0x0f, 0x50, 0x52, 0x48, 0x13, 0x50, 0x53, - 0x59, 0xc4, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x01, 0x80, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x40, 0x08, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x04, 0x40, 0x0c, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x02, - 0x40, 0x10, 0x00, 0x00, 0x80, 0x00, 0x01, 0x10, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x04, 0x01, 0xf0, 0x07, 0x59, 0xa8, 0x10, 0x51, 0x59, 0xa8, 0x18, 0x52, - 0x59, 0xa8, 0x20, 0x53, 0x48, 0x0b, 0x42, 0x07, 0x48, 0x0f, 0x44, 0x07, - 0x48, 0x13, 0x42, 0x08, 0x04, 0x01, 0xf6, 0x5b, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, - 0x59, 0xa2, 0x8c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x00, 0x00, 0x06, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf6, 0x9e, - 0x59, 0xa0, 0x44, 0x07, 0x59, 0xa0, 0x02, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x20, 0x45, 0x40, 0x04, 0x01, 0xf8, 0x1e, 0x04, 0x00, 0x00, 0x09, - 0x4a, 0x03, 0x42, 0x08, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x4a, 0x03, 0x42, 0x07, 0x00, 0x00, 0xff, 0xff, - 0x49, 0x7b, 0x44, 0x07, 0x04, 0x01, 0xf0, 0x0b, 0x04, 0x01, 0xf8, 0x22, - 0x04, 0x00, 0x00, 0x0e, 0x4a, 0x03, 0x42, 0x08, 0x00, 0x00, 0x00, 0x02, - 0x59, 0x30, 0x04, 0x02, 0x48, 0x03, 0x44, 0x06, 0x59, 0x30, 0x02, 0x02, - 0x48, 0x03, 0x42, 0x07, 0x59, 0x30, 0x02, 0x06, 0x48, 0x03, 0x44, 0x07, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf6, 0x31, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf6, 0x78, 0x49, 0x37, 0xc8, 0x56, 0x48, 0x23, 0xc8, 0x56, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0f, 0x80, 0x02, 0x5d, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x59, 0x2c, 0x00, 0x05, 0x80, 0x20, 0x05, 0x80, - 0x59, 0x2c, 0x00, 0x00, 0x04, 0x02, 0x07, 0xfb, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x23, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, 0x42, 0x02, 0x60, 0x00, - 0x00, 0x10, 0xd8, 0xd4, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x07, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x59, 0x2c, 0x00, 0x05, - 0x80, 0x20, 0x05, 0x80, 0x04, 0x00, 0x00, 0x0a, 0x83, 0x32, 0x64, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x59, 0xa8, 0x00, 0x0a, 0x81, 0x30, 0x04, 0x80, - 0x04, 0x00, 0x17, 0xef, 0x41, 0x7a, 0x60, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x83, 0xa0, 0x05, 0x80, 0x00, 0x10, 0xac, 0x71, 0x04, 0x02, 0x06, 0x3d, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x42, 0x06, - 0x00, 0x00, 0x40, 0x00, 0x4a, 0x03, 0xc0, 0x11, 0x40, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xfe, 0x5f, 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, 0x42, 0x03, 0xe0, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x0c, 0x06, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x07, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x1a, 0x04, 0x01, 0xf6, 0x2c, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xad, 0x10, 0x58, 0x38, 0x1c, 0x01, 0x58, 0x38, 0x22, 0x01, - 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa0, 0x12, 0x07, - 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x04, 0x02, 0x06, 0x26, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x08, 0x41, 0x04, 0x02, 0x16, 0x23, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x16, 0x20, - 0x8c, 0x04, 0x0d, 0x06, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x78, 0xe4, - 0x00, 0x0c, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x04, 0x04, 0x00, 0x00, 0x04, - 0x59, 0xe0, 0x00, 0x02, 0x84, 0x00, 0x05, 0x48, 0x48, 0x03, 0xc0, 0x02, - 0x8c, 0x04, 0x0d, 0x02, 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x76, 0x00, 0x4a, 0x00, 0x28, 0x05, 0xd0, 0x00, 0x00, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x05, 0x40, 0x48, 0x00, 0x74, 0x01, - 0x8c, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x02, 0x48, 0x08, 0x72, 0x01, - 0x48, 0x0f, 0x44, 0x06, 0x48, 0x13, 0x42, 0x07, 0x04, 0x01, 0xf5, 0xb8, - 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, 0x59, 0xa2, 0x8c, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, 0x04, 0x00, 0x00, 0x09, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x09, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x04, 0x01, 0xf5, 0xf6, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x04, 0x01, 0xf5, 0xf7, 0x59, 0xa0, 0x12, 0x07, - 0x59, 0xa0, 0x1c, 0x07, 0x59, 0x34, 0x40, 0x0a, 0x82, 0x20, 0x3d, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x80, 0x1c, 0x39, 0x1a, 0x8c, 0x08, 0x15, 0x00, - 0x04, 0x00, 0x00, 0x19, 0x82, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x07, 0xeb, - 0x82, 0x20, 0x45, 0x00, 0xff, 0xff, 0x1f, 0xff, 0x80, 0x04, 0x00, 0xda, - 0x80, 0x20, 0x05, 0x40, 0x48, 0x02, 0x68, 0x0a, 0x4c, 0x1c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xfd, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x5c, 0x00, 0x38, 0x00, 0x48, 0x1f, 0x44, 0x07, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x04, 0x01, 0xf5, 0x83, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf5, 0xca, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x10, 0x59, 0xa8, 0x00, 0x0f, 0x49, 0x7b, 0x44, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x0f, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x04, 0x02, 0x00, 0x0c, - 0x82, 0x00, 0x0c, 0x00, 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x04, 0x08, 0x00, - 0x80, 0x04, 0x09, 0x10, 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x01, 0xf5, 0xb5, 0x48, 0x07, 0x44, 0x06, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x48, 0x07, 0x42, 0x07, 0x80, 0x00, 0x01, 0x20, - 0x48, 0x03, 0x44, 0x07, 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x15, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x48, 0x0b, 0x44, 0x09, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x1f, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x42, 0x09, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x22, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x22, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x22, 0x04, 0x02, 0x00, 0x04, - 0x4a, 0x03, 0x42, 0x09, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x18, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x12, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x12, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x42, 0x09, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x0e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x42, 0x09, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf5, 0x39, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf5, 0x80, - 0x4a, 0x03, 0x42, 0x09, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf5, 0x31, - 0x59, 0xa8, 0x00, 0x34, 0x48, 0x03, 0x44, 0x07, 0x59, 0xa8, 0x00, 0x35, - 0x48, 0x03, 0x42, 0x09, 0x04, 0x01, 0xf5, 0x2c, 0x42, 0x00, 0x78, 0x00, - 0x00, 0x10, 0xb0, 0xbb, 0x59, 0xa0, 0x04, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x15, 0x75, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x21, 0x71, 0x00, 0x10, 0x21, 0x72, - 0x00, 0x10, 0x21, 0x80, 0x00, 0x10, 0x21, 0x93, 0x00, 0x10, 0x21, 0xb4, - 0x00, 0x10, 0x21, 0xda, 0x00, 0x10, 0x21, 0x71, 0x04, 0x01, 0xf5, 0x6c, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x65, - 0x59, 0xa0, 0x0a, 0x07, 0x59, 0xa0, 0x04, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0xc8, 0x57, 0x59, 0xa0, 0x0a, 0x08, - 0x59, 0xa0, 0x04, 0x08, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x07, 0xc8, 0x57, 0x04, 0x01, 0xf0, 0x5a, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x57, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x08, 0x59, 0xa0, 0x1a, 0x08, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb9, 0x8e, - 0x48, 0x0f, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x59, 0xa0, 0x0a, 0x07, 0x59, 0xa0, 0x04, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x04, 0x1d, 0x40, 0x82, 0x0c, 0x0c, 0x80, 0x00, 0x10, 0xa3, 0x63, - 0x04, 0x02, 0x15, 0x44, 0x82, 0x0c, 0x0c, 0x80, 0x00, 0x10, 0x00, 0x00, - 0x04, 0x00, 0x15, 0x41, 0x48, 0x0f, 0xc8, 0x57, 0x82, 0x3c, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x50, 0x3c, 0x08, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x3c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x00, 0x05, 0x38, 0x80, 0x3c, 0x78, 0x00, 0x04, 0x01, 0xf7, 0xf9, - 0x59, 0xe4, 0x10, 0x01, 0x82, 0x08, 0x0d, 0x00, 0xff, 0xfe, 0xff, 0xcf, - 0x48, 0x07, 0xc8, 0x01, 0x44, 0x0c, 0x78, 0x00, 0x46, 0x00, 0x18, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x80, 0x0c, 0x18, 0x00, 0x46, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xdf, 0x48, 0x0b, 0xc8, 0x01, 0x04, 0x01, 0xf0, 0x26, - 0x59, 0xa0, 0x1a, 0x07, 0x59, 0xa0, 0x04, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x48, 0x0c, 0x78, 0x01, 0x59, 0xa0, 0x22, 0x08, - 0x59, 0xa0, 0x04, 0x08, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x10, 0x25, 0x40, - 0x48, 0x10, 0x78, 0x02, 0x59, 0xa0, 0x02, 0x09, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x15, 0x1d, 0x48, 0x00, 0x78, 0x06, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x78, 0x05, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, - 0x40, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x62, 0x98, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf5, 0x12, - 0x40, 0x04, 0x00, 0x00, 0x80, 0x0c, 0x1c, 0x00, 0x04, 0x00, 0x15, 0x0f, - 0x48, 0x0c, 0x78, 0x03, 0x48, 0x10, 0x78, 0x04, 0x49, 0x78, 0x78, 0x08, - 0x59, 0xa0, 0x04, 0x09, 0x48, 0x00, 0x78, 0x07, 0x59, 0xe4, 0x00, 0x01, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x40, 0x00, 0x04, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x01, 0x04, 0x01, 0xf4, 0xb4, 0x49, 0x78, 0x78, 0x01, - 0x49, 0x78, 0x78, 0x02, 0x49, 0x78, 0x78, 0x06, 0x49, 0x78, 0x78, 0x05, - 0x49, 0x78, 0x78, 0x01, 0x49, 0x78, 0x78, 0x03, 0x49, 0x78, 0x78, 0x04, - 0x49, 0x78, 0x78, 0x08, 0x49, 0x78, 0x78, 0x07, 0x59, 0xe4, 0x00, 0x01, - 0x84, 0x00, 0x05, 0x24, 0x04, 0x01, 0xf7, 0xf3, 0x59, 0xa8, 0x00, 0x05, - 0x48, 0x03, 0x44, 0x06, 0x59, 0xa8, 0x00, 0x06, 0x48, 0x03, 0x42, 0x07, - 0x59, 0xa8, 0x00, 0x07, 0x48, 0x03, 0x44, 0x07, 0x04, 0x01, 0xf4, 0xa1, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0xc0, 0x13, 0x03, 0x80, 0x03, 0x00, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x03, 0x80, 0x59, 0xa0, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0xa2, 0x04, 0x02, 0x00, 0x28, 0x59, 0xa0, 0x14, 0x0a, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x02, 0x10, 0x24, - 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x2b, - 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x1e, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x41, 0x04, 0x02, 0x10, 0x1b, - 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xfc, 0x80, 0x04, 0x09, 0x04, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, - 0x04, 0x02, 0x00, 0x06, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x4a, 0x03, 0xc0, 0x14, 0x03, 0x80, 0x00, 0x00, 0x04, 0x01, 0xf4, 0xbd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x22, 0x25, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x04, 0x01, 0xf4, 0xb9, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x04, 0xa6, - 0x59, 0xa0, 0x0c, 0x06, 0x59, 0xa0, 0x14, 0x0a, 0x59, 0xa0, 0x02, 0x0b, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x31, 0x83, 0x2e, 0x5c, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x41, 0x78, 0x38, 0x00, 0x59, 0xa0, 0x4a, 0x0a, - 0x40, 0x1c, 0x00, 0x00, 0x81, 0x2c, 0x04, 0x00, 0x50, 0x00, 0x40, 0x00, - 0x82, 0x20, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x4c, 0x04, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0xaf, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x2d, - 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x28, 0x80, 0x08, 0x10, 0x00, - 0x82, 0x20, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x0c, 0x19, 0x10, - 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf8, 0xa5, 0x5c, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x00, 0x23, 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x1e, - 0x80, 0x08, 0x10, 0x00, 0x82, 0x20, 0x1d, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x80, 0x0c, 0x19, 0x20, 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x9b, - 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x19, 0x80, 0x24, 0x48, 0x40, - 0x04, 0x00, 0x00, 0x14, 0x80, 0x08, 0x10, 0x00, 0x82, 0x20, 0x1d, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x19, 0x30, 0x4c, 0x04, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x91, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x0f, - 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x0a, 0x80, 0x08, 0x10, 0x00, - 0x80, 0x1c, 0x38, 0x00, 0x04, 0x01, 0xf7, 0xd5, 0x59, 0xa0, 0x02, 0x0a, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x40, 0x00, 0x18, 0x00, - 0x04, 0x01, 0xf8, 0x85, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x04, 0x01, 0xf4, 0x24, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x04, 0x01, 0xf4, 0x6d, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0xc0, 0x13, 0x03, 0x80, 0x03, 0x00, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x03, 0x80, 0x59, 0xa0, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0xa2, 0x04, 0x02, 0x00, 0x6e, 0x59, 0xa0, 0x14, 0x0a, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x02, 0x10, 0x6a, - 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x5c, - 0x59, 0xa0, 0x1a, 0x0a, 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x00, 0x00, 0x64, - 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x41, 0x04, 0x02, 0x10, 0x61, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x06, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x04, 0x01, 0xf4, 0x4c, 0x83, 0x2e, 0x5c, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x41, 0x78, 0x38, 0x00, 0x59, 0xa0, 0x4a, 0x0a, - 0x40, 0x1c, 0x00, 0x00, 0x81, 0x2c, 0x04, 0x00, 0x40, 0x00, 0x40, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x77, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x48, - 0x44, 0x14, 0x40, 0x00, 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x2b, - 0x80, 0x08, 0x10, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x6d, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x00, 0x3e, 0x50, 0x20, 0x00, 0x00, 0x80, 0x14, 0x28, 0xd0, - 0x80, 0x14, 0x05, 0x40, 0x44, 0x00, 0x40, 0x00, 0x80, 0x24, 0x48, 0x40, - 0x04, 0x00, 0x00, 0x1e, 0x80, 0x08, 0x10, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x60, 0x5c, 0x00, 0x10, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x31, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x14, 0x28, 0xe0, 0x80, 0x14, 0x05, 0x40, 0x44, 0x00, 0x40, 0x00, - 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x11, 0x80, 0x08, 0x10, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x53, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x24, - 0x50, 0x20, 0x00, 0x00, 0x80, 0x14, 0x28, 0xf0, 0x80, 0x14, 0x05, 0x40, - 0x44, 0x00, 0x40, 0x00, 0x80, 0x24, 0x48, 0x40, 0x04, 0x00, 0x00, 0x04, - 0x80, 0x08, 0x10, 0x00, 0x80, 0x1c, 0x38, 0x00, 0x04, 0x01, 0xf7, 0xcb, - 0x59, 0xa0, 0x0a, 0x0a, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x80, 0x04, 0x09, 0x04, - 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x41, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x36, 0xdd, 0x04, 0x01, 0xf8, 0x33, 0x04, 0x00, 0x00, 0x06, - 0x48, 0x17, 0x44, 0x06, 0x4a, 0x03, 0xc0, 0x14, 0x03, 0x80, 0x00, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x4a, 0x03, 0xc0, 0x14, - 0x03, 0x80, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x03, 0xc0, 0x14, 0x03, 0x80, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x04, 0x01, 0xf8, 0x36, 0x04, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xf8, 0x62, 0x04, 0x02, 0x00, 0x0f, 0x40, 0x08, 0x08, 0x00, - 0x04, 0x01, 0xf8, 0x5f, 0x04, 0x02, 0x00, 0x0c, 0x40, 0x0c, 0x08, 0x00, - 0x04, 0x01, 0xf8, 0x5c, 0x04, 0x02, 0x00, 0x09, 0x04, 0x01, 0xf8, 0x4b, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0d, 0x40, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x43, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf7, 0xfd, 0x04, 0x01, 0xf8, 0x21, 0x04, 0x00, 0x00, 0x0a, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x4b, - 0x04, 0x02, 0x00, 0x07, 0x04, 0x01, 0xf8, 0x7e, 0x04, 0x01, 0xf8, 0x98, - 0x04, 0x01, 0xf8, 0x38, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x34, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf7, 0xfd, 0x40, 0x04, 0x18, 0x00, 0x04, 0x01, 0xf8, 0x11, - 0x04, 0x00, 0x00, 0x0c, 0x04, 0x01, 0xf8, 0x3d, 0x04, 0x02, 0x00, 0x0b, - 0x40, 0x08, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x3a, 0x04, 0x02, 0x00, 0x08, - 0x40, 0x0c, 0x08, 0x00, 0x04, 0x01, 0xff, 0xe8, 0x04, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf8, 0x26, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x22, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf7, 0xfd, 0x4c, 0x04, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x4a, 0x03, 0xc0, 0x13, 0x03, 0x80, 0x03, 0x00, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x00, 0x16, 0x59, 0xe0, 0x00, 0x13, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x03, 0x00, 0x04, 0x02, 0x07, 0xf7, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x4a, 0x03, 0xc0, 0x13, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x13, - 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, - 0x02, 0x00, 0x02, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, - 0x01, 0x00, 0x01, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x00, 0x00, 0xc2, 0x82, 0x00, 0x05, 0x40, 0x01, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc0, 0x13, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, - 0x02, 0x00, 0x02, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, - 0x02, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0xc2, 0x80, 0x10, 0x20, 0x40, - 0x04, 0x02, 0x07, 0xec, 0x4a, 0x03, 0xc0, 0x13, 0x01, 0x00, 0x01, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x02, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x59, 0xe0, 0x00, 0x13, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x00, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x59, 0xe0, 0x00, 0x13, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x80, 0x00, 0x05, 0x40, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x13, 0x01, 0x00, 0x01, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x0d, 0x80, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x02, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x59, 0xe0, 0x00, 0x13, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x01, 0x10, 0x80, 0x04, 0x08, 0xc2, - 0x80, 0x04, 0x0d, 0x40, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x10, 0x40, 0x04, 0x02, 0x07, 0xed, 0x40, 0x04, 0x28, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x13, 0x01, 0x00, 0x01, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x02, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x4a, 0x03, 0xc0, 0x13, 0x02, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa8, 0x08, 0x34, - 0x48, 0x03, 0x50, 0x34, 0x48, 0x07, 0x44, 0x07, 0x59, 0xa0, 0x0a, 0x09, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x10, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x59, 0xa8, 0x00, 0x35, - 0x48, 0x07, 0x50, 0x35, 0x48, 0x03, 0x42, 0x09, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0xa8, 0x00, 0x05, 0x59, 0xa0, 0x0c, 0x06, - 0x80, 0x04, 0x15, 0x80, 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x80, 0x08, 0x05, 0x80, - 0x48, 0x03, 0x50, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x05, 0xbd, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x59, 0xa0, 0x04, 0x06, - 0x59, 0xa8, 0x08, 0x05, 0x48, 0x03, 0x50, 0x05, 0x80, 0x04, 0x0d, 0x80, - 0x8c, 0x04, 0x0d, 0x0c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0xbd, - 0x59, 0xa0, 0x02, 0x07, 0x48, 0x03, 0x50, 0x06, 0x59, 0xa0, 0x04, 0x07, - 0x48, 0x03, 0x50, 0x07, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0x00, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0xff, - 0x04, 0x02, 0x00, 0x07, 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x15, 0x40, 0x00, 0x00, 0xff, 0x00, - 0x04, 0x01, 0xf0, 0x11, 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0x1c, 0xdd, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x10, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x04, 0x15, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x84, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x15, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x48, 0xee, 0x60, 0x21, 0x48, 0x0a, 0x62, 0x1c, 0x4a, 0x02, 0x64, 0x1c, - 0x00, 0x00, 0xbc, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x49, 0x7a, 0x5a, 0x04, 0x49, 0x7a, 0x58, 0x05, 0x4a, 0x02, 0x5c, 0x04, - 0x00, 0x00, 0x80, 0x00, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x24, 0x7f, - 0x49, 0x2e, 0x60, 0x08, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0xff, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x15, 0x40, 0x00, 0x00, 0xff, 0x00, 0x04, 0x01, 0xf0, 0x11, - 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x01, 0x10, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x59, 0xa8, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x15, 0x80, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x84, 0x04, 0x09, 0xc0, - 0x80, 0x04, 0x15, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x48, 0xee, 0x60, 0x21, - 0x48, 0x0a, 0x62, 0x1c, 0x4a, 0x02, 0x64, 0x1c, 0x00, 0x00, 0xbc, 0x05, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x49, 0x7a, 0x5a, 0x04, - 0x49, 0x7a, 0x58, 0x05, 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x24, 0x7f, 0x49, 0x2e, 0x60, 0x08, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x32, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x05, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0x8d, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x49, 0x7b, 0x44, 0x06, 0x49, 0x7b, 0x42, 0x07, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x08, 0x59, 0xa8, 0x00, 0x63, - 0x59, 0xa8, 0x08, 0x67, 0x80, 0x04, 0x04, 0x80, 0x59, 0xa8, 0x08, 0x64, - 0x48, 0x07, 0x44, 0x06, 0x80, 0x04, 0x14, 0x80, 0x48, 0x0b, 0x42, 0x07, - 0x49, 0x67, 0x44, 0x07, 0x59, 0xa8, 0x00, 0x0d, 0x48, 0x03, 0x42, 0x09, - 0x49, 0x5f, 0x44, 0x09, 0x59, 0xa8, 0x00, 0x1f, 0x48, 0x03, 0x42, 0x0b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x04, 0x06, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x0f, 0x59, 0xa8, 0x00, 0x66, - 0x81, 0x64, 0x04, 0x80, 0x04, 0x00, 0x10, 0x08, 0x59, 0xa8, 0x00, 0x0a, - 0x81, 0x50, 0x05, 0x80, 0x04, 0x00, 0x00, 0x09, 0x59, 0xa8, 0x00, 0x67, - 0x59, 0xa8, 0x10, 0x63, 0x80, 0x08, 0x05, 0x80, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x18, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x85, 0x0e, 0x1d, 0x58, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x46, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x39, 0x38, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x48, 0x03, 0xc8, 0x56, - 0x8d, 0x0e, 0x1d, 0x0e, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xe1, - 0x59, 0xa0, 0x04, 0x06, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x08, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa0, 0x02, 0x0b, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x10, 0x15, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa0, 0x02, 0x0b, - 0x59, 0x9c, 0x0a, 0x01, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x59, 0xa8, 0x00, 0x0d, - 0x81, 0x64, 0x05, 0x80, 0x04, 0x00, 0x00, 0x09, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x18, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x07, 0xfa, 0x59, 0xa0, 0x04, 0x06, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x49, 0x7a, 0x5a, 0x04, - 0x59, 0xa0, 0x04, 0x06, 0x48, 0x02, 0x62, 0x0a, 0x59, 0xa0, 0x02, 0x09, - 0x48, 0x02, 0x64, 0x0a, 0x59, 0xa0, 0x04, 0x09, 0x48, 0x02, 0x62, 0x0b, - 0x59, 0xa0, 0x02, 0x0d, 0x48, 0x02, 0x62, 0x0c, 0x59, 0xa0, 0x04, 0x0d, - 0x48, 0x02, 0x64, 0x0c, 0x59, 0xa0, 0x02, 0x0e, 0x48, 0x02, 0x62, 0x0d, - 0x59, 0xa0, 0x04, 0x0e, 0x48, 0x02, 0x64, 0x0d, 0x59, 0xa0, 0x02, 0x10, - 0x48, 0x02, 0x62, 0x0e, 0x59, 0xa0, 0x04, 0x10, 0x48, 0x02, 0x64, 0x0e, - 0x59, 0xa0, 0x02, 0x0b, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfc, - 0x80, 0x00, 0x01, 0x04, 0x48, 0x02, 0x64, 0x0b, 0x04, 0x01, 0xf9, 0xda, - 0x04, 0x00, 0x07, 0xe1, 0x48, 0xee, 0x60, 0x21, 0x58, 0xee, 0x58, 0x0d, - 0x59, 0x30, 0x02, 0x0e, 0x59, 0x30, 0x1c, 0x0e, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x59, 0x30, 0x02, 0x0c, 0x59, 0x30, 0x14, 0x0c, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0x2c, 0x0a, 0x05, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x26, 0x73, - 0x4a, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x49, 0x33, 0x40, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x04, 0x01, 0xf8, 0x6d, - 0x49, 0x7b, 0x50, 0x54, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x27, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0xb0, 0x59, 0xc4, 0x08, 0x80, - 0x4c, 0x04, 0x00, 0x00, 0x59, 0xc4, 0x08, 0xa3, 0x4c, 0x04, 0x00, 0x00, - 0x49, 0x7b, 0x40, 0x02, 0x04, 0x01, 0xf8, 0x76, 0x04, 0x01, 0xf8, 0x93, - 0x4a, 0x03, 0xa0, 0x05, 0x10, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0xb4, - 0x04, 0x01, 0xf9, 0x01, 0x04, 0x00, 0x00, 0x48, 0x59, 0xc8, 0x00, 0x01, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x07, 0xfc, 0x59, 0xc8, 0x00, 0x18, - 0x82, 0x00, 0x05, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x08, 0x08, - 0x82, 0x04, 0x0d, 0x00, 0x0f, 0xff, 0xff, 0xff, 0x80, 0x04, 0x05, 0x40, - 0x48, 0x03, 0x80, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x08, - 0x59, 0xc0, 0x00, 0x06, 0x4a, 0x03, 0x80, 0x06, 0x10, 0x00, 0x00, 0x00, - 0x59, 0xc0, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x00, 0x00, 0xe0, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x24, 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x59, 0xc8, 0x00, 0x20, 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x32, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x1c, - 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x59, 0xc8, 0x00, 0x20, - 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0xe1, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x14, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x00, 0x59, 0xc8, 0x00, 0x20, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x00, - 0x59, 0xc8, 0x08, 0x21, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x08, 0x59, 0xa8, 0x00, 0x0f, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x05, 0x59, 0xc4, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x04, 0x00, 0x00, 0x06, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf8, 0xd7, 0x4a, 0x03, 0x50, 0x54, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0xe1, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0xc0, 0x08, 0x07, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x07, 0xfa, - 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x50, 0x54, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf8, 0xda, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x7d, - 0x04, 0x01, 0xf8, 0x18, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x01, 0x86, 0xa0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0xb0, 0x5c, 0x00, 0x08, 0x00, - 0x48, 0x07, 0x88, 0xa3, 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0x88, 0x80, - 0x59, 0xa8, 0x00, 0x54, 0x80, 0x00, 0x01, 0xc0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xe5, - 0x59, 0x9c, 0x02, 0x01, 0x48, 0x03, 0x50, 0x56, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x3b, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xb7, 0x48, 0x0b, 0x50, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0xb8, 0x00, 0xea, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x03, 0x4a, 0x03, 0x70, 0xe8, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x4a, 0x03, 0x80, 0x06, 0x30, 0x00, 0x00, 0x00, - 0x59, 0xc0, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x07, 0xfe, - 0x59, 0xc0, 0x00, 0x06, 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x0c, 0x09, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x80, 0x01, - 0x59, 0xa0, 0x02, 0x0e, 0x59, 0xa0, 0x0c, 0x0e, 0x90, 0x04, 0x09, 0xc0, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x80, 0x00, 0x59, 0xa0, 0x02, 0x0b, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x48, 0x03, 0x80, 0x02, - 0x48, 0x03, 0x80, 0x03, 0x48, 0x03, 0x80, 0x05, 0x49, 0x7b, 0x90, 0x09, - 0x59, 0xe0, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x80, 0x60, - 0x48, 0x03, 0xc0, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0x08, 0x00, - 0x80, 0x07, 0xa0, 0xca, 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x76, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x12, 0x65, 0x4a, 0x03, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x03, 0xa0, 0x05, 0x20, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x00, 0x06, - 0x4a, 0x03, 0xa0, 0x05, 0x30, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x00, 0x06, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x07, 0xfe, 0x59, 0xd0, 0x00, 0x05, - 0x59, 0xa0, 0x02, 0x10, 0x59, 0xa0, 0x0c, 0x10, 0x90, 0x04, 0x09, 0xc0, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x07, 0xa0, 0x01, 0x59, 0xa0, 0x02, 0x0d, - 0x59, 0xa0, 0x0c, 0x0d, 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x07, 0xa0, 0x00, 0x59, 0xa0, 0x02, 0x0b, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xfc, 0x48, 0x03, 0xa0, 0x03, 0x48, 0x03, 0xa0, 0x02, - 0x48, 0x03, 0xa0, 0x08, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x00, 0x02, - 0x48, 0x03, 0xc8, 0x57, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x4a, - 0x59, 0xa8, 0x00, 0x57, 0x48, 0x03, 0x88, 0x80, 0x59, 0xc4, 0x00, 0xa3, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x20, 0x08, 0x84, 0x00, 0x05, 0x3a, - 0x48, 0x03, 0x88, 0xa3, 0x59, 0xc4, 0x00, 0x08, 0x84, 0x00, 0x05, 0x4e, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0xe1, 0x48, 0x03, 0x88, 0x08, - 0x59, 0xc8, 0x00, 0x40, 0x84, 0x00, 0x05, 0x34, 0x48, 0x03, 0x90, 0x40, - 0x04, 0x01, 0xf9, 0x01, 0x04, 0x02, 0x00, 0x13, 0x59, 0xa8, 0x00, 0x0f, - 0x80, 0x00, 0x00, 0xd0, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x11, - 0x48, 0x03, 0x91, 0x20, 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x82, 0x00, 0x05, 0x40, 0x32, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x91, 0x21, 0x4a, 0x03, 0x91, 0x23, 0xe1, 0x29, 0x00, 0x08, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x48, 0x03, 0x91, 0x22, 0x04, 0x01, 0xf0, 0x16, 0x59, 0xa8, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x90, 0x00, 0x09, 0xc0, - 0x84, 0x00, 0x01, 0xc0, 0x80, 0x04, 0x05, 0x40, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x03, 0x91, 0x20, 0x59, 0xa8, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x40, - 0x01, 0x00, 0x00, 0x00, 0x48, 0x03, 0x91, 0x21, 0x4a, 0x03, 0x91, 0x23, - 0x08, 0x21, 0x00, 0x08, 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x48, 0x03, 0x91, 0x22, 0x49, 0x7b, 0x91, 0x24, - 0x59, 0xa8, 0x0c, 0x58, 0x80, 0x04, 0x08, 0x00, 0x48, 0x07, 0x54, 0x58, - 0x90, 0x04, 0x09, 0xc0, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0xaa, 0xaa, - 0x48, 0x03, 0x91, 0x25, 0x49, 0x7b, 0x91, 0x26, 0x49, 0x7b, 0x91, 0x27, - 0x04, 0x01, 0xf8, 0xce, 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x91, 0x00, - 0x00, 0x00, 0xe9, 0x80, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x91, 0x00, - 0x00, 0x00, 0xe9, 0xa0, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x50, 0x0d, 0x42, 0x03, 0xe0, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x40, 0xe8, 0x10, 0x00, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xb7, 0x59, 0x94, 0x00, 0x24, 0x80, 0x08, 0x04, 0x00, - 0x48, 0x03, 0x28, 0x24, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, - 0x4d, 0x14, 0x00, 0x00, 0x41, 0x7a, 0x30, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x2b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x06, - 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x90, 0x0d, - 0x00, 0x00, 0x00, 0x30, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x02, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x65, 0x4a, 0x03, 0x88, 0x91, - 0x00, 0x00, 0xff, 0xff, 0x59, 0xc8, 0x00, 0x35, 0x48, 0x03, 0x90, 0x35, - 0x4a, 0x03, 0x90, 0x0d, 0x00, 0x00, 0x00, 0x40, 0x42, 0x03, 0x80, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x08, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x20, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0e, 0x08, 0x4a, 0x03, 0xa0, 0x05, 0x20, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0xa0, 0x05, 0x30, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x08, 0x06, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x07, 0xfe, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x4d, 0x30, 0x00, 0x00, 0x59, 0xa2, 0x60, 0x01, - 0x59, 0xa0, 0x00, 0x00, 0x40, 0x00, 0xb0, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x40, 0x00, 0x59, 0x2c, 0x00, 0x01, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x1e, 0x40, 0x02, 0x58, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfb, 0x58, 0xec, 0x10, 0x07, 0x58, 0xec, 0x18, 0x08, - 0x59, 0x2c, 0x0a, 0x05, 0x4d, 0x2c, 0x00, 0x00, 0x58, 0xec, 0x00, 0x0d, - 0x40, 0x02, 0x58, 0x00, 0x59, 0x2c, 0x02, 0x04, 0x5c, 0x02, 0x58, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x03, 0x04, 0x00, 0x00, 0x08, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x26, 0x73, - 0x04, 0x01, 0xf0, 0x07, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x26, 0x73, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x58, 0xec, 0x00, 0x0d, 0x40, 0x02, 0x58, 0x00, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x03, 0x04, 0x02, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x60, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x58, 0xec, 0x00, 0x0d, - 0x40, 0x02, 0x58, 0x00, 0x59, 0x2c, 0x04, 0x04, 0x84, 0x00, 0x05, 0x5e, - 0x48, 0x02, 0x5c, 0x04, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfd, - 0x42, 0x00, 0x30, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0xb1, 0x59, 0xa2, 0x60, 0x01, 0x04, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x49, 0x7b, 0x44, 0x06, - 0x5c, 0x02, 0x60, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0xbe, 0x04, 0x00, 0x07, 0xf8, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x26, 0xc7, 0x04, 0x01, 0xf7, 0xdb, - 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xe5, 0x4d, 0x30, 0x00, 0x00, - 0x59, 0xa2, 0x60, 0x01, 0x59, 0x30, 0x02, 0x0b, 0x59, 0x30, 0x1c, 0x0a, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x59, 0x30, 0x04, 0x0d, - 0x59, 0x30, 0x12, 0x0d, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0x2c, 0x0a, 0x05, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x26, 0x73, 0x4a, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4c, 0x30, 0x00, 0x00, 0x59, 0x30, 0x04, 0x0b, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x10, 0x04, 0x4a, 0x02, 0x5a, 0x05, - 0x00, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xf0, 0x03, 0x48, 0x02, 0x5a, 0x05, - 0x04, 0x01, 0xf0, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x08, - 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, - 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xf0, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x02, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x44, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x0f, 0xc8, 0x57, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x0c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xb2, 0x04, 0x02, 0x00, 0x09, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0xf8, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, 0x59, 0xa0, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x27, 0x19, 0x00, 0x10, 0x27, 0x2e, 0x00, 0x10, 0x27, 0x44, - 0x00, 0x10, 0x27, 0x17, 0x00, 0x10, 0x27, 0x17, 0x00, 0x10, 0x27, 0x17, - 0x00, 0x10, 0x27, 0x17, 0x00, 0x10, 0x27, 0x17, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x04, 0x01, 0xf0, 0x0b, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x59, 0xc8, 0x00, 0x40, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x0f, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xc4, 0x00, 0xa3, 0x4c, 0x00, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x08, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf9, 0x10, 0x04, 0x00, 0x00, 0x20, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x8d, 0x0e, 0x1d, 0x0e, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xe1, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xe1, 0x59, 0xc4, 0x08, 0xa4, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xe1, 0x59, 0xc8, 0x00, 0x40, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x0f, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xc4, 0x00, 0xa3, 0x4c, 0x00, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x08, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x80, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xa0, 0x02, 0x0f, 0x59, 0xa0, 0xbc, 0x0f, 0x90, 0x5c, 0xb9, 0xc0, - 0x80, 0x5c, 0xbd, 0x40, 0x41, 0x78, 0x48, 0x00, 0x41, 0x78, 0x50, 0x00, - 0x41, 0x78, 0x58, 0x00, 0x41, 0x78, 0x90, 0x00, 0x41, 0x78, 0x98, 0x00, - 0x04, 0x01, 0xfe, 0x23, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x41, 0x78, 0xc0, 0x00, - 0x49, 0x7b, 0x40, 0x02, 0x04, 0x01, 0xf9, 0x5a, 0x04, 0x01, 0xf9, 0xa8, - 0x59, 0xa0, 0x02, 0x0c, 0x59, 0xa0, 0x0c, 0x0c, 0x80, 0x04, 0x0d, 0x40, - 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf9, 0xf9, 0x04, 0x01, 0xf9, 0xf8, - 0x04, 0x01, 0xfe, 0x6a, 0x80, 0x60, 0xc1, 0xc0, 0x04, 0x02, 0x00, 0x14, - 0x04, 0x01, 0xfa, 0x96, 0x04, 0x01, 0xfe, 0xb4, 0x04, 0x02, 0x00, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x4d, 0x04, 0x02, 0x00, 0x08, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x17, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x58, 0x00, 0x00, 0x00, 0xaa, 0xaa, - 0x04, 0x01, 0xf0, 0x58, 0x59, 0xc8, 0x00, 0x01, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x07, 0xee, 0x59, 0xc8, 0x08, 0x01, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x04, 0x01, 0xfa, 0x6e, 0x40, 0x24, 0x00, 0x00, - 0x80, 0x28, 0x05, 0x40, 0x80, 0x2c, 0x05, 0x40, 0x04, 0x02, 0x00, 0x4d, - 0x59, 0xa0, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0xfe, 0xed, 0xbe, 0xef, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x88, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x88, 0x00, 0x10, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xfa, 0x17, 0x4a, 0x03, 0x40, 0x02, 0xfe, 0xed, 0xbe, 0xef, - 0x04, 0x01, 0xfa, 0x6f, 0x04, 0x01, 0xfa, 0x92, 0x04, 0x01, 0xfe, 0xaa, - 0x59, 0xc4, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x34, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x58, 0x00, 0x00, 0x00, 0xbb, 0xbb, 0x04, 0x01, 0xf0, 0x38, - 0x04, 0x01, 0xfe, 0x85, 0x04, 0x02, 0x00, 0x07, 0x42, 0x00, 0x58, 0x00, - 0x00, 0x00, 0xcc, 0xcc, 0x48, 0x5f, 0x42, 0x0f, 0x90, 0x5c, 0xb9, 0xc0, - 0x48, 0x5f, 0x44, 0x0f, 0x04, 0x01, 0xf0, 0x30, 0x59, 0xa0, 0x04, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x0e, 0x59, 0xa2, 0x60, 0x00, - 0x59, 0x30, 0x00, 0x0d, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x07, 0xbe, - 0x59, 0xa2, 0x60, 0x01, 0x59, 0x30, 0x08, 0x0d, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x07, 0xba, 0x80, 0x48, 0x91, 0xc0, 0x04, 0x02, 0x07, 0xb8, - 0x80, 0x4c, 0x99, 0xc0, 0x04, 0x02, 0x07, 0xb6, 0x04, 0x01, 0xf8, 0x7a, - 0x80, 0x5c, 0xb8, 0x40, 0x04, 0x00, 0x00, 0x05, 0x40, 0x24, 0x00, 0x00, - 0x80, 0x28, 0x05, 0x40, 0x80, 0x2c, 0x05, 0x40, 0x04, 0x02, 0x00, 0x1a, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0d, 0x40, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xc0, 0x00, 0x07, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x05, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x4d, 0x04, 0x02, 0x00, 0x08, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x17, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x58, 0x00, 0x00, 0x00, 0xdd, 0xdd, 0x04, 0x01, 0xf0, 0x05, - 0x59, 0xc0, 0x08, 0x07, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x07, 0xea, 0x04, 0x01, 0xfe, 0x5e, 0x59, 0xa0, 0x04, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x56, - 0x04, 0x01, 0xfe, 0x6d, 0x40, 0x24, 0x00, 0x00, 0x80, 0x28, 0x05, 0x40, - 0x80, 0x2c, 0x05, 0x40, 0x04, 0x02, 0x00, 0x03, 0x80, 0x5c, 0xb9, 0xc0, - 0x04, 0x02, 0x07, 0x81, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x7d, - 0x04, 0x01, 0xfd, 0xa5, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x01, 0x86, 0xa0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0xb0, 0x5c, 0x00, 0x08, 0x00, - 0x48, 0x07, 0x88, 0x80, 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0x88, 0x08, - 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0x88, 0xa3, 0x5c, 0x00, 0x08, 0x00, - 0x48, 0x07, 0x50, 0x0f, 0x5c, 0x00, 0x08, 0x00, 0x48, 0x07, 0x90, 0x40, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x08, 0xac, 0x59, 0xa0, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x2c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, - 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x00, 0xff, 0xff, 0xff, 0xf7, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xa5, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, 0x82, 0x04, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xfb, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, 0x4a, 0x03, 0x88, 0xa7, - 0x00, 0x00, 0xf7, 0xf7, 0x42, 0x00, 0x60, 0x00, 0xbe, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x80, 0x01, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, 0xff, 0xfe, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x40, 0x2c, 0x00, 0x00, 0x80, 0x28, 0x05, 0x40, 0x80, 0x24, 0x05, 0x40, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x48, 0x27, 0x44, 0x06, - 0x48, 0x2b, 0x42, 0x07, 0x48, 0x2f, 0x44, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xe9, 0x59, 0xa2, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, - 0x04, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x59, 0xa2, 0x60, 0x01, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x1e, 0x59, 0xc4, 0x00, 0xa3, 0x84, 0x00, 0x05, 0x5a, - 0x84, 0x00, 0x05, 0x3a, 0x48, 0x03, 0x88, 0xa3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x82, 0x04, 0x02, 0x00, 0x0a, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0xf8, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0x8b, 0x04, 0x01, 0xf0, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x92, 0x04, 0x02, 0x00, 0x08, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0xf8, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, 0x04, 0x01, 0xf0, 0x09, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0xf8, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x99, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x59, 0xc4, 0x00, 0x08, 0x84, 0x00, 0x05, 0x4e, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0xe1, 0x48, 0x03, 0x88, 0x08, - 0x4a, 0x03, 0x88, 0xa7, 0x00, 0x00, 0xf7, 0xf7, 0x4a, 0x03, 0x88, 0x05, - 0x04, 0x00, 0x00, 0x01, 0x42, 0x00, 0x60, 0x00, 0xbe, 0x20, 0xbf, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x80, 0x01, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, 0xff, 0xfe, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x13, 0x88, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x4c, 0x58, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x4d, - 0x5c, 0x00, 0xb0, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xf6, 0x04, 0x01, 0xf0, 0x25, 0x59, 0xc4, 0x00, 0x05, - 0x8c, 0x00, 0x05, 0x34, 0x04, 0x02, 0x00, 0x07, 0x59, 0xc4, 0x00, 0xa4, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x1c, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x4a, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x42, 0x00, 0x60, 0x00, 0xfe, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, 0xfd, 0xff, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x4a, 0x03, 0x88, 0x05, 0x04, 0x00, 0x00, 0x01, 0x59, 0xc4, 0x00, 0xa4, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x42, 0x03, 0x80, 0x00, 0x00, 0x00, 0x77, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0e, 0x08, 0x59, 0xc0, 0x00, 0x06, 0x59, 0xa0, 0x04, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x3f, 0x59, 0xa0, 0x3c, 0x0c, - 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x59, 0xa0, 0x02, 0x0e, 0x59, 0xa0, 0x24, 0x0e, - 0x90, 0x10, 0x21, 0xc0, 0x80, 0x10, 0x25, 0x40, 0x59, 0xa0, 0x02, 0x0b, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x59, 0xa0, 0x14, 0x0b, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x48, 0x0b, 0x80, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0x40, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x00, 0x18, - 0x4a, 0x02, 0x58, 0x05, 0x00, 0xab, 0xcd, 0xef, 0x49, 0x2e, 0x60, 0x08, - 0x49, 0x2e, 0x60, 0x0b, 0x48, 0x1e, 0x60, 0x0d, 0x4a, 0x02, 0x60, 0x0c, - 0x00, 0x00, 0x00, 0x04, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x48, 0x02, 0x60, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x82, 0x1c, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x04, - 0x80, 0x1c, 0x38, 0x40, 0x04, 0x01, 0xf9, 0x60, 0x04, 0x01, 0xf0, 0x04, - 0x41, 0x78, 0x38, 0x00, 0x04, 0x01, 0xf9, 0x5d, 0x04, 0x01, 0xf0, 0x11, - 0x82, 0x1c, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x10, 0x05, - 0x40, 0x04, 0x38, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x04, 0x01, 0xf0, 0x06, 0x80, 0x00, 0x15, 0x80, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x80, 0x1c, 0x38, 0x40, 0x04, 0x02, 0x07, 0xfd, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf9, 0x4d, - 0x04, 0x02, 0x07, 0xf1, 0x49, 0x7b, 0x90, 0x09, 0x59, 0xe0, 0x00, 0x03, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x80, 0x60, 0x48, 0x03, 0xc0, 0x03, - 0x4a, 0x03, 0x80, 0x09, 0x00, 0xe0, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x41, 0x78, 0x08, 0x00, 0x80, 0x07, 0xa0, 0xca, - 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x76, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x65, - 0x4a, 0x03, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0xa0, 0x05, - 0x20, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x00, 0x06, 0x4a, 0x03, 0xa0, 0x05, - 0x30, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x00, 0x06, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x07, 0xfe, 0x59, 0xd0, 0x00, 0x05, 0x59, 0xa0, 0x02, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x3f, 0x59, 0xa0, 0x3a, 0x0c, - 0x59, 0xa0, 0x02, 0x10, 0x59, 0xa0, 0x1c, 0x10, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x59, 0xa0, 0x02, 0x0d, 0x59, 0xa0, 0x24, 0x0d, - 0x90, 0x10, 0x21, 0xc0, 0x80, 0x10, 0x25, 0x40, 0x59, 0xa0, 0x12, 0x0b, - 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x59, 0xa0, 0x04, 0x0b, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x48, 0x0b, 0xa0, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0x40, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x00, 0x18, - 0x4a, 0x02, 0x58, 0x05, 0x00, 0xab, 0xcd, 0xef, 0x49, 0x2e, 0x60, 0x08, - 0x49, 0x2e, 0x60, 0x0b, 0x48, 0x1e, 0x60, 0x0d, 0x4a, 0x02, 0x60, 0x0c, - 0x00, 0x00, 0x00, 0x04, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x48, 0x02, 0x60, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x82, 0x1c, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x04, - 0x80, 0x1c, 0x38, 0x40, 0x04, 0x01, 0xf9, 0x03, 0x04, 0x01, 0xf0, 0x04, - 0x41, 0x78, 0x38, 0x00, 0x04, 0x01, 0xf9, 0x00, 0x04, 0x01, 0xf0, 0x11, - 0x82, 0x1c, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x10, 0x05, - 0x40, 0x04, 0x38, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x04, 0x01, 0xf0, 0x06, 0x80, 0x00, 0x15, 0x80, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x80, 0x1c, 0x38, 0x40, 0x04, 0x02, 0x07, 0xfd, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf8, 0xf0, - 0x04, 0x02, 0x07, 0xf1, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0xa0, 0x02, 0x0c, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x24, - 0x82, 0x4c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x40, - 0x59, 0xa2, 0x60, 0x01, 0x59, 0x30, 0x38, 0x0d, 0x80, 0x1c, 0x39, 0xc0, - 0x04, 0x00, 0x00, 0x3c, 0x80, 0x1c, 0x38, 0x40, 0x48, 0x1e, 0x60, 0x0d, - 0x59, 0x32, 0x58, 0x0b, 0x59, 0x30, 0x08, 0x0a, 0x50, 0x04, 0x20, 0x00, - 0x58, 0x04, 0x18, 0x01, 0x58, 0x04, 0x10, 0x02, 0x82, 0x08, 0x15, 0x00, - 0xff, 0xff, 0xff, 0xfc, 0x59, 0x30, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x09, - 0x49, 0x7a, 0x60, 0x0c, 0x59, 0x2e, 0x58, 0x01, 0x81, 0x2e, 0x59, 0xc0, - 0x04, 0x00, 0x00, 0x1a, 0x49, 0x2e, 0x60, 0x0b, 0x83, 0x2c, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf0, 0x05, 0x48, 0x02, 0x60, 0x0c, - 0x59, 0x30, 0x08, 0x0a, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x48, 0x06, 0x60, 0x0a, 0x04, 0x01, 0xf0, 0x10, 0x59, 0xa0, 0x12, 0x0b, - 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0xff, 0xfc, 0x59, 0xa0, 0x04, 0x0b, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x48, 0x0b, 0xa0, 0x03, - 0x59, 0xa0, 0x02, 0x0d, 0x59, 0xa0, 0x24, 0x0d, 0x90, 0x10, 0x21, 0xc0, - 0x80, 0x10, 0x25, 0x40, 0x59, 0xa0, 0x02, 0x10, 0x59, 0xa0, 0x1c, 0x10, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x3a, 0x98, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0xb0, - 0x48, 0x0b, 0xa0, 0x02, 0x59, 0xa8, 0x00, 0x56, 0x48, 0x03, 0xa0, 0x08, - 0x48, 0x13, 0xa0, 0x00, 0x48, 0x0f, 0xa0, 0x01, 0x4a, 0x03, 0xa0, 0x05, - 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x58, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x80, 0x4c, 0x98, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x47, 0xc8, 0x57, 0x59, 0xa0, 0x04, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x24, 0x82, 0x48, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x42, 0x59, 0xa2, 0x60, 0x00, - 0x59, 0x30, 0x38, 0x0d, 0x80, 0x1c, 0x39, 0xc0, 0x04, 0x00, 0x00, 0x3e, - 0x80, 0x1c, 0x38, 0x40, 0x48, 0x1e, 0x60, 0x0d, 0x59, 0x32, 0x58, 0x0b, - 0x59, 0x30, 0x08, 0x0a, 0x50, 0x04, 0x20, 0x00, 0x58, 0x04, 0x18, 0x01, - 0x58, 0x04, 0x10, 0x02, 0x82, 0x08, 0x15, 0x00, 0xff, 0xff, 0xff, 0xfc, - 0x59, 0x30, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x09, 0x49, 0x7a, 0x60, 0x0c, - 0x59, 0x2e, 0x58, 0x01, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x1d, - 0x49, 0x2e, 0x60, 0x0b, 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf0, 0x05, 0x48, 0x02, 0x60, 0x0c, 0x59, 0x30, 0x08, 0x0a, - 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0x06, 0x60, 0x0a, - 0x04, 0x01, 0xf0, 0x13, 0x82, 0x44, 0x05, 0x80, 0x10, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x1f, 0x59, 0xa0, 0x02, 0x0e, 0x59, 0xa0, 0x24, 0x0e, - 0x90, 0x10, 0x21, 0xc0, 0x80, 0x10, 0x25, 0x40, 0x59, 0xa0, 0x02, 0x09, - 0x59, 0xa0, 0x1c, 0x09, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x59, 0xa0, 0x02, 0x0b, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xfc, - 0x59, 0xa0, 0x14, 0x0b, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x48, 0x0b, 0x80, 0x03, 0x48, 0x13, 0x80, 0x00, 0x48, 0x0f, 0x80, 0x01, - 0x48, 0x0b, 0x80, 0x02, 0x59, 0xc8, 0x00, 0x18, 0x82, 0x00, 0x05, 0x00, - 0xf0, 0x00, 0x00, 0x00, 0x59, 0xc0, 0x20, 0x08, 0x82, 0x10, 0x25, 0x00, - 0x0f, 0xff, 0xff, 0xff, 0x80, 0x10, 0x05, 0x40, 0x48, 0x03, 0x80, 0x08, - 0x48, 0x47, 0x80, 0x06, 0x80, 0x48, 0x90, 0x00, 0x82, 0x60, 0xc5, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc0, 0x00, 0x09, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0d, 0x00, 0x00, 0xe0, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x0d, 0x48, 0x5f, 0x42, 0x0f, 0x90, 0x5c, 0xb9, 0xc0, - 0x48, 0x5f, 0x44, 0x0f, 0x8c, 0x00, 0x05, 0x2e, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x28, 0x50, 0x00, 0x8c, 0x00, 0x05, 0x2c, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x24, 0x48, 0x00, 0x8c, 0x00, 0x05, 0x2a, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x2c, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x02, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x21, 0x59, 0xd0, 0x08, 0x06, - 0x48, 0x07, 0xc8, 0x57, 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x00, 0x00, 0x1d, - 0x8c, 0x04, 0x0d, 0x04, 0x04, 0x00, 0x00, 0x1b, 0x4a, 0x03, 0xa0, 0x05, - 0x20, 0x00, 0x00, 0x00, 0x82, 0x4c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x40, 0x4c, 0x00, 0x00, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x2a, 0x28, 0x00, 0x10, 0x2a, 0x2a, - 0x00, 0x10, 0x2a, 0x30, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x80, 0x00, 0x00, 0x40, 0x40, 0x00, 0x98, 0x00, 0x04, 0x01, 0xff, 0x46, - 0x04, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xff, 0x44, 0x04, 0x01, 0xf0, 0x08, - 0x80, 0x00, 0x00, 0x40, 0x40, 0x00, 0x98, 0x00, 0x59, 0xd0, 0x08, 0x06, - 0x48, 0x07, 0xc8, 0x57, 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x02, 0x07, 0xe8, - 0x04, 0x01, 0xff, 0x3c, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa0, 0x04, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x24, 0x59, 0xc0, 0x08, 0x07, - 0x48, 0x07, 0xc8, 0x57, 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x00, 0x00, 0x20, - 0x59, 0xc0, 0x08, 0x07, 0x4a, 0x03, 0x80, 0x06, 0x20, 0x00, 0x00, 0x00, - 0x82, 0x48, 0x04, 0x80, 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x40, 0x48, 0x00, 0x00, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x2a, 0x4b, 0x00, 0x10, 0x2a, 0x4d, 0x00, 0x10, 0x2a, 0x55, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x80, 0x00, 0x00, 0x40, - 0x40, 0x00, 0x90, 0x00, 0x42, 0x00, 0x88, 0x00, 0x10, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xff, 0x68, 0x04, 0x00, 0x00, 0x0c, 0x04, 0x01, 0xff, 0x66, - 0x04, 0x01, 0xf0, 0x0a, 0x80, 0x00, 0x00, 0x40, 0x40, 0x00, 0x90, 0x00, - 0x59, 0xc0, 0x08, 0x07, 0x48, 0x07, 0xc8, 0x57, 0x8c, 0x04, 0x0d, 0x3e, - 0x04, 0x02, 0x07, 0xe5, 0x42, 0x00, 0x88, 0x00, 0x10, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xff, 0x5c, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, - 0x40, 0x00, 0xa8, 0x00, 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x00, - 0x48, 0x13, 0xb8, 0x00, 0x48, 0x0f, 0xb8, 0x01, 0x48, 0x0b, 0xb8, 0x02, - 0x48, 0x57, 0xb8, 0x03, 0x4a, 0x03, 0xb8, 0x05, 0x30, 0x00, 0x00, 0x02, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x70, 0x00, 0x00, 0x01, - 0x59, 0xdc, 0x00, 0x06, 0x4a, 0x03, 0xb8, 0x05, 0x10, 0x00, 0x00, 0x00, - 0x59, 0xdc, 0x00, 0x06, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x07, 0xfe, - 0x4a, 0x03, 0xb8, 0x05, 0x20, 0x00, 0x00, 0x00, 0x59, 0xdc, 0x00, 0x06, - 0x59, 0xdc, 0x20, 0x00, 0x59, 0xdc, 0x18, 0x01, 0x80, 0x1c, 0x39, 0xc0, - 0x04, 0x00, 0x00, 0x0a, 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x5c, 0x00, 0x08, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x00, 0x0a, - 0x49, 0x2c, 0x08, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x10, 0x2b, 0xc3, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x7c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x65, 0x4a, 0x03, 0x90, 0x2c, - 0x00, 0x20, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, - 0x59, 0xc8, 0x00, 0x2c, 0x8c, 0x00, 0x05, 0x2c, 0x04, 0x00, 0x00, 0x07, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x03, 0x41, 0x78, 0x10, 0x00, 0x04, 0x01, 0xf1, 0x1e, - 0x50, 0x30, 0x10, 0x00, 0x41, 0x78, 0x48, 0x00, 0x4a, 0x03, 0x90, 0x2d, - 0x00, 0x00, 0x80, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, - 0x59, 0xc8, 0x00, 0x2c, 0x8c, 0x00, 0x05, 0x34, 0x04, 0x00, 0x00, 0x07, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x03, 0x41, 0x78, 0x10, 0x00, 0x04, 0x01, 0xf1, 0x0f, - 0x04, 0x01, 0xf8, 0x95, 0x80, 0x24, 0x48, 0x00, 0x82, 0x24, 0x05, 0x80, - 0x00, 0x00, 0x03, 0xb1, 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf9, 0x11, - 0x41, 0x78, 0x48, 0x00, 0x04, 0x01, 0xf8, 0xbb, 0x80, 0x24, 0x48, 0x00, - 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x03, 0xb1, 0x04, 0x02, 0x07, 0xfc, - 0x80, 0x30, 0x60, 0x00, 0x82, 0x30, 0x05, 0x80, 0x00, 0x10, 0x2b, 0xc5, - 0x04, 0x02, 0x07, 0xe2, 0x59, 0xa8, 0x08, 0x60, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0xa8, 0x18, 0x5f, - 0x04, 0x01, 0xf0, 0xf6, 0x42, 0x00, 0x60, 0x00, 0x00, 0x10, 0x2b, 0xc3, - 0x50, 0x30, 0x10, 0x00, 0x41, 0x78, 0x48, 0x00, 0x4a, 0x03, 0x90, 0x2d, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x76, 0x80, 0x24, 0x48, 0x00, - 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x07, 0xfc, - 0x04, 0x01, 0xf8, 0xf2, 0x41, 0x78, 0x48, 0x00, 0x04, 0x01, 0xf8, 0x9c, - 0x80, 0x24, 0x48, 0x00, 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x00, 0x18, - 0x04, 0x02, 0x07, 0xfc, 0x80, 0x30, 0x60, 0x00, 0x82, 0x30, 0x05, 0x80, - 0x00, 0x10, 0x2b, 0xc5, 0x04, 0x02, 0x07, 0xed, 0x59, 0xa8, 0x08, 0x60, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x59, 0xa8, 0x18, 0x5f, 0x04, 0x01, 0xf0, 0xd7, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x10, 0x2b, 0xc3, 0x50, 0x30, 0x10, 0x00, 0x41, 0x78, 0x48, 0x00, - 0x4a, 0x03, 0x90, 0x2d, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0xf8, 0x57, - 0x80, 0x24, 0x48, 0x00, 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x00, 0x88, - 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf8, 0xd3, 0x41, 0x78, 0x48, 0x00, - 0x04, 0x01, 0xf8, 0x7d, 0x80, 0x24, 0x48, 0x00, 0x82, 0x24, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x88, 0x04, 0x02, 0x07, 0xfc, 0x80, 0x30, 0x60, 0x00, - 0x82, 0x30, 0x05, 0x80, 0x00, 0x10, 0x2b, 0xc5, 0x04, 0x02, 0x07, 0xed, - 0x59, 0xa8, 0x08, 0x60, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x59, 0xa8, 0x18, 0x5f, 0x04, 0x01, 0xf0, 0xb8, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x10, 0x2b, 0xc3, 0x50, 0x30, 0x10, 0x00, - 0x41, 0x78, 0x48, 0x00, 0x4a, 0x03, 0x90, 0x2d, 0x00, 0x00, 0x20, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, 0x59, 0xc8, 0x00, 0x2c, - 0x8c, 0x00, 0x05, 0x30, 0x04, 0x00, 0x00, 0x07, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, - 0x41, 0x78, 0x10, 0x00, 0x04, 0x01, 0xf0, 0xa7, 0x59, 0xc8, 0x00, 0x2c, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xe0, 0xff, 0xff, 0x82, 0x08, 0x0d, 0x00, - 0x00, 0x1f, 0x00, 0x00, 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x90, 0x2c, - 0x04, 0x01, 0xf8, 0x26, 0x80, 0x24, 0x48, 0x00, 0x82, 0x24, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x10, 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf8, 0xa2, - 0x41, 0x78, 0x48, 0x00, 0x04, 0x01, 0xf8, 0x4c, 0x59, 0xc8, 0x00, 0x34, - 0x82, 0x08, 0x0d, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x1f, 0x00, 0x00, 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x06, - 0x59, 0xa8, 0x00, 0x60, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x60, - 0x40, 0x24, 0x00, 0x00, 0x48, 0x03, 0x50, 0x5f, 0x80, 0x24, 0x48, 0x00, - 0x82, 0x24, 0x05, 0x80, 0x00, 0x00, 0x01, 0x10, 0x04, 0x02, 0x07, 0xf0, - 0x80, 0x30, 0x60, 0x00, 0x82, 0x30, 0x05, 0x80, 0x00, 0x10, 0x2b, 0xc5, - 0x04, 0x02, 0x07, 0xcf, 0x59, 0xa8, 0x08, 0x60, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x20, 0x59, 0xa8, 0x18, 0x5f, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x59, 0xc8, 0x00, 0x2c, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x82, 0x08, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x90, 0x2c, - 0x48, 0x0b, 0x90, 0x28, 0x48, 0x0b, 0x90, 0x29, 0x59, 0xa8, 0x00, 0x61, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x03, - 0x48, 0x0b, 0x90, 0x2a, 0x48, 0x0b, 0x90, 0x2b, 0x59, 0xc8, 0x00, 0x2d, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xfc, 0x00, 0x80, 0x24, 0x05, 0x40, - 0x48, 0x03, 0x90, 0x2d, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, - 0x59, 0xc8, 0x00, 0x2c, 0x82, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x07, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x41, 0x78, 0x10, 0x00, - 0x04, 0x01, 0xf0, 0x5a, 0x4a, 0x03, 0x90, 0x2e, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, 0xf4, 0x59, 0xc8, 0x00, 0x2e, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x06, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, - 0x04, 0x01, 0xf0, 0x4e, 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0x38, 0x00, - 0x59, 0xc8, 0x00, 0x2d, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xfc, 0x00, - 0x80, 0x24, 0x0d, 0x40, 0x48, 0x07, 0x90, 0x2d, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x01, 0xf4, 0x59, 0xc8, 0x00, 0x2c, 0x82, 0x00, 0x05, 0x00, - 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, - 0x41, 0x78, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x3b, 0x59, 0xc8, 0x18, 0x30, - 0x59, 0xc8, 0x00, 0x30, 0x80, 0x0c, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfd, - 0x80, 0x08, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x02, 0x80, 0x1c, 0x38, 0x00, - 0x59, 0xc8, 0x20, 0x31, 0x59, 0xc8, 0x00, 0x31, 0x80, 0x10, 0x0d, 0x80, - 0x04, 0x02, 0x07, 0xfd, 0x80, 0x08, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x1c, 0x38, 0x00, 0x59, 0xa8, 0x00, 0x61, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x19, 0x59, 0xc8, 0x28, 0x32, - 0x59, 0xc8, 0x00, 0x32, 0x80, 0x14, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfd, - 0x80, 0x08, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x02, 0x80, 0x1c, 0x38, 0x00, - 0x59, 0xc8, 0x30, 0x33, 0x59, 0xc8, 0x00, 0x33, 0x80, 0x18, 0x0d, 0x80, - 0x04, 0x02, 0x07, 0xfd, 0x80, 0x08, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x1c, 0x38, 0x00, 0x59, 0xc8, 0x00, 0x34, 0x59, 0xc8, 0x08, 0x34, - 0x80, 0x04, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x80, 0x08, 0x0d, 0x80, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x00, 0x0c, - 0x80, 0x1c, 0x38, 0x00, 0x04, 0x01, 0xf0, 0x0a, 0x59, 0xc8, 0x00, 0x34, - 0x59, 0xc8, 0x08, 0x34, 0x80, 0x04, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfd, - 0x80, 0x08, 0x0d, 0x80, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x04, 0x00, 0x00, 0x02, 0x80, 0x1c, 0x38, 0x00, 0x80, 0x1c, 0x39, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x60, 0x80, 0x1c, 0x04, 0x00, - 0x48, 0x03, 0x50, 0x60, 0x48, 0x27, 0x50, 0x5f, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0x42, 0x06, 0x48, 0x07, 0x44, 0x06, 0x48, 0x0b, 0x42, 0x07, - 0x48, 0x0f, 0x44, 0x07, 0x48, 0x13, 0x42, 0x08, 0x48, 0x17, 0x44, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x90, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x60, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x1c, 0x01, 0xf0, 0x00, 0x5a, 0x5a, 0x5a, 0x5a, 0xa5, 0xa5, 0xa5, 0xa5, - 0x59, 0xa0, 0x0c, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x21, - 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x59, 0xa0, 0x02, 0x08, 0x59, 0xa0, 0x14, 0x07, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x07, - 0x59, 0xa0, 0x1c, 0x06, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x2b, 0xe6, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa0, 0x0c, 0x0a, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x59, 0xa0, 0x04, 0x0b, 0x59, 0xa0, 0x12, 0x0b, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, - 0x59, 0xa0, 0x1c, 0x08, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x58, 0xec, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2c, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa0, 0x0c, 0x0a, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0x8d, - 0x82, 0x04, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x10, 0x59, 0xa0, 0x02, 0x08, - 0x59, 0xa0, 0x14, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x1c, 0x06, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x58, 0xec, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xda, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2c, 0x1f, 0x1c, 0x01, 0xf0, 0x00, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa0, 0x04, 0x0a, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x59, 0xa0, 0x04, 0x0b, 0x59, 0xa0, 0x12, 0x0b, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, - 0x59, 0xa0, 0x1c, 0x08, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0x58, 0xec, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x1e, 0x86, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0xef, 0xc8, 0x57, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x59, 0xa0, 0x04, 0x06, - 0x48, 0x03, 0x40, 0x00, 0x48, 0x0b, 0x40, 0x01, 0x48, 0x0f, 0x40, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x2c, 0x54, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x48, 0xef, 0xc8, 0x57, 0x49, 0xa3, 0xc8, 0x57, - 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2c, 0x0a, 0x04, 0x80, 0x04, 0x09, 0x10, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x19, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x48, 0x05, 0xd8, 0x0c, - 0x04, 0x01, 0xf0, 0x0a, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, 0x48, 0xef, 0xc8, 0x57, - 0x49, 0xa3, 0xc8, 0x57, 0x48, 0xef, 0xc8, 0x57, 0x49, 0xa3, 0xc8, 0x57, - 0x58, 0xec, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x12, - 0x48, 0x01, 0xd8, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x58, 0xec, 0x10, 0x07, 0x58, 0xec, 0x18, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x2c, 0x68, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0xee, 0x58, 0x0d, - 0x48, 0xef, 0xc8, 0x57, 0x49, 0xa3, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x2f, 0x30, 0x04, 0x59, 0x2c, 0x04, 0x04, 0x84, 0x00, 0x05, 0x5e, - 0x48, 0x02, 0x5c, 0x04, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2c, 0x92, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x58, 0xee, 0x58, 0x0d, - 0x48, 0xef, 0xc8, 0x57, 0x49, 0xa3, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, - 0x59, 0x2c, 0x04, 0x04, 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x5c, 0x04, - 0x59, 0xa0, 0x00, 0x00, 0x59, 0xa0, 0x10, 0x01, 0x59, 0xa0, 0x18, 0x02, - 0x80, 0x08, 0x14, 0x00, 0x82, 0x0c, 0x1c, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x36, 0xdd, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x32, 0x0b, - 0x82, 0x18, 0x35, 0x00, 0x00, 0x00, 0x00, 0xff, 0x59, 0xa2, 0x8c, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfd, - 0x04, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x80, 0x18, 0x31, 0xc0, 0x04, 0x00, 0x00, 0x0a, 0x41, 0x2c, 0x08, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x40, 0x06, 0x58, 0x00, 0x4a, 0x02, 0x5c, 0x04, - 0x00, 0x00, 0x80, 0x00, 0x49, 0x7a, 0x5a, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0x14, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2c, 0xe5, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0x2c, 0x04, 0x06, - 0x82, 0x00, 0x2d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x09, 0x04, 0x80, 0x04, 0x08, 0x00, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x10, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x83, 0x2c, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x40, 0x50, 0xa8, 0x00, 0x40, 0x04, 0xb0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x4c, 0x14, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x5c, 0x00, 0x28, 0x00, 0x80, 0x14, 0x29, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2d, 0x18, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, - 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, 0x81, 0x2e, 0x59, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x00, 0x09, 0x04, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x10, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x59, 0x2e, 0x58, 0x01, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x05, 0x40, 0x50, 0xa8, 0x00, - 0x40, 0x04, 0xb0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x58, 0xec, 0x10, 0x07, 0x58, 0xec, 0x18, 0x08, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x84, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x14, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x2d, 0x5c, 0x00, 0x10, 0x2d, 0x63, - 0x00, 0x10, 0x2d, 0x6a, 0x00, 0x10, 0x2d, 0x6a, 0x00, 0x10, 0x2d, 0x6a, - 0x00, 0x10, 0x2d, 0x6c, 0x00, 0x10, 0x2d, 0x71, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x38, 0x00, 0x00, 0x10, 0x2d, 0x85, - 0x4a, 0x03, 0x40, 0x00, 0x00, 0x10, 0xac, 0xb8, 0x04, 0x01, 0xf0, 0x13, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x38, 0x00, - 0x00, 0x10, 0x2d, 0x85, 0x4a, 0x03, 0x40, 0x00, 0x00, 0x10, 0xac, 0xc5, - 0x04, 0x01, 0xf0, 0x0c, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0x38, 0x00, - 0x00, 0x10, 0x2d, 0x98, 0x04, 0x01, 0xf0, 0x05, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x38, 0x00, 0x00, 0x10, 0x2d, 0xe2, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x4c, 0x1c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xda, 0x5c, 0x00, 0x38, 0x00, 0x48, 0x1d, 0xd8, 0x09, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x4a, 0x03, 0x50, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x59, 0xa0, 0xa8, 0x00, 0x83, 0x2c, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x50, 0x50, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x16, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x50, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x50, 0x04, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x50, 0x50, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x04, 0x00, 0x00, 0x1d, 0x82, 0x08, 0x15, 0x80, 0x00, 0x00, 0x00, 0x28, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x50, 0x08, 0x00, - 0x50, 0x04, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x82, 0x08, 0x15, 0x80, 0x00, 0x00, 0x00, 0x13, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x04, 0x08, 0x00, 0x50, 0x04, 0x00, 0x00, - 0x82, 0x00, 0x15, 0x00, 0x00, 0x01, 0x00, 0x00, 0x82, 0x08, 0x15, 0x80, - 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x12, - 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x0f, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x50, 0x08, 0x00, - 0x50, 0x04, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x04, 0x08, 0x00, - 0x50, 0x04, 0x00, 0x00, 0x82, 0x00, 0x15, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xac, 0xb0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xb0, 0xc9, 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x85, 0x0e, 0x1d, 0x50, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa0, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x84, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x2e, 0x0b, 0x00, 0x10, 0x2e, 0x10, 0x00, 0x10, 0x2e, 0x15, - 0x00, 0x10, 0x2e, 0x15, 0x00, 0x10, 0x2e, 0x15, 0x00, 0x10, 0x2e, 0x17, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0xa0, 0x00, - 0x00, 0x10, 0xac, 0xb8, 0x04, 0x01, 0xf0, 0x0c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0xa0, 0x00, 0x00, 0x10, 0xac, 0xc5, - 0x04, 0x01, 0xf0, 0x07, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0xa0, 0x00, - 0x00, 0x10, 0xac, 0xb0, 0x40, 0x04, 0xb0, 0x00, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x14, 0x06, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x17, 0x59, 0xc4, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x01, 0x80, 0x00, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x44, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x80, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x3e, 0x82, 0x04, 0x05, 0x80, 0x00, 0x01, 0x00, 0x00, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x37, 0x59, 0xa8, 0x00, 0x6c, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa8, 0x08, 0x50, 0x48, 0x03, 0x50, 0x50, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x82, 0x04, 0x00, 0x00, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x92, 0x04, 0x00, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xa2, 0x04, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xb2, 0x04, 0x00, 0x00, 0x04, - 0x48, 0x07, 0x50, 0x50, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x1b, - 0x59, 0xc4, 0x00, 0x06, 0x84, 0x00, 0x05, 0x00, 0x48, 0x03, 0x88, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, 0x49, 0x7b, 0x88, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0xd8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xe6, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x99, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x48, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x50, 0x46, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x05, 0xfc, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa2, 0x8c, 0x06, - 0x59, 0xa0, 0x32, 0x0b, 0x82, 0x18, 0x35, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfd, - 0x04, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x49, 0x7a, 0x5a, 0x04, 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x29, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2e, 0xb7, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x80, 0x04, 0x09, 0x04, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x83, 0x2c, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x40, 0x50, 0xa8, 0x00, 0x40, 0x04, 0xb0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x59, 0xa0, 0x02, 0x07, - 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x49, 0x6f, 0xc8, 0x57, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x1a, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x3d, 0xec, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, - 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x41, 0x9c, 0x00, 0x00, 0x49, 0xa3, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xda, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x2e, 0xf9, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x33, 0xc8, 0x57, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x59, 0x9c, 0x02, 0x00, 0x80, 0x00, 0x01, 0xc0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x03, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x9c, 0x00, 0x19, 0x84, 0x00, 0x05, 0x0c, 0x48, 0x03, 0x38, 0x19, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0x2b, 0x59, 0xa8, 0x00, 0x6c, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x04, 0x59, 0x9c, 0x00, 0x17, - 0x84, 0x00, 0x05, 0x08, 0x48, 0x03, 0x38, 0x17, 0x85, 0x0e, 0x1d, 0x20, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x85, 0x0e, 0x1d, 0x60, 0x04, 0x01, 0xf0, 0x04, 0x8c, 0x00, 0x05, 0x0a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x04, 0x59, 0xc4, 0x08, 0xa3, - 0x84, 0x04, 0x0d, 0x7a, 0x48, 0x07, 0x88, 0xa3, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x02, 0x00, 0x04, 0x59, 0xc4, 0x08, 0xa3, 0x84, 0x04, 0x0d, 0x08, - 0x48, 0x07, 0x88, 0xa3, 0x59, 0x9c, 0x0c, 0x02, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x00, 0x00, 0x12, - 0x04, 0x01, 0xf0, 0x01, 0x82, 0x04, 0x14, 0x80, 0x00, 0x00, 0x00, 0x7f, - 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x14, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x08, 0x10, 0x00, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x06, - 0x48, 0x0b, 0x50, 0x0f, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, 0x59, 0x9c, 0x00, 0x19, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0xb8, 0x05, - 0x90, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x0b, - 0x59, 0xa8, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x14, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xac, 0xb0, 0x50, 0x04, 0x08, 0x00, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x28, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x01, 0x08, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x48, 0x03, 0x90, 0x40, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0x30, 0x3e, 0x50, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x99, 0x59, 0x9c, 0x02, 0x01, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x08, 0x41, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x59, 0x9c, 0x04, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x59, 0x9c, 0x04, 0x09, 0x59, 0x9c, 0x0c, 0x07, 0x80, 0x04, 0x0c, 0x80, - 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x59, 0x9c, 0x02, 0x09, - 0x59, 0x9c, 0x0a, 0x07, 0x80, 0x04, 0x0c, 0x80, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4f, 0x4b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x4f, 0x59, 0x9c, 0x02, 0x01, - 0x48, 0x03, 0x50, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x0d, - 0x59, 0x9c, 0x02, 0x0a, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x48, 0x03, 0x50, 0x4a, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x50, 0x4a, - 0x00, 0x00, 0x00, 0xc8, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0xc6, 0x41, 0x7a, 0x50, 0x00, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x9a, - 0x59, 0x9c, 0x00, 0x03, 0x59, 0x9c, 0x08, 0x04, 0x9c, 0x00, 0x01, 0xc0, - 0x9c, 0x04, 0x09, 0xc0, 0x48, 0x03, 0x50, 0x02, 0x48, 0x07, 0x50, 0x03, - 0x59, 0x9c, 0x10, 0x17, 0x8c, 0x08, 0x15, 0x1c, 0x04, 0x00, 0x00, 0x06, - 0x59, 0x9c, 0x00, 0x05, 0x59, 0x9c, 0x08, 0x06, 0x9c, 0x00, 0x01, 0xc0, - 0x9c, 0x04, 0x09, 0xc0, 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0x48, 0x03, 0x50, 0x00, 0x48, 0x07, 0x50, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xac, 0xb8, 0x48, 0x00, 0x10, 0x00, - 0x48, 0x04, 0x10, 0x01, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xac, 0xc5, - 0x48, 0x00, 0x10, 0x00, 0x48, 0x04, 0x10, 0x01, 0x59, 0xa8, 0x00, 0x6c, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x21, 0x59, 0x9c, 0x10, 0x19, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0c, 0x4a, 0x03, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0xf8, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, 0x04, 0x01, 0xf0, 0x2b, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, 0x04, 0x02, 0x00, 0x0a, - 0x4a, 0x03, 0x50, 0x50, 0x00, 0x00, 0x00, 0x01, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0xf8, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, 0x04, 0x01, 0xf0, 0x1f, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x40, 0x00, 0x04, 0x02, 0x00, 0x06, - 0x4a, 0x03, 0x50, 0x50, 0x00, 0x00, 0x00, 0x02, 0x4a, 0x03, 0x50, 0x46, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x17, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x60, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x59, 0xa8, 0x08, 0x55, 0x82, 0x04, 0x0d, 0x80, 0x01, 0x39, 0x10, 0x77, - 0x04, 0x02, 0x00, 0x05, 0x59, 0xe0, 0x08, 0x13, 0x8c, 0x04, 0x0d, 0x00, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x4a, 0x03, 0x50, 0x50, - 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0xf8, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x8b, - 0x59, 0x9c, 0x00, 0x19, 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x0d, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xa5, - 0x4a, 0x03, 0x50, 0x2f, 0x00, 0x00, 0xaa, 0xaa, 0x59, 0x9c, 0x10, 0x18, - 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x00, 0x30, 0x59, 0xa8, 0x00, 0x69, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0c, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x59, 0x9c, 0x10, 0x18, 0x82, 0x08, 0x15, 0x00, 0xff, 0xff, 0xff, 0xcf, - 0x82, 0x08, 0x15, 0x40, 0x00, 0x00, 0x00, 0x10, 0x48, 0x0b, 0x38, 0x18, - 0x04, 0x01, 0xf0, 0x10, 0x82, 0x08, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x07, 0x82, 0x08, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x0a, 0x82, 0x08, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x04, 0x02, 0x00, 0x02, 0x48, 0x07, 0x50, 0x2f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0x70, 0x04, 0x00, 0x00, 0x08, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x46, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x59, - 0x59, 0xa8, 0x00, 0x27, 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x50, 0x27, - 0x49, 0xf3, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x4b, 0xc8, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x63, - 0x4a, 0x03, 0x88, 0x05, 0xff, 0xff, 0xff, 0xff, 0x4a, 0x03, 0xc0, 0x14, - 0x00, 0x40, 0x00, 0x40, 0x4a, 0x03, 0xc0, 0x13, 0x00, 0x40, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xe7, 0x59, 0xa0, 0x00, 0x1d, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x40, 0x1d, 0x49, 0xf3, 0xc8, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x00, 0x00, 0x00, 0x18, - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x41, 0x9c, 0x00, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa8, 0x00, 0x12, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, - 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, - 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb5, 0xf0, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x36, 0xdd, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x42, 0x00, 0xa0, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x44, 0x50, 0xa8, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x42, 0x02, 0x88, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x20, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x59, 0xa8, 0x10, 0x0f, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x40, 0x18, 0x00, 0x00, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x30, 0x97, 0x00, 0x10, 0x30, 0x9a, 0x00, 0x10, 0x30, 0x9e, - 0x00, 0x10, 0x30, 0xa2, 0x82, 0x10, 0x25, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x04, 0x01, 0xf0, 0x14, 0x82, 0x10, 0x25, 0x00, 0xff, 0xff, 0x00, 0xff, - 0x84, 0x08, 0x11, 0xc0, 0x04, 0x01, 0xf0, 0x10, 0x82, 0x10, 0x25, 0x00, - 0xff, 0x00, 0xff, 0xff, 0x90, 0x08, 0x11, 0xc0, 0x04, 0x01, 0xf0, 0x0c, - 0x82, 0x10, 0x25, 0x00, 0x00, 0xff, 0xff, 0xff, 0x9c, 0x08, 0x01, 0xc0, - 0x80, 0x10, 0x25, 0x40, 0x44, 0x10, 0x18, 0x00, 0x42, 0x00, 0x30, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x20, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x0c, 0x18, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x40, 0x08, 0x00, 0x00, - 0x80, 0x10, 0x25, 0x40, 0x81, 0x46, 0x88, 0x00, 0x83, 0x44, 0x2c, 0x80, - 0x00, 0x00, 0x00, 0x7f, 0x04, 0x02, 0x10, 0x14, 0x4c, 0x08, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x4c, 0x1c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x5c, 0x00, 0x38, 0x00, - 0x5c, 0x00, 0x30, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x04, 0x02, 0x07, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, - 0x04, 0x02, 0x07, 0xef, 0x80, 0x18, 0x30, 0x00, 0x80, 0x1c, 0x38, 0x00, - 0x59, 0x34, 0x12, 0x02, 0x40, 0x18, 0x00, 0x00, 0x0c, 0x01, 0xf7, 0xce, - 0x82, 0x10, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x02, - 0x44, 0x10, 0x18, 0x00, 0x42, 0x00, 0x18, 0x00, 0x00, 0x10, 0xb5, 0xf0, - 0x50, 0x0c, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x80, 0x1c, 0x05, 0x40, 0x44, 0x00, 0x18, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x59, 0xa2, 0x8c, 0x06, 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0xa0, 0x12, 0x08, 0x59, 0xa0, 0x04, 0x08, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x41, 0x78, 0x40, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x41, 0x04, 0x00, 0x00, 0x08, 0x48, 0x03, 0x44, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x37, 0x7a, 0x59, 0xa0, 0x02, 0x0b, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x19, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x10, 0x16, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x2e, 0x04, 0x02, 0x00, 0x13, 0x49, 0x7a, 0x5a, 0x04, - 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0xfa, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x31, 0x1a, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa2, 0x8c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x41, 0x34, 0xa0, 0x00, 0x83, 0x2e, 0x5c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x41, 0x2c, 0xa8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x40, 0x54, 0xa0, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x59, 0x2c, 0x08, 0x02, - 0x82, 0x04, 0x05, 0x00, 0x00, 0xff, 0x00, 0xff, 0x90, 0x00, 0x01, 0xc0, - 0x82, 0x04, 0x15, 0x00, 0xff, 0x00, 0xff, 0x00, 0x80, 0x08, 0x05, 0x40, - 0x48, 0x02, 0x58, 0x02, 0x59, 0x2c, 0x08, 0x01, 0x82, 0x04, 0x05, 0x00, - 0x00, 0xff, 0x00, 0xff, 0x90, 0x00, 0x01, 0xc0, 0x82, 0x04, 0x15, 0x00, - 0xff, 0x00, 0xff, 0x00, 0x80, 0x08, 0x05, 0x40, 0x48, 0x02, 0x58, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, 0x90, 0x0c, 0x19, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x41, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x36, 0xdd, 0x49, 0x6f, 0xc8, 0x57, 0x49, 0x6f, 0x44, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x59, 0xa2, 0x8c, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x83, 0x34, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x83, 0x34, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x58, 0x04, 0x00, 0x01, 0x48, 0x03, 0x44, 0x09, 0x90, 0x00, 0x01, 0xc0, - 0x48, 0x03, 0x42, 0x09, 0x50, 0x04, 0x00, 0x00, 0x48, 0x03, 0x44, 0x07, - 0x90, 0x00, 0x01, 0xc0, 0x48, 0x03, 0x42, 0x07, 0x59, 0x34, 0x02, 0x00, - 0x48, 0x03, 0x44, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa0, 0x22, 0x0b, 0x8c, 0x10, 0x25, 0x00, 0x04, 0x02, 0x00, 0x2e, - 0x8c, 0x10, 0x25, 0x06, 0x04, 0x02, 0x00, 0x06, 0x59, 0xa0, 0x32, 0x08, - 0x82, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x59, 0xa2, 0x8c, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x22, 0x0b, - 0x8c, 0x10, 0x25, 0x06, 0x04, 0x00, 0x00, 0x04, 0x59, 0x34, 0x30, 0x02, - 0x82, 0x18, 0x35, 0x00, 0x00, 0xff, 0xff, 0xff, 0x49, 0x7a, 0x5a, 0x04, - 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0xbc, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x32, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa2, 0x8c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x19, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x49, 0x7a, 0x5a, 0x04, 0x4a, 0x02, 0x5c, 0x04, - 0x00, 0x00, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0x2e, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0xd1, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x31, 0xd2, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x28, 0x05, 0x82, 0x14, 0x0d, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x59, 0xa0, 0x02, 0x07, - 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, - 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x8c, 0x14, 0x2d, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x31, 0xed, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xee, 0x58, 0x0e, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x58, 0xec, 0x10, 0x07, 0x58, 0xec, 0x18, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, 0x59, 0x2c, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x14, 0x07, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, - 0x59, 0xa0, 0x1c, 0x09, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0xe8, - 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xe7, - 0x59, 0xa0, 0x02, 0x07, 0x59, 0xa0, 0x14, 0x07, 0x90, 0x00, 0x01, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x02, 0x09, 0x59, 0xa0, 0x1c, 0x09, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x88, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xdd, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x32, 0x2e, 0x1c, 0x01, 0xf0, 0x00, - 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa0, 0x02, 0x0b, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x83, 0x88, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x40, 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x01, 0x10, 0x00, 0x49, 0x7b, 0x88, 0x85, 0x4a, 0x03, 0x42, 0x07, - 0x00, 0x00, 0x00, 0xe7, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xb6, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x49, 0x7a, 0x5a, 0x04, 0x4a, 0x02, 0x5c, 0x04, - 0x00, 0x00, 0x80, 0x00, 0x59, 0xa0, 0x04, 0x06, 0x80, 0x00, 0x01, 0xc0, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x00, 0x15, 0x80, - 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x05, 0x82, 0x00, 0x14, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x40, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x0c, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x32, 0x69, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x14, 0x06, - 0x8c, 0x08, 0x15, 0x08, 0x04, 0x02, 0x00, 0x07, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x1c, 0x07, - 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x49, 0x7b, 0x28, 0x04, 0x49, 0x7b, 0x28, 0x05, - 0x49, 0x7b, 0x28, 0x1c, 0x49, 0x7b, 0x28, 0x1d, 0x49, 0x7b, 0x28, 0x1f, - 0x49, 0x7b, 0x28, 0x20, 0x49, 0x7b, 0x28, 0x22, 0x49, 0x7b, 0x28, 0x23, - 0x48, 0x03, 0xc8, 0x56, 0x85, 0x0e, 0x1d, 0x06, 0x8c, 0x08, 0x15, 0x00, - 0x04, 0x00, 0x00, 0x05, 0x48, 0x03, 0xc8, 0x56, 0x83, 0x0e, 0x1d, 0x40, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf0, 0x04, 0x8c, 0x08, 0x15, 0x06, - 0x04, 0x00, 0x00, 0x02, 0x85, 0x0e, 0x1d, 0x42, 0x85, 0x0e, 0x1d, 0x0a, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x80, 0x08, 0x01, 0x0a, 0x0c, 0x02, 0x00, 0x36, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x09, - 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x1f, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xfb, 0x49, 0x7b, 0x50, 0x2f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3d, 0xec, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0xa0, 0x0a, 0x07, - 0x48, 0x07, 0x88, 0xa7, 0x59, 0xc4, 0x00, 0xa3, 0x82, 0x00, 0x05, 0x00, - 0xfe, 0xff, 0xff, 0xff, 0x82, 0x00, 0x05, 0x40, 0x80, 0x01, 0x80, 0x00, - 0x40, 0x00, 0x08, 0x00, 0x84, 0x04, 0x0d, 0x20, 0x48, 0x03, 0x88, 0xa3, - 0x48, 0x07, 0x88, 0xa3, 0x49, 0x7b, 0x50, 0x4b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x2d, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0x74, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x43, 0x59, 0xa0, 0x04, 0x07, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x08, 0xc4, 0x80, 0x05, 0xd4, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x03, 0x59, 0xa0, 0x02, 0x07, - 0x80, 0x00, 0x01, 0x10, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0xb1, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x00, 0x10, 0x32, 0x9a, - 0x00, 0x10, 0x32, 0x9d, 0x00, 0x10, 0x32, 0xa5, 0x00, 0x10, 0x1e, 0xdd, - 0x00, 0x10, 0x32, 0xa2, 0x00, 0x10, 0x1e, 0xdd, 0x00, 0x10, 0x1e, 0xdd, - 0x00, 0x10, 0x1e, 0xdd, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x04, 0x07, - 0x59, 0xa0, 0x0a, 0x07, 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x05, 0xd8, 0x07, 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x0a, 0x09, - 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, 0x48, 0x05, 0xd8, 0x08, - 0x4a, 0x01, 0xd8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xfb, 0xcc, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x41, 0x7a, 0x88, 0x00, - 0x49, 0x7b, 0x40, 0x01, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x48, 0x03, 0x40, 0x02, 0x59, 0xa0, 0x04, 0x06, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x9a, 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, - 0x4c, 0x64, 0x00, 0x00, 0x41, 0x78, 0xb8, 0x00, 0x59, 0xa0, 0xc4, 0x06, - 0x59, 0xa0, 0xc8, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x2c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x02, - 0x04, 0x02, 0x00, 0x26, 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x22, - 0x8c, 0x60, 0xc5, 0x00, 0x04, 0x00, 0x00, 0x08, 0x59, 0x34, 0x00, 0x09, - 0x44, 0x00, 0xc8, 0x00, 0x80, 0x64, 0xc8, 0x00, 0x59, 0x34, 0x00, 0x08, - 0x44, 0x00, 0xc8, 0x00, 0x80, 0x64, 0xc8, 0x00, 0x04, 0x01, 0xf0, 0x07, - 0x59, 0x34, 0x00, 0x07, 0x44, 0x00, 0xc8, 0x00, 0x80, 0x64, 0xc8, 0x00, - 0x59, 0x34, 0x00, 0x06, 0x44, 0x00, 0xc8, 0x00, 0x80, 0x64, 0xc8, 0x00, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x00, 0x00, 0x0d, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfc, 0x04, 0x00, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, 0x04, 0x00, 0x00, 0x03, - 0x85, 0x46, 0x8d, 0x5e, 0x04, 0x01, 0xf0, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0x55, 0x04, 0x02, 0x00, 0x02, 0x85, 0x46, 0x8d, 0x5e, - 0x45, 0x44, 0xc8, 0x00, 0x85, 0x46, 0x8d, 0x1e, 0x80, 0x64, 0xc8, 0x00, - 0x82, 0x5c, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x81, 0x46, 0x88, 0x00, - 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x04, 0x00, 0x10, 0x0e, - 0x8c, 0x60, 0xc5, 0x06, 0x04, 0x00, 0x00, 0x29, 0x83, 0x44, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0x07, 0xfe, 0x04, 0x01, 0xf0, 0x06, 0x83, 0x44, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xff, 0x04, 0x02, 0x00, 0x20, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0x07, 0xfc, 0x82, 0x5c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x3c, - 0x04, 0x02, 0x07, 0xbf, 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x04, 0x00, - 0x48, 0x03, 0x40, 0x01, 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x06, - 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x04, 0x84, 0x60, 0xc5, 0x7e, - 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf7, 0xb2, 0x49, 0x47, 0x40, 0x00, - 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, 0x48, 0x01, 0xd8, 0x03, - 0x40, 0xec, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x33, 0x88, 0x5c, 0x00, 0xc8, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x1a, 0x80, 0x5c, 0xb9, 0xc0, - 0x04, 0x00, 0x00, 0x24, 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x04, 0x00, - 0x48, 0x03, 0x40, 0x01, 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x03, - 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf0, 0x0e, 0x59, 0xa0, 0x08, 0x01, - 0x48, 0x07, 0x44, 0x06, 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, - 0x48, 0x01, 0xd8, 0x03, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x1e, 0x86, - 0x40, 0xec, 0x10, 0x00, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x0c, 0x00, 0x59, 0xa0, 0x02, 0x0a, - 0x80, 0x04, 0x04, 0x80, 0x48, 0x03, 0x42, 0x07, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x0a, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa0, 0x08, 0x01, 0x48, 0x07, 0x44, 0x06, 0x5c, 0x00, 0xc8, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa2, 0x88, 0x00, - 0x04, 0x01, 0xf7, 0x68, 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, - 0x4c, 0x64, 0x00, 0x00, 0x41, 0x78, 0xb8, 0x00, 0x59, 0xa0, 0xc4, 0x06, - 0x59, 0xa0, 0xc8, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x31, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x02, - 0x04, 0x02, 0x00, 0x2b, 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x27, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x00, 0x00, 0x11, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfc, 0x04, 0x00, 0x00, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, 0x04, 0x00, 0x00, 0x05, - 0x59, 0x34, 0x04, 0x03, 0x84, 0x00, 0x05, 0x5e, 0x48, 0x02, 0x6c, 0x03, - 0x04, 0x01, 0xf0, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0x55, - 0x04, 0x02, 0x00, 0x04, 0x59, 0x34, 0x04, 0x03, 0x84, 0x00, 0x05, 0x5e, - 0x48, 0x02, 0x6c, 0x03, 0x41, 0x34, 0xa0, 0x00, 0x40, 0x64, 0xa8, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x59, 0x34, 0x00, 0x07, 0x44, 0x00, 0xa8, 0x00, - 0x59, 0x34, 0x00, 0x06, 0x48, 0x00, 0xa8, 0x01, 0x59, 0x34, 0x00, 0x09, - 0x48, 0x00, 0xa8, 0x02, 0x59, 0x34, 0x00, 0x08, 0x48, 0x00, 0xa8, 0x03, - 0x59, 0x34, 0x04, 0x03, 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x6c, 0x03, - 0x82, 0x64, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x82, 0x5c, 0xbc, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x81, 0x46, 0x88, 0x00, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x00, 0x10, 0x0e, 0x8c, 0x60, 0xc5, 0x06, - 0x04, 0x00, 0x00, 0x2a, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xf0, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x04, 0x01, 0xf0, 0x06, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xff, - 0x04, 0x02, 0x00, 0x21, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x82, 0x5c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf7, 0xb9, 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x04, 0x00, - 0x48, 0x03, 0x40, 0x01, 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x06, - 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x04, 0x84, 0x60, 0xc5, 0x7e, - 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf7, 0xac, 0x49, 0x47, 0x40, 0x00, - 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, 0x48, 0x01, 0xd8, 0x03, - 0x40, 0xec, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x34, 0x27, 0x5c, 0x00, 0xc8, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x8c, 0x60, 0xc5, 0x3e, 0x04, 0x02, 0x00, 0x1a, 0x80, 0x5c, 0xb9, 0xc0, - 0x04, 0x00, 0x00, 0x24, 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x04, 0x00, - 0x48, 0x03, 0x40, 0x01, 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x03, - 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf0, 0x0e, 0x59, 0xa0, 0x08, 0x01, - 0x48, 0x07, 0x44, 0x06, 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, - 0x48, 0x01, 0xd8, 0x03, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x1e, 0x86, - 0x40, 0xec, 0x10, 0x00, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x0c, 0x00, 0x59, 0xa0, 0x02, 0x0a, - 0x80, 0x04, 0x04, 0x80, 0x48, 0x03, 0x42, 0x07, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x0a, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa0, 0x08, 0x01, 0x48, 0x07, 0x44, 0x06, 0x5c, 0x00, 0xc8, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa2, 0x88, 0x00, - 0x04, 0x01, 0xf7, 0x62, 0x42, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x7e, - 0x59, 0xa0, 0x0c, 0x06, 0x59, 0xa0, 0x12, 0x07, 0x59, 0xa0, 0x1c, 0x07, - 0x59, 0xa0, 0x22, 0x09, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x84, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x08, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x84, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x80, 0x14, 0x04, 0x80, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x80, 0x14, 0x04, 0x80, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x0c, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x84, 0x00, 0x01, 0xc0, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x10, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x84, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x82, 0x10, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x80, 0x14, 0x04, 0x80, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x90, 0x04, 0x01, 0xc0, - 0x80, 0x08, 0x0d, 0x40, 0x90, 0x0c, 0x01, 0xc0, 0x80, 0x10, 0x1d, 0x40, - 0x83, 0xa8, 0x34, 0x00, 0x00, 0x00, 0x00, 0x37, 0x44, 0x04, 0x30, 0x00, - 0x80, 0x18, 0x30, 0x00, 0x44, 0x0c, 0x30, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x04, 0x01, 0xfa, 0x29, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x01, 0xf8, 0x53, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x34, 0x99, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xee, 0x58, 0x0d, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x40, 0xc8, 0xa8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x58, 0xc8, 0x02, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x34, 0x58, 0xc8, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xfb, 0x04, 0x02, 0x00, 0x30, 0x58, 0xc8, 0x04, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x2d, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0xff, 0x01, 0x04, 0x02, 0x10, 0x2a, 0x58, 0xc8, 0x02, 0x02, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x5c, 0x04, 0x00, 0x10, 0x26, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5f, 0x96, 0x58, 0xc8, 0x0c, 0x08, - 0x58, 0xc8, 0x02, 0x04, 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x10, 0x20, - 0x58, 0xc8, 0x02, 0x04, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x02, 0x10, 0x1c, 0x58, 0xc8, 0x02, 0x05, 0x58, 0xc8, 0x0c, 0x08, - 0x80, 0x04, 0x09, 0x02, 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x10, 0x17, - 0x58, 0xc8, 0x0c, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xe1, - 0x04, 0x00, 0x00, 0x1b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5d, 0xa0, - 0x04, 0x02, 0x00, 0x12, 0x49, 0x79, 0x94, 0x0b, 0x59, 0xc4, 0x08, 0xa3, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x02, 0x48, 0x07, 0x88, 0xa3, - 0x4a, 0x03, 0x88, 0x30, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x88, 0x32, - 0x01, 0xff, 0xff, 0xff, 0x58, 0xc8, 0x02, 0x02, 0x48, 0x03, 0x08, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5d, 0x82, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5f, 0xec, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5f, 0xfd, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xd4, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xa0, 0x12, 0x07, 0x59, 0xa0, 0x04, 0x07, 0x90, 0x08, 0x11, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x1a, 0x09, 0x59, 0xa0, 0x04, 0x09, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x5c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf1, 0xe8, 0x59, 0x84, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x50, 0x59, 0x84, 0x00, 0x02, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x00, 0x00, 0x4d, 0x84, 0x00, 0x05, 0x46, - 0x48, 0x03, 0x08, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xd4, - 0x59, 0xc4, 0x08, 0xa3, 0x82, 0x04, 0x0d, 0x00, 0xff, 0xff, 0xff, 0xfd, - 0x48, 0x07, 0x88, 0xa3, 0x4c, 0x5c, 0x00, 0x00, 0x42, 0x00, 0xb8, 0x00, - 0x00, 0x10, 0xa4, 0x00, 0x50, 0x5e, 0x68, 0x00, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x59, 0x36, 0x60, 0x0e, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xc5, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x60, 0xac, 0x80, 0x5c, 0xb8, 0x00, - 0x82, 0x5c, 0x05, 0x80, 0x00, 0x10, 0xab, 0xf0, 0x04, 0x02, 0x07, 0xf3, - 0x59, 0x86, 0x60, 0x03, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0xb8, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xa8, 0x40, 0x5e, 0x60, 0x00, - 0x04, 0x01, 0xf7, 0xf5, 0x49, 0x7b, 0x08, 0x03, 0x42, 0x00, 0xb8, 0x00, - 0x00, 0x10, 0xac, 0xe8, 0x50, 0x5e, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x11, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0x0d, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x32, 0x68, 0x09, 0x81, 0x36, 0x69, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xa8, 0x45, 0x78, 0xb8, 0x00, - 0x80, 0x5c, 0xb8, 0x00, 0x82, 0x5c, 0x05, 0x80, 0x00, 0x10, 0xac, 0xf0, - 0x04, 0x02, 0x07, 0xe9, 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xac, 0xe6, - 0x49, 0x78, 0x08, 0x01, 0x49, 0x78, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5f, 0xec, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5f, 0xfd, - 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5d, 0x9b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x8d, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x0a, 0x07, 0x90, 0x04, 0x09, 0xc0, - 0x80, 0x04, 0x0d, 0x40, 0x48, 0x05, 0xd8, 0x07, 0x59, 0xa0, 0x04, 0x09, - 0x59, 0xa0, 0x0a, 0x09, 0x90, 0x04, 0x09, 0xc0, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x05, 0xd8, 0x08, 0x4a, 0x01, 0xd8, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf9, 0x5b, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x41, 0x7a, 0x88, 0x00, 0x49, 0x7b, 0x40, 0x01, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x48, 0x03, 0x40, 0x02, 0x4c, 0x5c, 0x00, 0x00, - 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x64, 0x00, 0x00, 0x41, 0x78, 0xb8, 0x00, - 0x41, 0x78, 0xc8, 0x00, 0x59, 0xa0, 0xc0, 0x02, 0x41, 0x44, 0x00, 0x00, - 0x81, 0xac, 0x04, 0x00, 0x50, 0x02, 0x68, 0x00, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x02, 0x00, 0x0a, 0x8c, 0x64, 0xcd, 0x3e, 0x04, 0x02, 0x00, 0x06, - 0x59, 0x34, 0x00, 0x02, 0x48, 0x00, 0xc0, 0x00, 0x49, 0x44, 0xc0, 0x01, - 0x82, 0x60, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x5c, 0xbc, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x81, 0x46, 0x88, 0x00, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x21, 0x82, 0x5c, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x02, 0x04, 0x01, 0xf7, 0xe8, - 0x59, 0xa0, 0x00, 0x01, 0x80, 0x5c, 0x04, 0x00, 0x48, 0x03, 0x40, 0x01, - 0x8c, 0x64, 0xcd, 0x3e, 0x04, 0x00, 0x00, 0x03, 0x41, 0x78, 0xb8, 0x00, - 0x04, 0x01, 0xf7, 0xe1, 0x59, 0xa0, 0x0a, 0x0a, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x04, - 0x41, 0x78, 0xb8, 0x00, 0x84, 0x64, 0xcd, 0x7e, 0x04, 0x01, 0xf7, 0xd9, - 0x49, 0x47, 0x40, 0x00, 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, - 0x48, 0x01, 0xd8, 0x03, 0x40, 0xec, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x9e, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x35, 0xd1, - 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x8c, 0x64, 0xcd, 0x3e, 0x04, 0x02, 0x00, 0x1b, - 0x80, 0x5c, 0xb9, 0xc0, 0x04, 0x00, 0x00, 0x25, 0x59, 0xa0, 0x00, 0x01, - 0x80, 0x5c, 0x04, 0x00, 0x48, 0x03, 0x40, 0x01, 0x59, 0xa0, 0x0a, 0x0a, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x03, 0x41, 0x78, 0xb8, 0x00, 0x04, 0x01, 0xf0, 0x0f, - 0x59, 0xa0, 0x08, 0x01, 0x80, 0x04, 0x09, 0x06, 0x48, 0x07, 0x44, 0x06, - 0x48, 0x5d, 0xd8, 0x05, 0x59, 0xa0, 0x00, 0x02, 0x48, 0x01, 0xd8, 0x03, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x1e, 0x86, 0x40, 0xec, 0x10, 0x00, - 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0x9e, 0x59, 0xa0, 0x00, 0x01, - 0x80, 0x5c, 0x0c, 0x00, 0x59, 0xa0, 0x02, 0x0a, 0x80, 0x04, 0x04, 0x80, - 0x48, 0x03, 0x42, 0x07, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x0a, - 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x08, 0x01, - 0x80, 0x04, 0x09, 0x06, 0x48, 0x07, 0x44, 0x06, 0x5c, 0x00, 0xc8, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0x8d, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, 0x59, 0xa2, 0x88, 0x00, - 0x04, 0x01, 0xf7, 0x8d, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x04, 0x01, 0xf8, 0xcd, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0xa0, 0x0c, 0x06, 0x80, 0x04, 0x09, 0x02, - 0x59, 0xa0, 0x04, 0x07, 0x59, 0xa0, 0x12, 0x07, 0x90, 0x08, 0x11, 0xc0, - 0x80, 0x08, 0x15, 0x40, 0x59, 0xa0, 0x04, 0x09, 0x59, 0xa0, 0x1a, 0x09, - 0x90, 0x0c, 0x19, 0xc0, 0x80, 0x0c, 0x1d, 0x40, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf8, 0xdf, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x35, 0xff, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x59, 0x2c, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x58, 0x54, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x42, 0xb1, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x49, 0x47, 0x40, 0x01, - 0x48, 0x1a, 0x68, 0x02, 0x59, 0x2c, 0x00, 0x0a, 0x82, 0x00, 0x1d, 0x80, - 0x70, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x04, 0x01, 0xf8, 0xa2, - 0x04, 0x02, 0x00, 0x11, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x82, 0x00, 0x1d, 0x80, - 0x72, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x04, 0x01, 0xf8, 0x98, 0x04, 0x02, 0x08, 0x97, 0x04, 0x02, 0x08, 0x96, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x58, 0xee, 0x58, 0x0d, - 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, 0x49, 0x7a, 0x5a, 0x04, - 0x59, 0x2c, 0x32, 0x08, 0x80, 0x18, 0x31, 0x02, 0x59, 0x2c, 0x18, 0x01, - 0x4a, 0x00, 0x18, 0x05, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0xe5, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x36, 0x39, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x2c, 0x40, 0x00, 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x05, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x83, 0x2c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x40, 0x1c, 0xa0, 0x00, - 0x40, 0x1c, 0xa8, 0x00, 0x58, 0x20, 0x28, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x82, 0x14, 0x35, 0x80, 0x70, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x40, 0x1c, 0x00, 0x00, - 0x58, 0x20, 0x10, 0x06, 0x58, 0x20, 0x18, 0x07, 0x58, 0x20, 0x22, 0x05, - 0x80, 0x10, 0x21, 0x02, 0x82, 0x14, 0x35, 0x80, 0x70, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x82, 0x10, 0x34, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x79, 0x82, 0x14, 0x35, 0x80, - 0x72, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, - 0x82, 0x10, 0x34, 0x80, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x1e, 0xdd, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x04, 0x01, 0xf8, 0x6e, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x36, 0x73, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xee, 0x58, 0x0e, 0x58, 0xec, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xd1, - 0x59, 0x2e, 0x58, 0x00, 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x40, 0x04, 0xa0, 0x00, 0x40, 0x04, 0xa8, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x40, 0xec, 0x10, 0x00, 0x4a, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x3c, 0x48, 0x04, 0x10, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x36, 0x95, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x31, 0xd8, 0x00, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0e, 0x58, 0xec, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x1e, 0xd1, 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x40, 0x04, 0xa0, 0x00, 0x40, 0x04, 0xa8, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x40, 0xec, 0x10, 0x00, 0x4a, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x30, 0x48, 0x04, 0x10, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, 0x4a, 0x01, 0xd8, 0x09, - 0x00, 0x10, 0x1e, 0x86, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x10, 0x49, 0x7a, 0x58, 0x00, - 0x58, 0xec, 0x00, 0x0d, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x04, - 0x49, 0x2d, 0xd8, 0x0d, 0x49, 0x2d, 0xd8, 0x0e, 0x04, 0x01, 0xf0, 0x07, - 0x58, 0xec, 0x00, 0x0e, 0x48, 0x02, 0x58, 0x00, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x45, 0x2c, 0x00, 0x00, 0x49, 0x2d, 0xd8, 0x0e, - 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x49, 0x2f, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x58, 0xec, 0x40, 0x0d, 0x80, 0x20, 0x41, 0xc0, 0x04, 0x00, 0x00, 0x08, - 0x48, 0x23, 0xc8, 0x57, 0x40, 0x22, 0x58, 0x00, 0x59, 0x2c, 0x40, 0x01, - 0x49, 0x7a, 0x58, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x04, 0x01, 0xf7, 0xf8, 0x49, 0x79, 0xd8, 0x0d, 0x49, 0x79, 0xd8, 0x0e, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, - 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, 0x48, 0x1b, 0xc8, 0x57, - 0x48, 0xef, 0xc8, 0x57, 0x48, 0x19, 0xd8, 0x01, 0x80, 0x04, 0x09, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x80, 0x04, 0x08, 0xc4, - 0x48, 0x05, 0xd8, 0x05, 0x48, 0x01, 0xd8, 0x03, 0x48, 0x09, 0xd8, 0x07, - 0x48, 0x0d, 0xd8, 0x08, 0x40, 0xec, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x9e, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x1e, 0x86, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x2d, 0x80, 0x48, 0x0b, 0xc8, 0x57, - 0x48, 0x0f, 0xc8, 0x57, 0x48, 0x13, 0xc8, 0x57, 0x48, 0x17, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0xa0, 0x00, 0x00, 0x42, 0x03, 0x40, 0x00, - 0x00, 0x10, 0xac, 0x71, 0x59, 0xa0, 0x00, 0x17, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x02, 0x00, 0x13, 0x04, 0x00, 0x60, 0x12, 0x48, 0x0b, 0xc0, 0x20, - 0x48, 0x0f, 0xc0, 0x21, 0x48, 0x13, 0xc0, 0x22, 0x48, 0x17, 0xc0, 0x23, - 0x90, 0x08, 0x11, 0xc0, 0x82, 0x08, 0x15, 0x40, 0x00, 0x00, 0x00, 0x12, - 0x48, 0x0b, 0xc0, 0x11, 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x53, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf7, 0xfb, 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x1c, 0x00, 0x00, - 0x80, 0x00, 0x08, 0x00, 0x48, 0x07, 0x40, 0x17, 0x59, 0xa0, 0x38, 0x1a, - 0x48, 0x1f, 0xc8, 0x57, 0x80, 0x1c, 0x39, 0xc0, 0x04, 0x02, 0x00, 0x27, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x10, 0x10, - 0x59, 0xa0, 0x00, 0x18, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x40, 0x18, - 0x59, 0xa0, 0x02, 0x19, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x13, 0x48, 0x03, 0x42, 0x19, - 0x04, 0x00, 0x10, 0x03, 0x49, 0x7b, 0x42, 0x19, 0x41, 0x78, 0x00, 0x00, - 0x59, 0xa0, 0x38, 0x16, 0x80, 0x1c, 0x3c, 0x00, 0x04, 0x01, 0xf0, 0x30, - 0x48, 0x03, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x04, 0x00, 0x00, 0x07, 0x49, 0x2f, 0x40, 0x1a, 0x49, 0x2f, 0x40, 0x1b, - 0x41, 0x2c, 0x38, 0x00, 0x49, 0x7b, 0x42, 0x1c, 0x49, 0x7a, 0x58, 0x13, - 0x04, 0x01, 0xf0, 0x26, 0x59, 0x88, 0x00, 0x52, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0x52, 0x59, 0xa0, 0x00, 0x17, 0x80, 0x00, 0x00, 0x40, - 0x48, 0x03, 0x40, 0x17, 0x59, 0xa0, 0x02, 0x19, 0x59, 0xa0, 0x38, 0x16, - 0x80, 0x1c, 0x3c, 0x00, 0x04, 0x01, 0xf0, 0x1c, 0x59, 0xa0, 0x02, 0x1c, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x02, 0x10, 0x04, 0x48, 0x03, 0x42, 0x1c, - 0x80, 0x1c, 0x3c, 0x00, 0x04, 0x01, 0xf0, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x04, 0x02, 0x00, 0x0b, 0x59, 0x88, 0x00, 0x52, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x52, 0x59, 0xa0, 0x00, 0x17, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0x40, 0x17, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0xa0, 0x02, 0x1c, 0x80, 0x1c, 0x3c, 0x00, 0x04, 0x01, 0xf0, 0x06, - 0x49, 0x2f, 0x40, 0x1a, 0x49, 0x2c, 0x38, 0x13, 0x41, 0x2c, 0x38, 0x00, - 0x49, 0x7b, 0x42, 0x1c, 0x49, 0x7a, 0x58, 0x13, 0x48, 0x08, 0x3c, 0x00, - 0x48, 0x0c, 0x3a, 0x00, 0x48, 0x10, 0x3c, 0x01, 0x48, 0x14, 0x3a, 0x01, - 0x5c, 0x00, 0x38, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x03, 0x40, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0f, 0xc8, 0x57, - 0x48, 0x13, 0xc8, 0x57, 0x48, 0x1b, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xe1, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x80, 0x18, 0x00, 0xd0, 0x40, 0x00, 0x28, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x14, 0x04, 0x01, 0xf7, 0x86, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x12, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0x9c, 0x00, 0x18, - 0x8c, 0x00, 0x05, 0x0e, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, 0x59, 0x34, 0x04, 0x05, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x31, 0x04, 0x49, 0x7a, 0x5a, 0x04, - 0x49, 0x7a, 0x58, 0x05, 0x4a, 0x02, 0x5c, 0x04, 0x00, 0x00, 0x80, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x91, 0x04, 0x02, 0x00, 0x05, - 0x4a, 0x03, 0x44, 0x06, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x1e, 0xd9, 0x4a, 0x01, 0xd8, 0x09, 0x00, 0x10, 0x37, 0xa2, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x00, 0x05, 0x82, 0x00, 0x05, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x44, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x59, 0xa2, 0x8c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x1e, 0xdd, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x31, 0x04, 0x82, 0x00, 0x15, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x0c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x8d, 0x04, 0x01, 0xf0, 0x09, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x5b, 0x8d, - 0x81, 0x46, 0x88, 0x40, 0x04, 0x02, 0x17, 0xfb, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x0c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x34, 0x18, 0x0a, 0x82, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x82, 0x0c, 0x1d, 0x80, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x1b, 0x04, 0x01, 0xff, 0x1f, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0xef, 0xc8, 0x57, 0x04, 0x01, 0x10, 0x00, 0x48, 0xef, 0xc8, 0x40, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x11, 0x40, 0x00, 0x00, 0x00, - 0x04, 0x01, 0x17, 0xff, 0x4a, 0x01, 0xd8, 0x0f, 0xbe, 0xef, 0xbe, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7b, 0x40, 0x00, 0x49, 0x7b, 0x40, 0x01, - 0x49, 0x7b, 0x40, 0x02, 0x49, 0x7b, 0x40, 0x03, 0x49, 0x7b, 0x40, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x00, 0xa4, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x00, 0x10, 0x0a, 0x82, 0x00, 0x6c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x07, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf9, 0x0c, 0x04, 0x01, 0xf7, 0xfb, - 0x00, 0x10, 0x38, 0x05, 0x00, 0x10, 0x38, 0x0b, 0x00, 0x10, 0x38, 0x30, - 0x00, 0x10, 0x38, 0x52, 0x00, 0x10, 0x39, 0x11, 0x00, 0x10, 0x38, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x08, 0x06, 0x8c, 0x04, 0x0d, 0x00, - 0x04, 0x02, 0x00, 0x03, 0x84, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x88, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x34, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x3f, 0x66, 0x4a, 0x03, 0x88, 0x05, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x4a, 0x59, 0xa8, 0x00, 0x14, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfa, 0x84, 0x00, 0x05, 0x42, - 0x48, 0x03, 0x50, 0x14, 0x49, 0x7b, 0x50, 0x23, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x45, 0x78, 0x08, 0x00, 0x49, 0x7b, 0x50, 0x12, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xef, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x0f, - 0x48, 0x03, 0x88, 0x06, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0xab, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x62, 0x04, 0x01, 0xf0, 0x01, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0xc8, 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf9, - 0x49, 0x7b, 0x50, 0x13, 0x42, 0x00, 0x60, 0x00, 0xbf, 0x7f, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x01, 0x80, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, 0xff, 0xfe, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x49, 0x7b, 0x50, 0x13, 0x4a, 0x03, 0x50, 0x11, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3f, 0x51, - 0x4a, 0x03, 0x88, 0x05, 0xff, 0xff, 0xff, 0xff, 0x59, 0xa8, 0x00, 0x11, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x38, 0x5d, - 0x00, 0x10, 0x38, 0x8a, 0x00, 0x10, 0x39, 0x07, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0xc4, 0x00, 0xa3, 0x84, 0x00, 0x05, 0x1e, 0x48, 0x03, 0x88, 0xa3, - 0x4a, 0x03, 0x50, 0x11, 0x00, 0x00, 0x00, 0x01, 0x59, 0xc4, 0x00, 0x08, - 0x84, 0x00, 0x05, 0x4e, 0x48, 0x03, 0x88, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x28, 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x1a, - 0x4a, 0x00, 0x78, 0x06, 0x11, 0x01, 0x00, 0x00, 0x42, 0x00, 0xa0, 0x00, - 0x00, 0x10, 0xac, 0x02, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x21, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x49, 0x7b, 0x88, 0x02, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x49, 0x7b, 0x50, 0x47, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3e, 0x1e, 0x4a, 0x03, 0x50, 0x47, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7b, 0x50, 0x15, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x58, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xf7, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x59, 0xa8, 0x00, 0x15, - 0x49, 0x7b, 0x50, 0x15, 0x80, 0x00, 0x25, 0x40, 0x04, 0x00, 0x00, 0x6a, - 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x75, 0x59, 0xa8, 0x08, 0x14, 0x8c, 0x04, 0x0d, 0x02, - 0x04, 0x00, 0x00, 0x4f, 0x82, 0x10, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x02, 0x00, 0x53, 0x82, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x80, 0x00, 0xb1, 0x04, 0x41, 0xcc, 0x10, 0x00, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0xad, 0x1a, 0x50, 0x08, 0x08, 0x00, 0x50, 0x0c, 0x00, 0x00, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x1e, 0x80, 0x08, 0x10, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x58, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, 0x00, 0x50, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x4a, 0x03, 0x50, 0x11, - 0x00, 0x00, 0x00, 0x02, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x14, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x06, 0x48, 0x03, 0x50, 0x14, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x3f, 0x28, 0x59, 0xcc, 0x08, 0x06, 0x82, 0x04, 0x0d, 0x80, - 0x11, 0x01, 0x00, 0x00, 0x04, 0x02, 0x00, 0x28, 0x59, 0xcc, 0x08, 0x00, - 0x82, 0x04, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x1a, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0xef, 0x04, 0x02, 0x00, 0x17, - 0x59, 0xcc, 0x08, 0x01, 0x82, 0x04, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0xef, 0x04, 0x02, 0x00, 0x11, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xac, 0x02, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x50, 0x50, 0x08, 0x00, 0x50, 0x54, 0x00, 0x00, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x07, 0x04, 0x02, 0x00, 0x10, 0x80, 0x50, 0xa0, 0x00, - 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf8, - 0x04, 0x01, 0xf0, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x02, - 0x48, 0x03, 0x50, 0x14, 0x41, 0xcc, 0xa0, 0x00, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x1a, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x58, 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, 0xff, 0xf7, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x06, 0x49, 0x7b, 0x50, 0x15, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3e, 0x1e, - 0x1c, 0x01, 0xf0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x13, - 0x82, 0x00, 0x6d, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x04, 0x00, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x1b, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x3d, 0xe7, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x06, 0x48, 0x03, 0x50, 0x14, 0x49, 0x7b, 0x50, 0x47, - 0x59, 0xa8, 0x00, 0x13, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x1e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x39, 0x4d, 0x00, 0x10, 0x39, 0x64, 0x00, 0x10, 0x39, 0x8d, - 0x00, 0x10, 0x39, 0xa8, 0x00, 0x10, 0x39, 0xcb, 0x00, 0x10, 0x39, 0xfb, - 0x00, 0x10, 0x3a, 0x1d, 0x00, 0x10, 0x3a, 0x50, 0x00, 0x10, 0x3a, 0x72, - 0x00, 0x10, 0x3a, 0x94, 0x00, 0x10, 0x3a, 0xd0, 0x00, 0x10, 0x3a, 0xf7, - 0x00, 0x10, 0x3b, 0x0d, 0x00, 0x10, 0x3b, 0x1f, 0x00, 0x10, 0x3b, 0x37, - 0x00, 0x10, 0x3b, 0x4f, 0x00, 0x10, 0x3b, 0x54, 0x00, 0x10, 0x3b, 0x7c, - 0x00, 0x10, 0x3b, 0x9f, 0x00, 0x10, 0x3b, 0xc5, 0x00, 0x10, 0x3b, 0xe8, - 0x00, 0x10, 0x3c, 0x1c, 0x00, 0x10, 0x3c, 0x5e, 0x00, 0x10, 0x3c, 0x86, - 0x00, 0x10, 0x3c, 0x9e, 0x00, 0x10, 0x3c, 0xde, 0x00, 0x10, 0x3c, 0xf7, - 0x00, 0x10, 0x3d, 0x0a, 0x00, 0x10, 0x3d, 0x0b, 0x48, 0x03, 0xc8, 0x56, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xff, 0xff, 0xd7, 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x04, 0x01, 0xf0, 0x09, 0x59, 0xc4, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x0f, 0x48, 0x03, 0x88, 0x06, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0x0c, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x42, 0x00, 0x60, 0x00, 0xbf, 0x7f, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x14, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0xab, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x83, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3e, 0xb4, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x5c, 0x4d, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x23, 0x48, 0x03, 0xc8, 0x57, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xbf, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x59, 0xc4, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x19, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, - 0x11, 0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x10, 0x07, - 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf1, 0xcb, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3d, 0xe7, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x03, - 0x42, 0x00, 0x60, 0x00, 0xbf, 0x3f, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0xab, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x83, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3e, 0xb4, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x6f, 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x46, 0x00, 0x78, 0x00, 0x11, 0x02, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3e, 0x1e, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x1e, - 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x16, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x02, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3d, 0xe7, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x05, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x46, 0x00, 0x78, 0x00, 0x11, 0x03, 0x00, 0x00, 0x8d, 0x0e, 0x1d, 0x06, - 0x04, 0x02, 0x00, 0x14, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x11, 0x59, 0xa8, 0x08, 0x0f, 0x82, 0x04, 0x05, 0x80, - 0x00, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x0d, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0x1c, 0xdd, - 0x50, 0x00, 0x08, 0x00, 0x80, 0x04, 0x09, 0x10, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfb, 0x93, 0x04, 0x00, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3e, 0xd2, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x21, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x3e, 0x1e, 0x59, 0xa8, 0x00, 0x15, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x1e, 0x48, 0x03, 0xc8, 0x57, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x16, 0x59, 0xcc, 0x10, 0x06, - 0x82, 0x08, 0x15, 0x80, 0x11, 0x03, 0x00, 0x00, 0x04, 0x02, 0x00, 0x12, - 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x08, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x44, - 0x48, 0x03, 0x50, 0x14, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x01, 0xf0, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf3, 0xcb, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x07, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x78, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0x78, 0x00, 0x11, 0x04, 0x00, 0x00, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x20, 0x59, 0xa8, 0x00, 0x14, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x1d, 0x59, 0x9c, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x1a, 0x59, 0x9c, 0x14, 0x02, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x7f, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4c, 0x08, 0x00, 0x00, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x08, 0x10, 0x00, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x48, 0x0b, 0x50, 0x0f, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, - 0x5c, 0x00, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xfb, 0x37, 0x04, 0x00, 0x00, 0x05, 0x04, 0x01, 0xfd, 0x2c, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, 0x85, 0x0e, 0x1d, 0x46, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf3, 0xcf, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x1e, - 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x16, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x04, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x03, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf3, 0x76, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x09, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0x78, 0x00, - 0x11, 0x05, 0x01, 0x00, 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x04, 0x01, 0xfa, 0x86, 0x04, 0x02, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x46, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xfb, 0x92, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xc7, - 0x5c, 0x02, 0x78, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x15, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x38, 0x48, 0x03, 0xc8, 0x57, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x30, 0x59, 0xcc, 0x10, 0x06, - 0x82, 0x08, 0x05, 0x00, 0x11, 0x05, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x11, 0x05, 0x00, 0x00, 0x04, 0x02, 0x00, 0x2a, 0x8c, 0x08, 0x15, 0x10, - 0x04, 0x00, 0x00, 0x14, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x4a, 0x03, 0x50, 0x12, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x01, 0xf8, 0x17, 0x04, 0x01, 0xf0, 0x14, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x13, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x49, 0x7b, 0x50, 0x12, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xf0, 0x6a, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf3, 0x18, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0b, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xad, 0x21, 0x40, 0x08, 0xa8, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x46, 0x00, 0xa8, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0x78, 0x00, - 0x11, 0x06, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xad, 0x21, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x00, 0x00, 0x05, 0x50, 0x08, 0x00, 0x00, - 0x46, 0x00, 0x10, 0x00, 0x00, 0xff, 0xff, 0xff, 0x04, 0x01, 0xf0, 0x0c, - 0x50, 0x08, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0xe0, - 0x80, 0x04, 0x0d, 0x40, 0x44, 0x04, 0x10, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x21, 0x04, 0x01, 0xf3, 0x28, 0x59, 0xa8, 0x00, 0x15, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x12, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x15, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x84, 0x04, 0x02, 0x00, 0x09, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x06, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x05, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x01, 0xf0, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf2, 0xdb, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0d, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x21, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x78, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0x78, 0x00, 0x11, 0x07, 0x00, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0x01, 0xf3, 0x00, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x14, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xa8, 0x00, 0x15, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x84, 0x04, 0x02, 0x00, 0x0c, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x07, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x12, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xfa, 0x91, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x0e, - 0x04, 0x01, 0xf0, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf2, 0xb1, - 0x48, 0x03, 0xc8, 0x56, 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x51, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x0f, 0x49, 0x7b, 0x50, 0x15, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, 0x00, 0x30, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xdf, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xfb, 0xfc, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5b, 0x43, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x02, 0x95, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x11, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x46, 0x00, 0xa8, 0x00, 0x11, 0x02, 0x00, 0x00, 0x8d, 0x0e, 0x1d, 0x06, - 0x04, 0x02, 0x00, 0x15, 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x0d, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x11, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x0e, 0x82, 0x00, 0x0c, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x04, 0x08, 0x00, 0x80, 0x04, 0x09, 0x10, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x7e, 0x04, 0x00, 0x00, 0x07, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfa, 0x06, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf2, 0xa3, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x20, - 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x16, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x03, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x01, 0xf8, 0x04, 0x04, 0x01, 0xf0, 0x02, - 0x04, 0x01, 0xfa, 0x4a, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x13, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x46, 0x00, 0xa8, 0x00, 0x11, 0x03, 0x00, 0x00, 0x8d, 0x0e, 0x1d, 0x06, - 0x04, 0x02, 0x00, 0x13, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x10, 0x59, 0xa8, 0x08, 0x0f, 0x82, 0x04, 0x05, 0x80, - 0x00, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x0c, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0x1c, 0xdd, - 0x50, 0x00, 0x08, 0x00, 0x80, 0x04, 0x09, 0x10, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf9, 0xbf, 0x04, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xfb, 0x11, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf2, 0x5a, 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x20, 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, - 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x16, 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, - 0x11, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x10, 0x07, - 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x14, 0x04, 0x01, 0xf8, 0x04, - 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xfa, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x15, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0xa8, 0x00, 0x11, 0x04, 0x00, 0x00, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x21, 0x59, 0xa8, 0x00, 0x14, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x1e, 0x59, 0x9c, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x1b, 0x59, 0x9c, 0x14, 0x02, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x7f, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4c, 0x08, 0x00, 0x00, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x08, 0x10, 0x00, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x48, 0x0b, 0x50, 0x0f, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, - 0x5c, 0x00, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf9, 0x6c, 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0x75, 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x46, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf2, 0x03, 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x3f, 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, - 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x35, 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x05, 0x00, - 0x11, 0x05, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, 0x11, 0x05, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x2f, 0x8c, 0x08, 0x15, 0x10, 0x04, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xfb, 0x21, 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, - 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x50, 0x14, 0x04, 0x01, 0xf0, 0x13, - 0x59, 0xcc, 0x10, 0x07, 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x0b, - 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x08, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x44, - 0x48, 0x03, 0x50, 0x14, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xfb, 0x03, 0x49, 0x7b, 0x50, 0x12, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x12, 0x00, 0x00, 0x00, 0x01, 0x59, 0xcc, 0x10, 0x07, - 0x8c, 0x08, 0x15, 0x3c, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0x50, 0x23, - 0x00, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x01, 0xf8, 0x04, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf9, 0x8b, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x17, - 0x59, 0xa8, 0x00, 0x12, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x06, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xad, 0x20, 0x46, 0x00, 0x10, 0x00, - 0x11, 0x05, 0x01, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x1b, 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xa8, 0x00, 0x14, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x05, - 0x04, 0x01, 0xf8, 0x94, 0x04, 0x02, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, - 0x85, 0x0e, 0x1d, 0x46, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf9, 0xa0, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xc7, - 0x5c, 0x02, 0x78, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x15, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x15, 0x48, 0x03, 0xc8, 0x57, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x84, 0x04, 0x02, 0x00, 0x0b, 0x59, 0xcc, 0x10, 0x06, - 0x82, 0x08, 0x15, 0x80, 0x11, 0x06, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xfa, 0xba, 0x4a, 0x03, 0x50, 0x13, - 0x00, 0x00, 0x00, 0x18, 0x04, 0x01, 0xf8, 0x04, 0x04, 0x01, 0xf0, 0x02, - 0x04, 0x01, 0xf9, 0x4b, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x19, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x21, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x38, 0x00, 0x00, 0x10, 0xad, 0x21, - 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x18, 0x40, 0x1c, 0x28, 0x00, - 0x50, 0x14, 0x10, 0x00, 0x80, 0x08, 0x01, 0x30, 0x80, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x18, 0x00, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x00, 0x00, 0xf0, 0x80, 0x08, 0x05, 0x40, 0x44, 0x00, 0x28, 0x00, - 0x59, 0xa8, 0x08, 0x0f, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x40, 0x0c, 0x10, 0x00, 0x80, 0x08, 0x11, 0x04, 0x82, 0x08, 0x24, 0x00, - 0x00, 0x10, 0xad, 0x21, 0x50, 0x10, 0x10, 0x00, 0x82, 0x0c, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x0c, 0x01, 0xf8, 0x06, 0x80, 0x08, 0x15, 0x40, - 0x44, 0x08, 0x20, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x21, - 0x04, 0x01, 0xf1, 0x58, 0x00, 0x10, 0x3c, 0xcb, 0x00, 0x10, 0x3c, 0xd0, - 0x00, 0x10, 0x3c, 0xd5, 0x00, 0x10, 0x3c, 0xda, 0x80, 0x04, 0x08, 0xf0, - 0x40, 0x04, 0x00, 0x00, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x04, 0x08, 0xe0, 0x40, 0x04, 0x00, 0x00, - 0x82, 0x08, 0x15, 0x00, 0xff, 0x00, 0xff, 0xff, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x04, 0x08, 0xd0, 0x40, 0x04, 0x00, 0x00, 0x82, 0x08, 0x15, 0x00, - 0xff, 0xff, 0x00, 0xff, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x82, 0x08, 0x15, 0x00, 0xff, 0xff, 0xff, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x16, - 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x84, 0x04, 0x02, 0x00, 0x0c, - 0x59, 0xcc, 0x10, 0x06, 0x82, 0x08, 0x15, 0x80, 0x11, 0x07, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x12, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf8, 0xd2, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x1a, - 0x04, 0x01, 0xf8, 0x04, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0xf2, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xfa, 0x58, 0x4a, 0x03, 0x50, 0x13, 0x00, 0x00, 0x00, 0x1b, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x20, 0x59, 0xa8, 0x20, 0x15, 0x40, 0x10, 0x00, 0x00, - 0x80, 0x00, 0xb1, 0x04, 0x40, 0x58, 0x08, 0x00, 0x54, 0x50, 0xa8, 0x00, - 0x80, 0x50, 0xa0, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf1, 0x15, 0x1c, 0x01, 0xf0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x40, 0x00, 0x00, 0x10, 0xad, 0x21, - 0x59, 0x9c, 0x28, 0x17, 0x8c, 0x14, 0x2d, 0x14, 0x04, 0x02, 0x00, 0x1f, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x40, 0x20, 0x00, 0x00, - 0x80, 0x08, 0x04, 0x00, 0x50, 0x00, 0x08, 0x00, 0x82, 0x04, 0x25, 0x80, - 0xff, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x05, 0x80, 0x08, 0x10, 0x40, - 0x80, 0x18, 0x30, 0x40, 0x04, 0x02, 0x07, 0xf8, 0x04, 0x01, 0xf0, 0x5e, - 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x06, 0x82, 0x04, 0x25, 0x80, - 0x3f, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x58, 0x82, 0x04, 0x0d, 0x40, - 0xc0, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x04, 0x20, 0x00, - 0x80, 0x10, 0x21, 0x02, 0x04, 0x02, 0x10, 0x21, 0x80, 0x0c, 0x18, 0xc2, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x04, 0x01, 0xf0, 0x4b, - 0x41, 0x78, 0x10, 0x00, 0x40, 0x20, 0x00, 0x00, 0x80, 0x08, 0x04, 0x00, - 0x50, 0x00, 0x08, 0x00, 0x82, 0x04, 0x25, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x02, 0x00, 0x05, 0x80, 0x08, 0x10, 0x00, 0x80, 0x18, 0x30, 0x40, - 0x04, 0x02, 0x07, 0xf8, 0x04, 0x01, 0xf0, 0x40, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x03, 0x82, 0x04, 0x0d, 0x40, 0xc0, 0x00, 0x00, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x18, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x40, 0x04, 0x20, 0x00, 0x80, 0x10, 0x20, 0xc2, - 0x04, 0x02, 0x10, 0x07, 0x80, 0x0c, 0x19, 0x02, 0x80, 0x58, 0xb0, 0x00, - 0x82, 0x58, 0x04, 0x80, 0x00, 0x00, 0x00, 0x21, 0x04, 0x00, 0x17, 0xfa, - 0x04, 0x01, 0xf0, 0x2f, 0x40, 0x20, 0x00, 0x00, 0x80, 0x08, 0x24, 0x00, - 0x50, 0x10, 0x00, 0x00, 0x80, 0x0c, 0x05, 0x40, 0x44, 0x00, 0x20, 0x00, - 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x50, 0x14, - 0x40, 0x58, 0x00, 0x00, 0x42, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x80, 0x14, 0x2c, 0x80, 0x40, 0x08, 0x00, 0x00, 0x42, 0x00, 0x38, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x1c, 0x04, 0x80, 0x80, 0x00, 0x00, 0xca, - 0x80, 0x14, 0x2d, 0x40, 0x82, 0x14, 0x4c, 0x00, 0x00, 0x10, 0x1c, 0xdd, - 0x50, 0x24, 0x28, 0x00, 0x82, 0x14, 0x2d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x48, 0x17, 0x50, 0x0f, 0x4c, 0x04, 0x00, 0x00, 0x40, 0x14, 0x08, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x1e, 0x5c, 0x00, 0x08, 0x00, - 0x40, 0x00, 0x18, 0x00, 0x50, 0x0c, 0x00, 0x00, 0x80, 0x10, 0x05, 0x40, - 0x44, 0x00, 0x18, 0x00, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x03, 0x50, 0x14, 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x21, - 0x40, 0x20, 0xa0, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x40, 0x08, 0xb0, 0x00, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x42, 0x00, 0xa8, 0x00, 0x00, 0x10, 0xad, 0x21, 0x40, 0x54, 0x10, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x40, 0x04, 0x18, 0x00, - 0x41, 0x78, 0x20, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x82, 0x0c, 0x1c, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x04, - 0x80, 0x10, 0x20, 0x00, 0x80, 0x00, 0x00, 0x40, 0x04, 0x01, 0xf7, 0xfb, - 0x40, 0x04, 0x18, 0x00, 0x80, 0x10, 0x21, 0xc0, 0x04, 0x00, 0x00, 0x05, - 0x82, 0x0c, 0x1c, 0x80, 0x00, 0x00, 0x00, 0x20, 0x80, 0x10, 0x20, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x80, 0x10, 0x20, 0xc2, - 0x80, 0x0c, 0x18, 0x40, 0x04, 0x02, 0x07, 0xfe, 0x80, 0x08, 0x3c, 0x00, - 0x83, 0xcc, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x14, 0x2c, 0x00, - 0x50, 0x14, 0x00, 0x00, 0x80, 0x10, 0x2d, 0x00, 0x04, 0x02, 0x00, 0x12, - 0x80, 0x10, 0x05, 0x40, 0x44, 0x00, 0x38, 0x00, 0x82, 0x04, 0x24, 0x00, - 0x00, 0x10, 0x1c, 0xdd, 0x50, 0x10, 0x28, 0x00, 0x82, 0x14, 0x2d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x48, 0x17, 0x50, 0x0f, 0x4c, 0x04, 0x00, 0x00, - 0x40, 0x14, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x1e, - 0x5c, 0x00, 0x08, 0x00, 0x59, 0xa8, 0x00, 0x14, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x03, 0x50, 0x14, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x17, - 0x59, 0xa8, 0x18, 0x4b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x68, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xb5, 0xf0, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0xa3, 0x41, - 0x48, 0x07, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x04, 0x01, 0xf8, 0xf5, - 0x49, 0x7b, 0x28, 0x04, 0x49, 0x7b, 0x28, 0x05, 0x49, 0x7b, 0x28, 0x1c, - 0x49, 0x7b, 0x28, 0x1d, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x60, 0x00, 0xbf, 0x7f, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x00, 0x01, 0x80, 0x00, 0x04, 0x01, 0xf9, 0x69, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xfe, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xf9, 0x65, - 0x49, 0x7b, 0x50, 0x4b, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x2d, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0x74, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x5b, 0x43, 0x48, 0x07, 0xc8, 0x56, 0x04, 0x01, 0xff, 0xe3, - 0x49, 0x7b, 0x50, 0x13, 0x49, 0x7b, 0x50, 0x15, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x01, 0xf1, 0x53, - 0x48, 0x07, 0xc8, 0x56, 0x04, 0x01, 0xff, 0xc6, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0x64, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x0a, 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x01, 0xf9, 0x3e, - 0x42, 0x00, 0x60, 0x00, 0xff, 0xdf, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x04, 0x01, 0xf9, 0x3a, 0x49, 0x7b, 0x50, 0x13, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0xf7, 0x04, 0x01, 0xf8, 0xb7, 0x59, 0xc4, 0x00, 0xa3, - 0x82, 0x00, 0x05, 0x00, 0xbf, 0x20, 0xbf, 0xff, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x01, 0xc0, 0x00, 0x48, 0x03, 0x88, 0xa3, 0x84, 0x00, 0x05, 0x20, - 0x48, 0x03, 0x88, 0xa3, 0x49, 0x7b, 0x50, 0x4b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x2d, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0x74, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5b, 0x43, 0x49, 0x7b, 0x50, 0x15, - 0x59, 0xb4, 0x00, 0xf5, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x48, 0x03, 0x68, 0xf5, - 0x80, 0x04, 0x00, 0xc4, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x48, 0x03, 0x91, 0x0a, 0x59, 0xb4, 0x00, 0xf6, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x07, 0xfd, 0x4a, 0x03, 0x68, 0xf0, - 0x00, 0x10, 0xad, 0x19, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xad, 0x20, - 0x4c, 0x04, 0x00, 0x00, 0x50, 0x00, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x80, - 0x11, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x50, 0x00, 0x08, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x5c, 0x00, 0x08, 0x00, 0x48, 0x03, 0x68, 0xf1, - 0x82, 0x04, 0x04, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x48, 0x03, 0x68, 0xf3, - 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x17, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x59, 0xc4, 0xb8, 0x05, - 0x8c, 0x5c, 0xbd, 0x3a, 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xe6, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x03, 0x88, 0x05, 0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x19, 0x46, 0x40, 0x00, 0xc0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0xc4, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7b, 0x50, 0x13, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x01, 0x0b, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x07, 0xe2, 0x59, 0xc4, 0x08, 0xa4, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x02, 0x00, 0x05, 0x59, 0xa8, 0x08, 0x13, 0x82, 0x04, 0x0d, 0x40, - 0x00, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf0, 0x04, 0x59, 0xa8, 0x08, 0x11, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x10, 0x00, 0x48, 0x07, 0x50, 0x4b, - 0x59, 0xa8, 0x08, 0x47, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x07, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x04, 0x01, 0xff, 0x44, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x64, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0xc4, 0x00, 0xa4, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x0a, 0x42, 0x00, 0x60, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, 0x00, 0x20, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0xbc, 0x42, 0x00, 0x60, 0x00, 0xff, 0xdf, 0xff, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xf8, 0xb8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xc2, 0x04, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xe4, 0x04, 0x02, 0x00, 0x11, 0x4a, 0x03, 0x50, 0x2f, - 0x00, 0x00, 0xaa, 0xaa, 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x59, 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x50, 0x27, - 0x5c, 0x00, 0x08, 0x00, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x08, - 0x4a, 0x03, 0x50, 0x49, 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x14, 0xc3, - 0x04, 0x01, 0xff, 0x22, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x09, - 0x42, 0x00, 0x60, 0x00, 0xbf, 0x7f, 0x7f, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x04, 0x01, 0xf0, 0x95, 0x42, 0x00, 0x60, 0x00, 0xbf, 0x7f, 0x7f, 0xff, - 0x41, 0x78, 0x68, 0x00, 0x04, 0x01, 0xf0, 0x91, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xe4, 0x04, 0x02, 0x00, 0x09, 0x59, 0xc4, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0xf0, 0x48, 0x03, 0x88, 0x06, - 0x42, 0x00, 0x60, 0x00, 0xbf, 0xff, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x04, 0x01, 0xf8, 0x86, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x08, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x04, 0x08, 0xd0, 0x59, 0xa8, 0x00, 0x14, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x06, 0x59, 0xa8, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x05, 0x40, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0xf7, - 0x48, 0x03, 0x88, 0xa7, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x4d, 0x3c, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x38, 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x3a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x4c, 0x18, 0x00, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x2a, - 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x39, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x4d, 0x3c, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x02, 0x02, 0x04, 0x01, 0xf0, 0x1c, 0x48, 0x07, 0xc8, 0x56, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x38, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x4d, 0x3c, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x02, 0x02, - 0x04, 0x01, 0xf0, 0x0e, 0x48, 0x07, 0xc8, 0x56, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x4d, 0x3c, 0x00, 0x00, - 0x4c, 0x18, 0x00, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0x64, 0x5c, 0x00, 0x30, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x55, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0x42, 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x78, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x04, 0x01, 0x10, 0x00, - 0x4a, 0x03, 0xc8, 0x40, 0x00, 0x10, 0xad, 0x19, 0x4a, 0x03, 0xc8, 0x42, - 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x04, 0x01, 0x17, 0xff, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x10, 0xad, 0x19, 0x46, 0x00, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x11, 0x80, 0x3c, 0x78, 0x00, 0x4a, 0x00, 0x78, 0x00, - 0x22, 0x00, 0x00, 0xef, 0x4a, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0xef, - 0x4a, 0x00, 0x78, 0x02, 0x01, 0x38, 0x00, 0x00, 0x4a, 0x00, 0x78, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x78, 0x04, 0xff, 0xff, 0xff, 0xff, - 0x4a, 0x00, 0x78, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x40, 0x68, 0x60, 0x00, 0x40, 0x6c, 0x68, 0x00, 0x59, 0xc4, 0x00, 0xa3, - 0x80, 0x30, 0x05, 0x00, 0x80, 0x34, 0x05, 0x40, 0x48, 0x03, 0x88, 0xa3, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x68, 0x60, 0x00, 0x48, 0x33, 0xc8, 0x57, - 0x59, 0xc4, 0x00, 0xa3, 0x80, 0x30, 0x05, 0x40, 0x48, 0x03, 0x88, 0xa3, - 0x80, 0x30, 0x05, 0x80, 0x48, 0x03, 0x88, 0xa3, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x50, 0x48, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x49, 0x7b, 0x50, 0x48, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xc8, 0x00, 0x02, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x90, 0x05, 0x00, 0x00, 0x01, 0x40, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xff, 0x04, 0x01, 0xf7, 0xf4, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x59, 0xc4, 0xb8, 0x05, - 0x48, 0x5f, 0xc8, 0x56, 0x8c, 0x5c, 0xbd, 0x3a, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe6, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x4a, 0x03, 0x88, 0x05, 0x02, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x19, 0x46, 0x40, 0x00, 0xc0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xc4, 0x4a, 0x03, 0x88, 0x05, - 0x04, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7a, 0x6a, 0x00, - 0x4a, 0x02, 0x6c, 0x00, 0x00, 0x00, 0x07, 0x07, 0x49, 0x7a, 0x68, 0x01, - 0x49, 0x7a, 0x68, 0x08, 0x49, 0x7a, 0x68, 0x09, 0x49, 0x7a, 0x68, 0x06, - 0x49, 0x7a, 0x68, 0x07, 0x49, 0x7a, 0x6c, 0x0b, 0x49, 0x7a, 0x68, 0x0c, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x00, 0x06, 0x59, 0x34, 0x08, 0x0f, - 0x59, 0x34, 0x00, 0x10, 0x80, 0x04, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x6a, 0x04, 0x00, 0x00, 0x01, 0x00, - 0x49, 0x7a, 0x6a, 0x03, 0x59, 0x34, 0x04, 0x02, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x48, 0x02, 0x6c, 0x02, 0x49, 0x7a, 0x6c, 0x04, - 0x49, 0x7a, 0x6a, 0x05, 0x49, 0x7a, 0x6c, 0x05, 0x49, 0x7a, 0x68, 0x11, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0d, 0x49, 0x46, 0x6c, 0x03, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x49, 0x7a, 0x68, 0x0d, 0x5c, 0x02, 0x58, 0x00, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x02, 0x59, 0x9c, 0x04, 0x01, - 0x48, 0x02, 0x6a, 0x0b, 0x59, 0x9c, 0x02, 0x08, 0x48, 0x02, 0x6c, 0x12, - 0x4a, 0x02, 0x68, 0x0a, 0x00, 0x00, 0x60, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x49, 0xc5, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x80, 0x00, 0x0d, 0x80, 0x04, 0x01, 0xf0, 0x2c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x44, 0x04, 0x02, 0x00, 0x17, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x10, 0x59, 0x34, 0x02, 0x12, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0x34, 0x0a, 0x00, 0x8c, 0x04, 0x0d, 0x1e, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xe9, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x04, 0x01, 0xf0, 0x17, 0x49, 0x2f, 0xc8, 0x57, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x01, 0xf0, 0x11, - 0x8d, 0x0e, 0x1d, 0x02, 0x04, 0x02, 0x00, 0x03, 0x8d, 0x0e, 0x1d, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf0, 0x0a, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x59, 0x34, 0x0a, 0x00, 0x8c, 0x04, 0x0d, 0x1e, 0x04, 0x00, 0x00, 0x05, - 0x49, 0x2f, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x49, 0x2f, 0xc8, 0x57, 0x80, 0x00, 0x0d, 0x80, - 0x48, 0x03, 0xc8, 0x57, 0x80, 0x02, 0x85, 0x40, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x0f, 0xc8, 0x57, 0x8d, 0x0e, 0x1d, 0x00, 0x04, 0x02, 0x07, 0xed, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x07, 0xe6, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x07, 0xe3, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xe9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0x07, 0x04, 0x00, 0x07, 0xc1, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x01, 0xed, 0x59, 0x2c, 0x02, 0x06, 0x49, 0x2f, 0xc8, 0x57, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x07, 0xff, 0x04, 0x02, 0x00, 0x06, - 0x4a, 0x02, 0x5c, 0x0a, 0x00, 0x00, 0x00, 0x30, 0x42, 0x02, 0x68, 0x00, - 0x00, 0x10, 0xac, 0xf1, 0x04, 0x01, 0xf0, 0x21, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x10, 0x45, 0x81, 0xac, 0x04, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x38, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x02, 0x04, 0x02, 0x00, 0x38, - 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x14, - 0x59, 0x2e, 0x60, 0x09, 0x83, 0x30, 0x04, 0x80, 0x00, 0x10, 0xd8, 0xd4, - 0x04, 0x00, 0x10, 0x3a, 0x41, 0x58, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x37, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0x36, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x7a, 0x58, 0x00, 0x59, 0x30, 0x00, 0x08, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x18, 0x49, 0x2e, 0x60, 0x08, - 0x04, 0x01, 0xf0, 0x10, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x19, 0x59, 0x2c, 0x02, 0x06, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x09, - 0x49, 0x7a, 0x60, 0x15, 0x49, 0x32, 0x58, 0x09, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x07, 0xff, 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x60, 0x15, - 0x00, 0x00, 0x80, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x1f, 0x40, 0x00, 0x08, 0x00, 0x58, 0x04, 0x00, 0x00, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x07, 0xfd, 0x49, 0x2c, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x19, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, - 0x04, 0x01, 0xf0, 0x15, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x04, 0x01, 0xf0, 0x12, 0x83, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf0, 0x0c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x04, 0x01, 0xf0, 0x09, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x01, 0xf0, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x07, 0xfb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x80, 0x00, 0x05, 0x40, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, - 0x59, 0x2e, 0x8c, 0x06, 0x83, 0x44, 0x0d, 0x80, 0x00, 0x00, 0x07, 0xfc, - 0x04, 0x00, 0x00, 0x04, 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x07, 0xf0, - 0x04, 0x02, 0x10, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, - 0x04, 0x02, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x1b, 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x10, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x04, 0x01, 0xf0, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x44, 0x04, 0x00, 0x07, 0xfb, 0x83, 0x0c, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x80, 0x00, 0x05, 0x40, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x04, 0x01, 0xf7, 0xfc, - 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2e, 0x8c, 0x06, 0x49, 0x47, 0xc8, 0x57, - 0x83, 0x44, 0x0c, 0x80, 0x00, 0x00, 0x08, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x11, 0x9c, 0x59, 0x2c, 0x42, 0x07, - 0x48, 0x23, 0xc8, 0x57, 0x82, 0x20, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x40, 0xa1, 0x00, 0x10, 0x41, 0x29, - 0x00, 0x10, 0x41, 0x79, 0x00, 0x10, 0x41, 0x84, 0x00, 0x10, 0x41, 0x8f, - 0x00, 0x10, 0x40, 0x9d, 0x00, 0x10, 0x40, 0x9d, 0x00, 0x10, 0x40, 0x9d, - 0x00, 0x10, 0x41, 0x9f, 0x00, 0x10, 0x41, 0xfd, 0x00, 0x10, 0x42, 0x22, - 0x00, 0x10, 0x40, 0x9d, 0x00, 0x10, 0x40, 0x9d, 0x00, 0x10, 0x40, 0x9d, - 0x00, 0x10, 0x40, 0x9d, 0x00, 0x10, 0x40, 0x9d, 0x48, 0x03, 0xc8, 0x57, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x01, 0xf1, 0x83, - 0x59, 0x2c, 0x10, 0x08, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x08, 0x4d, 0x80, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x01, 0x7b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x41, 0x04, 0x00, 0x00, 0x36, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x04, 0x02, 0x00, 0x1a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x52, 0xd5, 0x59, 0x34, 0x04, 0x05, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x5c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x8c, 0x20, 0x45, 0x0a, - 0x04, 0x00, 0x00, 0x28, 0x80, 0x00, 0x05, 0x80, 0x44, 0x00, 0x28, 0x00, - 0x59, 0x34, 0x00, 0x08, 0x48, 0x00, 0x28, 0x02, 0x59, 0x34, 0x00, 0x09, - 0x48, 0x00, 0x28, 0x01, 0x59, 0x34, 0x00, 0x06, 0x48, 0x00, 0x28, 0x04, - 0x59, 0x34, 0x00, 0x07, 0x48, 0x00, 0x28, 0x03, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xa5, - 0x04, 0x01, 0xf1, 0x8c, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, - 0x00, 0x00, 0x00, 0x1a, 0x04, 0x02, 0x00, 0x03, 0x40, 0x10, 0x10, 0x00, - 0x04, 0x01, 0xf1, 0x5c, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, - 0x00, 0x00, 0x00, 0x1b, 0x04, 0x02, 0x00, 0x03, 0x40, 0x18, 0x10, 0x00, - 0x04, 0x01, 0xf1, 0x56, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, - 0x00, 0x00, 0x00, 0x1c, 0x04, 0x00, 0x01, 0x57, 0x82, 0x00, 0x4d, 0x80, - 0x00, 0x00, 0x00, 0x19, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x01, 0x46, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x02, 0x01, 0x5d, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x1b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x18, 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x02, 0x00, 0x0c, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xda, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1c, 0x40, 0x18, 0x10, 0x00, 0x04, 0x02, 0x01, 0x2d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x01, 0x37, - 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x8c, 0x20, 0x45, 0x0a, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x2c, 0x04, 0x04, 0x84, 0x00, 0x05, 0x5c, 0x48, 0x02, 0x5c, 0x04, - 0x4c, 0x20, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x18, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x00, 0x40, 0x00, 0x8c, 0x20, 0x45, 0x12, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0x9c, 0x00, 0x18, 0x8c, 0x00, 0x05, 0x18, - 0x04, 0x00, 0x00, 0x08, 0x59, 0x2c, 0x00, 0x09, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x03, 0x80, 0x59, 0x34, 0x08, 0x0a, 0x80, 0x04, 0x0d, 0x40, - 0x84, 0x04, 0x0d, 0x54, 0x48, 0x06, 0x68, 0x0a, 0x41, 0x7a, 0x78, 0x00, - 0x04, 0x01, 0xf9, 0x3e, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf9, 0x4a, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf1, 0x30, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x01, 0x12, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x1f, - 0x04, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x02, 0x01, 0x12, 0x4c, 0x60, 0x00, 0x00, 0x41, 0x78, 0xc0, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x18, 0x00, 0x41, 0x7a, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, 0x5c, 0x00, 0xc0, 0x00, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x1b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x00, 0x00, 0x18, - 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x0c, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x09, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xda, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x40, 0x18, 0x10, 0x00, 0x04, 0x02, 0x00, 0xd4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0xde, 0x59, 0x34, 0x08, 0x0a, - 0x8c, 0x20, 0x45, 0x12, 0x04, 0x00, 0x00, 0x0c, 0x59, 0x9c, 0x00, 0x18, - 0x8c, 0x00, 0x05, 0x18, 0x04, 0x00, 0x00, 0x09, 0x59, 0x2c, 0x00, 0x09, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0x80, 0x82, 0x04, 0x15, 0x00, - 0xff, 0xff, 0xfc, 0x7f, 0x80, 0x08, 0x0d, 0x40, 0x84, 0x04, 0x0d, 0x54, - 0x04, 0x01, 0xf0, 0x02, 0x84, 0x04, 0x0d, 0x14, 0x48, 0x06, 0x68, 0x0a, - 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x41, 0x7a, 0x78, 0x00, 0x04, 0x01, 0xf8, 0xee, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf8, 0xfa, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0xe0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0xc2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x2e, 0x04, 0x02, 0x00, 0xc5, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0x5d, 0x04, 0x00, 0x00, 0xb6, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0xd5, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0xb7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x2e, 0x04, 0x02, 0x00, 0xba, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0xfa, 0x04, 0x00, 0x00, 0xab, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0xca, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0xac, 0x83, 0x44, 0x4d, 0x80, 0x00, 0x00, 0x07, 0xfe, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x00, 0x8d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0xaa, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0x75, 0x04, 0x00, 0x00, 0x9b, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0xba, 0x82, 0x20, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x02, 0x00, 0x05, 0x8c, 0x20, 0x45, 0x0e, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x02, 0x00, 0x7e, - 0x8c, 0x20, 0x45, 0x0a, 0x04, 0x00, 0x00, 0x0d, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8c, 0x20, 0x45, 0x0e, - 0x04, 0x02, 0x00, 0x02, 0x85, 0x3e, 0x7d, 0x56, 0x82, 0x20, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xfc, - 0x5c, 0x02, 0x78, 0x00, 0x04, 0x01, 0xf0, 0xa1, 0x8c, 0x20, 0x45, 0x08, - 0x04, 0x02, 0x00, 0x24, 0x59, 0x2c, 0x10, 0x08, 0x82, 0x08, 0x15, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x08, 0x4d, 0x80, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x66, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x41, 0x04, 0x00, 0x00, 0x2b, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1a, - 0x04, 0x02, 0x00, 0x03, 0x40, 0x10, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x64, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1b, - 0x04, 0x02, 0x00, 0x03, 0x40, 0x18, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x5e, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1c, - 0x04, 0x00, 0x00, 0x5f, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x19, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x4e, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf0, 0x65, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x62, - 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x8c, 0x20, 0x45, 0x0e, 0x04, 0x02, 0x00, 0x02, 0x85, 0x3e, 0x7d, 0x56, - 0x82, 0x20, 0x05, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0xe4, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x00, 0x3a, 0x04, 0x01, 0xf0, 0x6a, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0x0b, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x64, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x5d, - 0x04, 0x00, 0x00, 0x59, 0x04, 0x01, 0xf0, 0x5c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x5d, 0x04, 0x00, 0x00, 0x3c, 0x04, 0x01, 0xf0, 0x58, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x3e, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x48, - 0x8c, 0x20, 0x45, 0x08, 0x04, 0x00, 0x00, 0x0a, 0x4c, 0x60, 0x00, 0x00, - 0x41, 0x78, 0xc0, 0x00, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x18, 0x00, - 0x41, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, - 0x5c, 0x00, 0xc0, 0x00, 0x04, 0x01, 0xf0, 0x47, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x1f, 0x04, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0x30, 0x4c, 0x60, 0x00, 0x00, - 0x41, 0x78, 0xc0, 0x00, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x18, 0x00, - 0x41, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, - 0x5c, 0x00, 0xc0, 0x00, 0x48, 0x0b, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0x70, 0x04, 0x00, 0x00, 0x18, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x37, 0x04, 0x01, 0xf7, 0xdb, 0x48, 0x0b, 0xc8, 0x57, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x19, 0x40, 0x00, 0x10, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x0a, - 0x48, 0x0b, 0xc8, 0x57, 0x40, 0x00, 0x08, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x05, 0x48, 0x0b, 0xc8, 0x57, - 0x40, 0x00, 0x08, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, - 0x04, 0x01, 0xf0, 0x20, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xf7, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xf1, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x40, 0x00, 0x10, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf7, 0xea, 0x48, 0x0b, 0xc8, 0x57, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xe4, 0x48, 0x0b, 0xc8, 0x57, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xe0, - 0x80, 0x02, 0x85, 0x80, 0x41, 0x78, 0xb0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x37, 0xc8, 0x57, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x12, 0x00, - 0x81, 0x3e, 0x79, 0xc0, 0x04, 0x00, 0x00, 0x03, 0x84, 0x08, 0x15, 0x40, - 0x04, 0x01, 0xf0, 0x02, 0x84, 0x08, 0x15, 0x00, 0x48, 0x0a, 0x6a, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x08, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x49, 0x37, 0xc8, 0x57, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x04, 0x01, 0xf0, 0x21, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x04, 0x04, 0x01, 0xf0, 0x1b, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, - 0x04, 0x00, 0x00, 0x16, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x04, 0x00, 0x00, 0x11, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x04, 0x05, 0x04, 0x00, 0x00, 0x0c, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x09, - 0x04, 0x00, 0x00, 0x07, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0b, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x02, 0x6c, 0x00, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x05, - 0x59, 0x34, 0x14, 0x04, 0x80, 0x08, 0x11, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x30, 0x00, 0x04, 0x01, 0xf8, 0x0e, 0x41, 0x35, 0x88, 0x00, - 0x04, 0x00, 0x00, 0x02, 0x41, 0x79, 0x88, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x30, 0x00, - 0x04, 0x01, 0xf8, 0x0b, 0x41, 0x35, 0x88, 0x00, 0x04, 0x00, 0x00, 0x02, - 0x41, 0x79, 0x88, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x49, 0x47, 0xc8, 0x57, 0x48, 0x1b, 0xc8, 0x57, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x34, 0x83, 0x44, 0x14, 0x00, - 0x00, 0x10, 0xa4, 0x00, 0x50, 0x08, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, - 0x04, 0x02, 0x00, 0x11, 0x4c, 0x18, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x41, 0x2e, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0x30, 0x00, 0x04, 0x00, 0x00, 0x27, - 0x45, 0x34, 0x10, 0x00, 0x49, 0x7a, 0x68, 0x0d, 0x49, 0x7a, 0x68, 0x10, - 0x49, 0x7a, 0x68, 0x0f, 0x49, 0x7a, 0x68, 0x0e, 0x4c, 0x18, 0x00, 0x00, - 0x04, 0x01, 0xfc, 0xb4, 0x5c, 0x00, 0x30, 0x00, 0x59, 0x34, 0x0a, 0x12, - 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x09, 0x82, 0x18, 0x05, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x04, 0x00, 0x00, 0x08, 0x59, 0xa8, 0x10, 0x0f, - 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0x00, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x04, - 0x82, 0x18, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xd0, - 0x80, 0x04, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x02, 0x6a, 0x12, 0x59, 0x34, 0x00, 0x02, 0x80, 0x18, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x1b, 0xc8, 0x57, 0x48, 0x1a, 0x68, 0x02, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfc, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x47, 0xc8, 0x57, 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x02, 0x10, 0x11, 0x83, 0x44, 0x14, 0x00, 0x00, 0x10, 0xa4, 0x00, - 0x50, 0x08, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0x09, - 0x8d, 0x0e, 0x1d, 0x02, 0x04, 0x00, 0x00, 0x04, 0x59, 0x34, 0x02, 0x00, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf7, 0xfe, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x02, 0x10, 0x24, 0x83, 0x44, 0x14, 0x00, 0x00, 0x10, 0xa4, 0x00, - 0x50, 0x08, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x1b, - 0x45, 0x78, 0x10, 0x00, 0x59, 0x34, 0x00, 0x0d, 0x80, 0x02, 0x5d, 0x40, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x59, 0x36, 0x60, 0x11, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x0e, 0x4c, 0x64, 0x00, 0x00, - 0x59, 0x30, 0xc8, 0x00, 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x82, 0x66, 0x65, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x07, 0xf6, 0x5c, 0x00, 0xc8, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xc5, 0x41, 0x36, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2f, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfb, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x41, 0x35, 0x88, 0x00, 0x04, 0x00, 0x00, 0x02, 0x41, 0x79, 0x88, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0xcc, 0x00, 0x01, 0x49, 0x37, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x68, 0x02, 0x49, 0x7a, 0x6c, 0x01, - 0x49, 0x7a, 0x6a, 0x01, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x02, - 0x48, 0x02, 0x6a, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x17, 0x59, 0x34, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xfe, 0x04, 0x00, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x10, 0x04, 0x01, 0xf0, 0x08, - 0x59, 0xcc, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x18, 0x04, 0x00, 0x00, 0x0c, - 0x59, 0xcc, 0x00, 0x09, 0x48, 0x03, 0x50, 0x32, 0x59, 0xcc, 0x00, 0x0a, - 0x48, 0x03, 0x50, 0x33, 0x59, 0xcc, 0x02, 0x07, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x48, 0x03, 0x88, 0x93, 0x48, 0x03, 0x50, 0x1d, 0x59, 0xcc, 0x0a, 0x09, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x10, 0x59, 0xcc, 0x04, 0x08, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x04, 0x0d, 0x40, 0x59, 0x34, 0x00, 0x0a, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xee, 0x80, 0x04, 0x05, 0x40, 0x48, 0x02, 0x68, 0x0a, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x83, 0x34, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x83, 0x34, 0xac, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x59, 0xcc, 0x0a, 0x18, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x0c, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x10, 0x04, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xad, 0x10, - 0x58, 0x08, 0x02, 0x01, 0x80, 0x04, 0x14, 0x80, 0x04, 0x00, 0x10, 0x02, - 0x40, 0x00, 0x08, 0x00, 0x48, 0x06, 0x6a, 0x04, 0x59, 0x34, 0x04, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x00, 0x03, - 0x59, 0xcc, 0x0a, 0x08, 0x48, 0x06, 0x6a, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xfd, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x23, 0x49, 0x37, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x56, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x03, 0x50, 0x23, 0x59, 0xcc, 0x02, 0x07, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x02, 0x6a, 0x05, 0x59, 0xcc, 0x02, 0x0a, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x02, 0x6c, 0x05, 0x59, 0x34, 0x12, 0x00, 0x59, 0x9c, 0x08, 0x18, - 0x59, 0x34, 0x18, 0x0a, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x48, 0x0f, 0xc8, 0x57, 0x59, 0xcc, 0x20, 0x06, 0x82, 0x10, 0x25, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x82, 0x10, 0x25, 0x80, 0x02, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x09, - 0x8c, 0x0c, 0x1d, 0x14, 0x04, 0x00, 0x00, 0x03, 0x8c, 0x0c, 0x1d, 0x0e, - 0x04, 0x00, 0x00, 0x05, 0x8c, 0x04, 0x0d, 0x18, 0x04, 0x00, 0x00, 0x03, - 0x84, 0x08, 0x15, 0x4a, 0x04, 0x01, 0xf0, 0x02, 0x84, 0x08, 0x15, 0x0a, - 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x00, 0x09, 0x8c, 0x0c, 0x1d, 0x14, - 0x04, 0x00, 0x00, 0x03, 0x8c, 0x0c, 0x1d, 0x10, 0x04, 0x00, 0x00, 0x05, - 0x8c, 0x04, 0x0d, 0x18, 0x04, 0x00, 0x00, 0x03, 0x84, 0x08, 0x15, 0x4e, - 0x04, 0x01, 0xf0, 0x02, 0x84, 0x08, 0x15, 0x0e, 0x8c, 0x00, 0x05, 0x12, - 0x04, 0x00, 0x00, 0x09, 0x8c, 0x0c, 0x1d, 0x14, 0x04, 0x00, 0x00, 0x03, - 0x8c, 0x0c, 0x1d, 0x12, 0x04, 0x00, 0x00, 0x05, 0x8c, 0x04, 0x0d, 0x18, - 0x04, 0x00, 0x00, 0x03, 0x84, 0x08, 0x15, 0x5c, 0x04, 0x01, 0xf0, 0x02, - 0x84, 0x08, 0x15, 0x1c, 0x48, 0x0a, 0x6a, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x5c, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0d, 0x80, 0x02, 0x5d, 0x40, - 0x04, 0x00, 0x00, 0x29, 0x59, 0x2c, 0x00, 0x03, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x0b, 0x41, 0x2c, 0xb8, 0x00, - 0x59, 0x2c, 0x00, 0x01, 0x80, 0x02, 0x5d, 0x40, 0x04, 0x02, 0x07, 0xf9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x37, - 0x49, 0x2f, 0xc8, 0x57, 0x49, 0x2c, 0xb8, 0x01, 0x04, 0x01, 0xf0, 0x20, - 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x50, 0x04, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0xff, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x06, 0x80, 0x04, 0x10, 0x00, - 0x50, 0x08, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x07, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x45, 0x48, 0x08, 0x00, 0x45, 0x4c, 0x10, 0x00, - 0x59, 0x2c, 0x18, 0x03, 0x80, 0x0c, 0x18, 0x00, 0x48, 0x0e, 0x58, 0x03, - 0x48, 0x0f, 0xc8, 0x57, 0x04, 0x01, 0xf0, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x17, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x2e, 0x68, 0x0d, 0x49, 0x7a, 0x58, 0x02, 0x4a, 0x02, 0x58, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x4a, 0x58, 0x04, 0x49, 0x4e, 0x58, 0x05, - 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x0e, 0x46, 0x00, 0x08, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf7, 0xfb, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0d, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x1f, 0x59, 0x2c, 0x00, 0x02, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x1f, 0x41, 0x2e, 0x78, 0x00, - 0x04, 0x01, 0xf8, 0xd0, 0x04, 0x02, 0x00, 0x1c, 0x46, 0x00, 0x08, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x46, 0x00, 0x10, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x48, 0x13, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, 0x58, 0x0c, 0x00, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x10, 0x14, - 0x48, 0x0f, 0xc8, 0x57, 0x40, 0x0c, 0x00, 0x00, 0x81, 0x2c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x04, 0x58, 0x0c, 0x00, 0x01, 0x48, 0x02, 0x68, 0x0d, - 0x04, 0x01, 0xf0, 0x03, 0x58, 0x0c, 0x00, 0x01, 0x48, 0x00, 0x20, 0x01, - 0x40, 0x0e, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x78, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf7, 0xfc, 0x80, 0x00, 0x00, 0x40, 0x48, 0x00, 0x18, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x04, 0x01, 0xf7, 0xf6, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x00, 0x7b, 0x59, 0x30, 0x00, 0x07, 0x84, 0x00, 0x05, 0x4e, - 0x48, 0x02, 0x60, 0x07, 0x59, 0x2c, 0x1a, 0x04, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, - 0x04, 0x00, 0x00, 0x13, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xa3, - 0x8c, 0x00, 0x05, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x02, 0x00, 0xda, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, 0x59, 0x2c, 0x1a, 0x04, - 0x82, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xa3, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x02, 0xa3, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x2f, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xac, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x28, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x43, 0xc8, 0x57, 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x07, 0xf0, 0x41, 0x7a, 0x88, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x07, 0x8d, 0x3e, 0x7d, 0x06, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x17, 0x81, 0x46, 0x88, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf5, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x08, 0x8d, 0x3e, 0x7d, 0x02, - 0x04, 0x00, 0x00, 0x06, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf7, 0xeb, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x41, 0x78, 0x30, 0x00, 0x59, 0x36, 0x58, 0x0f, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x29, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x00, 0x00, 0x20, 0x8d, 0x3e, 0x7d, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf8, 0x3c, 0x04, 0x02, 0x00, 0x1c, - 0x59, 0x2c, 0x20, 0x00, 0x49, 0x7a, 0x58, 0x00, 0x80, 0x18, 0x31, 0xc0, - 0x04, 0x02, 0x00, 0x09, 0x59, 0x34, 0x00, 0x10, 0x81, 0x2c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x04, 0x49, 0x7a, 0x68, 0x0f, 0x49, 0x7a, 0x68, 0x10, - 0x04, 0x01, 0xf0, 0x08, 0x48, 0x12, 0x68, 0x0f, 0x04, 0x01, 0xf0, 0x06, - 0x48, 0x10, 0x30, 0x00, 0x59, 0x34, 0x00, 0x10, 0x81, 0x2c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x02, 0x48, 0x1a, 0x68, 0x10, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x58, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0xe5, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x40, 0x12, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xda, - 0x41, 0x2c, 0x30, 0x00, 0x59, 0x2e, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xd7, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x41, 0x78, 0x18, 0x00, 0x59, 0x34, 0x00, 0x0f, 0x80, 0x02, 0x5d, 0x40, - 0x04, 0x00, 0x00, 0x10, 0x59, 0x2c, 0x00, 0x05, 0x80, 0x20, 0x05, 0x80, - 0x59, 0x2c, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x41, 0x2c, 0x18, 0x00, - 0x04, 0x01, 0xf7, 0xf9, 0x49, 0x7a, 0x58, 0x00, 0x80, 0x0c, 0x19, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x48, 0x00, 0x18, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x04, 0x48, 0x0e, 0x68, 0x10, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x02, 0x68, 0x0f, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x07, 0xfd, 0x49, 0x7a, 0x68, 0x10, - 0x04, 0x01, 0xf7, 0xf9, 0x59, 0x2c, 0x00, 0x08, 0x81, 0x48, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x03, 0x59, 0x2c, 0x00, 0x09, 0x81, 0x4c, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x58, 0x00, 0x00, - 0x41, 0x3c, 0x18, 0x00, 0x40, 0x0c, 0x20, 0x00, 0x59, 0x3c, 0x00, 0x02, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x18, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x82, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x50, 0x04, 0x00, 0x00, 0x81, 0x48, 0x05, 0x80, 0x04, 0x02, 0x00, 0x05, - 0x80, 0x04, 0x10, 0x00, 0x50, 0x08, 0x00, 0x00, 0x81, 0x4c, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x0d, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf6, 0x40, 0x0c, 0x20, 0x00, - 0x58, 0x0c, 0x00, 0x01, 0x80, 0x00, 0x1d, 0x40, 0x04, 0x02, 0x07, 0xee, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf7, 0xfd, - 0x49, 0x37, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x34, 0x00, 0x0d, 0x80, 0x02, 0x5d, 0x40, 0x04, 0x02, 0x00, 0x16, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x10, - 0x49, 0x2e, 0x68, 0x0d, 0x4a, 0x02, 0x58, 0x02, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7a, 0x58, 0x03, 0x83, 0x2c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x46, 0x00, 0x08, 0x00, - 0xff, 0xff, 0xff, 0xff, 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x2e, 0x58, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x5c, 0x02, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x04, 0x01, 0xf7, 0xe9, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x36, 0x58, 0x0d, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x07, 0x49, 0x37, 0xc8, 0x57, - 0x49, 0x7a, 0x68, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x34, 0x04, 0x05, 0x49, 0x37, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x08, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x00, 0x00, 0x11, 0x59, 0xa8, 0x08, 0x14, 0x8c, 0x04, 0x0d, 0x04, - 0x04, 0x02, 0x00, 0x0e, 0x59, 0xa8, 0x08, 0x23, 0x8c, 0x04, 0x0d, 0x06, - 0x04, 0x00, 0x00, 0x0b, 0x83, 0xac, 0x04, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x04, 0x01, 0xf9, 0xbc, 0x04, 0x02, 0x00, 0x04, 0x59, 0x34, 0x02, 0x00, - 0x84, 0x00, 0x05, 0x5a, 0x48, 0x02, 0x6a, 0x00, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x00, 0x15, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x41, 0x7a, 0x88, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x0c, 0x04, 0x01, 0xf9, 0xaf, 0x04, 0x02, 0x00, 0x0a, - 0x59, 0xa8, 0x00, 0x0f, 0x59, 0x34, 0x08, 0x02, 0x80, 0x04, 0x05, 0x80, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x5a, 0x48, 0x02, 0x6a, 0x00, - 0x81, 0x46, 0x88, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf0, - 0x04, 0x01, 0xf8, 0x90, 0x04, 0x00, 0x00, 0x03, 0x59, 0xa8, 0x08, 0x33, - 0x04, 0x01, 0xf0, 0x05, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x45, 0x91, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x45, 0x91, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x08, 0x23, - 0x8c, 0x04, 0x0d, 0x06, 0x04, 0x00, 0x00, 0x14, 0x04, 0x01, 0xf8, 0x76, - 0x04, 0x00, 0x00, 0x12, 0x83, 0xae, 0x6c, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x51, 0x36, 0x68, 0x00, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x1a, - 0x48, 0x02, 0x6a, 0x00, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x45, 0x91, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1a, 0xdd, 0x04, 0x01, 0xf0, 0x2b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x80, 0x02, 0x8d, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x22, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x1a, 0x04, 0x00, 0x00, 0x1f, - 0x59, 0x36, 0x8c, 0x03, 0x41, 0x7a, 0x78, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x41, 0x78, 0x30, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9c, 0x1c, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, - 0x84, 0x00, 0x05, 0x1a, 0x48, 0x02, 0x6a, 0x00, 0x49, 0x37, 0xc8, 0x57, - 0x4a, 0x02, 0x6c, 0x00, 0x00, 0x00, 0x07, 0x07, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0xf7, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcf, 0x9c, - 0x41, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd2, 0x8a, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x81, 0x46, 0x88, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xda, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x38, 0x09, 0x58, 0x1c, 0x02, 0x00, - 0x84, 0x00, 0x05, 0x1a, 0x48, 0x00, 0x3a, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x02, 0x68, 0x00, 0x00, 0x10, 0xac, 0xf1, 0x49, 0x7a, 0x68, 0x0e, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x80, 0x49, 0x37, 0xc8, 0x57, 0x4a, 0x02, 0x6c, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x4a, 0x02, 0x68, 0x02, 0x00, 0xff, 0xff, 0xff, - 0x4a, 0x02, 0x6a, 0x04, 0x00, 0x00, 0x02, 0x00, 0x4a, 0x02, 0x6c, 0x04, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x09, - 0x50, 0x00, 0x00, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x0e, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x09, - 0x50, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x0a, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x56, 0x04, 0x01, 0xf9, 0x22, 0x04, 0x00, 0x00, 0x06, - 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0x05, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x83, 0xac, 0x04, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x1a, 0x5c, 0x02, 0x68, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x49, 0x3f, 0xc8, 0x57, - 0x59, 0x34, 0x04, 0x03, 0x81, 0xac, 0x04, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x81, 0x34, 0x05, 0x80, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x34, 0x12, 0x00, 0x81, 0x3e, 0x79, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x84, 0x08, 0x15, 0x5e, 0x04, 0x01, 0xf0, 0x02, 0x84, 0x08, 0x15, 0x1e, - 0x48, 0x0a, 0x6a, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x00, 0x00, 0x06, - 0x59, 0xa8, 0x08, 0x32, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x46, 0x38, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x37, 0xc8, 0x57, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x46, 0x38, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x59, 0xa8, 0x10, 0x23, - 0x84, 0x08, 0x15, 0x12, 0x48, 0x0b, 0x50, 0x23, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x38, 0x00, 0x00, 0x4c, 0x34, 0x00, 0x00, 0x4c, 0x24, 0x00, 0x00, - 0x4c, 0x60, 0x00, 0x00, 0x40, 0x08, 0xc0, 0x00, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x45, 0x80, 0x00, 0x2d, 0x80, - 0x41, 0x44, 0x20, 0x00, 0x83, 0x44, 0x74, 0x00, 0x00, 0x10, 0xa4, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x83, 0x44, 0x4c, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x50, 0x38, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x1e, 0x41, 0x44, 0x00, 0x00, 0x80, 0x10, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x43, 0x40, 0x10, 0x28, 0x00, 0x82, 0x10, 0x4c, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x00, 0x10, 0x15, 0x82, 0x10, 0x4d, 0x80, - 0x00, 0x00, 0x07, 0xfc, 0x04, 0x02, 0x00, 0x05, 0x82, 0x60, 0x4d, 0x80, - 0x00, 0xff, 0xff, 0xfc, 0x04, 0x02, 0x00, 0x2a, 0x04, 0x01, 0xf0, 0x0e, - 0x82, 0x10, 0x4d, 0x80, 0x00, 0x00, 0x07, 0xfd, 0x04, 0x02, 0x00, 0x05, - 0x82, 0x60, 0x4d, 0x80, 0x00, 0xff, 0xff, 0xfd, 0x04, 0x02, 0x00, 0x23, - 0x04, 0x01, 0xf0, 0x07, 0x82, 0x10, 0x4d, 0x80, 0x00, 0x00, 0x07, 0xff, - 0x04, 0x02, 0x00, 0x1f, 0x82, 0x60, 0x4d, 0x80, 0x00, 0xff, 0xff, 0xff, - 0x04, 0x02, 0x00, 0x1c, 0x84, 0x14, 0x2d, 0x5e, 0x04, 0x01, 0xf0, 0x29, - 0x40, 0x00, 0x68, 0x00, 0x58, 0x34, 0x30, 0x02, 0x82, 0x18, 0x35, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x40, 0x18, 0x00, 0x00, 0x80, 0x60, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x19, 0x40, 0x10, 0x00, 0x00, 0x81, 0x44, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x0a, 0x40, 0x36, 0x68, 0x00, 0x8c, 0x20, 0x45, 0x08, - 0x04, 0x00, 0x00, 0x54, 0x04, 0x01, 0xff, 0x81, 0x04, 0x02, 0x00, 0x52, - 0x49, 0x47, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, - 0x04, 0x01, 0xf0, 0x4f, 0x49, 0x47, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x48, 0x23, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, - 0x04, 0x01, 0xf0, 0x49, 0x49, 0x47, 0xc8, 0x57, 0x48, 0x63, 0xc8, 0x57, - 0x48, 0x13, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, - 0x04, 0x01, 0xf0, 0x43, 0x40, 0x10, 0x00, 0x00, 0x81, 0x44, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x07, 0x58, 0x34, 0x30, 0x02, 0x49, 0x47, 0xc8, 0x57, - 0x48, 0x1b, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, - 0x04, 0x01, 0xf0, 0x3a, 0x80, 0x10, 0x20, 0x00, 0x80, 0x38, 0x70, 0x00, - 0x83, 0x44, 0x4c, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x04, 0x00, 0x10, 0x09, - 0x82, 0x10, 0x4d, 0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x00, 0x0c, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xab, 0xf0, 0x04, 0x01, 0xf0, 0x07, 0x82, 0x10, 0x4d, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x00, 0x04, 0x41, 0x78, 0x20, 0x00, - 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xa4, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xa4, 0x80, 0x14, 0x29, 0xc0, 0x04, 0x02, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x47, 0xc8, 0x57, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf0, 0x1d, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x40, 0x60, 0x30, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, 0x49, 0x47, 0xc8, 0x57, - 0x49, 0x37, 0xc8, 0x57, 0x5c, 0x00, 0x30, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x02, 0x07, 0xf3, 0x49, 0x7a, 0x6a, 0x12, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x0d, 0x82, 0x60, 0x05, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x04, 0x00, 0x00, 0x06, 0x59, 0xa8, 0x48, 0x0f, - 0x82, 0x24, 0x4d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x80, 0x24, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x05, 0x82, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x00, 0x00, 0xd0, 0x48, 0x02, 0x6a, 0x12, 0x48, 0x62, 0x68, 0x02, - 0x80, 0x00, 0x05, 0x80, 0x80, 0x00, 0x05, 0x40, 0x5c, 0x00, 0xc0, 0x00, - 0x5c, 0x00, 0x48, 0x00, 0x5c, 0x00, 0x68, 0x00, 0x5c, 0x00, 0x70, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x34, 0x00, 0x0f, 0x59, 0x34, 0x14, 0x0b, - 0x80, 0x08, 0x10, 0x40, 0x04, 0x00, 0x10, 0x02, 0x48, 0x0a, 0x6c, 0x0b, - 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, 0x00, 0x02, 0x02, 0x68, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, - 0x4c, 0x30, 0x00, 0x00, 0x82, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x04, 0x00, 0x00, 0x06, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x70, 0x5c, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x0b, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x06, 0x49, 0x37, 0xc8, 0x57, - 0x04, 0x01, 0xfc, 0x1a, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xfc, 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, 0x80, 0x00, 0x0d, 0x80, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x4c, 0x04, 0x00, 0x00, - 0x40, 0x06, 0x88, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, - 0x04, 0x01, 0xff, 0xdd, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf7, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x06, 0x06, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x04, 0x04, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x06, 0x06, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, - 0x82, 0x00, 0xbd, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x5c, 0xc5, 0x80, - 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x03, 0x82, 0x5c, 0xc5, 0x80, - 0x00, 0x00, 0x06, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0xbd, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x84, 0x00, 0xb9, 0xc0, 0x80, 0x5c, 0x05, 0x80, - 0x49, 0x37, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x02, 0x6c, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x59, 0x2c, 0x02, 0x07, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x00, 0x00, 0x0f, 0x59, 0x2e, 0x8c, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x84, 0x00, 0x05, 0x48, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x01, 0xff, 0x7b, - 0x5c, 0x02, 0x78, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf7, 0xfc, 0x59, 0x2c, 0x04, 0x0b, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x19, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x16, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x01, 0x06, 0x59, 0xa8, 0x00, 0x23, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x02, 0x00, 0x05, - 0x59, 0xa8, 0x08, 0x2f, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x0c, - 0x04, 0x01, 0xf0, 0xfe, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0xf9, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x02, 0x00, 0x03, - 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x00, 0x00, 0xf4, 0x59, 0x2c, 0x10, 0x0a, - 0x82, 0x08, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0xd2, - 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x08, 0x05, 0x80, 0x04, 0x00, 0x00, 0xcc, - 0x59, 0x2c, 0x0c, 0x0b, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x80, 0x00, 0x04, 0x02, 0x10, 0xcc, - 0x59, 0x2e, 0x8c, 0x06, 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x10, 0x07, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x02, 0x00, 0xb3, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0xfe, - 0x04, 0x01, 0xf0, 0xb0, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0xfb, - 0x41, 0x78, 0x40, 0x00, 0x04, 0x01, 0xfe, 0x97, 0x04, 0x02, 0x00, 0xe2, - 0x59, 0x34, 0x22, 0x04, 0x59, 0x2c, 0x00, 0x0d, 0x80, 0x10, 0x04, 0x80, - 0x04, 0x00, 0x10, 0xbc, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x53, - 0x59, 0x2c, 0x24, 0x09, 0x82, 0x10, 0x05, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x04, 0x02, 0x00, 0xaa, 0x48, 0x13, 0xc8, 0x57, 0x59, 0x2c, 0x00, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x83, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0xa0, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x51, 0x04, 0x00, 0x00, 0x9d, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x16, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x4b, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x24, 0x04, 0x00, 0x00, 0x42, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x21, 0x04, 0x00, 0x00, 0x42, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x37, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x52, 0x04, 0x00, 0x00, 0x31, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x6b, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x1b, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x16, 0x04, 0x01, 0xff, 0x3c, 0x04, 0x00, 0x00, 0x14, - 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x0c, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x6f, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf9, 0xea, - 0x04, 0x02, 0x00, 0x65, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x81, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x10, - 0x49, 0x36, 0x60, 0x09, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf0, 0x44, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xff, 0x27, 0x04, 0x02, 0x00, 0x74, - 0x04, 0x01, 0xf0, 0x36, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, - 0x04, 0x01, 0xf0, 0x06, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xff, 0x13, 0x04, 0x02, 0x00, 0x69, 0x59, 0xa8, 0x00, 0x6c, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x16, 0x04, 0x01, 0xff, 0x02, - 0x04, 0x00, 0x00, 0x14, 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x02, 0x00, 0x0c, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x06, - 0x04, 0x02, 0x00, 0x35, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf9, 0xb0, 0x04, 0x02, 0x00, 0x2b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x47, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x10, 0x49, 0x36, 0x60, 0x09, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf0, 0x0a, - 0x82, 0x10, 0x25, 0x80, 0x00, 0x00, 0x00, 0x11, 0x04, 0x02, 0x00, 0x30, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x34, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x10, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x2e, 0x60, 0x08, 0x49, 0x32, 0x58, 0x08, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x07, 0x59, 0x2c, 0x0c, 0x0b, 0x8c, 0x04, 0x0d, 0x18, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x14, - 0x48, 0x02, 0x6a, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfd, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf0, 0x18, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf0, 0x15, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x16, 0x04, 0x01, 0xf0, 0x12, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x17, 0x04, 0x01, 0xf0, 0x0f, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x04, 0x01, 0xf0, 0x0c, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x1b, 0x04, 0x01, 0xf0, 0x09, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x04, 0x01, 0xf0, 0x06, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x19, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x04, 0x01, 0xf7, 0xdf, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x41, 0x78, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xf7, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x59, 0x34, 0x14, 0x00, 0x04, 0x01, 0xf7, 0xf3, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x05, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x41, 0x6c, 0x10, 0x00, 0x04, 0x01, 0xf7, 0xec, - 0x41, 0x78, 0x08, 0x00, 0x41, 0x78, 0x10, 0x00, 0x04, 0x01, 0xf7, 0xca, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xfb, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1a, - 0x04, 0x02, 0x00, 0x04, 0x40, 0x10, 0x10, 0x00, 0x40, 0x00, 0x08, 0x00, - 0x04, 0x01, 0xf7, 0xdc, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1b, - 0x04, 0x02, 0x00, 0x03, 0x40, 0x18, 0x10, 0x00, 0x04, 0x01, 0xf7, 0xfa, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x04, 0x00, 0x07, 0xf7, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x19, 0x04, 0x00, 0x07, 0xb5, - 0x04, 0x01, 0xf7, 0xd6, 0x59, 0x2e, 0x60, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x60, 0x04, 0x00, 0x07, 0xb3, 0x59, 0x30, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x11, 0x04, 0x02, 0x07, 0xd6, - 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x05, - 0x59, 0x32, 0x68, 0x09, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x0e, - 0x04, 0x01, 0xf7, 0xcf, 0x59, 0x2c, 0x10, 0x0a, 0x82, 0x08, 0x15, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x41, 0x78, 0x40, 0x00, 0x04, 0x01, 0xfd, 0x8b, - 0x04, 0x02, 0x07, 0xd6, 0x59, 0x30, 0x00, 0x09, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x81, 0x34, 0x05, 0x80, 0x04, 0x02, 0x07, 0xc4, - 0x49, 0x36, 0x60, 0x09, 0x59, 0x2c, 0x0c, 0x0b, 0x82, 0x04, 0x15, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x60, 0x00, - 0x04, 0x00, 0x00, 0x11, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, - 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x02, 0x59, 0x34, 0x0a, 0x04, - 0x59, 0x2c, 0x00, 0x0d, 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x17, 0xa0, - 0x59, 0x30, 0x0a, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x07, 0xb1, 0x49, 0x2e, 0x60, 0x08, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x54, 0x04, 0x01, 0xf7, 0x74, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa0, 0xb6, 0x04, 0x00, 0x07, 0xb4, 0x04, 0x01, 0xf7, 0xa9, - 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2e, 0x60, 0x08, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x60, 0x04, 0x00, 0x00, 0x4a, - 0x59, 0x30, 0x14, 0x06, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x02, 0x00, 0x67, 0x59, 0x2c, 0x02, 0x07, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x8b, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x02, 0x00, 0x71, - 0x59, 0x30, 0x12, 0x03, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x00, 0x5e, 0x59, 0x2e, 0x8c, 0x06, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x36, 0x41, 0x78, 0x40, 0x00, - 0x59, 0x2c, 0x10, 0x09, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x04, 0x01, 0xfd, 0x4e, 0x04, 0x02, 0x00, 0x66, 0x59, 0x30, 0x00, 0x09, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x03, 0x81, 0x34, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x4f, 0x4d, 0x30, 0x00, 0x00, 0x59, 0x2e, 0x60, 0x13, - 0x49, 0x33, 0xc8, 0x57, 0x83, 0x30, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x60, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x00, 0x00, 0x30, 0x59, 0x1c, 0x14, 0x06, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x4d, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x00, 0x4a, - 0x04, 0x01, 0xf0, 0x02, 0x5c, 0x02, 0x60, 0x00, 0x59, 0xa8, 0x00, 0x0f, - 0x59, 0x2c, 0x10, 0x0a, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x08, 0x15, 0x80, 0x04, 0x02, 0x00, 0x1e, 0x59, 0x2c, 0x08, 0x09, - 0x82, 0x04, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x08, 0x15, 0x80, - 0x04, 0x00, 0x00, 0x13, 0x80, 0x04, 0x09, 0x32, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x42, 0x04, 0x02, 0x00, 0x12, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x2e, 0x60, 0x08, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x92, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x01, 0xf0, 0x0f, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x01, 0xf0, 0x0c, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x01, 0xf0, 0x09, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x17, - 0x04, 0x01, 0xf0, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x49, 0x2f, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x19, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xe6, - 0x49, 0x2f, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x40, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xf7, 0x49, 0x2f, 0xc8, 0x57, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x41, 0x78, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xf2, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0x30, 0x02, 0x03, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0x30, 0x00, 0x09, 0x48, 0x03, 0xc8, 0x57, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x41, 0x78, 0x08, 0x00, 0x41, 0x78, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xe8, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x04, 0x01, 0xf7, 0xf0, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xed, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1d, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x4d, 0x80, - 0x00, 0x00, 0x00, 0x1a, 0x04, 0x02, 0x00, 0x03, 0x40, 0x10, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xdc, 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1b, - 0x04, 0x02, 0x00, 0x03, 0x40, 0x18, 0x10, 0x00, 0x04, 0x01, 0xf7, 0xd7, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x04, 0x00, 0x07, 0xd4, - 0x82, 0x00, 0x4d, 0x80, 0x00, 0x00, 0x00, 0x19, 0x04, 0x00, 0x07, 0xd1, - 0x04, 0x01, 0xf7, 0xd5, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa0, 0xb6, - 0x04, 0x02, 0x07, 0xd7, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xdd, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0x30, 0x20, 0x09, 0x80, 0x10, 0x21, 0xc0, - 0x04, 0x00, 0x00, 0x35, 0x58, 0x10, 0x14, 0x00, 0x48, 0x13, 0xc8, 0x57, - 0x48, 0x0b, 0xc8, 0x57, 0x82, 0x08, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x00, 0x22, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x17, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x00, 0x10, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x19, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x12, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x0b, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x33, - 0x04, 0x02, 0x00, 0x17, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x00, 0x0d, 0x04, 0x01, 0xf0, 0x13, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x0f, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf0, 0x0b, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x08, 0x82, 0x08, 0x1d, 0x00, 0xff, 0xff, 0xff, 0x00, - 0x84, 0x0c, 0x01, 0xc0, 0x80, 0x0c, 0x05, 0x40, 0x48, 0x07, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x00, 0x24, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x00, 0x00, 0x03, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x23, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x03, 0x59, 0x34, 0x00, 0x0a, - 0x8c, 0x00, 0x05, 0x04, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0e, 0x80, 0x02, 0x65, 0x40, - 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xc5, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x60, 0xac, 0x49, 0x7a, 0x68, 0x0e, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x40, 0x68, 0x10, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x40, 0x00, 0x18, 0x00, 0x40, 0x02, 0x88, 0x00, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x0a, 0x04, 0x01, 0xfd, 0x32, 0x04, 0x02, 0x00, 0x08, - 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x59, 0x34, 0x04, 0x05, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, 0x80, 0x08, 0x10, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x81, 0x46, 0x88, 0x00, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x17, 0xf1, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x59, 0xbc, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x24, - 0x04, 0x02, 0x00, 0x32, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x02, 0x00, 0x2f, 0x59, 0x34, 0x10, 0x0a, 0x82, 0x08, 0x15, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xad, 0x10, - 0x58, 0x38, 0x04, 0x01, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x00, 0x1a, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00, 0x24, - 0x59, 0x34, 0x1a, 0x04, 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x10, 0x04, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0a, 0x00, - 0x04, 0x01, 0xf0, 0x09, 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x04, 0x00, - 0x04, 0x00, 0x10, 0x04, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x04, 0x08, 0xc2, 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x0e, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x06, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x48, 0x06, 0x6c, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x30, 0x12, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0xb1, 0x04, 0x80, 0x00, 0x00, 0x00, 0x49, 0x7b, 0x30, 0x17, - 0x49, 0x7b, 0x30, 0x18, 0x4a, 0x03, 0xb1, 0x04, 0x60, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x9c, 0x00, 0x18, 0x48, 0x03, 0xc8, 0x56, - 0x49, 0x7b, 0x30, 0x15, 0x49, 0x7b, 0x30, 0x16, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x48, 0x03, 0x30, 0x13, 0x04, 0x00, 0x00, 0x09, - 0x59, 0x9c, 0x02, 0x16, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x48, 0x03, 0x30, 0x14, 0x85, 0x0e, 0x1d, 0x62, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xff, 0xef, 0x4a, 0x03, 0xc8, 0x26, 0x00, 0x00, 0x00, 0x04, - 0x59, 0x9c, 0x02, 0x09, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x1e, - 0x59, 0x9c, 0x02, 0x07, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x80, 0x00, 0x00, 0xcc, 0x59, 0x9c, 0x08, 0x0d, 0x80, 0x04, 0x04, 0x00, - 0x48, 0x03, 0xb1, 0x00, 0x49, 0x7b, 0xb1, 0x02, 0x59, 0xd8, 0x01, 0x01, - 0x59, 0x9c, 0x00, 0x0d, 0x48, 0x03, 0xb1, 0x00, 0x59, 0x9c, 0x00, 0x0e, - 0x48, 0x03, 0xb1, 0x01, 0x59, 0x9c, 0x02, 0x07, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x02, 0x49, 0x7b, 0xb1, 0x02, 0x59, 0x9c, 0x0a, 0x09, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x40, 0x00, 0x00, 0x48, 0x03, 0xb1, 0x03, - 0x4a, 0x03, 0xb1, 0x09, 0x00, 0x00, 0x00, 0x04, 0x4a, 0x03, 0xb1, 0x04, - 0x10, 0x00, 0x00, 0x01, 0x8d, 0x0e, 0x1d, 0x22, 0x04, 0x02, 0x00, 0x04, - 0x4a, 0x03, 0x30, 0x12, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0x30, 0x12, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf7, 0xfd, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x02, 0x04, - 0x49, 0x2f, 0xc8, 0x57, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x03, 0x40, 0x00, 0x00, 0x10, 0xac, 0x71, 0x59, 0xa1, 0xd8, 0x1e, - 0x80, 0xed, 0xd9, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf0, 0x03, 0x59, 0x31, 0xd8, 0x21, 0x58, 0xef, 0x40, 0x0b, - 0x58, 0xec, 0x00, 0x09, 0x80, 0x00, 0x01, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x08, 0x01, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x49, 0x2f, 0xc8, 0x57, 0x49, 0x43, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, 0x49, 0x42, 0x5a, 0x06, - 0x48, 0x06, 0x5a, 0x08, 0x4a, 0x02, 0x5c, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x03, 0x59, 0x30, 0x04, 0x02, - 0x48, 0x02, 0x5c, 0x06, 0x83, 0x2c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x01, 0x10, 0x00, 0x48, 0x03, 0xc8, 0x40, 0x4a, 0x03, 0xc8, 0x42, - 0x00, 0x00, 0x00, 0x0b, 0x04, 0x01, 0x10, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x16, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x09, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x59, 0xc4, 0x00, 0xa3, - 0x82, 0x00, 0x05, 0x00, 0x02, 0x87, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x4b, 0x33, - 0x00, 0x10, 0x4a, 0xbf, 0x00, 0x10, 0x4a, 0xda, 0x00, 0x10, 0x4b, 0x03, - 0x00, 0x10, 0x4b, 0x26, 0x00, 0x10, 0x4b, 0x60, 0x00, 0x10, 0x4b, 0x72, - 0x00, 0x10, 0x4a, 0xda, 0x00, 0x10, 0x4b, 0x44, 0x00, 0x10, 0x4a, 0xbe, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf8, 0xf7, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4f, 0x2c, - 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x02, 0x00, 0x13, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x04, 0x0d, 0x0c, - 0x04, 0x02, 0x00, 0x06, 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x00, 0x00, 0x0d, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x0a, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x07, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x12, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf8, 0xdc, 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x08, - 0x04, 0x02, 0x00, 0x21, 0x8c, 0x04, 0x0d, 0x0c, 0x04, 0x02, 0x00, 0x1c, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x02, 0x00, 0x17, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xf0, 0x04, 0x02, 0x00, 0x1c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4f, 0x2c, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x80, - 0x59, 0xc4, 0x00, 0x02, 0x84, 0x00, 0x05, 0x0c, 0x48, 0x03, 0x88, 0x02, - 0x04, 0x01, 0xf9, 0xfe, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xc7, - 0x5c, 0x02, 0x78, 0x00, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x80, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x09, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x06, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xb5, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x80, - 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x1b, - 0x8c, 0x04, 0x0d, 0x0c, 0x04, 0x02, 0x00, 0x16, 0x8c, 0x04, 0x0d, 0x0e, - 0x04, 0x02, 0x00, 0x11, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x04, 0x02, 0x00, 0x16, 0x59, 0xc4, 0x00, 0x02, 0x84, 0x00, 0x05, 0x0c, - 0x48, 0x03, 0x88, 0x02, 0x04, 0x01, 0xf9, 0xd9, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x90, 0xc7, 0x5c, 0x02, 0x78, 0x00, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x09, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x06, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x08, 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x0c, - 0x04, 0x02, 0x00, 0x06, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x06, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xd9, 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x0c, - 0x04, 0x02, 0x00, 0x0d, 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x80, - 0x5c, 0x00, 0x08, 0x00, 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x06, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x06, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xc8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x63, 0x59, 0xc4, 0x08, 0x05, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x0d, 0x8c, 0x04, 0x0d, 0x08, - 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x04, 0x0d, 0x0c, 0x04, 0x02, 0x00, 0x06, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x0d, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x0a, 0x4a, 0x03, 0x50, 0x16, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x07, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x12, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xac, 0x04, 0x01, 0xf8, 0x57, 0x59, 0xc4, 0x08, 0x05, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x04, 0x0d, 0x0c, - 0x04, 0x02, 0x00, 0x06, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x09, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x06, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf8, 0x44, - 0x59, 0xc4, 0x08, 0x05, 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x10, - 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x04, 0x0d, 0x0c, - 0x04, 0x02, 0x00, 0x06, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x0c, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x09, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x06, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf9, 0x1c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x8d, 0x0e, 0x1d, 0x0c, 0x04, 0x00, 0x00, 0x14, 0x85, 0x0e, 0x1d, 0x0c, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x92, 0x59, 0xc4, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x1a, 0x59, 0xc4, 0x00, 0x06, - 0x84, 0x00, 0x05, 0x48, 0x48, 0x03, 0x88, 0x06, 0x04, 0x01, 0xf0, 0x16, - 0x59, 0xa8, 0x00, 0x16, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x0c, 0x59, 0xa8, 0x00, 0x16, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x0c, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x12, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x07, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x12, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xc8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x58, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x64, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x04, 0x01, 0xff, 0xb8, 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0x64, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x59, 0xc4, 0x00, 0x06, 0x84, 0x00, 0x05, 0x00, 0x48, 0x03, 0x88, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, 0x49, 0x7b, 0x88, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0xd8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xe6, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x17, 0x7f, - 0x4a, 0x03, 0x50, 0x49, 0x00, 0x00, 0x00, 0x04, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xc8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x63, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x05, 0xfc, - 0x04, 0x01, 0xf8, 0xd7, 0x04, 0x00, 0x00, 0x06, 0x42, 0x00, 0x60, 0x00, - 0xfe, 0xff, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd4, 0x71, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x14, 0xc3, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x00, 0x08, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x02, 0x00, 0x07, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x10, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x13, 0x88, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x59, 0xa8, 0x08, 0x30, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0b, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x0b, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0b, 0x04, 0x01, 0xf0, 0x4c, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x09, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x06, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x50, 0x16, 0x00, 0x00, 0x00, 0x07, 0x49, 0x7b, 0x88, 0x80, - 0x4a, 0x03, 0x88, 0x93, 0x00, 0x00, 0x00, 0x01, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0x25, 0x83, 0x6c, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x08, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xff, 0x0f, 0x82, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x01, - 0x48, 0x03, 0x88, 0x06, 0x04, 0x01, 0xf0, 0x07, 0x59, 0xc4, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x0f, 0x82, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x06, 0x04, 0x01, 0xf8, 0x8a, - 0x04, 0x02, 0x00, 0x05, 0x59, 0xc4, 0x08, 0x06, 0x82, 0x04, 0x0d, 0x00, - 0xfb, 0xff, 0xff, 0x0f, 0x48, 0x07, 0x88, 0x06, 0x59, 0xc4, 0x00, 0x05, - 0x8c, 0x00, 0x05, 0x34, 0x04, 0x02, 0x00, 0x2a, 0x42, 0x00, 0x60, 0x00, - 0xfc, 0x18, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x92, 0x59, 0xc4, 0x08, 0xa4, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x02, 0x08, 0xbf, 0x04, 0x01, 0xf8, 0x73, 0x04, 0x00, 0x00, 0x06, - 0x42, 0x00, 0x60, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x83, 0x6c, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x06, 0x59, 0xa8, 0x08, 0x4a, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x4d, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xfe, 0x35, 0x04, 0x01, 0xf8, 0x61, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xc4, 0x08, 0xa4, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x8c, 0x4a, 0x03, 0x50, 0x0f, - 0x00, 0xff, 0xff, 0xff, 0x49, 0x7b, 0x50, 0x2f, 0x59, 0xa8, 0x00, 0x27, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x48, 0x03, 0x50, 0x27, - 0x49, 0x7b, 0x88, 0x80, 0x49, 0x7b, 0x88, 0x93, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, 0x59, 0xc4, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xfc, 0xff, 0x48, 0x03, 0x88, 0x01, - 0x42, 0x00, 0x60, 0x00, 0xfc, 0x18, 0xff, 0xff, 0x41, 0x78, 0x68, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x3d, 0xcb, 0x4a, 0x03, 0x88, 0x05, - 0x04, 0x00, 0x00, 0xf0, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xcf, 0x82, 0x00, 0x05, 0x40, 0x44, 0x00, 0x00, 0xc1, - 0x48, 0x03, 0x88, 0x06, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x59, 0xa8, 0xb8, 0x2f, 0x82, 0x5c, 0xbd, 0x80, 0x00, 0x00, 0xaa, 0xaa, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0xa8, 0xb8, 0x2f, 0x82, 0x5c, 0xbd, 0x80, - 0x00, 0x00, 0xaa, 0xaa, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x9c, 0xb8, 0x18, 0x82, 0x5c, 0xbd, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x82, 0x5c, 0xbd, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x59, 0x9c, 0xb8, 0x18, 0x82, 0x5c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x82, 0x5c, 0xbd, 0x80, 0x00, 0x00, 0x00, 0x10, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x9c, 0xb8, 0x18, - 0x82, 0x5c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x30, 0x82, 0x5c, 0xbd, 0x80, - 0x00, 0x00, 0x00, 0x20, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x0f, 0xc8, 0x57, 0x83, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x00, 0x00, 0x22, 0x59, 0x9c, 0x10, 0x17, 0x4d, 0x3c, 0x00, 0x00, - 0x83, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x00, 0x05, - 0x41, 0x7a, 0x78, 0x00, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x00, 0x09, - 0x04, 0x01, 0xf0, 0x11, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1f, 0x59, 0x9c, 0x10, 0x17, - 0x8c, 0x08, 0x15, 0x0a, 0x04, 0x02, 0x00, 0x07, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x42, - 0x48, 0x03, 0xc8, 0x56, 0x85, 0x0e, 0x1d, 0x08, 0x5c, 0x02, 0x78, 0x00, - 0x04, 0x01, 0xf0, 0x09, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1f, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x9a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0xb8, 0xc0, 0x59, 0xc4, 0x00, 0x03, 0x44, 0x00, 0x08, 0x00, - 0x59, 0xc4, 0x00, 0x04, 0x48, 0x00, 0x08, 0x01, 0x59, 0xc4, 0x00, 0x0b, - 0x48, 0x00, 0x08, 0x02, 0x59, 0xc4, 0x00, 0x8e, 0x48, 0x00, 0x08, 0x03, - 0x59, 0xc4, 0x00, 0x8f, 0x48, 0x00, 0x08, 0x04, 0x59, 0xc4, 0x00, 0x90, - 0x48, 0x00, 0x08, 0x05, 0x59, 0xc4, 0x00, 0x91, 0x48, 0x00, 0x08, 0x06, - 0x59, 0xc4, 0x00, 0x92, 0x48, 0x00, 0x08, 0x07, 0x59, 0xc4, 0x00, 0x93, - 0x48, 0x00, 0x08, 0x08, 0x59, 0xc4, 0x00, 0x99, 0x48, 0x00, 0x08, 0x09, - 0x59, 0xc4, 0x00, 0x9e, 0x48, 0x00, 0x08, 0x0a, 0x59, 0xc4, 0x00, 0xaa, - 0x48, 0x00, 0x08, 0x0b, 0x59, 0xc4, 0x00, 0xaf, 0x48, 0x00, 0x08, 0x0c, - 0x59, 0xc4, 0x00, 0xb2, 0x48, 0x00, 0x08, 0x0d, 0x59, 0xc4, 0x00, 0xb1, - 0x48, 0x00, 0x08, 0x0e, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x41, 0xc4, 0x18, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x58, 0x0c, 0x00, 0x50, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x41, 0xc4, 0x18, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x58, 0x0c, 0x00, 0x10, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x49, 0x7b, 0x88, 0x30, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x59, 0xc4, 0x00, 0x31, 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x49, 0x7b, 0x88, 0xac, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x59, 0xc4, 0x00, 0xad, - 0x44, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x59, 0xc4, 0x10, 0x01, 0x4c, 0x08, 0x00, 0x00, - 0x84, 0x08, 0x15, 0x0c, 0x48, 0x0b, 0x88, 0x01, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x00, 0x03, 0x00, 0x4a, 0x03, 0x70, 0xe5, 0xb0, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80, 0x04, 0x08, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0xb8, 0x00, 0xe5, - 0x8c, 0x00, 0x05, 0x38, 0x04, 0x02, 0x07, 0xfb, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x00, 0x02, 0x00, 0x42, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x68, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x44, 0x4a, 0x03, 0x88, 0x07, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x7b, 0x88, 0x07, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x10, - 0x42, 0x00, 0x60, 0x00, 0xfc, 0xf8, 0xff, 0xff, 0x42, 0x00, 0x68, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x44, - 0x5c, 0x00, 0x10, 0x00, 0x48, 0x0b, 0x88, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0xb8, 0xc0, 0x50, 0x04, 0x00, 0x00, 0x48, 0x03, 0x88, 0x03, - 0x58, 0x04, 0x00, 0x01, 0x48, 0x03, 0x88, 0x04, 0x58, 0x04, 0x00, 0x02, - 0x48, 0x03, 0x88, 0x0b, 0x58, 0x04, 0x00, 0x03, 0x48, 0x03, 0x88, 0x8e, - 0x58, 0x04, 0x00, 0x04, 0x48, 0x03, 0x88, 0x8f, 0x58, 0x04, 0x00, 0x05, - 0x48, 0x03, 0x88, 0x90, 0x58, 0x04, 0x00, 0x06, 0x48, 0x03, 0x88, 0x91, - 0x58, 0x04, 0x00, 0x07, 0x48, 0x03, 0x88, 0x92, 0x58, 0x04, 0x00, 0x08, - 0x48, 0x03, 0x88, 0x93, 0x58, 0x04, 0x00, 0x09, 0x48, 0x03, 0x88, 0x99, - 0x58, 0x04, 0x00, 0x0a, 0x48, 0x03, 0x88, 0x9e, 0x58, 0x04, 0x00, 0x0b, - 0x48, 0x03, 0x88, 0xaa, 0x58, 0x04, 0x00, 0x0c, 0x48, 0x03, 0x88, 0xaf, - 0x58, 0x04, 0x00, 0x0d, 0x48, 0x03, 0x88, 0xb2, 0x58, 0x04, 0x00, 0x0e, - 0x48, 0x03, 0x88, 0xb1, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x41, 0xc4, 0x18, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x50, 0x04, 0x00, 0x00, 0x48, 0x00, 0x18, 0x50, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x41, 0xc4, 0x18, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x50, 0x04, 0x00, 0x00, 0x48, 0x00, 0x18, 0x10, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x49, 0x7b, 0x88, 0x30, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x50, 0x04, 0x00, 0x00, 0x48, 0x03, 0x88, 0x31, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x49, 0x7b, 0x88, 0xac, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x50, 0x04, 0x00, 0x00, - 0x48, 0x03, 0x88, 0xad, 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfc, 0x49, 0x7b, 0x88, 0x80, 0x41, 0x78, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, 0x59, 0xc4, 0x08, 0xa4, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x0c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4a, 0x03, 0x88, 0x05, 0x04, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0xe8, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x13, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0xc4, 0x10, 0x08, - 0x4c, 0x08, 0x00, 0x00, 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0xff, 0x7f, - 0x48, 0x03, 0x88, 0x08, 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x3e, 0x02, 0x04, 0x00, 0x00, 0x05, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0x0f, - 0x48, 0x03, 0x88, 0x06, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x10, - 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x65, 0x59, 0xc4, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x02, 0x00, 0x12, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x03, 0xe8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xf8, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, - 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x30, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x77, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x3b, 0x49, 0x7b, 0x88, 0x80, - 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, - 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x80, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x65, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x92, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, - 0x59, 0xc4, 0x00, 0x05, 0x80, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x03, 0xe8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x78, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf2, - 0x04, 0x01, 0xf7, 0xd1, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0xf0, 0x48, 0x03, 0x88, 0x06, 0x59, 0xa8, 0x00, 0x1d, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x88, 0x93, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0x10, 0x00, - 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xbe, - 0x5c, 0x03, 0xe0, 0x00, 0x48, 0x0b, 0x88, 0x08, 0x5c, 0x01, 0xd0, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0xe8, 0x00, 0x00, 0x59, 0xc4, 0x10, 0x08, - 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x48, 0x03, 0x88, 0x08, - 0x4c, 0x08, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x3e, 0x02, 0x04, 0x00, 0x00, 0x05, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x78, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x3b, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x05, 0x80, 0x48, 0x03, 0x88, 0x80, - 0x48, 0x03, 0x88, 0x93, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x03, 0x84, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0xf0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x92, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x59, 0xc4, 0x00, 0x05, - 0x80, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x15, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xd0, 0x04, 0x02, 0x00, 0x12, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x67, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0x25, 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x08, - 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x10, 0x49, 0x7b, 0x88, 0x80, 0x59, 0xa8, 0x00, 0x1d, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x88, 0x93, 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x36, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x80, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0x10, 0x00, 0x4d, 0xf0, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xbe, 0x5c, 0x03, 0xe0, 0x00, - 0x48, 0x0b, 0x88, 0x08, 0x5c, 0x01, 0xd0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xc4, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3e, 0x02, 0x04, 0x00, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x4e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x79, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x3b, 0x59, 0xc4, 0x00, 0x06, - 0x84, 0x00, 0x05, 0x08, 0x48, 0x03, 0x88, 0x06, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0x10, 0x85, 0x0e, 0x1d, 0x4c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x64, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xc8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x4d, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x49, 0x7b, 0x88, 0x80, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0xf0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x92, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x59, 0xc4, 0x00, 0x05, - 0x80, 0x04, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x0e, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x04, 0x02, 0x00, 0x0b, 0x42, 0x01, 0xd0, 0x00, - 0x00, 0x00, 0x03, 0xe8, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x78, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x22, 0x59, 0x94, 0x00, 0x04, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x07, 0xec, 0x04, 0x01, 0xf0, 0x21, - 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x4b, 0xc8, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x63, - 0x5c, 0x00, 0x10, 0x00, 0x49, 0x7b, 0x88, 0x80, 0x59, 0xa8, 0x00, 0x1d, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x88, 0x93, 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x36, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x80, - 0x85, 0x0e, 0x1d, 0x0c, 0x59, 0xc4, 0x00, 0x06, 0x84, 0x00, 0x05, 0x48, - 0x48, 0x03, 0x88, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0xbe, - 0x4a, 0x03, 0x88, 0x08, 0x00, 0x00, 0x00, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x40, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0x25, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x4c, 0x04, 0x02, 0x00, 0x22, 0x59, 0x9c, 0x10, 0x17, - 0x8d, 0x0e, 0x1d, 0x00, 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x08, 0x15, 0x1a, - 0x04, 0x00, 0x00, 0x1d, 0x85, 0x0e, 0x1d, 0x42, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x00, 0x07, 0x04, 0x01, 0xf0, 0x11, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x41, 0x7a, 0x78, 0x00, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x0c, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1c, - 0x5c, 0x02, 0x80, 0x00, 0x59, 0x9c, 0x08, 0x17, 0x8c, 0x04, 0x0d, 0x0a, - 0x04, 0x02, 0x00, 0x05, 0x49, 0x43, 0xc8, 0x57, 0x49, 0x3f, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0x42, 0x49, 0x7b, 0x88, 0x80, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xfc, 0xee, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0x20, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x7a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x3b, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x36, - 0x4a, 0x03, 0x88, 0x80, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x18, 0xbe, 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x7b, 0x30, 0x04, 0x4a, 0x03, 0xb0, 0x04, 0x60, 0x00, 0x00, 0x01, - 0x59, 0xd8, 0x00, 0x05, 0x4a, 0x03, 0xb0, 0x04, 0x90, 0x00, 0x00, 0x01, - 0x4a, 0x03, 0xa8, 0x04, 0x60, 0x00, 0x00, 0x01, 0x59, 0xd4, 0x00, 0x05, - 0x4a, 0x03, 0xa8, 0x04, 0x90, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x54, 0xfc, 0x4a, 0x03, 0xc8, 0x25, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x03, 0xc8, 0x27, 0x00, 0x00, 0x00, 0x04, 0x59, 0x9c, 0x04, 0x09, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x20, 0x59, 0x9c, 0x04, 0x07, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xcc, - 0x59, 0x9c, 0x10, 0x0b, 0x80, 0x08, 0x04, 0x00, 0x48, 0x03, 0xb0, 0x00, - 0x49, 0x7b, 0xb0, 0x02, 0x59, 0xd8, 0x00, 0x01, 0x59, 0x9c, 0x00, 0x0b, - 0x48, 0x03, 0xb0, 0x00, 0x59, 0x9c, 0x00, 0x0c, 0x48, 0x03, 0xb0, 0x01, - 0x59, 0x9c, 0x04, 0x07, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, - 0x49, 0x7b, 0xb0, 0x02, 0x59, 0x9c, 0x0c, 0x09, 0x82, 0x04, 0x05, 0x40, - 0x00, 0x40, 0x00, 0x00, 0x48, 0x03, 0xb0, 0x03, 0x4a, 0x03, 0xb0, 0x09, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x03, 0xb0, 0x04, 0x10, 0x00, 0x00, 0x01, - 0x59, 0xe0, 0x08, 0x03, 0x82, 0x04, 0x0d, 0x00, 0xff, 0xff, 0xfe, 0xff, - 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x80, 0x00, 0x48, 0x07, 0xc0, 0x03, - 0x59, 0x9c, 0x04, 0x0a, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x20, - 0x59, 0x9c, 0x04, 0x08, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x80, 0x00, 0x00, 0xcc, 0x59, 0x9c, 0x10, 0x0f, 0x80, 0x08, 0x04, 0x00, - 0x48, 0x03, 0xa8, 0x00, 0x49, 0x7b, 0xa8, 0x02, 0x59, 0xd4, 0x00, 0x01, - 0x59, 0x9c, 0x00, 0x0f, 0x48, 0x03, 0xa8, 0x00, 0x59, 0x9c, 0x00, 0x10, - 0x48, 0x03, 0xa8, 0x01, 0x59, 0x9c, 0x04, 0x08, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x02, 0x49, 0x7b, 0xa8, 0x02, 0x59, 0x9c, 0x0c, 0x0a, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x40, 0x00, 0x00, 0x48, 0x03, 0xa8, 0x03, - 0x4a, 0x03, 0xa8, 0x09, 0x00, 0x00, 0x00, 0x04, 0x4a, 0x03, 0xa8, 0x04, - 0x10, 0x00, 0x00, 0x01, 0x59, 0xe0, 0x08, 0x03, 0x82, 0x04, 0x0d, 0x00, - 0xff, 0xff, 0xfb, 0xff, 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x80, 0x00, - 0x48, 0x07, 0xc0, 0x03, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x07, - 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0xb8, 0x00, - 0x00, 0x02, 0x05, 0xa6, 0x02, 0x00, 0xf0, 0x00, 0x00, 0x02, 0x05, 0xbb, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x59, 0x98, 0x10, 0x03, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x1e, 0x58, 0x08, 0x00, 0x05, 0x82, 0x00, 0x0d, 0x00, - 0x43, 0x01, 0x87, 0x80, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x53, 0xc6, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x15, 0x58, 0x0a, 0x58, 0x08, - 0x59, 0x2c, 0x02, 0x04, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x4b, 0x04, 0x02, 0x10, 0x0b, 0x0c, 0x01, 0xf8, 0x0f, - 0x5c, 0x03, 0xe0, 0x00, 0x83, 0x70, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x07, 0xe6, 0x02, 0x00, 0xf8, 0x00, 0x00, 0x02, 0x05, 0xbb, - 0x02, 0x00, 0xb0, 0x00, 0x00, 0x02, 0x05, 0xa6, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0x50, 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x01, 0xf7, 0xf9, - 0x04, 0x01, 0xf8, 0xe2, 0x04, 0x01, 0xf7, 0xfd, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x1f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x9b, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x1f, 0x00, 0x10, 0x50, 0x1f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x49, 0x2f, 0xc8, 0x57, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x2d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x04, 0x01, 0xf0, 0x19, 0x49, 0x2f, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x2c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x11, - 0x49, 0x2f, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x2b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf0, 0x09, 0x49, 0x2f, 0xc8, 0x57, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x2e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x01, 0x48, 0x03, 0xc8, 0x57, 0x42, 0x02, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x59, 0x2c, 0x0c, 0x04, 0x82, 0x04, 0x0d, 0x00, - 0xff, 0xff, 0x80, 0xff, 0x80, 0x04, 0x05, 0x40, 0x48, 0x02, 0x5c, 0x04, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, - 0x80, 0x14, 0x01, 0x10, 0x80, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x2d, - 0x04, 0x00, 0x17, 0xda, 0x4a, 0x03, 0x30, 0x06, 0x00, 0x10, 0x50, 0x69, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x05, 0x28, 0x49, 0x2f, 0xc8, 0x57, - 0x80, 0x14, 0x01, 0x10, 0x04, 0x00, 0x07, 0xd3, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x3e, 0x4a, 0x03, 0x30, 0x06, 0x00, 0x10, 0x50, 0x84, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x05, 0x28, 0x49, 0x2f, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x4c, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x05, 0x36, 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2e, 0x8a, 0x06, - 0x83, 0x44, 0x0c, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x10, 0x0b, - 0x83, 0x44, 0x04, 0x00, 0x00, 0x10, 0xa4, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x06, 0x49, 0x37, 0xc8, 0x57, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x05, 0x36, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x41, 0x78, 0x08, 0x00, 0x41, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4a, 0x8e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0xe5, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2c, 0x0a, 0x0a, - 0x8c, 0x04, 0x0d, 0x02, 0x04, 0x02, 0x00, 0x15, 0x49, 0x2f, 0xc8, 0x57, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x02, 0x00, 0x0f, 0x59, 0x2c, 0x02, 0x07, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0xf4, 0x04, 0x02, 0x00, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x2c, 0x0a, 0x06, - 0x48, 0x06, 0x5c, 0x06, 0x48, 0x02, 0x5a, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x04, 0x01, 0xf7, 0xf9, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x62, 0x72, 0x59, 0x2c, 0x02, 0x08, - 0x49, 0x2f, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x19, 0x9a, - 0x04, 0x02, 0x17, 0x9f, 0x59, 0x2c, 0x04, 0x08, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x07, 0x9c, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x2c, 0x02, 0x07, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x07, 0x97, - 0x49, 0x7a, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x40, 0x52, - 0x04, 0x02, 0x00, 0x04, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x48, 0x02, 0x5a, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x59, 0x98, 0x08, 0x02, 0x59, 0x98, 0x00, 0x00, - 0x48, 0x06, 0x58, 0x00, 0x49, 0x2c, 0x08, 0x01, 0x49, 0x2f, 0x30, 0x02, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0x30, 0x00, 0x04, 0x00, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x9a, 0x58, 0x01, 0x59, 0x98, 0x00, 0x06, - 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x01, 0xf8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2e, 0x8a, 0x06, 0x59, 0x2c, 0x04, 0x06, - 0x48, 0x03, 0xc8, 0x56, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x15, 0x41, 0x7a, 0x88, 0x00, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x05, 0x40, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2e, 0x8a, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2e, 0x90, 0x08, 0x59, 0x2e, 0x98, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x44, 0x2d, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x85, 0x0e, 0x1d, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x45, 0x49, - 0x81, 0x46, 0x88, 0x00, 0x80, 0x5c, 0xb8, 0x40, 0x04, 0x02, 0x07, 0xfa, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2c, 0x0a, 0x08, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x04, 0x00, 0x00, 0x43, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x46, - 0x04, 0x00, 0x00, 0x44, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x45, - 0x04, 0x00, 0x00, 0x1e, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x29, - 0x04, 0x00, 0x00, 0x0e, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x2a, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0f, - 0x04, 0x00, 0x01, 0xfb, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x2e, - 0x04, 0x00, 0x01, 0xf8, 0x48, 0x07, 0xc8, 0x56, 0x04, 0x01, 0xf1, 0xf1, - 0x85, 0x0e, 0x1d, 0x04, 0x04, 0x01, 0xf1, 0xf4, 0x59, 0x2e, 0x8a, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x01, 0xf0, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x18, 0x48, 0x02, 0x6a, 0x00, - 0x59, 0x2e, 0x60, 0x09, 0x49, 0x33, 0xc8, 0x57, 0x83, 0x30, 0x05, 0x80, - 0xff, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x2a, 0x04, 0x01, 0xf1, 0xe7, - 0x59, 0x2c, 0x14, 0x07, 0x48, 0x0b, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x55, 0x41, 0x1e, 0x60, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf1, 0xda, 0x59, 0x2e, 0x38, 0x09, - 0x59, 0x1c, 0x14, 0x14, 0x84, 0x08, 0x15, 0x16, 0x84, 0x08, 0x15, 0x54, - 0x48, 0x0a, 0x3c, 0x14, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x3a, - 0x59, 0x2c, 0x04, 0x0b, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x59, 0x2c, 0x02, 0x0c, - 0x48, 0x02, 0x64, 0x1a, 0x59, 0x2c, 0x04, 0x0c, 0x48, 0x02, 0x62, 0x1a, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x04, 0x01, 0xf1, 0xc8, 0x59, 0xa8, 0x00, 0x65, 0x84, 0x00, 0x05, 0x10, - 0x48, 0x03, 0x50, 0x65, 0x04, 0x01, 0xf1, 0xc4, 0x59, 0x2c, 0x12, 0x07, - 0x8c, 0x08, 0x15, 0x00, 0x04, 0x02, 0x01, 0xc1, 0x59, 0x2e, 0x8a, 0x06, - 0x59, 0x2e, 0x60, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x60, - 0x04, 0x02, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf1, 0xb5, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf1, 0xaf, - 0x59, 0x30, 0x0a, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf1, 0xa9, - 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x25, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x1a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x00, 0x00, 0x24, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x00, 0x19, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x0a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x2e, - 0x04, 0x02, 0x00, 0x1c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x01, 0xf0, 0x17, 0x59, 0x32, 0x68, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x2e, 0x04, 0x02, 0x00, 0x15, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf0, 0x10, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf0, 0x08, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, 0x04, 0x01, 0xf1, 0x78, - 0x40, 0x00, 0x08, 0x00, 0x58, 0x04, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x49, 0x2c, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x94, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0x05, 0x59, 0x34, 0x02, 0x00, - 0x8c, 0x00, 0x05, 0x1a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x89, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x8a, - 0x59, 0x30, 0x02, 0x03, 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x05, 0x89, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x05, 0x89, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x4a, 0x02, 0x62, 0x06, 0x00, 0x00, 0x00, 0x14, - 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9a, 0x5d, - 0x5c, 0x02, 0x58, 0x00, 0x59, 0x30, 0x0c, 0x06, 0x48, 0x07, 0xc8, 0x57, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x00, 0x63, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2c, 0x24, 0x0a, - 0x49, 0x2f, 0xc8, 0x57, 0x48, 0x13, 0xc8, 0x57, 0x8c, 0x10, 0x25, 0x1c, - 0x04, 0x02, 0x00, 0x16, 0x8c, 0x10, 0x25, 0x1a, 0x04, 0x00, 0x00, 0x03, - 0x8c, 0x10, 0x25, 0x0a, 0x04, 0x00, 0x00, 0x69, 0x59, 0x34, 0x0a, 0x00, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x03, 0x8c, 0x10, 0x25, 0x1e, - 0x04, 0x00, 0x00, 0x64, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x6b, 0x59, 0x2c, 0x24, 0x0a, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x32, 0x58, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x06, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x05, 0x86, 0x59, 0x2c, 0x0a, 0x0c, 0x59, 0x34, 0x00, 0x0f, - 0x41, 0x78, 0x40, 0x00, 0x80, 0x00, 0x15, 0x40, 0x04, 0x00, 0x00, 0x6d, - 0x58, 0x08, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x12, 0x04, 0x02, 0x00, 0x04, - 0x58, 0x08, 0x02, 0x0c, 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x04, - 0x58, 0x08, 0x00, 0x00, 0x40, 0x08, 0x40, 0x00, 0x04, 0x01, 0xf7, 0xf3, - 0x58, 0x08, 0x00, 0x00, 0x49, 0x78, 0x10, 0x00, 0x80, 0x20, 0x41, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x48, 0x00, 0x40, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x07, 0x48, 0x22, 0x68, 0x10, 0x04, 0x01, 0xf0, 0x05, - 0x48, 0x02, 0x68, 0x0f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, - 0x49, 0x7a, 0x68, 0x10, 0x4d, 0x2c, 0x00, 0x00, 0x40, 0x0a, 0x58, 0x00, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xbc, - 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x16, - 0x59, 0x2c, 0x02, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x02, 0x00, 0x12, 0x59, 0x2e, 0x60, 0x09, 0x83, 0x30, 0x05, 0x80, - 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x07, 0xb1, 0x83, 0x30, 0x04, 0x80, - 0x00, 0x10, 0xd8, 0xd4, 0x04, 0x00, 0x10, 0x10, 0x59, 0xa8, 0x00, 0x0a, - 0x81, 0x30, 0x04, 0x80, 0x04, 0x02, 0x10, 0x0d, 0x59, 0x30, 0x00, 0x08, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x05, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x07, 0x97, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x45, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x2a, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x28, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x34, 0x00, 0x10, - 0x49, 0x2e, 0x68, 0x10, 0x49, 0x2f, 0xc8, 0x57, 0x80, 0x00, 0x0d, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x49, 0x2c, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x34, 0x04, 0x0b, 0x49, 0x2e, 0x68, 0x0f, 0x49, 0x2f, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x02, 0x6a, 0x03, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x0d, 0x81, 0x64, 0x04, 0x80, 0x04, 0x02, 0x17, 0x6e, - 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x59, 0x30, 0x00, 0x09, - 0x81, 0x34, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x59, 0x30, 0x02, 0x02, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x07, 0x59, 0x83, 0x32, 0x64, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x41, 0x58, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, - 0x04, 0x00, 0x17, 0xf6, 0x04, 0x01, 0xf7, 0x60, 0x49, 0x2f, 0xc8, 0x57, - 0x59, 0x2c, 0x04, 0x07, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x19, 0x9a, - 0x04, 0x02, 0x15, 0xec, 0x59, 0x2c, 0x02, 0x04, 0x80, 0x00, 0x01, 0x12, - 0x04, 0x02, 0x05, 0xd9, 0x59, 0x2e, 0x8a, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x58, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x00, 0x58, 0x59, 0x2e, 0x78, 0x0a, - 0x49, 0x3f, 0xc8, 0x57, 0x8d, 0x3e, 0x7d, 0x3e, 0x04, 0x02, 0x00, 0x06, - 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x02, 0x00, 0x4f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0x55, 0x04, 0x00, 0x05, 0xd9, 0x83, 0x3c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x04, 0x00, 0x05, 0xd6, 0x59, 0x2c, 0x02, 0x07, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x10, 0x00, 0x04, 0x02, 0x15, 0xd2, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x08, 0xc4, 0x80, 0x05, 0xd4, 0x00, - 0x59, 0x2e, 0x90, 0x08, 0x59, 0x2e, 0x98, 0x09, 0x59, 0x34, 0x08, 0x0d, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x2e, 0x83, 0x3c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x81, 0x78, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, - 0x80, 0x0c, 0x19, 0x02, 0x04, 0x02, 0x17, 0xfe, 0x04, 0x02, 0x05, 0xc3, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x52, 0x6b, 0x00, 0x10, 0x52, 0x6e, - 0x00, 0x10, 0x52, 0x7b, 0x00, 0x10, 0x52, 0x7e, 0x00, 0x10, 0x52, 0x81, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x4d, 0x04, 0x01, 0xf0, 0x1a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0x27, 0x04, 0x00, 0x00, 0x27, - 0x80, 0xe9, 0xd1, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x5b, 0x8d, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x41, 0x7a, 0x90, 0x00, - 0x41, 0x7a, 0x98, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x5d, - 0x04, 0x01, 0xf0, 0x0d, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4d, - 0x04, 0x01, 0xf0, 0x06, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4e, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x52, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0xe3, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x88, 0x8f, 0x04, 0x00, 0x00, 0x10, 0x8d, 0x3e, 0x7d, 0x3e, - 0x04, 0x02, 0x00, 0x17, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x04, 0x00, 0x02, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x07, 0x4d, 0x3c, 0x00, 0x00, - 0x40, 0x06, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0x07, - 0x5c, 0x02, 0x78, 0x00, 0x04, 0x02, 0x07, 0xcb, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x30, 0x04, 0x01, 0xf0, 0x0d, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x2c, 0x04, 0x01, 0xf0, 0x0a, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x28, 0x04, 0x01, 0xf0, 0x07, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x29, 0x04, 0x01, 0xf0, 0x04, 0x49, 0x7a, 0x58, 0x09, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x49, 0x2f, 0xc8, 0x57, 0x80, 0x14, 0x01, 0x10, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf5, 0x6c, 0x59, 0x2c, 0x02, 0x07, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x03, 0xff, 0x48, 0x02, 0x5a, 0x07, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x70, 0x04, 0x02, 0x00, 0x03, 0x8d, 0x0e, 0x1d, 0x0e, - 0x04, 0x02, 0x00, 0x18, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0xde, 0xad, - 0x59, 0x2c, 0x04, 0x08, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf0, 0xff, - 0x48, 0x02, 0x5c, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x40, 0x80, - 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x42, 0x5a, 0x06, - 0x80, 0x58, 0xb1, 0xc0, 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xa5, 0x04, 0x01, 0xf8, 0x0f, 0x44, 0x04, 0x28, 0x00, - 0x82, 0x58, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x02, - 0x48, 0x08, 0x28, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xed, 0x59, 0x2c, 0x04, 0x08, 0x80, 0x00, 0x01, 0x18, - 0x83, 0x2c, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x80, 0x14, 0x2c, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x08, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x08, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, - 0x59, 0x2c, 0x04, 0x0a, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x20, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x21, 0x59, 0x2c, 0x02, 0x04, 0x49, 0x2e, 0x60, 0x08, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x45, 0x04, 0x00, 0x00, 0x0e, 0x59, 0x2c, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x18, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x41, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x59, 0x30, 0x00, 0x15, 0x84, 0x00, 0x05, 0x5e, 0x48, 0x02, 0x60, 0x15, - 0x42, 0x02, 0x68, 0x00, 0x00, 0x10, 0xac, 0xf1, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x01, 0xf7, 0xf4, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x2c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x28, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x2f, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5e, 0xd1, 0x04, 0x00, 0x00, 0x0b, 0x59, 0x2c, 0x02, 0x04, - 0x80, 0x00, 0x01, 0x10, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x04, 0xf9, - 0x59, 0x2c, 0x0c, 0x06, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x09, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x48, 0x02, 0x5a, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2c, 0x0c, 0x07, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x24, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x10, 0x21, 0x4c, 0x04, 0x00, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xf6, - 0x5c, 0x00, 0x10, 0x00, 0x04, 0x02, 0x00, 0x18, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0xa0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5f, 0x1f, 0x04, 0x02, 0x00, 0x12, 0x59, 0x2c, 0x12, 0x07, - 0x82, 0xcc, 0x05, 0x80, 0x00, 0x10, 0xac, 0xdb, 0x04, 0x02, 0x00, 0x09, - 0x58, 0xc8, 0x0c, 0x0b, 0x84, 0x04, 0x0d, 0x00, 0x84, 0x04, 0x0d, 0x02, - 0x8c, 0x08, 0x15, 0x00, 0x04, 0x00, 0x00, 0x02, 0x84, 0x04, 0x0d, 0x5e, - 0x48, 0x05, 0x94, 0x0b, 0x04, 0x01, 0xf0, 0x01, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x02, 0x5a, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, - 0x04, 0x01, 0xf7, 0xfb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, - 0x04, 0x01, 0xf7, 0xf8, 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2e, 0x7c, 0x06, - 0x83, 0x3c, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x04, 0x02, 0x00, 0x43, - 0x59, 0x2c, 0x40, 0x07, 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x41, 0x58, 0x18, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x23, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x59, 0x30, 0x00, 0x08, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x04, 0x58, 0x04, 0x00, 0x05, - 0x80, 0x20, 0x05, 0x80, 0x04, 0x00, 0x00, 0x04, 0x83, 0x32, 0x64, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x04, 0x01, 0xf7, 0xf1, 0x58, 0x04, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x53, 0x04, 0x00, 0x00, 0x07, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x00, 0x23, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0xe0, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x00, 0x00, 0x1e, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2e, 0x8a, 0x06, - 0x83, 0x44, 0x04, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x04, 0x02, 0x10, 0x16, - 0x83, 0x44, 0x04, 0x00, 0x00, 0x10, 0xa4, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x11, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x44, 0xe7, 0x04, 0x00, 0x00, 0x0c, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x59, 0x2c, 0x0a, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0xeb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xe5, 0x5c, 0x02, 0x58, 0x00, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x31, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x49, 0x2f, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x16, - 0x49, 0x2f, 0xc8, 0x57, 0x41, 0x2f, 0x40, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x0e, 0x49, 0x2f, 0xc8, 0x57, - 0x41, 0x2d, 0xd8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0xda, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0xe4, 0x49, 0xa1, 0xd8, 0x0b, - 0x5c, 0x02, 0x58, 0x00, 0x49, 0x2d, 0xd8, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1d, 0xe3, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1e, 0x02, - 0x41, 0xa2, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x5c, 0x02, 0x58, 0x00, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x40, 0x05, - 0x4a, 0x02, 0x5c, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x5f, 0xc8, 0x57, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x08, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x48, 0x07, 0xc8, 0x57, - 0x48, 0x5f, 0xc8, 0x57, 0x5c, 0x00, 0x08, 0x00, 0x4d, 0x78, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x0e, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xe4, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x04, 0xf4, 0x80, 0x14, 0x01, 0x10, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x04, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x72, 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x42, 0x5a, 0x06, 0x48, 0x06, 0x58, 0x0d, 0x48, 0x0a, 0x58, 0x0e, - 0x49, 0x43, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x80, 0x14, 0x01, 0x10, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x04, 0x31, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x48, 0xd8, 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x42, 0x5a, 0x06, 0x48, 0x06, 0x58, 0x11, 0x48, 0x0a, 0x58, 0x12, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x80, 0x14, 0x01, 0x10, - 0x04, 0x00, 0x04, 0x26, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x00, 0x0c, - 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0x2c, 0x02, 0x0a, - 0x8c, 0x00, 0x05, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x2e, - 0x59, 0x2c, 0x02, 0x07, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x10, 0x01, - 0x04, 0x02, 0x14, 0x2a, 0x04, 0x01, 0xf0, 0x05, 0x4a, 0x03, 0x30, 0x06, - 0x00, 0x02, 0x05, 0x2e, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x05, 0x28, - 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb6, 0xa9, 0x50, 0x00, 0x70, 0x00, 0x49, 0x2c, 0x70, 0x0b, - 0x49, 0x78, 0x70, 0x0e, 0x49, 0x78, 0x70, 0x0c, 0x59, 0x2c, 0x00, 0x11, - 0x59, 0x2c, 0x08, 0x12, 0x48, 0x00, 0x70, 0x07, 0x48, 0x04, 0x70, 0x08, - 0x59, 0x2c, 0x10, 0x13, 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x78, 0x70, 0x0d, 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x01, 0x80, - 0x48, 0x03, 0xc8, 0x57, 0x04, 0x00, 0x10, 0x07, 0x48, 0x00, 0x70, 0x0f, - 0x4a, 0x00, 0x70, 0x05, 0x00, 0x00, 0x01, 0x80, 0x4a, 0x00, 0x70, 0x04, - 0x00, 0x00, 0x00, 0x60, 0x04, 0x01, 0xf0, 0x05, 0x49, 0x78, 0x70, 0x0f, - 0x48, 0x08, 0x70, 0x05, 0x80, 0x08, 0x11, 0x04, 0x48, 0x08, 0x70, 0x04, - 0x58, 0x38, 0x00, 0x0a, 0x48, 0x00, 0x70, 0x03, 0x40, 0x38, 0x10, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0x9e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x03, 0x59, 0x98, 0x00, 0x05, - 0x08, 0x01, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x30, 0x70, 0x00, - 0x58, 0x38, 0x00, 0x0b, 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x1b, - 0x58, 0x38, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x00, 0x00, 0x1d, 0x4c, 0x38, 0x00, 0x00, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x00, 0x00, 0x0b, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x4e, 0x48, 0x02, 0x5a, 0x08, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x04, 0x01, 0xf0, 0x05, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x00, 0x70, 0x00, 0x42, 0x02, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x00, 0x70, 0x02, 0x00, 0x00, 0x01, 0x00, - 0x49, 0x78, 0x70, 0x10, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x38, 0x00, 0x04, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x87, - 0x58, 0x38, 0x00, 0x10, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x19, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x11, 0x58, 0x38, 0x00, 0x0a, 0x58, 0x38, 0x10, 0x0d, - 0x80, 0x08, 0xa4, 0x00, 0x4c, 0x38, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x5c, 0x00, 0x70, 0x00, 0x58, 0x38, 0x00, 0x0d, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0x00, 0x70, 0x0d, - 0x4a, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x01, 0x58, 0x38, 0x00, 0x04, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x03, 0x48, 0x00, 0x70, 0x04, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x6c, - 0x58, 0x38, 0x00, 0x0e, 0x80, 0x00, 0x1d, 0x40, 0x04, 0x02, 0x00, 0x20, - 0x4c, 0x38, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, - 0x5c, 0x00, 0x70, 0x00, 0x04, 0x00, 0x00, 0x10, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x0a, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x48, 0x0c, 0x70, 0x0e, 0x58, 0x38, 0x00, 0x0c, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x02, 0x58, 0x38, 0x00, 0x0b, 0x40, 0x00, 0x08, 0x00, - 0x49, 0x2c, 0x08, 0x01, 0x49, 0x2c, 0x70, 0x0c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x04, 0x01, 0xf0, 0x11, 0x42, 0x02, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x4a, 0x03, 0x30, 0x05, 0x00, 0x10, 0x54, 0x8e, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb6, 0xa9, 0x50, 0x00, 0x70, 0x00, - 0x04, 0x01, 0xf7, 0xe7, 0x58, 0x3a, 0x58, 0x0c, 0x40, 0x0c, 0x00, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x14, 0x80, 0x04, 0x0c, 0x80, - 0x58, 0x38, 0x10, 0x04, 0x58, 0x38, 0x00, 0x0f, 0x41, 0x78, 0x30, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x05, 0x84, 0x18, 0x35, 0x40, - 0x82, 0x08, 0x14, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x3c, - 0x40, 0x08, 0x00, 0x00, 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x10, 0x02, - 0x40, 0x08, 0x08, 0x00, 0x40, 0x04, 0xb0, 0x00, 0x41, 0x2c, 0x00, 0x00, - 0x80, 0x0c, 0x04, 0x00, 0x40, 0x00, 0xa8, 0x00, 0x58, 0x38, 0x00, 0x0a, - 0x58, 0x38, 0x10, 0x0d, 0x80, 0x08, 0xa4, 0x00, 0x4c, 0x08, 0x00, 0x00, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x5c, 0x00, 0x70, 0x00, - 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x40, 0x04, 0x00, 0x00, - 0x58, 0x38, 0x10, 0x04, 0x80, 0x08, 0x04, 0x80, 0x48, 0x00, 0x70, 0x04, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x18, 0x35, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x80, 0x04, 0x14, 0x00, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x60, 0x04, 0x02, 0x00, 0x03, - 0x84, 0x18, 0x35, 0x42, 0x41, 0x78, 0x10, 0x00, 0x40, 0x0c, 0x00, 0x00, - 0x80, 0x04, 0x1c, 0x00, 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x03, 0x84, 0x18, 0x35, 0x44, 0x40, 0x00, 0x18, 0x00, - 0x40, 0x08, 0x08, 0x00, 0x48, 0x04, 0x70, 0x0d, 0x48, 0x0c, 0x70, 0x0e, - 0x40, 0x18, 0x00, 0x00, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x54, 0xd9, - 0x00, 0x10, 0x54, 0xdd, 0x00, 0x10, 0x54, 0xdb, 0x00, 0x10, 0x54, 0xd9, - 0x00, 0x10, 0x54, 0x75, 0x00, 0x10, 0x54, 0xdd, 0x00, 0x10, 0x54, 0xdb, - 0x00, 0x10, 0x54, 0xd9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x38, 0x10, 0x0f, 0x04, 0x01, 0xf7, 0x39, 0x58, 0x38, 0x08, 0x0d, - 0x82, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x38, 0x10, 0x0a, - 0x80, 0x08, 0x04, 0x00, 0x50, 0x00, 0x10, 0x00, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x0f, 0x42, 0x02, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x58, 0x3a, 0x58, 0x0b, 0x49, 0x78, 0x70, 0x0b, 0x49, 0x78, 0x70, 0x10, - 0x59, 0x2c, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x12, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x05, 0x5e, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x05, 0x2e, - 0x58, 0x38, 0x00, 0x0a, 0x80, 0x04, 0x0c, 0x00, 0x82, 0x38, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x54, 0x04, 0x18, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x54, 0x04, 0x18, 0x00, 0x04, 0x01, 0xf7, 0x1a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x58, 0x0a, 0x00, 0x10, 0xb6, 0x48, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xb6, 0xa9, 0x45, 0x2c, 0x08, 0x00, - 0x49, 0x7a, 0x58, 0x0b, 0x49, 0x7a, 0x58, 0x0c, 0x49, 0x7a, 0x58, 0x0d, - 0x49, 0x7a, 0x58, 0x0e, 0x49, 0x7a, 0x58, 0x0f, 0x4a, 0x02, 0x58, 0x09, - 0x00, 0x10, 0x54, 0x2f, 0x49, 0x7a, 0x58, 0x10, 0x4a, 0x02, 0x58, 0x02, - 0x00, 0x00, 0x01, 0x00, 0x4a, 0x02, 0x58, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x71, 0x83, 0x5c, 0x2c, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x5a, 0xfd, 0x59, 0xc8, 0x28, 0x17, - 0x48, 0x17, 0x50, 0x6b, 0x49, 0x7b, 0x90, 0x05, 0x82, 0x14, 0x05, 0x00, - 0x00, 0xe0, 0x00, 0x00, 0x04, 0x02, 0x00, 0x4f, 0x82, 0x14, 0x05, 0x00, - 0x00, 0x00, 0x03, 0xff, 0x82, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x41, 0xcc, 0x20, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x80, - 0x82, 0x0c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x10, 0x06, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x82, 0x0c, 0x1c, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x01, 0xf0, 0x03, 0x40, 0x0c, 0x10, 0x00, - 0x41, 0x78, 0x18, 0x00, 0x54, 0x18, 0x20, 0x00, 0x80, 0x10, 0x20, 0x00, - 0x80, 0x18, 0x30, 0x00, 0x80, 0x08, 0x10, 0x40, 0x04, 0x02, 0x07, 0xfc, - 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x59, 0xc8, 0x00, 0x05, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x90, 0x05, 0x04, 0x01, 0xf7, 0xea, - 0x82, 0x14, 0x05, 0x00, 0x01, 0xf6, 0x00, 0x00, 0x04, 0x02, 0x00, 0x29, - 0x82, 0x14, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x04, 0x00, 0x00, 0x0b, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x20, 0x00, 0x04, 0x02, 0x10, 0x0f, - 0x4a, 0x03, 0x90, 0x05, 0x00, 0x00, 0x01, 0x40, 0x82, 0x14, 0x05, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x32, 0x0c, 0x01, 0xf8, 0x3e, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x81, 0x00, - 0x04, 0x00, 0x07, 0xf4, 0x04, 0x01, 0xf0, 0x1c, 0x48, 0x17, 0xc8, 0x57, - 0x82, 0x14, 0x05, 0x00, 0x00, 0x00, 0x03, 0xff, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xcc, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x81, 0x00, 0x04, 0x02, 0x00, 0x12, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x8c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x59, 0xcd, - 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x90, 0x05, 0x00, 0x00, 0x01, 0x40, - 0x04, 0x01, 0xf0, 0x20, 0x48, 0x17, 0xc8, 0x57, 0x82, 0x14, 0x05, 0x00, - 0x00, 0xf6, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5a, 0x09, 0x04, 0x02, 0x07, 0xd2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x10, 0x59, 0xc4, 0x00, 0xa4, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x02, 0x00, 0x09, - 0x49, 0x7b, 0x50, 0x15, 0x59, 0xc4, 0x00, 0xa3, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x08, 0x00, 0x00, 0x48, 0x03, 0x88, 0xa3, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xf7, 0xff, 0xff, 0x48, 0x03, 0x88, 0xa3, 0x48, 0x17, 0xc8, 0x56, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x90, 0x4a, 0x03, 0x90, 0x05, - 0x00, 0x00, 0x01, 0x40, 0x04, 0x01, 0xf8, 0x42, 0x48, 0x03, 0xc8, 0x56, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x55, 0x97, 0x00, 0x10, 0x58, 0xae, - 0x00, 0x10, 0x55, 0x8f, 0x00, 0x10, 0x55, 0x8f, 0x00, 0x10, 0x55, 0x8f, - 0x00, 0x10, 0x55, 0x8f, 0x00, 0x10, 0x55, 0x8f, 0x00, 0x10, 0x55, 0x8f, - 0x48, 0x03, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4a, 0x03, 0x90, 0x05, - 0x00, 0x00, 0x01, 0x40, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x04, 0x00, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x04, 0x15, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x84, 0x04, 0x09, 0xc0, 0x82, 0x14, 0x05, 0x00, - 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x18, 0xc4, 0x8c, 0x14, 0x2d, 0x14, - 0x04, 0x00, 0x00, 0x05, 0x59, 0xcc, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x0c, 0x1c, 0x80, 0x48, 0x0f, 0x50, 0x15, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, 0x04, 0x02, 0x00, 0x13, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x0e, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x11, 0x00, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0xea, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x22, - 0x04, 0x01, 0xf0, 0x0c, 0x04, 0x01, 0xf8, 0x1f, 0x04, 0x01, 0xf0, 0x0a, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x30, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x04, 0x01, 0xfa, 0x46, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x80, 0x00, 0x04, 0x02, 0x00, 0x02, 0x04, 0x01, 0xfb, 0x3c, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x17, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x28, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x0b, - 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x48, 0x40, 0x14, 0x18, 0x00, 0x80, 0x14, 0x21, 0x20, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, 0x5c, 0x00, 0x18, 0x00, - 0x5c, 0x00, 0x10, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x00, 0x15, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x82, 0x00, 0x15, 0x80, - 0x23, 0x00, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0xcf, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x23, - 0x04, 0x02, 0x00, 0x55, 0x59, 0xcc, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x59, 0xcc, 0x08, 0x01, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0xc8, 0x57, 0x04, 0x01, 0xfb, 0xb8, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x01, 0xbe, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x00, 0x00, 0x12, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x04, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x0c, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x01, 0xa9, - 0x59, 0x30, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0x80, 0x01, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x01, 0xa0, - 0x59, 0xcc, 0x0a, 0x04, 0x48, 0x06, 0x62, 0x02, 0x59, 0xa8, 0x00, 0x15, - 0x80, 0x00, 0x01, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x00, 0x01, 0x99, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, 0x02, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x05, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x82, 0x00, 0x0d, 0x80, - 0x02, 0x14, 0x00, 0x00, 0x04, 0x00, 0x07, 0xfa, 0x82, 0x00, 0x0d, 0x80, - 0x02, 0x10, 0x00, 0x00, 0x04, 0x00, 0x07, 0xf7, 0x82, 0x00, 0x0d, 0x80, - 0x02, 0x10, 0x00, 0x00, 0x04, 0x00, 0x07, 0xf4, 0x82, 0x00, 0x0d, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0x81, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0x7b, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x01, 0xf7, 0xe8, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x22, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x01, 0x73, - 0x59, 0xcc, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xcc, 0x00, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xcc, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x01, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x01, 0x68, 0x59, 0xa8, 0x08, 0x05, - 0x8c, 0x04, 0x0d, 0x14, 0x04, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf9, 0x83, - 0x04, 0x02, 0x00, 0x0f, 0x04, 0x01, 0xf9, 0x99, 0x04, 0x00, 0x00, 0x0d, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x59, 0xcc, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5a, 0xc6, 0x04, 0x00, 0x01, 0x44, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x41, 0x7a, 0x68, 0x00, 0x04, 0x01, 0xf1, 0x40, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x29, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x20, - 0x84, 0x00, 0x05, 0x4c, 0x48, 0x03, 0x50, 0x23, 0x59, 0xcc, 0x08, 0x00, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, 0x48, 0x07, 0x50, 0x0f, - 0x49, 0x7b, 0x88, 0x30, 0x84, 0x04, 0x0d, 0x70, 0x48, 0x07, 0x88, 0x32, - 0x59, 0xc4, 0x08, 0x02, 0x84, 0x04, 0x0d, 0x4c, 0x48, 0x07, 0x88, 0x02, - 0x59, 0xcc, 0x00, 0x07, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x48, 0x03, 0x88, 0x93, 0x48, 0x03, 0x50, 0x1d, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x59, 0xa8, 0x10, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x99, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0x30, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x17, - 0x04, 0x01, 0xf0, 0xeb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x07, 0xf5, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x07, 0xf3, - 0x04, 0x01, 0xf1, 0x27, 0x82, 0x00, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x13, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0x1e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1d, - 0x04, 0x01, 0xf0, 0xd6, 0x59, 0xa8, 0x00, 0x23, 0x84, 0x00, 0x05, 0x48, - 0x48, 0x03, 0x50, 0x23, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x04, 0x01, 0xf0, 0xd0, 0x82, 0x00, 0x0d, 0x80, 0x05, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0a, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x01, 0x09, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x04, 0x01, 0xf0, 0xc4, 0x82, 0x00, 0x0d, 0x80, 0x20, 0x10, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x19, - 0x04, 0x01, 0xf0, 0xbe, 0x82, 0x00, 0x0d, 0x80, 0x21, 0x10, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1a, - 0x04, 0x01, 0xf0, 0xb8, 0x82, 0x00, 0x0d, 0x80, 0x52, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0a, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x00, 0xf1, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1b, - 0x04, 0x01, 0xf0, 0xac, 0x82, 0x00, 0x0d, 0x80, 0x50, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0a, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x00, 0xe5, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x04, 0x01, 0xf0, 0xa0, 0x82, 0x00, 0x0d, 0x80, 0x13, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x34, - 0x04, 0x01, 0xf0, 0x9a, 0x82, 0x00, 0x0d, 0x80, 0x12, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0a, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x00, 0xd3, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x04, 0x01, 0xf0, 0x8e, 0x82, 0x00, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x0d, 0x80, 0x24, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x04, 0x01, 0xf0, 0x86, - 0x82, 0x00, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x04, 0x0d, 0x80, - 0x53, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x2a, 0x04, 0x01, 0xf0, 0x7e, 0x82, 0x00, 0x0d, 0x80, - 0x0f, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x04, 0x01, 0xf0, 0x78, 0x82, 0x00, 0x0d, 0x80, - 0x61, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x36, 0x83, 0xcc, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x80, 0x08, 0x08, 0x00, 0x50, 0x08, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x4c, 0x58, 0x00, 0x00, 0x80, 0x00, 0xb1, 0x04, - 0x80, 0x58, 0xb1, 0xc0, 0x04, 0x00, 0x00, 0x26, 0x4c, 0x10, 0x00, 0x00, - 0x50, 0x04, 0x18, 0x00, 0x82, 0x0c, 0x15, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x11, 0x30, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe5, - 0x82, 0x08, 0x25, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe2, 0x04, 0x01, 0xf0, 0x0c, - 0x82, 0x08, 0x25, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe3, 0x04, 0x01, 0xf0, 0x06, - 0x82, 0x08, 0x25, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x15, - 0x82, 0x0c, 0x25, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x0c, 0x19, 0x20, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, 0x5c, 0x00, 0x20, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xda, - 0x5c, 0x00, 0xb0, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x23, - 0x04, 0x01, 0xf0, 0x40, 0x82, 0x00, 0x0d, 0x80, 0x60, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x3f, - 0x04, 0x01, 0xf0, 0x3a, 0x82, 0x00, 0x0d, 0x80, 0x54, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x04, 0x01, 0xfb, 0x3c, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x00, 0x75, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x46, 0x04, 0x01, 0xf0, 0x30, 0x82, 0x00, 0x0d, 0x80, - 0x55, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x09, 0x04, 0x01, 0xfb, 0x5a, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, - 0x04, 0x01, 0xf0, 0x28, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x42, - 0x04, 0x01, 0xf0, 0x25, 0x82, 0x00, 0x0d, 0x80, 0x78, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, - 0x04, 0x01, 0xf0, 0x1f, 0x82, 0x00, 0x0d, 0x80, 0x10, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4e, - 0x04, 0x01, 0xf0, 0x19, 0x82, 0x00, 0x0d, 0x80, 0x63, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4a, - 0x04, 0x01, 0xf0, 0x13, 0x82, 0x00, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x0d, 0x80, 0x56, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x04, 0x01, 0xf0, 0x0b, - 0x82, 0x00, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x04, 0x0d, 0x80, - 0x57, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x50, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x1d, 0x59, 0xcc, 0x38, 0x00, 0x82, 0x1c, 0x3d, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x82, 0x1c, 0x05, 0x80, 0x00, 0xff, 0xff, 0xfe, - 0x59, 0xcc, 0x00, 0x01, 0x04, 0x02, 0x00, 0x05, 0x40, 0x00, 0x30, 0x00, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x01, 0xf0, 0x05, - 0x04, 0x01, 0xf8, 0xda, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x00, 0x34, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb6, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x00, 0x2f, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x06, - 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x18, 0x05, 0x80, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x00, 0x27, 0x59, 0x34, 0x02, 0x00, - 0x8c, 0x00, 0x05, 0x14, 0x04, 0x00, 0x00, 0x0f, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x0c, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x3f, 0x04, 0x00, 0x00, 0x09, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x34, 0x04, 0x00, 0x00, 0x06, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x24, 0x04, 0x00, 0x00, 0x03, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x4c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x18, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x0c, 0x04, 0x48, 0x06, 0x62, 0x02, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x02, 0x00, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x11, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x02, 0x00, 0x05, 0x59, 0xcc, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x60, 0x1e, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x59, 0x88, 0x00, 0x53, 0x48, 0x03, 0xc8, 0x57, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x53, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x49, 0x59, 0xcc, 0x18, 0x06, - 0x80, 0x0c, 0x19, 0x30, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xd5, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x07, 0xf1, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x0c, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x29, 0x00, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x59, 0xa8, 0x00, 0x23, - 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x10, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, - 0x82, 0x00, 0x0d, 0x80, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x0d, 0x80, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, - 0x82, 0x00, 0x0d, 0x80, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfd, 0x59, 0xcc, 0x20, 0x06, - 0x82, 0x10, 0x25, 0x00, 0xff, 0x00, 0x00, 0x00, 0x9c, 0x10, 0x21, 0xc0, - 0x04, 0x01, 0xf8, 0x07, 0x82, 0x0c, 0x1c, 0x00, 0x00, 0x10, 0xac, 0xb0, - 0x50, 0x0c, 0x18, 0x00, 0x80, 0x0c, 0x05, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x10, 0x08, 0x00, 0x41, 0x78, 0x18, 0x00, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x04, - 0x80, 0x0c, 0x18, 0x00, 0x40, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xfb, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x10, 0xa3, 0x51, 0x50, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x08, - 0x04, 0x00, 0x00, 0x02, 0x90, 0x00, 0x01, 0xc0, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xfa, 0xe3, 0x04, 0x02, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xcc, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xcc, 0x04, 0x00, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x84, 0x04, 0x09, 0xc0, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x33, 0x04, 0x02, 0x00, 0x1f, - 0x04, 0x01, 0xf9, 0x8f, 0x04, 0x00, 0x00, 0x38, 0x59, 0xcc, 0x0a, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x59, 0xcc, 0x00, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x09, 0x59, 0xcc, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x2b, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x15, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x82, 0x00, 0x0d, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x24, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x20, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x32, 0x04, 0x02, 0x00, 0x19, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x14, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x13, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x59, 0xcc, 0x00, 0x01, - 0x04, 0x01, 0xf8, 0x10, 0x04, 0x02, 0x00, 0x0e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0xb1, 0x04, 0x02, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x08, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x0c, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x10, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, 0x4c, 0x34, 0x00, 0x00, - 0x82, 0x00, 0x35, 0x00, 0x00, 0xff, 0xff, 0xff, 0x82, 0x18, 0x15, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x82, 0x08, 0x15, 0x80, 0x00, 0xff, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x16, 0x82, 0x18, 0x14, 0x80, 0x00, 0xff, 0xff, 0xfc, - 0x04, 0x00, 0x10, 0x13, 0x82, 0x18, 0x15, 0x80, 0x00, 0xff, 0xff, 0xfd, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfd, - 0x04, 0x01, 0xf0, 0x40, 0x82, 0x18, 0x15, 0x80, 0x00, 0xff, 0xff, 0xfe, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x04, 0x01, 0xf0, 0x3a, 0x82, 0x18, 0x15, 0x80, 0x00, 0xff, 0xff, 0xfc, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfc, - 0x04, 0x01, 0xf0, 0x34, 0x41, 0x78, 0x10, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x41, 0xac, 0x70, 0x00, 0x50, 0x38, 0x00, 0x00, 0x80, 0x00, 0x6d, 0x40, - 0x04, 0x02, 0x00, 0x05, 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x1e, - 0x84, 0x10, 0x15, 0x5e, 0x04, 0x01, 0xf0, 0x1c, 0x58, 0x34, 0x02, 0x12, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x04, 0x00, 0x00, 0x11, - 0x59, 0xa8, 0x40, 0x0f, 0x82, 0x20, 0x45, 0x00, 0x00, 0xff, 0xff, 0x00, - 0x82, 0x18, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, 0x04, 0x00, 0x00, 0x02, - 0x80, 0x20, 0x05, 0x80, 0x58, 0x34, 0x00, 0x02, 0x04, 0x02, 0x00, 0x0f, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x18, 0x45, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x20, 0x45, 0x80, 0x04, 0x02, 0x00, 0x09, - 0x04, 0x01, 0xf0, 0x06, 0x58, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x80, 0x18, 0x45, 0x80, 0x04, 0x02, 0x00, 0x03, - 0x40, 0x12, 0x88, 0x00, 0x04, 0x01, 0xf0, 0x0c, 0x80, 0x10, 0x20, 0x00, - 0x80, 0x38, 0x70, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xdb, - 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x05, 0x48, 0x1b, 0xc8, 0x57, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, - 0x84, 0x0a, 0x8d, 0x1e, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0x68, 0x00, - 0x5c, 0x00, 0x70, 0x00, 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x00, 0x00, 0x03, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x06, - 0x59, 0xcc, 0x0c, 0x00, 0x80, 0x04, 0x09, 0x10, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x01, 0xf0, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, - 0x00, 0x10, 0x59, 0xb8, 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xcb, - 0x00, 0x10, 0x58, 0xe3, 0x00, 0x10, 0x58, 0xe6, 0x00, 0x10, 0x58, 0xc9, - 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, - 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, 0x00, 0x10, 0x58, 0xc9, - 0x00, 0x10, 0x58, 0xc9, 0x48, 0x03, 0xc8, 0x56, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xde, 0x04, 0x00, 0x00, 0x14, 0x82, 0x14, 0x05, 0x00, - 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0xc4, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x0e, 0x59, 0xcc, 0x00, 0x01, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x08, 0x02, 0x80, 0x04, 0x05, 0x80, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xcc, 0x0a, 0x04, 0x48, 0x06, 0x62, 0x02, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x46, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x59, 0xcc, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xcc, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0xc3, 0x04, 0x00, 0x00, 0x16, 0x82, 0x14, 0x05, 0x00, - 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00, 0xc4, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x10, 0x10, 0x59, 0xcc, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x34, 0x08, 0x02, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x07, 0x59, 0xcc, 0x0a, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x45, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x59, 0xcc, 0x00, 0x04, - 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x00, 0x04, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xcc, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x59, 0xcc, 0x10, 0x01, 0x82, 0x08, 0x15, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x80, 0x08, 0x05, 0x40, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x17, 0xc8, 0x57, 0x04, 0x01, 0xf9, 0xde, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x00, 0x16, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x00, 0x11, 0x59, 0xcc, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x00, 0x09, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x10, 0x02, 0x0c, 0x01, 0xf0, 0x03, 0x48, 0x03, 0xc8, 0x56, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x59, 0x2c, 0x00, 0x10, 0x59, 0x2e, - 0x00, 0x10, 0x59, 0x2c, 0x00, 0x10, 0x59, 0x2c, 0x00, 0x10, 0x59, 0x87, - 0x00, 0x10, 0x59, 0x96, 0x48, 0x03, 0xc8, 0x56, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0x00, 0x15, 0x80, 0x00, 0x01, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x07, 0xfa, 0x59, 0xcc, 0x08, 0x02, - 0x48, 0x07, 0xc8, 0x56, 0x8c, 0x04, 0x0d, 0x2e, 0x04, 0x02, 0x00, 0x1d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xd5, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xcc, 0x00, 0x01, 0x04, 0x01, 0xff, 0x18, - 0x04, 0x02, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x04, 0x02, 0x00, 0x0a, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x05, - 0x49, 0x36, 0x60, 0x09, 0x59, 0xcc, 0x08, 0x04, 0x48, 0x06, 0x60, 0x1c, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x48, 0x03, 0xc8, 0x57, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x41, 0x7a, 0x68, 0x00, 0x59, 0xcc, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x60, 0x1e, - 0x04, 0x01, 0xf7, 0xef, 0x59, 0xcc, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x57, - 0x04, 0x01, 0xfe, 0xff, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, - 0x04, 0x02, 0x07, 0xd4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x07, 0xcf, - 0x59, 0xcc, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x06, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x02, 0x07, 0xc7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x25, 0x04, 0x02, 0x00, 0x13, 0x04, 0x01, 0xf8, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x07, 0xc0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x05, 0x94, 0x04, 0x00, 0x07, 0xbb, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x08, 0x04, - 0x48, 0x06, 0x60, 0x1c, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x88, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x07, 0xaf, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x0c, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x59, 0xcc, 0x08, 0x02, - 0x8c, 0x04, 0x0d, 0x2e, 0x04, 0x00, 0x00, 0x0b, 0x04, 0x01, 0xf8, 0x1f, - 0x04, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf9, 0x67, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xcc, 0x0a, 0x04, 0x48, 0x06, 0x62, 0x02, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x89, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x49, 0x33, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x00, 0x04, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xcc, 0x08, 0x02, 0x8c, 0x04, 0x0d, 0x2e, - 0x04, 0x00, 0x00, 0x0b, 0x04, 0x01, 0xf8, 0x0e, 0x04, 0x00, 0x00, 0x09, - 0x04, 0x01, 0xf9, 0x56, 0x04, 0x02, 0x00, 0x07, 0x59, 0xcc, 0x0a, 0x04, - 0x48, 0x06, 0x62, 0x02, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x8a, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x49, 0x33, 0xc8, 0x57, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x0a, 0x04, 0x04, 0x01, 0xf0, 0x02, - 0x59, 0xcc, 0x0c, 0x04, 0x59, 0xa8, 0x00, 0x0d, 0x59, 0xa8, 0x10, 0x64, - 0x80, 0x08, 0x04, 0x00, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x08, - 0x40, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x80, 0x04, 0x08, 0xca, - 0x80, 0x04, 0x0c, 0x00, 0x82, 0x06, 0x64, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf7, 0xfe, - 0x59, 0xcc, 0x08, 0x02, 0x8c, 0x04, 0x0d, 0x2e, 0x04, 0x02, 0x00, 0x10, - 0x04, 0x01, 0xff, 0xec, 0x04, 0x00, 0x00, 0x0e, 0x59, 0xcc, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x34, 0x08, 0x02, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x05, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x51, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x59, 0xcc, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x05, - 0x04, 0x01, 0xf0, 0x01, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x3c, 0x00, 0x00, - 0x41, 0xcc, 0x78, 0x00, 0x40, 0x14, 0x20, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x78, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x58, 0x3c, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xc0, 0x00, - 0x04, 0x00, 0x00, 0x24, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x21, 0x4c, 0x18, 0x00, 0x00, 0x58, 0x3c, 0x00, 0x01, - 0x04, 0x01, 0xfe, 0x6f, 0x04, 0x02, 0x00, 0x1f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0xb1, 0x04, 0x02, 0x00, 0x1c, 0x49, 0x36, 0x60, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x18, - 0x49, 0x2e, 0x60, 0x17, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x5a, 0x04, - 0x48, 0x12, 0x5c, 0x04, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x40, 0x3c, 0xa0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x5c, 0x00, 0x30, 0x00, - 0x48, 0x1a, 0x64, 0x1a, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x3e, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x00, 0x30, 0x00, 0x04, 0x01, 0xf7, 0xfb, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0xcc, 0x04, 0x00, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x00, - 0x84, 0x04, 0x09, 0xc0, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, - 0x04, 0x02, 0x00, 0x4f, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x22, - 0x04, 0x02, 0x00, 0x40, 0x59, 0xc4, 0x00, 0xa4, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x00, 0x10, 0x04, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x10, 0x45, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x3f, 0x82, 0x00, 0x0d, 0x80, 0x60, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x3c, 0x82, 0x00, 0x0d, 0x80, 0x54, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x39, 0x82, 0x00, 0x0d, 0x80, 0x03, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x1b, 0x59, 0xa8, 0x08, 0x23, 0x8c, 0x04, 0x0d, 0x02, - 0x04, 0x02, 0x00, 0x33, 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x02, 0x00, 0x31, - 0x82, 0x00, 0x0d, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x2b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, 0x04, 0x00, 0x00, 0x2b, - 0x59, 0xa8, 0x00, 0x1c, 0x80, 0x00, 0x00, 0xd0, 0x59, 0xa8, 0x08, 0x0f, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x05, 0x40, - 0x59, 0xcc, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x1b, 0x04, 0x01, 0xf0, 0x1c, - 0x59, 0xc4, 0x08, 0x02, 0x8c, 0x04, 0x0d, 0x0c, 0x04, 0x02, 0x00, 0x17, - 0x82, 0x00, 0x0d, 0x80, 0x52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0xec, - 0x82, 0x00, 0x0d, 0x80, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0xe9, - 0x82, 0x00, 0x0d, 0x80, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0xe6, - 0x04, 0x01, 0xf0, 0x0d, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x23, - 0x04, 0x02, 0x00, 0x0a, 0x04, 0x01, 0xff, 0x51, 0x04, 0x00, 0x00, 0x08, - 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x51, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x03, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x0d, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x00, 0x0d, 0x80, 0x52, 0x00, 0x00, 0x00, 0x04, 0x02, 0x07, 0xf3, - 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x07, 0xef, - 0x04, 0x01, 0xf7, 0xec, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x5c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x4c, 0x04, 0x02, 0x00, 0x1f, 0x59, 0xcc, 0xb8, 0x07, - 0x9c, 0x5c, 0xb9, 0xc0, 0x82, 0x5c, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x10, 0x8c, 0x5c, 0xbd, 0x02, - 0x04, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0xcc, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x04, 0x02, 0x00, 0x05, 0x8c, 0x5c, 0xbd, 0x04, 0x04, 0x00, 0x00, 0x03, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x02, 0x00, 0x1f, - 0x59, 0xcc, 0xb8, 0x07, 0x9c, 0x5c, 0xb9, 0xc0, 0x82, 0x5c, 0xbd, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x8c, 0x5c, 0xbd, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x10, - 0x8c, 0x5c, 0xbd, 0x02, 0x04, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x05, 0x8c, 0x5c, 0xbd, 0x04, - 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, 0x40, 0x00, 0x30, 0x00, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x83, 0xac, 0x74, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x50, 0x38, 0x00, 0x00, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x18, 0x05, 0x80, 0x04, 0x00, 0x00, 0x10, 0x80, 0x10, 0x20, 0x00, - 0x80, 0x38, 0x70, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf5, - 0x82, 0x10, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x41, 0xac, 0x70, 0x00, 0x04, 0x02, 0x17, 0xed, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x40, 0x12, 0x88, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfd, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc8, 0x00, 0x00, 0x84, 0x00, 0x05, 0x58, - 0x84, 0x00, 0x05, 0x12, 0x48, 0x03, 0x90, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0x28, 0x1a, 0x00, 0x00, 0x03, 0xe8, 0x4a, 0x03, 0x28, 0x02, - 0x00, 0x10, 0xd8, 0xd4, 0x4a, 0x03, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0x28, 0x08, 0x00, 0x10, 0x68, 0x93, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x83, 0x94, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x49, 0x78, 0x78, 0x01, 0x4a, 0x00, 0x78, 0x02, 0x00, 0x10, 0x68, 0x48, - 0x82, 0x3c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x4a, 0x03, 0x28, 0x19, 0xff, 0xff, 0x00, 0x00, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x64, 0x04, 0x01, 0xf9, 0x85, - 0x42, 0x01, 0xd0, 0x00, 0x00, 0x01, 0x86, 0xa0, 0x04, 0x01, 0xf1, 0x94, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0c, 0x4d, 0x30, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x4c, 0xfc, 0x00, 0x00, 0x4d, 0x38, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x4c, 0x00, 0x00, 0x4d, 0x48, 0x00, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x64, 0x00, 0x00, - 0x4c, 0xc8, 0x00, 0x00, 0x4c, 0xcc, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x05, 0xd0, 0x5c, 0x01, 0x98, 0x00, 0x5c, 0x01, 0x90, 0x00, - 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x5c, 0x02, 0x90, 0x00, 0x5c, 0x02, 0x98, 0x00, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x70, 0x00, 0x5c, 0x01, 0xf8, 0x00, - 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x94, 0x00, 0x04, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x0a, 0x59, 0x94, 0x00, 0x25, - 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0x28, 0x04, 0x48, 0x0b, 0x28, 0x05, 0x4a, 0x03, 0x28, 0x03, - 0x00, 0x00, 0x00, 0x0a, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x94, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x0a, - 0x59, 0x94, 0x00, 0x25, 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0x28, 0x1f, 0x48, 0x0b, 0x28, 0x20, - 0x4a, 0x03, 0x28, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x40, 0x68, 0x08, 0x00, - 0x40, 0x6c, 0x10, 0x00, 0x04, 0x01, 0xf8, 0x02, 0x5c, 0x00, 0x00, 0x00, - 0x59, 0x94, 0x00, 0x22, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x0a, - 0x59, 0x94, 0x00, 0x25, 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0x28, 0x22, 0x48, 0x0b, 0x28, 0x23, - 0x4a, 0x03, 0x28, 0x21, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0x94, 0x00, 0x05, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x03, 0x49, 0x7b, 0x28, 0x04, 0x49, 0x7b, 0x28, 0x05, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x94, 0x00, 0x20, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x03, 0x49, 0x7b, 0x28, 0x1f, - 0x49, 0x7b, 0x28, 0x20, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0x94, 0x00, 0x23, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x0b, 0xc8, 0x57, 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x03, - 0x49, 0x7b, 0x28, 0x22, 0x49, 0x7b, 0x28, 0x23, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x48, 0xeb, 0xc8, 0x57, - 0x59, 0x34, 0x02, 0x03, 0x80, 0xe8, 0x04, 0x80, 0x04, 0x00, 0x10, 0x02, - 0x48, 0xea, 0x6a, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x42, 0x00, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x59, 0x96, 0x88, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x12, 0x59, 0x34, 0x1a, 0x03, - 0x80, 0x0c, 0x18, 0x40, 0x04, 0x00, 0x10, 0x0f, 0x59, 0x94, 0x00, 0x27, - 0x80, 0x0c, 0x04, 0x80, 0x04, 0x00, 0x00, 0x03, 0x48, 0x02, 0x6a, 0x03, - 0x04, 0x02, 0x10, 0x0a, 0x59, 0x34, 0x00, 0x0f, 0x49, 0x7a, 0x6a, 0x03, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x06, 0x4c, 0x3c, 0x00, 0x00, - 0x59, 0x34, 0x14, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x68, - 0x5c, 0x00, 0x78, 0x00, 0x81, 0x46, 0x88, 0x00, 0x83, 0x44, 0x04, 0x80, - 0x00, 0x00, 0x08, 0x00, 0x04, 0x02, 0x10, 0x07, 0x80, 0x3c, 0x78, 0x40, - 0x04, 0x02, 0x07, 0xe7, 0x49, 0x47, 0x28, 0x01, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x28, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x49, 0x7b, 0x28, 0x01, 0x04, 0x01, 0xf7, 0xfa, - 0x42, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x10, 0x59, 0x96, 0x60, 0x02, - 0x59, 0x30, 0x02, 0x05, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x06, - 0x59, 0x94, 0x00, 0x27, 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x62, 0x05, - 0x04, 0x00, 0x10, 0x2d, 0x04, 0x00, 0x00, 0x2c, 0x59, 0x30, 0x02, 0x06, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x14, 0x59, 0xb8, 0x00, 0xe4, - 0x8c, 0x00, 0x05, 0x24, 0x04, 0x02, 0x00, 0x11, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe4, - 0x8c, 0x00, 0x05, 0x24, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x02, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x08, 0x59, 0x94, 0x00, 0x27, - 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x62, 0x06, 0x4a, 0x03, 0x70, 0xe4, - 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x10, 0x1c, 0x04, 0x00, 0x00, 0x1b, - 0x83, 0x32, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24, 0x49, 0x33, 0x28, 0x02, - 0x41, 0x54, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, 0x04, 0x02, 0x10, 0x05, - 0x80, 0x3c, 0x78, 0x40, 0x04, 0x02, 0x07, 0xdb, 0x5c, 0x03, 0xe0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x94, 0x00, 0x26, 0x48, 0x03, 0x28, 0x27, - 0x4a, 0x03, 0x28, 0x02, 0x00, 0x10, 0xd8, 0xd4, 0x49, 0x7b, 0x28, 0x26, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0f, 0x4a, 0x03, 0x28, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x3c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0xfa, - 0x5c, 0x00, 0x78, 0x00, 0x04, 0x01, 0xf7, 0xd1, 0x4c, 0x3c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x85, 0x5e, 0x5c, 0x00, 0x78, 0x00, - 0x04, 0x01, 0xf7, 0xe2, 0x4a, 0x03, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x08, 0x68, - 0x8c, 0x04, 0x0d, 0x30, 0x04, 0x02, 0x00, 0x29, 0x8c, 0x04, 0x0d, 0x32, - 0x04, 0x00, 0x00, 0x0f, 0x59, 0xa8, 0x00, 0x66, 0x81, 0x64, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x19, 0x59, 0xa8, 0x00, 0x0a, 0x81, 0x50, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x67, 0x59, 0xa8, 0x10, 0x63, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x12, 0x90, 0x04, 0x11, 0xc0, - 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x70, 0x00, 0x04, 0x01, 0xf0, 0x12, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x00, 0x00, 0x16, - 0x80, 0x04, 0x08, 0x40, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x07, 0x50, 0x68, 0x04, 0x01, 0xf0, 0x10, - 0x90, 0x04, 0x01, 0xc0, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x80, 0x04, 0x0d, 0x40, 0x90, 0x04, 0x01, 0xc0, 0x80, 0x04, 0x05, 0x80, - 0x82, 0x00, 0x15, 0x00, 0x00, 0x00, 0x70, 0x00, 0x82, 0x04, 0x05, 0x00, - 0xff, 0xff, 0x8f, 0xff, 0x80, 0x08, 0x05, 0x40, 0x48, 0x03, 0x50, 0x68, - 0x80, 0x08, 0x11, 0x14, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x06, 0x0a, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x28, 0x07, 0x00, 0x00, 0x07, 0xd0, - 0x4a, 0x03, 0x28, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x83, 0x18, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x94, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x83, 0x18, 0x04, 0x00, - 0x00, 0x10, 0x5b, 0x1d, 0x50, 0x00, 0x00, 0x00, 0x80, 0x3c, 0x7c, 0x00, - 0x48, 0x04, 0x78, 0x01, 0x4a, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x94, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x83, 0x18, 0x04, 0x00, 0x00, 0x10, 0x5b, 0x1d, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x3c, 0x7c, 0x00, 0x49, 0x78, 0x78, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x59, 0x94, 0x00, 0x25, 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0x28, 0x04, 0x48, 0x0b, 0x28, 0x05, - 0x4a, 0x03, 0x28, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x59, 0x94, 0x00, 0x25, - 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0x28, 0x1c, 0x48, 0x0b, 0x28, 0x1d, 0x4a, 0x03, 0x28, 0x1b, - 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x94, 0x00, 0x1d, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x03, 0x48, 0x03, 0x28, 0x1c, - 0x48, 0x03, 0x28, 0x1d, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x59, 0x94, 0x00, 0x25, - 0x80, 0x04, 0x04, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0x28, 0x22, 0x48, 0x0b, 0x28, 0x23, 0x4a, 0x03, 0x28, 0x21, - 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0xe9, 0xd1, 0xc0, - 0x04, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xf8, 0x36, 0x04, 0x02, 0x50, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0xe8, 0x10, 0x00, - 0x41, 0x78, 0x08, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x62, 0xb7, 0x59, 0x94, 0x00, 0x24, - 0x80, 0x08, 0x04, 0x00, 0x48, 0x03, 0x28, 0x24, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xd9, - 0x04, 0x01, 0xfe, 0xe1, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x4b, 0xc8, - 0x04, 0x01, 0xff, 0xd2, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xf2, - 0x04, 0x01, 0xfe, 0xdb, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0x74, - 0x04, 0x01, 0xfe, 0xd8, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3d, 0xcb, - 0x04, 0x01, 0xfe, 0xd5, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3e, 0xab, - 0x04, 0x01, 0xf6, 0xe6, 0x42, 0x03, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0xb0, 0x30, 0x00, 0x00, 0x40, 0xeb, 0xf8, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x40, 0x04, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xfe, 0x04, 0x01, 0xf0, 0x07, - 0x42, 0x03, 0xe0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x4d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0xb0, 0x40, 0x00, 0x00, 0x40, 0xeb, 0xf8, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x04, 0x00, 0x50, 0x04, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xfe, 0x04, 0x01, 0xf0, 0x07, - 0x42, 0x03, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x4e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x0d, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x01, 0x00, 0x59, 0x9c, 0x0a, 0x02, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x02, 0x80, 0x04, 0x08, 0x00, - 0x80, 0x04, 0x14, 0x80, 0x04, 0x00, 0x10, 0x02, 0x40, 0x00, 0x08, 0x00, - 0x48, 0x07, 0x50, 0x64, 0x59, 0xa8, 0x10, 0x0d, 0x40, 0x04, 0x00, 0x00, - 0x80, 0x0a, 0xcc, 0x80, 0x49, 0x67, 0x50, 0x0d, 0x49, 0x67, 0x50, 0x66, - 0x59, 0xaa, 0xa8, 0x0a, 0x41, 0x64, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x62, 0x98, - 0x82, 0x06, 0xa4, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x49, 0x53, 0x50, 0x62, - 0x41, 0x52, 0xb0, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x10, 0xb6, 0x34, - 0x4a, 0x00, 0x60, 0x04, 0x00, 0x00, 0x01, 0x2c, 0x4a, 0x00, 0x60, 0x05, - 0xda, 0x10, 0xda, 0x10, 0x4a, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x11, - 0x4a, 0x00, 0x60, 0x09, 0x00, 0x10, 0xb6, 0x34, 0x4a, 0x00, 0x60, 0x0a, - 0x00, 0x10, 0x0f, 0xd3, 0x59, 0x9c, 0x00, 0x14, 0x48, 0x00, 0x60, 0x11, - 0x59, 0x9c, 0x00, 0x15, 0x48, 0x00, 0x60, 0x12, 0x42, 0x00, 0x60, 0x00, - 0x00, 0x10, 0xb6, 0x10, 0x4a, 0x00, 0x62, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x4a, 0x00, 0x64, 0x06, 0x00, 0x00, 0x00, 0x06, 0x4a, 0x00, 0x60, 0x02, - 0xff, 0xff, 0x00, 0x00, 0x4a, 0x00, 0x60, 0x08, 0x00, 0x10, 0xb6, 0x34, - 0x4a, 0x00, 0x60, 0x14, 0x00, 0x10, 0xb6, 0x34, 0x59, 0x9c, 0x00, 0x14, - 0x48, 0x00, 0x60, 0x15, 0x59, 0x9c, 0x00, 0x15, 0x48, 0x00, 0x60, 0x16, - 0x59, 0x9c, 0x04, 0x13, 0x48, 0x00, 0x60, 0x17, 0x49, 0x50, 0x60, 0x18, - 0x49, 0x54, 0x60, 0x19, 0x59, 0xa8, 0x00, 0x64, 0x48, 0x00, 0x60, 0x1a, - 0x4a, 0x00, 0x60, 0x1b, 0x00, 0x10, 0xac, 0x62, 0x4a, 0x00, 0x60, 0x1c, - 0x00, 0x10, 0xac, 0x63, 0x4a, 0x00, 0x60, 0x1d, 0x00, 0x10, 0xac, 0x67, - 0x42, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x10, 0xb6, 0x10, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xa9, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x02, 0x00, 0x55, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x20, - 0x59, 0x30, 0x04, 0x14, 0x84, 0x00, 0x05, 0x12, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x20, 0x20, 0x04, 0x00, 0x00, 0x0b, 0x8c, 0x00, 0x05, 0x14, - 0x04, 0x02, 0x00, 0x0f, 0x48, 0x02, 0x64, 0x14, 0x81, 0x3e, 0x79, 0xc0, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0x0b, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x0a, 0x00, 0x8c, 0x04, 0x0d, 0x0a, - 0x04, 0x00, 0x07, 0xf3, 0x84, 0x00, 0x05, 0x52, 0x04, 0x01, 0xf7, 0xf1, - 0x84, 0x00, 0x05, 0x14, 0x59, 0x2c, 0x08, 0x0d, 0x48, 0x06, 0x60, 0x15, - 0x04, 0x01, 0xf7, 0xef, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x0a, 0x00, - 0x8c, 0x04, 0x0d, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x1e, - 0x59, 0x30, 0x0c, 0x14, 0x84, 0x04, 0x0d, 0x52, 0x48, 0x06, 0x64, 0x14, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x1e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x00, 0x7b, 0x81, 0x3e, 0x79, 0xc0, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x07, 0x0b, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x2c, - 0x8c, 0x00, 0x05, 0x1e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0x38, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x20, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x20, 0x20, 0x04, 0x00, 0x00, 0x14, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x00, 0x00, 0x08, 0x81, 0x3e, 0x79, 0xc0, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x07, 0x0b, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x81, 0x3e, 0x79, 0xc0, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0x0b, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x0a, 0x00, 0x8c, 0x04, 0x0d, 0x0a, - 0x04, 0x00, 0x07, 0xea, 0x59, 0x30, 0x0c, 0x14, 0x84, 0x04, 0x0d, 0x52, - 0x48, 0x06, 0x64, 0x14, 0x04, 0x01, 0xf7, 0xe6, 0x49, 0x2f, 0xc8, 0x57, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x33, 0x49, 0x2f, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x33, - 0x48, 0x07, 0xc8, 0x56, 0x59, 0xa8, 0x00, 0x65, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x08, 0x05, 0x40, 0x04, 0x01, 0xf0, 0x02, - 0x80, 0x08, 0x05, 0x00, 0x48, 0x03, 0x50, 0x65, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x03, 0x08, 0x02, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x7b, 0x08, 0x03, 0x49, 0x7b, 0x08, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x84, 0x00, 0x02, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x00, 0x4a, 0x03, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x84, 0x00, 0x05, 0x44, 0x84, 0x00, 0x05, 0x06, - 0x48, 0x03, 0x08, 0x02, 0x82, 0x00, 0x0d, 0x00, 0x0f, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0a, 0xd5, 0x59, 0xa8, 0x00, 0x66, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x48, 0x03, 0x50, 0x66, 0x80, 0x00, 0x05, 0x80, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xac, 0xe6, 0x48, 0x00, 0x08, 0x00, - 0x48, 0x00, 0x08, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x66, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x07, 0x48, 0x03, 0x50, 0x66, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x64, 0x04, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x10, 0x1b, 0x58, 0xc8, 0x0a, 0x03, 0x80, 0x00, 0x05, 0x80, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x81, 0x5c, 0x04, 0x80, 0x04, 0x00, 0x10, 0x13, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x60, 0x07, 0x00, 0x00, 0x01, 0x01, - 0x04, 0x01, 0xf8, 0x09, 0x04, 0x01, 0xf8, 0x80, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xf3, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x49, 0x2e, 0x60, 0x08, - 0x58, 0xc8, 0x0a, 0x03, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x00, 0x2c, - 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, 0x49, 0x7a, 0x5c, 0x04, - 0x49, 0x7a, 0x5c, 0x06, 0x49, 0x7a, 0x58, 0x05, 0x4a, 0x02, 0x5a, 0x08, - 0x00, 0x00, 0x00, 0x05, 0x4a, 0x02, 0x5a, 0x07, 0x00, 0x00, 0x00, 0x02, - 0x58, 0xc8, 0x02, 0x01, 0x48, 0x02, 0x5c, 0x04, 0x58, 0xc8, 0x02, 0x02, - 0x48, 0x02, 0x5c, 0x07, 0x58, 0xc8, 0x02, 0x04, 0x48, 0x02, 0x5c, 0x08, - 0x4a, 0x02, 0x58, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x0c, 0x41, 0x2c, 0x20, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x00, 0x0a, - 0x49, 0x7a, 0x5c, 0x04, 0x48, 0x12, 0x58, 0x00, 0x49, 0x2c, 0x20, 0x01, - 0x41, 0x2c, 0x20, 0x00, 0x80, 0x04, 0x08, 0x40, 0x04, 0x02, 0x07, 0xf7, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x7c, 0x00, 0x00, 0x42, 0x02, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x59, 0x84, 0x78, 0x03, 0x80, 0x3c, 0x79, 0xc0, - 0x04, 0x00, 0x00, 0x1e, 0x4c, 0x5c, 0x00, 0x00, 0x58, 0x3c, 0xb8, 0x08, - 0x58, 0x5c, 0x34, 0x08, 0x80, 0x18, 0x31, 0xc0, 0x04, 0x00, 0x00, 0x0b, - 0x04, 0x01, 0xf8, 0x4a, 0x04, 0x00, 0x00, 0x16, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xac, 0xe6, 0x04, 0x01, 0xf8, 0x7f, 0x04, 0x00, 0x00, 0x12, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x0f, - 0x49, 0x2c, 0xb8, 0x05, 0x58, 0x5c, 0x00, 0x05, 0x80, 0x00, 0x05, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf8, 0x30, - 0x58, 0x5c, 0x54, 0x08, 0x04, 0x01, 0xf8, 0x0b, 0x5c, 0x00, 0xb8, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x81, 0x7e, 0xf8, 0x40, 0x04, 0x02, 0x07, 0xe1, - 0x5c, 0x02, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x5c, 0x02, 0xf8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x40, 0x5c, 0x60, 0x00, 0x80, 0x28, 0x51, 0xc0, - 0x04, 0x00, 0x00, 0x18, 0x58, 0x5c, 0x02, 0x04, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x04, 0x40, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x64, 0x00, 0x00, - 0x4d, 0x04, 0x00, 0x00, 0x40, 0x20, 0xc0, 0x00, 0x40, 0x32, 0x08, 0x00, - 0x59, 0x84, 0xc8, 0x04, 0x4c, 0x28, 0x00, 0x00, 0x04, 0x01, 0xf9, 0x3d, - 0x5c, 0x00, 0x50, 0x00, 0x40, 0x60, 0x40, 0x00, 0x41, 0x04, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0xb6, 0x04, 0x02, 0x07, 0xf6, - 0x5c, 0x02, 0x08, 0x00, 0x5c, 0x00, 0xc8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x58, 0xc8, 0x02, 0x04, 0x48, 0x00, 0xbc, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x00, 0x7b, 0x4a, 0x02, 0x60, 0x07, 0x00, 0x00, 0x01, 0x01, - 0x49, 0x7a, 0x60, 0x09, 0x04, 0x01, 0xf0, 0x55, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x84, 0x00, 0x03, 0x80, 0x02, 0x65, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x59, 0x30, 0x00, 0x00, 0x48, 0x03, 0x08, 0x03, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x84, 0x00, 0x03, 0x48, 0x02, 0x60, 0x00, - 0x49, 0x33, 0x08, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0xcc, 0x08, 0x05, - 0x40, 0x18, 0x00, 0x00, 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x10, 0x0d, - 0x82, 0xcc, 0x05, 0x80, 0x00, 0x10, 0xac, 0xdb, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0xc8, 0x02, 0x05, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x1d, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x00, 0x35, 0x80, 0x04, 0x01, 0xf7, 0xfe, - 0x82, 0xcc, 0x05, 0x80, 0x00, 0x10, 0xac, 0xdb, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0xc8, 0x04, 0x00, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x00, 0x07, 0xf8, 0x58, 0xc8, 0x04, 0x0b, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x07, 0xf5, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x07, 0xf3, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x01, 0x94, 0x0b, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x26, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x04, 0x01, 0xf7, 0xe8, 0x58, 0xc8, 0x04, 0x0b, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x07, 0xe2, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x02, 0x07, 0xe0, 0x84, 0x00, 0x05, 0x42, 0x48, 0x01, 0x94, 0x0b, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x25, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x36, 0xf4, 0x04, 0x01, 0xf7, 0xd3, 0x48, 0x03, 0xc8, 0x56, - 0x58, 0x08, 0x00, 0x00, 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x58, 0x08, 0x08, 0x01, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x00, 0x04, - 0x40, 0x0c, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, 0x04, 0x01, 0xf0, 0x05, - 0x04, 0x00, 0x10, 0x03, 0x80, 0x0c, 0x04, 0x80, 0x04, 0x01, 0xf0, 0x02, - 0x80, 0x00, 0x00, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x0d, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x04, 0x00, 0x05, 0x80, 0x00, 0x05, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x07, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x01, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xac, 0xe6, 0x58, 0x08, 0x08, 0x01, - 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0xac, 0xe8, 0x49, 0x7a, 0x64, 0x14, - 0x4a, 0x02, 0x60, 0x15, 0x00, 0x00, 0xff, 0xff, 0x45, 0x30, 0x00, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x10, 0x02, 0x80, 0x00, 0x0d, 0x80, 0x48, 0x04, 0x10, 0x01, - 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0xac, 0xe8, 0x45, 0x78, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x08, 0x08, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4d, 0x2c, 0x00, 0x00, 0x58, 0x06, 0x58, 0x05, 0x81, 0x2e, 0x59, 0xc0, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x49, 0x78, 0x08, 0x05, - 0x40, 0x06, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x5c, 0x02, 0x58, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x02, 0x00, 0x06, 0x59, 0x30, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x10, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x84, 0x08, 0x02, 0x8c, 0x04, 0x0d, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x84, 0x08, 0x02, 0x84, 0x04, 0x0d, 0x04, - 0x84, 0x04, 0x0d, 0x40, 0x4a, 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x07, 0x08, 0x02, 0x82, 0x04, 0x0d, 0x00, 0x0f, 0xff, 0xff, 0xff, - 0x42, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x0a, 0xd5, 0x48, 0x07, 0xc8, 0x57, 0x48, 0x05, 0x98, 0x0a, - 0x49, 0x79, 0x98, 0x01, 0x49, 0x79, 0x98, 0x03, 0x49, 0x79, 0x98, 0x06, - 0x49, 0x79, 0x98, 0x07, 0x49, 0x79, 0x98, 0x08, 0x49, 0x79, 0x98, 0x05, - 0x49, 0x79, 0x98, 0x09, 0x04, 0x01, 0xf8, 0xcc, 0x04, 0x00, 0x00, 0x0a, - 0x04, 0x01, 0xf8, 0xee, 0x04, 0x00, 0x00, 0x08, 0x48, 0x35, 0x98, 0x00, - 0x48, 0x35, 0x98, 0x02, 0x48, 0x35, 0x98, 0x06, 0x4a, 0x01, 0x98, 0x04, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x01, 0x98, 0x07, 0x00, 0x00, 0x00, 0x05, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, 0x58, 0xcc, 0x10, 0x07, - 0x40, 0x04, 0x00, 0x00, 0x80, 0x08, 0x04, 0x80, 0x04, 0x02, 0x10, 0x20, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xf8, 0xdd, - 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x1c, - 0x58, 0xcc, 0x00, 0x06, 0x80, 0x00, 0x65, 0x40, 0x04, 0x02, 0x00, 0x0b, - 0x48, 0x35, 0x98, 0x00, 0x48, 0x35, 0x98, 0x02, 0x48, 0x35, 0x98, 0x06, - 0x49, 0x79, 0x98, 0x01, 0x49, 0x79, 0x98, 0x03, 0x49, 0x78, 0x68, 0x01, - 0x49, 0x78, 0x68, 0x00, 0x49, 0x79, 0x98, 0x04, 0x49, 0x79, 0x98, 0x07, - 0x04, 0x01, 0xf0, 0x05, 0x48, 0x30, 0x68, 0x01, 0x48, 0x34, 0x60, 0x00, - 0x48, 0x35, 0x98, 0x06, 0x49, 0x78, 0x68, 0x00, 0x58, 0xcc, 0x00, 0x04, - 0x58, 0xcc, 0x10, 0x07, 0x80, 0x00, 0x00, 0x00, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x48, 0x01, 0x98, 0x04, 0x48, 0x09, 0x98, 0x07, - 0x04, 0x01, 0xf7, 0xdf, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x0b, 0xc8, 0x57, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x40, 0x08, 0x30, 0x00, 0x58, 0xcc, 0x08, 0x01, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x04, 0x04, 0x00, 0x00, 0x10, 0x60, 0x13, - 0x50, 0x00, 0x00, 0x00, 0x58, 0xcc, 0xa8, 0x00, 0x80, 0x54, 0xac, 0x00, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, - 0x80, 0x0c, 0x04, 0x80, 0x80, 0x08, 0x24, 0x80, 0x04, 0x02, 0x10, 0x02, - 0x40, 0x08, 0x00, 0x00, 0x80, 0x00, 0xb0, 0xc2, 0x80, 0x58, 0xb4, 0x00, - 0x54, 0x50, 0xa8, 0x00, 0x80, 0x50, 0xa0, 0x00, 0x80, 0x54, 0xa8, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, 0x40, 0x00, 0x10, 0x00, - 0x58, 0xcc, 0x28, 0x05, 0x58, 0xcc, 0x08, 0x07, 0x58, 0xcc, 0x20, 0x01, - 0x80, 0x14, 0x2c, 0x00, 0x80, 0x04, 0x0c, 0x80, 0x80, 0x10, 0x24, 0x00, - 0x48, 0x15, 0x98, 0x05, 0x48, 0x05, 0x98, 0x07, 0x48, 0x11, 0x98, 0x01, - 0x82, 0x10, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x0c, - 0x48, 0x11, 0x98, 0x01, 0x40, 0x08, 0x00, 0x00, 0x80, 0x18, 0x14, 0x80, - 0x40, 0x08, 0x30, 0x00, 0x04, 0x00, 0x00, 0x03, 0x04, 0x02, 0x17, 0xd6, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0xcc, 0x08, 0x00, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x04, 0x08, 0x00, 0x48, 0x05, 0x98, 0x00, 0x41, 0x78, 0x20, 0x00, - 0x04, 0x01, 0xf7, 0xee, 0x04, 0x01, 0xf8, 0x12, 0x50, 0x60, 0x00, 0x00, - 0x81, 0x04, 0x1c, 0x00, 0x58, 0x5c, 0x02, 0x04, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x2c, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x04, 0x02, 0x02, 0x80, 0x00, 0x00, 0xe0, - 0x80, 0x64, 0x05, 0x40, 0x48, 0x00, 0x18, 0x02, 0x58, 0x04, 0x00, 0x00, - 0x48, 0x00, 0x18, 0x00, 0x58, 0x04, 0x00, 0x01, 0x48, 0x00, 0x18, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x58, 0xcc, 0x00, 0x05, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x01, 0x98, 0x05, 0x58, 0xcc, 0x10, 0x03, 0x82, 0x08, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x82, 0x08, 0x04, 0x00, 0x00, 0x10, 0x60, 0x13, 0x50, 0x00, 0x00, 0x00, - 0x58, 0xcc, 0x08, 0x02, 0x80, 0x04, 0x0c, 0x00, 0x80, 0x08, 0x10, 0x00, - 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x0f, - 0x58, 0xcc, 0x20, 0x02, 0x58, 0x10, 0x00, 0x00, 0x80, 0x00, 0x6d, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x4c, 0x34, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x5c, - 0x5c, 0x00, 0x68, 0x00, 0x49, 0x78, 0x68, 0x01, 0x48, 0x35, 0x98, 0x02, - 0x58, 0xcc, 0x00, 0x04, 0x80, 0x00, 0x00, 0x40, 0x48, 0x01, 0x98, 0x04, - 0x49, 0x79, 0x98, 0x03, 0x04, 0x01, 0xf0, 0x02, 0x48, 0x09, 0x98, 0x03, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, - 0x41, 0x78, 0x18, 0x00, 0x58, 0xc8, 0x02, 0x01, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x02, 0x80, 0x0c, 0x18, 0x00, 0x58, 0xc8, 0x0c, 0x01, - 0x80, 0x04, 0x0c, 0x80, 0x04, 0x00, 0x10, 0x0a, 0x04, 0x00, 0x00, 0x09, - 0x80, 0x0c, 0x18, 0x00, 0x58, 0xc8, 0x02, 0x02, 0x80, 0x04, 0x14, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x80, 0x0c, 0x18, 0x00, - 0x40, 0x08, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xfb, 0x48, 0x0d, 0x92, 0x04, - 0x40, 0x0c, 0x00, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x07, 0x04, 0x00, 0x10, 0x06, - 0x80, 0x10, 0x20, 0x00, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x02, 0x04, 0x02, 0x17, 0xfc, 0x48, 0x11, 0x92, 0x03, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x4d, 0x2c, 0x00, 0x00, - 0x58, 0xcc, 0x00, 0x0a, 0x80, 0x00, 0x05, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x12, - 0x49, 0x2d, 0x98, 0x09, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x0c, - 0x58, 0xcc, 0x00, 0x09, 0x48, 0x02, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x49, 0x2d, 0x98, 0x09, 0x82, 0x10, 0x24, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x02, 0x17, 0xf7, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0xcc, 0x00, 0x09, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x07, 0xfc, 0x59, 0x2c, 0x20, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x40, 0x10, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xfa, 0x58, 0xcc, 0x00, 0x09, 0x48, 0xcf, 0xc8, 0x57, - 0x80, 0x00, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x05, 0x50, 0x34, 0x00, 0x00, - 0x48, 0x01, 0x98, 0x09, 0x49, 0x78, 0x68, 0x00, 0x49, 0x78, 0x68, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x13, 0xc8, 0x57, 0x58, 0xcc, 0x00, 0x09, - 0x48, 0x00, 0x20, 0x00, 0x48, 0x11, 0x98, 0x09, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x4d, 0x2c, 0x00, 0x00, - 0x58, 0xcc, 0x00, 0x09, 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x59, 0x2c, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x2e, 0x5c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xf9, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x56, 0x4d, 0x2c, 0x00, 0x00, 0x58, 0xcc, 0x00, 0x02, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x07, 0x59, 0x2c, 0x00, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x5c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xf9, 0x49, 0x79, 0x98, 0x00, - 0x49, 0x79, 0x98, 0x02, 0x49, 0x79, 0x98, 0x01, 0x49, 0x79, 0x98, 0x03, - 0x49, 0x79, 0x98, 0x06, 0x49, 0x79, 0x98, 0x07, 0x49, 0x79, 0x98, 0x08, - 0x49, 0x79, 0x98, 0x09, 0x49, 0x79, 0x98, 0x0a, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0f, - 0x00, 0x00, 0x00, 0x12, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf8, 0x57, - 0x4a, 0x00, 0xc2, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x59, 0x30, 0x10, 0x09, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x10, 0xac, 0xf1, 0x04, 0x00, 0x00, 0x13, - 0x58, 0x08, 0x08, 0x02, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x58, 0x08, 0x04, 0x03, 0x48, 0x04, 0xc0, 0x05, 0x48, 0x00, 0xc4, 0x06, - 0x4a, 0x00, 0xc2, 0x07, 0x00, 0x00, 0x00, 0x03, 0x59, 0x30, 0x08, 0x11, - 0x58, 0x5c, 0x04, 0x04, 0x49, 0x78, 0xc2, 0x06, 0x48, 0x04, 0xc4, 0x07, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0d, 0x58, 0x60, 0x02, 0x06, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x00, 0xc2, 0x06, 0x04, 0x01, 0xf0, 0x09, - 0x58, 0x5c, 0x08, 0x0a, 0x82, 0x04, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x48, 0x04, 0xc0, 0x05, 0x4a, 0x00, 0xc4, 0x06, 0x00, 0x00, 0x07, 0xff, - 0x49, 0x78, 0xc2, 0x07, 0x04, 0x01, 0xf7, 0xef, 0x82, 0x60, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x58, 0x60, 0x54, 0x04, 0x40, 0x28, 0x20, 0x00, - 0x40, 0x5c, 0x60, 0x00, 0x58, 0x5c, 0x0a, 0x04, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x04, 0x40, 0x00, 0x80, 0x00, 0x4d, 0x80, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x30, 0x74, 0x00, 0x58, 0x38, 0x04, 0x02, 0x8c, 0x24, 0x4d, 0x00, - 0x04, 0x02, 0x00, 0x03, 0x48, 0x00, 0x3a, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x00, 0x3c, 0x00, 0x80, 0x1c, 0x38, 0x00, 0x80, 0x24, 0x48, 0x00, - 0x80, 0x10, 0x20, 0x40, 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0f, 0xb6, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf7, 0xf0, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x34, 0x00, 0x00, 0x59, 0x30, 0x00, 0x09, 0x80, 0x02, 0x6d, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x34, 0x04, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0e, 0x59, 0x84, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x0b, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x08, 0x59, 0x34, 0x1c, 0x03, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0x64, - 0x5c, 0x02, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x80, 0x00, 0x15, 0x80, 0x58, 0xc8, 0x0c, 0x01, 0x59, 0x30, 0x00, 0x11, - 0x80, 0x04, 0x0c, 0x80, 0x48, 0x06, 0x60, 0x11, 0x58, 0xc8, 0x02, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x05, 0x80, 0x08, 0x10, 0x00, - 0x80, 0x04, 0x0c, 0x80, 0x04, 0x00, 0x10, 0x07, 0x04, 0x00, 0x00, 0x06, - 0x58, 0xc8, 0x02, 0x02, 0x80, 0x08, 0x10, 0x00, 0x80, 0x04, 0x0c, 0x80, - 0x04, 0x00, 0x10, 0x02, 0x04, 0x02, 0x07, 0xfd, 0x48, 0x08, 0xbc, 0x08, - 0x48, 0x08, 0xc4, 0x04, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x02, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe5, - 0x8c, 0x00, 0x05, 0x24, 0x04, 0x02, 0x07, 0xfc, 0x4a, 0x03, 0x70, 0xe5, - 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x59, 0xb8, 0x00, 0xe5, 0x8c, 0x00, 0x05, 0x24, 0x04, 0x02, 0x07, 0xf5, - 0x59, 0x34, 0x00, 0x0e, 0x80, 0x00, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x10, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x58, 0x34, 0x00, 0x00, - 0x48, 0x02, 0x68, 0x0e, 0x04, 0x01, 0xf0, 0x0a, 0x40, 0x34, 0x78, 0x00, - 0x58, 0x34, 0x00, 0x00, 0x80, 0x00, 0x6d, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfa, - 0x58, 0x34, 0x00, 0x00, 0x48, 0x00, 0x78, 0x00, 0x49, 0x7a, 0x60, 0x00, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x02, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0xff, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x02, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe5, - 0x8c, 0x00, 0x05, 0x24, 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4a, 0x03, 0x70, 0xe5, 0x00, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe5, 0x8c, 0x00, 0x05, 0x24, - 0x04, 0x02, 0x07, 0xf1, 0x59, 0x34, 0x00, 0x0e, 0x80, 0x02, 0x65, 0x40, - 0x04, 0x00, 0x00, 0x0e, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x00, 0x00, - 0x48, 0x02, 0x68, 0x0e, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x49, 0x7a, 0x62, 0x06, 0x49, 0x7a, 0x60, 0x09, 0x4a, 0x02, 0x60, 0x07, - 0x00, 0x00, 0x01, 0x01, 0x59, 0x32, 0x58, 0x08, 0x49, 0x7a, 0x5c, 0x08, - 0x04, 0x01, 0xfd, 0x69, 0x04, 0x01, 0xf7, 0xf1, 0x4a, 0x03, 0x70, 0xe5, - 0x00, 0x02, 0x00, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x04, 0x02, 0x00, 0x11, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x02, 0x68, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x09, - 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x57, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x02, - 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x04, 0x00, 0x10, 0x61, 0x62, - 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0xb4, - 0x00, 0x10, 0x61, 0xb5, 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x02, - 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x02, 0x00, 0x10, 0x61, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x3b, 0xc8, 0x57, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x50, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x49, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x61, 0x17, 0x00, 0x10, 0x61, 0x39, 0x00, 0x10, 0x61, 0x15, - 0x00, 0x10, 0x61, 0x15, 0x00, 0x10, 0x61, 0x15, 0x00, 0x10, 0x61, 0x15, - 0x00, 0x10, 0x61, 0x47, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x02, 0x06, - 0x48, 0x02, 0x5c, 0x06, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x2c, 0xbc, 0x0a, 0x59, 0x2c, 0x00, 0x00, - 0x48, 0x02, 0x60, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xed, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x08, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x43, 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf0, 0x88, 0x8c, 0x5c, 0xbd, 0x08, 0x04, 0x02, 0x00, 0x06, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x49, 0x7a, 0x62, 0x06, - 0x49, 0x7a, 0x60, 0x08, 0x04, 0x01, 0xf0, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xfa, 0x6b, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x06, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf9, 0x0a, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x04, 0x01, 0xfa, 0x5d, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0x37, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x06, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x04, 0x01, 0xf8, 0xef, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x3b, 0xc8, 0x57, 0x49, 0x7a, 0x62, 0x06, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x54, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x47, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x61, 0xb3, - 0x00, 0x10, 0x61, 0x7c, 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, - 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, - 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, - 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x7a, 0x00, 0x10, 0x61, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x11, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x04, 0x02, 0x00, 0x34, - 0x59, 0x84, 0x08, 0x02, 0x8c, 0x04, 0x0d, 0x04, 0x04, 0x00, 0x00, 0x25, - 0x59, 0x30, 0x00, 0x09, 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x1f, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x49, 0x7a, 0x62, 0x06, - 0x59, 0x30, 0xb8, 0x08, 0x58, 0x5c, 0x00, 0x05, 0x80, 0x00, 0xc5, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xfe, 0x8b, - 0x40, 0x62, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xed, - 0x49, 0x78, 0xb8, 0x05, 0x04, 0x01, 0xfe, 0xf3, 0x49, 0x7a, 0x60, 0x09, - 0x58, 0x5c, 0x34, 0x08, 0x04, 0x01, 0xfc, 0xa7, 0x04, 0x00, 0x00, 0x0e, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xac, 0xe6, 0x04, 0x01, 0xfc, 0xdc, - 0x04, 0x00, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x04, 0x00, 0x00, 0x07, 0x49, 0x2c, 0xb8, 0x05, 0x58, 0x5c, 0x54, 0x08, - 0x04, 0x01, 0xfc, 0x6d, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xfc, 0x93, 0x04, 0x01, 0xf7, 0xfc, - 0x8c, 0x04, 0x0d, 0x06, 0x04, 0x02, 0x07, 0xfc, 0x59, 0x30, 0x00, 0x09, - 0x80, 0x02, 0x6d, 0x40, 0x04, 0x00, 0x00, 0x06, 0x59, 0x34, 0x00, 0x0e, - 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x7a, 0x60, 0x09, 0x04, 0x01, 0xfc, 0xf7, 0x04, 0x01, 0xf7, 0xf2, - 0x04, 0x01, 0xf0, 0x81, 0x48, 0x03, 0xc8, 0x56, 0x48, 0x03, 0xc8, 0x56, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x43, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x49, 0x3a, 0x64, 0x03, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x00, 0x0f, - 0x48, 0x02, 0x60, 0x11, 0x49, 0x7a, 0x60, 0x13, 0x59, 0x2c, 0x04, 0x06, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x10, 0xc4, 0x80, 0x08, 0x14, 0x00, - 0x48, 0x0a, 0x62, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x95, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x60, 0x04, 0x01, 0xf1, 0x65, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x44, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xfa, 0x99, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, - 0x04, 0x02, 0x00, 0x05, 0x04, 0x01, 0xf9, 0x98, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf2, 0x7f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcb, 0x83, 0x04, 0x01, 0xfa, 0x7c, 0x59, 0x32, 0x58, 0x08, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x01, 0xf8, 0x61, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x19, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x35, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x1a, 0x08, 0x8c, 0x0c, 0x1d, 0x0e, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x40, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xfa, 0x63, 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf0, 0x11, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x84, 0xd5, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xa5, - 0x04, 0x02, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcb, 0x83, - 0x80, 0xc4, 0x00, 0x40, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0a, 0x3a, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x04, 0x00, 0x0a, 0x35, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdd, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x5c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x49, 0x7a, 0x62, 0x06, 0x59, 0x30, 0xb8, 0x08, 0x59, 0x30, 0x00, 0x09, - 0x80, 0x02, 0x6d, 0x40, 0x04, 0x02, 0x0e, 0x4b, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xac, 0xe6, 0x04, 0x01, 0xfc, 0x38, 0x04, 0x00, 0x00, 0x09, - 0x58, 0xc8, 0x02, 0x04, 0x48, 0x00, 0xbc, 0x08, 0x41, 0x78, 0x50, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0x0e, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x78, 0xbc, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0x38, 0x04, 0x01, 0xf7, 0xfa, - 0x48, 0x03, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x0f, 0x59, 0x2c, 0x00, 0x00, 0x80, 0x00, 0x0d, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x42, 0x5a, 0x06, - 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x00, 0x08, 0x00, 0x40, 0x06, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xf6, - 0x49, 0x42, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0x07, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x02, 0x00, 0x04, 0x04, 0x01, 0xff, 0xde, 0x49, 0x7a, 0x60, 0x08, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2e, 0x60, 0x09, - 0x83, 0x30, 0x04, 0x80, 0x00, 0x10, 0xd8, 0xd4, 0x04, 0x00, 0x10, 0x16, - 0x41, 0x58, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, 0x04, 0x02, 0x10, 0x13, - 0x40, 0x04, 0x00, 0x00, 0x59, 0x30, 0x0c, 0x06, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x12, 0x59, 0x30, 0x0a, 0x03, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x09, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x07, 0xfb, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x59, 0x2c, 0x0a, 0x06, - 0x48, 0x06, 0x5c, 0x06, 0x48, 0x02, 0x5a, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, - 0x4c, 0x14, 0x00, 0x00, 0x4c, 0x18, 0x00, 0x00, 0x80, 0x00, 0x1d, 0x80, - 0x80, 0x00, 0x25, 0x80, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x40, 0x08, 0x00, 0x00, 0x80, 0x0c, 0x1c, 0x00, 0x40, 0x0c, 0x28, 0x00, - 0x80, 0x0c, 0x19, 0x02, 0x80, 0x10, 0x21, 0x02, 0x82, 0x14, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, 0x82, 0x10, 0x25, 0x40, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x09, 0x02, 0x80, 0x18, 0x30, 0x40, - 0x04, 0x02, 0x07, 0xf1, 0x40, 0x10, 0x08, 0x00, 0x40, 0x0c, 0x00, 0x00, - 0x5c, 0x00, 0x30, 0x00, 0x5c, 0x00, 0x28, 0x00, 0x5c, 0x00, 0x20, 0x00, - 0x5c, 0x00, 0x18, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x18, 0x80, 0x04, 0x1c, 0x80, 0x04, 0x02, 0x10, 0x16, - 0x80, 0x08, 0x10, 0xc2, 0x80, 0x04, 0x09, 0x82, 0x04, 0x00, 0x10, 0x06, - 0x80, 0x04, 0x1c, 0x80, 0x04, 0x02, 0x10, 0x05, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x04, 0x01, 0xf0, 0x06, 0x80, 0x04, 0x1c, 0x80, - 0x40, 0x0c, 0x08, 0x00, 0x80, 0x08, 0x10, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xf4, 0x4c, 0x00, 0x00, 0x00, 0x41, 0xf0, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0xf7, 0xff, 0xff, 0xff, 0x40, 0x03, 0xe0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x41, 0xf0, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x08, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xf8, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xad, 0x10, 0x4a, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x4a, 0x00, 0x74, 0x01, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x72, 0x01, - 0x00, 0x00, 0x08, 0x40, 0x4a, 0x03, 0x78, 0xe8, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0xc8, 0x21, 0x00, 0x00, 0x00, 0x10, 0x4a, 0x03, 0xc8, 0x23, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf8, 0x1d, 0x4a, 0x03, 0x78, 0xe9, - 0x00, 0x00, 0x3a, 0x0d, 0x4a, 0x03, 0x78, 0xe8, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x42, 0x03, 0xa0, 0x00, - 0x00, 0x00, 0x76, 0x00, 0x4a, 0x03, 0xa0, 0x05, 0xd0, 0x00, 0x00, 0x01, - 0x59, 0xd0, 0x00, 0x06, 0x4a, 0x03, 0xa0, 0x05, 0x90, 0x00, 0x00, 0x01, - 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x59, 0xe0, 0x00, 0x03, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xe0, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x80, 0x00, - 0x48, 0x03, 0xc0, 0x03, 0x59, 0xc4, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xfc, 0xff, 0xff, 0x48, 0x03, 0x88, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x90, 0x00, 0x00, 0x4d, 0x18, 0x00, 0x00, 0x4a, 0x03, 0x78, 0xe7, - 0xaa, 0xaa, 0xaa, 0xaa, 0x4a, 0x03, 0x78, 0xe6, 0xaa, 0xaa, 0xaa, 0xaa, - 0x4a, 0x03, 0x78, 0xe5, 0xaa, 0xaa, 0xaa, 0xaa, 0x4a, 0x03, 0x78, 0xe4, - 0xaa, 0xaa, 0xaa, 0xaa, 0x4a, 0x03, 0x78, 0x1a, 0x00, 0x10, 0xaf, 0xa2, - 0x4a, 0x03, 0x78, 0x1b, 0x00, 0x10, 0x0f, 0xd8, 0x4a, 0x03, 0x78, 0x1c, - 0x00, 0x10, 0x0f, 0xe8, 0x4a, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x4a, 0x03, 0x18, 0x01, 0x00, 0x10, 0xad, 0x12, 0x4a, 0x03, 0x18, 0x02, - 0x00, 0x10, 0xad, 0x19, 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xaf, 0xa5, - 0x41, 0x7a, 0x30, 0x00, 0x81, 0x1b, 0x20, 0xc8, 0x83, 0x93, 0x24, 0x00, - 0x00, 0x00, 0xbf, 0x32, 0x48, 0x07, 0x20, 0x00, 0x4a, 0x03, 0x20, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x83, 0x18, 0x04, 0x00, 0x00, 0x10, 0x69, 0x3d, - 0x50, 0x00, 0x00, 0x00, 0x48, 0x03, 0x20, 0x02, 0x82, 0x04, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x81, 0x1a, 0x30, 0x00, 0x83, 0x18, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xf1, 0x5c, 0x02, 0x30, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x06, 0x60, 0x04, - 0x49, 0x7a, 0x60, 0x00, 0x49, 0x7a, 0x60, 0x01, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x03, 0x78, 0xe1, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x08, 0x04, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x82, 0x04, 0x0d, 0x40, 0x80, 0x00, 0x00, 0x40, - 0x48, 0x06, 0x60, 0x04, 0x49, 0x7a, 0x60, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x48, 0x03, 0x78, 0xe1, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x08, 0x00, 0x49, 0x7a, 0x60, 0x00, 0x04, 0x01, 0xf8, 0xf8, - 0x80, 0x18, 0x31, 0xc0, 0x04, 0x02, 0x00, 0x09, 0x59, 0x8c, 0x00, 0x04, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x48, 0x03, 0x18, 0x04, - 0x48, 0x03, 0x18, 0x05, 0x04, 0x01, 0xf0, 0x08, 0x48, 0x07, 0x18, 0x05, - 0x04, 0x01, 0xf0, 0x06, 0x48, 0x04, 0x30, 0x00, 0x59, 0x8c, 0x00, 0x04, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x02, 0x48, 0x1b, 0x18, 0x04, - 0x04, 0x01, 0xf0, 0xfe, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x8c, 0x00, 0x0d, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x00, 0x00, 0x03, 0x49, 0x7a, 0x60, 0x07, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x88, 0x04, - 0x00, 0x00, 0x00, 0x0c, 0x49, 0x7b, 0x28, 0x07, 0x04, 0x01, 0xf0, 0x0a, - 0x04, 0x01, 0xfa, 0xf8, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x42, 0x04, 0x02, 0x00, 0x02, 0x49, 0x7a, 0x60, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x08, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x08, 0x04, 0x8c, 0x04, 0x0d, 0x20, - 0x04, 0x02, 0x00, 0x04, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x38, 0x00, 0x00, - 0x59, 0x30, 0x08, 0x04, 0x84, 0x04, 0x0d, 0x20, 0x48, 0x06, 0x60, 0x04, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x70, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x17, 0x81, 0x48, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x03, 0x59, 0x30, 0x00, 0x18, 0x81, 0x4c, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x04, 0x01, 0xf8, 0xd0, 0x4d, 0xf0, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x41, 0x59, 0x90, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x63, 0xbf, 0x00, 0x10, 0x63, 0xb4, 0x00, 0x10, 0x63, 0xb2, - 0x00, 0x10, 0x63, 0xb2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x92, 0x60, 0x04, 0x04, 0x01, 0xf8, 0x80, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x32, 0x58, 0x08, 0x49, 0x7a, 0x58, 0x08, - 0x49, 0x7a, 0x58, 0x09, 0x04, 0x01, 0xf8, 0x84, 0x5c, 0x03, 0xe0, 0x00, - 0x04, 0x00, 0x08, 0xa3, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4d, 0x30, 0x00, 0x00, 0x49, 0x7b, 0x28, 0x07, - 0x04, 0x01, 0xf8, 0xad, 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x8c, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x48, 0x03, 0xc8, 0x57, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x63, 0xf7, 0x00, 0x10, 0x63, 0xda, - 0x00, 0x10, 0x63, 0xe3, 0x00, 0x10, 0x63, 0xe7, 0x00, 0x10, 0x63, 0xf2, - 0x00, 0x10, 0x63, 0xf7, 0x00, 0x10, 0x63, 0xd8, 0x00, 0x10, 0x63, 0xd8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x8c, 0x00, 0x0d, - 0x80, 0x02, 0x65, 0x40, 0x04, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf8, 0x1e, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x08, 0x04, 0x01, 0xf0, 0x15, 0x04, 0x01, 0xf8, 0x27, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x08, 0x04, 0x01, 0xf0, 0x11, - 0x59, 0x8c, 0x00, 0x0d, 0x80, 0x02, 0x65, 0x40, 0x04, 0x00, 0x00, 0x0e, - 0x04, 0x01, 0xf8, 0x38, 0x04, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf8, 0x0f, - 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x1c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x08, 0x04, 0x01, 0xf0, 0x06, 0x04, 0x01, 0xf8, 0x30, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x08, 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x08, 0x6b, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x8c, 0x00, 0x09, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0c, 0x04, 0x01, 0xf8, 0x5a, - 0x04, 0x01, 0xf8, 0x43, 0x59, 0x30, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x18, 0x09, 0x49, 0x7a, 0x60, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x49, 0x7b, 0x18, 0x09, 0x49, 0x7b, 0x18, 0x08, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x12, 0x59, 0x8c, 0x00, 0x0b, 0x81, 0x30, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x0f, 0x04, 0x01, 0xf8, 0x46, 0x59, 0x32, 0x58, 0x08, - 0x49, 0x7a, 0x58, 0x08, 0x49, 0x7a, 0x58, 0x09, 0x04, 0x01, 0xf8, 0x2c, - 0x59, 0x30, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x04, - 0x48, 0x03, 0x18, 0x0b, 0x49, 0x7a, 0x60, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x49, 0x7b, 0x18, 0x0a, 0x49, 0x7b, 0x18, 0x0b, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x8c, 0x00, 0x05, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0c, 0x04, 0x01, 0xf8, 0x33, - 0x04, 0x01, 0xf8, 0x1c, 0x59, 0x30, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x18, 0x05, 0x49, 0x7a, 0x60, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x49, 0x7b, 0x18, 0x05, 0x49, 0x7b, 0x18, 0x04, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x49, 0x7b, 0x20, 0x04, - 0x49, 0x7b, 0x20, 0x05, 0x59, 0x90, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x48, 0x03, 0x20, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x59, 0x30, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x7f, 0xfe, 0xff, 0xff, 0x48, 0x02, 0x60, 0x04, - 0x59, 0xbc, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x14, 0x04, 0x00, 0x00, 0x09, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x58, 0x04, 0x00, 0x12, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x49, 0x78, 0x08, 0x12, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x8c, 0x00, 0x0c, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x03, 0x18, 0x0c, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xbc, 0x00, 0xea, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x78, 0xe8, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x11, 0x48, 0x03, 0xc8, 0x56, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x0e, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x05, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x02, 0x07, 0xf9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xbc, 0x00, 0xea, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x48, 0x07, 0x78, 0xe1, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x02, 0x07, 0xfe, 0x48, 0x07, 0x78, 0xe1, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x48, 0x0b, 0x78, 0xe1, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x20, 0x00, - 0x59, 0xa8, 0x00, 0x6c, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x70, 0x00, 0x00, 0x10, 0xad, 0x10, - 0x58, 0x38, 0x04, 0x01, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x08, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x0d, 0x00, 0x80, 0x00, 0x00, 0x18, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xe4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x00, 0x10, 0x64, 0xc6, 0x00, 0x10, 0x65, 0x6b, 0x00, 0x10, 0x65, 0x85, - 0x00, 0x10, 0x64, 0xc6, 0x00, 0x10, 0x64, 0xc8, 0x00, 0x10, 0x64, 0xe9, - 0x00, 0x10, 0x65, 0x08, 0x00, 0x10, 0x65, 0x3d, 0x00, 0x10, 0x64, 0xc6, - 0x00, 0x10, 0x65, 0x69, 0x00, 0x10, 0x64, 0xc6, 0x00, 0x10, 0x64, 0xc6, - 0x00, 0x10, 0x64, 0xc6, 0x00, 0x10, 0x64, 0xc6, 0x00, 0x10, 0x64, 0xc6, - 0x00, 0x10, 0x64, 0xc6, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, - 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x2b, 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, - 0x04, 0x00, 0x07, 0xfe, 0x59, 0xbe, 0x60, 0xe0, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x11, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xfe, 0xfe, 0xff, 0x48, 0x02, 0x60, 0x04, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xff, 0x9b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0f, 0x17, 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, - 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf7, 0x7e, - 0x84, 0x00, 0x05, 0x10, 0x48, 0x02, 0x60, 0x04, 0x04, 0x01, 0xf7, 0xf6, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, - 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x2b, 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, - 0x04, 0x00, 0x07, 0xfe, 0x59, 0xbe, 0x60, 0xe0, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xfe, 0xfe, 0xff, 0x48, 0x02, 0x60, 0x04, 0x04, 0x01, 0xff, 0x7c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x55, 0x5c, 0x02, 0x28, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x01, 0xf7, 0x5f, 0x84, 0x00, 0x05, 0x10, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xf7, 0xf6, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x34, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, 0x4c, 0xd0, 0x00, 0x00, - 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x07, 0xfe, - 0x59, 0xbe, 0x60, 0xe0, 0x81, 0x32, 0x61, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x1e, 0x82, 0x00, 0x05, 0x00, 0xff, 0xfe, 0xfe, 0xff, - 0x48, 0x02, 0x60, 0x04, 0x59, 0x32, 0x68, 0x09, 0x42, 0x03, 0x48, 0x00, - 0x00, 0x10, 0xad, 0x12, 0x04, 0x01, 0x10, 0x00, 0x4a, 0x03, 0xc8, 0x40, - 0x00, 0x10, 0xad, 0x19, 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x12, - 0x04, 0x01, 0x10, 0x00, 0x4a, 0x03, 0xc8, 0x40, 0x00, 0x10, 0xad, 0x2b, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0xff, 0x04, 0x01, 0x10, 0x00, - 0x4a, 0x03, 0xc8, 0x40, 0x00, 0x10, 0xae, 0x2a, 0x4a, 0x03, 0xc8, 0x42, - 0x00, 0x00, 0x00, 0xff, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x42, - 0x5c, 0x01, 0xa0, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x84, 0x00, 0x05, 0x10, 0x48, 0x02, 0x60, 0x04, 0x5c, 0x01, 0xa0, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x4c, 0xd0, 0x00, 0x00, 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, - 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, 0x04, 0x01, 0xfb, 0xe6, - 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x07, 0xfe, - 0x59, 0xbe, 0x60, 0xe0, 0x81, 0x32, 0x61, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0xff, 0xfe, 0xfe, 0xff, - 0x48, 0x02, 0x60, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x70, 0xae, - 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x5c, 0x01, 0xa0, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x84, 0x00, 0x05, 0x10, 0x48, 0x02, 0x60, 0x04, 0x5c, 0x02, 0x28, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, - 0x5c, 0x01, 0xa0, 0x00, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x93, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xff, 0x05, 0x59, 0x8e, 0x60, 0x0d, - 0x59, 0xc4, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf8, 0xee, 0x4a, 0x03, 0x88, 0x04, 0x00, 0x00, 0x00, 0x08, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x04, 0x01, 0xfb, 0xa6, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x02, - 0x5c, 0x02, 0x70, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x04, 0x01, 0xf6, 0xdf, - 0x4d, 0x18, 0x00, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x38, 0x00, 0x00, - 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, - 0x4d, 0x14, 0x00, 0x00, 0x04, 0x01, 0xfe, 0xea, 0x41, 0x7a, 0x30, 0x00, - 0x59, 0xc4, 0x08, 0x04, 0x83, 0x18, 0x04, 0x00, 0x00, 0x10, 0x68, 0xea, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x04, 0x05, 0x00, 0x04, 0x00, 0x00, 0x1b, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x94, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xfb, 0x93, 0x59, 0x92, 0x60, 0x04, - 0x04, 0x01, 0xf8, 0x6c, 0x83, 0x18, 0x04, 0x00, 0x00, 0x10, 0x68, 0xea, - 0x50, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x04, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x0a, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xf8, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, 0x81, 0x1a, 0x30, 0x00, - 0x83, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xdd, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x08, 0x5c, 0x02, 0x28, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, - 0x5c, 0x02, 0x70, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x30, 0x00, - 0x04, 0x01, 0xf6, 0xa8, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x8c, 0x08, 0x00, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x06, 0x83, 0x8c, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x83, 0x8c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf0, 0x10, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x06, 0x83, 0x8c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x83, 0x8c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x08, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x28, - 0x83, 0x8c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x83, 0x8c, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x41, 0x30, 0x68, 0x00, 0x58, 0x34, 0x00, 0x00, - 0x80, 0x00, 0x7d, 0x40, 0x04, 0x00, 0x00, 0x20, 0x58, 0x3c, 0x00, 0x09, - 0x81, 0x34, 0x05, 0x80, 0x04, 0x02, 0x00, 0x06, 0x40, 0x3c, 0x68, 0x00, - 0x58, 0x3c, 0x00, 0x00, 0x80, 0x00, 0x7d, 0x40, 0x04, 0x02, 0x07, 0xfa, - 0x04, 0x01, 0xf0, 0x18, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x3f, 0xc8, 0x57, - 0x58, 0x3c, 0x00, 0x00, 0x48, 0x00, 0x68, 0x00, 0x49, 0x30, 0x78, 0x00, - 0x44, 0x3c, 0x10, 0x00, 0x50, 0x0c, 0x00, 0x00, 0x80, 0x3c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x02, 0x44, 0x34, 0x18, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x48, 0x03, 0x18, 0x0d, 0x48, 0x03, 0x18, 0x0f, 0x59, 0x8c, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfb, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x1b, 0xc8, 0x57, 0x59, 0xc8, 0x08, 0x40, 0x82, 0x04, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x10, 0x48, 0x03, 0x90, 0x40, 0x59, 0xc4, 0x10, 0x08, - 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x48, 0x03, 0x88, 0x08, - 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x04, 0x01, 0xfa, 0xc3, - 0x04, 0x02, 0x00, 0x07, 0x04, 0x01, 0xfa, 0xc7, 0x04, 0x00, 0x00, 0x22, - 0x48, 0x03, 0x88, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x95, - 0x04, 0x01, 0xf0, 0x42, 0x4a, 0x03, 0x88, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x59, 0xc4, 0x00, 0x03, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x07, 0xfd, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x07, - 0x04, 0x01, 0xfa, 0xb9, 0x04, 0x00, 0x00, 0x14, 0x48, 0x03, 0x88, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x95, 0x04, 0x01, 0xf0, 0x34, - 0x59, 0xc8, 0x00, 0x40, 0x84, 0x00, 0x05, 0x6a, 0x48, 0x03, 0x90, 0x40, - 0x59, 0xc8, 0x00, 0x40, 0x8c, 0x00, 0x05, 0x2a, 0x04, 0x02, 0x07, 0xfe, - 0x59, 0xc4, 0x00, 0x05, 0x82, 0x00, 0x05, 0x00, 0xc0, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x06, 0x59, 0xc4, 0x00, 0xa3, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x03, 0x88, 0xa3, 0x4a, 0x03, 0x88, 0x05, 0xc0, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x64, 0x4a, 0x03, 0xa0, 0x05, - 0x30, 0x00, 0x00, 0x00, 0x59, 0xd0, 0x00, 0x06, 0x4a, 0x03, 0xa0, 0x05, - 0x30, 0x00, 0x00, 0x00, 0x59, 0x90, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x48, 0x03, 0x20, 0x06, 0x59, 0xd0, 0x00, 0x05, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x02, 0x07, 0xfe, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x76, 0x00, 0x83, 0x18, 0x05, 0x40, 0x60, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x08, 0xa1, 0x81, 0x18, 0x00, 0xdc, 0x59, 0xc8, 0x08, 0x40, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0x90, 0x40, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x30, 0x00, 0x48, 0x03, 0x90, 0x40, 0x59, 0xc8, 0x00, 0x40, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x30, 0x00, 0x04, 0x02, 0x07, 0xfd, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x83, 0x83, 0x18, 0x04, 0x00, - 0x00, 0x10, 0x68, 0xea, 0x50, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x04, - 0x80, 0x00, 0x05, 0x80, 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x41, 0x5c, 0x03, 0xe0, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x48, 0x0b, 0x88, 0x08, 0x48, 0x07, 0x90, 0x40, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xc8, 0x08, 0x40, - 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x10, 0x48, 0x03, 0x90, 0x40, - 0x59, 0xc4, 0x10, 0x08, 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0xff, 0x7f, - 0x48, 0x03, 0x88, 0x08, 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, - 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x10, 0x59, 0xc4, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x05, 0x4a, 0x03, 0x88, 0x04, - 0x00, 0x00, 0x00, 0x0c, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x01, 0xf0, 0x25, - 0x59, 0xc8, 0x00, 0x40, 0x84, 0x00, 0x05, 0x6e, 0x48, 0x03, 0x90, 0x40, - 0x59, 0xc8, 0x00, 0x40, 0x8c, 0x00, 0x05, 0x2e, 0x04, 0x02, 0x07, 0xfe, - 0x04, 0x01, 0xf0, 0x1e, 0x4a, 0x03, 0x88, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x59, 0xc4, 0x00, 0x03, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x07, 0xfd, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x06, - 0x59, 0xc4, 0x00, 0x04, 0x4a, 0x03, 0x88, 0x04, 0x00, 0x00, 0x00, 0x0c, - 0x8c, 0x00, 0x05, 0x04, 0x04, 0x01, 0xf0, 0x11, 0x59, 0xc8, 0x00, 0x40, - 0x84, 0x00, 0x05, 0x6a, 0x48, 0x03, 0x90, 0x40, 0x59, 0xc8, 0x00, 0x40, - 0x8c, 0x00, 0x05, 0x2a, 0x04, 0x02, 0x07, 0xfe, 0x59, 0xc4, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, - 0x59, 0xc4, 0x00, 0xa3, 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x88, 0xa3, - 0x4a, 0x03, 0x88, 0x05, 0xc0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x49, 0x7b, 0x28, 0x07, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x48, 0x0b, 0x88, 0x08, 0x48, 0x07, 0x90, 0x40, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x49, 0x1b, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x90, 0x00, 0x00, - 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, - 0x04, 0x01, 0xfd, 0xc8, 0x4d, 0xf0, 0x00, 0x00, 0x04, 0x01, 0xfa, 0x7b, - 0x59, 0x90, 0x00, 0x04, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x11, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0f, 0x59, 0x30, 0x00, 0x04, - 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, 0x04, 0x01, 0xff, 0x4d, - 0x04, 0x02, 0x00, 0x09, 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0d, 0xa7, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, - 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xfc, 0xe1, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x59, 0x30, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x8c, 0x00, 0x05, 0x0c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0d, 0x96, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, - 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xfd, 0xa0, 0x4d, 0xf0, 0x00, 0x00, - 0x59, 0x8c, 0x00, 0x0d, 0x80, 0x02, 0x65, 0x40, 0x04, 0x00, 0x00, 0x12, - 0x59, 0x30, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xff, 0x86, 0x04, 0x00, 0x00, 0x17, 0x04, 0x01, 0xfc, 0xe4, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x13, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x0c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0d, 0x7b, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x6c, 0x15, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x07, 0xf9, 0x83, 0x6c, 0x15, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0xf6, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0x3d, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x6f, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0d, 0x6c, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x18, 0x00, 0x00, - 0x4d, 0x3c, 0x00, 0x00, 0x04, 0x01, 0xfd, 0x79, 0x4d, 0xf0, 0x00, 0x00, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x0f, 0x04, 0x01, 0xfa, 0x07, - 0x41, 0x7a, 0x30, 0x00, 0x59, 0x92, 0x60, 0x04, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x10, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0xf8, 0x04, 0x00, 0x00, 0x0a, 0x59, 0x30, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x83, 0xe0, 0x81, 0x1a, 0x30, 0x00, 0x83, 0x18, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xeb, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x12, 0x65, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x0a, 0x5c, 0x03, 0xe0, 0x00, - 0x04, 0x00, 0x0d, 0x43, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x30, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x30, 0x00, 0x00, 0x04, 0x01, 0xfd, 0x4f, 0x4d, 0xf0, 0x00, 0x00, - 0x59, 0xc8, 0x08, 0x40, 0x82, 0x04, 0x05, 0x40, 0x00, 0x00, 0x00, 0x10, - 0x48, 0x03, 0x90, 0x40, 0x59, 0xc4, 0x10, 0x08, 0x82, 0x08, 0x05, 0x00, - 0xff, 0xff, 0xff, 0x7f, 0x48, 0x03, 0x88, 0x08, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf9, 0xc6, 0x59, 0x8e, 0x60, 0x0d, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x02, 0x0f, 0x9d, 0x04, 0x00, 0x09, 0xcf, 0x49, 0x7b, 0x28, 0x07, - 0x04, 0x01, 0xf8, 0x0a, 0x5c, 0x00, 0x10, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x48, 0x0b, 0x88, 0x08, 0x84, 0x04, 0x0d, 0x74, 0x48, 0x07, 0x90, 0x40, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0d, 0x21, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x38, 0x00, 0x00, 0x4d, 0x18, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, - 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, 0x59, 0xc4, 0x10, 0x04, - 0x48, 0x0b, 0xc8, 0x57, 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x3f, 0xf0, - 0x04, 0x00, 0x00, 0x25, 0x41, 0x7a, 0x30, 0x00, 0x4c, 0x08, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x41, 0x5c, 0x00, 0x10, 0x00, - 0x82, 0x08, 0x05, 0x00, 0x00, 0x00, 0x02, 0x10, 0x04, 0x02, 0x00, 0x04, - 0x81, 0x1a, 0x30, 0x00, 0x80, 0x08, 0x11, 0x02, 0x04, 0x01, 0xf7, 0xf7, - 0x04, 0x01, 0xf9, 0xcf, 0x59, 0x92, 0x60, 0x04, 0x49, 0x33, 0xc8, 0x57, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x00, 0x05, 0x59, 0xc4, 0x00, 0xa3, - 0x8c, 0x00, 0x05, 0x1a, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xfe, 0xa1, 0x04, 0x00, 0x00, 0x09, 0x04, 0x01, 0xfc, 0x3d, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x0c, 0x02, 0x02, 0x08, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x04, 0x01, 0xf0, 0x07, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4a, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, - 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x5c, 0x02, 0x30, 0x00, 0x5c, 0x02, 0x70, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x18, 0x00, 0x00, 0x4d, 0x90, 0x00, 0x00, - 0x04, 0x01, 0xfc, 0xf6, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x59, 0x8c, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x09, 0x75, 0x41, 0x7a, 0x30, 0x00, 0x81, 0x1b, 0x20, 0xc8, - 0x83, 0x93, 0x24, 0x00, 0x00, 0x00, 0xbf, 0x32, 0x59, 0x90, 0x00, 0x01, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x0d, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, 0x59, 0x92, 0x60, 0x04, - 0x59, 0x30, 0x00, 0x11, 0x82, 0x00, 0x05, 0x00, 0xff, 0xf0, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x1b, 0x58, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x33, - 0x81, 0x1a, 0x30, 0x00, 0x83, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x17, 0xea, 0x59, 0xc8, 0x10, 0x40, 0x84, 0x08, 0x15, 0x34, - 0x48, 0x0b, 0x90, 0x40, 0x04, 0x01, 0xfc, 0xc1, 0x5c, 0x03, 0x20, 0x00, - 0x5c, 0x02, 0x30, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x90, 0x00, 0x00, 0x4d, 0xd0, 0x00, 0x00, - 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, 0x4d, 0x38, 0x00, 0x00, - 0x04, 0x01, 0xfc, 0xc9, 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x27, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x79, - 0x04, 0x00, 0x00, 0x24, 0x04, 0x01, 0xf0, 0x2c, 0x59, 0x8c, 0x00, 0x0d, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x00, 0x00, 0x12, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x84, 0xd5, 0x04, 0x02, 0x00, 0x26, 0x04, 0x01, 0xf9, 0x1c, - 0x04, 0x00, 0x00, 0x24, 0x48, 0x03, 0x88, 0x04, 0x04, 0x01, 0xf9, 0x6a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0f, 0x95, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xa4, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x02, 0x00, 0x0e, - 0x04, 0x01, 0xf0, 0x0f, 0x59, 0xc4, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x00, 0x00, 0x15, 0x4a, 0x03, 0x88, 0x04, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x13, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0c, 0x88, 0x5c, 0x02, 0x70, 0x00, - 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x00, 0x0c, 0x7f, 0x5c, 0x02, 0x70, 0x00, - 0x5c, 0x02, 0x28, 0x00, 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, - 0x5c, 0x03, 0x20, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7b, 0x28, 0x07, 0x04, 0x01, 0xfc, 0x88, - 0x59, 0xc4, 0x00, 0xaf, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x04, - 0x04, 0x01, 0xfc, 0x71, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x14, 0x29, - 0x59, 0x8c, 0x00, 0x0f, 0x82, 0x00, 0x14, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x10, 0x07, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x18, 0x0f, - 0x80, 0x00, 0x05, 0x80, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x2c, - 0x04, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xfe, 0xd6, 0x04, 0x02, 0x00, 0x0c, - 0x04, 0x01, 0xfd, 0xbb, 0x04, 0x00, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xdf, 0x04, 0x01, 0xf9, 0x1c, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, 0x04, 0x01, 0xfc, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x14, 0x29, 0x4d, 0x90, 0x00, 0x00, - 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x41, - 0x04, 0x01, 0xfc, 0x60, 0x59, 0xc4, 0x00, 0xaf, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x27, 0x04, 0x01, 0xf9, 0x11, 0x59, 0x92, 0x60, 0x04, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x00, 0x00, 0x0b, 0x04, 0x01, 0xfe, 0x85, 0x04, 0x02, 0x00, 0x1f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa4, 0x04, 0x01, 0xfc, 0x3f, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x04, 0x01, 0xf0, 0x17, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0x75, 0x30, 0x04, 0x01, 0xf8, 0xc3, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x31, 0x04, 0x01, 0xf0, 0x10, - 0x04, 0x01, 0xfe, 0x74, 0x04, 0x02, 0x00, 0x0e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xdf, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x04, 0x01, 0xfc, 0x23, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x28, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x14, 0x29, 0x4d, 0x90, 0x00, 0x00, - 0x4d, 0xd0, 0x00, 0x00, 0x4d, 0xa4, 0x00, 0x00, 0x4d, 0x14, 0x00, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x04, 0x01, 0xfc, 0x28, - 0x04, 0x01, 0xf8, 0xdc, 0x59, 0x92, 0x60, 0x04, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xf8, 0x82, 0x04, 0x00, 0x00, 0x16, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x41, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x34, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x1d, 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x50, - 0x48, 0x02, 0x5a, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4d, 0xe0, - 0x04, 0x02, 0x00, 0x27, 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x10, - 0x48, 0x02, 0x5a, 0x08, 0x04, 0x01, 0xf0, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x31, 0x04, 0x01, 0xf0, 0x20, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xdf, 0x04, 0x01, 0xfd, 0x98, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x50, 0x48, 0x02, 0x5a, 0x08, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x70, 0x00, 0x04, 0x01, 0xf0, 0x11, 0x59, 0x90, 0x00, 0x06, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x04, 0x02, 0x07, 0xee, - 0x59, 0xc4, 0x08, 0xaf, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x03, 0xe8, - 0x04, 0x02, 0x17, 0xea, 0x59, 0x90, 0x00, 0x06, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x48, 0x03, 0x20, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x31, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3d, 0xcb, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x28, 0x00, - 0x5c, 0x03, 0x48, 0x00, 0x5c, 0x03, 0xa0, 0x00, 0x5c, 0x03, 0x20, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x64, 0x63, 0x4d, 0x30, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x59, 0x8e, 0x60, 0x0d, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xc4, 0x10, 0x04, - 0x8c, 0x08, 0x15, 0x00, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4d, 0xe0, 0x04, 0x02, 0x00, 0x2f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x2c, 0x04, 0x01, 0xf0, 0x2c, 0x59, 0x8c, 0x00, 0x0f, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x11, 0x59, 0xc4, 0x08, 0xaf, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x03, 0xe8, 0x04, 0x02, 0x10, 0x0d, - 0x59, 0x8c, 0x08, 0x0f, 0x80, 0x04, 0x08, 0x00, 0x48, 0x07, 0x18, 0x0f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5c, 0x2c, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x20, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3d, 0xcb, 0x04, 0x01, 0xf0, 0x19, - 0x04, 0x01, 0xfd, 0xac, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x04, 0x01, 0xf8, 0x4d, 0x04, 0x01, 0xf0, 0x14, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0xdf, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x07, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x50, 0x48, 0x02, 0x5a, 0x08, 0x04, 0x01, 0xf8, 0x58, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x14, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x59, 0xc4, 0x08, 0x04, 0x83, 0x18, 0x04, 0x00, - 0x00, 0x10, 0x68, 0xe0, 0x50, 0x00, 0x00, 0x00, 0x80, 0x04, 0x05, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xc4, 0x08, 0x04, 0x83, 0x18, 0x04, 0x00, - 0x00, 0x10, 0x68, 0xe5, 0x50, 0x00, 0x00, 0x00, 0x80, 0x04, 0x05, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x04, 0x20, - 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x21, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x59, 0x90, 0x08, 0x06, 0x80, 0x04, 0x01, 0x20, - 0x80, 0x0c, 0x04, 0x80, 0x04, 0x02, 0x10, 0x04, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x04, 0x0c, 0x00, - 0x00, 0x01, 0x00, 0x00, 0x48, 0x07, 0x20, 0x06, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0b, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x48, 0x0b, 0x18, 0x00, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x49, 0x7b, 0x18, 0x0d, 0x49, 0x7b, 0x18, 0x03, 0x49, 0x7b, 0x18, 0x0e, - 0x49, 0x7b, 0x18, 0x0f, 0x49, 0x7b, 0x18, 0x10, 0x59, 0x8c, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x09, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x04, - 0x4a, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x1b, 0xc8, 0x57, - 0x81, 0x1b, 0x20, 0xc8, 0x83, 0x93, 0x24, 0x00, 0x00, 0x00, 0xbf, 0x32, - 0x81, 0x1b, 0xa0, 0xca, 0x83, 0xd3, 0xa4, 0x00, 0x00, 0x00, 0x76, 0x00, - 0x83, 0x18, 0x04, 0x00, 0x00, 0x10, 0x69, 0x3d, 0x50, 0x03, 0x48, 0x00, - 0x81, 0x1a, 0x28, 0xc2, 0x83, 0x16, 0x2c, 0x00, 0x00, 0x00, 0x61, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0xaf, 0x29, 0x00, 0x10, 0xaf, 0x40, - 0x00, 0x10, 0xaf, 0x57, 0x00, 0x10, 0xaf, 0x6e, 0x00, 0x10, 0xaf, 0x85, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x02, 0x10, 0x15, 0x04, 0x01, 0x10, 0x00, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0xfe, - 0x00, 0x10, 0x6d, 0x41, 0x00, 0x10, 0x6d, 0xc7, 0x00, 0x10, 0x69, 0xfe, - 0x00, 0x10, 0x6d, 0x41, 0x00, 0x10, 0x6d, 0xc7, 0x00, 0x10, 0x69, 0x5b, - 0x00, 0x10, 0x69, 0xfe, 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0x5b, - 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0x5b, - 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0x5b, 0x00, 0x10, 0x69, 0x62, - 0x00, 0x10, 0x69, 0x62, 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x64, 0x63, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xaf, 0xc4, 0x50, 0x08, 0x10, 0x00, 0x49, 0x30, 0x10, 0x0c, - 0x58, 0x08, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x02, 0x00, 0x3c, 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x2f, 0xc8, 0x56, - 0x59, 0x32, 0x68, 0x09, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x22, - 0x59, 0x2c, 0x04, 0x0b, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xfb, 0xc4, 0x04, 0x01, 0xf0, 0x02, - 0x04, 0x01, 0xfb, 0xb4, 0x59, 0x2c, 0x00, 0x0d, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x58, 0xd0, 0x08, 0x02, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x02, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xaf, 0xc4, 0x50, 0x08, 0x10, 0x00, 0x49, 0x30, 0x10, 0x0b, - 0x49, 0x2c, 0x10, 0x0a, 0x82, 0xd0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x48, 0x00, 0x10, 0x03, 0x59, 0x2c, 0x00, 0x0d, 0x48, 0x00, 0x10, 0x05, - 0x59, 0x2c, 0x00, 0x0e, 0x48, 0x00, 0x10, 0x07, 0x59, 0x2c, 0x00, 0x0f, - 0x48, 0x00, 0x10, 0x08, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x42, 0x02, 0x68, 0x00, 0x00, 0x10, 0xb5, 0xdc, 0x59, 0x2c, 0x08, 0x0a, - 0x48, 0x06, 0x68, 0x02, 0x82, 0x04, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, - 0x04, 0x00, 0x00, 0x07, 0x49, 0x7a, 0x6a, 0x12, 0x59, 0xa8, 0x10, 0x0f, - 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0x00, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x02, 0x07, 0xd3, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x04, 0x08, 0xd0, 0x48, 0x06, 0x6a, 0x12, 0x04, 0x01, 0xf7, 0xce, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x30, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x58, 0x32, 0x58, 0x0a, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x30, 0x00, 0x02, 0x4a, 0x00, 0x60, 0x02, - 0x00, 0x00, 0x01, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x02, 0x00, 0x20, 0x58, 0x30, 0x00, 0x0b, 0x58, 0x32, 0x60, 0x0c, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x12, 0x04, 0x01, 0xf8, 0x30, - 0x04, 0x02, 0x00, 0x14, 0x59, 0x2c, 0x08, 0x0d, 0x82, 0x04, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x04, 0x09, 0x04, 0x40, 0x04, 0xb0, 0x00, - 0x42, 0x00, 0xa0, 0x00, 0x00, 0x10, 0xad, 0x19, 0x40, 0x50, 0xa8, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x41, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x30, - 0x04, 0x01, 0xf0, 0x05, 0x48, 0x03, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xf8, 0x1d, 0x04, 0x00, 0x0f, 0x95, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x30, 0x00, 0x0b, - 0x58, 0x32, 0x60, 0x0c, 0x48, 0x03, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x07, 0xf1, 0x04, 0x01, 0xf8, 0x0f, - 0x04, 0x02, 0x07, 0xf3, 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x04, 0x01, 0xf7, 0xe6, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x8c, 0x00, 0x0d, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x09, 0x59, 0x8c, 0x00, 0x05, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x06, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x56, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x6b, 0x75, 0x00, 0x10, 0x6b, 0x90, 0x00, 0x10, 0x6b, 0xa1, - 0x00, 0x10, 0x6c, 0xa1, 0x00, 0x10, 0x6c, 0x63, 0x00, 0x10, 0x6c, 0x67, - 0x00, 0x10, 0x6c, 0x76, 0x00, 0x10, 0x6c, 0x8a, 0x00, 0x10, 0x6c, 0x7f, - 0x00, 0x10, 0x6c, 0x8a, 0x00, 0x10, 0x6c, 0xc5, 0x00, 0x10, 0x6c, 0x8a, - 0x00, 0x10, 0x6d, 0x07, 0x00, 0x10, 0x6c, 0x8a, 0x00, 0x10, 0x6d, 0x15, - 0x00, 0x10, 0x6c, 0x8a, 0x00, 0x10, 0x6c, 0x7f, 0x00, 0x10, 0x6c, 0x8a, - 0x00, 0x10, 0x6d, 0x19, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6d, 0xe5, 0x00, 0x10, 0x6e, 0x04, 0x00, 0x10, 0x6e, 0x0e, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6e, 0x24, 0x00, 0x10, 0x6c, 0x76, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6c, 0x76, 0x00, 0x10, 0x6c, 0x8a, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6b, 0xa1, 0x00, 0x10, 0x6c, 0xa1, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6e, 0x74, 0x00, 0x10, 0x6c, 0x8a, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6e, 0x84, 0x00, 0x10, 0x6c, 0x8a, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6c, 0x7f, 0x00, 0x10, 0x6b, 0x66, - 0x00, 0x10, 0x6a, 0x5d, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6e, 0x9b, - 0x00, 0x10, 0x6e, 0xd1, 0x00, 0x10, 0x6f, 0x4b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6f, 0x5b, 0x00, 0x10, 0x6c, 0x74, 0x00, 0x10, 0x6f, 0x4e, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6e, 0x30, 0x00, 0x10, 0x6f, 0x74, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6f, 0xa9, 0x00, 0x10, 0x6f, 0xfc, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x72, 0x00, 0x10, 0x6a, 0xd8, - 0x00, 0x10, 0x6a, 0xe5, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6c, 0x76, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6b, 0x2c, 0x00, 0x10, 0x6b, 0x37, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x86, - 0x00, 0x10, 0x6a, 0xab, 0x00, 0x10, 0x70, 0x3b, 0x00, 0x10, 0x70, 0x7c, - 0x00, 0x10, 0x70, 0xa2, 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x6a, 0x5b, - 0x00, 0x10, 0x6a, 0x5b, 0x00, 0x10, 0x70, 0x70, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xfa, 0xcf, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x00, 0x09, 0x48, 0x01, 0xa0, 0x06, 0x59, 0x2c, 0x00, 0x0a, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0x2c, 0x00, 0x0b, 0x48, 0x01, 0xa0, 0x08, - 0x59, 0x2c, 0x00, 0x0c, 0x48, 0x01, 0xa0, 0x09, 0x59, 0x2c, 0x00, 0x0d, - 0x48, 0x01, 0xa0, 0x0a, 0x49, 0x79, 0xa0, 0x0b, 0x59, 0x2c, 0x08, 0x09, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x04, 0x09, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x4a, 0x02, 0x62, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x01, 0xfa, 0xb8, 0x4d, 0x2c, 0x00, 0x00, 0x4a, 0x01, 0xa0, 0x06, - 0x05, 0x00, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x00, 0x09, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0x2c, 0x00, 0x0a, 0x48, 0x01, 0xa0, 0x08, - 0x59, 0x2c, 0x00, 0x0b, 0x48, 0x01, 0xa0, 0x09, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x04, 0x01, 0xfa, 0xa2, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x30, 0x04, 0x0b, 0x80, 0x00, 0x00, 0xc2, 0x42, 0x00, 0xa8, 0x00, - 0x00, 0x10, 0xad, 0x19, 0x59, 0x2c, 0xb2, 0x05, 0x83, 0x2c, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x40, 0x58, 0x00, 0x00, 0x80, 0x54, 0xac, 0x00, 0x59, 0x2c, 0x00, 0x01, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x03, 0x40, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf7, 0xf5, 0x42, 0x00, 0xa0, 0x00, 0x00, 0x10, 0xad, 0x19, - 0x40, 0x50, 0xa8, 0x00, 0x59, 0x30, 0xb4, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x41, 0x59, 0x30, 0x0c, 0x0b, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x42, 0x03, 0x48, 0x00, - 0x00, 0x10, 0xad, 0x12, 0x04, 0x01, 0xfa, 0x89, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x08, 0x02, 0x48, 0x07, 0xc8, 0x57, 0x40, 0x04, 0x10, 0x00, - 0x80, 0x04, 0x09, 0x04, 0x82, 0x08, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x08, 0x80, 0x04, 0x08, 0x00, 0x82, 0x08, 0x15, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x08, 0x10, 0x00, 0x58, 0xd0, 0x00, 0x02, - 0x80, 0x08, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x02, 0x4a, 0x02, 0x58, 0x05, - 0x02, 0x00, 0x00, 0x00, 0x82, 0xd0, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x59, 0x2c, 0xb0, 0x11, 0x83, 0x2c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x40, 0x58, 0x00, 0x00, - 0x80, 0x54, 0xac, 0x00, 0x59, 0x2e, 0x58, 0x01, 0x41, 0x78, 0x00, 0x00, - 0x81, 0x2e, 0x5d, 0x40, 0x04, 0x02, 0x07, 0xf6, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xfa, 0x54, 0x4a, 0x01, 0xa0, 0x06, - 0x78, 0x00, 0x00, 0x00, 0x59, 0x30, 0x00, 0x1c, 0x84, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa4, 0x07, 0x49, 0x79, 0xa2, 0x07, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x04, 0x01, 0xfa, 0x52, - 0x4a, 0x01, 0xa0, 0x06, 0x02, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x02, - 0x48, 0x01, 0xa0, 0x08, 0x59, 0xa8, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x09, - 0x59, 0xa8, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x0a, 0x59, 0xa8, 0x00, 0x01, - 0x48, 0x01, 0xa0, 0x0b, 0x59, 0x30, 0x00, 0x1c, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0xe0, 0x00, 0x04, 0x00, 0x00, 0x16, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0xdf, 0x00, 0x04, 0x00, 0x00, 0x06, 0x4a, 0x01, 0xa4, 0x07, - 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x01, 0xf0, 0x27, 0x4a, 0x03, 0xc8, 0x40, 0x00, 0x10, 0xac, 0xb8, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x10, 0xac, 0xb8, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x06, 0xd7, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x42, 0x00, 0xa0, 0x00, - 0x00, 0x10, 0xac, 0xb8, 0x04, 0x01, 0xf0, 0x0d, 0x4a, 0x03, 0xc8, 0x40, - 0x00, 0x10, 0xac, 0xc5, 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x0d, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x10, 0xac, 0xc5, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x06, 0xd7, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, - 0x42, 0x00, 0xa0, 0x00, 0x00, 0x10, 0xac, 0xc5, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x10, 0x48, 0x01, 0xa4, 0x07, 0x4a, 0x01, 0xa2, 0x07, - 0x00, 0x00, 0x00, 0x34, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x82, 0xd0, 0xac, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xfa, 0x00, 0x4a, 0x01, 0xa0, 0x06, - 0x63, 0x00, 0x00, 0x28, 0x59, 0x30, 0x00, 0x1c, 0x48, 0x01, 0xa0, 0x07, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, - 0x04, 0x01, 0xfa, 0x03, 0x41, 0x78, 0x00, 0x00, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x1b, - 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x59, 0x84, 0x18, 0x02, 0x8c, 0x0c, 0x1d, 0x00, - 0x04, 0x02, 0x00, 0x08, 0x42, 0x00, 0x20, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x0c, 0x01, 0xf8, 0x11, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x08, 0x00, - 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x04, 0x82, 0x08, 0x05, 0x40, - 0x02, 0x00, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x06, 0x80, 0x04, 0x08, 0xe0, - 0x59, 0x30, 0x00, 0x1c, 0x80, 0x04, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x07, - 0x80, 0x08, 0x09, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x00, 0x10, 0x6b, 0x5c, - 0x00, 0x10, 0x6b, 0x5e, 0x00, 0x10, 0x6b, 0x60, 0x00, 0x10, 0x6b, 0x62, - 0x00, 0x10, 0x6b, 0x64, 0x48, 0x11, 0xa0, 0x08, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x11, 0xa0, 0x09, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x11, 0xa0, 0x0a, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x11, 0xa0, 0x0b, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x11, 0xa0, 0x0c, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x02, 0x60, 0x09, - 0x00, 0x10, 0xb5, 0xdc, 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xd0, 0x42, 0x02, 0x68, 0x00, - 0x00, 0x10, 0xb5, 0xdc, 0x48, 0x02, 0x6a, 0x12, 0x04, 0x01, 0xfa, 0x39, - 0x41, 0x78, 0x08, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x5c, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xf9, 0xb7, - 0x4a, 0x01, 0xa0, 0x06, 0x52, 0x00, 0x00, 0x00, 0x49, 0x79, 0xa0, 0x07, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x59, 0x9c, 0x04, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x0d, - 0x48, 0x05, 0xa0, 0x07, 0x59, 0xa8, 0x00, 0x02, 0x48, 0x01, 0xa0, 0x08, - 0x59, 0xa8, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x09, 0x59, 0xa8, 0x00, 0x00, - 0x48, 0x01, 0xa0, 0x0a, 0x59, 0xa8, 0x00, 0x01, 0x48, 0x01, 0xa0, 0x0b, - 0x59, 0xa8, 0x00, 0x0f, 0x48, 0x01, 0xa0, 0x0c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x4a, 0x02, 0x62, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf9, 0x9a, 0x4a, 0x01, 0xa0, 0x06, - 0x05, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x0f, 0x48, 0x01, 0xa0, 0x07, - 0x59, 0xa8, 0x00, 0x02, 0x59, 0xa8, 0x08, 0x03, 0x48, 0x01, 0xa0, 0x08, - 0x48, 0x05, 0xa0, 0x09, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x4a, 0x02, 0x62, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x01, 0xf9, 0x89, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x1e, 0x5c, 0x02, 0x78, 0x00, - 0x4a, 0x01, 0xa0, 0x06, 0x03, 0x00, 0x00, 0x00, 0x59, 0x34, 0x04, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x00, 0x6d, - 0x4a, 0x01, 0xa0, 0x06, 0x04, 0x00, 0x00, 0x00, 0x81, 0xa4, 0x08, 0x00, - 0x4a, 0x00, 0x08, 0x00, 0x22, 0xff, 0xff, 0xfe, 0x59, 0x34, 0x00, 0x0a, - 0x84, 0x00, 0x05, 0x00, 0x48, 0x02, 0x68, 0x0a, 0x59, 0xc4, 0x10, 0x02, - 0x84, 0x08, 0x15, 0x0c, 0x48, 0x0b, 0x88, 0x02, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x10, 0x59, 0xa8, 0x00, 0x27, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0xa8, 0x00, 0x28, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x20, 0x00, 0x59, 0x9c, 0x08, 0x18, 0x8c, 0x04, 0x0d, 0x16, - 0x04, 0x00, 0x00, 0x02, 0x84, 0x00, 0x05, 0x6a, 0x48, 0x01, 0xa0, 0x08, - 0x4a, 0x01, 0xa0, 0x09, 0x00, 0x00, 0x27, 0x10, 0x59, 0xa8, 0x00, 0x2a, - 0x48, 0x01, 0xa0, 0x0a, 0x04, 0x01, 0xf0, 0x38, 0x59, 0xa8, 0x00, 0x27, - 0x48, 0x01, 0xa0, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x09, 0x49, 0x7b, 0x88, 0x80, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x36, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x80, - 0x59, 0xa8, 0x00, 0x28, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x04, 0x82, 0x00, 0x05, 0x00, 0x37, 0xff, 0xff, 0xff, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x00, 0x3f, 0xff, 0xff, 0xff, - 0x59, 0x9c, 0x08, 0x18, 0x8c, 0x04, 0x0d, 0x16, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x00, 0x05, 0x6a, 0x8d, 0x0e, 0x1d, 0x10, 0x04, 0x00, 0x00, 0x19, - 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0x51, - 0x04, 0x00, 0x00, 0x15, 0x82, 0x04, 0x15, 0x80, 0x00, 0x00, 0x00, 0x31, - 0x04, 0x00, 0x00, 0x12, 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0xa0, 0x00, 0x00, 0x10, 0xb0, 0xc9, 0x82, 0xd0, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x84, 0x00, 0x05, 0x7a, - 0x48, 0x01, 0xa0, 0x08, 0x49, 0x79, 0xa0, 0x09, 0x49, 0x79, 0xa0, 0x0a, - 0x59, 0xa8, 0x00, 0x02, 0x59, 0xa8, 0x08, 0x03, 0x48, 0x01, 0xa0, 0x0b, - 0x48, 0x05, 0xa0, 0x0c, 0x59, 0xa8, 0x00, 0x00, 0x59, 0xa8, 0x08, 0x01, - 0x48, 0x01, 0xa0, 0x0d, 0x48, 0x05, 0xa0, 0x0e, 0x49, 0x79, 0xa0, 0x0f, - 0x49, 0x79, 0xa0, 0x10, 0x49, 0x79, 0xa0, 0x11, 0x49, 0x79, 0xa0, 0x12, - 0x49, 0x79, 0xa0, 0x13, 0x49, 0x79, 0xa0, 0x14, 0x49, 0x79, 0xa0, 0x15, - 0x49, 0x79, 0xa0, 0x16, 0x59, 0xa8, 0x00, 0x2b, 0x84, 0x00, 0x05, 0x76, - 0x48, 0x01, 0xa0, 0x17, 0x59, 0xa8, 0x00, 0x2c, 0x48, 0x01, 0xa0, 0x18, - 0x49, 0x79, 0xa0, 0x19, 0x49, 0x79, 0xa0, 0x1a, 0x04, 0x01, 0xf0, 0x43, - 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x0d, - 0x59, 0xa8, 0x00, 0x27, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x59, 0xc4, 0x08, 0x80, 0x80, 0x04, 0x0d, 0x80, 0x04, 0x00, 0x00, 0x07, - 0x49, 0x7b, 0x88, 0x80, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0x36, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x03, 0x88, 0x80, - 0x59, 0xa8, 0x00, 0x27, 0x48, 0x01, 0xa0, 0x07, 0x4c, 0x64, 0x00, 0x00, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0xa8, 0xc8, 0x28, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x0a, 0x59, 0x2c, 0x02, 0x07, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x07, 0x82, 0x64, 0xcd, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x59, 0x2c, 0x00, 0x09, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x80, 0x64, 0xcd, 0x40, 0x48, 0x65, 0xa0, 0x08, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xc8, 0x00, 0x59, 0xa8, 0x00, 0x29, - 0x48, 0x01, 0xa0, 0x09, 0x59, 0xa8, 0x00, 0x2a, 0x48, 0x01, 0xa0, 0x0a, - 0x59, 0xa8, 0x00, 0x02, 0x59, 0xa8, 0x08, 0x03, 0x48, 0x01, 0xa0, 0x0b, - 0x48, 0x05, 0xa0, 0x0c, 0x59, 0xa8, 0x00, 0x00, 0x59, 0xa8, 0x08, 0x01, - 0x48, 0x01, 0xa0, 0x0d, 0x48, 0x05, 0xa0, 0x0e, 0x49, 0x79, 0xa0, 0x0f, - 0x49, 0x79, 0xa0, 0x10, 0x49, 0x79, 0xa0, 0x11, 0x49, 0x79, 0xa0, 0x12, - 0x49, 0x79, 0xa0, 0x13, 0x49, 0x79, 0xa0, 0x14, 0x49, 0x79, 0xa0, 0x15, - 0x49, 0x79, 0xa0, 0x16, 0x59, 0xa8, 0x00, 0x2b, 0x48, 0x01, 0xa0, 0x17, - 0x59, 0xa8, 0x00, 0x2c, 0x48, 0x01, 0xa0, 0x18, 0x59, 0xa8, 0x00, 0x2d, - 0x48, 0x01, 0xa0, 0x19, 0x59, 0xa8, 0x00, 0x2e, 0x48, 0x01, 0xa0, 0x1a, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, - 0x04, 0x01, 0xf8, 0xc9, 0x4a, 0x01, 0xa0, 0x06, 0x50, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xb5, 0x04, 0x01, 0xf8, 0xc5, 0x4a, 0x01, 0xa0, 0x06, - 0x21, 0x10, 0x00, 0x14, 0x49, 0x79, 0xa0, 0x07, 0x49, 0x79, 0xa0, 0x08, - 0x49, 0x79, 0xa0, 0x09, 0x49, 0x79, 0xa0, 0x0a, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xf8, 0xbf, - 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0xc4, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xf8, 0xbb, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x31, 0x04, 0x02, 0x07, 0x96, 0x81, 0xa4, 0x08, 0x00, - 0x4a, 0x00, 0x08, 0x01, 0x00, 0xff, 0xff, 0xfe, 0x04, 0x01, 0xf7, 0x2e, - 0x04, 0x01, 0xf8, 0xb0, 0x4a, 0x01, 0xa0, 0x06, 0x01, 0x00, 0x00, 0x00, - 0x59, 0x30, 0x04, 0x1a, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x48, 0x01, 0xa4, 0x07, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x01, 0xa4, 0x07, - 0x00, 0x00, 0x00, 0x03, 0x59, 0x30, 0x02, 0x1a, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x01, 0xa2, 0x07, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x2a, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x4a, 0x02, 0x62, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xf8, 0x89, 0x4a, 0x01, 0xa4, 0x06, - 0x00, 0x00, 0x20, 0x10, 0x4a, 0x01, 0xa2, 0x06, 0x00, 0x00, 0x00, 0x14, - 0x4a, 0x01, 0xa4, 0x07, 0x00, 0x00, 0x08, 0x00, 0x4a, 0x01, 0xa2, 0x07, - 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x05, 0x80, 0x59, 0x9c, 0x08, 0x17, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x02, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x20, 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x10, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x02, 0x59, 0x34, 0x08, 0x0a, 0x8c, 0x04, 0x0d, 0x14, - 0x04, 0x00, 0x00, 0x05, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x80, - 0x80, 0x04, 0x05, 0x40, 0x04, 0x01, 0xf0, 0x06, 0x59, 0x9c, 0x08, 0x18, - 0x8c, 0x04, 0x0d, 0x18, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x03, 0x80, 0x04, 0x01, 0xf0, 0x3c, 0x04, 0x01, 0xf8, 0x75, - 0x4a, 0x01, 0xa4, 0x06, 0x00, 0x00, 0x02, 0x10, 0x4a, 0x01, 0xa2, 0x06, - 0x00, 0x00, 0x00, 0x14, 0x4a, 0x01, 0xa4, 0x07, 0x00, 0x00, 0x08, 0x00, - 0x59, 0x34, 0x00, 0x0a, 0x8c, 0x00, 0x05, 0x16, 0x04, 0x00, 0x00, 0x14, - 0x59, 0x34, 0x0c, 0x05, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x04, 0x00, 0x00, 0x13, 0x59, 0x34, 0x0a, 0x05, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x04, 0x02, 0x00, 0x09, 0x8c, 0x04, 0x0d, 0x1a, - 0x04, 0x00, 0x00, 0x04, 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x21, 0x00, - 0x04, 0x01, 0xf0, 0x0c, 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x01, 0xf0, 0x09, 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x04, 0x00, - 0x04, 0x01, 0xf0, 0x06, 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x07, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x01, 0xa2, 0x07, 0x00, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x59, 0x9c, 0x08, 0x17, 0x8c, 0x04, 0x0d, 0x0a, - 0x04, 0x02, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x20, - 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x10, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x02, - 0x59, 0x34, 0x0a, 0x00, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x0b, - 0x84, 0x00, 0x05, 0x50, 0x59, 0x9c, 0x10, 0x17, 0x8c, 0x08, 0x15, 0x0a, - 0x04, 0x02, 0x00, 0x04, 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x00, 0x05, 0x4e, 0x8c, 0x04, 0x0d, 0x1c, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x00, 0x05, 0x52, 0x48, 0x01, 0xa2, 0x0a, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xf8, 0x33, - 0x4a, 0x01, 0xa0, 0x06, 0x02, 0x10, 0x00, 0x14, 0x4a, 0x01, 0xa0, 0x07, - 0x01, 0x00, 0x00, 0x00, 0x49, 0x79, 0xa0, 0x08, 0x49, 0x79, 0xa0, 0x09, - 0x49, 0x79, 0xa0, 0x0a, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x30, 0x04, 0x01, 0xf8, 0x25, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf6, 0x60, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xf8, 0x20, 0x4a, 0x01, 0xa0, 0x06, 0x01, 0x00, 0x00, 0x00, - 0x4a, 0x01, 0xa4, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x30, 0x42, 0x00, 0x50, 0x00, - 0x32, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, 0x08, 0x29, 0x00, 0x00, - 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0xe3, - 0x42, 0x00, 0x50, 0x00, 0x22, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x01, 0x29, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x78, 0x00, - 0x04, 0x01, 0xf3, 0xdc, 0x42, 0x00, 0x50, 0x00, 0x33, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x08, 0x98, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0xd5, 0x42, 0x00, 0x50, 0x00, - 0x23, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, 0x01, 0x98, 0x00, 0x00, - 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0xce, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x85, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x93, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x85, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5d, 0x00, 0x10, 0x6d, 0x6a, - 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, - 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, - 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x5b, - 0x00, 0x10, 0x6d, 0x5b, 0x00, 0x10, 0x6d, 0x77, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf8, 0x51, - 0x59, 0x30, 0x00, 0x1c, 0x48, 0x01, 0xa0, 0x04, 0x48, 0x01, 0xa0, 0x07, - 0x49, 0x79, 0xa4, 0x08, 0x4a, 0x01, 0xa2, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf3, 0xc7, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xf8, 0x50, 0x59, 0x30, 0x00, 0x1c, 0x48, 0x01, 0xa0, 0x04, - 0x4a, 0x01, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x01, 0xa2, 0x06, - 0x00, 0x00, 0x03, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf3, 0xba, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x2f, 0xc8, 0x57, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x34, 0x0a, 0x12, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x59, 0x2c, 0x00, 0x0a, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x90, 0x00, 0x01, 0xc0, 0x80, 0x04, 0x05, 0x40, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x11, 0x44, 0x03, 0x48, 0x00, - 0x81, 0xa5, 0xa0, 0x00, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x59, 0x2c, 0x00, 0x09, - 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x00, 0x1d, 0x80, - 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x1d, 0x80, - 0x85, 0x00, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x83, 0x2c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x50, 0x0c, 0x00, 0x00, 0x44, 0x01, 0xa0, 0x00, 0x80, 0x0c, 0x18, 0x00, - 0x80, 0xd1, 0xa0, 0x00, 0x80, 0x08, 0x10, 0x40, 0x04, 0x02, 0x07, 0xfb, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x04, 0x01, 0xf3, 0x89, 0x42, 0x00, 0x50, 0x00, 0x81, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x00, 0x09, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0x60, 0x42, 0x00, 0x50, 0x00, - 0x84, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x99, 0x00, 0x00, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x02, 0x84, 0x30, 0x65, 0x2e, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0x54, 0x42, 0x00, 0x50, 0x00, - 0x85, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, 0x00, 0x99, 0x00, 0x00, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x02, 0x84, 0x30, 0x65, 0x2e, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0x48, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x53, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x4b, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x36, 0x8c, 0x03, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x6e, 0x4b, 0x00, 0x10, 0x6e, 0x53, 0x00, 0x10, 0x6e, 0x5b, - 0x00, 0x10, 0x6e, 0x63, 0x00, 0x10, 0x6d, 0xdc, 0x00, 0x10, 0x6d, 0xdc, - 0x00, 0x10, 0x6d, 0xdc, 0x00, 0x10, 0x6e, 0x43, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x50, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x08, 0x29, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf3, 0x2a, 0x49, 0x33, 0xc8, 0x57, - 0x04, 0x01, 0xff, 0x46, 0x4a, 0x01, 0xa0, 0x06, 0x12, 0x00, 0x00, 0x00, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x02, 0x00, 0x03, 0x59, 0x34, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x02, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0x30, 0x04, 0x19, 0x48, 0x01, 0xa4, 0x08, - 0x59, 0x30, 0x02, 0x19, 0x48, 0x01, 0xa2, 0x08, 0x49, 0x79, 0xa0, 0x09, - 0x49, 0x79, 0xa0, 0x0a, 0x49, 0x79, 0xa0, 0x0b, 0x49, 0x79, 0xa0, 0x0c, - 0x49, 0x79, 0xa0, 0x0d, 0x49, 0x79, 0xa0, 0x0e, 0x49, 0x79, 0xa0, 0x0f, - 0x49, 0x79, 0xa0, 0x10, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf3, 0x2d, - 0x04, 0x01, 0xff, 0x28, 0x4a, 0x01, 0xa0, 0x06, 0x0f, 0x00, 0x00, 0x00, - 0x59, 0x30, 0x00, 0x1c, 0x48, 0x01, 0xa0, 0x07, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x04, 0x01, 0xf3, 0x23, 0x04, 0x01, 0xff, 0x2c, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x85, 0x48, 0x03, 0x10, 0x04, - 0x59, 0x88, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x07, 0x59, 0x88, 0x00, 0x01, - 0x48, 0x01, 0xa0, 0x08, 0x59, 0x88, 0x00, 0x02, 0x48, 0x01, 0xa0, 0x09, - 0x59, 0x88, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x0a, 0x59, 0x88, 0x00, 0x04, - 0x48, 0x01, 0xa0, 0x0b, 0x59, 0x88, 0x00, 0x05, 0x48, 0x01, 0xa0, 0x0c, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf3, 0x0d, 0x4a, 0x02, 0x62, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0xff, 0x06, 0x4a, 0x01, 0xa0, 0x06, - 0x62, 0x00, 0x00, 0x00, 0x59, 0x30, 0x00, 0x1c, 0x48, 0x01, 0xa0, 0x07, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf3, 0x01, 0x04, 0x01, 0xfe, 0xfc, - 0x59, 0x30, 0x08, 0x08, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x82, 0x04, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x59, 0x30, 0xb0, 0x1c, 0x82, 0xd0, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x59, 0x30, 0x08, 0x1c, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x04, 0x01, 0xf2, 0xee, - 0x04, 0x01, 0xff, 0x9b, 0x59, 0x30, 0x00, 0x17, 0x48, 0x01, 0xa0, 0x06, - 0x59, 0x30, 0x00, 0x18, 0x48, 0x01, 0xa0, 0x07, 0x4a, 0x01, 0xa0, 0x08, - 0x00, 0x00, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x20, 0x04, 0x01, 0xff, 0x93, - 0x59, 0x30, 0x00, 0x17, 0x48, 0x01, 0xa0, 0x06, 0x59, 0x30, 0x00, 0x18, - 0x48, 0x01, 0xa0, 0x07, 0x4a, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x40, 0x00, - 0x04, 0x01, 0xf0, 0x18, 0x04, 0x01, 0xff, 0x8b, 0x59, 0x30, 0x00, 0x17, - 0x48, 0x01, 0xa0, 0x06, 0x59, 0x30, 0x00, 0x18, 0x48, 0x01, 0xa0, 0x07, - 0x4a, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x20, 0x00, 0x04, 0x01, 0xf0, 0x10, - 0x04, 0x01, 0xff, 0x83, 0x59, 0x30, 0x00, 0x17, 0x48, 0x01, 0xa0, 0x06, - 0x59, 0x30, 0x00, 0x18, 0x48, 0x01, 0xa0, 0x07, 0x4a, 0x01, 0xa0, 0x08, - 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0xf0, 0x08, 0x04, 0x01, 0xff, 0x7b, - 0x59, 0x30, 0x00, 0x17, 0x48, 0x01, 0xa0, 0x06, 0x59, 0x30, 0x00, 0x18, - 0x48, 0x01, 0xa0, 0x07, 0x4a, 0x01, 0xa0, 0x08, 0x00, 0x00, 0x02, 0x00, - 0x49, 0x79, 0xa0, 0x09, 0x49, 0x79, 0xa0, 0x0a, 0x49, 0x79, 0xa0, 0x0b, - 0x49, 0x79, 0xa0, 0x0c, 0x49, 0x79, 0xa0, 0x0d, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x04, 0x01, 0xf2, 0xbd, 0x04, 0x01, 0xfe, 0xc6, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x14, 0x49, 0x79, 0xa4, 0x07, 0x49, 0x79, 0xa2, 0x07, - 0x59, 0xa8, 0x00, 0x37, 0x48, 0x01, 0xa0, 0x08, 0x59, 0xa8, 0x00, 0x38, - 0x48, 0x01, 0xa0, 0x09, 0x4a, 0x01, 0xa0, 0x0a, 0x00, 0x04, 0x78, 0x78, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf2, 0xad, 0x04, 0x01, 0xfe, 0xb6, - 0x4a, 0x01, 0xa0, 0x06, 0x02, 0x14, 0x00, 0x18, 0x4a, 0x01, 0xa4, 0x07, - 0x00, 0x00, 0x08, 0x00, 0x59, 0x30, 0x00, 0x1c, 0x82, 0x00, 0x0d, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x90, 0x04, 0x09, 0xc0, 0x48, 0x05, 0xa2, 0x07, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x48, 0x01, 0xa0, 0x0a, - 0x49, 0x79, 0xa4, 0x08, 0x49, 0x79, 0xa2, 0x08, 0x49, 0x79, 0xa4, 0x09, - 0x49, 0x79, 0xa2, 0x09, 0x49, 0x79, 0xa0, 0x0b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x04, 0x01, 0xf2, 0x96, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x37, 0xc8, 0x57, - 0x4d, 0x1c, 0x00, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x35, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0xff, 0x04, 0x02, 0x00, 0x21, - 0x04, 0x01, 0xfe, 0x89, 0x4a, 0x01, 0xa0, 0x06, 0x13, 0x00, 0x00, 0x00, - 0x59, 0x32, 0x38, 0x1e, 0x59, 0x1c, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x02, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x00, 0x19, - 0x48, 0x01, 0xa0, 0x05, 0x59, 0x1c, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x07, 0x59, 0x30, 0x08, 0x09, - 0x58, 0x04, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x48, 0x01, 0xa0, 0x07, 0x04, 0x01, 0xf0, 0x03, 0x59, 0xa8, 0x00, 0x0f, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0x30, 0x04, 0x19, 0x48, 0x01, 0xa4, 0x08, - 0x59, 0x30, 0x02, 0x19, 0x48, 0x01, 0xa2, 0x08, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x5c, 0x02, 0x38, 0x00, 0x04, 0x01, 0xf2, 0x6e, 0x48, 0x03, 0xc8, 0x56, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x59, 0x8c, 0x00, 0x0d, - 0x81, 0x30, 0x05, 0x80, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x38, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x1c, 0x00, 0x00, 0x59, 0x32, 0x38, 0x1e, 0x81, 0x1e, 0x39, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x0d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x36, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x37, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x17, 0x00, - 0x5c, 0x02, 0x38, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf0, 0x64, - 0x04, 0x01, 0xf8, 0x4b, 0x42, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x59, 0x1c, 0x02, 0x03, 0x59, 0x1c, 0x08, 0x04, 0x8c, 0x04, 0x0d, 0x3e, - 0x04, 0x02, 0x00, 0x23, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x0c, 0x00, 0x10, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x11, 0x00, 0x10, 0x6f, 0x07, - 0x00, 0x10, 0x6f, 0x11, 0x00, 0x10, 0x6f, 0x0d, 0x00, 0x10, 0x6f, 0x05, - 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x11, 0x00, 0x10, 0x6f, 0x11, - 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x05, - 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x11, - 0x00, 0x10, 0x6f, 0x05, 0x00, 0x10, 0x6f, 0x11, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x04, 0x14, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x18, 0x04, 0x00, 0x00, 0x03, 0x8c, 0x00, 0x05, 0x12, - 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x15, 0x80, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x59, 0x1c, 0x00, 0x15, - 0x48, 0x01, 0xa0, 0x0a, 0x04, 0x01, 0xf0, 0x18, 0x04, 0x01, 0xf8, 0x1f, - 0x59, 0x1e, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x10, 0x0f, 0x59, 0x1c, 0x00, 0x11, - 0x80, 0x08, 0x04, 0x80, 0x48, 0x01, 0xa0, 0x0a, 0x59, 0x1c, 0x02, 0x03, - 0x59, 0x1c, 0x08, 0x04, 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x02, 0x00, 0x07, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x07, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0x02, - 0x80, 0x00, 0x15, 0x80, 0x48, 0x09, 0xa0, 0x0b, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x5c, 0x02, 0x38, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf1, 0xfe, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xfe, 0x06, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x59, 0x30, 0x0c, 0x19, 0x48, 0x05, 0xa4, 0x07, - 0x59, 0x30, 0x0a, 0x19, 0x48, 0x05, 0xa2, 0x07, 0x59, 0xa8, 0x10, 0x0f, - 0x59, 0x30, 0x08, 0x09, 0x58, 0x04, 0x18, 0x02, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x59, 0x30, 0x08, 0x1e, 0x58, 0x04, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x04, - 0x48, 0x09, 0xa0, 0x08, 0x48, 0x0d, 0xa0, 0x09, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x0d, 0xa0, 0x08, 0x48, 0x09, 0xa0, 0x09, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xfd, 0xee, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xfd, 0xe4, 0x4a, 0x01, 0xa0, 0x06, - 0x01, 0x00, 0x00, 0x00, 0x59, 0x30, 0x04, 0x1a, 0x48, 0x01, 0xa4, 0x07, - 0x59, 0x30, 0x02, 0x1a, 0x48, 0x01, 0xa2, 0x07, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x04, 0x01, 0xf1, 0xd6, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x1c, 0x00, 0x00, - 0x04, 0x01, 0xfd, 0xc8, 0x4a, 0x01, 0xa0, 0x06, 0x14, 0x00, 0x00, 0x00, - 0x59, 0x32, 0x38, 0x1e, 0x59, 0x1c, 0x00, 0x19, 0x48, 0x01, 0xa0, 0x05, - 0x59, 0x30, 0x04, 0x19, 0x48, 0x01, 0xa4, 0x07, 0x59, 0x30, 0x02, 0x19, - 0x48, 0x01, 0xa2, 0x07, 0x59, 0x30, 0x00, 0x15, 0x48, 0x01, 0xa0, 0x08, - 0x59, 0x30, 0x02, 0x16, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x84, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa4, 0x09, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x5c, 0x02, 0x38, 0x00, 0x04, 0x01, 0xf1, 0xbd, 0x48, 0x03, 0xc8, 0x56, - 0x04, 0x01, 0xf8, 0x0b, 0x59, 0x30, 0x04, 0x1a, 0x90, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x05, 0x04, 0x01, 0xf9, 0xf4, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x04, 0x01, 0xf9, 0xb3, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5c, 0x2c, 0x48, 0x03, 0xc8, 0x56, - 0x59, 0x30, 0x08, 0x17, 0x82, 0x04, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x46, 0x03, 0x48, 0x00, 0x00, 0x00, 0x00, 0x21, 0x58, 0x04, 0x04, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x30, 0x00, 0x04, 0x00, 0x00, 0x03, 0x46, 0x03, 0x48, 0x00, - 0x00, 0x00, 0x00, 0x41, 0x81, 0xa5, 0xa0, 0x00, 0x58, 0x0c, 0x00, 0x01, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xff, 0x82, 0x04, 0x0d, 0x40, - 0xc2, 0x00, 0x00, 0x00, 0x48, 0x05, 0xa0, 0x00, 0x58, 0x0c, 0x08, 0x00, - 0x82, 0x04, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, 0x82, 0x00, 0x05, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x80, 0x08, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x01, - 0x58, 0x0c, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0xc0, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xfd, 0x03, 0x00, 0x48, 0x01, 0xa0, 0x02, - 0x58, 0x0c, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x03, 0x58, 0x0c, 0x04, 0x04, - 0x48, 0x01, 0xa4, 0x04, 0x58, 0x0c, 0x02, 0x04, 0x48, 0x01, 0xa2, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa8, 0x00, 0x23, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x02, 0x00, 0x09, - 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x04, 0x00, 0x00, 0x03, 0x49, 0x7a, 0x6a, 0x12, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x02, 0x6a, 0x12, 0x00, 0x00, 0xff, 0x00, 0x42, 0x00, 0x50, 0x00, - 0x22, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, 0x01, 0x38, 0x00, 0x00, - 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf9, 0x52, - 0x59, 0x30, 0x10, 0x08, 0x4a, 0x01, 0xa0, 0x06, 0x54, 0x00, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x58, 0x08, 0x0c, 0x0a, 0x80, 0x04, 0x08, 0xf0, 0x80, 0x04, 0x05, 0x40, - 0x48, 0x01, 0xa0, 0x07, 0x58, 0x08, 0x00, 0x0a, 0x82, 0x00, 0x05, 0x00, - 0xff, 0x00, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x08, 0x59, 0xa8, 0x00, 0x02, - 0x48, 0x01, 0xa0, 0x09, 0x59, 0xa8, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x0a, - 0x59, 0xa8, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x0b, 0x59, 0xa8, 0x00, 0x01, - 0x48, 0x01, 0xa0, 0x0c, 0x58, 0x08, 0x00, 0x0c, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x0d, 0x58, 0x08, 0x00, 0x0d, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x0e, 0x58, 0x08, 0x00, 0x0e, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x0f, 0x58, 0x08, 0x00, 0x0f, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x10, 0x58, 0x08, 0x00, 0x10, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x11, 0x58, 0x08, 0x00, 0x11, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x12, 0x58, 0x08, 0x00, 0x12, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x13, 0x58, 0x08, 0x00, 0x13, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x14, 0x58, 0x08, 0x00, 0x10, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x15, 0x58, 0x08, 0x00, 0x11, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x16, 0x58, 0x08, 0x00, 0x12, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x17, 0x58, 0x08, 0x00, 0x13, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x01, 0xa0, 0x18, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf1, 0x35, - 0x48, 0x03, 0xc8, 0x56, 0x42, 0x00, 0x50, 0x00, 0x22, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x01, 0x29, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf9, 0x0b, 0x59, 0x30, 0x10, 0x08, - 0x4a, 0x01, 0xa0, 0x06, 0x55, 0x00, 0x00, 0x00, 0x58, 0x08, 0x00, 0x0b, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x58, 0x08, 0x0c, 0x0a, - 0x80, 0x04, 0x08, 0xf0, 0x80, 0x04, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x07, - 0x58, 0x08, 0x08, 0x0a, 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x01, 0xa0, 0x08, 0x58, 0x08, 0x00, 0x0c, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa0, 0x09, 0x58, 0x08, 0x00, 0x0d, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa0, 0x0a, 0x58, 0x08, 0x00, 0x0e, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa0, 0x0b, 0x58, 0x08, 0x00, 0x0f, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa0, 0x0c, 0x59, 0xa8, 0x00, 0x02, - 0x48, 0x01, 0xa0, 0x0d, 0x59, 0xa8, 0x00, 0x03, 0x48, 0x01, 0xa0, 0x0e, - 0x59, 0xa8, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x0f, 0x59, 0xa8, 0x00, 0x01, - 0x48, 0x01, 0xa0, 0x10, 0x58, 0x08, 0x00, 0x10, 0x48, 0x01, 0xa0, 0x11, - 0x58, 0x08, 0x00, 0x11, 0x48, 0x01, 0xa0, 0x12, 0x58, 0x08, 0x00, 0x12, - 0x48, 0x01, 0xa0, 0x13, 0x58, 0x08, 0x00, 0x13, 0x48, 0x01, 0xa0, 0x14, - 0x49, 0x79, 0xa0, 0x15, 0x49, 0x79, 0xa0, 0x16, 0x49, 0x79, 0xa0, 0x17, - 0x49, 0x79, 0xa0, 0x18, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf0, 0xf6, - 0x04, 0x01, 0xfc, 0xff, 0x59, 0x30, 0x00, 0x1c, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x4a, 0x01, 0xa0, 0x06, 0x01, 0x00, 0x00, 0x00, - 0x4a, 0x01, 0xa4, 0x07, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x28, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x00, 0x41, 0x78, 0x08, 0x00, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x03, 0x84, 0x04, 0x0d, 0x42, - 0x04, 0x01, 0xf0, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x03, 0x84, 0x04, 0x0d, 0x4a, 0x04, 0x01, 0xf0, 0x02, - 0x84, 0x04, 0x0d, 0x48, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x06, - 0x04, 0x02, 0x00, 0x03, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x04, 0x0d, 0x46, 0x48, 0x05, 0xa2, 0x07, 0x59, 0xc4, 0x00, 0x85, - 0x48, 0x03, 0x10, 0x04, 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x83, 0x88, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0xd0, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf0, 0xc1, 0x04, 0x01, 0xfc, 0xbc, - 0x4a, 0x01, 0xa0, 0x06, 0x56, 0x00, 0x00, 0x00, 0x59, 0x34, 0x00, 0x06, - 0x48, 0x01, 0xa0, 0x07, 0x59, 0x34, 0x00, 0x07, 0x48, 0x01, 0xa0, 0x08, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xdc, 0x00, 0x04, 0x01, 0xf0, 0xb5, 0x48, 0x03, 0xc8, 0x56, - 0x04, 0x01, 0xfc, 0xbd, 0x59, 0x30, 0x08, 0x1c, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x0e, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x10, 0x08, 0x4a, 0x01, 0xa0, 0x06, 0x01, 0x00, 0x00, 0x00, - 0x4a, 0x01, 0xa4, 0x07, 0x00, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x12, 0x4a, 0x01, 0xa0, 0x06, - 0x02, 0x00, 0x00, 0x1c, 0x4a, 0x01, 0xa0, 0x07, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xac, 0xbd, 0x50, 0x08, 0x00, 0x00, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x01, 0xa0, 0x09, 0x59, 0xa8, 0x00, 0x0f, - 0x48, 0x01, 0xa0, 0x0a, 0x59, 0xa8, 0x00, 0x02, 0x59, 0xa8, 0x08, 0x03, - 0x48, 0x01, 0xa0, 0x0b, 0x48, 0x05, 0xa0, 0x0c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xdc, 0x00, - 0x04, 0x01, 0xf0, 0x8f, 0x4d, 0x2c, 0x00, 0x00, 0x04, 0x01, 0xfc, 0x89, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x00, 0x08, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x48, 0x01, 0xa0, 0x01, 0x4a, 0x01, 0xa0, 0x06, - 0x51, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x6b, 0xb7, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa8, 0x08, 0x0f, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x32, 0x68, 0x09, 0x59, 0xa8, 0x30, 0x23, 0x8c, 0x18, 0x35, 0x0a, - 0x04, 0x02, 0x00, 0x08, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x06, - 0x80, 0x00, 0x1d, 0x80, 0x59, 0xa8, 0x20, 0x0f, 0x82, 0x10, 0x25, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x04, 0x01, 0xf0, 0x01, 0x59, 0x30, 0x04, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x2e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x30, 0x00, 0x15, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x02, 0x00, 0x20, - 0x42, 0x00, 0x50, 0x00, 0x04, 0x00, 0x00, 0x00, 0x42, 0x00, 0x60, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x59, 0x2c, 0x04, 0x0a, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x80, 0x00, 0x00, 0xe0, 0x80, 0x30, 0x65, 0x40, - 0x59, 0x34, 0x00, 0x0a, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x02, - 0x84, 0x30, 0x65, 0x46, 0x41, 0x78, 0x68, 0x00, 0x41, 0x78, 0x78, 0x00, - 0x04, 0x01, 0xf8, 0x31, 0x59, 0x30, 0x0c, 0x14, 0x80, 0x04, 0x00, 0x00, - 0x48, 0x02, 0x64, 0x14, 0x40, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0xd0, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x20, 0x48, 0x01, 0xa4, 0x03, - 0x83, 0x18, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x38, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0xc9, 0x20, 0x04, 0x01, 0xf8, 0x68, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x5c, 0x31, 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x04, 0x00, 0x00, 0x03, 0x49, 0x7a, 0x6a, 0x12, - 0x04, 0x01, 0xf7, 0xdc, 0x4a, 0x02, 0x6a, 0x12, 0x00, 0x00, 0xff, 0x00, - 0x04, 0x01, 0xf7, 0xd9, 0x42, 0x00, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x42, 0x00, 0x60, 0x00, 0x20, 0x29, 0x00, 0x00, 0x41, 0x78, 0x68, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x04, 0x01, 0xf8, 0x12, 0x83, 0x18, 0x0d, 0x40, - 0x00, 0x00, 0x00, 0x38, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0xc9, 0xa0, - 0x04, 0x01, 0xf8, 0x51, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0xd0, - 0x59, 0x30, 0x00, 0x11, 0x82, 0x00, 0x05, 0x00, 0xff, 0xf0, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x1b, 0x58, 0x41, 0x78, 0x10, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x5c, 0x33, 0x42, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x01, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x59, 0x34, 0x0a, 0x12, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x59, 0xa8, 0x00, 0x0f, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x90, 0x00, 0x01, 0xc0, 0x80, 0x04, 0x05, 0x40, 0x80, 0xd0, 0x05, 0x40, - 0x44, 0x03, 0x48, 0x00, 0x81, 0xa5, 0xa0, 0x00, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x28, 0x05, 0x40, - 0x48, 0x01, 0xa0, 0x00, 0x59, 0xa8, 0x00, 0x0f, 0x48, 0x01, 0xa0, 0x01, - 0x48, 0x31, 0xa0, 0x02, 0x82, 0x34, 0x05, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x01, 0xa0, 0x03, 0x59, 0x30, 0x04, 0x02, 0x48, 0x01, 0xa4, 0x04, - 0x59, 0x30, 0x0a, 0x02, 0x48, 0x05, 0xa2, 0x04, 0x8c, 0x30, 0x65, 0x2e, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x05, 0xa4, 0x04, 0x48, 0x01, 0xa2, 0x04, - 0x48, 0x3d, 0xa0, 0x05, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x4c, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x2a, 0x5c, 0x00, 0x08, 0x00, - 0x40, 0x04, 0x00, 0x00, 0x80, 0x08, 0x15, 0x40, 0x80, 0x00, 0x00, 0xc4, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x20, 0x00, 0x48, 0x03, 0x91, 0x0a, - 0x59, 0xb4, 0x00, 0xf6, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x04, 0x02, 0x07, 0xfd, 0x4a, 0x03, 0x68, 0xf0, 0x00, 0x10, 0xad, 0x12, - 0x42, 0x00, 0x18, 0x00, 0x00, 0x10, 0xad, 0x13, 0x58, 0x0c, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x58, 0x0c, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, - 0x58, 0x0c, 0x00, 0x06, 0x48, 0x03, 0xc8, 0x57, 0x4a, 0x03, 0x68, 0xf1, - 0x00, 0x10, 0xad, 0x19, 0x48, 0x0b, 0x68, 0xf3, 0x4a, 0x03, 0x78, 0xe4, - 0x00, 0x00, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x5c, 0x2c, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0a, 0x28, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x0a, 0x5c, 0x00, 0x08, 0x00, 0x59, 0xb4, 0x00, 0xf6, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x07, 0xfe, 0x49, 0xa7, 0x68, 0xf2, - 0x48, 0x07, 0x68, 0xf4, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x80, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0xc0, 0x00, - 0x59, 0xbc, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x0c, - 0x4a, 0x03, 0x78, 0xe4, 0x00, 0x00, 0x80, 0x00, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x03, 0xe8, 0x59, 0xbc, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x07, 0xf5, 0x80, 0x38, 0x70, 0x40, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf7, 0xfa, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x01, 0x05, 0x00, 0x00, 0x04, 0x02, 0x00, 0x0d, 0x59, 0x9c, 0x08, 0x18, - 0x8c, 0x04, 0x0d, 0x10, 0x04, 0x00, 0x00, 0x0a, 0x59, 0xa8, 0x08, 0x06, - 0x8c, 0x04, 0x0d, 0x0a, 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x80, 0x4f, 0x41, 0x78, 0x18, 0x00, 0x41, 0x78, 0x20, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x36, 0xf4, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0x78, 0x10, 0x00, 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x59, 0xa8, 0x18, 0x0d, 0x48, 0x0a, 0x64, 0x02, 0x4a, 0x02, 0x62, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x80, 0x08, 0x10, 0x00, 0x80, 0x0c, 0x18, 0x40, - 0x04, 0x00, 0x00, 0x04, 0x83, 0x32, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x04, 0x01, 0xf7, 0xf8, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x41, 0x31, 0x88, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x03, 0x60, 0x00, - 0x4d, 0xb0, 0x00, 0x00, 0x49, 0xb3, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x2c, 0x59, 0x30, 0x04, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x11, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0e, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x06, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x11, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0xc7, 0x59, 0x30, 0x00, 0x1c, - 0x80, 0x00, 0x01, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, - 0x04, 0x01, 0xf0, 0x0a, 0x59, 0x30, 0x08, 0x1e, 0x48, 0x07, 0xc8, 0x57, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x58, 0x04, 0x00, 0x1c, - 0x48, 0x03, 0xc8, 0x57, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x02, - 0x49, 0x78, 0x08, 0x1c, 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x60, 0x04, - 0x00, 0x00, 0x40, 0x00, 0x59, 0xa8, 0x00, 0x34, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x51, 0x04, 0x00, 0x10, 0x02, 0x80, 0x00, 0x01, 0x02, - 0x48, 0x02, 0x62, 0x06, 0x49, 0x7a, 0x62, 0x05, 0x49, 0x7a, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x04, 0x41, 0x31, 0x88, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x81, 0x66, 0xc9, 0xc0, - 0x04, 0x00, 0x00, 0x1c, 0x41, 0x62, 0x60, 0x00, 0x41, 0x58, 0x00, 0x00, - 0x59, 0x30, 0x0a, 0x03, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x08, 0x83, 0x32, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x81, 0x30, 0x0c, 0x80, 0x04, 0x00, 0x17, 0xf9, 0x42, 0x02, 0x60, 0x00, - 0x00, 0x10, 0xd8, 0xd4, 0x04, 0x01, 0xf7, 0xf6, 0x49, 0x33, 0xc8, 0x57, - 0x81, 0x66, 0xc8, 0x40, 0x83, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x10, 0x06, 0x40, 0x06, 0xc0, 0x00, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x08, 0x81, 0x32, 0x61, 0xc0, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x02, 0xc0, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x04, 0x01, 0xf7, 0xfa, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x23, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x49, 0x33, 0xc8, 0x56, - 0x41, 0x7a, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xf5, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x13, 0x04, 0x02, 0x00, 0x0b, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x88, 0x00, 0x53, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0x53, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4d, 0x2c, 0x00, 0x00, - 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x77, 0x9c, 0x00, 0x10, 0x78, 0xf0, - 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x79, 0x56, 0x00, 0x10, 0x73, 0x90, - 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x77, 0x32, - 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x72, 0x29, - 0x00, 0x10, 0x72, 0x29, 0x00, 0x10, 0x72, 0x29, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x72, 0x40, - 0x00, 0x10, 0x82, 0x36, 0x00, 0x10, 0x72, 0x40, 0x00, 0x10, 0x72, 0x40, - 0x00, 0x10, 0x72, 0x40, 0x00, 0x10, 0x72, 0x40, 0x00, 0x10, 0x72, 0x40, - 0x00, 0x10, 0x72, 0x40, 0x00, 0x10, 0x81, 0xe0, 0x00, 0x10, 0x82, 0x52, - 0x00, 0x10, 0x82, 0xc1, 0x00, 0x10, 0x82, 0x52, 0x00, 0x10, 0x82, 0xc1, - 0x00, 0x10, 0x72, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, - 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x79, 0x00, 0x10, 0x72, 0xc5, - 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, - 0x00, 0x10, 0x72, 0x5f, 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, - 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, 0x00, 0x10, 0x72, 0x5d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x60, 0x07, 0x00, 0x08, 0x20, 0x00, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, 0x49, 0x3a, 0x64, 0x03, - 0x4a, 0x02, 0x5c, 0x08, 0x00, 0x00, 0x00, 0x01, 0x59, 0x2c, 0x00, 0x0d, - 0x48, 0x02, 0x60, 0x11, 0x49, 0x7a, 0x60, 0x13, 0x59, 0x2c, 0x02, 0x08, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x10, 0xc4, 0x80, 0x08, 0x14, 0x00, - 0x48, 0x0a, 0x62, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0x95, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x60, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x49, 0x33, 0xc8, 0x57, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x50, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x49, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x72, 0x8c, - 0x00, 0x10, 0x72, 0x97, 0x00, 0x10, 0x72, 0x8a, 0x00, 0x10, 0x72, 0x8a, - 0x00, 0x10, 0x72, 0x8a, 0x00, 0x10, 0x72, 0x8a, 0x00, 0x10, 0x72, 0xa2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x5c, 0x08, 0x00, 0x00, 0x00, 0x02, - 0x59, 0x2c, 0x02, 0x07, 0x48, 0x02, 0x5c, 0x09, 0x59, 0x2c, 0x02, 0x09, - 0x48, 0x02, 0x5a, 0x07, 0x59, 0x2c, 0x00, 0x0c, 0x48, 0x02, 0x58, 0x0d, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa4, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x14, - 0x41, 0x78, 0x28, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x4d, 0x40, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x90, 0xb2, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00, 0x05, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x53, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x02, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x09, 0x59, 0x30, 0x00, 0x11, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x06, 0x59, 0x2c, 0x08, 0x0c, - 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x58, 0x0c, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x15, 0x59, 0x2c, 0x02, 0x06, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x7a, 0x5a, 0x06, 0x59, 0xa8, 0x00, 0x6b, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x48, 0x02, 0x5c, 0x07, - 0x59, 0xa8, 0x08, 0x15, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x48, 0x06, 0x5a, 0x07, 0x41, 0x2c, 0x78, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x41, 0xcc, 0xa0, 0x00, 0x42, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x2d, 0x04, 0x02, 0x10, 0x06, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0x93, - 0x04, 0x01, 0xf0, 0x2e, 0x40, 0x04, 0x30, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x2c, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0x93, 0x82, 0x18, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x2c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x04, 0x00, 0x00, 0x1a, 0x80, 0x14, 0x28, 0x00, 0x4a, 0x02, 0x58, 0x04, - 0x00, 0x00, 0x01, 0x10, 0x49, 0x2c, 0x78, 0x01, 0x82, 0x18, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x3d, 0x04, 0x02, 0x10, 0x07, 0x40, 0x18, 0x08, 0x00, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x83, 0x93, 0x04, 0x01, 0xf0, 0x15, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x3c, 0x82, 0x18, 0x34, 0x80, 0x00, 0x00, 0x00, 0x3c, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x41, 0x2c, 0x78, 0x00, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x83, 0x93, 0x04, 0x01, 0xf7, 0xe5, 0x5c, 0x02, 0x58, 0x00, - 0x59, 0x2c, 0x02, 0x06, 0x84, 0x00, 0x05, 0x5e, 0x48, 0x02, 0x5a, 0x06, - 0x59, 0x2c, 0x04, 0x07, 0x80, 0x08, 0x05, 0x40, 0x48, 0x02, 0x5c, 0x07, - 0x04, 0x01, 0xf0, 0x02, 0x5c, 0x02, 0x58, 0x00, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x59, 0x34, 0x34, 0x03, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0xff, 0xff, 0x49, 0x32, 0x58, 0x08, - 0x48, 0x1a, 0x5c, 0x06, 0x82, 0x10, 0x05, 0x80, 0x00, 0x00, 0x00, 0x54, - 0x04, 0x02, 0x00, 0x02, 0x49, 0x1e, 0x58, 0x13, 0x84, 0x14, 0x01, 0xc0, - 0x80, 0x10, 0x05, 0x40, 0x48, 0x02, 0x58, 0x04, 0x59, 0x2c, 0x00, 0x01, - 0x49, 0x7a, 0x58, 0x01, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, 0x81, 0x2e, 0x59, 0xc0, - 0x04, 0x02, 0x07, 0xf9, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x5c, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x41, 0x2c, 0xb8, 0x00, 0x59, 0x2c, 0x04, 0x0b, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x00, 0x00, 0x03, 0x41, 0xcc, 0xa0, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x40, 0x08, 0xb0, 0x00, - 0x41, 0x78, 0x10, 0x00, 0x82, 0x58, 0x04, 0x80, 0x00, 0x00, 0x00, 0x48, - 0x04, 0x00, 0x10, 0x04, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x40, 0x00, 0x10, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x26, - 0x5c, 0x00, 0x18, 0x00, 0x49, 0x2c, 0x18, 0x01, 0x48, 0x5a, 0x58, 0x00, - 0x82, 0x58, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x58, 0xb1, 0x04, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x41, 0x58, 0x5c, 0x04, 0x0b, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x0e, 0x83, 0x2c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x00, 0x00, 0x03, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x80, 0x08, 0x10, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x00, - 0x84, 0x00, 0x05, 0x00, 0x48, 0x00, 0xbc, 0x0b, 0x5c, 0x00, 0x10, 0x00, - 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x07, 0xd7, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xf8, 0x49, 0x33, 0xc8, 0x57, 0x83, 0x38, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x83, 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x16, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x59, 0xcc, 0x18, 0x06, 0x82, 0x0c, 0x05, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x0f, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x8c, 0x0c, 0x1d, 0x00, 0x04, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x59, 0x2e, 0x58, 0x01, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x04, 0x01, 0xf8, 0x16, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x59, 0x30, 0xa8, 0x08, 0x82, 0x54, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x0b, 0x41, 0x78, 0x08, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x81, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x59, 0x31, 0xd8, 0x21, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, 0x58, 0xec, 0x00, 0x09, - 0x08, 0x01, 0xf8, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xcc, 0x18, 0x06, - 0x82, 0x0c, 0x05, 0x80, 0x02, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x14, - 0x4a, 0x02, 0x68, 0x02, 0x00, 0xff, 0xff, 0xfd, 0x59, 0x34, 0x00, 0x0a, - 0x84, 0x00, 0x05, 0x04, 0x48, 0x02, 0x68, 0x0a, 0x59, 0x30, 0x08, 0x08, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4a, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x01, 0x03, 0x48, 0x0c, 0x08, 0x05, - 0x59, 0x31, 0xd8, 0x21, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, - 0x58, 0xec, 0x00, 0x09, 0x08, 0x01, 0xf8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x3b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4c, 0x0c, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x04, 0x5c, 0x00, 0x18, 0x00, 0x04, 0x02, 0x07, 0xeb, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x02, 0x00, 0x09, - 0x49, 0x7a, 0x62, 0x06, 0x49, 0x7a, 0x62, 0x05, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x22, 0x04, 0x01, 0xfb, 0x7b, - 0x5c, 0x02, 0x70, 0x00, 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2e, 0x58, 0x01, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x59, 0xa8, 0x08, 0x6b, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x03, 0xff, - 0x82, 0x04, 0x14, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x04, 0x00, 0x10, 0x1b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x59, 0x2e, 0x58, 0x01, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x82, 0x08, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0f, - 0x04, 0x00, 0x10, 0x0d, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x59, 0x2e, 0x58, 0x01, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82, 0x04, 0x14, 0x80, - 0x00, 0x00, 0x00, 0x0f, 0x04, 0x00, 0x10, 0x07, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x40, 0x08, 0xb0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x04, 0x01, 0xf0, 0x04, 0x40, 0x04, 0xb0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x59, 0x31, 0xd8, 0x21, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x2e, 0x58, 0x01, 0x58, 0xec, 0x00, 0x09, - 0x08, 0x01, 0xf8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x0d, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2c, 0x59, 0xcc, 0x00, 0x07, - 0x90, 0x00, 0xb1, 0xc0, 0x82, 0x58, 0xb5, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x58, 0xb1, 0x04, 0x82, 0x58, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x82, 0x58, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x10, 0x03, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x59, 0x30, 0x10, 0x08, 0x80, 0x08, 0x11, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x08, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x82, 0x00, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x19, 0x82, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x58, 0xb1, 0x04, 0x82, 0x58, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x58, 0x08, 0x10, 0x01, 0x80, 0x08, 0x11, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x08, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x04, 0x01, 0xf0, 0x08, - 0x59, 0x30, 0x10, 0x08, 0x80, 0x08, 0x11, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x00, 0x10, 0x05, 0x59, 0xcc, 0x00, 0x07, - 0x48, 0x00, 0x10, 0x06, 0x04, 0x01, 0xff, 0x3b, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x06, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x08, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0xb5, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x80, 0x58, 0xb1, 0x04, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x59, 0x30, 0x00, 0x08, 0x82, 0x00, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x04, 0x01, 0xff, 0x0c, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, - 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, 0x48, 0x13, 0xc8, 0x57, - 0x48, 0x1b, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, - 0x5c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x48, 0x02, 0x58, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x48, 0x02, 0x58, 0x0a, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x1a, 0x58, 0x01, 0x48, 0x12, 0x58, 0x09, 0x48, 0x06, 0x58, 0x05, - 0x48, 0x0a, 0x58, 0x07, 0x48, 0x0e, 0x58, 0x08, 0x41, 0x2c, 0x10, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x37, 0xc8, 0x57, 0x4d, 0x1c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5a, 0xe9, 0x04, 0x02, 0x00, 0x25, - 0x59, 0xcc, 0x00, 0x01, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x59, 0x34, 0x10, 0x02, 0x82, 0x08, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x1d, 0x49, 0x7a, 0x62, 0x05, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x35, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0xff, 0x04, 0x02, 0x00, 0x12, 0x59, 0x1c, 0x00, 0x1c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x0f, 0x49, 0x7a, 0x38, 0x1c, - 0x59, 0x1c, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x02, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x84, 0x00, 0x05, 0x02, 0x48, 0x02, 0x3c, 0x14, - 0x59, 0x1c, 0x14, 0x06, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x06, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x00, 0x00, 0x05, 0x04, 0x01, 0xfc, 0x8c, 0x04, 0x01, 0xf0, 0x04, - 0x04, 0x01, 0xf8, 0x05, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0xc0, - 0x5c, 0x02, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x1e, 0x58, 0x08, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x1f, 0xc8, 0x57, - 0x49, 0x3b, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x00, 0x00, 0xb3, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x16, 0x04, 0x02, 0x00, 0xae, 0x4d, 0x30, 0x00, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x59, 0xcc, 0x02, 0x07, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x03, 0x00, 0x04, 0x02, 0x00, 0x5b, 0x59, 0x1c, 0x02, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x00, 0x00, 0x3f, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x9a, - 0x59, 0x1c, 0x02, 0x02, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x00, 0x7e, 0x59, 0x2c, 0x02, 0x0a, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x07, - 0x59, 0x2c, 0x08, 0x0f, 0x59, 0x1c, 0x00, 0x11, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x07, 0xc8, 0x57, 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x71, - 0x59, 0x1c, 0x04, 0x14, 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x6d, 0x41, 0x78, 0x08, 0x00, 0x59, 0x1c, 0x12, 0x06, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xb7, 0x59, 0x2c, 0x04, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x0c, 0x80, 0x08, 0x0c, 0x80, - 0x04, 0x00, 0x10, 0x04, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x80, 0x00, 0x10, 0x40, 0x48, 0x0a, 0x5c, 0x06, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x85, 0x89, - 0x04, 0x01, 0xf0, 0x6b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x42, - 0x59, 0x1c, 0x08, 0x17, 0x59, 0x1c, 0x00, 0x18, 0x48, 0x06, 0x58, 0x08, - 0x48, 0x02, 0x58, 0x09, 0x59, 0x30, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x00, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x0d, 0xdd, 0x49, 0x7a, 0x38, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x01, 0xe0, 0x04, 0x02, 0x00, 0x4a, - 0x41, 0x1e, 0x60, 0x00, 0x04, 0x01, 0xfc, 0x2c, 0x04, 0x01, 0xf0, 0x5a, - 0x04, 0x01, 0xfc, 0x63, 0x04, 0x00, 0x00, 0x13, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x03, 0x49, 0x2e, 0x60, 0x08, - 0x59, 0x1c, 0x08, 0x17, 0x59, 0x1c, 0x10, 0x18, 0x48, 0x06, 0x60, 0x17, - 0x48, 0x0a, 0x60, 0x18, 0x4d, 0x38, 0x00, 0x00, 0x59, 0x1e, 0x74, 0x03, - 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, 0x04, 0x01, 0xfc, 0x1c, - 0x5c, 0x02, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x70, 0x00, 0x04, 0x01, 0xf0, 0x46, 0x59, 0xa8, 0x00, 0x36, - 0x48, 0x02, 0x3a, 0x05, 0x04, 0x01, 0xf0, 0x43, 0x59, 0xcc, 0x04, 0x07, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x02, 0x00, 0x25, - 0x59, 0x34, 0x0a, 0x00, 0x84, 0x04, 0x0d, 0x0e, 0x48, 0x06, 0x6a, 0x00, - 0x59, 0x2c, 0x0a, 0x04, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x59, 0x30, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x0d, 0xdd, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x59, 0x2c, 0x0a, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x80, 0x00, - 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x85, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x40, 0x4b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x04, 0x01, 0xf0, 0x1b, - 0x59, 0xcc, 0x02, 0x07, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x2a, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x3a, 0x05, - 0x04, 0x01, 0xf0, 0x14, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x59, 0x1c, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x00, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x0d, 0xdd, 0x59, 0x1c, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, 0x5c, 0x02, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf0, 0x02, - 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xf8, 0x19, 0x04, 0x01, 0xf7, 0xfd, 0x49, 0x33, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x04, - 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x3a, 0x05, 0x04, 0x01, 0xf0, 0x0d, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x16, 0x04, 0x02, 0x00, 0x0d, - 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0xc7, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x38, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x60, 0x00, - 0x49, 0x7a, 0x38, 0x1c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x1c, 0x04, 0x14, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x02, 0x3c, 0x14, 0x59, 0xcc, 0x10, 0x0b, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x1f, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x0b, 0xc8, 0x57, 0x8c, 0x08, 0x15, 0x3c, 0x04, 0x00, 0x00, 0x06, - 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x3a, 0x05, 0x49, 0x7a, 0x38, 0x1c, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4d, 0x30, 0x00, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0xd4, - 0x5c, 0x02, 0x60, 0x00, 0x59, 0x1c, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x59, 0x1c, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x50, - 0x04, 0x02, 0x00, 0x0d, 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x5c, 0x02, 0x60, 0x00, 0x49, 0x7a, 0x38, 0x1c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x59, 0x1c, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x0d, 0x04, 0x00, 0x00, 0x14, 0x81, 0x2e, 0x59, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x11, - 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x0e, - 0x4a, 0x02, 0x38, 0x12, 0x0f, 0xff, 0xff, 0xff, 0x59, 0x2c, 0x02, 0x08, - 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x5a, 0x08, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x48, 0x02, 0x3a, 0x14, 0x04, 0x01, 0xf0, 0x21, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x48, 0x02, 0x3a, 0x14, - 0x04, 0x01, 0xf0, 0x1d, 0x59, 0x2c, 0x02, 0x0a, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x0b, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x07, 0xf7, 0x59, 0x1c, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x1c, - 0x04, 0x02, 0x07, 0xeb, 0x59, 0x1c, 0x00, 0x11, 0x48, 0x03, 0xc8, 0x57, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x07, 0xf0, 0x04, 0x01, 0xf7, 0xe6, - 0x8c, 0x08, 0x15, 0x3a, 0x04, 0x02, 0x07, 0xed, 0x59, 0xcc, 0x00, 0x0a, - 0x59, 0x2c, 0x18, 0x0f, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, - 0x80, 0x0c, 0x05, 0x80, 0x04, 0x00, 0x07, 0xe7, 0x59, 0xcc, 0x00, 0x0a, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x02, 0x38, 0x16, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x48, 0x02, 0x3a, 0x14, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x8a, 0x82, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x1c, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5a, 0xe9, 0x04, 0x02, 0x00, 0x4a, - 0x59, 0xcc, 0x00, 0x01, 0x59, 0x34, 0x10, 0x02, 0x80, 0x08, 0x05, 0x80, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x41, - 0x59, 0x30, 0x14, 0x19, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x14, 0x06, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x38, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x35, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x32, - 0x59, 0x1c, 0x02, 0x02, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x30, 0x1a, 0x19, 0x80, 0x0c, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x2b, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x00, 0x00, 0x26, 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x2c, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x59, 0x2c, 0x0a, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4a, 0x8e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x85, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x40, 0x4b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x59, 0xa8, 0x00, 0x36, - 0x48, 0x02, 0x3a, 0x05, 0x49, 0x7a, 0x38, 0x1c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x00, 0x00, 0x10, 0x59, 0x34, 0x22, 0x00, 0x84, 0x10, 0x25, 0x02, - 0x48, 0x12, 0x6a, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x65, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xc3, 0x04, 0x01, 0xfa, 0x10, - 0x04, 0x01, 0xf0, 0x78, 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x04, 0x02, 0x00, 0x15, 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x04, 0x02, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, - 0x59, 0x34, 0x22, 0x00, 0x59, 0xcc, 0x10, 0x07, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x0a, 0x68, 0x01, 0x84, 0x10, 0x25, 0x42, - 0x84, 0x10, 0x25, 0x1a, 0x48, 0x12, 0x6a, 0x00, 0x04, 0x01, 0xf0, 0x5e, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, 0x48, 0x02, 0x6a, 0x00, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x11, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9c, 0x14, 0x5c, 0x02, 0x80, 0x00, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x64, 0x20, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x09, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, 0x5c, 0x02, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x22, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x22, - 0x04, 0x01, 0xf9, 0xb5, 0x04, 0x01, 0xf0, 0x1d, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, - 0x48, 0x02, 0x6a, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x41, 0x78, 0x28, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x4d, 0x40, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x90, 0xb2, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf0, 0x02, - 0x04, 0x01, 0xfc, 0xa5, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x41, 0x38, 0x00, 0x00, - 0x83, 0x38, 0x34, 0x80, 0x00, 0x00, 0x00, 0x56, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x77, 0x96, - 0x00, 0x10, 0x77, 0x91, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x96, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x96, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x96, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x96, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x96, - 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, 0x00, 0x10, 0x77, 0x8f, - 0x00, 0x10, 0x77, 0x96, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x49, 0x3a, 0x64, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x49, 0x33, 0xc8, 0x57, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x49, 0x3a, 0x64, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x56, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x00, 0x00, 0x96, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x02, 0x00, 0x4c, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x4c, - 0x04, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x69, - 0x04, 0x00, 0x00, 0x41, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x22, 0x04, 0x02, 0x00, 0x38, 0x04, 0x01, 0xfc, 0x5d, - 0x04, 0x00, 0x00, 0x3a, 0x04, 0x01, 0xf0, 0x3a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf9, 0x05, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x83, 0x44, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x00, 0x08, 0x59, 0xa8, 0x10, 0x23, - 0x84, 0x08, 0x15, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x04, 0x02, 0x00, 0x02, 0x84, 0x08, 0x15, 0x4a, 0x48, 0x0b, 0x50, 0x23, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x0c, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x00, 0x08, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x08, 0x59, 0x36, 0x8c, 0x03, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x37, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x0f, 0x04, 0x01, 0xf0, 0x0c, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, - 0x41, 0x78, 0x28, 0x00, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, 0x5c, 0x02, 0x88, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x64, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xf8, 0xd2, - 0x04, 0x01, 0xf7, 0xfa, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x00, 0x0c, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0xf3, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x16, 0x41, 0x78, 0x28, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x80, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0x4c, 0x04, 0x02, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x04, 0x01, 0xf8, 0xa3, 0x59, 0x34, 0x0c, 0x03, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x07, 0xc8, - 0x59, 0xa8, 0x08, 0x23, 0x84, 0x04, 0x0d, 0x40, 0x48, 0x07, 0x50, 0x23, - 0x04, 0x01, 0xf7, 0xc4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x69, - 0x04, 0x02, 0x00, 0x03, 0x04, 0x01, 0xf8, 0x97, 0x04, 0x01, 0xf7, 0xbf, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x32, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x04, 0x01, 0xf7, 0xb8, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x22, 0x04, 0x00, 0x08, 0x8b, 0x04, 0x01, 0xf7, 0xb3, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x9b, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xa9, - 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xa2, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0xa2, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xa5, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x94, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0xb8, 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0x92, - 0x00, 0x10, 0x78, 0x92, 0x00, 0x10, 0x78, 0xb8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x62, 0x05, - 0x59, 0xa8, 0x00, 0x34, 0x48, 0x02, 0x62, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x08, 0x1e, 0x49, 0x78, 0x0a, 0x05, 0x04, 0x01, 0xf0, 0x14, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x64, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1e, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x04, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x49, 0x33, 0xc8, 0x57, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x59, 0xa8, 0x00, 0x34, 0x48, 0x02, 0x62, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x2a, - 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x02, 0x00, 0x0a, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x31, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x81, 0x5c, 0x02, 0x80, 0x00, - 0x04, 0x01, 0xf0, 0x1c, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x02, 0x00, 0x0a, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x31, 0x4a, 0x02, 0x58, 0x0d, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x02, 0x58, 0x0e, 0x00, 0x00, 0x00, 0xff, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x04, 0x01, 0xf0, 0x0c, 0x59, 0x2c, 0x04, 0x04, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x4a, 0x02, 0x58, 0x05, 0x01, 0x00, 0x00, 0x00, - 0x59, 0x31, 0xd8, 0x21, 0x58, 0xef, 0x40, 0x0b, 0x58, 0xec, 0x00, 0x09, - 0x08, 0x01, 0xf8, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x34, 0x03, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x4d, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x8b, 0xd0, 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x33, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8b, 0x87, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x89, 0xaa, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x29, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x89, 0xbe, 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x1f, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x73, 0xc3, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x55, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x73, 0x9c, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x8b, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x22, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x73, 0xf0, 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x35, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0xeb, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x39, 0x04, 0x00, 0x05, 0x30, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x20, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x44, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x74, 0x5d, 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x49, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0xb2, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x9e, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x43, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x8d, 0x22, 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x51, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x8d, 0x88, 0x82, 0x18, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x83, 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x00, 0x00, 0x06, 0x83, 0x38, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x16, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, 0x04, 0x01, 0xf2, 0x24, - 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x04, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x62, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0xd5, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7a, 0xe1, - 0x00, 0x10, 0x7b, 0x7a, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x7b, 0x43, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7b, 0x55, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x7a, 0x60, 0x07, 0x59, 0x30, 0x08, 0x08, - 0x58, 0x04, 0x00, 0x00, 0x4a, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x74, 0x04, 0x02, 0x00, 0x5b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9b, 0x50, 0x04, 0x02, 0x00, 0x16, 0x04, 0x01, 0xf8, 0x5b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x0c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x09, - 0x41, 0x78, 0x08, 0x00, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x81, - 0x5c, 0x02, 0x80, 0x00, 0x04, 0x01, 0xf0, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xe1, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x04, 0x04, 0x01, 0xff, 0x3d, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, 0x48, 0x02, 0x6a, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0x37, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x36, 0x60, 0x09, 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x11, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x64, 0x20, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x41, 0x78, 0x28, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9c, 0x14, 0x5c, 0x02, 0x80, 0x00, 0x04, 0x01, 0xf0, 0x09, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, 0x5c, 0x02, 0x60, 0x00, - 0x04, 0x01, 0xff, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xff, 0x01, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0xdd, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x0c, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, 0x5c, 0x02, 0x78, 0x00, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xa8, 0x08, 0x15, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x74, 0x04, 0x00, 0x00, 0x0e, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x02, 0x00, 0xb7, 0x59, 0xcc, 0x04, 0x08, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0xb3, 0x59, 0x34, 0x14, 0x03, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x00, 0x00, 0x06, - 0x04, 0x01, 0xf0, 0xae, 0x59, 0x34, 0x14, 0x03, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x00, 0x1a, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x15, 0x59, 0xcc, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x59, 0xa8, 0x08, 0x0f, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x21, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x3d, 0xcb, 0x04, 0x01, 0xfa, 0x9b, 0x04, 0x01, 0xf0, 0x4c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x46, 0x59, 0x34, 0x14, 0x03, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfc, 0x04, 0x02, 0x00, 0x1f, - 0x4a, 0x02, 0x68, 0x02, 0x00, 0xff, 0xff, 0xfc, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x12, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x0f, 0x04, 0x01, 0xf8, 0xa9, - 0x41, 0x78, 0x08, 0x00, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x81, - 0x5c, 0x02, 0x80, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x11, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x09, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xda, - 0x04, 0x02, 0x00, 0x5a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x5b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x02, 0x00, 0x05, 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1c, - 0x04, 0x02, 0x07, 0xc9, 0x04, 0x01, 0xf8, 0x77, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x59, 0xcc, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x18, 0x04, 0x00, 0x00, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x1b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x04, 0x08, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xb3, 0x59, 0xa8, 0x00, 0x23, - 0x84, 0x00, 0x05, 0x4a, 0x48, 0x03, 0x50, 0x23, 0x59, 0xa8, 0x00, 0x0f, - 0x84, 0x00, 0x05, 0x70, 0x48, 0x03, 0x88, 0x32, 0x04, 0x01, 0xf7, 0xac, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xef, 0x48, 0x0b, 0x50, 0x0f, - 0x49, 0x7b, 0x88, 0x30, 0x84, 0x08, 0x15, 0x70, 0x48, 0x0b, 0x88, 0x32, - 0x59, 0xc4, 0x08, 0x02, 0x84, 0x04, 0x0d, 0x4c, 0x48, 0x07, 0x88, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x49, 0x59, 0xa8, 0x00, 0x23, - 0x84, 0x00, 0x05, 0x48, 0x48, 0x03, 0x50, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9b, 0xad, 0x04, 0x02, 0x07, 0x9b, 0x59, 0xa8, 0x00, 0x23, - 0x84, 0x00, 0x05, 0x4c, 0x48, 0x03, 0x50, 0x23, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x58, 0x54, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x42, 0xb1, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x36, 0x60, 0x09, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x1a, 0x48, 0x02, 0x6a, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x04, 0x01, 0xfe, 0x2e, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x0a, 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x07, 0xab, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x80, 0x00, 0x35, 0x40, - 0x04, 0x00, 0x00, 0x05, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x80, 0x18, 0x31, 0xc0, - 0x04, 0x02, 0x00, 0x0e, 0x59, 0x30, 0x20, 0x08, 0x80, 0x10, 0x21, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x58, 0x10, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x02, 0x00, 0x08, 0x59, 0x34, 0x1c, 0x03, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x12, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0x64, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4c, 0x5c, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x52, 0xd5, 0x5c, 0x02, 0x58, 0x00, - 0x59, 0xcc, 0x00, 0x08, 0x48, 0x00, 0x28, 0x05, 0x59, 0xcc, 0x00, 0x09, - 0x48, 0x00, 0x28, 0x06, 0x49, 0x78, 0x28, 0x07, 0x49, 0x78, 0x28, 0x08, - 0x49, 0x78, 0x28, 0x09, 0x49, 0x78, 0x28, 0x0a, 0x59, 0xcc, 0x00, 0x13, - 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x00, 0x09, 0x59, 0xcc, 0x04, 0x14, - 0x90, 0x00, 0x01, 0xc0, 0x59, 0xcc, 0xbc, 0x15, 0x80, 0x5c, 0x05, 0x40, - 0x48, 0x00, 0x28, 0x07, 0x59, 0xcc, 0x04, 0x16, 0x90, 0x00, 0x01, 0xc0, - 0x48, 0x00, 0x28, 0x08, 0x59, 0xcc, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x3e, - 0x04, 0x00, 0x00, 0x09, 0x59, 0xcc, 0x04, 0x18, 0x90, 0x00, 0x01, 0xc0, - 0x59, 0xcc, 0xbc, 0x19, 0x80, 0x5c, 0x05, 0x40, 0x48, 0x00, 0x28, 0x09, - 0x59, 0xcc, 0x04, 0x1a, 0x90, 0x00, 0x01, 0xc0, 0x48, 0x00, 0x28, 0x0a, - 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x48, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x15, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xda, 0x04, 0x00, 0x00, 0x05, 0x59, 0xa8, 0x00, 0x6c, - 0x84, 0x00, 0x05, 0x4c, 0x48, 0x03, 0x50, 0x6c, 0x04, 0x01, 0xf0, 0x31, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x0b, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x08, - 0x59, 0x34, 0x1c, 0x03, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x37, 0x64, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0xa7, - 0x04, 0x01, 0xfe, 0xb9, 0x04, 0x01, 0xfa, 0x19, 0x04, 0x02, 0x00, 0x1f, - 0x59, 0x34, 0x04, 0x04, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x1c, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x02, 0x00, 0x0a, 0x41, 0x78, 0x08, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x81, 0x5c, 0x02, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x4a, 0x02, 0x58, 0x05, 0x02, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x04, 0x04, 0x01, 0xfd, 0x8d, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xfd, 0x8a, - 0x80, 0x00, 0x05, 0x80, 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x0c, - 0x04, 0x00, 0x00, 0x05, 0x84, 0x00, 0x05, 0x0c, 0x48, 0x03, 0x50, 0x6c, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xff, 0x60, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x0b, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0x4d, 0x49, 0x33, 0xc8, 0x57, 0x40, 0x00, 0x30, 0x00, - 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x02, 0x00, 0x0a, 0x82, 0x18, 0x35, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x02, 0x00, 0x05, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0x3b, 0x48, 0x03, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x3c, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x04, 0x5c, 0x02, 0x78, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x7b, 0x89, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7b, 0xdd, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7c, 0x4b, 0x00, 0x10, 0x7b, 0x7a, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7c, 0x6b, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x7c, 0x7b, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x1c, 0x00, 0x00, 0x59, 0x30, 0x14, 0x03, 0x82, 0x08, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x08, 0x82, 0x08, 0x15, 0x80, - 0x00, 0x00, 0x00, 0x1e, 0x04, 0x02, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xff, 0x5a, 0x04, 0x01, 0xf7, 0xfd, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x08, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xc3, 0x04, 0x01, 0xfd, 0x2e, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf8, 0xf4, 0x04, 0x02, 0x00, 0x2f, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, - 0x48, 0x02, 0x6a, 0x00, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0x37, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x11, - 0x4d, 0x40, 0x00, 0x00, 0x41, 0x78, 0x28, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x14, 0x5c, 0x02, 0x80, 0x00, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x64, 0x20, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x04, 0x01, 0xf7, 0xf7, 0x59, 0xcc, 0x04, 0x07, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x00, 0x0a, 0x59, 0x34, 0x04, 0x12, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x0c, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x02, 0x6c, 0x12, 0x4a, 0x02, 0x62, 0x06, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf7, 0xea, 0x59, 0xcc, 0x02, 0x07, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x19, 0x00, 0x04, 0x00, 0x07, 0xc3, 0x04, 0x01, 0xfc, 0xe8, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf6, 0xc5, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x2f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x15, - 0x59, 0x34, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, - 0x04, 0x02, 0x00, 0x11, 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x50, 0x0f, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x5d, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x0e, 0x4c, 0x58, 0x00, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xc3, 0x5c, 0x00, 0xb0, 0x00, 0x04, 0x01, 0xfc, 0xc1, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x04, 0x01, 0xfc, 0xba, 0x59, 0xcc, 0x34, 0x07, 0x82, 0x18, 0x35, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x1c, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x00, 0x00, 0x16, 0x59, 0xcc, 0x02, 0x07, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x04, 0x02, 0x00, 0x04, 0x82, 0x18, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x12, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x19, 0x00, 0x04, 0x02, 0x00, 0x0c, 0x82, 0x18, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x0c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf6, 0x78, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x59, 0x32, 0x58, 0x08, 0x04, 0x00, 0x00, 0x08, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x39, 0x04, 0x00, 0x07, 0xf6, - 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x02, 0x07, 0xf3, - 0x59, 0x34, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, - 0x04, 0x02, 0x00, 0x07, 0x59, 0xa8, 0x00, 0x23, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x03, 0x50, 0x23, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3e, 0xee, - 0x04, 0x01, 0xf7, 0xe9, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x04, 0x01, 0xf7, 0xdd, 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf8, 0x4d, - 0x04, 0x02, 0x00, 0x0b, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x0a, - 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xc3, 0x5c, 0x00, 0xb0, 0x00, - 0x04, 0x01, 0xfc, 0x5d, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x04, 0x01, 0xfc, 0x5a, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf6, 0x37, - 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf8, 0x2d, 0x04, 0x02, 0x00, 0x0b, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf6, 0x27, 0x49, 0x33, 0xc8, 0x57, 0x04, 0x01, 0xf8, 0x1d, - 0x04, 0x02, 0x00, 0x0b, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf6, 0x17, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0xcc, 0x04, 0x07, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x09, 0x59, 0xcc, 0x02, 0x07, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x2a, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x1e, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x40, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x23, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x03, 0x48, 0x03, 0x50, 0x23, - 0x04, 0x01, 0xf8, 0x59, 0x04, 0x00, 0x00, 0x35, 0x4d, 0x34, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x23, 0x84, 0x00, 0x05, 0x52, - 0x48, 0x03, 0x50, 0x23, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x0a, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1c, 0x85, 0x0e, 0x1d, 0x44, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0x42, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1a, 0xdd, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xf0, - 0x4d, 0x2c, 0x00, 0x00, 0x83, 0x44, 0x05, 0x80, 0x00, 0x00, 0x07, 0xfe, - 0x04, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x0f, - 0x81, 0x46, 0x88, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf9, - 0x5c, 0x02, 0x58, 0x00, 0x59, 0xcc, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x23, 0x84, 0x00, 0x05, 0x12, - 0x48, 0x03, 0x50, 0x23, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x46, 0x4a, 0x02, 0x68, 0x02, - 0x00, 0xff, 0xff, 0xfe, 0x59, 0xa8, 0x08, 0x23, 0x84, 0x04, 0x0d, 0x50, - 0x59, 0xcc, 0x00, 0x13, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x00, 0x03, - 0x8c, 0x00, 0x05, 0x36, 0x04, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x36, 0x04, 0x02, 0x00, 0x02, 0x84, 0x04, 0x0d, 0x10, - 0x48, 0x07, 0x50, 0x23, 0x59, 0xcc, 0x08, 0x00, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x48, 0x07, 0x50, 0x0f, 0x80, 0x04, 0x01, 0x10, - 0x48, 0x03, 0x50, 0x1c, 0x48, 0x03, 0x88, 0x81, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x07, 0x59, 0xcc, 0x00, 0x09, - 0x48, 0x03, 0x50, 0x32, 0x59, 0xcc, 0x00, 0x0a, 0x48, 0x03, 0x50, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x1b, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x02, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4c, 0x58, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x1c, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x23, 0x59, 0xcc, 0x10, 0x00, 0x82, 0x08, 0x15, 0x00, - 0x00, 0xff, 0xff, 0x00, 0x80, 0x08, 0x11, 0x10, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x09, - 0x04, 0x01, 0xf0, 0x16, 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x01, 0xf8, 0x30, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0a, 0x04, 0x01, 0xf0, 0x0b, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x01, 0xf8, 0x25, 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xcc, 0x02, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x16, - 0x59, 0xcc, 0x04, 0x07, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x02, 0x07, 0x8c, 0x00, 0x05, 0x1a, - 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xcc, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x03, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, - 0x48, 0x5b, 0xc8, 0x57, 0x50, 0x08, 0x08, 0x00, 0x50, 0x0c, 0x00, 0x00, - 0x80, 0x04, 0x25, 0x80, 0x04, 0x02, 0x00, 0x07, 0x80, 0x08, 0x10, 0x00, - 0x80, 0x0c, 0x18, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xf9, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, - 0x80, 0x04, 0x04, 0x80, 0x04, 0x00, 0x10, 0x06, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xfc, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x53, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x4b, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x7d, 0x71, 0x00, 0x10, 0x7d, 0x71, 0x00, 0x10, 0x7d, 0x71, - 0x00, 0x10, 0x7d, 0x71, 0x00, 0x10, 0x7d, 0x6f, 0x00, 0x10, 0x7d, 0x6f, - 0x00, 0x10, 0x7d, 0x6f, 0x00, 0x10, 0x7d, 0x71, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x3b, 0xc8, 0x57, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x0d, 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, 0x04, 0x02, 0x00, 0x08, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x50, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x27, 0x04, 0x02, 0x00, 0x30, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x49, 0x2f, 0xc8, 0x57, 0x04, 0x00, 0x00, 0x0d, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x30, 0x0c, 0x02, 0x48, 0x06, 0x5c, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x29, 0x49, 0x7a, 0x58, 0x09, - 0x59, 0x2c, 0x0c, 0x08, 0x84, 0x04, 0x0d, 0x50, 0x48, 0x06, 0x5c, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x0d, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x53, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x0c, 0x01, 0xf0, 0x0e, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x53, - 0x04, 0x00, 0x00, 0x0a, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x50, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x7d, 0xe7, - 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, - 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, - 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xe5, - 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xfe, 0x00, 0x10, 0x7d, 0xfe, - 0x00, 0x10, 0x7d, 0xfe, 0x00, 0x10, 0x7d, 0xfe, 0x00, 0x10, 0x7d, 0xe5, - 0x00, 0x10, 0x7d, 0xfe, 0x00, 0x10, 0x7d, 0xe5, 0x00, 0x10, 0x7d, 0xfe, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x06, 0x49, 0x7a, 0x58, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x42, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x1c, - 0x80, 0x00, 0x01, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x2a, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x0c, 0x08, 0x59, 0xcc, 0x28, 0x08, - 0x82, 0x14, 0x1d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x02, - 0x59, 0xcc, 0x18, 0x09, 0x84, 0x04, 0x0d, 0x58, 0x48, 0x06, 0x5c, 0x08, - 0x82, 0x14, 0x35, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x04, 0x02, 0x00, 0x28, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x82, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x08, 0x69, 0x04, 0x02, 0x00, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x59, 0x30, 0x08, 0x11, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x09, 0x54, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x48, 0x06, 0x58, 0x07, 0x48, 0x0e, 0x58, 0x0a, - 0x90, 0x14, 0x09, 0xc0, 0x48, 0x06, 0x58, 0x09, 0x59, 0x30, 0x0c, 0x02, - 0x48, 0x06, 0x5c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, 0x59, 0xcc, 0x00, 0x08, - 0x8c, 0x00, 0x05, 0x18, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x89, 0xf0, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x04, 0x00, 0x07, 0xd5, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x83, 0xe0, 0x5c, 0x02, 0x78, 0x00, 0x04, 0x01, 0xf7, 0xce, - 0x48, 0x17, 0xc8, 0x57, 0x48, 0x0f, 0xc8, 0x57, 0x82, 0x18, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x0e, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x00, 0x08, 0x59, 0x2c, 0x04, 0x07, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8f, 0x93, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8f, 0xdb, - 0x82, 0x18, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x33, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x41, 0x78, 0x20, 0x00, - 0x8c, 0x18, 0x35, 0x10, 0x04, 0x00, 0x00, 0x07, 0x59, 0xcc, 0x00, 0x0c, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x02, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xcc, 0x20, 0x0b, 0x48, 0x12, 0x58, 0x0c, - 0x41, 0x78, 0x00, 0x00, 0x8c, 0x18, 0x35, 0x12, 0x04, 0x00, 0x00, 0x02, - 0x59, 0xcc, 0x00, 0x0a, 0x48, 0x02, 0x58, 0x0b, 0x80, 0x10, 0x0c, 0x00, - 0x04, 0x00, 0x07, 0xb7, 0x82, 0x04, 0x14, 0x80, 0x00, 0x00, 0x00, 0x1d, - 0x04, 0x00, 0x10, 0x06, 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x0e, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0x9c, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x04, 0x01, 0xf7, 0xa4, 0x59, 0x30, 0x00, 0x11, - 0x59, 0x30, 0x14, 0x02, 0x48, 0x0a, 0x5c, 0x06, 0x48, 0x02, 0x58, 0x07, - 0x48, 0x0e, 0x58, 0x0a, 0x90, 0x14, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0x45, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x83, 0x81, 0x04, 0x01, 0xf7, 0xa5, 0x59, 0x2c, 0x02, 0x0a, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0xcc, 0x59, 0x2c, 0x02, 0x08, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x07, 0xc9, 0x59, 0x30, 0x00, 0x11, - 0x80, 0x0c, 0x0d, 0x80, 0x04, 0x00, 0x07, 0xc6, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x0f, 0xc8, 0x57, 0x8c, 0x18, 0x35, 0x14, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x8a, 0x2e, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x07, 0xbf, - 0x48, 0x07, 0xc8, 0x56, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8a, 0x2e, - 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0x80, - 0x59, 0x30, 0x00, 0x11, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x07, 0x7d, - 0x59, 0x2c, 0x02, 0x08, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x07, 0x7a, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8a, 0x2e, 0x59, 0xcc, 0x20, 0x06, - 0x59, 0xcc, 0x28, 0x07, 0x04, 0x01, 0xf0, 0x38, 0x04, 0x01, 0xf0, 0x37, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x00, 0x1c, - 0x80, 0x00, 0x01, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x0c, 0x08, 0x41, 0x78, 0x28, 0x00, - 0x41, 0x78, 0x18, 0x00, 0x84, 0x04, 0x0d, 0x58, 0x48, 0x06, 0x5c, 0x08, - 0x41, 0x78, 0x30, 0x00, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x1b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x08, 0x69, - 0x04, 0x02, 0x00, 0x07, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x59, 0x30, 0x08, 0x11, 0x48, 0x07, 0xc8, 0x57, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x08, 0xb3, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x48, 0x06, 0x58, 0x07, 0x48, 0x0e, 0x58, 0x0a, 0x90, 0x14, 0x09, 0xc0, - 0x48, 0x06, 0x58, 0x09, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x0c, 0x02, - 0x48, 0x06, 0x5c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0xdb, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0xe7, - 0x59, 0x30, 0x00, 0x11, 0x48, 0x03, 0xc8, 0x57, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x07, 0xe3, 0x59, 0x2c, 0x02, 0x08, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x07, 0xe0, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8a, 0x2e, - 0x59, 0x30, 0x00, 0x1c, 0x80, 0x00, 0x01, 0xc0, 0x4c, 0x10, 0x00, 0x00, - 0x4c, 0x14, 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, - 0x5c, 0x00, 0x28, 0x00, 0x5c, 0x00, 0x20, 0x00, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x43, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x02, 0x00, 0x1c, 0x40, 0x10, 0x00, 0x00, 0x59, 0x2c, 0x08, 0x0f, - 0x80, 0x04, 0x0c, 0x80, 0x40, 0x14, 0x00, 0x00, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x18, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, - 0x04, 0x02, 0x00, 0x0a, 0x48, 0x12, 0x60, 0x13, 0x48, 0x16, 0x60, 0x11, - 0x49, 0x7a, 0x62, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0e, 0xda, - 0x04, 0x02, 0x00, 0x0d, 0x59, 0x30, 0x08, 0x04, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x4c, 0x10, 0x00, 0x00, 0x4c, 0x14, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, 0x5c, 0x00, 0x28, 0x00, - 0x5c, 0x00, 0x20, 0x00, 0x04, 0x00, 0x07, 0xf1, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x72, 0x0c, 0x49, 0x33, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x40, 0x04, 0x28, 0x00, 0x04, 0x01, 0xf7, 0xe7, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x58, 0x04, 0x02, 0x10, 0x05, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x10, 0x02, - 0x0c, 0x01, 0xf0, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x33, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x40, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x6e, 0x00, 0x10, 0x7f, 0x31, - 0x00, 0x10, 0x7f, 0x31, 0x00, 0x10, 0x7f, 0x31, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0x06, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x62, 0x05, 0x59, 0x30, 0x00, 0x11, - 0x59, 0x30, 0x08, 0x15, 0x80, 0x04, 0x0c, 0x80, 0x48, 0x06, 0x60, 0x15, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0xa4, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa4, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x10, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x29, 0x49, 0x7a, 0x58, 0x09, 0x59, 0x2c, 0x0c, 0x08, - 0x84, 0x04, 0x0d, 0x50, 0x48, 0x06, 0x5c, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x41, 0x78, 0x28, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x08, 0x08, 0x49, 0x78, 0x08, 0x09, - 0x49, 0x78, 0x08, 0x0a, 0x58, 0x04, 0x14, 0x08, 0x84, 0x08, 0x15, 0x58, - 0x48, 0x08, 0x0c, 0x08, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x8c, 0x04, 0x0d, 0x3e, 0x04, 0x02, 0x00, 0x24, 0x49, 0x7a, 0x5a, 0x06, - 0x59, 0x30, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x18, - 0x49, 0x7a, 0x5a, 0x06, 0x4c, 0x04, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, 0x4c, 0x14, 0x00, 0x00, - 0x40, 0x00, 0x28, 0x00, 0x58, 0x14, 0x10, 0x03, 0x40, 0x04, 0x00, 0x00, - 0x80, 0x08, 0x14, 0x80, 0x48, 0x08, 0x28, 0x03, 0x40, 0x14, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0c, 0x91, 0x5c, 0x00, 0x28, 0x00, - 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x59, 0x2c, 0x02, 0x06, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x05, 0x59, 0x2c, 0x04, 0x08, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x02, 0x59, 0x2c, 0x08, 0x03, - 0x48, 0x07, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x15, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x11, - 0x59, 0x30, 0x00, 0x1f, 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0c, 0x91, 0x5c, 0x00, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xf5, - 0x48, 0x07, 0xc8, 0x56, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x58, - 0x04, 0x02, 0x10, 0x07, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x10, 0x04, 0x4d, 0x2c, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x03, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcf, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x80, 0x54, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x7f, 0xcd, - 0x00, 0x10, 0x81, 0x0c, 0x00, 0x10, 0x81, 0x35, 0x00, 0x10, 0x81, 0x14, - 0x00, 0x10, 0x7f, 0xcd, 0x00, 0x10, 0x81, 0x41, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x1c, 0x80, 0x00, 0x01, 0xc0, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, 0x59, 0x30, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x7e, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x70, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x09, - 0x84, 0x00, 0x05, 0x00, 0x48, 0x02, 0x60, 0x07, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x3c, 0x08, 0x84, 0x1c, 0x3d, 0x58, 0x48, 0x1e, 0x5c, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x08, 0x1b, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x3c, 0x08, 0x84, 0x1c, 0x3d, 0x58, 0x59, 0x30, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x07, 0xf3, 0x48, 0x1e, 0x5c, 0x08, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xfe, 0x59, 0x30, 0x00, 0x07, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x07, 0xea, 0x59, 0xcc, 0x08, 0x08, - 0x59, 0x2c, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x00, 0x0c, - 0x49, 0x7a, 0x58, 0x0b, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x04, 0x00, 0x00, 0x08, 0x59, 0x2c, 0x04, 0x07, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8f, 0x93, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x0d, 0x98, 0x90, 0x04, 0x21, 0xc0, - 0x48, 0x12, 0x58, 0x09, 0x41, 0x78, 0x20, 0x00, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x20, 0x09, - 0x82, 0x04, 0x35, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x04, 0x02, 0x00, 0x27, - 0x48, 0x1e, 0x5c, 0x08, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x18, 0x31, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x98, - 0x41, 0x78, 0x20, 0x00, 0x8c, 0x18, 0x35, 0x10, 0x04, 0x00, 0x00, 0x02, - 0x59, 0xcc, 0x20, 0x0b, 0x48, 0x12, 0x58, 0x0c, 0x41, 0x78, 0x00, 0x00, - 0x8c, 0x18, 0x35, 0x12, 0x04, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x00, 0x0a, - 0x48, 0x02, 0x58, 0x0b, 0x80, 0x10, 0x0c, 0x00, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x98, - 0x82, 0x04, 0x14, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x04, 0x02, 0x10, 0x0c, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x01, 0xfb, 0x71, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x0d, 0x98, 0x04, 0x01, 0xfb, 0x15, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x0d, 0x98, 0x41, 0x2c, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x2c, 0x78, 0x09, 0x84, 0x1c, 0x3d, 0x52, - 0x48, 0x1c, 0x7c, 0x08, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x48, 0x12, 0x58, 0x0a, 0x90, 0x04, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x09, - 0x58, 0x3c, 0x04, 0x04, 0x58, 0x3c, 0x10, 0x05, 0x58, 0x3c, 0x22, 0x08, - 0x48, 0x02, 0x5c, 0x04, 0x48, 0x0a, 0x58, 0x05, 0x48, 0x12, 0x5a, 0x08, - 0x04, 0x01, 0xf7, 0xc7, 0x8c, 0x00, 0x05, 0x24, 0x04, 0x00, 0x07, 0x92, - 0x59, 0x32, 0x58, 0x08, 0x4c, 0x00, 0x00, 0x00, 0x59, 0x2c, 0x04, 0x08, - 0x8c, 0x00, 0x05, 0x1c, 0x5c, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x02, 0x60, 0x11, 0xff, 0xff, 0xff, 0xff, 0x84, 0x00, 0x05, 0x24, - 0x04, 0x01, 0xf7, 0x88, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x36, - 0x48, 0x02, 0x62, 0x05, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x59, 0x2c, 0x24, 0x08, 0x59, 0x30, 0x08, 0x07, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x00, 0x04, 0x8c, 0x10, 0x25, 0x00, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x8f, 0xdb, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x1e, 0x04, 0x00, 0x00, 0x27, - 0x41, 0x78, 0x08, 0x00, 0x49, 0x7a, 0x58, 0x09, 0x59, 0x2c, 0x1c, 0x09, - 0x59, 0x30, 0x00, 0x11, 0x59, 0x34, 0x12, 0x00, 0x49, 0x7a, 0x62, 0x05, - 0x8c, 0x08, 0x15, 0x0e, 0x04, 0x02, 0x00, 0x6e, 0x48, 0x07, 0xc8, 0x57, - 0x48, 0x06, 0x58, 0x0a, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x0f, 0x01, - 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, 0x48, 0x06, 0x58, 0x07, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xef, 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0x18, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x8c, 0x10, 0x25, 0x12, 0x04, 0x02, 0x00, 0x1a, - 0x4c, 0x0c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, 0x5c, 0x00, 0x18, 0x00, - 0x8c, 0x0c, 0x1d, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x89, 0xf0, 0x48, 0x13, 0xc8, 0x57, - 0x8c, 0x10, 0x25, 0x18, 0x04, 0x00, 0x00, 0x4b, 0x41, 0x78, 0x08, 0x00, - 0x59, 0x2c, 0x1c, 0x09, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x10, 0x00, - 0x04, 0x00, 0x07, 0xd6, 0x8c, 0x10, 0x25, 0x12, 0x04, 0x00, 0x07, 0xd4, - 0x59, 0x2c, 0x78, 0x09, 0x58, 0x3c, 0x08, 0x0a, 0x58, 0x3c, 0x1c, 0x09, - 0x04, 0x01, 0xf7, 0xd0, 0x48, 0x07, 0xc8, 0x57, 0x59, 0x2c, 0x78, 0x09, - 0x59, 0x30, 0x04, 0x02, 0x59, 0x2c, 0x14, 0x04, 0x8c, 0x08, 0x15, 0x1e, - 0x04, 0x02, 0x00, 0x0d, 0x59, 0x2c, 0x12, 0x06, 0x48, 0x00, 0x7c, 0x06, - 0x48, 0x04, 0x78, 0x07, 0x48, 0x08, 0x7a, 0x06, 0x84, 0x10, 0x25, 0x12, - 0x48, 0x10, 0x7c, 0x08, 0x4c, 0x0c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x40, 0x3e, 0x58, 0x00, 0x04, 0x01, 0xfa, 0xd3, - 0x04, 0x01, 0xf7, 0xd9, 0x48, 0x02, 0x5c, 0x06, 0x48, 0x06, 0x58, 0x07, - 0x58, 0x3c, 0x08, 0x0c, 0x58, 0x3c, 0x00, 0x0b, 0x80, 0x04, 0x0c, 0x00, - 0x82, 0x04, 0x14, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x04, 0x00, 0x10, 0x06, - 0x58, 0x3c, 0x10, 0x01, 0x48, 0x0a, 0x58, 0x01, 0x49, 0x78, 0x78, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x82, 0x04, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x14, 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x82, 0x3c, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x08, 0x4c, 0x10, 0x00, 0x00, - 0x4c, 0x3c, 0x00, 0x00, 0x04, 0x01, 0xfa, 0xd4, 0x5c, 0x00, 0x78, 0x00, - 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x84, 0x10, 0x25, 0x12, 0x48, 0x12, 0x5c, 0x08, 0x40, 0x3e, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x42, 0x03, 0x40, 0x00, - 0x00, 0x10, 0xac, 0x71, 0x59, 0xa1, 0xd8, 0x1e, 0x80, 0xed, 0xd9, 0xc0, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0xef, 0xc8, 0x57, - 0x58, 0xec, 0x00, 0x09, 0x48, 0x03, 0xc8, 0x57, 0x08, 0x01, 0xf8, 0x00, - 0x04, 0x01, 0xf7, 0xac, 0x49, 0x33, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x14, 0x14, 0x48, 0x0b, 0xc8, 0x57, 0x8c, 0x08, 0x15, 0x1c, - 0x04, 0x02, 0x00, 0x0e, 0x80, 0x00, 0x05, 0x40, 0x48, 0x03, 0xc8, 0x57, - 0x04, 0x00, 0x07, 0x8d, 0x80, 0x04, 0x2c, 0x80, 0x04, 0x02, 0x17, 0x8b, - 0x8c, 0x08, 0x15, 0x14, 0x04, 0x02, 0x00, 0x05, 0x59, 0x2c, 0x08, 0x0f, - 0x48, 0x07, 0xc8, 0x57, 0x80, 0x04, 0x04, 0x80, 0x48, 0x02, 0x60, 0x16, - 0x84, 0x08, 0x15, 0x5c, 0x48, 0x0a, 0x64, 0x14, 0x59, 0x30, 0x10, 0x07, - 0x84, 0x08, 0x15, 0x1e, 0x48, 0x0a, 0x60, 0x07, 0x4c, 0x10, 0x00, 0x00, - 0x4c, 0x3c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, 0x59, 0x2e, 0x82, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xef, 0x49, 0x42, 0x5a, 0x06, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x00, 0x78, 0x00, 0x5c, 0x00, 0x20, 0x00, 0x49, 0x7a, 0x58, 0x09, - 0x8c, 0x10, 0x25, 0x12, 0x04, 0x00, 0x00, 0x06, 0x4d, 0x2c, 0x00, 0x00, - 0x40, 0x3e, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x5c, 0x02, 0x58, 0x00, 0x82, 0x10, 0x25, 0x00, 0xff, 0xff, 0xed, 0xff, - 0x48, 0x12, 0x5c, 0x08, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8a, 0x2e, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x18, - 0x04, 0x00, 0x00, 0x04, 0x41, 0x2d, 0xf8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x0d, 0xb1, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x32, 0x58, 0x08, 0x49, 0x7a, 0x58, 0x09, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x59, 0x30, 0x08, 0x11, 0x48, 0x07, 0xc8, 0x57, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x0a, 0x48, 0x06, 0x58, 0x07, 0x59, 0x30, 0x0c, 0x02, - 0x48, 0x06, 0x5c, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x05, 0x59, 0x30, 0x08, 0x11, 0x04, 0x01, 0xfe, 0x4a, - 0x48, 0x06, 0x58, 0x07, 0x04, 0x01, 0xf7, 0xf2, 0x59, 0x2c, 0x02, 0x08, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x07, 0xfa, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8a, 0x2e, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x1c, - 0x80, 0x00, 0x01, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x90, 0xa2, - 0x59, 0x30, 0x00, 0x07, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x37, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x29, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x0a, - 0x84, 0x00, 0x05, 0x00, 0x48, 0x02, 0x60, 0x07, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x3c, 0x08, 0x48, 0x1f, 0xc8, 0x57, 0x84, 0x1c, 0x3d, 0x58, - 0x48, 0x1e, 0x5c, 0x08, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x08, 0x1b, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x3c, 0x08, 0x84, 0x1c, 0x3d, 0x58, - 0x59, 0x30, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x07, 0xf2, - 0x48, 0x1e, 0x5c, 0x08, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xfe, - 0x59, 0x30, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x07, 0xe9, - 0x59, 0x2c, 0x02, 0x04, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x00, 0x03, - 0x49, 0x7a, 0x58, 0x0b, 0x04, 0x01, 0xf0, 0x02, 0x49, 0x7a, 0x58, 0x09, - 0x48, 0x1e, 0x5c, 0x08, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x0d, 0x98, 0x8c, 0x00, 0x05, 0x24, - 0x04, 0x00, 0x07, 0xd9, 0x59, 0x32, 0x58, 0x08, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x1c, 0x5c, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x60, 0x11, 0xff, 0xff, 0xff, 0xff, - 0x84, 0x00, 0x05, 0x24, 0x04, 0x01, 0xf7, 0xcf, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x41, 0x78, 0x08, 0x00, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x58, 0x04, 0x02, 0x10, 0x0b, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x10, 0x08, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x81, 0x2e, 0x59, 0xc0, 0x0c, 0x02, 0x08, 0x06, - 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x3b, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xac, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaf, 0x00, 0x10, 0x81, 0xaa, - 0x00, 0x10, 0x81, 0xaa, 0x00, 0x10, 0x81, 0xaa, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xcc, 0x08, 0x08, 0x49, 0x7a, 0x58, 0x07, - 0x48, 0x07, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, 0x90, 0x04, 0x01, 0xc0, - 0x48, 0x02, 0x58, 0x09, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x09, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x59, 0xcc, 0x00, 0x09, 0x48, 0x02, 0x58, 0x0a, 0x82, 0x04, 0x25, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x20, 0x0b, - 0x48, 0x12, 0x58, 0x0c, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x04, 0x00, 0x00, 0x02, 0x59, 0xcc, 0x00, 0x0a, 0x48, 0x02, 0x58, 0x0b, - 0x80, 0x10, 0x0c, 0x00, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x82, 0x04, 0x14, 0x80, - 0x00, 0x00, 0x00, 0x1d, 0x04, 0x00, 0x10, 0x06, 0x59, 0x2c, 0x04, 0x04, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x0e, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x1c, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x04, 0x01, 0xf9, 0xc3, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x04, 0x01, 0xf9, 0x67, 0x04, 0x01, 0xf1, 0xa2, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x93, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x81, 0xf8, - 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xff, - 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, - 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, - 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, 0x00, 0x10, 0x81, 0xf6, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0xcc, 0x14, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x55, 0x04, 0x00, 0x00, 0x1b, 0x59, 0x1c, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x17, - 0x59, 0x1c, 0x00, 0x09, 0x81, 0x34, 0x05, 0x80, 0x04, 0x02, 0x00, 0x14, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x1c, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x04, 0x01, 0xf9, 0xc6, 0x5c, 0x02, 0x38, 0x00, 0x5c, 0x02, 0x60, 0x00, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0xcc, 0x00, 0x05, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x00, 0x03, 0x04, 0x01, 0xf9, 0x90, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x02, 0x3a, 0x03, 0x00, 0x00, 0x00, 0x02, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x86, 0x04, 0x01, 0xf0, 0x05, 0x04, 0x01, 0xf9, 0xaa, - 0x04, 0x00, 0x07, 0xf5, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x87, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x0d, - 0x59, 0xcc, 0x14, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, - 0x04, 0x00, 0x00, 0x09, 0x59, 0x1c, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x1a, - 0x04, 0x00, 0x00, 0x06, 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8a, 0x43, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x02, 0x00, 0x0b, 0x59, 0x30, 0x04, 0x03, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x86, 0x04, 0x00, 0x00, 0x12, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x87, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf0, 0x0d, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x27, 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x3b, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x13, 0x04, 0x02, 0x00, 0x06, 0x59, 0x30, 0x04, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x85, - 0x0c, 0x01, 0xf0, 0x4d, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x02, 0x00, 0x41, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x15, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x4d, 0x40, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, - 0x59, 0x36, 0x8c, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x0c, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, - 0x49, 0x7a, 0x58, 0x09, 0x49, 0x42, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x5c, 0x02, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0x42, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, 0x05, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x72, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, 0x59, 0x30, 0x0a, 0x03, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x2a, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x27, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x07, 0xea, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x01, 0xf7, 0xd2, 0x00, 0x10, 0x82, 0xb5, - 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, - 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xbb, - 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, - 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, 0x00, 0x10, 0x82, 0xb3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x34, 0x48, 0x02, 0x62, 0x06, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0xa8, 0x00, 0x34, 0x48, 0x02, 0x62, 0x06, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, 0x08, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x8a, 0x04, 0x00, 0x00, 0x32, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x3b, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x72, 0x0c, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x32, 0x58, 0x08, 0x59, 0x30, 0x0a, 0x1d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, 0x04, 0x01, 0xf0, 0x0c, - 0x59, 0x30, 0x02, 0x1d, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x08, 0x59, 0x30, 0x0c, 0x16, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x39, 0x04, 0x00, 0x00, 0x2c, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x35, 0x04, 0x00, 0x00, 0x29, 0x4c, 0x5c, 0x00, 0x00, - 0x41, 0x30, 0xb8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x10, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x59, 0xcc, 0x0c, 0x07, - 0x48, 0x06, 0x64, 0x19, 0x59, 0xcc, 0x0a, 0x07, 0x48, 0x06, 0x62, 0x19, - 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x40, 0x5e, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x00, 0xb8, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x02, 0x1d, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x42, 0x59, 0x30, 0x0c, 0x16, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x35, 0x04, 0x00, 0x00, 0x07, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x1e, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x39, 0x04, 0x02, 0x00, 0x38, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, - 0x4d, 0x1c, 0x00, 0x00, 0x41, 0x30, 0xb8, 0x00, 0x40, 0x04, 0xc0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0xff, 0x04, 0x02, 0x00, 0x29, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x26, - 0x49, 0x1f, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, 0x82, 0x60, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x35, 0x04, 0x00, 0x00, 0x04, 0x82, 0x60, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x39, 0x04, 0x02, 0x00, 0x02, 0x49, 0x32, 0x38, 0x1c, - 0x48, 0x62, 0x64, 0x03, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x58, 0x5c, 0x08, 0x09, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x60, 0x09, 0x58, 0x5c, 0x0c, 0x15, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x64, 0x15, 0x58, 0x5c, 0x0a, 0x15, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x62, 0x15, 0x58, 0x5c, 0x0a, 0x16, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x62, 0x16, 0x58, 0x5c, 0x0c, 0x19, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x64, 0x19, 0x58, 0x5c, 0x0a, 0x19, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x06, 0x62, 0x19, 0x49, 0x1e, 0x60, 0x1e, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x40, 0x5e, 0x60, 0x00, 0x5c, 0x02, 0x38, 0x00, - 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x59, 0x30, 0x02, 0x1d, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x46, 0xdb, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x41, 0x2c, 0x78, 0x00, - 0x4c, 0x3c, 0x00, 0x00, 0x42, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x01, 0x01, 0x04, 0x00, 0x10, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x04, 0x30, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x0c, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x01, 0xf8, 0x44, 0x82, 0x18, 0x34, 0x80, 0x00, 0x00, 0x00, 0x1c, - 0x59, 0x2e, 0x58, 0x01, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x04, 0x00, 0x00, 0x17, 0x80, 0x14, 0x28, 0x00, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x10, 0x49, 0x7a, 0x5c, 0x04, 0x49, 0x2c, 0x78, 0x01, - 0x82, 0x18, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x3d, 0x04, 0x02, 0x10, 0x06, - 0x40, 0x18, 0x08, 0x00, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf8, 0x2f, 0x04, 0x01, 0xf0, 0x0a, 0x82, 0x18, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x3c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, - 0x41, 0x2c, 0x78, 0x00, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf8, 0x26, 0x04, 0x01, 0xf7, 0xe8, 0x5c, 0x00, 0x78, 0x00, - 0x84, 0x14, 0x29, 0xc0, 0x82, 0x14, 0x2d, 0x40, 0x00, 0x00, 0x00, 0x03, - 0x48, 0x14, 0x7a, 0x04, 0x40, 0x3e, 0x58, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x0f, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x3c, 0x00, 0x00, 0x59, 0x2c, 0x78, 0x01, 0x80, 0x3c, 0x79, 0xc0, - 0x04, 0x00, 0x00, 0x06, 0x49, 0x7a, 0x58, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x40, 0x3e, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xf9, - 0x5c, 0x00, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x04, 0xb1, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x58, 0x00, 0x00, 0x82, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x04, 0xb1, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x1c, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x1a, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x0f, 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x13, 0x59, 0x2c, 0x0a, 0x08, 0x84, 0x04, 0x0d, 0x54, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, 0x5c, 0x02, 0x80, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x42, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x00, 0x05, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x0b, 0x59, 0x1c, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x07, - 0x59, 0x1c, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x85, - 0x04, 0x00, 0x00, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x8b, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x12, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x0a, 0x5c, 0x02, 0x78, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x12, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x83, 0xfe, - 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x84, 0x26, - 0x00, 0x10, 0x83, 0xf9, 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x84, 0x17, - 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x83, 0xf9, 0x00, 0x10, 0x61, 0xee, - 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x83, 0xfb, 0x00, 0x10, 0x83, 0xfb, - 0x00, 0x10, 0x83, 0xf9, 0x00, 0x10, 0x83, 0xf9, 0x00, 0x10, 0x83, 0xf9, - 0x00, 0x10, 0x84, 0xf8, 0x00, 0x10, 0x83, 0xfb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x56, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x8d, 0x3e, 0x7d, 0x02, - 0x04, 0x02, 0x00, 0x16, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x0f, 0x59, 0x32, 0x58, 0x08, 0x41, 0x78, 0x08, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, 0x5c, 0x02, 0x80, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0xeb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xf8, 0x04, 0x02, 0x00, 0x0c, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9a, 0x5d, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x06, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x5c, 0x02, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0xba, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0xad, 0x00, 0x10, 0x84, 0x57, - 0x00, 0x10, 0x84, 0xc1, 0x00, 0x10, 0x84, 0xa8, 0x00, 0x10, 0x84, 0x3e, - 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0x44, - 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0x40, - 0x00, 0x10, 0x84, 0x40, 0x00, 0x10, 0x84, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x04, 0x01, 0xf7, 0xb8, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x07, 0xb4, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x00, 0x07, 0xb0, 0x8d, 0x3e, 0x7d, 0x02, 0x04, 0x02, 0x07, 0xae, - 0x4d, 0x34, 0x00, 0x00, 0x59, 0x32, 0x68, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0xdb, 0x5c, 0x02, 0x68, 0x00, 0x04, 0x01, 0xf7, 0xa8, - 0x59, 0x30, 0x00, 0x04, 0x84, 0x00, 0x05, 0x5c, 0x48, 0x02, 0x60, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x43, - 0x8d, 0x3e, 0x7d, 0x02, 0x04, 0x02, 0x00, 0x41, 0x49, 0x7a, 0x62, 0x1d, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0d, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xfb, 0xd4, 0x04, 0x00, 0x00, 0x24, 0x4d, 0x2c, 0x00, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0xeb, 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x12, - 0x04, 0x00, 0x00, 0x09, 0x4d, 0x2c, 0x00, 0x00, 0x84, 0x00, 0x05, 0x12, - 0x48, 0x02, 0x5c, 0x08, 0x59, 0x2c, 0x08, 0x09, 0x40, 0x06, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x5c, 0x02, 0x58, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x59, 0x2c, 0x0a, 0x08, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, 0x5c, 0x02, 0x80, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x49, 0x7a, 0x60, 0x08, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x4d, 0x34, 0x00, 0x00, 0x59, 0x32, 0x68, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0xdb, 0x5c, 0x02, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x04, 0x01, 0xf0, 0x0b, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x85, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x40, 0x4b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdd, 0x04, 0x01, 0xf7, 0xab, 0x59, 0x8c, 0x00, 0x0d, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0xd5, 0x04, 0x02, 0x00, 0x1d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, 0x04, 0x02, 0x00, 0x06, - 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x07, 0x8a, 0x04, 0x01, 0xf7, 0x9c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0x79, 0x04, 0x00, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf8, 0x14, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xa5, 0x04, 0x02, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcb, 0x83, 0x80, 0xc4, 0x00, 0x40, - 0x04, 0x02, 0x07, 0xf3, 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x07, 0x77, 0x04, 0x01, 0xf7, 0x89, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0x5c, - 0x41, 0x7a, 0x30, 0x00, 0x42, 0x03, 0x20, 0x00, 0x00, 0x00, 0xbf, 0x32, - 0x59, 0x90, 0x00, 0x04, 0x81, 0x30, 0x05, 0x80, 0x04, 0x00, 0x00, 0x09, - 0x83, 0x93, 0x24, 0x00, 0x00, 0x00, 0x00, 0x10, 0x81, 0x1a, 0x30, 0x00, - 0x83, 0x18, 0x04, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x17, 0xf8, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x00, 0x00, 0x10, - 0x8c, 0x00, 0x05, 0x0c, 0x04, 0x02, 0x00, 0x0e, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x02, 0x00, 0x06, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x01, 0xf0, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x59, 0x30, 0x02, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x85, 0x12, 0x00, 0x10, 0x85, 0x2f, 0x00, 0x10, 0x85, 0x16, - 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, - 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, - 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, - 0x00, 0x10, 0x85, 0x10, 0x00, 0x10, 0x85, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x04, 0x01, 0xf6, 0xe6, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x52, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x11, 0x4d, - 0x04, 0x01, 0xfb, 0x1d, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x5c, 0x02, 0x58, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x8c, 0x00, 0x0d, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x1b, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x04, - 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, 0x04, 0x01, 0xf0, 0x1b, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xc4, 0x50, 0x08, 0x10, 0x00, - 0x58, 0x08, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x00, 0x00, 0x0b, 0x58, 0x08, 0x00, 0x0c, 0x81, 0x30, 0x05, 0x80, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf7, 0xce, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0xd5, 0x04, 0x02, 0x00, 0x0d, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, - 0x48, 0x02, 0x60, 0x04, 0x04, 0x01, 0xf7, 0xc5, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, 0x04, 0x00, 0x07, 0xc1, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0xa5, 0x59, 0x30, 0x04, 0x06, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x86, 0x4d, - 0x00, 0x10, 0x87, 0x76, 0x00, 0x10, 0x85, 0x89, 0x00, 0x10, 0x71, 0x9c, - 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x9a, 0x4d, 0x00, 0x02, 0x07, 0xbb, - 0x00, 0x10, 0x86, 0x4d, 0x00, 0x10, 0x61, 0xcb, 0x00, 0x10, 0x87, 0xd6, - 0x00, 0x10, 0x85, 0x78, 0x00, 0x10, 0x85, 0x78, 0x00, 0x10, 0x85, 0x78, - 0x00, 0x10, 0x85, 0x78, 0x00, 0x10, 0x85, 0x78, 0x00, 0x10, 0x8f, 0x3e, - 0x00, 0x10, 0x8f, 0x3e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xfb, 0xef, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4a, 0x02, 0x62, 0x06, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x41, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x41, 0x7a, 0x58, 0x00, 0x04, 0x01, 0xfa, 0xad, 0x04, 0x00, 0x00, 0x07, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x4c, - 0x48, 0x02, 0x5a, 0x08, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x04, 0x01, 0xff, 0x4a, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x86, 0x4c, - 0x00, 0x10, 0x85, 0xb6, 0x00, 0x10, 0x85, 0xc7, 0x00, 0x10, 0x85, 0xee, - 0x00, 0x10, 0x86, 0x1d, 0x00, 0x10, 0x85, 0xb4, 0x00, 0x10, 0x85, 0x7d, - 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0xb4, - 0x00, 0x10, 0x85, 0xb4, 0x00, 0x10, 0x85, 0xb4, 0x00, 0x10, 0x85, 0xb4, - 0x00, 0x10, 0x85, 0xc7, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x8c, 0x00, 0x0d, 0x48, 0x03, 0xc8, 0x57, 0x81, 0x30, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xd5, - 0x04, 0x02, 0x00, 0x41, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcc, 0xce, - 0x80, 0xc4, 0x00, 0x40, 0x04, 0x00, 0x00, 0x44, 0x48, 0x03, 0xc8, 0x56, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x79, 0x04, 0x00, 0x00, 0x39, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x7a, 0x62, 0x1d, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x2c, 0x02, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x03, - 0x59, 0x2c, 0x0a, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x8e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x85, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x02, 0x59, 0x30, 0x08, 0x04, - 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x82, 0x04, 0x0d, 0x40, - 0x80, 0x00, 0x40, 0x4b, 0x48, 0x06, 0x60, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x40, 0x4b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x04, 0x01, 0xfe, 0xe7, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xa5, - 0x04, 0x02, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcb, 0x83, - 0x80, 0xc4, 0x00, 0x40, 0x04, 0x02, 0x07, 0xcb, 0x59, 0x30, 0x0c, 0x03, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf7, 0xcb, 0x59, 0x30, 0x02, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0xa3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x81, 0x2e, 0x59, 0xc0, - 0x04, 0x00, 0x00, 0x13, 0x59, 0x2c, 0x0a, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4a, 0x8e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0d, 0x04, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x4d, 0x34, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xdb, - 0x5c, 0x02, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x04, 0x01, 0xf0, 0x30, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x4f, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdd, - 0x04, 0x01, 0xf7, 0xa2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x0c, 0x48, 0x02, 0x5a, 0x08, - 0x59, 0x2c, 0x04, 0x06, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x08, 0xc4, - 0x80, 0x04, 0x0c, 0x00, 0x48, 0x06, 0x62, 0x06, 0x42, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x41, 0x30, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0a, 0xd5, 0x04, 0x00, 0x00, 0x0d, 0x59, 0x2c, 0x02, 0x08, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x00, 0x06, 0x84, 0x00, 0x05, 0x5c, - 0x48, 0x02, 0x5a, 0x08, 0x4a, 0x02, 0x62, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x0f, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x12, 0x01, 0x5c, 0x02, 0x60, 0x00, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x07, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x3d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x85, 0x86, 0x00, 0x10, 0x86, 0x68, - 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x86, 0x68, 0x00, 0x10, 0x86, 0x68, - 0x00, 0x10, 0x85, 0x7e, 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x85, 0x7a, - 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x86, 0x66, - 0x00, 0x10, 0x86, 0x66, 0x00, 0x10, 0x86, 0x66, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x34, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x34, 0x03, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x06, - 0x82, 0x18, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x57, - 0x0c, 0x01, 0xf8, 0x04, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x86, 0x8f, 0x00, 0x10, 0x87, 0x23, - 0x00, 0x10, 0x86, 0x91, 0x00, 0x10, 0x86, 0xc6, 0x00, 0x10, 0x86, 0x91, - 0x00, 0x10, 0x87, 0x40, 0x00, 0x10, 0x86, 0x91, 0x00, 0x10, 0x86, 0x9b, - 0x00, 0x10, 0x86, 0x8f, 0x00, 0x10, 0x87, 0x40, 0x00, 0x10, 0x86, 0x8f, - 0x00, 0x10, 0x86, 0xaa, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x00, 0x00, 0x2e, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x2b, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x28, 0x04, 0x01, 0xfa, 0xce, 0x04, 0x00, 0x00, 0x26, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x22, - 0x04, 0x00, 0x00, 0xa3, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x39, - 0x04, 0x00, 0x00, 0xa8, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x35, - 0x04, 0x00, 0x00, 0xa5, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x1e, - 0x04, 0x00, 0x00, 0x1b, 0x04, 0x01, 0xf9, 0x93, 0x04, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x4f, 0x04, 0x01, 0xf0, 0x11, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x00, 0x00, 0x0a, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x04, 0x01, 0xf9, 0x77, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x00, 0x00, 0x9a, 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x16, 0x04, 0x00, 0x00, 0x4b, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x29, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xe4, 0x04, 0x02, 0x00, 0x06, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x7e, - 0x04, 0x01, 0xf0, 0x85, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x7e, 0x59, 0x34, 0x04, 0x12, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x04, 0x00, 0x00, 0x10, - 0x80, 0x00, 0x00, 0x40, 0x48, 0x02, 0x6c, 0x12, 0x49, 0x7a, 0x60, 0x08, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x62, 0x06, - 0x00, 0x00, 0x03, 0x98, 0x49, 0x7a, 0x62, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x05, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x20, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x0d, 0x59, 0x34, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x07, 0xfe, 0x04, 0x02, 0x00, 0x09, 0x59, 0xa8, 0x00, 0x23, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x03, 0x50, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3e, 0xfc, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x04, 0x01, 0xf0, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x04, 0x01, 0xf9, 0x1a, - 0x04, 0x02, 0x07, 0x9e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x36, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x90, 0xb2, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x4f, - 0x04, 0x01, 0xf7, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x3c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x74, 0x11, 0x04, 0x02, 0x07, 0xc1, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x0c, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0xff, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x83, 0x6c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x62, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x03, - 0x48, 0x02, 0x64, 0x16, 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x85, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x02, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x4b, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x62, 0x06, 0x00, 0x00, 0x03, 0x98, 0x49, 0x7a, 0x62, 0x05, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x3f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4d, 0x34, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x02, 0x68, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x85, 0x86, - 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x87, 0x93, - 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x87, 0x93, - 0x00, 0x10, 0x87, 0x93, 0x00, 0x10, 0x85, 0x86, 0x00, 0x10, 0x87, 0x95, - 0x00, 0x10, 0x85, 0x86, 0x00, 0x10, 0x87, 0x9d, 0x00, 0x10, 0x87, 0x93, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x8b, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x40, 0x4b, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x59, 0x30, 0x0a, 0x1d, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x41, 0x30, 0x68, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x08, 0x49, 0x36, 0x60, 0x09, 0x4d, 0x30, 0x00, 0x00, - 0x40, 0x36, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x01, 0xf0, 0x02, 0x40, 0x36, 0x60, 0x00, - 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x00, 0x11, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x64, 0x20, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x41, 0x78, 0x28, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x14, - 0x5c, 0x02, 0x80, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x45, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x88, 0x07, 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xf3, - 0x00, 0x10, 0x88, 0x08, 0x00, 0x10, 0x87, 0xf1, 0x00, 0x10, 0x87, 0xef, - 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xef, - 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xef, - 0x00, 0x10, 0x87, 0xef, 0x00, 0x10, 0x87, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdd, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x62, 0x1d, - 0x00, 0x00, 0x00, 0x0a, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x85, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x40, 0x4b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, - 0x04, 0x01, 0xfc, 0xca, 0x04, 0x02, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0xa5, 0x04, 0x02, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcb, 0x83, 0x80, 0xc4, 0x00, 0x40, 0x04, 0x02, 0x00, 0x05, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x04, 0x01, 0xf7, 0xdc, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x79, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x63, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0xb9, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0xa8, 0x00, 0x0d, 0x59, 0xa8, 0x08, 0x64, - 0x80, 0x04, 0x04, 0x00, 0x80, 0x08, 0x04, 0x80, 0x04, 0x02, 0x10, 0x04, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x59, 0x30, 0x08, 0x08, 0x59, 0xa8, 0x00, 0x0b, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x07, 0x59, 0xa8, 0x00, 0x0c, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x04, 0x80, 0x04, 0x09, 0xc0, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x04, 0x09, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0xc8, 0x56, 0x04, 0x01, 0xf7, 0xfa, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf8, 0x31, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xd5, 0x04, 0x00, 0x00, 0x1d, - 0x04, 0x01, 0xf8, 0x21, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0xf7, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcf, 0x9c, 0x5c, 0x02, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd2, 0x8a, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x5c, 0x02, 0x60, 0x00, - 0x8d, 0x3e, 0x7d, 0x3e, 0x04, 0x02, 0x00, 0x0b, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf7, 0xfa, - 0x59, 0x2c, 0x04, 0x07, 0x49, 0x4a, 0x60, 0x17, 0x49, 0x4e, 0x60, 0x18, - 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x08, 0xc4, - 0x80, 0x04, 0x04, 0x00, 0x48, 0x02, 0x62, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x3b, 0xc8, 0x57, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0d, 0x04, 0x01, 0xff, 0xef, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x01, 0xf8, 0x0d, 0x5c, 0x02, 0x80, 0x00, 0x8d, 0x3e, 0x7d, 0x3e, - 0x04, 0x02, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x04, 0x01, 0xf7, 0xfa, 0x48, 0x03, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x36, 0x8c, 0x03, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0x5a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0xa8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcf, 0x9c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd2, 0x8a, - 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x64, 0x63, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0f, 0x48, 0x1a, 0x60, 0x1c, - 0x48, 0xee, 0x60, 0x21, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, 0x4d, 0x38, 0x00, 0x00, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0e, 0x48, 0xee, 0x60, 0x21, - 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x2e, 0x60, 0x08, 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x55, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x70, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x0f, 0x48, 0x1a, 0x60, 0x1c, 0x48, 0xee, 0x60, 0x21, - 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x2e, 0x60, 0x08, 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x3d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x70, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xd5, - 0x04, 0x00, 0x00, 0x14, 0x49, 0x36, 0x60, 0x09, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x03, 0x48, 0xef, 0xc8, 0x57, 0x48, 0xee, 0x60, 0x21, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0f, - 0x48, 0xee, 0x60, 0x21, 0x48, 0x1a, 0x60, 0x1c, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x44, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x0f, - 0x48, 0x1a, 0x60, 0x1c, 0x48, 0xee, 0x60, 0x21, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x09, - 0x80, 0x00, 0x15, 0x40, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x58, 0x08, 0x04, 0x0b, 0x48, 0x03, 0xc8, 0x56, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x10, 0x02, 0x48, 0x00, 0x14, 0x0b, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0c, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x09, 0x59, 0x9c, 0x08, 0x19, - 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4c, 0x00, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x1d, - 0x59, 0x30, 0x00, 0x08, 0x80, 0x02, 0x5d, 0x40, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x19, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xe6, - 0x04, 0x00, 0x00, 0x14, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x45, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x10, 0x82, 0x00, 0x45, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x45, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x0c, 0x82, 0x00, 0x45, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x45, 0x80, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x06, 0x59, 0x2c, 0x04, 0x04, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0xd5, 0x04, 0x00, 0x00, 0x13, 0x49, 0x36, 0x60, 0x09, - 0x48, 0xee, 0x60, 0x21, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x2e, 0x60, 0x08, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x0d, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x74, 0x04, 0x02, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x46, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x29, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x78, 0xc2, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x48, 0x03, 0xc8, 0x56, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x16, - 0x04, 0x02, 0x00, 0x07, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x73, 0xd3, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x02, 0x00, 0x13, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x02, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x43, 0xa7, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x26, - 0x04, 0x02, 0x00, 0x0a, 0x59, 0x34, 0x04, 0x04, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x73, 0xd3, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x2c, 0x02, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x56, 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x4a, - 0x48, 0x02, 0x5a, 0x08, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7a, 0x62, 0x05, - 0x49, 0x7a, 0x60, 0x08, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x50, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x34, 0x00, 0x00, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x00, 0x00, 0x06, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x12, - 0x04, 0x02, 0x10, 0x04, 0x0c, 0x01, 0xf8, 0x06, 0x5c, 0x02, 0x68, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x85, 0x7d, - 0x04, 0x01, 0xf7, 0xfc, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x8a, 0x1c, - 0x00, 0x10, 0x8a, 0x20, 0x00, 0x10, 0x8a, 0x23, 0x00, 0x10, 0x9c, 0x86, - 0x00, 0x10, 0x9c, 0xa3, 0x00, 0x10, 0x9c, 0xa7, 0x00, 0x10, 0x85, 0x7d, - 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, - 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, - 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, 0x00, 0x10, 0x85, 0x7d, - 0x00, 0x10, 0x85, 0x7d, 0x48, 0x03, 0xc8, 0x56, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x1c, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0x30, 0x04, 0x14, 0x49, 0x33, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x05, - 0x48, 0x03, 0xc8, 0x57, 0x84, 0x00, 0x05, 0x40, 0x48, 0x02, 0x64, 0x14, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, - 0x41, 0x30, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xd5, - 0x04, 0x01, 0xf8, 0x10, 0x04, 0x02, 0x00, 0x0e, 0x59, 0x30, 0x0c, 0x14, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x84, 0x04, 0x0d, 0x40, 0x04, 0x01, 0xf0, 0x05, - 0x59, 0xa8, 0x00, 0x34, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x48, 0x02, 0x62, 0x05, 0x84, 0x04, 0x0d, 0x42, 0x48, 0x06, 0x64, 0x14, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x34, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x1c, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x33, 0x59, 0x30, 0x04, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x03, 0x8d, 0x0e, 0x1d, 0x0e, 0x04, 0x02, 0x00, 0x2a, - 0x4d, 0x1c, 0x00, 0x00, 0x41, 0x32, 0x38, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x23, 0x49, 0x32, 0x38, 0x1c, - 0x59, 0x1c, 0x04, 0x14, 0x84, 0x00, 0x05, 0x42, 0x48, 0x02, 0x3c, 0x14, - 0x49, 0x36, 0x60, 0x09, 0x59, 0x1c, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x06, 0x59, 0x1c, 0x02, 0x02, - 0x48, 0x02, 0x64, 0x19, 0x59, 0x1c, 0x04, 0x02, 0x48, 0x02, 0x62, 0x19, - 0x04, 0x01, 0xf0, 0x05, 0x59, 0x1c, 0x02, 0x02, 0x48, 0x02, 0x62, 0x19, - 0x59, 0x1c, 0x04, 0x02, 0x48, 0x02, 0x64, 0x19, 0x49, 0x1e, 0x60, 0x1e, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x35, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x41, 0x1e, 0x60, 0x00, 0x5c, 0x02, 0x38, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x5c, 0x02, 0x38, 0x00, 0x59, 0xa8, 0x00, 0x36, - 0x48, 0x02, 0x62, 0x05, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xf8, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x49, 0x32, 0x38, 0x1c, 0x4a, 0x02, 0x62, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x59, 0x1e, 0x58, 0x08, 0x59, 0x1c, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x05, 0x84, 0x00, 0x05, 0x1e, 0x48, 0x02, 0x38, 0x07, - 0x49, 0x7a, 0x58, 0x09, 0x04, 0x01, 0xf0, 0x18, 0x59, 0x2c, 0x04, 0x08, - 0x8c, 0x00, 0x05, 0x18, 0x04, 0x00, 0x00, 0x15, 0x84, 0x00, 0x05, 0x18, - 0x48, 0x02, 0x5c, 0x08, 0x4d, 0x40, 0x00, 0x00, 0x59, 0x2e, 0x82, 0x06, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xfb, 0x57, - 0x49, 0x42, 0x5a, 0x06, 0x5c, 0x02, 0x80, 0x00, 0x49, 0x7a, 0x58, 0x09, - 0x59, 0x2c, 0x04, 0x08, 0x8c, 0x00, 0x05, 0x12, 0x04, 0x00, 0x00, 0x08, - 0x4d, 0x2c, 0x00, 0x00, 0x84, 0x00, 0x05, 0x12, 0x48, 0x02, 0x5c, 0x08, - 0x59, 0x2e, 0x58, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x5c, 0x02, 0x58, 0x00, 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x62, 0x05, - 0x59, 0x1c, 0x02, 0x14, 0x48, 0x02, 0x62, 0x16, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x08, 0x4a, 0x02, 0x3a, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x08, 0x49, 0x7a, 0x60, 0x15, 0x04, 0x01, 0xf0, 0x1e, - 0x59, 0x1c, 0x00, 0x07, 0x84, 0x00, 0x05, 0x40, 0x48, 0x02, 0x38, 0x07, - 0x4a, 0x02, 0x3a, 0x03, 0x00, 0x00, 0x00, 0x04, 0x59, 0x1c, 0x04, 0x14, - 0x48, 0x03, 0xc8, 0x57, 0x84, 0x00, 0x05, 0x1c, 0x84, 0x00, 0x05, 0x54, - 0x48, 0x02, 0x3c, 0x14, 0x59, 0x2c, 0x00, 0x0f, 0x40, 0x00, 0x10, 0x00, - 0x59, 0x1c, 0x08, 0x16, 0x80, 0x04, 0x04, 0x80, 0x04, 0x02, 0x17, 0xf0, - 0x59, 0x1c, 0x00, 0x16, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xff, 0xfc, - 0x48, 0x02, 0x60, 0x15, 0x48, 0x02, 0x38, 0x16, 0x59, 0x1c, 0x0a, 0x14, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x02, 0x00, 0x05, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x4a, 0x02, 0x38, 0x12, 0xff, 0xff, 0xff, 0xff, 0x59, 0x1c, 0x04, 0x02, - 0x48, 0x02, 0x64, 0x19, 0x59, 0x1c, 0x02, 0x02, 0x48, 0x02, 0x62, 0x19, - 0x59, 0x1e, 0x68, 0x09, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x39, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x14, 0x04, 0x00, 0x00, 0x15, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x00, 0x12, 0x59, 0x30, 0x00, 0x16, - 0x80, 0x10, 0x04, 0x80, 0x04, 0x00, 0x10, 0x06, 0x04, 0x00, 0x00, 0x05, - 0x59, 0x30, 0x04, 0x14, 0x84, 0x00, 0x05, 0x14, 0x84, 0x00, 0x05, 0x5c, - 0x04, 0x01, 0xf0, 0x09, 0x48, 0x12, 0x60, 0x16, 0x48, 0x12, 0x60, 0x12, - 0x40, 0x10, 0x00, 0x00, 0x59, 0x2c, 0x18, 0x0f, 0x80, 0x0c, 0x04, 0x80, - 0x48, 0x02, 0x60, 0x11, 0x59, 0x30, 0x04, 0x14, 0x84, 0x00, 0x05, 0x14, - 0x48, 0x02, 0x64, 0x14, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x00, 0x06, 0x59, 0x30, 0x00, 0x12, - 0x48, 0x02, 0x60, 0x16, 0x59, 0x30, 0x04, 0x14, 0x84, 0x00, 0x05, 0x5c, - 0x48, 0x02, 0x64, 0x14, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x0c, 0x03, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x34, 0x04, 0x00, 0x10, 0x06, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x3c, 0x04, 0x02, 0x10, 0x03, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xfd, 0x41, 0x78, 0x08, 0x00, 0x59, 0xa8, 0x10, 0x32, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xb7, 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x0b, 0x50, 0x34, - 0x59, 0xa8, 0x10, 0x33, 0x48, 0x0b, 0x50, 0x2a, 0x41, 0x78, 0x08, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0xb7, 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x0b, 0x50, 0x35, - 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x48, 0x0b, 0x50, 0x36, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x99, 0x42, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x40, 0x08, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xa9, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x59, 0xa8, 0x10, 0x0f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x46, 0x2e, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x50, 0x34, - 0x00, 0x00, 0x00, 0x28, 0x4a, 0x03, 0x50, 0x35, 0x00, 0x00, 0x00, 0x14, - 0x4a, 0x03, 0x50, 0x2a, 0x00, 0x00, 0x07, 0xd0, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x48, 0x0b, 0x50, 0x36, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x99, - 0x42, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x40, 0x08, 0x08, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xa9, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x59, 0xa8, 0x10, 0x0f, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x64, 0x99, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x3e, 0x04, 0x02, 0x00, 0x05, 0x59, 0x32, 0x58, 0x17, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x11, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x25, - 0x59, 0xa8, 0xb0, 0x15, 0x82, 0x58, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x19, - 0x04, 0x00, 0x10, 0x03, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x80, 0x58, 0xb1, 0x04, 0x04, 0x01, 0xfa, 0x0f, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xfa, 0x1f, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x4c, 0x60, 0x00, 0x00, 0x42, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x59, 0x2c, 0x10, 0x0a, 0x8c, 0x08, 0x15, 0x18, - 0x04, 0x02, 0x00, 0x06, 0x59, 0xa8, 0x00, 0x0f, 0x59, 0x2c, 0x10, 0x0d, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x07, 0x41, 0x78, 0xc0, 0x00, - 0x59, 0x30, 0x10, 0x09, 0x58, 0x08, 0x14, 0x03, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, 0x5c, 0x00, 0xc0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x73, 0xd3, 0x04, 0x01, 0xf0, 0x08, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xfa, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x56, - 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x4d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x42, 0x01, 0x88, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, - 0x4d, 0x2c, 0x00, 0x00, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x02, 0x00, 0x27, 0x59, 0xa8, 0x08, 0x15, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x30, 0x04, 0x0b, 0x80, 0x00, 0x00, 0xc4, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x21, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x40, 0x50, 0xa8, 0x00, 0x59, 0x30, 0xb4, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x41, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x59, 0x2c, 0xb2, 0x05, 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, 0x59, 0x2e, 0x58, 0x01, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x02, 0x07, 0xf9, 0x59, 0x31, 0xd8, 0x21, - 0x58, 0xef, 0x40, 0x0b, 0x58, 0xee, 0x58, 0x0d, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x58, 0xec, 0x00, 0x09, 0x08, 0x01, 0xf8, 0x00, - 0x59, 0x30, 0x04, 0x02, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x35, 0x04, 0x00, 0x00, 0x05, 0x59, 0x30, 0x14, 0x19, - 0x04, 0x01, 0xf8, 0x51, 0x04, 0x00, 0x00, 0x27, 0x04, 0x01, 0xf0, 0x06, - 0x4d, 0x30, 0x00, 0x00, 0x59, 0x32, 0x60, 0x1e, 0x04, 0x01, 0xf8, 0x57, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x00, 0x00, 0x20, 0x59, 0x1c, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x04, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x02, 0x00, 0x1c, - 0x59, 0x1c, 0x0c, 0x02, 0x59, 0x30, 0x04, 0x19, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x09, 0x59, 0x30, 0x02, 0x19, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x15, 0x59, 0x1c, 0x0a, 0x02, 0x59, 0x30, 0x04, 0x19, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x11, 0x04, 0x01, 0xf0, 0x09, - 0x59, 0x30, 0x0a, 0x19, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x05, 0x59, 0x1c, 0x02, 0x02, 0x59, 0x30, 0x0a, 0x19, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x08, 0x59, 0x1c, 0x00, 0x09, - 0x59, 0x30, 0x08, 0x09, 0x80, 0x04, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0x7a, 0x38, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x59, 0xb8, 0x00, 0xe4, - 0x8c, 0x00, 0x05, 0x38, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x2c, 0x4a, 0x03, 0x70, 0xe4, - 0x20, 0x00, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe4, 0x80, 0x04, 0x08, 0x40, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x8c, 0x00, 0x05, 0x3c, - 0x04, 0x02, 0x07, 0xf9, 0x4a, 0x03, 0x70, 0xe4, 0x30, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x59, 0xb8, 0x00, 0xe4, 0x8c, 0x00, 0x05, 0x3c, 0x04, 0x02, 0x07, 0xf1, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x03, 0x70, 0xe4, - 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0xb8, 0x00, 0xe4, - 0x8c, 0x00, 0x05, 0x38, 0x04, 0x02, 0x07, 0xfb, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x08, 0x07, 0x8c, 0x04, 0x0d, 0x1e, 0x59, 0x2c, 0x0c, 0x08, - 0x04, 0x02, 0x00, 0x02, 0x8c, 0x04, 0x0d, 0x18, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x29, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x24, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x62, 0x98, 0x82, 0x06, 0x3c, 0x00, 0x00, 0x10, 0xd8, 0xd4, - 0x49, 0x1f, 0xc8, 0x57, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x30, 0x04, 0x80, - 0x00, 0x10, 0xd8, 0xd4, 0x04, 0x00, 0x10, 0x0a, 0x59, 0xa8, 0x00, 0x0a, - 0x81, 0x30, 0x04, 0x80, 0x04, 0x02, 0x10, 0x07, 0x59, 0x30, 0x14, 0x02, - 0x04, 0x01, 0xff, 0xee, 0x04, 0x00, 0x00, 0x07, 0x41, 0x1c, 0x00, 0x00, - 0x81, 0x30, 0x05, 0x80, 0x04, 0x00, 0x00, 0x03, 0x81, 0x78, 0x05, 0x00, - 0x04, 0x01, 0xf0, 0x02, 0x81, 0x30, 0x05, 0x40, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x47, 0xc8, 0x57, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x0a, 0x42, 0x02, 0x60, 0x00, - 0x00, 0x10, 0xb5, 0xb8, 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfc, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x4d, 0x44, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x32, 0x68, 0x09, 0x49, 0x42, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x52, 0xd5, 0x59, 0x2e, 0x8c, 0x06, 0x59, 0x2c, 0x42, 0x07, - 0x82, 0x20, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x01, 0xf8, 0x06, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x02, 0x68, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x8c, 0xac, - 0x00, 0x10, 0x8c, 0xce, 0x00, 0x10, 0x8c, 0xd5, 0x00, 0x10, 0x8c, 0xd9, - 0x00, 0x10, 0x8c, 0xe2, 0x00, 0x10, 0x8c, 0xa9, 0x00, 0x10, 0x8c, 0xa9, - 0x00, 0x10, 0x8c, 0xa9, 0x00, 0x10, 0x8c, 0xe6, 0x00, 0x10, 0x8c, 0xf2, - 0x00, 0x10, 0x8c, 0xf2, 0x00, 0x10, 0x8c, 0xa9, 0x00, 0x10, 0x8c, 0xa9, - 0x00, 0x10, 0x8c, 0xa9, 0x00, 0x10, 0x8c, 0xa9, 0x00, 0x10, 0x8c, 0xa9, - 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x81, 0x42, 0x81, 0xc0, 0x04, 0x02, 0x00, 0x12, 0x41, 0x78, 0x58, 0x00, - 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x02, 0x00, 0x02, - 0x59, 0x34, 0x5c, 0x05, 0x44, 0x2c, 0x28, 0x00, 0x59, 0x34, 0x00, 0x08, - 0x48, 0x00, 0x28, 0x02, 0x59, 0x34, 0x00, 0x09, 0x48, 0x00, 0x28, 0x01, - 0x59, 0x34, 0x00, 0x06, 0x48, 0x00, 0x28, 0x04, 0x59, 0x34, 0x00, 0x07, - 0x48, 0x00, 0x28, 0x03, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x01, 0xf0, 0x37, 0x59, 0x2c, 0x02, 0x07, 0x8c, 0x00, 0x05, 0x1e, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x32, - 0x82, 0x04, 0xb5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2f, - 0x44, 0x04, 0x28, 0x00, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x04, 0x00, - 0x48, 0x00, 0x28, 0x01, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x28, 0x81, 0x42, 0x81, 0xc0, 0x04, 0x02, 0x00, 0x30, - 0x59, 0x34, 0x5c, 0x05, 0x44, 0x2c, 0x28, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x21, 0x83, 0x40, 0xb5, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1e, 0x04, 0x01, 0xf0, 0x27, - 0x81, 0x42, 0x81, 0xc0, 0x04, 0x02, 0x00, 0x25, 0x59, 0x34, 0x02, 0x00, - 0x44, 0x00, 0x28, 0x00, 0x59, 0x34, 0x00, 0x01, 0x48, 0x00, 0x28, 0x01, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x14, - 0x83, 0x40, 0xb5, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x1b, - 0x04, 0x01, 0xf0, 0x10, 0x83, 0x40, 0xb5, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x5d, - 0x04, 0x00, 0x00, 0x14, 0x8c, 0x20, 0x45, 0x0e, 0x04, 0x00, 0x00, 0x02, - 0x49, 0x7a, 0x60, 0x09, 0x41, 0x78, 0xb0, 0x00, 0x49, 0x7a, 0x5a, 0x06, - 0x04, 0x01, 0xf0, 0x04, 0x83, 0x40, 0xb5, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x0b, 0x59, 0x2c, 0x04, 0x04, 0x84, 0x00, 0x05, 0x1c, - 0x48, 0x02, 0x5c, 0x04, 0x59, 0x2c, 0x02, 0x07, 0x84, 0x00, 0x05, 0x1e, - 0x48, 0x02, 0x5a, 0x07, 0x04, 0x01, 0xf8, 0xaa, 0x49, 0x7a, 0x60, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x2c, 0x02, 0x07, - 0x8c, 0x00, 0x05, 0x1e, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x07, 0xf2, 0x82, 0x04, 0xb5, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x07, 0xef, 0x44, 0x04, 0x28, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xeb, 0x49, 0x37, 0xc8, 0x57, - 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x11, 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x02, 0x00, 0x25, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x21, 0x59, 0xa8, 0x00, 0x0f, - 0x59, 0x2c, 0x10, 0x09, 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x10, - 0x4d, 0x44, 0x00, 0x00, 0x59, 0x2e, 0x8c, 0x06, 0x59, 0x2c, 0x02, 0x07, - 0x48, 0x03, 0xc8, 0x56, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x84, 0x00, 0x05, 0x48, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0xe4, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x02, 0x88, 0x00, 0x04, 0x01, 0xf0, 0x04, - 0x48, 0x03, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x5d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x00, 0x00, 0x17, - 0x4d, 0x40, 0x00, 0x00, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x78, 0x08, 0x00, 0x04, 0x01, 0xff, 0x38, 0x5c, 0x02, 0x80, 0x00, - 0x04, 0x01, 0xf0, 0x0e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x5d, - 0x04, 0x02, 0x07, 0xf4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x04, 0x00, 0x00, 0x0a, 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x6e, 0x5c, 0x00, 0xb0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xc2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x37, 0xc8, 0x57, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x12, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x4d, 0x3c, 0x00, 0x00, - 0x4d, 0x38, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x5d, 0x49, 0x2e, 0x60, 0x08, 0x42, 0x02, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, - 0x5c, 0x02, 0x70, 0x00, 0x5c, 0x02, 0x78, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x37, 0xc8, 0x57, 0x4d, 0x30, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0xd5, 0x04, 0x00, 0x00, 0x0d, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, 0x49, 0x2e, 0x60, 0x08, - 0x4d, 0x38, 0x00, 0x00, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x51, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x5c, 0x02, 0x70, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x60, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x02, 0x00, 0x11, 0x59, 0x2c, 0x00, 0x08, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x04, 0x02, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x52, 0xd5, 0x59, 0xcc, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x44, 0x00, 0x28, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf8, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x73, 0xd3, 0x04, 0x01, 0xf0, 0x06, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf8, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x78, 0xc2, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x80, 0x58, 0xb1, 0xc0, 0x04, 0x00, 0x00, 0x0b, 0x82, 0x58, 0x05, 0x00, - 0xff, 0xff, 0xff, 0xf0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x80, 0x58, 0xb0, 0xd0, 0x59, 0x2c, 0x04, 0x08, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xff, 0xf0, 0xff, 0x80, 0x58, 0x05, 0x40, 0x48, 0x02, 0x5c, 0x08, - 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x2f, 0xc8, 0x57, 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, - 0x80, 0x00, 0x00, 0xd8, 0x59, 0x2c, 0x0c, 0x08, 0x82, 0x04, 0x0d, 0x00, - 0xff, 0xff, 0x0f, 0xff, 0x80, 0x04, 0x05, 0x40, 0x48, 0x02, 0x5c, 0x08, - 0x5c, 0x00, 0x08, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x02, 0x07, 0x84, 0x00, 0x05, 0x5e, 0x48, 0x02, 0x5a, 0x07, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x04, 0x01, 0xff, 0xd9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x52, 0xd5, - 0x46, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x14, 0x28, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x40, 0x14, 0xa8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa3, 0x30, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x02, 0x04, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x52, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x1f, - 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x0c, 0x91, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x30, 0x02, 0x03, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x3b, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x1b, 0x00, 0x10, 0x8e, 0x59, - 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, - 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x12, - 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, - 0x00, 0x10, 0x8e, 0x10, 0x00, 0x10, 0x8e, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x34, 0x80, 0x00, 0x00, 0x00, 0x56, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x3a, 0x64, 0x03, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x02, 0x00, 0x10, 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x2c, 0x00, 0x0c, - 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x59, 0xa8, 0x00, 0x34, 0x48, 0x02, 0x62, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x00, 0x00, 0x1b, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x00, 0x12, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x16, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf0, 0x16, - 0x49, 0x37, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x4a, 0x02, 0x58, 0x0e, 0x00, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf0, 0x06, - 0x49, 0x37, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x4a, 0x02, 0x58, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x31, 0x4a, 0x02, 0x58, 0x0d, 0x00, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0x75, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x59, 0x34, 0x14, 0x00, 0x82, 0x08, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x59, 0x30, 0x0c, 0x03, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x53, 0x04, 0x00, 0x00, 0x2e, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x16, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x17, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x00, 0x1c, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x1d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x33, 0x04, 0x00, 0x00, 0x1a, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1b, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x04, 0x01, 0xf8, 0x9e, 0x04, 0x01, 0xf0, 0x16, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x08, 0x49, - 0x04, 0x01, 0xf0, 0x12, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x02, 0x00, 0x0f, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf0, 0x0a, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x08, 0x61, - 0x04, 0x01, 0xf0, 0x06, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x08, 0x86, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xf8, 0x90, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x52, 0x59, 0xa8, 0x10, 0x15, - 0x59, 0x2c, 0x04, 0x0b, 0x8c, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x59, 0x2c, 0x04, 0x0b, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x00, 0x00, 0x03, 0x82, 0x08, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x59, 0x2c, 0x00, 0x0c, 0x49, 0x7a, 0x58, 0x0d, - 0x49, 0x7a, 0x58, 0x0e, 0x80, 0x08, 0x0c, 0x80, 0x04, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x10, 0x05, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x07, - 0x40, 0x00, 0x10, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x0a, 0x58, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x73, 0x4d, 0x04, 0x00, 0x00, 0x10, 0x59, 0x2c, 0x10, 0x01, - 0x48, 0x0a, 0x60, 0x0b, 0x58, 0x08, 0x08, 0x00, 0x82, 0x08, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x59, 0x2c, 0x10, 0x11, 0x59, 0x2c, 0x18, 0x12, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x10, 0x11, 0x1c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x74, 0xcd, - 0x04, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x2c, 0x49, 0x7a, 0x58, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x0a, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x46, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x07, 0xec, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x49, 0xda, 0x04, 0x00, 0x07, 0xe7, 0x59, 0x2c, 0x04, 0x0b, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x02, 0x5c, 0x0b, 0x04, 0x01, 0xf7, 0xe9, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x0f, - 0x59, 0xa8, 0x00, 0x6c, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x10, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0xa7, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x00, 0x09, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x07, 0xe7, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0xda, - 0x04, 0x00, 0x07, 0xe2, 0x59, 0x2c, 0x04, 0x0b, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x02, 0x5c, 0x0b, 0x04, 0x01, 0xf7, 0xe9, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0x50, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x45, 0xe1, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x15, 0x04, 0x02, 0x00, 0x1d, 0x4c, 0x58, 0x00, 0x00, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x12, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x34, 0x22, 0x00, 0x59, 0xcc, 0x10, 0x07, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x0a, 0x68, 0x01, 0x84, 0x10, 0x25, 0x42, - 0x84, 0x10, 0x25, 0x1a, 0x48, 0x12, 0x6a, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x4a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x59, 0x30, 0x02, 0x03, 0x49, 0x33, 0xc8, 0x57, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x64, 0x63, 0x00, 0x10, 0x8f, 0x5e, - 0x00, 0x10, 0x8f, 0x6d, 0x00, 0x10, 0x8f, 0x5f, 0x00, 0x10, 0x8f, 0x5c, - 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, - 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, - 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, 0x00, 0x10, 0x8f, 0x5c, - 0x00, 0x10, 0x8f, 0x5c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x85, 0x86, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, 0x59, 0x32, 0x58, 0x08, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x59, 0x30, 0x18, 0x04, 0x84, 0x0c, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x59, 0x8c, 0x00, 0x0d, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x10, - 0x8c, 0x0c, 0x1d, 0x20, 0x04, 0x02, 0x00, 0x10, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x10, 0xaf, 0xc4, 0x50, 0x08, 0x10, 0x00, 0x58, 0x08, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x0f, - 0x58, 0x08, 0x00, 0x0c, 0x81, 0x30, 0x05, 0x80, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x78, 0x10, 0x0c, 0x04, 0x01, 0xf0, 0x03, - 0x8c, 0x0c, 0x1d, 0x20, 0x04, 0x02, 0x07, 0xdc, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, 0x04, 0x00, 0x07, 0xd8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x66, 0xd5, 0x04, 0x00, 0x07, 0xf8, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0xbc, 0x49, 0x33, 0xc8, 0x57, - 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0x2c, 0x0c, 0x07, 0x48, 0x06, 0x58, 0x0a, 0x59, 0xcc, 0x08, 0x09, - 0x48, 0x06, 0x58, 0x07, 0x59, 0xcc, 0x08, 0x08, 0x48, 0x06, 0x58, 0x0b, - 0x59, 0xa8, 0x08, 0x6b, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x03, 0xff, - 0x80, 0x00, 0x10, 0xc4, 0x8c, 0x04, 0x0d, 0x14, 0x04, 0x00, 0x00, 0x05, - 0x59, 0xcc, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x08, 0x14, 0x80, 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0xf1, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x0a, 0x62, 0x1a, - 0x41, 0x2c, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x2c, 0x08, 0x09, - 0x58, 0x04, 0x04, 0x08, 0x84, 0x00, 0x05, 0x52, 0x84, 0x00, 0x05, 0x40, - 0x48, 0x00, 0x0c, 0x08, 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x08, 0x11, 0x04, 0x83, 0xcc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x02, 0x10, 0x03, 0x40, 0x08, 0x08, 0x00, 0x80, 0x00, 0x05, 0x80, - 0x40, 0x04, 0xb0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x41, 0x5c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x0d, 0x41, 0x2c, 0x10, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x2c, 0x10, 0x01, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x00, - 0x04, 0x01, 0xf7, 0xe9, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xa0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x38, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x30, 0x02, 0x1a, 0x48, 0x02, 0x5a, 0x08, 0x59, 0x30, 0x10, 0x11, - 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x08, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x59, 0x2c, 0x00, 0x0b, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x0b, 0x04, 0x01, 0xf0, 0x0b, - 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x06, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x07, 0x80, 0x08, 0x10, 0x80, 0x80, 0x08, 0x10, 0x00, - 0x04, 0x01, 0xf0, 0x03, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x15, - 0x48, 0x0a, 0x58, 0x07, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb6, 0xa8, - 0x50, 0x00, 0x70, 0x00, 0x58, 0x38, 0x00, 0x0b, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x08, 0x49, 0x30, 0x70, 0x0c, 0x49, 0x30, 0x70, 0x0b, - 0x58, 0x38, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x08, 0x09, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x00, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x45, 0x30, 0x10, 0x00, 0x49, 0x30, 0x70, 0x0b, - 0x5c, 0x00, 0x70, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x59, 0x2c, 0x00, 0x09, 0x40, 0x00, 0x10, 0x00, - 0x48, 0x00, 0x70, 0x0a, 0x82, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x48, 0x00, 0x70, 0x03, 0x59, 0x2c, 0x00, 0x0d, 0x59, 0x2c, 0x10, 0x0e, - 0x48, 0x00, 0x70, 0x07, 0x48, 0x08, 0x70, 0x08, 0x59, 0x2c, 0x00, 0x0a, - 0x59, 0x2c, 0x12, 0x08, 0x80, 0x08, 0x0c, 0x80, 0x04, 0x00, 0x10, 0x02, - 0x40, 0x00, 0x10, 0x00, 0x82, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x08, 0x11, 0x04, 0x82, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x10, - 0x04, 0x02, 0x10, 0x03, 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x48, 0x00, 0x70, 0x0d, - 0x48, 0x08, 0x70, 0x04, 0x80, 0x08, 0x10, 0xc4, 0x48, 0x08, 0x70, 0x05, - 0x40, 0x38, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x9e, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x04, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x10, 0xb6, 0xa8, 0x45, 0x2c, 0x08, 0x00, - 0x49, 0x7a, 0x58, 0x0b, 0x49, 0x7a, 0x58, 0x0c, 0x49, 0x7a, 0x58, 0x0d, - 0x4a, 0x02, 0x58, 0x09, 0x00, 0x10, 0x90, 0x3e, 0x4a, 0x02, 0x58, 0x02, - 0x00, 0x00, 0x01, 0x00, 0x4a, 0x02, 0x58, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x33, 0xc8, 0x57, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x40, 0x30, 0xb8, 0x00, 0x58, 0x5c, 0x00, 0x0a, 0x80, 0x02, 0x5d, 0x40, - 0x04, 0x02, 0x00, 0x04, 0x58, 0x5c, 0x00, 0x0c, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf0, 0x44, 0x58, 0x5c, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x00, 0x04, 0x02, 0x00, 0x22, 0x59, 0x2c, 0x08, 0x01, - 0x4c, 0x04, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, - 0x5c, 0x00, 0x08, 0x00, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x1c, - 0x48, 0x04, 0xb8, 0x0a, 0x58, 0x5c, 0x10, 0x0d, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x05, 0x40, 0x06, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x04, 0x01, 0xf0, 0x14, 0x82, 0x08, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x10, 0x03, 0x80, 0x00, 0x05, 0x80, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x48, 0x00, 0xb8, 0x0d, 0x48, 0x08, 0xb8, 0x04, 0x80, 0x08, 0x10, 0xc4, - 0x48, 0x08, 0xb8, 0x05, 0x82, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x48, 0x00, 0xb8, 0x03, 0x40, 0x5c, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x9e, 0x04, 0x01, 0xf0, 0x25, 0x04, 0x01, 0xf8, 0x28, - 0x58, 0x5c, 0x00, 0x0c, 0x80, 0x02, 0x65, 0x40, 0x59, 0x30, 0x00, 0x00, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x00, 0x02, 0x48, 0x00, 0xb8, 0x0b, - 0x48, 0x00, 0xb8, 0x0c, 0x49, 0x7a, 0x60, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x49, 0x78, 0xb8, 0x0a, 0x59, 0x32, 0x58, 0x08, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x06, - 0x59, 0x2c, 0x10, 0x0b, 0x4c, 0x08, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x42, - 0x5c, 0x00, 0x10, 0x00, 0x8c, 0x08, 0x15, 0x18, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0xf0, 0x04, 0x01, 0xf0, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x40, 0x5c, 0x70, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x80, 0x02, 0x65, 0x40, 0x04, 0x00, 0x00, 0x03, - 0x59, 0x32, 0x58, 0x08, 0x04, 0x01, 0xff, 0x78, 0x5c, 0x00, 0xb8, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x3b, 0xc8, 0x57, 0x58, 0x38, 0x00, 0x0a, 0x40, 0x02, 0x58, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x58, 0x38, 0x00, 0x0c, - 0x80, 0x02, 0x65, 0x40, 0x59, 0x30, 0x00, 0x08, 0x80, 0x02, 0x5d, 0x40, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4d, 0x1c, 0x00, 0x00, 0x49, 0x7a, 0x60, 0x1c, - 0x41, 0x32, 0x38, 0x00, 0x40, 0x02, 0x60, 0x00, 0x4d, 0x3c, 0x00, 0x00, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf8, 0x3f, - 0x5c, 0x02, 0x78, 0x00, 0x41, 0x1e, 0x60, 0x00, 0x59, 0x30, 0x04, 0x14, - 0x84, 0x00, 0x05, 0x02, 0x48, 0x02, 0x64, 0x14, 0x5c, 0x02, 0x38, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x1b, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, - 0x4c, 0x5c, 0x00, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x40, 0x10, 0xb8, 0x00, - 0x40, 0x14, 0xc0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x08, 0x40, 0x60, 0x28, 0x00, - 0x40, 0x5c, 0x30, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1c, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0xc0, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x03, 0xc8, 0x56, 0x4d, 0x30, 0x00, 0x00, - 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x59, 0xa8, 0x00, 0x0d, - 0x81, 0x64, 0x05, 0x80, 0x04, 0x00, 0x00, 0x1a, 0x59, 0x30, 0x0c, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x06, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x84, 0xf8, 0x04, 0x01, 0xf0, 0x09, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x05, - 0x48, 0x07, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x0d, - 0x04, 0x02, 0x08, 0x08, 0x83, 0x32, 0x64, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x41, 0x58, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, 0x04, 0x00, 0x17, 0xe5, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x04, 0x03, 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x30, 0x04, 0x06, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x18, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x06, 0x49, 0x33, 0xc8, 0x56, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, 0x04, 0x01, 0xf0, 0x3d, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x18, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x27, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x24, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x00, 0x0c, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x18, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x00, 0x15, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x8c, 0x00, 0x0d, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xd5, 0x04, 0x02, 0x00, 0x0d, - 0x59, 0x30, 0x00, 0x04, 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xf0, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcc, 0xce, - 0x80, 0xc4, 0x00, 0x40, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x64, 0x63, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x69, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x78, 0xc2, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x4a, 0x02, 0x62, 0x1d, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x85, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x4b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x36, 0x8c, 0x03, 0x4c, 0x18, 0x00, 0x00, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x30, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x96, 0x5b, - 0x00, 0x10, 0x97, 0x5f, 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, - 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, - 0x00, 0x10, 0x91, 0x85, 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, - 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, 0x00, 0x10, 0x91, 0x62, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x02, 0x59, 0x36, 0x8c, 0x03, 0x4c, 0x18, 0x00, 0x00, - 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x30, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x91, 0x81, - 0x00, 0x10, 0x9a, 0x0d, 0x00, 0x10, 0x91, 0x81, 0x00, 0x10, 0x91, 0x81, - 0x00, 0x10, 0x91, 0x81, 0x00, 0x10, 0x91, 0x81, 0x00, 0x10, 0x91, 0x81, - 0x00, 0x10, 0xa1, 0x4a, 0x00, 0x10, 0x99, 0x7c, 0x00, 0x10, 0x9d, 0x17, - 0x00, 0x10, 0x9d, 0x4d, 0x00, 0x10, 0x9d, 0x17, 0x00, 0x10, 0x9d, 0x4d, - 0x00, 0x10, 0x91, 0x81, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x51, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x41, 0x38, 0x00, 0x00, 0x49, 0x3b, 0xc8, 0x57, 0x4d, 0x1c, 0x00, 0x00, - 0x4d, 0x40, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x04, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x93, 0xc1, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x93, 0xcc, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x92, 0x04, 0x00, 0x10, 0x92, 0x41, - 0x00, 0x10, 0x92, 0x58, 0x00, 0x10, 0x92, 0xb4, 0x00, 0x10, 0x93, 0x1a, - 0x00, 0x10, 0x93, 0x57, 0x00, 0x10, 0x93, 0x87, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x93, 0xd4, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x93, 0xe2, 0x00, 0x10, 0x93, 0xeb, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x94, 0x85, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x92, 0xef, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x94, 0x44, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x94, 0x93, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x94, 0xdf, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x95, 0x2f, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x95, 0x5b, 0x00, 0x10, 0x95, 0x66, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe4, - 0x00, 0x10, 0x95, 0x71, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xf3, 0x00, 0x10, 0x91, 0xe2, - 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x91, 0xe2, 0x00, 0x10, 0x95, 0x78, - 0x00, 0x10, 0x95, 0x80, 0x00, 0x10, 0x95, 0x9e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x03, 0xc2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x03, 0xbf, 0x59, 0xcc, 0x04, 0x07, - 0x48, 0x02, 0x60, 0x1c, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x45, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x03, 0xb3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x03, 0xb0, 0x04, 0x01, 0xfb, 0xf0, - 0x04, 0x02, 0x01, 0x9b, 0x59, 0xcc, 0x00, 0x07, 0x48, 0x02, 0x60, 0x1c, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x4a, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, - 0x04, 0x02, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, - 0x04, 0x02, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x08, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf1, 0xb2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x44, - 0x04, 0x00, 0x00, 0x17, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9a, 0xe0, - 0x04, 0x02, 0x00, 0x1e, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x43, 0x46, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x08, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x01, 0x9d, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x41, 0x78, 0x28, 0x00, 0x04, 0x01, 0xf1, 0x88, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9b, 0xad, 0x04, 0x02, 0x07, 0xe8, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x0e, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x19, 0x00, 0x04, 0x01, 0xf1, 0x8f, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x0f, 0x00, - 0x04, 0x01, 0xf1, 0x88, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x03, 0x65, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x14, 0x04, 0x02, 0x03, 0x62, 0x49, 0x3a, 0x64, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9a, 0xbb, 0x04, 0x02, 0x00, 0x06, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x01, 0xf7, 0xda, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf1, 0x71, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, - 0x04, 0x02, 0x03, 0x4e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0x7d, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x03, 0x49, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x44, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x02, 0x78, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x5d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x2e, - 0x04, 0x02, 0x00, 0x31, 0x59, 0xcc, 0x02, 0x06, 0x82, 0x00, 0x35, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x34, 0x82, 0x00, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x04, 0x00, 0x10, 0x31, 0x59, 0x34, 0x30, 0x0a, - 0x84, 0x18, 0x35, 0x16, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x02, 0x00, 0x02, 0x84, 0x18, 0x35, 0x56, 0x48, 0x1a, 0x68, 0x0a, - 0x59, 0xcc, 0x04, 0x06, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x26, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0x2d, - 0x04, 0x02, 0x00, 0x2e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, - 0x04, 0x02, 0x00, 0x07, 0x4c, 0x60, 0x00, 0x00, 0x41, 0x78, 0xc0, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, - 0x5c, 0x00, 0xc0, 0x00, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x09, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x2f, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x34, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0xa7, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x04, 0x01, 0xf7, 0x90, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0b, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x01, 0xf1, 0x27, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x2f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf1, 0x1c, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0b, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf1, 0x15, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, 0x04, 0x02, 0x02, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x02, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x02, 0xec, - 0x59, 0xcc, 0x02, 0x06, 0x82, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x20, 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x10, 0x1d, 0x59, 0xcc, 0x04, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x19, 0x59, 0x34, 0x04, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0x07, 0x04, 0x00, 0x00, 0x1c, - 0x41, 0x7a, 0x78, 0x00, 0x4c, 0x60, 0x00, 0x00, 0x41, 0x78, 0xc0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, 0x5c, 0x00, 0xc0, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0x2f, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x31, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x0c, 0x41, 0x78, 0x28, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x21, 0x04, 0x01, 0xf7, 0x4a, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x0d, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf0, 0xe1, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0d, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x1e, 0x00, - 0x04, 0x01, 0xf0, 0xda, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x14, 0x04, 0x02, 0x02, 0xb7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x02, 0xb4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x02, 0xb1, 0x04, 0x01, 0xfa, 0xf1, - 0x04, 0x02, 0x00, 0x19, 0x49, 0x3a, 0x64, 0x03, 0x4c, 0x5c, 0x00, 0x00, - 0x04, 0x01, 0xfa, 0xf7, 0x04, 0x02, 0x00, 0x0d, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x2e, 0x40, 0x14, 0xb8, 0x00, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x00, 0x0e, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x40, 0x5c, 0x28, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x5c, 0x00, 0xb8, 0x00, 0x04, 0x01, 0xf0, 0xad, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x0d, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x07, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0xb8, 0x00, - 0x04, 0x01, 0xf0, 0xb6, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0d, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x01, 0xf0, 0xaf, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, 0x04, 0x02, 0x06, 0xf3, - 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x06, 0xed, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x2e, 0x04, 0x02, 0x00, 0x2c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0x35, 0x04, 0x02, 0x00, 0x07, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x52, 0x04, 0x01, 0xf6, 0xfb, - 0x49, 0x33, 0xc8, 0x57, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x59, 0x34, 0x02, 0x00, - 0x84, 0x00, 0x05, 0x58, 0x48, 0x02, 0x6a, 0x00, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x7b, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x01, 0xf0, 0x60, 0x49, 0x33, 0xc8, 0x57, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x1e, 0x00, - 0x04, 0x01, 0xf0, 0x77, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x07, 0x03, 0x04, 0x00, 0x07, 0xf5, 0x04, 0x01, 0xf0, 0x40, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, - 0x04, 0x02, 0x02, 0x4f, 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x02, 0x49, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, - 0x04, 0x02, 0x00, 0x2f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0x50, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x9a, 0xe0, 0x04, 0x02, 0x00, 0x07, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x10, 0x41, 0x78, 0x28, 0x00, - 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x50, 0x04, 0x01, 0xf6, 0xbc, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x58, - 0x48, 0x02, 0x6a, 0x00, 0x04, 0x01, 0xf7, 0xc6, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x11, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x01, 0xf0, 0x42, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x02, 0x1d, - 0x04, 0x01, 0xfa, 0x5d, 0x04, 0x02, 0x00, 0x08, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x01, 0xf0, 0x37, 0x59, 0x34, 0x04, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x07, 0x03, 0x04, 0x00, 0x07, 0xeb, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x17, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x33, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x1b, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x49, 0x33, 0xc8, 0x57, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x4c, 0x18, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x69, 0x5c, 0x00, 0x30, 0x00, - 0x41, 0x78, 0x28, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x9c, 0x14, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, 0x4c, 0x14, 0x00, 0x00, - 0x4c, 0x18, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x69, - 0x5c, 0x00, 0x30, 0x00, 0x5c, 0x00, 0x28, 0x00, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x9c, 0x14, 0x49, 0x33, 0xc8, 0x57, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x49, 0x33, 0xc8, 0x57, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xf7, 0xf5, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0x7d, 0x04, 0x02, 0x01, 0xd3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x01, 0xd0, 0x04, 0x01, 0xfa, 0x10, - 0x04, 0x02, 0x07, 0xbb, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x20, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, - 0x04, 0x02, 0x01, 0xc5, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x23, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0x7d, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x01, 0xba, - 0x04, 0x01, 0xf9, 0xfa, 0x04, 0x02, 0x07, 0xa5, 0x40, 0x30, 0x08, 0x00, - 0x59, 0xa8, 0x10, 0x0f, 0x59, 0xcc, 0x00, 0x07, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x80, 0x08, 0x05, 0x80, 0x04, 0x00, 0x00, 0x19, - 0x59, 0xcc, 0x14, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x29, - 0x04, 0x00, 0x00, 0x2d, 0x59, 0xcc, 0x0c, 0x08, 0x4d, 0x30, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x59, 0xaa, 0x41, 0x32, 0x38, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x00, 0x00, 0x26, 0x59, 0x1c, 0x02, 0x02, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x00, 0x05, - 0x59, 0xcc, 0x12, 0x08, 0x59, 0x1c, 0x02, 0x02, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x1e, 0x59, 0x1c, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x00, 0x1a, 0x04, 0x01, 0xf0, 0x2c, - 0x59, 0xcc, 0x12, 0x08, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, - 0x04, 0x00, 0x00, 0x12, 0x59, 0xcc, 0x14, 0x08, 0x59, 0x1c, 0x02, 0x02, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0e, 0x59, 0x1c, 0x00, 0x09, - 0x81, 0x34, 0x05, 0x80, 0x04, 0x00, 0x00, 0x16, 0x04, 0x01, 0xf0, 0x0a, - 0x59, 0xcc, 0x14, 0x08, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9b, 0xdc, 0x04, 0x02, 0x00, 0x10, 0x59, 0xcc, 0x12, 0x08, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x00, 0x19, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x26, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x17, 0x00, 0x59, 0xcc, 0x12, 0x04, 0x82, 0x08, 0x15, 0x80, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x02, 0x07, 0x98, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x25, 0x04, 0x01, 0xf7, 0x95, 0x59, 0x1c, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x07, 0xf2, - 0x59, 0x1c, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x24, - 0x04, 0x02, 0x00, 0x06, 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x02, 0x60, 0x00, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x25, 0x04, 0x01, 0xf7, 0x85, - 0x49, 0x33, 0xc8, 0x57, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x5c, 0x02, 0x78, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x7d, 0x41, 0x5c, 0x00, 0xb0, 0x00, 0x04, 0x00, 0x00, 0x04, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x31, 0x04, 0x01, 0xf7, 0x70, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x59, 0xa9, 0x04, 0x00, 0x00, 0x0d, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x05, 0x59, 0x30, 0x00, 0x09, 0x81, 0x34, 0x05, 0x80, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x02, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xd3, 0x04, 0x02, 0x00, 0x08, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x01, 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0x7e, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x01, 0x22, 0x04, 0x01, 0xf9, 0x62, - 0x04, 0x02, 0x07, 0x0d, 0x49, 0x3a, 0x64, 0x03, 0x04, 0x01, 0xf9, 0xb2, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x2b, - 0x04, 0x01, 0xf7, 0x39, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x2c, - 0x04, 0x01, 0xf7, 0x36, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5a, 0xe9, 0x04, 0x02, 0x01, 0x13, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x01, 0x10, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x07, 0x25, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0xf8, 0x04, 0x00, 0x00, 0x3c, 0x59, 0xcc, 0x04, 0x08, - 0x48, 0x02, 0x64, 0x19, 0x59, 0xcc, 0x02, 0x08, 0x48, 0x02, 0x62, 0x19, - 0x59, 0xcc, 0x08, 0x07, 0x59, 0x34, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x12, - 0x59, 0xa8, 0x00, 0x0f, 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x21, - 0x59, 0xcc, 0x14, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, - 0x04, 0x00, 0x00, 0x23, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0xb5, - 0x04, 0x00, 0x00, 0x20, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x16, - 0x04, 0x00, 0x00, 0x1d, 0x49, 0x1e, 0x60, 0x1e, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x36, 0x04, 0x01, 0xf0, 0xe9, 0x59, 0xcc, 0x12, 0x08, - 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, 0x04, 0x00, 0x00, 0x12, - 0x59, 0x1c, 0x02, 0x02, 0x59, 0xcc, 0x0c, 0x08, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x0e, 0x04, 0x01, 0xf7, 0xeb, 0x59, 0xcc, 0x14, 0x08, - 0x41, 0x32, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0xdc, - 0x04, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf7, 0xe5, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x15, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x17, 0x00, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x37, - 0x04, 0x01, 0xf0, 0xc9, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x01, 0xf0, 0xc5, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5a, 0xe9, 0x04, 0x02, 0x00, 0xc7, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x00, 0xc4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x19, 0x04, 0x02, 0x06, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xf8, 0x04, 0x00, 0x00, 0x3e, - 0x59, 0xcc, 0x04, 0x07, 0x48, 0x02, 0x64, 0x19, 0x59, 0xcc, 0x12, 0x07, - 0x48, 0x0a, 0x62, 0x19, 0x82, 0x08, 0x05, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x55, - 0x04, 0x00, 0x00, 0x2c, 0x04, 0x01, 0xf0, 0x06, 0x59, 0xcc, 0x14, 0x07, - 0x41, 0x32, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0xdc, - 0x04, 0x00, 0x00, 0x26, 0x59, 0xcc, 0x0c, 0x07, 0x59, 0x1c, 0x02, 0x02, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x22, 0x4d, 0x30, 0x00, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x83, 0xd4, - 0x5c, 0x02, 0x60, 0x00, 0x59, 0xcc, 0x0c, 0x09, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x84, 0x04, 0x09, 0xc0, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa1, 0x16, 0x04, 0x00, 0x00, 0x16, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0a, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x00, 0x07, 0x59, 0x1c, 0x00, 0x08, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x28, 0x08, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x9c, 0xc9, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x2a, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x48, 0x03, 0xc8, 0x56, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x03, 0x00, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x3b, - 0x04, 0x01, 0xf0, 0x7b, 0x48, 0x03, 0xc8, 0x56, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x0b, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xf8, 0x4c, 0x08, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x46, 0x14, 0x04, 0x00, 0x00, 0x26, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x45, 0xe1, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0xe9, - 0x04, 0x02, 0x00, 0x1e, 0x59, 0xa8, 0x00, 0x23, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x03, 0x48, 0x03, 0x50, 0x23, 0x59, 0xa8, 0x00, 0x1c, - 0x80, 0x00, 0x00, 0xd0, 0x59, 0xa8, 0x08, 0x0f, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x15, 0x40, 0x48, 0x0b, 0x50, 0x0f, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x99, 0x49, 0x7b, 0x50, 0x25, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x00, 0x06, 0x4a, 0x03, 0x28, 0x04, 0x00, 0x00, 0x07, 0xd0, - 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1a, 0xdd, 0x5c, 0x00, 0x10, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x0b, 0x04, 0x01, 0xf7, 0xfc, - 0x5c, 0x00, 0x10, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x00, 0x4c, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x10, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x47, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0xd8, 0x04, 0x02, 0x00, 0x41, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9e, 0x10, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x47, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0xd8, - 0x04, 0x02, 0x00, 0x36, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x10, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf8, 0x34, - 0x04, 0x00, 0x00, 0x30, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x4e, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x4f, - 0x49, 0x7a, 0x60, 0x1c, 0x59, 0xcc, 0x0a, 0x06, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x06, 0x41, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x05, - 0x59, 0xcc, 0x08, 0x08, 0x59, 0xa8, 0x00, 0x05, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x00, 0x06, 0x3a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x0a, 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x04, 0x00, 0x06, 0x2e, 0x4a, 0x02, 0x60, 0x1c, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf6, 0x2b, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x50, - 0x59, 0xcc, 0x02, 0x07, 0x48, 0x02, 0x60, 0x1c, 0x04, 0x01, 0xf6, 0x26, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x15, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x08, 0x41, 0x04, 0x02, 0x10, 0x2d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x2a, 0x49, 0x2e, 0x60, 0x08, - 0x59, 0xa8, 0x00, 0x15, 0x48, 0x02, 0x58, 0x02, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x01, 0x04, 0x83, 0xcc, 0xa4, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x00, 0x10, 0x15, 0x4a, 0x02, 0x58, 0x11, 0x00, 0x00, 0x00, 0x0b, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x40, 0x00, 0xa8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x41, 0x2c, 0x70, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x03, 0x49, 0x78, 0x70, 0x01, 0x04, 0x01, 0xf0, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x04, 0x04, 0x00, 0x00, 0x0e, - 0x49, 0x2c, 0x70, 0x01, 0x40, 0x04, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xea, - 0x48, 0x02, 0x58, 0x11, 0x40, 0x00, 0xb0, 0x00, 0x83, 0x2c, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x40, 0x00, 0xa8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa3, 0x30, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x06, 0x49, 0x7b, 0x50, 0x15, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x34, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x37, 0xc8, 0x57, 0x48, 0x1b, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x47, 0x25, 0x5c, 0x02, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x60, 0x00, 0x00, 0x4c, 0x5c, 0x00, 0x00, - 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x4f, 0x04, 0x02, 0x00, 0x37, 0x59, 0xcc, 0x02, 0x07, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xff, 0x00, 0x90, 0x04, 0x11, 0xc0, - 0x59, 0xcc, 0x00, 0x0a, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x08, 0x15, 0x40, 0x48, 0x0a, 0x60, 0x1c, 0x8c, 0x04, 0x0d, 0x18, - 0x04, 0x00, 0x00, 0x11, 0x42, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x27, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x32, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, - 0x42, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0x00, 0xc0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x5e, 0x04, 0x01, 0xf0, 0x1f, 0x41, 0x78, 0xb8, 0x00, - 0x8c, 0x04, 0x0d, 0x1a, 0x04, 0x00, 0x00, 0x19, 0x59, 0xcc, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x13, 0x59, 0x30, 0x00, 0x09, - 0x4c, 0x00, 0x00, 0x00, 0x49, 0x36, 0x60, 0x09, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x2f, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x32, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x41, 0x7a, 0x78, 0x00, 0x41, 0x78, 0xc0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x5e, 0x5c, 0x00, 0x00, 0x00, - 0x48, 0x02, 0x60, 0x09, 0x04, 0x01, 0xf0, 0x04, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x03, 0x40, 0x5c, 0x28, 0x00, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x88, 0x00, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x00, 0xc0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x59, 0xcc, 0x02, 0x06, - 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x10, 0x06, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x00, 0x00, 0x59, 0xcc, 0x04, 0x07, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x02, 0x00, 0x09, 0x59, 0xcc, 0x00, 0x06, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x14, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x82, 0x00, 0x0d, 0x80, 0x00, 0x10, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x34, 0x80, - 0x00, 0x00, 0x00, 0x51, 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x13, 0x04, 0x02, 0x00, 0x03, - 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x16, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x3b, 0xc8, 0x57, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x3b, 0xc8, 0x57, - 0x49, 0x37, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xe1, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xd4, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xd4, 0x00, 0x10, 0x96, 0xdf, - 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x24, 0x00, 0x10, 0x97, 0x52, - 0x00, 0x10, 0x97, 0x3c, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x43, - 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x4b, 0x00, 0x10, 0x97, 0x52, - 0x00, 0x10, 0x97, 0x4b, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x52, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xd4, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x97, 0x4f, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x97, 0x48, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xd9, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x97, 0x4e, - 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x97, 0x52, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcd, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcd, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcd, 0x00, 0x10, 0x96, 0xcb, - 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcb, 0x00, 0x10, 0x96, 0xcd, - 0x00, 0x10, 0x96, 0xcd, 0x00, 0x10, 0x96, 0xcd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x5c, 0x02, 0x58, 0x00, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x59, 0xa8, 0x00, 0x34, - 0x48, 0x02, 0x62, 0x06, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, 0x5c, 0x02, 0x78, 0x00, - 0x04, 0x01, 0xf0, 0x74, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x59, 0xa8, 0x00, 0x23, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x12, 0x59, 0x32, 0x68, 0x09, - 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x80, 0x00, 0x05, 0x40, 0x5c, 0x00, 0xb0, 0x00, 0x04, 0x02, 0x00, 0x60, - 0x59, 0x34, 0x02, 0x00, 0x84, 0x00, 0x05, 0x1a, 0x48, 0x02, 0x6a, 0x00, - 0x04, 0x01, 0xf0, 0x1b, 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x59, 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, 0x5c, 0x02, 0x78, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x04, 0x00, 0x00, 0x4c, 0x59, 0x9c, 0x00, 0x19, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x49, 0x41, 0x6c, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x04, - 0x59, 0xa8, 0x00, 0x1a, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x1a, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x4c, 0xe8, 0x00, 0x00, 0x42, 0x01, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x8d, 0x5c, 0x01, 0xd0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x25, - 0x04, 0x00, 0x00, 0x2c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x60, 0x59, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x5f, - 0x04, 0x02, 0x00, 0x23, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x47, 0x2e, - 0x04, 0x02, 0x00, 0x14, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x01, 0xf8, 0x13, 0x04, 0x01, 0xf0, 0x10, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, - 0x04, 0x01, 0xf7, 0x9c, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf0, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xe1, - 0x04, 0x01, 0xf0, 0x05, 0x04, 0x01, 0xf0, 0x04, 0x04, 0x01, 0xf0, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x07, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x5c, 0x02, 0x78, 0x00, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x45, 0xe1, - 0x59, 0x34, 0x04, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x80, 0x00, 0x01, 0x10, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x35, 0x80, 0x00, 0x00, 0x00, 0x15, - 0x04, 0x02, 0x00, 0x02, 0x0c, 0x01, 0xf0, 0x06, 0x83, 0x38, 0x35, 0x80, - 0x00, 0x00, 0x00, 0x16, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x0c, 0x01, 0xf0, 0x0d, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x97, 0xb2, 0x00, 0x10, 0x97, 0x87, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x97, 0xb2, 0x00, 0x10, 0x97, 0xb9, - 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, 0x00, 0x10, 0x79, 0x5e, - 0x00, 0x10, 0x79, 0x5e, 0x49, 0x33, 0xc8, 0x57, 0x59, 0x9c, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x0a, 0x04, 0x02, 0x00, 0x1b, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x19, 0x59, 0x34, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x04, 0x00, 0x00, 0x15, 0x59, 0x9c, 0x00, 0x19, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x12, 0x4d, 0x3c, 0x00, 0x00, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x5c, 0x02, 0x78, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x39, 0x59, 0xcc, 0x00, 0x01, 0x59, 0x34, 0x08, 0x02, - 0x80, 0x04, 0x05, 0x80, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x59, 0x34, 0x50, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x80, 0x48, 0x2a, 0x68, 0x02, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x34, 0x03, 0x82, 0x18, 0x35, 0x80, 0x00, 0x00, 0x00, 0x1e, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7c, 0x99, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, 0x49, 0x3b, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x51, 0x04, 0x02, 0x00, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x72, 0x0c, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x6d, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x00, 0x00, 0x14, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, - 0x04, 0x00, 0x00, 0x06, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x72, 0x0c, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0xac, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x44, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x40, 0x02, 0x70, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x97, 0xf9, 0x00, 0x10, 0x97, 0xfb, 0x00, 0x10, 0x97, 0xfb, - 0x00, 0x10, 0x98, 0x15, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x15, 0x83, 0x2c, 0x05, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x12, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x02, 0x00, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x0c, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfb, 0xbb, 0x49, 0x7a, 0x60, 0x08, - 0x59, 0x30, 0x02, 0x06, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x03, - 0x59, 0xa8, 0x00, 0x35, 0x48, 0x02, 0x62, 0x06, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x07, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x02, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xdf, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0x83, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0xaa, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x41, 0x42, 0x02, 0x78, 0x00, 0x80, 0x00, 0x20, 0x42, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x51, 0x04, 0x00, 0x00, 0x06, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x41, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x38, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9d, 0xc7, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x52, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x49, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x98, 0x5e, 0x00, 0x10, 0x98, 0x7f, - 0x00, 0x10, 0x98, 0x5c, 0x00, 0x10, 0x98, 0x5c, 0x00, 0x10, 0x98, 0x5c, - 0x00, 0x10, 0x98, 0x5c, 0x00, 0x10, 0x98, 0x7f, 0x00, 0x10, 0x98, 0x5c, - 0x00, 0x10, 0x98, 0xa0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x0d, - 0x59, 0x30, 0x08, 0x04, 0x8c, 0x04, 0x0d, 0x18, 0x04, 0x02, 0x00, 0x0a, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x08, 0xcb, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x49, 0x7a, 0x62, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x38, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x0c, 0x0a, 0x8c, 0x04, 0x0d, 0x1a, - 0x04, 0x02, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x38, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x9d, 0x83, 0x04, 0x00, 0x07, 0xfa, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa4, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0x2c, 0x04, 0x0a, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x00, 0x00, 0x05, 0x59, 0x2c, 0x00, 0x0f, 0x59, 0x30, 0x18, 0x15, - 0x80, 0x0c, 0x1c, 0x80, 0x48, 0x0e, 0x60, 0x15, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x0d, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfb, 0x31, 0x59, 0x30, 0x02, 0x06, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x35, - 0x80, 0x00, 0x00, 0xc2, 0x48, 0x02, 0x62, 0x06, 0x49, 0x7a, 0x60, 0x08, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x07, 0x94, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x07, 0x49, 0x7a, 0x62, 0x06, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x38, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x49, 0x7a, 0x62, 0x06, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x33, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x1c, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x08, 0xbc, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x20, 0x0f, - 0x40, 0x08, 0x00, 0x00, 0x80, 0x10, 0x24, 0x80, 0x59, 0x30, 0x00, 0x15, - 0x80, 0x10, 0x24, 0x00, 0x48, 0x12, 0x60, 0x15, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x08, 0xbc, 0x8c, 0x04, 0x0d, 0x0e, 0x04, 0x02, 0x00, 0x0a, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x06, 0x04, 0x01, 0xf8, 0x23, - 0x59, 0x30, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x0c, 0xbb, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x33, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0c, 0xbb, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0xc3, 0x04, 0x01, 0xf7, 0xd8, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xa4, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x08, 0xb5, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x11, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0a, 0xa4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0xb5, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x8c, 0x08, 0x15, 0x3e, 0x04, 0x00, 0x00, 0x06, 0x80, 0x08, 0x10, 0x80, - 0x80, 0x08, 0x10, 0x00, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x15, - 0x48, 0x0a, 0x58, 0x0b, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x14, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x16, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x08, 0x80, 0x00, 0x05, 0x40, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x16, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x04, 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x20, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, 0x49, 0x3a, 0x64, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x00, 0xbe, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x12, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x11, 0x59, 0x30, 0x04, 0x14, - 0x8c, 0x00, 0x05, 0x12, 0x04, 0x02, 0x00, 0x0a, 0x8c, 0x00, 0x05, 0x10, - 0x04, 0x02, 0x00, 0x08, 0x59, 0x2c, 0x04, 0x0c, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x05, 0x82, 0x08, 0x0d, 0x40, 0x80, 0x00, 0x30, 0x65, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x2f, 0x82, 0x08, 0x0d, 0x40, - 0x80, 0x00, 0x20, 0x65, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x2f, - 0x82, 0x08, 0x0d, 0x40, 0x80, 0x00, 0x20, 0x42, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x3b, 0xc8, 0x57, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x44, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x41, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x99, 0x45, 0x00, 0x10, 0x99, 0x55, 0x00, 0x10, 0x99, 0x6a, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x1e, - 0x04, 0x00, 0x00, 0x1d, 0x82, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x82, 0x0c, 0x1d, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x18, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x49, 0x3a, 0x64, 0x03, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x20, 0x42, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x82, 0x0c, 0x1d, 0x80, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x20, 0x01, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x49, 0x7a, 0x60, 0x08, - 0x49, 0x7a, 0x62, 0x06, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf2, 0x5d, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x07, 0xf8, 0x82, 0x00, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x82, 0x0c, 0x1d, 0x80, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x00, 0x07, 0xf3, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x49, 0x3a, 0x64, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x00, 0xbe, - 0x82, 0x08, 0x0d, 0x40, 0x80, 0x00, 0x20, 0x65, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x3b, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x85, 0x04, 0x00, 0x00, 0x06, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x88, 0x04, 0x00, 0x00, 0x0a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x4b, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x4d, 0x1c, 0x00, 0x00, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xfb, 0xed, 0x04, 0x02, 0x00, 0x43, 0x59, 0xcc, 0x14, 0x04, - 0x04, 0x01, 0xf8, 0x45, 0x04, 0x00, 0x00, 0x18, 0x59, 0x1c, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x82, 0x00, 0x25, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x07, 0x82, 0x00, 0x25, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x2d, 0x82, 0x00, 0x25, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x02, 0x00, 0x0c, 0x49, 0x7a, 0x3a, 0x05, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x54, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x72, 0xe2, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x49, 0x3a, 0x64, 0x03, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x69, - 0x04, 0x01, 0xf0, 0x2b, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x02, 0x38, 0x00, 0xff, 0xff, 0xff, 0xff, 0x04, 0x01, 0xf7, 0xf2, - 0x81, 0x36, 0x69, 0xc0, 0x04, 0x02, 0x00, 0x09, 0x59, 0xcc, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x04, 0x02, 0x00, 0x1e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, 0x04, 0x02, 0x00, 0x1b, - 0x49, 0x36, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x87, - 0x59, 0xcc, 0x12, 0x04, 0x82, 0x08, 0x15, 0x80, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x02, 0x00, 0x03, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x86, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x04, 0x01, 0xf0, 0x0d, 0x59, 0x1c, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x02, 0x07, 0xdf, 0x4d, 0x30, 0x00, 0x00, - 0x41, 0x1e, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x5c, 0x02, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xd9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x5c, 0x02, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x42, 0x00, 0x28, 0x00, - 0x00, 0x10, 0xd8, 0xd4, 0x41, 0x30, 0x00, 0x00, 0x80, 0x14, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x17, 0x58, 0x14, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x13, 0x58, 0x14, 0x02, 0x02, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x10, 0x58, 0x14, 0x1c, 0x06, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x0c, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x1d, - 0x59, 0x30, 0x20, 0x09, 0x58, 0x14, 0x00, 0x09, 0x80, 0x00, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x0b, 0x80, 0x10, 0x21, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x80, 0x10, 0x05, 0x80, 0x04, 0x00, 0x00, 0x10, 0x82, 0x14, 0x2c, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x41, 0x54, 0x00, 0x00, 0x80, 0x14, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x0e, 0x04, 0x01, 0xf7, 0xe2, 0x58, 0x14, 0x00, 0x1e, - 0x80, 0x10, 0x21, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x58, 0x10, 0x20, 0x02, - 0x82, 0x10, 0x25, 0x00, 0x00, 0xff, 0xff, 0xff, 0x04, 0x01, 0xf7, 0xf2, - 0x58, 0x10, 0x20, 0x1e, 0x04, 0x01, 0xf7, 0xf0, 0x40, 0x16, 0x38, 0x00, - 0x81, 0x30, 0x05, 0x40, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x14, 0x18, 0x07, 0x8c, 0x0c, 0x1d, 0x10, - 0x04, 0x02, 0x07, 0xea, 0x04, 0x01, 0xf7, 0xe1, 0x49, 0x33, 0xc8, 0x57, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, 0x04, 0x02, 0x00, 0x0e, - 0x59, 0x30, 0x04, 0x03, 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x85, 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x93, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x85, - 0x0c, 0x01, 0xf0, 0x19, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x27, - 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, 0x49, 0x3b, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x59, 0x32, 0x58, 0x08, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x31, 0x4a, 0x02, 0x58, 0x11, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x58, 0x12, 0x00, 0x00, 0x00, 0xff, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x4b, - 0x00, 0x10, 0x9a, 0x4b, 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, - 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, - 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, - 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x44, 0x00, 0x10, 0x9a, 0x46, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x32, 0x58, 0x08, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x33, 0xc8, 0x57, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x42, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xfb, 0x75, - 0x49, 0x7a, 0x62, 0x05, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x04, 0x01, 0xf8, 0x07, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x06, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x49, 0x7a, 0x62, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x43, 0xc8, 0x57, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x76, 0x4d, 0xf0, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x84, 0xe4, 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x9a, 0x91, 0x00, 0x10, 0x9a, 0x95, 0x00, 0x10, 0x9a, 0x7c, - 0x00, 0x10, 0x9a, 0xa4, 0x00, 0x10, 0x9a, 0xb8, 0x00, 0x10, 0x9a, 0x7c, - 0x00, 0x10, 0x9a, 0x7c, 0x00, 0x10, 0x9a, 0x7c, 0x00, 0x10, 0x9a, 0x7c, - 0x00, 0x10, 0x9a, 0x7c, 0x00, 0x10, 0x9a, 0x7c, 0x00, 0x10, 0x9a, 0x7c, - 0x00, 0x10, 0x9a, 0x7c, 0x00, 0x10, 0x9a, 0x7c, 0x4d, 0x40, 0x00, 0x00, - 0x59, 0x30, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x05, - 0x41, 0x40, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0c, 0xbb, - 0x40, 0x06, 0x80, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, 0x04, 0x02, 0x09, 0x3e, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x30, 0xb8, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x9c, 0x48, 0x5e, 0x60, 0x09, 0x5c, 0x00, 0xb8, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x64, 0x63, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x8c, 0x00, 0x0d, 0x81, 0x30, 0x05, 0x80, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xd5, 0x04, 0x02, 0x00, 0x18, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcc, 0xce, 0x80, 0xc4, 0x00, 0x40, - 0x04, 0x00, 0x07, 0xde, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x79, - 0x04, 0x00, 0x00, 0x11, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x84, 0xd5, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xa5, 0x04, 0x02, 0x00, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcb, 0x83, 0x80, 0xc4, 0x00, 0x40, - 0x04, 0x00, 0x07, 0xcf, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x79, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf7, 0xb7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdd, 0x04, 0x01, 0xf7, 0xc2, 0x49, 0x33, 0xc8, 0x57, - 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, 0x59, 0xcc, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x02, 0x02, 0x5a, 0x04, 0x02, 0x00, 0x1a, 0x59, 0x30, 0x00, 0x09, - 0x4c, 0x00, 0x00, 0x00, 0x49, 0x36, 0x60, 0x09, 0x42, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x37, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x30, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x4d, 0x3c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x29, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x80, 0x00, - 0x5c, 0x02, 0x78, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x48, 0x02, 0x60, 0x09, - 0x59, 0xcc, 0x00, 0x07, 0x48, 0x02, 0x68, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x04, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x15, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x74, 0x04, 0x02, 0x00, 0x40, - 0x59, 0xcc, 0x0a, 0x08, 0x82, 0x04, 0x04, 0x80, 0x00, 0x00, 0x01, 0x00, - 0x04, 0x00, 0x10, 0x33, 0x59, 0xcc, 0x0c, 0x08, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x35, 0x59, 0xa8, 0x00, 0x2f, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x09, 0x59, 0x30, 0x10, 0x09, - 0x58, 0x08, 0x02, 0x12, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x00, 0x2a, 0x59, 0xcc, 0x0c, 0x09, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x10, 0x24, 0x59, 0xa8, 0x08, 0x23, 0x8c, 0x04, 0x0d, 0x06, - 0x04, 0x00, 0x00, 0x04, 0x59, 0xcc, 0x0c, 0x0f, 0x8c, 0x04, 0x0d, 0x1e, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x0a, 0x17, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x12, 0x59, 0xcc, 0x0a, 0x18, 0x82, 0x04, 0x04, 0x80, - 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x14, 0x59, 0xcc, 0x0c, 0x18, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x00, 0x0e, 0x59, 0xcc, 0x0c, 0x19, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x10, 0x11, 0x59, 0xcc, 0x0c, 0x1a, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x00, 0x10, 0x11, 0x04, 0x01, 0xf0, 0x18, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x04, 0x01, 0xf0, 0x12, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x03, 0x00, 0x04, 0x01, 0xf0, 0x0f, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x05, 0x00, 0x04, 0x01, 0xf0, 0x0c, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x07, 0x00, 0x04, 0x01, 0xf0, 0x09, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x09, 0x00, 0x04, 0x01, 0xf0, 0x06, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x0f, 0x00, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x2d, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xcc, 0x04, 0x07, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, - 0x59, 0xcc, 0x00, 0x0c, 0x59, 0x34, 0x08, 0x02, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x12, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x09, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x5c, 0x00, 0xb0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x58, 0x00, 0x00, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x0c, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0x34, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x00, 0x00, 0x14, - 0x49, 0x33, 0xc8, 0x56, 0x49, 0x33, 0xc8, 0x56, 0x49, 0x33, 0xc8, 0x57, - 0x59, 0x34, 0x00, 0x09, 0x48, 0x03, 0xc8, 0x57, 0x59, 0x34, 0x00, 0x0e, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0x34, 0x00, 0x08, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0x34, 0x00, 0x0d, 0x48, 0x03, 0xc8, 0x57, 0x59, 0x34, 0x00, 0x07, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0x34, 0x00, 0x0c, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0x34, 0x00, 0x06, 0x48, 0x03, 0xc8, 0x57, 0x59, 0x34, 0x00, 0x0b, - 0x48, 0x03, 0xc8, 0x57, 0x5c, 0x00, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x2d, 0x83, 0x30, 0x0d, 0x80, 0x00, 0x10, 0xb5, 0xb8, - 0x04, 0x00, 0x00, 0x2a, 0x8d, 0x3e, 0x7d, 0x06, 0x04, 0x02, 0x00, 0x28, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x0a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x02, 0x00, 0x21, 0x59, 0x30, 0x02, 0x1d, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x1d, 0x59, 0x30, 0x0c, 0x16, - 0x04, 0x01, 0xf0, 0x02, 0x59, 0x30, 0x0c, 0x03, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x39, 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x35, 0x04, 0x02, 0x00, 0x14, 0x4d, 0x30, 0x00, 0x00, - 0x4d, 0x1c, 0x00, 0x00, 0x59, 0x32, 0x60, 0x1e, 0x49, 0x33, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x60, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0x1c, 0x00, 0x1c, 0x49, 0x7a, 0x38, 0x1c, - 0x59, 0x1c, 0x0c, 0x14, 0x84, 0x04, 0x0d, 0x02, 0x48, 0x06, 0x3c, 0x14, - 0x5c, 0x02, 0x38, 0x00, 0x5c, 0x02, 0x60, 0x00, 0x81, 0x30, 0x05, 0x80, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x7a, 0x60, 0x1e, - 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4d, 0x3c, 0x00, 0x00, 0x42, 0x02, 0x78, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x5d, - 0x5c, 0x02, 0x78, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x83, 0xa8, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x7d, 0x41, 0x5c, 0x00, 0xb0, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, - 0x49, 0x43, 0xc8, 0x57, 0x59, 0xa8, 0x00, 0x0b, 0x81, 0x2c, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x11, 0x59, 0xa8, 0x00, 0x0c, 0x81, 0x2c, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x0e, 0x59, 0x2c, 0x00, 0x00, 0x80, 0x00, 0x5d, 0x40, - 0x04, 0x00, 0x00, 0x08, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x42, 0x5a, 0x06, - 0x4c, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x04, 0x01, 0xf7, 0xf7, 0x49, 0x42, 0x5a, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x3f, 0xc8, 0x57, 0x49, 0x33, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x2e, 0x41, 0x50, 0x28, 0x00, - 0x81, 0x3e, 0x79, 0xc0, 0x04, 0x02, 0x00, 0x06, 0x59, 0xa8, 0x00, 0x63, - 0x80, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x08, 0x67, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x26, 0x41, 0x30, 0x00, 0x00, 0x80, 0x14, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x1a, 0x58, 0x14, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x16, 0x58, 0x14, 0x02, 0x02, - 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x13, 0x58, 0x14, 0x1c, 0x06, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x0f, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x17, - 0x59, 0x30, 0x00, 0x09, 0x58, 0x14, 0x20, 0x09, 0x80, 0x10, 0x21, 0xc0, - 0x04, 0x02, 0x00, 0x06, 0x58, 0x14, 0x20, 0x1e, 0x59, 0x30, 0x18, 0x09, - 0x58, 0x0c, 0x00, 0x02, 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x10, 0x05, 0x80, 0x04, 0x00, 0x00, 0x07, 0x82, 0x14, 0x2c, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x41, 0x54, 0x00, 0x00, 0x80, 0x14, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x05, 0x04, 0x01, 0xf7, 0xdf, 0x40, 0x16, 0x38, 0x00, - 0x81, 0x30, 0x05, 0x40, 0x04, 0x01, 0xf0, 0x02, 0x80, 0x00, 0x05, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x58, 0x14, 0x18, 0x07, 0x8c, 0x0c, 0x1d, 0x10, - 0x04, 0x02, 0x07, 0xf3, 0x04, 0x01, 0xf7, 0xe7, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x59, 0x30, 0x10, 0x09, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x02, 0x58, 0x08, 0x24, 0x03, 0x41, 0x30, 0x10, 0x00, - 0x04, 0x01, 0xf0, 0x07, 0x41, 0x78, 0x10, 0x00, 0x41, 0x44, 0x20, 0x00, - 0x04, 0x01, 0xf0, 0x04, 0x41, 0x78, 0x10, 0x00, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x0b, 0xc8, 0x57, 0x48, 0x13, 0xc8, 0x57, - 0x49, 0x2f, 0xc8, 0x57, 0x49, 0x43, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, 0x4c, 0x14, 0x00, 0x00, - 0x4c, 0x18, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x5c, 0x00, 0x30, 0x00, - 0x5c, 0x00, 0x28, 0x00, 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x0d, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x00, 0x00, 0x17, 0x83, 0x40, 0x05, 0x80, 0x00, 0x00, 0x00, 0x29, - 0x04, 0x02, 0x00, 0x10, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x0a, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x07, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x18, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x02, 0x58, 0x09, 0xff, 0xff, 0xff, 0xff, - 0x04, 0x01, 0xf0, 0x02, 0x48, 0x0a, 0x58, 0x09, 0x58, 0x08, 0x02, 0x02, - 0x48, 0x02, 0x5c, 0x13, 0x04, 0x01, 0xf0, 0x05, 0x4a, 0x02, 0x58, 0x09, - 0xff, 0xff, 0xff, 0xff, 0x4a, 0x02, 0x5c, 0x13, 0x00, 0x00, 0xff, 0xff, - 0x49, 0x42, 0x5a, 0x08, 0x48, 0x12, 0x5a, 0x06, 0x82, 0x10, 0x05, 0x80, - 0x00, 0x00, 0xff, 0xff, 0x04, 0x00, 0x00, 0x12, 0x4c, 0x14, 0x00, 0x00, - 0x4c, 0x18, 0x00, 0x00, 0x4d, 0x44, 0x00, 0x00, 0x4d, 0x34, 0x00, 0x00, - 0x40, 0x12, 0x88, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0x5a, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x34, 0x00, 0x02, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x58, 0x12, - 0x5c, 0x02, 0x68, 0x00, 0x5c, 0x02, 0x88, 0x00, 0x5c, 0x00, 0x30, 0x00, - 0x5c, 0x00, 0x28, 0x00, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x5c, 0x04, - 0x83, 0x40, 0x05, 0x80, 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x02, - 0x48, 0x16, 0x5a, 0x07, 0x48, 0x1a, 0x5c, 0x08, 0x04, 0x01, 0xfb, 0xec, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x08, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x00, 0x03, 0x42, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x08, 0x09, - 0x80, 0x04, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x58, 0x04, 0x04, 0x03, - 0x81, 0x44, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf7, 0xfd, 0x49, 0x33, 0xc8, 0x57, - 0x4c, 0x04, 0x00, 0x00, 0x59, 0x30, 0x04, 0x03, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0x1e, 0x04, 0x02, 0x00, 0x16, 0x80, 0x00, 0x00, 0xd0, - 0x59, 0x30, 0x0a, 0x16, 0x82, 0x04, 0x0d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x80, 0x04, 0x05, 0x40, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x02, 0x64, 0x16, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x85, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x05, - 0x4a, 0x02, 0x62, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x35, - 0x48, 0x02, 0x62, 0x06, 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x4b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x5c, 0x5c, 0x00, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x40, 0x00, 0x00, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x14, - 0x49, 0x33, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x18, - 0x04, 0x00, 0x00, 0x09, 0x8c, 0x00, 0x05, 0x12, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x8a, 0x43, 0x04, 0x01, 0xf9, 0x18, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x38, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x1c, 0x04, 0x06, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x02, 0x10, 0x0b, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x9c, 0xc4, 0x00, 0x10, 0x9c, 0xc4, - 0x00, 0x10, 0x9c, 0xc4, 0x00, 0x10, 0x9c, 0xc6, 0x00, 0x10, 0x9c, 0xc4, - 0x00, 0x10, 0x9c, 0xc6, 0x00, 0x10, 0x9c, 0xc6, 0x00, 0x10, 0x9c, 0xc4, - 0x00, 0x10, 0x9c, 0xc6, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x1c, 0x04, 0x06, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x0e, - 0x48, 0x03, 0xc8, 0x57, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x3b, - 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, - 0x00, 0x00, 0x2a, 0x00, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x48, 0x03, 0xc8, 0x56, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x14, 0x00, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x04, 0x01, 0xf8, 0xe6, 0x49, 0x7a, 0x62, 0x05, 0x59, 0x30, 0x04, 0x14, - 0x48, 0x03, 0xc8, 0x57, 0x82, 0x00, 0x05, 0x00, 0xff, 0xff, 0xad, 0xff, - 0x48, 0x02, 0x64, 0x14, 0x49, 0x7a, 0x64, 0x05, 0x5c, 0x02, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x5c, 0x00, 0x28, 0x00, 0x5c, 0x00, 0x08, 0x00, - 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x0d, 0x49, 0x7a, 0x58, 0x00, - 0x49, 0x7a, 0x5c, 0x04, 0x4a, 0x02, 0x5a, 0x08, 0x00, 0x00, 0x00, 0x45, - 0x49, 0x1e, 0x58, 0x09, 0x59, 0x30, 0x04, 0x02, 0x48, 0x02, 0x5c, 0x07, - 0x59, 0x30, 0x04, 0x19, 0x48, 0x02, 0x5c, 0x0b, 0x59, 0x1c, 0x04, 0x14, - 0x84, 0x00, 0x05, 0x56, 0x48, 0x02, 0x3c, 0x14, 0x59, 0x1c, 0x18, 0x09, - 0x58, 0x0c, 0x04, 0x03, 0x48, 0x02, 0x5a, 0x06, 0x48, 0x16, 0x58, 0x0a, - 0x48, 0x06, 0x5a, 0x0b, 0x04, 0x01, 0xfb, 0x5a, 0x4d, 0x40, 0x00, 0x00, - 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x45, 0x59, 0x1c, 0x02, 0x02, - 0x4c, 0x00, 0x00, 0x00, 0x4d, 0x30, 0x00, 0x00, 0x41, 0x1e, 0x60, 0x00, - 0x04, 0x01, 0xfd, 0x52, 0x5c, 0x02, 0x60, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x48, 0x02, 0x3a, 0x02, 0x5c, 0x02, 0x80, 0x00, 0x4a, 0x02, 0x3c, 0x06, - 0x00, 0x00, 0x00, 0x06, 0x4a, 0x02, 0x3a, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x49, 0x7a, 0x3a, 0x06, 0x49, 0x7a, 0x3a, 0x05, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x02, 0x00, 0x0b, 0x59, 0x30, 0x04, 0x03, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x85, 0x04, 0x00, 0x00, 0x2b, - 0x82, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x8b, 0x04, 0x00, 0x00, 0x28, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x27, 0x04, 0x02, 0x00, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x4d, 0x2c, 0x00, 0x00, 0x4d, 0x40, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xfe, 0x97, 0x5c, 0x02, 0x80, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, - 0x04, 0x00, 0x07, 0xf3, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x89, - 0x04, 0x00, 0x00, 0x05, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x8a, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x67, 0xa7, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x72, 0x0c, - 0x59, 0x30, 0x0a, 0x03, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, - 0x04, 0x00, 0x00, 0x09, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x00, 0x00, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x0a, 0x1c, 0x01, 0xf0, 0x00, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x93, 0x04, 0x02, 0x10, 0x0c, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x85, 0x04, 0x00, 0x10, 0x09, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, 0x0a, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x8a, 0x04, 0x00, 0x00, 0x22, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x49, 0x3b, 0xc8, 0x57, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x72, 0x0c, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x34, 0x00, 0x00, 0x41, 0x30, 0x68, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x11, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x1e, 0x59, 0xcc, 0x0c, 0x07, 0x48, 0x06, 0x64, 0x19, - 0x59, 0xcc, 0x0a, 0x07, 0x48, 0x06, 0x62, 0x19, 0x58, 0x34, 0x08, 0x09, - 0x48, 0x06, 0x60, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x5c, 0x40, 0x36, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x5c, 0x00, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x59, 0x30, 0x08, 0x09, 0x58, 0x04, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x1a, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x05, 0x94, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x45, 0xfe, 0x04, 0x00, 0x00, 0x1e, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, 0x59, 0x30, 0x04, 0x14, - 0x84, 0x00, 0x05, 0x58, 0x48, 0x02, 0x64, 0x14, 0x8c, 0x00, 0x05, 0x12, - 0x04, 0x00, 0x00, 0x04, 0x59, 0xa8, 0x00, 0x36, 0x48, 0x02, 0x62, 0x05, - 0x04, 0x01, 0xf0, 0x07, 0x59, 0xa8, 0x08, 0x36, 0x59, 0xa8, 0x00, 0x34, - 0x80, 0x04, 0x04, 0x00, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x48, 0x02, 0x62, 0x05, 0x59, 0x30, 0x00, 0x09, 0x82, 0x00, 0x0c, 0x00, - 0x00, 0x00, 0x00, 0x11, 0x50, 0x04, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xfb, 0x45, 0x30, 0x08, 0x00, 0x49, 0x7a, 0x60, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x10, 0x05, 0x00, 0xff, 0xff, 0xfe, 0xef, 0x04, 0x02, 0x00, 0x1c, - 0x4d, 0x2c, 0x00, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x59, 0x34, 0x08, 0x11, - 0x83, 0x34, 0x14, 0x00, 0x00, 0x00, 0x00, 0x11, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x0e, 0x40, 0x04, 0x00, 0x00, 0x81, 0x30, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x05, 0x58, 0x04, 0x08, 0x00, 0x82, 0x04, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xf8, 0x59, 0x30, 0x08, 0x00, - 0x49, 0x7a, 0x60, 0x00, 0x44, 0x04, 0x10, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x38, 0x04, 0x01, 0xf0, 0x02, 0x49, 0x33, 0xc8, 0x57, - 0x5c, 0x02, 0x58, 0x00, 0x49, 0x2e, 0x60, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x38, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x49, 0x2f, 0xc8, 0x57, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x4c, 0x34, 0x00, 0x00, - 0x59, 0x30, 0x00, 0x09, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x10, - 0x82, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x11, 0x50, 0x34, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x09, 0x81, 0x30, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x05, 0x50, 0x34, 0x00, 0x00, 0x82, 0x00, 0x6c, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xf8, 0x59, 0x30, 0x00, 0x00, - 0x44, 0x00, 0x68, 0x00, 0x5c, 0x00, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x07, 0xfb, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x04, 0x00, 0x07, 0xf8, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x04, 0x00, 0x07, 0xf5, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x00, 0x07, 0xf2, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x49, 0x33, 0xc8, 0x57, 0x4c, 0x08, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x59, 0xa8, 0x10, 0x1c, 0x59, 0xcc, 0x18, 0x07, - 0x82, 0x0c, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x0c, 0x01, 0x10, - 0x80, 0x08, 0x35, 0x80, 0x04, 0x02, 0x00, 0x14, 0x83, 0xcc, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x59, 0x30, 0x00, 0x09, 0x82, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, 0x04, 0x02, 0x00, 0x0a, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x59, 0x30, 0x00, 0x09, 0x82, 0x00, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x7d, 0x41, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x10, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x56, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3e, 0xe0, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x1a, 0xdd, - 0x49, 0x3b, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x4c, 0x58, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x45, 0x78, 0xa8, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfd, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x46, - 0x04, 0x02, 0x00, 0x04, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x44, - 0x04, 0x01, 0xf0, 0x08, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x46, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x01, 0x59, 0xcc, 0x00, 0x07, - 0x82, 0x00, 0x05, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x10, - 0x59, 0xcc, 0x10, 0x08, 0x82, 0x08, 0x15, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x15, 0x40, 0x48, 0x0a, 0x58, 0x0a, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x06, 0x59, 0xcc, 0x00, 0x07, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x58, 0x0b, - 0x04, 0x01, 0xf0, 0x05, 0x59, 0xcc, 0x00, 0x08, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x48, 0x02, 0x58, 0x0b, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x04, 0x83, 0xcc, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x01, 0xf0, 0x03, 0x83, 0xcc, 0x14, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x50, 0x08, 0x00, 0x00, 0x9c, 0x00, 0x01, 0xc0, - 0x48, 0x02, 0x58, 0x0c, 0x80, 0x08, 0x10, 0x00, 0x50, 0x08, 0x00, 0x00, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x0d, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x08, 0x59, 0xcc, 0x00, 0x0b, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x0e, 0x59, 0xcc, 0x00, 0x0c, - 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x0f, 0x04, 0x01, 0xf0, 0x07, - 0x59, 0xcc, 0x00, 0x0f, 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x0e, - 0x59, 0xcc, 0x00, 0x10, 0x9c, 0x00, 0x01, 0xc0, 0x48, 0x02, 0x58, 0x0f, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x46, 0x04, 0x02, 0x00, 0x04, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x11, 0x04, 0x01, 0xf0, 0x03, - 0x83, 0xcc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x15, 0x41, 0x2c, 0x30, 0x00, - 0x82, 0x18, 0x34, 0x00, 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0xb0, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x50, 0x08, 0x00, 0x00, 0x9c, 0x00, 0x01, 0xc0, - 0x44, 0x00, 0x30, 0x00, 0x80, 0x08, 0x10, 0x00, 0x80, 0x18, 0x30, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfa, 0x5c, 0x00, 0xa8, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x30, 0x08, 0x09, - 0x58, 0x04, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x2c, 0x02, 0x08, 0x84, 0x00, 0x05, 0x58, 0x48, 0x02, 0x5a, 0x08, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xe0, 0x18, 0x0f, 0x59, 0x9c, 0x04, 0x13, - 0x80, 0x0c, 0x10, 0x00, 0x80, 0x08, 0x05, 0x80, 0x04, 0x02, 0x00, 0x02, - 0x41, 0x78, 0x10, 0x00, 0x59, 0xe0, 0x00, 0x10, 0x59, 0xe0, 0x08, 0x10, - 0x80, 0x04, 0x0d, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x80, 0x08, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x0b, 0x4c, 0x08, 0x00, 0x00, 0x59, 0x9c, 0x08, 0x14, - 0x59, 0x9c, 0x10, 0x15, 0x80, 0x0c, 0x00, 0xcc, 0x80, 0x04, 0x0c, 0x00, - 0x82, 0x08, 0x14, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x18, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x48, 0x03, 0xc8, 0x57, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x02, 0x03, 0x49, 0x33, 0xc8, 0x57, - 0x49, 0x37, 0xc8, 0x57, 0x49, 0x3b, 0xc8, 0x57, 0x48, 0x03, 0xc8, 0x57, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x9e, 0xb9, - 0x00, 0x10, 0xa0, 0x0a, 0x00, 0x10, 0x9e, 0xb9, 0x00, 0x10, 0x9e, 0xb9, - 0x00, 0x10, 0x9e, 0xb9, 0x00, 0x10, 0x9e, 0xb9, 0x00, 0x10, 0x9e, 0xb9, - 0x00, 0x10, 0x9f, 0x6f, 0x00, 0x10, 0x9e, 0xbb, 0x00, 0x10, 0x9e, 0xb9, - 0x00, 0x10, 0x9e, 0xb9, 0x00, 0x10, 0x9e, 0xb9, 0x00, 0x10, 0x9e, 0xb9, - 0x00, 0x10, 0x9e, 0xb9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x4c, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x46, 0x14, - 0x04, 0x02, 0x00, 0x20, 0x59, 0xa8, 0x08, 0x23, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x09, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x00, 0x00, 0x1a, 0x8c, 0x04, 0x0d, 0x12, 0x04, 0x00, 0x00, 0x3d, - 0x59, 0xcc, 0x08, 0x06, 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1f, - 0x82, 0x04, 0x05, 0x80, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x82, 0x04, 0x05, 0x80, 0x52, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x06, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xca, 0xa0, 0x5c, 0x02, 0x78, 0x00, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x14, 0x59, 0xcc, 0x08, 0x06, - 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, 0x82, 0x04, 0x05, 0x80, - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x82, 0x04, 0x05, 0x80, - 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, 0x82, 0x04, 0x05, 0x80, - 0x52, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x00, 0x00, - 0x81, 0x36, 0x69, 0xc0, 0x04, 0x02, 0x00, 0x0b, 0x59, 0xcc, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x58, 0x54, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x02, 0x07, 0xbb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0xb1, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x49, 0x36, 0x60, 0x09, - 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x23, 0x59, 0xcc, 0x08, 0x06, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x33, - 0x82, 0x04, 0x05, 0x80, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x41, - 0x82, 0x04, 0x05, 0x80, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x52, - 0x82, 0x04, 0x05, 0x80, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x4f, - 0x82, 0x04, 0x05, 0x80, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x4c, - 0x82, 0x04, 0x05, 0x80, 0x52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x49, - 0x82, 0x04, 0x05, 0x80, 0x05, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x0d, - 0x59, 0xcc, 0x08, 0x06, 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x9c, 0x04, 0x31, 0xc0, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x46, - 0x42, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xfc, 0xeb, - 0x04, 0x01, 0xf9, 0x40, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x51, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x72, 0xe2, 0x59, 0xcc, 0x00, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x82, 0x00, 0x05, 0x80, 0x00, 0xff, 0xff, 0xff, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, - 0x49, 0x3a, 0x64, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x32, 0x58, 0x17, - 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x07, 0x3b, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x07, 0xdf, 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x07, 0xd9, 0x04, 0x01, 0xfc, 0x64, 0x04, 0x02, 0x07, 0xd7, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, - 0x00, 0x00, 0x00, 0x0e, 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x19, 0x00, - 0x04, 0x01, 0xf7, 0xa3, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x0c, - 0x59, 0x34, 0x0c, 0x00, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x07, 0x95, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x07, 0x00, 0x04, 0x02, 0x07, 0xc3, 0x4a, 0x02, 0x64, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x4a, 0x02, 0x64, 0x1a, 0x00, 0x00, 0x00, 0x09, - 0x4a, 0x02, 0x62, 0x1a, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x01, 0xf7, 0x8f, - 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x07, 0xf8, 0x59, 0x34, 0x0c, 0x00, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x07, 0x00, 0x04, 0x00, 0x07, 0xf2, 0x04, 0x01, 0xf7, 0xb3, - 0x4d, 0x2c, 0x00, 0x00, 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, - 0x4c, 0x54, 0x00, 0x00, 0x41, 0x38, 0x50, 0x00, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x54, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x0c, 0x0b, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0xe0, 0x00, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x20, 0x00, - 0x04, 0x02, 0x00, 0x76, 0x59, 0x30, 0x08, 0x17, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x14, 0x58, 0x04, 0x14, 0x04, 0x41, 0xcc, 0xa8, 0x00, - 0x82, 0x04, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82, 0x08, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x10, 0x04, 0x40, 0x08, 0xb0, 0x00, - 0x04, 0x01, 0xfb, 0xa6, 0x04, 0x01, 0xf0, 0x0a, 0x40, 0x00, 0x10, 0x00, - 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x04, 0x01, 0xfb, 0xa1, - 0x58, 0x04, 0x08, 0x01, 0x80, 0x04, 0x09, 0xc0, 0x04, 0x02, 0x07, 0xf2, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x5e, 0x59, 0x34, 0x4c, 0x00, 0x59, 0x2c, 0x0c, 0x09, - 0x48, 0x07, 0xc8, 0x57, 0x48, 0x27, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x2a, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x32, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x20, - 0x04, 0x00, 0x00, 0x36, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x52, - 0x04, 0x00, 0x00, 0x42, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x50, - 0x04, 0x00, 0x00, 0x42, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x21, - 0x04, 0x00, 0x00, 0x04, 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x24, - 0x04, 0x02, 0x00, 0x43, 0x82, 0x24, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x08, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x04, 0x01, 0xf0, 0x37, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x31, - 0x4a, 0x02, 0x58, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x59, 0x34, 0x04, 0x00, - 0x48, 0x02, 0x58, 0x0e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x04, 0x01, 0xf0, 0x3d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x80, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x43, 0x46, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x42, 0x00, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x21, 0x59, 0xcc, 0x00, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5a, 0xc6, 0x04, 0x02, 0x00, 0x1d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x80, 0x04, 0x01, 0xf0, 0x1a, - 0x82, 0x24, 0x05, 0x00, 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x07, 0xdf, 0x82, 0x24, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x09, - 0x04, 0x00, 0x07, 0xda, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0xa7, - 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf0, 0x0b, - 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xf0, 0x03, - 0x42, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x82, 0x24, 0x05, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x04, 0x00, 0x07, 0xcb, 0x48, 0x2a, 0x64, 0x03, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x59, 0x2c, 0x00, 0x0d, 0x48, 0x02, 0x60, 0x11, - 0x49, 0x7a, 0x60, 0x13, 0x59, 0xa8, 0x00, 0x35, 0x48, 0x02, 0x62, 0x06, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x39, - 0x59, 0x32, 0x58, 0x17, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x49, 0x7a, 0x60, 0x17, - 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, 0x5c, 0x00, 0xb0, 0x00, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x59, 0x32, 0x58, 0x08, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x02, 0x00, 0x2a, 0x49, 0x2f, 0xc8, 0x57, 0x59, 0x30, 0x0c, 0x03, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x54, 0x04, 0x00, 0x00, 0x1e, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x18, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x15, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x0d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x0a, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf0, 0x09, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x6c, 0x04, 0x01, 0xf0, 0x04, 0x59, 0x34, 0x02, 0x00, - 0x84, 0x00, 0x05, 0x1a, 0x48, 0x02, 0x6a, 0x00, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf0, 0x24, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x27, 0x04, 0x00, 0x00, 0x0f, - 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x14, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x49, 0x2f, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0xc4, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x31, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x04, 0x01, 0xf0, 0x0a, 0x49, 0x2f, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xc4, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x31, 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x49, 0x42, 0x5a, 0x06, - 0x48, 0x06, 0x58, 0x0d, 0x48, 0x0a, 0x58, 0x0e, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0xc8, 0x57, 0x42, 0x00, 0x70, 0x00, - 0x00, 0x10, 0xaf, 0xc6, 0x58, 0x38, 0x08, 0x07, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x05, 0x49, 0x2c, 0x70, 0x08, 0x49, 0x2c, 0x70, 0x07, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x07, 0xbb, 0x49, 0x2c, 0x08, 0x00, - 0x49, 0x2c, 0x70, 0x07, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x58, 0x00, 0x00, 0x4c, 0x50, 0x00, 0x00, 0x4c, 0x54, 0x00, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x37, 0xc8, 0x57, 0x59, 0xcc, 0x08, 0x06, - 0x48, 0x07, 0xc8, 0x57, 0x82, 0x04, 0x0d, 0x00, 0xff, 0x00, 0x00, 0x00, - 0x82, 0x04, 0x05, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0d, - 0x82, 0x04, 0x05, 0x80, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x82, 0x04, 0x05, 0x80, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x30, - 0x82, 0x04, 0x05, 0x80, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2d, - 0x82, 0x04, 0x05, 0x80, 0x20, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x2f, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x2c, - 0x49, 0x2f, 0xc8, 0x57, 0x49, 0x2e, 0x60, 0x17, 0x59, 0xa8, 0xb0, 0x15, - 0x82, 0x58, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x82, 0x58, 0xb5, 0x00, - 0xff, 0xff, 0xff, 0xfc, 0x80, 0x58, 0xb1, 0x04, 0x48, 0x5a, 0x5c, 0x04, - 0x41, 0x2c, 0x78, 0x00, 0x41, 0xcc, 0xa0, 0x00, 0x82, 0x58, 0x04, 0x80, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x02, 0x10, 0x05, 0x83, 0x2c, 0xac, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xfa, 0x9a, 0x04, 0x01, 0xf0, 0x15, - 0x40, 0x58, 0x08, 0x00, 0x42, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x83, 0x2c, 0xac, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x01, 0xfa, 0x93, - 0x82, 0x04, 0xb4, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x1a, 0x04, 0x00, 0x00, 0x04, 0x49, 0x2c, 0x78, 0x01, - 0x41, 0x2c, 0x78, 0x00, 0x04, 0x01, 0xf7, 0xec, 0x59, 0x32, 0x58, 0x17, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x3b, 0x49, 0x7a, 0x60, 0x17, - 0x80, 0x00, 0x05, 0x80, 0x04, 0x01, 0xf0, 0x06, 0x59, 0x34, 0x02, 0x00, - 0x84, 0x00, 0x05, 0x54, 0x48, 0x02, 0x6a, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x5c, 0x00, 0xa8, 0x00, 0x5c, 0x00, 0xa0, 0x00, - 0x5c, 0x00, 0xb0, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x2f, 0xc8, 0x57, 0x4d, 0x2c, 0x00, 0x00, - 0x4c, 0x5c, 0x00, 0x00, 0x59, 0x30, 0xbc, 0x06, 0x59, 0x30, 0x0a, 0x03, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x3d, - 0x82, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x76, - 0x4d, 0xf0, 0x00, 0x00, 0x59, 0x8c, 0x00, 0x0d, 0x81, 0x30, 0x05, 0x80, - 0x04, 0x02, 0x00, 0x19, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xf0, 0x19, 0x82, 0x5c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x04, 0x02, 0x00, 0x0d, 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xaf, 0xc4, - 0x50, 0x08, 0x10, 0x00, 0x58, 0x08, 0x00, 0x02, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x06, 0x58, 0x08, 0x00, 0x0c, - 0x81, 0x30, 0x05, 0x80, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x04, 0x01, 0xf0, 0x0a, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x66, 0xd5, - 0x04, 0x02, 0x00, 0x28, 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x20, - 0x04, 0x00, 0x00, 0x04, 0x84, 0x00, 0x05, 0x20, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xf0, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcc, 0xce, - 0x80, 0xc4, 0x00, 0x40, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x3d, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x32, 0x58, 0x08, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x82, 0x5c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x04, 0x00, 0x00, 0x1b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x49, 0x75, - 0x82, 0x5c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x16, - 0x59, 0x32, 0x58, 0x17, 0x81, 0x2e, 0x59, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x07, 0x3b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x9c, - 0x80, 0x00, 0x05, 0x80, 0x5c, 0x00, 0xb8, 0x00, 0x5c, 0x02, 0x58, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x5c, 0x03, 0xe0, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x64, 0x63, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x04, 0x00, 0x07, 0xad, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x07, 0xaa, 0x04, 0x01, 0xf7, 0xf3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x04, 0x01, 0xf7, 0xef, - 0x4c, 0x04, 0x00, 0x00, 0x59, 0x34, 0x02, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x1c, 0x04, 0x00, 0x00, 0x09, 0x59, 0xcc, 0x08, 0x05, - 0x59, 0x1c, 0x00, 0x19, 0x48, 0x03, 0xc8, 0x57, 0x80, 0x04, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x05, 0x80, 0x48, 0x03, 0xc8, 0x56, - 0x04, 0x01, 0xf0, 0x03, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, 0x42, 0x00, 0x18, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x01, 0xf0, 0x13, 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, - 0x4c, 0x10, 0x00, 0x00, 0x59, 0x30, 0x20, 0x09, 0x58, 0x10, 0x1c, 0x03, - 0x42, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x01, 0xf0, 0x0b, - 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x0c, 0x00, 0x00, 0x4c, 0x10, 0x00, 0x00, - 0x59, 0x30, 0x20, 0x09, 0x80, 0x10, 0x21, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x58, 0x10, 0x1c, 0x03, 0x42, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x48, 0x0f, 0xc8, 0x57, 0x48, 0x13, 0xc8, 0x57, - 0x48, 0x1b, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0x64, - 0x5c, 0x00, 0x20, 0x00, 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x92, - 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x49, 0x3a, 0x64, 0x03, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x02, 0x07, 0x5c, - 0x4d, 0x40, 0x00, 0x00, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x00, 0x00, 0x06, - 0x85, 0x0e, 0x1d, 0x44, 0x42, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x2a, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x1f, 0x5c, 0x02, 0x80, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa8, 0x00, 0x23, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x00, 0x00, 0x05, 0x59, 0x9c, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x04, 0x20, - 0x84, 0x00, 0x05, 0x40, 0x48, 0x02, 0x64, 0x20, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x04, 0x01, 0xf8, 0x03, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x64, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8c, 0x2f, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x15, 0x42, 0x00, 0xc8, 0x00, - 0x00, 0x00, 0x00, 0x32, 0x42, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x41, 0x30, 0x08, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0a, 0xd5, - 0x04, 0x00, 0x00, 0x0d, 0x59, 0x30, 0x02, 0x03, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x02, 0x00, 0x09, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1e, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x80, 0x64, 0xc8, 0x40, 0x04, 0x02, 0x07, 0xf1, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8c, 0x47, - 0x5c, 0x00, 0xc8, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x17, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x8c, 0x14, 0x2d, 0x2a, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xb9, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xb9, 0x8c, 0x14, 0x2d, 0x2e, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xba, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xba, - 0x8c, 0x14, 0x2d, 0x2c, 0x04, 0x00, 0x00, 0x13, 0x40, 0x14, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x59, 0x88, 0x00, 0x05, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x05, 0x59, 0x88, 0x00, 0xbb, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xbb, 0x5c, 0x00, 0x08, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x17, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x8c, 0x14, 0x2d, 0x2a, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xbc, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xbc, 0x8c, 0x14, 0x2d, 0x2e, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xbd, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xbd, - 0x8c, 0x14, 0x2d, 0x2c, 0x04, 0x00, 0x00, 0x13, 0x40, 0x14, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0d, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x0d, 0x80, - 0x00, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x59, 0x88, 0x00, 0x05, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x05, 0x59, 0x88, 0x00, 0xbe, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xbe, 0x5c, 0x00, 0x08, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x88, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x03, 0x10, 0x01, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0x88, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x48, 0x03, 0x10, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0x88, 0x00, 0x02, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x03, 0x10, 0x02, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x2c, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xa7, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xa7, - 0x8c, 0x04, 0x0d, 0x2a, 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xa8, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xa8, 0x8c, 0x04, 0x0d, 0x28, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xa9, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xa9, 0x8c, 0x04, 0x0d, 0x26, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xaa, - 0x8c, 0x04, 0x0d, 0x24, 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xab, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xab, 0x8c, 0x04, 0x0d, 0x22, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xac, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xac, 0x8c, 0x04, 0x0d, 0x20, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xad, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xad, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x59, 0x88, 0x00, 0xae, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xae, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x4c, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x1c, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xaf, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xaf, 0x8c, 0x04, 0x0d, 0x1a, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xb0, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb0, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x18, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xb1, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb1, - 0x8c, 0x04, 0x0d, 0x16, 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xb2, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb2, 0x8c, 0x04, 0x0d, 0x14, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xb3, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xb3, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x07, 0xc8, 0x57, 0x4c, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x10, - 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xb4, 0x80, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x10, 0xb4, 0x8c, 0x04, 0x0d, 0x0c, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xb5, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb5, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x0d, 0x08, 0x04, 0x00, 0x00, 0x04, - 0x59, 0x88, 0x00, 0xb6, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb6, - 0x8c, 0x04, 0x0d, 0x04, 0x04, 0x00, 0x00, 0x04, 0x59, 0x88, 0x00, 0xb7, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0xb7, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x07, 0xc8, 0x56, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0x88, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x10, 0x80, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x68, 0x00, 0x00, - 0x48, 0x03, 0xc8, 0x57, 0x4c, 0x04, 0x00, 0x00, 0x50, 0x00, 0x08, 0x00, - 0x80, 0x04, 0x08, 0x00, 0x48, 0x07, 0xc8, 0x57, 0x44, 0x04, 0x00, 0x00, - 0x5c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x48, 0x0f, 0xc8, 0x57, - 0x4c, 0x00, 0x00, 0x00, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe7, - 0x04, 0x01, 0xf0, 0x14, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x10, 0x01, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe8, - 0x04, 0x01, 0xf0, 0x0e, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x10, 0x02, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xe9, - 0x04, 0x01, 0xf0, 0x08, 0x82, 0x0c, 0x0c, 0x80, 0x00, 0x00, 0x20, 0x1c, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x82, 0x0c, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x1f, 0x0c, 0x01, 0xf8, 0x04, 0x04, 0x01, 0xff, 0xdd, - 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0xa2, 0xa2, - 0x00, 0x10, 0xa2, 0xa5, 0x00, 0x10, 0xa2, 0xa8, 0x00, 0x10, 0xa2, 0xab, - 0x00, 0x10, 0xa2, 0xae, 0x00, 0x10, 0xa2, 0xb1, 0x00, 0x10, 0xa2, 0xb4, - 0x00, 0x10, 0xa2, 0xb7, 0x00, 0x10, 0xa2, 0xba, 0x00, 0x10, 0xa2, 0xbd, - 0x00, 0x10, 0xa2, 0xc0, 0x00, 0x10, 0xa2, 0xc3, 0x00, 0x10, 0xa2, 0xc6, - 0x00, 0x10, 0xa2, 0xc9, 0x00, 0x10, 0xa2, 0xcc, 0x00, 0x10, 0xa2, 0xcf, - 0x00, 0x10, 0xa2, 0xd2, 0x00, 0x10, 0xa2, 0xd5, 0x00, 0x10, 0xa2, 0xd8, - 0x00, 0x10, 0xa2, 0xdb, 0x00, 0x10, 0xa2, 0xde, 0x00, 0x10, 0xa2, 0xe1, - 0x00, 0x10, 0xa2, 0xe4, 0x00, 0x10, 0xa2, 0xe7, 0x00, 0x10, 0xa2, 0xea, - 0x00, 0x10, 0xa2, 0xed, 0x00, 0x10, 0xa2, 0xf0, 0x00, 0x10, 0xa2, 0xf3, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xea, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xeb, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xec, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xed, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xee, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xef, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf0, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf1, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf2, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf3, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf4, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf5, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf6, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf7, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf8, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xf9, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xfa, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xfb, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xfc, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xfd, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xfe, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xaf, 0xff, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x03, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x04, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x05, 0x1c, 0x01, 0xf0, 0x00, - 0x48, 0x0f, 0xc8, 0x57, 0x4c, 0x00, 0x00, 0x00, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xdc, 0x04, 0x01, 0xf0, 0x12, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xdd, 0x04, 0x01, 0xf0, 0x0c, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xde, 0x04, 0x01, 0xf0, 0x06, 0x82, 0x0c, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xaf, 0xdf, 0x04, 0x01, 0xff, 0x51, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x59, 0xa8, 0x00, 0x23, - 0x48, 0x03, 0xc8, 0x57, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x10, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x0f, 0x04, 0x01, 0xf0, 0x12, 0x8c, 0x00, 0x05, 0x0a, - 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x0e, - 0x04, 0x01, 0xf0, 0x0d, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x04, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x11, 0x04, 0x01, 0xf0, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xa6, 0x04, 0x00, 0x00, 0x06, - 0x8c, 0x00, 0x05, 0x06, 0x04, 0x02, 0x00, 0x04, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xb0, 0x10, 0x04, 0x01, 0xff, 0x33, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x58, 0xb1, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x54, 0x50, 0xa8, 0x00, 0x80, 0x50, 0xa0, 0x00, - 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfc, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x58, 0xb1, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x44, 0x50, 0xa8, 0x00, 0x80, 0x54, 0xa8, 0x00, - 0x80, 0x58, 0xb0, 0x40, 0x04, 0x02, 0x07, 0xfd, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x58, 0xb1, 0xc0, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x04, 0xef, - 0x50, 0x50, 0x00, 0x00, 0x9c, 0x00, 0x01, 0xc0, 0x44, 0x00, 0xa8, 0x00, - 0x80, 0x50, 0xa0, 0x00, 0x80, 0x54, 0xa8, 0x00, 0x80, 0x58, 0xb0, 0x40, - 0x04, 0x02, 0x07, 0xfa, 0x1c, 0x01, 0xf0, 0x00, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xa8, 0x00, 0x07, 0x8c, 0x00, 0x05, 0x1c, 0x5c, 0x00, 0x00, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x21, 0x0c, 0xe7, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x20, 0x2a, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0xfe, - 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x03, 0x35, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xac, 0x88, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0xc0, 0x04, 0x02, 0x09, 0x7c, - 0x04, 0x01, 0xf9, 0x3f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x04, 0x50, - 0x04, 0x01, 0xfa, 0xf5, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x53, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x05, 0xd0, 0x04, 0x01, 0xf7, 0xef, - 0x59, 0xb8, 0x00, 0xea, 0x82, 0x00, 0x0d, 0x00, 0xf0, 0x00, 0x00, 0x38, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x09, 0xba, 0x8c, 0x00, 0x05, 0x10, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09, 0xb9, 0x59, 0xba, 0x60, 0xe0, - 0x81, 0x30, 0x01, 0x82, 0x04, 0x02, 0x10, 0x42, 0x04, 0x00, 0x20, 0x28, - 0x85, 0x32, 0x65, 0x3e, 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x20, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x02, 0x00, 0x1c, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x30, 0x00, 0x04, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x49, 0x7a, 0x58, 0x09, 0x8c, 0x00, 0x05, 0x3e, - 0x04, 0x02, 0x00, 0x10, 0x04, 0x01, 0xfa, 0xb7, 0x59, 0x32, 0x68, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x59, 0x34, 0x00, 0x0f, - 0x59, 0x34, 0x14, 0x0b, 0x80, 0x08, 0x10, 0x40, 0x04, 0x00, 0x10, 0x02, - 0x48, 0x0a, 0x6c, 0x0b, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x0a, 0x2c, - 0x59, 0xb8, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x02, 0x07, 0xdf, - 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, - 0x04, 0x00, 0x07, 0xef, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x09, 0xa5, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x55, 0x04, 0x01, 0xf0, 0x23, - 0x83, 0x32, 0x65, 0x00, 0x3f, 0xff, 0xff, 0xff, 0x59, 0x30, 0x04, 0x06, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x00, 0x11, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x32, 0x68, 0x09, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x49, 0x7a, 0x58, 0x09, 0x04, 0x01, 0xfa, 0x95, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xbb, 0x59, 0x34, 0x00, 0x0f, - 0x59, 0x34, 0x14, 0x0b, 0x80, 0x08, 0x10, 0x40, 0x04, 0x00, 0x10, 0x02, - 0x48, 0x0a, 0x6c, 0x0b, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x0a, 0x0b, - 0x04, 0x01, 0xf7, 0xdf, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x54, - 0x04, 0x01, 0xf0, 0x0a, 0x83, 0x30, 0x05, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09, 0xa8, 0x81, 0x32, 0x65, 0x80, - 0x80, 0x00, 0x01, 0x3a, 0x82, 0x00, 0x04, 0x00, 0x00, 0x10, 0x09, 0xc0, - 0x50, 0x02, 0x70, 0x00, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09, 0xa5, - 0x59, 0x30, 0x00, 0x04, 0x8c, 0x00, 0x05, 0x3e, 0x04, 0x02, 0x00, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0xdf, 0x04, 0x01, 0xf7, 0xc8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x67, 0xa7, 0x04, 0x00, 0x07, 0xfb, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x09, 0xa5, 0x59, 0x32, 0x58, 0x08, - 0x41, 0x2c, 0x70, 0x00, 0x58, 0x38, 0x0a, 0x04, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x0c, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x04, 0x40, 0x00, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x0d, 0x1b, - 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x02, 0x00, 0x94, 0x00, 0x10, 0x0d, 0x1b, - 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1b, - 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x02, 0x00, 0xa4, 0x00, 0x10, 0x0d, 0x2f, - 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1d, - 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1b, 0x00, 0x10, 0x0d, 0x1b, - 0x58, 0x38, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x00, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x50, 0x20, 0x00, 0x00, 0x80, 0x38, 0x7c, 0x00, - 0x58, 0x3c, 0x10, 0x02, 0x58, 0x3c, 0x28, 0x00, 0x58, 0x3c, 0x20, 0x01, - 0x58, 0x38, 0x0a, 0x07, 0x58, 0x38, 0x30, 0x0f, 0x59, 0x30, 0x38, 0x07, - 0x58, 0x38, 0x4c, 0x08, 0x58, 0x38, 0x00, 0x0d, 0x48, 0x02, 0x60, 0x12, - 0x04, 0x01, 0xf0, 0x10, 0x58, 0x38, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x02, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x1b, 0x50, 0x20, 0x00, 0x00, - 0x80, 0x38, 0x7c, 0x00, 0x58, 0x3c, 0x28, 0x00, 0x58, 0x3c, 0x20, 0x01, - 0x58, 0x3c, 0x10, 0x02, 0x59, 0x2c, 0x0a, 0x07, 0x59, 0x2c, 0x4c, 0x08, - 0x59, 0x2c, 0x30, 0x0f, 0x59, 0x30, 0x38, 0x07, 0x49, 0x7a, 0x60, 0x12, - 0x49, 0x7a, 0x60, 0x13, 0x48, 0x16, 0x60, 0x0e, 0x48, 0x12, 0x60, 0x0f, - 0x48, 0x0a, 0x60, 0x10, 0x48, 0x1a, 0x60, 0x11, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x06, 0x60, 0x0d, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x0d, 0x5c, - 0x84, 0x1c, 0x3d, 0x40, 0x48, 0x1e, 0x60, 0x07, 0x1c, 0x01, 0xf0, 0x00, - 0x41, 0x78, 0x78, 0x00, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x0c, 0x0a, - 0x8c, 0x04, 0x0d, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0e, 0xd3, - 0x59, 0x2c, 0x00, 0x0d, 0x59, 0x2c, 0x10, 0x0f, 0x59, 0x2c, 0x0a, 0x04, - 0x48, 0x0a, 0x60, 0x11, 0x48, 0x02, 0x60, 0x12, 0x48, 0x02, 0x60, 0x13, - 0x41, 0x2c, 0x30, 0x00, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x10, 0x0f, 0xd8, 0x50, 0x00, 0x38, 0x00, - 0x50, 0x1c, 0x00, 0x00, 0x40, 0x1c, 0x10, 0x00, 0x59, 0x2c, 0x1a, 0x07, - 0x48, 0x02, 0x60, 0x0a, 0x48, 0x1a, 0x60, 0x0b, 0x48, 0x0a, 0x60, 0x0c, - 0x48, 0x0e, 0x60, 0x0d, 0x84, 0x3c, 0x7d, 0x4a, 0x40, 0x3c, 0x10, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x0a, 0x04, 0x49, 0x7a, 0x60, 0x12, - 0x41, 0x78, 0x78, 0x00, 0x59, 0x2c, 0x1a, 0x07, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x82, 0x00, 0x04, 0x00, 0x00, 0x10, 0x0f, 0xd8, - 0x50, 0x00, 0x40, 0x00, 0x50, 0x20, 0x00, 0x00, 0x48, 0x02, 0x60, 0x0a, - 0x49, 0x2e, 0x60, 0x0b, 0x48, 0x22, 0x60, 0x0c, 0x48, 0x0e, 0x60, 0x0d, - 0x48, 0x3e, 0x60, 0x04, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x02, 0x01, 0x3e, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, 0x00, 0x02, 0x01, 0x2b, - 0x00, 0x02, 0x01, 0x2b, 0x4c, 0x00, 0x00, 0x00, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0xb0, 0x10, 0x00, 0x00, 0x41, 0xf0, 0x00, 0x00, - 0x81, 0xfe, 0x15, 0x00, 0x8d, 0x0a, 0x15, 0x12, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x13, 0x36, 0x8d, 0x0a, 0x15, 0x18, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x02, 0x07, 0x68, 0x8d, 0x0a, 0x15, 0x1a, 0x04, 0x02, 0x0e, 0xde, - 0x83, 0x08, 0x05, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x04, 0x02, 0x08, 0x04, - 0x5c, 0x03, 0xe0, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x18, 0x01, 0xf0, 0x00, - 0x8d, 0x0a, 0x15, 0x16, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x11, 0xa5, - 0x8d, 0x0a, 0x15, 0x14, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x10, 0x70, - 0x8d, 0x0a, 0x15, 0x08, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x10, 0x75, - 0x8d, 0x0a, 0x15, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x06, 0xcf, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xac, 0x8e, - 0x50, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x04, 0x04, 0x00, 0x00, 0x14, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xac, 0x8e, 0x50, 0x00, 0x00, 0x00, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x42, 0x03, 0x40, 0x00, 0x00, 0x10, 0xac, 0x71, 0x59, 0xa0, 0x00, 0x1d, - 0x59, 0xa1, 0xd8, 0x1e, 0x84, 0x00, 0x05, 0x02, 0x48, 0x03, 0x40, 0x1d, - 0x58, 0xec, 0x00, 0x09, 0x08, 0x01, 0xf8, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x02, 0x70, 0x02, 0x04, 0x02, 0x60, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x1a, - 0x04, 0x00, 0x00, 0x1a, 0x41, 0x2d, 0xd8, 0x00, 0x48, 0xef, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x37, 0xda, 0x42, 0x03, 0x40, 0x00, - 0x00, 0x10, 0xac, 0x71, 0x49, 0xa1, 0xd8, 0x0b, 0x48, 0xef, 0x40, 0x1e, - 0x59, 0xa0, 0x00, 0x1d, 0x84, 0x00, 0x05, 0x44, 0x48, 0x03, 0x40, 0x1d, - 0x59, 0xe0, 0x00, 0x20, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xe0, 0x00, 0x21, - 0x48, 0x03, 0xc8, 0x57, 0x59, 0xe0, 0x00, 0x22, 0x48, 0x03, 0xc8, 0x57, - 0x59, 0xe0, 0x00, 0x23, 0x48, 0x03, 0xc8, 0x57, 0x59, 0xe0, 0x00, 0x24, - 0x48, 0x03, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1d, 0xe3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1e, 0x02, 0x5c, 0x03, 0xe0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xa0, 0x00, 0x00, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x60, 0x51, - 0x42, 0x03, 0x40, 0x00, 0x00, 0x10, 0xac, 0x71, 0x59, 0xa0, 0x10, 0x17, - 0x59, 0xa0, 0x18, 0x18, 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xa0, 0x38, 0x1b, 0x80, 0x1c, 0x39, 0xc0, 0x02, 0x00, 0x08, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x59, 0xa0, 0x04, 0x1c, 0x80, 0x1c, 0x3c, 0x00, - 0x04, 0x01, 0xf0, 0x0c, 0x59, 0xa0, 0x04, 0x19, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x48, 0x03, 0x44, 0x19, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x03, 0x49, 0x7b, 0x44, 0x19, - 0x41, 0x78, 0x00, 0x00, 0x59, 0xa0, 0x38, 0x16, 0x80, 0x1c, 0x3c, 0x00, - 0x80, 0x08, 0x10, 0x40, 0x48, 0x0b, 0x40, 0x17, 0x58, 0x1c, 0x02, 0x00, - 0x48, 0x03, 0xc0, 0x21, 0x58, 0x1c, 0x04, 0x01, 0x48, 0x03, 0xc0, 0x22, - 0x58, 0x1c, 0x02, 0x01, 0x48, 0x03, 0xc0, 0x23, 0x58, 0x1c, 0x04, 0x00, - 0x48, 0x03, 0xc0, 0x20, 0x90, 0x00, 0x01, 0xc0, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x00, 0x12, 0x48, 0x03, 0xc0, 0x11, 0x59, 0xe0, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, 0x4a, 0x03, 0xc0, 0x17, - 0x00, 0x00, 0x00, 0x02, 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, - 0x80, 0x0c, 0x19, 0xc0, 0x04, 0x00, 0x00, 0x07, 0x80, 0x0c, 0x18, 0x40, - 0x48, 0x0f, 0x40, 0x18, 0x04, 0x02, 0x00, 0x1f, 0x49, 0x7b, 0x44, 0x19, - 0x49, 0x7b, 0x42, 0x19, 0x04, 0x01, 0xf0, 0x1c, 0x80, 0x08, 0x11, 0xc0, - 0x04, 0x02, 0x00, 0x0b, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0xa2, 0x58, 0x1b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x2e, 0x5c, 0x02, 0x58, 0x00, - 0x49, 0x7b, 0x40, 0x1b, 0x49, 0x7b, 0x40, 0x1a, 0x49, 0x7b, 0x44, 0x1c, - 0x49, 0x7b, 0x42, 0x1c, 0x04, 0x01, 0xf0, 0x10, 0x59, 0xa0, 0x04, 0x1c, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x48, 0x03, 0x44, 0x1c, 0x04, 0x00, 0x10, 0x09, - 0x4d, 0x2c, 0x00, 0x00, 0x59, 0xa2, 0x58, 0x1b, 0x59, 0x2c, 0x38, 0x13, - 0x48, 0x1f, 0x40, 0x1b, 0x49, 0x7b, 0x44, 0x1c, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x2e, 0x5c, 0x02, 0x58, 0x00, 0x5c, 0x03, 0xe0, 0x00, - 0x5c, 0x03, 0x40, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x0c, 0x05, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x3f, 0xe4, - 0x59, 0x34, 0x04, 0x00, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x06, 0x06, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x3f, 0xb6, 0x59, 0x34, 0x00, 0x0d, - 0x80, 0x02, 0x7d, 0x40, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x3f, 0xef, - 0x04, 0x01, 0xf8, 0x03, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x34, 0x00, 0x0f, 0x59, 0x34, 0x12, 0x03, 0x80, 0x08, 0x05, 0x40, - 0x04, 0x02, 0x00, 0x5f, 0x59, 0x34, 0x00, 0x0b, 0x80, 0x00, 0x11, 0x20, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x59, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x07, 0x99, - 0x04, 0x00, 0x00, 0x52, 0x59, 0x2c, 0x04, 0x06, 0x49, 0x36, 0x60, 0x09, - 0x49, 0x2e, 0x60, 0x08, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x40, 0x80, 0x08, 0x10, 0x00, - 0x48, 0x0a, 0x6c, 0x0b, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x10, 0xc4, - 0x80, 0x08, 0x04, 0x00, 0x59, 0x2c, 0x08, 0x08, 0x59, 0x2c, 0x18, 0x09, - 0x59, 0x2c, 0x02, 0x0a, 0x48, 0x0a, 0x62, 0x06, 0x48, 0x06, 0x60, 0x17, - 0x48, 0x0e, 0x60, 0x18, 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x00, 0x2a, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x04, 0x59, 0x2c, 0x02, 0x07, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x00, 0x1a, 0x59, 0xa8, 0x00, 0x6d, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, 0x59, 0x2c, 0x02, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x18, 0x04, 0x02, 0x00, 0x11, 0x59, 0x2c, 0x18, 0x0f, - 0x59, 0x30, 0x00, 0x07, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x91, - 0x48, 0x0e, 0x60, 0x11, 0x48, 0x02, 0x60, 0x07, 0x42, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x00, 0x04, 0x48, 0x02, 0x60, 0x04, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x48, 0x03, 0x78, 0xe1, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x01, 0xfe, 0x4c, 0x59, 0x30, 0x00, 0x07, 0x84, 0x00, 0x05, 0x4e, - 0x48, 0x02, 0x60, 0x07, 0x59, 0x2c, 0x1a, 0x04, 0x82, 0x0c, 0x1d, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, - 0x04, 0x00, 0x00, 0x12, 0x04, 0x01, 0xf7, 0xec, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x02, 0x0e, 0x9f, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x02, - 0x59, 0xa8, 0x00, 0x6e, 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x07, 0xff, - 0x59, 0x2c, 0x1a, 0x04, 0x82, 0x0c, 0x1d, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x07, 0xdf, - 0x82, 0x0c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x48, 0x04, 0x02, 0x07, 0xdc, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x08, 0x04, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x63, 0x2f, 0x80, 0x08, 0x11, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x4a, 0x02, 0x6a, 0x03, 0x00, 0x00, 0x00, 0x01, 0x59, 0x34, 0x00, 0x10, - 0x49, 0x2e, 0x68, 0x10, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x00, 0x03, - 0x49, 0x2e, 0x68, 0x0f, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2c, 0x08, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x44, 0x0c, 0x80, 0x00, 0x00, 0x08, 0x00, - 0x04, 0x02, 0x10, 0x09, 0x83, 0x44, 0x04, 0x00, 0x00, 0x10, 0xa4, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0x04, - 0x40, 0x02, 0x68, 0x00, 0x80, 0x00, 0x05, 0x80, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x34, 0x02, 0x03, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x4d, - 0x4d, 0x30, 0x00, 0x00, 0x4d, 0x2c, 0x00, 0x00, 0x59, 0x34, 0x00, 0x0f, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x00, 0x00, 0x46, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x07, 0x99, 0x04, 0x00, 0x00, 0x41, 0x59, 0x2c, 0x00, 0x00, - 0x48, 0x02, 0x68, 0x0f, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, - 0x48, 0x02, 0x68, 0x10, 0x59, 0x2c, 0x2a, 0x04, 0x80, 0x08, 0x10, 0x00, - 0x48, 0x0a, 0x6c, 0x0b, 0x49, 0x36, 0x60, 0x09, 0x49, 0x2e, 0x60, 0x08, - 0x82, 0x14, 0x2d, 0x00, 0x00, 0x00, 0x00, 0xff, 0x82, 0x14, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x12, 0x04, 0x00, 0x00, 0x37, 0x4a, 0x02, 0x64, 0x06, - 0x00, 0x00, 0x00, 0x03, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x40, - 0x59, 0x2c, 0x04, 0x06, 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x18, 0xc4, - 0x80, 0x0c, 0x04, 0x00, 0x48, 0x02, 0x62, 0x06, 0x59, 0x2c, 0x08, 0x08, - 0x59, 0x2c, 0x18, 0x09, 0x59, 0x2c, 0x02, 0x0a, 0x48, 0x06, 0x60, 0x17, - 0x48, 0x0e, 0x60, 0x18, 0x8c, 0x00, 0x05, 0x02, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x44, 0x67, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x04, - 0x59, 0x2c, 0x02, 0x07, 0x80, 0x00, 0x00, 0x40, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x44, 0x5a, 0x82, 0x14, 0x05, 0x80, 0x00, 0x00, 0x00, 0x18, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x44, 0x5a, 0x59, 0x2c, 0x18, 0x0f, - 0x59, 0x30, 0x00, 0x07, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x91, - 0x48, 0x0e, 0x60, 0x11, 0x48, 0x02, 0x60, 0x07, 0x42, 0x00, 0x00, 0x00, - 0x80, 0x08, 0x00, 0x04, 0x48, 0x02, 0x60, 0x04, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x48, 0x03, 0x78, 0xe1, 0x59, 0x34, 0x00, 0x0b, - 0x80, 0x00, 0x11, 0x20, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x80, 0x08, 0x04, 0x80, 0x04, 0x00, 0x17, 0xbc, 0x04, 0x01, 0xf0, 0x03, - 0x4a, 0x02, 0x6a, 0x03, 0x00, 0x00, 0x00, 0x01, 0x5c, 0x02, 0x58, 0x00, - 0x5c, 0x02, 0x60, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7a, 0x58, 0x00, - 0x49, 0x32, 0x58, 0x09, 0x4a, 0x02, 0x64, 0x06, 0x00, 0x00, 0x00, 0x06, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x07, 0x04, 0x01, 0xf8, 0x02, - 0x04, 0x01, 0xf7, 0xed, 0x8d, 0x0e, 0x1d, 0x0e, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x44, 0x89, 0x8d, 0x0e, 0x1d, 0x04, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x44, 0x85, 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x18, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x44, 0x81, 0x59, 0x2c, 0x0a, 0x0c, - 0x48, 0x06, 0x62, 0x02, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x8c, 0x00, 0x05, 0x08, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x44, 0x7d, - 0x4d, 0x3c, 0x00, 0x00, 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x06, 0xd5, 0x5c, 0x02, 0x78, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x7a, 0x58, 0x01, 0x40, 0x06, 0x58, 0x00, 0x59, 0x2c, 0x00, 0x01, - 0x49, 0x6a, 0x58, 0x00, 0x81, 0x5e, 0xb8, 0x00, 0x41, 0x2e, 0xd0, 0x00, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x07, 0xf9, 0x59, 0xc8, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x12, 0x00, 0x48, 0x03, 0x90, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x98, 0x00, 0x14, 0x48, 0x03, 0x28, 0x19, - 0x59, 0xd8, 0x09, 0x0b, 0x48, 0x07, 0x30, 0x15, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x2c, 0x04, 0x04, 0x8c, 0x00, 0x05, 0x1e, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x4a, 0x7b, 0x49, 0x7a, 0x58, 0x00, 0x8d, 0x0e, 0x1d, 0x26, - 0x04, 0x02, 0x00, 0x0e, 0x04, 0x02, 0xd0, 0x07, 0x59, 0x2c, 0x00, 0x01, - 0x49, 0x2f, 0xb1, 0x07, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x0f, 0xe3, - 0x04, 0x00, 0xe0, 0x65, 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x00, 0xe8, 0x63, - 0x04, 0x00, 0xd7, 0xf9, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x24, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa2, 0x60, 0x04, 0x01, 0xf8, 0xa8, - 0x04, 0x00, 0xd8, 0xb3, 0x04, 0x00, 0xe0, 0x5b, 0x59, 0xd8, 0x01, 0x05, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x01, 0x87, 0x80, 0x04, 0x02, 0x00, 0xc2, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x98, 0x00, 0x12, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x02, 0x03, 0x0a, 0x00, 0x02, 0x03, 0x0b, 0x00, 0x02, 0x03, 0x16, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x04, 0x02, 0x68, 0xc2, 0x04, 0x00, 0x60, 0x03, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x09, 0x2b, 0x8d, 0x0e, 0x1d, 0x26, - 0x04, 0x02, 0x08, 0x9e, 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x59, 0x94, 0x00, 0x19, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x20, 0x1b, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0x98, 0x00, 0x13, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x16, 0x59, 0xa8, 0x00, 0x66, - 0x81, 0x64, 0x05, 0x80, 0x04, 0x02, 0x00, 0x13, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x00, 0x00, 0x07, 0x59, 0xa8, 0x00, 0x67, 0x59, 0xa8, 0x08, 0x63, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x00, 0x0d, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x02, 0x00, 0x22, 0x59, 0xd8, 0x09, 0x0b, 0x59, 0xd8, 0x01, 0x0a, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x1b, 0x59, 0x98, 0x00, 0x15, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x0c, 0x59, 0x98, 0x00, 0x14, - 0x48, 0x03, 0x28, 0x19, 0x48, 0x07, 0x30, 0x15, 0x04, 0x00, 0xe8, 0xcc, - 0x04, 0x00, 0x60, 0x03, 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x08, 0xe1, - 0x8d, 0x0e, 0x1d, 0x26, 0x04, 0x02, 0x08, 0x76, 0x5c, 0x03, 0xe0, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x00, 0x67, 0xf8, 0x4a, 0x03, 0xc0, 0x11, - 0x80, 0x40, 0x00, 0x12, 0x4a, 0x03, 0xc0, 0x20, 0x00, 0x00, 0x80, 0x40, - 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x02, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x4a, 0x03, 0x28, 0x19, 0xff, 0xff, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xea, 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x08, 0x0f, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x59, 0xe0, 0x00, 0x10, - 0x59, 0xe0, 0x10, 0x10, 0x80, 0x08, 0x15, 0x80, 0x04, 0x02, 0x07, 0xfd, - 0x40, 0x06, 0x50, 0x00, 0x80, 0x04, 0x15, 0x80, 0x04, 0x00, 0x07, 0xd5, - 0x04, 0x00, 0x67, 0xe2, 0x04, 0x01, 0xf7, 0xe6, 0x59, 0xd8, 0x11, 0x08, - 0x83, 0x5c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x0f, - 0x04, 0x02, 0xb0, 0x0d, 0x48, 0x0b, 0xb0, 0x07, 0x04, 0x00, 0xe7, 0xfa, - 0x59, 0xd8, 0x01, 0x05, 0x82, 0x00, 0x05, 0x00, 0x00, 0x01, 0x87, 0x80, - 0x04, 0x02, 0x00, 0x61, 0x8d, 0x0e, 0x1d, 0x22, 0x04, 0x00, 0x00, 0x12, - 0x59, 0x94, 0x00, 0x19, 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x27, 0x7b, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x00, 0xf0, 0x0a, 0x49, 0x68, 0x10, 0x00, - 0x40, 0x0a, 0xd0, 0x00, 0x81, 0x5e, 0xb8, 0x00, 0x59, 0xc8, 0x00, 0x00, - 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x12, 0x00, 0x48, 0x03, 0x90, 0x00, - 0x04, 0x02, 0xe7, 0xee, 0x04, 0x01, 0xf7, 0xe6, 0x48, 0x0b, 0xa8, 0x07, - 0x04, 0x02, 0xe7, 0xeb, 0x04, 0x01, 0xf7, 0xe3, 0x04, 0x00, 0x60, 0x21, - 0x85, 0x0e, 0x1d, 0x24, 0x59, 0xd8, 0x01, 0x0a, 0x59, 0xd8, 0x09, 0x0a, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x80, 0x04, 0x08, 0xe0, - 0x8d, 0x0e, 0x1d, 0x20, 0x04, 0x02, 0x00, 0x1b, 0x82, 0x04, 0x0d, 0x40, - 0x00, 0x00, 0x00, 0x13, 0x48, 0x07, 0xc0, 0x11, 0x59, 0xe0, 0x00, 0x17, - 0x8c, 0x00, 0x05, 0x08, 0x04, 0x02, 0x00, 0x04, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x04, 0x05, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x1d, - 0x04, 0x00, 0x00, 0x06, 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x03, - 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, - 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x0d, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x85, 0x0e, 0x1d, 0x64, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x10, 0x0f, - 0x80, 0x08, 0x15, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x81, 0x28, 0x15, 0x80, - 0x04, 0x00, 0x07, 0xe1, 0x40, 0x02, 0x50, 0x00, 0x82, 0x04, 0x0d, 0x40, - 0x00, 0x00, 0x00, 0x1d, 0x04, 0x01, 0xf7, 0xdf, 0x59, 0x98, 0x08, 0x17, - 0x59, 0x2c, 0x00, 0x01, 0x49, 0x2f, 0x30, 0x17, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x49, 0x2c, 0x08, 0x00, 0x80, 0x00, 0x0d, 0x40, - 0x04, 0x02, 0x07, 0x2b, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x2f, 0x30, 0x18, - 0x85, 0x0e, 0x1d, 0x66, 0x04, 0x01, 0xf7, 0xfb, 0x04, 0x02, 0xd0, 0x0c, - 0x59, 0x98, 0x08, 0x18, 0x58, 0x04, 0x00, 0x00, 0x48, 0x07, 0xb1, 0x07, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x00, 0x05, 0x48, 0x03, 0x30, 0x17, - 0x85, 0x0e, 0x1d, 0x26, 0x48, 0x03, 0x30, 0x18, 0x1c, 0x01, 0xf0, 0x00, - 0x04, 0x00, 0xd7, 0xf8, 0x04, 0x01, 0xf7, 0xfd, 0x59, 0xd8, 0x01, 0x05, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x01, 0x87, 0x80, 0x04, 0x02, 0x00, 0x05, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x24, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x48, 0x03, 0xc8, 0x57, 0x48, 0x5f, 0xc8, 0x57, - 0x8c, 0x00, 0x05, 0x0e, 0x02, 0x02, 0x08, 0x00, 0x00, 0x10, 0x04, 0xe4, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x42, 0x00, 0xb8, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x04, 0xf4, - 0x04, 0x00, 0xe7, 0x8a, 0x59, 0xd8, 0x01, 0x05, 0x82, 0x00, 0x05, 0x00, - 0x00, 0x01, 0x87, 0x80, 0x04, 0x02, 0x07, 0xf1, 0x8d, 0x0e, 0x1d, 0x24, - 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xd8, 0x01, 0x0a, - 0x59, 0xd8, 0x09, 0x0a, 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x07, 0xfd, - 0x80, 0x04, 0x08, 0xe0, 0x85, 0x0e, 0x1d, 0x24, 0x8d, 0x0e, 0x1d, 0x20, - 0x04, 0x02, 0x00, 0x19, 0x82, 0x04, 0x0d, 0x40, 0x00, 0x00, 0x00, 0x13, - 0x48, 0x07, 0xc0, 0x11, 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, - 0x04, 0x02, 0x00, 0x04, 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x04, 0x00, 0x00, 0x06, - 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x03, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0xc0, 0x17, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x01, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x10, 0x0f, - 0x80, 0x08, 0x15, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x81, 0x28, 0x15, 0x80, - 0x04, 0x00, 0x07, 0xe3, 0x40, 0x02, 0x50, 0x00, 0x82, 0x04, 0x0d, 0x40, - 0x00, 0x00, 0x00, 0x1d, 0x04, 0x01, 0xf7, 0xe1, 0x59, 0xda, 0x59, 0x08, - 0x49, 0x6a, 0x58, 0x00, 0x41, 0x2e, 0xd0, 0x00, 0x81, 0x5e, 0xb8, 0x00, - 0x04, 0x00, 0xe7, 0xfc, 0x59, 0xc8, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, - 0x00, 0x00, 0x12, 0x00, 0x48, 0x03, 0x90, 0x00, 0x59, 0xd8, 0x09, 0x0b, - 0x59, 0x98, 0x00, 0x15, 0x48, 0x07, 0x30, 0x15, 0x80, 0x04, 0x04, 0x80, - 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x19, 0x80, 0x00, 0x05, 0x40, - 0x04, 0x02, 0x20, 0x03, 0x59, 0x98, 0x08, 0x14, 0x48, 0x07, 0x28, 0x19, - 0x59, 0xd8, 0x01, 0x05, 0x82, 0x00, 0x05, 0x00, 0x00, 0x01, 0x87, 0x80, - 0x04, 0x02, 0x07, 0xad, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x98, 0x10, 0x16, - 0x59, 0xe0, 0x00, 0x10, 0x59, 0xe0, 0x08, 0x10, 0x80, 0x04, 0x1d, 0x80, - 0x04, 0x02, 0x07, 0xfd, 0x80, 0x08, 0x05, 0x80, 0x04, 0x00, 0x00, 0x11, - 0x48, 0x07, 0x30, 0x16, 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x10, 0x0f, - 0x80, 0x08, 0x1d, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x81, 0x28, 0x05, 0x80, - 0x04, 0x00, 0x00, 0x06, 0x40, 0x0a, 0x50, 0x00, 0x40, 0x08, 0x00, 0x00, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x02, 0x06, 0xb9, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x94, 0x00, 0x19, 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x27, 0xfa, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x10, 0x0f, - 0x80, 0x08, 0x1d, 0x80, 0x04, 0x02, 0x07, 0xfd, 0x81, 0x28, 0x05, 0x80, - 0x04, 0x00, 0x07, 0xf6, 0x40, 0x0a, 0x50, 0x00, 0x59, 0x94, 0x00, 0x19, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x27, 0xef, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xe0, 0x00, 0x0f, 0x59, 0xe0, 0x10, 0x0f, 0x80, 0x08, 0x0d, 0x80, - 0x04, 0x02, 0x07, 0xfd, 0x81, 0x28, 0x05, 0x80, 0x04, 0x02, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x40, 0x0a, 0x50, 0x00, 0x90, 0x08, 0x11, 0xc0, - 0x82, 0x08, 0x15, 0x40, 0x00, 0x00, 0x00, 0x1c, 0x48, 0x0b, 0xc0, 0x11, - 0x59, 0xe0, 0x00, 0x17, 0x8c, 0x00, 0x05, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0xc0, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x42, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x01, 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x70, 0x00, 0x00, - 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x4f, 0x9e, 0x00, 0x02, 0x04, 0x5b, - 0x00, 0x10, 0x4f, 0x9e, 0x00, 0x10, 0x4f, 0x9f, 0x00, 0x10, 0x4f, 0x9c, - 0x00, 0x10, 0x4f, 0x9c, 0x00, 0x10, 0x4f, 0x9c, 0x00, 0x10, 0x4f, 0x9c, - 0x00, 0x10, 0x54, 0x29, 0x04, 0x01, 0x00, 0x37, 0x59, 0x98, 0x00, 0x04, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x3c, 0x04, 0x02, 0xc0, 0x1c, - 0x42, 0x02, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x10, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x49, 0xdb, 0x30, 0x03, - 0x59, 0xda, 0x58, 0x08, 0x59, 0x2c, 0x2a, 0x04, 0x49, 0x7a, 0x58, 0x00, - 0x49, 0x7a, 0x58, 0x01, 0x82, 0x14, 0x05, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x79, 0x04, 0x02, 0x10, 0x36, - 0x0c, 0x01, 0xf8, 0x39, 0x5c, 0x03, 0xe0, 0x00, 0x81, 0x7e, 0xf8, 0x40, - 0x04, 0x00, 0x00, 0x09, 0x83, 0x6c, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x02, 0x00, 0x06, 0x83, 0x70, 0x05, 0x80, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x02, 0x00, 0x10, 0x04, 0x01, 0x00, 0x1b, 0x04, 0x00, 0xc7, 0xe8, - 0x04, 0x00, 0xf9, 0x40, 0x04, 0x00, 0xb1, 0x2a, 0x59, 0xd4, 0x00, 0x05, - 0x82, 0x00, 0x05, 0x00, 0x43, 0x01, 0x87, 0x80, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x53, 0xbf, 0x59, 0xd8, 0x00, 0x05, 0x82, 0x00, 0x05, 0x00, - 0x43, 0x01, 0x87, 0x80, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x53, 0xc6, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x70, 0x05, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x4f, 0x9f, 0x83, 0x70, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x02, 0x07, 0xed, 0x04, 0x01, 0x00, 0x05, - 0x04, 0x00, 0xc7, 0xd2, 0x04, 0x01, 0xf7, 0xea, 0x42, 0x02, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x49, 0xd7, 0x30, 0x03, 0x59, 0xd6, 0x58, 0x08, - 0x04, 0x01, 0xf7, 0xce, 0x4d, 0xf0, 0x00, 0x00, 0x42, 0x03, 0xe0, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x40, 0x02, 0x58, 0x00, 0x59, 0x2c, 0x2a, 0x04, - 0x49, 0x7b, 0x30, 0x03, 0x49, 0x7b, 0x30, 0x04, 0x42, 0x02, 0xf8, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x04, 0x01, 0xf7, 0xc7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x50, 0x0f, 0x5c, 0x03, 0xe0, 0x00, 0x04, 0x01, 0xf7, 0xd4, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0xaa, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x1f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0xd2, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x02, 0x05, 0x4c, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x52, 0x37, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x02, 0x05, 0x21, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x42, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x53, 0x53, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x53, 0x9e, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x39, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x53, 0x17, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x52, 0xe5, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x52, 0xe5, - 0x00, 0x10, 0x53, 0xf0, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x52, 0xa7, 0x00, 0x10, 0x53, 0xd5, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x53, 0xe4, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, 0x00, 0x10, 0x50, 0x0f, - 0x00, 0x10, 0x50, 0x0f, 0x80, 0x14, 0x01, 0x10, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x00, 0x0b, 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x50, 0x17, - 0x4a, 0x03, 0x30, 0x06, 0x00, 0x02, 0x05, 0x2e, 0x48, 0x03, 0x30, 0x00, - 0x49, 0x2f, 0x30, 0x01, 0x49, 0x2f, 0x30, 0x02, 0x42, 0x02, 0xe0, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x04, 0x06, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x19, 0x9a, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x50, 0x27, 0x8d, 0x0e, 0x1d, 0x0e, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x50, 0x4b, 0x59, 0x2e, 0x8a, 0x06, 0x83, 0x44, 0x0c, 0x80, - 0x00, 0x00, 0x07, 0xf0, 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x50, 0x27, - 0x83, 0x44, 0x04, 0x00, 0x00, 0x10, 0xa4, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x80, 0x02, 0x6d, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x50, 0x5f, - 0x59, 0x34, 0x00, 0x02, 0x59, 0x2c, 0x08, 0x10, 0x80, 0x04, 0x05, 0x80, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x50, 0x27, 0x04, 0x01, 0xfc, 0x98, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x50, 0x62, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x14, 0x01, 0x10, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x50, 0x17, 0x80, 0x00, 0x00, 0x40, - 0x04, 0x02, 0x00, 0x0b, 0x59, 0x2c, 0x04, 0x0a, 0x8c, 0x00, 0x05, 0x04, - 0x04, 0x00, 0x00, 0x0b, 0x59, 0x2c, 0x02, 0x07, 0x82, 0x00, 0x0c, 0x80, - 0x00, 0x00, 0x10, 0x01, 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x50, 0x27, - 0x02, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x54, 0x03, 0x4a, 0x03, 0x30, 0x06, - 0x00, 0x02, 0x05, 0x5e, 0x04, 0x01, 0xf7, 0xcb, 0x59, 0x2c, 0x04, 0x06, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x19, 0x9a, 0x02, 0x02, 0x10, 0x00, - 0x00, 0x10, 0x50, 0x27, 0x59, 0x2e, 0x8a, 0x06, 0x41, 0x7a, 0x78, 0x00, - 0x04, 0x01, 0xfc, 0xf5, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x51, 0xdb, - 0x59, 0x34, 0x00, 0x02, 0x59, 0x2c, 0x08, 0x08, 0x80, 0x04, 0x05, 0x80, - 0x82, 0x00, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x50, 0x27, 0x59, 0x2e, 0x60, 0x09, 0x49, 0x7a, 0x58, 0x08, - 0x83, 0x30, 0x05, 0x80, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x51, 0x9b, 0x83, 0x30, 0x04, 0x80, 0x00, 0x10, 0xd8, 0xd4, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x51, 0xf8, 0x59, 0xa8, 0x00, 0x0a, - 0x81, 0x30, 0x04, 0x80, 0x02, 0x02, 0x10, 0x00, 0x00, 0x10, 0x51, 0xf8, - 0x59, 0x2c, 0x24, 0x0a, 0x49, 0x36, 0x60, 0x09, 0x8c, 0x10, 0x25, 0x1c, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x51, 0x89, 0x59, 0xa8, 0x00, 0x65, - 0x8c, 0x00, 0x05, 0x10, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x52, 0x11, - 0x8d, 0x0e, 0x1d, 0x0e, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x51, 0x6f, - 0x8d, 0x0e, 0x1d, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x52, 0x02, - 0x59, 0x34, 0x02, 0x00, 0x8c, 0x00, 0x05, 0x18, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x51, 0xf3, 0x59, 0x30, 0x0c, 0x06, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x51, 0x93, - 0x59, 0x30, 0x04, 0x14, 0x8c, 0x00, 0x05, 0x16, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x51, 0xfd, 0x8c, 0x10, 0x25, 0x08, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x9d, 0xa4, 0x59, 0x30, 0x08, 0x08, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x09, 0xc0, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x51, 0x6a, 0x59, 0x2c, 0x0a, 0x0c, 0x48, 0x06, 0x62, 0x02, - 0x49, 0x2e, 0x60, 0x08, 0x04, 0x01, 0xf1, 0x30, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x02, 0xb0, 0x0b, - 0x83, 0x5c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x0d, - 0x81, 0x5e, 0xb8, 0x40, 0x41, 0x6a, 0x58, 0x00, 0x59, 0x2e, 0xd0, 0x00, - 0x49, 0x2f, 0xb0, 0x07, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x04, 0x00, 0xb7, 0xf7, 0x59, 0xd8, 0x00, 0x05, 0x82, 0x00, 0x05, 0x00, - 0x43, 0x01, 0x87, 0x80, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x53, 0xc6, - 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x02, 0xf0, 0x0b, - 0x83, 0x5c, 0x04, 0x80, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x10, 0x0d, - 0x81, 0x5e, 0xb8, 0x40, 0x41, 0x6a, 0x58, 0x00, 0x59, 0x2e, 0xd0, 0x00, - 0x49, 0x2f, 0xa8, 0x07, 0x49, 0x7a, 0x58, 0x00, 0x49, 0x7a, 0x58, 0x01, - 0x04, 0x00, 0xf7, 0xf7, 0x59, 0xd4, 0x00, 0x05, 0x82, 0x00, 0x05, 0x00, - 0x43, 0x01, 0x87, 0x80, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x53, 0xbf, - 0x5c, 0x03, 0xe0, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0xf0, 0x00, 0x00, - 0x42, 0x03, 0xe0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x59, 0x94, 0x00, 0x24, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x00, 0x00, 0xf5, 0x4c, 0x00, 0x00, 0x00, - 0x59, 0xe0, 0x00, 0x02, 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x02, 0x00, 0x1b, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x82, 0x00, 0x04, 0x80, 0x24, 0x32, 0x00, 0x02, 0x04, 0x02, 0x00, 0x15, - 0x42, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x64, 0x80, 0x04, 0x08, 0x40, - 0x04, 0x00, 0x00, 0x07, 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x00, 0x00, 0x00, 0x59, 0x80, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x07, 0xf9, 0x04, 0x00, 0x00, 0x08, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x7a, 0x17, 0x50, 0x04, 0x00, 0x00, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x00, 0x03, 0x84, 0x00, 0x05, 0x4e, 0x44, 0x00, 0x08, 0x00, - 0x4a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, - 0x59, 0x94, 0x78, 0x1a, 0x48, 0x03, 0x28, 0x25, 0x80, 0x3c, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x04, 0x04, 0x00, 0x00, 0x03, 0x48, 0x03, 0x28, 0x1a, - 0x04, 0x01, 0xf0, 0x22, 0x41, 0x78, 0x78, 0x00, 0x80, 0x3c, 0x78, 0x00, - 0x82, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0xe8, 0x04, 0x00, 0x27, 0xfd, - 0x48, 0x03, 0x28, 0x1a, 0x59, 0xa8, 0x00, 0x21, 0x80, 0x3c, 0x14, 0x00, - 0x48, 0x0b, 0x50, 0x21, 0x80, 0x3c, 0x00, 0x40, 0x04, 0x00, 0x00, 0x02, - 0x48, 0x3f, 0xc8, 0x57, 0x59, 0xe4, 0x08, 0x52, 0x59, 0xa8, 0x00, 0x22, - 0x80, 0x04, 0x05, 0x80, 0x04, 0x00, 0x00, 0x04, 0x48, 0x0b, 0xc8, 0x57, - 0x59, 0xe4, 0x00, 0x52, 0x48, 0x03, 0x50, 0x22, 0x59, 0x94, 0x00, 0x26, - 0x80, 0x3c, 0x04, 0x00, 0x48, 0x03, 0x28, 0x26, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x00, 0x59, 0x94, 0x00, 0x00, 0x82, 0x00, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x06, 0x59, 0x94, 0x00, 0x26, - 0x48, 0x03, 0x28, 0x27, 0x49, 0x7b, 0x28, 0x26, 0x4a, 0x03, 0x28, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x4c, 0x0c, 0x00, 0x00, 0x59, 0x94, 0x00, 0x07, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x1d, 0x59, 0x94, 0x10, 0x06, - 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x1c, 0x80, 0x04, 0x00, 0x10, 0x04, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x0f, 0x28, 0x06, 0x04, 0x01, 0xf0, 0x16, - 0x80, 0x04, 0x08, 0x40, 0x48, 0x07, 0x28, 0x07, 0x82, 0x04, 0x05, 0x80, - 0x00, 0x00, 0x03, 0xe8, 0x04, 0x02, 0x00, 0x07, 0x4c, 0x04, 0x00, 0x00, - 0x4c, 0x0c, 0x00, 0x00, 0x59, 0x94, 0x00, 0x08, 0x08, 0x01, 0xf8, 0x00, - 0x5c, 0x00, 0x18, 0x00, 0x5c, 0x00, 0x08, 0x00, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x08, 0x08, 0x01, 0xf8, 0x00, - 0x04, 0x01, 0xf0, 0x06, 0x40, 0x0c, 0x00, 0x00, 0x82, 0x0c, 0x1c, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x27, 0xed, 0x48, 0x0f, 0x28, 0x06, - 0x5c, 0x00, 0x18, 0x00, 0x4d, 0x18, 0x00, 0x00, 0x59, 0xc4, 0x00, 0x08, - 0x8c, 0x00, 0x05, 0x34, 0x04, 0x02, 0x00, 0x25, 0x41, 0x7a, 0x30, 0x00, - 0x83, 0x94, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x58, 0x3c, 0x00, 0x01, - 0x80, 0x00, 0x0d, 0x40, 0x04, 0x02, 0x00, 0x08, 0x82, 0x3c, 0x7c, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x81, 0x1a, 0x30, 0x00, 0x83, 0x18, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x04, 0x02, 0x07, 0xf8, 0x04, 0x01, 0xf0, 0x18, - 0x58, 0x3c, 0x10, 0x00, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x48, 0x00, 0x78, 0x00, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x10, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x04, 0x78, 0x01, 0x04, 0x00, 0x00, 0x08, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x48, 0x00, 0x78, 0x00, 0x04, 0x00, 0x27, 0xfa, - 0x82, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x04, 0x01, 0xf7, 0xe8, - 0x58, 0x3c, 0x00, 0x02, 0x4c, 0x3c, 0x00, 0x00, 0x08, 0x01, 0xf8, 0x00, - 0x5c, 0x00, 0x78, 0x00, 0x04, 0x01, 0xf7, 0xe3, 0x5c, 0x02, 0x30, 0x00, - 0x59, 0x94, 0x00, 0x19, 0x80, 0x00, 0x15, 0x40, 0x04, 0x00, 0x00, 0x07, - 0x04, 0x00, 0x20, 0x06, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x02, 0x80, 0x00, 0x05, 0x80, 0x48, 0x03, 0x28, 0x19, - 0x59, 0x94, 0x00, 0x1c, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x13, - 0x59, 0x94, 0x10, 0x1b, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x28, 0x1b, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x0b, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x07, 0x28, 0x1c, 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x1d, - 0x08, 0x01, 0xf8, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x48, 0x03, 0x28, 0x1b, 0x04, 0x00, 0x27, 0xf7, - 0x59, 0x94, 0x00, 0x04, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x13, - 0x59, 0x94, 0x10, 0x03, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x28, 0x03, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x0b, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x07, 0x28, 0x04, 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x05, - 0x08, 0x01, 0xf8, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x48, 0x03, 0x28, 0x03, 0x04, 0x00, 0x27, 0xf7, - 0x59, 0x94, 0x00, 0x1f, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x13, - 0x59, 0x94, 0x10, 0x1e, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x28, 0x1e, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x0b, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x07, 0x28, 0x1f, 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x20, - 0x08, 0x01, 0xf8, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x48, 0x03, 0x28, 0x1e, 0x04, 0x00, 0x27, 0xf7, - 0x59, 0x94, 0x00, 0x22, 0x80, 0x00, 0x0d, 0x40, 0x04, 0x00, 0x00, 0x13, - 0x59, 0x94, 0x10, 0x21, 0x59, 0x94, 0x00, 0x25, 0x80, 0x08, 0x04, 0x80, - 0x04, 0x00, 0x10, 0x05, 0x04, 0x00, 0x00, 0x04, 0x48, 0x03, 0x28, 0x21, - 0x80, 0x00, 0x00, 0x40, 0x04, 0x02, 0x10, 0x0b, 0x80, 0x04, 0x08, 0x40, - 0x48, 0x07, 0x28, 0x22, 0x04, 0x02, 0x00, 0x04, 0x59, 0x94, 0x00, 0x23, - 0x08, 0x01, 0xf8, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x82, 0x00, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x0a, 0x48, 0x03, 0x28, 0x21, 0x04, 0x00, 0x27, 0xf7, - 0x59, 0x94, 0x08, 0x24, 0x59, 0x94, 0x00, 0x25, 0x80, 0x04, 0x04, 0x80, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x48, 0x03, 0x28, 0x24, - 0x59, 0x94, 0x00, 0x00, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x5b, 0x94, - 0x00, 0x10, 0x5b, 0x96, 0x00, 0x10, 0x5b, 0xbc, 0x59, 0x94, 0x00, 0x24, - 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x28, 0x24, 0x42, 0x03, 0xe0, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x2c, 0x04, 0x06, - 0x80, 0x00, 0x00, 0xc2, 0x80, 0x00, 0x08, 0xc4, 0x80, 0x04, 0x0c, 0x00, - 0x59, 0x2c, 0x04, 0x0a, 0x48, 0x06, 0x62, 0x06, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x45, - 0x8c, 0x00, 0x05, 0x00, 0x04, 0x02, 0x00, 0x2c, 0x59, 0xa8, 0x08, 0x6f, - 0x80, 0x04, 0x08, 0x40, 0x04, 0x02, 0x07, 0xff, 0x8c, 0x00, 0x05, 0x1e, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x20, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x16, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x20, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x5d, 0x13, 0x81, 0x3e, 0x79, 0xc0, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x5d, 0x13, 0x59, 0x2c, 0x0c, 0x0c, 0x80, 0x04, 0x09, 0xc0, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x13, 0x59, 0x30, 0x0a, 0x03, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x07, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x5d, 0x13, 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x43, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x00, 0xbe, 0x82, 0x08, 0x0d, 0x40, 0x80, 0x00, 0x34, 0x65, - 0x48, 0x06, 0x60, 0x04, 0x49, 0x7a, 0x60, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x8c, 0x00, 0x05, 0x16, 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x03, 0x78, 0xe1, 0x1c, 0x01, 0xf0, 0x00, - 0x8c, 0x00, 0x05, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x68, - 0x8c, 0x00, 0x05, 0x1e, 0x04, 0x00, 0x00, 0x0e, 0x82, 0x00, 0x0d, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x00, 0xc0, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x6d, - 0x82, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x20, 0x82, 0x04, 0x0d, 0x80, - 0x00, 0x00, 0x20, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x34, - 0x59, 0x2c, 0x02, 0x07, 0x80, 0x00, 0x00, 0x40, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x5d, 0x3e, 0x59, 0x2c, 0x18, 0x0d, 0x80, 0x0c, 0x19, 0xc0, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x5d, 0x3e, 0x59, 0x2c, 0x18, 0x0f, - 0x59, 0x30, 0x00, 0x07, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x00, 0x11, - 0x48, 0x0e, 0x60, 0x11, 0x48, 0x02, 0x60, 0x07, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x04, 0x4a, 0x02, 0x64, 0x03, 0x00, 0x00, 0x00, 0x42, - 0x42, 0x00, 0x08, 0x00, 0x80, 0x00, 0x20, 0x01, 0x04, 0x01, 0xf0, 0x2a, - 0x5c, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x48, 0x03, 0xc8, 0x57, - 0x48, 0x07, 0xc8, 0x57, 0x04, 0x01, 0xf0, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x59, 0x32, 0x58, 0x08, 0x83, 0x2c, 0x05, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0d, 0x59, 0x2c, 0x00, 0x00, - 0x48, 0x06, 0x5a, 0x06, 0x48, 0x02, 0x60, 0x08, 0x59, 0x2c, 0x04, 0x0a, - 0x8c, 0x00, 0x05, 0x10, 0x04, 0x02, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x02, 0x02, 0xe9, 0x41, 0x7a, 0x78, 0x00, 0x59, 0x30, 0x00, 0x08, - 0x80, 0x02, 0x5d, 0x40, 0x04, 0x02, 0x07, 0x8c, 0x1c, 0x01, 0xf0, 0x00, - 0x45, 0x6a, 0x58, 0x00, 0x41, 0x2e, 0xd0, 0x00, 0x81, 0x5e, 0xb8, 0x00, - 0x59, 0xc8, 0x00, 0x00, 0x82, 0x00, 0x05, 0x40, 0x00, 0x00, 0x12, 0x00, - 0x48, 0x03, 0x90, 0x00, 0x04, 0x01, 0xf7, 0xf4, 0x59, 0x84, 0x00, 0x00, - 0x80, 0x00, 0x05, 0x40, 0x04, 0x02, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0x84, 0x00, 0x03, 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x5d, 0xe5, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x00, 0x04, - 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0x04, 0x0d, 0x40, - 0x48, 0x06, 0x60, 0x04, 0x59, 0xbc, 0x00, 0xea, 0x8c, 0x00, 0x05, 0x16, - 0x04, 0x02, 0x07, 0xfe, 0x83, 0x30, 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x48, 0x03, 0x78, 0xe1, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xbc, 0x00, 0xea, - 0x82, 0x00, 0x15, 0x00, 0xb0, 0x00, 0x00, 0x18, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x64, 0xb0, 0x8c, 0x00, 0x05, 0x10, 0x04, 0x00, 0x00, 0x2a, - 0x59, 0xbc, 0x10, 0xe0, 0x82, 0x08, 0x05, 0x00, 0xff, 0xff, 0xf0, 0x00, - 0x04, 0x02, 0x00, 0x0a, 0x80, 0x08, 0x01, 0x08, 0x82, 0x0a, 0x35, 0x00, - 0x00, 0x00, 0x00, 0x0f, 0x48, 0x03, 0xc8, 0x57, 0x12, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x64, 0xb6, 0x84, 0x00, 0x05, 0x10, 0x48, 0x02, 0x60, 0x04, - 0x04, 0x01, 0xf0, 0x16, 0x84, 0x0a, 0x65, 0x3e, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x20, 0x04, 0x00, 0x07, 0xfa, 0x82, 0x00, 0x05, 0x00, - 0xff, 0xfe, 0xfe, 0xff, 0x48, 0x02, 0x60, 0x04, 0x8c, 0x08, 0x15, 0x3e, - 0x04, 0x02, 0x00, 0x05, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x04, 0x01, 0xf8, 0x58, 0x04, 0x01, 0xf0, 0x09, 0x59, 0x30, 0x00, 0x04, - 0x8c, 0x00, 0x05, 0x14, 0x04, 0x00, 0x00, 0x03, 0x04, 0x01, 0xff, 0xac, - 0x04, 0x01, 0xf0, 0x2e, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x49, - 0x04, 0x01, 0xf8, 0x4f, 0x59, 0xbc, 0x00, 0xea, 0x82, 0x00, 0x15, 0x00, - 0xb0, 0x00, 0x00, 0x18, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x64, 0xb0, - 0x8c, 0x00, 0x05, 0x10, 0x04, 0x02, 0x07, 0xd8, 0x1c, 0x01, 0xf0, 0x00, - 0x83, 0x64, 0x04, 0x80, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x10, 0x19, - 0x41, 0x62, 0x60, 0x00, 0x41, 0x58, 0x00, 0x00, 0x59, 0x30, 0x0a, 0x03, - 0x82, 0x04, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x09, - 0x4a, 0x02, 0x62, 0x03, 0x00, 0x00, 0x00, 0x08, 0x81, 0x66, 0xc8, 0x40, - 0x83, 0x32, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x24, 0x81, 0x60, 0x04, 0x80, - 0x04, 0x02, 0x10, 0x09, 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x32, 0x64, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x81, 0x30, 0x0c, 0x80, 0x04, 0x00, 0x17, 0xf1, - 0x42, 0x02, 0x60, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x04, 0x01, 0xf7, 0xee, - 0x83, 0x7a, 0xc5, 0x40, 0x00, 0x10, 0xd8, 0xd4, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb0, 0x23, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xa2, 0x60, 0x49, 0x67, 0xc8, 0x57, 0x80, 0x02, 0x65, 0x80, - 0x1c, 0x01, 0xf0, 0x00, 0x83, 0x30, 0x04, 0x80, 0x00, 0x10, 0xd8, 0xd4, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x41, 0x58, 0x00, 0x00, - 0x81, 0x30, 0x04, 0x80, 0x04, 0x02, 0x10, 0x0c, 0x45, 0x7a, 0x60, 0x00, - 0x4a, 0x02, 0x62, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0x10, 0x00, - 0x83, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x40, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x21, 0x81, 0x66, 0xc8, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x54, 0x00, 0x00, 0x81, 0x30, 0x04, 0x80, - 0x02, 0x02, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x45, 0x7a, 0x60, 0x00, - 0x4a, 0x02, 0x62, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0x01, 0x10, 0x00, - 0x83, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x48, 0x03, 0xc8, 0x40, - 0x4a, 0x03, 0xc8, 0x42, 0x00, 0x00, 0x00, 0x21, 0x59, 0xa8, 0x00, 0x63, - 0x49, 0x33, 0x50, 0x62, 0x80, 0x00, 0x00, 0x00, 0x48, 0x03, 0x50, 0x63, - 0x1c, 0x01, 0xf0, 0x00, 0x4d, 0x34, 0x00, 0x00, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x30, 0x04, 0x06, 0x82, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x0c, 0x01, 0xf8, 0x03, 0x5c, 0x02, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x72, 0x11, 0x00, 0x10, 0x72, 0x2b, - 0x00, 0x02, 0x08, 0x07, 0x00, 0x10, 0x91, 0x49, 0x00, 0x10, 0x91, 0x64, - 0x00, 0x02, 0x08, 0x7c, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x72, 0x11, - 0x00, 0x10, 0x60, 0xed, 0x00, 0x10, 0x72, 0x44, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x8d, 0xf4, 0x00, 0x10, 0x9e, 0xa1, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, - 0x00, 0x10, 0x71, 0xfe, 0x00, 0x10, 0x71, 0xfe, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x72, 0x42, - 0x00, 0x10, 0x7d, 0x79, 0x00, 0x02, 0x08, 0x1b, 0x00, 0x10, 0x7f, 0x11, - 0x00, 0x10, 0x7f, 0xab, 0x00, 0x10, 0x72, 0x42, 0x00, 0x10, 0x72, 0x42, - 0x00, 0x10, 0x72, 0x42, 0x00, 0x10, 0x7d, 0x5e, 0x00, 0x10, 0x72, 0x42, - 0x00, 0x10, 0x72, 0x42, 0x00, 0x10, 0x72, 0x42, 0x00, 0x10, 0x72, 0x42, - 0x00, 0x10, 0x81, 0x81, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x58, - 0x04, 0x02, 0x10, 0x07, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x04, 0x00, 0x10, 0x04, 0x4d, 0x2c, 0x00, 0x00, 0x0c, 0x01, 0xf8, 0x03, - 0x5c, 0x02, 0x58, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x05, 0x00, 0x10, 0x7e, 0xa7, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0xab, 0x00, 0x02, 0x08, 0x3d, 0x00, 0x10, 0x7e, 0x03, - 0x00, 0x10, 0x7e, 0xaa, 0x00, 0x10, 0x7e, 0xac, 0x59, 0x32, 0x58, 0x08, - 0x59, 0x30, 0x08, 0x11, 0x59, 0x30, 0x14, 0x02, 0x59, 0x34, 0x02, 0x00, - 0x8c, 0x00, 0x05, 0x0e, 0x04, 0x02, 0x00, 0x1c, 0x04, 0x01, 0xf8, 0x26, - 0x04, 0x00, 0x00, 0x05, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x49, 0x7a, 0x58, 0x09, 0x04, 0x01, 0xf0, 0x09, 0x4a, 0x02, 0x5a, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x49, 0x7a, 0x58, 0x09, 0x80, 0x04, 0x09, 0xc0, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x10, 0x7f, 0x76, 0x48, 0x06, 0x58, 0x07, 0x48, 0x0a, 0x5c, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x02, 0xe9, 0x59, 0x34, 0x00, 0x0f, - 0x59, 0x34, 0x14, 0x0b, 0x80, 0x08, 0x10, 0x40, 0x04, 0x00, 0x10, 0x02, - 0x48, 0x0a, 0x6c, 0x0b, 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x08, 0x00, - 0x00, 0x02, 0x02, 0x68, 0x04, 0x01, 0xf7, 0x5e, 0x59, 0x2c, 0x02, 0x0a, - 0x8c, 0x00, 0x05, 0x02, 0x04, 0x00, 0x07, 0xe9, 0x80, 0x04, 0x09, 0xc0, - 0x04, 0x00, 0x07, 0xe7, 0x59, 0x2c, 0x02, 0x08, 0x8c, 0x00, 0x05, 0x0e, - 0x04, 0x02, 0x07, 0xe4, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf0, 0x00, - 0x00, 0x10, 0x8a, 0x2e, 0x59, 0x2c, 0x02, 0x0a, 0x8c, 0x00, 0x05, 0x00, - 0x04, 0x00, 0x00, 0x10, 0x59, 0x30, 0x00, 0x15, 0x59, 0x2c, 0x38, 0x0f, - 0x80, 0x1c, 0x3c, 0x80, 0x04, 0x00, 0x00, 0x0c, 0x4a, 0x02, 0x5a, 0x06, - 0x00, 0x00, 0x00, 0x15, 0x8c, 0x1c, 0x3d, 0x3e, 0x04, 0x00, 0x00, 0x05, - 0x4a, 0x02, 0x5a, 0x06, 0x00, 0x00, 0x00, 0x07, 0x80, 0x1c, 0x38, 0x80, - 0x80, 0x1c, 0x38, 0x00, 0x48, 0x1f, 0xc8, 0x57, 0x82, 0x1c, 0x0d, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x30, 0x02, 0x03, - 0x82, 0x00, 0x34, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, 0x00, 0x10, 0x91, 0x83, - 0x00, 0x02, 0x08, 0x90, 0x00, 0x10, 0x98, 0x3c, 0x00, 0x10, 0x98, 0x4a, - 0x00, 0x02, 0x08, 0xac, 0x00, 0x10, 0x91, 0x83, 0x00, 0x10, 0x99, 0x37, - 0x00, 0x02, 0x08, 0xcb, 0x00, 0x10, 0x91, 0x83, 0x00, 0x10, 0x91, 0x83, - 0x00, 0x10, 0x91, 0x83, 0x00, 0x10, 0x91, 0x83, 0x00, 0x10, 0x91, 0x83, - 0x00, 0x10, 0x91, 0x83, 0x83, 0x38, 0x05, 0x80, 0x00, 0x00, 0x00, 0x13, - 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x97, 0xc4, 0x59, 0x30, 0x04, 0x03, - 0x82, 0x02, 0x74, 0x80, 0x00, 0x00, 0x00, 0x44, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x82, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x18, 0x00, 0x00, 0x10, 0x04, 0xef, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x98, 0x20, 0x00, 0x02, 0x08, 0xa2, 0x00, 0x10, 0x98, 0x22, - 0x00, 0x10, 0x98, 0x34, 0x59, 0x32, 0x58, 0x08, 0x83, 0x2c, 0x05, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x00, 0x05, 0x59, 0x2c, 0x0c, 0x0a, - 0x8c, 0x04, 0x0d, 0x1a, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x98, 0x2f, - 0x04, 0x01, 0xfe, 0x8e, 0x04, 0x01, 0xf7, 0x10, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00, 0x07, 0x83, 0x38, 0x05, 0x80, - 0x00, 0x00, 0x00, 0x53, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xd9, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xef, 0x59, 0x30, 0x00, 0x1f, - 0x59, 0x30, 0x10, 0x11, 0x59, 0x30, 0x08, 0x09, 0x58, 0x04, 0x0a, 0x00, - 0x8c, 0x04, 0x0d, 0x0e, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x98, 0xb5, - 0x80, 0x08, 0x11, 0xc0, 0x02, 0x02, 0x00, 0x00, 0x00, 0x10, 0x98, 0xc2, - 0x59, 0x30, 0x00, 0x1f, 0x80, 0x00, 0x05, 0x40, 0x02, 0x02, 0x00, 0x00, - 0x00, 0x10, 0x98, 0xd0, 0x59, 0x32, 0x58, 0x08, 0x59, 0x2c, 0x04, 0x0a, - 0x8c, 0x00, 0x05, 0x1e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x98, 0xab, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x01, 0xf0, 0x01, - 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x54, 0x02, 0x02, 0x18, 0x00, - 0x00, 0x10, 0x04, 0xef, 0x83, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x40, - 0x02, 0x00, 0x10, 0x00, 0x00, 0x10, 0x98, 0xf6, 0x0c, 0x01, 0xf0, 0x01, - 0x00, 0x10, 0x99, 0x02, 0x00, 0x02, 0x08, 0xe8, 0x00, 0x10, 0x99, 0x0e, - 0x00, 0x10, 0x99, 0x15, 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x02, - 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x04, - 0x00, 0x10, 0x99, 0x09, 0x00, 0x10, 0x99, 0x09, 0x00, 0x10, 0x99, 0x02, - 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x02, - 0x00, 0x10, 0x99, 0x09, 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x09, - 0x00, 0x10, 0x99, 0x02, 0x00, 0x10, 0x99, 0x04, 0x4a, 0x02, 0x62, 0x03, - 0x00, 0x00, 0x00, 0x01, 0x49, 0x3a, 0x64, 0x03, 0x42, 0x00, 0x08, 0x00, - 0x80, 0x00, 0x20, 0x42, 0x04, 0x01, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xf0, 0x7d, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xca, 0x00, - 0x00, 0x00, 0x0a, 0xa3, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xd4, 0xd0, - 0x42, 0x00, 0x10, 0x00, 0x00, 0x10, 0xd4, 0xc1, 0x44, 0x00, 0x10, 0x00, - 0x42, 0x01, 0x38, 0x00, 0x00, 0x10, 0xd8, 0xd0, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0xd4, 0xc0, 0x44, 0x9c, 0x00, 0x00, 0x40, 0x9d, 0x40, 0x00, - 0x40, 0x9d, 0x68, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x44, 0x00, 0xd0, 0x00, 0x04, 0x01, 0xf7, 0xfb, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x44, 0x00, 0xd0, 0x00, 0x04, 0x01, 0xf7, 0xfb, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x37, 0xc8, 0x57, 0x51, 0x34, 0xd2, 0x00, 0x84, 0x68, 0xd5, 0x02, - 0x44, 0x6a, 0x6a, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, - 0x48, 0x81, 0x38, 0x00, 0x49, 0x37, 0xc8, 0x57, 0x42, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xd0, - 0x40, 0xc6, 0x60, 0x00, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x12, - 0x49, 0x35, 0x88, 0x09, 0x48, 0x81, 0x8c, 0x06, 0x41, 0x7a, 0x78, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x59, 0x59, 0xa8, 0xd0, 0x1a, - 0x80, 0x68, 0xd0, 0x00, 0x48, 0x6b, 0x50, 0x1a, 0x59, 0x9c, 0xd0, 0x19, - 0x41, 0x7a, 0x70, 0x00, 0x8c, 0x68, 0xd5, 0x0e, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0xf9, 0x41, 0x79, 0x00, 0x00, 0x40, 0x81, 0x88, 0x00, - 0x58, 0x9d, 0x00, 0x00, 0x80, 0x9d, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x04, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, 0x48, 0x8d, 0x38, 0x03, - 0x41, 0x35, 0x08, 0x00, 0x41, 0x45, 0x10, 0x00, 0x41, 0x2d, 0x18, 0x00, - 0x49, 0x43, 0xc8, 0x57, 0x49, 0x3f, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcf, 0x72, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcf, 0x62, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd0, 0x11, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xd1, 0x5d, 0x80, 0x81, 0x01, 0xc0, 0x04, 0x02, 0x00, 0x3a, - 0x41, 0x7a, 0x88, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x3e, - 0x40, 0xc6, 0x68, 0x00, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x16, - 0x8d, 0x3e, 0x7d, 0x06, 0x04, 0x00, 0x00, 0x04, 0x50, 0xc4, 0xd2, 0x00, - 0x8c, 0x68, 0xd5, 0x0e, 0x04, 0x02, 0x00, 0x16, 0x8d, 0x3e, 0x7d, 0x18, - 0x04, 0x00, 0x00, 0x29, 0x59, 0x35, 0x00, 0x0f, 0x04, 0x01, 0xf0, 0x06, - 0x49, 0x41, 0x02, 0x06, 0x40, 0x82, 0x58, 0x00, 0x50, 0x81, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x02, 0x07, 0xfa, 0x49, 0x7a, 0x68, 0x0f, 0x49, 0x7a, 0x68, 0x10, - 0x49, 0x37, 0xc8, 0x57, 0x46, 0x02, 0x6c, 0x00, 0x00, 0x00, 0x07, 0x07, - 0x81, 0x46, 0x88, 0x00, 0x83, 0x45, 0x74, 0x80, 0x00, 0x00, 0x07, 0xef, - 0x04, 0x00, 0x07, 0xe3, 0x04, 0x00, 0x17, 0xe2, 0x8d, 0x3e, 0x7d, 0x02, - 0x04, 0x00, 0x00, 0x1b, 0x49, 0x7b, 0x50, 0x1c, 0x42, 0x02, 0x88, 0x00, - 0x00, 0x00, 0x07, 0xf0, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x3e, - 0x40, 0xc6, 0x68, 0x00, 0x48, 0xc7, 0xc8, 0x57, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x46, 0x01, 0x8c, 0x00, 0x00, 0x00, 0x07, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x7c, 0x81, 0x46, 0x88, 0x00, - 0x83, 0x45, 0x74, 0x80, 0x00, 0x00, 0x07, 0xff, 0x04, 0x00, 0x07, 0xf3, - 0x04, 0x00, 0x17, 0xf2, 0x04, 0x01, 0xf0, 0x08, 0x49, 0x37, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3f, 0x7c, 0x04, 0x01, 0xf7, 0xe3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf7, 0xc5, - 0x40, 0x86, 0x68, 0x00, 0x40, 0x8a, 0x88, 0x00, 0x40, 0x8e, 0x58, 0x00, - 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x41, 0x35, 0x28, 0x00, 0x41, 0x41, 0x20, 0x00, 0x41, 0x45, 0x18, 0x00, - 0x41, 0x2d, 0x10, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x3f, 0xc8, 0x57, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x08, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x00, 0x00, 0x1f, - 0x59, 0x34, 0xd4, 0x03, 0x40, 0x6a, 0x88, 0x00, 0x42, 0x02, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x29, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xce, 0xf7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcf, 0x9c, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd2, 0x8a, - 0x49, 0x37, 0xc8, 0x57, 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x00, 0x00, 0x15, - 0x59, 0x35, 0x00, 0x0f, 0x80, 0x81, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x0a, - 0x49, 0x41, 0x02, 0x06, 0x40, 0x82, 0x58, 0x00, 0x50, 0x81, 0x00, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x02, 0x07, 0xfa, 0x48, 0x82, 0x68, 0x0f, 0x48, 0x82, 0x68, 0x10, - 0x49, 0x37, 0xc8, 0x57, 0x46, 0x02, 0x6c, 0x00, 0x00, 0x00, 0x07, 0x07, - 0x80, 0x85, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x07, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf0, 0x04, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x3f, 0x7c, 0x04, 0x01, 0xf7, 0xf9, 0x40, 0x8a, 0x58, 0x00, - 0x40, 0x8e, 0x88, 0x00, 0x40, 0x92, 0x80, 0x00, 0x40, 0x96, 0x68, 0x00, - 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, - 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x01, 0xf0, 0x00, - 0x80, 0x9d, 0x38, 0x40, 0x48, 0x81, 0x38, 0x00, 0x49, 0x37, 0xc8, 0x57, - 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0xd0, 0x40, 0xc6, 0x60, 0x00, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x18, 0x49, 0x35, 0x88, 0x09, 0x59, 0x34, 0xd4, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x07, 0xfe, 0x04, 0x00, 0x00, 0x03, - 0x41, 0x7a, 0x78, 0x00, 0x04, 0x01, 0xff, 0xa9, 0x48, 0x82, 0x64, 0x06, - 0x41, 0x7a, 0x78, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x42, 0x59, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0x67, 0x59, 0xa8, 0xd0, 0x1a, 0x80, 0x68, 0xd0, 0x00, - 0x48, 0x6b, 0x50, 0x1a, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xf9, 0x41, 0x79, 0x00, 0x00, - 0x40, 0x81, 0x88, 0x00, 0x58, 0x9d, 0x00, 0x00, 0x80, 0x9d, 0x38, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x4a, 0x03, 0xc8, 0x56, - 0x12, 0x34, 0x56, 0x78, 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x48, 0x83, 0x50, 0x1b, 0x42, 0x02, 0x88, 0x00, 0x00, 0x00, 0x07, 0xfe, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x42, 0xa1, 0x40, 0xc6, 0x68, 0x00, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x0c, 0x04, 0x01, 0xff, 0x00, 0x04, 0x01, 0xff, 0xc8, - 0x40, 0xc5, 0x08, 0x00, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x07, - 0x59, 0xa8, 0xd0, 0x23, 0x84, 0x68, 0xd5, 0x4e, 0x48, 0x6b, 0x50, 0x23, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8b, 0x45, 0x40, 0x85, 0x00, 0x00, - 0x40, 0x81, 0x88, 0x00, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x40, 0x69, 0x00, 0x00, 0x40, 0x6d, 0x08, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x3e, 0x59, 0xbc, 0x00, 0x2f, - 0x81, 0x31, 0x74, 0x80, 0x04, 0x00, 0x00, 0x18, 0x59, 0xbc, 0xd0, 0x2e, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x1e, - 0x51, 0x30, 0xd8, 0x00, 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x02, 0x00, 0x09, - 0x59, 0x31, 0x70, 0x01, 0x48, 0xb9, 0x08, 0x01, 0x59, 0x30, 0xd0, 0x01, - 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x02, 0x00, 0x02, 0x48, 0x86, 0x68, 0x0c, - 0x48, 0x6e, 0x60, 0x01, 0x04, 0x01, 0xf0, 0x36, 0x59, 0x30, 0xd8, 0x01, - 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x02, 0x00, 0x1f, 0x51, 0x31, 0x70, 0x00, - 0x44, 0xb9, 0x00, 0x00, 0x44, 0x6e, 0x60, 0x00, 0x48, 0x6e, 0x68, 0x0c, - 0x04, 0x01, 0xf0, 0x2e, 0x59, 0x30, 0xd8, 0x01, 0x80, 0x6c, 0xd9, 0xc0, - 0x04, 0x02, 0x00, 0x0f, 0x51, 0x30, 0xd0, 0x00, 0x80, 0x68, 0xd1, 0xc0, - 0x04, 0x02, 0x00, 0x20, 0x48, 0x6f, 0x78, 0x2f, 0x48, 0x6f, 0x78, 0x2e, - 0x48, 0x6e, 0x68, 0x0c, 0x04, 0x01, 0xf0, 0x24, 0x59, 0x30, 0xd0, 0x01, - 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x02, 0x00, 0x13, 0x48, 0x83, 0x78, 0x2e, - 0x44, 0x69, 0x00, 0x00, 0x48, 0x6a, 0x68, 0x0c, 0x04, 0x01, 0xf0, 0x1d, - 0x51, 0x30, 0xd0, 0x00, 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x02, 0x00, 0x16, - 0x48, 0x6f, 0x78, 0x2f, 0x59, 0x31, 0x70, 0x01, 0x48, 0xbb, 0x78, 0x2e, - 0x48, 0x6a, 0x60, 0x01, 0x04, 0x01, 0xf0, 0x15, 0x51, 0x31, 0x70, 0x00, - 0x44, 0xb8, 0xd8, 0x00, 0x44, 0x6d, 0x00, 0x00, 0x45, 0x7a, 0x60, 0x00, - 0x49, 0x7a, 0x60, 0x01, 0x04, 0x01, 0xf0, 0x0f, 0x59, 0x31, 0x70, 0x01, - 0x48, 0xbb, 0x78, 0x2e, 0x59, 0x31, 0x70, 0x01, 0x44, 0xb9, 0x00, 0x00, - 0x49, 0x7a, 0x60, 0x01, 0x04, 0x01, 0xf0, 0x09, 0x51, 0x31, 0x70, 0x00, - 0x48, 0xbb, 0x78, 0x2f, 0x44, 0x6e, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xd6, - 0x51, 0x31, 0x70, 0x00, 0x44, 0xb8, 0xd8, 0x00, 0x48, 0x6f, 0x78, 0x2f, - 0x04, 0x01, 0xf7, 0xf0, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x05, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, 0x48, 0x8d, 0x38, 0x03, - 0x48, 0x91, 0x38, 0x04, 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x20, 0x00, 0x41, 0x35, 0x18, 0x00, - 0x41, 0x19, 0x10, 0x00, 0x41, 0x91, 0x08, 0x00, 0x59, 0x32, 0x68, 0x09, - 0x59, 0xbc, 0xd8, 0x2f, 0x40, 0x6c, 0xe0, 0x00, 0x80, 0x6c, 0xd9, 0xc0, - 0x04, 0x00, 0x00, 0x0c, 0x41, 0x30, 0x00, 0x00, 0x80, 0x6d, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x27, 0x58, 0x6c, 0xd0, 0x09, 0x41, 0x34, 0x00, 0x00, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x1c, 0x40, 0x6c, 0xe0, 0x00, - 0x50, 0x6c, 0xd8, 0x00, 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x02, 0x07, 0xf6, - 0x83, 0xbc, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x32, 0x40, 0x6b, 0x20, 0x00, - 0x41, 0x7a, 0x30, 0x00, 0x59, 0x90, 0xd0, 0x04, 0x41, 0x30, 0x00, 0x00, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x0b, 0x81, 0x1a, 0x30, 0x00, - 0x83, 0x19, 0x74, 0x80, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x1e, - 0x83, 0x93, 0x24, 0x00, 0x00, 0x00, 0x00, 0x10, 0x59, 0x90, 0xd0, 0x04, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x02, 0x07, 0xf7, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x65, 0xfd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x31, 0x04, 0x01, 0xf0, 0x0b, 0x40, 0x6d, 0x00, 0x00, - 0x58, 0x6c, 0xd8, 0x01, 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x00, 0x07, 0xd9, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x6d, 0x74, 0x80, 0x04, 0x02, 0x07, 0xfa, - 0x40, 0x70, 0xd0, 0x00, 0x40, 0x80, 0xd8, 0x00, 0x04, 0x01, 0xff, 0x6e, - 0x40, 0x87, 0x20, 0x00, 0x40, 0x8a, 0x30, 0x00, 0x40, 0x8e, 0x68, 0x00, - 0x80, 0x91, 0x70, 0x40, 0x04, 0x00, 0x00, 0x0b, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x0e, 0x40, 0x87, 0x20, 0x00, - 0x40, 0x8a, 0x30, 0x00, 0x40, 0x8e, 0x68, 0x00, 0x80, 0x91, 0x70, 0x40, - 0x04, 0x00, 0x00, 0x06, 0x41, 0x78, 0xd0, 0x00, 0x04, 0x01, 0xf0, 0x07, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf7, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf7, 0xf9, - 0x40, 0x69, 0x88, 0x00, 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, - 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x40, 0x69, 0x00, 0x00, 0x51, 0x31, 0x08, 0x00, - 0x45, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x3e, - 0x80, 0x81, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x08, 0x44, 0x85, 0x00, 0x00, - 0x59, 0x8c, 0xd0, 0x0a, 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x02, 0x00, 0x0b, 0x48, 0x83, 0x18, 0x0a, 0x04, 0x01, 0xf0, 0x09, - 0x59, 0x8c, 0xd0, 0x0a, 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x87, 0x18, 0x0b, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x83, 0x18, 0x0a, 0x48, 0x83, 0x18, 0x0b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x54, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x0d, - 0x59, 0x8c, 0xd8, 0x0b, 0x41, 0x78, 0xd0, 0x00, 0x04, 0x01, 0xf0, 0x06, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x6d, 0x74, 0x80, 0x04, 0x00, 0x00, 0x0d, - 0x40, 0x6c, 0xd0, 0x00, 0x50, 0x6c, 0xd8, 0x00, 0x80, 0x6c, 0xd9, 0xc0, - 0x04, 0x02, 0x07, 0xfa, 0x41, 0x78, 0xd0, 0x00, 0x04, 0x01, 0xf0, 0x13, - 0x41, 0x78, 0xd0, 0x00, 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x0d, - 0x04, 0x01, 0xff, 0xca, 0x59, 0x8c, 0xd0, 0x0d, 0x41, 0x30, 0x00, 0x00, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x05, 0x49, 0x7a, 0x60, 0x07, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x04, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x04, 0x04, 0x01, 0xf7, 0xfa, - 0x40, 0x69, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x40, 0x69, 0x00, 0x00, 0x51, 0x31, 0x08, 0x00, 0x45, 0x7a, 0x60, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x3e, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x44, 0x85, 0x00, 0x00, 0x59, 0x8c, 0xd0, 0x08, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x02, 0x00, 0x0b, - 0x48, 0x83, 0x18, 0x08, 0x04, 0x01, 0xf0, 0x09, 0x59, 0x8c, 0xd0, 0x08, - 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x03, - 0x48, 0x87, 0x18, 0x09, 0x04, 0x01, 0xf0, 0x03, 0x48, 0x83, 0x18, 0x08, - 0x48, 0x83, 0x18, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x54, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x33, 0xc8, 0x57, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x1b, 0x59, 0x8c, 0xd8, 0x09, - 0x41, 0x78, 0xd0, 0x00, 0x04, 0x01, 0xf0, 0x06, 0x41, 0x30, 0x00, 0x00, - 0x80, 0x6d, 0x74, 0x80, 0x04, 0x00, 0x00, 0x07, 0x40, 0x6c, 0xd0, 0x00, - 0x50, 0x6c, 0xd8, 0x00, 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x02, 0x07, 0xfa, - 0x41, 0x78, 0xd0, 0x00, 0x04, 0x01, 0xf0, 0x18, 0x04, 0x01, 0xff, 0xd0, - 0x59, 0x8c, 0xd0, 0x0d, 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x10, 0x59, 0x30, 0xd4, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x42, 0x04, 0x00, 0x00, 0x04, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x0c, 0x49, 0x7a, 0x60, 0x07, - 0x04, 0x01, 0xf7, 0xfc, 0x41, 0x78, 0xd0, 0x00, 0x40, 0x68, 0xd8, 0x00, - 0x40, 0x68, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, - 0x04, 0x01, 0xf0, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x04, - 0x04, 0x01, 0xf7, 0xef, 0x40, 0x69, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x40, 0x69, 0x00, 0x00, 0x51, 0x31, 0x08, 0x00, - 0x45, 0x7a, 0x60, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x3e, - 0x80, 0x81, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x08, 0x44, 0x85, 0x00, 0x00, - 0x59, 0x8c, 0xd0, 0x04, 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x02, 0x00, 0x0b, 0x48, 0x83, 0x18, 0x04, 0x04, 0x01, 0xf0, 0x09, - 0x59, 0x8c, 0xd0, 0x04, 0x41, 0x30, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x03, 0x48, 0x87, 0x18, 0x05, 0x04, 0x01, 0xf0, 0x03, - 0x48, 0x83, 0x18, 0x04, 0x48, 0x83, 0x18, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x54, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x49, 0x33, 0xc8, 0x57, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x23, 0x59, 0x8d, 0x00, 0x05, 0x40, 0x81, 0x08, 0x00, - 0x04, 0x01, 0xf0, 0x06, 0x41, 0x30, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x07, 0x40, 0x81, 0x08, 0x00, 0x50, 0x81, 0x00, 0x00, - 0x80, 0x81, 0x01, 0xc0, 0x04, 0x02, 0x07, 0xfa, 0x41, 0x78, 0xd0, 0x00, - 0x04, 0x01, 0xf0, 0x28, 0x59, 0x8c, 0xd0, 0x0d, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x22, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x3e, - 0x59, 0x8c, 0xd0, 0x05, 0x40, 0x80, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x14, 0x59, 0x8c, 0xd0, 0x04, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x07, 0x45, 0x79, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x54, 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf0, 0x16, 0x48, 0x87, 0x18, 0x04, 0x45, 0x79, 0x00, 0x00, - 0x45, 0x79, 0x08, 0x00, 0x04, 0x01, 0xf7, 0xf8, 0x41, 0x78, 0xd0, 0x00, - 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x0c, 0x50, 0x81, 0x70, 0x00, - 0x48, 0xbb, 0x18, 0x05, 0x45, 0x79, 0x00, 0x00, 0x59, 0x8c, 0xd0, 0x04, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x02, 0x07, 0xec, 0x49, 0x7b, 0x18, 0x04, - 0x04, 0x01, 0xf7, 0xea, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x04, - 0x04, 0x01, 0xf7, 0xdd, 0x40, 0x69, 0x88, 0x00, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x08, 0x00, 0x04, 0x01, 0xff, 0x70, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x42, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x80, 0x85, 0x70, 0x40, 0x04, 0x02, 0x00, 0x0c, - 0x04, 0x01, 0xf0, 0x09, 0x04, 0x01, 0xff, 0x24, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x07, 0xf9, 0x04, 0x01, 0xff, 0xae, 0x40, 0xc5, 0x00, 0x00, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf7, 0x04, 0x01, 0xf7, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x40, 0x81, 0x88, 0x00, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x5c, 0x00, 0xd0, 0x00, 0x4c, 0x68, 0x00, 0x00, 0x48, 0x6b, 0xc8, 0x57, - 0x41, 0x35, 0x00, 0x00, 0x41, 0x2d, 0x08, 0x00, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x32, 0x58, 0x08, 0x59, 0x30, 0xd4, 0x06, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x83, 0xf1, 0x75, 0x00, 0x0d, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x30, 0x82, 0xb9, 0x74, 0x80, 0x0c, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x2d, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x43, 0xc8, 0x57, - 0x49, 0x3f, 0xc8, 0x57, 0x59, 0x30, 0xd4, 0x06, 0x48, 0x6b, 0xc8, 0x57, - 0x59, 0x30, 0xd4, 0x06, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x83, 0xf1, 0x75, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcd, 0x11, 0x80, 0x68, 0xd4, 0x00, - 0x50, 0x68, 0xd0, 0x00, 0x08, 0x69, 0xf0, 0x00, 0x00, 0x10, 0xcd, 0x23, - 0x00, 0x10, 0xcd, 0x6d, 0x00, 0x10, 0xcd, 0x2b, 0x00, 0x10, 0xcd, 0x78, - 0x00, 0x10, 0xcd, 0x6d, 0x00, 0x10, 0xcd, 0x5f, 0x00, 0x10, 0xcd, 0x53, - 0x00, 0x10, 0xcd, 0x23, 0x00, 0x10, 0xcd, 0x23, 0x00, 0x10, 0xcd, 0x4a, - 0x00, 0x10, 0xcd, 0x3f, 0x00, 0x10, 0xcd, 0x23, 0x00, 0x10, 0xcd, 0x23, - 0x00, 0x10, 0xcd, 0x23, 0x00, 0x10, 0xcd, 0x23, 0x00, 0x10, 0xcd, 0x23, - 0x00, 0x10, 0xcd, 0x33, 0x00, 0x10, 0xcd, 0x33, 0x41, 0x78, 0xd0, 0x00, - 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x40, 0x82, 0x68, 0x00, 0x40, 0x86, 0x58, 0x00, - 0x04, 0x01, 0xf0, 0x78, 0x81, 0x2e, 0x59, 0xc0, 0x04, 0x00, 0x00, 0x62, - 0x41, 0x78, 0xd0, 0x00, 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x70, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x68, 0x59, 0x32, 0x58, 0x17, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x07, 0x37, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x98, - 0x40, 0x82, 0x68, 0x00, 0x40, 0x86, 0x58, 0x00, 0x04, 0x01, 0xf0, 0x64, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xf8, 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x5c, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf7, 0xf3, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xed, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x62, 0x5f, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf7, 0xea, 0x59, 0x30, 0xd0, 0x07, - 0x8c, 0x68, 0xd5, 0x00, 0x04, 0x02, 0x00, 0x46, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xe1, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0xc2, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf7, 0xde, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xd8, - 0x59, 0x2c, 0xd2, 0x04, 0x82, 0x68, 0xd5, 0x00, 0x00, 0x00, 0x00, 0xff, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x55, 0x04, 0x02, 0x07, 0xc5, - 0x49, 0x42, 0x5a, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, - 0x04, 0x01, 0xf7, 0xdb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xd0, 0x7d, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x25, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0x60, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xbe, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf7, 0xc5, - 0x59, 0x30, 0xd0, 0x07, 0x8c, 0x68, 0xd5, 0x00, 0x04, 0x02, 0x00, 0x1e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xbc, 0x4a, 0x02, 0x5a, 0x04, 0x00, 0x00, 0x01, 0x03, - 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x58, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0xe1, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x7b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0x3e, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x98, - 0x04, 0x01, 0xf7, 0xaf, 0x59, 0x30, 0xd2, 0x1d, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x07, 0xf8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf7, 0xa8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x32, 0x04, 0x01, 0xf7, 0xda, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0xe1, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0xb9, 0x49, 0x42, 0x5a, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x04, 0x01, 0xf7, 0x96, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, - 0x48, 0x81, 0x38, 0x00, 0x59, 0x30, 0xd4, 0x06, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x83, 0xf1, 0x75, 0x00, 0x0d, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x20, 0x82, 0xb9, 0x74, 0x80, 0x0c, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x1d, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x83, 0xf1, 0x75, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xcd, 0xbc, 0x80, 0x68, 0xd4, 0x00, - 0x50, 0x68, 0xd0, 0x00, 0x08, 0x69, 0xf0, 0x00, 0x00, 0x10, 0xcd, 0xde, - 0x00, 0x10, 0xcd, 0xf2, 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xd4, - 0x00, 0x10, 0xcd, 0xe9, 0x00, 0x10, 0xcd, 0xe9, 0x00, 0x10, 0xcd, 0xe1, - 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, - 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, - 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xde, - 0x00, 0x10, 0xcd, 0xde, 0x00, 0x10, 0xcd, 0xfe, 0x41, 0x78, 0xd0, 0x00, - 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x32, 0x59, 0x30, 0xd0, 0x09, - 0x83, 0x3c, 0xdd, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8d, 0x3e, 0x7d, 0x18, - 0x04, 0x02, 0x00, 0x06, 0x8d, 0x3e, 0x7d, 0x06, 0x04, 0x00, 0x00, 0x04, - 0x50, 0x68, 0xd2, 0x00, 0x8c, 0x68, 0xd5, 0x0e, 0x04, 0x02, 0x00, 0x28, - 0x42, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x25, - 0x83, 0x3c, 0xd5, 0x00, 0x00, 0x00, 0x10, 0x00, 0x42, 0x00, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x02, 0x00, 0x1f, - 0x40, 0x68, 0xd8, 0x00, 0x04, 0x01, 0xf0, 0x1d, 0x8d, 0x3e, 0x7d, 0x18, - 0x04, 0x00, 0x00, 0x03, 0x8d, 0x3e, 0x7d, 0x16, 0x04, 0x00, 0x07, 0xf2, - 0x59, 0x30, 0xd4, 0x20, 0x41, 0x78, 0xd8, 0x00, 0x8c, 0x68, 0xd5, 0x00, - 0x04, 0x02, 0x00, 0x15, 0x04, 0x01, 0xf7, 0xed, 0x83, 0x3d, 0x05, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x02, 0x07, 0xe9, - 0x8d, 0x3e, 0x7d, 0x06, 0x04, 0x00, 0x07, 0xe7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8b, 0x04, 0x40, 0x80, 0xd8, 0x00, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x09, 0x04, 0x01, 0xf7, 0xe1, 0x83, 0x3c, 0xd5, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x02, 0x07, 0xdd, - 0x40, 0x68, 0xd8, 0x00, 0x8d, 0x3e, 0x7d, 0x16, 0x04, 0x00, 0x07, 0xda, - 0x40, 0x6d, 0x88, 0x00, 0x58, 0x9d, 0x00, 0x00, 0x80, 0x9d, 0x38, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x49, 0x33, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x40, 0xc5, 0x28, 0x00, 0x41, 0x35, 0x20, 0x00, 0x41, 0x31, 0x10, 0x00, - 0x41, 0x2d, 0x18, 0x00, 0x41, 0x79, 0x08, 0x00, 0x59, 0x8e, 0x60, 0x05, - 0x04, 0x01, 0xf0, 0x0a, 0x59, 0x32, 0x68, 0x09, 0x81, 0x36, 0x69, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x59, 0x34, 0xd4, 0x03, 0x41, 0x44, 0x00, 0x00, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x0b, 0x41, 0x31, 0x08, 0x00, - 0x51, 0x32, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x07, 0xf6, - 0x40, 0x8a, 0x60, 0x00, 0x40, 0x8e, 0x58, 0x00, 0x40, 0x92, 0x68, 0x00, - 0x80, 0x95, 0x70, 0x40, 0x04, 0x00, 0x00, 0x25, 0x04, 0x01, 0xf0, 0x26, - 0x04, 0x01, 0xff, 0x7b, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x15, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xdd, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x0d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xe4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xdd, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xe0, 0x59, 0x30, 0xd4, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x43, 0x04, 0x00, 0x07, 0xdc, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x5b, 0x51, 0x31, 0x00, 0x00, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xfe, 0x22, 0x04, 0x01, 0xfe, 0xa1, - 0x40, 0x82, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xd6, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, - 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x28, 0x00, - 0x41, 0x2d, 0x10, 0x00, 0x41, 0x31, 0x18, 0x00, 0x41, 0x35, 0x20, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x3e, 0x40, 0xc6, 0x68, 0x00, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x2e, 0x41, 0x79, 0x08, 0x00, - 0x59, 0x8e, 0x60, 0x0b, 0x04, 0x01, 0xf0, 0x03, 0x41, 0x31, 0x08, 0x00, - 0x51, 0x32, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x1c, - 0x59, 0x30, 0xd0, 0x09, 0x41, 0x34, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x02, 0x07, 0xf9, 0x04, 0x01, 0xff, 0x2f, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x03, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x0a, - 0x04, 0x01, 0xff, 0x2a, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf1, - 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x07, 0xef, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0x91, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xeb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x5b, 0x51, 0x31, 0x00, 0x00, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xfd, 0x56, 0x04, 0x01, 0xfe, 0x62, - 0x40, 0x82, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x07, 0xe6, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x44, 0xb4, 0x40, 0x8a, 0x58, 0x00, - 0x40, 0x8e, 0x60, 0x00, 0x40, 0x92, 0x68, 0x00, 0x80, 0x95, 0x70, 0x40, - 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf0, 0x06, 0x41, 0x78, 0xd0, 0x00, - 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, - 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x06, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x28, 0x00, - 0x41, 0x2d, 0x20, 0x00, 0x41, 0x35, 0x18, 0x00, 0x41, 0x31, 0x10, 0x00, - 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x59, 0x8e, 0x60, 0x09, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x0c, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x34, 0xd4, 0x03, 0x41, 0x44, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x10, 0x80, 0x81, 0x01, 0xc0, 0x04, 0x00, 0x00, 0x0b, - 0x41, 0x31, 0x08, 0x00, 0x51, 0x32, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x02, 0x07, 0xf6, 0x40, 0x8a, 0x60, 0x00, 0x40, 0x8e, 0x68, 0x00, - 0x40, 0x92, 0x58, 0x00, 0x80, 0x95, 0x70, 0x40, 0x04, 0x00, 0x00, 0x1c, - 0x04, 0x01, 0xf0, 0x23, 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x04, 0x01, 0xf7, 0xeb, 0x04, 0x01, 0xfe, 0xd8, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x07, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x59, 0x30, 0xd4, 0x06, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x12, 0x04, 0x01, 0xfe, 0xcf, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xe6, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x02, 0x07, 0xe4, - 0x51, 0x31, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x5b, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xfd, 0x43, 0x04, 0x01, 0xfe, 0x0b, - 0x40, 0x82, 0x60, 0x00, 0x41, 0x79, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xdb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x04, 0x01, 0xf0, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x91, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x07, 0xf1, 0x04, 0x01, 0xf7, 0xeb, 0x58, 0x9d, 0x28, 0x05, - 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x49, 0x47, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x40, 0xc5, 0x08, 0x00, 0x41, 0x3d, 0x00, 0x00, 0x85, 0x3e, 0x7d, 0x00, - 0x04, 0x01, 0xff, 0xa7, 0x04, 0x01, 0xff, 0x58, 0x40, 0x82, 0x78, 0x00, - 0x80, 0x85, 0x70, 0x40, 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x41, 0x2d, 0x20, 0x00, - 0x41, 0x35, 0x18, 0x00, 0x41, 0x31, 0x10, 0x00, 0x41, 0x79, 0x08, 0x00, - 0x59, 0x8e, 0x60, 0x0b, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x11, - 0x04, 0x01, 0xfe, 0x8b, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x06, - 0x41, 0x31, 0x08, 0x00, 0x51, 0x32, 0x60, 0x00, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x02, 0x07, 0xfa, 0x04, 0x01, 0xf0, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0x5b, 0x51, 0x31, 0x00, 0x00, 0x40, 0x84, 0xd0, 0x00, - 0x04, 0x01, 0xfc, 0xb8, 0x04, 0x01, 0xfd, 0xc4, 0x40, 0x82, 0x60, 0x00, - 0x04, 0x01, 0xf7, 0xef, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x44, 0x8d, - 0x40, 0x8e, 0x68, 0x00, 0x40, 0x8a, 0x60, 0x00, 0x40, 0x92, 0x58, 0x00, - 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x05, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x48, 0x89, 0x38, 0x02, 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, - 0x41, 0x2d, 0x20, 0x00, 0x41, 0x35, 0x18, 0x00, 0x41, 0x31, 0x10, 0x00, - 0x41, 0x79, 0x08, 0x00, 0x59, 0x8e, 0x60, 0x09, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x11, 0x04, 0x01, 0xfe, 0x60, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x06, 0x41, 0x31, 0x08, 0x00, 0x51, 0x32, 0x60, 0x00, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x07, 0xfa, 0x04, 0x01, 0xf0, 0x09, - 0x51, 0x31, 0x00, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x5b, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xfc, 0xd1, 0x04, 0x01, 0xfd, 0x99, - 0x40, 0x82, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xef, 0x40, 0x8a, 0x60, 0x00, - 0x40, 0x8e, 0x68, 0x00, 0x40, 0x92, 0x58, 0x00, 0x58, 0x9d, 0x20, 0x04, - 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, 0x48, 0x81, 0x38, 0x00, - 0x49, 0x43, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x40, 0xc5, 0x00, 0x00, 0x04, 0x01, 0xff, 0xd1, 0x04, 0x01, 0xff, 0xa5, - 0x80, 0x81, 0x70, 0x40, 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x03, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x00, 0x00, - 0x80, 0x9d, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x48, 0x89, 0x38, 0x02, 0x48, 0x8d, 0x38, 0x03, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x6d, 0x40, 0xc5, 0x18, 0x00, 0x41, 0x31, 0x10, 0x00, - 0x41, 0x79, 0x08, 0x00, 0x59, 0x8e, 0x60, 0x05, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x08, 0x04, 0x01, 0xfe, 0x27, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x09, 0x41, 0x31, 0x08, 0x00, 0x51, 0x32, 0x60, 0x00, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x02, 0x07, 0xfa, 0x40, 0x8a, 0x60, 0x00, - 0x80, 0x8d, 0x70, 0x40, 0x04, 0x00, 0x00, 0x0a, 0x04, 0x01, 0xf0, 0x0b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x5b, 0x51, 0x31, 0x00, 0x00, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xfc, 0xde, 0x04, 0x01, 0xfd, 0x5d, - 0x40, 0x82, 0x60, 0x00, 0x04, 0x01, 0xf7, 0xec, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x04, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, - 0x44, 0xa1, 0x38, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x40, 0x9d, 0x40, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x48, 0x99, 0x38, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x48, 0xc5, 0x40, 0x00, 0x41, 0x31, 0x18, 0x00, 0x41, 0x35, 0x28, 0x00, - 0x49, 0x19, 0x40, 0x02, 0x41, 0x2d, 0x20, 0x00, 0x49, 0x91, 0x40, 0x01, - 0x41, 0xd1, 0x30, 0x00, 0x49, 0xa5, 0x40, 0x03, 0x49, 0x15, 0x40, 0x04, - 0x59, 0xbe, 0x60, 0x2f, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x1b, - 0x41, 0x31, 0x08, 0x00, 0x04, 0x01, 0xf0, 0x05, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x17, 0x41, 0x31, 0x08, 0x00, 0x40, 0x82, 0x60, 0x00, - 0x51, 0x31, 0x00, 0x00, 0x59, 0x32, 0x68, 0x09, 0x59, 0x34, 0xd4, 0x03, - 0x41, 0x44, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x02, 0x07, 0xf7, - 0x59, 0x31, 0x00, 0x01, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x05, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0x91, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x04, 0x01, 0xfd, 0xdc, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x21, 0x41, 0x31, 0x10, 0x00, 0x40, 0x82, 0x60, 0x00, - 0x80, 0x81, 0x01, 0xc0, 0x04, 0x02, 0x07, 0xf3, 0x41, 0x7a, 0x30, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x69, 0x27, 0x59, 0x92, 0x60, 0x04, - 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x59, 0x32, 0x68, 0x09, - 0x59, 0x34, 0xd4, 0x03, 0x41, 0x44, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x18, 0x81, 0x1a, 0x30, 0x00, 0x83, 0x19, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0xf3, 0x04, 0x00, 0x17, 0xf2, - 0x40, 0x8e, 0x60, 0x00, 0x40, 0x96, 0x68, 0x00, 0x58, 0xa2, 0x30, 0x02, - 0x40, 0x92, 0x58, 0x00, 0x58, 0xa3, 0x20, 0x01, 0x40, 0x9b, 0xa0, 0x00, - 0x58, 0xa3, 0x48, 0x03, 0x58, 0xa2, 0x28, 0x04, 0x58, 0xa0, 0xd0, 0x00, - 0x80, 0x69, 0x70, 0x40, 0x04, 0x00, 0x00, 0x17, 0x04, 0x01, 0xf0, 0x18, - 0x40, 0x84, 0xd0, 0x00, 0x40, 0x88, 0xd8, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcb, 0x2f, 0x04, 0x01, 0xfc, 0xfb, 0x04, 0x01, 0xf7, 0xdc, - 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x63, 0x91, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xe4, - 0x04, 0x01, 0xfd, 0xad, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xe1, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x65, 0xfd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x31, 0x04, 0x01, 0xfc, 0xec, 0x04, 0x01, 0xf7, 0xdb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x30, 0x06, - 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, - 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x50, 0x9d, 0x40, 0x00, - 0x80, 0x9d, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, - 0x44, 0xa1, 0x38, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x40, 0x9d, 0x40, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x07, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x48, 0x95, 0x38, 0x05, - 0x48, 0x99, 0x38, 0x06, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x40, 0xc5, 0x28, 0x00, 0x41, 0x31, 0x30, 0x00, 0x49, 0x35, 0x40, 0x01, - 0x49, 0x2d, 0x40, 0x00, 0x49, 0x19, 0x40, 0x04, 0x49, 0x91, 0x40, 0x03, - 0x49, 0xd1, 0x40, 0x02, 0x49, 0xa5, 0x40, 0x05, 0x49, 0x15, 0x40, 0x06, - 0x59, 0xbe, 0x60, 0x2f, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x23, - 0x41, 0x31, 0x20, 0x00, 0x41, 0x79, 0x08, 0x00, 0x51, 0x31, 0x10, 0x00, - 0x59, 0x32, 0x68, 0x09, 0x04, 0x01, 0xf0, 0x09, 0x41, 0x31, 0x18, 0x00, - 0x80, 0x85, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x10, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x02, 0x40, 0x82, 0x60, 0x00, 0x80, 0x81, 0x01, 0xc0, - 0x04, 0x00, 0x00, 0x0d, 0x59, 0x31, 0x00, 0x01, 0x04, 0x01, 0xfd, 0x6c, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf5, 0x40, 0x90, 0xd0, 0x00, - 0x40, 0x8c, 0xd8, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcb, 0x2f, - 0x04, 0x01, 0xfc, 0xab, 0x04, 0x01, 0xf7, 0xf2, 0x41, 0x31, 0x08, 0x00, - 0x04, 0x01, 0xf7, 0xf0, 0x80, 0x89, 0x11, 0xc0, 0x04, 0x00, 0x00, 0x06, - 0x40, 0x8a, 0x60, 0x00, 0x80, 0x85, 0x09, 0xc0, 0x04, 0x00, 0x00, 0x03, - 0x40, 0x85, 0x20, 0x00, 0x40, 0x81, 0x08, 0x00, 0x80, 0x89, 0x11, 0xc0, - 0x04, 0x02, 0x07, 0xe1, 0x41, 0x7a, 0x30, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x69, 0x27, 0x59, 0x92, 0x60, 0x04, 0x81, 0x32, 0x61, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x59, 0x32, 0x68, 0x09, 0x04, 0x01, 0xfd, 0x51, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x11, 0x81, 0x1a, 0x30, 0x00, - 0x83, 0x19, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0xf4, - 0x04, 0x00, 0x17, 0xf3, 0x40, 0x9a, 0x60, 0x00, 0x58, 0xa2, 0x68, 0x01, - 0x58, 0xa2, 0x58, 0x00, 0x58, 0xa2, 0x30, 0x04, 0x58, 0xa3, 0x20, 0x03, - 0x58, 0xa3, 0xa0, 0x02, 0x58, 0xa3, 0x48, 0x05, 0x58, 0xa2, 0x28, 0x06, - 0x80, 0x95, 0x70, 0x40, 0x04, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf0, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x65, 0xfd, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x64, 0x31, 0x04, 0x01, 0xfc, 0x80, 0x04, 0x01, 0xf7, 0xeb, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, 0x58, 0x9d, 0x30, 0x06, - 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, - 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, - 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x50, 0x9d, 0x40, 0x00, - 0x80, 0x9d, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x41, 0x78, 0xe0, 0x00, - 0x59, 0x30, 0xd4, 0x03, 0x48, 0x6b, 0xc8, 0x56, 0x59, 0x30, 0xdc, 0x03, - 0x82, 0x6c, 0xd4, 0x80, 0x00, 0x00, 0x00, 0x02, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x10, 0x07, - 0x59, 0x9c, 0xd0, 0x19, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x02, 0x00, 0x05, 0x80, 0x6c, 0xd9, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x42, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x71, 0x88, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, 0x48, 0x81, 0x38, 0x00, - 0x59, 0x30, 0xdc, 0x06, 0x82, 0x6d, 0x74, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x83, 0xf1, 0x75, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x27, - 0x82, 0xb9, 0x74, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x24, - 0x59, 0x32, 0x68, 0x09, 0x82, 0x6d, 0x74, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x83, 0xf1, 0x75, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1d, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xd0, 0xa7, 0x80, 0x6c, 0xd4, 0x00, - 0x50, 0x68, 0xd0, 0x00, 0x08, 0x69, 0xf0, 0x00, 0x00, 0x10, 0xd0, 0xbe, - 0x00, 0x10, 0xd1, 0x0b, 0x00, 0x10, 0xd0, 0xdc, 0x00, 0x10, 0xd1, 0x1d, - 0x00, 0x10, 0xd1, 0x0b, 0x00, 0x10, 0xd0, 0xd8, 0x00, 0x10, 0xd0, 0xe8, - 0x00, 0x10, 0xd0, 0xbe, 0x00, 0x10, 0xd0, 0xb9, 0x00, 0x10, 0xd0, 0xfe, - 0x00, 0x10, 0xd0, 0xcc, 0x00, 0x10, 0xd0, 0xb9, 0x00, 0x10, 0xd0, 0xb9, - 0x00, 0x10, 0xd0, 0xb9, 0x00, 0x10, 0xd0, 0xb9, 0x00, 0x10, 0xd0, 0xbe, - 0x00, 0x10, 0xd0, 0xcc, 0x00, 0x10, 0xd0, 0xc5, 0x40, 0x6c, 0xd0, 0x00, - 0x41, 0x78, 0xd8, 0x00, 0x40, 0x6c, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x9c, 0x40, 0x6c, 0xd0, 0x00, - 0x41, 0x78, 0xd8, 0x00, 0x40, 0x6c, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x96, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf6, - 0x59, 0x32, 0x58, 0x17, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x37, - 0x59, 0x30, 0xd2, 0x03, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x78, 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x54, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf0, 0x83, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xe3, 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf5, - 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x5c, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4a, 0x76, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x3e, - 0x04, 0x01, 0xf7, 0xee, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xd3, 0x59, 0x30, 0xd2, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x61, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xe1, 0x49, 0x42, 0x5a, 0x06, - 0x49, 0x7a, 0x5c, 0x09, 0x81, 0x36, 0x69, 0xc0, 0x04, 0x02, 0x00, 0x2b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xeb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4a, 0x76, 0x04, 0x01, 0xf7, 0xd8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5e, 0xbc, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x07, 0xbd, - 0x59, 0x30, 0xd2, 0x03, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, - 0x04, 0x00, 0x00, 0x45, 0x42, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, 0x47, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x71, 0xf9, 0x04, 0x01, 0xf0, 0x50, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xb0, 0x59, 0x30, 0xd4, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x43, 0x04, 0x00, 0x07, 0xac, 0x04, 0x01, 0xff, 0x6a, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x38, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0x60, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xbc, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xbe, 0x04, 0x01, 0xf7, 0xb9, - 0x81, 0x36, 0x69, 0xc0, 0x04, 0x02, 0x00, 0x0f, 0x41, 0x78, 0xd0, 0x00, - 0x40, 0x68, 0xd8, 0x00, 0x40, 0x68, 0xe0, 0x00, 0x04, 0x01, 0xf7, 0xa0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x7b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xeb, 0x04, 0x01, 0xf7, 0xd4, 0x49, 0x42, 0x5a, 0x06, - 0x49, 0x7a, 0x5c, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, - 0x04, 0x01, 0xf7, 0xa9, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0x8e, 0x59, 0x30, 0xd2, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x23, - 0x59, 0x31, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0x9c, 0x4a, 0x01, 0x02, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x59, 0x30, 0xd4, 0x02, 0x48, 0x69, 0x04, 0x06, - 0x58, 0x80, 0xd4, 0x08, 0x8c, 0x68, 0xd5, 0x12, 0x04, 0x02, 0x00, 0x13, - 0x49, 0x41, 0x02, 0x06, 0x49, 0x79, 0x00, 0x09, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xeb, 0x40, 0x82, 0x58, 0x00, 0x04, 0x01, 0xf7, 0x9d, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0x87, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf0, 0x0e, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x1c, 0x32, 0x04, 0x01, 0xf7, 0xc7, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0x9e, - 0x58, 0x82, 0x58, 0x09, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x37, - 0x04, 0x01, 0xf7, 0xeb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdb, - 0x04, 0x01, 0xf7, 0xdc, 0x58, 0x9d, 0x00, 0x00, 0x80, 0x9d, 0x38, 0x00, - 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x05, - 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, 0x48, 0x89, 0x38, 0x02, - 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, 0x41, 0x31, 0x08, 0x00, - 0x41, 0x2d, 0x10, 0x00, 0x41, 0x35, 0x18, 0x00, 0x41, 0x39, 0x20, 0x00, - 0x49, 0x33, 0xc8, 0x57, 0x49, 0x43, 0xc8, 0x57, 0x49, 0x3f, 0xc8, 0x57, - 0x42, 0x01, 0x00, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x59, 0xa8, 0xd0, 0x0d, - 0x41, 0x64, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x2b, - 0x41, 0x58, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, 0x04, 0x02, 0x10, 0x0d, - 0x40, 0x82, 0x60, 0x00, 0x8d, 0x3e, 0x7d, 0x12, 0x04, 0x00, 0x00, 0x04, - 0x40, 0x80, 0x00, 0x00, 0x80, 0x85, 0x74, 0x80, 0x04, 0x00, 0x00, 0x02, - 0x04, 0x01, 0xff, 0x17, 0x82, 0x81, 0x04, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x41, 0x58, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, 0x04, 0x00, 0x17, 0xf5, - 0x41, 0x54, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, 0x04, 0x02, 0x10, 0x1b, - 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x00, 0x00, 0x19, 0x59, 0xa8, 0xd0, 0x63, - 0x59, 0xa8, 0x00, 0x67, 0x80, 0x69, 0x74, 0x80, 0x04, 0x00, 0x00, 0x15, - 0x40, 0x82, 0x60, 0x00, 0x58, 0x80, 0xd0, 0x09, 0x80, 0x68, 0xd1, 0xc0, - 0x04, 0x02, 0x00, 0x05, 0x58, 0x80, 0xd2, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x02, 0x04, 0x01, 0xff, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x6d, 0x04, 0x01, 0xfe, 0xfd, - 0x82, 0x81, 0x04, 0x00, 0x00, 0x00, 0x00, 0x24, 0x41, 0x54, 0x00, 0x00, - 0x80, 0x81, 0x74, 0x80, 0x04, 0x00, 0x17, 0xea, 0x04, 0x01, 0xf0, 0x03, - 0x41, 0x51, 0x00, 0x00, 0x04, 0x01, 0xf7, 0xe4, 0x40, 0x86, 0x60, 0x00, - 0x40, 0x8a, 0x58, 0x00, 0x40, 0x8e, 0x68, 0x00, 0x40, 0x92, 0x70, 0x00, - 0x58, 0x9d, 0x20, 0x04, 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x1c, 0x01, 0xf0, 0x00, 0x80, 0x9d, 0x38, 0x40, - 0x48, 0x81, 0x38, 0x00, 0x59, 0x30, 0xdc, 0x06, 0x82, 0x6d, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x11, 0x83, 0xf1, 0x75, 0x00, 0x0d, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x26, 0x82, 0xb9, 0x74, 0x80, 0x0c, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x23, 0x82, 0x6d, 0x74, 0x80, 0x00, 0x00, 0x00, 0x11, - 0x83, 0xf1, 0x75, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1d, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xd1, 0xbe, 0x80, 0x6c, 0xd4, 0x00, - 0x50, 0x68, 0xd0, 0x00, 0x08, 0x69, 0xf0, 0x00, 0x00, 0x10, 0xd1, 0xd5, - 0x00, 0x10, 0xd2, 0x22, 0x00, 0x10, 0xd1, 0xe0, 0x00, 0x10, 0xd1, 0xf8, - 0x00, 0x10, 0xd2, 0x22, 0x00, 0x10, 0xd1, 0xdc, 0x00, 0x10, 0xd2, 0x43, - 0x00, 0x10, 0xd1, 0xd5, 0x00, 0x10, 0xd1, 0xd0, 0x00, 0x10, 0xd2, 0x59, - 0x00, 0x10, 0xd2, 0x35, 0x00, 0x10, 0xd1, 0xd0, 0x00, 0x10, 0xd1, 0xd0, - 0x00, 0x10, 0xd1, 0xd0, 0x00, 0x10, 0xd1, 0xd0, 0x00, 0x10, 0xd1, 0xd5, - 0x00, 0x10, 0xd1, 0xef, 0x00, 0x10, 0xd1, 0xe8, 0x40, 0x6c, 0xd0, 0x00, - 0x41, 0x78, 0xd8, 0x00, 0x40, 0x6c, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0xaa, 0x40, 0x6c, 0xd0, 0x00, - 0x41, 0x78, 0xd8, 0x00, 0x40, 0x6c, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0xa4, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf6, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x88, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x71, 0x98, 0x04, 0x01, 0xf0, 0x98, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xea, - 0x59, 0x32, 0x58, 0x17, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x37, - 0x59, 0x32, 0x58, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf2, 0x49, 0x42, 0x5a, 0x06, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x04, 0x01, 0xf7, 0xee, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xda, 0x8d, 0x3e, 0x7d, 0x00, 0x04, 0x00, 0x00, 0x09, - 0x59, 0x30, 0xd0, 0x17, 0x41, 0x48, 0x00, 0x00, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x02, 0x07, 0xd4, 0x59, 0x30, 0xd0, 0x18, 0x41, 0x4c, 0x00, 0x00, - 0x80, 0x69, 0x74, 0x80, 0x04, 0x02, 0x07, 0xd0, 0x59, 0x30, 0xd2, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x73, - 0x59, 0x31, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xd7, 0x4a, 0x01, 0x02, 0x04, - 0x00, 0x00, 0x01, 0x03, 0x58, 0x80, 0xd4, 0x08, 0x8c, 0x68, 0xd5, 0x12, - 0x04, 0x02, 0x00, 0x65, 0x49, 0x41, 0x02, 0x06, 0x49, 0x79, 0x00, 0x09, - 0x40, 0x82, 0x58, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x7b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x8d, 0xeb, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x89, 0xe1, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x3e, 0x04, 0x01, 0xf7, 0xc4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xb0, 0x59, 0x30, 0xd4, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x43, 0x04, 0x00, 0x07, 0xac, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0xd0, 0x7d, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x48, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x89, 0x60, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xb4, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x78, 0xbe, - 0x04, 0x01, 0xf7, 0xb1, 0x59, 0x30, 0xd2, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x37, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xa8, 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x5c, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, 0x04, 0x01, 0xf7, 0xa3, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xcd, 0xa7, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0x8f, 0x59, 0x30, 0xd2, 0x03, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x28, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0x96, 0x49, 0x42, 0x5a, 0x06, 0x49, 0x7a, 0x5c, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9e, 0x7b, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x8d, 0xeb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4a, 0x76, - 0x04, 0x01, 0xf7, 0x8d, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5e, 0xbc, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x07, 0x79, 0x59, 0x30, 0xd2, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x75, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04, 0x02, 0x07, 0x72, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x63, 0xa0, 0x59, 0x32, 0x58, 0x08, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x88, 0x34, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0x7b, 0x04, 0x01, 0xf7, 0x8a, 0x49, 0x42, 0x5a, 0x06, - 0x49, 0x7a, 0x5c, 0x09, 0x04, 0x01, 0xf7, 0xaf, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0xc8, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0xd7, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x1c, 0x32, 0x04, 0x01, 0xf7, 0xb7, 0x58, 0x82, 0x58, 0x09, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x07, 0x37, 0x04, 0x01, 0xf7, 0x99, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x0d, 0xdb, 0x04, 0x01, 0xf7, 0x8c, - 0x58, 0x9d, 0x00, 0x00, 0x80, 0x9d, 0x38, 0x00, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9c, 0x74, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x02, 0x04, 0x01, 0xf0, 0x03, 0x59, 0x32, 0x68, 0x09, - 0x04, 0x01, 0xff, 0x21, 0x1c, 0x01, 0xf0, 0x00, 0x82, 0x9d, 0x3c, 0x80, - 0x00, 0x00, 0x00, 0x06, 0x48, 0x81, 0x38, 0x00, 0x48, 0x85, 0x38, 0x01, - 0x48, 0x89, 0x38, 0x02, 0x48, 0x8d, 0x38, 0x03, 0x48, 0x91, 0x38, 0x04, - 0x48, 0x95, 0x38, 0x05, 0x41, 0x31, 0x10, 0x00, 0x41, 0x2d, 0x20, 0x00, - 0x41, 0x35, 0x28, 0x00, 0x49, 0x33, 0xc8, 0x57, 0x49, 0x47, 0xc8, 0x57, - 0x49, 0x43, 0xc8, 0x57, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x6d, - 0x40, 0xc5, 0x18, 0x00, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x9b, 0x79, - 0x41, 0x31, 0x08, 0x00, 0x81, 0x32, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x48, - 0x42, 0x00, 0x00, 0x00, 0x00, 0x10, 0xb5, 0xb8, 0x81, 0x31, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x44, 0x59, 0xa8, 0xd0, 0x0d, 0x80, 0x68, 0xd0, 0x40, - 0x42, 0x01, 0x00, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x40, 0x68, 0x00, 0x00, - 0x81, 0x65, 0x74, 0x80, 0x04, 0x00, 0x00, 0x43, 0x41, 0x58, 0x00, 0x00, - 0x80, 0x81, 0x74, 0x80, 0x04, 0x02, 0x10, 0x0c, 0x40, 0x82, 0x60, 0x00, - 0x40, 0x80, 0x00, 0x00, 0x80, 0x85, 0x74, 0x80, 0x04, 0x00, 0x00, 0x03, - 0x40, 0x84, 0xd0, 0x00, 0x04, 0x01, 0xff, 0xcf, 0x82, 0x81, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x41, 0x58, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, - 0x04, 0x00, 0x17, 0xf6, 0x41, 0x54, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, - 0x04, 0x02, 0x10, 0x12, 0x8d, 0x3e, 0x7d, 0x18, 0x04, 0x00, 0x00, 0x10, - 0x59, 0xa8, 0xd0, 0x63, 0x59, 0xa8, 0x00, 0x67, 0x80, 0x69, 0x74, 0x80, - 0x04, 0x00, 0x00, 0x0c, 0x40, 0x82, 0x60, 0x00, 0x58, 0x80, 0xd0, 0x09, - 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x00, 0x00, 0x0e, 0x40, 0x84, 0xd0, 0x00, - 0x04, 0x01, 0xff, 0xbb, 0x82, 0x81, 0x04, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x41, 0x54, 0x00, 0x00, 0x80, 0x81, 0x74, 0x80, 0x04, 0x00, 0x17, 0xf0, - 0x40, 0x8a, 0x60, 0x00, 0x40, 0x92, 0x58, 0x00, 0x40, 0x96, 0x68, 0x00, - 0x80, 0x8d, 0x70, 0x40, 0x04, 0x00, 0x00, 0x1e, 0x04, 0x01, 0xf0, 0x23, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x43, 0x3e, 0x40, 0xc6, 0x68, 0x00, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xf1, 0x58, 0xc4, 0xd0, 0x02, - 0x59, 0x30, 0xd8, 0x1e, 0x82, 0x68, 0x05, 0x00, 0x00, 0xff, 0xff, 0xff, - 0x80, 0x6d, 0x74, 0x80, 0x04, 0x02, 0x07, 0xeb, 0x59, 0x30, 0xd2, 0x03, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x11, - 0x49, 0x36, 0x60, 0x09, 0x04, 0x01, 0xfe, 0xc6, 0x82, 0x81, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x24, 0x04, 0x01, 0xf7, 0xe4, 0x59, 0xa8, 0xd0, 0x0d, - 0x42, 0x01, 0x00, 0x00, 0x00, 0x10, 0xd8, 0xd4, 0x40, 0x68, 0x00, 0x00, - 0x81, 0x65, 0x74, 0x80, 0x04, 0x02, 0x07, 0xbf, 0x41, 0x51, 0x00, 0x00, - 0x04, 0x01, 0xf7, 0xcb, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x64, 0x5f, - 0x04, 0x01, 0xf0, 0x04, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0xa1, 0x6d, - 0x04, 0x01, 0xf7, 0xee, 0x58, 0x9d, 0x28, 0x05, 0x58, 0x9d, 0x20, 0x04, - 0x58, 0x9d, 0x18, 0x03, 0x58, 0x9d, 0x10, 0x02, 0x58, 0x9d, 0x08, 0x01, - 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x1c, 0x01, 0xf0, 0x00, 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x14, 0xbe, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x5c, 0x88, 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x06, - 0x48, 0x6b, 0x88, 0xa3, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xb9, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x05, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xdb, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x6a, - 0x59, 0xc4, 0xd0, 0xa3, 0x82, 0x68, 0xd5, 0x00, 0xbe, 0x7f, 0xff, 0xff, - 0x48, 0x6b, 0x88, 0xa3, 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0xf8, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x3e, 0xc0, 0x59, 0xc4, 0xd0, 0xa3, - 0x82, 0x68, 0xd5, 0x40, 0x00, 0x01, 0x80, 0x00, 0x84, 0x68, 0xd5, 0x1c, - 0x48, 0x6b, 0x88, 0xa3, 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x20, - 0x48, 0x6b, 0x88, 0xa3, 0x49, 0x7b, 0x88, 0x08, 0x59, 0xc4, 0xd0, 0x06, - 0x82, 0x68, 0xd5, 0x00, 0xfb, 0xff, 0xff, 0x0e, 0x48, 0x6b, 0x88, 0x06, - 0x49, 0x7b, 0x28, 0x22, 0x49, 0x7b, 0x28, 0x23, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x01, 0xf4, 0x42, 0x00, 0xd8, 0x00, 0x00, 0x10, 0xd4, 0x90, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x5d, 0x4a, 0x03, 0x88, 0x05, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x79, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x21, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x3f, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0xf3, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x7e, - 0x4a, 0x03, 0x50, 0x3b, 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xb9, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x2a, - 0x59, 0xc4, 0xd0, 0xa4, 0x82, 0x68, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x03, - 0x4a, 0x03, 0x88, 0x05, 0x04, 0x00, 0x00, 0x00, 0x59, 0xc4, 0xd0, 0xa3, - 0x82, 0x68, 0xd5, 0x40, 0x00, 0x01, 0xc0, 0x00, 0x48, 0x6b, 0x88, 0xa3, - 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x20, 0x48, 0x6b, 0x88, 0xa3, - 0x04, 0x01, 0xf0, 0x4b, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x89, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x06, 0x41, 0x78, 0xd0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x3f, 0x41, 0x78, 0xd0, 0x00, - 0x04, 0x01, 0xf7, 0xde, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0x99, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x25, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x15, 0xa9, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x34, - 0x59, 0xa8, 0xd0, 0x46, 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x00, 0x07, 0xd5, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xb8, 0x4a, 0x03, 0x50, 0x3b, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x32, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xdb, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x07, 0xd4, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xca, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x18, 0x4a, 0x03, 0x50, 0x30, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, 0x04, 0x01, 0xf0, 0x25, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xca, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x15, 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x70, - 0x84, 0x68, 0xd5, 0x32, 0x48, 0x6b, 0x88, 0xa3, 0x4a, 0x03, 0x88, 0x08, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x01, 0xf7, 0x9e, 0x42, 0x00, 0xd0, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x3f, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0xf7, 0xaf, - 0x40, 0xc4, 0xd0, 0x00, 0x40, 0xc4, 0xd8, 0x00, 0x40, 0xc4, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf7, 0xbb, - 0x40, 0xc4, 0xd0, 0x00, 0x40, 0xc4, 0xd8, 0x00, 0x40, 0xc4, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf7, 0x8b, - 0x40, 0xc4, 0xd0, 0x00, 0x40, 0xc4, 0xd8, 0x00, 0x40, 0xc4, 0xe0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf7, 0x9f, - 0x1c, 0x01, 0xf0, 0x00, 0x59, 0x94, 0xd0, 0x22, 0x59, 0x94, 0x00, 0x23, - 0x80, 0x68, 0xd5, 0x40, 0x41, 0x78, 0xd8, 0x00, 0x80, 0x68, 0xd1, 0xc0, - 0x04, 0x02, 0x00, 0x03, 0x42, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x40, 0x6d, 0x88, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x17, 0x7b, 0x4a, 0x03, 0x50, 0x3b, 0x00, 0x00, 0x00, 0x02, - 0x49, 0x7b, 0x50, 0x46, 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x20, - 0x48, 0x6b, 0x88, 0xa3, 0x49, 0x7b, 0x28, 0x22, 0x49, 0x7b, 0x28, 0x23, - 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x42, 0x00, 0xd8, 0x00, - 0x00, 0x10, 0xd4, 0x90, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x5b, 0x5d, - 0x1c, 0x01, 0xf0, 0x00, 0x04, 0x01, 0xff, 0xe5, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x04, 0x4a, 0x03, 0x50, 0x3b, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x01, 0xf0, 0x1f, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xa9, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x00, 0x04, 0x59, 0xa8, 0xd0, 0x46, - 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x02, 0x00, 0x08, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x18, 0x44, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x02, - 0x04, 0x01, 0xf0, 0x13, 0x04, 0x01, 0xff, 0xdd, 0x04, 0x01, 0xf0, 0x11, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xb8, 0x59, 0xa8, 0xd0, 0x45, - 0x8c, 0x68, 0xd5, 0x1e, 0x04, 0x00, 0x07, 0xf9, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x4c, 0xca, 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x03, - 0x04, 0x01, 0xff, 0xd2, 0x04, 0x01, 0xf0, 0x06, 0x4a, 0x03, 0x50, 0x30, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0x16, - 0x04, 0x01, 0xf7, 0xfa, 0x1c, 0x01, 0xf0, 0x00, 0x4a, 0x03, 0x50, 0x3b, - 0x00, 0x00, 0x00, 0x03, 0x49, 0x7b, 0x88, 0x85, 0x1c, 0x01, 0xf0, 0x00, - 0x42, 0x02, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x49, 0x7b, 0x50, 0x3b, - 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0x01, 0x49, 0x7b, 0x28, 0x22, - 0x49, 0x7b, 0x28, 0x23, 0x49, 0x7b, 0x88, 0x85, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xc4, 0xd0, 0x05, 0x82, 0x68, 0xd5, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x04, 0x02, 0x00, 0x03, 0x48, 0x6b, 0x88, 0x85, 0x04, 0x01, 0xf0, 0x06, - 0x59, 0xc4, 0xd0, 0x06, 0x82, 0x68, 0xd5, 0x40, 0x00, 0x00, 0x00, 0xf1, - 0x48, 0x6b, 0x88, 0x06, 0x04, 0x01, 0xff, 0xed, 0x1c, 0x01, 0xf0, 0x00, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xdb, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x05, 0x59, 0xa8, 0xd0, 0x2f, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0xaa, 0xaa, 0x04, 0x00, 0x00, 0x0c, 0x49, 0x7b, 0x50, 0x2f, - 0x59, 0xc4, 0xd0, 0x06, 0x82, 0x68, 0xd5, 0x40, 0x04, 0x00, 0x00, 0x01, - 0x48, 0x6b, 0x88, 0x06, 0x8d, 0x0e, 0x1d, 0x06, 0x04, 0x02, 0x00, 0x08, - 0x59, 0xc4, 0xd0, 0xa3, 0x84, 0x68, 0xd5, 0x46, 0x48, 0x6b, 0x88, 0xa3, - 0x04, 0x01, 0xf0, 0x04, 0x4a, 0x03, 0x50, 0x0f, 0x00, 0xff, 0xff, 0xff, - 0x04, 0x01, 0xf7, 0xf3, 0x04, 0x01, 0xff, 0xd5, 0x1c, 0x01, 0xf0, 0x00, - 0x82, 0x9d, 0x3c, 0x80, 0x00, 0x00, 0x00, 0x02, 0x48, 0x81, 0x38, 0x00, - 0x48, 0x85, 0x38, 0x01, 0x04, 0x01, 0xff, 0x8b, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x02, 0x00, 0x20, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x18, 0x44, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x13, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xca, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x02, 0x00, 0x18, 0x59, 0xc4, 0xd0, 0xa4, - 0x82, 0x68, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x82, 0x69, 0x74, 0x80, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x06, 0x59, 0xc4, 0xd0, 0x05, - 0x82, 0x69, 0x05, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8c, 0x68, 0xd5, 0x34, - 0x04, 0x00, 0x00, 0x0f, 0x04, 0x01, 0xff, 0xcc, 0x49, 0x7b, 0x88, 0x85, - 0x04, 0x01, 0xf0, 0x24, 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xa9, - 0x80, 0xc5, 0x89, 0xc0, 0x04, 0x00, 0x07, 0xfb, 0x59, 0xa8, 0xd0, 0x46, - 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x00, 0x07, 0xf8, 0x04, 0x01, 0xff, 0xa9, - 0x04, 0x01, 0xf0, 0x1b, 0x04, 0x01, 0xff, 0xb4, 0x04, 0x01, 0xf0, 0x19, - 0x59, 0x95, 0x08, 0x22, 0x80, 0x85, 0x70, 0x40, 0x04, 0x02, 0x07, 0xf1, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4c, 0xdb, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x07, 0xed, 0x4a, 0x03, 0x88, 0x05, 0x00, 0x00, 0x00, 0xf0, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x4d, 0x1a, 0x4a, 0x03, 0x50, 0x2f, - 0x00, 0x00, 0xaa, 0xaa, 0x48, 0x83, 0x50, 0x30, 0x59, 0xc4, 0xd0, 0xa3, - 0x84, 0x68, 0xd5, 0x46, 0x48, 0x6b, 0x88, 0xa3, 0x40, 0x86, 0xd8, 0x00, - 0x48, 0x83, 0x50, 0x3b, 0x48, 0x87, 0x88, 0x05, 0x48, 0x83, 0x28, 0x22, - 0x48, 0x83, 0x28, 0x23, 0x04, 0x01, 0xff, 0x9c, 0x04, 0x01, 0xf7, 0xdc, - 0x58, 0x9d, 0x08, 0x01, 0x58, 0x9d, 0x00, 0x00, 0x82, 0x9d, 0x3c, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x1c, 0x01, 0xf0, 0x00, 0x59, 0xa9, 0x70, 0x3b, - 0x48, 0xbb, 0xc8, 0x56, 0x42, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x14, 0xbe, 0x49, 0x7b, 0x50, 0x3b, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x15, 0xa9, 0x80, 0xc5, 0x89, 0xc0, - 0x04, 0x00, 0x00, 0x0e, 0x59, 0xa8, 0xd0, 0x4f, 0x80, 0x68, 0xd1, 0xc0, - 0x04, 0x02, 0x00, 0x08, 0x80, 0x68, 0xd1, 0xc0, 0x04, 0x02, 0x00, 0x09, - 0x4a, 0x03, 0x50, 0x4f, 0x00, 0x00, 0x00, 0x0a, 0x4a, 0x03, 0x50, 0x46, - 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0xf0, 0x04, 0x80, 0x68, 0xd0, 0x40, - 0x48, 0x6b, 0x50, 0x4f, 0x04, 0x01, 0xf7, 0xf7, 0x49, 0x7b, 0x88, 0x85, - 0x02, 0x01, 0xf8, 0x00, 0x00, 0x10, 0x05, 0x99, 0x1c, 0x01, 0xf0, 0x00, - 0x59, 0xa8, 0xd0, 0x3b, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x83, 0xf1, 0x75, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, - 0x80, 0x69, 0x70, 0x40, 0x04, 0x00, 0x00, 0x12, 0x80, 0x69, 0x70, 0x40, - 0x04, 0x00, 0x10, 0x0e, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x00, 0x0f, 0x82, 0x69, 0x74, 0x80, 0x00, 0x00, 0x00, 0x03, - 0x04, 0x00, 0x00, 0x0e, 0x04, 0x01, 0xf0, 0x0e, 0x42, 0x00, 0xd8, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x41, 0x78, 0xe0, 0x00, 0x02, 0x01, 0xf8, 0x00, - 0x00, 0x10, 0x04, 0xec, 0x04, 0x01, 0xf0, 0x08, 0x04, 0x01, 0xfe, 0x76, - 0x04, 0x01, 0xf0, 0x06, 0x04, 0x01, 0xff, 0x2e, 0x04, 0x01, 0xf0, 0x04, - 0x04, 0x01, 0xff, 0x82, 0x04, 0x01, 0xf0, 0x02, 0x04, 0x01, 0xff, 0xc7, - 0x1c, 0x01, 0xf0, 0x00, 0x49, 0x7b, 0x28, 0x23, 0x1c, 0x01, 0xf0, 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, 0x08, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0b, - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x00, 0x00, 0x0f, 0x94, 0x1b, 0xc5, 0x02, 0x02, 0x80, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x07, 0x42, - 0x07, 0x3f, 0xca, 0x5a, 0x07, 0x05, 0xa5, 0xa5, 0x01, 0x92, 0x80, 0x09, - 0x07, 0x0f, 0xf0, 0xe1, 0x03, 0x80, 0x00, 0x06, 0x04, 0x95, 0x80, 0x10, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x80, 0x00, 0x06, 0x00, 0x90, 0x2f, - 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x02, 0xf0, 0x51, 0x04, 0x2e, 0x40, 0x20, - 0x01, 0x8f, 0x02, 0x1e, 0x03, 0x3e, 0x50, 0x00, 0x03, 0x02, 0x00, 0x00, - 0x07, 0x8d, 0x00, 0x18, 0x05, 0x93, 0x04, 0x28, 0x00, 0x92, 0x04, 0x2a, - 0x02, 0x8a, 0x03, 0x19, 0x07, 0x8b, 0x03, 0x17, 0x04, 0x8e, 0x80, 0x10, - 0x06, 0x78, 0xaa, 0xe5, 0x06, 0x00, 0x00, 0x01, 0x07, 0x81, 0x81, 0x74, - 0x04, 0x00, 0x10, 0xe6, 0x04, 0x48, 0xe0, 0xe6, 0x04, 0x81, 0x80, 0x10, - 0x00, 0x2f, 0xb0, 0x08, 0x04, 0x48, 0xe0, 0xe6, 0x04, 0x81, 0x80, 0x10, - 0x06, 0x0f, 0xf0, 0xe6, 0x00, 0x58, 0x04, 0x01, 0x05, 0x48, 0x80, 0xff, - 0x04, 0x81, 0x80, 0x10, 0x02, 0x2a, 0x50, 0x01, 0x03, 0x04, 0x30, 0xd4, - 0x06, 0x78, 0x00, 0x43, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x04, 0x50, 0xff, - 0x06, 0x78, 0x00, 0x43, 0x03, 0x01, 0x90, 0x00, 0x05, 0x81, 0x85, 0xeb, - 0x02, 0x7c, 0x00, 0x45, 0x03, 0x02, 0x00, 0x00, 0x06, 0x81, 0x00, 0x37, - 0x02, 0x7c, 0x00, 0x45, 0x03, 0x04, 0x00, 0x00, 0x06, 0x81, 0x00, 0xc7, - 0x02, 0x7c, 0x00, 0x45, 0x03, 0x08, 0x00, 0x00, 0x06, 0x81, 0x06, 0x43, - 0x04, 0x90, 0x80, 0x37, 0x02, 0x91, 0x05, 0xe9, 0x01, 0x04, 0x10, 0xa6, - 0x03, 0x79, 0xff, 0x41, 0x03, 0x7f, 0xff, 0xff, 0x07, 0x2d, 0x60, 0x00, - 0x07, 0x60, 0x12, 0x41, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x05, 0x60, 0x04, 0x00, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x6c, 0x04, 0xff, - 0x06, 0x81, 0x06, 0x01, 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x02, 0x79, 0xff, 0x02, 0x07, 0x00, 0xff, 0xff, 0x07, 0x0f, 0xf0, 0xd1, - 0x01, 0x79, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, 0x04, 0x5c, 0x04, 0x02, - 0x04, 0x81, 0x86, 0x01, 0x06, 0x0f, 0xf0, 0xd0, 0x01, 0x79, 0xfe, 0xff, - 0x07, 0x00, 0xff, 0xff, 0x05, 0x7d, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, - 0x06, 0x81, 0x05, 0xe3, 0x05, 0x60, 0x0e, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x69, 0x07, 0x48, 0x00, 0x00, 0x07, 0x81, 0x05, 0xf5, - 0x06, 0x78, 0x00, 0x43, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x81, 0x00, 0x5f, - 0x03, 0x7c, 0x00, 0xff, 0x06, 0x00, 0x00, 0x10, 0x07, 0x81, 0x00, 0x5f, - 0x02, 0x80, 0x05, 0xf1, 0x03, 0x79, 0xff, 0x00, 0x07, 0x0f, 0xff, 0xff, - 0x06, 0x78, 0x00, 0x43, 0x07, 0xf0, 0x00, 0x00, 0x07, 0x5a, 0x00, 0x00, - 0x02, 0x0e, 0xf0, 0x01, 0x03, 0x86, 0x05, 0xf3, 0x05, 0x48, 0x40, 0x00, - 0x02, 0xa1, 0x81, 0x9e, 0x06, 0x2d, 0x60, 0x01, 0x00, 0x2f, 0xb0, 0x01, - 0x07, 0x0f, 0xf0, 0x69, 0x01, 0x86, 0x80, 0x72, 0x06, 0x0f, 0xf0, 0x79, - 0x05, 0x5c, 0x04, 0x41, 0x06, 0x81, 0x00, 0x10, 0x01, 0x2f, 0xb0, 0x00, - 0x06, 0x05, 0x60, 0xfb, 0x03, 0x80, 0x00, 0x78, 0x06, 0x0f, 0xf0, 0x79, - 0x02, 0x86, 0x81, 0x98, 0x07, 0x0f, 0xf0, 0x69, 0x05, 0x5c, 0x04, 0x41, - 0x06, 0x81, 0x00, 0x10, 0x06, 0x05, 0x60, 0xfb, 0x04, 0x00, 0xd0, 0xd0, - 0x06, 0x2d, 0x60, 0x02, 0x06, 0x48, 0x30, 0x0d, 0x06, 0x81, 0x00, 0x86, - 0x07, 0x0f, 0xf0, 0xd1, 0x06, 0x2d, 0x60, 0x01, 0x04, 0x5c, 0x04, 0x0b, - 0x06, 0x81, 0x00, 0x89, 0x05, 0x48, 0x80, 0x00, 0x04, 0x81, 0x80, 0x86, - 0x07, 0x2e, 0x50, 0x0c, 0x00, 0x20, 0x80, 0x01, 0x04, 0xa0, 0x04, 0xf7, - 0x02, 0x80, 0x00, 0x10, 0x06, 0x2d, 0x60, 0x01, 0x07, 0xf0, 0x00, 0x00, - 0x07, 0xf0, 0x00, 0x00, 0x07, 0x0f, 0xf0, 0xd1, 0x01, 0x79, 0xfe, 0xff, - 0x07, 0x00, 0x00, 0xff, 0x05, 0x5c, 0x04, 0x0c, 0x05, 0x81, 0x80, 0xbb, - 0x00, 0x07, 0xb0, 0x01, 0x03, 0x07, 0x90, 0x41, 0x03, 0x07, 0xa0, 0x00, - 0x06, 0x60, 0x0a, 0x79, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, - 0x06, 0x00, 0x00, 0x10, 0x07, 0x2d, 0x50, 0x03, 0x07, 0x8d, 0x00, 0x96, - 0x03, 0x07, 0xc0, 0x03, 0x00, 0x07, 0xd0, 0x04, 0x01, 0x07, 0xe0, 0x05, - 0x03, 0x07, 0xf0, 0x06, 0x02, 0x08, 0x00, 0x07, 0x00, 0x08, 0x10, 0x08, - 0x01, 0x08, 0x20, 0x09, 0x03, 0x08, 0x30, 0x0a, 0x00, 0x08, 0x40, 0x0b, - 0x03, 0x08, 0x50, 0x0c, 0x06, 0x8d, 0x00, 0xa1, 0x06, 0x78, 0x00, 0x7a, - 0x07, 0xf0, 0x00, 0x00, 0x01, 0x08, 0x80, 0xff, 0x03, 0x38, 0x60, 0x00, - 0x03, 0x01, 0x00, 0x00, 0x07, 0x2e, 0x63, 0x00, 0x02, 0x0e, 0xf0, 0x7f, - 0x02, 0x86, 0x00, 0x10, 0x07, 0x0f, 0xf0, 0x7d, 0x04, 0x50, 0x04, 0x7c, - 0x05, 0x0f, 0x80, 0xff, 0x00, 0x2f, 0xa8, 0x19, 0x06, 0x8d, 0x00, 0xae, - 0x02, 0x08, 0x00, 0x01, 0x00, 0x08, 0x10, 0x02, 0x04, 0x48, 0x80, 0x7a, - 0x06, 0x81, 0x00, 0xb5, 0x03, 0x79, 0xff, 0x03, 0x07, 0x00, 0x00, 0xff, - 0x01, 0x08, 0x20, 0x03, 0x06, 0x8d, 0x00, 0xb6, 0x02, 0x38, 0x60, 0x04, - 0x03, 0x01, 0x00, 0x00, 0x07, 0x2e, 0x6c, 0x00, 0x02, 0x80, 0x00, 0x10, - 0x06, 0x78, 0x00, 0x43, 0x07, 0x00, 0x00, 0xf0, 0x07, 0x81, 0x05, 0xfc, - 0x05, 0x00, 0x20, 0xff, 0x02, 0x7c, 0x00, 0x02, 0x06, 0x00, 0x00, 0x10, - 0x07, 0x81, 0x00, 0xc3, 0x03, 0x80, 0x05, 0xfc, 0x07, 0x00, 0xc0, 0xd1, - 0x03, 0x79, 0xff, 0x0c, 0x07, 0x00, 0x00, 0xff, 0x03, 0x80, 0x00, 0x8e, - 0x02, 0x04, 0xa0, 0x51, 0x06, 0x78, 0x00, 0x43, 0x07, 0x00, 0x00, 0xf0, - 0x03, 0x7c, 0x00, 0xff, 0x06, 0x00, 0x00, 0x10, 0x07, 0x81, 0x81, 0x6a, - 0x07, 0x2d, 0x60, 0x00, 0x00, 0x94, 0x85, 0xe5, 0x05, 0x0f, 0xb0, 0x56, - 0x04, 0x48, 0x80, 0xe6, 0x04, 0x81, 0x80, 0x10, 0x06, 0x0f, 0xf0, 0xd0, - 0x01, 0x79, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, 0x05, 0x7d, 0xfe, 0xff, - 0x07, 0x00, 0xff, 0xff, 0x06, 0x81, 0x05, 0xe3, 0x04, 0xa0, 0x02, 0x15, - 0x03, 0x49, 0xc0, 0xe4, 0x07, 0x81, 0x81, 0x1d, 0x07, 0x0f, 0xf0, 0x93, - 0x05, 0x00, 0x10, 0xff, 0x07, 0x0f, 0xf0, 0x93, 0x04, 0x5c, 0x04, 0x01, - 0x05, 0x81, 0x80, 0xdb, 0x02, 0x04, 0x60, 0x92, 0x04, 0x00, 0x20, 0x46, - 0x04, 0x60, 0x02, 0x02, 0x00, 0x54, 0x04, 0x01, 0x04, 0x82, 0x80, 0xe6, - 0x04, 0x50, 0x04, 0x25, 0x07, 0x00, 0x60, 0xff, 0x07, 0x30, 0xff, 0xff, - 0x07, 0x00, 0x00, 0x0f, 0x07, 0x42, 0x00, 0x0f, 0x05, 0x81, 0x01, 0x90, - 0x06, 0xa0, 0x05, 0xcb, 0x06, 0x48, 0xa0, 0x02, 0x04, 0x81, 0x80, 0xe9, - 0x00, 0x04, 0x70, 0x89, 0x07, 0x0f, 0xf0, 0x47, 0x04, 0x5c, 0x04, 0x43, - 0x07, 0x78, 0x00, 0xff, 0x07, 0xf0, 0x00, 0x00, 0x07, 0x81, 0x81, 0x8e, - 0x07, 0x78, 0x00, 0x47, 0x05, 0x00, 0xe0, 0x00, 0x05, 0x81, 0x85, 0xd2, - 0x07, 0x0f, 0xf0, 0x06, 0x01, 0x86, 0x01, 0x17, 0x01, 0x79, 0xfe, 0x47, - 0x07, 0x00, 0x00, 0x0f, 0x01, 0x04, 0x80, 0xff, 0x05, 0x6c, 0x70, 0x48, - 0x06, 0x81, 0x81, 0x02, 0x00, 0x7a, 0x0d, 0x4a, 0x04, 0x00, 0x38, 0x01, - 0x02, 0x20, 0xf0, 0x01, 0x01, 0x80, 0x01, 0x0f, 0x07, 0x60, 0x8e, 0x48, - 0x03, 0x4a, 0x60, 0xff, 0x07, 0x00, 0xf0, 0xff, 0x07, 0x4b, 0x88, 0xff, - 0x03, 0x70, 0x00, 0xff, 0x07, 0x00, 0x06, 0x00, 0x05, 0x50, 0x04, 0x48, - 0x07, 0x4d, 0x00, 0xff, 0x04, 0x5a, 0x04, 0x4a, 0x03, 0x04, 0xa0, 0xff, - 0x07, 0x0f, 0xf0, 0x0f, 0x01, 0x54, 0x04, 0x06, 0x05, 0x82, 0x01, 0x17, - 0x04, 0x95, 0x01, 0x20, 0x05, 0xa0, 0x01, 0xbd, 0x02, 0x86, 0x81, 0x23, - 0x01, 0x34, 0xbf, 0xff, 0x07, 0x0f, 0xff, 0xff, 0x01, 0x04, 0x10, 0x2e, - 0x05, 0x0f, 0xd0, 0x41, 0x00, 0x80, 0x01, 0x26, 0x05, 0x95, 0x01, 0x1d, - 0x05, 0xa0, 0x01, 0xbd, 0x01, 0x86, 0x01, 0x1d, 0x02, 0x02, 0xf0, 0x0e, - 0x05, 0x2e, 0x40, 0x30, 0x04, 0x0f, 0xd0, 0x2f, 0x07, 0x0f, 0xc0, 0xff, - 0x05, 0xa0, 0x02, 0x1b, 0x02, 0x80, 0x00, 0x10, 0x04, 0x00, 0xe0, 0x2f, - 0x04, 0x2e, 0x40, 0x20, 0x02, 0x02, 0xf0, 0x51, 0x00, 0x04, 0x10, 0x0e, - 0x00, 0x04, 0xb0, 0x0e, 0x05, 0x0f, 0xd0, 0x41, 0x02, 0x4a, 0x6c, 0x46, - 0x04, 0x50, 0x04, 0x23, 0x05, 0x00, 0x70, 0xff, 0x03, 0x62, 0x00, 0x24, - 0x05, 0x00, 0x80, 0xff, 0x04, 0x00, 0x40, 0x46, 0x07, 0x00, 0x50, 0x0f, - 0x03, 0x20, 0x60, 0x00, 0x05, 0x60, 0x10, 0x48, 0x07, 0x00, 0xa0, 0xff, - 0x07, 0x00, 0x90, 0x0a, 0x07, 0x0f, 0xf0, 0x05, 0x04, 0x50, 0x04, 0x46, - 0x00, 0x54, 0x04, 0x25, 0x04, 0x82, 0x01, 0x57, 0x05, 0x60, 0x16, 0x22, - 0x05, 0x0f, 0x80, 0xff, 0x06, 0x3f, 0xa0, 0x32, 0x06, 0x00, 0x00, 0x02, - 0x03, 0x20, 0x30, 0x00, 0x01, 0x20, 0x40, 0x00, 0x03, 0x20, 0x50, 0x00, - 0x01, 0x20, 0xb0, 0x00, 0x03, 0x20, 0xc0, 0x00, 0x07, 0x60, 0x14, 0x41, - 0x05, 0x0f, 0x80, 0xff, 0x04, 0x3f, 0xa8, 0x52, 0x06, 0x00, 0x00, 0x01, - 0x07, 0x0f, 0xf0, 0x56, 0x05, 0x6c, 0x02, 0xff, 0x05, 0x0f, 0xb0, 0xff, - 0x07, 0x05, 0x60, 0xff, 0x03, 0x07, 0x90, 0x41, 0x05, 0x60, 0x0e, 0x41, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x11, 0x06, 0x00, 0x00, 0x3d, - 0x06, 0x78, 0x00, 0x43, 0x07, 0xf0, 0x00, 0x00, 0x06, 0x5a, 0x00, 0x7a, - 0x01, 0x08, 0x80, 0xff, 0x04, 0xa0, 0x01, 0xb6, 0x05, 0x8d, 0x01, 0x50, - 0x02, 0x08, 0xa0, 0x4a, 0x01, 0x08, 0xb0, 0x4b, 0x02, 0x38, 0x60, 0x01, - 0x03, 0x01, 0x00, 0x00, 0x07, 0x2e, 0x63, 0x00, 0x02, 0x80, 0x00, 0xa8, - 0x05, 0x00, 0xd0, 0x0a, 0x05, 0x50, 0x04, 0x05, 0x01, 0x4a, 0x68, 0xff, - 0x07, 0x00, 0x90, 0xff, 0x01, 0x54, 0x04, 0x0a, 0x07, 0x00, 0xc0, 0xff, - 0x06, 0x00, 0xa0, 0x23, 0x05, 0x00, 0xb0, 0x24, 0x02, 0x20, 0x60, 0x01, - 0x05, 0x60, 0x16, 0x22, 0x05, 0x0f, 0x80, 0xff, 0x06, 0x3f, 0xa0, 0x4a, - 0x06, 0x00, 0x00, 0x02, 0x05, 0x60, 0x10, 0x22, 0x05, 0x0f, 0x80, 0xff, - 0x04, 0x3f, 0xa8, 0x19, 0x06, 0x00, 0x00, 0x01, 0x06, 0x00, 0xa0, 0x0d, - 0x01, 0x80, 0x01, 0x3c, 0x06, 0x78, 0x00, 0x43, 0x07, 0x00, 0x00, 0xf0, - 0x05, 0x00, 0x10, 0xff, 0x02, 0x7c, 0x00, 0x01, 0x07, 0x00, 0x00, 0x30, - 0x06, 0x81, 0x05, 0xd9, 0x02, 0x7c, 0x00, 0x01, 0x06, 0x00, 0x00, 0x20, - 0x06, 0x81, 0x05, 0xd9, 0x02, 0x80, 0x05, 0xf1, 0x05, 0x48, 0x80, 0xff, - 0x06, 0x81, 0x00, 0x10, 0x07, 0x0f, 0xf0, 0x56, 0x05, 0x0f, 0xb0, 0xff, - 0x04, 0x48, 0x80, 0xe5, 0x05, 0x81, 0x01, 0x7d, 0x04, 0x48, 0x80, 0xe6, - 0x04, 0x81, 0x80, 0x10, 0x00, 0x80, 0x01, 0x83, 0x05, 0x6c, 0x02, 0xff, - 0x05, 0x0f, 0xb0, 0xff, 0x07, 0x05, 0x60, 0xff, 0x07, 0x2e, 0x53, 0x00, - 0x04, 0x48, 0x80, 0xe6, 0x04, 0x81, 0x80, 0x10, 0x07, 0x2d, 0x50, 0x03, - 0x06, 0x78, 0x00, 0x43, 0x07, 0xf0, 0x00, 0x00, 0x01, 0x08, 0x80, 0xff, - 0x05, 0x8d, 0x01, 0x87, 0x03, 0x38, 0x60, 0x05, 0x03, 0x01, 0x00, 0x00, - 0x03, 0x3e, 0x60, 0x00, 0x07, 0x00, 0x00, 0x0c, 0x05, 0x2e, 0x52, 0x00, - 0x02, 0x80, 0x00, 0x10, 0x01, 0x20, 0x91, 0x8e, 0x01, 0x80, 0x04, 0xfa, - 0x01, 0x20, 0x91, 0x90, 0x01, 0x80, 0x04, 0xfa, 0x00, 0x20, 0x91, 0x92, - 0x01, 0x80, 0x04, 0xfa, 0x03, 0x20, 0x90, 0x00, 0x01, 0x80, 0x04, 0xfa, - 0x01, 0x20, 0x91, 0x96, 0x01, 0x80, 0x04, 0xfa, 0x00, 0x20, 0x91, 0x98, - 0x01, 0x80, 0x04, 0xfa, 0x02, 0x49, 0x30, 0x75, 0x06, 0x81, 0x05, 0x32, - 0x01, 0x20, 0x91, 0x9a, 0x01, 0x80, 0x04, 0xfa, 0x06, 0x60, 0x1e, 0x01, - 0x05, 0x0f, 0x80, 0xff, 0x06, 0x3f, 0xa0, 0x29, 0x06, 0x00, 0x00, 0x08, - 0x02, 0x01, 0x50, 0x10, 0x02, 0x01, 0x60, 0x51, 0x00, 0x01, 0x70, 0x51, - 0x00, 0x01, 0x10, 0x51, 0x05, 0x60, 0x1a, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x3a, 0x06, 0x00, 0x00, 0x08, 0x05, 0x60, 0x0e, 0x41, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x46, 0x40, 0x00, 0x03, 0x2f, 0xa0, 0x0a, - 0x07, 0x00, 0x60, 0x11, 0x05, 0x00, 0x70, 0x12, 0x04, 0x00, 0x80, 0x13, - 0x07, 0x00, 0x90, 0x14, 0x06, 0x00, 0xa0, 0x15, 0x04, 0x00, 0xb0, 0x16, - 0x07, 0x00, 0xc0, 0x17, 0x07, 0xc0, 0x00, 0x00, 0x07, 0x2d, 0x50, 0x03, - 0x06, 0x60, 0x14, 0x79, 0x05, 0x0f, 0x80, 0xff, 0x04, 0x8d, 0x01, 0xb9, - 0x06, 0x3f, 0xa0, 0x51, 0x06, 0x00, 0x00, 0x3e, 0x07, 0xc0, 0x00, 0x00, - 0x06, 0x00, 0x50, 0x51, 0x04, 0x00, 0xe0, 0x2c, 0x06, 0x60, 0x06, 0x0e, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x03, 0x79, 0xff, 0x00, - 0x07, 0x00, 0x00, 0xff, 0x07, 0x6c, 0x00, 0x00, 0x05, 0x81, 0x01, 0xdd, - 0x06, 0x60, 0x48, 0x0e, 0x05, 0x00, 0xe0, 0xff, 0x03, 0x40, 0x00, 0xff, - 0x01, 0x54, 0x04, 0x27, 0x04, 0x82, 0x02, 0x0d, 0x03, 0x40, 0x00, 0x05, - 0x07, 0x0f, 0xf0, 0x05, 0x05, 0x5c, 0x04, 0x28, 0x05, 0x81, 0x02, 0x11, - 0x01, 0x68, 0x0e, 0x05, 0x05, 0x6c, 0x04, 0x05, 0x06, 0x81, 0x81, 0xbf, - 0x04, 0x0f, 0x80, 0x29, 0x05, 0x3f, 0xa8, 0x09, 0x07, 0x00, 0x00, 0x24, - 0x06, 0x60, 0x06, 0x49, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x03, 0x79, 0xff, 0x00, 0x07, 0x00, 0x00, 0xff, 0x07, 0x6c, 0x00, 0x00, - 0x06, 0x81, 0x81, 0xbf, 0x04, 0x00, 0xe0, 0x49, 0x03, 0x40, 0x00, 0x2d, - 0x05, 0x0f, 0x80, 0x2b, 0x05, 0x3f, 0xa8, 0x0a, 0x06, 0x00, 0x00, 0x16, - 0x06, 0x60, 0x48, 0x0e, 0x03, 0x02, 0xc0, 0xff, 0x03, 0x40, 0x00, 0xff, - 0x01, 0x54, 0x04, 0x27, 0x05, 0x82, 0x02, 0x0f, 0x07, 0x2d, 0x60, 0x00, - 0x04, 0x60, 0x04, 0x0e, 0x05, 0x0f, 0x80, 0xff, 0x00, 0x04, 0xd0, 0xd0, - 0x03, 0x79, 0xff, 0x4d, 0x07, 0x00, 0xff, 0xff, 0x01, 0x04, 0xe0, 0xd1, - 0x03, 0x79, 0xff, 0x4e, 0x07, 0x00, 0xff, 0xff, 0x06, 0x2d, 0x60, 0x02, - 0x03, 0x2f, 0xa0, 0x09, 0x02, 0x04, 0xf0, 0xd0, 0x06, 0x4b, 0x00, 0x4f, - 0x07, 0x78, 0x00, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0x5a, 0x04, 0x4f, - 0x07, 0x00, 0x00, 0xff, 0x00, 0x20, 0x10, 0x08, 0x04, 0x00, 0x20, 0x51, - 0x06, 0x00, 0x30, 0x51, 0x05, 0x30, 0x40, 0x00, 0x07, 0x00, 0x00, 0x60, - 0x03, 0x20, 0x50, 0x09, 0x07, 0x00, 0x60, 0x22, 0x04, 0x60, 0x04, 0x0e, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x3a, 0x06, 0x60, 0x3a, 0x0e, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x12, 0x06, 0x00, 0x00, 0x26, - 0x05, 0x00, 0x10, 0xd1, 0x04, 0x60, 0x32, 0x0e, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x0a, 0x06, 0x0f, 0xf0, 0x0e, 0x05, 0x5c, 0x04, 0x2e, - 0x04, 0x81, 0x02, 0x13, 0x07, 0xc0, 0x00, 0x00, 0x04, 0x00, 0xe0, 0x26, - 0x00, 0x80, 0x01, 0xcb, 0x02, 0x02, 0xc0, 0x26, 0x00, 0x80, 0x01, 0xe6, - 0x05, 0x00, 0xe0, 0x2e, 0x00, 0x80, 0x01, 0xe6, 0x04, 0x00, 0xe0, 0x51, - 0x01, 0x80, 0x02, 0x0c, 0x03, 0x49, 0xc0, 0xe4, 0x05, 0x81, 0x02, 0x18, - 0x07, 0xc0, 0x00, 0x00, 0x01, 0x3e, 0x40, 0x00, 0x07, 0x0c, 0x00, 0x00, - 0x07, 0xc0, 0x00, 0x00, 0x01, 0x3e, 0x40, 0x00, 0x03, 0x08, 0x00, 0x00, - 0x07, 0xc0, 0x00, 0x00, 0x02, 0x97, 0x03, 0x08, 0x02, 0x2a, 0x50, 0x02, - 0x06, 0x90, 0x82, 0x20, 0x01, 0x91, 0x02, 0xa5, 0x03, 0x04, 0x00, 0xa6, - 0x06, 0x78, 0xaa, 0xe5, 0x06, 0x00, 0x00, 0x01, 0x01, 0xa1, 0x86, 0x33, - 0x06, 0x60, 0x0c, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x21, - 0x07, 0x4b, 0x00, 0x00, 0x07, 0x6c, 0x06, 0x00, 0x06, 0x81, 0x82, 0xa7, - 0x05, 0x60, 0x04, 0x03, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x06, 0x00, 0x00, 0x02, 0x02, 0x79, 0xff, 0x04, 0x07, 0x00, 0xff, 0xff, - 0x01, 0x04, 0x40, 0xd7, 0x01, 0x79, 0xfe, 0x44, 0x07, 0x00, 0xff, 0xff, - 0x04, 0x5c, 0x04, 0x04, 0x07, 0x81, 0x82, 0xa9, 0x03, 0x49, 0xf0, 0x44, - 0x07, 0x81, 0x82, 0xb2, 0x02, 0x49, 0x50, 0x01, 0x06, 0x81, 0x82, 0xab, - 0x06, 0x0f, 0xf0, 0x79, 0x04, 0x5c, 0x04, 0x40, 0x07, 0x81, 0x82, 0x3f, - 0x06, 0x44, 0xf0, 0x7a, 0x00, 0x2f, 0xb0, 0x08, 0x06, 0x0f, 0xf0, 0x79, - 0x04, 0x5c, 0x04, 0x40, 0x07, 0x81, 0x82, 0x44, 0x06, 0x44, 0xf0, 0x7a, - 0x00, 0x2f, 0xb0, 0x08, 0x06, 0x48, 0xf0, 0x01, 0x07, 0x81, 0x82, 0x9c, - 0x04, 0x60, 0x0e, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x06, 0x48, 0x00, 0x01, - 0x05, 0x81, 0x02, 0x63, 0x04, 0x48, 0xe0, 0x01, 0x05, 0x81, 0x02, 0x87, - 0x02, 0x46, 0x00, 0x01, 0x06, 0x44, 0xf0, 0x01, 0x01, 0x2f, 0xa8, 0x0a, - 0x04, 0x00, 0x80, 0x40, 0x06, 0xa0, 0x05, 0x04, 0x03, 0x86, 0x82, 0xa0, - 0x00, 0x49, 0x10, 0x01, 0x07, 0x81, 0x82, 0xa0, 0x07, 0x00, 0x50, 0xd8, - 0x05, 0x78, 0x01, 0x05, 0x07, 0xff, 0xff, 0x00, 0x06, 0x60, 0x0c, 0x02, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x12, 0x06, 0x00, 0x00, 0x02, - 0x05, 0xa0, 0x04, 0xee, 0x06, 0x2d, 0xa0, 0x01, 0x01, 0x3e, 0x40, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x06, 0x93, 0x00, 0x13, 0x02, 0x92, 0x00, 0x13, - 0x02, 0x80, 0x00, 0x10, 0x06, 0x44, 0xf0, 0x01, 0x01, 0x2f, 0xa8, 0x0a, - 0x02, 0x0e, 0xf0, 0x02, 0x00, 0x86, 0x02, 0x89, 0x04, 0x60, 0x08, 0x40, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x02, - 0x05, 0x78, 0x01, 0x05, 0x00, 0x80, 0x04, 0x40, 0x01, 0x7c, 0x01, 0x05, - 0x05, 0x00, 0x04, 0x00, 0x06, 0x81, 0x82, 0x89, 0x06, 0x60, 0x1e, 0x02, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x02, - 0x04, 0x60, 0x2a, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x0f, 0xf0, 0x05, - 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x02, 0x05, 0x5c, 0x04, 0x05, - 0x06, 0x81, 0x82, 0x89, 0x07, 0x00, 0x50, 0xd8, 0x05, 0x78, 0x01, 0x05, - 0x07, 0xff, 0xff, 0x00, 0x06, 0x00, 0x60, 0x51, 0x06, 0x60, 0x0c, 0x02, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x12, 0x06, 0x00, 0x00, 0x02, - 0x04, 0x00, 0x80, 0x40, 0x00, 0x45, 0xe0, 0x08, 0x05, 0xa0, 0x04, 0xee, - 0x00, 0x80, 0x02, 0x5d, 0x06, 0x44, 0xf0, 0x01, 0x01, 0x2f, 0xa8, 0x0a, - 0x05, 0x00, 0x20, 0xd8, 0x04, 0x60, 0x04, 0x40, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x01, 0x06, 0x48, 0x00, 0x01, - 0x07, 0x81, 0x82, 0x95, 0x05, 0x30, 0x80, 0x00, 0x03, 0x04, 0x00, 0x00, - 0x06, 0x00, 0x90, 0x40, 0x04, 0xa0, 0x04, 0xf2, 0x00, 0x80, 0x02, 0x5d, - 0x07, 0xa0, 0x06, 0x33, 0x05, 0x4b, 0x08, 0x00, 0x05, 0x6a, 0x07, 0x00, - 0x06, 0x60, 0x0c, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x00, 0x80, 0x02, 0x5d, 0x01, 0x3e, 0x40, 0x00, 0x06, 0x00, 0x00, 0x80, - 0x01, 0x20, 0x92, 0x9c, 0x01, 0x80, 0x04, 0xfa, 0x06, 0x00, 0x90, 0x08, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x40, 0x00, 0x04, 0xa0, 0x04, 0xf2, - 0x00, 0x80, 0x02, 0x5d, 0x02, 0x20, 0x90, 0x02, 0x01, 0x80, 0x02, 0xf9, - 0x03, 0x20, 0x90, 0x00, 0x01, 0x80, 0x02, 0xf9, 0x02, 0x20, 0x90, 0x04, - 0x01, 0x80, 0x02, 0xf9, 0x07, 0xa0, 0x03, 0x11, 0x06, 0x2d, 0xa0, 0x01, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x20, 0x00, 0x06, 0x00, 0x90, 0x40, - 0x04, 0xa0, 0x04, 0xf2, 0x00, 0x80, 0x02, 0x5e, 0x01, 0x3e, 0x40, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x02, 0x49, 0x50, 0x01, 0x06, 0x81, 0x82, 0xef, - 0x04, 0x60, 0x08, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x07, 0x21, 0xf0, 0x00, 0x03, 0x49, 0xf0, 0x03, - 0x05, 0x81, 0x02, 0xbe, 0x02, 0x45, 0xf0, 0x1f, 0x06, 0x00, 0x00, 0x02, - 0x00, 0x86, 0x02, 0xef, 0x07, 0x60, 0x14, 0x00, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x09, 0x06, 0x48, 0x00, 0x01, 0x04, 0x81, 0x02, 0xef, - 0x06, 0x60, 0x24, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, - 0x02, 0x0e, 0xf0, 0x01, 0x02, 0x86, 0x82, 0xef, 0x00, 0x9b, 0x02, 0xef, - 0x05, 0x00, 0x20, 0xd8, 0x06, 0x2d, 0xa0, 0x01, 0x06, 0x30, 0x30, 0x02, - 0x05, 0x00, 0x04, 0x30, 0x04, 0x60, 0x04, 0x40, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x12, 0x06, 0x00, 0x00, 0x01, 0x02, 0x8f, 0x82, 0xd3, - 0x05, 0x00, 0x40, 0xd8, 0x06, 0x2d, 0xa0, 0x01, 0x07, 0x60, 0x1e, 0x00, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x06, 0x0f, 0xf0, 0x04, 0x00, 0x54, 0x04, 0x02, 0x05, 0x82, 0x02, 0xed, - 0x06, 0x00, 0x50, 0x51, 0x06, 0x00, 0x60, 0x51, 0x06, 0x60, 0x22, 0x40, - 0x05, 0x0f, 0x80, 0xff, 0x06, 0x3f, 0xa0, 0x1a, 0x06, 0x00, 0x00, 0x02, - 0x06, 0x60, 0x0a, 0x40, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x0a, - 0x07, 0x00, 0x00, 0x03, 0x06, 0x0f, 0xf0, 0x40, 0x04, 0x5a, 0x04, 0x1f, - 0x01, 0x0e, 0xb0, 0xff, 0x06, 0x93, 0x00, 0x13, 0x02, 0x92, 0x00, 0x13, - 0x02, 0x80, 0x00, 0x10, 0x04, 0x00, 0x40, 0x02, 0x01, 0x80, 0x02, 0xdd, - 0x07, 0xa0, 0x03, 0x11, 0x06, 0x2d, 0xa0, 0x01, 0x05, 0x30, 0x80, 0x00, - 0x07, 0x00, 0x50, 0x00, 0x06, 0x00, 0x90, 0x40, 0x04, 0xa0, 0x04, 0xf2, - 0x05, 0x00, 0x80, 0xd8, 0x04, 0xa0, 0x04, 0xf7, 0x06, 0x2d, 0xa0, 0x01, - 0x02, 0x80, 0x00, 0x13, 0x05, 0x0f, 0xd0, 0x09, 0x05, 0x0f, 0xd0, 0x41, - 0x01, 0x3e, 0x40, 0x00, 0x06, 0x00, 0x00, 0x80, 0x05, 0x30, 0x80, 0x00, - 0x03, 0x01, 0x30, 0x00, 0x04, 0xa0, 0x04, 0xf2, 0x01, 0x04, 0x40, 0xd7, - 0x03, 0x49, 0xf0, 0x44, 0x07, 0x81, 0x03, 0x06, 0x06, 0x2d, 0xa0, 0x01, - 0x03, 0x8f, 0x03, 0x06, 0x03, 0xe0, 0x00, 0x00, 0x06, 0x2d, 0xa0, 0x01, - 0x02, 0x80, 0x00, 0x13, 0x02, 0x49, 0xc0, 0xe5, 0x06, 0x81, 0x00, 0x13, - 0x06, 0x2d, 0xa0, 0x01, 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x03, 0x3e, 0x50, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x03, 0x8f, 0x03, 0x0a, - 0x03, 0x80, 0x00, 0x11, 0x05, 0x00, 0x20, 0xd8, 0x04, 0x60, 0x04, 0x40, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x01, - 0x07, 0xc0, 0x00, 0x00, 0x00, 0x2f, 0xb0, 0x01, 0x02, 0x80, 0x03, 0x1a, - 0x01, 0x2f, 0xb0, 0x00, 0x03, 0x07, 0x50, 0x87, 0x07, 0x8d, 0x03, 0x1b, - 0x03, 0x38, 0x60, 0x00, 0x03, 0x02, 0x00, 0x00, 0x04, 0x48, 0x20, 0x75, - 0x07, 0x81, 0x03, 0x66, 0x06, 0x48, 0xa0, 0xe6, 0x06, 0x81, 0x03, 0x5b, - 0x06, 0x42, 0x00, 0x7f, 0x07, 0x81, 0x03, 0x59, 0x03, 0x40, 0x00, 0x7e, - 0x06, 0x0f, 0xf0, 0x38, 0x01, 0x54, 0x04, 0x7e, 0x03, 0xd0, 0x03, 0x48, - 0x05, 0x60, 0x02, 0x7d, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x03, 0x0e, 0xf0, 0x00, 0x03, 0x86, 0x05, 0x2b, 0x01, 0x07, 0xd0, 0x00, - 0x05, 0x60, 0x08, 0x00, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x03, 0x68, 0x1e, 0x00, 0x04, 0x50, 0x04, 0x20, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x09, 0x07, 0x00, 0x00, 0x3f, 0x02, 0x80, 0x03, 0x25, - 0x07, 0x0f, 0xf0, 0x7d, 0x04, 0x50, 0x04, 0x7c, 0x05, 0x0f, 0x80, 0xff, - 0x00, 0x2f, 0xa8, 0x19, 0x06, 0x8d, 0x03, 0x3b, 0x02, 0x08, 0x00, 0x01, - 0x00, 0x08, 0x10, 0x02, 0x04, 0x48, 0x80, 0x7a, 0x07, 0x81, 0x03, 0x42, - 0x03, 0x79, 0xff, 0x03, 0x07, 0x00, 0x00, 0xff, 0x01, 0x08, 0x20, 0x03, - 0x06, 0x8d, 0x03, 0x43, 0x02, 0x38, 0x60, 0x04, 0x03, 0x01, 0x00, 0x00, - 0x07, 0x2e, 0x6c, 0x00, 0x03, 0x80, 0x03, 0x66, 0x03, 0x80, 0x03, 0x4e, - 0x03, 0x80, 0x03, 0x50, 0x02, 0x80, 0x03, 0x52, 0x02, 0x80, 0x03, 0x54, - 0x03, 0x80, 0x03, 0x56, 0x02, 0x80, 0x03, 0x58, 0x07, 0x27, 0xc0, 0x05, - 0x02, 0x80, 0x03, 0x37, 0x06, 0x27, 0xc0, 0x08, 0x02, 0x80, 0x03, 0x37, - 0x06, 0x27, 0xc0, 0x0b, 0x02, 0x80, 0x03, 0x37, 0x06, 0x27, 0xc0, 0x0e, - 0x02, 0x80, 0x03, 0x37, 0x07, 0x27, 0xc0, 0x11, 0x02, 0x80, 0x03, 0x37, - 0x03, 0x80, 0x03, 0x28, 0x05, 0x2e, 0x68, 0x00, 0x03, 0x80, 0x03, 0x66, - 0x04, 0x48, 0x80, 0xe6, 0x06, 0x81, 0x05, 0x58, 0x05, 0x2e, 0x62, 0x00, - 0x07, 0x0f, 0xf0, 0x88, 0x01, 0x79, 0xfe, 0xff, 0x07, 0x0f, 0xff, 0xff, - 0x04, 0x81, 0x85, 0x23, 0x06, 0x0f, 0xf0, 0x83, 0x01, 0x86, 0x83, 0x81, - 0x03, 0x3e, 0x60, 0x00, 0x07, 0x00, 0x00, 0x03, 0x07, 0x8d, 0x03, 0x66, - 0x07, 0x28, 0x60, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x07, 0x8d, 0x03, 0x69, - 0x02, 0x8c, 0x03, 0x1a, 0x06, 0x48, 0xc0, 0xe6, 0x04, 0x81, 0x83, 0x86, - 0x04, 0x48, 0xe0, 0xe6, 0x07, 0x81, 0x03, 0x7e, 0x00, 0x49, 0x20, 0xe6, - 0x06, 0x81, 0x03, 0x79, 0x06, 0xa0, 0x05, 0x94, 0x05, 0x00, 0x10, 0x88, - 0x00, 0x70, 0x01, 0x01, 0x03, 0x10, 0x00, 0x00, 0x00, 0x08, 0x80, 0x01, - 0x03, 0x3e, 0x60, 0x00, 0x07, 0x00, 0x00, 0x88, 0x02, 0x80, 0x05, 0x85, - 0x02, 0x38, 0x60, 0x01, 0x07, 0x03, 0x00, 0x00, 0x03, 0x3e, 0x60, 0x00, - 0x06, 0x00, 0x00, 0x08, 0x03, 0x80, 0x03, 0xff, 0x02, 0x79, 0x90, 0x75, - 0x05, 0x00, 0x04, 0x0f, 0x06, 0x81, 0x00, 0x10, 0x06, 0x60, 0x14, 0x79, - 0x05, 0x00, 0x80, 0xff, 0x06, 0x30, 0x90, 0x52, 0x06, 0x00, 0x00, 0x3e, - 0x02, 0x80, 0x03, 0x8a, 0x06, 0x60, 0x22, 0x79, 0x05, 0x00, 0x80, 0xff, - 0x05, 0x30, 0x98, 0x12, 0x07, 0x00, 0x00, 0x41, 0x06, 0x48, 0x00, 0x7a, - 0x06, 0x81, 0x03, 0x92, 0x04, 0x48, 0x80, 0x75, 0x04, 0x81, 0x83, 0x92, - 0x04, 0x0f, 0x80, 0x08, 0x07, 0x0f, 0xa0, 0x09, 0x00, 0x49, 0x10, 0x7a, - 0x02, 0xa1, 0x84, 0x01, 0x00, 0x79, 0x80, 0x75, 0x06, 0x00, 0x05, 0x07, - 0x04, 0x81, 0x85, 0x43, 0x04, 0x48, 0xb0, 0x75, 0x07, 0x81, 0x03, 0x99, - 0x02, 0x49, 0x30, 0x75, 0x07, 0x81, 0x05, 0x30, 0x06, 0x48, 0xc0, 0xe6, - 0x05, 0x81, 0x83, 0xac, 0x06, 0x8d, 0x03, 0x9b, 0x02, 0x38, 0x60, 0x01, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x49, 0x10, 0x7a, 0x06, 0x81, 0x03, 0xa2, - 0x02, 0x0e, 0xf0, 0x83, 0x03, 0x86, 0x03, 0xac, 0x06, 0x48, 0x30, 0x75, - 0x06, 0x81, 0x03, 0xfd, 0x06, 0x78, 0x00, 0x7a, 0x07, 0x00, 0x00, 0x35, - 0x02, 0xa1, 0x84, 0xe5, 0x05, 0x30, 0x80, 0x00, 0x07, 0x06, 0x00, 0x00, - 0x06, 0x00, 0x90, 0x79, 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x80, 0x03, 0xfd, - 0x06, 0x48, 0x30, 0x75, 0x07, 0x81, 0x05, 0x0f, 0x06, 0x8d, 0x03, 0xae, - 0x02, 0x38, 0x60, 0x01, 0x07, 0x03, 0x00, 0x00, 0x04, 0x44, 0xe0, 0x7a, - 0x06, 0x48, 0x30, 0x7a, 0x04, 0x81, 0x83, 0xdf, 0x04, 0x48, 0x70, 0x7a, - 0x06, 0x81, 0x03, 0xf8, 0x06, 0x48, 0xf0, 0x7a, 0x07, 0x81, 0x03, 0xca, - 0x04, 0xa0, 0x04, 0xe5, 0x04, 0x00, 0x80, 0x79, 0x06, 0xa0, 0x05, 0x04, - 0x00, 0x86, 0x83, 0xda, 0x00, 0x49, 0x10, 0x7a, 0x04, 0x81, 0x83, 0xda, - 0x04, 0x60, 0x04, 0x08, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x02, 0x05, 0x78, 0x01, 0x05, 0x07, 0xff, 0xff, 0x00, - 0x07, 0x60, 0x0c, 0x7b, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x12, - 0x06, 0x00, 0x00, 0x02, 0x05, 0xa0, 0x04, 0xee, 0x02, 0x80, 0x03, 0xfd, - 0x05, 0x60, 0x10, 0x7b, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x03, 0x49, 0xc0, 0x00, 0x05, 0x81, 0x83, 0xd8, 0x04, 0x60, 0x0e, 0x79, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x3d, - 0x06, 0x60, 0x0a, 0x79, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, - 0x06, 0x00, 0x00, 0x10, 0x02, 0x80, 0x03, 0xfd, 0x00, 0x46, 0xe0, 0x7a, - 0x02, 0x80, 0x03, 0xf8, 0x06, 0x00, 0x90, 0x08, 0x05, 0x30, 0x80, 0x00, - 0x05, 0x00, 0x40, 0x00, 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x80, 0x03, 0xfd, - 0x05, 0x60, 0x16, 0x7b, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x11, - 0x07, 0x0f, 0xf0, 0x00, 0x04, 0x50, 0x04, 0x01, 0x03, 0x04, 0x60, 0xff, - 0x06, 0x0f, 0xf0, 0x25, 0x00, 0x54, 0x04, 0x46, 0x06, 0x82, 0x03, 0xe9, - 0x03, 0x04, 0x60, 0xff, 0x04, 0x09, 0x20, 0x46, 0x05, 0xa0, 0x02, 0x1b, - 0x06, 0x60, 0x06, 0x79, 0x05, 0x0f, 0x80, 0xff, 0x00, 0x20, 0x10, 0x07, - 0x01, 0x2f, 0xa8, 0x0a, 0x00, 0x46, 0x04, 0x7a, 0x03, 0x46, 0x30, 0xff, - 0x05, 0x00, 0x20, 0xff, 0x06, 0x00, 0x30, 0x51, 0x04, 0x60, 0x0e, 0x79, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x12, 0x06, 0x00, 0x00, 0x01, - 0x02, 0x80, 0x03, 0xfd, 0x04, 0xa0, 0x04, 0xe5, 0x05, 0x30, 0x80, 0x00, - 0x03, 0x02, 0x00, 0x00, 0x06, 0x00, 0x90, 0x79, 0x04, 0xa0, 0x04, 0xf2, - 0x03, 0x3e, 0x6a, 0x00, 0x07, 0x00, 0x00, 0x0a, 0x02, 0x07, 0x90, 0x51, - 0x02, 0x80, 0x00, 0x10, 0x04, 0x60, 0x3e, 0x79, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x07, 0x0f, 0xf0, 0x00, 0x00, 0x86, 0x04, 0x1a, - 0x05, 0x7d, 0xfe, 0xff, 0x07, 0xff, 0xff, 0xff, 0x04, 0x81, 0x04, 0x1a, - 0x05, 0x0f, 0x80, 0x00, 0x01, 0x2f, 0xa8, 0x11, 0x00, 0x79, 0xfe, 0x02, - 0x07, 0x00, 0x00, 0xff, 0x07, 0x7d, 0x66, 0xff, 0x06, 0x00, 0x00, 0xdc, - 0x06, 0x81, 0x84, 0x1a, 0x06, 0x0f, 0xf0, 0x01, 0x03, 0x86, 0x84, 0x1b, - 0x06, 0x4b, 0x00, 0x02, 0x06, 0x42, 0x00, 0x02, 0x06, 0x0f, 0xf0, 0x02, - 0x05, 0x50, 0x04, 0x00, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x00, 0x40, 0x84, - 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x02, 0x07, 0xc0, 0x00, 0x00, - 0x04, 0x60, 0x02, 0x01, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x00, 0x79, 0xfe, 0x02, 0x07, 0x00, 0x00, 0xff, - 0x07, 0x7d, 0x72, 0xff, 0x07, 0x00, 0x00, 0xdd, 0x06, 0x81, 0x84, 0x1a, - 0x06, 0x4b, 0x00, 0x02, 0x06, 0x42, 0x00, 0x02, 0x06, 0x00, 0x00, 0x01, - 0x01, 0x80, 0x04, 0x14, 0x06, 0x05, 0x00, 0x4c, 0x00, 0x80, 0x04, 0x2c, - 0x05, 0x93, 0x04, 0x28, 0x05, 0xa0, 0x04, 0xeb, 0x05, 0x4b, 0xc4, 0x50, - 0x04, 0x81, 0x04, 0x2f, 0x01, 0xd0, 0x04, 0x30, 0x00, 0x80, 0x04, 0x2f, - 0x00, 0x80, 0x04, 0x40, 0x01, 0x80, 0x04, 0x42, 0x01, 0x80, 0x04, 0xaa, - 0x01, 0x80, 0x04, 0xbd, 0x01, 0x80, 0x04, 0x4d, 0x01, 0x80, 0x04, 0x42, - 0x00, 0x80, 0x04, 0x7f, 0x00, 0x80, 0x04, 0x40, 0x00, 0x80, 0x04, 0x40, - 0x00, 0x80, 0x04, 0xc1, 0x00, 0x80, 0x04, 0x40, 0x01, 0x80, 0x04, 0xc5, - 0x00, 0x80, 0x04, 0xda, 0x01, 0x80, 0x04, 0x96, 0x00, 0x80, 0x04, 0x40, - 0x00, 0x80, 0x04, 0x40, 0x00, 0x20, 0x94, 0x40, 0x01, 0x80, 0x04, 0xfa, - 0x03, 0x79, 0xff, 0x50, 0x07, 0x0f, 0xff, 0xff, 0x06, 0x0f, 0xf0, 0x79, - 0x05, 0x5c, 0x04, 0x50, 0x04, 0x81, 0x04, 0xba, 0x00, 0x2f, 0xb0, 0x08, - 0x06, 0x0f, 0xf0, 0x79, 0x05, 0x5c, 0x04, 0x50, 0x04, 0x81, 0x04, 0xb9, - 0x05, 0xa0, 0x04, 0xdd, 0x01, 0x80, 0x04, 0xb2, 0x01, 0x79, 0xfe, 0x50, - 0x07, 0x0f, 0xff, 0xff, 0x07, 0x00, 0x50, 0xff, 0x06, 0x0f, 0xf0, 0x79, - 0x05, 0x5c, 0x04, 0x05, 0x04, 0x81, 0x04, 0x57, 0x00, 0x2f, 0xb0, 0x08, - 0x06, 0x0f, 0xf0, 0x79, 0x05, 0x5c, 0x04, 0x05, 0x06, 0x81, 0x84, 0xb6, - 0x07, 0x0f, 0xf0, 0x87, 0x01, 0x79, 0x80, 0xff, 0x06, 0x00, 0x05, 0x07, - 0x07, 0x81, 0x84, 0x5f, 0x02, 0x20, 0x30, 0x40, 0x05, 0x00, 0x20, 0x87, - 0x00, 0x49, 0xd0, 0x02, 0x04, 0x81, 0x04, 0x79, 0x05, 0x93, 0x04, 0x66, - 0x01, 0x25, 0x70, 0x00, 0x07, 0x3c, 0x3f, 0xff, 0x07, 0x00, 0x00, 0x0f, - 0x05, 0x2e, 0x40, 0x03, 0x07, 0x2e, 0x50, 0x30, 0x03, 0x04, 0xc0, 0x50, - 0x02, 0x40, 0x00, 0x57, 0x06, 0x74, 0x00, 0x57, 0x06, 0x00, 0x00, 0x02, - 0x06, 0x82, 0x00, 0x16, 0x04, 0x00, 0x20, 0x83, 0x07, 0x00, 0x30, 0x84, - 0x04, 0x00, 0x40, 0x85, 0x06, 0x60, 0x22, 0x79, 0x05, 0x0f, 0x80, 0xff, - 0x06, 0x3f, 0xa0, 0x1a, 0x06, 0x00, 0x00, 0x01, 0x04, 0xa0, 0x04, 0xe5, - 0x06, 0xa0, 0x05, 0x9d, 0x03, 0x3e, 0x6a, 0x00, 0x07, 0x00, 0x00, 0x0a, - 0x06, 0x2e, 0x50, 0x20, 0x00, 0x3e, 0x40, 0x02, 0x07, 0x00, 0x0a, 0x00, - 0x03, 0x80, 0x03, 0xff, 0x07, 0x42, 0x00, 0x03, 0x07, 0x81, 0x84, 0x5c, - 0x00, 0x79, 0x80, 0x02, 0x06, 0x00, 0x05, 0x07, 0x07, 0x81, 0x84, 0x5f, - 0x01, 0x80, 0x04, 0x6a, 0x04, 0x93, 0x04, 0x86, 0x01, 0x25, 0x70, 0x00, - 0x07, 0x3c, 0x3f, 0xff, 0x07, 0x00, 0x00, 0x0f, 0x05, 0x2e, 0x40, 0x03, - 0x07, 0x2e, 0x50, 0x30, 0x03, 0x04, 0xc0, 0x50, 0x06, 0x78, 0x00, 0xe6, - 0x07, 0x00, 0x00, 0x41, 0x05, 0x81, 0x04, 0x8b, 0x07, 0xa0, 0x05, 0xa6, - 0x04, 0x81, 0x80, 0x16, 0x00, 0x2f, 0xb0, 0x08, 0x06, 0x78, 0x00, 0xe6, - 0x07, 0x00, 0x00, 0x41, 0x04, 0x81, 0x04, 0x91, 0x07, 0xa0, 0x05, 0xa6, - 0x04, 0x81, 0x80, 0x16, 0x06, 0x2e, 0x50, 0x20, 0x00, 0x3e, 0x40, 0x02, - 0x07, 0x00, 0x0a, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x02, 0x80, 0x00, 0x10, - 0x03, 0x79, 0xff, 0x50, 0x07, 0x0f, 0xff, 0xff, 0x06, 0x0f, 0xf0, 0x79, - 0x05, 0x5c, 0x04, 0x50, 0x07, 0x81, 0x84, 0x9c, 0x02, 0x45, 0x50, 0x7a, - 0x00, 0x2f, 0xb0, 0x08, 0x06, 0x0f, 0xf0, 0x79, 0x05, 0x5c, 0x04, 0x50, - 0x06, 0x81, 0x84, 0xa1, 0x02, 0x45, 0x50, 0x7a, 0x00, 0x2f, 0xb0, 0x08, - 0x05, 0x60, 0x0e, 0x50, 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, - 0x02, 0x45, 0x50, 0x01, 0x05, 0x60, 0x0e, 0x50, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x0a, 0x00, 0x80, 0x04, 0xb3, 0x06, 0x95, 0x84, 0xba, - 0x01, 0x79, 0xfe, 0x50, 0x07, 0x0f, 0xff, 0xff, 0x04, 0x5c, 0x04, 0x2f, - 0x06, 0x81, 0x84, 0xba, 0x02, 0x02, 0xf0, 0x51, 0x04, 0x2e, 0x40, 0x20, - 0x00, 0x80, 0x04, 0xb3, 0x00, 0x2f, 0xb0, 0x08, 0x00, 0x3e, 0x40, 0x02, - 0x07, 0x00, 0x0a, 0x00, 0x02, 0x80, 0x00, 0x16, 0x06, 0x93, 0x84, 0xb9, - 0x06, 0x2e, 0x50, 0x20, 0x04, 0x2e, 0x40, 0x02, 0x00, 0x2f, 0xb0, 0x08, - 0x01, 0x3e, 0x40, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x02, 0x80, 0x00, 0x16, - 0x01, 0x79, 0xfe, 0x50, 0x07, 0x0f, 0xff, 0xff, 0x01, 0x02, 0x10, 0xff, - 0x02, 0x80, 0x00, 0x16, 0x01, 0x79, 0xfe, 0x50, 0x07, 0x0f, 0xff, 0xff, - 0x05, 0x03, 0x40, 0xff, 0x00, 0x80, 0x04, 0xb3, 0x01, 0x79, 0xfe, 0x50, - 0x07, 0x0f, 0xff, 0xff, 0x01, 0x02, 0xe0, 0xff, 0x07, 0x60, 0x28, 0x2e, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x22, 0x20, 0x00, 0x07, 0x22, 0x30, 0x00, - 0x05, 0x22, 0x40, 0x00, 0x07, 0x22, 0x50, 0x00, 0x07, 0x22, 0x60, 0x00, - 0x05, 0x22, 0x70, 0x00, 0x05, 0x22, 0x80, 0x00, 0x07, 0x22, 0x90, 0x00, - 0x07, 0x22, 0xa0, 0x00, 0x05, 0x22, 0xb0, 0x00, 0x06, 0x3f, 0xa0, 0x51, - 0x07, 0x00, 0x00, 0x11, 0x02, 0x02, 0xc0, 0x26, 0x05, 0x22, 0xd0, 0x00, - 0x05, 0x2e, 0x40, 0x0c, 0x02, 0x80, 0x00, 0x16, 0x03, 0x04, 0x30, 0xd4, - 0x06, 0x2e, 0x50, 0x08, 0x00, 0x80, 0x01, 0x76, 0x05, 0x60, 0x0e, 0x50, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x03, 0x46, 0x00, 0x00, - 0x01, 0x80, 0x04, 0xe8, 0x02, 0x46, 0x00, 0x7a, 0x00, 0x45, 0x20, 0x7a, - 0x00, 0x80, 0x04, 0xe6, 0x02, 0x46, 0x00, 0x7a, 0x06, 0x00, 0x00, 0x7a, - 0x04, 0x60, 0x0e, 0x79, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x07, 0xc0, 0x00, 0x00, 0x03, 0x92, 0x84, 0xeb, 0x07, 0x05, 0x00, 0xe1, - 0x07, 0xc0, 0x00, 0x00, 0x02, 0x45, 0xf0, 0x08, 0x04, 0x84, 0x04, 0xef, - 0x02, 0x0e, 0x00, 0x08, 0x07, 0xc0, 0x00, 0x00, 0x07, 0x0f, 0xf0, 0x09, - 0x06, 0x5a, 0x00, 0x08, 0x04, 0x84, 0x04, 0xf4, 0x02, 0x0e, 0x00, 0x08, - 0x07, 0xc0, 0x00, 0x00, 0x04, 0x84, 0x04, 0xf7, 0x02, 0x0e, 0x00, 0x08, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0xd0, 0x00, - 0x04, 0xa0, 0x04, 0xf2, 0x05, 0xa0, 0x04, 0xff, 0x02, 0x80, 0x00, 0x10, - 0x05, 0x2e, 0x43, 0x00, 0x07, 0x2e, 0x50, 0x0c, 0x07, 0x3c, 0x3f, 0xff, - 0x07, 0x00, 0x00, 0x0f, 0x07, 0xc0, 0x00, 0x00, 0x06, 0x60, 0x22, 0x08, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x11, 0x07, 0x6a, 0x00, 0x00, - 0x04, 0x81, 0x85, 0x0d, 0x06, 0x6a, 0x00, 0x01, 0x06, 0x81, 0x05, 0x0d, - 0x06, 0x00, 0x60, 0x51, 0x07, 0xc0, 0x00, 0x00, 0x02, 0x20, 0x60, 0x01, - 0x07, 0xc0, 0x00, 0x00, 0x06, 0x78, 0x00, 0x7a, 0x07, 0x00, 0x00, 0x21, - 0x05, 0x81, 0x85, 0x14, 0x00, 0x49, 0x10, 0x7a, 0x04, 0x81, 0x83, 0xae, - 0x04, 0x0f, 0xd0, 0x79, 0x06, 0x48, 0x30, 0x7a, 0x01, 0xa1, 0x86, 0x2d, - 0x05, 0xa0, 0x04, 0xe2, 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x10, 0x00, - 0x06, 0x00, 0x90, 0x79, 0x04, 0xa0, 0x04, 0xf2, 0x06, 0x8d, 0x05, 0x1c, - 0x03, 0x3e, 0x6a, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x02, 0x07, 0x90, 0x51, - 0x03, 0x38, 0x60, 0x06, 0x03, 0x01, 0x00, 0x00, 0x02, 0x80, 0x00, 0x10, - 0x06, 0x48, 0x30, 0x7a, 0x01, 0xa1, 0x86, 0x2d, 0x05, 0xa0, 0x04, 0xe2, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x10, 0x00, 0x06, 0x00, 0x90, 0x79, - 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x80, 0x05, 0x85, 0x06, 0x48, 0x30, 0x7a, - 0x07, 0x81, 0x81, 0x96, 0x04, 0xa0, 0x04, 0xe5, 0x03, 0x20, 0x95, 0x2b, - 0x01, 0x80, 0x04, 0xfa, 0x02, 0x49, 0x00, 0x75, 0x06, 0x81, 0x05, 0x40, - 0x04, 0x00, 0x20, 0x89, 0x04, 0x78, 0x01, 0x02, 0x07, 0xf0, 0x00, 0x00, - 0x05, 0x00, 0x10, 0x88, 0x06, 0xa0, 0x05, 0x94, 0x04, 0x74, 0x01, 0x01, - 0x03, 0x10, 0x00, 0x00, 0x06, 0x0f, 0xf0, 0x02, 0x04, 0x5c, 0x04, 0x01, - 0x05, 0x81, 0x85, 0x41, 0x00, 0x08, 0x80, 0x01, 0x03, 0x3e, 0x60, 0x00, - 0x07, 0x00, 0x00, 0xc0, 0x03, 0x80, 0x05, 0x81, 0x07, 0xf0, 0x00, 0x00, - 0x03, 0x20, 0x95, 0x41, 0x01, 0x80, 0x04, 0xfa, 0x04, 0x0f, 0xd0, 0x75, - 0x04, 0x0f, 0xd0, 0x7a, 0x04, 0x0f, 0xd0, 0x79, 0x06, 0x48, 0x30, 0x7a, - 0x06, 0x81, 0x05, 0x4c, 0x06, 0x78, 0x00, 0x75, 0x06, 0x00, 0x00, 0x07, - 0x05, 0x81, 0x85, 0x53, 0x07, 0xa0, 0x06, 0x2d, 0x06, 0x48, 0x60, 0x75, - 0x06, 0x81, 0x81, 0x94, 0x02, 0x49, 0x00, 0x75, 0x07, 0x81, 0x81, 0x9a, - 0x04, 0x48, 0x70, 0x75, 0x04, 0x81, 0x85, 0x5b, 0x02, 0x80, 0x05, 0x62, - 0x05, 0x30, 0x80, 0x00, 0x03, 0x01, 0x00, 0x00, 0x06, 0x00, 0x90, 0x79, - 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x80, 0x00, 0x10, 0x04, 0x48, 0xe0, 0xe6, - 0x05, 0x81, 0x83, 0x66, 0x00, 0x80, 0x01, 0x92, 0x05, 0x30, 0x80, 0x00, - 0x05, 0x00, 0xe0, 0x00, 0x06, 0x00, 0x90, 0x79, 0x04, 0xa0, 0x04, 0xf2, - 0x04, 0x00, 0x80, 0x89, 0x04, 0xa0, 0x04, 0xf7, 0x03, 0x80, 0x05, 0x81, - 0x05, 0xa0, 0x04, 0xe2, 0x05, 0x30, 0x80, 0x00, 0x07, 0x00, 0xf0, 0x00, - 0x06, 0x00, 0x90, 0x79, 0x07, 0x00, 0x00, 0x88, 0x07, 0xa0, 0x05, 0x6a, - 0x04, 0xa0, 0x04, 0xf2, 0x02, 0x80, 0x00, 0x10, 0x03, 0x38, 0x60, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x06, 0x8d, 0x05, 0x6d, - 0x03, 0x3e, 0x6a, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x02, 0x07, 0x90, 0x51, - 0x04, 0x48, 0xb0, 0x75, 0x07, 0x81, 0x05, 0x78, 0x02, 0x49, 0x30, 0x75, - 0x07, 0x81, 0x05, 0x78, 0x05, 0x30, 0x10, 0x05, 0x03, 0x01, 0x00, 0x00, - 0x02, 0x80, 0x05, 0x7a, 0x05, 0x30, 0x10, 0x06, 0x03, 0x01, 0x00, 0x00, - 0x05, 0x00, 0x20, 0x87, 0x06, 0x48, 0x50, 0x02, 0x04, 0x81, 0x85, 0x7a, - 0x07, 0x44, 0xc0, 0x00, 0x01, 0x08, 0x80, 0x00, 0x02, 0x08, 0x60, 0x01, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0x00, 0x10, 0x88, 0x06, 0xa0, 0x05, 0x94, - 0x06, 0x44, 0xc0, 0x01, 0x00, 0x08, 0x80, 0x01, 0x03, 0x3e, 0x6a, 0x00, - 0x06, 0x00, 0x00, 0x0e, 0x00, 0x49, 0x20, 0xe6, 0x04, 0x81, 0x85, 0x8a, - 0x02, 0x07, 0x90, 0x51, 0x06, 0x8d, 0x05, 0x8a, 0x06, 0x0f, 0xf0, 0x89, - 0x03, 0x49, 0x90, 0xff, 0x06, 0x81, 0x05, 0x91, 0x03, 0x38, 0x60, 0x05, - 0x03, 0x01, 0x00, 0x00, 0x02, 0x80, 0x00, 0x10, 0x03, 0x38, 0x60, 0x06, - 0x03, 0x01, 0x00, 0x00, 0x02, 0x80, 0x00, 0x10, 0x06, 0x8d, 0x05, 0x94, - 0x03, 0x38, 0x60, 0x00, 0x07, 0x03, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x06, 0x8d, 0x05, 0x98, 0x07, 0x0f, 0xf0, 0x87, 0x07, 0x48, 0x50, 0xff, - 0x05, 0x81, 0x85, 0x99, 0x07, 0xc0, 0x00, 0x00, 0x06, 0x8d, 0x05, 0x9d, - 0x02, 0x38, 0x60, 0x01, 0x07, 0x03, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x06, 0x8d, 0x05, 0xa1, 0x07, 0x0f, 0xf0, 0x87, 0x07, 0x48, 0x50, 0xff, - 0x04, 0x81, 0x85, 0xa2, 0x07, 0xc0, 0x00, 0x00, 0x05, 0x00, 0x20, 0x87, - 0x00, 0x49, 0xd0, 0x02, 0x04, 0x81, 0x85, 0xb5, 0x00, 0x2f, 0xb0, 0x08, - 0x06, 0x78, 0x00, 0xe6, 0x07, 0x00, 0x00, 0x41, 0x00, 0x2f, 0xb0, 0x08, - 0x04, 0x81, 0x85, 0xb5, 0x06, 0xa0, 0x05, 0xcb, 0x04, 0x48, 0xe0, 0x02, - 0x07, 0x81, 0x05, 0xb8, 0x06, 0x48, 0xa0, 0x02, 0x04, 0x81, 0x85, 0xc2, - 0x06, 0x48, 0x60, 0x02, 0x06, 0x81, 0x05, 0xbc, 0x02, 0x40, 0x00, 0x57, - 0x05, 0x6a, 0x02, 0xff, 0x07, 0xc0, 0x00, 0x00, 0x06, 0xa0, 0x05, 0xcb, - 0x06, 0x78, 0x81, 0x02, 0x06, 0x00, 0x00, 0x04, 0x04, 0x81, 0x85, 0xb5, - 0x04, 0x00, 0x20, 0x89, 0x07, 0x0f, 0xf0, 0xd4, 0x04, 0x5c, 0x04, 0x02, - 0x07, 0x78, 0x00, 0xff, 0x07, 0xf0, 0x00, 0x00, 0x04, 0x81, 0x85, 0xb5, - 0x00, 0x20, 0x20, 0x10, 0x02, 0x8c, 0x05, 0xb5, 0x07, 0xf0, 0x00, 0x00, - 0x06, 0x42, 0x00, 0x02, 0x05, 0x81, 0x85, 0xc3, 0x06, 0xa0, 0x05, 0x9d, - 0x03, 0x3e, 0x6a, 0x00, 0x07, 0x00, 0x00, 0x0a, 0x07, 0xc0, 0x00, 0x00, - 0x07, 0xf0, 0x00, 0x00, 0x06, 0x0f, 0xf0, 0xa2, 0x05, 0x00, 0x20, 0xff, - 0x06, 0x0f, 0xf0, 0xa2, 0x04, 0x5c, 0x04, 0x02, 0x05, 0x81, 0x85, 0xcc, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0xa0, 0x02, 0x1b, 0x03, 0x49, 0x50, 0x47, - 0x07, 0x81, 0x05, 0xd7, 0x03, 0x20, 0x90, 0x1d, 0x02, 0x80, 0x06, 0x29, - 0x02, 0x20, 0x90, 0x1f, 0x02, 0x80, 0x06, 0x29, 0x01, 0x49, 0x80, 0xe4, - 0x04, 0x81, 0x80, 0x10, 0x01, 0x3e, 0x40, 0x00, 0x07, 0x00, 0x30, 0x00, - 0x05, 0x60, 0x0e, 0x35, 0x05, 0x0f, 0x80, 0xff, 0x05, 0xa0, 0x07, 0x21, - 0x01, 0x20, 0x80, 0x03, 0x04, 0xa0, 0x04, 0xf7, 0x02, 0x80, 0x05, 0xf1, - 0x03, 0x20, 0x90, 0x09, 0x02, 0x80, 0x06, 0x29, 0x03, 0x20, 0x90, 0x11, - 0x02, 0x80, 0x06, 0x29, 0x02, 0x20, 0x90, 0x07, 0x02, 0x80, 0x06, 0x29, - 0x03, 0x20, 0x90, 0x03, 0x02, 0x80, 0x06, 0x29, 0x00, 0x49, 0x80, 0x43, - 0x04, 0x81, 0x85, 0xe3, 0x00, 0x49, 0x70, 0x43, 0x05, 0x81, 0x85, 0xe7, - 0x02, 0x20, 0x90, 0x01, 0x02, 0x80, 0x06, 0x29, 0x02, 0x20, 0x90, 0x0d, - 0x02, 0x80, 0x06, 0x29, 0x03, 0x20, 0x90, 0x0f, 0x02, 0x80, 0x06, 0x29, - 0x03, 0x49, 0x30, 0x00, 0x07, 0x81, 0x05, 0xfa, 0x02, 0x7c, 0x00, 0x45, - 0x07, 0x0a, 0x00, 0x00, 0x07, 0x81, 0x06, 0x03, 0x02, 0x20, 0x90, 0x0b, - 0x02, 0x80, 0x06, 0x29, 0x02, 0x20, 0x90, 0x13, 0x05, 0x30, 0x80, 0x00, - 0x01, 0x01, 0x20, 0x00, 0x04, 0xa0, 0x04, 0xf2, 0x00, 0x80, 0x01, 0x83, - 0x03, 0x20, 0x90, 0x05, 0x02, 0x80, 0x06, 0x29, 0x07, 0x2e, 0x50, 0x0c, - 0x00, 0x20, 0x80, 0x02, 0x04, 0xa0, 0x04, 0xf7, 0x02, 0x80, 0x00, 0x10, - 0x02, 0x20, 0x90, 0x15, 0x02, 0x80, 0x06, 0x29, 0x07, 0x2d, 0x60, 0x00, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x70, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x07, 0x00, 0x90, 0xd1, 0x03, 0x79, 0xff, 0x09, 0x07, 0x00, 0xff, 0xff, - 0x04, 0xa0, 0x04, 0xf2, 0x03, 0x20, 0x90, 0x17, 0x02, 0x80, 0x06, 0x29, - 0x03, 0x3e, 0x50, 0x00, 0x06, 0x00, 0x00, 0x80, 0x02, 0x20, 0x90, 0x19, - 0x02, 0x80, 0x06, 0x29, 0x07, 0x2d, 0x60, 0x00, 0x03, 0x3e, 0x50, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x07, 0xf0, 0x00, 0x00, 0x06, 0x0f, 0xf0, 0xd0, - 0x01, 0x79, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, 0x05, 0x7d, 0xfe, 0xff, - 0x07, 0x00, 0xff, 0xff, 0x04, 0x81, 0x80, 0x10, 0x02, 0x40, 0x00, 0x58, - 0x00, 0x64, 0x20, 0x58, 0x06, 0x82, 0x00, 0x10, 0x03, 0x3e, 0x50, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x04, 0x05, 0x80, 0x51, 0x03, 0x20, 0x90, 0x1b, - 0x02, 0x80, 0x06, 0x29, 0x05, 0x30, 0x80, 0x00, 0x01, 0x01, 0x20, 0x00, - 0x04, 0xa0, 0x04, 0xf2, 0x00, 0x80, 0x01, 0x76, 0x05, 0xa0, 0x02, 0x1b, - 0x05, 0x30, 0x80, 0x00, 0x05, 0x00, 0x80, 0x00, 0x06, 0x00, 0x90, 0x79, - 0x04, 0xa0, 0x04, 0xf2, 0x07, 0xc0, 0x00, 0x00, 0x03, 0x49, 0x00, 0xe4, - 0x04, 0x81, 0x86, 0x3d, 0x01, 0x3e, 0x40, 0x00, 0x07, 0x00, 0x00, 0xc0, - 0x07, 0xf0, 0x00, 0x00, 0x03, 0x49, 0x00, 0xe4, 0x04, 0x81, 0x86, 0x3b, - 0x07, 0xc0, 0x00, 0x00, 0x01, 0x3e, 0x40, 0x00, 0x06, 0x00, 0x00, 0x80, - 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x03, 0x49, 0x00, 0xe4, 0x07, 0x81, 0x06, 0x35, 0x02, 0x80, 0x06, 0x3d, - 0x07, 0x2d, 0x60, 0x00, 0x00, 0x49, 0x80, 0x43, 0x06, 0x81, 0x06, 0x57, - 0x06, 0x0f, 0xf0, 0xd0, 0x01, 0x79, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, - 0x05, 0x7d, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, 0x04, 0x81, 0x86, 0x07, - 0x05, 0x0f, 0x80, 0x30, 0x03, 0x2f, 0xa0, 0x09, 0x03, 0x79, 0xff, 0x00, - 0x07, 0x00, 0xff, 0xff, 0x07, 0x0f, 0xf0, 0xd1, 0x01, 0x79, 0xfe, 0xff, - 0x07, 0x00, 0xff, 0xff, 0x05, 0x5c, 0x04, 0x00, 0x06, 0x81, 0x06, 0x07, - 0x04, 0x00, 0x40, 0x51, 0x03, 0x80, 0x06, 0x9f, 0x04, 0xa0, 0x07, 0x01, - 0x06, 0x2d, 0x60, 0x01, 0x02, 0x0e, 0xf0, 0x04, 0x03, 0x86, 0x06, 0x09, - 0x06, 0x60, 0x00, 0x04, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x07, 0x4b, 0x00, 0x00, 0x05, 0x00, 0x20, 0x00, 0x07, 0x69, 0xff, 0x00, - 0x01, 0x64, 0x08, 0x00, 0x07, 0x82, 0x06, 0x09, 0x01, 0x64, 0x0e, 0x00, - 0x05, 0x82, 0x86, 0x09, 0x07, 0x0f, 0xf0, 0x36, 0x04, 0x5c, 0x04, 0x04, - 0x05, 0x81, 0x86, 0x72, 0x07, 0x2d, 0x60, 0x00, 0x05, 0x0f, 0x80, 0x30, - 0x03, 0x2f, 0xa0, 0x09, 0x03, 0x79, 0xff, 0x00, 0x07, 0x00, 0xff, 0xff, - 0x07, 0x0f, 0xf0, 0xd1, 0x01, 0x79, 0xfe, 0xff, 0x07, 0x00, 0xff, 0xff, - 0x05, 0x5c, 0x04, 0x00, 0x06, 0x81, 0x06, 0x07, 0x04, 0x48, 0x20, 0x34, - 0x07, 0x81, 0x06, 0x24, 0x06, 0x48, 0x30, 0x34, 0x05, 0x81, 0x86, 0x24, - 0x07, 0x0f, 0xf0, 0xd4, 0x07, 0x78, 0x00, 0xff, 0x07, 0x00, 0x00, 0xf0, - 0x03, 0x7c, 0x00, 0xff, 0x06, 0x00, 0x00, 0x10, 0x07, 0x81, 0x06, 0x9f, - 0x06, 0xa0, 0x06, 0xfb, 0x02, 0x49, 0x00, 0xe5, 0x07, 0x81, 0x06, 0x82, - 0x03, 0x3e, 0x50, 0x00, 0x06, 0x00, 0x00, 0x80, 0x02, 0x80, 0x00, 0x10, - 0x04, 0x60, 0x1c, 0x04, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x20, 0x03, 0x0e, 0xf0, 0x41, 0x02, 0x86, 0x06, 0x13, - 0x06, 0x2d, 0x60, 0x02, 0x05, 0x60, 0x2a, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x09, 0x06, 0x0f, 0xf0, 0xd0, 0x07, 0x4b, 0x00, 0xff, - 0x04, 0x5c, 0x04, 0x01, 0x04, 0x81, 0x86, 0x9d, 0x06, 0x2d, 0x60, 0x01, - 0x07, 0x60, 0x28, 0x41, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x07, 0x0f, 0xf0, 0xd1, 0x05, 0x4b, 0x80, 0xff, - 0x07, 0x4b, 0x00, 0x03, 0x05, 0x5c, 0x04, 0x03, 0x04, 0x81, 0x86, 0x9d, - 0x03, 0x3e, 0x50, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x80, 0x07, 0x33, - 0x07, 0x60, 0x00, 0x41, 0x02, 0x80, 0x06, 0x83, 0x06, 0xa0, 0x06, 0xfb, - 0x02, 0x49, 0x00, 0xe5, 0x07, 0x81, 0x06, 0xa5, 0x03, 0x3e, 0x50, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x02, 0x80, 0x00, 0x10, 0x07, 0xa0, 0x06, 0xe7, - 0x03, 0x0e, 0xf0, 0x41, 0x03, 0x86, 0x06, 0x17, 0x04, 0x05, 0x80, 0x51, - 0x07, 0x2d, 0x60, 0x00, 0x05, 0x60, 0x10, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x09, 0x06, 0x00, 0xa0, 0xd0, 0x05, 0x00, 0xb0, 0xd1, - 0x06, 0x2d, 0x60, 0x01, 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x06, 0x00, 0xc0, 0xd0, 0x05, 0x00, 0xd0, 0xd1, 0x06, 0x2d, 0x60, 0x02, - 0x02, 0x79, 0xff, 0x0d, 0x07, 0xff, 0x00, 0x00, 0x04, 0x4d, 0x80, 0x0d, - 0x06, 0x0f, 0xf0, 0xd0, 0x07, 0x4b, 0x00, 0xff, 0x06, 0x5a, 0x00, 0x0d, - 0x06, 0x60, 0x12, 0x01, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x22, - 0x07, 0x00, 0x00, 0x05, 0x00, 0x79, 0xfe, 0x0d, 0x07, 0x00, 0x00, 0xff, - 0x05, 0x00, 0x20, 0xff, 0x05, 0x60, 0x2a, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x01, 0x02, 0x0e, 0xf0, 0x04, - 0x03, 0x86, 0x06, 0xe4, 0x04, 0x60, 0x1c, 0x04, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x01, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x0a, 0x06, 0x00, 0x00, 0x20, 0x07, 0x60, 0x28, 0x41, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x02, 0x79, 0xff, 0x02, 0x07, 0x00, 0x00, 0xff, 0x06, 0x78, 0x00, 0x0d, - 0x07, 0x00, 0xff, 0x00, 0x06, 0x5a, 0x00, 0x02, 0x07, 0x60, 0x28, 0x41, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x01, - 0x07, 0x60, 0x00, 0x41, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, - 0x06, 0x00, 0x00, 0x01, 0x07, 0x60, 0x12, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x02, 0x03, 0x3e, 0x50, 0x00, - 0x06, 0x00, 0x00, 0x80, 0x01, 0x80, 0x07, 0x33, 0x04, 0x0f, 0x80, 0x32, - 0x07, 0x3f, 0xa0, 0x11, 0x06, 0x00, 0x00, 0x01, 0x06, 0x0f, 0xf0, 0x02, - 0x05, 0x5c, 0x04, 0x03, 0x04, 0x81, 0x86, 0xef, 0x00, 0x04, 0x10, 0x51, - 0x07, 0xc0, 0x00, 0x00, 0x04, 0x60, 0x04, 0x02, 0x04, 0x50, 0x04, 0x32, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x20, - 0x00, 0x40, 0x04, 0x02, 0x01, 0x68, 0x0e, 0xff, 0x07, 0x00, 0x30, 0xff, - 0x04, 0x0f, 0x80, 0x32, 0x05, 0x3f, 0xa8, 0x0a, 0x06, 0x00, 0x00, 0x01, - 0x07, 0xc0, 0x00, 0x00, 0x02, 0x49, 0x00, 0xe5, 0x06, 0x81, 0x06, 0xfe, - 0x07, 0xc0, 0x00, 0x00, 0x03, 0x3e, 0x50, 0x00, 0x07, 0x00, 0x00, 0xc0, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0x00, 0x40, 0x36, 0x06, 0x00, 0x00, 0xd0, - 0x01, 0x79, 0xfe, 0x00, 0x07, 0x00, 0xff, 0xff, 0x05, 0x7d, 0xfe, 0xff, - 0x07, 0x00, 0xff, 0xff, 0x04, 0x81, 0x07, 0x20, 0x07, 0x00, 0x00, 0xd1, - 0x03, 0x79, 0xff, 0x00, 0x07, 0x00, 0xff, 0xff, 0x06, 0x00, 0x50, 0x51, - 0x06, 0x0f, 0xf0, 0x31, 0x05, 0x50, 0x04, 0x05, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x02, 0x02, 0x0e, 0xf0, 0x04, - 0x00, 0x86, 0x07, 0x1a, 0x04, 0x60, 0x04, 0x04, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x09, 0x00, 0x79, 0xfe, 0x01, 0x07, 0x00, 0xff, 0xff, - 0x05, 0x5c, 0x04, 0x00, 0x04, 0x81, 0x07, 0x20, 0x01, 0x40, 0x04, 0x05, - 0x07, 0x00, 0x50, 0xff, 0x05, 0x7d, 0xe0, 0xff, 0x06, 0x00, 0x00, 0x07, - 0x07, 0x81, 0x87, 0x0c, 0x04, 0x00, 0x40, 0x51, 0x07, 0xc0, 0x00, 0x00, - 0x07, 0x2d, 0x60, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, - 0x00, 0x01, 0x10, 0xd0, 0x01, 0x01, 0x20, 0xd1, 0x06, 0x2d, 0x60, 0x01, - 0x07, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x02, 0x01, 0x30, 0xd0, - 0x01, 0x01, 0x40, 0xd1, 0x06, 0x2d, 0x60, 0x02, 0x01, 0x01, 0x70, 0xd4, - 0x07, 0xf0, 0x00, 0x00, 0x02, 0x01, 0x50, 0xd0, 0x03, 0x01, 0x60, 0xd1, - 0x05, 0x3f, 0xa8, 0x3a, 0x06, 0x00, 0x00, 0x08, 0x07, 0xc0, 0x00, 0x00, - 0x07, 0x60, 0x0c, 0x41, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x04, 0x78, 0x01, 0x02, 0x07, 0xff, 0xff, 0x00, - 0x04, 0x6a, 0x07, 0x02, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x0a, - 0x06, 0x00, 0x00, 0x01, 0x05, 0x60, 0x0e, 0x41, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x69, 0x03, 0x80, 0x00, 0x53, 0xfa, 0x02, 0x28, 0xad, - 0x02, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x05, 0x42, 0x04, 0x0f, 0x80, 0x1f, 0x01, 0x2f, 0xa8, 0xc9, - 0x04, 0x0f, 0x80, 0x1f, 0x07, 0x3f, 0xa0, 0x81, 0x06, 0x00, 0x00, 0x10, - 0x03, 0x20, 0x00, 0x05, 0x07, 0x42, 0x00, 0x00, 0x05, 0x0f, 0xb0, 0x00, - 0x04, 0x0f, 0x80, 0x1f, 0x07, 0x3f, 0xa0, 0x11, 0x06, 0x00, 0x00, 0x38, - 0x04, 0x0f, 0x80, 0x1f, 0x05, 0x3f, 0xa8, 0x59, 0x07, 0x00, 0x00, 0x3a, - 0x05, 0x0f, 0xe0, 0x00, 0x05, 0x81, 0x80, 0x0a, 0x07, 0x84, 0x00, 0x3c, - 0x04, 0x95, 0x80, 0x19, 0x03, 0x0e, 0x00, 0x11, 0x07, 0x2e, 0x42, 0x00, - 0x03, 0x80, 0x00, 0x14, 0x02, 0x91, 0x00, 0x1f, 0x05, 0x00, 0x10, 0xc0, - 0x04, 0x48, 0x20, 0x01, 0x04, 0x81, 0x80, 0xf8, 0x06, 0x48, 0x30, 0x01, - 0x06, 0x81, 0x81, 0x5b, 0x02, 0x92, 0x00, 0x29, 0x06, 0x8b, 0x00, 0x29, - 0x01, 0x8a, 0x01, 0x60, 0x05, 0x00, 0x10, 0xc0, 0x06, 0x78, 0x00, 0x01, - 0x05, 0x00, 0x07, 0xc0, 0x06, 0x81, 0x82, 0x3e, 0x06, 0x78, 0x00, 0x01, - 0x05, 0x00, 0xf8, 0x00, 0x07, 0x81, 0x82, 0x88, 0x03, 0x91, 0x00, 0x30, - 0x04, 0x0f, 0xe0, 0x29, 0x03, 0x86, 0x00, 0x30, 0x07, 0x6c, 0x00, 0x1d, - 0x05, 0x81, 0x02, 0x9c, 0x07, 0x6c, 0x0a, 0x1d, 0x05, 0x81, 0x02, 0xc5, - 0x02, 0x92, 0x00, 0xab, 0x04, 0x0f, 0xe0, 0x2f, 0x03, 0x86, 0x00, 0x3c, - 0x06, 0x00, 0x00, 0x13, 0x05, 0x0f, 0xb0, 0x00, 0x06, 0x6c, 0x00, 0x73, - 0x07, 0x81, 0x03, 0xd7, 0x01, 0x49, 0x20, 0xe4, 0x05, 0x81, 0x80, 0x3c, - 0x03, 0x40, 0x00, 0x00, 0x07, 0x6c, 0x0a, 0x00, 0x04, 0x81, 0x80, 0x34, - 0x06, 0x96, 0x00, 0x3e, 0x03, 0xb9, 0x00, 0xca, 0x05, 0x90, 0x80, 0x14, - 0x01, 0x01, 0x70, 0xe1, 0x07, 0x78, 0x00, 0x17, 0x03, 0xe0, 0x00, 0x00, - 0x06, 0x81, 0x00, 0x91, 0x05, 0x00, 0x10, 0xff, 0x01, 0x79, 0xfe, 0x17, - 0x03, 0x1f, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0x05, 0x60, 0x08, 0x00, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x06, 0x78, 0x00, 0x02, 0x02, 0x80, 0x00, 0x40, 0x03, 0x7c, 0x00, 0xff, - 0x03, 0x80, 0x00, 0x00, 0x06, 0x81, 0x00, 0x5d, 0x02, 0x49, 0xf0, 0x02, - 0x07, 0x81, 0x00, 0xaa, 0x04, 0x48, 0xe0, 0x02, 0x06, 0x81, 0x00, 0x5d, - 0x07, 0x60, 0x0c, 0x00, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x06, 0x78, 0x00, 0x02, 0x07, 0xff, 0xff, 0x00, - 0x03, 0x7c, 0x00, 0xff, 0x05, 0x00, 0x02, 0x00, 0x05, 0x81, 0x80, 0xaa, - 0x06, 0x4b, 0xd4, 0x01, 0x03, 0xd0, 0x00, 0x5f, 0x02, 0x80, 0x00, 0xa8, - 0x02, 0x80, 0x00, 0x67, 0x03, 0x80, 0x00, 0x71, 0x03, 0x80, 0x00, 0x7b, - 0x02, 0x80, 0x00, 0x85, 0x02, 0x80, 0x00, 0x8f, 0x02, 0x80, 0x00, 0xa8, - 0x02, 0x80, 0x00, 0xa8, 0x05, 0x0f, 0xe0, 0x27, 0x00, 0x86, 0x80, 0x6b, - 0x01, 0x02, 0x80, 0x00, 0x02, 0x80, 0x00, 0x6e, 0x07, 0x60, 0x00, 0x27, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, 0x01, 0x02, 0x70, 0x00, - 0x02, 0x40, 0x00, 0x29, 0x03, 0x80, 0x00, 0xaa, 0x04, 0x0f, 0xe0, 0x25, - 0x00, 0x86, 0x80, 0x75, 0x03, 0x02, 0x60, 0x00, 0x03, 0x80, 0x00, 0x78, - 0x06, 0x60, 0x00, 0x25, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x03, 0x02, 0x50, 0x00, 0x02, 0x40, 0x00, 0x29, 0x03, 0x80, 0x00, 0xaa, - 0x05, 0x0f, 0xe0, 0x21, 0x00, 0x86, 0x80, 0x7f, 0x01, 0x02, 0x20, 0x00, - 0x03, 0x80, 0x00, 0x82, 0x07, 0x60, 0x00, 0x21, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x0a, 0x01, 0x02, 0x10, 0x00, 0x02, 0x40, 0x00, 0x29, - 0x03, 0x80, 0x00, 0xaa, 0x04, 0x0f, 0xe0, 0x23, 0x00, 0x86, 0x80, 0x89, - 0x01, 0x02, 0x40, 0x00, 0x02, 0x80, 0x00, 0x8c, 0x06, 0x60, 0x00, 0x23, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, 0x03, 0x02, 0x30, 0x00, - 0x02, 0x40, 0x00, 0x29, 0x03, 0x80, 0x00, 0xaa, 0x06, 0xa0, 0x00, 0xda, - 0x03, 0x80, 0x00, 0xaa, 0x01, 0x64, 0x08, 0x17, 0x04, 0x82, 0x80, 0xa8, - 0x07, 0x0f, 0xf0, 0x17, 0x03, 0xd0, 0x00, 0x95, 0x02, 0x80, 0x00, 0x9d, - 0x03, 0x80, 0x00, 0x9f, 0x02, 0x80, 0x00, 0xa2, 0x03, 0x80, 0x00, 0xa5, - 0x02, 0x80, 0x00, 0xa8, 0x02, 0x80, 0x00, 0xa8, 0x02, 0x80, 0x00, 0xa8, - 0x02, 0x80, 0x00, 0xa8, 0x03, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x14, - 0x05, 0x90, 0x80, 0x9f, 0x03, 0x01, 0x60, 0xe1, 0x03, 0x80, 0x00, 0xaa, - 0x04, 0x90, 0x80, 0xa2, 0x03, 0x01, 0x50, 0xe1, 0x03, 0x80, 0x00, 0xaa, - 0x05, 0x90, 0x80, 0xa5, 0x01, 0x01, 0x40, 0xe1, 0x03, 0x80, 0x00, 0xaa, - 0x06, 0x0f, 0xc0, 0x13, 0x07, 0xa0, 0x05, 0x3a, 0x03, 0x80, 0x00, 0x14, - 0x01, 0x49, 0x40, 0xe4, 0x00, 0xa1, 0x80, 0xae, 0x03, 0x80, 0x00, 0x3c, - 0x02, 0x68, 0x1e, 0x0d, 0x05, 0x0f, 0xb0, 0xff, 0x04, 0x60, 0x08, 0x76, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x05, 0x48, 0x80, 0x03, 0x05, 0x81, 0x80, 0xbd, 0x04, 0x00, 0x80, 0x0d, - 0x01, 0x20, 0xd0, 0x00, 0x01, 0x3e, 0x40, 0x00, 0x05, 0x00, 0x02, 0x00, - 0x06, 0x00, 0x90, 0x76, 0x04, 0x00, 0x20, 0x75, 0x06, 0xa0, 0x05, 0x26, - 0x07, 0xc0, 0x00, 0x00, 0x07, 0x2e, 0x48, 0x00, 0x07, 0x00, 0x00, 0x12, - 0x02, 0x80, 0x00, 0xcd, 0x07, 0x47, 0xf0, 0x00, 0x05, 0x60, 0x08, 0x00, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, 0x02, 0x49, 0xf0, 0x01, - 0x06, 0x81, 0x00, 0xcd, 0x01, 0x01, 0x20, 0x00, 0x05, 0x2e, 0x4c, 0x00, - 0x07, 0xc0, 0x00, 0x00, 0x07, 0x00, 0x00, 0xeb, 0x03, 0x49, 0xf0, 0x00, - 0x04, 0x81, 0x80, 0xc1, 0x05, 0x60, 0x08, 0x00, 0x05, 0x0f, 0x80, 0xff, - 0x01, 0x2f, 0xa8, 0x09, 0x04, 0x48, 0xe0, 0x01, 0x06, 0x81, 0x00, 0xd3, - 0x07, 0xc0, 0x00, 0x00, 0x00, 0x79, 0xc1, 0x01, 0x07, 0xff, 0xff, 0xff, - 0x02, 0x7a, 0x4b, 0x01, 0x03, 0x80, 0x00, 0x00, 0x05, 0x60, 0x08, 0x00, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x0a, 0x07, 0x60, 0x0c, 0x00, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x21, 0x06, 0x78, 0x00, 0x01, - 0x07, 0xff, 0xff, 0x00, 0x03, 0x7c, 0x00, 0xff, 0x05, 0x00, 0x07, 0x00, - 0x07, 0x81, 0x00, 0xed, 0x06, 0x60, 0x18, 0x04, 0x07, 0x00, 0x30, 0xff, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, 0x05, 0x0f, 0x80, 0x03, - 0x03, 0x2f, 0xa0, 0x0a, 0x04, 0x0f, 0xe0, 0x01, 0x03, 0x86, 0x00, 0xee, - 0x04, 0x60, 0x02, 0x01, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0x0f, 0xe0, 0x2e, 0x01, 0x86, 0x80, 0xf3, - 0x01, 0x02, 0xe0, 0x00, 0x03, 0x02, 0xf0, 0x00, 0x02, 0x80, 0x00, 0xf7, - 0x07, 0x60, 0x00, 0x2e, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x01, 0x02, 0xe0, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x04, - 0x05, 0x6c, 0x04, 0x1d, 0x05, 0x81, 0x01, 0x0c, 0x05, 0x6c, 0x02, 0x1d, - 0x04, 0x81, 0x01, 0x23, 0x05, 0x6c, 0x08, 0x1d, 0x05, 0x81, 0x01, 0x35, - 0x07, 0x6c, 0x06, 0x1d, 0x04, 0x81, 0x01, 0x4f, 0x05, 0x21, 0xd0, 0x00, - 0x02, 0x02, 0xc0, 0x13, 0x02, 0x02, 0xa0, 0x13, 0x02, 0x02, 0x00, 0x13, - 0x04, 0x60, 0x02, 0x1a, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, - 0x07, 0x00, 0x00, 0x09, 0x03, 0xb6, 0x00, 0xbe, 0x04, 0x84, 0x80, 0x1f, - 0x03, 0x80, 0x00, 0x3c, 0x04, 0x0f, 0xe0, 0x2a, 0x00, 0x86, 0x01, 0x02, - 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, 0x05, 0x60, 0x10, 0x2b, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x12, 0x06, 0x42, 0x00, 0x29, - 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x05, 0x0f, 0xe0, 0x03, 0x00, 0x86, 0x01, 0x20, - 0x01, 0x02, 0x80, 0x03, 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, 0x01, 0x80, 0x01, 0x50, - 0x00, 0x02, 0x80, 0x13, 0x00, 0x02, 0x70, 0x13, 0x01, 0x80, 0x01, 0x50, - 0x04, 0x0f, 0xe0, 0x2a, 0x00, 0x86, 0x01, 0x01, 0x06, 0x42, 0x00, 0x29, - 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x05, 0x0f, 0xe0, 0x03, 0x00, 0x86, 0x01, 0x32, - 0x03, 0x02, 0x60, 0x03, 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, 0x01, 0x80, 0x01, 0x50, - 0x02, 0x02, 0x60, 0x13, 0x02, 0x02, 0x50, 0x13, 0x01, 0x80, 0x01, 0x50, - 0x04, 0x0f, 0xe0, 0x2a, 0x00, 0x86, 0x01, 0x01, 0x06, 0x42, 0x00, 0x29, - 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x05, 0x0f, 0xe0, 0x03, 0x01, 0x86, 0x01, 0x44, - 0x01, 0x02, 0x20, 0x03, 0x06, 0x60, 0x00, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, 0x00, 0x80, 0x01, 0x46, - 0x00, 0x02, 0x20, 0x13, 0x00, 0x02, 0x10, 0x13, 0x06, 0x47, 0xf0, 0x20, - 0x00, 0x7a, 0x01, 0x20, 0x04, 0x00, 0x01, 0x01, 0x05, 0xa0, 0x02, 0x8d, - 0x04, 0x00, 0x80, 0x2a, 0x06, 0xa0, 0x05, 0x1f, 0x02, 0x94, 0x81, 0x01, - 0x05, 0x21, 0xd0, 0x05, 0x00, 0x80, 0x01, 0x02, 0x01, 0x80, 0x01, 0x0a, - 0x06, 0x47, 0xf0, 0x20, 0x06, 0x48, 0x60, 0x20, 0x07, 0x81, 0x81, 0x55, - 0x05, 0xa0, 0x02, 0x8d, 0x00, 0x80, 0x01, 0x01, 0x00, 0x7a, 0x01, 0x20, - 0x04, 0x00, 0x01, 0x01, 0x05, 0xa0, 0x02, 0x8d, 0x04, 0x00, 0x80, 0x2a, - 0x06, 0xa0, 0x05, 0x1f, 0x00, 0x80, 0x01, 0x01, 0x04, 0x0f, 0xd0, 0x2a, - 0x05, 0x2e, 0x40, 0x03, 0x00, 0x20, 0x80, 0x10, 0x06, 0xa0, 0x05, 0x1f, - 0x01, 0x80, 0x01, 0x0a, 0x00, 0x01, 0x80, 0x98, 0x07, 0x48, 0x00, 0x18, - 0x07, 0x81, 0x81, 0x71, 0x05, 0x48, 0x10, 0x18, 0x07, 0x81, 0x81, 0x6f, - 0x05, 0x48, 0x20, 0x18, 0x06, 0x81, 0x81, 0x6d, 0x07, 0x48, 0x30, 0x18, - 0x06, 0x81, 0x81, 0x6b, 0x00, 0x2f, 0xb0, 0x04, 0x01, 0x80, 0x01, 0x72, - 0x01, 0x2f, 0xb0, 0x03, 0x01, 0x80, 0x01, 0x72, 0x00, 0x2f, 0xb0, 0x02, - 0x01, 0x80, 0x01, 0x72, 0x00, 0x2f, 0xb0, 0x01, 0x01, 0x80, 0x01, 0x72, - 0x01, 0x2f, 0xb0, 0x00, 0x01, 0x79, 0xfe, 0x78, 0x07, 0x00, 0x00, 0xff, - 0x03, 0x01, 0x90, 0xff, 0x00, 0x01, 0x70, 0x86, 0x04, 0x8b, 0x01, 0x76, - 0x03, 0x38, 0x50, 0x00, 0x03, 0x02, 0x00, 0x00, 0x07, 0x78, 0x00, 0x17, - 0x00, 0x43, 0x04, 0x07, 0x06, 0x81, 0x81, 0xfe, 0x04, 0x6c, 0x04, 0x19, - 0x05, 0x81, 0x01, 0xb2, 0x04, 0x6c, 0x02, 0x19, 0x05, 0x81, 0x01, 0x82, - 0x07, 0x21, 0x90, 0x00, 0x01, 0x80, 0x01, 0x96, 0x07, 0x21, 0x90, 0x00, - 0x07, 0x48, 0x30, 0x17, 0x05, 0x81, 0x01, 0x9c, 0x05, 0x48, 0x20, 0x17, - 0x05, 0x81, 0x01, 0xa3, 0x04, 0x48, 0xb0, 0x75, 0x07, 0x81, 0x81, 0x96, - 0x06, 0x60, 0x14, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x22, - 0x06, 0x00, 0x00, 0x3e, 0x06, 0x00, 0x00, 0x80, 0x05, 0x00, 0x10, 0x81, - 0x05, 0x00, 0x20, 0x82, 0x06, 0x00, 0x30, 0x83, 0x05, 0x00, 0x40, 0x84, - 0x04, 0x60, 0x1c, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x02, 0x2f, 0xa0, 0x2a, - 0x07, 0x21, 0x90, 0x00, 0x07, 0x78, 0x00, 0x78, 0x07, 0xff, 0xff, 0x00, - 0x04, 0x5a, 0x04, 0x19, 0x01, 0x07, 0x80, 0xff, 0x04, 0x84, 0x80, 0x1f, - 0x03, 0x80, 0x00, 0x3c, 0x04, 0x0f, 0xe0, 0x7f, 0x00, 0x86, 0x01, 0xab, - 0x04, 0xa0, 0x01, 0xcb, 0x01, 0x92, 0x01, 0x96, 0x04, 0x0f, 0xe0, 0x7f, - 0x06, 0xa6, 0x81, 0xcb, 0x01, 0x80, 0x01, 0x96, 0x05, 0x60, 0x10, 0x7b, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x07, 0x44, 0xf0, 0x00, - 0x05, 0x60, 0x10, 0x7b, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x00, 0x80, 0x01, 0x89, 0x05, 0x2e, 0x40, 0x0c, 0x04, 0x00, 0x80, 0xfb, - 0x04, 0x6a, 0xa1, 0x08, 0x06, 0x00, 0x90, 0x76, 0x04, 0x00, 0x20, 0x75, - 0x06, 0xa0, 0x05, 0x26, 0x01, 0x80, 0x01, 0x96, 0x06, 0x21, 0x90, 0x01, - 0x05, 0x48, 0x20, 0x17, 0x04, 0x81, 0x01, 0xbf, 0x04, 0x8b, 0x01, 0xb5, - 0x06, 0x0f, 0xf0, 0x86, 0x03, 0x49, 0xf0, 0xff, 0x06, 0x81, 0x81, 0x75, - 0x07, 0x48, 0x30, 0x17, 0x04, 0x81, 0x01, 0xbc, 0x05, 0x0f, 0xd0, 0xff, - 0x04, 0x0f, 0xe0, 0x7f, 0x06, 0xa6, 0x81, 0xcb, 0x01, 0x80, 0x01, 0x96, - 0x05, 0x00, 0x40, 0x84, 0x04, 0xa0, 0x02, 0x20, 0x01, 0x92, 0x01, 0x96, - 0x07, 0x0f, 0xf0, 0x7d, 0x04, 0x50, 0x04, 0x7c, 0x05, 0x60, 0x04, 0xff, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x07, 0x0f, 0xf0, 0x00, - 0x00, 0x54, 0x04, 0x79, 0x03, 0x07, 0x90, 0xff, 0x01, 0x80, 0x01, 0xa3, - 0x06, 0x0f, 0xf0, 0x79, 0x00, 0x54, 0x04, 0x7a, 0x04, 0x82, 0x01, 0xf7, - 0x04, 0x81, 0x01, 0xf7, 0x07, 0x0f, 0xf0, 0x7d, 0x04, 0x50, 0x04, 0x7c, - 0x05, 0x0f, 0x80, 0xff, 0x00, 0x2f, 0xa8, 0x19, 0x04, 0x8b, 0x01, 0xd3, - 0x02, 0x08, 0x00, 0x01, 0x00, 0x08, 0x10, 0x02, 0x01, 0x08, 0x20, 0x03, - 0x05, 0x8b, 0x01, 0xd7, 0x03, 0x38, 0x50, 0x00, 0x03, 0x01, 0x00, 0x00, - 0x02, 0x40, 0x00, 0x19, 0x07, 0x0f, 0xf0, 0x03, 0x04, 0x50, 0x04, 0x79, - 0x03, 0x07, 0x90, 0xff, 0x03, 0x40, 0x00, 0x7e, 0x06, 0x42, 0x00, 0x7f, - 0x04, 0x81, 0x01, 0xf7, 0x07, 0x0f, 0xf0, 0x7e, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x05, 0x0f, 0xe0, 0x00, 0x03, 0x86, 0x81, 0xf6, - 0x07, 0x0f, 0xf0, 0x7d, 0x05, 0x60, 0x02, 0xff, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x01, 0x07, 0xd0, 0x00, 0x00, 0x86, 0x01, 0xf8, - 0x05, 0x60, 0x08, 0x7d, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x03, 0x68, 0x1e, 0x00, 0x05, 0x50, 0x04, 0x1b, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x01, 0x07, 0xe0, 0x00, 0x07, 0x0f, 0xf0, 0x7e, - 0x01, 0x80, 0x01, 0xe2, 0x03, 0x07, 0xc0, 0x00, 0x07, 0xc0, 0x00, 0x00, - 0x05, 0x2e, 0x40, 0x0c, 0x04, 0x00, 0x80, 0xfb, 0x04, 0x6a, 0xa1, 0x08, - 0x06, 0x00, 0x90, 0x76, 0x04, 0x00, 0x20, 0x75, 0x02, 0x80, 0x05, 0x26, - 0x04, 0x0f, 0xd0, 0x76, 0x05, 0x0f, 0xd0, 0x17, 0x06, 0x0f, 0xf0, 0x86, - 0x07, 0x78, 0x00, 0xff, 0x07, 0x00, 0x00, 0x60, 0x03, 0x7c, 0x00, 0xff, - 0x07, 0x00, 0x00, 0x60, 0x07, 0x81, 0x82, 0x00, 0x07, 0x78, 0x00, 0x78, - 0x07, 0xff, 0xff, 0x00, 0x04, 0x5a, 0x04, 0x19, 0x01, 0x07, 0x80, 0xff, - 0x06, 0x60, 0x14, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x22, - 0x06, 0x00, 0x00, 0x3e, 0x05, 0x2e, 0x40, 0x0c, 0x04, 0x60, 0x08, 0x76, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x06, 0x00, 0x00, 0x01, - 0x05, 0x48, 0x80, 0x03, 0x04, 0x81, 0x02, 0x1a, 0x04, 0x00, 0xd0, 0xfb, - 0x06, 0x6a, 0x81, 0x0d, 0x01, 0x3e, 0x40, 0x00, 0x07, 0x00, 0x03, 0x00, - 0x02, 0x80, 0x00, 0x29, 0x04, 0x00, 0x80, 0xfb, 0x06, 0x6a, 0x81, 0x08, - 0x06, 0x00, 0x90, 0x76, 0x04, 0x00, 0x20, 0x75, 0x06, 0xa0, 0x05, 0x26, - 0x02, 0x80, 0x00, 0x29, 0x02, 0x40, 0x00, 0x7f, 0x07, 0x42, 0x00, 0x7e, - 0x05, 0x0f, 0x80, 0x7e, 0x03, 0x2f, 0xa0, 0x09, 0x05, 0x0f, 0xe0, 0x00, - 0x03, 0x86, 0x82, 0x3a, 0x07, 0x0f, 0xf0, 0x7d, 0x05, 0x5c, 0x04, 0x7b, - 0x04, 0x81, 0x02, 0x2f, 0x07, 0x60, 0x00, 0x7d, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x05, 0x0f, 0xe0, 0x00, 0x02, 0x86, 0x82, 0x2f, - 0x07, 0x0f, 0xf0, 0x7b, 0x01, 0x07, 0xd0, 0xff, 0x05, 0x60, 0x08, 0x7d, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x03, 0x68, 0x1e, 0x00, - 0x04, 0x50, 0x04, 0x1c, 0x01, 0x07, 0xe0, 0xff, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x05, 0x0f, 0xe0, 0x00, 0x01, 0x86, 0x02, 0x3c, - 0x03, 0x07, 0xc0, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x04, 0x0f, 0xd0, 0x76, - 0x03, 0x80, 0x05, 0x3a, 0x01, 0x01, 0x80, 0xc0, 0x05, 0x48, 0xe0, 0x18, - 0x06, 0x81, 0x82, 0x57, 0x07, 0x48, 0xf0, 0x18, 0x07, 0x81, 0x82, 0x53, - 0x03, 0x49, 0x00, 0x18, 0x06, 0x81, 0x82, 0x4f, 0x01, 0x49, 0x10, 0x18, - 0x07, 0x81, 0x82, 0x4b, 0x07, 0x3c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x40, - 0x02, 0x20, 0x00, 0x04, 0x01, 0x80, 0x02, 0x5a, 0x07, 0x3c, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x20, 0x03, 0x20, 0x00, 0x03, 0x01, 0x80, 0x02, 0x5a, - 0x07, 0x3c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10, 0x02, 0x20, 0x00, 0x02, - 0x01, 0x80, 0x02, 0x5a, 0x07, 0x3c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x08, - 0x02, 0x20, 0x00, 0x01, 0x01, 0x80, 0x02, 0x5a, 0x07, 0x3c, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x13, 0x05, 0x0f, 0xb0, 0x00, - 0x04, 0x0f, 0xe0, 0x76, 0x01, 0x86, 0x02, 0x7d, 0x04, 0x6c, 0x02, 0x73, - 0x07, 0x81, 0x82, 0x69, 0x04, 0x48, 0xb0, 0x75, 0x04, 0x81, 0x02, 0x70, - 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, 0x05, 0x60, 0x10, 0x7b, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x12, 0x00, 0x46, 0xb0, 0x75, - 0x03, 0xb6, 0x00, 0xbe, 0x01, 0x80, 0x02, 0x71, 0x06, 0x6c, 0x00, 0x73, - 0x04, 0x81, 0x02, 0x6e, 0x04, 0x0f, 0xd0, 0x76, 0x07, 0xa0, 0x05, 0x3a, - 0x03, 0x80, 0x00, 0x14, 0x04, 0x0f, 0xd0, 0x76, 0x01, 0x80, 0x02, 0x71, - 0x00, 0x45, 0x20, 0x75, 0x00, 0x07, 0x70, 0x13, 0x06, 0x47, 0xf0, 0x75, - 0x06, 0x48, 0x60, 0x75, 0x07, 0x81, 0x82, 0x77, 0x05, 0xa0, 0x02, 0x93, - 0x01, 0x80, 0x02, 0x7d, 0x00, 0x7a, 0x01, 0x75, 0x04, 0x00, 0x01, 0x01, - 0x05, 0xa0, 0x02, 0x93, 0x04, 0x00, 0x80, 0x76, 0x02, 0x45, 0xf0, 0x08, - 0x06, 0xa0, 0x05, 0x1f, 0x07, 0x27, 0x30, 0x00, 0x05, 0x60, 0x02, 0x72, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, - 0x03, 0x79, 0xff, 0x78, 0x07, 0x00, 0x00, 0xff, 0x02, 0x07, 0x60, 0x13, - 0x02, 0x07, 0x50, 0x13, 0x04, 0x84, 0x80, 0x1f, 0x03, 0x80, 0x00, 0x3c, - 0x07, 0x0f, 0xc0, 0xff, 0x05, 0x2e, 0x40, 0x0c, 0x00, 0x20, 0x80, 0x20, - 0x06, 0xa0, 0x05, 0x1f, 0x00, 0x80, 0x02, 0x86, 0x06, 0x00, 0x00, 0x20, - 0x04, 0x00, 0x10, 0x16, 0x04, 0x60, 0x08, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x12, 0x07, 0xc0, 0x00, 0x00, 0x06, 0x00, 0x00, 0x75, - 0x04, 0x00, 0x10, 0xa2, 0x04, 0x4b, 0x08, 0x01, 0x06, 0x0f, 0xf0, 0x16, - 0x06, 0x5a, 0x00, 0x01, 0x04, 0x60, 0x08, 0x76, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x12, 0x07, 0xc0, 0x00, 0x00, 0x05, 0x0f, 0xe0, 0x22, - 0x00, 0x86, 0x02, 0xa7, 0x04, 0x21, 0xd0, 0x04, 0x03, 0x02, 0xa0, 0x22, - 0x05, 0xa0, 0x02, 0xd4, 0x04, 0x48, 0x80, 0x20, 0x04, 0x81, 0x02, 0xb9, - 0x04, 0x0f, 0xd0, 0x2a, 0x05, 0x21, 0xd0, 0x00, 0x02, 0x02, 0xa0, 0x13, - 0x02, 0x02, 0x00, 0x13, 0x04, 0x0f, 0xe0, 0x26, 0x00, 0x86, 0x02, 0xbf, - 0x04, 0x21, 0xd0, 0x01, 0x02, 0x02, 0xa0, 0x26, 0x05, 0xa0, 0x02, 0xd4, - 0x02, 0x02, 0xc0, 0x13, 0x00, 0x68, 0x3e, 0x20, 0x07, 0x00, 0x60, 0xff, - 0x05, 0x6c, 0x02, 0x06, 0x06, 0x81, 0x03, 0x07, 0x05, 0x6c, 0x04, 0x06, - 0x07, 0x81, 0x03, 0x1d, 0x07, 0x6c, 0x06, 0x06, 0x07, 0x81, 0x03, 0x8e, - 0x04, 0x48, 0x80, 0x20, 0x07, 0x81, 0x82, 0xbb, 0x05, 0x6c, 0x16, 0x06, - 0x07, 0x81, 0x03, 0x9c, 0x06, 0xa0, 0x05, 0x16, 0x00, 0x80, 0x02, 0xcd, - 0x04, 0x0f, 0xd0, 0x2a, 0x05, 0x21, 0xd0, 0x00, 0x02, 0x02, 0xa0, 0x13, - 0x02, 0x02, 0x00, 0x13, 0x05, 0x0f, 0xe0, 0x28, 0x00, 0x86, 0x02, 0xcd, - 0x03, 0x02, 0xa0, 0x28, 0x04, 0x21, 0xd0, 0x02, 0x05, 0xa0, 0x02, 0xd4, - 0x01, 0x80, 0x02, 0xdb, 0x05, 0x0f, 0xe0, 0x22, 0x00, 0x86, 0x02, 0xcd, - 0x04, 0x21, 0xd0, 0x04, 0x03, 0x02, 0xa0, 0x22, 0x05, 0xa0, 0x02, 0xd4, - 0x04, 0x48, 0x80, 0x20, 0x07, 0x81, 0x82, 0xcf, 0x06, 0xa0, 0x05, 0x16, - 0x05, 0x84, 0x80, 0x30, 0x03, 0x80, 0x00, 0x3c, 0x04, 0x0f, 0xd0, 0x2a, - 0x05, 0x21, 0xd0, 0x00, 0x02, 0x02, 0xa0, 0x13, 0x02, 0x02, 0x00, 0x13, - 0x00, 0x80, 0x02, 0xcd, 0x04, 0x60, 0x08, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x02, 0x2f, 0xa0, 0x31, 0x03, 0x02, 0x00, 0x00, 0x00, 0x02, 0xb0, 0x04, - 0x01, 0x01, 0x80, 0x05, 0x07, 0xc0, 0x00, 0x00, 0x04, 0x00, 0x70, 0x2a, - 0x07, 0xa0, 0x03, 0xcf, 0x00, 0x7a, 0x01, 0x01, 0x07, 0x06, 0x00, 0x00, - 0x07, 0x30, 0x30, 0x00, 0x07, 0x00, 0x82, 0x90, 0x07, 0x60, 0x00, 0x18, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x07, 0x00, 0x00, 0x03, - 0x04, 0x48, 0xe0, 0x07, 0x06, 0x81, 0x82, 0xe9, 0x06, 0x00, 0x60, 0x13, - 0x01, 0x80, 0x02, 0xf0, 0x02, 0x40, 0x00, 0x10, 0x04, 0x81, 0x02, 0xe9, - 0x06, 0x00, 0x60, 0x10, 0x04, 0x60, 0x32, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x07, 0x00, 0x00, 0x03, 0x05, 0x0f, 0x80, 0x1e, - 0x03, 0x2f, 0xa0, 0x3a, 0x06, 0x3a, 0xa0, 0x20, 0x06, 0x00, 0x00, 0x02, - 0x01, 0x3e, 0x40, 0x00, 0x07, 0x00, 0x00, 0x30, 0x01, 0x98, 0x02, 0xf6, - 0x07, 0x0f, 0xf0, 0xf6, 0x03, 0x68, 0x30, 0xff, 0x06, 0x81, 0x82, 0xf7, - 0x07, 0x0f, 0x00, 0x1e, 0x05, 0x60, 0x10, 0x2b, 0x05, 0x0f, 0x10, 0xff, - 0x06, 0x3f, 0x3c, 0x08, 0x06, 0x00, 0x00, 0x0d, 0x01, 0x3e, 0x40, 0x00, - 0x06, 0x00, 0x00, 0x20, 0x04, 0x0f, 0x80, 0x1a, 0x03, 0x20, 0x00, 0x0a, - 0x02, 0x20, 0x17, 0xd0, 0x03, 0x2f, 0xa0, 0x12, 0x02, 0x02, 0xc0, 0x13, - 0x00, 0x80, 0x02, 0xcd, 0x04, 0x00, 0x70, 0x13, 0x07, 0xa0, 0x03, 0xcf, - 0x00, 0x7a, 0x01, 0x01, 0x07, 0x05, 0x00, 0x00, 0x07, 0x30, 0x30, 0x00, - 0x07, 0x00, 0x88, 0x90, 0x07, 0x4d, 0x00, 0x05, 0x06, 0x00, 0x60, 0x13, - 0x05, 0x0f, 0x80, 0x1e, 0x03, 0x2f, 0xa0, 0x3a, 0x05, 0x60, 0x1a, 0x2b, - 0x05, 0x0f, 0x80, 0xff, 0x02, 0x2f, 0xa0, 0x19, 0x04, 0x00, 0x10, 0x02, - 0x04, 0x00, 0x20, 0x13, 0x04, 0x0f, 0x80, 0x1f, 0x02, 0x2f, 0xa0, 0x1a, - 0x07, 0x3a, 0xa0, 0x0c, 0x06, 0x00, 0x00, 0x02, 0x07, 0x30, 0x0c, 0x03, - 0x06, 0x00, 0x00, 0x0d, 0x02, 0x80, 0x03, 0xbc, 0x04, 0x00, 0x70, 0x13, - 0x07, 0xa0, 0x03, 0xcf, 0x00, 0x7a, 0x01, 0x01, 0x03, 0x07, 0x00, 0x00, - 0x06, 0x60, 0x28, 0x2a, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x06, 0x00, 0x00, 0x04, 0x02, 0x49, 0x90, 0x08, 0x06, 0x81, 0x03, 0x2a, - 0x07, 0x30, 0x30, 0x00, 0x07, 0x00, 0x88, 0x90, 0x02, 0x80, 0x03, 0x2c, - 0x07, 0x30, 0x30, 0x00, 0x04, 0x00, 0x89, 0x80, 0x05, 0x00, 0x70, 0x03, - 0x07, 0x4d, 0x00, 0x05, 0x06, 0x00, 0x60, 0x13, 0x05, 0x0f, 0x80, 0x1e, - 0x03, 0x2f, 0xa0, 0x3a, 0x07, 0x60, 0x14, 0x2b, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x21, 0x06, 0x4b, 0x00, 0x02, 0x02, 0x49, 0x90, 0x08, - 0x06, 0x81, 0x03, 0x38, 0x06, 0x44, 0xc0, 0x02, 0x05, 0x4b, 0x04, 0x00, - 0x05, 0x00, 0x40, 0xff, 0x06, 0x69, 0x81, 0x04, 0x05, 0x81, 0x83, 0x4d, - 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, 0x04, 0x78, 0x01, 0x02, - 0x06, 0x00, 0x00, 0x10, 0x06, 0x00, 0x30, 0x13, 0x04, 0x00, 0x40, 0x13, - 0x06, 0x00, 0x50, 0x13, 0x06, 0x00, 0x60, 0x13, 0x04, 0x00, 0x70, 0x13, - 0x00, 0x64, 0x40, 0x15, 0x06, 0x82, 0x03, 0x49, 0x04, 0x44, 0x80, 0x02, - 0x02, 0x20, 0x50, 0x08, 0x04, 0x0f, 0x80, 0x1f, 0x03, 0x2f, 0xa0, 0x42, - 0x04, 0x00, 0x80, 0x15, 0x02, 0x80, 0x03, 0x86, 0x04, 0x6c, 0x80, 0x04, - 0x04, 0x81, 0x83, 0x5b, 0x01, 0x20, 0x80, 0x18, 0x06, 0x78, 0x00, 0x02, - 0x07, 0x00, 0x00, 0x03, 0x04, 0x81, 0x83, 0x5e, 0x06, 0x00, 0x30, 0x01, - 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, 0x04, 0x00, 0x40, 0x13, - 0x06, 0x00, 0x50, 0x13, 0x04, 0x0f, 0x80, 0x1f, 0x02, 0x2f, 0xa0, 0x32, - 0x02, 0x80, 0x03, 0x86, 0x04, 0x0f, 0xd0, 0x2a, 0x07, 0xa0, 0x05, 0x3a, - 0x03, 0x80, 0x00, 0x14, 0x03, 0x79, 0xff, 0x03, 0x07, 0x00, 0x00, 0xff, - 0x04, 0x48, 0x80, 0x02, 0x07, 0x81, 0x03, 0x65, 0x07, 0x0f, 0xf0, 0x03, - 0x04, 0x50, 0x04, 0x08, 0x05, 0x00, 0x80, 0xff, 0x03, 0x79, 0xff, 0x00, - 0x07, 0x00, 0x00, 0xff, 0x06, 0x48, 0x90, 0x02, 0x07, 0x81, 0x03, 0x6c, - 0x07, 0x0f, 0xf0, 0x00, 0x04, 0x50, 0x04, 0x08, 0x05, 0x00, 0x80, 0xff, - 0x07, 0x00, 0x50, 0x03, 0x05, 0x00, 0x40, 0x00, 0x06, 0x00, 0x30, 0x01, - 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, 0x04, 0x0f, 0x80, 0x1f, - 0x02, 0x2f, 0xa0, 0x32, 0x05, 0x60, 0x1c, 0x2b, 0x05, 0x0f, 0x80, 0xff, - 0x02, 0x2f, 0xa0, 0x31, 0x06, 0x60, 0x0c, 0x1f, 0x05, 0x0f, 0x80, 0xff, - 0x02, 0x2f, 0xa0, 0x32, 0x02, 0x68, 0x06, 0x08, 0x06, 0x81, 0x03, 0x86, - 0x01, 0x64, 0x08, 0xff, 0x05, 0x7d, 0xfe, 0xff, 0x07, 0xff, 0xff, 0xff, - 0x03, 0x40, 0x00, 0xff, 0x04, 0x5a, 0x04, 0x07, 0x07, 0x00, 0x00, 0xff, - 0x07, 0x60, 0x06, 0x1e, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, - 0x06, 0x60, 0x09, 0x08, 0x06, 0x69, 0xf9, 0x08, 0x02, 0x7a, 0x00, 0x08, - 0x06, 0x00, 0x00, 0x20, 0x07, 0x0a, 0xa0, 0xff, 0x02, 0x4a, 0x24, 0x08, - 0x03, 0x7a, 0x00, 0xff, 0x06, 0x00, 0x00, 0xdc, 0x07, 0x00, 0x00, 0xff, - 0x02, 0x80, 0x03, 0xbc, 0x04, 0x00, 0x70, 0x13, 0x07, 0xa0, 0x03, 0xcf, - 0x00, 0x7a, 0x01, 0x01, 0x07, 0x03, 0x00, 0x00, 0x07, 0x30, 0x30, 0x00, - 0x07, 0x00, 0x81, 0x90, 0x06, 0x00, 0x60, 0x13, 0x05, 0x0f, 0x80, 0x1e, - 0x03, 0x2f, 0xa0, 0x3a, 0x07, 0x3a, 0xa0, 0x00, 0x06, 0x00, 0x00, 0x02, - 0x07, 0x30, 0x0c, 0x00, 0x07, 0x00, 0x00, 0x05, 0x02, 0x80, 0x03, 0xbc, - 0x04, 0x00, 0x70, 0x13, 0x07, 0xa0, 0x03, 0xcf, 0x00, 0x7a, 0x01, 0x01, - 0x07, 0x81, 0x00, 0x00, 0x07, 0x30, 0x30, 0x00, 0x07, 0x00, 0x00, 0x90, - 0x06, 0x00, 0x60, 0x13, 0x06, 0x60, 0x0c, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x09, 0x07, 0x00, 0x00, 0x03, 0x04, 0x78, 0x01, 0x07, - 0x07, 0xff, 0xff, 0x00, 0x00, 0x7c, 0x01, 0x07, 0x07, 0x00, 0x05, 0x00, - 0x05, 0x81, 0x83, 0xaf, 0x07, 0x30, 0x30, 0x00, 0x05, 0x00, 0x08, 0x90, - 0x07, 0x4d, 0x00, 0x05, 0x06, 0x60, 0x28, 0x2a, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x09, 0x07, 0x00, 0x00, 0x03, 0x00, 0x49, 0xd0, 0x07, - 0x06, 0x81, 0x03, 0xb6, 0x02, 0x20, 0x60, 0x01, 0x05, 0x0f, 0x80, 0x1e, - 0x03, 0x2f, 0xa0, 0x3a, 0x07, 0x3a, 0xa0, 0x00, 0x06, 0x00, 0x00, 0x02, - 0x07, 0x30, 0x0c, 0x00, 0x07, 0x00, 0x00, 0x05, 0x01, 0x3e, 0x40, 0x00, - 0x07, 0x00, 0x00, 0x30, 0x03, 0x98, 0x03, 0xbe, 0x07, 0x0f, 0xf0, 0xf6, - 0x03, 0x68, 0x30, 0xff, 0x04, 0x81, 0x83, 0xbf, 0x07, 0x0f, 0x00, 0x1e, - 0x04, 0x0f, 0x10, 0x1f, 0x07, 0x0f, 0x30, 0x00, 0x01, 0x3e, 0x40, 0x00, - 0x06, 0x00, 0x00, 0x20, 0x04, 0x0f, 0x80, 0x1a, 0x03, 0x20, 0x00, 0x0a, - 0x02, 0x20, 0x17, 0xd0, 0x03, 0x2f, 0xa0, 0x12, 0x00, 0x80, 0x02, 0xcd, - 0x03, 0x20, 0x00, 0x00, 0x06, 0x00, 0x60, 0x76, 0x03, 0x80, 0x03, 0xd1, - 0x03, 0x20, 0x00, 0x11, 0x06, 0x00, 0x60, 0x2a, 0x05, 0xa0, 0x04, 0x66, - 0x05, 0x60, 0x04, 0x06, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x02, 0x07, 0xc0, 0x00, 0x00, 0x02, 0x07, 0x60, 0x2f, - 0x04, 0x60, 0x08, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x02, 0x2f, 0xa0, 0x31, - 0x03, 0x07, 0x50, 0x00, 0x00, 0x07, 0xb0, 0x04, 0x01, 0x01, 0x80, 0x05, - 0x06, 0x60, 0x00, 0x76, 0x05, 0x00, 0x20, 0xff, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x11, 0x03, 0x02, 0xf0, 0x00, 0x01, 0x86, 0x83, 0xee, - 0x02, 0x02, 0xf0, 0x01, 0x00, 0x86, 0x83, 0xec, 0x00, 0x02, 0xe0, 0x13, - 0x07, 0x60, 0x18, 0x18, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x0a, - 0x07, 0x00, 0x00, 0x09, 0x02, 0x80, 0x03, 0xf4, 0x00, 0x02, 0xe0, 0x01, - 0x02, 0x80, 0x03, 0xf4, 0x04, 0x0f, 0xe0, 0x01, 0x03, 0x86, 0x03, 0xe7, - 0x07, 0x60, 0x00, 0x2e, 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x0a, - 0x00, 0x02, 0xe0, 0x01, 0x06, 0x00, 0x00, 0x13, 0x04, 0x00, 0x10, 0x13, - 0x04, 0x0f, 0x80, 0x02, 0x03, 0x2f, 0xa0, 0x12, 0x06, 0x27, 0x30, 0x01, - 0x04, 0x48, 0xb0, 0x75, 0x05, 0x81, 0x83, 0xff, 0x04, 0x60, 0x20, 0x76, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x11, 0x07, 0x00, 0x00, 0x3c, - 0x01, 0x79, 0xfe, 0x78, 0x07, 0x00, 0x00, 0xff, 0x03, 0x01, 0x90, 0xff, - 0x02, 0x86, 0x84, 0x07, 0x05, 0xa0, 0x04, 0x1b, 0x00, 0x07, 0x80, 0x19, - 0x00, 0x92, 0x04, 0x1a, 0x01, 0x80, 0x04, 0x5f, 0x04, 0x0f, 0xd0, 0x76, - 0x04, 0x0f, 0xd0, 0x19, 0x04, 0x60, 0x02, 0x76, 0x05, 0x00, 0x20, 0xff, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, 0x04, 0x0f, 0x80, 0x02, - 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, 0x05, 0x0f, 0xe0, 0x00, - 0x03, 0x86, 0x84, 0x17, 0x07, 0x60, 0x18, 0x18, 0x05, 0x0f, 0x80, 0xff, - 0x05, 0x3f, 0xa8, 0x0a, 0x07, 0x00, 0x00, 0x09, 0x01, 0x80, 0x04, 0x18, - 0x07, 0xa0, 0x00, 0xee, 0x07, 0x27, 0x30, 0x00, 0x02, 0x07, 0x60, 0x13, - 0x03, 0x80, 0x00, 0x3c, 0x05, 0x8b, 0x04, 0x1b, 0x03, 0x38, 0x50, 0x00, - 0x07, 0x03, 0x00, 0x00, 0x05, 0x60, 0x08, 0x18, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x05, 0x4b, 0x04, 0x00, 0x03, 0x08, 0xa0, 0xff, - 0x01, 0x79, 0xfe, 0x00, 0x07, 0x00, 0x00, 0xff, 0x01, 0x08, 0x80, 0xff, - 0x04, 0x48, 0xb0, 0x75, 0x05, 0x81, 0x04, 0x35, 0x07, 0x60, 0x14, 0x7b, - 0x05, 0x0f, 0x80, 0xff, 0x00, 0x2f, 0xa8, 0x19, 0x06, 0x4b, 0x00, 0x01, - 0x02, 0x08, 0x00, 0x02, 0x01, 0x08, 0x10, 0x03, 0x00, 0x08, 0x20, 0x01, - 0x02, 0x08, 0x30, 0x01, 0x02, 0x07, 0x90, 0x01, 0x02, 0x07, 0xa0, 0x01, - 0x00, 0x08, 0x40, 0x13, 0x02, 0x07, 0xf0, 0x13, 0x00, 0x80, 0x04, 0x57, - 0x06, 0x48, 0x50, 0x75, 0x05, 0x81, 0x04, 0x4d, 0x02, 0x46, 0x50, 0x75, - 0x06, 0x60, 0x14, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x21, - 0x06, 0x00, 0x00, 0x3e, 0x07, 0x0f, 0xf0, 0x7d, 0x04, 0x50, 0x04, 0x7c, - 0x05, 0x0f, 0x80, 0xff, 0x00, 0x2f, 0xa8, 0x19, 0x04, 0x8b, 0x04, 0x40, - 0x02, 0x08, 0x00, 0x01, 0x00, 0x08, 0x10, 0x02, 0x01, 0x08, 0x20, 0x03, - 0x03, 0x07, 0x90, 0x03, 0x02, 0x08, 0x30, 0x7a, 0x03, 0x40, 0x00, 0x7e, - 0x06, 0x42, 0x00, 0x7f, 0x04, 0x81, 0x04, 0x52, 0x07, 0x0f, 0xf0, 0x7e, - 0x05, 0xa0, 0x01, 0xe2, 0x02, 0x92, 0x84, 0x52, 0x00, 0x80, 0x04, 0x5e, - 0x05, 0x8b, 0x04, 0x4d, 0x06, 0x60, 0x14, 0x76, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x41, 0x06, 0x00, 0x00, 0x3e, 0x06, 0x60, 0x24, 0x76, - 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, 0x06, 0x00, 0x00, 0x07, - 0x00, 0x08, 0x40, 0x0e, 0x04, 0x8b, 0x04, 0x57, 0x03, 0x38, 0x50, 0x00, - 0x03, 0x01, 0x00, 0x00, 0x06, 0x21, 0x90, 0x01, 0x04, 0x0f, 0xe0, 0x7f, - 0x00, 0x86, 0x04, 0x5e, 0x00, 0x80, 0x01, 0xcb, 0x07, 0xc0, 0x00, 0x00, - 0x00, 0x68, 0x3e, 0x75, 0x04, 0x81, 0x04, 0x64, 0x04, 0x48, 0xd0, 0x75, - 0x04, 0x81, 0x04, 0x8a, 0x00, 0x80, 0x04, 0xbc, 0x06, 0xa0, 0x05, 0x1a, - 0x00, 0x80, 0x04, 0x1a, 0x03, 0x97, 0x84, 0x71, 0x07, 0x60, 0x24, 0x18, - 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, 0x06, 0x78, 0x00, 0x01, - 0x07, 0x00, 0x00, 0xff, 0x07, 0x5a, 0x00, 0x00, 0x07, 0x0f, 0xf0, 0x14, - 0x05, 0x69, 0xfe, 0xff, 0x05, 0x4b, 0x08, 0xff, 0x07, 0x5a, 0x00, 0x00, - 0x05, 0x60, 0x04, 0x18, 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x09, - 0x04, 0x0f, 0xe0, 0x07, 0x03, 0x86, 0x84, 0x78, 0x01, 0x20, 0x40, 0x00, - 0x00, 0x80, 0x04, 0x86, 0x00, 0x70, 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, - 0x06, 0x78, 0x00, 0x01, 0x07, 0xff, 0x00, 0x00, 0x07, 0x6c, 0x00, 0xff, - 0x06, 0x81, 0x84, 0x80, 0x00, 0x70, 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, - 0x05, 0x60, 0x04, 0x18, 0x05, 0x0f, 0x80, 0xff, 0x01, 0x2f, 0xa8, 0x0a, - 0x06, 0x78, 0x00, 0x01, 0x07, 0xff, 0x00, 0x00, 0x05, 0x00, 0x40, 0xff, - 0x02, 0x79, 0xff, 0x01, 0x07, 0x00, 0xff, 0xff, 0x05, 0x00, 0x20, 0x14, - 0x07, 0xc0, 0x00, 0x00, 0x04, 0x00, 0x70, 0x76, 0x04, 0x48, 0xb0, 0x75, - 0x04, 0x81, 0x04, 0xa4, 0x03, 0x20, 0x00, 0x11, 0x06, 0x00, 0x60, 0x76, - 0x07, 0xa0, 0x03, 0xd1, 0x00, 0x7a, 0x01, 0x01, 0x07, 0x06, 0x00, 0x00, - 0x07, 0x30, 0x30, 0x00, 0x07, 0x00, 0x82, 0x90, 0x07, 0x60, 0x00, 0x18, - 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, 0x07, 0x00, 0x00, 0x03, - 0x04, 0x48, 0xe0, 0x07, 0x07, 0x81, 0x84, 0x9c, 0x06, 0x00, 0x60, 0x13, - 0x01, 0x80, 0x04, 0xb7, 0x02, 0x40, 0x00, 0x10, 0x05, 0x81, 0x04, 0x9c, - 0x06, 0x00, 0x60, 0x10, 0x04, 0x60, 0x32, 0x76, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x07, 0x00, 0x00, 0x03, 0x01, 0x80, 0x04, 0xb7, - 0x06, 0x00, 0x00, 0x7a, 0x02, 0x49, 0x30, 0x75, 0x06, 0x81, 0x84, 0xad, - 0x04, 0x60, 0x2a, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x09, - 0x06, 0x0f, 0xf0, 0x7a, 0x05, 0x50, 0x04, 0x00, 0x07, 0x00, 0x00, 0xff, - 0x06, 0x47, 0x30, 0x75, 0x04, 0x60, 0x2a, 0x76, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x0a, 0x07, 0xa0, 0x03, 0xcc, 0x00, 0x7a, 0x01, 0x01, - 0x03, 0x01, 0x00, 0x00, 0x06, 0x30, 0x30, 0x08, 0x05, 0x00, 0x80, 0x00, - 0x06, 0x00, 0x60, 0x0e, 0x05, 0x0f, 0x80, 0x74, 0x03, 0x2f, 0xa0, 0x3a, - 0x05, 0x30, 0x79, 0xa0, 0x07, 0x00, 0x00, 0x0c, 0x00, 0x80, 0x04, 0xfd, - 0x00, 0x68, 0x3e, 0x75, 0x07, 0x6c, 0x0a, 0xff, 0x05, 0x81, 0x04, 0xdb, - 0x04, 0x00, 0x70, 0x13, 0x03, 0x20, 0x00, 0x11, 0x06, 0x00, 0x60, 0x76, - 0x07, 0xa0, 0x03, 0xd1, 0x00, 0x7a, 0x01, 0x01, 0x03, 0x07, 0x00, 0x00, - 0x06, 0x60, 0x28, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x05, 0x3f, 0xa8, 0x09, - 0x06, 0x00, 0x00, 0x01, 0x03, 0x49, 0x90, 0x03, 0x04, 0x81, 0x04, 0xd0, - 0x07, 0x30, 0x30, 0x00, 0x07, 0x00, 0x88, 0x90, 0x05, 0x30, 0x79, 0xa0, - 0x07, 0x00, 0x00, 0x0c, 0x01, 0x80, 0x04, 0xd4, 0x07, 0x30, 0x30, 0x00, - 0x04, 0x00, 0x89, 0x80, 0x04, 0x30, 0x79, 0x20, 0x07, 0x00, 0x00, 0x0c, - 0x07, 0x4d, 0x00, 0x05, 0x06, 0x00, 0x60, 0x13, 0x05, 0x0f, 0x80, 0x74, - 0x03, 0x2f, 0xa0, 0x3a, 0x04, 0x30, 0x79, 0x20, 0x07, 0x00, 0x00, 0x0c, - 0x00, 0x80, 0x04, 0xfd, 0x04, 0x60, 0x2a, 0x76, 0x05, 0x0f, 0x80, 0xff, - 0x03, 0x2f, 0xa0, 0x09, 0x06, 0x0f, 0xf0, 0x7a, 0x05, 0x50, 0x04, 0x00, - 0x07, 0x00, 0x00, 0xff, 0x06, 0x47, 0x30, 0x75, 0x04, 0x60, 0x2a, 0x76, - 0x05, 0x0f, 0x80, 0xff, 0x03, 0x2f, 0xa0, 0x0a, 0x04, 0x00, 0x70, 0x76, - 0x07, 0xa0, 0x03, 0xcc, 0x00, 0x7a, 0x01, 0x01, 0x03, 0x01, 0x00, 0x00, - 0x06, 0x30, 0x30, 0x08, 0x07, 0x00, 0x88, 0x00, 0x07, 0x4d, 0x00, 0x05, - 0x06, 0x60, 0x0a, 0x76, 0x05, 0x0f, 0x80, 0xff, 0x07, 0x3f, 0xa0, 0x09, - 0x07, 0x00, 0x00, 0x03, 0x05, 0x4b, 0x04, 0x06, 0x04, 0x5a, 0x04, 0x04, - 0x05, 0x00, 0x40, 0xff, 0x06, 0x00, 0x60, 0x0e, 0x05, 0x0f, 0x80, 0x74, - 0x03, 0x2f, 0xa0, 0x3a, 0x06, 0x48, 0xc0, 0x75, 0x04, 0x81, 0x04, 0xfb, - 0x06, 0x30, 0x7d, 0x20, 0x07, 0x00, 0x00, 0x0c, 0x00, 0x80, 0x04, 0xfd, - 0x04, 0x30, 0x79, 0x20, 0x07, 0x00, 0x00, 0x0c, 0x01, 0x3e, 0x40, 0x00, - 0x07, 0x00, 0x00, 0x30, 0x01, 0x98, 0x04, 0xff, 0x07, 0x0f, 0xf0, 0xf6, - 0x07, 0x48, 0x50, 0xff, 0x05, 0x81, 0x85, 0x00, 0x05, 0x0f, 0x20, 0x74, - 0x06, 0x0a, 0x00, 0x07, 0x04, 0x00, 0x70, 0xfb, 0x04, 0x6a, 0x70, 0x07, - 0x05, 0x0f, 0x40, 0xff, 0x01, 0x3e, 0x40, 0x00, 0x06, 0x00, 0x00, 0x20, - 0x06, 0x78, 0x00, 0x7a, 0x07, 0xff, 0xf0, 0x00, 0x04, 0x81, 0x85, 0x10, - 0x03, 0x20, 0x00, 0x0a, 0x02, 0x20, 0x17, 0xd0, 0x02, 0x80, 0x05, 0x13, - 0x03, 0x20, 0x00, 0x0a, 0x06, 0x30, 0x1b, 0x58, 0x06, 0x00, 0x00, 0x01, - 0x05, 0x0f, 0x80, 0x72, 0x03, 0x2f, 0xa0, 0x12, 0x00, 0x80, 0x04, 0x1a, - 0x01, 0x20, 0x80, 0x60, 0x06, 0x00, 0x90, 0x2a, 0x04, 0x00, 0x20, 0x20, - 0x02, 0x80, 0x05, 0x26, 0x04, 0x00, 0x80, 0xfb, 0x06, 0x6a, 0xe1, 0x08, - 0x06, 0x00, 0x90, 0x76, 0x04, 0x00, 0x20, 0x75, 0x02, 0x80, 0x05, 0x26, - 0x03, 0x20, 0x11, 0x00, 0x05, 0x84, 0x85, 0x24, 0x06, 0x42, 0x00, 0x01, - 0x04, 0x81, 0x85, 0x20, 0x02, 0x80, 0x05, 0x3d, 0x02, 0x0e, 0x00, 0x08, - 0x07, 0xc0, 0x00, 0x00, 0x05, 0x0f, 0xd0, 0x09, 0x04, 0x0f, 0xd0, 0x08, - 0x03, 0x20, 0x11, 0x00, 0x05, 0x84, 0x85, 0x2d, 0x06, 0x42, 0x00, 0x01, - 0x04, 0x81, 0x85, 0x29, 0x02, 0x80, 0x05, 0x3d, 0x00, 0x7a, 0x01, 0x02, - 0x04, 0x00, 0x01, 0x01, 0x05, 0x60, 0x08, 0x09, 0x05, 0x0f, 0x80, 0xff, - 0x07, 0x3f, 0xa0, 0x0a, 0x06, 0x00, 0x00, 0x01, 0x02, 0x0e, 0x00, 0x08, - 0x06, 0x84, 0x05, 0x37, 0x03, 0x0e, 0x00, 0x09, 0x07, 0xc0, 0x00, 0x00, - 0x01, 0x01, 0x10, 0x09, 0x05, 0x2e, 0x43, 0x00, 0x07, 0xc0, 0x00, 0x00, - 0x05, 0x2e, 0x40, 0x0f, 0x01, 0x20, 0x80, 0x90, 0x02, 0x80, 0x05, 0x1f, - 0x07, 0x0f, 0xc0, 0xff, 0x04, 0x0f, 0x80, 0x13, 0x03, 0x2f, 0xa0, 0x09, - 0x02, 0x80, 0x05, 0x40, 0x77, 0x78, 0x21, 0xfa, 0xff, 0xee, 0xff, 0xd6 +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_addr01 = 0x00100000 ; +#else +uint32_t risc_code_addr01 = 0x00100000 ; +#endif + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_code01[] = { +#else +uint32_t risc_code01[] = { +#endif + 0x0401f17c, 0x0010d000, 0x00100000, 0x0000a971, + 0x00000004, 0x00000000, 0x00000012, 0x00000002, + 0x00000003, 0x00000000, 0x20434f50, 0x59524947, + 0x48542032, 0x30303520, 0x514c4f47, 0x49432043, + 0x4f52504f, 0x52415449, 0x4f4e2020, 0x20495350, + 0x32347878, 0x20466972, 0x6d776172, 0x65202020, + 0x56657273, 0x696f6e20, 0x342e302e, 0x31382020, + 0x20202024, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x42001800, 0x0010014f, 0x42002000, 0x0010b6fd, + 0x500c0800, 0x800c1800, 0x500c1000, 0x800c1800, + 0x54042000, 0x80102000, 0x80040800, 0x80081040, + 0x040207fc, 0x500c0800, 0x800409c0, 0x040207f6, + 0x44002000, 0x80102000, 0x40100000, 0x44040000, + 0x80000000, 0x44080000, 0x80000000, 0x440c0000, + 0x80000000, 0x44100000, 0x80000000, 0x44140000, + 0x80000000, 0x44180000, 0x80000000, 0x441c0000, + 0x80000000, 0x44200000, 0x80000000, 0x44240000, + 0x80000000, 0x44280000, 0x80000000, 0x442c0000, + 0x80000000, 0x44300000, 0x80000000, 0x44340000, + 0x80000000, 0x44380000, 0x80000000, 0x443c0000, + 0x80000000, 0x44400000, 0x80000000, 0x44440000, + 0x80000000, 0x44480000, 0x80000000, 0x444c0000, + 0x80000000, 0x44500000, 0x80000000, 0x44540000, + 0x80000000, 0x44580000, 0x80000000, 0x445c0000, + 0x80000000, 0x44600000, 0x80000000, 0x44640000, + 0x80000000, 0x44680000, 0x80000000, 0x446c0000, + 0x80000000, 0x44700000, 0x80000000, 0x44740000, + 0x80000000, 0x44780000, 0x80000000, 0x447c0000, + 0x80000000, 0x44800000, 0x80000000, 0x44840000, + 0x80000000, 0x44880000, 0x80000000, 0x448c0000, + 0x80000000, 0x44900000, 0x80000000, 0x44940000, + 0x80000000, 0x44980000, 0x80000000, 0x449c0000, + 0x80000000, 0x44a00000, 0x80000000, 0x44a40000, + 0x80000000, 0x44a80000, 0x80000000, 0x44ac0000, + 0x80000000, 0x44b00000, 0x80000000, 0x44b40000, + 0x80000000, 0x44b80000, 0x80000000, 0x44bc0000, + 0x80000000, 0x44c00000, 0x80000000, 0x44c40000, + 0x80000000, 0x44c80000, 0x80000000, 0x44cc0000, + 0x80000000, 0x44d00000, 0x80000000, 0x44d80000, + 0x80000000, 0x44d40000, 0x80000000, 0x44dc0000, + 0x80000000, 0x44e00000, 0x80000000, 0x44e40000, + 0x80000000, 0x44e80000, 0x80000000, 0x44ec0000, + 0x80000000, 0x44f00000, 0x80000000, 0x44f40000, + 0x80000000, 0x44f80000, 0x80000000, 0x44fc0000, + 0x80000000, 0x45000000, 0x80000000, 0x45040000, + 0x80000000, 0x45080000, 0x80000000, 0x450c0000, + 0x80000000, 0x45100000, 0x80000000, 0x45140000, + 0x80000000, 0x45180000, 0x80000000, 0x451c0000, + 0x80000000, 0x45200000, 0x80000000, 0x45240000, + 0x80000000, 0x45280000, 0x80000000, 0x452c0000, + 0x80000000, 0x45300000, 0x80000000, 0x45340000, + 0x80000000, 0x45380000, 0x80000000, 0x453c0000, + 0x80000000, 0x45400000, 0x80000000, 0x45440000, + 0x80000000, 0x45480000, 0x80000000, 0x454c0000, + 0x80000000, 0x45500000, 0x80000000, 0x45540000, + 0x80000000, 0x45580000, 0x80000000, 0x455c0000, + 0x80000000, 0x45600000, 0x80000000, 0x45640000, + 0x80000000, 0x45680000, 0x80000000, 0x456c0000, + 0x80000000, 0x45700000, 0x80000000, 0x45740000, + 0x80000000, 0x45780000, 0x80000000, 0x457c0000, + 0x80000000, 0x45800000, 0x80000000, 0x45840000, + 0x80000000, 0x45880000, 0x80000000, 0x458c0000, + 0x80000000, 0x45900000, 0x80000000, 0x45940000, + 0x80000000, 0x45980000, 0x80000000, 0x459c0000, + 0x80000000, 0x45a00000, 0x80000000, 0x45a40000, + 0x80000000, 0x45a80000, 0x80000000, 0x45ac0000, + 0x80000000, 0x45b00000, 0x80000000, 0x45b40000, + 0x80000000, 0x45b80000, 0x80000000, 0x45bc0000, + 0x80000000, 0x45c00000, 0x80000000, 0x45c40000, + 0x80000000, 0x45c80000, 0x80000000, 0x45cc0000, + 0x80000000, 0x45d00000, 0x80000000, 0x45d40000, + 0x80000000, 0x45d80000, 0x80000000, 0x45dc0000, + 0x80000000, 0x45e00000, 0x80000000, 0x45e40000, + 0x80000000, 0x45e80000, 0x80000000, 0x45ec0000, + 0x80000000, 0x45f00000, 0x80000000, 0x45f40000, + 0x80000000, 0x45f80000, 0x80000000, 0x45fc0000, + 0x4a03c020, 0x00004000, 0x4a03c011, 0x40000010, + 0x04006000, 0x4203e000, 0x40000000, 0x59e00017, + 0x8c000508, 0x04000003, 0x4a03c017, 0x00000000, + 0x4203e000, 0x30000001, 0x0401f000, 0x0000bf00, + 0x00000080, 0x0000bfe0, 0x00000020, 0x0000ff00, + 0x00000080, 0x0000ffd0, 0x00000030, 0x00007100, + 0x00000010, 0x00007200, 0x00000008, 0x00007209, + 0x00000007, 0x00007300, 0x00000008, 0x00007309, + 0x00000007, 0x00007400, 0x00000008, 0x00007409, + 0x00000007, 0x00007600, 0x000000b0, 0x00007700, + 0x00000040, 0x00003000, 0x00000070, 0x00004000, + 0x000000c0, 0x00006000, 0x00000050, 0x00006100, + 0x00000010, 0x00006130, 0x00000010, 0x00006150, + 0x00000010, 0x00006170, 0x00000010, 0x00006190, + 0x00000010, 0x000061b0, 0x00000010, 0x00000000, + 0x42000000, 0x00000100, 0x4202f000, 0x00000000, + 0x42000800, 0x00021f00, 0x45780800, 0x80040800, + 0x80000040, 0x040207fd, 0x4203f000, 0x00021fff, + 0x40000000, 0x4203e000, 0x90000100, 0x40000000, + 0x0201f800, 0x00100743, 0x42000000, 0x00001000, + 0x50000000, 0x82000480, 0x24320002, 0x04020015, + 0x42000800, 0x00000064, 0x80040840, 0x04000007, + 0x4a030000, 0x00000001, 0x40000000, 0x59800000, + 0x8c000500, 0x040007f9, 0x04000008, 0x42000800, + 0x00007a17, 0x50040000, 0x8c00050e, 0x04020003, + 0x8400054e, 0x44000800, 0x4a030000, 0x00000000, + 0x4a03c020, 0x00000004, 0x4203e000, 0x6000000f, + 0x59e00023, 0x8c000500, 0x04020039, 0x42000000, + 0x00100001, 0x50000800, 0x82040c00, 0x00000004, + 0x58042003, 0x42001000, 0xffffffff, 0x0201f800, + 0x0010073a, 0x0402004e, 0x58042003, 0x42001000, + 0xffffffff, 0x0201f800, 0x0010073a, 0x04020048, + 0x58042003, 0x42001000, 0x00ffffff, 0x0201f800, + 0x0010073a, 0x04020042, 0x58042003, 0x42001000, + 0x00ffffff, 0x0201f800, 0x0010073a, 0x0402003c, + 0x42000000, 0x00100001, 0x5000a000, 0x8250a400, + 0x00000004, 0x4200a800, 0x00020000, 0x5850b003, + 0x0201f800, 0x0010a93e, 0x8250a400, 0x00000005, + 0x4a0370e8, 0x00000003, 0x4200a800, 0x0000c000, + 0x5850b003, 0x0201f800, 0x0010a93e, 0x4a0378e8, + 0x00000003, 0x4200a800, 0x00008000, 0x5850b003, + 0x0201f800, 0x0010a93e, 0x0401f02b, 0x42000800, + 0x00020000, 0x58042003, 0x42001000, 0xffffffff, + 0x0201f800, 0x0010073a, 0x04020019, 0x4a0370e8, + 0x00000003, 0x42000800, 0x0000c000, 0x58042003, + 0x82102500, 0x00ffffff, 0x42001000, 0x00ffffff, + 0x0201f800, 0x0010073a, 0x0402000d, 0x4a0378e8, + 0x00000003, 0x42000800, 0x00008000, 0x58042003, + 0x82102500, 0x00ffffff, 0x42001000, 0x00ffffff, + 0x0201f800, 0x0010073a, 0x0400000b, 0x4a03c020, + 0x00004010, 0x4a03c011, 0x40100011, 0x04006000, + 0x4203e000, 0x40000000, 0x4203e000, 0x30000001, + 0x0401f000, 0x0201f800, 0x001007d7, 0x42001000, + 0x0010a971, 0x40080000, 0x80140480, 0x82001d00, + 0xffffff00, 0x04020003, 0x40001800, 0x0401f003, + 0x42001800, 0x000000ff, 0x480bc840, 0x480fc842, + 0x04011000, 0x400c0000, 0x80081400, 0x40140000, + 0x80080580, 0x040207f0, 0x4817500d, 0x45782800, + 0x59c40000, 0x82000500, 0xffff0000, 0x80000120, + 0x82000580, 0x00002422, 0x04020005, 0x59a8006f, + 0x84000540, 0x4803506f, 0x0401f00a, 0x59e00003, + 0x82000500, 0x00030000, 0x82000580, 0x00010000, + 0x04020004, 0x59a8006f, 0x84000542, 0x4803506f, + 0x42000800, 0x00000040, 0x59a8006f, 0x8c000502, + 0x0402000e, 0x42000800, 0x00001000, 0x82141480, + 0x0017ffff, 0x04021009, 0x80040902, 0x82141480, + 0x0013ffff, 0x04021005, 0x80040902, 0x82141480, + 0x0011ffff, 0x04001bc8, 0x4807500e, 0x42001000, + 0x00000024, 0x0201f800, 0x001063cf, 0x82040c00, + 0x0010cfc0, 0x4807500b, 0x4a03c810, 0x00100000, + 0x4a03c811, 0x0010a971, 0x4a03c829, 0x00000004, + 0x59e40001, 0x82000540, 0x0003001d, 0x4803c801, + 0x4a03c014, 0x001c001c, 0x42001000, 0x0000001c, + 0x0201f800, 0x00100728, 0x4202c000, 0x0010cfc0, + 0x59aab00b, 0x59aaa00b, 0x59aaa80b, 0x59aac80e, + 0x49675069, 0x59a8000b, 0x4803500c, 0x0201f800, + 0x001006a3, 0x0201f800, 0x0010768a, 0x0201f800, + 0x00100804, 0x0201f800, 0x0010084d, 0x0201f800, + 0x00101a60, 0x0201f800, 0x001013a4, 0x0201f800, + 0x001009b6, 0x0201f800, 0x001013a4, 0x0201f800, + 0x00100f9a, 0x0201f800, 0x0010640f, 0x0401fb54, + 0x0201f800, 0x00101fb5, 0x0201f800, 0x0010508b, + 0x0201f800, 0x00104b36, 0x0201f800, 0x00105ecd, + 0x0201f800, 0x00105c61, 0x0201f800, 0x0010143d, + 0x0201f800, 0x001012bf, 0x4203e000, 0xf0000001, + 0x4a035070, 0x00000014, 0x4a035071, 0x0000000b, + 0x4a035072, 0x00000001, 0x4a035073, 0x00000000, + 0x42000000, 0x00001000, 0x50000000, 0x82000480, + 0x24220001, 0x0400004a, 0x59e00002, 0x8c00051e, + 0x42000000, 0x7ffe00fe, 0x04000003, 0x42000000, + 0x7ffe01fe, 0x50000800, 0x48075058, 0x80040920, + 0x82040580, 0x0000013e, 0x0402000b, 0x59a8006f, + 0x84000548, 0x4803506f, 0x4a035070, 0x00000055, + 0x4a035071, 0x00000051, 0x4a035073, 0x0000000f, + 0x0401f033, 0x82040580, 0x0000013f, 0x0402000b, + 0x59a8006f, 0x8400054a, 0x4803506f, 0x4a035070, + 0x00000055, 0x4a035071, 0x00000051, 0x4a035073, + 0x0000000f, 0x0401f026, 0x59e00003, 0x82000500, + 0x00030000, 0x82000580, 0x00000000, 0x04020020, + 0x82040580, 0x00000147, 0x04000010, 0x82040580, + 0x00000145, 0x0402001a, 0x59a8006f, 0x84000546, + 0x4803506f, 0x4a035070, 0x00000033, 0x4a035071, + 0x00000030, 0x4a035072, 0x00000020, 0x4a035073, + 0x00000001, 0x0401f00c, 0x59a8006f, 0x84000544, + 0x4803506f, 0x4a035070, 0x00000033, 0x4a035071, + 0x00000030, 0x4a035072, 0x00000020, 0x4a035073, + 0x00000001, 0x4a0378e4, 0x000c0000, 0x59a8006f, + 0x8c000502, 0x04000004, 0x82000500, 0x00000030, + 0x04000b25, 0x4a03c018, 0x0000000f, 0x4203e000, + 0x20000511, 0x4203e000, 0x50010000, 0x4a03c020, + 0x00000000, 0x04027013, 0x59e00020, 0x82000580, + 0x00000002, 0x0402000f, 0x4a03c020, 0x00004000, + 0x4a03c011, 0x40000010, 0x04006000, 0x4203e000, + 0x40000000, 0x59e00017, 0x8c000508, 0x04000003, + 0x4a03c017, 0x00000000, 0x4203e000, 0x30000001, + 0x4202d800, 0x00000000, 0x4203e000, 0xb0600000, + 0x59a80873, 0x4007f800, 0x0201f000, 0x00020004, + 0x4df00000, 0x4203e000, 0x50000000, 0x416c0000, + 0x82000c80, 0x00000008, 0x04021afb, 0x0c01f804, + 0x5c03e000, 0x0201f000, 0x00020008, 0x00100328, + 0x0010033b, 0x00100411, 0x00100327, 0x0010048c, + 0x00100327, 0x00100327, 0x001005d0, 0x0401faee, + 0x42000800, 0x0010b2a0, 0x5804001d, 0x4803c857, + 0x8c000500, 0x0400000d, 0x84000500, 0x4800081d, + 0x4202d800, 0x00000004, 0x0401fbe8, 0x49f3c857, + 0x5c000800, 0x5c000000, 0x82000540, 0x00003e00, + 0x4c000000, 0x4c040000, 0x1c01f000, 0x0401fbd2, + 0x0201f800, 0x00104e0d, 0x04000010, 0x0201f800, + 0x00104e23, 0x04020035, 0x59940023, 0x82000580, + 0x0010401b, 0x04020004, 0x59940022, 0x800001c0, + 0x0402002e, 0x59c40006, 0x82000540, 0x000000c0, + 0x48038806, 0x0401f029, 0x0201f800, 0x00104d76, + 0x836c0580, 0x00000001, 0x040200be, 0x59a80017, + 0x82000580, 0x00000009, 0x040200ba, 0x497b5010, + 0x4a038893, 0x00000001, 0x42001000, 0x000000f0, + 0x0201f800, 0x001019aa, 0x0201f800, 0x00104e1b, + 0x59c41006, 0x04020006, 0x82081540, 0x000000f1, + 0x82081500, 0xbbffffff, 0x0401f003, 0x82081540, + 0x440000f1, 0x480b8806, 0x0201f800, 0x00105de2, + 0x0201f800, 0x001069b8, 0x42000000, 0x0010b638, + 0x0201f800, 0x0010a86e, 0x42001000, 0x00008030, + 0x497b5013, 0x0401f037, 0x0201f800, 0x00103951, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000480, + 0x00000007, 0x04021093, 0x0201f800, 0x00105de2, + 0x59c400a3, 0x82000500, 0xffefffff, 0x480388a3, + 0x59a8004b, 0x800001c0, 0x04020004, 0x0201f800, + 0x00103f53, 0x0401f087, 0x59a80015, 0x84000546, + 0x48035015, 0x0201f800, 0x00104e13, 0x59c41006, + 0x04020006, 0x82081540, 0x44000001, 0x82081500, + 0xffffff0f, 0x0401f003, 0x82081540, 0x440000f1, + 0x480b8806, 0x497b9005, 0x4a038802, 0x0000ffff, + 0x4a0378e4, 0x00003000, 0x4a0378e4, 0x000c0000, + 0x42000000, 0x0010b60a, 0x0201f800, 0x0010a86e, + 0x59a81010, 0x42000800, 0x00000003, 0x0201f800, + 0x001069af, 0x42001000, 0x00008010, 0x59a8180a, + 0x0201f800, 0x00103857, 0x0201f800, 0x00101886, + 0x59a80805, 0x82040d00, 0xffffffdf, 0x48075005, + 0x0201f800, 0x0010468b, 0x0201f800, 0x00104e0d, + 0x0400000a, 0x0201f800, 0x00103f58, 0x04000007, + 0x4a035013, 0x00000001, 0x497b5021, 0x0201f800, + 0x00103a9f, 0x0401f04f, 0x0201f800, 0x0010473b, + 0x04000005, 0x59c41002, 0x8408150c, 0x480b8802, + 0x0401f012, 0x0201f800, 0x00104e0d, 0x04020006, + 0x59a8001d, 0x80000540, 0x02000800, 0x001090d5, + 0x0401f00a, 0x0201f800, 0x001090d5, 0x59a80026, + 0x8c000506, 0x04020005, 0x59a8001d, 0x80000540, + 0x02020800, 0x00104075, 0x497b5028, 0x497b5027, + 0x497b5018, 0x0201f800, 0x00104e0d, 0x59a81026, + 0x0402000a, 0x0201f800, 0x00101694, 0x80001580, + 0x59a8002a, 0x82000500, 0xffff0000, 0x80040d40, + 0x4807502a, 0x0401f005, 0x59a8002a, 0x82000500, + 0xffff0000, 0x4803502a, 0x599c0017, 0x8c00050a, + 0x04000002, 0x84081544, 0x480b5026, 0x0201f800, + 0x00104e0d, 0x04000004, 0x0201f800, 0x00101694, + 0x48078880, 0x42001000, 0x00000005, 0x0201f800, + 0x00106e07, 0x497b5028, 0x497b501b, 0x4a03501c, + 0x0000ffff, 0x4a0378e4, 0x000000c0, 0x4202d800, + 0x00000002, 0x0201f800, 0x00104e0d, 0x04000007, + 0x59a80026, 0x82000500, 0x0000000c, 0x82000580, + 0x00000004, 0x04000003, 0x0201f800, 0x00101bf0, + 0x1c01f000, 0x59a8001c, 0x82000580, 0x0000ffff, + 0x04000004, 0x0201f800, 0x00101bf0, 0x0401f074, + 0x59a80026, 0x8c00050a, 0x04020003, 0x8c000506, + 0x0400001c, 0x8c000500, 0x0400001a, 0x4a038802, + 0x0000ffbf, 0x8c000502, 0x04000016, 0x599c0018, + 0x8c000516, 0x04020010, 0x59a80027, 0x82000580, + 0x0000ffff, 0x0400000c, 0x0201f800, 0x00101d45, + 0x59a80026, 0x8c000504, 0x0402005d, 0x42001000, + 0x00000003, 0x417a5800, 0x0201f800, 0x00101d6a, + 0x0401f057, 0x59a80028, 0x80000540, 0x04020054, + 0x59a80026, 0x8c000508, 0x04020005, 0x59a8001b, + 0x80000540, 0x0402004e, 0x0401f003, 0x8c000516, + 0x0400004b, 0x0201f800, 0x0010473b, 0x04020048, + 0x599c0018, 0x8c000516, 0x04020004, 0x0201f800, + 0x00104abe, 0x04020042, 0x599c0017, 0x8c00050a, + 0x0400000d, 0x4200b000, 0x000007f0, 0x417a8800, + 0x0201f800, 0x00020267, 0x04020004, 0x59340200, + 0x8c00051a, 0x04020036, 0x81468800, 0x8058b040, + 0x040207f8, 0x4a038802, 0x0000ffff, 0x42001800, + 0x0010b2e7, 0x0401fb98, 0x42001800, 0x0010b2f4, + 0x0401fb95, 0x59a80005, 0x84000502, 0x48035005, + 0x4a0378e4, 0x00000080, 0x4202d800, 0x00000003, + 0x4a03501c, 0x0000ffff, 0x0401fa8b, 0x80000580, + 0x0201f800, 0x001015fa, 0x599c0018, 0x8c000516, + 0x04000004, 0x0201f800, 0x00103929, 0x0401f009, + 0x42001800, 0x0000ffff, 0x42002000, 0x00000006, + 0x42003000, 0x00000000, 0x0201f800, 0x001038c7, + 0x0201f800, 0x00104e23, 0x0400000b, 0x59c40006, + 0x0201f800, 0x00104e0d, 0x04000004, 0x82000500, + 0xffffff0f, 0x0401f003, 0x82000500, 0xfbffffff, + 0x48038806, 0x0201f800, 0x00106c8a, 0x1c01f000, + 0x4c040000, 0x4c080000, 0x4c100000, 0x59a8003e, + 0x82000c80, 0x00000004, 0x04021983, 0x0c01f805, + 0x5c002000, 0x5c001000, 0x5c000800, 0x1c01f000, + 0x0010049c, 0x00100527, 0x00100553, 0x001005b4, + 0x42000000, 0x00000001, 0x0201f800, 0x001015fa, + 0x0201f800, 0x00105de2, 0x59c408a3, 0x82040d00, + 0xfffffff7, 0x480788a3, 0x0201f800, 0x00104e13, + 0x0400000e, 0x0201f800, 0x00104e23, 0x0400000b, + 0x0201f800, 0x00104e1b, 0x04020967, 0x59c400a3, + 0x84000532, 0x84000570, 0x480388a3, 0x4a038808, + 0x00000008, 0x0401f013, 0x59c400a3, 0x84000530, + 0x82000500, 0xbf7fffff, 0x480388a3, 0x42000800, + 0x000000f8, 0x0201f800, 0x00104030, 0x59c400a3, + 0x82000540, 0x00018000, 0x8400051c, 0x480388a3, + 0x82000500, 0xfffeffff, 0x480388a3, 0x497b8808, + 0x59c40006, 0x82000500, 0xfbffff0e, 0x48038806, + 0x497b2822, 0x497b2823, 0x42000800, 0x000001f4, + 0x42001000, 0x001005ce, 0x0201f800, 0x00105cbc, + 0x59c40805, 0x42001000, 0x00000001, 0x0201f800, + 0x001019aa, 0x0201f800, 0x001016ac, 0x0402000a, + 0x42000000, 0x00000001, 0x0201f800, 0x001018fa, + 0x42000000, 0x00000001, 0x0201f800, 0x00101892, + 0x0401f022, 0x0201f800, 0x001016b3, 0x04020008, + 0x41780000, 0x0201f800, 0x001018fa, 0x41780000, + 0x0201f800, 0x00101892, 0x0401f018, 0x0201f800, + 0x001016ba, 0x0402000a, 0x42000000, 0x00000002, + 0x0201f800, 0x001018fa, 0x42000000, 0x00000002, + 0x0201f800, 0x00101892, 0x0401f00c, 0x0201f800, + 0x001016c1, 0x04020918, 0x59a80049, 0x800001c0, + 0x04000006, 0x0201f800, 0x001016c7, 0x4a03503e, + 0x00000001, 0x0401f021, 0x0201f800, 0x00101994, + 0x4a03503e, 0x00000001, 0x0201f800, 0x00104e13, + 0x0400000c, 0x0201f800, 0x00104e23, 0x04000009, + 0x0201f800, 0x00104e1b, 0x04020903, 0x4a035033, + 0x00000001, 0x0201f800, 0x00104d76, 0x0401f00f, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000580, + 0x00000008, 0x04000003, 0x4a038805, 0x04000000, + 0x59c400a3, 0x82000540, 0x0001c000, 0x480388a3, + 0x84000520, 0x480388a3, 0x1c01f000, 0x0401f8a3, + 0x04020004, 0x4a03503e, 0x00000003, 0x0401f027, + 0x0201f800, 0x001016c1, 0x04020011, 0x59a80049, + 0x800001c0, 0x0400000e, 0x0201f800, 0x001016c7, + 0x59a80048, 0x8c00051e, 0x0400001c, 0x0201f800, + 0x00104e1b, 0x04020009, 0x4a035033, 0x00000001, + 0x0201f800, 0x00104d76, 0x0401f004, 0x0201f800, + 0x00101941, 0x04020011, 0x0201f800, 0x00101886, + 0x4a03503e, 0x00000002, 0x497b5049, 0x59c400a3, + 0x84000520, 0x480388a3, 0x497b2822, 0x497b2823, + 0x42000800, 0x0000002d, 0x42001000, 0x001005ce, + 0x0201f800, 0x00105cbc, 0x1c01f000, 0x0401f877, + 0x04020004, 0x4a03503e, 0x00000003, 0x0401f05b, + 0x4a038805, 0x000000f0, 0x0201f800, 0x00101941, + 0x04020050, 0x0201f800, 0x00104e1b, 0x04000044, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000580, + 0x00000008, 0x04000020, 0x59c40005, 0x8c000534, + 0x0402001d, 0x59940022, 0x82000580, 0x00000001, + 0x04020046, 0x0201f800, 0x00104e23, 0x04020043, + 0x4a038805, 0x000000f0, 0x0201f800, 0x00104e67, + 0x4a035032, 0x0000aaaa, 0x4a035033, 0x00000000, + 0x59c408a3, 0x82040d40, 0x00000008, 0x480788a3, + 0x4202d800, 0x00000001, 0x4a03503e, 0x00000000, + 0x4a038805, 0x00000001, 0x497b2822, 0x497b2823, + 0x0401f01f, 0x0201f800, 0x00104e23, 0x04020007, + 0x59a80032, 0x82000580, 0x0000aaaa, 0x04020003, + 0x4a035010, 0x00ffffff, 0x497b5032, 0x59c40006, + 0x82000540, 0x04000001, 0x48038806, 0x59a80805, + 0x8c040d06, 0x04020005, 0x59c408a3, 0x82040d40, + 0x00000008, 0x480788a3, 0x4202d800, 0x00000001, + 0x4a03503e, 0x00000000, 0x4a038805, 0x00000001, + 0x497b2822, 0x497b2823, 0x0401f010, 0x59c40005, + 0x82000500, 0x000000c0, 0x0400000c, 0x59c40006, + 0x82000540, 0x000000f1, 0x48038806, 0x0401f7ef, + 0x0201f800, 0x001016c1, 0x04020004, 0x59a80049, + 0x800001c0, 0x040207a4, 0x497b8885, 0x1c01f000, + 0x4803c856, 0x42000000, 0x00000001, 0x0201f800, + 0x001015fa, 0x4a03503e, 0x00000000, 0x0201f800, + 0x001016c1, 0x0402000b, 0x59a80052, 0x800001c0, + 0x04000004, 0x80000040, 0x48035052, 0x04020005, + 0x4a035052, 0x0000000a, 0x4a035049, 0x00000001, + 0x497b8885, 0x0401f0f6, 0x59940022, 0x59940823, + 0x80040540, 0x1c01f000, 0x497b2823, 0x1c01f000, + 0x4c080000, 0x42001000, 0x000000f0, 0x0201f800, + 0x001019aa, 0x5c001000, 0x1c01f000, 0x4a03505c, + 0x00000004, 0x4a03505d, 0x00000000, 0x4a03505e, + 0x00000012, 0x4a03505f, 0x00000002, 0x4a035010, + 0x00ffffff, 0x0201f800, 0x001090d5, 0x4a03502a, + 0x20200000, 0x4a03502b, 0x88000200, 0x4a03502c, + 0x00ff001f, 0x4a03502d, 0x000007d0, 0x4a03502e, + 0x80000000, 0x4a03502f, 0x00000200, 0x4a035030, + 0x00ff0000, 0x4a035031, 0x00010000, 0x4a03503a, + 0x514c4f47, 0x4a03503b, 0x49432020, 0x1c01f000, + 0x4d440000, 0x417a8800, 0x41780800, 0x0201f800, + 0x00020267, 0x04020005, 0x0201f800, 0x00104836, + 0x04020002, 0x80040800, 0x81468800, 0x83440580, + 0x000007f0, 0x040207f6, 0x5c028800, 0x1c01f000, + 0x4803c857, 0x5c000000, 0x4c000000, 0x4803c857, + 0x0401f809, 0x485fc857, 0x4203e000, 0x50000000, + 0x5c000000, 0x4d780000, 0x4200b800, 0x00008002, + 0x0401f006, 0x485fc857, 0x4203e000, 0x50000000, + 0x4200b800, 0x00008002, 0x04006000, 0x4c000000, + 0x4c040000, 0x59bc00ea, 0x82000500, 0x00000007, + 0x82000580, 0x00000001, 0x04020005, 0x42000800, + 0x00000000, 0x0201f800, 0x001069a3, 0x5c000800, + 0x4807c025, 0x80040920, 0x4807c026, 0x5c000000, + 0x4803c023, 0x80000120, 0x4803c024, 0x5c000000, + 0x4803c857, 0x4803c021, 0x80000120, 0x4803c022, + 0x41f80000, 0x4803c027, 0x80000120, 0x4803c028, + 0x42000000, 0x00001000, 0x50000000, 0x82000480, + 0x24320001, 0x4803c857, 0x04001053, 0x42000800, + 0x00000064, 0x80040840, 0x04000007, 0x4a030000, + 0x00000001, 0x40000000, 0x59800000, 0x8c000500, + 0x040007f9, 0x04000046, 0x42000800, 0x0010bfa2, + 0x46000800, 0xfaceface, 0x80040800, 0x4c080000, + 0x4c0c0000, 0x42001000, 0x00007a00, 0x58080013, + 0x44000800, 0x80040800, 0x58080019, 0x44000800, + 0x80040800, 0x5808001a, 0x44000800, 0x80040800, + 0x5808001b, 0x44000800, 0x80040800, 0x5808001c, + 0x44000800, 0x80040800, 0x5808001f, 0x44000800, + 0x80040800, 0x42001000, 0x00007a40, 0x42001800, + 0x0000000b, 0x50080000, 0x44000800, 0x80081000, + 0x80040800, 0x800c1840, 0x040207fb, 0x42001800, + 0x00000003, 0x42001000, 0x00007b00, 0x480c1003, + 0x58080005, 0x44000800, 0x80040800, 0x800c1840, + 0x040217fb, 0x42001000, 0x00007c00, 0x58080002, + 0x44000800, 0x80040800, 0x58080003, 0x44000800, + 0x80040800, 0x58080020, 0x44000800, 0x80040800, + 0x58080021, 0x44000800, 0x80040800, 0x58080022, + 0x44000800, 0x80040800, 0x58080023, 0x44000800, + 0x80040800, 0x5c001800, 0x5c001000, 0x4a030000, + 0x00000000, 0x485fc020, 0x905cb9c0, 0x825cbd40, + 0x00000012, 0x485fc011, 0x4203e000, 0x40000000, + 0x4202d800, 0x00000005, 0x59e00017, 0x8c000508, + 0x04000003, 0x4a03c017, 0x00000002, 0x4203e000, + 0x30000001, 0x0401f81f, 0x0401f7ff, 0x4a03c850, + 0x0010bfbe, 0x4a03c851, 0x0010cfbd, 0x4a03c853, + 0x00000800, 0x4a03c855, 0x0001eb5a, 0x59e40001, + 0x82000540, 0x00003f00, 0x4803c801, 0x4a03b104, + 0x70000002, 0x4a03a804, 0x70000002, 0x4a03b004, + 0x70000002, 0x42000000, 0x0010b6eb, 0x49780001, + 0x49780002, 0x1c01f000, 0x5c036000, 0x4db00000, + 0x49b3c857, 0x4803c857, 0x1c01f000, 0x1c01f000, + 0x59a8006b, 0x8c000530, 0x040207fe, 0x4c080000, + 0x42001000, 0x00000004, 0x0401f862, 0x5c001000, + 0x4201d000, 0x00028b0a, 0x0201f800, 0x00105dd2, + 0x4c080000, 0x42001000, 0x00000008, 0x0401f859, + 0x5c001000, 0x4201d000, 0x00028b0a, 0x0201f800, + 0x00105dd2, 0x4c080000, 0x42001000, 0x00000010, + 0x0401f850, 0x5c001000, 0x4201d000, 0x00028b0a, + 0x0201f800, 0x00105dd2, 0x0401f7e2, 0x8c00050c, + 0x59a8086b, 0x04020003, 0x84040d30, 0x0401f006, + 0x84040d70, 0x4807506b, 0x42001000, 0x00000000, + 0x0401f040, 0x4807506b, 0x836c0500, 0x00000007, + 0x0c01f001, 0x00100727, 0x0010070d, 0x0010070d, + 0x001006f5, 0x0010071a, 0x0010070d, 0x0010070d, + 0x0010071a, 0x59a8006f, 0x8c000502, 0x04020013, + 0x59c40801, 0x82040d00, 0x00018000, 0x82040580, + 0x00010000, 0x0400000a, 0x82040580, 0x00008000, + 0x04000004, 0x42001000, 0x42004000, 0x0401f006, + 0x42001000, 0x22002000, 0x0401f003, 0x42001000, + 0x12001000, 0x0401f025, 0x42001000, 0x00001004, + 0x0401f022, 0x59a8006f, 0x8c000502, 0x04020008, + 0x59a8006b, 0x8c000534, 0x04020004, 0x42001000, + 0x74057005, 0x0401f819, 0x1c01f000, 0x42001000, + 0x00002008, 0x0401f7fc, 0x59a8006b, 0x8c000534, + 0x0402000a, 0x59a8006f, 0x8c000502, 0x04000004, + 0x42001000, 0x24052005, 0x0401f00c, 0x42001000, + 0x74057005, 0x0401f009, 0x1c01f000, 0x1c01f000, + 0x82081500, 0x0000001c, 0x82081540, 0x001c0000, + 0x480bc013, 0x1c01f000, 0x59a8006b, 0x8c000530, + 0x04000002, 0x84081570, 0x480b506b, 0x8c000530, + 0x04020005, 0x82081500, 0x00007000, 0x80081114, + 0x0401fff0, 0x1c01f000, 0x41780000, 0x50041800, + 0x800c0400, 0x80040800, 0x80102040, 0x040207fc, + 0x80080500, 0x80000540, 0x1c01f000, 0x4202f000, + 0x00000000, 0x41780000, 0x41780800, 0x41781000, + 0x41781800, 0x41782000, 0x41782800, 0x41783000, + 0x41783800, 0x41784000, 0x41784800, 0x41785000, + 0x41785800, 0x41786000, 0x41786800, 0x41787000, + 0x41787800, 0x41788000, 0x41788800, 0x41789000, + 0x41789800, 0x4178a000, 0x4178a800, 0x4178b000, + 0x4178b800, 0x4178c000, 0x4178c800, 0x4178d000, + 0x4178d800, 0x4178e000, 0x4178e800, 0x4178f000, + 0x4178f800, 0x41790000, 0x41790800, 0x41791000, + 0x41791800, 0x41792000, 0x41792800, 0x41793000, + 0x41793800, 0x41794000, 0x41794800, 0x41795000, + 0x41795800, 0x41796000, 0x41796800, 0x41797000, + 0x41797800, 0x41798000, 0x41798800, 0x42019000, + 0x0010b333, 0x42019800, 0x0010b30a, 0x4179a000, + 0x4179a800, 0x4179b000, 0x4179b800, 0x4179c800, + 0x4179c000, 0x4179d000, 0x4179d800, 0x4179e000, + 0x4179e800, 0x4179f000, 0x4179f800, 0x417a0000, + 0x417a0800, 0x417a1000, 0x417a1800, 0x417a2000, + 0x42022800, 0x00006100, 0x417a3000, 0x417a3800, + 0x417a4000, 0x417a4800, 0x417a5000, 0x417a5800, + 0x417a6000, 0x417a6800, 0x417a7000, 0x417a7800, + 0x417a8000, 0x417a8800, 0x417a9000, 0x417a9800, + 0x417ae800, 0x417af800, 0x42030000, 0x00007c00, + 0x42031000, 0x0010b604, 0x42031800, 0x0000bf1d, + 0x42032000, 0x0000bf32, 0x42032800, 0x0010b5cc, + 0x42033000, 0x0010b274, 0x42034000, 0x0010b2a0, + 0x42033800, 0x0010b2bf, 0x42034800, 0x0010b342, + 0x42035000, 0x0010b200, 0x42035800, 0x0010aa00, + 0x42030800, 0x0010b301, 0x417b6000, 0x42036800, + 0x00006f00, 0x4203c800, 0x00003000, 0x42037000, + 0x0000ff00, 0x42037800, 0x0000bf00, 0x42038000, + 0x00007700, 0x42038800, 0x00004000, 0x42039000, + 0x00006000, 0x42039800, 0x0010bcda, 0x4203a000, + 0x00007600, 0x4203a800, 0x00007400, 0x4203b000, + 0x00007200, 0x4203b800, 0x00007100, 0x4203c000, + 0x00007000, 0x4203d000, 0x00000000, 0x4203e800, + 0x000200f9, 0x417bd800, 0x1c01f000, 0x42000800, + 0x00100000, 0x50040000, 0x4c000000, 0x42000000, + 0x0000aaaa, 0x44000800, 0x42001800, 0x00005555, + 0x41782000, 0x82102400, 0x00010000, 0x40100000, + 0x80042c00, 0x440c2800, 0x42003000, 0x0000000a, + 0x80183040, 0x040207ff, 0x50140000, 0x800c0580, + 0x04020004, 0x50040000, 0x800c0580, 0x040207f2, + 0x5c000000, 0x44000800, 0x80142840, 0x4817c861, + 0x1c01f000, 0x59a8081f, 0x800409c0, 0x04020009, + 0x49781c0c, 0x4a001a0c, 0x00000200, 0x4a001804, + 0x07000000, 0x59a80010, 0x9c0001c0, 0x48001805, + 0x0401fdf8, 0x9c0409c0, 0x48041806, 0x1c01f000, + 0x59a8080c, 0x4006d000, 0x4202b800, 0x00000001, + 0x59a8180d, 0x480fc857, 0x82041400, 0x00000014, + 0x82082400, 0x00000014, 0x40100000, 0x800c0480, + 0x04001006, 0x44080800, 0x40080800, 0x40101000, + 0x815eb800, 0x0401f7f7, 0x45780800, 0x495f5020, + 0x1c01f000, 0x835c0480, 0x00000020, 0x04001009, + 0x496bc857, 0x815eb840, 0x416a5800, 0x592ed000, + 0x497a5800, 0x497a5801, 0x812e59c0, 0x1c01f000, + 0x42000000, 0x0010b652, 0x0201f800, 0x0010a86e, + 0x417a5800, 0x0401f7f9, 0x815eb840, 0x04001008, + 0x416a5800, 0x492fc857, 0x592ed000, 0x497a5800, + 0x497a5801, 0x812e59c0, 0x1c01f000, 0x42000000, + 0x0010b652, 0x0201f800, 0x0010a86e, 0x417ab800, + 0x417a5800, 0x0401f7f8, 0x492fc857, 0x496a5800, + 0x412ed000, 0x815eb800, 0x59c80000, 0x82000540, + 0x00001200, 0x48039000, 0x1c01f000, 0x492fc857, + 0x812e59c0, 0x04000007, 0x592c0001, 0x497a5801, + 0x4c000000, 0x0401fff1, 0x5c025800, 0x0401f7f9, + 0x1c01f000, 0x4807c856, 0x42007000, 0x0010b5f6, + 0x4a007001, 0x00000000, 0x59e00003, 0x82000540, + 0x00008080, 0x4803c003, 0x4a03b805, 0x90000001, + 0x59dc0006, 0x4a03b805, 0x70000000, 0x59dc0006, + 0x4a03b805, 0x30000000, 0x59dc0006, 0x4a03b805, + 0x80000000, 0x4200b000, 0x00000020, 0x497bb807, + 0x8058b040, 0x040207fe, 0x4a03b805, 0x30000000, + 0x59dc0006, 0x4a03b805, 0x60000001, 0x59dc0006, + 0x4a03b805, 0x70000001, 0x59dc0006, 0x4a03b805, + 0x30000002, 0x4200b000, 0x00000020, 0x497bb807, + 0x8058b040, 0x040207fe, 0x4a03b805, 0x30000000, + 0x59dc0006, 0x4a03b805, 0x60000001, 0x0401ff9e, + 0x04000d99, 0x42001000, 0x0010b5f4, 0x452c1000, + 0x4a025801, 0x00000001, 0x4a025802, 0x00000100, + 0x4a025809, 0x00106eac, 0x497a580a, 0x497a580b, + 0x497a580c, 0x0401ff90, 0x04000d8b, 0x42001000, + 0x0010b5f5, 0x452c1000, 0x4a025801, 0x00000000, + 0x4a025802, 0x00000100, 0x4a025809, 0x0010120c, + 0x497a5803, 0x497a5807, 0x497a5808, 0x497a580a, + 0x59a8006f, 0x8c000500, 0x04000006, 0x4a03b805, + 0xe0000001, 0x59dc0006, 0x8c000522, 0x040007fc, + 0x1c01f000, 0x4df00000, 0x4203e000, 0x50000000, + 0x4c380000, 0x40087000, 0x4a007002, 0x00000000, + 0x42007000, 0x0010b5f6, 0x82080400, 0x00000000, + 0x45780000, 0x58380005, 0x48087005, 0x80000540, + 0x04000006, 0x480bc857, 0x82000400, 0x00000000, + 0x44080000, 0x0401f003, 0x480bc857, 0x48087006, + 0x58380001, 0x80000540, 0x0400080c, 0x5c007000, + 0x5c03e000, 0x1c01f000, 0x4c380000, 0x42007000, + 0x0010b5f6, 0x58380001, 0x80000540, 0x04000803, + 0x5c007000, 0x1c01f000, 0x42007000, 0x0010b5f6, + 0x58380001, 0x82000580, 0x00000000, 0x04020012, + 0x58380000, 0x0c01f001, 0x001008d7, 0x001008d6, + 0x001008d6, 0x001008d6, 0x001008d6, 0x001008d6, + 0x001008d6, 0x001008d6, 0x0401fd3f, 0x58380808, + 0x800409c0, 0x04020027, 0x58380006, 0x80000540, + 0x04020002, 0x1c01f000, 0x4803c857, 0x48007002, + 0x40006800, 0x58340000, 0x80000540, 0x04020002, + 0x48007005, 0x48007006, 0x4a03b805, 0x20000000, + 0x59dc0006, 0x4a03b805, 0x30000000, 0x58340007, + 0x4803b800, 0x4803c857, 0x58340008, 0x4803b801, + 0x4803c857, 0x58340004, 0x48007003, 0x58340003, + 0x48007004, 0x4803b803, 0x4803c857, 0x58340001, + 0x8c000500, 0x04000004, 0x4a007001, 0x00000001, + 0x0401f028, 0x4a007001, 0x00000002, 0x0401f03e, + 0x0201f800, 0x001091b3, 0x0201f800, 0x0010a4b8, + 0x04000017, 0x4a03b805, 0x20000000, 0x59dc0006, + 0x4a03b805, 0x30000000, 0x4807b800, 0x480bb801, + 0x4a007003, 0x00000010, 0x480c7009, 0x42001000, + 0x001008be, 0x0201f800, 0x00105cd3, 0x58380008, + 0x82000400, 0x00000004, 0x48007004, 0x4803b803, + 0x4a007001, 0x00000007, 0x0401f023, 0x0201f800, + 0x001091cb, 0x42000800, 0x00000001, 0x42001000, + 0x001008be, 0x0201f800, 0x00105caf, 0x0401f7b7, + 0x4c040000, 0x4c080000, 0x58380803, 0x42001000, + 0x00003fff, 0x82040480, 0x00003fff, 0x04021003, + 0x40041000, 0x80000580, 0x48007003, 0x4803c857, + 0x800800c4, 0x4803b802, 0x4a03b805, 0x30000002, + 0x59dc0006, 0x4a03b805, 0x70000001, 0x59dc0006, + 0x4a03b805, 0x10000000, 0x5c001000, 0x5c000800, + 0x1c01f000, 0x483bc857, 0x4c040000, 0x4c080000, + 0x58380803, 0x42001000, 0x00003fff, 0x82040480, + 0x00003fff, 0x04021003, 0x40041000, 0x80000580, + 0x48007003, 0x800800c4, 0x4803b802, 0x4803c857, + 0x4a03b805, 0x10000002, 0x5c001000, 0x5c000800, + 0x1c01f000, 0x4c040000, 0x4c380000, 0x42007000, + 0x0010b5f6, 0x59dc0806, 0x4807c857, 0x4a03b805, + 0x20000000, 0x8c040d3e, 0x04000007, 0x8c040d08, + 0x04020cb9, 0x58380001, 0x82000500, 0x00000007, + 0x0c01f804, 0x5c007000, 0x5c000800, 0x1c01f000, + 0x001008c6, 0x0010096c, 0x0010097c, 0x00100615, + 0x00100615, 0x00100615, 0x00100615, 0x0010123a, + 0x4807c856, 0x82040d00, 0x43000f80, 0x04020009, + 0x58380003, 0x80000540, 0x0400001c, 0x59dc0000, + 0x4803b800, 0x59dc0001, 0x4803b801, 0x0401f7ad, + 0x58380802, 0x4a000802, 0x00000200, 0x0401f01d, + 0x4807c856, 0x82040d00, 0x43000f80, 0x04020009, + 0x58380003, 0x80000540, 0x0400000c, 0x59dc0000, + 0x4803b800, 0x59dc0001, 0x4803b801, 0x0401f7b6, + 0x58380002, 0x82000400, 0x00000002, 0x46000000, + 0x00000200, 0x0401f00b, 0x4c340000, 0x58386802, + 0x59dc0000, 0x4803c857, 0x48006807, 0x59dc0001, + 0x48006808, 0x4a006802, 0x00000100, 0x5c006800, + 0x4a007001, 0x00000000, 0x4c300000, 0x58386002, + 0x4833c857, 0x0401f80c, 0x04000009, 0x58300009, + 0x82000c80, 0x0010a971, 0x04021c73, 0x82000c80, + 0x00020000, 0x04001c70, 0x0801f800, 0x5c006000, + 0x0401f71e, 0x803061c0, 0x04000009, 0x59a8000c, + 0x80300480, 0x04001007, 0x59a8000d, 0x80300480, + 0x04021004, 0x82000540, 0x00000001, 0x1c01f000, + 0x80000580, 0x1c01f000, 0x4803c856, 0x4dc00000, + 0x42007000, 0x0010b601, 0x4a007400, 0x00000000, + 0x49787001, 0x42038000, 0x00007720, 0x4a038006, + 0x60000001, 0x4a038009, 0xf4f60000, 0x42038000, + 0x00007700, 0x4a038006, 0x60000001, 0x4a038009, + 0xf4f60000, 0x4a03c822, 0x00000010, 0x4a0370e8, + 0x00000000, 0x0401f809, 0x4a0370e9, 0x00003a0f, + 0x4a0370e8, 0x00000000, 0x4a0370e8, 0x00000001, + 0x5c038000, 0x1c01f000, 0x4c5c0000, 0x4178b800, + 0x0401f80a, 0x5c00b800, 0x1c01f000, 0x4803c856, + 0x4c5c0000, 0x825cbd40, 0x00000001, 0x0401f803, + 0x5c00b800, 0x1c01f000, 0x4803c856, 0x4dc00000, + 0x4c500000, 0x4c580000, 0x4c540000, 0x4a0370e8, + 0x00000000, 0x805cb9c0, 0x04000009, 0x4a038807, + 0x00000004, 0x59b800ea, 0x8c000510, 0x04000004, + 0x59b800e0, 0x0401f87b, 0x0401f7fb, 0x42038000, + 0x00007720, 0x0201f800, 0x00100f0f, 0x59c00007, + 0x4a038006, 0x20000000, 0x59c00007, 0x4a038006, + 0x8000000a, 0x59c00007, 0x4a038006, 0x8000000b, + 0x59c00007, 0x4a038006, 0x40000001, 0x83c00580, + 0x00007700, 0x04000004, 0x42038000, 0x00007700, + 0x0401f7ed, 0x42038000, 0x00007720, 0x42000800, + 0x00000800, 0x59c00007, 0x8c00051e, 0x04000006, + 0x4a038006, 0x90000001, 0x80040840, 0x040207fa, + 0x0401fc01, 0x83c00580, 0x00007700, 0x04000004, + 0x42038000, 0x00007700, 0x0401f7f1, 0x805cb9c0, + 0x0402001d, 0x4200b000, 0x00000020, 0x83b8ac00, + 0x00000020, 0x0201f800, 0x0010a947, 0x4a0370fb, + 0x00000001, 0x4a037020, 0x0010110d, 0x59a80039, + 0x82000500, 0x0000ffff, 0x48037021, 0x4a037035, + 0x0010bbda, 0x4a037030, 0x0010b210, 0x4a037031, + 0x0010aa00, 0x4a037032, 0x0010b315, 0x4a037036, + 0x0010b320, 0x59840002, 0x48037034, 0x4a037038, + 0x00101104, 0x4a0370fb, 0x00000001, 0x4178a000, + 0x4200b000, 0x00000020, 0x83b8ac00, 0x00000000, + 0x0201f800, 0x0010a947, 0x4200b000, 0x00000040, + 0x83b8ac00, 0x00000040, 0x0201f800, 0x0010a947, + 0x805cb9c0, 0x04020004, 0x4a0370e4, 0xaaaaaaaa, + 0x0401f003, 0x4a0370e4, 0xa2aaaa82, 0x4a0370e5, + 0xaaaaaaaa, 0x4a0370e6, 0xaaaaaaaa, 0x4a0370fb, + 0x00000000, 0x4a0370e6, 0xaaaaaaaa, 0x42038000, + 0x00007720, 0x4a038006, 0x90000000, 0x59c00007, + 0x8c00051e, 0x02020800, 0x00100615, 0x42038000, + 0x00007700, 0x4a038006, 0x90000000, 0x59c00007, + 0x8c00051e, 0x02020800, 0x00100615, 0x5c00a800, + 0x5c00b000, 0x5c00a000, 0x5c038000, 0x1c01f000, + 0x4d300000, 0x4d380000, 0x40026000, 0x82000500, + 0x7f000000, 0x82000580, 0x00000003, 0x0402000f, + 0x83326500, 0x00ffffff, 0x59300203, 0x82000580, + 0x00000004, 0x04020009, 0x59300c06, 0x82040580, + 0x00000009, 0x04020005, 0x42027000, 0x00000047, + 0x0201f800, 0x000208d8, 0x5c027000, 0x5c026000, + 0x1c01f000, 0x4d300000, 0x4d2c0000, 0x4d340000, + 0x4d400000, 0x4cfc0000, 0x4d380000, 0x4d3c0000, + 0x4d440000, 0x4d4c0000, 0x4d480000, 0x4c5c0000, + 0x4c600000, 0x4c640000, 0x4d040000, 0x4cc80000, + 0x4ccc0000, 0x4cf40000, 0x4cf80000, 0x4cfc0000, + 0x0201f800, 0x00020016, 0x5c01f800, 0x5c01f000, + 0x5c01e800, 0x5c019800, 0x5c019000, 0x5c020800, + 0x5c00c800, 0x5c00c000, 0x5c00b800, 0x5c029000, + 0x5c029800, 0x5c028800, 0x5c027800, 0x5c027000, + 0x5c01f800, 0x5c028000, 0x5c026800, 0x5c025800, + 0x5c026000, 0x1c01f000, 0x493bc857, 0x0201f000, + 0x00020045, 0x83300500, 0x1f000000, 0x04000008, + 0x81326580, 0x80000130, 0x82000c80, 0x00000014, + 0x02021800, 0x00100615, 0x0c01f013, 0x83300500, + 0x000000ff, 0x82000c80, 0x00000007, 0x02021800, + 0x00100615, 0x0c01f025, 0x1c01f000, 0x82000d00, + 0xc0000038, 0x02020800, 0x0010060d, 0x0201f800, + 0x00100615, 0x00000000, 0x00000048, 0x00000054, + 0x00000053, 0x00100ae4, 0x00100b08, 0x00100b03, + 0x00100b28, 0x00100aef, 0x00100afb, 0x00100ae4, + 0x00100b23, 0x00100b64, 0x00100ae4, 0x00100ae4, + 0x00100ae4, 0x00100ae4, 0x00100b67, 0x00100b6d, + 0x00100b7e, 0x00100b8f, 0x00100ae4, 0x00100b98, + 0x00100ba4, 0x00100ae4, 0x00100ae4, 0x00100ae4, + 0x0201f800, 0x00100615, 0x00100aed, 0x00100c3f, + 0x00100b35, 0x00100b59, 0x00100aed, 0x00100aed, + 0x00100aed, 0x0201f800, 0x00100615, 0x4803c856, + 0x59300004, 0x8c00053e, 0x04020005, 0x42027000, + 0x00000055, 0x0201f000, 0x000208d8, 0x0201f800, + 0x00106cb4, 0x040007fa, 0x1c01f000, 0x4803c856, + 0x0401f8aa, 0x40002800, 0x41782000, 0x42027000, + 0x00000056, 0x0201f000, 0x000208d8, 0x4803c856, + 0x42027000, 0x00000057, 0x0201f000, 0x000208d8, + 0x4803c856, 0x59300007, 0x8c00051a, 0x04020010, + 0x59325808, 0x812e59c0, 0x04000014, 0x592c0408, + 0x8c00051c, 0x04020003, 0x4a026011, 0xffffffff, + 0x59300004, 0x8c00053e, 0x04020009, 0x42027000, + 0x00000048, 0x0201f000, 0x000208d8, 0x59325808, + 0x4a025a06, 0x00000007, 0x0401f7f4, 0x0201f800, + 0x00106cb4, 0x040007f6, 0x1c01f000, 0x4803c856, + 0x83300500, 0x00ffffff, 0x0201f000, 0x0010620f, + 0x1c01f000, 0x4c040000, 0x59b808ea, 0x82040d00, + 0x00000007, 0x82040580, 0x00000003, 0x04000004, + 0x42000000, 0x60000000, 0x0401f8ac, 0x5c000800, + 0x1c01f000, 0x0401f8fa, 0x0400001b, 0x59325808, + 0x812e59c0, 0x04000018, 0x592c0204, 0x82000500, + 0x000000ff, 0x82000d80, 0x00000029, 0x04020012, + 0x59300203, 0x82000580, 0x00000003, 0x0400000b, + 0x59300807, 0x84040d26, 0x48066007, 0x0201f800, + 0x00020087, 0x4a03900d, 0x00000040, 0x4a0370e5, + 0x00000008, 0x1c01f000, 0x0201f800, 0x00106cb4, + 0x040007f4, 0x59880053, 0x80000000, 0x48031053, + 0x4a03900d, 0x00000040, 0x42000000, 0xc0000000, + 0x0401f05a, 0x42007800, 0x0010bbe1, 0x42002000, + 0x00003000, 0x42003000, 0x00000105, 0x0201f800, + 0x00105b3d, 0x4a0370e4, 0x02000000, 0x1c01f000, + 0x4933c857, 0x0201f000, 0x000208b4, 0x41300800, + 0x800409c0, 0x02020800, 0x00100615, 0x0201f800, + 0x0010060d, 0x4933c857, 0x813261c0, 0x02000800, + 0x00100615, 0x0401f835, 0x40002800, 0x0201f800, + 0x0010a7c3, 0x0401f8ae, 0x04000007, 0x59326809, + 0x59340200, 0x8c00050e, 0x59300414, 0x02020800, + 0x00109094, 0x1c01f000, 0x4933c857, 0x813261c0, + 0x02000800, 0x00100615, 0x0401f8a1, 0x0400000b, + 0x59325808, 0x0201f800, 0x00108df4, 0x04000007, + 0x592c0208, 0x8400054e, 0x48025a08, 0x417a7800, + 0x0201f800, 0x00108997, 0x1c01f000, 0x485fc857, + 0x5c000000, 0x4d780000, 0x4203e000, 0x50000000, + 0x4200b800, 0x00008005, 0x0201f000, 0x0010061a, + 0x4933c857, 0x83300480, 0x00000020, 0x02021800, + 0x00100615, 0x83300c00, 0x0010b6cb, 0x50040000, + 0x80000000, 0x04001002, 0x44000800, 0x1c01f000, + 0x4933c857, 0x0401f7f4, 0x4807c856, 0x59b800ea, + 0x8c000510, 0x040007fd, 0x59b800e0, 0x4803c857, + 0x1c01f000, 0x4803c856, 0x42000000, 0x10000000, + 0x41300800, 0x0401f02d, 0x82000500, 0xf0000000, + 0x82040d00, 0x0fffffff, 0x80040d40, 0x4807c857, + 0x59b800ea, 0x8c000516, 0x04020003, 0x480770e1, + 0x1c01f000, 0x8c000510, 0x040007fa, 0x4c040000, + 0x0401f809, 0x5c000800, 0x82100480, 0x00000008, + 0x040017f4, 0x4c040000, 0x0401febf, 0x5c000800, + 0x0401f7f0, 0x59b800e2, 0x59b820e2, 0x80100580, + 0x040207fd, 0x80102114, 0x0401f006, 0x59b800e2, + 0x59b820e2, 0x80100580, 0x040207fd, 0x0401f001, + 0x40101800, 0x800c190a, 0x82100500, 0x0000001f, + 0x820c1d00, 0x0000001f, 0x800c2480, 0x82102500, + 0x0000001f, 0x1c01f000, 0x82000500, 0xf0000000, + 0x82040d00, 0x0fffffff, 0x80040d40, 0x4807c857, + 0x42001000, 0x0010b602, 0x50080000, 0x80000540, + 0x04020005, 0x4a0370e5, 0x00000003, 0x4a0370e4, + 0x00000300, 0x80000000, 0x44001000, 0x42001000, + 0x00000400, 0x59b800ea, 0x8c000510, 0x0400000c, + 0x0401ffd5, 0x82100480, 0x00000008, 0x04001007, + 0x4c040000, 0x4c080000, 0x0401fe8b, 0x5c001000, + 0x5c000800, 0x0401f020, 0x59b800ea, 0x8c000516, + 0x0402001d, 0x4a0370e4, 0x00300000, 0x480770e1, + 0x42001000, 0x0000ff00, 0x80081040, 0x04000012, + 0x59b808e4, 0x8c040d28, 0x040207fc, 0x42001000, + 0x0010b602, 0x50080000, 0x80000040, 0x04020005, + 0x4a0370e5, 0x00000002, 0x4a0370e4, 0x00000200, + 0x02001800, 0x00100615, 0x44001000, 0x8c040d2c, + 0x1c01f000, 0x41f80000, 0x50000000, 0x0201f800, + 0x00100615, 0x80081040, 0x040207d3, 0x41f80000, + 0x50000000, 0x0201f800, 0x00100615, 0x4d380000, + 0x59300c06, 0x82040580, 0x00000009, 0x04020006, + 0x42027000, 0x00000047, 0x0201f800, 0x000208d8, + 0x80000580, 0x5c027000, 0x1c01f000, 0x4c500000, + 0x4a03900d, 0x00000001, 0x59c8a020, 0x4a03900d, + 0x00000002, 0x59c80820, 0x8c50a52e, 0x04000002, + 0x900409c0, 0x82040d00, 0x0000ffff, 0x0201f800, + 0x00105b0f, 0x5c00a000, 0x1c01f000, 0x0401fff0, + 0x04000045, 0x4933c857, 0x59300406, 0x82000580, + 0x00000000, 0x04000040, 0x59c82021, 0x4a03900d, + 0x00000001, 0x59c82821, 0x82142d00, 0x0000ffff, + 0x59325808, 0x812e59c0, 0x04000037, 0x59326809, + 0x0201f800, 0x00104728, 0x02020800, 0x0010907c, + 0x599c0019, 0x8c00050c, 0x04020018, 0x0201f800, + 0x00104728, 0x04020015, 0x59300811, 0x4807c857, + 0x592c0408, 0x8c00051c, 0x0402000e, 0x8400055c, + 0x48025c08, 0x592c0a04, 0x82040d00, 0x000000ff, + 0x82040580, 0x00000048, 0x04000004, 0x82040580, + 0x00000018, 0x04020003, 0x59300811, 0x48065803, + 0x4a026011, 0x7fffffff, 0x48166013, 0x0201f800, + 0x0010112d, 0x04020014, 0x0401fa07, 0x40280000, + 0x4802600d, 0x04000005, 0x4832600b, 0x50200000, + 0x4802600a, 0x4822600c, 0x59300414, 0x8c00051c, + 0x04020004, 0x599c0019, 0x8c00050c, 0x0402086e, + 0x4a03900d, 0x00000040, 0x4a0370e5, 0x00000008, + 0x1c01f000, 0x59880053, 0x80000000, 0x48031053, + 0x4a03900d, 0x00000040, 0x42000000, 0xc0000000, + 0x0401f726, 0x4cf80000, 0x58f40000, 0x8001f540, + 0x0401f820, 0x41781800, 0x0401f8e7, 0x04020014, + 0x44140800, 0x0401f82a, 0x04000011, 0x40043800, + 0x42001800, 0x00000001, 0x40142000, 0x0401f8de, + 0x0402000b, 0x801c3800, 0x501c0000, 0x44000800, + 0x0401f810, 0x801c0580, 0x04000004, 0x44103800, + 0x801c3840, 0x44143800, 0x0401f819, 0x5c01f000, + 0x1c01f000, 0x80f9f1c0, 0x04020003, 0x58f41202, + 0x0401f003, 0x42001000, 0x00000007, 0x1c01f000, + 0x80f9f1c0, 0x04020006, 0x58f40401, 0x82000480, + 0x00000002, 0x80f40400, 0x0401f005, 0x58f80401, + 0x82000480, 0x00000002, 0x80f80400, 0x50002800, + 0x80000000, 0x50002000, 0x1c01f000, 0x80f9f1c0, + 0x04020008, 0x58f40401, 0x82000480, 0x00000002, + 0x02001800, 0x00100615, 0x4801ec01, 0x0401f00b, + 0x58f80401, 0x82000480, 0x00000002, 0x02001800, + 0x00100615, 0x4801f401, 0x82000580, 0x00000002, + 0x04020002, 0x0401f809, 0x58f40202, 0x80000040, + 0x4801ea02, 0x02000800, 0x00100615, 0x82000580, + 0x00000001, 0x1c01f000, 0x4d2c0000, 0x40fa5800, + 0x0201f800, 0x0010083a, 0x4979e800, 0x4179f000, + 0x5c025800, 0x1c01f000, 0x80f5e9c0, 0x04000009, + 0x80f9f1c0, 0x04020ff5, 0x4d2c0000, 0x40f65800, + 0x0201f800, 0x0010083a, 0x4179e800, 0x5c025800, + 0x1c01f000, 0x4cf40000, 0x0201f800, 0x00104728, + 0x04020036, 0x59300807, 0x82040500, 0x00003100, + 0x04020032, 0x8c040d22, 0x04000032, 0x5930001f, + 0x8001ed40, 0x02000800, 0x00100615, 0x82000580, + 0xffffffff, 0x04000029, 0x58f40201, 0x82000580, + 0x0000dcb3, 0x02020800, 0x00100615, 0x58f40a02, + 0x82040500, 0x0000fffe, 0x04000003, 0x0401ff86, + 0x58f40a02, 0x82040480, 0x0000000f, 0x04021059, + 0x80040800, 0x4805ea02, 0x82040580, 0x00000008, + 0x0400005d, 0x82040480, 0x00000008, 0x0400100a, + 0x58f40000, 0x8001ed40, 0x02000800, 0x00100615, + 0x58f40201, 0x82000580, 0x0000ddb9, 0x02020800, + 0x00100615, 0x58f40401, 0x82000c00, 0x00000002, + 0x4805ec01, 0x80f40400, 0x59300812, 0x44040000, + 0x80000000, 0x45780000, 0x5c01e800, 0x1c01f000, + 0x42001000, 0x00000400, 0x59b800e4, 0x8c000524, + 0x04020023, 0x4a0370e4, 0x00030000, 0x40000000, + 0x59b800e4, 0x8c000524, 0x0402001b, 0x59300807, + 0x84040d62, 0x48066007, 0x4a0370e4, 0x00020000, + 0x4d2c0000, 0x0201f800, 0x00100819, 0x04000025, + 0x492e601f, 0x4a025a01, 0x0000dcb3, 0x59300008, + 0x80001d40, 0x02000800, 0x00100615, 0x580c080f, + 0x48065803, 0x59301811, 0x40040000, 0x800c0580, + 0x0402000d, 0x497a5a02, 0x4a025c01, 0x00000004, + 0x0401f011, 0x4a0370e4, 0x00020000, 0x40000000, + 0x40000000, 0x80081040, 0x02000800, 0x00100615, + 0x0401f7d6, 0x4a025a02, 0x00000001, 0x4a025c01, + 0x00000006, 0x497a5804, 0x400c0000, 0x80040480, + 0x48025805, 0x412de800, 0x5c025800, 0x0401f7a9, + 0x5c025800, 0x4a02601f, 0xffffffff, 0x0401f7c3, + 0x4d2c0000, 0x58f65800, 0x0201f800, 0x0010083a, + 0x40f65800, 0x0201f800, 0x0010083a, 0x5c025800, + 0x0401f7f5, 0x4d2c0000, 0x0201f800, 0x00100819, + 0x040007f8, 0x4a025a01, 0x0000ddb9, 0x4a025c01, + 0x00000002, 0x492de800, 0x412de800, 0x5c025800, + 0x0401f7a5, 0x0401ff30, 0x82f40400, 0x00000004, + 0x800c0400, 0x40000800, 0x50040000, 0x80100580, + 0x04000016, 0x82040c00, 0x00000002, 0x80081040, + 0x040207fa, 0x80f9f1c0, 0x04000011, 0x58f41202, + 0x82081480, 0x00000007, 0x82f80400, 0x00000002, + 0x800c0400, 0x40000800, 0x50040000, 0x80100580, + 0x04000006, 0x82040c00, 0x00000002, 0x80081040, + 0x040207fa, 0x0401f002, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fd, 0x4cf40000, 0x4cf80000, + 0x4001e800, 0x592c0a06, 0x800409c0, 0x04020021, + 0x82f40580, 0xffffffff, 0x0400001b, 0x58f40201, + 0x82000580, 0x0000dcb3, 0x02020800, 0x00100615, + 0x58f40000, 0x8001f540, 0x04000006, 0x58f80201, + 0x82000580, 0x0000ddb9, 0x02020800, 0x00100615, + 0x41783800, 0x58f44003, 0x0401f83d, 0x04020009, + 0x0401ff2e, 0x497a601f, 0x59300807, 0x84040d22, + 0x48066007, 0x5c01f000, 0x5c01e800, 0x1c01f000, + 0x0401ff26, 0x4a025a06, 0x00000011, 0x0401f7f6, + 0x82f40580, 0xffffffff, 0x04020f20, 0x0401f7f2, + 0x4cf40000, 0x4cf80000, 0x4001e800, 0x82040580, + 0x00000001, 0x04020020, 0x82f40580, 0xffffffff, + 0x0400001a, 0x58f40201, 0x82000580, 0x0000dcb3, + 0x02020800, 0x00100615, 0x58f40000, 0x8001f540, + 0x04000006, 0x58f80201, 0x82000580, 0x0000ddb9, + 0x02020800, 0x00100615, 0x41783800, 0x58f44003, + 0x0401f813, 0x04020008, 0x0401ff04, 0x42000800, + 0x00000001, 0x497a601f, 0x5c01f000, 0x5c01e800, + 0x1c01f000, 0x0401fefd, 0x42000800, 0x00000011, + 0x0401f7f9, 0x4c040000, 0x82f40580, 0xffffffff, + 0x04020ef6, 0x5c000800, 0x0401f7f3, 0x4803c856, + 0x401c2000, 0x41781800, 0x4c200000, 0x0401ff86, + 0x5c004000, 0x0402002c, 0x40202000, 0x42001800, + 0x00000001, 0x0401ff80, 0x04020027, 0x0401feae, + 0x40082800, 0x82f40400, 0x00000004, 0x40003000, + 0x50182000, 0x40100000, 0x801c0580, 0x04000005, + 0x42001800, 0x00000001, 0x0401ff73, 0x0402001a, + 0x82183400, 0x00000002, 0x80142840, 0x040207f5, + 0x80f9f1c0, 0x04000013, 0x58f42a02, 0x82142c80, + 0x00000007, 0x82f80400, 0x00000003, 0x40003000, + 0x50182000, 0x40100000, 0x801c0580, 0x04000005, + 0x42001800, 0x00000001, 0x0401ff5f, 0x04020006, + 0x82183400, 0x00000002, 0x80142840, 0x040207f5, + 0x1c01f000, 0x82000540, 0x00000001, 0x0401f7fd, + 0x0201f800, 0x00100615, 0x58380207, 0x8c000502, + 0x040007fc, 0x50200000, 0x80387c00, 0x583c2800, + 0x583c2001, 0x58380404, 0x80001540, 0x04020002, + 0x58381407, 0x58c83401, 0x58380c08, 0x59303807, + 0x497a6012, 0x497a6013, 0x0201f000, 0x000200bf, + 0x592c0408, 0x8c000502, 0x040007ea, 0x592c0409, + 0x80000540, 0x040007e7, 0x82000c80, 0x00000002, + 0x04001011, 0x58380001, 0x80007540, 0x02000800, + 0x00100615, 0x58380204, 0x82000500, 0x0000000f, + 0x82000400, 0x0010110d, 0x50004000, 0x40040000, + 0x800409c0, 0x04000005, 0x82040c80, 0x00000005, + 0x040217f1, 0x80204400, 0x50200000, 0x80387c00, + 0x583c2800, 0x583c2001, 0x583c1002, 0x592c0a07, + 0x592c4c08, 0x592c300d, 0x59303807, 0x497a6012, + 0x497a6013, 0x4816600e, 0x4812600f, 0x480a6010, + 0x481a6011, 0x80040840, 0x4806600d, 0x02000000, + 0x000200c7, 0x80204000, 0x50201800, 0x800c19c0, + 0x0402000c, 0x58380001, 0x80007540, 0x02000800, + 0x00100615, 0x58380204, 0x82000500, 0x0000000f, + 0x82000400, 0x0010110d, 0x50004000, 0x50201800, + 0x483a600b, 0x480e600a, 0x4822600c, 0x0201f000, + 0x000200c7, 0x4803c856, 0x592c0208, 0x8c00051e, + 0x04020017, 0x50200000, 0x80306c00, 0x40240000, + 0x0c01f001, 0x00100e91, 0x00100e91, 0x00100e9a, + 0x00100e91, 0x00100e91, 0x00100e91, 0x00100e91, + 0x00100e91, 0x00100e9a, 0x00100e91, 0x00100e9a, + 0x00100e91, 0x00100e91, 0x00100e9a, 0x00100e91, + 0x00100e91, 0x0201f800, 0x00100615, 0x8400051e, + 0x48025a08, 0x50200000, 0x80306c00, 0x58343801, + 0x481e600f, 0x0401f007, 0x58341802, 0x58342800, + 0x58343801, 0x480e6010, 0x4816600e, 0x481e600f, + 0x0401f24b, 0x4933c857, 0x5931f808, 0x59300a06, + 0x800409c0, 0x04000005, 0x80040906, 0x04020002, + 0x80040800, 0x4805fc06, 0x4a026206, 0x00000002, + 0x592c0409, 0x82000500, 0x00000008, 0x0400000b, + 0x0401f834, 0x59300203, 0x82000580, 0x00000004, + 0x04020005, 0x42027000, 0x00000048, 0x0201f800, + 0x000208d8, 0x1c01f000, 0x4cfc0000, 0x58fc0204, + 0x82000500, 0x000000ff, 0x82000580, 0x00000048, + 0x0402000c, 0x58fc000b, 0x800001c0, 0x04000009, + 0x58fc0407, 0x800001c0, 0x04000006, 0x58fc080b, + 0x8c040d16, 0x04000017, 0x58fc0007, 0x0401f00a, + 0x58fc0408, 0x8c000512, 0x04020014, 0x58fc0c09, + 0x8c040d16, 0x04020003, 0x5c01f800, 0x1c01f000, + 0x58fc000a, 0x59300811, 0x80040580, 0x04020009, + 0x59300007, 0x84000500, 0x48026007, 0x42027000, + 0x00000048, 0x5c01f800, 0x0201f000, 0x000208d8, + 0x5c01f800, 0x1c01f000, 0x58fdf809, 0x0401f7ec, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4933c857, + 0x59b808ea, 0x82040d00, 0x00000007, 0x82040580, + 0x00000000, 0x0400001e, 0x82040580, 0x00000003, + 0x0400001b, 0x59300406, 0x4c000000, 0x4a026406, + 0x00000000, 0x42003000, 0x00000041, 0x42000000, + 0x50000000, 0x41300800, 0x4c180000, 0x0401fce3, + 0x5c003000, 0x0400000b, 0x42000000, 0x0000001e, + 0x80000040, 0x040207ff, 0x80183040, 0x040207f4, + 0x42000000, 0x40000000, 0x41300800, 0x0401fcd7, + 0x5c000000, 0x48026406, 0x1c01f000, 0x59300007, + 0x84000500, 0x48026007, 0x0401f7fc, 0x59c00007, + 0x4a038006, 0x30000000, 0x40000000, 0x59c00007, + 0x8c00050a, 0x040207fe, 0x1c01f000, 0x5c000000, + 0x4c000000, 0x4803c857, 0x4dc00000, 0x4a0370e8, + 0x00000000, 0x42038000, 0x00007720, 0x0401fff0, + 0x42038000, 0x00007700, 0x0401ffed, 0x0201f800, + 0x00104e0d, 0x04020013, 0x4a038891, 0x0000ffff, + 0x497b8880, 0x497b8892, 0x42001000, 0x00000190, + 0x40000000, 0x40000000, 0x80081040, 0x040207fd, + 0x42000000, 0x0010b6a5, 0x0201f800, 0x0010a86e, + 0x0401f80e, 0x5c038000, 0x0201f000, 0x00104f29, + 0x0401f82d, 0x42000000, 0x0010b6a6, 0x0201f800, + 0x0010a86e, 0x0401f805, 0x48178892, 0x480b8880, + 0x5c038000, 0x1c01f000, 0x496fc857, 0x836c0580, + 0x00000003, 0x0402000b, 0x4c080000, 0x4c0c0000, + 0x42001000, 0x00008048, 0x42001800, 0x0000ffff, + 0x0201f800, 0x00103857, 0x5c001800, 0x5c001000, + 0x42000800, 0x0000003c, 0x0201f800, 0x00101395, + 0x59a8006c, 0x80000540, 0x04000006, 0x59a8106d, + 0x800811c0, 0x04000003, 0x0201f800, 0x00101b0a, + 0x4a038891, 0x0000ffff, 0x4a03900d, 0x00000040, + 0x0201f800, 0x001009db, 0x4a0370e8, 0x00000001, + 0x1c01f000, 0x5c000000, 0x4c000000, 0x4803c857, + 0x59c41080, 0x497b8880, 0x59c42892, 0x497b8892, + 0x0201f800, 0x00104e0d, 0x04020002, 0x1c01f000, + 0x42002000, 0x00000260, 0x59c418a4, 0x820c1d00, + 0x0000000f, 0x820c0580, 0x00000000, 0x04000010, + 0x59c41805, 0x820c1d00, 0x00000001, 0x0402000e, + 0x59c418a4, 0x820c1d00, 0x0000000f, 0x820c0480, + 0x00000007, 0x04001004, 0x820c0480, 0x0000000c, + 0x04001003, 0x80102040, 0x040207ec, 0x497b8891, + 0x1c01f000, 0x4c100000, 0x42002000, 0x00000019, + 0x46000000, 0x00000001, 0x0201f800, 0x001019a4, + 0x50001800, 0x820c1d00, 0x00000001, 0x04000005, + 0x80102040, 0x040207f7, 0x5c002000, 0x0401f7f0, + 0x5c002000, 0x0401f7ec, 0x4803c856, 0x1c01f000, + 0x4d2c0000, 0x59325808, 0x592c0a04, 0x4807c857, + 0x82040d00, 0x000000ff, 0x82040500, 0x0000000f, + 0x0c01f001, 0x00100fb5, 0x00100fb5, 0x00100fb5, + 0x00100fcd, 0x00100fb5, 0x00100fb5, 0x00100fb5, + 0x00100fb5, 0x00100fb5, 0x00100fcd, 0x00100fb5, + 0x00100fb7, 0x00100fb5, 0x00100fb5, 0x00100fb5, + 0x00100fb5, 0x0201f800, 0x00100615, 0x82040580, + 0x0000003b, 0x02020800, 0x00100615, 0x592c020a, + 0x8c000500, 0x0400005f, 0x592c1a07, 0x82040500, + 0x0000000f, 0x82000400, 0x0010110d, 0x50001000, + 0x50080000, 0x59302013, 0x4802600a, 0x492e600b, + 0x480a600c, 0x480e600d, 0x48126012, 0x5c025800, + 0x1c01f000, 0x82040500, 0x0000000f, 0x82000400, + 0x0010110d, 0x50001000, 0x50080000, 0x592c1a07, + 0x4802600a, 0x492e600b, 0x480a600c, 0x480e600d, + 0x497a6012, 0x0401f7f2, 0x8c040d00, 0x04020041, + 0x82040d00, 0x00000080, 0x0400003e, 0x0201f000, + 0x000200d0, 0x59300013, 0x59301012, 0x80080580, + 0x0402000c, 0x42007800, 0x80000005, 0x592c1208, + 0x82080500, 0xffff7fff, 0x48025a08, 0x8c08151e, + 0x0402002d, 0x823c7d40, 0x00000020, 0x0401f02a, + 0x480bc857, 0x42000000, 0x0010b64f, 0x0201f800, + 0x0010a86e, 0x59300414, 0x4803c857, 0x8c000514, + 0x04020007, 0x599c1819, 0x8c0c1d12, 0x04020004, + 0x820c1d40, 0x00000001, 0x0401f01d, 0x59302013, + 0x0401f92d, 0x0402001a, 0x42007800, 0x80000005, + 0x5930500d, 0x592c0208, 0x4803c857, 0x8c00051e, + 0x04020005, 0x823c7d40, 0x00000020, 0x5930400c, + 0x0401f004, 0x8400051e, 0x48025a08, 0x0401f8dc, + 0x50201800, 0x480e600a, 0x4832600b, 0x4822600c, + 0x482a600d, 0x480fc857, 0x4833c857, 0x4823c857, + 0x482bc857, 0x80000580, 0x483e6004, 0x1c01f000, + 0x0201f800, 0x00100615, 0x4933c857, 0x4d2c0000, + 0x59900004, 0x81300580, 0x02020800, 0x00100615, + 0x0201f800, 0x00108df4, 0x02000800, 0x00100615, + 0x59325808, 0x4d3c0000, 0x4d400000, 0x59300004, + 0x4803c857, 0x4c000000, 0x0201f800, 0x00106b13, + 0x0201f800, 0x001068c1, 0x5c000000, 0x8c000516, + 0x04000010, 0x592c000f, 0x4803c857, 0x48025807, + 0x41780800, 0x42028000, 0x00000002, 0x0201f800, + 0x00104bee, 0x4a025c06, 0x0000ffff, 0x0201f800, + 0x00020381, 0x0201f800, 0x00107698, 0x0401f015, + 0x4a026203, 0x00000002, 0x592c0208, 0x8400054e, + 0x48025a08, 0x59300406, 0x82000580, 0x00000006, + 0x04020009, 0x811800ca, 0x81c80c00, 0x58040939, + 0x592c000d, 0x80040480, 0x592c080f, 0x80040480, + 0x4802580b, 0x417a7800, 0x0201f800, 0x00108997, + 0x5c028000, 0x5c027800, 0x5c025800, 0x1c01f000, + 0x4933c857, 0x4d2c0000, 0x59900004, 0x81300580, + 0x02020800, 0x00100615, 0x0201f800, 0x00108df4, + 0x02000800, 0x00100615, 0x59325808, 0x592c0208, + 0x84000540, 0x48025a08, 0x0401f7bf, 0x491bc857, + 0x49d3c857, 0x4dd00000, 0x41780800, 0x8007a0ca, + 0x83d3a400, 0x00007600, 0x4a03a005, 0x80000002, + 0x42000000, 0x00001000, 0x50000000, 0x82000480, + 0x24220001, 0x04020029, 0x59d01006, 0x82080500, + 0x00006000, 0x82000580, 0x00006000, 0x04000031, + 0x82080500, 0x40008000, 0x040007f8, 0x800409c0, + 0x0402002c, 0x811a31c0, 0x0400002a, 0x42000000, + 0x00001002, 0x50001000, 0x46000000, 0x00000512, + 0x42001800, 0x0000000a, 0x59e00000, 0x8c00051a, + 0x040207fc, 0x800c1840, 0x040207fc, 0x42000000, + 0x00001002, 0x46000000, 0x00000514, 0x42001800, + 0x0000000a, 0x59e00000, 0x8c00053a, 0x040207fc, + 0x800c1840, 0x040207fc, 0x42000000, 0x00001002, + 0x44080000, 0x0401f00f, 0x02004800, 0x000207c8, + 0x59d01006, 0x82080500, 0x00006000, 0x82000580, + 0x00006000, 0x04000007, 0x8c08151e, 0x040007f7, + 0x59d01006, 0x82080500, 0x00006000, 0x040207f3, + 0x83d3a400, 0x00000020, 0x80040800, 0x82040480, + 0x00000005, 0x040017bd, 0x5c03a000, 0x1c01f000, + 0x491bc857, 0x49d3c857, 0x4dd00000, 0x41780800, + 0x8007a0ca, 0x83d3a400, 0x00007600, 0x4a03a005, + 0x80000001, 0x59d00006, 0x83d3a400, 0x00000020, + 0x80040800, 0x82040480, 0x00000005, 0x040017f8, + 0x5c03a000, 0x1c01f000, 0x59d00006, 0x8c00053e, + 0x0400001e, 0x59902804, 0x4817c857, 0x801429c0, + 0x04000013, 0x5990000a, 0x5990080b, 0x5990100c, + 0x5990180d, 0x4800280a, 0x4804280b, 0x4808280c, + 0x480c280d, 0x59d00000, 0x59d00801, 0x59d01002, + 0x59d01803, 0x59d02004, 0x4800280e, 0x4804280f, + 0x48082810, 0x480c2811, 0x48102812, 0x59900006, + 0x82000500, 0xffff0000, 0x48032006, 0x4a03a005, + 0x30000000, 0x59d00006, 0x1c01f000, 0x4803c856, + 0x80204000, 0x50200000, 0x80000540, 0x04000003, + 0x80285040, 0x1c01f000, 0x58300001, 0x80000540, + 0x0400000e, 0x4802600b, 0x40006000, 0x58300204, + 0x82000500, 0x0000000f, 0x82000400, 0x0010110d, + 0x50004000, 0x802041c0, 0x02000800, 0x00100615, + 0x80285040, 0x1c01f000, 0x40005000, 0x1c01f000, + 0x00000005, 0x00000008, 0x0000000b, 0x0000000e, + 0x00000011, 0x00000000, 0x00000000, 0x0000000b, + 0x00000000, 0x00000000, 0x00000000, 0x00101108, + 0x00101107, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00101108, 0x00101107, 0x00101104, + 0x00101108, 0x00101107, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00101108, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00101108, 0x00101108, 0x00101108, + 0x00000000, 0x00101108, 0x00000000, 0x00000000, + 0x00000000, 0x4813c857, 0x492fc857, 0x4933c857, + 0x48126012, 0x592c5207, 0x802851c0, 0x0400004a, + 0x412c6000, 0x0401f84b, 0x04000009, 0x82240580, + 0x00000002, 0x04020003, 0x5830000d, 0x80102480, + 0x50200000, 0x80004540, 0x0400003f, 0x50200000, + 0x80000540, 0x0400000b, 0x80301400, 0x58080002, + 0x80102480, 0x0400101e, 0x801021c0, 0x04000009, + 0x80285040, 0x04000034, 0x80204000, 0x0401f7f4, + 0x58300001, 0x80006540, 0x0400002f, 0x0401f7e6, + 0x80285040, 0x0400002c, 0x80204000, 0x50200000, + 0x80000540, 0x0402000a, 0x58300001, 0x80006540, + 0x04000025, 0x58300204, 0x82004d00, 0x0000000f, + 0x82244400, 0x0010110d, 0x50204000, 0x592c0208, + 0x8400051e, 0x48025a08, 0x0401f013, 0x80102080, + 0x80102000, 0x48126010, 0x4813c857, 0x58080802, + 0x40100000, 0x80042480, 0x02001800, 0x00100615, + 0x58080000, 0x58081801, 0x80102400, 0x4812600e, + 0x480e600f, 0x4813c857, 0x592c0208, 0x8400055e, + 0x48025a08, 0x4833c857, 0x4823c857, 0x482bc857, + 0x4832600b, 0x4822600c, 0x482a600d, 0x80000580, + 0x0401f003, 0x82000540, 0x00000001, 0x1c01f000, + 0x58300204, 0x82004d00, 0x0000000f, 0x82244400, + 0x0010110d, 0x82000500, 0x000000ff, 0x82000580, + 0x00000029, 0x0402001b, 0x50204000, 0x592c0409, + 0x80000540, 0x02000800, 0x00100615, 0x82000c80, + 0x00000002, 0x04001011, 0x58300001, 0x80006540, + 0x02000800, 0x00100615, 0x58300204, 0x82000500, + 0x0000000f, 0x82000400, 0x0010110d, 0x50004000, + 0x40040000, 0x800409c0, 0x04000006, 0x82040c80, + 0x00000005, 0x040217f1, 0x80204400, 0x80000580, + 0x1c01f000, 0x59e00004, 0x8c00050e, 0x02020000, + 0x00100951, 0x1c01f000, 0x4c5c0000, 0x59e4b800, + 0x485fc857, 0x825c0500, 0x0000001f, 0x04000004, + 0x59e40862, 0x0201f800, 0x00100615, 0x825c0500, + 0x000000e0, 0x02000800, 0x00100615, 0x8c5cbd0e, + 0x04020807, 0x8c5cbd0c, 0x04020809, 0x8c5cbd0a, + 0x04020878, 0x5c00b800, 0x1c01f000, 0x4803c856, + 0x4a03c800, 0x00000080, 0x1c01f000, 0x4d2c0000, + 0x42007800, 0x0010b6eb, 0x583c0001, 0x583c0802, + 0x80040540, 0x0400003f, 0x42000800, 0x0010b5f5, + 0x50065800, 0x592c0002, 0x82000580, 0x00000000, + 0x0400000e, 0x59e40850, 0x59e41853, 0x400c0000, + 0x80040400, 0x59e40852, 0x4807c857, 0x80041480, + 0x04021008, 0x40001000, 0x480bc857, 0x4a007800, + 0x00000001, 0x0401f006, 0x4803c857, 0x0401f029, + 0x59e41050, 0x480bc857, 0x49787800, 0x480bc857, + 0x480fc857, 0x592c0003, 0x80000540, 0x04000006, + 0x80080580, 0x04020004, 0x592c0003, 0x4803c857, + 0x480bc857, 0x480a5803, 0x592c0007, 0x800001c0, + 0x04000007, 0x592c1007, 0x480bc857, 0x583c0003, + 0x4803c857, 0x80080480, 0x04001003, 0x583c1001, + 0x480bc857, 0x583c0802, 0x480bc857, 0x4807c857, + 0x4a025801, 0x00000000, 0x4a025809, 0x0010120c, + 0x480a5807, 0x48065808, 0x59e40053, 0x48025804, + 0x412c1000, 0x492fc857, 0x0201f800, 0x001008a1, + 0x5c025800, 0x4a03c800, 0x00000040, 0x1c01f000, + 0x42007800, 0x0010b5f5, 0x503c7800, 0x4a007802, + 0x00000100, 0x42007800, 0x0010b6eb, 0x583c0000, + 0x4803c857, 0x82000d80, 0x00000001, 0x04000004, + 0x80000000, 0x48007800, 0x0401f019, 0x49787800, + 0x583c1806, 0x583c0005, 0x800c1800, 0x480c7806, + 0x800c0580, 0x04020002, 0x49787806, 0x583c0807, + 0x800409c0, 0x0400000e, 0x583c0008, 0x80000000, + 0x48007808, 0x80040580, 0x04020009, 0x49787808, + 0x583c2006, 0x42001800, 0x00000001, 0x42001000, + 0x00008028, 0x0201f800, 0x00103857, 0x1c01f000, + 0x4a03c800, 0x00000020, 0x0201f800, 0x0010a867, + 0x59e40000, 0x1c01f000, 0x4d2c0000, 0x4a007001, + 0x00000000, 0x82040d00, 0x43000f80, 0x02020800, + 0x00100615, 0x58380009, 0x4803c00f, 0x0201f800, + 0x001091cb, 0x583a5808, 0x592c0000, 0x48007008, + 0x800001c0, 0x04020002, 0x49787007, 0x0201f800, + 0x0010083a, 0x5c025800, 0x0201f000, 0x001008c6, + 0x4803c856, 0x4c3c0000, 0x4d2c0000, 0x4d300000, + 0x5830000a, 0x80025d40, 0x02000800, 0x00100615, + 0x592e6008, 0x4c300000, 0x0201f800, 0x001091e3, + 0x5c006000, 0x02000800, 0x00100615, 0x58300002, + 0x82000580, 0x00000100, 0x04020010, 0x5930780b, + 0x583c0001, 0x80000540, 0x0400000e, 0x4802600b, + 0x40007800, 0x82000400, 0x00000002, 0x48006003, + 0x583c0000, 0x48006004, 0x40301000, 0x0201f800, + 0x001008a1, 0x0401f00c, 0x4a025a06, 0x00000002, + 0x4c300000, 0x0201f800, 0x00020381, 0x5c006000, + 0x40325800, 0x0201f800, 0x0010083a, 0x0201f800, + 0x000208b4, 0x5c026000, 0x5c025800, 0x5c007800, + 0x1c01f000, 0x4803c856, 0x4d2c0000, 0x4d300000, + 0x42007000, 0x0010b5f6, 0x58380801, 0x82040580, + 0x00000002, 0x04020011, 0x58386002, 0x5830000a, + 0x812c0580, 0x0402000d, 0x59e00004, 0x8c00050e, + 0x040007fe, 0x59dc0006, 0x4803c857, 0x4a03b805, + 0x20000000, 0x8c00053e, 0x040007f8, 0x4a007001, + 0x00000000, 0x0401f019, 0x58386006, 0x40305000, + 0x803061c0, 0x02000800, 0x00100615, 0x5830000a, + 0x812c0580, 0x04000004, 0x40305000, 0x58306000, + 0x0401f7f8, 0x40280000, 0x80300580, 0x58300000, + 0x04000006, 0x48005000, 0x800001c0, 0x04020007, + 0x48287005, 0x0401f005, 0x800001c0, 0x04020002, + 0x48007005, 0x48007006, 0x40325800, 0x0201f800, + 0x0010083a, 0x42007000, 0x0010b5f6, 0x58380001, + 0x82000580, 0x00000000, 0x02000800, 0x001008c6, + 0x5c026000, 0x5c025800, 0x1c01f000, 0x4803c856, + 0x42000800, 0x0000003c, 0x48079000, 0x59c80000, + 0x80040500, 0x040207fe, 0x497b9005, 0x4a039035, + 0x00880200, 0x59a8000e, 0x800000e0, 0x4803900e, + 0x4a039011, 0x00000024, 0x4a03900f, 0x0010cfc0, + 0x4a039010, 0x0010cfc0, 0x4a039015, 0x0000007f, + 0x4a03900d, 0x00000040, 0x4a039000, 0x00001600, + 0x1c01f000, 0x59c80007, 0x8c000508, 0x040208b7, + 0x59c80800, 0x8c040d16, 0x04020004, 0x82000500, + 0x00000006, 0x0c01f005, 0x4807c857, 0x82000500, + 0x0000000e, 0x0c01f001, 0x001012f8, 0x001012f6, + 0x0010567d, 0x001012f6, 0x001012fa, 0x001012f6, + 0x001012fa, 0x001012fa, 0x001012f6, 0x001012f6, + 0x001012f6, 0x001012f6, 0x001012fa, 0x001012f6, + 0x001012fa, 0x001012f6, 0x0201f800, 0x00100615, + 0x4803c857, 0x1c01f000, 0x59c8080c, 0x4807c857, + 0x82040500, 0x00006000, 0x04000004, 0x0201f800, + 0x0010a82a, 0x0401f006, 0x82040500, 0x007f0000, + 0x04000006, 0x0201f800, 0x0010a7fc, 0x0201f800, + 0x00106c07, 0x0401f02b, 0x82040500, 0x00000014, + 0x04000014, 0x0201f800, 0x0010a859, 0x836c0580, + 0x00000003, 0x0400000d, 0x0201f800, 0x00104e0d, + 0x04000004, 0x0201f800, 0x00103f37, 0x0401f007, + 0x4a035033, 0x00000001, 0x4202d800, 0x00000001, + 0x0201f800, 0x00104d76, 0x0401f817, 0x0401f015, + 0x82040500, 0x00001c00, 0x04000005, 0x0201f800, + 0x0010a838, 0x0401f810, 0x0401f00e, 0x82040500, + 0x00000140, 0x04000005, 0x0201f800, 0x0010a84b, + 0x0401f809, 0x0401f007, 0x82040500, 0x00008000, + 0x04000004, 0x0201f800, 0x0010a823, 0x0401f802, + 0x1c01f000, 0x4c0c0000, 0x4c100000, 0x4c140000, + 0x0201f800, 0x00100f17, 0x5c002800, 0x5c002000, + 0x5c001800, 0x1c01f000, 0x4803c856, 0x59a80804, + 0x59a8002b, 0x82000500, 0xfffff000, 0x80040540, + 0x4803502b, 0x59a8002f, 0x82000500, 0xfffff000, + 0x80040540, 0x4803502f, 0x48078882, 0x82041c00, + 0x0000000f, 0x800c1908, 0x820c1c00, 0x00000004, + 0x400c2000, 0x901029c0, 0x82040480, 0x000001e4, + 0x04021005, 0x42001000, 0x00000008, 0x801020c6, + 0x0401f031, 0x82040480, 0x00000230, 0x04021009, + 0x42001000, 0x00000007, 0x801000c2, 0x800000c2, + 0x80100400, 0x80100400, 0x80102400, 0x0401f026, + 0x82040480, 0x00000298, 0x04021008, 0x42001000, + 0x00000006, 0x801000c2, 0x800000c2, 0x80100400, + 0x80102400, 0x0401f01c, 0x82040480, 0x00000328, + 0x04021007, 0x42001000, 0x00000005, 0x801000c2, + 0x800000c2, 0x80102400, 0x0401f013, 0x82040480, + 0x00000404, 0x04021005, 0x42001000, 0x00000004, + 0x801020c4, 0x0401f00c, 0x82040480, 0x0000056c, + 0x04021006, 0x42001000, 0x00000003, 0x801000c2, + 0x80102400, 0x0401f004, 0x42001000, 0x00000002, + 0x801020c2, 0x82100480, 0x00000110, 0x80000080, + 0x80002000, 0x800800d0, 0x80140540, 0x80100540, + 0x48039035, 0x1c01f000, 0x59c80815, 0x0201f800, + 0x0010060d, 0x82040d00, 0x0000007c, 0x48079000, + 0x59c80000, 0x80040500, 0x040207fe, 0x8c040d04, + 0x04000003, 0x59c80035, 0x48039035, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x1c01f000, + 0x4803c856, 0x497b88a9, 0x4a038807, 0x00000001, + 0x497b8807, 0x59c40005, 0x48038805, 0x0201f800, + 0x00101886, 0x4201d000, 0x000001f4, 0x0201f800, + 0x00105dd2, 0x497b880e, 0x4200b000, 0x000001f4, + 0x42000000, 0x00000001, 0x42000800, 0x00000014, + 0x0201f800, 0x001019b1, 0x42000800, 0x00000014, + 0x0201f800, 0x001019ac, 0x8c040d00, 0x04000005, + 0x8058b040, 0x040207f3, 0x0201f800, 0x00100615, + 0x4200b000, 0x00000032, 0x42000000, 0x00000001, + 0x42000800, 0x000000b4, 0x0201f800, 0x001019b1, + 0x42000800, 0x000000b4, 0x0201f800, 0x001019ac, + 0x8c040d00, 0x04000005, 0x8058b040, 0x040207f3, + 0x0201f800, 0x00100615, 0x59c40005, 0x48038805, + 0x42000000, 0x00000089, 0x800008d0, 0x48075054, + 0x48075055, 0x48075056, 0x42000800, 0x000000e0, + 0x0201f800, 0x001019b1, 0x42000800, 0x000000f4, + 0x0201f800, 0x001019ac, 0x82040500, 0xffffffd1, + 0x82000540, 0x00000002, 0x42000800, 0x000000f4, + 0x0201f800, 0x001019b1, 0x42000800, 0x000000a0, + 0x0201f800, 0x001019ac, 0x82040540, 0x00000001, + 0x42000800, 0x000000a0, 0x0201f800, 0x001019b1, + 0x42000800, 0x00000000, 0x0201f800, 0x001019ac, + 0x82040540, 0x00000001, 0x42000800, 0x00000000, + 0x0201f800, 0x001019b1, 0x4201d000, 0x0001d4c0, + 0x0201f800, 0x00105dd2, 0x0401fa45, 0x4a0388a7, + 0x0000f7f7, 0x4a0388a3, 0x8000403c, 0x4a0388ae, + 0x000061a8, 0x4a038801, 0x00032063, 0x4a038810, + 0x00410108, 0x4a038811, 0x00520608, 0x4a038812, + 0x00450320, 0x4a038813, 0x00440405, 0x4a03881c, + 0x004132e1, 0x4a038850, 0x80000108, 0x4a038860, + 0x00000008, 0x4a038870, 0x00000008, 0x4a038851, + 0x80000508, 0x4a038861, 0x00800000, 0x4a038871, + 0x00800000, 0x4a038852, 0x80000708, 0x4a038862, + 0x00800000, 0x4a038872, 0x00800000, 0x4a038853, + 0x80000608, 0x497b8863, 0x4a038873, 0x00800000, + 0x4a038882, 0x00000840, 0x4a0388a5, 0x0000001e, + 0x4a0388a6, 0x0000001e, 0x4a0388b0, 0x00007530, + 0x4a038802, 0x0000ffff, 0x4a038806, 0xc0e00800, + 0x1c01f000, 0x497b5022, 0x4a035021, 0x00000001, + 0x42000800, 0x00000040, 0x0201f800, 0x001019ac, + 0x82040500, 0xffffffaf, 0x82000540, 0x00000000, + 0x42000800, 0x00000040, 0x0201f800, 0x001019b1, + 0x42000800, 0x000000f4, 0x0201f800, 0x001019ac, + 0x4c040000, 0x40040000, 0x84000548, 0x42000800, + 0x000000f4, 0x0201f800, 0x001019b1, 0x42000800, + 0x00000000, 0x0201f800, 0x001019ac, 0x82040500, + 0xffffffc1, 0x82000540, 0x00000038, 0x42000800, + 0x00000000, 0x0201f800, 0x001019b1, 0x5c000000, + 0x42000800, 0x000000f4, 0x0201f000, 0x001019b1, + 0x59c40805, 0x59c40006, 0x80040d00, 0x02000800, + 0x00100615, 0x82040500, 0x00e00800, 0x04020004, + 0x8c040d3e, 0x040208df, 0x0401f007, 0x82040500, + 0x00800800, 0x02020800, 0x0010060d, 0x0201f800, + 0x00100615, 0x4c5c0000, 0x4c600000, 0x59c4b805, + 0x59c40006, 0x8c000500, 0x04000003, 0x8c5cbd00, + 0x04020095, 0x485fc857, 0x0201f800, 0x00104e0d, + 0x0400001e, 0x59c40005, 0x82000500, 0x000000c0, + 0x0400004b, 0x0201f800, 0x00104e23, 0x04020048, + 0x59c40006, 0x82000500, 0x000000f0, 0x04020004, + 0x4a038805, 0x000000c0, 0x0401f041, 0x59a80015, + 0x84000506, 0x48035015, 0x42006000, 0xff203fff, + 0x42006800, 0x40000000, 0x0201f800, 0x001040ad, + 0x42000800, 0x00000010, 0x42001000, 0x00104020, + 0x0201f800, 0x00105dc7, 0x8c5cbd34, 0x04020030, + 0x4a035032, 0x0000aaaa, 0x59c40005, 0x8c00050c, + 0x04020012, 0x8c00050e, 0x0402001c, 0x8c00050a, + 0x0402001d, 0x8c000508, 0x0400000b, 0x59a80017, + 0x82000580, 0x00000009, 0x04020007, 0x42000000, + 0x0010b642, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x00104fe9, 0x0401f05a, 0x0201f800, 0x00104e23, + 0x04020007, 0x42000800, 0x0000000f, 0x42001000, + 0x00103f37, 0x0201f800, 0x00105da7, 0x4a035033, + 0x00000000, 0x0401f00b, 0x4a035033, 0x00000002, + 0x0401f008, 0x42000000, 0x0010b644, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00104f93, 0x0401f044, + 0x0201f800, 0x00105049, 0x0401f041, 0x8c5cbd34, + 0x0400003d, 0x59c40005, 0x8c00053a, 0x04020005, + 0x42000000, 0x0010b616, 0x0201f800, 0x0010a86e, + 0x4a038805, 0x02000000, 0x0201f800, 0x00104e0d, + 0x04020010, 0x4a038805, 0x04000000, 0x0201f800, + 0x00104e1b, 0x04020008, 0x4a035033, 0x00000001, + 0x4202d800, 0x00000001, 0x0201f800, 0x00104d76, + 0x0401f061, 0x41780000, 0x0201f800, 0x00104de5, + 0x0201f800, 0x00101a59, 0x4000c000, 0x0201f800, + 0x001019d0, 0x836c1580, 0x00000004, 0x0402000d, + 0x8c5cbd00, 0x04020018, 0x59a81005, 0x8c081506, + 0x04020005, 0x59c410a3, 0x82081540, 0x00000008, + 0x480b88a3, 0x59c41006, 0x84081540, 0x480b8806, + 0x4a038805, 0x04000000, 0x4202d800, 0x00000001, + 0x497b5014, 0x59a80005, 0x8c000518, 0x04020004, + 0x0401f95c, 0x0201f800, 0x00103f5c, 0x0201f800, + 0x00103951, 0x8c5cbd3c, 0x04020858, 0x8c5cbd00, + 0x04000036, 0x42000000, 0x0010b6c9, 0x0201f800, + 0x0010a86e, 0x4a038805, 0x00000001, 0x4200b000, + 0x00000352, 0x4201d000, 0x00000064, 0x4c580000, + 0x0201f800, 0x00105dd2, 0x0201f800, 0x00101941, + 0x5c00b000, 0x04000004, 0x8058b040, 0x040207f6, + 0x0401f004, 0x4a038805, 0x00000001, 0x0401f01f, + 0x59c40006, 0x84000500, 0x48038806, 0x0201f800, + 0x00106c32, 0x497b8880, 0x0201f800, 0x0010a7e7, + 0x59c4000d, 0x8c000500, 0x02020800, 0x0010a7f5, + 0x59c400a3, 0x82000500, 0xfcf8ffff, 0x480388a3, + 0x4a03504c, 0x00000002, 0x4202d800, 0x00000004, + 0x4a038805, 0x00000001, 0x0201f800, 0x0010071a, + 0x0401fb42, 0x497b5052, 0x4a035049, 0x00000001, + 0x0201f800, 0x0010048c, 0x825cbd00, 0xbbfffffe, + 0x485f8805, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x59c41004, 0x480bc857, 0x8c081500, 0x04000006, + 0x4803c856, 0x497b2807, 0x0201f800, 0x00106cf9, + 0x0401f00a, 0x82080500, 0x000001f0, 0x04000007, + 0x4803c856, 0x417a3000, 0x0201f800, 0x00105d9b, + 0x0201f800, 0x00106d1b, 0x4a038805, 0x80000000, + 0x1c01f000, 0x59c408a3, 0x4807c857, 0x84040d40, + 0x480788a3, 0x1c01f000, 0x4d900000, 0x4dd00000, + 0x4da40000, 0x4d140000, 0x4a038805, 0x40000000, + 0x42000000, 0x0010b6c5, 0x0201f800, 0x0010a86e, + 0x0201f800, 0x0010698c, 0x59c41004, 0x8c081500, + 0x04000054, 0x598e600d, 0x497b2807, 0x813261c0, + 0x04000032, 0x59300403, 0x82000580, 0x00000032, + 0x0402002e, 0x5930001c, 0x48038833, 0x4a038807, + 0x00018000, 0x4201d000, 0x00000002, 0x0201f800, + 0x00105dd2, 0x497b8807, 0x4201d000, 0x00000002, + 0x0201f800, 0x00105dd2, 0x0201f800, 0x00106b71, + 0x4201d000, 0x00007530, 0x0201f800, 0x00105dd2, + 0x59c408a4, 0x82040d00, 0x0000000f, 0x82040d80, + 0x00000000, 0x04000005, 0x42000000, 0x00200000, + 0x0201f800, 0x001019b6, 0x0201f800, 0x001068f6, + 0x59300008, 0x80000540, 0x02000800, 0x00100615, + 0x40025800, 0x4a025a04, 0x00000103, 0x5931d821, + 0x58ef400b, 0x58ec0009, 0x0801f800, 0x0201f800, + 0x000208b4, 0x0401f047, 0x598c000f, 0x82001c80, + 0x000000c8, 0x0402100f, 0x80000000, 0x4803180f, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000580, + 0x00000002, 0x04020004, 0x42000000, 0x00200000, + 0x0401fbfa, 0x0201f800, 0x00105d86, 0x0401f035, + 0x4933c857, 0x0201f800, 0x00106b71, 0x813261c0, + 0x04000030, 0x4a026203, 0x00000001, 0x42027000, + 0x00000027, 0x0201f800, 0x000208d8, 0x0401f029, + 0x8c081508, 0x04000027, 0x417a3000, 0x0201f800, + 0x00106e2f, 0x42032000, 0x0000bf32, 0x0201f800, + 0x00105d9b, 0x59926004, 0x813261c0, 0x04000012, + 0x42001800, 0x000000c8, 0x0201f800, 0x00106dfb, + 0x0402000d, 0x59c400a4, 0x82000500, 0x0000000f, + 0x82000580, 0x00000002, 0x04020004, 0x42000000, + 0x00200000, 0x0401fbd1, 0x0201f800, 0x00105d8b, + 0x0401f00c, 0x4933c857, 0x0201f800, 0x00106b13, + 0x813261c0, 0x04000007, 0x42027000, 0x0000004f, + 0x4a026203, 0x00000003, 0x0201f800, 0x000208d8, + 0x5c022800, 0x5c034800, 0x5c03a000, 0x5c032000, + 0x0201f000, 0x00106982, 0x4803c857, 0x59a80821, + 0x48035021, 0x80041580, 0x04000045, 0x800409c0, + 0x04000023, 0x497b504c, 0x42000000, 0x0010b60b, + 0x0201f800, 0x0010a86e, 0x0201f800, 0x0010a920, + 0x42001000, 0x00008011, 0x59c40001, 0x82000500, + 0x00018000, 0x82001d80, 0x00000000, 0x04000009, + 0x82001d80, 0x00008000, 0x04000009, 0x82001d80, + 0x00010000, 0x04000009, 0x0201f800, 0x00100615, + 0x42001800, 0x00000000, 0x0401f006, 0x42001800, + 0x00000001, 0x0401f003, 0x42001800, 0x00000003, + 0x0201f800, 0x00103857, 0x0401f021, 0x59a8084c, + 0x800409c0, 0x04020007, 0x59c4000d, 0x8c000520, + 0x04000004, 0x42001800, 0x00000003, 0x0401f002, + 0x40041800, 0x0201f800, 0x0010a904, 0x42001000, + 0x00008012, 0x0201f800, 0x00103857, 0x0201f800, + 0x0010071a, 0x0201f800, 0x0010a95a, 0x0402000c, + 0x0401f853, 0x4d400000, 0x4d3c0000, 0x42028000, + 0x00000028, 0x42027800, 0x00000008, 0x0201f800, + 0x00101d90, 0x5c027800, 0x5c028000, 0x1c01f000, + 0x4803c857, 0x82000400, 0x00101eb5, 0x50000800, + 0x82040d00, 0x000000ff, 0x1c01f000, 0x4803c856, + 0x4c580000, 0x4200b000, 0x00000010, 0x497b88ac, + 0x497b88ad, 0x8058b040, 0x040207fe, 0x5c00b000, + 0x1c01f000, 0x4807c857, 0x48075010, 0x80041108, + 0x4200b000, 0x00000010, 0x497b88ac, 0x80000580, + 0x800811c0, 0x04020006, 0x82040500, 0x0000000f, + 0x82000400, 0x0010a95f, 0x50000000, 0x480388ad, + 0x80081040, 0x8058b040, 0x040207f5, 0x1c01f000, + 0x59a80005, 0x04000003, 0x84000546, 0x0401f002, + 0x84000506, 0x48035005, 0x4803c857, 0x1c01f000, + 0x4803c857, 0x4c080000, 0x4c040000, 0x4c000000, + 0x59c40892, 0x4807c857, 0x80041580, 0x04000010, + 0x80041480, 0x04021007, 0x80081080, 0x80081000, + 0x4008b000, 0x42000000, 0x00000201, 0x0401f004, + 0x4008b000, 0x42000000, 0x00000210, 0x48038886, + 0x8058b040, 0x040207fe, 0x497b8886, 0x5c000000, + 0x5c000800, 0x5c001000, 0x1c01f000, 0x4803c856, + 0x0201f800, 0x0010393e, 0x04000005, 0x42028000, + 0x0000002e, 0x0201f000, 0x0010a25b, 0x1c01f000, + 0x59a8086f, 0x82040500, 0x00000010, 0x04000004, + 0x42000800, 0x00000002, 0x0401f010, 0x82040500, + 0x00000020, 0x42000800, 0x00000002, 0x0402000b, + 0x59c80835, 0x82040d00, 0x00001f00, 0x80040910, + 0x80040800, 0x59a8006c, 0x80000540, 0x04000003, + 0x42000800, 0x0000025a, 0x4807c857, 0x1c01f000, + 0x4c000000, 0x59a80053, 0x4803c857, 0x82000580, + 0x00000000, 0x5c000000, 0x1c01f000, 0x4c000000, + 0x59a80053, 0x4803c857, 0x82000580, 0x00000001, + 0x5c000000, 0x1c01f000, 0x4c000000, 0x59a80053, + 0x4803c857, 0x82000580, 0x00000003, 0x5c000000, + 0x1c01f000, 0x4c000000, 0x59a80053, 0x82000580, + 0x00000002, 0x5c000000, 0x1c01f000, 0x4c000000, + 0x4c040000, 0x4c080000, 0x4c380000, 0x59a80040, + 0x82000c80, 0x00000007, 0x02021800, 0x00100615, + 0x0c01f806, 0x5c007000, 0x5c001000, 0x5c000800, + 0x5c000000, 0x1c01f000, 0x001016dd, 0x001016f0, + 0x00101704, 0x00101706, 0x0010172d, 0x0010172f, + 0x00101731, 0x4803c856, 0x4a035042, 0x00000000, + 0x42000000, 0x00000002, 0x0401fa18, 0x42000000, + 0x00000002, 0x0401f9ad, 0x0401faae, 0x4803c856, + 0x4a035040, 0x00000006, 0x42000800, 0x0000001e, + 0x42001000, 0x00101732, 0x0201f000, 0x00105da7, + 0x497b5045, 0x4a035050, 0x00000036, 0x4a03504f, + 0x0000002a, 0x4803c856, 0x4a035042, 0x00000001, + 0x42000000, 0x00000002, 0x0401f998, 0x4803c856, + 0x4a035040, 0x00000006, 0x42000800, 0x0000001e, + 0x42001000, 0x00101732, 0x0201f000, 0x00105da7, + 0x0201f800, 0x00100615, 0x4a035050, 0x00000036, + 0x4803c856, 0x4a035042, 0x00000003, 0x42000800, + 0x00000000, 0x0401fa9f, 0x82040d00, 0x00000090, + 0x82040580, 0x00000090, 0x04000009, 0x82040580, + 0x00000010, 0x04000009, 0x82040580, 0x00000000, + 0x04000008, 0x0201f800, 0x00100615, 0x42000000, + 0x00000001, 0x0401f005, 0x41780000, 0x0401f003, + 0x42000000, 0x00000002, 0x0401f970, 0x497b5046, + 0x4803c856, 0x4a035040, 0x00000006, 0x42000800, + 0x0000001e, 0x42001000, 0x00101732, 0x0201f000, + 0x00105da7, 0x0201f800, 0x00100615, 0x0201f800, + 0x00100615, 0x1c01f000, 0x4c000000, 0x4c040000, + 0x4c080000, 0x4c380000, 0x59a80042, 0x82000c80, + 0x00000007, 0x02021800, 0x00100615, 0x0c01f806, + 0x5c007000, 0x5c001000, 0x5c000800, 0x5c000000, + 0x1c01f000, 0x00101748, 0x00101767, 0x001017bb, + 0x001017d2, 0x001017e9, 0x001017f2, 0x001017f4, + 0x0401f9f9, 0x0402001b, 0x59a81048, 0x42000800, + 0x00000000, 0x0401fa5f, 0x82040d00, 0x00000090, + 0x82040580, 0x00000090, 0x04000009, 0x82040580, + 0x00000010, 0x04000008, 0x82040580, 0x00000000, + 0x04000007, 0x0201f800, 0x00100615, 0x84081540, + 0x0401f004, 0x84081542, 0x0401f002, 0x84081544, + 0x480b5048, 0x4a035040, 0x00000001, 0x0401f003, + 0x0401f8cb, 0x0401ff82, 0x1c01f000, 0x0401f88f, + 0x04000052, 0x0401f9d8, 0x0402002a, 0x42000800, + 0x00000000, 0x0401fa3f, 0x82040d00, 0x00000090, + 0x82040580, 0x00000000, 0x04000044, 0x82040580, + 0x00000010, 0x04000006, 0x82040580, 0x00000090, + 0x04000009, 0x0201f800, 0x00100615, 0x59c40801, + 0x82040d00, 0x00018000, 0x82040580, 0x00000000, + 0x04000036, 0x42000800, 0x00000000, 0x0401fa29, + 0x82040d00, 0x00000090, 0x82040580, 0x00000010, + 0x04000006, 0x82040580, 0x00000090, 0x04000006, + 0x02020800, 0x00100615, 0x59a80048, 0x84000542, + 0x0401f003, 0x59a80048, 0x84000540, 0x48035048, + 0x59a80045, 0x80000000, 0x48035045, 0x82000580, + 0x00000005, 0x04000003, 0x0401f861, 0x0401f01e, + 0x497b5045, 0x59c40801, 0x82040d00, 0x00018000, + 0x82040580, 0x00000000, 0x04000009, 0x82040580, + 0x00008000, 0x04000009, 0x82040580, 0x00010000, + 0x04000008, 0x0201f800, 0x00100615, 0x42000000, + 0x00000001, 0x0401f005, 0x41780000, 0x0401f003, + 0x42000000, 0x00000002, 0x0401f948, 0x4a035042, + 0x00000002, 0x0401f004, 0x4a035040, 0x00000003, + 0x0401f002, 0x0401ff42, 0x1c01f000, 0x0401f83b, + 0x04000015, 0x59a8004f, 0x80000040, 0x4803504f, + 0x0401f981, 0x04020005, 0x4a035040, 0x00000003, + 0x497b5041, 0x0401f00c, 0x59a8004f, 0x80000540, + 0x04020003, 0x0401f89e, 0x0401f002, 0x0401f84b, + 0x0401f82f, 0x497b5045, 0x4a035042, 0x00000001, + 0x0401ff2b, 0x1c01f000, 0x0401f824, 0x04000015, + 0x0401f96d, 0x0402000f, 0x59a80046, 0x80000000, + 0x48035046, 0x82000580, 0x00000007, 0x0402000c, + 0x4a035052, 0x0000000a, 0x497b5049, 0x59a80048, + 0x8400055e, 0x48035048, 0x4803c857, 0x0401f005, + 0x0401f817, 0x4a035042, 0x00000004, 0x0401ff3d, + 0x1c01f000, 0x0401f80d, 0x04000007, 0x0401f956, + 0x04020003, 0x0401ff1b, 0x0401f003, 0x0401f80c, + 0x0401ff34, 0x1c01f000, 0x0201f800, 0x00100615, + 0x0201f800, 0x00100615, 0x59a80050, 0x80000040, + 0x48035050, 0x0400088d, 0x1c01f000, 0x4c040000, + 0x42000800, 0x00000000, 0x0401f9ae, 0x82040d00, + 0x00000090, 0x82040580, 0x00000090, 0x04000009, + 0x82040580, 0x00000010, 0x04000009, 0x82040580, + 0x00000000, 0x04000009, 0x0201f800, 0x00100615, + 0x42000000, 0x00000002, 0x0401f005, 0x42000000, + 0x00000001, 0x0401f002, 0x41780000, 0x0401f8e7, + 0x5c000800, 0x1c01f000, 0x4c040000, 0x59c40801, + 0x82040d00, 0x00018000, 0x82040580, 0x00000000, + 0x04000009, 0x82040580, 0x00008000, 0x04000009, + 0x82040580, 0x00010000, 0x04000009, 0x0201f800, + 0x00100615, 0x42000000, 0x00000002, 0x0401f005, + 0x42000000, 0x00000001, 0x0401f002, 0x41780000, + 0x0401f866, 0x5c000800, 0x1c01f000, 0x4c040000, + 0x59a80045, 0x80000000, 0x48035045, 0x82000580, + 0x00000005, 0x04020018, 0x497b5045, 0x59c40801, + 0x82040d00, 0x00018000, 0x82040580, 0x00000000, + 0x04000009, 0x82040580, 0x00008000, 0x04000009, + 0x82040580, 0x00010000, 0x04000009, 0x0201f800, + 0x00100615, 0x42000000, 0x00000002, 0x0401f005, + 0x42000000, 0x00000001, 0x0401f002, 0x41780000, + 0x0401f846, 0x42000800, 0x00000000, 0x0401f95d, + 0x82040d00, 0x00000090, 0x82040580, 0x00000090, + 0x04000009, 0x82040580, 0x00000010, 0x04000009, + 0x82040580, 0x00000000, 0x04000009, 0x0201f800, + 0x00100615, 0x42000000, 0x00000002, 0x0401f005, + 0x42000000, 0x00000001, 0x0401f002, 0x41780000, + 0x0401f896, 0x5c000800, 0x1c01f000, 0x4c200000, + 0x59a80048, 0x82000500, 0x00007fff, 0x02000800, + 0x00100615, 0x59a84047, 0x80204102, 0x02001800, + 0x00100615, 0x48235047, 0x80204500, 0x040007fa, + 0x8c000504, 0x04020007, 0x8c000502, 0x04020008, + 0x8c000500, 0x04020008, 0x0201f800, 0x00100615, + 0x42000000, 0x00000002, 0x0401f005, 0x41780000, + 0x0401f003, 0x42000000, 0x00000001, 0x0401f80f, + 0x5c004000, 0x1c01f000, 0x04011000, 0x4a03c840, + 0x0010b240, 0x4a03c842, 0x00000009, 0x40000000, + 0x040117ff, 0x4a035047, 0x00000004, 0x4a03503e, + 0x00000000, 0x1c01f000, 0x59a80858, 0x82040d80, + 0x01391077, 0x04020008, 0x59e00813, 0x8c040d00, + 0x04000005, 0x82000d80, 0x00000002, 0x04020002, + 0x41780000, 0x800001c0, 0x04000040, 0x82000d80, + 0x00000001, 0x0402001d, 0x42000800, 0x000000a0, + 0x0401f908, 0x82040540, 0x00000004, 0x42000800, + 0x000000a0, 0x0401f908, 0x42000800, 0x000000c0, + 0x0401f900, 0x82040540, 0x00000020, 0x42000800, + 0x000000c0, 0x0401f900, 0x59c40001, 0x82000500, + 0xfffe7fff, 0x82000540, 0x00000000, 0x48038801, + 0x59a80054, 0x80000110, 0x42000800, 0x000000e0, + 0x0401f8f5, 0x0401f03c, 0x82000d80, 0x00000002, + 0x02020800, 0x00100615, 0x42000800, 0x000000a0, + 0x0401f8e8, 0x82040500, 0xfffffffb, 0x42000800, + 0x000000a0, 0x0401f8e8, 0x42000800, 0x000000c0, + 0x0401f8e0, 0x82040500, 0xffffffdf, 0x42000800, + 0x000000c0, 0x0401f8e0, 0x59c40001, 0x82000500, + 0xfffe7fff, 0x82000540, 0x00010000, 0x48038801, + 0x59a80056, 0x80000110, 0x42000800, 0x000000e0, + 0x0401f8d5, 0x0401f01c, 0x42000800, 0x000000a0, + 0x0401f8cc, 0x82040540, 0x00000004, 0x42000800, + 0x000000a0, 0x0401f8cc, 0x42000800, 0x000000c0, + 0x0401f8c4, 0x82040500, 0xffffffdf, 0x42000800, + 0x000000c0, 0x0401f8c4, 0x59c40001, 0x82000500, + 0xfffe7fff, 0x82000540, 0x00008000, 0x48038801, + 0x59a80055, 0x80000110, 0x42000800, 0x000000e0, + 0x0401f8b9, 0x1c01f000, 0x4803c857, 0x59a80858, + 0x82040d80, 0x01391077, 0x04020008, 0x59e00813, + 0x8c040d00, 0x04000005, 0x82000d80, 0x00000002, + 0x04020002, 0x41780000, 0x4c000000, 0x0401f942, + 0x5c000000, 0x800001c0, 0x04000026, 0x82000d80, + 0x00000001, 0x04020010, 0x59a8006c, 0x80000540, + 0x04000004, 0x42001000, 0x00000000, 0x0401f9f7, + 0x42000800, 0x00000000, 0x0401f896, 0x82040540, + 0x00000090, 0x42000800, 0x00000000, 0x0401f896, + 0x0401f024, 0x82000d80, 0x00000002, 0x02020800, + 0x00100615, 0x59a8006c, 0x80000540, 0x04000004, + 0x42001000, 0x00010000, 0x0401f9e4, 0x42000800, + 0x00000000, 0x0401f883, 0x82040500, 0xffffff6f, + 0x42000800, 0x00000000, 0x0401f883, 0x0401f011, + 0x59a8006c, 0x80000540, 0x04000004, 0x42001000, + 0x00008000, 0x0401f9d5, 0x42000800, 0x00000000, + 0x0401f874, 0x82040500, 0xffffff6f, 0x82000540, + 0x00000010, 0x42000800, 0x00000000, 0x0401f872, + 0x0401f111, 0x4c580000, 0x4200b000, 0x00000014, + 0x8058b040, 0x04000042, 0x59c4000d, 0x8c000520, + 0x040207fc, 0x0401f85b, 0x59c4000d, 0x8c000520, + 0x040207f8, 0x59c40808, 0x84040d50, 0x48078808, + 0x4200b000, 0x000000c8, 0x8058b040, 0x040207ff, + 0x4200b000, 0x00000014, 0x8058b040, 0x04000030, + 0x59c4000d, 0x8c000520, 0x0402002d, 0x42000800, + 0x00001000, 0x50040800, 0x82040c80, 0x24220001, + 0x04020003, 0x8c000504, 0x040007f4, 0x0401f841, + 0x59c4000d, 0x8c000520, 0x04020021, 0x42000800, + 0x00001000, 0x50040800, 0x82040c80, 0x24220001, + 0x04020003, 0x8c000504, 0x040007e8, 0x4200b000, + 0x0000000a, 0x8058b040, 0x04000003, 0x0401f831, + 0x0401f7fd, 0x4200b000, 0x00000064, 0x59c4000d, + 0x8c00051e, 0x0400000e, 0x8058b040, 0x040207fc, + 0x42000000, 0x00001000, 0x50000000, 0x82000480, + 0x24220001, 0x04020004, 0x59c40808, 0x84040d10, + 0x48078808, 0x80000580, 0x0401f00c, 0x42000000, + 0x00001000, 0x50000000, 0x82000480, 0x24220001, + 0x04020004, 0x59c40808, 0x84040d10, 0x48078808, + 0x82000540, 0x00000001, 0x5c00b000, 0x1c01f000, + 0x42000800, 0x000000a0, 0x0401f816, 0x82040500, + 0xfffffffe, 0x42000800, 0x000000a0, 0x0401f816, + 0x42000800, 0x00000000, 0x0401f80e, 0x82040500, + 0xfffffffe, 0x42000800, 0x00000000, 0x0401f00e, + 0x40000000, 0x40000000, 0x40000000, 0x40000000, + 0x40000000, 0x1c01f000, 0x480b8805, 0x1c01f000, + 0x4807880e, 0x59c4080f, 0x82040d00, 0x000000ff, + 0x1c01f000, 0x900001c0, 0x80040d40, 0x84040d40, + 0x4807880e, 0x1c01f000, 0x82000d80, 0x00200000, + 0x04000009, 0x82000d80, 0x02000000, 0x04000006, + 0x82000d80, 0x01000000, 0x04000006, 0x59c408a3, + 0x0401f006, 0x59c408a3, 0x84040d30, 0x0401f003, + 0x59c408a3, 0x84040d32, 0x80040540, 0x480388a3, + 0x480788a3, 0x1c01f000, 0x59c400a3, 0x84000556, + 0x480388a3, 0x84000516, 0x480388a3, 0x1c01f000, + 0x485fc857, 0x4863c857, 0x4c640000, 0x4d3c0000, + 0x4d400000, 0x0201f800, 0x00106c32, 0x4863500a, + 0x0201f800, 0x0010a95a, 0x0402006a, 0x82600d00, + 0x0000ff00, 0x800409c0, 0x0400000c, 0x4200c800, + 0x00000001, 0x59a80010, 0x82000500, 0x000000ff, + 0x80041110, 0x80081580, 0x04000021, 0x82041580, + 0x0000ff00, 0x0400000a, 0x59c410a3, 0x82081500, + 0x00008000, 0x04000009, 0x59c410a7, 0x82081500, + 0x0000ff00, 0x82081580, 0x0000ff00, 0x4200c800, + 0x00000000, 0x04000012, 0x59a80005, 0x8c000502, + 0x04020008, 0x8c000500, 0x0402000d, 0x599c1017, + 0x8c08151a, 0x0400003c, 0x84000542, 0x48035005, + 0x4200c800, 0x00000002, 0x42028000, 0x00000004, + 0x42027800, 0x00000008, 0x0401f007, 0x59a80805, + 0x84040d40, 0x48075005, 0x42028000, 0x00000004, + 0x417a7800, 0x59a80006, 0x8c000502, 0x04020006, + 0x59a80805, 0x8c040d0a, 0x04020032, 0x84040d4a, + 0x48075005, 0x42000000, 0x0010b610, 0x0201f800, + 0x0010a86e, 0x59a8180a, 0x42001000, 0x00008013, + 0x0201f800, 0x00103857, 0x0201f800, 0x0010393e, + 0x04000015, 0x4d400000, 0x82600500, 0x000000ff, + 0x42028800, 0x0000ffff, 0x40643000, 0x42028000, + 0x0000000e, 0x0201f800, 0x0010a258, 0x42000800, + 0x00000001, 0x42001000, 0x00000100, 0x0201f800, + 0x00105ec4, 0x5c028000, 0x599c0817, 0x8c040d0a, + 0x04020010, 0x493fc857, 0x4943c857, 0x0401fb59, + 0x0401f00c, 0x0201f800, 0x0010393e, 0x04000009, + 0x42028000, 0x0000000f, 0x42028800, 0x0000ffff, + 0x42003000, 0x00000000, 0x0201f800, 0x0010a25b, + 0x497b8880, 0x5c028000, 0x5c027800, 0x5c00c800, + 0x1c01f000, 0x42000800, 0x00000000, 0x0401ff61, + 0x82040540, 0x00000002, 0x42000800, 0x00000000, + 0x0401f761, 0x42000800, 0x00000000, 0x0401ff59, + 0x82040500, 0xfffffffd, 0x42000800, 0x00000000, + 0x0401f759, 0x59c408a8, 0x0401ff4a, 0x0401ff49, + 0x59c400a8, 0x80040d80, 0x040207fb, 0x1c01f000, + 0x4803c856, 0x4a038807, 0x00000001, 0x497b8807, + 0x59c40005, 0x48038805, 0x497b506c, 0x497b506d, + 0x41785800, 0x42006000, 0x00000001, 0x42006800, + 0x00000003, 0x0401f824, 0x0401f82f, 0x40400000, + 0x4803c857, 0x82408580, 0x00000000, 0x0402001d, + 0x41785800, 0x42006000, 0x0000001e, 0x42006800, + 0x00000014, 0x0401f818, 0x0401f823, 0x40400000, + 0x4803c857, 0x82408580, 0x00000800, 0x04020011, + 0x42005800, 0x00000001, 0x42006000, 0x0000001e, + 0x42006800, 0x00000014, 0x0401f80b, 0x0401f816, + 0x40400000, 0x4803c857, 0x82408580, 0x0000ffff, + 0x04020004, 0x4a03506c, 0x00000001, 0x4803c856, + 0x1c01f000, 0x41785000, 0x0401f812, 0x0401f838, + 0x40347000, 0x40340800, 0x0401f03d, 0x42005000, + 0x00000001, 0x0401f80b, 0x0401f831, 0x40340800, + 0x0401f037, 0x42005000, 0x00000002, 0x0401f805, + 0x0401f81d, 0x0401f835, 0x40048000, 0x1c01f000, + 0x0401f808, 0x0401f814, 0x40280800, 0x0401f826, + 0x402c0800, 0x0401f827, 0x40300800, 0x0401f025, + 0x42000800, 0x0000ffff, 0x42001000, 0x00000001, + 0x0401f829, 0x42001000, 0x00000010, 0x0401f826, + 0x42000800, 0x0000ffff, 0x42001000, 0x00000010, + 0x0401f021, 0x41780800, 0x42001000, 0x00000002, + 0x0401f01d, 0x0401f92e, 0x4a03d000, 0x00050004, + 0x0401f92b, 0x4a03d000, 0x00050005, 0x0401f928, + 0x4a03d000, 0x00050004, 0x42000800, 0x00000001, + 0x42001000, 0x00000001, 0x0401f00f, 0x42000800, + 0x00000002, 0x42001000, 0x00000002, 0x0401f00a, + 0x42001000, 0x00000005, 0x0401f007, 0x42001000, + 0x00000010, 0x0401f004, 0x42001000, 0x00000010, + 0x0401f01b, 0x0401f912, 0x82082c00, 0x0010a95f, + 0x50142800, 0x82081500, 0xffffffff, 0x04000013, + 0x0401f90b, 0x80081040, 0x80142902, 0x40040000, + 0x80140500, 0x04000007, 0x4a03d000, 0x00070006, + 0x0401f903, 0x4a03d000, 0x00070007, 0x0401f006, + 0x4a03d000, 0x00070004, 0x0401f8fd, 0x4a03d000, + 0x00070005, 0x0401f7ec, 0x1c01f000, 0x41780800, + 0x82082c00, 0x0010a95f, 0x50142800, 0x82081500, + 0xffffffff, 0x04000010, 0x0401f8f1, 0x4a03d000, + 0x00050001, 0x0401f8ee, 0x59e81800, 0x80081040, + 0x80142902, 0x8c0c1d06, 0x04000004, 0x40140000, + 0x80040d40, 0x0401f8e6, 0x4a03d000, 0x00070000, + 0x0401f7ef, 0x1c01f000, 0x480bc857, 0x480b506d, + 0x59c40001, 0x82000500, 0xffffefff, 0x48038801, + 0x41781800, 0x0401f8c4, 0x41785800, 0x42006000, + 0x0000001e, 0x42006800, 0x00000004, 0x0401ff7a, + 0x42006800, 0x0000003c, 0x0401ff7d, 0x41785800, + 0x42006000, 0x0000001e, 0x42006800, 0x00000004, + 0x0401ff71, 0x41786800, 0x0401ff75, 0x41785800, + 0x42006000, 0x0000001e, 0x41786800, 0x0401ff6a, + 0x42006800, 0x00000002, 0x0401ff6d, 0x42006800, + 0x00000001, 0x0401ff64, 0x42006800, 0x000000f5, + 0x0401ff67, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000004, 0x0401ff5b, 0x42006800, + 0x00000020, 0x0401ff5e, 0x59a8106d, 0x0401f865, + 0x42001800, 0x000200f5, 0x0401f897, 0x59a8106d, + 0x0401f879, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000004, 0x0401ff4b, 0x41786800, + 0x0401ff4f, 0x59c40001, 0x82000540, 0x00001000, + 0x48038801, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000015, 0x0401ff3f, 0x0401ff4a, + 0x40400000, 0x82000540, 0x00000002, 0x4c000000, + 0x41785800, 0x42006000, 0x0000001e, 0x42006800, + 0x00000015, 0x0401ff34, 0x5c000000, 0x40006800, + 0x0401ff37, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000015, 0x0401ff2b, 0x0401ff36, + 0x40400000, 0x82000500, 0x0000fffd, 0x4c000000, + 0x41785800, 0x42006000, 0x0000001e, 0x42006800, + 0x00000015, 0x0401ff20, 0x5c000000, 0x40006800, + 0x0401ff23, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000014, 0x0401ff17, 0x0401ff22, + 0x40400000, 0x82000540, 0x00000040, 0x4c000000, + 0x41785800, 0x42006000, 0x0000001e, 0x42006800, + 0x00000014, 0x0401ff0c, 0x5c000000, 0x40006800, + 0x0401ff0f, 0x41785800, 0x42006000, 0x0000001e, + 0x42006800, 0x00000014, 0x0401ff03, 0x0401ff0e, + 0x40400000, 0x82000500, 0x0000ffbf, 0x4c000000, + 0x41785800, 0x42006000, 0x0000001e, 0x42006800, + 0x00000014, 0x0401fef8, 0x5c000000, 0x40006800, + 0x0401fefb, 0x4a038886, 0x00002020, 0x0401f04c, + 0x480bc857, 0x82080580, 0x00010000, 0x04020007, + 0x82040d40, 0x00010000, 0x42001800, 0x00000001, + 0x0401f82d, 0x0401f00f, 0x82080580, 0x00008000, + 0x04000007, 0x82040d40, 0x00000000, 0x42001800, + 0x00900001, 0x0401f824, 0x0401f006, 0x82040d40, + 0x00008000, 0x42001800, 0x00100001, 0x0401f81e, + 0x1c01f000, 0x480bc857, 0x82080580, 0x00010000, + 0x04020008, 0x42001800, 0x000000a1, 0x0401f816, + 0x42001800, 0x000000c1, 0x0401f813, 0x0401f011, + 0x82080580, 0x00008000, 0x04000008, 0x42001800, + 0x000400a1, 0x0401f80c, 0x42001800, 0x002000c1, + 0x0401f809, 0x0401f007, 0x42001800, 0x000400a1, + 0x0401f805, 0x42001800, 0x000000c1, 0x0401f802, + 0x1c01f000, 0x480fc857, 0x41785800, 0x42006000, + 0x0000001e, 0x41786800, 0x0401feb7, 0x400c6800, + 0x80346960, 0x0401feba, 0x42006800, 0x00000001, + 0x0401feb1, 0x400c6800, 0x0401feb5, 0x42006800, + 0x00000003, 0x0401feac, 0x0401feb7, 0x40400000, + 0x8c000504, 0x040207fc, 0x1c01f000, 0x42000000, + 0x00000064, 0x80000040, 0x040207ff, 0x1c01f000, + 0x4c5c0000, 0x4c600000, 0x4178b800, 0x0201f800, + 0x0010473b, 0x040200fd, 0x59a8c026, 0x0201f800, + 0x00104e0d, 0x04000003, 0x8c60c506, 0x0400000e, + 0x8c60c500, 0x04020004, 0x8c60c50e, 0x040008f6, + 0x0401f0f2, 0x0401faaf, 0x040200f0, 0x0201f800, + 0x00104e0d, 0x04020004, 0x4a03501c, 0x0000ffff, + 0x0401f0ea, 0x8c60c504, 0x04000004, 0x4a03501c, + 0x0000ffff, 0x0401f0e5, 0x59a8c010, 0x8260c500, + 0x000000ff, 0x59a81013, 0x8c081500, 0x0400005d, + 0x8c081502, 0x0402005b, 0x59a8b81c, 0x825c0d80, + 0x0000ffff, 0x04020003, 0x4200b800, 0x00000001, + 0x805c1104, 0x82086400, 0x0010bc20, 0x50300800, + 0x825c0500, 0x00000003, 0x0c01f001, 0x00101c2c, + 0x00101c27, 0x00101c2b, 0x00101c29, 0x80040910, + 0x0401f004, 0x80040930, 0x0401f002, 0x80040920, + 0x82040500, 0x000000ff, 0x82000d80, 0x000000ff, + 0x0400000f, 0x4c000000, 0x82000400, 0x00101eb5, + 0x50000800, 0x80040910, 0x82040580, 0x00000080, + 0x5c000000, 0x04000030, 0x80600d80, 0x0400002e, + 0x80000540, 0x0400002c, 0x0401f00b, 0x59a81005, + 0x82081500, 0x00000003, 0x0402002b, 0x59a81013, + 0x84081542, 0x480b5013, 0x4a03501c, 0x0000ffff, + 0x0401f028, 0x4c000000, 0x59a8006f, 0x8c000502, + 0x42001000, 0x00000010, 0x02020800, 0x00104ada, + 0x5c000000, 0x0402001c, 0x417a8800, 0x0201f800, + 0x001059b9, 0x04020016, 0x0201f800, 0x0010443b, + 0x04000006, 0x0201f800, 0x00104acf, 0x0401f8b1, + 0x0400000f, 0x0401f00c, 0x599c0019, 0x8c00050e, + 0x04020009, 0x0201f800, 0x001043fc, 0x04020008, + 0x0201f800, 0x00104acf, 0x0401f9dd, 0x0401f8be, + 0x04000003, 0x805cb800, 0x0401f7b2, 0x485f501c, + 0x0401f086, 0x4a03501c, 0x0000ffff, 0x0401f083, + 0x42003000, 0x0000007e, 0x59a8001c, 0x82001580, + 0x0000ffff, 0x04020005, 0x80000d80, 0x4018b000, + 0x4803c856, 0x0401f009, 0x8018b480, 0x04001004, + 0x40000800, 0x4803c856, 0x0401f004, 0x4a03501c, + 0x0000ffff, 0x0401f071, 0x4c040000, 0x4c580000, + 0x82040400, 0x00101eb5, 0x50000000, 0x82000500, + 0x000000ff, 0x80604580, 0x0400005c, 0x0201f800, + 0x001059ba, 0x04020061, 0x59a8006f, 0x8c000502, + 0x42001000, 0x00000010, 0x02020800, 0x00104ada, + 0x5c00b000, 0x5c000800, 0x040207d7, 0x4c040000, + 0x4c580000, 0x845cbd00, 0x0201f800, 0x00020267, + 0x04000008, 0x599c0019, 0x8c00050e, 0x04020047, + 0x0201f800, 0x00104401, 0x0402004c, 0x0401f002, + 0x845cbd40, 0x0201f800, 0x00104acf, 0x0201f800, + 0x00104836, 0x04020007, 0x59a80005, 0x8c000502, + 0x04000033, 0x59340200, 0x8c00050e, 0x04020030, + 0x59a81013, 0x8c081502, 0x04000025, 0x0201f800, + 0x00104858, 0x04000031, 0x8c5cbd00, 0x04020004, + 0x0201f800, 0x00104455, 0x0401f02c, 0x0401f9c8, + 0x0400002a, 0x42026000, 0x0010bbe8, 0x49366009, + 0x497a6008, 0x417a7800, 0x0401f920, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x0010393e, 0x0400001d, 0x41782800, 0x42003000, + 0x00000008, 0x4d400000, 0x4d440000, 0x59368c03, + 0x42028000, 0x00000029, 0x0201f800, 0x0010a258, + 0x5c028800, 0x5c028000, 0x0401f010, 0x4937c857, + 0x599c0019, 0x8c00050e, 0x0402000c, 0x0401f968, + 0x0401f849, 0x04000011, 0x0401f008, 0x59a80013, + 0x8c000500, 0x04000003, 0x0401f9a1, 0x04000003, + 0x0401f828, 0x04000009, 0x5c00b000, 0x5c000800, + 0x80040800, 0x8058b040, 0x04020798, 0x4a03501c, + 0x0000ffff, 0x0401f005, 0x4937c857, 0x5c00b000, + 0x5c000800, 0x4807501c, 0x5c00c000, 0x5c00b800, + 0x1c01f000, 0x4803c856, 0x4a03501c, 0x00000001, + 0x42028800, 0x000007fe, 0x42003000, 0x00fffffe, + 0x0201f800, 0x001043fc, 0x0402000c, 0x0401f944, + 0x0401f825, 0x04000009, 0x59a80026, 0x8400054e, + 0x48035026, 0x0201f800, 0x001090d5, 0x82000540, + 0x00000001, 0x1c01f000, 0x80000580, 0x0401f7fe, + 0x4937c857, 0x0201f800, 0x001076c9, 0x04000015, + 0x49366009, 0x4a026406, 0x00000001, 0x417a7800, + 0x0201f800, 0x001043bd, 0x59a8001b, 0x80000000, + 0x4803501b, 0x42027000, 0x00000004, 0x599c0019, + 0x8c00050e, 0x04000003, 0x42027000, 0x00000000, + 0x0201f800, 0x000208d8, 0x82000540, 0x00000001, + 0x1c01f000, 0x4937c857, 0x0201f800, 0x001076c9, + 0x0400001c, 0x49366009, 0x59340403, 0x82000580, + 0x000007fe, 0x04000005, 0x4d3c0000, 0x417a7800, + 0x0401f8b2, 0x5c027800, 0x4a026406, 0x00000001, + 0x417a7800, 0x0201f800, 0x001043bd, 0x42000800, + 0x00000003, 0x0201f800, 0x001043c7, 0x59a8001b, + 0x80000000, 0x4803501b, 0x42027000, 0x00000002, + 0x0201f800, 0x000208d8, 0x82000540, 0x00000001, + 0x1c01f000, 0x4803c856, 0x42028800, 0x000007fc, + 0x42003000, 0x00fffffc, 0x0201f800, 0x001043fc, + 0x04020005, 0x0401f805, 0x04000003, 0x4a035027, + 0x0000ffff, 0x1c01f000, 0x4937c857, 0x0201f800, + 0x001076c9, 0x04000014, 0x49366009, 0x4a026406, + 0x00000001, 0x417a7800, 0x0201f800, 0x001043bd, + 0x42000800, 0x00000003, 0x0201f800, 0x001043c7, + 0x59a80028, 0x80000000, 0x48035028, 0x42027000, + 0x00000002, 0x0201f800, 0x000208d8, 0x82000540, + 0x00000001, 0x1c01f000, 0x480bc857, 0x492fc857, + 0x4c5c0000, 0x4008b800, 0x42028800, 0x000007fd, + 0x42003000, 0x00fffffd, 0x0201f800, 0x001043fc, + 0x0402001a, 0x0201f800, 0x00020892, 0x04000017, + 0x49366009, 0x5934000a, 0x84000544, 0x4802680a, + 0x812e59c0, 0x04000005, 0x592c0404, 0x8c00051e, + 0x04000002, 0x48ee6021, 0x492e6008, 0x4a026406, + 0x00000001, 0x485e601c, 0x42027000, 0x00000022, + 0x0201f800, 0x000208d8, 0x82000540, 0x00000001, + 0x5c00b800, 0x1c01f000, 0x80000580, 0x0401f7fd, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4943c857, + 0x493fc857, 0x4d340000, 0x4d440000, 0x4c580000, + 0x4d2c0000, 0x4c5c0000, 0x0201f800, 0x0010698c, + 0x4df00000, 0x0201f800, 0x0010673a, 0x0201f800, + 0x001067ee, 0x0201f800, 0x0010647f, 0x0201f800, + 0x0010822b, 0x5c03e000, 0x02000800, 0x00106982, + 0x4200b000, 0x000007f0, 0x417a8800, 0x0201f800, + 0x00020267, 0x0402001a, 0x8d3e7d06, 0x04000004, + 0x59340200, 0x8c00050e, 0x04020015, 0x8d3e7d18, + 0x04000010, 0x5934b80f, 0x805cb9c0, 0x04000009, + 0x49425a06, 0x592cb800, 0x0201f800, 0x00020381, + 0x805cb9c0, 0x040207fb, 0x497a680f, 0x497a6810, + 0x4937c857, 0x4a026c00, 0x00000707, 0x0401f004, + 0x4937c857, 0x0201f800, 0x001040e4, 0x81468800, + 0x8058b040, 0x040207e2, 0x8d3e7d02, 0x04000011, + 0x497b501d, 0x42028800, 0x000007f0, 0x4200b000, + 0x00000010, 0x0201f800, 0x00020267, 0x04020006, + 0x4937c857, 0x4a026c00, 0x00000707, 0x0201f800, + 0x001040e4, 0x81468800, 0x8058b040, 0x040207f6, + 0x5c00b800, 0x5c025800, 0x5c00b000, 0x5c028800, + 0x5c026800, 0x1c01f000, 0x5c000000, 0x4c000000, + 0x4803c857, 0x4933c857, 0x493fc857, 0x4d340000, + 0x4d400000, 0x4d440000, 0x4d2c0000, 0x4c5c0000, + 0x0201f800, 0x0010698c, 0x4df00000, 0x59326809, + 0x813669c0, 0x04000021, 0x59368c03, 0x42028000, + 0x00000029, 0x0201f800, 0x0010679b, 0x0201f800, + 0x001067f6, 0x0201f800, 0x00106543, 0x0201f800, + 0x0010a0da, 0x4937c857, 0x8d3e7d18, 0x04000011, + 0x5934b80f, 0x805cb9c0, 0x0400000a, 0x405e5800, + 0x49425a06, 0x592cb800, 0x0201f800, 0x00020381, + 0x805cb9c0, 0x040207fa, 0x497a680f, 0x497a6810, + 0x4937c857, 0x4a026c00, 0x00000707, 0x0401f003, + 0x0201f800, 0x001040e4, 0x5c03e000, 0x02000800, + 0x00106982, 0x5c00b800, 0x5c025800, 0x5c028800, + 0x5c028000, 0x5c026800, 0x1c01f000, 0x4933c857, + 0x59a80026, 0x8c000508, 0x04020012, 0x59305009, + 0x482bc857, 0x836c0580, 0x00000002, 0x0402000d, + 0x0401f813, 0x0402000b, 0x58280403, 0x82000580, + 0x000007fc, 0x04000008, 0x59a8001b, 0x80000040, + 0x4803c857, 0x02001800, 0x00100615, 0x4803501b, + 0x1c01f000, 0x59a80028, 0x80000040, 0x4803c857, + 0x040017fc, 0x48035028, 0x1c01f000, 0x59300008, + 0x800001c0, 0x04020009, 0x59300403, 0x82000580, + 0x00000001, 0x04020004, 0x82000540, 0x00000001, + 0x0401f002, 0x80000580, 0x1c01f000, 0x4937c857, + 0x59340200, 0x84000502, 0x48026a00, 0x1c01f000, + 0x4933c857, 0x493fc857, 0x4947c857, 0x4d400000, + 0x4d340000, 0x4d440000, 0x4c580000, 0x0201f800, + 0x0010698c, 0x4df00000, 0x8060c1c0, 0x04020004, + 0x4200b000, 0x00000001, 0x0401f004, 0x4200b000, + 0x000007f0, 0x417a8800, 0x41440000, 0x81ac0400, + 0x50000000, 0x80026d40, 0x0400001a, 0x4d3c0000, + 0x42027800, 0x00000001, 0x0201f800, 0x00104745, + 0x5c027800, 0x42028000, 0x00000029, 0x0201f800, + 0x0010679b, 0x0201f800, 0x001067f6, 0x0201f800, + 0x00106543, 0x0201f800, 0x00104836, 0x04020005, + 0x4937c857, 0x4a026c00, 0x00000404, 0x0401f003, + 0x0201f800, 0x00104863, 0x0201f800, 0x0010a0da, + 0x81468800, 0x8058b040, 0x040207e0, 0x5c03e000, + 0x02000800, 0x00106982, 0x5c00b000, 0x5c028800, + 0x5c026800, 0x5c028000, 0x1c01f000, 0x4937c857, + 0x4947c857, 0x4c5c0000, 0x4c600000, 0x4c640000, + 0x59a80013, 0x8c000500, 0x0400001f, 0x599c0017, + 0x8c00050a, 0x0402001c, 0x5934ba02, 0x825cbd00, + 0x000000ff, 0x485fc857, 0x4178c000, 0x4178c800, + 0x82600400, 0x0010bc20, 0x50002000, 0x8060c1c0, + 0x04000008, 0x82100500, 0x000000ff, 0x82002d80, + 0x000000ff, 0x0400000c, 0x805c0580, 0x0400000d, + 0x80102110, 0x8064c800, 0x82640580, 0x00000004, + 0x040207f5, 0x8060c000, 0x82600580, 0x00000020, + 0x040207eb, 0x4813c857, 0x82000540, 0x00000001, + 0x5c00c800, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x59a80026, 0x8c000512, 0x02020800, 0x001006ba, + 0x1c01f000, 0x00007eef, 0x00007de8, 0x00007ce4, + 0x000080e2, 0x00007be1, 0x000080e0, 0x000080dc, + 0x000080da, 0x00007ad9, 0x000080d6, 0x000080d5, + 0x000080d4, 0x000080d3, 0x000080d2, 0x000080d1, + 0x000079ce, 0x000078cd, 0x000080cc, 0x000080cb, + 0x000080ca, 0x000080c9, 0x000080c7, 0x000080c6, + 0x000077c5, 0x000076c3, 0x000080bc, 0x000080ba, + 0x000075b9, 0x000080b6, 0x000074b5, 0x000073b4, + 0x000072b3, 0x000080b2, 0x000080b1, 0x000080ae, + 0x000071ad, 0x000080ac, 0x000070ab, 0x00006faa, + 0x00006ea9, 0x000080a7, 0x00006da6, 0x00006ca5, + 0x00006ba3, 0x00006a9f, 0x0000699e, 0x0000689d, + 0x0000809b, 0x00008098, 0x00006797, 0x00006690, + 0x0000658f, 0x00006488, 0x00006384, 0x00006282, + 0x00008081, 0x00008080, 0x0000617c, 0x0000607a, + 0x00008079, 0x00005f76, 0x00008075, 0x00008074, + 0x00008073, 0x00008072, 0x00008071, 0x0000806e, + 0x00005e6d, 0x0000806c, 0x00005d6b, 0x00005c6a, + 0x00005b69, 0x00008067, 0x00005a66, 0x00005965, + 0x00005863, 0x0000575c, 0x0000565a, 0x00005559, + 0x00008056, 0x00008055, 0x00005454, 0x00005353, + 0x00005252, 0x00005151, 0x0000504e, 0x00004f4d, + 0x0000804c, 0x0000804b, 0x00004e4a, 0x00004d49, + 0x00008047, 0x00004c46, 0x00008045, 0x00008043, + 0x0000803c, 0x0000803a, 0x00008039, 0x00008036, + 0x00004b35, 0x00008034, 0x00004a33, 0x00004932, + 0x00004831, 0x0000802e, 0x0000472d, 0x0000462c, + 0x0000452b, 0x0000442a, 0x00004329, 0x00004227, + 0x00008026, 0x00008025, 0x00004123, 0x0000401f, + 0x00003f1e, 0x00003e1d, 0x00003d1b, 0x00003c18, + 0x00008017, 0x00008010, 0x00003b0f, 0x00003a08, + 0x00008004, 0x00003902, 0x00008001, 0x00008000, + 0x00008000, 0x00003800, 0x00003700, 0x00003600, + 0x00008000, 0x00003500, 0x00008000, 0x00008000, + 0x00008000, 0x00003400, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00003300, 0x00003200, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00003100, 0x00003000, 0x00008000, 0x00008000, + 0x00002f00, 0x00008000, 0x00002e00, 0x00002d00, + 0x00002c00, 0x00008000, 0x00008000, 0x00008000, + 0x00002b00, 0x00008000, 0x00002a00, 0x00002900, + 0x00002800, 0x00008000, 0x00002700, 0x00002600, + 0x00002500, 0x00002400, 0x00002300, 0x00002200, + 0x00008000, 0x00008000, 0x00002100, 0x00002000, + 0x00001f00, 0x00001e00, 0x00001d00, 0x00001c00, + 0x00008000, 0x00008000, 0x00001b00, 0x00001a00, + 0x00008000, 0x00001900, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00001800, 0x00008000, 0x00001700, 0x00001600, + 0x00001500, 0x00008000, 0x00001400, 0x00001300, + 0x00001200, 0x00001100, 0x00001000, 0x00000f00, + 0x00008000, 0x00008000, 0x00000e00, 0x00000d00, + 0x00000c00, 0x00000b00, 0x00000a00, 0x00000900, + 0x00008000, 0x00008000, 0x00000800, 0x00000700, + 0x00008000, 0x00000600, 0x00008000, 0x00008000, + 0x00008000, 0x00000500, 0x00000400, 0x00000300, + 0x00008000, 0x00000200, 0x00008000, 0x00008000, + 0x00008000, 0x00000100, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00000000, 0x00008000, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00008000, 0x00008000, 0x00008000, 0x00008000, + 0x00008000, 0x0201f800, 0x00100819, 0x02000800, + 0x00100615, 0x492f4016, 0x1c01f000, 0x83a0ac00, + 0x00000006, 0x83a00580, 0x0010b2a0, 0x0400000c, + 0x492fc857, 0x812e59c0, 0x02000800, 0x00100615, + 0x832ca400, 0x00000006, 0x4200b000, 0x0000000d, + 0x0201f800, 0x0010a93e, 0x0401f00f, 0x4200b000, + 0x00000010, 0x83e0a400, 0x00000020, 0x50500000, + 0x8050a000, 0x50500800, 0x900409c0, 0x80040540, + 0x4400a800, 0x8050a000, 0x8054a800, 0x8058b040, + 0x040207f7, 0x1c01f000, 0x59a00206, 0x82000c80, + 0x0000007f, 0x040210c9, 0x59a80821, 0x0c01f001, + 0x00102066, 0x001020a6, 0x001020a6, 0x001020f0, + 0x00102112, 0x001020a6, 0x00102066, 0x00102134, + 0x00102145, 0x001020a6, 0x001020a6, 0x00102152, + 0x0010216a, 0x00102182, 0x001020a6, 0x001021b1, + 0x001021e3, 0x001020a6, 0x0010220c, 0x001020a6, + 0x00102269, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001020a6, 0x00102280, 0x001022b9, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001022ee, 0x001020a6, 0x00102340, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x00102345, + 0x001023be, 0x001020a6, 0x001023c5, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001023c7, 0x00102445, 0x00102585, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x00102594, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001025b1, 0x00102604, 0x00102660, 0x00102674, + 0x00102696, 0x001028d1, 0x00102c60, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001020a6, 0x001020a6, 0x001020a6, 0x00102d9f, + 0x00102e13, 0x001020a6, 0x001020a6, 0x00102e81, + 0x001020a6, 0x00102f1f, 0x00102fd1, 0x001020a6, + 0x001020a6, 0x00103008, 0x00103064, 0x001020a6, + 0x001030bc, 0x00103220, 0x001020a6, 0x00103234, + 0x001032bf, 0x001020a6, 0x001020a6, 0x001020a6, + 0x001020a6, 0x0010332f, 0x00103333, 0x00103352, + 0x001020a6, 0x001033f4, 0x001020a6, 0x001020a6, + 0x00103421, 0x001020a6, 0x0010344f, 0x001020a6, + 0x001020a6, 0x001034b6, 0x001035c3, 0x00103620, + 0x001020a6, 0x00103686, 0x001020a6, 0x001020a6, + 0x001036db, 0x0010373e, 0x001020a6, 0x48efc857, + 0x4031d800, 0x58ef400b, 0x58ec0002, 0x82000580, + 0x00000200, 0x04000045, 0x48efc857, 0x4a034206, + 0x00004000, 0x0201f800, 0x0010382f, 0x83a00580, + 0x0010b2a0, 0x0400000d, 0x58ee580a, 0x4d2c0000, + 0x0401f856, 0x41a25800, 0x0201f800, 0x0010083a, + 0x40ee5800, 0x0201f800, 0x0010083a, 0x5c025800, + 0x0201f000, 0x00020381, 0x04026007, 0x59a0001d, + 0x84000542, 0x4803401d, 0x4a01d809, 0x0010207a, + 0x1c01f000, 0x59a00206, 0x82000d80, 0x00004000, + 0x04000006, 0x900001c0, 0x82000540, 0x00000011, + 0x4803c011, 0x0401f005, 0x900001c0, 0x82000540, + 0x00000010, 0x4803c011, 0x0401f844, 0x59e00017, + 0x8c000508, 0x0402000c, 0x4203e000, 0x30000001, + 0x4203e000, 0x40000000, 0x40ee5800, 0x0201f800, + 0x0010083a, 0x59a0001d, 0x84000504, 0x4803401d, + 0x1c01f000, 0x4a03c017, 0x00000000, 0x59a00206, + 0x82000d80, 0x00004000, 0x040007f0, 0x4a03c017, + 0x00000001, 0x0401f7ed, 0x4803c856, 0x4a034206, + 0x00004001, 0x0401f7c0, 0x4803c856, 0x4a034206, + 0x00004002, 0x0401f7bc, 0x4803c856, 0x4a034206, + 0x00004003, 0x0401f7b8, 0x4803c856, 0x4a034206, + 0x00004005, 0x0401f7b4, 0x4803c856, 0x4a034206, + 0x00004006, 0x0401f7b0, 0x4803c856, 0x4a034206, + 0x0000400b, 0x0401f7ac, 0x4803c856, 0x4a034206, + 0x0000400c, 0x0401f7a8, 0x4803c856, 0x4a034206, + 0x0000400c, 0x0401f7a4, 0x58eca80a, 0x8054a9c0, + 0x02000800, 0x00100615, 0x83a0a400, 0x00000006, + 0x8254ac00, 0x00000006, 0x4200b000, 0x0000000d, + 0x0201f000, 0x0010a93e, 0x59a00206, 0x4803c857, + 0x59a00406, 0x4803c857, 0x59a00207, 0x4803c857, + 0x59a00407, 0x4803c857, 0x59a00208, 0x4803c857, + 0x59a00408, 0x4803c857, 0x59a00209, 0x4803c857, + 0x83e0ac00, 0x00000020, 0x83a0a400, 0x00000006, + 0x4200b000, 0x00000010, 0x50500000, 0x4400a800, + 0x8054a800, 0x900001c0, 0x4400a800, 0x8054a800, + 0x8050a000, 0x8058b040, 0x040207f8, 0x1c01f000, + 0x59a00406, 0x800000c2, 0x59a00a07, 0x900409c0, + 0x80040540, 0x84000540, 0x59a00c07, 0x8c040d00, + 0x04000018, 0x59a8086f, 0x8c040d00, 0x040207bb, + 0x42000800, 0x00000064, 0x80040840, 0x04000007, + 0x4a030000, 0x00000001, 0x40000000, 0x59801000, + 0x8c081500, 0x040007f9, 0x04000005, 0x48030004, + 0x4a030000, 0x00000000, 0x0401f75c, 0x4a030000, + 0x00000000, 0x4a034406, 0x00000004, 0x040007a3, + 0x4803880e, 0x0401f755, 0x59a00406, 0x800000c2, + 0x59a00c07, 0x8c040d00, 0x0400001a, 0x59a8086f, + 0x8c040d00, 0x0402079d, 0x42000800, 0x00000064, + 0x80040840, 0x04000007, 0x4a030000, 0x00000001, + 0x40000000, 0x59801000, 0x8c081500, 0x040007f9, + 0x04000007, 0x48030004, 0x59800805, 0x48074406, + 0x4a030000, 0x00000000, 0x0401f73c, 0x4a030000, + 0x00000000, 0x4a034406, 0x00000004, 0x04000783, + 0x4803880e, 0x59c4080f, 0x48074406, 0x0401f733, + 0x59a01c06, 0x59a00207, 0x900c19c0, 0x800c1d40, + 0x580c0803, 0x80000580, 0x500c1000, 0x80080400, + 0x800c1800, 0x80040840, 0x040207fc, 0x48034406, + 0x900001c0, 0x48034207, 0x800001c0, 0x04000723, + 0x0401f76a, 0x4a034406, 0x00000004, 0x4a034207, + 0x00000000, 0x4a034407, 0x00000012, 0x59a8000d, + 0x48034208, 0x900001c0, 0x48034408, 0x4a034209, + 0x00000002, 0x0401f715, 0x59a00407, 0x59a01207, + 0x900811c0, 0x80081540, 0x59a00409, 0x59a01a09, + 0x900c19c0, 0x800c1d40, 0x59a00a08, 0x59a00408, + 0x900409c0, 0x80040d40, 0x59a0020a, 0x82002480, + 0x00000010, 0x04001755, 0x59a02406, 0x900001c0, + 0x80100540, 0x59a8280d, 0x80142480, 0x0400174f, + 0x0201f000, 0x0010383e, 0x59a00407, 0x59a01207, + 0x900811c0, 0x80081540, 0x59a00409, 0x59a01a09, + 0x900c19c0, 0x800c1d40, 0x59a00a08, 0x59a00408, + 0x900409c0, 0x80040d40, 0x59a0020a, 0x82002480, + 0x00000010, 0x0400173d, 0x59a02406, 0x900001c0, + 0x80100540, 0x59a8280d, 0x80142480, 0x04001737, + 0x0201f000, 0x00103841, 0x59a02407, 0x59a00207, + 0x901021c0, 0x80102540, 0x59a01a0a, 0x59a00406, + 0x900c19c0, 0x800c1d40, 0x41781000, 0x42000000, + 0x00001000, 0x50000000, 0x82000480, 0x24320001, + 0x04001016, 0x820c0580, 0x00007c00, 0x04000013, + 0x820c0480, 0x00007a00, 0x04001010, 0x820c0480, + 0x00007cff, 0x0402100d, 0x42000800, 0x00000064, + 0x80040840, 0x04000007, 0x4a030000, 0x00000001, + 0x40000000, 0x59800000, 0x8c000500, 0x040007f9, + 0x04000008, 0x80081000, 0x44101800, 0x800811c0, + 0x040006be, 0x4a030000, 0x00000000, 0x0401f6bb, + 0x4a030000, 0x00000000, 0x4a034406, 0x00000004, + 0x0401f702, 0x59a01a0a, 0x59a00406, 0x900c19c0, + 0x800c1d40, 0x41781000, 0x42000000, 0x00001000, + 0x50000000, 0x82000480, 0x24320001, 0x04001016, + 0x820c0580, 0x00007c00, 0x04000013, 0x820c0480, + 0x00007a00, 0x04001010, 0x820c0480, 0x00007cff, + 0x0402100d, 0x42000800, 0x00000064, 0x80040840, + 0x04000007, 0x4a030000, 0x00000001, 0x40000000, + 0x59800000, 0x8c000500, 0x040007f9, 0x0400000f, + 0x80081000, 0x500c0000, 0x82000d00, 0x0000ffff, + 0x48074207, 0x82000d00, 0xffff0000, 0x900409c0, + 0x48074407, 0x800811c0, 0x0400068c, 0x4a030000, + 0x00000000, 0x0401f689, 0x4a030000, 0x00000000, + 0x4a034406, 0x00000004, 0x0401f6d0, 0x59a00406, + 0x8c000500, 0x04000020, 0x59a01207, 0x59a01c07, + 0x59a02208, 0x480b5054, 0x480f5055, 0x48135056, + 0x59c40801, 0x82040d00, 0x00018000, 0x82040580, + 0x00000000, 0x04000009, 0x82040580, 0x00008000, + 0x04000008, 0x82040580, 0x00010000, 0x04000007, + 0x0201f800, 0x00100615, 0x40080000, 0x0401f004, + 0x400c0000, 0x0401f002, 0x40100000, 0x80000110, + 0x42000800, 0x000000e0, 0x0201f800, 0x001019b1, + 0x0401f007, 0x59a81054, 0x59a81855, 0x59a82056, + 0x480b4207, 0x480f4407, 0x48134208, 0x0401f65b, + 0x4d2c0000, 0x4d340000, 0x4d300000, 0x4d440000, + 0x59a28c06, 0x0201f800, 0x00020267, 0x04000006, + 0x5c028800, 0x5c026000, 0x5c026800, 0x5c025800, + 0x0401f69e, 0x59a04407, 0x59a00207, 0x900001c0, + 0x80204540, 0x0401f81e, 0x04000009, 0x4a034208, + 0x00000001, 0x4a034406, 0x0000ffff, 0x4a034207, + 0x0000ffff, 0x497b4407, 0x0401f00b, 0x0401f822, + 0x0400000e, 0x4a034208, 0x00000002, 0x59300402, + 0x48034406, 0x59300202, 0x48034207, 0x59300206, + 0x48034407, 0x5c028800, 0x5c026000, 0x5c026800, + 0x5c025800, 0x0401f631, 0x5c028800, 0x5c026000, + 0x5c026800, 0x5c025800, 0x0401f678, 0x4937c856, + 0x4823c856, 0x4d2c0000, 0x5934000f, 0x80025d40, + 0x04000007, 0x592c0005, 0x80200580, 0x592c0000, + 0x040207fb, 0x82000540, 0x00000001, 0x5c025800, + 0x1c01f000, 0x4823c857, 0x4d2c0000, 0x4d300000, + 0x42026000, 0x0010cfc0, 0x59300406, 0x82000d80, + 0x00000003, 0x04000004, 0x82000d80, 0x00000006, + 0x04020007, 0x59325808, 0x812e59c0, 0x04000004, + 0x592c0005, 0x80200580, 0x0400000a, 0x83326400, + 0x00000024, 0x41580000, 0x81300480, 0x040017ef, + 0x80000580, 0x5c026000, 0x5c025800, 0x1c01f000, + 0x82000540, 0x00000001, 0x5c026000, 0x5c025800, + 0x1c01f000, 0x83a00580, 0x0010b2a0, 0x0402063b, + 0x59a8006f, 0x8c000500, 0x04020003, 0x4a030000, + 0x00000000, 0x4a034206, 0x00004000, 0x4a03c011, + 0x40000010, 0x0401fe5d, 0x59e00017, 0x8c000508, + 0x04000003, 0x4a03c017, 0x00000000, 0x4203e000, + 0x30000001, 0x4203e000, 0x40000000, 0x0401f000, + 0x59a00c06, 0x800409c0, 0x04000007, 0x836c0580, + 0x00000000, 0x04000004, 0x4a034406, 0x0000001a, + 0x0401f62a, 0x42007000, 0x0010b33f, 0x58381c01, + 0x58382202, 0x8c040d00, 0x0400000b, 0x59a01207, + 0x82080500, 0x0000f003, 0x04020624, 0x82080480, + 0x00000841, 0x04021621, 0x82080480, 0x00000100, + 0x0400161e, 0x8c040d06, 0x04000003, 0x4a0378e4, + 0x000c0000, 0x8c040d04, 0x0400000c, 0x42000000, + 0x00001000, 0x50000000, 0x82000480, 0x24220001, + 0x04020003, 0x84040d04, 0x0401f004, 0x59e00002, + 0x84000548, 0x4803c002, 0x8c040d02, 0x04000005, + 0x42002800, 0x00007600, 0x4a002805, 0xd0000000, + 0x40040000, 0x800c0540, 0x48007401, 0x8c040d00, + 0x04000002, 0x48087202, 0x480f4406, 0x48134207, + 0x0401f5ae, 0x4d440000, 0x4d340000, 0x59a28c06, + 0x0201f800, 0x00020267, 0x04020009, 0x0201f800, + 0x00104842, 0x04000009, 0x4a034406, 0x00000009, + 0x5c026800, 0x5c028800, 0x0401f5ec, 0x5c026800, + 0x5c028800, 0x0401f5ed, 0x59a01207, 0x59a01c07, + 0x5934400a, 0x82203d00, 0x0000e000, 0x801c391a, + 0x8c081500, 0x04000019, 0x820c0d00, 0x00000007, + 0x82040580, 0x00000000, 0x04000007, 0x82040580, + 0x00000001, 0x04000004, 0x82040580, 0x00000003, + 0x040207eb, 0x82204500, 0xffff1fff, 0x800400da, + 0x80200540, 0x4802680a, 0x4c1c0000, 0x0201f800, + 0x0010698c, 0x0201f800, 0x00104afd, 0x0201f800, + 0x00106982, 0x5c003800, 0x481f4407, 0x5c026800, + 0x5c028800, 0x0401f579, 0x800409c0, 0x04000004, + 0x4a034406, 0x00000001, 0x0401f5c0, 0x836c0580, + 0x00000003, 0x04020010, 0x59a80010, 0x497b4406, + 0x0201f800, 0x00104e0d, 0x0400000f, 0x82000d00, + 0x00ffff00, 0x0402000c, 0x82000c00, 0x00101eb5, + 0x50040800, 0x80040910, 0x82041580, 0x00000080, + 0x04020004, 0x4a034406, 0x00000007, 0x0401f5ab, + 0x48074406, 0x82000d00, 0x0000ffff, 0x48074207, + 0x80000120, 0x48034407, 0x59a80026, 0x82001500, + 0x00000100, 0x480b4409, 0x8c000502, 0x0400001f, + 0x8c000506, 0x04000009, 0x82000d00, 0x0000000a, + 0x82040d80, 0x0000000a, 0x04020004, 0x4a034209, + 0x00000001, 0x0401f022, 0x8c00050a, 0x04000009, + 0x82000d00, 0x00000022, 0x82040d80, 0x00000022, + 0x04020004, 0x4a034209, 0x00000003, 0x0401f018, + 0x8c000508, 0x04000009, 0x82000d00, 0x00000012, + 0x82040d80, 0x00000012, 0x04020004, 0x4a034209, + 0x00000002, 0x0401f00e, 0x0201f800, 0x00104e0d, + 0x04020004, 0x4a034209, 0x00000004, 0x0401f52f, + 0x8c000506, 0x04000004, 0x4a034406, 0x00000005, + 0x0401f576, 0x4a034209, 0x00000000, 0x0401f527, + 0x59a80037, 0x48034407, 0x59a80038, 0x48034209, + 0x0401f522, 0x42007800, 0x0010b6eb, 0x59a00406, + 0x4803c857, 0x82000c80, 0x00000007, 0x0402156b, + 0x0c01f001, 0x00102354, 0x00102355, 0x00102363, + 0x00102376, 0x00102397, 0x00102354, 0x00102354, + 0x0401f562, 0x836c0580, 0x00000000, 0x0400055b, + 0x59a00a07, 0x59a00407, 0x900001c0, 0x80040d40, + 0x4807c857, 0x59a00a08, 0x59a00408, 0x900001c0, + 0x80040d40, 0x4807c857, 0x0401f056, 0x836c0580, + 0x00000000, 0x0400054d, 0x59a00407, 0x59a01207, + 0x900001c0, 0x80081540, 0x59a00408, 0x59a01a08, + 0x900001c0, 0x800c1d40, 0x42000000, 0x0010bfbe, + 0x480fc857, 0x480bc857, 0x42000800, 0x00001000, + 0x0201f000, 0x00103841, 0x59a00a07, 0x59a00407, + 0x900001c0, 0x80041d40, 0x820c0c80, 0x0010a971, + 0x0402153a, 0x820c0c80, 0x00100000, 0x04001537, + 0x480fc857, 0x823c7c00, 0x00000009, 0x503c0800, + 0x800409c0, 0x04000006, 0x823c0580, 0x0000000d, + 0x0400052e, 0x803c7800, 0x0401f7f9, 0x59e41001, + 0x82080d00, 0xfffeffcf, 0x4807c801, 0x440c7800, + 0x46001800, 0x0201f800, 0x800c1800, 0x46001800, + 0x00100608, 0x480bc801, 0x0401f022, 0x59a01a07, + 0x59a00407, 0x900001c0, 0x800c1d40, 0x480c7801, + 0x59a02208, 0x59a00408, 0x900001c0, 0x80102540, + 0x48107802, 0x59a00209, 0x80000040, 0x04001513, + 0x48007806, 0x80000000, 0x48007805, 0x42000800, + 0x00004000, 0x40001000, 0x0201f800, 0x001063cf, + 0x80000540, 0x04000003, 0x49787801, 0x0401f507, + 0x40040000, 0x800c1c00, 0x04001504, 0x480c7803, + 0x48107804, 0x49787808, 0x59a00409, 0x48007807, + 0x59e40001, 0x4803c857, 0x82000540, 0x00040000, + 0x4803c801, 0x0401f4a9, 0x59a80006, 0x48034406, + 0x59a80007, 0x48034207, 0x59a80008, 0x48034407, + 0x0401f4a2, 0x0201f800, 0x00100615, 0x4803c856, + 0x4a03c013, 0x03800300, 0x4a03c014, 0x03800380, + 0x59a00c06, 0x82040580, 0x000000a0, 0x04000004, + 0x82040580, 0x000000a2, 0x04020028, 0x59a0140a, + 0x82080480, 0x00000100, 0x04021024, 0x59a0020b, + 0x8c000500, 0x0402002b, 0x59a00a0a, 0x800409c0, + 0x0400001e, 0x82040480, 0x00000041, 0x0402101b, + 0x82040c00, 0x00000003, 0x82040d00, 0x000000fc, + 0x80040904, 0x59a00407, 0x59a01207, 0x900811c0, + 0x80081540, 0x59a00409, 0x59a01a09, 0x900c19c0, + 0x800c1d40, 0x0201f800, 0x0010381a, 0x04020006, + 0x4a034406, 0x00000002, 0x4a03c014, 0x03800000, + 0x0401f4be, 0x0201f800, 0x0010383e, 0x4a01d809, + 0x001023fd, 0x1c01f000, 0x4a03c014, 0x03800000, + 0x0401f4ba, 0x4031d800, 0x58ef400b, 0x58ee580d, + 0x58ec0002, 0x82000580, 0x00000200, 0x040004a7, + 0x59a00c06, 0x59a0140a, 0x59a0020b, 0x8c000500, + 0x04020031, 0x832e5c00, 0x00000004, 0x41783800, + 0x59a04a0a, 0x401c0000, 0x812c0400, 0x50004000, + 0x82201d00, 0x000000ff, 0x4c040000, 0x0401f8af, + 0x5c000800, 0x0400002d, 0x80244840, 0x04000028, + 0x80081000, 0x82201d00, 0x0000ff00, 0x800c1910, + 0x4c040000, 0x0401f8a5, 0x5c000800, 0x04000023, + 0x80244840, 0x0400001e, 0x80081000, 0x82201d00, + 0x00ff0000, 0x800c1920, 0x4c040000, 0x0401f89b, + 0x5c000800, 0x04000019, 0x80244840, 0x04000014, + 0x80081000, 0x82201d00, 0xff000000, 0x800c1930, + 0x4c040000, 0x0401f891, 0x5c000800, 0x0400000f, + 0x80244840, 0x0400000a, 0x80081000, 0x801c3800, + 0x0401f7d5, 0x59a0020a, 0x82000500, 0x000000ff, + 0x40001800, 0x0401f885, 0x04000004, 0x4a03c014, + 0x03800000, 0x0401f425, 0x4a03c014, 0x03800000, + 0x0401f46e, 0x4803c856, 0x4a03c013, 0x03800300, + 0x4a03c014, 0x03800380, 0x59a00c06, 0x82040580, + 0x000000a0, 0x04000004, 0x82040580, 0x000000a2, + 0x0402006e, 0x59a0140a, 0x82080480, 0x00000100, + 0x0402106a, 0x59a0020b, 0x8c000500, 0x0402005c, + 0x59a01a0a, 0x800c19c0, 0x04000064, 0x820c0480, + 0x00000041, 0x04021061, 0x0201f800, 0x0010381a, + 0x04020006, 0x4a034406, 0x00000002, 0x4a03c014, + 0x03800000, 0x0401f44d, 0x832e5c00, 0x00000004, + 0x41783800, 0x59a04a0a, 0x401c0000, 0x812c0400, + 0x40004000, 0x4c040000, 0x4c080000, 0x0401f877, + 0x5c001000, 0x5c000800, 0x04000048, 0x44144000, + 0x80244840, 0x0400002b, 0x80081000, 0x4c040000, + 0x4c080000, 0x0401f86d, 0x5c001000, 0x5c000800, + 0x0400003e, 0x50200000, 0x801428d0, 0x80140540, + 0x44004000, 0x80244840, 0x0400001e, 0x80081000, + 0x4c040000, 0x4c080000, 0x0401f860, 0x5c001000, + 0x5c000800, 0x04000031, 0x50200000, 0x801428e0, + 0x80140540, 0x44004000, 0x80244840, 0x04000011, + 0x80081000, 0x4c040000, 0x4c080000, 0x0401f853, + 0x5c001000, 0x5c000800, 0x04000024, 0x50200000, + 0x801428f0, 0x80140540, 0x44004000, 0x80244840, + 0x04000004, 0x80081000, 0x801c3800, 0x0401f7cb, + 0x59a00a0a, 0x82040c00, 0x00000003, 0x82040d00, + 0x000000fc, 0x80040904, 0x59a00407, 0x59a01207, + 0x900811c0, 0x80081540, 0x59a00409, 0x59a01a09, + 0x900c19c0, 0x800c1d40, 0x4a03c014, 0x03800000, + 0x412c0000, 0x0201f000, 0x00103841, 0x0401f833, + 0x04000006, 0x48174406, 0x4a03c014, 0x03800000, + 0x0201f000, 0x00102066, 0x4a03c014, 0x03800000, + 0x0201f000, 0x001020b2, 0x4a03c014, 0x03800000, + 0x0201f000, 0x001020b6, 0x0401f836, 0x04000010, + 0x0401f862, 0x0402000f, 0x40080800, 0x0401f85f, + 0x0402000c, 0x400c0800, 0x0401f85c, 0x04020009, + 0x0401f84b, 0x42000000, 0x00030d40, 0x80000040, + 0x040207ff, 0x82000540, 0x00000001, 0x1c01f000, + 0x0401f843, 0x80000580, 0x0401f7fd, 0x0401f821, + 0x0400000a, 0x82040d40, 0x00000001, 0x0401f84b, + 0x04020007, 0x0401f87e, 0x0401f898, 0x0401f838, + 0x82000540, 0x00000001, 0x1c01f000, 0x0401f834, + 0x80000580, 0x0401f7fd, 0x40041800, 0x0401f811, + 0x0400000c, 0x0401f83d, 0x0402000b, 0x40080800, + 0x0401f83a, 0x04020008, 0x400c0800, 0x0401ffe8, + 0x04000004, 0x0401f826, 0x82000540, 0x00000001, + 0x1c01f000, 0x0401f822, 0x80000580, 0x0401f7fd, + 0x4c040000, 0x42000800, 0x00000064, 0x4a03c013, + 0x03800300, 0x80040840, 0x04000016, 0x59e00013, + 0x82000500, 0x00000300, 0x82000580, 0x00000300, + 0x040207f7, 0x42000000, 0x00000064, 0x80000040, + 0x040207ff, 0x4a03c013, 0x01000000, 0x42000000, + 0x00000064, 0x80000040, 0x040207ff, 0x4a03c013, + 0x02000000, 0x82000540, 0x00000001, 0x0401f002, + 0x80000580, 0x5c000800, 0x1c01f000, 0x4a03c013, + 0x01000000, 0x42000000, 0x00000064, 0x80000040, + 0x040207ff, 0x4a03c013, 0x02000200, 0x42000000, + 0x00000064, 0x80000040, 0x040207ff, 0x4a03c013, + 0x01000100, 0x1c01f000, 0x42002000, 0x00000008, + 0x82040500, 0x00000080, 0x800000c2, 0x82000540, + 0x01000000, 0x4803c013, 0x42000000, 0x00000064, + 0x80000040, 0x040207ff, 0x4a03c013, 0x02000200, + 0x42000000, 0x00000064, 0x80000040, 0x040207ff, + 0x4a03c013, 0x02000000, 0x800408c2, 0x80102040, + 0x040207ec, 0x4a03c013, 0x01000100, 0x42000000, + 0x00000064, 0x80000040, 0x040207ff, 0x4a03c013, + 0x02000200, 0x42000000, 0x00000064, 0x80000040, + 0x040207ff, 0x59e00013, 0x82000500, 0x00000100, + 0x4a03c013, 0x02000000, 0x4c040000, 0x42000800, + 0x00000064, 0x59e00013, 0x82000500, 0x00000100, + 0x80040840, 0x04000003, 0x80000540, 0x040207fa, + 0x80000540, 0x5c000800, 0x1c01f000, 0x4a03c013, + 0x01000100, 0x42001000, 0x00000008, 0x80000d80, + 0x42000000, 0x00000064, 0x80000040, 0x040207ff, + 0x4a03c013, 0x02000200, 0x42000000, 0x00000064, + 0x80000040, 0x040207ff, 0x59e00013, 0x82000500, + 0x00000100, 0x80000110, 0x800408c2, 0x80040d40, + 0x4a03c013, 0x02000000, 0x80081040, 0x040207ed, + 0x40042800, 0x1c01f000, 0x4a03c013, 0x01000100, + 0x42000000, 0x00000064, 0x80000040, 0x040207ff, + 0x4a03c013, 0x02000200, 0x42000000, 0x00000064, + 0x80000040, 0x040207ff, 0x4a03c013, 0x02000000, + 0x1c01f000, 0x59a00407, 0x59a80837, 0x48035037, + 0x48074407, 0x59a00a09, 0x82040480, 0x00000014, + 0x04021003, 0x42000800, 0x000007d0, 0x59a80038, + 0x48075038, 0x48034209, 0x0201f000, 0x00102066, + 0x836c0580, 0x00000000, 0x0400000e, 0x59a80006, + 0x59a00c06, 0x80041580, 0x82081500, 0x00000040, + 0x02000000, 0x00102066, 0x80080580, 0x48035006, + 0x0201f800, 0x001006df, 0x0201f000, 0x00102066, + 0x59a00406, 0x59a80806, 0x48035006, 0x80040d80, + 0x8c040d0c, 0x02020800, 0x001006df, 0x59a00207, + 0x48035007, 0x59a00407, 0x48035008, 0x0201f000, + 0x00102066, 0x800409c0, 0x04000005, 0x4a034406, + 0x00000001, 0x0201f000, 0x001020b2, 0x0201f800, + 0x00104e0d, 0x04020005, 0x4a034406, 0x00000016, + 0x0201f000, 0x001020b2, 0x836c0580, 0x00000003, + 0x04000005, 0x4a034406, 0x00000007, 0x0201f000, + 0x001020b2, 0x59a00c06, 0x82040500, 0xffffff00, + 0x02020000, 0x001020b6, 0x82041580, 0x000000ff, + 0x04020007, 0x59a80010, 0x82000500, 0x000000ff, + 0x82001540, 0x0000ff00, 0x0401f011, 0x82040400, + 0x00101eb5, 0x50000000, 0x80000110, 0x82000580, + 0x00000080, 0x02000000, 0x001020b6, 0x59a80010, + 0x82000500, 0x000000ff, 0x80041580, 0x02000000, + 0x001020b6, 0x840409c0, 0x80041540, 0x0201f800, + 0x00020892, 0x04020005, 0x4a034406, 0x00000003, + 0x0201f000, 0x001020b2, 0x48ee6021, 0x480a621c, + 0x4a02641c, 0x0000bc09, 0x4a026406, 0x00000001, + 0x0201f800, 0x0010381a, 0x04020007, 0x0201f800, + 0x000208b4, 0x4a034406, 0x00000002, 0x0201f000, + 0x001020b2, 0x497a5a04, 0x497a5805, 0x4a025c04, + 0x00008000, 0x4a01d809, 0x00102657, 0x492e6008, + 0x42027000, 0x00000032, 0x0201f000, 0x000208d8, + 0x800409c0, 0x04000005, 0x4a034406, 0x00000001, + 0x0201f000, 0x001020b2, 0x0201f800, 0x00104e0d, + 0x04020005, 0x4a034406, 0x00000016, 0x0201f000, + 0x001020b2, 0x836c0580, 0x00000003, 0x04000005, + 0x4a034406, 0x00000007, 0x0201f000, 0x001020b2, + 0x59a00c06, 0x82040500, 0xffffff00, 0x02020000, + 0x001020b6, 0x82041580, 0x000000ff, 0x04020007, + 0x59a80010, 0x82000500, 0x000000ff, 0x82001540, + 0x0000ff00, 0x0401f011, 0x82040400, 0x00101eb5, + 0x50000000, 0x80000110, 0x82000580, 0x00000080, + 0x02000000, 0x001020b6, 0x59a80010, 0x82000500, + 0x000000ff, 0x80041580, 0x02000000, 0x001020b6, + 0x840409c0, 0x80041540, 0x0201f800, 0x00020892, + 0x04020005, 0x4a034406, 0x00000003, 0x0201f000, + 0x001020b2, 0x48ee6021, 0x480a621c, 0x4a02641c, + 0x0000bc05, 0x4a026406, 0x00000001, 0x0201f800, + 0x0010381a, 0x04020007, 0x0201f800, 0x000208b4, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x497a5a04, 0x497a5805, 0x4a025c04, 0x00008000, + 0x4a01d809, 0x00102657, 0x492e6008, 0x42027000, + 0x00000032, 0x0201f000, 0x000208d8, 0x592c0005, + 0x82000580, 0x01000000, 0x02020000, 0x00102066, + 0x4a034406, 0x00000004, 0x0201f000, 0x001020b2, + 0x497b4406, 0x497b4207, 0x0201f800, 0x0010393e, + 0x04000008, 0x59a80066, 0x59a8086a, 0x80040480, + 0x59a80867, 0x48074406, 0x80041480, 0x480b4207, + 0x49674407, 0x59a8000e, 0x48034209, 0x495f4409, + 0x59a80020, 0x4803420b, 0x0201f000, 0x00102066, + 0x800409c0, 0x04000005, 0x4a034406, 0x00000001, + 0x0201f000, 0x001020b2, 0x59a00406, 0x8c000500, + 0x0402000f, 0x59a80069, 0x81640480, 0x04001008, + 0x59a8000b, 0x81500580, 0x04000009, 0x59a8006a, + 0x59a81066, 0x80080580, 0x04000005, 0x4a034406, + 0x00000018, 0x0201f000, 0x001020b2, 0x59a80005, + 0x84000558, 0x48035005, 0x82000540, 0x00000001, + 0x0201f800, 0x00101668, 0x0201f800, 0x00103a9f, + 0x0201f000, 0x00102066, 0x4803c856, 0x800409c0, + 0x02020000, 0x001020ba, 0x59a00406, 0x8c00051e, + 0x04000008, 0x4803c856, 0x59a0020b, 0x82000480, + 0x00000800, 0x04001015, 0x0201f000, 0x001020b6, + 0x4803c856, 0x59a0020b, 0x599c0a01, 0x80040480, + 0x04021003, 0x0201f000, 0x001020b6, 0x59a8000e, + 0x81640580, 0x04000009, 0x4a034406, 0x00000018, + 0x0201f000, 0x001020b2, 0x4a034406, 0x00000005, + 0x0201f000, 0x001020b2, 0x59a80026, 0x8c00050a, + 0x040007fa, 0x59a00406, 0x8c00051e, 0x04000036, + 0x0201f800, 0x00020892, 0x040007f4, 0x0201f800, + 0x0010381a, 0x040007f1, 0x497a5a04, 0x59a00406, + 0x4802620a, 0x59a00209, 0x4802640a, 0x59a00409, + 0x4802620b, 0x59a0020d, 0x4802620c, 0x59a0040d, + 0x4802640c, 0x59a0020e, 0x4802620d, 0x59a0040e, + 0x4802640d, 0x59a00210, 0x4802620e, 0x59a00410, + 0x4802640e, 0x59a0020b, 0x82000500, 0x0000fffc, + 0x80000104, 0x4802640b, 0x0401f9d9, 0x040007d7, + 0x48ee6021, 0x58ee580d, 0x5930020e, 0x59301c0e, + 0x900c19c0, 0x800c1d40, 0x5930020c, 0x5930140c, + 0x900811c0, 0x80081540, 0x592c0a05, 0x832c0400, + 0x00000006, 0x0201f800, 0x0010383e, 0x4a01d809, + 0x00102846, 0x4a034000, 0x00000001, 0x49334001, + 0x1c01f000, 0x0201f800, 0x0010698c, 0x0201f800, + 0x00100b29, 0x0401f86d, 0x497b5057, 0x4201d000, + 0x00002710, 0x0201f800, 0x00105e06, 0x59c40880, + 0x4c040000, 0x59c408a3, 0x4c040000, 0x497b4002, + 0x0401f876, 0x0401f893, 0x4a03a005, 0x10000000, + 0x0401f8b4, 0x0401f901, 0x04000048, 0x59c80001, + 0x800001c0, 0x040007fc, 0x59c80018, 0x82000500, + 0xf0000000, 0x59c00808, 0x82040d00, 0x0fffffff, + 0x80040540, 0x48038008, 0x0201f800, 0x00100f0f, + 0x59c00006, 0x4a038006, 0x10000000, 0x59c00009, + 0x82000d00, 0x00e00000, 0x04020024, 0x4a03900d, + 0x00000000, 0x59c80020, 0x82000500, 0xff000000, + 0x82000580, 0x32000000, 0x0402001c, 0x4a03900d, + 0x00000001, 0x59c80020, 0x82000500, 0xff000000, + 0x82000580, 0xe1000000, 0x04020014, 0x4a03900d, + 0x00000000, 0x59c80020, 0x82000500, 0x00ffffff, + 0x4a03900d, 0x00000000, 0x59c80821, 0x82040d00, + 0x00ffffff, 0x80040580, 0x04020008, 0x59a80010, + 0x80040580, 0x04020005, 0x59c40005, 0x82000500, + 0x000000f0, 0x04000006, 0x4803c856, 0x0401f8d7, + 0x4a035057, 0x00000001, 0x0401f002, 0x0401f8e1, + 0x42000000, 0x00000064, 0x80000040, 0x02000800, + 0x00100615, 0x59c00807, 0x82040d00, 0x0000000c, + 0x040007fa, 0x0401f003, 0x4a035057, 0x00000001, + 0x0401f8da, 0x0201f800, 0x00106c8a, 0x0401f818, + 0x4201d000, 0x000186a0, 0x0201f800, 0x00105e06, + 0x5c000800, 0x480788a3, 0x5c000800, 0x48078880, + 0x59a80057, 0x800001c0, 0x02000000, 0x00102066, + 0x0201f000, 0x001020be, 0x599c0201, 0x48035059, + 0x41780800, 0x42001000, 0x00003b10, 0x0201f800, + 0x001063ee, 0x480b505a, 0x1c01f000, 0x0201f800, + 0x00106982, 0x59b800ea, 0x82000500, 0x00000007, + 0x82000580, 0x00000003, 0x04020003, 0x4a0370e8, + 0x00000001, 0x1c01f000, 0x42038000, 0x00007700, + 0x4a038006, 0x30000000, 0x59c00007, 0x8c00050a, + 0x040207fe, 0x59c00006, 0x59a00209, 0x59a00c09, + 0x900409c0, 0x80040d40, 0x48078001, 0x59a0020e, + 0x59a00c0e, 0x900409c0, 0x80040d40, 0x48078000, + 0x59a0020b, 0x82000500, 0x0000fffc, 0x48038002, + 0x48038003, 0x48038005, 0x497b9009, 0x59e00003, + 0x82000540, 0x00008060, 0x4803c003, 0x1c01f000, + 0x41780800, 0x8007a0ca, 0x83d3a400, 0x00007600, + 0x42000800, 0x00000040, 0x0201f800, 0x00101395, + 0x4a03a00a, 0x00000001, 0x4a03a005, 0x20000000, + 0x59d00006, 0x4a03a005, 0x30000000, 0x59d00006, + 0x8c00050a, 0x040207fe, 0x59d00005, 0x59a00210, + 0x59a00c10, 0x900409c0, 0x80040d40, 0x4807a001, + 0x59a0020d, 0x59a00c0d, 0x900409c0, 0x80040d40, + 0x4807a000, 0x59a0020b, 0x82000500, 0x0000fffc, + 0x4803a003, 0x4803a002, 0x4803a008, 0x1c01f000, + 0x59a00002, 0x4803c857, 0x800001c0, 0x0402004a, + 0x59a8005a, 0x48038880, 0x59c400a3, 0x82000540, + 0x00002008, 0x8400053a, 0x480388a3, 0x59c40008, + 0x8400054e, 0x82000500, 0xffffffe1, 0x48038808, + 0x59c80040, 0x84000534, 0x48039040, 0x0401f902, + 0x04020013, 0x59a80010, 0x800000d0, 0x82000540, + 0x00000011, 0x48039120, 0x59a80010, 0x82000500, + 0x00ffffff, 0x82000540, 0x32000000, 0x48039121, + 0x4a039123, 0xe1290008, 0x59a80010, 0x82000500, + 0x00ffffff, 0x48039122, 0x0401f016, 0x59a80010, + 0x82000500, 0x000000ff, 0x900009c0, 0x840001c0, + 0x80040540, 0x82000540, 0x00000000, 0x48039120, + 0x59a80010, 0x82000500, 0x000000ff, 0x82000540, + 0x01000000, 0x48039121, 0x4a039123, 0x08210008, + 0x59a80010, 0x82000500, 0x000000ff, 0x48039122, + 0x497b9124, 0x59a80c5b, 0x80040800, 0x4807545b, + 0x900409c0, 0x82040540, 0x0000aaaa, 0x48039125, + 0x497b9126, 0x497b9127, 0x0401f8cf, 0x04020004, + 0x4a039100, 0x0000e980, 0x0401f003, 0x4a039100, + 0x0000e9a0, 0x1c01f000, 0x82000540, 0x00000001, + 0x0402500d, 0x4203e000, 0x80000000, 0x40e81000, + 0x41780800, 0x42000000, 0x00000064, 0x0201f800, + 0x001063ee, 0x59940024, 0x80080400, 0x48032824, + 0x80000580, 0x1c01f000, 0x4d900000, 0x4dd00000, + 0x4da40000, 0x4d140000, 0x417a3000, 0x0201f800, + 0x00106e2f, 0x0201f800, 0x00106b13, 0x5c022800, + 0x5c034800, 0x5c03a000, 0x5c032000, 0x1c01f000, + 0x59c80007, 0x8c000500, 0x04000003, 0x4a03900d, + 0x00000030, 0x1c01f000, 0x4a038805, 0x00020000, + 0x42000800, 0x0000003c, 0x0201f800, 0x00101395, + 0x4a038891, 0x0000ffff, 0x59c80035, 0x48039035, + 0x4a03900d, 0x00000040, 0x42038000, 0x00007700, + 0x0201f800, 0x00100f0f, 0x42038000, 0x00007720, + 0x0201f800, 0x00100f0f, 0x4a03a005, 0x20000000, + 0x4a03a005, 0x30000000, 0x59d00806, 0x8c040d0a, + 0x040207fe, 0x1c01f000, 0x4d300000, 0x4031d800, + 0x58ef400b, 0x58ee580d, 0x58ec0002, 0x82000580, + 0x00000200, 0x5c026000, 0x02000000, 0x001020aa, + 0x4d300000, 0x59a26001, 0x59a00000, 0x4000b000, + 0x80000000, 0x48034000, 0x592c0001, 0x80000540, + 0x0400001e, 0x40025800, 0x8058b040, 0x040207fb, + 0x58ec1007, 0x58ec1808, 0x592c0a05, 0x4d2c0000, + 0x58ec000d, 0x40025800, 0x592c0204, 0x5c025800, + 0x82000580, 0x00000103, 0x04000008, 0x832c0400, + 0x00000006, 0x0201f800, 0x0010383e, 0x4a01d809, + 0x00102846, 0x0401f007, 0x832c0400, 0x00000006, + 0x0201f800, 0x00103841, 0x4a01d809, 0x00102846, + 0x5c026000, 0x1c01f000, 0x58ec000d, 0x40025800, + 0x592c0204, 0x82000580, 0x00000103, 0x04020006, + 0x0201f800, 0x000208b4, 0x5c026000, 0x0201f000, + 0x00102066, 0x58ec000d, 0x40025800, 0x592c0404, + 0x8400055e, 0x48025c04, 0x42028800, 0x000007fd, + 0x42003000, 0x00fffffd, 0x0201f800, 0x001043fc, + 0x04000003, 0x80000580, 0x0401f004, 0x59a26001, + 0x0201f800, 0x00109146, 0x5c026000, 0x02000000, + 0x001020b2, 0x4d300000, 0x4a01d809, 0x00102899, + 0x0401f7dc, 0x592c0005, 0x82000580, 0x01000000, + 0x02000000, 0x001020be, 0x4d300000, 0x59a26001, + 0x5930020b, 0x59301c0a, 0x900001c0, 0x800c1d40, + 0x5930040d, 0x5930120d, 0x900001c0, 0x80081540, + 0x592c0a05, 0x832c0400, 0x00000006, 0x0201f800, + 0x00103841, 0x4a01d809, 0x00102846, 0x4a034000, + 0x00000001, 0x5c026000, 0x1c01f000, 0x4933c857, + 0x4c300000, 0x5930040b, 0x82000c80, 0x0000000e, + 0x04001004, 0x4a025a05, 0x0000000e, 0x0401f003, + 0x48025a05, 0x0401f00c, 0x800409c0, 0x0400000a, + 0x4c040000, 0x0201f800, 0x0010381a, 0x5c000800, + 0x04000003, 0x40040000, 0x0401f7f0, 0x80000580, + 0x0401f003, 0x82000540, 0x00000001, 0x5c006000, + 0x1c01f000, 0x59a00206, 0x82000580, 0x00000044, + 0x1c01f000, 0x4807c857, 0x800409c0, 0x0400000c, + 0x0201f800, 0x001016c1, 0x04020009, 0x42000000, + 0x00000002, 0x0201f800, 0x001018fa, 0x42000000, + 0x00000002, 0x0201f800, 0x00101892, 0x59a00406, + 0x82000500, 0x00000007, 0x0c01f001, 0x001028ed, + 0x00102902, 0x00102918, 0x001028eb, 0x001028eb, + 0x001028eb, 0x001028eb, 0x001028eb, 0x0201f000, + 0x001020b6, 0x42000800, 0x000000c0, 0x0201f800, + 0x001019ac, 0x82040540, 0x00000002, 0x42000800, + 0x000000c0, 0x0201f800, 0x001019b1, 0x42000800, + 0x00000000, 0x0201f800, 0x001019ac, 0x82040540, + 0x00000008, 0x42000800, 0x00000000, 0x0201f800, + 0x001019b1, 0x0401f00b, 0x42000800, 0x000000c0, + 0x0201f800, 0x001019ac, 0x82040540, 0x00000001, + 0x42000800, 0x000000c0, 0x0201f800, 0x001019b1, + 0x59c80040, 0x4c000000, 0x59a80010, 0x4c000000, + 0x59c400a3, 0x4c000000, 0x59c40008, 0x4c000000, + 0x0401f911, 0x04000021, 0x0201f800, 0x00100615, + 0x59a80821, 0x800409c0, 0x02020000, 0x001020ba, + 0x0201f800, 0x00104e0d, 0x04020005, 0x4a034406, + 0x00000016, 0x0201f000, 0x001020b2, 0x836c0580, + 0x00000003, 0x02020000, 0x001020ba, 0x59c408a4, + 0x82040d00, 0x0000000f, 0x82040580, 0x00000000, + 0x02020000, 0x001020ba, 0x59c80040, 0x4c000000, + 0x59a80010, 0x4c000000, 0x59c400a3, 0x4c000000, + 0x59c40008, 0x4c000000, 0x59c40080, 0x4c000000, + 0x59a0020f, 0x59a0bc0f, 0x905cb9c0, 0x805cbd40, + 0x41784800, 0x41785000, 0x41785800, 0x41789000, + 0x41789800, 0x0401fe21, 0x0201f800, 0x0010698c, + 0x0201f800, 0x00100b29, 0x4178c000, 0x497b4002, + 0x0401f95c, 0x0401f9aa, 0x59a0020c, 0x59a00c0c, + 0x80040d40, 0x04000002, 0x0401f9fb, 0x0401f9fa, + 0x0401fe68, 0x8060c1c0, 0x04020014, 0x0401fa98, + 0x0401feb2, 0x0402000e, 0x0201f800, 0x00101941, + 0x04020008, 0x4a034406, 0x00000017, 0x0201f800, + 0x001020b2, 0x4203e000, 0x50000000, 0x0401f000, + 0x42005800, 0x0000aaaa, 0x0401f058, 0x59c80001, + 0x800001c0, 0x040007ee, 0x59c80801, 0x800409c0, + 0x04000006, 0x0401fa70, 0x40240000, 0x80280540, + 0x802c0540, 0x0402004d, 0x59a00002, 0x82000580, + 0xfeedbeef, 0x04000004, 0x42008800, 0x10000000, + 0x0401f003, 0x42008800, 0x10000004, 0x0401fa19, + 0x4a034002, 0xfeedbeef, 0x0401fa71, 0x0401fa97, + 0x0401fea8, 0x59c40005, 0x8c000534, 0x04000004, + 0x42005800, 0x0000bbbb, 0x0401f038, 0x0401fe83, + 0x04020007, 0x42005800, 0x0000cccc, 0x485f420f, + 0x905cb9c0, 0x485f440f, 0x0401f030, 0x59a0040c, + 0x800001c0, 0x0400000e, 0x59a26000, 0x5930000d, + 0x800001c0, 0x040207be, 0x59a26001, 0x5930080d, + 0x800409c0, 0x040207ba, 0x804891c0, 0x040207b8, + 0x804c99c0, 0x040207b6, 0x0401f87a, 0x805cb840, + 0x04000005, 0x40240000, 0x80280540, 0x802c0540, + 0x0402001a, 0x42000000, 0x00030d40, 0x80000040, + 0x04020012, 0x59c00007, 0x82000500, 0x000501c0, + 0x0402000b, 0x0201f800, 0x00101941, 0x04020008, + 0x4a034406, 0x00000017, 0x0201f800, 0x001020b2, + 0x4203e000, 0x50000000, 0x0401f000, 0x42005800, + 0x0000dddd, 0x0401f005, 0x59c00807, 0x82040d00, + 0x0000000c, 0x040007ea, 0x0401fe5c, 0x59a0040c, + 0x800001c0, 0x04000002, 0x0401f856, 0x0401fe6b, + 0x40240000, 0x80280540, 0x802c0540, 0x04020003, + 0x805cb9c0, 0x04020781, 0x0201f800, 0x00106c8a, + 0x0401fda3, 0x4201d000, 0x000186a0, 0x0201f800, + 0x00105e06, 0x5c000800, 0x48078880, 0x5c000800, + 0x48078808, 0x5c000800, 0x480788a3, 0x5c000800, + 0x48075010, 0x5c000800, 0x48079040, 0x0201f800, + 0x001009b6, 0x59a00406, 0x82000500, 0x00000003, + 0x82000580, 0x00000002, 0x0400002c, 0x42000800, + 0x000000c0, 0x0201f800, 0x001019ac, 0x82040500, + 0xfffffffc, 0x42000800, 0x000000c0, 0x0201f800, + 0x001019b1, 0x42000800, 0x00000000, 0x0201f800, + 0x001019ac, 0x82040500, 0xfffffff7, 0x42000800, + 0x00000000, 0x0201f800, 0x001019b1, 0x42000800, + 0x00000000, 0x0201f800, 0x001019ac, 0x82040500, + 0xfffffffb, 0x42000800, 0x00000000, 0x0201f800, + 0x001019b1, 0x4a0388a7, 0x0000f7f7, 0x42006000, + 0xbeffffff, 0x42006800, 0x80018000, 0x0201f800, + 0x001040ad, 0x42006000, 0xfffeffff, 0x41786800, + 0x0201f800, 0x001040ad, 0x402c0000, 0x80280540, + 0x80240540, 0x02000000, 0x00102066, 0x48274406, + 0x482b4207, 0x482f4407, 0x0201f000, 0x001020c2, + 0x59a26000, 0x813261c0, 0x0400000e, 0x59325808, + 0x812e59c0, 0x0400000b, 0x0201f800, 0x000208b4, + 0x0201f800, 0x00100843, 0x59a26001, 0x59325808, + 0x0201f800, 0x000208b4, 0x0201f800, 0x00100843, + 0x1c01f000, 0x42000800, 0x000000ef, 0x0201f800, + 0x00101655, 0x59c400a3, 0x8400055a, 0x8400053a, + 0x480388a3, 0x0201f800, 0x001016ac, 0x0402000a, + 0x42000000, 0x00000001, 0x0201f800, 0x001018fa, + 0x42000000, 0x00000001, 0x0201f800, 0x00101892, + 0x0401f013, 0x0201f800, 0x001016b3, 0x04020008, + 0x41780000, 0x0201f800, 0x001018fa, 0x41780000, + 0x0201f800, 0x00101892, 0x0401f009, 0x42000000, + 0x00000002, 0x0201f800, 0x001018fa, 0x42000000, + 0x00000002, 0x0201f800, 0x00101892, 0x42000800, + 0x00000000, 0x0201f800, 0x001019ac, 0x82040540, + 0x00000004, 0x42000800, 0x00000000, 0x0201f800, + 0x001019b1, 0x4201d000, 0x00000014, 0x0201f800, + 0x00105dd2, 0x59c40008, 0x8400054e, 0x82000500, + 0xffffffe1, 0x48038808, 0x4a0388a7, 0x0000f7f7, + 0x42001000, 0x04000001, 0x0201f800, 0x001019aa, + 0x42006000, 0xbe20bfff, 0x42006800, 0x80018000, + 0x0201f800, 0x001040ad, 0x42006000, 0xfffeffff, + 0x41786800, 0x0201f800, 0x001040ad, 0x4200b000, + 0x00001388, 0x4201d000, 0x00000014, 0x4c580000, + 0x0201f800, 0x00105dd2, 0x0201f800, 0x00101941, + 0x5c00b000, 0x04000004, 0x8058b040, 0x040207f6, + 0x0401f025, 0x59c40005, 0x8c000534, 0x04020007, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000580, + 0x00000008, 0x0402001c, 0x42006000, 0x00020000, + 0x0201f800, 0x001040b2, 0x4201d000, 0x00000064, + 0x0201f800, 0x00105dd2, 0x42006000, 0xfeffffff, + 0x42006800, 0x02000000, 0x0201f800, 0x001040ad, + 0x42006000, 0xfdffffff, 0x41786800, 0x0201f800, + 0x001040ad, 0x4a038805, 0x04000001, 0x59c400a4, + 0x82000500, 0x0000000f, 0x82000580, 0x00000000, + 0x04000003, 0x82000540, 0x00000001, 0x1c01f000, + 0x4803c856, 0x42038000, 0x00007700, 0x0201f800, + 0x00100f0f, 0x59c00006, 0x59a0040c, 0x800001c0, + 0x0400003f, 0x59a03c0c, 0x59a00209, 0x59a01c09, + 0x900c19c0, 0x800c1d40, 0x59a0020e, 0x59a0240e, + 0x901021c0, 0x80102540, 0x59a0020b, 0x82000500, + 0x0000fffc, 0x59a0140b, 0x900811c0, 0x80081540, + 0x480b8003, 0x0201f800, 0x00020892, 0x02000800, + 0x00100615, 0x49334000, 0x0201f800, 0x0010082a, + 0x4a025a04, 0x00000018, 0x4a025805, 0x00abcdef, + 0x492e6008, 0x492e600b, 0x481e600d, 0x4a02600c, + 0x00000004, 0x832c0400, 0x00000011, 0x4802600a, + 0x42001000, 0x0000000c, 0x821c0d80, 0x00000001, + 0x04000004, 0x801c3840, 0x0401f963, 0x0401f004, + 0x41783800, 0x0401f960, 0x0401f011, 0x821c0c80, + 0x00000005, 0x04001005, 0x40043800, 0x42001000, + 0x0000003c, 0x0401f006, 0x80001580, 0x82081400, + 0x0000000c, 0x801c3840, 0x040207fd, 0x832c0400, + 0x00000005, 0x0401f950, 0x040207f1, 0x497b9009, + 0x59e00003, 0x82000540, 0x00008060, 0x4803c003, + 0x4a038009, 0x00e00000, 0x1c01f000, 0x4803c856, + 0x41780800, 0x8007a0ca, 0x83d3a400, 0x00007600, + 0x42000800, 0x00000040, 0x0201f800, 0x00101395, + 0x4a03a00a, 0x00000001, 0x4a03a005, 0x20000000, + 0x59d00006, 0x4a03a005, 0x30000000, 0x59d00006, + 0x8c00050a, 0x040207fe, 0x59d00005, 0x59a0020c, + 0x800001c0, 0x0400003f, 0x59a03a0c, 0x59a00210, + 0x59a01c10, 0x900c19c0, 0x800c1d40, 0x59a0020d, + 0x59a0240d, 0x901021c0, 0x80102540, 0x59a0120b, + 0x82081500, 0x0000fffc, 0x59a0040b, 0x900001c0, + 0x80081540, 0x480ba003, 0x0201f800, 0x00020892, + 0x02000800, 0x00100615, 0x49334001, 0x0201f800, + 0x0010082a, 0x4a025a04, 0x00000018, 0x4a025805, + 0x00abcdef, 0x492e6008, 0x492e600b, 0x481e600d, + 0x4a02600c, 0x00000004, 0x832c0400, 0x00000011, + 0x4802600a, 0x42001000, 0x0000000c, 0x821c0d80, + 0x00000001, 0x04000004, 0x801c3840, 0x0401f906, + 0x0401f004, 0x41783800, 0x0401f903, 0x0401f011, + 0x821c0c80, 0x00000005, 0x04001005, 0x40043800, + 0x42001000, 0x0000003c, 0x0401f006, 0x80001580, + 0x82081400, 0x0000000c, 0x801c3840, 0x040207fd, + 0x832c0400, 0x00000005, 0x0401f8f3, 0x040207f1, + 0x1c01f000, 0x4803c856, 0x59a0020c, 0x800001c0, + 0x04000024, 0x824c0580, 0x00000002, 0x04000040, + 0x59a26001, 0x5930380d, 0x801c39c0, 0x0400003c, + 0x801c3840, 0x481e600d, 0x5932580b, 0x5930080a, + 0x50042000, 0x58041801, 0x58041002, 0x82081500, + 0xfffffffc, 0x5930000c, 0x80000000, 0x82000d80, + 0x00000005, 0x04020009, 0x497a600c, 0x592e5801, + 0x812e59c0, 0x0400001a, 0x492e600b, 0x832c0c00, + 0x00000005, 0x0401f005, 0x4802600c, 0x5930080a, + 0x82040c00, 0x00000003, 0x4806600a, 0x0401f010, + 0x59a0120b, 0x82081500, 0x0000fffc, 0x59a0040b, + 0x900001c0, 0x80081540, 0x480ba003, 0x59a0020d, + 0x59a0240d, 0x901021c0, 0x80102540, 0x59a00210, + 0x59a01c10, 0x900c19c0, 0x800c1d40, 0x4201d000, + 0x00003a98, 0x0201f800, 0x00105e06, 0x480ba002, + 0x59a80059, 0x4803a008, 0x4813a000, 0x480fa001, + 0x4a03a005, 0x10000000, 0x02005800, 0x00100615, + 0x804c9800, 0x82000540, 0x00000001, 0x1c01f000, + 0x4847c857, 0x59a0040c, 0x800001c0, 0x04000024, + 0x82480580, 0x00000002, 0x04000042, 0x59a26000, + 0x5930380d, 0x801c39c0, 0x0400003e, 0x801c3840, + 0x481e600d, 0x5932580b, 0x5930080a, 0x50042000, + 0x58041801, 0x58041002, 0x82081500, 0xfffffffc, + 0x5930000c, 0x80000000, 0x82000d80, 0x00000005, + 0x04020009, 0x497a600c, 0x592e5801, 0x812e59c0, + 0x0400001d, 0x492e600b, 0x832c0c00, 0x00000005, + 0x0401f005, 0x4802600c, 0x5930080a, 0x82040c00, + 0x00000003, 0x4806600a, 0x0401f013, 0x82440580, + 0x10000000, 0x0402001f, 0x59a0020e, 0x59a0240e, + 0x901021c0, 0x80102540, 0x59a00209, 0x59a01c09, + 0x900c19c0, 0x800c1d40, 0x59a0020b, 0x82000500, + 0x0000fffc, 0x59a0140b, 0x900811c0, 0x80081540, + 0x480b8003, 0x48138000, 0x480f8001, 0x480b8002, + 0x59c80018, 0x82000500, 0xf0000000, 0x59c02008, + 0x82102500, 0x0fffffff, 0x80100540, 0x48038008, + 0x48478006, 0x80489000, 0x8260c540, 0x00000001, + 0x1c01f000, 0x59c00009, 0x4803c857, 0x82000d00, + 0x00e00000, 0x0400000d, 0x485f420f, 0x905cb9c0, + 0x485f440f, 0x8c00052e, 0x04000002, 0x80285000, + 0x8c00052c, 0x04000002, 0x80244800, 0x8c00052a, + 0x04000002, 0x802c5800, 0x1c01f000, 0x59a0020c, + 0x800001c0, 0x04000024, 0x59d00806, 0x4807c857, + 0x8c040d3e, 0x04000020, 0x4a03a005, 0x20000000, + 0x4a03a005, 0x30000000, 0x59d00806, 0x8c040d0a, + 0x040207fe, 0x824c0480, 0x00000003, 0x02021800, + 0x00100615, 0x404c0000, 0x0c01f001, 0x00102c02, + 0x00102c04, 0x00102c0a, 0x0201f800, 0x00100615, + 0x80000040, 0x40009800, 0x0401ff43, 0x0400000a, + 0x0401ff41, 0x0401f008, 0x80000040, 0x40009800, + 0x59d00806, 0x4807c857, 0x8c040d3e, 0x040207e3, + 0x0401ff39, 0x1c01f000, 0x59a0040c, 0x800001c0, + 0x04000024, 0x59c00807, 0x4807c857, 0x8c040d3e, + 0x04000020, 0x59c00807, 0x4a038006, 0x20000000, + 0x82480480, 0x00000003, 0x02021800, 0x00100615, + 0x40480000, 0x0c01f001, 0x00102c25, 0x00102c27, + 0x00102c2f, 0x0201f800, 0x00100615, 0x80000040, + 0x40009000, 0x42008800, 0x10000004, 0x0401ff65, + 0x0400000c, 0x0401ff63, 0x0401f00a, 0x80000040, + 0x40009000, 0x59c00807, 0x4807c857, 0x8c040d3e, + 0x040207e5, 0x42008800, 0x10000004, 0x0401ff59, + 0x1c01f000, 0x492fc857, 0x4000a800, 0x4a03b805, + 0x20000000, 0x59dc0006, 0x4a03b805, 0x30000000, + 0x4813b800, 0x480fb801, 0x480bb802, 0x4857b803, + 0x4a03b805, 0x30000002, 0x59dc0006, 0x4a03b805, + 0x70000001, 0x59dc0006, 0x4a03b805, 0x10000000, + 0x59dc0006, 0x8c00053e, 0x040007fe, 0x4a03b805, + 0x20000000, 0x59dc0006, 0x59dc2000, 0x59dc1801, + 0x801c39c0, 0x0400000a, 0x4d2c0000, 0x0201f800, + 0x0010082a, 0x5c000800, 0x02000800, 0x00100615, + 0x4a025a04, 0x0000000a, 0x492c0801, 0x1c01f000, + 0x42006000, 0x00102d9d, 0x42000800, 0x0000007c, + 0x0201f800, 0x00101395, 0x4a03902c, 0x00200000, + 0x4200b000, 0x000001f4, 0x59c8002c, 0x8c00052c, + 0x04000007, 0x8058b040, 0x040207fc, 0x42000000, + 0x00004003, 0x41781000, 0x0401f11e, 0x50301000, + 0x41784800, 0x4a03902d, 0x00008000, 0x4200b000, + 0x000001f4, 0x59c8002c, 0x8c000534, 0x04000007, + 0x8058b040, 0x040207fc, 0x42000000, 0x00004003, + 0x41781000, 0x0401f10f, 0x0401f895, 0x80244800, + 0x82240580, 0x000003b1, 0x040207fc, 0x0401f911, + 0x41784800, 0x0401f8bb, 0x80244800, 0x82240580, + 0x000003b1, 0x040207fc, 0x80306000, 0x82300580, + 0x00102d9f, 0x040207e2, 0x59a80863, 0x800409c0, + 0x04000007, 0x42000000, 0x00004004, 0x42001000, + 0x00000002, 0x59a81862, 0x0401f0f6, 0x42006000, + 0x00102d9d, 0x50301000, 0x41784800, 0x4a03902d, + 0x00000800, 0x0401f876, 0x80244800, 0x82240580, + 0x00000018, 0x040207fc, 0x0401f8f2, 0x41784800, + 0x0401f89c, 0x80244800, 0x82240580, 0x00000018, + 0x040207fc, 0x80306000, 0x82300580, 0x00102d9f, + 0x040207ed, 0x59a80863, 0x800409c0, 0x04000007, + 0x42000000, 0x00004004, 0x42001000, 0x00000010, + 0x59a81862, 0x0401f0d7, 0x42006000, 0x00102d9d, + 0x50301000, 0x41784800, 0x4a03902d, 0x00000400, + 0x0401f857, 0x80244800, 0x82240580, 0x00000088, + 0x040207fc, 0x0401f8d3, 0x41784800, 0x0401f87d, + 0x80244800, 0x82240580, 0x00000088, 0x040207fc, + 0x80306000, 0x82300580, 0x00102d9f, 0x040207ed, + 0x59a80863, 0x800409c0, 0x04000007, 0x42000000, + 0x00004004, 0x42001000, 0x00000008, 0x59a81862, + 0x0401f0b8, 0x42006000, 0x00102d9d, 0x50301000, + 0x41784800, 0x4a03902d, 0x00002000, 0x4200b000, + 0x000001f4, 0x59c8002c, 0x8c000530, 0x04000007, + 0x8058b040, 0x040207fc, 0x42000000, 0x00004003, + 0x41781000, 0x0401f0a7, 0x59c8002c, 0x82000500, + 0xffe0ffff, 0x82080d00, 0x001f0000, 0x80040540, + 0x4803902c, 0x0401f826, 0x80244800, 0x82240580, + 0x00000110, 0x040207fc, 0x0401f8a2, 0x41784800, + 0x0401f84c, 0x59c80034, 0x82080d00, 0x001f0000, + 0x82000500, 0x001f0000, 0x80040580, 0x04000006, + 0x59a80063, 0x80000000, 0x48035063, 0x40240000, + 0x48035062, 0x80244800, 0x82240580, 0x00000110, + 0x040207f0, 0x80306000, 0x82300580, 0x00102d9f, + 0x040207cf, 0x59a80863, 0x800409c0, 0x04000006, + 0x42000000, 0x00004004, 0x42001000, 0x00000020, + 0x59a81862, 0x0201f000, 0x00102066, 0x59c8002c, + 0x82000500, 0xffff0000, 0x82080d00, 0x0000ffff, + 0x80040540, 0x4803902c, 0x480b9028, 0x480b9029, + 0x59a80064, 0x82000580, 0x00000004, 0x04000003, + 0x480b902a, 0x480b902b, 0x59c8002d, 0x82000500, + 0xfffffc00, 0x80240540, 0x4803902d, 0x4200b000, + 0x000001f4, 0x59c8002c, 0x82000500, 0x18000000, + 0x04000007, 0x8058b040, 0x040207fb, 0x42000000, + 0x00004003, 0x41781000, 0x0401f05a, 0x4a03902e, + 0x00000001, 0x4200b000, 0x000001f4, 0x59c8002e, + 0x8c000500, 0x04000006, 0x8058b040, 0x040207fc, + 0x42000000, 0x00004003, 0x0401f04e, 0x1c01f000, + 0x41783800, 0x59c8002d, 0x82000500, 0xfffffc00, + 0x80240d40, 0x4807902d, 0x4200b000, 0x000001f4, + 0x59c8002c, 0x82000500, 0x18000000, 0x04000007, + 0x8058b040, 0x040207fb, 0x42000000, 0x00004003, + 0x41781000, 0x0401f03b, 0x59c81830, 0x59c80030, + 0x800c0d80, 0x040207fd, 0x80080d80, 0x04000002, + 0x801c3800, 0x59c82031, 0x59c80031, 0x80100d80, + 0x040207fd, 0x80080d80, 0x04000002, 0x801c3800, + 0x59a80064, 0x82000580, 0x00000004, 0x04000019, + 0x59c82832, 0x59c80032, 0x80140d80, 0x040207fd, + 0x80080d80, 0x04000002, 0x801c3800, 0x59c83033, + 0x59c80033, 0x80180d80, 0x040207fd, 0x80080d80, + 0x04000002, 0x801c3800, 0x59c80034, 0x59c80834, + 0x80040d80, 0x040207fd, 0x80080d80, 0x82040d00, + 0x0000ffff, 0x0400000c, 0x801c3800, 0x0401f00a, + 0x59c80034, 0x59c80834, 0x80040d80, 0x040207fd, + 0x80080d80, 0x82040d00, 0x000000ff, 0x04000002, + 0x801c3800, 0x801c39c0, 0x04000005, 0x59a80063, + 0x801c0400, 0x48035063, 0x48275062, 0x1c01f000, + 0x48034206, 0x48074406, 0x480b4207, 0x480f4407, + 0x48134208, 0x48174408, 0x0201f000, 0x00102069, + 0x42000000, 0x00600000, 0x80000040, 0x040207ff, + 0x1c01f000, 0x5a5a5a5a, 0xa5a5a5a5, 0x59a00c0a, + 0x800409c0, 0x02000000, 0x001020b6, 0x82040480, + 0x00000021, 0x02021000, 0x001020b6, 0x82040480, + 0x00000011, 0x04001003, 0x42000800, 0x00000010, + 0x59a00208, 0x59a01407, 0x900811c0, 0x80081540, + 0x59a00207, 0x59a01c06, 0x900c19c0, 0x800c1d40, + 0x0201f800, 0x0010381a, 0x04000006, 0x0201f800, + 0x0010383e, 0x4a01d809, 0x00102dc0, 0x1c01f000, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x4031d800, 0x58ef400b, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x59a00c0a, + 0x82040480, 0x00000011, 0x04001003, 0x42000800, + 0x00000010, 0x59a0040b, 0x59a0120b, 0x900811c0, + 0x80081540, 0x59a00209, 0x59a01c08, 0x900c19c0, + 0x800c1d40, 0x58ec0003, 0x0201f800, 0x00103841, + 0x4a01d809, 0x00102ddb, 0x1c01f000, 0x4031d800, + 0x58ef400b, 0x58ec0002, 0x82000580, 0x00000200, + 0x02000000, 0x001020aa, 0x59a00c0a, 0x82040480, + 0x00000011, 0x02001000, 0x00102066, 0x82040c80, + 0x00000010, 0x59a00208, 0x59a01407, 0x900811c0, + 0x80081540, 0x59a00207, 0x59a01c06, 0x900c19c0, + 0x800c1d40, 0x82081400, 0x00000040, 0x58ec0003, + 0x0201f800, 0x0010383e, 0x4a01d809, 0x00102df9, + 0x1c01f000, 0x4031d800, 0x58ef400b, 0x58ec0002, + 0x82000580, 0x00000200, 0x02000000, 0x001020aa, + 0x59a0040a, 0x82000c80, 0x00000010, 0x59a0040b, + 0x59a0120b, 0x900811c0, 0x80081540, 0x59a00209, + 0x59a01c08, 0x900c19c0, 0x800c1d40, 0x82081400, + 0x00000040, 0x58ec0003, 0x0201f800, 0x00103841, + 0x4a01d809, 0x0010205f, 0x1c01f000, 0x48efc857, + 0x59a00207, 0x59a01407, 0x900001c0, 0x80081540, + 0x59a00209, 0x59a01c09, 0x900001c0, 0x800c1d40, + 0x59a00406, 0x48034000, 0x480b4001, 0x480f4002, + 0x0201f800, 0x0010381a, 0x04020005, 0x4a034406, + 0x00000002, 0x0201f000, 0x001020b2, 0x42000800, + 0x00000010, 0x0201f800, 0x0010383e, 0x4a01d809, + 0x00102e2e, 0x1c01f000, 0x4031d800, 0x58ef400b, + 0x58ee580d, 0x58ec0002, 0x82000580, 0x00000200, + 0x02000000, 0x001020aa, 0x48efc857, 0x49a3c857, + 0x492fc857, 0x592c0a04, 0x80040910, 0x04020005, + 0x4a034406, 0x00000019, 0x0201f000, 0x001020b2, + 0x4805d80c, 0x0401f00a, 0x4031d800, 0x58ef400b, + 0x58ec0002, 0x82000580, 0x00000200, 0x02000000, + 0x001020aa, 0x48efc857, 0x49a3c857, 0x48efc857, + 0x49a3c857, 0x58ec000c, 0x80000040, 0x04000012, + 0x4801d80c, 0x0201f800, 0x0010381a, 0x04020005, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x42000800, 0x00000010, 0x58ec1007, 0x58ec1808, + 0x0201f800, 0x0010383e, 0x4a01d809, 0x00102e42, + 0x1c01f000, 0x58ee580d, 0x48efc857, 0x49a3c857, + 0x492fc857, 0x492f3006, 0x592c0404, 0x8400055e, + 0x48025c04, 0x4a01d809, 0x00102e6c, 0x1c01f000, + 0x4d2c0000, 0x58ee580d, 0x48efc857, 0x49a3c857, + 0x492fc857, 0x592c0404, 0x8400051e, 0x48025c04, + 0x59a00000, 0x59a01001, 0x59a01802, 0x80081400, + 0x820c1c40, 0x00000000, 0x832c0400, 0x00000004, + 0x42000800, 0x00000010, 0x5c025800, 0x0201f000, + 0x00103841, 0x800409c0, 0x04000005, 0x4a034406, + 0x00000001, 0x0201f000, 0x001020b2, 0x836c0580, + 0x00000003, 0x04000005, 0x4a034406, 0x00000007, + 0x0201f000, 0x001020b2, 0x59a0320b, 0x82183500, + 0x000000ff, 0x59a28c06, 0x0201f800, 0x00020267, + 0x02020000, 0x001020b6, 0x83440580, 0x000007fd, + 0x04000008, 0x0201f800, 0x00104836, 0x04000005, + 0x4a034406, 0x00000009, 0x0201f000, 0x001020b2, + 0x0201f800, 0x0010381a, 0x04020005, 0x4a034406, + 0x00000002, 0x0201f000, 0x001020b2, 0x801831c0, + 0x0400000a, 0x412c0800, 0x0201f800, 0x0010381a, + 0x04020005, 0x4a034406, 0x00000002, 0x0201f000, + 0x001020b2, 0x40065800, 0x4a025c04, 0x00008000, + 0x497a5a04, 0x0201f800, 0x00108ebd, 0x04020005, + 0x4a034406, 0x00000003, 0x0201f000, 0x001020b2, + 0x4a01d809, 0x00102ebf, 0x1c01f000, 0x592c0005, + 0x82000580, 0x01000000, 0x04020005, 0x4a034406, + 0x00000004, 0x0201f000, 0x001020b2, 0x592c0406, + 0x82002d00, 0x0000ff00, 0x82000500, 0x000000ff, + 0x80000904, 0x80040800, 0x82040480, 0x00000006, + 0x04001003, 0x42000800, 0x00000005, 0x4c500000, + 0x4c540000, 0x4c580000, 0x832ca400, 0x00000006, + 0x4050a800, 0x4004b000, 0x0201f800, 0x0010a94f, + 0x59a00407, 0x59a01207, 0x900811c0, 0x80081540, + 0x59a00409, 0x59a01a09, 0x900c19c0, 0x800c1d40, + 0x832c0400, 0x00000006, 0x4c140000, 0x0201f800, + 0x00103841, 0x5c002800, 0x801429c0, 0x04000003, + 0x4a01d809, 0x00102ef2, 0x5c00b000, 0x5c00a800, + 0x5c00a000, 0x1c01f000, 0x4031d800, 0x58ef400b, + 0x58ee580d, 0x58ec0002, 0x82000580, 0x00000200, + 0x02000000, 0x001020aa, 0x812e59c0, 0x02000800, + 0x00100615, 0x592c0006, 0x82000500, 0xff000000, + 0x80000904, 0x800409c0, 0x02000000, 0x001020aa, + 0x82040480, 0x0000000e, 0x04001003, 0x42000800, + 0x0000000d, 0x592e5801, 0x812e59c0, 0x02000800, + 0x00100615, 0x4c500000, 0x4c540000, 0x4c580000, + 0x832ca400, 0x00000005, 0x4050a800, 0x4004b000, + 0x0201f800, 0x0010a94f, 0x5c00b000, 0x5c00a800, + 0x5c00a000, 0x58ec1007, 0x58ec1808, 0x832c0400, + 0x00000005, 0x0201f000, 0x00103841, 0x0201f800, + 0x0010381a, 0x04020005, 0x4a034406, 0x00000002, + 0x0201f000, 0x001020b2, 0x59a00c06, 0x82040500, + 0x0000ff00, 0x840001c0, 0x82001480, 0x00000007, + 0x02021000, 0x001020b6, 0x0c01f001, 0x00102f36, + 0x00102f3d, 0x00102f44, 0x00102f44, 0x00102f44, + 0x00102f46, 0x00102f4b, 0x42000800, 0x0000000d, + 0x42003800, 0x00102f5f, 0x4a034000, 0x0010b2e7, + 0x0401f013, 0x42000800, 0x0000000d, 0x42003800, + 0x00102f5f, 0x4a034000, 0x0010b2f4, 0x0401f00c, + 0x0201f000, 0x001020b6, 0x42000800, 0x00000008, + 0x42003800, 0x00102f72, 0x0401f005, 0x42000800, + 0x00000004, 0x42003800, 0x00102fbc, 0x59a00207, + 0x59a01407, 0x900001c0, 0x80081540, 0x59a00209, + 0x59a01c09, 0x900001c0, 0x800c1d40, 0x832c0400, + 0x00000005, 0x4c1c0000, 0x0201f800, 0x0010383e, + 0x5c003800, 0x481dd809, 0x1c01f000, 0x4031d800, + 0x58ef400b, 0x58ee580d, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x4a03501f, + 0x00000001, 0x4200b000, 0x0000000d, 0x59a0a800, + 0x832ca400, 0x00000005, 0x0201f800, 0x0010a93e, + 0x0201f000, 0x00102066, 0x4031d800, 0x58ef400b, + 0x58ee580d, 0x58ec0002, 0x82000580, 0x00000200, + 0x02000000, 0x001020aa, 0x832ca400, 0x00000005, + 0x50500000, 0x82001500, 0x000c0016, 0x02020000, + 0x001020b6, 0x82500c00, 0x00000003, 0x50040000, + 0x82001500, 0x00000001, 0x02020000, 0x001020b6, + 0x50500000, 0x82001500, 0x00000028, 0x0400001d, + 0x82081580, 0x00000028, 0x02020000, 0x001020b6, + 0x80500800, 0x50040000, 0x82001500, 0x00000013, + 0x82081580, 0x00000013, 0x02020000, 0x001020b6, + 0x80040800, 0x50040000, 0x82001500, 0x00010000, + 0x82081580, 0x00010000, 0x02020000, 0x001020b6, + 0x836c0580, 0x00000000, 0x04000012, 0x599c0019, + 0x8c00050e, 0x0402000f, 0x0201f000, 0x001020b6, + 0x80500800, 0x50040000, 0x82001500, 0x00000013, + 0x02020000, 0x001020b6, 0x80040800, 0x50040000, + 0x82001500, 0x00010000, 0x02020000, 0x001020b6, + 0x4200b000, 0x00000008, 0x4200a800, 0x0010b2df, + 0x0201f800, 0x0010a93e, 0x0201f000, 0x00102066, + 0x4031d800, 0x58ef400b, 0x58ee580d, 0x58ec0002, + 0x82000580, 0x00000200, 0x02000000, 0x001020aa, + 0x4200b000, 0x00000004, 0x4200a800, 0x0010b6f9, + 0x832ca400, 0x00000005, 0x0201f800, 0x0010a93e, + 0x59a80005, 0x84000550, 0x48035005, 0x0201f000, + 0x00102066, 0x0201f800, 0x0010381a, 0x04020005, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x59a00c06, 0x82040500, 0x0000ff00, 0x840001c0, + 0x82001480, 0x00000006, 0x02021000, 0x001020b6, + 0x0c01f001, 0x00102fe7, 0x00102fec, 0x00102ff1, + 0x00102ff1, 0x00102ff1, 0x00102ff3, 0x42000800, + 0x0000000d, 0x4200a000, 0x0010b2e7, 0x0401f00c, + 0x42000800, 0x0000000d, 0x4200a000, 0x0010b2f4, + 0x0401f007, 0x0201f000, 0x001020b6, 0x42000800, + 0x00000008, 0x4200a000, 0x0010b2df, 0x4004b000, + 0x832cac00, 0x00000005, 0x0201f800, 0x0010a93e, + 0x59a00207, 0x59a01407, 0x900001c0, 0x80081540, + 0x59a00209, 0x59a01c09, 0x900001c0, 0x800c1d40, + 0x832c0400, 0x00000005, 0x0201f000, 0x00103841, + 0x836c0580, 0x00000000, 0x04020005, 0x4a034406, + 0x00000007, 0x0201f000, 0x001020b2, 0x59a01406, + 0x800811c0, 0x04020017, 0x59c40801, 0x82040d00, + 0x00018000, 0x82040580, 0x00000000, 0x04020004, + 0x4a034406, 0x00000000, 0x0401f048, 0x82040580, + 0x00008000, 0x04020004, 0x4a034406, 0x00000001, + 0x0401f042, 0x82040580, 0x00010000, 0x02020800, + 0x00100615, 0x4a034406, 0x00000003, 0x0401f03b, + 0x59a8006f, 0x8c000508, 0x04000005, 0x42000000, + 0x00000001, 0x40000800, 0x0401f003, 0x59a00207, + 0x59a80853, 0x48035053, 0x0201f800, 0x001016ac, + 0x0400000d, 0x0201f800, 0x001016b3, 0x0400000a, + 0x0201f800, 0x001016ba, 0x04000007, 0x0201f800, + 0x001016c1, 0x04000004, 0x48075053, 0x0201f000, + 0x001020b6, 0x82080580, 0x00000002, 0x0402001f, + 0x59c40006, 0x84000500, 0x48038806, 0x0201f800, + 0x00106c32, 0x497b8880, 0x0201f800, 0x0010a7e7, + 0x0201f800, 0x0010a7f5, 0x42000000, 0x0010b6c9, + 0x0201f800, 0x0010a86e, 0x82000540, 0x00000001, + 0x0201f800, 0x00104e5d, 0x4a038808, 0x00000000, + 0x4202d800, 0x00000004, 0x42001000, 0x00000001, + 0x0201f800, 0x001019aa, 0x4a035049, 0x00000001, + 0x0201f800, 0x0010071a, 0x0201f000, 0x00102066, + 0x800409c0, 0x04000005, 0x4a034406, 0x00000001, + 0x0201f000, 0x001020b2, 0x836c0580, 0x00000003, + 0x04000005, 0x4a034406, 0x00000007, 0x0201f000, + 0x001020b2, 0x59a28c06, 0x59a0320b, 0x82183500, + 0x000000ff, 0x0201f800, 0x00020267, 0x02020000, + 0x001020b6, 0x83440580, 0x000007fd, 0x04000008, + 0x0201f800, 0x00104836, 0x04000005, 0x42000800, + 0x00000009, 0x0201f000, 0x001020b2, 0x0201f800, + 0x0010381a, 0x04020005, 0x4a034406, 0x00000002, + 0x0201f000, 0x001020b2, 0x497a5a04, 0x4a025c04, + 0x00008000, 0x0201f800, 0x00108ed2, 0x04020005, + 0x4a034406, 0x00000003, 0x0201f000, 0x001020b2, + 0x4a01d809, 0x00103097, 0x1c01f000, 0x592c0005, + 0x82000d00, 0x0000ffff, 0x82000500, 0xffff0000, + 0x82000580, 0x01000000, 0x04020005, 0x4a034406, + 0x00000004, 0x0201f000, 0x001020b2, 0x80040904, + 0x4c500000, 0x4c540000, 0x4c580000, 0x832ca400, + 0x00000005, 0x4050a800, 0x4004b000, 0x0201f800, + 0x0010a94f, 0x5c00b000, 0x5c00a800, 0x5c00a000, + 0x59a00207, 0x59a01407, 0x900001c0, 0x80081540, + 0x59a00209, 0x59a01c09, 0x900001c0, 0x800c1d40, + 0x832c0400, 0x00000005, 0x0201f000, 0x00103841, + 0x496fc857, 0x836c0580, 0x00000000, 0x04000005, + 0x4a034406, 0x0000001a, 0x0201f000, 0x001020b2, + 0x0201f800, 0x00104e0d, 0x02020800, 0x00103f5c, + 0x42000800, 0x00000020, 0x59a00407, 0x59a01207, + 0x900811c0, 0x80081540, 0x59a00409, 0x59a01a09, + 0x900c19c0, 0x800c1d40, 0x419c0000, 0x49a3c857, + 0x0201f800, 0x0010383e, 0x4a01d809, 0x001030d9, + 0x1c01f000, 0x4833c857, 0x4031d800, 0x58ef400b, + 0x58ec0002, 0x82000580, 0x00000200, 0x02000000, + 0x001020aa, 0x599c0200, 0x800001c0, 0x02000000, + 0x001020b6, 0x59a8006f, 0x8c000504, 0x04020003, + 0x8c000506, 0x04000004, 0x599c0019, 0x8400050c, + 0x48033819, 0x0201f800, 0x001095a3, 0x59a8006f, + 0x8c000502, 0x04000004, 0x599c0017, 0x84000508, + 0x48033817, 0x0201f800, 0x0010393e, 0x04020004, + 0x8c00050a, 0x02020000, 0x001020b6, 0x4803c857, + 0x8c000504, 0x04020004, 0x59c408a3, 0x84040d7a, + 0x480788a3, 0x8c000502, 0x04020004, 0x59c408a3, + 0x84040d08, 0x480788a3, 0x599c0c02, 0x8c000500, + 0x04020004, 0x8c000516, 0x04000012, 0x0401f001, + 0x82041480, 0x0000007f, 0x02021000, 0x001020b6, + 0x82041400, 0x00101eb5, 0x50081000, 0x82081500, + 0x000000ff, 0x8c000500, 0x04020006, 0x480b5010, + 0x42000800, 0x00000003, 0x0201f800, 0x001069af, + 0x599c0019, 0x8c000506, 0x04000003, 0x4a03b805, + 0x90000000, 0x8c00050e, 0x0402000b, 0x59a80806, + 0x8c040d14, 0x04000008, 0x42000800, 0x0010b2df, + 0x50040800, 0x82040d00, 0x00000028, 0x02020000, + 0x001020b6, 0x82000500, 0x00000030, 0x04000003, + 0x80000108, 0x0401f003, 0x42000000, 0x00000002, + 0x48039040, 0x42000800, 0x00000002, 0x82000400, + 0x0010321c, 0x50001000, 0x0201f800, 0x001069af, + 0x599c0201, 0x82000c80, 0x00000100, 0x02001000, + 0x001020b6, 0x82000c80, 0x00000841, 0x02021000, + 0x001020b6, 0x82000500, 0x00000007, 0x02020000, + 0x001020b6, 0x599c0401, 0x80000540, 0x02000000, + 0x001020b6, 0x599c0409, 0x599c0c07, 0x80040c80, + 0x02021000, 0x001020b6, 0x80000040, 0x02000000, + 0x001020b6, 0x599c0209, 0x599c0a07, 0x80040c80, + 0x02021000, 0x001020b6, 0x80000040, 0x02000000, + 0x001020b6, 0x0201f800, 0x0010509d, 0x0201f800, + 0x00104b53, 0x599c0201, 0x48035004, 0x0201f800, + 0x0010133e, 0x599c020a, 0x800001c0, 0x04000003, + 0x4803504d, 0x0401f003, 0x4a03504d, 0x000000c8, + 0x0201f800, 0x0010393e, 0x04000004, 0x0201f800, + 0x00105e18, 0x417a5000, 0x836c0580, 0x00000000, + 0x0402009a, 0x599c0003, 0x599c0804, 0x9c0001c0, + 0x9c0409c0, 0x48035002, 0x48075003, 0x599c1017, + 0x8c08151c, 0x04000006, 0x599c0005, 0x599c0806, + 0x9c0001c0, 0x9c0409c0, 0x0401f003, 0x82000500, + 0xf0ffffff, 0x48035000, 0x48075001, 0x42001000, + 0x0010b2e7, 0x48001000, 0x48041001, 0x42001000, + 0x0010b2f4, 0x48001000, 0x48041001, 0x59a8006f, + 0x8c000508, 0x04020017, 0x8c00050a, 0x04020021, + 0x599c1019, 0x82081500, 0x0000e000, 0x82080580, + 0x00000000, 0x0402000c, 0x4a035053, 0x00000000, + 0x42000000, 0x00000001, 0x0201f800, 0x001018fa, + 0x42000000, 0x00000001, 0x0201f800, 0x00101892, + 0x0401f02b, 0x82080580, 0x00002000, 0x0402000a, + 0x4a035053, 0x00000001, 0x41780000, 0x0201f800, + 0x001018fa, 0x41780000, 0x0201f800, 0x00101892, + 0x0401f01f, 0x82080580, 0x00004000, 0x04020006, + 0x4a035053, 0x00000002, 0x4a035049, 0x00000001, + 0x0401f017, 0x82080580, 0x00006000, 0x02020000, + 0x001020b6, 0x59a80858, 0x82040d80, 0x01391077, + 0x04020005, 0x59e00813, 0x8c040d00, 0x02020000, + 0x001020b6, 0x4a035053, 0x00000003, 0x42000000, + 0x00000002, 0x0201f800, 0x001018fa, 0x42000000, + 0x00000002, 0x0201f800, 0x00101892, 0x599c0019, + 0x8c000520, 0x0400000d, 0x42000000, 0x00000004, + 0x42000800, 0x00000040, 0x0201f800, 0x001019b1, + 0x42000000, 0x00000010, 0x42000800, 0x000000c0, + 0x0201f800, 0x001019b1, 0x4a035032, 0x0000aaaa, + 0x599c1018, 0x82081500, 0x00000030, 0x59a8006c, + 0x80000540, 0x0400000c, 0x82080580, 0x00000000, + 0x02000000, 0x001020b6, 0x599c1018, 0x82081500, + 0xffffffcf, 0x82081540, 0x00000010, 0x480b3818, + 0x0401f010, 0x82080d80, 0x00000000, 0x04000007, + 0x82080d80, 0x00000010, 0x0400000a, 0x82080d80, + 0x00000020, 0x04020002, 0x48075032, 0x0201f800, + 0x001038d3, 0x04000008, 0x0201f800, 0x00101668, + 0x0201f800, 0x00101694, 0x59a8002a, 0x80040540, + 0x4803502a, 0x49f3c857, 0x42001000, 0x00104d39, + 0x0201f800, 0x00105cc9, 0x42001000, 0x00104d2c, + 0x0201f800, 0x00105dbd, 0x4a038805, 0xffffffff, + 0x4a03c014, 0x00400040, 0x4a03c013, 0x00400000, + 0x0201f800, 0x00104717, 0x59a0001d, 0x84000540, + 0x4803401d, 0x49f3c857, 0x0201f000, 0x00102066, + 0x00000018, 0x0000000c, 0x00000018, 0x00000020, + 0x836c0580, 0x00000000, 0x04020005, 0x42000800, + 0x00000007, 0x0201f000, 0x001020b2, 0x42000800, + 0x00000020, 0x59a00407, 0x59a01207, 0x900811c0, + 0x80081540, 0x59a00409, 0x59a01a09, 0x900c19c0, + 0x800c1d40, 0x419c0000, 0x0201f000, 0x00103841, + 0x800409c0, 0x04000005, 0x4a034406, 0x00000001, + 0x0201f000, 0x001020b2, 0x0201f800, 0x00104e0d, + 0x04020005, 0x4a034406, 0x00000016, 0x0201f000, + 0x001020b2, 0x59a80013, 0x8c000500, 0x04000011, + 0x4a034406, 0x00000000, 0x42000800, 0x00000020, + 0x59a00407, 0x59a01207, 0x900811c0, 0x80081540, + 0x59a00409, 0x59a01a09, 0x900c19c0, 0x800c1d40, + 0x42000000, 0x0010bc20, 0x0201f000, 0x00103841, + 0x4a034406, 0x00000001, 0x4200b000, 0x00000020, + 0x4200a800, 0x0010bc20, 0x4200a000, 0xffffffff, + 0x4450a800, 0x8054a800, 0x8058b040, 0x040207fd, + 0x4d440000, 0x4d340000, 0x42028800, 0xffffffff, + 0x42002000, 0xffffffff, 0x42003000, 0x00000001, + 0x42003800, 0x00000001, 0x42001800, 0x0010bc20, + 0x59a81010, 0x82081500, 0x000000ff, 0x40180000, + 0x0c01f001, 0x00103275, 0x00103278, 0x0010327c, + 0x00103280, 0x82102500, 0xffffff00, 0x0401f014, + 0x82102500, 0xffff00ff, 0x840811c0, 0x0401f010, + 0x82102500, 0xff00ffff, 0x900811c0, 0x0401f00c, + 0x82102500, 0x00ffffff, 0x9c0801c0, 0x80102540, + 0x44101800, 0x42003000, 0xffffffff, 0x42002000, + 0xffffffff, 0x800c1800, 0x0401f003, 0x40080000, + 0x80102540, 0x81468800, 0x83442c80, 0x0000007f, + 0x04021014, 0x4c080000, 0x4c0c0000, 0x4c180000, + 0x4c1c0000, 0x0201f800, 0x00020267, 0x5c003800, + 0x5c003000, 0x5c001800, 0x5c001000, 0x040207f2, + 0x0201f800, 0x00104842, 0x040207ef, 0x80183000, + 0x801c3800, 0x59341202, 0x40180000, 0x0c01f7ce, + 0x82100580, 0xffffffff, 0x04000002, 0x44101800, + 0x42001800, 0x0010bc20, 0x500c0000, 0x82000500, + 0xffffff00, 0x801c0540, 0x44001800, 0x5c026800, + 0x5c028800, 0x42000800, 0x00000020, 0x59a00407, + 0x59a01207, 0x900811c0, 0x80081540, 0x59a00409, + 0x59a01a09, 0x900c19c0, 0x800c1d40, 0x42000000, + 0x0010bc20, 0x0201f000, 0x00103841, 0x59a28c06, + 0x59a0020b, 0x8c000500, 0x0400000e, 0x59a01208, + 0x59a00408, 0x82000500, 0x000000ff, 0x900001c0, + 0x80081540, 0x41784000, 0x0201f800, 0x00104768, + 0x04000008, 0x48034406, 0x0201f000, 0x001020b6, + 0x0201f800, 0x00020267, 0x02020000, 0x001020b6, + 0x0201f800, 0x0010381a, 0x04020005, 0x4a034406, + 0x00000002, 0x0201f000, 0x001020b2, 0x59a0020b, + 0x8c000500, 0x04000005, 0x0201f800, 0x00104842, + 0x02020000, 0x001038dd, 0x59a0020b, 0x8c000502, + 0x04000019, 0x83440480, 0x000007f0, 0x04021016, + 0x0201f800, 0x0010484b, 0x04020013, 0x497a5a04, + 0x4a025c04, 0x00008000, 0x0201f800, 0x00108ea3, + 0x04020005, 0x4a034406, 0x00000003, 0x0201f000, + 0x001020b2, 0x4a01d809, 0x001032f8, 0x1c01f000, + 0x59a28c06, 0x0201f800, 0x00020267, 0x02020000, + 0x001020b6, 0x4c580000, 0x4c500000, 0x4c540000, + 0x4200b000, 0x0000000a, 0x4134a000, 0x832e5c00, + 0x00000002, 0x412ca800, 0x0201f800, 0x0010a93e, + 0x832cac00, 0x00000006, 0x4054a000, 0x4200b000, + 0x00000004, 0x0201f800, 0x0010a94f, 0x5c00a800, + 0x5c00a000, 0x5c00b000, 0x592c0802, 0x82040500, + 0x00ff00ff, 0x900001c0, 0x82041500, 0xff00ff00, + 0x80080540, 0x48025802, 0x592c0801, 0x82040500, + 0x00ff00ff, 0x900001c0, 0x82041500, 0xff00ff00, + 0x80080540, 0x48025801, 0x42000800, 0x0000000a, + 0x59a00407, 0x59a01207, 0x900811c0, 0x80081540, + 0x59a00409, 0x59a01a09, 0x900c19c0, 0x800c1d40, + 0x412c0000, 0x0201f000, 0x00103841, 0x496fc857, + 0x496f4406, 0x0201f000, 0x00102066, 0x59a28c06, + 0x0201f800, 0x00020267, 0x02020000, 0x001020b6, + 0x836c0580, 0x00000003, 0x04000005, 0x4a034406, + 0x00000007, 0x0201f000, 0x001020b2, 0x83340c00, + 0x00000006, 0x59a0020b, 0x8c000500, 0x04000003, + 0x83340c00, 0x00000008, 0x58040001, 0x48034409, + 0x900001c0, 0x48034209, 0x50040000, 0x48034407, + 0x900001c0, 0x48034207, 0x59340200, 0x48034406, + 0x0201f000, 0x00102066, 0x800409c0, 0x04000005, + 0x4a034406, 0x00000001, 0x0201f000, 0x001020b2, + 0x59a0220b, 0x8c102500, 0x0402002e, 0x8c102506, + 0x04020006, 0x59a03208, 0x82180480, 0x00000003, + 0x02021000, 0x001020b6, 0x59a28c06, 0x0201f800, + 0x00020267, 0x02020000, 0x001020b6, 0x0201f800, + 0x00104836, 0x04000005, 0x4a034406, 0x00000009, + 0x0201f000, 0x001020b2, 0x0201f800, 0x0010381a, + 0x04020005, 0x4a034406, 0x00000002, 0x0201f000, + 0x001020b2, 0x59a0220b, 0x8c102506, 0x04000004, + 0x59343002, 0x82183500, 0x00ffffff, 0x497a5a04, + 0x4a025c04, 0x00008000, 0x0201f800, 0x00108e65, + 0x04020005, 0x4a034406, 0x00000003, 0x0201f000, + 0x001020b2, 0x4a01d809, 0x001033de, 0x1c01f000, + 0x59a28c06, 0x0201f800, 0x00020267, 0x02020000, + 0x001020b6, 0x0201f800, 0x00104836, 0x04000005, + 0x4a034406, 0x00000009, 0x0201f000, 0x001020b2, + 0x0201f800, 0x0010381a, 0x04020005, 0x4a034406, + 0x00000002, 0x0201f000, 0x001020b2, 0x497a5a04, + 0x4a025c04, 0x00008000, 0x0201f800, 0x0010381a, + 0x04020005, 0x4a034406, 0x00000002, 0x0201f000, + 0x001020b2, 0x592e5800, 0x0201f800, 0x00108e7a, + 0x04020005, 0x4a034406, 0x00000003, 0x0201f000, + 0x001020b2, 0x4a01d809, 0x001033b0, 0x1c01f000, + 0x592c2805, 0x82140d80, 0x01000000, 0x04020005, + 0x4a034406, 0x00000004, 0x0201f000, 0x001020b2, + 0x42000800, 0x00000008, 0x59a00207, 0x59a01407, + 0x900001c0, 0x80081540, 0x59a00209, 0x59a01c09, + 0x900001c0, 0x800c1d40, 0x832c0400, 0x00000005, + 0x0201f800, 0x00103841, 0x8c142d00, 0x04000003, + 0x4a01d809, 0x001033cb, 0x1c01f000, 0x4031d800, + 0x58ef400b, 0x58ee580e, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x812e59c0, + 0x02000800, 0x00100615, 0x42000800, 0x00000008, + 0x832c0400, 0x00000005, 0x58ec1007, 0x58ec1808, + 0x0201f000, 0x00103841, 0x592c0005, 0x82000580, + 0x01000000, 0x04020005, 0x4a034406, 0x00000004, + 0x0201f000, 0x001020b2, 0x59a00207, 0x59a01407, + 0x900001c0, 0x80081540, 0x59a00209, 0x59a01c09, + 0x900001c0, 0x800c1d40, 0x42000800, 0x00000006, + 0x832c0400, 0x00000006, 0x0201f000, 0x00103841, + 0x59a00a0a, 0x800409c0, 0x02000000, 0x001020b6, + 0x82040480, 0x000000e8, 0x04001003, 0x42000800, + 0x000000e7, 0x59a00207, 0x59a01407, 0x900001c0, + 0x80081540, 0x59a00209, 0x59a01c09, 0x900001c0, + 0x800c1d40, 0x83880400, 0x00000000, 0x0201f800, + 0x00103841, 0x4a01d809, 0x0010340c, 0x1c01f000, + 0x4031d800, 0x58ef400b, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x59a0020b, + 0x8c000500, 0x04000008, 0x83880400, 0x00000000, + 0x4803c840, 0x4a03c842, 0x00000006, 0x04011000, + 0x497b8885, 0x4a034207, 0x000000e7, 0x0201f000, + 0x00102066, 0x800409c0, 0x04000005, 0x4a034406, + 0x00000001, 0x0201f000, 0x001020b2, 0x0401fbf3, + 0x04020005, 0x4a034406, 0x00000002, 0x0201f000, + 0x001020b2, 0x497a5a04, 0x4a025c04, 0x00008000, + 0x59a00406, 0x800001c0, 0x02000000, 0x001020b6, + 0x82001580, 0x000000ff, 0x04000005, 0x82001480, + 0x00000004, 0x02021000, 0x001020b6, 0x40001000, + 0x0201f800, 0x00101d6a, 0x04020005, 0x4a034406, + 0x00000003, 0x0201f000, 0x001020b2, 0x4a01d809, + 0x00103446, 0x1c01f000, 0x592c0005, 0x82000580, + 0x01000000, 0x02020000, 0x00102066, 0x4a034406, + 0x00000004, 0x0201f000, 0x001020b2, 0x59a01406, + 0x8c081508, 0x04020007, 0x800409c0, 0x04000005, + 0x4a034406, 0x00000001, 0x0201f000, 0x001020b2, + 0x59a01c07, 0x820c0480, 0x00001000, 0x02021000, + 0x001020b6, 0x497b2804, 0x497b2805, 0x497b281c, + 0x497b281d, 0x497b281f, 0x497b2820, 0x497b2822, + 0x497b2823, 0x80000580, 0x0201f800, 0x00101668, + 0x59a80805, 0x8c081500, 0x04000004, 0x82040d40, + 0x00000011, 0x0401f004, 0x8c081506, 0x04000002, + 0x84040d42, 0x84040d0a, 0x48075005, 0x4202d800, + 0x00000001, 0x82081500, 0x000000e0, 0x8008010a, + 0x0c020036, 0x0201f800, 0x00104e0d, 0x04020009, + 0x4a035033, 0x00000001, 0x0201f800, 0x00104d76, + 0x0401f01f, 0x4a035033, 0x00000000, 0x0401f7fb, + 0x497b5032, 0x0201f800, 0x00103f5c, 0x0201f800, + 0x0010698c, 0x0201f800, 0x00106c32, 0x0201f800, + 0x00106982, 0x59a00a07, 0x480788a7, 0x59c400a3, + 0x82000500, 0xfeffffff, 0x82000540, 0x80018000, + 0x40000800, 0x84040d20, 0x480388a3, 0x480788a3, + 0x497b504e, 0x42000800, 0x0000002d, 0x42001000, + 0x00103fe4, 0x0201f800, 0x00105ca2, 0x59a00407, + 0x800000c2, 0x800008c4, 0x8005d400, 0x42000000, + 0x0000ffff, 0x0201f800, 0x00104e0d, 0x04000003, + 0x59a00207, 0x80000110, 0x0201f800, 0x00103915, + 0x0201f000, 0x00102066, 0x00103479, 0x0010347c, + 0x00103484, 0x001020b6, 0x00103481, 0x001020b6, + 0x001020b6, 0x001020b6, 0x836c0580, 0x00000003, + 0x04000005, 0x4a034406, 0x00000007, 0x0201f000, + 0x001020b2, 0x59a03c06, 0x59a00407, 0x59a04a07, + 0x902449c0, 0x80244d40, 0x59a00409, 0x59a05209, + 0x902851c0, 0x80285540, 0x0401fb54, 0x04020005, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x417a8800, 0x41783000, 0x497b4001, 0x497b4004, + 0x832c4400, 0x00000005, 0x48234002, 0x8c1c3d04, + 0x04020078, 0x0201f800, 0x00020267, 0x0402002a, + 0x0201f800, 0x00104836, 0x04000004, 0x0201f800, + 0x00104732, 0x04020024, 0x8c1c3d00, 0x04000008, + 0x59340009, 0x44004000, 0x59340008, 0x80204000, + 0x44004000, 0x80204000, 0x0401f007, 0x59340007, + 0x44004000, 0x59340006, 0x80204000, 0x44004000, + 0x80204000, 0x83440580, 0x000007fe, 0x0400000d, + 0x83440580, 0x000007fc, 0x0400000a, 0x0201f800, + 0x00104842, 0x04000003, 0x85468d5e, 0x0401f005, + 0x0201f800, 0x00104686, 0x04020002, 0x85468d5e, + 0x45444000, 0x85468d1e, 0x80204000, 0x82183400, + 0x00000003, 0x81468800, 0x83440480, 0x000007f0, + 0x0400100e, 0x8c1c3d06, 0x04000010, 0x83440580, + 0x000007f0, 0x04020004, 0x42028800, 0x000007fe, + 0x0401f006, 0x83440580, 0x000007ff, 0x04020007, + 0x42028800, 0x000007fc, 0x82180580, 0x0000000f, + 0x0400000b, 0x0401f7c0, 0x801831c0, 0x04020006, + 0x59a00801, 0x800408c4, 0x48074406, 0x0201f000, + 0x00102066, 0x4a034004, 0x00000001, 0x49474000, + 0x59a00001, 0x80180400, 0x48034001, 0x481f4003, + 0x4a01d801, 0x00000000, 0x4819d804, 0x59a00002, + 0x4801d803, 0x4825d807, 0x4829d808, 0x4000a800, + 0x4000a000, 0x4018b000, 0x0201f800, 0x0010a93e, + 0x40ec1000, 0x0201f800, 0x001008a1, 0x4a01d809, + 0x00103536, 0x1c01f000, 0x4031d800, 0x58ef400b, + 0x58ec0002, 0x82000580, 0x00000200, 0x02000000, + 0x001020aa, 0x59a00004, 0x80000540, 0x04020008, + 0x59a28800, 0x59a04002, 0x59a03803, 0x41783000, + 0x58ec4807, 0x58ec5008, 0x0401f78f, 0x59a00801, + 0x800408c4, 0x48074406, 0x0201f000, 0x00102066, + 0x0201f800, 0x00020267, 0x0402002f, 0x0201f800, + 0x00104836, 0x04000004, 0x0201f800, 0x00104732, + 0x04020029, 0x83440580, 0x000007fe, 0x04000011, + 0x83440580, 0x000007fc, 0x0400000e, 0x0201f800, + 0x00104842, 0x04000005, 0x59340403, 0x8400055e, + 0x48026c03, 0x0401f007, 0x0201f800, 0x00104686, + 0x04020004, 0x59340403, 0x8400055e, 0x48026c03, + 0x4134a000, 0x4020a800, 0x4200b000, 0x00000006, + 0x0201f800, 0x0010a93e, 0x59340007, 0x4400a800, + 0x59340006, 0x4800a801, 0x59340009, 0x4800a802, + 0x59340008, 0x4800a803, 0x59340403, 0x8400051e, + 0x48026c03, 0x82204400, 0x0000000a, 0x82183400, + 0x0000000a, 0x81468800, 0x83440480, 0x000007f0, + 0x0400100e, 0x8c1c3d06, 0x04000010, 0x83440580, + 0x000007f0, 0x04020004, 0x42028800, 0x000007fe, + 0x0401f006, 0x83440580, 0x000007ff, 0x04020007, + 0x42028800, 0x000007fc, 0x82180580, 0x0000000a, + 0x0400000b, 0x0401f7bb, 0x801831c0, 0x04020006, + 0x59a00801, 0x800408c4, 0x48074406, 0x0201f000, + 0x00102066, 0x4a034004, 0x00000001, 0x49474000, + 0x59a00001, 0x80180400, 0x48034001, 0x481f4003, + 0x4a01d801, 0x00000000, 0x4819d804, 0x59a00002, + 0x4801d803, 0x4825d807, 0x4829d808, 0x40ec1000, + 0x0201f800, 0x001008a1, 0x4a01d809, 0x001035ad, + 0x1c01f000, 0x4031d800, 0x58ef400b, 0x58ec0002, + 0x82000580, 0x00000200, 0x02000000, 0x001020aa, + 0x59a00004, 0x80000540, 0x04020008, 0x59a28800, + 0x59a04002, 0x59a03803, 0x41783000, 0x58ec4807, + 0x58ec5008, 0x0401f78f, 0x59a00801, 0x800408c4, + 0x48074406, 0x0201f000, 0x00102066, 0x42002800, + 0x0000007e, 0x59a00c06, 0x59a01207, 0x59a01c07, + 0x59a02209, 0x82040500, 0x0000ff00, 0x840001c0, + 0x82003480, 0x00000020, 0x02001000, 0x001020b6, + 0x80140480, 0x02001000, 0x001020b6, 0x82040500, + 0x000000ff, 0x82003480, 0x00000020, 0x02001000, + 0x001020b6, 0x80140480, 0x02001000, 0x001020b6, + 0x82080500, 0x0000ff00, 0x840001c0, 0x82003480, + 0x00000020, 0x02001000, 0x001020b6, 0x80140480, + 0x02001000, 0x001020b6, 0x82080500, 0x000000ff, + 0x82003480, 0x00000020, 0x02001000, 0x001020b6, + 0x80140480, 0x02001000, 0x001020b6, 0x820c0500, + 0x0000ff00, 0x840001c0, 0x82003480, 0x00000020, + 0x02001000, 0x001020b6, 0x80140480, 0x02001000, + 0x001020b6, 0x820c0500, 0x000000ff, 0x82003480, + 0x00000020, 0x02001000, 0x001020b6, 0x80140480, + 0x02001000, 0x001020b6, 0x82100500, 0x0000ff00, + 0x840001c0, 0x82003480, 0x00000020, 0x02001000, + 0x001020b6, 0x80140480, 0x02001000, 0x001020b6, + 0x82100500, 0x000000ff, 0x82003480, 0x00000020, + 0x02001000, 0x001020b6, 0x80140480, 0x02001000, + 0x001020b6, 0x900401c0, 0x80080d40, 0x900c01c0, + 0x80101d40, 0x83a83400, 0x0000003a, 0x44043000, + 0x80183000, 0x440c3000, 0x0201f000, 0x00102066, + 0x0401f9fa, 0x04020005, 0x4a034406, 0x00000002, + 0x0201f000, 0x001020b2, 0x42000800, 0x0000000c, + 0x0401f853, 0x4a01d809, 0x0010362c, 0x1c01f000, + 0x4031d800, 0x58ee580d, 0x58ef400b, 0x58ec0002, + 0x82000580, 0x00000200, 0x02000000, 0x001020aa, + 0x832ca400, 0x00000004, 0x4200b000, 0x0000000c, + 0x40c8a800, 0x0201f800, 0x0010a93e, 0x58c80200, + 0x80000540, 0x04000034, 0x58c80400, 0x82000500, + 0xfffffffb, 0x04020030, 0x58c80401, 0x80000540, + 0x0400002d, 0x82000480, 0x0000ff01, 0x0402102a, + 0x58c80202, 0x82000480, 0x0000005c, 0x04001026, + 0x0201f800, 0x001060db, 0x58c80c08, 0x58c80204, + 0x80040480, 0x04001020, 0x58c80204, 0x82000480, + 0x00000005, 0x0402101c, 0x58c80205, 0x58c80c08, + 0x80040902, 0x80040480, 0x04001017, 0x58c80c08, + 0x0201f800, 0x0010602a, 0x0400001b, 0x0201f800, + 0x00105ef2, 0x04020012, 0x4979940b, 0x59c408a3, + 0x82040d40, 0x00000002, 0x480788a3, 0x4a038830, + 0x00000001, 0x4a038832, 0x01ffffff, 0x58c80202, + 0x48030804, 0x0201f800, 0x00105ed4, 0x0201f000, + 0x00102066, 0x0201f000, 0x001020b6, 0x0201f800, + 0x0010612d, 0x0201f800, 0x0010613a, 0x0201f800, + 0x0010601d, 0x0201f000, 0x001020b2, 0x4c000000, + 0x59a01207, 0x59a00407, 0x900811c0, 0x80081540, + 0x59a01a09, 0x59a00409, 0x900c19c0, 0x800c1d40, + 0x5c000000, 0x0401f1b9, 0x59840000, 0x82000580, + 0x00000000, 0x04000050, 0x59840002, 0x8c000504, + 0x0400004d, 0x84000546, 0x48030802, 0x0201f800, + 0x0010601d, 0x59c408a3, 0x82040d00, 0xfffffffd, + 0x480788a3, 0x4c5c0000, 0x4200b800, 0x0010aa00, + 0x505e6800, 0x813669c0, 0x04000008, 0x5936600e, + 0x813261c0, 0x04000005, 0x0201f800, 0x0010600e, + 0x02000800, 0x001061e5, 0x805cb800, 0x825c0580, + 0x0010b1f0, 0x040207f3, 0x59866003, 0x813261c0, + 0x0400000b, 0x59300406, 0x82000580, 0x00000009, + 0x02020800, 0x00100615, 0x5930b800, 0x0201f800, + 0x00105ffa, 0x405e6000, 0x0401f7f5, 0x497b0803, + 0x4200b800, 0x0010b317, 0x505e6000, 0x813261c0, + 0x04000011, 0x59300406, 0x82000580, 0x00000009, + 0x0402000d, 0x59300203, 0x82000580, 0x00000004, + 0x04020009, 0x59326809, 0x813669c0, 0x02020800, + 0x00100615, 0x0201f800, 0x00100ee4, 0x0201f800, + 0x00105ffa, 0x4578b800, 0x805cb800, 0x825c0580, + 0x0010b31f, 0x040207e9, 0x42000800, 0x0010b315, + 0x49780801, 0x49780800, 0x0201f800, 0x0010612d, + 0x0201f800, 0x0010613a, 0x5c00b800, 0x0201f800, + 0x00105eed, 0x0201f000, 0x00102066, 0x836c0580, + 0x00000003, 0x04000005, 0x4a034406, 0x00000007, + 0x0201f000, 0x001020b2, 0x59a00407, 0x59a02207, + 0x901021c0, 0x80102540, 0x59a00409, 0x59a02a09, + 0x901429c0, 0x80142d40, 0x0401f930, 0x04020005, + 0x4a034406, 0x00000002, 0x0201f000, 0x001020b2, + 0x417a8800, 0x41781800, 0x497b4001, 0x497b4003, + 0x832c3400, 0x00000004, 0x481b4002, 0x41440000, + 0x81ac0400, 0x50026800, 0x813669c0, 0x0400000b, + 0x0201f800, 0x00104836, 0x04020008, 0x59340002, + 0x48003000, 0x49443001, 0x82183400, 0x00000002, + 0x820c1c00, 0x00000002, 0x81468800, 0x83440480, + 0x00000800, 0x04000005, 0x820c0480, 0x00000010, + 0x0402100b, 0x0401f7ea, 0x800c19c0, 0x04020006, + 0x59a00801, 0x80040902, 0x48074406, 0x0201f000, + 0x00102066, 0x4a034003, 0x00000001, 0x49474000, + 0x59a00001, 0x800c0400, 0x48034001, 0x40ec1000, + 0x4a001001, 0x00000000, 0x480c1004, 0x59a00002, + 0x48001003, 0x48101007, 0x48141008, 0x0201f800, + 0x001008a1, 0x4a01d809, 0x00103728, 0x1c01f000, + 0x4031d800, 0x58ef400b, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x59a00003, + 0x80000540, 0x04020008, 0x59a28800, 0x59a03002, + 0x41781800, 0x40ec1000, 0x58082007, 0x58082808, + 0x0401f7bf, 0x59a00801, 0x80040902, 0x48074406, + 0x0201f000, 0x00102066, 0x800409c0, 0x04000005, + 0x4a034406, 0x00000001, 0x0201f000, 0x001020b2, + 0x59a80026, 0x8c00050a, 0x04020007, 0x8c000506, + 0x04020005, 0x4a034406, 0x00000016, 0x0201f000, + 0x001020b2, 0x0401f8cd, 0x04020005, 0x4a034406, + 0x00000002, 0x0201f000, 0x001020b2, 0x59a00c06, + 0x80040902, 0x59a00407, 0x59a01207, 0x900811c0, + 0x80081540, 0x59a00409, 0x59a01a09, 0x900c19c0, + 0x800c1d40, 0x832c0400, 0x00000005, 0x0401f8df, + 0x4a01d809, 0x00103763, 0x1c01f000, 0x4031d800, + 0x58ef400b, 0x58ee580d, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x592c0009, + 0x0201f800, 0x001059b9, 0x02000800, 0x001043fc, + 0x02020000, 0x001020b6, 0x49474001, 0x481a6802, + 0x592c000a, 0x82001d80, 0x70000000, 0x04020007, + 0x0401f8a2, 0x04020011, 0x4a034406, 0x00000002, + 0x0201f000, 0x001020b2, 0x82001d80, 0x72000000, + 0x02020000, 0x001020b6, 0x0401f898, 0x04020897, + 0x04020896, 0x04020005, 0x4a034406, 0x00000002, + 0x0201f000, 0x001020b2, 0x58ee580d, 0x4a025c04, + 0x00008000, 0x497a5a04, 0x592c3208, 0x80183102, + 0x592c1801, 0x4a001805, 0x01000000, 0x0201f800, + 0x00108e8e, 0x04020005, 0x4a034406, 0x00000003, + 0x0201f000, 0x001020b2, 0x4a01d809, 0x0010379d, + 0x1c01f000, 0x592c4000, 0x592c0005, 0x82000580, + 0x01000000, 0x04020005, 0x4a034406, 0x00000004, + 0x0201f000, 0x001020b2, 0x4c580000, 0x4c500000, + 0x4c540000, 0x832c3c00, 0x00000005, 0x401ca000, + 0x401ca800, 0x5820280a, 0x4200b000, 0x00000002, + 0x82143580, 0x70000000, 0x04000003, 0x4200b000, + 0x0000000f, 0x0201f800, 0x0010a94f, 0x5c00a800, + 0x5c00a000, 0x5c00b000, 0x401c0000, 0x58201006, + 0x58201807, 0x58202205, 0x80102102, 0x82143580, + 0x70000000, 0x04020008, 0x82103480, 0x00000002, + 0x02001000, 0x001020b6, 0x42000800, 0x00000002, + 0x0401f079, 0x82143580, 0x72000000, 0x02020000, + 0x001020b6, 0x82103480, 0x0000002a, 0x02001000, + 0x001020b6, 0x42000800, 0x0000000f, 0x0401f86e, + 0x4a01d809, 0x001037d7, 0x1c01f000, 0x4031d800, + 0x58ef400b, 0x58ee580e, 0x58ec0002, 0x82000580, + 0x00000200, 0x02000000, 0x001020aa, 0x592e5800, + 0x832c0c00, 0x00000005, 0x4c580000, 0x4c500000, + 0x4c540000, 0x4004a000, 0x4004a800, 0x4200b000, + 0x0000000f, 0x0201f800, 0x0010a94f, 0x5c00a800, + 0x5c00a000, 0x5c00b000, 0x40ec1000, 0x4a001001, + 0x00000000, 0x4a001004, 0x0000000f, 0x48041003, + 0x0201f800, 0x001008a1, 0x4a01d809, 0x001037f9, + 0x1c01f000, 0x4031d800, 0x58ef400b, 0x58ee580e, + 0x58ec0002, 0x82000580, 0x00000200, 0x02000000, + 0x001020aa, 0x832c0c00, 0x00000005, 0x4c580000, + 0x4c500000, 0x4c540000, 0x4004a000, 0x4004a800, + 0x4200b000, 0x0000000c, 0x0201f800, 0x0010a94f, + 0x5c00a800, 0x5c00a000, 0x5c00b000, 0x40ec1000, + 0x4a001001, 0x00000000, 0x4a001004, 0x0000000c, + 0x48041003, 0x0201f800, 0x001008a1, 0x4a01d809, + 0x0010205f, 0x1c01f000, 0x0201f800, 0x0010082a, + 0x04000010, 0x497a5800, 0x58ec000d, 0x80000540, + 0x04020004, 0x492dd80d, 0x492dd80e, 0x0401f007, + 0x58ec000e, 0x48025800, 0x82000400, 0x00000001, + 0x452c0000, 0x492dd80e, 0x832c0400, 0x00000004, + 0x492fc857, 0x4803c857, 0x1c01f000, 0x4d2c0000, + 0x58ec400d, 0x802041c0, 0x04000008, 0x4823c857, + 0x40225800, 0x592c4001, 0x497a5801, 0x0201f800, + 0x0010083a, 0x0401f7f8, 0x4979d80d, 0x4979d80e, + 0x5c025800, 0x1c01f000, 0x42003000, 0x00000001, + 0x0401f003, 0x42003000, 0x00000000, 0x4803c857, + 0x4807c857, 0x480bc857, 0x480fc857, 0x481bc857, + 0x48efc857, 0x4819d801, 0x800409c0, 0x02000800, + 0x00100615, 0x4805d804, 0x4801d803, 0x4809d807, + 0x480dd808, 0x40ec1000, 0x0201f800, 0x001008a1, + 0x4a01d809, 0x0010205f, 0x1c01f000, 0x80002d80, + 0x480bc857, 0x480fc857, 0x4813c857, 0x4817c857, + 0x4d2c0000, 0x4da00000, 0x42034000, 0x0010b2a0, + 0x59a00017, 0x800001c0, 0x04020013, 0x04006012, + 0x480bc020, 0x480fc021, 0x4813c022, 0x4817c023, + 0x900811c0, 0x82081540, 0x00000012, 0x480bc011, + 0x59e00017, 0x8c000508, 0x04020004, 0x4203e000, + 0x30000001, 0x0401f053, 0x4a03c017, 0x00000002, + 0x0401f7fb, 0x4c040000, 0x4c1c0000, 0x80000800, + 0x48074017, 0x59a0381a, 0x481fc857, 0x801c39c0, + 0x04020027, 0x82000480, 0x0000000a, 0x04021010, + 0x59a00018, 0x80000000, 0x48034018, 0x59a00219, + 0x82000400, 0x00000002, 0x82000c80, 0x00000013, + 0x48034219, 0x04001003, 0x497b4219, 0x41780000, + 0x59a03816, 0x801c3c00, 0x0401f030, 0x4803c856, + 0x0201f800, 0x0010082a, 0x04000007, 0x492f401a, + 0x492f401b, 0x412c3800, 0x497b421c, 0x497a5813, + 0x0401f026, 0x59880052, 0x80000000, 0x48031052, + 0x59a00017, 0x80000040, 0x48034017, 0x59a00219, + 0x59a03816, 0x801c3c00, 0x0401f01c, 0x59a0021c, + 0x82000400, 0x00000002, 0x82000c80, 0x00000012, + 0x04021004, 0x4803421c, 0x801c3c00, 0x0401f013, + 0x0201f800, 0x0010082a, 0x0402000b, 0x59880052, + 0x80000000, 0x48031052, 0x59a00017, 0x80000040, + 0x48034017, 0x4803c856, 0x59a0021c, 0x801c3c00, + 0x0401f006, 0x492f401a, 0x492c3813, 0x412c3800, + 0x497b421c, 0x497a5813, 0x48083c00, 0x480c3a00, + 0x48103c01, 0x48143a01, 0x5c003800, 0x5c000800, + 0x5c034000, 0x5c025800, 0x1c01f000, 0x480fc857, + 0x4813c857, 0x481bc857, 0x42000000, 0x0010b611, + 0x0201f800, 0x0010a86e, 0x801800d0, 0x40002800, + 0x42001000, 0x00008014, 0x0401f786, 0x4c000000, + 0x599c0017, 0x8c000512, 0x5c000000, 0x1c01f000, + 0x4c000000, 0x599c0018, 0x8c00050e, 0x5c000000, + 0x1c01f000, 0x59a80821, 0x800409c0, 0x04000005, + 0x4a034406, 0x00000001, 0x0201f000, 0x001020b2, + 0x836c0580, 0x00000003, 0x04000005, 0x4a034406, + 0x00000007, 0x0201f000, 0x001020b2, 0x599c0017, + 0x8c00050a, 0x04000005, 0x4a034406, 0x00000008, + 0x0201f000, 0x001020b2, 0x59340405, 0x8c000508, + 0x04020004, 0x8c00050a, 0x02020000, 0x001032e2, + 0x497a5a04, 0x497a5805, 0x4a025c04, 0x00008000, + 0x0201f800, 0x00108f2d, 0x04020005, 0x4a034406, + 0x00000003, 0x0201f000, 0x001020b2, 0x4a01d809, + 0x00103906, 0x1c01f000, 0x592c0005, 0x82000580, + 0x01000000, 0x04020005, 0x4a034406, 0x00000004, + 0x0201f000, 0x001020b2, 0x59a28c06, 0x0201f800, + 0x00020267, 0x02020000, 0x001020b6, 0x0201f000, + 0x001032e2, 0x82001580, 0x0000ffff, 0x04000009, + 0x0201f800, 0x001059b9, 0x02000800, 0x00020267, + 0x0402000c, 0x0201f800, 0x00105ce7, 0x0401f009, + 0x42028800, 0x000007ef, 0x0201f800, 0x00020267, + 0x02000800, 0x00105ce7, 0x81468840, 0x040217fb, + 0x1c01f000, 0x4803c856, 0x4c0c0000, 0x4d340000, + 0x4d440000, 0x42028800, 0x000007fe, 0x0201f800, + 0x00020267, 0x04020009, 0x5934180a, 0x820c1d00, + 0x00000001, 0x820c1d80, 0x00000001, 0x42001000, + 0x0000801b, 0x0401ff1e, 0x5c028800, 0x5c026800, + 0x5c001800, 0x1c01f000, 0x599c0017, 0x8c000508, + 0x1c01f000, 0x48efc857, 0x04011000, 0x48efc840, + 0x4a03c842, 0x00000011, 0x40000000, 0x040117ff, + 0x4a01d80f, 0xbeefbeef, 0x1c01f000, 0x497b4000, + 0x497b4001, 0x497b4002, 0x497b4003, 0x497b4004, + 0x1c01f000, 0x59c400a4, 0x4c580000, 0x4c500000, + 0x4c540000, 0x82000500, 0x0000000f, 0x82000480, + 0x00000007, 0x0400100a, 0x82006c80, 0x00000007, + 0x02021800, 0x00100615, 0x0c01f807, 0x5c00a800, + 0x5c00a000, 0x5c00b000, 0x1c01f000, 0x0401f90c, + 0x0401f7fb, 0x0010396c, 0x00103972, 0x00103997, + 0x001039b9, 0x00103a78, 0x0010396b, 0x1c01f000, + 0x59c40806, 0x8c040d00, 0x04020003, 0x84040d40, + 0x48078806, 0x1c01f000, 0x59c40005, 0x8c000534, + 0x02020000, 0x001040ce, 0x4a038805, 0xffffffff, + 0x42006000, 0x00020000, 0x0201f800, 0x001040b2, + 0x59a80015, 0x82000500, 0xfffffffa, 0x84000542, + 0x48035015, 0x497b5026, 0x42000800, 0x0010bc20, + 0x45780800, 0x497b5013, 0x42006000, 0xffefffff, + 0x42006800, 0x40000000, 0x0201f800, 0x001040ad, + 0x59c40006, 0x82000500, 0xffffff0f, 0x48038806, + 0x42000800, 0x00000010, 0x42001000, 0x0010401b, + 0x0201f800, 0x00105cbc, 0x0401f001, 0x42006000, + 0xffffffff, 0x42006800, 0x00800000, 0x0201f800, + 0x001040ad, 0x4200b000, 0x000000c8, 0x59c400a4, + 0x82000500, 0x0000000f, 0x82000580, 0x0000000a, + 0x0400000f, 0x8058b040, 0x040207f9, 0x497b5014, + 0x42006000, 0xbf7fffff, 0x42006800, 0x00018000, + 0x0201f800, 0x001040ad, 0x42006000, 0xfffeffff, + 0x41786800, 0x0201f000, 0x001040ad, 0x497b5014, + 0x4a035012, 0x00000000, 0x80000580, 0x0201f000, + 0x001040b9, 0x4a038805, 0xffffffff, 0x59a80012, + 0x82000c80, 0x00000004, 0x02021800, 0x00100615, + 0x0c01f001, 0x001039c4, 0x001039f1, 0x00103a6e, + 0x4803c856, 0x59c400a3, 0x8400051e, 0x480388a3, + 0x4a035012, 0x00000001, 0x59c40008, 0x8400054e, + 0x48038808, 0x0201f800, 0x00104093, 0x42007800, + 0x0010b34a, 0x4a007806, 0x11010000, 0x4200a000, + 0x0010b202, 0x4200a800, 0x0010b351, 0x4200b000, + 0x00000002, 0x0201f800, 0x0010a93e, 0x497b8802, + 0x42000800, 0x00000003, 0x497b504a, 0x0201f800, + 0x00103f8e, 0x4a03504a, 0x00000001, 0x497b5016, + 0x0201f800, 0x001040c0, 0x42006000, 0xffffffff, + 0x42006800, 0x00080000, 0x0201f800, 0x001040ad, + 0x42006000, 0xfff7ffff, 0x41786800, 0x0201f000, + 0x001040ad, 0x59a80016, 0x497b5016, 0x80002540, + 0x0400006a, 0x59c40004, 0x82000500, 0x00000003, + 0x04020075, 0x59a80815, 0x8c040d02, 0x0400004f, + 0x82100580, 0x0000000c, 0x04020053, 0x82100400, + 0x00000018, 0x8000b104, 0x41cc1000, 0x42001800, + 0x0010b34a, 0x50080800, 0x500c0000, 0x80040580, + 0x0402001e, 0x80081000, 0x800c1800, 0x8058b040, + 0x040207f9, 0x0201f800, 0x001040c0, 0x42006000, + 0xffffffff, 0x42006800, 0x00500000, 0x0201f800, + 0x001040ad, 0x4a035012, 0x00000002, 0x4a035014, + 0x00000002, 0x0201f800, 0x0010164b, 0x42000800, + 0x000007d0, 0x42001000, 0x00103f62, 0x0201f800, + 0x00105da7, 0x59a80015, 0x84000506, 0x48035015, + 0x0201f000, 0x00104093, 0x59cc0806, 0x82040d80, + 0x11010000, 0x04020028, 0x59cc0800, 0x82040500, + 0x00ffffff, 0x0400001a, 0x82000580, 0x000000ef, + 0x04020017, 0x59cc0801, 0x82040500, 0x00ffffff, + 0x82000580, 0x000000ef, 0x04020011, 0x83cca400, + 0x00000007, 0x4200a800, 0x0010b202, 0x4200b000, + 0x00000002, 0x50500800, 0x50540000, 0x80040480, + 0x04001007, 0x04020010, 0x8050a000, 0x8054a800, + 0x8058b040, 0x040207f8, 0x0401f00b, 0x59a80015, + 0x84000502, 0x48035015, 0x41cca000, 0x4200a800, + 0x0010b34a, 0x4200b000, 0x00000009, 0x0201f800, + 0x0010a93e, 0x0201f800, 0x001040c0, 0x42006000, + 0xffffffff, 0x42006800, 0x00080000, 0x0201f800, + 0x001040ad, 0x42006000, 0xfff7ffff, 0x41786800, + 0x0201f800, 0x001040ad, 0x42006000, 0xffffffff, + 0x42006800, 0x00004000, 0x0201f800, 0x001040ad, + 0x59c40004, 0x82000500, 0x00000003, 0x04020006, + 0x497b5016, 0x42000800, 0x00000003, 0x0201f000, + 0x00103f8e, 0x1c01f000, 0x1c01f000, 0x59a80014, + 0x82006d80, 0x0000000f, 0x04000005, 0x82000580, + 0x0000001b, 0x02020800, 0x00103f53, 0x1c01f000, + 0x59a80015, 0x84000506, 0x48035015, 0x497b504a, + 0x59a80014, 0x82000c80, 0x0000001e, 0x02021800, + 0x00100615, 0x0c01f001, 0x00103ab6, 0x00103acd, + 0x00103af6, 0x00103b11, 0x00103b34, 0x00103b65, + 0x00103b87, 0x00103bba, 0x00103bdc, 0x00103c00, + 0x00103c3c, 0x00103c63, 0x00103c79, 0x00103c8b, + 0x00103ca3, 0x00103cba, 0x00103cbf, 0x00103ce7, + 0x00103d0a, 0x00103d30, 0x00103d53, 0x00103d86, + 0x00103dc8, 0x00103df2, 0x00103e0a, 0x00103e4a, + 0x00103e63, 0x00103e76, 0x00103e77, 0x4803c856, + 0x4202d800, 0x00000007, 0x0201f800, 0x00104e0d, + 0x04000007, 0x42006000, 0xffffffd7, 0x41786800, + 0x0201f800, 0x001040ad, 0x0401f00b, 0x59c40006, + 0x82000500, 0xffffff0f, 0x48038806, 0x42001000, + 0x000000f0, 0x0201f800, 0x001019aa, 0x0201f800, + 0x00104d6c, 0x1c01f000, 0x4803c856, 0x42006000, + 0xbf7fffff, 0x42006800, 0x00400000, 0x0201f800, + 0x001040ad, 0x0201f800, 0x0010164b, 0x4a035014, + 0x00000001, 0x42001000, 0x0010401b, 0x0201f800, + 0x00105cdd, 0x0201f800, 0x00104024, 0x42000800, + 0x000007d0, 0x42001000, 0x00103f62, 0x0201f000, + 0x00105da7, 0x59a80016, 0x82000580, 0x00000014, + 0x04020023, 0x4803c857, 0x42006000, 0xffbfffff, + 0x41786800, 0x0201f800, 0x001040ad, 0x59c40004, + 0x82000500, 0x00000003, 0x04020019, 0x42001000, + 0x00103f62, 0x0201f800, 0x00105cc9, 0x59cc1006, + 0x82081580, 0x11020000, 0x04020012, 0x59cc1007, + 0x8c08153e, 0x0400000b, 0x59a80015, 0x8c000504, + 0x04020008, 0x42000000, 0x0010b63d, 0x0201f800, + 0x0010a86e, 0x59a80015, 0x84000544, 0x48035015, + 0x4a035014, 0x00000010, 0x0401f1cd, 0x1c01f000, + 0x0201f000, 0x00103f53, 0x4803c856, 0x4a035014, + 0x00000003, 0x42006000, 0xbf3fffff, 0x42006800, + 0x00100000, 0x0201f800, 0x001040ad, 0x42001000, + 0x0010401b, 0x0201f800, 0x00105cdd, 0x0201f800, + 0x00104024, 0x42001000, 0x00103f62, 0x0201f800, + 0x00105cc9, 0x42007800, 0x0010b350, 0x46007800, + 0x11020000, 0x42000800, 0x00000005, 0x0201f000, + 0x00103f8e, 0x59a80016, 0x80000540, 0x0400001e, + 0x4803c857, 0x42001000, 0x00103f62, 0x0201f800, + 0x00105cc9, 0x59a80016, 0x82000580, 0x00000014, + 0x04020016, 0x59cc1006, 0x82081580, 0x11020000, + 0x04020012, 0x59cc1007, 0x8c08153e, 0x0400000b, + 0x59a80015, 0x8c000504, 0x04020008, 0x42000000, + 0x0010b63d, 0x0201f800, 0x0010a86e, 0x59a80015, + 0x84000544, 0x48035015, 0x4a035014, 0x00000004, + 0x0401f004, 0x1c01f000, 0x0201f000, 0x00103f53, + 0x4803c856, 0x4a035014, 0x00000005, 0x83cca400, + 0x00000006, 0x4200a800, 0x0010b350, 0x4200b000, + 0x00000005, 0x0201f800, 0x0010a93e, 0x42007800, + 0x0010b350, 0x46007800, 0x11030000, 0x0201f800, + 0x00103f58, 0x04020014, 0x59a80015, 0x8c000500, + 0x04020011, 0x59a80810, 0x82040580, 0x00ffffff, + 0x0400000d, 0x82040d00, 0x000000ff, 0x82040400, + 0x00101eb5, 0x50000800, 0x80040910, 0x42001000, + 0x00000004, 0x0401fb95, 0x0400000b, 0x0201f800, + 0x0010403d, 0x4200b000, 0x00000004, 0x83cca400, + 0x00000007, 0x4200a800, 0x0010b351, 0x0201f800, + 0x0010a93e, 0x42000800, 0x00000005, 0x0201f000, + 0x00103f8e, 0x59a80016, 0x80000540, 0x0400001e, + 0x4803c857, 0x42001000, 0x00103f62, 0x0201f800, + 0x00105cc9, 0x59a80016, 0x82000580, 0x00000014, + 0x04020016, 0x59cc1006, 0x82081580, 0x11030000, + 0x04020012, 0x59cc1007, 0x8c08153e, 0x0400000b, + 0x59a80015, 0x8c000504, 0x04020008, 0x42000000, + 0x0010b63d, 0x0201f800, 0x0010a86e, 0x59a80015, + 0x84000544, 0x48035015, 0x4a035014, 0x00000006, + 0x0401f003, 0x1c01f000, 0x0401f3cd, 0x4803c856, + 0x4a035014, 0x00000007, 0x83cca400, 0x00000006, + 0x4200a800, 0x0010b350, 0x4200b000, 0x00000005, + 0x0201f800, 0x0010a93e, 0x42007800, 0x0010b350, + 0x46007800, 0x11040000, 0x0401fbc2, 0x04020020, + 0x59a80015, 0x8c000500, 0x0402001d, 0x599c0017, + 0x8c000500, 0x0400001a, 0x599c1402, 0x82080480, + 0x0000007f, 0x02021800, 0x00100615, 0x4c080000, + 0x82081400, 0x00101eb5, 0x50081000, 0x82081500, + 0x000000ff, 0x480b5010, 0x42000800, 0x00000003, + 0x0201f800, 0x001069af, 0x5c000800, 0x42001000, + 0x00000004, 0x0401fb39, 0x04000005, 0x0401fd25, + 0x04000003, 0x0201f800, 0x00101668, 0x42000800, + 0x00000005, 0x0401f3d5, 0x59a80016, 0x80000540, + 0x0400001e, 0x4803c857, 0x42001000, 0x00103f62, + 0x0201f800, 0x00105cc9, 0x59a80016, 0x82000580, + 0x00000014, 0x04020016, 0x59cc1006, 0x82081580, + 0x11040000, 0x04020012, 0x59cc1007, 0x8c08153e, + 0x0400000b, 0x59a80015, 0x8c000504, 0x04020008, + 0x42000000, 0x0010b63d, 0x0201f800, 0x0010a86e, + 0x59a80015, 0x84000544, 0x48035015, 0x4a035014, + 0x00000008, 0x0401f003, 0x1c01f000, 0x0401f378, + 0x4803c856, 0x4a035014, 0x00000009, 0x83cca400, + 0x00000006, 0x4200a800, 0x0010b350, 0x4200b000, + 0x00000005, 0x0201f800, 0x0010a93e, 0x42007800, + 0x0010b350, 0x46007800, 0x11050100, 0x0401fb6d, + 0x0402000a, 0x59a80015, 0x8c000500, 0x04020007, + 0x0401fa88, 0x04020005, 0x82000540, 0x00000001, + 0x0201f800, 0x00101668, 0x42000800, 0x00000005, + 0x0401fb96, 0x4d3c0000, 0x42027800, 0x00000001, + 0x0201f800, 0x00109640, 0x5c027800, 0x1c01f000, + 0x59a80016, 0x80000540, 0x04000038, 0x4803c857, + 0x42001000, 0x00103f62, 0x0201f800, 0x00105cc9, + 0x59a80016, 0x82000580, 0x00000014, 0x04020030, + 0x59cc1006, 0x82080500, 0x11050000, 0x82000580, + 0x11050000, 0x0402002a, 0x8c081510, 0x04000014, + 0x59cc1007, 0x8c08153e, 0x0400000b, 0x59a80015, + 0x8c000504, 0x04020008, 0x42000000, 0x0010b63d, + 0x0201f800, 0x0010a86e, 0x59a80015, 0x84000544, + 0x48035015, 0x4a035013, 0x00000001, 0x4a035014, + 0x0000000a, 0x0401f817, 0x0401f014, 0x80000540, + 0x04020013, 0x59cc1007, 0x8c08153e, 0x0400000b, + 0x59a80015, 0x8c000504, 0x04020008, 0x42000000, + 0x0010b63d, 0x0201f800, 0x0010a86e, 0x59a80015, + 0x84000544, 0x48035015, 0x497b5013, 0x4a035014, + 0x0000000e, 0x0401f06a, 0x1c01f000, 0x0401f318, + 0x4803c856, 0x4a035014, 0x0000000b, 0x42001000, + 0x0010b351, 0x4008a800, 0x4200b000, 0x00000020, + 0x4600a800, 0xffffffff, 0x8054a800, 0x8058b040, + 0x040207fc, 0x42007800, 0x0010b350, 0x46007800, + 0x11060000, 0x42001000, 0x0010b351, 0x0401fb09, + 0x04000005, 0x50080000, 0x46001000, 0x00ffffff, + 0x0401f00c, 0x50080800, 0x82040d00, 0x0000ffff, + 0x59a80010, 0x82000500, 0x000000ff, 0x82000540, + 0x00000100, 0x800000e0, 0x80040d40, 0x44041000, + 0x42000800, 0x00000021, 0x0401f32c, 0x59a80016, + 0x80000540, 0x04000012, 0x4803c857, 0x59a80016, + 0x42001000, 0x00103f62, 0x0201f800, 0x00105cc9, + 0x59a80016, 0x82000580, 0x00000084, 0x04020009, + 0x59cc1006, 0x82081580, 0x11060000, 0x04020005, + 0x4a035014, 0x0000000c, 0x0401f003, 0x1c01f000, + 0x0401f2db, 0x4803c856, 0x4a035014, 0x0000000d, + 0x83cca400, 0x00000006, 0x4200a800, 0x0010b350, + 0x4200b000, 0x00000021, 0x0201f800, 0x0010a93e, + 0x42007800, 0x0010b350, 0x46007800, 0x11070000, + 0x42000800, 0x00000021, 0x0401f304, 0x59a80016, + 0x80000540, 0x04000014, 0x4803c857, 0x59a80016, + 0x42001000, 0x00103f62, 0x0201f800, 0x00105cc9, + 0x82000580, 0x00000084, 0x0402000c, 0x59cc1006, + 0x82081580, 0x11070000, 0x04020008, 0x4a035013, + 0x00000001, 0x0401fa91, 0x4a035014, 0x0000000e, + 0x0401f003, 0x1c01f000, 0x0401f2b1, 0x4803c856, + 0x82040d40, 0x00000001, 0x0201f800, 0x001040b9, + 0x4a035014, 0x0000000f, 0x497b5016, 0x42006000, + 0xffffffff, 0x42006800, 0x00300000, 0x0401fbfe, + 0x42006000, 0xffdfffff, 0x41786800, 0x0401fbfa, + 0x42000800, 0x000007d0, 0x42001000, 0x00103f62, + 0x0201f000, 0x00105ca2, 0x4803c856, 0x59a80016, + 0x80000540, 0x04020296, 0x1c01f000, 0x4803c856, + 0x4a035014, 0x00000011, 0x83cca400, 0x00000006, + 0x4200a800, 0x0010b350, 0x4200b000, 0x00000005, + 0x0201f800, 0x0010a93e, 0x4200a800, 0x0010b350, + 0x4600a800, 0x11020000, 0x0401fa8a, 0x04020015, + 0x59a80010, 0x82000d00, 0xffff0000, 0x04000011, + 0x82000500, 0x000000ff, 0x0400000e, 0x82000c00, + 0x00101eb5, 0x50040800, 0x80040910, 0x82040580, + 0x0000007e, 0x04000007, 0x82040580, 0x00000080, + 0x04000004, 0x42001000, 0x00000004, 0x0401fa07, + 0x42000800, 0x00000005, 0x0401f2a8, 0x59a80016, + 0x80000540, 0x04000020, 0x4803c857, 0x42001000, + 0x00103f62, 0x0201f800, 0x00105cc9, 0x59a80016, + 0x82000580, 0x00000014, 0x04020016, 0x59cc1006, + 0x82081580, 0x11030000, 0x04020012, 0x59cc1007, + 0x8c08153e, 0x0400000b, 0x59a80015, 0x8c000504, + 0x04020008, 0x42000000, 0x0010b63d, 0x0201f800, + 0x0010a86e, 0x59a80015, 0x84000544, 0x48035015, + 0x4a035014, 0x00000012, 0x0401f804, 0x0401f002, + 0x0401fa4b, 0x1c01f000, 0x4803c856, 0x4a035014, + 0x00000013, 0x83cca400, 0x00000006, 0x4200a800, + 0x0010b350, 0x4200b000, 0x00000005, 0x0201f800, + 0x0010a93e, 0x4200a800, 0x0010b350, 0x4600a800, + 0x11030000, 0x0401fa3f, 0x04020013, 0x59a80015, + 0x8c000500, 0x04020010, 0x59a80810, 0x82040580, + 0x00ffffff, 0x0400000c, 0x82040d00, 0x000000ff, + 0x82040400, 0x00101eb5, 0x50000800, 0x80040910, + 0x42001000, 0x00000004, 0x0401f9c0, 0x04000002, + 0x0401fb11, 0x42000800, 0x00000005, 0x0401f25f, + 0x59a80016, 0x80000540, 0x04000020, 0x4803c857, + 0x42001000, 0x00103f62, 0x0201f800, 0x00105cc9, + 0x59a80016, 0x82000580, 0x00000014, 0x04020016, + 0x59cc1006, 0x82081580, 0x11040000, 0x04020012, + 0x59cc1007, 0x8c08153e, 0x0400000b, 0x59a80015, + 0x8c000504, 0x04020008, 0x42000000, 0x0010b63d, + 0x0201f800, 0x0010a86e, 0x59a80015, 0x84000544, + 0x48035015, 0x4a035014, 0x00000014, 0x0401f804, + 0x0401f002, 0x0401fa02, 0x1c01f000, 0x4803c856, + 0x4a035014, 0x00000015, 0x83cca400, 0x00000006, + 0x4200a800, 0x0010b350, 0x4200b000, 0x00000005, + 0x0201f800, 0x0010a93e, 0x4200a800, 0x0010b350, + 0x4600a800, 0x11040000, 0x0401f9f6, 0x04020020, + 0x59a80015, 0x8c000500, 0x0402001d, 0x599c0017, + 0x8c000500, 0x0400001a, 0x599c1402, 0x82080480, + 0x0000007f, 0x02021800, 0x00100615, 0x4c080000, + 0x82081400, 0x00101eb5, 0x50081000, 0x82081500, + 0x000000ff, 0x480b5010, 0x42000800, 0x00000003, + 0x0201f800, 0x001069af, 0x5c000800, 0x42001000, + 0x00000004, 0x0401f96d, 0x04000005, 0x0201f800, + 0x001038d8, 0x02020800, 0x00101668, 0x42000800, + 0x00000005, 0x0401f209, 0x59a80016, 0x80000540, + 0x0400003f, 0x4803c857, 0x42001000, 0x00103f62, + 0x0201f800, 0x00105cc9, 0x59a80016, 0x82000580, + 0x00000014, 0x04020035, 0x59cc1006, 0x82080500, + 0x11050000, 0x82000580, 0x11050000, 0x0402002f, + 0x8c081510, 0x04000010, 0x0401fb1f, 0x59cc1007, + 0x8c08153e, 0x0400000b, 0x59a80015, 0x8c000504, + 0x04020008, 0x42000000, 0x0010b63d, 0x0201f800, + 0x0010a86e, 0x59a80015, 0x84000544, 0x48035015, + 0x0401f013, 0x59cc1007, 0x8c08153e, 0x0400000b, + 0x59a80015, 0x8c000504, 0x04020008, 0x42000000, + 0x0010b63d, 0x0201f800, 0x0010a86e, 0x59a80015, + 0x84000544, 0x48035015, 0x82000540, 0x00000001, + 0x0401fb01, 0x497b5013, 0x0401f003, 0x4a035013, + 0x00000001, 0x59cc1007, 0x8c08153c, 0x04000003, + 0x4a035026, 0x00000008, 0x4a035014, 0x00000016, + 0x0401f804, 0x0401f002, 0x0401f98d, 0x1c01f000, + 0x4803c856, 0x83cca400, 0x00000006, 0x4200a800, + 0x0010b350, 0x4200b000, 0x00000005, 0x0201f800, + 0x0010a93e, 0x4a035014, 0x00000017, 0x59a80013, + 0x8c000500, 0x04000006, 0x42001000, 0x0010b350, + 0x46001000, 0x11050100, 0x0401f003, 0x4a035014, + 0x0000001b, 0x0401f97b, 0x0402000a, 0x59a80015, + 0x8c000500, 0x04020007, 0x0401f896, 0x04020005, + 0x82000540, 0x00000001, 0x0201f800, 0x00101668, + 0x42000800, 0x00000005, 0x0401f9a4, 0x4d3c0000, + 0x42027800, 0x00000001, 0x0201f800, 0x00109640, + 0x5c027800, 0x1c01f000, 0x59a80016, 0x80000540, + 0x04000015, 0x4803c857, 0x42001000, 0x00103f62, + 0x0201f800, 0x00105cc9, 0x59a80016, 0x82000580, + 0x00000084, 0x0402000b, 0x59cc1006, 0x82081580, + 0x11060000, 0x04020007, 0x80000580, 0x0401fab6, + 0x4a035014, 0x00000018, 0x0401f804, 0x0401f002, + 0x0401f94b, 0x1c01f000, 0x4803c856, 0x4a035014, + 0x00000019, 0x83cca400, 0x00000006, 0x4200a800, + 0x0010b350, 0x4200b000, 0x00000021, 0x0201f800, + 0x0010a93e, 0x42003800, 0x0010b351, 0x0401f941, + 0x04020018, 0x401c2800, 0x50141000, 0x80080130, + 0x80000000, 0x40001800, 0x82081500, 0x00ffffff, + 0x800000f0, 0x80080540, 0x44002800, 0x59a80810, + 0x82040d00, 0x000000ff, 0x400c1000, 0x80081104, + 0x82082400, 0x0010b351, 0x50101000, 0x820c0500, + 0x00000003, 0x0c01f806, 0x80081540, 0x44082000, + 0x42000800, 0x00000021, 0x0401f15c, 0x00103e37, + 0x00103e3c, 0x00103e41, 0x00103e46, 0x800408f0, + 0x40040000, 0x82081500, 0x00ffffff, 0x1c01f000, + 0x800408e0, 0x40040000, 0x82081500, 0xff00ffff, + 0x1c01f000, 0x800408d0, 0x40040000, 0x82081500, + 0xffff00ff, 0x1c01f000, 0x40040000, 0x82081500, + 0xffffff00, 0x1c01f000, 0x59a80016, 0x80000540, + 0x04000016, 0x4803c857, 0x42001000, 0x00103f62, + 0x0201f800, 0x00105cc9, 0x59a80016, 0x82000580, + 0x00000084, 0x0402000c, 0x59cc1006, 0x82081580, + 0x11070000, 0x04020008, 0x4a035013, 0x00000001, + 0x0401f8d2, 0x4a035014, 0x0000001a, 0x0401f804, + 0x0401f002, 0x0401f8f2, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401fa54, 0x4a035014, 0x0000001b, + 0x83cca400, 0x00000006, 0x4200a800, 0x0010b350, + 0x59a82016, 0x40100000, 0x8000b104, 0x40580800, + 0x5450a800, 0x8050a000, 0x8054a800, 0x8058b040, + 0x040207fc, 0x0401f119, 0x1c01f000, 0x1c01f000, + 0x4803c856, 0x42003000, 0x00000004, 0x42004000, + 0x0010b351, 0x599c2817, 0x8c142d14, 0x0402001f, + 0x42001000, 0x00000003, 0x40200000, 0x80080400, + 0x50000800, 0x82042580, 0xffffffff, 0x04020005, + 0x80081040, 0x80183040, 0x040207f8, 0x0401f05e, + 0x800811c0, 0x04020006, 0x82042580, 0x3fffffff, + 0x04000058, 0x82040d40, 0xc0000000, 0x4200b000, + 0x00000020, 0x42001800, 0x00000001, 0x40042000, + 0x80102102, 0x04021021, 0x800c18c2, 0x8058b040, + 0x040207fc, 0x0401f04b, 0x41781000, 0x40200000, + 0x80080400, 0x50000800, 0x82042580, 0xffffffff, + 0x04020005, 0x80081000, 0x80183040, 0x040207f8, + 0x0401f040, 0x800811c0, 0x04020003, 0x82040d40, + 0xc0000000, 0x4200b000, 0x00000001, 0x42001800, + 0x80000000, 0x40042000, 0x801020c2, 0x04021007, + 0x800c1902, 0x8058b000, 0x82580480, 0x00000021, + 0x040017fa, 0x0401f02f, 0x40200000, 0x80082400, + 0x50100000, 0x800c0540, 0x44002000, 0x59a80015, + 0x84000540, 0x48035015, 0x40580000, 0x42002800, + 0x00000020, 0x80142c80, 0x40080000, 0x42003800, + 0x00000003, 0x801c0480, 0x800000ca, 0x80142d40, + 0x82144c00, 0x00101eb5, 0x50242800, 0x82142d00, + 0x000000ff, 0x48175010, 0x4c040000, 0x40140800, + 0x0201f800, 0x00101655, 0x5c000800, 0x40001800, + 0x500c0000, 0x80100540, 0x44001800, 0x59a80015, + 0x84000540, 0x48035015, 0x4200a800, 0x0010b351, + 0x4020a000, 0x4200b000, 0x00000004, 0x0201f800, + 0x0010a93e, 0x82000540, 0x00000001, 0x0401f002, + 0x80000580, 0x1c01f000, 0x4807c857, 0x480bc857, + 0x4008b000, 0x83cca400, 0x00000007, 0x4200a800, + 0x0010b351, 0x40541000, 0x0201f800, 0x0010a93e, + 0x40041800, 0x41782000, 0x42000000, 0x00000003, + 0x820c1c80, 0x00000020, 0x04001004, 0x80102000, + 0x80000040, 0x0401f7fb, 0x40041800, 0x801021c0, + 0x04000005, 0x820c1c80, 0x00000020, 0x80102040, + 0x040207fd, 0x42002000, 0x00000001, 0x800c19c0, + 0x04000004, 0x801020c2, 0x800c1840, 0x040207fe, + 0x80083c00, 0x83cc2c00, 0x00000007, 0x80142c00, + 0x50140000, 0x80102d00, 0x04020012, 0x80100540, + 0x44003800, 0x82042400, 0x00101eb5, 0x50102800, + 0x82142d00, 0x000000ff, 0x48175010, 0x4c040000, + 0x40140800, 0x0201f800, 0x00101655, 0x5c000800, + 0x59a80015, 0x84000540, 0x48035015, 0x80000580, + 0x1c01f000, 0x4807c856, 0x42001000, 0x00008017, + 0x59a8184e, 0x0201f800, 0x0010a876, 0x0201f800, + 0x00103857, 0x1c01f000, 0x4807c856, 0x4200b000, + 0x00000020, 0x83cca400, 0x00000007, 0x4200a800, + 0x0010bc20, 0x0201f000, 0x0010a94f, 0x4807c856, + 0x0201f800, 0x00106c32, 0x42000800, 0x000000f7, + 0x0401f8f4, 0x497b2804, 0x497b2805, 0x497b281c, + 0x497b281d, 0x4202d800, 0x00000001, 0x42006000, + 0xbf7fffff, 0x42006800, 0x00018000, 0x0401f966, + 0x42006000, 0xfffeffff, 0x41786800, 0x0401f962, + 0x497b504e, 0x42000800, 0x0000002d, 0x42001000, + 0x00103fe4, 0x0201f000, 0x00105ca2, 0x4807c856, + 0x0401ffe3, 0x497b5014, 0x497b5016, 0x1c01f000, + 0x4807c856, 0x59a80005, 0x8c000506, 0x1c01f000, + 0x4807c856, 0x42006000, 0xffffffff, 0x42006800, + 0x00000028, 0x0401f14c, 0x4807c856, 0x0401ffc2, + 0x0201f800, 0x0010698c, 0x4df00000, 0x0201f800, + 0x00106b71, 0x5c03e000, 0x02000800, 0x00106982, + 0x59c400a4, 0x82000500, 0x0000000f, 0x82000580, + 0x00000002, 0x0402000a, 0x42006000, 0xffffffff, + 0x42006800, 0x00200000, 0x0401f937, 0x42006000, + 0xffdfffff, 0x41786800, 0x0401f933, 0x497b5014, + 0x42000800, 0x000000f7, 0x0401f8b2, 0x59c400a3, + 0x82000500, 0xbf20bfff, 0x82000540, 0x0001c000, + 0x480388a3, 0x84000520, 0x480388a3, 0x497b504e, + 0x42000800, 0x0000002d, 0x42001000, 0x00103fe4, + 0x0201f000, 0x00105ca2, 0x497b5016, 0x59b400f5, + 0x8c000500, 0x04020004, 0x82000540, 0x00000001, + 0x480368f5, 0x800400c4, 0x82000400, 0x00002000, + 0x4803910a, 0x59b400f6, 0x82000500, 0x00000018, + 0x040207fd, 0x4a0368f0, 0x0010b349, 0x42000000, + 0x0010b350, 0x4c040000, 0x50000800, 0x82040d80, + 0x11010000, 0x04000003, 0x50000800, 0x4807c857, + 0x5c000800, 0x480368f1, 0x82040400, 0x0000dc00, + 0x480368f3, 0x59c400a4, 0x82000500, 0x0000000f, + 0x82000580, 0x00000008, 0x04020017, 0x4c5c0000, + 0x4c600000, 0x59c4b805, 0x8c5cbd3a, 0x04020005, + 0x42000000, 0x0010b616, 0x0201f800, 0x0010a86e, + 0x4a038805, 0x02000000, 0x0201f800, 0x00101a59, + 0x4000c000, 0x0201f800, 0x001019d0, 0x4202d800, + 0x00000001, 0x497b5014, 0x5c00c000, 0x5c00b800, + 0x1c01f000, 0x59c8010b, 0x8c000502, 0x040007e2, + 0x59c408a4, 0x82040d00, 0x0000000f, 0x82040d80, + 0x0000000b, 0x04020005, 0x59a80814, 0x82040d40, + 0x00002000, 0x0401f004, 0x59a80812, 0x82040d40, + 0x00001000, 0x4807504e, 0x59a8084a, 0x800409c0, + 0x04020007, 0x42000800, 0x000007d0, 0x42001000, + 0x00103f62, 0x0201f800, 0x00105da7, 0x1c01f000, + 0x4807c856, 0x0401ff40, 0x0201f800, 0x0010698c, + 0x4df00000, 0x0201f800, 0x00106b71, 0x5c03e000, + 0x02000800, 0x00106982, 0x59c400a4, 0x82000500, + 0x0000000f, 0x82000580, 0x00000002, 0x0402000a, + 0x42006000, 0xffffffff, 0x42006800, 0x00200000, + 0x0401f8b5, 0x42006000, 0xffdfffff, 0x41786800, + 0x0401f8b1, 0x0201f800, 0x00104e13, 0x04000014, + 0x0201f800, 0x00104e23, 0x04020011, 0x4a035032, + 0x0000aaaa, 0x4c040000, 0x0201f800, 0x00101694, + 0x59a8002a, 0x82000500, 0xffff0000, 0x80040540, + 0x4803502a, 0x5c000800, 0x4a035033, 0x00000000, + 0x0201f800, 0x00104d76, 0x0401f008, 0x4a03504c, + 0x00000005, 0x42000000, 0x00000001, 0x0201f800, + 0x001015fa, 0x0401ff1e, 0x1c01f000, 0x0401f809, + 0x42006000, 0xbf7f7fff, 0x41786800, 0x0401f08e, + 0x42006000, 0xbf7f7fff, 0x41786800, 0x0401f08a, + 0x0201f800, 0x00104e23, 0x04020009, 0x59c40006, + 0x82000540, 0x000000f0, 0x48038806, 0x42006000, + 0xbfffffff, 0x41786800, 0x0401f87f, 0x1c01f000, + 0x800408d0, 0x59a80015, 0x8c000506, 0x04000006, + 0x59a80010, 0x82000500, 0x000000ff, 0x80040540, + 0x0401f003, 0x82040540, 0x000000f7, 0x480388a7, + 0x1c01f000, 0x4807c856, 0x42000000, 0x0010b639, + 0x0201f800, 0x0010a86e, 0x42003000, 0x00000005, + 0x4d3c0000, 0x4c180000, 0x42003000, 0x0000000d, + 0x42027800, 0x00000002, 0x0401f038, 0x4807c856, + 0x42000000, 0x0010b66a, 0x0201f800, 0x0010a86e, + 0x42003000, 0x00000000, 0x4d3c0000, 0x4c180000, + 0x42003000, 0x0000000f, 0x42027800, 0x00000002, + 0x0401f02a, 0x4807c856, 0x42000000, 0x0010b669, + 0x0201f800, 0x0010a86e, 0x42003000, 0x00000003, + 0x4d3c0000, 0x4c180000, 0x42003000, 0x0000000e, + 0x42027800, 0x00000202, 0x0401f01c, 0x4807c856, + 0x42000000, 0x0010b668, 0x0201f800, 0x0010a86e, + 0x42003000, 0x00000004, 0x4d3c0000, 0x4c180000, + 0x42003000, 0x00000010, 0x42027800, 0x00000202, + 0x0401f00e, 0x4807c856, 0x42000000, 0x0010b63c, + 0x0201f800, 0x0010a86e, 0x42003000, 0x00000001, + 0x4d3c0000, 0x4c180000, 0x42003000, 0x0000000c, + 0x42027800, 0x00000202, 0x42001800, 0x0000ffff, + 0x42002000, 0x00000007, 0x0201f800, 0x001038c7, + 0x5c003000, 0x4d400000, 0x0201f800, 0x0010a784, + 0x42028000, 0x0000002a, 0x0201f800, 0x00101d90, + 0x5c028000, 0x5c027800, 0x1c01f000, 0x4807c856, + 0x04011000, 0x4a03c840, 0x0010b349, 0x4a03c842, + 0x00000040, 0x40000000, 0x040117ff, 0x42007800, + 0x0010b349, 0x46007800, 0x00000011, 0x803c7800, + 0x4a007800, 0x220000ef, 0x4a007801, 0x000000ef, + 0x4a007802, 0x01380000, 0x4a007803, 0x00000000, + 0x4a007804, 0xffffffff, 0x4a007805, 0x00000000, + 0x1c01f000, 0x59c400a3, 0x80300500, 0x80340540, + 0x480388a3, 0x1c01f000, 0x4833c857, 0x59c400a3, + 0x80300540, 0x480388a3, 0x80300580, 0x480388a3, + 0x1c01f000, 0x4803c856, 0x04000004, 0x4a03504b, + 0x00000001, 0x0401f002, 0x497b504b, 0x1c01f000, + 0x4803c856, 0x59c80002, 0x80000540, 0x0400000a, + 0x80000040, 0x04000008, 0x4a039005, 0x00000140, + 0x42000000, 0x00000006, 0x80000040, 0x040207ff, + 0x0401f7f4, 0x1c01f000, 0x4c5c0000, 0x4c600000, + 0x59c4b805, 0x485fc856, 0x8c5cbd3a, 0x04020005, + 0x42000000, 0x0010b616, 0x0201f800, 0x0010a86e, + 0x4a038805, 0x02000000, 0x0201f800, 0x00101a59, + 0x4000c000, 0x0201f800, 0x001019d0, 0x4a038805, + 0x04000000, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x497a6a00, 0x4a026c00, 0x00000707, 0x497a6801, + 0x497a6808, 0x497a6809, 0x497a6806, 0x497a6807, + 0x497a6c0b, 0x497a680c, 0x0201f800, 0x0010393e, + 0x04020006, 0x5934080f, 0x59340010, 0x80040540, + 0x02020800, 0x00100615, 0x4a026a04, 0x00000100, + 0x497a6a03, 0x59340402, 0x82000500, 0x000000ff, + 0x48026c02, 0x497a6c04, 0x497a6a05, 0x497a6c05, + 0x497a6811, 0x4d2c0000, 0x5934000d, 0x49466c03, + 0x80025d40, 0x04000004, 0x0201f800, 0x00100843, + 0x497a680d, 0x5c025800, 0x599c0401, 0x48026a0b, + 0x599c0208, 0x48026c12, 0x4a02680a, 0x00006000, + 0x0201f000, 0x00104acf, 0x42000000, 0x00000005, + 0x80000d80, 0x0401f02d, 0x0201f800, 0x00104858, + 0x04020017, 0x59a80026, 0x8c00050a, 0x04020010, + 0x59340212, 0x82000500, 0x0000ff00, 0x4803c857, + 0x0400000b, 0x59340a00, 0x8c040d1e, 0x02000000, + 0x000201f8, 0x42000000, 0x00000029, 0x42000800, + 0x00001000, 0x492fc857, 0x0401f018, 0x492fc857, + 0x42000000, 0x00000028, 0x0401f012, 0x59a80805, + 0x8c040d02, 0x04020003, 0x8c040d00, 0x04000004, + 0x42000000, 0x00000004, 0x0401f00a, 0x42000000, + 0x00000029, 0x59340a00, 0x8c040d1e, 0x04000005, + 0x492fc857, 0x42000800, 0x00001000, 0x0401f003, + 0x492fc857, 0x80000d80, 0x4803c857, 0x80028540, + 0x1c01f000, 0x4803c857, 0x59a80005, 0x8c000500, + 0x040207ec, 0x0201f800, 0x00104836, 0x040207e4, + 0x59340200, 0x8c00050e, 0x040007e1, 0x0201f000, + 0x000201f8, 0x0201f800, 0x00104639, 0x040007bf, + 0x0201f000, 0x000201fc, 0x592c0206, 0x492fc857, + 0x82000d80, 0x000007ff, 0x04020006, 0x4a025c0a, + 0x00000030, 0x42026800, 0x0010b320, 0x0401f021, + 0x82000c80, 0x000007f0, 0x04021046, 0x81ac0400, + 0x50000000, 0x80026d40, 0x04000038, 0x0201f800, + 0x00104732, 0x04020038, 0x592c040a, 0x8c00050a, + 0x04020014, 0x592e6009, 0x83300480, 0x0010cfc0, + 0x0400103b, 0x41580000, 0x81300480, 0x04021038, + 0x59300c06, 0x82040580, 0x00000009, 0x04020037, + 0x4a025a06, 0x00000000, 0x497a5800, 0x59300008, + 0x80000540, 0x04020018, 0x492e6008, 0x0401f010, + 0x0201f800, 0x00020892, 0x04000019, 0x592c0206, + 0x49366009, 0x492e6008, 0x4a026406, 0x00000009, + 0x497a6015, 0x49325809, 0x82000d80, 0x000007ff, + 0x04020003, 0x4a026015, 0x00008000, 0x42027000, + 0x00000043, 0x0201f800, 0x000208d8, 0x80000580, + 0x0401f020, 0x40000800, 0x58040000, 0x80000d40, + 0x040207fd, 0x492c0800, 0x0401f01a, 0x42000000, + 0x0000002c, 0x0401f016, 0x42000000, 0x00000028, + 0x0401f013, 0x59a80805, 0x82040500, 0x00000003, + 0x04000004, 0x42000000, 0x00000004, 0x0401f00c, + 0x42000000, 0x00000029, 0x0401f009, 0x42000000, + 0x00000008, 0x0401f006, 0x82040580, 0x00000007, + 0x040207fb, 0x42000000, 0x00000005, 0x80000540, + 0x1c01f000, 0x492fc857, 0x592e8c06, 0x83440d80, + 0x000007fc, 0x04000004, 0x83440480, 0x000007f0, + 0x04021014, 0x0201f800, 0x00020267, 0x04020011, + 0x0201f800, 0x00104842, 0x04020011, 0x0201f800, + 0x00020892, 0x0400001c, 0x49366009, 0x492e6008, + 0x4a026406, 0x0000000a, 0x42027000, 0x00000040, + 0x0201f800, 0x000208d8, 0x80000580, 0x0401f011, + 0x42000000, 0x00000028, 0x0401f00d, 0x0201f800, + 0x00104858, 0x040007fb, 0x59a80805, 0x82040d00, + 0x00000003, 0x04000004, 0x42000000, 0x00000004, + 0x0401f003, 0x42000000, 0x00000029, 0x80000540, + 0x1c01f000, 0x42000000, 0x0000002c, 0x0401f7fc, + 0x492fc857, 0x592e8c06, 0x4947c857, 0x83440c80, + 0x00000800, 0x42000000, 0x0000000a, 0x0402119c, + 0x592c4207, 0x4823c857, 0x82200500, 0x0000000f, + 0x0c01f001, 0x00104205, 0x0010428d, 0x001042dd, + 0x001042e8, 0x001042f3, 0x00104201, 0x00104201, + 0x00104201, 0x00104303, 0x00104361, 0x00104386, + 0x00104201, 0x00104201, 0x00104201, 0x00104201, + 0x00104201, 0x4803c857, 0x42000000, 0x0000000c, + 0x0401f183, 0x592c1008, 0x82081500, 0x00ffffff, + 0x59a80010, 0x80084d80, 0x42000000, 0x00000010, + 0x0400017b, 0x0201f800, 0x00104768, 0x04000036, + 0x4803c857, 0x82004d80, 0x0000001d, 0x0402001a, + 0x0201f800, 0x00105439, 0x59340405, 0x4c000000, + 0x0201f800, 0x00104836, 0x5c000000, 0x04000004, + 0x8c20450a, 0x04000028, 0x80000580, 0x44002800, + 0x59340008, 0x48002802, 0x59340009, 0x48002801, + 0x59340006, 0x48002804, 0x59340007, 0x48002803, + 0x4200b000, 0x00000005, 0x0201f800, 0x00109328, + 0x0401f18c, 0x4803c857, 0x82004d80, 0x0000001a, + 0x04020003, 0x40101000, 0x0401f15c, 0x4803c857, + 0x82004d80, 0x0000001b, 0x04020003, 0x40181000, + 0x0401f156, 0x4803c857, 0x82004d80, 0x0000001c, + 0x04000157, 0x82004d80, 0x00000019, 0x42000000, + 0x0000000a, 0x04000146, 0x42000000, 0x0000000a, + 0x0402015d, 0x59a8006f, 0x8c000502, 0x0400001b, + 0x0201f800, 0x00104836, 0x04000018, 0x59340212, + 0x82000500, 0x0000ff00, 0x42001000, 0x00000010, + 0x0402000c, 0x42001000, 0x00000008, 0x59a80026, + 0x8c000506, 0x04020009, 0x59340002, 0x82000500, + 0x00ff0000, 0x82000580, 0x00ff0000, 0x04000007, + 0x0201f800, 0x00104ada, 0x42000000, 0x0000001c, + 0x40181000, 0x0402012d, 0x0201f800, 0x00020892, + 0x04000137, 0x49366009, 0x492e6008, 0x4a026406, + 0x00000001, 0x8c20450a, 0x04000004, 0x592c0404, + 0x8400055c, 0x48025c04, 0x4c200000, 0x4d3c0000, + 0x42027800, 0x00001800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x5c004000, 0x8c204512, 0x0400000b, + 0x599c0018, 0x8c000518, 0x04000008, 0x592c0009, + 0x82000500, 0x00000380, 0x5934080a, 0x80040d40, + 0x84040d54, 0x4806680a, 0x417a7800, 0x0401f93a, + 0x42000800, 0x00000003, 0x0401f941, 0x42027000, + 0x00000002, 0x0201f800, 0x000208d8, 0x80000580, + 0x0401f130, 0x0201f800, 0x00020267, 0x04020112, + 0x0201f800, 0x0010483c, 0x0400000c, 0x0201f800, + 0x00104836, 0x04020112, 0x4c600000, 0x4178c000, + 0x42027800, 0x00001800, 0x417a6000, 0x0201f800, + 0x00101e48, 0x5c00c000, 0x59a8006f, 0x8c000502, + 0x0400001b, 0x0201f800, 0x00104836, 0x04000018, + 0x59340212, 0x82000500, 0x0000ff00, 0x42001000, + 0x00000010, 0x0402000c, 0x42001000, 0x00000008, + 0x59a80026, 0x8c000506, 0x04020009, 0x59340002, + 0x82000500, 0x00ff0000, 0x82000580, 0x00ff0000, + 0x04000007, 0x0201f800, 0x00104ada, 0x42000000, + 0x0000001c, 0x40181000, 0x040200d4, 0x0201f800, + 0x00020892, 0x040000de, 0x5934080a, 0x8c204512, + 0x0400000c, 0x599c0018, 0x8c000518, 0x04000009, + 0x592c0009, 0x82000500, 0x00000380, 0x82041500, + 0xfffffc7f, 0x80080d40, 0x84040d54, 0x0401f002, + 0x84040d14, 0x4806680a, 0x49366009, 0x492e6008, + 0x4a026406, 0x00000001, 0x417a7800, 0x0401f8ea, + 0x42000800, 0x00000005, 0x0401f8f1, 0x42027000, + 0x00000003, 0x0201f800, 0x000208d8, 0x80000580, + 0x0401f0e0, 0x0201f800, 0x00020267, 0x040200c2, + 0x0201f800, 0x0010484b, 0x040200c5, 0x0201f800, + 0x001092e0, 0x040000b6, 0x80000580, 0x0401f0d5, + 0x0201f800, 0x00020267, 0x040200b7, 0x0201f800, + 0x0010484b, 0x040200ba, 0x0201f800, 0x00108ea3, + 0x040000ab, 0x80000580, 0x0401f0ca, 0x0201f800, + 0x00020267, 0x040200ac, 0x83444d80, 0x000007fe, + 0x42000000, 0x0000000a, 0x0402008d, 0x0201f800, + 0x00104836, 0x040200aa, 0x0201f800, 0x001092f8, + 0x0400009b, 0x80000580, 0x0401f0ba, 0x82200500, + 0x00000070, 0x04020005, 0x8c20450e, 0x42000000, + 0x0000000c, 0x0402007e, 0x8c20450a, 0x0400000d, + 0x4d3c0000, 0x42027800, 0x00001000, 0x8c20450e, + 0x04020002, 0x853e7d56, 0x82200500, 0x000000a0, + 0x0201f800, 0x00104822, 0x5c027800, 0x0401f0a1, + 0x8c204508, 0x04020024, 0x592c1008, 0x82081500, + 0x00ffffff, 0x59a80010, 0x80084d80, 0x42000000, + 0x00000010, 0x04000066, 0x0201f800, 0x00104768, + 0x0400002b, 0x4803c857, 0x82004d80, 0x0000001a, + 0x04020003, 0x40101000, 0x0401f064, 0x4803c857, + 0x82004d80, 0x0000001b, 0x04020003, 0x40181000, + 0x0401f05e, 0x4803c857, 0x82004d80, 0x0000001c, + 0x0400005f, 0x82004d80, 0x00000019, 0x42000000, + 0x0000000a, 0x0400004e, 0x42000000, 0x0000000a, + 0x0401f065, 0x0201f800, 0x00020267, 0x04020062, + 0x4d3c0000, 0x42027800, 0x00001000, 0x8c20450e, + 0x04020002, 0x853e7d56, 0x82200500, 0x00000090, + 0x0201f800, 0x0010480a, 0x5c027800, 0x42000000, + 0x0000000a, 0x0402003a, 0x0401f06a, 0x836c0580, + 0x00000003, 0x42000800, 0x00000007, 0x04020006, + 0x0201f800, 0x0010928e, 0x04000007, 0x80000580, + 0x0401f064, 0x0201f800, 0x00104871, 0x04000059, + 0x0401f05c, 0x0201f800, 0x00104871, 0x0400003c, + 0x0401f058, 0x0201f800, 0x00020267, 0x0402003e, + 0x836c0580, 0x00000003, 0x04020048, 0x8c204508, + 0x0400000a, 0x4c600000, 0x4178c000, 0x42027800, + 0x00001800, 0x417a6000, 0x0201f800, 0x00101e48, + 0x5c00c000, 0x0401f047, 0x0201f800, 0x0010483c, + 0x0400000c, 0x0201f800, 0x00104836, 0x04020030, + 0x4c600000, 0x4178c000, 0x42027800, 0x00001800, + 0x417a6000, 0x0201f800, 0x00101e48, 0x5c00c000, + 0x480bc856, 0x0201f800, 0x001090f8, 0x04000018, + 0x80000580, 0x0401f037, 0x0401f7db, 0x480bc857, + 0x42000800, 0x00000019, 0x40001000, 0x4200b000, + 0x00000002, 0x0401f00a, 0x480bc857, 0x40000800, + 0x4200b000, 0x00000002, 0x0401f005, 0x480bc857, + 0x40000800, 0x4200b000, 0x00000001, 0x480bc857, + 0x42028000, 0x00000031, 0x0401f020, 0x480bc857, + 0x42000800, 0x00000003, 0x4200b000, 0x00000001, + 0x0401f7f7, 0x480bc857, 0x42000800, 0x0000000a, + 0x4200b000, 0x00000001, 0x0401f7f1, 0x480bc857, + 0x42000800, 0x00000009, 0x40001000, 0x4200b000, + 0x00000002, 0x0401f7ea, 0x480bc857, 0x42000800, + 0x00000007, 0x4200b000, 0x00000001, 0x0401f7e4, + 0x480bc857, 0x4200b000, 0x00000001, 0x0401f7e0, + 0x80028580, 0x4178b000, 0x82000540, 0x00000001, + 0x1c01f000, 0x4937c857, 0x59326809, 0x59341200, + 0x813e79c0, 0x04000003, 0x84081540, 0x0401f002, + 0x84081500, 0x480a6a00, 0x1c01f000, 0x59326809, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4937c857, + 0x82040580, 0x00000006, 0x04020004, 0x42000000, + 0x00000606, 0x0401f021, 0x82040580, 0x00000004, + 0x04020004, 0x42000000, 0x00000404, 0x0401f01b, + 0x82040580, 0x00000007, 0x42000000, 0x00000707, + 0x04000016, 0x82040580, 0x00000003, 0x42000000, + 0x00000703, 0x04000011, 0x82040580, 0x00000005, + 0x42000000, 0x00000405, 0x0400000c, 0x82040580, + 0x00000009, 0x42000000, 0x00000409, 0x04000007, + 0x82040580, 0x0000000b, 0x42000000, 0x0000070b, + 0x02020800, 0x00100615, 0x4803c857, 0x48026c00, + 0x82040d80, 0x00000006, 0x04020005, 0x59341404, + 0x800811c0, 0x02000800, 0x00100615, 0x1c01f000, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4947c857, + 0x481bc857, 0x83440480, 0x00000800, 0x04021034, + 0x83441400, 0x0010aa00, 0x50080000, 0x80026d40, + 0x04020011, 0x4c180000, 0x4d2c0000, 0x0201f800, + 0x00100819, 0x412e6800, 0x5c025800, 0x5c003000, + 0x04000027, 0x45341000, 0x497a680d, 0x497a6810, + 0x497a680f, 0x497a680e, 0x4c180000, 0x0401fccd, + 0x5c003000, 0x59340a12, 0x4c040000, 0x0201f800, + 0x00104e0d, 0x5c000800, 0x04000009, 0x82180500, + 0x00ffff00, 0x04000008, 0x59a81010, 0x82081500, + 0x00ffff00, 0x80080580, 0x04000003, 0x80000580, + 0x0401f004, 0x82180500, 0x000000ff, 0x800000d0, + 0x80040d80, 0x04000003, 0x4803c857, 0x48026a12, + 0x59340002, 0x80180580, 0x04000003, 0x481bc857, + 0x481a6802, 0x80000580, 0x1c01f000, 0x4803c856, + 0x82000540, 0x00000001, 0x0401f7fc, 0x4947c857, + 0x83440480, 0x00000800, 0x04021011, 0x83441400, + 0x0010aa00, 0x50080000, 0x80026d40, 0x0400000b, + 0x0401fbf2, 0x0402000a, 0x59a80005, 0x8c000502, + 0x04000004, 0x59340200, 0x8c00050e, 0x04000004, + 0x82000540, 0x00000001, 0x1c01f000, 0x80000580, + 0x0401f7fe, 0x5c000000, 0x4c000000, 0x4803c857, + 0x4947c857, 0x4d2c0000, 0x4d300000, 0x83440480, + 0x00000800, 0x04021024, 0x83441400, 0x0010aa00, + 0x50080000, 0x80026d40, 0x0400001b, 0x45781000, + 0x5934000d, 0x80025d40, 0x02020800, 0x00100843, + 0x59366011, 0x813261c0, 0x0400000e, 0x4c640000, + 0x5930c800, 0x59325808, 0x0201f800, 0x00108df4, + 0x02020800, 0x00100843, 0x0201f800, 0x000208b4, + 0x82666540, 0x00000000, 0x040207f6, 0x5c00c800, + 0x0201f800, 0x00104acf, 0x41365800, 0x0201f800, + 0x0010083b, 0x80000580, 0x5c026000, 0x5c025800, + 0x1c01f000, 0x82000540, 0x00000001, 0x0401f7fb, + 0x4937c857, 0x4c580000, 0x59cc0001, 0x82000500, + 0x00ffffff, 0x48026802, 0x497a6c01, 0x497a6a01, + 0x59340200, 0x84000502, 0x48026a00, 0x0201f800, + 0x00104e0d, 0x04020017, 0x59340403, 0x82000580, + 0x000007fe, 0x04000005, 0x59a80026, 0x8c00050a, + 0x04020010, 0x0401f008, 0x59cc0408, 0x8c000518, + 0x0400000c, 0x59cc0009, 0x48035035, 0x59cc000a, + 0x48035036, 0x59cc0207, 0x80000540, 0x04020003, + 0x42000000, 0x00000001, 0x48038893, 0x4803501e, + 0x59cc0a09, 0x82040d00, 0x00000010, 0x59cc0408, + 0x82000500, 0x00000020, 0x04000002, 0x84040d40, + 0x5934000a, 0x82000500, 0xffffffee, 0x80040540, + 0x4802680a, 0x83cca400, 0x0000000b, 0x8334ac00, + 0x00000006, 0x4200b000, 0x00000002, 0x0201f800, + 0x0010a93e, 0x83cca400, 0x0000000d, 0x8334ac00, + 0x00000008, 0x4200b000, 0x00000002, 0x0201f800, + 0x0010a93e, 0x59cc0a18, 0x82040480, 0x00000800, + 0x0402100c, 0x82040480, 0x00000400, 0x04001004, + 0x42000800, 0x00000400, 0x0401f006, 0x82040480, + 0x00000200, 0x04001003, 0x42000800, 0x00000200, + 0x42001000, 0x0010b33f, 0x58080202, 0x80041480, + 0x04001002, 0x40000800, 0x48066a04, 0x59340403, + 0x82000580, 0x000007fe, 0x04020003, 0x59cc0a08, + 0x48066a04, 0x0201f800, 0x00104afd, 0x5c00b000, + 0x1c01f000, 0x4937c857, 0x59a80026, 0x8c000508, + 0x04000004, 0x84000556, 0x4803c857, 0x48035026, + 0x59cc0207, 0x4803c857, 0x48026a05, 0x59cc020a, + 0x4803c857, 0x48026c05, 0x59341200, 0x599c0818, + 0x5934180a, 0x4807c857, 0x480bc857, 0x480fc857, + 0x59cc2006, 0x82102500, 0xff000000, 0x82102580, + 0x02000000, 0x04000007, 0x8c00050e, 0x04000009, + 0x8c0c1d14, 0x04000003, 0x8c0c1d0e, 0x04000005, + 0x8c040d18, 0x04000003, 0x8408154a, 0x0401f002, + 0x8408150a, 0x8c000510, 0x04000009, 0x8c0c1d14, + 0x04000003, 0x8c0c1d10, 0x04000005, 0x8c040d18, + 0x04000003, 0x8408154e, 0x0401f002, 0x8408150e, + 0x8c000512, 0x04000009, 0x8c0c1d14, 0x04000003, + 0x8c0c1d12, 0x04000005, 0x8c040d18, 0x04000003, + 0x8408155c, 0x0401f002, 0x8408151c, 0x480a6a00, + 0x1c01f000, 0x4803c856, 0x4c5c0000, 0x4d2c0000, + 0x4c580000, 0x5934000d, 0x80025d40, 0x04000029, + 0x592c0003, 0x82000480, 0x00000008, 0x0400100b, + 0x412cb800, 0x592c0001, 0x80025d40, 0x040207f9, + 0x0201f800, 0x0010082a, 0x04000037, 0x492fc857, + 0x492cb801, 0x0401f020, 0x832c0c00, 0x00000004, + 0x4200b000, 0x00000008, 0x50040000, 0x82000580, + 0xffffffff, 0x04020006, 0x80041000, 0x50080000, + 0x82000580, 0xffffffff, 0x04000007, 0x82040c00, + 0x00000002, 0x8058b040, 0x040207f4, 0x0201f800, + 0x00100615, 0x45480800, 0x454c1000, 0x592c1803, + 0x800c1800, 0x480e5803, 0x480fc857, 0x0401f014, + 0x0201f800, 0x0010082a, 0x04000017, 0x492fc857, + 0x492e680d, 0x497a5802, 0x4a025803, 0x00000001, + 0x494a5804, 0x494e5805, 0x832c0c00, 0x00000006, + 0x4200b000, 0x0000000e, 0x46000800, 0xffffffff, + 0x80040800, 0x8058b040, 0x040207fc, 0x82000540, + 0x00000001, 0x5c00b000, 0x5c025800, 0x5c00b800, + 0x1c01f000, 0x80000580, 0x0401f7fb, 0x4803c856, + 0x4d3c0000, 0x4d2c0000, 0x5934000d, 0x80025d40, + 0x0400001f, 0x592c0002, 0x80000540, 0x0402001f, + 0x412e7800, 0x0401f8c8, 0x0402001c, 0x46000800, + 0xffffffff, 0x46001000, 0xffffffff, 0x4813c857, + 0x480fc857, 0x580c0003, 0x82000c80, 0x00000002, + 0x04021014, 0x480fc857, 0x400c0000, 0x812c0580, + 0x04020004, 0x580c0001, 0x4802680d, 0x0401f003, + 0x580c0001, 0x48002001, 0x400e5800, 0x0201f800, + 0x0010083a, 0x82000540, 0x00000001, 0x5c025800, + 0x5c027800, 0x1c01f000, 0x80000580, 0x0401f7fc, + 0x80000040, 0x48001803, 0x4803c857, 0x0401f7f6, + 0x0201f800, 0x00020087, 0x59300007, 0x8400054e, + 0x48026007, 0x592c1a04, 0x820c1d00, 0x000000ff, + 0x820c0580, 0x00000048, 0x04000013, 0x0201f000, + 0x000202b0, 0x8c000500, 0x02020800, 0x000200e6, + 0x4a026203, 0x00000002, 0x592c1a04, 0x820c1d00, + 0x000000ff, 0x820c0580, 0x00000018, 0x02000000, + 0x000202b0, 0x820c0580, 0x00000048, 0x02020000, + 0x000202b0, 0x42000800, 0x80000804, 0x0201f800, + 0x00106466, 0x0201f000, 0x000202b9, 0x4a025a06, + 0x00000008, 0x0201f000, 0x00020381, 0x4a025a06, + 0x00000029, 0x0201f000, 0x00020381, 0x4a025a06, + 0x0000002a, 0x0201f000, 0x00020381, 0x4a025a06, + 0x00000028, 0x0201f000, 0x00020381, 0x4943c857, + 0x4d440000, 0x4d340000, 0x4d2c0000, 0x4c580000, + 0x4200b000, 0x000007f0, 0x417a8800, 0x0201f800, + 0x00020267, 0x04020007, 0x8d3e7d06, 0x04000004, + 0x59340200, 0x8c00050e, 0x04020002, 0x0401f813, + 0x81468800, 0x8058b040, 0x040207f5, 0x83440480, + 0x00000800, 0x04021008, 0x8d3e7d02, 0x04000006, + 0x42028800, 0x000007f0, 0x4200b000, 0x00000010, + 0x0401f7eb, 0x5c00b000, 0x5c025800, 0x5c026800, + 0x5c028800, 0x1c01f000, 0x4d2c0000, 0x41783000, + 0x5936580f, 0x812e59c0, 0x04000029, 0x592c0204, + 0x82000500, 0x000000ff, 0x82000580, 0x00000012, + 0x04000020, 0x8d3e7d00, 0x04000003, 0x0401f83c, + 0x0402001c, 0x592c2000, 0x497a5800, 0x801831c0, + 0x04020009, 0x59340010, 0x812c0580, 0x04020004, + 0x497a680f, 0x497a6810, 0x0401f008, 0x4812680f, + 0x0401f006, 0x48103000, 0x59340010, 0x812c0580, + 0x04020002, 0x481a6810, 0x4a025a04, 0x00000103, + 0x49425a06, 0x497a5c09, 0x0201f800, 0x00108f7d, + 0x0201f800, 0x00020381, 0x40125800, 0x0401f7da, + 0x412c3000, 0x592e5800, 0x0401f7d7, 0x5c025800, + 0x1c01f000, 0x4803c856, 0x41781800, 0x5934000f, + 0x80025d40, 0x04000010, 0x592c0005, 0x80200580, + 0x592c0000, 0x04000003, 0x412c1800, 0x0401f7f9, + 0x497a5800, 0x800c19c0, 0x04000008, 0x48001800, + 0x80000540, 0x04020004, 0x480e6810, 0x82000540, + 0x00000001, 0x1c01f000, 0x4802680f, 0x80000540, + 0x040207fd, 0x497a6810, 0x0401f7f9, 0x592c0008, + 0x81480580, 0x04020003, 0x592c0009, 0x814c0580, + 0x1c01f000, 0x4803c856, 0x4c580000, 0x413c1800, + 0x400c2000, 0x593c0002, 0x80000540, 0x04020018, + 0x4200b000, 0x00000008, 0x820c0c00, 0x00000004, + 0x50040000, 0x81480580, 0x04020005, 0x80041000, + 0x50080000, 0x814c0580, 0x0400000d, 0x82040c00, + 0x00000002, 0x8058b040, 0x040207f6, 0x400c2000, + 0x580c0001, 0x80001d40, 0x040207ee, 0x82000540, + 0x00000001, 0x5c00b000, 0x1c01f000, 0x80000580, + 0x0401f7fd, 0x4937c857, 0x4c580000, 0x4d2c0000, + 0x5934000d, 0x80025d40, 0x04020016, 0x0201f800, + 0x0010082a, 0x04000010, 0x492e680d, 0x4a025802, + 0x00000001, 0x497a5803, 0x832c0c00, 0x00000004, + 0x4200b000, 0x00000010, 0x46000800, 0xffffffff, + 0x80040800, 0x8058b040, 0x040207fc, 0x82000540, + 0x00000001, 0x5c025800, 0x5c00b000, 0x1c01f000, + 0x4d2c0000, 0x592e5801, 0x0201f800, 0x00100843, + 0x5c025800, 0x0401f7ea, 0x4d2c0000, 0x5936580d, + 0x812e59c0, 0x04000007, 0x4937c857, 0x497a680d, + 0x0201f800, 0x00100843, 0x82000540, 0x00000001, + 0x5c025800, 0x1c01f000, 0x59340405, 0x4937c857, + 0x4803c857, 0x8c000508, 0x1c01f000, 0x4803c856, + 0x0201f800, 0x00104e0d, 0x04000011, 0x59a80815, + 0x8c040d04, 0x0402000e, 0x59a80826, 0x8c040d06, + 0x0400000b, 0x83ac0400, 0x000007fe, 0x50000000, + 0x80026d40, 0x04000006, 0x0401f9a8, 0x04020004, + 0x59340200, 0x8400055a, 0x48026a00, 0x599c0017, + 0x8c000508, 0x04000015, 0x4200b000, 0x000007f0, + 0x417a8800, 0x0201f800, 0x00020267, 0x0402000c, + 0x0401f99a, 0x0402000a, 0x59a80010, 0x59340802, + 0x80040580, 0x82000500, 0x00ffff00, 0x04020004, + 0x59340200, 0x8400055a, 0x48026a00, 0x81468800, + 0x8058b040, 0x040207f0, 0x0401f885, 0x04000003, + 0x59a80836, 0x0401f006, 0x599c0017, 0x8c000508, + 0x04000007, 0x42000800, 0x000007d0, 0x42001000, + 0x001046c4, 0x0201f800, 0x00105da7, 0x1c01f000, + 0x4803c856, 0x4d300000, 0x4d340000, 0x4d440000, + 0x4d3c0000, 0x4c580000, 0x42001000, 0x001046c4, + 0x0201f800, 0x00105cc9, 0x59a80826, 0x8c040d06, + 0x04000015, 0x0401f86a, 0x04000013, 0x83ae6c00, + 0x000007fe, 0x51366800, 0x59340200, 0x8400051a, + 0x48026a00, 0x599c0017, 0x8c000508, 0x04000007, + 0x42000800, 0x000007d0, 0x42001000, 0x001046c4, + 0x0201f800, 0x00105da7, 0x0201f800, 0x00101bf0, + 0x0401f027, 0x4200b000, 0x000007f0, 0x80028d80, + 0x0201f800, 0x00020267, 0x0402001e, 0x59340200, + 0x8c00051a, 0x0400001b, 0x59368c03, 0x417a7800, + 0x42028000, 0x00000029, 0x41783000, 0x0201f800, + 0x0010a258, 0x59340200, 0x84000558, 0x8400051a, + 0x48026a00, 0x4937c857, 0x4a026c00, 0x00000707, + 0x42028000, 0x00000029, 0x0201f800, 0x001067f6, + 0x417a7800, 0x0201f800, 0x00106543, 0x417a6000, + 0x0201f800, 0x0010a0da, 0x0201f800, 0x00106982, + 0x81468800, 0x8058b040, 0x040207de, 0x5c00b000, + 0x5c027800, 0x5c028800, 0x5c026800, 0x5c026000, + 0x1c01f000, 0x4933c857, 0x59303809, 0x581c0200, + 0x8400051a, 0x48003a00, 0x1c01f000, 0x42026800, + 0x0010b320, 0x497a680e, 0x42028800, 0x000007ff, + 0x0201f800, 0x001040e4, 0x4937c857, 0x4a026c00, + 0x00000606, 0x4a026802, 0x00ffffff, 0x4a026a04, + 0x00000200, 0x4a026c04, 0x00000002, 0x1c01f000, + 0x59300009, 0x50000000, 0x4933c857, 0x4803c857, + 0x8c00050e, 0x1c01f000, 0x59300009, 0x50000000, + 0x8c00050a, 0x1c01f000, 0x4933c856, 0x0401f90f, + 0x04000006, 0x59340400, 0x82000d00, 0x000000ff, + 0x82041580, 0x00000005, 0x1c01f000, 0x4d340000, + 0x83ac0400, 0x000007fe, 0x50000000, 0x80026d40, + 0x04000003, 0x59340200, 0x8c00051a, 0x5c026800, + 0x1c01f000, 0x4937c857, 0x493fc857, 0x59340403, + 0x81ac0400, 0x50000000, 0x81340580, 0x02020800, + 0x00100615, 0x59341200, 0x813e79c0, 0x04000003, + 0x8408155e, 0x0401f002, 0x8408151e, 0x480a6a00, + 0x1c01f000, 0x4937c857, 0x0201f800, 0x00101eb0, + 0x04000006, 0x59a80835, 0x42001000, 0x0010475f, + 0x0201f800, 0x00105da7, 0x1c01f000, 0x4937c857, + 0x42001000, 0x0010475f, 0x0201f800, 0x00105cc9, + 0x59a81026, 0x84081512, 0x480b5026, 0x1c01f000, + 0x4c380000, 0x4c340000, 0x4c240000, 0x4c600000, + 0x4008c000, 0x83440480, 0x00000800, 0x04021045, + 0x80002d80, 0x41442000, 0x83447400, 0x0010aa00, + 0x4200b000, 0x000007f0, 0x83444c80, 0x000007f0, + 0x04001003, 0x4200b000, 0x00000010, 0x50380000, + 0x80000540, 0x0402001e, 0x41440000, 0x80100580, + 0x04020043, 0x40102800, 0x82104c80, 0x000007f0, + 0x04001015, 0x82104d80, 0x000007fc, 0x04020005, + 0x82604d80, 0x00fffffc, 0x0402002a, 0x0401f00e, + 0x82104d80, 0x000007fd, 0x04020005, 0x82604d80, + 0x00fffffd, 0x04020023, 0x0401f007, 0x82104d80, + 0x000007ff, 0x0402001f, 0x82604d80, 0x00ffffff, + 0x0402001c, 0x84142d5e, 0x0401f029, 0x40006800, + 0x58343002, 0x82183500, 0x00ffffff, 0x40180000, + 0x80600580, 0x04020019, 0x40100000, 0x81440580, + 0x0402000a, 0x40366800, 0x8c204508, 0x04000053, + 0x0401ff8a, 0x04020051, 0x4947c857, 0x42000000, + 0x0000001d, 0x0401f04e, 0x4947c857, 0x480bc857, + 0x4823c857, 0x42000000, 0x0000001a, 0x0401f048, + 0x4947c857, 0x4863c857, 0x4813c857, 0x42000000, + 0x00000019, 0x0401f042, 0x40100000, 0x81440580, + 0x04020007, 0x58343002, 0x4947c857, 0x481bc857, + 0x42000000, 0x0000001b, 0x0401f039, 0x80102000, + 0x80387000, 0x83444c80, 0x000007f0, 0x04001009, + 0x82104d80, 0x00000800, 0x0402000c, 0x42002000, + 0x000007f0, 0x42007000, 0x0010b1f0, 0x0401f007, + 0x82104d80, 0x000007f0, 0x04020004, 0x41782000, + 0x42007000, 0x0010aa00, 0x8058b040, 0x040207a4, + 0x801429c0, 0x04020007, 0x0201f800, 0x00100615, + 0x4947c857, 0x42000000, 0x0000000a, 0x0401f01c, + 0x4d2c0000, 0x4c180000, 0x40603000, 0x0401fc19, + 0x4947c857, 0x4937c857, 0x5c003000, 0x5c025800, + 0x040207f4, 0x497a6a12, 0x59a80026, 0x8c00050a, + 0x0402000d, 0x82600500, 0x00ffff00, 0x04000006, + 0x59a84810, 0x82244d00, 0x00ffff00, 0x80240580, + 0x04020005, 0x82600500, 0x000000ff, 0x800000d0, + 0x48026a12, 0x48626802, 0x80000580, 0x80000540, + 0x5c00c000, 0x5c004800, 0x5c006800, 0x5c007000, + 0x1c01f000, 0x5934000f, 0x5934140b, 0x80081040, + 0x04001002, 0x480a6c0b, 0x80000540, 0x02020800, + 0x00020275, 0x1c01f000, 0x4803c857, 0x4947c857, + 0x4c300000, 0x82006500, 0x00000030, 0x04000006, + 0x4c000000, 0x0201f800, 0x001091f3, 0x5c000000, + 0x0402000b, 0x8c00050e, 0x04000006, 0x0201f800, + 0x00020267, 0x04020006, 0x4937c857, 0x0401fc36, + 0x80000580, 0x5c006000, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fc, 0x4803c857, 0x4c580000, + 0x4d440000, 0x40001000, 0x80000d80, 0x4200b000, + 0x000007f0, 0x4c040000, 0x40068800, 0x4c080000, + 0x40080000, 0x0401ffdd, 0x5c001000, 0x5c000800, + 0x80040800, 0x8058b040, 0x040207f7, 0x5c028800, + 0x5c00b000, 0x1c01f000, 0x4c5c0000, 0x59340400, + 0x8200bd80, 0x00000606, 0x5c00b800, 0x1c01f000, + 0x4c5c0000, 0x59340400, 0x8200bd80, 0x00000404, + 0x5c00b800, 0x1c01f000, 0x4c5c0000, 0x59340400, + 0x8200bd80, 0x00000404, 0x04000003, 0x8200bd80, + 0x00000606, 0x5c00b800, 0x1c01f000, 0x4c5c0000, + 0x4c600000, 0x59340400, 0x8200bd00, 0x0000ff00, + 0x825cc580, 0x00000400, 0x04000003, 0x825cc580, + 0x00000600, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x4c5c0000, 0x59340400, 0x82000500, 0x000000ff, + 0x8200bd80, 0x00000003, 0x04000003, 0x8200bd80, + 0x00000005, 0x5c00b800, 0x1c01f000, 0x5c000000, + 0x4c000000, 0x4803c857, 0x4c5c0000, 0x59340400, + 0x82000500, 0x0000ff00, 0x8400b9c0, 0x805c0580, + 0x4937c857, 0x4803c857, 0x48026c00, 0x5c00b800, + 0x1c01f000, 0x4c040000, 0x4c080000, 0x592c0207, + 0x8c00050c, 0x0400000f, 0x592e8c06, 0x82000500, + 0x00000080, 0x84000548, 0x4d3c0000, 0x42027800, + 0x00001000, 0x0401ff8d, 0x5c027800, 0x82000540, + 0x00000001, 0x5c001000, 0x5c000800, 0x1c01f000, + 0x80000580, 0x0401f7fc, 0x592c040b, 0x82000500, + 0x0000e000, 0x82000580, 0x00006000, 0x04000019, + 0x836c0580, 0x00000003, 0x04000016, 0x836c0580, + 0x00000002, 0x04020106, 0x59a80026, 0x82000d00, + 0x00000038, 0x04020005, 0x59a80832, 0x800409c0, + 0x0400000c, 0x0401f0fe, 0x82000d00, 0x00000003, + 0x82040d80, 0x00000003, 0x040200f9, 0x82000d00, + 0x00000028, 0x04020003, 0x8c00050c, 0x040000f4, + 0x592c100a, 0x82080500, 0xff000000, 0x040200d2, + 0x59a80010, 0x80080580, 0x040000cc, 0x592c0c0b, + 0x82040d00, 0x0000e000, 0x82040480, 0x00008000, + 0x040210cc, 0x592e8c06, 0x83440480, 0x00000800, + 0x04001007, 0x83440580, 0x0000ffff, 0x040200b3, + 0x800409c0, 0x040200fe, 0x0401f0b0, 0x800409c0, + 0x040200fb, 0x41784000, 0x0401feaa, 0x040200e2, + 0x59342204, 0x592c000d, 0x80100480, 0x040010bc, + 0x42027000, 0x00000053, 0x592c2409, 0x82100500, + 0xffffff00, 0x040200aa, 0x4813c857, 0x592c000c, + 0x800001c0, 0x04000083, 0x82100580, 0x00000004, + 0x040000a0, 0x82100580, 0x00000051, 0x0400009d, + 0x82100580, 0x00000003, 0x04000016, 0x82100580, + 0x00000020, 0x0400004b, 0x82100580, 0x00000024, + 0x04000042, 0x82100580, 0x00000021, 0x04000042, + 0x82100580, 0x00000050, 0x04000037, 0x82100580, + 0x00000052, 0x04000031, 0x82100580, 0x00000005, + 0x0402006b, 0x42027000, 0x00000001, 0x0401f01b, + 0x42027000, 0x00000002, 0x59a8006f, 0x8c000502, + 0x04000016, 0x0401ff45, 0x04000014, 0x59340212, + 0x82000500, 0x0000ff00, 0x42001000, 0x00000010, + 0x0402000c, 0x59a80026, 0x8c000506, 0x0402006f, + 0x42001000, 0x00000008, 0x59340002, 0x82000500, + 0x00ff0000, 0x82000580, 0x00ff0000, 0x04000003, + 0x0401f9d6, 0x04020065, 0x0201f800, 0x00020892, + 0x04000081, 0x4a026406, 0x00000010, 0x49366009, + 0x42000800, 0x00000003, 0x83380580, 0x00000002, + 0x04000003, 0x42000800, 0x0000000b, 0x0201f800, + 0x001043c7, 0x0401f044, 0x42027000, 0x00000000, + 0x0401f003, 0x42027000, 0x00000004, 0x0401ff30, + 0x04020074, 0x0401f036, 0x42027000, 0x00000033, + 0x0401f006, 0x42027000, 0x00000005, 0x0401f003, + 0x42027000, 0x00000003, 0x0401ff1c, 0x04020069, + 0x59a8006f, 0x8c000502, 0x04000016, 0x0401ff0b, + 0x04000014, 0x59340212, 0x82000500, 0x0000ff00, + 0x42001000, 0x00000010, 0x0402000c, 0x59a80026, + 0x8c000506, 0x04020035, 0x42001000, 0x00000008, + 0x59340002, 0x82000500, 0x00ff0000, 0x82000580, + 0x00ff0000, 0x04000003, 0x0401f99c, 0x0402002b, + 0x0201f800, 0x00020892, 0x04000047, 0x4a026406, + 0x00000010, 0x49366009, 0x42000800, 0x00000005, + 0x83380580, 0x00000003, 0x04000003, 0x42000800, + 0x00000009, 0x0201f800, 0x001043c7, 0x0401f00a, + 0x82102580, 0x00000011, 0x04020030, 0x0201f800, + 0x00020892, 0x04000034, 0x4a026406, 0x00000010, + 0x49366009, 0x492e6008, 0x49325808, 0x813669c0, + 0x04000007, 0x592c0c0b, 0x8c040d18, 0x04000004, + 0x59340200, 0x84000514, 0x48026a00, 0x0201f800, + 0x000208d8, 0x80000580, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fd, 0x42001000, 0x0000000a, + 0x0401f018, 0x42001000, 0x00000010, 0x0401f015, + 0x42001000, 0x00000016, 0x0401f012, 0x42001000, + 0x00000017, 0x0401f00f, 0x42001000, 0x00000018, + 0x0401f00c, 0x42001000, 0x0000001b, 0x0401f009, + 0x42001000, 0x0000001e, 0x0401f006, 0x42001000, + 0x00000024, 0x0401f003, 0x42001000, 0x00000020, + 0x42000800, 0x00000019, 0x42028000, 0x00000031, + 0x0401f7df, 0x42000800, 0x00000003, 0x0401f003, + 0x42000800, 0x0000000a, 0x41781000, 0x0401f7f7, + 0x42000800, 0x00000009, 0x59341400, 0x0401f7f3, + 0x42028000, 0x00000008, 0x0401f005, 0x42000800, + 0x00000007, 0x416c1000, 0x0401f7ec, 0x41780800, + 0x41781000, 0x0401f7ca, 0x42028000, 0x00000000, + 0x0401f7fb, 0x82004d80, 0x0000001d, 0x02000800, + 0x00100615, 0x82004d80, 0x0000001a, 0x04020004, + 0x40101000, 0x40000800, 0x0401f7dc, 0x82004d80, + 0x0000001b, 0x04020003, 0x40181000, 0x0401f7fa, + 0x82004d80, 0x0000001c, 0x040007f7, 0x82004d80, + 0x00000019, 0x040007b5, 0x0401f7d6, 0x592e6008, + 0x0201f800, 0x001091e3, 0x040007b3, 0x59300c06, + 0x82040580, 0x00000011, 0x040207d6, 0x83440580, + 0x0000ffff, 0x04020005, 0x59326809, 0x813669c0, + 0x0400000e, 0x0401f7cf, 0x592c100a, 0x82081500, + 0x00ffffff, 0x41784000, 0x0401fd9e, 0x040207d6, + 0x59300009, 0x800001c0, 0x04000003, 0x81340580, + 0x040207c4, 0x49366009, 0x592c0c0b, 0x82041500, + 0x0000e000, 0x82080580, 0x00006000, 0x04000011, + 0x42000800, 0x00000100, 0x813669c0, 0x04000002, + 0x59340a04, 0x592c000d, 0x80040480, 0x040017a0, + 0x59300a03, 0x82040580, 0x00000007, 0x040207b1, + 0x492e6008, 0x42027000, 0x00000054, 0x0401f774, + 0x0201f800, 0x0010a6e6, 0x040007b4, 0x0401f7a9, + 0x492fc857, 0x592e6008, 0x4933c857, 0x0201f800, + 0x001091e3, 0x04000047, 0x59301406, 0x82080580, + 0x00000005, 0x04020061, 0x592c0207, 0x8c000500, + 0x04020085, 0x59a80021, 0x800001c0, 0x0402006a, + 0x59301203, 0x82080580, 0x00000007, 0x04020057, + 0x592e8c06, 0x83440480, 0x00000800, 0x04021032, + 0x41784000, 0x592c1009, 0x82081500, 0x00ffffff, + 0x0401fd60, 0x0402005f, 0x59300009, 0x800001c0, + 0x04000003, 0x81340580, 0x04020048, 0x4d300000, + 0x592e6013, 0x4933c857, 0x83300580, 0xffffffff, + 0x0400000d, 0x0201f800, 0x001091e3, 0x5c026000, + 0x04000029, 0x591c1406, 0x82080580, 0x00000006, + 0x04000046, 0x82080580, 0x00000011, 0x04000043, + 0x0401f002, 0x5c026000, 0x59a80010, 0x592c100a, + 0x82081500, 0x00ffffff, 0x80081580, 0x04020017, + 0x592c1009, 0x82081500, 0x00ffffff, 0x80081580, + 0x0400000f, 0x49366009, 0x492e6008, 0x42027000, + 0x00000092, 0x0201f800, 0x000208d8, 0x80000580, + 0x1c01f000, 0x42001000, 0x0000000a, 0x0401f00c, + 0x42001000, 0x00000010, 0x0401f009, 0x42001000, + 0x00000014, 0x0401f006, 0x42001000, 0x00000018, + 0x0401f003, 0x42001000, 0x0000003c, 0x492fc857, + 0x480bc857, 0x42000800, 0x00000019, 0x42028000, + 0x00000031, 0x82000540, 0x00000001, 0x0401f7e9, + 0x492fc857, 0x4803c857, 0x480bc857, 0x40000800, + 0x0401f7f7, 0x492fc857, 0x42000800, 0x0000000a, + 0x41781000, 0x0401f7f2, 0x4933c857, 0x59300406, + 0x4803c857, 0x59300203, 0x4803c857, 0x59300009, + 0x4803c857, 0x42028000, 0x00000008, 0x41780800, + 0x41781000, 0x0401f7e8, 0x42000800, 0x0000001e, + 0x0401f7f0, 0x42000800, 0x00000001, 0x0401f7ed, + 0x82004d80, 0x0000001d, 0x02000800, 0x00100615, + 0x82004d80, 0x0000001a, 0x04020003, 0x40101000, + 0x0401f7dc, 0x82004d80, 0x0000001b, 0x04020003, + 0x40181000, 0x0401f7d7, 0x82004d80, 0x0000001c, + 0x040007d4, 0x82004d80, 0x00000019, 0x040007d1, + 0x0401f7d5, 0x0201f800, 0x0010a6e6, 0x040207d7, + 0x42028000, 0x00000000, 0x0401f7dd, 0x5c000000, + 0x4c000000, 0x4803c857, 0x59302009, 0x801021c0, + 0x04000035, 0x58101400, 0x4813c857, 0x480bc857, + 0x82081d00, 0x000000ff, 0x59300c03, 0x82040580, + 0x00000008, 0x04000022, 0x82040580, 0x0000000a, + 0x04000017, 0x82040580, 0x0000000c, 0x04000010, + 0x82040580, 0x00000002, 0x04000019, 0x82040580, + 0x00000001, 0x04000012, 0x82040580, 0x00000003, + 0x0400000b, 0x82040580, 0x00000005, 0x04000004, + 0x82040580, 0x00000033, 0x04020017, 0x820c0580, + 0x00000009, 0x0400000d, 0x0401f013, 0x820c0580, + 0x00000005, 0x04000009, 0x0401f00f, 0x820c0580, + 0x0000000b, 0x04000005, 0x0401f00b, 0x820c0580, + 0x00000003, 0x04020008, 0x82081d00, 0xffffff00, + 0x840c01c0, 0x800c0540, 0x4807c857, 0x4803c857, + 0x48002400, 0x1c01f000, 0x599c0017, 0x8c00050a, + 0x04000003, 0x80000580, 0x1c01f000, 0x59a80026, + 0x82000500, 0x00000028, 0x04000008, 0x42028800, + 0x000007fd, 0x0201f800, 0x00020267, 0x04020003, + 0x5934000a, 0x8c000504, 0x1c01f000, 0x4d300000, + 0x5934000e, 0x80026540, 0x04000006, 0x0201f800, + 0x0010600e, 0x02000800, 0x001061e5, 0x497a680e, + 0x5c026000, 0x1c01f000, 0x4d440000, 0x4d340000, + 0x80000580, 0x40001800, 0x40028800, 0x82080580, + 0x00000008, 0x04020003, 0x42001800, 0x00000001, + 0x0201f800, 0x00020267, 0x0402000a, 0x0401fd4f, + 0x04020008, 0x800c19c0, 0x04000004, 0x59340405, + 0x8c000508, 0x04000003, 0x80081040, 0x04000009, + 0x81468800, 0x83440480, 0x00000800, 0x040017f1, + 0x80000580, 0x5c026800, 0x5c028800, 0x1c01f000, + 0x82000540, 0x00000001, 0x5c026800, 0x5c028800, + 0x1c01f000, 0x42000800, 0x00000001, 0x0401fb0e, + 0x04020034, 0x59a80026, 0x8c000508, 0x04020031, + 0x5934100a, 0x82081500, 0x0000e000, 0x42007000, + 0x0010b33f, 0x58380401, 0x8c000504, 0x0402001c, + 0x42000800, 0x00000001, 0x82080580, 0x00006000, + 0x04000024, 0x59341a04, 0x820c0480, 0x00000800, + 0x04001004, 0x42000800, 0x00000a00, 0x0401f009, + 0x820c0480, 0x00000400, 0x04001004, 0x42000800, + 0x00000500, 0x0401f003, 0x42000800, 0x00000200, + 0x82080580, 0x00002000, 0x04000002, 0x800408c2, + 0x82040d40, 0x00000001, 0x0401f00e, 0x42000800, + 0x00000008, 0x82080580, 0x00002000, 0x04020004, + 0x42000800, 0x00000004, 0x0401f006, 0x82080580, + 0x00000000, 0x04020003, 0x42000800, 0x00000002, + 0x48066c04, 0x1c01f000, 0x4a033020, 0x00000000, + 0x4a03b104, 0x80000000, 0x497b3026, 0x497b3027, + 0x497b3028, 0x497b3029, 0x497b302b, 0x497b3021, + 0x4a03b104, 0x60000001, 0x1c01f000, 0x599c0018, + 0x4803c856, 0x497b3024, 0x497b3025, 0x82000500, + 0x0000000f, 0x48033022, 0x04000008, 0x599c0216, + 0x82000500, 0x0000ffff, 0x04020003, 0x42000000, + 0x00000002, 0x48033023, 0x1c01f000, 0x0401fff0, + 0x4a03c826, 0x00000004, 0x599c0209, 0x80000540, + 0x0400001f, 0x599c0207, 0x80000540, 0x04000007, + 0x800000cc, 0x599c080d, 0x80040400, 0x4803b100, + 0x497bb102, 0x59d80101, 0x599c000d, 0x4803b100, + 0x599c000e, 0x4803b101, 0x599c0207, 0x80000540, + 0x04020002, 0x497bb102, 0x599c0a09, 0x82040540, + 0x00400000, 0x59980822, 0x4803b103, 0x4a03b109, + 0x00000004, 0x4a03b104, 0x10000001, 0x800409c0, + 0x04020004, 0x4a033020, 0x00000001, 0x1c01f000, + 0x4a033020, 0x00000002, 0x0401f7fd, 0x592c0204, + 0x492fc857, 0x80000540, 0x04000008, 0x42034000, + 0x0010b2a0, 0x59a1d81e, 0x80edd9c0, 0x02000800, + 0x00100615, 0x0401f003, 0x5931d821, 0x58ef400b, + 0x58ec0009, 0x800001c0, 0x08020000, 0x0201f800, + 0x00100615, 0x5998002b, 0x84000540, 0x4803302b, + 0x0201f000, 0x00020403, 0x42000000, 0x0010b654, + 0x0201f800, 0x0010a86e, 0x492fc857, 0x59980026, + 0x59980828, 0x80000000, 0x48033026, 0x800409c0, + 0x492f3028, 0x04000003, 0x492c0800, 0x0401f002, + 0x492f3029, 0x592c0001, 0x80000d40, 0x02020000, + 0x000202fb, 0x1c01f000, 0x59980026, 0x59980828, + 0x80000000, 0x48033026, 0x492fc857, 0x800409c0, + 0x492f3028, 0x04000003, 0x492c0800, 0x0401f002, + 0x492f3029, 0x592c0001, 0x80000d40, 0x02020800, + 0x000202fb, 0x0402d00e, 0x59980029, 0x80025d40, + 0x0400000f, 0x59980026, 0x80000040, 0x48033026, + 0x04020002, 0x48033028, 0x592c0000, 0x48033029, + 0x492fc857, 0x492fb107, 0x0400d7f4, 0x42000000, + 0x0010b654, 0x0201f800, 0x0010a86e, 0x0402e01d, + 0x59da5908, 0x496a5800, 0x412ed000, 0x815eb800, + 0x0400e7fc, 0x59c80000, 0x82000540, 0x00001200, + 0x48039000, 0x04006019, 0x59d8010a, 0x59d8090a, + 0x80040d80, 0x040207fd, 0x900001c0, 0x82000540, + 0x00000013, 0x4803c011, 0x5998002b, 0x84000500, + 0x4803302b, 0x59e00017, 0x8c000508, 0x04000003, + 0x4a03c017, 0x00000003, 0x4203e000, 0x30000001, + 0x59d80105, 0x82000500, 0x00018780, 0x02020000, + 0x00020482, 0x1c01f000, 0x5998002b, 0x84000540, + 0x4803302b, 0x0401f7f7, 0x5c000000, 0x4c000000, + 0x4803c857, 0x492fc857, 0x4943c857, 0x4807c857, + 0x4a025a04, 0x00000103, 0x49425a06, 0x48065a08, + 0x4a025c06, 0x0000ffff, 0x813261c0, 0x04000003, + 0x59300402, 0x48025c06, 0x832c0400, 0x00000009, + 0x04011000, 0x4803c840, 0x4a03c842, 0x0000000b, + 0x04011000, 0x1c01f000, 0x42000000, 0x0010b654, + 0x0201f800, 0x0010a86e, 0x0201f000, 0x00020464, + 0x59a80017, 0x82000c80, 0x0000000a, 0x02021800, + 0x00100615, 0x0c01f809, 0x4a038805, 0x000000f0, + 0x59c400a3, 0x82000500, 0x02870000, 0x02020800, + 0x00100615, 0x1c01f000, 0x00104c99, 0x00104c25, + 0x00104c40, 0x00104c69, 0x00104c8c, 0x00104cc6, + 0x00104cd8, 0x00104c40, 0x00104caa, 0x00104c24, + 0x1c01f000, 0x4a038808, 0x00000004, 0x0401f8f9, + 0x0201f800, 0x0010507b, 0x59c40805, 0x8c040d0e, + 0x04020013, 0x8c040d0a, 0x0402000b, 0x8c040d0c, + 0x04020006, 0x8c040d08, 0x0400000d, 0x4a035017, + 0x00000003, 0x0401f00a, 0x4a035017, 0x00000000, + 0x0401f007, 0x42000000, 0x0010b642, 0x0201f800, + 0x0010a86e, 0x4a035017, 0x00000002, 0x1c01f000, + 0x4a038808, 0x00000002, 0x0401f8de, 0x59c40805, + 0x8c040d08, 0x04020021, 0x8c040d0c, 0x0402001c, + 0x8c040d0e, 0x04020017, 0x82040500, 0x000000f0, + 0x0402001c, 0x0201f800, 0x0010507b, 0x4a038808, + 0x00000080, 0x59c40002, 0x8400050c, 0x48038802, + 0x0401f9d7, 0x4d3c0000, 0x42027800, 0x00000001, + 0x0201f800, 0x00109640, 0x5c027800, 0x4a038808, + 0x00000080, 0x4a035017, 0x00000009, 0x0401f009, + 0x4a035017, 0x00000001, 0x0401f006, 0x4a035017, + 0x00000000, 0x0401f003, 0x4a035017, 0x00000003, + 0x1c01f000, 0x0401f8b7, 0x4a038808, 0x00000080, + 0x59c40805, 0x8c040d0a, 0x0402001b, 0x8c040d0c, + 0x04020016, 0x8c040d0e, 0x04020011, 0x82040500, + 0x000000f0, 0x04020016, 0x59c40002, 0x8400050c, + 0x48038802, 0x0401f9b2, 0x4d3c0000, 0x42027800, + 0x00000001, 0x0201f800, 0x00109640, 0x5c027800, + 0x4a035017, 0x00000009, 0x0401f009, 0x4a035017, + 0x00000001, 0x0401f006, 0x4a035017, 0x00000000, + 0x0401f003, 0x4a035017, 0x00000002, 0x1c01f000, + 0x4a038808, 0x00000008, 0x59c40805, 0x8c040d0c, + 0x04020006, 0x8c040d0e, 0x04000006, 0x4a035017, + 0x00000001, 0x0401f003, 0x4a035017, 0x00000000, + 0x1c01f000, 0x0401f8d3, 0x59c40805, 0x8c040d0c, + 0x0402000d, 0x4c040000, 0x0401f882, 0x5c000800, + 0x8c040d0a, 0x04020006, 0x8c040d0e, 0x04000006, + 0x4a035017, 0x00000001, 0x0401f003, 0x4a035017, + 0x00000002, 0x1c01f000, 0x4a038808, 0x00000008, + 0x42001000, 0x00104d2c, 0x0201f800, 0x00105dbd, + 0x59c40805, 0x8c040d0a, 0x0402000d, 0x8c040d08, + 0x0402000b, 0x8c040d0c, 0x04020006, 0x8c040d0e, + 0x0400000d, 0x4a035017, 0x00000001, 0x0401f00a, + 0x4a035017, 0x00000000, 0x0401f007, 0x42000000, + 0x0010b642, 0x0201f800, 0x0010a86e, 0x4a035017, + 0x00000004, 0x1c01f000, 0x0401f8a6, 0x0401f859, + 0x59c40805, 0x8c040d0a, 0x0402000b, 0x8c040d0c, + 0x04020006, 0x8c040d0e, 0x04000009, 0x4a035017, + 0x00000001, 0x0401f006, 0x4a035017, 0x00000000, + 0x0401f003, 0x4a035017, 0x00000002, 0x1c01f000, + 0x4a038808, 0x00000004, 0x0401f846, 0x59c40805, + 0x8c040d0a, 0x04020010, 0x8c040d08, 0x0402000b, + 0x8c040d0c, 0x04020006, 0x8c040d0e, 0x0400000c, + 0x4a035017, 0x00000001, 0x0401f009, 0x4a035017, + 0x00000000, 0x0401f006, 0x4a035017, 0x00000003, + 0x0401f003, 0x4a035017, 0x00000002, 0x1c01f000, + 0x0401f91d, 0x02020800, 0x00100615, 0x59a80805, + 0x8c040d0c, 0x04000015, 0x84040d0c, 0x48075005, + 0x4a038805, 0x00000010, 0x0201f800, 0x001019a4, + 0x59c40005, 0x8c000508, 0x04000008, 0x4a038808, + 0x00000008, 0x4a035033, 0x00000001, 0x4202d800, + 0x00000001, 0x0401f01a, 0x59c40006, 0x84000548, + 0x48038806, 0x0401f016, 0x59a80017, 0x82000580, + 0x00000001, 0x0400000c, 0x59a80017, 0x82000580, + 0x00000005, 0x0402000c, 0x42000000, 0x0010b642, + 0x0201f800, 0x0010a86e, 0x4a035017, 0x00000008, + 0x0401f007, 0x42000000, 0x0010b642, 0x0201f800, + 0x0010a86e, 0x4a035017, 0x00000004, 0x1c01f000, + 0x4803c856, 0x4c040000, 0x4c080000, 0x42000800, + 0x00000064, 0x42001000, 0x00104d2c, 0x0201f800, + 0x00105db2, 0x5c001000, 0x5c000800, 0x1c01f000, + 0x4803c856, 0x4c040000, 0x0201f800, 0x0010698c, + 0x4df00000, 0x0201f800, 0x00106b71, 0x5c03e000, + 0x02000800, 0x00106982, 0x0401ffba, 0x5c000800, + 0x1c01f000, 0x4803c856, 0x4c040000, 0x4c080000, + 0x0201f800, 0x0010698c, 0x4df00000, 0x0201f800, + 0x00106b71, 0x5c03e000, 0x02000800, 0x00106982, + 0x59c40006, 0x84000500, 0x48038806, 0x0201f800, + 0x00106c32, 0x497b8880, 0x0201f800, 0x0010a7e7, + 0x0201f800, 0x0010a7f5, 0x0201f800, 0x00101886, + 0x4a03504c, 0x00000004, 0x4202d800, 0x00000004, + 0x4a038805, 0x00000001, 0x42001000, 0x00104d2c, + 0x0201f800, 0x00105dbd, 0x0201f800, 0x0010071a, + 0x0401f8bf, 0x04000006, 0x42006000, 0xfeffffff, + 0x41786800, 0x0201f800, 0x001040ad, 0x0201f800, + 0x0010048c, 0x42000000, 0x00000001, 0x0201f800, + 0x001015fa, 0x5c001000, 0x5c000800, 0x1c01f000, + 0x59c40008, 0x8c000508, 0x04020007, 0x4a038808, + 0x00000010, 0x4201d000, 0x00001388, 0x0201f800, + 0x00105dd2, 0x1c01f000, 0x4c040000, 0x59a80833, + 0x82040580, 0x00000000, 0x0400000b, 0x82040580, + 0x00000001, 0x0400000b, 0x82040580, 0x00000002, + 0x0400000b, 0x82040580, 0x00000003, 0x0400000b, + 0x0401f055, 0x4a035017, 0x00000000, 0x0401f009, + 0x4a035017, 0x00000004, 0x0401f006, 0x4a035017, + 0x00000001, 0x0401f003, 0x4a035017, 0x00000007, + 0x497b8880, 0x4a038893, 0x00000001, 0x41780000, + 0x0201f800, 0x00101670, 0x0201f800, 0x00106c32, + 0x836c0d80, 0x00000004, 0x04000008, 0x59c40006, + 0x82000500, 0xffffff0f, 0x82000540, 0x04000001, + 0x48038806, 0x0401f007, 0x59c40006, 0x82000500, + 0xffffff0f, 0x82000540, 0x04000000, 0x48038806, + 0x0401f873, 0x04020005, 0x59c40806, 0x82040d00, + 0xfbffff0f, 0x48078806, 0x59c40005, 0x8c000534, + 0x04020033, 0x42006000, 0xfc18ffff, 0x42006800, + 0x01000000, 0x0201f800, 0x001040ad, 0x0201f800, + 0x001019a4, 0x59c408a4, 0x82040d00, 0x0000000f, + 0x82040d80, 0x0000000c, 0x040208a9, 0x0401f85c, + 0x04000006, 0x42006000, 0xfeffffff, 0x41786800, + 0x0201f800, 0x001040ad, 0x836c0d80, 0x00000004, + 0x0400000f, 0x0401f85a, 0x04020008, 0x59940005, + 0x82000580, 0x00103f37, 0x04020004, 0x59940004, + 0x800001c0, 0x04020006, 0x59a8084d, 0x42001000, + 0x00104d39, 0x0201f800, 0x00105da7, 0x4a035033, + 0x00000004, 0x0401fe33, 0x0401f841, 0x04020008, + 0x59c408a4, 0x82040d00, 0x0000000f, 0x82040580, + 0x0000000c, 0x02020800, 0x00100615, 0x5c000800, + 0x1c01f000, 0x4803c856, 0x4c000000, 0x0201f800, + 0x00105de2, 0x4a035010, 0x00ffffff, 0x497b5032, + 0x59a8002a, 0x82000500, 0xffff0000, 0x4803502a, + 0x497b8880, 0x497b8893, 0x41780000, 0x0201f800, + 0x00101670, 0x59c40001, 0x82000500, 0xfffffcff, + 0x48038801, 0x42006000, 0xfc18ffff, 0x41786800, + 0x0201f800, 0x001040ad, 0x4a038808, 0x00000000, + 0x5c000000, 0x800001c0, 0x02020800, 0x00103f37, + 0x4a038805, 0x040000f0, 0x59c40006, 0x82000500, + 0xffffffcf, 0x82000540, 0x440000c1, 0x48038806, + 0x1c01f000, 0x4c5c0000, 0x59a8b832, 0x825cbd80, + 0x0000aaaa, 0x5c00b800, 0x1c01f000, 0x4c5c0000, + 0x599cb818, 0x825cbd00, 0x00000030, 0x825cbd80, + 0x00000000, 0x5c00b800, 0x1c01f000, 0x4c5c0000, + 0x599cb818, 0x825cbd00, 0x00000030, 0x825cbd80, + 0x00000010, 0x5c00b800, 0x1c01f000, 0x4c5c0000, + 0x599cb818, 0x825cbd00, 0x00000030, 0x825cbd80, + 0x00000020, 0x5c00b800, 0x1c01f000, 0x59a80005, + 0x4803c857, 0x82000d00, 0x00000013, 0x04000024, + 0x599c1017, 0x4d3c0000, 0x82000500, 0x00000011, + 0x04000006, 0x417a7800, 0x0201f800, 0x0010393e, + 0x0402000a, 0x0401f012, 0x42027800, 0x00000008, + 0x0201f800, 0x0010393e, 0x0400000d, 0x42003000, + 0x00000003, 0x0401f003, 0x42003000, 0x00000004, + 0x42028000, 0x0000000e, 0x0201f800, 0x0010a25b, + 0x599c1017, 0x8c08150a, 0x04020007, 0x42028000, + 0x00000004, 0x0201f800, 0x00101d90, 0x80000580, + 0x0401f80d, 0x5c027800, 0x0401f00a, 0x0201f800, + 0x0010393e, 0x04000007, 0x42028000, 0x0000000f, + 0x42003000, 0x00000001, 0x0201f800, 0x0010a25b, + 0x1c01f000, 0x59a80005, 0x04000004, 0x82000540, + 0x00000010, 0x0401f003, 0x82000500, 0xffffffef, + 0x48035005, 0x4803c857, 0x1c01f000, 0x4803c856, + 0x4c580000, 0x42000000, 0x0010b6ca, 0x0201f800, + 0x0010a86e, 0x42000800, 0x0010bef0, 0x59c40003, + 0x44000800, 0x59c40004, 0x48000801, 0x59c4000b, + 0x48000802, 0x59c4008e, 0x48000803, 0x59c4008f, + 0x48000804, 0x59c40090, 0x48000805, 0x59c40091, + 0x48000806, 0x59c40092, 0x48000807, 0x59c40093, + 0x48000808, 0x59c40099, 0x48000809, 0x59c4009e, + 0x4800080a, 0x59c400aa, 0x4800080b, 0x59c400af, + 0x4800080c, 0x59c400b2, 0x4800080d, 0x59c400b1, + 0x4800080e, 0x82040c00, 0x0000000f, 0x41c41800, + 0x4200b000, 0x00000030, 0x580c0050, 0x44000800, + 0x80040800, 0x800c1800, 0x8058b040, 0x040207fb, + 0x41c41800, 0x4200b000, 0x00000020, 0x580c0010, + 0x44000800, 0x80040800, 0x800c1800, 0x8058b040, + 0x040207fb, 0x497b8830, 0x4200b000, 0x00000040, + 0x59c40031, 0x44000800, 0x80040800, 0x8058b040, + 0x040207fc, 0x497b88ac, 0x4200b000, 0x00000010, + 0x59c400ad, 0x44000800, 0x80040800, 0x8058b040, + 0x040207fc, 0x59c41001, 0x4c080000, 0x8408150c, + 0x480b8801, 0x4a0370e4, 0x00000300, 0x4a0370e5, + 0xb0000000, 0x42000800, 0x00000800, 0x80040840, + 0x02000800, 0x00100615, 0x59b800e5, 0x8c000538, + 0x040207fb, 0x4a0370e4, 0x00000200, 0x42006000, + 0xffffffff, 0x42006800, 0x80000000, 0x0201f800, + 0x001040ad, 0x4a038807, 0x00000001, 0x497b8807, + 0x4a038808, 0x00000010, 0x42006000, 0xfcf8ffff, + 0x42006800, 0x01000000, 0x0201f800, 0x001040ad, + 0x5c001000, 0x480b8801, 0x42000800, 0x0010bef0, + 0x50040000, 0x48038803, 0x58040001, 0x48038804, + 0x58040002, 0x4803880b, 0x58040003, 0x4803888e, + 0x58040004, 0x4803888f, 0x58040005, 0x48038890, + 0x58040006, 0x48038891, 0x58040007, 0x48038892, + 0x58040008, 0x48038893, 0x58040009, 0x48038899, + 0x5804000a, 0x4803889e, 0x5804000b, 0x480388aa, + 0x5804000c, 0x480388af, 0x5804000d, 0x480388b2, + 0x5804000e, 0x480388b1, 0x82040c00, 0x0000000f, + 0x41c41800, 0x4200b000, 0x00000030, 0x50040000, + 0x48001850, 0x80040800, 0x800c1800, 0x8058b040, + 0x040207fb, 0x41c41800, 0x4200b000, 0x00000020, + 0x50040000, 0x48001810, 0x80040800, 0x800c1800, + 0x8058b040, 0x040207fb, 0x497b8830, 0x4200b000, + 0x00000040, 0x50040000, 0x48038831, 0x80040800, + 0x8058b040, 0x040207fc, 0x497b88ac, 0x4200b000, + 0x00000010, 0x50040000, 0x480388ad, 0x80040800, + 0x8058b040, 0x040207fc, 0x497b8880, 0x41780000, + 0x0201f800, 0x00101670, 0x59c408a4, 0x82040d00, + 0x0000000f, 0x82040580, 0x0000000c, 0x02020800, + 0x00100615, 0x4a038805, 0x04000000, 0x5c00b000, + 0x1c01f000, 0x4803c856, 0x4c580000, 0x4ce80000, + 0x42000000, 0x0010b643, 0x0201f800, 0x0010a86e, + 0x59c41008, 0x4c080000, 0x82080500, 0xffffff7f, + 0x48038808, 0x59c40004, 0x82000500, 0x00003e02, + 0x04000005, 0x4201d000, 0x00000014, 0x0201f800, + 0x00105dd2, 0x59c40006, 0x82000500, 0xffffff0f, + 0x48038806, 0x4a038805, 0x00000010, 0x4a038808, + 0x00000004, 0x4200b000, 0x00000065, 0x59c40005, + 0x8c000508, 0x04020012, 0x4201d000, 0x000003e8, + 0x0201f800, 0x00105dd2, 0x8058b040, 0x040207f8, + 0x0201f800, 0x00106c32, 0x4a038808, 0x00000008, + 0x4a035033, 0x00000001, 0x4202d800, 0x00000001, + 0x82000540, 0x00000001, 0x0401f030, 0x0201f800, + 0x00100b29, 0x42000000, 0x0010b6a7, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00100f42, 0x497b8880, + 0x59a8002a, 0x82000500, 0x0000ffff, 0x4c000000, + 0x0201f800, 0x00101670, 0x5c000000, 0x48038880, + 0x4a038808, 0x00000000, 0x4200b000, 0x00000065, + 0x4a038805, 0x000000f0, 0x0201f800, 0x001019a4, + 0x42000800, 0x000000f0, 0x59c40005, 0x80040d00, + 0x04000008, 0x4201d000, 0x000003e8, 0x0201f800, + 0x00105dd2, 0x8058b040, 0x040207f2, 0x0401f7d1, + 0x59c40006, 0x82000540, 0x000000f0, 0x48038806, + 0x59a8001e, 0x80000540, 0x04020002, 0x80000000, + 0x48038893, 0x80000580, 0x5c001000, 0x4df00000, + 0x0201f800, 0x001019ca, 0x5c03e000, 0x480b8808, + 0x5c01d000, 0x5c00b000, 0x1c01f000, 0x4803c856, + 0x4c580000, 0x4ce80000, 0x59c41008, 0x82080500, + 0xffffff7f, 0x48038808, 0x4c080000, 0x59c40004, + 0x82000500, 0x00003e02, 0x04000005, 0x4201d000, + 0x00000014, 0x0201f800, 0x00105dd2, 0x0201f800, + 0x00100b29, 0x42000000, 0x0010b6a8, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00100f42, 0x4a038808, + 0x00000002, 0x80000580, 0x48038880, 0x48038893, + 0x0201f800, 0x00101670, 0x4200b000, 0x00000384, + 0x4a038805, 0x000000f0, 0x0201f800, 0x001019a4, + 0x42000800, 0x000000f0, 0x59c40005, 0x80040d00, + 0x04000015, 0x82000500, 0x000000d0, 0x04020012, + 0x4201d000, 0x00000067, 0x0201f800, 0x00105dd2, + 0x8058b040, 0x040207ef, 0x0201f800, 0x00106c32, + 0x4a038808, 0x00000008, 0x4a035033, 0x00000001, + 0x4202d800, 0x00000001, 0x82000540, 0x00000001, + 0x0401f010, 0x497b8880, 0x59a8001e, 0x80000540, + 0x04020002, 0x80000000, 0x48038893, 0x59a8002a, + 0x82000500, 0x0000ffff, 0x4c000000, 0x0201f800, + 0x00101670, 0x5c000000, 0x48038880, 0x80000580, + 0x5c001000, 0x4df00000, 0x0201f800, 0x001019ca, + 0x5c03e000, 0x480b8808, 0x5c01d000, 0x5c00b000, + 0x1c01f000, 0x4803c856, 0x59c40004, 0x82000500, + 0x00003e02, 0x0400000a, 0x0201f800, 0x00106c32, + 0x4a038808, 0x00000008, 0x4a035033, 0x00000001, + 0x4202d800, 0x00000001, 0x0401f052, 0x0201f800, + 0x00100b29, 0x42000000, 0x0010b6a9, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00100f42, 0x59c40006, + 0x84000508, 0x48038806, 0x4a038805, 0x00000010, + 0x59a80805, 0x84040d4c, 0x48075005, 0x42000800, + 0x00000064, 0x42001000, 0x00104d2c, 0x0201f800, + 0x00105da7, 0x4a038808, 0x00000000, 0x497b8880, + 0x4a038805, 0x000000f0, 0x0201f800, 0x001019a4, + 0x42000800, 0x000000f0, 0x59c40005, 0x80040d00, + 0x0400000e, 0x82000500, 0x000000e0, 0x0402000b, + 0x4201d000, 0x000003e8, 0x0201f800, 0x00105dd2, + 0x0201f800, 0x00105c81, 0x59940004, 0x80000540, + 0x040207ec, 0x0401f023, 0x4c080000, 0x42001000, + 0x00104d39, 0x0201f800, 0x00105cc9, 0x42001000, + 0x00104d2c, 0x0201f800, 0x00105dbd, 0x5c001000, + 0x497b8880, 0x59a8001e, 0x80000540, 0x04020002, + 0x80000000, 0x48038893, 0x59a8002a, 0x82000500, + 0x0000ffff, 0x4c000000, 0x0201f800, 0x00101670, + 0x5c000000, 0x48038880, 0x59a80805, 0x84040d0c, + 0x48075005, 0x59c40006, 0x84000548, 0x48038806, + 0x0201f800, 0x001019ca, 0x4a038808, 0x00000080, + 0x1c01f000, 0x4803c856, 0x4d400000, 0x4d3c0000, + 0x0201f800, 0x00106c32, 0x0201f800, 0x0010a95a, + 0x04020024, 0x599c1017, 0x59a80805, 0x8c040d00, + 0x0402000c, 0x8c08151a, 0x0400001e, 0x84040d42, + 0x48075005, 0x42028000, 0x00000004, 0x42027800, + 0x00000008, 0x8c081508, 0x04020007, 0x0401f011, + 0x42028000, 0x00000004, 0x417a7800, 0x8c081508, + 0x0400000c, 0x4d400000, 0x42028000, 0x0000000e, + 0x42028800, 0x0000ffff, 0x0201f800, 0x0010a258, + 0x5c028000, 0x599c0817, 0x8c040d0a, 0x04020005, + 0x4943c857, 0x493fc857, 0x0201f800, 0x00101d90, + 0x497b8880, 0x4202d800, 0x00000001, 0x0401fcff, + 0x5c027800, 0x5c028000, 0x1c01f000, 0x0201f800, + 0x00100b29, 0x42000000, 0x0010b6aa, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00100f42, 0x42000000, + 0x00000001, 0x0201f800, 0x00101670, 0x4a038880, + 0x00000001, 0x0201f000, 0x001019ca, 0x4202e000, + 0x00000000, 0x4a033015, 0x00000001, 0x497b301d, + 0x497b3006, 0x4a03b004, 0x60000001, 0x59d80005, + 0x4a03b004, 0x90000001, 0x4a03a804, 0x60000001, + 0x59d40005, 0x4a03a804, 0x90000001, 0x0201f000, + 0x00105667, 0x4a03c825, 0x00000004, 0x4a03c827, + 0x00000004, 0x599c0409, 0x80000d40, 0x04000020, + 0x599c0407, 0x80000540, 0x04000007, 0x800000cc, + 0x599c100b, 0x80080400, 0x4803b000, 0x497bb002, + 0x59d80001, 0x599c000b, 0x4803b000, 0x599c000c, + 0x4803b001, 0x599c0407, 0x80000540, 0x04020002, + 0x497bb002, 0x599c0c09, 0x82040540, 0x00400000, + 0x4803b003, 0x4a03b009, 0x00000004, 0x4a03b004, + 0x10000001, 0x59e00803, 0x82040d00, 0xfffffeff, + 0x82040d40, 0x00008000, 0x4807c003, 0x599c040a, + 0x80000540, 0x04000020, 0x599c0408, 0x80000540, + 0x04000007, 0x800000cc, 0x599c100f, 0x80080400, + 0x4803a800, 0x497ba802, 0x59d40001, 0x599c000f, + 0x4803a800, 0x599c0010, 0x4803a801, 0x599c0408, + 0x80000540, 0x04020002, 0x497ba802, 0x599c0c0a, + 0x82040540, 0x00400000, 0x4803a803, 0x4a03a809, + 0x00000004, 0x4a03a804, 0x10000001, 0x59e00803, + 0x82040d00, 0xfffffbff, 0x82040d40, 0x00008000, + 0x4807c003, 0x800409c0, 0x04000007, 0x4202e000, + 0x00000001, 0x0200b800, 0x00020685, 0x0200f000, + 0x0002069a, 0x1c01f000, 0x0201f800, 0x00100615, + 0x1c01f000, 0x4df00000, 0x4203e000, 0x50000000, + 0x59981005, 0x800811c0, 0x0400001e, 0x58080005, + 0x82000d00, 0x43018780, 0x02020000, 0x0010552a, + 0x8c000508, 0x04000015, 0x580a5808, 0x592c0204, + 0x497a5800, 0x497a5801, 0x82000500, 0x000000ff, + 0x82000c80, 0x0000004b, 0x0402100b, 0x0c01f80f, + 0x5c03e000, 0x83700580, 0x00000003, 0x040007e6, + 0x0200f800, 0x0002069a, 0x0200b000, 0x00020685, + 0x1c01f000, 0x0401f850, 0x5c03e000, 0x0401f7f9, + 0x0401f8ee, 0x0401f7fd, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105171, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x001051f9, 0x00105161, 0x00105161, 0x00105171, + 0x00105171, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x492fc857, 0x42000000, 0x0010b65d, + 0x0201f800, 0x0010a86e, 0x42000000, 0x00000400, + 0x0401f019, 0x492fc857, 0x42000000, 0x0010b65c, + 0x0201f800, 0x0010a86e, 0x42000000, 0x00001000, + 0x0401f011, 0x492fc857, 0x42000000, 0x0010b65b, + 0x0201f800, 0x0010a86e, 0x42000000, 0x00002000, + 0x0401f009, 0x492fc857, 0x42000000, 0x0010b65e, + 0x0201f800, 0x0010a86e, 0x42000000, 0x00000800, + 0x0401f001, 0x4803c857, 0x4202e000, 0x00000001, + 0x592c0c04, 0x82040d00, 0xffff80ff, 0x80040540, + 0x48025c04, 0x0201f000, 0x00020381, 0x592c0204, + 0x492fc857, 0x80000110, 0x040007db, 0x80000040, + 0x04000035, 0x48033002, 0x492f3003, 0x492f3004, + 0x4a033008, 0x001051c5, 0x4202e000, 0x00000003, + 0x1c01f000, 0x592c0204, 0x492fc857, 0x80000110, + 0x040007cd, 0x80000040, 0x04000043, 0x48033002, + 0x492f3003, 0x492f3004, 0x4a033008, 0x001051e1, + 0x4202e000, 0x00000003, 0x1c01f000, 0x492fc857, + 0x0201f800, 0x0010a95a, 0x02020000, 0x0002060c, + 0x492fc857, 0x592e8a06, 0x83440c80, 0x000007f0, + 0x0402100b, 0x83440400, 0x0010aa00, 0x50000000, + 0x80026d40, 0x04000006, 0x4937c857, 0x59340200, + 0x8c00050e, 0x02020000, 0x0002060c, 0x42028000, + 0x00000028, 0x41780800, 0x417a6000, 0x0201f800, + 0x00104bee, 0x0201f800, 0x00108f7d, 0x0201f000, + 0x00020381, 0x592c0a0a, 0x8c040d02, 0x04020016, + 0x59a80021, 0x492fc857, 0x80000540, 0x0402000f, + 0x592c0207, 0x80000540, 0x04000005, 0x0201f800, + 0x00104156, 0x04020004, 0x1c01f000, 0x42000000, + 0x00000000, 0x592c0a06, 0x48065c06, 0x48025a06, + 0x0201f000, 0x00020381, 0x42000000, 0x00000028, + 0x0401f7f9, 0x42000800, 0x00000009, 0x0201f000, + 0x001063a9, 0x592c0208, 0x492fc857, 0x82000c80, + 0x0000199a, 0x04021794, 0x592c0408, 0x80000540, + 0x04020791, 0x59a80821, 0x800409c0, 0x04020009, + 0x592c0207, 0x80000540, 0x0400078b, 0x497a5a06, + 0x0201f800, 0x001041b5, 0x04020004, 0x1c01f000, + 0x42000000, 0x00000028, 0x48025a06, 0x0201f000, + 0x00020381, 0x59980804, 0x59980002, 0x48065800, + 0x492c0801, 0x492f3004, 0x80000040, 0x48033002, + 0x04000002, 0x1c01f000, 0x599a5803, 0x59980008, + 0x4202e000, 0x00000001, 0x0801f000, 0x592e8a06, + 0x592c0406, 0x4803c856, 0x82000500, 0x000000ff, + 0x4200b800, 0x00000001, 0x82000d80, 0x00000001, + 0x04000015, 0x417a8800, 0x4200b800, 0x000007f0, + 0x82000d80, 0x00000002, 0x0400000f, 0x80000540, + 0x02020000, 0x00020381, 0x592e8a06, 0x0201f800, + 0x00020267, 0x02020000, 0x00020381, 0x592e9008, + 0x592e9809, 0x0201f800, 0x00104567, 0x0201f000, + 0x00020381, 0x59a80805, 0x84040d00, 0x48075005, + 0x0201f800, 0x00020267, 0x02000800, 0x0010467a, + 0x81468800, 0x805cb840, 0x040207fa, 0x0201f000, + 0x00020381, 0x592c0a08, 0x4807c857, 0x82040580, + 0x0000000e, 0x04000045, 0x82040580, 0x00000046, + 0x04000046, 0x82040580, 0x00000045, 0x04000020, + 0x82040580, 0x00000029, 0x04000010, 0x82040580, + 0x0000002a, 0x04000009, 0x82040580, 0x0000000f, + 0x04000200, 0x82040580, 0x0000002e, 0x040001fd, + 0x4807c856, 0x0401f1f6, 0x59a80805, 0x84040d04, + 0x48075005, 0x0401f1f7, 0x592e8a06, 0x0201f800, + 0x00020267, 0x040201f3, 0x59340200, 0x84000518, + 0x48026a00, 0x592e6009, 0x4933c857, 0x83300580, + 0xffffffff, 0x0402002a, 0x0401f1ea, 0x592c1407, + 0x480bc857, 0x0201f800, 0x001091d9, 0x411e6000, + 0x04020003, 0x4803c856, 0x0401f1dd, 0x592e3809, + 0x591c1414, 0x84081516, 0x84081554, 0x480a3c14, + 0x4a026403, 0x0000003a, 0x592c040b, 0x80000540, + 0x04000007, 0x4a026403, 0x0000003b, 0x592c020c, + 0x4802641a, 0x592c040c, 0x4802621a, 0x4a026203, + 0x00000001, 0x42000800, 0x80000040, 0x0201f800, + 0x00020855, 0x0401f1cb, 0x59a80068, 0x84000510, + 0x48035068, 0x0401f1c7, 0x592c1207, 0x8c081500, + 0x040201c4, 0x592e8a06, 0x592e6009, 0x0201f800, + 0x001091e3, 0x04020003, 0x4803c856, 0x0401f1b8, + 0x59300c06, 0x82040580, 0x00000004, 0x04000003, + 0x4803c856, 0x0401f1b2, 0x59300a03, 0x82040580, + 0x00000007, 0x04000003, 0x4803c856, 0x0401f1ac, + 0x59300c03, 0x82040580, 0x00000001, 0x04000025, + 0x82040580, 0x00000003, 0x0400001a, 0x82040580, + 0x00000006, 0x04000024, 0x82040580, 0x00000008, + 0x04000019, 0x82040580, 0x0000000a, 0x0400000a, + 0x82040580, 0x0000000c, 0x04000004, 0x82040580, + 0x0000002e, 0x0402001c, 0x42000800, 0x00000009, + 0x0401f017, 0x59326809, 0x0201f800, 0x0010484b, + 0x04020015, 0x42000800, 0x00000005, 0x0401f010, + 0x417a7800, 0x0201f800, 0x00101de2, 0x4a026406, + 0x00000001, 0x42000800, 0x00000003, 0x0401f008, + 0x417a7800, 0x0201f800, 0x00101de2, 0x4a026406, + 0x00000001, 0x42000800, 0x0000000b, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x0201f800, + 0x00106470, 0x0401f17b, 0x40000800, 0x58040000, + 0x80000540, 0x040207fd, 0x492c0800, 0x1c01f000, + 0x492fc857, 0x59300c06, 0x82040580, 0x00000006, + 0x04020094, 0x0201f800, 0x00104836, 0x04020005, + 0x59340200, 0x8c00051a, 0x02000000, 0x00020667, + 0x59340200, 0x8c00050e, 0x0400008a, 0x59300203, + 0x42027800, 0x00000001, 0x82000580, 0x00000007, + 0x02020000, 0x00020667, 0x4a026203, 0x00000002, + 0x0201f000, 0x00020667, 0x42028000, 0x00000002, + 0x4a026206, 0x00000014, 0x4d2c0000, 0x0201f800, + 0x00109fc0, 0x5c025800, 0x59300c06, 0x4807c857, + 0x82040580, 0x00000007, 0x04020063, 0x492fc857, + 0x4a025a06, 0x00000001, 0x0201f000, 0x00020381, + 0x592c240a, 0x492fc857, 0x4813c857, 0x8c10251c, + 0x04020016, 0x8c10251a, 0x04000003, 0x8c10250a, + 0x04000069, 0x59340a00, 0x8c040d0e, 0x04000003, + 0x8c10251e, 0x04000064, 0x0201f800, 0x00020892, + 0x0400006b, 0x592c240a, 0x49366009, 0x49325809, + 0x4a026406, 0x00000006, 0x4a026203, 0x00000007, + 0x0201f000, 0x00020663, 0x592c0a0c, 0x5934000f, + 0x41784000, 0x80001540, 0x0400006d, 0x58080204, + 0x82000500, 0x000000ff, 0x82000580, 0x00000012, + 0x04020004, 0x5808020c, 0x80040580, 0x04000004, + 0x58080000, 0x40084000, 0x0401f7f3, 0x58080000, + 0x49781000, 0x802041c0, 0x04000006, 0x48004000, + 0x80000540, 0x04020007, 0x48226810, 0x0401f005, + 0x4802680f, 0x80000540, 0x04020002, 0x497a6810, + 0x4d2c0000, 0x400a5800, 0x4a025a06, 0x00000002, + 0x0201f800, 0x00020381, 0x5c025800, 0x0401f7bc, + 0x592c040a, 0x8c00051c, 0x04000016, 0x592c0206, + 0x82000580, 0x0000ffff, 0x04020012, 0x592e6009, + 0x83300580, 0xffffffff, 0x040007b1, 0x83300480, + 0x0010cfc0, 0x04001010, 0x59a8000b, 0x81300480, + 0x0402100d, 0x59300008, 0x800001c0, 0x04020005, + 0x59300203, 0x82000580, 0x00000007, 0x04000797, + 0x492fc857, 0x4a025a06, 0x00000029, 0x0201f000, + 0x00020381, 0x492fc857, 0x4a025a06, 0x00000008, + 0x0201f000, 0x00020381, 0x492fc857, 0x4a025a06, + 0x00000045, 0x0201f000, 0x00020381, 0x492fc857, + 0x4a025a06, 0x0000002a, 0x0201f000, 0x00020381, + 0x492fc857, 0x4a025a06, 0x00000028, 0x0201f000, + 0x00020381, 0x492fc857, 0x4a025a06, 0x00000006, + 0x0201f000, 0x00020381, 0x492fc857, 0x4a025a06, + 0x0000000e, 0x0201f000, 0x00020381, 0x59340010, + 0x492e6810, 0x492fc857, 0x80000d40, 0x04000003, + 0x492c0800, 0x1c01f000, 0x5934040b, 0x492e680f, + 0x492fc857, 0x4803c857, 0x80000540, 0x04020003, + 0x4a026a03, 0x00000001, 0x1c01f000, 0x59a8000e, + 0x81640480, 0x0402176e, 0x42026000, 0x0010cfc0, + 0x59300009, 0x81340580, 0x04020004, 0x59300202, + 0x80040580, 0x04000759, 0x83326400, 0x00000024, + 0x41580000, 0x81300480, 0x040017f6, 0x0401f760, + 0x492fc857, 0x592c0407, 0x82000c80, 0x0000199a, + 0x040215dd, 0x592c0204, 0x80000112, 0x040205ca, + 0x592e8a06, 0x0201f800, 0x00020267, 0x04020059, + 0x0201f800, 0x00104836, 0x04020059, 0x592e780a, + 0x493fc857, 0x8d3e7d3e, 0x04020007, 0x59a80021, + 0x80000540, 0x0402004f, 0x0201f800, 0x00104686, + 0x040005c9, 0x833c1d00, 0x0000001f, 0x040005c6, + 0x592c0207, 0x82000c80, 0x00001000, 0x040215c2, + 0x800000c2, 0x800008c4, 0x8005d400, 0x592e9008, + 0x592e9809, 0x5934080d, 0x800409c0, 0x0402002e, + 0x833c1d00, 0x0000001f, 0x81780040, 0x80000000, + 0x800c1902, 0x040217fe, 0x040205b3, 0x0c01f001, + 0x001053cd, 0x001053d0, 0x001053dd, 0x001053e0, + 0x001053e3, 0x0201f800, 0x00108dfb, 0x0401f01a, + 0x0201f800, 0x00104659, 0x04000027, 0x80e9d1c0, + 0x02020800, 0x00105ce7, 0x42028000, 0x00000005, + 0x417a9000, 0x417a9800, 0x0201f800, 0x00108e0b, + 0x0401f00d, 0x42027000, 0x0000004d, 0x0401f006, + 0x42027000, 0x0000004e, 0x0401f003, 0x42027000, + 0x00000052, 0x0201f800, 0x0010451d, 0x02020800, + 0x00108e3b, 0x04000010, 0x8d3e7d3e, 0x04020017, + 0x1c01f000, 0x58040002, 0x80000540, 0x04020007, + 0x4d3c0000, 0x40067800, 0x0201f800, 0x00104639, + 0x5c027800, 0x040207cb, 0x4a025a06, 0x00000030, + 0x0401f00d, 0x4a025a06, 0x0000002c, 0x0401f00a, + 0x4a025a06, 0x00000028, 0x0401f007, 0x4a025a06, + 0x00000029, 0x0401f004, 0x497a5c09, 0x4a025a06, + 0x00000000, 0x4a025a04, 0x00000103, 0x0201f000, + 0x00020381, 0x492fc857, 0x592c0204, 0x80000110, + 0x80000040, 0x04000002, 0x0401f55b, 0x592c0207, + 0x82000500, 0x000003ff, 0x48025a07, 0x8c000506, + 0x04000004, 0x82000500, 0x00000070, 0x04020004, + 0x59a80821, 0x800409c0, 0x04020018, 0x4a025a06, + 0x0000dead, 0x592c0408, 0x82000500, 0x0000f0ff, + 0x48025c08, 0x0201f800, 0x001041e4, 0x04020002, + 0x1c01f000, 0x49425a06, 0x8058b1c0, 0x04000009, + 0x0201f800, 0x00109328, 0x0401f80f, 0x44042800, + 0x82580580, 0x00000002, 0x04020002, 0x48082801, + 0x0201f000, 0x00020381, 0x42028000, 0x00000031, + 0x42000800, 0x00000001, 0x4200b000, 0x00000001, + 0x0401f7ed, 0x592c0408, 0x80000118, 0x832c2c00, + 0x00000009, 0x80142c00, 0x1c01f000, 0x492fc857, + 0x4a025a08, 0x00000006, 0x0201f000, 0x00020381, + 0x492fc857, 0x4a025a08, 0x00000001, 0x0201f000, + 0x00020381, 0x492fc857, 0x592c040a, 0x82000500, + 0x00000003, 0x04000020, 0x0201f800, 0x00020892, + 0x04000021, 0x592c0204, 0x492e6008, 0x82000500, + 0x000000ff, 0x82000580, 0x00000045, 0x0400000e, + 0x592c000b, 0x0201f800, 0x001059b9, 0x02000800, + 0x00020267, 0x04020018, 0x42027000, 0x00000041, + 0x49366009, 0x4a026406, 0x00000001, 0x0201f000, + 0x000208d8, 0x59300015, 0x8400055e, 0x48026015, + 0x42026800, 0x0010b320, 0x42027000, 0x00000040, + 0x0401f7f4, 0x4a025a06, 0x00000101, 0x0201f000, + 0x00020381, 0x4a025a06, 0x0000002c, 0x0201f000, + 0x00020381, 0x4a025a06, 0x00000028, 0x0201f800, + 0x00020381, 0x0201f000, 0x000208b4, 0x492fc857, + 0x0201f800, 0x0010601a, 0x0400000b, 0x592c0204, + 0x80000110, 0x80000040, 0x040204e7, 0x592c0c06, + 0x800409c0, 0x04000009, 0x42000000, 0x00000102, + 0x0401f003, 0x42000000, 0x00000104, 0x48025a06, + 0x0201f000, 0x00020381, 0x592c0c07, 0x800409c0, + 0x04000024, 0x82040480, 0x00000005, 0x04021021, + 0x4c040000, 0x80040800, 0x0201f800, 0x0010603f, + 0x5c001000, 0x04020018, 0x832c0400, 0x00000008, + 0x4000a000, 0x0201f800, 0x00106068, 0x04020012, + 0x592c1207, 0x82cc0580, 0x0010b30a, 0x04020009, + 0x58c80c0b, 0x84040d00, 0x84040d02, 0x8c081500, + 0x04000002, 0x84040d5e, 0x4805940b, 0x0401f001, + 0x42000000, 0x00000000, 0x48025a06, 0x0201f000, + 0x00020381, 0x42000000, 0x00000103, 0x0401f7fb, + 0x42000000, 0x00000102, 0x0401f7f8, 0x492fc857, + 0x592e7c06, 0x833c0500, 0xfffffffe, 0x04020043, + 0x592c4007, 0x42026000, 0x0010cfc0, 0x41581800, + 0x400c0000, 0x81300480, 0x04021023, 0x59300203, + 0x82000580, 0x00000000, 0x04000007, 0x59300008, + 0x80000d40, 0x04000004, 0x58040005, 0x80200580, + 0x04000004, 0x83326400, 0x00000024, 0x0401f7f1, + 0x58040204, 0x82000500, 0x000000ff, 0x82000d80, + 0x00000053, 0x04000007, 0x82000d80, 0x00000048, + 0x04000004, 0x82000580, 0x00000018, 0x04020023, + 0x4d2c0000, 0x0201f800, 0x00108997, 0x5c025800, + 0x0400001e, 0x4a025a06, 0x00000000, 0x0201f000, + 0x00020381, 0x592e8a06, 0x83440480, 0x000007f0, + 0x04021016, 0x83440400, 0x0010aa00, 0x50000000, + 0x80026d40, 0x04000011, 0x4d2c0000, 0x0201f800, + 0x00104619, 0x0400000c, 0x42028000, 0x00000005, + 0x592c0a08, 0x0201f800, 0x00104bee, 0x0201f800, + 0x00108f83, 0x0201f800, 0x00020381, 0x5c025800, + 0x0401f7e5, 0x5c025800, 0x4a025a06, 0x00000031, + 0x0201f000, 0x00020381, 0x492fc857, 0x4d2c0000, + 0x0201f800, 0x0010082a, 0x04000016, 0x492fc857, + 0x412f4000, 0x0201f800, 0x0010082a, 0x0400000e, + 0x492fc857, 0x412dd800, 0x0201f800, 0x00103941, + 0x0201f800, 0x0010394b, 0x49a1d80b, 0x5c025800, + 0x492dd80a, 0x0201f800, 0x00101fbb, 0x0201f000, + 0x00101fda, 0x41a25800, 0x0201f800, 0x0010083a, + 0x5c025800, 0x4a025a06, 0x00004005, 0x4a025c06, + 0x00000002, 0x0201f000, 0x00020381, 0x4807c857, + 0x485fc857, 0x4200b800, 0x00000001, 0x5c000800, + 0x4c5c0000, 0x0401f005, 0x4807c857, 0x485fc857, + 0x5c000800, 0x4d780000, 0x4803c857, 0x492fc857, + 0x8c00050e, 0x02020800, 0x0010060d, 0x4203e000, + 0x50000000, 0x4200b800, 0x00008003, 0x0201f000, + 0x0010061a, 0x592c0204, 0x80000110, 0x80000040, + 0x0402042d, 0x0201f800, 0x00104886, 0x04020002, + 0x1c01f000, 0x49425a06, 0x4806580d, 0x480a580e, + 0x4943c857, 0x4807c857, 0x480bc857, 0x0201f000, + 0x00020381, 0x592c0204, 0x80000110, 0x80000040, + 0x0402041d, 0x0201f800, 0x001049ec, 0x04020002, + 0x1c01f000, 0x49425a06, 0x48065811, 0x480a5812, + 0x0201f000, 0x00020381, 0x592c0204, 0x80000110, + 0x04000411, 0x80000040, 0x0402000c, 0x4202e000, + 0x00000001, 0x592c020a, 0x8c000504, 0x02000000, + 0x00020603, 0x592c0207, 0x82000c80, 0x00001001, + 0x04021415, 0x0401f009, 0x4202e000, 0x00000003, + 0x48033002, 0x492f3003, 0x492f3004, 0x4a033008, + 0x00020603, 0x1c01f000, 0x4202e000, 0x00000002, + 0x42000000, 0x0010bcd9, 0x50007000, 0x492c700b, + 0x4978700e, 0x4978700c, 0x592c0011, 0x592c0812, + 0x48007007, 0x48047008, 0x592c1013, 0x82080500, + 0xffff0000, 0x04000003, 0x0201f800, 0x00100615, + 0x4978700d, 0x82080480, 0x00000180, 0x4803c857, + 0x04001007, 0x4800700f, 0x4a007005, 0x00000180, + 0x4a007004, 0x00000060, 0x0401f005, 0x4978700f, + 0x48087005, 0x80081104, 0x48087004, 0x5838000a, + 0x48007003, 0x40381000, 0x0201f000, 0x001008a1, + 0x0201f800, 0x00100819, 0x04000003, 0x59980007, + 0x0801f000, 0x1c01f000, 0x40307000, 0x5838000b, + 0x80025d40, 0x0400001b, 0x58380002, 0x82000580, + 0x00000100, 0x0400001d, 0x4c380000, 0x592c0204, + 0x82000500, 0x000000ff, 0x82000580, 0x00000012, + 0x0400000b, 0x592c0208, 0x8400054e, 0x48025a08, + 0x4a025a06, 0x00000002, 0x4a025a04, 0x00000103, + 0x0201f800, 0x00020381, 0x0401f005, 0x4a025a06, + 0x00000010, 0x0201f800, 0x00020381, 0x5c007000, + 0x4202e000, 0x00000001, 0x4a007002, 0x00000100, + 0x49787010, 0x1c01f000, 0x58380004, 0x82000480, + 0x00000003, 0x04000087, 0x58380010, 0x8c000500, + 0x04020019, 0x4200b000, 0x00000003, 0x832cac00, + 0x00000011, 0x5838000a, 0x5838100d, 0x8008a400, + 0x4c380000, 0x0201f800, 0x0010a93e, 0x5c007000, + 0x5838000d, 0x82000400, 0x00000003, 0x4800700d, + 0x4a007010, 0x00000001, 0x58380004, 0x82000480, + 0x00000003, 0x48007004, 0x82000580, 0x00000003, + 0x0400006c, 0x5838000e, 0x80001d40, 0x04020020, + 0x4c380000, 0x0201f800, 0x00100819, 0x5c007000, + 0x04000010, 0x4a025a04, 0x0000010a, 0x42001800, + 0x00000005, 0x480c700e, 0x5838000c, 0x80000540, + 0x04020002, 0x5838000b, 0x40000800, 0x492c0801, + 0x492c700c, 0x42000800, 0x0000000f, 0x0401f011, + 0x4202e000, 0x00000008, 0x4a033007, 0x001055f9, + 0x1c01f000, 0x4202e000, 0x00000002, 0x42000000, + 0x0010bcd9, 0x50007000, 0x0401f7e7, 0x583a580c, + 0x400c0000, 0x42000800, 0x00000014, 0x80040c80, + 0x58381004, 0x5838000f, 0x41783000, 0x80000540, + 0x04020005, 0x84183540, 0x82081480, 0x00000003, + 0x0400003c, 0x40080000, 0x80040480, 0x04001002, + 0x40080800, 0x4004b000, 0x412c0000, 0x800c0400, + 0x4000a800, 0x5838000a, 0x5838100d, 0x8008a400, + 0x4c080000, 0x4c040000, 0x4c0c0000, 0x4c380000, + 0x0201f800, 0x0010a93e, 0x5c007000, 0x5c001800, + 0x5c000800, 0x40040000, 0x58381004, 0x80080480, + 0x48007004, 0x82000580, 0x00000003, 0x04000002, + 0x84183500, 0x5c000000, 0x80041400, 0x82080480, + 0x00000060, 0x04020003, 0x84183542, 0x41781000, + 0x400c0000, 0x80041c00, 0x820c0480, 0x00000014, + 0x04020003, 0x84183544, 0x40001800, 0x40080800, + 0x4804700d, 0x480c700e, 0x40180000, 0x0c01f001, + 0x00105644, 0x00105648, 0x00105646, 0x00105644, + 0x001055e0, 0x00105648, 0x00105646, 0x00105644, + 0x0201f800, 0x00100615, 0x5838100f, 0x0401f739, + 0x5838080d, 0x82040400, 0x00000002, 0x5838100a, + 0x80080400, 0x50001000, 0x800811c0, 0x0402000f, + 0x4202e000, 0x00000001, 0x583a580b, 0x4978700b, + 0x49787010, 0x592c0204, 0x82000500, 0x000000ff, + 0x82000580, 0x00000012, 0x02000000, 0x0002063b, + 0x0201f000, 0x00020603, 0x5838000a, 0x80040c00, + 0x82381c00, 0x00000007, 0x54041800, 0x80040800, + 0x800c1800, 0x54041800, 0x0401f71a, 0x0201f800, + 0x00100819, 0x02000800, 0x00100615, 0x4a02580a, + 0x0010bc78, 0x42000800, 0x0010bcd9, 0x452c0800, + 0x497a580b, 0x497a580c, 0x497a580d, 0x497a580e, + 0x497a580f, 0x4a025809, 0x0010559a, 0x497a5810, + 0x4a025802, 0x00000100, 0x4a025801, 0x00000001, + 0x1c01f000, 0x59c80007, 0x8c000502, 0x04000071, + 0x835c2c80, 0x00000005, 0x02001000, 0x00105c5c, + 0x59c82817, 0x4817506e, 0x497b9005, 0x82140500, + 0x00e00000, 0x0402004f, 0x82140500, 0x000003ff, + 0x82001c00, 0x00000006, 0x41cc2000, 0x42003000, + 0x00006080, 0x820c0480, 0x00000040, 0x04001006, + 0x42001000, 0x00000040, 0x820c1c80, 0x00000040, + 0x0401f003, 0x400c1000, 0x41781800, 0x54182000, + 0x80102000, 0x80183000, 0x80081040, 0x040207fc, + 0x800c19c0, 0x04000005, 0x59c80005, 0x80000000, + 0x48039005, 0x0401f7ea, 0x82140500, 0x01f60000, + 0x04020029, 0x82140500, 0x0000f000, 0x0400000b, + 0x82000c80, 0x00002000, 0x0402100f, 0x4a039005, + 0x00000140, 0x82140500, 0x0e000000, 0x80000132, + 0x0c01f83e, 0x1c01f000, 0x59cc0400, 0x82000500, + 0x0000ff00, 0x82000580, 0x00008100, 0x040007f4, + 0x0401f01c, 0x4817c857, 0x82140500, 0x000003ff, + 0x04020007, 0x59cc0400, 0x82000500, 0x0000ff00, + 0x82000580, 0x00008100, 0x04020012, 0x42000000, + 0x0010b6bc, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x00105b32, 0x4803c856, 0x4a039005, 0x00000140, + 0x0401f020, 0x4817c857, 0x82140500, 0x00f60000, + 0x04020004, 0x0201f800, 0x00105b6e, 0x040207d2, + 0x0201f800, 0x00104e0d, 0x04000010, 0x59c400a4, + 0x4803c857, 0x82000500, 0x0000000f, 0x82000580, + 0x0000000a, 0x04020009, 0x497b5016, 0x59c400a3, + 0x82000540, 0x00080000, 0x480388a3, 0x82000500, + 0xfff7ffff, 0x480388a3, 0x4817c856, 0x0201f800, + 0x0010a79f, 0x4a039005, 0x00000140, 0x0401f842, + 0x4803c856, 0x1c01f000, 0x00105702, 0x00105a13, + 0x001056fa, 0x001056fa, 0x001056fa, 0x001056fa, + 0x001056fa, 0x001056fa, 0x4803c857, 0x42000000, + 0x0010b659, 0x0201f800, 0x0010a86e, 0x4a039005, + 0x00000140, 0x1c01f000, 0x59cc0400, 0x82000d00, + 0x0000ff00, 0x82041500, 0x0000f000, 0x840409c0, + 0x82140500, 0x000003ff, 0x800018c4, 0x8c142d14, + 0x04000005, 0x59cc0002, 0x82000500, 0x00000003, + 0x800c1c80, 0x480f5016, 0x82080580, 0x00002000, + 0x04020013, 0x836c0580, 0x00000001, 0x0402000e, + 0x59cc0006, 0x82000500, 0xff000000, 0x82000580, + 0x11000000, 0x02020800, 0x001006ba, 0x04020011, + 0x0201f800, 0x00103951, 0x0201f800, 0x00105c81, + 0x0401f00c, 0x0401f81f, 0x0401f00a, 0x82080580, + 0x00003000, 0x04020003, 0x0401fa40, 0x0401f005, + 0x82080580, 0x00008000, 0x04020002, 0x0401fb36, + 0x1c01f000, 0x4817c857, 0x42000000, 0x0010b658, + 0x0201f800, 0x0010a86e, 0x836c0580, 0x00000003, + 0x0402000b, 0x4c080000, 0x4c0c0000, 0x42001000, + 0x00008048, 0x40141800, 0x80142120, 0x0201f800, + 0x00103857, 0x5c001800, 0x5c001000, 0x1c01f000, + 0x59cc0002, 0x82000500, 0xff000000, 0x82001580, + 0x01000000, 0x04000006, 0x82001580, 0x23000000, + 0x02020800, 0x001006ba, 0x040201c9, 0x82040580, + 0x00000023, 0x04020055, 0x59cc0004, 0x4803c857, + 0x59cc0006, 0x82000500, 0xff000000, 0x59cc0801, + 0x82040d00, 0x00ffffff, 0x80040540, 0x4803c857, + 0x0401fbb2, 0x02000800, 0x001006ba, 0x040001b8, + 0x59300c06, 0x82040580, 0x00000010, 0x04000012, + 0x82040580, 0x00000011, 0x0400000f, 0x82040580, + 0x00000001, 0x0400000c, 0x82040580, 0x00000004, + 0x04000009, 0x82040580, 0x00000008, 0x04000006, + 0x82040580, 0x0000000a, 0x02020800, 0x001006ba, + 0x040201a3, 0x59300004, 0x82000500, 0x80010000, + 0x04000006, 0x0201f800, 0x00106cb4, 0x02020800, + 0x001006ba, 0x0402019a, 0x59cc0a04, 0x48066202, + 0x59a80016, 0x800001c0, 0x02000800, 0x001006ba, + 0x04000193, 0x59cc0006, 0x82000500, 0xffff0000, + 0x82000d80, 0x02000000, 0x04020005, 0x42027000, + 0x00000015, 0x0201f000, 0x000208d8, 0x82000d80, + 0x02140000, 0x040007fa, 0x82000d80, 0x02100000, + 0x040007f7, 0x82000d80, 0x02100000, 0x040007f4, + 0x82000d80, 0x01000000, 0x02020800, 0x001006ba, + 0x0402017b, 0x59cc0006, 0x82000500, 0x0000ffff, + 0x02020800, 0x001006ba, 0x04020175, 0x42027000, + 0x00000016, 0x0401f7e8, 0x82040580, 0x00000022, + 0x02020800, 0x001006ba, 0x0402016d, 0x59cc0004, + 0x4803c857, 0x59cc0006, 0x4803c857, 0x59cc0001, + 0x4803c857, 0x59a80016, 0x800001c0, 0x02000800, + 0x001006ba, 0x04000162, 0x59a80806, 0x8c040d14, + 0x04000011, 0x0401f97d, 0x0402000f, 0x0401f993, + 0x0400000d, 0x42027000, 0x0000004c, 0x59cc0001, + 0x82000500, 0x00ffffff, 0x0201f800, 0x00105c25, + 0x0400013e, 0x42028800, 0x0000ffff, 0x417a6800, + 0x0401f13a, 0x59cc0006, 0x82000500, 0xffff0000, + 0x82000d80, 0x03000000, 0x04020023, 0x59a80026, + 0x8c000508, 0x04000017, 0x8400054c, 0x48035026, + 0x59cc0800, 0x82040d00, 0x00ffffff, 0x48075010, + 0x497b8830, 0x84040d70, 0x48078832, 0x59c40802, + 0x84040d4c, 0x48078802, 0x59cc0007, 0x82000500, + 0x0000ffff, 0x48038893, 0x4803501e, 0x42000800, + 0x00000003, 0x59a81010, 0x0201f800, 0x001069af, + 0x59cc0006, 0x82000500, 0x0000ffff, 0x02020800, + 0x001006ba, 0x0402012a, 0x42027000, 0x00000017, + 0x0401f0e5, 0x82000d80, 0x04000000, 0x04020013, + 0x59cc0006, 0x82000500, 0x0000ffff, 0x02020800, + 0x001006ba, 0x0402011e, 0x0201f800, 0x00104e0d, + 0x04000004, 0x42027000, 0x0000001d, 0x0401f0d6, + 0x59a80026, 0x84000548, 0x48035026, 0x42027000, + 0x00000030, 0x0401f0d0, 0x82000d80, 0x05000000, + 0x0402000a, 0x59cc0006, 0x82000500, 0x0000ffff, + 0x02020800, 0x001006ba, 0x04020109, 0x42027000, + 0x00000018, 0x0401f0c4, 0x82000d80, 0x20100000, + 0x04020004, 0x42027000, 0x00000019, 0x0401f0be, + 0x82000d80, 0x21100000, 0x04020004, 0x42027000, + 0x0000001a, 0x0401f0b8, 0x82000d80, 0x52000000, + 0x0402000a, 0x59cc0006, 0x82000500, 0x0000ffff, + 0x02020800, 0x001006ba, 0x040200f1, 0x42027000, + 0x0000001b, 0x0401f0ac, 0x82000d80, 0x50000000, + 0x0402000a, 0x59cc0006, 0x82000500, 0x0000ffff, + 0x02020800, 0x001006ba, 0x040200e5, 0x42027000, + 0x0000001c, 0x0401f0a0, 0x82000d80, 0x13000000, + 0x04020004, 0x42027000, 0x00000034, 0x0401f09a, + 0x82000d80, 0x12000000, 0x0402000a, 0x59cc0006, + 0x82000500, 0x0000ffff, 0x02020800, 0x001006ba, + 0x040200d3, 0x42027000, 0x00000024, 0x0401f08e, + 0x82000d00, 0xff000000, 0x82040d80, 0x24000000, + 0x04020004, 0x42027000, 0x0000002d, 0x0401f086, + 0x82000d00, 0xff000000, 0x82040d80, 0x53000000, + 0x04020004, 0x42027000, 0x0000002a, 0x0401f07e, + 0x82000d80, 0x0f000000, 0x04020004, 0x42027000, + 0x00000020, 0x0401f078, 0x82000d80, 0x61040000, + 0x04020036, 0x83cc1400, 0x00000006, 0x80080800, + 0x50080000, 0x82000500, 0x0000ffff, 0x82000480, + 0x00000004, 0x4c580000, 0x8000b104, 0x8058b1c0, + 0x04000026, 0x4c100000, 0x50041800, 0x820c1500, + 0x03000000, 0x80081130, 0x42000000, 0x0010b615, + 0x82082580, 0x00000000, 0x04020004, 0x42000000, + 0x0010b612, 0x0401f00c, 0x82082580, 0x00000001, + 0x04020004, 0x42000000, 0x0010b613, 0x0401f006, + 0x82082580, 0x00000002, 0x04020003, 0x42000000, + 0x0010b614, 0x0201f800, 0x0010a86e, 0x42001000, + 0x00008015, 0x820c2500, 0x0000ffff, 0x800c1920, + 0x0201f800, 0x00103857, 0x5c002000, 0x80040800, + 0x8058b040, 0x040207da, 0x5c00b000, 0x42027000, + 0x00000023, 0x0401f040, 0x82000d80, 0x60000000, + 0x04020004, 0x42027000, 0x0000003f, 0x0401f03a, + 0x82000d80, 0x54000000, 0x04020008, 0x0401fb36, + 0x02020800, 0x001006ba, 0x04020075, 0x42027000, + 0x00000046, 0x0401f030, 0x82000d80, 0x55000000, + 0x04020009, 0x0401fb54, 0x04020004, 0x42027000, + 0x00000041, 0x0401f028, 0x42027000, 0x00000042, + 0x0401f025, 0x82000d80, 0x78000000, 0x04020004, + 0x42027000, 0x00000045, 0x0401f01f, 0x82000d80, + 0x10000000, 0x04020004, 0x42027000, 0x0000004e, + 0x0401f019, 0x82000d80, 0x63000000, 0x04020004, + 0x42027000, 0x0000004a, 0x0401f013, 0x82000d00, + 0xff000000, 0x82040d80, 0x56000000, 0x04020004, + 0x42027000, 0x0000004f, 0x0401f00b, 0x82000d00, + 0xff000000, 0x82040d80, 0x57000000, 0x04020004, + 0x42027000, 0x00000050, 0x0401f003, 0x42027000, + 0x0000001d, 0x59cc3800, 0x821c3d00, 0x00ffffff, + 0x821c0580, 0x00fffffe, 0x59cc0001, 0x04020005, + 0x40003000, 0x42028800, 0x000007fe, 0x0401f005, + 0x0401f8da, 0x02020800, 0x001006ba, 0x04020034, + 0x0201f800, 0x00104401, 0x02020800, 0x001006ba, + 0x0402002f, 0x83380580, 0x00000046, 0x04020006, + 0x59a80010, 0x80180580, 0x02000800, 0x001006ba, + 0x04000027, 0x59340200, 0x8c000514, 0x0400000f, + 0x83380580, 0x00000030, 0x0400000c, 0x83380580, + 0x0000003f, 0x04000009, 0x83380580, 0x00000034, + 0x04000006, 0x83380580, 0x00000024, 0x04000003, + 0x42027000, 0x0000004c, 0x0201f800, 0x00020892, + 0x04000018, 0x49366009, 0x4a026406, 0x00000004, + 0x59cc0c04, 0x48066202, 0x83380580, 0x0000004c, + 0x04020009, 0x4a026406, 0x00000011, 0x813669c0, + 0x04020005, 0x59cc0001, 0x82000500, 0x00ffffff, + 0x4802601e, 0x0201f000, 0x000208d8, 0x59880053, + 0x4803c857, 0x80000000, 0x48031053, 0x1c01f000, + 0x42001000, 0x00008049, 0x59cc1806, 0x800c1930, + 0x0201f800, 0x00103857, 0x0201f800, 0x001076c9, + 0x02000800, 0x001006ba, 0x040007f1, 0x49366009, + 0x4a026406, 0x00000004, 0x59cc0c04, 0x48066202, + 0x4a026403, 0x00000009, 0x4a02641a, 0x00000009, + 0x4a02621a, 0x00002900, 0x4a026203, 0x00000001, + 0x0201f000, 0x00106470, 0x59a80026, 0x4803c857, + 0x8c000508, 0x04000010, 0x59cc0006, 0x82000500, + 0xff000000, 0x82000d80, 0x03000000, 0x0400000c, + 0x82000d80, 0x20000000, 0x04000009, 0x82000d80, + 0x05000000, 0x04000006, 0x82000d80, 0x21000000, + 0x04000003, 0x80000580, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fd, 0x59cc2006, 0x82102500, + 0xff000000, 0x9c1021c0, 0x0401f807, 0x820c1c00, + 0x0010b2df, 0x500c1800, 0x800c0500, 0x4803c857, + 0x1c01f000, 0x40100800, 0x41781800, 0x82040480, + 0x00000020, 0x04001004, 0x800c1800, 0x40000800, + 0x0401f7fb, 0x82040500, 0x0000000f, 0x82000400, + 0x0010a95f, 0x50000000, 0x8c040d08, 0x04000002, + 0x900001c0, 0x1c01f000, 0x4803c856, 0x0401fadd, + 0x0402000a, 0x0201f800, 0x00101eb0, 0x04020007, + 0x59cc0002, 0x82000500, 0xff000000, 0x82000d80, + 0x08000000, 0x04000802, 0x1c01f000, 0x4803c856, + 0x59cc0400, 0x82000d00, 0x0000ff00, 0x840409c0, + 0x82040580, 0x00000033, 0x0402001f, 0x0401f98f, + 0x04000038, 0x59cc0a04, 0x48066202, 0x59cc0006, + 0x4803c857, 0x82000500, 0xffff0000, 0x82000d80, + 0x02000000, 0x04020009, 0x59cc0006, 0x82000500, + 0x0000ffff, 0x0402002b, 0x42027000, 0x00000015, + 0x0201f000, 0x000208d8, 0x82000d80, 0x01000000, + 0x04020024, 0x59cc0006, 0x82000500, 0x0000ffff, + 0x04020020, 0x42027000, 0x00000016, 0x0201f000, + 0x000208d8, 0x82040580, 0x00000032, 0x04020019, + 0x59cc0006, 0x82000500, 0xffff0000, 0x82000d80, + 0x14000000, 0x04020013, 0x42027000, 0x00000038, + 0x59cc0001, 0x0401f810, 0x0402000e, 0x0201f800, + 0x001043fc, 0x0402000b, 0x0201f800, 0x00020892, + 0x04000008, 0x49366009, 0x4a026406, 0x00000004, + 0x59cc0c04, 0x48066202, 0x0201f000, 0x000208d8, + 0x1c01f000, 0x4803c857, 0x4c580000, 0x4c100000, + 0x4c380000, 0x4c340000, 0x82003500, 0x00ffffff, + 0x82181500, 0x00ff0000, 0x82081580, 0x00ff0000, + 0x04020016, 0x82181480, 0x00fffffc, 0x04001013, + 0x82181580, 0x00fffffd, 0x04020004, 0x42028800, + 0x000007fd, 0x0401f040, 0x82181580, 0x00fffffe, + 0x04020004, 0x42028800, 0x000007fe, 0x0401f03a, + 0x82181580, 0x00fffffc, 0x04020004, 0x42028800, + 0x000007fc, 0x0401f034, 0x41781000, 0x42002000, + 0x00000000, 0x4200b000, 0x000007f0, 0x41ac7000, + 0x50380000, 0x80006d40, 0x04020005, 0x800811c0, + 0x0402001e, 0x8410155e, 0x0401f01c, 0x58340212, + 0x82000500, 0x0000ff00, 0x04000011, 0x59a84010, + 0x82204500, 0x00ffff00, 0x82180500, 0x00ffff00, + 0x04000002, 0x80200580, 0x58340002, 0x0402000f, + 0x82000500, 0x000000ff, 0x82184500, 0x000000ff, + 0x80204580, 0x04020009, 0x0401f006, 0x58340002, + 0x82000500, 0x00ffffff, 0x80184580, 0x04020003, + 0x40128800, 0x0401f00c, 0x80102000, 0x80387000, + 0x8058b040, 0x040207db, 0x800811c0, 0x04020005, + 0x481bc857, 0x82000540, 0x00000001, 0x0401f003, + 0x840a8d1e, 0x80000580, 0x5c006800, 0x5c007000, + 0x5c002000, 0x5c00b000, 0x1c01f000, 0x59a80026, + 0x8c00050e, 0x04000003, 0x8c000502, 0x04000006, + 0x59cc0c00, 0x80040910, 0x82040500, 0x0000000f, + 0x0c01f002, 0x1c01f000, 0x00105a2e, 0x00105a2e, + 0x00105a2e, 0x00105b1d, 0x00105a2e, 0x00105a30, + 0x00105a48, 0x00105a4b, 0x00105a2e, 0x00105a2e, + 0x00105a2e, 0x00105a2e, 0x00105a2e, 0x00105a2e, + 0x00105a2e, 0x00105a2e, 0x4803c856, 0x1c01f000, + 0x0401f8de, 0x04000014, 0x82140500, 0x000003ff, + 0x800000c4, 0x82000480, 0x00000008, 0x0400100e, + 0x59cc0001, 0x59326809, 0x59340802, 0x80040580, + 0x82000500, 0x00ffffff, 0x04020007, 0x59cc0a04, + 0x48066202, 0x42027000, 0x00000046, 0x0201f000, + 0x000208d8, 0x59cc0004, 0x4803c857, 0x1c01f000, + 0x59cc0004, 0x4803c857, 0x1c01f000, 0x0401f8c3, + 0x04000016, 0x82140500, 0x000003ff, 0x800000c4, + 0x82000480, 0x0000000c, 0x04001010, 0x59cc0001, + 0x82000500, 0x00ffffff, 0x59326809, 0x59340802, + 0x82040d00, 0x00ffffff, 0x80040580, 0x04020007, + 0x59cc0a04, 0x48066202, 0x42027000, 0x00000045, + 0x0201f000, 0x000208d8, 0x59cc0004, 0x4803c857, + 0x1c01f000, 0x59cc0004, 0x4803c857, 0x59cc0000, + 0x82000500, 0xff000000, 0x59cc1001, 0x82081500, + 0x00ffffff, 0x80080540, 0x4803c857, 0x4817c857, + 0x0401f9d8, 0x02020800, 0x001006ba, 0x04020016, + 0x0201f800, 0x00101eb0, 0x02020800, 0x001006ba, + 0x04020011, 0x59cc0002, 0x82000500, 0xff000000, + 0x82000580, 0x00000000, 0x02020800, 0x001006ba, + 0x04020009, 0x82040500, 0x0000000f, 0x82000c80, + 0x00000006, 0x02021800, 0x001006ba, 0x04021002, + 0x0c01f003, 0x4803c856, 0x1c01f000, 0x00105a91, + 0x00105a93, 0x00105a91, 0x00105a91, 0x00105aec, + 0x00105afb, 0x4803c856, 0x1c01f000, 0x59a80016, + 0x800001c0, 0x02020800, 0x001006ba, 0x040207fa, + 0x59cc0802, 0x4807c856, 0x8c040d2e, 0x0402001d, + 0x0201f800, 0x001076c9, 0x02000800, 0x00100615, + 0x59cc0001, 0x0401ff18, 0x0402000d, 0x0201f800, + 0x00020267, 0x0402000a, 0x4a026406, 0x00000005, + 0x49366009, 0x59cc0804, 0x4806601c, 0x42027000, + 0x00000088, 0x0201f000, 0x000208d8, 0x4803c857, + 0x42028800, 0x0000ffff, 0x417a6800, 0x59cc0001, + 0x82000500, 0x00ffffff, 0x4802601e, 0x0401f7ef, + 0x59cc0001, 0x4803c857, 0x0401feff, 0x02020800, + 0x001006ba, 0x040207d4, 0x0201f800, 0x001043fc, + 0x02020800, 0x001006ba, 0x040207cf, 0x59cc0005, + 0x8c000500, 0x04020006, 0x59340200, 0x8c00050e, + 0x02020800, 0x001006ba, 0x040207c7, 0x0201f800, + 0x00104842, 0x04020013, 0x0401f840, 0x02000800, + 0x001006ba, 0x040007c0, 0x0201f800, 0x00020892, + 0x02000800, 0x001006ba, 0x040007bb, 0x49366009, + 0x4a026406, 0x00000002, 0x59cc0804, 0x4806601c, + 0x42027000, 0x00000088, 0x0201f000, 0x000208d8, + 0x0201f800, 0x00020892, 0x040007af, 0x49366009, + 0x4a026406, 0x00000004, 0x59cc0c04, 0x48066202, + 0x42027000, 0x00000001, 0x0201f000, 0x000208d8, + 0x59cc0802, 0x8c040d2e, 0x0400000b, 0x0401f81f, + 0x04000009, 0x0401f961, 0x04020007, 0x59cc0a04, + 0x48066202, 0x42027000, 0x00000089, 0x0201f000, + 0x000208d8, 0x4933c857, 0x1c01f000, 0x59cc0004, + 0x4803c857, 0x59cc0802, 0x8c040d2e, 0x0400000b, + 0x0401f80e, 0x04000009, 0x0401f950, 0x04020007, + 0x59cc0a04, 0x48066202, 0x42027000, 0x0000008a, + 0x0201f000, 0x000208d8, 0x4933c857, 0x1c01f000, + 0x59cc0a04, 0x0401f002, 0x59cc0c04, 0x59a8000e, + 0x59a81067, 0x80080400, 0x80040480, 0x04021008, + 0x40040000, 0x800000c4, 0x800408ca, 0x80040c00, + 0x82066400, 0x0010cfc0, 0x1c01f000, 0x80000580, + 0x0401f7fe, 0x59cc0802, 0x8c040d2e, 0x04020010, + 0x0401ffec, 0x0400000e, 0x59cc0001, 0x82000500, + 0x00ffffff, 0x59326809, 0x59340802, 0x82040d00, + 0x00ffffff, 0x80040580, 0x04020005, 0x42027000, + 0x00000051, 0x0201f000, 0x000208d8, 0x59cc0004, + 0x4803c857, 0x1c01f000, 0x4803c856, 0x42003000, + 0x00000105, 0x0401f001, 0x4803c856, 0x4c3c0000, + 0x41cc7800, 0x40142000, 0x0401f803, 0x5c007800, + 0x1c01f000, 0x4803c856, 0x4c580000, 0x583c0400, + 0x82000500, 0x0000f000, 0x82000580, 0x0000c000, + 0x04000024, 0x0201f800, 0x00020892, 0x04000021, + 0x4c180000, 0x583c0001, 0x0401fe6f, 0x0402001f, + 0x0201f800, 0x001043fc, 0x0402001c, 0x49366009, + 0x0201f800, 0x0010082a, 0x04000018, 0x492e6017, + 0x497a5800, 0x497a5a04, 0x48125c04, 0x832cac00, + 0x00000005, 0x4200b000, 0x00000007, 0x403ca000, + 0x0201f800, 0x0010a93e, 0x5c003000, 0x481a641a, + 0x4a026403, 0x0000003e, 0x4a026406, 0x00000001, + 0x4a026203, 0x00000001, 0x0201f800, 0x00106470, + 0x5c00b000, 0x1c01f000, 0x0201f800, 0x000208b4, + 0x5c003000, 0x0401f7fb, 0x4803c856, 0x59cc0400, + 0x82000d00, 0x0000ff00, 0x82040500, 0x0000f000, + 0x840409c0, 0x82000580, 0x00002000, 0x04020049, + 0x82040580, 0x00000022, 0x0402003a, 0x59c400a4, + 0x82000500, 0x0000000f, 0x82000c80, 0x00000007, + 0x04001004, 0x82000480, 0x0000000c, 0x0400103f, + 0x59cc0006, 0x82000500, 0xffff0000, 0x82000d80, + 0x04000000, 0x04000039, 0x82000d80, 0x60000000, + 0x04000036, 0x82000d80, 0x54000000, 0x04000033, + 0x82000d80, 0x03000000, 0x04020015, 0x59a80826, + 0x8c040d02, 0x0402002d, 0x8c040d08, 0x0402002b, + 0x0201f800, 0x0010473b, 0x0400002b, 0x59a8001d, + 0x800000d0, 0x59a80810, 0x82040d00, 0x000000ff, + 0x80040540, 0x59cc0800, 0x82040d00, 0x00ffffff, + 0x80040580, 0x0402001b, 0x0401f01c, 0x59c40802, + 0x8c040d0c, 0x04020017, 0x82000d80, 0x52000000, + 0x040007ec, 0x82000d80, 0x05000000, 0x040007e9, + 0x82000d80, 0x50000000, 0x040007e6, 0x0401f00d, + 0x82040580, 0x00000023, 0x0402000a, 0x0401ff57, + 0x04000008, 0x59300c03, 0x82040580, 0x00000002, + 0x04000006, 0x82040580, 0x00000051, 0x04000003, + 0x80000580, 0x0401f003, 0x82000540, 0x00000001, + 0x1c01f000, 0x59cc0006, 0x82000500, 0xffff0000, + 0x82000d80, 0x03000000, 0x04000004, 0x82000d80, + 0x52000000, 0x040207f3, 0x59a80026, 0x82000500, + 0x00000009, 0x82000580, 0x00000008, 0x040007ef, + 0x0401f7ec, 0x4803c856, 0x4c5c0000, 0x4c580000, + 0x59a80016, 0x82000580, 0x0000004c, 0x0402001f, + 0x59ccb807, 0x9c5cb9c0, 0x825cbd00, 0x00000007, + 0x8c5cbd00, 0x0400000a, 0x4200b000, 0x00000002, + 0x83a81c00, 0x00000002, 0x83cc1400, 0x0000000d, + 0x0201f800, 0x001082ff, 0x04020010, 0x8c5cbd02, + 0x0400000a, 0x4200b000, 0x00000002, 0x83a81c00, + 0x00000000, 0x83cc1400, 0x0000000f, 0x0201f800, + 0x001082ff, 0x04020005, 0x8c5cbd04, 0x04000003, + 0x82000540, 0x00000001, 0x5c00b000, 0x5c00b800, + 0x1c01f000, 0x4803c856, 0x4c5c0000, 0x4c580000, + 0x59a80016, 0x82000580, 0x0000004c, 0x0402001f, + 0x59ccb807, 0x9c5cb9c0, 0x825cbd00, 0x00000007, + 0x8c5cbd00, 0x0400000a, 0x4200b000, 0x00000002, + 0x83a81c00, 0x00000002, 0x83cc1400, 0x00000009, + 0x0201f800, 0x001082ff, 0x04020010, 0x8c5cbd02, + 0x0400000a, 0x4200b000, 0x00000002, 0x83a81c00, + 0x00000000, 0x83cc1400, 0x0000000b, 0x0201f800, + 0x001082ff, 0x04020005, 0x8c5cbd04, 0x04000003, + 0x82000540, 0x00000001, 0x5c00b000, 0x5c00b800, + 0x1c01f000, 0x4803c857, 0x4c580000, 0x40003000, + 0x42002000, 0x000007f0, 0x4200b000, 0x00000010, + 0x83ac7400, 0x000007f0, 0x50380000, 0x80026d40, + 0x04000006, 0x59340002, 0x82000500, 0x00ffffff, + 0x80180580, 0x04000010, 0x80102000, 0x80387000, + 0x8058b040, 0x040207f5, 0x82100480, 0x00000800, + 0x42002000, 0x00000000, 0x4200b000, 0x000007f0, + 0x41ac7000, 0x040217ed, 0x82000540, 0x00000001, + 0x0401f002, 0x40128800, 0x5c00b000, 0x1c01f000, + 0x59a80026, 0x8c00050e, 0x04000004, 0x8c000502, + 0x04000003, 0x80000580, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fd, 0x59300c06, 0x82040580, + 0x00000002, 0x04000006, 0x82040580, 0x00000005, + 0x04000003, 0x82000540, 0x00000001, 0x1c01f000, + 0x59c80000, 0x84000558, 0x84000512, 0x48039000, + 0x1c01f000, 0x4a03281a, 0x000003e8, 0x4a032802, + 0x0010cfc0, 0x4a032800, 0x00000000, 0x4a032808, + 0x00106d9f, 0x42000000, 0x00000005, 0x83947c00, + 0x00000009, 0x49787801, 0x4a007802, 0x00106d54, + 0x823c7c00, 0x00000003, 0x80000040, 0x040207fa, + 0x4a032819, 0xffff0000, 0x4201d000, 0x00000064, + 0x0401f97c, 0x4201d000, 0x000186a0, 0x0401f18b, + 0x00000000, 0x00000003, 0x00000006, 0x00000009, + 0x0000000c, 0x4d300000, 0x4d2c0000, 0x4d340000, + 0x4d400000, 0x4cfc0000, 0x4d380000, 0x4d3c0000, + 0x4d440000, 0x4d4c0000, 0x4d480000, 0x4c5c0000, + 0x4c600000, 0x4c640000, 0x4cc80000, 0x4ccc0000, + 0x0201f800, 0x000206af, 0x5c019800, 0x5c019000, + 0x5c00c800, 0x5c00c000, 0x5c00b800, 0x5c029000, + 0x5c029800, 0x5c028800, 0x5c027800, 0x5c027000, + 0x5c01f800, 0x5c028000, 0x5c026800, 0x5c025800, + 0x5c026000, 0x1c01f000, 0x59940004, 0x80000540, + 0x0402000a, 0x59940025, 0x80040400, 0x02001800, + 0x00100615, 0x48032804, 0x480b2805, 0x4a032803, + 0x0000000a, 0x80000580, 0x1c01f000, 0x5994001f, + 0x80000540, 0x0402000a, 0x59940025, 0x80040400, + 0x02001800, 0x00100615, 0x4803281f, 0x480b2820, + 0x4a03281e, 0x00000001, 0x80000580, 0x1c01f000, + 0x59940022, 0x80000540, 0x0402000a, 0x59940025, + 0x80040400, 0x02001800, 0x00100615, 0x48032822, + 0x480b2823, 0x4a032821, 0x0000000a, 0x80000580, + 0x1c01f000, 0x4c000000, 0x59940005, 0x4803c857, + 0x480bc857, 0x80080580, 0x04020003, 0x497b2804, + 0x497b2805, 0x5c000000, 0x1c01f000, 0x4c000000, + 0x59940020, 0x4803c857, 0x480bc857, 0x80080580, + 0x04020003, 0x497b281f, 0x497b2820, 0x5c000000, + 0x1c01f000, 0x4c000000, 0x59940023, 0x4803c857, + 0x480bc857, 0x80080580, 0x04020003, 0x497b2822, + 0x497b2823, 0x5c000000, 0x1c01f000, 0x4937c857, + 0x48ebc857, 0x59340203, 0x80e80480, 0x04001002, + 0x48ea6a03, 0x1c01f000, 0x5c03e000, 0x1c01f000, + 0x4d440000, 0x42007800, 0x00000010, 0x59968801, + 0x0201f800, 0x00020267, 0x04020012, 0x59341a03, + 0x800c1840, 0x0400100f, 0x59940027, 0x800c0480, + 0x04000003, 0x48026a03, 0x0402100a, 0x5934000f, + 0x497a6a03, 0x80000540, 0x04000006, 0x4c3c0000, + 0x5934140b, 0x0201f800, 0x00020275, 0x5c007800, + 0x81468800, 0x83440480, 0x00000800, 0x04021007, + 0x803c7840, 0x040207e7, 0x49472801, 0x5c028800, + 0x5c03e000, 0x1c01f000, 0x4a032800, 0x00000002, + 0x497b2801, 0x0401f7fa, 0x42007800, 0x00000010, + 0x59966002, 0x59300205, 0x80000d40, 0x04000006, + 0x59940027, 0x80040480, 0x48026205, 0x0400102d, + 0x0400002c, 0x59300206, 0x80000d40, 0x04000014, + 0x59b800e4, 0x8c000524, 0x04020011, 0x4a0370e4, + 0x00030000, 0x40000000, 0x59b800e4, 0x8c000524, + 0x04000004, 0x4a0370e4, 0x00020000, 0x0401f008, + 0x59940027, 0x80040480, 0x48026206, 0x4a0370e4, + 0x00020000, 0x0400101c, 0x0400001b, 0x83326400, + 0x00000024, 0x49332802, 0x41540000, 0x81300480, + 0x04021005, 0x803c7840, 0x040207db, 0x5c03e000, + 0x1c01f000, 0x59940026, 0x48032827, 0x4a032802, + 0x0010cfc0, 0x497b2826, 0x80000540, 0x0400000f, + 0x4a032800, 0x00000001, 0x5c03e000, 0x1c01f000, + 0x4c3c0000, 0x0201f800, 0x00108f92, 0x5c007800, + 0x0401f7d1, 0x4c3c0000, 0x0201f800, 0x00108b11, + 0x5c007800, 0x0401f7e2, 0x4a032800, 0x00000000, + 0x5c03e000, 0x1c01f000, 0x59a8086b, 0x8c040d30, + 0x04020029, 0x8c040d32, 0x0400000f, 0x59a80069, + 0x81640480, 0x04001019, 0x59a8000b, 0x81500580, + 0x04000005, 0x59a8006a, 0x59a81066, 0x80080580, + 0x04020012, 0x900411c0, 0x82081500, 0x00007000, + 0x0401f012, 0x82040500, 0x0000001f, 0x04000016, + 0x80040840, 0x82040500, 0x0000001f, 0x04000003, + 0x4807506b, 0x0401f010, 0x900401c0, 0x82000500, + 0x0000001f, 0x80040d40, 0x900401c0, 0x80040580, + 0x82001500, 0x00007000, 0x82040500, 0xffff8fff, + 0x80080540, 0x4803506b, 0x80081114, 0x0201f800, + 0x00100728, 0x1c01f000, 0x4a032807, 0x000007d0, + 0x4a032806, 0x0000000a, 0x1c01f000, 0x42000800, + 0x000007d0, 0x83180480, 0x00000005, 0x02021800, + 0x00100615, 0x83947c00, 0x00000009, 0x83180400, + 0x00105c7c, 0x50000000, 0x803c7c00, 0x48047801, + 0x4a007800, 0x0000000a, 0x1c01f000, 0x83180480, + 0x00000005, 0x02021800, 0x00100615, 0x83947c00, + 0x00000009, 0x83180400, 0x00105c7c, 0x50000000, + 0x803c7c00, 0x49787801, 0x1c01f000, 0x4807c857, + 0x480bc857, 0x59940025, 0x80040400, 0x02001800, + 0x00100615, 0x48032804, 0x480b2805, 0x4a032803, + 0x0000000a, 0x1c01f000, 0x4807c857, 0x480bc857, + 0x59940025, 0x80040400, 0x02001800, 0x00100615, + 0x4803281c, 0x480b281d, 0x4a03281b, 0x0000000a, + 0x1c01f000, 0x4c000000, 0x5994001d, 0x4803c857, + 0x480bc857, 0x80080580, 0x04020003, 0x4803281c, + 0x4803281d, 0x5c000000, 0x1c01f000, 0x4807c857, + 0x480bc857, 0x59940025, 0x80040400, 0x02001800, + 0x00100615, 0x48032822, 0x480b2823, 0x4a032821, + 0x0000000a, 0x1c01f000, 0x80e9d1c0, 0x0400000e, + 0x0401f832, 0x04025000, 0x4203e000, 0x80000000, + 0x40e81000, 0x41780800, 0x42000000, 0x00000064, + 0x0201f800, 0x001063ee, 0x59940024, 0x80080400, + 0x48032824, 0x1c01f000, 0x42001000, 0x00104d39, + 0x0401fee5, 0x42001000, 0x00104d2c, 0x0401ffd6, + 0x42001000, 0x00103f62, 0x0401fedf, 0x42001000, + 0x00103fe4, 0x0401fedc, 0x42001000, 0x00103f37, + 0x0401fed9, 0x42001000, 0x0010401b, 0x0401f6ea, + 0x4203e000, 0x70000000, 0x4203e000, 0xb0300000, + 0x40ebf800, 0x42000000, 0x0000003c, 0x04004004, + 0x80000040, 0x040207fe, 0x0401f007, 0x4203e000, + 0x70000000, 0x42000000, 0x0010b67d, 0x0201f800, + 0x0010a86e, 0x1c01f000, 0x4203e000, 0x80000000, + 0x4203e000, 0xb0400000, 0x40ebf800, 0x42000000, + 0x0000003c, 0x04005004, 0x80000040, 0x040207fe, + 0x0401f007, 0x4203e000, 0x80000000, 0x42000000, + 0x0010b67e, 0x0201f800, 0x0010a86e, 0x1c01f000, + 0x59a8000e, 0x82000480, 0x00000100, 0x599c0a02, + 0x800409c0, 0x04020002, 0x80040800, 0x80041480, + 0x04001002, 0x40000800, 0x48075067, 0x59a8100e, + 0x40040000, 0x800acc80, 0x4967500e, 0x49675069, + 0x59aaa80b, 0x41640800, 0x42001000, 0x00000024, + 0x0201f800, 0x001063cf, 0x8206a400, 0x0010cfc0, + 0x49535065, 0x4152b000, 0x42006000, 0x0010bc64, + 0x4a006004, 0x0000012c, 0x4a006005, 0xda10da10, + 0x4a006008, 0x00000011, 0x4a006009, 0x0010bc64, + 0x4a00600a, 0x00101108, 0x599c0014, 0x48006011, + 0x599c0015, 0x48006012, 0x42006000, 0x0010bc40, + 0x4a006203, 0x00000008, 0x4a006406, 0x00000006, + 0x4a006002, 0xffff0000, 0x4a006008, 0x0010bc64, + 0x4a006014, 0x0010bc64, 0x599c0014, 0x48006015, + 0x599c0015, 0x48006016, 0x599c0413, 0x48006017, + 0x49506018, 0x49546019, 0x59a80067, 0x4800601a, + 0x4a00601b, 0x0010b265, 0x4a00601c, 0x0010b266, + 0x4a00601d, 0x0010b26a, 0x42000000, 0xb0000000, + 0x42000800, 0x0010bc40, 0x0201f800, 0x00100bb2, + 0x1c01f000, 0x82000d00, 0x000000c0, 0x04000004, + 0x82040d80, 0x000000c0, 0x04020055, 0x82000d00, + 0x00002020, 0x59300414, 0x84000512, 0x82040d80, + 0x00002020, 0x0400000b, 0x8c000514, 0x0402000f, + 0x48026414, 0x813e79c0, 0x02020000, 0x00020804, + 0x42027000, 0x00000043, 0x0201f000, 0x000208d8, + 0x59326809, 0x59340a00, 0x8c040d0a, 0x040007f3, + 0x84000552, 0x0401f7f1, 0x84000514, 0x592c080d, + 0x48066015, 0x0401f7ef, 0x59326809, 0x59340a00, + 0x8c040d0a, 0x02000000, 0x00020817, 0x59300c14, + 0x84040d52, 0x48066414, 0x0201f000, 0x00020817, + 0x0201f800, 0x00020087, 0x813e79c0, 0x02020000, + 0x00020804, 0x0201f000, 0x00020825, 0x8c00051e, + 0x02000000, 0x00020831, 0x82000d00, 0x00002020, + 0x82040d80, 0x00002020, 0x04000014, 0x82000500, + 0x000000c0, 0x82000d80, 0x00000080, 0x04000008, + 0x813e79c0, 0x02020000, 0x00020804, 0x42027000, + 0x00000041, 0x0201f000, 0x000208d8, 0x813e79c0, + 0x02020000, 0x00020804, 0x42027000, 0x00000043, + 0x0201f000, 0x000208d8, 0x59326809, 0x59340a00, + 0x8c040d0a, 0x040007ea, 0x59300c14, 0x84040d52, + 0x48066414, 0x0401f7e6, 0x492fc857, 0x42000800, + 0x00000006, 0x0201f000, 0x0002082c, 0x492fc857, + 0x42000800, 0x00000004, 0x0201f000, 0x0002082c, + 0x4807c856, 0x59a80068, 0x800409c0, 0x04000003, + 0x80080540, 0x0401f002, 0x80080500, 0x48035068, + 0x1c01f000, 0x4a030800, 0x00000000, 0x4a030802, + 0x00000001, 0x497b0803, 0x497b0804, 0x1c01f000, + 0x59840002, 0x8c000500, 0x04000004, 0x84000500, + 0x4a030800, 0x00000001, 0x84000544, 0x84000506, + 0x48030802, 0x82000d00, 0x0fffffff, 0x42000000, + 0x90000000, 0x0201f800, 0x00100bde, 0x59a80069, + 0x82000480, 0x00000007, 0x48035069, 0x80000580, + 0x42000800, 0x0010b315, 0x48000800, 0x48000801, + 0x1c01f000, 0x59a80069, 0x82000400, 0x00000007, + 0x48035069, 0x1c01f000, 0x83640480, 0x00000008, + 0x0400101b, 0x58c80a03, 0x80000580, 0x82000400, + 0x00000008, 0x80040840, 0x040207fd, 0x815c0480, + 0x04001013, 0x4200b000, 0x00000007, 0x0201f800, + 0x00020892, 0x4a026203, 0x00000004, 0x4a026406, + 0x00000009, 0x4a026203, 0x00000004, 0x4a026007, + 0x00000101, 0x0401f809, 0x0401f880, 0x8058b040, + 0x040207f3, 0x80000580, 0x1c01f000, 0x82000540, + 0x00000001, 0x0401f7fd, 0x0201f800, 0x0010082a, + 0x492e6008, 0x58c80a03, 0x4a025a04, 0x0000002c, + 0x497a5800, 0x497a5801, 0x497a5c04, 0x497a5c06, + 0x497a5805, 0x4a025a08, 0x00000005, 0x4a025a07, + 0x00000002, 0x58c80201, 0x48025c04, 0x58c80202, + 0x48025c07, 0x58c80204, 0x48025c08, 0x4a02580d, + 0x0000ffff, 0x80040840, 0x0400000c, 0x412c2000, + 0x0201f800, 0x0010082a, 0x4a025a04, 0x0000000a, + 0x497a5c04, 0x48125800, 0x492c2001, 0x412c2000, + 0x80040840, 0x040207f7, 0x1c01f000, 0x4d7c0000, + 0x4202f800, 0x00000010, 0x4df00000, 0x4203e000, + 0x50000000, 0x59847803, 0x803c79c0, 0x0400001e, + 0x4c5c0000, 0x583cb808, 0x585c3408, 0x801831c0, + 0x0400000b, 0x0401f84a, 0x04000016, 0x42001000, + 0x0010b315, 0x0401f87f, 0x04000012, 0x0201f800, + 0x00100819, 0x0400000f, 0x492cb805, 0x585c0005, + 0x80000540, 0x02000800, 0x00100615, 0x0401f830, + 0x585c5408, 0x0401f80b, 0x5c00b800, 0x5c03e000, + 0x817ef840, 0x040207e1, 0x5c02f800, 0x1c01f000, + 0x5c00b800, 0x5c03e000, 0x5c02f800, 0x1c01f000, + 0x4803c856, 0x405c6000, 0x802851c0, 0x04000018, + 0x585c0204, 0x82000d00, 0x0000000f, 0x82040c00, + 0x0010110d, 0x50044000, 0x4c600000, 0x4c640000, + 0x4d040000, 0x4020c000, 0x40320800, 0x5984c804, + 0x4c280000, 0x0401f934, 0x5c005000, 0x40604000, + 0x41046000, 0x0201f800, 0x001010eb, 0x040207f6, + 0x5c020800, 0x5c00c800, 0x5c00c000, 0x58c80204, + 0x4800bc08, 0x0201f800, 0x00020087, 0x4a026007, + 0x00000101, 0x497a6009, 0x0401f055, 0x4803c856, + 0x59840003, 0x80026540, 0x04000003, 0x59300000, + 0x48030803, 0x1c01f000, 0x4803c856, 0x59840003, + 0x48026000, 0x49330803, 0x1c01f000, 0x58cc0805, + 0x40180000, 0x80040480, 0x0400100d, 0x82cc0580, + 0x0010b30a, 0x02020800, 0x00100615, 0x58c80205, + 0x80040480, 0x0400101d, 0x82000540, 0x00000001, + 0x1c01f000, 0x80003580, 0x0401f7fe, 0x82cc0580, + 0x0010b30a, 0x02020800, 0x00100615, 0x58c80400, + 0x8c000504, 0x040007f8, 0x58c8040b, 0x8c00051e, + 0x040007f5, 0x8c000500, 0x040207f3, 0x84000540, + 0x4801940b, 0x42000000, 0x0010b637, 0x0201f800, + 0x0010a86e, 0x42001000, 0x00008026, 0x0201f800, + 0x00103857, 0x0401f7e8, 0x58c8040b, 0x8c00051e, + 0x040007e2, 0x8c000502, 0x040207e0, 0x84000542, + 0x4801940b, 0x42000000, 0x0010b636, 0x0201f800, + 0x0010a86e, 0x42001000, 0x00008025, 0x42001800, + 0x00000000, 0x0201f800, 0x00103857, 0x0401f7d3, + 0x4803c856, 0x58080000, 0x42001800, 0x00000007, + 0x58080801, 0x80040480, 0x04020004, 0x400c0000, + 0x80000540, 0x0401f005, 0x04001003, 0x800c0480, + 0x0401f002, 0x80000080, 0x1c01f000, 0x4803c856, + 0x59300008, 0x80000d40, 0x02000800, 0x00100615, + 0x58040005, 0x80000540, 0x02000800, 0x00100615, + 0x59300007, 0x82000500, 0x00000101, 0x82000580, + 0x00000101, 0x02020800, 0x00100615, 0x42001000, + 0x0010b315, 0x58080801, 0x82040400, 0x0010b317, + 0x497a6414, 0x4a026015, 0x0000ffff, 0x45300000, + 0x80040800, 0x82040480, 0x00000008, 0x04001002, + 0x80000d80, 0x48041001, 0x82040400, 0x0010b317, + 0x45780000, 0x1c01f000, 0x4933c857, 0x59300808, + 0x800409c0, 0x02000800, 0x00100615, 0x4d2c0000, + 0x58065805, 0x812e59c0, 0x02020800, 0x0010083a, + 0x49780805, 0x40065800, 0x0201f800, 0x00100843, + 0x5c025800, 0x4d300000, 0x0201f800, 0x000208b4, + 0x5c026000, 0x1c01f000, 0x59300406, 0x82000580, + 0x00000009, 0x04020006, 0x59300007, 0x8c000510, + 0x04000003, 0x80000580, 0x1c01f000, 0x82000540, + 0x00000001, 0x1c01f000, 0x59840802, 0x8c040d04, + 0x1c01f000, 0x4803c856, 0x59840802, 0x84040d04, + 0x84040d40, 0x4a030800, 0x00000000, 0x48070802, + 0x82040d00, 0x0fffffff, 0x42000000, 0x90000000, + 0x0201f000, 0x00100bde, 0x4807c857, 0x4805980a, + 0x49799801, 0x49799803, 0x49799806, 0x49799807, + 0x49799808, 0x49799805, 0x49799809, 0x0401f8c8, + 0x0400000a, 0x0401f8ea, 0x04000008, 0x48359800, + 0x48359802, 0x48359806, 0x4a019804, 0x00000001, + 0x4a019807, 0x00000005, 0x1c01f000, 0x4807c857, + 0x58cc1007, 0x40040000, 0x80080480, 0x04021020, + 0x4c040000, 0x4c080000, 0x0401f8d9, 0x5c001000, + 0x5c000800, 0x0400001c, 0x58cc0006, 0x80006540, + 0x0402000b, 0x48359800, 0x48359802, 0x48359806, + 0x49799801, 0x49799803, 0x49786801, 0x49786800, + 0x49799804, 0x49799807, 0x0401f005, 0x48306801, + 0x48346000, 0x48359806, 0x49786800, 0x58cc0004, + 0x58cc1007, 0x80000000, 0x82081400, 0x00000005, + 0x48019804, 0x48099807, 0x0401f7df, 0x80000580, + 0x1c01f000, 0x82000540, 0x00000001, 0x1c01f000, + 0x480bc857, 0x4c500000, 0x4c540000, 0x4c580000, + 0x40083000, 0x58cc0801, 0x82040480, 0x00000005, + 0x02021800, 0x00100615, 0x82040400, 0x00106150, + 0x50000000, 0x58cca800, 0x8054ac00, 0x42001800, + 0x00000005, 0x40040000, 0x800c0480, 0x80082480, + 0x04021002, 0x40080000, 0x8000b0c2, 0x8058b400, + 0x5450a800, 0x8050a000, 0x8054a800, 0x8058b040, + 0x040207fc, 0x40001000, 0x58cc2805, 0x58cc0807, + 0x58cc2001, 0x80142c00, 0x80040c80, 0x80102400, + 0x48159805, 0x48059807, 0x48119801, 0x82100580, + 0x00000005, 0x0400000c, 0x48119801, 0x40080000, + 0x80181480, 0x40083000, 0x04000003, 0x040217d6, + 0x80000580, 0x5c00b000, 0x5c00a800, 0x5c00a000, + 0x1c01f000, 0x58cc0800, 0x800409c0, 0x02000800, + 0x00100615, 0x58040800, 0x48059800, 0x41782000, + 0x0401f7ee, 0x0401f812, 0x50600000, 0x81041c00, + 0x585c0204, 0x4803c857, 0x82000580, 0x0000002c, + 0x02020800, 0x00100615, 0x58040202, 0x800000e0, + 0x80640540, 0x48001802, 0x58040000, 0x48001800, + 0x58040001, 0x48001801, 0x1c01f000, 0x4807c856, + 0x58cc0005, 0x80000040, 0x02001800, 0x00100615, + 0x48019805, 0x58cc1003, 0x82080480, 0x00000005, + 0x02021800, 0x00100615, 0x82080400, 0x00106150, + 0x50000000, 0x58cc0802, 0x80040c00, 0x80081000, + 0x82080480, 0x00000005, 0x0402000f, 0x58cc2002, + 0x58100000, 0x80006d40, 0x04000009, 0x4c340000, + 0x0401f858, 0x5c006800, 0x49786801, 0x48359802, + 0x58cc0004, 0x80000040, 0x48019804, 0x49799803, + 0x0401f002, 0x48099803, 0x1c01f000, 0x4807c856, + 0x41781800, 0x58c80201, 0x80000540, 0x04000002, + 0x800c1800, 0x58c80c01, 0x80040c80, 0x0400100a, + 0x04000009, 0x800c1800, 0x58c80202, 0x80041480, + 0x04001005, 0x04000004, 0x800c1800, 0x40080800, + 0x0401f7fb, 0x480d9204, 0x400c0000, 0x42002000, + 0x00000001, 0x80000040, 0x04000007, 0x04001006, + 0x80102000, 0x82000480, 0x00000005, 0x04000002, + 0x040217fc, 0x48119203, 0x1c01f000, 0x4807c856, + 0x4d2c0000, 0x58cc000a, 0x80000540, 0x02000800, + 0x00100615, 0x82002400, 0x00000005, 0x0201f800, + 0x00100819, 0x04000012, 0x492d9809, 0x497a5800, + 0x497a5801, 0x0201f800, 0x00100819, 0x0400000c, + 0x58cc0009, 0x48025800, 0x497a5801, 0x492d9809, + 0x82102480, 0x00000005, 0x040217f7, 0x82000540, + 0x00000001, 0x5c025800, 0x1c01f000, 0x58cc0009, + 0x80025d40, 0x040007fc, 0x592c2000, 0x0201f800, + 0x0010083a, 0x40100000, 0x0401f7fa, 0x58cc0009, + 0x48cfc857, 0x80006d40, 0x04000005, 0x50340000, + 0x48019809, 0x49786800, 0x49786801, 0x1c01f000, + 0x4813c857, 0x58cc0009, 0x48002000, 0x48119809, + 0x1c01f000, 0x4807c856, 0x4d2c0000, 0x58cc0009, + 0x80025d40, 0x04000007, 0x592c0000, 0x4c000000, + 0x0201f800, 0x0010083a, 0x5c000000, 0x0401f7f9, + 0x5c025800, 0x1c01f000, 0x4807c856, 0x4d2c0000, + 0x58cc0002, 0x80025d40, 0x04000007, 0x592c0000, + 0x4c000000, 0x0201f800, 0x0010083a, 0x5c000000, + 0x0401f7f9, 0x49799800, 0x49799802, 0x49799801, + 0x49799803, 0x49799806, 0x49799807, 0x49799808, + 0x49799809, 0x4979980a, 0x5c025800, 0x1c01f000, + 0x00000003, 0x00000006, 0x00000009, 0x0000000c, + 0x0000000f, 0x00000012, 0x4803c856, 0x0401f857, + 0x4a00c204, 0x0000003c, 0x59301009, 0x82080580, + 0x0010b320, 0x04000013, 0x58080802, 0x82040d00, + 0x00ffffff, 0x58080403, 0x4804c005, 0x4800c406, + 0x4a00c207, 0x00000003, 0x59300811, 0x585c0404, + 0x4978c206, 0x4804c407, 0x80000540, 0x0400000d, + 0x58600206, 0x84000540, 0x4800c206, 0x0401f009, + 0x585c080a, 0x82040d00, 0x00ffffff, 0x4804c005, + 0x4a00c406, 0x000007ff, 0x4978c207, 0x0401f7ef, + 0x82603c00, 0x00000008, 0x58605404, 0x40282000, + 0x405c6000, 0x585c0a04, 0x82040d00, 0x0000000f, + 0x82040c00, 0x0010110d, 0x50044000, 0x80004d80, + 0x50200000, 0x80307400, 0x58380402, 0x8c244d00, + 0x04020003, 0x48003a00, 0x0401f003, 0x48003c00, + 0x801c3800, 0x80244800, 0x80102040, 0x04000006, + 0x0201f800, 0x001010eb, 0x02000800, 0x00100615, + 0x0401f7f0, 0x1c01f000, 0x4803c856, 0x4d340000, + 0x59300009, 0x80026d40, 0x02000800, 0x00100615, + 0x59340401, 0x80000540, 0x0400000e, 0x59840000, + 0x80000540, 0x0400000b, 0x836c0580, 0x00000003, + 0x04020008, 0x59341c03, 0x42002000, 0x00000004, + 0x42003000, 0x00000004, 0x0201f800, 0x001038c7, + 0x5c026800, 0x1c01f000, 0x4803c856, 0x80001580, + 0x58c80c01, 0x59300011, 0x80040c80, 0x48066011, + 0x58c80201, 0x80000540, 0x04000005, 0x80081000, + 0x80040c80, 0x04001007, 0x04000006, 0x58c80202, + 0x80081000, 0x80040c80, 0x04001002, 0x040207fd, + 0x4808bc08, 0x4808c404, 0x1c01f000, 0x4803c856, + 0x4a0370e5, 0x00020000, 0x59b800e5, 0x8c000524, + 0x040207fc, 0x4a0370e5, 0x00030000, 0x40000000, + 0x40000000, 0x59b800e5, 0x8c000524, 0x040207f5, + 0x5934000e, 0x80006d40, 0x04000010, 0x81300580, + 0x04020004, 0x58340000, 0x4802680e, 0x0401f00a, + 0x40347800, 0x58340000, 0x80006d40, 0x02000800, + 0x00100615, 0x81300580, 0x040207fa, 0x58340000, + 0x48007800, 0x497a6000, 0x4a0370e5, 0x00020000, + 0x1c01f000, 0x4803c856, 0x4d300000, 0x4d2c0000, + 0x42000800, 0x000003ff, 0x4a0370e5, 0x00020000, + 0x59b800e5, 0x8c000524, 0x04000005, 0x80040840, + 0x040207fa, 0x0201f800, 0x00100615, 0x4a0370e5, + 0x00030000, 0x40000000, 0x40000000, 0x59b800e5, + 0x8c000524, 0x040207f1, 0x5934000e, 0x80026540, + 0x0400000e, 0x4933c857, 0x59300000, 0x4802680e, + 0x4a026203, 0x00000004, 0x497a6206, 0x497a6009, + 0x4a026007, 0x00000101, 0x59325808, 0x497a5c08, + 0x0401fd82, 0x0401f7f1, 0x4a0370e5, 0x00020000, + 0x5c025800, 0x5c026000, 0x1c01f000, 0x4803c856, + 0x4c000000, 0x0201f800, 0x001059b9, 0x04020011, + 0x0201f800, 0x001043fc, 0x02020800, 0x00100615, + 0x5c000000, 0x48026802, 0x0201f800, 0x00020892, + 0x04000009, 0x49366009, 0x4a026406, 0x00000001, + 0x42027000, 0x00000001, 0x0201f000, 0x000208d8, + 0x5c000000, 0x1c01f000, 0x59300203, 0x82000c80, + 0x0000000e, 0x02021800, 0x00100615, 0x4803c857, + 0x0c01f001, 0x0010623b, 0x0010623b, 0x0010623b, + 0x0010623d, 0x0010629d, 0x0010623b, 0x0010623b, + 0x001062ef, 0x001062f0, 0x0010623b, 0x0010623b, + 0x0010623b, 0x0010623b, 0x0010623b, 0x0201f800, + 0x00100615, 0x493bc857, 0x83380480, 0x00000050, + 0x02021800, 0x00100615, 0x83380480, 0x00000049, + 0x02001800, 0x00100615, 0x0c01f001, 0x00106250, + 0x00106272, 0x0010624e, 0x0010624e, 0x0010624e, + 0x0010624e, 0x00106281, 0x0201f800, 0x00100615, + 0x4d2c0000, 0x59325808, 0x592c0206, 0x48025c06, + 0x4a025a06, 0x00000000, 0x4c5c0000, 0x592cbc0a, + 0x592c0000, 0x48026008, 0x0201f800, 0x00020385, + 0x59300008, 0x80000540, 0x04000008, 0x4a026203, + 0x00000007, 0x42027000, 0x00000043, 0x5c00b800, + 0x5c025800, 0x0401f08a, 0x8c5cbd08, 0x04020006, + 0x4a026203, 0x00000007, 0x497a6206, 0x497a6008, + 0x0401f003, 0x0201f800, 0x000208b4, 0x5c00b800, + 0x5c025800, 0x1c01f000, 0x0201f800, 0x001068c1, + 0x4d2c0000, 0x59325808, 0x0201f800, 0x00108df4, + 0x04000006, 0x4d400000, 0x42028000, 0x00000001, + 0x0401f90e, 0x5c028000, 0x5c025800, 0x0201f000, + 0x000208b4, 0x0201f800, 0x001068c1, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42003000, 0x00000014, 0x0201f800, 0x0010a766, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x4d2c0000, 0x59325808, 0x0201f800, 0x00108df4, + 0x04000006, 0x4d400000, 0x42028000, 0x00000029, + 0x0401f8f2, 0x5c028000, 0x5c025800, 0x0201f000, + 0x000208b4, 0x493bc857, 0x497a6206, 0x83380480, + 0x00000054, 0x02021800, 0x00100615, 0x83380480, + 0x00000047, 0x02001800, 0x00100615, 0x0c01f001, + 0x001062ee, 0x001062b7, 0x001062b5, 0x001062b5, + 0x001062b5, 0x001062b5, 0x001062b5, 0x001062b5, + 0x001062b5, 0x001062b5, 0x001062b5, 0x001062b5, + 0x001062bb, 0x0201f800, 0x00100615, 0x59300011, + 0x82000500, 0xffff0000, 0x04020034, 0x59840802, + 0x8c040d04, 0x04000025, 0x59300009, 0x80026d40, + 0x0400001f, 0x4c5c0000, 0x4c600000, 0x497a6206, + 0x5930b808, 0x585c0005, 0x8000c540, 0x02000800, + 0x00100615, 0x0401fe8d, 0x40625800, 0x0201f800, + 0x00020385, 0x4978b805, 0x0401fef5, 0x497a6009, + 0x585c3408, 0x0401fcbe, 0x0400000e, 0x42001000, + 0x0010b315, 0x0401fcf3, 0x0400000a, 0x0201f800, + 0x0010082a, 0x04000007, 0x492cb805, 0x585c5408, + 0x0401fc84, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x0401fcaa, 0x0401f7fc, 0x8c040d06, 0x040207fc, + 0x59300009, 0x80026d40, 0x04000006, 0x5934000e, + 0x80000540, 0x02020800, 0x00100615, 0x497a6009, + 0x0401fd0e, 0x0401f7f2, 0x0401f085, 0x4803c856, + 0x4803c856, 0x83380580, 0x00000043, 0x02020800, + 0x00100615, 0x4a026203, 0x00000003, 0x493a6403, + 0x59325808, 0x592c000f, 0x48026011, 0x497a6013, + 0x592c0406, 0x800000c2, 0x800010c4, 0x80081400, + 0x480a6206, 0x0201f800, 0x00100f9c, 0x42000800, + 0x80000060, 0x0401f161, 0x42000000, 0x0010b674, + 0x0201f800, 0x0010a86e, 0x59300203, 0x82000c80, + 0x0000000e, 0x02021800, 0x00100615, 0x4803c857, + 0x82000d80, 0x00000003, 0x04000006, 0x82000d80, + 0x00000004, 0x0400005b, 0x0201f800, 0x00100615, + 0x0201f800, 0x0010698c, 0x59300004, 0x8c00053e, + 0x04020007, 0x0201f800, 0x001068a3, 0x02020800, + 0x00100615, 0x0201f000, 0x00106982, 0x0401f9d3, + 0x0201f800, 0x00106982, 0x59325808, 0x42028000, + 0x00000006, 0x0401f861, 0x0201f000, 0x000208b4, + 0x4803c856, 0x59300203, 0x82000c80, 0x0000000e, + 0x02021800, 0x00100615, 0x82000d80, 0x00000002, + 0x04000009, 0x82000d80, 0x00000003, 0x04000019, + 0x82000d80, 0x00000004, 0x04000036, 0x0201f800, + 0x00100615, 0x4933c857, 0x4d2c0000, 0x59325808, + 0x812e59c0, 0x02000800, 0x00100615, 0x592c1a08, + 0x8c0c1d0e, 0x02000800, 0x00100615, 0x4d400000, + 0x42028000, 0x00000001, 0x0401f840, 0x0201f800, + 0x00107698, 0x5c028000, 0x5c025800, 0x1c01f000, + 0x4933c857, 0x0201f800, 0x0010698c, 0x4df00000, + 0x59300004, 0x8c00053e, 0x04020006, 0x0201f800, + 0x00106cb4, 0x02020800, 0x00100615, 0x0401f010, + 0x0201f800, 0x00108a8a, 0x04020004, 0x0201f800, + 0x00106bb2, 0x0402000a, 0x0401f994, 0x02020800, + 0x00100615, 0x5c03e000, 0x02000800, 0x00106982, + 0x82000540, 0x00000001, 0x1c01f000, 0x5c03e000, + 0x02000800, 0x00106982, 0x80000580, 0x1c01f000, + 0x4933c857, 0x0201f800, 0x00100ee4, 0x4933c857, + 0x4c5c0000, 0x4d340000, 0x497a6206, 0x5930b808, + 0x59300009, 0x80026d40, 0x04020e49, 0x42001000, + 0x0010b315, 0x0401fc4b, 0x04000009, 0x58c80204, + 0x4800bc08, 0x41785000, 0x0201f800, 0x00105f60, + 0x5c026800, 0x5c00b800, 0x1c01f000, 0x4978bc08, + 0x0401fc02, 0x0401f7fb, 0x4803c856, 0x0201f800, + 0x00108df4, 0x0400000f, 0x592c0000, 0x80000d40, + 0x04000009, 0x497a5800, 0x49425a06, 0x4c040000, + 0x0201f800, 0x00020381, 0x5c000800, 0x40065800, + 0x0401f7f6, 0x49425a06, 0x0201f800, 0x00020381, + 0x1c01f000, 0x4933c857, 0x59300c06, 0x82040580, + 0x0000000e, 0x04000004, 0x82040580, 0x00000009, + 0x04020004, 0x0401ffe5, 0x497a6008, 0x80000580, + 0x1c01f000, 0x592e6009, 0x83300480, 0x0010cfc0, + 0x04001016, 0x41580000, 0x81300480, 0x04021013, + 0x40040000, 0x59300c06, 0x80040580, 0x04020012, + 0x59300a03, 0x82040580, 0x00000007, 0x02020800, + 0x00100615, 0x59300008, 0x80000540, 0x02020800, + 0x00100615, 0x0201f800, 0x000208b4, 0x42000000, + 0x00000000, 0x0401f009, 0x42000000, 0x00000008, + 0x0401f006, 0x82040580, 0x00000007, 0x040207fb, + 0x42000000, 0x00000005, 0x592c0a06, 0x48065c06, + 0x48025a06, 0x0201f000, 0x00020381, 0x4c0c0000, + 0x4c100000, 0x4c140000, 0x4c180000, 0x80001d80, + 0x80002580, 0x42003000, 0x00000020, 0x82040500, + 0x00000001, 0x04000003, 0x40080000, 0x800c1c00, + 0x400c2800, 0x800c1902, 0x80102102, 0x82140500, + 0x00000001, 0x04000003, 0x82102540, 0x80000000, + 0x80040902, 0x80183040, 0x040207f1, 0x40100800, + 0x400c0000, 0x5c003000, 0x5c002800, 0x5c002000, + 0x5c001800, 0x1c01f000, 0x4c580000, 0x4200b000, + 0x00000020, 0x80000540, 0x04000018, 0x80041c80, + 0x04021016, 0x800810c2, 0x80040982, 0x04001006, + 0x80041c80, 0x04021005, 0x8058b040, 0x040207fa, + 0x0401f006, 0x80041c80, 0x400c0800, 0x80081000, + 0x8058b040, 0x040207f4, 0x4c000000, 0x41f00000, + 0x82000500, 0xf7ffffff, 0x4003e000, 0x5c000000, + 0x5c00b000, 0x1c01f000, 0x4c000000, 0x41f00000, + 0x82000540, 0x08000000, 0x0401f7f8, 0x42007000, + 0x0010b33f, 0x4a007000, 0x00000005, 0x4a007401, + 0x00000000, 0x4a007202, 0x00000840, 0x4a0378e8, + 0x00000000, 0x4a03c821, 0x00000010, 0x4a03c823, + 0x00000004, 0x0401f81d, 0x4a0378e9, 0x00003a0d, + 0x4a0378e8, 0x00000001, 0x42000800, 0x00000005, + 0x4203a000, 0x00007600, 0x4a03a005, 0xd0000001, + 0x59d00006, 0x4a03a005, 0x90000001, 0x83d3a400, + 0x00000020, 0x80040840, 0x040207fa, 0x59e00003, + 0x82000500, 0xffffffe0, 0x82000540, 0x00008000, + 0x4803c003, 0x59c40006, 0x82000500, 0xfffcffff, + 0x48038806, 0x1c01f000, 0x4d900000, 0x4d180000, + 0x4a0378e7, 0xaaaaaaaa, 0x4a0378e6, 0xaaaaaaaa, + 0x4a0378e5, 0xaaaaaaaa, 0x4a0378e4, 0xaaaaaaaa, + 0x4a03781a, 0x0010b5d2, 0x4a03781b, 0x0010110d, + 0x4a03781c, 0x0010111d, 0x4a031800, 0x00000000, + 0x4a031801, 0x0010b342, 0x4a031802, 0x0010b349, + 0x42000800, 0x0010b5d5, 0x417a3000, 0x811b20c8, + 0x83932400, 0x0000bf32, 0x48072000, 0x4a032001, + 0x00000000, 0x83180400, 0x00106e41, 0x50000000, + 0x48032002, 0x82040c00, 0x00000003, 0x811a3000, + 0x83180480, 0x00000005, 0x040017f1, 0x5c023000, + 0x5c032000, 0x1c01f000, 0x48066004, 0x497a6000, + 0x497a6001, 0x59bc00ea, 0x8c000516, 0x040207fe, + 0x83300400, 0xa0000000, 0x480378e1, 0x1c01f000, + 0x4933c857, 0x59300804, 0x82040d00, 0x00000100, + 0x82040d40, 0x80000040, 0x48066004, 0x497a6000, + 0x59bc00ea, 0x8c000516, 0x040207fe, 0x83300400, + 0x60000000, 0x480378e1, 0x1c01f000, 0x0201f800, + 0x0010698c, 0x4df00000, 0x4d300000, 0x4d340000, + 0x4d2c0000, 0x4d180000, 0x4c5c0000, 0x4c600000, + 0x4d900000, 0x4dd00000, 0x4da40000, 0x4d140000, + 0x42003000, 0x0000bf2e, 0x581a6001, 0x813261c0, + 0x0400002c, 0x41302800, 0x4178c000, 0x59300000, + 0x4c000000, 0x59326809, 0x5930b801, 0x59300406, + 0x82000d80, 0x00000006, 0x04020003, 0x8d3e7d18, + 0x04000010, 0x8d3e7d06, 0x04000007, 0x82000580, + 0x00000003, 0x04020004, 0x59340200, 0x8c00050e, + 0x04020008, 0x0401f92d, 0x4c0c0000, 0x4c140000, + 0x0401fb59, 0x5c002800, 0x5c001800, 0x0401f005, + 0x41301800, 0x8060c1c0, 0x04020002, 0x400cc000, + 0x805cb9c0, 0x04000003, 0x405e6000, 0x0401f7e3, + 0x5c026000, 0x813261c0, 0x04000006, 0x8060c1c0, + 0x04000002, 0x40602800, 0x4178c000, 0x0401f7d8, + 0x417a3000, 0x0201f800, 0x00106e2f, 0x59926004, + 0x813261c0, 0x04000023, 0x59326809, 0x4130c000, + 0x59300001, 0x8000bd40, 0x04000016, 0x40026000, + 0x40602800, 0x5930b801, 0x59300406, 0x82000d80, + 0x00000006, 0x0400000e, 0x8d3e7d06, 0x04000007, + 0x82000580, 0x00000003, 0x04020004, 0x59340200, + 0x8c00050e, 0x04020006, 0x0401f8da, 0x4c140000, + 0x0401fb29, 0x5c002800, 0x0401f002, 0x41302800, + 0x405e6000, 0x813261c0, 0x040207eb, 0x8060c1c0, + 0x04000004, 0x40626000, 0x4178c000, 0x0401f7e7, + 0x811a3000, 0x83180480, 0x00000005, 0x040017d6, + 0x5c022800, 0x5c034800, 0x5c03a000, 0x5c032000, + 0x5c00c000, 0x5c00b800, 0x5c023000, 0x5c025800, + 0x5c026800, 0x5c026000, 0x5c03e000, 0x02000800, + 0x00106982, 0x1c01f000, 0x4933c857, 0x0201f800, + 0x0010698c, 0x4df00000, 0x4d340000, 0x4d180000, + 0x4d900000, 0x42003000, 0x0000bf2e, 0x59326809, + 0x58182001, 0x40102800, 0x801021c0, 0x04000016, + 0x41300000, 0x80100580, 0x04000011, 0x58100009, + 0x81340580, 0x0402000b, 0x40101800, 0x58102001, + 0x41300000, 0x801021c0, 0x0400000b, 0x80100d80, + 0x04000007, 0x40101800, 0x58102001, 0x0401f7fa, + 0x40102800, 0x58102000, 0x0401f7ec, 0x0401f8bb, + 0x0401f01a, 0x42032000, 0x0000bf32, 0x417a3000, + 0x59902004, 0x40102800, 0x801021c0, 0x0400000b, + 0x58100009, 0x81340580, 0x04020008, 0x41300000, + 0x80100580, 0x0400000c, 0x40102800, 0x58102001, + 0x801021c0, 0x040207fa, 0x811a3000, 0x83180480, + 0x00000005, 0x0402100d, 0x83932400, 0x00000010, + 0x0401f7ec, 0x0401f87f, 0x5c032000, 0x5c023000, + 0x5c026800, 0x5c03e000, 0x02000800, 0x00106982, + 0x80000580, 0x1c01f000, 0x5c032000, 0x5c023000, + 0x5c026800, 0x5c03e000, 0x02000800, 0x00106982, + 0x82000540, 0x00000001, 0x1c01f000, 0x0201f800, + 0x0010698c, 0x4df00000, 0x4d300000, 0x4d340000, + 0x4d180000, 0x4d2c0000, 0x4c5c0000, 0x4c600000, + 0x4d900000, 0x4dd00000, 0x4da40000, 0x4d140000, + 0x42003000, 0x0000bf2e, 0x581a6001, 0x813261c0, + 0x04000023, 0x41302800, 0x5930b800, 0x59326809, + 0x59340403, 0x81440580, 0x04000006, 0x805cb9c0, + 0x0400001b, 0x41302800, 0x405e6000, 0x0401f7f7, + 0x5930b801, 0x8d3e7d00, 0x04000003, 0x0401fb58, + 0x0402000e, 0x59300406, 0x82000580, 0x00000006, + 0x04020003, 0x8d3e7d18, 0x04000008, 0x0401f867, + 0x4c0c0000, 0x4c140000, 0x0401fa93, 0x5c002800, + 0x5c001800, 0x0401f002, 0x41301800, 0x405e6000, + 0x813261c0, 0x040207eb, 0x0401f02d, 0x417a3000, + 0x0201f800, 0x00106e2f, 0x59926004, 0x813261c0, + 0x04000005, 0x59326809, 0x59340403, 0x81440580, + 0x04000006, 0x811a3000, 0x83180480, 0x00000005, + 0x040017f4, 0x0401f01e, 0x4130c000, 0x59300001, + 0x8000bd40, 0x04000012, 0x40026000, 0x40602800, + 0x5930b801, 0x8d3e7d00, 0x04000003, 0x0401fb2c, + 0x0402000a, 0x59300406, 0x82000580, 0x00000006, + 0x04000006, 0x0401f81b, 0x4c140000, 0x0401fa6a, + 0x5c002800, 0x0401f002, 0x41302800, 0x405e6000, + 0x813261c0, 0x040207ef, 0x8060c1c0, 0x04000004, + 0x40626000, 0x4178c000, 0x0401f7eb, 0x5c022800, + 0x5c034800, 0x5c03a000, 0x5c032000, 0x5c00c000, + 0x5c00b800, 0x5c025800, 0x5c023000, 0x5c026800, + 0x5c026000, 0x5c03e000, 0x04000bd4, 0x1c01f000, + 0x0401fbb9, 0x59900004, 0x81300580, 0x04020018, + 0x4c140000, 0x0201f800, 0x00106b13, 0x0401fba9, + 0x5c002800, 0x59300001, 0x800001c0, 0x04020003, + 0x497a680c, 0x1c01f000, 0x42003000, 0x0000bf2e, + 0x497a6001, 0x58180801, 0x800409c0, 0x04020004, + 0x48003000, 0x48003001, 0x1c01f000, 0x58180800, + 0x48000800, 0x48003000, 0x1c01f000, 0x59300001, + 0x48002801, 0x800001c0, 0x04020002, 0x4816680c, + 0x497a6001, 0x1c01f000, 0x0401fb97, 0x42003000, + 0x0000bf2e, 0x58180001, 0x81300580, 0x0402001c, + 0x59300801, 0x800409c0, 0x0400000e, 0x59300000, + 0x800001c0, 0x04020005, 0x48043001, 0x48043000, + 0x497a6001, 0x1c01f000, 0x59300000, 0x48000800, + 0x48043001, 0x497a6000, 0x497a6001, 0x1c01f000, + 0x59300800, 0x800409c0, 0x04020005, 0x49783001, + 0x49783000, 0x497a680c, 0x1c01f000, 0x48043001, + 0x497a6000, 0x497a680c, 0x1c01f000, 0x58180000, + 0x81300580, 0x0402000c, 0x59300001, 0x800001c0, + 0x04020005, 0x48143000, 0x49782800, 0x497a680c, + 0x1c01f000, 0x48003000, 0x48002800, 0x497a6001, + 0x1c01f000, 0x59300000, 0x800001c0, 0x04020008, + 0x59300001, 0x48001801, 0x800001c0, 0x04020002, + 0x480e680c, 0x497a6001, 0x1c01f000, 0x59300801, + 0x800409c0, 0x04020006, 0x59300800, 0x48042800, + 0x497a6000, 0x497a680c, 0x1c01f000, 0x59300000, + 0x48000800, 0x48042800, 0x497a6000, 0x497a6001, + 0x1c01f000, 0x0401fb73, 0x4df00000, 0x0401f83a, + 0x040208c7, 0x0402094a, 0x04020005, 0x5c03e000, + 0x04000b62, 0x80000580, 0x1c01f000, 0x5c03e000, + 0x04000b5e, 0x82000540, 0x00000001, 0x1c01f000, + 0x4d2c0000, 0x4d340000, 0x4d300000, 0x41783000, + 0x598e6009, 0x813261c0, 0x04000023, 0x59300406, + 0x82000580, 0x00000006, 0x04020004, 0x8d3e7d18, + 0x0402000c, 0x0401f019, 0x82040580, 0x00000005, + 0x04020008, 0x8d3e7d18, 0x04000003, 0x8d3e7d16, + 0x04000004, 0x59300420, 0x8c000500, 0x0402000f, + 0x0401fa49, 0x59300000, 0x4c000000, 0x8d3e7d06, + 0x04000004, 0x0201f800, 0x0010909d, 0x04000005, + 0x0401f869, 0x4c180000, 0x0401f9b7, 0x5c003000, + 0x5c026000, 0x0401f7e0, 0x41303000, 0x59326000, + 0x0401f7dd, 0x5c026000, 0x5c026800, 0x5c025800, + 0x1c01f000, 0x4933c857, 0x4c5c0000, 0x813261c0, + 0x02000800, 0x00100615, 0x41300000, 0x598cb809, + 0x41783000, 0x805cb9c0, 0x04000013, 0x805c0d80, + 0x04000004, 0x405c3000, 0x5818b800, 0x0401f7fa, + 0x0401f84d, 0x598c000d, 0x81300580, 0x02000800, + 0x00106e10, 0x59300403, 0x82000580, 0x00000042, + 0x04020002, 0x497a6007, 0x80000580, 0x5c00b800, + 0x1c01f000, 0x82000540, 0x00000001, 0x5c00b800, + 0x1c01f000, 0x0401fb17, 0x4df00000, 0x4d2c0000, + 0x4d340000, 0x4d300000, 0x41783000, 0x598e6009, + 0x813261c0, 0x0400002e, 0x59300c06, 0x82040580, + 0x00000006, 0x04020004, 0x8d3e7d18, 0x0402000c, + 0x0401f024, 0x82040580, 0x00000005, 0x04020008, + 0x8d3e7d18, 0x04000003, 0x8d3e7d16, 0x04000004, + 0x59300420, 0x8c000500, 0x0402001a, 0x59326809, + 0x59340403, 0x81440580, 0x04020016, 0x8d3e7d00, + 0x04000006, 0x82040580, 0x00000003, 0x04020011, + 0x0401fa23, 0x0402000f, 0x0401f9ef, 0x59300000, + 0x4c000000, 0x8d3e7d06, 0x04000004, 0x0201f800, + 0x0010909d, 0x04000005, 0x0401f80f, 0x4c180000, + 0x0401f95d, 0x5c003000, 0x5c026000, 0x0401f7d5, + 0x41303000, 0x59326000, 0x0401f7d2, 0x5c026000, + 0x5c026800, 0x5c025800, 0x5c03e000, 0x04000ad3, + 0x1c01f000, 0x59300800, 0x497a6000, 0x0401fab6, + 0x801831c0, 0x04020009, 0x598c0008, 0x81300580, + 0x04020004, 0x48031808, 0x48031809, 0x0401f008, + 0x48071809, 0x0401f006, 0x48043000, 0x598c0008, + 0x81300580, 0x04020002, 0x481b1808, 0x0401f2b8, + 0x4d2c0000, 0x4d300000, 0x4d340000, 0x41783000, + 0x598e600b, 0x813261c0, 0x04000013, 0x8d3e7d06, + 0x04000005, 0x59326809, 0x59340200, 0x8c00050e, + 0x0402000a, 0x0401f9b8, 0x59300000, 0x4c000000, + 0x0401f853, 0x4c180000, 0x0401f92b, 0x5c003000, + 0x5c026000, 0x0401f7f0, 0x41303000, 0x59326000, + 0x0401f7ed, 0x0201f800, 0x001045c7, 0x5c026800, + 0x5c026000, 0x5c025800, 0x1c01f000, 0x4933c857, + 0x4c5c0000, 0x813261c0, 0x02000800, 0x00100615, + 0x41300000, 0x598cb80b, 0x41783000, 0x805cb9c0, + 0x0400000f, 0x805c0d80, 0x04000004, 0x405c3000, + 0x5818b800, 0x0401f7fa, 0x0401f835, 0x598c000d, + 0x81300580, 0x02000800, 0x00106e10, 0x497a6007, + 0x80000580, 0x5c00b800, 0x1c01f000, 0x82000540, + 0x00000001, 0x5c00b800, 0x1c01f000, 0x0401fa8d, + 0x4df00000, 0x4d340000, 0x4d300000, 0x4d2c0000, + 0x0201f800, 0x00020267, 0x02020800, 0x00100615, + 0x41783000, 0x598e600b, 0x813261c0, 0x04000014, + 0x59300009, 0x81340580, 0x0402000e, 0x8d3e7d00, + 0x04000003, 0x0401f9aa, 0x0402000a, 0x0401f976, + 0x59300000, 0x4c000000, 0x0401f811, 0x4c180000, + 0x0401f8e9, 0x5c003000, 0x5c026000, 0x0401f7ef, + 0x41303000, 0x59326000, 0x0401f7ec, 0x0201f800, + 0x001045ea, 0x5c025800, 0x5c026000, 0x5c026800, + 0x5c03e000, 0x04000a5d, 0x1c01f000, 0x59300800, + 0x497a6000, 0x0401fa40, 0x801831c0, 0x04020009, + 0x598c000a, 0x81300580, 0x04020004, 0x4803180a, + 0x4803180b, 0x0401f008, 0x4807180b, 0x0401f006, + 0x48043000, 0x598c000a, 0x81300580, 0x04020002, + 0x481b180a, 0x0401f242, 0x0401fa52, 0x4df00000, + 0x4d300000, 0x4c5c0000, 0x4178b800, 0x8d3e7d18, + 0x04000004, 0x8d3e7d16, 0x04020002, 0x805cb800, + 0x598e6005, 0x813261c0, 0x0400001a, 0x59300000, + 0x4c000000, 0x805cb9c0, 0x0402000b, 0x59300c06, + 0x82040580, 0x00000011, 0x04000010, 0x82040580, + 0x00000004, 0x04020004, 0x59300420, 0x8c000500, + 0x0402000a, 0x0201f800, 0x00108f05, 0x02000800, + 0x00107da6, 0x0201f800, 0x001090ec, 0x0201f800, + 0x000208b4, 0x0401fa1e, 0x5c026000, 0x0401f7e6, + 0x497b1805, 0x497b1804, 0x5c00b800, 0x5c026000, + 0x5c03e000, 0x04000a1d, 0x1c01f000, 0x4933c857, + 0x4c5c0000, 0x4c600000, 0x813261c0, 0x02000800, + 0x00100615, 0x41300000, 0x598cb805, 0x405cc000, + 0x805cb9c0, 0x04000025, 0x805c0d80, 0x04000004, + 0x405cc000, 0x5860b800, 0x0401f7fa, 0x598c000d, + 0x81300580, 0x02000800, 0x00106e10, 0x0401f9ee, + 0x598c0005, 0x805c0580, 0x04020009, 0x585c0000, + 0x48031805, 0x4978b800, 0x598c0004, 0x805c0580, + 0x0402000d, 0x497b1804, 0x0401f00b, 0x598c0004, + 0x805c0580, 0x04020005, 0x48631804, 0x4978b800, + 0x4978c000, 0x0401f004, 0x585c0000, 0x4800c000, + 0x4978b800, 0x0401f9ea, 0x80000580, 0x5c00c000, + 0x5c00b800, 0x1c01f000, 0x82000540, 0x00000001, + 0x5c00c000, 0x5c00b800, 0x1c01f000, 0x4933c857, + 0x0401f9f0, 0x4df00000, 0x4d2c0000, 0x4d340000, + 0x4d300000, 0x4c5c0000, 0x4178b800, 0x8d3e7d18, + 0x04000004, 0x8d3e7d16, 0x04020002, 0x805cb800, + 0x41783000, 0x598e6005, 0x813261c0, 0x04000029, + 0x59326809, 0x813669c0, 0x04000023, 0x59340403, + 0x81440580, 0x04020020, 0x805cb9c0, 0x0402000b, + 0x59300c06, 0x82040580, 0x00000011, 0x0400001a, + 0x82040580, 0x00000004, 0x04020004, 0x59300420, + 0x8c000500, 0x04020014, 0x0201f800, 0x00108df4, + 0x04000008, 0x0201f800, 0x00109360, 0x04020005, + 0x59300403, 0x82000580, 0x00000043, 0x0400000a, + 0x0401f8c1, 0x59300000, 0x4c000000, 0x0401f810, + 0x4c180000, 0x0401f834, 0x5c003000, 0x5c026000, + 0x0401f7da, 0x41303000, 0x59326000, 0x0401f7d7, + 0x5c00b800, 0x5c026000, 0x5c026800, 0x5c025800, + 0x5c03e000, 0x040009a9, 0x1c01f000, 0x59300800, + 0x497a6000, 0x0401f98c, 0x801831c0, 0x04020009, + 0x598c0004, 0x81300580, 0x04020004, 0x48031804, + 0x48031805, 0x0401f008, 0x48071805, 0x0401f006, + 0x48043000, 0x598c0004, 0x81300580, 0x04020002, + 0x481b1804, 0x0401f18e, 0x4943c857, 0x0401f99d, + 0x4df00000, 0x0401fe37, 0x0401fed2, 0x5c03e000, + 0x0400098e, 0x1c01f000, 0x4947c857, 0x0401f995, + 0x4df00000, 0x4d3c0000, 0x853e7d00, 0x0401fe7a, + 0x0401ff03, 0x5c027800, 0x5c03e000, 0x04000983, + 0x1c01f000, 0x5c000000, 0x4c000000, 0x4803c857, + 0x4d340000, 0x4d2c0000, 0x59326809, 0x59325808, + 0x59300406, 0x82000c80, 0x00000012, 0x02021800, + 0x00100615, 0x4933c857, 0x4943c857, 0x493fc857, + 0x4803c857, 0x0c01f804, 0x5c025800, 0x5c026800, + 0x1c01f000, 0x00106827, 0x00106829, 0x00106833, + 0x0010684d, 0x00106829, 0x0010683d, 0x00106865, + 0x00106827, 0x00106827, 0x00106878, 0x0010686f, + 0x00106827, 0x00106827, 0x00106827, 0x00106827, + 0x00106827, 0x0010687e, 0x0010687e, 0x0201f800, + 0x00100615, 0x0201f800, 0x00108ef1, 0x02000800, + 0x00101e1b, 0x0201f800, 0x001090ec, 0x0201f800, + 0x00107da6, 0x0201f000, 0x00107698, 0x812e59c0, + 0x02020800, 0x00100615, 0x5930021d, 0x82000580, + 0x00000003, 0x02000800, 0x00108ee7, 0x0201f000, + 0x00107698, 0x0201f800, 0x00108df4, 0x02000000, + 0x00107698, 0x592c1204, 0x82081500, 0x000000ff, + 0x82080580, 0x00000055, 0x02020800, 0x00100615, + 0x49425a06, 0x0201f800, 0x00020381, 0x0201f000, + 0x00107698, 0x59300004, 0x8400055c, 0x48026004, + 0x59300007, 0x8c000500, 0x02020800, 0x00100ee4, + 0x0201f800, 0x00108df4, 0x0400000d, 0x4a025a04, + 0x00000103, 0x49425a06, 0x497a5c09, 0x0201f800, + 0x00108f7d, 0x0201f800, 0x0010a4ae, 0x0201f800, + 0x00020381, 0x0201f800, 0x00108ee7, 0x0201f000, + 0x00107698, 0x59300007, 0x8c000500, 0x02020800, + 0x00100ee4, 0x0201f800, 0x00108df4, 0x02020800, + 0x0010a201, 0x0201f000, 0x00107698, 0x0201f800, + 0x00108df4, 0x04000005, 0x49425a06, 0x497a5c09, + 0x0201f800, 0x00020381, 0x0201f000, 0x00107698, + 0x0201f800, 0x00108df4, 0x02020800, 0x0010639d, + 0x0201f000, 0x00107698, 0x0201f800, 0x00108df4, + 0x04000004, 0x49425a06, 0x0201f800, 0x00020381, + 0x59325817, 0x0201f800, 0x00100843, 0x0201f000, + 0x00107698, 0x598c000d, 0x81300580, 0x04000003, + 0x497a6007, 0x1c01f000, 0x59c40004, 0x82000500, + 0x0000000c, 0x04000005, 0x4a038804, 0x0000000c, + 0x497b2807, 0x0401f00a, 0x0401fadb, 0x59300403, + 0x82000d80, 0x00000040, 0x04000004, 0x82000580, + 0x00000042, 0x04020002, 0x497a6007, 0x0201f800, + 0x00106e10, 0x80000580, 0x1c01f000, 0x59300804, + 0x8c040d20, 0x04020004, 0x82000540, 0x00000001, + 0x1c01f000, 0x4933c857, 0x4d380000, 0x59300804, + 0x84040d20, 0x48066004, 0x42027000, 0x00000049, + 0x59300203, 0x82000580, 0x00000003, 0x04000003, + 0x42027000, 0x00000013, 0x0201f800, 0x000208d8, + 0x80000580, 0x5c027000, 0x1c01f000, 0x59300017, + 0x81480580, 0x04020003, 0x59300018, 0x814c0580, + 0x1c01f000, 0x4d2c0000, 0x4d300000, 0x0401f8c9, + 0x4df00000, 0x0201f800, 0x00105d9b, 0x59900001, + 0x82000500, 0x00000003, 0x0c01f001, 0x001068f1, + 0x001068d1, 0x001068cf, 0x001068cf, 0x0201f800, + 0x00100615, 0x59926004, 0x0401f88e, 0x813261c0, + 0x0400001d, 0x59300004, 0x8c000516, 0x04000004, + 0x59325808, 0x497a5808, 0x497a5809, 0x0401f88e, + 0x59300001, 0x800001c0, 0x0400000e, 0x497a6001, + 0x42003000, 0x0000bf2e, 0x58180801, 0x800409c0, + 0x04020004, 0x48003001, 0x48003000, 0x0401f00a, + 0x58180800, 0x48000800, 0x48003000, 0x0401f006, + 0x59300809, 0x800409c0, 0x02000800, 0x00100615, + 0x4978080c, 0x5c03e000, 0x04000890, 0x5c026000, + 0x5c025800, 0x1c01f000, 0x4d300000, 0x497b2807, + 0x0401f894, 0x4df00000, 0x598c0000, 0x82000500, + 0x00000007, 0x4803c857, 0x0c01f001, 0x00106926, + 0x00106909, 0x00106912, 0x00106916, 0x00106921, + 0x00106926, 0x00106907, 0x00106907, 0x0201f800, + 0x00100615, 0x598c000d, 0x80026540, 0x04000004, + 0x0401f81e, 0x02020800, 0x00100615, 0x0201f800, + 0x00106e10, 0x0401f015, 0x0401f827, 0x0201f800, + 0x00106e10, 0x0401f011, 0x598c000d, 0x80026540, + 0x0400000e, 0x0401f838, 0x04000004, 0x0401f80f, + 0x04000002, 0x0401f81c, 0x0201f800, 0x00106e10, + 0x0401f006, 0x0401f830, 0x02020800, 0x00100615, + 0x0201f800, 0x00106e10, 0x5c03e000, 0x0400085b, + 0x5c026000, 0x1c01f000, 0x598c0009, 0x81300580, + 0x0402000c, 0x0401f84e, 0x0401f83b, 0x59300000, + 0x800001c0, 0x04000004, 0x48031809, 0x497a6000, + 0x0401f003, 0x497b1809, 0x497b1808, 0x80000580, + 0x1c01f000, 0x4d2c0000, 0x59300406, 0x82000580, + 0x00000003, 0x04020012, 0x598c000b, 0x81300580, + 0x0402000f, 0x0401f83a, 0x59325808, 0x497a5808, + 0x497a5809, 0x0401f824, 0x59300000, 0x800001c0, + 0x04000004, 0x4803180b, 0x497a6000, 0x0401f003, + 0x497b180a, 0x497b180b, 0x80000580, 0x5c025800, + 0x1c01f000, 0x598c0005, 0x81300580, 0x0402000c, + 0x0401f827, 0x0401f814, 0x59300000, 0x800001c0, + 0x04000004, 0x48031805, 0x497a6000, 0x0401f003, + 0x497b1805, 0x497b1804, 0x80000580, 0x1c01f000, + 0x4a032001, 0x00000000, 0x497b2004, 0x497b2005, + 0x59900006, 0x82000500, 0x0000ffff, 0x48032006, + 0x1c01f000, 0x4c040000, 0x59300004, 0x82000500, + 0x7ffeffff, 0x48026004, 0x59bc00e4, 0x8c000514, + 0x04000009, 0x42000800, 0x0000bf00, 0x58040012, + 0x81300580, 0x04020004, 0x49780812, 0x4a0378e4, + 0x00000800, 0x5c000800, 0x1c01f000, 0x4803c856, + 0x598c000c, 0x80000540, 0x04000003, 0x80000040, + 0x4803180c, 0x1c01f000, 0x59bc00ea, 0x82000500, + 0x00000007, 0x82000580, 0x00000003, 0x04020004, + 0x4803c856, 0x4a0378e8, 0x00000001, 0x1c01f000, + 0x59bc00ea, 0x82000500, 0x00000007, 0x82000580, + 0x00000001, 0x04020011, 0x4803c856, 0x42000800, + 0x00000000, 0x0401f80e, 0x42000800, 0x00001000, + 0x59bc00ea, 0x82000500, 0x00000007, 0x82000580, + 0x00000003, 0x04000005, 0x80040840, 0x040207f9, + 0x0201f800, 0x00100615, 0x1c01f000, 0x59bc00ea, + 0x82000500, 0x00000007, 0x82000580, 0x00000001, + 0x02020800, 0x00100615, 0x59bc00ea, 0x8c000516, + 0x040207fe, 0x480778e1, 0x1c01f000, 0x59bc00ea, + 0x8c000516, 0x040207fe, 0x480778e1, 0x59bc00ea, + 0x8c000516, 0x040207fe, 0x480b78e1, 0x1c01f000, + 0x4a0378e4, 0x00002000, 0x59a8006f, 0x82000500, + 0x0000000c, 0x04020008, 0x42007000, 0x0010b33f, + 0x58380401, 0x8c000506, 0x04020003, 0x4a0378e4, + 0x00080000, 0x1c01f000, 0x82000d00, 0x80000018, + 0x02020800, 0x0010060d, 0x0201f800, 0x00100615, + 0x001069dc, 0x00106a81, 0x00106a9b, 0x001069dc, + 0x001069de, 0x001069ff, 0x00106a1e, 0x00106a53, + 0x001069dc, 0x00106a7f, 0x001069dc, 0x001069dc, + 0x001069dc, 0x001069dc, 0x001069dc, 0x001069dc, + 0x0201f800, 0x00100615, 0x4d300000, 0x4d900000, + 0x4dd00000, 0x4da40000, 0x4d140000, 0x0201f800, + 0x00106e2f, 0x59bc00ea, 0x8c000510, 0x040007fe, + 0x59be60e0, 0x59300004, 0x8c000520, 0x04000011, + 0x82000500, 0xfffefeff, 0x48026004, 0x4a026203, + 0x00000003, 0x0401ff9b, 0x0201f800, 0x0010101e, + 0x5c022800, 0x5c034800, 0x5c03a000, 0x5c032000, + 0x5c026000, 0x4a0378e4, 0x00000008, 0x0401f787, + 0x84000510, 0x48026004, 0x0401f7f6, 0x4d300000, + 0x4d900000, 0x4dd00000, 0x4da40000, 0x4d140000, + 0x0201f800, 0x00106e2f, 0x59bc00ea, 0x8c000510, + 0x040007fe, 0x59be60e0, 0x59300004, 0x8c000520, + 0x0400000f, 0x82000500, 0xfffefeff, 0x48026004, + 0x0401ff7c, 0x0201f800, 0x0010105c, 0x5c022800, + 0x5c034800, 0x5c03a000, 0x5c032000, 0x5c026000, + 0x4a0378e4, 0x00000008, 0x0401f768, 0x84000510, + 0x48026004, 0x0401f7f6, 0x4d300000, 0x4d2c0000, + 0x4d340000, 0x4da40000, 0x4cd00000, 0x59bc00ea, + 0x8c000510, 0x040007fe, 0x59be60e0, 0x813261c0, + 0x02000800, 0x00100615, 0x59300004, 0x8c000520, + 0x0400001e, 0x82000500, 0xfffefeff, 0x48026004, + 0x59326809, 0x42034800, 0x0010b342, 0x04011000, + 0x4a03c840, 0x0010b349, 0x4a03c842, 0x00000012, + 0x04011000, 0x4a03c840, 0x0010b35b, 0x4a03c842, + 0x000000ff, 0x04011000, 0x4a03c840, 0x0010b45a, + 0x4a03c842, 0x000000ff, 0x0201f800, 0x00106e46, + 0x5c01a000, 0x5c034800, 0x5c026800, 0x5c025800, + 0x5c026000, 0x1c01f000, 0x84000510, 0x48026004, + 0x5c01a000, 0x5c034800, 0x5c026800, 0x5c025800, + 0x5c026000, 0x1c01f000, 0x1c01f000, 0x4d300000, + 0x4d2c0000, 0x4d340000, 0x4cd00000, 0x4d900000, + 0x4dd00000, 0x4da40000, 0x4d140000, 0x0401fbd4, + 0x59bc00ea, 0x8c000510, 0x040007fe, 0x59be60e0, + 0x813261c0, 0x02000800, 0x00100615, 0x59300004, + 0x8c000520, 0x0400000f, 0x82000500, 0xfffefeff, + 0x48026004, 0x0201f800, 0x001075b9, 0x5c022800, + 0x5c034800, 0x5c03a000, 0x5c032000, 0x5c01a000, + 0x5c026800, 0x5c025800, 0x5c026000, 0x1c01f000, + 0x84000510, 0x48026004, 0x5c022800, 0x5c034800, + 0x5c03a000, 0x5c032000, 0x5c01a000, 0x5c026800, + 0x5c025800, 0x5c026000, 0x1c01f000, 0x0201f800, + 0x00100615, 0x4d300000, 0x4d380000, 0x42000000, + 0x0010b6c3, 0x0201f800, 0x0010a86e, 0x0401ff05, + 0x598e600d, 0x59c40004, 0x8c000506, 0x04000004, + 0x0401f8e5, 0x4a038804, 0x00000008, 0x813261c0, + 0x04000006, 0x0401fb98, 0x42027000, 0x00000014, + 0x0201f800, 0x000208d8, 0x4a0378e4, 0x00000002, + 0x5c027000, 0x5c026000, 0x0401f6e8, 0x4d180000, + 0x4d300000, 0x4d380000, 0x4d900000, 0x4dd00000, + 0x4da40000, 0x4d140000, 0x0401feea, 0x417a3000, + 0x59c40804, 0x83180400, 0x00106df6, 0x50000000, + 0x80040500, 0x0400001b, 0x42000000, 0x0010b6c4, + 0x0201f800, 0x0010a86e, 0x0401fb81, 0x59926004, + 0x0401f863, 0x83180400, 0x00106df6, 0x50000000, + 0x48038804, 0x813261c0, 0x0400000a, 0x59300004, + 0x8c00050c, 0x04020003, 0x4a026203, 0x00000003, + 0x42027000, 0x0000004a, 0x0201f800, 0x000208d8, + 0x59c40004, 0x82000500, 0x00f80000, 0x04000005, + 0x811a3000, 0x83180480, 0x00000005, 0x040017dd, + 0x4a0378e4, 0x00000008, 0x5c022800, 0x5c034800, + 0x5c03a000, 0x5c032000, 0x5c027000, 0x5c026000, + 0x5c023000, 0x0401f6b1, 0x4d2c0000, 0x4d340000, + 0x59326809, 0x598c0800, 0x82040580, 0x00000004, + 0x04020006, 0x838c1400, 0x00000005, 0x838c1c00, + 0x00000004, 0x0401f010, 0x82040580, 0x00000001, + 0x04020006, 0x838c1400, 0x00000009, 0x838c1c00, + 0x00000008, 0x0401f008, 0x82040580, 0x00000002, + 0x04020028, 0x838c1400, 0x0000000b, 0x838c1c00, + 0x0000000a, 0x41306800, 0x58340000, 0x80007d40, + 0x04000020, 0x583c0009, 0x81340580, 0x04020006, + 0x403c6800, 0x583c0000, 0x80007d40, 0x040207fa, + 0x0401f018, 0x4933c857, 0x483fc857, 0x583c0000, + 0x48006800, 0x49307800, 0x443c1000, 0x500c0000, + 0x803c0580, 0x04020002, 0x44341800, 0x80000580, + 0x4803180d, 0x4803180f, 0x598c0000, 0x82000580, + 0x00000003, 0x04000003, 0x4a031800, 0x00000000, + 0x80000580, 0x5c026800, 0x5c025800, 0x1c01f000, + 0x82000540, 0x00000001, 0x0401f7fb, 0x491bc857, + 0x59c80840, 0x82040540, 0x00000010, 0x48039040, + 0x59c41008, 0x82080500, 0xffffff7f, 0x48038808, + 0x4c040000, 0x4c080000, 0x0401fac2, 0x04020007, + 0x0401fac6, 0x04000022, 0x48038804, 0x0201f800, + 0x001010ca, 0x0401f042, 0x4a038803, 0x00000008, + 0x59c40003, 0x82000500, 0x00000003, 0x040007fd, + 0x8c000502, 0x04020007, 0x0401fab8, 0x04000014, + 0x48038804, 0x0201f800, 0x001010ca, 0x0401f034, + 0x59c80040, 0x8400056a, 0x48039040, 0x59c80040, + 0x8c00052a, 0x040207fe, 0x59c40005, 0x82000500, + 0xc0000000, 0x04000006, 0x59c400a3, 0x84000540, + 0x480388a3, 0x4a038805, 0xc0000000, 0x0201f800, + 0x0010106b, 0x4a03a005, 0x30000000, 0x59d00006, + 0x4a03a005, 0x30000000, 0x59900006, 0x82000500, + 0xffff0000, 0x48032006, 0x59d00005, 0x8c000504, + 0x040207fe, 0x42000800, 0x00007600, 0x83180540, + 0x60000000, 0x480008a1, 0x811800dc, 0x59c80840, + 0x80040540, 0x48039040, 0x82000540, 0x00003000, + 0x48039040, 0x59c80040, 0x82000500, 0x00003000, + 0x040207fd, 0x0201f800, 0x001010b8, 0x83180400, + 0x00106df6, 0x50000000, 0x48038804, 0x80000580, + 0x4df00000, 0x0201f800, 0x00105d9b, 0x5c03e000, + 0x5c001000, 0x5c000800, 0x480b8808, 0x48079040, + 0x1c01f000, 0x4803c856, 0x59c80840, 0x82040540, + 0x00000010, 0x48039040, 0x59c41008, 0x82080500, + 0xffffff7f, 0x48038808, 0x4c040000, 0x4c080000, + 0x59c40004, 0x82000500, 0x00000003, 0x04020010, + 0x59c40004, 0x82000500, 0x0000000c, 0x04000005, + 0x4a038804, 0x0000000c, 0x8c000504, 0x0401f025, + 0x59c80040, 0x8400056e, 0x48039040, 0x59c80040, + 0x8c00052e, 0x040207fe, 0x0401f01e, 0x4a038803, + 0x00000008, 0x59c40003, 0x82000500, 0x00000003, + 0x040007fd, 0x8c000502, 0x04020006, 0x59c40004, + 0x4a038804, 0x0000000c, 0x8c000504, 0x0401f011, + 0x59c80040, 0x8400056a, 0x48039040, 0x59c80040, + 0x8c00052a, 0x040207fe, 0x59c40005, 0x82000500, + 0xc0000000, 0x04000007, 0x59c400a3, 0x84000540, + 0x480388a3, 0x4a038805, 0xc0000000, 0x80000580, + 0x497b2807, 0x5c001000, 0x5c000800, 0x480b8808, + 0x48079040, 0x1c01f000, 0x5c000000, 0x4c000000, + 0x4803c857, 0x491bc857, 0x4933c857, 0x4d900000, + 0x4dd00000, 0x4da40000, 0x4d140000, 0x0401fdd1, + 0x4df00000, 0x0401fa72, 0x59900004, 0x800001c0, + 0x04000011, 0x81300580, 0x0402000f, 0x59300004, + 0x84000520, 0x48026004, 0x0401ff4d, 0x04020009, + 0x5c03e000, 0x04000db9, 0x80000580, 0x5c022800, + 0x5c034800, 0x5c03a000, 0x5c032000, 0x1c01f000, + 0x0401fcf1, 0x42027000, 0x00000049, 0x59300004, + 0x84000520, 0x48026004, 0x8c00050c, 0x02020800, + 0x000208d8, 0x5c03e000, 0x04000da8, 0x82000540, + 0x00000001, 0x5c022800, 0x5c034800, 0x5c03a000, + 0x5c032000, 0x1c01f000, 0x4933c857, 0x0401fda9, + 0x4df00000, 0x598c000d, 0x80026540, 0x04000012, + 0x59300004, 0x84000520, 0x48026004, 0x0401ff86, + 0x04000017, 0x0401fd09, 0x42027000, 0x00000013, + 0x59300004, 0x8c00050c, 0x02020800, 0x000208d8, + 0x5c03e000, 0x04000d8d, 0x82000540, 0x00000001, + 0x1c01f000, 0x836c1580, 0x00000001, 0x040007f9, + 0x836c1580, 0x00000004, 0x040007f6, 0x42001000, + 0x00103f62, 0x0201f800, 0x00105cc9, 0x5c03e000, + 0x04000d7e, 0x80000580, 0x1c01f000, 0x4d300000, + 0x4d180000, 0x4d3c0000, 0x0401fd82, 0x4df00000, + 0x4a0378e4, 0x0000000f, 0x0401fa02, 0x417a3000, + 0x59926004, 0x813261c0, 0x04000010, 0x417a7800, + 0x0201f800, 0x00104728, 0x0400000a, 0x59300c06, + 0x82040580, 0x00000003, 0x04000004, 0x82040580, + 0x00000006, 0x04020003, 0x42027800, 0x00000002, + 0x0201f800, 0x00108997, 0x811a3000, 0x83180480, + 0x00000005, 0x040017eb, 0x42000800, 0x00000040, + 0x0201f800, 0x00101395, 0x4a0378e4, 0x0000000a, + 0x5c03e000, 0x04000d55, 0x5c027800, 0x5c023000, + 0x5c026000, 0x1c01f000, 0x4803c856, 0x4d300000, + 0x0401fd58, 0x4df00000, 0x59c80840, 0x82040540, + 0x00000010, 0x48039040, 0x59c41008, 0x82080500, + 0xffffff7f, 0x48038808, 0x4c040000, 0x4c080000, + 0x42001000, 0x00000003, 0x0401f9c5, 0x598e600d, + 0x813261c0, 0x04020f9d, 0x040009ca, 0x497b2807, + 0x0401f80a, 0x5c001000, 0x5c000800, 0x480b8808, + 0x84040d74, 0x48079040, 0x5c03e000, 0x04000d33, + 0x5c026000, 0x1c01f000, 0x4d380000, 0x4d180000, + 0x4d300000, 0x4d900000, 0x4dd00000, 0x4da40000, + 0x4d140000, 0x59c41004, 0x480bc857, 0x82080500, + 0x00003ff0, 0x04000025, 0x417a3000, 0x4c080000, + 0x0201f800, 0x00105d9b, 0x5c001000, 0x82080500, + 0x00000210, 0x04020004, 0x811a3000, 0x80081102, + 0x0401f7f7, 0x0401f9c6, 0x59926004, 0x4933c857, + 0x813261c0, 0x04020005, 0x59c400a3, 0x8c00051a, + 0x02000800, 0x00100615, 0x0401fea1, 0x04000009, + 0x0401fc4d, 0x42027000, 0x00000049, 0x59300004, + 0x8c00050c, 0x02020800, 0x000208d8, 0x0401f007, + 0x42027000, 0x0000004a, 0x4a026203, 0x00000003, + 0x0201f800, 0x000208d8, 0x5c022800, 0x5c034800, + 0x5c03a000, 0x5c032000, 0x5c026000, 0x5c023000, + 0x5c027000, 0x1c01f000, 0x4d300000, 0x4d180000, + 0x4d900000, 0x0401fcff, 0x42001000, 0x00000000, + 0x598c0000, 0x82000580, 0x00000005, 0x04000974, + 0x417a3000, 0x811b20c8, 0x83932400, 0x0000bf32, + 0x59900001, 0x82000580, 0x00000001, 0x0402000d, + 0x42000800, 0x000007d0, 0x59926004, 0x59300011, + 0x82000500, 0xfff00000, 0x80000540, 0x04000003, + 0x42000800, 0x00001b58, 0x0201f800, 0x00105d8d, + 0x811a3000, 0x83180480, 0x00000005, 0x040017ea, + 0x59c81040, 0x84081534, 0x480b9040, 0x0401fcd3, + 0x5c032000, 0x5c023000, 0x5c026000, 0x1c01f000, + 0x4933c857, 0x4d900000, 0x4dd00000, 0x4da40000, + 0x4d140000, 0x4d380000, 0x0401fcd2, 0x4df00000, + 0x59300004, 0x8c00053e, 0x04020007, 0x8c000520, + 0x04000026, 0x0201f800, 0x001068a3, 0x04000023, + 0x0401f02b, 0x598c000d, 0x81300580, 0x04000012, + 0x0201f800, 0x00108a8a, 0x04020025, 0x0401f91b, + 0x04000023, 0x48038804, 0x0401f961, 0x0201f800, + 0x001010ca, 0x0201f800, 0x001068c1, 0x42027000, + 0x00000049, 0x59300004, 0x8c00050c, 0x0402000d, + 0x0401f00e, 0x59c40004, 0x8c000504, 0x04000014, + 0x4a038804, 0x00000004, 0x0401fc18, 0x42027000, + 0x00000013, 0x59300004, 0x8c00050c, 0x04000003, + 0x0201f800, 0x000208d8, 0x5c03e000, 0x04000c9b, + 0x5c027000, 0x5c022800, 0x5c034800, 0x5c03a000, + 0x5c032000, 0x80000580, 0x1c01f000, 0x5c03e000, + 0x04000c92, 0x5c027000, 0x5c022800, 0x5c034800, + 0x5c03a000, 0x5c032000, 0x82000540, 0x00000001, + 0x1c01f000, 0x497b2807, 0x0401fc92, 0x59c400af, + 0x800001c0, 0x04020004, 0x0401fc84, 0x0201f000, + 0x00101565, 0x598c000f, 0x82001480, 0x00000002, + 0x04021007, 0x80000000, 0x4803180f, 0x80000580, + 0x0201f800, 0x00105d86, 0x0400000e, 0x0401fed7, + 0x0402000c, 0x0401fdc5, 0x0400000a, 0x0201f800, + 0x0010a7ee, 0x0401f918, 0x4d380000, 0x42027000, + 0x00000014, 0x0201f800, 0x000208d8, 0x5c027000, + 0x0401fc6a, 0x0201f000, 0x00101565, 0x4d900000, + 0x4dd00000, 0x4da40000, 0x4d140000, 0x4d300000, + 0x0201f800, 0x00105d9b, 0x0401fc6a, 0x59c400af, + 0x800001c0, 0x04000027, 0x0401f909, 0x59926004, + 0x4933c857, 0x59300004, 0x8c000516, 0x0400000b, + 0x0401fe86, 0x0402001f, 0x0201f800, 0x001068c1, + 0x0401fc52, 0x42000800, 0x80000804, 0x0201f800, + 0x00106466, 0x0401f017, 0x42001800, 0x00007530, + 0x0401f8c3, 0x04020004, 0x0201f800, 0x00105d8b, + 0x0401f010, 0x0401fe75, 0x0402000e, 0x0201f800, + 0x0010a7ee, 0x59300004, 0x8c00050c, 0x04020003, + 0x4a026203, 0x00000003, 0x4d380000, 0x42027000, + 0x0000004a, 0x0201f800, 0x000208d8, 0x5c027000, + 0x0401fc36, 0x5c026000, 0x5c022800, 0x5c034800, + 0x5c03a000, 0x5c032000, 0x0201f000, 0x00101565, + 0x4d900000, 0x4dd00000, 0x4da40000, 0x4d140000, + 0x4d300000, 0x4d2c0000, 0x0401fc32, 0x0401f8d4, + 0x59926004, 0x4933c857, 0x0401f882, 0x04000016, + 0x0201f800, 0x00105d9b, 0x813261c0, 0x04000034, + 0x59325808, 0x812e59c0, 0x02000800, 0x00100615, + 0x0201f800, 0x00104e0d, 0x0402001d, 0x592c0208, + 0x84000550, 0x48025a08, 0x0201f800, 0x00104f29, + 0x04020027, 0x592c0208, 0x84000510, 0x48025a08, + 0x0401f023, 0x0201f800, 0x00105d8b, 0x0401f020, + 0x0201f800, 0x0010a7ee, 0x0401fd99, 0x592c0208, + 0x84000550, 0x48025a08, 0x4d380000, 0x42027000, + 0x0000004a, 0x4a026203, 0x00000003, 0x0201f800, + 0x000208d8, 0x5c027000, 0x0401f011, 0x59900006, + 0x82000500, 0xffff0000, 0x040207ee, 0x59c408af, + 0x82040480, 0x000003e8, 0x040217ea, 0x59900006, + 0x82000400, 0x00010000, 0x48032006, 0x0201f800, + 0x00105d8b, 0x0201f800, 0x00103f37, 0x5c025800, + 0x5c026000, 0x5c022800, 0x5c034800, 0x5c03a000, + 0x5c032000, 0x0201f000, 0x00106982, 0x4d300000, + 0x4d2c0000, 0x0201f800, 0x0010698c, 0x598e600d, + 0x4933c857, 0x59c41004, 0x8c081500, 0x04000007, + 0x0201f800, 0x00104e0d, 0x04020007, 0x0201f800, + 0x00104f29, 0x0402002f, 0x0201f800, 0x00105d86, + 0x0401f02c, 0x598c000f, 0x80000540, 0x04020011, + 0x59c408af, 0x82040480, 0x000003e8, 0x0402100d, + 0x598c080f, 0x80040800, 0x4807180f, 0x0201f800, + 0x00105d86, 0x42000000, 0x0010b650, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00103f37, 0x0401f019, + 0x0401fdad, 0x813261c0, 0x04020003, 0x0401f849, + 0x0401f014, 0x0201f800, 0x0010a7ee, 0x59300406, + 0x82000580, 0x00000003, 0x04020007, 0x59325808, + 0x812e59c0, 0x04000004, 0x592c0208, 0x84000550, + 0x48025a08, 0x0401f854, 0x4d380000, 0x42027000, + 0x00000014, 0x0201f800, 0x000208d8, 0x5c027000, + 0x5c025800, 0x5c026000, 0x0201f000, 0x00106982, + 0x59c40804, 0x83180400, 0x00106dec, 0x50000000, + 0x80040500, 0x1c01f000, 0x59c40804, 0x83180400, + 0x00106df1, 0x50000000, 0x80040500, 0x1c01f000, + 0x00000210, 0x00000420, 0x00000840, 0x00001080, + 0x00002100, 0x00004000, 0x00008000, 0x00010000, + 0x00020000, 0x00040000, 0x00080000, 0x00100000, + 0x00200000, 0x00400000, 0x00800000, 0x59900806, + 0x80040120, 0x800c0480, 0x04021004, 0x82000540, + 0x00000001, 0x0401f005, 0x82040c00, 0x00010000, + 0x48072006, 0x80000580, 0x1c01f000, 0x480bc857, + 0x0201f800, 0x0010698c, 0x4df00000, 0x480b1800, + 0x5c03e000, 0x02000800, 0x00106982, 0x1c01f000, + 0x4803c856, 0x0201f800, 0x0010698c, 0x4df00000, + 0x497b180d, 0x497b1803, 0x497b180e, 0x497b180f, + 0x497b1810, 0x598c0000, 0x82000580, 0x00000003, + 0x04000009, 0x836c0580, 0x00000002, 0x04020004, + 0x4a031800, 0x00000005, 0x0401f003, 0x4a031800, + 0x00000000, 0x5c03e000, 0x02000800, 0x00106982, + 0x1c01f000, 0x59300004, 0x8c00050c, 0x04020003, + 0x4a026203, 0x00000001, 0x1c01f000, 0x83180480, + 0x00000005, 0x02021800, 0x00100615, 0x491bc857, + 0x811b20c8, 0x83932400, 0x0000bf32, 0x811ba0ca, + 0x83d3a400, 0x00007600, 0x83180400, 0x00106e41, + 0x50034800, 0x811a28c2, 0x83162c00, 0x00006100, + 0x1c01f000, 0x0010b559, 0x0010b570, 0x0010b587, + 0x0010b59e, 0x0010b5b5, 0x4933c857, 0x59300406, + 0x82000c80, 0x00000012, 0x04021016, 0x4803c857, + 0x04011000, 0x0c01f001, 0x00106e60, 0x00106f03, + 0x00107249, 0x001072cf, 0x00106f03, 0x00107249, + 0x001072cf, 0x00106e60, 0x00106f03, 0x00106e60, + 0x00106e60, 0x00106e60, 0x00106e60, 0x00106e60, + 0x00106e60, 0x00106e60, 0x00106e66, 0x00106e66, + 0x0201f800, 0x0010698c, 0x0201f800, 0x001068f6, + 0x0201f000, 0x00106982, 0x42001000, 0x0010b5f4, + 0x50081000, 0x4930100c, 0x58080002, 0x82000580, + 0x00000100, 0x0402003e, 0x59325808, 0x812e59c0, + 0x02000800, 0x00100615, 0x59326809, 0x813669c0, + 0x04000025, 0x592c040b, 0x82000500, 0x0000e000, + 0x04000003, 0x0401fbc9, 0x0401f002, 0x0401fbb9, + 0x592c000d, 0x82000500, 0x00000003, 0x04000007, + 0x82000580, 0x00000003, 0x80000000, 0x58d00802, + 0x80040540, 0x4801a002, 0x42001000, 0x0010b5f4, + 0x50081000, 0x4930100b, 0x492c100a, 0x82d00400, + 0x00000006, 0x48001003, 0x592c000d, 0x82000400, + 0x00000003, 0x80000104, 0x48001004, 0x592c000e, + 0x48001007, 0x592c000f, 0x48001008, 0x0201f000, + 0x001008a1, 0x42026800, 0x0010bc0c, 0x592c080a, + 0x48066802, 0x82040500, 0x00ffff00, 0x04000007, + 0x497a6a12, 0x59a81010, 0x82081500, 0x00ffff00, + 0x80080580, 0x040207d0, 0x82040d00, 0x000000ff, + 0x800408d0, 0x48066a12, 0x0401f7cb, 0x1c01f000, + 0x4d2c0000, 0x4d300000, 0x4c580000, 0x4c540000, + 0x4c500000, 0x5832580a, 0x812e59c0, 0x02000800, + 0x00100615, 0x58300002, 0x4a006002, 0x00000100, + 0x82000580, 0x00000100, 0x04020020, 0x5830000b, + 0x5832600c, 0x81300580, 0x04020012, 0x0401f82f, + 0x04020014, 0x592c080d, 0x82040c00, 0x00000003, + 0x80040904, 0x4004b000, 0x4200a000, 0x0010b349, + 0x4050a800, 0x0201f800, 0x0010a94f, 0x42001000, + 0x0000dc00, 0x0201f800, 0x0010763b, 0x0401f005, + 0x4803c857, 0x4933c857, 0x0401f81c, 0x04000f93, + 0x5c00a000, 0x5c00a800, 0x5c00b000, 0x5c026000, + 0x5c025800, 0x1c01f000, 0x5830000b, 0x5832600c, + 0x4803c857, 0x4933c857, 0x81300580, 0x040207f1, + 0x0401f80e, 0x040207f3, 0x4803c857, 0x0201f800, + 0x00106619, 0x02020800, 0x00100615, 0x4a025a06, + 0x00000002, 0x0201f800, 0x00020381, 0x0201f800, + 0x00107698, 0x0401f7e7, 0x0201f800, 0x0010698c, + 0x4df00000, 0x598c000d, 0x81300580, 0x04020009, + 0x598c0005, 0x81300580, 0x04020006, 0x5c03e000, + 0x02000800, 0x00106982, 0x80000580, 0x1c01f000, + 0x4803c857, 0x5c03e000, 0x02000800, 0x00106982, + 0x82000540, 0x00000001, 0x1c01f000, 0x59300403, + 0x82000c80, 0x00000056, 0x02021800, 0x00100615, + 0x4803c857, 0x0c01f001, 0x0010707a, 0x00107095, + 0x001070a6, 0x001071a9, 0x00107169, 0x0010716d, + 0x0010717e, 0x00107192, 0x00107187, 0x00107192, + 0x001071cd, 0x00107192, 0x0010720f, 0x00107192, + 0x0010721d, 0x00107192, 0x00107187, 0x00107192, + 0x00107221, 0x00106f60, 0x00106f60, 0x00106f60, + 0x00106f60, 0x00106f60, 0x00106f60, 0x00106f60, + 0x00106f60, 0x00106f60, 0x00106f60, 0x00106f60, + 0x001072ed, 0x0010730c, 0x00107316, 0x00106f60, + 0x0010732c, 0x0010717e, 0x00106f60, 0x0010717e, + 0x00107192, 0x00106f60, 0x001070a6, 0x001071a9, + 0x00106f60, 0x0010737c, 0x00107192, 0x00106f60, + 0x0010738c, 0x00107192, 0x00106f60, 0x00107187, + 0x0010706b, 0x00106f62, 0x00106f60, 0x001073a3, + 0x001073dc, 0x00107456, 0x00106f60, 0x00107466, + 0x0010717c, 0x00107459, 0x00106f60, 0x00107338, + 0x0010747f, 0x00106f60, 0x001074b4, 0x00107507, + 0x00106f60, 0x00106f77, 0x00106fdd, 0x00106fea, + 0x00106f60, 0x0010717e, 0x00106f60, 0x00107031, + 0x0010703c, 0x00106f60, 0x00106f60, 0x00106f8b, + 0x00106fb0, 0x00107546, 0x00107587, 0x001075ad, + 0x00106f60, 0x00106f60, 0x00106f60, 0x0010757b, + 0x0201f800, 0x00100615, 0x0401fad2, 0x59325808, + 0x592c0009, 0x4801a006, 0x592c000a, 0x4801a007, + 0x592c000b, 0x4801a008, 0x592c000c, 0x4801a009, + 0x592c000d, 0x4801a00a, 0x4979a00b, 0x592c0809, + 0x82040d00, 0x00000fff, 0x80040904, 0x42001000, + 0x0000dc00, 0x0201f000, 0x0010763b, 0x4a026202, + 0x0000ffff, 0x0401fabb, 0x4d2c0000, 0x4a01a006, + 0x05000000, 0x59325808, 0x592c0009, 0x4801a007, + 0x592c000a, 0x4801a008, 0x592c000b, 0x4801a009, + 0x42000800, 0x00000004, 0x42001000, 0x0000dc00, + 0x5c025800, 0x0201f000, 0x0010763b, 0x4c580000, + 0x4c500000, 0x4c540000, 0x4d2c0000, 0x0401faa5, + 0x59325808, 0x5930040b, 0x800000c2, 0x4200a800, + 0x0010b349, 0x592cb205, 0x832ca400, 0x00000006, + 0x0201f800, 0x0010a93e, 0x40580000, 0x8054ac00, + 0x592c0001, 0x80000540, 0x04000003, 0x40025800, + 0x0401f7f5, 0x4200a000, 0x0010b349, 0x4050a800, + 0x5930b40b, 0x0201f800, 0x0010a94f, 0x59300c0b, + 0x42001000, 0x0000dc00, 0x5c025800, 0x5c00a800, + 0x5c00b000, 0x5c00a000, 0x0201f000, 0x0010763b, + 0x4c580000, 0x4c500000, 0x4c540000, 0x4d2c0000, + 0x42034800, 0x0010b342, 0x0401fa8c, 0x59325808, + 0x592c0802, 0x4807c857, 0x40041000, 0x80040904, + 0x82081500, 0x00000003, 0x04000008, 0x80040800, + 0x82081580, 0x00000003, 0x80081000, 0x58d00002, + 0x80080540, 0x4801a002, 0x4a025805, 0x02000000, + 0x82d0ac00, 0x00000006, 0x592cb011, 0x832ca400, + 0x00000005, 0x0201f800, 0x0010a93e, 0x40580000, + 0x8054ac00, 0x592e5801, 0x41780000, 0x812e5d40, + 0x040207f6, 0x42001000, 0x0000dc00, 0x5c025800, + 0x5c00a800, 0x5c00b000, 0x5c00a000, 0x0201f000, + 0x0010763b, 0x0401fa57, 0x4a01a006, 0x78000000, + 0x5930001c, 0x840001c0, 0x4801a407, 0x4979a207, + 0x42000800, 0x00000002, 0x42001000, 0x0000dc00, + 0x0201f000, 0x0010763b, 0x4c580000, 0x4c540000, + 0x4c500000, 0x0401fa55, 0x4a01a006, 0x02000000, + 0x59a80002, 0x4801a008, 0x59a80003, 0x4801a009, + 0x59a80000, 0x4801a00a, 0x59a80001, 0x4801a00b, + 0x5930001c, 0x82000d80, 0x0000e000, 0x04000016, + 0x82000d80, 0x0000df00, 0x04000006, 0x4a01a407, + 0x00000010, 0x42000800, 0x00000006, 0x0401f027, + 0x4a03c840, 0x0010b2e7, 0x4a03c842, 0x0000000d, + 0x42001800, 0x0010b2e7, 0x0201f800, 0x001007f5, + 0x42000000, 0x0000df00, 0x4200a000, 0x0010b2e7, + 0x0401f00d, 0x4a03c840, 0x0010b2f4, 0x4a03c842, + 0x0000000d, 0x42001800, 0x0010b2f4, 0x0201f800, + 0x001007f5, 0x42000000, 0x0000e000, 0x4200a000, + 0x0010b2f4, 0x82000540, 0x00000010, 0x4801a407, + 0x4a01a207, 0x00000034, 0x4200b000, 0x0000000d, + 0x82d0ac00, 0x0000000c, 0x0201f800, 0x0010a93e, + 0x42000800, 0x00000013, 0x42001000, 0x0000dc00, + 0x5c00a000, 0x5c00a800, 0x5c00b000, 0x0201f000, + 0x0010763b, 0x0401fa03, 0x4a01a006, 0x63000028, + 0x5930001c, 0x4801a007, 0x42000800, 0x00000002, + 0x42001000, 0x0000dc00, 0x0201f000, 0x0010763b, + 0x0401fa06, 0x41780000, 0x41780800, 0x42002000, + 0x00080000, 0x0c01f81b, 0x80000000, 0x80040800, + 0x42001000, 0x0000000c, 0x59841802, 0x8c0c1d00, + 0x04020008, 0x42002000, 0x00050000, 0x0c01f811, + 0x80000000, 0x80040800, 0x82081400, 0x00000004, + 0x82080540, 0x02000000, 0x4801a006, 0x800408e0, + 0x5930001c, 0x80040540, 0x4801a007, 0x80080904, + 0x42001000, 0x0000dc00, 0x0201f000, 0x0010763b, + 0x00107061, 0x00107063, 0x00107065, 0x00107067, + 0x00107069, 0x4811a008, 0x1c01f000, 0x4811a009, + 0x1c01f000, 0x4811a00a, 0x1c01f000, 0x4811a00b, + 0x1c01f000, 0x4811a00c, 0x1c01f000, 0x4a026009, + 0x0010bc0c, 0x59a80010, 0x82000500, 0x000000ff, + 0x800000d0, 0x42026800, 0x0010bc0c, 0x48026a12, + 0x0401fa3c, 0x41780800, 0x42001000, 0x00005c00, + 0x0201f000, 0x0010763b, 0x0401f9ba, 0x4a01a006, + 0x52000000, 0x4979a007, 0x599c0017, 0x8c000500, + 0x04000005, 0x599c0402, 0x0201f800, 0x00101644, + 0x4805a007, 0x59a80002, 0x4801a008, 0x59a80003, + 0x4801a009, 0x59a80000, 0x4801a00a, 0x59a80001, + 0x4801a00b, 0x59a80010, 0x4801a00c, 0x42000800, + 0x00000007, 0x42001000, 0x0000dc00, 0x0201f000, + 0x0010763b, 0x4a026202, 0x0000ffff, 0x0401f99d, + 0x4a01a006, 0x05000000, 0x59a80010, 0x4801a007, + 0x59a80002, 0x59a80803, 0x4801a008, 0x4805a009, + 0x42000800, 0x00000004, 0x42001000, 0x0000dc00, + 0x0201f000, 0x0010763b, 0x4a026202, 0x0000ffff, + 0x0401f98c, 0x4d3c0000, 0x417a7800, 0x0201f800, + 0x00104745, 0x5c027800, 0x4a01a006, 0x03000000, + 0x59340403, 0x82000580, 0x000007fe, 0x0402006e, + 0x4a01a006, 0x04000000, 0x81a40800, 0x4a000800, + 0x22fffffe, 0x5934000a, 0x84000500, 0x4802680a, + 0x59c41002, 0x8408150c, 0x480b8802, 0x59a80026, + 0x8c000508, 0x04000010, 0x59a8002a, 0x4801a007, + 0x59a8002b, 0x82000500, 0xffff2000, 0x599c0818, + 0x8c040d16, 0x04000002, 0x8400056a, 0x4801a008, + 0x4a01a009, 0x00002710, 0x59a8002d, 0x4801a00a, + 0x0401f039, 0x59a8002a, 0x4801a007, 0x0201f800, + 0x00104e0d, 0x04020009, 0x497b8880, 0x82000500, + 0x0000ffff, 0x4c000000, 0x0201f800, 0x00101670, + 0x5c000000, 0x48038880, 0x59a8002b, 0x0201f800, + 0x00104e0d, 0x04020004, 0x82000500, 0x37ffffff, + 0x0401f003, 0x82000500, 0x3fffffff, 0x599c0818, + 0x8c040d16, 0x04000002, 0x8400056a, 0x59a80805, + 0x8c040d10, 0x04000019, 0x59300c03, 0x82041580, + 0x00000051, 0x04000015, 0x82041580, 0x00000031, + 0x04000012, 0x4c580000, 0x4c500000, 0x4c540000, + 0x4200b000, 0x00000004, 0x4200a000, 0x0010b6f9, + 0x82d0ac00, 0x0000001f, 0x4c000000, 0x0201f800, + 0x0010a93e, 0x5c000000, 0x5c00a800, 0x5c00a000, + 0x5c00b000, 0x8400057a, 0x4801a008, 0x4979a009, + 0x4979a00a, 0x59a80002, 0x59a80803, 0x4801a00b, + 0x4805a00c, 0x59a80000, 0x59a80801, 0x4801a00d, + 0x4805a00e, 0x4979a00f, 0x4979a010, 0x4979a011, + 0x4979a012, 0x4979a013, 0x4979a014, 0x4979a015, + 0x4979a016, 0x59a8002e, 0x84000576, 0x4801a017, + 0x59a8002f, 0x4801a018, 0x4979a019, 0x4979a01a, + 0x0401f043, 0x59a80026, 0x8c000508, 0x0400000d, + 0x59a8002a, 0x82000500, 0x0000ffff, 0x59c40880, + 0x80040d80, 0x04000007, 0x497b8880, 0x4c000000, + 0x0201f800, 0x00101670, 0x5c000000, 0x48038880, + 0x59a8002a, 0x4801a007, 0x4c640000, 0x4d2c0000, + 0x59a8c82b, 0x0201f800, 0x00108df4, 0x0400000d, + 0x0201f800, 0x00109360, 0x0402000a, 0x592c0207, + 0x8c00050e, 0x04000007, 0x8264cd00, 0x0000ffff, + 0x592c0009, 0x82000500, 0xffff0000, 0x8064cd40, + 0x4865a008, 0x5c025800, 0x5c00c800, 0x59a8002c, + 0x4801a009, 0x59a8002d, 0x4801a00a, 0x59a80002, + 0x59a80803, 0x4801a00b, 0x4805a00c, 0x59a80000, + 0x59a80801, 0x4801a00d, 0x4805a00e, 0x4979a00f, + 0x4979a010, 0x4979a011, 0x4979a012, 0x4979a013, + 0x4979a014, 0x4979a015, 0x4979a016, 0x59a8002e, + 0x4801a017, 0x59a8002f, 0x4801a018, 0x59a80030, + 0x4801a019, 0x59a80031, 0x4801a01a, 0x42000800, + 0x0000001d, 0x42001000, 0x0000dc00, 0x0201f000, + 0x0010763b, 0x0401f8cb, 0x4a01a006, 0x50000000, + 0x0401f7b5, 0x0401f8c7, 0x4a01a406, 0x21000010, + 0x4a01a206, 0x00000014, 0x4979a007, 0x4979a008, + 0x4979a009, 0x4979a00a, 0x42000800, 0x00000005, + 0x42001000, 0x0000dc00, 0x0201f000, 0x0010763b, + 0x0401f8bf, 0x0401f002, 0x0401f8c4, 0x4a01a006, + 0x02000000, 0x42000800, 0x00000001, 0x42001000, + 0x0000dc00, 0x0201f000, 0x0010763b, 0x0401f8bb, + 0x4a01a006, 0x02000000, 0x59300403, 0x82000580, + 0x00000031, 0x04020794, 0x81a40800, 0x4a000801, + 0x00fffffe, 0x0401f72b, 0x0401f8b0, 0x4a01a006, + 0x01000000, 0x5930041a, 0x80000540, 0x04000003, + 0x4801a407, 0x0401f003, 0x4a01a407, 0x00000003, + 0x5930021a, 0x80000540, 0x04000003, 0x4801a207, + 0x0401f003, 0x4a01a207, 0x00002a00, 0x42000800, + 0x00000002, 0x42001000, 0x0000dc00, 0x0201f000, + 0x0010763b, 0x4a026202, 0x0000ffff, 0x0401f889, + 0x4a01a406, 0x00002010, 0x4a01a206, 0x00000014, + 0x4a01a407, 0x00000800, 0x4a01a207, 0x00002000, + 0x80000580, 0x599c0817, 0x8c040d0a, 0x04020003, + 0x82000540, 0x00000020, 0x8c040d08, 0x04000003, + 0x82000540, 0x00000010, 0x82000540, 0x00000002, + 0x5934080a, 0x8c040d14, 0x04000005, 0x82040d00, + 0x00000380, 0x80040540, 0x0401f006, 0x599c0818, + 0x8c040d18, 0x04000003, 0x82000540, 0x00000380, + 0x0401f03c, 0x0401f875, 0x4a01a406, 0x00000210, + 0x4a01a206, 0x00000014, 0x4a01a407, 0x00000800, + 0x5934000a, 0x8c000516, 0x04000014, 0x59340c05, + 0x82040500, 0x00000030, 0x04000013, 0x59340a05, + 0x82040500, 0x0000c000, 0x04020009, 0x8c040d1a, + 0x04000004, 0x4a01a207, 0x00002100, 0x0401f00c, + 0x4a01a207, 0x00000100, 0x0401f009, 0x4a01a207, + 0x00000400, 0x0401f006, 0x4a01a207, 0x00000700, + 0x0401f003, 0x4a01a207, 0x00000800, 0x80000580, + 0x599c0817, 0x8c040d0a, 0x04020003, 0x82000540, + 0x00000020, 0x8c040d08, 0x04000003, 0x82000540, + 0x00000010, 0x82000540, 0x00000002, 0x59340a00, + 0x8c040d0e, 0x0400000b, 0x84000550, 0x599c1017, + 0x8c08150a, 0x04020004, 0x8c040d0a, 0x04000002, + 0x8400054e, 0x8c040d1c, 0x04000002, 0x84000552, + 0x4801a20a, 0x42000800, 0x00000005, 0x42001000, + 0x0000dc00, 0x0201f000, 0x0010763b, 0x0401f833, + 0x4a01a006, 0x02100014, 0x4a01a007, 0x01000000, + 0x4979a008, 0x4979a009, 0x4979a00a, 0x42000800, + 0x00000005, 0x42001000, 0x0000dc00, 0x0201f000, + 0x0010763b, 0x0401f825, 0x4a01a006, 0x02000000, + 0x0401f65d, 0x4933c857, 0x0401f820, 0x4a01a006, + 0x01000000, 0x4a01a407, 0x0000000b, 0x42000800, + 0x00000002, 0x42001000, 0x0000dc00, 0x0201f000, + 0x0010763b, 0x42005000, 0x32000000, 0x42006000, + 0x08290000, 0x41786800, 0x41787800, 0x0401f3e6, + 0x42005000, 0x22000000, 0x42006000, 0x01290000, + 0x41786800, 0x41787800, 0x0401f3df, 0x42005000, + 0x33000000, 0x42006000, 0x08980000, 0x41786800, + 0x41787800, 0x0401f3d8, 0x42005000, 0x23000000, + 0x42006000, 0x01980000, 0x41786800, 0x41787800, + 0x0401f3d1, 0x59300403, 0x82000c80, 0x00000085, + 0x02001800, 0x00100615, 0x82000c80, 0x00000093, + 0x02021800, 0x00100615, 0x82000480, 0x00000085, + 0x0c01f001, 0x00107263, 0x00107265, 0x00107272, + 0x00107263, 0x00107263, 0x00107263, 0x00107263, + 0x00107263, 0x00107263, 0x00107263, 0x00107263, + 0x00107263, 0x00107263, 0x0010727f, 0x0201f800, + 0x00100615, 0x4933c857, 0x0401f851, 0x5930001c, + 0x4801a004, 0x4801a007, 0x4979a408, 0x4a01a208, + 0x0000ffff, 0x42000800, 0x00000003, 0x42001000, + 0x0000dc00, 0x0401f3ca, 0x4933c857, 0x0401f850, + 0x5930001c, 0x4801a004, 0x4a01a406, 0x00000003, + 0x4a01a206, 0x00000300, 0x42000800, 0x00000001, + 0x42001000, 0x0000dc00, 0x0401f3bd, 0x4d2c0000, + 0x59325808, 0x4933c857, 0x492fc857, 0x812e59c0, + 0x02000800, 0x00100615, 0x59340a12, 0x82040d00, + 0x0000ff00, 0x592c000a, 0x82000500, 0x000000ff, + 0x900001c0, 0x80040540, 0x82000540, 0x00000011, + 0x44034800, 0x81a5a000, 0x42001000, 0x00000009, + 0x42000800, 0x00000003, 0x592c0009, 0x82000500, + 0xff000000, 0x82001d80, 0x84000000, 0x04000009, + 0x82001d80, 0x85000000, 0x02020800, 0x00100615, + 0x42001000, 0x00000007, 0x42000800, 0x00000001, + 0x832c1c00, 0x00000009, 0x500c0000, 0x4401a000, + 0x800c1800, 0x80d1a000, 0x80081040, 0x040207fb, + 0x42001000, 0x0000dc00, 0x5c025800, 0x0401f38c, + 0x42005000, 0x81000000, 0x42006000, 0x00090000, + 0x41786800, 0x41787800, 0x0401f363, 0x42005000, + 0x84000000, 0x42006000, 0x00990000, 0x59300406, + 0x82000580, 0x00000005, 0x04000002, 0x8430652e, + 0x41786800, 0x41787800, 0x0401f357, 0x42005000, + 0x85000000, 0x42006000, 0x00990000, 0x59300406, + 0x82000580, 0x00000005, 0x04000002, 0x8430652e, + 0x41786800, 0x41787800, 0x0401f34b, 0x59300403, + 0x82000c80, 0x00000053, 0x02021800, 0x00100615, + 0x82000480, 0x0000004b, 0x02001800, 0x00100615, + 0x59326809, 0x59368c03, 0x4803c857, 0x0c01f001, + 0x00107353, 0x0010735b, 0x00107363, 0x0010736b, + 0x001072e4, 0x001072e4, 0x001072e4, 0x0010734b, + 0x0201f800, 0x00100615, 0x42005000, 0x06000000, + 0x42006000, 0x08290000, 0x41786800, 0x41787800, + 0x0401f32d, 0x4933c857, 0x0401ff46, 0x4a01a006, + 0x12000000, 0x59300406, 0x82000580, 0x00000004, + 0x04020003, 0x59340002, 0x0401f002, 0x59a80010, + 0x82000500, 0x00ffffff, 0x4801a007, 0x59300419, + 0x4801a408, 0x59300219, 0x4801a208, 0x4979a009, + 0x4979a00a, 0x4979a00b, 0x4979a00c, 0x4979a00d, + 0x4979a00e, 0x4979a00f, 0x4979a010, 0x42000800, + 0x0000000b, 0x42001000, 0x0000dc00, 0x0401f330, + 0x0401ff28, 0x4a01a006, 0x0f000000, 0x5930001c, + 0x4801a007, 0x42000800, 0x00000002, 0x42001000, + 0x0000dc00, 0x0401f326, 0x0401ff2c, 0x4a01a006, + 0x02000000, 0x59c40085, 0x48031004, 0x59880000, + 0x4801a007, 0x59880001, 0x4801a008, 0x59880002, + 0x4801a009, 0x59880003, 0x4801a00a, 0x59880004, + 0x4801a00b, 0x59880005, 0x4801a00c, 0x42000800, + 0x00000007, 0x42001000, 0x0000dc00, 0x0401f310, + 0x4a026202, 0x0000ffff, 0x0401ff06, 0x4a01a006, + 0x62000000, 0x5930001c, 0x4801a007, 0x42000800, + 0x00000002, 0x42001000, 0x0000dc00, 0x0401f304, + 0x0401fefc, 0x59300808, 0x4c500000, 0x4c540000, + 0x4c580000, 0x8204a400, 0x0000000a, 0x5930b01c, + 0x82d0ac00, 0x00000006, 0x0201f800, 0x0010a93e, + 0x5930081c, 0x42001000, 0x0000dc00, 0x5c00b000, + 0x5c00a800, 0x5c00a000, 0x0401f2f1, 0x0401ff9b, + 0x59300017, 0x4801a006, 0x59300018, 0x4801a007, + 0x4a01a008, 0x00001000, 0x0401f020, 0x0401ff93, + 0x59300017, 0x4801a006, 0x59300018, 0x4801a007, + 0x4a01a008, 0x00004000, 0x0401f018, 0x0401ff8b, + 0x59300017, 0x4801a006, 0x59300018, 0x4801a007, + 0x4a01a008, 0x00002000, 0x0401f010, 0x0401ff83, + 0x59300017, 0x4801a006, 0x59300018, 0x4801a007, + 0x4a01a008, 0x00000400, 0x0401f008, 0x0401ff7b, + 0x59300017, 0x4801a006, 0x59300018, 0x4801a007, + 0x4a01a008, 0x00000200, 0x4979a009, 0x4979a00a, + 0x4979a00b, 0x4979a00c, 0x4979a00d, 0x42000800, + 0x00000008, 0x42001000, 0x0000dc00, 0x0401f2c0, + 0x0401fec6, 0x4a01a006, 0x02000014, 0x4979a407, + 0x4979a207, 0x59a8003a, 0x4801a008, 0x59a8003b, + 0x4801a009, 0x4a01a00a, 0x00047878, 0x42000800, + 0x00000005, 0x42001000, 0x0000dc00, 0x0401f2b0, + 0x0401feb6, 0x4a01a006, 0x02140018, 0x4a01a407, + 0x00000800, 0x5930001c, 0x82000d00, 0xff000000, + 0x900409c0, 0x4805a207, 0x82000500, 0x00ffffff, + 0x4801a00a, 0x4979a408, 0x4979a208, 0x4979a409, + 0x4979a209, 0x4979a00b, 0x42000800, 0x00000006, + 0x42001000, 0x0000dc00, 0x0401f299, 0x4933c857, + 0x4937c857, 0x4d380000, 0x4d1c0000, 0x42027000, + 0x00000035, 0x0201f800, 0x00109183, 0x04020022, + 0x0401fe88, 0x4a01a006, 0x13000000, 0x5932381e, + 0x591c0414, 0x8c000502, 0x02000800, 0x00100615, + 0x591c0019, 0x4801a005, 0x591c0406, 0x82000580, + 0x00000003, 0x04000007, 0x59300809, 0x58040002, + 0x82000500, 0x00ffffff, 0x4801a007, 0x0401f003, + 0x59a80010, 0x4801a007, 0x59300419, 0x4801a408, + 0x59300219, 0x4801a208, 0x42000800, 0x00000003, + 0x42001000, 0x0000dc00, 0x5c023800, 0x5c027000, + 0x0401f26f, 0x4803c856, 0x0201f800, 0x0010698c, + 0x598c000d, 0x81300580, 0x02020800, 0x00100615, + 0x0201f800, 0x001068f6, 0x0201f800, 0x000208b4, + 0x5c023800, 0x5c027000, 0x0201f000, 0x00106982, + 0x4803c856, 0x4d2c0000, 0x4d1c0000, 0x5932381e, + 0x811e39c0, 0x02000800, 0x00100615, 0x591c0c06, + 0x82040580, 0x00000006, 0x0400000d, 0x82040580, + 0x00000003, 0x04000036, 0x4a026403, 0x00000037, + 0x4a02641a, 0x00000003, 0x4a02621a, 0x00001700, + 0x5c023800, 0x5c025800, 0x0401f064, 0x0401f84b, + 0x42001000, 0x40000000, 0x591c0203, 0x591c0804, + 0x8c040d3e, 0x04020023, 0x82000c80, 0x0000000e, + 0x0c001003, 0x0201f800, 0x00100615, 0x00107410, + 0x0010741c, 0x00107412, 0x0010741c, 0x00107418, + 0x00107410, 0x00107410, 0x0010741c, 0x0010741c, + 0x00107410, 0x00107410, 0x00107410, 0x00107410, + 0x00107410, 0x0010741c, 0x00107410, 0x0010741c, + 0x0201f800, 0x00100615, 0x591c0414, 0x4803c857, + 0x8c000518, 0x04000003, 0x8c000512, 0x04000003, + 0x80001580, 0x0401f003, 0x42001000, 0x20000000, + 0x591c0015, 0x4801a00a, 0x0401f018, 0x0401f81f, + 0x591e5808, 0x812e59c0, 0x02000800, 0x00100615, + 0x592c100f, 0x591c0011, 0x80080480, 0x4801a00a, + 0x591c0203, 0x591c0804, 0x8c040d3e, 0x04020007, + 0x82000d80, 0x00000002, 0x04000007, 0x82000d80, + 0x00000004, 0x04000004, 0x42001000, 0x40000000, + 0x0401f002, 0x80001580, 0x4809a00b, 0x42000800, + 0x00000006, 0x42001000, 0x0000dc00, 0x5c023800, + 0x5c025800, 0x0401f1fe, 0x4803c856, 0x0401fe03, + 0x4a01a006, 0x02000000, 0x59300c19, 0x4805a407, + 0x59300a19, 0x4805a207, 0x59a81010, 0x59300809, + 0x58041802, 0x820c1d00, 0x00ffffff, 0x5930081e, + 0x58040406, 0x82000580, 0x00000003, 0x04020004, + 0x4809a008, 0x480da009, 0x0401f003, 0x480da008, + 0x4809a009, 0x1c01f000, 0x4803c856, 0x0401fdeb, + 0x0401f003, 0x4803c856, 0x0401fde1, 0x4a01a006, + 0x01000000, 0x5930041a, 0x4801a407, 0x5930021a, + 0x4801a207, 0x42000800, 0x00000002, 0x42001000, + 0x0000dc00, 0x0401f1d6, 0x4803c856, 0x4d1c0000, + 0x0401fdc5, 0x4a01a006, 0x14000000, 0x5932381e, + 0x591c0019, 0x4801a005, 0x59300419, 0x4801a407, + 0x59300219, 0x4801a207, 0x59300015, 0x4801a008, + 0x59300216, 0x82000500, 0x000000ff, 0x840001c0, + 0x4801a409, 0x42000800, 0x00000004, 0x42001000, + 0x0000dc00, 0x5c023800, 0x0401f1bd, 0x4803c856, + 0x0401f80b, 0x5930041a, 0x900001c0, 0x4801a005, + 0x0401f9f4, 0x41780800, 0x42001000, 0x00005c00, + 0x0401f9b3, 0x0201f000, 0x00105d86, 0x4803c856, + 0x59300817, 0x82041c00, 0x00000005, 0x46034800, + 0x00000021, 0x58040404, 0x82000500, 0x0000f000, + 0x82000580, 0x00003000, 0x04000003, 0x46034800, + 0x00000041, 0x81a5a000, 0x580c0001, 0x82000d00, + 0x00ffffff, 0x82040d40, 0xc2000000, 0x4805a000, + 0x580c0800, 0x82041500, 0x00ffffff, 0x82000500, + 0xff000000, 0x80080540, 0x4801a001, 0x580c0002, + 0x82000580, 0x00c00000, 0x82000500, 0x00fd0300, + 0x4801a002, 0x580c0003, 0x4801a003, 0x580c0404, + 0x4801a404, 0x580c0204, 0x4801a204, 0x1c01f000, + 0x4803c856, 0x59a80026, 0x82000500, 0x00000028, + 0x04020009, 0x59a80026, 0x82000500, 0x00000028, + 0x04000003, 0x497a6a12, 0x0401f003, 0x4a026a12, + 0x0000ff00, 0x42005000, 0x22000000, 0x42006000, + 0x01380000, 0x41786800, 0x41787800, 0x0401f952, + 0x59301008, 0x4a01a006, 0x54000000, 0x59a80010, + 0x82000500, 0x00ffffff, 0x58080c0a, 0x800408f0, + 0x80040540, 0x4801a007, 0x5808000a, 0x82000500, + 0xff000000, 0x4801a008, 0x59a80002, 0x4801a009, + 0x59a80003, 0x4801a00a, 0x59a80000, 0x4801a00b, + 0x59a80001, 0x4801a00c, 0x5808000c, 0x9c0001c0, + 0x4801a00d, 0x5808000d, 0x9c0001c0, 0x4801a00e, + 0x5808000e, 0x9c0001c0, 0x4801a00f, 0x5808000f, + 0x9c0001c0, 0x4801a010, 0x58080010, 0x9c0001c0, + 0x4801a011, 0x58080011, 0x9c0001c0, 0x4801a012, + 0x58080012, 0x9c0001c0, 0x4801a013, 0x58080013, + 0x9c0001c0, 0x4801a014, 0x58080010, 0x9c0001c0, + 0x4801a015, 0x58080011, 0x9c0001c0, 0x4801a016, + 0x58080012, 0x9c0001c0, 0x4801a017, 0x58080013, + 0x9c0001c0, 0x4801a018, 0x42000800, 0x00000013, + 0x42001000, 0x0000dc00, 0x0401f135, 0x4803c856, + 0x42005000, 0x22000000, 0x42006000, 0x01290000, + 0x41786800, 0x41787800, 0x0401f90b, 0x59301008, + 0x4a01a006, 0x55000000, 0x5808000b, 0x82000500, + 0x00ffffff, 0x58080c0a, 0x800408f0, 0x80040540, + 0x4801a007, 0x5808080a, 0x82040d00, 0xff000000, + 0x59a80010, 0x82000500, 0x00ffffff, 0x80040540, + 0x4801a008, 0x5808000c, 0x9c0001c0, 0x4801a009, + 0x5808000d, 0x9c0001c0, 0x4801a00a, 0x5808000e, + 0x9c0001c0, 0x4801a00b, 0x5808000f, 0x9c0001c0, + 0x4801a00c, 0x59a80002, 0x4801a00d, 0x59a80003, + 0x4801a00e, 0x59a80000, 0x4801a00f, 0x59a80001, + 0x4801a010, 0x58080010, 0x4801a011, 0x58080011, + 0x4801a012, 0x58080012, 0x4801a013, 0x58080013, + 0x4801a014, 0x4979a015, 0x4979a016, 0x4979a017, + 0x4979a018, 0x42000800, 0x00000013, 0x42001000, + 0x0000dc00, 0x0401f0f6, 0x0401fcfc, 0x5930001c, + 0x800001c0, 0x04000008, 0x4a01a006, 0x01000000, + 0x4a01a407, 0x00000003, 0x42000800, 0x00000002, + 0x0401f028, 0x4a01a006, 0x02000000, 0x41780800, + 0x836c0580, 0x00000004, 0x04020003, 0x84040d42, + 0x0401f00d, 0x0201f800, 0x00104e0d, 0x04020003, + 0x84040d4a, 0x0401f002, 0x84040d48, 0x59a80026, + 0x8c000506, 0x04020003, 0x8c00050a, 0x04000002, + 0x84040d46, 0x4805a207, 0x59c40085, 0x48031004, + 0x4c580000, 0x4c500000, 0x4c540000, 0x4200b000, + 0x00000006, 0x8388a400, 0x00000000, 0x82d0ac00, + 0x00000008, 0x0201f800, 0x0010a93e, 0x5c00a800, + 0x5c00a000, 0x5c00b000, 0x42000800, 0x00000008, + 0x42001000, 0x0000dc00, 0x0401f0c1, 0x0401fcb9, + 0x4a01a006, 0x56000000, 0x59340006, 0x4801a007, + 0x59340007, 0x4801a008, 0x42000800, 0x00000003, + 0x42001000, 0x0000dc00, 0x0401f0b5, 0x4803c856, + 0x0401fcba, 0x5930081c, 0x800409c0, 0x0400000e, + 0x82040580, 0x0000ffff, 0x04000004, 0x82040480, + 0x00000007, 0x04021008, 0x4a01a006, 0x01000000, + 0x4a01a407, 0x00000003, 0x42000800, 0x00000002, + 0x0401f012, 0x4a01a006, 0x0200001c, 0x4a01a007, + 0x00000001, 0x42001000, 0x0010b2ec, 0x50080000, + 0x9c0001c0, 0x4801a009, 0x59a80010, 0x4801a00a, + 0x59a80002, 0x59a80803, 0x4801a00b, 0x4805a00c, + 0x42000800, 0x00000007, 0x42001000, 0x0000dc00, + 0x0401f08f, 0x4d2c0000, 0x0401fc86, 0x59325808, + 0x592c0008, 0x82000500, 0x00ffffff, 0x4801a001, + 0x4a01a006, 0x51000000, 0x5c025800, 0x0201f000, + 0x001070bc, 0x4803c856, 0x59a80810, 0x82040d00, + 0x000000ff, 0x59325808, 0x59326809, 0x59a83026, + 0x8c18350a, 0x04020008, 0x8c00050e, 0x04020006, + 0x80001d80, 0x59a82010, 0x82102500, 0x000000ff, + 0x0401f001, 0x59300406, 0x4803c857, 0x82000d80, + 0x00000009, 0x04000006, 0x82000d80, 0x0000000a, + 0x0400002e, 0x0201f800, 0x00100615, 0x59300015, + 0x8c00051e, 0x04020020, 0x42005000, 0x04000000, + 0x42006000, 0x05000000, 0x592c040a, 0x82000500, + 0x00000030, 0x800000e0, 0x80306540, 0x5934000a, + 0x8c000508, 0x04000002, 0x84306546, 0x41786800, + 0x41787800, 0x0401f831, 0x59300c14, 0x80040000, + 0x48026414, 0x40040000, 0x800000d0, 0x82000540, + 0x00000020, 0x4801a403, 0x83180d40, 0x00000038, + 0x42001000, 0x0000c920, 0x0401f868, 0x0201f000, + 0x00105d8b, 0x59a80026, 0x82000500, 0x00000028, + 0x04000003, 0x497a6a12, 0x0401f7dc, 0x4a026a12, + 0x0000ff00, 0x0401f7d9, 0x42005000, 0x02000000, + 0x42006000, 0x20290000, 0x41786800, 0x41787800, + 0x0401f812, 0x83180d40, 0x00000038, 0x42001000, + 0x0000c9a0, 0x0401f851, 0x42000800, 0x000007d0, + 0x59300011, 0x82000500, 0xfff00000, 0x80000540, + 0x04000003, 0x42000800, 0x00001b58, 0x41781000, + 0x0201f000, 0x00105d8d, 0x4201a000, 0x00000000, + 0x0401f003, 0x4201a000, 0x00000011, 0x59340a12, + 0x82040d00, 0x0000ff00, 0x59a80010, 0x82000500, + 0x000000ff, 0x900001c0, 0x80040540, 0x80d00540, + 0x44034800, 0x81a5a000, 0x59340002, 0x82000500, + 0x00ffffff, 0x80280540, 0x4801a000, 0x59a80010, + 0x4801a001, 0x4831a002, 0x82340540, 0x00000000, + 0x4801a003, 0x59300402, 0x4801a404, 0x59300a02, + 0x4805a204, 0x8c30652e, 0x04000003, 0x4805a404, + 0x4801a204, 0x483da005, 0x1c01f000, 0x4807c857, + 0x4c040000, 0x0401f82a, 0x5c000800, 0x40040000, + 0x80081540, 0x800000c4, 0x82000540, 0x00002000, + 0x4803910a, 0x59b400f6, 0x82000500, 0x00000018, + 0x040207fd, 0x4a0368f0, 0x0010b342, 0x42001800, + 0x0010b343, 0x580c0000, 0x4803c857, 0x580c0002, + 0x4803c857, 0x580c0004, 0x4803c857, 0x4a0368f1, + 0x0010b349, 0x480b68f3, 0x4a0378e4, 0x00008000, + 0x0201f000, 0x00105d86, 0x4807c857, 0x480a2800, + 0x4c040000, 0x0401f80a, 0x5c000800, 0x59b400f6, + 0x8c00050a, 0x040207fe, 0x49a768f2, 0x480768f4, + 0x4a0378e4, 0x00008000, 0x1c01f000, 0x4a0378e4, + 0x0000c000, 0x59bc00e4, 0x8c000520, 0x0400000c, + 0x4a0378e4, 0x00008000, 0x42007000, 0x000003e8, + 0x59bc00e4, 0x8c000520, 0x040007f5, 0x80387040, + 0x02000800, 0x00100615, 0x0401f7fa, 0x1c01f000, + 0x82000500, 0xffff0000, 0x82000580, 0x01050000, + 0x0402000d, 0x599c0818, 0x8c040d10, 0x0400000a, + 0x59a80807, 0x8c040d0a, 0x04000007, 0x42001000, + 0x0000804f, 0x41781800, 0x41782000, 0x0201f800, + 0x00103857, 0x1c01f000, 0x41781000, 0x42026000, + 0x0010cfc0, 0x59a8180e, 0x480a6402, 0x4a026202, + 0x0000ffff, 0x80081000, 0x800c1840, 0x04000004, + 0x83326400, 0x00000024, 0x0401f7f8, 0x1c01f000, + 0x4933c857, 0x59300203, 0x82000580, 0x00000000, + 0x0400002c, 0x59300406, 0x4803c857, 0x82000d80, + 0x00000004, 0x04000011, 0x82000d80, 0x00000001, + 0x0400000e, 0x82000d80, 0x00000003, 0x04000006, + 0x82000d80, 0x00000006, 0x04020011, 0x0201f800, + 0x0010a3fa, 0x5930001c, 0x800001c0, 0x02020800, + 0x0010961a, 0x0401f00a, 0x5930081e, 0x4807c857, + 0x800409c0, 0x04000006, 0x5804001c, 0x4803c857, + 0x81300580, 0x04020002, 0x4978081c, 0x497a6008, + 0x4a026004, 0x00004000, 0x59a80037, 0x82000c80, + 0x00000051, 0x04001002, 0x80000102, 0x48026206, + 0x497a6205, 0x497a6009, 0x4a026406, 0x00000007, + 0x1c01f000, 0x8166c9c0, 0x0400001c, 0x41626000, + 0x41580000, 0x59300a03, 0x82040d80, 0x00000000, + 0x04000008, 0x83326400, 0x00000024, 0x81300c80, + 0x040017f9, 0x42026000, 0x0010cfc0, 0x0401f7f6, + 0x4933c857, 0x8166c840, 0x83300c00, 0x00000024, + 0x80040480, 0x04021006, 0x4006c000, 0x4a026203, + 0x00000008, 0x813261c0, 0x1c01f000, 0x4202c000, + 0x0010cfc0, 0x0401f7fa, 0x42000000, 0x0010b653, + 0x0201f800, 0x0010a86e, 0x4933c856, 0x417a6000, + 0x0401f7f5, 0x4933c857, 0x83380580, 0x00000013, + 0x0402000b, 0x59300004, 0x8c00053e, 0x04000007, + 0x0201f800, 0x0010698c, 0x0201f800, 0x001068f6, + 0x0201f800, 0x00106982, 0x1c01f000, 0x4933c857, + 0x59880053, 0x80000000, 0x48031053, 0x1c01f000, + 0x4933c857, 0x59300203, 0x82003480, 0x0000000e, + 0x02021800, 0x00100615, 0x4d2c0000, 0x0c01f803, + 0x5c025800, 0x1c01f000, 0x00107718, 0x00107c84, + 0x00107dd4, 0x00107718, 0x00107e3a, 0x0010787c, + 0x00107718, 0x00107718, 0x00107c1a, 0x00107718, + 0x00107718, 0x00107718, 0x00107718, 0x00107718, + 0x0201f800, 0x00100615, 0x4933c857, 0x59300203, + 0x82003480, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f001, 0x0010772f, 0x001087f0, 0x0010772f, + 0x0010772f, 0x0010772f, 0x0010772f, 0x0010772f, + 0x0010772f, 0x0010879a, 0x0010880c, 0x0010887a, + 0x0010880c, 0x0010887a, 0x0010772f, 0x0201f800, + 0x00100615, 0x0201f800, 0x00100615, 0x4933c857, + 0x4d2c0000, 0x59325808, 0x59300203, 0x82003480, + 0x0000000e, 0x02021800, 0x00100615, 0x0c01f803, + 0x5c025800, 0x1c01f000, 0x0010774c, 0x0010774c, + 0x0010774c, 0x00107768, 0x001077b4, 0x0010774c, + 0x0010774c, 0x0010774c, 0x0010774e, 0x0010774c, + 0x0010774c, 0x0010774c, 0x0010774c, 0x0010774c, + 0x0201f800, 0x00100615, 0x4933c857, 0x83380580, + 0x00000040, 0x02020800, 0x00100615, 0x4a026007, + 0x00082000, 0x4a026203, 0x00000003, 0x493a6403, + 0x4a025c08, 0x00000001, 0x592c000d, 0x48026011, + 0x497a6013, 0x592c0208, 0x800000c2, 0x800010c4, + 0x80081400, 0x480a6206, 0x0201f800, 0x00100f9c, + 0x42000800, 0x80000060, 0x0201f000, 0x00106466, + 0x4933c857, 0x83380480, 0x00000050, 0x02021800, + 0x00100615, 0x83380480, 0x00000049, 0x02001800, + 0x00100615, 0x0c01f001, 0x0010777b, 0x00107786, + 0x00107779, 0x00107779, 0x00107779, 0x00107779, + 0x00107791, 0x0201f800, 0x00100615, 0x4a026203, + 0x00000004, 0x4a025c08, 0x00000002, 0x592c0207, + 0x48025c09, 0x592c0209, 0x48025a07, 0x592c000c, + 0x4802580d, 0x1c01f000, 0x0201f800, 0x001068c1, + 0x0201f800, 0x00108df4, 0x04000005, 0x4a025a06, + 0x00000006, 0x0201f800, 0x00020381, 0x0201f000, + 0x000208b4, 0x0201f800, 0x001068c1, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42003000, 0x00000014, 0x41782800, 0x42002000, + 0x00000002, 0x4d400000, 0x4d440000, 0x59368c03, + 0x42028000, 0x00000029, 0x0201f800, 0x0010962a, + 0x5c028800, 0x5c028000, 0x42000000, 0x0010b663, + 0x0201f800, 0x0010a86e, 0x0201f800, 0x00108df4, + 0x02000000, 0x000208b4, 0x4a025a06, 0x00000029, + 0x0201f800, 0x00020381, 0x0201f000, 0x000208b4, + 0x4933c857, 0x83380580, 0x00000048, 0x04000005, + 0x83380580, 0x00000053, 0x02020800, 0x00100615, + 0x592c0206, 0x82000580, 0x00000007, 0x04000009, + 0x59300011, 0x80000540, 0x04000006, 0x592c080c, + 0x80040480, 0x4802580c, 0x4a025a06, 0x00000015, + 0x592c0206, 0x80000540, 0x04020003, 0x4a025a06, + 0x00000000, 0x0201f800, 0x00020381, 0x0201f000, + 0x000208b4, 0x4933c857, 0x4d2c0000, 0x4c500000, + 0x4c540000, 0x4c580000, 0x0201f800, 0x0010082a, + 0x02000800, 0x00100615, 0x497a5a06, 0x59a8006e, + 0x82000500, 0x0000f000, 0x48025c07, 0x59a80816, + 0x82040c00, 0x00000018, 0x48065a07, 0x412c7800, + 0x4d2c0000, 0x41cca000, 0x42002800, 0x00000001, + 0x42001000, 0x0000002c, 0x82040480, 0x0000002d, + 0x04021006, 0x832cac00, 0x00000009, 0x0201f800, + 0x0010894a, 0x0401f02e, 0x40043000, 0x42000800, + 0x0000002c, 0x832cac00, 0x00000009, 0x0201f800, + 0x0010894a, 0x82183480, 0x0000002c, 0x0201f800, + 0x0010082a, 0x0400001a, 0x80142800, 0x4a025804, + 0x00000110, 0x492c7801, 0x82180c80, 0x0000003d, + 0x04021007, 0x40180800, 0x832cac00, 0x00000005, + 0x0201f800, 0x0010894a, 0x0401f015, 0x82081400, + 0x0000003c, 0x82183480, 0x0000003c, 0x42000800, + 0x0000003c, 0x412c7800, 0x832cac00, 0x00000005, + 0x0201f800, 0x0010894a, 0x0401f7e5, 0x5c025800, + 0x592c0206, 0x8400055e, 0x48025a06, 0x592c0407, + 0x80080540, 0x48025c07, 0x0401f002, 0x5c025800, + 0x813669c0, 0x04000003, 0x59343403, 0x0401f003, + 0x42003000, 0x0000ffff, 0x49325808, 0x481a5c06, + 0x82100580, 0x00000054, 0x04020002, 0x491e5813, + 0x841401c0, 0x80100540, 0x48025804, 0x592c0001, + 0x497a5801, 0x4c000000, 0x0201f800, 0x00020381, + 0x5c025800, 0x812e59c0, 0x040207f9, 0x5c00b000, + 0x5c00a800, 0x5c00a000, 0x5c025800, 0x1c01f000, + 0x4803c856, 0x4c5c0000, 0x4d2c0000, 0x4c500000, + 0x4c540000, 0x4c580000, 0x412cb800, 0x592c040b, + 0x8c000516, 0x04000003, 0x41cca000, 0x0401f003, + 0x83cca400, 0x00000006, 0x4008b000, 0x41781000, + 0x82580480, 0x00000012, 0x04001004, 0x4200b000, + 0x00000012, 0x40001000, 0x4c080000, 0x4d2c0000, + 0x0201f800, 0x0010082a, 0x04000023, 0x5c001800, + 0x492c1801, 0x485a5800, 0x832cac00, 0x00000002, + 0x0201f800, 0x0010a94f, 0x585c040b, 0x8c000500, + 0x0400000e, 0x832c1400, 0x00000002, 0x8c000516, + 0x04000003, 0x82081400, 0x00000006, 0x46001000, + 0x00000001, 0x80081000, 0x46001000, 0x00000900, + 0x84000500, 0x4800bc0b, 0x5c001000, 0x800811c0, + 0x040207da, 0x82000540, 0x00000001, 0x5c00b000, + 0x5c00a800, 0x5c00a000, 0x5c025800, 0x5c00b800, + 0x1c01f000, 0x5c025800, 0x5c001000, 0x0401f7f8, + 0x4933c857, 0x83380d80, 0x00000015, 0x04020003, + 0x0201f000, 0x000208b4, 0x83380d80, 0x00000016, + 0x02020800, 0x00100615, 0x0201f000, 0x000208b4, + 0x4933c857, 0x4d2c0000, 0x4c500000, 0x4c540000, + 0x4c580000, 0x59325808, 0x83cca400, 0x00000006, + 0x59cc1806, 0x820c0580, 0x01000000, 0x04020004, + 0x4200b000, 0x00000002, 0x0401f00f, 0x4200b000, + 0x00000008, 0x832cac00, 0x00000005, 0x0201f800, + 0x0010a93e, 0x8c0c1d00, 0x0400000b, 0x4200b000, + 0x00000008, 0x592e5801, 0x812e59c0, 0x02000800, + 0x00100615, 0x832cac00, 0x00000005, 0x0201f800, + 0x0010a93e, 0x0401f816, 0x5c00b000, 0x5c00a800, + 0x5c00a000, 0x5c025800, 0x1c01f000, 0x4933c857, + 0x4c500000, 0x4c540000, 0x4c580000, 0x83cca400, + 0x00000006, 0x5930a808, 0x8254ac00, 0x00000005, + 0x4200b000, 0x00000007, 0x0201f800, 0x0010a93e, + 0x5c00b000, 0x5c00a800, 0x5c00a000, 0x4933c857, + 0x0201f800, 0x00108df4, 0x02000000, 0x000208b4, + 0x4d2c0000, 0x0201f800, 0x00109360, 0x0402000b, + 0x41780800, 0x4d400000, 0x42028000, 0x00000000, + 0x0201f800, 0x00109204, 0x5c028000, 0x5c025800, + 0x0201f000, 0x000208b4, 0x5931d821, 0x58ef400b, + 0x58ee580d, 0x4a025a04, 0x00000103, 0x58ec0009, + 0x0801f800, 0x5c025800, 0x0201f000, 0x000208b4, + 0x4933c857, 0x59cc1806, 0x820c0580, 0x02000000, + 0x04020014, 0x4a026802, 0x00fffffd, 0x5934000a, + 0x84000504, 0x4802680a, 0x59300808, 0x800409c0, + 0x02000000, 0x000208b4, 0x4a000a04, 0x00000103, + 0x480c0805, 0x5931d821, 0x58ef400b, 0x58ee580d, + 0x58ec0009, 0x0801f800, 0x0201f000, 0x000208b4, + 0x42000000, 0x0010b66b, 0x0201f800, 0x0010a86e, + 0x4c0c0000, 0x0401f804, 0x5c001800, 0x040207eb, + 0x1c01f000, 0x4933c857, 0x4d2c0000, 0x59325808, + 0x812e59c0, 0x04020009, 0x497a6206, 0x497a6205, + 0x4d380000, 0x42027000, 0x00000022, 0x0401fb77, + 0x5c027000, 0x80000580, 0x5c025800, 0x1c01f000, + 0x4933c857, 0x4d2c0000, 0x4c500000, 0x4c540000, + 0x4c580000, 0x59325808, 0x592e5801, 0x832cac00, + 0x00000005, 0x83cca400, 0x00000006, 0x59a8086e, + 0x82040d00, 0x000003ff, 0x82041480, 0x0000000f, + 0x0400101b, 0x4200b000, 0x0000000f, 0x0201f800, + 0x0010a93e, 0x592e5801, 0x832cac00, 0x00000005, + 0x82080c80, 0x0000000f, 0x0400100d, 0x4200b000, + 0x0000000f, 0x0201f800, 0x0010a93e, 0x592e5801, + 0x832cac00, 0x00000005, 0x82041480, 0x0000000f, + 0x04001007, 0x42001000, 0x0000000f, 0x4008b000, + 0x0201f800, 0x0010a93e, 0x0401f004, 0x4004b000, + 0x0201f800, 0x0010a93e, 0x5931d821, 0x58ef400b, + 0x58ee580d, 0x4a025a04, 0x00000103, 0x592e5801, + 0x58ec0009, 0x0801f800, 0x0201f800, 0x000208b4, + 0x5c00b000, 0x5c00a800, 0x5c00a000, 0x5c025800, + 0x1c01f000, 0x4933c857, 0x4d2c0000, 0x4c500000, + 0x4c540000, 0x4c580000, 0x59cc0006, 0x82000d80, + 0x01000000, 0x0400002c, 0x59cc0007, 0x9000b1c0, + 0x8258b500, 0x000000ff, 0x8058b104, 0x8258b400, + 0x00000002, 0x82580c80, 0x00000007, 0x04001003, + 0x4200b000, 0x00000006, 0x83cca400, 0x00000006, + 0x59301008, 0x800811c0, 0x02000800, 0x00100615, + 0x8208ac00, 0x00000005, 0x0201f800, 0x0010a93e, + 0x82000d00, 0xff000000, 0x800409c0, 0x04000019, + 0x8200b500, 0x000000ff, 0x8058b104, 0x82580c80, + 0x0000000e, 0x04001003, 0x4200b000, 0x0000000d, + 0x58081001, 0x800811c0, 0x02000800, 0x00100615, + 0x8208ac00, 0x00000005, 0x0201f800, 0x0010a93e, + 0x0401f008, 0x59301008, 0x800811c0, 0x02000800, + 0x00100615, 0x48001005, 0x59cc0007, 0x48001006, + 0x0401ff3b, 0x5c00b000, 0x5c00a800, 0x5c00a000, + 0x5c025800, 0x1c01f000, 0x4933c857, 0x42000800, + 0x00000000, 0x59cc0006, 0x82000580, 0x02000000, + 0x04000003, 0x42000800, 0x00000001, 0x4d2c0000, + 0x59325808, 0x812e59c0, 0x02000800, 0x00100615, + 0x48065a06, 0x0201f800, 0x00020381, 0x5c025800, + 0x0201f000, 0x000208b4, 0x4933c857, 0x4d2c0000, + 0x4c500000, 0x4c540000, 0x4c580000, 0x4200b000, + 0x00000002, 0x59cc0806, 0x82040580, 0x01000000, + 0x04000004, 0x8204b500, 0x0000ffff, 0x8058b104, + 0x83cca400, 0x00000006, 0x59300008, 0x8200ac00, + 0x00000005, 0x0201f800, 0x0010a93e, 0x0401ff0c, + 0x5c00b000, 0x5c00a800, 0x5c00a000, 0x5c025800, + 0x1c01f000, 0x4933c857, 0x4803c857, 0x4807c857, + 0x480bc857, 0x480fc857, 0x4813c857, 0x481bc857, + 0x492fc857, 0x4d2c0000, 0x4c000000, 0x0201f800, + 0x00100819, 0x5c000000, 0x0400000f, 0x48025803, + 0x5c000000, 0x4802580a, 0x4c000000, 0x481a5801, + 0x48125809, 0x48065804, 0x480a5807, 0x480e5808, + 0x412c1000, 0x0201f800, 0x001008a1, 0x82000540, + 0x00000001, 0x5c025800, 0x1c01f000, 0x4933c857, + 0x4d1c0000, 0x59cc0001, 0x82000500, 0x00ffffff, + 0x59341002, 0x82081500, 0x00ffffff, 0x80080580, + 0x0402001f, 0x497a6205, 0x4d380000, 0x42027000, + 0x00000035, 0x0201f800, 0x00109183, 0x5c027000, + 0x04020012, 0x591c001c, 0x800001c0, 0x0400000f, + 0x497a381c, 0x591c0414, 0x8c000502, 0x02000800, + 0x00100615, 0x84000502, 0x48023c14, 0x591c1406, + 0x82080580, 0x00000003, 0x04000006, 0x82080580, + 0x00000006, 0x04000005, 0x0401fc9e, 0x0401f004, + 0x0401f805, 0x0401f002, 0x0401f8c0, 0x5c023800, + 0x1c01f000, 0x4d2c0000, 0x591e5808, 0x4933c857, + 0x491fc857, 0x493bc857, 0x492fc857, 0x83380580, + 0x00000015, 0x040000b3, 0x83380580, 0x00000016, + 0x040200ae, 0x4d300000, 0x411e6000, 0x59cc0207, + 0x4803c857, 0x82000d00, 0x0000ff00, 0x82040580, + 0x00001700, 0x04000004, 0x82040580, 0x00000300, + 0x0402005b, 0x591c0203, 0x4803c857, 0x82000580, + 0x0000000d, 0x0400003f, 0x812e59c0, 0x0400009a, + 0x591c0202, 0x4803c857, 0x82000580, 0x0000ffff, + 0x0402007e, 0x592c020a, 0x4803c857, 0x82000500, + 0x00000003, 0x82000580, 0x00000002, 0x04020007, + 0x592c080f, 0x591c0011, 0x4803c857, 0x4807c857, + 0x80040580, 0x04020071, 0x591c0414, 0x4803c857, + 0x8c000500, 0x0402006d, 0x41780800, 0x591c1206, + 0x42000000, 0x0000000a, 0x0201f800, 0x001063ee, + 0x592c0406, 0x4803c857, 0x800001c0, 0x0400000c, + 0x80080c80, 0x04001004, 0x02020800, 0x00100615, + 0x80001040, 0x480a5c06, 0x800811c0, 0x04020004, + 0x0201f800, 0x00108b3c, 0x0401f06b, 0x0201f800, + 0x00108ee7, 0x591c0817, 0x591c0018, 0x48065808, + 0x48025809, 0x59300007, 0x8c000500, 0x02020800, + 0x00100ee4, 0x497a3808, 0x0201f800, 0x000201ee, + 0x0402004a, 0x411e6000, 0x0401fc3e, 0x0401f05a, + 0x0401fc6d, 0x04000013, 0x49366009, 0x4a026406, + 0x00000003, 0x492e6008, 0x591c0817, 0x591c1018, + 0x48066017, 0x480a6018, 0x4d380000, 0x591e7403, + 0x4d300000, 0x411e6000, 0x0401fc2e, 0x5c026000, + 0x0201f800, 0x000208d8, 0x5c027000, 0x0401f046, + 0x59a80039, 0x48023a05, 0x0401f043, 0x59cc0407, + 0x82000580, 0x0000000b, 0x04020025, 0x59340a00, + 0x84040d0e, 0x48066a00, 0x592c0a04, 0x82040d00, + 0x000000ff, 0x82040d80, 0x00000014, 0x04000003, + 0x4a02621d, 0x00000003, 0x59300007, 0x8c000500, + 0x02020800, 0x00100ee4, 0x4d400000, 0x42028000, + 0x00000003, 0x592c0a08, 0x0201f800, 0x00104bee, + 0x0201f800, 0x00020381, 0x5c028000, 0x497a6008, + 0x4a026403, 0x00000085, 0x4a026203, 0x00000009, + 0x4a026406, 0x00000002, 0x42000800, 0x8000404b, + 0x0201f800, 0x00020855, 0x0401f01b, 0x59cc0207, + 0x82000580, 0x00002a00, 0x04020004, 0x59a80039, + 0x48023a05, 0x0401f014, 0x812e59c0, 0x02000800, + 0x00100615, 0x4a025a04, 0x00000103, 0x591c0007, + 0x8c000500, 0x02020800, 0x00100ee4, 0x591c0402, + 0x48025c06, 0x4a025a06, 0x00000003, 0x0201f800, + 0x00020381, 0x0201f800, 0x00107698, 0x0201f800, + 0x00104801, 0x5c026000, 0x0201f800, 0x000208b4, + 0x0401f002, 0x5c026000, 0x5c025800, 0x1c01f000, + 0x0401f819, 0x0401f7fd, 0x4933c857, 0x83380580, + 0x00000015, 0x04020004, 0x59a80039, 0x48023a05, + 0x0401f00d, 0x83380580, 0x00000016, 0x0402000d, + 0x4d300000, 0x411e6000, 0x0201f800, 0x0010a3fa, + 0x0201f800, 0x00020831, 0x0201f800, 0x000208b4, + 0x5c026000, 0x497a381c, 0x0201f800, 0x000208b4, + 0x1c01f000, 0x591c0414, 0x84000540, 0x48023c14, + 0x59cc100b, 0x4933c857, 0x491fc857, 0x492fc857, + 0x4803c857, 0x480bc857, 0x8c08153c, 0x04000006, + 0x59a80039, 0x48023a05, 0x497a381c, 0x0201f000, + 0x000208b4, 0x4d300000, 0x411e6000, 0x0201f800, + 0x0010898b, 0x5c026000, 0x591c0406, 0x82000580, + 0x00000000, 0x02000000, 0x000208b4, 0x591c0403, + 0x82000580, 0x00000050, 0x0402000d, 0x4d300000, + 0x411e6000, 0x4a026203, 0x00000001, 0x42000800, + 0x80000043, 0x0201f800, 0x00020855, 0x5c026000, + 0x497a381c, 0x0201f000, 0x000208b4, 0x591c0203, + 0x82000580, 0x0000000d, 0x04000014, 0x812e59c0, + 0x02000800, 0x00100615, 0x591c0203, 0x82000580, + 0x00000004, 0x04020011, 0x592c020a, 0x8c000502, + 0x0400000e, 0x4a023812, 0x0fffffff, 0x592c0208, + 0x8400051e, 0x48025a08, 0x42000000, 0x00000001, + 0x48023a14, 0x0401f021, 0x42000000, 0x00000007, + 0x48023a14, 0x0401f01d, 0x592c020a, 0x4803c857, + 0x8c000500, 0x0402000b, 0x8c000502, 0x040007f7, + 0x591c0414, 0x8c00051c, 0x040207eb, 0x591c0011, + 0x4803c857, 0x800001c0, 0x040007f0, 0x0401f7e6, + 0x8c08153a, 0x040207ed, 0x59cc000a, 0x592c180f, + 0x4803c857, 0x480fc857, 0x800c0580, 0x040007e7, + 0x59cc000a, 0x4803c857, 0x48023816, 0x42000000, + 0x00000005, 0x48023a14, 0x0201f000, 0x0010901b, + 0x4933c857, 0x4d1c0000, 0x59cc0001, 0x59341002, + 0x80080580, 0x82000500, 0x00ffffff, 0x04020041, + 0x59301419, 0x0201f800, 0x001091d9, 0x02000800, + 0x00100615, 0x591c1406, 0x82080580, 0x00000007, + 0x04000038, 0x82080580, 0x00000002, 0x04000035, + 0x82080580, 0x00000000, 0x04000032, 0x591c0202, + 0x82000d80, 0x0000ffff, 0x04000004, 0x59301a19, + 0x800c0580, 0x0402002b, 0x83380580, 0x00000015, + 0x04000026, 0x4d300000, 0x4d2c0000, 0x411e6000, + 0x59325808, 0x0201f800, 0x00108df4, 0x02000800, + 0x00100615, 0x592c0204, 0x82000500, 0x000000ff, + 0x82000580, 0x00000014, 0x04000003, 0x4a02621d, + 0x00000003, 0x42028000, 0x00000003, 0x592c0a08, + 0x0201f800, 0x00104bee, 0x0201f800, 0x00020381, + 0x5c025800, 0x497a6008, 0x4a026403, 0x00000085, + 0x4a026203, 0x00000009, 0x4a026406, 0x00000002, + 0x42000800, 0x8000404b, 0x0201f800, 0x00020855, + 0x5c026000, 0x0401f003, 0x59a80039, 0x48023a05, + 0x497a381c, 0x0201f800, 0x000208b4, 0x5c023800, + 0x1c01f000, 0x4933c857, 0x4c580000, 0x4d2c0000, + 0x59325808, 0x83383580, 0x00000015, 0x04000010, + 0x59342200, 0x84102502, 0x48126a00, 0x0201f800, + 0x00108df4, 0x04000066, 0x0201f800, 0x00109360, + 0x04020005, 0x4200b000, 0x00000002, 0x0201f800, + 0x00109346, 0x0401fa0d, 0x0401f079, 0x83cc1400, + 0x00000008, 0x4200b000, 0x00000002, 0x83341c00, + 0x00000006, 0x0201f800, 0x001082ff, 0x04020015, + 0x83cc1400, 0x0000000a, 0x4200b000, 0x00000002, + 0x83341c00, 0x00000008, 0x0201f800, 0x001082ff, + 0x0402000c, 0x0201f800, 0x00101e1b, 0x59342200, + 0x59cc1007, 0x800811c0, 0x04000003, 0x480a6801, + 0x84102542, 0x8410251a, 0x48126a00, 0x0401f05f, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x42000000, 0x0010b663, 0x0201f800, + 0x0010a86e, 0x59340200, 0x84000558, 0x48026a00, + 0x4d300000, 0x0201f800, 0x00020892, 0x02000800, + 0x00100615, 0x49366009, 0x497a6008, 0x4a026406, + 0x00000001, 0x4a026403, 0x00000001, 0x42003000, + 0x00000003, 0x0201f800, 0x0010a766, 0x0201f800, + 0x0010393e, 0x04000011, 0x41782800, 0x42003000, + 0x00000001, 0x4d400000, 0x42028000, 0x00000029, + 0x0201f800, 0x0010a250, 0x5c028000, 0x4a026406, + 0x00000004, 0x4a026203, 0x00000007, 0x4a026420, + 0x00000001, 0x0401f009, 0x4a026203, 0x00000001, + 0x42000800, 0x0000000b, 0x0201f800, 0x001043c7, + 0x0201f800, 0x00106470, 0x5c026000, 0x0201f800, + 0x00108df4, 0x04000022, 0x0201f800, 0x00109360, + 0x04020022, 0x0401f9b1, 0x0401f01d, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x59340200, + 0x84000558, 0x48026a00, 0x42003000, 0x00000003, + 0x41782800, 0x42002000, 0x00000005, 0x4d400000, + 0x4d440000, 0x59368c03, 0x42028000, 0x00000029, + 0x0201f800, 0x0010962a, 0x5c028800, 0x5c028000, + 0x5c027800, 0x0201f800, 0x00101e1b, 0x0201f800, + 0x000208b4, 0x0401f002, 0x0401fca9, 0x5c025800, + 0x5c00b000, 0x1c01f000, 0x4933c857, 0x41380000, + 0x83383480, 0x00000056, 0x02021800, 0x00100615, + 0x0c01f001, 0x00107c7e, 0x00107c79, 0x00107c7e, + 0x00107c7e, 0x00107c7e, 0x00107c7e, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c7e, 0x00107c77, 0x00107c7e, 0x00107c7e, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c7e, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c7e, + 0x00107c7e, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c7e, 0x00107c77, + 0x00107c77, 0x00107c7e, 0x00107c7e, 0x00107c77, + 0x00107c7e, 0x00107c7e, 0x00107c77, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c7e, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c7e, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c7e, 0x00107c77, + 0x00107c77, 0x00107c77, 0x00107c7e, 0x0201f800, + 0x00100615, 0x4a026203, 0x00000001, 0x493a6403, + 0x0201f000, 0x00106470, 0x4933c857, 0x4a026203, + 0x00000001, 0x493a6403, 0x0201f000, 0x00106470, + 0x59300403, 0x82003480, 0x00000056, 0x02021800, + 0x00100615, 0x83383580, 0x00000013, 0x04000096, + 0x83383580, 0x00000027, 0x0402004c, 0x4933c857, + 0x0201f800, 0x001068f6, 0x0201f800, 0x00108ef1, + 0x0400000b, 0x0201f800, 0x00108f05, 0x04000041, + 0x59300403, 0x82000d80, 0x00000022, 0x04020038, + 0x0401fc61, 0x0400003a, 0x0401f03a, 0x0201f800, + 0x00101e1b, 0x42000800, 0x00000007, 0x0201f800, + 0x001043c7, 0x0401f901, 0x4d440000, 0x59368c03, + 0x83440580, 0x000007fe, 0x04020008, 0x59a81026, + 0x84081540, 0x0201f800, 0x00104e0d, 0x04020002, + 0x8408154a, 0x480b5026, 0x42028000, 0x00000029, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x836c0580, 0x00000003, 0x0400000c, + 0x59326809, 0x59340008, 0x800001c0, 0x04020008, + 0x59368c03, 0x4933c857, 0x4937c857, 0x4947c857, + 0x0201f800, 0x00104451, 0x0401f00c, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x42003000, + 0x00000015, 0x41782800, 0x42002000, 0x00000003, + 0x0201f800, 0x0010962a, 0x5c028800, 0x0201f800, + 0x001090ec, 0x0201f000, 0x000208b4, 0x1c01f000, + 0x0401f8ce, 0x0401f7fa, 0x83380580, 0x00000014, + 0x0400000c, 0x4933c857, 0x0201f800, 0x00106cb4, + 0x02020000, 0x001076fb, 0x59300203, 0x82000580, + 0x00000002, 0x040000ef, 0x0201f800, 0x00100615, + 0x4933c857, 0x0201f800, 0x001068f6, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42003000, 0x00000016, 0x41782800, 0x4d400000, + 0x4d440000, 0x59368c03, 0x42002000, 0x00000009, + 0x42028000, 0x00000029, 0x0201f800, 0x0010962a, + 0x5c028800, 0x5c028000, 0x42000000, 0x0010b663, + 0x0201f800, 0x0010a86e, 0x0201f800, 0x00108ef1, + 0x0402000c, 0x0201f800, 0x00101e1b, 0x0401f89f, + 0x59340c03, 0x82040580, 0x000007fe, 0x040207c8, + 0x59a80826, 0x84040d40, 0x48075026, 0x0401f7c4, + 0x0201f800, 0x00108f05, 0x04020003, 0x0401f893, + 0x0401f7bf, 0x59300403, 0x82000d80, 0x00000032, + 0x04020004, 0x0201f800, 0x001020b2, 0x0401f7b8, + 0x59300403, 0x82000d80, 0x00000022, 0x04000887, + 0x0401f7b3, 0x4933c857, 0x4803c857, 0x0c01f001, + 0x00107da0, 0x00107da0, 0x00107da0, 0x00107da0, + 0x00107da0, 0x00107da0, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d83, 0x00107da0, + 0x00107d7a, 0x00107da0, 0x00107da0, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107da0, 0x00107da0, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d7a, 0x00107d91, 0x00107da0, + 0x00107d7a, 0x00107d8a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107d8a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107da0, 0x00107d8d, 0x00107d7a, + 0x00107d7c, 0x00107da0, 0x00107d7a, 0x00107da0, + 0x00107da0, 0x00107d7a, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107da0, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107da0, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107da0, 0x00107d7a, 0x00107d7a, + 0x00107d7a, 0x00107da0, 0x0201f800, 0x00100615, + 0x4d2c0000, 0x59325808, 0x0201f800, 0x00020381, + 0x5c025800, 0x0201f000, 0x000208b4, 0x4a026203, + 0x00000005, 0x59a80039, 0x48026205, 0x59a80037, + 0x48026206, 0x1c01f000, 0x5930081e, 0x49780a05, + 0x0401f014, 0x0201f800, 0x001090ec, 0x0201f000, + 0x000208b4, 0x0201f800, 0x001020b2, 0x0201f800, + 0x0010698c, 0x04000005, 0x0201f800, 0x001068f6, + 0x0201f000, 0x000208b4, 0x0201f800, 0x001068f6, + 0x0201f800, 0x000208b4, 0x0201f000, 0x00106982, + 0x4933c857, 0x4a026203, 0x00000002, 0x59a80037, + 0x48026206, 0x1c01f000, 0x4933c857, 0x0201f800, + 0x00108df4, 0x0400002a, 0x4d2c0000, 0x0201f800, + 0x00109360, 0x0402000a, 0x4d400000, 0x42028000, + 0x00000031, 0x42000800, 0x00000004, 0x0201f800, + 0x00109204, 0x5c028000, 0x0401f01c, 0x59300c06, + 0x82040580, 0x00000010, 0x04000004, 0x82040580, + 0x00000011, 0x0402000a, 0x4a025a06, 0x00000031, + 0x4a02580d, 0x00000004, 0x4a02580e, 0x000000ff, + 0x0201f800, 0x00020381, 0x0401f00c, 0x592c0404, + 0x8c00051e, 0x04000009, 0x4a025a04, 0x00000103, + 0x4a025805, 0x01000000, 0x5931d821, 0x58ef400b, + 0x58ec0009, 0x0801f800, 0x5c025800, 0x1c01f000, + 0x4933c857, 0x59340400, 0x82000500, 0x000000ff, + 0x82003480, 0x0000000c, 0x02021800, 0x00100615, + 0x59303403, 0x82180d80, 0x0000004d, 0x02000000, + 0x00109154, 0x82180d80, 0x00000033, 0x02000000, + 0x0010910f, 0x82180d80, 0x00000028, 0x02000000, + 0x00108f46, 0x82180d80, 0x00000029, 0x02000000, + 0x00108f5a, 0x82180d80, 0x0000001f, 0x02000000, + 0x001078af, 0x82180d80, 0x00000055, 0x02000000, + 0x00107888, 0x82180d80, 0x00000000, 0x0400058e, + 0x82180d80, 0x00000022, 0x02000000, 0x001078dc, + 0x82180d80, 0x00000035, 0x02000000, 0x001079d7, + 0x82180d80, 0x00000039, 0x04000536, 0x82180d80, + 0x0000003d, 0x02000000, 0x0010790c, 0x82180d80, + 0x00000044, 0x02000000, 0x00107949, 0x82180d80, + 0x00000049, 0x02000000, 0x0010799e, 0x82180d80, + 0x00000041, 0x02000000, 0x0010798a, 0x82180d80, + 0x00000043, 0x02000000, 0x001092a5, 0x82180d80, + 0x00000051, 0x02000000, 0x0010930b, 0x82180d80, + 0x00000004, 0x04020003, 0x42000000, 0x00000001, + 0x83380d80, 0x00000015, 0x04000006, 0x83380d80, + 0x00000016, 0x02020000, 0x001076fb, 0x0401f226, + 0x4d2c0000, 0x4d3c0000, 0x0c01f804, 0x5c027800, + 0x5c025800, 0x1c01f000, 0x00107e42, 0x00107e46, + 0x00107e42, 0x00107ebb, 0x00107e42, 0x00107fc7, + 0x00108060, 0x00107e42, 0x00107e42, 0x00108029, + 0x00107e42, 0x0010803b, 0x4933c857, 0x497a6007, + 0x59300808, 0x58040000, 0x4a000a04, 0x00000103, + 0x0201f000, 0x000208b4, 0x4933c857, 0x40000000, + 0x40000000, 0x1c01f000, 0x4933c857, 0x59a80016, + 0x82000580, 0x00000074, 0x0402005c, 0x0201f800, + 0x0010a0b1, 0x04020016, 0x0401f85c, 0x0201f800, + 0x00108df4, 0x0400000c, 0x0201f800, 0x00109360, + 0x04020009, 0x41780800, 0x4d400000, 0x42028000, + 0x00000000, 0x0201f800, 0x00109204, 0x5c028000, + 0x0401f003, 0x0201f800, 0x00101e1b, 0x0201f800, + 0x00104711, 0x0201f000, 0x000208b4, 0x0201f800, + 0x00108df4, 0x04000007, 0x0201f800, 0x00109360, + 0x04020004, 0x0401ff3d, 0x0201f000, 0x000208b4, + 0x417a7800, 0x0201f800, 0x00101de2, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x59340200, + 0x84000558, 0x48026a00, 0x42003000, 0x00000003, + 0x0201f800, 0x0010a766, 0x4d300000, 0x0201f800, + 0x00020892, 0x02000800, 0x00100615, 0x49366009, + 0x497a6008, 0x4a026406, 0x00000001, 0x4a026403, + 0x00000001, 0x0201f800, 0x0010393e, 0x04000011, + 0x4a026406, 0x00000004, 0x4a026203, 0x00000007, + 0x4a026420, 0x00000001, 0x42003000, 0x00000001, + 0x4d400000, 0x42028000, 0x00000029, 0x41782800, + 0x0201f800, 0x0010a250, 0x5c028000, 0x0401f009, + 0x42000800, 0x0000000b, 0x0201f800, 0x001043c7, + 0x4a026203, 0x00000001, 0x0201f800, 0x00106470, + 0x5c026000, 0x0401ff05, 0x0201f800, 0x00101e1b, + 0x0201f000, 0x000208b4, 0x0401ff00, 0x42000000, + 0x00000001, 0x0401f0de, 0x4933c857, 0x59340200, + 0x8c000500, 0x0400000d, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x001043bd, 0x5c027800, 0x0201f800, + 0x0010393e, 0x04000005, 0x42000800, 0x00000006, + 0x0201f800, 0x001043c7, 0x1c01f000, 0x4933c857, + 0x59a80816, 0x82040580, 0x00000074, 0x0400000e, + 0x4807c857, 0x82040580, 0x00000100, 0x040200b7, + 0x59cc0408, 0x4803c857, 0x8c000500, 0x040000b3, + 0x59341403, 0x82080580, 0x000007fe, 0x04000006, + 0x0401f0ae, 0x59341403, 0x82080580, 0x000007fe, + 0x0402001a, 0x59a80026, 0x8c000506, 0x04000015, + 0x59cc0000, 0x82000500, 0x000000ff, 0x59a80810, + 0x82040d00, 0x000000ff, 0x80040580, 0x0400000d, + 0x0201f800, 0x00101e1b, 0x0201f800, 0x000208b4, + 0x42000000, 0x0010b651, 0x0201f800, 0x0010a86e, + 0x4202d800, 0x00000001, 0x0201f000, 0x00103f37, + 0x0401fa9c, 0x0401f04c, 0x0201f800, 0x00104480, + 0x59341403, 0x82080580, 0x000007fc, 0x0402001f, + 0x4a026802, 0x00fffffc, 0x0201f800, 0x00108df4, + 0x04000012, 0x0201f800, 0x00109360, 0x0402000f, + 0x0401f8a9, 0x41780800, 0x4d400000, 0x42028000, + 0x00000000, 0x0201f800, 0x00109204, 0x5c028000, + 0x42000800, 0x00000004, 0x0201f800, 0x001043c7, + 0x0201f000, 0x000208b4, 0x42000800, 0x00000004, + 0x0201f800, 0x001043c7, 0x0201f800, 0x00101e1b, + 0x0201f000, 0x000208b4, 0x59a8006f, 0x8c000502, + 0x04000011, 0x0201f800, 0x00104e0d, 0x42001000, + 0x00000010, 0x04020009, 0x59340002, 0x82000500, + 0x00ff0000, 0x82000580, 0x00ff0000, 0x04000006, + 0x42001000, 0x00000008, 0x0201f800, 0x00104ada, + 0x0402005a, 0x0201f800, 0x00108df4, 0x0400005b, + 0x0201f800, 0x00109360, 0x04020005, 0x592c0404, + 0x8c00051c, 0x040207c9, 0x0401f877, 0x42000800, + 0x00000005, 0x0201f800, 0x001043c7, 0x4a026203, + 0x00000001, 0x4a026403, 0x00000003, 0x0201f000, + 0x00106470, 0x59cc0408, 0x8c000518, 0x04000010, + 0x0201f800, 0x001090ab, 0x0201f800, 0x00104e0d, + 0x04000004, 0x59cc0408, 0x8c000516, 0x040207b3, + 0x59a80026, 0x8400054a, 0x48035026, 0x59a80010, + 0x84000570, 0x48038832, 0x0401f7ac, 0x42001000, + 0x000000ef, 0x480b5010, 0x497b8830, 0x84081570, + 0x480b8832, 0x59c40802, 0x84040d4c, 0x48078802, + 0x0201f800, 0x001090d5, 0x59a80026, 0x84000548, + 0x48035026, 0x0201f800, 0x0010a1ec, 0x0402079b, + 0x59a80026, 0x8400054c, 0x48035026, 0x42000800, + 0x00000006, 0x0201f800, 0x001043c7, 0x417a7800, + 0x0201f800, 0x001043bd, 0x42000000, 0x000000e8, + 0x0201f800, 0x001059b9, 0x02000800, 0x001043fc, + 0x02020800, 0x00100615, 0x49366009, 0x59340200, + 0x8400051a, 0x48026a00, 0x42000800, 0x00000003, + 0x0201f800, 0x001043c7, 0x4a026406, 0x00000001, + 0x4a026203, 0x00000001, 0x4a026403, 0x00000002, + 0x0201f000, 0x00106470, 0x0401fe2c, 0x42000000, + 0x00000001, 0x0401f00a, 0x599c0017, 0x8c00050a, + 0x040007ab, 0x42000800, 0x00000004, 0x0201f800, + 0x001043c7, 0x0201f000, 0x000208b4, 0x4933c857, + 0x80003540, 0x04000005, 0x42000800, 0x00000007, + 0x0201f800, 0x001043c7, 0x801831c0, 0x0402000e, + 0x59302008, 0x801021c0, 0x04000004, 0x58100404, + 0x8c00051e, 0x04020008, 0x59341c03, 0x42002000, + 0x00000004, 0x42003000, 0x00000012, 0x0201f800, + 0x001038c7, 0x0201f800, 0x00101e1b, 0x0201f000, + 0x000208b4, 0x4c5c0000, 0x4d2c0000, 0x59325808, + 0x0201f800, 0x00105439, 0x5c025800, 0x59cc0008, + 0x48002805, 0x59cc0009, 0x48002806, 0x49782807, + 0x49782808, 0x49782809, 0x4978280a, 0x59cc0013, + 0x8c00053e, 0x04000009, 0x59cc0414, 0x900001c0, + 0x59ccbc15, 0x805c0540, 0x48002807, 0x59cc0416, + 0x900001c0, 0x48002808, 0x59cc0017, 0x8c00053e, + 0x04000009, 0x59cc0418, 0x900001c0, 0x59ccbc19, + 0x805c0540, 0x48002809, 0x59cc041a, 0x900001c0, + 0x4800280a, 0x5c00b800, 0x1c01f000, 0x4933c857, + 0x59a80016, 0x82000580, 0x00000014, 0x04020048, + 0x59a8006f, 0x8c000502, 0x04000015, 0x0201f800, + 0x00104e0d, 0x42001000, 0x00000010, 0x04020009, + 0x59340002, 0x82000500, 0x00ff0000, 0x82000580, + 0x00ff0000, 0x0400000a, 0x42001000, 0x00000008, + 0x0201f800, 0x00104ada, 0x04000005, 0x59a8006f, + 0x8400054c, 0x4803506f, 0x0401f031, 0x836c0580, + 0x00000003, 0x0402000b, 0x59300008, 0x80000540, + 0x04020008, 0x59341c03, 0x42002000, 0x00000006, + 0x42003000, 0x00000013, 0x0201f800, 0x001038c7, + 0x0201f800, 0x001044e1, 0x0401feb8, 0x0401fa1d, + 0x0402001f, 0x59340404, 0x80000540, 0x0400001c, + 0x42000800, 0x00000006, 0x0201f800, 0x001043c7, + 0x0201f800, 0x00108df4, 0x04000011, 0x0201f800, + 0x00109360, 0x0402000a, 0x41780800, 0x4d400000, + 0x42028000, 0x00000000, 0x0201f800, 0x00109204, + 0x5c028000, 0x0201f000, 0x000208b4, 0x4a025a04, + 0x00000103, 0x4a025805, 0x02000000, 0x0201f800, + 0x00101e1b, 0x0201f000, 0x000208b4, 0x0201f800, + 0x00104a83, 0x0201f800, 0x00108df4, 0x04000007, + 0x0201f800, 0x00109360, 0x04020004, 0x0401fd8b, + 0x0201f000, 0x000208b4, 0x0401fd88, 0x80000580, + 0x59a8006f, 0x8c00050c, 0x04000005, 0x8400050c, + 0x4803506f, 0x82000540, 0x00000001, 0x0401ff60, + 0x1c01f000, 0x4933c857, 0x59a80016, 0x82000580, + 0x00000014, 0x0402000b, 0x42000800, 0x0000000b, + 0x0201f800, 0x001043c7, 0x4a026203, 0x00000001, + 0x4a026403, 0x00000001, 0x0201f000, 0x00106470, + 0x42000000, 0x00000001, 0x0401f74d, 0x4933c857, + 0x40003000, 0x59a80016, 0x82000580, 0x00000004, + 0x0402000a, 0x82183580, 0x0000000b, 0x04020005, + 0x42000800, 0x00000007, 0x0201f800, 0x001043c7, + 0x0201f000, 0x000208b4, 0x42000000, 0x00000001, + 0x0401f73b, 0x4803c857, 0x4d2c0000, 0x4d3c0000, + 0x0c01f804, 0x5c027800, 0x5c025800, 0x1c01f000, + 0x00107e42, 0x0010806f, 0x00107e42, 0x001080c4, + 0x00107e42, 0x00108132, 0x00108060, 0x00107e42, + 0x00107e42, 0x00108152, 0x00107e42, 0x00108162, + 0x4933c857, 0x4d1c0000, 0x59301403, 0x82080580, + 0x00000003, 0x04000008, 0x82081580, 0x0000001e, + 0x04020003, 0x0201f800, 0x000208b4, 0x5c023800, + 0x1c01f000, 0x0401ff5a, 0x0401f7fd, 0x4933c857, + 0x0201f800, 0x00108df4, 0x0400000b, 0x0201f800, + 0x00109360, 0x04020008, 0x4200b000, 0x00000002, + 0x0201f800, 0x00109346, 0x0401fd2c, 0x0201f000, + 0x000208b4, 0x0401f8f5, 0x04020030, 0x417a7800, + 0x0201f800, 0x001043bd, 0x417a7800, 0x0201f800, + 0x00101de2, 0x42000000, 0x0010b663, 0x0201f800, + 0x0010a86e, 0x59340200, 0x84000558, 0x48026a00, + 0x4a026403, 0x00000002, 0x42003000, 0x00000003, + 0x0201f800, 0x0010a766, 0x0201f800, 0x0010393e, + 0x04000011, 0x4d400000, 0x41782800, 0x42003000, + 0x00000005, 0x42028000, 0x00000029, 0x0201f800, + 0x0010a250, 0x5c028000, 0x4a026203, 0x00000007, + 0x4a026406, 0x00000004, 0x4a026420, 0x00000001, + 0x1c01f000, 0x42000800, 0x00000003, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x0201f800, + 0x00106470, 0x0401f7f7, 0x59cc0407, 0x82000580, + 0x00000009, 0x0402000a, 0x59340412, 0x82000500, + 0x000000ff, 0x0400000c, 0x80000040, 0x48026c12, + 0x4a026206, 0x0000000a, 0x0401f7ea, 0x59cc0207, + 0x82000500, 0x0000ff00, 0x82000580, 0x00001900, + 0x040007c2, 0x0401fce5, 0x80000580, 0x0401f6c4, + 0x4933c857, 0x59a80032, 0x80000540, 0x04000015, + 0x59340403, 0x82000580, 0x000007fe, 0x04020011, + 0x59a80010, 0x80000000, 0x48035010, 0x417a7800, + 0x0201f800, 0x001043bd, 0x42000800, 0x00000003, + 0x0201f800, 0x001043c7, 0x4a026203, 0x00000001, + 0x4a026403, 0x00000002, 0x0201f000, 0x00106470, + 0x0201f800, 0x00108df4, 0x04000011, 0x0201f800, + 0x00109360, 0x0402000e, 0x4c580000, 0x4200b000, + 0x00000002, 0x0201f800, 0x00109346, 0x5c00b000, + 0x0401fcbe, 0x42000800, 0x00000007, 0x0201f800, + 0x001043c7, 0x0201f000, 0x000208b4, 0x0401fcb7, + 0x59cc3407, 0x82183500, 0x000000ff, 0x82180580, + 0x00000005, 0x0400001c, 0x82180580, 0x0000000b, + 0x04000016, 0x59cc0207, 0x82000500, 0x0000ff00, + 0x04020004, 0x82180580, 0x00000009, 0x04000012, + 0x82000580, 0x00001900, 0x0402000c, 0x82180580, + 0x00000009, 0x0400000c, 0x42000800, 0x00000004, + 0x0201f800, 0x001043c7, 0x0201f800, 0x00101e1b, + 0x0201f000, 0x000208b4, 0x42000000, 0x00000001, + 0x0401f677, 0x0201f800, 0x00108df4, 0x59325808, + 0x04000008, 0x592c0204, 0x82000580, 0x00000139, + 0x040007f6, 0x592c0404, 0x8c00051e, 0x040207f3, + 0x59340403, 0x82000580, 0x000007fe, 0x04020007, + 0x59a80026, 0x84000540, 0x48035026, 0x0201f800, + 0x00104059, 0x0401f7e9, 0x417a7800, 0x0201f800, + 0x00101de2, 0x42003000, 0x00000005, 0x0201f800, + 0x0010a766, 0x42000000, 0x0010b663, 0x0201f800, + 0x0010a86e, 0x0401f7dd, 0x4933c857, 0x0401f84d, + 0x0402000b, 0x42000800, 0x00000005, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000003, 0x0201f000, 0x00106470, 0x42000800, + 0x00000004, 0x0201f800, 0x001043c7, 0x0201f800, + 0x00109360, 0x0402000a, 0x4c580000, 0x4200b000, + 0x00000002, 0x0201f800, 0x00109346, 0x5c00b000, + 0x0401fc5a, 0x0201f000, 0x000208b4, 0x0401fc57, + 0x80000580, 0x0401f636, 0x4933c857, 0x0401f82d, + 0x0402000b, 0x42000800, 0x00000009, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000005, 0x0201f000, 0x00106470, 0x42000000, + 0x00000001, 0x0401f626, 0x4933c857, 0x0401f81d, + 0x0402000b, 0x42000800, 0x0000000b, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000001, 0x0201f000, 0x00106470, 0x42000000, + 0x00000001, 0x0401f616, 0x4933c857, 0x59cc0407, + 0x82000580, 0x00000003, 0x04020009, 0x59cc0207, + 0x82000500, 0x0000ff00, 0x82000d80, 0x00002a00, + 0x04000003, 0x82000d80, 0x00001e00, 0x1c01f000, + 0x4933c857, 0x82000540, 0x00000001, 0x1c01f000, + 0x4933c857, 0x4d400000, 0x4c580000, 0x59a80026, + 0x82000540, 0x00000003, 0x48035026, 0x0401f85c, + 0x04000038, 0x4d340000, 0x4d440000, 0x59a80026, + 0x84000552, 0x48035026, 0x0201f800, 0x0010393e, + 0x0400000c, 0x42028000, 0x0000002a, 0x42028800, + 0x0000ffff, 0x42003000, 0x00000002, 0x0201f800, + 0x0010a258, 0x59a80805, 0x84040d44, 0x48075005, + 0x42028000, 0x0000002a, 0x4d3c0000, 0x42027800, + 0x00000200, 0x0201f800, 0x00101d90, 0x5c027800, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x0201f800, 0x00101bf0, 0x4200b000, 0x00000010, + 0x42028800, 0x000007f0, 0x4d2c0000, 0x83440580, + 0x000007fe, 0x04000003, 0x0201f800, 0x00104451, + 0x81468800, 0x8058b040, 0x040207f9, 0x5c025800, + 0x59cc0408, 0x8c00051e, 0x04000004, 0x59a80026, + 0x84000512, 0x48035026, 0x5c028800, 0x5c026800, + 0x0201f800, 0x00104480, 0x4a026802, 0x00fffffe, + 0x59a80826, 0x84040d50, 0x59cc0013, 0x8c00053e, + 0x04000003, 0x8c000536, 0x04000004, 0x59cc0017, + 0x8c000536, 0x04020002, 0x84040d10, 0x48075026, + 0x59cc0800, 0x82040d00, 0x00ffffff, 0x48075010, + 0x80040110, 0x4803501d, 0x48038881, 0x0201f800, + 0x00104e0d, 0x04000007, 0x59cc0009, 0x48035035, + 0x59cc000a, 0x48035036, 0x0201f800, 0x001090ab, + 0x5c00b000, 0x5c028000, 0x1c01f000, 0x4933c857, + 0x4c580000, 0x59a80010, 0x82000500, 0x00ffff00, + 0x04000022, 0x59cc1000, 0x82081500, 0x00ffff00, + 0x80080580, 0x04000004, 0x42000000, 0x0010b639, + 0x0401f016, 0x83cc1400, 0x0000000b, 0x4200b000, + 0x00000002, 0x83341c00, 0x00000006, 0x0401f904, + 0x04000004, 0x42000000, 0x0010b63a, 0x0401f00b, + 0x83cc1400, 0x0000000d, 0x4200b000, 0x00000002, + 0x83341c00, 0x00000008, 0x0401f8f9, 0x04000007, + 0x42000000, 0x0010b63b, 0x0201f800, 0x0010a86e, + 0x82000540, 0x00000001, 0x5c00b000, 0x1c01f000, + 0x4933c857, 0x59cc0206, 0x82000580, 0x00000014, + 0x04020016, 0x59cc0407, 0x82000580, 0x00000800, + 0x04020012, 0x59cc0207, 0x8c00051a, 0x0400000d, + 0x82000500, 0x00000f00, 0x82000580, 0x00000100, + 0x04020008, 0x59cc020a, 0x8c000508, 0x04020003, + 0x8c00050a, 0x04000003, 0x80000580, 0x1c01f000, + 0x82000540, 0x00000001, 0x1c01f000, 0x4933c857, + 0x4943c857, 0x493fc857, 0x4c5c0000, 0x4d300000, + 0x4d340000, 0x4d2c0000, 0x4d380000, 0x4130b800, + 0x42026000, 0x0010cfc0, 0x59a8000e, 0x81640480, + 0x040210c1, 0x8d3e7d12, 0x04000004, 0x405c0000, + 0x81300580, 0x040000b7, 0x59300406, 0x82000c80, + 0x00000012, 0x04021015, 0x59326809, 0x0c01f001, + 0x001082f4, 0x0010825f, 0x00108278, 0x00108283, + 0x00108258, 0x00108271, 0x001082ac, 0x001082f4, + 0x00108256, 0x001082c0, 0x001082cf, 0x00108256, + 0x00108256, 0x00108256, 0x00108256, 0x001082f4, + 0x001082e5, 0x001082dd, 0x0201f800, 0x00100615, + 0x8d3e7d18, 0x04000003, 0x8d3e7d16, 0x04000004, + 0x59300420, 0x8c000500, 0x04020096, 0x59300403, + 0x82000580, 0x00000043, 0x04000092, 0x0201f800, + 0x00108ef1, 0x02000800, 0x00101e1b, 0x0201f800, + 0x00108f05, 0x02000800, 0x00107da6, 0x8d3e7d06, + 0x04000086, 0x0201f800, 0x0010909d, 0x04000085, + 0x0401f082, 0x8d3e7d18, 0x04000003, 0x8d3e7d16, + 0x04000004, 0x59300420, 0x8c000500, 0x0402007d, + 0x59325808, 0x0201f800, 0x00108df4, 0x04000077, + 0x49425a06, 0x497a5c09, 0x0201f800, 0x00020381, + 0x0201f800, 0x00108ee7, 0x0401f070, 0x813669c0, + 0x02000800, 0x00100615, 0x8d3e7d06, 0x04000004, + 0x59340200, 0x8c00050e, 0x0402006a, 0x59300004, + 0x8400055c, 0x48026004, 0x59300203, 0x82000580, + 0x00000004, 0x02000800, 0x00100ee4, 0x59325808, + 0x0201f800, 0x00108df4, 0x0400005c, 0x4a025a04, + 0x00000103, 0x59300402, 0x48025c06, 0x592c0408, + 0x8c000512, 0x04000006, 0x4d2c0000, 0x592e5809, + 0x0201f800, 0x00100843, 0x5c025800, 0x49425a06, + 0x497a5c09, 0x0201f800, 0x00109365, 0x0201f800, + 0x00020381, 0x0201f800, 0x00108ee7, 0x0401f047, + 0x8c000518, 0x04000047, 0x59300203, 0x82000580, + 0x00000004, 0x02000800, 0x00100ee4, 0x59325808, + 0x0201f800, 0x00108df4, 0x0400003c, 0x49425a06, + 0x497a5c09, 0x0201f800, 0x0010a4ae, 0x0201f800, + 0x00109365, 0x0201f800, 0x00020381, 0x0401f033, + 0x0201f800, 0x0010600e, 0x04000032, 0x59300203, + 0x82000580, 0x00000004, 0x04020004, 0x0201f800, + 0x00100ee4, 0x0401f02b, 0x42027000, 0x00000047, + 0x0201f800, 0x000208d8, 0x0401f026, 0x59300203, + 0x82000580, 0x00000004, 0x02000800, 0x00100ee4, + 0x59325808, 0x0201f800, 0x00108df4, 0x0400001b, + 0x49425a06, 0x497a5c09, 0x0201f800, 0x00020381, + 0x0401f016, 0x833c0500, 0x00001800, 0x04000015, + 0x8d3e7d16, 0x04020013, 0x59325817, 0x0201f800, + 0x00100843, 0x59300203, 0x82000580, 0x00000004, + 0x02000800, 0x00100ee4, 0x59325808, 0x0201f800, + 0x00108df4, 0x04000005, 0x49425a06, 0x497a5c09, + 0x0201f800, 0x00020381, 0x0201f800, 0x00107698, + 0x83326400, 0x00000024, 0x41580000, 0x81300480, + 0x0400173e, 0x5c027000, 0x5c025800, 0x5c026800, + 0x5c026000, 0x5c00b800, 0x1c01f000, 0x5c000000, + 0x4c000000, 0x4803c857, 0x480bc857, 0x480fc857, + 0x485bc857, 0x50080800, 0x500c0000, 0x80042580, + 0x04020007, 0x80081000, 0x800c1800, 0x8058b040, + 0x040207f9, 0x80000580, 0x1c01f000, 0x4803c857, + 0x4807c857, 0x480bc857, 0x480fc857, 0x80040480, + 0x04001006, 0x42000000, 0x00000001, 0x82040d40, + 0x00000001, 0x1c01f000, 0x41780000, 0x0401f7fc, + 0x83380480, 0x00000053, 0x02021800, 0x00100615, + 0x83380480, 0x0000004b, 0x02001800, 0x00100615, + 0x0c01f001, 0x0010832f, 0x0010832f, 0x0010832f, + 0x0010832f, 0x0010832d, 0x0010832d, 0x0010832d, + 0x0010832f, 0x0201f800, 0x00100615, 0x493bc857, + 0x4a026203, 0x0000000d, 0x493a6403, 0x42000800, + 0x80000000, 0x0201f000, 0x00020855, 0x83380580, + 0x00000013, 0x04020008, 0x59300403, 0x82000580, + 0x00000050, 0x02020800, 0x00100615, 0x0201f000, + 0x000208b4, 0x4933c857, 0x83380580, 0x00000027, + 0x04020030, 0x4933c857, 0x0201f800, 0x001068f6, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x42000000, 0x0010b663, 0x0201f800, + 0x0010a86e, 0x4d2c0000, 0x59325808, 0x0201f800, + 0x00108df4, 0x492fc857, 0x0400000d, 0x4a025a04, + 0x00000103, 0x59300c02, 0x48065c06, 0x4a025a06, + 0x00000029, 0x497a5c09, 0x592c0c08, 0x84040d50, + 0x48065c08, 0x0201f800, 0x00020381, 0x5c025800, + 0x42003000, 0x00000015, 0x41782800, 0x42002000, + 0x00000003, 0x4d400000, 0x4d440000, 0x59368c03, + 0x42028000, 0x00000029, 0x0201f800, 0x0010962a, + 0x5c028800, 0x5c028000, 0x0201f000, 0x000208b4, + 0x83380580, 0x00000014, 0x0402000d, 0x59300403, + 0x82000c80, 0x00000053, 0x02021800, 0x00100615, + 0x82000480, 0x00000040, 0x02001800, 0x00100615, + 0x4933c857, 0x4803c857, 0x0c01f00e, 0x83380580, + 0x00000053, 0x0400000a, 0x83380580, 0x00000048, + 0x02020800, 0x00100615, 0x59300403, 0x82000580, + 0x00000050, 0x02020800, 0x00100615, 0x1c01f000, + 0x001083a5, 0x001083a3, 0x001083a3, 0x001083a3, + 0x001083a3, 0x001083a3, 0x001083a3, 0x001083a3, + 0x001083a3, 0x001083a3, 0x001083a3, 0x001083bc, + 0x001083bc, 0x001083bc, 0x001083bc, 0x001083a3, + 0x001083bc, 0x001083a3, 0x001083bc, 0x0201f800, + 0x00100615, 0x4933c857, 0x0201f800, 0x001068f6, + 0x0201f800, 0x00108df4, 0x02000000, 0x000208b4, + 0x4d2c0000, 0x59325808, 0x4a025a04, 0x00000103, + 0x59300402, 0x48025c06, 0x4a025a06, 0x00000006, + 0x497a5c09, 0x0201f800, 0x00020381, 0x5c025800, + 0x0201f800, 0x00108ee7, 0x0201f000, 0x000208b4, + 0x4933c857, 0x0201f800, 0x001068f6, 0x0201f000, + 0x000208b4, 0x0201f800, 0x00100615, 0x5930001c, + 0x800001c0, 0x02020800, 0x0010961a, 0x59300004, + 0x8c00053e, 0x04020029, 0x59325808, 0x592c0c08, + 0x59cc2a08, 0x82141d00, 0x00000c00, 0x04000002, + 0x59cc1809, 0x84040d58, 0x48065c08, 0x82143500, + 0x00000fff, 0x04020027, 0x59340200, 0x8c00050e, + 0x04020080, 0x0201f800, 0x00020962, 0x04020006, + 0x4a025a06, 0x00000000, 0x59300811, 0x800409c0, + 0x04020951, 0x4a025a04, 0x00000103, 0x48065807, + 0x480e580a, 0x48165c09, 0x59300c02, 0x48065c06, + 0x0201f800, 0x00020381, 0x0201f800, 0x00104801, + 0x59cc0208, 0x8c000518, 0x02020000, 0x00108f88, + 0x0201f000, 0x000208b4, 0x0201f800, 0x00106cb4, + 0x040007d6, 0x4d3c0000, 0x42027800, 0x00000002, + 0x0201f800, 0x00108997, 0x5c027800, 0x0401f7cf, + 0x4817c857, 0x480fc857, 0x82180500, 0x000000ff, + 0x0400000e, 0x592c0204, 0x82000500, 0x000000ff, + 0x82000580, 0x00000048, 0x04020008, 0x592c0407, + 0x800001c0, 0x04000005, 0x0201f800, 0x0010950b, + 0x0201f000, 0x00109553, 0x82180d00, 0x00000c00, + 0x04000004, 0x59340200, 0x8c00050e, 0x04020032, + 0x4a025a06, 0x00000000, 0x41782000, 0x8c183510, + 0x04000007, 0x59cc000c, 0x82000500, 0x000000ff, + 0x04000002, 0x4803c857, 0x59cc200b, 0x4812580c, + 0x41780000, 0x8c183512, 0x04000002, 0x59cc000a, + 0x4802580b, 0x80100c00, 0x040007b8, 0x82041480, + 0x0000001d, 0x04001006, 0x592c0404, 0x8c00051e, + 0x0400000e, 0x42000800, 0x0000001c, 0x4c500000, + 0x4c540000, 0x83cca400, 0x0000000c, 0x832cac00, + 0x0000000d, 0x0201f800, 0x00108953, 0x5c00a800, + 0x5c00a000, 0x0401f7a5, 0x59300011, 0x59301402, + 0x480a5c06, 0x48025807, 0x480e580a, 0x48165c09, + 0x0201f800, 0x001088fc, 0x0201f800, 0x00108938, + 0x0401f7a6, 0x592c020a, 0x8c000502, 0x040007cd, + 0x592c0208, 0x8c00050e, 0x040207ca, 0x59300011, + 0x800c0d80, 0x040007c7, 0x4803c857, 0x480fc857, + 0x8c183514, 0x02000000, 0x00108fc6, 0x80000540, + 0x040007c0, 0x4807c856, 0x0201f000, 0x00108fc6, + 0x592c020a, 0x8c000502, 0x04000782, 0x59300011, + 0x800001c0, 0x0400077f, 0x592c0208, 0x8c00050e, + 0x0402077c, 0x0201f000, 0x00108fc6, 0x59cc2006, + 0x59cc2807, 0x0401f037, 0x0401f036, 0x1c01f000, + 0x4933c857, 0x5930001c, 0x800001c0, 0x02020800, + 0x0010961a, 0x59325808, 0x592c0c08, 0x41782800, + 0x41781800, 0x84040d58, 0x48065c08, 0x41783000, + 0x59340200, 0x8c00050e, 0x0402001a, 0x0201f800, + 0x00020962, 0x04020007, 0x4a025a06, 0x00000000, + 0x59300811, 0x4807c857, 0x800409c0, 0x040208b2, + 0x4a025a04, 0x00000103, 0x48065807, 0x480e580a, + 0x48165c09, 0x4933c857, 0x59300c02, 0x48065c06, + 0x0201f800, 0x00109365, 0x0201f800, 0x00020381, + 0x0201f800, 0x00104801, 0x0201f000, 0x000208b4, + 0x592c020a, 0x8c000502, 0x040007e8, 0x59300011, + 0x4803c857, 0x800001c0, 0x040007e4, 0x592c0208, + 0x8c00050e, 0x040207e1, 0x0201f000, 0x00108fc6, + 0x5930001c, 0x800001c0, 0x4c100000, 0x4c140000, + 0x02020800, 0x0010961a, 0x5c002800, 0x5c002000, + 0x4a026203, 0x00000002, 0x4a026403, 0x00000043, + 0x59325808, 0x592c020a, 0x8c000502, 0x0402001c, + 0x40100000, 0x592c080f, 0x80040c80, 0x40140000, + 0x80040480, 0x04001018, 0x59300004, 0x8c00053e, + 0x0402000a, 0x48126013, 0x48166011, 0x497a6205, + 0x0201f800, 0x00100fe1, 0x0402000d, 0x59300804, + 0x0201f000, 0x00106466, 0x4c100000, 0x4c140000, + 0x0201f800, 0x00106cb4, 0x5c002800, 0x5c002000, + 0x040007f1, 0x0201f000, 0x001076fb, 0x4933c857, + 0x1c01f000, 0x4807c857, 0x40042800, 0x0401f7e7, + 0x83380480, 0x00000058, 0x04021005, 0x83380480, + 0x00000040, 0x04001002, 0x0c01f002, 0x1c01f000, + 0x001084ec, 0x001084ec, 0x001084ec, 0x001084ec, + 0x001084ec, 0x001084ec, 0x001084ec, 0x001084ec, + 0x001084ec, 0x001084ec, 0x001084ee, 0x001084ec, + 0x001084ec, 0x001084ec, 0x001084ec, 0x001084fb, + 0x001084ec, 0x001084ec, 0x001084ec, 0x001084ec, + 0x00108529, 0x001084ec, 0x001084ec, 0x001084ec, + 0x0201f800, 0x00100615, 0x4933c857, 0x0201f800, + 0x00106b13, 0x4a026203, 0x00000002, 0x59a80039, + 0x48026205, 0x59300011, 0x59300815, 0x80040c80, + 0x48066015, 0x0201f000, 0x001068c1, 0x4933c857, + 0x0201f800, 0x001068c1, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x00101de2, 0x5c027800, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x00108df4, 0x04000010, 0x4d2c0000, 0x59325808, + 0x4a025a04, 0x00000103, 0x59300402, 0x48025c06, + 0x4a025a06, 0x00000029, 0x497a5c09, 0x592c0c08, + 0x84040d50, 0x48065c08, 0x0201f800, 0x00020381, + 0x5c025800, 0x42003000, 0x00000014, 0x41782800, + 0x4d400000, 0x4d440000, 0x59368c03, 0x42002000, + 0x00000002, 0x42028000, 0x00000029, 0x0201f800, + 0x0010962a, 0x5c028800, 0x5c028000, 0x0201f000, + 0x000208b4, 0x4933c857, 0x59300808, 0x49780c09, + 0x4978080a, 0x58041408, 0x84081558, 0x48080c08, + 0x1c01f000, 0x4807c857, 0x8c040d3e, 0x04020024, + 0x497a5a06, 0x5930001f, 0x80000540, 0x04000018, + 0x497a5a06, 0x4c040000, 0x4c080000, 0x4c0c0000, + 0x4c100000, 0x4c140000, 0x40002800, 0x58141003, + 0x40040000, 0x80081480, 0x48082803, 0x40140000, + 0x0201f800, 0x00100d9a, 0x5c002800, 0x5c002000, + 0x5c001800, 0x5c001000, 0x5c000800, 0x592c0206, + 0x80000540, 0x04020009, 0x0401f005, 0x592c0408, + 0x8c00051c, 0x04000002, 0x592c0803, 0x4807c857, + 0x4a025a06, 0x00000015, 0x1c01f000, 0x5930001f, + 0x80000540, 0x04000009, 0x4a025a06, 0x00000011, + 0x5930001f, 0x4c040000, 0x0201f800, 0x00100d9a, + 0x5c000800, 0x0401f7f5, 0x4807c856, 0x4a025a06, + 0x00000007, 0x1c01f000, 0x83380480, 0x00000058, + 0x04021007, 0x83380480, 0x00000040, 0x04001004, + 0x4d2c0000, 0x0c01f803, 0x5c025800, 0x1c01f000, + 0x00108588, 0x00108588, 0x00108588, 0x00108588, + 0x00108588, 0x0010858a, 0x00108588, 0x00108588, + 0x0010860d, 0x00108588, 0x00108588, 0x00108588, + 0x00108588, 0x00108588, 0x00108588, 0x00108588, + 0x00108588, 0x00108588, 0x00108588, 0x001086c5, + 0x001086ee, 0x001086cd, 0x00108588, 0x001086fa, + 0x0201f800, 0x00100615, 0x5930001c, 0x800001c0, + 0x02020800, 0x0010961a, 0x59300007, 0x8c00050e, + 0x0400007c, 0x8c000500, 0x0400006e, 0x8c00051c, + 0x04000009, 0x84000500, 0x48026007, 0x59325808, + 0x592c3c08, 0x841c3d58, 0x481e5c08, 0x0201f000, + 0x00020914, 0x59325808, 0x592c3c08, 0x841c3d58, + 0x59300007, 0x8c00051c, 0x040207f3, 0x481e5c08, + 0x42000000, 0x00000005, 0x40000000, 0x80000040, + 0x040207fe, 0x59300007, 0x8c00051c, 0x040207ea, + 0x59cc0a08, 0x592c0204, 0x82000500, 0x000000ff, + 0x82000580, 0x00000048, 0x0402000c, 0x497a580b, + 0x82040500, 0x000000ff, 0x04000008, 0x592c0407, + 0x800001c0, 0x04000005, 0x0201f800, 0x0010950b, + 0x0201f000, 0x00100ea1, 0x48065c09, 0x41782000, + 0x82040500, 0x00000c00, 0x04000002, 0x59cc2009, + 0x82043500, 0x00000fff, 0x04020027, 0x481e5c08, + 0x4a025a06, 0x00000000, 0x801831c0, 0x02000000, + 0x00100ea1, 0x41782000, 0x8c183510, 0x04000002, + 0x59cc200b, 0x4812580c, 0x41780000, 0x8c183512, + 0x04000002, 0x59cc000a, 0x4802580b, 0x80100c00, + 0x02001800, 0x00100615, 0x02000000, 0x00100ea1, + 0x82041480, 0x0000001d, 0x0402100c, 0x4c500000, + 0x4c540000, 0x83cca400, 0x0000000c, 0x832cac00, + 0x0000000d, 0x0401fb6e, 0x5c00a800, 0x5c00a000, + 0x0201f000, 0x00100ea1, 0x0401fb12, 0x0201f000, + 0x00100ea1, 0x412c7800, 0x0201f800, 0x0010082a, + 0x02000800, 0x00100615, 0x492c7809, 0x841c3d52, + 0x481c7c08, 0x4a025a04, 0x00000103, 0x4812580a, + 0x48065c09, 0x583c0404, 0x583c1005, 0x583c2208, + 0x48025c04, 0x480a5805, 0x48125a08, 0x0401f7c8, + 0x8c000524, 0x04000794, 0x59325808, 0x4c000000, + 0x592c0408, 0x8c00051c, 0x5c000000, 0x04020003, + 0x4a026011, 0xffffffff, 0x84000524, 0x0401f78a, + 0x1c01f000, 0x59a80039, 0x48026205, 0x59325808, + 0x4a026203, 0x00000002, 0x592c2408, 0x59300807, + 0x4933c857, 0x4807c857, 0x592c0204, 0x82000500, + 0x000000ff, 0x82000580, 0x00000048, 0x04020004, + 0x8c102500, 0x02020000, 0x00109553, 0x4a025a06, + 0x00000000, 0x8c040d1e, 0x04000027, 0x41780800, + 0x497a5c09, 0x592c1c09, 0x59300011, 0x59341200, + 0x497a6205, 0x8c08150e, 0x0402006e, 0x4807c857, + 0x4806580a, 0x80000d40, 0x04020f03, 0x59300402, + 0x48025c06, 0x48065807, 0x4a025a04, 0x00000103, + 0x4c040000, 0x4c0c0000, 0x4c100000, 0x0201f800, + 0x00109365, 0x5c002000, 0x5c001800, 0x5c000800, + 0x8c102512, 0x0402001a, 0x4c0c0000, 0x0201f800, + 0x00020381, 0x0201f800, 0x00104801, 0x5c001800, + 0x8c0c1d18, 0x02000000, 0x000208b4, 0x0201f000, + 0x00108f88, 0x4813c857, 0x8c102518, 0x0400004b, + 0x41780800, 0x592c1c09, 0x820c0580, 0x00001000, + 0x040007d6, 0x8c102512, 0x040007d4, 0x592c7809, + 0x583c080a, 0x583c1c09, 0x0401f7d0, 0x4807c857, + 0x592c7809, 0x59300402, 0x592c1404, 0x8c08151e, + 0x0402000d, 0x592c1206, 0x48007c06, 0x48047807, + 0x48087a06, 0x84102512, 0x48107c08, 0x4c0c0000, + 0x0201f800, 0x00100843, 0x403e5800, 0x0401fad1, + 0x0401f7d9, 0x48025c06, 0x48065807, 0x583c080c, + 0x583c000b, 0x80040c00, 0x82041480, 0x0000001d, + 0x04001006, 0x583c1001, 0x480a5801, 0x49787801, + 0x42000800, 0x0000001c, 0x82040c00, 0x00000014, + 0x4c0c0000, 0x4c500000, 0x4c540000, 0x823ca400, + 0x00000008, 0x832cac00, 0x00000008, 0x4c100000, + 0x4c3c0000, 0x0401fad2, 0x5c007800, 0x5c002000, + 0x5c00a800, 0x5c00a000, 0x84102512, 0x48125c08, + 0x403e5800, 0x0201f800, 0x00100843, 0x42034000, + 0x0010b2a0, 0x59a1d81e, 0x80edd9c0, 0x02000800, + 0x00100615, 0x48efc857, 0x58ec0009, 0x4803c857, + 0x0801f800, 0x0401f7ac, 0x4933c857, 0x1c01f000, + 0x59301414, 0x480bc857, 0x8c08151c, 0x0402000e, + 0x80000540, 0x4803c857, 0x0400078d, 0x80042c80, + 0x0402178b, 0x8c081514, 0x04020005, 0x592c080f, + 0x4807c857, 0x80040480, 0x48026016, 0x8408155c, + 0x480a6414, 0x59301007, 0x8408151e, 0x480a6007, + 0x4c100000, 0x4c3c0000, 0x4d400000, 0x592e8206, + 0x4a025a06, 0x00000001, 0x0201f800, 0x00109365, + 0x49425a06, 0x5c028000, 0x5c007800, 0x5c002000, + 0x497a5c09, 0x8c102512, 0x04000006, 0x4d2c0000, + 0x403e5800, 0x0201f800, 0x00100843, 0x5c025800, + 0x82102500, 0xffffedff, 0x48125c08, 0x0201f000, + 0x00108fc6, 0x59325808, 0x592c0408, 0x8c000518, + 0x04000004, 0x412df800, 0x0201f000, 0x00100eba, + 0x1c01f000, 0x4933c857, 0x59325808, 0x497a5c09, + 0x4a025a06, 0x00000000, 0x4a025a04, 0x00000103, + 0x59300811, 0x4807c857, 0x800409c0, 0x0402000a, + 0x48065807, 0x59300c02, 0x48065c06, 0x0201f800, + 0x00020381, 0x0201f800, 0x00104801, 0x0201f000, + 0x000208b4, 0x59340200, 0x8c00050e, 0x04020005, + 0x59300811, 0x0401fe4c, 0x48065807, 0x0401f7f2, + 0x592c0208, 0x8c00050e, 0x040207fa, 0x4933c857, + 0x0201f000, 0x00108fc6, 0x4933c857, 0x59325808, + 0x812e59c0, 0x02000800, 0x00100615, 0x592c020a, + 0x8c000502, 0x02000800, 0x00100615, 0x4a026206, + 0x00000002, 0x1c01f000, 0x5930001c, 0x800001c0, + 0x02020800, 0x0010961a, 0x59300007, 0x4933c857, + 0x4803c857, 0x8c00050e, 0x04000037, 0x8c000500, + 0x04000029, 0x8c00051c, 0x0400000a, 0x84000500, + 0x48026007, 0x59325808, 0x592c3c08, 0x481fc857, + 0x841c3d58, 0x481e5c08, 0x0201f000, 0x00020914, + 0x59325808, 0x592c3c08, 0x841c3d58, 0x59300007, + 0x8c00051c, 0x040207f2, 0x481e5c08, 0x42000000, + 0x00000005, 0x40000000, 0x80000040, 0x040207fe, + 0x59300007, 0x8c00051c, 0x040207e9, 0x592c0204, + 0x82000500, 0x000000ff, 0x82000580, 0x00000048, + 0x04020003, 0x497a580b, 0x0401f002, 0x497a5c09, + 0x481e5c08, 0x4a025a06, 0x00000000, 0x0201f000, + 0x00100ea1, 0x8c000524, 0x040007d9, 0x59325808, + 0x4c000000, 0x592c0408, 0x8c00051c, 0x5c000000, + 0x04020003, 0x4a026011, 0xffffffff, 0x84000524, + 0x0401f7cf, 0x1c01f000, 0x4933c857, 0x41780800, + 0x83380480, 0x00000058, 0x0402100b, 0x83380480, + 0x00000040, 0x04001008, 0x4d2c0000, 0x59325808, + 0x812e59c0, 0x0c020806, 0x5c025800, 0x0201f000, + 0x000208b4, 0x493bc857, 0x1c01f000, 0x00108763, + 0x00108763, 0x00108763, 0x00108763, 0x00108763, + 0x00108765, 0x00108763, 0x00108763, 0x00108763, + 0x00108763, 0x00108763, 0x00108763, 0x00108763, + 0x00108763, 0x00108763, 0x00108763, 0x00108763, + 0x00108763, 0x00108763, 0x00108763, 0x0010876a, + 0x00108763, 0x00108763, 0x00108763, 0x0201f800, + 0x00100615, 0x59cc0a08, 0x497a5807, 0x4807c857, + 0x82040d00, 0x00000fff, 0x59300402, 0x48025c06, + 0x4a025a04, 0x00000103, 0x48065c09, 0x4a025a06, + 0x00000000, 0x800409c0, 0x02000000, 0x00020381, + 0x59cc0009, 0x4802580a, 0x82042500, 0x00000100, + 0x04000002, 0x59cc200b, 0x4812580c, 0x82040500, + 0x00000200, 0x04000002, 0x59cc000a, 0x4802580b, + 0x80100c00, 0x02001800, 0x00100615, 0x02000000, + 0x00020381, 0x82041480, 0x0000001d, 0x04001006, + 0x592c0404, 0x8c00051e, 0x0400000e, 0x42000800, + 0x0000001c, 0x4c500000, 0x4c540000, 0x83cca400, + 0x0000000c, 0x832cac00, 0x0000000d, 0x0401f9c0, + 0x5c00a800, 0x5c00a000, 0x0201f000, 0x00020381, + 0x0401f964, 0x0401f19f, 0x83380480, 0x00000093, + 0x02021800, 0x00100615, 0x83380480, 0x00000085, + 0x02001800, 0x00100615, 0x0c01f001, 0x001087b2, + 0x001087b0, 0x001087b0, 0x001087b9, 0x001087b0, + 0x001087b0, 0x001087b0, 0x001087b0, 0x001087b0, + 0x001087b0, 0x001087b0, 0x001087b0, 0x001087b0, + 0x0201f800, 0x00100615, 0x4a026203, 0x00000001, + 0x493a6403, 0x42000800, 0x80000040, 0x0201f000, + 0x00020855, 0x4933c857, 0x59cc1404, 0x0201f800, + 0x001091d9, 0x0400001b, 0x591c0203, 0x82000580, + 0x00000000, 0x04000017, 0x591c0009, 0x81340580, + 0x04020014, 0x4d300000, 0x4d1c0000, 0x411e6000, + 0x0401f9c3, 0x5c023800, 0x5c026000, 0x0400000b, + 0x59cc0005, 0x8c000500, 0x04020003, 0x0401f98d, + 0x0401f003, 0x4a023a03, 0x00000002, 0x4a026403, + 0x00000086, 0x0401f005, 0x0401f9a7, 0x040007f5, + 0x4a026403, 0x00000087, 0x4a026203, 0x00000001, + 0x42000800, 0x80000040, 0x0201f800, 0x00020855, + 0x59340200, 0x8c00050e, 0x0400000d, 0x59cc1404, + 0x0201f800, 0x001091d9, 0x04000009, 0x591c0414, + 0x8c00051a, 0x04000006, 0x4d300000, 0x411e6000, + 0x0201f800, 0x00108fdb, 0x5c026000, 0x1c01f000, + 0x83380580, 0x00000013, 0x0402000b, 0x59300403, + 0x4803c857, 0x82000d80, 0x00000086, 0x04000012, + 0x82000d80, 0x00000087, 0x02020800, 0x00100615, + 0x0401f00d, 0x83380580, 0x00000027, 0x04000005, + 0x83380580, 0x00000014, 0x02020800, 0x00100615, + 0x493bc857, 0x0201f800, 0x001068f6, 0x0201f000, + 0x00107698, 0x4933c857, 0x0201f000, 0x00107698, + 0x83380580, 0x00000013, 0x04020005, 0x59300403, + 0x82000480, 0x00000085, 0x0c01f04d, 0x83380580, + 0x00000027, 0x04020041, 0x4933c857, 0x0201f800, + 0x001068f6, 0x4d3c0000, 0x417a7800, 0x0201f800, + 0x00101de2, 0x5c027800, 0x42003000, 0x00000015, + 0x41782800, 0x42002000, 0x00000003, 0x42028000, + 0x00000029, 0x4d400000, 0x4d440000, 0x59368c03, + 0x0201f800, 0x0010962a, 0x5c028800, 0x5c028000, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x0201f800, 0x00108df4, 0x0400000c, 0x4d2c0000, + 0x59325808, 0x4a025a04, 0x00000103, 0x59300402, + 0x48025c06, 0x497a5c09, 0x49425a06, 0x0201f800, + 0x00020381, 0x5c025800, 0x0201f800, 0x00108ee7, + 0x0201f000, 0x000208b4, 0x83380580, 0x00000089, + 0x04000005, 0x83380580, 0x0000008a, 0x02020000, + 0x001076fb, 0x0201f800, 0x00106cb4, 0x02020000, + 0x001076fb, 0x59300a03, 0x82040580, 0x0000000a, + 0x0400002a, 0x82040580, 0x0000000c, 0x04000027, + 0x0201f800, 0x00100615, 0x83380580, 0x00000014, + 0x040207ea, 0x4933c857, 0x0201f800, 0x001068f6, + 0x42028000, 0x00000006, 0x0401f7d2, 0x0010886e, + 0x0010886c, 0x0010886c, 0x0010886c, 0x0010886c, + 0x0010886c, 0x00108874, 0x0010886c, 0x0010886c, + 0x0010886c, 0x0010886c, 0x0010886c, 0x0010886c, + 0x0201f800, 0x00100615, 0x4933c857, 0x59a80037, + 0x48026206, 0x4a026203, 0x0000000a, 0x1c01f000, + 0x4933c857, 0x59a80037, 0x48026206, 0x4a026203, + 0x0000000c, 0x1c01f000, 0x83380580, 0x00000089, + 0x04000008, 0x83380580, 0x0000008a, 0x04000032, + 0x4933c857, 0x493bc857, 0x0201f000, 0x001076fb, + 0x4933c857, 0x59325808, 0x59300a1d, 0x82040580, + 0x00000003, 0x04020004, 0x0201f800, 0x00104801, + 0x0401f00c, 0x5930021d, 0x82000580, 0x00000001, + 0x04020008, 0x59300c16, 0x82040580, 0x00000039, + 0x0400002c, 0x82040580, 0x00000035, 0x04000029, + 0x4c5c0000, 0x4130b800, 0x0201f800, 0x00020892, + 0x04000010, 0x4a026203, 0x00000001, 0x4a026403, + 0x0000001e, 0x59cc0c07, 0x48066419, 0x59cc0a07, + 0x48066219, 0x49366009, 0x4a026406, 0x00000001, + 0x42000800, 0x80000040, 0x0201f800, 0x00020855, + 0x405e6000, 0x0201f800, 0x000208b4, 0x5c00b800, + 0x1c01f000, 0x4933c857, 0x5930021d, 0x82000580, + 0x00000001, 0x04020040, 0x59300c16, 0x82040580, + 0x00000035, 0x04000007, 0x82040580, 0x0000001e, + 0x04000004, 0x82040580, 0x00000039, 0x04020036, + 0x4933c857, 0x4c500000, 0x4d1c0000, 0x4130a000, + 0x40067000, 0x0201f800, 0x00109183, 0x04020029, + 0x0201f800, 0x00020892, 0x04000026, 0x491fc857, + 0x4933c857, 0x83380580, 0x00000035, 0x04000004, + 0x83380580, 0x00000039, 0x04020002, 0x4932381c, + 0x493a6403, 0x4a026203, 0x00000001, 0x4a026406, + 0x00000001, 0x58500809, 0x4807c857, 0x48066009, + 0x58500c15, 0x4807c857, 0x48066415, 0x58500a15, + 0x4807c857, 0x48066215, 0x58500a16, 0x4807c857, + 0x48066216, 0x58500c19, 0x4807c857, 0x48066419, + 0x58500a19, 0x4807c857, 0x48066219, 0x491e601e, + 0x42000800, 0x80000040, 0x0201f800, 0x00020855, + 0x40526000, 0x5c023800, 0x5c00a000, 0x0201f000, + 0x000208b4, 0x5930021d, 0x82000580, 0x00000003, + 0x02000800, 0x00104801, 0x0201f000, 0x000208b4, + 0x4803c856, 0x4c500000, 0x4c540000, 0x412c7800, + 0x4c3c0000, 0x42002800, 0x00000001, 0x82040480, + 0x00000101, 0x04001003, 0x42000800, 0x00000100, + 0x40043000, 0x42000800, 0x0000001c, 0x83cca400, + 0x0000000c, 0x832cac00, 0x0000000d, 0x0401f844, + 0x82183480, 0x0000001c, 0x592e5801, 0x812e59c0, + 0x02020800, 0x00100843, 0x0201f800, 0x0010082a, + 0x04000017, 0x80142800, 0x4a025a04, 0x00000110, + 0x497a5c04, 0x492c7801, 0x82180c80, 0x0000003d, + 0x04021006, 0x40180800, 0x832cac00, 0x00000005, + 0x0401f82f, 0x0401f00a, 0x82183480, 0x0000003c, + 0x42000800, 0x0000003c, 0x412c7800, 0x832cac00, + 0x00000005, 0x0401f826, 0x0401f7e8, 0x5c007800, + 0x841429c0, 0x82142d40, 0x00000003, 0x48147a04, + 0x403e5800, 0x5c00a800, 0x5c00a000, 0x1c01f000, + 0x492fc857, 0x812e59c0, 0x0400000f, 0x4d2c0000, + 0x4c3c0000, 0x592c7801, 0x803c79c0, 0x04000006, + 0x497a5801, 0x0201f800, 0x00020381, 0x403e5800, + 0x0401f7f9, 0x5c007800, 0x0201f800, 0x00020381, + 0x5c025800, 0x1c01f000, 0x4803c856, 0x4c580000, + 0x82040c00, 0x00000003, 0x8004b104, 0x0201f800, + 0x0010a93e, 0x5c00b000, 0x1c01f000, 0x4803c856, + 0x4c580000, 0x82040c00, 0x00000003, 0x8004b104, + 0x0201f800, 0x0010a93e, 0x5c00b000, 0x1c01f000, + 0x591c0c06, 0x82040580, 0x00000003, 0x04000004, + 0x82040580, 0x00000002, 0x0402001a, 0x4d300000, + 0x4d2c0000, 0x411e6000, 0x59325808, 0x0201f800, + 0x00108df4, 0x0400000f, 0x4d400000, 0x42028000, + 0x00000013, 0x592c0a08, 0x84040d54, 0x0201f800, + 0x00104bee, 0x5c028000, 0x0201f800, 0x00109365, + 0x0201f800, 0x00020381, 0x0201f800, 0x00108ee7, + 0x0201f800, 0x00107698, 0x5c025800, 0x5c026000, + 0x1c01f000, 0x59cc0005, 0x8c000500, 0x0402000b, + 0x591c0406, 0x82000580, 0x00000002, 0x04020007, + 0x591c0c03, 0x82040580, 0x00000085, 0x04000003, + 0x82040580, 0x0000008b, 0x1c01f000, 0x4933c857, + 0x4d3c0000, 0x42027800, 0x00000002, 0x59300406, + 0x82000c80, 0x00000012, 0x02021800, 0x00100615, + 0x0c01f80a, 0x5c027800, 0x1c01f000, 0x4933c857, + 0x59300406, 0x82000c80, 0x00000012, 0x02021800, + 0x00100615, 0x0c01f001, 0x001089b5, 0x001089b2, + 0x001089b2, 0x001089dd, 0x001089b0, 0x001089b2, + 0x001089ce, 0x001089b2, 0x001089b0, 0x0010632c, + 0x001089b2, 0x001089b2, 0x001089b2, 0x001089b0, + 0x001089b0, 0x001089b0, 0x00108aad, 0x001089b2, + 0x0201f800, 0x00100615, 0x4803c856, 0x80000580, + 0x1c01f000, 0x4803c856, 0x8d3e7d02, 0x04020016, + 0x0201f800, 0x00108df4, 0x0400000f, 0x59325808, + 0x41780800, 0x4d400000, 0x42028000, 0x00000005, + 0x0201f800, 0x00104bee, 0x5c028000, 0x0201f800, + 0x00109365, 0x0201f800, 0x00108f83, 0x0201f800, + 0x00020381, 0x0201f800, 0x00107698, 0x82000540, + 0x00000001, 0x1c01f000, 0x4933c857, 0x0201f800, + 0x00104728, 0x0402000c, 0x4d400000, 0x42028000, + 0x00000010, 0x0201f800, 0x00109fc0, 0x4a026406, + 0x00000006, 0x4a026203, 0x00000007, 0x5c028000, + 0x1c01f000, 0x4933c857, 0x0201f800, 0x0010698c, + 0x4df00000, 0x0401f8b8, 0x82000c80, 0x0000000e, + 0x02021800, 0x00100615, 0x0c01f001, 0x001089f7, + 0x00108a64, 0x00108a0e, 0x00108a77, 0x00108a5f, + 0x001089f5, 0x001089f7, 0x001089f7, 0x001089fb, + 0x001089f7, 0x001089f7, 0x001089f7, 0x001089f7, + 0x00108a0e, 0x0201f800, 0x00100615, 0x5c03e000, + 0x02000800, 0x00106982, 0x0401f7b8, 0x5c03e000, + 0x02000800, 0x00106982, 0x59300406, 0x82000580, + 0x00000003, 0x040207b4, 0x59300203, 0x82000580, + 0x0000000d, 0x040007b0, 0x8d3e7d02, 0x040207ae, + 0x4d340000, 0x59326809, 0x0201f800, 0x00104801, + 0x5c026800, 0x0401f7a8, 0x59300004, 0x8400055c, + 0x48026004, 0x0201f800, 0x00106982, 0x59300406, + 0x82000580, 0x00000006, 0x04000043, 0x8d3e7d02, + 0x04020041, 0x497a621d, 0x59300203, 0x82000580, + 0x0000000d, 0x04000003, 0x4a02621d, 0x00000003, + 0x0401fbd4, 0x04000024, 0x4d2c0000, 0x4d400000, + 0x59325808, 0x0201f800, 0x00108f83, 0x592c0408, + 0x8c000512, 0x04000009, 0x4d2c0000, 0x84000512, + 0x48025c08, 0x592c0809, 0x40065800, 0x0201f800, + 0x00100843, 0x5c025800, 0x4d400000, 0x42028000, + 0x00000005, 0x592c0a08, 0x8c040d0e, 0x04000004, + 0x42028000, 0x00000002, 0x0401f001, 0x0201f800, + 0x00104bee, 0x5c028000, 0x0201f800, 0x00109365, + 0x0201f800, 0x00020381, 0x497a6008, 0x5c028000, + 0x5c025800, 0x8d3e7d00, 0x04000009, 0x4d340000, + 0x59326809, 0x0201f800, 0x00104801, 0x5c026800, + 0x0201f800, 0x00107698, 0x0401f00b, 0x4a026403, + 0x00000085, 0x4a026203, 0x00000009, 0x4a026406, + 0x00000002, 0x42000800, 0x8000404b, 0x0201f800, + 0x00020855, 0x5c03e000, 0x02020800, 0x0010698c, + 0x82000540, 0x00000001, 0x1c01f000, 0x0201f800, + 0x00106982, 0x0201f800, 0x00100ee4, 0x0401f7ab, + 0x598c000d, 0x81300580, 0x04020004, 0x0201f800, + 0x00106be2, 0x0402001b, 0x0201f800, 0x00106619, + 0x04020006, 0x59300c03, 0x82040580, 0x00000040, + 0x0400078b, 0x0401f79d, 0x0201f800, 0x001068a3, + 0x04000010, 0x0201f800, 0x00100615, 0x0401f813, + 0x04020004, 0x0201f800, 0x00106bb2, 0x04020009, + 0x0201f800, 0x001064f6, 0x040207f4, 0x59300c03, + 0x82040580, 0x00000040, 0x04000779, 0x0401f78b, + 0x59300203, 0x82000c80, 0x0000000e, 0x02021800, + 0x00100615, 0x0c01f75e, 0x417a3000, 0x42032000, + 0x0000bf32, 0x59900004, 0x81300580, 0x04000009, + 0x83932400, 0x00000010, 0x811a3000, 0x83180480, + 0x00000005, 0x040017f8, 0x82000540, 0x00000001, + 0x1c01f000, 0x59300004, 0x8c00053e, 0x04000010, + 0x8c00050c, 0x0402000e, 0x8c000516, 0x04020006, + 0x82000d00, 0x0000001f, 0x82040580, 0x00000005, + 0x04020004, 0x42000000, 0x00000003, 0x0401f005, + 0x42000000, 0x00000001, 0x0401f002, 0x59300203, + 0x1c01f000, 0x4933c857, 0x0201f800, 0x0010698c, + 0x4df00000, 0x59300203, 0x82000c80, 0x0000000e, + 0x02021800, 0x00100615, 0x0c01f001, 0x00108ac7, + 0x00108ae4, 0x00108acb, 0x00108ac5, 0x00108ac5, + 0x00108ac5, 0x00108ac5, 0x00108ac5, 0x00108ac5, + 0x00108ac5, 0x00108ac5, 0x00108ac5, 0x00108ac5, + 0x00108ac5, 0x0201f800, 0x00100615, 0x5c03e000, + 0x02000800, 0x00106982, 0x0401f6e8, 0x5c03e000, + 0x02000800, 0x00106982, 0x4d2c0000, 0x59325808, + 0x59300403, 0x82000580, 0x00000052, 0x02000800, + 0x00101281, 0x0401fb1f, 0x02000800, 0x00100615, + 0x4a025a06, 0x00000005, 0x0201f800, 0x00020381, + 0x0201f800, 0x00104a83, 0x0201f800, 0x00107698, + 0x5c025800, 0x82000540, 0x00000001, 0x1c01f000, + 0x598c000d, 0x81300580, 0x0402001a, 0x59300004, + 0x8c000520, 0x04000004, 0x84000520, 0x48026004, + 0x0401f01a, 0x42001000, 0x0010b5f4, 0x50081000, + 0x58080002, 0x82000580, 0x00000100, 0x0400000a, + 0x5808000c, 0x81300580, 0x02020800, 0x00100615, + 0x0201f800, 0x00106619, 0x02020800, 0x00100615, + 0x0401f7cf, 0x0201f800, 0x00106be2, 0x0402000c, + 0x59300004, 0x8c000520, 0x04000004, 0x84000520, + 0x48026004, 0x0401f7c6, 0x0201f800, 0x00106619, + 0x040007c3, 0x0201f800, 0x00100615, 0x59300203, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f7a7, 0x59300406, 0x4933c857, 0x4803c857, + 0x82000c80, 0x00000012, 0x02021800, 0x00100615, + 0x0c01f001, 0x00108b30, 0x00108bfe, 0x00108d36, + 0x00108b3c, 0x00107698, 0x00108b30, 0x00109faf, + 0x000208b4, 0x00108bfe, 0x00106306, 0x00108d97, + 0x00108b2b, 0x00108b2b, 0x00108b2b, 0x00108b2b, + 0x00108b2b, 0x001094b7, 0x001094b7, 0x0201f800, + 0x00100615, 0x0401fbd8, 0x02000000, 0x00107da6, + 0x1c01f000, 0x0201f800, 0x0010698c, 0x0201f800, + 0x001068f6, 0x0201f800, 0x00106982, 0x0201f000, + 0x000208b4, 0x4a026206, 0x00000001, 0x1c01f000, + 0x42000000, 0x0010b671, 0x0201f800, 0x0010a86e, + 0x4d2c0000, 0x4d400000, 0x417a5800, 0x0401fab1, + 0x04000007, 0x59325808, 0x592c0208, 0x8400054c, + 0x48025a08, 0x42028000, 0x00000006, 0x0201f800, + 0x0010698c, 0x0401ff4c, 0x4803c857, 0x82000c80, + 0x0000000e, 0x02021800, 0x00100615, 0x0c01f806, + 0x0201f800, 0x00106982, 0x5c028000, 0x5c025800, + 0x1c01f000, 0x00108bfd, 0x00108b69, 0x00108b79, + 0x00108ba0, 0x00108bce, 0x00108b67, 0x00108b30, + 0x00108b30, 0x00108b30, 0x00108b67, 0x00108b67, + 0x00108b67, 0x00108b67, 0x00108b79, 0x0201f800, + 0x00100615, 0x598c000d, 0x4803c857, 0x81300580, + 0x04020004, 0x0201f800, 0x00106be2, 0x0402003f, + 0x0201f800, 0x00106619, 0x04000043, 0x4803c856, + 0x0201f800, 0x001068a3, 0x04000038, 0x0201f800, + 0x00100615, 0x497a621d, 0x812e59c0, 0x02000800, + 0x00100615, 0x592c0204, 0x4803c857, 0x82000500, + 0x000000ff, 0x82000580, 0x00000014, 0x04000003, + 0x4a02621d, 0x00000003, 0x592c0a08, 0x0201f800, + 0x00104bee, 0x0201f800, 0x00109365, 0x0201f800, + 0x00020381, 0x497a6008, 0x4a026403, 0x00000085, + 0x4a026203, 0x00000009, 0x4a026406, 0x00000002, + 0x59300804, 0x82040d00, 0x00000100, 0x82040d40, + 0x8000404b, 0x48066004, 0x0201f800, 0x00106982, + 0x42000800, 0x8000404b, 0x0201f000, 0x00020855, + 0x0401feea, 0x04020004, 0x0201f800, 0x00106bb2, + 0x0402000a, 0x0201f800, 0x001064f6, 0x040207cc, + 0x59300c03, 0x4807c857, 0x82040580, 0x00000040, + 0x04000009, 0x0401f7cc, 0x59300203, 0x4803c857, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f7a5, 0x0201f800, 0x00106982, 0x812e59c0, + 0x04000013, 0x592c0a08, 0x0201f800, 0x00104bee, + 0x0201f800, 0x00109365, 0x0201f800, 0x00020381, + 0x59300203, 0x82000580, 0x0000000d, 0x04000008, + 0x0201f800, 0x00106982, 0x4d340000, 0x59326809, + 0x0201f800, 0x00104801, 0x5c026800, 0x0201f800, + 0x00107698, 0x0401f030, 0x812e59c0, 0x02000800, + 0x00100615, 0x0201f800, 0x001091d3, 0x04020004, + 0x0201f800, 0x00100ee4, 0x0401f7a3, 0x0201f800, + 0x00106982, 0x592c0208, 0x8400050c, 0x48025a08, + 0x592c0406, 0x800000c2, 0x800008c4, 0x80040c00, + 0x48066206, 0x42000000, 0x10000000, 0x41300800, + 0x0201f800, 0x00100bde, 0x0400000d, 0x592c0208, + 0x8c00051c, 0x04020006, 0x8400055c, 0x48025a08, + 0x4a026206, 0x00000002, 0x0401f00f, 0x4d300000, + 0x0201f800, 0x00101335, 0x5c026000, 0x59300203, + 0x82000580, 0x00000004, 0x04020007, 0x4d380000, + 0x42027000, 0x00000048, 0x0201f800, 0x000208d8, + 0x5c027000, 0x1c01f000, 0x42000000, 0x0010b66d, + 0x0201f800, 0x0010a86e, 0x59300203, 0x82000c80, + 0x0000000e, 0x02021800, 0x00100615, 0x4803c857, + 0x0c01f001, 0x00108c17, 0x00108b39, 0x00108c19, + 0x00108c17, 0x00108c19, 0x00108c19, 0x00108b31, + 0x00108c17, 0x00108b2d, 0x00108c17, 0x00108c17, + 0x00108c17, 0x00108c17, 0x00108c17, 0x0201f800, + 0x00100615, 0x4d340000, 0x4d2c0000, 0x59326809, + 0x59340400, 0x82000500, 0x000000ff, 0x82000c80, + 0x0000000c, 0x02021800, 0x00100615, 0x59303403, + 0x82180d80, 0x00000004, 0x04020004, 0x42000000, + 0x00000001, 0x0401f006, 0x82180d80, 0x00000000, + 0x04020003, 0x42000000, 0x00000001, 0x4803c857, + 0x0c01f804, 0x5c025800, 0x5c026800, 0x1c01f000, + 0x00108c40, 0x00108cdf, 0x00108c42, 0x00108c77, + 0x00108c42, 0x00108cfc, 0x00108c42, 0x00108c4c, + 0x00108c40, 0x00108cfc, 0x00108c40, 0x00108c5b, + 0x0201f800, 0x00100615, 0x59300403, 0x82000d80, + 0x00000016, 0x0400002e, 0x82000d80, 0x00000004, + 0x0400002b, 0x82000d80, 0x00000002, 0x04000028, + 0x0401fab9, 0x04000079, 0x59300403, 0x82000d80, + 0x00000022, 0x040000ae, 0x82000d80, 0x00000039, + 0x040000b3, 0x82000d80, 0x00000035, 0x040000b0, + 0x82000d80, 0x0000001e, 0x0400001b, 0x0401f999, + 0x04000007, 0x0201f800, 0x00109360, 0x04020004, + 0x0201f800, 0x00104863, 0x0401f011, 0x59300403, + 0x82000d80, 0x00000001, 0x04020004, 0x0201f800, + 0x00104836, 0x0400000a, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x00101de2, 0x5c027800, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x00107da6, 0x0201f000, 0x00107698, 0x0401f97d, + 0x04000004, 0x0201f800, 0x00109360, 0x040000a9, + 0x59300c03, 0x82040580, 0x00000016, 0x04000056, + 0x82040580, 0x00000002, 0x04020034, 0x59a80026, + 0x8c000502, 0x04020013, 0x0201f800, 0x00104e0d, + 0x04020010, 0x0201f800, 0x00104e23, 0x04020006, + 0x42000000, 0x00000001, 0x0201f800, 0x00104de5, + 0x0401f094, 0x4a035033, 0x00000001, 0x4202d800, + 0x00000001, 0x0201f800, 0x00104d76, 0x0401f08d, + 0x59340403, 0x82000580, 0x000007fc, 0x04000008, + 0x59a80026, 0x8c00050a, 0x04020084, 0x59340212, + 0x82000500, 0x0000ff00, 0x04000082, 0x59340412, + 0x82000500, 0x000000ff, 0x04000010, 0x80000040, + 0x48026c12, 0x497a6008, 0x4a026406, 0x00000007, + 0x4a026206, 0x00000398, 0x497a6205, 0x0201f800, + 0x00020892, 0x04000005, 0x49366009, 0x4a026406, + 0x00000001, 0x0401f020, 0x59300403, 0x82000d80, + 0x00000002, 0x0402000d, 0x59340403, 0x82000580, + 0x000007fe, 0x04020009, 0x59a80026, 0x84000540, + 0x48035026, 0x0201f800, 0x00104067, 0x0201f800, + 0x00107da6, 0x0401f00c, 0x0201f800, 0x00107da6, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x42000000, 0x0010b663, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x00101e1b, 0x0201f000, + 0x00107698, 0x42000800, 0x00000003, 0x0201f800, + 0x001043c7, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000002, 0x0201f000, 0x00106470, 0x0401f915, + 0x04020793, 0x0201f800, 0x00101e1b, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x42003000, 0x00000018, 0x41782800, 0x42002000, + 0x00000000, 0x4d400000, 0x4d440000, 0x59368c03, + 0x42028000, 0x00000029, 0x0201f800, 0x0010962a, + 0x5c028800, 0x5c028000, 0x0201f000, 0x00107698, + 0x0201f800, 0x00104863, 0x0401f7c8, 0x42000000, + 0x0010b66c, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x001078fd, 0x040207c1, 0x1c01f000, 0x4d380000, + 0x59327403, 0x0201f800, 0x00109183, 0x5c027000, + 0x02020000, 0x000208b4, 0x836c0580, 0x00000003, + 0x04000004, 0x4a026206, 0x00000002, 0x1c01f000, + 0x59300403, 0x48026416, 0x4a02621d, 0x00000001, + 0x4a026403, 0x00000085, 0x4a026203, 0x00000009, + 0x4a026406, 0x00000002, 0x42000800, 0x8000004b, + 0x0201f000, 0x00020855, 0x0201f800, 0x00101e1b, + 0x0201f800, 0x00107da6, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x00101de2, 0x5c027800, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x497a6008, + 0x4a026406, 0x00000007, 0x4a026206, 0x00000398, + 0x497a6205, 0x1c01f000, 0x42000000, 0x0010b66f, + 0x0201f800, 0x0010a86e, 0x4d340000, 0x59326809, + 0x59300203, 0x82000c80, 0x0000000e, 0x02021800, + 0x00100615, 0x4803c857, 0x0c01f803, 0x5c026800, + 0x1c01f000, 0x00108d53, 0x00108b39, 0x00108d53, + 0x00108d53, 0x00108d53, 0x00108d53, 0x00108d53, + 0x00108d53, 0x00108d53, 0x00108b39, 0x00108d55, + 0x00108b39, 0x00108d5d, 0x00108d53, 0x0201f800, + 0x00100615, 0x4a026403, 0x0000008b, 0x4a026203, + 0x0000000b, 0x42000800, 0x8000404b, 0x0201f000, + 0x00020855, 0x59300a1d, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x00101de2, 0x5c027800, 0x42003000, + 0x00000011, 0x0201f800, 0x0010a766, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x41306800, + 0x0201f800, 0x00020892, 0x04000008, 0x49366009, + 0x4d300000, 0x40366000, 0x0201f800, 0x00107698, + 0x5c026000, 0x0401f002, 0x40366000, 0x497a6008, + 0x4a026406, 0x00000001, 0x4a026403, 0x00000001, + 0x0201f800, 0x0010393e, 0x04000011, 0x4a026406, + 0x00000004, 0x4a026203, 0x00000007, 0x4a026420, + 0x00000001, 0x42003000, 0x00000004, 0x4d400000, + 0x42028000, 0x00000029, 0x41782800, 0x0201f800, + 0x0010a250, 0x5c028000, 0x1c01f000, 0x42000800, + 0x0000000b, 0x0201f800, 0x001043c7, 0x4a026203, + 0x00000001, 0x0201f000, 0x00106470, 0x42000000, + 0x0010b675, 0x0201f800, 0x0010a86e, 0x59300203, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x4803c857, 0x0c01f001, 0x00108dc8, 0x00108db0, + 0x00108db4, 0x00108dc9, 0x00108db2, 0x00108db0, + 0x00108db0, 0x00108db0, 0x00108db0, 0x00108db0, + 0x00108db0, 0x00108db0, 0x00108db0, 0x00108db0, + 0x0201f800, 0x00100615, 0x0201f800, 0x00100ee4, + 0x4d2c0000, 0x59325808, 0x4a025a06, 0x00000006, + 0x0201f800, 0x00020381, 0x5c025800, 0x497a6008, + 0x4a02621d, 0x0000000a, 0x4a026403, 0x00000085, + 0x4a026203, 0x00000009, 0x4a026406, 0x00000002, + 0x42000800, 0x8000404b, 0x0201f000, 0x00020855, + 0x1c01f000, 0x0201f800, 0x0010698c, 0x4df00000, + 0x0401fcbe, 0x04020004, 0x0201f800, 0x00106bb2, + 0x0402000c, 0x0201f800, 0x001064f6, 0x04020005, + 0x5c03e000, 0x0201f800, 0x00106982, 0x0401f7dd, + 0x0201f800, 0x001068a3, 0x02020800, 0x00100615, + 0x5c03e000, 0x0201f800, 0x00106982, 0x59300203, + 0x82000d80, 0x00000003, 0x02000800, 0x00100615, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f7ba, 0x4803c856, 0x59a8000e, 0x59a80867, + 0x80040400, 0x80080480, 0x04021004, 0x82000540, + 0x00000001, 0x1c01f000, 0x80000580, 0x1c01f000, + 0x4803c856, 0x4c080000, 0x59301008, 0x82081500, + 0xfff00000, 0x5c001000, 0x1c01f000, 0x4803c856, + 0x4d300000, 0x0201f800, 0x00020892, 0x0400000a, + 0x0401f82f, 0x4d380000, 0x42027000, 0x0000004b, + 0x0201f800, 0x000208d8, 0x5c027000, 0x82000540, + 0x00000001, 0x5c026000, 0x1c01f000, 0x4803c856, + 0x4d300000, 0x0201f800, 0x001076c9, 0x0400001b, + 0x0401f81f, 0x4d300000, 0x0201f800, 0x0010698c, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x001067f6, + 0x0201f800, 0x00106543, 0x5c027800, 0x0201f800, + 0x0010a0da, 0x0201f800, 0x00106982, 0x5c026000, + 0x8d3e7d3e, 0x0402000b, 0x4d380000, 0x42027000, + 0x0000004c, 0x0201f800, 0x000208d8, 0x5c027000, + 0x82000540, 0x00000001, 0x5c026000, 0x1c01f000, + 0x0201f800, 0x000208b4, 0x0401f7fa, 0x592c0407, + 0x494a6017, 0x494e6018, 0x49366009, 0x492e6008, + 0x4a026406, 0x00000003, 0x800000c2, 0x800008c4, + 0x80040400, 0x48026206, 0x1c01f000, 0x493bc857, + 0x4d300000, 0x0201f800, 0x00020892, 0x0400000d, + 0x0401ffef, 0x4d400000, 0x42028000, 0x00000005, + 0x0401f80d, 0x5c028000, 0x8d3e7d3e, 0x04020007, + 0x0201f800, 0x000208d8, 0x82000540, 0x00000001, + 0x5c026000, 0x1c01f000, 0x0201f800, 0x000208b4, + 0x0401f7fa, 0x4803c856, 0x0201f800, 0x0010698c, + 0x4d3c0000, 0x4d440000, 0x59368c03, 0x42027800, + 0x00000001, 0x0201f800, 0x001066ff, 0x0201f800, + 0x00106675, 0x0201f800, 0x00106543, 0x0201f800, + 0x0010a0da, 0x5c028800, 0x5c027800, 0x0201f000, + 0x00106982, 0x4803c856, 0x4d300000, 0x0201f800, + 0x00020892, 0x0400000f, 0x481a601c, 0x48ee6021, + 0x49366009, 0x4a026406, 0x00000001, 0x492e6008, + 0x4d380000, 0x42027000, 0x0000001f, 0x0201f800, + 0x000208d8, 0x5c027000, 0x82000540, 0x00000001, + 0x5c026000, 0x1c01f000, 0x4803c856, 0x4d300000, + 0x0201f800, 0x00020892, 0x0400000e, 0x48ee6021, + 0x49366009, 0x4a026406, 0x00000001, 0x492e6008, + 0x4d380000, 0x42027000, 0x00000055, 0x0201f800, + 0x000208d8, 0x5c027000, 0x82000540, 0x00000001, + 0x5c026000, 0x1c01f000, 0x4803c856, 0x4d300000, + 0x0201f800, 0x00020892, 0x0400000f, 0x481a601c, + 0x48ee6021, 0x49366009, 0x4a026406, 0x00000001, + 0x492e6008, 0x4d380000, 0x42027000, 0x0000003d, + 0x0201f800, 0x000208d8, 0x5c027000, 0x82000540, + 0x00000001, 0x5c026000, 0x1c01f000, 0x4803c856, + 0x4d300000, 0x0201f800, 0x001076c9, 0x04000014, + 0x49366009, 0x492fc857, 0x4933c857, 0x592c0404, + 0x8c00051e, 0x04000003, 0x48efc857, 0x48ee6021, + 0x4a026406, 0x00000001, 0x492e6008, 0x4d380000, + 0x42027000, 0x00000000, 0x0201f800, 0x000208d8, + 0x5c027000, 0x82000540, 0x00000001, 0x5c026000, + 0x1c01f000, 0x4803c856, 0x4d300000, 0x0201f800, + 0x00020892, 0x0400000f, 0x48ee6021, 0x481a601c, + 0x49366009, 0x4a026406, 0x00000001, 0x492e6008, + 0x4d380000, 0x42027000, 0x00000044, 0x0201f800, + 0x000208d8, 0x5c027000, 0x82000540, 0x00000001, + 0x5c026000, 0x1c01f000, 0x4803c856, 0x4d300000, + 0x0201f800, 0x00020892, 0x0400000f, 0x481a601c, + 0x48ee6021, 0x49366009, 0x4a026406, 0x00000001, + 0x492e6008, 0x4d380000, 0x42027000, 0x00000049, + 0x0201f800, 0x000208d8, 0x5c027000, 0x82000540, + 0x00000001, 0x5c026000, 0x1c01f000, 0x59300009, + 0x80001540, 0x02000800, 0x00100615, 0x5808040b, + 0x4803c856, 0x80000040, 0x04001002, 0x4800140b, + 0x1c01f000, 0x4803c856, 0x59300403, 0x82000d80, + 0x00000002, 0x0400000f, 0x82000d80, 0x00000003, + 0x0400000c, 0x82000d80, 0x00000004, 0x04000009, + 0x599c0819, 0x8c040d0e, 0x04000004, 0x82000d80, + 0x00000000, 0x04000003, 0x82000540, 0x00000001, + 0x1c01f000, 0x4803c856, 0x4c000000, 0x4d2c0000, + 0x59300406, 0x82000580, 0x00000004, 0x0400001d, + 0x59300008, 0x80025d40, 0x800001c0, 0x04000019, + 0x0201f800, 0x00109360, 0x04000014, 0x59300406, + 0x82004580, 0x00000010, 0x04000010, 0x82004580, + 0x00000011, 0x0400000d, 0x82004580, 0x00000003, + 0x0400000c, 0x82004580, 0x00000002, 0x04000009, + 0x82004580, 0x0000000a, 0x04000006, 0x592c0404, + 0x8c00051e, 0x04000003, 0x80000580, 0x0401f003, + 0x82000540, 0x00000001, 0x5c025800, 0x5c000000, + 0x1c01f000, 0x4803c856, 0x4d300000, 0x0201f800, + 0x001076c9, 0x04000013, 0x49366009, 0x48ee6021, + 0x4a026406, 0x00000001, 0x492e6008, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x4d380000, 0x42027000, 0x00000028, 0x0201f800, + 0x000208d8, 0x5c027000, 0x82000540, 0x00000001, + 0x5c026000, 0x1c01f000, 0x4803c856, 0x83380580, + 0x00000015, 0x0402000d, 0x59a80016, 0x82000580, + 0x00000074, 0x04020009, 0x0201f800, 0x00104480, + 0x4a026203, 0x00000001, 0x4a026403, 0x00000029, + 0x0201f000, 0x00106470, 0x0201f800, 0x00107da6, + 0x0201f000, 0x000208b4, 0x4803c856, 0x83380580, + 0x00000016, 0x04020007, 0x42000800, 0x00000004, + 0x0201f800, 0x001043c7, 0x0201f000, 0x001078bf, + 0x83380580, 0x00000015, 0x04020013, 0x59a80016, + 0x82000580, 0x00000014, 0x0402000f, 0x0201f800, + 0x001044e1, 0x0201f800, 0x00108210, 0x0402000a, + 0x59340404, 0x80000540, 0x04000007, 0x42000800, + 0x00000006, 0x0201f800, 0x001043c7, 0x0201f000, + 0x001078bf, 0x0201f800, 0x00107da6, 0x0201f000, + 0x000208b4, 0x4803c856, 0x592c0206, 0x82000580, + 0x00000005, 0x04000002, 0x1c01f000, 0x4803c856, + 0x592c0208, 0x8400054a, 0x48025a08, 0x1c01f000, + 0x497a6205, 0x497a6008, 0x4a026203, 0x00000001, + 0x4a026403, 0x00000050, 0x42000800, 0x80000043, + 0x0201f000, 0x00020855, 0x4933c857, 0x4d340000, + 0x59326809, 0x59340200, 0x8c00050e, 0x04000006, + 0x59300406, 0x82000c80, 0x00000012, 0x04021004, + 0x0c01f806, 0x5c026800, 0x1c01f000, 0x0201f800, + 0x00108b30, 0x0401f7fc, 0x00108b30, 0x00108fb4, + 0x00108fb8, 0x00108fbb, 0x0010a2b9, 0x0010a2d6, + 0x0010a2da, 0x00108b30, 0x00108b30, 0x00108b30, + 0x00108b30, 0x00108b30, 0x00108b30, 0x00108b30, + 0x00108b30, 0x00108b30, 0x00108b30, 0x00108b30, + 0x4803c856, 0x40000000, 0x40000000, 0x1c01f000, + 0x40000000, 0x40000000, 0x1c01f000, 0x5930001c, + 0x4803c857, 0x59300414, 0x4933c857, 0x4803c857, + 0x8c000502, 0x04000005, 0x4803c857, 0x84000540, + 0x48026414, 0x1c01f000, 0x42000000, 0xd0000000, + 0x41300800, 0x0201f800, 0x00100bde, 0x0401f810, + 0x0402000e, 0x59300c14, 0x59300403, 0x82000580, + 0x00000040, 0x04000003, 0x84040d40, 0x0401f005, + 0x59a80037, 0x82000400, 0x0000000a, 0x48026205, + 0x84040d42, 0x48066414, 0x1c01f000, 0x4933c857, + 0x4d340000, 0x59326809, 0x59340200, 0x8c00050e, + 0x02000800, 0x00100615, 0x5930001c, 0x80000540, + 0x04020034, 0x59300403, 0x4803c857, 0x82000580, + 0x00000040, 0x04000004, 0x59a80021, 0x80000540, + 0x0402002a, 0x4d1c0000, 0x41323800, 0x0201f800, + 0x00020892, 0x04000023, 0x4932381c, 0x591c0414, + 0x84000542, 0x48023c14, 0x49366009, 0x591c0406, + 0x82000580, 0x00000003, 0x04000006, 0x591c0202, + 0x48026419, 0x591c0402, 0x48026219, 0x0401f005, + 0x591c0202, 0x48026219, 0x591c0402, 0x48026419, + 0x491e601e, 0x4a026406, 0x00000001, 0x4a026403, + 0x00000035, 0x4a026203, 0x00000001, 0x42000800, + 0x80000040, 0x0201f800, 0x00020855, 0x411e6000, + 0x5c023800, 0x80000580, 0x5c026800, 0x1c01f000, + 0x411e6000, 0x5c023800, 0x59a80039, 0x48026205, + 0x82000540, 0x00000001, 0x0401f7f8, 0x4933c857, + 0x4d2c0000, 0x4932381c, 0x4a026202, 0x0000ffff, + 0x591e5808, 0x591c0007, 0x8c00051e, 0x04000005, + 0x8400051e, 0x48023807, 0x497a5c09, 0x0401f018, + 0x592c0408, 0x8c000518, 0x04000015, 0x84000518, + 0x48025c08, 0x4d400000, 0x592e8206, 0x4a025a06, + 0x00000001, 0x0401fb34, 0x49425a06, 0x5c028000, + 0x497a5c09, 0x592c0408, 0x8c000512, 0x04000008, + 0x4d2c0000, 0x84000512, 0x48025c08, 0x592e5809, + 0x0201f800, 0x00100843, 0x5c025800, 0x59a80039, + 0x48026205, 0x591c0214, 0x48026216, 0x82000d80, + 0x00000001, 0x04000008, 0x4a023a03, 0x00000002, + 0x82000580, 0x00000005, 0x04000008, 0x497a6015, + 0x0401f01e, 0x591c0007, 0x84000540, 0x48023807, + 0x4a023a03, 0x00000004, 0x591c0414, 0x4803c857, + 0x8400051c, 0x84000554, 0x48023c14, 0x592c000f, + 0x40001000, 0x591c0816, 0x80040480, 0x040217f0, + 0x591c0016, 0x82000500, 0xfffffffc, 0x48026015, + 0x48023816, 0x591c0a14, 0x4807c857, 0x82040d80, + 0x00000005, 0x04020005, 0x480bc857, 0x4803c857, + 0x4a023812, 0xffffffff, 0x591c0402, 0x48026419, + 0x591c0202, 0x48026219, 0x591e6809, 0x49366009, + 0x4a026406, 0x00000001, 0x4a026403, 0x00000039, + 0x4a026203, 0x00000001, 0x42000800, 0x80000040, + 0x0201f800, 0x00020855, 0x5c025800, 0x1c01f000, + 0x4933c857, 0x59300414, 0x8c000514, 0x04000015, + 0x8c00051c, 0x04020012, 0x59300016, 0x80100480, + 0x04001006, 0x04000005, 0x59300414, 0x84000514, + 0x8400055c, 0x0401f009, 0x48126016, 0x48126012, + 0x40100000, 0x592c180f, 0x800c0480, 0x48026011, + 0x59300414, 0x84000514, 0x48026414, 0x1c01f000, + 0x4933c857, 0x8c00051c, 0x04020006, 0x59300012, + 0x48026016, 0x59300414, 0x8400055c, 0x48026414, + 0x1c01f000, 0x59300c03, 0x4933c857, 0x4807c857, + 0x82040480, 0x00000034, 0x04001006, 0x82040480, + 0x0000003c, 0x04021003, 0x80000580, 0x1c01f000, + 0x82000540, 0x00000001, 0x0401f7fd, 0x41780800, + 0x59a81035, 0x42000000, 0x00000032, 0x0201f800, + 0x001063ee, 0x800811c0, 0x04020003, 0x42001000, + 0x00000014, 0x480b5037, 0x59a81036, 0x480b502d, + 0x41780800, 0x42000000, 0x00000064, 0x0201f800, + 0x001063ee, 0x800811c0, 0x04020003, 0x42001000, + 0x00000014, 0x480b5038, 0x82081400, 0x0000000a, + 0x480b5039, 0x42000800, 0x00000001, 0x0201f800, + 0x001069af, 0x42000000, 0x30000000, 0x40080800, + 0x0201f800, 0x00100bb2, 0x42000800, 0x00000003, + 0x59a81010, 0x0201f800, 0x001069af, 0x0201f000, + 0x00104755, 0x4a035037, 0x00000028, 0x4a035038, + 0x00000014, 0x4a03502d, 0x000007d0, 0x42001000, + 0x0000001e, 0x480b5039, 0x42000800, 0x00000001, + 0x0201f800, 0x001069af, 0x42000000, 0x30000000, + 0x40080800, 0x0201f800, 0x00100bb2, 0x42000800, + 0x00000003, 0x59a81010, 0x0201f000, 0x001069af, + 0x4933c857, 0x4d2c0000, 0x59300403, 0x82000580, + 0x0000003e, 0x04020005, 0x59325817, 0x812e59c0, + 0x02020800, 0x0010083a, 0x5c025800, 0x1c01f000, + 0x4937c857, 0x4d300000, 0x0201f800, 0x00020892, + 0x04000011, 0x49366009, 0x4a026406, 0x00000001, + 0x492e6008, 0x42000800, 0x00000009, 0x0201f800, + 0x001043c7, 0x4d380000, 0x42027000, 0x00000033, + 0x0201f800, 0x000208d8, 0x5c027000, 0x82000540, + 0x00000001, 0x5c026000, 0x1c01f000, 0x4933c857, + 0x4d2c0000, 0x4c580000, 0x4d3c0000, 0x59325808, + 0x83380580, 0x00000015, 0x04020025, 0x59a8b016, + 0x82580c80, 0x00000019, 0x04001003, 0x4200b000, + 0x00000018, 0x8058b104, 0x0401fa0a, 0x80000580, + 0x0401fa1a, 0x832cac00, 0x00000009, 0x83cca400, + 0x00000006, 0x0201f800, 0x0010a93e, 0x4c600000, + 0x4200c000, 0x00000001, 0x592c100a, 0x8c081518, + 0x04020006, 0x59a80010, 0x592c100d, 0x80080580, + 0x04020007, 0x4178c000, 0x59301009, 0x58081403, + 0x417a7800, 0x0201f800, 0x00101e48, 0x5c00c000, + 0x0201f800, 0x001078bf, 0x0401f008, 0x4200b000, + 0x00000002, 0x0401fa09, 0x0201f800, 0x00107da6, + 0x0201f800, 0x000208b4, 0x5c027800, 0x5c00b000, + 0x5c025800, 0x1c01f000, 0x4933c856, 0x49366009, + 0x4a026406, 0x00000001, 0x492e6008, 0x4d380000, + 0x42027000, 0x0000004d, 0x0201f800, 0x000208d8, + 0x5c027000, 0x82000540, 0x00000001, 0x1c01f000, + 0x4803c856, 0x4d2c0000, 0x83380580, 0x00000015, + 0x04020027, 0x59a80816, 0x59325808, 0x5930040b, + 0x800000c4, 0x80040580, 0x04020021, 0x4c500000, + 0x4c540000, 0x4c580000, 0x83cca400, 0x00000006, + 0x4050a800, 0x5930b40b, 0x0201f800, 0x0010a94f, + 0x83cca400, 0x00000006, 0x592cb205, 0x832cac00, + 0x00000006, 0x0201f800, 0x0010a93e, 0x592e5801, + 0x812e59c0, 0x040207f9, 0x5931d821, 0x58ef400b, + 0x58ee580d, 0x4a025a04, 0x00000103, 0x58ec0009, + 0x0801f800, 0x59300402, 0x5c00b000, 0x5c00a800, + 0x5c00a000, 0x5c025800, 0x1c01f000, 0x0201f800, + 0x00107da6, 0x5c025800, 0x1c01f000, 0x4933c857, + 0x83380580, 0x00000035, 0x04000005, 0x59301419, + 0x0401f851, 0x04000027, 0x0401f006, 0x4d300000, + 0x5932601e, 0x0401f856, 0x5c026000, 0x04000020, + 0x591c0c06, 0x82040580, 0x00000003, 0x04000004, + 0x82040580, 0x00000006, 0x0402001c, 0x591c0c02, + 0x59300419, 0x80040580, 0x04000009, 0x59300219, + 0x80040580, 0x04020015, 0x591c0a02, 0x59300419, + 0x80040580, 0x04020011, 0x0401f009, 0x59300a19, + 0x82040580, 0x0000ffff, 0x04000005, 0x591c0202, + 0x59300a19, 0x80040580, 0x04020008, 0x591c0009, + 0x59300809, 0x80040580, 0x1c01f000, 0x417a3800, + 0x82000540, 0x00000001, 0x1c01f000, 0x4803c856, + 0x59b800e4, 0x8c000538, 0x02020800, 0x00100615, + 0x42000800, 0x0000012c, 0x4a0370e4, 0x20000000, + 0x59b800e4, 0x80040840, 0x02000800, 0x00100615, + 0x8c00053c, 0x040207f9, 0x4a0370e4, 0x30000000, + 0x40000000, 0x40000000, 0x40000000, 0x59b800e4, + 0x8c00053c, 0x040207f1, 0x1c01f000, 0x4803c856, + 0x4a0370e4, 0x20000000, 0x40000000, 0x59b800e4, + 0x8c000538, 0x040207fb, 0x1c01f000, 0x59300807, + 0x8c040d1e, 0x592c0c08, 0x04020002, 0x8c040d18, + 0x1c01f000, 0x0401fc10, 0x04000008, 0x42000800, + 0x00000024, 0x0201f800, 0x001063cf, 0x82063c00, + 0x0010cfc0, 0x491fc857, 0x1c01f000, 0x83300480, + 0x0010cfc0, 0x0400100a, 0x59a8000b, 0x81300480, + 0x04021007, 0x59301402, 0x0401ffef, 0x04000007, + 0x411c0000, 0x81300580, 0x04000003, 0x81780500, + 0x0401f002, 0x81300540, 0x1c01f000, 0x4947c857, + 0x4d300000, 0x0201f800, 0x00020267, 0x0402000a, + 0x42026000, 0x0010bbe8, 0x49366009, 0x492e6008, + 0x0201f800, 0x00101de2, 0x80000580, 0x5c026000, + 0x1c01f000, 0x82000540, 0x00000001, 0x0401f7fc, + 0x4933c857, 0x0201f800, 0x00108df4, 0x02000800, + 0x00100615, 0x4d2c0000, 0x4d340000, 0x4d440000, + 0x4c580000, 0x59325808, 0x59326809, 0x49425a06, + 0x0201f800, 0x00105439, 0x592e8c06, 0x592c4207, + 0x82200500, 0x0000000f, 0x0c01f806, 0x5c00b000, + 0x5c028800, 0x5c026800, 0x5c025800, 0x1c01f000, + 0x0010922f, 0x00109251, 0x00109258, 0x0010925c, + 0x00109265, 0x0010922c, 0x0010922c, 0x0010922c, + 0x00109269, 0x00109275, 0x00109275, 0x0010922c, + 0x0010922c, 0x0010922c, 0x0010922c, 0x0010922c, + 0x4803c857, 0x0201f800, 0x00100615, 0x814281c0, + 0x04020012, 0x41785800, 0x592c0404, 0x8c00051c, + 0x04020002, 0x59345c05, 0x442c2800, 0x59340008, + 0x48002802, 0x59340009, 0x48002801, 0x59340006, + 0x48002804, 0x59340007, 0x48002803, 0x4200b000, + 0x0000000b, 0x0401f037, 0x592c0207, 0x8c00051e, + 0x4200b000, 0x00000002, 0x04020032, 0x8204b540, + 0x00000000, 0x0400002f, 0x44042800, 0x59326809, + 0x59340400, 0x48002801, 0x4200b000, 0x00000002, + 0x0401f028, 0x814281c0, 0x04020030, 0x59345c05, + 0x442c2800, 0x4200b000, 0x00000001, 0x0401f021, + 0x8340b540, 0x00000000, 0x0400001e, 0x0401f027, + 0x814281c0, 0x04020025, 0x59340200, 0x44002800, + 0x59340001, 0x48002801, 0x4200b000, 0x00000002, + 0x0401f014, 0x8340b540, 0x00000000, 0x0402001b, + 0x0401f010, 0x8340b540, 0x00000000, 0x0400000d, + 0x0201f800, 0x00104871, 0x04000014, 0x8c20450e, + 0x04000002, 0x497a6009, 0x4178b000, 0x497a5a06, + 0x0401f004, 0x8340b540, 0x00000000, 0x0402000b, + 0x592c0404, 0x8400051c, 0x48025c04, 0x592c0207, + 0x8400051e, 0x48025a07, 0x0401f8aa, 0x497a6008, + 0x0201f000, 0x00020381, 0x592c0207, 0x8c00051e, + 0x4200b000, 0x00000002, 0x040207f2, 0x8204b540, + 0x00000000, 0x040007ef, 0x44042800, 0x4200b000, + 0x00000001, 0x0401f7eb, 0x4937c857, 0x4d300000, + 0x0201f800, 0x00020892, 0x04000011, 0x49366009, + 0x4a026406, 0x00000001, 0x492e6008, 0x42000800, + 0x0000000b, 0x0201f800, 0x001043c7, 0x4d380000, + 0x42027000, 0x00000043, 0x0201f800, 0x000208d8, + 0x5c027000, 0x82000540, 0x00000001, 0x5c026000, + 0x1c01f000, 0x4937c857, 0x4d2c0000, 0x59325808, + 0x83380580, 0x00000015, 0x04020025, 0x59a80016, + 0x82000580, 0x00000004, 0x04020021, 0x59a80010, + 0x592c1009, 0x80080580, 0x04020010, 0x4d440000, + 0x592e8c06, 0x592c0207, 0x4803c856, 0x82000500, + 0x00000080, 0x84000548, 0x4d3c0000, 0x42027800, + 0x00001000, 0x0201f800, 0x0010480a, 0x5c027800, + 0x5c028800, 0x0401f004, 0x4803c856, 0x0201f800, + 0x00104871, 0x0201f800, 0x00108df4, 0x04000017, + 0x4d400000, 0x42028000, 0x00000000, 0x41780800, + 0x0401ff38, 0x5c028000, 0x0401f00e, 0x0201f800, + 0x00104871, 0x040207f4, 0x0201f800, 0x00108df4, + 0x0400000a, 0x4c580000, 0x4200b000, 0x00000002, + 0x0401f86e, 0x5c00b000, 0x0201f800, 0x00107da6, + 0x0201f800, 0x000208b4, 0x5c025800, 0x1c01f000, + 0x4937c857, 0x4d300000, 0x0201f800, 0x00020892, + 0x04000012, 0x49366009, 0x4a026406, 0x00000001, + 0x4d3c0000, 0x4d380000, 0x417a7800, 0x0201f800, + 0x001043bd, 0x492e6008, 0x42027000, 0x00000004, + 0x0201f800, 0x000208d8, 0x5c027000, 0x5c027800, + 0x82000540, 0x00000001, 0x5c026000, 0x1c01f000, + 0x4937c857, 0x4d300000, 0x0201f800, 0x001076c9, + 0x0400000d, 0x49366009, 0x4a026406, 0x00000001, + 0x492e6008, 0x4d380000, 0x42027000, 0x00000051, + 0x0201f800, 0x000208d8, 0x5c027000, 0x82000540, + 0x00000001, 0x5c026000, 0x1c01f000, 0x4933c857, + 0x4c580000, 0x59325808, 0x83383580, 0x00000015, + 0x04020011, 0x592c0008, 0x82000500, 0x00ffffff, + 0x0402000a, 0x0201f800, 0x00105439, 0x59cc0000, + 0x82000500, 0x00ffffff, 0x44002800, 0x4200b000, + 0x00000001, 0x0401f80b, 0x0201f800, 0x001078bf, + 0x0401f006, 0x4200b000, 0x00000002, 0x0401f823, + 0x0201f800, 0x00107da6, 0x5c00b000, 0x1c01f000, + 0x492fc857, 0x4c580000, 0x4c000000, 0x8058b1c0, + 0x0400000b, 0x82580500, 0xfffffff0, 0x02020800, + 0x00100615, 0x8058b0d0, 0x592c0408, 0x82000500, + 0xfffff0ff, 0x80580540, 0x48025c08, 0x5c000000, + 0x5c00b000, 0x1c01f000, 0x492fc857, 0x4c000000, + 0x4c040000, 0x800000d8, 0x592c0c08, 0x82040d00, + 0xffff0fff, 0x80040540, 0x48025c08, 0x5c000800, + 0x5c000000, 0x1c01f000, 0x4933c857, 0x4d2c0000, + 0x59325808, 0x592c0207, 0x8400055e, 0x48025a07, + 0x4c500000, 0x4c540000, 0x4c580000, 0x0401ffd9, + 0x0201f800, 0x00105439, 0x46002800, 0x00000018, + 0x80142800, 0x8058b040, 0x83cca400, 0x00000007, + 0x4014a800, 0x0201f800, 0x0010a93e, 0x5c00b000, + 0x5c00a800, 0x5c00a000, 0x5c025800, 0x1c01f000, + 0x59325808, 0x592c0204, 0x82000580, 0x00000152, + 0x1c01f000, 0x5930001f, 0x80000540, 0x02020800, + 0x00100d9a, 0x1c01f000, 0x4d2c0000, 0x59325808, + 0x59300203, 0x4933c857, 0x492fc857, 0x493bc857, + 0x4803c857, 0x82003480, 0x0000000e, 0x02021800, + 0x00100615, 0x0c01f803, 0x5c025800, 0x1c01f000, + 0x00109386, 0x00109391, 0x001093cf, 0x00109386, + 0x00109386, 0x00109386, 0x00109386, 0x00109386, + 0x00109388, 0x00109386, 0x00109386, 0x00109386, + 0x00109386, 0x00109386, 0x0201f800, 0x00100615, + 0x83383480, 0x00000056, 0x02021800, 0x00100615, + 0x493a6403, 0x4a026203, 0x00000001, 0x0201f000, + 0x00106470, 0x83380580, 0x00000013, 0x04020010, + 0x4937c857, 0x592c000c, 0x800001c0, 0x04000006, + 0x4a026203, 0x00000002, 0x59a80037, 0x48026206, + 0x1c01f000, 0x4a025a06, 0x00000000, 0x0201f800, + 0x00020381, 0x0201f000, 0x000208b4, 0x83380580, + 0x00000027, 0x0400001b, 0x83380580, 0x00000014, + 0x04000012, 0x83380580, 0x00000015, 0x04000005, + 0x83380580, 0x00000016, 0x02020800, 0x00100615, + 0x0201f800, 0x00106cb4, 0x02020000, 0x001076fb, + 0x59300203, 0x82000580, 0x00000002, 0x02020800, + 0x00100615, 0x0401f016, 0x4937c857, 0x0201f800, + 0x001068f6, 0x4a02580e, 0x00000011, 0x0401f006, + 0x4937c857, 0x0201f800, 0x001068f6, 0x4a02580e, + 0x00000010, 0x4a025a06, 0x00000031, 0x4a02580d, + 0x00000004, 0x0201f800, 0x00020381, 0x0201f800, + 0x00104a83, 0x0201f000, 0x00107698, 0x59341400, + 0x82081d00, 0x000000ff, 0x59300c03, 0x480bc857, + 0x4807c857, 0x82040580, 0x00000053, 0x0400002e, + 0x82040580, 0x00000002, 0x04000016, 0x82040580, + 0x00000001, 0x04000017, 0x82040580, 0x00000003, + 0x0400001c, 0x82040580, 0x00000005, 0x0400001d, + 0x82040580, 0x00000033, 0x0400001a, 0x82040580, + 0x00000000, 0x0400001b, 0x82040580, 0x00000004, + 0x02020800, 0x00100615, 0x0401f8a1, 0x0401f016, + 0x820c0580, 0x00000003, 0x0400084c, 0x0401f012, + 0x820c0580, 0x0000000b, 0x0402000f, 0x42000800, + 0x00000007, 0x0201f800, 0x001043c7, 0x0401f00a, + 0x820c0580, 0x00000005, 0x04000864, 0x0401f006, + 0x820c0580, 0x00000009, 0x04000889, 0x0401f002, + 0x0401f893, 0x4a026403, 0x00000052, 0x59a81016, + 0x592c040b, 0x8c000500, 0x04000003, 0x42001000, + 0x00000008, 0x592c040b, 0x8c000516, 0x04000003, + 0x82081400, 0x00000018, 0x592c000c, 0x497a580d, + 0x497a580e, 0x80080c80, 0x04000009, 0x04001005, + 0x4a025a06, 0x00000007, 0x40001000, 0x0401f006, + 0x4a025a06, 0x00000015, 0x0401f003, 0x4a025a06, + 0x00000000, 0x480a580c, 0x82081400, 0x00000003, + 0x80081104, 0x0201f800, 0x0010783c, 0x04000010, + 0x592c1001, 0x480a600b, 0x58080800, 0x82080400, + 0x00000002, 0x592c1011, 0x592c1812, 0x42003000, + 0x00000000, 0x42002000, 0x00101250, 0x0201f800, + 0x001079b9, 0x04000002, 0x1c01f000, 0x4a025a06, + 0x0000002c, 0x497a580c, 0x0201f800, 0x00020381, + 0x0201f000, 0x000208b4, 0x83380580, 0x00000015, + 0x0402000a, 0x59a8006f, 0x8c000502, 0x0402000b, + 0x0201f800, 0x00104480, 0x42000800, 0x00000004, + 0x0201f000, 0x001043c7, 0x42000800, 0x00000007, + 0x0201f000, 0x001043c7, 0x0201f800, 0x00104e0d, + 0x42001000, 0x00000010, 0x04020009, 0x59340002, + 0x82000500, 0x00ff0000, 0x82000580, 0x00ff0000, + 0x040007ec, 0x42001000, 0x00000008, 0x0201f800, + 0x00104ada, 0x040007e7, 0x592c040b, 0x84000540, + 0x48025c0b, 0x0401f7e9, 0x83380580, 0x00000015, + 0x0402000f, 0x59a8006f, 0x8c000502, 0x04020010, + 0x0201f800, 0x001044e1, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x001043bd, 0x5c027800, 0x42000800, + 0x00000006, 0x0201f000, 0x001043c7, 0x42000800, + 0x00000004, 0x0201f000, 0x001043c7, 0x0201f800, + 0x00104e0d, 0x42001000, 0x00000010, 0x04020009, + 0x59340002, 0x82000500, 0x00ff0000, 0x82000580, + 0x00ff0000, 0x040007e7, 0x42001000, 0x00000008, + 0x0201f800, 0x00104ada, 0x040007e2, 0x592c040b, + 0x84000540, 0x48025c0b, 0x0401f7e9, 0x42000800, + 0x00000004, 0x0201f000, 0x001043c7, 0x83380580, + 0x00000015, 0x04020005, 0x0201f800, 0x0010a0b1, + 0x02000800, 0x00104711, 0x1c01f000, 0x83380580, + 0x00000015, 0x0402001d, 0x4c580000, 0x83cc1400, + 0x00000008, 0x4200b000, 0x00000002, 0x83341c00, + 0x00000006, 0x0201f800, 0x001082ff, 0x04020012, + 0x83cc1400, 0x0000000a, 0x4200b000, 0x00000002, + 0x83341c00, 0x00000008, 0x0201f800, 0x001082ff, + 0x04020009, 0x59342200, 0x59cc1007, 0x800811c0, + 0x04000003, 0x480a6801, 0x84102542, 0x8410251a, + 0x48126a00, 0x5c00b000, 0x1c01f000, 0x42000000, + 0x0010b67a, 0x0201f800, 0x0010a86e, 0x0201f800, + 0x0010698c, 0x59300203, 0x4933c857, 0x4803c857, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f803, 0x0201f000, 0x00106982, 0x001094d7, + 0x001094e6, 0x001094d8, 0x001094d5, 0x001094d5, + 0x001094d5, 0x001094d5, 0x001094d5, 0x001094d5, + 0x001094d5, 0x001094d5, 0x001094d5, 0x001094d5, + 0x001094d5, 0x0201f800, 0x00100615, 0x1c01f000, + 0x59300403, 0x82000580, 0x00000052, 0x02000000, + 0x00108b39, 0x0201f800, 0x00104a83, 0x59325808, + 0x4a025a06, 0x00000006, 0x0201f800, 0x00020381, + 0x0201f000, 0x00107698, 0x59301804, 0x840c0520, + 0x48026004, 0x598c000d, 0x81300580, 0x04020010, + 0x8c0c1d20, 0x04020010, 0x42001000, 0x0010b5f4, + 0x50081000, 0x58080002, 0x82000580, 0x00000100, + 0x0400000e, 0x5808000c, 0x81300580, 0x02020800, + 0x00100615, 0x4978100c, 0x0401f003, 0x8c0c1d20, + 0x040207dc, 0x0201f800, 0x00106619, 0x040007d9, + 0x0201f800, 0x00100615, 0x0201f800, 0x00106be2, + 0x040007f9, 0x59300203, 0x82000c80, 0x0000000e, + 0x02021800, 0x00100615, 0x0c01f7bd, 0x4933c857, + 0x4c500000, 0x4c540000, 0x4c580000, 0x592c0c07, + 0x4806580a, 0x59cc0809, 0x48065807, 0x59cc0a08, + 0x4806580b, 0x59a8086e, 0x82040500, 0x000003ff, + 0x800010c4, 0x8c040d14, 0x04000005, 0x59cc0002, + 0x82000500, 0x00000003, 0x80081480, 0x82080480, + 0x000000f1, 0x02021800, 0x00100615, 0x480a621a, + 0x412c0800, 0x0201f800, 0x00100819, 0x02000800, + 0x00100615, 0x492c0809, 0x58040408, 0x84000552, + 0x84000540, 0x48000c08, 0x82081400, 0x00000003, + 0x80081104, 0x83cca400, 0x00000006, 0x832cac00, + 0x00000004, 0x42000800, 0x00000010, 0x82080480, + 0x00000010, 0x04021003, 0x40080800, 0x80000580, + 0x4004b000, 0x4c000000, 0x0201f800, 0x0010a94f, + 0x5c000000, 0x800001c0, 0x0400000d, 0x412c1000, + 0x4c000000, 0x0201f800, 0x00100819, 0x02000800, + 0x00100615, 0x492c1001, 0x832cac00, 0x00000004, + 0x5c000000, 0x40001000, 0x0401f7e9, 0x5c00b000, + 0x5c00a800, 0x5c00a000, 0x1c01f000, 0x4933c857, + 0x4d2c0000, 0x4c380000, 0x59325808, 0x5930021a, + 0x48025a08, 0x59301011, 0x800811c0, 0x04020008, + 0x4a025a06, 0x00000000, 0x592c000b, 0x82000500, + 0x00000c00, 0x0400000b, 0x0401f00b, 0x8c08153e, + 0x04000006, 0x4a025a06, 0x00000007, 0x80081080, + 0x80081000, 0x0401f003, 0x4a025a06, 0x00000015, + 0x480a5807, 0x42000000, 0x0010bcd8, 0x50007000, + 0x5838000b, 0x80000540, 0x04020008, 0x4930700c, + 0x4930700b, 0x58380002, 0x82000580, 0x00000000, + 0x04020809, 0x0401f005, 0x82001400, 0x00000000, + 0x45301000, 0x4930700b, 0x5c007000, 0x5c025800, + 0x1c01f000, 0x4933c857, 0x592c0009, 0x40001000, + 0x4800700a, 0x82080400, 0x00000004, 0x48007003, + 0x592c000d, 0x592c100e, 0x48007007, 0x48087008, + 0x592c000a, 0x592c1208, 0x80080c80, 0x04001002, + 0x40001000, 0x82081400, 0x00000003, 0x80081104, + 0x82080480, 0x00000010, 0x04021003, 0x80000580, + 0x0401f003, 0x42001000, 0x00000010, 0x4800700d, + 0x48087004, 0x800810c4, 0x48087005, 0x40381000, + 0x0201f800, 0x001008a1, 0x1c01f000, 0x4d2c0000, + 0x0201f800, 0x00100819, 0x02000800, 0x00100615, + 0x42000800, 0x0010bcd8, 0x452c0800, 0x497a580b, + 0x497a580c, 0x497a580d, 0x4a025809, 0x001095b6, + 0x4a025802, 0x00000100, 0x4a025801, 0x00000000, + 0x5c025800, 0x1c01f000, 0x4833c857, 0x4d300000, + 0x4d2c0000, 0x4c5c0000, 0x4030b800, 0x585c000a, + 0x80025d40, 0x04020004, 0x585c000c, 0x4c000000, + 0x0401f044, 0x585c0002, 0x82000580, 0x00000100, + 0x04020022, 0x592c0801, 0x4c040000, 0x0201f800, + 0x0010083a, 0x5c000800, 0x800409c0, 0x0400001c, + 0x4804b80a, 0x585c100d, 0x800811c0, 0x04020005, + 0x40065800, 0x0201f800, 0x00100843, 0x0401f014, + 0x82080480, 0x00000010, 0x04021003, 0x80000580, + 0x0401f003, 0x42001000, 0x00000010, 0x4800b80d, + 0x4808b804, 0x800810c4, 0x4808b805, 0x82040400, + 0x00000004, 0x4800b803, 0x405c1000, 0x0201f800, + 0x001008a1, 0x0401f025, 0x0401f828, 0x585c000c, + 0x80026540, 0x59300000, 0x80000d40, 0x04020002, + 0x4800b80b, 0x4800b80c, 0x497a6000, 0x4c000000, + 0x4978b80a, 0x59325808, 0x4a025a04, 0x00000103, + 0x59300402, 0x48025c06, 0x592c100b, 0x4c080000, + 0x0201f800, 0x00020381, 0x0201f800, 0x00108ee7, + 0x5c001000, 0x8c081518, 0x04000004, 0x0201f800, + 0x00108f88, 0x0401f003, 0x0201f800, 0x000208b4, + 0x405c7000, 0x5c000000, 0x80026540, 0x04000003, + 0x59325808, 0x0401ff78, 0x5c00b800, 0x5c025800, + 0x5c026000, 0x1c01f000, 0x483bc857, 0x5838000a, + 0x40025800, 0x0201f800, 0x00100843, 0x5838000c, + 0x80026540, 0x59300008, 0x80025d40, 0x4a025a06, + 0x00000002, 0x1c01f000, 0x4803c857, 0x4d1c0000, + 0x497a601c, 0x41323800, 0x40026000, 0x4d3c0000, + 0x42027800, 0x00000005, 0x0401f840, 0x5c027800, + 0x411e6000, 0x59300414, 0x84000502, 0x48026414, + 0x5c023800, 0x1c01f000, 0x481bc857, 0x4933c857, + 0x4c5c0000, 0x4c600000, 0x4010b800, 0x4014c000, + 0x0201f800, 0x0010a766, 0x0201f800, 0x0010393e, + 0x04000008, 0x40602800, 0x405c3000, 0x0201f800, + 0x0010a258, 0x82000540, 0x00000001, 0x0401f002, + 0x80000580, 0x5c00c000, 0x5c00b800, 0x1c01f000, + 0x4803c856, 0x4d300000, 0x42026000, 0x0010cfc0, + 0x59a8000e, 0x81640580, 0x0400001a, 0x59300c06, + 0x82040580, 0x00000001, 0x0400000d, 0x82040580, + 0x00000004, 0x04000006, 0x82040580, 0x00000010, + 0x02000800, 0x00108aad, 0x0401f009, 0x59300203, + 0x82000d80, 0x00000007, 0x04000005, 0x4807c857, + 0x0201f800, 0x0010909d, 0x04020808, 0x83326400, + 0x00000024, 0x41580000, 0x81300480, 0x040017e5, + 0x5c026000, 0x1c01f000, 0x4933c857, 0x59300403, + 0x4803c857, 0x0201f800, 0x0010698c, 0x4df00000, + 0x59300406, 0x4803c857, 0x82000d80, 0x00000002, + 0x04000018, 0x82000d80, 0x00000001, 0x04000009, + 0x82000d80, 0x00000004, 0x04000006, 0x4933c856, + 0x5c03e000, 0x02000800, 0x00106982, 0x0401f03c, + 0x59300203, 0x82000d80, 0x00000001, 0x04000018, + 0x82000d80, 0x00000002, 0x04000026, 0x82000d80, + 0x00000005, 0x04000023, 0x0201f800, 0x00100615, + 0x59300203, 0x82000d80, 0x00000009, 0x0400000c, + 0x82000d80, 0x0000000b, 0x04000009, 0x82000d80, + 0x0000000a, 0x04000017, 0x82000d80, 0x0000000c, + 0x04000014, 0x0201f800, 0x00100615, 0x598c000d, + 0x81300580, 0x04020004, 0x0201f800, 0x00106be2, + 0x0402000c, 0x59300004, 0x4803c857, 0x8c000520, + 0x04000004, 0x84000520, 0x48026004, 0x0401f005, + 0x0201f800, 0x00106619, 0x02020800, 0x00100615, + 0x5c03e000, 0x02000800, 0x00106982, 0x59300406, + 0x82000d80, 0x00000002, 0x04000009, 0x0201f800, + 0x00104a83, 0x0201f800, 0x00108f05, 0x02000800, + 0x00107da6, 0x8d3e7d00, 0x04000003, 0x0201f000, + 0x00107698, 0x4a02621d, 0x00000001, 0x4a026403, + 0x00000085, 0x4a026203, 0x00000009, 0x4a026406, + 0x00000002, 0x42000800, 0x8000004b, 0x0201f000, + 0x00020855, 0x4933c857, 0x59368c03, 0x4c180000, + 0x59300203, 0x82003480, 0x0000000e, 0x02021800, + 0x00100615, 0x0c01f803, 0x5c003000, 0x1c01f000, + 0x001096da, 0x00109bb9, 0x00109cbd, 0x001096da, + 0x001096da, 0x001096da, 0x001096da, 0x001096da, + 0x001096fd, 0x001096da, 0x001096da, 0x001096da, + 0x001096da, 0x001096da, 0x0201f800, 0x00100615, + 0x4933c857, 0x42028800, 0x0000ffff, 0x813669c0, + 0x04000002, 0x59368c03, 0x4c180000, 0x59300203, + 0x82003480, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f803, 0x5c003000, 0x1c01f000, 0x001096f9, + 0x00109f70, 0x001096f9, 0x001096f9, 0x001096f9, + 0x001096f9, 0x001096f9, 0x0010a779, 0x00109edd, + 0x0010a34a, 0x0010a380, 0x0010a34a, 0x0010a380, + 0x001096f9, 0x0201f800, 0x00100615, 0x0201f800, + 0x00100615, 0x83383480, 0x00000051, 0x02021800, + 0x00100615, 0x41380000, 0x493bc857, 0x4d1c0000, + 0x4d400000, 0x0c01f804, 0x5c028000, 0x5c023800, + 0x1c01f000, 0x0010975a, 0x0010993d, 0x0010975a, + 0x0010975a, 0x0010975a, 0x00109948, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010975a, + 0x0010977c, 0x001097ba, 0x001097d1, 0x0010982d, + 0x00109894, 0x001098d2, 0x00109902, 0x0010975a, + 0x0010975a, 0x00109950, 0x0010975a, 0x0010975a, + 0x0010995e, 0x00109967, 0x0010975a, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x001099e9, + 0x0010975a, 0x0010975a, 0x00109868, 0x0010975a, + 0x0010975a, 0x001099c0, 0x0010975a, 0x0010975a, + 0x0010975a, 0x001099f7, 0x0010975a, 0x0010975a, + 0x0010975a, 0x00109a40, 0x0010975a, 0x0010975a, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010975a, + 0x00109a8d, 0x0010975a, 0x00109ab9, 0x00109ac4, + 0x0010975a, 0x0010975a, 0x0010975c, 0x00109acf, + 0x0010975a, 0x0010975a, 0x0010975a, 0x0010976b, + 0x0010975a, 0x0010975a, 0x0010975a, 0x00109ad6, + 0x00109ade, 0x00109afc, 0x0201f800, 0x00100615, + 0x4933c857, 0x0201f800, 0x0010a3b0, 0x040203a8, + 0x0201f800, 0x00101eb0, 0x040203a5, 0x59cc0407, + 0x4802601c, 0x4a026403, 0x00000045, 0x4a026203, + 0x00000001, 0x0201f000, 0x00106470, 0x4933c857, + 0x0201f800, 0x0010a3b0, 0x04020399, 0x0201f800, + 0x00101eb0, 0x04020396, 0x0401fbd6, 0x0402019e, + 0x59cc0007, 0x4802601c, 0x4a026403, 0x0000004a, + 0x4a026203, 0x00000001, 0x0201f000, 0x00106470, + 0x4933c857, 0x0201f800, 0x00101eb0, 0x04020009, + 0x0201f800, 0x0010473b, 0x04020006, 0x82000500, + 0x00000009, 0x82000580, 0x00000008, 0x04020008, + 0x4a026403, 0x00000009, 0x4a02641a, 0x00000009, + 0x4a02621a, 0x00000000, 0x0401f1b6, 0x0201f800, + 0x00104858, 0x04000018, 0x0201f800, 0x0010a041, + 0x0402001f, 0x42028000, 0x00000029, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x0201f800, 0x00104480, 0x4a026403, 0x00000008, + 0x42003000, 0x00000003, 0x0201f800, 0x0010393e, + 0x040001a0, 0x4a026203, 0x00000007, 0x41782800, + 0x0401f18b, 0x0201f800, 0x0010a1ec, 0x040207e7, + 0x4a026403, 0x00000009, 0x4a02641a, 0x0000000e, + 0x4a02621a, 0x00001900, 0x0401f192, 0x4a026403, + 0x00000009, 0x4a02641a, 0x00000003, 0x4a02621a, + 0x00000f00, 0x0401f18b, 0x4933c857, 0x0201f800, + 0x00101eb0, 0x0402034a, 0x0201f800, 0x0010473b, + 0x04020347, 0x493a6403, 0x0201f800, 0x0010a01c, + 0x04020006, 0x42003000, 0x00000005, 0x4a026403, + 0x00000006, 0x0401f7d9, 0x4a026403, 0x00000007, + 0x4a02641a, 0x00000009, 0x4a02621a, 0x00000000, + 0x0401f174, 0x4933c857, 0x0201f800, 0x0010473b, + 0x04020333, 0x0201f800, 0x0010a3b0, 0x02000800, + 0x00101eb0, 0x0402032e, 0x0201f800, 0x00104858, + 0x04020005, 0x42027800, 0x00000001, 0x0201f800, + 0x001043bd, 0x0201f800, 0x0010484b, 0x04020031, + 0x59cc0206, 0x82003500, 0x00000003, 0x04020034, + 0x82003480, 0x00000014, 0x04001031, 0x5934300a, + 0x84183516, 0x82000580, 0x00000014, 0x04020002, + 0x84183556, 0x481a680a, 0x59cc0406, 0x82000500, + 0x00000003, 0x04020026, 0x0201f800, 0x0010a08e, + 0x0402002e, 0x0201f800, 0x00104836, 0x04020007, + 0x4c600000, 0x4178c000, 0x417a7800, 0x0201f800, + 0x00101e48, 0x5c00c000, 0x836c0580, 0x00000003, + 0x04020009, 0x42003000, 0x00000006, 0x0201f800, + 0x0010a75e, 0x42000000, 0x0010b664, 0x0201f800, + 0x0010a86e, 0x0201f800, 0x001044e1, 0x4a026403, + 0x0000000a, 0x42003000, 0x00000020, 0x0401f78f, + 0x4a026403, 0x0000000b, 0x4a02641a, 0x00000009, + 0x4a02621a, 0x00001e00, 0x0401f12a, 0x42000000, + 0x0010b65f, 0x0201f800, 0x0010a86e, 0x4a026403, + 0x0000000b, 0x4a02641a, 0x00000007, 0x4a02621a, + 0x00000000, 0x0401f11f, 0x4a026403, 0x0000000b, + 0x4a02641a, 0x00000003, 0x4a02621a, 0x00000000, + 0x0401f118, 0x4933c857, 0x0201f800, 0x0010473b, + 0x040202d7, 0x0201f800, 0x0010a3b0, 0x040202d4, + 0x0201f800, 0x00101eb0, 0x040202d1, 0x59cc0206, + 0x82003500, 0x00000003, 0x04020020, 0x82003480, + 0x00000014, 0x0400101d, 0x59cc0406, 0x82000500, + 0x00000003, 0x04020019, 0x59340400, 0x82000580, + 0x00000707, 0x0400001c, 0x417a7800, 0x4c600000, + 0x4178c000, 0x0201f800, 0x00101e48, 0x5c00c000, + 0x42003000, 0x0000000a, 0x0201f800, 0x0010a75e, + 0x42000000, 0x0010b661, 0x0201f800, 0x0010a86e, + 0x4a026403, 0x0000000c, 0x41782800, 0x42003000, + 0x00000021, 0x0401f749, 0x4a026403, 0x0000000d, + 0x4a02641a, 0x00000007, 0x4a02621a, 0x00000000, + 0x0401f0e4, 0x4a026403, 0x0000000d, 0x4a02641a, + 0x00000009, 0x4a02621a, 0x00001e00, 0x0401f0dd, + 0x4933c857, 0x0201f800, 0x0010473b, 0x0402029c, + 0x0201f800, 0x0010a3b0, 0x04020299, 0x0201f800, + 0x00101eb0, 0x04020296, 0x0401fad6, 0x0402001a, + 0x493a6403, 0x4c5c0000, 0x0401fadc, 0x0402000e, + 0x4a026403, 0x0000002e, 0x4014b800, 0x0201f800, + 0x0010393e, 0x0400000e, 0x4a026203, 0x00000007, + 0x405c2800, 0x42003000, 0x00000024, 0x5c00b800, + 0x0401f0af, 0x4a026403, 0x0000000d, 0x4a02641a, + 0x00000007, 0x4a02621a, 0x00000000, 0x5c00b800, + 0x0401f0b8, 0x4a026403, 0x0000000d, 0x4a02641a, + 0x00000009, 0x4a02621a, 0x00001e00, 0x0401f0b1, + 0x4933c857, 0x0201f800, 0x0010473b, 0x040206f1, + 0x59a80026, 0x82000500, 0x00000009, 0x82000580, + 0x00000008, 0x040006eb, 0x0201f800, 0x0010484b, + 0x0402002d, 0x0201f800, 0x0010a096, 0x04020007, + 0x4a026403, 0x0000000e, 0x41782800, 0x42003000, + 0x00000052, 0x0401f6f9, 0x4933c857, 0x42003000, + 0x00000003, 0x0201f800, 0x0010a766, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x59340200, 0x84000558, 0x48026a00, 0x42000800, + 0x0000000b, 0x0201f800, 0x001043c7, 0x0201f800, + 0x0010393e, 0x0400007c, 0x42003000, 0x00000007, + 0x0401f061, 0x4933c857, 0x4a026403, 0x0000000f, + 0x4a02641a, 0x00000003, 0x4a02621a, 0x00001e00, + 0x0401f078, 0x59340400, 0x82000580, 0x00000703, + 0x040007f5, 0x0401f040, 0x4933c857, 0x0201f800, + 0x0010473b, 0x04020232, 0x59a80026, 0x82000500, + 0x00000009, 0x82000580, 0x00000008, 0x0400022c, + 0x0201f800, 0x00104842, 0x0402002f, 0x0201f800, + 0x0010a0b1, 0x02000800, 0x0010a041, 0x04020007, + 0x4a026403, 0x00000010, 0x41782800, 0x42003000, + 0x00000050, 0x0401f6b9, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x00101de2, 0x5c027800, 0x42003000, + 0x00000003, 0x0201f800, 0x0010a766, 0x42000000, + 0x0010b663, 0x0201f800, 0x0010a86e, 0x59340200, + 0x84000558, 0x48026a00, 0x0401f7c5, 0x4a026403, + 0x00000011, 0x4a02641a, 0x00000003, 0x4a02621a, + 0x00001e00, 0x0401f043, 0x4933c857, 0x0201f800, + 0x00101eb0, 0x02000800, 0x0010a3b0, 0x04020200, + 0x0401fa40, 0x04020008, 0x4a026403, 0x00000012, + 0x0401f038, 0x59340400, 0x82000580, 0x00000703, + 0x040007eb, 0x4d3c0000, 0x417a7800, 0x42028000, + 0x00000029, 0x0201f800, 0x00101de2, 0x5c027800, + 0x42003000, 0x00000017, 0x0201f800, 0x0010a766, + 0x42000000, 0x0010b663, 0x0201f800, 0x0010a86e, + 0x0201f800, 0x0010393e, 0x0400001b, 0x42003000, + 0x00000006, 0x42028000, 0x00000029, 0x4933c857, + 0x4a026403, 0x00000001, 0x4a026203, 0x00000007, + 0x4c180000, 0x0201f800, 0x0010a79b, 0x5c003000, + 0x41782800, 0x0201f000, 0x0010a250, 0x42028000, + 0x00000046, 0x4c140000, 0x4c180000, 0x0201f800, + 0x0010a79b, 0x5c003000, 0x5c002800, 0x0201f000, + 0x0010a250, 0x4933c857, 0x4a026403, 0x00000001, + 0x42000800, 0x0000000b, 0x0201f800, 0x001043c7, + 0x4a026203, 0x00000001, 0x0201f000, 0x00106470, + 0x4933c857, 0x42000800, 0x00000009, 0x0201f800, + 0x001043c7, 0x4a026403, 0x00000005, 0x0401f7f5, + 0x0201f800, 0x0010a3b0, 0x040201b5, 0x0201f800, + 0x00101eb0, 0x040201b2, 0x0401f9f2, 0x040207ba, + 0x4a026403, 0x00000020, 0x4a026203, 0x00000001, + 0x0201f000, 0x00106470, 0x0201f800, 0x00101eb0, + 0x040201a7, 0x4a026403, 0x00000023, 0x4a026203, + 0x00000001, 0x0201f000, 0x00106470, 0x0201f800, + 0x0010a3b0, 0x02000800, 0x00101eb0, 0x0402019c, + 0x0401f9dc, 0x040207a4, 0x40300800, 0x59a81010, + 0x59cc0007, 0x82000500, 0x00ffffff, 0x80080580, + 0x04000019, 0x59cc1408, 0x0201f800, 0x00108de9, + 0x0400002d, 0x59cc0c08, 0x4d300000, 0x0201f800, + 0x00105b0f, 0x41323800, 0x5c026000, 0x04000026, + 0x591c0202, 0x82000580, 0x0000ffff, 0x04000005, + 0x59cc1208, 0x591c0202, 0x80080580, 0x0402001e, + 0x591c0406, 0x82000580, 0x00000007, 0x0402001a, + 0x0401f02c, 0x59cc1208, 0x82080580, 0x0000ffff, + 0x0400000c, 0x0201f800, 0x001091d9, 0x04000012, + 0x59cc1408, 0x591c0202, 0x80080580, 0x0402000e, + 0x591c0009, 0x81340580, 0x04000016, 0x0401f00a, + 0x59cc1408, 0x417a7800, 0x0201f800, 0x0010a217, + 0x04020010, 0x59cc1208, 0x82080580, 0x0000ffff, + 0x04000019, 0x4a026403, 0x00000026, 0x4a02621a, + 0x00001700, 0x59cc1204, 0x82081580, 0x0000ffff, + 0x04020798, 0x4a026403, 0x00000025, 0x0401f795, + 0x591c0406, 0x82000580, 0x00000007, 0x040207f2, + 0x591c0403, 0x82000580, 0x00000024, 0x04020006, + 0x4d300000, 0x411e6000, 0x0201f800, 0x000208b4, + 0x5c026000, 0x4a026403, 0x00000025, 0x0401f785, + 0x4933c857, 0x4d3c0000, 0x42027800, 0x00000001, + 0x0201f800, 0x001043bd, 0x5c027800, 0x4c580000, + 0x4200b000, 0x00000002, 0x83a81c00, 0x00000002, + 0x83cc1400, 0x0000000b, 0x0201f800, 0x001082ff, + 0x5c00b000, 0x04000004, 0x4a026403, 0x00000031, + 0x0401f770, 0x0201f800, 0x00107698, 0x0201f800, + 0x00104e0d, 0x0402000f, 0x0201f800, 0x00104e1b, + 0x04020008, 0x4a035033, 0x00000001, 0x4202d800, + 0x00000001, 0x0201f800, 0x00104d76, 0x0401f005, + 0x42000000, 0x00000001, 0x0201f800, 0x00104de5, + 0x1c01f000, 0x0201f800, 0x00101eb0, 0x0402011c, + 0x0401f95c, 0x04020724, 0x493a6403, 0x0401f9ac, + 0x04020004, 0x4a026403, 0x0000002b, 0x0401f751, + 0x4a026403, 0x0000002c, 0x0401f74e, 0x4933c857, + 0x0201f800, 0x00101eb0, 0x0402010d, 0x0201f800, + 0x00104836, 0x04020740, 0x0201f800, 0x00104728, + 0x0400003c, 0x59cc0408, 0x48026419, 0x59cc0208, + 0x48026219, 0x59cc0807, 0x59340002, 0x82000500, + 0x00ffffff, 0x80040580, 0x04000012, 0x59a80010, + 0x80040580, 0x04020021, 0x59cc1408, 0x0201f800, + 0x001091d9, 0x04000023, 0x0201f800, 0x0010a2e8, + 0x04000020, 0x0201f800, 0x0010a745, 0x0400001d, + 0x491e601e, 0x4a026403, 0x00000036, 0x0401f0e6, + 0x59cc1208, 0x82080580, 0x0000ffff, 0x04000009, + 0x0201f800, 0x001091d9, 0x04000012, 0x591c0202, + 0x59cc0c08, 0x80040580, 0x0402000e, 0x0401f7eb, + 0x59cc1408, 0x41327800, 0x0201f800, 0x0010a217, + 0x04000008, 0x0401f7e5, 0x4803c856, 0x4a02641a, + 0x00000009, 0x4a02621a, 0x00001500, 0x0401f006, + 0x4803c856, 0x4a02641a, 0x00000003, 0x4a02621a, + 0x00001700, 0x4a026403, 0x00000037, 0x0401f0c6, + 0x4803c856, 0x4a026403, 0x00000012, 0x0401f0c2, + 0x4933c857, 0x0201f800, 0x00101eb0, 0x040200c4, + 0x0201f800, 0x00104836, 0x040206f7, 0x0201f800, + 0x00104728, 0x0400003e, 0x59cc0407, 0x48026419, + 0x59cc1207, 0x480a6219, 0x82080580, 0x0000ffff, + 0x04000005, 0x0201f800, 0x001091d9, 0x0400002c, + 0x0401f006, 0x59cc1407, 0x41327800, 0x0201f800, + 0x0010a217, 0x04000026, 0x59cc0c07, 0x591c0202, + 0x80040580, 0x04020022, 0x4d300000, 0x411e6000, + 0x0201f800, 0x0010898b, 0x5c026000, 0x59cc0c09, + 0x82040d00, 0x0000ff00, 0x840409c0, 0x0201f800, + 0x0010a745, 0x04000016, 0x82040580, 0x00000001, + 0x0400000a, 0x82040580, 0x00000005, 0x04000004, + 0x82040580, 0x00000007, 0x04020007, 0x591c0008, + 0x80000540, 0x04000004, 0x59cc2808, 0x0201f000, + 0x0010a2fc, 0x4803c856, 0x4a02641a, 0x00000009, + 0x4a02621a, 0x00002a00, 0x0401f006, 0x4803c856, + 0x4a02641a, 0x00000003, 0x4a02621a, 0x00000300, + 0x4a026403, 0x0000003b, 0x0401f07b, 0x4803c856, + 0x4a02641a, 0x0000000b, 0x4a02621a, 0x00000000, + 0x0401f7f8, 0x4c080000, 0x0201f800, 0x0010473b, + 0x04000026, 0x0201f800, 0x00104711, 0x0201f800, + 0x0010a41c, 0x0402001e, 0x59a80026, 0x82000540, + 0x00000003, 0x48035026, 0x59a8001d, 0x800000d0, + 0x59a80810, 0x82040d00, 0x000000ff, 0x80041540, + 0x480b5010, 0x42000800, 0x00000003, 0x0201f800, + 0x001069af, 0x497b5028, 0x0201f800, 0x0010393e, + 0x04000003, 0x4a032804, 0x000007d0, 0x8c00050a, + 0x0402000a, 0x0201f800, 0x000208b4, 0x0201f800, + 0x00101bf0, 0x5c001000, 0x1c01f000, 0x0201f800, + 0x0010a43e, 0x0401f7fc, 0x5c001000, 0x0201f000, + 0x000208b4, 0x0201f800, 0x00101eb0, 0x0402004c, + 0x0201f800, 0x0010a443, 0x4a026403, 0x00000047, + 0x4a026203, 0x00000001, 0x0201f000, 0x00106470, + 0x0201f800, 0x00101eb0, 0x04020041, 0x0201f800, + 0x0010a443, 0x4a026403, 0x00000047, 0x4a026203, + 0x00000001, 0x0201f000, 0x00106470, 0x0201f800, + 0x00101eb0, 0x04020036, 0x0201f800, 0x0010a443, + 0x0201f000, 0x000208b4, 0x0401f834, 0x04000030, + 0x4a026403, 0x0000004e, 0x4a026203, 0x00000001, + 0x0201f000, 0x00106470, 0x4a026403, 0x0000004f, + 0x497a601c, 0x59cc0a06, 0x82040d00, 0x000000ff, + 0x800409c0, 0x0400065f, 0x82040580, 0x00000001, + 0x04020005, 0x59cc0808, 0x59a80005, 0x80040580, + 0x04000658, 0x82040580, 0x00000002, 0x0402000a, + 0x83cc1400, 0x0000000b, 0x4200b000, 0x00000002, + 0x83341c00, 0x00000006, 0x0201f800, 0x001082ff, + 0x0400064c, 0x4a02601c, 0x00000001, 0x0401f649, + 0x4a026403, 0x00000050, 0x59cc0207, 0x4802601c, + 0x0401f644, 0x4a026203, 0x00000001, 0x42000800, + 0x80000040, 0x0201f000, 0x00020855, 0x4803c857, + 0x0201f000, 0x000208b4, 0x4d2c0000, 0x4c500000, + 0x4c580000, 0x4c540000, 0x59a80016, 0x82000c80, + 0x00000841, 0x0402102d, 0x0201f800, 0x00100819, + 0x0400002a, 0x492e6008, 0x59a80016, 0x48025802, + 0x82000400, 0x00000003, 0x80000104, 0x83cca400, + 0x00000006, 0x82000c80, 0x0000000b, 0x04001015, + 0x4a025811, 0x0000000b, 0x4200b000, 0x0000000b, + 0x832c0400, 0x00000005, 0x4000a800, 0x0201f800, + 0x0010a93e, 0x412c7000, 0x800409c0, 0x04020003, + 0x49787001, 0x0401f00e, 0x0201f800, 0x00100819, + 0x0400000e, 0x492c7001, 0x40040000, 0x0401f7ea, + 0x48025811, 0x4000b000, 0x832c0400, 0x00000005, + 0x4000a800, 0x0201f800, 0x0010a93e, 0x82000540, + 0x00000001, 0x0401f006, 0x497b5016, 0x59325808, + 0x0201f800, 0x00100843, 0x80000580, 0x5c00a800, + 0x5c00b000, 0x5c00a000, 0x5c025800, 0x1c01f000, + 0x4d340000, 0x59326809, 0x59343400, 0x4933c857, + 0x4937c857, 0x481bc857, 0x0201f800, 0x00104842, + 0x5c026800, 0x1c01f000, 0x4933c857, 0x4c600000, + 0x4c5c0000, 0x4d3c0000, 0x4d440000, 0x4d340000, + 0x0401f84f, 0x04020037, 0x59cc0207, 0x82000d00, + 0x0000ff00, 0x900411c0, 0x59cc000a, 0x82000500, + 0x00ffffff, 0x80081540, 0x480a601c, 0x8c040d18, + 0x04000011, 0x42003000, 0x00000008, 0x0201f800, + 0x0010a756, 0x42000000, 0x0010b662, 0x0201f800, + 0x0010a86e, 0x4200b800, 0x00000002, 0x4200c000, + 0x00000001, 0x417a7800, 0x0201f800, 0x00101e48, + 0x0401f01f, 0x4178b800, 0x8c040d1a, 0x04000019, + 0x59cc000a, 0x0201f800, 0x001059b9, 0x02000800, + 0x00020267, 0x04020013, 0x59300009, 0x4c000000, + 0x49366009, 0x42003000, 0x00000009, 0x0201f800, + 0x0010a75e, 0x42000000, 0x0010b662, 0x0201f800, + 0x0010a86e, 0x417a7800, 0x4178c000, 0x0201f800, + 0x00101e48, 0x5c000000, 0x48026009, 0x0401f004, + 0x82000540, 0x00000001, 0x0401f003, 0x405c2800, + 0x80000580, 0x5c026800, 0x5c028800, 0x5c027800, + 0x5c00b800, 0x5c00c000, 0x1c01f000, 0x4933c857, + 0x59cc0206, 0x82000480, 0x00000010, 0x04021006, + 0x4a02621a, 0x00000000, 0x82000540, 0x00000001, + 0x0401f002, 0x80000580, 0x1c01f000, 0x4933c857, + 0x4a02621a, 0x00000000, 0x59cc0407, 0x82000500, + 0x0000ff00, 0x82000580, 0x00000800, 0x04020009, + 0x59cc0006, 0x82000500, 0x00ff0000, 0x82000d80, + 0x00140000, 0x04000003, 0x82000d80, 0x00100000, + 0x1c01f000, 0x59300403, 0x82003480, 0x00000051, + 0x02021800, 0x00100615, 0x83383580, 0x00000013, + 0x04020003, 0x4803c857, 0x0c01f016, 0x4933c857, + 0x493bc857, 0x83383580, 0x00000027, 0x04000005, + 0x83383580, 0x00000014, 0x02020800, 0x00100615, + 0x493bc857, 0x4937c857, 0x0201f800, 0x00104711, + 0x42000800, 0x00000007, 0x0201f800, 0x001043c7, + 0x0201f800, 0x001068f6, 0x0201f000, 0x00107698, + 0x00109c29, 0x00109c32, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c32, 0x00109c3d, 0x00109cb0, + 0x00109c82, 0x00109cb0, 0x00109c9a, 0x00109cb0, + 0x00109ca1, 0x00109cb0, 0x00109ca9, 0x00109cb0, + 0x00109ca9, 0x00109cb0, 0x00109cb0, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c32, 0x00109c29, + 0x00109cb0, 0x00109c29, 0x00109c29, 0x00109cb0, + 0x00109c29, 0x00109cad, 0x00109cb0, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c29, 0x00109cb0, + 0x00109cb0, 0x00109c29, 0x00109ca6, 0x00109cb0, + 0x00109c29, 0x00109c37, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109cac, 0x00109cb0, + 0x00109c29, 0x00109c29, 0x00109cb0, 0x00109cb0, + 0x00109c29, 0x00109c29, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c29, 0x00109c29, + 0x00109c29, 0x00109c2b, 0x00109c29, 0x00109c2b, + 0x00109c29, 0x00109c29, 0x00109c2b, 0x00109c29, + 0x00109c29, 0x00109c29, 0x00109c2b, 0x00109c2b, + 0x00109c2b, 0x0201f800, 0x00100615, 0x4d2c0000, + 0x59325808, 0x0201f800, 0x00100843, 0x5c025800, + 0x0201f000, 0x000208b4, 0x59a80037, 0x48026206, + 0x4a026203, 0x00000002, 0x1c01f000, 0x4d3c0000, + 0x417a7800, 0x0201f800, 0x001043bd, 0x5c027800, + 0x0401f074, 0x42000800, 0x00000007, 0x0201f800, + 0x001043c7, 0x59a80026, 0x8c000508, 0x04000012, + 0x59326809, 0x4c580000, 0x4200b000, 0x00000002, + 0x83a81c00, 0x00000002, 0x83341400, 0x00000006, + 0x0201f800, 0x001082ff, 0x80000540, 0x5c00b000, + 0x04020060, 0x59340200, 0x8400051a, 0x48026a00, + 0x0401f01b, 0x599c0017, 0x8c00050a, 0x04020059, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x001043bd, + 0x5c027800, 0x42000800, 0x00000007, 0x0201f800, + 0x001043c7, 0x59340212, 0x82000500, 0x0000ff00, + 0x0400004c, 0x599c0019, 0x8c00050e, 0x04020049, + 0x416c0000, 0x82000580, 0x00000002, 0x04020004, + 0x59a8001b, 0x80000000, 0x4803501b, 0x42000800, + 0x00000003, 0x0201f800, 0x001043c7, 0x4a026406, + 0x00000001, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000002, 0x0201f800, 0x00106470, 0x4ce80000, + 0x4201d000, 0x00000001, 0x0201f800, 0x00105ce7, + 0x5c01d000, 0x1c01f000, 0x0201f800, 0x00104842, + 0x0400002c, 0x0201f800, 0x00106196, 0x42000800, + 0x00000004, 0x0201f800, 0x001043c7, 0x0201f800, + 0x0010a791, 0x04020023, 0x42000800, 0x00000005, + 0x0201f800, 0x001043c7, 0x4a026406, 0x00000001, + 0x4a026203, 0x00000001, 0x4a026403, 0x00000003, + 0x0201f000, 0x00106470, 0x0201f800, 0x0010484b, + 0x04020014, 0x42000800, 0x00000006, 0x0401f813, + 0x0401f010, 0x42000800, 0x00000004, 0x0201f800, + 0x001043c7, 0x0401f79c, 0x42000800, 0x00000004, + 0x0401f006, 0x0201f800, 0x00104711, 0x0401f005, + 0x0401f004, 0x0401f003, 0x0201f800, 0x001043c7, + 0x0201f000, 0x000208b4, 0x4933c857, 0x4807c857, + 0x0201f800, 0x001043c7, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x001043bd, 0x5c027800, 0x0201f000, + 0x00104711, 0x59340400, 0x4803c857, 0x80000110, + 0x82003480, 0x0000000c, 0x02021800, 0x00100615, + 0x83383580, 0x00000015, 0x04020002, 0x0c01f006, + 0x83383580, 0x00000016, 0x02020800, 0x00100615, + 0x0c01f00d, 0x00107e42, 0x00107e42, 0x00107e42, + 0x00107e42, 0x00107e42, 0x00107e42, 0x00109d11, + 0x00109ce5, 0x00107e42, 0x00107e42, 0x00107e42, + 0x00107e42, 0x00107e42, 0x00107e42, 0x00107e42, + 0x00107e42, 0x00107e42, 0x00107e42, 0x00109d11, + 0x00109d18, 0x00107e42, 0x00107e42, 0x00107e42, + 0x00107e42, 0x4933c857, 0x599c0017, 0x8c00050a, + 0x0402001b, 0x813669c0, 0x04000019, 0x59340212, + 0x82000500, 0x0000ff00, 0x04000015, 0x599c0019, + 0x8c00050e, 0x04020012, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x001043bd, 0x5c027800, 0x42000800, + 0x00000003, 0x0201f800, 0x001043c7, 0x4a026406, + 0x00000001, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000002, 0x0201f000, 0x00106470, 0x59cc0001, + 0x59340802, 0x80040580, 0x82000500, 0x00ffffff, + 0x02020000, 0x000208b4, 0x59345002, 0x0201f800, + 0x001040e4, 0x482a6802, 0x0201f000, 0x000208b4, + 0x1c01f000, 0x4933c857, 0x59303403, 0x82183580, + 0x0000001e, 0x02000000, 0x000208b4, 0x1c01f000, + 0x4933c857, 0x0201f800, 0x00108180, 0x02020000, + 0x000208b4, 0x4a026203, 0x00000001, 0x4a026403, + 0x00000001, 0x0201f000, 0x00106470, 0x493bc857, + 0x83380580, 0x00000051, 0x0402000b, 0x0201f800, + 0x00106cb4, 0x02020000, 0x001076fb, 0x59300203, + 0x82000580, 0x00000002, 0x0400006e, 0x0201f800, + 0x00100615, 0x83380580, 0x00000027, 0x04000014, + 0x83380580, 0x00000048, 0x04000006, 0x83380580, + 0x00000014, 0x0400000e, 0x02020800, 0x00100615, + 0x0201f800, 0x00106cb4, 0x02020000, 0x001076fb, + 0x59300203, 0x82000580, 0x00000004, 0x02000000, + 0x000209a5, 0x0201f800, 0x00100615, 0x4933c857, + 0x59300403, 0x82000c80, 0x00000044, 0x02021800, + 0x00100615, 0x82000480, 0x00000040, 0x02001800, + 0x00100615, 0x40027000, 0x4803c857, 0x0c01f001, + 0x00109d58, 0x00109d5a, 0x00109d5a, 0x00109d75, + 0x0201f800, 0x00100615, 0x0201f800, 0x001068f6, + 0x59325808, 0x812e59c0, 0x04000016, 0x832c0500, + 0x00ff0000, 0x04000013, 0x4a026203, 0x00000002, + 0x59326809, 0x59340200, 0x8c00050e, 0x0402000d, + 0x42028000, 0x00000004, 0x0201f800, 0x0010a201, + 0x497a6008, 0x59300206, 0x80000540, 0x04020003, + 0x59a80038, 0x48026206, 0x4a026203, 0x00000007, + 0x1c01f000, 0x0201f800, 0x001068f6, 0x0201f800, + 0x00108df4, 0x02000000, 0x00107698, 0x59325808, + 0x0201f800, 0x0010083a, 0x0201f000, 0x00107698, + 0x0201f800, 0x00100615, 0x59325808, 0x592c040a, + 0x8c000502, 0x04000007, 0x4a026203, 0x00000007, + 0x42027000, 0x00000043, 0x0201f000, 0x000208d8, + 0x4a026203, 0x00000004, 0x1c01f000, 0x0201f800, + 0x0010a3b6, 0x02000000, 0x000209a3, 0x1c01f000, + 0x4a026203, 0x00000001, 0x4a026403, 0x00000041, + 0x42027800, 0x80002042, 0x0201f000, 0x00020855, + 0x83380580, 0x00000051, 0x04000006, 0x83380580, + 0x00000041, 0x02020800, 0x00100615, 0x1c01f000, + 0x0201f800, 0x00020831, 0x0201f800, 0x0010a3fa, + 0x0201f000, 0x000208b4, 0x83380480, 0x00000052, + 0x02021800, 0x00100615, 0x83380480, 0x00000049, + 0x02001800, 0x00100615, 0x0c01f001, 0x00109dbe, + 0x00109ddf, 0x00109dbc, 0x00109dbc, 0x00109dbc, + 0x00109dbc, 0x00109ddf, 0x00109dbc, 0x00109e01, + 0x0201f800, 0x00100615, 0x59325808, 0x592c040a, + 0x8c00051e, 0x0400000d, 0x82000d00, 0x000000c0, + 0x82040d80, 0x00000080, 0x0400000d, 0x59300804, + 0x8c040d18, 0x0402000a, 0x42027000, 0x00000041, + 0x0201f000, 0x000209c4, 0x4a026203, 0x00000007, + 0x497a6206, 0x0201f000, 0x00020831, 0x59325808, + 0x592c0c0a, 0x8c040d1a, 0x04020005, 0x0201f800, + 0x00020831, 0x0201f000, 0x000208b4, 0x0201f800, + 0x0010a3b6, 0x040007fa, 0x1c01f000, 0x0201f800, + 0x001068c1, 0x59325808, 0x59326809, 0x59340200, + 0x8c00050e, 0x0400000e, 0x592c040a, 0x82000500, + 0x000000c0, 0x82000580, 0x00000080, 0x04000005, + 0x592c000f, 0x59301815, 0x800c1c80, 0x480e6015, + 0x4a026203, 0x00000002, 0x0401f00e, 0x42028000, + 0x00000004, 0x0201f800, 0x0010a201, 0x59300206, + 0x80000540, 0x04020004, 0x59a80038, 0x800000c2, + 0x48026206, 0x497a6008, 0x4a026203, 0x00000007, + 0x1c01f000, 0x4933c857, 0x0201f800, 0x00106cb4, + 0x02020800, 0x00100615, 0x59300203, 0x82000580, + 0x00000002, 0x04000793, 0x0201f800, 0x00100615, + 0x4a026203, 0x00000007, 0x497a6206, 0x0201f000, + 0x00020831, 0x4a026203, 0x00000007, 0x497a6206, + 0x0201f000, 0x0002082c, 0x59300414, 0x8c00051c, + 0x02020000, 0x000209b5, 0x59325808, 0x592c200f, + 0x40080000, 0x80102480, 0x59300015, 0x80102400, + 0x48126015, 0x0201f000, 0x000209b5, 0x8c040d0e, + 0x0402000a, 0x4a026203, 0x00000006, 0x0401f823, + 0x5930001f, 0x80000540, 0x02020800, 0x00100dc4, + 0x0201f000, 0x0002082c, 0x4a026203, 0x00000002, + 0x1c01f000, 0x42000800, 0x00000001, 0x0201f800, + 0x00100dc4, 0x82040580, 0x00000001, 0x02000000, + 0x000209bc, 0x0401f7d8, 0x59300414, 0x8c00051c, + 0x04000006, 0x0201f800, 0x00100bad, 0x02000000, + 0x000209ae, 0x1c01f000, 0x59300011, 0x80000540, + 0x04020005, 0x0201f800, 0x00100bad, 0x02000000, + 0x000209ae, 0x1c01f000, 0x492fc857, 0x480bc857, + 0x8c08153e, 0x04000006, 0x80081080, 0x80081000, + 0x42000800, 0x00000009, 0x0401f003, 0x42000800, + 0x00000015, 0x480a580b, 0x1c01f000, 0x83380580, + 0x00000013, 0x04000005, 0x83380580, 0x00000014, + 0x02020800, 0x00100615, 0x59300414, 0x8c000516, + 0x02000800, 0x00100615, 0x1c01f000, 0x0201f800, + 0x00100615, 0x59300008, 0x80000540, 0x02020800, + 0x00100615, 0x1c01f000, 0x59300414, 0x8c000516, + 0x02000800, 0x00100615, 0x1c01f000, 0x4a026203, + 0x00000004, 0x493a6403, 0x42000800, 0x80002001, + 0x0201f000, 0x00020855, 0x4a026203, 0x00000003, + 0x493a6403, 0x0201f800, 0x000200ca, 0x59325808, + 0x592c040a, 0x8c00051e, 0x04000012, 0x82000500, + 0x000000c0, 0x82000580, 0x00000080, 0x04000011, + 0x59300414, 0x8c000512, 0x0402000a, 0x8c000510, + 0x04020008, 0x592c040c, 0x80000540, 0x04020005, + 0x82080d40, 0x80003065, 0x0201f000, 0x00106466, + 0x82080d40, 0x80002065, 0x0201f000, 0x00106466, + 0x82080d40, 0x80002042, 0x0201f000, 0x00106466, + 0x4933c857, 0x493bc857, 0x83380480, 0x00000044, + 0x02021800, 0x00100615, 0x83380480, 0x00000041, + 0x02001800, 0x00100615, 0x0c01f001, 0x00109ea6, + 0x00109eb6, 0x00109ecb, 0x59325808, 0x592c040a, + 0x8c00051e, 0x0400001d, 0x82001d00, 0x000000c0, + 0x820c1d80, 0x000000c0, 0x04000018, 0x4a026203, + 0x00000001, 0x493a6403, 0x42000800, 0x80002042, + 0x0201f000, 0x00020855, 0x59325808, 0x592c040a, + 0x8c00051e, 0x0400000d, 0x82001d00, 0x000000c0, + 0x820c1d80, 0x000000c0, 0x04000008, 0x4a026203, + 0x00000001, 0x493a6403, 0x42000800, 0x80002001, + 0x0201f000, 0x00020855, 0x497a6008, 0x497a6206, + 0x42028000, 0x00000004, 0x0401f337, 0x59325808, + 0x592c040a, 0x8c00051e, 0x040007f8, 0x82001d00, + 0x000000c0, 0x820c1d80, 0x000000c0, 0x040007f3, + 0x4a026203, 0x00000003, 0x493a6403, 0x0201f800, + 0x000200ca, 0x82080d40, 0x80002065, 0x0201f000, + 0x00106466, 0x4933c857, 0x493bc857, 0x83380580, + 0x00000085, 0x04000006, 0x83380580, 0x00000088, + 0x0400000a, 0x0201f800, 0x00100615, 0x4a026203, + 0x00000009, 0x493a6403, 0x42000800, 0x8000004b, + 0x0201f000, 0x00020855, 0x4d1c0000, 0x813669c0, + 0x04000004, 0x0201f800, 0x0010a3b0, 0x04020044, + 0x59cc1404, 0x0401f846, 0x04000018, 0x591c0406, + 0x82000500, 0x0000001f, 0x82002580, 0x00000006, + 0x04000007, 0x82002580, 0x00000004, 0x0400002e, + 0x82002580, 0x00000011, 0x0402000c, 0x497a3a05, + 0x42002000, 0x00000054, 0x0201f800, 0x001077d1, + 0x4a026203, 0x00000007, 0x493a6403, 0x0201f800, + 0x0010a79b, 0x0401f02c, 0x0201f800, 0x0010393e, + 0x04000004, 0x42023800, 0xffffffff, 0x0401f7f1, + 0x813669c0, 0x04020009, 0x59cc0001, 0x0201f800, + 0x001059b9, 0x0402001e, 0x0201f800, 0x001043fc, + 0x0402001b, 0x49366009, 0x4a026403, 0x00000087, + 0x59cc1204, 0x82081580, 0x0000ffff, 0x04020003, + 0x4a026403, 0x00000086, 0x4a026203, 0x00000001, + 0x42000800, 0x80000040, 0x0201f800, 0x00020855, + 0x0401f00d, 0x591c0203, 0x82000580, 0x00000007, + 0x040207de, 0x4d300000, 0x411e6000, 0x0201f800, + 0x00107698, 0x5c026000, 0x0401f7d8, 0x0201f800, + 0x00107698, 0x5c023800, 0x1c01f000, 0x4933c857, + 0x480bc857, 0x42002800, 0x0010cfc0, 0x41300000, + 0x80140580, 0x04000017, 0x58140203, 0x82000580, + 0x00000000, 0x04000013, 0x58140202, 0x80080580, + 0x04020010, 0x58141c06, 0x820c0580, 0x00000005, + 0x0400000c, 0x820c0580, 0x00000009, 0x0400001d, + 0x59302009, 0x58140009, 0x800001c0, 0x0400000b, + 0x801021c0, 0x04000003, 0x80100580, 0x04000010, + 0x82142c00, 0x00000024, 0x41540000, 0x80140480, + 0x0402100e, 0x0401f7e2, 0x5814001e, 0x801021c0, + 0x04000005, 0x58102002, 0x82102500, 0x00ffffff, + 0x0401f7f2, 0x5810201e, 0x0401f7f0, 0x40163800, + 0x81300540, 0x0401f002, 0x80000580, 0x1c01f000, + 0x58141807, 0x8c0c1d10, 0x040207ea, 0x0401f7e1, + 0x83380580, 0x00000013, 0x0402000e, 0x59300403, + 0x4803c857, 0x82000c80, 0x00000085, 0x02001800, + 0x00100615, 0x82000c80, 0x00000093, 0x02021800, + 0x00100615, 0x82000480, 0x00000085, 0x0c01f019, + 0x83380580, 0x00000027, 0x04000005, 0x83380580, + 0x00000014, 0x02020000, 0x001076fb, 0x493bc857, + 0x0201f800, 0x001068f6, 0x59325808, 0x812e59c0, + 0x02000000, 0x00107698, 0x4a025a06, 0x00000031, + 0x4a025811, 0x00000004, 0x4a025812, 0x000000ff, + 0x0201f800, 0x00020381, 0x0201f000, 0x00107698, + 0x00109fa6, 0x00109fad, 0x00109fad, 0x00109fa6, + 0x00109fa6, 0x00109fa6, 0x00109fa6, 0x00109fa6, + 0x00109fa6, 0x00109fa6, 0x00109fa6, 0x00109fa6, + 0x00109fa6, 0x00109fa8, 0x0201f800, 0x00100615, + 0x59325808, 0x4a025a06, 0x00000000, 0x0201f800, + 0x00020381, 0x0201f000, 0x000208b4, 0x4933c857, + 0x42000000, 0x0010b672, 0x0201f800, 0x0010a86e, + 0x0201f800, 0x0010a3fa, 0x497a6205, 0x42028000, + 0x0000000b, 0x0401f807, 0x4a026406, 0x00000006, + 0x4a026203, 0x00000007, 0x497a6206, 0x1c01f000, + 0x4933c857, 0x4943c857, 0x59300406, 0x82000580, + 0x00000007, 0x04020002, 0x1c01f000, 0x0201f800, + 0x0010698c, 0x4df00000, 0x0201f800, 0x00108a99, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f001, 0x00109ff4, 0x00109ff8, 0x00109fdf, + 0x0010a006, 0x0010a019, 0x00109fdf, 0x00109fdf, + 0x00109fdf, 0x00109fdf, 0x00109fdf, 0x00109fdf, + 0x00109fdf, 0x00109fdf, 0x00109fdf, 0x4d400000, + 0x5930001f, 0x80000540, 0x04000005, 0x41400800, + 0x0201f800, 0x00100dc4, 0x40068000, 0x4d2c0000, + 0x59325808, 0x0201f800, 0x00108df4, 0x04020a16, + 0x4c5c0000, 0x5930b809, 0x0201f800, 0x00107698, + 0x485e6009, 0x5c00b800, 0x5c025800, 0x5c028000, + 0x5c03e000, 0x02000000, 0x00106982, 0x1c01f000, + 0x598c000d, 0x81300580, 0x04020004, 0x0201f800, + 0x00106be2, 0x04020016, 0x0201f800, 0x00106619, + 0x040007df, 0x0201f800, 0x001068a3, 0x04000010, + 0x0201f800, 0x00100615, 0x0201f800, 0x00108a8a, + 0x04020004, 0x0201f800, 0x00106bb2, 0x04020008, + 0x0201f800, 0x001064f6, 0x040007d1, 0x0201f800, + 0x001068a3, 0x02020800, 0x00100615, 0x59300203, + 0x82000c80, 0x0000000e, 0x02021800, 0x00100615, + 0x0c01f7b9, 0x0201f800, 0x00100ee4, 0x0401f7c4, + 0x4933c857, 0x4d440000, 0x4d340000, 0x59cc0007, + 0x0201f800, 0x001059b9, 0x02000800, 0x00020267, + 0x0402001a, 0x59300009, 0x4c000000, 0x49366009, + 0x42003000, 0x0000000b, 0x0201f800, 0x0010a766, + 0x42000000, 0x0010b660, 0x0201f800, 0x0010a86e, + 0x4d3c0000, 0x4d400000, 0x42028000, 0x00000029, + 0x417a7800, 0x0201f800, 0x00101de2, 0x5c028000, + 0x5c027800, 0x5c000000, 0x48026009, 0x59cc0007, + 0x48026802, 0x80000580, 0x5c026800, 0x5c028800, + 0x1c01f000, 0x4933c857, 0x4c040000, 0x59a80016, + 0x82000580, 0x00000074, 0x04020040, 0x59cc0a08, + 0x82040480, 0x00000100, 0x04001033, 0x59cc0c08, + 0x82040500, 0x00008000, 0x04000035, 0x59a80032, + 0x80000540, 0x04020009, 0x59301009, 0x58080212, + 0x82000500, 0x0000ff00, 0x04000004, 0x82040500, + 0x00000800, 0x0400002a, 0x59cc0c09, 0x80040840, + 0x04001024, 0x59a80826, 0x8c040d06, 0x04000004, + 0x59cc0c0f, 0x8c040d1e, 0x04020012, 0x59cc0a17, + 0x800409c0, 0x04020012, 0x59cc0a18, 0x82040480, + 0x00000100, 0x04001014, 0x59cc0c18, 0x800409c0, + 0x0402000e, 0x59cc0c19, 0x80040840, 0x04001011, + 0x59cc0c1a, 0x80040840, 0x04001011, 0x0401f018, + 0x4a02621a, 0x00000100, 0x0401f012, 0x4a02621a, + 0x00000300, 0x0401f00f, 0x4a02621a, 0x00000500, + 0x0401f00c, 0x4a02621a, 0x00000700, 0x0401f009, + 0x4a02621a, 0x00000900, 0x0401f006, 0x4a02621a, + 0x00000f00, 0x0401f003, 0x4a02621a, 0x00002d00, + 0x82000540, 0x00000001, 0x0401f002, 0x80000580, + 0x5c000800, 0x1c01f000, 0x59cc0407, 0x4803c857, + 0x82000580, 0x00000800, 0x04000003, 0x4a02621a, + 0x00000000, 0x1c01f000, 0x4933c857, 0x4c580000, + 0x59cc000c, 0x59340802, 0x82040d00, 0x00ffffff, + 0x80040580, 0x04020012, 0x83cc1400, 0x00000008, + 0x4200b000, 0x00000002, 0x83341c00, 0x00000006, + 0x0201f800, 0x001082ff, 0x04020009, 0x83cc1400, + 0x0000000a, 0x4200b000, 0x00000002, 0x83341c00, + 0x00000008, 0x0201f800, 0x001082ff, 0x5c00b000, + 0x1c01f000, 0x4933c857, 0x4c580000, 0x83cc1400, + 0x0000000b, 0x4200b000, 0x00000002, 0x83341c00, + 0x00000006, 0x0201f800, 0x001082ff, 0x0402000c, + 0x83cc1400, 0x0000000d, 0x4200b000, 0x00000002, + 0x83341c00, 0x00000008, 0x0201f800, 0x001082ff, + 0x04000014, 0x4933c856, 0x4933c856, 0x4933c857, + 0x59340009, 0x4803c857, 0x5934000e, 0x4803c857, + 0x59340008, 0x4803c857, 0x5934000d, 0x4803c857, + 0x59340007, 0x4803c857, 0x5934000c, 0x4803c857, + 0x59340006, 0x4803c857, 0x5934000b, 0x4803c857, + 0x5c00b000, 0x1c01f000, 0x4933c857, 0x4947c857, + 0x4943c857, 0x4c600000, 0x0201f800, 0x0010698c, + 0x4df00000, 0x4d2c0000, 0x4d300000, 0x4d340000, + 0x0401f8d8, 0x4130c000, 0x42026000, 0x0010cfc0, + 0x59a8000e, 0x8060c1c0, 0x04000005, 0x82601580, + 0x0010bbe8, 0x04000002, 0x80000040, 0x81640480, + 0x040210c4, 0x40600000, 0x81300580, 0x040000bc, + 0x0401f9bc, 0x040200ba, 0x59326809, 0x59300406, + 0x82000c80, 0x00000012, 0x02021800, 0x00100615, + 0x0c01f001, 0x0010a1af, 0x0010a118, 0x0010a133, + 0x0010a13e, 0x0010a111, 0x0010a12c, 0x0010a169, + 0x0010a1af, 0x0010a10f, 0x0010a17c, 0x0010a190, + 0x0010a10f, 0x0010a10f, 0x0010a10f, 0x0010a10f, + 0x0010a1af, 0x0010a1a6, 0x0010a19e, 0x0201f800, + 0x00100615, 0x8d3e7d18, 0x04000003, 0x8d3e7d16, + 0x04000004, 0x59300420, 0x8c000500, 0x04020098, + 0x59300403, 0x82000580, 0x00000043, 0x04000094, + 0x0201f800, 0x00108ef1, 0x04000007, 0x0201f800, + 0x00108f05, 0x0402008c, 0x0201f800, 0x00107da6, + 0x0401f089, 0x0201f800, 0x00101e1b, 0x0201f800, + 0x00108f05, 0x02000800, 0x00107da6, 0x0401f082, + 0x8d3e7d18, 0x04000003, 0x8d3e7d16, 0x04000004, + 0x59300420, 0x8c000500, 0x0402007d, 0x59325808, + 0x0201f800, 0x00108df4, 0x04000077, 0x49425a06, + 0x497a5c09, 0x0201f800, 0x00020381, 0x0201f800, + 0x00108ee7, 0x0401f070, 0x8d3e7d00, 0x04000007, + 0x59300017, 0x81480580, 0x0402006d, 0x59300018, + 0x814c0580, 0x0402006a, 0x59300203, 0x82000580, + 0x00000004, 0x02000800, 0x00100ee4, 0x59325808, + 0x0201f800, 0x00108df4, 0x0400005f, 0x4a025a04, + 0x00000103, 0x59300004, 0x8400055c, 0x48026004, + 0x592c0408, 0x8c000512, 0x04000007, 0x4d2c0000, + 0x592c0009, 0x40025800, 0x0201f800, 0x00100843, + 0x5c025800, 0x49425a06, 0x497a5c09, 0x0401fb4f, + 0x0201f800, 0x00109365, 0x0201f800, 0x00108f7d, + 0x0201f800, 0x00020381, 0x0201f800, 0x00108ee7, + 0x0401f045, 0x8d3e7d18, 0x04000045, 0x59300203, + 0x82000580, 0x00000004, 0x02000800, 0x00100ee4, + 0x59325808, 0x0201f800, 0x00108df4, 0x0400003a, + 0x49425a06, 0x497a5c09, 0x0401fb38, 0x0201f800, + 0x00109365, 0x0201f800, 0x00020381, 0x0401f032, + 0x0201f800, 0x0010600e, 0x04000031, 0x59300203, + 0x82000580, 0x00000004, 0x0400002d, 0x59300203, + 0x82000580, 0x00000003, 0x04020029, 0x0201f800, + 0x001068c1, 0x59325808, 0x0201f800, 0x00108df4, + 0x04000021, 0x0201f800, 0x00020381, 0x0401f01e, + 0x59300203, 0x82000580, 0x00000004, 0x02000800, + 0x00100ee4, 0x59325808, 0x0201f800, 0x00108df4, + 0x04000015, 0x49425a06, 0x497a5c09, 0x0201f800, + 0x00020381, 0x0401f010, 0x833c0500, 0x00001800, + 0x0400000f, 0x8d3e7d16, 0x0402000d, 0x59325817, + 0x0201f800, 0x00100843, 0x59325808, 0x0201f800, + 0x00108df4, 0x04000004, 0x49425a06, 0x0201f800, + 0x00020381, 0x0201f800, 0x00107698, 0x83326400, + 0x00000024, 0x41580000, 0x81300480, 0x04001735, + 0x5c026800, 0x5c026000, 0x5c025800, 0x5c03e000, + 0x02000800, 0x00106982, 0x5c00c000, 0x1c01f000, + 0x4933c857, 0x813261c0, 0x0400002d, 0x83300d80, + 0x0010bbe8, 0x0400002a, 0x8d3e7d06, 0x04020028, + 0x59300c06, 0x82040580, 0x00000001, 0x0400000a, + 0x82040580, 0x00000002, 0x04020021, 0x5930021d, + 0x82000580, 0x00000001, 0x0402001d, 0x59300c16, + 0x0401f002, 0x59300c03, 0x82040580, 0x00000039, + 0x04000004, 0x82040580, 0x00000035, 0x04020014, + 0x4d300000, 0x4d1c0000, 0x5932601e, 0x4933c857, + 0x0201f800, 0x001091e3, 0x02000800, 0x00100615, + 0x591c001c, 0x497a381c, 0x591c0c14, 0x84040d02, + 0x48063c14, 0x5c023800, 0x5c026000, 0x81300580, + 0x02020800, 0x00100615, 0x497a601e, 0x1c01f000, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4d3c0000, + 0x42027800, 0x00000001, 0x0201f800, 0x001043bd, + 0x5c027800, 0x4c580000, 0x4200b000, 0x00000002, + 0x83a81c00, 0x00000002, 0x83cc1400, 0x0000000b, + 0x0201f800, 0x001082ff, 0x5c00b000, 0x80000540, + 0x1c01f000, 0x492fc857, 0x4943c857, 0x59a8000c, + 0x812c0480, 0x04001011, 0x59a8000d, 0x812c0480, + 0x0402100e, 0x592c0000, 0x80005d40, 0x04000008, + 0x497a5800, 0x49425a06, 0x4c2c0000, 0x0201f800, + 0x00020381, 0x5c025800, 0x0401f7f7, 0x49425a06, + 0x0201f000, 0x00020381, 0x1c01f000, 0x493fc857, + 0x4933c857, 0x480bc857, 0x0201f800, 0x0010393e, + 0x0400002e, 0x41502800, 0x813e79c0, 0x04020006, + 0x59a80066, 0x80000000, 0x59a8086a, 0x80040580, + 0x04000026, 0x41300000, 0x80140580, 0x0400001a, + 0x58140203, 0x82000580, 0x00000000, 0x04000016, + 0x58140202, 0x80080580, 0x04020013, 0x58141c06, + 0x820c0580, 0x00000005, 0x0400000f, 0x820c0580, + 0x00000009, 0x04000017, 0x59300009, 0x58142009, + 0x801021c0, 0x04020006, 0x5814201e, 0x59301809, + 0x580c0002, 0x82000500, 0x00ffffff, 0x80100580, + 0x04000007, 0x82142c00, 0x00000024, 0x41540000, + 0x80140480, 0x04021005, 0x0401f7df, 0x40163800, + 0x81300540, 0x0401f002, 0x80000580, 0x1c01f000, + 0x58141807, 0x8c0c1d10, 0x040207f3, 0x0401f7e7, + 0x42002000, 0x0000ffff, 0x59301009, 0x800811c0, + 0x04000002, 0x58082403, 0x41301000, 0x0401f007, + 0x41781000, 0x41442000, 0x0401f004, 0x41781000, + 0x42002000, 0x0000ffff, 0x5c000000, 0x4c000000, + 0x4803c857, 0x480bc857, 0x4813c857, 0x492fc857, + 0x4943c857, 0x4d2c0000, 0x4c080000, 0x4c100000, + 0x4c140000, 0x4c180000, 0x0201f800, 0x0010082a, + 0x02000800, 0x00100615, 0x5c003000, 0x5c002800, + 0x5c002000, 0x5c001000, 0x4a025a04, 0x0000010d, + 0x800811c0, 0x04000017, 0x83400580, 0x00000029, + 0x04020010, 0x82180580, 0x00000002, 0x0400000a, + 0x82180580, 0x00000003, 0x04000007, 0x82180580, + 0x00000008, 0x04000004, 0x82180580, 0x00000009, + 0x04020004, 0x4a025809, 0xffffffff, 0x0401f002, + 0x480a5809, 0x58080202, 0x48025c13, 0x0401f005, + 0x4a025809, 0xffffffff, 0x4a025c13, 0x0000ffff, + 0x49425a08, 0x48125a06, 0x82100580, 0x0000ffff, + 0x04000012, 0x4c140000, 0x4c180000, 0x4d440000, + 0x4d340000, 0x40128800, 0x0201f800, 0x00020267, + 0x02020800, 0x00100615, 0x59340002, 0x82000500, + 0x00ffffff, 0x48025812, 0x5c026800, 0x5c028800, + 0x5c003000, 0x5c002800, 0x497a5800, 0x497a5c04, + 0x83400580, 0x00000046, 0x04020002, 0x48165a07, + 0x481a5c08, 0x0401fbe0, 0x5c025800, 0x1c01f000, + 0x59300809, 0x800409c0, 0x04000004, 0x58040403, + 0x81440580, 0x1c01f000, 0x82000540, 0x00000001, + 0x0401f7fd, 0x4933c857, 0x4c040000, 0x59300403, + 0x82000d80, 0x0000001e, 0x04020016, 0x800000d0, + 0x59300a16, 0x82040d00, 0x000000ff, 0x80040540, + 0x4803c857, 0x48026416, 0x4a026403, 0x00000085, + 0x4a026203, 0x00000009, 0x4a026406, 0x00000005, + 0x4a02621d, 0x00000004, 0x59a80038, 0x48026206, + 0x42000800, 0x8000004b, 0x0201f800, 0x00020855, + 0x5c000800, 0x1c01f000, 0x4933c857, 0x40000000, + 0x40000000, 0x1c01f000, 0x59300414, 0x4933c857, + 0x4803c857, 0x8c000518, 0x04000009, 0x8c000512, + 0x02020000, 0x00108fdb, 0x0401f918, 0x0201f800, + 0x00020831, 0x0201f800, 0x000208b4, 0x1c01f000, + 0x591c0406, 0x4803c857, 0x82000c80, 0x00000009, + 0x0402100b, 0x0c01f001, 0x0010a2f7, 0x0010a2f7, + 0x0010a2f7, 0x0010a2f9, 0x0010a2f7, 0x0010a2f9, + 0x0010a2f9, 0x0010a2f7, 0x0010a2f9, 0x80000580, + 0x1c01f000, 0x82000540, 0x00000001, 0x1c01f000, + 0x591c0406, 0x82000500, 0x0000001f, 0x82000580, + 0x00000006, 0x0400000e, 0x4803c857, 0x4a026403, + 0x0000003b, 0x4a02641a, 0x00000009, 0x4a02621a, + 0x00002a00, 0x4a026203, 0x00000001, 0x42000800, + 0x80000040, 0x0201f000, 0x00020855, 0x4803c856, + 0x4c040000, 0x4c140000, 0x4d300000, 0x411e6000, + 0x0401f8e6, 0x497a6205, 0x59300414, 0x4803c857, + 0x82000500, 0xffffadff, 0x48026414, 0x497a6405, + 0x5c026000, 0x0201f800, 0x0010082a, 0x02000800, + 0x00100615, 0x5c002800, 0x5c000800, 0x4a025a04, + 0x0000010d, 0x497a5800, 0x497a5c04, 0x4a025a08, + 0x00000045, 0x491e5809, 0x59300402, 0x48025c07, + 0x59300419, 0x48025c0b, 0x591c0414, 0x84000556, + 0x48023c14, 0x591c1809, 0x580c0403, 0x48025a06, + 0x4816580a, 0x48065a0b, 0x0401fb57, 0x4d400000, + 0x42028000, 0x00000045, 0x591c0202, 0x4c000000, + 0x4d300000, 0x411e6000, 0x0401fc82, 0x5c026000, + 0x5c000000, 0x48023a02, 0x5c028000, 0x4a023c06, + 0x00000006, 0x4a023a03, 0x00000007, 0x497a3a06, + 0x497a3a05, 0x1c01f000, 0x4933c857, 0x83380580, + 0x00000013, 0x0402000b, 0x59300403, 0x4803c857, + 0x82000d80, 0x00000085, 0x0400002b, 0x82000d80, + 0x0000008b, 0x04000028, 0x0201f800, 0x00100615, + 0x83380580, 0x00000027, 0x0402000c, 0x0201f800, + 0x001068f6, 0x4d2c0000, 0x4d400000, 0x59325808, + 0x42028000, 0x00000004, 0x0401fe9f, 0x5c028000, + 0x5c025800, 0x1c01f000, 0x83380580, 0x00000014, + 0x040007f3, 0x83380580, 0x00000089, 0x04000005, + 0x83380580, 0x0000008a, 0x02020000, 0x001076fb, + 0x0201f800, 0x00106cb4, 0x02020000, 0x001076fb, + 0x59300a03, 0x82040580, 0x0000000a, 0x04000009, + 0x82040580, 0x0000000c, 0x04000006, 0x0201f800, + 0x00100615, 0x4a026203, 0x0000000a, 0x1c01f000, + 0x83380480, 0x00000093, 0x0402100c, 0x83380480, + 0x00000085, 0x04001009, 0x83380580, 0x00000089, + 0x0400000a, 0x83380580, 0x0000008a, 0x04000022, + 0x0201f800, 0x00100615, 0x493bc857, 0x4933c857, + 0x0201f000, 0x001076fb, 0x4933c857, 0x4c340000, + 0x41306800, 0x0201f800, 0x00020892, 0x04000011, + 0x4a026203, 0x00000001, 0x4a026403, 0x0000001e, + 0x59cc0c07, 0x48066419, 0x59cc0a07, 0x48066219, + 0x58340809, 0x48066009, 0x4a026406, 0x00000004, + 0x42000800, 0x80000040, 0x0201f800, 0x00020855, + 0x40366000, 0x0201f800, 0x000208b4, 0x5c006800, + 0x1c01f000, 0x4933c857, 0x0201f000, 0x000208b4, + 0x59300809, 0x58040200, 0x8c00051a, 0x02020800, + 0x001006ba, 0x1c01f000, 0x0201f800, 0x0010472e, + 0x0400001e, 0x4a026203, 0x00000002, 0x59300414, + 0x84000558, 0x48026414, 0x8c000512, 0x04000004, + 0x59a80039, 0x48026205, 0x0401f007, 0x59a80839, + 0x59a80037, 0x80040400, 0x82000400, 0x0000001e, + 0x48026205, 0x59300009, 0x82000c00, 0x00000011, + 0x50040000, 0x80000540, 0x04000004, 0x82000c00, + 0x00000000, 0x0401f7fb, 0x45300800, 0x497a6000, + 0x82000540, 0x00000001, 0x1c01f000, 0x82100500, + 0xfffffeef, 0x0402001c, 0x4d2c0000, 0x4937c857, + 0x59340811, 0x83341400, 0x00000011, 0x800409c0, + 0x0400000e, 0x40040000, 0x81300580, 0x04000005, + 0x58040800, 0x82041400, 0x00000000, 0x0401f7f8, + 0x59300800, 0x497a6000, 0x44041000, 0x0201f800, + 0x00020831, 0x0401f002, 0x4933c857, 0x5c025800, + 0x492e6008, 0x0201f800, 0x00020831, 0x0201f000, + 0x000208b4, 0x492fc857, 0x4a025a06, 0x00000006, + 0x0201f000, 0x00020381, 0x4c340000, 0x59300009, + 0x800001c0, 0x04000010, 0x82006c00, 0x00000011, + 0x50340000, 0x80000540, 0x04000009, 0x81300580, + 0x04000005, 0x50340000, 0x82006c00, 0x00000000, + 0x0401f7f8, 0x59300000, 0x44006800, 0x5c006800, + 0x1c01f000, 0x59300c06, 0x82040580, 0x00000005, + 0x040007fb, 0x82040580, 0x00000011, 0x040007f8, + 0x82040580, 0x00000006, 0x040007f5, 0x82040580, + 0x00000001, 0x040007f2, 0x0201f800, 0x00100615, + 0x4933c857, 0x4c080000, 0x4c0c0000, 0x4c580000, + 0x59a8101d, 0x59cc1807, 0x820c1d00, 0x00ffffff, + 0x800c0110, 0x80083580, 0x04020014, 0x83cc1400, + 0x00000008, 0x4200b000, 0x00000002, 0x59300009, + 0x82001c00, 0x00000006, 0x0201f800, 0x001082ff, + 0x0402000a, 0x83cc1400, 0x0000000a, 0x4200b000, + 0x00000002, 0x59300009, 0x82001c00, 0x00000008, + 0x0201f800, 0x001082ff, 0x5c00b000, 0x5c001800, + 0x5c001000, 0x1c01f000, 0x4933c856, 0x0201f800, + 0x0010404b, 0x0201f000, 0x00101bf0, 0x493bc857, + 0x4d2c0000, 0x0201f800, 0x0010082a, 0x02000800, + 0x00100615, 0x832cac00, 0x00000005, 0x4c580000, + 0x4c540000, 0x4200b000, 0x00000006, 0x4578a800, + 0x8054a800, 0x8058b040, 0x040207fd, 0x83380580, + 0x00000046, 0x04020004, 0x4a025a04, 0x00000144, + 0x0401f008, 0x4a025a04, 0x00000146, 0x83380580, + 0x00000041, 0x04000003, 0x4a025a06, 0x00000001, + 0x59cc0007, 0x82000500, 0xff000000, 0x80000110, + 0x59cc1008, 0x82081500, 0xff000000, 0x80081540, + 0x480a580a, 0x83380580, 0x00000046, 0x04020006, + 0x59cc0007, 0x82000500, 0x00ffffff, 0x4802580b, + 0x0401f005, 0x59cc0008, 0x82000500, 0x00ffffff, + 0x4802580b, 0x83380580, 0x00000046, 0x04020004, + 0x83cc1400, 0x00000009, 0x0401f003, 0x83cc1400, + 0x0000000d, 0x50080000, 0x9c0001c0, 0x4802580c, + 0x80081000, 0x50080000, 0x9c0001c0, 0x4802580d, + 0x83380580, 0x00000046, 0x04020008, 0x59cc000b, + 0x9c0001c0, 0x4802580e, 0x59cc000c, 0x9c0001c0, + 0x4802580f, 0x0401f007, 0x59cc000f, 0x9c0001c0, + 0x4802580e, 0x59cc0010, 0x9c0001c0, 0x4802580f, + 0x83380580, 0x00000046, 0x04020004, 0x83cc1400, + 0x00000011, 0x0401f003, 0x83cc1400, 0x00000015, + 0x412c3000, 0x82183400, 0x00000010, 0x4200b000, + 0x00000004, 0x50080000, 0x9c0001c0, 0x44003000, + 0x80081000, 0x80183000, 0x8058b040, 0x040207fa, + 0x5c00a800, 0x5c00b000, 0x0201f800, 0x00020381, + 0x5c025800, 0x1c01f000, 0x4933c857, 0x492fc857, + 0x59300809, 0x58040200, 0x8c00051e, 0x04000004, + 0x592c0208, 0x84000558, 0x48025a08, 0x1c01f000, + 0x59e0180f, 0x599c0413, 0x800c1000, 0x80080580, + 0x04020002, 0x41781000, 0x59e00010, 0x59e00810, + 0x80040d80, 0x040207fd, 0x80080580, 0x0400000b, + 0x4c080000, 0x599c0814, 0x599c1015, 0x800c00cc, + 0x80040c00, 0x82081440, 0x00000000, 0x5c001800, + 0x82000540, 0x00000001, 0x4803c857, 0x1c01f000, + 0x59300203, 0x4933c857, 0x4937c857, 0x493bc857, + 0x4803c857, 0x82003480, 0x0000000e, 0x02021800, + 0x00100615, 0x0c01f001, 0x0010a4e8, 0x0010a63a, + 0x0010a4e8, 0x0010a4e8, 0x0010a4e8, 0x0010a4e8, + 0x0010a4e8, 0x0010a59f, 0x0010a4ea, 0x0010a4e8, + 0x0010a4e8, 0x0010a4e8, 0x0010a4e8, 0x0010a4e8, + 0x0201f800, 0x00100615, 0x83380580, 0x0000004c, + 0x02020800, 0x00100615, 0x0201f800, 0x0010473b, + 0x04020020, 0x59a80826, 0x82040500, 0x00000009, + 0x82000580, 0x00000008, 0x0400001a, 0x8c040d12, + 0x0400003d, 0x59cc0806, 0x82040d00, 0xff000000, + 0x82040580, 0x03000000, 0x0400001f, 0x82040580, + 0x50000000, 0x04000005, 0x82040580, 0x52000000, + 0x02020000, 0x000208b4, 0x813669c0, 0x04000006, + 0x4d3c0000, 0x417a7800, 0x0201f800, 0x00101de2, + 0x5c027800, 0x4a026403, 0x00000001, 0x0401f014, + 0x59cc0806, 0x82040d00, 0xff000000, 0x82040580, + 0x03000000, 0x04000008, 0x82040580, 0x50000000, + 0x04000005, 0x82040580, 0x52000000, 0x02020000, + 0x000208b4, 0x4a026403, 0x00000009, 0x4a02641a, + 0x00000009, 0x4a02621a, 0x00000000, 0x813669c0, + 0x0402000b, 0x59cc0001, 0x0201f800, 0x001059b9, + 0x02020000, 0x000208b4, 0x0201f800, 0x001043fc, + 0x02020000, 0x000208b4, 0x49366009, 0x4a026406, + 0x00000004, 0x4a026203, 0x00000001, 0x0201f000, + 0x00106470, 0x0201f800, 0x0010393e, 0x04000023, + 0x59cc0806, 0x4807c857, 0x82040d00, 0xff000000, + 0x82040580, 0x03000000, 0x04000033, 0x82040580, + 0x20000000, 0x04000041, 0x82040580, 0x21000000, + 0x04000052, 0x82040580, 0x24000000, 0x0400004f, + 0x82040580, 0x50000000, 0x0400004c, 0x82040580, + 0x52000000, 0x04000049, 0x82040580, 0x05000000, + 0x0402000d, 0x59cc0806, 0x82040d00, 0xff000000, + 0x9c0431c0, 0x42028000, 0x00000046, 0x42002800, + 0x00000001, 0x0401fcf7, 0x0401f940, 0x02000800, + 0x00100615, 0x42002000, 0x00000051, 0x0201f800, + 0x001077d1, 0x59cc0000, 0x82000500, 0x00ffffff, + 0x82000580, 0x00ffffff, 0x04000005, 0x4a026203, + 0x00000007, 0x493a6403, 0x1c01f000, 0x59325817, + 0x812e59c0, 0x02020800, 0x00100843, 0x0201f000, + 0x000208b4, 0x813669c0, 0x040007df, 0x59340400, + 0x82000500, 0x000000ff, 0x82000580, 0x00000003, + 0x040207d9, 0x0401fc73, 0x040207d7, 0x4a026403, + 0x00000009, 0x4a02641a, 0x0000000e, 0x4a02621a, + 0x00001900, 0x0401f7a2, 0x813669c0, 0x0400000c, + 0x59340c00, 0x82040500, 0x000000ff, 0x82000580, + 0x00000009, 0x04000794, 0x82040500, 0x0000ff00, + 0x82000580, 0x00000700, 0x040207c3, 0x4a026403, + 0x00000009, 0x4a02641a, 0x00000009, 0x4a02621a, + 0x00001e00, 0x0401f78e, 0x813669c0, 0x040007f8, + 0x59340c00, 0x82040500, 0x0000ff00, 0x82000580, + 0x00000700, 0x040007f2, 0x0401f7b3, 0x4d2c0000, + 0x4c580000, 0x4c500000, 0x4c540000, 0x41385000, + 0x83380580, 0x00000054, 0x02020800, 0x00100615, + 0x59325808, 0x592c0c0b, 0x82040d00, 0x0000e000, + 0x82040580, 0x00002000, 0x04020076, 0x59300817, + 0x800409c0, 0x04000014, 0x58041404, 0x41cca800, + 0x8204a400, 0x00000005, 0x82080480, 0x00000010, + 0x04021004, 0x4008b000, 0x0401fb84, 0x0401f00a, + 0x40001000, 0x4200b000, 0x0000000f, 0x0401fb7f, + 0x58040801, 0x800409c0, 0x040207f2, 0x0201f800, + 0x00100615, 0x813669c0, 0x0400005e, 0x59344c00, + 0x592c0c09, 0x4807c857, 0x4827c857, 0x82040d00, + 0x000000ff, 0x82040580, 0x00000003, 0x0400002a, + 0x82040580, 0x00000005, 0x04000032, 0x82040580, + 0x00000020, 0x04000036, 0x82040580, 0x00000052, + 0x04000042, 0x82040580, 0x00000050, 0x04000042, + 0x82040580, 0x00000021, 0x04000004, 0x82040580, + 0x00000024, 0x04020043, 0x82240500, 0x0000ff00, + 0x82000580, 0x00000007, 0x04000008, 0x42000800, + 0x00000009, 0x0201f800, 0x001043c7, 0x42005000, + 0x0000000c, 0x0401f037, 0x4a025a06, 0x00000031, + 0x4a02580d, 0x00000009, 0x59340400, 0x4802580e, + 0x0201f800, 0x00020381, 0x0201f800, 0x00107698, + 0x0401f03d, 0x0201f800, 0x001040e4, 0x0201f800, + 0x00104480, 0x42000800, 0x00000003, 0x0201f800, + 0x001043c7, 0x42005000, 0x00000008, 0x0401f021, + 0x59cc0007, 0x0201f800, 0x00105c25, 0x0402001d, + 0x0201f800, 0x001040e4, 0x0401f01a, 0x82240500, + 0x0000ff00, 0x82000580, 0x00000007, 0x040007df, + 0x82240500, 0x000000ff, 0x82000580, 0x00000009, + 0x040007da, 0x0201f800, 0x001044e1, 0x42005000, + 0x0000000a, 0x0401f00b, 0x42005000, 0x0000000e, + 0x0401f003, 0x42005000, 0x00000010, 0x82240500, + 0x0000ff00, 0x82000580, 0x00000007, 0x040007cb, + 0x482a6403, 0x4a026203, 0x00000001, 0x592c000d, + 0x48026011, 0x497a6013, 0x59a80038, 0x48026206, + 0x417a7800, 0x0201f800, 0x00106470, 0x59325817, + 0x812e59c0, 0x04000004, 0x0201f800, 0x00100843, + 0x497a6017, 0x5c00a800, 0x5c00a000, 0x5c00b000, + 0x5c025800, 0x1c01f000, 0x4d2c0000, 0x59325808, + 0x83380580, 0x00000013, 0x0402002a, 0x492fc857, + 0x59300c03, 0x82040580, 0x00000054, 0x0400001e, + 0x82040580, 0x00000010, 0x04000018, 0x82040580, + 0x0000000e, 0x04000015, 0x82040580, 0x00000008, + 0x0400000d, 0x82040580, 0x0000000c, 0x0400000a, + 0x82040580, 0x0000000a, 0x02020800, 0x00100615, + 0x42000800, 0x00000006, 0x0201f800, 0x001043c7, + 0x0401f009, 0x42000800, 0x00000004, 0x0201f800, + 0x001043c7, 0x0401f004, 0x59340200, 0x8400051a, + 0x48026a00, 0x4a025a06, 0x00000000, 0x0201f800, + 0x00020381, 0x0201f800, 0x000208b4, 0x0401f024, + 0x83380580, 0x00000027, 0x0400000f, 0x83380580, + 0x00000014, 0x02020800, 0x00100615, 0x492fc857, + 0x0201f800, 0x001068f6, 0x42028000, 0x00000031, + 0x42000800, 0x00000004, 0x42001000, 0x000000ff, + 0x0401f00a, 0x492fc857, 0x0201f800, 0x001068f6, + 0x42028000, 0x00000031, 0x42000800, 0x00000004, + 0x42001000, 0x00000010, 0x49425a06, 0x4806580d, + 0x480a580e, 0x0201f800, 0x00020381, 0x0201f800, + 0x00104a83, 0x0201f800, 0x00107698, 0x5c025800, + 0x1c01f000, 0x492fc857, 0x42007000, 0x0010b5f6, + 0x58380807, 0x800409c0, 0x04020005, 0x492c7008, + 0x492c7007, 0x0201f000, 0x001008be, 0x492c0800, + 0x492c7007, 0x1c01f000, 0x4d2c0000, 0x4c580000, + 0x4c500000, 0x4c540000, 0x4933c857, 0x4937c857, + 0x59cc0806, 0x4807c857, 0x82040d00, 0xff000000, + 0x82040580, 0x03000000, 0x0400000d, 0x82040580, + 0x05000000, 0x0400000a, 0x82040580, 0x21000000, + 0x04000030, 0x82040580, 0x24000000, 0x0400002d, + 0x82040580, 0x20000000, 0x0402002f, 0x0201f800, + 0x0010082a, 0x0400002c, 0x492fc857, 0x492e6017, + 0x59a8b016, 0x8258b400, 0x0000001b, 0x8258b500, + 0xfffffffc, 0x8058b104, 0x485a5c04, 0x412c7800, + 0x41cca000, 0x82580480, 0x00000010, 0x04021005, + 0x832cac00, 0x00000005, 0x0401fa78, 0x0401f015, + 0x40580800, 0x4200b000, 0x0000000f, 0x832cac00, + 0x00000005, 0x0401fa71, 0x8204b480, 0x0000000f, + 0x0201f800, 0x0010082a, 0x04000004, 0x492c7801, + 0x412c7800, 0x0401f7ec, 0x59325817, 0x0201f800, + 0x00100843, 0x497a6017, 0x80000580, 0x0401f006, + 0x59340200, 0x84000554, 0x48026a00, 0x82000540, + 0x00000001, 0x5c00a800, 0x5c00a000, 0x5c00b000, + 0x5c025800, 0x1c01f000, 0x4933c857, 0x492fc857, + 0x4d2c0000, 0x4c5c0000, 0x5930bc06, 0x59300a03, + 0x82040580, 0x00000007, 0x0400003c, 0x82040580, + 0x00000001, 0x02020800, 0x00100615, 0x0201f800, + 0x0010698c, 0x4df00000, 0x598c000d, 0x81300580, + 0x04020019, 0x59300004, 0x8c000520, 0x04000004, + 0x84000520, 0x48026004, 0x0401f019, 0x825c0580, + 0x00000011, 0x0402000d, 0x42001000, 0x0010b5f4, + 0x50081000, 0x58080002, 0x82000580, 0x00000100, + 0x04000006, 0x5808000c, 0x81300580, 0x02020800, + 0x00100615, 0x0401f00a, 0x0201f800, 0x00106be2, + 0x04020027, 0x59300004, 0x8c000520, 0x04000004, + 0x84000520, 0x48026004, 0x0401f003, 0x0201f800, + 0x00106619, 0x5c03e000, 0x02000800, 0x00106982, + 0x0201f800, 0x00108df4, 0x02000800, 0x00100615, + 0x59325808, 0x4a025a06, 0x00000005, 0x0201f800, + 0x00020381, 0x825c0580, 0x00000005, 0x0400001b, + 0x0201f800, 0x00104a83, 0x825c0580, 0x00000005, + 0x04000016, 0x59325817, 0x812e59c0, 0x02020800, + 0x00100843, 0x0201f800, 0x00107698, 0x80000580, + 0x5c00b800, 0x5c025800, 0x1c01f000, 0x5c03e000, + 0x02000800, 0x00106982, 0x59300c06, 0x82040580, + 0x00000011, 0x040007ae, 0x82040580, 0x00000005, + 0x040007ab, 0x0401f7f3, 0x0201f800, 0x000208b4, + 0x0401f7ef, 0x4c040000, 0x59340200, 0x4803c857, + 0x8c00051c, 0x04000009, 0x59cc0805, 0x591c0019, + 0x4803c857, 0x80040580, 0x04000004, 0x80000580, + 0x4803c856, 0x0401f003, 0x82000540, 0x00000001, + 0x5c000800, 0x1c01f000, 0x4c000000, 0x4c0c0000, + 0x4c100000, 0x42001800, 0x0000ffff, 0x42002000, + 0x00000004, 0x0401f013, 0x4c000000, 0x4c0c0000, + 0x4c100000, 0x59302009, 0x58101c03, 0x42002000, + 0x00000004, 0x0401f00b, 0x4c000000, 0x4c0c0000, + 0x4c100000, 0x59302009, 0x801021c0, 0x02000800, + 0x00100615, 0x58101c03, 0x42002000, 0x00000007, + 0x480fc857, 0x4813c857, 0x481bc857, 0x0201f800, + 0x001038c7, 0x5c002000, 0x5c001800, 0x5c000000, + 0x1c01f000, 0x83380580, 0x00000092, 0x02020800, + 0x00100615, 0x42000800, 0x80000040, 0x4a026203, + 0x00000001, 0x493a6403, 0x0201f000, 0x00020855, + 0x4d400000, 0x0201f800, 0x0010393e, 0x04000008, + 0x59a80005, 0x84000544, 0x48035005, 0x42028000, + 0x0000002a, 0x0201f800, 0x0010a25b, 0x5c028000, + 0x1c01f000, 0x59a80026, 0x8c000508, 0x04000005, + 0x599c0017, 0x8c00050a, 0x04020002, 0x1c01f000, + 0x82000540, 0x00000001, 0x1c01f000, 0x59300420, + 0x84000540, 0x48026420, 0x1c01f000, 0x4817c857, + 0x4c000000, 0x4c040000, 0x8c142d2a, 0x04000004, + 0x598800b9, 0x80000000, 0x480310b9, 0x8c142d2e, + 0x04000004, 0x598800ba, 0x80000000, 0x480310ba, + 0x8c142d2c, 0x04000013, 0x40140000, 0x82000500, + 0x00070000, 0x82000d80, 0x00030000, 0x0400000d, + 0x82000d80, 0x00040000, 0x0400000a, 0x82000d80, + 0x00050000, 0x04000007, 0x59880005, 0x80000000, + 0x48031005, 0x598800bb, 0x80000000, 0x480310bb, + 0x5c000800, 0x5c000000, 0x1c01f000, 0x4817c857, + 0x4c000000, 0x4c040000, 0x8c142d2a, 0x04000004, + 0x598800bc, 0x80000000, 0x480310bc, 0x8c142d2e, + 0x04000004, 0x598800bd, 0x80000000, 0x480310bd, + 0x8c142d2c, 0x04000013, 0x40140000, 0x82000500, + 0x00070000, 0x82000d80, 0x00030000, 0x0400000d, + 0x82000d80, 0x00040000, 0x0400000a, 0x82000d80, + 0x00050000, 0x04000007, 0x59880005, 0x80000000, + 0x48031005, 0x598800be, 0x80000000, 0x480310be, + 0x5c000800, 0x5c000000, 0x1c01f000, 0x4c000000, + 0x59880001, 0x80000000, 0x4803c857, 0x48031001, + 0x5c000000, 0x1c01f000, 0x4c000000, 0x59880000, + 0x80000000, 0x4803c857, 0x48031000, 0x5c000000, + 0x1c01f000, 0x4c000000, 0x59880002, 0x80000000, + 0x4803c857, 0x48031002, 0x5c000000, 0x1c01f000, + 0x4807c857, 0x4c000000, 0x8c040d2c, 0x04000004, + 0x598800a7, 0x80000000, 0x480310a7, 0x8c040d2a, + 0x04000004, 0x598800a8, 0x80000000, 0x480310a8, + 0x8c040d28, 0x04000004, 0x598800a9, 0x80000000, + 0x480310a9, 0x8c040d26, 0x04000004, 0x598800aa, + 0x80000000, 0x480310aa, 0x8c040d24, 0x04000004, + 0x598800ab, 0x80000000, 0x480310ab, 0x8c040d22, + 0x04000004, 0x598800ac, 0x80000000, 0x480310ac, + 0x8c040d20, 0x04000004, 0x598800ad, 0x80000000, + 0x480310ad, 0x5c000000, 0x1c01f000, 0x4807c857, + 0x4c000000, 0x598800ae, 0x80000000, 0x480310ae, + 0x5c000000, 0x1c01f000, 0x4807c857, 0x4c000000, + 0x8c040d1c, 0x04000004, 0x598800af, 0x80000000, + 0x480310af, 0x8c040d1a, 0x04000004, 0x598800b0, + 0x80000000, 0x480310b0, 0x5c000000, 0x1c01f000, + 0x4807c857, 0x4c000000, 0x8c040d18, 0x04000004, + 0x598800b1, 0x80000000, 0x480310b1, 0x8c040d16, + 0x04000004, 0x598800b2, 0x80000000, 0x480310b2, + 0x8c040d14, 0x04000004, 0x598800b3, 0x80000000, + 0x480310b3, 0x5c000000, 0x1c01f000, 0x4807c857, + 0x4c000000, 0x8c040d10, 0x04000004, 0x598800b4, + 0x80000000, 0x480310b4, 0x8c040d0c, 0x04000004, + 0x598800b5, 0x80000000, 0x480310b5, 0x5c000000, + 0x1c01f000, 0x4807c857, 0x4c000000, 0x8c040d08, + 0x04000004, 0x598800b6, 0x80000000, 0x480310b6, + 0x8c040d04, 0x04000004, 0x598800b7, 0x80000000, + 0x480310b7, 0x5c000000, 0x1c01f000, 0x4807c856, + 0x4c000000, 0x59880080, 0x80000000, 0x48031080, + 0x5c000000, 0x1c01f000, 0x4803c857, 0x4c040000, + 0x50000800, 0x80040800, 0x4807c857, 0x44040000, + 0x5c000800, 0x1c01f000, 0x480fc857, 0x4c000000, + 0x820c0580, 0x00000000, 0x04020004, 0x42000000, + 0x0010b617, 0x0401f014, 0x820c0580, 0x00001001, + 0x04020004, 0x42000000, 0x0010b618, 0x0401f00e, + 0x820c0580, 0x00001002, 0x04020004, 0x42000000, + 0x0010b619, 0x0401f008, 0x820c0c80, 0x0000201c, + 0x02021800, 0x00100615, 0x820c0500, 0x0000001f, + 0x0c01f804, 0x0401ffdd, 0x5c000000, 0x1c01f000, + 0x0010a8b0, 0x0010a8b3, 0x0010a8b6, 0x0010a8b9, + 0x0010a8bc, 0x0010a8bf, 0x0010a8c2, 0x0010a8c5, + 0x0010a8c8, 0x0010a8cb, 0x0010a8ce, 0x0010a8d1, + 0x0010a8d4, 0x0010a8d7, 0x0010a8da, 0x0010a8dd, + 0x0010a8e0, 0x0010a8e3, 0x0010a8e6, 0x0010a8e9, + 0x0010a8ec, 0x0010a8ef, 0x0010a8f2, 0x0010a8f5, + 0x0010a8f8, 0x0010a8fb, 0x0010a8fe, 0x0010a901, + 0x42000000, 0x0010b61a, 0x1c01f000, 0x42000000, + 0x0010b61b, 0x1c01f000, 0x42000000, 0x0010b61c, + 0x1c01f000, 0x42000000, 0x0010b61d, 0x1c01f000, + 0x42000000, 0x0010b61e, 0x1c01f000, 0x42000000, + 0x0010b61f, 0x1c01f000, 0x42000000, 0x0010b620, + 0x1c01f000, 0x42000000, 0x0010b621, 0x1c01f000, + 0x42000000, 0x0010b622, 0x1c01f000, 0x42000000, + 0x0010b623, 0x1c01f000, 0x42000000, 0x0010b624, + 0x1c01f000, 0x42000000, 0x0010b625, 0x1c01f000, + 0x42000000, 0x0010b626, 0x1c01f000, 0x42000000, + 0x0010b627, 0x1c01f000, 0x42000000, 0x0010b628, + 0x1c01f000, 0x42000000, 0x0010b629, 0x1c01f000, + 0x42000000, 0x0010b62a, 0x1c01f000, 0x42000000, + 0x0010b62b, 0x1c01f000, 0x42000000, 0x0010b62c, + 0x1c01f000, 0x42000000, 0x0010b62d, 0x1c01f000, + 0x42000000, 0x0010b62e, 0x1c01f000, 0x42000000, + 0x0010b62f, 0x1c01f000, 0x42000000, 0x0010b630, + 0x1c01f000, 0x42000000, 0x0010b631, 0x1c01f000, + 0x42000000, 0x0010b632, 0x1c01f000, 0x42000000, + 0x0010b633, 0x1c01f000, 0x42000000, 0x0010b634, + 0x1c01f000, 0x42000000, 0x0010b635, 0x1c01f000, + 0x480fc857, 0x4c000000, 0x820c0580, 0x00000001, + 0x04020004, 0x42000000, 0x0010b60c, 0x0401f012, + 0x820c0580, 0x00000002, 0x04020004, 0x42000000, + 0x0010b60d, 0x0401f00c, 0x820c0580, 0x00000003, + 0x04020004, 0x42000000, 0x0010b60e, 0x0401f006, + 0x820c0580, 0x00000004, 0x04020004, 0x42000000, + 0x0010b60f, 0x0401ff51, 0x5c000000, 0x1c01f000, + 0x4c000000, 0x59a80026, 0x4803c857, 0x8c000502, + 0x04000010, 0x8c000506, 0x04000004, 0x42000000, + 0x0010b63f, 0x0401f012, 0x8c00050a, 0x04000004, + 0x42000000, 0x0010b63e, 0x0401f00d, 0x8c000508, + 0x04000004, 0x42000000, 0x0010b641, 0x0401f008, + 0x0201f800, 0x00104e0d, 0x04000006, 0x8c000506, + 0x04020004, 0x42000000, 0x0010b640, 0x0401ff33, + 0x5c000000, 0x1c01f000, 0x8058b1c0, 0x02000800, + 0x00100615, 0x5450a800, 0x8050a000, 0x8054a800, + 0x8058b040, 0x040207fc, 0x1c01f000, 0x8058b1c0, + 0x02000800, 0x00100615, 0x4450a800, 0x8054a800, + 0x8058b040, 0x040207fd, 0x1c01f000, 0x8058b1c0, + 0x02000800, 0x00100615, 0x50500000, 0x9c0001c0, + 0x4400a800, 0x8050a000, 0x8054a800, 0x8058b040, + 0x040207fa, 0x1c01f000, 0x4c000000, 0x59a80008, + 0x8c00051c, 0x5c000000, 0x1c01f000, 0x00000001, + 0x00000002, 0x00000004, 0x00000008, 0x00000010, + 0x00000020, 0x00000040, 0x00000080, 0x00000100, + 0x00000200, 0x00000400, 0x00000800, 0x00001000, + 0x00002000, 0x00004000, 0x00008000, 0x00010000, + 0xd2764e14 }; -struct firmware ql2400_fw = { - .size = sizeof(ql2400_fw_bin), - .data = ql2400_fw_bin +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_length01 = 0x0000a971 ; +#else +uint32_t risc_code_length01 = 0x0000a971 ; +#endif + + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_addr02 = 0x0010d000 ; +#else +uint32_t risc_code_addr02 = 0x0010d000 ; +#endif + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_code02[] = { +#else +uint32_t risc_code02[] = { +#endif + 0x00000000, 0x00000000, 0x0010d000, 0x0000165e, + 0x00000000, 0x00000000, 0x00020000, 0x000009f7, + 0x836c0580, 0x00000003, 0x02020000, 0x00100314, + 0x42000000, 0x0010b2b7, 0x50000000, 0x800001c0, + 0x0402098a, 0x0401f94d, 0x0201f800, 0x00020524, + 0x0401fbfe, 0x0201f800, 0x0002084c, 0x0201f800, + 0x000206af, 0x0401f7ef, 0x59b800ea, 0x82000d00, + 0xf0000038, 0x02020000, 0x00100ac3, 0x8c000510, + 0x02000000, 0x00100ac2, 0x59ba60e0, 0x81300182, + 0x0402104e, 0x04002030, 0x8532653e, 0x59300406, + 0x82000580, 0x00000003, 0x04020028, 0x59300203, + 0x82000580, 0x00000004, 0x04020024, 0x59325808, + 0x59300402, 0x4a025a04, 0x00000103, 0x900001c0, + 0x48025806, 0x497a5807, 0x497a5c09, 0x5930001f, + 0x80000540, 0x02020800, 0x00100d9a, 0x59300004, + 0x8c00053e, 0x04020010, 0x0401fb47, 0x59326809, + 0x0201f800, 0x000208b4, 0x5934000f, 0x5934140b, + 0x80081040, 0x04001002, 0x480a6c0b, 0x80000540, + 0x04020a31, 0x59b800ea, 0x8c000510, 0x040207d7, + 0x1c01f000, 0x0201f800, 0x00106cb4, 0x040007ef, + 0x0201f000, 0x00100aae, 0x42027000, 0x00000055, + 0x0401f027, 0x83326500, 0x3fffffff, 0x59300406, + 0x82000580, 0x00000003, 0x04020015, 0x59325808, + 0x59326809, 0x59301402, 0x4a025a04, 0x00000103, + 0x900811c0, 0x480a5806, 0x497a5c09, 0x497a5807, + 0x0401fb21, 0x0201f800, 0x000208b4, 0x5934000f, + 0x5934140b, 0x80081040, 0x04001002, 0x480a6c0b, + 0x80000540, 0x04020a0c, 0x0401f7db, 0x42027000, + 0x00000054, 0x0401f00a, 0x83300500, 0x60000000, + 0x02000000, 0x00100ab1, 0x81326580, 0x8000013a, + 0x82000400, 0x00100ac9, 0x50027000, 0x59300c06, + 0x82040580, 0x00000002, 0x02000000, 0x00100aae, + 0x59300004, 0x8c00053e, 0x04020004, 0x0201f800, + 0x000208d8, 0x0401f7c4, 0x0201f800, 0x00106cb4, + 0x040007fb, 0x0201f000, 0x00100aae, 0x59325808, + 0x412c7000, 0x58380a04, 0x82040500, 0x0000000f, + 0x82000c00, 0x0010110d, 0x50044000, 0x0c01f001, + 0x00100e24, 0x00100e24, 0x000200a0, 0x00100e24, + 0x00100e24, 0x00100e24, 0x00100e24, 0x00100e24, + 0x000200b0, 0x00100e38, 0x00100e24, 0x00100e24, + 0x00100e26, 0x00100e24, 0x00100e24, 0x00100e24, + 0x5838040a, 0x8c000500, 0x02000800, 0x00100615, + 0x50200000, 0x80387c00, 0x583c1002, 0x583c2800, + 0x583c2001, 0x58380a07, 0x5838300f, 0x59303807, + 0x58384c08, 0x5838000d, 0x48026012, 0x0401f010, + 0x5838020a, 0x8c000502, 0x02000000, 0x00100e24, + 0x50200000, 0x80387c00, 0x583c2800, 0x583c2001, + 0x583c1002, 0x592c0a07, 0x592c4c08, 0x592c300f, + 0x59303807, 0x497a6012, 0x497a6013, 0x4816600e, + 0x4812600f, 0x480a6010, 0x481a6011, 0x80040840, + 0x4806600d, 0x02020000, 0x00100e65, 0x841c3d40, + 0x481e6007, 0x1c01f000, 0x41787800, 0x59325808, + 0x592c0c0a, 0x8c040d02, 0x02000000, 0x00100fda, + 0x592c000d, 0x592c100f, 0x592c0a04, 0x480a6011, + 0x48026012, 0x48026013, 0x412c3000, 0x82040500, + 0x0000000f, 0x82000400, 0x0010110d, 0x50003800, + 0x501c0000, 0x401c1000, 0x592c1a07, 0x4802600a, + 0x481a600b, 0x480a600c, 0x480e600d, 0x843c7d4a, + 0x403c1000, 0x1c01f000, 0x41787800, 0x497a6012, + 0x592c0a04, 0x412c3000, 0x592c1a07, 0x82040500, + 0x0000000f, 0x82000400, 0x0010110d, 0x50004000, + 0x50200000, 0x40201000, 0x4802600a, 0x481a600b, + 0x480a600c, 0x480e600d, 0x80000580, 0x483e6004, + 0x1c01f000, 0x0002014c, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x00020139, 0x00020139, 0x00020139, + 0x00020139, 0x4c000000, 0x4df00000, 0x4203e000, + 0xb0100000, 0x41f00000, 0x81fe1500, 0x8d0a1512, + 0x02020800, 0x00101468, 0x8d0a1518, 0x02020800, + 0x00020861, 0x8d0a151a, 0x04020ed0, 0x83080500, + 0x00000d00, 0x04020804, 0x5c03e000, 0x5c000000, + 0x1801f000, 0x8d0a1516, 0x02020800, 0x001012d9, + 0x8d0a1514, 0x02020800, 0x001011a5, 0x8d0a1508, + 0x02020800, 0x001011aa, 0x8d0a1500, 0x02020000, + 0x000207c8, 0x1c01f000, 0x42000000, 0x0010b2bd, + 0x50000000, 0x8c000504, 0x04000014, 0x42000000, + 0x0010b2bd, 0x50000000, 0x8c000502, 0x04020002, + 0x1c01f000, 0x4df00000, 0x4203e000, 0x50000000, + 0x42034000, 0x0010b2a0, 0x59a0001d, 0x59a1d81e, + 0x84000502, 0x4803401d, 0x58ec0009, 0x0801f800, + 0x5c03e000, 0x1c01f000, 0x04027002, 0x04026002, + 0x1c01f000, 0x4df00000, 0x4203e000, 0x50000000, + 0x0201f800, 0x0010082a, 0x0400001a, 0x412dd800, + 0x48efc857, 0x0201f800, 0x00103941, 0x42034000, + 0x0010b2a0, 0x49a1d80b, 0x48ef401e, 0x59a0001d, + 0x84000544, 0x4803401d, 0x59e00020, 0x4803c857, + 0x59e00021, 0x4803c857, 0x59e00022, 0x4803c857, + 0x59e00023, 0x4803c857, 0x59e00024, 0x4803c857, + 0x0201f800, 0x00101fbb, 0x0201f800, 0x00101fda, + 0x5c03e000, 0x1c01f000, 0x4da00000, 0x4df00000, + 0x4203e000, 0x50000000, 0x04006051, 0x42034000, + 0x0010b2a0, 0x59a01017, 0x59a01818, 0x800c19c0, + 0x04020008, 0x59a0381b, 0x801c39c0, 0x02000800, + 0x00100615, 0x59a0041c, 0x801c3c00, 0x0401f00c, + 0x59a00419, 0x82000400, 0x00000002, 0x48034419, + 0x82000c80, 0x00000013, 0x04001003, 0x497b4419, + 0x41780000, 0x59a03816, 0x801c3c00, 0x80081040, + 0x480b4017, 0x581c0200, 0x4803c021, 0x581c0401, + 0x4803c022, 0x581c0201, 0x4803c023, 0x581c0400, + 0x4803c020, 0x900001c0, 0x82000540, 0x00000012, + 0x4803c011, 0x59e00017, 0x8c000508, 0x04000003, + 0x4a03c017, 0x00000002, 0x4203e000, 0x30000001, + 0x800c19c0, 0x04000007, 0x800c1840, 0x480f4018, + 0x0402001f, 0x497b4419, 0x497b4219, 0x0401f01c, + 0x800811c0, 0x0402000b, 0x4d2c0000, 0x59a2581b, + 0x0201f800, 0x0010083a, 0x5c025800, 0x497b401b, + 0x497b401a, 0x497b441c, 0x497b421c, 0x0401f010, + 0x59a0041c, 0x82000400, 0x00000002, 0x82000c80, + 0x00000012, 0x4803441c, 0x04001009, 0x4d2c0000, + 0x59a2581b, 0x592c3813, 0x481f401b, 0x497b441c, + 0x0201f800, 0x0010083a, 0x5c025800, 0x5c03e000, + 0x5c034000, 0x1c01f000, 0x59a80005, 0x82000500, + 0x00000003, 0x02020000, 0x00104145, 0x59340400, + 0x82000580, 0x00000606, 0x02020000, 0x00104116, + 0x5934000d, 0x80027d40, 0x02020000, 0x00104151, + 0x0401f803, 0x80000580, 0x1c01f000, 0x5934000f, + 0x59341203, 0x80080540, 0x0402005d, 0x5934020b, + 0x5934140b, 0x80080480, 0x04021059, 0x0201f800, + 0x00020892, 0x04000052, 0x592c0406, 0x49366009, + 0x492e6008, 0x4a026406, 0x00000003, 0x4a026403, + 0x00000040, 0x80081000, 0x480a6c0b, 0x800000c2, + 0x800018c4, 0x800c0400, 0x48026206, 0x592c0808, + 0x592c1809, 0x592c020a, 0x48066017, 0x480e6018, + 0x8c000502, 0x0400002a, 0x4a026203, 0x00000004, + 0x592c0207, 0x80000040, 0x0402001a, 0x59a80070, + 0x80000040, 0x040207ff, 0x592c0204, 0x82000500, + 0x000000ff, 0x82000580, 0x00000018, 0x04020011, + 0x592c180f, 0x59300007, 0x82000540, 0x00000091, + 0x480e6011, 0x48026007, 0x42000000, 0x80000004, + 0x48026004, 0x59bc00ea, 0x8c000516, 0x040207fe, + 0x83300400, 0x20000000, 0x480378e1, 0x1c01f000, + 0x0401fe4b, 0x59300007, 0x8400054e, 0x48026007, + 0x592c1a04, 0x820c1d00, 0x000000ff, 0x820c0580, + 0x00000048, 0x04000012, 0x0401f7ec, 0x8c000500, + 0x04020e9e, 0x4a026203, 0x00000002, 0x59a80071, + 0x80000040, 0x040207ff, 0x592c1a04, 0x820c1d00, + 0x000000ff, 0x820c0580, 0x00000018, 0x040007df, + 0x820c0580, 0x00000048, 0x040207dc, 0x42000800, + 0x80000804, 0x0201f000, 0x00106466, 0x800811c0, + 0x04020003, 0x4a026a03, 0x00000001, 0x59340010, + 0x492e6810, 0x80000d40, 0x04020003, 0x492e680f, + 0x1c01f000, 0x492c0800, 0x1c01f000, 0x83440c80, + 0x00000800, 0x04021009, 0x83440400, 0x0010aa00, + 0x50000000, 0x80000540, 0x04000004, 0x40026800, + 0x80000580, 0x1c01f000, 0x82000540, 0x00000001, + 0x1c01f000, 0x59340203, 0x80000540, 0x0402004b, + 0x4d300000, 0x4d2c0000, 0x5934000f, 0x80025d40, + 0x04000044, 0x0201f800, 0x00020892, 0x0400003f, + 0x592c0000, 0x4802680f, 0x80000540, 0x04020002, + 0x48026810, 0x592c2a04, 0x80081000, 0x480a6c0b, + 0x49366009, 0x492e6008, 0x82142d00, 0x000000ff, + 0x82140580, 0x00000012, 0x04000035, 0x4a026406, + 0x00000003, 0x4a026403, 0x00000040, 0x592c0406, + 0x800000c2, 0x800018c4, 0x800c0400, 0x48026206, + 0x592c0808, 0x592c1809, 0x592c020a, 0x48066017, + 0x480e6018, 0x8c000502, 0x02000000, 0x001045a1, + 0x4a026203, 0x00000004, 0x592c0207, 0x80000040, + 0x02020000, 0x00104594, 0x82140580, 0x00000018, + 0x02020000, 0x00104594, 0x592c180f, 0x59300007, + 0x82000540, 0x00000091, 0x480e6011, 0x48026007, + 0x42000000, 0x80000004, 0x48026004, 0x59bc00ea, + 0x8c000516, 0x040207fe, 0x83300400, 0x20000000, + 0x480378e1, 0x5934020b, 0x5934140b, 0x80080480, + 0x040017be, 0x0401f003, 0x4a026a03, 0x00000001, + 0x5c025800, 0x5c026000, 0x1c01f000, 0x497a5800, + 0x49325809, 0x4a026406, 0x00000006, 0x4a026203, + 0x00000007, 0x0401f802, 0x0401f7ef, 0x59a80021, + 0x800001c0, 0x02020000, 0x001045c3, 0x59a80005, + 0x8c000504, 0x02020000, 0x001045bf, 0x59340200, + 0x8c000518, 0x02020000, 0x001045bb, 0x592c0a0c, + 0x48066202, 0x4a025a06, 0x00000000, 0x8c000508, + 0x02020000, 0x001045b7, 0x4d3c0000, 0x417a7800, + 0x0201f800, 0x000207ce, 0x5c027800, 0x1c01f000, + 0x59980026, 0x497a5800, 0x80000540, 0x04020067, + 0x59d80105, 0x82000d00, 0x00018780, 0x04020197, + 0x800000f6, 0x8000013c, 0x0c01f001, 0x000202f3, + 0x0002034e, 0x00020308, 0x00020326, 0x592c0001, + 0x492fb107, 0x80000d40, 0x04020805, 0x59940019, + 0x80000540, 0x04002085, 0x1c01f000, 0x497a5801, + 0x40065800, 0x592c0001, 0x496a5800, 0x815eb800, + 0x412ed000, 0x80000d40, 0x040207f9, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x1c01f000, + 0x492fb107, 0x592c0001, 0x80000d40, 0x04020ff0, + 0x59da5908, 0x835c0480, 0x00000020, 0x0400100d, + 0x0402b00b, 0x492fb007, 0x0400e7fa, 0x59d80105, + 0x82000500, 0x00018780, 0x0402016c, 0x59940019, + 0x80000540, 0x04002065, 0x1c01f000, 0x0400f009, + 0x496a5800, 0x412ed000, 0x815eb800, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x0401f7ef, + 0x492fa807, 0x0401f7ed, 0x59d81108, 0x45681000, + 0x400ad000, 0x815eb800, 0x0400e7fc, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x0402d009, + 0x592c0001, 0x492fb107, 0x80000d40, 0x04020fc8, + 0x59940019, 0x80000540, 0x04002048, 0x1c01f000, + 0x59d80105, 0x82000500, 0x00018780, 0x04020147, + 0x42000000, 0x0010b654, 0x0201f800, 0x0010a86e, + 0x59980026, 0x59980828, 0x80000000, 0x48033026, + 0x492f3028, 0x800409c0, 0x04000003, 0x492c0800, + 0x0401f002, 0x492f3029, 0x592c0001, 0x80000d40, + 0x04020faf, 0x0401f7e7, 0x59980026, 0x59980828, + 0x80000000, 0x48033026, 0x492f3028, 0x800409c0, + 0x04000003, 0x492c0800, 0x0401f002, 0x492f3029, + 0x592c0001, 0x80000d40, 0x04020fa1, 0x0402d00d, + 0x59980029, 0x80025d40, 0x0400000e, 0x59980026, + 0x80000040, 0x48033026, 0x04020002, 0x48033028, + 0x592c0000, 0x48033029, 0x492fb107, 0x0400d7f5, + 0x42000000, 0x0010b654, 0x0201f800, 0x0010a86e, + 0x0402e00a, 0x59da5908, 0x496a5800, 0x412ed000, + 0x815eb800, 0x0400e7fc, 0x59c80000, 0x82000540, + 0x00001200, 0x48039000, 0x59d80105, 0x82000500, + 0x00018780, 0x04020109, 0x59940019, 0x80000540, + 0x04002002, 0x1c01f000, 0x59980023, 0x48032819, + 0x1c01f000, 0x592c0404, 0x8c00051e, 0x02020000, + 0x00104b7b, 0x59980022, 0x80000540, 0x0402075d, + 0x59980026, 0x497a5800, 0x80000540, 0x02020000, + 0x00104ba6, 0x59d80105, 0x82000d00, 0x00018780, + 0x040200f2, 0x800000f6, 0x8000013c, 0x0c01f001, + 0x00020398, 0x00104ba6, 0x0002039d, 0x000203e6, + 0x592c0001, 0x492fb107, 0x80000d40, 0x04020760, + 0x1c01f000, 0x592c0001, 0x492fb107, 0x80000d40, + 0x04020f5b, 0x59da5908, 0x835c0480, 0x00000020, + 0x0400102b, 0x0402b033, 0x492fb007, 0x0400e7fa, + 0x59d80105, 0x82000500, 0x00018780, 0x040200d7, + 0x0400601f, 0x59d8010a, 0x59d8090a, 0x80040580, + 0x040207fd, 0x800408e0, 0x599c1017, 0x8c081508, + 0x04020028, 0x82040d40, 0x00000013, 0x5998002b, + 0x4807c011, 0x84000500, 0x4803302b, 0x59e00017, + 0x8c000508, 0x04020004, 0x4203e000, 0x30000001, + 0x1c01f000, 0x4a03c017, 0x00000003, 0x82040500, + 0x000000ff, 0x82000580, 0x0000001d, 0x040207f7, + 0x4a03c017, 0x0000000d, 0x0401f7f4, 0x5998082b, + 0x84040d40, 0x4807302b, 0x1c01f000, 0x496a5800, + 0x412ed000, 0x815eb800, 0x59c80000, 0x82000540, + 0x00001200, 0x48039000, 0x0400e7cb, 0x0401f7d1, + 0x0402f7f7, 0x492fa807, 0x0400e7c7, 0x0401f7cd, + 0x59e0000f, 0x59e0100f, 0x80081580, 0x040207fd, + 0x81281580, 0x040007d4, 0x40025000, 0x82040d40, + 0x0000001d, 0x0401f7d2, 0x59d80908, 0x45680800, + 0x4006d000, 0x815eb800, 0x0400e7fc, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x02006000, + 0x00104b8d, 0x59d8010a, 0x59d8090a, 0x80040d80, + 0x040207fd, 0x900001c0, 0x82000540, 0x00000013, + 0x4803c011, 0x5998002b, 0x84000500, 0x4803302b, + 0x59e00017, 0x8c000508, 0x04000003, 0x4a03c017, + 0x00000003, 0x4203e000, 0x30000001, 0x59d80105, + 0x82000500, 0x00018780, 0x0402007c, 0x0202d000, + 0x00104b92, 0x592c0001, 0x492fb107, 0x80000d40, + 0x040206ef, 0x1c01f000, 0x59980020, 0x0c01f001, + 0x00020413, 0x00020414, 0x00020434, 0x1c01f000, + 0x4df00000, 0x4203e000, 0x50000000, 0x04026876, + 0x04006004, 0x599c0017, 0x8c000508, 0x040208f5, + 0x59980029, 0x80025d40, 0x0400000a, 0x0402d00b, + 0x59980026, 0x80000040, 0x48033026, 0x592c0000, + 0x492fb107, 0x48033029, 0x04020002, 0x48033028, + 0x5c03e000, 0x1c01f000, 0x59d80105, 0x82000500, + 0x00018780, 0x04020055, 0x42000000, 0x0010b654, + 0x0201f800, 0x0010a86e, 0x5c03e000, 0x1c01f000, + 0x4df00000, 0x4203e000, 0x50000000, 0x599cb817, + 0x59940019, 0x80000540, 0x04002023, 0x0400000e, + 0x59980022, 0x82000580, 0x00000005, 0x0400001e, + 0x59a80069, 0x81640580, 0x0402001b, 0x8c5cbd08, + 0x04000007, 0x59a8006a, 0x59a80866, 0x80040580, + 0x04020015, 0x8c5cbd08, 0x0402002b, 0x59d8090b, + 0x59d8010a, 0x80040580, 0x0400000d, 0x0400600e, + 0x4a03c011, 0x80400012, 0x4a03c020, 0x00008040, + 0x59e00017, 0x8c000508, 0x04000003, 0x4a03c017, + 0x00000002, 0x4203e000, 0x30000001, 0x4a032819, + 0xffff0000, 0x0400e879, 0x04006003, 0x8c5cbd08, + 0x0402088e, 0x59980029, 0x80025d40, 0x04020003, + 0x5c03e000, 0x1c01f000, 0x59d80105, 0x82000500, + 0x00018780, 0x04020019, 0x0202d000, 0x00104c06, + 0x59980826, 0x592c0000, 0x80040840, 0x48073026, + 0x492fb107, 0x48033029, 0x040207f2, 0x48033028, + 0x0401f7f0, 0x59e0000f, 0x59e0080f, 0x80040580, + 0x040207fd, 0x59e00010, 0x59e01010, 0x80081580, + 0x040207fd, 0x40065000, 0x80041580, 0x040007cc, + 0x040067e1, 0x0401f7cf, 0x4803c857, 0x485fc857, + 0x8c00050e, 0x02020800, 0x0010060d, 0x4203e000, + 0x50000000, 0x4200b800, 0x00008004, 0x0201f000, + 0x0010061a, 0x5998002b, 0x8c000500, 0x04020039, + 0x0400e006, 0x59d80105, 0x82000500, 0x00018780, + 0x040207ee, 0x1c01f000, 0x59da5908, 0x835c0c80, + 0x00000020, 0x04001003, 0x0400b028, 0x0400f02a, + 0x496a5800, 0x412ed000, 0x815eb800, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x0400e7f3, + 0x59d8010a, 0x59d8090a, 0x80040580, 0x040207fd, + 0x800408e0, 0x599c1017, 0x8c081508, 0x04020021, + 0x82040d40, 0x00000013, 0x4807c011, 0x59e00017, + 0x8c000508, 0x0400000a, 0x4a03c017, 0x00000003, + 0x82040500, 0x000000ff, 0x82000580, 0x0000001d, + 0x04020003, 0x4a03c017, 0x0000000d, 0x4203e000, + 0x30000001, 0x59d80105, 0x82000500, 0x00018780, + 0x040207c2, 0x1c01f000, 0x492fb007, 0x0400e7d3, + 0x0401f7e0, 0x492fa807, 0x0400e7d0, 0x0401f7dd, + 0x84000500, 0x4803302b, 0x0400e7cc, 0x0401f7d9, + 0x59e0000f, 0x59e0100f, 0x80081580, 0x040207fd, + 0x81281580, 0x040007db, 0x40025000, 0x82040d40, + 0x0000001d, 0x0401f7d9, 0x59da5908, 0x496a5800, + 0x412ed000, 0x815eb800, 0x0400e7fc, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x59d8090b, + 0x59980024, 0x48073024, 0x80040480, 0x04020004, + 0x59940019, 0x80000540, 0x04022003, 0x59980823, + 0x48072819, 0x59d80105, 0x82000500, 0x00018780, + 0x04020796, 0x1c01f000, 0x59981025, 0x59e00010, + 0x59e00810, 0x80041d80, 0x040207fd, 0x80080580, + 0x04000011, 0x48073025, 0x59e0000f, 0x59e0100f, + 0x80081d80, 0x040207fd, 0x81280580, 0x04000006, + 0x400a5000, 0x40080000, 0x80040580, 0x0402067f, + 0x1c01f000, 0x59940019, 0x80000540, 0x040227fa, + 0x1c01f000, 0x59e0000f, 0x59e0100f, 0x80081d80, + 0x040207fd, 0x81280580, 0x040007f6, 0x400a5000, + 0x59940019, 0x80000540, 0x040027ef, 0x1c01f000, + 0x59e0000f, 0x59e0100f, 0x80080d80, 0x040207fd, + 0x81280580, 0x04020002, 0x1c01f000, 0x400a5000, + 0x900811c0, 0x82081540, 0x0000001c, 0x480bc011, + 0x59e00017, 0x8c000508, 0x04000003, 0x4a03c017, + 0x0000000c, 0x4203e000, 0x30000001, 0x1c01f000, + 0x41700000, 0x0c01f001, 0x001050f0, 0x0002052f, + 0x001050f0, 0x001050f1, 0x001050ee, 0x001050ee, + 0x001050ee, 0x001050ee, 0x00105594, 0x04010037, + 0x59980006, 0x80000540, 0x0402003c, 0x0402c01c, + 0x4202f800, 0x00000010, 0x4df00000, 0x4203e000, + 0x50000000, 0x49db3005, 0x59da5808, 0x592c0204, + 0x497a5800, 0x497a5801, 0x82000500, 0x000000ff, + 0x82000c80, 0x00000079, 0x04021036, 0x0c01f839, + 0x5c03e000, 0x817ef840, 0x04000009, 0x836c0580, + 0x00000003, 0x04020006, 0x83700580, 0x00000001, + 0x04020010, 0x0401001b, 0x0400c7e8, 0x0400f94b, + 0x0400b135, 0x59d40005, 0x82000500, 0x43018780, + 0x02020000, 0x00105523, 0x59d80005, 0x82000500, + 0x43018780, 0x02020000, 0x0010552a, 0x1c01f000, + 0x83700580, 0x00000003, 0x02000800, 0x001050f1, + 0x83700580, 0x00000001, 0x040207ed, 0x04010005, + 0x0400c7d2, 0x0401f7ea, 0x4202f800, 0x00000010, + 0x4df00000, 0x4203e000, 0x50000000, 0x49d73005, + 0x59d65808, 0x0401f7ce, 0x4df00000, 0x4203e000, + 0x50000000, 0x40025800, 0x592c0204, 0x497b3005, + 0x497b3006, 0x4202f800, 0x00000010, 0x0401f7c7, + 0x0201f800, 0x00105161, 0x5c03e000, 0x0401f7d4, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105207, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105171, 0x00105161, + 0x00105161, 0x00105161, 0x00105231, 0x00105161, + 0x00105161, 0x00105161, 0x00020623, 0x00105161, + 0x00105398, 0x00105161, 0x00105161, 0x00105161, + 0x000205f5, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105199, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x001054b7, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105502, 0x00105161, 0x0010518b, + 0x00105161, 0x0010547b, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105449, 0x00105161, 0x00105449, + 0x00105556, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105409, 0x00105539, + 0x00105161, 0x00105549, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x00105161, 0x00105161, 0x00105161, + 0x00105161, 0x592c0204, 0x80000110, 0x80000040, + 0x0400000b, 0x02001000, 0x00105169, 0x48033002, + 0x492f3003, 0x492f3004, 0x4a033008, 0x00020603, + 0x4202e000, 0x00000003, 0x1c01f000, 0x592c0406, + 0x82000c80, 0x0000199a, 0x02021000, 0x00105179, + 0x59a80021, 0x80000540, 0x02020000, 0x001051a7, + 0x592e8a06, 0x83440c80, 0x000007f0, 0x02021000, + 0x00105179, 0x83440400, 0x0010aa00, 0x50000000, + 0x80026d40, 0x02000000, 0x001051bb, 0x59340002, + 0x592c0810, 0x80040580, 0x82000500, 0x00ffffff, + 0x02020000, 0x00105179, 0x0201f800, 0x000201ee, + 0x02020000, 0x001051be, 0x1c01f000, 0x592c0204, + 0x80000110, 0x02000000, 0x00105169, 0x80000040, + 0x0402000b, 0x592c040a, 0x8c000504, 0x04000010, + 0x592c0207, 0x82000c80, 0x00001001, 0x02021000, + 0x00105179, 0x0201f000, 0x0010556e, 0x48033002, + 0x492f3003, 0x492f3004, 0x4a033008, 0x0002063b, + 0x4202e000, 0x00000003, 0x1c01f000, 0x592c0406, + 0x82000c80, 0x0000199a, 0x02021000, 0x00105179, + 0x592e8a06, 0x417a7800, 0x0401fc25, 0x02020000, + 0x0010533c, 0x59340002, 0x592c0808, 0x80040580, + 0x82000500, 0x00ffffff, 0x02020000, 0x00105179, + 0x497a5808, 0x592e6009, 0x83300580, 0xffffffff, + 0x02000000, 0x001052fc, 0x83300480, 0x0010cfc0, + 0x02001000, 0x00105359, 0x59a8000b, 0x81300480, + 0x02021000, 0x00105359, 0x592c240a, 0x49366009, + 0x8c10251c, 0x02020000, 0x001052ea, 0x59a80068, + 0x8c000510, 0x02020000, 0x00105372, 0x59a80821, + 0x800409c0, 0x02020000, 0x001052d0, 0x59a80805, + 0x8c040d04, 0x02020000, 0x00105363, 0x59340200, + 0x8c000518, 0x02020000, 0x00105354, 0x59300c06, + 0x82040580, 0x00000006, 0x02020000, 0x001052f4, + 0x59300414, 0x8c000516, 0x02020000, 0x0010535e, + 0x8c102508, 0x02020000, 0x0010a3d7, 0x59300808, + 0x4a025a06, 0x00000000, 0x800409c0, 0x02020000, + 0x001052cb, 0x592c0a0c, 0x48066202, 0x492e6008, + 0x0401f14a, 0x4df00000, 0x4203e000, 0x50000000, + 0x0402b00b, 0x835c0480, 0x00000020, 0x0400100d, + 0x815eb840, 0x416a5800, 0x592ed000, 0x492fb007, + 0x497a5800, 0x497a5801, 0x0400b7f7, 0x59d80005, + 0x82000500, 0x43018780, 0x02020000, 0x0010552a, + 0x5c03e000, 0x1c01f000, 0x4df00000, 0x4203e000, + 0x50000000, 0x0402f00b, 0x835c0480, 0x00000020, + 0x0400100d, 0x815eb840, 0x416a5800, 0x592ed000, + 0x492fa807, 0x497a5800, 0x497a5801, 0x0400f7f7, + 0x59d40005, 0x82000500, 0x43018780, 0x02020000, + 0x00105523, 0x5c03e000, 0x1c01f000, 0x4df00000, + 0x4203e000, 0x50000000, 0x59940024, 0x80000540, + 0x0400010f, 0x4c000000, 0x42000000, 0x00001000, + 0x50000000, 0x82000480, 0x24320001, 0x04020015, + 0x42000800, 0x00000064, 0x80040840, 0x04000007, + 0x4a030000, 0x00000001, 0x40000000, 0x59800000, + 0x8c000500, 0x040007f9, 0x04000008, 0x42000800, + 0x00007a01, 0x50040000, 0x8c000510, 0x04000003, + 0x84000510, 0x44000800, 0x4a030000, 0x00000000, + 0x59e00002, 0x8c00051e, 0x0402001b, 0x42000000, + 0x00001000, 0x50000000, 0x82000480, 0x24320002, + 0x04020015, 0x42000800, 0x00000064, 0x80040840, + 0x04000007, 0x4a030000, 0x00000001, 0x40000000, + 0x59800000, 0x8c000500, 0x040007f9, 0x04000008, + 0x42000800, 0x00007a17, 0x50040000, 0x8c00050e, + 0x04020003, 0x8400054e, 0x44000800, 0x4a030000, + 0x00000000, 0x5c000000, 0x5994781a, 0x48032825, + 0x803c0480, 0x04001004, 0x04000003, 0x4803281a, + 0x0401f022, 0x41787800, 0x803c7800, 0x82000400, + 0x000003e8, 0x040027fd, 0x4803281a, 0x59a80024, + 0x803c1400, 0x480b5024, 0x803c0040, 0x04000002, + 0x483fc857, 0x59e40852, 0x59a80025, 0x80040580, + 0x04000004, 0x480bc857, 0x59e40052, 0x48035025, + 0x59940026, 0x803c0400, 0x48032826, 0x0201f800, + 0x00105d5a, 0x59940000, 0x82000580, 0x00000000, + 0x04020006, 0x59940026, 0x48032827, 0x497b2826, + 0x4a032800, 0x00000001, 0x4c0c0000, 0x59940007, + 0x80000d40, 0x0400001d, 0x59941006, 0x59940025, + 0x80081c80, 0x04001004, 0x04000003, 0x480f2806, + 0x0401f016, 0x80040840, 0x48072807, 0x82040580, + 0x000003e8, 0x04020007, 0x4c040000, 0x4c0c0000, + 0x59940008, 0x0801f800, 0x5c001800, 0x5c000800, + 0x800409c0, 0x04020004, 0x59940008, 0x0801f800, + 0x0401f006, 0x400c0000, 0x820c1c00, 0x0000000a, + 0x040027ed, 0x480f2806, 0x5c001800, 0x4d180000, + 0x59c40008, 0x8c000534, 0x04020025, 0x417a3000, + 0x83947c00, 0x00000009, 0x583c0001, 0x80000d40, + 0x04020008, 0x823c7c00, 0x00000003, 0x811a3000, + 0x83180580, 0x00000005, 0x040207f8, 0x0401f018, + 0x583c1000, 0x59940025, 0x80080480, 0x04001005, + 0x04000004, 0x48007800, 0x80000040, 0x04021010, + 0x80040840, 0x48047801, 0x04000008, 0x82000400, + 0x0000000a, 0x48007800, 0x040027fa, 0x82040500, + 0x0000007f, 0x0401f7e8, 0x583c0002, 0x4c3c0000, + 0x0801f800, 0x5c007800, 0x0401f7e3, 0x5c023000, + 0x59940019, 0x80001540, 0x04000007, 0x04002006, + 0x59940025, 0x80080480, 0x04021002, 0x80000580, + 0x48032819, 0x5994001c, 0x80000d40, 0x04000013, + 0x5994101b, 0x59940025, 0x80080480, 0x04001005, + 0x04000004, 0x4803281b, 0x80000040, 0x0402100b, + 0x80040840, 0x4807281c, 0x04020004, 0x5994001d, + 0x0801f800, 0x0401f005, 0x82000400, 0x0000000a, + 0x4803281b, 0x040027f7, 0x59940004, 0x80000d40, + 0x04000013, 0x59941003, 0x59940025, 0x80080480, + 0x04001005, 0x04000004, 0x48032803, 0x80000040, + 0x0402100b, 0x80040840, 0x48072804, 0x04020004, + 0x59940005, 0x0801f800, 0x0401f005, 0x82000400, + 0x0000000a, 0x48032803, 0x040027f7, 0x5994001f, + 0x80000d40, 0x04000013, 0x5994101e, 0x59940025, + 0x80080480, 0x04001005, 0x04000004, 0x4803281e, + 0x80000040, 0x0402100b, 0x80040840, 0x4807281f, + 0x04020004, 0x59940020, 0x0801f800, 0x0401f005, + 0x82000400, 0x00000001, 0x4803281e, 0x040027f7, + 0x59940022, 0x80000d40, 0x04000013, 0x59941021, + 0x59940025, 0x80080480, 0x04001005, 0x04000004, + 0x48032821, 0x80000040, 0x0402100b, 0x80040840, + 0x48072822, 0x04020004, 0x59940023, 0x0801f800, + 0x0401f005, 0x82000400, 0x0000000a, 0x48032821, + 0x040027f7, 0x59940824, 0x59940025, 0x80040480, + 0x02001800, 0x00100615, 0x48032824, 0x59940000, + 0x0c01f001, 0x00105cee, 0x00105cf0, 0x00105d16, + 0x59940024, 0x80000000, 0x48032824, 0x4203e000, + 0x70000000, 0x1c01f000, 0x592c0406, 0x800000c2, + 0x800008c4, 0x80040c00, 0x592c040a, 0x48066206, + 0x82000d00, 0x00000003, 0x02000000, 0x00105e97, + 0x8c000500, 0x0402002c, 0x59a80872, 0x80040840, + 0x040207ff, 0x8c00051e, 0x02000000, 0x00105e72, + 0x82000d00, 0x000000c0, 0x02020000, 0x00105e68, + 0x82000d00, 0x00002020, 0x02020000, 0x00105e65, + 0x813e79c0, 0x02020000, 0x00105e65, 0x592c0c0c, + 0x800409c0, 0x02020000, 0x00105e65, 0x59300a03, + 0x82040d80, 0x00000007, 0x02020000, 0x00105e65, + 0x4a026203, 0x00000003, 0x4a026403, 0x00000043, + 0x0201f800, 0x000200ca, 0x82080d40, 0x80003465, + 0x48066004, 0x497a6000, 0x59bc00ea, 0x8c000516, + 0x040207fe, 0x83300400, 0xa0000000, 0x480378e1, + 0x1c01f000, 0x8c000502, 0x02020000, 0x00105eba, + 0x8c00051e, 0x0400000e, 0x82000d00, 0x000000c0, + 0x04000005, 0x82040d80, 0x000000c0, 0x02020000, + 0x00105ebf, 0x82000d00, 0x00002020, 0x82040d80, + 0x00002020, 0x02000000, 0x00105e86, 0x592c0207, + 0x80000040, 0x02020000, 0x00105e90, 0x592c180d, + 0x800c19c0, 0x02020000, 0x00105e90, 0x592c180f, + 0x59300007, 0x82000540, 0x00000011, 0x480e6011, + 0x48026007, 0x4a026203, 0x00000004, 0x4a026403, + 0x00000042, 0x42000800, 0x80002001, 0x0401f02a, + 0x5c000000, 0x4c000000, 0x4803c857, 0x4807c857, + 0x0401f003, 0x42000800, 0x00000001, 0x59325808, + 0x832c0500, 0x00ff0000, 0x0400000d, 0x592c0000, + 0x48065a06, 0x48026008, 0x592c040a, 0x8c000510, + 0x04020008, 0x0201f800, 0x00020381, 0x417a7800, + 0x59300008, 0x80025d40, 0x0402078c, 0x1c01f000, + 0x456a5800, 0x412ed000, 0x815eb800, 0x59c80000, + 0x82000540, 0x00001200, 0x48039000, 0x0401f7f4, + 0x59840000, 0x80000540, 0x04020002, 0x1c01f000, + 0x59840003, 0x80000540, 0x02020000, 0x00105f37, + 0x1c01f000, 0x59300004, 0x82000500, 0x00000100, + 0x80040d40, 0x48066004, 0x59bc00ea, 0x8c000516, + 0x040207fe, 0x83300400, 0x40000000, 0x480378e1, + 0x1c01f000, 0x59bc00ea, 0x82001500, 0xb0000018, + 0x02020000, 0x001069c6, 0x8c000510, 0x0400002a, + 0x59bc10e0, 0x82080500, 0xfffff000, 0x0402000a, + 0x80080108, 0x820a3500, 0x0000000f, 0x4803c857, + 0x1201f000, 0x001069cc, 0x84000510, 0x48026004, + 0x0401f016, 0x840a653e, 0x59300004, 0x8c000520, + 0x040007fa, 0x82000500, 0xfffefeff, 0x48026004, + 0x8c08153e, 0x04020005, 0x42027000, 0x00000013, + 0x0401f858, 0x0401f009, 0x59300004, 0x8c000514, + 0x04000003, 0x0401ffac, 0x0401f02e, 0x42027000, + 0x00000049, 0x0401f84f, 0x59bc00ea, 0x82001500, + 0xb0000018, 0x02020000, 0x001069c6, 0x8c000510, + 0x040207d8, 0x1c01f000, 0x83640480, 0x00000010, + 0x04001019, 0x41626000, 0x41580000, 0x59300a03, + 0x82040d80, 0x00000000, 0x04000008, 0x83326400, + 0x00000024, 0x81300c80, 0x040017f9, 0x42026000, + 0x0010cfc0, 0x0401f7f6, 0x4a026203, 0x00000008, + 0x8166c840, 0x8332c400, 0x00000024, 0x81600480, + 0x04021002, 0x1c01f000, 0x837ac540, 0x0010cfc0, + 0x1c01f000, 0x42000000, 0x0010b653, 0x0201f800, + 0x0010a86e, 0x4967c857, 0x80026580, 0x1c01f000, + 0x83300480, 0x0010cfc0, 0x02001800, 0x00100615, + 0x41580000, 0x81300480, 0x0402100c, 0x04011000, + 0x457a6000, 0x4a026202, 0x0000ffff, 0x83300400, + 0x00000003, 0x4803c840, 0x4a03c842, 0x00000021, + 0x8166c800, 0x1c01f000, 0x41540000, 0x81300480, + 0x02021800, 0x00100615, 0x04011000, 0x457a6000, + 0x4a026202, 0x0000ffff, 0x83300400, 0x00000003, + 0x4803c840, 0x4a03c842, 0x00000021, 0x59a80066, + 0x49335065, 0x80000000, 0x48035066, 0x1c01f000, + 0x4d340000, 0x59326809, 0x59300406, 0x82000500, + 0x0000001f, 0x0c01f803, 0x5c026800, 0x1c01f000, + 0x001076ed, 0x00107700, 0x0010771a, 0x00020900, + 0x001096c1, 0x001096dc, 0x00020975, 0x001076ed, + 0x00107700, 0x00106226, 0x00107733, 0x001076ed, + 0x001076ed, 0x001076ed, 0x001076ed, 0x001076ed, + 0x0010936a, 0x0010a4d0, 0x001076ed, 0x001076ed, + 0x001076ed, 0x001076ed, 0x001076ed, 0x001076ed, + 0x001076ed, 0x001076ed, 0x001076ed, 0x001076ed, + 0x001076ed, 0x001076ed, 0x001076ed, 0x001076ed, + 0x59300203, 0x82000c80, 0x0000000e, 0x02021800, + 0x00100615, 0x0c01f001, 0x00107731, 0x00108337, + 0x00020914, 0x001084cc, 0x00108566, 0x00107731, + 0x00107731, 0x00107731, 0x0010831c, 0x00107731, + 0x00107731, 0x00107731, 0x00107731, 0x0010873a, + 0x83380480, 0x00000058, 0x04021007, 0x83380480, + 0x00000040, 0x04001004, 0x4d2c0000, 0x0c01f803, + 0x5c025800, 0x1c01f000, 0x001083c1, 0x001083c1, + 0x001083c1, 0x001083c1, 0x001083c1, 0x001083c3, + 0x00108463, 0x001083c1, 0x001083c1, 0x001083c1, + 0x001083c1, 0x001083c1, 0x001083c1, 0x001083c1, + 0x001083c1, 0x001083c1, 0x001083c1, 0x001083c1, + 0x001083c1, 0x00108467, 0x00020936, 0x001083c1, + 0x00108466, 0x00108468, 0x59325808, 0x59300811, + 0x59301402, 0x59340200, 0x8c00050e, 0x0402001c, + 0x0401f826, 0x04000005, 0x4a025a04, 0x00000103, + 0x497a5c09, 0x0401f009, 0x4a025a04, 0x00000103, + 0x4a025a06, 0x00000000, 0x497a5c09, 0x800409c0, + 0x02020800, 0x00108531, 0x48065807, 0x480a5c06, + 0x0201f800, 0x00020381, 0x5934000f, 0x5934140b, + 0x80081040, 0x04001002, 0x480a6c0b, 0x80000540, + 0x02020800, 0x00020275, 0x0401f75e, 0x592c020a, + 0x8c000502, 0x040007e9, 0x800409c0, 0x040007e7, + 0x592c0208, 0x8c00050e, 0x040207e4, 0x4933c857, + 0x0201f000, 0x00108fc6, 0x592c020a, 0x8c000500, + 0x04000010, 0x59300015, 0x592c380f, 0x801c3c80, + 0x0400000c, 0x4a025a06, 0x00000015, 0x8c1c3d3e, + 0x04000005, 0x4a025a06, 0x00000007, 0x801c3880, + 0x801c3800, 0x481fc857, 0x821c0d40, 0x00000000, + 0x1c01f000, 0x59300203, 0x82003480, 0x0000000e, + 0x02021800, 0x00100615, 0x0c01f001, 0x001096fb, + 0x00020989, 0x00109d9c, 0x00109daa, 0x000209a5, + 0x001096fb, 0x00109e98, 0x000209c4, 0x001096fb, + 0x001096fb, 0x001096fb, 0x001096fb, 0x001096fb, + 0x001096fb, 0x83380580, 0x00000013, 0x02020000, + 0x00109d23, 0x59300403, 0x82027480, 0x00000044, + 0x02021800, 0x00100615, 0x82000480, 0x00000040, + 0x02001800, 0x00100615, 0x0c01f001, 0x00109d80, + 0x0002099b, 0x00109d82, 0x00109d94, 0x59325808, + 0x832c0500, 0x00ff0000, 0x04000005, 0x592c0c0a, + 0x8c040d1a, 0x02020000, 0x00109d8f, 0x0401fe8e, + 0x0401f710, 0x83380580, 0x00000048, 0x04000007, + 0x83380580, 0x00000053, 0x02000000, 0x00109e3a, + 0x0201f800, 0x00100615, 0x5930001f, 0x59301011, + 0x59300809, 0x58040a00, 0x8c040d0e, 0x02020000, + 0x00109e16, 0x800811c0, 0x02020000, 0x00109e23, + 0x5930001f, 0x80000540, 0x02020000, 0x00109e31, + 0x59325808, 0x592c040a, 0x8c00051e, 0x02000000, + 0x00109e0c, 0x42027000, 0x00000041, 0x0401f001, + 0x83380480, 0x00000054, 0x02021800, 0x00100615, + 0x83380480, 0x00000040, 0x02001000, 0x00109e57, + 0x0c01f001, 0x00109e63, 0x000209e1, 0x00109e6f, + 0x00109e76, 0x00109e63, 0x00109e63, 0x00109e63, + 0x00109e63, 0x00109e65, 0x00109e6a, 0x00109e6a, + 0x00109e63, 0x00109e63, 0x00109e63, 0x00109e63, + 0x00109e6a, 0x00109e63, 0x00109e6a, 0x00109e63, + 0x00109e65, 0x4a026203, 0x00000001, 0x493a6403, + 0x42000800, 0x80002042, 0x0401f66f, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0xa36ec441, 0x00000000, + 0x00000000, 0x00000000, 0x00000005, 0xfffffffb, + 0x02800004, 0x00000000, 0x0000c000, 0x0000071b, + 0x073fca5a, 0x0705a5a5, 0x01928009, 0x070ff0e1, + 0x03800006, 0x04958010, 0x05308000, 0x05008000, + 0x0600902f, 0x04a004dc, 0x0202f051, 0x042e4020, + 0x018f021b, 0x033e5000, 0x03020000, 0x078d0018, + 0x0493041a, 0x0092041c, 0x038a0305, 0x078b0303, + 0x048e8010, 0x0678aae5, 0x06000001, 0x07818174, + 0x040010e6, 0x0448e0e6, 0x04818010, 0x002fb008, + 0x0448e0e6, 0x04818010, 0x060ff0e6, 0x00580401, + 0x054880ff, 0x04818010, 0x022a5001, 0x030430d4, + 0x06780043, 0x030e0000, 0x030450ff, 0x06780043, + 0x03019000, 0x048185c4, 0x027c0045, 0x03020000, + 0x06810037, 0x027c0045, 0x03040000, 0x068100c7, + 0x027c0045, 0x03080000, 0x0681061c, 0x04908037, + 0x029105c2, 0x010410a6, 0x0379ff41, 0x037fffff, + 0x072d6000, 0x07601241, 0x050f80ff, 0x032fa009, + 0x05600400, 0x050f80ff, 0x056c04ff, 0x068105da, + 0x073fa009, 0x06000001, 0x0279ff02, 0x0700ffff, + 0x070ff0d1, 0x0179feff, 0x0700ffff, 0x045c0402, + 0x048185da, 0x060ff0d0, 0x0179feff, 0x0700ffff, + 0x057dfeff, 0x0700ffff, 0x068105bc, 0x05600e41, + 0x050f80ff, 0x032fa069, 0x07480000, 0x068105ce, + 0x06780043, 0x070000f0, 0x0781005f, 0x037c00ff, + 0x06000010, 0x0781005f, 0x038005ca, 0x0379ff00, + 0x070fffff, 0x06780043, 0x07f00000, 0x075a0000, + 0x020ef001, 0x038605cc, 0x05484000, 0x02a1819e, + 0x062d6001, 0x002fb001, 0x070ff069, 0x01868072, + 0x060ff079, 0x055c0441, 0x06810010, 0x012fb000, + 0x060560fb, 0x03800078, 0x060ff079, 0x02868198, + 0x070ff069, 0x055c0441, 0x06810010, 0x060560fb, + 0x0400d0d0, 0x062d6002, 0x0648300d, 0x06810086, + 0x070ff0d1, 0x062d6001, 0x045c040b, 0x06810089, + 0x05488000, 0x04818086, 0x072e500c, 0x00208001, + 0x05a004e1, 0x02800010, 0x062d6001, 0x07f00000, + 0x07f00000, 0x070ff0d1, 0x0179feff, 0x070000ff, + 0x055c040c, 0x058180bb, 0x0007b001, 0x03079041, + 0x0307a000, 0x06600a79, 0x050f80ff, 0x053fa80a, + 0x06000010, 0x072d5003, 0x078d0096, 0x0307c003, + 0x0007d004, 0x0107e005, 0x0307f006, 0x02080007, + 0x00081008, 0x01082009, 0x0308300a, 0x0008400b, + 0x0308500c, 0x068d00a1, 0x0678007a, 0x07f00000, + 0x010880ff, 0x03386000, 0x03010000, 0x072e6300, + 0x020ef07f, 0x02860010, 0x070ff07d, 0x0450047c, + 0x050f80ff, 0x002fa819, 0x068d00ae, 0x02080001, + 0x00081002, 0x0448807a, 0x068100b5, 0x0379ff03, + 0x070000ff, 0x01082003, 0x068d00b6, 0x02386004, + 0x03010000, 0x072e6c00, 0x02800010, 0x06780043, + 0x070000f0, 0x068105d5, 0x050020ff, 0x027c0002, + 0x06000010, 0x078100c3, 0x028005d5, 0x0700c0d1, + 0x0379ff0c, 0x070000ff, 0x0380008e, 0x0204a051, + 0x06780043, 0x070000f0, 0x037c00ff, 0x06000010, + 0x0781816a, 0x072d6000, 0x019485be, 0x050fb056, + 0x044880e6, 0x04818010, 0x060ff0d0, 0x0179feff, + 0x0700ffff, 0x057dfeff, 0x0700ffff, 0x068105bc, + 0x05a00212, 0x0349c0e4, 0x0781811d, 0x070ff093, + 0x050010ff, 0x070ff093, 0x045c0401, 0x058180db, + 0x02046092, 0x04002046, 0x04600202, 0x00540401, + 0x048280e6, 0x04500425, 0x070060ff, 0x0730ffff, + 0x0700000f, 0x0742000f, 0x05810190, 0x06a005a4, + 0x0648a002, 0x048180e9, 0x00047089, 0x070ff047, + 0x045c0443, 0x077800ff, 0x07f00000, 0x0781818e, + 0x07780047, 0x0500e000, 0x048185ab, 0x070ff006, + 0x01860117, 0x0179fe47, 0x0700000f, 0x010480ff, + 0x056c7048, 0x06818102, 0x007a0d4a, 0x04003801, + 0x0220f001, 0x0180010f, 0x07608e48, 0x034a60ff, + 0x0700f0ff, 0x074b88ff, 0x037000ff, 0x07000600, + 0x05500448, 0x074d00ff, 0x045a044a, 0x0304a0ff, + 0x070ff00f, 0x01540406, 0x05820117, 0x04950120, + 0x05a001bd, 0x02868123, 0x0134bfff, 0x070fffff, + 0x0104102e, 0x050fd041, 0x00800126, 0x0595011d, + 0x05a001bd, 0x0186011d, 0x0202f00e, 0x052e4030, + 0x040fd02f, 0x070fc0ff, 0x05a00218, 0x02800010, + 0x0400e02f, 0x042e4020, 0x0202f051, 0x0004100e, + 0x0004b00e, 0x050fd041, 0x024a6c46, 0x04500423, + 0x050070ff, 0x03620024, 0x050080ff, 0x04004046, + 0x0700500f, 0x03206000, 0x05601048, 0x0700a0ff, + 0x0700900a, 0x070ff005, 0x04500446, 0x00540425, + 0x04820157, 0x05601622, 0x050f80ff, 0x063fa032, + 0x06000002, 0x03203000, 0x01204000, 0x03205000, + 0x0120b000, 0x0320c000, 0x07601441, 0x050f80ff, + 0x043fa852, 0x06000001, 0x070ff056, 0x056c02ff, + 0x050fb0ff, 0x070560ff, 0x03079041, 0x05600e41, + 0x050f80ff, 0x073fa011, 0x0600003d, 0x06780043, + 0x07f00000, 0x065a007a, 0x010880ff, 0x04a001b6, + 0x058d0150, 0x0208a04a, 0x0108b04b, 0x02386001, + 0x03010000, 0x072e6300, 0x028000a8, 0x0500d00a, + 0x05500405, 0x014a68ff, 0x070090ff, 0x0154040a, + 0x0700c0ff, 0x0600a023, 0x0500b024, 0x02206001, + 0x05601622, 0x050f80ff, 0x063fa04a, 0x06000002, + 0x05601022, 0x050f80ff, 0x043fa819, 0x06000001, + 0x0600a00d, 0x0180013c, 0x06780043, 0x070000f0, + 0x050010ff, 0x027c0001, 0x07000030, 0x078105b2, + 0x027c0001, 0x06000020, 0x078105b2, 0x038005ca, + 0x054880ff, 0x06810010, 0x070ff056, 0x050fb0ff, + 0x044880e5, 0x0581017d, 0x044880e6, 0x04818010, + 0x00800183, 0x056c02ff, 0x050fb0ff, 0x070560ff, + 0x072e5300, 0x044880e6, 0x04818010, 0x072d5003, + 0x06780043, 0x07f00000, 0x010880ff, 0x058d0187, + 0x03386005, 0x03010000, 0x033e6000, 0x0700000c, + 0x052e5200, 0x02800010, 0x0120918e, 0x018004e4, + 0x01209190, 0x018004e4, 0x00209192, 0x018004e4, + 0x03209000, 0x018004e4, 0x01209196, 0x018004e4, + 0x00209198, 0x018004e4, 0x02493075, 0x0681050b, + 0x0120919a, 0x018004e4, 0x06601e01, 0x050f80ff, + 0x063fa029, 0x06000008, 0x02015010, 0x02016051, + 0x00017051, 0x00011051, 0x05601a41, 0x050f80ff, + 0x053fa83a, 0x06000008, 0x05600e41, 0x050f80ff, + 0x01464000, 0x032fa00a, 0x07006011, 0x05007012, + 0x04008013, 0x07009014, 0x0600a015, 0x0400b016, + 0x0700c017, 0x07c00000, 0x072d5003, 0x06601479, + 0x050f80ff, 0x048d01b9, 0x063fa051, 0x0600003e, + 0x07c00000, 0x06005051, 0x0400e02c, 0x0660060e, + 0x050f80ff, 0x032fa009, 0x0379ff00, 0x070000ff, + 0x076c0000, 0x058101dd, 0x0660480e, 0x0500e0ff, + 0x034000ff, 0x01540427, 0x0582020a, 0x03400005, + 0x070ff005, 0x055c0428, 0x0481020e, 0x01680e05, + 0x056c0405, 0x068181bf, 0x040f8029, 0x053fa809, + 0x07000024, 0x06600649, 0x050f80ff, 0x032fa009, + 0x0379ff00, 0x070000ff, 0x076c0000, 0x068181bf, + 0x0400e049, 0x0340002d, 0x050f802b, 0x053fa80a, + 0x06000016, 0x0660480e, 0x0302c0ff, 0x034000ff, + 0x01540427, 0x0582020c, 0x072d6000, 0x0460040e, + 0x050f80ff, 0x0104e0d1, 0x0379ff4e, 0x0700ffff, + 0x062d6002, 0x032fa009, 0x0004d0d0, 0x074b004d, + 0x07780000, 0x07ffff00, 0x055a044d, 0x070000ff, + 0x00201008, 0x04002051, 0x06003051, 0x05304000, + 0x07000060, 0x03205009, 0x07006022, 0x0460040e, + 0x050f80ff, 0x032fa03a, 0x06603c0e, 0x050f80ff, + 0x073fa00a, 0x07000027, 0x050010d1, 0x0460320e, + 0x050f80ff, 0x012fa80a, 0x060ff00e, 0x055c042e, + 0x04810210, 0x07c00000, 0x0400e026, 0x008001cb, + 0x0202c026, 0x008001e6, 0x0500e02e, 0x008001e6, + 0x0400e051, 0x01800209, 0x0349c0e4, 0x04810215, + 0x07c00000, 0x013e4000, 0x070c0000, 0x07c00000, + 0x013e4000, 0x03080000, 0x07c00000, 0x009702f4, + 0x022a5002, 0x0790821d, 0x00910291, 0x030400a6, + 0x0678aae5, 0x06000001, 0x01a1860c, 0x06600c40, + 0x050f80ff, 0x032fa021, 0x074b0000, 0x076c0600, + 0x07818293, 0x05600403, 0x050f80ff, 0x073fa009, + 0x06000002, 0x0279ff04, 0x0700ffff, 0x010440d7, + 0x0179fe44, 0x0700ffff, 0x045c0404, 0x07818295, + 0x0349f044, 0x0681829e, 0x02495001, 0x06818297, + 0x060ff079, 0x045c0440, 0x0781823c, 0x0644f07a, + 0x002fb008, 0x060ff079, 0x045c0440, 0x07818241, + 0x0644f07a, 0x002fb008, 0x0648f001, 0x07818288, + 0x04600e40, 0x050f80ff, 0x06480001, 0x04810257, + 0x0448e001, 0x04810273, 0x02460001, 0x0644f001, + 0x012fa80a, 0x04008040, 0x05a004ee, 0x0286828c, + 0x05a004d8, 0x062da001, 0x013e4000, 0x06000080, + 0x06930013, 0x02920013, 0x02800010, 0x0644f001, + 0x012fa80a, 0x020ef002, 0x00860275, 0x04600840, + 0x050f80ff, 0x053fa809, 0x06000002, 0x05780105, + 0x00800440, 0x017c0105, 0x05000400, 0x06818275, + 0x06601e02, 0x050f80ff, 0x053fa809, 0x06000002, + 0x04602a40, 0x050f80ff, 0x070ff005, 0x053fa809, + 0x06000002, 0x055c0405, 0x06818275, 0x04008040, + 0x0045e008, 0x05a004d8, 0x00800251, 0x0644f001, + 0x012fa80a, 0x050020d8, 0x04600440, 0x050f80ff, + 0x073fa00a, 0x06000001, 0x06480001, 0x07818281, + 0x05308000, 0x03040000, 0x06009040, 0x04a004dc, + 0x00800251, 0x07a0060c, 0x054b0800, 0x056a0700, + 0x06600c40, 0x050f80ff, 0x032fa00a, 0x00800251, + 0x013e4000, 0x06000080, 0x01209288, 0x018004e4, + 0x06009008, 0x05308000, 0x05004000, 0x04a004dc, + 0x00800251, 0x02209002, 0x008002e5, 0x03209000, + 0x008002e5, 0x02209004, 0x008002e5, 0x04a002fd, + 0x062da001, 0x05308000, 0x05002000, 0x06009040, + 0x04a004dc, 0x00800252, 0x013e4000, 0x06000080, + 0x02495001, 0x078182db, 0x04600840, 0x050f80ff, + 0x053fa809, 0x06000001, 0x0721f000, 0x0349f003, + 0x058102aa, 0x0245f01f, 0x06000002, 0x018602db, + 0x07601400, 0x050f80ff, 0x012fa809, 0x06480001, + 0x058102db, 0x06602440, 0x050f80ff, 0x012fa809, + 0x020ef001, 0x038682db, 0x019b02db, 0x050020d8, + 0x062da001, 0x06303002, 0x05000430, 0x04600440, + 0x050f80ff, 0x073fa012, 0x06000001, 0x028f82bf, + 0x050040d8, 0x062da001, 0x07601e00, 0x050f80ff, + 0x073fa009, 0x06000001, 0x060ff004, 0x00540402, + 0x048202d9, 0x06005051, 0x06006051, 0x06602240, + 0x050f80ff, 0x063fa01a, 0x06000002, 0x06600a40, + 0x050f80ff, 0x073fa00a, 0x07000003, 0x060ff040, + 0x045a041f, 0x010eb0ff, 0x06930013, 0x02920013, + 0x02800010, 0x04004002, 0x018002c9, 0x04a002fd, + 0x062da001, 0x05308000, 0x07005000, 0x06009040, + 0x04a004dc, 0x050080d8, 0x05a004e1, 0x062da001, + 0x02800013, 0x050fd009, 0x050fd041, 0x013e4000, + 0x06000080, 0x05308000, 0x03013000, 0x04a004dc, + 0x010440d7, 0x0349f044, 0x048102f2, 0x062da001, + 0x008f02f2, 0x03e00000, 0x062da001, 0x02800013, + 0x0249c0e5, 0x06810013, 0x062da001, 0x07f00000, + 0x07f00000, 0x033e5000, 0x070c0000, 0x018f02f6, + 0x03800011, 0x050020d8, 0x04600440, 0x050f80ff, + 0x073fa00a, 0x06000001, 0x07c00000, 0x002fb001, + 0x03800306, 0x012fb000, 0x03075087, 0x068d0307, + 0x03386000, 0x03020000, 0x04482075, 0x06810352, + 0x0648a0e6, 0x07810347, 0x0642007f, 0x06810345, + 0x0340007e, 0x060ff038, 0x0154047e, 0x02d00334, + 0x0560027d, 0x050f80ff, 0x032fa009, 0x030ef000, + 0x02860504, 0x0107d000, 0x05600800, 0x050f80ff, + 0x032fa009, 0x03681e00, 0x04500420, 0x050f80ff, + 0x073fa009, 0x0700003f, 0x03800311, 0x070ff07d, + 0x0450047c, 0x050f80ff, 0x002fa819, 0x078d0327, + 0x02080001, 0x00081002, 0x0448807a, 0x0781032e, + 0x0379ff03, 0x070000ff, 0x01082003, 0x068d032f, + 0x02386004, 0x03010000, 0x072e6c00, 0x02800352, + 0x0380033a, 0x0380033c, 0x0280033e, 0x02800340, + 0x03800342, 0x03800344, 0x0727c005, 0x02800323, + 0x0627c008, 0x02800323, 0x0627c00b, 0x02800323, + 0x0627c00e, 0x02800323, 0x0727c011, 0x02800323, + 0x03800314, 0x052e6800, 0x02800352, 0x044880e6, + 0x06810531, 0x052e6200, 0x070ff088, 0x0179feff, + 0x070fffff, 0x04818501, 0x060ff083, 0x0086836d, + 0x033e6000, 0x07000003, 0x068d0352, 0x07286000, + 0x07f00000, 0x078d0355, 0x038c0306, 0x0648c0e6, + 0x05818372, 0x0448e0e6, 0x0781036a, 0x004920e6, + 0x07810365, 0x06a0056d, 0x05001088, 0x00700101, + 0x03100000, 0x00088001, 0x033e6000, 0x07000088, + 0x0280055e, 0x02386001, 0x07030000, 0x033e6000, + 0x06000008, 0x028003f1, 0x02799075, 0x0500040f, + 0x06810010, 0x06601479, 0x050080ff, 0x06309052, + 0x0600003e, 0x02800376, 0x06602279, 0x050080ff, + 0x05309812, 0x07000041, 0x0648007a, 0x0781037e, + 0x04488075, 0x0581837e, 0x040f8008, 0x070fa009, + 0x0049107a, 0x01a183f3, 0x00798075, 0x06000507, + 0x0481851c, 0x0448b075, 0x06810385, 0x02493075, + 0x07810509, 0x0249c0e6, 0x048183e0, 0x0648c0e6, + 0x0581839a, 0x068d0389, 0x02386001, 0x07030000, + 0x0049107a, 0x07810390, 0x020ef083, 0x0386039a, + 0x06483075, 0x068103ef, 0x0678007a, 0x07000035, + 0x03a184cf, 0x05308000, 0x07060000, 0x06009079, + 0x04a004dc, 0x028003ef, 0x0448807a, 0x0681039e, + 0x06483075, 0x058104f9, 0x0448d07a, 0x068103a2, + 0x06483075, 0x058104f9, 0x068d03a2, 0x02386001, + 0x07030000, 0x0444e07a, 0x0648307a, 0x048183c7, + 0x0448707a, 0x068103ea, 0x0648f07a, 0x078103b2, + 0x05a004cf, 0x04008079, 0x05a004ee, 0x008683c2, + 0x05a004d8, 0x028003ef, 0x0560107b, 0x050f80ff, + 0x032fa009, 0x0349c000, 0x058183c0, 0x04600e79, + 0x050f80ff, 0x073fa00a, 0x0600003d, 0x06600a79, + 0x050f80ff, 0x053fa80a, 0x06000010, 0x028003ef, + 0x0046e07a, 0x028003ea, 0x06009008, 0x05308000, + 0x05004000, 0x04a004dc, 0x028003ef, 0x0560167b, + 0x050f80ff, 0x032fa011, 0x070ff000, 0x04500401, + 0x030460ff, 0x060ff025, 0x00540446, 0x078203d1, + 0x030460ff, 0x04092046, 0x05a00218, 0x06600679, + 0x050f80ff, 0x00201007, 0x012fa80a, 0x0046047a, + 0x034630ff, 0x050020ff, 0x06003051, 0x04600e79, + 0x050f80ff, 0x073fa012, 0x06000001, 0x028003ef, + 0x033e6a00, 0x0202000e, 0x02079051, 0x07000088, + 0x078d03e4, 0x0744c000, 0x01088000, 0x03386006, + 0x03010000, 0x02800010, 0x05a004cf, 0x05308000, + 0x03020000, 0x06009079, 0x04a004dc, 0x033e6a00, + 0x0302000a, 0x02079051, 0x02800010, 0x04603e79, + 0x050f80ff, 0x032fa009, 0x070ff000, 0x0186040c, + 0x057dfeff, 0x07ffffff, 0x0581040c, 0x050f8000, + 0x012fa811, 0x0079fe02, 0x070000ff, 0x077d66ff, + 0x060000dc, 0x0781840c, 0x060ff001, 0x0286840d, + 0x064b0002, 0x06420002, 0x060ff002, 0x05500400, + 0x050f80ff, 0x05004084, 0x073fa00a, 0x06000002, + 0x07c00000, 0x04600201, 0x050f80ff, 0x073fa009, + 0x06000001, 0x0079fe02, 0x070000ff, 0x077d72ff, + 0x070000dd, 0x0781840c, 0x064b0002, 0x06420002, + 0x06000001, 0x01800406, 0x0605004c, 0x0180041e, + 0x0493041a, 0x04a004d5, 0x054bc450, 0x05810421, + 0x01d00422, 0x01800421, 0x00800432, 0x00800434, + 0x00800432, 0x008004a7, 0x0180043f, 0x00800434, + 0x01800471, 0x00800432, 0x00800432, 0x008004ab, + 0x00800432, 0x018004af, 0x008004c4, 0x01800488, + 0x00800432, 0x00800432, 0x00209432, 0x018004e4, + 0x0379ff50, 0x070fffff, 0x060ff079, 0x055c0450, + 0x048104a4, 0x002fb008, 0x060ff079, 0x055c0450, + 0x058104a3, 0x04a004c7, 0x0180049c, 0x0179fe50, + 0x070fffff, 0x070050ff, 0x060ff079, 0x055c0405, + 0x04810449, 0x002fb008, 0x060ff079, 0x055c0405, + 0x078184a0, 0x070ff087, 0x017980ff, 0x06000507, + 0x06818451, 0x02203040, 0x05002087, 0x0049d002, + 0x0481046b, 0x04930458, 0x01257000, 0x073c3fff, + 0x0700000f, 0x052e4003, 0x072e5030, 0x0304c050, + 0x02400057, 0x06740057, 0x06000002, 0x06820016, + 0x04002083, 0x07003084, 0x04004085, 0x06602279, + 0x050f80ff, 0x063fa01a, 0x06000001, 0x05a004cf, + 0x06a00576, 0x033e6a00, 0x0302000a, 0x062e5020, + 0x003e4002, 0x07000a00, 0x028003f1, 0x07420003, + 0x0781844e, 0x00798002, 0x06000507, 0x06818451, + 0x0180045c, 0x05930478, 0x01257000, 0x073c3fff, + 0x0700000f, 0x052e4003, 0x072e5030, 0x0304c050, + 0x067800e6, 0x07000041, 0x0581047d, 0x06a0057f, + 0x04818016, 0x002fb008, 0x067800e6, 0x07000041, + 0x04810483, 0x06a0057f, 0x04818016, 0x062e5020, + 0x003e4002, 0x07000a00, 0x03e00000, 0x02800010, + 0x0379ff50, 0x070fffff, 0x060ff079, 0x055c0450, + 0x0781848e, 0x0245507a, 0x002fb008, 0x060ff079, + 0x055c0450, 0x07818493, 0x0245507a, 0x002fb008, + 0x05600e50, 0x050f80ff, 0x012fa809, 0x02455001, + 0x05600e50, 0x050f80ff, 0x012fa80a, 0x0080049d, + 0x002fb008, 0x003e4002, 0x07000a00, 0x02800016, + 0x079384a3, 0x062e5020, 0x042e4002, 0x002fb008, + 0x013e4000, 0x05000e00, 0x02800016, 0x0179fe50, + 0x070fffff, 0x010210ff, 0x02800016, 0x0179fe50, + 0x070fffff, 0x050340ff, 0x0080049d, 0x0179fe50, + 0x070fffff, 0x0102e0ff, 0x0760282e, 0x050f80ff, + 0x05222000, 0x07223000, 0x05224000, 0x07225000, + 0x07226000, 0x05227000, 0x05228000, 0x07229000, + 0x0722a000, 0x0522b000, 0x063fa051, 0x07000011, + 0x0202c026, 0x0522d000, 0x052e400c, 0x02800016, + 0x030430d4, 0x062e5008, 0x00800176, 0x05600e50, + 0x050f80ff, 0x032fa009, 0x03460000, 0x018004d2, + 0x0246007a, 0x0045207a, 0x008004d0, 0x0246007a, + 0x0600007a, 0x04600e79, 0x050f80ff, 0x032fa00a, + 0x07c00000, 0x029284d5, 0x070500e1, 0x07c00000, + 0x0245f008, 0x048404d9, 0x020e0008, 0x07c00000, + 0x070ff009, 0x065a0008, 0x058404de, 0x020e0008, + 0x07c00000, 0x058404e1, 0x020e0008, 0x07c00000, + 0x05308000, 0x0500d000, 0x04a004dc, 0x04a004e9, + 0x02800010, 0x052e4300, 0x072e500c, 0x073c3fff, + 0x0700000f, 0x07c00000, 0x06602208, 0x050f80ff, + 0x032fa011, 0x076a0000, 0x068184f7, 0x066a0001, + 0x048104f7, 0x04002051, 0x07c00000, 0x00202001, + 0x07c00000, 0x0648307a, 0x01a18606, 0x05a004cc, + 0x05308000, 0x05001000, 0x06009079, 0x04a004dc, + 0x0280055e, 0x0249c0e6, 0x058104f9, 0x0280036d, + 0x0648307a, 0x07818196, 0x05a004cf, 0x02209504, + 0x018004e4, 0x02490075, 0x06810519, 0x04002089, + 0x04780102, 0x07f00000, 0x05001088, 0x06a0056d, + 0x04740101, 0x03100000, 0x060ff002, 0x045c0401, + 0x0481851a, 0x00088001, 0x033e6000, 0x070000c0, + 0x0380055a, 0x07f00000, 0x0220951a, 0x018004e4, + 0x040fd075, 0x040fd07a, 0x040fd079, 0x0648307a, + 0x06810525, 0x06780075, 0x06000007, 0x0481852c, + 0x07a00606, 0x06486075, 0x06818194, 0x02490075, + 0x0781819a, 0x04487075, 0x04818534, 0x0280053b, + 0x05308000, 0x03010000, 0x06009079, 0x04a004dc, + 0x02800010, 0x0448e0e6, 0x04818352, 0x00800192, + 0x05308000, 0x0500e000, 0x06009079, 0x04a004dc, + 0x04008089, 0x05a004e1, 0x0380055a, 0x05a004cc, + 0x05308000, 0x0700f000, 0x06009079, 0x07000088, + 0x06a00543, 0x04a004dc, 0x02800010, 0x03386000, + 0x07030000, 0x07f00000, 0x068d0546, 0x033e6a00, + 0x0202000e, 0x02079051, 0x0448b075, 0x06810551, + 0x02493075, 0x06810551, 0x05301005, 0x03010000, + 0x03800553, 0x05301006, 0x03010000, 0x05002087, + 0x06485002, 0x05818553, 0x0744c000, 0x01088000, + 0x02086001, 0x07c00000, 0x05001088, 0x06a0056d, + 0x0644c001, 0x00088001, 0x033e6a00, 0x0202000e, + 0x004920e6, 0x05818563, 0x02079051, 0x078d0563, + 0x060ff089, 0x034990ff, 0x0781056a, 0x03386005, + 0x03010000, 0x02800010, 0x03386006, 0x03010000, + 0x02800010, 0x068d056d, 0x03386000, 0x07030000, + 0x07f00000, 0x078d0571, 0x070ff087, 0x074850ff, + 0x05818572, 0x07c00000, 0x068d0576, 0x02386001, + 0x07030000, 0x07f00000, 0x068d057a, 0x070ff087, + 0x074850ff, 0x0581857b, 0x07c00000, 0x05002087, + 0x0049d002, 0x0581858e, 0x002fb008, 0x067800e6, + 0x07000041, 0x002fb008, 0x0581858e, 0x06a005a4, + 0x0448e002, 0x06810591, 0x0648a002, 0x0481859b, + 0x06486002, 0x07810595, 0x02400057, 0x056a02ff, + 0x07c00000, 0x06a005a4, 0x06788102, 0x06000004, + 0x0581858e, 0x04002089, 0x070ff0d4, 0x045c0402, + 0x077800ff, 0x07f00000, 0x0581858e, 0x00202010, + 0x038c058e, 0x07f00000, 0x06420002, 0x0581859c, + 0x06a00576, 0x033e6a00, 0x0302000a, 0x07c00000, + 0x07f00000, 0x060ff0a2, 0x050020ff, 0x060ff0a2, + 0x045c0402, 0x058185a5, 0x07c00000, 0x05a00218, + 0x03495047, 0x068105b0, 0x0320901d, 0x02800602, + 0x0220901f, 0x02800602, 0x014980e4, 0x04818010, + 0x013e4000, 0x07003000, 0x05600e35, 0x050f80ff, + 0x07a006fa, 0x01208003, 0x05a004e1, 0x038005ca, + 0x03209009, 0x02800602, 0x03209011, 0x02800602, + 0x02209007, 0x02800602, 0x03209003, 0x02800602, + 0x00498043, 0x048185bc, 0x00497043, 0x058185c0, + 0x02209001, 0x02800602, 0x0220900d, 0x02800602, + 0x0320900f, 0x02800602, 0x03493000, 0x068105d3, + 0x027c0045, 0x070a0000, 0x068105dc, 0x0220900b, + 0x02800602, 0x02209013, 0x05308000, 0x01012000, + 0x04a004dc, 0x00800183, 0x03209005, 0x02800602, + 0x072e500c, 0x00208002, 0x05a004e1, 0x02800010, + 0x02209015, 0x02800602, 0x072d6000, 0x05308000, + 0x05007000, 0x07f00000, 0x070090d1, 0x0379ff09, + 0x0700ffff, 0x04a004dc, 0x03209017, 0x02800602, + 0x033e5000, 0x06000080, 0x02209019, 0x02800602, + 0x072d6000, 0x033e5000, 0x06000080, 0x07f00000, + 0x060ff0d0, 0x0179feff, 0x0700ffff, 0x057dfeff, + 0x0700ffff, 0x04818010, 0x02400058, 0x00642058, + 0x06820010, 0x033e5000, 0x06000080, 0x04058051, + 0x0320901b, 0x02800602, 0x05308000, 0x01012000, + 0x04a004dc, 0x00800176, 0x05a00218, 0x05308000, + 0x05008000, 0x06009079, 0x04a004dc, 0x07c00000, + 0x034900e4, 0x04818616, 0x013e4000, 0x070000c0, + 0x07f00000, 0x034900e4, 0x05818614, 0x07c00000, + 0x013e4000, 0x06000080, 0x07f00000, 0x07f00000, + 0x07f00000, 0x034900e4, 0x0681060e, 0x02800616, + 0x072d6000, 0x00498043, 0x07810630, 0x060ff0d0, + 0x0179feff, 0x0700ffff, 0x057dfeff, 0x0700ffff, + 0x048185e0, 0x050f8030, 0x032fa009, 0x0379ff00, + 0x0700ffff, 0x070ff0d1, 0x0179feff, 0x0700ffff, + 0x055c0400, 0x068105e0, 0x04004051, 0x03800678, + 0x06a006da, 0x062d6001, 0x020ef004, 0x038605e2, + 0x06600004, 0x050f80ff, 0x032fa009, 0x074b0000, + 0x05002000, 0x0769ff00, 0x01640800, 0x078205e2, + 0x01640e00, 0x058285e2, 0x070ff036, 0x045c0404, + 0x0581864b, 0x072d6000, 0x050f8030, 0x032fa009, + 0x0379ff00, 0x0700ffff, 0x070ff0d1, 0x0179feff, + 0x0700ffff, 0x055c0400, 0x068105e0, 0x04482034, + 0x068105fd, 0x06483034, 0x048185fd, 0x070ff0d4, + 0x077800ff, 0x070000f0, 0x037c00ff, 0x06000010, + 0x07810678, 0x07a006d4, 0x024900e5, 0x0681065b, + 0x033e5000, 0x06000080, 0x02800010, 0x04601c04, + 0x050f80ff, 0x053fa809, 0x06000020, 0x030ef041, + 0x028605ec, 0x062d6002, 0x05602a41, 0x050f80ff, + 0x012fa809, 0x060ff0d0, 0x074b00ff, 0x045c0401, + 0x04818676, 0x062d6001, 0x07602841, 0x050f80ff, + 0x053fa809, 0x06000001, 0x070ff0d1, 0x054b80ff, + 0x074b0003, 0x055c0403, 0x04818676, 0x033e5000, + 0x06000080, 0x0180070c, 0x07600041, 0x0380065c, + 0x07a006d4, 0x024900e5, 0x0781067e, 0x033e5000, + 0x06000080, 0x02800010, 0x07a006c0, 0x030ef041, + 0x038605f0, 0x04058051, 0x072d6000, 0x05601041, + 0x050f80ff, 0x012fa809, 0x0600a0d0, 0x0500b0d1, + 0x062d6001, 0x07f00000, 0x07f00000, 0x0600c0d0, + 0x0500d0d1, 0x062d6002, 0x0279ff0d, 0x07ff0000, + 0x044d800d, 0x060ff0d0, 0x074b00ff, 0x065a000d, + 0x06601201, 0x050f80ff, 0x073fa022, 0x07000005, + 0x0079fe0d, 0x070000ff, 0x050020ff, 0x05602a41, + 0x050f80ff, 0x073fa00a, 0x06000001, 0x020ef004, + 0x038606bd, 0x04601c04, 0x050f80ff, 0x053fa809, + 0x06000001, 0x050f80ff, 0x053fa80a, 0x06000020, + 0x07602841, 0x050f80ff, 0x073fa009, 0x06000001, + 0x0279ff02, 0x070000ff, 0x0678000d, 0x0700ff00, + 0x065a0002, 0x07602841, 0x050f80ff, 0x073fa00a, + 0x06000001, 0x07600041, 0x050f80ff, 0x053fa80a, + 0x06000001, 0x07601241, 0x050f80ff, 0x073fa00a, + 0x06000002, 0x033e5000, 0x06000080, 0x0180070c, + 0x040f8032, 0x073fa011, 0x06000001, 0x060ff002, + 0x055c0403, 0x048186c8, 0x00041051, 0x07c00000, + 0x04600402, 0x04500432, 0x050f80ff, 0x053fa809, + 0x06000020, 0x00400402, 0x01680eff, 0x070030ff, + 0x040f8032, 0x053fa80a, 0x06000001, 0x07c00000, + 0x024900e5, 0x078106d7, 0x07c00000, 0x033e5000, + 0x070000c0, 0x07c00000, 0x05004036, 0x060000d0, + 0x0179fe00, 0x0700ffff, 0x057dfeff, 0x0700ffff, + 0x078106f9, 0x070000d1, 0x0379ff00, 0x0700ffff, + 0x06005051, 0x060ff031, 0x05500405, 0x050f80ff, + 0x073fa009, 0x06000002, 0x020ef004, 0x038606f3, + 0x04600404, 0x050f80ff, 0x012fa809, 0x0079fe01, + 0x0700ffff, 0x055c0400, 0x078106f9, 0x01400405, + 0x070050ff, 0x057de0ff, 0x06000007, 0x048186e5, + 0x04004051, 0x07c00000, 0x072d6000, 0x07f00000, + 0x07f00000, 0x000110d0, 0x010120d1, 0x062d6001, + 0x07f00000, 0x07f00000, 0x020130d0, 0x010140d1, + 0x062d6002, 0x010170d4, 0x07f00000, 0x020150d0, + 0x030160d1, 0x053fa83a, 0x06000008, 0x07c00000, + 0x07600c41, 0x050f80ff, 0x073fa009, 0x06000001, + 0x04780102, 0x07ffff00, 0x046a0702, 0x050f80ff, + 0x073fa00a, 0x06000001, 0x05600e41, 0x050f80ff, + 0x032fa069, 0x03800053, 0xdb4ee9e2, 0x02800004, + 0x00000000, 0x00008000, 0x00000542, 0x040f801f, + 0x012fa8c9, 0x040f801f, 0x073fa081, 0x06000010, + 0x03200005, 0x07420000, 0x050fb000, 0x040f801f, + 0x073fa011, 0x06000038, 0x040f801f, 0x053fa859, + 0x0700003a, 0x050fe000, 0x0581800a, 0x0784003c, + 0x04958019, 0x030e0011, 0x072e4200, 0x03800014, + 0x0291001f, 0x050010c0, 0x04482001, 0x058180fa, + 0x06483001, 0x0681815d, 0x02920029, 0x068b0029, + 0x008a0162, 0x050010c0, 0x06780001, 0x050007c0, + 0x06818240, 0x06780001, 0x0500f800, 0x06818280, + 0x03910030, 0x040fe029, 0x03860030, 0x076c001d, + 0x058102b1, 0x076c0a1d, 0x048102da, 0x029200ab, + 0x040fe02f, 0x0386003c, 0x06000013, 0x050fb000, + 0x066c0073, 0x068103ec, 0x014920e4, 0x0581803c, + 0x03400000, 0x076c0a00, 0x04818034, 0x0696003e, + 0x03b900ca, 0x05908014, 0x010170e1, 0x07780017, + 0x03e00000, 0x06810091, 0x050010ff, 0x0179fe17, + 0x031fffff, 0x070000ff, 0x05600800, 0x050f80ff, + 0x073fa009, 0x06000001, 0x06780002, 0x02800040, + 0x037c00ff, 0x03800000, 0x0681005d, 0x0249f002, + 0x078100aa, 0x0448e002, 0x0681005d, 0x07600c00, + 0x050f80ff, 0x073fa009, 0x06000001, 0x06780002, + 0x07ffff00, 0x037c00ff, 0x05000200, 0x058180aa, + 0x064bd401, 0x03d0005f, 0x028000a8, 0x02800067, + 0x03800071, 0x0380007b, 0x02800085, 0x0280008f, + 0x028000a8, 0x028000a8, 0x050fe027, 0x0086806b, + 0x01028000, 0x0280006e, 0x07600027, 0x050f80ff, + 0x032fa00a, 0x01027000, 0x02400029, 0x038000aa, + 0x040fe025, 0x00868075, 0x03026000, 0x03800078, + 0x06600025, 0x050f80ff, 0x032fa00a, 0x03025000, + 0x02400029, 0x038000aa, 0x050fe021, 0x0086807f, + 0x01022000, 0x03800082, 0x07600021, 0x050f80ff, + 0x032fa00a, 0x01021000, 0x02400029, 0x038000aa, + 0x040fe023, 0x00868089, 0x01024000, 0x0280008c, + 0x06600023, 0x050f80ff, 0x032fa00a, 0x03023000, + 0x02400029, 0x038000aa, 0x06a000da, 0x038000aa, + 0x01640817, 0x048280a8, 0x070ff017, 0x03d00095, + 0x0280009d, 0x0380009f, 0x028000a2, 0x038000a5, + 0x028000a8, 0x028000a8, 0x028000a8, 0x028000a8, + 0x03e00000, 0x03800014, 0x0590809f, 0x030160e1, + 0x038000aa, 0x049080a2, 0x030150e1, 0x038000aa, + 0x059080a5, 0x010140e1, 0x038000aa, 0x060fc013, + 0x07a0053a, 0x03800014, 0x014940e4, 0x00a180ae, + 0x0380003c, 0x02681e0d, 0x050fb0ff, 0x04600876, + 0x050f80ff, 0x053fa809, 0x06000001, 0x05488003, + 0x058180bd, 0x0400800d, 0x0120d000, 0x013e4000, + 0x05000200, 0x06009076, 0x04002075, 0x06a00526, + 0x07c00000, 0x072e4800, 0x07000012, 0x028000cd, + 0x0747f000, 0x05600800, 0x050f80ff, 0x012fa809, + 0x0249f001, 0x068100cd, 0x01012000, 0x052e4c00, + 0x07c00000, 0x070000eb, 0x0349f000, 0x048180c1, + 0x05600800, 0x050f80ff, 0x012fa809, 0x0448e001, + 0x068100d3, 0x07c00000, 0x0079c101, 0x07ffffff, + 0x027a4b01, 0x03800000, 0x05600800, 0x050f80ff, + 0x012fa80a, 0x07600c00, 0x050f80ff, 0x012fa821, + 0x06780001, 0x07ffff00, 0x037c00ff, 0x05000700, + 0x068100ef, 0x06601804, 0x070030ff, 0x050f80ff, + 0x012fa809, 0x05002000, 0x050f8003, 0x073fa00a, + 0x06000001, 0x040fe001, 0x038600f0, 0x04600201, + 0x050f80ff, 0x032fa00a, 0x07c00000, 0x050fe02e, + 0x018680f5, 0x0102e000, 0x0302f000, 0x038000f9, + 0x0760002e, 0x050f80ff, 0x032fa00a, 0x0102e000, + 0x07c00000, 0x022c0004, 0x056c041d, 0x0481010e, + 0x056c021d, 0x04810125, 0x056c081d, 0x04810137, + 0x076c061d, 0x04810151, 0x0521d000, 0x0202c013, + 0x0202a013, 0x02020013, 0x0460021a, 0x050f80ff, + 0x053fa80a, 0x07000009, 0x03b600be, 0x0484801f, + 0x0380003c, 0x040fe02a, 0x00860104, 0x06000013, + 0x04001013, 0x0560102b, 0x050f80ff, 0x032fa012, + 0x06420029, 0x0660002a, 0x050f80ff, 0x053fa809, + 0x06000001, 0x050fe003, 0x01860122, 0x01028003, + 0x0660002a, 0x050f80ff, 0x053fa80a, 0x07000009, + 0x00800152, 0x00028013, 0x00027013, 0x00800152, + 0x040fe02a, 0x01860103, 0x06420029, 0x0660002a, + 0x050f80ff, 0x053fa809, 0x06000001, 0x050fe003, + 0x00860134, 0x03026003, 0x0660002a, 0x050f80ff, + 0x053fa80a, 0x07000009, 0x00800152, 0x02026013, + 0x02025013, 0x00800152, 0x040fe02a, 0x01860103, + 0x06420029, 0x0660002a, 0x050f80ff, 0x053fa809, + 0x06000001, 0x050fe003, 0x00860146, 0x01022003, + 0x0660002a, 0x050f80ff, 0x053fa80a, 0x07000009, + 0x01800148, 0x00022013, 0x00021013, 0x0647f020, + 0x007a0120, 0x04000101, 0x04a002a2, 0x0400802a, + 0x06a0051f, 0x03948103, 0x0521d005, 0x00800104, + 0x0180010c, 0x0647f020, 0x06486020, 0x06818157, + 0x04a002a2, 0x01800103, 0x007a0120, 0x04000101, + 0x04a002a2, 0x0400802a, 0x06a0051f, 0x01800103, + 0x040fd02a, 0x052e4003, 0x00208010, 0x06a0051f, + 0x0180010c, 0x00018098, 0x07480018, 0x06818173, + 0x05481018, 0x07818171, 0x05482018, 0x0781816f, + 0x07483018, 0x0681816d, 0x002fb004, 0x01800174, + 0x012fb003, 0x01800174, 0x002fb002, 0x01800174, + 0x002fb001, 0x01800174, 0x012fb000, 0x0179fe78, + 0x070000ff, 0x030190ff, 0x00017086, 0x058b0178, + 0x03385000, 0x03020000, 0x07780017, 0x00430407, + 0x07818200, 0x046c0419, 0x058101b4, 0x046c0219, + 0x05810184, 0x07219000, 0x00800198, 0x07219000, + 0x07483017, 0x0481019e, 0x05482017, 0x058101a5, + 0x0448b075, 0x06818198, 0x06601476, 0x050f80ff, + 0x073fa022, 0x0600003e, 0x06000080, 0x05001081, + 0x05002082, 0x06003083, 0x05004084, 0x04601c76, + 0x050f80ff, 0x022fa02a, 0x07219000, 0x07780078, + 0x07ffff00, 0x045a0419, 0x010780ff, 0x0484801f, + 0x0380003c, 0x040fe07f, 0x008601ad, 0x04a001cd, + 0x00920198, 0x040fe07f, 0x06a681cd, 0x00800198, + 0x0560107b, 0x050f80ff, 0x032fa009, 0x0744f000, + 0x0560107b, 0x050f80ff, 0x032fa00a, 0x0180018b, + 0x052e400c, 0x040080fb, 0x046aa108, 0x06009076, + 0x04002075, 0x06a00526, 0x00800198, 0x06219001, + 0x05482017, 0x048101c1, 0x058b01b7, 0x060ff086, + 0x0349f0ff, 0x07818177, 0x07483017, 0x058101be, + 0x050fd0ff, 0x040fe07f, 0x06a681cd, 0x00800198, + 0x05004084, 0x05a00222, 0x00920198, 0x070ff07d, + 0x0450047c, 0x056004ff, 0x050f80ff, 0x032fa009, + 0x070ff000, 0x00540479, 0x030790ff, 0x018001a5, + 0x060ff079, 0x0054047a, 0x058201f9, 0x058101f9, + 0x070ff07d, 0x0450047c, 0x050f80ff, 0x002fa819, + 0x048b01d5, 0x02080001, 0x00081002, 0x01082003, + 0x048b01d9, 0x03385000, 0x03010000, 0x02400019, + 0x070ff003, 0x04500479, 0x030790ff, 0x0340007e, + 0x0642007f, 0x058101f9, 0x070ff07e, 0x050f80ff, + 0x032fa009, 0x050fe000, 0x028681f8, 0x070ff07d, + 0x056002ff, 0x050f80ff, 0x032fa009, 0x0107d000, + 0x018601fa, 0x0560087d, 0x050f80ff, 0x032fa009, + 0x03681e00, 0x0550041b, 0x050f80ff, 0x032fa009, + 0x0107e000, 0x070ff07e, 0x018001e4, 0x0307c000, + 0x07c00000, 0x052e400c, 0x040080fb, 0x046aa108, + 0x06009076, 0x04002075, 0x02800526, 0x040fd076, + 0x050fd017, 0x060ff086, 0x077800ff, 0x07000060, + 0x037c00ff, 0x07000060, 0x06818202, 0x07780078, + 0x07ffff00, 0x045a0419, 0x010780ff, 0x06601476, + 0x050f80ff, 0x073fa022, 0x0600003e, 0x052e400c, + 0x04600876, 0x050f80ff, 0x053fa809, 0x06000001, + 0x05488003, 0x0481021c, 0x0400d0fb, 0x066a810d, + 0x013e4000, 0x07000300, 0x02800029, 0x040080fb, + 0x066a8108, 0x06009076, 0x04002075, 0x06a00526, + 0x02800029, 0x0240007f, 0x0742007e, 0x050f807e, + 0x032fa009, 0x050fe000, 0x0386823c, 0x070ff07d, + 0x055c047b, 0x04810231, 0x0760007d, 0x050f80ff, + 0x032fa009, 0x050fe000, 0x02868231, 0x070ff07b, + 0x0107d0ff, 0x0560087d, 0x050f80ff, 0x032fa009, + 0x03681e00, 0x0450041c, 0x0107e0ff, 0x050f80ff, + 0x032fa009, 0x050fe000, 0x0086023e, 0x0307c000, + 0x07c00000, 0x040fd076, 0x0380053a, 0x010180c0, + 0x0548e018, 0x07818259, 0x0748f018, 0x07818255, + 0x03490018, 0x06818251, 0x01491018, 0x0781824d, + 0x073c0000, 0x06000040, 0x02200004, 0x0180025c, + 0x073c0000, 0x06000020, 0x03200003, 0x0180025c, + 0x073c0000, 0x06000010, 0x02200002, 0x0180025c, + 0x073c0000, 0x06000008, 0x02200001, 0x0180025c, + 0x073c0000, 0x06000004, 0x06000013, 0x050fb000, + 0x040fe076, 0x00860275, 0x046c0273, 0x04810285, + 0x066c0073, 0x05810266, 0x040fd076, 0x07a0053a, + 0x03800014, 0x040fd076, 0x01800269, 0x00452075, + 0x00077013, 0x0647f075, 0x06486075, 0x0781826f, + 0x04a002a8, 0x00800275, 0x007a0175, 0x04000101, + 0x04a002a8, 0x04008076, 0x0245f008, 0x06a0051f, + 0x07273000, 0x05600272, 0x050f80ff, 0x053fa80a, + 0x07000009, 0x0379ff78, 0x070000ff, 0x02076013, + 0x02075013, 0x0484801f, 0x0380003c, 0x070fc0ff, + 0x052e400c, 0x00208020, 0x06a0051f, 0x0180027e, + 0x04600276, 0x050010ff, 0x040f8001, 0x032fa009, + 0x040f8001, 0x053fa80a, 0x07000009, 0x070ff000, + 0x02868297, 0x06601276, 0x050f80ff, 0x073fa009, + 0x0700000c, 0x07601818, 0x050f80ff, 0x053fa80a, + 0x07000009, 0x00800298, 0x07a000f0, 0x0448b075, + 0x04810268, 0x06000013, 0x04001013, 0x0560107b, + 0x050f80ff, 0x032fa012, 0x0046b075, 0x03b600be, + 0x01800269, 0x06000020, 0x04001016, 0x0460082a, + 0x050f80ff, 0x032fa012, 0x07c00000, 0x06000075, + 0x040010a2, 0x044b0801, 0x060ff016, 0x065a0001, + 0x04600876, 0x050f80ff, 0x032fa012, 0x07c00000, + 0x050fe022, 0x008602bc, 0x0421d004, 0x0302a022, + 0x04a002e9, 0x04488020, 0x048102ce, 0x040fd02a, + 0x0521d000, 0x0202a013, 0x02020013, 0x040fe026, + 0x018602d4, 0x0421d001, 0x0202a026, 0x04a002e9, + 0x0202c013, 0x00683e20, 0x070060ff, 0x056c0206, + 0x0681031c, 0x056c0406, 0x06810332, 0x076c0606, + 0x078103a3, 0x04488020, 0x068182d0, 0x056c1606, + 0x078103b1, 0x06a00516, 0x018002e2, 0x040fd02a, + 0x0521d000, 0x0202a013, 0x02020013, 0x050fe028, + 0x018602e2, 0x0302a028, 0x0421d002, 0x04a002e9, + 0x018002f0, 0x050fe022, 0x018602e2, 0x0421d004, + 0x0302a022, 0x04a002e9, 0x04488020, 0x078182e4, + 0x06a00516, 0x05848030, 0x0380003c, 0x040fd02a, + 0x0521d000, 0x0202a013, 0x02020013, 0x018002e2, + 0x0460082a, 0x050f80ff, 0x022fa031, 0x03020000, + 0x0002b004, 0x01018005, 0x07c00000, 0x0400702a, + 0x07a003e4, 0x007a0101, 0x07060000, 0x07303000, + 0x07008290, 0x07600018, 0x050f80ff, 0x053fa809, + 0x07000003, 0x0448e007, 0x068182fe, 0x06006013, + 0x03800305, 0x02400010, 0x048102fe, 0x06006010, + 0x0460322a, 0x050f80ff, 0x073fa00a, 0x07000003, + 0x050f801e, 0x032fa03a, 0x063aa020, 0x06000002, + 0x013e4000, 0x07000030, 0x0298030b, 0x070ff0f6, + 0x036830ff, 0x0581830c, 0x070f001e, 0x0560102b, + 0x050f10ff, 0x063f3c08, 0x0600000d, 0x013e4000, + 0x06000020, 0x040f801a, 0x0320000a, 0x022017d0, + 0x032fa012, 0x0202c013, 0x018002e2, 0x04007013, + 0x07a003e4, 0x007a0101, 0x07050000, 0x07303000, + 0x07008890, 0x074d0005, 0x06006013, 0x050f801e, + 0x032fa03a, 0x05601a2b, 0x050f80ff, 0x022fa019, + 0x04001002, 0x04002013, 0x040f801f, 0x022fa01a, + 0x073aa00c, 0x06000002, 0x07300c03, 0x0600000d, + 0x038003d1, 0x04007013, 0x07a003e4, 0x007a0101, + 0x03070000, 0x0660282a, 0x050f80ff, 0x073fa009, + 0x06000004, 0x02499008, 0x0781033f, 0x07303000, + 0x07008890, 0x03800341, 0x07303000, 0x04008980, + 0x05007003, 0x074d0005, 0x06006013, 0x050f801e, + 0x032fa03a, 0x0760142b, 0x050f80ff, 0x032fa021, + 0x064b0002, 0x02499008, 0x0781034d, 0x0644c002, + 0x054b0400, 0x050040ff, 0x06698104, 0x04818362, + 0x06000013, 0x04001013, 0x04780102, 0x06000010, + 0x06003013, 0x04004013, 0x06005013, 0x06006013, + 0x04007013, 0x00644015, 0x0682035e, 0x04448002, + 0x02205008, 0x040f801f, 0x032fa042, 0x04008015, + 0x0280039b, 0x046c8004, 0x04818370, 0x01208018, + 0x06780002, 0x07000003, 0x04818373, 0x06003001, + 0x06000013, 0x04001013, 0x04004013, 0x06005013, + 0x040f801f, 0x022fa032, 0x0280039b, 0x040fd02a, + 0x07a0053a, 0x03800014, 0x0379ff03, 0x070000ff, + 0x04488002, 0x0681037a, 0x070ff003, 0x04500408, + 0x050080ff, 0x0379ff00, 0x070000ff, 0x06489002, + 0x07810381, 0x070ff000, 0x04500408, 0x050080ff, + 0x07005003, 0x05004000, 0x06003001, 0x06000013, + 0x04001013, 0x040f801f, 0x022fa032, 0x05601c2b, + 0x050f80ff, 0x022fa031, 0x06600c1f, 0x050f80ff, + 0x022fa032, 0x02680608, 0x0681039b, 0x016408ff, + 0x057dfeff, 0x07ffffff, 0x034000ff, 0x045a0407, + 0x070000ff, 0x0760061e, 0x050f80ff, 0x032fa00a, + 0x06600908, 0x0669f908, 0x027a0008, 0x06000020, + 0x070aa0ff, 0x014a20ff, 0x037a00ff, 0x060000dc, + 0x070000ff, 0x038003d1, 0x04007013, 0x07a003e4, + 0x007a0101, 0x07030000, 0x07303000, 0x07008190, + 0x06006013, 0x050f801e, 0x032fa03a, 0x073aa000, + 0x06000002, 0x07300c00, 0x07000005, 0x038003d1, + 0x04007013, 0x07a003e4, 0x007a0101, 0x07810000, + 0x07303000, 0x07000090, 0x06006013, 0x06600c2a, + 0x050f80ff, 0x053fa809, 0x07000003, 0x04780107, + 0x07ffff00, 0x007c0107, 0x07000500, 0x048183c4, + 0x07303000, 0x05000890, 0x074d0005, 0x0660282a, + 0x050f80ff, 0x053fa809, 0x07000003, 0x0049d007, + 0x068103cb, 0x02206001, 0x050f801e, 0x032fa03a, + 0x073aa000, 0x06000002, 0x07300c00, 0x07000005, + 0x013e4000, 0x07000030, 0x029803d3, 0x070ff0f6, + 0x036830ff, 0x058183d4, 0x070f001e, 0x040f101f, + 0x070f3000, 0x013e4000, 0x06000020, 0x040f801a, + 0x0320000a, 0x022017d0, 0x032fa012, 0x018002e2, + 0x03200000, 0x06006076, 0x028003e6, 0x03200011, + 0x0600602a, 0x04a0046b, 0x05600406, 0x050f80ff, + 0x053fa809, 0x06000002, 0x07c00000, 0x0207602f, + 0x04600876, 0x050f80ff, 0x022fa031, 0x03075000, + 0x0007b004, 0x01018005, 0x06600076, 0x050020ff, + 0x050f80ff, 0x012fa809, 0x0202f001, 0x018683fa, + 0x0002e013, 0x040f8002, 0x053fa80a, 0x07000009, + 0x06273001, 0x0448b075, 0x06818404, 0x04602076, + 0x050f80ff, 0x053fa811, 0x0700003c, 0x0179fe78, + 0x070000ff, 0x030190ff, 0x0386840c, 0x04a00420, + 0x00078019, 0x0092041f, 0x00800464, 0x040fd076, + 0x040fd019, 0x04600276, 0x050020ff, 0x050f80ff, + 0x032fa009, 0x040f8002, 0x053fa80a, 0x07000009, + 0x050fe000, 0x0286841c, 0x07601818, 0x050f80ff, + 0x053fa80a, 0x07000009, 0x0180041d, 0x07a000f0, + 0x07273000, 0x02076013, 0x0380003c, 0x048b0420, + 0x03385000, 0x07030000, 0x05600818, 0x050f80ff, + 0x032fa009, 0x054b0400, 0x0308a0ff, 0x0179fe00, + 0x070000ff, 0x010880ff, 0x0448b075, 0x0581043a, + 0x0760147b, 0x050f80ff, 0x002fa819, 0x064b0001, + 0x02080002, 0x01081003, 0x00082001, 0x02083001, + 0x02079001, 0x0207a001, 0x00084013, 0x0207f013, + 0x0180045c, 0x06485075, 0x04810452, 0x02465075, + 0x06601476, 0x050f80ff, 0x073fa021, 0x0600003e, + 0x070ff07d, 0x0450047c, 0x050f80ff, 0x002fa819, + 0x048b0445, 0x02080001, 0x00081002, 0x01082003, + 0x03079003, 0x0208307a, 0x0340007e, 0x0642007f, + 0x04810457, 0x070ff07e, 0x05a001e4, 0x02928457, + 0x01800463, 0x048b0452, 0x06601476, 0x050f80ff, + 0x073fa041, 0x0600003e, 0x06602476, 0x050f80ff, + 0x073fa009, 0x06000007, 0x0008400e, 0x058b045c, + 0x03385000, 0x03010000, 0x06219001, 0x040fe07f, + 0x01860463, 0x008001cd, 0x07c00000, 0x00683e75, + 0x05810469, 0x0448d075, 0x0481048f, 0x018004bd, + 0x06a0051a, 0x0080041f, 0x02978476, 0x07602418, + 0x050f80ff, 0x012fa809, 0x06780001, 0x070000ff, + 0x075a0000, 0x070ff014, 0x0569feff, 0x054b08ff, + 0x075a0000, 0x05600418, 0x050f80ff, 0x012fa809, + 0x040fe007, 0x0386847d, 0x01204000, 0x0180048b, + 0x00700101, 0x03010000, 0x06780001, 0x07ff0000, + 0x076c00ff, 0x06818485, 0x00700101, 0x03010000, + 0x05600418, 0x050f80ff, 0x012fa80a, 0x06780001, + 0x07ff0000, 0x050040ff, 0x0279ff01, 0x0700ffff, + 0x05002014, 0x07c00000, 0x04007076, 0x0448b075, + 0x058104a9, 0x03200011, 0x06006076, 0x06a003e6, + 0x007a0101, 0x07060000, 0x07303000, 0x07008290, + 0x07600018, 0x050f80ff, 0x053fa809, 0x07000003, + 0x0448e007, 0x068184a1, 0x06006013, 0x018004b8, + 0x02400010, 0x048104a1, 0x06006010, 0x04603276, + 0x050f80ff, 0x073fa00a, 0x07000003, 0x018004b8, + 0x04602a76, 0x050f80ff, 0x032fa009, 0x060ff07a, + 0x05500400, 0x070000ff, 0x04602a76, 0x050f80ff, + 0x032fa00a, 0x07a003e1, 0x007a0101, 0x03010000, + 0x06303008, 0x05008000, 0x0600600e, 0x050f8074, + 0x032fa03a, 0x053079a0, 0x0700000c, 0x008004fd, + 0x00683e75, 0x076c0aff, 0x048104dc, 0x04007013, + 0x03200011, 0x06006076, 0x06a003e6, 0x007a0101, + 0x03070000, 0x06602876, 0x050f80ff, 0x053fa809, + 0x06000001, 0x03499003, 0x058104d1, 0x07303000, + 0x07008890, 0x053079a0, 0x0700000c, 0x008004d5, + 0x07303000, 0x04008980, 0x04307920, 0x0700000c, + 0x074d0005, 0x06006013, 0x050f8074, 0x032fa03a, + 0x04307920, 0x0700000c, 0x008004fd, 0x04602a76, + 0x050f80ff, 0x032fa009, 0x060ff07a, 0x05500400, + 0x070000ff, 0x04602a76, 0x050f80ff, 0x032fa00a, + 0x04007076, 0x07a003e1, 0x007a0101, 0x03010000, + 0x06303008, 0x07008800, 0x074d0005, 0x06600a76, + 0x050f80ff, 0x073fa009, 0x07000003, 0x054b0406, + 0x045a0404, 0x050040ff, 0x0600600e, 0x050f8074, + 0x032fa03a, 0x0648c075, 0x048104fb, 0x06307d20, + 0x0700000c, 0x008004fd, 0x04307920, 0x0700000c, + 0x013e4000, 0x07000030, 0x019804ff, 0x070ff0f6, + 0x074850ff, 0x05818500, 0x050f2074, 0x060a0007, + 0x040070fb, 0x046a7007, 0x050f40ff, 0x013e4000, + 0x06000020, 0x0678007a, 0x07fff000, 0x04818510, + 0x0320000a, 0x022017d0, 0x02800513, 0x0320000a, + 0x06301b58, 0x06000001, 0x050f8072, 0x032fa012, + 0x0080041f, 0x01208060, 0x0600902a, 0x04002020, + 0x02800526, 0x040080fb, 0x066ae108, 0x06009076, + 0x04002075, 0x02800526, 0x03201100, 0x05848524, + 0x06420001, 0x04818520, 0x0280053d, 0x020e0008, + 0x07c00000, 0x050fd009, 0x040fd008, 0x03201100, + 0x0584852d, 0x06420001, 0x04818529, 0x0280053d, + 0x007a0102, 0x04000101, 0x05600809, 0x050f80ff, + 0x073fa00a, 0x06000001, 0x020e0008, 0x06840537, + 0x030e0009, 0x07c00000, 0x01011009, 0x052e4300, + 0x07c00000, 0x052e400f, 0x01208090, 0x0280051f, + 0x070fc0ff, 0x040f8013, 0x032fa009, 0x02800540, + 0x6321d92e, 0xffef19a2 }; + +#ifdef UNIQUE_FW_NAME +uint32_t fw2400_length02 = 0x0000165e ; +#else +uint32_t risc_code_length02 = 0x0000165e ; +#endif + diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 87f90c4f0..fee0c4937 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -16,16 +16,15 @@ qla2x00_sysfs_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, { struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, struct device, kobj))); - char *rbuf = (char *)ha->fw_dump; if (ha->fw_dump_reading == 0) return 0; - if (off > ha->fw_dump_len) - return 0; - if (off + count > ha->fw_dump_len) - count = ha->fw_dump_len - off; + if (off > ha->fw_dump_buffer_len) + return 0; + if (off + count > ha->fw_dump_buffer_len) + count = ha->fw_dump_buffer_len - off; - memcpy(buf, &rbuf[off], count); + memcpy(buf, &ha->fw_dump_buffer[off], count); return (count); } @@ -37,6 +36,7 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, struct device, kobj))); int reading; + uint32_t dump_size; if (off != 0) return (0); @@ -44,27 +44,52 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, reading = simple_strtol(buf, NULL, 10); switch (reading) { case 0: - if (!ha->fw_dump_reading) - break; + if (ha->fw_dump_reading == 1) { + qla_printk(KERN_INFO, ha, + "Firmware dump cleared on (%ld).\n", + ha->host_no); - qla_printk(KERN_INFO, ha, - "Firmware dump cleared on (%ld).\n", ha->host_no); + vfree(ha->fw_dump_buffer); + if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) + free_pages((unsigned long)ha->fw_dump, + ha->fw_dump_order); - ha->fw_dump_reading = 0; - ha->fw_dumped = 0; + ha->fw_dump_reading = 0; + ha->fw_dump_buffer = NULL; + ha->fw_dump = NULL; + ha->fw_dumped = 0; + } break; case 1: - if (ha->fw_dumped && !ha->fw_dump_reading) { + if ((ha->fw_dump || ha->fw_dumped) && !ha->fw_dump_reading) { ha->fw_dump_reading = 1; + if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) + dump_size = FW_DUMP_SIZE_24XX; + else { + dump_size = FW_DUMP_SIZE_1M; + if (ha->fw_memory_size < 0x20000) + dump_size = FW_DUMP_SIZE_128K; + else if (ha->fw_memory_size < 0x80000) + dump_size = FW_DUMP_SIZE_512K; + } + ha->fw_dump_buffer = (char *)vmalloc(dump_size); + if (ha->fw_dump_buffer == NULL) { + qla_printk(KERN_WARNING, ha, + "Unable to allocate memory for firmware " + "dump buffer (%d).\n", dump_size); + + ha->fw_dump_reading = 0; + return (count); + } qla_printk(KERN_INFO, ha, - "Raw firmware dump ready for read on (%ld).\n", + "Firmware dump ready for read on (%ld).\n", ha->host_no); + memset(ha->fw_dump_buffer, 0, dump_size); + ha->isp_ops.ascii_fw_dump(ha); + ha->fw_dump_buffer_len = strlen(ha->fw_dump_buffer); } break; - case 2: - qla2x00_alloc_fw_dump(ha); - break; } return (count); } @@ -294,6 +319,9 @@ qla2x00_sysfs_read_vpd(struct kobject *kobj, char *buf, loff_t off, if (!capable(CAP_SYS_ADMIN) || off != 0) return 0; + if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) + return -ENOTSUPP; + /* Read NVRAM. */ spin_lock_irqsave(&ha->hardware_lock, flags); ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->vpd_base, ha->vpd_size); @@ -313,6 +341,9 @@ qla2x00_sysfs_write_vpd(struct kobject *kobj, char *buf, loff_t off, if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size) return 0; + if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) + return -ENOTSUPP; + /* Write NVRAM. */ spin_lock_irqsave(&ha->hardware_lock, flags); ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count); @@ -332,53 +363,6 @@ static struct bin_attribute sysfs_vpd_attr = { .write = qla2x00_sysfs_write_vpd, }; -static ssize_t -qla2x00_sysfs_read_sfp(struct kobject *kobj, char *buf, loff_t off, - size_t count) -{ - struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, - struct device, kobj))); - uint16_t iter, addr, offset; - int rval; - - if (!capable(CAP_SYS_ADMIN) || off != 0 || count != SFP_DEV_SIZE * 2) - return 0; - - addr = 0xa0; - for (iter = 0, offset = 0; iter < (SFP_DEV_SIZE * 2) / SFP_BLOCK_SIZE; - iter++, offset += SFP_BLOCK_SIZE) { - if (iter == 4) { - /* Skip to next device address. */ - addr = 0xa2; - offset = 0; - } - - rval = qla2x00_read_sfp(ha, ha->sfp_data_dma, addr, offset, - SFP_BLOCK_SIZE); - if (rval != QLA_SUCCESS) { - qla_printk(KERN_WARNING, ha, - "Unable to read SFP data (%x/%x/%x).\n", rval, - addr, offset); - count = 0; - break; - } - memcpy(buf, ha->sfp_data, SFP_BLOCK_SIZE); - buf += SFP_BLOCK_SIZE; - } - - return count; -} - -static struct bin_attribute sysfs_sfp_attr = { - .attr = { - .name = "sfp", - .mode = S_IRUSR | S_IWUSR, - .owner = THIS_MODULE, - }, - .size = SFP_DEV_SIZE * 2, - .read = qla2x00_sysfs_read_sfp, -}; - void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha) { @@ -389,12 +373,7 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha) sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_attr); sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_ctl_attr); - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { - sysfs_create_bin_file(&host->shost_gendev.kobj, - &sysfs_vpd_attr); - sysfs_create_bin_file(&host->shost_gendev.kobj, - &sysfs_sfp_attr); - } + sysfs_create_bin_file(&host->shost_gendev.kobj, &sysfs_vpd_attr); } void @@ -407,12 +386,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *ha) sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_attr); sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_optrom_ctl_attr); - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { - sysfs_remove_bin_file(&host->shost_gendev.kobj, - &sysfs_vpd_attr); - sysfs_remove_bin_file(&host->shost_gendev.kobj, - &sysfs_sfp_attr); - } + sysfs_remove_bin_file(&host->shost_gendev.kobj, &sysfs_vpd_attr); if (ha->beacon_blink_led == 1) ha->isp_ops.beacon_off(ha); diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index f6ed6962b..2d9b12ffe 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -8,34 +8,7 @@ #include -static inline void -qla2xxx_prep_dump(scsi_qla_host_t *ha, struct qla2xxx_fw_dump *fw_dump) -{ - fw_dump->fw_major_version = htonl(ha->fw_major_version); - fw_dump->fw_minor_version = htonl(ha->fw_minor_version); - fw_dump->fw_subminor_version = htonl(ha->fw_subminor_version); - fw_dump->fw_attributes = htonl(ha->fw_attributes); - - fw_dump->vendor = htonl(ha->pdev->vendor); - fw_dump->device = htonl(ha->pdev->device); - fw_dump->subsystem_vendor = htonl(ha->pdev->subsystem_vendor); - fw_dump->subsystem_device = htonl(ha->pdev->subsystem_device); -} - -static inline void * -qla2xxx_copy_queues(scsi_qla_host_t *ha, void *ptr) -{ - /* Request queue. */ - memcpy(ptr, ha->request_ring, ha->request_q_length * - sizeof(request_t)); - - /* Response queue. */ - ptr += ha->request_q_length * sizeof(request_t); - memcpy(ptr, ha->response_ring, ha->response_q_length * - sizeof(response_t)); - - return ptr + (ha->response_q_length * sizeof(response_t)); -} +static int qla_uprintf(char **, char *, ...); /** * qla2300_fw_dump() - Dumps binary data from the 2300 firmware. @@ -55,7 +28,7 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) uint16_t __iomem *dmp_reg; unsigned long flags; struct qla2300_fw_dump *fw; - uint32_t data_ram_cnt; + uint32_t dump_size, data_ram_cnt; risc_address = data_ram_cnt = 0; mb0 = mb2 = 0; @@ -64,23 +37,29 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); - if (!ha->fw_dump) { + if (ha->fw_dump != NULL) { qla_printk(KERN_WARNING, ha, - "No buffer available for dump!!!\n"); + "Firmware has been previously dumped (%p) -- ignoring " + "request...\n", ha->fw_dump); goto qla2300_fw_dump_failed; } - if (ha->fw_dumped) { + /* Allocate (large) dump buffer. */ + dump_size = sizeof(struct qla2300_fw_dump); + dump_size += (ha->fw_memory_size - 0x11000) * sizeof(uint16_t); + ha->fw_dump_order = get_order(dump_size); + ha->fw_dump = (struct qla2300_fw_dump *) __get_free_pages(GFP_ATOMIC, + ha->fw_dump_order); + if (ha->fw_dump == NULL) { qla_printk(KERN_WARNING, ha, - "Firmware has been previously dumped (%p) -- ignoring " - "request...\n", ha->fw_dump); + "Unable to allocated memory for firmware dump (%d/%d).\n", + ha->fw_dump_order, dump_size); goto qla2300_fw_dump_failed; } - fw = &ha->fw_dump->isp.isp23; - qla2xxx_prep_dump(ha, ha->fw_dump); + fw = ha->fw_dump; rval = QLA_SUCCESS; - fw->hccr = htons(RD_REG_WORD(®->hccr)); + fw->hccr = RD_REG_WORD(®->hccr); /* Pause RISC. */ WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); @@ -101,86 +80,85 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (rval == QLA_SUCCESS) { dmp_reg = (uint16_t __iomem *)(reg + 0); for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) - fw->pbiu_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); for (cnt = 0; cnt < sizeof(fw->risc_host_reg) / 2; cnt++) - fw->risc_host_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_host_reg[cnt] = RD_REG_WORD(dmp_reg++); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x40); for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) - fw->mailbox_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x40); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->resp_dma_reg) / 2; cnt++) - fw->resp_dma_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->resp_dma_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x50); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) - fw->dma_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x00); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) - fw->risc_hdw_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2000); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) - fw->risc_gp0_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2200); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) - fw->risc_gp1_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2400); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) - fw->risc_gp2_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2600); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) - fw->risc_gp3_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2800); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) - fw->risc_gp4_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2A00); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) - fw->risc_gp5_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2C00); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) - fw->risc_gp6_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2E00); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) - fw->risc_gp7_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x10); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) - fw->frame_buf_hdw_reg[cnt] = - htons(RD_REG_WORD(dmp_reg++)); + fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x20); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) - fw->fpm_b0_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x30); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) - fw->fpm_b1_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); /* Reset RISC. */ WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); @@ -255,7 +233,7 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb0 & MBS_MASK; - fw->risc_ram[cnt] = htons(mb2); + fw->risc_ram[cnt] = mb2; } else { rval = QLA_FUNCTION_FAILED; } @@ -314,7 +292,7 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb0 & MBS_MASK; - fw->stack_ram[cnt] = htons(mb2); + fw->stack_ram[cnt] = mb2; } else { rval = QLA_FUNCTION_FAILED; } @@ -374,25 +352,23 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb0 & MBS_MASK; - fw->data_ram[cnt] = htons(mb2); + fw->data_ram[cnt] = mb2; } else { rval = QLA_FUNCTION_FAILED; } } - if (rval == QLA_SUCCESS) - qla2xxx_copy_queues(ha, &fw->data_ram[cnt]); if (rval != QLA_SUCCESS) { qla_printk(KERN_WARNING, ha, "Failed to dump firmware (%x)!!!\n", rval); - ha->fw_dumped = 0; + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + ha->fw_dump = NULL; } else { qla_printk(KERN_INFO, ha, "Firmware dump saved to temp buffer (%ld/%p).\n", ha->host_no, ha->fw_dump); - ha->fw_dumped = 1; } qla2300_fw_dump_failed: @@ -400,6 +376,193 @@ qla2300_fw_dump_failed: spin_unlock_irqrestore(&ha->hardware_lock, flags); } +/** + * qla2300_ascii_fw_dump() - Converts a binary firmware dump to ASCII. + * @ha: HA context + */ +void +qla2300_ascii_fw_dump(scsi_qla_host_t *ha) +{ + uint32_t cnt; + char *uiter; + char fw_info[30]; + struct qla2300_fw_dump *fw; + uint32_t data_ram_cnt; + + uiter = ha->fw_dump_buffer; + fw = ha->fw_dump; + + qla_uprintf(&uiter, "%s Firmware Version %s\n", ha->model_number, + ha->isp_ops.fw_version_str(ha, fw_info)); + + qla_uprintf(&uiter, "\n[==>BEG]\n"); + + qla_uprintf(&uiter, "HCCR Register:\n%04x\n\n", fw->hccr); + + qla_uprintf(&uiter, "PBIU Registers:"); + for (cnt = 0; cnt < sizeof (fw->pbiu_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->pbiu_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nReqQ-RspQ-Risc2Host Status registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_host_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_host_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nMailbox Registers:"); + for (cnt = 0; cnt < sizeof (fw->mailbox_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->mailbox_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nAuto Request Response DMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->resp_dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->resp_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nDMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP2 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp2_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp2_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP3 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp3_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp3_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP4 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp4_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp4_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP5 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp5_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp5_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP6 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp6_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp6_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP7 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp7_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp7_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFrame Buffer Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->frame_buf_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->frame_buf_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nCode RAM Dump:"); + for (cnt = 0; cnt < sizeof (fw->risc_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%04x: ", cnt + 0x0800); + } + qla_uprintf(&uiter, "%04x ", fw->risc_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\nStack RAM Dump:"); + for (cnt = 0; cnt < sizeof (fw->stack_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%05x: ", cnt + 0x10000); + } + qla_uprintf(&uiter, "%04x ", fw->stack_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\nData RAM Dump:"); + data_ram_cnt = ha->fw_memory_size - 0x11000 + 1; + for (cnt = 0; cnt < data_ram_cnt; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%05x: ", cnt + 0x11000); + } + qla_uprintf(&uiter, "%04x ", fw->data_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\n[<==END] ISP Debug Dump."); +} + /** * qla2100_fw_dump() - Dumps binary data from the 2100/2200 firmware. * @ha: HA context @@ -424,23 +587,27 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); - if (!ha->fw_dump) { + if (ha->fw_dump != NULL) { qla_printk(KERN_WARNING, ha, - "No buffer available for dump!!!\n"); + "Firmware has been previously dumped (%p) -- ignoring " + "request...\n", ha->fw_dump); goto qla2100_fw_dump_failed; } - if (ha->fw_dumped) { + /* Allocate (large) dump buffer. */ + ha->fw_dump_order = get_order(sizeof(struct qla2100_fw_dump)); + ha->fw_dump = (struct qla2100_fw_dump *) __get_free_pages(GFP_ATOMIC, + ha->fw_dump_order); + if (ha->fw_dump == NULL) { qla_printk(KERN_WARNING, ha, - "Firmware has been previously dumped (%p) -- ignoring " - "request...\n", ha->fw_dump); + "Unable to allocated memory for firmware dump (%d/%Zd).\n", + ha->fw_dump_order, sizeof(struct qla2100_fw_dump)); goto qla2100_fw_dump_failed; } - fw = &ha->fw_dump->isp.isp21; - qla2xxx_prep_dump(ha, ha->fw_dump); + fw = ha->fw_dump; rval = QLA_SUCCESS; - fw->hccr = htons(RD_REG_WORD(®->hccr)); + fw->hccr = RD_REG_WORD(®->hccr); /* Pause RISC. */ WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); @@ -454,81 +621,79 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (rval == QLA_SUCCESS) { dmp_reg = (uint16_t __iomem *)(reg + 0); for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) - fw->pbiu_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); for (cnt = 0; cnt < ha->mbx_count; cnt++) { if (cnt == 8) { - dmp_reg = (uint16_t __iomem *) - ((uint8_t __iomem *)reg + 0xe0); + dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xe0); } - fw->mailbox_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); } dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x20); for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) - fw->dma_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x00); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) - fw->risc_hdw_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2000); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) - fw->risc_gp0_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2100); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) - fw->risc_gp1_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2200); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) - fw->risc_gp2_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2300); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) - fw->risc_gp3_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2400); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) - fw->risc_gp4_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2500); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) - fw->risc_gp5_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2600); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) - fw->risc_gp6_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->pcr, 0x2700); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) - fw->risc_gp7_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x10); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) - fw->frame_buf_hdw_reg[cnt] = - htons(RD_REG_WORD(dmp_reg++)); + fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x20); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) - fw->fpm_b0_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); WRT_REG_WORD(®->ctrl_status, 0x30); dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) - fw->fpm_b1_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); + fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); /* Reset the ISP. */ WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); @@ -603,25 +768,22 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb0 & MBS_MASK; - fw->risc_ram[cnt] = htons(mb2); + fw->risc_ram[cnt] = mb2; } else { rval = QLA_FUNCTION_FAILED; } } - if (rval == QLA_SUCCESS) - qla2xxx_copy_queues(ha, &fw->risc_ram[cnt]); - if (rval != QLA_SUCCESS) { qla_printk(KERN_WARNING, ha, "Failed to dump firmware (%x)!!!\n", rval); - ha->fw_dumped = 0; + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + ha->fw_dump = NULL; } else { qla_printk(KERN_INFO, ha, "Firmware dump saved to temp buffer (%ld/%p).\n", ha->host_no, ha->fw_dump); - ha->fw_dumped = 1; } qla2100_fw_dump_failed: @@ -629,6 +791,179 @@ qla2100_fw_dump_failed: spin_unlock_irqrestore(&ha->hardware_lock, flags); } +/** + * qla2100_ascii_fw_dump() - Converts a binary firmware dump to ASCII. + * @ha: HA context + */ +void +qla2100_ascii_fw_dump(scsi_qla_host_t *ha) +{ + uint32_t cnt; + char *uiter; + char fw_info[30]; + struct qla2100_fw_dump *fw; + + uiter = ha->fw_dump_buffer; + fw = ha->fw_dump; + + qla_uprintf(&uiter, "%s Firmware Version %s\n", ha->model_number, + ha->isp_ops.fw_version_str(ha, fw_info)); + + qla_uprintf(&uiter, "\n[==>BEG]\n"); + + qla_uprintf(&uiter, "HCCR Register:\n%04x\n\n", fw->hccr); + + qla_uprintf(&uiter, "PBIU Registers:"); + for (cnt = 0; cnt < sizeof (fw->pbiu_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->pbiu_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nMailbox Registers:"); + for (cnt = 0; cnt < sizeof (fw->mailbox_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->mailbox_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nDMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP2 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp2_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp2_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP3 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp3_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp3_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP4 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp4_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp4_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP5 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp5_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp5_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP6 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp6_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp6_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP7 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp7_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp7_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFrame Buffer Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->frame_buf_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->frame_buf_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC SRAM:"); + for (cnt = 0; cnt < sizeof (fw->risc_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%04x: ", cnt + 0x1000); + } + qla_uprintf(&uiter, "%04x ", fw->risc_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\n[<==END] ISP Debug Dump."); + + return; +} + +static int +qla_uprintf(char **uiter, char *fmt, ...) +{ + int iter, len; + char buf[128]; + va_list args; + + va_start(args, fmt); + len = vsprintf(buf, fmt, args); + va_end(args); + + for (iter = 0; iter < len; iter++, *uiter += 1) + *uiter[0] = buf[iter]; + + return (len); +} + + void qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) { @@ -645,7 +980,6 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) unsigned long flags; struct qla24xx_fw_dump *fw; uint32_t ext_mem_cnt; - void *eft; risc_address = ext_mem_cnt = 0; memset(mb, 0, sizeof(mb)); @@ -654,7 +988,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (!hardware_locked) spin_lock_irqsave(&ha->hardware_lock, flags); - if (!ha->fw_dump) { + if (!ha->fw_dump24) { qla_printk(KERN_WARNING, ha, "No buffer available for dump!!!\n"); goto qla24xx_fw_dump_failed; @@ -663,14 +997,13 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (ha->fw_dumped) { qla_printk(KERN_WARNING, ha, "Firmware has been previously dumped (%p) -- ignoring " - "request...\n", ha->fw_dump); + "request...\n", ha->fw_dump24); goto qla24xx_fw_dump_failed; } - fw = &ha->fw_dump->isp.isp24; - qla2xxx_prep_dump(ha, ha->fw_dump); + fw = (struct qla24xx_fw_dump *) ha->fw_dump24; rval = QLA_SUCCESS; - fw->host_status = htonl(RD_REG_DWORD(®->host_status)); + fw->host_status = RD_REG_DWORD(®->host_status); /* Pause RISC. */ if ((RD_REG_DWORD(®->hccr) & HCCRX_RISC_PAUSE) == 0) { @@ -692,7 +1025,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) /* Host interface registers. */ dmp_reg = (uint32_t __iomem *)(reg + 0); for (cnt = 0; cnt < sizeof(fw->host_reg) / 4; cnt++) - fw->host_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->host_reg[cnt] = RD_REG_DWORD(dmp_reg++); /* Disable interrupts. */ WRT_REG_DWORD(®->ictrl, 0); @@ -704,471 +1037,470 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0000000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[0] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[0] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0100000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[1] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[1] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0200000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[2] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[2] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0300000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[3] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[3] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0400000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[4] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[4] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0500000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[5] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[5] = RD_REG_DWORD(dmp_reg); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0); WRT_REG_DWORD(dmp_reg, 0xB0600000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC); - fw->shadow_reg[6] = htonl(RD_REG_DWORD(dmp_reg)); + fw->shadow_reg[6] = RD_REG_DWORD(dmp_reg); /* Mailbox registers. */ mbx_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) - fw->mailbox_reg[cnt] = htons(RD_REG_WORD(mbx_reg++)); + fw->mailbox_reg[cnt] = RD_REG_WORD(mbx_reg++); /* Transfer sequence registers. */ iter_reg = fw->xseq_gp_reg; WRT_REG_DWORD(®->iobase_addr, 0xBF00); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF10); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF20); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF30); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF40); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF50); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF60); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBF70); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBFE0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->xseq_0_reg) / 4; cnt++) - fw->xseq_0_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->xseq_0_reg[cnt] = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xBFF0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->xseq_1_reg) / 4; cnt++) - fw->xseq_1_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->xseq_1_reg[cnt] = RD_REG_DWORD(dmp_reg++); /* Receive sequence registers. */ iter_reg = fw->rseq_gp_reg; WRT_REG_DWORD(®->iobase_addr, 0xFF00); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF10); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF20); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF30); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF40); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF50); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF60); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFF70); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFFD0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->rseq_0_reg) / 4; cnt++) - fw->rseq_0_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->rseq_0_reg[cnt] = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFFE0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->rseq_1_reg) / 4; cnt++) - fw->rseq_1_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->rseq_1_reg[cnt] = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0xFFF0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->rseq_2_reg) / 4; cnt++) - fw->rseq_2_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->rseq_2_reg[cnt] = RD_REG_DWORD(dmp_reg++); /* Command DMA registers. */ WRT_REG_DWORD(®->iobase_addr, 0x7100); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->cmd_dma_reg) / 4; cnt++) - fw->cmd_dma_reg[cnt] = htonl(RD_REG_DWORD(dmp_reg++)); + fw->cmd_dma_reg[cnt] = RD_REG_DWORD(dmp_reg++); /* Queues. */ iter_reg = fw->req0_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7200); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 8; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xE4); for (cnt = 0; cnt < 7; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->resp0_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7300); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 8; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xE4); for (cnt = 0; cnt < 7; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->req1_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7400); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 8; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xE4); for (cnt = 0; cnt < 7; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* Transmit DMA registers. */ iter_reg = fw->xmt0_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7600); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7610); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->xmt1_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7620); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7630); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->xmt2_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7640); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7650); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->xmt3_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7660); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7670); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->xmt4_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7680); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7690); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x76A0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < sizeof(fw->xmt_data_dma_reg) / 4; cnt++) - fw->xmt_data_dma_reg[cnt] = - htonl(RD_REG_DWORD(dmp_reg++)); + fw->xmt_data_dma_reg[cnt] = RD_REG_DWORD(dmp_reg++); /* Receive DMA registers. */ iter_reg = fw->rcvt0_data_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7700); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7710); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); iter_reg = fw->rcvt1_data_dma_reg; WRT_REG_DWORD(®->iobase_addr, 0x7720); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x7730); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* RISC registers. */ iter_reg = fw->risc_gp_reg; WRT_REG_DWORD(®->iobase_addr, 0x0F00); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F10); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F20); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F30); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F40); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F50); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F60); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x0F70); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* Local memory controller registers. */ iter_reg = fw->lmc_reg; WRT_REG_DWORD(®->iobase_addr, 0x3000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3010); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3020); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3030); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3040); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3050); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x3060); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* Fibre Protocol Module registers. */ iter_reg = fw->fpm_hdw_reg; WRT_REG_DWORD(®->iobase_addr, 0x4000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4010); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4020); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4030); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4040); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4050); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4060); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4070); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4080); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x4090); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x40A0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x40B0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* Frame Buffer registers. */ iter_reg = fw->fb_hdw_reg; WRT_REG_DWORD(®->iobase_addr, 0x6000); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6010); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6020); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6030); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6040); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6100); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6130); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6150); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6170); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x6190); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); WRT_REG_DWORD(®->iobase_addr, 0x61B0); dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xC0); for (cnt = 0; cnt < 16; cnt++) - *iter_reg++ = htonl(RD_REG_DWORD(dmp_reg++)); + *iter_reg++ = RD_REG_DWORD(dmp_reg++); /* Reset RISC. */ WRT_REG_DWORD(®->ctrl_status, @@ -1258,7 +1590,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb[0] & MBS_MASK; - fw->code_ram[cnt] = htonl((mb[3] << 16) | mb[2]); + fw->code_ram[cnt] = (mb[3] << 16) | mb[2]; } else { rval = QLA_FUNCTION_FAILED; } @@ -1308,18 +1640,12 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { rval = mb[0] & MBS_MASK; - fw->ext_mem[cnt] = htonl((mb[3] << 16) | mb[2]); + fw->ext_mem[cnt] = (mb[3] << 16) | mb[2]; } else { rval = QLA_FUNCTION_FAILED; } } - if (rval == QLA_SUCCESS) { - eft = qla2xxx_copy_queues(ha, &fw->ext_mem[cnt]); - if (ha->eft) - memcpy(eft, ha->eft, ntohl(ha->fw_dump->eft_size)); - } - if (rval != QLA_SUCCESS) { qla_printk(KERN_WARNING, ha, "Failed to dump firmware (%x)!!!\n", rval); @@ -1328,7 +1654,7 @@ qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked) } else { qla_printk(KERN_INFO, ha, "Firmware dump saved to temp buffer (%ld/%p).\n", - ha->host_no, ha->fw_dump); + ha->host_no, ha->fw_dump24); ha->fw_dumped = 1; } @@ -1337,6 +1663,252 @@ qla24xx_fw_dump_failed: spin_unlock_irqrestore(&ha->hardware_lock, flags); } +void +qla24xx_ascii_fw_dump(scsi_qla_host_t *ha) +{ + uint32_t cnt; + char *uiter; + struct qla24xx_fw_dump *fw; + uint32_t ext_mem_cnt; + + uiter = ha->fw_dump_buffer; + fw = ha->fw_dump24; + + qla_uprintf(&uiter, "ISP FW Version %d.%02d.%02d Attributes %04x\n", + ha->fw_major_version, ha->fw_minor_version, + ha->fw_subminor_version, ha->fw_attributes); + + qla_uprintf(&uiter, "\nR2H Status Register\n%04x\n", fw->host_status); + + qla_uprintf(&uiter, "\nHost Interface Registers"); + for (cnt = 0; cnt < sizeof(fw->host_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->host_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nShadow Registers"); + for (cnt = 0; cnt < sizeof(fw->shadow_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->shadow_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nMailbox Registers"); + for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->mailbox_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXSEQ GP Registers"); + for (cnt = 0; cnt < sizeof(fw->xseq_gp_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xseq_gp_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXSEQ-0 Registers"); + for (cnt = 0; cnt < sizeof(fw->xseq_0_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xseq_0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXSEQ-1 Registers"); + for (cnt = 0; cnt < sizeof(fw->xseq_1_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xseq_1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRSEQ GP Registers"); + for (cnt = 0; cnt < sizeof(fw->rseq_gp_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rseq_gp_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRSEQ-0 Registers"); + for (cnt = 0; cnt < sizeof(fw->rseq_0_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rseq_0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRSEQ-1 Registers"); + for (cnt = 0; cnt < sizeof(fw->rseq_1_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rseq_1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRSEQ-2 Registers"); + for (cnt = 0; cnt < sizeof(fw->rseq_2_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rseq_2_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nCommand DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->cmd_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->cmd_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRequest0 Queue DMA Channel Registers"); + for (cnt = 0; cnt < sizeof(fw->req0_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->req0_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nResponse0 Queue DMA Channel Registers"); + for (cnt = 0; cnt < sizeof(fw->resp0_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->resp0_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRequest1 Queue DMA Channel Registers"); + for (cnt = 0; cnt < sizeof(fw->req1_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->req1_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT0 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt0_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt0_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT1 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt1_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt1_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT2 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt2_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt2_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT3 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt3_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt3_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT4 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt4_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt4_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nXMT Data DMA Common Registers"); + for (cnt = 0; cnt < sizeof(fw->xmt_data_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->xmt_data_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRCV Thread 0 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->rcvt0_data_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rcvt0_data_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRCV Thread 1 Data DMA Registers"); + for (cnt = 0; cnt < sizeof(fw->rcvt1_data_dma_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->rcvt1_data_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP Registers"); + for (cnt = 0; cnt < sizeof(fw->risc_gp_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->risc_gp_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nLMC Registers"); + for (cnt = 0; cnt < sizeof(fw->lmc_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->lmc_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM Hardware Registers"); + for (cnt = 0; cnt < sizeof(fw->fpm_hdw_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->fpm_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFB Hardware Registers"); + for (cnt = 0; cnt < sizeof(fw->fb_hdw_reg) / 4; cnt++) { + if (cnt % 8 == 0) + qla_uprintf(&uiter, "\n"); + + qla_uprintf(&uiter, "%08x ", fw->fb_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nCode RAM"); + for (cnt = 0; cnt < sizeof (fw->code_ram) / 4; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%08x: ", cnt + 0x20000); + } + qla_uprintf(&uiter, "%08x ", fw->code_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\nExternal Memory"); + ext_mem_cnt = ha->fw_memory_size - 0x100000 + 1; + for (cnt = 0; cnt < ext_mem_cnt; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%08x: ", cnt + 0x100000); + } + qla_uprintf(&uiter, "%08x ", fw->ext_mem[cnt]); + } + + qla_uprintf(&uiter, "\n[<==END] ISP Debug Dump"); +} + + /****************************************************************************/ /* Driver Debug Functions. */ /****************************************************************************/ @@ -1423,6 +1995,7 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) return; printk(" sp flags=0x%x\n", sp->flags); + printk(" state=%d\n", sp->state); } void diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index 533425338..ab6afeaa2 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h @@ -37,86 +37,134 @@ /* * Macros use for debugging the driver. */ +#undef ENTER_TRACE +#if defined(ENTER_TRACE) +#define ENTER(x) do { printk("qla2100 : Entering %s()\n", x); } while (0) +#define LEAVE(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0) +#define ENTER_INTR(x) do { printk("qla2100 : Entering %s()\n", x); } while (0) +#define LEAVE_INTR(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0) +#else +#define ENTER(x) do {} while (0) +#define LEAVE(x) do {} while (0) +#define ENTER_INTR(x) do {} while (0) +#define LEAVE_INTR(x) do {} while (0) +#endif -#define DEBUG(x) do { if (extended_error_logging) { x; } } while (0) +#if DEBUG_QLA2100 +#define DEBUG(x) do {x;} while (0); +#else +#define DEBUG(x) do {} while (0); +#endif #if defined(QL_DEBUG_LEVEL_1) -#define DEBUG1(x) do {x;} while (0) +#define DEBUG1(x) do {x;} while (0); #else -#define DEBUG1(x) do {} while (0) +#define DEBUG1(x) do {} while (0); #endif -#define DEBUG2(x) do { if (extended_error_logging) { x; } } while (0) -#define DEBUG2_3(x) do { if (extended_error_logging) { x; } } while (0) -#define DEBUG2_3_11(x) do { if (extended_error_logging) { x; } } while (0) -#define DEBUG2_9_10(x) do { if (extended_error_logging) { x; } } while (0) -#define DEBUG2_11(x) do { if (extended_error_logging) { x; } } while (0) -#define DEBUG2_13(x) do { if (extended_error_logging) { x; } } while (0) +#if defined(QL_DEBUG_LEVEL_2) +#define DEBUG2(x) do {x;} while (0); +#define DEBUG2_3(x) do {x;} while (0); +#define DEBUG2_3_11(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); +#define DEBUG2_11(x) do {x;} while (0); +#define DEBUG2_13(x) do {x;} while (0); +#else +#define DEBUG2(x) do {} while (0); +#endif #if defined(QL_DEBUG_LEVEL_3) -#define DEBUG3(x) do {x;} while (0) -#define DEBUG3_11(x) do {x;} while (0) +#define DEBUG3(x) do {x;} while (0); +#define DEBUG2_3(x) do {x;} while (0); +#define DEBUG2_3_11(x) do {x;} while (0); +#define DEBUG3_11(x) do {x;} while (0); #else -#define DEBUG3(x) do {} while (0) +#define DEBUG3(x) do {} while (0); + #if !defined(QL_DEBUG_LEVEL_2) + #define DEBUG2_3(x) do {} while (0); + #endif #endif #if defined(QL_DEBUG_LEVEL_4) -#define DEBUG4(x) do {x;} while (0) +#define DEBUG4(x) do {x;} while (0); #else -#define DEBUG4(x) do {} while (0) +#define DEBUG4(x) do {} while (0); #endif #if defined(QL_DEBUG_LEVEL_5) -#define DEBUG5(x) do {x;} while (0) +#define DEBUG5(x) do {x;} while (0); #else -#define DEBUG5(x) do {} while (0) +#define DEBUG5(x) do {} while (0); #endif #if defined(QL_DEBUG_LEVEL_7) -#define DEBUG7(x) do {x;} while (0) +#define DEBUG7(x) do {x;} while (0); #else -#define DEBUG7(x) do {} while (0) +#define DEBUG7(x) do {} while (0); #endif #if defined(QL_DEBUG_LEVEL_9) -#define DEBUG9(x) do {x;} while (0) -#define DEBUG9_10(x) do {x;} while (0) +#define DEBUG9(x) do {x;} while (0); +#define DEBUG9_10(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); #else -#define DEBUG9(x) do {} while (0) +#define DEBUG9(x) do {} while (0); #endif #if defined(QL_DEBUG_LEVEL_10) -#define DEBUG10(x) do {x;} while (0) -#define DEBUG9_10(x) do {x;} while (0) +#define DEBUG10(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); +#define DEBUG9_10(x) do {x;} while (0); #else -#define DEBUG10(x) do {} while (0) +#define DEBUG10(x) do {} while (0); + #if !defined(DEBUG2_9_10) + #define DEBUG2_9_10(x) do {} while (0); + #endif #if !defined(DEBUG9_10) - #define DEBUG9_10(x) do {} while (0) + #define DEBUG9_10(x) do {} while (0); #endif #endif #if defined(QL_DEBUG_LEVEL_11) -#define DEBUG11(x) do{x;} while(0) +#define DEBUG11(x) do{x;} while(0); +#if !defined(DEBUG2_11) +#define DEBUG2_11(x) do{x;} while(0); +#endif +#if !defined(DEBUG2_3_11) +#define DEBUG2_3_11(x) do{x;} while(0); +#endif #if !defined(DEBUG3_11) -#define DEBUG3_11(x) do{x;} while(0) +#define DEBUG3_11(x) do{x;} while(0); #endif #else -#define DEBUG11(x) do{} while(0) +#define DEBUG11(x) do{} while(0); + #if !defined(QL_DEBUG_LEVEL_2) + #define DEBUG2_11(x) do{} while(0); + #if !defined(QL_DEBUG_LEVEL_3) + #define DEBUG2_3_11(x) do{} while(0); + #endif + #endif #if !defined(QL_DEBUG_LEVEL_3) - #define DEBUG3_11(x) do{} while(0) + #define DEBUG3_11(x) do{} while(0); #endif #endif #if defined(QL_DEBUG_LEVEL_12) -#define DEBUG12(x) do {x;} while (0) +#define DEBUG12(x) do {x;} while (0); #else -#define DEBUG12(x) do {} while (0) +#define DEBUG12(x) do {} while (0); #endif #if defined(QL_DEBUG_LEVEL_13) #define DEBUG13(x) do {x;} while (0) +#if !defined(DEBUG2_13) +#define DEBUG2_13(x) do {x;} while(0) +#endif #else #define DEBUG13(x) do {} while (0) +#if !defined(QL_DEBUG_LEVEL_2) +#define DEBUG2_13(x) do {} while(0) +#endif #endif #if defined(QL_DEBUG_LEVEL_14) @@ -128,6 +176,9 @@ /* * Firmware Dump structure definition */ +#define FW_DUMP_SIZE_128K 0xBC000 +#define FW_DUMP_SIZE_512K 0x2FC000 +#define FW_DUMP_SIZE_1M 0x5FC000 struct qla2300_fw_dump { uint16_t hccr; @@ -173,6 +224,8 @@ struct qla2100_fw_dump { uint16_t risc_ram[0xf000]; }; +#define FW_DUMP_SIZE_24XX 0x2B0000 + struct qla24xx_fw_dump { uint32_t host_status; uint32_t host_reg[32]; @@ -204,39 +257,3 @@ struct qla24xx_fw_dump { uint32_t code_ram[0x2000]; uint32_t ext_mem[1]; }; - -#define EFT_NUM_BUFFERS 4 -#define EFT_BYTES_PER_BUFFER 0x4000 -#define EFT_SIZE ((EFT_BYTES_PER_BUFFER) * (EFT_NUM_BUFFERS)) - -struct qla2xxx_fw_dump { - uint8_t signature[4]; - uint32_t version; - - uint32_t fw_major_version; - uint32_t fw_minor_version; - uint32_t fw_subminor_version; - uint32_t fw_attributes; - - uint32_t vendor; - uint32_t device; - uint32_t subsystem_vendor; - uint32_t subsystem_device; - - uint32_t fixed_size; - uint32_t mem_size; - uint32_t req_q_size; - uint32_t rsp_q_size; - - uint32_t eft_size; - uint32_t eft_addr_l; - uint32_t eft_addr_h; - - uint32_t header_size; - - union { - struct qla2100_fw_dump isp21; - struct qla2300_fw_dump isp23; - struct qla24xx_fw_dump isp24; - } isp; -}; diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 0930260ae..53508f3c4 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -31,8 +31,6 @@ #include #include -#define QLA2XXX_DRIVER_NAME "qla2xxx" - /* * We have MAILBOX_REGISTER_COUNT sized arrays in a few places, * but that's fine as we don't look at the last 24 ones for @@ -191,13 +189,22 @@ typedef struct srb { struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ + struct timer_list timer; /* Command timer */ + atomic_t ref_count; /* Reference count for this structure */ uint16_t flags; + /* Request state */ + uint16_t state; + /* Single transfer DMA context */ dma_addr_t dma_handle; uint32_t request_sense_length; uint8_t *request_sense_ptr; + + /* SRB magic number */ + uint16_t magic; +#define SRB_MAGIC 0x10CB } srb_t; /* @@ -218,6 +225,21 @@ typedef struct srb { #define SRB_IOCTL BIT_10 /* IOCTL command. */ #define SRB_TAPE BIT_11 /* FCP2 (Tape) command. */ +/* + * SRB state definitions + */ +#define SRB_FREE_STATE 0 /* returned back */ +#define SRB_PENDING_STATE 1 /* queued in LUN Q */ +#define SRB_ACTIVE_STATE 2 /* in Active Array */ +#define SRB_DONE_STATE 3 /* queued in Done Queue */ +#define SRB_RETRY_STATE 4 /* in Retry Queue */ +#define SRB_SUSPENDED_STATE 5 /* in suspended state */ +#define SRB_NO_QUEUE_STATE 6 /* is in between states */ +#define SRB_ACTIVE_TIMEOUT_STATE 7 /* in Active Array but timed out */ +#define SRB_FAILOVER_STATE 8 /* in Failover Queue */ +#define SRB_SCSI_RETRY_STATE 9 /* in Scsi Retry Queue */ + + /* * ISP I/O Register Set structure definitions. */ @@ -248,8 +270,6 @@ struct device_reg_2xxx { #define NVR_SELECT BIT_1 #define NVR_CLOCK BIT_0 -#define NVR_WAIT_CNT 20000 - union { struct { uint16_t mailbox0; @@ -487,7 +507,6 @@ typedef struct { #define MBA_IP_RCV_BUFFER_EMPTY 0x8026 /* IP receive buffer queue empty. */ #define MBA_IP_HDR_DATA_SPLIT 0x8027 /* IP header/data splitting feature */ /* used. */ -#define MBA_TRACE_NOTIFICATION 0x8028 /* Trace/Diagnostic notification. */ #define MBA_POINT_TO_POINT 0x8030 /* Point to point mode. */ #define MBA_CMPLT_1_16BIT 0x8031 /* Completion 1 16bit IOSB. */ #define MBA_CMPLT_2_16BIT 0x8032 /* Completion 2 16bit IOSB. */ @@ -609,9 +628,7 @@ typedef struct { #define MBC_SERDES_PARAMS 0x10 /* Serdes Tx Parameters. */ #define MBC_GET_IOCB_STATUS 0x12 /* Get IOCB status command. */ #define MBC_GET_TIMEOUT_PARAMS 0x22 /* Get FW timeouts. */ -#define MBC_TRACE_CONTROL 0x27 /* Trace control command. */ #define MBC_GEN_SYSTEM_ERROR 0x2a /* Generate System Error. */ -#define MBC_READ_SFP 0x31 /* Read SFP Data. */ #define MBC_SET_TIMEOUT_PARAMS 0x32 /* Set FW timeouts. */ #define MBC_MID_INITIALIZE_FIRMWARE 0x48 /* MID Initialize firmware. */ #define MBC_MID_GET_VP_DATABASE 0x49 /* MID Get VP Database. */ @@ -621,9 +638,6 @@ typedef struct { #define MBC_GET_LINK_PRIV_STATS 0x6d /* Get link & private data. */ #define MBC_SET_VENDOR_ID 0x76 /* Set Vendor ID. */ -#define TC_ENABLE 4 -#define TC_DISABLE 5 - /* Firmware return data sizes */ #define FCAL_MAP_SIZE 128 @@ -1499,6 +1513,62 @@ typedef struct { uint8_t port_name[WWN_SIZE]; } sw_info_t; +/* + * Inquiry command structure. + */ +#define INQ_DATA_SIZE 36 + +/* + * Inquiry mailbox IOCB packet definition. + */ +typedef struct { + union { + cmd_a64_entry_t cmd; + sts_entry_t rsp; + struct cmd_type_7 cmd24; + struct sts_entry_24xx rsp24; + } p; + uint8_t inq[INQ_DATA_SIZE]; +} inq_cmd_rsp_t; + +/* + * Report LUN command structure. + */ +#define CHAR_TO_SHORT(a, b) (uint16_t)((uint8_t)b << 8 | (uint8_t)a) + +typedef struct { + uint32_t len; + uint32_t rsrv; +} rpt_hdr_t; + +typedef struct { + struct { + uint8_t b : 6; + uint8_t address_method : 2; + } msb; + uint8_t lsb; + uint8_t unused[6]; +} rpt_lun_t; + +typedef struct { + rpt_hdr_t hdr; + rpt_lun_t lst[MAX_LUNS]; +} rpt_lun_lst_t; + +/* + * Report Lun mailbox IOCB packet definition. + */ +typedef struct { + union { + cmd_a64_entry_t cmd; + sts_entry_t rsp; + struct cmd_type_7 cmd24; + struct sts_entry_24xx rsp24; + } p; + rpt_lun_lst_t list; +} rpt_lun_cmd_rsp_t; + + /* * Fibre channel port type. */ @@ -1517,6 +1587,7 @@ typedef struct { typedef struct fc_port { struct list_head list; struct scsi_qla_host *ha; + struct scsi_qla_host *vis_ha; /* only used when suspending lun */ uint8_t node_name[WWN_SIZE]; uint8_t port_name[WWN_SIZE]; @@ -1531,13 +1602,23 @@ typedef struct fc_port { unsigned int os_target_id; + uint16_t iodesc_idx_sent; + int port_login_retry_count; int login_retry; atomic_t port_down_timer; + uint8_t device_type; + uint8_t unused; + + uint8_t mp_byte; /* multi-path byte (not used) */ + uint8_t cur_path; /* current path id */ + spinlock_t rport_lock; struct fc_rport *rport, *drport; u32 supported_classes; + struct work_struct rport_add_work; + struct work_struct rport_del_work; } fc_port_t; /* @@ -1946,6 +2027,54 @@ struct sns_cmd_pkt { } p; }; +/* IO descriptors */ +#define MAX_IO_DESCRIPTORS 32 + +#define ABORT_IOCB_CB 0 +#define ADISC_PORT_IOCB_CB 1 +#define LOGOUT_PORT_IOCB_CB 2 +#define LOGIN_PORT_IOCB_CB 3 +#define LAST_IOCB_CB 4 + +#define IODESC_INVALID_INDEX 0xFFFF +#define IODESC_ADISC_NEEDED 0xFFFE +#define IODESC_LOGIN_NEEDED 0xFFFD + +struct io_descriptor { + uint16_t used:1; + uint16_t idx:11; + uint16_t cb_idx:4; + + struct timer_list timer; + + struct scsi_qla_host *ha; + + port_id_t d_id; + fc_port_t *remote_fcport; + + uint32_t signature; +}; + +struct qla_fw_info { + unsigned short addressing; /* addressing method used to load fw */ +#define FW_INFO_ADDR_NORMAL 0 +#define FW_INFO_ADDR_EXTENDED 1 +#define FW_INFO_ADDR_NOMORE 0xffff + unsigned short *fwcode; /* pointer to FW array */ + unsigned short *fwlen; /* number of words in array */ + unsigned short *fwstart; /* start address for F/W */ + unsigned long *lfwstart; /* start address (long) for F/W */ +}; + +struct qla_board_info { + char *drv_name; + + char isp_name[8]; + struct qla_fw_info *fw_info; + char *fw_fname; + struct scsi_host_template *sht; +}; + struct fw_blob { char *name; uint32_t segs[4]; @@ -2003,6 +2132,7 @@ struct isp_operations { uint32_t); void (*fw_dump) (struct scsi_qla_host *, int); + void (*ascii_fw_dump) (struct scsi_qla_host *); int (*beacon_on) (struct scsi_qla_host *); int (*beacon_off) (struct scsi_qla_host *); @@ -2046,7 +2176,6 @@ typedef struct scsi_qla_host { uint32_t enable_led_scheme :1; uint32_t msi_enabled :1; uint32_t msix_enabled :1; - uint32_t disable_serdes :1; } flags; atomic_t loop_state; @@ -2140,7 +2269,7 @@ typedef struct scsi_qla_host { mempool_t *srb_mempool; /* This spinlock is used to protect "io transactions", you must - * acquire it before doing any IO to the card, eg with RD_REG*() and + * aquire it before doing any IO to the card, eg with RD_REG*() and * WRT_REG*() for the duration of your entire commandtransaction. * * This spinlock is of lower priority than the io request lock. @@ -2174,6 +2303,9 @@ typedef struct scsi_qla_host { uint32_t current_outstanding_cmd; srb_t *status_srb; /* Status continuation entry. */ + uint16_t revision; + uint8_t ports; + /* ISP configuration data. */ uint16_t loop_id; /* Host adapter loop id */ uint16_t fb_rev; @@ -2229,6 +2361,10 @@ typedef struct scsi_qla_host { /* Fibre Channel Device List. */ struct list_head fcports; + struct list_head rscn_fcports; + + struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS]; + uint16_t iodesc_signature; /* RSCN queue. */ uint32_t rscn_queue[MAX_RSCN_COUNT]; @@ -2244,11 +2380,6 @@ typedef struct scsi_qla_host { struct sns_cmd_pkt *sns_cmd; dma_addr_t sns_cmd_dma; -#define SFP_DEV_SIZE 256 -#define SFP_BLOCK_SIZE 64 - void *sfp_data; - dma_addr_t sfp_data_dma; - struct task_struct *dpc_thread; uint8_t dpc_active; /* DPC routine is active */ @@ -2264,6 +2395,9 @@ typedef struct scsi_qla_host { struct gid_list_info *gid_list; int gid_list_info_size; + dma_addr_t rlc_rsp_dma; + rpt_lun_cmd_rsp_t *rlc_rsp; + /* Small DMA pool allocations -- maximum 256 bytes in length. */ #define DMA_POOL_SIZE 256 struct dma_pool *s_dma_pool; @@ -2272,6 +2406,9 @@ typedef struct scsi_qla_host { init_cb_t *init_cb; int init_cb_size; + dma_addr_t iodesc_pd_dma; + port_database_t *iodesc_pd; + /* These are used by mailbox operations. */ volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT]; @@ -2298,28 +2435,28 @@ typedef struct scsi_qla_host { mbx_cmd_t mc; /* Basic firmware related information. */ + struct qla_board_info *brd_info; uint16_t fw_major_version; uint16_t fw_minor_version; uint16_t fw_subminor_version; uint16_t fw_attributes; uint32_t fw_memory_size; uint32_t fw_transfer_size; - uint32_t fw_srisc_address; -#define RISC_START_ADDRESS_2100 0x1000 -#define RISC_START_ADDRESS_2300 0x800 -#define RISC_START_ADDRESS_2400 0x100000 uint16_t fw_options[16]; /* slots: 1,2,3,10,11 */ uint8_t fw_seriallink_options[4]; uint16_t fw_seriallink_options24[4]; /* Firmware dump information. */ - struct qla2xxx_fw_dump *fw_dump; - uint32_t fw_dump_len; - int fw_dumped; + void *fw_dump; + int fw_dump_order; int fw_dump_reading; - dma_addr_t eft_dma; - void *eft; + char *fw_dump_buffer; + int fw_dump_buffer_len; + + int fw_dumped; + void *fw_dump24; + int fw_dump24_len; uint8_t host_str[16]; uint32_t pci_attr; @@ -2366,6 +2503,8 @@ typedef struct scsi_qla_host { test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ atomic_read(&ha->loop_state) == LOOP_DOWN) +#define TGT_Q(ha, t) (ha->otgt[t]) + #define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata) #define qla_printk(level, ha, format, arg...) \ @@ -2398,6 +2537,19 @@ typedef struct scsi_qla_host { #define QLA_RSCNS_HANDLED 0x108 #define QLA_ALREADY_REGISTERED 0x109 +/* +* Stat info for all adpaters +*/ +struct _qla2x00stats { + unsigned long mboxtout; /* mailbox timeouts */ + unsigned long mboxerr; /* mailbox errors */ + unsigned long ispAbort; /* ISP aborts */ + unsigned long debugNo; + unsigned long loop_resync; + unsigned long outarray_full; + unsigned long retry_q_cnt; +}; + #define NVRAM_DELAY() udelay(10) #define INVALID_HANDLE (MAX_OUTSTANDING_COMMANDS+1) @@ -2413,6 +2565,12 @@ typedef struct scsi_qla_host { #include "qla_dbg.h" #include "qla_inline.h" +/* +* String arrays +*/ +#define LINESIZE 256 +#define MAXARGS 26 + #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) #define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) #define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) diff --git a/drivers/scsi/qla2xxx/qla_devtbl.h b/drivers/scsi/qla2xxx/qla_devtbl.h index dd435410d..a8fc0ffc7 100644 --- a/drivers/scsi/qla2xxx/qla_devtbl.h +++ b/drivers/scsi/qla2xxx/qla_devtbl.h @@ -1,4 +1,4 @@ -#define QLA_MODEL_NAMES 0x57 +#define QLA_MODEL_NAMES 0x4A /* * Adapter model names and descriptions. @@ -76,19 +76,6 @@ static char *qla2x00_model_name[QLA_MODEL_NAMES*2] = { "QLE2440", "PCI-Express to 4Gb FC, Single Channel", /* 0x145 */ "QLE2464", "PCI-Express to 4Gb FC, Quad Channel", /* 0x146 */ "QLA2440", "PCI-X 2.0 to 4Gb FC, Single Channel", /* 0x147 */ - "HP AE369A", "PCI-X 2.0 to 4Gb FC, Dual Channel", /* 0x148 */ + " ", " ", /* 0x148 */ "QLA2340", "Sun 133MHz PCI-X to 2Gb FC, Single Channel", /* 0x149 */ - " ", " ", /* 0x14a */ - " ", " ", /* 0x14b */ - "QMC2432M", "IBM eServer BC 4Gb FC Expansion Card CFFE", /* 0x14c */ - "QMC2422M", "IBM eServer BC 4Gb FC Expansion Card CFFX", /* 0x14d */ - "QLE220", "Sun PCI-Express to 4Gb FC, Single Channel", /* 0x14e */ - " ", " ", /* 0x14f */ - " ", " ", /* 0x150 */ - " ", " ", /* 0x151 */ - "QME2462", "PCI-Express to 4Gb FC, Dual Channel Mezz HBA", /* 0x152 */ - "QMH2462", "PCI-Express to 4Gb FC, Dual Channel Mezz HBA", /* 0x153 */ - " ", " ", /* 0x154 */ - "QLE220", "PCI-Express to 4Gb FC, Single Channel", /* 0x155 */ - "QLE220", "PCI-Express to 4Gb FC, Single Channel", /* 0x156 */ }; diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index a0a722cf4..1ee58ad2f 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h @@ -7,6 +7,7 @@ #ifndef __QLA_FW_H #define __QLA_FW_H +#define RISC_SADDRESS 0x100000 #define MBS_CHECKSUM_ERROR 0x4010 /* @@ -141,7 +142,7 @@ struct nvram_24xx { * BIT 2 = Enable Memory Map BIOS * BIT 3 = Enable Selectable Boot * BIT 4 = Disable RISC code load - * BIT 5 = Disable Serdes + * BIT 5 = * BIT 6 = * BIT 7 = * @@ -278,7 +279,7 @@ struct init_cb_24xx { uint16_t response_q_length; uint16_t request_q_length; - uint16_t link_down_on_nos; /* Milliseconds. */ + uint16_t link_down_timeout; /* Milliseconds. */ uint16_t prio_request_q_length; @@ -462,7 +463,7 @@ struct sts_entry_24xx { uint16_t comp_status; /* Completion status. */ uint16_t ox_id; /* OX_ID used by the firmware. */ - uint32_t residual_len; /* FW calc residual transfer length. */ + uint32_t residual_len; /* Residual transfer length. */ uint16_t reserved_1; uint16_t state_flags; /* State flags. */ diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 8311ac2b9..91e83e2c1 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -9,6 +9,9 @@ #include +extern void qla2x00_remove_one(struct pci_dev *); +extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *); + /* * Global Function Prototypes in qla_init.c source file. */ @@ -31,9 +34,13 @@ extern void qla2x00_update_fw_options(struct scsi_qla_host *); extern void qla24xx_update_fw_options(scsi_qla_host_t *); extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *); extern int qla24xx_load_risc(scsi_qla_host_t *, uint32_t *); +extern int qla24xx_load_risc_flash(scsi_qla_host_t *, uint32_t *); + +extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t); extern int qla2x00_loop_resync(scsi_qla_host_t *); +extern int qla2x00_find_new_loop_id(scsi_qla_host_t *, fc_port_t *); extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *); @@ -47,8 +54,6 @@ extern int qla2x00_abort_isp(scsi_qla_host_t *); extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); -extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); - /* * Global Data in qla_os.c source file. */ @@ -59,13 +64,14 @@ extern int qlport_down_retry; extern int ql2xplogiabsentdevice; extern int ql2xloginretrycount; extern int ql2xfdmienable; -extern int ql2xallocfwdump; -extern int extended_error_logging; +extern int ql2xprocessrscn; extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); +extern void qla2x00_cmd_timeout(srb_t *); + extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int, int); extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *, int); @@ -80,6 +86,8 @@ extern void qla2xxx_wake_dpc(scsi_qla_host_t *); /* * Global Function Prototypes in qla_iocb.c source file. */ +extern void qla2x00_isp_cmd(scsi_qla_host_t *); + extern uint16_t qla2x00_calc_iocbs_32(uint16_t); extern uint16_t qla2x00_calc_iocbs_64(uint16_t); extern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t); @@ -202,12 +210,6 @@ qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); extern int qla2x00_stop_firmware(scsi_qla_host_t *); -extern int -qla2x00_trace_control(scsi_qla_host_t *, uint16_t, dma_addr_t, uint16_t); - -extern int -qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t); - /* * Global Function Prototypes in qla_isr.c source file. */ @@ -258,6 +260,9 @@ extern int qla24xx_write_optrom_data(struct scsi_qla_host *, uint8_t *, extern void qla2100_fw_dump(scsi_qla_host_t *, int); extern void qla2300_fw_dump(scsi_qla_host_t *, int); extern void qla24xx_fw_dump(scsi_qla_host_t *, int); +extern void qla2100_ascii_fw_dump(scsi_qla_host_t *); +extern void qla2300_ascii_fw_dump(scsi_qla_host_t *); +extern void qla24xx_ascii_fw_dump(scsi_qla_host_t *); extern void qla2x00_dump_regs(scsi_qla_host_t *); extern void qla2x00_dump_buffer(uint8_t *, uint32_t); extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *); @@ -280,6 +285,22 @@ extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t); extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t); extern int qla2x00_fdmi_register(scsi_qla_host_t *); +/* + * Global Function Prototypes in qla_rscn.c source file. + */ +extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, gfp_t); +extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *, + int); +extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *); +extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *); + +/* + * Global Function Prototypes in qla_xioctl.c source file. + */ +#define qla2x00_enqueue_aen(ha, cmd, mode) do { } while (0) +#define qla2x00_alloc_ioctl_mem(ha) (0) +#define qla2x00_free_ioctl_mem(ha) do { } while (0) + /* * Global Function Prototypes in qla_attr.c source file. */ diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 859649160..89a3fc059 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -39,8 +39,6 @@ static int qla2x00_fabric_dev_login(scsi_qla_host_t *, fc_port_t *, static int qla2x00_restart_isp(scsi_qla_host_t *); -static int qla2x00_find_new_loop_id(scsi_qla_host_t *ha, fc_port_t *dev); - /****************************************************************************/ /* QLogic ISP2x00 Hardware Support Functions. */ /****************************************************************************/ @@ -91,17 +89,6 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) ha->isp_ops.nvram_config(ha); - if (ha->flags.disable_serdes) { - /* Mask HBA via NVRAM settings? */ - qla_printk(KERN_INFO, ha, "Masking HBA WWPN " - "%02x%02x%02x%02x%02x%02x%02x%02x (via NVRAM).\n", - ha->port_name[0], ha->port_name[1], - ha->port_name[2], ha->port_name[3], - ha->port_name[4], ha->port_name[5], - ha->port_name[6], ha->port_name[7]); - return QLA_FUNCTION_FAILED; - } - qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); retry = 10; @@ -207,6 +194,7 @@ qla2100_pci_config(scsi_qla_host_t *ha) mwi = 0; if (pci_set_mwi(ha->pdev)) mwi = PCI_COMMAND_INVALIDATE; + pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision); pci_read_config_word(ha->pdev, PCI_COMMAND, &w); w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); @@ -244,6 +232,7 @@ qla2300_pci_config(scsi_qla_host_t *ha) mwi = 0; if (pci_set_mwi(ha->pdev)) mwi = PCI_COMMAND_INVALIDATE; + pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision); pci_read_config_word(ha->pdev, PCI_COMMAND, &w); w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); @@ -331,6 +320,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha) mwi = 0; if (pci_set_mwi(ha->pdev)) mwi = PCI_COMMAND_INVALIDATE; + pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision); pci_read_config_word(ha->pdev, PCI_COMMAND, &w); w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); @@ -396,7 +386,9 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) qla_printk(KERN_INFO, ha, "RISC CODE NOT loaded\n"); /* Verify checksum of loaded RISC code. */ - rval = qla2x00_verify_checksum(ha, ha->fw_srisc_address); + rval = qla2x00_verify_checksum(ha, + IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RISC_SADDRESS : + *ha->brd_info->fw_info[0].fwstart); } if (rval) { @@ -419,6 +411,7 @@ qla2x00_reset_chip(scsi_qla_host_t *ha) unsigned long flags = 0; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; uint32_t cnt; + unsigned long mbx_flags = 0; uint16_t cmd; ha->isp_ops.disable_intrs(ha); @@ -526,8 +519,20 @@ qla2x00_reset_chip(scsi_qla_host_t *ha) if (IS_QLA2100(ha) || IS_QLA2200(ha) || IS_QLA2300(ha)) { for (cnt = 0; cnt < 30000; cnt++) { - if (RD_MAILBOX_REG(ha, reg, 0) != MBS_BUSY) + if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) + spin_lock_irqsave(&ha->mbx_reg_lock, mbx_flags); + + if (RD_MAILBOX_REG(ha, reg, 0) != MBS_BUSY) { + if (!(test_bit(ABORT_ISP_ACTIVE, + &ha->dpc_flags))) + spin_unlock_irqrestore( + &ha->mbx_reg_lock, mbx_flags); break; + } + + if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) + spin_unlock_irqrestore(&ha->mbx_reg_lock, + mbx_flags); udelay(100); } @@ -783,104 +788,19 @@ qla24xx_chip_diag(scsi_qla_host_t *ha) return rval; } -void +static void qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) { - int rval; - uint32_t dump_size, fixed_size, mem_size, req_q_size, rsp_q_size, - eft_size; - dma_addr_t eft_dma; - void *eft; - - if (ha->fw_dump) { - qla_printk(KERN_WARNING, ha, - "Firmware dump previously allocated.\n"); - return; - } - ha->fw_dumped = 0; - fixed_size = mem_size = eft_size = 0; - if (IS_QLA2100(ha) || IS_QLA2200(ha)) { - fixed_size = sizeof(struct qla2100_fw_dump); - } else if (IS_QLA23XX(ha)) { - fixed_size = offsetof(struct qla2300_fw_dump, data_ram); - mem_size = (ha->fw_memory_size - 0x11000 + 1) * - sizeof(uint16_t); - } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { - fixed_size = offsetof(struct qla24xx_fw_dump, ext_mem); - mem_size = (ha->fw_memory_size - 0x100000 + 1) * - sizeof(uint32_t); - - /* Allocate memory for Extended Trace Buffer. */ - eft = dma_alloc_coherent(&ha->pdev->dev, EFT_SIZE, &eft_dma, - GFP_KERNEL); - if (!eft) { - qla_printk(KERN_WARNING, ha, "Unable to allocate " - "(%d KB) for EFT.\n", EFT_SIZE / 1024); - goto cont_alloc; - } - - rval = qla2x00_trace_control(ha, TC_ENABLE, eft_dma, - EFT_NUM_BUFFERS); - if (rval) { - qla_printk(KERN_WARNING, ha, "Unable to initialize " - "EFT (%d).\n", rval); - dma_free_coherent(&ha->pdev->dev, EFT_SIZE, eft, - eft_dma); - goto cont_alloc; - } - - qla_printk(KERN_INFO, ha, "Allocated (%d KB) for EFT...\n", - EFT_SIZE / 1024); - - eft_size = EFT_SIZE; - memset(eft, 0, eft_size); - ha->eft_dma = eft_dma; - ha->eft = eft; - } -cont_alloc: - req_q_size = ha->request_q_length * sizeof(request_t); - rsp_q_size = ha->response_q_length * sizeof(response_t); - - dump_size = offsetof(struct qla2xxx_fw_dump, isp); - dump_size += fixed_size + mem_size + req_q_size + rsp_q_size + - eft_size; - - ha->fw_dump = vmalloc(dump_size); - if (!ha->fw_dump) { + ha->fw_dump24_len = sizeof(struct qla24xx_fw_dump); + ha->fw_dump24_len += (ha->fw_memory_size - 0x100000) * sizeof(uint32_t); + ha->fw_dump24 = vmalloc(ha->fw_dump24_len); + if (ha->fw_dump24) + qla_printk(KERN_INFO, ha, "Allocated (%d KB) for firmware " + "dump...\n", ha->fw_dump24_len / 1024); + else qla_printk(KERN_WARNING, ha, "Unable to allocate (%d KB) for " - "firmware dump!!!\n", dump_size / 1024); - - if (ha->eft) { - dma_free_coherent(&ha->pdev->dev, eft_size, ha->eft, - ha->eft_dma); - ha->eft = NULL; - ha->eft_dma = 0; - } - return; - } - - qla_printk(KERN_INFO, ha, "Allocated (%d KB) for firmware dump...\n", - dump_size / 1024); - - ha->fw_dump_len = dump_size; - ha->fw_dump->signature[0] = 'Q'; - ha->fw_dump->signature[1] = 'L'; - ha->fw_dump->signature[2] = 'G'; - ha->fw_dump->signature[3] = 'C'; - ha->fw_dump->version = __constant_htonl(1); - - ha->fw_dump->fixed_size = htonl(fixed_size); - ha->fw_dump->mem_size = htonl(mem_size); - ha->fw_dump->req_q_size = htonl(req_q_size); - ha->fw_dump->rsp_q_size = htonl(rsp_q_size); - - ha->fw_dump->eft_size = htonl(eft_size); - ha->fw_dump->eft_addr_l = htonl(LSD(ha->eft_dma)); - ha->fw_dump->eft_addr_h = htonl(MSD(ha->eft_dma)); - - ha->fw_dump->header_size = - htonl(offsetof(struct qla2xxx_fw_dump, isp)); + "firmware dump!!!\n", ha->fw_dump24_len / 1024); } /** @@ -902,6 +822,9 @@ qla2x00_resize_request_q(scsi_qla_host_t *ha) if (IS_QLA2100(ha) || IS_QLA2200(ha)) return; + if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) + qla2x00_alloc_fw_dump(ha); + /* Retrieve IOCB counts available to the firmware. */ rval = qla2x00_get_resource_cnts(ha, NULL, NULL, NULL, &fw_iocb_cnt); if (rval) @@ -969,9 +892,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) &ha->fw_subminor_version, &ha->fw_attributes, &ha->fw_memory_size); qla2x00_resize_request_q(ha); - - if (ql2xallocfwdump) - qla2x00_alloc_fw_dump(ha); } } else { DEBUG2(printk(KERN_INFO @@ -1275,7 +1195,8 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) rval = QLA_FUNCTION_FAILED; if (atomic_read(&ha->loop_down_timer) && - fw_state != FSTATE_READY) { + (fw_state >= FSTATE_LOSS_OF_SYNC || + fw_state == FSTATE_WAIT_AL_PA)) { /* Loop down. Timeout on min_wait for states * other than Wait for Login. */ @@ -1624,12 +1545,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) while (cnt--) *dptr1++ = *dptr2++; - /* Use alternate WWN? */ - if (nv->host_p[1] & BIT_7) { - memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); - memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); - } - /* Prepare nodename */ if ((icb->firmware_options[1] & BIT_6) == 0) { /* @@ -1643,8 +1558,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) /* * Set host adapter parameters. */ - if (nv->host_p[0] & BIT_7) - extended_error_logging = 1; ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); /* Always load RISC code on non ISP2[12]00 chips. */ if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) @@ -1653,7 +1566,6 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; - ha->flags.disable_serdes = 0; ha->operating_mode = (icb->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) >> 4; @@ -1769,6 +1681,14 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) return (rval); } +static void +qla2x00_rport_add(void *data) +{ + fc_port_t *fcport = data; + + qla2x00_reg_remote_port(fcport->ha, fcport); +} + static void qla2x00_rport_del(void *data) { @@ -1792,7 +1712,7 @@ qla2x00_rport_del(void *data) * * Returns a pointer to the allocated fcport, or NULL, if none available. */ -static fc_port_t * +fc_port_t * qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags) { fc_port_t *fcport; @@ -1806,10 +1726,13 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags) fcport->ha = ha; fcport->port_type = FCT_UNKNOWN; fcport->loop_id = FC_NO_LOOP_ID; + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; atomic_set(&fcport->state, FCS_UNCONFIGURED); fcport->flags = FCF_RLC_SUPPORT; fcport->supported_classes = FC_COS_UNSPECIFIED; spin_lock_init(&fcport->rport_lock); + INIT_WORK(&fcport->rport_add_work, qla2x00_rport_add, fcport); + INIT_WORK(&fcport->rport_del_work, qla2x00_rport_del, fcport); return (fcport); } @@ -1869,9 +1792,6 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) set_bit(RSCN_UPDATE, &flags); clear_bit(LOCAL_LOOP_UPDATE, &flags); - } else if (ha->current_topology == ISP_CFG_N) { - clear_bit(RSCN_UPDATE, &flags); - } else if (!ha->flags.online || (test_bit(ABORT_ISP_ACTIVE, &flags))) { @@ -2135,6 +2055,10 @@ qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) PORT_RETRY_TIME); fcport->flags &= ~FCF_LOGIN_NEEDED; + if (fcport->port_type == FCT_INITIATOR || + fcport->port_type == FCT_BROADCAST) + fcport->device_type = TYPE_PROCESSOR; + atomic_set(&fcport->state, FCS_ONLINE); if (ha->flags.init_done) @@ -2349,7 +2273,8 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) } /* Remove device from the new list and add it to DB */ - list_move_tail(&fcport->list, &ha->fcports); + list_del(&fcport->list); + list_add_tail(&fcport->list, &ha->fcports); /* Login and update database */ qla2x00_fabric_dev_login(ha, fcport, &next_loopid); @@ -2588,7 +2513,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports) * Context: * Kernel context. */ -static int +int qla2x00_find_new_loop_id(scsi_qla_host_t *ha, fc_port_t *dev) { int rval; @@ -2662,6 +2587,7 @@ static int qla2x00_device_resync(scsi_qla_host_t *ha) { int rval; + int rval2; uint32_t mask; fc_port_t *fcport; uint32_t rscn_entry; @@ -2717,6 +2643,17 @@ qla2x00_device_resync(scsi_qla_host_t *ha) switch (format) { case 0: + if (ql2xprocessrscn && + !IS_QLA2100(ha) && !IS_QLA2200(ha) && + !IS_QLA6312(ha) && !IS_QLA6322(ha) && + !IS_QLA24XX(ha) && !IS_QLA54XX(ha) && + ha->flags.init_done) { + /* Handle port RSCN via asyncronous IOCBs */ + rval2 = qla2x00_handle_port_rscn(ha, rscn_entry, + NULL, 0); + if (rval2 == QLA_SUCCESS) + continue; + } mask = 0xffffff; break; case 1: @@ -2734,6 +2671,10 @@ qla2x00_device_resync(scsi_qla_host_t *ha) rval = QLA_SUCCESS; + /* Abort any outstanding IO descriptors. */ + if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) + qla2x00_cancel_io_descriptors(ha); + list_for_each_entry(fcport, &ha->fcports, list) { if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 || (fcport->d_id.b24 & mask) != d_id.b24 || @@ -3063,7 +3004,6 @@ qla2x00_update_fcports(scsi_qla_host_t *ha) int qla2x00_abort_isp(scsi_qla_host_t *ha) { - int rval; unsigned long flags = 0; uint16_t cnt; srb_t *sp; @@ -3120,16 +3060,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) ha->isp_abort_cnt = 0; clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); - - if (ha->eft) { - rval = qla2x00_trace_control(ha, TC_ENABLE, - ha->eft_dma, EFT_NUM_BUFFERS); - if (rval) { - qla_printk(KERN_WARNING, ha, - "Unable to reinitialize EFT " - "(%d).\n", rval); - } - } } else { /* failed the ISP abort */ ha->flags.online = 1; if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { @@ -3150,14 +3080,14 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) ha->isp_abort_cnt--; DEBUG(printk("qla%ld: ISP abort - " "retry remaining %d\n", - ha->host_no, ha->isp_abort_cnt)); + ha->host_no, ha->isp_abort_cnt);) status = 1; } } else { ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT; DEBUG(printk("qla2x00(%ld): ISP error recovery " "- retrying (%d) more times\n", - ha->host_no, ha->isp_abort_cnt)); + ha->host_no, ha->isp_abort_cnt);) set_bit(ISP_ABORT_RETRY, &ha->dpc_flags); status = 1; } @@ -3171,7 +3101,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) } else { DEBUG(printk(KERN_INFO "qla2x00_abort_isp(%ld): exiting.\n", - ha->host_no)); + ha->host_no);) } return(status); @@ -3247,7 +3177,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); if (!(status = qla2x00_fw_ready(ha))) { DEBUG(printk("%s(): Start configure loop, " - "status = %d\n", __func__, status)); + "status = %d\n", __func__, status);) /* Issue a marker after FW becomes ready. */ qla2x00_marker(ha, 0, 0, MK_SYNC_ALL); @@ -3271,7 +3201,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", __func__, - status)); + status);) } return (status); } @@ -3391,6 +3321,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) nv->node_name[6] = 0x55; nv->node_name[7] = 0x86; nv->login_retry_count = __constant_cpu_to_le16(8); + nv->link_down_timeout = __constant_cpu_to_le16(200); nv->interrupt_delay_timer = __constant_cpu_to_le16(0); nv->login_timeout = __constant_cpu_to_le16(0); nv->firmware_options_1 = @@ -3419,7 +3350,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) *dptr1++ = *dptr2++; icb->login_retry_count = nv->login_retry_count; - icb->link_down_on_nos = nv->link_down_on_nos; + icb->link_down_timeout = nv->link_down_timeout; /* Copy 2nd segment. */ dptr1 = (uint8_t *)&icb->interrupt_delay_timer; @@ -3452,14 +3383,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) } else strcpy(ha->model_number, "QLA2462"); - /* Use alternate WWN? */ - if (nv->host_p & __constant_cpu_to_le32(BIT_15)) { - memcpy(icb->node_name, nv->alternate_node_name, WWN_SIZE); - memcpy(icb->port_name, nv->alternate_port_name, WWN_SIZE); - } - /* Prepare nodename */ - if ((icb->firmware_options_1 & __constant_cpu_to_le32(BIT_14)) == 0) { + if ((icb->firmware_options_1 & BIT_14) == 0) { /* * Firmware will apply the following mask if the nodename was * not provided. @@ -3474,10 +3399,9 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) ha->flags.enable_lip_full_login = 1; ha->flags.enable_target_reset = 1; ha->flags.enable_led_scheme = 0; - ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; - ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) & - (BIT_6 | BIT_5 | BIT_4)) >> 4; + ha->operating_mode = + (icb->firmware_options_2 & (BIT_6 | BIT_5 | BIT_4)) >> 4; memcpy(ha->fw_seriallink_options24, nv->seriallink_options, sizeof(ha->fw_seriallink_options24)); @@ -3574,7 +3498,134 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) return (rval); } -static int +#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) + +int +qla2x00_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) +{ + int rval, num, i; + uint32_t cnt; + uint16_t *risc_code; + uint32_t risc_addr, risc_size; + uint16_t *req_ring; + struct qla_fw_info *fw_iter; + + rval = QLA_SUCCESS; + + /* Load firmware sequences */ + fw_iter = ha->brd_info->fw_info; + *srisc_addr = *ha->brd_info->fw_info->fwstart; + while (fw_iter->addressing != FW_INFO_ADDR_NOMORE) { + risc_code = fw_iter->fwcode; + risc_size = *fw_iter->fwlen; + if (fw_iter->addressing == FW_INFO_ADDR_NORMAL) + risc_addr = *fw_iter->fwstart; + else + risc_addr = *fw_iter->lfwstart; + + num = 0; + rval = 0; + while (risc_size > 0 && !rval) { + cnt = (uint16_t)(ha->fw_transfer_size >> 1); + if (cnt > risc_size) + cnt = risc_size; + + DEBUG7(printk("scsi(%ld): Loading risc segment@ " + "addr %p, number of bytes 0x%x, offset 0x%lx.\n", + ha->host_no, risc_code, cnt, risc_addr)); + + req_ring = (uint16_t *)ha->request_ring; + for (i = 0; i < cnt; i++) + req_ring[i] = cpu_to_le16(risc_code[i]); + + rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr, + cnt); + if (rval) { + DEBUG(printk("scsi(%ld): [ERROR] Failed to " + "load segment %d of firmware\n", + ha->host_no, num)); + qla_printk(KERN_WARNING, ha, + "[ERROR] Failed to load segment %d of " + "firmware\n", num); + + qla2x00_dump_regs(ha); + break; + } + + risc_code += cnt; + risc_addr += cnt; + risc_size -= cnt; + num++; + } + + /* Next firmware sequence */ + fw_iter++; + } + return rval; +} + +int +qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) +{ + int rval, num, i; + uint32_t cnt; + uint32_t *risc_code; + uint32_t risc_addr, risc_size; + uint32_t *req_ring; + struct qla_fw_info *fw_iter; + + rval = QLA_SUCCESS; + + /* Load firmware sequences */ + fw_iter = ha->brd_info->fw_info; + *srisc_addr = *((uint32_t *)fw_iter->lfwstart); + while (fw_iter->addressing != FW_INFO_ADDR_NOMORE) { + risc_code = (uint32_t *)fw_iter->fwcode; + risc_size = *((uint32_t *)fw_iter->fwlen); + risc_addr = *((uint32_t *)fw_iter->lfwstart); + + num = 0; + rval = 0; + while (risc_size > 0 && !rval) { + cnt = (uint32_t)(ha->fw_transfer_size >> 2); + if (cnt > risc_size) + cnt = risc_size; + + DEBUG7(printk("scsi(%ld): Loading risc segment@ " + "addr %p, number of bytes 0x%x, offset 0x%lx.\n", + ha->host_no, risc_code, cnt, risc_addr)); + + req_ring = (uint32_t *)ha->request_ring; + for (i = 0; i < cnt; i++) + req_ring[i] = cpu_to_le32(risc_code[i]); + + rval = qla2x00_load_ram(ha, ha->request_dma, risc_addr, + cnt); + if (rval) { + DEBUG(printk("scsi(%ld): [ERROR] Failed to " + "load segment %d of firmware\n", + ha->host_no, num)); + qla_printk(KERN_WARNING, ha, + "[ERROR] Failed to load segment %d of " + "firmware\n", num); + + qla2x00_dump_regs(ha); + break; + } + + risc_code += cnt; + risc_addr += cnt; + risc_size -= cnt; + num++; + } + + /* Next firmware sequence */ + fw_iter++; + } + return rval; +} + +int qla24xx_load_risc_flash(scsi_qla_host_t *ha, uint32_t *srisc_addr) { int rval; @@ -3656,7 +3707,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t *ha, uint32_t *srisc_addr) return rval; } -#define QLA_FW_URL "ftp://ftp.qlogic.com/outgoing/linux/firmware/" +#else /* !defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) */ int qla2x00_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) @@ -3671,8 +3722,6 @@ qla2x00_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) blob = qla2x00_request_firmware(ha); if (!blob) { qla_printk(KERN_ERR, ha, "Firmware image unavailable.\n"); - qla_printk(KERN_ERR, ha, "Firmware images can be retrieved " - "from: " QLA_FW_URL ".\n"); return QLA_FUNCTION_FAILED; } @@ -3774,13 +3823,7 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) blob = qla2x00_request_firmware(ha); if (!blob) { qla_printk(KERN_ERR, ha, "Firmware image unavailable.\n"); - qla_printk(KERN_ERR, ha, "Firmware images can be retrieved " - "from: " QLA_FW_URL ".\n"); - - /* Try to load RISC code from flash. */ - qla_printk(KERN_ERR, ha, "Attempting to load (potentially " - "outdated) firmware from flash.\n"); - return qla24xx_load_risc_flash(ha, srisc_addr); + return QLA_FUNCTION_FAILED; } rval = QLA_SUCCESS; @@ -3866,3 +3909,4 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) fail_fw_integrity: return QLA_FUNCTION_FAILED; } +#endif diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index c5b3c610a..8f0f4a298 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -15,7 +15,6 @@ static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd); static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *); static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *); static request_t *qla2x00_req_pkt(scsi_qla_host_t *ha); -static void qla2x00_isp_cmd(scsi_qla_host_t *ha); /** * qla2x00_get_cmd_direction() - Determine control_flag data direction. @@ -409,6 +408,7 @@ qla2x00_start_scsi(srb_t *sp) ha->request_ring_ptr++; sp->flags |= SRB_DMA_VALID; + sp->state = SRB_ACTIVE_STATE; /* Set chip new ring index. */ WRT_REG_WORD(ISP_REQ_Q_IN(ha, reg), ha->req_ring_index); @@ -471,7 +471,6 @@ __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, mrk24->nport_handle = cpu_to_le16(loop_id); mrk24->lun[1] = LSB(lun); mrk24->lun[2] = MSB(lun); - host_to_fcp_swap(mrk24->lun, sizeof(mrk24->lun)); } else { SET_TARGET_ID(ha, mrk->target, loop_id); mrk->lun = cpu_to_le16(lun); @@ -576,7 +575,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha) * * Note: The caller must hold the hardware lock before calling this routine. */ -static void +void qla2x00_isp_cmd(scsi_qla_host_t *ha) { device_reg_t __iomem *reg = ha->iobase; @@ -839,6 +838,7 @@ qla24xx_start_scsi(srb_t *sp) ha->request_ring_ptr++; sp->flags |= SRB_DMA_VALID; + sp->state = SRB_ACTIVE_STATE; /* Set chip new ring index. */ WRT_REG_DWORD(®->req_q_in, ha->req_ring_index); diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index de0613135..2003dbb70 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -395,6 +395,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_LIP_OCCURRED, NULL); + break; case MBA_LOOP_UP: /* Loop Up Event */ @@ -414,6 +418,9 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) link_speed); ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_LOOP_UP, NULL); break; case MBA_LOOP_DOWN: /* Loop Down Event */ @@ -432,6 +439,9 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) ha->link_data_rate = LDR_UNKNOWN; if (ql2xfdmienable) set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags); + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_LOOP_DOWN, NULL); break; case MBA_LIP_RESET: /* LIP reset occurred */ @@ -450,6 +460,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) ha->operating_mode = LOOP; ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_LIP_RESET, NULL); + break; case MBA_POINT_TO_POINT: /* Point-to-Point */ @@ -500,6 +514,47 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) break; case MBA_PORT_UPDATE: /* Port database update */ + /* + * If a single remote port just logged into (or logged out of) + * us, create a new entry in our rscn fcports list and handle + * the event like an RSCN. + */ + if (ql2xprocessrscn && + !IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) && + !IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA54XX(ha) && + ha->flags.init_done && mb[1] != 0xffff && + ((ha->operating_mode == P2P && mb[1] != 0) || + (ha->operating_mode != P2P && mb[1] != + SNS_FIRST_LOOP_ID)) && (mb[2] == 6 || mb[2] == 7)) { + int rval; + fc_port_t *rscn_fcport; + + /* Create new fcport for login. */ + rscn_fcport = qla2x00_alloc_rscn_fcport(ha, GFP_ATOMIC); + if (rscn_fcport) { + DEBUG14(printk("scsi(%ld): Port Update -- " + "creating RSCN fcport %p for %x/%x/%x.\n", + ha->host_no, rscn_fcport, mb[1], mb[2], + mb[3])); + + rscn_fcport->loop_id = mb[1]; + rscn_fcport->d_id.b24 = INVALID_PORT_ID; + atomic_set(&rscn_fcport->state, + FCS_DEVICE_LOST); + list_add_tail(&rscn_fcport->list, + &ha->rscn_fcports); + + rval = qla2x00_handle_port_rscn(ha, 0, + rscn_fcport, 1); + if (rval == QLA_SUCCESS) + break; + } else { + DEBUG14(printk("scsi(%ld): Port Update -- " + "-- unable to allocate RSCN fcport " + "login.\n", ha->host_no)); + } + } + /* * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET * event etc. earlier indicating loop is down) then process @@ -531,6 +586,9 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_PORT_UPDATE, NULL); break; case MBA_RSCN_UPDATE: /* State Change Registration */ @@ -567,6 +625,9 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); set_bit(RSCN_UPDATE, &ha->dpc_flags); + + /* Update AEN queue. */ + qla2x00_enqueue_aen(ha, MBA_RSCN_UPDATE, &mb[0]); break; /* case MBA_RIO_RESPONSE: */ @@ -587,11 +648,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) DEBUG2(printk("scsi(%ld): Discard RND Frame -- %04x %04x " "%04x.\n", ha->host_no, mb[1], mb[2], mb[3])); break; - - case MBA_TRACE_NOTIFICATION: - DEBUG2(printk("scsi(%ld): Trace Notification -- %04x %04x.\n", - ha->host_no, mb[1], mb[2])); - break; } } @@ -697,6 +753,25 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha) case MS_IOCB_TYPE: qla2x00_ms_entry(ha, (ms_iocb_entry_t *)pkt); break; + case MBX_IOCB_TYPE: + if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && + !IS_QLA6312(ha) && !IS_QLA6322(ha)) { + if (pkt->sys_define == SOURCE_ASYNC_IOCB) { + qla2x00_process_iodesc(ha, + (struct mbx_entry *)pkt); + } else { + /* MBX IOCB Type Not Supported. */ + DEBUG4(printk(KERN_WARNING + "scsi(%ld): Received unknown MBX " + "IOCB response pkt type=%x " + "source=%x entry status=%x.\n", + ha->host_no, pkt->entry_type, + pkt->sys_define, + pkt->entry_status)); + } + break; + } + /* Fallthrough. */ default: /* Type Not Supported. */ DEBUG4(printk(KERN_WARNING @@ -730,7 +805,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) uint16_t scsi_status; uint8_t lscsi_status; int32_t resid; - uint32_t sense_len, rsp_info_len, resid_len, fw_resid_len; + uint32_t sense_len, rsp_info_len, resid_len; uint8_t *rsp_info, *sense_data; sts = (sts_entry_t *) pkt; @@ -769,7 +844,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) cp = sp->cmd; if (cp == NULL) { DEBUG2(printk("scsi(%ld): Command already returned back to OS " - "pkt->handle=%d sp=%p.\n", ha->host_no, sts->handle, sp)); + "pkt->handle=%d sp=%p sp->state:%d\n", + ha->host_no, sts->handle, sp, sp->state)); qla_printk(KERN_WARNING, ha, "Command is NULL: already returned to OS (sp=%p)\n", sp); @@ -783,12 +859,11 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) fcport = sp->fcport; - sense_len = rsp_info_len = resid_len = fw_resid_len = 0; + sense_len = rsp_info_len = resid_len = 0; if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { sense_len = le32_to_cpu(sts24->sense_len); rsp_info_len = le32_to_cpu(sts24->rsp_data_len); resid_len = le32_to_cpu(sts24->rsp_residual_count); - fw_resid_len = le32_to_cpu(sts24->residual_len); rsp_info = sts24->data; sense_data = sts24->data; host_to_fcp_swap(sts24->data, sizeof(sts24->data)); @@ -888,21 +963,14 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) case CS_DATA_UNDERRUN: resid = resid_len; - /* Use F/W calculated residual length. */ - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) - resid = fw_resid_len; - if (scsi_status & SS_RESIDUAL_UNDER) { cp->resid = resid; CMD_RESID_LEN(cp) = resid; } else { DEBUG2(printk(KERN_INFO "scsi(%ld:%d:%d) UNDERRUN status detected " - "0x%x-0x%x. resid=0x%x fw_resid=0x%x cdb=0x%x " - "os_underflow=0x%x\n", ha->host_no, - cp->device->id, cp->device->lun, comp_status, - scsi_status, resid_len, resid, cp->cmnd[0], - cp->underflow)); + "0x%x-0x%x.\n", ha->host_no, cp->device->id, + cp->device->lun, comp_status, scsi_status)); } @@ -1113,7 +1181,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt) cp = sp->cmd; if (cp == NULL) { DEBUG2(printk("%s(): Cmd already returned back to OS " - "sp=%p.\n", __func__, sp)); + "sp=%p sp->state:%d\n", __func__, sp, sp->state)); qla_printk(KERN_INFO, ha, "cmd is NULL: already returned to OS (sp=%p)\n", sp); @@ -1437,8 +1505,8 @@ qla24xx_ms_entry(scsi_qla_host_t *ha, struct ct_entry_24xx *pkt) DEBUG3(printk("%s(%ld): pkt=%p pkthandle=%d.\n", __func__, ha->host_no, pkt, pkt->handle)); - DEBUG9(printk("%s: ct pkt dump:\n", __func__)); - DEBUG9(qla2x00_dump_buffer((void *)pkt, sizeof(struct ct_entry_24xx))); + DEBUG9(printk("%s: ct pkt dump:\n", __func__);) + DEBUG9(qla2x00_dump_buffer((void *)pkt, sizeof(struct ct_entry_24xx));) /* Validate handle. */ if (pkt->handle < MAX_OUTSTANDING_COMMANDS) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 879f281e2..d6cb3bd1a 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -13,13 +13,13 @@ qla2x00_mbx_sem_timeout(unsigned long data) { struct semaphore *sem_ptr = (struct semaphore *)data; - DEBUG11(printk("qla2x00_sem_timeout: entered.\n")); + DEBUG11(printk("qla2x00_sem_timeout: entered.\n");) if (sem_ptr != NULL) { up(sem_ptr); } - DEBUG11(printk("qla2x00_mbx_sem_timeout: exiting.\n")); + DEBUG11(printk("qla2x00_mbx_sem_timeout: exiting.\n");) } /* @@ -61,7 +61,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) rval = QLA_SUCCESS; abort_active = test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) /* * Wait for active mailbox commands to finish by waiting at most tov @@ -72,7 +72,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) if (qla2x00_down_timeout(&ha->mbx_cmd_sem, mcp->tov * HZ)) { /* Timeout occurred. Return error. */ DEBUG2_3_11(printk("%s(%ld): cmd access timeout. " - "Exiting.\n", __func__, ha->host_no)); + "Exiting.\n", __func__, ha->host_no);) return QLA_FUNCTION_TIMEOUT; } } @@ -86,7 +86,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) spin_lock_irqsave(&ha->mbx_reg_lock, mbx_flags); DEBUG11(printk("scsi(%ld): prepare to issue mbox cmd=0x%x.\n", - ha->host_no, mcp->mb[0])); + ha->host_no, mcp->mb[0]);) spin_lock_irqsave(&ha->hardware_lock, flags); @@ -131,14 +131,14 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) /* Unlock mbx registers and wait for interrupt */ DEBUG11(printk("%s(%ld): going to unlock irq & waiting for interrupt. " - "jiffies=%lx.\n", __func__, ha->host_no, jiffies)); + "jiffies=%lx.\n", __func__, ha->host_no, jiffies);) /* Wait for mbx cmd completion until timeout */ if (!abort_active && io_lock_on) { /* sleep on completion semaphore */ DEBUG11(printk("%s(%ld): INTERRUPT MODE. Initializing timer.\n", - __func__, ha->host_no)); + __func__, ha->host_no);) init_timer(&tmp_intr_timer); tmp_intr_timer.data = (unsigned long)&ha->mbx_intr_sem; @@ -147,11 +147,11 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) (void (*)(unsigned long))qla2x00_mbx_sem_timeout; DEBUG11(printk("%s(%ld): Adding timer.\n", __func__, - ha->host_no)); + ha->host_no);) add_timer(&tmp_intr_timer); DEBUG11(printk("%s(%ld): going to unlock & sleep. " - "time=0x%lx.\n", __func__, ha->host_no, jiffies)); + "time=0x%lx.\n", __func__, ha->host_no, jiffies);) set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); @@ -170,14 +170,14 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) down(&ha->mbx_intr_sem); DEBUG11(printk("%s(%ld): waking up. time=0x%lx\n", __func__, - ha->host_no, jiffies)); + ha->host_no, jiffies);) clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); /* delete the timer */ del_timer(&tmp_intr_timer); } else { DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, - ha->host_no, command)); + ha->host_no, command);) if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) WRT_REG_DWORD(®->isp24.hccr, HCCRX_SET_HOST_INT); @@ -209,7 +209,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) uint16_t *iptr2; DEBUG3_11(printk("%s(%ld): cmd %x completed.\n", __func__, - ha->host_no, command)); + ha->host_no, command);) /* Got interrupt. Clear the flag. */ ha->flags.mbox_int = 0; @@ -266,7 +266,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) if (!abort_active) { DEBUG11(printk("%s(%ld): checking for additional resp " - "interrupt.\n", __func__, ha->host_no)); + "interrupt.\n", __func__, ha->host_no);) /* polling mode for non isp_abort commands. */ qla2x00_poll(ha); @@ -277,9 +277,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) if (!io_lock_on || (mcp->flags & IOCTL_CMD)) { /* not in dpc. schedule it for dpc to take over. */ DEBUG(printk("%s(%ld): timeout schedule " - "isp_abort_needed.\n", __func__, ha->host_no)); + "isp_abort_needed.\n", __func__, ha->host_no);) DEBUG2_3_11(printk("%s(%ld): timeout schedule " - "isp_abort_needed.\n", __func__, ha->host_no)); + "isp_abort_needed.\n", __func__, ha->host_no);) qla_printk(KERN_WARNING, ha, "Mailbox command timeout occured. Scheduling ISP " "abort.\n"); @@ -288,9 +288,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) } else if (!abort_active) { /* call abort directly since we are in the DPC thread */ DEBUG(printk("%s(%ld): timeout calling abort_isp\n", - __func__, ha->host_no)); + __func__, ha->host_no);) DEBUG2_3_11(printk("%s(%ld): timeout calling " - "abort_isp\n", __func__, ha->host_no)); + "abort_isp\n", __func__, ha->host_no);) qla_printk(KERN_WARNING, ha, "Mailbox command timeout occured. Issuing ISP " "abort.\n"); @@ -303,9 +303,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) } clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); DEBUG(printk("%s(%ld): finished abort_isp\n", __func__, - ha->host_no)); + ha->host_no);) DEBUG2_3_11(printk("%s(%ld): finished abort_isp\n", - __func__, ha->host_no)); + __func__, ha->host_no);) } } @@ -316,9 +316,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) if (rval) { DEBUG2_3_11(printk("%s(%ld): **** FAILED. mbx0=%x, mbx1=%x, " "mbx2=%x, cmd=%x ****\n", __func__, ha->host_no, - mcp->mb[0], mcp->mb[1], mcp->mb[2], command)); + mcp->mb[0], mcp->mb[1], mcp->mb[2], command);) } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) } return rval; @@ -394,7 +394,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) mcp->mb[0] = MBC_EXECUTE_FIRMWARE; mcp->out_mb = MBX_0; @@ -424,10 +424,10 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) } else { if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { DEBUG11(printk("%s(%ld): done exchanges=%x.\n", - __func__, ha->host_no, mcp->mb[1])); + __func__, ha->host_no, mcp->mb[1]);) } else { DEBUG11(printk("%s(%ld): done.\n", __func__, - ha->host_no)); + ha->host_no);) } } @@ -611,7 +611,7 @@ qla2x00_mbx_reg_test(scsi_qla_host_t *ha) mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("qla2x00_mbx_reg_test(%ld): entered.\n", ha->host_no)); + DEBUG11(printk("qla2x00_mbx_reg_test(%ld): entered.\n", ha->host_no);) mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; mcp->mb[1] = 0xAAAA; @@ -639,11 +639,11 @@ qla2x00_mbx_reg_test(scsi_qla_host_t *ha) if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_mbx_reg_test(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_mbx_reg_test(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -671,7 +671,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) mcp->mb[0] = MBC_VERIFY_CHECKSUM; mcp->out_mb = MBX_0; @@ -694,9 +694,9 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, ha->host_no, rval, (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? - (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]))); + (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]));) } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) } return rval; @@ -743,9 +743,9 @@ qla2x00_issue_iocb(scsi_qla_host_t *ha, void* buffer, dma_addr_t phys_addr, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG(printk("qla2x00_issue_iocb(%ld): failed rval 0x%x\n", - ha->host_no, rval)); + ha->host_no, rval);) DEBUG2(printk("qla2x00_issue_iocb(%ld): failed rval 0x%x\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { sts_entry_t *sts_entry = (sts_entry_t *) buffer; @@ -781,7 +781,7 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp) mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no)); + DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);) fcport = sp->fcport; @@ -813,11 +813,11 @@ qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp) if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("qla2x00_abort_command(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { sp->flags |= SRB_ABORT_PENDING; DEBUG11(printk("qla2x00_abort_command(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -848,7 +848,7 @@ qla2x00_abort_target(fc_port_t *fcport) if (fcport == NULL) return 0; - DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->ha->host_no);) ha = fcport->ha; mcp->mb[0] = MBC_ABORT_TARGET; @@ -872,11 +872,11 @@ qla2x00_abort_target(fc_port_t *fcport) if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("qla2x00_abort_target(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_abort_target(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -912,7 +912,7 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_get_adapter_id(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; mcp->out_mb = MBX_0; @@ -933,11 +933,11 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_get_adapter_id(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_get_adapter_id(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -968,7 +968,7 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *ha, uint8_t *retry_cnt, uint8_t *tov, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_get_retry_cnt(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_GET_RETRY_COUNT; mcp->out_mb = MBX_0; @@ -980,7 +980,7 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *ha, uint8_t *retry_cnt, uint8_t *tov, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_get_retry_cnt(%ld): failed = %x.\n", - ha->host_no, mcp->mb[0])); + ha->host_no, mcp->mb[0]);) } else { /* Convert returned data and check our values. */ *r_a_tov = mcp->mb[3] / 2; @@ -992,7 +992,7 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *ha, uint8_t *retry_cnt, uint8_t *tov, } DEBUG11(printk("qla2x00_get_retry_cnt(%ld): done. mb3=%d " - "ratov=%d.\n", ha->host_no, mcp->mb[3], ratov)); + "ratov=%d.\n", ha->host_no, mcp->mb[3], ratov);) } return rval; @@ -1023,7 +1023,7 @@ qla2x00_init_firmware(scsi_qla_host_t *ha, uint16_t size) mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_init_firmware(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_INITIALIZE_FIRMWARE; mcp->mb[2] = MSW(ha->init_cb_dma); @@ -1043,11 +1043,11 @@ qla2x00_init_firmware(scsi_qla_host_t *ha, uint16_t size) /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_init_firmware(%ld): failed=%x " "mb0=%x.\n", - ha->host_no, rval, mcp->mb[0])); + ha->host_no, rval, mcp->mb[0]);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_init_firmware(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1079,7 +1079,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) struct port_database_24xx *pd24; dma_addr_t pd_dma; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) pd24 = NULL; pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); @@ -1220,7 +1220,7 @@ qla2x00_get_firmware_state(scsi_qla_host_t *ha, uint16_t *dptr) mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_get_firmware_state(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_GET_FIRMWARE_STATE; mcp->out_mb = MBX_0; @@ -1235,11 +1235,11 @@ qla2x00_get_firmware_state(scsi_qla_host_t *ha, uint16_t *dptr) if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_get_firmware_state(%ld): " - "failed=%x.\n", ha->host_no, rval)); + "failed=%x.\n", ha->host_no, rval);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_get_firmware_state(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1272,7 +1272,7 @@ qla2x00_get_port_name(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t *name, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_get_port_name(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_GET_PORT_NAME; mcp->out_mb = MBX_1|MBX_0; @@ -1292,7 +1292,7 @@ qla2x00_get_port_name(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t *name, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_get_port_name(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { if (name != NULL) { /* This function returns name in big endian. */ @@ -1307,7 +1307,7 @@ qla2x00_get_port_name(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t *name, } DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1335,7 +1335,7 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { mcp->mb[0] = MBC_LIP_FULL_LOGIN; @@ -1364,10 +1364,10 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", - __func__, ha->host_no, rval)); + __func__, ha->host_no, rval);) } else { /*EMPTY*/ - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) } return rval; @@ -1400,10 +1400,10 @@ qla2x00_send_sns(scsi_qla_host_t *ha, dma_addr_t sns_phys_address, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_send_sns(%ld): entered.\n", - ha->host_no)); + ha->host_no);) DEBUG11(printk("qla2x00_send_sns: retry cnt=%d ratov=%d total " - "tov=%d.\n", ha->retry_count, ha->login_timeout, mcp->tov)); + "tov=%d.\n", ha->retry_count, ha->login_timeout, mcp->tov);) mcp->mb[0] = MBC_SEND_SNS_COMMAND; mcp->mb[1] = cmd_size; @@ -1421,12 +1421,12 @@ qla2x00_send_sns(scsi_qla_host_t *ha, dma_addr_t sns_phys_address, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " - "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1])); + "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1]);) DEBUG2_3_11(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " - "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1])); + "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1]);) } else { /*EMPTY*/ - DEBUG11(printk("qla2x00_send_sns(%ld): done.\n", ha->host_no)); + DEBUG11(printk("qla2x00_send_sns(%ld): done.\n", ha->host_no);) } return rval; @@ -1442,7 +1442,7 @@ qla24xx_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, dma_addr_t lg_dma; uint32_t iop[2]; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); if (lg == NULL) { @@ -1458,15 +1458,13 @@ qla24xx_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, lg->control_flags = __constant_cpu_to_le16(LCF_COMMAND_PLOGI); if (opt & BIT_0) lg->control_flags |= __constant_cpu_to_le16(LCF_COND_PLOGI); - if (opt & BIT_1) - lg->control_flags |= __constant_cpu_to_le16(LCF_SKIP_PRLI); lg->port_id[0] = al_pa; lg->port_id[1] = area; lg->port_id[2] = domain; rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed to issue Login IOCB " - "(%x).\n", __func__, ha->host_no, rval)); + "(%x).\n", __func__, ha->host_no, rval);) } else if (lg->entry_status != 0) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " "-- error status (%x).\n", __func__, ha->host_no, @@ -1507,7 +1505,7 @@ qla24xx_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, break; } } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) iop[0] = le32_to_cpu(lg->io_parameter[0]); @@ -1561,7 +1559,7 @@ qla2x00_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, mbx_cmd_t mc; mbx_cmd_t *mcp = &mc; - DEBUG11(printk("qla2x00_login_fabric(%ld): entered.\n", ha->host_no)); + DEBUG11(printk("qla2x00_login_fabric(%ld): entered.\n", ha->host_no);) mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; @@ -1606,11 +1604,11 @@ qla2x00_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_login_fabric(%ld): failed=%x " "mb[0]=%x mb[1]=%x mb[2]=%x.\n", ha->host_no, rval, - mcp->mb[0], mcp->mb[1], mcp->mb[2])); + mcp->mb[0], mcp->mb[1], mcp->mb[2]);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_login_fabric(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1645,7 +1643,7 @@ qla2x00_login_local_device(scsi_qla_host_t *ha, fc_port_t *fcport, fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa, mb_ret, opt); - DEBUG3(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG3(printk("%s(%ld): entered.\n", __func__, ha->host_no);) mcp->mb[0] = MBC_LOGIN_LOOP_PORT; if (HAS_EXTENDED_IDS(ha)) @@ -1679,13 +1677,13 @@ qla2x00_login_local_device(scsi_qla_host_t *ha, fc_port_t *fcport, DEBUG(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " "mb[6]=%x mb[7]=%x.\n", __func__, ha->host_no, rval, - mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7])); + mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]);) DEBUG2_3(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " "mb[6]=%x mb[7]=%x.\n", __func__, ha->host_no, rval, - mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7])); + mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]);) } else { /*EMPTY*/ - DEBUG3(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG3(printk("%s(%ld): done.\n", __func__, ha->host_no);) } return (rval); @@ -1699,7 +1697,7 @@ qla24xx_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, struct logio_entry_24xx *lg; dma_addr_t lg_dma; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); if (lg == NULL) { @@ -1720,7 +1718,7 @@ qla24xx_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, rval = qla2x00_issue_iocb(ha, lg, lg_dma, 0); if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed to issue Logout IOCB " - "(%x).\n", __func__, ha->host_no, rval)); + "(%x).\n", __func__, ha->host_no, rval);) } else if (lg->entry_status != 0) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " "-- error status (%x).\n", __func__, ha->host_no, @@ -1731,10 +1729,10 @@ qla24xx_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, "-- completion status (%x) ioparam=%x/%x.\n", __func__, ha->host_no, le16_to_cpu(lg->comp_status), le32_to_cpu(lg->io_parameter[0]), - le32_to_cpu(lg->io_parameter[1]))); + le32_to_cpu(lg->io_parameter[1]));) } else { /*EMPTY*/ - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) } dma_pool_free(ha->s_dma_pool, lg, lg_dma); @@ -1767,7 +1765,7 @@ qla2x00_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_fabric_logout(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; mcp->out_mb = MBX_1|MBX_0; @@ -1787,11 +1785,11 @@ qla2x00_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_fabric_logout(%ld): failed=%x " - "mbx1=%x.\n", ha->host_no, rval, mcp->mb[1])); + "mbx1=%x.\n", ha->host_no, rval, mcp->mb[1]);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_fabric_logout(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1820,7 +1818,7 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha) mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n", - ha->host_no)); + ha->host_no);) mcp->mb[0] = MBC_LIP_FULL_LOGIN; mcp->mb[1] = 0; @@ -1835,11 +1833,11 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha) if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_full_login_lip(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { /*EMPTY*/ DEBUG11(printk("qla2x00_full_login_lip(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1866,7 +1864,7 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, mbx_cmd_t *mcp = &mc; DEBUG11(printk("qla2x00_get_id_list(%ld): entered.\n", - ha->host_no)); + ha->host_no);) if (id_list == NULL) return QLA_FUNCTION_FAILED; @@ -1895,11 +1893,11 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("qla2x00_get_id_list(%ld): failed=%x.\n", - ha->host_no, rval)); + ha->host_no, rval);) } else { *entries = mcp->mb[1]; DEBUG11(printk("qla2x00_get_id_list(%ld): done.\n", - ha->host_no)); + ha->host_no);) } return rval; @@ -1938,7 +1936,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, if (rval != QLA_SUCCESS) { /*EMPTY*/ DEBUG2_3_11(printk("%s(%ld): failed = %x.\n", __func__, - ha->host_no, mcp->mb[0])); + ha->host_no, mcp->mb[0]);) } else { DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " "mb7=%x mb10=%x.\n", __func__, ha->host_no, @@ -2047,7 +2045,7 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id, link_stat_t *stat_buf; dma_addr_t stat_buf_dma; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) stat_buf = dma_pool_alloc(ha->s_dma_pool, GFP_ATOMIC, &stat_buf_dma); if (stat_buf == NULL) { @@ -2085,7 +2083,7 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id, if (rval == QLA_SUCCESS) { if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { DEBUG2_3_11(printk("%s(%ld): cmd failed. mbx0=%x.\n", - __func__, ha->host_no, mcp->mb[0])); + __func__, ha->host_no, mcp->mb[0]);) status[0] = mcp->mb[0]; rval = BIT_1; } else { @@ -2110,12 +2108,12 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id, stat_buf->loss_sync_cnt, stat_buf->loss_sig_cnt, stat_buf->prim_seq_err_cnt, stat_buf->inval_xmit_word_cnt, - stat_buf->inval_crc_cnt)); + stat_buf->inval_crc_cnt);) } } else { /* Failed. */ DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, - ha->host_no, rval)); + ha->host_no, rval);) rval = BIT_1; } @@ -2134,7 +2132,7 @@ qla24xx_get_isp_stats(scsi_qla_host_t *ha, uint32_t *dwbuf, uint32_t dwords, uint32_t *sbuf, *siter; dma_addr_t sbuf_dma; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) if (dwords > (DMA_POOL_SIZE / 4)) { DEBUG2_3_11(printk("%s(%ld): Unabled to retrieve %d DWORDs " @@ -2198,7 +2196,7 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp) dma_addr_t abt_dma; uint32_t handle; - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) fcport = sp->fcport; @@ -2231,7 +2229,7 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp) rval = qla2x00_issue_iocb(ha, abt, abt_dma, 0); if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed to issue IOCB (%x).\n", - __func__, ha->host_no, rval)); + __func__, ha->host_no, rval);) } else if (abt->entry_status != 0) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " "-- error status (%x).\n", __func__, ha->host_no, @@ -2240,10 +2238,10 @@ qla24xx_abort_command(scsi_qla_host_t *ha, srb_t *sp) } else if (abt->nport_handle != __constant_cpu_to_le16(0)) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " "-- completion status (%x).\n", __func__, ha->host_no, - le16_to_cpu(abt->nport_handle))); + le16_to_cpu(abt->nport_handle));) rval = QLA_FUNCTION_FAILED; } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) sp->flags |= SRB_ABORT_PENDING; } @@ -2270,7 +2268,7 @@ qla24xx_abort_target(fc_port_t *fcport) if (fcport == NULL) return 0; - DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->ha->host_no)); + DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->ha->host_no);) ha = fcport->ha; tsk = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &tsk_dma); @@ -2292,7 +2290,7 @@ qla24xx_abort_target(fc_port_t *fcport) rval = qla2x00_issue_iocb(ha, tsk, tsk_dma, 0); if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed to issue Target Reset IOCB " - "(%x).\n", __func__, ha->host_no, rval)); + "(%x).\n", __func__, ha->host_no, rval);) goto atarget_done; } else if (tsk->p.sts.entry_status != 0) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " @@ -2304,7 +2302,7 @@ qla24xx_abort_target(fc_port_t *fcport) __constant_cpu_to_le16(CS_COMPLETE)) { DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " "-- completion status (%x).\n", __func__, - ha->host_no, le16_to_cpu(tsk->p.sts.comp_status))); + ha->host_no, le16_to_cpu(tsk->p.sts.comp_status));) rval = QLA_FUNCTION_FAILED; goto atarget_done; } @@ -2313,9 +2311,9 @@ qla24xx_abort_target(fc_port_t *fcport) rval = qla2x00_marker(ha, fcport->loop_id, 0, MK_SYNC_ID); if (rval != QLA_SUCCESS) { DEBUG2_3_11(printk("%s(%ld): failed to issue Marker IOCB " - "(%x).\n", __func__, ha->host_no, rval)); + "(%x).\n", __func__, ha->host_no, rval);) } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) } atarget_done: @@ -2462,81 +2460,3 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha) return rval; } - -int -qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, - uint16_t buffers) -{ - int rval; - mbx_cmd_t mc; - mbx_cmd_t *mcp = &mc; - - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) - return QLA_FUNCTION_FAILED; - - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); - - mcp->mb[0] = MBC_TRACE_CONTROL; - mcp->mb[1] = ctrl; - mcp->out_mb = MBX_1|MBX_0; - mcp->in_mb = MBX_1|MBX_0; - if (ctrl == TC_ENABLE) { - mcp->mb[2] = LSW(eft_dma); - mcp->mb[3] = MSW(eft_dma); - mcp->mb[4] = LSW(MSD(eft_dma)); - mcp->mb[5] = MSW(MSD(eft_dma)); - mcp->mb[6] = buffers; - mcp->mb[7] = buffers; - mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2; - } - mcp->tov = 30; - mcp->flags = 0; - rval = qla2x00_mailbox_command(ha, mcp); - - if (rval != QLA_SUCCESS) { - DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", - __func__, ha->host_no, rval, mcp->mb[0], mcp->mb[1])); - } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); - } - - return rval; -} - -int -qla2x00_read_sfp(scsi_qla_host_t *ha, dma_addr_t sfp_dma, uint16_t addr, - uint16_t off, uint16_t count) -{ - int rval; - mbx_cmd_t mc; - mbx_cmd_t *mcp = &mc; - - if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) - return QLA_FUNCTION_FAILED; - - DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); - - mcp->mb[0] = MBC_READ_SFP; - mcp->mb[1] = addr; - mcp->mb[2] = MSW(sfp_dma); - mcp->mb[3] = LSW(sfp_dma); - mcp->mb[6] = MSW(MSD(sfp_dma)); - mcp->mb[7] = LSW(MSD(sfp_dma)); - mcp->mb[8] = count; - mcp->mb[9] = off; - mcp->mb[10] = 0; - mcp->out_mb = MBX_10|MBX_9|MBX_8|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; - mcp->in_mb = MBX_0; - mcp->tov = 30; - mcp->flags = 0; - rval = qla2x00_mailbox_command(ha, mcp); - - if (rval != QLA_SUCCESS) { - DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, - ha->host_no, rval, mcp->mb[0])); - } else { - DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); - } - - return rval; -} diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index ef45f7490..584fe5d8e 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -39,14 +39,14 @@ MODULE_PARM_DESC(ql2xlogintimeout, int qlport_down_retry = 30; module_param(qlport_down_retry, int, S_IRUGO|S_IRUSR); MODULE_PARM_DESC(qlport_down_retry, - "Maximum number of command retries to a port that returns " + "Maximum number of command retries to a port that returns" "a PORT-DOWN status."); int ql2xplogiabsentdevice; module_param(ql2xplogiabsentdevice, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(ql2xplogiabsentdevice, "Option to enable PLOGI to devices that are not present after " - "a Fabric scan. This is needed for several broken switches. " + "a Fabric scan. This is needed for several broken switches." "Default is 0 - no PLOGI. 1 - perfom PLOGI."); int ql2xloginretrycount = 0; @@ -54,18 +54,12 @@ module_param(ql2xloginretrycount, int, S_IRUGO|S_IRUSR); MODULE_PARM_DESC(ql2xloginretrycount, "Specify an alternate value for the NVRAM login retry count."); -int ql2xallocfwdump = 1; -module_param(ql2xallocfwdump, int, S_IRUGO|S_IRUSR); -MODULE_PARM_DESC(ql2xallocfwdump, - "Option to enable allocation of memory for a firmware dump " - "during HBA initialization. Memory allocation requirements " - "vary by ISP type. Default is 1 - allocate memory."); - -int extended_error_logging; -module_param(extended_error_logging, int, S_IRUGO|S_IRUSR); -MODULE_PARM_DESC(extended_error_logging, - "Option to enable extended error logging, " - "Default is 0 - no logging. 1 - log errors."); +#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) +int ql2xfwloadflash; +module_param(ql2xfwloadflash, int, S_IRUGO|S_IRUSR); +MODULE_PARM_DESC(ql2xfwloadflash, + "Load ISP24xx firmware image from FLASH (onboard memory)."); +#endif static void qla2x00_free_device(scsi_qla_host_t *); @@ -77,6 +71,12 @@ MODULE_PARM_DESC(ql2xfdmienable, "Enables FDMI registratons " "Default is 0 - no FDMI. 1 - perfom FDMI."); +int ql2xprocessrscn; +module_param(ql2xprocessrscn, int, S_IRUGO|S_IRUSR); +MODULE_PARM_DESC(ql2xprocessrscn, + "Option to enable port RSCN handling via a series of less" + "fabric intrusive ADISCs and PLOGIs."); + /* * SCSI host template entry points */ @@ -99,7 +99,7 @@ static int qla2x00_change_queue_type(struct scsi_device *, int); static struct scsi_host_template qla2x00_driver_template = { .module = THIS_MODULE, - .name = QLA2XXX_DRIVER_NAME, + .name = "qla2xxx", .queuecommand = qla2x00_queuecommand, .eh_abort_handler = qla2xxx_eh_abort, @@ -128,7 +128,7 @@ static struct scsi_host_template qla2x00_driver_template = { static struct scsi_host_template qla24xx_driver_template = { .module = THIS_MODULE, - .name = QLA2XXX_DRIVER_NAME, + .name = "qla2xxx", .queuecommand = qla24xx_queuecommand, .eh_abort_handler = qla2xxx_eh_abort, @@ -340,6 +340,7 @@ qla2x00_get_new_sp(scsi_qla_host_t *ha, fc_port_t *fcport, if (!sp) return sp; + atomic_set(&sp->ref_count, 1); sp->ha = ha; sp->fcport = fcport; sp->cmd = cmd; @@ -576,10 +577,6 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) while ((!atomic_read(&ha->loop_down_timer) && atomic_read(&ha->loop_state) == LOOP_DOWN) || atomic_read(&ha->loop_state) != LOOP_READY) { - if (atomic_read(&ha->loop_state) == LOOP_DEAD) { - return_status = QLA_FUNCTION_FAILED; - break; - } msleep(1000); if (time_after_eq(jiffies, loop_timeout)) { return_status = QLA_FUNCTION_FAILED; @@ -635,9 +632,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) if (sp->cmd != cmd) continue; - DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld.\n", - __func__, ha->host_no, sp, serial)); - DEBUG3(qla2x00_print_scsi_cmd(cmd)); + DEBUG2(printk("%s(%ld): aborting sp %p from RISC. pid=%ld " + "sp->state=%x\n", __func__, ha->host_no, sp, serial, + sp->state)); + DEBUG3(qla2x00_print_scsi_cmd(cmd);) spin_unlock_irqrestore(&ha->hardware_lock, flags); if (ha->isp_ops.abort_command(ha, sp)) { @@ -744,6 +742,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) { scsi_qla_host_t *ha = to_qla_host(cmd->device->host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; + srb_t *sp; int ret; unsigned int id, lun; unsigned long serial; @@ -754,7 +753,8 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) lun = cmd->device->lun; serial = cmd->serial_number; - if (!fcport) + sp = (srb_t *) CMD_SP(cmd); + if (!sp || !fcport) return ret; qla_printk(KERN_INFO, ha, @@ -777,7 +777,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) #endif } else { DEBUG2(printk(KERN_INFO - "%s failed: loop not ready\n",__func__)); + "%s failed: loop not ready\n",__func__);) } if (ret == FAILED) { @@ -873,6 +873,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) { scsi_qla_host_t *ha = to_qla_host(cmd->device->host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; + srb_t *sp; int ret; unsigned int id, lun; unsigned long serial; @@ -883,7 +884,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) lun = cmd->device->lun; serial = cmd->serial_number; - if (!fcport) + sp = (srb_t *) CMD_SP(cmd); + if (!sp || !fcport) return ret; qla_printk(KERN_INFO, ha, @@ -932,6 +934,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) { scsi_qla_host_t *ha = to_qla_host(cmd->device->host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; + srb_t *sp; int ret; unsigned int id, lun; unsigned long serial; @@ -942,7 +945,8 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) lun = cmd->device->lun; serial = cmd->serial_number; - if (!fcport) + sp = (srb_t *) CMD_SP(cmd); + if (!sp || !fcport) return ret; qla_printk(KERN_INFO, ha, @@ -1028,12 +1032,12 @@ qla2x00_loop_reset(scsi_qla_host_t *ha) /* Empty */ DEBUG2_3(printk("%s(%ld): **** FAILED ****\n", __func__, - ha->host_no)); + ha->host_no);) } else { /* Empty */ DEBUG3(printk("%s(%ld): exiting normally.\n", __func__, - ha->host_no)); + ha->host_no);) } return(status); @@ -1153,22 +1157,18 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) case PCI_DEVICE_ID_QLOGIC_ISP2100: ha->device_type |= DT_ISP2100; ha->device_type &= ~DT_EXTENDED_IDS; - ha->fw_srisc_address = RISC_START_ADDRESS_2100; break; case PCI_DEVICE_ID_QLOGIC_ISP2200: ha->device_type |= DT_ISP2200; ha->device_type &= ~DT_EXTENDED_IDS; - ha->fw_srisc_address = RISC_START_ADDRESS_2100; break; case PCI_DEVICE_ID_QLOGIC_ISP2300: ha->device_type |= DT_ISP2300; ha->device_type |= DT_ZIO_SUPPORTED; - ha->fw_srisc_address = RISC_START_ADDRESS_2300; break; case PCI_DEVICE_ID_QLOGIC_ISP2312: ha->device_type |= DT_ISP2312; ha->device_type |= DT_ZIO_SUPPORTED; - ha->fw_srisc_address = RISC_START_ADDRESS_2300; break; case PCI_DEVICE_ID_QLOGIC_ISP2322: ha->device_type |= DT_ISP2322; @@ -1176,33 +1176,26 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) if (ha->pdev->subsystem_vendor == 0x1028 && ha->pdev->subsystem_device == 0x0170) ha->device_type |= DT_OEM_001; - ha->fw_srisc_address = RISC_START_ADDRESS_2300; break; case PCI_DEVICE_ID_QLOGIC_ISP6312: ha->device_type |= DT_ISP6312; - ha->fw_srisc_address = RISC_START_ADDRESS_2300; break; case PCI_DEVICE_ID_QLOGIC_ISP6322: ha->device_type |= DT_ISP6322; - ha->fw_srisc_address = RISC_START_ADDRESS_2300; break; case PCI_DEVICE_ID_QLOGIC_ISP2422: ha->device_type |= DT_ISP2422; ha->device_type |= DT_ZIO_SUPPORTED; - ha->fw_srisc_address = RISC_START_ADDRESS_2400; break; case PCI_DEVICE_ID_QLOGIC_ISP2432: ha->device_type |= DT_ISP2432; ha->device_type |= DT_ZIO_SUPPORTED; - ha->fw_srisc_address = RISC_START_ADDRESS_2400; break; case PCI_DEVICE_ID_QLOGIC_ISP5422: ha->device_type |= DT_ISP5422; - ha->fw_srisc_address = RISC_START_ADDRESS_2400; break; case PCI_DEVICE_ID_QLOGIC_ISP5432: ha->device_type |= DT_ISP5432; - ha->fw_srisc_address = RISC_START_ADDRESS_2400; break; } } @@ -1249,7 +1242,7 @@ qla2x00_iospace_config(scsi_qla_host_t *ha) goto iospace_error_exit; } - if (pci_request_regions(ha->pdev, QLA2XXX_DRIVER_NAME)) { + if (pci_request_regions(ha->pdev, ha->brd_info->drv_name)) { qla_printk(KERN_WARNING, ha, "Failed to reserve PIO/MMIO regions (%s)\n", pci_name(ha->pdev)); @@ -1331,8 +1324,7 @@ qla24xx_disable_intrs(scsi_qla_host_t *ha) /* * PCI driver interface */ -static int __devinit -qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) { int ret = -ENODEV; device_reg_t __iomem *reg; @@ -1366,7 +1358,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->pdev = pdev; ha->host = host; ha->host_no = host->host_no; - sprintf(ha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, ha->host_no); + ha->brd_info = brd_info; + sprintf(ha->host_str, "%s_%ld", ha->brd_info->drv_name, ha->host_no); /* Set ISP-type information. */ qla2x00_set_isp_flags(ha); @@ -1383,6 +1376,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) spin_lock_init(&ha->hardware_lock); ha->prev_topology = 0; + ha->ports = MAX_BUSES; ha->init_cb_size = sizeof(init_cb_t); ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; ha->link_data_rate = LDR_UNKNOWN; @@ -1413,6 +1407,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->isp_ops.read_nvram = qla2x00_read_nvram_data; ha->isp_ops.write_nvram = qla2x00_write_nvram_data; ha->isp_ops.fw_dump = qla2100_fw_dump; + ha->isp_ops.ascii_fw_dump = qla2100_ascii_fw_dump; ha->isp_ops.read_optrom = qla2x00_read_optrom_data; ha->isp_ops.write_optrom = qla2x00_write_optrom_data; if (IS_QLA2100(ha)) { @@ -1439,6 +1434,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->isp_ops.pci_config = qla2300_pci_config; ha->isp_ops.intr_handler = qla2300_intr_handler; ha->isp_ops.fw_dump = qla2300_fw_dump; + ha->isp_ops.ascii_fw_dump = qla2300_ascii_fw_dump; ha->isp_ops.beacon_on = qla2x00_beacon_on; ha->isp_ops.beacon_off = qla2x00_beacon_off; ha->isp_ops.beacon_blink = qla2x00_beacon_blink; @@ -1461,6 +1457,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->isp_ops.nvram_config = qla24xx_nvram_config; ha->isp_ops.update_fw_options = qla24xx_update_fw_options; ha->isp_ops.load_risc = qla24xx_load_risc; +#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) + if (ql2xfwloadflash) + ha->isp_ops.load_risc = qla24xx_load_risc_flash; +#endif ha->isp_ops.pci_info_str = qla24xx_pci_info_str; ha->isp_ops.fw_version_str = qla24xx_fw_version_str; ha->isp_ops.intr_handler = qla24xx_intr_handler; @@ -1475,6 +1475,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->isp_ops.read_nvram = qla24xx_read_nvram_data; ha->isp_ops.write_nvram = qla24xx_write_nvram_data; ha->isp_ops.fw_dump = qla24xx_fw_dump; + ha->isp_ops.ascii_fw_dump = qla24xx_ascii_fw_dump; ha->isp_ops.read_optrom = qla24xx_read_optrom_data; ha->isp_ops.write_optrom = qla24xx_write_optrom_data; ha->isp_ops.beacon_on = qla24xx_beacon_on; @@ -1493,6 +1494,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) INIT_LIST_HEAD(&ha->list); INIT_LIST_HEAD(&ha->fcports); + INIT_LIST_HEAD(&ha->rscn_fcports); /* * These locks are used to prevent more than one CPU @@ -1541,12 +1543,12 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->cmd_per_lun = 3; host->unique_id = ha->instance; host->max_cmd_len = MAX_CMDSZ; - host->max_channel = MAX_BUSES - 1; + host->max_channel = ha->ports - 1; host->max_lun = MAX_LUNS; host->transportt = qla2xxx_transport_template; ret = request_irq(pdev->irq, ha->isp_ops.intr_handler, - IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); + SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); if (ret) { qla_printk(KERN_WARNING, ha, "Failed to reserve interrupt %d already in use.\n", @@ -1644,9 +1646,9 @@ probe_disable_device: probe_out: return ret; } +EXPORT_SYMBOL_GPL(qla2x00_probe_one); -static void __devexit -qla2x00_remove_one(struct pci_dev *pdev) +void qla2x00_remove_one(struct pci_dev *pdev) { scsi_qla_host_t *ha; @@ -1664,10 +1666,15 @@ qla2x00_remove_one(struct pci_dev *pdev) pci_set_drvdata(pdev, NULL); } +EXPORT_SYMBOL_GPL(qla2x00_remove_one); static void qla2x00_free_device(scsi_qla_host_t *ha) { + /* Abort any outstanding IO descriptors. */ + if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) + qla2x00_cancel_io_descriptors(ha); + /* Disable timer */ if (ha->timer_active) qla2x00_stop_timer(ha); @@ -1684,9 +1691,6 @@ qla2x00_free_device(scsi_qla_host_t *ha) kthread_stop(t); } - if (ha->eft) - qla2x00_trace_control(ha, TC_DISABLE, 0, 0); - /* Stop currently executing firmware. */ qla2x00_stop_firmware(ha); @@ -1880,8 +1884,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) continue; } - snprintf(name, sizeof(name), "%s_%ld", QLA2XXX_DRIVER_NAME, - ha->host_no); + ha->rlc_rsp = dma_alloc_coherent(&ha->pdev->dev, + sizeof(rpt_lun_cmd_rsp_t), &ha->rlc_rsp_dma, GFP_KERNEL); + if (ha->rlc_rsp == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - rlc"); + + qla2x00_mem_free(ha); + msleep(100); + + continue; + } + + snprintf(name, sizeof(name), "qla2xxx_%ld", ha->host_no); ha->s_dma_pool = dma_pool_create(name, &ha->pdev->dev, DMA_POOL_SIZE, 8, 0); if (ha->s_dma_pool == NULL) { @@ -1908,6 +1923,32 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) } memset(ha->init_cb, 0, ha->init_cb_size); + /* Get consistent memory allocated for Get Port Database cmd */ + ha->iodesc_pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, + &ha->iodesc_pd_dma); + if (ha->iodesc_pd == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - iodesc_pd\n"); + + qla2x00_mem_free(ha); + msleep(100); + + continue; + } + memset(ha->iodesc_pd, 0, PORT_DATABASE_SIZE); + + /* Allocate ioctl related memory. */ + if (qla2x00_alloc_ioctl_mem(ha)) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - ioctl_mem\n"); + + qla2x00_mem_free(ha); + msleep(100); + + continue; + } + if (qla2x00_allocate_sp_pool(ha)) { qla_printk(KERN_WARNING, ha, "Memory Allocation failed - " @@ -1970,26 +2011,6 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) continue; } memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt)); - - if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { - /* - * Get consistent memory allocated for SFP - * block. - */ - ha->sfp_data = dma_pool_alloc(ha->s_dma_pool, - GFP_KERNEL, &ha->sfp_data_dma); - if (ha->sfp_data == NULL) { - qla_printk(KERN_WARNING, ha, - "Memory Allocation failed - " - "sfp_data\n"); - - qla2x00_mem_free(ha); - msleep(100); - - continue; - } - memset(ha->sfp_data, 0, SFP_BLOCK_SIZE); - } } /* Done all allocations without any error. */ @@ -2024,16 +2045,12 @@ qla2x00_mem_free(scsi_qla_host_t *ha) return; } + /* free ioctl memory */ + qla2x00_free_ioctl_mem(ha); + /* free sp pool */ qla2x00_free_sp_pool(ha); - if (ha->fw_dump) { - if (ha->eft) - dma_free_coherent(&ha->pdev->dev, - ntohl(ha->fw_dump->eft_size), ha->eft, ha->eft_dma); - vfree(ha->fw_dump); - } - if (ha->sns_cmd) dma_free_coherent(&ha->pdev->dev, sizeof(struct sns_cmd_pkt), ha->sns_cmd, ha->sns_cmd_dma); @@ -2042,18 +2059,23 @@ qla2x00_mem_free(scsi_qla_host_t *ha) dma_free_coherent(&ha->pdev->dev, sizeof(struct ct_sns_pkt), ha->ct_sns, ha->ct_sns_dma); - if (ha->sfp_data) - dma_pool_free(ha->s_dma_pool, ha->sfp_data, ha->sfp_data_dma); - if (ha->ms_iocb) dma_pool_free(ha->s_dma_pool, ha->ms_iocb, ha->ms_iocb_dma); + if (ha->iodesc_pd) + dma_pool_free(ha->s_dma_pool, ha->iodesc_pd, ha->iodesc_pd_dma); + if (ha->init_cb) dma_pool_free(ha->s_dma_pool, ha->init_cb, ha->init_cb_dma); if (ha->s_dma_pool) dma_pool_destroy(ha->s_dma_pool); + if (ha->rlc_rsp) + dma_free_coherent(&ha->pdev->dev, + sizeof(rpt_lun_cmd_rsp_t), ha->rlc_rsp, + ha->rlc_rsp_dma); + if (ha->gid_list) dma_free_coherent(&ha->pdev->dev, GID_LIST_SIZE, ha->gid_list, ha->gid_list_dma); @@ -2068,19 +2090,21 @@ qla2x00_mem_free(scsi_qla_host_t *ha) (ha->request_q_length + 1) * sizeof(request_t), ha->request_ring, ha->request_dma); - ha->eft = NULL; - ha->eft_dma = 0; ha->sns_cmd = NULL; ha->sns_cmd_dma = 0; ha->ct_sns = NULL; ha->ct_sns_dma = 0; ha->ms_iocb = NULL; ha->ms_iocb_dma = 0; + ha->iodesc_pd = NULL; + ha->iodesc_pd_dma = 0; ha->init_cb = NULL; ha->init_cb_dma = 0; ha->s_dma_pool = NULL; + ha->rlc_rsp = NULL; + ha->rlc_rsp_dma = 0; ha->gid_list = NULL; ha->gid_list_dma = 0; @@ -2098,9 +2122,18 @@ qla2x00_mem_free(scsi_qla_host_t *ha) } INIT_LIST_HEAD(&ha->fcports); + if (ha->fw_dump) + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + + vfree(ha->fw_dump24); + + vfree(ha->fw_dump_buffer); + ha->fw_dump = NULL; + ha->fw_dump24 = NULL; ha->fw_dumped = 0; ha->fw_dump_reading = 0; + ha->fw_dump_buffer = NULL; vfree(ha->optrom_buffer); } @@ -2115,6 +2148,8 @@ qla2x00_mem_free(scsi_qla_host_t *ha) * * Context: * Kernel context. + * + * Note: Sets the ref_count for non Null sp to one. */ static int qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) @@ -2238,6 +2273,9 @@ qla2x00_do_dpc(void *data) next_loopid = 0; list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->port_type != FCT_TARGET) + continue; + /* * If the port is not ONLINE then try to login * to it if we haven't run out of retries. @@ -2555,6 +2593,14 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout) return -ETIMEDOUT; } +#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) + +#define qla2x00_release_firmware() do { } while (0) +#define qla2x00_pci_module_init() (0) +#define qla2x00_pci_module_exit() do { } while (0) + +#else /* !defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) */ + /* Firmware interface routines. */ #define FW_BLOBS 5 @@ -2566,14 +2612,12 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout) static DECLARE_MUTEX(qla_fw_lock); -extern struct firmware ql2100_fw, ql2200_fw, ql2300_fw, ql2322_fw, ql2400_fw; - static struct fw_blob qla_fw_blobs[FW_BLOBS] = { - { .name = "ql2100_fw.bin", .segs = { 0x1000, 0 }, .fw = &ql2100_fw }, - { .name = "ql2200_fw.bin", .segs = { 0x1000, 0 }, .fw = &ql2200_fw }, - { .name = "ql2300_fw.bin", .segs = { 0x800, 0 }, .fw = &ql2300_fw }, - { .name = "ql2322_fw.bin", .segs = { 0x800, 0x1c000, 0x1e000, 0 }, .fw = &ql2322_fw }, - { .name = "ql2400_fw.bin", .fw = &ql2400_fw }, + { .name = "ql2100_fw.bin", .segs = { 0x1000, 0 }, }, + { .name = "ql2200_fw.bin", .segs = { 0x1000, 0 }, }, + { .name = "ql2300_fw.bin", .segs = { 0x800, 0 }, }, + { .name = "ql2322_fw.bin", .segs = { 0x800, 0x1c000, 0x1e000, 0 }, }, + { .name = "ql2400_fw.bin", }, }; struct fw_blob * @@ -2623,32 +2667,73 @@ qla2x00_release_firmware(void) up(&qla_fw_lock); } +static struct qla_board_info qla_board_tbl = { + .drv_name = "qla2xxx", +}; + static struct pci_device_id qla2xxx_pci_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2300) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2312) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2322) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP6312) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP6322) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2422) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2432) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5422) }, - { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5432) }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2300, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2312, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2322, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP6312, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP6322, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2422, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2432, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5422, + PCI_ANY_ID, PCI_ANY_ID, }, + { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5432, + PCI_ANY_ID, PCI_ANY_ID, }, { 0 }, }; MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl); +static int __devinit +qla2xxx_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) +{ + return qla2x00_probe_one(pdev, &qla_board_tbl); +} + +static void __devexit +qla2xxx_remove_one(struct pci_dev *pdev) +{ + qla2x00_remove_one(pdev); +} + static struct pci_driver qla2xxx_pci_driver = { - .name = QLA2XXX_DRIVER_NAME, + .name = "qla2xxx", .driver = { .owner = THIS_MODULE, }, .id_table = qla2xxx_pci_tbl, - .probe = qla2x00_probe_one, - .remove = __devexit_p(qla2x00_remove_one), + .probe = qla2xxx_probe_one, + .remove = __devexit_p(qla2xxx_remove_one), }; +static inline int +qla2x00_pci_module_init(void) +{ + return pci_module_init(&qla2xxx_pci_driver); +} + +static inline void +qla2x00_pci_module_exit(void) +{ + pci_unregister_driver(&qla2xxx_pci_driver); +} + +#endif + /** * qla2x00_module_init - Module initialization. **/ @@ -2668,16 +2753,19 @@ qla2x00_module_init(void) /* Derive version string. */ strcpy(qla2x00_version_str, QLA2XXX_VERSION); - if (extended_error_logging) - strcat(qla2x00_version_str, "-debug"); - +#if defined(CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE) + strcat(qla2x00_version_str, "-fw"); +#endif +#if DEBUG_QLA2100 + strcat(qla2x00_version_str, "-debug"); +#endif qla2xxx_transport_template = fc_attach_transport(&qla2xxx_transport_functions); if (!qla2xxx_transport_template) return -ENODEV; printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n"); - ret = pci_register_driver(&qla2xxx_pci_driver); + ret = qla2x00_pci_module_init(); if (ret) { kmem_cache_destroy(srb_cachep); fc_release_transport(qla2xxx_transport_template); @@ -2691,8 +2779,8 @@ qla2x00_module_init(void) static void __exit qla2x00_module_exit(void) { - pci_unregister_driver(&qla2xxx_pci_driver); - /* qla2x00_release_firmware(); */ + qla2x00_pci_module_exit(); + qla2x00_release_firmware(); kmem_cache_destroy(srb_cachep); fc_release_transport(qla2xxx_transport_template); } diff --git a/drivers/scsi/qla2xxx/qla_rscn.c b/drivers/scsi/qla2xxx/qla_rscn.c new file mode 100644 index 000000000..b70bebe18 --- /dev/null +++ b/drivers/scsi/qla2xxx/qla_rscn.c @@ -0,0 +1,1426 @@ +/* + * QLogic Fibre Channel HBA Driver + * Copyright (c) 2003-2005 QLogic Corporation + * + * See LICENSE.qla2xxx for copyright and licensing details. + */ +#include "qla_def.h" + +/** + * IO descriptor handle definitions. + * + * Signature form: + * + * |31------28|27-------------------12|11-------0| + * | Type | Rolling Signature | Index | + * |----------|-----------------------|----------| + * + **/ + +#define HDL_TYPE_SCSI 0 +#define HDL_TYPE_ASYNC_IOCB 0x0A + +#define HDL_INDEX_BITS 12 +#define HDL_ITER_BITS 16 +#define HDL_TYPE_BITS 4 + +#define HDL_INDEX_MASK ((1UL << HDL_INDEX_BITS) - 1) +#define HDL_ITER_MASK ((1UL << HDL_ITER_BITS) - 1) +#define HDL_TYPE_MASK ((1UL << HDL_TYPE_BITS) - 1) + +#define HDL_INDEX_SHIFT 0 +#define HDL_ITER_SHIFT (HDL_INDEX_SHIFT + HDL_INDEX_BITS) +#define HDL_TYPE_SHIFT (HDL_ITER_SHIFT + HDL_ITER_BITS) + +/* Local Prototypes. */ +static inline uint32_t qla2x00_to_handle(uint16_t, uint16_t, uint16_t); +static inline uint16_t qla2x00_handle_to_idx(uint32_t); +static inline uint32_t qla2x00_iodesc_to_handle(struct io_descriptor *); +static inline struct io_descriptor *qla2x00_handle_to_iodesc(scsi_qla_host_t *, + uint32_t); + +static inline struct io_descriptor *qla2x00_alloc_iodesc(scsi_qla_host_t *); +static inline void qla2x00_free_iodesc(struct io_descriptor *); +static inline void qla2x00_init_io_descriptors(scsi_qla_host_t *); + +static void qla2x00_iodesc_timeout(unsigned long); +static inline void qla2x00_add_iodesc_timer(struct io_descriptor *); +static inline void qla2x00_remove_iodesc_timer(struct io_descriptor *); + +static inline void qla2x00_update_login_fcport(scsi_qla_host_t *, + struct mbx_entry *, fc_port_t *); + +static int qla2x00_send_abort_iocb(scsi_qla_host_t *, struct io_descriptor *, + uint32_t, int); +static int qla2x00_send_abort_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +static int qla2x00_send_adisc_iocb(scsi_qla_host_t *, struct io_descriptor *, + int); +static int qla2x00_send_adisc_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +static int qla2x00_send_logout_iocb(scsi_qla_host_t *, struct io_descriptor *, + int); +static int qla2x00_send_logout_iocb_cb(scsi_qla_host_t *, + struct io_descriptor *, struct mbx_entry *); + +static int qla2x00_send_login_iocb(scsi_qla_host_t *, struct io_descriptor *, + port_id_t *, int); +static int qla2x00_send_login_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +/** + * Mailbox IOCB callback array. + **/ +static int (*iocb_function_cb_list[LAST_IOCB_CB]) + (scsi_qla_host_t *, struct io_descriptor *, struct mbx_entry *) = { + + qla2x00_send_abort_iocb_cb, + qla2x00_send_adisc_iocb_cb, + qla2x00_send_logout_iocb_cb, + qla2x00_send_login_iocb_cb, +}; + + +/** + * Generic IO descriptor handle routines. + **/ + +/** + * qla2x00_to_handle() - Create a descriptor handle. + * @type: descriptor type + * @iter: descriptor rolling signature + * @idx: index to the descriptor array + * + * Returns a composite handle based in the @type, @iter, and @idx. + */ +static inline uint32_t +qla2x00_to_handle(uint16_t type, uint16_t iter, uint16_t idx) +{ + return ((uint32_t)(((uint32_t)type << HDL_TYPE_SHIFT) | + ((uint32_t)iter << HDL_ITER_SHIFT) | + ((uint32_t)idx << HDL_INDEX_SHIFT))); +} + +/** + * qla2x00_handle_to_idx() - Retrive the index for a given handle. + * @handle: descriptor handle + * + * Returns the index specified by the @handle. + */ +static inline uint16_t +qla2x00_handle_to_idx(uint32_t handle) +{ + return ((uint16_t)(((handle) >> HDL_INDEX_SHIFT) & HDL_INDEX_MASK)); +} + +/** + * qla2x00_iodesc_to_handle() - Convert an IO descriptor to a unique handle. + * @iodesc: io descriptor + * + * Returns a unique handle for @iodesc. + */ +static inline uint32_t +qla2x00_iodesc_to_handle(struct io_descriptor *iodesc) +{ + uint32_t handle; + + handle = qla2x00_to_handle(HDL_TYPE_ASYNC_IOCB, + ++iodesc->ha->iodesc_signature, iodesc->idx); + iodesc->signature = handle; + + return (handle); +} + +/** + * qla2x00_handle_to_iodesc() - Retrieve an IO descriptor given a unique handle. + * @ha: HA context + * @handle: handle to io descriptor + * + * Returns a pointer to the io descriptor, or NULL, if the io descriptor does + * not exist or the io descriptors signature does not @handle. + */ +static inline struct io_descriptor * +qla2x00_handle_to_iodesc(scsi_qla_host_t *ha, uint32_t handle) +{ + uint16_t idx; + struct io_descriptor *iodesc; + + idx = qla2x00_handle_to_idx(handle); + iodesc = &ha->io_descriptors[idx]; + if (iodesc) + if (iodesc->signature != handle) + iodesc = NULL; + + return (iodesc); +} + + +/** + * IO descriptor allocation routines. + **/ + +/** + * qla2x00_alloc_iodesc() - Allocate an IO descriptor from the pool. + * @ha: HA context + * + * Returns a pointer to the allocated io descriptor, or NULL, if none available. + */ +static inline struct io_descriptor * +qla2x00_alloc_iodesc(scsi_qla_host_t *ha) +{ + uint16_t iter; + struct io_descriptor *iodesc; + + iodesc = NULL; + for (iter = 0; iter < MAX_IO_DESCRIPTORS; iter++) { + if (ha->io_descriptors[iter].used) + continue; + + iodesc = &ha->io_descriptors[iter]; + iodesc->used = 1; + iodesc->idx = iter; + init_timer(&iodesc->timer); + iodesc->ha = ha; + iodesc->signature = qla2x00_iodesc_to_handle(iodesc); + break; + } + + return (iodesc); +} + +/** + * qla2x00_free_iodesc() - Free an IO descriptor. + * @iodesc: io descriptor + * + * NOTE: The io descriptors timer *must* be stopped before it can be free'd. + */ +static inline void +qla2x00_free_iodesc(struct io_descriptor *iodesc) +{ + iodesc->used = 0; + iodesc->signature = 0; +} + +/** + * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor. + * @iodesc: io descriptor + */ +static inline void +qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc) +{ + if (iodesc->timer.function != NULL) { + del_timer_sync(&iodesc->timer); + iodesc->timer.data = (unsigned long) NULL; + iodesc->timer.function = NULL; + } +} + +/** + * qla2x00_init_io_descriptors() - Initialize the pool of IO descriptors. + * @ha: HA context + */ +static inline void +qla2x00_init_io_descriptors(scsi_qla_host_t *ha) +{ + uint16_t iter; + + for (iter = 0; iter < MAX_IO_DESCRIPTORS; iter++) { + if (!ha->io_descriptors[iter].used) + continue; + + qla2x00_remove_iodesc_timer(&ha->io_descriptors[iter]); + qla2x00_free_iodesc(&ha->io_descriptors[iter]); + } +} + + +/** + * IO descriptor timer routines. + **/ + +/** + * qla2x00_iodesc_timeout() - Timeout IO descriptor handler. + * @data: io descriptor + */ +static void +qla2x00_iodesc_timeout(unsigned long data) +{ + struct io_descriptor *iodesc; + + iodesc = (struct io_descriptor *) data; + + DEBUG14(printk("scsi(%ld): IO descriptor timeout, index=%x " + "signature=%08x, scheduling ISP abort.\n", iodesc->ha->host_no, + iodesc->idx, iodesc->signature)); + + qla2x00_free_iodesc(iodesc); + + qla_printk(KERN_WARNING, iodesc->ha, + "IO descriptor timeout. Scheduling ISP abort.\n"); + set_bit(ISP_ABORT_NEEDED, &iodesc->ha->dpc_flags); +} + +/** + * qla2x00_add_iodesc_timer() - Add and start a timer for an IO descriptor. + * @iodesc: io descriptor + * + * NOTE: + * The firmware shall timeout an outstanding mailbox IOCB in 2 * R_A_TOV (in + * tenths of a second) after it hits the wire. But, if there are any request + * resource contraints (i.e. during heavy I/O), exchanges can be held off for + * at most R_A_TOV. Therefore, the driver will wait 4 * R_A_TOV before + * scheduling a recovery (big hammer). + */ +static inline void +qla2x00_add_iodesc_timer(struct io_descriptor *iodesc) +{ + unsigned long timeout; + + timeout = (iodesc->ha->r_a_tov * 4) / 10; + init_timer(&iodesc->timer); + iodesc->timer.data = (unsigned long) iodesc; + iodesc->timer.expires = jiffies + (timeout * HZ); + iodesc->timer.function = + (void (*) (unsigned long)) qla2x00_iodesc_timeout; + add_timer(&iodesc->timer); +} + +/** + * IO descriptor support routines. + **/ + +/** + * qla2x00_update_login_fcport() - Update fcport data after login processing. + * @ha: HA context + * @mbxstat: Mailbox command status IOCB + * @fcport: port to update + */ +static inline void +qla2x00_update_login_fcport(scsi_qla_host_t *ha, struct mbx_entry *mbxstat, + fc_port_t *fcport) +{ + if (le16_to_cpu(mbxstat->mb1) & BIT_0) { + fcport->port_type = FCT_INITIATOR; + } else { + fcport->port_type = FCT_TARGET; + if (le16_to_cpu(mbxstat->mb1) & BIT_1) { + fcport->flags |= FCF_TAPE_PRESENT; + } + } + fcport->login_retry = 0; + fcport->port_login_retry_count = ha->port_down_retry_count * + PORT_RETRY_TIME; + atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * + PORT_RETRY_TIME); + fcport->flags |= FCF_FABRIC_DEVICE; + fcport->flags &= ~FCF_FAILOVER_NEEDED; + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + atomic_set(&fcport->state, FCS_ONLINE); + schedule_work(&fcport->rport_add_work); +} + + +/** + * Mailbox IOCB commands. + **/ + +/** + * qla2x00_get_mbx_iocb_entry() - Retrieve an IOCB from the request queue. + * @ha: HA context + * @handle: handle to io descriptor + * + * Returns a pointer to the reqest entry, or NULL, if none were available. + */ +static inline struct mbx_entry * +qla2x00_get_mbx_iocb_entry(scsi_qla_host_t *ha, uint32_t handle) +{ + uint16_t cnt; + struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; + struct mbx_entry *mbxentry; + + mbxentry = NULL; + + if (ha->req_q_cnt < 3) { + cnt = qla2x00_debounce_register(ISP_REQ_Q_OUT(ha, reg)); + if (ha->req_ring_index < cnt) + ha->req_q_cnt = cnt - ha->req_ring_index; + else + ha->req_q_cnt = ha->request_q_length - + (ha->req_ring_index - cnt); + } + if (ha->req_q_cnt >= 3) { + mbxentry = (struct mbx_entry *)ha->request_ring_ptr; + + memset(mbxentry, 0, sizeof(struct mbx_entry)); + mbxentry->entry_type = MBX_IOCB_TYPE; + mbxentry->entry_count = 1; + mbxentry->sys_define1 = SOURCE_ASYNC_IOCB; + mbxentry->handle = handle; + } + return (mbxentry); +} + +/** + * qla2x00_send_abort_iocb() - Issue an abort IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @handle_to_abort: firmware handle to abort + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_abort_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + uint32_t handle_to_abort, int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build abort mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_ABORT_COMMAND); + mbxentry->mb1 = mbxentry->loop_id.extended = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = LSW(handle_to_abort); + mbxentry->mb3 = MSW(handle_to_abort); + wmb(); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Abort IOCB (%08x) to [%x], aborting " + "%08x.\n", ha->host_no, iodesc->signature, + iodesc->remote_fcport->loop_id, handle_to_abort)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_abort_iocb_cb() - Abort IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_abort_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + DEBUG14(printk("scsi(%ld): Abort IOCB -- sent to [%x/%02x%02x%02x], " + "status=%x mb0=%x.\n", ha->host_no, iodesc->remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, iodesc->d_id.b.al_pa, + le16_to_cpu(mbxstat->status), le16_to_cpu(mbxstat->mb0))); + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_adisc_iocb() - Issue a Get Port Database IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_adisc_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build Get Port Database IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_GET_PORT_DATABASE); + mbxentry->mb1 = mbxentry->loop_id.extended = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = cpu_to_le16(MSW(LSD(ha->iodesc_pd_dma))); + mbxentry->mb3 = cpu_to_le16(LSW(LSD(ha->iodesc_pd_dma))); + mbxentry->mb6 = cpu_to_le16(MSW(MSD(ha->iodesc_pd_dma))); + mbxentry->mb7 = cpu_to_le16(LSW(MSD(ha->iodesc_pd_dma))); + mbxentry->mb10 = __constant_cpu_to_le16(BIT_0); + wmb(); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Adisc IOCB (%08x) to [%x].\n", + ha->host_no, iodesc->signature, iodesc->remote_fcport->loop_id)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_adisc_iocb_cb() - Get Port Database IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_adisc_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + fc_port_t *remote_fcport; + + remote_fcport = iodesc->remote_fcport; + + /* Ensure the port IDs are consistent. */ + if (remote_fcport->d_id.b24 != iodesc->d_id.b24) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- ignoring, remote port " + "id changed from [%02x%02x%02x] to [%02x%02x%02x].\n", + ha->host_no, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa)); + + return (QLA_SUCCESS); + } + + /* Only process the last command. */ + if (remote_fcport->iodesc_idx_sent != iodesc->idx) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- ignoring, sent to " + "[%02x%02x%02x], expected %x, received %x.\n", ha->host_no, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, + iodesc->idx)); + + return (QLA_SUCCESS); + } + + if (le16_to_cpu(mbxstat->status) == CS_COMPLETE) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- marking " + "[%x/%02x%02x%02x] online.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa)); + + atomic_set(&remote_fcport->state, FCS_ONLINE); + } else { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- marking " + "[%x/%02x%02x%02x] lost, status=%x mb0=%x.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa, + le16_to_cpu(mbxstat->status), le16_to_cpu(mbxstat->mb0))); + + if (atomic_read(&remote_fcport->state) != FCS_DEVICE_DEAD) + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + } + remote_fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_logout_iocb() - Issue a fabric port logout IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_logout_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build fabric port logout mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_LOGOUT_FABRIC_PORT); + mbxentry->mb1 = mbxentry->loop_id.extended = + cpu_to_le16(iodesc->remote_fcport->loop_id); + wmb(); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Logout IOCB (%08x) to [%x].\n", + ha->host_no, iodesc->signature, iodesc->remote_fcport->loop_id)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_logout_iocb_cb() - Fabric port logout IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_logout_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + DEBUG14(printk("scsi(%ld): Logout IOCB -- sent to [%x/%02x%02x%02x], " + "status=%x mb0=%x mb1=%x.\n", ha->host_no, + iodesc->remote_fcport->loop_id, + iodesc->remote_fcport->d_id.b.domain, + iodesc->remote_fcport->d_id.b.area, + iodesc->remote_fcport->d_id.b.al_pa, le16_to_cpu(mbxstat->status), + le16_to_cpu(mbxstat->mb0), le16_to_cpu(mbxstat->mb1))); + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_login_iocb() - Issue a fabric port login IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @d_id: port id for device + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_login_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + port_id_t *d_id, int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build fabric port login mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_LOGIN_FABRIC_PORT); + mbxentry->mb1 = mbxentry->loop_id.extended = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = cpu_to_le16(d_id->b.domain); + mbxentry->mb3 = cpu_to_le16(d_id->b.area << 8 | d_id->b.al_pa); + mbxentry->mb10 = __constant_cpu_to_le16(BIT_0); + wmb(); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Login IOCB (%08x) to " + "[%x/%02x%02x%02x].\n", ha->host_no, iodesc->signature, + iodesc->remote_fcport->loop_id, d_id->b.domain, d_id->b.area, + d_id->b.al_pa)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_login_iocb_cb() - Fabric port logout IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + int rval; + fc_port_t *fcport, *remote_fcport, *exist_fcport; + struct io_descriptor *abort_iodesc, *login_iodesc; + uint16_t status, mb[8]; + uint16_t reuse; + uint16_t remote_loopid; + port_id_t remote_did, inuse_did; + + remote_fcport = iodesc->remote_fcport; + + /* Only process the last command. */ + if (remote_fcport->iodesc_idx_sent != iodesc->idx) { + DEBUG14(printk("scsi(%ld): Login IOCB -- ignoring, sent to " + "[%02x%02x%02x], expected %x, received %x.\n", + ha->host_no, iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, + iodesc->idx)); + + /* Free RSCN fcport resources. */ + if (remote_fcport->port_type == FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- Freeing RSCN " + "fcport %p [%x/%02x%02x%02x] given ignored Login " + "IOCB.\n", ha->host_no, remote_fcport, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + return (QLA_SUCCESS); + } + + status = le16_to_cpu(mbxstat->status); + mb[0] = le16_to_cpu(mbxstat->mb0); + mb[1] = le16_to_cpu(mbxstat->mb1); + mb[2] = le16_to_cpu(mbxstat->mb2); + mb[6] = le16_to_cpu(mbxstat->mb6); + mb[7] = le16_to_cpu(mbxstat->mb7); + + /* Good status? */ + if ((status == CS_COMPLETE || status == CS_COMPLETE_CHKCOND) && + mb[0] == MBS_COMMAND_COMPLETE) { + + DEBUG14(printk("scsi(%ld): Login IOCB -- status=%x mb1=%x pn=" + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", ha->host_no, status, + mb[1], mbxstat->port_name[0], mbxstat->port_name[1], + mbxstat->port_name[2], mbxstat->port_name[3], + mbxstat->port_name[4], mbxstat->port_name[5], + mbxstat->port_name[6], mbxstat->port_name[7])); + + memcpy(remote_fcport->node_name, mbxstat->node_name, WWN_SIZE); + memcpy(remote_fcport->port_name, mbxstat->port_name, WWN_SIZE); + + /* Is the device already in our fcports list? */ + if (remote_fcport->port_type != FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- marking " + "[%x/%02x%02x%02x] online.\n", ha->host_no, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + qla2x00_update_login_fcport(ha, mbxstat, remote_fcport); + + return (QLA_SUCCESS); + } + + /* Does the RSCN portname already exist in our fcports list? */ + exist_fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (memcmp(remote_fcport->port_name, fcport->port_name, + WWN_SIZE) == 0) { + exist_fcport = fcport; + break; + } + } + if (exist_fcport != NULL) { + DEBUG14(printk("scsi(%ld): Login IOCB -- found RSCN " + "fcport in fcports list [%p].\n", ha->host_no, + exist_fcport)); + + /* Abort any ADISC that could have been sent. */ + if (exist_fcport->iodesc_idx_sent != iodesc->idx && + exist_fcport->iodesc_idx_sent < + MAX_IO_DESCRIPTORS && + ha->io_descriptors[exist_fcport->iodesc_idx_sent]. + cb_idx == ADISC_PORT_IOCB_CB) { + + abort_iodesc = qla2x00_alloc_iodesc(ha); + if (abort_iodesc) { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- issuing abort to outstanding " + "Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + abort_iodesc->cb_idx = ABORT_IOCB_CB; + abort_iodesc->d_id.b24 = + exist_fcport->d_id.b24; + abort_iodesc->remote_fcport = + exist_fcport; + exist_fcport->iodesc_idx_sent = + abort_iodesc->idx; + qla2x00_send_abort_iocb(ha, + abort_iodesc, ha->io_descriptors[ + exist_fcport->iodesc_idx_sent]. + signature, 1); + } else { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- unable to abort outstanding " + "Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + } + } + + /* + * If the existing fcport is waiting to send an ADISC + * or LOGIN, then reuse remote fcport (RSCN) to + * continue waiting. + */ + reuse = 0; + remote_loopid = remote_fcport->loop_id; + remote_did.b24 = remote_fcport->d_id.b24; + if (exist_fcport->iodesc_idx_sent == + IODESC_ADISC_NEEDED || + exist_fcport->iodesc_idx_sent == + IODESC_LOGIN_NEEDED) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "existing fcport [%x/%02x%02x%02x] " + "waiting for IO descriptor, reuse RSCN " + "fcport.\n", ha->host_no, + exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + reuse++; + remote_fcport->iodesc_idx_sent = + exist_fcport->iodesc_idx_sent; + exist_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + remote_fcport->loop_id = exist_fcport->loop_id; + remote_fcport->d_id.b24 = + exist_fcport->d_id.b24; + } + + /* Logout the old loopid. */ + if (!reuse && + exist_fcport->loop_id != remote_fcport->loop_id && + exist_fcport->loop_id != FC_NO_LOOP_ID) { + login_iodesc = qla2x00_alloc_iodesc(ha); + if (login_iodesc) { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- issuing logout to free old " + "loop id [%x/%02x%02x%02x].\n", + ha->host_no, exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + login_iodesc->cb_idx = + LOGOUT_PORT_IOCB_CB; + login_iodesc->d_id.b24 = + exist_fcport->d_id.b24; + login_iodesc->remote_fcport = + exist_fcport; + exist_fcport->iodesc_idx_sent = + login_iodesc->idx; + qla2x00_send_logout_iocb(ha, + login_iodesc, 1); + } else { + /* Ran out of IO descriptiors. */ + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- unable to logout to free old " + "loop id [%x/%02x%02x%02x].\n", + ha->host_no, exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + exist_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + } + + } + + /* Update existing fcport with remote fcport info. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- marking " + "existing fcport [%x/%02x%02x%02x] online.\n", + ha->host_no, remote_loopid, remote_did.b.domain, + remote_did.b.area, remote_did.b.al_pa)); + + memcpy(exist_fcport->node_name, + remote_fcport->node_name, WWN_SIZE); + exist_fcport->loop_id = remote_loopid; + exist_fcport->d_id.b24 = remote_did.b24; + qla2x00_update_login_fcport(ha, mbxstat, exist_fcport); + + /* Finally, free the remote (RSCN) fcport. */ + if (!reuse) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "Freeing RSCN fcport %p " + "[%x/%02x%02x%02x].\n", ha->host_no, + remote_fcport, remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + + return (QLA_SUCCESS); + } + + /* + * A new device has been added, move the RSCN fcport to our + * fcports list. + */ + DEBUG14(printk("scsi(%ld): Login IOCB -- adding RSCN fcport " + "[%x/%02x%02x%02x] to fcports list.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + remote_fcport->flags = (FCF_RLC_SUPPORT | FCF_RESCAN_NEEDED); + qla2x00_update_login_fcport(ha, mbxstat, remote_fcport); + list_add_tail(&remote_fcport->list, &ha->fcports); + set_bit(FCPORT_RESCAN_NEEDED, &ha->dpc_flags); + } else { + /* Handle login failure. */ + if (remote_fcport->login_retry != 0) { + if (mb[0] == MBS_LOOP_ID_USED) { + inuse_did.b.domain = LSB(mb[1]); + inuse_did.b.area = MSB(mb[2]); + inuse_did.b.al_pa = LSB(mb[2]); + + DEBUG14(printk("scsi(%ld): Login IOCB -- loop " + "id [%x] used by port id [%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + inuse_did.b.domain, inuse_did.b.area, + inuse_did.b.al_pa)); + + if (remote_fcport->d_id.b24 == + INVALID_PORT_ID) { + /* + * Invalid port id means we are trying + * to login to a remote port with just + * a loop id without knowing about the + * port id. Copy the port id and try + * again. + */ + remote_fcport->d_id.b24 = inuse_did.b24; + iodesc->d_id.b24 = inuse_did.b24; + } else { + remote_fcport->loop_id++; + rval = qla2x00_find_new_loop_id(ha, + remote_fcport); + if (rval == QLA_FUNCTION_FAILED) { + /* No more loop ids. */ + return (QLA_SUCCESS); + } + } + } else if (mb[0] == MBS_PORT_ID_USED) { + /* + * Device has another loop ID. The firmware + * group recommends the driver perform an + * implicit login with the specified ID. + */ + DEBUG14(printk("scsi(%ld): Login IOCB -- port " + "id [%02x%02x%02x] already assigned to " + "loop id [%x].\n", ha->host_no, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, mb[1])); + + remote_fcport->loop_id = mb[1]; + + } else { + /* Unable to perform login, try again. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "failed login [%x/%02x%02x%02x], status=%x " + "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, status, mb[0], mb[1], + mb[2], mb[6], mb[7])); + } + + /* Reissue Login with the same IO descriptor. */ + iodesc->signature = + qla2x00_iodesc_to_handle(iodesc); + iodesc->cb_idx = LOGIN_PORT_IOCB_CB; + iodesc->d_id.b24 = remote_fcport->d_id.b24; + remote_fcport->iodesc_idx_sent = iodesc->idx; + remote_fcport->login_retry--; + + DEBUG14(printk("scsi(%ld): Login IOCB -- retrying " + "login to [%x/%02x%02x%02x] (%d).\n", ha->host_no, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa, + remote_fcport->login_retry)); + + qla2x00_send_login_iocb(ha, iodesc, + &remote_fcport->d_id, 1); + + return (QLA_FUNCTION_FAILED); + } else { + /* No more logins, mark device dead. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- failed " + "login [%x/%02x%02x%02x] after retries, status=%x " + "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, status, mb[0], mb[1], + mb[2], mb[6], mb[7])); + + atomic_set(&remote_fcport->state, FCS_DEVICE_DEAD); + if (remote_fcport->port_type == FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "Freeing dead RSCN fcport %p " + "[%x/%02x%02x%02x].\n", ha->host_no, + remote_fcport, remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + } + } + + return (QLA_SUCCESS); +} + + +/** + * IO descriptor processing routines. + **/ + +/** + * qla2x00_alloc_rscn_fcport() - Allocate an RSCN type fcport. + * @ha: HA context + * @flags: allocation flags + * + * Returns a pointer to the allocated RSCN fcport, or NULL, if none available. + */ +fc_port_t * +qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, gfp_t flags) +{ + fc_port_t *fcport; + + fcport = qla2x00_alloc_fcport(ha, flags); + if (fcport == NULL) + return (fcport); + + /* Setup RSCN fcport structure. */ + fcport->port_type = FCT_RSCN; + + return (fcport); +} + +/** + * qla2x00_handle_port_rscn() - Handle port RSCN. + * @ha: HA context + * @rscn_entry: RSCN entry + * @fcport: fcport entry to updated + * + * Returns QLA_SUCCESS if the port RSCN was handled. + */ +int +qla2x00_handle_port_rscn(scsi_qla_host_t *ha, uint32_t rscn_entry, + fc_port_t *known_fcport, int ha_locked) +{ + int rval; + port_id_t rscn_pid; + fc_port_t *fcport, *remote_fcport, *rscn_fcport; + struct io_descriptor *iodesc; + + remote_fcport = NULL; + rscn_fcport = NULL; + + /* Prepare port id based on incoming entries. */ + if (known_fcport) { + rscn_pid.b24 = known_fcport->d_id.b24; + remote_fcport = known_fcport; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- process RSCN for " + "fcport [%02x%02x%02x].\n", ha->host_no, + remote_fcport->d_id.b.domain, remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + } else { + rscn_pid.b.domain = LSB(MSW(rscn_entry)); + rscn_pid.b.area = MSB(LSW(rscn_entry)); + rscn_pid.b.al_pa = LSB(LSW(rscn_entry)); + + DEBUG14(printk("scsi(%ld): Handle RSCN -- process RSCN for " + "port id [%02x%02x%02x].\n", ha->host_no, + rscn_pid.b.domain, rscn_pid.b.area, rscn_pid.b.al_pa)); + + /* + * Search fcport lists for a known entry at the specified port + * ID. + */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (rscn_pid.b24 == fcport->d_id.b24) { + remote_fcport = fcport; + break; + } + } + list_for_each_entry(fcport, &ha->rscn_fcports, list) { + if (rscn_pid.b24 == fcport->d_id.b24) { + rscn_fcport = fcport; + break; + } + } + if (remote_fcport == NULL) + remote_fcport = rscn_fcport; + } + + /* + * If the port is already in our fcport list and online, send an ADISC + * to see if it's still alive. Issue login if a new fcport or the known + * fcport is currently offline. + */ + if (remote_fcport) { + /* + * No need to send request if the remote fcport is currently + * waiting for an available io descriptor. + */ + if (known_fcport == NULL && + (remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + remote_fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED)) { + /* + * If previous waiting io descriptor is an ADISC, then + * the new RSCN may come from a new remote fcport being + * plugged into the same location. + */ + if (remote_fcport->port_type == FCT_RSCN) { + remote_fcport->iodesc_idx_sent = + IODESC_LOGIN_NEEDED; + } else if (remote_fcport->iodesc_idx_sent == + IODESC_ADISC_NEEDED) { + fc_port_t *new_fcport; + + remote_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + + /* Create new fcport for later login. */ + new_fcport = qla2x00_alloc_rscn_fcport(ha, + ha_locked ? GFP_ATOMIC: GFP_KERNEL); + if (new_fcport) { + DEBUG14(printk("scsi(%ld): Handle RSCN " + "-- creating RSCN fcport %p for " + "future login.\n", ha->host_no, + new_fcport)); + + new_fcport->d_id.b24 = + remote_fcport->d_id.b24; + new_fcport->iodesc_idx_sent = + IODESC_LOGIN_NEEDED; + + list_add_tail(&new_fcport->list, + &ha->rscn_fcports); + set_bit(IODESC_PROCESS_NEEDED, + &ha->dpc_flags); + } else { + DEBUG14(printk("scsi(%ld): Handle RSCN " + "-- unable to allocate RSCN fcport " + "for future login.\n", + ha->host_no)); + } + } + return (QLA_SUCCESS); + } + + /* Send ADISC if the fcport is online */ + if (atomic_read(&remote_fcport->state) == FCS_ONLINE || + remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED) { + + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + + iodesc = qla2x00_alloc_iodesc(ha); + if (iodesc == NULL) { + /* Mark fcport for later adisc processing */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- not " + "enough IO descriptors for Adisc, flag " + "for later processing.\n", ha->host_no)); + + remote_fcport->iodesc_idx_sent = + IODESC_ADISC_NEEDED; + set_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + return (QLA_SUCCESS); + } + + iodesc->cb_idx = ADISC_PORT_IOCB_CB; + iodesc->d_id.b24 = rscn_pid.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + qla2x00_send_adisc_iocb(ha, iodesc, ha_locked); + + return (QLA_SUCCESS); + } else if (remote_fcport->iodesc_idx_sent < + MAX_IO_DESCRIPTORS && + ha->io_descriptors[remote_fcport->iodesc_idx_sent].cb_idx == + ADISC_PORT_IOCB_CB) { + /* + * Receiving another RSCN while an ADISC is pending, + * abort the IOCB. Use the same descriptor for the + * abort. + */ + uint32_t handle_to_abort; + + iodesc = &ha->io_descriptors[ + remote_fcport->iodesc_idx_sent]; + qla2x00_remove_iodesc_timer(iodesc); + handle_to_abort = iodesc->signature; + iodesc->signature = qla2x00_iodesc_to_handle(iodesc); + iodesc->cb_idx = ABORT_IOCB_CB; + iodesc->d_id.b24 = remote_fcport->d_id.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- issuing " + "abort to outstanding Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa)); + + qla2x00_send_abort_iocb(ha, iodesc, handle_to_abort, + ha_locked); + } + } + + /* We need to login to the remote port, find it. */ + if (known_fcport) { + remote_fcport = known_fcport; + } else if (rscn_fcport && rscn_fcport->d_id.b24 != INVALID_PORT_ID && + rscn_fcport->iodesc_idx_sent < MAX_IO_DESCRIPTORS && + ha->io_descriptors[rscn_fcport->iodesc_idx_sent].cb_idx == + LOGIN_PORT_IOCB_CB) { + /* + * Ignore duplicate RSCN on fcport which has already + * initiated a login IOCB. + */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- ignoring, login " + "already sent to [%02x%02x%02x].\n", ha->host_no, + rscn_fcport->d_id.b.domain, rscn_fcport->d_id.b.area, + rscn_fcport->d_id.b.al_pa)); + + return (QLA_SUCCESS); + } else if (rscn_fcport && rscn_fcport->d_id.b24 != INVALID_PORT_ID && + rscn_fcport != remote_fcport) { + /* Reuse same rscn fcport. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- reusing RSCN fcport " + "[%02x%02x%02x].\n", ha->host_no, + rscn_fcport->d_id.b.domain, rscn_fcport->d_id.b.area, + rscn_fcport->d_id.b.al_pa)); + + remote_fcport = rscn_fcport; + } else { + /* Create new fcport for later login. */ + remote_fcport = qla2x00_alloc_rscn_fcport(ha, + ha_locked ? GFP_ATOMIC: GFP_KERNEL); + list_add_tail(&remote_fcport->list, &ha->rscn_fcports); + } + if (remote_fcport == NULL) + return (QLA_SUCCESS); + + /* Prepare fcport for login. */ + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + remote_fcport->login_retry = 3; /* ha->login_retry_count; */ + remote_fcport->d_id.b24 = rscn_pid.b24; + + iodesc = qla2x00_alloc_iodesc(ha); + if (iodesc == NULL) { + /* Mark fcport for later adisc processing. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- not enough IO " + "descriptors for Login, flag for later processing.\n", + ha->host_no)); + + remote_fcport->iodesc_idx_sent = IODESC_LOGIN_NEEDED; + set_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + return (QLA_SUCCESS); + } + + if (known_fcport == NULL || rscn_pid.b24 != INVALID_PORT_ID) { + remote_fcport->loop_id = ha->min_external_loopid; + + rval = qla2x00_find_new_loop_id(ha, remote_fcport); + if (rval == QLA_FUNCTION_FAILED) { + /* No more loop ids, failed. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- no available " + "loop id to perform Login, failed.\n", + ha->host_no)); + + return (rval); + } + } + + iodesc->cb_idx = LOGIN_PORT_IOCB_CB; + iodesc->d_id.b24 = rscn_pid.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- attempting login to " + "[%x/%02x%02x%02x].\n", ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, iodesc->d_id.b.al_pa)); + + qla2x00_send_login_iocb(ha, iodesc, &rscn_pid, ha_locked); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_process_iodesc() - Complete IO descriptor processing. + * @ha: HA context + * @mbxstat: Mailbox IOCB status + */ +void +qla2x00_process_iodesc(scsi_qla_host_t *ha, struct mbx_entry *mbxstat) +{ + int rval; + uint32_t signature; + fc_port_t *fcport; + struct io_descriptor *iodesc; + + signature = mbxstat->handle; + + DEBUG14(printk("scsi(%ld): Process IODesc -- processing %08x.\n", + ha->host_no, signature)); + + /* Retrieve proper IO descriptor. */ + iodesc = qla2x00_handle_to_iodesc(ha, signature); + if (iodesc == NULL) { + DEBUG14(printk("scsi(%ld): Process IODesc -- ignoring, " + "incorrect signature %08x.\n", ha->host_no, signature)); + + return; + } + + /* Stop IO descriptor timer. */ + qla2x00_remove_iodesc_timer(iodesc); + + /* Verify signature match. */ + if (iodesc->signature != signature) { + DEBUG14(printk("scsi(%ld): Process IODesc -- ignoring, " + "signature mismatch, sent %08x, received %08x.\n", + ha->host_no, iodesc->signature, signature)); + + return; + } + + /* Go with IOCB callback. */ + rval = iocb_function_cb_list[iodesc->cb_idx](ha, iodesc, mbxstat); + if (rval != QLA_SUCCESS) { + /* IO descriptor reused by callback. */ + return; + } + + qla2x00_free_iodesc(iodesc); + + if (test_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags)) { + /* Scan our fcports list for any RSCN requests. */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED) { + qla2x00_handle_port_rscn(ha, 0, fcport, 1); + return; + } + } + + /* Scan our RSCN fcports list for any RSCN requests. */ + list_for_each_entry(fcport, &ha->rscn_fcports, list) { + if (fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED) { + qla2x00_handle_port_rscn(ha, 0, fcport, 1); + return; + } + } + } + clear_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); +} + +/** + * qla2x00_cancel_io_descriptors() - Cancel all outstanding io descriptors. + * @ha: HA context + * + * This routine will also delete any RSCN entries related to the outstanding + * IO descriptors. + */ +void +qla2x00_cancel_io_descriptors(scsi_qla_host_t *ha) +{ + fc_port_t *fcport, *fcptemp; + + clear_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + /* Abort all IO descriptors. */ + qla2x00_init_io_descriptors(ha); + + /* Reset all pending IO descriptors in fcports list. */ + list_for_each_entry(fcport, &ha->fcports, list) { + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + } + + /* Reset all pending IO descriptors in rscn fcports list. */ + list_for_each_entry_safe(fcport, fcptemp, &ha->rscn_fcports, list) { + DEBUG14(printk("scsi(%ld): Cancel IOs -- Freeing RSCN fcport " + "%p [%x/%02x%02x%02x].\n", ha->host_no, fcport, + fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa)); + + list_del(&fcport->list); + kfree(fcport); + } +} diff --git a/drivers/scsi/qla2xxx/qla_settings.h b/drivers/scsi/qla2xxx/qla_settings.h index 249e4d90f..363205c0e 100644 --- a/drivers/scsi/qla2xxx/qla_settings.h +++ b/drivers/scsi/qla2xxx/qla_settings.h @@ -16,6 +16,7 @@ /* Max time to wait for the loop to be in LOOP_READY state */ #define MAX_LOOP_TIMEOUT (60 * 5) +#define EH_ACTIVE 1 /* Error handler active */ /* * Some vendor subsystems do not recover properly after a device reset. Define diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index c71dbd5bd..8b0121dce 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -97,7 +97,7 @@ qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) { int count; uint16_t word; - uint32_t nv_cmd, wait_cnt; + uint32_t nv_cmd; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; qla2x00_nv_write(ha, NVR_DATA_OUT); @@ -127,13 +127,7 @@ qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) /* Wait for NVRAM to become ready */ WRT_REG_WORD(®->nvram, NVR_SELECT); RD_REG_WORD(®->nvram); /* PCI Posting. */ - wait_cnt = NVR_WAIT_CNT; do { - if (!--wait_cnt) { - DEBUG9_10(printk("%s(%ld): NVRAM didn't go ready...\n", - __func__, ha->host_no)); - break; - } NVRAM_DELAY(); word = RD_REG_WORD(®->nvram); } while ((word & NVR_DATA_IN) == 0); @@ -307,17 +301,16 @@ qla2x00_clear_nvram_protection(scsi_qla_host_t *ha) { int ret, stat; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; - uint32_t word, wait_cnt; + uint32_t word; uint16_t wprot, wprot_old; /* Clear NVRAM write protection. */ ret = QLA_FUNCTION_FAILED; - - wprot_old = cpu_to_le16(qla2x00_get_nvram_word(ha, ha->nvram_base)); - stat = qla2x00_write_nvram_word_tmo(ha, ha->nvram_base, + wprot_old = cpu_to_le16(qla2x00_get_nvram_word(ha, 0)); + stat = qla2x00_write_nvram_word_tmo(ha, 0, __constant_cpu_to_le16(0x1234), 100000); - wprot = cpu_to_le16(qla2x00_get_nvram_word(ha, ha->nvram_base)); - if (stat != QLA_SUCCESS || wprot != 0x1234) { + wprot = cpu_to_le16(qla2x00_get_nvram_word(ha, 0)); + if (stat != QLA_SUCCESS || wprot != __constant_cpu_to_le16(0x1234)) { /* Write enable. */ qla2x00_nv_write(ha, NVR_DATA_OUT); qla2x00_nv_write(ha, 0); @@ -348,22 +341,14 @@ qla2x00_clear_nvram_protection(scsi_qla_host_t *ha) /* Wait for NVRAM to become ready. */ WRT_REG_WORD(®->nvram, NVR_SELECT); RD_REG_WORD(®->nvram); /* PCI Posting. */ - wait_cnt = NVR_WAIT_CNT; do { - if (!--wait_cnt) { - DEBUG9_10(printk("%s(%ld): NVRAM didn't go " - "ready...\n", __func__, - ha->host_no)); - break; - } NVRAM_DELAY(); word = RD_REG_WORD(®->nvram); } while ((word & NVR_DATA_IN) == 0); - if (wait_cnt) - ret = QLA_SUCCESS; + ret = QLA_SUCCESS; } else - qla2x00_write_nvram_word(ha, ha->nvram_base, wprot_old); + qla2x00_write_nvram_word(ha, 0, wprot_old); return ret; } @@ -372,7 +357,7 @@ static void qla2x00_set_nvram_protection(scsi_qla_host_t *ha, int stat) { struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; - uint32_t word, wait_cnt; + uint32_t word; if (stat != QLA_SUCCESS) return; @@ -408,13 +393,7 @@ qla2x00_set_nvram_protection(scsi_qla_host_t *ha, int stat) /* Wait for NVRAM to become ready. */ WRT_REG_WORD(®->nvram, NVR_SELECT); RD_REG_WORD(®->nvram); /* PCI Posting. */ - wait_cnt = NVR_WAIT_CNT; do { - if (!--wait_cnt) { - DEBUG9_10(printk("%s(%ld): NVRAM didn't go ready...\n", - __func__, ha->host_no)); - break; - } NVRAM_DELAY(); word = RD_REG_WORD(®->nvram); } while ((word & NVR_DATA_IN) == 0); @@ -521,20 +500,6 @@ qla24xx_get_flash_manufacturer(scsi_qla_host_t *ha, uint8_t *man_id, ids = qla24xx_read_flash_dword(ha, flash_data_to_access_addr(0xd03ab)); *man_id = LSB(ids); *flash_id = MSB(ids); - - /* Check if man_id and flash_id are valid. */ - if (ids != 0xDEADDEAD && (*man_id == 0 || *flash_id == 0)) { - /* Read information using 0x9f opcode - * Device ID, Mfg ID would be read in the format: - * - * Example: ATMEL 0x00 01 45 1F - * Extract MFG and Dev ID from last two bytes. - */ - ids = qla24xx_read_flash_dword(ha, - flash_data_to_access_addr(0xd009f)); - *man_id = LSB(ids); - *flash_id = MSB(ids); - } } int @@ -543,8 +508,8 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, { int ret; uint32_t liter; - uint32_t sec_mask, rest_addr, conf_addr, sec_end_mask; - uint32_t fdata, findex ; + uint32_t sec_mask, rest_addr, conf_addr; + uint32_t fdata; uint8_t man_id, flash_id; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; @@ -554,7 +519,6 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, DEBUG9(printk("%s(%ld): Flash man_id=%d flash_id=%d\n", __func__, ha->host_no, man_id, flash_id)); - sec_end_mask = 0; conf_addr = flash_conf_to_access_addr(0x03d8); switch (man_id) { case 0xbf: /* STT flash. */ @@ -567,12 +531,6 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, rest_addr = 0x3fff; sec_mask = 0x3c000; break; - case 0x1f: // Atmel 26DF081A - rest_addr = 0x0fff; - sec_mask = 0xff000; - sec_end_mask = 0x003ff; - conf_addr = flash_conf_to_access_addr(0x0320); - break; default: /* Default to 64 kb sector size. */ rest_addr = 0x3fff; @@ -587,30 +545,11 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, /* Disable flash write-protection. */ qla24xx_write_flash_dword(ha, flash_conf_to_access_addr(0x101), 0); - /* Some flash parts need an additional zero-write to clear bits.*/ - qla24xx_write_flash_dword(ha, flash_conf_to_access_addr(0x101), 0); do { /* Loop once to provide quick error exit. */ for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { - if (man_id == 0x1f) { - findex = faddr << 2; - fdata = findex & sec_mask; - } else { - findex = faddr; - fdata = (findex & sec_mask) << 2; - } - /* Are we at the beginning of a sector? */ - if ((findex & rest_addr) == 0) { - /* - * Do sector unprotect at 4K boundry for Atmel - * part. - */ - if (man_id == 0x1f) - qla24xx_write_flash_dword(ha, - flash_conf_to_access_addr(0x0339), - (fdata & 0xff00) | ((fdata << 16) & - 0xff0000) | ((fdata >> 16) & 0xff)); + if ((faddr & rest_addr) == 0) { fdata = (faddr & sec_mask) << 2; ret = qla24xx_write_flash_dword(ha, conf_addr, (fdata & 0xff00) |((fdata << 16) & @@ -631,14 +570,6 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, ha->host_no, faddr, *dwptr)); break; } - - /* Do sector protect at 4K boundry for Atmel part. */ - if (man_id == 0x1f && - ((faddr & sec_end_mask) == 0x3ff)) - qla24xx_write_flash_dword(ha, - flash_conf_to_access_addr(0x0336), - (fdata & 0xff00) | ((fdata << 16) & - 0xff0000) | ((fdata >> 16) & 0xff)); } } while (0); diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 971259032..d537192a1 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h @@ -7,9 +7,9 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.01.07-k1" +#define QLA2XXX_VERSION "8.01.04-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 -#define QLA_DRIVER_PATCH_VER 7 +#define QLA_DRIVER_PATCH_VER 4 #define QLA_DRIVER_BETA_VER 0 diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 5b2f0741a..c7e78dcf0 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -1,6 +1,6 @@ /* qlogicpti.c: Performance Technologies QlogicISP sbus card driver. * - * Copyright (C) 1996, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu) * * A lot of this driver was directly stolen from Erik H. Moe's PCI * Qlogic ISP driver. Mucho kudos to him for this code. @@ -43,9 +43,12 @@ #include #include #include +#include #include #include + + #define MAX_TARGETS 16 #define MAX_LUNS 8 /* 32 for 1.31 F/W */ @@ -55,6 +58,7 @@ static struct qlogicpti *qptichain = NULL; static DEFINE_SPINLOCK(qptichain_lock); +static int qptis_running = 0; #define PACKB(a, b) (((a)<<4)|(b)) @@ -128,7 +132,7 @@ static const u_char mbox_param[] = { PACKB(0, 0) /* 0x0042 */ }; -#define MAX_MBOX_COMMAND ARRAY_SIZE(mbox_param) +#define MAX_MBOX_COMMAND (sizeof(mbox_param)/sizeof(u_short)) /* queue length's _must_ be power of two: */ #define QUEUE_DEPTH(in, out, ql) ((in - out) & (ql)) @@ -718,10 +722,10 @@ static int __init qpti_register_irq(struct qlogicpti *qpti) * sanely maintain. */ if (request_irq(qpti->irq, qpti_intr, - IRQF_SHARED, "Qlogic/PTI", qpti)) + SA_SHIRQ, "Qlogic/PTI", qpti)) goto fail; - printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); + printk("qpti%d: IRQ %s ", qpti->qpti_id, __irq_itoa(qpti->irq)); return 0; @@ -812,13 +816,180 @@ static int __init qpti_map_queues(struct qlogicpti *qpti) return 0; } +/* Detect all PTI Qlogic ISP's in the machine. */ +static int __init qlogicpti_detect(struct scsi_host_template *tpnt) +{ + struct qlogicpti *qpti; + struct Scsi_Host *qpti_host; + struct sbus_bus *sbus; + struct sbus_dev *sdev; + int nqptis = 0, nqptis_in_use = 0; + + tpnt->proc_name = "qlogicpti"; + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + /* Is this a red snapper? */ + if (strcmp(sdev->prom_name, "ptisp") && + strcmp(sdev->prom_name, "PTI,ptisp") && + strcmp(sdev->prom_name, "QLGC,isp") && + strcmp(sdev->prom_name, "SUNW,isp")) + continue; + + /* Sometimes Antares cards come up not completely + * setup, and we get a report of a zero IRQ. + * Skip over them in such cases so we survive. + */ + if (sdev->irqs[0] == 0) { + printk("qpti%d: Adapter reports no interrupt, " + "skipping over this card.", nqptis); + continue; + } + + /* Yep, register and allocate software state. */ + qpti_host = scsi_register(tpnt, sizeof(struct qlogicpti)); + if (!qpti_host) { + printk("QPTI: Cannot register PTI Qlogic ISP SCSI host"); + continue; + } + qpti = (struct qlogicpti *) qpti_host->hostdata; + + /* We are wide capable, 16 targets. */ + qpti_host->max_id = MAX_TARGETS; + + /* Setup back pointers and misc. state. */ + qpti->qhost = qpti_host; + qpti->sdev = sdev; + qpti->qpti_id = nqptis++; + qpti->prom_node = sdev->prom_node; + prom_getstring(qpti->prom_node, "name", + qpti->prom_name, + sizeof(qpti->prom_name)); + + /* This is not correct, actually. There's a switch + * on the PTI cards that put them into "emulation" + * mode- i.e., report themselves as QLGC,isp + * instead of PTI,ptisp. The only real substantive + * difference between non-pti and pti cards is + * the tmon register. Which is possibly even + * there for Qlogic cards, but non-functional. + */ + qpti->is_pti = (strcmp (qpti->prom_name, "QLGC,isp") != 0); + + qpti_chain_add(qpti); + if (qpti_map_regs(qpti) < 0) + goto fail_unlink; + + if (qpti_register_irq(qpti) < 0) + goto fail_unmap_regs; + + qpti_get_scsi_id(qpti); + qpti_get_bursts(qpti); + qpti_get_clock(qpti); + + /* Clear out scsi_cmnd array. */ + memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots)); + + if (qpti_map_queues(qpti) < 0) + goto fail_free_irq; + + /* Load the firmware. */ + if (qlogicpti_load_firmware(qpti)) + goto fail_unmap_queues; + if (qpti->is_pti) { + /* Check the PTI status reg. */ + if (qlogicpti_verify_tmon(qpti)) + goto fail_unmap_queues; + } + + /* Reset the ISP and init res/req queues. */ + if (qlogicpti_reset_hardware(qpti_host)) + goto fail_unmap_queues; + + printk("(Firmware v%d.%d.%d)", qpti->fware_majrev, + qpti->fware_minrev, qpti->fware_micrev); + { + char buffer[60]; + + prom_getstring (qpti->prom_node, + "isp-fcode", buffer, 60); + if (buffer[0]) + printk("(Firmware %s)", buffer); + if (prom_getbool(qpti->prom_node, "differential")) + qpti->differential = 1; + } + + printk (" [%s Wide, using %s interface]\n", + (qpti->ultra ? "Ultra" : "Fast"), + (qpti->differential ? "differential" : "single ended")); + + nqptis_in_use++; + continue; + + fail_unmap_queues: +#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) + sbus_free_consistent(qpti->sdev, + QSIZE(RES_QUEUE_LEN), + qpti->res_cpu, qpti->res_dvma); + sbus_free_consistent(qpti->sdev, + QSIZE(QLOGICPTI_REQ_QUEUE_LEN), + qpti->req_cpu, qpti->req_dvma); +#undef QSIZE + fail_free_irq: + free_irq(qpti->irq, qpti); + + fail_unmap_regs: + sbus_iounmap(qpti->qregs, + qpti->sdev->reg_addrs[0].reg_size); + if (qpti->is_pti) + sbus_iounmap(qpti->sreg, sizeof(unsigned char)); + fail_unlink: + qpti_chain_del(qpti); + scsi_unregister(qpti->qhost); + } + } + if (nqptis) + printk("QPTI: Total of %d PTI Qlogic/ISP hosts found, %d actually in use.\n", + nqptis, nqptis_in_use); + qptis_running = nqptis_in_use; + return nqptis; +} + +static int qlogicpti_release(struct Scsi_Host *host) +{ + struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; + + /* Remove visibility from IRQ handlers. */ + qpti_chain_del(qpti); + + /* Shut up the card. */ + sbus_writew(0, qpti->qregs + SBUS_CTRL); + + /* Free IRQ handler and unmap Qlogic,ISP and PTI status regs. */ + free_irq(qpti->irq, qpti); + +#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) + sbus_free_consistent(qpti->sdev, + QSIZE(RES_QUEUE_LEN), + qpti->res_cpu, qpti->res_dvma); + sbus_free_consistent(qpti->sdev, + QSIZE(QLOGICPTI_REQ_QUEUE_LEN), + qpti->req_cpu, qpti->req_dvma); +#undef QSIZE + + sbus_iounmap(qpti->qregs, qpti->sdev->reg_addrs[0].reg_size); + if (qpti->is_pti) + sbus_iounmap(qpti->sreg, sizeof(unsigned char)); + + return 0; +} + const char *qlogicpti_info(struct Scsi_Host *host) { static char buf[80]; struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; - sprintf(buf, "PTI Qlogic,ISP SBUS SCSI irq %d regs at %p", - qpti->qhost->irq, qpti->qregs); + sprintf(buf, "PTI Qlogic,ISP SBUS SCSI irq %s regs at %p", + __irq_itoa(qpti->qhost->irq), qpti->qregs); return buf; } @@ -874,7 +1045,7 @@ static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd, if (Cmnd->use_sg) { int sg_count; - sg = (struct scatterlist *) Cmnd->request_buffer; + sg = (struct scatterlist *) Cmnd->buffer; sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg, Cmnd->sc_data_direction); ds = cmd->dataseg; @@ -1278,7 +1449,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti) if (Cmnd->use_sg) { sbus_unmap_sg(qpti->sdev, - (struct scatterlist *)Cmnd->request_buffer, + (struct scatterlist *)Cmnd->buffer, Cmnd->use_sg, Cmnd->sc_data_direction); } else { @@ -1381,9 +1552,9 @@ static int qlogicpti_reset(struct scsi_cmnd *Cmnd) return return_status; } -static struct scsi_host_template qpti_template = { - .module = THIS_MODULE, - .name = "qlogicpti", +static struct scsi_host_template driver_template = { + .detect = qlogicpti_detect, + .release = qlogicpti_release, .info = qlogicpti_info, .queuecommand = qlogicpti_queuecommand_slow, .eh_abort_handler = qlogicpti_abort, @@ -1395,189 +1566,8 @@ static struct scsi_host_template qpti_template = { .use_clustering = ENABLE_CLUSTERING, }; -static int __devinit qpti_sbus_probe(struct of_device *dev, const struct of_device_id *match) -{ - static int nqptis; - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - struct device_node *dp = dev->node; - struct scsi_host_template *tpnt = match->data; - struct Scsi_Host *host; - struct qlogicpti *qpti; - char *fcode; - - /* Sometimes Antares cards come up not completely - * setup, and we get a report of a zero IRQ. - */ - if (sdev->irqs[0] == 0) - return -ENODEV; - - host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); - if (!host) - return -ENOMEM; - - qpti = (struct qlogicpti *) host->hostdata; - - host->max_id = MAX_TARGETS; - qpti->qhost = host; - qpti->sdev = sdev; - qpti->qpti_id = nqptis; - qpti->prom_node = sdev->prom_node; - strcpy(qpti->prom_name, sdev->ofdev.node->name); - qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); - - if (qpti_map_regs(qpti) < 0) - goto fail_unlink; - - if (qpti_register_irq(qpti) < 0) - goto fail_unmap_regs; - - qpti_get_scsi_id(qpti); - qpti_get_bursts(qpti); - qpti_get_clock(qpti); - - /* Clear out scsi_cmnd array. */ - memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots)); - - if (qpti_map_queues(qpti) < 0) - goto fail_free_irq; - - /* Load the firmware. */ - if (qlogicpti_load_firmware(qpti)) - goto fail_unmap_queues; - if (qpti->is_pti) { - /* Check the PTI status reg. */ - if (qlogicpti_verify_tmon(qpti)) - goto fail_unmap_queues; - } - - /* Reset the ISP and init res/req queues. */ - if (qlogicpti_reset_hardware(host)) - goto fail_unmap_queues; - - if (scsi_add_host(host, &dev->dev)) - goto fail_unmap_queues; - - printk("(Firmware v%d.%d.%d)", qpti->fware_majrev, - qpti->fware_minrev, qpti->fware_micrev); - - fcode = of_get_property(dp, "isp-fcode", NULL); - if (fcode && fcode[0]) - printk("(Firmware %s)", fcode); - if (of_find_property(dp, "differential", NULL) != NULL) - qpti->differential = 1; - - printk (" [%s Wide, using %s interface]\n", - (qpti->ultra ? "Ultra" : "Fast"), - (qpti->differential ? "differential" : "single ended")); - - dev_set_drvdata(&sdev->ofdev.dev, qpti); - - qpti_chain_add(qpti); - - scsi_scan_host(host); - nqptis++; - - return 0; - -fail_unmap_queues: -#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) - sbus_free_consistent(qpti->sdev, - QSIZE(RES_QUEUE_LEN), - qpti->res_cpu, qpti->res_dvma); - sbus_free_consistent(qpti->sdev, - QSIZE(QLOGICPTI_REQ_QUEUE_LEN), - qpti->req_cpu, qpti->req_dvma); -#undef QSIZE - -fail_unmap_regs: - sbus_iounmap(qpti->qregs, - qpti->sdev->reg_addrs[0].reg_size); - if (qpti->is_pti) - sbus_iounmap(qpti->sreg, sizeof(unsigned char)); - -fail_free_irq: - free_irq(qpti->irq, qpti); - -fail_unlink: - scsi_host_put(host); - - return -ENODEV; -} - -static int __devexit qpti_sbus_remove(struct of_device *dev) -{ - struct qlogicpti *qpti = dev_get_drvdata(&dev->dev); - - qpti_chain_del(qpti); - - scsi_remove_host(qpti->qhost); - - /* Shut up the card. */ - sbus_writew(0, qpti->qregs + SBUS_CTRL); - - /* Free IRQ handler and unmap Qlogic,ISP and PTI status regs. */ - free_irq(qpti->irq, qpti); - -#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) - sbus_free_consistent(qpti->sdev, - QSIZE(RES_QUEUE_LEN), - qpti->res_cpu, qpti->res_dvma); - sbus_free_consistent(qpti->sdev, - QSIZE(QLOGICPTI_REQ_QUEUE_LEN), - qpti->req_cpu, qpti->req_dvma); -#undef QSIZE - - sbus_iounmap(qpti->qregs, qpti->sdev->reg_addrs[0].reg_size); - if (qpti->is_pti) - sbus_iounmap(qpti->sreg, sizeof(unsigned char)); - - scsi_host_put(qpti->qhost); - - return 0; -} - -static struct of_device_id qpti_match[] = { - { - .name = "ptisp", - .data = &qpti_template, - }, - { - .name = "PTI,ptisp", - .data = &qpti_template, - }, - { - .name = "QLGC,isp", - .data = &qpti_template, - }, - { - .name = "SUNW,isp", - .data = &qpti_template, - }, - {}, -}; -MODULE_DEVICE_TABLE(of, qpti_match); - -static struct of_platform_driver qpti_sbus_driver = { - .name = "qpti", - .match_table = qpti_match, - .probe = qpti_sbus_probe, - .remove = __devexit_p(qpti_sbus_remove), -}; -static int __init qpti_init(void) -{ - return of_register_driver(&qpti_sbus_driver, &sbus_bus_type); -} - -static void __exit qpti_exit(void) -{ - of_unregister_driver(&qpti_sbus_driver); -} +#include "scsi_module.c" -MODULE_DESCRIPTION("QlogicISP SBUS driver"); -MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); MODULE_LICENSE("GPL"); -MODULE_VERSION("2.0"); -module_init(qpti_init); -module_exit(qpti_exit); diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c index 327b33a57..50c398aab 100644 --- a/drivers/scsi/raid_class.c +++ b/drivers/scsi/raid_class.c @@ -131,7 +131,7 @@ static const char *raid_state_name(enum raid_state state) int i; char *name = NULL; - for (i = 0; i < ARRAY_SIZE(raid_states); i++) { + for (i = 0; i < sizeof(raid_states)/sizeof(raid_states[0]); i++) { if (raid_states[i].value == state) { name = raid_states[i].name; break; @@ -161,7 +161,7 @@ static const char *raid_level_name(enum raid_level level) int i; char *name = NULL; - for (i = 0; i < ARRAY_SIZE(raid_levels); i++) { + for (i = 0; i < sizeof(raid_levels)/sizeof(raid_levels[0]); i++) { if (raid_levels[i].value == level) { name = raid_levels[i].name; break; diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 39ace4c6e..f16f92a6e 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@ -93,7 +93,7 @@ enum { MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ MV_COMMON_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO | - ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING), + ATA_FLAG_NO_ATAPI), MV_6XXX_FLAGS = MV_FLAG_IRQ_COALESCE, CRQB_FLAG_READ = (1 << 0), @@ -272,33 +272,33 @@ enum chip_type { /* Command ReQuest Block: 32B */ struct mv_crqb { - __le32 sg_addr; - __le32 sg_addr_hi; - __le16 ctrl_flags; - __le16 ata_cmd[11]; + u32 sg_addr; + u32 sg_addr_hi; + u16 ctrl_flags; + u16 ata_cmd[11]; }; struct mv_crqb_iie { - __le32 addr; - __le32 addr_hi; - __le32 flags; - __le32 len; - __le32 ata_cmd[4]; + u32 addr; + u32 addr_hi; + u32 flags; + u32 len; + u32 ata_cmd[4]; }; /* Command ResPonse Block: 8B */ struct mv_crpb { - __le16 id; - __le16 flags; - __le32 tmstmp; + u16 id; + u16 flags; + u32 tmstmp; }; /* EDMA Physical Region Descriptor (ePRD); A.K.A. SG */ struct mv_sg { - __le32 addr; - __le32 flags_size; - __le32 addr_hi; - __le32 reserved; + u32 addr; + u32 flags_size; + u32 addr_hi; + u32 reserved; }; struct mv_port_priv { @@ -390,7 +390,6 @@ static struct scsi_host_template mv_sht = { .proc_name = DRV_NAME, .dma_boundary = MV_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -407,7 +406,6 @@ static const struct ata_port_operations mv5_ops = { .qc_prep = mv_qc_prep, .qc_issue = mv_qc_issue, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = mv_eng_timeout, @@ -435,7 +433,6 @@ static const struct ata_port_operations mv6_ops = { .qc_prep = mv_qc_prep, .qc_issue = mv_qc_issue, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = mv_eng_timeout, @@ -463,7 +460,6 @@ static const struct ata_port_operations mv_iie_ops = { .qc_prep = mv_qc_prep_iie, .qc_issue = mv_qc_issue, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = mv_eng_timeout, @@ -687,7 +683,7 @@ static void mv_stop_dma(struct ata_port *ap) } if (EDMA_EN & reg) { - ata_port_printk(ap, KERN_ERR, "Unable to stop eDMA\n"); + printk(KERN_ERR "ata%u: Unable to stop eDMA\n", ap->id); /* FIXME: Consider doing a reset here to recover */ } } @@ -1032,7 +1028,7 @@ static inline unsigned mv_inc_q_index(unsigned index) return (index + 1) & MV_MAX_Q_DEPTH_MASK; } -static inline void mv_crqb_pack_cmd(__le16 *cmdw, u8 data, u8 addr, unsigned last) +static inline void mv_crqb_pack_cmd(u16 *cmdw, u8 data, u8 addr, unsigned last) { u16 tmp = data | (addr << CRQB_CMD_ADDR_SHIFT) | CRQB_CMD_CS | (last ? CRQB_CMD_LAST : 0); @@ -1055,7 +1051,7 @@ static void mv_qc_prep(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct mv_port_priv *pp = ap->private_data; - __le16 *cw; + u16 *cw; struct ata_taskfile *tf; u16 flags = 0; unsigned in_index; @@ -1311,8 +1307,8 @@ static void mv_err_intr(struct ata_port *ap, int reset_allowed) edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); if (EDMA_ERR_SERR & edma_err_cause) { - sata_scr_read(ap, SCR_ERROR, &serr); - sata_scr_write_flush(ap, SCR_ERROR, serr); + serr = scr_read(ap, SCR_ERROR); + scr_write_flush(ap, SCR_ERROR, serr); } if (EDMA_ERR_SELF_DIS & edma_err_cause) { struct mv_port_priv *pp = ap->private_data; @@ -1381,7 +1377,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, /* Note that DEV_IRQ might happen spuriously during EDMA, * and should be ignored in such cases. * The cause of this is still under investigation. - */ + */ if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) { /* EDMA: check for response queue interrupt */ if ((CRPB_DMA_DONE << hard_port) & hc_irq_cause) { @@ -1402,7 +1398,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, } } - if (ap && (ap->flags & ATA_FLAG_DISABLED)) + if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) continue; err_mask = ac_err_mask(ata_status); @@ -1423,7 +1419,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, VPRINTK("port %u IRQ found for qc, " "ata_status 0x%x\n", port,ata_status); /* mark qc status appropriately */ - if (!(qc->tf.flags & ATA_TFLAG_POLLING)) { + if (!(qc->tf.ctl & ATA_NIEN)) { qc->err_mask |= err_mask; ata_qc_complete(qc); } @@ -1953,16 +1949,16 @@ static void __mv_phy_reset(struct ata_port *ap, int can_sleep) /* Issue COMRESET via SControl */ comreset_retry: - sata_scr_write_flush(ap, SCR_CONTROL, 0x301); + scr_write_flush(ap, SCR_CONTROL, 0x301); __msleep(1, can_sleep); - sata_scr_write_flush(ap, SCR_CONTROL, 0x300); + scr_write_flush(ap, SCR_CONTROL, 0x300); __msleep(20, can_sleep); timeout = jiffies + msecs_to_jiffies(200); do { - sata_scr_read(ap, SCR_STATUS, &sstatus); - if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) + sstatus = scr_read(ap, SCR_STATUS) & 0x3; + if ((sstatus == 3) || (sstatus == 0)) break; __msleep(1, can_sleep); @@ -1978,12 +1974,11 @@ comreset_retry: "SCtrl 0x%08x\n", mv_scr_read(ap, SCR_STATUS), mv_scr_read(ap, SCR_ERROR), mv_scr_read(ap, SCR_CONTROL)); - if (ata_port_online(ap)) { + if (sata_dev_present(ap)) { ata_port_probe(ap); } else { - sata_scr_read(ap, SCR_STATUS, &sstatus); - ata_port_printk(ap, KERN_INFO, - "no device found (phy stat %08x)\n", sstatus); + printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n", + ap->id, scr_read(ap, SCR_STATUS)); ata_port_disable(ap); return; } @@ -2010,7 +2005,7 @@ comreset_retry: tf.nsect = readb((void __iomem *) ap->ioaddr.nsect_addr); dev->class = ata_dev_classify(&tf); - if (!ata_dev_enabled(dev)) { + if (!ata_dev_present(dev)) { VPRINTK("Port disabled post-sig: No device present.\n"); ata_port_disable(ap); } @@ -2042,7 +2037,7 @@ static void mv_eng_timeout(struct ata_port *ap) struct ata_queued_cmd *qc; unsigned long flags; - ata_port_printk(ap, KERN_ERR, "Entering mv_eng_timeout\n"); + printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id); DPRINTK("All regs @ start of eng_timeout\n"); mv_dump_all_regs(ap->host_set->mmio_base, ap->port_no, to_pci_dev(ap->host_set->dev)); @@ -2395,7 +2390,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) probe_ent->port_ops = mv_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; probe_ent->private_data = hpriv; diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 56da25581..9f553081b 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c @@ -31,6 +31,7 @@ * */ +#include #include #include #include @@ -43,7 +44,7 @@ #include #define DRV_NAME "sata_nv" -#define DRV_VERSION "2.0" +#define DRV_VERSION "0.8" enum { NV_PORTS = 2, @@ -53,25 +54,40 @@ enum { NV_PORT0_SCR_REG_OFFSET = 0x00, NV_PORT1_SCR_REG_OFFSET = 0x40, - /* INT_STATUS/ENABLE */ NV_INT_STATUS = 0x10, - NV_INT_ENABLE = 0x11, NV_INT_STATUS_CK804 = 0x440, - NV_INT_ENABLE_CK804 = 0x441, - - /* INT_STATUS/ENABLE bits */ - NV_INT_DEV = 0x01, - NV_INT_PM = 0x02, - NV_INT_ADDED = 0x04, - NV_INT_REMOVED = 0x08, + NV_INT_STATUS_PDEV_INT = 0x01, + NV_INT_STATUS_PDEV_PM = 0x02, + NV_INT_STATUS_PDEV_ADDED = 0x04, + NV_INT_STATUS_PDEV_REMOVED = 0x08, + NV_INT_STATUS_SDEV_INT = 0x10, + NV_INT_STATUS_SDEV_PM = 0x20, + NV_INT_STATUS_SDEV_ADDED = 0x40, + NV_INT_STATUS_SDEV_REMOVED = 0x80, + NV_INT_STATUS_PDEV_HOTPLUG = (NV_INT_STATUS_PDEV_ADDED | + NV_INT_STATUS_PDEV_REMOVED), + NV_INT_STATUS_SDEV_HOTPLUG = (NV_INT_STATUS_SDEV_ADDED | + NV_INT_STATUS_SDEV_REMOVED), + NV_INT_STATUS_HOTPLUG = (NV_INT_STATUS_PDEV_HOTPLUG | + NV_INT_STATUS_SDEV_HOTPLUG), - NV_INT_PORT_SHIFT = 4, /* each port occupies 4 bits */ - - NV_INT_ALL = 0x0f, - NV_INT_MASK = NV_INT_DEV | - NV_INT_ADDED | NV_INT_REMOVED, + NV_INT_ENABLE = 0x11, + NV_INT_ENABLE_CK804 = 0x441, + NV_INT_ENABLE_PDEV_MASK = 0x01, + NV_INT_ENABLE_PDEV_PM = 0x02, + NV_INT_ENABLE_PDEV_ADDED = 0x04, + NV_INT_ENABLE_PDEV_REMOVED = 0x08, + NV_INT_ENABLE_SDEV_MASK = 0x10, + NV_INT_ENABLE_SDEV_PM = 0x20, + NV_INT_ENABLE_SDEV_ADDED = 0x40, + NV_INT_ENABLE_SDEV_REMOVED = 0x80, + NV_INT_ENABLE_PDEV_HOTPLUG = (NV_INT_ENABLE_PDEV_ADDED | + NV_INT_ENABLE_PDEV_REMOVED), + NV_INT_ENABLE_SDEV_HOTPLUG = (NV_INT_ENABLE_SDEV_ADDED | + NV_INT_ENABLE_SDEV_REMOVED), + NV_INT_ENABLE_HOTPLUG = (NV_INT_ENABLE_PDEV_HOTPLUG | + NV_INT_ENABLE_SDEV_HOTPLUG), - /* INT_CONFIG */ NV_INT_CONFIG = 0x12, NV_INT_CONFIG_METHD = 0x01, // 0 = INT, 1 = SMI @@ -81,27 +97,23 @@ enum { }; static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); -static void nv_ck804_host_stop(struct ata_host_set *host_set); -static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance, - struct pt_regs *regs); -static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance, - struct pt_regs *regs); -static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance, - struct pt_regs *regs); +static irqreturn_t nv_interrupt (int irq, void *dev_instance, + struct pt_regs *regs); static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg); static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); - -static void nv_nf2_freeze(struct ata_port *ap); -static void nv_nf2_thaw(struct ata_port *ap); -static void nv_ck804_freeze(struct ata_port *ap); -static void nv_ck804_thaw(struct ata_port *ap); -static void nv_error_handler(struct ata_port *ap); +static void nv_host_stop (struct ata_host_set *host_set); +static void nv_enable_hotplug(struct ata_probe_ent *probe_ent); +static void nv_disable_hotplug(struct ata_host_set *host_set); +static int nv_check_hotplug(struct ata_host_set *host_set); +static void nv_enable_hotplug_ck804(struct ata_probe_ent *probe_ent); +static void nv_disable_hotplug_ck804(struct ata_host_set *host_set); +static int nv_check_hotplug_ck804(struct ata_host_set *host_set); enum nv_host_type { GENERIC, NFORCE2, - NFORCE3 = NFORCE2, /* NF2 == NF3 as far as sata_nv is concerned */ + NFORCE3, CK804 }; @@ -128,16 +140,6 @@ static const struct pci_device_id nv_pci_tbl[] = { PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, 0x045c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, 0x045d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, 0x045e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, - { PCI_VENDOR_ID_NVIDIA, 0x045f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, @@ -147,6 +149,46 @@ static const struct pci_device_id nv_pci_tbl[] = { { 0, } /* terminate list */ }; +struct nv_host_desc +{ + enum nv_host_type host_type; + void (*enable_hotplug)(struct ata_probe_ent *probe_ent); + void (*disable_hotplug)(struct ata_host_set *host_set); + int (*check_hotplug)(struct ata_host_set *host_set); + +}; +static struct nv_host_desc nv_device_tbl[] = { + { + .host_type = GENERIC, + .enable_hotplug = NULL, + .disable_hotplug= NULL, + .check_hotplug = NULL, + }, + { + .host_type = NFORCE2, + .enable_hotplug = nv_enable_hotplug, + .disable_hotplug= nv_disable_hotplug, + .check_hotplug = nv_check_hotplug, + }, + { + .host_type = NFORCE3, + .enable_hotplug = nv_enable_hotplug, + .disable_hotplug= nv_disable_hotplug, + .check_hotplug = nv_check_hotplug, + }, + { .host_type = CK804, + .enable_hotplug = nv_enable_hotplug_ck804, + .disable_hotplug= nv_disable_hotplug_ck804, + .check_hotplug = nv_check_hotplug_ck804, + }, +}; + +struct nv_host +{ + struct nv_host_desc *host_desc; + unsigned long host_flags; +}; + static struct pci_driver nv_pci_driver = { .name = DRV_NAME, .id_table = nv_pci_tbl, @@ -168,119 +210,51 @@ static struct scsi_host_template nv_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; -static const struct ata_port_operations nv_generic_ops = { - .port_disable = ata_port_disable, - .tf_load = ata_tf_load, - .tf_read = ata_tf_read, - .exec_command = ata_exec_command, - .check_status = ata_check_status, - .dev_select = ata_std_dev_select, - .bmdma_setup = ata_bmdma_setup, - .bmdma_start = ata_bmdma_start, - .bmdma_stop = ata_bmdma_stop, - .bmdma_status = ata_bmdma_status, - .qc_prep = ata_qc_prep, - .qc_issue = ata_qc_issue_prot, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = nv_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, - .data_xfer = ata_pio_data_xfer, - .irq_handler = nv_generic_interrupt, - .irq_clear = ata_bmdma_irq_clear, - .scr_read = nv_scr_read, - .scr_write = nv_scr_write, - .port_start = ata_port_start, - .port_stop = ata_port_stop, - .host_stop = ata_pci_host_stop, -}; - -static const struct ata_port_operations nv_nf2_ops = { +static const struct ata_port_operations nv_ops = { .port_disable = ata_port_disable, .tf_load = ata_tf_load, .tf_read = ata_tf_read, .exec_command = ata_exec_command, .check_status = ata_check_status, .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .freeze = nv_nf2_freeze, - .thaw = nv_nf2_thaw, - .error_handler = nv_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, - .data_xfer = ata_pio_data_xfer, - .irq_handler = nv_nf2_interrupt, + .eng_timeout = ata_eng_timeout, + .irq_handler = nv_interrupt, .irq_clear = ata_bmdma_irq_clear, .scr_read = nv_scr_read, .scr_write = nv_scr_write, .port_start = ata_port_start, .port_stop = ata_port_stop, - .host_stop = ata_pci_host_stop, + .host_stop = nv_host_stop, }; -static const struct ata_port_operations nv_ck804_ops = { - .port_disable = ata_port_disable, - .tf_load = ata_tf_load, - .tf_read = ata_tf_read, - .exec_command = ata_exec_command, - .check_status = ata_check_status, - .dev_select = ata_std_dev_select, - .bmdma_setup = ata_bmdma_setup, - .bmdma_start = ata_bmdma_start, - .bmdma_stop = ata_bmdma_stop, - .bmdma_status = ata_bmdma_status, - .qc_prep = ata_qc_prep, - .qc_issue = ata_qc_issue_prot, - .freeze = nv_ck804_freeze, - .thaw = nv_ck804_thaw, - .error_handler = nv_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, - .data_xfer = ata_pio_data_xfer, - .irq_handler = nv_ck804_interrupt, - .irq_clear = ata_bmdma_irq_clear, - .scr_read = nv_scr_read, - .scr_write = nv_scr_write, - .port_start = ata_port_start, - .port_stop = ata_port_stop, - .host_stop = nv_ck804_host_stop, -}; - -static struct ata_port_info nv_port_info[] = { - /* generic */ - { - .sht = &nv_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, - .pio_mask = NV_PIO_MASK, - .mwdma_mask = NV_MWDMA_MASK, - .udma_mask = NV_UDMA_MASK, - .port_ops = &nv_generic_ops, - }, - /* nforce2/3 */ - { - .sht = &nv_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, - .pio_mask = NV_PIO_MASK, - .mwdma_mask = NV_MWDMA_MASK, - .udma_mask = NV_UDMA_MASK, - .port_ops = &nv_nf2_ops, - }, - /* ck804 */ - { - .sht = &nv_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, - .pio_mask = NV_PIO_MASK, - .mwdma_mask = NV_MWDMA_MASK, - .udma_mask = NV_UDMA_MASK, - .port_ops = &nv_ck804_ops, - }, +/* FIXME: The hardware provides the necessary SATA PHY controls + * to support ATA_FLAG_SATA_RESET. However, it is currently + * necessary to disable that flag, to solve misdetection problems. + * See http://bugme.osdl.org/show_bug.cgi?id=3352 for more info. + * + * This problem really needs to be investigated further. But in the + * meantime, we avoid ATA_FLAG_SATA_RESET to get people working. + */ +static struct ata_port_info nv_port_info = { + .sht = &nv_sht, + .host_flags = ATA_FLAG_SATA | + /* ATA_FLAG_SATA_RESET | */ + ATA_FLAG_SRST | + ATA_FLAG_NO_LEGACY, + .pio_mask = NV_PIO_MASK, + .mwdma_mask = NV_MWDMA_MASK, + .udma_mask = NV_UDMA_MASK, + .port_ops = &nv_ops, }; MODULE_AUTHOR("NVIDIA"); @@ -289,10 +263,11 @@ MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, nv_pci_tbl); MODULE_VERSION(DRV_VERSION); -static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance, - struct pt_regs *regs) +static irqreturn_t nv_interrupt (int irq, void *dev_instance, + struct pt_regs *regs) { struct ata_host_set *host_set = dev_instance; + struct nv_host *host = host_set->private_data; unsigned int i; unsigned int handled = 0; unsigned long flags; @@ -304,11 +279,11 @@ static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance, ap = host_set->ports[i]; if (ap && - !(ap->flags & ATA_FLAG_DISABLED)) { + !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) + if (qc && (!(qc->tf.ctl & ATA_NIEN))) handled += ata_host_intr(ap, qc); else // No request pending? Clear interrupt status @@ -318,88 +293,14 @@ static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance, } - spin_unlock_irqrestore(&host_set->lock, flags); + if (host->host_desc->check_hotplug) + handled += host->host_desc->check_hotplug(host_set); - return IRQ_RETVAL(handled); -} - -static int nv_host_intr(struct ata_port *ap, u8 irq_stat) -{ - struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); - int handled; - - /* freeze if hotplugged */ - if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) { - ata_port_freeze(ap); - return 1; - } - - /* bail out if not our interrupt */ - if (!(irq_stat & NV_INT_DEV)) - return 0; - - /* DEV interrupt w/ no active qc? */ - if (unlikely(!qc || (qc->tf.flags & ATA_TFLAG_POLLING))) { - ata_check_status(ap); - return 1; - } - - /* handle interrupt */ - handled = ata_host_intr(ap, qc); - if (unlikely(!handled)) { - /* spurious, clear it */ - ata_check_status(ap); - } - - return 1; -} - -static irqreturn_t nv_do_interrupt(struct ata_host_set *host_set, u8 irq_stat) -{ - int i, handled = 0; - - for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; - - if (ap && !(ap->flags & ATA_FLAG_DISABLED)) - handled += nv_host_intr(ap, irq_stat); - - irq_stat >>= NV_INT_PORT_SHIFT; - } + spin_unlock_irqrestore(&host_set->lock, flags); return IRQ_RETVAL(handled); } -static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance, - struct pt_regs *regs) -{ - struct ata_host_set *host_set = dev_instance; - u8 irq_stat; - irqreturn_t ret; - - spin_lock(&host_set->lock); - irq_stat = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); - ret = nv_do_interrupt(host_set, irq_stat); - spin_unlock(&host_set->lock); - - return ret; -} - -static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance, - struct pt_regs *regs) -{ - struct ata_host_set *host_set = dev_instance; - u8 irq_stat; - irqreturn_t ret; - - spin_lock(&host_set->lock); - irq_stat = readb(host_set->mmio_base + NV_INT_STATUS_CK804); - ret = nv_do_interrupt(host_set, irq_stat); - spin_unlock(&host_set->lock); - - return ret; -} - static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg) { if (sc_reg > SCR_CONTROL) @@ -416,74 +317,23 @@ static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) iowrite32(val, (void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); } -static void nv_nf2_freeze(struct ata_port *ap) +static void nv_host_stop (struct ata_host_set *host_set) { - unsigned long scr_addr = ap->host_set->ports[0]->ioaddr.scr_addr; - int shift = ap->port_no * NV_INT_PORT_SHIFT; - u8 mask; + struct nv_host *host = host_set->private_data; - mask = inb(scr_addr + NV_INT_ENABLE); - mask &= ~(NV_INT_ALL << shift); - outb(mask, scr_addr + NV_INT_ENABLE); -} - -static void nv_nf2_thaw(struct ata_port *ap) -{ - unsigned long scr_addr = ap->host_set->ports[0]->ioaddr.scr_addr; - int shift = ap->port_no * NV_INT_PORT_SHIFT; - u8 mask; - - outb(NV_INT_ALL << shift, scr_addr + NV_INT_STATUS); - - mask = inb(scr_addr + NV_INT_ENABLE); - mask |= (NV_INT_MASK << shift); - outb(mask, scr_addr + NV_INT_ENABLE); -} - -static void nv_ck804_freeze(struct ata_port *ap) -{ - void __iomem *mmio_base = ap->host_set->mmio_base; - int shift = ap->port_no * NV_INT_PORT_SHIFT; - u8 mask; - - mask = readb(mmio_base + NV_INT_ENABLE_CK804); - mask &= ~(NV_INT_ALL << shift); - writeb(mask, mmio_base + NV_INT_ENABLE_CK804); -} - -static void nv_ck804_thaw(struct ata_port *ap) -{ - void __iomem *mmio_base = ap->host_set->mmio_base; - int shift = ap->port_no * NV_INT_PORT_SHIFT; - u8 mask; + // Disable hotplug event interrupts. + if (host->host_desc->disable_hotplug) + host->host_desc->disable_hotplug(host_set); - writeb(NV_INT_ALL << shift, mmio_base + NV_INT_STATUS_CK804); + kfree(host); - mask = readb(mmio_base + NV_INT_ENABLE_CK804); - mask |= (NV_INT_MASK << shift); - writeb(mask, mmio_base + NV_INT_ENABLE_CK804); -} - -static int nv_hardreset(struct ata_port *ap, unsigned int *class) -{ - unsigned int dummy; - - /* SATA hardreset fails to retrieve proper device signature on - * some controllers. Don't classify on hardreset. For more - * info, see http://bugme.osdl.org/show_bug.cgi?id=3352 - */ - return sata_std_hardreset(ap, &dummy); -} - -static void nv_error_handler(struct ata_port *ap) -{ - ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, - nv_hardreset, ata_std_postreset); + ata_pci_host_stop(host_set); } static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { static int printed_version = 0; + struct nv_host *host; struct ata_port_info *ppi; struct ata_probe_ent *probe_ent; int pci_dev_busy = 0; @@ -520,15 +370,24 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) rc = -ENOMEM; - ppi = &nv_port_info[ent->driver_data]; + ppi = &nv_port_info; probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); if (!probe_ent) goto err_out_regions; + host = kmalloc(sizeof(struct nv_host), GFP_KERNEL); + if (!host) + goto err_out_free_ent; + + memset(host, 0, sizeof(struct nv_host)); + host->host_desc = &nv_device_tbl[ent->driver_data]; + + probe_ent->private_data = host; + probe_ent->mmio_base = pci_iomap(pdev, 5, 0); if (!probe_ent->mmio_base) { rc = -EIO; - goto err_out_free_ent; + goto err_out_free_host; } base = (unsigned long)probe_ent->mmio_base; @@ -536,27 +395,24 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) probe_ent->port[0].scr_addr = base + NV_PORT0_SCR_REG_OFFSET; probe_ent->port[1].scr_addr = base + NV_PORT1_SCR_REG_OFFSET; - /* enable SATA space for CK804 */ - if (ent->driver_data == CK804) { - u8 regval; - - pci_read_config_byte(pdev, NV_MCP_SATA_CFG_20, ®val); - regval |= NV_MCP_SATA_CFG_20_SATA_SPACE_EN; - pci_write_config_byte(pdev, NV_MCP_SATA_CFG_20, regval); - } - pci_set_master(pdev); rc = ata_device_add(probe_ent); if (rc != NV_PORTS) goto err_out_iounmap; + // Enable hotplug event interrupts. + if (host->host_desc->enable_hotplug) + host->host_desc->enable_hotplug(probe_ent); + kfree(probe_ent); return 0; err_out_iounmap: pci_iounmap(pdev, probe_ent->mmio_base); +err_out_free_host: + kfree(host); err_out_free_ent: kfree(probe_ent); err_out_regions: @@ -568,17 +424,127 @@ err_out: return rc; } -static void nv_ck804_host_stop(struct ata_host_set *host_set) +static void nv_enable_hotplug(struct ata_probe_ent *probe_ent) +{ + u8 intr_mask; + + outb(NV_INT_STATUS_HOTPLUG, + probe_ent->port[0].scr_addr + NV_INT_STATUS); + + intr_mask = inb(probe_ent->port[0].scr_addr + NV_INT_ENABLE); + intr_mask |= NV_INT_ENABLE_HOTPLUG; + + outb(intr_mask, probe_ent->port[0].scr_addr + NV_INT_ENABLE); +} + +static void nv_disable_hotplug(struct ata_host_set *host_set) +{ + u8 intr_mask; + + intr_mask = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE); + + intr_mask &= ~(NV_INT_ENABLE_HOTPLUG); + + outb(intr_mask, host_set->ports[0]->ioaddr.scr_addr + NV_INT_ENABLE); +} + +static int nv_check_hotplug(struct ata_host_set *host_set) +{ + u8 intr_status; + + intr_status = inb(host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); + + // Clear interrupt status. + outb(0xff, host_set->ports[0]->ioaddr.scr_addr + NV_INT_STATUS); + + if (intr_status & NV_INT_STATUS_HOTPLUG) { + if (intr_status & NV_INT_STATUS_PDEV_ADDED) + printk(KERN_WARNING "nv_sata: " + "Primary device added\n"); + + if (intr_status & NV_INT_STATUS_PDEV_REMOVED) + printk(KERN_WARNING "nv_sata: " + "Primary device removed\n"); + + if (intr_status & NV_INT_STATUS_SDEV_ADDED) + printk(KERN_WARNING "nv_sata: " + "Secondary device added\n"); + + if (intr_status & NV_INT_STATUS_SDEV_REMOVED) + printk(KERN_WARNING "nv_sata: " + "Secondary device removed\n"); + + return 1; + } + + return 0; +} + +static void nv_enable_hotplug_ck804(struct ata_probe_ent *probe_ent) +{ + struct pci_dev *pdev = to_pci_dev(probe_ent->dev); + u8 intr_mask; + u8 regval; + + pci_read_config_byte(pdev, NV_MCP_SATA_CFG_20, ®val); + regval |= NV_MCP_SATA_CFG_20_SATA_SPACE_EN; + pci_write_config_byte(pdev, NV_MCP_SATA_CFG_20, regval); + + writeb(NV_INT_STATUS_HOTPLUG, probe_ent->mmio_base + NV_INT_STATUS_CK804); + + intr_mask = readb(probe_ent->mmio_base + NV_INT_ENABLE_CK804); + intr_mask |= NV_INT_ENABLE_HOTPLUG; + + writeb(intr_mask, probe_ent->mmio_base + NV_INT_ENABLE_CK804); +} + +static void nv_disable_hotplug_ck804(struct ata_host_set *host_set) { struct pci_dev *pdev = to_pci_dev(host_set->dev); + u8 intr_mask; u8 regval; - /* disable SATA space for CK804 */ + intr_mask = readb(host_set->mmio_base + NV_INT_ENABLE_CK804); + + intr_mask &= ~(NV_INT_ENABLE_HOTPLUG); + + writeb(intr_mask, host_set->mmio_base + NV_INT_ENABLE_CK804); + pci_read_config_byte(pdev, NV_MCP_SATA_CFG_20, ®val); regval &= ~NV_MCP_SATA_CFG_20_SATA_SPACE_EN; pci_write_config_byte(pdev, NV_MCP_SATA_CFG_20, regval); +} - ata_pci_host_stop(host_set); +static int nv_check_hotplug_ck804(struct ata_host_set *host_set) +{ + u8 intr_status; + + intr_status = readb(host_set->mmio_base + NV_INT_STATUS_CK804); + + // Clear interrupt status. + writeb(0xff, host_set->mmio_base + NV_INT_STATUS_CK804); + + if (intr_status & NV_INT_STATUS_HOTPLUG) { + if (intr_status & NV_INT_STATUS_PDEV_ADDED) + printk(KERN_WARNING "nv_sata: " + "Primary device added\n"); + + if (intr_status & NV_INT_STATUS_PDEV_REMOVED) + printk(KERN_WARNING "nv_sata: " + "Primary device removed\n"); + + if (intr_status & NV_INT_STATUS_SDEV_ADDED) + printk(KERN_WARNING "nv_sata: " + "Secondary device added\n"); + + if (intr_status & NV_INT_STATUS_SDEV_REMOVED) + printk(KERN_WARNING "nv_sata: " + "Secondary device removed\n"); + + return 1; + } + + return 0; } static int __init nv_init(void) diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 25da6260e..df5776210 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c @@ -76,8 +76,7 @@ enum { PDC_RESET = (1 << 11), /* HDMA reset */ PDC_COMMON_FLAGS = ATA_FLAG_NO_LEGACY | ATA_FLAG_SRST | - ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | - ATA_FLAG_PIO_POLLING, + ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI, }; @@ -121,7 +120,6 @@ static struct scsi_host_template pdc_ata_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -138,7 +136,6 @@ static const struct ata_port_operations pdc_sata_ops = { .qc_prep = pdc_qc_prep, .qc_issue = pdc_qc_issue_prot, .eng_timeout = pdc_eng_timeout, - .data_xfer = ata_mmio_data_xfer, .irq_handler = pdc_interrupt, .irq_clear = pdc_irq_clear, @@ -161,7 +158,6 @@ static const struct ata_port_operations pdc_pata_ops = { .qc_prep = pdc_qc_prep, .qc_issue = pdc_qc_issue_prot, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = pdc_eng_timeout, .irq_handler = pdc_interrupt, .irq_clear = pdc_irq_clear, @@ -269,15 +265,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = { { PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_20619 }, -/* TODO: remove all associated board_20771 code, as it completely - * duplicates board_2037x code, unless reason for separation can be - * divined. - */ -#if 0 { PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_20771 }, -#endif - { } /* terminate list */ }; @@ -370,41 +359,35 @@ static void pdc_reset_port(struct ata_port *ap) static void pdc_sata_phy_reset(struct ata_port *ap) { - /* pdc_reset_port(ap); */ /* pata fix */ - /* sata_phy_reset(ap); */ /* pata fix */ - /* if no sata flag, test for pata drive */ /* pata fix */ - if (ap->flags & ATA_FLAG_SATA) /* pata fix */ - { /* pata fix */ - pdc_reset_port(ap); /* pata fix */ - sata_phy_reset(ap); /* pata fix */ - } /* pata fix */ - else /* pata fix */ - pdc_pata_phy_reset(ap); /* pata fix */ -} - -static void pdc_pata_cbl_detect(struct ata_port *ap) -{ - u8 tmp; - void __iomem *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03; - - tmp = readb(mmio); - - if (tmp & 0x01) { - ap->cbl = ATA_CBL_PATA40; - ap->udma_mask &= ATA_UDMA_MASK_40C; - } else - ap->cbl = ATA_CBL_PATA80; +/* pdc_reset_port(ap); */ /* pata fix */ +/* sata_phy_reset(ap); */ /* pata fix */ + /* if no sata flag, test for pata drive */ /* pata fix */ + if (ap->flags & ATA_FLAG_SATA) /* pata fix */ + { /* pata fix */ + pdc_reset_port(ap); /* pata fix */ + sata_phy_reset(ap); /* pata fix */ + } /* pata fix */ + else /* pata fix */ + pdc_pata_phy_reset(ap); /* pata fix */ } static void pdc_pata_phy_reset(struct ata_port *ap) { - u8 tmp; /* pata fix */ - void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03; /* pata fix */ - tmp = readb(mmio); /* pata fix */ - if (tmp & 0x01) /* pata fix */ - ap->udma_mask &= ATA_UDMA_MASK_40C; /* pata fix */ + /* FIXME: add cable detect. Don't assume 40-pin cable */ +/* ap->cbl = ATA_CBL_PATA40; */ /* pata fix */ +/* ap->udma_mask &= ATA_UDMA_MASK_40C; */ /* pata fix */ + /* add cable detection code for pata drives */ /* pata fix */ + u8 tmp; /* pata fix */ + void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03; /* pata fix */ + tmp = readb(mmio); /* pata fix */ + if (tmp & 0x01) /* pata fix */ + { /* pata fix */ + ap->cbl = ATA_CBL_PATA40; /* pata fix */ + ap->udma_mask &= ATA_UDMA_MASK_40C; /* pata fix */ + } /* pata fix */ + else /* pata fix */ + ap->cbl = ATA_CBL_PATA80; /* pata fix */ - pdc_pata_cbl_detect(ap); pdc_reset_port(ap); ata_port_probe(ap); ata_bus_reset(ap); @@ -412,7 +395,7 @@ static void pdc_pata_phy_reset(struct ata_port *ap) static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) { - if ((sc_reg > SCR_CONTROL) || (ap->flags & ATA_FLAG_SLAVE_POSS)) + if (sc_reg > SCR_CONTROL) return 0xffffffffU; return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); } @@ -421,7 +404,7 @@ 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) { - if ((sc_reg > SCR_CONTROL) || (ap->flags & ATA_FLAG_SLAVE_POSS)) + if (sc_reg > SCR_CONTROL) return; writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); } @@ -471,7 +454,7 @@ static void pdc_eng_timeout(struct ata_port *ap) switch (qc->tf.protocol) { case ATA_PROT_DMA: case ATA_PROT_NODATA: - ata_port_printk(ap, KERN_ERR, "command timeout\n"); + printk(KERN_ERR "ata%u: command timeout\n", ap->id); drv_stat = ata_wait_idle(ap); qc->err_mask |= __ac_err_mask(drv_stat); break; @@ -479,9 +462,8 @@ static void pdc_eng_timeout(struct ata_port *ap) default: drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); - ata_port_printk(ap, KERN_ERR, - "unknown timeout, cmd 0x%x stat 0x%x\n", - qc->tf.command, drv_stat); + printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", + ap->id, qc->tf.command, drv_stat); qc->err_mask |= ac_err_mask(drv_stat); break; @@ -570,11 +552,11 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r ap = host_set->ports[i]; tmp = mask & (1 << (i + 1)); if (tmp && ap && - !(ap->flags & ATA_FLAG_DISABLED)) { + !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) + if (qc && (!(qc->tf.ctl & ATA_NIEN))) handled += pdc_host_intr(ap, qc); } } @@ -714,6 +696,10 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); + /* + * If this driver happens to only be useful on Apple's K2, then + * we should check that here as it has a normal Serverworks ID + */ rc = pci_enable_device(pdev); if (rc) return rc; @@ -765,7 +751,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e probe_ent->port_ops = pdc_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index d374c1db0..886f3447d 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c @@ -41,7 +41,7 @@ #include #define DRV_NAME "sata_qstor" -#define DRV_VERSION "0.06" +#define DRV_VERSION "0.05" enum { QS_PORTS = 4, @@ -142,7 +142,6 @@ static struct scsi_host_template qs_ata_sht = { .proc_name = DRV_NAME, .dma_boundary = QS_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -157,7 +156,6 @@ static const struct ata_port_operations qs_ata_ops = { .phy_reset = qs_phy_reset, .qc_prep = qs_qc_prep, .qc_issue = qs_qc_issue, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = qs_eng_timeout, .irq_handler = qs_intr, .irq_clear = qs_irq_clear, @@ -177,7 +175,7 @@ static const struct ata_port_info qs_port_info[] = { .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SATA_RESET | //FIXME ATA_FLAG_SRST | - ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, + ATA_FLAG_MMIO, .pio_mask = 0x10, /* pio4 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &qs_ata_ops, @@ -396,13 +394,14 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set) DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n", sff1, sff0, port_no, sHST, sDST); handled = 1; - if (ap && !(ap->flags & ATA_FLAG_DISABLED)) { + if (ap && !(ap->flags & + (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; struct qs_port_priv *pp = ap->private_data; if (!pp || pp->state != qs_state_pkt) continue; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { + if (qc && (!(qc->tf.ctl & ATA_NIEN))) { switch (sHST) { case 0: /* successful CPB */ case 3: /* device error */ @@ -429,13 +428,13 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set) struct ata_port *ap; ap = host_set->ports[port_no]; if (ap && - !(ap->flags & ATA_FLAG_DISABLED)) { + !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; struct qs_port_priv *pp = ap->private_data; if (!pp || pp->state != qs_state_mmio) continue; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { + if (qc && (!(qc->tf.ctl & ATA_NIEN))) { /* check main status, clearing INTRQ */ u8 status = ata_check_status(ap); @@ -680,7 +679,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, probe_ent->port_ops = qs_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; probe_ent->n_ports = QS_PORTS; diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index d0a85073e..106627299 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -46,26 +46,23 @@ #include #define DRV_NAME "sata_sil" -#define DRV_VERSION "2.0" +#define DRV_VERSION "0.9" enum { /* * host flags */ - SIL_FLAG_NO_SATA_IRQ = (1 << 28), SIL_FLAG_RERR_ON_DMA_ACT = (1 << 29), SIL_FLAG_MOD15WRITE = (1 << 30), - SIL_DFL_HOST_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO | ATA_FLAG_HRST_TO_RESUME, + ATA_FLAG_MMIO, /* * Controller IDs */ sil_3112 = 0, - sil_3112_no_sata_irq = 1, - sil_3512 = 2, - sil_3114 = 3, + sil_3512 = 1, + sil_3114 = 2, /* * Register offsets @@ -87,20 +84,6 @@ enum { /* BMDMA/BMDMA2 */ SIL_INTR_STEERING = (1 << 1), - SIL_DMA_ENABLE = (1 << 0), /* DMA run switch */ - SIL_DMA_RDWR = (1 << 3), /* DMA Rd-Wr */ - SIL_DMA_SATA_IRQ = (1 << 4), /* OR of all SATA IRQs */ - SIL_DMA_ACTIVE = (1 << 16), /* DMA running */ - SIL_DMA_ERROR = (1 << 17), /* PCI bus error */ - SIL_DMA_COMPLETE = (1 << 18), /* cmd complete / IRQ pending */ - SIL_DMA_N_SATA_IRQ = (1 << 6), /* SATA_IRQ for the next channel */ - SIL_DMA_N_ACTIVE = (1 << 24), /* ACTIVE for the next channel */ - SIL_DMA_N_ERROR = (1 << 25), /* ERROR for the next channel */ - SIL_DMA_N_COMPLETE = (1 << 26), /* COMPLETE for the next channel */ - - /* SIEN */ - SIL_SIEN_N = (1 << 16), /* triggered by SError.N */ - /* * Others */ @@ -109,15 +92,10 @@ enum { }; static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); -static int sil_pci_device_resume(struct pci_dev *pdev); static void sil_dev_config(struct ata_port *ap, struct ata_device *dev); static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg); static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); static void sil_post_set_mode (struct ata_port *ap); -static irqreturn_t sil_interrupt(int irq, void *dev_instance, - struct pt_regs *regs); -static void sil_freeze(struct ata_port *ap); -static void sil_thaw(struct ata_port *ap); static const struct pci_device_id sil_pci_tbl[] = { @@ -126,8 +104,8 @@ static const struct pci_device_id sil_pci_tbl[] = { { 0x1095, 0x3512, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3512 }, { 0x1095, 0x3114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3114 }, { 0x1002, 0x436e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, - { 0x1002, 0x4379, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, - { 0x1002, 0x437a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, + { 0x1002, 0x4379, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, + { 0x1002, 0x437a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, { } /* terminate list */ }; @@ -161,8 +139,6 @@ static struct pci_driver sil_pci_driver = { .id_table = sil_pci_tbl, .probe = sil_init_one, .remove = ata_pci_remove_one, - .suspend = ata_pci_device_suspend, - .resume = sil_pci_device_resume, }; static struct scsi_host_template sil_sht = { @@ -179,10 +155,7 @@ static struct scsi_host_template sil_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, - .suspend = ata_scsi_device_suspend, - .resume = ata_scsi_device_resume, }; static const struct ata_port_operations sil_ops = { @@ -193,6 +166,7 @@ static const struct ata_port_operations sil_ops = { .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .probe_reset = ata_std_probe_reset, .post_set_mode = sil_post_set_mode, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, @@ -200,12 +174,8 @@ static const struct ata_port_operations sil_ops = { .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_mmio_data_xfer, - .freeze = sil_freeze, - .thaw = sil_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, - .irq_handler = sil_interrupt, + .eng_timeout = ata_eng_timeout, + .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .scr_read = sil_scr_read, .scr_write = sil_scr_write, @@ -224,16 +194,6 @@ static const struct ata_port_info sil_port_info[] = { .udma_mask = 0x3f, /* udma0-5 */ .port_ops = &sil_ops, }, - /* sil_3112_no_sata_irq */ - { - .sht = &sil_sht, - .host_flags = SIL_DFL_HOST_FLAGS | SIL_FLAG_MOD15WRITE | - SIL_FLAG_NO_SATA_IRQ, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = 0x3f, /* udma0-5 */ - .port_ops = &sil_ops, - }, /* sil_3512 */ { .sht = &sil_sht, @@ -260,7 +220,6 @@ static const struct { unsigned long tf; /* ATA taskfile register block */ unsigned long ctl; /* ATA control/altstatus register block */ unsigned long bmdma; /* DMA register block */ - unsigned long bmdma2; /* DMA register block #2 */ unsigned long fifo_cfg; /* FIFO Valid Byte Count and Control */ unsigned long scr; /* SATA control register block */ unsigned long sien; /* SATA Interrupt Enable register */ @@ -268,10 +227,10 @@ static const struct { unsigned long sfis_cfg; /* SATA FIS reception config register */ } sil_port[] = { /* port 0 ... */ - { 0x80, 0x8A, 0x00, 0x10, 0x40, 0x100, 0x148, 0xb4, 0x14c }, - { 0xC0, 0xCA, 0x08, 0x18, 0x44, 0x180, 0x1c8, 0xf4, 0x1cc }, - { 0x280, 0x28A, 0x200, 0x210, 0x240, 0x300, 0x348, 0x2b4, 0x34c }, - { 0x2C0, 0x2CA, 0x208, 0x218, 0x244, 0x380, 0x3c8, 0x2f4, 0x3cc }, + { 0x80, 0x8A, 0x00, 0x40, 0x100, 0x148, 0xb4, 0x14c }, + { 0xC0, 0xCA, 0x08, 0x44, 0x180, 0x1c8, 0xf4, 0x1cc }, + { 0x280, 0x28A, 0x200, 0x240, 0x300, 0x348, 0x2b4, 0x34c }, + { 0x2C0, 0x2CA, 0x208, 0x244, 0x380, 0x3c8, 0x2f4, 0x3cc }, /* ... port 3 */ }; @@ -304,7 +263,7 @@ static void sil_post_set_mode (struct ata_port *ap) for (i = 0; i < 2; i++) { dev = &ap->device[i]; - if (!ata_dev_enabled(dev)) + if (!ata_dev_present(dev)) dev_mode[i] = 0; /* PIO0/1/2 */ else if (dev->flags & ATA_DFLAG_PIO) dev_mode[i] = 1; /* PIO3/4 */ @@ -355,156 +314,6 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) writel(val, mmio); } -static void sil_host_intr(struct ata_port *ap, u32 bmdma2) -{ - struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); - u8 status; - - if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) { - u32 serror; - - /* SIEN doesn't mask SATA IRQs on some 3112s. Those - * controllers continue to assert IRQ as long as - * SError bits are pending. Clear SError immediately. - */ - serror = sil_scr_read(ap, SCR_ERROR); - sil_scr_write(ap, SCR_ERROR, serror); - - /* Trigger hotplug and accumulate SError only if the - * port isn't already frozen. Otherwise, PHY events - * during hardreset makes controllers with broken SIEN - * repeat probing needlessly. - */ - if (!(ap->pflags & ATA_PFLAG_FROZEN)) { - ata_ehi_hotplugged(&ap->eh_info); - ap->eh_info.serror |= serror; - } - - goto freeze; - } - - if (unlikely(!qc || qc->tf.ctl & ATA_NIEN)) - goto freeze; - - /* Check whether we are expecting interrupt in this state */ - switch (ap->hsm_task_state) { - case HSM_ST_FIRST: - /* Some pre-ATAPI-4 devices assert INTRQ - * at this state when ready to receive CDB. - */ - - /* Check the ATA_DFLAG_CDB_INTR flag is enough here. - * The flag was turned on only for atapi devices. - * No need to check is_atapi_taskfile(&qc->tf) again. - */ - if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) - goto err_hsm; - break; - case HSM_ST_LAST: - if (qc->tf.protocol == ATA_PROT_DMA || - qc->tf.protocol == ATA_PROT_ATAPI_DMA) { - /* clear DMA-Start bit */ - ap->ops->bmdma_stop(qc); - - if (bmdma2 & SIL_DMA_ERROR) { - qc->err_mask |= AC_ERR_HOST_BUS; - ap->hsm_task_state = HSM_ST_ERR; - } - } - break; - case HSM_ST: - break; - default: - goto err_hsm; - } - - /* check main status, clearing INTRQ */ - status = ata_chk_status(ap); - if (unlikely(status & ATA_BUSY)) - goto err_hsm; - - /* ack bmdma irq events */ - ata_bmdma_irq_clear(ap); - - /* kick HSM in the ass */ - ata_hsm_move(ap, qc, status, 0); - - return; - - err_hsm: - qc->err_mask |= AC_ERR_HSM; - freeze: - ata_port_freeze(ap); -} - -static irqreturn_t sil_interrupt(int irq, void *dev_instance, - struct pt_regs *regs) -{ - struct ata_host_set *host_set = dev_instance; - void __iomem *mmio_base = host_set->mmio_base; - int handled = 0; - int i; - - spin_lock(&host_set->lock); - - for (i = 0; i < host_set->n_ports; i++) { - struct ata_port *ap = host_set->ports[i]; - u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2); - - if (unlikely(!ap || ap->flags & ATA_FLAG_DISABLED)) - continue; - - /* turn off SATA_IRQ if not supported */ - if (ap->flags & SIL_FLAG_NO_SATA_IRQ) - bmdma2 &= ~SIL_DMA_SATA_IRQ; - - if (bmdma2 == 0xffffffff || - !(bmdma2 & (SIL_DMA_COMPLETE | SIL_DMA_SATA_IRQ))) - continue; - - sil_host_intr(ap, bmdma2); - handled = 1; - } - - spin_unlock(&host_set->lock); - - return IRQ_RETVAL(handled); -} - -static void sil_freeze(struct ata_port *ap) -{ - void __iomem *mmio_base = ap->host_set->mmio_base; - u32 tmp; - - /* global IRQ mask doesn't block SATA IRQ, turn off explicitly */ - writel(0, mmio_base + sil_port[ap->port_no].sien); - - /* plug IRQ */ - tmp = readl(mmio_base + SIL_SYSCFG); - tmp |= SIL_MASK_IDE0_INT << ap->port_no; - writel(tmp, mmio_base + SIL_SYSCFG); - readl(mmio_base + SIL_SYSCFG); /* flush */ -} - -static void sil_thaw(struct ata_port *ap) -{ - void __iomem *mmio_base = ap->host_set->mmio_base; - u32 tmp; - - /* clear IRQ */ - ata_chk_status(ap); - ata_bmdma_irq_clear(ap); - - /* turn on SATA IRQ if supported */ - if (!(ap->flags & SIL_FLAG_NO_SATA_IRQ)) - writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien); - - /* turn on IRQ */ - tmp = readl(mmio_base + SIL_SYSCFG); - tmp &= ~(SIL_MASK_IDE0_INT << ap->port_no); - writel(tmp, mmio_base + SIL_SYSCFG); -} - /** * sil_dev_config - Apply device/host-specific errata fixups * @ap: Port containing device to be examined @@ -551,67 +360,21 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) if (slow_down || ((ap->flags & SIL_FLAG_MOD15WRITE) && (quirks & SIL_QUIRK_MOD15WRITE))) { - ata_dev_printk(dev, KERN_INFO, "applying Seagate errata fix " - "(mod15write workaround)\n"); + printk(KERN_INFO "ata%u(%u): applying Seagate errata fix (mod15write workaround)\n", + ap->id, dev->devno); dev->max_sectors = 15; return; } /* limit to udma5 */ if (quirks & SIL_QUIRK_UDMA5MAX) { - ata_dev_printk(dev, KERN_INFO, - "applying Maxtor errata fix %s\n", model_num); + printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", + ap->id, dev->devno, model_num); dev->udma_mask &= ATA_UDMA5; return; } } -static void sil_init_controller(struct pci_dev *pdev, - int n_ports, unsigned long host_flags, - void __iomem *mmio_base) -{ - u8 cls; - u32 tmp; - int i; - - /* Initialize FIFO PCI bus arbitration */ - cls = sil_get_device_cache_line(pdev); - if (cls) { - cls >>= 3; - cls++; /* cls = (line_size/8)+1 */ - for (i = 0; i < n_ports; i++) - writew(cls << 8 | cls, - mmio_base + sil_port[i].fifo_cfg); - } else - dev_printk(KERN_WARNING, &pdev->dev, - "cache line size not set. Driver may not function\n"); - - /* Apply R_ERR on DMA activate FIS errata workaround */ - if (host_flags & SIL_FLAG_RERR_ON_DMA_ACT) { - int cnt; - - for (i = 0, cnt = 0; i < n_ports; i++) { - tmp = readl(mmio_base + sil_port[i].sfis_cfg); - if ((tmp & 0x3) != 0x01) - continue; - if (!cnt) - dev_printk(KERN_INFO, &pdev->dev, - "Applying R_ERR on DMA activate " - "FIS errata fix\n"); - writel(tmp & ~0x3, mmio_base + sil_port[i].sfis_cfg); - cnt++; - } - } - - if (n_ports == 4) { - /* flip the magic "make 4 ports work" bit */ - tmp = readl(mmio_base + sil_port[2].bmdma); - if ((tmp & SIL_INTR_STEERING) == 0) - writel(tmp | SIL_INTR_STEERING, - mmio_base + sil_port[2].bmdma); - } -} - static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { static int printed_version; @@ -621,10 +384,16 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) int rc; unsigned int i; int pci_dev_busy = 0; + u32 tmp, irq_mask; + u8 cls; if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); + /* + * If this driver happens to only be useful on Apple's K2, then + * we should check that here as it has a normal Serverworks ID + */ rc = pci_enable_device(pdev); if (rc) return rc; @@ -657,7 +426,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) probe_ent->mwdma_mask = sil_port_info[ent->driver_data].mwdma_mask; probe_ent->udma_mask = sil_port_info[ent->driver_data].udma_mask; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; mmio_base = pci_iomap(pdev, 5, 0); @@ -679,8 +448,60 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) ata_std_ports(&probe_ent->port[i]); } - sil_init_controller(pdev, probe_ent->n_ports, probe_ent->host_flags, - mmio_base); + /* Initialize FIFO PCI bus arbitration */ + cls = sil_get_device_cache_line(pdev); + if (cls) { + cls >>= 3; + cls++; /* cls = (line_size/8)+1 */ + for (i = 0; i < probe_ent->n_ports; i++) + writew(cls << 8 | cls, + mmio_base + sil_port[i].fifo_cfg); + } else + dev_printk(KERN_WARNING, &pdev->dev, + "cache line size not set. Driver may not function\n"); + + /* Apply R_ERR on DMA activate FIS errata workaround */ + if (probe_ent->host_flags & SIL_FLAG_RERR_ON_DMA_ACT) { + int cnt; + + for (i = 0, cnt = 0; i < probe_ent->n_ports; i++) { + tmp = readl(mmio_base + sil_port[i].sfis_cfg); + if ((tmp & 0x3) != 0x01) + continue; + if (!cnt) + dev_printk(KERN_INFO, &pdev->dev, + "Applying R_ERR on DMA activate " + "FIS errata fix\n"); + writel(tmp & ~0x3, mmio_base + sil_port[i].sfis_cfg); + cnt++; + } + } + + if (ent->driver_data == sil_3114) { + irq_mask = SIL_MASK_4PORT; + + /* flip the magic "make 4 ports work" bit */ + tmp = readl(mmio_base + sil_port[2].bmdma); + if ((tmp & SIL_INTR_STEERING) == 0) + writel(tmp | SIL_INTR_STEERING, + mmio_base + sil_port[2].bmdma); + + } else { + irq_mask = SIL_MASK_2PORT; + } + + /* make sure IDE0/1/2/3 interrupts are not masked */ + tmp = readl(mmio_base + SIL_SYSCFG); + if (tmp & irq_mask) { + tmp &= ~irq_mask; + writel(tmp, mmio_base + SIL_SYSCFG); + readl(mmio_base + SIL_SYSCFG); /* flush */ + } + + /* mask all SATA phy-related interrupts */ + /* TODO: unmask bit 6 (SError N bit) for hotplug */ + for (i = 0; i < probe_ent->n_ports; i++) + writel(0, mmio_base + sil_port[i].sien); pci_set_master(pdev); @@ -700,18 +521,6 @@ err_out: return rc; } -static int sil_pci_device_resume(struct pci_dev *pdev) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - - ata_pci_device_do_resume(pdev); - sil_init_controller(pdev, host_set->n_ports, host_set->ports[0]->flags, - host_set->mmio_base); - ata_host_set_resume(host_set); - - return 0; -} - static int __init sil_init(void) { return pci_module_init(&sil_pci_driver); diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 3f368c7d3..cb9082fd7 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c @@ -31,15 +31,15 @@ #include #define DRV_NAME "sata_sil24" -#define DRV_VERSION "0.3" +#define DRV_VERSION "0.23" /* * Port request block (PRB) 32 bytes */ struct sil24_prb { - __le16 ctrl; - __le16 prot; - __le32 rx_cnt; + u16 ctrl; + u16 prot; + u32 rx_cnt; u8 fis[6 * 4]; }; @@ -47,17 +47,17 @@ struct sil24_prb { * Scatter gather entry (SGE) 16 bytes */ struct sil24_sge { - __le64 addr; - __le32 cnt; - __le32 flags; + u64 addr; + u32 cnt; + u32 flags; }; /* * Port multiplier */ struct sil24_port_multiplier { - __le32 diag; - __le32 sactive; + u32 diag; + u32 sactive; }; enum { @@ -86,22 +86,12 @@ enum { /* HOST_SLOT_STAT bits */ HOST_SSTAT_ATTN = (1 << 31), - /* HOST_CTRL bits */ - HOST_CTRL_M66EN = (1 << 16), /* M66EN PCI bus signal */ - HOST_CTRL_TRDY = (1 << 17), /* latched PCI TRDY */ - HOST_CTRL_STOP = (1 << 18), /* latched PCI STOP */ - HOST_CTRL_DEVSEL = (1 << 19), /* latched PCI DEVSEL */ - HOST_CTRL_REQ64 = (1 << 20), /* latched PCI REQ64 */ - HOST_CTRL_GLOBAL_RST = (1 << 31), /* global reset */ - /* * Port registers * (8192 bytes @ +0x0000, +0x2000, +0x4000 and +0x6000 @ BAR2) */ PORT_REGS_SIZE = 0x2000, - - PORT_LRAM = 0x0000, /* 31 LRAM slots and PM regs */ - PORT_LRAM_SLOT_SZ = 0x0080, /* 32 bytes PRB + 2 SGE, ACT... */ + PORT_PRB = 0x0000, /* (32 bytes PRB + 16 bytes SGEs * 6) * 31 (3968 bytes) */ PORT_PM = 0x0f80, /* 8 bytes PM * 16 (128 bytes) */ /* 32 bit regs */ @@ -152,16 +142,8 @@ enum { PORT_IRQ_PWR_CHG = (1 << 3), /* power management change */ PORT_IRQ_PHYRDY_CHG = (1 << 4), /* PHY ready change */ PORT_IRQ_COMWAKE = (1 << 5), /* COMWAKE received */ - PORT_IRQ_UNK_FIS = (1 << 6), /* unknown FIS received */ - PORT_IRQ_DEV_XCHG = (1 << 7), /* device exchanged */ - PORT_IRQ_8B10B = (1 << 8), /* 8b/10b decode error threshold */ - PORT_IRQ_CRC = (1 << 9), /* CRC error threshold */ - PORT_IRQ_HANDSHAKE = (1 << 10), /* handshake error threshold */ - PORT_IRQ_SDB_NOTIFY = (1 << 11), /* SDB notify received */ - - DEF_PORT_IRQ = PORT_IRQ_COMPLETE | PORT_IRQ_ERROR | - PORT_IRQ_PHYRDY_CHG | PORT_IRQ_DEV_XCHG | - PORT_IRQ_UNK_FIS, + PORT_IRQ_UNK_FIS = (1 << 6), /* Unknown FIS received */ + PORT_IRQ_SDB_FIS = (1 << 11), /* SDB FIS received */ /* bits[27:16] are unmasked (raw) */ PORT_IRQ_RAW_SHIFT = 16, @@ -192,7 +174,7 @@ enum { PORT_CERR_CMD_PCIPERR = 27, /* ctrl[15:13] 110 - PCI parity err while fetching PRB */ PORT_CERR_XFR_UNDEF = 32, /* PSD ecode 00 - undefined */ PORT_CERR_XFR_TGTABRT = 33, /* PSD ecode 01 - target abort */ - PORT_CERR_XFR_MSTABRT = 34, /* PSD ecode 10 - master abort */ + PORT_CERR_XFR_MSGABRT = 34, /* PSD ecode 10 - master abort */ PORT_CERR_XFR_PCIPERR = 35, /* PSD ecode 11 - PCI prity err during transfer */ PORT_CERR_SENDSERVICE = 36, /* FIS received while sending service */ @@ -220,19 +202,11 @@ enum { SGE_DRD = (1 << 29), /* discard data read (/dev/null) data address ignored */ - SIL24_MAX_CMDS = 31, - /* board id */ BID_SIL3124 = 0, BID_SIL3132 = 1, BID_SIL3131 = 2, - /* host flags */ - SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY, - SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */ - IRQ_STAT_4PORTS = 0xf, }; @@ -252,58 +226,6 @@ union sil24_cmd_block { struct sil24_atapi_block atapi; }; -static struct sil24_cerr_info { - unsigned int err_mask, action; - const char *desc; -} sil24_cerr_db[] = { - [0] = { AC_ERR_DEV, ATA_EH_REVALIDATE, - "device error" }, - [PORT_CERR_DEV] = { AC_ERR_DEV, ATA_EH_REVALIDATE, - "device error via D2H FIS" }, - [PORT_CERR_SDB] = { AC_ERR_DEV, ATA_EH_REVALIDATE, - "device error via SDB FIS" }, - [PORT_CERR_DATA] = { AC_ERR_ATA_BUS, ATA_EH_SOFTRESET, - "error in data FIS" }, - [PORT_CERR_SEND] = { AC_ERR_ATA_BUS, ATA_EH_SOFTRESET, - "failed to transmit command FIS" }, - [PORT_CERR_INCONSISTENT] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "protocol mismatch" }, - [PORT_CERR_DIRECTION] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "data directon mismatch" }, - [PORT_CERR_UNDERRUN] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "ran out of SGEs while writing" }, - [PORT_CERR_OVERRUN] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "ran out of SGEs while reading" }, - [PORT_CERR_PKT_PROT] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "invalid data directon for ATAPI CDB" }, - [PORT_CERR_SGT_BOUNDARY] = { AC_ERR_SYSTEM, ATA_EH_SOFTRESET, - "SGT no on qword boundary" }, - [PORT_CERR_SGT_TGTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI target abort while fetching SGT" }, - [PORT_CERR_SGT_MSTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI master abort while fetching SGT" }, - [PORT_CERR_SGT_PCIPERR] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI parity error while fetching SGT" }, - [PORT_CERR_CMD_BOUNDARY] = { AC_ERR_SYSTEM, ATA_EH_SOFTRESET, - "PRB not on qword boundary" }, - [PORT_CERR_CMD_TGTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI target abort while fetching PRB" }, - [PORT_CERR_CMD_MSTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI master abort while fetching PRB" }, - [PORT_CERR_CMD_PCIPERR] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI parity error while fetching PRB" }, - [PORT_CERR_XFR_UNDEF] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "undefined error while transferring data" }, - [PORT_CERR_XFR_TGTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI target abort while transferring data" }, - [PORT_CERR_XFR_MSTABRT] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI master abort while transferring data" }, - [PORT_CERR_XFR_PCIPERR] = { AC_ERR_HOST_BUS, ATA_EH_SOFTRESET, - "PCI parity error while transferring data" }, - [PORT_CERR_SENDSERVICE] = { AC_ERR_HSM, ATA_EH_SOFTRESET, - "FIS received while sending service FIS" }, -}; - /* * ap->private_data * @@ -327,19 +249,16 @@ static u8 sil24_check_status(struct ata_port *ap); static u32 sil24_scr_read(struct ata_port *ap, unsigned sc_reg); static void sil24_scr_write(struct ata_port *ap, unsigned sc_reg, u32 val); static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf); +static int sil24_probe_reset(struct ata_port *ap, unsigned int *classes); static void sil24_qc_prep(struct ata_queued_cmd *qc); static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc); static void sil24_irq_clear(struct ata_port *ap); +static void sil24_eng_timeout(struct ata_port *ap); static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static void sil24_freeze(struct ata_port *ap); -static void sil24_thaw(struct ata_port *ap); -static void sil24_error_handler(struct ata_port *ap); -static void sil24_post_internal_cmd(struct ata_queued_cmd *qc); static int sil24_port_start(struct ata_port *ap); static void sil24_port_stop(struct ata_port *ap); static void sil24_host_stop(struct ata_host_set *host_set); static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); -static int sil24_pci_device_resume(struct pci_dev *pdev); static const struct pci_device_id sil24_pci_tbl[] = { { 0x1095, 0x3124, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3124 }, @@ -355,8 +274,6 @@ static struct pci_driver sil24_pci_driver = { .id_table = sil24_pci_tbl, .probe = sil24_init_one, .remove = ata_pci_remove_one, /* safe? */ - .suspend = ata_pci_device_suspend, - .resume = sil24_pci_device_resume, }; static struct scsi_host_template sil24_sht = { @@ -364,8 +281,7 @@ static struct scsi_host_template sil24_sht = { .name = DRV_NAME, .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, - .change_queue_depth = ata_scsi_change_queue_depth, - .can_queue = SIL24_MAX_CMDS, + .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, @@ -374,10 +290,7 @@ static struct scsi_host_template sil24_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, - .suspend = ata_scsi_device_suspend, - .resume = ata_scsi_device_resume, }; static const struct ata_port_operations sil24_ops = { @@ -391,20 +304,19 @@ static const struct ata_port_operations sil24_ops = { .tf_read = sil24_tf_read, + .probe_reset = sil24_probe_reset, + .qc_prep = sil24_qc_prep, .qc_issue = sil24_qc_issue, + .eng_timeout = sil24_eng_timeout, + .irq_handler = sil24_interrupt, .irq_clear = sil24_irq_clear, .scr_read = sil24_scr_read, .scr_write = sil24_scr_write, - .freeze = sil24_freeze, - .thaw = sil24_thaw, - .error_handler = sil24_error_handler, - .post_internal_cmd = sil24_post_internal_cmd, - .port_start = sil24_port_start, .port_stop = sil24_port_stop, .host_stop = sil24_host_stop, @@ -421,8 +333,9 @@ static struct ata_port_info sil24_port_info[] = { /* sil_3124 */ { .sht = &sil24_sht, - .host_flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(4) | - SIL24_FLAG_PCIX_IRQ_WOC, + .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | + ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | + SIL24_NPORTS2FLAG(4), .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x3f, /* udma0-5 */ @@ -431,7 +344,9 @@ static struct ata_port_info sil24_port_info[] = { /* sil_3132 */ { .sht = &sil24_sht, - .host_flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(2), + .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | + ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | + SIL24_NPORTS2FLAG(2), .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x3f, /* udma0-5 */ @@ -440,7 +355,9 @@ static struct ata_port_info sil24_port_info[] = { /* sil_3131/sil_3531 */ { .sht = &sil24_sht, - .host_flags = SIL24_COMMON_FLAGS | SIL24_NPORTS2FLAG(1), + .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | + ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | + SIL24_NPORTS2FLAG(1), .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x3f, /* udma0-5 */ @@ -448,13 +365,6 @@ static struct ata_port_info sil24_port_info[] = { }, }; -static int sil24_tag(int tag) -{ - if (unlikely(ata_tag_internal(tag))) - return 0; - return tag; -} - static void sil24_dev_config(struct ata_port *ap, struct ata_device *dev) { void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; @@ -516,65 +426,56 @@ static void sil24_tf_read(struct ata_port *ap, struct ata_taskfile *tf) *tf = pp->tf; } -static int sil24_init_port(struct ata_port *ap) -{ - void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - u32 tmp; - - writel(PORT_CS_INIT, port + PORT_CTRL_STAT); - ata_wait_register(port + PORT_CTRL_STAT, - PORT_CS_INIT, PORT_CS_INIT, 10, 100); - tmp = ata_wait_register(port + PORT_CTRL_STAT, - PORT_CS_RDY, 0, 10, 100); - - if ((tmp & (PORT_CS_INIT | PORT_CS_RDY)) != PORT_CS_RDY) - return -EIO; - return 0; -} - -static int sil24_softreset(struct ata_port *ap, unsigned int *class) +static int sil24_softreset(struct ata_port *ap, int verbose, + unsigned int *class) { void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; struct sil24_port_priv *pp = ap->private_data; struct sil24_prb *prb = &pp->cmd_block[0].ata.prb; dma_addr_t paddr = pp->cmd_block_dma; - u32 mask, irq_stat; - const char *reason; + unsigned long timeout = jiffies + ATA_TMOUT_BOOT * HZ; + u32 irq_enable, irq_stat; DPRINTK("ENTER\n"); - if (ata_port_offline(ap)) { + if (!sata_dev_present(ap)) { DPRINTK("PHY reports no device\n"); *class = ATA_DEV_NONE; goto out; } - /* put the port into known state */ - if (sil24_init_port(ap)) { - reason ="port not ready"; - goto err; - } + /* temporarily turn off IRQs during SRST */ + irq_enable = readl(port + PORT_IRQ_ENABLE_SET); + writel(irq_enable, port + PORT_IRQ_ENABLE_CLR); + + /* + * XXX: Not sure whether the following sleep is needed or not. + * The original driver had it. So.... + */ + msleep(10); - /* do SRST */ prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); prb->fis[1] = 0; /* no PM yet */ writel((u32)paddr, port + PORT_CMD_ACTIVATE); - writel((u64)paddr >> 32, port + PORT_CMD_ACTIVATE + 4); - mask = (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR) << PORT_IRQ_RAW_SHIFT; - irq_stat = ata_wait_register(port + PORT_IRQ_STAT, mask, 0x0, - 100, ATA_TMOUT_BOOT / HZ * 1000); + do { + irq_stat = readl(port + PORT_IRQ_STAT); + writel(irq_stat, port + PORT_IRQ_STAT); /* clear irq */ + + irq_stat >>= PORT_IRQ_RAW_SHIFT; + if (irq_stat & (PORT_IRQ_COMPLETE | PORT_IRQ_ERROR)) + break; + + msleep(100); + } while (time_before(jiffies, timeout)); - writel(irq_stat, port + PORT_IRQ_STAT); /* clear IRQs */ - irq_stat >>= PORT_IRQ_RAW_SHIFT; + /* restore IRQs */ + writel(irq_enable, port + PORT_IRQ_ENABLE_SET); if (!(irq_stat & PORT_IRQ_COMPLETE)) { - if (irq_stat & PORT_IRQ_ERROR) - reason = "SRST command error"; - else - reason = "timeout"; - goto err; + DPRINTK("EXIT, srst failed\n"); + return -EIO; } sil24_update_tf(ap); @@ -586,57 +487,22 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class) out: DPRINTK("EXIT, class=%u\n", *class); return 0; - - err: - ata_port_printk(ap, KERN_ERR, "softreset failed (%s)\n", reason); - return -EIO; } -static int sil24_hardreset(struct ata_port *ap, unsigned int *class) +static int sil24_hardreset(struct ata_port *ap, int verbose, + unsigned int *class) { - void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - const char *reason; - int tout_msec, rc; - u32 tmp; - - /* sil24 does the right thing(tm) without any protection */ - sata_set_spd(ap); + unsigned int dummy_class; - tout_msec = 100; - if (ata_port_online(ap)) - tout_msec = 5000; - - writel(PORT_CS_DEV_RST, port + PORT_CTRL_STAT); - tmp = ata_wait_register(port + PORT_CTRL_STAT, - PORT_CS_DEV_RST, PORT_CS_DEV_RST, 10, tout_msec); - - /* SStatus oscillates between zero and valid status after - * DEV_RST, debounce it. - */ - rc = sata_phy_debounce(ap, sata_deb_timing_long); - if (rc) { - reason = "PHY debouncing failed"; - goto err; - } - - if (tmp & PORT_CS_DEV_RST) { - if (ata_port_offline(ap)) - return 0; - reason = "link not ready"; - goto err; - } - - /* Sil24 doesn't store signature FIS after hardreset, so we - * can't wait for BSY to clear. Some devices take a long time - * to get ready and those devices will choke if we don't wait - * for BSY clearance here. Tell libata to perform follow-up - * softreset. - */ - return -EAGAIN; + /* sil24 doesn't report device signature after hard reset */ + return sata_std_hardreset(ap, verbose, &dummy_class); +} - err: - ata_port_printk(ap, KERN_ERR, "hardreset failed (%s)\n", reason); - return -EIO; +static int sil24_probe_reset(struct ata_port *ap, unsigned int *classes) +{ + return ata_drive_probe_reset(ap, ata_std_probeinit, + sil24_softreset, sil24_hardreset, + ata_std_postreset, classes); } static inline void sil24_fill_sg(struct ata_queued_cmd *qc, @@ -662,20 +528,17 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; struct sil24_port_priv *pp = ap->private_data; - union sil24_cmd_block *cb; + union sil24_cmd_block *cb = pp->cmd_block + qc->tag; struct sil24_prb *prb; struct sil24_sge *sge; - u16 ctrl = 0; - - cb = &pp->cmd_block[sil24_tag(qc->tag)]; switch (qc->tf.protocol) { case ATA_PROT_PIO: case ATA_PROT_DMA: - case ATA_PROT_NCQ: case ATA_PROT_NODATA: prb = &cb->ata.prb; sge = cb->ata.sge; + prb->ctrl = 0; break; case ATA_PROT_ATAPI: @@ -688,10 +551,12 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { if (qc->tf.flags & ATA_TFLAG_WRITE) - ctrl = PRB_CTRL_PACKET_WRITE; + prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); else - ctrl = PRB_CTRL_PACKET_READ; - } + prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); + } else + prb->ctrl = 0; + break; default: @@ -700,7 +565,6 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) BUG(); } - prb->ctrl = cpu_to_le16(ctrl); ata_tf_to_fis(&qc->tf, prb->fis, 0); if (qc->flags & ATA_QCFLAG_DMAMAP) @@ -710,18 +574,11 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc) static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc) { struct ata_port *ap = qc->ap; - struct sil24_port_priv *pp = ap->private_data; void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - unsigned int tag = sil24_tag(qc->tag); - dma_addr_t paddr; - void __iomem *activate; - - paddr = pp->cmd_block_dma + tag * sizeof(*pp->cmd_block); - activate = port + PORT_CMD_ACTIVATE + tag * 8; - - writel((u32)paddr, activate); - writel((u64)paddr >> 32, activate + 4); + struct sil24_port_priv *pp = ap->private_data; + dma_addr_t paddr = pp->cmd_block_dma + qc->tag * sizeof(*pp->cmd_block); + writel((u32)paddr, port + PORT_CMD_ACTIVATE); return 0; } @@ -730,139 +587,162 @@ static void sil24_irq_clear(struct ata_port *ap) /* unused */ } -static void sil24_freeze(struct ata_port *ap) +static int __sil24_restart_controller(void __iomem *port) { - void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - - /* Port-wide IRQ mask in HOST_CTRL doesn't really work, clear - * PORT_IRQ_ENABLE instead. - */ - writel(0xffff, port + PORT_IRQ_ENABLE_CLR); -} - -static void sil24_thaw(struct ata_port *ap) -{ - void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; u32 tmp; + int cnt; - /* clear IRQ */ - tmp = readl(port + PORT_IRQ_STAT); - writel(tmp, port + PORT_IRQ_STAT); + writel(PORT_CS_INIT, port + PORT_CTRL_STAT); - /* turn IRQ back on */ - writel(DEF_PORT_IRQ, port + PORT_IRQ_ENABLE_SET); + /* Max ~10ms */ + for (cnt = 0; cnt < 10000; cnt++) { + tmp = readl(port + PORT_CTRL_STAT); + if (tmp & PORT_CS_RDY) + return 0; + udelay(1); + } + + return -1; } -static void sil24_error_intr(struct ata_port *ap) +static void sil24_restart_controller(struct ata_port *ap) { - void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - struct ata_eh_info *ehi = &ap->eh_info; - int freeze = 0; - u32 irq_stat; - - /* on error, we need to clear IRQ explicitly */ - irq_stat = readl(port + PORT_IRQ_STAT); - writel(irq_stat, port + PORT_IRQ_STAT); - - /* first, analyze and record host port events */ - ata_ehi_clear_desc(ehi); + if (__sil24_restart_controller((void __iomem *)ap->ioaddr.cmd_addr)) + printk(KERN_ERR DRV_NAME + " ata%u: failed to restart controller\n", ap->id); +} - ata_ehi_push_desc(ehi, "irq_stat 0x%08x", irq_stat); +static int __sil24_reset_controller(void __iomem *port) +{ + int cnt; + u32 tmp; - if (irq_stat & (PORT_IRQ_PHYRDY_CHG | PORT_IRQ_DEV_XCHG)) { - ata_ehi_hotplugged(ehi); - ata_ehi_push_desc(ehi, ", %s", - irq_stat & PORT_IRQ_PHYRDY_CHG ? - "PHY RDY changed" : "device exchanged"); - freeze = 1; - } + /* Reset controller state. Is this correct? */ + writel(PORT_CS_DEV_RST, port + PORT_CTRL_STAT); + readl(port + PORT_CTRL_STAT); /* sync */ - if (irq_stat & PORT_IRQ_UNK_FIS) { - ehi->err_mask |= AC_ERR_HSM; - ehi->action |= ATA_EH_SOFTRESET; - ata_ehi_push_desc(ehi , ", unknown FIS"); - freeze = 1; + /* Max ~100ms */ + for (cnt = 0; cnt < 1000; cnt++) { + udelay(100); + tmp = readl(port + PORT_CTRL_STAT); + if (!(tmp & PORT_CS_DEV_RST)) + break; } - /* deal with command error */ - if (irq_stat & PORT_IRQ_ERROR) { - struct sil24_cerr_info *ci = NULL; - unsigned int err_mask = 0, action = 0; - struct ata_queued_cmd *qc; - u32 cerr; - - /* analyze CMD_ERR */ - cerr = readl(port + PORT_CMD_ERR); - if (cerr < ARRAY_SIZE(sil24_cerr_db)) - ci = &sil24_cerr_db[cerr]; - - if (ci && ci->desc) { - err_mask |= ci->err_mask; - action |= ci->action; - ata_ehi_push_desc(ehi, ", %s", ci->desc); - } else { - err_mask |= AC_ERR_OTHER; - action |= ATA_EH_SOFTRESET; - ata_ehi_push_desc(ehi, ", unknown command error %d", - cerr); - } + if (tmp & PORT_CS_DEV_RST) + return -1; - /* record error info */ - qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc) { - sil24_update_tf(ap); - qc->err_mask |= err_mask; - } else - ehi->err_mask |= err_mask; + if (tmp & PORT_CS_RDY) + return 0; - ehi->action |= action; - } + return __sil24_restart_controller(port); +} - /* freeze or abort */ - if (freeze) - ata_port_freeze(ap); - else - ata_port_abort(ap); +static void sil24_reset_controller(struct ata_port *ap) +{ + printk(KERN_NOTICE DRV_NAME + " ata%u: resetting controller...\n", ap->id); + if (__sil24_reset_controller((void __iomem *)ap->ioaddr.cmd_addr)) + printk(KERN_ERR DRV_NAME + " ata%u: failed to reset controller\n", ap->id); } -static void sil24_finish_qc(struct ata_queued_cmd *qc) +static void sil24_eng_timeout(struct ata_port *ap) { - if (qc->flags & ATA_QCFLAG_RESULT_TF) - sil24_update_tf(qc->ap); + struct ata_queued_cmd *qc; + + qc = ata_qc_from_tag(ap, ap->active_tag); + + printk(KERN_ERR "ata%u: command timeout\n", ap->id); + qc->err_mask |= AC_ERR_TIMEOUT; + ata_eh_qc_complete(qc); + + sil24_reset_controller(ap); } -static inline void sil24_host_intr(struct ata_port *ap) +static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) { + struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); + struct sil24_port_priv *pp = ap->private_data; void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; - u32 slot_stat, qc_active; - int rc; + u32 irq_stat, cmd_err, sstatus, serror; + unsigned int err_mask; - slot_stat = readl(port + PORT_SLOT_STAT); + irq_stat = readl(port + PORT_IRQ_STAT); + writel(irq_stat, port + PORT_IRQ_STAT); /* clear irq */ - if (unlikely(slot_stat & HOST_SSTAT_ATTN)) { - sil24_error_intr(ap); + if (!(irq_stat & PORT_IRQ_ERROR)) { + /* ignore non-completion, non-error irqs for now */ + printk(KERN_WARNING DRV_NAME + "ata%u: non-error exception irq (irq_stat %x)\n", + ap->id, irq_stat); return; } - if (ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) - writel(PORT_IRQ_COMPLETE, port + PORT_IRQ_STAT); + cmd_err = readl(port + PORT_CMD_ERR); + sstatus = readl(port + PORT_SSTATUS); + serror = readl(port + PORT_SERROR); + if (serror) + writel(serror, port + PORT_SERROR); - qc_active = slot_stat & ~HOST_SSTAT_ATTN; - rc = ata_qc_complete_multiple(ap, qc_active, sil24_finish_qc); - if (rc > 0) - return; - if (rc < 0) { - struct ata_eh_info *ehi = &ap->eh_info; - ehi->err_mask |= AC_ERR_HSM; - ehi->action |= ATA_EH_SOFTRESET; - ata_port_freeze(ap); - return; + /* + * Don't log ATAPI device errors. They're supposed to happen + * and any serious errors will be logged using sense data by + * the SCSI layer. + */ + if (ap->device[0].class != ATA_DEV_ATAPI || cmd_err > PORT_CERR_SDB) + printk("ata%u: error interrupt on port%d\n" + " stat=0x%x irq=0x%x cmd_err=%d sstatus=0x%x serror=0x%x\n", + ap->id, ap->port_no, slot_stat, irq_stat, cmd_err, sstatus, serror); + + if (cmd_err == PORT_CERR_DEV || cmd_err == PORT_CERR_SDB) { + /* + * Device is reporting error, tf registers are valid. + */ + sil24_update_tf(ap); + err_mask = ac_err_mask(pp->tf.command); + sil24_restart_controller(ap); + } else { + /* + * Other errors. libata currently doesn't have any + * mechanism to report these errors. Just turn on + * ATA_ERR. + */ + err_mask = AC_ERR_OTHER; + sil24_reset_controller(ap); + } + + if (qc) { + qc->err_mask |= err_mask; + ata_qc_complete(qc); } +} + +static inline void sil24_host_intr(struct ata_port *ap) +{ + struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); + void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; + u32 slot_stat; + + slot_stat = readl(port + PORT_SLOT_STAT); + if (!(slot_stat & HOST_SSTAT_ATTN)) { + struct sil24_port_priv *pp = ap->private_data; + /* + * !HOST_SSAT_ATTN guarantees successful completion, + * so reading back tf registers is unnecessary for + * most commands. TODO: read tf registers for + * commands which require these values on successful + * completion (EXECUTE DEVICE DIAGNOSTIC, CHECK POWER, + * DEVICE RESET and READ PORT MULTIPLIER (any more?). + */ + sil24_update_tf(ap); - if (ata_ratelimit()) - ata_port_printk(ap, KERN_INFO, "spurious interrupt " - "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", - slot_stat, ap->active_tag, ap->sactive); + if (qc) { + qc->err_mask |= ac_err_mask(pp->tf.command); + ata_qc_complete(qc); + } + } else + sil24_error_intr(ap, slot_stat); } static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *regs) @@ -889,7 +769,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs * for (i = 0; i < host_set->n_ports; i++) if (status & (1 << i)) { struct ata_port *ap = host_set->ports[i]; - if (ap && !(ap->flags & ATA_FLAG_DISABLED)) { + if (ap && !(ap->flags & ATA_FLAG_PORT_DISABLED)) { sil24_host_intr(host_set->ports[i]); handled++; } else @@ -902,35 +782,9 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs * return IRQ_RETVAL(handled); } -static void sil24_error_handler(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - - if (sil24_init_port(ap)) { - ata_eh_freeze_port(ap); - ehc->i.action |= ATA_EH_HARDRESET; - } - - /* perform recovery */ - ata_do_eh(ap, ata_std_prereset, sil24_softreset, sil24_hardreset, - ata_std_postreset); -} - -static void sil24_post_internal_cmd(struct ata_queued_cmd *qc) -{ - struct ata_port *ap = qc->ap; - - if (qc->flags & ATA_QCFLAG_FAILED) - qc->err_mask |= AC_ERR_OTHER; - - /* make DMA engine forget about the failed command */ - if (qc->err_mask) - sil24_init_port(ap); -} - static inline void sil24_cblk_free(struct sil24_port_priv *pp, struct device *dev) { - const size_t cb_size = sizeof(*pp->cmd_block) * SIL24_MAX_CMDS; + const size_t cb_size = sizeof(*pp->cmd_block); dma_free_coherent(dev, cb_size, pp->cmd_block, pp->cmd_block_dma); } @@ -940,7 +794,7 @@ static int sil24_port_start(struct ata_port *ap) struct device *dev = ap->host_set->dev; struct sil24_port_priv *pp; union sil24_cmd_block *cb; - size_t cb_size = sizeof(*cb) * SIL24_MAX_CMDS; + size_t cb_size = sizeof(*cb); dma_addr_t cb_dma; int rc = -ENOMEM; @@ -994,64 +848,6 @@ static void sil24_host_stop(struct ata_host_set *host_set) kfree(hpriv); } -static void sil24_init_controller(struct pci_dev *pdev, int n_ports, - unsigned long host_flags, - void __iomem *host_base, - void __iomem *port_base) -{ - u32 tmp; - int i; - - /* GPIO off */ - writel(0, host_base + HOST_FLASH_CMD); - - /* clear global reset & mask interrupts during initialization */ - writel(0, host_base + HOST_CTRL); - - /* init ports */ - for (i = 0; i < n_ports; i++) { - void __iomem *port = port_base + i * PORT_REGS_SIZE; - - /* Initial PHY setting */ - writel(0x20c, port + PORT_PHY_CFG); - - /* Clear port RST */ - tmp = readl(port + PORT_CTRL_STAT); - if (tmp & PORT_CS_PORT_RST) { - writel(PORT_CS_PORT_RST, port + PORT_CTRL_CLR); - tmp = ata_wait_register(port + PORT_CTRL_STAT, - PORT_CS_PORT_RST, - PORT_CS_PORT_RST, 10, 100); - if (tmp & PORT_CS_PORT_RST) - dev_printk(KERN_ERR, &pdev->dev, - "failed to clear port RST\n"); - } - - /* Configure IRQ WoC */ - if (host_flags & SIL24_FLAG_PCIX_IRQ_WOC) - writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_STAT); - else - writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_CLR); - - /* Zero error counters. */ - writel(0x8000, port + PORT_DECODE_ERR_THRESH); - writel(0x8000, port + PORT_CRC_ERR_THRESH); - writel(0x8000, port + PORT_HSHK_ERR_THRESH); - writel(0x0000, port + PORT_DECODE_ERR_CNT); - writel(0x0000, port + PORT_CRC_ERR_CNT); - writel(0x0000, port + PORT_HSHK_ERR_CNT); - - /* Always use 64bit activation */ - writel(PORT_CS_32BIT_ACTV, port + PORT_CTRL_CLR); - - /* Clear port multiplier enable and resume bits */ - writel(PORT_CS_PM_EN | PORT_CS_RESUME, port + PORT_CTRL_CLR); - } - - /* Turn on interrupts */ - writel(IRQ_STAT_4PORTS, host_base + HOST_CTRL); -} - static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { static int printed_version = 0; @@ -1062,7 +858,6 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) void __iomem *host_base = NULL; void __iomem *port_base = NULL; int i, rc; - u32 tmp; if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); @@ -1105,7 +900,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) probe_ent->n_ports = SIL24_FLAG2NPORTS(pinfo->host_flags); probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; + probe_ent->mmio_base = port_base; probe_ent->private_data = hpriv; hpriv->host_base = host_base; @@ -1114,54 +910,92 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* * Configure the device */ - if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { - rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); - if (rc) { - rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); - if (rc) { - dev_printk(KERN_ERR, &pdev->dev, - "64-bit DMA enable failed\n"); - goto out_free; - } - } - } else { - rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); - if (rc) { - dev_printk(KERN_ERR, &pdev->dev, - "32-bit DMA enable failed\n"); - goto out_free; - } - rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); - if (rc) { - dev_printk(KERN_ERR, &pdev->dev, - "32-bit consistent DMA enable failed\n"); - goto out_free; - } + /* + * FIXME: This device is certainly 64-bit capable. We just + * don't know how to use it. After fixing 32bit activation in + * this function, enable 64bit masks here. + */ + rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); + if (rc) { + dev_printk(KERN_ERR, &pdev->dev, + "32-bit DMA enable failed\n"); + goto out_free; } - - /* Apply workaround for completion IRQ loss on PCI-X errata */ - if (probe_ent->host_flags & SIL24_FLAG_PCIX_IRQ_WOC) { - tmp = readl(host_base + HOST_CTRL); - if (tmp & (HOST_CTRL_TRDY | HOST_CTRL_STOP | HOST_CTRL_DEVSEL)) - dev_printk(KERN_INFO, &pdev->dev, - "Applying completion IRQ loss on PCI-X " - "errata fix\n"); - else - probe_ent->host_flags &= ~SIL24_FLAG_PCIX_IRQ_WOC; + rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); + if (rc) { + dev_printk(KERN_ERR, &pdev->dev, + "32-bit consistent DMA enable failed\n"); + goto out_free; } + /* GPIO off */ + writel(0, host_base + HOST_FLASH_CMD); + + /* Mask interrupts during initialization */ + writel(0, host_base + HOST_CTRL); + for (i = 0; i < probe_ent->n_ports; i++) { - unsigned long portu = - (unsigned long)port_base + i * PORT_REGS_SIZE; + void __iomem *port = port_base + i * PORT_REGS_SIZE; + unsigned long portu = (unsigned long)port; + u32 tmp; + int cnt; - probe_ent->port[i].cmd_addr = portu; + probe_ent->port[i].cmd_addr = portu + PORT_PRB; probe_ent->port[i].scr_addr = portu + PORT_SCONTROL; ata_std_ports(&probe_ent->port[i]); + + /* Initial PHY setting */ + writel(0x20c, port + PORT_PHY_CFG); + + /* Clear port RST */ + tmp = readl(port + PORT_CTRL_STAT); + if (tmp & PORT_CS_PORT_RST) { + writel(PORT_CS_PORT_RST, port + PORT_CTRL_CLR); + readl(port + PORT_CTRL_STAT); /* sync */ + for (cnt = 0; cnt < 10; cnt++) { + msleep(10); + tmp = readl(port + PORT_CTRL_STAT); + if (!(tmp & PORT_CS_PORT_RST)) + break; + } + if (tmp & PORT_CS_PORT_RST) + dev_printk(KERN_ERR, &pdev->dev, + "failed to clear port RST\n"); + } + + /* Zero error counters. */ + writel(0x8000, port + PORT_DECODE_ERR_THRESH); + writel(0x8000, port + PORT_CRC_ERR_THRESH); + writel(0x8000, port + PORT_HSHK_ERR_THRESH); + writel(0x0000, port + PORT_DECODE_ERR_CNT); + writel(0x0000, port + PORT_CRC_ERR_CNT); + writel(0x0000, port + PORT_HSHK_ERR_CNT); + + /* FIXME: 32bit activation? */ + writel(0, port + PORT_ACTIVATE_UPPER_ADDR); + writel(PORT_CS_32BIT_ACTV, port + PORT_CTRL_STAT); + + /* Configure interrupts */ + writel(0xffff, port + PORT_IRQ_ENABLE_CLR); + writel(PORT_IRQ_COMPLETE | PORT_IRQ_ERROR | PORT_IRQ_SDB_FIS, + port + PORT_IRQ_ENABLE_SET); + + /* Clear interrupts */ + writel(0x0fff0fff, port + PORT_IRQ_STAT); + writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_CLR); + + /* Clear port multiplier enable and resume bits */ + writel(PORT_CS_PM_EN | PORT_CS_RESUME, port + PORT_CTRL_CLR); + + /* Reset itself */ + if (__sil24_reset_controller(port)) + dev_printk(KERN_ERR, &pdev->dev, + "failed to reset controller\n"); } - sil24_init_controller(pdev, probe_ent->n_ports, probe_ent->host_flags, - host_base, port_base); + /* Turn on interrupts */ + writel(IRQ_STAT_4PORTS, host_base + HOST_CTRL); pci_set_master(pdev); @@ -1184,25 +1018,6 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) return rc; } -static int sil24_pci_device_resume(struct pci_dev *pdev) -{ - struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); - struct sil24_host_priv *hpriv = host_set->private_data; - - ata_pci_device_do_resume(pdev); - - if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) - writel(HOST_CTRL_GLOBAL_RST, hpriv->host_base + HOST_CTRL); - - sil24_init_controller(pdev, host_set->n_ports, - host_set->ports[0]->flags, - hpriv->host_base, hpriv->port_base); - - ata_host_set_resume(host_set); - - return 0; -} - static int __init sil24_init(void) { return pci_module_init(&sil24_pci_driver); diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index ee6b5df41..728530df2 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c @@ -30,6 +30,7 @@ * */ +#include #include #include #include @@ -42,7 +43,7 @@ #include #define DRV_NAME "sata_sis" -#define DRV_VERSION "0.6" +#define DRV_VERSION "0.5" enum { sis_180 = 0, @@ -95,7 +96,6 @@ static struct scsi_host_template sis_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -106,17 +106,14 @@ static const struct ata_port_operations sis_ops = { .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .scr_read = sis_scr_read, @@ -128,7 +125,8 @@ static const struct ata_port_operations sis_ops = { static struct ata_port_info sis_port_info = { .sht = &sis_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, + .host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | + ATA_FLAG_NO_LEGACY, .pio_mask = 0x1f, .mwdma_mask = 0x7, .udma_mask = 0x7f, diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 7d0858095..53b0d5c0a 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c @@ -36,6 +36,7 @@ * */ +#include #include #include #include @@ -53,7 +54,7 @@ #endif /* CONFIG_PPC_OF */ #define DRV_NAME "sata_svw" -#define DRV_VERSION "2.0" +#define DRV_VERSION "1.07" enum { /* Taskfile registers offsets */ @@ -256,7 +257,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start, int len, index; /* Find the ata_port */ - ap = ata_shost_to_port(shost); + ap = (struct ata_port *) &shost->hostdata[0]; if (ap == NULL) return 0; @@ -298,7 +299,6 @@ static struct scsi_host_template k2_sata_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, #ifdef CONFIG_PPC_OF .proc_info = k2_sata_proc_info, #endif @@ -313,17 +313,14 @@ static const struct ata_port_operations k2_sata_ops = { .check_status = k2_stat_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, .bmdma_setup = k2_bmdma_setup_mmio, .bmdma_start = k2_bmdma_start_mmio, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_mmio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, .scr_read = k2_sata_scr_read, @@ -423,12 +420,12 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e writel(0x0, mmio_base + K2_SATA_SIM_OFFSET); probe_ent->sht = &k2_sata_sht; - probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO; + probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | + ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; probe_ent->port_ops = &k2_sata_ops; probe_ent->n_ports = 4; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; /* We don't care much about the PIO/UDMA masks, but the core won't like us diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index ccc8cad24..4139ad4b1 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c @@ -46,7 +46,7 @@ #include "sata_promise.h" #define DRV_NAME "sata_sx4" -#define DRV_VERSION "0.9" +#define DRV_VERSION "0.8" enum { @@ -191,7 +191,6 @@ static struct scsi_host_template pdc_sata_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -205,7 +204,6 @@ static const struct ata_port_operations pdc_20621_ops = { .phy_reset = pdc_20621_phy_reset, .qc_prep = pdc20621_qc_prep, .qc_issue = pdc20621_qc_issue_prot, - .data_xfer = ata_mmio_data_xfer, .eng_timeout = pdc_eng_timeout, .irq_handler = pdc20621_interrupt, .irq_clear = pdc20621_irq_clear, @@ -220,7 +218,7 @@ static const struct ata_port_info pdc_port_info[] = { .sht = &pdc_sata_sht, .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_SRST | ATA_FLAG_MMIO | - ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING, + ATA_FLAG_NO_ATAPI, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */ @@ -835,11 +833,11 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re tmp = mask & (1 << i); VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp); if (tmp && ap && - !(ap->flags & ATA_FLAG_DISABLED)) { + !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) + if (qc && (!(qc->tf.ctl & ATA_NIEN))) handled += pdc20621_host_intr(ap, qc, (i > 4), mmio_base); } @@ -870,16 +868,15 @@ static void pdc_eng_timeout(struct ata_port *ap) switch (qc->tf.protocol) { case ATA_PROT_DMA: case ATA_PROT_NODATA: - ata_port_printk(ap, KERN_ERR, "command timeout\n"); + printk(KERN_ERR "ata%u: command timeout\n", ap->id); qc->err_mask |= __ac_err_mask(ata_wait_idle(ap)); break; default: drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); - ata_port_printk(ap, KERN_ERR, - "unknown timeout, cmd 0x%x stat 0x%x\n", - qc->tf.command, drv_stat); + printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", + ap->id, qc->tf.command, drv_stat); qc->err_mask |= ac_err_mask(drv_stat); break; @@ -1378,6 +1375,10 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); + /* + * If this driver happens to only be useful on Apple's K2, then + * we should check that here as it has a normal Serverworks ID + */ rc = pci_enable_device(pdev); if (rc) return rc; @@ -1436,7 +1437,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * probe_ent->port_ops = pdc_port_info[board_idx].port_ops; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; probe_ent->private_data = hpriv; diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index 33cdb4867..38b52bd3f 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include @@ -36,7 +37,7 @@ #include #define DRV_NAME "sata_uli" -#define DRV_VERSION "1.0" +#define DRV_VERSION "0.5" enum { uli_5289 = 0, @@ -89,7 +90,6 @@ static struct scsi_host_template uli_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -102,18 +102,16 @@ static const struct ata_port_operations uli_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, + .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, @@ -128,7 +126,8 @@ static const struct ata_port_operations uli_ops = { static struct ata_port_info uli_port_info = { .sht = &uli_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, + .host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | + ATA_FLAG_NO_LEGACY, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = 0x7f, /* udma0-6 */ .port_ops = &uli_ops, diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index a3727af8b..9e7ae4e0d 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c @@ -47,7 +47,7 @@ #include #define DRV_NAME "sata_via" -#define DRV_VERSION "2.0" +#define DRV_VERSION "1.1" enum board_ids_enum { vt6420, @@ -74,10 +74,8 @@ enum { static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); static u32 svia_scr_read (struct ata_port *ap, unsigned int sc_reg); static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); -static void vt6420_error_handler(struct ata_port *ap); static const struct pci_device_id svia_pci_tbl[] = { - { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, @@ -105,11 +103,10 @@ static struct scsi_host_template svia_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; -static const struct ata_port_operations vt6420_sata_ops = { +static const struct ata_port_operations svia_sata_ops = { .port_disable = ata_port_disable, .tf_load = ata_tf_load, @@ -118,36 +115,7 @@ static const struct ata_port_operations vt6420_sata_ops = { .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, - .bmdma_setup = ata_bmdma_setup, - .bmdma_start = ata_bmdma_start, - .bmdma_stop = ata_bmdma_stop, - .bmdma_status = ata_bmdma_status, - - .qc_prep = ata_qc_prep, - .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = vt6420_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, - - .irq_handler = ata_interrupt, - .irq_clear = ata_bmdma_irq_clear, - - .port_start = ata_port_start, - .port_stop = ata_port_stop, - .host_stop = ata_host_stop, -}; - -static const struct ata_port_operations vt6421_sata_ops = { - .port_disable = ata_port_disable, - - .tf_load = ata_tf_load, - .tf_read = ata_tf_read, - .check_status = ata_check_status, - .exec_command = ata_exec_command, - .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, @@ -156,12 +124,8 @@ static const struct ata_port_operations vt6421_sata_ops = { .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_pio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = ata_interrupt, .irq_clear = ata_bmdma_irq_clear, @@ -174,13 +138,13 @@ static const struct ata_port_operations vt6421_sata_ops = { .host_stop = ata_host_stop, }; -static struct ata_port_info vt6420_port_info = { +static struct ata_port_info svia_port_info = { .sht = &svia_sht, - .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, + .host_flags = ATA_FLAG_SATA | ATA_FLAG_SRST | ATA_FLAG_NO_LEGACY, .pio_mask = 0x1f, .mwdma_mask = 0x07, .udma_mask = 0x7f, - .port_ops = &vt6420_sata_ops, + .port_ops = &svia_sata_ops, }; MODULE_AUTHOR("Jeff Garzik"); @@ -203,81 +167,6 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) outl(val, ap->ioaddr.scr_addr + (4 * sc_reg)); } -/** - * vt6420_prereset - prereset for vt6420 - * @ap: target ATA port - * - * SCR registers on vt6420 are pieces of shit and may hang the - * whole machine completely if accessed with the wrong timing. - * To avoid such catastrophe, vt6420 doesn't provide generic SCR - * access operations, but uses SStatus and SControl only during - * boot probing in controlled way. - * - * As the old (pre EH update) probing code is proven to work, we - * strictly follow the access pattern. - * - * LOCKING: - * Kernel thread context (may sleep) - * - * RETURNS: - * 0 on success, -errno otherwise. - */ -static int vt6420_prereset(struct ata_port *ap) -{ - struct ata_eh_context *ehc = &ap->eh_context; - unsigned long timeout = jiffies + (HZ * 5); - u32 sstatus, scontrol; - int online; - - /* don't do any SCR stuff if we're not loading */ - if (!ATA_PFLAG_LOADING) - goto skip_scr; - - /* Resume phy. This is the old resume sequence from - * __sata_phy_reset(). - */ - svia_scr_write(ap, SCR_CONTROL, 0x300); - svia_scr_read(ap, SCR_CONTROL); /* flush */ - - /* wait for phy to become ready, if necessary */ - do { - msleep(200); - if ((svia_scr_read(ap, SCR_STATUS) & 0xf) != 1) - break; - } while (time_before(jiffies, timeout)); - - /* open code sata_print_link_status() */ - sstatus = svia_scr_read(ap, SCR_STATUS); - scontrol = svia_scr_read(ap, SCR_CONTROL); - - online = (sstatus & 0xf) == 0x3; - - ata_port_printk(ap, KERN_INFO, - "SATA link %s 1.5 Gbps (SStatus %X SControl %X)\n", - online ? "up" : "down", sstatus, scontrol); - - /* SStatus is read one more time */ - svia_scr_read(ap, SCR_STATUS); - - if (!online) { - /* tell EH to bail */ - ehc->i.action &= ~ATA_EH_RESET_MASK; - return 0; - } - - skip_scr: - /* wait for !BSY */ - ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT); - - return 0; -} - -static void vt6420_error_handler(struct ata_port *ap) -{ - return ata_bmdma_drive_eh(ap, vt6420_prereset, ata_std_softreset, - NULL, ata_std_postreset); -} - static const unsigned int svia_bar_sizes[] = { 8, 4, 8, 4, 16, 256 }; @@ -318,7 +207,7 @@ static void vt6421_init_addrs(struct ata_probe_ent *probe_ent, static struct ata_probe_ent *vt6420_init_probe_ent(struct pci_dev *pdev) { struct ata_probe_ent *probe_ent; - struct ata_port_info *ppi = &vt6420_port_info; + struct ata_port_info *ppi = &svia_port_info; probe_ent = ata_pci_init_native_mode(pdev, &ppi, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); if (!probe_ent) @@ -346,11 +235,12 @@ static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev) INIT_LIST_HEAD(&probe_ent->node); probe_ent->sht = &svia_sht; - probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY; - probe_ent->port_ops = &vt6421_sata_ops; + probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | + ATA_FLAG_NO_LEGACY; + probe_ent->port_ops = &svia_sata_ops; probe_ent->n_ports = N_PORTS; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->pio_mask = 0x1f; probe_ent->mwdma_mask = 0x07; probe_ent->udma_mask = 0x7f; @@ -443,10 +333,10 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if ((pci_resource_start(pdev, i) == 0) || (pci_resource_len(pdev, i) < bar_sizes[i])) { dev_printk(KERN_ERR, &pdev->dev, - "invalid PCI BAR %u (sz 0x%llx, val 0x%llx)\n", - i, - (unsigned long long)pci_resource_start(pdev, i), - (unsigned long long)pci_resource_len(pdev, i)); + "invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n", + i, + pci_resource_start(pdev, i), + pci_resource_len(pdev, i)); rc = -ENODEV; goto err_out_regions; } diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index ad3787159..8a29ce340 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c @@ -47,7 +47,7 @@ #include #define DRV_NAME "sata_vsc" -#define DRV_VERSION "2.0" +#define DRV_VERSION "1.2" enum { /* Interrupt register offsets (from chip base address) */ @@ -221,21 +221,14 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, ap = host_set->ports[i]; - if (is_vsc_sata_int_err(i, int_status)) { - u32 err_status; - printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__); - err_status = ap ? vsc_sata_scr_read(ap, SCR_ERROR) : 0; - vsc_sata_scr_write(ap, SCR_ERROR, err_status); - handled++; - } - - if (ap && !(ap->flags & ATA_FLAG_DISABLED)) { + if (ap && !(ap->flags & + (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) + if (qc && (!(qc->tf.ctl & ATA_NIEN))) { handled += ata_host_intr(ap, qc); - else if (is_vsc_sata_int_err(i, int_status)) { + } else if (is_vsc_sata_int_err(i, int_status)) { /* * On some chips (i.e. Intel 31244), an error * interrupt will sneak in at initialization @@ -279,7 +272,6 @@ static struct scsi_host_template vsc_sata_sht = { .proc_name = DRV_NAME, .dma_boundary = ATA_DMA_BOUNDARY, .slave_configure = ata_scsi_slave_config, - .slave_destroy = ata_scsi_slave_destroy, .bios_param = ata_std_bios_param, }; @@ -291,17 +283,14 @@ static const struct ata_port_operations vsc_sata_ops = { .exec_command = ata_exec_command, .check_status = ata_check_status, .dev_select = ata_std_dev_select, + .phy_reset = sata_phy_reset, .bmdma_setup = ata_bmdma_setup, .bmdma_start = ata_bmdma_start, .bmdma_stop = ata_bmdma_stop, .bmdma_status = ata_bmdma_status, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, - .data_xfer = ata_mmio_data_xfer, - .freeze = ata_bmdma_freeze, - .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, - .post_internal_cmd = ata_bmdma_post_internal_cmd, + .eng_timeout = ata_eng_timeout, .irq_handler = vsc_sata_interrupt, .irq_clear = ata_bmdma_irq_clear, .scr_read = vsc_sata_scr_read, @@ -396,11 +385,11 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d probe_ent->sht = &vsc_sata_sht; probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | - ATA_FLAG_MMIO; + ATA_FLAG_MMIO | ATA_FLAG_SATA_RESET; probe_ent->port_ops = &vsc_sata_ops; probe_ent->n_ports = 4; probe_ent->irq = pdev->irq; - probe_ent->irq_flags = IRQF_SHARED; + probe_ent->irq_flags = SA_SHIRQ; probe_ent->mmio_base = mmio_base; /* We don't care much about the PIO/UDMA masks, but the core won't like us @@ -443,12 +432,15 @@ err_out: } +/* + * 0x1725/0x7174 is the Vitesse VSC-7174 + * 0x8086/0x3200 is the Intel 31244, which is supposed to be identical + * compatibility is untested as of yet + */ static const struct pci_device_id vsc_sata_pci_tbl[] = { - { PCI_VENDOR_ID_VITESSE, 0x7174, - PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, - { PCI_VENDOR_ID_INTEL, 0x3200, - PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, - { } /* terminate list */ + { 0x1725, 0x7174, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, + { 0x8086, 0x3200, PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, + { } }; diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index b332caddd..73994e2ac 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -63,6 +63,7 @@ #include #include #include +#include #include "scsi_priv.h" #include "scsi_logging.h" @@ -115,6 +116,79 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = { }; EXPORT_SYMBOL(scsi_device_types); +/* + * Function: scsi_allocate_request + * + * Purpose: Allocate a request descriptor. + * + * Arguments: device - device for which we want a request + * gfp_mask - allocation flags passed to kmalloc + * + * Lock status: No locks assumed to be held. This function is SMP-safe. + * + * Returns: Pointer to request block. + */ +struct scsi_request *scsi_allocate_request(struct scsi_device *sdev, + gfp_t gfp_mask) +{ + const int offset = ALIGN(sizeof(struct scsi_request), 4); + const int size = offset + sizeof(struct request); + struct scsi_request *sreq; + + sreq = kzalloc(size, gfp_mask); + if (likely(sreq != NULL)) { + sreq->sr_request = (struct request *)(((char *)sreq) + offset); + sreq->sr_device = sdev; + sreq->sr_host = sdev->host; + sreq->sr_magic = SCSI_REQ_MAGIC; + sreq->sr_data_direction = DMA_BIDIRECTIONAL; + } + + return sreq; +} +EXPORT_SYMBOL(scsi_allocate_request); + +void __scsi_release_request(struct scsi_request *sreq) +{ + struct request *req = sreq->sr_request; + + /* unlikely because the tag was usually ended earlier by the + * mid-layer. However, for layering reasons ULD's don't end + * the tag of commands they generate. */ + if (unlikely(blk_rq_tagged(req))) { + unsigned long flags; + struct request_queue *q = req->q; + + spin_lock_irqsave(q->queue_lock, flags); + blk_queue_end_tag(q, req); + spin_unlock_irqrestore(q->queue_lock, flags); + } + + + if (likely(sreq->sr_command != NULL)) { + struct scsi_cmnd *cmd = sreq->sr_command; + + sreq->sr_command = NULL; + scsi_next_command(cmd); + } +} + +/* + * Function: scsi_release_request + * + * Purpose: Release a request descriptor. + * + * Arguments: sreq - request to release + * + * Lock status: No locks assumed to be held. This function is SMP-safe. + */ +void scsi_release_request(struct scsi_request *sreq) +{ + __scsi_release_request(sreq); + kfree(sreq); +} +EXPORT_SYMBOL(scsi_release_request); + struct scsi_host_cmd_pool { kmem_cache_t *slab; unsigned int users; @@ -346,7 +420,7 @@ void scsi_log_send(struct scsi_cmnd *cmd) if (level > 3) { printk(KERN_INFO "buffer = 0x%p, bufflen = %d," " done = 0x%p, queuecommand 0x%p\n", - cmd->request_buffer, cmd->request_bufflen, + cmd->buffer, cmd->bufflen, cmd->done, sdev->host->hostt->queuecommand); @@ -572,29 +646,78 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd) return rtn; } - /* - * Per-CPU I/O completion queue. - */ -static DEFINE_PER_CPU(struct list_head, scsi_done_q); - -/** - * scsi_req_abort_cmd -- Request command recovery for the specified command - * cmd: pointer to the SCSI command of interest + * Function: scsi_init_cmd_from_req + * + * Purpose: Queue a SCSI command + * Purpose: Initialize a struct scsi_cmnd from a struct scsi_request + * + * Arguments: cmd - command descriptor. + * sreq - Request from the queue. + * + * Lock status: None needed. * - * This function requests that SCSI Core start recovery for the - * command by deleting the timer and adding the command to the eh - * queue. It can be called by either LLDDs or SCSI Core. LLDDs who - * implement their own error recovery MAY ignore the timeout event if - * they generated scsi_req_abort_cmd. + * Returns: Nothing. + * + * Notes: Mainly transfer data from the request structure to the + * command structure. The request structure is allocated + * using the normal memory allocator, and requests can pile + * up to more or less any depth. The command structure represents + * a consumable resource, as these are allocated into a pool + * when the SCSI subsystem initializes. The preallocation is + * required so that in low-memory situations a disk I/O request + * won't cause the memory manager to try and write out a page. + * The request structure is generally used by ioctls and character + * devices. */ -void scsi_req_abort_cmd(struct scsi_cmnd *cmd) +void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, struct scsi_request *sreq) { - if (!scsi_delete_timer(cmd)) - return; - scsi_times_out(cmd); + sreq->sr_command = cmd; + + cmd->cmd_len = sreq->sr_cmd_len; + cmd->use_sg = sreq->sr_use_sg; + + cmd->request = sreq->sr_request; + memcpy(cmd->data_cmnd, sreq->sr_cmnd, sizeof(cmd->data_cmnd)); + cmd->serial_number = 0; + cmd->bufflen = sreq->sr_bufflen; + cmd->buffer = sreq->sr_buffer; + cmd->retries = 0; + cmd->allowed = sreq->sr_allowed; + cmd->done = sreq->sr_done; + cmd->timeout_per_command = sreq->sr_timeout_per_command; + cmd->sc_data_direction = sreq->sr_data_direction; + cmd->sglist_len = sreq->sr_sglist_len; + cmd->underflow = sreq->sr_underflow; + cmd->sc_request = sreq; + memcpy(cmd->cmnd, sreq->sr_cmnd, sizeof(sreq->sr_cmnd)); + + /* + * Zero the sense buffer. Some host adapters automatically request + * sense on error. 0 is not a valid sense code. + */ + memset(cmd->sense_buffer, 0, sizeof(sreq->sr_sense_buffer)); + cmd->request_buffer = sreq->sr_buffer; + cmd->request_bufflen = sreq->sr_bufflen; + cmd->old_use_sg = cmd->use_sg; + if (cmd->cmd_len == 0) + cmd->cmd_len = COMMAND_SIZE(cmd->cmnd[0]); + cmd->old_cmd_len = cmd->cmd_len; + cmd->sc_old_data_direction = cmd->sc_data_direction; + cmd->old_underflow = cmd->underflow; + + /* + * Start the timer ticking. + */ + cmd->result = 0; + + SCSI_LOG_MLQUEUE(3, printk("Leaving scsi_init_cmd_from_req()\n")); } -EXPORT_SYMBOL(scsi_req_abort_cmd); + +/* + * Per-CPU I/O completion queue. + */ +static DEFINE_PER_CPU(struct list_head, scsi_done_q); /** * scsi_done - Enqueue the finished SCSI command into the done queue. @@ -661,6 +784,11 @@ void __scsi_done(struct scsi_cmnd *cmd) */ int scsi_retry_command(struct scsi_cmnd *cmd) { + /* + * Restore the SCSI command state. + */ + scsi_setup_cmd_retry(cmd); + /* * Zero the sense information from the last time we tried * this command. @@ -681,6 +809,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd) { struct scsi_device *sdev = cmd->device; struct Scsi_Host *shost = sdev->host; + struct scsi_request *sreq; scsi_device_unbusy(sdev); @@ -706,6 +835,25 @@ void scsi_finish_command(struct scsi_cmnd *cmd) "Notifying upper driver of completion " "(result %x)\n", cmd->result)); + /* + * We can get here with use_sg=0, causing a panic in the upper level + */ + cmd->use_sg = cmd->old_use_sg; + + /* + * If there is an associated request structure, copy the data over + * before we call the completion function. + */ + sreq = cmd->sc_request; + if (sreq) { + sreq->sr_result = sreq->sr_command->result; + if (sreq->sr_result) { + memcpy(sreq->sr_sense_buffer, + sreq->sr_command->sense_buffer, + sizeof(sreq->sr_sense_buffer)); + } + } + cmd->done(cmd); } EXPORT_SYMBOL(scsi_finish_command); diff --git a/drivers/scsi/scsi.h b/drivers/scsi/scsi.h index d5a55fae6..5ee5d80a9 100644 --- a/drivers/scsi/scsi.h +++ b/drivers/scsi/scsi.h @@ -20,9 +20,12 @@ #ifndef _SCSI_H #define _SCSI_H +#include /* for CONFIG_SCSI_LOGGING */ + #include #include #include +#include #include #include diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a80303c6b..5a5d2af8e 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -24,6 +24,7 @@ * module options to "modprobe scsi_debug num_tgts=2" [20021221] */ +#include #include #include @@ -50,22 +51,18 @@ #include "scsi_logging.h" #include "scsi_debug.h" -#define SCSI_DEBUG_VERSION "1.79" -static const char * scsi_debug_version_date = "20060604"; +#define SCSI_DEBUG_VERSION "1.75" +static const char * scsi_debug_version_date = "20050113"; /* Additional Sense Code (ASC) used */ -#define NO_ADDITIONAL_SENSE 0x0 -#define LOGICAL_UNIT_NOT_READY 0x4 +#define NO_ADDED_SENSE 0x0 #define UNRECOVERED_READ_ERR 0x11 -#define PARAMETER_LIST_LENGTH_ERR 0x1a #define INVALID_OPCODE 0x20 #define ADDR_OUT_OF_RANGE 0x21 #define INVALID_FIELD_IN_CDB 0x24 -#define INVALID_FIELD_IN_PARAM_LIST 0x26 #define POWERON_RESET 0x29 #define SAVING_PARAMS_UNSUP 0x39 -#define THRESHOLD_EXCEEDED 0x5d -#define LOW_POWER_COND_ON 0x5e +#define THRESHHOLD_EXCEEDED 0x5d #define SDEBUG_TAGGED_QUEUING 0 /* 0 | MSG_SIMPLE_TAG | MSG_ORDERED_TAG */ @@ -84,8 +81,6 @@ static const char * scsi_debug_version_date = "20060604"; #define DEF_SCSI_LEVEL 5 /* INQUIRY, byte2 [5->SPC-3] */ #define DEF_PTYPE 0 #define DEF_D_SENSE 0 -#define DEF_NO_LUN_0 0 -#define DEF_VIRTUAL_GB 0 /* bit mask values for scsi_debug_opts */ #define SCSI_DEBUG_OPT_NOISE 1 @@ -112,7 +107,6 @@ static const char * scsi_debug_version_date = "20060604"; /* If REPORT LUNS has luns >= 256 it can choose "flat space" (value 1) * or "peripheral device" addressing (value 0) */ #define SAM2_LUN_ADDRESS_METHOD 0 -#define SAM2_WLUN_REPORT_LUNS 0xc101 static int scsi_debug_add_host = DEF_NUM_HOST; static int scsi_debug_delay = DEF_DELAY; @@ -125,16 +119,13 @@ static int scsi_debug_opts = DEF_OPTS; static int scsi_debug_scsi_level = DEF_SCSI_LEVEL; static int scsi_debug_ptype = DEF_PTYPE; /* SCSI peripheral type (0==disk) */ static int scsi_debug_dsense = DEF_D_SENSE; -static int scsi_debug_no_lun_0 = DEF_NO_LUN_0; -static int scsi_debug_virtual_gb = DEF_VIRTUAL_GB; static int scsi_debug_cmnd_count = 0; #define DEV_READONLY(TGT) (0) #define DEV_REMOVEABLE(TGT) (0) -static unsigned int sdebug_store_size; /* in bytes */ -static unsigned int sdebug_store_sectors; +static unsigned long sdebug_store_size; /* in bytes */ static sector_t sdebug_capacity; /* in sectors */ /* old BIOS stuff, kernel may get rid of them but some mode sense pages @@ -159,9 +150,7 @@ struct sdebug_dev_info { unsigned int target; unsigned int lun; struct sdebug_host_info *sdbg_host; - unsigned int wlun; char reset; - char stopped; char used; }; @@ -205,11 +194,11 @@ static struct scsi_host_template sdebug_driver_template = { .bios_param = scsi_debug_biosparam, .can_queue = SCSI_DEBUG_CANQUEUE, .this_id = 7, - .sg_tablesize = 256, - .cmd_per_lun = 16, - .max_sectors = 0xffff, + .sg_tablesize = 64, + .cmd_per_lun = 3, + .max_sectors = 4096, .unchecked_isa_dma = 0, - .use_clustering = ENABLE_CLUSTERING, + .use_clustering = DISABLE_CLUSTERING, .module = THIS_MODULE, }; @@ -237,32 +226,19 @@ static struct device_driver sdebug_driverfs_driver = { static const int check_condition_result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; -static unsigned char ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0, - 0, 0, 0x2, 0x4b}; -static unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, - 0, 0, 0x0, 0x0}; - /* function declarations */ static int resp_inquiry(struct scsi_cmnd * SCpnt, int target, struct sdebug_dev_info * devip); static int resp_requests(struct scsi_cmnd * SCpnt, struct sdebug_dev_info * devip); -static int resp_start_stop(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip); static int resp_readcap(struct scsi_cmnd * SCpnt, struct sdebug_dev_info * devip); -static int resp_readcap16(struct scsi_cmnd * SCpnt, - struct sdebug_dev_info * devip); -static int resp_mode_sense(struct scsi_cmnd * scp, int target, +static int resp_mode_sense(struct scsi_cmnd * SCpnt, int target, struct sdebug_dev_info * devip); -static int resp_mode_select(struct scsi_cmnd * scp, int mselect6, - struct sdebug_dev_info * devip); -static int resp_log_sense(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip); -static int resp_read(struct scsi_cmnd * SCpnt, unsigned long long lba, - unsigned int num, struct sdebug_dev_info * devip); -static int resp_write(struct scsi_cmnd * SCpnt, unsigned long long lba, - unsigned int num, struct sdebug_dev_info * devip); +static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block, + int num, struct sdebug_dev_info * devip); +static int resp_write(struct scsi_cmnd * SCpnt, int upper_blk, int block, + int num, struct sdebug_dev_info * devip); static int resp_report_luns(struct scsi_cmnd * SCpnt, struct sdebug_dev_info * devip); static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr, @@ -273,8 +249,8 @@ static void timer_intr_handler(unsigned long); static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev); static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, int asc, int asq); -static int check_readiness(struct scsi_cmnd * SCpnt, int reset_only, - struct sdebug_dev_info * devip); +static int check_reset(struct scsi_cmnd * SCpnt, + struct sdebug_dev_info * devip); static int schedule_resp(struct scsi_cmnd * cmnd, struct sdebug_dev_info * devip, done_funct_t done, int scsi_result, int delta_jiff); @@ -282,11 +258,9 @@ static void __init sdebug_build_parts(unsigned char * ramp); static void __init init_all_queued(void); static void stop_all_queued(void); static int stop_queued_cmnd(struct scsi_cmnd * cmnd); -static int inquiry_evpd_83(unsigned char * arr, int target_dev_id, - int dev_id_num, const char * dev_id_str, - int dev_id_str_len); -static int inquiry_evpd_88(unsigned char * arr, int target_dev_id); -static int do_create_driverfs_files(void); +static int inquiry_evpd_83(unsigned char * arr, int dev_id_num, + const char * dev_id_str, int dev_id_str_len); +static void do_create_driverfs_files(void); static void do_remove_driverfs_files(void); static int sdebug_add_adapter(void); @@ -301,22 +275,18 @@ static int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done) { unsigned char *cmd = (unsigned char *) SCpnt->cmnd; - int len, k, j; - unsigned int num; - unsigned long long lba; + int block, upper_blk, num, k; int errsts = 0; - int target = SCpnt->device->id; + int target = scmd_id(SCpnt); struct sdebug_dev_info * devip = NULL; int inj_recovered = 0; - int delay_override = 0; if (done == NULL) return 0; /* assume mid level reprocessing command */ - SCpnt->resid = 0; if ((SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) && cmd) { printk(KERN_INFO "scsi_debug: cmd "); - for (k = 0, len = SCpnt->cmd_len; k < len; ++k) + for (k = 0, num = SCpnt->cmd_len; k < num; ++k) printk("%02x ", (int)cmd[k]); printk("\n"); } @@ -327,8 +297,7 @@ int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done) DID_NO_CONNECT << 16, 0); } - if ((SCpnt->device->lun >= scsi_debug_max_luns) && - (SCpnt->device->lun != SAM2_WLUN_REPORT_LUNS)) + if (SCpnt->device->lun >= scsi_debug_max_luns) return schedule_resp(SCpnt, NULL, done, DID_NO_CONNECT << 16, 0); devip = devInfoReg(SCpnt->device); @@ -347,150 +316,118 @@ int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done) inj_recovered = 1; /* to reads and writes below */ } - if (devip->wlun) { - switch (*cmd) { - case INQUIRY: - case REQUEST_SENSE: - case TEST_UNIT_READY: - case REPORT_LUNS: - break; /* only allowable wlun commands */ - default: - if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: Opcode: 0x%x " - "not supported for wlun\n", *cmd); - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_OPCODE, 0); - errsts = check_condition_result; - return schedule_resp(SCpnt, devip, done, errsts, - 0); - } - } - switch (*cmd) { case INQUIRY: /* mandatory, ignore unit attention */ - delay_override = 1; errsts = resp_inquiry(SCpnt, target, devip); break; case REQUEST_SENSE: /* mandatory, ignore unit attention */ - delay_override = 1; errsts = resp_requests(SCpnt, devip); break; case REZERO_UNIT: /* actually this is REWIND for SSC */ case START_STOP: - errsts = resp_start_stop(SCpnt, devip); + errsts = check_reset(SCpnt, devip); break; case ALLOW_MEDIUM_REMOVAL: - if ((errsts = check_readiness(SCpnt, 1, devip))) + if ((errsts = check_reset(SCpnt, devip))) break; if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) printk(KERN_INFO "scsi_debug: Medium removal %s\n", cmd[4] ? "inhibited" : "enabled"); break; case SEND_DIAGNOSTIC: /* mandatory */ - errsts = check_readiness(SCpnt, 1, devip); + errsts = check_reset(SCpnt, devip); break; case TEST_UNIT_READY: /* mandatory */ - delay_override = 1; - errsts = check_readiness(SCpnt, 0, devip); + errsts = check_reset(SCpnt, devip); break; case RESERVE: - errsts = check_readiness(SCpnt, 1, devip); + errsts = check_reset(SCpnt, devip); break; case RESERVE_10: - errsts = check_readiness(SCpnt, 1, devip); + errsts = check_reset(SCpnt, devip); break; case RELEASE: - errsts = check_readiness(SCpnt, 1, devip); + errsts = check_reset(SCpnt, devip); break; case RELEASE_10: - errsts = check_readiness(SCpnt, 1, devip); + errsts = check_reset(SCpnt, devip); break; case READ_CAPACITY: errsts = resp_readcap(SCpnt, devip); break; - case SERVICE_ACTION_IN: - if (SAI_READ_CAPACITY_16 != cmd[1]) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_OPCODE, 0); - errsts = check_condition_result; - break; - } - errsts = resp_readcap16(SCpnt, devip); - break; case READ_16: case READ_12: case READ_10: case READ_6: - if ((errsts = check_readiness(SCpnt, 0, devip))) + if ((errsts = check_reset(SCpnt, devip))) break; + upper_blk = 0; if ((*cmd) == READ_16) { - for (lba = 0, j = 0; j < 8; ++j) { - if (j > 0) - lba <<= 8; - lba += cmd[2 + j]; - } + upper_blk = cmd[5] + (cmd[4] << 8) + + (cmd[3] << 16) + (cmd[2] << 24); + block = cmd[9] + (cmd[8] << 8) + + (cmd[7] << 16) + (cmd[6] << 24); num = cmd[13] + (cmd[12] << 8) + (cmd[11] << 16) + (cmd[10] << 24); } else if ((*cmd) == READ_12) { - lba = cmd[5] + (cmd[4] << 8) + + block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); num = cmd[9] + (cmd[8] << 8) + (cmd[7] << 16) + (cmd[6] << 24); } else if ((*cmd) == READ_10) { - lba = cmd[5] + (cmd[4] << 8) + + block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); num = cmd[8] + (cmd[7] << 8); - } else { /* READ (6) */ - lba = cmd[3] + (cmd[2] << 8) + + } else { + block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); - num = (0 == cmd[4]) ? 256 : cmd[4]; + num = cmd[4]; } - errsts = resp_read(SCpnt, lba, num, devip); + errsts = resp_read(SCpnt, upper_blk, block, num, devip); if (inj_recovered && (0 == errsts)) { mk_sense_buffer(devip, RECOVERED_ERROR, - THRESHOLD_EXCEEDED, 0); + THRESHHOLD_EXCEEDED, 0); errsts = check_condition_result; } break; case REPORT_LUNS: /* mandatory, ignore unit attention */ - delay_override = 1; errsts = resp_report_luns(SCpnt, devip); break; case VERIFY: /* 10 byte SBC-2 command */ - errsts = check_readiness(SCpnt, 0, devip); + errsts = check_reset(SCpnt, devip); break; case WRITE_16: case WRITE_12: case WRITE_10: case WRITE_6: - if ((errsts = check_readiness(SCpnt, 0, devip))) + if ((errsts = check_reset(SCpnt, devip))) break; + upper_blk = 0; if ((*cmd) == WRITE_16) { - for (lba = 0, j = 0; j < 8; ++j) { - if (j > 0) - lba <<= 8; - lba += cmd[2 + j]; - } + upper_blk = cmd[5] + (cmd[4] << 8) + + (cmd[3] << 16) + (cmd[2] << 24); + block = cmd[9] + (cmd[8] << 8) + + (cmd[7] << 16) + (cmd[6] << 24); num = cmd[13] + (cmd[12] << 8) + (cmd[11] << 16) + (cmd[10] << 24); } else if ((*cmd) == WRITE_12) { - lba = cmd[5] + (cmd[4] << 8) + + block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); num = cmd[9] + (cmd[8] << 8) + (cmd[7] << 16) + (cmd[6] << 24); } else if ((*cmd) == WRITE_10) { - lba = cmd[5] + (cmd[4] << 8) + + block = cmd[5] + (cmd[4] << 8) + (cmd[3] << 16) + (cmd[2] << 24); num = cmd[8] + (cmd[7] << 8); - } else { /* WRITE (6) */ - lba = cmd[3] + (cmd[2] << 8) + + } else { + block = cmd[3] + (cmd[2] << 8) + ((cmd[1] & 0x1f) << 16); - num = (0 == cmd[4]) ? 256 : cmd[4]; + num = cmd[4]; } - errsts = resp_write(SCpnt, lba, num, devip); + errsts = resp_write(SCpnt, upper_blk, block, num, devip); if (inj_recovered && (0 == errsts)) { mk_sense_buffer(devip, RECOVERED_ERROR, - THRESHOLD_EXCEEDED, 0); + THRESHHOLD_EXCEEDED, 0); errsts = check_condition_result; } break; @@ -498,31 +435,20 @@ int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done) case MODE_SENSE_10: errsts = resp_mode_sense(SCpnt, target, devip); break; - case MODE_SELECT: - errsts = resp_mode_select(SCpnt, 1, devip); - break; - case MODE_SELECT_10: - errsts = resp_mode_select(SCpnt, 0, devip); - break; - case LOG_SENSE: - errsts = resp_log_sense(SCpnt, devip); - break; case SYNCHRONIZE_CACHE: - delay_override = 1; - errsts = check_readiness(SCpnt, 0, devip); + errsts = check_reset(SCpnt, devip); break; default: if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) printk(KERN_INFO "scsi_debug: Opcode: 0x%x not " "supported\n", *cmd); - if ((errsts = check_readiness(SCpnt, 1, devip))) + if ((errsts = check_reset(SCpnt, devip))) break; /* Unit attention takes precedence */ mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_OPCODE, 0); errsts = check_condition_result; break; } - return schedule_resp(SCpnt, devip, done, errsts, - (delay_override ? 0 : scsi_debug_delay)); + return schedule_resp(SCpnt, devip, done, errsts, scsi_debug_delay); } static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg) @@ -534,8 +460,7 @@ static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg) /* return -ENOTTY; // correct return but upsets fdisk */ } -static int check_readiness(struct scsi_cmnd * SCpnt, int reset_only, - struct sdebug_dev_info * devip) +static int check_reset(struct scsi_cmnd * SCpnt, struct sdebug_dev_info * devip) { if (devip->reset) { if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) @@ -545,14 +470,6 @@ static int check_readiness(struct scsi_cmnd * SCpnt, int reset_only, mk_sense_buffer(devip, UNIT_ATTENTION, POWERON_RESET, 0); return check_condition_result; } - if ((0 == reset_only) && devip->stopped) { - if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: Reporting Not " - "ready: initializing command required\n"); - mk_sense_buffer(devip, NOT_READY, LOGICAL_UNIT_NOT_READY, - 0x2); - return check_condition_result; - } return 0; } @@ -576,10 +493,7 @@ static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr, req_len = scp->request_bufflen; act_len = (req_len < arr_len) ? req_len : arr_len; memcpy(scp->request_buffer, arr, act_len); - if (scp->resid) - scp->resid -= act_len; - else - scp->resid = req_len - act_len; + scp->resid = req_len - act_len; return 0; } sgpnt = (struct scatterlist *)scp->request_buffer; @@ -602,10 +516,7 @@ static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr, } req_len += sgpnt->length; } - if (scp->resid) - scp->resid -= act_len; - else - scp->resid = req_len - act_len; + scp->resid = req_len - act_len; return 0; } @@ -656,14 +567,12 @@ static const char * inq_vendor_id = "Linux "; static const char * inq_product_id = "scsi_debug "; static const char * inq_product_rev = "0004"; -static int inquiry_evpd_83(unsigned char * arr, int target_dev_id, - int dev_id_num, const char * dev_id_str, - int dev_id_str_len) +static int inquiry_evpd_83(unsigned char * arr, int dev_id_num, + const char * dev_id_str, int dev_id_str_len) { - int num, port_a; - char b[32]; + int num; - port_a = target_dev_id + 1; + /* Two identification descriptors: */ /* T10 vendor identifier field format (faked) */ arr[0] = 0x2; /* ASCII */ arr[1] = 0x1; @@ -674,246 +583,25 @@ static int inquiry_evpd_83(unsigned char * arr, int target_dev_id, num = 8 + 16 + dev_id_str_len; arr[3] = num; num += 4; - if (dev_id_num >= 0) { - /* NAA-5, Logical unit identifier (binary) */ - arr[num++] = 0x1; /* binary (not necessarily sas) */ - arr[num++] = 0x3; /* PIV=0, lu, naa */ - arr[num++] = 0x0; - arr[num++] = 0x8; - arr[num++] = 0x53; /* naa-5 ieee company id=0x333333 (fake) */ - arr[num++] = 0x33; - arr[num++] = 0x33; - arr[num++] = 0x30; - arr[num++] = (dev_id_num >> 24); - arr[num++] = (dev_id_num >> 16) & 0xff; - arr[num++] = (dev_id_num >> 8) & 0xff; - arr[num++] = dev_id_num & 0xff; - /* Target relative port number */ - arr[num++] = 0x61; /* proto=sas, binary */ - arr[num++] = 0x94; /* PIV=1, target port, rel port */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x4; /* length */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; - arr[num++] = 0x1; /* relative port A */ - } - /* NAA-5, Target port identifier */ - arr[num++] = 0x61; /* proto=sas, binary */ - arr[num++] = 0x93; /* piv=1, target port, naa */ - arr[num++] = 0x0; - arr[num++] = 0x8; - arr[num++] = 0x52; /* naa-5, company id=0x222222 (fake) */ - arr[num++] = 0x22; - arr[num++] = 0x22; - arr[num++] = 0x20; - arr[num++] = (port_a >> 24); - arr[num++] = (port_a >> 16) & 0xff; - arr[num++] = (port_a >> 8) & 0xff; - arr[num++] = port_a & 0xff; - /* NAA-5, Target device identifier */ - arr[num++] = 0x61; /* proto=sas, binary */ - arr[num++] = 0xa3; /* piv=1, target device, naa */ - arr[num++] = 0x0; - arr[num++] = 0x8; - arr[num++] = 0x52; /* naa-5, company id=0x222222 (fake) */ - arr[num++] = 0x22; - arr[num++] = 0x22; - arr[num++] = 0x20; - arr[num++] = (target_dev_id >> 24); - arr[num++] = (target_dev_id >> 16) & 0xff; - arr[num++] = (target_dev_id >> 8) & 0xff; - arr[num++] = target_dev_id & 0xff; - /* SCSI name string: Target device identifier */ - arr[num++] = 0x63; /* proto=sas, UTF-8 */ - arr[num++] = 0xa8; /* piv=1, target device, SCSI name string */ - arr[num++] = 0x0; - arr[num++] = 24; - memcpy(arr + num, "naa.52222220", 12); - num += 12; - snprintf(b, sizeof(b), "%08X", target_dev_id); - memcpy(arr + num, b, 8); - num += 8; - memset(arr + num, 0, 4); - num += 4; - return num; -} - - -static unsigned char vpd84_data[] = { -/* from 4th byte */ 0x22,0x22,0x22,0x0,0xbb,0x0, - 0x22,0x22,0x22,0x0,0xbb,0x1, - 0x22,0x22,0x22,0x0,0xbb,0x2, -}; - -static int inquiry_evpd_84(unsigned char * arr) -{ - memcpy(arr, vpd84_data, sizeof(vpd84_data)); - return sizeof(vpd84_data); -} - -static int inquiry_evpd_85(unsigned char * arr) -{ - int num = 0; - const char * na1 = "https://www.kernel.org/config"; - const char * na2 = "http://www.kernel.org/log"; - int plen, olen; - - arr[num++] = 0x1; /* lu, storage config */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; - olen = strlen(na1); - plen = olen + 1; - if (plen % 4) - plen = ((plen / 4) + 1) * 4; - arr[num++] = plen; /* length, null termianted, padded */ - memcpy(arr + num, na1, olen); - memset(arr + num + olen, 0, plen - olen); - num += plen; - - arr[num++] = 0x4; /* lu, logging */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; - olen = strlen(na2); - plen = olen + 1; - if (plen % 4) - plen = ((plen / 4) + 1) * 4; - arr[num++] = plen; /* length, null terminated, padded */ - memcpy(arr + num, na2, olen); - memset(arr + num + olen, 0, plen - olen); - num += plen; - - return num; -} - -/* SCSI ports VPD page */ -static int inquiry_evpd_88(unsigned char * arr, int target_dev_id) -{ - int num = 0; - int port_a, port_b; - - port_a = target_dev_id + 1; - port_b = port_a + 1; - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; - arr[num++] = 0x1; /* relative port 1 (primary) */ - memset(arr + num, 0, 6); - num += 6; - arr[num++] = 0x0; - arr[num++] = 12; /* length tp descriptor */ - /* naa-5 target port identifier (A) */ - arr[num++] = 0x61; /* proto=sas, binary */ - arr[num++] = 0x93; /* PIV=1, target port, NAA */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x8; /* length */ - arr[num++] = 0x52; /* NAA-5, company_id=0x222222 (fake) */ - arr[num++] = 0x22; - arr[num++] = 0x22; - arr[num++] = 0x20; - arr[num++] = (port_a >> 24); - arr[num++] = (port_a >> 16) & 0xff; - arr[num++] = (port_a >> 8) & 0xff; - arr[num++] = port_a & 0xff; - - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x0; - arr[num++] = 0x2; /* relative port 2 (secondary) */ - memset(arr + num, 0, 6); - num += 6; - arr[num++] = 0x0; - arr[num++] = 12; /* length tp descriptor */ - /* naa-5 target port identifier (B) */ - arr[num++] = 0x61; /* proto=sas, binary */ - arr[num++] = 0x93; /* PIV=1, target port, NAA */ - arr[num++] = 0x0; /* reserved */ - arr[num++] = 0x8; /* length */ - arr[num++] = 0x52; /* NAA-5, company_id=0x222222 (fake) */ - arr[num++] = 0x22; - arr[num++] = 0x22; - arr[num++] = 0x20; - arr[num++] = (port_b >> 24); - arr[num++] = (port_b >> 16) & 0xff; - arr[num++] = (port_b >> 8) & 0xff; - arr[num++] = port_b & 0xff; - - return num; -} - - -static unsigned char vpd89_data[] = { -/* from 4th byte */ 0,0,0,0, -'l','i','n','u','x',' ',' ',' ', -'S','A','T',' ','s','c','s','i','_','d','e','b','u','g',' ',' ', -'1','2','3','4', -0x34,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0, -0xec,0,0,0, -0x5a,0xc,0xff,0x3f,0x37,0xc8,0x10,0,0,0,0,0,0x3f,0,0,0, -0,0,0,0,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x58,0x20,0x20,0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0,0,0,0x40,0x4,0,0x2e,0x33, -0x38,0x31,0x20,0x20,0x20,0x20,0x54,0x53,0x38,0x33,0x30,0x30,0x33,0x31, -0x53,0x41, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x20,0x20, -0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, -0x10,0x80, -0,0,0,0x2f,0,0,0,0x2,0,0x2,0x7,0,0xff,0xff,0x1,0, -0x3f,0,0xc1,0xff,0x3e,0,0x10,0x1,0xb0,0xf8,0x50,0x9,0,0,0x7,0, -0x3,0,0x78,0,0x78,0,0xf0,0,0x78,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x2,0,0,0,0,0,0,0, -0x7e,0,0x1b,0,0x6b,0x34,0x1,0x7d,0x3,0x40,0x69,0x34,0x1,0x3c,0x3,0x40, -0x7f,0x40,0,0,0,0,0xfe,0xfe,0,0,0,0,0,0xfe,0,0, -0,0,0,0,0,0,0,0,0xb0,0xf8,0x50,0x9,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1,0,0xb0,0xf8,0x50,0x9,0xb0,0xf8,0x50,0x9,0x20,0x20,0x2,0,0xb6,0x42, -0,0x80,0x8a,0,0x6,0x3c,0xa,0x3c,0xff,0xff,0xc6,0x7,0,0x1,0,0x8, -0xf0,0xf,0,0x10,0x2,0,0x30,0,0,0,0,0,0,0,0x6,0xfe, -0,0,0x2,0,0x50,0,0x8a,0,0x4f,0x95,0,0,0x21,0,0xb,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xa5,0x51, -}; - -static int inquiry_evpd_89(unsigned char * arr) -{ - memcpy(arr, vpd89_data, sizeof(vpd89_data)); - return sizeof(vpd89_data); -} - - -static unsigned char vpdb0_data[] = { - /* from 4th byte */ 0,0,0,4, - 0,0,0x4,0, - 0,0,0,64, -}; - -static int inquiry_evpd_b0(unsigned char * arr) -{ - memcpy(arr, vpdb0_data, sizeof(vpdb0_data)); - if (sdebug_store_sectors > 0x400) { - arr[4] = (sdebug_store_sectors >> 24) & 0xff; - arr[5] = (sdebug_store_sectors >> 16) & 0xff; - arr[6] = (sdebug_store_sectors >> 8) & 0xff; - arr[7] = sdebug_store_sectors & 0xff; - } - return sizeof(vpdb0_data); + /* NAA IEEE registered identifier (faked) */ + arr[num] = 0x1; /* binary */ + arr[num + 1] = 0x3; + arr[num + 2] = 0x0; + arr[num + 3] = 0x8; + arr[num + 4] = 0x51; /* ieee company id=0x123456 (faked) */ + arr[num + 5] = 0x23; + arr[num + 6] = 0x45; + arr[num + 7] = 0x60; + arr[num + 8] = (dev_id_num >> 24); + arr[num + 9] = (dev_id_num >> 16) & 0xff; + arr[num + 10] = (dev_id_num >> 8) & 0xff; + arr[num + 11] = dev_id_num & 0xff; + return num + 12; } #define SDEBUG_LONG_INQ_SZ 96 -#define SDEBUG_MAX_INQ_ARR_SZ 584 +#define SDEBUG_MAX_INQ_ARR_SZ 128 static int resp_inquiry(struct scsi_cmnd * scp, int target, struct sdebug_dev_info * devip) @@ -921,113 +609,64 @@ static int resp_inquiry(struct scsi_cmnd * scp, int target, unsigned char pq_pdt; unsigned char arr[SDEBUG_MAX_INQ_ARR_SZ]; unsigned char *cmd = (unsigned char *)scp->cmnd; - int alloc_len, n; + int alloc_len; alloc_len = (cmd[3] << 8) + cmd[4]; memset(arr, 0, SDEBUG_MAX_INQ_ARR_SZ); - if (devip->wlun) - pq_pdt = 0x1e; /* present, wlun */ - else if (scsi_debug_no_lun_0 && (0 == devip->lun)) - pq_pdt = 0x7f; /* not present, no device type */ - else - pq_pdt = (scsi_debug_ptype & 0x1f); + pq_pdt = (scsi_debug_ptype & 0x1f); arr[0] = pq_pdt; if (0x2 & cmd[1]) { /* CMDDT bit set */ mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0); return check_condition_result; } else if (0x1 & cmd[1]) { /* EVPD bit set */ - int lu_id_num, target_dev_id, len; - char lu_id_str[6]; - int host_no = devip->sdbg_host->shost->host_no; + int dev_id_num, len; + char dev_id_str[6]; - lu_id_num = devip->wlun ? -1 : (((host_no + 1) * 2000) + - (devip->target * 1000) + devip->lun); - target_dev_id = ((host_no + 1) * 2000) + - (devip->target * 1000) - 3; - len = scnprintf(lu_id_str, 6, "%d", lu_id_num); + dev_id_num = ((devip->sdbg_host->shost->host_no + 1) * 2000) + + (devip->target * 1000) + devip->lun; + len = scnprintf(dev_id_str, 6, "%d", dev_id_num); if (0 == cmd[2]) { /* supported vital product data pages */ - arr[1] = cmd[2]; /*sanity */ - n = 4; - arr[n++] = 0x0; /* this page */ - arr[n++] = 0x80; /* unit serial number */ - arr[n++] = 0x83; /* device identification */ - arr[n++] = 0x84; /* software interface ident. */ - arr[n++] = 0x85; /* management network addresses */ - arr[n++] = 0x86; /* extended inquiry */ - arr[n++] = 0x87; /* mode page policy */ - arr[n++] = 0x88; /* SCSI ports */ - arr[n++] = 0x89; /* ATA information */ - arr[n++] = 0xb0; /* Block limits (SBC) */ - arr[3] = n - 4; /* number of supported VPD pages */ + arr[3] = 3; + arr[4] = 0x0; /* this page */ + arr[5] = 0x80; /* unit serial number */ + arr[6] = 0x83; /* device identification */ } else if (0x80 == cmd[2]) { /* unit serial number */ - arr[1] = cmd[2]; /*sanity */ + arr[1] = 0x80; arr[3] = len; - memcpy(&arr[4], lu_id_str, len); + memcpy(&arr[4], dev_id_str, len); } else if (0x83 == cmd[2]) { /* device identification */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = inquiry_evpd_83(&arr[4], target_dev_id, - lu_id_num, lu_id_str, len); - } else if (0x84 == cmd[2]) { /* Software interface ident. */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = inquiry_evpd_84(&arr[4]); - } else if (0x85 == cmd[2]) { /* Management network addresses */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = inquiry_evpd_85(&arr[4]); - } else if (0x86 == cmd[2]) { /* extended inquiry */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = 0x3c; /* number of following entries */ - arr[4] = 0x0; /* no protection stuff */ - arr[5] = 0x7; /* head of q, ordered + simple q's */ - } else if (0x87 == cmd[2]) { /* mode page policy */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = 0x8; /* number of following entries */ - arr[4] = 0x2; /* disconnect-reconnect mp */ - arr[6] = 0x80; /* mlus, shared */ - arr[8] = 0x18; /* protocol specific lu */ - arr[10] = 0x82; /* mlus, per initiator port */ - } else if (0x88 == cmd[2]) { /* SCSI Ports */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = inquiry_evpd_88(&arr[4], target_dev_id); - } else if (0x89 == cmd[2]) { /* ATA information */ - arr[1] = cmd[2]; /*sanity */ - n = inquiry_evpd_89(&arr[4]); - arr[2] = (n >> 8); - arr[3] = (n & 0xff); - } else if (0xb0 == cmd[2]) { /* Block limits (SBC) */ - arr[1] = cmd[2]; /*sanity */ - arr[3] = inquiry_evpd_b0(&arr[4]); + arr[1] = 0x83; + arr[3] = inquiry_evpd_83(&arr[4], dev_id_num, + dev_id_str, len); } else { /* Illegal request, invalid field in cdb */ mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0); return check_condition_result; } - len = min(((arr[2] << 8) + arr[3]) + 4, alloc_len); return fill_from_dev_buffer(scp, arr, - min(len, SDEBUG_MAX_INQ_ARR_SZ)); + min(alloc_len, SDEBUG_MAX_INQ_ARR_SZ)); } /* drops through here for a standard inquiry */ arr[1] = DEV_REMOVEABLE(target) ? 0x80 : 0; /* Removable disk */ arr[2] = scsi_debug_scsi_level; arr[3] = 2; /* response_data_format==2 */ arr[4] = SDEBUG_LONG_INQ_SZ - 5; - arr[6] = 0x10; /* claim: MultiP */ + arr[6] = 0x1; /* claim: ADDR16 */ /* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */ - arr[7] = 0xa; /* claim: LINKED + CMDQUE */ + arr[7] = 0x3a; /* claim: WBUS16, SYNC, LINKED + CMDQUE */ memcpy(&arr[8], inq_vendor_id, 8); memcpy(&arr[16], inq_product_id, 16); memcpy(&arr[32], inq_product_rev, 4); /* version descriptors (2 bytes each) follow */ - arr[58] = 0x0; arr[59] = 0x77; /* SAM-3 ANSI */ - arr[60] = 0x3; arr[61] = 0x14; /* SPC-3 ANSI */ - n = 62; + arr[58] = 0x0; arr[59] = 0x40; /* SAM-2 */ + arr[60] = 0x3; arr[61] = 0x0; /* SPC-3 */ if (scsi_debug_ptype == 0) { - arr[n++] = 0x3; arr[n++] = 0x3d; /* SBC-2 ANSI */ + arr[62] = 0x1; arr[63] = 0x80; /* SBC */ } else if (scsi_debug_ptype == 1) { - arr[n++] = 0x3; arr[n++] = 0x60; /* SSC-2 no version */ + arr[62] = 0x2; arr[63] = 0x00; /* SSC */ } - arr[n++] = 0xc; arr[n++] = 0xf; /* SAS-1.1 rev 10 */ return fill_from_dev_buffer(scp, arr, min(alloc_len, SDEBUG_LONG_INQ_SZ)); } @@ -1038,141 +677,46 @@ static int resp_requests(struct scsi_cmnd * scp, unsigned char * sbuff; unsigned char *cmd = (unsigned char *)scp->cmnd; unsigned char arr[SDEBUG_SENSE_LEN]; - int want_dsense; int len = 18; - memset(arr, 0, sizeof(arr)); + memset(arr, 0, SDEBUG_SENSE_LEN); if (devip->reset == 1) - mk_sense_buffer(devip, 0, NO_ADDITIONAL_SENSE, 0); - want_dsense = !!(cmd[1] & 1) || scsi_debug_dsense; + mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0); sbuff = devip->sense_buff; - if ((iec_m_pg[2] & 0x4) && (6 == (iec_m_pg[3] & 0xf))) { - if (want_dsense) { - arr[0] = 0x72; - arr[1] = 0x0; /* NO_SENSE in sense_key */ - arr[2] = THRESHOLD_EXCEEDED; - arr[3] = 0xff; /* TEST set and MRIE==6 */ - } else { - arr[0] = 0x70; - arr[2] = 0x0; /* NO_SENSE in sense_key */ - arr[7] = 0xa; /* 18 byte sense buffer */ - arr[12] = THRESHOLD_EXCEEDED; - arr[13] = 0xff; /* TEST set and MRIE==6 */ - } - } else if (devip->stopped) { - if (want_dsense) { - arr[0] = 0x72; - arr[1] = 0x0; /* NO_SENSE in sense_key */ - arr[2] = LOW_POWER_COND_ON; - arr[3] = 0x0; /* TEST set and MRIE==6 */ - } else { - arr[0] = 0x70; - arr[2] = 0x0; /* NO_SENSE in sense_key */ - arr[7] = 0xa; /* 18 byte sense buffer */ - arr[12] = LOW_POWER_COND_ON; - arr[13] = 0x0; /* TEST set and MRIE==6 */ - } - } else { + if ((cmd[1] & 1) && (! scsi_debug_dsense)) { + /* DESC bit set and sense_buff in fixed format */ + arr[0] = 0x72; + arr[1] = sbuff[2]; /* sense key */ + arr[2] = sbuff[12]; /* asc */ + arr[3] = sbuff[13]; /* ascq */ + len = 8; + } else memcpy(arr, sbuff, SDEBUG_SENSE_LEN); - if ((cmd[1] & 1) && (! scsi_debug_dsense)) { - /* DESC bit set and sense_buff in fixed format */ - memset(arr, 0, sizeof(arr)); - arr[0] = 0x72; - arr[1] = sbuff[2]; /* sense key */ - arr[2] = sbuff[12]; /* asc */ - arr[3] = sbuff[13]; /* ascq */ - len = 8; - } - } - mk_sense_buffer(devip, 0, NO_ADDITIONAL_SENSE, 0); + mk_sense_buffer(devip, 0, NO_ADDED_SENSE, 0); return fill_from_dev_buffer(scp, arr, len); } -static int resp_start_stop(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) -{ - unsigned char *cmd = (unsigned char *)scp->cmnd; - int power_cond, errsts, start; - - if ((errsts = check_readiness(scp, 1, devip))) - return errsts; - power_cond = (cmd[4] & 0xf0) >> 4; - if (power_cond) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, - 0); - return check_condition_result; - } - start = cmd[4] & 1; - if (start == devip->stopped) - devip->stopped = !start; - return 0; -} - #define SDEBUG_READCAP_ARR_SZ 8 static int resp_readcap(struct scsi_cmnd * scp, struct sdebug_dev_info * devip) { unsigned char arr[SDEBUG_READCAP_ARR_SZ]; - unsigned int capac; + unsigned long capac; int errsts; - if ((errsts = check_readiness(scp, 1, devip))) + if ((errsts = check_reset(scp, devip))) return errsts; - /* following just in case virtual_gb changed */ - if (scsi_debug_virtual_gb > 0) { - sdebug_capacity = 2048 * 1024; - sdebug_capacity *= scsi_debug_virtual_gb; - } else - sdebug_capacity = sdebug_store_sectors; memset(arr, 0, SDEBUG_READCAP_ARR_SZ); - if (sdebug_capacity < 0xffffffff) { - capac = (unsigned int)sdebug_capacity - 1; - arr[0] = (capac >> 24); - arr[1] = (capac >> 16) & 0xff; - arr[2] = (capac >> 8) & 0xff; - arr[3] = capac & 0xff; - } else { - arr[0] = 0xff; - arr[1] = 0xff; - arr[2] = 0xff; - arr[3] = 0xff; - } + capac = (unsigned long)sdebug_capacity - 1; + arr[0] = (capac >> 24); + arr[1] = (capac >> 16) & 0xff; + arr[2] = (capac >> 8) & 0xff; + arr[3] = capac & 0xff; arr[6] = (SECT_SIZE_PER(target) >> 8) & 0xff; arr[7] = SECT_SIZE_PER(target) & 0xff; return fill_from_dev_buffer(scp, arr, SDEBUG_READCAP_ARR_SZ); } -#define SDEBUG_READCAP16_ARR_SZ 32 -static int resp_readcap16(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) -{ - unsigned char *cmd = (unsigned char *)scp->cmnd; - unsigned char arr[SDEBUG_READCAP16_ARR_SZ]; - unsigned long long capac; - int errsts, k, alloc_len; - - if ((errsts = check_readiness(scp, 1, devip))) - return errsts; - alloc_len = ((cmd[10] << 24) + (cmd[11] << 16) + (cmd[12] << 8) - + cmd[13]); - /* following just in case virtual_gb changed */ - if (scsi_debug_virtual_gb > 0) { - sdebug_capacity = 2048 * 1024; - sdebug_capacity *= scsi_debug_virtual_gb; - } else - sdebug_capacity = sdebug_store_sectors; - memset(arr, 0, SDEBUG_READCAP16_ARR_SZ); - capac = sdebug_capacity - 1; - for (k = 0; k < 8; ++k, capac >>= 8) - arr[7 - k] = capac & 0xff; - arr[8] = (SECT_SIZE_PER(target) >> 24) & 0xff; - arr[9] = (SECT_SIZE_PER(target) >> 16) & 0xff; - arr[10] = (SECT_SIZE_PER(target) >> 8) & 0xff; - arr[11] = SECT_SIZE_PER(target) & 0xff; - return fill_from_dev_buffer(scp, arr, - min(alloc_len, SDEBUG_READCAP16_ARR_SZ)); -} - /* <> */ static int resp_err_recov_pg(unsigned char * p, int pcontrol, int target) @@ -1228,98 +772,27 @@ static int resp_caching_pg(unsigned char * p, int pcontrol, int target) static int resp_ctrl_m_pg(unsigned char * p, int pcontrol, int target) { /* Control mode page for mode_sense */ - unsigned char ch_ctrl_m_pg[] = {/* 0xa, 10, */ 0x6, 0, 0, 0, 0, 0, - 0, 0, 0, 0}; - unsigned char d_ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0, + unsigned char ctrl_m_pg[] = {0xa, 10, 2, 0, 0, 0, 0, 0, 0, 0, 0x2, 0x4b}; if (scsi_debug_dsense) ctrl_m_pg[2] |= 0x4; - else - ctrl_m_pg[2] &= ~0x4; memcpy(p, ctrl_m_pg, sizeof(ctrl_m_pg)); if (1 == pcontrol) - memcpy(p + 2, ch_ctrl_m_pg, sizeof(ch_ctrl_m_pg)); - else if (2 == pcontrol) - memcpy(p, d_ctrl_m_pg, sizeof(d_ctrl_m_pg)); + memset(p + 2, 0, sizeof(ctrl_m_pg) - 2); return sizeof(ctrl_m_pg); } - static int resp_iec_m_pg(unsigned char * p, int pcontrol, int target) { /* Informational Exceptions control mode page for mode_sense */ - unsigned char ch_iec_m_pg[] = {/* 0x1c, 0xa, */ 0x4, 0xf, 0, 0, 0, 0, - 0, 0, 0x0, 0x0}; - unsigned char d_iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, - 0, 0, 0x0, 0x0}; - + unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, + 0, 0, 0x0, 0x0}; memcpy(p, iec_m_pg, sizeof(iec_m_pg)); if (1 == pcontrol) - memcpy(p + 2, ch_iec_m_pg, sizeof(ch_iec_m_pg)); - else if (2 == pcontrol) - memcpy(p, d_iec_m_pg, sizeof(d_iec_m_pg)); + memset(p + 2, 0, sizeof(iec_m_pg) - 2); return sizeof(iec_m_pg); } -static int resp_sas_sf_m_pg(unsigned char * p, int pcontrol, int target) -{ /* SAS SSP mode page - short format for mode_sense */ - unsigned char sas_sf_m_pg[] = {0x19, 0x6, - 0x6, 0x0, 0x7, 0xd0, 0x0, 0x0}; - - memcpy(p, sas_sf_m_pg, sizeof(sas_sf_m_pg)); - if (1 == pcontrol) - memset(p + 2, 0, sizeof(sas_sf_m_pg) - 2); - return sizeof(sas_sf_m_pg); -} - - -static int resp_sas_pcd_m_spg(unsigned char * p, int pcontrol, int target, - int target_dev_id) -{ /* SAS phy control and discover mode page for mode_sense */ - unsigned char sas_pcd_m_pg[] = {0x59, 0x1, 0, 0x64, 0, 0x6, 0, 2, - 0, 0, 0, 0, 0x10, 0x9, 0x8, 0x0, - 0x52, 0x22, 0x22, 0x20, 0x0, 0x0, 0x0, 0x0, - 0x51, 0x11, 0x11, 0x10, 0x0, 0x0, 0x0, 0x1, - 0x2, 0, 0, 0, 0, 0, 0, 0, - 0x88, 0x99, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 0x10, 0x9, 0x8, 0x0, - 0x52, 0x22, 0x22, 0x20, 0x0, 0x0, 0x0, 0x0, - 0x51, 0x11, 0x11, 0x10, 0x0, 0x0, 0x0, 0x1, - 0x3, 0, 0, 0, 0, 0, 0, 0, - 0x88, 0x99, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - int port_a, port_b; - - port_a = target_dev_id + 1; - port_b = port_a + 1; - memcpy(p, sas_pcd_m_pg, sizeof(sas_pcd_m_pg)); - p[20] = (port_a >> 24); - p[21] = (port_a >> 16) & 0xff; - p[22] = (port_a >> 8) & 0xff; - p[23] = port_a & 0xff; - p[48 + 20] = (port_b >> 24); - p[48 + 21] = (port_b >> 16) & 0xff; - p[48 + 22] = (port_b >> 8) & 0xff; - p[48 + 23] = port_b & 0xff; - if (1 == pcontrol) - memset(p + 4, 0, sizeof(sas_pcd_m_pg) - 4); - return sizeof(sas_pcd_m_pg); -} - -static int resp_sas_sha_m_spg(unsigned char * p, int pcontrol) -{ /* SAS SSP shared protocol specific port mode subpage */ - unsigned char sas_sha_m_pg[] = {0x59, 0x2, 0, 0xc, 0, 0x6, 0x10, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - - memcpy(p, sas_sha_m_pg, sizeof(sas_sha_m_pg)); - if (1 == pcontrol) - memset(p + 4, 0, sizeof(sas_sha_m_pg) - 4); - return sizeof(sas_sha_m_pg); -} - #define SDEBUG_MAX_MSENSE_SZ 256 static int resp_mode_sense(struct scsi_cmnd * scp, int target, @@ -1328,12 +801,12 @@ static int resp_mode_sense(struct scsi_cmnd * scp, int target, unsigned char dbd; int pcontrol, pcode, subpcode; unsigned char dev_spec; - int alloc_len, msense_6, offset, len, errsts, target_dev_id; + int alloc_len, msense_6, offset, len, errsts; unsigned char * ap; unsigned char arr[SDEBUG_MAX_MSENSE_SZ]; unsigned char *cmd = (unsigned char *)scp->cmnd; - if ((errsts = check_readiness(scp, 1, devip))) + if ((errsts = check_reset(scp, devip))) return errsts; dbd = cmd[1] & 0x8; pcontrol = (cmd[2] & 0xc0) >> 6; @@ -1347,8 +820,6 @@ static int resp_mode_sense(struct scsi_cmnd * scp, int target, 0); return check_condition_result; } - target_dev_id = ((devip->sdbg_host->shost->host_no + 1) * 2000) + - (devip->target * 1000) - 3; dev_spec = DEV_READONLY(target) ? 0x80 : 0x0; if (msense_6) { arr[2] = dev_spec; @@ -1359,8 +830,7 @@ static int resp_mode_sense(struct scsi_cmnd * scp, int target, } ap = arr + offset; - if ((subpcode > 0x0) && (subpcode < 0xff) && (0x19 != pcode)) { - /* TODO: Control Extension page */ + if (0 != subpcode) { /* TODO: Control Extension page */ mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0); return check_condition_result; @@ -1386,45 +856,17 @@ static int resp_mode_sense(struct scsi_cmnd * scp, int target, len = resp_ctrl_m_pg(ap, pcontrol, target); offset += len; break; - case 0x19: /* if spc==1 then sas phy, control+discover */ - if ((subpcode > 0x2) && (subpcode < 0xff)) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_CDB, 0); - return check_condition_result; - } - len = 0; - if ((0x0 == subpcode) || (0xff == subpcode)) - len += resp_sas_sf_m_pg(ap + len, pcontrol, target); - if ((0x1 == subpcode) || (0xff == subpcode)) - len += resp_sas_pcd_m_spg(ap + len, pcontrol, target, - target_dev_id); - if ((0x2 == subpcode) || (0xff == subpcode)) - len += resp_sas_sha_m_spg(ap + len, pcontrol); - offset += len; - break; case 0x1c: /* Informational Exceptions Mode page, all devices */ len = resp_iec_m_pg(ap, pcontrol, target); offset += len; break; case 0x3f: /* Read all Mode pages */ - if ((0 == subpcode) || (0xff == subpcode)) { - len = resp_err_recov_pg(ap, pcontrol, target); - len += resp_disconnect_pg(ap + len, pcontrol, target); - len += resp_format_pg(ap + len, pcontrol, target); - len += resp_caching_pg(ap + len, pcontrol, target); - len += resp_ctrl_m_pg(ap + len, pcontrol, target); - len += resp_sas_sf_m_pg(ap + len, pcontrol, target); - if (0xff == subpcode) { - len += resp_sas_pcd_m_spg(ap + len, pcontrol, - target, target_dev_id); - len += resp_sas_sha_m_spg(ap + len, pcontrol); - } - len += resp_iec_m_pg(ap + len, pcontrol, target); - } else { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_CDB, 0); - return check_condition_result; - } + len = resp_err_recov_pg(ap, pcontrol, target); + len += resp_disconnect_pg(ap + len, pcontrol, target); + len += resp_format_pg(ap + len, pcontrol, target); + len += resp_caching_pg(ap + len, pcontrol, target); + len += resp_ctrl_m_pg(ap + len, pcontrol, target); + len += resp_iec_m_pg(ap + len, pcontrol, target); offset += len; break; default: @@ -1441,274 +883,71 @@ static int resp_mode_sense(struct scsi_cmnd * scp, int target, return fill_from_dev_buffer(scp, arr, min(alloc_len, offset)); } -#define SDEBUG_MAX_MSELECT_SZ 512 - -static int resp_mode_select(struct scsi_cmnd * scp, int mselect6, - struct sdebug_dev_info * devip) -{ - int pf, sp, ps, md_len, bd_len, off, spf, pg_len; - int param_len, res, errsts, mpage; - unsigned char arr[SDEBUG_MAX_MSELECT_SZ]; - unsigned char *cmd = (unsigned char *)scp->cmnd; - - if ((errsts = check_readiness(scp, 1, devip))) - return errsts; - memset(arr, 0, sizeof(arr)); - pf = cmd[1] & 0x10; - sp = cmd[1] & 0x1; - param_len = mselect6 ? cmd[4] : ((cmd[7] << 8) + cmd[8]); - if ((0 == pf) || sp || (param_len > SDEBUG_MAX_MSELECT_SZ)) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_CDB, 0); - return check_condition_result; - } - res = fetch_to_dev_buffer(scp, arr, param_len); - if (-1 == res) - return (DID_ERROR << 16); - else if ((res < param_len) && - (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)) - printk(KERN_INFO "scsi_debug: mode_select: cdb indicated=%d, " - " IO sent=%d bytes\n", param_len, res); - md_len = mselect6 ? (arr[0] + 1) : ((arr[0] << 8) + arr[1] + 2); - bd_len = mselect6 ? arr[3] : ((arr[6] << 8) + arr[7]); - if ((md_len > 2) || (0 != bd_len)) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_PARAM_LIST, 0); - return check_condition_result; - } - off = bd_len + (mselect6 ? 4 : 8); - mpage = arr[off] & 0x3f; - ps = !!(arr[off] & 0x80); - if (ps) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_PARAM_LIST, 0); - return check_condition_result; - } - spf = !!(arr[off] & 0x40); - pg_len = spf ? ((arr[off + 2] << 8) + arr[off + 3] + 4) : - (arr[off + 1] + 2); - if ((pg_len + off) > param_len) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - PARAMETER_LIST_LENGTH_ERR, 0); - return check_condition_result; - } - switch (mpage) { - case 0xa: /* Control Mode page */ - if (ctrl_m_pg[1] == arr[off + 1]) { - memcpy(ctrl_m_pg + 2, arr + off + 2, - sizeof(ctrl_m_pg) - 2); - scsi_debug_dsense = !!(ctrl_m_pg[2] & 0x4); - return 0; - } - break; - case 0x1c: /* Informational Exceptions Mode page */ - if (iec_m_pg[1] == arr[off + 1]) { - memcpy(iec_m_pg + 2, arr + off + 2, - sizeof(iec_m_pg) - 2); - return 0; - } - break; - default: - break; - } - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_PARAM_LIST, 0); - return check_condition_result; -} - -static int resp_temp_l_pg(unsigned char * arr) -{ - unsigned char temp_l_pg[] = {0x0, 0x0, 0x3, 0x2, 0x0, 38, - 0x0, 0x1, 0x3, 0x2, 0x0, 65, - }; - - memcpy(arr, temp_l_pg, sizeof(temp_l_pg)); - return sizeof(temp_l_pg); -} - -static int resp_ie_l_pg(unsigned char * arr) -{ - unsigned char ie_l_pg[] = {0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 38, - }; - - memcpy(arr, ie_l_pg, sizeof(ie_l_pg)); - if (iec_m_pg[2] & 0x4) { /* TEST bit set */ - arr[4] = THRESHOLD_EXCEEDED; - arr[5] = 0xff; - } - return sizeof(ie_l_pg); -} - -#define SDEBUG_MAX_LSENSE_SZ 512 - -static int resp_log_sense(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) -{ - int ppc, sp, pcontrol, pcode, alloc_len, errsts, len, n; - unsigned char arr[SDEBUG_MAX_LSENSE_SZ]; - unsigned char *cmd = (unsigned char *)scp->cmnd; - - if ((errsts = check_readiness(scp, 1, devip))) - return errsts; - memset(arr, 0, sizeof(arr)); - ppc = cmd[1] & 0x2; - sp = cmd[1] & 0x1; - if (ppc || sp) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_CDB, 0); - return check_condition_result; - } - pcontrol = (cmd[2] & 0xc0) >> 6; - pcode = cmd[2] & 0x3f; - alloc_len = (cmd[7] << 8) + cmd[8]; - arr[0] = pcode; - switch (pcode) { - case 0x0: /* Supported log pages log page */ - n = 4; - arr[n++] = 0x0; /* this page */ - arr[n++] = 0xd; /* Temperature */ - arr[n++] = 0x2f; /* Informational exceptions */ - arr[3] = n - 4; - break; - case 0xd: /* Temperature log page */ - arr[3] = resp_temp_l_pg(arr + 4); - break; - case 0x2f: /* Informational exceptions log page */ - arr[3] = resp_ie_l_pg(arr + 4); - break; - default: - mk_sense_buffer(devip, ILLEGAL_REQUEST, - INVALID_FIELD_IN_CDB, 0); - return check_condition_result; - } - len = min(((arr[2] << 8) + arr[3]) + 4, alloc_len); - return fill_from_dev_buffer(scp, arr, - min(len, SDEBUG_MAX_INQ_ARR_SZ)); -} - -static int resp_read(struct scsi_cmnd * SCpnt, unsigned long long lba, - unsigned int num, struct sdebug_dev_info * devip) +static int resp_read(struct scsi_cmnd * SCpnt, int upper_blk, int block, + int num, struct sdebug_dev_info * devip) { unsigned long iflags; - unsigned int block, from_bottom; - unsigned long long u; int ret; - if (lba + num > sdebug_capacity) { + if (upper_blk || (block + num > sdebug_capacity)) { mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE, 0); return check_condition_result; } - /* transfer length excessive (tie in to block limits VPD page) */ - if (num > sdebug_store_sectors) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, - 0); - return check_condition_result; - } if ((SCSI_DEBUG_OPT_MEDIUM_ERR & scsi_debug_opts) && - (lba <= OPT_MEDIUM_ERR_ADDR) && - ((lba + num) > OPT_MEDIUM_ERR_ADDR)) { - /* claim unrecoverable read error */ + (block <= OPT_MEDIUM_ERR_ADDR) && + ((block + num) > OPT_MEDIUM_ERR_ADDR)) { mk_sense_buffer(devip, MEDIUM_ERROR, UNRECOVERED_READ_ERR, 0); - /* set info field and valid bit for fixed descriptor */ - if (0x70 == (devip->sense_buff[0] & 0x7f)) { - devip->sense_buff[0] |= 0x80; /* Valid bit */ - ret = OPT_MEDIUM_ERR_ADDR; - devip->sense_buff[3] = (ret >> 24) & 0xff; - devip->sense_buff[4] = (ret >> 16) & 0xff; - devip->sense_buff[5] = (ret >> 8) & 0xff; - devip->sense_buff[6] = ret & 0xff; - } + /* claim unrecoverable read error */ return check_condition_result; } read_lock_irqsave(&atomic_rw, iflags); - if ((lba + num) <= sdebug_store_sectors) - ret = fill_from_dev_buffer(SCpnt, - fake_storep + (lba * SECT_SIZE), - num * SECT_SIZE); - else { - /* modulo when one arg is 64 bits needs do_div() */ - u = lba; - block = do_div(u, sdebug_store_sectors); - from_bottom = 0; - if ((block + num) > sdebug_store_sectors) - from_bottom = (block + num) - sdebug_store_sectors; - ret = fill_from_dev_buffer(SCpnt, - fake_storep + (block * SECT_SIZE), - (num - from_bottom) * SECT_SIZE); - if ((0 == ret) && (from_bottom > 0)) - ret = fill_from_dev_buffer(SCpnt, fake_storep, - from_bottom * SECT_SIZE); - } + ret = fill_from_dev_buffer(SCpnt, fake_storep + (block * SECT_SIZE), + num * SECT_SIZE); read_unlock_irqrestore(&atomic_rw, iflags); return ret; } -static int resp_write(struct scsi_cmnd * SCpnt, unsigned long long lba, - unsigned int num, struct sdebug_dev_info * devip) +static int resp_write(struct scsi_cmnd * SCpnt, int upper_blk, int block, + int num, struct sdebug_dev_info * devip) { unsigned long iflags; - unsigned int block, to_bottom; - unsigned long long u; int res; - if (lba + num > sdebug_capacity) { + if (upper_blk || (block + num > sdebug_capacity)) { mk_sense_buffer(devip, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE, 0); return check_condition_result; } - /* transfer length excessive (tie in to block limits VPD page) */ - if (num > sdebug_store_sectors) { - mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, - 0); - return check_condition_result; - } write_lock_irqsave(&atomic_rw, iflags); - if ((lba + num) <= sdebug_store_sectors) - res = fetch_to_dev_buffer(SCpnt, - fake_storep + (lba * SECT_SIZE), - num * SECT_SIZE); - else { - /* modulo when one arg is 64 bits needs do_div() */ - u = lba; - block = do_div(u, sdebug_store_sectors); - to_bottom = 0; - if ((block + num) > sdebug_store_sectors) - to_bottom = (block + num) - sdebug_store_sectors; - res = fetch_to_dev_buffer(SCpnt, - fake_storep + (block * SECT_SIZE), - (num - to_bottom) * SECT_SIZE); - if ((0 == res) && (to_bottom > 0)) - res = fetch_to_dev_buffer(SCpnt, fake_storep, - to_bottom * SECT_SIZE); - } + res = fetch_to_dev_buffer(SCpnt, fake_storep + (block * SECT_SIZE), + num * SECT_SIZE); write_unlock_irqrestore(&atomic_rw, iflags); if (-1 == res) return (DID_ERROR << 16); else if ((res < (num * SECT_SIZE)) && (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)) - printk(KERN_INFO "scsi_debug: write: cdb indicated=%u, " + printk(KERN_INFO "scsi_debug: write: cdb indicated=%d, " " IO sent=%d bytes\n", num * SECT_SIZE, res); return 0; } -#define SDEBUG_RLUN_ARR_SZ 256 +#define SDEBUG_RLUN_ARR_SZ 128 static int resp_report_luns(struct scsi_cmnd * scp, struct sdebug_dev_info * devip) { unsigned int alloc_len; - int lun_cnt, i, upper, num, n, wlun, lun; + int lun_cnt, i, upper; unsigned char *cmd = (unsigned char *)scp->cmnd; int select_report = (int)cmd[2]; struct scsi_lun *one_lun; unsigned char arr[SDEBUG_RLUN_ARR_SZ]; - unsigned char * max_addr; alloc_len = cmd[9] + (cmd[8] << 8) + (cmd[7] << 16) + (cmd[6] << 24); - if ((alloc_len < 4) || (select_report > 2)) { + if ((alloc_len < 16) || (select_report > 2)) { mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0); return check_condition_result; @@ -1716,37 +955,18 @@ static int resp_report_luns(struct scsi_cmnd * scp, /* can produce response with up to 16k luns (lun 0 to lun 16383) */ memset(arr, 0, SDEBUG_RLUN_ARR_SZ); lun_cnt = scsi_debug_max_luns; - if (1 == select_report) - lun_cnt = 0; - else if (scsi_debug_no_lun_0 && (lun_cnt > 0)) - --lun_cnt; - wlun = (select_report > 0) ? 1 : 0; - num = lun_cnt + wlun; - arr[2] = ((sizeof(struct scsi_lun) * num) >> 8) & 0xff; - arr[3] = (sizeof(struct scsi_lun) * num) & 0xff; - n = min((int)((SDEBUG_RLUN_ARR_SZ - 8) / - sizeof(struct scsi_lun)), num); - if (n < num) { - wlun = 0; - lun_cnt = n; - } + arr[2] = ((sizeof(struct scsi_lun) * lun_cnt) >> 8) & 0xff; + arr[3] = (sizeof(struct scsi_lun) * lun_cnt) & 0xff; + lun_cnt = min((int)((SDEBUG_RLUN_ARR_SZ - 8) / + sizeof(struct scsi_lun)), lun_cnt); one_lun = (struct scsi_lun *) &arr[8]; - max_addr = arr + SDEBUG_RLUN_ARR_SZ; - for (i = 0, lun = (scsi_debug_no_lun_0 ? 1 : 0); - ((i < lun_cnt) && ((unsigned char *)(one_lun + i) < max_addr)); - i++, lun++) { - upper = (lun >> 8) & 0x3f; + for (i = 0; i < lun_cnt; i++) { + upper = (i >> 8) & 0x3f; if (upper) one_lun[i].scsi_lun[0] = (upper | (SAM2_LUN_ADDRESS_METHOD << 6)); - one_lun[i].scsi_lun[1] = lun & 0xff; + one_lun[i].scsi_lun[1] = i & 0xff; } - if (wlun) { - one_lun[i].scsi_lun[0] = (SAM2_WLUN_REPORT_LUNS >> 8) & 0xff; - one_lun[i].scsi_lun[1] = SAM2_WLUN_REPORT_LUNS & 0xff; - i++; - } - alloc_len = (unsigned char *)(one_lun + i) - arr; return fill_from_dev_buffer(scp, arr, min((int)alloc_len, SDEBUG_RLUN_ARR_SZ)); } @@ -1782,8 +1002,7 @@ static void timer_intr_handler(unsigned long indx) static int scsi_debug_slave_alloc(struct scsi_device * sdp) { if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_alloc\n"); return 0; } @@ -1792,8 +1011,7 @@ static int scsi_debug_slave_configure(struct scsi_device * sdp) struct sdebug_dev_info * devip; if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_configure\n"); if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; devip = devInfoReg(sdp); @@ -1801,7 +1019,6 @@ static int scsi_debug_slave_configure(struct scsi_device * sdp) if (sdp->host->cmd_per_lun) scsi_adjust_queue_depth(sdp, SDEBUG_TAGGED_QUEUING, sdp->host->cmd_per_lun); - blk_queue_max_segment_size(sdp->request_queue, 256 * 1024); return 0; } @@ -1811,8 +1028,7 @@ static void scsi_debug_slave_destroy(struct scsi_device * sdp) (struct sdebug_dev_info *)sdp->hostdata; if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) - printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", - sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); + sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_destroy\n"); if (devip) { /* make this slot avaliable for re-use */ devip->used = 0; @@ -1869,8 +1085,6 @@ static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev) open_devip->sense_buff[0] = 0x70; open_devip->sense_buff[7] = 0xa; } - if (sdev->lun == SAM2_WLUN_REPORT_LUNS) - open_devip->wlun = SAM2_WLUN_REPORT_LUNS & 0xff; return open_devip; } return NULL; @@ -2059,7 +1273,7 @@ static void __init sdebug_build_parts(unsigned char * ramp) printk(KERN_WARNING "scsi_debug:build_parts: reducing " "partitions to %d\n", SDEBUG_MAX_PARTS); } - num_sectors = (int)sdebug_store_sectors; + num_sectors = (int)(sdebug_store_size / SECT_SIZE); sectors_per_part = (num_sectors - sdebug_sectors_per) / scsi_debug_num_parts; heads_by_sects = sdebug_heads * sdebug_sectors_per; @@ -2102,9 +1316,9 @@ static int schedule_resp(struct scsi_cmnd * cmnd, if (scsi_result) { struct scsi_device * sdp = cmnd->device; - printk(KERN_INFO "scsi_debug: <%u %u %u %u> " - "non-zero result=0x%x\n", sdp->host->host_no, - sdp->channel, sdp->id, sdp->lun, scsi_result); + sdev_printk(KERN_INFO, sdp, + "non-zero result=0x%x\n", + scsi_result); } } if (cmnd && devip) { @@ -2151,19 +1365,21 @@ static int schedule_resp(struct scsi_cmnd * cmnd, } } -module_param_named(add_host, scsi_debug_add_host, int, S_IRUGO | S_IWUSR); -module_param_named(delay, scsi_debug_delay, int, S_IRUGO | S_IWUSR); -module_param_named(dev_size_mb, scsi_debug_dev_size_mb, int, S_IRUGO); -module_param_named(dsense, scsi_debug_dsense, int, S_IRUGO | S_IWUSR); -module_param_named(every_nth, scsi_debug_every_nth, int, S_IRUGO | S_IWUSR); -module_param_named(max_luns, scsi_debug_max_luns, int, S_IRUGO | S_IWUSR); -module_param_named(no_lun_0, scsi_debug_no_lun_0, int, S_IRUGO | S_IWUSR); -module_param_named(num_parts, scsi_debug_num_parts, int, S_IRUGO); -module_param_named(num_tgts, scsi_debug_num_tgts, int, S_IRUGO | S_IWUSR); -module_param_named(opts, scsi_debug_opts, int, S_IRUGO | S_IWUSR); -module_param_named(ptype, scsi_debug_ptype, int, S_IRUGO | S_IWUSR); -module_param_named(scsi_level, scsi_debug_scsi_level, int, S_IRUGO); -module_param_named(virtual_gb, scsi_debug_virtual_gb, int, S_IRUGO | S_IWUSR); +/* Set 'perm' (4th argument) to 0 to disable module_param's definition + * of sysfs parameters (which module_param doesn't yet support). + * Sysfs parameters defined explicitly below. + */ +module_param_named(add_host, scsi_debug_add_host, int, 0); /* perm=0644 */ +module_param_named(delay, scsi_debug_delay, int, 0); /* perm=0644 */ +module_param_named(dev_size_mb, scsi_debug_dev_size_mb, int, 0); +module_param_named(dsense, scsi_debug_dsense, int, 0); +module_param_named(every_nth, scsi_debug_every_nth, int, 0); +module_param_named(max_luns, scsi_debug_max_luns, int, 0); +module_param_named(num_parts, scsi_debug_num_parts, int, 0); +module_param_named(num_tgts, scsi_debug_num_tgts, int, 0); +module_param_named(opts, scsi_debug_opts, int, 0); /* perm=0644 */ +module_param_named(ptype, scsi_debug_ptype, int, 0); +module_param_named(scsi_level, scsi_debug_scsi_level, int, 0); MODULE_AUTHOR("Eric Youngdale + Douglas Gilbert"); MODULE_DESCRIPTION("SCSI debug adapter driver"); @@ -2172,17 +1388,15 @@ MODULE_VERSION(SCSI_DEBUG_VERSION); MODULE_PARM_DESC(add_host, "0..127 hosts allowed(def=1)"); MODULE_PARM_DESC(delay, "# of jiffies to delay response(def=1)"); -MODULE_PARM_DESC(dev_size_mb, "size in MB of ram shared by devs(def=8)"); -MODULE_PARM_DESC(dsense, "use descriptor sense format(def=0 -> fixed)"); +MODULE_PARM_DESC(dev_size_mb, "size in MB of ram shared by devs"); +MODULE_PARM_DESC(dsense, "use descriptor sense format(def: fixed)"); MODULE_PARM_DESC(every_nth, "timeout every nth command(def=100)"); -MODULE_PARM_DESC(max_luns, "number of LUNs per target to simulate(def=1)"); -MODULE_PARM_DESC(no_lun_0, "no LU number 0 (def=0 -> have lun 0)"); +MODULE_PARM_DESC(max_luns, "number of SCSI LUNs per target to simulate"); MODULE_PARM_DESC(num_parts, "number of partitions(def=0)"); -MODULE_PARM_DESC(num_tgts, "number of targets per host to simulate(def=1)"); -MODULE_PARM_DESC(opts, "1->noise, 2->medium_error, 4->... (def=0)"); +MODULE_PARM_DESC(num_tgts, "number of SCSI targets per host to simulate"); +MODULE_PARM_DESC(opts, "1->noise, 2->medium_error, 4->..."); MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])"); MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=5[SPC-3])"); -MODULE_PARM_DESC(virtual_gb, "virtual gigabyte size (def=0 -> use dev_size_mb)"); static char sdebug_info[256]; @@ -2334,24 +1548,6 @@ static ssize_t sdebug_dsense_store(struct device_driver * ddp, DRIVER_ATTR(dsense, S_IRUGO | S_IWUSR, sdebug_dsense_show, sdebug_dsense_store); -static ssize_t sdebug_no_lun_0_show(struct device_driver * ddp, char * buf) -{ - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_no_lun_0); -} -static ssize_t sdebug_no_lun_0_store(struct device_driver * ddp, - const char * buf, size_t count) -{ - int n; - - if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) { - scsi_debug_no_lun_0 = n; - return count; - } - return -EINVAL; -} -DRIVER_ATTR(no_lun_0, S_IRUGO | S_IWUSR, sdebug_no_lun_0_show, - sdebug_no_lun_0_store); - static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf) { return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_tgts); @@ -2427,29 +1623,6 @@ static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf) } DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL); -static ssize_t sdebug_virtual_gb_show(struct device_driver * ddp, char * buf) -{ - return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_virtual_gb); -} -static ssize_t sdebug_virtual_gb_store(struct device_driver * ddp, - const char * buf, size_t count) -{ - int n; - - if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) { - scsi_debug_virtual_gb = n; - if (scsi_debug_virtual_gb > 0) { - sdebug_capacity = 2048 * 1024; - sdebug_capacity *= scsi_debug_virtual_gb; - } else - sdebug_capacity = sdebug_store_sectors; - return count; - } - return -EINVAL; -} -DRIVER_ATTR(virtual_gb, S_IRUGO | S_IWUSR, sdebug_virtual_gb_show, - sdebug_virtual_gb_store); - static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf) { return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_add_host); @@ -2487,22 +1660,19 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp, DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show, sdebug_add_host_store); -static int do_create_driverfs_files(void) +static void do_create_driverfs_files(void) { - int ret; - - ret = driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_delay); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dsense); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_every_nth); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_luns); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_parts); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_ptype); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts); - ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_scsi_level); - return ret; + driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_delay); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_dsense); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_every_nth); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_luns); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_parts); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_ptype); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts); + driver_create_file(&sdebug_driverfs_driver, &driver_attr_scsi_level); } static void do_remove_driverfs_files(void) @@ -2522,20 +1692,14 @@ static void do_remove_driverfs_files(void) static int __init scsi_debug_init(void) { - unsigned int sz; + unsigned long sz; int host_to_add; int k; - int ret; if (scsi_debug_dev_size_mb < 1) scsi_debug_dev_size_mb = 1; /* force minimum 1 MB ramdisk */ - sdebug_store_size = (unsigned int)scsi_debug_dev_size_mb * 1048576; - sdebug_store_sectors = sdebug_store_size / SECT_SIZE; - if (scsi_debug_virtual_gb > 0) { - sdebug_capacity = 2048 * 1024; - sdebug_capacity *= scsi_debug_virtual_gb; - } else - sdebug_capacity = sdebug_store_sectors; + sdebug_store_size = (unsigned long)scsi_debug_dev_size_mb * 1048576; + sdebug_capacity = sdebug_store_size / SECT_SIZE; /* play around with geometry, don't waste too much on track 0 */ sdebug_heads = 8; @@ -2564,33 +1728,13 @@ static int __init scsi_debug_init(void) if (scsi_debug_num_parts > 0) sdebug_build_parts(fake_storep); - ret = device_register(&pseudo_primary); - if (ret < 0) { - printk(KERN_WARNING "scsi_debug: device_register error: %d\n", - ret); - goto free_vm; - } - ret = bus_register(&pseudo_lld_bus); - if (ret < 0) { - printk(KERN_WARNING "scsi_debug: bus_register error: %d\n", - ret); - goto dev_unreg; - } - ret = driver_register(&sdebug_driverfs_driver); - if (ret < 0) { - printk(KERN_WARNING "scsi_debug: driver_register error: %d\n", - ret); - goto bus_unreg; - } - ret = do_create_driverfs_files(); - if (ret < 0) { - printk(KERN_WARNING "scsi_debug: driver_create_file error: %d\n", - ret); - goto del_files; - } - init_all_queued(); + device_register(&pseudo_primary); + bus_register(&pseudo_lld_bus); + driver_register(&sdebug_driverfs_driver); + do_create_driverfs_files(); + sdebug_driver_template.proc_name = (char *)sdebug_proc_name; host_to_add = scsi_debug_add_host; @@ -2609,18 +1753,6 @@ static int __init scsi_debug_init(void) scsi_debug_add_host); } return 0; - -del_files: - do_remove_driverfs_files(); - driver_unregister(&sdebug_driverfs_driver); -bus_unreg: - bus_unregister(&pseudo_lld_bus); -dev_unreg: - device_unregister(&pseudo_primary); -free_vm: - vfree(fake_storep); - - return ret; } static void __exit scsi_debug_exit(void) @@ -2681,7 +1813,7 @@ static int sdebug_add_adapter(void) struct sdebug_dev_info *sdbg_devinfo; struct list_head *lh, *lh_sf; - sdbg_host = kzalloc(sizeof(*sdbg_host),GFP_KERNEL); + sdbg_host = kzalloc(sizeof(*sdbg_host), GFP_KERNEL); if (NULL == sdbg_host) { printk(KERN_ERR "%s: out of memory at line %d\n", @@ -2693,7 +1825,7 @@ static int sdebug_add_adapter(void) devs_per_host = scsi_debug_num_tgts * scsi_debug_max_luns; for (k = 0; k < devs_per_host; k++) { - sdbg_devinfo = kzalloc(sizeof(*sdbg_devinfo),GFP_KERNEL); + sdbg_devinfo = kzalloc(sizeof(*sdbg_devinfo), GFP_KERNEL); if (NULL == sdbg_devinfo) { printk(KERN_ERR "%s: out of memory at line %d\n", __FUNCTION__, __LINE__); @@ -2774,7 +1906,7 @@ static int sdebug_driver_probe(struct device * dev) hpnt->max_id = scsi_debug_num_tgts + 1; else hpnt->max_id = scsi_debug_num_tgts; - hpnt->max_lun = SAM2_WLUN_REPORT_LUNS; /* = scsi_debug_max_luns; */ + hpnt->max_lun = scsi_debug_max_luns; error = scsi_add_host(hpnt, &sdbg_host->dev); if (error) { @@ -2828,7 +1960,7 @@ static void sdebug_max_tgts_luns(void) hpnt->max_id = scsi_debug_num_tgts + 1; else hpnt->max_id = scsi_debug_num_tgts; - hpnt->max_lun = SAM2_WLUN_REPORT_LUNS; /* scsi_debug_max_luns; */ + hpnt->max_lun = scsi_debug_max_luns; } spin_unlock(&sdebug_host_list_lock); } diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 3d0429bc1..62f8cb7b3 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -159,10 +159,8 @@ static struct { {"HITACHI", "DF400", "*", BLIST_SPARSELUN}, {"HITACHI", "DF500", "*", BLIST_SPARSELUN}, {"HITACHI", "DF600", "*", BLIST_SPARSELUN}, - {"HITACHI", "DISK-SUBSYSTEM", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN}, - {"HITACHI", "OPEN-E", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN}, {"HP", "A6189A", NULL, BLIST_SPARSELUN | BLIST_LARGELUN}, /* HP VA7400 */ - {"HP", "OPEN-", "*", BLIST_REPORTLUN2}, /* HP XP Arrays */ + {"HP", "OPEN-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, /* HP XP Arrays */ {"HP", "NetRAID-4M", NULL, BLIST_FORCELUN}, {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"HP", "C1557A", NULL, BLIST_FORCELUN}, diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 3d355d054..1c75646f9 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -26,13 +26,13 @@ #include #include -#include #include #include #include #include #include #include +#include #include "scsi_priv.h" #include "scsi_logging.h" @@ -57,28 +57,6 @@ void scsi_eh_wakeup(struct Scsi_Host *shost) } } -/** - * scsi_schedule_eh - schedule EH for SCSI host - * @shost: SCSI host to invoke error handling on. - * - * Schedule SCSI EH without scmd. - **/ -void scsi_schedule_eh(struct Scsi_Host *shost) -{ - unsigned long flags; - - spin_lock_irqsave(shost->host_lock, flags); - - if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0 || - scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY) == 0) { - shost->host_eh_scheduled++; - scsi_eh_wakeup(shost); - } - - spin_unlock_irqrestore(shost->host_lock, flags); -} -EXPORT_SYMBOL_GPL(scsi_schedule_eh); - /** * scsi_eh_scmd_add - add scsi cmd to error handling. * @scmd: scmd to run eh on. @@ -460,72 +438,21 @@ static void scsi_eh_done(struct scsi_cmnd *scmd) * Return value: * SUCCESS or FAILED or NEEDS_RETRY **/ -static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, - int cmnd_size, int timeout, int copy_sense) +static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout) { struct scsi_device *sdev = scmd->device; struct Scsi_Host *shost = sdev->host; - int old_result = scmd->result; - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); unsigned long timeleft; unsigned long flags; - unsigned char old_cmnd[MAX_COMMAND_SIZE]; - enum dma_data_direction old_data_direction; - unsigned short old_use_sg; - unsigned char old_cmd_len; - unsigned old_bufflen; - void *old_buffer; int rtn; - /* - * We need saved copies of a number of fields - this is because - * error handling may need to overwrite these with different values - * to run different commands, and once error handling is complete, - * we will need to restore these values prior to running the actual - * command. - */ - old_buffer = scmd->request_buffer; - old_bufflen = scmd->request_bufflen; - memcpy(old_cmnd, scmd->cmnd, sizeof(scmd->cmnd)); - old_data_direction = scmd->sc_data_direction; - old_cmd_len = scmd->cmd_len; - old_use_sg = scmd->use_sg; - - memset(scmd->cmnd, 0, sizeof(scmd->cmnd)); - memcpy(scmd->cmnd, cmnd, cmnd_size); - - if (copy_sense) { - int gfp_mask = GFP_ATOMIC; - - if (shost->hostt->unchecked_isa_dma) - gfp_mask |= __GFP_DMA; - - scmd->sc_data_direction = DMA_FROM_DEVICE; - scmd->request_bufflen = 252; - scmd->request_buffer = kzalloc(scmd->request_bufflen, gfp_mask); - if (!scmd->request_buffer) - return FAILED; - } else { - scmd->request_buffer = NULL; - scmd->request_bufflen = 0; - scmd->sc_data_direction = DMA_NONE; - } - - scmd->underflow = 0; - scmd->use_sg = 0; - scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]); - if (sdev->scsi_level <= SCSI_2) scmd->cmnd[1] = (scmd->cmnd[1] & 0x1f) | (sdev->lun << 5 & 0xe0); - /* - * Zero the sense buffer. The scsi spec mandates that any - * untransferred sense data should be interpreted as being zero. - */ - memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); - shost->eh_action = &done; + scmd->request->rq_status = RQ_SCSI_BUSY; spin_lock_irqsave(shost->host_lock, flags); scsi_log_send(scmd); @@ -534,6 +461,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, timeleft = wait_for_completion_timeout(&done, timeout); + scmd->request->rq_status = RQ_SCSI_DONE; shost->eh_action = NULL; scsi_log_completion(scmd, SUCCESS); @@ -574,29 +502,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, rtn = FAILED; } - - /* - * Last chance to have valid sense data. - */ - if (copy_sense) { - if (!SCSI_SENSE_VALID(scmd)) { - memcpy(scmd->sense_buffer, scmd->request_buffer, - sizeof(scmd->sense_buffer)); - } - kfree(scmd->request_buffer); - } - - - /* - * Restore original data - */ - scmd->request_buffer = old_buffer; - scmd->request_bufflen = old_bufflen; - memcpy(scmd->cmnd, old_cmnd, sizeof(scmd->cmnd)); - scmd->sc_data_direction = old_data_direction; - scmd->cmd_len = old_cmd_len; - scmd->use_sg = old_use_sg; - scmd->result = old_result; return rtn; } @@ -612,9 +517,56 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, static int scsi_request_sense(struct scsi_cmnd *scmd) { static unsigned char generic_sense[6] = - {REQUEST_SENSE, 0, 0, 0, 252, 0}; + {REQUEST_SENSE, 0, 0, 0, 252, 0}; + unsigned char *scsi_result; + int saved_result; + int rtn; + + memcpy(scmd->cmnd, generic_sense, sizeof(generic_sense)); - return scsi_send_eh_cmnd(scmd, generic_sense, 6, SENSE_TIMEOUT, 1); + scsi_result = kmalloc(252, GFP_ATOMIC | ((scmd->device->host->hostt->unchecked_isa_dma) ? __GFP_DMA : 0)); + + + if (unlikely(!scsi_result)) { + printk(KERN_ERR "%s: cannot allocate scsi_result.\n", + __FUNCTION__); + return FAILED; + } + + /* + * zero the sense buffer. some host adapters automatically always + * request sense, so it is not a good idea that + * scmd->request_buffer and scmd->sense_buffer point to the same + * address (db). 0 is not a valid sense code. + */ + memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); + memset(scsi_result, 0, 252); + + saved_result = scmd->result; + scmd->request_buffer = scsi_result; + scmd->request_bufflen = 252; + scmd->use_sg = 0; + scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]); + scmd->sc_data_direction = DMA_FROM_DEVICE; + scmd->underflow = 0; + + rtn = scsi_send_eh_cmnd(scmd, SENSE_TIMEOUT); + + /* last chance to have valid sense data */ + if(!SCSI_SENSE_VALID(scmd)) { + memcpy(scmd->sense_buffer, scmd->request_buffer, + sizeof(scmd->sense_buffer)); + } + + kfree(scsi_result); + + /* + * when we eventually call scsi_finish, we really wish to complete + * the original request, so let's restore the original data. (db) + */ + scsi_setup_cmd_retry(scmd); + scmd->result = saved_result; + return rtn; } /** @@ -633,6 +585,12 @@ void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q) { scmd->device->host->host_failed--; scmd->eh_eflags = 0; + + /* + * set this back so that the upper level can correctly free up + * things. + */ + scsi_setup_cmd_retry(scmd); list_move_tail(&scmd->eh_entry, done_q); } EXPORT_SYMBOL(scsi_eh_finish_cmd); @@ -737,23 +695,47 @@ static int scsi_eh_tur(struct scsi_cmnd *scmd) { static unsigned char tur_command[6] = {TEST_UNIT_READY, 0, 0, 0, 0, 0}; int retry_cnt = 1, rtn; + int saved_result; retry_tur: - rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, SENSE_TIMEOUT, 0); + memcpy(scmd->cmnd, tur_command, sizeof(tur_command)); + /* + * zero the sense buffer. the scsi spec mandates that any + * untransferred sense data should be interpreted as being zero. + */ + memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); + + saved_result = scmd->result; + scmd->request_buffer = NULL; + scmd->request_bufflen = 0; + scmd->use_sg = 0; + scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]); + scmd->underflow = 0; + scmd->sc_data_direction = DMA_NONE; + + rtn = scsi_send_eh_cmnd(scmd, SENSE_TIMEOUT); + + /* + * when we eventually call scsi_finish, we really wish to complete + * the original request, so let's restore the original data. (db) + */ + scsi_setup_cmd_retry(scmd); + scmd->result = saved_result; + + /* + * hey, we are done. let's look to see what happened. + */ SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n", __FUNCTION__, scmd, rtn)); - - switch (rtn) { - case NEEDS_RETRY: + if (rtn == SUCCESS) + return 0; + else if (rtn == NEEDS_RETRY) { if (retry_cnt--) goto retry_tur; - /*FALLTHRU*/ - case SUCCESS: return 0; - default: - return 1; } + return 1; } /** @@ -835,16 +817,44 @@ static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd) static int scsi_eh_try_stu(struct scsi_cmnd *scmd) { static unsigned char stu_command[6] = {START_STOP, 0, 0, 0, 1, 0}; + int rtn; + int saved_result; - if (scmd->device->allow_restart) { - int rtn; + if (!scmd->device->allow_restart) + return 1; - rtn = scsi_send_eh_cmnd(scmd, stu_command, 6, - START_UNIT_TIMEOUT, 0); - if (rtn == SUCCESS) - return 0; - } + memcpy(scmd->cmnd, stu_command, sizeof(stu_command)); + + /* + * zero the sense buffer. the scsi spec mandates that any + * untransferred sense data should be interpreted as being zero. + */ + memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); + + saved_result = scmd->result; + scmd->request_buffer = NULL; + scmd->request_bufflen = 0; + scmd->use_sg = 0; + scmd->cmd_len = COMMAND_SIZE(scmd->cmnd[0]); + scmd->underflow = 0; + scmd->sc_data_direction = DMA_NONE; + + rtn = scsi_send_eh_cmnd(scmd, START_UNIT_TIMEOUT); + /* + * when we eventually call scsi_finish, we really wish to complete + * the original request, so let's restore the original data. (db) + */ + scsi_setup_cmd_retry(scmd); + scmd->result = saved_result; + + /* + * hey, we are done. let's look to see what happened. + */ + SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n", + __FUNCTION__, scmd, rtn)); + if (rtn == SUCCESS) + return 0; return 1; } @@ -1507,7 +1517,7 @@ int scsi_error_handler(void *data) */ set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { - if ((shost->host_failed == 0 && shost->host_eh_scheduled == 0) || + if (shost->host_failed == 0 || shost->host_failed != shost->host_busy) { SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d sleeping\n", @@ -1642,24 +1652,27 @@ int scsi_reset_provider(struct scsi_device *dev, int flag) { struct scsi_cmnd *scmd = scsi_get_command(dev, GFP_KERNEL); - struct Scsi_Host *shost = dev->host; struct request req; - unsigned long flags; int rtn; scmd->request = &req; memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout)); + scmd->request->rq_status = RQ_SCSI_BUSY; memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd)); scmd->scsi_done = scsi_reset_provider_done_command; scmd->done = NULL; + scmd->buffer = NULL; + scmd->bufflen = 0; scmd->request_buffer = NULL; scmd->request_bufflen = 0; scmd->cmd_len = 0; scmd->sc_data_direction = DMA_BIDIRECTIONAL; + scmd->sc_request = NULL; + scmd->sc_magic = SCSI_CMND_MAGIC; init_timer(&scmd->eh_timeout); @@ -1669,10 +1682,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag) */ scmd->pid = 0; - spin_lock_irqsave(shost->host_lock, flags); - shost->tmf_in_progress = 1; - spin_unlock_irqrestore(shost->host_lock, flags); - switch (flag) { case SCSI_TRY_RESET_DEVICE: rtn = scsi_try_bus_device_reset(scmd); @@ -1691,22 +1700,6 @@ scsi_reset_provider(struct scsi_device *dev, int flag) rtn = FAILED; } - spin_lock_irqsave(shost->host_lock, flags); - shost->tmf_in_progress = 0; - spin_unlock_irqrestore(shost->host_lock, flags); - - /* - * be sure to wake up anyone who was sleeping or had their queue - * suspended while we performed the TMF. - */ - SCSI_LOG_ERROR_RECOVERY(3, - printk("%s: waking up host to restart after TMF\n", - __FUNCTION__)); - - wake_up(&shost->host_wait); - - scsi_run_host_queues(shost); - scsi_next_command(scmd); return rtn; } @@ -1776,6 +1769,14 @@ int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, } EXPORT_SYMBOL(scsi_normalize_sense); +int scsi_request_normalize_sense(struct scsi_request *sreq, + struct scsi_sense_hdr *sshdr) +{ + return scsi_normalize_sense(sreq->sr_sense_buffer, + sizeof(sreq->sr_sense_buffer), sshdr); +} +EXPORT_SYMBOL(scsi_request_normalize_sense); + int scsi_command_normalize_sense(struct scsi_cmnd *cmd, struct scsi_sense_hdr *sshdr) { diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index 32293f451..46ababf31 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -15,11 +15,11 @@ #include #include -#include #include #include #include #include +#include #include #include diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 3031078f5..faee4757c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -19,18 +19,18 @@ #include #include -#include #include #include #include #include #include +#include #include "scsi_priv.h" #include "scsi_logging.h" -#define SG_MEMPOOL_NR ARRAY_SIZE(scsi_sg_pools) +#define SG_MEMPOOL_NR (sizeof(scsi_sg_pools)/sizeof(struct scsi_host_sg_pool)) #define SG_MEMPOOL_SIZE 32 struct scsi_host_sg_pool { @@ -83,7 +83,7 @@ static void scsi_unprep_request(struct request *req) struct scsi_cmnd *cmd = req->special; req->flags &= ~REQ_DONTPREP; - req->special = NULL; + req->special = (req->flags & REQ_SPECIAL) ? cmd->sc_request : NULL; scsi_put_command(cmd); } @@ -161,6 +161,72 @@ int scsi_queue_insert(struct scsi_cmnd *cmd, int reason) return 0; } +/* + * Function: scsi_do_req + * + * Purpose: Queue a SCSI request + * + * Arguments: sreq - command descriptor. + * cmnd - actual SCSI command to be performed. + * buffer - data buffer. + * bufflen - size of data buffer. + * done - completion function to be run. + * timeout - how long to let it run before timeout. + * retries - number of retries we allow. + * + * Lock status: No locks held upon entry. + * + * Returns: Nothing. + * + * Notes: This function is only used for queueing requests for things + * like ioctls and character device requests - this is because + * we essentially just inject a request into the queue for the + * device. + * + * In order to support the scsi_device_quiesce function, we + * now inject requests on the *head* of the device queue + * rather than the tail. + */ +void scsi_do_req(struct scsi_request *sreq, const void *cmnd, + void *buffer, unsigned bufflen, + void (*done)(struct scsi_cmnd *), + int timeout, int retries) +{ + /* + * If the upper level driver is reusing these things, then + * we should release the low-level block now. Another one will + * be allocated later when this request is getting queued. + */ + __scsi_release_request(sreq); + + /* + * Our own function scsi_done (which marks the host as not busy, + * disables the timeout counter, etc) will be called by us or by the + * scsi_hosts[host].queuecommand() function needs to also call + * the completion function for the high level driver. + */ + memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); + sreq->sr_bufflen = bufflen; + sreq->sr_buffer = buffer; + sreq->sr_allowed = retries; + sreq->sr_done = done; + sreq->sr_timeout_per_command = timeout; + + if (sreq->sr_cmd_len == 0) + sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); + + /* + * head injection *required* here otherwise quiesce won't work + * + * Because users of this function are apt to reuse requests with no + * modification, we have to sanitise the request flags here + */ + sreq->sr_request->flags &= ~REQ_DONTPREP; + blk_insert_request(sreq->sr_device->request_queue, sreq->sr_request, + 1, sreq); +} +EXPORT_SYMBOL(scsi_do_req); + /** * scsi_execute - insert request and wait for the result * @sdev: scsi device @@ -408,7 +474,6 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, goto free_req; req->cmd_len = cmd_len; - memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */ memcpy(req->cmd, cmd, req->cmd_len); req->sense = sioc->sense; req->sense_len = 0; @@ -437,16 +502,60 @@ EXPORT_SYMBOL_GPL(scsi_execute_async); * * Arguments: cmd - command that is ready to be queued. * + * Returns: Nothing + * * Notes: This function has the job of initializing a number of * fields related to error handling. Typically this will * be called once for each command, as required. */ -static void scsi_init_cmd_errh(struct scsi_cmnd *cmd) +static int scsi_init_cmd_errh(struct scsi_cmnd *cmd) { cmd->serial_number = 0; + memset(cmd->sense_buffer, 0, sizeof cmd->sense_buffer); + if (cmd->cmd_len == 0) cmd->cmd_len = COMMAND_SIZE(cmd->cmnd[0]); + + /* + * We need saved copies of a number of fields - this is because + * error handling may need to overwrite these with different values + * to run different commands, and once error handling is complete, + * we will need to restore these values prior to running the actual + * command. + */ + cmd->old_use_sg = cmd->use_sg; + cmd->old_cmd_len = cmd->cmd_len; + cmd->sc_old_data_direction = cmd->sc_data_direction; + cmd->old_underflow = cmd->underflow; + memcpy(cmd->data_cmnd, cmd->cmnd, sizeof(cmd->cmnd)); + cmd->buffer = cmd->request_buffer; + cmd->bufflen = cmd->request_bufflen; + + return 1; +} + +/* + * Function: scsi_setup_cmd_retry() + * + * Purpose: Restore the command state for a retry + * + * Arguments: cmd - command to be restored + * + * Returns: Nothing + * + * Notes: Immediately prior to retrying a command, we need + * to restore certain fields that we saved above. + */ +void scsi_setup_cmd_retry(struct scsi_cmnd *cmd) +{ + memcpy(cmd->cmnd, cmd->data_cmnd, sizeof(cmd->data_cmnd)); + cmd->request_buffer = cmd->buffer; + cmd->request_bufflen = cmd->bufflen; + cmd->use_sg = cmd->old_use_sg; + cmd->cmd_len = cmd->old_cmd_len; + cmd->sc_data_direction = cmd->sc_old_data_direction; + cmd->underflow = cmd->old_underflow; } void scsi_device_unbusy(struct scsi_device *sdev) @@ -457,7 +566,7 @@ void scsi_device_unbusy(struct scsi_device *sdev) spin_lock_irqsave(shost->host_lock, flags); shost->host_busy--; if (unlikely(scsi_host_in_recovery(shost) && - (shost->host_failed || shost->host_eh_scheduled))) + shost->host_failed)) scsi_eh_wakeup(shost); spin_unlock(shost->host_lock); spin_lock(sdev->request_queue->queue_lock); @@ -764,13 +873,22 @@ static void scsi_free_sgtable(struct scatterlist *sgl, int index) */ static void scsi_release_buffers(struct scsi_cmnd *cmd) { + struct request *req = cmd->request; + + /* + * Free up any indirection buffers we allocated for DMA purposes. + */ if (cmd->use_sg) scsi_free_sgtable(cmd->request_buffer, cmd->sglist_len); + else if (cmd->request_buffer != req->buffer) + kfree(cmd->request_buffer); /* * Zero these out. They now point to freed memory, and it is * dangerous to hang onto the pointers. */ + cmd->buffer = NULL; + cmd->bufflen = 0; cmd->request_buffer = NULL; cmd->request_bufflen = 0; } @@ -803,10 +921,11 @@ static void scsi_release_buffers(struct scsi_cmnd *cmd) * b) We can just use scsi_requeue_command() here. This would * be used if we just wanted to retry, for example. */ -void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) +void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes, + unsigned int block_bytes) { int result = cmd->result; - int this_count = cmd->request_bufflen; + int this_count = cmd->bufflen; request_queue_t *q = cmd->device->request_queue; struct request *req = cmd->request; int clear_errors = 1; @@ -814,14 +933,28 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) int sense_valid = 0; int sense_deferred = 0; - scsi_release_buffers(cmd); + /* + * Free up any indirection buffers we allocated for DMA purposes. + * For the case of a READ, we need to copy the data out of the + * bounce buffer and into the real buffer. + */ + if (cmd->use_sg) + scsi_free_sgtable(cmd->buffer, cmd->sglist_len); + else if (cmd->buffer != req->buffer) { + if (rq_data_dir(req) == READ) { + unsigned long flags; + char *to = bio_kmap_irq(req->bio, &flags); + memcpy(to, cmd->buffer, cmd->bufflen); + bio_kunmap_irq(to, &flags); + } + kfree(cmd->buffer); + } if (result) { sense_valid = scsi_command_normalize_sense(cmd, &sshdr); if (sense_valid) sense_deferred = scsi_sense_is_deferred(&sshdr); } - if (blk_pc_request(req)) { /* SG_IO ioctl from block level */ req->errors = result; if (result) { @@ -841,74 +974,100 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) req->data_len = cmd->resid; } + /* + * Zero these out. They now point to freed memory, and it is + * dangerous to hang onto the pointers. + */ + cmd->buffer = NULL; + cmd->bufflen = 0; + cmd->request_buffer = NULL; + cmd->request_bufflen = 0; + /* * Next deal with any sectors which we were able to correctly * handle. */ - SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, " - "%d bytes done.\n", - req->nr_sectors, good_bytes)); - SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg)); + if (good_bytes >= 0) { + SCSI_LOG_HLCOMPLETE(1, printk("%ld sectors total, %d bytes done.\n", + req->nr_sectors, good_bytes)); + SCSI_LOG_HLCOMPLETE(1, printk("use_sg is %d\n", cmd->use_sg)); - if (clear_errors) - req->errors = 0; - - /* A number of bytes were successfully read. If there - * are leftovers and there is some kind of error - * (result != 0), retry the rest. - */ - if (scsi_end_request(cmd, 1, good_bytes, result == 0) == NULL) - return; + if (clear_errors) + req->errors = 0; + /* + * If multiple sectors are requested in one buffer, then + * they will have been finished off by the first command. + * If not, then we have a multi-buffer command. + * + * If block_bytes != 0, it means we had a medium error + * of some sort, and that we want to mark some number of + * sectors as not uptodate. Thus we want to inhibit + * requeueing right here - we will requeue down below + * when we handle the bad sectors. + */ - /* good_bytes = 0, or (inclusive) there were leftovers and - * result = 0, so scsi_end_request couldn't retry. + /* + * If the command completed without error, then either + * finish off the rest of the command, or start a new one. + */ + if (scsi_end_request(cmd, 1, good_bytes, result == 0) == NULL) + return; + } + /* + * Now, if we were good little boys and girls, Santa left us a request + * sense buffer. We can extract information from this, so we + * can choose a block to remap, etc. */ if (sense_valid && !sense_deferred) { switch (sshdr.sense_key) { case UNIT_ATTENTION: if (cmd->device->removable) { - /* Detected disc change. Set a bit + /* detected disc change. set a bit * and quietly refuse further access. */ cmd->device->changed = 1; - scsi_end_request(cmd, 0, this_count, 1); + scsi_end_request(cmd, 0, + this_count, 1); return; } else { - /* Must have been a power glitch, or a - * bus reset. Could not have been a - * media change, so we just retry the - * request and see what happens. - */ + /* + * Must have been a power glitch, or a + * bus reset. Could not have been a + * media change, so we just retry the + * request and see what happens. + */ scsi_requeue_command(q, cmd); return; } break; case ILLEGAL_REQUEST: - /* If we had an ILLEGAL REQUEST returned, then - * we may have performed an unsupported - * command. The only thing this should be - * would be a ten byte read where only a six - * byte read was supported. Also, on a system - * where READ CAPACITY failed, we may have - * read past the end of the disk. - */ + /* + * If we had an ILLEGAL REQUEST returned, then we may + * have performed an unsupported command. The only + * thing this should be would be a ten byte read where + * only a six byte read was supported. Also, on a + * system where READ CAPACITY failed, we may have read + * past the end of the disk. + */ if ((cmd->device->use_10_for_rw && sshdr.asc == 0x20 && sshdr.ascq == 0x00) && (cmd->cmnd[0] == READ_10 || cmd->cmnd[0] == WRITE_10)) { cmd->device->use_10_for_rw = 0; - /* This will cause a retry with a - * 6-byte command. + /* + * This will cause a retry with a 6-byte + * command. */ scsi_requeue_command(q, cmd); - return; + result = 0; } else { scsi_end_request(cmd, 0, this_count, 1); return; } break; case NOT_READY: - /* If the device is in the process of becoming + /* + * If the device is in the process of becoming * ready, or has a temporary blockage, retry. */ if (sshdr.asc == 0x04) { @@ -928,7 +1087,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) } if (!(req->flags & REQ_QUIET)) { scmd_printk(KERN_INFO, cmd, - "Device not ready: "); + "Device not ready: "); scsi_print_sense_hdr("", &sshdr); } scsi_end_request(cmd, 0, this_count, 1); @@ -936,21 +1095,21 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) case VOLUME_OVERFLOW: if (!(req->flags & REQ_QUIET)) { scmd_printk(KERN_INFO, cmd, - "Volume overflow, CDB: "); - __scsi_print_command(cmd->cmnd); + "Volume overflow, CDB: "); + __scsi_print_command(cmd->data_cmnd); scsi_print_sense("", cmd); } - /* See SSC3rXX or current. */ - scsi_end_request(cmd, 0, this_count, 1); + scsi_end_request(cmd, 0, block_bytes, 1); return; default: break; } - } + } /* driver byte != 0 */ if (host_byte(result) == DID_RESET) { - /* Third party bus reset or reset for error recovery - * reasons. Just retry the request and see what - * happens. + /* + * Third party bus reset or reset for error + * recovery reasons. Just retry the request + * and see what happens. */ scsi_requeue_command(q, cmd); return; @@ -958,13 +1117,21 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) if (result) { if (!(req->flags & REQ_QUIET)) { scmd_printk(KERN_INFO, cmd, - "SCSI error: return code = 0x%08x\n", - result); + "SCSI error: return code = 0x%x\n", result); + if (driver_byte(result) & DRIVER_SENSE) scsi_print_sense("", cmd); } + /* + * Mark a single buffer as not uptodate. Queue the remainder. + * We sometimes get this cruft in the event that a medium error + * isn't properly reported. + */ + block_bytes = req->hard_cur_sectors << 9; + if (!block_bytes) + block_bytes = req->data_len; + scsi_end_request(cmd, 0, block_bytes, 1); } - scsi_end_request(cmd, 0, this_count, !result); } EXPORT_SYMBOL(scsi_io_completion); @@ -1068,7 +1235,7 @@ static void scsi_blk_pc_done(struct scsi_cmnd *cmd) * successfully. Since this is a REQ_BLOCK_PC command the * caller should check the request's errors value */ - scsi_io_completion(cmd, cmd->request_bufflen); + scsi_io_completion(cmd, cmd->bufflen, 0); } static void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd) @@ -1133,7 +1300,15 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) * at request->cmd, as this tells us the real story. */ if (req->flags & REQ_SPECIAL && req->special) { - cmd = req->special; + struct scsi_request *sreq = req->special; + + if (sreq->sr_magic == SCSI_REQ_MAGIC) { + cmd = scsi_get_command(sreq->sr_device, GFP_ATOMIC); + if (unlikely(!cmd)) + goto defer; + scsi_init_cmd_from_req(cmd, sreq); + } else + cmd = req->special; } else if (req->flags & (REQ_CMD | REQ_BLOCK_PC)) { if(unlikely(specials_only) && !(req->flags & REQ_SPECIAL)) { @@ -1949,7 +2124,6 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) switch (oldstate) { case SDEV_CREATED: case SDEV_RUNNING: - case SDEV_QUIESCE: case SDEV_OFFLINE: case SDEV_BLOCK: break; @@ -1960,9 +2134,6 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) case SDEV_DEL: switch (oldstate) { - case SDEV_CREATED: - case SDEV_RUNNING: - case SDEV_OFFLINE: case SDEV_CANCEL: break; default: @@ -2192,61 +2363,3 @@ scsi_target_unblock(struct device *dev) device_for_each_child(dev, NULL, target_unblock); } EXPORT_SYMBOL_GPL(scsi_target_unblock); - -/** - * scsi_kmap_atomic_sg - find and atomically map an sg-elemnt - * @sg: scatter-gather list - * @sg_count: number of segments in sg - * @offset: offset in bytes into sg, on return offset into the mapped area - * @len: bytes to map, on return number of bytes mapped - * - * Returns virtual address of the start of the mapped page - */ -void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, - size_t *offset, size_t *len) -{ - int i; - size_t sg_len = 0, len_complete = 0; - struct page *page; - - for (i = 0; i < sg_count; i++) { - len_complete = sg_len; /* Complete sg-entries */ - sg_len += sg[i].length; - if (sg_len > *offset) - break; - } - - if (unlikely(i == sg_count)) { - printk(KERN_ERR "%s: Bytes in sg: %zu, requested offset %zu, " - "elements %d\n", - __FUNCTION__, sg_len, *offset, sg_count); - WARN_ON(1); - return NULL; - } - - /* Offset starting from the beginning of first page in this sg-entry */ - *offset = *offset - len_complete + sg[i].offset; - - /* Assumption: contiguous pages can be accessed as "page + i" */ - page = nth_page(sg[i].page, (*offset >> PAGE_SHIFT)); - *offset &= ~PAGE_MASK; - - /* Bytes in this sg-entry from *offset to the end of the page */ - sg_len = PAGE_SIZE - *offset; - if (*len > sg_len) - *len = sg_len; - - return kmap_atomic(page, KM_BIO_SRC_IRQ); -} -EXPORT_SYMBOL(scsi_kmap_atomic_sg); - -/** - * scsi_kunmap_atomic_sg - atomically unmap a virtual address, previously - * mapped with scsi_kmap_atomic_sg - * @virt: virtual address to be unmapped - */ -void scsi_kunmap_atomic_sg(void *virt) -{ - kunmap_atomic(virt, KM_BIO_SRC_IRQ); -} -EXPORT_SYMBOL(scsi_kunmap_atomic_sg); diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h index 1f65139e1..e1722ba94 100644 --- a/drivers/scsi/scsi_logging.h +++ b/drivers/scsi/scsi_logging.h @@ -1,6 +1,7 @@ #ifndef _SCSI_LOGGING_H #define _SCSI_LOGGING_H +#include /* * This defines the scsi logging feature. It is a means by which the user @@ -44,12 +45,10 @@ extern unsigned int scsi_logging_level; ((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1)) #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \ -do { \ +{ \ if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \ - do { \ - CMD; \ - } while (0); \ -} while (0) + (CMD); \ +} #else #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) #endif /* CONFIG_SCSI_LOGGING */ diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index ae24c85aa..27c48274e 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -1,15 +1,23 @@ #ifndef _SCSI_PRIV_H #define _SCSI_PRIV_H +#include #include struct request_queue; struct scsi_cmnd; struct scsi_device; struct scsi_host_template; +struct scsi_request; struct Scsi_Host; +/* + * Magic values for certain scsi structs. Shouldn't ever be used. + */ +#define SCSI_CMND_MAGIC 0xE25C23A5 +#define SCSI_REQ_MAGIC 0x75F6D354 + /* * Scsi Error Handler Flags */ @@ -26,6 +34,9 @@ extern void scsi_exit_hosts(void); extern int scsi_dispatch_cmd(struct scsi_cmnd *cmd); extern int scsi_setup_command_freelist(struct Scsi_Host *shost); extern void scsi_destroy_command_freelist(struct Scsi_Host *shost); +extern void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, + struct scsi_request *sreq); +extern void __scsi_release_request(struct scsi_request *sreq); extern void __scsi_done(struct scsi_cmnd *cmd); extern int scsi_retry_command(struct scsi_cmnd *cmd); #ifdef CONFIG_SCSI_LOGGING @@ -57,6 +68,7 @@ extern int scsi_eh_scmd_add(struct scsi_cmnd *, int); /* scsi_lib.c */ extern int scsi_maybe_unblock_host(struct scsi_device *sdev); +extern void scsi_setup_cmd_retry(struct scsi_cmnd *cmd); extern void scsi_device_unbusy(struct scsi_device *sdev); extern int scsi_queue_insert(struct scsi_cmnd *cmd, int reason); extern void scsi_next_command(struct scsi_cmnd *cmd); @@ -115,7 +127,7 @@ extern struct bus_type scsi_bus_type; * classes. */ -#define SCSI_DEVICE_BLOCK_MAX_TIMEOUT 600 /* units in seconds */ +#define SCSI_DEVICE_BLOCK_MAX_TIMEOUT (HZ*60) extern int scsi_internal_device_block(struct scsi_device *sdev); extern int scsi_internal_device_unblock(struct scsi_device *sdev); diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 55200e4fd..07be62bba 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -266,6 +266,8 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, lun = simple_strtoul(p + 1, &p, 0); err = scsi_add_single_device(host, channel, id, lun); + if (err >= 0) + err = length; /* * Usage: echo "scsi remove-single-device 0 1 2 3" >/proc/scsi/scsi @@ -282,13 +284,6 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf, err = scsi_remove_single_device(host, channel, id, lun); } - /* - * convert success returns so that we return the - * number of bytes consumed. - */ - if (!err) - err = length; - out: free_page((unsigned long)buffer); return err; diff --git a/drivers/scsi/scsi_sas_internal.h b/drivers/scsi/scsi_sas_internal.h index e1edab45a..d76e6e3d8 100644 --- a/drivers/scsi/scsi_sas_internal.h +++ b/drivers/scsi/scsi_sas_internal.h @@ -2,8 +2,7 @@ #define _SCSI_SAS_INTERNAL_H #define SAS_HOST_ATTRS 0 -#define SAS_PHY_ATTRS 17 -#define SAS_PORT_ATTRS 1 +#define SAS_PORT_ATTRS 17 #define SAS_RPORT_ATTRS 7 #define SAS_END_DEV_ATTRS 3 #define SAS_EXPANDER_ATTRS 7 @@ -14,14 +13,12 @@ struct sas_internal { struct sas_domain_function_template *dft; struct class_device_attribute private_host_attrs[SAS_HOST_ATTRS]; - struct class_device_attribute private_phy_attrs[SAS_PHY_ATTRS]; - struct class_device_attribute private_port_attrs[SAS_PORT_ATTRS]; + struct class_device_attribute private_phy_attrs[SAS_PORT_ATTRS]; struct class_device_attribute private_rphy_attrs[SAS_RPORT_ATTRS]; struct class_device_attribute private_end_dev_attrs[SAS_END_DEV_ATTRS]; struct class_device_attribute private_expander_attrs[SAS_EXPANDER_ATTRS]; struct transport_container phy_attr_cont; - struct transport_container port_attr_cont; struct transport_container rphy_attr_cont; struct transport_container end_dev_attr_cont; struct transport_container expander_attr_cont; @@ -31,8 +28,7 @@ struct sas_internal { * needed by scsi_sysfs.c */ struct class_device_attribute *host_attrs[SAS_HOST_ATTRS + 1]; - struct class_device_attribute *phy_attrs[SAS_PHY_ATTRS + 1]; - struct class_device_attribute *port_attrs[SAS_PORT_ATTRS + 1]; + struct class_device_attribute *phy_attrs[SAS_PORT_ATTRS + 1]; struct class_device_attribute *rphy_attrs[SAS_RPORT_ATTRS + 1]; struct class_device_attribute *end_dev_attrs[SAS_END_DEV_ATTRS + 1]; struct class_device_attribute *expander_attrs[SAS_EXPANDER_ATTRS + 1]; diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 1bd92b9b4..1a5474bd1 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -25,6 +25,7 @@ * or a LUN is seen that cannot have a device attached to it. */ +#include #include #include #include @@ -32,11 +33,11 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -809,39 +810,12 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) static inline void scsi_destroy_sdev(struct scsi_device *sdev) { - scsi_device_set_state(sdev, SDEV_DEL); if (sdev->host->hostt->slave_destroy) sdev->host->hostt->slave_destroy(sdev); transport_destroy_device(&sdev->sdev_gendev); put_device(&sdev->sdev_gendev); } -#ifdef CONFIG_SCSI_LOGGING -/** - * scsi_inq_str - print INQUIRY data from min to max index, - * strip trailing whitespace - * @buf: Output buffer with at least end-first+1 bytes of space - * @inq: Inquiry buffer (input) - * @first: Offset of string into inq - * @end: Index after last character in inq - */ -static unsigned char *scsi_inq_str(unsigned char *buf, unsigned char *inq, - unsigned first, unsigned end) -{ - unsigned term = 0, idx; - - for (idx = 0; idx + first < end && idx + first < inq[4] + 5; idx++) { - if (inq[idx+first] > ' ') { - buf[idx] = inq[idx+first]; - term = idx+1; - } else { - buf[idx] = ' '; - } - } - buf[term] = 0; - return buf; -} -#endif /** * scsi_probe_and_add_lun - probe a LUN, if a LUN is found add it @@ -906,12 +880,10 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, if (scsi_probe_lun(sdev, result, result_len, &bflags)) goto out_free_result; - if (bflagsp) - *bflagsp = bflags; /* * result contains valid SCSI INQUIRY data. */ - if (((result[0] >> 5) == 3) && !(bflags & BLIST_ATTACH_PQ3)) { + if ((result[0] >> 5) == 3) { /* * For a Peripheral qualifier 3 (011b), the SCSI * spec says: The device server is not capable of @@ -922,22 +894,9 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, * logical disk configured at sdev->lun, but there * is a target id responding. */ - SCSI_LOG_SCAN_BUS(2, sdev_printk(KERN_INFO, sdev, "scsi scan:" - " peripheral qualifier of 3, device not" - " added\n")) - if (lun == 0) { - SCSI_LOG_SCAN_BUS(1, { - unsigned char vend[9]; - unsigned char mod[17]; - - sdev_printk(KERN_INFO, sdev, - "scsi scan: consider passing scsi_mod." - "dev_flags=%s:%s:0x240 or 0x800240\n", - scsi_inq_str(vend, result, 8, 16), - scsi_inq_str(mod, result, 16, 32)); - }); - } - + SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO + "scsi scan: peripheral qualifier of 3," + " no device added\n")); res = SCSI_SCAN_TARGET_PRESENT; goto out_free_result; } @@ -961,6 +920,8 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, sdev->lockable = 0; scsi_unlock_floptical(sdev, result); } + if (bflagsp) + *bflagsp = bflags; } out_free_result: @@ -985,6 +946,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, * scsi_sequential_lun_scan - sequentially scan a SCSI target * @starget: pointer to target structure to scan * @bflags: black/white list flag for LUN 0 + * @lun0_res: result of scanning LUN 0 * * Description: * Generally, scan from LUN 1 (LUN 0 is assumed to already have been @@ -994,7 +956,8 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, * Modifies sdevscan->lun. **/ static void scsi_sequential_lun_scan(struct scsi_target *starget, - int bflags, int scsi_level, int rescan) + int bflags, int lun0_res, int scsi_level, + int rescan) { unsigned int sparse_lun, lun, max_dev_lun; struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); @@ -1014,6 +977,13 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget, } else sparse_lun = 0; + /* + * If not sparse lun and no device attached at LUN 0 do not scan + * any further. + */ + if (!sparse_lun && (lun0_res != SCSI_SCAN_LUN_PRESENT)) + return; + /* * If less than SCSI_1_CSS, and no special lun scaning, stop * scanning; this matches 2.4 behaviour, but could just be a bug @@ -1425,7 +1395,7 @@ static void __scsi_scan_target(struct device *parent, unsigned int channel, * do a sequential scan. */ scsi_sequential_lun_scan(starget, bflags, - starget->scsi_level, rescan); + res, starget->scsi_level, rescan); } out_reap: @@ -1503,7 +1473,7 @@ int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel, __FUNCTION__, channel, id, lun)); if (((channel != SCAN_WILD_CARD) && (channel > shost->max_channel)) || - ((id != SCAN_WILD_CARD) && (id >= shost->max_id)) || + ((id != SCAN_WILD_CARD) && (id > shost->max_id)) || ((lun != SCAN_WILD_CARD) && (lun > shost->max_lun))) return -EINVAL; diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index e7fe565b9..a6fde5294 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -6,6 +6,7 @@ * Created to pull SCSI mid layer sysfs routines into one file. */ +#include #include #include #include @@ -38,7 +39,7 @@ const char *scsi_device_state_name(enum scsi_device_state state) int i; char *name = NULL; - for (i = 0; i < ARRAY_SIZE(sdev_states); i++) { + for (i = 0; i < sizeof(sdev_states)/sizeof(sdev_states[0]); i++) { if (sdev_states[i].value == state) { name = sdev_states[i].name; break; @@ -64,7 +65,7 @@ const char *scsi_host_state_name(enum scsi_host_state state) int i; char *name = NULL; - for (i = 0; i < ARRAY_SIZE(shost_states); i++) { + for (i = 0; i < sizeof(shost_states)/sizeof(shost_states[0]); i++) { if (shost_states[i].value == state) { name = shost_states[i].name; break; @@ -159,7 +160,7 @@ store_shost_state(struct class_device *class_dev, const char *buf, size_t count) struct Scsi_Host *shost = class_to_shost(class_dev); enum scsi_host_state state = 0; - for (i = 0; i < ARRAY_SIZE(shost_states); i++) { + for (i = 0; i < sizeof(shost_states)/sizeof(shost_states[0]); i++) { const int len = strlen(shost_states[i].name); if (strncmp(shost_states[i].name, buf, len) == 0 && buf[len] == '\n') { @@ -465,7 +466,7 @@ store_state_field(struct device *dev, struct device_attribute *attr, const char struct scsi_device *sdev = to_scsi_device(dev); enum scsi_device_state state = 0; - for (i = 0; i < ARRAY_SIZE(sdev_states); i++) { + for (i = 0; i < sizeof(sdev_states)/sizeof(sdev_states[0]); i++) { const int len = strlen(sdev_states[i].name); if (strncmp(sdev_states[i].name, buf, len) == 0 && buf[len] == '\n') { diff --git a/drivers/scsi/scsi_transport_api.h b/drivers/scsi/scsi_transport_api.h deleted file mode 100644 index 934f0e62b..000000000 --- a/drivers/scsi/scsi_transport_api.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _SCSI_TRANSPORT_API_H -#define _SCSI_TRANSPORT_API_H - -void scsi_schedule_eh(struct Scsi_Host *shost); - -#endif /* _SCSI_TRANSPORT_API_H */ diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index b03aa8510..95c5478dc 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -50,7 +50,7 @@ static const char *get_fc_##title##_name(enum table_type table_key) \ int i; \ char *name = NULL; \ \ - for (i = 0; i < ARRAY_SIZE(table); i++) { \ + for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) { \ if (table[i].value == table_key) { \ name = table[i].name; \ break; \ @@ -65,7 +65,7 @@ static int get_fc_##title##_match(const char *table_key, \ { \ int i; \ \ - for (i = 0; i < ARRAY_SIZE(table); i++) { \ + for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) { \ if (strncmp(table_key, table[i].name, \ table[i].matchlen) == 0) { \ *value = table[i].value; \ @@ -140,7 +140,7 @@ get_fc_##title##_names(u32 table_key, char *buf) \ ssize_t len = 0; \ int i; \ \ - for (i = 0; i < ARRAY_SIZE(table); i++) { \ + for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) { \ if (table[i].value & table_key) { \ len += sprintf(buf + len, "%s%s", \ prefix, table[i].name); \ @@ -368,7 +368,7 @@ static DECLARE_TRANSPORT_CLASS(fc_rport_class, * should insulate the loss of a remote port. * The maximum will be capped by the value of SCSI_DEVICE_BLOCK_MAX_TIMEOUT. */ -static unsigned int fc_dev_loss_tmo = 60; /* seconds */ +static unsigned int fc_dev_loss_tmo = SCSI_DEVICE_BLOCK_MAX_TIMEOUT; module_param_named(dev_loss_tmo, fc_dev_loss_tmo, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(dev_loss_tmo, @@ -1284,9 +1284,7 @@ EXPORT_SYMBOL(fc_release_transport); * @work: Work to queue for execution. * * Return value: - * 1 - work queued for execution - * 0 - work is already queued - * -EINVAL - work queue doesn't exist + * 0 on success / != 0 for error **/ static int fc_queue_work(struct Scsi_Host *shost, struct work_struct *work) @@ -1436,6 +1434,8 @@ fc_starget_delete(void *data) struct Scsi_Host *shost = rport_to_shost(rport); unsigned long flags; + scsi_target_unblock(&rport->dev); + spin_lock_irqsave(shost->host_lock, flags); if (rport->flags & FC_RPORT_DEVLOSS_PENDING) { spin_unlock_irqrestore(shost->host_lock, flags); @@ -1476,8 +1476,7 @@ fc_rport_final_delete(void *data) transport_remove_device(dev); device_del(dev); transport_destroy_device(dev); - put_device(&shost->shost_gendev); /* for fc_host->rport list */ - put_device(dev); /* for self-reference */ + put_device(&shost->shost_gendev); } @@ -1538,13 +1537,13 @@ fc_rport_create(struct Scsi_Host *shost, int channel, else rport->scsi_target_id = -1; list_add_tail(&rport->peers, &fc_host->rports); - get_device(&shost->shost_gendev); /* for fc_host->rport list */ + get_device(&shost->shost_gendev); spin_unlock_irqrestore(shost->host_lock, flags); dev = &rport->dev; - device_initialize(dev); /* takes self reference */ - dev->parent = get_device(&shost->shost_gendev); /* parent reference */ + device_initialize(dev); + dev->parent = get_device(&shost->shost_gendev); dev->release = fc_rport_dev_release; sprintf(dev->bus_id, "rport-%d:%d-%d", shost->host_no, channel, rport->number); @@ -1568,9 +1567,10 @@ fc_rport_create(struct Scsi_Host *shost, int channel, delete_rport: transport_destroy_device(dev); + put_device(dev->parent); spin_lock_irqsave(shost->host_lock, flags); list_del(&rport->peers); - put_device(&shost->shost_gendev); /* for fc_host->rport list */ + put_device(&shost->shost_gendev); spin_unlock_irqrestore(shost->host_lock, flags); put_device(dev->parent); kfree(rport); @@ -1707,8 +1707,6 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel, spin_unlock_irqrestore(shost->host_lock, flags); - scsi_target_unblock(&rport->dev); - return rport; } } @@ -1764,10 +1762,9 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel, /* initiate a scan of the target */ rport->flags |= FC_RPORT_SCAN_PENDING; scsi_queue_work(shost, &rport->scan_work); - spin_unlock_irqrestore(shost->host_lock, flags); - scsi_target_unblock(&rport->dev); - } else - spin_unlock_irqrestore(shost->host_lock, flags); + } + + spin_unlock_irqrestore(shost->host_lock, flags); return rport; } @@ -1941,7 +1938,6 @@ fc_remote_port_rolechg(struct fc_rport *rport, u32 roles) rport->flags |= FC_RPORT_SCAN_PENDING; scsi_queue_work(shost, &rport->scan_work); spin_unlock_irqrestore(shost->host_lock, flags); - scsi_target_unblock(&rport->dev); } } EXPORT_SYMBOL(fc_remote_port_rolechg); @@ -1974,9 +1970,8 @@ fc_timeout_deleted_rport(void *data) dev_printk(KERN_ERR, &rport->dev, "blocked FC remote port time out: no longer" " a FCP target, removing starget\n"); - spin_unlock_irqrestore(shost->host_lock, flags); - scsi_target_unblock(&rport->dev); fc_queue_work(shost, &rport->stgt_delete_work); + spin_unlock_irqrestore(shost->host_lock, flags); return; } @@ -2040,15 +2035,17 @@ fc_timeout_deleted_rport(void *data) * went away and didn't come back - we'll remove * all attached scsi devices. */ - spin_unlock_irqrestore(shost->host_lock, flags); - - scsi_target_unblock(&rport->dev); fc_queue_work(shost, &rport->stgt_delete_work); + + spin_unlock_irqrestore(shost->host_lock, flags); } /** * fc_scsi_scan_rport - called to perform a scsi scan on a remote port. * + * Will unblock the target (in case it went away and has now come back), + * then invoke a scan. + * * @data: remote port to be scanned. **/ static void @@ -2060,6 +2057,7 @@ fc_scsi_scan_rport(void *data) if ((rport->port_state == FC_PORTSTATE_ONLINE) && (rport->roles & FC_RPORT_ROLE_FCP_TARGET)) { + scsi_target_unblock(&rport->dev); scsi_scan_target(&rport->dev, rport->channel, rport->scsi_target_id, SCAN_WILD_CARD, 1); } diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 2ecd14188..2730d507e 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -31,27 +31,31 @@ #include #include -#define ISCSI_SESSION_ATTRS 11 -#define ISCSI_CONN_ATTRS 11 -#define ISCSI_HOST_ATTRS 0 -#define ISCSI_TRANSPORT_VERSION "1.1-646" +#define ISCSI_SESSION_ATTRS 8 +#define ISCSI_CONN_ATTRS 6 struct iscsi_internal { - int daemon_pid; struct scsi_transport_template t; struct iscsi_transport *iscsi_transport; struct list_head list; - struct class_device cdev; + /* + * based on transport capabilities, at register time we set these + * bits to tell the transport class it wants attributes displayed + * in sysfs or that it can support different iSCSI Data-Path + * capabilities + */ + uint32_t param_mask; - struct class_device_attribute *host_attrs[ISCSI_HOST_ATTRS + 1]; + struct class_device cdev; + /* + * We do not have any private or other attrs. + */ struct transport_container conn_cont; struct class_device_attribute *conn_attrs[ISCSI_CONN_ATTRS + 1]; struct transport_container session_cont; struct class_device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1]; }; -static int iscsi_session_nr; /* sysfs session id for next new session */ - /* * list of registered transports and lock that must * be held while accessing list. The iscsi_transport_lock must @@ -116,24 +120,6 @@ static struct attribute_group iscsi_transport_group = { .attrs = iscsi_transport_attrs, }; -static int iscsi_setup_host(struct transport_container *tc, struct device *dev, - struct class_device *cdev) -{ - struct Scsi_Host *shost = dev_to_shost(dev); - struct iscsi_host *ihost = shost->shost_data; - - memset(ihost, 0, sizeof(*ihost)); - INIT_LIST_HEAD(&ihost->sessions); - mutex_init(&ihost->mutex); - return 0; -} - -static DECLARE_TRANSPORT_CLASS(iscsi_host_class, - "iscsi_host", - iscsi_setup_host, - NULL, - NULL); - static DECLARE_TRANSPORT_CLASS(iscsi_session_class, "iscsi_session", NULL, @@ -147,6 +133,7 @@ static DECLARE_TRANSPORT_CLASS(iscsi_connection_class, NULL); static struct sock *nls; +static int daemon_pid; static DEFINE_MUTEX(rx_queue_mutex); struct mempool_zone { @@ -178,23 +165,14 @@ static DEFINE_SPINLOCK(sesslock); static LIST_HEAD(connlist); static DEFINE_SPINLOCK(connlock); -static uint32_t iscsi_conn_get_sid(struct iscsi_cls_conn *conn) -{ - struct iscsi_cls_session *sess = iscsi_dev_to_session(conn->dev.parent); - return sess->sid; -} - -/* - * Returns the matching session to a given sid - */ -static struct iscsi_cls_session *iscsi_session_lookup(uint32_t sid) +static struct iscsi_cls_session *iscsi_session_lookup(uint64_t handle) { unsigned long flags; struct iscsi_cls_session *sess; spin_lock_irqsave(&sesslock, flags); list_for_each_entry(sess, &sesslist, sess_list) { - if (sess->sid == sid) { + if (sess == iscsi_ptr(handle)) { spin_unlock_irqrestore(&sesslock, flags); return sess; } @@ -203,17 +181,14 @@ static struct iscsi_cls_session *iscsi_session_lookup(uint32_t sid) return NULL; } -/* - * Returns the matching connection to a given sid / cid tuple - */ -static struct iscsi_cls_conn *iscsi_conn_lookup(uint32_t sid, uint32_t cid) +static struct iscsi_cls_conn *iscsi_conn_lookup(uint64_t handle) { unsigned long flags; struct iscsi_cls_conn *conn; spin_lock_irqsave(&connlock, flags); list_for_each_entry(conn, &connlist, conn_list) { - if ((conn->cid == cid) && (iscsi_conn_get_sid(conn) == sid)) { + if (conn == iscsi_ptr(handle)) { spin_unlock_irqrestore(&connlock, flags); return conn; } @@ -229,11 +204,13 @@ static struct iscsi_cls_conn *iscsi_conn_lookup(uint32_t sid, uint32_t cid) static void iscsi_session_release(struct device *dev) { struct iscsi_cls_session *session = iscsi_dev_to_session(dev); + struct iscsi_transport *transport = session->transport; struct Scsi_Host *shost; shost = iscsi_session_to_shost(session); scsi_host_put(shost); kfree(session); + module_put(transport->owner); } static int iscsi_is_session_dev(const struct device *dev) @@ -241,163 +218,50 @@ static int iscsi_is_session_dev(const struct device *dev) return dev->release == iscsi_session_release; } -static int iscsi_user_scan(struct Scsi_Host *shost, uint channel, - uint id, uint lun) -{ - struct iscsi_host *ihost = shost->shost_data; - struct iscsi_cls_session *session; - - mutex_lock(&ihost->mutex); - list_for_each_entry(session, &ihost->sessions, host_list) { - if ((channel == SCAN_WILD_CARD || channel == 0) && - (id == SCAN_WILD_CARD || id == session->target_id)) - scsi_scan_target(&session->dev, 0, - session->target_id, lun, 1); - } - mutex_unlock(&ihost->mutex); - - return 0; -} - -static void session_recovery_timedout(void *data) -{ - struct iscsi_cls_session *session = data; - - dev_printk(KERN_INFO, &session->dev, "iscsi: session recovery timed " - "out after %d secs\n", session->recovery_tmo); - - if (session->transport->session_recovery_timedout) - session->transport->session_recovery_timedout(session); - - scsi_target_unblock(&session->dev); -} - -void iscsi_unblock_session(struct iscsi_cls_session *session) -{ - if (!cancel_delayed_work(&session->recovery_work)) - flush_scheduled_work(); - scsi_target_unblock(&session->dev); -} -EXPORT_SYMBOL_GPL(iscsi_unblock_session); - -void iscsi_block_session(struct iscsi_cls_session *session) -{ - scsi_target_block(&session->dev); - schedule_delayed_work(&session->recovery_work, - session->recovery_tmo * HZ); -} -EXPORT_SYMBOL_GPL(iscsi_block_session); - +/** + * iscsi_create_session - create iscsi class session + * @shost: scsi host + * @transport: iscsi transport + * + * This can be called from a LLD or iscsi_transport + **/ struct iscsi_cls_session * -iscsi_alloc_session(struct Scsi_Host *shost, - struct iscsi_transport *transport) +iscsi_create_session(struct Scsi_Host *shost, struct iscsi_transport *transport) { struct iscsi_cls_session *session; + int err; - session = kzalloc(sizeof(*session) + transport->sessiondata_size, - GFP_KERNEL); - if (!session) + if (!try_module_get(transport->owner)) return NULL; + session = kzalloc(sizeof(*session), GFP_KERNEL); + if (!session) + goto module_put; session->transport = transport; - session->recovery_tmo = 120; - INIT_WORK(&session->recovery_work, session_recovery_timedout, session); - INIT_LIST_HEAD(&session->host_list); - INIT_LIST_HEAD(&session->sess_list); /* this is released in the dev's release function */ scsi_host_get(shost); + snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u", shost->host_no); session->dev.parent = &shost->shost_gendev; session->dev.release = iscsi_session_release; - device_initialize(&session->dev); - if (transport->sessiondata_size) - session->dd_data = &session[1]; - return session; -} -EXPORT_SYMBOL_GPL(iscsi_alloc_session); - -int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) -{ - struct Scsi_Host *shost = iscsi_session_to_shost(session); - struct iscsi_host *ihost; - int err; - - ihost = shost->shost_data; - session->sid = iscsi_session_nr++; - session->target_id = target_id; - - snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u", - session->sid); - err = device_add(&session->dev); + err = device_register(&session->dev); if (err) { dev_printk(KERN_ERR, &session->dev, "iscsi: could not " "register session's dev\n"); - goto release_host; + goto free_session; } transport_register_device(&session->dev); - mutex_lock(&ihost->mutex); - list_add(&session->host_list, &ihost->sessions); - mutex_unlock(&ihost->mutex); - return 0; - -release_host: - scsi_host_put(shost); - return err; -} -EXPORT_SYMBOL_GPL(iscsi_add_session); - -/** - * iscsi_create_session - create iscsi class session - * @shost: scsi host - * @transport: iscsi transport - * - * This can be called from a LLD or iscsi_transport. - **/ -struct iscsi_cls_session * -iscsi_create_session(struct Scsi_Host *shost, - struct iscsi_transport *transport, - unsigned int target_id) -{ - struct iscsi_cls_session *session; - - session = iscsi_alloc_session(shost, transport); - if (!session) - return NULL; - - if (iscsi_add_session(session, target_id)) { - iscsi_free_session(session); - return NULL; - } return session; -} -EXPORT_SYMBOL_GPL(iscsi_create_session); - -void iscsi_remove_session(struct iscsi_cls_session *session) -{ - struct Scsi_Host *shost = iscsi_session_to_shost(session); - struct iscsi_host *ihost = shost->shost_data; - - if (!cancel_delayed_work(&session->recovery_work)) - flush_scheduled_work(); - - mutex_lock(&ihost->mutex); - list_del(&session->host_list); - mutex_unlock(&ihost->mutex); - scsi_remove_target(&session->dev); - - transport_unregister_device(&session->dev); - device_del(&session->dev); -} -EXPORT_SYMBOL_GPL(iscsi_remove_session); - -void iscsi_free_session(struct iscsi_cls_session *session) -{ - put_device(&session->dev); +free_session: + kfree(session); +module_put: + module_put(transport->owner); + return NULL; } -EXPORT_SYMBOL_GPL(iscsi_free_session); +EXPORT_SYMBOL_GPL(iscsi_create_session); /** * iscsi_destroy_session - destroy iscsi session @@ -408,65 +272,18 @@ EXPORT_SYMBOL_GPL(iscsi_free_session); **/ int iscsi_destroy_session(struct iscsi_cls_session *session) { - iscsi_remove_session(session); - iscsi_free_session(session); + transport_unregister_device(&session->dev); + device_unregister(&session->dev); return 0; } -EXPORT_SYMBOL_GPL(iscsi_destroy_session); - -static void mempool_zone_destroy(struct mempool_zone *zp) -{ - mempool_destroy(zp->pool); - kfree(zp); -} - -static void* -mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data) -{ - struct mempool_zone *zone = pool_data; - return alloc_skb(zone->size, gfp_mask); -} - -static void -mempool_zone_free_skb(void *element, void *pool_data) -{ - kfree_skb(element); -} - -static struct mempool_zone * -mempool_zone_init(unsigned max, unsigned size, unsigned hiwat) -{ - struct mempool_zone *zp; - - zp = kzalloc(sizeof(*zp), GFP_KERNEL); - if (!zp) - return NULL; - - zp->size = size; - zp->hiwat = hiwat; - INIT_LIST_HEAD(&zp->freequeue); - spin_lock_init(&zp->freelock); - atomic_set(&zp->allocated, 0); - - zp->pool = mempool_create(max, mempool_zone_alloc_skb, - mempool_zone_free_skb, zp); - if (!zp->pool) { - kfree(zp); - return NULL; - } - - return zp; -} +EXPORT_SYMBOL_GPL(iscsi_destroy_session); static void iscsi_conn_release(struct device *dev) { struct iscsi_cls_conn *conn = iscsi_dev_to_conn(dev); struct device *parent = conn->dev.parent; - mempool_zone_destroy(conn->z_pdu); - mempool_zone_destroy(conn->z_error); - kfree(conn); put_device(parent); } @@ -476,31 +293,6 @@ static int iscsi_is_conn_dev(const struct device *dev) return dev->release == iscsi_conn_release; } -static int iscsi_create_event_pools(struct iscsi_cls_conn *conn) -{ - conn->z_pdu = mempool_zone_init(Z_MAX_PDU, - NLMSG_SPACE(sizeof(struct iscsi_uevent) + - sizeof(struct iscsi_hdr) + - DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH), - Z_HIWAT_PDU); - if (!conn->z_pdu) { - dev_printk(KERN_ERR, &conn->dev, "iscsi: can not allocate " - "pdu zone for new conn\n"); - return -ENOMEM; - } - - conn->z_error = mempool_zone_init(Z_MAX_ERROR, - NLMSG_SPACE(sizeof(struct iscsi_uevent)), - Z_HIWAT_ERROR); - if (!conn->z_error) { - dev_printk(KERN_ERR, &conn->dev, "iscsi: can not allocate " - "error zone for new conn\n"); - mempool_zone_destroy(conn->z_pdu); - return -ENOMEM; - } - return 0; -} - /** * iscsi_create_conn - create iscsi class connection * @session: iscsi cls session @@ -509,16 +301,12 @@ static int iscsi_create_event_pools(struct iscsi_cls_conn *conn) * This can be called from a LLD or iscsi_transport. The connection * is child of the session so cid must be unique for all connections * on the session. - * - * Since we do not support MCS, cid will normally be zero. In some cases - * for software iscsi we could be trying to preallocate a connection struct - * in which case there could be two connection structs and cid would be - * non-zero. **/ struct iscsi_cls_conn * iscsi_create_conn(struct iscsi_cls_session *session, uint32_t cid) { struct iscsi_transport *transport = session->transport; + struct Scsi_Host *shost = iscsi_session_to_shost(session); struct iscsi_cls_conn *conn; int err; @@ -531,17 +319,12 @@ iscsi_create_conn(struct iscsi_cls_session *session, uint32_t cid) INIT_LIST_HEAD(&conn->conn_list); conn->transport = transport; - conn->cid = cid; - - if (iscsi_create_event_pools(conn)) - goto free_conn; /* this is released in the dev's release function */ if (!get_device(&session->dev)) - goto free_conn_pools; - + goto free_conn; snprintf(conn->dev.bus_id, BUS_ID_SIZE, "connection%d:%u", - session->sid, cid); + shost->host_no, cid); conn->dev.parent = &session->dev; conn->dev.release = iscsi_conn_release; err = device_register(&conn->dev); @@ -555,8 +338,6 @@ iscsi_create_conn(struct iscsi_cls_session *session, uint32_t cid) release_parent_ref: put_device(&session->dev); -free_conn_pools: - free_conn: kfree(conn); return NULL; @@ -579,6 +360,105 @@ int iscsi_destroy_conn(struct iscsi_cls_conn *conn) EXPORT_SYMBOL_GPL(iscsi_destroy_conn); +/* + * These functions are used only by software iscsi_transports + * which do not allocate and more their scsi_hosts since this + * is initiated from userspace. + */ + +/* + * iSCSI Session's hostdata organization: + * + * *------------------* <== hostdata_session(host->hostdata) + * | ptr to class sess| + * |------------------| <== iscsi_hostdata(host->hostdata) + * | transport's data | + * *------------------* + */ + +#define hostdata_privsize(_t) (sizeof(unsigned long) + _t->hostdata_size + \ + _t->hostdata_size % sizeof(unsigned long)) + +#define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) + +/** + * iscsi_transport_create_session - create iscsi cls session and host + * scsit: scsi transport template + * transport: iscsi transport template + * + * This can be used by software iscsi_transports that allocate + * a session per scsi host. + **/ +struct Scsi_Host * +iscsi_transport_create_session(struct scsi_transport_template *scsit, + struct iscsi_transport *transport) +{ + struct iscsi_cls_session *session; + struct Scsi_Host *shost; + unsigned long flags; + + shost = scsi_host_alloc(transport->host_template, + hostdata_privsize(transport)); + if (!shost) { + printk(KERN_ERR "iscsi: can not allocate SCSI host for " + "session\n"); + return NULL; + } + + shost->max_id = 1; + shost->max_channel = 0; + shost->max_lun = transport->max_lun; + shost->max_cmd_len = transport->max_cmd_len; + shost->transportt = scsit; + shost->transportt->create_work_queue = 1; + + if (scsi_add_host(shost, NULL)) + goto free_host; + + session = iscsi_create_session(shost, transport); + if (!session) + goto remove_host; + + *(unsigned long*)shost->hostdata = (unsigned long)session; + spin_lock_irqsave(&sesslock, flags); + list_add(&session->sess_list, &sesslist); + spin_unlock_irqrestore(&sesslock, flags); + return shost; + +remove_host: + scsi_remove_host(shost); +free_host: + scsi_host_put(shost); + return NULL; +} + +EXPORT_SYMBOL_GPL(iscsi_transport_create_session); + +/** + * iscsi_transport_destroy_session - destroy session and scsi host + * shost: scsi host + * + * This can be used by software iscsi_transports that allocate + * a session per scsi host. + **/ +int iscsi_transport_destroy_session(struct Scsi_Host *shost) +{ + struct iscsi_cls_session *session; + unsigned long flags; + + scsi_remove_host(shost); + session = hostdata_session(shost->hostdata); + spin_lock_irqsave(&sesslock, flags); + list_del(&session->sess_list); + spin_unlock_irqrestore(&sesslock, flags); + iscsi_destroy_session(session); + /* ref from host alloc */ + scsi_host_put(shost); + return 0; +} + +EXPORT_SYMBOL_GPL(iscsi_transport_destroy_session); + /* * iscsi interface functions */ @@ -604,6 +484,20 @@ static inline struct list_head *skb_to_lh(struct sk_buff *skb) return (struct list_head *)&skb->cb; } +static void* +mempool_zone_alloc_skb(gfp_t gfp_mask, void *pool_data) +{ + struct mempool_zone *zone = pool_data; + + return alloc_skb(zone->size, gfp_mask); +} + +static void +mempool_zone_free_skb(void *element, void *pool_data) +{ + kfree_skb(element); +} + static void mempool_zone_complete(struct mempool_zone *zone) { @@ -623,6 +517,37 @@ mempool_zone_complete(struct mempool_zone *zone) spin_unlock_irqrestore(&zone->freelock, flags); } +static struct mempool_zone * +mempool_zone_init(unsigned max, unsigned size, unsigned hiwat) +{ + struct mempool_zone *zp; + + zp = kzalloc(sizeof(*zp), GFP_KERNEL); + if (!zp) + return NULL; + + zp->size = size; + zp->hiwat = hiwat; + INIT_LIST_HEAD(&zp->freequeue); + spin_lock_init(&zp->freelock); + atomic_set(&zp->allocated, 0); + + zp->pool = mempool_create(max, mempool_zone_alloc_skb, + mempool_zone_free_skb, zp); + if (!zp->pool) { + kfree(zp); + return NULL; + } + + return zp; +} + +static void mempool_zone_destroy(struct mempool_zone *zp) +{ + mempool_destroy(zp->pool); + kfree(zp); +} + static struct sk_buff* mempool_zone_get_skb(struct mempool_zone *zone) { @@ -635,34 +560,13 @@ mempool_zone_get_skb(struct mempool_zone *zone) } static int -iscsi_broadcast_skb(struct mempool_zone *zone, struct sk_buff *skb, gfp_t gfp) -{ - unsigned long flags; - int rc; - - skb_get(skb); - rc = netlink_broadcast(nls, skb, 0, 1, gfp); - if (rc < 0) { - mempool_free(skb, zone->pool); - printk(KERN_ERR "iscsi: can not broadcast skb (%d)\n", rc); - return rc; - } - - spin_lock_irqsave(&zone->freelock, flags); - INIT_LIST_HEAD(skb_to_lh(skb)); - list_add(skb_to_lh(skb), &zone->freequeue); - spin_unlock_irqrestore(&zone->freelock, flags); - return 0; -} - -static int -iscsi_unicast_skb(struct mempool_zone *zone, struct sk_buff *skb, int pid) +iscsi_unicast_skb(struct mempool_zone *zone, struct sk_buff *skb) { unsigned long flags; int rc; skb_get(skb); - rc = netlink_unicast(nls, skb, pid, MSG_DONTWAIT); + rc = netlink_unicast(nls, skb, daemon_pid, MSG_DONTWAIT); if (rc < 0) { mempool_free(skb, zone->pool); printk(KERN_ERR "iscsi: can not unicast skb (%d)\n", rc); @@ -670,7 +574,6 @@ iscsi_unicast_skb(struct mempool_zone *zone, struct sk_buff *skb, int pid) } spin_lock_irqsave(&zone->freelock, flags); - INIT_LIST_HEAD(skb_to_lh(skb)); list_add(skb_to_lh(skb), &zone->freequeue); spin_unlock_irqrestore(&zone->freelock, flags); @@ -684,14 +587,9 @@ int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, struct sk_buff *skb; struct iscsi_uevent *ev; char *pdu; - struct iscsi_internal *priv; int len = NLMSG_SPACE(sizeof(*ev) + sizeof(struct iscsi_hdr) + data_size); - priv = iscsi_if_transport_lookup(conn->transport); - if (!priv) - return -EINVAL; - mempool_zone_complete(conn->z_pdu); skb = mempool_zone_get_skb(conn->z_pdu); @@ -702,20 +600,19 @@ int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, return -ENOMEM; } - nlh = __nlmsg_put(skb, priv->daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); + nlh = __nlmsg_put(skb, daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); ev = NLMSG_DATA(nlh); memset(ev, 0, sizeof(*ev)); ev->transport_handle = iscsi_handle(conn->transport); ev->type = ISCSI_KEVENT_RECV_PDU; if (atomic_read(&conn->z_pdu->allocated) >= conn->z_pdu->hiwat) ev->iferror = -ENOMEM; - ev->r.recv_req.cid = conn->cid; - ev->r.recv_req.sid = iscsi_conn_get_sid(conn); + ev->r.recv_req.conn_handle = iscsi_handle(conn); pdu = (char*)ev + sizeof(*ev); memcpy(pdu, hdr, sizeof(struct iscsi_hdr)); memcpy(pdu + sizeof(struct iscsi_hdr), data, data_size); - return iscsi_unicast_skb(conn->z_pdu, skb, priv->daemon_pid); + return iscsi_unicast_skb(conn->z_pdu, skb); } EXPORT_SYMBOL_GPL(iscsi_recv_pdu); @@ -724,13 +621,8 @@ void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) struct nlmsghdr *nlh; struct sk_buff *skb; struct iscsi_uevent *ev; - struct iscsi_internal *priv; int len = NLMSG_SPACE(sizeof(*ev)); - priv = iscsi_if_transport_lookup(conn->transport); - if (!priv) - return; - mempool_zone_complete(conn->z_error); skb = mempool_zone_get_skb(conn->z_error); @@ -740,17 +632,16 @@ void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) return; } - nlh = __nlmsg_put(skb, priv->daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); + nlh = __nlmsg_put(skb, daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); ev = NLMSG_DATA(nlh); ev->transport_handle = iscsi_handle(conn->transport); ev->type = ISCSI_KEVENT_CONN_ERROR; if (atomic_read(&conn->z_error->allocated) >= conn->z_error->hiwat) ev->iferror = -ENOMEM; ev->r.connerror.error = error; - ev->r.connerror.cid = conn->cid; - ev->r.connerror.sid = iscsi_conn_get_sid(conn); + ev->r.connerror.conn_handle = iscsi_handle(conn); - iscsi_broadcast_skb(conn->z_error, skb, GFP_ATOMIC); + iscsi_unicast_skb(conn->z_error, skb); dev_printk(KERN_INFO, &conn->dev, "iscsi: detected conn error (%d)\n", error); @@ -780,7 +671,7 @@ iscsi_if_send_reply(int pid, int seq, int type, int done, int multi, nlh = __nlmsg_put(skb, pid, seq, t, (len - sizeof(*nlh)), 0); nlh->nlmsg_flags = flags; memcpy(NLMSG_DATA(nlh), payload, size); - return iscsi_unicast_skb(z_reply, skb, pid); + return iscsi_unicast_skb(z_reply, skb); } static int @@ -792,18 +683,13 @@ iscsi_if_get_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh) struct iscsi_cls_conn *conn; struct nlmsghdr *nlhstat; struct iscsi_uevent *evstat; - struct iscsi_internal *priv; int len = NLMSG_SPACE(sizeof(*ev) + sizeof(struct iscsi_stats) + sizeof(struct iscsi_stats_custom) * ISCSI_STATS_CUSTOM_MAX); int err = 0; - priv = iscsi_if_transport_lookup(transport); - if (!priv) - return -EINVAL; - - conn = iscsi_conn_lookup(ev->u.get_stats.sid, ev->u.get_stats.cid); + conn = iscsi_conn_lookup(ev->u.get_stats.conn_handle); if (!conn) return -EEXIST; @@ -819,7 +705,7 @@ iscsi_if_get_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh) return -ENOMEM; } - nlhstat = __nlmsg_put(skbstat, priv->daemon_pid, 0, 0, + nlhstat = __nlmsg_put(skbstat, daemon_pid, 0, 0, (len - sizeof(*nlhstat)), 0); evstat = NLMSG_DATA(nlhstat); memset(evstat, 0, sizeof(*evstat)); @@ -827,10 +713,8 @@ iscsi_if_get_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh) evstat->type = nlh->nlmsg_type; if (atomic_read(&conn->z_pdu->allocated) >= conn->z_pdu->hiwat) evstat->iferror = -ENOMEM; - evstat->u.get_stats.cid = - ev->u.get_stats.cid; - evstat->u.get_stats.sid = - ev->u.get_stats.sid; + evstat->u.get_stats.conn_handle = + ev->u.get_stats.conn_handle; stats = (struct iscsi_stats *) ((char*)evstat + sizeof(*evstat)); memset(stats, 0, sizeof(*stats)); @@ -845,157 +729,27 @@ iscsi_if_get_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh) skb_trim(skbstat, NLMSG_ALIGN(actual_size)); nlhstat->nlmsg_len = actual_size; - err = iscsi_unicast_skb(conn->z_pdu, skbstat, priv->daemon_pid); + err = iscsi_unicast_skb(conn->z_pdu, skbstat); } while (err < 0 && err != -ECONNREFUSED); return err; } -/** - * iscsi_if_destroy_session_done - send session destr. completion event - * @conn: last connection for session - * - * This is called by HW iscsi LLDs to notify userpsace that its HW has - * removed a session. - **/ -int iscsi_if_destroy_session_done(struct iscsi_cls_conn *conn) -{ - struct iscsi_internal *priv; - struct iscsi_cls_session *session; - struct Scsi_Host *shost; - struct iscsi_uevent *ev; - struct sk_buff *skb; - struct nlmsghdr *nlh; - unsigned long flags; - int rc, len = NLMSG_SPACE(sizeof(*ev)); - - priv = iscsi_if_transport_lookup(conn->transport); - if (!priv) - return -EINVAL; - - session = iscsi_dev_to_session(conn->dev.parent); - shost = iscsi_session_to_shost(session); - - mempool_zone_complete(conn->z_pdu); - - skb = mempool_zone_get_skb(conn->z_pdu); - if (!skb) { - dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " - "session creation event\n"); - return -ENOMEM; - } - - nlh = __nlmsg_put(skb, priv->daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); - ev = NLMSG_DATA(nlh); - ev->transport_handle = iscsi_handle(conn->transport); - ev->type = ISCSI_KEVENT_DESTROY_SESSION; - ev->r.d_session.host_no = shost->host_no; - ev->r.d_session.sid = session->sid; - - /* - * this will occur if the daemon is not up, so we just warn - * the user and when the daemon is restarted it will handle it - */ - rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); - if (rc < 0) - dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " - "session destruction event. Check iscsi daemon\n"); - - spin_lock_irqsave(&sesslock, flags); - list_del(&session->sess_list); - spin_unlock_irqrestore(&sesslock, flags); - - spin_lock_irqsave(&connlock, flags); - conn->active = 0; - list_del(&conn->conn_list); - spin_unlock_irqrestore(&connlock, flags); - - return rc; -} -EXPORT_SYMBOL_GPL(iscsi_if_destroy_session_done); - -/** - * iscsi_if_create_session_done - send session creation completion event - * @conn: leading connection for session - * - * This is called by HW iscsi LLDs to notify userpsace that its HW has - * created a session or a existing session is back in the logged in state. - **/ -int iscsi_if_create_session_done(struct iscsi_cls_conn *conn) -{ - struct iscsi_internal *priv; - struct iscsi_cls_session *session; - struct Scsi_Host *shost; - struct iscsi_uevent *ev; - struct sk_buff *skb; - struct nlmsghdr *nlh; - unsigned long flags; - int rc, len = NLMSG_SPACE(sizeof(*ev)); - - priv = iscsi_if_transport_lookup(conn->transport); - if (!priv) - return -EINVAL; - - session = iscsi_dev_to_session(conn->dev.parent); - shost = iscsi_session_to_shost(session); - - mempool_zone_complete(conn->z_pdu); - - skb = mempool_zone_get_skb(conn->z_pdu); - if (!skb) { - dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " - "session creation event\n"); - return -ENOMEM; - } - - nlh = __nlmsg_put(skb, priv->daemon_pid, 0, 0, (len - sizeof(*nlh)), 0); - ev = NLMSG_DATA(nlh); - ev->transport_handle = iscsi_handle(conn->transport); - ev->type = ISCSI_UEVENT_CREATE_SESSION; - ev->r.c_session_ret.host_no = shost->host_no; - ev->r.c_session_ret.sid = session->sid; - - /* - * this will occur if the daemon is not up, so we just warn - * the user and when the daemon is restarted it will handle it - */ - rc = iscsi_broadcast_skb(conn->z_pdu, skb, GFP_KERNEL); - if (rc < 0) - dev_printk(KERN_ERR, &conn->dev, "Cannot notify userspace of " - "session creation event. Check iscsi daemon\n"); - - spin_lock_irqsave(&sesslock, flags); - list_add(&session->sess_list, &sesslist); - spin_unlock_irqrestore(&sesslock, flags); - - spin_lock_irqsave(&connlock, flags); - list_add(&conn->conn_list, &connlist); - conn->active = 1; - spin_unlock_irqrestore(&connlock, flags); - return rc; -} -EXPORT_SYMBOL_GPL(iscsi_if_create_session_done); - static int iscsi_if_create_session(struct iscsi_internal *priv, struct iscsi_uevent *ev) { struct iscsi_transport *transport = priv->iscsi_transport; struct iscsi_cls_session *session; - unsigned long flags; - uint32_t hostno; + uint32_t sid; - session = transport->create_session(transport, &priv->t, + session = transport->create_session(&priv->t, ev->u.c_session.initial_cmdsn, - &hostno); + &sid); if (!session) return -ENOMEM; - spin_lock_irqsave(&sesslock, flags); - list_add(&session->sess_list, &sesslist); - spin_unlock_irqrestore(&sesslock, flags); - - ev->r.c_session_ret.host_no = hostno; - ev->r.c_session_ret.sid = session->sid; + ev->r.c_session_ret.session_handle = iscsi_handle(session); + ev->r.c_session_ret.sid = sid; return 0; } @@ -1006,23 +760,35 @@ iscsi_if_create_conn(struct iscsi_transport *transport, struct iscsi_uevent *ev) struct iscsi_cls_session *session; unsigned long flags; - session = iscsi_session_lookup(ev->u.c_conn.sid); - if (!session) { - printk(KERN_ERR "iscsi: invalid session %d\n", - ev->u.c_conn.sid); + session = iscsi_session_lookup(ev->u.c_conn.session_handle); + if (!session) return -EINVAL; - } conn = transport->create_conn(session, ev->u.c_conn.cid); - if (!conn) { - printk(KERN_ERR "iscsi: couldn't create a new " - "connection for session %d\n", - session->sid); + if (!conn) return -ENOMEM; + + conn->z_pdu = mempool_zone_init(Z_MAX_PDU, + NLMSG_SPACE(sizeof(struct iscsi_uevent) + + sizeof(struct iscsi_hdr) + + DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH), + Z_HIWAT_PDU); + if (!conn->z_pdu) { + dev_printk(KERN_ERR, &conn->dev, "iscsi: can not allocate " + "pdu zone for new conn\n"); + goto destroy_conn; + } + + conn->z_error = mempool_zone_init(Z_MAX_ERROR, + NLMSG_SPACE(sizeof(struct iscsi_uevent)), + Z_HIWAT_ERROR); + if (!conn->z_error) { + dev_printk(KERN_ERR, &conn->dev, "iscsi: can not allocate " + "error zone for new conn\n"); + goto free_pdu_pool; } - ev->r.c_conn_ret.sid = session->sid; - ev->r.c_conn_ret.cid = conn->cid; + ev->r.handle = iscsi_handle(conn); spin_lock_irqsave(&connlock, flags); list_add(&conn->conn_list, &connlist); @@ -1030,6 +796,13 @@ iscsi_if_create_conn(struct iscsi_transport *transport, struct iscsi_uevent *ev) spin_unlock_irqrestore(&connlock, flags); return 0; + +free_pdu_pool: + mempool_zone_destroy(conn->z_pdu); +destroy_conn: + if (transport->destroy_conn) + transport->destroy_conn(conn->dd_data); + return -ENOMEM; } static int @@ -1037,8 +810,9 @@ iscsi_if_destroy_conn(struct iscsi_transport *transport, struct iscsi_uevent *ev { unsigned long flags; struct iscsi_cls_conn *conn; + struct mempool_zone *z_error, *z_pdu; - conn = iscsi_conn_lookup(ev->u.d_conn.sid, ev->u.d_conn.cid); + conn = iscsi_conn_lookup(ev->u.d_conn.conn_handle); if (!conn) return -EINVAL; spin_lock_irqsave(&connlock, flags); @@ -1046,85 +820,16 @@ iscsi_if_destroy_conn(struct iscsi_transport *transport, struct iscsi_uevent *ev list_del(&conn->conn_list); spin_unlock_irqrestore(&connlock, flags); + z_pdu = conn->z_pdu; + z_error = conn->z_error; + if (transport->destroy_conn) transport->destroy_conn(conn); - return 0; -} - -static int -iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev) -{ - char *data = (char*)ev + sizeof(*ev); - struct iscsi_cls_conn *conn; - struct iscsi_cls_session *session; - int err = 0, value = 0; - - session = iscsi_session_lookup(ev->u.set_param.sid); - conn = iscsi_conn_lookup(ev->u.set_param.sid, ev->u.set_param.cid); - if (!conn || !session) - return -EINVAL; - - switch (ev->u.set_param.param) { - case ISCSI_PARAM_SESS_RECOVERY_TMO: - sscanf(data, "%d", &value); - if (value != 0) - session->recovery_tmo = value; - break; - default: - err = transport->set_param(conn, ev->u.set_param.param, - data, ev->u.set_param.len); - } - - return err; -} - -static int -iscsi_if_transport_ep(struct iscsi_transport *transport, - struct iscsi_uevent *ev, int msg_type) -{ - struct sockaddr *dst_addr; - int rc = 0; - - switch (msg_type) { - case ISCSI_UEVENT_TRANSPORT_EP_CONNECT: - if (!transport->ep_connect) - return -EINVAL; - - dst_addr = (struct sockaddr *)((char*)ev + sizeof(*ev)); - rc = transport->ep_connect(dst_addr, - ev->u.ep_connect.non_blocking, - &ev->r.ep_connect_ret.handle); - break; - case ISCSI_UEVENT_TRANSPORT_EP_POLL: - if (!transport->ep_poll) - return -EINVAL; - - ev->r.retcode = transport->ep_poll(ev->u.ep_poll.ep_handle, - ev->u.ep_poll.timeout_ms); - break; - case ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT: - if (!transport->ep_disconnect) - return -EINVAL; - - transport->ep_disconnect(ev->u.ep_disconnect.ep_handle); - break; - } - return rc; -} -static int -iscsi_tgt_dscvr(struct iscsi_transport *transport, - struct iscsi_uevent *ev) -{ - struct sockaddr *dst_addr; - - if (!transport->tgt_dscvr) - return -EINVAL; + mempool_zone_destroy(z_pdu); + mempool_zone_destroy(z_error); - dst_addr = (struct sockaddr *)((char*)ev + sizeof(*ev)); - return transport->tgt_dscvr(ev->u.tgt_dscvr.type, - ev->u.tgt_dscvr.host_no, - ev->u.tgt_dscvr.enable, dst_addr); + return 0; } static int @@ -1136,7 +841,6 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) struct iscsi_internal *priv; struct iscsi_cls_session *session; struct iscsi_cls_conn *conn; - unsigned long flags; priv = iscsi_if_transport_lookup(iscsi_ptr(ev->transport_handle)); if (!priv) @@ -1146,21 +850,15 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (!try_module_get(transport->owner)) return -EINVAL; - priv->daemon_pid = NETLINK_CREDS(skb)->pid; - switch (nlh->nlmsg_type) { case ISCSI_UEVENT_CREATE_SESSION: err = iscsi_if_create_session(priv, ev); break; case ISCSI_UEVENT_DESTROY_SESSION: - session = iscsi_session_lookup(ev->u.d_session.sid); - if (session) { - spin_lock_irqsave(&sesslock, flags); - list_del(&session->sess_list); - spin_unlock_irqrestore(&sesslock, flags); - + session = iscsi_session_lookup(ev->u.d_session.session_handle); + if (session) transport->destroy_session(session); - } else + else err = -EINVAL; break; case ISCSI_UEVENT_CREATE_CONN: @@ -1170,35 +868,41 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) err = iscsi_if_destroy_conn(transport, ev); break; case ISCSI_UEVENT_BIND_CONN: - session = iscsi_session_lookup(ev->u.b_conn.sid); - conn = iscsi_conn_lookup(ev->u.b_conn.sid, ev->u.b_conn.cid); + session = iscsi_session_lookup(ev->u.b_conn.session_handle); + conn = iscsi_conn_lookup(ev->u.b_conn.conn_handle); if (session && conn) ev->r.retcode = transport->bind_conn(session, conn, - ev->u.b_conn.transport_eph, + ev->u.b_conn.transport_fd, ev->u.b_conn.is_leading); else err = -EINVAL; break; case ISCSI_UEVENT_SET_PARAM: - err = iscsi_set_param(transport, ev); + conn = iscsi_conn_lookup(ev->u.set_param.conn_handle); + if (conn) + ev->r.retcode = transport->set_param(conn, + ev->u.set_param.param, ev->u.set_param.value); + else + err = -EINVAL; break; case ISCSI_UEVENT_START_CONN: - conn = iscsi_conn_lookup(ev->u.start_conn.sid, ev->u.start_conn.cid); + conn = iscsi_conn_lookup(ev->u.start_conn.conn_handle); if (conn) ev->r.retcode = transport->start_conn(conn); else err = -EINVAL; + break; case ISCSI_UEVENT_STOP_CONN: - conn = iscsi_conn_lookup(ev->u.stop_conn.sid, ev->u.stop_conn.cid); + conn = iscsi_conn_lookup(ev->u.stop_conn.conn_handle); if (conn) transport->stop_conn(conn, ev->u.stop_conn.flag); else err = -EINVAL; break; case ISCSI_UEVENT_SEND_PDU: - conn = iscsi_conn_lookup(ev->u.send_pdu.sid, ev->u.send_pdu.cid); + conn = iscsi_conn_lookup(ev->u.send_pdu.conn_handle); if (conn) ev->r.retcode = transport->send_pdu(conn, (struct iscsi_hdr*)((char*)ev + sizeof(*ev)), @@ -1210,14 +914,6 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) case ISCSI_UEVENT_GET_STATS: err = iscsi_if_get_stats(transport, nlh); break; - case ISCSI_UEVENT_TRANSPORT_EP_CONNECT: - case ISCSI_UEVENT_TRANSPORT_EP_POLL: - case ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT: - err = iscsi_if_transport_ep(transport, ev, nlh->nlmsg_type); - break; - case ISCSI_UEVENT_TGT_DSCVR: - err = iscsi_tgt_dscvr(transport, ev); - break; default: err = -EINVAL; break; @@ -1227,11 +923,9 @@ iscsi_if_recv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) return err; } -/* - * Get message from skb (based on rtnetlink_rcv_skb). Each message is - * processed by iscsi_if_recv_msg. Malformed skbs with wrong lengths or - * invalid creds are discarded silently. - */ +/* Get message from skb (based on rtnetlink_rcv_skb). Each message is + * processed by iscsi_if_recv_msg. Malformed skbs with wrong length are + * or invalid creds discarded silently. */ static void iscsi_if_rx(struct sock *sk, int len) { @@ -1243,6 +937,7 @@ iscsi_if_rx(struct sock *sk, int len) skb_pull(skb, skb->len); goto free_skb; } + daemon_pid = NETLINK_CREDS(skb)->pid; while (skb->len >= NLMSG_SPACE(0)) { int err; @@ -1293,38 +988,31 @@ free_skb: #define iscsi_cdev_to_conn(_cdev) \ iscsi_dev_to_conn(_cdev->dev) -#define ISCSI_CLASS_ATTR(_prefix,_name,_mode,_show,_store) \ -struct class_device_attribute class_device_attr_##_prefix##_##_name = \ - __ATTR(_name,_mode,_show,_store) - /* * iSCSI connection attrs */ -#define iscsi_conn_attr_show(param) \ +#define iscsi_conn_int_attr_show(param, format) \ static ssize_t \ -show_conn_param_##param(struct class_device *cdev, char *buf) \ +show_conn_int_param_##param(struct class_device *cdev, char *buf) \ { \ + uint32_t value = 0; \ struct iscsi_cls_conn *conn = iscsi_cdev_to_conn(cdev); \ struct iscsi_transport *t = conn->transport; \ - return t->get_conn_param(conn, param, buf); \ + \ + t->get_conn_param(conn, param, &value); \ + return snprintf(buf, 20, format"\n", value); \ } -#define iscsi_conn_attr(field, param) \ - iscsi_conn_attr_show(param) \ -static ISCSI_CLASS_ATTR(conn, field, S_IRUGO, show_conn_param_##param, \ - NULL); - -iscsi_conn_attr(max_recv_dlength, ISCSI_PARAM_MAX_RECV_DLENGTH); -iscsi_conn_attr(max_xmit_dlength, ISCSI_PARAM_MAX_XMIT_DLENGTH); -iscsi_conn_attr(header_digest, ISCSI_PARAM_HDRDGST_EN); -iscsi_conn_attr(data_digest, ISCSI_PARAM_DATADGST_EN); -iscsi_conn_attr(ifmarker, ISCSI_PARAM_IFMARKER_EN); -iscsi_conn_attr(ofmarker, ISCSI_PARAM_OFMARKER_EN); -iscsi_conn_attr(persistent_port, ISCSI_PARAM_PERSISTENT_PORT); -iscsi_conn_attr(port, ISCSI_PARAM_CONN_PORT); -iscsi_conn_attr(exp_statsn, ISCSI_PARAM_EXP_STATSN); -iscsi_conn_attr(persistent_address, ISCSI_PARAM_PERSISTENT_ADDRESS); -iscsi_conn_attr(address, ISCSI_PARAM_CONN_ADDRESS); +#define iscsi_conn_int_attr(field, param, format) \ + iscsi_conn_int_attr_show(param, format) \ +static CLASS_DEVICE_ATTR(field, S_IRUGO, show_conn_int_param_##param, NULL); + +iscsi_conn_int_attr(max_recv_dlength, ISCSI_PARAM_MAX_RECV_DLENGTH, "%u"); +iscsi_conn_int_attr(max_xmit_dlength, ISCSI_PARAM_MAX_XMIT_DLENGTH, "%u"); +iscsi_conn_int_attr(header_digest, ISCSI_PARAM_HDRDGST_EN, "%d"); +iscsi_conn_int_attr(data_digest, ISCSI_PARAM_DATADGST_EN, "%d"); +iscsi_conn_int_attr(ifmarker, ISCSI_PARAM_IFMARKER_EN, "%d"); +iscsi_conn_int_attr(ofmarker, ISCSI_PARAM_OFMARKER_EN, "%d"); #define iscsi_cdev_to_session(_cdev) \ iscsi_dev_to_session(_cdev->dev) @@ -1332,67 +1020,42 @@ iscsi_conn_attr(address, ISCSI_PARAM_CONN_ADDRESS); /* * iSCSI session attrs */ -#define iscsi_session_attr_show(param) \ +#define iscsi_session_int_attr_show(param, format) \ static ssize_t \ -show_session_param_##param(struct class_device *cdev, char *buf) \ +show_session_int_param_##param(struct class_device *cdev, char *buf) \ { \ - struct iscsi_cls_session *session = iscsi_cdev_to_session(cdev); \ + uint32_t value = 0; \ + struct iscsi_cls_session *session = iscsi_cdev_to_session(cdev); \ struct iscsi_transport *t = session->transport; \ - return t->get_session_param(session, param, buf); \ + \ + t->get_session_param(session, param, &value); \ + return snprintf(buf, 20, format"\n", value); \ } -#define iscsi_session_attr(field, param) \ - iscsi_session_attr_show(param) \ -static ISCSI_CLASS_ATTR(sess, field, S_IRUGO, show_session_param_##param, \ - NULL); - -iscsi_session_attr(targetname, ISCSI_PARAM_TARGET_NAME); -iscsi_session_attr(initial_r2t, ISCSI_PARAM_INITIAL_R2T_EN); -iscsi_session_attr(max_outstanding_r2t, ISCSI_PARAM_MAX_R2T); -iscsi_session_attr(immediate_data, ISCSI_PARAM_IMM_DATA_EN); -iscsi_session_attr(first_burst_len, ISCSI_PARAM_FIRST_BURST); -iscsi_session_attr(max_burst_len, ISCSI_PARAM_MAX_BURST); -iscsi_session_attr(data_pdu_in_order, ISCSI_PARAM_PDU_INORDER_EN); -iscsi_session_attr(data_seq_in_order, ISCSI_PARAM_DATASEQ_INORDER_EN); -iscsi_session_attr(erl, ISCSI_PARAM_ERL); -iscsi_session_attr(tpgt, ISCSI_PARAM_TPGT); - -#define iscsi_priv_session_attr_show(field, format) \ -static ssize_t \ -show_priv_session_##field(struct class_device *cdev, char *buf) \ -{ \ - struct iscsi_cls_session *session = iscsi_cdev_to_session(cdev);\ - return sprintf(buf, format"\n", session->field); \ -} - -#define iscsi_priv_session_attr(field, format) \ - iscsi_priv_session_attr_show(field, format) \ -static ISCSI_CLASS_ATTR(priv_sess, field, S_IRUGO, show_priv_session_##field, \ - NULL) -iscsi_priv_session_attr(recovery_tmo, "%d"); - -#define SETUP_PRIV_SESSION_RD_ATTR(field) \ -do { \ - priv->session_attrs[count] = &class_device_attr_priv_sess_##field; \ - count++; \ -} while (0) - - -#define SETUP_SESSION_RD_ATTR(field, param_flag) \ -do { \ - if (tt->param_mask & param_flag) { \ - priv->session_attrs[count] = &class_device_attr_sess_##field; \ +#define iscsi_session_int_attr(field, param, format) \ + iscsi_session_int_attr_show(param, format) \ +static CLASS_DEVICE_ATTR(field, S_IRUGO, show_session_int_param_##param, NULL); + +iscsi_session_int_attr(initial_r2t, ISCSI_PARAM_INITIAL_R2T_EN, "%d"); +iscsi_session_int_attr(max_outstanding_r2t, ISCSI_PARAM_MAX_R2T, "%hu"); +iscsi_session_int_attr(immediate_data, ISCSI_PARAM_IMM_DATA_EN, "%d"); +iscsi_session_int_attr(first_burst_len, ISCSI_PARAM_FIRST_BURST, "%u"); +iscsi_session_int_attr(max_burst_len, ISCSI_PARAM_MAX_BURST, "%u"); +iscsi_session_int_attr(data_pdu_in_order, ISCSI_PARAM_PDU_INORDER_EN, "%d"); +iscsi_session_int_attr(data_seq_in_order, ISCSI_PARAM_DATASEQ_INORDER_EN, "%d"); +iscsi_session_int_attr(erl, ISCSI_PARAM_ERL, "%d"); + +#define SETUP_SESSION_RD_ATTR(field, param) \ + if (priv->param_mask & (1 << param)) { \ + priv->session_attrs[count] = &class_device_attr_##field;\ count++; \ - } \ -} while (0) + } -#define SETUP_CONN_RD_ATTR(field, param_flag) \ -do { \ - if (tt->param_mask & param_flag) { \ - priv->conn_attrs[count] = &class_device_attr_conn_##field; \ +#define SETUP_CONN_RD_ATTR(field, param) \ + if (priv->param_mask & (1 << param)) { \ + priv->conn_attrs[count] = &class_device_attr_##field; \ count++; \ - } \ -} while (0) + } static int iscsi_session_match(struct attribute_container *cont, struct device *dev) @@ -1441,24 +1104,6 @@ static int iscsi_conn_match(struct attribute_container *cont, return &priv->conn_cont.ac == cont; } -static int iscsi_host_match(struct attribute_container *cont, - struct device *dev) -{ - struct Scsi_Host *shost; - struct iscsi_internal *priv; - - if (!scsi_is_host_device(dev)) - return 0; - - shost = dev_to_shost(dev); - if (!shost->transportt || - shost->transportt->host_attrs.ac.class != &iscsi_host_class.class) - return 0; - - priv = to_iscsi_internal(shost->transportt); - return &priv->t.host_attrs.ac == cont; -} - struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) { @@ -1476,9 +1121,7 @@ iscsi_register_transport(struct iscsi_transport *tt) if (!priv) return NULL; INIT_LIST_HEAD(&priv->list); - priv->daemon_pid = -1; priv->iscsi_transport = tt; - priv->t.user_scan = iscsi_user_scan; priv->cdev.class = &iscsi_transport_class; snprintf(priv->cdev.class_id, BUS_ID_SIZE, "%s", tt->name); @@ -1490,13 +1133,18 @@ iscsi_register_transport(struct iscsi_transport *tt) if (err) goto unregister_cdev; - /* host parameters */ - priv->t.host_attrs.ac.attrs = &priv->host_attrs[0]; - priv->t.host_attrs.ac.class = &iscsi_host_class.class; - priv->t.host_attrs.ac.match = iscsi_host_match; - priv->t.host_size = sizeof(struct iscsi_host); - priv->host_attrs[0] = NULL; - transport_container_register(&priv->t.host_attrs); + /* setup parameters mask */ + priv->param_mask = 0xFFFFFFFF; + if (!(tt->caps & CAP_MULTI_R2T)) + priv->param_mask &= ~(1 << ISCSI_PARAM_MAX_R2T); + if (!(tt->caps & CAP_HDRDGST)) + priv->param_mask &= ~(1 << ISCSI_PARAM_HDRDGST_EN); + if (!(tt->caps & CAP_DATADGST)) + priv->param_mask &= ~(1 << ISCSI_PARAM_DATADGST_EN); + if (!(tt->caps & CAP_MARKERS)) { + priv->param_mask &= ~(1 << ISCSI_PARAM_IFMARKER_EN); + priv->param_mask &= ~(1 << ISCSI_PARAM_OFMARKER_EN); + } /* connection parameters */ priv->conn_cont.ac.attrs = &priv->conn_attrs[0]; @@ -1504,17 +1152,12 @@ iscsi_register_transport(struct iscsi_transport *tt) priv->conn_cont.ac.match = iscsi_conn_match; transport_container_register(&priv->conn_cont); - SETUP_CONN_RD_ATTR(max_recv_dlength, ISCSI_MAX_RECV_DLENGTH); - SETUP_CONN_RD_ATTR(max_xmit_dlength, ISCSI_MAX_XMIT_DLENGTH); - SETUP_CONN_RD_ATTR(header_digest, ISCSI_HDRDGST_EN); - SETUP_CONN_RD_ATTR(data_digest, ISCSI_DATADGST_EN); - SETUP_CONN_RD_ATTR(ifmarker, ISCSI_IFMARKER_EN); - SETUP_CONN_RD_ATTR(ofmarker, ISCSI_OFMARKER_EN); - SETUP_CONN_RD_ATTR(address, ISCSI_CONN_ADDRESS); - SETUP_CONN_RD_ATTR(port, ISCSI_CONN_PORT); - SETUP_CONN_RD_ATTR(exp_statsn, ISCSI_EXP_STATSN); - SETUP_CONN_RD_ATTR(persistent_address, ISCSI_PERSISTENT_ADDRESS); - SETUP_CONN_RD_ATTR(persistent_port, ISCSI_PERSISTENT_PORT); + SETUP_CONN_RD_ATTR(max_recv_dlength, ISCSI_PARAM_MAX_RECV_DLENGTH); + SETUP_CONN_RD_ATTR(max_xmit_dlength, ISCSI_PARAM_MAX_XMIT_DLENGTH); + SETUP_CONN_RD_ATTR(header_digest, ISCSI_PARAM_HDRDGST_EN); + SETUP_CONN_RD_ATTR(data_digest, ISCSI_PARAM_DATADGST_EN); + SETUP_CONN_RD_ATTR(ifmarker, ISCSI_PARAM_IFMARKER_EN); + SETUP_CONN_RD_ATTR(ofmarker, ISCSI_PARAM_OFMARKER_EN); BUG_ON(count > ISCSI_CONN_ATTRS); priv->conn_attrs[count] = NULL; @@ -1526,17 +1169,14 @@ iscsi_register_transport(struct iscsi_transport *tt) priv->session_cont.ac.match = iscsi_session_match; transport_container_register(&priv->session_cont); - SETUP_SESSION_RD_ATTR(initial_r2t, ISCSI_INITIAL_R2T_EN); - SETUP_SESSION_RD_ATTR(max_outstanding_r2t, ISCSI_MAX_R2T); - SETUP_SESSION_RD_ATTR(immediate_data, ISCSI_IMM_DATA_EN); - SETUP_SESSION_RD_ATTR(first_burst_len, ISCSI_FIRST_BURST); - SETUP_SESSION_RD_ATTR(max_burst_len, ISCSI_MAX_BURST); - SETUP_SESSION_RD_ATTR(data_pdu_in_order, ISCSI_PDU_INORDER_EN); - SETUP_SESSION_RD_ATTR(data_seq_in_order, ISCSI_DATASEQ_INORDER_EN); - SETUP_SESSION_RD_ATTR(erl, ISCSI_ERL); - SETUP_SESSION_RD_ATTR(targetname, ISCSI_TARGET_NAME); - SETUP_SESSION_RD_ATTR(tpgt, ISCSI_TPGT); - SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo); + SETUP_SESSION_RD_ATTR(initial_r2t, ISCSI_PARAM_INITIAL_R2T_EN); + SETUP_SESSION_RD_ATTR(max_outstanding_r2t, ISCSI_PARAM_MAX_R2T); + SETUP_SESSION_RD_ATTR(immediate_data, ISCSI_PARAM_IMM_DATA_EN); + SETUP_SESSION_RD_ATTR(first_burst_len, ISCSI_PARAM_FIRST_BURST); + SETUP_SESSION_RD_ATTR(max_burst_len, ISCSI_PARAM_MAX_BURST); + SETUP_SESSION_RD_ATTR(data_pdu_in_order, ISCSI_PARAM_PDU_INORDER_EN); + SETUP_SESSION_RD_ATTR(data_seq_in_order,ISCSI_PARAM_DATASEQ_INORDER_EN) + SETUP_SESSION_RD_ATTR(erl, ISCSI_PARAM_ERL); BUG_ON(count > ISCSI_SESSION_ATTRS); priv->session_attrs[count] = NULL; @@ -1574,7 +1214,6 @@ int iscsi_unregister_transport(struct iscsi_transport *tt) transport_container_unregister(&priv->conn_cont); transport_container_unregister(&priv->session_cont); - transport_container_unregister(&priv->t.host_attrs); sysfs_remove_group(&priv->cdev.kobj, &iscsi_transport_group); class_device_unregister(&priv->cdev); @@ -1614,20 +1253,13 @@ static __init int iscsi_transport_init(void) { int err; - printk(KERN_INFO "Loading iSCSI transport class v%s.", - ISCSI_TRANSPORT_VERSION); - err = class_register(&iscsi_transport_class); if (err) return err; - err = transport_class_register(&iscsi_host_class); - if (err) - goto unregister_transport_class; - err = transport_class_register(&iscsi_connection_class); if (err) - goto unregister_host_class; + goto unregister_transport_class; err = transport_class_register(&iscsi_session_class); if (err) @@ -1656,8 +1288,6 @@ unregister_session_class: transport_class_unregister(&iscsi_session_class); unregister_conn_class: transport_class_unregister(&iscsi_connection_class); -unregister_host_class: - transport_class_unregister(&iscsi_host_class); unregister_transport_class: class_unregister(&iscsi_transport_class); return err; @@ -1670,7 +1300,6 @@ static void __exit iscsi_transport_exit(void) netlink_unregister_notifier(&iscsi_nl_notifier); transport_class_unregister(&iscsi_connection_class); transport_class_unregister(&iscsi_session_class); - transport_class_unregister(&iscsi_host_class); class_unregister(&iscsi_transport_class); } @@ -1682,4 +1311,3 @@ MODULE_AUTHOR("Mike Christie , " "Alex Aizman "); MODULE_DESCRIPTION("iSCSI Transport Interface"); MODULE_LICENSE("GPL"); -MODULE_VERSION(ISCSI_TRANSPORT_VERSION); diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 5a625c3fd..f3b160663 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -41,7 +41,6 @@ struct sas_host_attrs { struct mutex lock; u32 next_target_id; u32 next_expander_id; - int next_port_id; }; #define to_sas_host_attrs(host) ((struct sas_host_attrs *)(host)->shost_data) @@ -66,7 +65,7 @@ get_sas_##title##_names(u32 table_key, char *buf) \ ssize_t len = 0; \ int i; \ \ - for (i = 0; i < ARRAY_SIZE(table); i++) { \ + for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) { \ if (table[i].value & table_key) { \ len += sprintf(buf + len, "%s%s", \ prefix, table[i].name); \ @@ -84,7 +83,7 @@ get_sas_##title##_names(u32 table_key, char *buf) \ ssize_t len = 0; \ int i; \ \ - for (i = 0; i < ARRAY_SIZE(table); i++) { \ + for (i = 0; i < sizeof(table)/sizeof(table[0]); i++) { \ if (table[i].value == table_key) { \ len += sprintf(buf + len, "%s", \ table[i].name); \ @@ -147,7 +146,6 @@ static int sas_host_setup(struct transport_container *tc, struct device *dev, mutex_init(&sas_host->lock); sas_host->next_target_id = 0; sas_host->next_expander_id = 0; - sas_host->next_port_id = 0; return 0; } @@ -176,28 +174,11 @@ static int sas_host_match(struct attribute_container *cont, static int do_sas_phy_delete(struct device *dev, void *data) { - int pass = (int)(unsigned long)data; - - if (pass == 0 && scsi_is_sas_port(dev)) - sas_port_delete(dev_to_sas_port(dev)); - else if (pass == 1 && scsi_is_sas_phy(dev)) + if (scsi_is_sas_phy(dev)) sas_phy_delete(dev_to_phy(dev)); return 0; } -/** - * sas_remove_children -- tear down a devices SAS data structures - * @dev: device belonging to the sas object - * - * Removes all SAS PHYs and remote PHYs for a given object - */ -void sas_remove_children(struct device *dev) -{ - device_for_each_child(dev, (void *)0, do_sas_phy_delete); - device_for_each_child(dev, (void *)1, do_sas_phy_delete); -} -EXPORT_SYMBOL(sas_remove_children); - /** * sas_remove_host -- tear down a Scsi_Host's SAS data structures * @shost: Scsi Host that is torn down @@ -207,13 +188,13 @@ EXPORT_SYMBOL(sas_remove_children); */ void sas_remove_host(struct Scsi_Host *shost) { - sas_remove_children(&shost->shost_gendev); + device_for_each_child(&shost->shost_gendev, NULL, do_sas_phy_delete); } EXPORT_SYMBOL(sas_remove_host); /* - * SAS Phy attributes + * SAS Port attributes */ #define sas_phy_show_simple(field, name, format_string, cast) \ @@ -329,7 +310,7 @@ sas_phy_protocol_attr(identify.target_port_protocols, sas_phy_simple_attr(identify.sas_address, sas_address, "0x%016llx\n", unsigned long long); sas_phy_simple_attr(identify.phy_identifier, phy_identifier, "%d\n", u8); -//sas_phy_simple_attr(port_identifier, port_identifier, "%d\n", int); +sas_phy_simple_attr(port_identifier, port_identifier, "%d\n", u8); sas_phy_linkspeed_attr(negotiated_linkrate); sas_phy_linkspeed_attr(minimum_linkrate_hw); sas_phy_linkspeed_attr(minimum_linkrate); @@ -397,10 +378,9 @@ struct sas_phy *sas_phy_alloc(struct device *parent, int number) device_initialize(&phy->dev); phy->dev.parent = get_device(parent); phy->dev.release = sas_phy_release; - INIT_LIST_HEAD(&phy->port_siblings); if (scsi_is_sas_expander_device(parent)) { struct sas_rphy *rphy = dev_to_rphy(parent); - sprintf(phy->dev.bus_id, "phy-%d:%d:%d", shost->host_no, + sprintf(phy->dev.bus_id, "phy-%d-%d:%d", shost->host_no, rphy->scsi_target_id, number); } else sprintf(phy->dev.bus_id, "phy-%d:%d", shost->host_no, number); @@ -460,8 +440,8 @@ sas_phy_delete(struct sas_phy *phy) { struct device *dev = &phy->dev; - /* this happens if the phy is still part of a port when deleted */ - BUG_ON(!list_empty(&phy->port_siblings)); + if (phy->rphy) + sas_rphy_delete(phy->rphy); transport_remove_device(dev); device_del(dev); @@ -483,310 +463,6 @@ int scsi_is_sas_phy(const struct device *dev) } EXPORT_SYMBOL(scsi_is_sas_phy); -/* - * SAS Port attributes - */ -#define sas_port_show_simple(field, name, format_string, cast) \ -static ssize_t \ -show_sas_port_##name(struct class_device *cdev, char *buf) \ -{ \ - struct sas_port *port = transport_class_to_sas_port(cdev); \ - \ - return snprintf(buf, 20, format_string, cast port->field); \ -} - -#define sas_port_simple_attr(field, name, format_string, type) \ - sas_port_show_simple(field, name, format_string, (type)) \ -static CLASS_DEVICE_ATTR(name, S_IRUGO, show_sas_port_##name, NULL) - -sas_port_simple_attr(num_phys, num_phys, "%d\n", int); - -static DECLARE_TRANSPORT_CLASS(sas_port_class, - "sas_port", NULL, NULL, NULL); - -static int sas_port_match(struct attribute_container *cont, struct device *dev) -{ - struct Scsi_Host *shost; - struct sas_internal *i; - - if (!scsi_is_sas_port(dev)) - return 0; - shost = dev_to_shost(dev->parent); - - if (!shost->transportt) - return 0; - if (shost->transportt->host_attrs.ac.class != - &sas_host_class.class) - return 0; - - i = to_sas_internal(shost->transportt); - return &i->port_attr_cont.ac == cont; -} - - -static void sas_port_release(struct device *dev) -{ - struct sas_port *port = dev_to_sas_port(dev); - - BUG_ON(!list_empty(&port->phy_list)); - - put_device(dev->parent); - kfree(port); -} - -static void sas_port_create_link(struct sas_port *port, - struct sas_phy *phy) -{ - sysfs_create_link(&port->dev.kobj, &phy->dev.kobj, phy->dev.bus_id); - sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port"); -} - -static void sas_port_delete_link(struct sas_port *port, - struct sas_phy *phy) -{ - sysfs_remove_link(&port->dev.kobj, phy->dev.bus_id); - sysfs_remove_link(&phy->dev.kobj, "port"); -} - -/** sas_port_alloc - allocate and initialize a SAS port structure - * - * @parent: parent device - * @port_id: port number - * - * Allocates a SAS port structure. It will be added to the device tree - * below the device specified by @parent which must be either a Scsi_Host - * or a sas_expander_device. - * - * Returns %NULL on error - */ -struct sas_port *sas_port_alloc(struct device *parent, int port_id) -{ - struct Scsi_Host *shost = dev_to_shost(parent); - struct sas_port *port; - - port = kzalloc(sizeof(*port), GFP_KERNEL); - if (!port) - return NULL; - - port->port_identifier = port_id; - - device_initialize(&port->dev); - - port->dev.parent = get_device(parent); - port->dev.release = sas_port_release; - - mutex_init(&port->phy_list_mutex); - INIT_LIST_HEAD(&port->phy_list); - - if (scsi_is_sas_expander_device(parent)) { - struct sas_rphy *rphy = dev_to_rphy(parent); - sprintf(port->dev.bus_id, "port-%d:%d:%d", shost->host_no, - rphy->scsi_target_id, port->port_identifier); - } else - sprintf(port->dev.bus_id, "port-%d:%d", shost->host_no, - port->port_identifier); - - transport_setup_device(&port->dev); - - return port; -} -EXPORT_SYMBOL(sas_port_alloc); - -/** sas_port_alloc_num - allocate and initialize a SAS port structure - * - * @parent: parent device - * - * Allocates a SAS port structure and a number to go with it. This - * interface is really for adapters where the port number has no - * meansing, so the sas class should manage them. It will be added to - * the device tree below the device specified by @parent which must be - * either a Scsi_Host or a sas_expander_device. - * - * Returns %NULL on error - */ -struct sas_port *sas_port_alloc_num(struct device *parent) -{ - int index; - struct Scsi_Host *shost = dev_to_shost(parent); - struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); - - /* FIXME: use idr for this eventually */ - mutex_lock(&sas_host->lock); - if (scsi_is_sas_expander_device(parent)) { - struct sas_rphy *rphy = dev_to_rphy(parent); - struct sas_expander_device *exp = rphy_to_expander_device(rphy); - - index = exp->next_port_id++; - } else - index = sas_host->next_port_id++; - mutex_unlock(&sas_host->lock); - return sas_port_alloc(parent, index); -} -EXPORT_SYMBOL(sas_port_alloc_num); - -/** - * sas_port_add - add a SAS port to the device hierarchy - * - * @port: port to be added - * - * publishes a port to the rest of the system - */ -int sas_port_add(struct sas_port *port) -{ - int error; - - /* No phys should be added until this is made visible */ - BUG_ON(!list_empty(&port->phy_list)); - - error = device_add(&port->dev); - - if (error) - return error; - - transport_add_device(&port->dev); - transport_configure_device(&port->dev); - - return 0; -} -EXPORT_SYMBOL(sas_port_add); - -/** - * sas_port_free -- free a SAS PORT - * @port: SAS PORT to free - * - * Frees the specified SAS PORT. - * - * Note: - * This function must only be called on a PORT that has not - * sucessfully been added using sas_port_add(). - */ -void sas_port_free(struct sas_port *port) -{ - transport_destroy_device(&port->dev); - put_device(&port->dev); -} -EXPORT_SYMBOL(sas_port_free); - -/** - * sas_port_delete -- remove SAS PORT - * @port: SAS PORT to remove - * - * Removes the specified SAS PORT. If the SAS PORT has an - * associated phys, unlink them from the port as well. - */ -void sas_port_delete(struct sas_port *port) -{ - struct device *dev = &port->dev; - struct sas_phy *phy, *tmp_phy; - - if (port->rphy) { - sas_rphy_delete(port->rphy); - port->rphy = NULL; - } - - mutex_lock(&port->phy_list_mutex); - list_for_each_entry_safe(phy, tmp_phy, &port->phy_list, - port_siblings) { - sas_port_delete_link(port, phy); - list_del_init(&phy->port_siblings); - } - mutex_unlock(&port->phy_list_mutex); - - if (port->is_backlink) { - struct device *parent = port->dev.parent; - - sysfs_remove_link(&port->dev.kobj, parent->bus_id); - port->is_backlink = 0; - } - - transport_remove_device(dev); - device_del(dev); - transport_destroy_device(dev); - put_device(dev); -} -EXPORT_SYMBOL(sas_port_delete); - -/** - * scsi_is_sas_port -- check if a struct device represents a SAS port - * @dev: device to check - * - * Returns: - * %1 if the device represents a SAS Port, %0 else - */ -int scsi_is_sas_port(const struct device *dev) -{ - return dev->release == sas_port_release; -} -EXPORT_SYMBOL(scsi_is_sas_port); - -/** - * sas_port_add_phy - add another phy to a port to form a wide port - * @port: port to add the phy to - * @phy: phy to add - * - * When a port is initially created, it is empty (has no phys). All - * ports must have at least one phy to operated, and all wide ports - * must have at least two. The current code makes no difference - * between ports and wide ports, but the only object that can be - * connected to a remote device is a port, so ports must be formed on - * all devices with phys if they're connected to anything. - */ -void sas_port_add_phy(struct sas_port *port, struct sas_phy *phy) -{ - mutex_lock(&port->phy_list_mutex); - if (unlikely(!list_empty(&phy->port_siblings))) { - /* make sure we're already on this port */ - struct sas_phy *tmp; - - list_for_each_entry(tmp, &port->phy_list, port_siblings) - if (tmp == phy) - break; - /* If this trips, you added a phy that was already - * part of a different port */ - if (unlikely(tmp != phy)) { - dev_printk(KERN_ERR, &port->dev, "trying to add phy %s fails: it's already part of another port\n", phy->dev.bus_id); - BUG(); - } - } else { - sas_port_create_link(port, phy); - list_add_tail(&phy->port_siblings, &port->phy_list); - port->num_phys++; - } - mutex_unlock(&port->phy_list_mutex); -} -EXPORT_SYMBOL(sas_port_add_phy); - -/** - * sas_port_delete_phy - remove a phy from a port or wide port - * @port: port to remove the phy from - * @phy: phy to remove - * - * This operation is used for tearing down ports again. It must be - * done to every port or wide port before calling sas_port_delete. - */ -void sas_port_delete_phy(struct sas_port *port, struct sas_phy *phy) -{ - mutex_lock(&port->phy_list_mutex); - sas_port_delete_link(port, phy); - list_del_init(&phy->port_siblings); - port->num_phys--; - mutex_unlock(&port->phy_list_mutex); -} -EXPORT_SYMBOL(sas_port_delete_phy); - -void sas_port_mark_backlink(struct sas_port *port) -{ - struct device *parent = port->dev.parent->parent->parent; - - if (port->is_backlink) - return; - port->is_backlink = 1; - sysfs_create_link(&port->dev.kobj, &parent->kobj, - parent->bus_id); - -} -EXPORT_SYMBOL(sas_port_mark_backlink); - /* * SAS remote PHY attributes. */ @@ -1071,18 +747,6 @@ static void sas_end_device_release(struct device *dev) kfree(edev); } -/** - * sas_rphy_initialize - common rphy intialization - * @rphy: rphy to initialise - * - * Used by both sas_end_device_alloc() and sas_expander_alloc() to - * initialise the common rphy component of each. - */ -static void sas_rphy_initialize(struct sas_rphy *rphy) -{ - INIT_LIST_HEAD(&rphy->list); -} - /** * sas_end_device_alloc - allocate an rphy for an end device * @@ -1091,7 +755,7 @@ static void sas_rphy_initialize(struct sas_rphy *rphy) * Returns: * SAS PHY allocated or %NULL if the allocation failed. */ -struct sas_rphy *sas_end_device_alloc(struct sas_port *parent) +struct sas_rphy *sas_end_device_alloc(struct sas_phy *parent) { struct Scsi_Host *shost = dev_to_shost(&parent->dev); struct sas_end_device *rdev; @@ -1104,15 +768,9 @@ struct sas_rphy *sas_end_device_alloc(struct sas_port *parent) device_initialize(&rdev->rphy.dev); rdev->rphy.dev.parent = get_device(&parent->dev); rdev->rphy.dev.release = sas_end_device_release; - if (scsi_is_sas_expander_device(parent->dev.parent)) { - struct sas_rphy *rphy = dev_to_rphy(parent->dev.parent); - sprintf(rdev->rphy.dev.bus_id, "end_device-%d:%d:%d", - shost->host_no, rphy->scsi_target_id, parent->port_identifier); - } else - sprintf(rdev->rphy.dev.bus_id, "end_device-%d:%d", - shost->host_no, parent->port_identifier); + sprintf(rdev->rphy.dev.bus_id, "end_device-%d:%d-%d", + shost->host_no, parent->port_identifier, parent->number); rdev->rphy.identify.device_type = SAS_END_DEVICE; - sas_rphy_initialize(&rdev->rphy); transport_setup_device(&rdev->rphy.dev); return &rdev->rphy; @@ -1127,7 +785,7 @@ EXPORT_SYMBOL(sas_end_device_alloc); * Returns: * SAS PHY allocated or %NULL if the allocation failed. */ -struct sas_rphy *sas_expander_alloc(struct sas_port *parent, +struct sas_rphy *sas_expander_alloc(struct sas_phy *parent, enum sas_device_type type) { struct Scsi_Host *shost = dev_to_shost(&parent->dev); @@ -1151,7 +809,6 @@ struct sas_rphy *sas_expander_alloc(struct sas_port *parent, sprintf(rdev->rphy.dev.bus_id, "expander-%d:%d", shost->host_no, rdev->rphy.scsi_target_id); rdev->rphy.identify.device_type = type; - sas_rphy_initialize(&rdev->rphy); transport_setup_device(&rdev->rphy.dev); return &rdev->rphy; @@ -1166,7 +823,7 @@ EXPORT_SYMBOL(sas_expander_alloc); */ int sas_rphy_add(struct sas_rphy *rphy) { - struct sas_port *parent = dev_to_sas_port(rphy->dev.parent); + struct sas_phy *parent = dev_to_phy(rphy->dev.parent); struct Scsi_Host *shost = dev_to_shost(parent->dev.parent); struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); struct sas_identify *identify = &rphy->identify; @@ -1194,7 +851,7 @@ int sas_rphy_add(struct sas_rphy *rphy) if (identify->device_type == SAS_END_DEVICE && rphy->scsi_target_id != -1) { - scsi_scan_target(&rphy->dev, 0, + scsi_scan_target(&rphy->dev, parent->port_identifier, rphy->scsi_target_id, ~0, 0); } @@ -1239,7 +896,7 @@ void sas_rphy_delete(struct sas_rphy *rphy) { struct device *dev = &rphy->dev; - struct sas_port *parent = dev_to_sas_port(dev->parent); + struct sas_phy *parent = dev_to_phy(dev->parent); struct Scsi_Host *shost = dev_to_shost(parent->dev.parent); struct sas_host_attrs *sas_host = to_sas_host_attrs(shost); @@ -1249,7 +906,7 @@ sas_rphy_delete(struct sas_rphy *rphy) break; case SAS_EDGE_EXPANDER_DEVICE: case SAS_FANOUT_EXPANDER_DEVICE: - sas_remove_children(dev); + device_for_each_child(dev, NULL, do_sas_phy_delete); break; default: break; @@ -1296,13 +953,15 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, mutex_lock(&sas_host->lock); list_for_each_entry(rphy, &sas_host->rphy_list, list) { + struct sas_phy *parent = dev_to_phy(rphy->dev.parent); + if (rphy->identify.device_type != SAS_END_DEVICE || rphy->scsi_target_id == -1) continue; - if ((channel == SCAN_WILD_CARD || channel == 0) && + if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && (id == SCAN_WILD_CARD || id == rphy->scsi_target_id)) { - scsi_scan_target(&rphy->dev, 0, + scsi_scan_target(&rphy->dev, parent->port_identifier, rphy->scsi_target_id, lun, 1); } } @@ -1330,19 +989,16 @@ static int sas_user_scan(struct Scsi_Host *shost, uint channel, #define SETUP_OPTIONAL_RPORT_ATTRIBUTE(field, func) \ SETUP_TEMPLATE(rphy_attrs, field, S_IRUGO, i->f->func) -#define SETUP_PHY_ATTRIBUTE(field) \ - SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, 1) - #define SETUP_PORT_ATTRIBUTE(field) \ - SETUP_TEMPLATE(port_attrs, field, S_IRUGO, 1) + SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, 1) -#define SETUP_OPTIONAL_PHY_ATTRIBUTE(field, func) \ +#define SETUP_OPTIONAL_PORT_ATTRIBUTE(field, func) \ SETUP_TEMPLATE(phy_attrs, field, S_IRUGO, i->f->func) -#define SETUP_PHY_ATTRIBUTE_WRONLY(field) \ +#define SETUP_PORT_ATTRIBUTE_WRONLY(field) \ SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, 1) -#define SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(field, func) \ +#define SETUP_OPTIONAL_PORT_ATTRIBUTE_WRONLY(field, func) \ SETUP_TEMPLATE(phy_attrs, field, S_IWUGO, i->f->func) #define SETUP_END_DEV_ATTRIBUTE(field) \ @@ -1378,11 +1034,6 @@ sas_attach_transport(struct sas_function_template *ft) i->phy_attr_cont.ac.match = sas_phy_match; transport_container_register(&i->phy_attr_cont); - i->port_attr_cont.ac.class = &sas_port_class.class; - i->port_attr_cont.ac.attrs = &i->port_attrs[0]; - i->port_attr_cont.ac.match = sas_port_match; - transport_container_register(&i->port_attr_cont); - i->rphy_attr_cont.ac.class = &sas_rphy_class.class; i->rphy_attr_cont.ac.attrs = &i->rphy_attrs[0]; i->rphy_attr_cont.ac.match = sas_rphy_match; @@ -1401,34 +1052,29 @@ sas_attach_transport(struct sas_function_template *ft) i->f = ft; count = 0; - SETUP_PORT_ATTRIBUTE(num_phys); i->host_attrs[count] = NULL; count = 0; - SETUP_PHY_ATTRIBUTE(initiator_port_protocols); - SETUP_PHY_ATTRIBUTE(target_port_protocols); - SETUP_PHY_ATTRIBUTE(device_type); - SETUP_PHY_ATTRIBUTE(sas_address); - SETUP_PHY_ATTRIBUTE(phy_identifier); - //SETUP_PHY_ATTRIBUTE(port_identifier); - SETUP_PHY_ATTRIBUTE(negotiated_linkrate); - SETUP_PHY_ATTRIBUTE(minimum_linkrate_hw); - SETUP_PHY_ATTRIBUTE(minimum_linkrate); - SETUP_PHY_ATTRIBUTE(maximum_linkrate_hw); - SETUP_PHY_ATTRIBUTE(maximum_linkrate); - - SETUP_PHY_ATTRIBUTE(invalid_dword_count); - SETUP_PHY_ATTRIBUTE(running_disparity_error_count); - SETUP_PHY_ATTRIBUTE(loss_of_dword_sync_count); - SETUP_PHY_ATTRIBUTE(phy_reset_problem_count); - SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(link_reset, phy_reset); - SETUP_OPTIONAL_PHY_ATTRIBUTE_WRONLY(hard_reset, phy_reset); + SETUP_PORT_ATTRIBUTE(initiator_port_protocols); + SETUP_PORT_ATTRIBUTE(target_port_protocols); + SETUP_PORT_ATTRIBUTE(device_type); + SETUP_PORT_ATTRIBUTE(sas_address); + SETUP_PORT_ATTRIBUTE(phy_identifier); + SETUP_PORT_ATTRIBUTE(port_identifier); + SETUP_PORT_ATTRIBUTE(negotiated_linkrate); + SETUP_PORT_ATTRIBUTE(minimum_linkrate_hw); + SETUP_PORT_ATTRIBUTE(minimum_linkrate); + SETUP_PORT_ATTRIBUTE(maximum_linkrate_hw); + SETUP_PORT_ATTRIBUTE(maximum_linkrate); + + SETUP_PORT_ATTRIBUTE(invalid_dword_count); + SETUP_PORT_ATTRIBUTE(running_disparity_error_count); + SETUP_PORT_ATTRIBUTE(loss_of_dword_sync_count); + SETUP_PORT_ATTRIBUTE(phy_reset_problem_count); + SETUP_OPTIONAL_PORT_ATTRIBUTE_WRONLY(link_reset, phy_reset); + SETUP_OPTIONAL_PORT_ATTRIBUTE_WRONLY(hard_reset, phy_reset); i->phy_attrs[count] = NULL; - count = 0; - SETUP_PORT_ATTRIBUTE(num_phys); - i->port_attrs[count] = NULL; - count = 0; SETUP_RPORT_ATTRIBUTE(rphy_initiator_port_protocols); SETUP_RPORT_ATTRIBUTE(rphy_target_port_protocols); @@ -1471,7 +1117,6 @@ void sas_release_transport(struct scsi_transport_template *t) transport_container_unregister(&i->t.host_attrs); transport_container_unregister(&i->phy_attr_cont); - transport_container_unregister(&i->port_attr_cont); transport_container_unregister(&i->rphy_attr_cont); transport_container_unregister(&i->end_dev_attr_cont); transport_container_unregister(&i->expander_attr_cont); @@ -1490,12 +1135,9 @@ static __init int sas_transport_init(void) error = transport_class_register(&sas_phy_class); if (error) goto out_unregister_transport; - error = transport_class_register(&sas_port_class); - if (error) - goto out_unregister_phy; error = transport_class_register(&sas_rphy_class); if (error) - goto out_unregister_port; + goto out_unregister_phy; error = transport_class_register(&sas_end_dev_class); if (error) goto out_unregister_rphy; @@ -1509,8 +1151,6 @@ static __init int sas_transport_init(void) transport_class_unregister(&sas_end_dev_class); out_unregister_rphy: transport_class_unregister(&sas_rphy_class); - out_unregister_port: - transport_class_unregister(&sas_port_class); out_unregister_phy: transport_class_unregister(&sas_phy_class); out_unregister_transport: @@ -1524,7 +1164,6 @@ static void __exit sas_transport_exit(void) { transport_class_unregister(&sas_host_class); transport_class_unregister(&sas_phy_class); - transport_class_unregister(&sas_port_class); transport_class_unregister(&sas_rphy_class); transport_class_unregister(&sas_end_dev_class); transport_class_unregister(&sas_expander_class); diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 29a9a53cd..780aaedcb 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c @@ -18,6 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -145,7 +146,7 @@ static inline const char *spi_signal_to_string(enum spi_signal_type type) { int i; - for (i = 0; i < ARRAY_SIZE(signal_types); i++) { + for (i = 0; i < sizeof(signal_types)/sizeof(signal_types[0]); i++) { if (type == signal_types[i].value) return signal_types[i].name; } @@ -155,7 +156,7 @@ static inline enum spi_signal_type spi_signal_to_value(const char *name) { int i, len; - for (i = 0; i < ARRAY_SIZE(signal_types); i++) { + for (i = 0; i < sizeof(signal_types)/sizeof(signal_types[0]); i++) { len = strlen(signal_types[i].name); if (strncmp(name, signal_types[i].name, len) == 0 && (name[len] == '\n' || name[len] == '\0')) @@ -784,7 +785,6 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) { struct spi_internal *i = to_spi_internal(sdev->host->transportt); struct scsi_target *starget = sdev->sdev_target; - struct Scsi_Host *shost = sdev->host; int len = sdev->inquiry_len; /* first set us up for narrow async */ DV_SET(offset, 0); @@ -844,14 +844,6 @@ spi_dv_device_internal(struct scsi_device *sdev, u8 *buffer) if (spi_min_period(starget) == 8) DV_SET(pcomp_en, 1); } - /* now that we've done all this, actually check the bus - * signal type (if known). Some devices are stupid on - * a SE bus and still claim they can try LVD only settings */ - if (i->f->get_signalling) - i->f->get_signalling(shost); - if (spi_signalling(shost) == SPI_SIGNAL_SE || - spi_signalling(shost) == SPI_SIGNAL_HVD) - DV_SET(dt, 0); /* Do the read only INQUIRY tests */ spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, spi_dv_device_compare_inquiry); diff --git a/drivers/scsi/scsi_typedefs.h b/drivers/scsi/scsi_typedefs.h index 2ed4c5cb7..29f038b42 100644 --- a/drivers/scsi/scsi_typedefs.h +++ b/drivers/scsi/scsi_typedefs.h @@ -1,2 +1,3 @@ typedef struct scsi_cmnd Scsi_Cmnd; +typedef struct scsi_request Scsi_Request; diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c index cd68a66c7..b78354fc4 100644 --- a/drivers/scsi/scsicam.c +++ b/drivers/scsi/scsicam.c @@ -57,7 +57,6 @@ EXPORT_SYMBOL(scsi_bios_ptable); int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) { unsigned char *p; - u64 capacity64 = capacity; /* Suppress gcc warning */ int ret; p = scsi_bios_ptable(bdev); @@ -69,7 +68,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) (unsigned int *)ip + 0, (unsigned int *)ip + 1); kfree(p); - if (ret == -1 && capacity64 < (1ULL << 32)) { + if (ret == -1) { /* pick some standard mapping with at most 1024 cylinders, and at most 62 sectors per track - this works up to 7905 MB */ diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 98bd3aab9..c647d85d9 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -32,6 +32,7 @@ * than the level indicated above to trigger output. */ +#include #include #include #include @@ -174,7 +175,7 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf, * it's not worth the risk */ return -EINVAL; - for (i = 0; i < ARRAY_SIZE(sd_cache_types); i++) { + for (i = 0; i < sizeof(sd_cache_types)/sizeof(sd_cache_types[0]); i++) { const int len = strlen(sd_cache_types[i]); if (strncmp(sd_cache_types[i], buf, len) == 0 && buf[len] == '\n') { @@ -207,23 +208,6 @@ static ssize_t sd_store_cache_type(struct class_device *cdev, const char *buf, return count; } -static ssize_t sd_store_allow_restart(struct class_device *cdev, const char *buf, - size_t count) -{ - struct scsi_disk *sdkp = to_scsi_disk(cdev); - struct scsi_device *sdp = sdkp->device; - - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - - if (sdp->type != TYPE_DISK) - return -EINVAL; - - sdp->allow_restart = simple_strtoul(buf, NULL, 10); - - return count; -} - static ssize_t sd_show_cache_type(struct class_device *cdev, char *buf) { struct scsi_disk *sdkp = to_scsi_disk(cdev); @@ -239,19 +223,10 @@ static ssize_t sd_show_fua(struct class_device *cdev, char *buf) return snprintf(buf, 20, "%u\n", sdkp->DPOFUA); } -static ssize_t sd_show_allow_restart(struct class_device *cdev, char *buf) -{ - struct scsi_disk *sdkp = to_scsi_disk(cdev); - - return snprintf(buf, 40, "%d\n", sdkp->device->allow_restart); -} - static struct class_device_attribute sd_disk_attrs[] = { __ATTR(cache_type, S_IRUGO|S_IWUSR, sd_show_cache_type, sd_store_cache_type), __ATTR(FUA, S_IRUGO, sd_show_fua, NULL), - __ATTR(allow_restart, S_IRUGO|S_IWUSR, sd_show_allow_restart, - sd_store_allow_restart), __ATTR_NULL, }; @@ -502,7 +477,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt) SCpnt->cmnd[4] = (unsigned char) this_count; SCpnt->cmnd[5] = 0; } - SCpnt->request_bufflen = this_count * sdp->sector_size; + SCpnt->request_bufflen = SCpnt->bufflen = + this_count * sdp->sector_size; /* * We shouldn't disconnect in the middle of a sector, so with a dumb @@ -915,10 +891,11 @@ static struct block_device_operations sd_fops = { static void sd_rw_intr(struct scsi_cmnd * SCpnt) { int result = SCpnt->result; - unsigned int xfer_size = SCpnt->request_bufflen; - unsigned int good_bytes = result ? 0 : xfer_size; - u64 start_lba = SCpnt->request->sector; - u64 bad_lba; + int this_count = SCpnt->bufflen; + int good_bytes = (result == 0 ? this_count : 0); + sector_t block_sectors = 1; + u64 first_err_block; + sector_t error_sector; struct scsi_sense_hdr sshdr; int sense_valid = 0; int sense_deferred = 0; @@ -929,6 +906,7 @@ static void sd_rw_intr(struct scsi_cmnd * SCpnt) if (sense_valid) sense_deferred = scsi_sense_is_deferred(&sshdr); } + #ifdef CONFIG_SCSI_LOGGING SCSI_LOG_HLCOMPLETE(1, printk("sd_rw_intr: %s: res=0x%x\n", SCpnt->request->rq_disk->disk_name, result)); @@ -938,72 +916,89 @@ static void sd_rw_intr(struct scsi_cmnd * SCpnt) sshdr.sense_key, sshdr.asc, sshdr.ascq)); } #endif - if (driver_byte(result) != DRIVER_SENSE && - (!sense_valid || sense_deferred)) - goto out; + /* + Handle MEDIUM ERRORs that indicate partial success. Since this is a + relatively rare error condition, no care is taken to avoid + unnecessary additional work such as memcpy's that could be avoided. + */ + if (driver_byte(result) != 0 && + sense_valid && !sense_deferred) { + switch (sshdr.sense_key) { + case MEDIUM_ERROR: + if (!blk_fs_request(SCpnt->request)) + break; + info_valid = scsi_get_sense_info_fld( + SCpnt->sense_buffer, SCSI_SENSE_BUFFERSIZE, + &first_err_block); + /* + * May want to warn and skip if following cast results + * in actual truncation (if sector_t < 64 bits) + */ + error_sector = (sector_t)first_err_block; + if (SCpnt->request->bio != NULL) + block_sectors = bio_sectors(SCpnt->request->bio); + switch (SCpnt->device->sector_size) { + case 1024: + error_sector <<= 1; + if (block_sectors < 2) + block_sectors = 2; + break; + case 2048: + error_sector <<= 2; + if (block_sectors < 4) + block_sectors = 4; + break; + case 4096: + error_sector <<=3; + if (block_sectors < 8) + block_sectors = 8; + break; + case 256: + error_sector >>= 1; + break; + default: + break; + } - switch (sshdr.sense_key) { - case HARDWARE_ERROR: - case MEDIUM_ERROR: - if (!blk_fs_request(SCpnt->request)) - goto out; - info_valid = scsi_get_sense_info_fld(SCpnt->sense_buffer, - SCSI_SENSE_BUFFERSIZE, - &bad_lba); - if (!info_valid) - goto out; - if (xfer_size <= SCpnt->device->sector_size) - goto out; - switch (SCpnt->device->sector_size) { - case 256: - start_lba <<= 1; + error_sector &= ~(block_sectors - 1); + good_bytes = (error_sector - SCpnt->request->sector) << 9; + if (good_bytes < 0 || good_bytes >= this_count) + good_bytes = 0; break; - case 512: - break; - case 1024: - start_lba >>= 1; - break; - case 2048: - start_lba >>= 2; + + case RECOVERED_ERROR: /* an error occurred, but it recovered */ + case NO_SENSE: /* LLDD got sense data */ + /* + * Inform the user, but make sure that it's not treated + * as a hard error. + */ + scsi_print_sense("sd", SCpnt); + SCpnt->result = 0; + memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); + good_bytes = this_count; break; - case 4096: - start_lba >>= 3; + + case ILLEGAL_REQUEST: + if (SCpnt->device->use_10_for_rw && + (SCpnt->cmnd[0] == READ_10 || + SCpnt->cmnd[0] == WRITE_10)) + SCpnt->device->use_10_for_rw = 0; + if (SCpnt->device->use_10_for_ms && + (SCpnt->cmnd[0] == MODE_SENSE_10 || + SCpnt->cmnd[0] == MODE_SELECT_10)) + SCpnt->device->use_10_for_ms = 0; break; + default: - /* Print something here with limiting frequency. */ - goto out; break; } - /* This computation should always be done in terms of - * the resolution of the device's medium. - */ - good_bytes = (bad_lba - start_lba)*SCpnt->device->sector_size; - break; - case RECOVERED_ERROR: - case NO_SENSE: - /* Inform the user, but make sure that it's not treated - * as a hard error. - */ - scsi_print_sense("sd", SCpnt); - SCpnt->result = 0; - memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); - good_bytes = xfer_size; - break; - case ILLEGAL_REQUEST: - if (SCpnt->device->use_10_for_rw && - (SCpnt->cmnd[0] == READ_10 || - SCpnt->cmnd[0] == WRITE_10)) - SCpnt->device->use_10_for_rw = 0; - if (SCpnt->device->use_10_for_ms && - (SCpnt->cmnd[0] == MODE_SENSE_10 || - SCpnt->cmnd[0] == MODE_SELECT_10)) - SCpnt->device->use_10_for_ms = 0; - break; - default: - break; } - out: - scsi_io_completion(SCpnt, good_bytes); + /* + * This calls the generic completion function, now that we know + * how many actual sectors finished, and how many sectors we need + * to say have failed. + */ + scsi_io_completion(SCpnt, good_bytes, block_sectors << 9); } static int media_not_present(struct scsi_disk *sdkp, diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index 2679ea8bf..0ff83ddf1 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c @@ -312,7 +312,7 @@ static Signature __initdata signatures[] = { {"IBM F1 V1.2009/22/93", 5, 25, FD}, }; -#define NUM_SIGNATURES ARRAY_SIZE(signatures) +#define NUM_SIGNATURES (sizeof(signatures) / sizeof(Signature)) #endif /* n OVERRIDE */ /* @@ -457,7 +457,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) * space for the on-board RAM instead. */ - for (i = 0; i < ARRAY_SIZE(seagate_bases); ++i) { + for (i = 0; i < (sizeof (seagate_bases) / sizeof (unsigned int)); ++i) { void __iomem *p = ioremap(seagate_bases[i], 0x2000); if (!p) continue; @@ -497,7 +497,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) return 0; hostno = instance->host_no; - if (request_irq (irq, do_seagate_reconnect_intr, IRQF_DISABLED, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) { + if (request_irq (irq, do_seagate_reconnect_intr, SA_INTERRUPT, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) { printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq); return 0; } @@ -1002,7 +1002,7 @@ connect_loop: } #endif - buffer = (struct scatterlist *) SCint->request_buffer; + buffer = (struct scatterlist *) SCint->buffer; len = buffer->length; data = page_address(buffer->page) + buffer->offset; } else { diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 34f9343ed..b09894244 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -18,8 +18,8 @@ * */ -static int sg_version_num = 30534; /* 2 digits for each component */ -#define SG_VERSION_STR "3.5.34" +static int sg_version_num = 30533; /* 2 digits for each component */ +#define SG_VERSION_STR "3.5.33" /* * D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes: @@ -28,6 +28,7 @@ static int sg_version_num = 30534; /* 2 digits for each component */ * (otherwise the macros compile to empty statements). * */ +#include #include #include @@ -60,7 +61,7 @@ static int sg_version_num = 30534; /* 2 digits for each component */ #ifdef CONFIG_SCSI_PROC_FS #include -static char *sg_version_date = "20060818"; +static char *sg_version_date = "20050908"; static int sg_proc_init(void); static void sg_proc_cleanup(void); @@ -1164,7 +1165,7 @@ sg_vma_nopage(struct vm_area_struct *vma, unsigned long addr, int *type) len = vma->vm_end - sa; len = (len < sg->length) ? len : sg->length; if (offset < len) { - page = virt_to_page(page_address(sg->page) + offset); + page = sg->page; get_page(page); /* increment page count */ break; } @@ -1401,7 +1402,6 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf) Sg_device *sdp = NULL; struct cdev * cdev = NULL; int error, k; - unsigned long iflags; disk = alloc_disk(1); if (!disk) { @@ -1429,7 +1429,7 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf) error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1); if (error) - goto cdev_add_err; + goto out; sdp->cdev = cdev; if (sg_sysfs_valid) { @@ -1456,13 +1456,6 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf) return 0; -cdev_add_err: - write_lock_irqsave(&sg_dev_arr_lock, iflags); - kfree(sg_dev_arr[k]); - sg_dev_arr[k] = NULL; - sg_nr_dev--; - write_unlock_irqrestore(&sg_dev_arr_lock, iflags); - out: put_disk(disk); if (cdev) @@ -2642,7 +2635,8 @@ static int sg_proc_init(void) { int k, mask; - int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); + int num_leaves = + sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]); struct proc_dir_entry *pdep; struct sg_proc_leaf * leaf; @@ -2667,7 +2661,8 @@ static void sg_proc_cleanup(void) { int k; - int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); + int num_leaves = + sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]); if (!sg_proc_sgp) return; diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index b27e85428..255886a9a 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c @@ -26,6 +26,7 @@ * */ +#include #include #include @@ -133,7 +134,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr, host->this_id = scsi_id; host->base = base_addr; host->irq = irq; - if (request_irq(irq, NCR_700_intr, IRQF_SHARED, "sim710", host)) { + if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) { printk(KERN_ERR "sim710: request_irq failed\n"); goto out_put_host; } diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index fae6e95a6..7c80711e1 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -217,7 +217,7 @@ int sr_media_change(struct cdrom_device_info *cdi, int slot) static void rw_intr(struct scsi_cmnd * SCpnt) { int result = SCpnt->result; - int this_count = SCpnt->request_bufflen; + int this_count = SCpnt->bufflen; int good_bytes = (result == 0 ? this_count : 0); int block_sectors = 0; long error_sector; @@ -292,7 +292,7 @@ static void rw_intr(struct scsi_cmnd * SCpnt) * how many actual sectors finished, and how many sectors we need * to say have failed. */ - scsi_io_completion(SCpnt, good_bytes); + scsi_io_completion(SCpnt, good_bytes, block_sectors << 9); } static int sr_init_command(struct scsi_cmnd * SCpnt) @@ -360,7 +360,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) "mismatch count %d, bytes %d\n", size, SCpnt->request_bufflen); if (SCpnt->request_bufflen > size) - SCpnt->request_bufflen = size; + SCpnt->request_bufflen = SCpnt->bufflen = size; } } @@ -387,7 +387,8 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) if (this_count > 0xffff) { this_count = 0xffff; - SCpnt->request_bufflen = this_count * s_size; + SCpnt->request_bufflen = SCpnt->bufflen = + this_count * s_size; } SCpnt->cmnd[2] = (unsigned char) (block >> 24) & 0xff; diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index a3e9d0f2e..9dde8df2f 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -34,6 +34,7 @@ * HP 6020 writers now supported. */ +#include #include #include #include diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 7f669b600..56cb49006 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -368,7 +368,7 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt) SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2], SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]); if (cmdstatp->have_sense) - __scsi_print_sense(name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE); + __scsi_print_sense("st", SRpnt->sense, SCSI_SENSE_BUFFERSIZE); } ) /* end DEB */ if (!debugging) { /* Abnormal conditions for tape */ if (!cmdstatp->have_sense) @@ -384,8 +384,9 @@ static int st_chk_result(struct scsi_tape *STp, struct st_request * SRpnt) scode != VOLUME_OVERFLOW && SRpnt->cmd[0] != MODE_SENSE && SRpnt->cmd[0] != TEST_UNIT_READY) { - - __scsi_print_sense(name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE); + printk(KERN_WARNING "%s: Error with sense data: ", name); + __scsi_print_sense("st", SRpnt->sense, + SCSI_SENSE_BUFFERSIZE); } } @@ -1192,7 +1193,7 @@ static int st_open(struct inode *inode, struct file *filp) /* Flush the tape buffer before close */ -static int st_flush(struct file *filp, fl_owner_t id) +static int st_flush(struct file *filp) { int result = 0, result2; unsigned char cmd[MAX_COMMAND_SIZE]; @@ -2817,7 +2818,7 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon (cmdstatp->sense_hdr.sense_key == NO_SENSE || cmdstatp->sense_hdr.sense_key == RECOVERED_ERROR) && undone == 0) { - ioctl_result = 0; /* EOF written successfully at EOM */ + ioctl_result = 0; /* EOF written succesfully at EOM */ if (fileno >= 0) fileno++; STps->drv_file = fileno; @@ -3598,6 +3599,7 @@ static struct st_buffer * tb->use_sg = max_sg; tb->frp = (struct st_buf_fragment *)(&(tb->sg[0]) + max_sg); + tb->in_use = 1; tb->dma = need_dma; tb->buffer_size = got; @@ -3837,7 +3839,7 @@ static int __init st_setup(char *str) break; } } - if (i >= ARRAY_SIZE(parms)) + if (i >= sizeof(parms) / sizeof(struct st_dev_parm)) printk(KERN_WARNING "st: invalid parameter in '%s'\n", stp); stp = strchr(stp, ','); diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h index 05a5cae12..411209048 100644 --- a/drivers/scsi/st.h +++ b/drivers/scsi/st.h @@ -31,6 +31,7 @@ struct st_request { /* The tape buffer descriptor. */ struct st_buffer { + unsigned char in_use; unsigned char dma; /* DMA-able buffer */ unsigned char do_dio; /* direct i/o set up? */ int buffer_size; diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 2f8073b73..25cced91c 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c @@ -517,7 +517,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) */ if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; + cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer); cmd->SCp.this_residual = cmd->SCp.buffer->length; @@ -535,6 +535,7 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd) } +#include #include #if 1 diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index 6b60536ac..cc990bed9 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c @@ -97,7 +97,7 @@ int sun3x_esp_detect(struct scsi_host_template *tpnt) esp->esp_command_dvma = dvma_vtob((unsigned long)esp->esp_command); esp->irq = 2; - if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, + if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, "SUN3X SCSI", esp->ehost)) { esp_deallocate(esp); return 0; @@ -332,11 +332,11 @@ static void dma_mmu_get_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp) struct scatterlist *sg = sp->SCp.buffer; while (sz >= 0) { - sg[sz].dma_address = dvma_map((unsigned long)page_address(sg[sz].page) + + sg[sz].dvma_address = dvma_map((unsigned long)page_address(sg[sz].page) + sg[sz].offset, sg[sz].length); sz--; } - sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dma_address); + sp->SCp.ptr=(char *)((unsigned long)sp->SCp.buffer->dvma_address); } static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp) @@ -347,17 +347,17 @@ static void dma_mmu_release_scsi_one (struct NCR_ESP *esp, Scsi_Cmnd *sp) static void dma_mmu_release_scsi_sgl (struct NCR_ESP *esp, Scsi_Cmnd *sp) { int sz = sp->use_sg - 1; - struct scatterlist *sg = (struct scatterlist *)sp->request_buffer; + struct scatterlist *sg = (struct scatterlist *)sp->buffer; while(sz >= 0) { - dvma_unmap((char *)sg[sz].dma_address); + dvma_unmap((char *)sg[sz].dvma_address); sz--; } } static void dma_advance_sg (Scsi_Cmnd *sp) { - sp->SCp.ptr = (char *)((unsigned long)sp->SCp.buffer->dma_address); + sp->SCp.ptr = (char *)((unsigned long)sp->SCp.buffer->dvma_address); } static int sun3x_esp_release(struct Scsi_Host *instance) diff --git a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h index 7519728df..481103769 100644 --- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h +++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h @@ -40,6 +40,7 @@ #ifndef SYM53C8XX_H #define SYM53C8XX_H +#include /* * DMA addressing mode. diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 739d3ef46..9c83b4d39 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -54,8 +54,14 @@ #define NAME53C "sym53c" #define NAME53C8XX "sym53c8xx" +/* SPARC just has to be different ... */ +#ifdef __sparc__ +#define IRQ_FMT "%s" +#define IRQ_PRM(x) __irq_itoa(x) +#else #define IRQ_FMT "%d" #define IRQ_PRM(x) (x) +#endif struct sym_driver_setup sym_driver_setup = SYM_LINUX_DRIVER_SETUP; unsigned int sym_debug_flags = 0; @@ -150,7 +156,7 @@ static void __unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd) switch(SYM_UCMD_PTR(cmd)->data_mapped) { case 2: - pci_unmap_sg(pdev, cmd->request_buffer, cmd->use_sg, dma_dir); + pci_unmap_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir); break; case 1: pci_unmap_single(pdev, SYM_UCMD_PTR(cmd)->data_mapping, @@ -180,7 +186,7 @@ static int __map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd) int use_sg; int dma_dir = cmd->sc_data_direction; - use_sg = pci_map_sg(pdev, cmd->request_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; @@ -370,7 +376,7 @@ static int sym_scatter(struct sym_hcb *np, struct sym_ccb *cp, struct scsi_cmnd if (!use_sg) segment = sym_scatter_no_sglist(np, cp, cmd); else if ((use_sg = map_scsi_sg_data(np, cmd)) > 0) { - struct scatterlist *scatter = (struct scatterlist *)cmd->request_buffer; + struct scatterlist *scatter = (struct scatterlist *)cmd->buffer; struct sym_tcb *tp = &np->target[cp->target]; struct sym_tblmove *data; @@ -1547,7 +1553,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, * If we synchonize the C code with SCRIPTS on interrupt, * we do not want to share the INTR line at all. */ - if (request_irq(pdev->irq, sym53c8xx_intr, IRQF_SHARED, NAME53C8XX, np)) { + if (request_irq(pdev->irq, sym53c8xx_intr, SA_SHIRQ, NAME53C8XX, np)) { printf_err("%s: request irq %d failure\n", sym_name(np), pdev->irq); goto attach_failed; @@ -2084,7 +2090,7 @@ static struct pci_device_id sym2_id_table[] __devinitdata = { { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C1510, - PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SCSI<<8, 0xffff00, 0UL }, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C896, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, { PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C895, diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h index e022d3c71..a446cda3f 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.h +++ b/drivers/scsi/sym53c8xx_2/sym_glue.h @@ -40,6 +40,7 @@ #ifndef SYM_GLUE_H #define SYM_GLUE_H +#include #include #include #include diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 940fa1e6f..a671bdc07 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c @@ -1276,7 +1276,8 @@ static struct sym_chip sym_dev_table[] = { FE_RAM|FE_IO256|FE_LEDC} }; -#define sym_num_devs (ARRAY_SIZE(sym_dev_table)) +#define sym_num_devs \ + (sizeof(sym_dev_table) / sizeof(sym_dev_table[0])) /* * Look up the chip table. diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index 2df6747cb..21305fc91 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c @@ -126,15 +126,15 @@ static struct override { unsigned long address; int irq; -} overrides +} overrides #ifdef T128_OVERRIDE [] __initdata = T128_OVERRIDE; #else - [4] __initdata = {{0, IRQ_AUTO}, {0, IRQ_AUTO}, + [4] __initdata = {{0, IRQ_AUTO}, {0, IRQ_AUTO}, {0 ,IRQ_AUTO}, {0, IRQ_AUTO}}; #endif -#define NO_OVERRIDES ARRAY_SIZE(overrides) +#define NO_OVERRIDES (sizeof(overrides) / sizeof(struct override)) static struct base { unsigned int address; @@ -143,7 +143,7 @@ static struct base { { 0xcc000, 0}, { 0xc8000, 0}, { 0xdc000, 0}, { 0xd8000, 0} }; -#define NO_BASES ARRAY_SIZE(bases) +#define NO_BASES (sizeof (bases) / sizeof (struct base)) static struct signature { const char *string; @@ -152,7 +152,7 @@ static struct signature { {"TSROM: SCSI BIOS, Version 1.12", 0x36}, }; -#define NO_SIGNATURES ARRAY_SIZE(signatures) +#define NO_SIGNATURES (sizeof (signatures) / sizeof (struct signature)) /* * Function : t128_setup(char *str, int *ints) @@ -260,7 +260,7 @@ found: instance->irq = NCR5380_probe_irq(instance, T128_IRQS); if (instance->irq != SCSI_IRQ_NONE) - if (request_irq(instance->irq, t128_intr, IRQF_DISABLED, "t128", instance)) { + if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) { printk("scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); instance->irq = SCSI_IRQ_NONE; diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 9404ff3d4..91322aff2 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c @@ -218,6 +218,7 @@ #endif #define DCBDEBUG1(x) C_NOP +#include #include #include #include @@ -2584,7 +2585,7 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev, /* Reset Pending INT */ DC390_read8_(INT_Status, io_port); - if (request_irq(pdev->irq, do_DC390_Interrupt, IRQF_SHARED, + if (request_irq(pdev->irq, do_DC390_Interrupt, SA_SHIRQ, "tmscsim", pACB)) { printk(KERN_ERR "DC390: register IRQ error!\n"); goto out_release_region; diff --git a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h index 9b66fa8d3..d4495272f 100644 --- a/drivers/scsi/tmscsim.h +++ b/drivers/scsi/tmscsim.h @@ -9,6 +9,7 @@ #define _TMSCSIM_H #include +#include #define SCSI_IRQ_NONE 255 diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 57449611e..33cd90fc6 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c @@ -405,6 +405,7 @@ * the driver sets host->wish_block = TRUE for all ISA boards. */ +#include #include #include #include @@ -872,7 +873,7 @@ static int port_detect \ /* Board detected, allocate its IRQ */ if (request_irq(irq, do_interrupt_handler, - IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0), + SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), driver_name, (void *) &sha[j])) { printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); goto freelock; diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 2083454db..d8a72609a 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c @@ -71,6 +71,7 @@ * Richard Hirst August 2000 */ +#include #include #include @@ -373,7 +374,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, */ if (cmd->use_sg) { - cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; + cmd->SCp.buffer = (struct scatterlist *) cmd->buffer; cmd->SCp.buffers_residual = cmd->use_sg - 1; cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset; @@ -938,7 +939,6 @@ wd33c93_intr(struct Scsi_Host *instance) DB(DB_INTR, printk("%02x", cmd->SCp.Status)) if (hostdata->level2 >= L2_BASIC) { sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ - udelay(7); hostdata->state = S_RUNNING_LEVEL2; write_wd33c93(regs, WD_COMMAND_PHASE, 0x50); write_wd33c93_cmd(regs, WD_CMD_SEL_ATN_XFER); @@ -955,7 +955,6 @@ wd33c93_intr(struct Scsi_Host *instance) msg = read_1_byte(regs); sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ - udelay(7); hostdata->incoming_msg[hostdata->incoming_ptr] = msg; if (hostdata->incoming_msg[0] == EXTENDED_MESSAGE) @@ -1359,7 +1358,6 @@ wd33c93_intr(struct Scsi_Host *instance) } else { /* Verify this is a change to MSG_IN and read the message */ sr = read_wd33c93(regs, WD_SCSI_STATUS); - udelay(7); if (sr == (CSR_ABORT | PHS_MESS_IN) || sr == (CSR_UNEXP | PHS_MESS_IN) || sr == (CSR_SRV_REQ | PHS_MESS_IN)) { @@ -1376,7 +1374,6 @@ wd33c93_intr(struct Scsi_Host *instance) asr); } sr = read_wd33c93(regs, WD_SCSI_STATUS); - udelay(7); if (sr != CSR_MSGIN) printk ("wd33c93: Not paused with ACK on RESEL (%02x)\n", @@ -1704,7 +1701,7 @@ wd33c93_abort(struct scsi_cmnd * cmd) } #define MAX_WD33C93_HOSTS 4 -#define MAX_SETUP_ARGS ARRAY_SIZE(setup_args) +#define MAX_SETUP_ARGS ((int)(sizeof(setup_args) / sizeof(char *))) #define SETUP_BUFFER_SIZE 200 static char setup_buffer[SETUP_BUFFER_SIZE]; static char setup_used[MAX_SETUP_ARGS]; diff --git a/drivers/scsi/wd33c93.h b/drivers/scsi/wd33c93.h index edcb0365c..193ec517d 100644 --- a/drivers/scsi/wd33c93.h +++ b/drivers/scsi/wd33c93.h @@ -22,6 +22,7 @@ #ifndef WD33C93_H #define WD33C93_H +#include #define PROC_INTERFACE /* add code for /proc/scsi/wd33c93/xxx interface */ #ifdef PROC_INTERFACE diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index a0b61af48..fb54a87a8 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c @@ -267,7 +267,7 @@ static const long wd7000_biosaddr[] = { 0xc0000, 0xc2000, 0xc4000, 0xc6000, 0xc8000, 0xca000, 0xcc000, 0xce000, 0xd0000, 0xd2000, 0xd4000, 0xd6000, 0xd8000, 0xda000, 0xdc000, 0xde000 }; -#define NUM_ADDRS ARRAY_SIZE(wd7000_biosaddr) +#define NUM_ADDRS (sizeof(wd7000_biosaddr)/sizeof(long)) static const unsigned short wd7000_iobase[] = { 0x0300, 0x0308, 0x0310, 0x0318, 0x0320, 0x0328, 0x0330, 0x0338, @@ -275,13 +275,13 @@ static const unsigned short wd7000_iobase[] = { 0x0380, 0x0388, 0x0390, 0x0398, 0x03a0, 0x03a8, 0x03b0, 0x03b8, 0x03c0, 0x03c8, 0x03d0, 0x03d8, 0x03e0, 0x03e8, 0x03f0, 0x03f8 }; -#define NUM_IOPORTS ARRAY_SIZE(wd7000_iobase) +#define NUM_IOPORTS (sizeof(wd7000_iobase)/sizeof(unsigned short)) static const short wd7000_irq[] = { 3, 4, 5, 7, 9, 10, 11, 12, 14, 15 }; -#define NUM_IRQS ARRAY_SIZE(wd7000_irq) +#define NUM_IRQS (sizeof(wd7000_irq)/sizeof(short)) static const short wd7000_dma[] = { 5, 6, 7 }; -#define NUM_DMAS ARRAY_SIZE(wd7000_dma) +#define NUM_DMAS (sizeof(wd7000_dma)/sizeof(short)) /* * The following is set up by wd7000_detect, and used thereafter for @@ -317,7 +317,7 @@ static Config configs[] = { {7, 6, 0x350, BUS_ON, BUS_OFF}, /* My configuration (Zaga) */ {-1, -1, 0x0, BUS_ON, BUS_OFF} /* Empty slot */ }; -#define NUM_CONFIGS ARRAY_SIZE(configs) +#define NUM_CONFIGS (sizeof(configs)/sizeof(Config)) /* * The following list defines strings to look for in the BIOS that identify @@ -333,7 +333,7 @@ typedef struct signature { static const Signature signatures[] = { {"SSTBIOS", 0x0000d, 7} /* "SSTBIOS" @ offset 0x0000d */ }; -#define NUM_SIGNATURES ARRAY_SIZE(signatures) +#define NUM_SIGNATURES (sizeof(signatures)/sizeof(Signature)) /* @@ -1250,7 +1250,7 @@ static int wd7000_init(Adapter * host) return 0; - if (request_irq(host->irq, wd7000_intr, IRQF_DISABLED, "wd7000", host)) { + if (request_irq(host->irq, wd7000_intr, SA_INTERRUPT, "wd7000", host)) { printk("wd7000_init: can't get IRQ %d.\n", host->irq); return (0); } @@ -1391,7 +1391,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start, * */ -static __init int wd7000_detect(struct scsi_host_template *tpnt) +static int wd7000_detect(struct scsi_host_template *tpnt) { short present = 0, biosaddr_ptr, sig_ptr, i, pass; short biosptr[NUM_CONFIGS]; diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c index 4b5f908d3..a6cfbb3b3 100644 --- a/drivers/scsi/zalon.c +++ b/drivers/scsi/zalon.c @@ -136,7 +136,7 @@ zalon_probe(struct parisc_device *dev) if (!host) goto fail; - if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) { + if (request_irq(dev->irq, ncr53c8xx_intr, SA_SHIRQ, "zalon", host)) { printk(KERN_ERR "%s: irq problem with %d, detaching\n ", dev->dev.bus_id, dev->irq); goto fail; diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 57438326b..7572665a8 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c @@ -7,6 +7,7 @@ * * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ */ +#include #include #include #include @@ -478,6 +479,7 @@ static struct uart_driver serial21285_reg = { .owner = THIS_MODULE, .driver_name = "ttyFB", .dev_name = "ttyFB", + .devfs_name = "ttyFB", .major = SERIAL_21285_MAJOR, .minor = SERIAL_21285_MINOR, .nr = 1, diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index 993a70242..b88a7c115 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -130,6 +131,17 @@ static int m68328_console_baud = CONSOLE_BAUD_RATE; static int m68328_console_cbaud = DEFAULT_CBAUD; +/* + * tmp_buf is used as a temporary buffer by serial_write. We need to + * lock it in case the memcpy_fromfs blocks while swapping in a page, + * and some other program tries to do a serial write at the same time. + * Since the lock will only come under contention when the system is + * swapping and available memory is low, it makes sense to share one + * buffer across all the serial ports, since it significantly saves + * memory if large numbers of serial ports are open. + */ +static unsigned char tmp_buf[SERIAL_XMIT_SIZE]; /* This is cheating */ + static inline int serial_paranoia_check(struct m68k_serial *info, char *name, const char *routine) { @@ -199,16 +211,16 @@ static void rs_stop(struct tty_struct *tty) if (serial_paranoia_check(info, tty->name, "rs_stop")) return; - local_irq_save(flags); + save_flags(flags); cli(); uart->ustcnt &= ~USTCNT_TXEN; - local_irq_restore(flags); + restore_flags(flags); } static void rs_put_char(char ch) { int flags, loops = 0; - local_irq_save(flags); + save_flags(flags); cli(); while (!(UTX & UTX_TX_AVAIL) && (loops < 1000)) { loops++; @@ -217,7 +229,7 @@ static void rs_put_char(char ch) UTX_TXDATA = ch; udelay(5); - local_irq_restore(flags); + restore_flags(flags); } static void rs_start(struct tty_struct *tty) @@ -229,7 +241,7 @@ static void rs_start(struct tty_struct *tty) if (serial_paranoia_check(info, tty->name, "rs_start")) return; - local_irq_save(flags); + save_flags(flags); cli(); if (info->xmit_cnt && info->xmit_buf && !(uart->ustcnt & USTCNT_TXEN)) { #ifdef USE_INTS uart->ustcnt |= USTCNT_TXEN | USTCNT_TX_INTR_MASK; @@ -237,7 +249,7 @@ static void rs_start(struct tty_struct *tty) uart->ustcnt |= USTCNT_TXEN; #endif } - local_irq_restore(flags); + restore_flags(flags); } /* Drop into either the boot monitor or kadb upon receiving a break @@ -315,6 +327,14 @@ static void receive_chars(struct m68k_serial *info, struct pt_regs *regs, if(!tty) goto clear_and_exit; + /* + * Make sure that we do not overflow the buffer + */ + if (tty_request_buffer_room(tty, 1) == 0) { + tty_schedule_flip(tty); + return; + } + flag = TTY_NORMAL; if(rx & URX_PARITY_ERROR) { @@ -453,7 +473,7 @@ static int startup(struct m68k_serial * info) return -ENOMEM; } - local_irq_save(flags); + save_flags(flags); cli(); /* * Clear the FIFO buffers and disable them @@ -486,7 +506,7 @@ static int startup(struct m68k_serial * info) change_speed(info); info->flags |= S_INITIALIZED; - local_irq_restore(flags); + restore_flags(flags); return 0; } @@ -503,7 +523,7 @@ static void shutdown(struct m68k_serial * info) if (!(info->flags & S_INITIALIZED)) return; - local_irq_save(flags); + save_flags(flags); cli(); /* Disable interrupts */ if (info->xmit_buf) { free_page((unsigned long) info->xmit_buf); @@ -514,7 +534,7 @@ static void shutdown(struct m68k_serial * info) set_bit(TTY_IO_ERROR, &info->tty->flags); info->flags &= ~S_INITIALIZED; - local_irq_restore(flags); + restore_flags(flags); } struct { @@ -635,24 +655,24 @@ static void rs_fair_output(void) if (info == 0) return; if (info->xmit_buf == 0) return; - local_irq_save(flags); + save_flags(flags); cli(); left = info->xmit_cnt; while (left != 0) { c = info->xmit_buf[info->xmit_tail]; info->xmit_tail = (info->xmit_tail+1) & (SERIAL_XMIT_SIZE-1); info->xmit_cnt--; - local_irq_restore(flags); + restore_flags(flags); rs_put_char(c); - local_irq_save(flags); + save_flags(flags); cli(); left = min(info->xmit_cnt, left-1); } /* Last character is being transmitted now (hopefully). */ udelay(5); - local_irq_restore(flags); + restore_flags(flags); return; } @@ -700,11 +720,11 @@ static void rs_flush_chars(struct tty_struct *tty) #endif /* Enable transmitter */ - local_irq_save(flags); + save_flags(flags); cli(); if (info->xmit_cnt <= 0 || tty->stopped || tty->hw_stopped || !info->xmit_buf) { - local_irq_restore(flags); + restore_flags(flags); return; } @@ -729,7 +749,7 @@ static void rs_flush_chars(struct tty_struct *tty) while (!(uart->utx.w & UTX_TX_AVAIL)) udelay(5); } #endif - local_irq_restore(flags); + restore_flags(flags); } extern void console_printn(const char * b, int count); @@ -748,22 +768,18 @@ static int rs_write(struct tty_struct * tty, if (!tty || !info->xmit_buf) return 0; - local_save_flags(flags); + save_flags(flags); while (1) { - local_irq_disable(); + cli(); c = min_t(int, count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); - local_irq_restore(flags); - if (c <= 0) break; memcpy(info->xmit_buf + info->xmit_head, buf, c); - - local_irq_disable(); info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); info->xmit_cnt += c; - local_irq_restore(flags); + restore_flags(flags); buf += c; count -= c; total += c; @@ -771,7 +787,7 @@ static int rs_write(struct tty_struct * tty, if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) { /* Enable transmitter */ - local_irq_disable(); + cli(); #ifndef USE_INTS while(info->xmit_cnt) { #endif @@ -791,9 +807,9 @@ static int rs_write(struct tty_struct * tty, #ifndef USE_INTS } #endif - local_irq_restore(flags); + restore_flags(flags); } - + restore_flags(flags); return total; } @@ -822,13 +838,12 @@ static int rs_chars_in_buffer(struct tty_struct *tty) static void rs_flush_buffer(struct tty_struct *tty) { struct m68k_serial *info = (struct m68k_serial *)tty->driver_data; - unsigned long flags; if (serial_paranoia_check(info, tty->name, "rs_flush_buffer")) return; - local_irq_save(flags); + cli(); info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; - local_irq_restore(flags); + sti(); tty_wakeup(tty); } @@ -958,15 +973,14 @@ static int get_lsr_info(struct m68k_serial * info, unsigned int *value) m68328_uart *uart = &uart_addr[info->line]; #endif unsigned char status; - unsigned long flags; - local_irq_save(flags); + cli(); #ifdef CONFIG_SERIAL_68328_RTS_CTS status = (uart->utx.w & UTX_CTS_STAT) ? 1 : 0; #else status = 0; #endif - local_irq_restore(flags); + sti(); put_user(status,value); return 0; } @@ -980,13 +994,14 @@ static void send_break(struct m68k_serial * info, unsigned int duration) unsigned long flags; if (!info->port) return; - local_irq_save(flags); + save_flags(flags); + cli(); #ifdef USE_INTS uart->utx.w |= UTX_SEND_BREAK; msleep_interruptible(duration); uart->utx.w &= ~UTX_SEND_BREAK; #endif - local_irq_restore(flags); + restore_flags(flags); } static int rs_ioctl(struct tty_struct *tty, struct file * file, @@ -1045,7 +1060,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file, (struct serial_struct *) arg); case TIOCSERGETLSR: /* Get line status register */ if (access_ok(VERIFY_WRITE, (void *) arg, - sizeof(unsigned int))) + sizeof(unsigned int)); return get_lsr_info(info, (unsigned int *) arg); return -EFAULT; case TIOCSERGSTRUCT: @@ -1098,10 +1113,10 @@ static void rs_close(struct tty_struct *tty, struct file * filp) if (!info || serial_paranoia_check(info, tty->name, "rs_close")) return; - local_irq_save(flags); + save_flags(flags); cli(); if (tty_hung_up_p(filp)) { - local_irq_restore(flags); + restore_flags(flags); return; } @@ -1123,7 +1138,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) info->count = 0; } if (info->count) { - local_irq_restore(flags); + restore_flags(flags); return; } info->flags |= S_CLOSING; @@ -1171,7 +1186,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) } info->flags &= ~(S_NORMAL_ACTIVE|S_CLOSING); wake_up_interruptible(&info->close_wait); - local_irq_restore(flags); + restore_flags(flags); } /* @@ -1247,9 +1262,9 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, info->count--; info->blocked_open++; while (1) { - local_irq_disable(); + cli(); m68k_rtsdtr(info, 1); - local_irq_enable(); + sti(); current->state = TASK_INTERRUPTIBLE; if (tty_hung_up_p(filp) || !(info->flags & S_INITIALIZED)) { @@ -1429,7 +1444,7 @@ rs68328_init(void) return -ENOMEM; } - local_irq_save(flags); + save_flags(flags); cli(); for(i=0;idata = info; #endif } - local_irq_restore(flags); + restore_flags(flags); return 0; } diff --git a/drivers/serial/68328serial.h b/drivers/serial/68328serial.h index 58aa21546..978f8a609 100644 --- a/drivers/serial/68328serial.h +++ b/drivers/serial/68328serial.h @@ -11,6 +11,7 @@ #ifndef _MC683XX_SERIAL_H #define _MC683XX_SERIAL_H +#include struct serial_struct { int type; diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index e80e70e9b..9843ae3d4 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c @@ -20,6 +20,7 @@ * int rs_360_init(void); */ +#include #include #include #include diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index fd8b94e8d..968597781 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -22,6 +22,7 @@ * mapbase is the physical address of the IO port. * membase is an 'ioremapped' cookie. */ +#include #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -51,7 +52,7 @@ /* * Configuration: - * share_irqs - whether we pass IRQF_SHARED to request_irq(). This option + * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option * is unsafe when used on edge-triggered interrupts. */ static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; @@ -302,7 +303,6 @@ static inline int map_8250_out_reg(struct uart_8250_port *up, int offset) static unsigned int serial_in(struct uart_8250_port *up, int offset) { - unsigned int tmp; offset = map_8250_in_reg(up, offset) << up->port.regshift; switch (up->port.iotype) { @@ -321,13 +321,6 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset) return __raw_readl(up->port.membase + offset); #endif - case UPIO_TSI: - if (offset == UART_IIR) { - tmp = readl((u32 *)(up->port.membase + UART_RX)); - return (cpu_to_le32(tmp) >> 8) & 0xff; - } else - return readb(up->port.membase + offset); - default: return inb(up->port.iobase + offset); } @@ -357,10 +350,6 @@ serial_out(struct uart_8250_port *up, int offset, int value) __raw_writel(value, up->port.membase + offset); break; #endif - case UPIO_TSI: - if (!((offset == UART_IER) && (value & UART_IER_UUE))) - writeb(value, up->port.membase + offset); - break; default: outb(value, up->port.iobase + offset); @@ -1415,7 +1404,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_8250_port *up) static int serial_link_irq_chain(struct uart_8250_port *up) { struct irq_info *i = irq_lists + up->port.irq; - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; + int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; spin_lock_irq(&i->lock); @@ -2397,6 +2386,7 @@ int __init serial8250_start_console(struct uart_port *port, char *options) static struct uart_driver serial8250_reg = { .owner = THIS_MODULE, .driver_name = "serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = 64, diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index 91bd28f2b..490606b87 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h @@ -15,6 +15,7 @@ * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ */ +#include #include struct old_serial_port { diff --git a/drivers/serial/8250_mca.c b/drivers/serial/8250_mca.c index d10be944a..ac205256d 100644 --- a/drivers/serial/8250_mca.c +++ b/drivers/serial/8250_mca.c @@ -8,6 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 851e4839d..94886c000 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -134,7 +134,7 @@ afavlab_setup(struct serial_private *priv, struct pciserial_board *board, * and Keystone have one Diva chip with 3 UARTs. Some later machines have * one Diva chip, but it has been expanded to 5 UARTs. */ -static int pci_hp_diva_init(struct pci_dev *dev) +static int __devinit pci_hp_diva_init(struct pci_dev *dev) { int rc = 0; @@ -194,7 +194,7 @@ pci_hp_diva_setup(struct serial_private *priv, struct pciserial_board *board, /* * Added for EKF Intel i960 serial boards */ -static int pci_inteli960ni_init(struct pci_dev *dev) +static int __devinit pci_inteli960ni_init(struct pci_dev *dev) { unsigned long oldval; @@ -216,7 +216,7 @@ static int pci_inteli960ni_init(struct pci_dev *dev) * seems to be mainly needed on card using the PLX which also use I/O * mapped memory. */ -static int pci_plx9050_init(struct pci_dev *dev) +static int __devinit pci_plx9050_init(struct pci_dev *dev) { u8 irq_config; void __iomem *p; @@ -314,7 +314,7 @@ sbs_setup(struct serial_private *priv, struct pciserial_board *board, /* global control register offset for SBS PMC-OctalPro */ #define OCT_REG_CR_OFF 0x500 -static int sbs_init(struct pci_dev *dev) +static int __devinit sbs_init(struct pci_dev *dev) { u8 __iomem *p; @@ -458,11 +458,11 @@ static int pci_siig_setup(struct serial_private *priv, * growing *huge*, we use this function to collapse some 70 entries * in the PCI table into one, for sanity's and compactness's sake. */ -static const unsigned short timedia_single_port[] = { +static unsigned short timedia_single_port[] = { 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 }; -static const unsigned short timedia_dual_port[] = { +static unsigned short timedia_dual_port[] = { 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, @@ -470,34 +470,35 @@ static const unsigned short timedia_dual_port[] = { 0xD079, 0 }; -static const unsigned short timedia_quad_port[] = { +static unsigned short timedia_quad_port[] = { 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, 0xB157, 0 }; -static const unsigned short timedia_eight_port[] = { +static unsigned short timedia_eight_port[] = { 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 }; static const struct timedia_struct { int num; - const unsigned short *ids; + unsigned short *ids; } timedia_data[] = { { 1, timedia_single_port }, { 2, timedia_dual_port }, { 4, timedia_quad_port }, - { 8, timedia_eight_port } + { 8, timedia_eight_port }, + { 0, NULL } }; -static int pci_timedia_init(struct pci_dev *dev) +static int __devinit pci_timedia_init(struct pci_dev *dev) { - const unsigned short *ids; + unsigned short *ids; int i, j; - for (i = 0; i < ARRAY_SIZE(timedia_data); i++) { + for (i = 0; timedia_data[i].num; i++) { ids = timedia_data[i].ids; for (j = 0; ids[j]; j++) if (dev->subsystem_device == ids[j]) @@ -565,13 +566,13 @@ titan_400l_800l_setup(struct serial_private *priv, return setup_port(priv, port, bar, offset, board->reg_shift); } -static int pci_xircom_init(struct pci_dev *dev) +static int __devinit pci_xircom_init(struct pci_dev *dev) { msleep(100); return 0; } -static int pci_netmos_init(struct pci_dev *dev) +static int __devinit pci_netmos_init(struct pci_dev *dev) { /* subdevice 0x00PS means

parallel, serial */ unsigned int num_serial = dev->subsystem_device & 0xf; @@ -593,8 +594,8 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board, else offset += idx * board->uart_offset; - maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >> - (board->reg_shift + 3); + maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) / + (8 << board->reg_shift); if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) return 1; @@ -621,7 +622,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board, */ static struct pci_serial_quirk pci_serial_quirks[] = { /* - * AFAVLAB cards - these may be called via parport_serial + * AFAVLAB cards. * It is not clear whether this applies to all products. */ { @@ -753,7 +754,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = { .exit = __devexit_p(sbs_exit), }, /* - * SIIG cards - these may be called via parport_serial + * SIIG cards. */ { .vendor = PCI_VENDOR_ID_SIIG, @@ -810,7 +811,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = { .setup = pci_default_setup, }, /* - * Netmos cards - these may be called via parport_serial + * Netmos cards */ { .vendor = PCI_VENDOR_ID_NETMOS, @@ -935,7 +936,6 @@ enum pci_board_num_t { pbn_b1_8_1382400, pbn_b2_1_115200, - pbn_b2_2_115200, pbn_b2_8_115200, pbn_b2_1_460800, @@ -1243,12 +1243,6 @@ static struct pciserial_board pci_boards[] __devinitdata = { .base_baud = 115200, .uart_offset = 8, }, - [pbn_b2_2_115200] = { - .flags = FL_BASE2, - .num_ports = 2, - .base_baud = 115200, - .uart_offset = 8, - }, [pbn_b2_8_115200] = { .flags = FL_BASE2, .num_ports = 8, @@ -2345,13 +2339,6 @@ static struct pci_device_id serial_pci_tbl[] = { PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_b0_1_115200 }, - /* - * IntaShield IS-200 - */ - { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ - pbn_b2_2_115200 }, - /* * These entries match devices with class COMMUNICATION_SERIAL, * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index 632f62d6e..b79ed0665 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c @@ -323,10 +323,8 @@ static const struct pnp_device_id pnp_dev_table[] = { { "USR9180", 0 }, /* U.S. Robotics 56K Voice INT PnP*/ { "USR9190", 0 }, - /* Wacom tablets */ - { "WACF004", 0 }, + /* HP Compaq Tablet PC tc1100 Wacom tablet */ { "WACF005", 0 }, - { "WACF006", 0 }, /* Rockwell's (PORALiNK) 33600 INT PNP */ { "WCI0003", 0 }, /* Unkown PnP modems */ @@ -431,8 +429,6 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) #endif port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; - if (pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE) - port.flags |= UPF_SHARE_IRQ; port.uartclk = 1843200; port.dev = &dev->dev; diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 48f0eef5f..d2716173d 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -301,22 +301,21 @@ config SERIAL_AMBA_PL011_CONSOLE kernel at boot time.) config SERIAL_AT91 - bool "AT91RM9200 / AT91SAM9261 serial port support" - depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) + bool "AT91RM9200 serial port support" + depends on ARM && ARCH_AT91RM9200 select SERIAL_CORE help - This enables the driver for the on-chip UARTs of the Atmel - AT91RM9200 and AT91SAM926 processor. + This enables the driver for the on-chip UARTs of the AT91RM9200 + processor. config SERIAL_AT91_CONSOLE - bool "Support for console on AT91RM9200 / AT91SAM9261 serial port" + bool "Support for console on AT91RM9200 serial port" depends on SERIAL_AT91=y select SERIAL_CORE_CONSOLE help - Say Y here if you wish to use a UART on the Atmel AT91RM9200 or - AT91SAM9261 as the system console (the system console is the device - which receives all kernel messages and warnings and which allows - logins in single user mode). + Say Y here if you wish to use a UART on the AT91RM9200 as the system + console (the system console is the device which receives all kernel + messages and warnings and which allows logins in single user mode). config SERIAL_AT91_TTYAT bool "Install as device ttyAT0-4 instead of ttyS0-4" @@ -355,24 +354,21 @@ config SERIAL_CLPS711X_CONSOLE kernel at boot time.) config SERIAL_S3C2410 - tristate "Samsung S3C2410/S3C2440/S3C2442/S3C2412 Serial port support" + tristate "Samsung S3C2410 Serial port support" depends on ARM && ARCH_S3C2410 select SERIAL_CORE help - Support for the on-chip UARTs on the Samsung S3C24XX series CPUs, + Support for the on-chip UARTs on the Samsung S3C2410X CPU, providing /dev/ttySAC0, 1 and 2 (note, some machines may not provide all of these ports, depending on how the serial port pins are configured. - Currently this driver supports the UARTS on the S3C2410, S3C2440, - S3C2442, S3C2412 and S3C2413 CPUs. - config SERIAL_S3C2410_CONSOLE bool "Support for console on S3C2410 serial port" depends on SERIAL_S3C2410=y select SERIAL_CORE_CONSOLE help - Allow selection of the S3C24XX on-board serial ports for use as + Allow selection of the S3C2410 on-board serial ports for use as an virtual console. Even if you say Y here, the currently visible virtual console @@ -808,6 +804,7 @@ config SERIAL_MPC52xx tristate "Freescale MPC52xx family PSC serial support" depends on PPC_MPC52xx select SERIAL_CORE + select FW_LOADER help This drivers support the MPC52xx PSC serial ports. If you would like to use them, you must answer Y or M to this option. Not that @@ -941,23 +938,4 @@ config SERIAL_SGI_IOC3 If you have an SGI Altix with an IOC3 serial card, say Y or M. Otherwise, say N. -config SERIAL_NETX - bool "NetX serial port support" - depends on ARM && ARCH_NETX - select SERIAL_CORE - help - If you have a machine based on a Hilscher NetX SoC you - can enable its onboard serial port by enabling this option. - - To compile this driver as a module, choose M here: the - module will be called netx-serial. - -config SERIAL_NETX_CONSOLE - bool "Console on NetX serial port" - depends on SERIAL_NETX - select SERIAL_CORE_CONSOLE - help - If you have enabled the serial port on the Motorola IMX - CPU you can make it the console by answering Y to this option. - endmenu diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 927faee03..0a71bf68a 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -55,4 +55,3 @@ obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o obj-$(CONFIG_SERIAL_AT91) += at91_serial.o -obj-$(CONFIG_SERIAL_NETX) += netx-serial.o diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 7311d8487..163141400 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c @@ -31,6 +31,7 @@ * required, these have to be supplied via some other means (eg, GPIO) * and hooked into this driver. */ +#include #if defined(CONFIG_SERIAL_AMBA_PL010_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -51,7 +52,7 @@ #include -#define UART_NR 8 +#define UART_NR 2 #define SERIAL_AMBA_MAJOR 204 #define SERIAL_AMBA_MINOR 16 diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index a8d7124e8..3d966cfc9 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -31,6 +31,7 @@ * required, these have to be supplied via some other means (eg, GPIO) * and hooked into this driver. */ +#include #if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c index 54c6b2adf..6547fe0ce 100644 --- a/drivers/serial/at91_serial.c +++ b/drivers/serial/at91_serial.c @@ -2,6 +2,7 @@ * linux/drivers/char/at91_serial.c * * Driver for Atmel AT91RM9200 Serial ports + * * Copyright (C) 2003 Rick Bronson * * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd. @@ -22,26 +23,24 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include -#include -#include +#include #include -#include -#include +#include + #if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -68,6 +67,7 @@ #endif +#define AT91_VA_BASE_DBGU ((unsigned long) AT91_VA_BASE_SYS + AT91_DBGU) #define AT91_ISR_PASS_LIMIT 256 #define UART_PUT_CR(port,v) writel(v, (port)->membase + AT91_US_CR) @@ -87,33 +87,16 @@ /* PDC registers */ #define UART_PUT_PTCR(port,v) writel(v, (port)->membase + AT91_PDC_PTCR) -#define UART_GET_PTSR(port) readl((port)->membase + AT91_PDC_PTSR) - #define UART_PUT_RPR(port,v) writel(v, (port)->membase + AT91_PDC_RPR) -#define UART_GET_RPR(port) readl((port)->membase + AT91_PDC_RPR) #define UART_PUT_RCR(port,v) writel(v, (port)->membase + AT91_PDC_RCR) +#define UART_GET_RCR(port) readl((port)->membase + AT91_PDC_RCR) #define UART_PUT_RNPR(port,v) writel(v, (port)->membase + AT91_PDC_RNPR) #define UART_PUT_RNCR(port,v) writel(v, (port)->membase + AT91_PDC_RNCR) -#define UART_PUT_TPR(port,v) writel(v, (port)->membase + AT91_PDC_TPR) -#define UART_PUT_TCR(port,v) writel(v, (port)->membase + AT91_PDC_TCR) -//#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + AT91_PDC_TNPR) -//#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + AT91_PDC_TNCR) static int (*at91_open)(struct uart_port *); static void (*at91_close)(struct uart_port *); -/* - * We wrap our port structure around the generic uart_port. - */ -struct at91_uart_port { - struct uart_port uart; /* uart */ - struct clk *clk; /* uart clock */ - unsigned short suspended; /* is port suspended? */ -}; - -static struct at91_uart_port at91_ports[AT91_NR_UART]; - #ifdef SUPPORT_SYSRQ static struct console at91_console; #endif @@ -132,19 +115,16 @@ static u_int at91_tx_empty(struct uart_port *port) static void at91_set_mctrl(struct uart_port *port, u_int mctrl) { unsigned int control = 0; - unsigned int mode; - if (arch_identify() == ARCH_ID_AT91RM9200) { - /* - * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. - * We need to drive the pin manually. - */ - if (port->mapbase == AT91_BASE_US0) { - if (mctrl & TIOCM_RTS) - at91_set_gpio_value(AT91_PIN_PA21, 0); - else - at91_set_gpio_value(AT91_PIN_PA21, 1); - } + /* + * Errata #39: RTS0 is not internally connected to PA21. We need to drive + * the pin manually. + */ + if (port->mapbase == AT91_VA_BASE_US0) { + if (mctrl & TIOCM_RTS) + at91_sys_write(AT91_PIOA + PIO_CODR, AT91_PA21_RTS0); + else + at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); } if (mctrl & TIOCM_RTS) @@ -157,15 +137,7 @@ static void at91_set_mctrl(struct uart_port *port, u_int mctrl) else control |= AT91_US_DTRDIS; - UART_PUT_CR(port, control); - - /* Local loopback mode? */ - mode = UART_GET_MR(port) & ~AT91_US_CHMODE; - if (mctrl & TIOCM_LOOP) - mode |= AT91_US_CHMODE_LOC_LOOP; - else - mode |= AT91_US_CHMODE_NORMAL; - UART_PUT_MR(port, mode); + UART_PUT_CR(port,control); } /* @@ -197,9 +169,8 @@ static u_int at91_get_mctrl(struct uart_port *port) */ static void at91_stop_tx(struct uart_port *port) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - UART_PUT_IDR(port, AT91_US_TXRDY); + port->read_status_mask &= ~AT91_US_TXRDY; } /* @@ -207,8 +178,7 @@ static void at91_stop_tx(struct uart_port *port) */ static void at91_start_tx(struct uart_port *port) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - + port->read_status_mask |= AT91_US_TXRDY; UART_PUT_IER(port, AT91_US_TXRDY); } @@ -217,8 +187,6 @@ static void at91_start_tx(struct uart_port *port) */ static void at91_stop_rx(struct uart_port *port) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - UART_PUT_IDR(port, AT91_US_RXRDY); } @@ -227,6 +195,7 @@ static void at91_stop_rx(struct uart_port *port) */ static void at91_enable_ms(struct uart_port *port) { + port->read_status_mask |= (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC); UART_PUT_IER(port, AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC); } @@ -249,8 +218,8 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs) struct tty_struct *tty = port->info->tty; unsigned int status, ch, flg; - status = UART_GET_CSR(port); - while (status & AT91_US_RXRDY) { + status = UART_GET_CSR(port) & port->read_status_mask; + while (status & (AT91_US_RXRDY)) { ch = UART_GET_CHAR(port); port->icount.rx++; @@ -261,38 +230,40 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs) * note that the error handling code is * out of the main execution path */ - if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE | AT91_US_RXBRK))) { + if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE))) { UART_PUT_CR(port, AT91_US_RSTSTA); /* clear error */ - if (status & AT91_US_RXBRK) { - status &= ~(AT91_US_PARE | AT91_US_FRAME); /* ignore side-effect */ - port->icount.brk++; - if (uart_handle_break(port)) - goto ignore_char; - } - if (status & AT91_US_PARE) + if (status & (AT91_US_PARE)) port->icount.parity++; - if (status & AT91_US_FRAME) + if (status & (AT91_US_FRAME)) port->icount.frame++; - if (status & AT91_US_OVRE) + if (status & (AT91_US_OVRE)) port->icount.overrun++; - status &= port->read_status_mask; - - if (status & AT91_US_RXBRK) - flg = TTY_BREAK; - else if (status & AT91_US_PARE) + if (status & AT91_US_PARE) flg = TTY_PARITY; else if (status & AT91_US_FRAME) flg = TTY_FRAME; + if (status & AT91_US_OVRE) { + /* + * overrun does *not* affect the character + * we read from the FIFO + */ + tty_insert_flip_char(tty, ch, flg); + ch = 0; + flg = TTY_OVERRUN; + } +#ifdef SUPPORT_SYSRQ + port->sysrq = 0; +#endif } if (uart_handle_sysrq_char(port, ch, regs)) goto ignore_char; - uart_insert_char(port, status, AT91_US_OVRE, ch, flg); + tty_insert_flip_char(tty, ch, flg); ignore_char: - status = UART_GET_CSR(port); + status = UART_GET_CSR(port) & port->read_status_mask; } tty_flip_buffer_push(tty); @@ -337,35 +308,40 @@ static void at91_tx_chars(struct uart_port *port) static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct uart_port *port = dev_id; - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; unsigned int status, pending, pass_counter = 0; status = UART_GET_CSR(port); - pending = status & UART_GET_IMR(port); - while (pending) { - /* Interrupt receive */ - if (pending & AT91_US_RXRDY) - at91_rx_chars(port, regs); - - // TODO: All reads to CSR will clear these interrupts! - if (pending & AT91_US_RIIC) port->icount.rng++; - if (pending & AT91_US_DSRIC) port->icount.dsr++; - if (pending & AT91_US_DCDIC) - uart_handle_dcd_change(port, !(status & AT91_US_DCD)); - if (pending & AT91_US_CTSIC) - uart_handle_cts_change(port, !(status & AT91_US_CTS)); - if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC)) - wake_up_interruptible(&port->info->delta_msr_wait); - - /* Interrupt transmit */ - if (pending & AT91_US_TXRDY) - at91_tx_chars(port); - - if (pass_counter++ > AT91_ISR_PASS_LIMIT) - break; + pending = status & port->read_status_mask; + if (pending) { + do { + if (pending & AT91_US_RXRDY) + at91_rx_chars(port, regs); + + /* Clear the relevent break bits */ + if (pending & AT91_US_RXBRK) { + UART_PUT_CR(port, AT91_US_RSTSTA); + port->icount.brk++; + uart_handle_break(port); + } - status = UART_GET_CSR(port); - pending = status & UART_GET_IMR(port); + // TODO: All reads to CSR will clear these interrupts! + if (pending & AT91_US_RIIC) port->icount.rng++; + if (pending & AT91_US_DSRIC) port->icount.dsr++; + if (pending & AT91_US_DCDIC) + uart_handle_dcd_change(port, !(status & AT91_US_DCD)); + if (pending & AT91_US_CTSIC) + uart_handle_cts_change(port, !(status & AT91_US_CTS)); + if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC)) + wake_up_interruptible(&port->info->delta_msr_wait); + + if (pending & AT91_US_TXRDY) + at91_tx_chars(port); + if (pass_counter++ > AT91_ISR_PASS_LIMIT) + break; + + status = UART_GET_CSR(port); + pending = status & port->read_status_mask; + } while (pending); } return IRQ_HANDLED; } @@ -375,7 +351,6 @@ static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs) */ static int at91_startup(struct uart_port *port) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; int retval; /* @@ -388,7 +363,7 @@ static int at91_startup(struct uart_port *port) /* * Allocate the IRQ */ - retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port); + retval = request_irq(port->irq, at91_interrupt, SA_SHIRQ, "at91_serial", port); if (retval) { printk("at91_serial: at91_startup - Can't get irq\n"); return retval; @@ -406,14 +381,14 @@ static int at91_startup(struct uart_port *port) } } + port->read_status_mask = AT91_US_RXRDY | AT91_US_TXRDY | AT91_US_OVRE + | AT91_US_FRAME | AT91_US_PARE | AT91_US_RXBRK; /* * Finally, enable the serial port */ UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); /* enable xmit & rcvr */ - - UART_PUT_IER(port, AT91_US_RXRDY); /* enable receive only */ - + UART_PUT_IER(port, AT91_US_RXRDY); /* do receive only */ return 0; } @@ -422,8 +397,6 @@ static int at91_startup(struct uart_port *port) */ static void at91_shutdown(struct uart_port *port) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - /* * Disable all interrupts, port and break condition. */ @@ -448,22 +421,21 @@ static void at91_shutdown(struct uart_port *port) */ static void at91_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) { - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - switch (state) { case 0: /* * Enable the peripheral clock for this serial port. * This is called on uart_open() or a resume event. */ - clk_enable(at91_port->clk); + at91_sys_write(AT91_PMC_PCER, 1 << port->irq); break; case 3: /* * Disable the peripheral clock for this serial port. * This is called on uart_close() or a suspend event. */ - clk_disable(at91_port->clk); + if (port->irq != AT91_ID_SYS) /* is this a shared clock? */ + at91_sys_write(AT91_PMC_PCDR, 1 << port->irq); break; default: printk(KERN_ERR "at91_serial: unknown pm %d\n", state); @@ -522,9 +494,9 @@ static void at91_set_termios(struct uart_port *port, struct termios * termios, s spin_lock_irqsave(&port->lock, flags); - port->read_status_mask = AT91_US_OVRE; + port->read_status_mask |= AT91_US_OVRE; if (termios->c_iflag & INPCK) - port->read_status_mask |= (AT91_US_FRAME | AT91_US_PARE); + port->read_status_mask |= AT91_US_FRAME | AT91_US_PARE; if (termios->c_iflag & (BRKINT | PARMRK)) port->read_status_mask |= AT91_US_RXBRK; @@ -580,7 +552,7 @@ static void at91_set_termios(struct uart_port *port, struct termios * termios, s */ static const char *at91_type(struct uart_port *port) { - return (port->type == PORT_AT91) ? "AT91_SERIAL" : NULL; + return (port->type == PORT_AT91RM9200) ? "AT91_SERIAL" : NULL; } /* @@ -588,15 +560,8 @@ static const char *at91_type(struct uart_port *port) */ static void at91_release_port(struct uart_port *port) { - struct platform_device *pdev = to_platform_device(port->dev); - int size = pdev->resource[0].end - pdev->resource[0].start + 1; - - release_mem_region(port->mapbase, size); - - if (port->flags & UPF_IOREMAP) { - iounmap(port->membase); - port->membase = NULL; - } + release_mem_region(port->mapbase, + (port->mapbase == AT91_VA_BASE_DBGU) ? 512 : SZ_16K); } /* @@ -604,21 +569,10 @@ static void at91_release_port(struct uart_port *port) */ static int at91_request_port(struct uart_port *port) { - struct platform_device *pdev = to_platform_device(port->dev); - int size = pdev->resource[0].end - pdev->resource[0].start + 1; - - if (!request_mem_region(port->mapbase, size, "at91_serial")) - return -EBUSY; - - if (port->flags & UPF_IOREMAP) { - port->membase = ioremap(port->mapbase, size); - if (port->membase == NULL) { - release_mem_region(port->mapbase, size); - return -ENOMEM; - } - } + return request_mem_region(port->mapbase, + (port->mapbase == AT91_VA_BASE_DBGU) ? 512 : SZ_16K, + "at91_serial") != NULL ? 0 : -EBUSY; - return 0; } /* @@ -627,7 +581,7 @@ static int at91_request_port(struct uart_port *port) static void at91_config_port(struct uart_port *port, int flags) { if (flags & UART_CONFIG_TYPE) { - port->type = PORT_AT91; + port->type = PORT_AT91RM9200; at91_request_port(port); } } @@ -638,7 +592,7 @@ static void at91_config_port(struct uart_port *port, int flags) static int at91_verify_port(struct uart_port *port, struct serial_struct *ser) { int ret = 0; - if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91) + if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91RM9200) ret = -EINVAL; if (port->irq != ser->irq) ret = -EINVAL; @@ -670,47 +624,33 @@ static struct uart_ops at91_pops = { .type = at91_type, .release_port = at91_release_port, .request_port = at91_request_port, - .config_port = at91_config_port, - .verify_port = at91_verify_port, + .config_port = at91_config_port, + .verify_port = at91_verify_port, .pm = at91_serial_pm, }; -/* - * Configure the port from the platform device resource info. - */ -static void __devinit at91_init_port(struct at91_uart_port *at91_port, struct platform_device *pdev) +static struct uart_port at91_ports[AT91_NR_UART]; + +void __init at91_init_ports(void) { - struct uart_port *port = &at91_port->uart; - struct at91_uart_data *data = pdev->dev.platform_data; - - port->iotype = UPIO_MEM; - port->flags = UPF_BOOT_AUTOCONF; - port->ops = &at91_pops; - port->fifosize = 1; - port->line = pdev->id; - port->dev = &pdev->dev; - - port->mapbase = pdev->resource[0].start; - port->irq = pdev->resource[1].start; - - if (port->mapbase == AT91_VA_BASE_SYS + AT91_DBGU) /* Part of system perpherals - already mapped */ - port->membase = (void __iomem *) port->mapbase; - else { - port->flags |= UPF_IOREMAP; - port->membase = NULL; - } + static int first = 1; + int i; - if (!at91_port->clk) { /* for console, the clock could already be configured */ - at91_port->clk = clk_get(&pdev->dev, "usart"); - clk_enable(at91_port->clk); - port->uartclk = clk_get_rate(at91_port->clk); - } + if (!first) + return; + first = 0; + + for (i = 0; i < AT91_NR_UART; i++) { + at91_ports[i].iotype = UPIO_MEM; + at91_ports[i].flags = UPF_BOOT_AUTOCONF; + at91_ports[i].uartclk = at91_master_clock; + at91_ports[i].ops = &at91_pops; + at91_ports[i].fifosize = 1; + at91_ports[i].line = i; + } } -/* - * Register board-specific modem-control line handlers. - */ -void __init at91_register_uart_fns(struct at91_port_fns *fns) +void __init at91_register_uart_fns(struct at91rm9200_port_fns *fns) { if (fns->enable_ms) at91_pops.enable_ms = fns->enable_ms; @@ -724,6 +664,51 @@ void __init at91_register_uart_fns(struct at91_port_fns *fns) at91_pops.set_wake = fns->set_wake; } +/* + * Setup ports. + */ +void __init at91_register_uart(int idx, int port) +{ + if ((idx < 0) || (idx >= AT91_NR_UART)) { + printk(KERN_ERR "%s: bad index number %d\n", __FUNCTION__, idx); + return; + } + + switch (port) { + case 0: + at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US0; + at91_ports[idx].mapbase = AT91_VA_BASE_US0; + at91_ports[idx].irq = AT91_ID_US0; + AT91_CfgPIO_USART0(); + break; + case 1: + at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US1; + at91_ports[idx].mapbase = AT91_VA_BASE_US1; + at91_ports[idx].irq = AT91_ID_US1; + AT91_CfgPIO_USART1(); + break; + case 2: + at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US2; + at91_ports[idx].mapbase = AT91_VA_BASE_US2; + at91_ports[idx].irq = AT91_ID_US2; + AT91_CfgPIO_USART2(); + break; + case 3: + at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US3; + at91_ports[idx].mapbase = AT91_VA_BASE_US3; + at91_ports[idx].irq = AT91_ID_US3; + AT91_CfgPIO_USART3(); + break; + case 4: + at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_DBGU; + at91_ports[idx].mapbase = AT91_VA_BASE_DBGU; + at91_ports[idx].irq = AT91_ID_SYS; + AT91_CfgPIO_DBGU(); + break; + default: + printk(KERN_ERR "%s : bad port number %d\n", __FUNCTION__, port); + } +} #ifdef CONFIG_SERIAL_AT91_CONSOLE static void at91_console_putchar(struct uart_port *port, int ch) @@ -738,7 +723,7 @@ static void at91_console_putchar(struct uart_port *port, int ch) */ static void at91_console_write(struct console *co, const char *s, u_int count) { - struct uart_port *port = &at91_ports[co->index].uart; + struct uart_port *port = at91_ports + co->index; unsigned int status, imr; /* @@ -793,15 +778,23 @@ static void __init at91_console_get_options(struct uart_port *port, int *baud, i static int __init at91_console_setup(struct console *co, char *options) { - struct uart_port *port = &at91_ports[co->index].uart; + struct uart_port *port; int baud = 115200; int bits = 8; int parity = 'n'; int flow = 'n'; - if (port->membase == 0) /* Port not initialized yet - delay setup */ - return -ENODEV; + /* + * Check whether an invalid uart number has been specified, and + * if so, search for the first available port that does have + * console support. + */ + port = uart_get_console(at91_ports, AT91_NR_UART, co); + /* + * Enable the serial console, in-case bootloader did not do it. + */ + at91_sys_write(AT91_PMC_PCER, 1 << port->irq); /* enable clock */ UART_PUT_IDR(port, -1); /* disable interrupts */ UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); @@ -828,147 +821,58 @@ static struct console at91_console = { #define AT91_CONSOLE_DEVICE &at91_console -/* - * Early console initialization (before VM subsystem initialized). - */ -static int __init at91_console_init(void) +static int __init at91_console_init(void) { - if (at91_default_console_device) { - add_preferred_console(AT91_DEVICENAME, at91_default_console_device->id, NULL); - at91_init_port(&(at91_ports[at91_default_console_device->id]), at91_default_console_device); - register_console(&at91_console); - } + at91_init_ports(); + at91_console.index = at91_console_port; + register_console(&at91_console); return 0; } console_initcall(at91_console_init); -/* - * Late console initialization. - */ -static int __init at91_late_console_init(void) -{ - if (at91_default_console_device && !(at91_console.flags & CON_ENABLED)) - register_console(&at91_console); - - return 0; -} -core_initcall(at91_late_console_init); - #else #define AT91_CONSOLE_DEVICE NULL #endif static struct uart_driver at91_uart = { .owner = THIS_MODULE, - .driver_name = "at91_serial", + .driver_name = AT91_DEVICENAME, .dev_name = AT91_DEVICENAME, + .devfs_name = AT91_DEVICENAME, .major = SERIAL_AT91_MAJOR, .minor = MINOR_START, .nr = AT91_NR_UART, .cons = AT91_CONSOLE_DEVICE, }; -#ifdef CONFIG_PM -static int at91_serial_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct uart_port *port = platform_get_drvdata(pdev); - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - - if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) - enable_irq_wake(port->irq); - else { - disable_irq_wake(port->irq); - uart_suspend_port(&at91_uart, port); - at91_port->suspended = 1; - } - - return 0; -} - -static int at91_serial_resume(struct platform_device *pdev) -{ - struct uart_port *port = platform_get_drvdata(pdev); - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - - if (at91_port->suspended) { - uart_resume_port(&at91_uart, port); - at91_port->suspended = 0; - } - - return 0; -} -#else -#define at91_serial_suspend NULL -#define at91_serial_resume NULL -#endif - -static int __devinit at91_serial_probe(struct platform_device *pdev) -{ - struct at91_uart_port *port; - int ret; - - port = &at91_ports[pdev->id]; - at91_init_port(port, pdev); - - ret = uart_add_one_port(&at91_uart, &port->uart); - if (!ret) { - device_init_wakeup(&pdev->dev, 1); - platform_set_drvdata(pdev, port); - } - - return ret; -} - -static int __devexit at91_serial_remove(struct platform_device *pdev) -{ - struct uart_port *port = platform_get_drvdata(pdev); - struct at91_uart_port *at91_port = (struct at91_uart_port *) port; - int ret = 0; - - clk_disable(at91_port->clk); - clk_put(at91_port->clk); - - device_init_wakeup(&pdev->dev, 0); - platform_set_drvdata(pdev, NULL); - - if (port) { - ret = uart_remove_one_port(&at91_uart, port); - kfree(port); - } - - return ret; -} - -static struct platform_driver at91_serial_driver = { - .probe = at91_serial_probe, - .remove = __devexit_p(at91_serial_remove), - .suspend = at91_serial_suspend, - .resume = at91_serial_resume, - .driver = { - .name = "at91_usart", - .owner = THIS_MODULE, - }, -}; - static int __init at91_serial_init(void) { - int ret; + int ret, i; + + at91_init_ports(); ret = uart_register_driver(&at91_uart); if (ret) return ret; - ret = platform_driver_register(&at91_serial_driver); - if (ret) - uart_unregister_driver(&at91_uart); + for (i = 0; i < AT91_NR_UART; i++) { + if (at91_serial_map[i] >= 0) + uart_add_one_port(&at91_uart, &at91_ports[i]); + } - return ret; + return 0; } static void __exit at91_serial_exit(void) { - platform_driver_unregister(&at91_serial_driver); + int i; + + for (i = 0; i < AT91_NR_UART; i++) { + if (at91_serial_map[i] >= 0) + uart_remove_one_port(&at91_uart, &at91_ports[i]); + } + uart_unregister_driver(&at91_uart); } diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index f27d852ce..2691112c8 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c @@ -25,6 +25,7 @@ * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $ * */ +#include #if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index a8f894c78..3b35cb779 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h @@ -16,6 +16,7 @@ #ifndef CPM_UART_H #define CPM_UART_H +#include #include #include diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 90ff96e33..5cba59ad7 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c @@ -31,6 +31,7 @@ * */ +#include #include #include #include diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 95afc3729..17406a05c 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index ef3bb476c..cdba12825 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c @@ -27,6 +27,7 @@ * */ +#include #include #include #include diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index cabd048c8..89700141f 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c @@ -415,7 +415,7 @@ * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when * closing the last filehandle, NASTY!. * Added break generation, not tested though! - * Use IRQF_SHARED when request_irq() for ser2 and ser3 (shared with) par0 and par1. + * Use SA_SHIRQ when request_irq() for ser2 and ser3 (shared with) par0 and par1. * You can't use them at the same time (yet..), but you can hopefully switch * between ser2/par0, ser3/par1 with the same kernel config. * Replaced some magic constants with defines @@ -425,6 +425,7 @@ static char *serial_version = "$Revision: 1.25 $"; +#include #include #include #include @@ -2572,6 +2573,12 @@ static void flush_to_flip_buffer(struct e100_serial *info) DFLIP( if (1) { + + if (test_bit(TTY_DONT_FLIP, &tty->flags)) { + DEBUG_LOG(info->line, "*** TTY_DONT_FLIP set flip.count %i ***\n", tty->flip.count); + DEBUG_LOG(info->line, "*** recv_cnt %i\n", info->recv_cnt); + } else { + } DEBUG_LOG(info->line, "*** rxtot %i\n", info->icount.rx); DEBUG_LOG(info->line, "ldisc %lu\n", tty->ldisc.chars_in_buffer(tty)); DEBUG_LOG(info->line, "room %lu\n", tty->ldisc.receive_room(tty)); @@ -4877,7 +4884,7 @@ rs_init(void) driver->init_termios = tty_std_termios; driver->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ - driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; driver->termios = serial_termios; driver->termios_locked = serial_termios_locked; @@ -4942,55 +4949,55 @@ rs_init(void) /* Not needed in simulator. May only complicate stuff. */ /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ - if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial ", NULL)) + if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial ", NULL)) panic("irq8"); #ifdef CONFIG_ETRAX_SERIAL_PORT0 #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT - if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 0 dma tr", NULL)) + if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 0 dma tr", NULL)) panic("irq22"); #endif #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN - if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 0 dma rec", NULL)) + if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 0 dma rec", NULL)) panic("irq23"); #endif #endif #ifdef CONFIG_ETRAX_SERIAL_PORT1 #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT - if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 1 dma tr", NULL)) + if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 1 dma tr", NULL)) panic("irq24"); #endif #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN - if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 1 dma rec", NULL)) + if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 1 dma rec", NULL)) panic("irq25"); #endif #endif #ifdef CONFIG_ETRAX_SERIAL_PORT2 /* DMA Shared with par0 (and SCSI0 and ATA) */ #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT - if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma tr", NULL)) + if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma tr", NULL)) panic("irq18"); #endif #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN - if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma rec", NULL)) + if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma rec", NULL)) panic("irq19"); #endif #endif #ifdef CONFIG_ETRAX_SERIAL_PORT3 /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT - if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma tr", NULL)) + if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma tr", NULL)) panic("irq20"); #endif #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN - if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma rec", NULL)) + if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma rec", NULL)) panic("irq21"); #endif #endif #ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST - if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, IRQF_SHARED | IRQF_DISABLED, + if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, SA_SHIRQ | SA_INTERRUPT, "fast serial dma timeout", NULL)) { printk(KERN_CRIT "err: timer1 irq\n"); } diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h index f30b93d6e..1800c0e75 100644 --- a/drivers/serial/crisv10.h +++ b/drivers/serial/crisv10.h @@ -7,6 +7,7 @@ #ifndef _ETRAX_SERIAL_H #define _ETRAX_SERIAL_H +#include #include #include diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index 8a98aae80..bf71bad5c 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c @@ -26,6 +26,7 @@ #undef DEBUG_DZ +#include #include #include #include @@ -673,7 +674,7 @@ static void dz_reset(struct dz_port *dport) } #ifdef CONFIG_SERIAL_DZ_CONSOLE -static void dz_console_putchar(struct uart_port *uport, int ch) +static void dz_console_putchar(struct uart_port *port, int ch) { struct dz_port *dport = (struct dz_port *)uport; unsigned long flags; @@ -767,7 +768,11 @@ void __init dz_serial_console_init(void) static struct uart_driver dz_reg = { .owner = THIS_MODULE, .driver_name = "serial", +#ifdef CONFIG_DEVFS + .dev_name = "tts/%d", +#else .dev_name = "ttyS%d", +#endif .major = TTY_MAJOR, .minor = 64, .nr = DZ_NB_PORT, @@ -797,7 +802,7 @@ int __init dz_init(void) restore_flags(flags); if (request_irq(dz_ports[0].port.irq, dz_interrupt, - IRQF_DISABLED, "DZ", &dz_ports[0])) + SA_INTERRUPT, "DZ", &dz_ports[0])) panic("Unable to register DZ interrupt"); ret = uart_register_driver(&dz_reg); diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index a3c00a252..144a7a352 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c @@ -24,6 +24,7 @@ */ #define SERIAL_DO_RESTART #include +#include #include #include #include @@ -1563,7 +1564,7 @@ static int __devinit icom_probe(struct pci_dev *dev, /* save off irq and request irq line */ if ( (retval = request_irq(dev->irq, icom_interrupt, - IRQF_DISABLED | IRQF_SHARED, ICOM_DRIVER_NAME, + SA_INTERRUPT | SA_SHIRQ, ICOM_DRIVER_NAME, (void *) icom_adapter))) { goto probe_exit2; } diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 4a142d6b8..d202eb4f3 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c @@ -25,6 +25,7 @@ * [29-Mar-2005] Mike Lee * Added hardware handshake */ +#include #if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -404,7 +405,7 @@ static int imx_startup(struct uart_port *port) if (retval) goto error_out2; retval = request_irq(sport->rtsirq, imx_rtsint, - IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, + SA_TRIGGER_FALLING | SA_TRIGGER_RISING, DRIVER_NAME, sport); if (retval) goto error_out3; @@ -887,6 +888,7 @@ static struct uart_driver imx_reg = { .owner = THIS_MODULE, .driver_name = DRIVER_NAME, .dev_name = "ttySMX", + .devfs_name = "ttsmx/", .major = SERIAL_IMX_MAJOR, .minor = MINOR_START, .nr = ARRAY_SIZE(imx_ports), diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 576ca1eaa..c620209d7 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c @@ -2646,10 +2646,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd) struct ioc4_port *port; struct ioc4_soft *soft; - /* If serial driver did not attach, don't try to detach */ control = idd->idd_serial_data; - if (!control) - return 0; for (port_num = 0; port_num < IOC4_NUM_SERIAL_PORTS; port_num++) { for (port_type = UART_PORT_MIN; @@ -2781,12 +2778,6 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __FUNCTION__, idd->idd_pdev, idd->idd_pci_id)); - /* PCI-RT does not bring out serial connections. - * Do not attach to this particular IOC4. - */ - if (idd->idd_variant == IOC4_VARIANT_PCI_RT) - return 0; - /* request serial registers */ tmp_addr1 = idd->idd_bar0 + IOC4_SERIAL_OFFSET; @@ -2855,7 +2846,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) control->ic_soft = soft; /* Hook up interrupt handler */ - if (!request_irq(idd->idd_pdev->irq, ioc4_intr, IRQF_SHARED, + if (!request_irq(idd->idd_pdev->irq, ioc4_intr, SA_SHIRQ, "sgi-ioc4serial", soft)) { control->ic_irq = idd->idd_pdev->irq; } else { diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 5ff269fb6..651772474 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c @@ -12,6 +12,7 @@ * Copyright (C) 2002 Ralf Baechle (ralf@linux-mips.org) * Copyright (C) 2002 David S. Miller (davem@redhat.com) */ +#include #include #include #include @@ -1084,6 +1085,7 @@ static struct console ip22zilog_console = { static struct uart_driver ip22zilog_reg = { .owner = THIS_MODULE, .driver_name = "serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = 64, @@ -1143,8 +1145,9 @@ static void __init ip22zilog_prepare(void) up[(chip * 2) + 1].port.fifosize = 1; up[(chip * 2) + 1].port.ops = &ip22zilog_pops; up[(chip * 2) + 1].port.type = PORT_IP22ZILOG; + up[(chip * 2) + 1].port.flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; up[(chip * 2) + 1].port.line = (chip * 2) + 1; - up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; + up[(chip * 2) + 1].flags = 0; } } diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c index 244f63be3..b3e1f71be 100644 --- a/drivers/serial/jsm/jsm_driver.c +++ b/drivers/serial/jsm/jsm_driver.c @@ -121,7 +121,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) } rc = request_irq(brd->irq, brd->bd_ops->intr, - IRQF_DISABLED|IRQF_SHARED, "JSM", brd); + SA_INTERRUPT|SA_SHIRQ, "JSM", brd); if (rc) { printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); goto out_iounmap; diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index f8262e6ad..7d8237051 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c @@ -588,6 +588,13 @@ void jsm_input(struct jsm_channel *ch) len = min(len, (N_TTY_BUF_SIZE - 1) - tp->read_cnt); ld = tty_ldisc_ref(tp); + /* + * If the DONT_FLIP flag is on, don't flush our buffer, and act + * like the ld doesn't have any space to put the data right now. + */ + if (test_bit(TTY_DONT_FLIP, &tp->flags)) + len = 0; + /* * If we were unable to get a reference to the ld, * don't flush our buffer, and act like the ld doesn't diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index e7fe4bb46..321a40f33 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c @@ -25,6 +25,7 @@ * membase is an 'ioremapped' cookie. This is compatible with the old * serial.c driver, and is currently the preferred form. */ +#include #if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -542,7 +543,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_sio_port *up) static int serial_link_irq_chain(struct uart_sio_port *up) { struct irq_info *i = irq_lists + up->port.irq; - int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; + int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; spin_lock_irq(&i->lock); @@ -1130,6 +1131,7 @@ console_initcall(m32r_sio_console_init); static struct uart_driver m32r_sio_reg = { .owner = THIS_MODULE, .driver_name = "sio", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = 64, diff --git a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h index 849f1b2c2..7c3ec24f7 100644 --- a/drivers/serial/m32r_sio.h +++ b/drivers/serial/m32r_sio.h @@ -15,6 +15,7 @@ * (at your option) any later version. */ +#include struct m32r_sio_probe { struct module *owner; diff --git a/drivers/serial/m32r_sio_reg.h b/drivers/serial/m32r_sio_reg.h index 467147379..9c8645294 100644 --- a/drivers/serial/m32r_sio_reg.h +++ b/drivers/serial/m32r_sio_reg.h @@ -15,6 +15,7 @@ #ifndef _M32R_SIO_REG_H #define _M32R_SIO_REG_H +#include #ifdef CONFIG_SERIAL_M32R_PLDSIO diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c index 832abd3c4..8cbbb954d 100644 --- a/drivers/serial/mcfserial.c +++ b/drivers/serial/mcfserial.c @@ -60,11 +60,11 @@ struct timer_list mcfrs_timer_struct; #if defined(CONFIG_HW_FEITH) #define CONSOLE_BAUD_RATE 38400 #define DEFAULT_CBAUD B38400 -#elif defined(CONFIG_MOD5272) || defined(CONFIG_M5208EVB) || defined(CONFIG_M5329EVB) +#elif defined(CONFIG_MOD5272) || defined(CONFIG_M5208EVB) #define CONSOLE_BAUD_RATE 115200 #define DEFAULT_CBAUD B115200 #elif defined(CONFIG_ARNEWSH) || defined(CONFIG_FREESCALE) || \ - defined(CONFIG_senTec) || defined(CONFIG_SNEHA) || defined(CONFIG_AVNET) + defined(CONFIG_senTec) || defined(CONFIG_SNEHA) #define CONSOLE_BAUD_RATE 19200 #define DEFAULT_CBAUD B19200 #endif @@ -93,7 +93,7 @@ static struct tty_driver *mcfrs_serial_driver; #undef SERIAL_DEBUG_FLOW #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) + defined(CONFIG_M520x) #define IRQBASE (MCFINT_VECBASE+MCFINT_UART0) #else #define IRQBASE 73 @@ -1545,28 +1545,6 @@ static void mcfrs_irqinit(struct mcf_serial *info) *feci2c_par |= MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 | MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2; } -#elif defined(CONFIG_M532x) - volatile unsigned char *uartp; - uartp = info->addr; - switch (info->line) { - case 0: - MCF_INTC0_ICR26 = 0x3; - MCF_INTC0_CIMR = 26; - /* GPIO initialization */ - MCF_GPIO_PAR_UART |= 0x000F; - break; - case 1: - MCF_INTC0_ICR27 = 0x3; - MCF_INTC0_CIMR = 27; - /* GPIO initialization */ - MCF_GPIO_PAR_UART |= 0x0FF0; - break; - case 2: - MCF_INTC0_ICR28 = 0x3; - MCF_INTC0_CIMR = 28; - /* GPIOs also must be initalized, depends on board */ - break; - } #else volatile unsigned char *icrp, *uartp; @@ -1596,7 +1574,7 @@ static void mcfrs_irqinit(struct mcf_serial *info) /* Clear mask, so no surprise interrupts. */ uartp[MCFUART_UIMR] = 0; - if (request_irq(info->irq, mcfrs_interrupt, IRQF_DISABLED, + if (request_irq(info->irq, mcfrs_interrupt, SA_INTERRUPT, "ColdFire UART", NULL)) { printk("MCFRS: Unable to attach ColdFire UART %d interrupt " "vector=%d\n", info->line, info->irq); @@ -1713,6 +1691,7 @@ mcfrs_init(void) /* Initialize the tty_driver structure */ mcfrs_serial_driver->owner = THIS_MODULE; mcfrs_serial_driver->name = "ttyS"; + mcfrs_serial_driver->devfs_name = "ttys/"; mcfrs_serial_driver->driver_name = "serial"; mcfrs_serial_driver->major = TTY_MAJOR; mcfrs_serial_driver->minor_start = 64; diff --git a/drivers/serial/mcfserial.h b/drivers/serial/mcfserial.h index 56420e2cb..a2b28e862 100644 --- a/drivers/serial/mcfserial.h +++ b/drivers/serial/mcfserial.h @@ -14,6 +14,7 @@ #ifndef _MCF_SERIAL_H #define _MCF_SERIAL_H +#include #include #ifdef __KERNEL__ diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 7708e5dd3..6459edc7f 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -44,6 +44,7 @@ * will be mapped to. */ +#include #include #include #include @@ -190,7 +191,7 @@ mpc52xx_uart_startup(struct uart_port *port) /* Request IRQ */ ret = request_irq(port->irq, mpc52xx_uart_int, - IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); + SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); if (ret) return ret; @@ -692,6 +693,7 @@ static struct uart_driver mpc52xx_uart_driver = { .owner = THIS_MODULE, .driver_name = "mpc52xx_psc_uart", .dev_name = "ttyPSC", + .devfs_name = "ttyPSC", .major = SERIAL_PSC_MAJOR, .minor = SERIAL_PSC_MINOR, .nr = MPC52xx_PSC_MAXNUM, @@ -726,7 +728,8 @@ mpc52xx_uart_probe(struct platform_device *dev) spin_lock_init(&port->lock); port->uartclk = __res.bi_ipbfreq / 2; /* Look at CTLR doc */ - port->fifosize = 512; + port->fifosize = 255; /* Should be 512 ! But it can't be */ + /* stored in a unsigned char */ port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF | ( uart_console(port) ? 0 : UPF_IOREMAP ); diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index 63d2a66e5..94681922e 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c @@ -50,6 +50,7 @@ * 4) AFAICT, hardware flow control isn't supported by the controller --MAG. */ +#include #if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -314,6 +315,7 @@ struct mpsc_port_info *mpsc_device_remove(int index); #define MPSC_MAJOR 204 #define MPSC_MINOR_START 44 #define MPSC_DRIVER_NAME "MPSC" +#define MPSC_DEVFS_NAME "ttymm/" #define MPSC_DEV_NAME "ttyMM" #define MPSC_VERSION "1.00" @@ -1412,7 +1414,7 @@ mpsc_startup(struct uart_port *port) /* If irq's are shared, need to set flag */ if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) - flag = IRQF_SHARED; + flag = SA_SHIRQ; if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, "mpsc-sdma", pi)) @@ -1861,6 +1863,7 @@ static struct platform_driver mpsc_shared_driver = { static struct uart_driver mpsc_reg = { .owner = THIS_MODULE, .driver_name = MPSC_DRIVER_NAME, + .devfs_name = MPSC_DEVFS_NAME, .dev_name = MPSC_DEV_NAME, .major = MPSC_MAJOR, .minor = MPSC_MINOR_START, diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 4a1c9983f..64c0e8912 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c @@ -16,6 +16,7 @@ ** */ +#include #include #include #include diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c deleted file mode 100644 index 7502109d3..000000000 --- a/drivers/serial/netx-serial.c +++ /dev/null @@ -1,747 +0,0 @@ -/* - * drivers/serial/netx-serial.c - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -#if defined(CONFIG_SERIAL_NETX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* We've been assigned a range on the "Low-density serial ports" major */ -#define SERIAL_NX_MAJOR 204 -#define MINOR_START 170 - -#ifdef CONFIG_SERIAL_NETX_CONSOLE - -enum uart_regs { - UART_DR = 0x00, - UART_SR = 0x04, - UART_LINE_CR = 0x08, - UART_BAUDDIV_MSB = 0x0c, - UART_BAUDDIV_LSB = 0x10, - UART_CR = 0x14, - UART_FR = 0x18, - UART_IIR = 0x1c, - UART_ILPR = 0x20, - UART_RTS_CR = 0x24, - UART_RTS_LEAD = 0x28, - UART_RTS_TRAIL = 0x2c, - UART_DRV_ENABLE = 0x30, - UART_BRM_CR = 0x34, - UART_RXFIFO_IRQLEVEL = 0x38, - UART_TXFIFO_IRQLEVEL = 0x3c, -}; - -#define SR_FE (1<<0) -#define SR_PE (1<<1) -#define SR_BE (1<<2) -#define SR_OE (1<<3) - -#define LINE_CR_BRK (1<<0) -#define LINE_CR_PEN (1<<1) -#define LINE_CR_EPS (1<<2) -#define LINE_CR_STP2 (1<<3) -#define LINE_CR_FEN (1<<4) -#define LINE_CR_5BIT (0<<5) -#define LINE_CR_6BIT (1<<5) -#define LINE_CR_7BIT (2<<5) -#define LINE_CR_8BIT (3<<5) -#define LINE_CR_BITS_MASK (3<<5) - -#define CR_UART_EN (1<<0) -#define CR_SIREN (1<<1) -#define CR_SIRLP (1<<2) -#define CR_MSIE (1<<3) -#define CR_RIE (1<<4) -#define CR_TIE (1<<5) -#define CR_RTIE (1<<6) -#define CR_LBE (1<<7) - -#define FR_CTS (1<<0) -#define FR_DSR (1<<1) -#define FR_DCD (1<<2) -#define FR_BUSY (1<<3) -#define FR_RXFE (1<<4) -#define FR_TXFF (1<<5) -#define FR_RXFF (1<<6) -#define FR_TXFE (1<<7) - -#define IIR_MIS (1<<0) -#define IIR_RIS (1<<1) -#define IIR_TIS (1<<2) -#define IIR_RTIS (1<<3) -#define IIR_MASK 0xf - -#define RTS_CR_AUTO (1<<0) -#define RTS_CR_RTS (1<<1) -#define RTS_CR_COUNT (1<<2) -#define RTS_CR_MOD2 (1<<3) -#define RTS_CR_RTS_POL (1<<4) -#define RTS_CR_CTS_CTR (1<<5) -#define RTS_CR_CTS_POL (1<<6) -#define RTS_CR_STICK (1<<7) - -#define UART_PORT_SIZE 0x40 -#define DRIVER_NAME "netx-uart" - -struct netx_port { - struct uart_port port; -}; - -static void netx_stop_tx(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val & ~CR_TIE, port->membase + UART_CR); -} - -static void netx_stop_rx(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val & ~CR_RIE, port->membase + UART_CR); -} - -static void netx_enable_ms(struct uart_port *port) -{ - unsigned int val; - val = readl(port->membase + UART_CR); - writel(val | CR_MSIE, port->membase + UART_CR); -} - -static inline void netx_transmit_buffer(struct uart_port *port) -{ - struct circ_buf *xmit = &port->info->xmit; - - if (port->x_char) { - writel(port->x_char, port->membase + UART_DR); - port->icount.tx++; - port->x_char = 0; - return; - } - - if (uart_tx_stopped(port) || uart_circ_empty(xmit)) { - netx_stop_tx(port); - return; - } - - do { - /* send xmit->buf[xmit->tail] - * out the port here */ - writel(xmit->buf[xmit->tail], port->membase + UART_DR); - xmit->tail = (xmit->tail + 1) & - (UART_XMIT_SIZE - 1); - port->icount.tx++; - if (uart_circ_empty(xmit)) - break; - } while (!(readl(port->membase + UART_FR) & FR_TXFF)); - - if (uart_circ_empty(xmit)) - netx_stop_tx(port); -} - -static void netx_start_tx(struct uart_port *port) -{ - writel( - readl(port->membase + UART_CR) | CR_TIE, port->membase + UART_CR); - - if (!(readl(port->membase + UART_FR) & FR_TXFF)) - netx_transmit_buffer(port); -} - -static unsigned int netx_tx_empty(struct uart_port *port) -{ - return readl(port->membase + UART_FR) & FR_BUSY ? 0 : TIOCSER_TEMT; -} - -static void netx_txint(struct uart_port *port) -{ - struct circ_buf *xmit = &port->info->xmit; - - if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - netx_stop_tx(port); - return; - } - - netx_transmit_buffer(port); - - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(port); -} - -static void netx_rxint(struct uart_port *port, struct pt_regs *regs) -{ - unsigned char rx, flg, status; - struct tty_struct *tty = port->info->tty; - - while (!(readl(port->membase + UART_FR) & FR_RXFE)) { - rx = readl(port->membase + UART_DR); - flg = TTY_NORMAL; - port->icount.rx++; - status = readl(port->membase + UART_SR); - if (status & SR_BE) { - writel(0, port->membase + UART_SR); - if (uart_handle_break(port)) - continue; - } - - if (unlikely(status & (SR_FE | SR_PE | SR_OE))) { - - if (status & SR_PE) - port->icount.parity++; - else if (status & SR_FE) - port->icount.frame++; - if (status & SR_OE) - port->icount.overrun++; - - status &= port->read_status_mask; - - if (status & SR_BE) - flg = TTY_BREAK; - else if (status & SR_PE) - flg = TTY_PARITY; - else if (status & SR_FE) - flg = TTY_FRAME; - } - - if (uart_handle_sysrq_char(port, rx, regs)) - continue; - - uart_insert_char(port, status, SR_OE, rx, flg); - } - - tty_flip_buffer_push(tty); - return; -} - -static irqreturn_t netx_int(int irq, void *dev_id, struct pt_regs *regs) -{ - struct uart_port *port = (struct uart_port *)dev_id; - unsigned long flags; - unsigned char status; - - spin_lock_irqsave(&port->lock,flags); - - status = readl(port->membase + UART_IIR) & IIR_MASK; - while (status) { - if (status & IIR_RIS) - netx_rxint(port, regs); - if (status & IIR_TIS) - netx_txint(port); - if (status & IIR_MIS) { - if (readl(port->membase + UART_FR) & FR_CTS) - uart_handle_cts_change(port, 1); - else - uart_handle_cts_change(port, 0); - } - writel(0, port->membase + UART_IIR); - status = readl(port->membase + UART_IIR) & IIR_MASK; - } - - spin_unlock_irqrestore(&port->lock,flags); - return IRQ_HANDLED; -} - -static unsigned int netx_get_mctrl(struct uart_port *port) -{ - unsigned int ret = TIOCM_DSR | TIOCM_CAR; - - if (readl(port->membase + UART_FR) & FR_CTS) - ret |= TIOCM_CTS; - - return ret; -} - -static void netx_set_mctrl(struct uart_port *port, unsigned int mctrl) -{ - unsigned int val; - - if (mctrl & TIOCM_RTS) { - val = readl(port->membase + UART_RTS_CR); - writel(val | RTS_CR_RTS, port->membase + UART_RTS_CR); - } -} - -static void netx_break_ctl(struct uart_port *port, int break_state) -{ - unsigned int line_cr; - spin_lock_irq(&port->lock); - - line_cr = readl(port->membase + UART_LINE_CR); - if (break_state != 0) - line_cr |= LINE_CR_BRK; - else - line_cr &= ~LINE_CR_BRK; - writel(line_cr, port->membase + UART_LINE_CR); - - spin_unlock_irq(&port->lock); -} - -static int netx_startup(struct uart_port *port) -{ - int ret; - - ret = request_irq(port->irq, netx_int, 0, - DRIVER_NAME, port); - if (ret) { - dev_err(port->dev, "unable to grab irq%d\n",port->irq); - goto exit; - } - - writel(readl(port->membase + UART_LINE_CR) | LINE_CR_FEN, - port->membase + UART_LINE_CR); - - writel(CR_MSIE | CR_RIE | CR_TIE | CR_RTIE | CR_UART_EN, - port->membase + UART_CR); - -exit: - return ret; -} - -static void netx_shutdown(struct uart_port *port) -{ - writel(0, port->membase + UART_CR) ; - - free_irq(port->irq, port); -} - -static void -netx_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) -{ - unsigned int baud, quot; - unsigned char old_cr; - unsigned char line_cr = LINE_CR_FEN; - unsigned char rts_cr = 0; - - switch (termios->c_cflag & CSIZE) { - case CS5: - line_cr |= LINE_CR_5BIT; - break; - case CS6: - line_cr |= LINE_CR_6BIT; - break; - case CS7: - line_cr |= LINE_CR_7BIT; - break; - case CS8: - line_cr |= LINE_CR_8BIT; - break; - } - - if (termios->c_cflag & CSTOPB) - line_cr |= LINE_CR_STP2; - - if (termios->c_cflag & PARENB) { - line_cr |= LINE_CR_PEN; - if (!(termios->c_cflag & PARODD)) - line_cr |= LINE_CR_EPS; - } - - if (termios->c_cflag & CRTSCTS) - rts_cr = RTS_CR_AUTO | RTS_CR_CTS_CTR | RTS_CR_RTS_POL; - - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); - quot = baud * 4096; - quot /= 1000; - quot *= 256; - quot /= 100000; - - spin_lock_irq(&port->lock); - - uart_update_timeout(port, termios->c_cflag, baud); - - old_cr = readl(port->membase + UART_CR); - - /* disable interrupts */ - writel(old_cr & ~(CR_MSIE | CR_RIE | CR_TIE | CR_RTIE), - port->membase + UART_CR); - - /* drain transmitter */ - while (readl(port->membase + UART_FR) & FR_BUSY); - - /* disable UART */ - writel(old_cr & ~CR_UART_EN, port->membase + UART_CR); - - /* modem status interrupts */ - old_cr &= ~CR_MSIE; - if (UART_ENABLE_MS(port, termios->c_cflag)) - old_cr |= CR_MSIE; - - writel((quot>>8) & 0xff, port->membase + UART_BAUDDIV_MSB); - writel(quot & 0xff, port->membase + UART_BAUDDIV_LSB); - writel(line_cr, port->membase + UART_LINE_CR); - - writel(rts_cr, port->membase + UART_RTS_CR); - - /* - * Characters to ignore - */ - port->ignore_status_mask = 0; - if (termios->c_iflag & IGNPAR) - port->ignore_status_mask |= SR_PE; - if (termios->c_iflag & IGNBRK) { - port->ignore_status_mask |= SR_BE; - /* - * If we're ignoring parity and break indicators, - * ignore overruns too (for real raw support). - */ - if (termios->c_iflag & IGNPAR) - port->ignore_status_mask |= SR_PE; - } - - port->read_status_mask = 0; - if (termios->c_iflag & (BRKINT | PARMRK)) - port->read_status_mask |= SR_BE; - if (termios->c_iflag & INPCK) - port->read_status_mask |= SR_PE | SR_FE; - - writel(old_cr, port->membase + UART_CR); - - spin_unlock_irq(&port->lock); -} - -static const char *netx_type(struct uart_port *port) -{ - return port->type == PORT_NETX ? "NETX" : NULL; -} - -static void netx_release_port(struct uart_port *port) -{ - release_mem_region(port->mapbase, UART_PORT_SIZE); -} - -static int netx_request_port(struct uart_port *port) -{ - return request_mem_region(port->mapbase, UART_PORT_SIZE, - DRIVER_NAME) != NULL ? 0 : -EBUSY; -} - -static void netx_config_port(struct uart_port *port, int flags) -{ - if (flags & UART_CONFIG_TYPE && netx_request_port(port) == 0) - port->type = PORT_NETX; -} - -static int -netx_verify_port(struct uart_port *port, struct serial_struct *ser) -{ - int ret = 0; - - if (ser->type != PORT_UNKNOWN && ser->type != PORT_NETX) - ret = -EINVAL; - - return ret; -} - -static struct uart_ops netx_pops = { - .tx_empty = netx_tx_empty, - .set_mctrl = netx_set_mctrl, - .get_mctrl = netx_get_mctrl, - .stop_tx = netx_stop_tx, - .start_tx = netx_start_tx, - .stop_rx = netx_stop_rx, - .enable_ms = netx_enable_ms, - .break_ctl = netx_break_ctl, - .startup = netx_startup, - .shutdown = netx_shutdown, - .set_termios = netx_set_termios, - .type = netx_type, - .release_port = netx_release_port, - .request_port = netx_request_port, - .config_port = netx_config_port, - .verify_port = netx_verify_port, -}; - -static struct netx_port netx_ports[] = { - { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART0), - .mapbase = NETX_PA_UART0, - .irq = NETX_IRQ_UART0, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 0, - }, - }, { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART1), - .mapbase = NETX_PA_UART1, - .irq = NETX_IRQ_UART1, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 1, - }, - }, { - .port = { - .type = PORT_NETX, - .iotype = UPIO_MEM, - .membase = (char __iomem *)io_p2v(NETX_PA_UART2), - .mapbase = NETX_PA_UART2, - .irq = NETX_IRQ_UART2, - .uartclk = 100000000, - .fifosize = 16, - .flags = UPF_BOOT_AUTOCONF, - .ops = &netx_pops, - .line = 2, - }, - } -}; - -static void netx_console_putchar(struct uart_port *port, int ch) -{ - while (readl(port->membase + UART_FR) & FR_BUSY); - writel(ch, port->membase + UART_DR); -} - -static void -netx_console_write(struct console *co, const char *s, unsigned int count) -{ - struct uart_port *port = &netx_ports[co->index].port; - unsigned char cr_save; - - cr_save = readl(port->membase + UART_CR); - writel(cr_save | CR_UART_EN, port->membase + UART_CR); - - uart_console_write(port, s, count, netx_console_putchar); - - while (readl(port->membase + UART_FR) & FR_BUSY); - writel(cr_save, port->membase + UART_CR); -} - -static void __init -netx_console_get_options(struct uart_port *port, int *baud, - int *parity, int *bits, int *flow) -{ - unsigned char line_cr; - - *baud = (readl(port->membase + UART_BAUDDIV_MSB) << 8) | - readl(port->membase + UART_BAUDDIV_LSB); - *baud *= 1000; - *baud /= 4096; - *baud *= 1000; - *baud /= 256; - *baud *= 100; - - line_cr = readl(port->membase + UART_LINE_CR); - *parity = 'n'; - if (line_cr & LINE_CR_PEN) { - if (line_cr & LINE_CR_EPS) - *parity = 'e'; - else - *parity = 'o'; - } - - switch (line_cr & LINE_CR_BITS_MASK) { - case LINE_CR_8BIT: - *bits = 8; - break; - case LINE_CR_7BIT: - *bits = 7; - break; - case LINE_CR_6BIT: - *bits = 6; - break; - case LINE_CR_5BIT: - *bits = 5; - break; - } - - if (readl(port->membase + UART_RTS_CR) & RTS_CR_AUTO) - *flow = 'r'; -} - -static int __init -netx_console_setup(struct console *co, char *options) -{ - struct netx_port *sport; - int baud = 9600; - int bits = 8; - int parity = 'n'; - int flow = 'n'; - - /* - * Check whether an invalid uart number has been specified, and - * if so, search for the first available port that does have - * console support. - */ - if (co->index == -1 || co->index >= ARRAY_SIZE(netx_ports)) - co->index = 0; - sport = &netx_ports[co->index]; - - if (options) { - uart_parse_options(options, &baud, &parity, &bits, &flow); - } else { - /* if the UART is enabled, assume it has been correctly setup - * by the bootloader and get the options - */ - if (readl(sport->port.membase + UART_CR) & CR_UART_EN) { - netx_console_get_options(&sport->port, &baud, - &parity, &bits, &flow); - } - - } - - return uart_set_options(&sport->port, co, baud, parity, bits, flow); -} - -static struct uart_driver netx_reg; -static struct console netx_console = { - .name = "ttyNX", - .write = netx_console_write, - .device = uart_console_device, - .setup = netx_console_setup, - .flags = CON_PRINTBUFFER, - .index = -1, - .data = &netx_reg, -}; - -static int __init netx_console_init(void) -{ - register_console(&netx_console); - return 0; -} -console_initcall(netx_console_init); - -#define NETX_CONSOLE &netx_console -#else -#define NETX_CONSOLE NULL -#endif - -static struct uart_driver netx_reg = { - .owner = THIS_MODULE, - .driver_name = DRIVER_NAME, - .dev_name = "ttyNX", - .major = SERIAL_NX_MAJOR, - .minor = MINOR_START, - .nr = ARRAY_SIZE(netx_ports), - .cons = NETX_CONSOLE, -}; - -static int serial_netx_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - if (sport) - uart_suspend_port(&netx_reg, &sport->port); - - return 0; -} - -static int serial_netx_resume(struct platform_device *pdev) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - if (sport) - uart_resume_port(&netx_reg, &sport->port); - - return 0; -} - -static int serial_netx_probe(struct platform_device *pdev) -{ - struct uart_port *port = &netx_ports[pdev->id].port; - - dev_info(&pdev->dev, "initialising\n"); - - port->dev = &pdev->dev; - - writel(1, port->membase + UART_RXFIFO_IRQLEVEL); - uart_add_one_port(&netx_reg, &netx_ports[pdev->id].port); - platform_set_drvdata(pdev, &netx_ports[pdev->id]); - - return 0; -} - -static int serial_netx_remove(struct platform_device *pdev) -{ - struct netx_port *sport = platform_get_drvdata(pdev); - - platform_set_drvdata(pdev, NULL); - - if (sport) - uart_remove_one_port(&netx_reg, &sport->port); - - return 0; -} - -static struct platform_driver serial_netx_driver = { - .probe = serial_netx_probe, - .remove = serial_netx_remove, - - .suspend = serial_netx_suspend, - .resume = serial_netx_resume, - - .driver = { - .name = DRIVER_NAME, - }, -}; - -static int __init netx_serial_init(void) -{ - int ret; - - printk(KERN_INFO "Serial: NetX driver\n"); - - ret = uart_register_driver(&netx_reg); - if (ret) - return ret; - - ret = platform_driver_register(&serial_netx_driver); - if (ret != 0) - uart_unregister_driver(&netx_reg); - - return 0; -} - -static void __exit netx_serial_exit(void) -{ - platform_driver_unregister(&serial_netx_driver); - uart_unregister_driver(&netx_reg); -} - -module_init(netx_serial_init); -module_exit(netx_serial_exit); - -MODULE_AUTHOR("Sascha Hauer"); -MODULE_DESCRIPTION("NetX serial port driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index bfd2a2275..513ff8597 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c @@ -42,6 +42,7 @@ #undef DEBUG_HARD #undef USE_CTRL_O_SYSRQ +#include #include #include @@ -100,6 +101,7 @@ static DEFINE_MUTEX(pmz_irq_mutex); static struct uart_driver pmz_uart_reg = { .owner = THIS_MODULE, .driver_name = "ttyS", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, }; @@ -934,7 +936,7 @@ static int pmz_startup(struct uart_port *port) } pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; - if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED, "PowerMac Zilog", uap)) { + if (request_irq(uap->port.irq, pmz_interrupt, SA_SHIRQ, "PowerMac Zilog", uap)) { dev_err(&uap->dev->ofdev.dev, "Unable to register zs interrupt handler.\n"); pmz_set_scc_power(uap, 0); @@ -1443,8 +1445,8 @@ static int __init pmz_init_port(struct uart_pmac_port *uap) uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; goto no_dma; } - uap->tx_dma_irq = irq_of_parse_and_map(np, 1); - uap->rx_dma_irq = irq_of_parse_and_map(np, 2); + uap->tx_dma_irq = np->intrs[1].line; + uap->rx_dma_irq = np->intrs[2].line; } no_dma: @@ -1491,7 +1493,7 @@ no_dma: * Init remaining bits of "port" structure */ uap->port.iotype = UPIO_MEM; - uap->port.irq = irq_of_parse_and_map(np, 0); + uap->port.irq = np->intrs[0].line; uap->port.uartclk = ZS_CLOCK; uap->port.fifosize = 1; uap->port.ops = &pmz_pops; diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index a720953a4..77d4568cc 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c @@ -24,6 +24,7 @@ * with the serial core maintainer satisfaction to appear soon. */ +#include #if defined(CONFIG_SERIAL_PXA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -268,6 +269,7 @@ static unsigned int serial_pxa_get_mctrl(struct uart_port *port) unsigned char status; unsigned int ret; +return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; status = serial_in(up, UART_MSR); ret = 0; @@ -389,7 +391,7 @@ static int serial_pxa_startup(struct uart_port *port) /* * Finally, enable interrupts. Note: Modem status interrupts - * are set via set_termios(), which will be occurring imminently + * are set via set_termios(), which will be occuring imminently * anyway, so we don't enable them here. */ up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; @@ -779,6 +781,7 @@ static struct uart_pxa_port serial_pxa_ports[] = { static struct uart_driver serial_pxa_reg = { .owner = THIS_MODULE, .driver_name = "PXA serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = 64, diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 95738a19c..f5aac92fb 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c @@ -55,6 +55,7 @@ * BJD, 04-Nov-2004 */ +#include #if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -148,6 +149,7 @@ s3c24xx_serial_dbg(const char *fmt, ...) /* UART name and device definitions */ #define S3C24XX_SERIAL_NAME "ttySAC" +#define S3C24XX_SERIAL_DEVFS "tts/" #define S3C24XX_SERIAL_MAJOR 204 #define S3C24XX_SERIAL_MINOR 64 @@ -870,8 +872,6 @@ static const char *s3c24xx_serial_type(struct uart_port *port) return "S3C2410"; case PORT_S3C2440: return "S3C2440"; - case PORT_S3C2412: - return "S3C2412"; default: return NULL; } @@ -950,6 +950,7 @@ static struct uart_driver s3c24xx_uart_drv = { .nr = 3, .cons = S3C24XX_SERIAL_CONSOLE, .driver_name = S3C24XX_SERIAL_NAME, + .devfs_name = S3C24XX_SERIAL_DEVFS, .major = S3C24XX_SERIAL_MAJOR, .minor = S3C24XX_SERIAL_MINOR, }; @@ -1364,7 +1365,7 @@ static inline void s3c2410_serial_exit(void) #endif /* CONFIG_CPU_S3C2410 */ -#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) +#ifdef CONFIG_CPU_S3C2440 static int s3c2440_serial_setsource(struct uart_port *port, struct s3c24xx_uart_clksrc *clk) @@ -1527,141 +1528,6 @@ static inline void s3c2440_serial_exit(void) #define s3c2440_uart_inf_at NULL #endif /* CONFIG_CPU_S3C2440 */ -#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) - -static int s3c2412_serial_setsource(struct uart_port *port, - struct s3c24xx_uart_clksrc *clk) -{ - unsigned long ucon = rd_regl(port, S3C2410_UCON); - - ucon &= ~S3C2412_UCON_CLKMASK; - - if (strcmp(clk->name, "uclk") == 0) - ucon |= S3C2440_UCON_UCLK; - else if (strcmp(clk->name, "pclk") == 0) - ucon |= S3C2440_UCON_PCLK; - else if (strcmp(clk->name, "usysclk") == 0) - ucon |= S3C2412_UCON_USYSCLK; - else { - printk(KERN_ERR "unknown clock source %s\n", clk->name); - return -EINVAL; - } - - wr_regl(port, S3C2410_UCON, ucon); - return 0; -} - - -static int s3c2412_serial_getsource(struct uart_port *port, - struct s3c24xx_uart_clksrc *clk) -{ - unsigned long ucon = rd_regl(port, S3C2410_UCON); - - switch (ucon & S3C2412_UCON_CLKMASK) { - case S3C2412_UCON_UCLK: - clk->divisor = 1; - clk->name = "uclk"; - break; - - case S3C2412_UCON_PCLK: - case S3C2412_UCON_PCLK2: - clk->divisor = 1; - clk->name = "pclk"; - break; - - case S3C2412_UCON_USYSCLK: - clk->divisor = 1; - clk->name = "usysclk"; - break; - } - - return 0; -} - -static int s3c2412_serial_resetport(struct uart_port *port, - struct s3c2410_uartcfg *cfg) -{ - unsigned long ucon = rd_regl(port, S3C2410_UCON); - - dbg("%s: port=%p (%08lx), cfg=%p\n", - __FUNCTION__, port, port->mapbase, cfg); - - /* ensure we don't change the clock settings... */ - - ucon &= S3C2412_UCON_CLKMASK; - - wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); - wr_regl(port, S3C2410_ULCON, cfg->ulcon); - - /* reset both fifos */ - - wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); - wr_regl(port, S3C2410_UFCON, cfg->ufcon); - - return 0; -} - -static struct s3c24xx_uart_info s3c2412_uart_inf = { - .name = "Samsung S3C2412 UART", - .type = PORT_S3C2412, - .fifosize = 64, - .rx_fifomask = S3C2440_UFSTAT_RXMASK, - .rx_fifoshift = S3C2440_UFSTAT_RXSHIFT, - .rx_fifofull = S3C2440_UFSTAT_RXFULL, - .tx_fifofull = S3C2440_UFSTAT_TXFULL, - .tx_fifomask = S3C2440_UFSTAT_TXMASK, - .tx_fifoshift = S3C2440_UFSTAT_TXSHIFT, - .get_clksrc = s3c2412_serial_getsource, - .set_clksrc = s3c2412_serial_setsource, - .reset_port = s3c2412_serial_resetport, -}; - -/* device management */ - -static int s3c2412_serial_probe(struct platform_device *dev) -{ - dbg("s3c2440_serial_probe: dev=%p\n", dev); - return s3c24xx_serial_probe(dev, &s3c2412_uart_inf); -} - -static struct platform_driver s3c2412_serial_drv = { - .probe = s3c2412_serial_probe, - .remove = s3c24xx_serial_remove, - .suspend = s3c24xx_serial_suspend, - .resume = s3c24xx_serial_resume, - .driver = { - .name = "s3c2412-uart", - .owner = THIS_MODULE, - }, -}; - - -static inline int s3c2412_serial_init(void) -{ - return s3c24xx_serial_init(&s3c2412_serial_drv, &s3c2412_uart_inf); -} - -static inline void s3c2412_serial_exit(void) -{ - platform_driver_unregister(&s3c2412_serial_drv); -} - -#define s3c2412_uart_inf_at &s3c2412_uart_inf -#else - -static inline int s3c2412_serial_init(void) -{ - return 0; -} - -static inline void s3c2412_serial_exit(void) -{ -} - -#define s3c2412_uart_inf_at NULL -#endif /* CONFIG_CPU_S3C2440 */ - - /* module initialisation code */ static int __init s3c24xx_serial_modinit(void) @@ -1676,7 +1542,6 @@ static int __init s3c24xx_serial_modinit(void) s3c2400_serial_init(); s3c2410_serial_init(); - s3c2412_serial_init(); s3c2440_serial_init(); return 0; @@ -1686,7 +1551,6 @@ static void __exit s3c24xx_serial_modexit(void) { s3c2400_serial_exit(); s3c2410_serial_exit(); - s3c2412_serial_exit(); s3c2440_serial_exit(); uart_unregister_driver(&s3c24xx_uart_drv); @@ -1909,8 +1773,6 @@ static int s3c24xx_serial_initconsole(void) info = s3c2410_uart_inf_at; } else if (strcmp(dev->name, "s3c2440-uart") == 0) { info = s3c2440_uart_inf_at; - } else if (strcmp(dev->name, "s3c2412-uart") == 0) { - info = s3c2412_uart_inf_at; } else { printk(KERN_ERR "s3c24xx: no driver for %s\n", dev->name); return 0; @@ -1934,4 +1796,4 @@ console_initcall(s3c24xx_serial_initconsole); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ben Dooks "); -MODULE_DESCRIPTION("Samsung S3C2410/S3C2440/S3C2412 Serial port driver"); +MODULE_DESCRIPTION("Samsung S3C2410/S3C2440 Serial port driver"); diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index db3486d33..c2d9068b4 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c @@ -24,6 +24,7 @@ * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $ * */ +#include #if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -815,6 +816,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, diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index c59dcb7a8..17839e753 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -22,6 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -49,12 +50,6 @@ */ static DEFINE_MUTEX(port_mutex); -/* - * lockdep: port->lock is initialized in two places, but we - * want only one lock-class: - */ -static struct lock_class_key port_lock_key; - #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) #define uart_users(state) ((state)->count + ((state)->info ? (state)->info->blocked_open : 0)) @@ -696,8 +691,7 @@ static int uart_set_info(struct uart_state *state, (new_serial.baud_base != port->uartclk / 16) || (close_delay != state->close_delay) || (closing_wait != state->closing_wait) || - (new_serial.xmit_fifo_size && - new_serial.xmit_fifo_size != port->fifosize) || + (new_serial.xmit_fifo_size != port->fifosize) || (((new_flags ^ old_flags) & ~UPF_USR_MASK) != 0)) goto exit; port->flags = ((port->flags & ~UPF_USR_MASK) | @@ -802,8 +796,7 @@ static int uart_set_info(struct uart_state *state, port->custom_divisor = new_serial.custom_divisor; state->close_delay = close_delay; state->closing_wait = closing_wait; - if (new_serial.xmit_fifo_size) - port->fifosize = new_serial.xmit_fifo_size; + port->fifosize = new_serial.xmit_fifo_size; if (state->info->tty) state->info->tty->low_latency = (port->flags & UPF_LOW_LATENCY) ? 1 : 0; @@ -1873,7 +1866,6 @@ uart_set_options(struct uart_port *port, struct console *co, * early. */ spin_lock_init(&port->lock); - lockdep_set_class(&port->lock, &port_lock_key); memset(&termios, 0, sizeof(struct termios)); @@ -1932,9 +1924,6 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) if (state->info && state->info->flags & UIF_INITIALIZED) { const struct uart_ops *ops = port->ops; - state->info->flags = (state->info->flags & ~UIF_INITIALIZED) - | UIF_SUSPENDED; - spin_lock_irq(&port->lock); ops->stop_tx(port); ops->set_mctrl(port, 0); @@ -1994,7 +1983,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) console_start(port->cons); } - if (state->info && state->info->flags & UIF_SUSPENDED) { + if (state->info && state->info->flags & UIF_INITIALIZED) { const struct uart_ops *ops = port->ops; int ret; @@ -2006,17 +1995,15 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) ops->set_mctrl(port, port->mctrl); ops->start_tx(port); spin_unlock_irq(&port->lock); - state->info->flags |= UIF_INITIALIZED; } else { /* * Failed to resume - maybe hardware went away? * Clear the "initialized" flag so we won't try * to call the low level drivers shutdown method. */ + state->info->flags &= ~UIF_INITIALIZED; uart_shutdown(state); } - - state->info->flags &= ~UIF_SUSPENDED; } mutex_unlock(&state->mutex); @@ -2041,7 +2028,6 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port) case UPIO_MEM: case UPIO_MEM32: case UPIO_AU: - case UPIO_TSI: snprintf(address, sizeof(address), "MMIO 0x%lx", port->mapbase); break; @@ -2167,6 +2153,7 @@ int uart_register_driver(struct uart_driver *drv) normal->owner = drv->owner; normal->driver_name = drv->driver_name; + normal->devfs_name = drv->devfs_name; normal->name = drv->dev_name; normal->major = drv->major; normal->minor_start = drv->minor; @@ -2174,7 +2161,7 @@ int uart_register_driver(struct uart_driver *drv) normal->subtype = SERIAL_TYPE_NORMAL; normal->init_termios = tty_std_termios; normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; - normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; normal->driver_state = drv; tty_set_operations(normal, &uart_ops); @@ -2262,10 +2249,8 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port) * If this port is a console, then the spinlock is already * initialised. */ - if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) { + if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) spin_lock_init(&port->lock); - lockdep_set_class(&port->lock, &port_lock_key); - } uart_configure_port(drv, state, port); @@ -2327,7 +2312,7 @@ int uart_remove_one_port(struct uart_driver *drv, struct uart_port *port) mutex_unlock(&state->mutex); /* - * Remove the devices from the tty layer + * Remove the devices from devfs */ tty_unregister_device(drv->tty_driver, port->line); @@ -2382,9 +2367,6 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2) return (port1->iobase == port2->iobase) && (port1->hub6 == port2->hub6); case UPIO_MEM: - case UPIO_MEM32: - case UPIO_AU: - case UPIO_TSI: return (port1->mapbase == port2->mapbase); } return 0; diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 06a246ae5..2c7077354 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -185,12 +185,14 @@ static int serial_suspend(struct pcmcia_device *link) static int serial_resume(struct pcmcia_device *link) { - struct serial_info *info = link->priv; - int i; + if (pcmcia_dev_present(link)) { + struct serial_info *info = link->priv; + int i; - for (i = 0; i < info->ndev; i++) - serial8250_resume_port(info->line[i]); - wakeup_card(info); + for (i = 0; i < info->ndev; i++) + serial8250_resume_port(info->line[i]); + wakeup_card(info); + } return 0; } @@ -784,7 +786,6 @@ static struct pcmcia_device_id serial_ids[] = { PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"), PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"), PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "RS-COM-2P.cis"), - PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "GLOBETROTTER.cis"), /* too generic */ /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 23ddedbae..aa521b8e0 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c @@ -27,6 +27,7 @@ * */ +#include #if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -144,15 +145,14 @@ lh7a40xuart_rx_chars (struct uart_port* port) { struct tty_struct* tty = port->info->tty; int cbRxMax = 256; /* (Gross) limit on receive */ - unsigned int data; /* Received data and status */ - unsigned int flag; + unsigned int data, flag;/* Received data and status */ while (!(UR (port, UART_R_STATUS) & nRxRdy) && --cbRxMax) { data = UR (port, UART_R_DATA); flag = TTY_NORMAL; ++port->icount.rx; - if (unlikely(data & RxError)) { + if (unlikely(data & RxError)) { /* Quick check, short-circuit */ if (data & RxBreak) { data &= ~(RxFramingError | RxParityError); ++port->icount.brk; @@ -303,7 +303,7 @@ static void lh7a40xuart_set_mctrl (struct uart_port* port, unsigned int mctrl) /* Note, kernel appears to be setting DTR and RTS on console. */ /* *** FIXME: this deserves more work. There's some work in - tracing all of the IO pins. */ + tracing all of the IO pins. */ #if 0 if( port->mapbase == UART1_PHYS) { gpioRegs_t *gpio = (gpioRegs_t *)IO_ADDRESS(GPIO_PHYS); @@ -662,13 +662,9 @@ static int __init lh7a40xuart_init(void) if (ret == 0) { int i; - for (i = 0; i < DEV_NR; i++) { - /* UART3, when used, requires GPIO pin reallocation */ - if (lh7a40x_ports[i].port.mapbase == UART3_PHYS) - GPIO_PINMUX |= 1<<3; + for (i = 0; i < DEV_NR; i++) uart_add_one_port (&lh7a40x_reg, &lh7a40x_ports[i].port); - } } return ret; } diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index b361669f8..3bdee64d1 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c @@ -38,6 +38,7 @@ * Fix some spin_locks. * Do not call uart_add_one_port for absent ports. */ +#include #if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -68,10 +69,12 @@ static char *serial_name = "TX39/49 Serial driver"; #if !defined(CONFIG_SERIAL_TXX9_STDSERIAL) /* "ttyS" is used for standard serial driver */ #define TXX9_TTY_NAME "ttyTX" +#define TXX9_TTY_DEVFS_NAME "tttx/" #define TXX9_TTY_MINOR_START (64 + 64) /* ttyTX0(128), ttyTX1(129) */ #else /* acts like standard serial driver */ #define TXX9_TTY_NAME "ttyS" +#define TXX9_TTY_DEVFS_NAME "tts/" #define TXX9_TTY_MINOR_START 64 #endif #define TXX9_TTY_MAJOR TTY_MAJOR @@ -495,7 +498,7 @@ static int serial_txx9_startup(struct uart_port *port) sio_out(up, TXX9_SIDISR, 0); retval = request_irq(up->port.irq, serial_txx9_interrupt, - IRQF_SHARED, "serial_txx9", up); + SA_SHIRQ, "serial_txx9", up); if (retval) return retval; @@ -968,6 +971,7 @@ console_initcall(serial_txx9_console_init); static struct uart_driver serial_txx9_reg = { .owner = THIS_MODULE, .driver_name = "serial_txx9", + .devfs_name = TXX9_TTY_DEVFS_NAME, .dev_name = TXX9_TTY_NAME, .major = TXX9_TTY_MAJOR, .minor = TXX9_TTY_MINOR_START, diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index cbede06ca..44f6bf79b 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -20,6 +20,7 @@ #undef DEBUG +#include #include #include #include @@ -841,7 +842,7 @@ static int sci_request_irq(struct sci_port *port) printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); return -ENODEV; } - if (request_irq(port->irqs[0], sci_mpxed_interrupt, IRQF_DISABLED, + if (request_irq(port->irqs[0], sci_mpxed_interrupt, SA_INTERRUPT, "sci", port)) { printk(KERN_ERR "sci: Cannot allocate irq.\n"); return -ENODEV; @@ -850,7 +851,7 @@ static int sci_request_irq(struct sci_port *port) for (i = 0; i < ARRAY_SIZE(handlers); i++) { if (!port->irqs[i]) continue; - if (request_irq(port->irqs[i], handlers[i], IRQF_DISABLED, + if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT, desc[i], port)) { printk(KERN_ERR "sci: Cannot allocate irq.\n"); return -ENODEV; @@ -1579,7 +1580,7 @@ static int __init serial_console_setup(struct console *co, char *options) h8300_sci_enable(port, sci_enable); #endif #elif defined(CONFIG_SUPERH64) - port->uartclk = current_cpu_data.module_clock * 16; + port->uartclk = current_cpu_info.module_clock * 16; #else { struct clk *clk = clk_get("module_clk"); @@ -1698,6 +1699,9 @@ static char banner[] __initdata = static struct uart_driver sci_uart_driver = { .owner = THIS_MODULE, .driver_name = "sci", +#ifdef CONFIG_DEVFS_FS + .devfs_name = "ttsc/", +#endif .dev_name = "ttySC", .major = SCI_MAJOR, .minor = SCI_MINOR_START, @@ -1720,7 +1724,7 @@ static int __init sci_init(void) #if defined(__H8300H__) || defined(__H8300S__) sciport->port.uartclk = CONFIG_CPU_CLOCK; #elif defined(CONFIG_SUPERH64) - sciport->port.uartclk = current_cpu_data.module_clock * 16; + sciport->port.uartclk = current_cpu_info.module_clock * 16; #else struct clk *clk = clk_get("module_clk"); sciport->port.uartclk = clk_get_rate(clk) * 16; diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index ab320fa32..1f14bb438 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h @@ -10,6 +10,7 @@ * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). */ +#include #include #if defined(__H8300H__) || defined(__H8300S__) diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 2f148e5b9..60ea4a3f0 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c @@ -37,6 +37,7 @@ * http://oss.sgi.com/projects/GenInfo/NoticeExplan */ +#include #include #include #include @@ -648,7 +649,7 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id, struct pt_regs *regs) static int sn_sal_connect_interrupt(struct sn_cons_port *port) { if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, - IRQF_DISABLED | IRQF_SHARED, + SA_INTERRUPT | SA_SHIRQ, "SAL console driver", port) >= 0) { return SGI_UART_VECTOR; } diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index e35d9ab35..fa4ae9424 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c @@ -10,6 +10,7 @@ * Copyright (C) 2002 David S. Miller (davem@redhat.com) */ +#include #include #include #include diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index f851f0f44..f137804b3 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include #if defined(CONFIG_MAGIC_SYSRQ) @@ -353,6 +353,7 @@ static struct uart_ops sunhv_pops = { static struct uart_driver sunhv_reg = { .owner = THIS_MODULE, .driver_name = "serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, }; @@ -407,120 +408,143 @@ static inline struct console *SUNHV_CONSOLE(void) return &sunhv_console; } -static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) +static int __init hv_console_compatible(char *buf, int len) +{ + while (len) { + int this_len; + + if (!strcmp(buf, "qcn")) + return 1; + + this_len = strlen(buf) + 1; + + buf += this_len; + len -= this_len; + } + + return 0; +} + +static unsigned int __init get_interrupt(void) +{ + const char *cons_str = "console"; + const char *compat_str = "compatible"; + int node = prom_getchild(sun4v_vdev_root); + char buf[64]; + int err, len; + + node = prom_searchsiblings(node, cons_str); + if (!node) + return 0; + + len = prom_getproplen(node, compat_str); + if (len == 0 || len == -1) + return 0; + + err = prom_getproperty(node, compat_str, buf, 64); + if (err == -1) + return 0; + + if (!hv_console_compatible(buf, len)) + return 0; + + /* Ok, the this is the OBP node for the sun4v hypervisor + * console device. Decode the interrupt. + */ + return sun4v_vdev_device_interrupt(node); +} + +static int __init sunhv_init(void) { struct uart_port *port; - int err; + int ret; - if (op->irqs[0] == 0xffffffff) + if (tlb_type != hypervisor) return -ENODEV; - port = kzalloc(sizeof(struct uart_port), GFP_KERNEL); + port = kmalloc(sizeof(struct uart_port), GFP_KERNEL); if (unlikely(!port)) return -ENOMEM; - sunhv_port = port; + memset(port, 0, sizeof(struct uart_port)); port->line = 0; port->ops = &sunhv_pops; port->type = PORT_SUNHV; port->uartclk = ( 29491200 / 16 ); /* arbitrary */ + /* Set this just to make uart_configure_port() happy. */ port->membase = (unsigned char __iomem *) __pa(port); - port->irq = op->irqs[0]; - - port->dev = &op->dev; + port->irq = get_interrupt(); + if (!port->irq) { + kfree(port); + return -ENODEV; + } sunhv_reg.minor = sunserial_current_minor; sunhv_reg.nr = 1; - err = uart_register_driver(&sunhv_reg); - if (err) - goto out_free_port; + ret = uart_register_driver(&sunhv_reg); + if (ret < 0) { + printk(KERN_ERR "SUNHV: uart_register_driver() failed %d\n", + ret); + kfree(port); + + return ret; + } sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; sunserial_current_minor += 1; sunhv_reg.cons = SUNHV_CONSOLE(); - err = uart_add_one_port(&sunhv_reg, port); - if (err) - goto out_unregister_driver; + sunhv_port = port; - err = request_irq(port->irq, sunhv_interrupt, 0, "hvcons", port); - if (err) - goto out_remove_port; + ret = uart_add_one_port(&sunhv_reg, port); + if (ret < 0) { + printk(KERN_ERR "SUNHV: uart_add_one_port() failed %d\n", ret); + sunserial_current_minor -= 1; + uart_unregister_driver(&sunhv_reg); + kfree(port); + sunhv_port = NULL; + return -ENODEV; + } - dev_set_drvdata(&op->dev, port); + if (request_irq(port->irq, sunhv_interrupt, + SA_SHIRQ, "serial(sunhv)", port)) { + printk(KERN_ERR "sunhv: Cannot register IRQ\n"); + uart_remove_one_port(&sunhv_reg, port); + sunserial_current_minor -= 1; + uart_unregister_driver(&sunhv_reg); + kfree(port); + sunhv_port = NULL; + return -ENODEV; + } return 0; - -out_remove_port: - uart_remove_one_port(&sunhv_reg, port); - -out_unregister_driver: - sunserial_current_minor -= 1; - uart_unregister_driver(&sunhv_reg); - -out_free_port: - kfree(port); - sunhv_port = NULL; - return err; } -static int __devexit hv_remove(struct of_device *dev) +static void __exit sunhv_exit(void) { - struct uart_port *port = dev_get_drvdata(&dev->dev); + struct uart_port *port = sunhv_port; + + BUG_ON(!port); free_irq(port->irq, port); uart_remove_one_port(&sunhv_reg, port); - sunserial_current_minor -= 1; + uart_unregister_driver(&sunhv_reg); - kfree(port); + kfree(sunhv_port); sunhv_port = NULL; - - dev_set_drvdata(&dev->dev, NULL); - - return 0; -} - -static struct of_device_id hv_match[] = { - { - .name = "console", - .compatible = "qcn", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, hv_match); - -static struct of_platform_driver hv_driver = { - .name = "hv", - .match_table = hv_match, - .probe = hv_probe, - .remove = __devexit_p(hv_remove), -}; - -static int __init sunhv_init(void) -{ - if (tlb_type != hypervisor) - return -ENODEV; - - return of_register_driver(&hv_driver, &of_bus_type); -} - -static void __exit sunhv_exit(void) -{ - of_unregister_driver(&hv_driver); } module_init(sunhv_init); module_exit(sunhv_exit); MODULE_AUTHOR("David S. Miller"); -MODULE_DESCRIPTION("SUN4V Hypervisor console driver"); -MODULE_VERSION("2.0"); +MODULE_DESCRIPTION("SUN4V Hypervisor console driver") MODULE_LICENSE("GPL"); diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index cfe20f730..bfbe9dc90 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -1,7 +1,7 @@ /* sunsab.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) - * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2002 David S. Miller (davem@redhat.com) * * Rewrote buffer handling to use CIRC(Circular Buffer) macros. * Maxim Krasnyanskiy @@ -12,9 +12,10 @@ * Theodore Ts'o , 2001-Oct-12 * * Ported to new 2.5.x UART layer. - * David S. Miller + * David S. Miller */ +#include #include #include #include @@ -36,8 +37,8 @@ #include #include -#include -#include +#include +#include #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -850,6 +851,7 @@ static struct uart_ops sunsab_pops = { static struct uart_driver sunsab_reg = { .owner = THIS_MODULE, .driver_name = "serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, }; @@ -886,15 +888,6 @@ static int sunsab_console_setup(struct console *con, char *options) unsigned long flags; unsigned int baud, quot; - /* - * The console framework calls us for each and every port - * registered. Defer the console setup until the requested - * port has been properly discovered. A bit of a hack, - * though... - */ - if (up->port.type != PORT_SUNSAB) - return -1; - printk("Console: ttyS%d (SAB82532)\n", (sunsab_reg.minor - 64) + con->index); @@ -984,189 +977,199 @@ static inline struct console *SUNSAB_CONSOLE(void) #define sunsab_console_init() do { } while (0) #endif -static int __devinit sunsab_init_one(struct uart_sunsab_port *up, - struct of_device *op, - unsigned long offset, - int line) +static void __init for_each_sab_edev(void (*callback)(struct linux_ebus_device *, void *), void *arg) { - up->port.line = line; - up->port.dev = &op->dev; - - up->port.mapbase = op->resource[0].start + offset; - up->port.membase = of_ioremap(&op->resource[0], offset, - sizeof(union sab82532_async_regs), - "sab"); - if (!up->port.membase) - return -ENOMEM; - up->regs = (union sab82532_async_regs __iomem *) up->port.membase; + struct linux_ebus *ebus; + struct linux_ebus_device *edev = NULL; + + for_each_ebus(ebus) { + for_each_ebusdev(edev, ebus) { + if (!strcmp(edev->prom_name, "se")) { + callback(edev, arg); + continue; + } else if (!strcmp(edev->prom_name, "serial")) { + char compat[32]; + int clen; + + /* On RIO this can be an SE, check it. We could + * just check ebus->is_rio, but this is more portable. + */ + clen = prom_getproperty(edev->prom_node, "compatible", + compat, sizeof(compat)); + if (clen > 0) { + if (strncmp(compat, "sab82532", 8) == 0) { + callback(edev, arg); + continue; + } + } + } + } + } +} - up->port.irq = op->irqs[0]; +static void __init sab_count_callback(struct linux_ebus_device *edev, void *arg) +{ + int *count_p = arg; - up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; - up->port.iotype = UPIO_MEM; + (*count_p)++; +} - writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); +static void __init sab_attach_callback(struct linux_ebus_device *edev, void *arg) +{ + int *instance_p = arg; + struct uart_sunsab_port *up; + unsigned long regs, offset; + int i; - up->port.ops = &sunsab_pops; - up->port.type = PORT_SUNSAB; - up->port.uartclk = SAB_BASE_BAUD; + /* Note: ports are located in reverse order */ + regs = edev->resource[0].start; + offset = sizeof(union sab82532_async_regs); + for (i = 0; i < 2; i++) { + up = &sunsab_ports[(*instance_p * 2) + 1 - i]; - up->type = readb(&up->regs->r.vstr) & 0x0f; - writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr); - writeb(0xff, &up->regs->w.pim); - if ((up->port.line & 0x1) == 0) { - up->pvr_dsr_bit = (1 << 0); - up->pvr_dtr_bit = (1 << 1); - } else { - up->pvr_dsr_bit = (1 << 3); - up->pvr_dtr_bit = (1 << 2); - } - up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4); - writeb(up->cached_pvr, &up->regs->w.pvr); - up->cached_mode = readb(&up->regs->rw.mode); - up->cached_mode |= SAB82532_MODE_FRTS; - writeb(up->cached_mode, &up->regs->rw.mode); - up->cached_mode |= SAB82532_MODE_RTS; - writeb(up->cached_mode, &up->regs->rw.mode); + memset(up, 0, sizeof(*up)); + up->regs = ioremap(regs + offset, sizeof(union sab82532_async_regs)); + up->port.irq = edev->irqs[0]; + up->port.fifosize = SAB82532_XMIT_FIFO_SIZE; + up->port.mapbase = (unsigned long)up->regs; + up->port.iotype = UPIO_MEM; - up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT; - up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT; + writeb(SAB82532_IPC_IC_ACT_LOW, &up->regs->w.ipc); - if (!(up->port.line & 0x01)) { - int err; - - err = request_irq(up->port.irq, sunsab_interrupt, - IRQF_SHARED, "sab", up); - if (err) { - of_iounmap(up->port.membase, - sizeof(union sab82532_async_regs)); - return err; - } + offset -= sizeof(union sab82532_async_regs); } - - return 0; + + (*instance_p)++; } -static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match) +static int __init probe_for_sabs(void) { - static int inst; - struct uart_sunsab_port *up; - int err; - - up = &sunsab_ports[inst * 2]; - - err = sunsab_init_one(&up[0], op, - 0, - (inst * 2) + 0); - if (err) - return err; - - err = sunsab_init_one(&up[1], op, - sizeof(union sab82532_async_regs), - (inst * 2) + 1); - if (err) { - of_iounmap(up[0].port.membase, - sizeof(union sab82532_async_regs)); - free_irq(up[0].port.irq, &up[0]); - return err; - } + int this_sab = 0; - uart_add_one_port(&sunsab_reg, &up[0].port); - uart_add_one_port(&sunsab_reg, &up[1].port); + /* Find device instances. */ + for_each_sab_edev(&sab_count_callback, &this_sab); + if (!this_sab) + return -ENODEV; - dev_set_drvdata(&op->dev, &up[0]); + /* Allocate tables. */ + sunsab_ports = kmalloc(sizeof(struct uart_sunsab_port) * this_sab * 2, + GFP_KERNEL); + if (!sunsab_ports) + return -ENOMEM; - inst++; + num_channels = this_sab * 2; + this_sab = 0; + for_each_sab_edev(&sab_attach_callback, &this_sab); return 0; } -static void __devexit sab_remove_one(struct uart_sunsab_port *up) +static void __init sunsab_init_hw(void) { - uart_remove_one_port(&sunsab_reg, &up->port); - if (!(up->port.line & 1)) - free_irq(up->port.irq, up); - of_iounmap(up->port.membase, - sizeof(union sab82532_async_regs)); + int i; + + for (i = 0; i < num_channels; i++) { + struct uart_sunsab_port *up = &sunsab_ports[i]; + + up->port.line = i; + up->port.ops = &sunsab_pops; + up->port.type = PORT_SUNSAB; + up->port.uartclk = SAB_BASE_BAUD; + + up->type = readb(&up->regs->r.vstr) & 0x0f; + writeb(~((1 << 1) | (1 << 2) | (1 << 4)), &up->regs->w.pcr); + writeb(0xff, &up->regs->w.pim); + if (up->port.line == 0) { + up->pvr_dsr_bit = (1 << 0); + up->pvr_dtr_bit = (1 << 1); + } else { + up->pvr_dsr_bit = (1 << 3); + up->pvr_dtr_bit = (1 << 2); + } + up->cached_pvr = (1 << 1) | (1 << 2) | (1 << 4); + writeb(up->cached_pvr, &up->regs->w.pvr); + up->cached_mode = readb(&up->regs->rw.mode); + up->cached_mode |= SAB82532_MODE_FRTS; + writeb(up->cached_mode, &up->regs->rw.mode); + up->cached_mode |= SAB82532_MODE_RTS; + writeb(up->cached_mode, &up->regs->rw.mode); + + up->tec_timeout = SAB82532_MAX_TEC_TIMEOUT; + up->cec_timeout = SAB82532_MAX_CEC_TIMEOUT; + + if (!(up->port.line & 0x01)) { + if (request_irq(up->port.irq, sunsab_interrupt, + SA_SHIRQ, "serial(sab82532)", up)) { + printk("sunsab%d: can't get IRQ %x\n", + i, up->port.irq); + continue; + } + } + } } -static int __devexit sab_remove(struct of_device *op) +static int __init sunsab_init(void) { - struct uart_sunsab_port *up = dev_get_drvdata(&op->dev); + int ret = probe_for_sabs(); + int i; - sab_remove_one(&up[0]); - sab_remove_one(&up[1]); + if (ret < 0) + return ret; - dev_set_drvdata(&op->dev, NULL); + sunsab_init_hw(); - return 0; -} + sunsab_reg.minor = sunserial_current_minor; + sunsab_reg.nr = num_channels; -static struct of_device_id sab_match[] = { - { - .name = "se", - }, - { - .name = "serial", - .compatible = "sab82532", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, sab_match); + ret = uart_register_driver(&sunsab_reg); + if (ret < 0) { + int i; -static struct of_platform_driver sab_driver = { - .name = "sab", - .match_table = sab_match, - .probe = sab_probe, - .remove = __devexit_p(sab_remove), -}; + for (i = 0; i < num_channels; i++) { + struct uart_sunsab_port *up = &sunsab_ports[i]; -static int __init sunsab_init(void) -{ - struct device_node *dp; - int err; - - num_channels = 0; - for_each_node_by_name(dp, "se") - num_channels += 2; - for_each_node_by_name(dp, "serial") { - if (of_device_is_compatible(dp, "sab82532")) - num_channels += 2; - } + if (!(up->port.line & 0x01)) + free_irq(up->port.irq, up); + iounmap(up->regs); + } + kfree(sunsab_ports); + sunsab_ports = NULL; - if (num_channels) { - sunsab_ports = kzalloc(sizeof(struct uart_sunsab_port) * - num_channels, GFP_KERNEL); - if (!sunsab_ports) - return -ENOMEM; + return ret; + } - sunsab_reg.minor = sunserial_current_minor; - sunsab_reg.nr = num_channels; + sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64; - err = uart_register_driver(&sunsab_reg); - if (err) { - kfree(sunsab_ports); - sunsab_ports = NULL; + sunsab_reg.cons = SUNSAB_CONSOLE(); - return err; - } + sunserial_current_minor += num_channels; + + for (i = 0; i < num_channels; i++) { + struct uart_sunsab_port *up = &sunsab_ports[i]; - sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64; - sunsab_reg.cons = SUNSAB_CONSOLE(); - sunserial_current_minor += num_channels; + uart_add_one_port(&sunsab_reg, &up->port); } - return of_register_driver(&sab_driver, &of_bus_type); + return 0; } static void __exit sunsab_exit(void) { - of_unregister_driver(&sab_driver); - if (num_channels) { - sunserial_current_minor -= num_channels; - uart_unregister_driver(&sunsab_reg); + int i; + + for (i = 0; i < num_channels; i++) { + struct uart_sunsab_port *up = &sunsab_ports[i]; + + uart_remove_one_port(&sunsab_reg, &up->port); + + if (!(up->port.line & 0x01)) + free_irq(up->port.irq, up); + iounmap(up->regs); } + sunserial_current_minor -= num_channels; + uart_unregister_driver(&sunsab_reg); + kfree(sunsab_ports); sunsab_ports = NULL; } diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index d3a5aeee7..2b4f96541 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -12,9 +12,10 @@ * Theodore Ts'o , 2001-Oct-12 * * Converted to new 2.5.x UART layer. - * David S. Miller (davem@davemloft.net), 2002-Jul-29 + * David S. Miller (davem@redhat.com), 2002-Jul-29 */ +#include #include #include #include @@ -39,8 +40,11 @@ #include #include -#include -#include +#include +#include +#ifdef CONFIG_SPARC64 +#include +#endif #if defined(CONFIG_SERIAL_SUNSU_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -90,10 +94,10 @@ struct uart_sunsu_port { /* Probing information. */ enum su_type su_type; unsigned int type_probed; /* XXX Stupid */ - unsigned long reg_size; + int port_node; #ifdef CONFIG_SERIO - struct serio serio; + struct serio *serio; int serio_open; #endif }; @@ -505,7 +509,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg /* Stop-A is handled by drivers/char/keyboard.c now. */ if (up->su_type == SU_PORT_KBD) { #ifdef CONFIG_SERIO - serio_interrupt(&up->serio, ch, 0, regs); + serio_interrupt(up->serio, ch, 0, regs); #endif } else if (up->su_type == SU_PORT_MS) { int ret = suncore_mouse_baud_detection(ch, is_break); @@ -519,7 +523,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg case 0: #ifdef CONFIG_SERIO - serio_interrupt(&up->serio, ch, 0, regs); + serio_interrupt(up->serio, ch, 0, regs); #endif break; }; @@ -667,10 +671,10 @@ static int sunsu_startup(struct uart_port *port) if (up->su_type != SU_PORT_PORT) { retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, - IRQF_SHARED, su_typev[up->su_type], up); + SA_SHIRQ, su_typev[up->su_type], up); } else { retval = request_irq(up->port.irq, sunsu_serial_interrupt, - IRQF_SHARED, su_typev[up->su_type], up); + SA_SHIRQ, su_typev[up->su_type], up); } if (retval) { printk("su: Cannot register IRQ %d\n", up->port.irq); @@ -1027,14 +1031,99 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up) { unsigned char status1, status2, scratch, scratch2, scratch3; unsigned char save_lcr, save_mcr; + struct linux_ebus_device *dev = NULL; + struct linux_ebus *ebus; +#ifdef CONFIG_SPARC64 + struct sparc_isa_bridge *isa_br; + struct sparc_isa_device *isa_dev; +#endif +#ifndef CONFIG_SPARC64 + struct linux_prom_registers reg0; +#endif unsigned long flags; - if (up->su_type == SU_PORT_NONE) + if (!up->port_node || !up->su_type) return; up->type_probed = PORT_UNKNOWN; up->port.iotype = UPIO_MEM; + /* + * First we look for Ebus-bases su's + */ + for_each_ebus(ebus) { + for_each_ebusdev(dev, ebus) { + if (dev->prom_node == up->port_node) { + /* + * The EBus is broken on sparc; it delivers + * virtual addresses in resources. Oh well... + * This is correct on sparc64, though. + */ + up->port.membase = (char *) dev->resource[0].start; + /* + * This is correct on both architectures. + */ + up->port.mapbase = dev->resource[0].start; + up->port.irq = dev->irqs[0]; + goto ebus_done; + } + } + } + +#ifdef CONFIG_SPARC64 + for_each_isa(isa_br) { + for_each_isadev(isa_dev, isa_br) { + if (isa_dev->prom_node == up->port_node) { + /* Same on sparc64. Cool architecure... */ + up->port.membase = (char *) isa_dev->resource.start; + up->port.mapbase = isa_dev->resource.start; + up->port.irq = isa_dev->irq; + goto ebus_done; + } + } + } +#endif + +#ifdef CONFIG_SPARC64 + /* + * Not on Ebus, bailing. + */ + return; +#else + /* + * Not on Ebus, must be OBIO. + */ + if (prom_getproperty(up->port_node, "reg", + (char *)®0, sizeof(reg0)) == -1) { + prom_printf("sunsu: no \"reg\" property\n"); + return; + } + prom_apply_obio_ranges(®0, 1); + if (reg0.which_io != 0) { /* Just in case... */ + prom_printf("sunsu: bus number nonzero: 0x%x:%x\n", + reg0.which_io, reg0.phys_addr); + return; + } + up->port.mapbase = reg0.phys_addr; + if ((up->port.membase = ioremap(reg0.phys_addr, reg0.reg_size)) == 0) { + prom_printf("sunsu: Cannot map registers.\n"); + return; + } + + /* + * 0x20 is sun4m thing, Dave Redman heritage. + * See arch/sparc/kernel/irq.c. + */ +#define IRQ_4M(n) ((n)|0x20) + + /* + * There is no intr property on MrCoffee, so hardwire it. + */ + up->port.irq = IRQ_4M(13); +#endif + +ebus_done: + spin_lock_irqsave(&up->port.lock, flags); if (!(up->port.flags & UPF_BUGGY_UART)) { @@ -1176,17 +1265,23 @@ out: static struct uart_driver sunsu_reg = { .owner = THIS_MODULE, .driver_name = "serial", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, }; -static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up) +static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel) { int quot, baud; #ifdef CONFIG_SERIO struct serio *serio; #endif + spin_lock_init(&up->port.lock); + up->port.line = channel; + up->port.type = PORT_UNKNOWN; + up->port.uartclk = (SU_BASE_BAUD * 16); + if (up->su_type == SU_PORT_KBD) { up->cflag = B1200 | CS8 | CLOCAL | CREAD; baud = 1200; @@ -1198,36 +1293,41 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up) sunsu_autoconfig(up); if (up->port.type == PORT_UNKNOWN) - return -ENODEV; + return -1; - printk("%s: %s port at %lx, irq %u\n", - to_of_device(up->port.dev)->node->full_name, - (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", - up->port.mapbase, up->port.irq); + printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n", + channel, + up->port.membase, __irq_itoa(up->port.irq), + sunsu_type(&up->port)); #ifdef CONFIG_SERIO - serio = &up->serio; - serio->port_data = up; + up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL); + if (serio) { + memset(serio, 0, sizeof(*serio)); - serio->id.type = SERIO_RS232; - if (up->su_type == SU_PORT_KBD) { - serio->id.proto = SERIO_SUNKBD; - strlcpy(serio->name, "sukbd", sizeof(serio->name)); - } else { - serio->id.proto = SERIO_SUN; - serio->id.extra = 1; - strlcpy(serio->name, "sums", sizeof(serio->name)); - } - strlcpy(serio->phys, - (!(up->port.line & 1) ? "su/serio0" : "su/serio1"), - sizeof(serio->phys)); + serio->port_data = up; + + serio->id.type = SERIO_RS232; + if (up->su_type == SU_PORT_KBD) { + serio->id.proto = SERIO_SUNKBD; + strlcpy(serio->name, "sukbd", sizeof(serio->name)); + } else { + serio->id.proto = SERIO_SUN; + serio->id.extra = 1; + strlcpy(serio->name, "sums", sizeof(serio->name)); + } + strlcpy(serio->phys, (channel == 0 ? "su/serio0" : "su/serio1"), + sizeof(serio->phys)); - serio->write = sunsu_serio_write; - serio->open = sunsu_serio_open; - serio->close = sunsu_serio_close; - serio->dev.parent = up->port.dev; + serio->write = sunsu_serio_write; + serio->open = sunsu_serio_open; + serio->close = sunsu_serio_close; - serio_register_port(serio); + serio_register_port(serio); + } else { + printk(KERN_WARNING "su%d: not enough memory for serio port\n", + channel); + } #endif sunsu_change_speed(&up->port, up->cflag, 0, quot); @@ -1359,20 +1459,22 @@ static struct console sunsu_cons = { * Register console. */ -static inline struct console *SUNSU_CONSOLE(int num_uart) +static inline struct console *SUNSU_CONSOLE(void) { int i; if (con_is_present()) return NULL; - for (i = 0; i < num_uart; i++) { + for (i = 0; i < UART_NR; i++) { int this_minor = sunsu_reg.minor + i; if ((this_minor - 64) == (serial_console - 1)) break; } - if (i == num_uart) + if (i == UART_NR) + return NULL; + if (sunsu_ports[i].port_node == 0) return NULL; sunsu_cons.index = i; @@ -1380,203 +1482,252 @@ static inline struct console *SUNSU_CONSOLE(int num_uart) return &sunsu_cons; } #else -#define SUNSU_CONSOLE(num_uart) (NULL) +#define SUNSU_CONSOLE() (NULL) #define sunsu_serial_console_init() do { } while (0) #endif -static enum su_type __devinit su_get_type(struct device_node *dp) +static int __init sunsu_serial_init(void) { - struct device_node *ap = of_find_node_by_path("/aliases"); + int instance, ret, i; - if (ap) { - char *keyb = of_get_property(ap, "keyboard", NULL); - char *ms = of_get_property(ap, "mouse", NULL); + /* How many instances do we need? */ + instance = 0; + for (i = 0; i < UART_NR; i++) { + struct uart_sunsu_port *up = &sunsu_ports[i]; - if (keyb) { - if (dp == of_find_node_by_path(keyb)) - return SU_PORT_KBD; - } - if (ms) { - if (dp == of_find_node_by_path(ms)) - return SU_PORT_MS; - } - } + if (up->su_type == SU_PORT_MS || + up->su_type == SU_PORT_KBD) + continue; - return SU_PORT_PORT; -} + spin_lock_init(&up->port.lock); + up->port.flags |= UPF_BOOT_AUTOCONF; + up->port.type = PORT_UNKNOWN; + up->port.uartclk = (SU_BASE_BAUD * 16); -static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) -{ - static int inst; - struct device_node *dp = op->node; - struct uart_sunsu_port *up; - struct resource *rp; - enum su_type type; - int err; - - type = su_get_type(dp); - if (type == SU_PORT_PORT) { - if (inst >= UART_NR) - return -EINVAL; - up = &sunsu_ports[inst]; - } else { - up = kzalloc(sizeof(*up), GFP_KERNEL); - if (!up) - return -ENOMEM; - } - - up->port.line = inst; - - spin_lock_init(&up->port.lock); - - up->su_type = type; + sunsu_autoconfig(up); + if (up->port.type == PORT_UNKNOWN) + continue; - rp = &op->resource[0]; - up->port.mapbase = rp->start; - up->reg_size = (rp->end - rp->start) + 1; - up->port.membase = of_ioremap(rp, 0, up->reg_size, "su"); - if (!up->port.membase) { - if (type != SU_PORT_PORT) - kfree(up); - return -ENOMEM; + up->port.line = instance++; + up->port.ops = &sunsu_pops; } - up->port.irq = op->irqs[0]; + sunsu_reg.minor = sunserial_current_minor; - up->port.dev = &op->dev; + sunsu_reg.nr = instance; - up->port.type = PORT_UNKNOWN; - up->port.uartclk = (SU_BASE_BAUD * 16); + ret = uart_register_driver(&sunsu_reg); + if (ret < 0) + return ret; - err = 0; - if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { - err = sunsu_kbd_ms_init(up); - if (err) { - kfree(up); - goto out_unmap; - } - dev_set_drvdata(&op->dev, up); + sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; - return 0; - } + sunserial_current_minor += instance; - up->port.flags |= UPF_BOOT_AUTOCONF; + sunsu_reg.cons = SUNSU_CONSOLE(); - sunsu_autoconfig(up); + for (i = 0; i < UART_NR; i++) { + struct uart_sunsu_port *up = &sunsu_ports[i]; - err = -ENODEV; - if (up->port.type == PORT_UNKNOWN) - goto out_unmap; - - up->port.ops = &sunsu_pops; - - err = uart_add_one_port(&sunsu_reg, &up->port); - if (err) - goto out_unmap; + /* Do not register Keyboard/Mouse lines with UART + * layer. + */ + if (up->su_type == SU_PORT_MS || + up->su_type == SU_PORT_KBD) + continue; - dev_set_drvdata(&op->dev, up); + if (up->port.type == PORT_UNKNOWN) + continue; - inst++; + uart_add_one_port(&sunsu_reg, &up->port); + } return 0; - -out_unmap: - of_iounmap(up->port.membase, up->reg_size); - return err; } -static int __devexit su_remove(struct of_device *dev) +static int su_node_ok(int node, char *name, int namelen) { - struct uart_sunsu_port *up = dev_get_drvdata(&dev->dev);; - - if (up->su_type == SU_PORT_MS || - up->su_type == SU_PORT_KBD) { -#ifdef CONFIG_SERIO - serio_unregister_port(&up->serio); -#endif - kfree(up); - } else if (up->port.type != PORT_UNKNOWN) { - uart_remove_one_port(&sunsu_reg, &up->port); + if (strncmp(name, "su", namelen) == 0 || + strncmp(name, "su_pnp", namelen) == 0) + return 1; + + if (strncmp(name, "serial", namelen) == 0) { + char compat[32]; + int clen; + + /* Is it _really_ a 'su' device? */ + clen = prom_getproperty(node, "compatible", compat, sizeof(compat)); + if (clen > 0) { + if (strncmp(compat, "sab82532", 8) == 0) { + /* Nope, Siemens serial, not for us. */ + return 0; + } + } + return 1; } - dev_set_drvdata(&dev->dev, NULL); - return 0; } -static struct of_device_id su_match[] = { - { - .name = "su", - }, - { - .name = "su_pnp", - }, - { - .name = "serial", - .compatible = "su", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, su_match); +#define SU_PROPSIZE 128 -static struct of_platform_driver su_driver = { - .name = "su", - .match_table = su_match, - .probe = su_probe, - .remove = __devexit_p(su_remove), +/* + * Scan status structure. + * "prop" is a local variable but it eats stack to keep it in each + * stack frame of a recursive procedure. + */ +struct su_probe_scan { + int msnode, kbnode; /* PROM nodes for mouse and keyboard */ + int msx, kbx; /* minors for mouse and keyboard */ + int devices; /* scan index */ + char prop[SU_PROPSIZE]; }; -static int num_uart; - -static int __init sunsu_init(void) +/* + * We have several platforms which present 'su' in different parts + * of the device tree. 'su' may be found under obio, ebus, isa and pci. + * We walk over the tree and find them wherever PROM hides them. + */ +static void __init su_probe_any(struct su_probe_scan *t, int sunode) { - struct device_node *dp; - int err; + struct uart_sunsu_port *up; + int len; - num_uart = 0; - for_each_node_by_name(dp, "su") { - if (su_get_type(dp) == SU_PORT_PORT) - num_uart++; - } - for_each_node_by_name(dp, "su_pnp") { - if (su_get_type(dp) == SU_PORT_PORT) - num_uart++; + if (t->devices >= UART_NR) + return; + + for (; sunode != 0; sunode = prom_getsibling(sunode)) { + len = prom_getproperty(sunode, "name", t->prop, SU_PROPSIZE); + if (len <= 1) + continue; /* Broken PROM node */ + + if (su_node_ok(sunode, t->prop, len)) { + up = &sunsu_ports[t->devices]; + if (t->kbnode != 0 && sunode == t->kbnode) { + t->kbx = t->devices; + up->su_type = SU_PORT_KBD; + } else if (t->msnode != 0 && sunode == t->msnode) { + t->msx = t->devices; + up->su_type = SU_PORT_MS; + } else { +#ifdef CONFIG_SPARC64 + /* + * Do not attempt to use the truncated + * keyboard/mouse ports as serial ports + * on Ultras with PC keyboard attached. + */ + if (prom_getbool(sunode, "mouse")) + continue; + if (prom_getbool(sunode, "keyboard")) + continue; +#endif + up->su_type = SU_PORT_PORT; + } + up->port_node = sunode; + ++t->devices; + } else { + su_probe_any(t, prom_getchild(sunode)); + } } - for_each_node_by_name(dp, "serial") { - if (of_device_is_compatible(dp, "su")) { - if (su_get_type(dp) == SU_PORT_PORT) - num_uart++; +} + +static int __init sunsu_probe(void) +{ + int node; + int len; + struct su_probe_scan scan; + + /* + * First, we scan the tree. + */ + scan.devices = 0; + scan.msx = -1; + scan.kbx = -1; + scan.kbnode = 0; + scan.msnode = 0; + + /* + * Get the nodes for keyboard and mouse from 'aliases'... + */ + node = prom_getchild(prom_root_node); + node = prom_searchsiblings(node, "aliases"); + if (node != 0) { + len = prom_getproperty(node, "keyboard", scan.prop, SU_PROPSIZE); + if (len > 0) { + scan.prop[len] = 0; + scan.kbnode = prom_finddevice(scan.prop); + } + + len = prom_getproperty(node, "mouse", scan.prop, SU_PROPSIZE); + if (len > 0) { + scan.prop[len] = 0; + scan.msnode = prom_finddevice(scan.prop); } } - if (num_uart) { - sunsu_reg.minor = sunserial_current_minor; - sunsu_reg.nr = num_uart; - err = uart_register_driver(&sunsu_reg); - if (err) - return err; - sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64; - sunserial_current_minor += num_uart; - sunsu_reg.cons = SUNSU_CONSOLE(num_uart); + su_probe_any(&scan, prom_getchild(prom_root_node)); + + /* + * Second, we process the special case of keyboard and mouse. + * + * Currently if we got keyboard and mouse hooked to "su" ports + * we do not use any possible remaining "su" as a serial port. + * Thus, we ignore values of .msx and .kbx, then compact ports. + */ + if (scan.msx != -1 && scan.kbx != -1) { + sunsu_ports[0].su_type = SU_PORT_MS; + sunsu_ports[0].port_node = scan.msnode; + sunsu_kbd_ms_init(&sunsu_ports[0], 0); + + sunsu_ports[1].su_type = SU_PORT_KBD; + sunsu_ports[1].port_node = scan.kbnode; + sunsu_kbd_ms_init(&sunsu_ports[1], 1); + + return 0; } - err = of_register_driver(&su_driver, &of_bus_type); - if (err && num_uart) - uart_unregister_driver(&sunsu_reg); + if (scan.msx != -1 || scan.kbx != -1) { + printk("sunsu_probe: cannot match keyboard and mouse, confused\n"); + return -ENODEV; + } + + if (scan.devices == 0) + return -ENODEV; + + /* + * Console must be initiated after the generic initialization. + */ + sunsu_serial_init(); - return err; + return 0; } static void __exit sunsu_exit(void) { - if (num_uart) + int i, saw_uart; + + saw_uart = 0; + for (i = 0; i < UART_NR; i++) { + struct uart_sunsu_port *up = &sunsu_ports[i]; + + if (up->su_type == SU_PORT_MS || + up->su_type == SU_PORT_KBD) { +#ifdef CONFIG_SERIO + if (up->serio) { + serio_unregister_port(up->serio); + up->serio = NULL; + } +#endif + } else if (up->port.type != PORT_UNKNOWN) { + uart_remove_one_port(&sunsu_reg, &up->port); + saw_uart++; + } + } + + if (saw_uart) uart_unregister_driver(&sunsu_reg); } -module_init(sunsu_init); +module_init(sunsu_probe); module_exit(sunsu_exit); - -MODULE_AUTHOR("Eddie C. Dost, Peter Zaitcev, and David S. Miller"); -MODULE_DESCRIPTION("Sun SU serial port driver"); -MODULE_VERSION("2.0"); MODULE_LICENSE("GPL"); diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index d34f336d5..cd49ebbf4 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c @@ -1,4 +1,5 @@ -/* sunzilog.c: Zilog serial driver for Sparc systems. +/* + * sunzilog.c * * Driver for Zilog serial chips found on Sun workstations and * servers. This driver could actually be made more generic. @@ -9,9 +10,10 @@ * C. Dost, Pete Zaitcev, Ted Ts'o and Alex Buell for their * work there. * - * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2002 David S. Miller (davem@redhat.com) */ +#include #include #include #include @@ -36,8 +38,10 @@ #include #include -#include -#include +#ifdef CONFIG_SPARC64 +#include +#endif +#include #if defined(CONFIG_SERIAL_SUNZILOG_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -61,13 +65,16 @@ #define ZSDELAY() #define ZSDELAY_LONG() #define ZS_WSYNC(__channel) \ - readb(&((__channel)->control)) + sbus_readb(&((__channel)->control)) #endif static int num_sunzilog; #define NUM_SUNZILOG num_sunzilog #define NUM_CHANNELS (NUM_SUNZILOG * 2) +#define KEYBOARD_LINE 0x2 +#define MOUSE_LINE 0x3 + #define ZS_CLOCK 4915200 /* Zilog input clock rate. */ #define ZS_CLOCK_DIVISOR 16 /* Divisor this driver uses. */ @@ -100,7 +107,7 @@ struct uart_sunzilog_port { unsigned char prev_status; #ifdef CONFIG_SERIO - struct serio serio; + struct serio *serio; int serio_open; #endif }; @@ -131,9 +138,9 @@ static unsigned char read_zsreg(struct zilog_channel __iomem *channel, { unsigned char retval; - writeb(reg, &channel->control); + sbus_writeb(reg, &channel->control); ZSDELAY(); - retval = readb(&channel->control); + retval = sbus_readb(&channel->control); ZSDELAY(); return retval; @@ -142,9 +149,9 @@ static unsigned char read_zsreg(struct zilog_channel __iomem *channel, static void write_zsreg(struct zilog_channel __iomem *channel, unsigned char reg, unsigned char value) { - writeb(reg, &channel->control); + sbus_writeb(reg, &channel->control); ZSDELAY(); - writeb(value, &channel->control); + sbus_writeb(value, &channel->control); ZSDELAY(); } @@ -155,17 +162,17 @@ static void sunzilog_clear_fifo(struct zilog_channel __iomem *channel) for (i = 0; i < 32; i++) { unsigned char regval; - regval = readb(&channel->control); + regval = sbus_readb(&channel->control); ZSDELAY(); if (regval & Rx_CH_AV) break; regval = read_zsreg(channel, R1); - readb(&channel->data); + sbus_readb(&channel->data); ZSDELAY(); if (regval & (PAR_ERR | Rx_OVR | CRC_ERR)) { - writeb(ERR_RES, &channel->control); + sbus_writeb(ERR_RES, &channel->control); ZSDELAY(); ZS_WSYNC(channel); } @@ -187,7 +194,7 @@ static void __load_zsregs(struct zilog_channel __iomem *channel, unsigned char * udelay(100); } - writeb(ERR_RES, &channel->control); + sbus_writeb(ERR_RES, &channel->control); ZSDELAY(); ZS_WSYNC(channel); @@ -284,7 +291,7 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up, /* Stop-A is handled by drivers/char/keyboard.c now. */ #ifdef CONFIG_SERIO if (up->serio_open) - serio_interrupt(&up->serio, ch, 0, regs); + serio_interrupt(up->serio, ch, 0, regs); #endif } else if (ZS_IS_MOUSE(up)) { int ret = suncore_mouse_baud_detection(ch, is_break); @@ -299,7 +306,7 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up, case 0: #ifdef CONFIG_SERIO if (up->serio_open) - serio_interrupt(&up->serio, ch, 0, regs); + serio_interrupt(up->serio, ch, 0, regs); #endif break; }; @@ -323,12 +330,12 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up, r1 = read_zsreg(channel, R1); if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) { - writeb(ERR_RES, &channel->control); + sbus_writeb(ERR_RES, &channel->control); ZSDELAY(); ZS_WSYNC(channel); } - ch = readb(&channel->control); + ch = sbus_readb(&channel->control); ZSDELAY(); /* This funny hack depends upon BRK_ABRT not interfering @@ -340,7 +347,7 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up, if (!(ch & Rx_CH_AV)) break; - ch = readb(&channel->data); + ch = sbus_readb(&channel->data); ZSDELAY(); ch &= up->parity_mask; @@ -399,10 +406,10 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up, { unsigned char status; - status = readb(&channel->control); + status = sbus_readb(&channel->control); ZSDELAY(); - writeb(RES_EXT_INT, &channel->control); + sbus_writeb(RES_EXT_INT, &channel->control); ZSDELAY(); ZS_WSYNC(channel); @@ -414,7 +421,7 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up, * confusing the PROM. */ while (1) { - status = readb(&channel->control); + status = sbus_readb(&channel->control); ZSDELAY(); if (!(status & BRK_ABRT)) break; @@ -451,7 +458,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, struct circ_buf *xmit; if (ZS_IS_CONS(up)) { - unsigned char status = readb(&channel->control); + unsigned char status = sbus_readb(&channel->control); ZSDELAY(); /* TX still busy? Just wait for the next TX done interrupt. @@ -480,7 +487,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, if (up->port.x_char) { up->flags |= SUNZILOG_FLAG_TX_ACTIVE; - writeb(up->port.x_char, &channel->data); + sbus_writeb(up->port.x_char, &channel->data); ZSDELAY(); ZS_WSYNC(channel); @@ -499,7 +506,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, goto ack_tx_int; up->flags |= SUNZILOG_FLAG_TX_ACTIVE; - writeb(xmit->buf[xmit->tail], &channel->data); + sbus_writeb(xmit->buf[xmit->tail], &channel->data); ZSDELAY(); ZS_WSYNC(channel); @@ -512,7 +519,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, return; ack_tx_int: - writeb(RES_Tx_P, &channel->control); + sbus_writeb(RES_Tx_P, &channel->control); ZSDELAY(); ZS_WSYNC(channel); } @@ -533,7 +540,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id, struct pt_regs *reg /* Channel A */ tty = NULL; if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { - writeb(RES_H_IUS, &channel->control); + sbus_writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); @@ -556,7 +563,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id, struct pt_regs *reg spin_lock(&up->port.lock); tty = NULL; if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { - writeb(RES_H_IUS, &channel->control); + sbus_writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); @@ -587,7 +594,7 @@ static __inline__ unsigned char sunzilog_read_channel_status(struct uart_port *p unsigned char status; channel = ZILOG_CHANNEL_FROM_PORT(port); - status = readb(&channel->control); + status = sbus_readb(&channel->control); ZSDELAY(); return status; @@ -675,7 +682,7 @@ static void sunzilog_start_tx(struct uart_port *port) up->flags |= SUNZILOG_FLAG_TX_ACTIVE; up->flags &= ~SUNZILOG_FLAG_TX_STOPPED; - status = readb(&channel->control); + status = sbus_readb(&channel->control); ZSDELAY(); /* TX busy? Just wait for the TX done interrupt. */ @@ -686,7 +693,7 @@ static void sunzilog_start_tx(struct uart_port *port) * IRQ sending engine. */ if (port->x_char) { - writeb(port->x_char, &channel->data); + sbus_writeb(port->x_char, &channel->data); ZSDELAY(); ZS_WSYNC(channel); @@ -695,7 +702,7 @@ static void sunzilog_start_tx(struct uart_port *port) } else { struct circ_buf *xmit = &port->info->xmit; - writeb(xmit->buf[xmit->tail], &channel->data); + sbus_writeb(xmit->buf[xmit->tail], &channel->data); ZSDELAY(); ZS_WSYNC(channel); @@ -772,7 +779,7 @@ static void __sunzilog_startup(struct uart_sunzilog_port *up) struct zilog_channel __iomem *channel; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - up->prev_status = readb(&channel->control); + up->prev_status = sbus_readb(&channel->control); /* Enable receiver and transmitter. */ up->curregs[R3] |= RxENAB; @@ -956,7 +963,7 @@ sunzilog_set_termios(struct uart_port *port, struct termios *termios, static const char *sunzilog_type(struct uart_port *port) { - return "zs"; + return "SunZilog"; } /* We do not request/release mappings of the registers here, this @@ -1005,55 +1012,242 @@ static struct uart_sunzilog_port *sunzilog_port_table; static struct zilog_layout __iomem **sunzilog_chip_regs; static struct uart_sunzilog_port *sunzilog_irq_chain; +static int zilog_irq = -1; static struct uart_driver sunzilog_reg = { .owner = THIS_MODULE, .driver_name = "ttyS", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, }; -static int __init sunzilog_alloc_tables(void) +static void * __init alloc_one_table(unsigned long size) { - struct uart_sunzilog_port *up; - unsigned long size; - int i; + void *ret; - size = NUM_CHANNELS * sizeof(struct uart_sunzilog_port); - sunzilog_port_table = kzalloc(size, GFP_KERNEL); - if (!sunzilog_port_table) - return -ENOMEM; + ret = kmalloc(size, GFP_KERNEL); + if (ret != NULL) + memset(ret, 0, size); - for (i = 0; i < NUM_CHANNELS; i++) { - up = &sunzilog_port_table[i]; + return ret; +} + +static void __init sunzilog_alloc_tables(void) +{ + sunzilog_port_table = + alloc_one_table(NUM_CHANNELS * sizeof(struct uart_sunzilog_port)); + sunzilog_chip_regs = + alloc_one_table(NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *)); + + if (sunzilog_port_table == NULL || sunzilog_chip_regs == NULL) { + prom_printf("SunZilog: Cannot allocate tables.\n"); + prom_halt(); + } +} - spin_lock_init(&up->port.lock); +#ifdef CONFIG_SPARC64 - if (i == 0) - sunzilog_irq_chain = up; +/* We used to attempt to use the address property of the Zilog device node + * but that totally is not necessary on sparc64. + */ +static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) +{ + void __iomem *mapped_addr; + unsigned int sun4u_ino; + struct sbus_bus *sbus = NULL; + struct sbus_dev *sdev = NULL; + int err; - if (i < NUM_CHANNELS - 1) - up->next = up + 1; - else - up->next = NULL; + if (central_bus == NULL) { + for_each_sbus(sbus) { + for_each_sbusdev(sdev, sbus) { + if (sdev->prom_node == zsnode) + goto found; + } + } + } + found: + if (sdev == NULL && central_bus == NULL) { + prom_printf("SunZilog: sdev&¢ral == NULL for " + "Zilog %d in get_zs_sun4u.\n", chip); + prom_halt(); } + if (central_bus == NULL) { + mapped_addr = + sbus_ioremap(&sdev->resource[0], 0, + PAGE_SIZE, + "Zilog Registers"); + } else { + struct linux_prom_registers zsregs[1]; + + err = prom_getproperty(zsnode, "reg", + (char *) &zsregs[0], + sizeof(zsregs)); + if (err == -1) { + prom_printf("SunZilog: Cannot map " + "Zilog %d regs on " + "central bus.\n", chip); + prom_halt(); + } + apply_fhc_ranges(central_bus->child, + &zsregs[0], 1); + apply_central_ranges(central_bus, &zsregs[0], 1); + mapped_addr = (void __iomem *) + ((((u64)zsregs[0].which_io)<<32UL) | + ((u64)zsregs[0].phys_addr)); + } + + if (zilog_irq == -1) { + if (central_bus) { + unsigned long iclr, imap; - size = NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *); - sunzilog_chip_regs = kzalloc(size, GFP_KERNEL); - if (!sunzilog_chip_regs) { - kfree(sunzilog_port_table); - sunzilog_irq_chain = NULL; - return -ENOMEM; + iclr = central_bus->child->fhc_regs.uregs + + FHC_UREGS_ICLR; + imap = central_bus->child->fhc_regs.uregs + + FHC_UREGS_IMAP; + zilog_irq = build_irq(12, 0, iclr, imap); + } else { + err = prom_getproperty(zsnode, "interrupts", + (char *) &sun4u_ino, + sizeof(sun4u_ino)); + zilog_irq = sbus_build_irq(sbus_root, sun4u_ino); + } } - return 0; + return (struct zilog_layout __iomem *) mapped_addr; +} +#else /* CONFIG_SPARC64 */ + +/* + * XXX The sun4d case is utterly screwed: it tries to re-walk the tree + * (for the 3rd time) in order to find bootbus and cpu. Streamline it. + */ +static struct zilog_layout __iomem * __init get_zs_sun4cmd(int chip, int node) +{ + struct linux_prom_irqs irq_info[2]; + void __iomem *mapped_addr = NULL; + int zsnode, cpunode, bbnode; + struct linux_prom_registers zsreg[4]; + struct resource res; + + if (sparc_cpu_model == sun4d) { + int walk; + + zsnode = 0; + bbnode = 0; + cpunode = 0; + for (walk = prom_getchild(prom_root_node); + (walk = prom_searchsiblings(walk, "cpu-unit")) != 0; + walk = prom_getsibling(walk)) { + bbnode = prom_getchild(walk); + if (bbnode && + (bbnode = prom_searchsiblings(bbnode, "bootbus"))) { + if ((zsnode = prom_getchild(bbnode)) == node) { + cpunode = walk; + break; + } + } + } + if (!walk) { + prom_printf("SunZilog: Cannot find the %d'th bootbus on sun4d.\n", + (chip / 2)); + prom_halt(); + } + + if (prom_getproperty(zsnode, "reg", + (char *) zsreg, sizeof(zsreg)) == -1) { + prom_printf("SunZilog: Cannot map Zilog %d\n", chip); + prom_halt(); + } + /* XXX Looks like an off by one? */ + prom_apply_generic_ranges(bbnode, cpunode, zsreg, 1); + res.start = zsreg[0].phys_addr; + res.end = res.start + (8 - 1); + res.flags = zsreg[0].which_io | IORESOURCE_IO; + mapped_addr = sbus_ioremap(&res, 0, 8, "Zilog Serial"); + + } else { + zsnode = node; + +#if 0 /* XXX When was this used? */ + if (prom_getintdefault(zsnode, "slave", -1) != chipid) { + zsnode = prom_getsibling(zsnode); + continue; + } +#endif + + /* + * "address" is only present on ports that OBP opened + * (from Mitch Bradley's "Hitchhiker's Guide to OBP"). + * We do not use it. + */ + + if (prom_getproperty(zsnode, "reg", + (char *) zsreg, sizeof(zsreg)) == -1) { + prom_printf("SunZilog: Cannot map Zilog %d\n", chip); + prom_halt(); + } + if (sparc_cpu_model == sun4m) /* Crude. Pass parent. XXX */ + prom_apply_obio_ranges(zsreg, 1); + res.start = zsreg[0].phys_addr; + res.end = res.start + (8 - 1); + res.flags = zsreg[0].which_io | IORESOURCE_IO; + mapped_addr = sbus_ioremap(&res, 0, 8, "Zilog Serial"); + } + + if (prom_getproperty(zsnode, "intr", + (char *) irq_info, sizeof(irq_info)) + % sizeof(struct linux_prom_irqs)) { + prom_printf("SunZilog: Cannot get IRQ property for Zilog %d.\n", + chip); + prom_halt(); + } + if (zilog_irq == -1) { + zilog_irq = irq_info[0].pri; + } else if (zilog_irq != irq_info[0].pri) { + /* XXX. Dumb. Should handle per-chip IRQ, for add-ons. */ + prom_printf("SunZilog: Inconsistent IRQ layout for Zilog %d.\n", + chip); + prom_halt(); + } + + return (struct zilog_layout __iomem *) mapped_addr; } +#endif /* !(CONFIG_SPARC64) */ -static void sunzilog_free_tables(void) +/* Get the address of the registers for SunZilog instance CHIP. */ +static struct zilog_layout __iomem * __init get_zs(int chip, int node) { - kfree(sunzilog_port_table); - sunzilog_irq_chain = NULL; - kfree(sunzilog_chip_regs); + if (chip < 0 || chip >= NUM_SUNZILOG) { + prom_printf("SunZilog: Illegal chip number %d in get_zs.\n", chip); + prom_halt(); + } + +#ifdef CONFIG_SPARC64 + return get_zs_sun4u(chip, node); +#else + + if (sparc_cpu_model == sun4) { + struct resource res; + + /* Not probe-able, hard code it. */ + switch (chip) { + case 0: + res.start = 0xf1000000; + break; + case 1: + res.start = 0xf0000000; + break; + }; + zilog_irq = 12; + res.end = (res.start + (8 - 1)); + res.flags = IORESOURCE_IO; + return sbus_ioremap(&res, 0, 8, "SunZilog"); + } + + return get_zs_sun4cmd(chip, node); +#endif } #define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ @@ -1067,7 +1261,7 @@ static void sunzilog_putchar(struct uart_port *port, int ch) * udelay with ZSDELAY as that is a NOP on some platforms. -DaveM */ do { - unsigned char val = readb(&channel->control); + unsigned char val = sbus_readb(&channel->control); if (val & Tx_BUF_EMP) { ZSDELAY(); break; @@ -1075,7 +1269,7 @@ static void sunzilog_putchar(struct uart_port *port, int ch) udelay(5); } while (--loops); - writeb(ch, &channel->data); + sbus_writeb(ch, &channel->data); ZSDELAY(); ZS_WSYNC(channel); } @@ -1146,9 +1340,6 @@ static int __init sunzilog_console_setup(struct console *con, char *options) unsigned long flags; int baud, brg; - if (up->port.type != PORT_SUNZILOG) - return -1; - printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n", (sunzilog_reg.minor - 64) + con->index, con->index); @@ -1195,6 +1386,28 @@ static struct console sunzilog_console = { .data = &sunzilog_reg, }; +static int __init sunzilog_console_init(void) +{ + int i; + + if (con_is_present()) + return 0; + + for (i = 0; i < NUM_CHANNELS; i++) { + int this_minor = sunzilog_reg.minor + i; + + if ((this_minor - 64) == (serial_console - 1)) + break; + } + if (i == NUM_CHANNELS) + return 0; + + sunzilog_console.index = i; + sunzilog_port_table[i].flags |= SUNZILOG_FLAG_IS_CONS; + register_console(&sunzilog_console); + return 0; +} + static inline struct console *SUNZILOG_CONSOLE(void) { int i; @@ -1219,19 +1432,116 @@ static inline struct console *SUNZILOG_CONSOLE(void) #else #define SUNZILOG_CONSOLE() (NULL) +#define sunzilog_console_init() do { } while (0) #endif +/* + * We scan the PROM tree recursively. This is the most reliable way + * to find Zilog nodes on various platforms. However, we face an extreme + * shortage of kernel stack, so we must be very careful. To that end, + * we scan only to a certain depth, and we use a common property buffer + * in the scan structure. + */ +#define ZS_PROPSIZE 128 +#define ZS_SCAN_DEPTH 5 + +struct zs_probe_scan { + int depth; + void (*scanner)(struct zs_probe_scan *t, int node); + + int devices; + char prop[ZS_PROPSIZE]; +}; + +static int __inline__ sunzilog_node_ok(int node, const char *name, int len) +{ + if (strncmp(name, "zs", len) == 0) + return 1; + /* Don't fold this procedure just yet. Compare to su_node_ok(). */ + return 0; +} + +static void __init sunzilog_scan(struct zs_probe_scan *t, int node) +{ + int len; + + for (; node != 0; node = prom_getsibling(node)) { + len = prom_getproperty(node, "name", t->prop, ZS_PROPSIZE); + if (len <= 1) + continue; /* Broken PROM node */ + if (sunzilog_node_ok(node, t->prop, len)) { + (*t->scanner)(t, node); + } else { + if (t->depth < ZS_SCAN_DEPTH) { + t->depth++; + sunzilog_scan(t, prom_getchild(node)); + --t->depth; + } + } + } +} + +static void __init sunzilog_prepare(void) +{ + struct uart_sunzilog_port *up; + struct zilog_layout __iomem *rp; + int channel, chip; + + /* + * Temporary fix. + */ + for (channel = 0; channel < NUM_CHANNELS; channel++) + spin_lock_init(&sunzilog_port_table[channel].port.lock); + + sunzilog_irq_chain = up = &sunzilog_port_table[0]; + for (channel = 0; channel < NUM_CHANNELS - 1; channel++) + up[channel].next = &up[channel + 1]; + up[channel].next = NULL; + + for (chip = 0; chip < NUM_SUNZILOG; chip++) { + rp = sunzilog_chip_regs[chip]; + up[(chip * 2) + 0].port.membase = (void __iomem *)&rp->channelA; + up[(chip * 2) + 1].port.membase = (void __iomem *)&rp->channelB; + + /* Channel A */ + up[(chip * 2) + 0].port.iotype = UPIO_MEM; + up[(chip * 2) + 0].port.irq = zilog_irq; + up[(chip * 2) + 0].port.uartclk = ZS_CLOCK; + up[(chip * 2) + 0].port.fifosize = 1; + up[(chip * 2) + 0].port.ops = &sunzilog_pops; + up[(chip * 2) + 0].port.type = PORT_SUNZILOG; + up[(chip * 2) + 0].port.flags = 0; + up[(chip * 2) + 0].port.line = (chip * 2) + 0; + up[(chip * 2) + 0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; + + /* Channel B */ + up[(chip * 2) + 1].port.iotype = UPIO_MEM; + up[(chip * 2) + 1].port.irq = zilog_irq; + up[(chip * 2) + 1].port.uartclk = ZS_CLOCK; + up[(chip * 2) + 1].port.fifosize = 1; + up[(chip * 2) + 1].port.ops = &sunzilog_pops; + up[(chip * 2) + 1].port.type = PORT_SUNZILOG; + up[(chip * 2) + 1].port.flags = 0; + up[(chip * 2) + 1].port.line = (chip * 2) + 1; + up[(chip * 2) + 1].flags |= 0; + } +} + static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channel) { int baud, brg; - if (up->flags & SUNZILOG_FLAG_CONS_KEYB) { + if (channel == KEYBOARD_LINE) { + up->flags |= SUNZILOG_FLAG_CONS_KEYB; up->cflag = B1200 | CS8 | CLOCAL | CREAD; baud = 1200; } else { + up->flags |= SUNZILOG_FLAG_CONS_MOUSE; up->cflag = B4800 | CS8 | CLOCAL | CREAD; baud = 4800; } + printk(KERN_INFO "zs%d at 0x%p (irq = %s) is a SunZilog\n", + channel, up->port.membase, __irq_itoa(zilog_irq)); up->curregs[R15] = BRKIE; brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); @@ -1241,290 +1551,218 @@ static void __init sunzilog_init_kbdms(struct uart_sunzilog_port *up, int channe } #ifdef CONFIG_SERIO -static void __init sunzilog_register_serio(struct uart_sunzilog_port *up) +static void __init sunzilog_register_serio(struct uart_sunzilog_port *up, int channel) { - struct serio *serio = &up->serio; + struct serio *serio; - serio->port_data = up; + up->serio = serio = kmalloc(sizeof(struct serio), GFP_KERNEL); + if (serio) { + memset(serio, 0, sizeof(*serio)); - serio->id.type = SERIO_RS232; - if (up->flags & SUNZILOG_FLAG_CONS_KEYB) { - serio->id.proto = SERIO_SUNKBD; - strlcpy(serio->name, "zskbd", sizeof(serio->name)); - } else { - serio->id.proto = SERIO_SUN; - serio->id.extra = 1; - strlcpy(serio->name, "zsms", sizeof(serio->name)); - } - strlcpy(serio->phys, - ((up->flags & SUNZILOG_FLAG_CONS_KEYB) ? - "zs/serio0" : "zs/serio1"), - sizeof(serio->phys)); + serio->port_data = up; + + serio->id.type = SERIO_RS232; + if (channel == KEYBOARD_LINE) { + serio->id.proto = SERIO_SUNKBD; + strlcpy(serio->name, "zskbd", sizeof(serio->name)); + } else { + serio->id.proto = SERIO_SUN; + serio->id.extra = 1; + strlcpy(serio->name, "zsms", sizeof(serio->name)); + } + strlcpy(serio->phys, + (channel == KEYBOARD_LINE ? "zs/serio0" : "zs/serio1"), + sizeof(serio->phys)); - serio->write = sunzilog_serio_write; - serio->open = sunzilog_serio_open; - serio->close = sunzilog_serio_close; - serio->dev.parent = up->port.dev; + serio->write = sunzilog_serio_write; + serio->open = sunzilog_serio_open; + serio->close = sunzilog_serio_close; - serio_register_port(serio); + serio_register_port(serio); + } else { + printk(KERN_WARNING "zs%d: not enough memory for serio port\n", + channel); + } } #endif -static void __init sunzilog_init_hw(struct uart_sunzilog_port *up) +static void __init sunzilog_init_hw(void) { - struct zilog_channel __iomem *channel; - unsigned long flags; - int baud, brg; + int i; - channel = ZILOG_CHANNEL_FROM_PORT(&up->port); + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_sunzilog_port *up = &sunzilog_port_table[i]; + struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); + unsigned long flags; + int baud, brg; - spin_lock_irqsave(&up->port.lock, flags); - if (ZS_IS_CHANNEL_A(up)) { - write_zsreg(channel, R9, FHWRES); - ZSDELAY_LONG(); - (void) read_zsreg(channel, R0); - } + spin_lock_irqsave(&up->port.lock, flags); - if (up->flags & (SUNZILOG_FLAG_CONS_KEYB | - SUNZILOG_FLAG_CONS_MOUSE)) { - sunzilog_init_kbdms(up, up->port.line); - up->curregs[R9] |= (NV | MIE); - write_zsreg(channel, R9, up->curregs[R9]); - } else { - /* Normal serial TTY. */ - up->parity_mask = 0xff; - up->curregs[R1] = EXT_INT_ENAB | INT_ALL_Rx | TxINT_ENAB; - up->curregs[R4] = PAR_EVEN | X16CLK | SB1; - up->curregs[R3] = RxENAB | Rx8; - up->curregs[R5] = TxENAB | Tx8; - up->curregs[R9] = NV | MIE; - up->curregs[R10] = NRZ; - up->curregs[R11] = TCBR | RCBR; - baud = 9600; - brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); - up->curregs[R12] = (brg & 0xff); - up->curregs[R13] = (brg >> 8) & 0xff; - up->curregs[R14] = BRSRC | BRENAB; - __load_zsregs(channel, up->curregs); - write_zsreg(channel, R9, up->curregs[R9]); - } + if (ZS_IS_CHANNEL_A(up)) { + write_zsreg(channel, R9, FHWRES); + ZSDELAY_LONG(); + (void) read_zsreg(channel, R0); + } - spin_unlock_irqrestore(&up->port.lock, flags); + 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; + up->curregs[R1] = EXT_INT_ENAB | INT_ALL_Rx | TxINT_ENAB; + up->curregs[R4] = PAR_EVEN | X16CLK | SB1; + up->curregs[R3] = RxENAB | Rx8; + up->curregs[R5] = TxENAB | Tx8; + up->curregs[R9] = NV | MIE; + up->curregs[R10] = NRZ; + up->curregs[R11] = TCBR | RCBR; + baud = 9600; + brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); + up->curregs[R12] = (brg & 0xff); + up->curregs[R13] = (brg >> 8) & 0xff; + up->curregs[R14] = BRSRC | BRENAB; + __load_zsregs(channel, up->curregs); + write_zsreg(channel, R9, up->curregs[R9]); + } + + spin_unlock_irqrestore(&up->port.lock, flags); #ifdef CONFIG_SERIO - if (up->flags & (SUNZILOG_FLAG_CONS_KEYB | - SUNZILOG_FLAG_CONS_MOUSE)) - sunzilog_register_serio(up); + if (i == KEYBOARD_LINE || i == MOUSE_LINE) + sunzilog_register_serio(up, i); #endif + } } -static int zilog_irq = -1; +static struct zilog_layout __iomem * __init get_zs(int chip, int node); -static int __devinit zs_probe(struct of_device *op, const struct of_device_id *match) +static void __init sunzilog_scan_probe(struct zs_probe_scan *t, int node) { - static int inst; - struct uart_sunzilog_port *up; - struct zilog_layout __iomem *rp; - int keyboard_mouse; - int err; + sunzilog_chip_regs[t->devices] = get_zs(t->devices, node); + t->devices++; +} - keyboard_mouse = 0; - if (of_find_property(op->node, "keyboard", NULL)) - keyboard_mouse = 1; - - sunzilog_chip_regs[inst] = of_ioremap(&op->resource[0], 0, - sizeof(struct zilog_layout), - "zs"); - if (!sunzilog_chip_regs[inst]) - return -ENOMEM; - - rp = sunzilog_chip_regs[inst]; - - if (zilog_irq == -1) - zilog_irq = op->irqs[0]; - - up = &sunzilog_port_table[inst * 2]; - - /* Channel A */ - up[0].port.mapbase = op->resource[0].start + 0x00; - up[0].port.membase = (void __iomem *) &rp->channelA; - up[0].port.iotype = UPIO_MEM; - up[0].port.irq = op->irqs[0]; - up[0].port.uartclk = ZS_CLOCK; - up[0].port.fifosize = 1; - up[0].port.ops = &sunzilog_pops; - up[0].port.type = PORT_SUNZILOG; - up[0].port.flags = 0; - up[0].port.line = (inst * 2) + 0; - up[0].port.dev = &op->dev; - up[0].flags |= SUNZILOG_FLAG_IS_CHANNEL_A; - if (keyboard_mouse) - up[0].flags |= SUNZILOG_FLAG_CONS_KEYB; - sunzilog_init_hw(&up[0]); - - /* Channel B */ - up[1].port.mapbase = op->resource[0].start + 0x04; - up[1].port.membase = (void __iomem *) &rp->channelB; - up[1].port.iotype = UPIO_MEM; - up[1].port.irq = op->irqs[0]; - up[1].port.uartclk = ZS_CLOCK; - up[1].port.fifosize = 1; - up[1].port.ops = &sunzilog_pops; - up[1].port.type = PORT_SUNZILOG; - up[1].port.flags = 0; - up[1].port.line = (inst * 2) + 1; - up[1].port.dev = &op->dev; - up[1].flags |= 0; - if (keyboard_mouse) - up[1].flags |= SUNZILOG_FLAG_CONS_MOUSE; - sunzilog_init_hw(&up[1]); - - if (!keyboard_mouse) { - err = uart_add_one_port(&sunzilog_reg, &up[0].port); - if (err) { - of_iounmap(rp, sizeof(struct zilog_layout)); - return err; - } - err = uart_add_one_port(&sunzilog_reg, &up[1].port); - if (err) { - uart_remove_one_port(&sunzilog_reg, &up[0].port); - of_iounmap(rp, sizeof(struct zilog_layout)); - return err; - } - } else { - printk(KERN_INFO "%s: Keyboard at MMIO %lx (irq = %d) " - "is a zs\n", - op->dev.bus_id, up[0].port.mapbase, op->irqs[0]); - printk(KERN_INFO "%s: Mouse at MMIO %lx (irq = %d) " - "is a zs\n", - op->dev.bus_id, up[1].port.mapbase, op->irqs[0]); - } +static int __init sunzilog_ports_init(void) +{ + struct zs_probe_scan scan; + int ret; + int uart_count; + int i; - dev_set_drvdata(&op->dev, &up[0]); + printk(KERN_DEBUG "SunZilog: %d chips.\n", NUM_SUNZILOG); - inst++; + scan.scanner = sunzilog_scan_probe; + scan.depth = 0; + scan.devices = 0; + sunzilog_scan(&scan, prom_getchild(prom_root_node)); - return 0; -} + sunzilog_prepare(); -static void __devexit zs_remove_one(struct uart_sunzilog_port *up) -{ - if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) { -#ifdef CONFIG_SERIO - serio_unregister_port(&up->serio); -#endif - } else - uart_remove_one_port(&sunzilog_reg, &up->port); -} + if (request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, + "SunZilog", sunzilog_irq_chain)) { + prom_printf("SunZilog: Unable to register zs interrupt handler.\n"); + prom_halt(); + } -static int __devexit zs_remove(struct of_device *dev) -{ - struct uart_sunzilog_port *up = dev_get_drvdata(&dev->dev); - struct zilog_layout __iomem *regs; + sunzilog_init_hw(); + + /* We can only init this once we have probed the Zilogs + * in the system. Do not count channels assigned to keyboards + * or mice when we are deciding how many ports to register. + */ + uart_count = 0; + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_sunzilog_port *up = &sunzilog_port_table[i]; - zs_remove_one(&up[0]); - zs_remove_one(&up[1]); + if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) + continue; - regs = sunzilog_chip_regs[up[0].port.line / 2]; - of_iounmap(regs, sizeof(struct zilog_layout)); + uart_count++; + } + + sunzilog_reg.nr = uart_count; + sunzilog_reg.minor = sunserial_current_minor; - dev_set_drvdata(&dev->dev, NULL); + ret = uart_register_driver(&sunzilog_reg); + if (ret == 0) { + sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; + sunzilog_reg.cons = SUNZILOG_CONSOLE(); - return 0; -} + sunserial_current_minor += uart_count; -static struct of_device_id zs_match[] = { - { - .name = "zs", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, zs_match); + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_sunzilog_port *up = &sunzilog_port_table[i]; -static struct of_platform_driver zs_driver = { - .name = "zs", - .match_table = zs_match, - .probe = zs_probe, - .remove = __devexit_p(zs_remove), -}; + if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) + continue; -static int __init sunzilog_init(void) -{ - struct device_node *dp; - int err, uart_count; - int num_keybms; - - NUM_SUNZILOG = 0; - num_keybms = 0; - for_each_node_by_name(dp, "zs") { - NUM_SUNZILOG++; - if (of_find_property(dp, "keyboard", NULL)) - num_keybms++; + if (uart_add_one_port(&sunzilog_reg, &up->port)) { + printk(KERN_ERR + "SunZilog: failed to add port zs%d\n", i); + } + } } - uart_count = 0; - if (NUM_SUNZILOG) { - int uart_count; + return ret; +} - err = sunzilog_alloc_tables(); - if (err) - goto out; +static void __init sunzilog_scan_count(struct zs_probe_scan *t, int node) +{ + t->devices++; +} - uart_count = (NUM_SUNZILOG * 2) - (2 * num_keybms); +static int __init sunzilog_ports_count(void) +{ + struct zs_probe_scan scan; - sunzilog_reg.nr = uart_count; - sunzilog_reg.minor = sunserial_current_minor; - err = uart_register_driver(&sunzilog_reg); - if (err) - goto out_free_tables; + /* Sun4 Zilog setup is hard coded, no probing to do. */ + if (sparc_cpu_model == sun4) + return 2; - sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64; - sunzilog_reg.cons = SUNZILOG_CONSOLE(); + scan.scanner = sunzilog_scan_count; + scan.depth = 0; + scan.devices = 0; - sunserial_current_minor += uart_count; - } + sunzilog_scan(&scan, prom_getchild(prom_root_node)); - err = of_register_driver(&zs_driver, &of_bus_type); - if (err) - goto out_unregister_uart; + return scan.devices; +} - if (zilog_irq != -1) { - err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED, - "zs", sunzilog_irq_chain); - if (err) - goto out_unregister_driver; - } +static int __init sunzilog_init(void) +{ -out: - return err; + NUM_SUNZILOG = sunzilog_ports_count(); + if (NUM_SUNZILOG == 0) + return -ENODEV; -out_unregister_driver: - of_unregister_driver(&zs_driver); + sunzilog_alloc_tables(); -out_unregister_uart: - if (NUM_SUNZILOG) { - uart_unregister_driver(&sunzilog_reg); - sunzilog_reg.cons = NULL; - } + sunzilog_ports_init(); -out_free_tables: - sunzilog_free_tables(); - goto out; + return 0; } static void __exit sunzilog_exit(void) { - of_unregister_driver(&zs_driver); + int i; - if (zilog_irq != -1) { - free_irq(zilog_irq, sunzilog_irq_chain); - zilog_irq = -1; - } + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_sunzilog_port *up = &sunzilog_port_table[i]; - if (NUM_SUNZILOG) { - uart_unregister_driver(&sunzilog_reg); - sunzilog_free_tables(); + if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up)) { +#ifdef CONFIG_SERIO + if (up->serio) { + serio_unregister_port(up->serio); + up->serio = NULL; + } +#endif + } else + uart_remove_one_port(&sunzilog_reg, &up->port); } + + uart_unregister_driver(&sunzilog_reg); } module_init(sunzilog_init); @@ -1532,5 +1770,4 @@ module_exit(sunzilog_exit); MODULE_AUTHOR("David S. Miller"); MODULE_DESCRIPTION("Sun Zilog serial port driver"); -MODULE_VERSION("2.0"); MODULE_LICENSE("GPL"); diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c index f802867c9..df705fda4 100644 --- a/drivers/serial/v850e_uart.c +++ b/drivers/serial/v850e_uart.c @@ -372,13 +372,13 @@ static int v850e_uart_startup (struct uart_port *port) /* Alloc RX irq. */ err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, - IRQF_DISABLED, "v850e_uart", port); + SA_INTERRUPT, "v850e_uart", port); if (err) return err; /* Alloc TX irq. */ err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, - IRQF_DISABLED, "v850e_uart", port); + SA_INTERRUPT, "v850e_uart", port); if (err) { free_irq (V850E_UART_RX_IRQ (port->line), port); return err; @@ -468,6 +468,7 @@ static struct uart_ops v850e_uart_ops = { static struct uart_driver v850e_uart_driver = { .owner = THIS_MODULE, .driver_name = "v850e_uart", + .devfs_name = "tts/", .dev_name = "ttyS", .major = TTY_MAJOR, .minor = V850E_UART_MINOR_BASE, diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index 6c8b0ea83..df5e8713f 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c @@ -19,6 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -38,7 +39,6 @@ #include #include -#include #include #include @@ -911,6 +911,7 @@ static struct uart_driver siu_uart_driver = { .owner = THIS_MODULE, .driver_name = "SIU", .dev_name = "ttyVR", + .devfs_name = "ttvr/", .major = SIU_MAJOR, .minor = SIU_MINOR_BASE, .cons = SERIAL_VR41XX_CONSOLE, diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 6c7e0352d..501316b19 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c @@ -7,6 +7,7 @@ * Pat Gefre - IOC3 serial port IRQ demuxer */ +#include #include #include #include @@ -25,7 +26,7 @@ static DECLARE_RWSEM(ioc3_devices_rwsem); static struct ioc3_submodule *ioc3_submodules[IOC3_MAX_SUBMODULES]; static struct ioc3_submodule *ioc3_ethernet; -static DEFINE_RWLOCK(ioc3_submodules_lock); +static rwlock_t ioc3_submodules_lock = RW_LOCK_UNLOCKED; /* NIC probing code */ @@ -706,7 +707,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) writel(~0, &idd->vma->eisr); idd->dual_irq = 1; - if (!request_irq(pdev->irq, ioc3_intr_eth, IRQF_SHARED, + if (!request_irq(pdev->irq, ioc3_intr_eth, SA_SHIRQ, "ioc3-eth", (void *)idd)) { idd->irq_eth = pdev->irq; } else { @@ -714,7 +715,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) "%s : request_irq fails for IRQ 0x%x\n ", __FUNCTION__, pdev->irq); } - if (!request_irq(pdev->irq+2, ioc3_intr_io, IRQF_SHARED, + if (!request_irq(pdev->irq+2, ioc3_intr_io, SA_SHIRQ, "ioc3-io", (void *)idd)) { idd->irq_io = pdev->irq+2; } else { @@ -723,7 +724,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) __FUNCTION__, pdev->irq+2); } } else { - if (!request_irq(pdev->irq, ioc3_intr_io, IRQF_SHARED, + if (!request_irq(pdev->irq, ioc3_intr_io, SA_SHIRQ, "ioc3", (void *)idd)) { idd->irq_io = pdev->irq; } else { diff --git a/drivers/sn/ioc4.c b/drivers/sn/ioc4.c index 8562821e6..cdeff9094 100644 --- a/drivers/sn/ioc4.c +++ b/drivers/sn/ioc4.c @@ -160,6 +160,9 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) writel(0, &idd->idd_misc_regs->int_out.raw); mmiowb(); + printk(KERN_INFO + "%s: Calibrating PCI bus speed " + "for pci_dev %s ... ", __FUNCTION__, pci_name(idd->idd_pdev)); /* Set up square wave */ int_out.raw = 0; int_out.fields.count = IOC4_CALIBRATE_COUNT; @@ -203,16 +206,11 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) /* Bounds check the result. */ if (period > IOC4_CALIBRATE_LOW_LIMIT || period < IOC4_CALIBRATE_HIGH_LIMIT) { - printk(KERN_INFO - "IOC4 %s: Clock calibration failed. Assuming" - "PCI clock is %d ns.\n", - pci_name(idd->idd_pdev), + printk("failed. Assuming PCI clock ticks are %d ns.\n", IOC4_CALIBRATE_DEFAULT / IOC4_EXTINT_COUNT_DIVISOR); period = IOC4_CALIBRATE_DEFAULT; } else { - printk(KERN_DEBUG - "IOC4 %s: PCI clock is %ld ns.\n", - pci_name(idd->idd_pdev), + printk("succeeded. PCI clock ticks are %ld ns.\n", period / IOC4_EXTINT_COUNT_DIVISOR); } @@ -224,51 +222,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) idd->count_period = period; } -/* There are three variants of IOC4 cards: IO9, IO10, and PCI-RT. - * Each brings out different combinations of IOC4 signals, thus. - * the IOC4 subdrivers need to know to which we're attached. - * - * We look for the presence of a SCSI (IO9) or SATA (IO10) controller - * on the same PCI bus at slot number 3 to differentiate IO9 from IO10. - * If neither is present, it's a PCI-RT. - */ -static unsigned int -ioc4_variant(struct ioc4_driver_data *idd) -{ - struct pci_dev *pdev = NULL; - int found = 0; - - /* IO9: Look for a QLogic ISP 12160 at the same bus and slot 3. */ - do { - pdev = pci_get_device(PCI_VENDOR_ID_QLOGIC, - PCI_DEVICE_ID_QLOGIC_ISP12160, pdev); - if (pdev && - idd->idd_pdev->bus->number == pdev->bus->number && - 3 == PCI_SLOT(pdev->devfn)) - found = 1; - pci_dev_put(pdev); - } while (pdev && !found); - if (NULL != pdev) - return IOC4_VARIANT_IO9; - - /* IO10: Look for a Vitesse VSC 7174 at the same bus and slot 3. */ - pdev = NULL; - do { - pdev = pci_get_device(PCI_VENDOR_ID_VITESSE, - PCI_DEVICE_ID_VITESSE_VSC7174, pdev); - if (pdev && - idd->idd_pdev->bus->number == pdev->bus->number && - 3 == PCI_SLOT(pdev->devfn)) - found = 1; - pci_dev_put(pdev); - } while (pdev && !found); - if (NULL != pdev) - return IOC4_VARIANT_IO10; - - /* PCI-RT: No SCSI/SATA controller will be present */ - return IOC4_VARIANT_PCI_RT; -} - /* Adds a new instance of an IOC4 card */ static int ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) @@ -333,13 +286,6 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) /* Failsafe portion of per-IOC4 initialization */ - /* Detect card variant */ - idd->idd_variant = ioc4_variant(idd); - printk(KERN_INFO "IOC4 %s: %s card detected.\n", pci_name(pdev), - idd->idd_variant == IOC4_VARIANT_IO9 ? "IO9" : - idd->idd_variant == IOC4_VARIANT_PCI_RT ? "PCI-RT" : - idd->idd_variant == IOC4_VARIANT_IO10 ? "IO10" : "unknown"); - /* Initialize IOC4 */ pci_read_config_dword(idd->idd_pdev, PCI_COMMAND, &pcmd); pci_write_config_dword(idd->idd_pdev, PCI_COMMAND, @@ -438,7 +384,7 @@ static struct pci_device_id ioc4_id_table[] = { {0} }; -static struct pci_driver ioc4_driver = { +static struct pci_driver __devinitdata ioc4_driver = { .name = "IOC4", .id_table = ioc4_id_table, .probe = ioc4_probe, diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 146298ad7..1cea4a679 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -210,7 +210,6 @@ spi_new_device(struct spi_master *master, struct spi_board_info *chip) proxy->master = master; proxy->chip_select = chip->chip_select; proxy->max_speed_hz = chip->max_speed_hz; - proxy->mode = chip->mode; proxy->irq = chip->irq; proxy->modalias = chip->modalias; @@ -510,7 +509,7 @@ static void spi_complete(void *arg) */ int spi_sync(struct spi_device *spi, struct spi_message *message) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); int status; message->complete = spi_complete; diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index a23862ef7..dd2f950b2 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -16,6 +16,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c index 39d9b20f2..a006a1ee2 100644 --- a/drivers/spi/spi_butterfly.c +++ b/drivers/spi/spi_butterfly.c @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 20eb6e95a..5fc14563e 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c @@ -13,6 +13,7 @@ //#define DEBUG +#include #include #include #include diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c index a5d2cdfff..aacdceb8f 100644 --- a/drivers/spi/spi_s3c24xx_gpio.c +++ b/drivers/spi/spi_s3c24xx_gpio.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include diff --git a/drivers/tc/lk201.c b/drivers/tc/lk201.c index 757dec9c7..cf10d5cdf 100644 --- a/drivers/tc/lk201.c +++ b/drivers/tc/lk201.c @@ -8,6 +8,7 @@ * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki */ +#include #include #include diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 5e8a27620..2dffa8e30 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c @@ -39,6 +39,7 @@ * is shared with DSRS(DTE) at pin 23. */ +#include #include #include #include @@ -1744,6 +1745,7 @@ int __init zs_init(void) /* Not all of this is exactly right for us. */ serial_driver->owner = THIS_MODULE; + serial_driver->devfs_name = "tts/"; serial_driver->name = "ttyS"; serial_driver->major = TTY_MAJOR; serial_driver->minor_start = 64; @@ -1752,7 +1754,7 @@ int __init zs_init(void) serial_driver->init_termios = tty_std_termios; serial_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; - serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; tty_set_operations(serial_driver, &serial_ops); if (tty_register_driver(serial_driver)) @@ -1791,7 +1793,7 @@ int __init zs_init(void) zs_soft[channel].clk_divisor = 16; zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]); - if (request_irq(zs_soft[channel].irq, rs_interrupt, IRQF_SHARED, + if (request_irq(zs_soft[channel].irq, rs_interrupt, SA_SHIRQ, "scc", &zs_soft[channel])) printk(KERN_ERR "decserial: can't get irq %d\n", zs_soft[channel].irq); diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index f6b2948ab..5578a9dd0 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c @@ -5712,7 +5712,7 @@ static int ixj_daa_write(IXJ *j) return 1; } -static int ixj_set_tone_off(unsigned short arg, IXJ *j) +int ixj_set_tone_off(unsigned short arg, IXJ *j) { j->tone_off_time = arg; if (ixj_WriteDSPCommand(0x6E05, j)) /* Set Tone Off Period */ diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c index e41f49afd..e166fffea 100644 --- a/drivers/telephony/phonedev.c +++ b/drivers/telephony/phonedev.c @@ -28,6 +28,7 @@ #include #include +#include #include #define PHONE_NUM_DEVICES 256 @@ -105,6 +106,8 @@ int phone_register_device(struct phone_device *p, int unit) if (phone_device[i] == NULL) { phone_device[i] = p; p->minor = i; + devfs_mk_cdev(MKDEV(PHONE_MAJOR,i), + S_IFCHR|S_IRUSR|S_IWUSR, "phone/%d", i); mutex_unlock(&phone_lock); return 0; } @@ -122,6 +125,7 @@ void phone_unregister_device(struct phone_device *pfd) mutex_lock(&phone_lock); if (phone_device[pfd->minor] != pfd) panic("phone: bad unregister"); + devfs_remove("phone/%d", pfd->minor); phone_device[pfd->minor] = NULL; mutex_unlock(&phone_lock); } diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 005043197..7fdbc5dad 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -23,8 +23,7 @@ config USB_ARCH_HAS_OHCI default y if ARCH_LH7A404 default y if ARCH_S3C2410 default y if PXA27x - default y if ARCH_EP93XX - default y if (ARCH_AT91RM9200 || ARCH_AT91SAM9261) + default y if ARCH_AT91RM9200 # PPC: default y if STB03xxx default y if PPC_MPC52xx diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 4710eb02e..9b7d9769f 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -48,7 +48,6 @@ obj-$(CONFIG_USB_MICROTEK) += image/ obj-$(CONFIG_USB_SERIAL) += serial/ obj-$(CONFIG_USB_AUERSWALD) += misc/ -obj-$(CONFIG_USB_CYPRESS_CY7C63)+= misc/ obj-$(CONFIG_USB_CYTHERM) += misc/ obj-$(CONFIG_USB_EMI26) += misc/ obj-$(CONFIG_USB_EMI62) += misc/ @@ -62,7 +61,6 @@ obj-$(CONFIG_USB_TEST) += misc/ obj-$(CONFIG_USB_USS720) += misc/ obj-$(CONFIG_USB_PHIDGETSERVO) += misc/ obj-$(CONFIG_USB_SISUSBVGA) += misc/ -obj-$(CONFIG_USB_APPLEDISPLAY) += misc/ obj-$(CONFIG_USB_ATM) += atm/ obj-$(CONFIG_USB_SPEEDTOUCH) += atm/ diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index a38701c74..546249843 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -1039,7 +1039,7 @@ static void usbatm_tasklet_schedule(unsigned long data) tasklet_schedule((struct tasklet_struct *) data); } -static void usbatm_init_channel(struct usbatm_channel *channel) +static inline void usbatm_init_channel(struct usbatm_channel *channel) { spin_lock_init(&channel->lock); INIT_LIST_HEAD(&channel->list); diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c index 70125c6d3..42d6823b8 100644 --- a/drivers/usb/atm/xusbatm.c +++ b/drivers/usb/atm/xusbatm.c @@ -20,6 +20,7 @@ ******************************************************************************/ #include +#include /* FIXME: required by linux/etherdevice.h */ #include /* for random_ether_addr() */ #include "usbatm.h" diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index ca90326f2..6dd339f4c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include @@ -127,8 +127,8 @@ static int acm_wb_alloc(struct acm *acm) wb->use = 1; return wbn; } - wbn = (wbn + 1) % ACM_NW; - if (++i >= ACM_NW) + wbn = (wbn + 1) % ACM_NWB; + if (++i >= ACM_NWB) return -1; } } @@ -142,9 +142,10 @@ static int acm_wb_is_avail(struct acm *acm) { int i, n; - n = ACM_NW; - for (i = 0; i < ACM_NW; i++) { - n -= acm->wb[i].use; + n = 0; + for (i = 0; i < ACM_NWB; i++) { + if (!acm->wb[i].use) + n++; } return n; } @@ -166,7 +167,7 @@ static void acm_write_done(struct acm *acm) acm->write_ready = 1; wbn = acm->write_current; acm_wb_free(acm, wbn); - acm->write_current = (wbn + 1) % ACM_NW; + acm->write_current = (wbn + 1) % ACM_NWB; spin_unlock_irqrestore(&acm->write_lock, flags); } @@ -290,32 +291,22 @@ static void acm_read_bulk(struct urb *urb, struct pt_regs *regs) struct acm_rb *buf; struct acm_ru *rcv = urb->context; struct acm *acm = rcv->instance; - int status = urb->status; - dbg("Entering acm_read_bulk with status %d", urb->status); + dbg("Entering acm_read_bulk with status %d\n", urb->status); if (!ACM_READY(acm)) return; - if (status) - dev_dbg(&acm->data->dev, "bulk rx status %d", status); + if (urb->status) + dev_dbg(&acm->data->dev, "bulk rx status %d\n", urb->status); buf = rcv->buffer; buf->size = urb->actual_length; - if (likely(status == 0)) { - spin_lock(&acm->read_lock); - list_add_tail(&rcv->list, &acm->spare_read_urbs); - list_add_tail(&buf->list, &acm->filled_read_bufs); - spin_unlock(&acm->read_lock); - } else { - /* we drop the buffer due to an error */ - spin_lock(&acm->read_lock); - list_add_tail(&rcv->list, &acm->spare_read_urbs); - list_add(&buf->list, &acm->spare_read_bufs); - spin_unlock(&acm->read_lock); - /* nevertheless the tasklet must be kicked unconditionally - so the queue cannot dry up */ - } + spin_lock(&acm->read_lock); + list_add_tail(&rcv->list, &acm->spare_read_urbs); + list_add_tail(&buf->list, &acm->filled_read_bufs); + spin_unlock(&acm->read_lock); + tasklet_schedule(&acm->urb_task); } @@ -343,7 +334,7 @@ next_buffer: list_del(&buf->list); spin_unlock(&acm->read_lock); - dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d", buf, buf->size); + dbg("acm_rx_tasklet: procesing buf 0x%p, size = %d\n", buf, buf->size); tty_buffer_request_room(tty, buf->size); if (!acm->throttle) @@ -394,7 +385,7 @@ urbs: rcv->urb->transfer_dma = buf->dma; rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; - dbg("acm_rx_tasklet: sending urb 0x%p, rcv 0x%p, buf 0x%p", rcv->urb, rcv, buf); + dbg("acm_rx_tasklet: sending urb 0x%p, rcv 0x%p, buf 0x%p\n", rcv->urb, rcv, buf); /* This shouldn't kill the driver as unsuccessful URBs are returned to the free-urbs-pool and resubmited ASAP */ @@ -413,7 +404,7 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs) { struct acm *acm = (struct acm *)urb->context; - dbg("Entering acm_write_bulk with status %d", urb->status); + dbg("Entering acm_write_bulk with status %d\n", urb->status); acm_write_done(acm); acm_write_start(acm); @@ -424,7 +415,7 @@ static void acm_write_bulk(struct urb *urb, struct pt_regs *regs) static void acm_softint(void *private) { struct acm *acm = private; - dbg("Entering acm_softint."); + dbg("Entering acm_softint.\n"); if (!ACM_READY(acm)) return; @@ -440,7 +431,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) struct acm *acm; int rv = -EINVAL; int i; - dbg("Entering acm_tty_open."); + dbg("Entering acm_tty_open.\n"); mutex_lock(&open_mutex); @@ -473,10 +464,10 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) INIT_LIST_HEAD(&acm->spare_read_urbs); INIT_LIST_HEAD(&acm->spare_read_bufs); INIT_LIST_HEAD(&acm->filled_read_bufs); - for (i = 0; i < acm->rx_buflimit; i++) { + for (i = 0; i < ACM_NRU; i++) { list_add(&(acm->ru[i].list), &acm->spare_read_urbs); } - for (i = 0; i < acm->rx_buflimit; i++) { + for (i = 0; i < ACM_NRB; i++) { list_add(&(acm->rb[i].list), &acm->spare_read_bufs); } @@ -497,15 +488,14 @@ bail_out: static void acm_tty_unregister(struct acm *acm) { - int i,nr; + int i; - nr = acm->rx_buflimit; tty_unregister_device(acm_tty_driver, acm->minor); usb_put_intf(acm->control); acm_table[acm->minor] = NULL; usb_free_urb(acm->ctrlurb); usb_free_urb(acm->writeurb); - for (i = 0; i < nr; i++) + for (i = 0; i < ACM_NRU; i++) usb_free_urb(acm->ru[i].urb); kfree(acm); } @@ -513,19 +503,18 @@ static void acm_tty_unregister(struct acm *acm) static void acm_tty_close(struct tty_struct *tty, struct file *filp) { struct acm *acm = tty->driver_data; - int i,nr; + int i; if (!acm || !acm->used) return; - nr = acm->rx_buflimit; mutex_lock(&open_mutex); if (!--acm->used) { if (acm->dev) { acm_set_control(acm, acm->ctrlout = 0); usb_kill_urb(acm->ctrlurb); usb_kill_urb(acm->writeurb); - for (i = 0; i < nr; i++) + for (i = 0; i < ACM_NRU; i++) usb_kill_urb(acm->ru[i].urb); } else acm_tty_unregister(acm); @@ -541,7 +530,7 @@ static int acm_tty_write(struct tty_struct *tty, const unsigned char *buf, int c int wbn; struct acm_wb *wb; - dbg("Entering acm_tty_write to write %d bytes,", count); + dbg("Entering acm_tty_write to write %d bytes,\n", count); if (!ACM_READY(acm)) return -EINVAL; @@ -587,7 +576,7 @@ static int acm_tty_chars_in_buffer(struct tty_struct *tty) /* * This is inaccurate (overcounts), but it works. */ - return (ACM_NW - acm_wb_is_avail(acm)) * acm->writesize; + return (ACM_NWB - acm_wb_is_avail(acm)) * acm->writesize; } static void acm_tty_throttle(struct tty_struct *tty) @@ -723,7 +712,7 @@ static void acm_write_buffers_free(struct acm *acm) int i; struct acm_wb *wb; - for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) { + for (wb = &acm->wb[0], i = 0; i < ACM_NWB; i++, wb++) { usb_buffer_free(acm->dev, acm->writesize, wb->buf, wb->dmah); } } @@ -734,7 +723,7 @@ static int acm_write_buffers_alloc(struct acm *acm) int i; struct acm_wb *wb; - for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) { + for (wb = &acm->wb[0], i = 0; i < ACM_NWB; i++, wb++) { wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL, &wb->dmah); if (!wb->buf) { @@ -771,14 +760,10 @@ static int acm_probe (struct usb_interface *intf, int call_interface_num = -1; int data_interface_num; unsigned long quirks; - int num_rx_buf; int i; - /* normal quirks */ - quirks = (unsigned long)id->driver_info; - num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR; - /* handle quirks deadly to normal probing*/ + quirks = (unsigned long)id->driver_info; if (quirks == NO_UNION_NORMAL) { data_interface = usb_ifnum_to_if(usb_dev, 1); control_interface = usb_ifnum_to_if(usb_dev, 0); @@ -793,7 +778,7 @@ static int acm_probe (struct usb_interface *intf, if (!buflen) { if (intf->cur_altsetting->endpoint->extralen && intf->cur_altsetting->endpoint->extra) { - dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint"); + dev_dbg(&intf->dev,"Seeking extra descriptors on endpoint\n"); buflen = intf->cur_altsetting->endpoint->extralen; buffer = intf->cur_altsetting->endpoint->extra; } else { @@ -842,24 +827,24 @@ next_desc: if (!union_header) { if (call_interface_num > 0) { - dev_dbg(&intf->dev,"No union descriptor, using call management descriptor"); + dev_dbg(&intf->dev,"No union descriptor, using call management descriptor\n"); data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = call_interface_num)); control_interface = intf; } else { - dev_dbg(&intf->dev,"No union descriptor, giving up"); + dev_dbg(&intf->dev,"No union descriptor, giving up\n"); return -ENODEV; } } else { control_interface = usb_ifnum_to_if(usb_dev, union_header->bMasterInterface0); data_interface = usb_ifnum_to_if(usb_dev, (data_interface_num = union_header->bSlaveInterface0)); if (!control_interface || !data_interface) { - dev_dbg(&intf->dev,"no interfaces"); + dev_dbg(&intf->dev,"no interfaces\n"); return -ENODEV; } } if (data_interface_num != call_interface_num) - dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported."); + dev_dbg(&intf->dev,"Seperate call control interface. That is not fully supported.\n"); skip_normal_probe: @@ -867,7 +852,7 @@ skip_normal_probe: if (data_interface->cur_altsetting->desc.bInterfaceClass != CDC_DATA_INTERFACE_TYPE) { if (control_interface->cur_altsetting->desc.bInterfaceClass == CDC_DATA_INTERFACE_TYPE) { struct usb_interface *t; - dev_dbg(&intf->dev,"Your device has switched interfaces."); + dev_dbg(&intf->dev,"Your device has switched interfaces.\n"); t = control_interface; control_interface = data_interface; @@ -878,7 +863,7 @@ skip_normal_probe: } if (usb_interface_claimed(data_interface)) { /* valid in this context */ - dev_dbg(&intf->dev,"The data interface isn't available"); + dev_dbg(&intf->dev,"The data interface isn't available\n"); return -EBUSY; } @@ -895,7 +880,7 @@ skip_normal_probe: if ((epread->bEndpointAddress & USB_DIR_IN) != USB_DIR_IN) { /* descriptors are swapped */ struct usb_endpoint_descriptor *t; - dev_dbg(&intf->dev,"The data interface has switched endpoints"); + dev_dbg(&intf->dev,"The data interface has switched endpoints\n"); t = epread; epread = epwrite; @@ -910,12 +895,12 @@ skip_normal_probe: } if (!(acm = kzalloc(sizeof(struct acm), GFP_KERNEL))) { - dev_dbg(&intf->dev, "out of memory (acm kzalloc)"); + dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n"); goto alloc_fail; } ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize); - readsize = le16_to_cpu(epread->wMaxPacketSize)* ( quirks == SINGLE_RX_URB ? 1 : 2); + readsize = le16_to_cpu(epread->wMaxPacketSize)*2; acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize); acm->control = control_interface; acm->data = data_interface; @@ -924,7 +909,6 @@ skip_normal_probe: acm->ctrl_caps = ac_management_function; acm->ctrlsize = ctrlsize; acm->readsize = readsize; - acm->rx_buflimit = num_rx_buf; acm->urb_task.func = acm_rx_tasklet; acm->urb_task.data = (unsigned long) acm; INIT_WORK(&acm->work, acm_softint, acm); @@ -936,43 +920,44 @@ skip_normal_probe: buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); if (!buf) { - dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)"); + dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n"); goto alloc_fail2; } acm->ctrl_buffer = buf; if (acm_write_buffers_alloc(acm) < 0) { - dev_dbg(&intf->dev, "out of memory (write buffer alloc)"); + dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n"); goto alloc_fail4; } acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL); if (!acm->ctrlurb) { - dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)"); + dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n"); goto alloc_fail5; } - for (i = 0; i < num_rx_buf; i++) { + for (i = 0; i < ACM_NRU; i++) { struct acm_ru *rcv = &(acm->ru[i]); if (!(rcv->urb = usb_alloc_urb(0, GFP_KERNEL))) { - dev_dbg(&intf->dev, "out of memory (read urbs usb_alloc_urb)"); + dev_dbg(&intf->dev, "out of memory (read urbs usb_alloc_urb)\n"); goto alloc_fail7; } rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; rcv->instance = acm; } - for (i = 0; i < num_rx_buf; i++) { + for (i = 0; i < ACM_NRB; i++) { struct acm_rb *buf = &(acm->rb[i]); + // Using usb_buffer_alloc instead of kmalloc as Oliver suggested if (!(buf->base = usb_buffer_alloc(acm->dev, readsize, GFP_KERNEL, &buf->dma))) { - dev_dbg(&intf->dev, "out of memory (read bufs usb_buffer_alloc)"); + dev_dbg(&intf->dev, "out of memory (read bufs usb_buffer_alloc)\n"); goto alloc_fail7; } } acm->writeurb = usb_alloc_urb(0, GFP_KERNEL); if (!acm->writeurb) { - dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)"); + dev_dbg(&intf->dev, "out of memory (writeurb kmalloc)\n"); goto alloc_fail7; } @@ -1003,9 +988,9 @@ skip_normal_probe: return 0; alloc_fail7: - for (i = 0; i < num_rx_buf; i++) + for (i = 0; i < ACM_NRB; i++) usb_buffer_free(usb_dev, acm->readsize, acm->rb[i].base, acm->rb[i].dma); - for (i = 0; i < num_rx_buf; i++) + for (i = 0; i < ACM_NRU; i++) usb_free_urb(acm->ru[i].urb); usb_free_urb(acm->ctrlurb); alloc_fail5: @@ -1042,7 +1027,7 @@ static void acm_disconnect(struct usb_interface *intf) usb_kill_urb(acm->ctrlurb); usb_kill_urb(acm->writeurb); - for (i = 0; i < acm->rx_buflimit; i++) + for (i = 0; i < ACM_NRU; i++) usb_kill_urb(acm->ru[i].urb); INIT_LIST_HEAD(&acm->filled_read_bufs); @@ -1054,7 +1039,7 @@ static void acm_disconnect(struct usb_interface *intf) acm_write_buffers_free(acm); usb_buffer_free(usb_dev, acm->ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); - for (i = 0; i < acm->rx_buflimit; i++) + for (i = 0; i < ACM_NRB; i++) usb_buffer_free(usb_dev, acm->readsize, acm->rb[i].base, acm->rb[i].dma); usb_driver_release_interface(&acm_driver, intf == acm->control ? acm->data : intf); @@ -1083,12 +1068,6 @@ static struct usb_device_id acm_ids[] = { { USB_DEVICE(0x0482, 0x0203), /* KYOCERA AH-K3001V */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ }, - { USB_DEVICE(0x0ace, 0x1608), /* ZyDAS 56K USB MODEM */ - .driver_info = SINGLE_RX_URB, /* firmware bug */ - }, - { USB_DEVICE(0x0ace, 0x1611), /* ZyDAS 56K USB MODEM - new version */ - .driver_info = SINGLE_RX_URB, /* firmware bug */ - }, /* control interfaces with various AT-command sets */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, USB_CDC_ACM_PROTO_AT_V25TER) }, @@ -1148,11 +1127,12 @@ static int __init acm_init(void) acm_tty_driver->owner = THIS_MODULE, acm_tty_driver->driver_name = "acm", acm_tty_driver->name = "ttyACM", + acm_tty_driver->devfs_name = "usb/acm/", acm_tty_driver->major = ACM_TTY_MAJOR, acm_tty_driver->minor_start = 0, acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL, acm_tty_driver->subtype = SERIAL_TYPE_NORMAL, - acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS, acm_tty_driver->init_termios = tty_std_termios; acm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; tty_set_operations(acm_tty_driver, &acm_ops); diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 1bcaea32c..fd2aaccdc 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h @@ -56,11 +56,11 @@ * in line disciplines. They ask for empty space amount, receive our URB size, * and proceed to issue several 1-character writes, assuming they will fit. * The very first write takes a complete URB. Fortunately, this only happens - * when processing onlcr, so we only need 2 buffers. These values must be - * powers of 2. + * when processing onlcr, so we only need 2 buffers. */ -#define ACM_NW 2 -#define ACM_NR 16 +#define ACM_NWB 2 +#define ACM_NRU 16 +#define ACM_NRB 16 struct acm_wb { unsigned char *buf; @@ -91,10 +91,9 @@ struct acm { struct urb *ctrlurb, *writeurb; /* urbs */ u8 *ctrl_buffer; /* buffers of urbs */ dma_addr_t ctrl_dma; /* dma handles of buffers */ - struct acm_wb wb[ACM_NW]; - struct acm_ru ru[ACM_NR]; - struct acm_rb rb[ACM_NR]; - int rx_buflimit; + struct acm_wb wb[ACM_NWB]; + struct acm_ru ru[ACM_NRU]; + struct acm_rb rb[ACM_NRB]; int rx_endpoint; spinlock_t read_lock; struct list_head spare_read_urbs; @@ -123,4 +122,3 @@ struct acm { /* constants describing various quirks and errors */ #define NO_UNION_NORMAL 1 -#define SINGLE_RX_URB 2 diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index acc7cd8ec..48dee4b8d 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -701,7 +701,6 @@ static ssize_t usblp_write(struct file *file, const char __user *buffer, size_t usblp->wcomplete = 0; err = usb_submit_urb(usblp->writeurb, GFP_KERNEL); if (err) { - usblp->wcomplete = 1; if (err != -ENOMEM) count = -EIO; else diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index 6e3b5358a..a08787e25 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig @@ -31,6 +31,9 @@ config USB_DEVICEFS For the format of the various /proc/bus/usb/ files, please read . + Please note that this code is completely unrelated to devfs, the + "/dev file system support". + Most users want to say Y here. config USB_BANDWIDTH diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index ec510922a..28329ddf1 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -3,8 +3,7 @@ # usbcore-objs := usb.o hub.o hcd.o urb.o message.o driver.o \ - config.o file.o buffer.o sysfs.o endpoint.o \ - devio.o notify.o + config.o file.o buffer.o sysfs.o devio.o notify.o ifeq ($(CONFIG_PCI),y) usbcore-objs += hcd-pci.o diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index f4f4ef0f3..ad742cec9 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -5,6 +5,7 @@ * and should work with all USB controllers, regardles of bus type. */ +#include #include #include #include diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 4c9e63e66..a9d89c78c 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index d8b047623..545da37af 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -59,9 +58,6 @@ #define USB_DEVICE_MAX USB_MAXBUS * 128 static struct class *usb_device_class; -/* Mutual exclusion for removal, open, and release */ -DEFINE_MUTEX(usbfs_mutex); - struct async { struct list_head asynclist; struct dev_state *ps; @@ -72,7 +68,6 @@ struct async { void __user *userbuffer; void __user *userurb; struct urb *urb; - u32 secid; }; static int usbfs_snoop = 0; @@ -317,7 +312,7 @@ static void async_completed(struct urb *urb, struct pt_regs *regs) sinfo.si_code = SI_ASYNCIO; sinfo.si_addr = as->userurb; kill_proc_info_as_uid(as->signr, &sinfo, as->pid, as->uid, - as->euid, as->secid); + as->euid); } snoop(&urb->dev->dev, "urb complete\n"); snoop_urb(urb, as->userurb); @@ -544,19 +539,21 @@ static int usbdev_open(struct inode *inode, struct file *file) struct dev_state *ps; int ret; - /* Protect against simultaneous removal or release */ - mutex_lock(&usbfs_mutex); - + /* + * no locking necessary here, as chrdev_open has the kernel lock + * (still acquire the kernel lock for safety) + */ ret = -ENOMEM; if (!(ps = kmalloc(sizeof(struct dev_state), GFP_KERNEL))) - goto out; + goto out_nolock; + lock_kernel(); ret = -ENOENT; /* check if we are called from a real node or usbfs */ if (imajor(inode) == USB_DEVICE_MAJOR) dev = usbdev_lookup_minor(iminor(inode)); if (!dev) - dev = inode->i_private; + dev = inode->u.generic_ip; if (!dev) { kfree(ps); goto out; @@ -575,13 +572,13 @@ static int usbdev_open(struct inode *inode, struct file *file) ps->disc_euid = current->euid; ps->disccontext = NULL; ps->ifclaimed = 0; - security_task_getsecid(current, &ps->secid); wmb(); list_add_tail(&ps->list, &dev->filelist); file->private_data = ps; out: - mutex_unlock(&usbfs_mutex); - return ret; + unlock_kernel(); + out_nolock: + return ret; } static int usbdev_release(struct inode *inode, struct file *file) @@ -591,12 +588,7 @@ static int usbdev_release(struct inode *inode, struct file *file) unsigned int ifnum; usb_lock_device(dev); - - /* Protect against simultaneous open */ - mutex_lock(&usbfs_mutex); list_del_init(&ps->list); - mutex_unlock(&usbfs_mutex); - for (ifnum = 0; ps->ifclaimed && ifnum < 8*sizeof(ps->ifclaimed); ifnum++) { if (test_bit(ifnum, &ps->ifclaimed)) @@ -605,8 +597,9 @@ static int usbdev_release(struct inode *inode, struct file *file) destroy_all_async(ps); usb_unlock_device(dev); usb_put_dev(dev); + ps->dev = NULL; kfree(ps); - return 0; + return 0; } static int proc_control(struct dev_state *ps, void __user *arg) @@ -830,7 +823,8 @@ static int proc_connectinfo(struct dev_state *ps, void __user *arg) static int proc_resetdevice(struct dev_state *ps) { - return usb_reset_composite_device(ps->dev, NULL); + return usb_reset_device(ps->dev); + } static int proc_setintf(struct dev_state *ps, void __user *arg) @@ -929,8 +923,8 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_CONTROL) return -EINVAL; - /* min 8 byte setup packet, max 8 byte setup plus an arbitrary data stage */ - if (uurb->buffer_length < 8 || uurb->buffer_length > (8 + MAX_USBFS_BUFFER_SIZE)) + /* min 8 byte setup packet, max arbitrary */ + if (uurb->buffer_length < 8 || uurb->buffer_length > PAGE_SIZE) return -EINVAL; if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL))) return -ENOMEM; @@ -988,8 +982,7 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, return -EFAULT; } for (totlen = u = 0; u < uurb->number_of_packets; u++) { - /* arbitrary limit, sufficient for USB 2.0 high-bandwidth iso */ - if (isopkt[u].length > 8192) { + if (isopkt[u].length > 1023) { kfree(isopkt); return -EINVAL; } @@ -1060,7 +1053,6 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, as->pid = current->pid; as->uid = current->uid; as->euid = current->euid; - security_task_getsecid(current, &as->secid); if (!(uurb->endpoint & USB_DIR_IN)) { if (copy_from_user(as->urb->transfer_buffer, uurb->buffer, as->urb->transfer_buffer_length)) { free_async(as); diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index ec8906501..c196f3845 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include "hcd.h" diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c deleted file mode 100644 index 247b5a491..000000000 --- a/drivers/usb/core/endpoint.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * drivers/usb/core/endpoint.c - * - * (C) Copyright 2002,2004,2006 Greg Kroah-Hartman - * (C) Copyright 2002,2004 IBM Corp. - * (C) Copyright 2006 Novell Inc. - * - * Endpoint sysfs stuff - * - */ - -#include -#include -#include "usb.h" - -/* endpoint stuff */ - -struct ep_device { - struct usb_endpoint_descriptor *desc; - struct usb_device *udev; - struct device dev; -}; -#define to_ep_device(_dev) \ - container_of(_dev, struct ep_device, dev) - -struct ep_attribute { - struct attribute attr; - ssize_t (*show)(struct usb_device *, - struct usb_endpoint_descriptor *, char *); -}; -#define to_ep_attribute(_attr) \ - container_of(_attr, struct ep_attribute, attr) - -#define usb_ep_attr(field, format_string) \ -static ssize_t show_ep_##field(struct device *dev, \ - struct device_attribute *attr, \ - char *buf) \ -{ \ - struct ep_device *ep = to_ep_device(dev); \ - return sprintf(buf, format_string, ep->desc->field); \ -} \ -static DEVICE_ATTR(field, S_IRUGO, show_ep_##field, NULL); - -usb_ep_attr(bLength, "%02x\n") -usb_ep_attr(bEndpointAddress, "%02x\n") -usb_ep_attr(bmAttributes, "%02x\n") -usb_ep_attr(bInterval, "%02x\n") - -static ssize_t show_ep_wMaxPacketSize(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct ep_device *ep = to_ep_device(dev); - return sprintf(buf, "%04x\n", - le16_to_cpu(ep->desc->wMaxPacketSize) & 0x07ff); -} -static DEVICE_ATTR(wMaxPacketSize, S_IRUGO, show_ep_wMaxPacketSize, NULL); - -static ssize_t show_ep_type(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct ep_device *ep = to_ep_device(dev); - char *type = "unknown"; - - switch (ep->desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { - case USB_ENDPOINT_XFER_CONTROL: - type = "Control"; - break; - case USB_ENDPOINT_XFER_ISOC: - type = "Isoc"; - break; - case USB_ENDPOINT_XFER_BULK: - type = "Bulk"; - break; - case USB_ENDPOINT_XFER_INT: - type = "Interrupt"; - break; - } - return sprintf(buf, "%s\n", type); -} -static DEVICE_ATTR(type, S_IRUGO, show_ep_type, NULL); - -static ssize_t show_ep_interval(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct ep_device *ep = to_ep_device(dev); - char unit; - unsigned interval = 0; - unsigned in; - - in = (ep->desc->bEndpointAddress & USB_DIR_IN); - - switch (ep->desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { - case USB_ENDPOINT_XFER_CONTROL: - if (ep->udev->speed == USB_SPEED_HIGH) /* uframes per NAK */ - interval = ep->desc->bInterval; - break; - case USB_ENDPOINT_XFER_ISOC: - interval = 1 << (ep->desc->bInterval - 1); - break; - case USB_ENDPOINT_XFER_BULK: - if (ep->udev->speed == USB_SPEED_HIGH && !in) /* uframes per NAK */ - interval = ep->desc->bInterval; - break; - case USB_ENDPOINT_XFER_INT: - if (ep->udev->speed == USB_SPEED_HIGH) - interval = 1 << (ep->desc->bInterval - 1); - else - interval = ep->desc->bInterval; - break; - } - interval *= (ep->udev->speed == USB_SPEED_HIGH) ? 125 : 1000; - if (interval % 1000) - unit = 'u'; - else { - unit = 'm'; - interval /= 1000; - } - - return sprintf(buf, "%d%cs\n", interval, unit); -} -static DEVICE_ATTR(interval, S_IRUGO, show_ep_interval, NULL); - -static ssize_t show_ep_direction(struct device *dev, - struct device_attribute *attr, char *buf) -{ - struct ep_device *ep = to_ep_device(dev); - char *direction; - - if ((ep->desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_CONTROL) - direction = "both"; - else if (ep->desc->bEndpointAddress & USB_DIR_IN) - direction = "in"; - else - direction = "out"; - return sprintf(buf, "%s\n", direction); -} -static DEVICE_ATTR(direction, S_IRUGO, show_ep_direction, NULL); - -static struct attribute *ep_dev_attrs[] = { - &dev_attr_bLength.attr, - &dev_attr_bEndpointAddress.attr, - &dev_attr_bmAttributes.attr, - &dev_attr_bInterval.attr, - &dev_attr_wMaxPacketSize.attr, - &dev_attr_interval.attr, - &dev_attr_type.attr, - &dev_attr_direction.attr, - NULL, -}; -static struct attribute_group ep_dev_attr_grp = { - .attrs = ep_dev_attrs, -}; - -static struct endpoint_class { - struct kref kref; - struct class *class; -} *ep_class; - -static int init_endpoint_class(void) -{ - int result = 0; - - if (ep_class != NULL) { - kref_get(&ep_class->kref); - goto exit; - } - - ep_class = kmalloc(sizeof(*ep_class), GFP_KERNEL); - if (!ep_class) { - result = -ENOMEM; - goto exit; - } - - kref_init(&ep_class->kref); - ep_class->class = class_create(THIS_MODULE, "usb_endpoint"); - if (IS_ERR(ep_class->class)) { - result = IS_ERR(ep_class->class); - kfree(ep_class); - ep_class = NULL; - goto exit; - } - -exit: - return result; -} - -static void release_endpoint_class(struct kref *kref) -{ - /* Ok, we cheat as we know we only have one ep_class */ - class_destroy(ep_class->class); - kfree(ep_class); - ep_class = NULL; -} - -static void destroy_endpoint_class(void) -{ - if (ep_class) - kref_put(&ep_class->kref, release_endpoint_class); -} - -static void ep_device_release(struct device *dev) -{ - struct ep_device *ep_dev = to_ep_device(dev); - - dev_dbg(dev, "%s called for %s\n", __FUNCTION__, dev->bus_id); - kfree(ep_dev); -} - -void usb_create_ep_files(struct device *parent, - struct usb_host_endpoint *endpoint, - struct usb_device *udev) -{ - char name[8]; - struct ep_device *ep_dev; - int minor; - int retval; - - retval = init_endpoint_class(); - if (retval) - goto exit; - - ep_dev = kzalloc(sizeof(*ep_dev), GFP_KERNEL); - if (!ep_dev) { - retval = -ENOMEM; - goto exit; - } - - /* fun calculation to determine the minor of this endpoint */ - minor = (((udev->bus->busnum - 1) * 128) * 16) + (udev->devnum - 1); - - ep_dev->desc = &endpoint->desc; - ep_dev->udev = udev; - ep_dev->dev.devt = MKDEV(442, minor); // FIXME fake number... - ep_dev->dev.class = ep_class->class; - ep_dev->dev.parent = parent; - ep_dev->dev.release = ep_device_release; - snprintf(ep_dev->dev.bus_id, BUS_ID_SIZE, "usbdev%d.%d_ep%02x", - udev->bus->busnum, udev->devnum, - endpoint->desc.bEndpointAddress); - - retval = device_register(&ep_dev->dev); - if (retval) - goto error; - sysfs_create_group(&ep_dev->dev.kobj, &ep_dev_attr_grp); - - endpoint->ep_dev = ep_dev; - - /* create the symlink to the old-style "ep_XX" directory */ - sprintf(name, "ep_%02x", endpoint->desc.bEndpointAddress); - sysfs_create_link(&parent->kobj, &endpoint->ep_dev->dev.kobj, name); - -exit: - return; -error: - kfree(ep_dev); - return; -} - -void usb_remove_ep_files(struct usb_host_endpoint *endpoint) -{ - - if (endpoint->ep_dev) { - char name[8]; - - sprintf(name, "ep_%02x", endpoint->desc.bEndpointAddress); - sysfs_remove_link(&endpoint->ep_dev->dev.parent->kobj, name); - sysfs_remove_group(&endpoint->ep_dev->dev.kobj, &ep_dev_attr_grp); - device_unregister(&endpoint->ep_dev->dev); - endpoint->ep_dev = NULL; - } - destroy_endpoint_class(); -} - - diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 8de4f8c99..b263a54a1 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c @@ -15,6 +15,7 @@ * */ +#include #include #include #include @@ -60,66 +61,33 @@ static struct file_operations usb_fops = { .open = usb_open, }; -static struct usb_class { - struct kref kref; - struct class *class; -} *usb_class; - -static int init_usb_class(void) -{ - int result = 0; - - if (usb_class != NULL) { - kref_get(&usb_class->kref); - goto exit; - } - - usb_class = kmalloc(sizeof(*usb_class), GFP_KERNEL); - if (!usb_class) { - result = -ENOMEM; - goto exit; - } - - kref_init(&usb_class->kref); - usb_class->class = class_create(THIS_MODULE, "usb"); - if (IS_ERR(usb_class->class)) { - result = IS_ERR(usb_class->class); - err("class_create failed for usb devices"); - kfree(usb_class); - usb_class = NULL; - } - -exit: - return result; -} - -static void release_usb_class(struct kref *kref) -{ - /* Ok, we cheat as we know we only have one usb_class */ - class_destroy(usb_class->class); - kfree(usb_class); - usb_class = NULL; -} - -static void destroy_usb_class(void) -{ - if (usb_class) - kref_put(&usb_class->kref, release_usb_class); -} +static struct class *usb_class; int usb_major_init(void) { int error; error = register_chrdev(USB_MAJOR, "usb", &usb_fops); - if (error) + if (error) { err("unable to get major %d for usb devices", USB_MAJOR); + goto out; + } + usb_class = class_create(THIS_MODULE, "usb"); + if (IS_ERR(usb_class)) { + error = PTR_ERR(usb_class); + err("class_create failed for usb devices"); + unregister_chrdev(USB_MAJOR, "usb"); + goto out; + } + +out: return error; } void usb_major_cleanup(void) { + class_destroy(usb_class); unregister_chrdev(USB_MAJOR, "usb"); } @@ -178,10 +146,6 @@ int usb_register_dev(struct usb_interface *intf, } spin_unlock (&minor_lock); - if (retval) - goto exit; - - retval = init_usb_class(); if (retval) goto exit; @@ -194,7 +158,7 @@ int usb_register_dev(struct usb_interface *intf, ++temp; else temp = name; - intf->class_dev = class_device_create(usb_class->class, NULL, + intf->class_dev = class_device_create(usb_class, NULL, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); if (IS_ERR(intf->class_dev)) { @@ -242,10 +206,9 @@ void usb_deregister_dev(struct usb_interface *intf, spin_unlock (&minor_lock); snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); - class_device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor)); + class_device_destroy(usb_class, MKDEV(USB_MAJOR, intf->minor)); intf->class_dev = NULL; intf->minor = -1; - destroy_usb_class(); } EXPORT_SYMBOL(usb_deregister_dev); diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 5078fb337..66b78404a 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -16,6 +16,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -125,7 +126,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) pci_set_master (dev); - retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED); + retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ); if (retval != 0) goto err4; return retval; diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index fb4d058bb..e2e00ba4e 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -22,6 +22,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -1825,16 +1826,24 @@ int usb_add_hcd(struct usb_hcd *hcd, /* enable irqs just before we start the controller */ if (hcd->driver->irq) { + char buf[8], *bufp = buf; + +#ifdef __sparc__ + bufp = __irq_itoa(irqnum); +#else + sprintf(buf, "%d", irqnum); +#endif + snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", hcd->driver->description, hcd->self.busnum); if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags, hcd->irq_descr, hcd)) != 0) { dev_err(hcd->self.controller, - "request interrupt %d failed\n", irqnum); + "request interrupt %s failed\n", bufp); goto err_request_irq; } hcd->irq = irqnum; - dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum, + dev_info(hcd->self.controller, "irq %s, %s 0x%08llx\n", bufp, (hcd->driver->flags & HCD_MEMORY) ? "io mem" : "io base", (unsigned long long)hcd->rsrc_start); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 26c8cb5f3..90b8d43c6 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include @@ -431,22 +432,15 @@ static void hub_power_on(struct usb_hub *hub) { int port1; unsigned pgood_delay = hub->descriptor->bPwrOn2PwrGood * 2; - u16 wHubCharacteristics = - le16_to_cpu(hub->descriptor->wHubCharacteristics); - - /* Enable power on each port. Some hubs have reserved values - * of LPSM (> 2) in their descriptors, even though they are - * USB 2.0 hubs. Some hubs do not implement port-power switching - * but only emulate it. In all cases, the ports won't work - * unless we send these messages to the hub. - */ - if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2) + u16 wHubCharacteristics = le16_to_cpu(hub->descriptor->wHubCharacteristics); + + /* if hub supports power switching, enable power on each port */ + if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2) { dev_dbg(hub->intfdev, "enabling power on all ports\n"); - else - dev_dbg(hub->intfdev, "trying to enable port power on " - "non-switchable hub\n"); - for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++) - set_port_feature(hub->hdev, port1, USB_PORT_FEAT_POWER); + for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++) + set_port_feature(hub->hdev, port1, + USB_PORT_FEAT_POWER); + } /* Wait at least 100 msec for power to become stable */ msleep(max(pgood_delay, (unsigned) 100)); @@ -524,16 +518,15 @@ static int hub_port_disable(struct usb_hub *hub, int port1, int set_state) /* caller has locked the hub device */ -static void hub_pre_reset(struct usb_interface *intf) +static void hub_pre_reset(struct usb_hub *hub, int disable_ports) { - struct usb_hub *hub = usb_get_intfdata(intf); struct usb_device *hdev = hub->hdev; int port1; for (port1 = 1; port1 <= hdev->maxchild; ++port1) { if (hdev->children[port1 - 1]) { usb_disconnect(&hdev->children[port1 - 1]); - if (hub->error == 0) + if (disable_ports) hub_port_disable(hub, port1, 0); } } @@ -541,10 +534,8 @@ static void hub_pre_reset(struct usb_interface *intf) } /* caller has locked the hub device */ -static void hub_post_reset(struct usb_interface *intf) +static void hub_post_reset(struct usb_hub *hub) { - struct usb_hub *hub = usb_get_intfdata(intf); - hub_activate(hub); hub_power_on(hub); } @@ -804,16 +795,15 @@ static void hub_disconnect(struct usb_interface *intf) struct usb_hub *hub = usb_get_intfdata (intf); struct usb_device *hdev; - /* Disconnect all children and quiesce the hub */ - hub->error = 0; - hub_pre_reset(intf); - usb_set_intfdata (intf, NULL); hdev = hub->hdev; if (hdev->speed == USB_SPEED_HIGH) highspeed_hubs--; + /* Disconnect all children and quiesce the hub */ + hub_pre_reset(hub, 1); + usb_free_urb(hub->urb); hub->urb = NULL; @@ -1179,7 +1169,6 @@ static int choose_configuration(struct usb_device *udev) { int i; int num_configs; - int insufficient_power = 0; struct usb_host_config *c, *best; best = NULL; @@ -1232,10 +1221,8 @@ static int choose_configuration(struct usb_device *udev) */ /* Rule out configs that draw too much bus current */ - if (c->desc.bMaxPower * 2 > udev->bus_mA) { - insufficient_power++; + if (c->desc.bMaxPower * 2 > udev->bus_mA) continue; - } /* If the first config's first interface is COMM/2/0xff * (MSFT RNDIS), rule it out unless Linux has host-side @@ -1244,7 +1231,7 @@ static int choose_configuration(struct usb_device *udev) && desc->bInterfaceClass == USB_CLASS_COMM && desc->bInterfaceSubClass == 2 && desc->bInterfaceProtocol == 0xff) { -#ifndef CONFIG_USB_NET_RNDIS_HOST +#ifndef CONFIG_USB_NET_RNDIS continue; #else best = c; @@ -1269,11 +1256,6 @@ static int choose_configuration(struct usb_device *udev) best = c; } - if (insufficient_power > 0) - dev_info(&udev->dev, "rejected %d configuration%s " - "due to insufficient available bus power\n", - insufficient_power, plural(insufficient_power)); - if (best) { i = best->desc.bConfigurationValue; dev_info(&udev->dev, @@ -1790,10 +1772,7 @@ static int finish_device_resume(struct usb_device *udev) * and device drivers will know about any resume quirks. */ status = usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus); - if (status >= 0) - status = (status == 2 ? 0 : -ENODEV); - - if (status) + if (status < 2) dev_dbg(&udev->dev, "gone after usb resume? status %d\n", status); @@ -1882,12 +1861,7 @@ hub_port_resume(struct usb_hub *hub, int port1, struct usb_device *udev) dev_dbg(hub->intfdev, "port %d status %04x.%04x after resume, %d\n", port1, portchange, devstatus, status); - if (status >= 0) - status = -ENODEV; } else { - if (portchange & USB_PORT_STAT_C_SUSPEND) - clear_port_feature(hub->hdev, port1, - USB_PORT_FEAT_C_SUSPEND); /* TRSMRCY = 10 msec */ msleep(10); if (udev) @@ -2758,8 +2732,7 @@ static void hub_events(void) /* If the hub has died, clean up after it */ if (hdev->state == USB_STATE_NOTATTACHED) { - hub->error = -ENODEV; - hub_pre_reset(intf); + hub_pre_reset(hub, 0); goto loop; } @@ -2771,7 +2744,7 @@ static void hub_events(void) dev_dbg (hub_dev, "resetting for error %d\n", hub->error); - ret = usb_reset_composite_device(hdev, intf); + ret = usb_reset_device(hdev); if (ret) { dev_dbg (hub_dev, "error resetting hub: %d\n", ret); @@ -2940,8 +2913,6 @@ static struct usb_driver hub_driver = { .disconnect = hub_disconnect, .suspend = hub_suspend, .resume = hub_resume, - .pre_reset = hub_pre_reset, - .post_reset = hub_post_reset, .ioctl = hub_ioctl, .id_table = hub_id_table, }; @@ -3021,9 +2992,9 @@ static int config_descriptors_changed(struct usb_device *udev) * usb_reset_device - perform a USB port reset to reinitialize a device * @udev: device to reset (not in SUSPENDED or NOTATTACHED state) * - * WARNING - don't use this routine to reset a composite device - * (one with multiple interfaces owned by separate drivers)! - * Use usb_reset_composite_device() instead. + * WARNING - don't reset any device unless drivers for all of its + * interfaces are expecting that reset! Maybe some driver->reset() + * method should eventually help ensure sufficient cooperation. * * Do a port reset, reassign the device's address, and establish its * former operating configuration. If the reset fails, or the device's @@ -3047,6 +3018,7 @@ int usb_reset_device(struct usb_device *udev) struct usb_device *parent_hdev = udev->parent; struct usb_hub *parent_hub; struct usb_device_descriptor descriptor = udev->descriptor; + struct usb_hub *hub = NULL; int i, ret = 0; int port1 = udev->portnum; @@ -3064,6 +3036,14 @@ int usb_reset_device(struct usb_device *udev) } parent_hub = hdev_to_hub(parent_hdev); + /* If we're resetting an active hub, take some special actions */ + if (udev->actconfig && udev->actconfig->desc.bNumInterfaces > 0 && + udev->actconfig->interface[0]->dev.driver == + &hub_driver.driver && + (hub = hdev_to_hub(udev)) != NULL) { + hub_pre_reset(hub, 0); + } + set_bit(port1, parent_hub->busy_bits); for (i = 0; i < SET_CONFIG_TRIES; ++i) { @@ -3122,87 +3102,11 @@ int usb_reset_device(struct usb_device *udev) } done: + if (hub) + hub_post_reset(hub); return 0; re_enumerate: hub_port_logical_disconnect(parent_hub, port1); return -ENODEV; } - -/** - * usb_reset_composite_device - warn interface drivers and perform a USB port reset - * @udev: device to reset (not in SUSPENDED or NOTATTACHED state) - * @iface: interface bound to the driver making the request (optional) - * - * Warns all drivers bound to registered interfaces (using their pre_reset - * method), performs the port reset, and then lets the drivers know that - * the reset is over (using their post_reset method). - * - * Return value is the same as for usb_reset_device(). - * - * The caller must own the device lock. For example, it's safe to use - * this from a driver probe() routine after downloading new firmware. - * For calls that might not occur during probe(), drivers should lock - * the device using usb_lock_device_for_reset(). - * - * The interface locks are acquired during the pre_reset stage and released - * during the post_reset stage. However if iface is not NULL and is - * currently being probed, we assume that the caller already owns its - * lock. - */ -int usb_reset_composite_device(struct usb_device *udev, - struct usb_interface *iface) -{ - int ret; - struct usb_host_config *config = udev->actconfig; - - if (udev->state == USB_STATE_NOTATTACHED || - udev->state == USB_STATE_SUSPENDED) { - dev_dbg(&udev->dev, "device reset not allowed in state %d\n", - udev->state); - return -EINVAL; - } - - if (iface && iface->condition != USB_INTERFACE_BINDING) - iface = NULL; - - if (config) { - int i; - struct usb_interface *cintf; - struct usb_driver *drv; - - for (i = 0; i < config->desc.bNumInterfaces; ++i) { - cintf = config->interface[i]; - if (cintf != iface) - down(&cintf->dev.sem); - if (device_is_registered(&cintf->dev) && - cintf->dev.driver) { - drv = to_usb_driver(cintf->dev.driver); - if (drv->pre_reset) - (drv->pre_reset)(cintf); - } - } - } - - ret = usb_reset_device(udev); - - if (config) { - int i; - struct usb_interface *cintf; - struct usb_driver *drv; - - for (i = config->desc.bNumInterfaces - 1; i >= 0; --i) { - cintf = config->interface[i]; - if (device_is_registered(&cintf->dev) && - cintf->dev.driver) { - drv = to_usb_driver(cintf->dev.driver); - if (drv->post_reset) - (drv->post_reset)(cintf); - } - if (cintf != iface) - up(&cintf->dev.sem); - } - } - - return ret; -} diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index 58b4b1012..3cf945cc5 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c @@ -27,6 +27,7 @@ /*****************************************************************************/ +#include #include #include #include @@ -200,7 +201,7 @@ static void update_sb(struct super_block *sb) if (!root) return; - mutex_lock_nested(&root->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&root->d_inode->i_mutex); list_for_each_entry(bus, &root->d_subdirs, d_u.d_child) { if (bus->d_inode) { @@ -249,6 +250,7 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; switch (mode & S_IFMT) { @@ -401,8 +403,8 @@ static loff_t default_file_lseek (struct file *file, loff_t offset, int orig) static int default_open (struct inode *inode, struct file *file) { - if (inode->i_private) - file->private_data = inode->i_private; + if (inode->u.generic_ip) + file->private_data = inode->u.generic_ip; return 0; } @@ -508,7 +510,7 @@ static struct dentry *fs_create_file (const char *name, mode_t mode, } else { if (dentry->d_inode) { if (data) - dentry->d_inode->i_private = data; + dentry->d_inode->u.generic_ip = data; if (fops) dentry->d_inode->i_fop = fops; dentry->d_inode->i_uid = uid; @@ -526,7 +528,7 @@ static void fs_remove_file (struct dentry *dentry) if (!parent || !parent->d_inode) return; - mutex_lock_nested(&parent->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&parent->d_inode->i_mutex); if (usbfs_positive(dentry)) { if (dentry->d_inode) { if (S_ISDIR(dentry->d_inode->i_mode)) @@ -541,10 +543,10 @@ static void fs_remove_file (struct dentry *dentry) /* --------------------------------------------------------------------- */ -static int usb_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *usb_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, usbfs_fill_super, mnt); + return get_sb_single(fs_type, flags, data, usbfs_fill_super); } static struct file_system_type usb_fs_type = { @@ -567,7 +569,7 @@ static int create_special_files (void) ignore_mount = 1; /* create the devices special file */ - retval = simple_pin_fs(&usb_fs_type, &usbfs_mount, &usbfs_mount_count); + retval = simple_pin_fs("usbfs", &usbfs_mount, &usbfs_mount_count); if (retval) { err ("Unable to get usbfs mount"); goto exit; @@ -694,11 +696,11 @@ static void usbfs_remove_device(struct usb_device *dev) wake_up_all(&ds->wait); list_del_init(&ds->list); if (ds->discsignr) { - sinfo.si_signo = ds->discsignr; + sinfo.si_signo = SIGPIPE; sinfo.si_errno = EPIPE; sinfo.si_code = SI_ASYNCIO; sinfo.si_addr = ds->disccontext; - kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid, ds->secid); + kill_proc_info_as_uid(ds->discsignr, &sinfo, ds->disc_pid, ds->disc_uid, ds->disc_euid); } } } diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 4cc8d3e67..08fb20f06 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -2,6 +2,7 @@ * message.c - synchronous message handling */ +#include #include /* for scatterlist macros */ #include #include @@ -156,37 +157,6 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u } -/** - * usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for completion - * @usb_dev: pointer to the usb device to send the message to - * @pipe: endpoint "pipe" to send the message to - * @data: pointer to the data to send - * @len: length in bytes of the data to send - * @actual_length: pointer to a location to put the actual length transferred in bytes - * @timeout: time in msecs to wait for the message to complete before - * timing out (if 0 the wait is forever) - * Context: !in_interrupt () - * - * This function sends a simple interrupt message to a specified endpoint and - * waits for the message to complete, or timeout. - * - * If successful, it returns 0, otherwise a negative error number. The number - * of actual bytes transferred will be stored in the actual_length paramater. - * - * Don't use this function from within an interrupt context, like a bottom half - * handler. If you need an asynchronous message, or need to send a message - * from within interrupt context, use usb_submit_urb() If a thread in your - * driver uses this call, make sure your disconnect() method can wait for it to - * complete. Since you don't have a handle on the URB used, you can't cancel - * the request. - */ -int usb_interrupt_msg(struct usb_device *usb_dev, unsigned int pipe, - void *data, int len, int *actual_length, int timeout) -{ - return usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout); -} -EXPORT_SYMBOL_GPL(usb_interrupt_msg); - /** * usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion * @usb_dev: pointer to the usb device to send the message to @@ -1410,12 +1380,6 @@ free_interfaces: return ret; } } - - i = dev->bus_mA - cp->desc.bMaxPower * 2; - if (i < 0) - dev_warn(&dev->dev, "new config #%d exceeds power " - "limit by %dmA\n", - configuration, -i); } /* if it's already configured, clear out old state first. @@ -1424,85 +1388,92 @@ free_interfaces: if (dev->state != USB_STATE_ADDRESS) usb_disable_device (dev, 1); // Skip ep0 + if (cp) { + i = dev->bus_mA - cp->desc.bMaxPower * 2; + if (i < 0) + dev_warn(&dev->dev, "new config #%d exceeds power " + "limit by %dmA\n", + configuration, -i); + } + if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, 0, configuration, 0, - NULL, 0, USB_CTRL_SET_TIMEOUT)) < 0) { - - /* All the old state is gone, so what else can we do? - * The device is probably useless now anyway. - */ - cp = NULL; - } + NULL, 0, USB_CTRL_SET_TIMEOUT)) < 0) + goto free_interfaces; dev->actconfig = cp; - if (!cp) { + if (!cp) usb_set_device_state(dev, USB_STATE_ADDRESS); - goto free_interfaces; - } - usb_set_device_state(dev, USB_STATE_CONFIGURED); - - /* Initialize the new interface structures and the - * hc/hcd/usbcore interface/endpoint state. - */ - for (i = 0; i < nintf; ++i) { - struct usb_interface_cache *intfc; - struct usb_interface *intf; - struct usb_host_interface *alt; - - cp->interface[i] = intf = new_interfaces[i]; - intfc = cp->intf_cache[i]; - intf->altsetting = intfc->altsetting; - intf->num_altsetting = intfc->num_altsetting; - kref_get(&intfc->ref); + else { + usb_set_device_state(dev, USB_STATE_CONFIGURED); - alt = usb_altnum_to_altsetting(intf, 0); - - /* No altsetting 0? We'll assume the first altsetting. - * We could use a GetInterface call, but if a device is - * so non-compliant that it doesn't have altsetting 0 - * then I wouldn't trust its reply anyway. + /* Initialize the new interface structures and the + * hc/hcd/usbcore interface/endpoint state. */ - if (!alt) - alt = &intf->altsetting[0]; - - intf->cur_altsetting = alt; - usb_enable_interface(dev, intf); - intf->dev.parent = &dev->dev; - intf->dev.driver = NULL; - intf->dev.bus = &usb_bus_type; - intf->dev.dma_mask = dev->dev.dma_mask; - intf->dev.release = release_interface; - device_initialize (&intf->dev); - mark_quiesced(intf); - sprintf (&intf->dev.bus_id[0], "%d-%s:%d.%d", - dev->bus->busnum, dev->devpath, - configuration, alt->desc.bInterfaceNumber); - } - kfree(new_interfaces); + for (i = 0; i < nintf; ++i) { + struct usb_interface_cache *intfc; + struct usb_interface *intf; + struct usb_host_interface *alt; + + cp->interface[i] = intf = new_interfaces[i]; + intfc = cp->intf_cache[i]; + intf->altsetting = intfc->altsetting; + intf->num_altsetting = intfc->num_altsetting; + kref_get(&intfc->ref); + + alt = usb_altnum_to_altsetting(intf, 0); + + /* No altsetting 0? We'll assume the first altsetting. + * We could use a GetInterface call, but if a device is + * so non-compliant that it doesn't have altsetting 0 + * then I wouldn't trust its reply anyway. + */ + if (!alt) + alt = &intf->altsetting[0]; + + intf->cur_altsetting = alt; + usb_enable_interface(dev, intf); + intf->dev.parent = &dev->dev; + intf->dev.driver = NULL; + intf->dev.bus = &usb_bus_type; + intf->dev.dma_mask = dev->dev.dma_mask; + intf->dev.release = release_interface; + device_initialize (&intf->dev); + mark_quiesced(intf); + sprintf (&intf->dev.bus_id[0], "%d-%s:%d.%d", + dev->bus->busnum, dev->devpath, + configuration, + alt->desc.bInterfaceNumber); + } + kfree(new_interfaces); - if (cp->string == NULL) - cp->string = usb_cache_string(dev, cp->desc.iConfiguration); + if (cp->string == NULL) + cp->string = usb_cache_string(dev, + cp->desc.iConfiguration); - /* Now that all the interfaces are set up, register them - * to trigger binding of drivers to interfaces. probe() - * routines may install different altsettings and may - * claim() any interfaces not yet bound. Many class drivers - * need that: CDC, audio, video, etc. - */ - for (i = 0; i < nintf; ++i) { - struct usb_interface *intf = cp->interface[i]; - - dev_dbg (&dev->dev, - "adding %s (config #%d, interface %d)\n", - intf->dev.bus_id, configuration, - intf->cur_altsetting->desc.bInterfaceNumber); - ret = device_add (&intf->dev); - if (ret != 0) { - dev_err(&dev->dev, "device_add(%s) --> %d\n", - intf->dev.bus_id, ret); - continue; + /* Now that all the interfaces are set up, register them + * to trigger binding of drivers to interfaces. probe() + * routines may install different altsettings and may + * claim() any interfaces not yet bound. Many class drivers + * need that: CDC, audio, video, etc. + */ + for (i = 0; i < nintf; ++i) { + struct usb_interface *intf = cp->interface[i]; + + dev_dbg (&dev->dev, + "adding %s (config #%d, interface %d)\n", + intf->dev.bus_id, configuration, + intf->cur_altsetting->desc.bInterfaceNumber); + ret = device_add (&intf->dev); + if (ret != 0) { + dev_err(&dev->dev, + "device_add(%s) --> %d\n", + intf->dev.bus_id, + ret); + continue; + } + usb_create_sysfs_intf_files (intf); } - usb_create_sysfs_intf_files (intf); } return 0; diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index 6b36897ca..fe0ed54fa 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c @@ -9,6 +9,7 @@ */ +#include #include #include #include @@ -50,11 +51,8 @@ void usb_notify_add_device(struct usb_device *udev) void usb_notify_remove_device(struct usb_device *udev) { - /* Protect against simultaneous usbfs open */ - mutex_lock(&usbfs_mutex); blocking_notifier_call_chain(&usb_notifier_list, USB_DEVICE_REMOVE, udev); - mutex_unlock(&usbfs_mutex); } void usb_notify_add_bus(struct usb_bus *ubus) diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index dec973aff..71d881327 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -10,10 +10,208 @@ */ +#include #include #include #include "usb.h" +/* endpoint stuff */ +struct ep_object { + struct usb_endpoint_descriptor *desc; + struct usb_device *udev; + struct kobject kobj; +}; +#define to_ep_object(_kobj) \ + container_of(_kobj, struct ep_object, kobj) + +struct ep_attribute { + struct attribute attr; + ssize_t (*show)(struct usb_device *, + struct usb_endpoint_descriptor *, char *); +}; +#define to_ep_attribute(_attr) \ + container_of(_attr, struct ep_attribute, attr) + +#define EP_ATTR(_name) \ +struct ep_attribute ep_##_name = { \ + .attr = {.name = #_name, .owner = THIS_MODULE, \ + .mode = S_IRUGO}, \ + .show = show_ep_##_name} + +#define usb_ep_attr(field, format_string) \ +static ssize_t show_ep_##field(struct usb_device *udev, \ + struct usb_endpoint_descriptor *desc, \ + char *buf) \ +{ \ + return sprintf(buf, format_string, desc->field); \ +} \ +static EP_ATTR(field); + +usb_ep_attr(bLength, "%02x\n") +usb_ep_attr(bEndpointAddress, "%02x\n") +usb_ep_attr(bmAttributes, "%02x\n") +usb_ep_attr(bInterval, "%02x\n") + +static ssize_t show_ep_wMaxPacketSize(struct usb_device *udev, + struct usb_endpoint_descriptor *desc, char *buf) +{ + return sprintf(buf, "%04x\n", + le16_to_cpu(desc->wMaxPacketSize) & 0x07ff); +} +static EP_ATTR(wMaxPacketSize); + +static ssize_t show_ep_type(struct usb_device *udev, + struct usb_endpoint_descriptor *desc, char *buf) +{ + char *type = "unknown"; + + switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { + case USB_ENDPOINT_XFER_CONTROL: + type = "Control"; + break; + case USB_ENDPOINT_XFER_ISOC: + type = "Isoc"; + break; + case USB_ENDPOINT_XFER_BULK: + type = "Bulk"; + break; + case USB_ENDPOINT_XFER_INT: + type = "Interrupt"; + break; + } + return sprintf(buf, "%s\n", type); +} +static EP_ATTR(type); + +static ssize_t show_ep_interval(struct usb_device *udev, + struct usb_endpoint_descriptor *desc, char *buf) +{ + char unit; + unsigned interval = 0; + unsigned in; + + in = (desc->bEndpointAddress & USB_DIR_IN); + + switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { + case USB_ENDPOINT_XFER_CONTROL: + if (udev->speed == USB_SPEED_HIGH) /* uframes per NAK */ + interval = desc->bInterval; + break; + case USB_ENDPOINT_XFER_ISOC: + interval = 1 << (desc->bInterval - 1); + break; + case USB_ENDPOINT_XFER_BULK: + if (udev->speed == USB_SPEED_HIGH && !in) /* uframes per NAK */ + interval = desc->bInterval; + break; + case USB_ENDPOINT_XFER_INT: + if (udev->speed == USB_SPEED_HIGH) + interval = 1 << (desc->bInterval - 1); + else + interval = desc->bInterval; + break; + } + interval *= (udev->speed == USB_SPEED_HIGH) ? 125 : 1000; + if (interval % 1000) + unit = 'u'; + else { + unit = 'm'; + interval /= 1000; + } + + return sprintf(buf, "%d%cs\n", interval, unit); +} +static EP_ATTR(interval); + +static ssize_t show_ep_direction(struct usb_device *udev, + struct usb_endpoint_descriptor *desc, char *buf) +{ + char *direction; + + if ((desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == + USB_ENDPOINT_XFER_CONTROL) + direction = "both"; + else if (desc->bEndpointAddress & USB_DIR_IN) + direction = "in"; + else + direction = "out"; + return sprintf(buf, "%s\n", direction); +} +static EP_ATTR(direction); + +static struct attribute *ep_attrs[] = { + &ep_bLength.attr, + &ep_bEndpointAddress.attr, + &ep_bmAttributes.attr, + &ep_bInterval.attr, + &ep_wMaxPacketSize.attr, + &ep_type.attr, + &ep_interval.attr, + &ep_direction.attr, + NULL, +}; + +static void ep_object_release(struct kobject *kobj) +{ + kfree(to_ep_object(kobj)); +} + +static ssize_t ep_object_show(struct kobject *kobj, struct attribute *attr, + char *buf) +{ + struct ep_object *ep_obj = to_ep_object(kobj); + struct ep_attribute *ep_attr = to_ep_attribute(attr); + + return (ep_attr->show)(ep_obj->udev, ep_obj->desc, buf); +} + +static struct sysfs_ops ep_object_sysfs_ops = { + .show = ep_object_show, +}; + +static struct kobj_type ep_object_ktype = { + .release = ep_object_release, + .sysfs_ops = &ep_object_sysfs_ops, + .default_attrs = ep_attrs, +}; + +static void usb_create_ep_files(struct kobject *parent, + struct usb_host_endpoint *endpoint, + struct usb_device *udev) +{ + struct ep_object *ep_obj; + struct kobject *kobj; + + ep_obj = kzalloc(sizeof(struct ep_object), GFP_KERNEL); + if (!ep_obj) + return; + + ep_obj->desc = &endpoint->desc; + ep_obj->udev = udev; + + kobj = &ep_obj->kobj; + kobject_set_name(kobj, "ep_%02x", endpoint->desc.bEndpointAddress); + kobj->parent = parent; + kobj->ktype = &ep_object_ktype; + + /* Don't use kobject_register, because it generates a hotplug event */ + kobject_init(kobj); + if (kobject_add(kobj) == 0) + endpoint->kobj = kobj; + else + kobject_put(kobj); +} + +static void usb_remove_ep_files(struct usb_host_endpoint *endpoint) +{ + + if (endpoint->kobj) { + kobject_del(endpoint->kobj); + kobject_put(endpoint->kobj); + endpoint->kobj = NULL; + } +} + /* Active configuration fields */ #define usb_actconfig_show(field, multiplier, format_string) \ static ssize_t show_##field (struct device *dev, \ @@ -222,7 +420,7 @@ void usb_create_sysfs_dev_files (struct usb_device *udev) if (udev->serial) device_create_file (dev, &dev_attr_serial); device_create_file (dev, &dev_attr_configuration); - usb_create_ep_files(dev, &udev->ep0, udev); + usb_create_ep_files(&dev->kobj, &udev->ep0, udev); } void usb_remove_sysfs_dev_files (struct usb_device *udev) @@ -326,7 +524,7 @@ static inline void usb_create_intf_ep_files(struct usb_interface *intf, iface_desc = intf->cur_altsetting; for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) - usb_create_ep_files(&intf->dev, &iface_desc->endpoint[i], + usb_create_ep_files(&intf->dev.kobj, &iface_desc->endpoint[i], udev); } diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 986498837..dad4d8fd8 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 184c24660..b7fdc1cd1 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -21,6 +21,7 @@ * are evil. */ +#include #include #include #include @@ -990,8 +991,6 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, static int verify_suspended(struct device *dev, void *unused) { - if (dev->driver == NULL) - return 0; return (dev->power.power_state.event == PM_EVENT_ON) ? -EBUSY : 0; } @@ -1208,7 +1207,6 @@ EXPORT_SYMBOL(usb_ifnum_to_if); EXPORT_SYMBOL(usb_altnum_to_altsetting); EXPORT_SYMBOL(usb_reset_device); -EXPORT_SYMBOL(usb_reset_composite_device); EXPORT_SYMBOL(__usb_get_extra_descriptor); diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 1217fbbe5..4647e1ebc 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -4,9 +4,6 @@ extern void usb_create_sysfs_dev_files (struct usb_device *dev); extern void usb_remove_sysfs_dev_files (struct usb_device *dev); extern void usb_create_sysfs_intf_files (struct usb_interface *intf); extern void usb_remove_sysfs_intf_files (struct usb_interface *intf); -extern void usb_create_ep_files(struct device *parent, struct usb_host_endpoint *endpoint, - struct usb_device *udev); -extern void usb_remove_ep_files(struct usb_host_endpoint *endpoint); extern void usb_disable_endpoint (struct usb_device *dev, unsigned int epaddr); extern void usb_disable_interface (struct usb_device *dev, @@ -59,7 +56,6 @@ static inline int is_active(struct usb_interface *f) extern const char *usbcore_name; /* usbfs stuff */ -extern struct mutex usbfs_mutex; extern struct usb_driver usbfs_driver; extern struct file_operations usbfs_devices_fops; extern struct file_operations usbfs_device_file_operations; @@ -81,7 +77,6 @@ struct dev_state { uid_t disc_uid, disc_euid; void __user *disccontext; unsigned long ifclaimed; - u32 secid; }; /* internal notify stuff */ diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 1a32d9677..363b2ad74 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -207,7 +207,7 @@ config USB_AT91 config USB_GADGET_DUMMY_HCD boolean "Dummy HCD (DEVELOPMENT)" - depends on (USB=y || (USB=m && USB_GADGET=m)) && EXPERIMENTAL + depends on USB && EXPERIMENTAL select USB_GADGET_DUALSPEED help This host controller driver emulates USB, looping all data transfer diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index cfebca05e..b8d0b7825 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -25,6 +25,7 @@ #undef VERBOSE #undef PACKET_TRACE +#include #include #include #include @@ -57,23 +58,19 @@ /* * This controller is simple and PIO-only. It's used in many AT91-series - * full speed USB controllers, including the at91rm9200 (arm920T, with MMU), - * at91sam926x (arm926ejs, with MMU), and several no-mmu versions. + * ARMv4T controllers, including the at91rm9200 (arm920T, with MMU), + * at91sam9261 (arm926ejs, with MMU), and several no-mmu versions. * * This driver expects the board has been wired with two GPIOs suppporting * a VBUS sensing IRQ, and a D+ pullup. (They may be omitted, but the - * testing hasn't covered such cases.) - * - * The pullup is most important (so it's integrated on sam926x parts). It + * testing hasn't covered such cases.) The pullup is most important; it * provides software control over whether the host enumerates the device. - * * The VBUS sensing helps during enumeration, and allows both USB clocks * (and the transceiver) to stay gated off until they're necessary, saving - * power. During USB suspend, the 48 MHz clock is gated off in hardware; - * it may also be gated off by software during some Linux sleep states. + * power. During USB suspend, the 48 MHz clock is gated off. */ -#define DRIVER_VERSION "3 May 2006" +#define DRIVER_VERSION "8 March 2005" static const char driver_name [] = "at91_udc"; static const char ep0name[] = "ep0"; @@ -320,15 +317,9 @@ static void done(struct at91_ep *ep, struct at91_request *req, int status) * * There are also state bits like FORCESTALL, EPEDS, DIR, and EPTYPE * that shouldn't normally be changed. - * - * NOTE at91sam9260 docs mention synch between UDPCK and MCK clock domains, - * implying a need to wait for one write to complete (test relevant bits) - * before starting the next write. This shouldn't be an issue given how - * infrequently we write, except maybe for write-then-read idioms. */ #define SET_FX (AT91_UDP_TXPKTRDY) -#define CLR_FX (RX_DATA_READY | AT91_UDP_RXSETUP \ - | AT91_UDP_STALLSENT | AT91_UDP_TXCOMP) +#define CLR_FX (RX_DATA_READY | AT91_UDP_RXSETUP | AT91_UDP_STALLSENT | AT91_UDP_TXCOMP) /* pull OUT packet data from the endpoint's fifo */ static int read_fifo (struct at91_ep *ep, struct at91_request *req) @@ -482,8 +473,7 @@ static void nuke(struct at91_ep *ep, int status) /*-------------------------------------------------------------------------*/ -static int at91_ep_enable(struct usb_ep *_ep, - const struct usb_endpoint_descriptor *desc) +static int at91_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) { struct at91_ep *ep = container_of(_ep, struct at91_ep, ep); struct at91_udc *dev = ep->udc; @@ -593,12 +583,11 @@ static int at91_ep_disable (struct usb_ep * _ep) * interesting for request or buffer allocation. */ -static struct usb_request * -at91_ep_alloc_request(struct usb_ep *_ep, unsigned int gfp_flags) +static struct usb_request *at91_ep_alloc_request (struct usb_ep *_ep, unsigned int gfp_flags) { struct at91_request *req; - req = kcalloc(1, sizeof (struct at91_request), gfp_flags); + req = kcalloc(1, sizeof (struct at91_request), SLAB_KERNEL); if (!req) return NULL; @@ -874,7 +863,6 @@ static void stop_activity(struct at91_udc *udc) if (udc->gadget.speed == USB_SPEED_UNKNOWN) driver = NULL; udc->gadget.speed = USB_SPEED_UNKNOWN; - udc->suspended = 0; for (i = 0; i < NUM_ENDPOINTS; i++) { struct at91_ep *ep = &udc->ep[i]; @@ -902,8 +890,8 @@ static void clk_off(struct at91_udc *udc) return; udc->clocked = 0; udc->gadget.speed = USB_SPEED_UNKNOWN; - clk_disable(udc->fclk); clk_disable(udc->iclk); + clk_disable(udc->fclk); } /* @@ -924,6 +912,9 @@ static void pullup(struct at91_udc *udc, int is_on) at91_udp_write(AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS); at91_set_gpio_value(udc->board.pullup_pin, 0); clk_off(udc); + + // REVISIT: with transceiver disabled, will D- float + // so that a host would falsely detect a device? } } @@ -1300,8 +1291,7 @@ static void handle_ep0(struct at91_udc *udc) if (udc->wait_for_addr_ack) { u32 tmp; - at91_udp_write(AT91_UDP_FADDR, - AT91_UDP_FEN | udc->addr); + at91_udp_write(AT91_UDP_FADDR, AT91_UDP_FEN | udc->addr); tmp = at91_udp_read(AT91_UDP_GLB_STAT); tmp &= ~AT91_UDP_FADDEN; if (udc->addr) @@ -1372,10 +1362,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc, struct pt_regs *r) u32 rescans = 5; while (rescans--) { - u32 status; + u32 status = at91_udp_read(AT91_UDP_ISR); - status = at91_udp_read(AT91_UDP_ISR) - & at91_udp_read(AT91_UDP_IMR); + status &= at91_udp_read(AT91_UDP_IMR); if (!status) break; @@ -1391,17 +1380,18 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc, struct pt_regs *r) stop_activity(udc); /* enable ep0 */ - at91_udp_write(AT91_UDP_CSR(0), - AT91_UDP_EPEDS | AT91_UDP_EPTYPE_CTRL); + at91_udp_write(AT91_UDP_CSR(0), AT91_UDP_EPEDS | AT91_UDP_EPTYPE_CTRL); udc->gadget.speed = USB_SPEED_FULL; udc->suspended = 0; at91_udp_write(AT91_UDP_IER, AT91_UDP_EP(0)); /* * NOTE: this driver keeps clocks off unless the - * USB host is present. That saves power, but for - * boards that don't support VBUS detection, both - * clocks need to be active most of the time. + * USB host is present. That saves power, and also + * eliminates IRQs (reset, resume, suspend) that can + * otherwise flood from the controller. If your + * board doesn't support VBUS detection, suspend and + * resume irq logic may need more attention... */ /* host initiated suspend (3+ms bus idle) */ @@ -1463,19 +1453,13 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc, struct pt_regs *r) /*-------------------------------------------------------------------------*/ -static void nop_release(struct device *dev) -{ - /* nothing to free */ -} - static struct at91_udc controller = { .gadget = { - .ops = &at91_udc_ops, - .ep0 = &controller.ep[0].ep, - .name = driver_name, - .dev = { - .bus_id = "gadget", - .release = nop_release, + .ops = &at91_udc_ops, + .ep0 = &controller.ep[0].ep, + .name = driver_name, + .dev = { + .bus_id = "gadget" } }, .ep[0] = { @@ -1485,8 +1469,7 @@ static struct at91_udc controller = { }, .udc = &controller, .maxpacket = 8, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(0)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(0)), .int_mask = 1 << 0, }, .ep[1] = { @@ -1497,8 +1480,7 @@ static struct at91_udc controller = { .udc = &controller, .is_pingpong = 1, .maxpacket = 64, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(1)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(1)), .int_mask = 1 << 1, }, .ep[2] = { @@ -1509,8 +1491,7 @@ static struct at91_udc controller = { .udc = &controller, .is_pingpong = 1, .maxpacket = 64, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(2)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(2)), .int_mask = 1 << 2, }, .ep[3] = { @@ -1521,8 +1502,7 @@ static struct at91_udc controller = { }, .udc = &controller, .maxpacket = 8, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(3)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(3)), .int_mask = 1 << 3, }, .ep[4] = { @@ -1533,8 +1513,7 @@ static struct at91_udc controller = { .udc = &controller, .is_pingpong = 1, .maxpacket = 256, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(4)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(4)), .int_mask = 1 << 4, }, .ep[5] = { @@ -1545,11 +1524,10 @@ static struct at91_udc controller = { .udc = &controller, .is_pingpong = 1, .maxpacket = 256, - .creg = (void __iomem *)(AT91_VA_BASE_UDP - + AT91_UDP_CSR(5)), + .creg = (void __iomem *)(AT91_VA_BASE_UDP + AT91_UDP_CSR(5)), .int_mask = 1 << 5, }, - /* ep6 and ep7 are also reserved (custom silicon might use them) */ + /* ep6 and ep7 are also reserved */ }; static irqreturn_t at91_vbus_irq(int irq, void *_udc, struct pt_regs *r) @@ -1616,7 +1594,6 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver) local_irq_disable(); udc->enabled = 0; - at91_udp_write(AT91_UDP_IDR, ~0); pullup(udc, 0); local_irq_enable(); @@ -1648,16 +1625,6 @@ static int __devinit at91udc_probe(struct platform_device *pdev) return -ENODEV; } - if (pdev->num_resources != 2) { - DBG("invalid num_resources"); - return -ENODEV; - } - if ((pdev->resource[0].flags != IORESOURCE_MEM) - || (pdev->resource[1].flags != IORESOURCE_IRQ)) { - DBG("invalid resource type"); - return -ENODEV; - } - if (!request_mem_region(AT91_BASE_UDP, SZ_16K, driver_name)) { DBG("someone's using UDC memory\n"); return -EBUSY; @@ -1683,26 +1650,19 @@ static int __devinit at91udc_probe(struct platform_device *pdev) if (retval < 0) goto fail0; - /* don't do anything until we have both gadget driver and VBUS */ - clk_enable(udc->iclk); - at91_udp_write(AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS); - at91_udp_write(AT91_UDP_IDR, 0xffffffff); - clk_disable(udc->iclk); + /* disable everything until there's a gadget driver and vbus */ + pullup(udc, 0); /* request UDC and maybe VBUS irqs */ - udc->udp_irq = platform_get_irq(pdev, 0); - if (request_irq(udc->udp_irq, at91_udc_irq, - IRQF_DISABLED, driver_name, udc)) { - DBG("request irq %d failed\n", udc->udp_irq); + if (request_irq(AT91_ID_UDP, at91_udc_irq, SA_INTERRUPT, driver_name, udc)) { + DBG("request irq %d failed\n", AT91_ID_UDP); retval = -EBUSY; goto fail1; } if (udc->board.vbus_pin > 0) { - if (request_irq(udc->board.vbus_pin, at91_vbus_irq, - IRQF_DISABLED, driver_name, udc)) { - DBG("request vbus irq %d failed\n", - udc->board.vbus_pin); - free_irq(udc->udp_irq, udc); + if (request_irq(udc->board.vbus_pin, at91_vbus_irq, SA_INTERRUPT, driver_name, udc)) { + DBG("request vbus irq %d failed\n", udc->board.vbus_pin); + free_irq(AT91_ID_UDP, udc); retval = -EBUSY; goto fail1; } @@ -1711,7 +1671,6 @@ static int __devinit at91udc_probe(struct platform_device *pdev) udc->vbus = 1; } dev_set_drvdata(dev, udc); - device_init_wakeup(dev, 1); create_debug_file(udc); INFO("%s version %s\n", driver_name, DRIVER_VERSION); @@ -1720,14 +1679,14 @@ static int __devinit at91udc_probe(struct platform_device *pdev) fail1: device_unregister(&udc->gadget.dev); fail0: - release_mem_region(AT91_BASE_UDP, SZ_16K); + release_mem_region(AT91_VA_BASE_UDP, SZ_16K); DBG("%s probe failed, %d\n", driver_name, retval); return retval; } -static int __devexit at91udc_remove(struct platform_device *pdev) +static int __devexit at91udc_remove(struct platform_device *dev) { - struct at91_udc *udc = platform_get_drvdata(pdev); + struct at91_udc *udc = platform_get_drvdata(dev); DBG("remove\n"); @@ -1736,11 +1695,10 @@ static int __devexit at91udc_remove(struct platform_device *pdev) if (udc->driver != 0) usb_gadget_unregister_driver(udc->driver); - device_init_wakeup(&pdev->dev, 0); remove_debug_file(udc); if (udc->board.vbus_pin > 0) free_irq(udc->board.vbus_pin, udc); - free_irq(udc->udp_irq, udc); + free_irq(AT91_ID_UDP, udc); device_unregister(&udc->gadget.dev); release_mem_region(AT91_BASE_UDP, SZ_16K); @@ -1751,36 +1709,31 @@ static int __devexit at91udc_remove(struct platform_device *pdev) } #ifdef CONFIG_PM -static int at91udc_suspend(struct platform_device *pdev, pm_message_t mesg) +static int at91udc_suspend(struct platform_device *dev, pm_message_t mesg) { - struct at91_udc *udc = platform_get_drvdata(pdev); - int wake = udc->driver && device_may_wakeup(&pdev->dev); + struct at91_udc *udc = platform_get_drvdata(dev); - /* Unless we can act normally to the host (letting it wake us up - * whenever it has work for us) force disconnect. Wakeup requires - * PLLB for USB events (signaling for reset, wakeup, or incoming - * tokens) and VBUS irqs (on systems which support them). + /* + * The "safe" suspend transitions are opportunistic ... e.g. when + * the USB link is suspended (48MHz clock autogated off), or when + * it's disconnected (programmatically gated off, elsewhere). + * Then we can suspend, and the chip can enter slow clock mode. + * + * The problem case is some component (user mode?) suspending this + * device while it's active, with the 48 MHz clock in use. There + * are two basic approaches: (a) veto suspend levels involving slow + * clock mode, (b) disconnect, so 48 MHz will no longer be in use + * and we can enter slow clock mode. This uses (b) for now, since + * it's simplest until AT91 PM exists and supports the other option. */ - if ((!udc->suspended && udc->addr) - || !wake - || at91_suspend_entering_slow_clock()) { + if (udc->vbus && !udc->suspended) pullup(udc, 0); - disable_irq_wake(udc->udp_irq); - } else - enable_irq_wake(udc->udp_irq); - - if (udc->board.vbus_pin > 0) { - if (wake) - enable_irq_wake(udc->board.vbus_pin); - else - disable_irq_wake(udc->board.vbus_pin); - } return 0; } -static int at91udc_resume(struct platform_device *pdev) +static int at91udc_resume(struct platform_device *dev) { - struct at91_udc *udc = platform_get_drvdata(pdev); + struct at91_udc *udc = platform_get_drvdata(dev); /* maybe reconnect to host; if so, clocks on */ pullup(udc, 1); @@ -1796,7 +1749,7 @@ static struct platform_driver at91_udc = { .remove = __devexit_p(at91udc_remove), .shutdown = at91udc_shutdown, .suspend = at91udc_suspend, - .resume = at91udc_resume, + .resume = at91udc_resume, .driver = { .name = (char *) driver_name, .owner = THIS_MODULE, @@ -1815,6 +1768,6 @@ static void __devexit udc_exit_module(void) } module_exit(udc_exit_module); -MODULE_DESCRIPTION("AT91 udc driver"); +MODULE_DESCRIPTION("AT91RM9200 udc driver"); MODULE_AUTHOR("Thomas Rathbone, David Brownell"); MODULE_LICENSE("GPL"); diff --git a/drivers/usb/gadget/at91_udc.h b/drivers/usb/gadget/at91_udc.h index 882af42e8..5a4799ced 100644 --- a/drivers/usb/gadget/at91_udc.h +++ b/drivers/usb/gadget/at91_udc.h @@ -141,7 +141,6 @@ struct at91_udc { struct clk *iclk, *fclk; struct platform_device *pdev; struct proc_dir_entry *pde; - int udp_irq; }; static inline struct at91_udc *to_udc(struct usb_gadget *g) diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 7d1c22c34..42ce41d71 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -36,6 +36,7 @@ #define DEBUG +#include #include #include #include @@ -609,8 +610,7 @@ static int dummy_dequeue (struct usb_ep *_ep, struct usb_request *_req) if (!dum->driver) return -ESHUTDOWN; - local_irq_save (flags); - spin_lock (&dum->lock); + spin_lock_irqsave (&dum->lock, flags); list_for_each_entry (req, &ep->queue, queue) { if (&req->req == _req) { list_del_init (&req->queue); @@ -619,7 +619,7 @@ static int dummy_dequeue (struct usb_ep *_ep, struct usb_request *_req) break; } } - spin_unlock (&dum->lock); + spin_unlock_irqrestore (&dum->lock, flags); if (retval == 0) { dev_dbg (udc_dev(dum), @@ -627,7 +627,6 @@ static int dummy_dequeue (struct usb_ep *_ep, struct usb_request *_req) req, _ep->name, _req->length, _req->buf); _req->complete (_ep, _req); } - local_irq_restore (flags); return retval; } diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 53d584589..f7c6d758e 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -34,12 +34,12 @@ /* we must assign addresses for configurable endpoints (like net2280) */ -static __devinitdata unsigned epnum; +static __initdata unsigned epnum; // #define MANY_ENDPOINTS #ifdef MANY_ENDPOINTS /* more than 15 configurable endpoints */ -static __devinitdata unsigned in_epnum; +static __initdata unsigned in_epnum; #endif @@ -59,7 +59,7 @@ static __devinitdata unsigned in_epnum; * NOTE: each endpoint is unidirectional, as specified by its USB * descriptor; and isn't specific to a configuration or altsetting. */ -static int __devinit +static int __init ep_matches ( struct usb_gadget *gadget, struct usb_ep *ep, @@ -73,7 +73,7 @@ ep_matches ( /* endpoint already claimed? */ if (0 != ep->driver_data) return 0; - + /* only support ep0 for portable CONTROL traffic */ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; if (USB_ENDPOINT_XFER_CONTROL == type) @@ -186,7 +186,7 @@ ep_matches ( return 1; } -static struct usb_ep * __devinit +static struct usb_ep * __init find_ep (struct usb_gadget *gadget, const char *name) { struct usb_ep *ep; @@ -228,7 +228,7 @@ find_ep (struct usb_gadget *gadget, const char *name) * * On failure, this returns a null endpoint descriptor. */ -struct usb_ep * __devinit usb_ep_autoconfig ( +struct usb_ep * __init usb_ep_autoconfig ( struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc ) @@ -276,7 +276,7 @@ struct usb_ep * __devinit usb_ep_autoconfig ( return ep; } - /* Second, look at endpoints until an unclaimed one looks usable */ + /* Second, look at endpoints until an unclaimed one looks usable */ list_for_each_entry (ep, &gadget->ep_list, ep_list) { if (ep_matches (gadget, ep, desc)) return ep; @@ -295,7 +295,7 @@ struct usb_ep * __devinit usb_ep_autoconfig ( * state such as ep->driver_data and the record of assigned endpoints * used by usb_ep_autoconfig(). */ -void __devinit usb_ep_autoconfig_reset (struct usb_gadget *gadget) +void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget) { struct usb_ep *ep; diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index fed484da5..9c4422ac9 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -23,6 +23,7 @@ // #define DEBUG 1 // #define VERBOSE +#include #include #include #include @@ -48,7 +49,7 @@ #include #include -#include +#include #include #include @@ -100,9 +101,9 @@ static const char driver_desc [] = DRIVER_DESC; /* CDC and RNDIS support the same host-chosen outgoing packet filters. */ #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ - |USB_CDC_PACKET_TYPE_ALL_MULTICAST \ - |USB_CDC_PACKET_TYPE_PROMISCUOUS \ - |USB_CDC_PACKET_TYPE_DIRECTED) + |USB_CDC_PACKET_TYPE_ALL_MULTICAST \ + |USB_CDC_PACKET_TYPE_PROMISCUOUS \ + |USB_CDC_PACKET_TYPE_DIRECTED) /*-------------------------------------------------------------------------*/ @@ -117,8 +118,6 @@ struct eth_dev { struct usb_ep *in_ep, *out_ep, *status_ep; const struct usb_endpoint_descriptor *in, *out, *status; - - spinlock_t req_lock; struct list_head tx_reqs, rx_reqs; struct net_device *net; @@ -262,7 +261,7 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address"); #define DEV_CONFIG_CDC #endif -#ifdef CONFIG_USB_GADGET_MUSB_HDRC +#ifdef CONFIG_USB_GADGET_MUSBHDRC #define DEV_CONFIG_CDC #endif @@ -319,7 +318,7 @@ static inline int rndis_active(struct eth_dev *dev) #define DEFAULT_QLEN 2 /* double buffering by default */ /* peak bulk transfer bits-per-second */ -#define HS_BPS (13 * 512 * 8 * 1000 * 8) +#define HS_BPS (13 * 512 * 8 * 1000 * 8) #define FS_BPS (19 * 64 * 1 * 1000 * 8) #ifdef CONFIG_USB_GADGET_DUALSPEED @@ -467,7 +466,7 @@ eth_config = { }; #ifdef CONFIG_USB_ETH_RNDIS -static struct usb_config_descriptor +static struct usb_config_descriptor rndis_config = { .bLength = sizeof rndis_config, .bDescriptorType = USB_DT_CONFIG, @@ -512,7 +511,7 @@ static const struct usb_interface_descriptor rndis_control_intf = { .bLength = sizeof rndis_control_intf, .bDescriptorType = USB_DT_INTERFACE, - + .bInterfaceNumber = 0, .bNumEndpoints = 1, .bInterfaceClass = USB_CLASS_COMM, @@ -546,20 +545,20 @@ static const struct usb_cdc_union_desc union_desc = { #ifdef CONFIG_USB_ETH_RNDIS static const struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = { - .bLength = sizeof call_mgmt_descriptor, - .bDescriptorType = USB_DT_CS_INTERFACE, - .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, + .bLength = sizeof call_mgmt_descriptor, + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE, - .bmCapabilities = 0x00, - .bDataInterface = 0x01, + .bmCapabilities = 0x00, + .bDataInterface = 0x01, }; static const struct usb_cdc_acm_descriptor acm_descriptor = { - .bLength = sizeof acm_descriptor, - .bDescriptorType = USB_DT_CS_INTERFACE, - .bDescriptorSubType = USB_CDC_ACM_TYPE, + .bLength = sizeof acm_descriptor, + .bDescriptorType = USB_DT_CS_INTERFACE, + .bDescriptorSubType = USB_CDC_ACM_TYPE, - .bmCapabilities = 0x00, + .bmCapabilities = 0x00, }; #endif @@ -596,7 +595,7 @@ static const struct usb_cdc_ether_desc ether_desc = { * RNDIS requires the status endpoint, since it uses that encapsulation * mechanism for its funky RPC scheme. */ - + #define LOG2_STATUS_INTERVAL_MSEC 5 /* 1 << 5 == 32 msec */ #define STATUS_BYTECOUNT 16 /* 8 byte header + data */ @@ -979,7 +978,7 @@ set_ether_config (struct eth_dev *dev, gfp_t gfp_flags) result = usb_ep_enable (dev->status_ep, dev->status); if (result != 0) { - DEBUG (dev, "enable %s --> %d\n", + DEBUG (dev, "enable %s --> %d\n", dev->status_ep->name, result); goto done; } @@ -1003,15 +1002,15 @@ set_ether_config (struct eth_dev *dev, gfp_t gfp_flags) if (!cdc_active(dev)) { result = usb_ep_enable (dev->in_ep, dev->in); if (result != 0) { - DEBUG(dev, "enable %s --> %d\n", + DEBUG(dev, "enable %s --> %d\n", dev->in_ep->name, result); goto done; } result = usb_ep_enable (dev->out_ep, dev->out); if (result != 0) { - DEBUG (dev, "enable %s --> %d\n", - dev->out_ep->name, result); + DEBUG (dev, "enable %s --> %d\n", + dev->in_ep->name, result); goto done; } } @@ -1068,31 +1067,21 @@ static void eth_reset_config (struct eth_dev *dev) */ if (dev->in) { usb_ep_disable (dev->in_ep); - spin_lock(&dev->req_lock); while (likely (!list_empty (&dev->tx_reqs))) { req = container_of (dev->tx_reqs.next, struct usb_request, list); list_del (&req->list); - - spin_unlock(&dev->req_lock); usb_ep_free_request (dev->in_ep, req); - spin_lock(&dev->req_lock); } - spin_unlock(&dev->req_lock); } if (dev->out) { usb_ep_disable (dev->out_ep); - spin_lock(&dev->req_lock); while (likely (!list_empty (&dev->rx_reqs))) { req = container_of (dev->rx_reqs.next, struct usb_request, list); list_del (&req->list); - - spin_unlock(&dev->req_lock); usb_ep_free_request (dev->out_ep, req); - spin_lock(&dev->req_lock); } - spin_unlock(&dev->req_lock); } if (dev->status) { @@ -1155,7 +1144,7 @@ eth_set_config (struct eth_dev *dev, unsigned number, gfp_t gfp_flags) #ifdef CONFIG_USB_GADGET_DUALSPEED case USB_SPEED_HIGH: speed = "high"; break; #endif - default: speed = "?"; break; + default: speed = "?"; break; } dev->config = number; @@ -1217,7 +1206,7 @@ static void issue_start_status (struct eth_dev *dev) struct usb_request *req = dev->stat_req; struct usb_cdc_notification *event; int value; - + DEBUG (dev, "%s, flush old status first\n", __FUNCTION__); /* flush old status @@ -1279,7 +1268,7 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req) { struct eth_dev *dev = ep->driver_data; int status; - + /* received RNDIS command from USB_CDC_SEND_ENCAPSULATED_COMMAND */ spin_lock(&dev->lock); status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf); @@ -1483,7 +1472,7 @@ done_set_intf: #endif /* DEV_CONFIG_CDC */ -#ifdef CONFIG_USB_ETH_RNDIS +#ifdef CONFIG_USB_ETH_RNDIS /* RNDIS uses the CDC command encapsulation mechanism to implement * an RPC scheme, with much getting/setting of attributes by OID. */ @@ -1500,7 +1489,7 @@ done_set_intf: req->complete = rndis_command_complete; /* later, rndis_control_ack () sends a notification */ break; - + case USB_CDC_GET_ENCAPSULATED_RESPONSE: if ((USB_DIR_IN|USB_TYPE_CLASS|USB_RECIP_INTERFACE) == ctrl->bRequestType @@ -1652,7 +1641,7 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags) DEBUG (dev, "no rx skb\n"); goto enomem; } - + /* Some platforms perform better when IP packets are aligned, * but on at least one, checksumming fails otherwise. Note: * RNDIS headers involve variable numbers of LE32 values. @@ -1671,9 +1660,9 @@ enomem: if (retval) { DEBUG (dev, "rx submit --> %d\n", retval); dev_kfree_skb_any (skb); - spin_lock(&dev->req_lock); + spin_lock (&dev->lock); list_add (&req->list, &dev->rx_reqs); - spin_unlock(&dev->req_lock); + spin_unlock (&dev->lock); } return retval; } @@ -1731,7 +1720,7 @@ quiesce: case -EOVERFLOW: dev->stats.rx_over_errors++; // FALLTHROUGH - + default: dev->stats.rx_errors++; DEBUG (dev, "rx status %d\n", status); @@ -1742,9 +1731,8 @@ quiesce: dev_kfree_skb_any (skb); if (!netif_running (dev->net)) { clean: - spin_lock(&dev->req_lock); + /* nobody reading rx_reqs, so no dev->lock */ list_add (&req->list, &dev->rx_reqs); - spin_unlock(&dev->req_lock); req = NULL; } if (req) @@ -1795,18 +1783,15 @@ static int alloc_requests (struct eth_dev *dev, unsigned n, gfp_t gfp_flags) { int status; - spin_lock(&dev->req_lock); status = prealloc (&dev->tx_reqs, dev->in_ep, n, gfp_flags); if (status < 0) goto fail; status = prealloc (&dev->rx_reqs, dev->out_ep, n, gfp_flags); if (status < 0) goto fail; - goto done; + return 0; fail: DEBUG (dev, "can't alloc requests\n"); -done: - spin_unlock(&dev->req_lock); return status; } @@ -1816,21 +1801,21 @@ static void rx_fill (struct eth_dev *dev, gfp_t gfp_flags) unsigned long flags; /* fill unused rxq slots with some skb */ - spin_lock_irqsave(&dev->req_lock, flags); + spin_lock_irqsave (&dev->lock, flags); while (!list_empty (&dev->rx_reqs)) { req = container_of (dev->rx_reqs.next, struct usb_request, list); list_del_init (&req->list); - spin_unlock_irqrestore(&dev->req_lock, flags); + spin_unlock_irqrestore (&dev->lock, flags); if (rx_submit (dev, req, gfp_flags) < 0) { defer_kevent (dev, WORK_RX_MEMORY); return; } - spin_lock_irqsave(&dev->req_lock, flags); + spin_lock_irqsave (&dev->lock, flags); } - spin_unlock_irqrestore(&dev->req_lock, flags); + spin_unlock_irqrestore (&dev->lock, flags); } static void eth_work (void *_dev) @@ -1864,9 +1849,9 @@ static void tx_complete (struct usb_ep *ep, struct usb_request *req) } dev->stats.tx_packets++; - spin_lock(&dev->req_lock); + spin_lock (&dev->lock); list_add (&req->list, &dev->tx_reqs); - spin_unlock(&dev->req_lock); + spin_unlock (&dev->lock); dev_kfree_skb_any (skb); atomic_dec (&dev->tx_qlen); @@ -1912,12 +1897,12 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) /* ignores USB_CDC_PACKET_TYPE_DIRECTED */ } - spin_lock_irqsave(&dev->req_lock, flags); + spin_lock_irqsave (&dev->lock, flags); req = container_of (dev->tx_reqs.next, struct usb_request, list); list_del (&req->list); if (list_empty (&dev->tx_reqs)) netif_stop_queue (net); - spin_unlock_irqrestore(&dev->req_lock, flags); + spin_unlock_irqrestore (&dev->lock, flags); /* no buffer copies needed, unless the network stack did it * or the hardware can't use skb buffers. @@ -1930,7 +1915,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) sizeof (struct rndis_packet_msg_type)); if (!skb_rndis) goto drop; - + dev_kfree_skb_any (skb); skb = skb_rndis; rndis_add_hdr (skb); @@ -1971,11 +1956,11 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net) drop: dev->stats.tx_dropped++; dev_kfree_skb_any (skb); - spin_lock_irqsave(&dev->req_lock, flags); + spin_lock_irqsave (&dev->lock, flags); if (list_empty (&dev->tx_reqs)) netif_start_queue (net); list_add (&req->list, &dev->tx_reqs); - spin_unlock_irqrestore(&dev->req_lock, flags); + spin_unlock_irqrestore (&dev->lock, flags); } return 0; } @@ -2016,7 +2001,7 @@ static int rndis_control_ack (struct net_device *net) struct eth_dev *dev = netdev_priv(net); u32 length; struct usb_request *resp = dev->stat_req; - + /* in case RNDIS calls this after disconnect */ if (!dev->status) { DEBUG (dev, "status ENODEV\n"); @@ -2036,16 +2021,16 @@ static int rndis_control_ack (struct net_device *net) resp->length = 8; resp->complete = rndis_control_ack_complete; resp->context = dev; - + *((__le32 *) resp->buf) = __constant_cpu_to_le32 (1); *((__le32 *) resp->buf + 1) = __constant_cpu_to_le32 (0); - + length = usb_ep_queue (dev->status_ep, resp, GFP_ATOMIC); if (length < 0) { resp->status = 0; rndis_control_ack_complete (dev->status_ep, resp); } - + return 0; } @@ -2062,7 +2047,7 @@ static void eth_start (struct eth_dev *dev, gfp_t gfp_flags) /* fill the rx queue */ rx_fill (dev, gfp_flags); - /* and open the tx floodgates */ + /* and open the tx floodgates */ atomic_set (&dev->tx_qlen, 0); netif_wake_queue (dev->net); if (rndis_active(dev)) { @@ -2091,7 +2076,7 @@ static int eth_stop (struct net_device *net) netif_stop_queue (net); DEBUG (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", - dev->stats.rx_packets, dev->stats.tx_packets, + dev->stats.rx_packets, dev->stats.tx_packets, dev->stats.rx_errors, dev->stats.tx_errors ); @@ -2110,7 +2095,7 @@ static int eth_stop (struct net_device *net) usb_ep_enable (dev->status_ep, dev->status); } } - + if (rndis_active(dev)) { rndis_set_param_medium (dev->rndis_config, NDIS_MEDIUM_802_3, 0); @@ -2147,7 +2132,7 @@ eth_req_free (struct usb_ep *ep, struct usb_request *req) } -static void /* __init_or_exit */ +static void __exit eth_unbind (struct usb_gadget *gadget) { struct eth_dev *dev = get_gadget_data (gadget); @@ -2174,7 +2159,7 @@ eth_unbind (struct usb_gadget *gadget) set_gadget_data (gadget, NULL); } -static u8 __devinit nibble (unsigned char c) +static u8 __init nibble (unsigned char c) { if (likely (isdigit (c))) return c - '0'; @@ -2184,7 +2169,7 @@ static u8 __devinit nibble (unsigned char c) return 0; } -static int __devinit get_ether_addr(const char *str, u8 *dev_addr) +static int __init get_ether_addr(const char *str, u8 *dev_addr) { if (str) { unsigned i; @@ -2205,7 +2190,7 @@ static int __devinit get_ether_addr(const char *str, u8 *dev_addr) return 1; } -static int __devinit +static int __init eth_bind (struct usb_gadget *gadget) { struct eth_dev *dev; @@ -2316,7 +2301,7 @@ autoconf_fail: return -ENODEV; } in_ep->driver_data = in_ep; /* claim */ - + out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc); if (!out_ep) goto autoconf_fail; @@ -2389,12 +2374,11 @@ autoconf_fail: #endif } - net = alloc_etherdev (sizeof *dev); - if (!net) + net = alloc_etherdev (sizeof *dev); + if (!net) return status; dev = netdev_priv(net); spin_lock_init (&dev->lock); - spin_lock_init (&dev->req_lock); INIT_WORK (&dev->work, eth_work, dev); INIT_LIST_HEAD (&dev->tx_reqs); INIT_LIST_HEAD (&dev->rx_reqs); @@ -2470,7 +2454,7 @@ autoconf_fail: dev->gadget = gadget; set_gadget_data (gadget, dev); gadget->ep0->driver_data = dev; - + /* two kinds of host-initiated state changes: * - iff DATA transfer is active, carrier is "on" * - tx queueing enabled if open *and* carrier is "on" @@ -2478,8 +2462,8 @@ autoconf_fail: netif_stop_queue (dev->net); netif_carrier_off (dev->net); - SET_NETDEV_DEV (dev->net, &gadget->dev); - status = register_netdev (dev->net); + SET_NETDEV_DEV (dev->net, &gadget->dev); + status = register_netdev (dev->net); if (status < 0) goto fail1; @@ -2504,7 +2488,7 @@ autoconf_fail: u32 vendorID = 0; /* FIXME RNDIS vendor id == "vendor NIC code" == ? */ - + dev->rndis_config = rndis_register (rndis_control_ack); if (dev->rndis_config < 0) { fail0: @@ -2512,7 +2496,7 @@ fail0: status = -ENODEV; goto fail; } - + /* these set up a lot of the OIDs that RNDIS needs */ rndis_set_host_mac (dev->rndis_config, dev->host_mac); if (rndis_set_param_dev (dev->rndis_config, dev->net, @@ -2564,7 +2548,7 @@ static struct usb_gadget_driver eth_driver = { .function = (char *) driver_desc, .bind = eth_bind, - .unbind = eth_unbind, + .unbind = __exit_p(eth_unbind), .setup = eth_setup, .disconnect = eth_disconnect, @@ -2572,7 +2556,7 @@ static struct usb_gadget_driver eth_driver = { .suspend = eth_suspend, .resume = eth_resume, - .driver = { + .driver = { .name = (char *) shortname, .owner = THIS_MODULE, }, diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 8d7f1e84c..6f887478b 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -221,6 +221,7 @@ #undef VERBOSE #undef DUMP_MSGS +#include #include #include @@ -1905,6 +1906,7 @@ static int fsync_sub(struct lun *curlun) inode = filp->f_dentry->d_inode; mutex_lock(&inode->i_mutex); + current->flags |= PF_SYNCWRITE; rc = filemap_fdatawrite(inode->i_mapping); err = filp->f_op->fsync(filp, filp->f_dentry, 1); if (!rc) @@ -1912,6 +1914,7 @@ static int fsync_sub(struct lun *curlun) err = filemap_fdatawait(inode->i_mapping); if (!rc) rc = err; + current->flags &= ~PF_SYNCWRITE; mutex_unlock(&inode->i_mutex); VLDBG(curlun, "fdatasync -> %d\n", rc); return rc; @@ -3691,7 +3694,7 @@ static void lun_release(struct device *dev) kref_put(&fsg->ref, fsg_release); } -static void /* __init_or_exit */ fsg_unbind(struct usb_gadget *gadget) +static void __exit fsg_unbind(struct usb_gadget *gadget) { struct fsg_dev *fsg = get_gadget_data(gadget); int i; diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index 7cf2999e8..66b81bbf6 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c @@ -24,6 +24,7 @@ // #define VERBOSE /* extra debug messages (success too) */ // #define USB_TRACE /* packet-level success messages */ +#include #include #include #include @@ -1849,6 +1850,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) unsigned long resource, len; void __iomem *base = NULL; int retval; + char buf [8], *bufp; /* if you want to support more than one controller in a system, * usb_gadget_driver_{register,unregister}() must change. @@ -1911,14 +1913,20 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, dev); INFO(dev, "%s\n", driver_desc); INFO(dev, "version: " DRIVER_VERSION " %s\n", dmastr()); - INFO(dev, "irq %d, pci mem %p\n", pdev->irq, base); +#ifndef __sparc__ + scnprintf(buf, sizeof buf, "%d", pdev->irq); + bufp = buf; +#else + bufp = __irq_itoa(pdev->irq); +#endif + INFO(dev, "irq %s, pci mem %p\n", bufp, base); /* init to known state, then setup irqs */ udc_reset(dev); udc_reinit (dev); - if (request_irq(pdev->irq, goku_irq, IRQF_SHARED/*|IRQF_SAMPLE_RANDOM*/, + if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/, driver_name, dev) != 0) { - DBG(dev, "request interrupt %d failed\n", pdev->irq); + DBG(dev, "request interrupt %s failed\n", bufp); retval = -EBUSY; goto done; } diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 084fe6236..0eb010a3f 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -342,7 +342,7 @@ fail: static ssize_t ep_io (struct ep_data *epdata, void *buf, unsigned len) { - DECLARE_COMPLETION_ONSTACK (done); + DECLARE_COMPLETION (done); int value; spin_lock_irq (&epdata->dev->lock); @@ -528,7 +528,7 @@ struct kiocb_priv { struct usb_request *req; struct ep_data *epdata; void *buf; - char __user *ubuf; /* NULL for writes */ + char __user *ubuf; unsigned actual; }; @@ -566,6 +566,7 @@ static ssize_t ep_aio_read_retry(struct kiocb *iocb) status = priv->actual; kfree(priv->buf); kfree(priv); + aio_put_req(iocb); return status; } @@ -579,8 +580,8 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req) spin_lock(&epdata->dev->lock); priv->req = NULL; priv->epdata = NULL; - if (priv->ubuf == NULL - || unlikely(req->actual == 0) + if (NULL == iocb->ki_retry + || unlikely(0 == req->actual) || unlikely(kiocbIsCancelled(iocb))) { kfree(req->buf); kfree(priv); @@ -617,7 +618,7 @@ ep_aio_rwtail( char __user *ubuf ) { - struct kiocb_priv *priv; + struct kiocb_priv *priv = (void *) &iocb->private; struct usb_request *req; ssize_t value; @@ -669,7 +670,7 @@ fail: kfree(priv); put_ep(epdata); } else - value = (ubuf ? -EIOCBRETRY : -EIOCBQUEUED); + value = -EIOCBQUEUED; return value; } @@ -844,7 +845,7 @@ fail1: static int ep_open (struct inode *inode, struct file *fd) { - struct ep_data *data = inode->i_private; + struct ep_data *data = inode->u.generic_ip; int value = -EBUSY; if (down_interruptible (&data->lock) != 0) @@ -1038,7 +1039,7 @@ scan: /* ep0 can't deliver events when STATE_SETUP */ for (i = 0; i < n; i++) { if (dev->event [i].type == GADGETFS_SETUP) { - len = i + 1; + len = n = i + 1; len *= sizeof (struct usb_gadgetfs_event); n = 0; break; @@ -1586,13 +1587,13 @@ gadgetfs_create_file (struct super_block *sb, char const *name, static int activate_ep_files (struct dev_data *dev) { struct usb_ep *ep; - struct ep_data *data; gadget_for_each_ep (ep, dev->gadget) { + struct ep_data *data; data = kzalloc(sizeof(*data), GFP_KERNEL); if (!data) - goto enomem0; + goto enomem; data->state = STATE_EP_DISABLED; init_MUTEX (&data->lock); init_waitqueue_head (&data->wait); @@ -1607,23 +1608,21 @@ static int activate_ep_files (struct dev_data *dev) data->req = usb_ep_alloc_request (ep, GFP_KERNEL); if (!data->req) - goto enomem1; + goto enomem; data->inode = gadgetfs_create_file (dev->sb, data->name, data, &ep_config_operations, &data->dentry); - if (!data->inode) - goto enomem2; + if (!data->inode) { + usb_ep_free_request(ep, data->req); + kfree (data); + goto enomem; + } list_add_tail (&data->epfiles, &dev->epfiles); } return 0; -enomem2: - usb_ep_free_request (ep, data->req); -enomem1: - put_dev (dev); - kfree (data); -enomem0: +enomem: DBG (dev, "%s enomem\n", __FUNCTION__); destroy_ep_files (dev); return -ENOMEM; @@ -1794,7 +1793,7 @@ static struct usb_gadget_driver probe_driver = { * * After initialization, the device stays active for as long as that * $CHIP file is open. Events may then be read from that descriptor, - * such as configuration notifications. More complex drivers will handle + * such configuration notifications. More complex drivers will handle * some control requests in user space. */ @@ -1909,7 +1908,7 @@ fail: static int dev_open (struct inode *inode, struct file *fd) { - struct dev_data *dev = inode->i_private; + struct dev_data *dev = inode->u.generic_ip; int value = -EBUSY; if (dev->state == STATE_DEV_DISABLED) { @@ -1966,10 +1965,11 @@ gadgetfs_make_inode (struct super_block *sb, inode->i_mode = mode; inode->i_uid = default_uid; inode->i_gid = default_gid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_private = data; + inode->u.generic_ip = data; inode->i_fop = fops; } return inode; @@ -2033,10 +2033,12 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) NULL, &simple_dir_operations, S_IFDIR | S_IRUGO | S_IXUGO); if (!inode) - goto enomem0; + return -ENOMEM; inode->i_op = &simple_dir_inode_operations; - if (!(d = d_alloc_root (inode))) - goto enomem1; + if (!(d = d_alloc_root (inode))) { + iput (inode); + return -ENOMEM; + } sb->s_root = d; /* the ep0 file is named after the controller we expect; @@ -2044,36 +2046,29 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) */ dev = dev_new (); if (!dev) - goto enomem2; + return -ENOMEM; dev->sb = sb; - if (!gadgetfs_create_file (sb, CHIP, + if (!(inode = gadgetfs_create_file (sb, CHIP, dev, &dev_init_operations, - &dev->dentry)) - goto enomem3; + &dev->dentry))) { + put_dev(dev); + return -ENOMEM; + } /* other endpoint files are available after hardware setup, * from binding to a controller. */ the_device = dev; return 0; - -enomem3: - put_dev (dev); -enomem2: - dput (d); -enomem1: - iput (inode); -enomem0: - return -ENOMEM; } /* "mount -t gadgetfs path /dev/gadget" ends up here */ -static int +static struct super_block * gadgetfs_get_sb (struct file_system_type *t, int flags, - const char *path, void *opts, struct vfsmount *mnt) + const char *path, void *opts) { - return get_sb_single (t, flags, opts, gadgetfs_fill_super, mnt); + return get_sb_single (t, flags, opts, gadgetfs_fill_super); } static void diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 36db72579..0d3424eda 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c @@ -2107,7 +2107,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev) /* irq setup after old hardware state is cleaned up */ retval = - request_irq(IRQ_USBINTR, lh7a40x_udc_irq, IRQF_DISABLED, driver_name, + request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name, dev); if (retval != 0) { DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, @@ -2143,7 +2143,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev) static struct platform_driver udc_driver = { .probe = lh7a40x_udc_probe, - .remove = lh7a40x_udc_remove, + .remove = lh7a40x_udc_remove /* FIXME power management support */ /* .suspend = ... disable UDC */ /* .resume = ... re-enable UDC */ diff --git a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h index e3bb78524..9b2e6f7cb 100644 --- a/drivers/usb/gadget/lh7a40x_udc.h +++ b/drivers/usb/gadget/lh7a40x_udc.h @@ -24,6 +24,7 @@ #ifndef __LH7A40X_H_ #define __LH7A40X_H_ +#include #include #include #include diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 09243239d..0b9293493 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c @@ -46,6 +46,7 @@ #undef DEBUG /* messages on error and most fault paths */ #undef VERBOSE /* extra debug messages (success too) */ +#include #include #include #include @@ -2821,6 +2822,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) unsigned long resource, len; void __iomem *base = NULL; int retval, i; + char buf [8], *bufp; /* if you want to support more than one controller in a system, * usb_gadget_driver_{register,unregister}() must change. @@ -2894,10 +2896,15 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) retval = -ENODEV; goto done; } - - if (request_irq (pdev->irq, net2280_irq, IRQF_SHARED, driver_name, dev) +#ifndef __sparc__ + scnprintf (buf, sizeof buf, "%d", pdev->irq); + bufp = buf; +#else + bufp = __irq_itoa(pdev->irq); +#endif + if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev) != 0) { - ERROR (dev, "request interrupt %d failed\n", pdev->irq); + ERROR (dev, "request interrupt %s failed\n", bufp); retval = -EBUSY; goto done; } @@ -2946,8 +2953,8 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) /* done */ INFO (dev, "%s\n", driver_desc); - INFO (dev, "irq %d, pci mem %p, chip rev %04x\n", - pdev->irq, base, dev->chiprev); + INFO (dev, "irq %s, pci mem %p, chip rev %04x\n", + bufp, base, dev->chiprev); INFO (dev, "version: " DRIVER_VERSION "; dma %s\n", use_dma ? (use_dma_chaining ? "chaining" : "enabled") @@ -2965,22 +2972,6 @@ done: return retval; } -/* make sure the board is quiescent; otherwise it will continue - * generating IRQs across the upcoming reboot. - */ - -static void net2280_shutdown (struct pci_dev *pdev) -{ - struct net2280 *dev = pci_get_drvdata (pdev); - - /* disable IRQs */ - writel (0, &dev->regs->pciirqenb0); - writel (0, &dev->regs->pciirqenb1); - - /* disable the pullup so the host will think we're gone */ - writel (0, &dev->usb->usbctl); -} - /*-------------------------------------------------------------------------*/ @@ -3010,7 +3001,6 @@ static struct pci_driver net2280_pci_driver = { .probe = net2280_probe, .remove = net2280_remove, - .shutdown = net2280_shutdown, /* FIXME add power management support */ }; diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 65d749a2b..fbea51448 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c @@ -22,6 +22,7 @@ #undef DEBUG #undef VERBOSE +#include #include #include #include @@ -772,7 +773,7 @@ static void dma_error(int lch, u16 ch_status, void *data) struct omap_ep *ep = data; /* if ch_status & OMAP_DMA_DROP_IRQ ... */ - /* if ch_status & OMAP1_DMA_TOUT_IRQ ... */ + /* if ch_status & OMAP_DMA_TOUT_IRQ ... */ ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); /* complete current transfer ... */ @@ -2818,7 +2819,7 @@ bad_on_1710: /* USB general purpose IRQ: ep0, state changes, dma, etc */ status = request_irq(pdev->resource[1].start, omap_udc_irq, - IRQF_SAMPLE_RANDOM, driver_name, udc); + SA_SAMPLE_RANDOM, driver_name, udc); if (status != 0) { ERR( "can't get irq %ld, err %d\n", pdev->resource[1].start, status); @@ -2827,7 +2828,7 @@ bad_on_1710: /* USB "non-iso" IRQ (PIO for all but ep0) */ status = request_irq(pdev->resource[2].start, omap_udc_pio_irq, - IRQF_SAMPLE_RANDOM, "omap_udc pio", udc); + SA_SAMPLE_RANDOM, "omap_udc pio", udc); if (status != 0) { ERR( "can't get irq %ld, err %d\n", pdev->resource[2].start, status); @@ -2835,7 +2836,7 @@ bad_on_1710: } #ifdef USE_ISO status = request_irq(pdev->resource[3].start, omap_udc_iso_irq, - IRQF_DISABLED, "omap_udc iso", udc); + SA_INTERRUPT, "omap_udc iso", udc); if (status != 0) { ERR("can't get irq %ld, err %d\n", pdev->resource[3].start, status); @@ -2869,7 +2870,7 @@ cleanup0: static int __exit omap_udc_remove(struct platform_device *pdev) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); if (!udc) return -ENODEV; diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index fff027d30..680f7fc5b 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -27,6 +27,7 @@ #undef DEBUG // #define VERBOSE DBG_VERBOSE +#include #include #include #include @@ -52,9 +53,7 @@ #include #include #include -#ifdef CONFIG_ARCH_PXA #include -#endif #include #include @@ -546,7 +545,6 @@ write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) count = req->req.length; done (ep, req, 0); ep0_idle(ep->dev); -#ifndef CONFIG_ARCH_IXP4XX #if 1 /* This seems to get rid of lost status irqs in some cases: * host responds quickly, or next request involves config @@ -566,7 +564,6 @@ write_ep0_fifo (struct pxa2xx_ep *ep, struct pxa2xx_request *req) udelay(1); } while (count); } -#endif #endif } else if (ep->dev->req_pending) ep0start(ep->dev, 0, "IN"); @@ -1588,7 +1585,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) int retval; if (!driver - || driver->speed < USB_SPEED_FULL + || driver->speed != USB_SPEED_FULL || !driver->bind || !driver->unbind || !driver->disconnect @@ -2430,7 +2427,6 @@ static struct pxa2xx_udc memory = { #define PXA210_B1 0x00000123 #define PXA210_B0 0x00000122 #define IXP425_A0 0x000001c1 -#define IXP465_AD 0x00000200 /* * probe - binds to the platform device @@ -2467,8 +2463,6 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) break; #elif defined(CONFIG_ARCH_IXP4XX) case IXP425_A0: - case IXP465_AD: - dev->has_cfr = 1; out_dma = 0; break; #endif @@ -2521,7 +2515,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) /* irq setup after old hardware state is cleaned up */ retval = request_irq(IRQ_USB, pxa2xx_udc_irq, - IRQF_DISABLED, driver_name, dev); + SA_INTERRUPT, driver_name, dev); if (retval != 0) { printk(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, IRQ_USB, retval); @@ -2533,7 +2527,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) if (machine_is_lubbock()) { retval = request_irq(LUBBOCK_USB_DISC_IRQ, lubbock_vbus_irq, - IRQF_DISABLED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SAMPLE_RANDOM, driver_name, dev); if (retval != 0) { printk(KERN_ERR "%s: can't get irq %i, err %d\n", @@ -2544,7 +2538,7 @@ lubbock_fail0: } retval = request_irq(LUBBOCK_USB_IRQ, lubbock_vbus_irq, - IRQF_DISABLED | IRQF_SAMPLE_RANDOM, + SA_INTERRUPT | SA_SAMPLE_RANDOM, driver_name, dev); if (retval != 0) { printk(KERN_ERR "%s: can't get irq %i, err %d\n", @@ -2581,12 +2575,10 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev) free_irq(IRQ_USB, dev); dev->got_irq = 0; } -#ifdef CONFIG_ARCH_LUBBOCK if (machine_is_lubbock()) { free_irq(LUBBOCK_USB_DISC_IRQ, dev); free_irq(LUBBOCK_USB_IRQ, dev); } -#endif platform_set_drvdata(pdev, NULL); the_controller = NULL; return 0; diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 408c3380d..6d6eaad73 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -1,28 +1,29 @@ -/* +/* * RNDIS MSG parser - * + * * Version: $Id: rndis.c,v 1.19 2004/03/25 21:33:46 robert Exp $ - * + * * Authors: Benedikt Spranger, Pengutronix - * Robert Schwebel, Pengutronix - * + * Robert Schwebel, Pengutronix + * * 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. - * + * version 2, as published by the Free Software Foundation. + * * This software was originally developed in conformance with * Microsoft's Remote NDIS Specification License Agreement. - * + * * 03/12/2004 Kai-Uwe Bloem * Fixed message length bug in init_response - * + * * 03/25/2004 Kai-Uwe Bloem - * Fixed rndis_rm_hdr length bug. + * Fixed rndis_rm_hdr length bug. * * Copyright (C) 2004 by David Brownell * updates to merge with Linux 2.6, better match RNDIS spec */ +#include #include #include #include @@ -81,7 +82,7 @@ static rndis_resp_t *rndis_add_response (int configNr, u32 length); /* supported OIDs */ -static const u32 oid_supported_list [] = +static const u32 oid_supported_list [] = { /* the general stuff */ OID_GEN_SUPPORTED_LIST, @@ -102,7 +103,7 @@ static const u32 oid_supported_list [] = #if 0 OID_GEN_RNDIS_CONFIG_PARAMETER, #endif - + /* the statistical stuff */ OID_GEN_XMIT_OK, OID_GEN_RCV_OK, @@ -126,14 +127,14 @@ static const u32 oid_supported_list [] = OID_GEN_TRANSMIT_QUEUE_LENGTH, #endif /* RNDIS_OPTIONAL_STATS */ - /* mandatory 802.3 */ + /* mandatory 802.3 */ /* the general stuff */ OID_802_3_PERMANENT_ADDRESS, OID_802_3_CURRENT_ADDRESS, OID_802_3_MULTICAST_LIST, OID_802_3_MAC_OPTIONS, OID_802_3_MAXIMUM_LIST_SIZE, - + /* the statistical stuff */ OID_802_3_RCV_ERROR_ALIGNMENT, OID_802_3_XMIT_ONE_COLLISION, @@ -171,8 +172,8 @@ static int gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, rndis_resp_t *r) { - int retval = -ENOTSUPP; - u32 length = 4; /* usually */ + int retval = -ENOTSUPP; + u32 length = 4; /* usually */ __le32 *outbuf; int i, count; rndis_query_cmplt_type *resp; @@ -210,27 +211,27 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, outbuf[i] = cpu_to_le32 (oid_supported_list[i]); retval = 0; break; - + /* mandatory */ case OID_GEN_HARDWARE_STATUS: DEBUG("%s: OID_GEN_HARDWARE_STATUS\n", __FUNCTION__); - /* Bogus question! + /* Bogus question! * Hardware must be ready to receive high level protocols. - * BTW: + * BTW: * reddite ergo quae sunt Caesaris Caesari * et quae sunt Dei Deo! */ *outbuf = __constant_cpu_to_le32 (0); retval = 0; break; - + /* mandatory */ case OID_GEN_MEDIA_SUPPORTED: DEBUG("%s: OID_GEN_MEDIA_SUPPORTED\n", __FUNCTION__); *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); retval = 0; break; - + /* mandatory */ case OID_GEN_MEDIA_IN_USE: DEBUG("%s: OID_GEN_MEDIA_IN_USE\n", __FUNCTION__); @@ -238,7 +239,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, *outbuf = cpu_to_le32 (rndis_per_dev_params [configNr].medium); retval = 0; break; - + /* mandatory */ case OID_GEN_MAXIMUM_FRAME_SIZE: DEBUG("%s: OID_GEN_MAXIMUM_FRAME_SIZE\n", __FUNCTION__); @@ -248,7 +249,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_GEN_LINK_SPEED: if (rndis_debug > 1) @@ -271,7 +272,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_GEN_RECEIVE_BLOCK_SIZE: DEBUG("%s: OID_GEN_RECEIVE_BLOCK_SIZE\n", __FUNCTION__); @@ -281,7 +282,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_GEN_VENDOR_ID: DEBUG("%s: OID_GEN_VENDOR_ID\n", __FUNCTION__); @@ -289,7 +290,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, rndis_per_dev_params [configNr].vendorID); retval = 0; break; - + /* mandatory */ case OID_GEN_VENDOR_DESCRIPTION: DEBUG("%s: OID_GEN_VENDOR_DESCRIPTION\n", __FUNCTION__); @@ -355,7 +356,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, DEBUG("%s: OID_GEN_XMIT_OK\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { *outbuf = cpu_to_le32 ( - rndis_per_dev_params [configNr].stats->tx_packets - + rndis_per_dev_params [configNr].stats->tx_packets - rndis_per_dev_params [configNr].stats->tx_errors - rndis_per_dev_params [configNr].stats->tx_dropped); retval = 0; @@ -368,13 +369,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, DEBUG("%s: OID_GEN_RCV_OK\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { *outbuf = cpu_to_le32 ( - rndis_per_dev_params [configNr].stats->rx_packets - + rndis_per_dev_params [configNr].stats->rx_packets - rndis_per_dev_params [configNr].stats->rx_errors - rndis_per_dev_params [configNr].stats->rx_dropped); retval = 0; } break; - + /* mandatory */ case OID_GEN_XMIT_ERROR: if (rndis_debug > 1) @@ -385,7 +386,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_GEN_RCV_ERROR: if (rndis_debug > 1) @@ -396,7 +397,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_GEN_RCV_NO_BUFFER: DEBUG("%s: OID_GEN_RCV_NO_BUFFER\n", __FUNCTION__); @@ -410,7 +411,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, #ifdef RNDIS_OPTIONAL_STATS case OID_GEN_DIRECTED_BYTES_XMIT: DEBUG("%s: OID_GEN_DIRECTED_BYTES_XMIT\n", __FUNCTION__); - /* + /* * Aunt Tilly's size of shoes * minus antarctica count of penguins * divided by weight of Alpha Centauri @@ -418,7 +419,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, if (rndis_per_dev_params [configNr].stats) { *outbuf = cpu_to_le32 ( (rndis_per_dev_params [configNr] - .stats->tx_packets - + .stats->tx_packets - rndis_per_dev_params [configNr] .stats->tx_errors - rndis_per_dev_params [configNr] @@ -427,14 +428,14 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_DIRECTED_FRAMES_XMIT: DEBUG("%s: OID_GEN_DIRECTED_FRAMES_XMIT\n", __FUNCTION__); /* dito */ if (rndis_per_dev_params [configNr].stats) { *outbuf = cpu_to_le32 ( (rndis_per_dev_params [configNr] - .stats->tx_packets - + .stats->tx_packets - rndis_per_dev_params [configNr] .stats->tx_errors - rndis_per_dev_params [configNr] @@ -443,7 +444,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_MULTICAST_BYTES_XMIT: DEBUG("%s: OID_GEN_MULTICAST_BYTES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -452,7 +453,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_MULTICAST_FRAMES_XMIT: DEBUG("%s: OID_GEN_MULTICAST_FRAMES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -461,7 +462,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_BROADCAST_BYTES_XMIT: DEBUG("%s: OID_GEN_BROADCAST_BYTES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -470,7 +471,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_BROADCAST_FRAMES_XMIT: DEBUG("%s: OID_GEN_BROADCAST_FRAMES_XMIT\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -479,19 +480,19 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_DIRECTED_BYTES_RCV: DEBUG("%s: OID_GEN_DIRECTED_BYTES_RCV\n", __FUNCTION__); *outbuf = __constant_cpu_to_le32 (0); retval = 0; break; - + case OID_GEN_DIRECTED_FRAMES_RCV: DEBUG("%s: OID_GEN_DIRECTED_FRAMES_RCV\n", __FUNCTION__); *outbuf = __constant_cpu_to_le32 (0); retval = 0; break; - + case OID_GEN_MULTICAST_BYTES_RCV: DEBUG("%s: OID_GEN_MULTICAST_BYTES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -500,7 +501,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_MULTICAST_FRAMES_RCV: DEBUG("%s: OID_GEN_MULTICAST_FRAMES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -509,7 +510,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_BROADCAST_BYTES_RCV: DEBUG("%s: OID_GEN_BROADCAST_BYTES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -518,7 +519,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_BROADCAST_FRAMES_RCV: DEBUG("%s: OID_GEN_BROADCAST_FRAMES_RCV\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -527,7 +528,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_RCV_CRC_ERROR: DEBUG("%s: OID_GEN_RCV_CRC_ERROR\n", __FUNCTION__); if (rndis_per_dev_params [configNr].stats) { @@ -536,7 +537,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + case OID_GEN_TRANSMIT_QUEUE_LENGTH: DEBUG("%s: OID_GEN_TRANSMIT_QUEUE_LENGTH\n", __FUNCTION__); *outbuf = __constant_cpu_to_le32 (0); @@ -557,7 +558,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_802_3_CURRENT_ADDRESS: DEBUG("%s: OID_802_3_CURRENT_ADDRESS\n", __FUNCTION__); @@ -569,7 +570,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_802_3_MULTICAST_LIST: DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); @@ -577,7 +578,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, *outbuf = __constant_cpu_to_le32 (0xE0000000); retval = 0; break; - + /* mandatory */ case OID_802_3_MAXIMUM_LIST_SIZE: DEBUG("%s: OID_802_3_MAXIMUM_LIST_SIZE\n", __FUNCTION__); @@ -585,7 +586,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, *outbuf = __constant_cpu_to_le32 (1); retval = 0; break; - + case OID_802_3_MAC_OPTIONS: DEBUG("%s: OID_802_3_MAC_OPTIONS\n", __FUNCTION__); break; @@ -601,56 +602,56 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, retval = 0; } break; - + /* mandatory */ case OID_802_3_XMIT_ONE_COLLISION: DEBUG("%s: OID_802_3_XMIT_ONE_COLLISION\n", __FUNCTION__); *outbuf = __constant_cpu_to_le32 (0); retval = 0; break; - + /* mandatory */ case OID_802_3_XMIT_MORE_COLLISIONS: DEBUG("%s: OID_802_3_XMIT_MORE_COLLISIONS\n", __FUNCTION__); *outbuf = __constant_cpu_to_le32 (0); retval = 0; break; - + #ifdef RNDIS_OPTIONAL_STATS case OID_802_3_XMIT_DEFERRED: DEBUG("%s: OID_802_3_XMIT_DEFERRED\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_XMIT_MAX_COLLISIONS: DEBUG("%s: OID_802_3_XMIT_MAX_COLLISIONS\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_RCV_OVERRUN: DEBUG("%s: OID_802_3_RCV_OVERRUN\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_XMIT_UNDERRUN: DEBUG("%s: OID_802_3_XMIT_UNDERRUN\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_XMIT_HEARTBEAT_FAILURE: DEBUG("%s: OID_802_3_XMIT_HEARTBEAT_FAILURE\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_XMIT_TIMES_CRS_LOST: DEBUG("%s: OID_802_3_XMIT_TIMES_CRS_LOST\n", __FUNCTION__); /* TODO */ break; - + case OID_802_3_XMIT_LATE_COLLISIONS: DEBUG("%s: OID_802_3_XMIT_LATE_COLLISIONS\n", __FUNCTION__); /* TODO */ - break; + break; #endif /* RNDIS_OPTIONAL_STATS */ #ifdef RNDIS_PM @@ -675,23 +676,23 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, #endif default: - printk (KERN_WARNING "%s: query unknown OID 0x%08X\n", + printk (KERN_WARNING "%s: query unknown OID 0x%08X\n", __FUNCTION__, OID); } if (retval < 0) length = 0; - + resp->InformationBufferLength = cpu_to_le32 (length); r->length = length + sizeof *resp; resp->MessageLength = cpu_to_le32 (r->length); return retval; } -static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len, - rndis_resp_t *r) +static int gen_ndis_set_resp (u8 configNr, u32 OID, u8 *buf, u32 buf_len, + rndis_resp_t *r) { rndis_set_cmplt_type *resp; - int i, retval = -ENOTSUPP; + int i, retval = -ENOTSUPP; struct rndis_params *params; if (!r) @@ -744,9 +745,9 @@ update_linkstate: netif_stop_queue (params->dev); } break; - + case OID_802_3_MULTICAST_LIST: - /* I think we can ignore this */ + /* I think we can ignore this */ DEBUG("%s: OID_802_3_MULTICAST_LIST\n", __FUNCTION__); retval = 0; break; @@ -795,29 +796,29 @@ update_linkstate: #endif /* RNDIS_PM */ default: - printk (KERN_WARNING "%s: set unknown OID 0x%08X, size %d\n", + printk (KERN_WARNING "%s: set unknown OID 0x%08X, size %d\n", __FUNCTION__, OID, buf_len); } - + return retval; } -/* - * Response Functions +/* + * Response Functions */ static int rndis_init_response (int configNr, rndis_init_msg_type *buf) { - rndis_init_cmplt_type *resp; + rndis_init_cmplt_type *resp; rndis_resp_t *r; - + if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; - + r = rndis_add_response (configNr, sizeof (rndis_init_cmplt_type)); if (!r) return -ENOMEM; resp = (rndis_init_cmplt_type *) r->buf; - + resp->MessageType = __constant_cpu_to_le32 ( REMOTE_NDIS_INITIALIZE_CMPLT); resp->MessageLength = __constant_cpu_to_le32 (52); @@ -836,11 +837,11 @@ static int rndis_init_response (int configNr, rndis_init_msg_type *buf) resp->PacketAlignmentFactor = __constant_cpu_to_le32 (0); resp->AFListOffset = __constant_cpu_to_le32 (0); resp->AFListSize = __constant_cpu_to_le32 (0); - + if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); - + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); + return 0; } @@ -848,10 +849,10 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) { rndis_query_cmplt_type *resp; rndis_resp_t *r; - + // DEBUG("%s: OID = %08X\n", __FUNCTION__, cpu_to_le32(buf->OID)); if (!rndis_per_dev_params [configNr].dev) return -ENOTSUPP; - + /* * we need more memory: * gen_ndis_query_resp expects enough space for @@ -863,10 +864,10 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) if (!r) return -ENOMEM; resp = (rndis_query_cmplt_type *) r->buf; - + resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_QUERY_CMPLT); resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ - + if (gen_ndis_query_resp (configNr, le32_to_cpu (buf->OID), le32_to_cpu(buf->InformationBufferOffset) + 8 + (u8 *) buf, @@ -880,10 +881,10 @@ static int rndis_query_response (int configNr, rndis_query_msg_type *buf) resp->InformationBufferOffset = __constant_cpu_to_le32 (0); } else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); - + if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); return 0; } @@ -892,7 +893,7 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf) u32 BufLength, BufOffset; rndis_set_cmplt_type *resp; rndis_resp_t *r; - + r = rndis_add_response (configNr, sizeof (rndis_set_cmplt_type)); if (!r) return -ENOMEM; @@ -905,27 +906,26 @@ static int rndis_set_response (int configNr, rndis_set_msg_type *buf) DEBUG("%s: Length: %d\n", __FUNCTION__, BufLength); DEBUG("%s: Offset: %d\n", __FUNCTION__, BufOffset); DEBUG("%s: InfoBuffer: ", __FUNCTION__); - + for (i = 0; i < BufLength; i++) { DEBUG ("%02x ", *(((u8 *) buf) + i + 8 + BufOffset)); } - + DEBUG ("\n"); #endif - + resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_SET_CMPLT); resp->MessageLength = __constant_cpu_to_le32 (16); resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ - if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID), - ((u8 *) buf) + 8 + BufOffset, BufLength, r)) - resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED); - else - resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); - + if (gen_ndis_set_resp (configNr, le32_to_cpu (buf->OID), + ((u8 *) buf) + 8 + BufOffset, BufLength, r)) + resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_NOT_SUPPORTED); + else resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); + if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); - + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); + return 0; } @@ -933,27 +933,27 @@ static int rndis_reset_response (int configNr, rndis_reset_msg_type *buf) { rndis_reset_cmplt_type *resp; rndis_resp_t *r; - + r = rndis_add_response (configNr, sizeof (rndis_reset_cmplt_type)); if (!r) return -ENOMEM; resp = (rndis_reset_cmplt_type *) r->buf; - + resp->MessageType = __constant_cpu_to_le32 (REMOTE_NDIS_RESET_CMPLT); resp->MessageLength = __constant_cpu_to_le32 (16); resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); /* resent information */ resp->AddressingReset = __constant_cpu_to_le32 (1); - + if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); return 0; } static int rndis_keepalive_response (int configNr, - rndis_keepalive_msg_type *buf) + rndis_keepalive_msg_type *buf) { rndis_keepalive_cmplt_type *resp; rndis_resp_t *r; @@ -964,48 +964,48 @@ static int rndis_keepalive_response (int configNr, if (!r) return -ENOMEM; resp = (rndis_keepalive_cmplt_type *) r->buf; - + resp->MessageType = __constant_cpu_to_le32 ( REMOTE_NDIS_KEEPALIVE_CMPLT); resp->MessageLength = __constant_cpu_to_le32 (16); resp->RequestID = buf->RequestID; /* Still LE in msg buffer */ resp->Status = __constant_cpu_to_le32 (RNDIS_STATUS_SUCCESS); - + if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); - + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); + return 0; } -/* - * Device to Host Comunication +/* + * Device to Host Comunication */ static int rndis_indicate_status_msg (int configNr, u32 status) { - rndis_indicate_status_msg_type *resp; + rndis_indicate_status_msg_type *resp; rndis_resp_t *r; - + if (rndis_per_dev_params [configNr].state == RNDIS_UNINITIALIZED) - return -ENOTSUPP; - - r = rndis_add_response (configNr, + return -ENOTSUPP; + + r = rndis_add_response (configNr, sizeof (rndis_indicate_status_msg_type)); if (!r) return -ENOMEM; resp = (rndis_indicate_status_msg_type *) r->buf; - + resp->MessageType = __constant_cpu_to_le32 ( REMOTE_NDIS_INDICATE_STATUS_MSG); resp->MessageLength = __constant_cpu_to_le32 (20); resp->Status = cpu_to_le32 (status); resp->StatusBufferLength = __constant_cpu_to_le32 (0); resp->StatusBufferOffset = __constant_cpu_to_le32 (0); - - if (rndis_per_dev_params [configNr].ack) - rndis_per_dev_params [configNr].ack ( - rndis_per_dev_params [configNr].dev); + + if (rndis_per_dev_params [configNr].ack) + rndis_per_dev_params [configNr].ack ( + rndis_per_dev_params [configNr].dev); return 0; } @@ -1013,7 +1013,7 @@ int rndis_signal_connect (int configNr) { rndis_per_dev_params [configNr].media_state = NDIS_MEDIA_STATE_CONNECTED; - return rndis_indicate_status_msg (configNr, + return rndis_indicate_status_msg (configNr, RNDIS_STATUS_MEDIA_CONNECT); } @@ -1045,26 +1045,26 @@ void rndis_set_host_mac (int configNr, const u8 *addr) rndis_per_dev_params [configNr].host_mac = addr; } -/* - * Message Parser +/* + * Message Parser */ int rndis_msg_parser (u8 configNr, u8 *buf) { u32 MsgType, MsgLength; __le32 *tmp; struct rndis_params *params; - + if (!buf) return -ENOMEM; - - tmp = (__le32 *) buf; + + tmp = (__le32 *) buf; MsgType = le32_to_cpup(tmp++); MsgLength = le32_to_cpup(tmp++); - + if (configNr >= RNDIS_MAX_CONFIGS) return -ENOTSUPP; params = &rndis_per_dev_params [configNr]; - + /* NOTE: RNDIS is *EXTREMELY* chatty ... Windows constantly polls for * rx/tx statistics and link status, in addition to KEEPALIVE traffic * and normal HC level polling to see if there's any IN traffic. @@ -1073,12 +1073,12 @@ int rndis_msg_parser (u8 configNr, u8 *buf) /* For USB: responses may take up to 10 seconds */ switch (MsgType) { case REMOTE_NDIS_INITIALIZE_MSG: - DEBUG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", + DEBUG("%s: REMOTE_NDIS_INITIALIZE_MSG\n", __FUNCTION__ ); params->state = RNDIS_INITIALIZED; return rndis_init_response (configNr, - (rndis_init_msg_type *) buf); - + (rndis_init_msg_type *) buf); + case REMOTE_NDIS_HALT_MSG: DEBUG("%s: REMOTE_NDIS_HALT_MSG\n", __FUNCTION__ ); @@ -1088,37 +1088,37 @@ int rndis_msg_parser (u8 configNr, u8 *buf) netif_stop_queue (params->dev); } return 0; - + case REMOTE_NDIS_QUERY_MSG: - return rndis_query_response (configNr, - (rndis_query_msg_type *) buf); - + return rndis_query_response (configNr, + (rndis_query_msg_type *) buf); + case REMOTE_NDIS_SET_MSG: - return rndis_set_response (configNr, - (rndis_set_msg_type *) buf); - + return rndis_set_response (configNr, + (rndis_set_msg_type *) buf); + case REMOTE_NDIS_RESET_MSG: - DEBUG("%s: REMOTE_NDIS_RESET_MSG\n", + DEBUG("%s: REMOTE_NDIS_RESET_MSG\n", __FUNCTION__ ); return rndis_reset_response (configNr, - (rndis_reset_msg_type *) buf); + (rndis_reset_msg_type *) buf); case REMOTE_NDIS_KEEPALIVE_MSG: /* For USB: host does this every 5 seconds */ if (rndis_debug > 1) - DEBUG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", + DEBUG("%s: REMOTE_NDIS_KEEPALIVE_MSG\n", __FUNCTION__ ); return rndis_keepalive_response (configNr, - (rndis_keepalive_msg_type *) + (rndis_keepalive_msg_type *) buf); - - default: + + default: /* At least Windows XP emits some undefined RNDIS messages. * In one case those messages seemed to relate to the host * suspending itself. */ printk (KERN_WARNING - "%s: unknown RNDIS message 0x%08X len %d\n", + "%s: unknown RNDIS message 0x%08X len %d\n", __FUNCTION__ , MsgType, MsgLength); { unsigned i; @@ -1142,14 +1142,14 @@ int rndis_msg_parser (u8 configNr, u8 *buf) } break; } - + return -ENOTSUPP; } int rndis_register (int (* rndis_control_ack) (struct net_device *)) { u8 i; - + for (i = 0; i < RNDIS_MAX_CONFIGS; i++) { if (!rndis_per_dev_params [i].used) { rndis_per_dev_params [i].used = 1; @@ -1159,32 +1159,32 @@ int rndis_register (int (* rndis_control_ack) (struct net_device *)) } } DEBUG("failed\n"); - + return -1; } void rndis_deregister (int configNr) { DEBUG("%s: \n", __FUNCTION__ ); - + if (configNr >= RNDIS_MAX_CONFIGS) return; rndis_per_dev_params [configNr].used = 0; - + return; } -int rndis_set_param_dev (u8 configNr, struct net_device *dev, +int rndis_set_param_dev (u8 configNr, struct net_device *dev, struct net_device_stats *stats, u16 *cdc_filter) { DEBUG("%s:\n", __FUNCTION__ ); if (!dev || !stats) return -1; if (configNr >= RNDIS_MAX_CONFIGS) return -1; - + rndis_per_dev_params [configNr].dev = dev; rndis_per_dev_params [configNr].stats = stats; rndis_per_dev_params [configNr].filter = cdc_filter; - + return 0; } @@ -1193,10 +1193,10 @@ int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr) DEBUG("%s:\n", __FUNCTION__ ); if (!vendorDescr) return -1; if (configNr >= RNDIS_MAX_CONFIGS) return -1; - + rndis_per_dev_params [configNr].vendorID = vendorID; rndis_per_dev_params [configNr].vendorDescr = vendorDescr; - + return 0; } @@ -1204,10 +1204,10 @@ int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed) { DEBUG("%s: %u %u\n", __FUNCTION__, medium, speed); if (configNr >= RNDIS_MAX_CONFIGS) return -1; - + rndis_per_dev_params [configNr].medium = medium; rndis_per_dev_params [configNr].speed = speed; - + return 0; } @@ -1229,9 +1229,9 @@ void rndis_free_response (int configNr, u8 *buf) { rndis_resp_t *r; struct list_head *act, *tmp; - - list_for_each_safe (act, tmp, - &(rndis_per_dev_params [configNr].resp_queue)) + + list_for_each_safe (act, tmp, + &(rndis_per_dev_params [configNr].resp_queue)) { r = list_entry (act, rndis_resp_t, list); if (r && r->buf == buf) { @@ -1244,12 +1244,12 @@ void rndis_free_response (int configNr, u8 *buf) u8 *rndis_get_next_response (int configNr, u32 *length) { rndis_resp_t *r; - struct list_head *act, *tmp; - + struct list_head *act, *tmp; + if (!length) return NULL; - - list_for_each_safe (act, tmp, - &(rndis_per_dev_params [configNr].resp_queue)) + + list_for_each_safe (act, tmp, + &(rndis_per_dev_params [configNr].resp_queue)) { r = list_entry (act, rndis_resp_t, list); if (!r->send) { @@ -1258,24 +1258,24 @@ u8 *rndis_get_next_response (int configNr, u32 *length) return r->buf; } } - + return NULL; } static rndis_resp_t *rndis_add_response (int configNr, u32 length) { rndis_resp_t *r; - + /* NOTE: this gets copied into ether.c USB_BUFSIZ bytes ... */ r = kmalloc (sizeof (rndis_resp_t) + length, GFP_ATOMIC); if (!r) return NULL; - + r->buf = (u8 *) (r + 1); r->length = length; r->send = 0; - - list_add_tail (&r->list, - &(rndis_per_dev_params [configNr].resp_queue)); + + list_add_tail (&r->list, + &(rndis_per_dev_params [configNr].resp_queue)); return r; } @@ -1301,14 +1301,14 @@ int rndis_rm_hdr(struct sk_buff *skb) #ifdef CONFIG_USB_GADGET_DEBUG_FILES -static int rndis_proc_read (char *page, char **start, off_t off, int count, int *eof, - void *data) +static int rndis_proc_read (char *page, char **start, off_t off, int count, int *eof, + void *data) { char *out = page; int len; rndis_params *param = (rndis_params *) data; - - out += snprintf (out, count, + + out += snprintf (out, count, "Config Nr. %d\n" "used : %s\n" "state : %s\n" @@ -1316,8 +1316,8 @@ static int rndis_proc_read (char *page, char **start, off_t off, int count, int "speed : %d\n" "cable : %s\n" "vendor ID : 0x%08X\n" - "vendor : %s\n", - param->confignr, (param->used) ? "y" : "n", + "vendor : %s\n", + param->confignr, (param->used) ? "y" : "n", ({ char *s = "?"; switch (param->state) { case RNDIS_UNINITIALIZED: @@ -1327,32 +1327,32 @@ static int rndis_proc_read (char *page, char **start, off_t off, int count, int case RNDIS_DATA_INITIALIZED: s = "RNDIS_DATA_INITIALIZED"; break; }; s; }), - param->medium, - (param->media_state) ? 0 : param->speed*100, + param->medium, + (param->media_state) ? 0 : param->speed*100, (param->media_state) ? "disconnected" : "connected", - param->vendorID, param->vendorDescr); - + param->vendorID, param->vendorDescr); + len = out - page; len -= off; - + if (len < count) { *eof = 1; if (len <= 0) return 0; } else len = count; - + *start = page + off; return len; } -static int rndis_proc_write (struct file *file, const char __user *buffer, - unsigned long count, void *data) +static int rndis_proc_write (struct file *file, const char __user *buffer, + unsigned long count, void *data) { rndis_params *p = data; u32 speed = 0; int i, fl_speed = 0; - + for (i = 0; i < count; i++) { char c; if (get_user(c, buffer)) @@ -1379,15 +1379,15 @@ static int rndis_proc_write (struct file *file, const char __user *buffer, case 'd': rndis_signal_disconnect(p->confignr); break; - default: + default: if (fl_speed) p->speed = speed; else DEBUG ("%c is not valid\n", c); break; } - + buffer++; } - + return count; } @@ -1398,7 +1398,7 @@ static struct proc_dir_entry *rndis_connect_state [RNDIS_MAX_CONFIGS]; #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ -int __devinit rndis_init (void) +int __init rndis_init (void) { u8 i; @@ -1408,7 +1408,7 @@ int __devinit rndis_init (void) sprintf (name, NAME_TEMPLATE, i); if (!(rndis_connect_state [i] - = create_proc_entry (name, 0660, NULL))) + = create_proc_entry (name, 0660, NULL))) { DEBUG ("%s :remove entries", __FUNCTION__); while (i) { @@ -1432,7 +1432,7 @@ int __devinit rndis_init (void) = NDIS_MEDIA_STATE_DISCONNECTED; INIT_LIST_HEAD (&(rndis_per_dev_params [i].resp_queue)); } - + return 0; } @@ -1441,7 +1441,7 @@ void rndis_exit (void) #ifdef CONFIG_USB_GADGET_DEBUG_FILES u8 i; char name [20]; - + for (i = 0; i < RNDIS_MAX_CONFIGS; i++) { sprintf (name, NAME_TEMPLATE, i); remove_proc_entry (name, NULL); diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 4c3c7259f..95b4c6326 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -1,15 +1,15 @@ -/* +/* * RNDIS Definitions for Remote NDIS - * + * * Version: $Id: rndis.h,v 1.15 2004/03/25 21:33:46 robert Exp $ - * + * * Authors: Benedikt Spranger, Pengutronix - * Robert Schwebel, Pengutronix - * - * This program is free software; you can redistribute it and/or + * Robert Schwebel, Pengutronix + * + * 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. - * + * version 2, as published by the Free Software Foundation. + * * This software was originally developed in conformance with * Microsoft's Remote NDIS Specification License Agreement. */ @@ -34,7 +34,7 @@ #define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BU /* Device connected */ #define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CU /* Device disconnected */ /* For all not specified status messages: - * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx + * RNDIS_STATUS_Xxx -> NDIS_STATUS_Xxx */ /* Message Set for Connectionless (802.3) Devices */ @@ -69,7 +69,7 @@ #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 -typedef struct rndis_init_msg_type +typedef struct rndis_init_msg_type { __le32 MessageType; __le32 MessageLength; @@ -234,12 +234,12 @@ typedef struct rndis_params const u8 *host_mac; u16 *filter; - struct net_device *dev; + struct net_device *dev; struct net_device_stats *stats; u32 vendorID; const char *vendorDescr; - int (*ack) (struct net_device *); + int (*ack) (struct net_device *); struct list_head resp_queue; } rndis_params; @@ -250,7 +250,7 @@ void rndis_deregister (int configNr); int rndis_set_param_dev (u8 configNr, struct net_device *dev, struct net_device_stats *stats, u16 *cdc_filter); -int rndis_set_param_vendor (u8 configNr, u32 vendorID, +int rndis_set_param_vendor (u8 configNr, u32 vendorID, const char *vendorDescr); int rndis_set_param_medium (u8 configNr, u32 medium, u32 speed); void rndis_add_hdr (struct sk_buff *skb); @@ -264,7 +264,7 @@ int rndis_signal_disconnect (int configNr); int rndis_state (int configNr); extern void rndis_set_host_mac (int configNr, const u8 *addr); -int __devinit rndis_init (void); +int __init rndis_init (void); void rndis_exit (void); #endif /* _LINUX_RNDIS_H */ diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index e762aa19a..b992546c3 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -44,16 +45,88 @@ #include #include -#include +#include #include #include "gadget_chips.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 "v2.2" -#define GS_VERSION_NUM 0x0202 +#define GS_VERSION_STR "v2.0" +#define GS_VERSION_NUM 0x0200 #define GS_LONG_NAME "Gadget Serial" #define GS_SHORT_NAME "g_serial" @@ -587,11 +660,12 @@ static int __init gs_module_init(void) 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_DYNAMIC_DEV; + 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); @@ -769,19 +843,9 @@ exit_unlock_dev: /* * gs_close */ - -#define GS_WRITE_FINISHED_EVENT_SAFELY(p) \ -({ \ - int cond; \ - \ - spin_lock_irq(&(p)->port_lock); \ - cond = !(p)->port_dev || !gs_buf_data_avail((p)->port_write_buf); \ - spin_unlock_irq(&(p)->port_lock); \ - cond; \ -}) - static void gs_close(struct tty_struct *tty, struct file *file) { + unsigned long flags; struct gs_port *port = tty->driver_data; struct semaphore *sem; @@ -795,7 +859,7 @@ static void gs_close(struct tty_struct *tty, struct file *file) sem = &gs_open_close_sem[port->port_num]; down(sem); - spin_lock_irq(&port->port_lock); + spin_lock_irqsave(&port->port_lock, flags); if (port->port_open_count == 0) { printk(KERN_ERR @@ -823,11 +887,12 @@ static void gs_close(struct tty_struct *tty, struct file *file) /* wait for write buffer to drain, or */ /* at most GS_CLOSE_TIMEOUT seconds */ if (gs_buf_data_avail(port->port_write_buf) > 0) { - spin_unlock_irq(&port->port_lock); - wait_event_interruptible_timeout(port->port_write_wait, - GS_WRITE_FINISHED_EVENT_SAFELY(port), - GS_CLOSE_TIMEOUT * HZ); - spin_lock_irq(&port->port_lock); + spin_unlock_irqrestore(&port->port_lock, flags); + 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); + spin_lock_irqsave(&port->port_lock, flags); } /* free disconnected port on final close */ @@ -847,7 +912,7 @@ static void gs_close(struct tty_struct *tty, struct file *file) port->port_num, tty, file); exit: - spin_unlock_irq(&port->port_lock); + spin_unlock_irqrestore(&port->port_lock, flags); up(sem); } @@ -1473,7 +1538,7 @@ autoconf_fail: * Called on module unload. Frees the control request and device * structure. */ -static void /* __init_or_exit */ gs_unbind(struct usb_gadget *gadget) +static void __exit gs_unbind(struct usb_gadget *gadget) { struct gs_dev *dev = get_gadget_data(gadget); diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index b7018ee48..68e3d8f5d 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -62,6 +62,7 @@ #define DEBUG 1 // #define VERBOSE +#include #include #include #include @@ -1121,7 +1122,7 @@ zero_autoresume (unsigned long _dev) /*-------------------------------------------------------------------------*/ -static void /* __init_or_exit */ +static void __exit zero_unbind (struct usb_gadget *gadget) { struct zero_dev *dev = get_gadget_data (gadget); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index b93d71d28..e27b79a3c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -47,29 +47,12 @@ config USB_EHCI_ROOT_HUB_TT controller is needed. It's safe to say "y" even if your controller doesn't support this feature. - This supports the EHCI implementation that's originally - from ARC, and has since changed hands a few times. - -config USB_EHCI_TT_NEWSCHED - bool "Improved Transaction Translator scheduling (EXPERIMENTAL)" - depends on USB_EHCI_HCD && EXPERIMENTAL - ---help--- - This changes the periodic scheduling code to fill more of the low - and full speed bandwidth available from the Transaction Translator - (TT) in USB 2.0 hubs. Without this, only one transfer will be - issued in each microframe, significantly reducing the number of - periodic low/fullspeed transfers possible. - - If you have multiple periodic low/fullspeed devices connected to a - highspeed USB hub which is connected to a highspeed USB Host - Controller, and some of those devices will not work correctly - (possibly due to "ENOSPC" or "-28" errors), say Y. - - If unsure, say N. + This supports the EHCI implementation from TransDimension Inc. config USB_ISP116X_HCD tristate "ISP116X HCD support" depends on USB + default N ---help--- The ISP1160 and ISP1161 chips are USB host controllers. Enable this option if your board has this chip. If unsure, say N. @@ -144,6 +127,7 @@ config USB_UHCI_HCD config USB_SL811_HCD tristate "SL811HS HCD support" depends on USB + default N help The SL811HS is a single-port USB controller that supports either host side or peripheral side roles. Enable this option if your @@ -156,6 +140,7 @@ config USB_SL811_HCD config USB_SL811_CS tristate "CF/PCMCIA support for SL811HS HCD" depends on USB_SL811_HCD && PCMCIA + default N help Wraps a PCMCIA driver around the SL811HS HCD, supporting the RATOC REX-CFU1U CF card (often used with PDAs). If unsure, say N. diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 26ed757d2..63eadeec1 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c @@ -16,6 +16,10 @@ #include #include +#ifndef CONFIG_SOC_AU1200 +#error "this Alchemy chip doesn't have EHCI" +#else /* Au1200 */ + #define USB_HOST_CONFIG (USB_MSR_BASE + USB_MSR_MCFG) #define USB_MCFG_PFEN (1<<31) #define USB_MCFG_RDCOMB (1<<30) @@ -41,6 +45,8 @@ #endif #define USBH_DISABLE (USB_MCFG_EBMEN | USB_MCFG_EMEMEN) +#endif /* Au1200 */ + extern int usb_disabled(void); /*-------------------------------------------------------------------------*/ @@ -105,9 +111,9 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver, /* Au1200 AB USB does not support coherent memory */ if (!(read_c0_prid() & 0xff)) { - pr_info("%s: this is chip revision AB!\n", dev->name); + pr_info("%s: this is chip revision AB!\n", dev->dev.name); pr_info("%s: update your board or re-configure the kernel\n", - dev->name); + dev->dev.name); return -ENODEV; } #endif @@ -146,7 +152,7 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver, /* ehci_hcd_init(hcd_to_ehci(hcd)); */ retval = - usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED); + usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); if (retval == 0) return retval; @@ -226,8 +232,9 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { /*-------------------------------------------------------------------------*/ -static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) +static int ehci_hcd_au1xxx_drv_probe(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); struct usb_hcd *hcd = NULL; int ret; @@ -240,9 +247,10 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) return ret; } -static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev) +static int ehci_hcd_au1xxx_drv_remove(struct device *dev) { - struct usb_hcd *hcd = platform_get_drvdata(pdev); + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = dev_get_drvdata(dev); usb_ehci_au1xxx_remove(hcd, pdev); return 0; @@ -264,14 +272,26 @@ static int ehci_hcd_au1xxx_drv_resume(struct device *dev) return 0; } */ -MODULE_ALIAS("au1xxx-ehci"); -static struct platform_driver ehci_hcd_au1xxx_driver = { +static struct device_driver ehci_hcd_au1xxx_driver = { + .name = "au1xxx-ehci", + .bus = &platform_bus_type, .probe = ehci_hcd_au1xxx_drv_probe, .remove = ehci_hcd_au1xxx_drv_remove, /*.suspend = ehci_hcd_au1xxx_drv_suspend, */ /*.resume = ehci_hcd_au1xxx_drv_resume, */ - .driver = { - .name = "au1xxx-ehci", - .bus = &platform_bus_type - } }; + +static int __init ehci_hcd_au1xxx_init(void) +{ + pr_debug(DRIVER_INFO " (Au1xxx)\n"); + + return driver_register(&ehci_hcd_au1xxx_driver); +} + +static void __exit ehci_hcd_au1xxx_cleanup(void) +{ + driver_unregister(&ehci_hcd_au1xxx_driver); +} + +module_init(ehci_hcd_au1xxx_init); +module_exit(ehci_hcd_au1xxx_cleanup); diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index d030516ed..f985f121a 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -121,7 +121,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, temp = in_le32(hcd->regs + 0x1a8); out_le32(hcd->regs + 0x1a8, temp | 0x3); - retval = usb_add_hcd(hcd, irq, IRQF_SHARED); + retval = usb_add_hcd(hcd, irq, SA_SHIRQ); if (retval != 0) goto err4; return retval; @@ -324,12 +324,43 @@ static int ehci_fsl_drv_remove(struct platform_device *pdev) return 0; } -MODULE_ALIAS("fsl-ehci"); +static struct platform_driver ehci_fsl_dr_driver = { + .probe = ehci_fsl_drv_probe, + .remove = ehci_fsl_drv_remove, + .driver = { + .name = "fsl-usb2-dr", + }, +}; -static struct platform_driver ehci_fsl_driver = { +static struct platform_driver ehci_fsl_mph_driver = { .probe = ehci_fsl_drv_probe, .remove = ehci_fsl_drv_remove, .driver = { - .name = "fsl-ehci", + .name = "fsl-usb2-mph", }, }; + +static int __init ehci_fsl_init(void) +{ + int retval; + + pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", + hcd_name, + sizeof(struct ehci_qh), sizeof(struct ehci_qtd), + sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); + + retval = platform_driver_register(&ehci_fsl_dr_driver); + if (retval) + return retval; + + return platform_driver_register(&ehci_fsl_mph_driver); +} + +static void __exit ehci_fsl_cleanup(void) +{ + platform_driver_unregister(&ehci_fsl_mph_driver); + platform_driver_unregister(&ehci_fsl_dr_driver); +} + +module_init(ehci_fsl_init); +module_exit(ehci_fsl_cleanup); diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index d63177a8e..79f2d8b9b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -16,6 +16,7 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -625,11 +626,10 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) writel (status | CMD_RUN, &ehci->regs->command); while (i--) { - int pstatus = readl (&ehci->regs->port_status [i]); - - if (pstatus & PORT_OWNER) + status = readl (&ehci->regs->port_status [i]); + if (status & PORT_OWNER) continue; - if (!(pstatus & PORT_RESUME) + if (!(status & PORT_RESUME) || ehci->reset_done [i] != 0) continue; @@ -889,59 +889,19 @@ MODULE_LICENSE ("GPL"); #ifdef CONFIG_PCI #include "ehci-pci.c" -#define PCI_DRIVER ehci_pci_driver +#define EHCI_BUS_GLUED #endif -#ifdef CONFIG_MPC834x +#ifdef CONFIG_PPC_83xx #include "ehci-fsl.c" -#define PLATFORM_DRIVER ehci_fsl_driver +#define EHCI_BUS_GLUED #endif -#ifdef CONFIG_SOC_AU1200 +#ifdef CONFIG_SOC_AU1X00 #include "ehci-au1xxx.c" -#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver +#define EHCI_BUS_GLUED #endif -#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) +#ifndef EHCI_BUS_GLUED #error "missing bus glue for ehci-hcd" #endif - -static int __init ehci_hcd_init(void) -{ - int retval = 0; - - pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", - hcd_name, - sizeof(struct ehci_qh), sizeof(struct ehci_qtd), - sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); - -#ifdef PLATFORM_DRIVER - retval = platform_driver_register(&PLATFORM_DRIVER); - if (retval < 0) - return retval; -#endif - -#ifdef PCI_DRIVER - retval = pci_register_driver(&PCI_DRIVER); - if (retval < 0) { -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); -#endif - } -#endif - - return retval; -} -module_init(ehci_hcd_init); - -static void __exit ehci_hcd_cleanup(void) -{ -#ifdef PLATFORM_DRIVER - platform_driver_unregister(&PLATFORM_DRIVER); -#endif -#ifdef PCI_DRIVER - pci_unregister_driver(&PCI_DRIVER); -#endif -} -module_exit(ehci_hcd_cleanup); - diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index cadffacd9..a1bd2bea6 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -76,30 +76,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd) dbg_hcs_params(ehci, "reset"); dbg_hcc_params(ehci, "reset"); - /* ehci_init() causes memory for DMA transfers to be - * allocated. Thus, any vendor-specific workarounds based on - * limiting the type of memory used for DMA transfers must - * happen before ehci_init() is called. */ - switch (pdev->vendor) { - case PCI_VENDOR_ID_NVIDIA: - /* NVidia reports that certain chips don't handle - * QH, ITD, or SITD addresses above 2GB. (But TD, - * data buffer, and periodic schedule are normal.) - */ - switch (pdev->device) { - case 0x003c: /* MCP04 */ - case 0x005b: /* CK804 */ - case 0x00d8: /* CK8 */ - case 0x00e8: /* CK8S */ - if (pci_set_consistent_dma_mask(pdev, - DMA_31BIT_MASK) < 0) - ehci_warn(ehci, "can't enable NVidia " - "workaround for >2GB RAM\n"); - break; - } - break; - } - /* cache this readonly data; minimize chip reads */ ehci->hcs_params = readl(&ehci->caps->hcs_params); @@ -112,6 +88,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd) if (retval) return retval; + /* NOTE: only the parts below this line are PCI-specific */ + switch (pdev->vendor) { case PCI_VENDOR_ID_TDI: if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { @@ -129,6 +107,19 @@ static int ehci_pci_setup(struct usb_hcd *hcd) break; case PCI_VENDOR_ID_NVIDIA: switch (pdev->device) { + /* NVidia reports that certain chips don't handle + * QH, ITD, or SITD addresses above 2GB. (But TD, + * data buffer, and periodic schedule are normal.) + */ + case 0x003c: /* MCP04 */ + case 0x005b: /* CK804 */ + case 0x00d8: /* CK8 */ + case 0x00e8: /* CK8S */ + if (pci_set_consistent_dma_mask(pdev, + DMA_31BIT_MASK) < 0) + ehci_warn(ehci, "can't enable NVidia " + "workaround for >2GB RAM\n"); + break; /* Some NForce2 chips have problems with selective suspend; * fixed in newer silicon. */ @@ -379,3 +370,23 @@ static struct pci_driver ehci_pci_driver = { .resume = usb_hcd_pci_resume, #endif }; + +static int __init ehci_hcd_pci_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", + hcd_name, + sizeof(struct ehci_qh), sizeof(struct ehci_qtd), + sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); + + return pci_register_driver(&ehci_pci_driver); +} +module_init(ehci_hcd_pci_init); + +static void __exit ehci_hcd_pci_cleanup(void) +{ + pci_unregister_driver(&ehci_pci_driver); +} +module_exit(ehci_hcd_pci_cleanup); diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 4859900bd..5871944e6 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -163,190 +163,6 @@ static int same_tt (struct usb_device *dev1, struct usb_device *dev2) return 1; } -#ifdef CONFIG_USB_EHCI_TT_NEWSCHED - -/* Which uframe does the low/fullspeed transfer start in? - * - * The parameter is the mask of ssplits in "H-frame" terms - * and this returns the transfer start uframe in "B-frame" terms, - * which allows both to match, e.g. a ssplit in "H-frame" uframe 0 - * will cause a transfer in "B-frame" uframe 0. "B-frames" lag - * "H-frames" by 1 uframe. See the EHCI spec sec 4.5 and figure 4.7. - */ -static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __le32 mask) -{ - unsigned char smask = QH_SMASK & le32_to_cpu(mask); - if (!smask) { - ehci_err(ehci, "invalid empty smask!\n"); - /* uframe 7 can't have bw so this will indicate failure */ - return 7; - } - return ffs(smask) - 1; -} - -static const unsigned char -max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 }; - -/* carryover low/fullspeed bandwidth that crosses uframe boundries */ -static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8]) -{ - int i; - for (i=0; i<7; i++) { - if (max_tt_usecs[i] < tt_usecs[i]) { - tt_usecs[i+1] += tt_usecs[i] - max_tt_usecs[i]; - tt_usecs[i] = max_tt_usecs[i]; - } - } -} - -/* How many of the tt's periodic downstream 1000 usecs are allocated? - * - * While this measures the bandwidth in terms of usecs/uframe, - * the low/fullspeed bus has no notion of uframes, so any particular - * low/fullspeed transfer can "carry over" from one uframe to the next, - * since the TT just performs downstream transfers in sequence. - * - * For example two seperate 100 usec transfers can start in the same uframe, - * and the second one would "carry over" 75 usecs into the next uframe. - */ -static void -periodic_tt_usecs ( - struct ehci_hcd *ehci, - struct usb_device *dev, - unsigned frame, - unsigned short tt_usecs[8] -) -{ - __le32 *hw_p = &ehci->periodic [frame]; - union ehci_shadow *q = &ehci->pshadow [frame]; - unsigned char uf; - - memset(tt_usecs, 0, 16); - - while (q->ptr) { - switch (Q_NEXT_TYPE(*hw_p)) { - case Q_TYPE_ITD: - hw_p = &q->itd->hw_next; - q = &q->itd->itd_next; - continue; - case Q_TYPE_QH: - if (same_tt(dev, q->qh->dev)) { - uf = tt_start_uframe(ehci, q->qh->hw_info2); - tt_usecs[uf] += q->qh->tt_usecs; - } - hw_p = &q->qh->hw_next; - q = &q->qh->qh_next; - continue; - case Q_TYPE_SITD: - if (same_tt(dev, q->sitd->urb->dev)) { - uf = tt_start_uframe(ehci, q->sitd->hw_uframe); - tt_usecs[uf] += q->sitd->stream->tt_usecs; - } - hw_p = &q->sitd->hw_next; - q = &q->sitd->sitd_next; - continue; - // case Q_TYPE_FSTN: - default: - ehci_dbg(ehci, - "ignoring periodic frame %d FSTN\n", frame); - hw_p = &q->fstn->hw_next; - q = &q->fstn->fstn_next; - } - } - - carryover_tt_bandwidth(tt_usecs); - - if (max_tt_usecs[7] < tt_usecs[7]) - ehci_err(ehci, "frame %d tt sched overrun: %d usecs\n", - frame, tt_usecs[7] - max_tt_usecs[7]); -} - -/* - * Return true if the device's tt's downstream bus is available for a - * periodic transfer of the specified length (usecs), starting at the - * specified frame/uframe. Note that (as summarized in section 11.19 - * of the usb 2.0 spec) TTs can buffer multiple transactions for each - * uframe. - * - * The uframe parameter is when the fullspeed/lowspeed transfer - * should be executed in "B-frame" terms, which is the same as the - * highspeed ssplit's uframe (which is in "H-frame" terms). For example - * a ssplit in "H-frame" 0 causes a transfer in "B-frame" 0. - * See the EHCI spec sec 4.5 and fig 4.7. - * - * This checks if the full/lowspeed bus, at the specified starting uframe, - * has the specified bandwidth available, according to rules listed - * in USB 2.0 spec section 11.18.1 fig 11-60. - * - * This does not check if the transfer would exceed the max ssplit - * limit of 16, specified in USB 2.0 spec section 11.18.4 requirement #4, - * since proper scheduling limits ssplits to less than 16 per uframe. - */ -static int tt_available ( - struct ehci_hcd *ehci, - unsigned period, - struct usb_device *dev, - unsigned frame, - unsigned uframe, - u16 usecs -) -{ - if ((period == 0) || (uframe >= 7)) /* error */ - return 0; - - for (; frame < ehci->periodic_size; frame += period) { - unsigned short tt_usecs[8]; - - periodic_tt_usecs (ehci, dev, frame, tt_usecs); - - ehci_vdbg(ehci, "tt frame %d check %d usecs start uframe %d in" - " schedule %d/%d/%d/%d/%d/%d/%d/%d\n", - frame, usecs, uframe, - tt_usecs[0], tt_usecs[1], tt_usecs[2], tt_usecs[3], - tt_usecs[4], tt_usecs[5], tt_usecs[6], tt_usecs[7]); - - if (max_tt_usecs[uframe] <= tt_usecs[uframe]) { - ehci_vdbg(ehci, "frame %d uframe %d fully scheduled\n", - frame, uframe); - return 0; - } - - /* special case for isoc transfers larger than 125us: - * the first and each subsequent fully used uframe - * must be empty, so as to not illegally delay - * already scheduled transactions - */ - if (125 < usecs) { - int ufs = (usecs / 125) - 1; - int i; - for (i = uframe; i < (uframe + ufs) && i < 8; i++) - if (0 < tt_usecs[i]) { - ehci_vdbg(ehci, - "multi-uframe xfer can't fit " - "in frame %d uframe %d\n", - frame, i); - return 0; - } - } - - tt_usecs[uframe] += usecs; - - carryover_tt_bandwidth(tt_usecs); - - /* fail if the carryover pushed bw past the last uframe's limit */ - if (max_tt_usecs[7] < tt_usecs[7]) { - ehci_vdbg(ehci, - "tt unavailable usecs %d frame %d uframe %d\n", - usecs, frame, uframe); - return 0; - } - } - - return 1; -} - -#else - /* return true iff the device's transaction translator is available * for a periodic transfer starting at the specified frame, using * all the uframes in the mask. @@ -421,8 +237,6 @@ static int tt_no_collision ( return 1; } -#endif /* CONFIG_USB_EHCI_TT_NEWSCHED */ - /*-------------------------------------------------------------------------*/ static int enable_periodic (struct ehci_hcd *ehci) @@ -667,7 +481,7 @@ static int check_intr_schedule ( ) { int retval = -ENOSPC; - u8 mask = 0; + u8 mask; if (qh->c_usecs && uframe >= 6) /* FSTN territory? */ goto done; @@ -680,24 +494,6 @@ static int check_intr_schedule ( goto done; } -#ifdef CONFIG_USB_EHCI_TT_NEWSCHED - if (tt_available (ehci, qh->period, qh->dev, frame, uframe, - qh->tt_usecs)) { - unsigned i; - - /* TODO : this may need FSTN for SSPLIT in uframe 5. */ - for (i=uframe+1; i<8 && iperiod, qh->c_usecs)) - goto done; - else - mask |= 1 << i; - - retval = 0; - - *c_maskp = cpu_to_le32 (mask << 8); - } -#else /* Make sure this tt's buffer is also available for CSPLITs. * We pessimize a bit; probably the typical full speed case * doesn't need the second CSPLIT. @@ -718,7 +514,6 @@ static int check_intr_schedule ( goto done; retval = 0; } -#endif done: return retval; } @@ -1252,21 +1047,12 @@ sitd_slot_ok ( frame = uframe >> 3; uf = uframe & 7; -#ifdef CONFIG_USB_EHCI_TT_NEWSCHED - /* The tt's fullspeed bus bandwidth must be available. - * tt_available scheduling guarantees 10+% for control/bulk. - */ - if (!tt_available (ehci, period_uframes << 3, - stream->udev, frame, uf, stream->tt_usecs)) - return 0; -#else /* tt must be idle for start(s), any gap, and csplit. * assume scheduling slop leaves 10+% for control/bulk. */ if (!tt_no_collision (ehci, period_uframes << 3, stream->udev, frame, mask)) return 0; -#endif /* check starts (OUT uses more than one) */ max_used = 100 - stream->usecs; diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c index 61e571782..2fe7fd194 100644 --- a/drivers/usb/host/hc_crisv10.c +++ b/drivers/usb/host/hc_crisv10.c @@ -4,6 +4,7 @@ * Copyright (c) 2002, 2003 Axis Communications AB. */ +#include #include #include #include @@ -410,7 +411,8 @@ static inline void urb_list_move_last(struct urb *urb, int epid) urb_entry_t *urb_entry = __urb_list_entry(urb, epid); assert(urb_entry); - list_move_tail(&urb_entry->list, &urb_list[epid]); + list_del(&urb_entry->list); + list_add_tail(&urb_entry->list, &urb_list[epid]); } /* Get the next urb in the list. */ diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 8c6b38a0b..e99210b79 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include @@ -781,7 +781,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd, if (ep->branch < PERIODIC_SIZE) break; - ep->branch = ret = balance(isp116x, ep->period, ep->load); + ret = ep->branch = balance(isp116x, ep->period, ep->load); if (ret < 0) goto fail; ret = 0; @@ -1204,7 +1204,7 @@ static int isp116x_show_dbg(struct seq_file *s, void *unused) static int isp116x_open_seq(struct inode *inode, struct file *file) { - return single_open(file, isp116x_show_dbg, inode->i_private); + return single_open(file, isp116x_show_dbg, inode->u.generic_ip); } static struct file_operations isp116x_debug_fops = { @@ -1653,7 +1653,7 @@ static int __init isp116x_probe(struct platform_device *pdev) goto err6; } - ret = usb_add_hcd(hcd, irq, IRQF_DISABLED); + ret = usb_add_hcd(hcd, irq, SA_INTERRUPT); if (ret) goto err6; diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 85cc05970..6b7350b52 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -4,7 +4,7 @@ * Copyright (C) 2004 SAN People (Pty) Ltd. * Copyright (C) 2005 Thibaut VARENE * - * AT91 Bus Glue + * AT91RM9200 Bus Glue * * Based on fragments of 2.4 driver by Rick Bronson. * Based on ohci-omap.c @@ -19,13 +19,12 @@ #include #include -#ifndef CONFIG_ARCH_AT91 -#error "CONFIG_ARCH_AT91 must be defined." +#ifndef CONFIG_ARCH_AT91RM9200 +#error "CONFIG_ARCH_AT91RM9200 must be defined." #endif /* interface and function clocks */ static struct clk *iclk, *fclk; -static int clocked; extern int usb_disabled(void); @@ -36,14 +35,13 @@ static void at91_start_hc(struct platform_device *pdev) struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_regs __iomem *regs = hcd->regs; - dev_dbg(&pdev->dev, "start\n"); + dev_dbg(&pdev->dev, "starting AT91RM9200 OHCI USB Controller\n"); /* * Start the USB clocks. */ clk_enable(iclk); clk_enable(fclk); - clocked = 1; /* * The USB host controller must remain in reset. @@ -56,7 +54,7 @@ static void at91_stop_hc(struct platform_device *pdev) struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_regs __iomem *regs = hcd->regs; - dev_dbg(&pdev->dev, "stop\n"); + dev_dbg(&pdev->dev, "stopping AT91RM9200 OHCI USB Controller\n"); /* * Put the USB host controller into reset. @@ -68,7 +66,6 @@ static void at91_stop_hc(struct platform_device *pdev) */ clk_disable(fclk); clk_disable(iclk); - clocked = 0; } @@ -81,15 +78,14 @@ static int usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *); /** - * usb_hcd_at91_probe - initialize AT91-based HCDs + * usb_hcd_at91_probe - initialize AT91RM9200-based HCDs * Context: !in_interrupt() * * Allocates basic resources for this USB host controller, and * then invokes the start() method for the HCD associated with it * through the hotplug entry's driver_data. */ -static int usb_hcd_at91_probe(const struct hc_driver *driver, - struct platform_device *pdev) +int usb_hcd_at91_probe (const struct hc_driver *driver, struct platform_device *pdev) { int retval; struct usb_hcd *hcd = NULL; @@ -99,13 +95,12 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, return -ENODEV; } - if ((pdev->resource[0].flags != IORESOURCE_MEM) - || (pdev->resource[1].flags != IORESOURCE_IRQ)) { + if ((pdev->resource[0].flags != IORESOURCE_MEM) || (pdev->resource[1].flags != IORESOURCE_IRQ)) { pr_debug("hcd probe: invalid resource type\n"); return -ENODEV; } - hcd = usb_create_hcd(driver, &pdev->dev, "at91"); + hcd = usb_create_hcd(driver, &pdev->dev, "at91rm9200"); if (!hcd) return -ENOMEM; hcd->rsrc_start = pdev->resource[0].start; @@ -130,7 +125,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, at91_start_hc(pdev); ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED); + retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); if (retval == 0) return retval; @@ -154,23 +149,21 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, /* may be called with controller, bus, and devices active */ /** - * usb_hcd_at91_remove - shutdown processing for AT91-based HCDs + * usb_hcd_at91_remove - shutdown processing for AT91RM9200-based HCDs * @dev: USB Host Controller being removed * Context: !in_interrupt() * * Reverses the effect of usb_hcd_at91_probe(), first invoking * the HCD's stop() method. It is always called from a thread - * context, "rmmod" or something similar. + * context, normally "rmmod", "apmd", or something similar. * */ -static int usb_hcd_at91_remove(struct usb_hcd *hcd, - struct platform_device *pdev) +static int usb_hcd_at91_remove (struct usb_hcd *hcd, struct platform_device *pdev) { usb_remove_hcd(hcd); at91_stop_hc(pdev); iounmap(hcd->regs); release_mem_region(hcd->rsrc_start, hcd->rsrc_len); - disable_irq_wake(hcd->irq); clk_put(fclk); clk_put(iclk); @@ -185,21 +178,19 @@ static int usb_hcd_at91_remove(struct usb_hcd *hcd, static int __devinit ohci_at91_start (struct usb_hcd *hcd) { - struct at91_usbh_data *board = hcd->self.controller->platform_data; +// struct at91_ohci_data *board = hcd->self.controller->platform_data; struct ohci_hcd *ohci = hcd_to_ohci (hcd); - struct usb_device *root = hcd->self.root_hub; int ret; if ((ret = ohci_init(ohci)) < 0) return ret; - root->maxchild = board->ports; - if ((ret = ohci_run(ohci)) < 0) { err("can't start %s", hcd->self.bus_name); ohci_stop(hcd); return ret; } +// hcd->self.root_hub->maxchild = board->ports; return 0; } @@ -207,7 +198,7 @@ ohci_at91_start (struct usb_hcd *hcd) static const struct hc_driver ohci_at91_hc_driver = { .description = hcd_name, - .product_desc = "AT91 OHCI", + .product_desc = "AT91RM9200 OHCI", .hcd_priv_size = sizeof(struct ohci_hcd), /* @@ -249,54 +240,33 @@ static const struct hc_driver ohci_at91_hc_driver = { /*-------------------------------------------------------------------------*/ -static int ohci_hcd_at91_drv_probe(struct platform_device *pdev) +static int ohci_hcd_at91_drv_probe(struct platform_device *dev) { - device_init_wakeup(&pdev->dev, 1); - return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev); + return usb_hcd_at91_probe(&ohci_at91_hc_driver, dev); } -static int ohci_hcd_at91_drv_remove(struct platform_device *pdev) +static int ohci_hcd_at91_drv_remove(struct platform_device *dev) { - device_init_wakeup(&pdev->dev, 0); - return usb_hcd_at91_remove(platform_get_drvdata(pdev), pdev); + return usb_hcd_at91_remove(platform_get_drvdata(dev), dev); } #ifdef CONFIG_PM +/* REVISIT suspend/resume look "too" simple here */ + static int -ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) +ohci_hcd_at91_drv_suspend(struct platform_device *dev, pm_message_t mesg) { - struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct ohci_hcd *ohci = hcd_to_ohci(hcd); - - if (device_may_wakeup(&pdev->dev)) - enable_irq_wake(hcd->irq); - else - disable_irq_wake(hcd->irq); - - /* - * The integrated transceivers seem unable to notice disconnect, - * reconnect, or wakeup without the 48 MHz clock active. so for - * correctness, always discard connection state (using reset). - * - * REVISIT: some boards will be able to turn VBUS off... - */ - if (at91_suspend_entering_slow_clock()) { - ohci_usb_reset (ohci); - clk_disable(fclk); - clk_disable(iclk); - clocked = 0; - } + clk_disable(fclk); + clk_disable(iclk); return 0; } -static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) +static int ohci_hcd_at91_drv_resume(struct platform_device *dev) { - if (!clocked) { - clk_enable(iclk); - clk_enable(fclk); - } + clk_enable(iclk); + clk_enable(fclk); return 0; } @@ -305,7 +275,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) #define ohci_hcd_at91_drv_resume NULL #endif -MODULE_ALIAS("at91_ohci"); +MODULE_ALIAS("at91rm9200-ohci"); static struct platform_driver ohci_hcd_at91_driver = { .probe = ohci_hcd_at91_drv_probe, @@ -313,7 +283,7 @@ static struct platform_driver ohci_hcd_at91_driver = { .suspend = ohci_hcd_at91_drv_suspend, .resume = ohci_hcd_at91_drv_resume, .driver = { - .name = "at91_ohci", + .name = "at91rm9200-ohci", .owner = THIS_MODULE, }, }; diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index f7a975d5d..a1c8b3b2f 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c @@ -101,11 +101,9 @@ static void au1xxx_start_ohc(struct platform_device *dev) #endif /* Au1200 */ -#ifndef CONFIG_SOC_AU1200 /* wait for reset complete (read register twice; see au1500 errata) */ while (au_readl(USB_HOST_CONFIG), !(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD)) -#endif udelay(1000); printk(KERN_DEBUG __FILE__ @@ -159,9 +157,9 @@ static int usb_ohci_au1xxx_probe(const struct hc_driver *driver, /* Au1200 AB USB does not support coherent memory */ if (!(read_c0_prid() & 0xff)) { pr_info("%s: this is chip revision AB !!\n", - dev->name); + dev->dev.name); pr_info("%s: update your board or re-configure the kernel\n", - dev->name); + dev->dev.name); return -ENODEV; } #endif @@ -193,7 +191,7 @@ static int usb_ohci_au1xxx_probe(const struct hc_driver *driver, au1xxx_start_ohc(dev); ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED); + retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); if (retval == 0) return retval; diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c deleted file mode 100644 index 6531c4d26..000000000 --- a/drivers/usb/host/ohci-ep93xx.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * OHCI HCD (Host Controller Driver) for USB. - * - * (C) Copyright 1999 Roman Weissgaerber - * (C) Copyright 2000-2002 David Brownell - * (C) Copyright 2002 Hewlett-Packard Company - * - * Bus Glue for ep93xx. - * - * Written by Christopher Hoover - * Based on fragments of previous driver by Russell King et al. - * - * Modified for LH7A404 from ohci-sa1111.c - * by Durgesh Pattamatta - * - * Modified for pxa27x from ohci-lh7a404.c - * by Nick Bane 26-8-2004 - * - * Modified for ep93xx from ohci-pxa27x.c - * by Lennert Buytenhek 28-2-2006 - * Based on an earlier driver by Ray Lehtiniemi - * - * This file is licenced under the GPL. - */ - -#include -#include -#include -#include - -#include -#include - -static struct clk *usb_host_clock; - -static void ep93xx_start_hc(struct device *dev) -{ - clk_enable(usb_host_clock); -} - -static void ep93xx_stop_hc(struct device *dev) -{ - clk_disable(usb_host_clock); -} - -static int usb_hcd_ep93xx_probe(const struct hc_driver *driver, - struct platform_device *pdev) -{ - int retval; - struct usb_hcd *hcd; - - if (pdev->resource[1].flags != IORESOURCE_IRQ) { - pr_debug("resource[1] is not IORESOURCE_IRQ"); - return -ENOMEM; - } - - hcd = usb_create_hcd(driver, &pdev->dev, "ep93xx"); - if (hcd == NULL) - return -ENOMEM; - - hcd->rsrc_start = pdev->resource[0].start; - hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; - if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { - usb_put_hcd(hcd); - retval = -EBUSY; - goto err1; - } - - hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); - if (hcd->regs == NULL) { - pr_debug("ioremap failed"); - retval = -ENOMEM; - goto err2; - } - - usb_host_clock = clk_get(&pdev->dev, "usb_host"); - ep93xx_start_hc(&pdev->dev); - - ohci_hcd_init(hcd_to_ohci(hcd)); - - retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); - if (retval == 0) - return retval; - - ep93xx_stop_hc(&pdev->dev); - iounmap(hcd->regs); -err2: - release_mem_region(hcd->rsrc_start, hcd->rsrc_len); -err1: - usb_put_hcd(hcd); - - return retval; -} - -static void usb_hcd_ep93xx_remove(struct usb_hcd *hcd, - struct platform_device *pdev) -{ - usb_remove_hcd(hcd); - ep93xx_stop_hc(&pdev->dev); - clk_put(usb_host_clock); - iounmap(hcd->regs); - release_mem_region(hcd->rsrc_start, hcd->rsrc_len); - usb_put_hcd(hcd); -} - -static int __devinit ohci_ep93xx_start(struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci(hcd); - int ret; - - if ((ret = ohci_init(ohci)) < 0) - return ret; - - if ((ret = ohci_run(ohci)) < 0) { - err("can't start %s", hcd->self.bus_name); - ohci_stop(hcd); - return ret; - } - - return 0; -} - -static struct hc_driver ohci_ep93xx_hc_driver = { - .description = hcd_name, - .product_desc = "EP93xx OHCI", - .hcd_priv_size = sizeof(struct ohci_hcd), - .irq = ohci_irq, - .flags = HCD_USB11 | HCD_MEMORY, - .start = ohci_ep93xx_start, - .stop = ohci_stop, - .urb_enqueue = ohci_urb_enqueue, - .urb_dequeue = ohci_urb_dequeue, - .endpoint_disable = ohci_endpoint_disable, - .get_frame_number = ohci_get_frame, - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -#ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, -#endif - .start_port_reset = ohci_start_port_reset, -}; - -extern int usb_disabled(void); - -static int ohci_hcd_ep93xx_drv_probe(struct platform_device *pdev) -{ - int ret; - - ret = -ENODEV; - if (!usb_disabled()) - ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev); - - return ret; -} - -static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev) -{ - struct usb_hcd *hcd = platform_get_drvdata(pdev); - - usb_hcd_ep93xx_remove(hcd, pdev); - - return 0; -} - -#ifdef CONFIG_PM -static int ohci_hcd_ep93xx_drv_suspend(struct platform_device *pdev, pm_message_t state) -{ - struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct ochi_hcd *ohci = hcd_to_ohci(hcd); - - if (time_before(jiffies, ohci->next_statechange)) - msleep(5); - ohci->next_statechange = jiffies; - - ep93xx_stop_hc(&pdev->dev); - hcd->state = HC_STATE_SUSPENDED; - pdev->dev.power.power_state = PMSG_SUSPEND; - - return 0; -} - -static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) -{ - struct usb_hcd *hcd = platform_get_drvdata(pdev); - struct ohci_hcd *ohci = hcd_to_ohci(hcd); - int status; - - if (time_before(jiffies, ohci->next_statechange)) - msleep(5); - ohci->next_statechange = jiffies; - - ep93xx_start_hc(&pdev->dev); - pdev->dev.power.power_state = PMSG_ON; - usb_hcd_resume_root_hub(hcd); - - return 0; -} -#endif - - -static struct platform_driver ohci_hcd_ep93xx_driver = { - .probe = ohci_hcd_ep93xx_drv_probe, - .remove = ohci_hcd_ep93xx_drv_remove, -#ifdef CONFIG_PM - .suspend = ohci_hcd_ep93xx_drv_suspend, - .resume = ohci_hcd_ep93xx_drv_resume, -#endif - .driver = { - .name = "ep93xx-ohci", - }, -}; - -static int __init ohci_hcd_ep93xx_init(void) -{ - return platform_driver_register(&ohci_hcd_ep93xx_driver); -} - -static void __exit ohci_hcd_ep93xx_cleanup(void) -{ - platform_driver_unregister(&ohci_hcd_ep93xx_driver); -} - -module_init(ohci_hcd_ep93xx_init); -module_exit(ohci_hcd_ep93xx_cleanup); diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 94d8cf4b3..73f5a379d 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -74,6 +74,7 @@ * This file is licenced under the GPL. */ +#include #include #include #include @@ -901,10 +902,6 @@ MODULE_LICENSE ("GPL"); #include "ohci-pxa27x.c" #endif -#ifdef CONFIG_ARCH_EP93XX -#include "ohci-ep93xx.c" -#endif - #ifdef CONFIG_SOC_AU1X00 #include "ohci-au1xxx.c" #endif @@ -913,7 +910,7 @@ MODULE_LICENSE ("GPL"); #include "ohci-ppc-soc.c" #endif -#if defined(CONFIG_ARCH_AT91RM9200) || defined(CONFIG_ARCH_AT91SAM9261) +#ifdef CONFIG_ARCH_AT91RM9200 #include "ohci-at91.c" #endif @@ -923,11 +920,9 @@ MODULE_LICENSE ("GPL"); || defined(CONFIG_ARCH_OMAP) \ || defined (CONFIG_ARCH_LH7A404) \ || defined (CONFIG_PXA27x) \ - || defined (CONFIG_ARCH_EP93XX) \ || defined (CONFIG_SOC_AU1X00) \ || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \ || defined (CONFIG_ARCH_AT91RM9200) \ - || defined (CONFIG_ARCH_AT91SAM9261) \ ) #error "missing bus glue for ohci-hcd" #endif diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 5b0a23fd7..0bb972b58 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -581,14 +581,14 @@ static int ohci_hub_control ( break; case GetHubStatus: temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); - put_unaligned(cpu_to_le32 (temp), (__le32 *) buf); + *(__le32 *) buf = cpu_to_le32 (temp); break; case GetPortStatus: if (!wIndex || wIndex > ports) goto error; wIndex--; temp = roothub_portstatus (ohci, wIndex); - put_unaligned(cpu_to_le32 (temp), (__le32 *) buf); + *(__le32 *) buf = cpu_to_le32 (temp); #ifndef OHCI_VERBOSE_DEBUG if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c index 5602da9bd..0020ed7a3 100644 --- a/drivers/usb/host/ohci-lh7a404.c +++ b/drivers/usb/host/ohci-lh7a404.c @@ -100,7 +100,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver, lh7a404_start_hc(dev); ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED); + retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); if (retval == 0) return retval; diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index c4c4babd4..ca19abe01 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c @@ -14,7 +14,7 @@ * This file is licenced under the GPL. */ -#include /* IRQF_DISABLED */ +#include /* SA_INTERRUPT */ #include #include #include @@ -334,7 +334,7 @@ int usb_hcd_omap_probe (const struct hc_driver *driver, retval = -ENXIO; goto err2; } - retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); + retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); if (retval == 0) return retval; diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index 9fe56ff16..b2a8dfa48 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c @@ -75,7 +75,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, ohci->flags |= OHCI_BIG_ENDIAN; ohci_hcd_init(ohci); - retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); + retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); if (retval == 0) return retval; diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 6f559e102..fafe7c126 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -190,7 +190,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED); + retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); if (retval == 0) return retval; diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index d2fc6969a..1da5de573 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -388,7 +388,7 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED); + retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); if (retval != 0) goto err_ioremap; diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c index ce3de106c..fb3221ebb 100644 --- a/drivers/usb/host/ohci-sa1111.c +++ b/drivers/usb/host/ohci-sa1111.c @@ -143,7 +143,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver, sa1111_start_hc(dev); ohci_hcd_init(hcd_to_ohci(hcd)); - retval = usb_add_hcd(hcd, dev->irq[1], IRQF_DISABLED); + retval = usb_add_hcd(hcd, dev->irq[1], SA_INTERRUPT); if (retval == 0) return retval; diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 208616509..1045f846f 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -8,6 +8,7 @@ * (and others) */ +#include #include #include #include @@ -167,6 +168,8 @@ static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx) static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) { void __iomem *base; + int wait_time; + u32 control; if (!mmio_resource_enabled(pdev, 0)) return; @@ -177,10 +180,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ #ifndef __hppa__ -{ - u32 control = readl(base + OHCI_CONTROL); + control = readl(base + OHCI_CONTROL); if (control & OHCI_CTRL_IR) { - int wait_time = 500; /* arbitrary; 5 seconds */ + wait_time = 500; /* arbitrary; 5 seconds */ writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); writel(OHCI_OCR, base + OHCI_CMDSTATUS); while (wait_time > 0 && @@ -197,7 +199,6 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) /* reset controller, preserving RWC */ writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); } -} #endif /* diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index fa34092bb..a92343052 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c @@ -31,6 +31,7 @@ #undef VERBOSE #undef PACKET_TRACE +#include #include #include #include @@ -45,7 +46,7 @@ #include #include #include -#include +#include #include #include @@ -1683,13 +1684,9 @@ sl811h_probe(struct platform_device *dev) if (!addr || !data) return -ENODEV; ioaddr = 1; - /* - * NOTE: 64-bit resource->start is getting truncated - * to avoid compiler warning, assuming that ->start - * is always 32-bit for this case - */ - addr_reg = (void __iomem *) (unsigned long) addr->start; - data_reg = (void __iomem *) (unsigned long) data->start; + + addr_reg = (void __iomem *) addr->start; + data_reg = (void __iomem *) data->start; } else { addr_reg = ioremap(addr->start, 1); if (addr_reg == NULL) { @@ -1749,7 +1746,7 @@ sl811h_probe(struct platform_device *dev) * was on a system with single edge triggering, so most sorts of * triggering arrangement should work. */ - retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); + retval = usb_add_hcd(hcd, irq, SA_INTERRUPT | SA_SHIRQ); if (retval != 0) goto err6; diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 54f554e0f..302aa1ec3 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c @@ -27,7 +27,7 @@ #include #include -#include +#include MODULE_AUTHOR("Botond Botyanszki"); MODULE_DESCRIPTION("REX-CFU1U PCMCIA driver for 2.6"); diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index d1372cb27..e12393196 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c @@ -9,6 +9,7 @@ * (C) Copyright 1999-2001 Johannes Erdfelt */ +#include #include #include #include @@ -97,7 +98,6 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space) char *out = buf; struct uhci_td *td; int i, nactive, ninactive; - char *ptype; if (len < 200) return 0; @@ -110,15 +110,13 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space) (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT")); switch (usb_pipetype(urbp->urb->pipe)) { - case PIPE_ISOCHRONOUS: ptype = "ISO"; break; - case PIPE_INTERRUPT: ptype = "INT"; break; - case PIPE_BULK: ptype = "BLK"; break; - default: - case PIPE_CONTROL: ptype = "CTL"; break; + case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO"); break; + case PIPE_INTERRUPT: out += sprintf(out, "INT"); break; + case PIPE_BULK: out += sprintf(out, "BLK"); break; + case PIPE_CONTROL: out += sprintf(out, "CTL"); break; } - out += sprintf(out, "%s%s", ptype, (urbp->fsbr ? " FSBR" : "")); - out += sprintf(out, " Actlen=%d", urbp->urb->actual_length); + out += sprintf(out, "%s", (urbp->fsbr ? " FSBR" : "")); if (urbp->urb->status != -EINPROGRESS) out += sprintf(out, " Status=%d", urbp->urb->status); @@ -126,8 +124,7 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space) i = nactive = ninactive = 0; list_for_each_entry(td, &urbp->td_list, list) { - if (urbp->qh->type != USB_ENDPOINT_XFER_ISOC && - (++i <= 10 || debug > 2)) { + if (++i <= 10 || debug > 2) { out += sprintf(out, "%*s%d: ", space + 2, "", i); out += uhci_show_td(td, out, len - (out - buf), 0); } else { @@ -150,27 +147,13 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space) char *out = buf; int i, nurbs; __le32 element = qh_element(qh); - char *qtype; /* Try to make sure there's enough memory */ - if (len < 80 * 7) + if (len < 80 * 6) return 0; - switch (qh->type) { - case USB_ENDPOINT_XFER_ISOC: qtype = "ISO"; break; - case USB_ENDPOINT_XFER_INT: qtype = "INT"; break; - case USB_ENDPOINT_XFER_BULK: qtype = "BLK"; break; - case USB_ENDPOINT_XFER_CONTROL: qtype = "CTL"; break; - default: qtype = "Skel" ; break; - } - - out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n", - space, "", qh, qtype, - le32_to_cpu(qh->link), le32_to_cpu(element)); - if (qh->type == USB_ENDPOINT_XFER_ISOC) - out += sprintf(out, "%*s period %d frame %x desc [%p]\n", - space, "", qh->period, qh->iso_frame, - qh->iso_packet_desc); + out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "", + qh, le32_to_cpu(qh->link), le32_to_cpu(element)); if (element & UHCI_PTR_QH) out += sprintf(out, "%*s Element points to QH (bug?)\n", space, ""); @@ -278,8 +261,7 @@ static int uhci_show_root_hub_state(struct uhci_hcd *uhci, char *buf, int len) default: rh_state = "?"; break; } - out += sprintf(out, "Root-hub state: %s FSBR: %d\n", - rh_state, uhci->fsbr_is_on); + out += sprintf(out, "Root-hub state: %s\n", rh_state); return out - buf; } @@ -293,7 +275,7 @@ static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) unsigned short portsc1, portsc2; /* Try to make sure there's enough memory */ - if (len < 80 * 9) + if (len < 80 * 6) return 0; usbcmd = inw(io_addr + 0); @@ -332,10 +314,6 @@ static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) out += sprintf(out, " sof = %02x\n", sof); out += uhci_show_sc(1, portsc1, out, len - (out - buf)); out += uhci_show_sc(2, portsc2, out, len - (out - buf)); - out += sprintf(out, "Most recent frame: %x (%d) " - "Last ISO frame: %x (%d)\n", - uhci->frame_number, uhci->frame_number & 1023, - uhci->last_iso_frame, uhci->last_iso_frame & 1023); return out - buf; } @@ -428,7 +406,7 @@ struct uhci_debug { static int uhci_debug_open(struct inode *inode, struct file *file) { - struct uhci_hcd *uhci = inode->i_private; + struct uhci_hcd *uhci = inode->u.generic_ip; struct uhci_debug *up; int ret = -ENOMEM; unsigned long flags; diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 4151f6186..d225e11f4 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -13,7 +13,7 @@ * (C) Copyright 2000 Yggdrasil Computing, Inc. (port of new PCI interface * support from usb-ohci.c by Adam Richter, adam@yggdrasil.com). * (C) Copyright 1999 Gregory P. Smith (from usb-ohci.c) - * (C) Copyright 2004-2006 Alan Stern, stern@rowland.harvard.edu + * (C) Copyright 2004-2005 Alan Stern, stern@rowland.harvard.edu * * Intel documents this fairly well, and as far as I know there * are no royalties or anything like that, but even so there are @@ -22,6 +22,7 @@ * */ +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +88,15 @@ static void suspend_rh(struct uhci_hcd *uhci, enum uhci_rh_state new_state); static void wakeup_rh(struct uhci_hcd *uhci); static void uhci_get_current_frame_number(struct uhci_hcd *uhci); +/* If a transfer is still active after this much time, turn off FSBR */ +#define IDLE_TIMEOUT msecs_to_jiffies(50) +#define FSBR_DELAY msecs_to_jiffies(50) + +/* When we timeout an idle transfer for FSBR, we'll switch it over to */ +/* depth first traversal. We'll do it in groups of this number of TDs */ +/* to make sure it doesn't hog all of the bandwidth */ +#define DEPTH_INTERVAL 5 + #include "uhci-debug.c" #include "uhci-q.c" #include "uhci-hub.c" @@ -109,29 +120,22 @@ static void finish_reset(struct uhci_hcd *uhci) uhci->is_stopped = UHCI_IS_STOPPED; uhci_to_hcd(uhci)->state = HC_STATE_HALT; uhci_to_hcd(uhci)->poll_rh = 0; - - uhci->dead = 0; /* Full reset resurrects the controller */ } /* * Last rites for a defunct/nonfunctional controller * or one we don't want to use any more. */ -static void uhci_hc_died(struct uhci_hcd *uhci) +static void hc_died(struct uhci_hcd *uhci) { - uhci_get_current_frame_number(uhci); uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr); finish_reset(uhci); - uhci->dead = 1; - - /* The current frame may already be partway finished */ - ++uhci->frame_number; + uhci->hc_inaccessible = 1; } /* - * Initialize a controller that was newly discovered or has lost power - * or otherwise been reset while it was suspended. In none of these cases - * can we be sure of its previous state. + * Initialize a controller that was newly discovered or has just been + * resumed. In either case we can't be sure of its previous state. */ static void check_and_reset_hc(struct uhci_hcd *uhci) { @@ -151,8 +155,7 @@ static void configure_hc(struct uhci_hcd *uhci) outl(uhci->frame_dma_handle, uhci->io_addr + USBFLBASEADD); /* Set the current frame number */ - outw(uhci->frame_number & UHCI_MAX_SOF_NUMBER, - uhci->io_addr + USBFRNUM); + outw(uhci->frame_number, uhci->io_addr + USBFRNUM); /* Mark controller as not halted before we enable interrupts */ uhci_to_hcd(uhci)->state = HC_STATE_SUSPENDED; @@ -204,8 +207,7 @@ __acquires(uhci->lock) int int_enable; auto_stop = (new_state == UHCI_RH_AUTO_STOPPED); - dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev, - "%s%s\n", __FUNCTION__, + dev_dbg(uhci_dev(uhci), "%s%s\n", __FUNCTION__, (auto_stop ? " (auto-stop)" : "")); /* If we get a suspend request when we're already auto-stopped @@ -239,27 +241,27 @@ __acquires(uhci->lock) spin_unlock_irq(&uhci->lock); msleep(1); spin_lock_irq(&uhci->lock); - if (uhci->dead) + if (uhci->hc_inaccessible) /* Died */ return; } if (!(inw(uhci->io_addr + USBSTS) & USBSTS_HCH)) - dev_warn(&uhci_to_hcd(uhci)->self.root_hub->dev, - "Controller not stopped yet!\n"); + dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n"); uhci_get_current_frame_number(uhci); + smp_wmb(); uhci->rh_state = new_state; uhci->is_stopped = UHCI_IS_STOPPED; uhci_to_hcd(uhci)->poll_rh = !int_enable; uhci_scan_schedule(uhci, NULL); - uhci_fsbr_off(uhci); } static void start_rh(struct uhci_hcd *uhci) { uhci_to_hcd(uhci)->state = HC_STATE_RUNNING; uhci->is_stopped = 0; + smp_wmb(); /* Mark it configured and running with a 64-byte max packet. * All interrupts are enabled, even though RESUME won't do anything. @@ -276,8 +278,7 @@ static void wakeup_rh(struct uhci_hcd *uhci) __releases(uhci->lock) __acquires(uhci->lock) { - dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev, - "%s%s\n", __FUNCTION__, + dev_dbg(uhci_dev(uhci), "%s%s\n", __FUNCTION__, uhci->rh_state == UHCI_RH_AUTO_STOPPED ? " (auto-start)" : ""); @@ -292,7 +293,7 @@ __acquires(uhci->lock) spin_unlock_irq(&uhci->lock); msleep(20); spin_lock_irq(&uhci->lock); - if (uhci->dead) + if (uhci->hc_inaccessible) /* Died */ return; /* End Global Resume and wait for EOP to be sent */ @@ -344,7 +345,7 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs) errbuf, ERRBUF_LEN); lprintk(errbuf); } - uhci_hc_died(uhci); + hc_died(uhci); /* Force a callback in case there are * pending unlinks */ @@ -367,21 +368,12 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs) /* * Store the current frame number in uhci->frame_number if the controller - * is runnning. Expand from 11 bits (of which we use only 10) to a - * full-sized integer. - * - * Like many other parts of the driver, this code relies on being polled - * more than once per second as long as the controller is running. + * is runnning */ static void uhci_get_current_frame_number(struct uhci_hcd *uhci) { - if (!uhci->is_stopped) { - unsigned delta; - - delta = (inw(uhci->io_addr + USBFRNUM) - uhci->frame_number) & - (UHCI_NUMFRAMES - 1); - uhci->frame_number += delta; - } + if (!uhci->is_stopped) + uhci->frame_number = inw(uhci->io_addr + USBFRNUM); } /* @@ -415,7 +407,7 @@ static void release_uhci(struct uhci_hcd *uhci) uhci->frame, uhci->frame_dma_handle); } -static int uhci_init(struct usb_hcd *hcd) +static int uhci_reset(struct usb_hcd *hcd) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned io_size = (unsigned) hcd->rsrc_len; @@ -467,7 +459,7 @@ static void uhci_shutdown(struct pci_dev *pdev) { struct usb_hcd *hcd = (struct usb_hcd *) pci_get_drvdata(pdev); - uhci_hc_died(hcd_to_uhci(hcd)); + hc_died(hcd_to_uhci(hcd)); } /* @@ -495,10 +487,14 @@ static int uhci_start(struct usb_hcd *hcd) hcd->uses_new_polling = 1; + uhci->fsbr = 0; + uhci->fsbrtimeout = 0; + spin_lock_init(&uhci->lock); - setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout, - (unsigned long) uhci); + + INIT_LIST_HEAD(&uhci->td_remove_list); INIT_LIST_HEAD(&uhci->idle_qh_list); + init_waitqueue_head(&uhci->waitqh); if (DEBUG_CONFIGURED) { @@ -669,12 +665,11 @@ static void uhci_stop(struct usb_hcd *hcd) struct uhci_hcd *uhci = hcd_to_uhci(hcd); spin_lock_irq(&uhci->lock); - if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) && !uhci->dead) - uhci_hc_died(uhci); + if (!uhci->hc_inaccessible) + hc_died(uhci); uhci_scan_schedule(uhci, NULL); spin_unlock_irq(&uhci->lock); - del_timer_sync(&uhci->fsbr_timer); release_uhci(uhci); } @@ -682,15 +677,12 @@ static void uhci_stop(struct usb_hcd *hcd) static int uhci_rh_suspend(struct usb_hcd *hcd) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); - int rc = 0; spin_lock_irq(&uhci->lock); - if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) - rc = -ESHUTDOWN; - else if (!uhci->dead) + if (!uhci->hc_inaccessible) /* Not dead */ suspend_rh(uhci, UHCI_RH_SUSPENDED); spin_unlock_irq(&uhci->lock); - return rc; + return 0; } static int uhci_rh_resume(struct usb_hcd *hcd) @@ -699,10 +691,13 @@ static int uhci_rh_resume(struct usb_hcd *hcd) int rc = 0; spin_lock_irq(&uhci->lock); - if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { - dev_warn(&hcd->self.root_hub->dev, "HC isn't running!\n"); - rc = -ESHUTDOWN; - } else if (!uhci->dead) + if (uhci->hc_inaccessible) { + if (uhci->rh_state == UHCI_RH_SUSPENDED) { + dev_warn(uhci_dev(uhci), "HC isn't running!\n"); + rc = -ENODEV; + } + /* Otherwise the HC is dead */ + } else wakeup_rh(uhci); spin_unlock_irq(&uhci->lock); return rc; @@ -716,8 +711,8 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message) dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__); spin_lock_irq(&uhci->lock); - if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead) - goto done_okay; /* Already suspended or dead */ + if (uhci->hc_inaccessible) /* Dead or already suspended */ + goto done; if (uhci->rh_state > UHCI_RH_SUSPENDED) { dev_warn(uhci_dev(uhci), "Root hub isn't suspended!\n"); @@ -730,12 +725,12 @@ static int uhci_suspend(struct usb_hcd *hcd, pm_message_t message) */ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0); mb(); + clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); + uhci->hc_inaccessible = 1; hcd->poll_rh = 0; /* FIXME: Enable non-PME# remote wakeup? */ -done_okay: - clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); done: spin_unlock_irq(&uhci->lock); return rc; @@ -748,22 +743,24 @@ static int uhci_resume(struct usb_hcd *hcd) dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__); /* Since we aren't in D3 any more, it's safe to set this flag - * even if the controller was dead. + * even if the controller was dead. It might not even be dead + * any more, if the firmware or quirks code has reset it. */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); mb(); + if (uhci->rh_state == UHCI_RH_RESET) /* Dead */ + return 0; spin_lock_irq(&uhci->lock); /* FIXME: Disable non-PME# remote wakeup? */ - /* The firmware or a boot kernel may have changed the controller - * settings during a system wakeup. Check it and reconfigure - * to avoid problems. + uhci->hc_inaccessible = 0; + + /* The BIOS may have changed the controller settings during a + * system wakeup. Check it and reconfigure to avoid problems. */ check_and_reset_hc(uhci); - - /* If the controller was dead before, it's back alive now */ configure_hc(uhci); if (uhci->rh_state == UHCI_RH_RESET) { @@ -813,15 +810,18 @@ done: static int uhci_hcd_get_frame_number(struct usb_hcd *hcd) { struct uhci_hcd *uhci = hcd_to_uhci(hcd); - unsigned frame_number; - unsigned delta; + unsigned long flags; + int is_stopped; + int frame_number; /* Minimize latency by avoiding the spinlock */ - frame_number = uhci->frame_number; - barrier(); - delta = (inw(uhci->io_addr + USBFRNUM) - frame_number) & - (UHCI_NUMFRAMES - 1); - return frame_number + delta; + local_irq_save(flags); + is_stopped = uhci->is_stopped; + smp_rmb(); + frame_number = (is_stopped ? uhci->frame_number : + inw(uhci->io_addr + USBFRNUM)); + local_irq_restore(flags); + return frame_number; } static const char hcd_name[] = "uhci_hcd"; @@ -836,7 +836,7 @@ static const struct hc_driver uhci_driver = { .flags = HCD_USB11, /* Basic lifecycle operations */ - .reset = uhci_init, + .reset = uhci_reset, .start = uhci_start, #ifdef CONFIG_PM .suspend = uhci_suspend, diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h index 108e3de2d..d5c8f4d92 100644 --- a/drivers/usb/host/uhci-hcd.h +++ b/drivers/usb/host/uhci-hcd.h @@ -84,13 +84,6 @@ #define CAN_SCHEDULE_FRAMES 1000 /* how far in the future frames * can be scheduled */ -/* When no queues need Full-Speed Bandwidth Reclamation, - * delay this long before turning FSBR off */ -#define FSBR_OFF_DELAY msecs_to_jiffies(10) - -/* If a queue hasn't advanced after this much time, assume it is stuck */ -#define QH_WAIT_TIMEOUT msecs_to_jiffies(200) - /* * Queue Headers @@ -128,31 +121,21 @@ struct uhci_qh { __le32 element; /* Queue element (TD) pointer */ /* Software fields */ + dma_addr_t dma_handle; + struct list_head node; /* Node in the list of QHs */ struct usb_host_endpoint *hep; /* Endpoint information */ struct usb_device *udev; struct list_head queue; /* Queue of urbps for this QH */ struct uhci_qh *skel; /* Skeleton for this QH */ struct uhci_td *dummy_td; /* Dummy TD to end the queue */ - struct uhci_td *post_td; /* Last TD completed */ - struct usb_iso_packet_descriptor *iso_packet_desc; - /* Next urb->iso_frame_desc entry */ - unsigned long advance_jiffies; /* Time of last queue advance */ unsigned int unlink_frame; /* When the QH was unlinked */ - unsigned int period; /* For Interrupt and Isochronous QHs */ - unsigned int iso_frame; /* Frame # for iso_packet_desc */ - int iso_status; /* Status for Isochronous URBs */ - int state; /* QH_STATE_xxx; see above */ - int type; /* Queue type (control, bulk, etc) */ - - dma_addr_t dma_handle; unsigned int initial_toggle:1; /* Endpoint's current toggle value */ unsigned int needs_fixup:1; /* Must fix the TD toggle values */ - unsigned int is_stopped:1; /* Queue was stopped by error/unlink */ - unsigned int wait_expired:1; /* QH_WAIT_TIMEOUT has expired */ + unsigned int is_stopped:1; /* Queue was stopped by an error */ } __attribute__((aligned(16))); /* @@ -243,6 +226,7 @@ struct uhci_td { dma_addr_t dma_handle; struct list_head list; + struct list_head remove_list; int frame; /* for iso: what frame? */ struct list_head fl_list; @@ -321,8 +305,38 @@ static inline u32 td_status(struct uhci_td *td) { #define skel_bulk_qh skelqh[12] #define skel_term_qh skelqh[13] -/* Find the skelqh entry corresponding to an interval exponent */ -#define UHCI_SKEL_INDEX(exponent) (9 - exponent) +/* + * Search tree for determining where fits in the skelqh[] + * skeleton. + * + * An interrupt request should be placed into the slowest skelqh[] + * which meets the interval/period/frequency requirement. + * An interrupt request is allowed to be faster than but not slower. + * + * For a given , this function returns the appropriate/matching + * skelqh[] index value. + */ +static inline int __interval_to_skel(int interval) +{ + if (interval < 16) { + if (interval < 4) { + if (interval < 2) + return 9; /* int1 for 0-1 ms */ + return 8; /* int2 for 2-3 ms */ + } + if (interval < 8) + return 7; /* int4 for 4-7 ms */ + return 6; /* int8 for 8-15 ms */ + } + if (interval < 64) { + if (interval < 32) + return 5; /* int16 for 16-31 ms */ + return 4; /* int32 for 32-63 ms */ + } + if (interval < 128) + return 3; /* int64 for 64-127 ms */ + return 2; /* int128 for 128-255 ms (Max.) */ +} /* @@ -382,32 +396,32 @@ struct uhci_hcd { __le32 *frame; void **frame_cpu; /* CPU's frame list */ + int fsbr; /* Full-speed bandwidth reclamation */ + unsigned long fsbrtimeout; /* FSBR delay */ + enum uhci_rh_state rh_state; unsigned long auto_stop_time; /* When to AUTO_STOP */ unsigned int frame_number; /* As of last check */ unsigned int is_stopped; #define UHCI_IS_STOPPED 9999 /* Larger than a frame # */ - unsigned int last_iso_frame; /* Frame of last scan */ - unsigned int cur_iso_frame; /* Frame for current scan */ unsigned int scan_in_progress:1; /* Schedule scan is running */ unsigned int need_rescan:1; /* Redo the schedule scan */ - unsigned int dead:1; /* Controller has died */ + unsigned int hc_inaccessible:1; /* HC is suspended or dead */ unsigned int working_RD:1; /* Suspended root hub doesn't need to be polled */ unsigned int is_initialized:1; /* Data structure is usable */ - unsigned int fsbr_is_on:1; /* FSBR is turned on */ - unsigned int fsbr_is_wanted:1; /* Does any URB want FSBR? */ - unsigned int fsbr_expiring:1; /* FSBR is timing out */ - - struct timer_list fsbr_timer; /* For turning off FBSR */ /* Support for port suspend/resume/reset */ unsigned long port_c_suspend; /* Bit-arrays of ports */ unsigned long resuming_ports; unsigned long ports_timeout; /* Time to stop signalling */ + /* List of TDs that are done, but waiting to be freed (race) */ + struct list_head td_remove_list; + unsigned int td_remove_age; /* Age in frames */ + struct list_head idle_qh_list; /* Where the idle QHs live */ int rh_numports; /* Number of root-hub ports */ @@ -428,9 +442,6 @@ static inline struct usb_hcd *uhci_to_hcd(struct uhci_hcd *uhci) #define uhci_dev(u) (uhci_to_hcd(u)->self.controller) -/* Utility macro for comparing frame numbers */ -#define uhci_frame_before_eq(f1, f2) (0 <= (int) ((f2) - (f1))) - /* * Private per-URB data @@ -443,7 +454,9 @@ struct urb_priv { struct uhci_qh *qh; /* QH for this URB */ struct list_head td_list; - unsigned fsbr:1; /* URB wants FSBR */ + unsigned fsbr : 1; /* URB turned on FSBR */ + unsigned short_transfer : 1; /* URB got a short transfer, no + * need to rescan */ }; diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index c545ef92f..c8451d957 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -171,8 +171,9 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) spin_lock_irqsave(&uhci->lock, flags); uhci_scan_schedule(uhci, NULL); - if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead) + if (uhci->hc_inaccessible) goto done; + check_fsbr(uhci); uhci_check_ports(uhci); status = get_hub_status_data(uhci, buf); @@ -227,7 +228,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wPortChange, wPortStatus; unsigned long flags; - if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead) + if (uhci->hc_inaccessible) return -ETIMEDOUT; spin_lock_irqsave(&uhci->lock, flags); diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 431e8f31f..5f44354c4 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c @@ -13,9 +13,10 @@ * (C) Copyright 2000 Yggdrasil Computing, Inc. (port of new PCI interface * support from usb-ohci.c by Adam Richter, adam@yggdrasil.com). * (C) Copyright 1999 Gregory P. Smith (from usb-ohci.c) - * (C) Copyright 2004-2006 Alan Stern, stern@rowland.harvard.edu + * (C) Copyright 2004-2005 Alan Stern, stern@rowland.harvard.edu */ +static void uhci_free_pending_tds(struct uhci_hcd *uhci); /* * Technically, updating td->status here is a race, but it's not really a @@ -37,60 +38,6 @@ static inline void uhci_clear_next_interrupt(struct uhci_hcd *uhci) uhci->term_td->status &= ~cpu_to_le32(TD_CTRL_IOC); } - -/* - * Full-Speed Bandwidth Reclamation (FSBR). - * We turn on FSBR whenever a queue that wants it is advancing, - * and leave it on for a short time thereafter. - */ -static void uhci_fsbr_on(struct uhci_hcd *uhci) -{ - uhci->fsbr_is_on = 1; - uhci->skel_term_qh->link = cpu_to_le32( - uhci->skel_fs_control_qh->dma_handle) | UHCI_PTR_QH; -} - -static void uhci_fsbr_off(struct uhci_hcd *uhci) -{ - uhci->fsbr_is_on = 0; - uhci->skel_term_qh->link = UHCI_PTR_TERM; -} - -static void uhci_add_fsbr(struct uhci_hcd *uhci, struct urb *urb) -{ - struct urb_priv *urbp = urb->hcpriv; - - if (!(urb->transfer_flags & URB_NO_FSBR)) - urbp->fsbr = 1; -} - -static void uhci_urbp_wants_fsbr(struct uhci_hcd *uhci, struct urb_priv *urbp) -{ - if (urbp->fsbr) { - uhci->fsbr_is_wanted = 1; - if (!uhci->fsbr_is_on) - uhci_fsbr_on(uhci); - else if (uhci->fsbr_expiring) { - uhci->fsbr_expiring = 0; - del_timer(&uhci->fsbr_timer); - } - } -} - -static void uhci_fsbr_timeout(unsigned long _uhci) -{ - struct uhci_hcd *uhci = (struct uhci_hcd *) _uhci; - unsigned long flags; - - spin_lock_irqsave(&uhci->lock, flags); - if (uhci->fsbr_expiring) { - uhci->fsbr_expiring = 0; - uhci_fsbr_off(uhci); - } - spin_unlock_irqrestore(&uhci->lock, flags); -} - - static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci) { dma_addr_t dma_handle; @@ -104,6 +51,7 @@ static struct uhci_td *uhci_alloc_td(struct uhci_hcd *uhci) td->frame = -1; INIT_LIST_HEAD(&td->list); + INIT_LIST_HEAD(&td->remove_list); INIT_LIST_HEAD(&td->fl_list); return td; @@ -113,6 +61,8 @@ static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) { if (!list_empty(&td->list)) dev_warn(uhci_dev(uhci), "td %p still in list!\n", td); + if (!list_empty(&td->remove_list)) + dev_warn(uhci_dev(uhci), "td %p still in remove_list!\n", td); if (!list_empty(&td->fl_list)) dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td); @@ -127,16 +77,6 @@ static inline void uhci_fill_td(struct uhci_td *td, u32 status, td->buffer = cpu_to_le32(buffer); } -static void uhci_add_td_to_urbp(struct uhci_td *td, struct urb_priv *urbp) -{ - list_add_tail(&td->list, &urbp->td_list); -} - -static void uhci_remove_td_from_urbp(struct uhci_td *td) -{ - list_del_init(&td->list); -} - /* * We insert Isochronous URBs directly into the frame list at the beginning */ @@ -198,24 +138,6 @@ static inline void uhci_remove_td_from_frame_list(struct uhci_hcd *uhci, td->frame = -1; } -static inline void uhci_remove_tds_from_frame(struct uhci_hcd *uhci, - unsigned int framenum) -{ - struct uhci_td *ftd, *ltd; - - framenum &= (UHCI_NUMFRAMES - 1); - - ftd = uhci->frame_cpu[framenum]; - if (ftd) { - ltd = list_entry(ftd->fl_list.prev, struct uhci_td, fl_list); - uhci->frame[framenum] = ltd->link; - uhci->frame_cpu[framenum] = NULL; - - while (!list_empty(&ftd->fl_list)) - list_del_init(ftd->fl_list.prev); - } -} - /* * Remove all the TDs for an Isochronous URB from the frame list */ @@ -226,6 +148,7 @@ static void uhci_unlink_isochronous_tds(struct uhci_hcd *uhci, struct urb *urb) list_for_each_entry(td, &urbp->td_list, list) uhci_remove_td_from_frame_list(uhci, td); + wmb(); } static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, @@ -238,7 +161,6 @@ static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, if (!qh) return NULL; - memset(qh, 0, sizeof(*qh)); qh->dma_handle = dma_handle; qh->element = UHCI_PTR_TERM; @@ -257,11 +179,10 @@ static struct uhci_qh *uhci_alloc_qh(struct uhci_hcd *uhci, qh->hep = hep; qh->udev = udev; hep->hcpriv = qh; - qh->type = hep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; } else { /* Skeleton QH */ qh->state = QH_STATE_ACTIVE; - qh->type = -1; + qh->udev = NULL; } return qh; } @@ -281,64 +202,35 @@ static void uhci_free_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) } /* - * When a queue is stopped and a dequeued URB is given back, adjust - * the previous TD link (if the URB isn't first on the queue) or - * save its toggle value (if it is first and is currently executing). - * - * Returns 0 if the URB should not yet be given back, 1 otherwise. + * When the currently executing URB is dequeued, save its current toggle value */ -static int uhci_cleanup_queue(struct uhci_hcd *uhci, struct uhci_qh *qh, - struct urb *urb) +static void uhci_save_toggle(struct uhci_qh *qh, struct urb *urb) { - struct urb_priv *urbp = urb->hcpriv; + struct urb_priv *urbp = (struct urb_priv *) urb->hcpriv; struct uhci_td *td; - int ret = 1; - - /* Isochronous pipes don't use toggles and their TD link pointers - * get adjusted during uhci_urb_dequeue(). But since their queues - * cannot truly be stopped, we have to watch out for dequeues - * occurring after the nominal unlink frame. */ - if (qh->type == USB_ENDPOINT_XFER_ISOC) { - ret = (uhci->frame_number + uhci->is_stopped != - qh->unlink_frame); - goto done; - } - - /* If the URB isn't first on its queue, adjust the link pointer - * of the last TD in the previous URB. The toggle doesn't need - * to be saved since this URB can't be executing yet. */ - if (qh->queue.next != &urbp->node) { - struct urb_priv *purbp; - struct uhci_td *ptd; - - purbp = list_entry(urbp->node.prev, struct urb_priv, node); - WARN_ON(list_empty(&purbp->td_list)); - ptd = list_entry(purbp->td_list.prev, struct uhci_td, - list); - td = list_entry(urbp->td_list.prev, struct uhci_td, - list); - ptd->link = td->link; - goto done; - } /* If the QH element pointer is UHCI_PTR_TERM then then currently * executing URB has already been unlinked, so this one isn't it. */ - if (qh_element(qh) == UHCI_PTR_TERM) - goto done; + if (qh_element(qh) == UHCI_PTR_TERM || + qh->queue.next != &urbp->node) + return; qh->element = UHCI_PTR_TERM; - /* Control pipes have to worry about toggles */ - if (qh->type == USB_ENDPOINT_XFER_CONTROL) - goto done; + /* Only bulk and interrupt pipes have to worry about toggles */ + if (!(usb_pipetype(urb->pipe) == PIPE_BULK || + usb_pipetype(urb->pipe) == PIPE_INTERRUPT)) + return; - /* Save the next toggle value */ - WARN_ON(list_empty(&urbp->td_list)); - td = list_entry(urbp->td_list.next, struct uhci_td, list); - qh->needs_fixup = 1; - qh->initial_toggle = uhci_toggle(td_token(td)); + /* Find the first active TD; that's the device's toggle state */ + list_for_each_entry(td, &urbp->td_list, list) { + if (td_status(td) & TD_CTRL_ACTIVE) { + qh->needs_fixup = 1; + qh->initial_toggle = uhci_toggle(td_token(td)); + return; + } + } -done: - return ret; + WARN_ON(1); } /* @@ -413,10 +305,6 @@ static void uhci_activate_qh(struct uhci_hcd *uhci, struct uhci_qh *qh) qh->element = cpu_to_le32(td->dma_handle); } - /* Treat the queue as if it has just advanced */ - qh->wait_expired = 0; - qh->advance_jiffies = jiffies; - if (qh->state == QH_STATE_ACTIVE) return; qh->state = QH_STATE_ACTIVE; @@ -482,12 +370,6 @@ static void uhci_make_qh_idle(struct uhci_hcd *uhci, struct uhci_qh *qh) list_move(&qh->node, &uhci->idle_qh_list); qh->state = QH_STATE_IDLE; - /* Now that the QH is idle, its post_td isn't being used */ - if (qh->post_td) { - uhci_free_td(uhci, qh->post_td); - qh->post_td = NULL; - } - /* If anyone is waiting for a QH to become idle, wake them up */ if (uhci->num_waiting) wake_up_all(&uhci->waitqh); @@ -513,6 +395,21 @@ static inline struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci, return urbp; } +static void uhci_add_td_to_urb(struct urb *urb, struct uhci_td *td) +{ + struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; + + list_add_tail(&td->list, &urbp->td_list); +} + +static void uhci_remove_td_from_urb(struct uhci_td *td) +{ + if (list_empty(&td->list)) + return; + + list_del_init(&td->list); +} + static void uhci_free_urb_priv(struct uhci_hcd *uhci, struct urb_priv *urbp) { @@ -522,15 +419,48 @@ static void uhci_free_urb_priv(struct uhci_hcd *uhci, dev_warn(uhci_dev(uhci), "urb %p still on QH's list!\n", urbp->urb); + uhci_get_current_frame_number(uhci); + if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age) { + uhci_free_pending_tds(uhci); + uhci->td_remove_age = uhci->frame_number; + } + + /* Check to see if the remove list is empty. Set the IOC bit */ + /* to force an interrupt so we can remove the TDs. */ + if (list_empty(&uhci->td_remove_list)) + uhci_set_next_interrupt(uhci); + list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { - uhci_remove_td_from_urbp(td); - uhci_free_td(uhci, td); + uhci_remove_td_from_urb(td); + list_add(&td->remove_list, &uhci->td_remove_list); } urbp->urb->hcpriv = NULL; kmem_cache_free(uhci_up_cachep, urbp); } +static void uhci_inc_fsbr(struct uhci_hcd *uhci, struct urb *urb) +{ + struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; + + if ((!(urb->transfer_flags & URB_NO_FSBR)) && !urbp->fsbr) { + urbp->fsbr = 1; + if (!uhci->fsbr++ && !uhci->fsbrtimeout) + uhci->skel_term_qh->link = cpu_to_le32(uhci->skel_fs_control_qh->dma_handle) | UHCI_PTR_QH; + } +} + +static void uhci_dec_fsbr(struct uhci_hcd *uhci, struct urb *urb) +{ + struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; + + if ((!(urb->transfer_flags & URB_NO_FSBR)) && urbp->fsbr) { + urbp->fsbr = 0; + if (!--uhci->fsbr) + uhci->fsbrtimeout = jiffies + FSBR_DELAY; + } +} + /* * Map status to standard result codes * @@ -557,6 +487,7 @@ static int uhci_map_status(int status, int dir_out) return -ENOSR; if (status & TD_CTRL_STALLED) /* Stalled */ return -EPIPE; + WARN_ON(status & TD_CTRL_ACTIVE); /* Active */ return 0; } @@ -572,7 +503,6 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, int len = urb->transfer_buffer_length; dma_addr_t data = urb->transfer_dma; __le32 *plink; - struct urb_priv *urbp = urb->hcpriv; /* The "pipe" thing contains the destination in bits 8--18 */ destination = (urb->pipe & PIPE_DEVEP_MASK) | USB_PID_SETUP; @@ -586,7 +516,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, * Build the TD for the control request setup packet */ td = qh->dummy_td; - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status, destination | uhci_explen(8), urb->setup_dma); plink = &td->link; @@ -618,7 +548,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, /* Alternate Data0/1 (start with Data1) */ destination ^= TD_TOKEN_TOGGLE; - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status, destination | uhci_explen(pktsze), data); plink = &td->link; @@ -649,7 +579,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, status &= ~TD_CTRL_SPD; - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status | TD_CTRL_IOC, destination | uhci_explen(0), 0); plink = &td->link; @@ -676,18 +606,144 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, qh->skel = uhci->skel_ls_control_qh; else { qh->skel = uhci->skel_fs_control_qh; - uhci_add_fsbr(uhci, urb); + uhci_inc_fsbr(uhci, urb); } - - urb->actual_length = -8; /* Account for the SETUP packet */ return 0; nomem: /* Remove the dummy TD from the td_list so it doesn't get freed */ - uhci_remove_td_from_urbp(qh->dummy_td); + uhci_remove_td_from_urb(qh->dummy_td); return -ENOMEM; } +/* + * If control-IN transfer was short, the status packet wasn't sent. + * This routine changes the element pointer in the QH to point at the + * status TD. It's safe to do this even while the QH is live, because + * the hardware only updates the element pointer following a successful + * transfer. The inactive TD for the short packet won't cause an update, + * so the pointer won't get overwritten. The next time the controller + * sees this QH, it will send the status packet. + */ +static int usb_control_retrigger_status(struct uhci_hcd *uhci, struct urb *urb) +{ + struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; + struct uhci_td *td; + + urbp->short_transfer = 1; + + td = list_entry(urbp->td_list.prev, struct uhci_td, list); + urbp->qh->element = cpu_to_le32(td->dma_handle); + + return -EINPROGRESS; +} + + +static int uhci_result_control(struct uhci_hcd *uhci, struct urb *urb) +{ + struct list_head *tmp, *head; + struct urb_priv *urbp = urb->hcpriv; + struct uhci_td *td; + unsigned int status; + int ret = 0; + + head = &urbp->td_list; + if (urbp->short_transfer) { + tmp = head->prev; + goto status_stage; + } + + urb->actual_length = 0; + + tmp = head->next; + td = list_entry(tmp, struct uhci_td, list); + + /* The first TD is the SETUP stage, check the status, but skip */ + /* the count */ + status = uhci_status_bits(td_status(td)); + if (status & TD_CTRL_ACTIVE) + return -EINPROGRESS; + + if (status) + goto td_error; + + /* The rest of the TDs (but the last) are data */ + tmp = tmp->next; + while (tmp != head && tmp->next != head) { + unsigned int ctrlstat; + + td = list_entry(tmp, struct uhci_td, list); + tmp = tmp->next; + + ctrlstat = td_status(td); + status = uhci_status_bits(ctrlstat); + if (status & TD_CTRL_ACTIVE) + return -EINPROGRESS; + + urb->actual_length += uhci_actual_length(ctrlstat); + + if (status) + goto td_error; + + /* Check to see if we received a short packet */ + if (uhci_actual_length(ctrlstat) < + uhci_expected_length(td_token(td))) { + if (urb->transfer_flags & URB_SHORT_NOT_OK) { + ret = -EREMOTEIO; + goto err; + } + + return usb_control_retrigger_status(uhci, urb); + } + } + +status_stage: + td = list_entry(tmp, struct uhci_td, list); + + /* Control status stage */ + status = td_status(td); + +#ifdef I_HAVE_BUGGY_APC_BACKUPS + /* APC BackUPS Pro kludge */ + /* It tries to send all of the descriptor instead of the amount */ + /* we requested */ + if (status & TD_CTRL_IOC && /* IOC is masked out by uhci_status_bits */ + status & TD_CTRL_ACTIVE && + status & TD_CTRL_NAK) + return 0; +#endif + + status = uhci_status_bits(status); + if (status & TD_CTRL_ACTIVE) + return -EINPROGRESS; + + if (status) + goto td_error; + + return 0; + +td_error: + ret = uhci_map_status(status, uhci_packetout(td_token(td))); + +err: + if ((debug == 1 && ret != -EPIPE) || debug > 1) { + /* Some debugging code */ + dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n", + __FUNCTION__, status); + + if (errbuf) { + /* Print the chain for debugging purposes */ + uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0); + lprintk(errbuf); + } + } + + /* Note that the queue has stopped */ + urbp->qh->element = UHCI_PTR_TERM; + urbp->qh->is_stopped = 1; + return ret; +} + /* * Common submit for bulk and interrupt */ @@ -700,7 +756,6 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, int len = urb->transfer_buffer_length; dma_addr_t data = urb->transfer_dma; __le32 *plink; - struct urb_priv *urbp = urb->hcpriv; unsigned int toggle; if (len < 0) @@ -738,7 +793,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, goto nomem; *plink = cpu_to_le32(td->dma_handle); } - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status, destination | uhci_explen(pktsze) | (toggle << TD_TOKEN_TOGGLE_SHIFT), @@ -766,7 +821,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, goto nomem; *plink = cpu_to_le32(td->dma_handle); - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status, destination | uhci_explen(0) | (toggle << TD_TOKEN_TOGGLE_SHIFT), @@ -796,7 +851,6 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, wmb(); qh->dummy_td->status |= __constant_cpu_to_le32(TD_CTRL_ACTIVE); qh->dummy_td = td; - qh->period = urb->interval; usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), toggle); @@ -804,180 +858,119 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, nomem: /* Remove the dummy TD from the td_list so it doesn't get freed */ - uhci_remove_td_from_urbp(qh->dummy_td); + uhci_remove_td_from_urb(qh->dummy_td); return -ENOMEM; } -static inline int uhci_submit_bulk(struct uhci_hcd *uhci, struct urb *urb, - struct uhci_qh *qh) -{ - int ret; - - /* Can't have low-speed bulk transfers */ - if (urb->dev->speed == USB_SPEED_LOW) - return -EINVAL; - - qh->skel = uhci->skel_bulk_qh; - ret = uhci_submit_common(uhci, urb, qh); - if (ret == 0) - uhci_add_fsbr(uhci, urb); - return ret; -} - -static int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb, - struct uhci_qh *qh) -{ - int exponent; - - /* USB 1.1 interrupt transfers only involve one packet per interval. - * Drivers can submit URBs of any length, but longer ones will need - * multiple intervals to complete. - */ - - /* Figure out which power-of-two queue to use */ - for (exponent = 7; exponent >= 0; --exponent) { - if ((1 << exponent) <= urb->interval) - break; - } - if (exponent < 0) - return -EINVAL; - urb->interval = 1 << exponent; - - if (qh->period == 0) - qh->skel = uhci->skelqh[UHCI_SKEL_INDEX(exponent)]; - else if (qh->period != urb->interval) - return -EINVAL; /* Can't change the period */ - - return uhci_submit_common(uhci, urb, qh); -} - /* - * Fix up the data structures following a short transfer - */ -static int uhci_fixup_short_transfer(struct uhci_hcd *uhci, - struct uhci_qh *qh, struct urb_priv *urbp) -{ - struct uhci_td *td; - struct list_head *tmp; - int ret; - - td = list_entry(urbp->td_list.prev, struct uhci_td, list); - if (qh->type == USB_ENDPOINT_XFER_CONTROL) { - - /* When a control transfer is short, we have to restart - * the queue at the status stage transaction, which is - * the last TD. */ - WARN_ON(list_empty(&urbp->td_list)); - qh->element = cpu_to_le32(td->dma_handle); - tmp = td->list.prev; - ret = -EINPROGRESS; - - } else { - - /* When a bulk/interrupt transfer is short, we have to - * fix up the toggles of the following URBs on the queue - * before restarting the queue at the next URB. */ - qh->initial_toggle = uhci_toggle(td_token(qh->post_td)) ^ 1; - uhci_fixup_toggles(qh, 1); - - if (list_empty(&urbp->td_list)) - td = qh->post_td; - qh->element = td->link; - tmp = urbp->td_list.prev; - ret = 0; - } - - /* Remove all the TDs we skipped over, from tmp back to the start */ - while (tmp != &urbp->td_list) { - td = list_entry(tmp, struct uhci_td, list); - tmp = tmp->prev; - - uhci_remove_td_from_urbp(td); - uhci_free_td(uhci, td); - } - return ret; -} - -/* - * Common result for control, bulk, and interrupt + * Common result for bulk and interrupt */ static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb) { struct urb_priv *urbp = urb->hcpriv; - struct uhci_qh *qh = urbp->qh; - struct uhci_td *td, *tmp; - unsigned status; + struct uhci_td *td; + unsigned int status = 0; int ret = 0; - list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { - unsigned int ctrlstat; - int len; + urb->actual_length = 0; + + list_for_each_entry(td, &urbp->td_list, list) { + unsigned int ctrlstat = td_status(td); - ctrlstat = td_status(td); status = uhci_status_bits(ctrlstat); if (status & TD_CTRL_ACTIVE) return -EINPROGRESS; - len = uhci_actual_length(ctrlstat); - urb->actual_length += len; + urb->actual_length += uhci_actual_length(ctrlstat); - if (status) { - ret = uhci_map_status(status, - uhci_packetout(td_token(td))); - if ((debug == 1 && ret != -EPIPE) || debug > 1) { - /* Some debugging code */ - dev_dbg(&urb->dev->dev, - "%s: failed with status %x\n", - __FUNCTION__, status); - - if (debug > 1 && errbuf) { - /* Print the chain for debugging */ - uhci_show_qh(urbp->qh, errbuf, - ERRBUF_LEN, 0); - lprintk(errbuf); - } - } - - } else if (len < uhci_expected_length(td_token(td))) { + if (status) + goto td_error; - /* We received a short packet */ - if (urb->transfer_flags & URB_SHORT_NOT_OK) + if (uhci_actual_length(ctrlstat) < + uhci_expected_length(td_token(td))) { + if (urb->transfer_flags & URB_SHORT_NOT_OK) { ret = -EREMOTEIO; + goto err; + } - /* Fixup needed only if this isn't the URB's last TD */ - else if (&td->list != urbp->td_list.prev) - ret = 1; + /* + * This URB stopped short of its end. We have to + * fix up the toggles of the following URBs on the + * queue and restart the queue. But only if this + * TD isn't the last one in the URB. + * + * Do this only the first time we encounter the + * short URB. + */ + if (!urbp->short_transfer && + &td->list != urbp->td_list.prev) { + urbp->short_transfer = 1; + urbp->qh->initial_toggle = + uhci_toggle(td_token(td)) ^ 1; + uhci_fixup_toggles(urbp->qh, 1); + + td = list_entry(urbp->td_list.prev, + struct uhci_td, list); + urbp->qh->element = td->link; + } + break; } + } - uhci_remove_td_from_urbp(td); - if (qh->post_td) - uhci_free_td(uhci, qh->post_td); - qh->post_td = td; + return 0; + +td_error: + ret = uhci_map_status(status, uhci_packetout(td_token(td))); + + if ((debug == 1 && ret != -EPIPE) || debug > 1) { + /* Some debugging code */ + dev_dbg(uhci_dev(uhci), "%s: failed with status %x\n", + __FUNCTION__, status); - if (ret != 0) - goto err; + if (debug > 1 && errbuf) { + /* Print the chain for debugging purposes */ + uhci_show_qh(urbp->qh, errbuf, ERRBUF_LEN, 0); + lprintk(errbuf); + } } +err: + + /* Note that the queue has stopped and save the next toggle value */ + urbp->qh->element = UHCI_PTR_TERM; + urbp->qh->is_stopped = 1; + urbp->qh->needs_fixup = 1; + urbp->qh->initial_toggle = uhci_toggle(td_token(td)) ^ + (ret == -EREMOTEIO); return ret; +} -err: - if (ret < 0) { - /* In case a control transfer gets an error - * during the setup stage */ - urb->actual_length = max(urb->actual_length, 0); - - /* Note that the queue has stopped and save - * the next toggle value */ - qh->element = UHCI_PTR_TERM; - qh->is_stopped = 1; - qh->needs_fixup = (qh->type != USB_ENDPOINT_XFER_CONTROL); - qh->initial_toggle = uhci_toggle(td_token(td)) ^ - (ret == -EREMOTEIO); - - } else /* Short packet received */ - ret = uhci_fixup_short_transfer(uhci, qh, urbp); +static inline int uhci_submit_bulk(struct uhci_hcd *uhci, struct urb *urb, + struct uhci_qh *qh) +{ + int ret; + + /* Can't have low-speed bulk transfers */ + if (urb->dev->speed == USB_SPEED_LOW) + return -EINVAL; + + qh->skel = uhci->skel_bulk_qh; + ret = uhci_submit_common(uhci, urb, qh); + if (ret == 0) + uhci_inc_fsbr(uhci, urb); return ret; } +static inline int uhci_submit_interrupt(struct uhci_hcd *uhci, struct urb *urb, + struct uhci_qh *qh) +{ + /* USB 1.1 interrupt transfers only involve one packet per interval. + * Drivers can submit URBs of any length, but longer ones will need + * multiple intervals to complete. + */ + qh->skel = uhci->skelqh[__interval_to_skel(urb->interval)]; + return uhci_submit_common(uhci, urb, qh); +} + /* * Isochronous transfers */ @@ -989,57 +982,38 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, unsigned long destination, status; struct urb_priv *urbp = (struct urb_priv *) urb->hcpriv; - /* Values must not be too big (could overflow below) */ - if (urb->interval >= UHCI_NUMFRAMES || - urb->number_of_packets >= UHCI_NUMFRAMES) + if (urb->number_of_packets > 900) /* 900? Why? */ return -EFBIG; - /* Check the period and figure out the starting frame number */ - if (qh->period == 0) { - if (urb->transfer_flags & URB_ISO_ASAP) { - uhci_get_current_frame_number(uhci); - urb->start_frame = uhci->frame_number + 10; - } else { - i = urb->start_frame - uhci->last_iso_frame; - if (i <= 0 || i >= UHCI_NUMFRAMES) - return -EINVAL; - } - } else if (qh->period != urb->interval) { - return -EINVAL; /* Can't change the period */ + status = TD_CTRL_ACTIVE | TD_CTRL_IOS; + destination = (urb->pipe & PIPE_DEVEP_MASK) | usb_packetid(urb->pipe); - } else { /* Pick up where the last URB leaves off */ + /* Figure out the starting frame number */ + if (urb->transfer_flags & URB_ISO_ASAP) { if (list_empty(&qh->queue)) { - frame = qh->iso_frame; - } else { - struct urb *lurb; + uhci_get_current_frame_number(uhci); + urb->start_frame = (uhci->frame_number + 10); - lurb = list_entry(qh->queue.prev, + } else { /* Go right after the last one */ + struct urb *last_urb; + + last_urb = list_entry(qh->queue.prev, struct urb_priv, node)->urb; - frame = lurb->start_frame + - lurb->number_of_packets * - lurb->interval; + urb->start_frame = (last_urb->start_frame + + last_urb->number_of_packets * + last_urb->interval); } - if (urb->transfer_flags & URB_ISO_ASAP) - urb->start_frame = frame; - else if (urb->start_frame != frame) - return -EINVAL; + } else { + /* FIXME: Sanity check */ } - - /* Make sure we won't have to go too far into the future */ - if (uhci_frame_before_eq(uhci->last_iso_frame + UHCI_NUMFRAMES, - urb->start_frame + urb->number_of_packets * - urb->interval)) - return -EFBIG; - - status = TD_CTRL_ACTIVE | TD_CTRL_IOS; - destination = (urb->pipe & PIPE_DEVEP_MASK) | usb_packetid(urb->pipe); + urb->start_frame &= (UHCI_NUMFRAMES - 1); for (i = 0; i < urb->number_of_packets; i++) { td = uhci_alloc_td(uhci); if (!td) return -ENOMEM; - uhci_add_td_to_urbp(td, urbp); + uhci_add_td_to_urb(urb, td); uhci_fill_td(td, status, destination | uhci_explen(urb->iso_frame_desc[i].length), urb->transfer_dma + @@ -1050,19 +1024,12 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, td->status |= __constant_cpu_to_le32(TD_CTRL_IOC); qh->skel = uhci->skel_iso_qh; - qh->period = urb->interval; /* Add the TDs to the frame list */ frame = urb->start_frame; list_for_each_entry(td, &urbp->td_list, list) { uhci_insert_td_in_frame_list(uhci, td, frame); - frame += qh->period; - } - - if (list_empty(&qh->queue)) { - qh->iso_packet_desc = &urb->iso_frame_desc[0]; - qh->iso_frame = urb->start_frame; - qh->iso_status = 0; + frame += urb->interval; } return 0; @@ -1070,44 +1037,37 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb, static int uhci_result_isochronous(struct uhci_hcd *uhci, struct urb *urb) { - struct uhci_td *td, *tmp; - struct urb_priv *urbp = urb->hcpriv; - struct uhci_qh *qh = urbp->qh; + struct uhci_td *td; + struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv; + int status; + int i, ret = 0; - list_for_each_entry_safe(td, tmp, &urbp->td_list, list) { - unsigned int ctrlstat; - int status; + urb->actual_length = urb->error_count = 0; + + i = 0; + list_for_each_entry(td, &urbp->td_list, list) { int actlength; + unsigned int ctrlstat = td_status(td); - if (uhci_frame_before_eq(uhci->cur_iso_frame, qh->iso_frame)) + if (ctrlstat & TD_CTRL_ACTIVE) return -EINPROGRESS; - uhci_remove_tds_from_frame(uhci, qh->iso_frame); - - ctrlstat = td_status(td); - if (ctrlstat & TD_CTRL_ACTIVE) { - status = -EXDEV; /* TD was added too late? */ - } else { - status = uhci_map_status(uhci_status_bits(ctrlstat), - usb_pipeout(urb->pipe)); - actlength = uhci_actual_length(ctrlstat); - - urb->actual_length += actlength; - qh->iso_packet_desc->actual_length = actlength; - qh->iso_packet_desc->status = status; - } + actlength = uhci_actual_length(ctrlstat); + urb->iso_frame_desc[i].actual_length = actlength; + urb->actual_length += actlength; + status = uhci_map_status(uhci_status_bits(ctrlstat), + usb_pipeout(urb->pipe)); + urb->iso_frame_desc[i].status = status; if (status) { urb->error_count++; - qh->iso_status = status; + ret = status; } - uhci_remove_td_from_urbp(td); - uhci_free_td(uhci, td); - qh->iso_frame += qh->period; - ++qh->iso_packet_desc; + i++; } - return qh->iso_status; + + return ret; } static int uhci_urb_enqueue(struct usb_hcd *hcd, @@ -1141,14 +1101,14 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, } urbp->qh = qh; - switch (qh->type) { - case USB_ENDPOINT_XFER_CONTROL: + switch (usb_pipetype(urb->pipe)) { + case PIPE_CONTROL: ret = uhci_submit_control(uhci, urb, qh); break; - case USB_ENDPOINT_XFER_BULK: + case PIPE_BULK: ret = uhci_submit_bulk(uhci, urb, qh); break; - case USB_ENDPOINT_XFER_INT: + case PIPE_INTERRUPT: if (list_empty(&qh->queue)) { bustime = usb_check_bandwidth(urb->dev, urb); if (bustime < 0) @@ -1167,8 +1127,7 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, ret = uhci_submit_interrupt(uhci, urb, qh); } break; - case USB_ENDPOINT_XFER_ISOC: - urb->error_count = 0; + case PIPE_ISOCHRONOUS: bustime = usb_check_bandwidth(urb->dev, urb); if (bustime < 0) { ret = bustime; @@ -1189,12 +1148,9 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, /* If the new URB is the first and only one on this QH then either * the QH is new and idle or else it's unlinked and waiting to - * become idle, so we can activate it right away. But only if the - * queue isn't stopped. */ - if (qh->queue.next == &urbp->node && !qh->is_stopped) { + * become idle, so we can activate it right away. */ + if (qh->queue.next == &urbp->node) uhci_activate_qh(uhci, qh); - uhci_urbp_wants_fsbr(uhci, urbp); - } goto done; err_submit_failed: @@ -1214,26 +1170,16 @@ static int uhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb) struct uhci_hcd *uhci = hcd_to_uhci(hcd); unsigned long flags; struct urb_priv *urbp; - struct uhci_qh *qh; spin_lock_irqsave(&uhci->lock, flags); urbp = urb->hcpriv; if (!urbp) /* URB was never linked! */ goto done; - qh = urbp->qh; /* Remove Isochronous TDs from the frame list ASAP */ - if (qh->type == USB_ENDPOINT_XFER_ISOC) { + if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) uhci_unlink_isochronous_tds(uhci, urb); - mb(); - - /* If the URB has already started, update the QH unlink time */ - uhci_get_current_frame_number(uhci); - if (uhci_frame_before_eq(urb->start_frame, uhci->frame_number)) - qh->unlink_frame = uhci->frame_number; - } - - uhci_unlink_qh(uhci, qh); + uhci_unlink_qh(uhci, urbp->qh); done: spin_unlock_irqrestore(&uhci->lock, flags); @@ -1250,17 +1196,22 @@ __acquires(uhci->lock) { struct urb_priv *urbp = (struct urb_priv *) urb->hcpriv; - /* When giving back the first URB in an Isochronous queue, - * reinitialize the QH's iso-related members for the next URB. */ - if (qh->type == USB_ENDPOINT_XFER_ISOC && - urbp->node.prev == &qh->queue && - urbp->node.next != &qh->queue) { - struct urb *nurb = list_entry(urbp->node.next, - struct urb_priv, node)->urb; - - qh->iso_packet_desc = &nurb->iso_frame_desc[0]; - qh->iso_frame = nurb->start_frame; - qh->iso_status = 0; + /* Isochronous TDs get unlinked directly from the frame list */ + if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) + uhci_unlink_isochronous_tds(uhci, urb); + + /* If the URB isn't first on its queue, adjust the link pointer + * of the last TD in the previous URB. */ + else if (qh->queue.next != &urbp->node) { + struct urb_priv *purbp; + struct uhci_td *ptd, *ltd; + + purbp = list_entry(urbp->node.prev, struct urb_priv, node); + ptd = list_entry(purbp->td_list.prev, struct uhci_td, + list); + ltd = list_entry(urbp->td_list.prev, struct uhci_td, + list); + ptd->link = ltd->link; } /* Take the URB off the QH's queue. If the queue is now empty, @@ -1272,15 +1223,16 @@ __acquires(uhci->lock) qh->needs_fixup = 0; } + uhci_dec_fsbr(uhci, urb); /* Safe since it checks */ uhci_free_urb_priv(uhci, urbp); - switch (qh->type) { - case USB_ENDPOINT_XFER_ISOC: + switch (usb_pipetype(urb->pipe)) { + case PIPE_ISOCHRONOUS: /* Release bandwidth for Interrupt or Isoc. transfers */ if (urb->bandwidth) usb_release_bandwidth(urb->dev, urb, 1); break; - case USB_ENDPOINT_XFER_INT: + case PIPE_INTERRUPT: /* Release bandwidth for Interrupt or Isoc. transfers */ /* Make sure we don't release if we have a queued URB */ if (list_empty(&qh->queue) && urb->bandwidth) @@ -1302,7 +1254,6 @@ __acquires(uhci->lock) uhci_unlink_qh(uhci, qh); /* Bandwidth stuff not yet implemented */ - qh->period = 0; } } @@ -1324,10 +1275,17 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh, urbp = list_entry(qh->queue.next, struct urb_priv, node); urb = urbp->urb; - if (qh->type == USB_ENDPOINT_XFER_ISOC) + switch (usb_pipetype(urb->pipe)) { + case PIPE_CONTROL: + status = uhci_result_control(uhci, urb); + break; + case PIPE_ISOCHRONOUS: status = uhci_result_isochronous(uhci, urb); - else + break; + default: /* PIPE_BULK or PIPE_INTERRUPT */ status = uhci_result_common(uhci, urb); + break; + } if (status == -EINPROGRESS) break; @@ -1335,43 +1293,31 @@ static void uhci_scan_qh(struct uhci_hcd *uhci, struct uhci_qh *qh, if (urb->status == -EINPROGRESS) /* Not dequeued */ urb->status = status; else - status = ECONNRESET; /* Not -ECONNRESET */ + status = -ECONNRESET; spin_unlock(&urb->lock); /* Dequeued but completed URBs can't be given back unless * the QH is stopped or has finished unlinking. */ - if (status == ECONNRESET) { - if (QH_FINISHED_UNLINKING(qh)) - qh->is_stopped = 1; - else if (!qh->is_stopped) - return; - } + if (status == -ECONNRESET && + !(qh->is_stopped || QH_FINISHED_UNLINKING(qh))) + return; uhci_giveback_urb(uhci, qh, urb, regs); - if (status < 0 && qh->type != USB_ENDPOINT_XFER_ISOC) + if (qh->is_stopped) break; } /* If the QH is neither stopped nor finished unlinking (normal case), * our work here is done. */ - if (QH_FINISHED_UNLINKING(qh)) - qh->is_stopped = 1; - else if (!qh->is_stopped) + restart: + if (!(qh->is_stopped || QH_FINISHED_UNLINKING(qh))) return; /* Otherwise give back each of the dequeued URBs */ -restart: list_for_each_entry(urbp, &qh->queue, node) { urb = urbp->urb; if (urb->status != -EINPROGRESS) { - - /* Fix up the TD links and save the toggles for - * non-Isochronous queues. For Isochronous queues, - * test for too-recent dequeues. */ - if (!uhci_cleanup_queue(uhci, qh, urb)) { - qh->is_stopped = 0; - return; - } + uhci_save_toggle(qh, urb); uhci_giveback_urb(uhci, qh, urb, regs); goto restart; } @@ -1383,18 +1329,6 @@ restart: if (!list_empty(&qh->queue)) { if (qh->needs_fixup) uhci_fixup_toggles(qh, 0); - - /* If the first URB on the queue wants FSBR but its time - * limit has expired, set the next TD to interrupt on - * completion before reactivating the QH. */ - urbp = list_entry(qh->queue.next, struct urb_priv, node); - if (urbp->fsbr && qh->wait_expired) { - struct uhci_td *td = list_entry(urbp->td_list.next, - struct uhci_td, list); - - td->status |= __cpu_to_le32(TD_CTRL_IOC); - } - uhci_activate_qh(uhci, qh); } @@ -1404,84 +1338,15 @@ restart: uhci_make_qh_idle(uhci, qh); } -/* - * Check for queues that have made some forward progress. - * Returns 0 if the queue is not Isochronous, is ACTIVE, and - * has not advanced since last examined; 1 otherwise. - * - * Early Intel controllers have a bug which causes qh->element sometimes - * not to advance when a TD completes successfully. The queue remains - * stuck on the inactive completed TD. We detect such cases and advance - * the element pointer by hand. - */ -static int uhci_advance_check(struct uhci_hcd *uhci, struct uhci_qh *qh) +static void uhci_free_pending_tds(struct uhci_hcd *uhci) { - struct urb_priv *urbp = NULL; - struct uhci_td *td; - int ret = 1; - unsigned status; - - if (qh->type == USB_ENDPOINT_XFER_ISOC) - goto done; - - /* Treat an UNLINKING queue as though it hasn't advanced. - * This is okay because reactivation will treat it as though - * it has advanced, and if it is going to become IDLE then - * this doesn't matter anyway. Furthermore it's possible - * for an UNLINKING queue not to have any URBs at all, or - * for its first URB not to have any TDs (if it was dequeued - * just as it completed). So it's not easy in any case to - * test whether such queues have advanced. */ - if (qh->state != QH_STATE_ACTIVE) { - urbp = NULL; - status = 0; - - } else { - urbp = list_entry(qh->queue.next, struct urb_priv, node); - td = list_entry(urbp->td_list.next, struct uhci_td, list); - status = td_status(td); - if (!(status & TD_CTRL_ACTIVE)) { - - /* We're okay, the queue has advanced */ - qh->wait_expired = 0; - qh->advance_jiffies = jiffies; - goto done; - } - ret = 0; - } - - /* The queue hasn't advanced; check for timeout */ - if (qh->wait_expired) - goto done; - - if (time_after(jiffies, qh->advance_jiffies + QH_WAIT_TIMEOUT)) { - - /* Detect the Intel bug and work around it */ - if (qh->post_td && qh_element(qh) == - cpu_to_le32(qh->post_td->dma_handle)) { - qh->element = qh->post_td->link; - qh->advance_jiffies = jiffies; - ret = 1; - goto done; - } - - qh->wait_expired = 1; + struct uhci_td *td, *tmp; - /* If the current URB wants FSBR, unlink it temporarily - * so that we can safely set the next TD to interrupt on - * completion. That way we'll know as soon as the queue - * starts moving again. */ - if (urbp && urbp->fsbr && !(status & TD_CTRL_IOC)) - uhci_unlink_qh(uhci, qh); + list_for_each_entry_safe(td, tmp, &uhci->td_remove_list, remove_list) { + list_del_init(&td->remove_list); - } else { - /* Unmoving but not-yet-expired queues keep FSBR alive */ - if (urbp) - uhci_urbp_wants_fsbr(uhci, urbp); + uhci_free_td(uhci, td); } - -done: - return ret; } /* @@ -1498,13 +1363,14 @@ static void uhci_scan_schedule(struct uhci_hcd *uhci, struct pt_regs *regs) return; } uhci->scan_in_progress = 1; -rescan: + rescan: uhci->need_rescan = 0; - uhci->fsbr_is_wanted = 0; uhci_clear_next_interrupt(uhci); uhci_get_current_frame_number(uhci); - uhci->cur_iso_frame = uhci->frame_number; + + if (uhci->frame_number + uhci->is_stopped != uhci->td_remove_age) + uhci_free_pending_tds(uhci); /* Go through all the QH queues and process the URBs in each one */ for (i = 0; i < UHCI_NUM_SKELQH - 1; ++i) { @@ -1513,30 +1379,33 @@ rescan: while ((qh = uhci->next_qh) != uhci->skelqh[i]) { uhci->next_qh = list_entry(qh->node.next, struct uhci_qh, node); - - if (uhci_advance_check(uhci, qh)) { - uhci_scan_qh(uhci, qh, regs); - if (qh->state == QH_STATE_ACTIVE) { - uhci_urbp_wants_fsbr(uhci, - list_entry(qh->queue.next, struct urb_priv, node)); - } - } + uhci_scan_qh(uhci, qh, regs); } } - uhci->last_iso_frame = uhci->cur_iso_frame; if (uhci->need_rescan) goto rescan; uhci->scan_in_progress = 0; - if (uhci->fsbr_is_on && !uhci->fsbr_is_wanted && - !uhci->fsbr_expiring) { - uhci->fsbr_expiring = 1; - mod_timer(&uhci->fsbr_timer, jiffies + FSBR_OFF_DELAY); - } + /* If the controller is stopped, we can finish these off right now */ + if (uhci->is_stopped) + uhci_free_pending_tds(uhci); - if (list_empty(&uhci->skel_unlink_qh->node)) + if (list_empty(&uhci->td_remove_list) && + list_empty(&uhci->skel_unlink_qh->node)) uhci_clear_next_interrupt(uhci); else uhci_set_next_interrupt(uhci); } + +static void check_fsbr(struct uhci_hcd *uhci) +{ + /* For now, don't scan URBs for FSBR timeouts. + * Add it back in later... */ + + /* Really disable FSBR */ + if (!uhci->fsbr && uhci->fsbrtimeout && time_after_eq(jiffies, uhci->fsbrtimeout)) { + uhci->fsbrtimeout = 0; + uhci->skel_term_qh->link = UHCI_PTR_TERM; + } +} diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index b2bafc37c..2a0e18a48 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -513,7 +513,7 @@ static void mts_do_sg (struct urb* transfer, struct pt_regs *regs) mts_transfer_cleanup(transfer); } - sg = context->srb->request_buffer; + sg = context->srb->buffer; context->fragment++; mts_int_submit_urb(transfer, context->data_pipe, @@ -549,19 +549,19 @@ mts_build_transfer_context( Scsi_Cmnd *srb, struct mts_desc* desc ) desc->context.fragment = 0; if (!srb->use_sg) { - if ( !srb->request_bufflen ){ + if ( !srb->bufflen ){ desc->context.data = NULL; desc->context.data_length = 0; return; } else { - desc->context.data = srb->request_buffer; - desc->context.data_length = srb->request_bufflen; + desc->context.data = srb->buffer; + desc->context.data_length = srb->bufflen; MTS_DEBUG("length = %d or %d\n", srb->request_bufflen, srb->bufflen); } } else { MTS_DEBUG("Using scatter/gather\n"); - sg = srb->request_buffer; + sg = srb->buffer; desc->context.data = page_address(sg[0].page) + sg[0].offset; desc->context.data_length = sg[0].length; } diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c index 18c10e150..df29b8078 100644 --- a/drivers/usb/input/acecad.c +++ b/drivers/usb/input/acecad.c @@ -27,9 +27,11 @@ #include #include +#include #include #include -#include +#include +#include /* * Version Information diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index b138dae2b..a6693b0d1 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c @@ -73,9 +73,11 @@ #include #include #include +#include #include #include -#include +#include +#include #include #include #include diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 044faa07e..c222ed13d 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c @@ -1,5 +1,5 @@ /* - * Apple USB Touchpad (for post-February 2005 PowerBooks and MacBooks) driver + * Apple USB Touchpad (for post-February 2005 PowerBooks) driver * * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com) * Copyright (C) 2005 Johannes Berg (johannes@sipsolutions.net) @@ -7,7 +7,6 @@ * Copyright (C) 2005 Frank Arnold (frank@scirocco-5v-turbo.de) * Copyright (C) 2005 Peter Osterlund (petero2@telia.com) * Copyright (C) 2005 Michael Hanselmann (linux-kernel@hansmi.ch) - * Copyright (C) 2006 Nicolas Boichat (nicolas@boichat.ch) * * Thanks to Alex Harper for his inputs. * @@ -27,12 +26,15 @@ * */ +#include #include #include #include #include #include -#include +#include +#include +#include /* Apple has powerbooks which have the keyboard with different Product IDs */ #define APPLE_VENDOR_ID 0x05AC @@ -42,11 +44,6 @@ #define GEYSER_ISO_PRODUCT_ID 0x0215 #define GEYSER_JIS_PRODUCT_ID 0x0216 -/* MacBook devices */ -#define GEYSER3_ANSI_PRODUCT_ID 0x0217 -#define GEYSER3_ISO_PRODUCT_ID 0x0218 -#define GEYSER3_JIS_PRODUCT_ID 0x0219 - #define ATP_DEVICE(prod) \ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ USB_DEVICE_ID_MATCH_INT_CLASS | \ @@ -68,10 +65,6 @@ static struct usb_device_id atp_table [] = { { ATP_DEVICE(GEYSER_ISO_PRODUCT_ID) }, { ATP_DEVICE(GEYSER_JIS_PRODUCT_ID) }, - { ATP_DEVICE(GEYSER3_ANSI_PRODUCT_ID) }, - { ATP_DEVICE(GEYSER3_ISO_PRODUCT_ID) }, - { ATP_DEVICE(GEYSER3_JIS_PRODUCT_ID) }, - /* Terminating entry */ { } }; @@ -108,13 +101,6 @@ MODULE_DEVICE_TABLE (usb, atp_table); */ #define ATP_THRESHOLD 5 -/* MacBook Pro (Geyser 3) initialization constants */ -#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1 -#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9 -#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300 -#define ATP_GEYSER3_MODE_REQUEST_INDEX 0 -#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04 - /* Structure to hold all of our device specific stuff */ struct atp { char phys[64]; @@ -161,22 +147,13 @@ MODULE_PARM_DESC(debug, "Activate debugging output"); /* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */ static inline int atp_is_geyser_2(struct atp *dev) { - u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct); + int16_t productId = le16_to_cpu(dev->udev->descriptor.idProduct); return (productId == GEYSER_ANSI_PRODUCT_ID) || (productId == GEYSER_ISO_PRODUCT_ID) || (productId == GEYSER_JIS_PRODUCT_ID); } -static inline int atp_is_geyser_3(struct atp *dev) -{ - u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct); - - return (productId == GEYSER3_ANSI_PRODUCT_ID) || - (productId == GEYSER3_ISO_PRODUCT_ID) || - (productId == GEYSER3_JIS_PRODUCT_ID); -} - static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact, int *z, int *fingers) { @@ -242,33 +219,12 @@ static void atp_complete(struct urb* urb, struct pt_regs* regs) /* drop incomplete datasets */ if (dev->urb->actual_length != dev->datalen) { - dprintk("appletouch: incomplete data package" - " (first byte: %d, length: %d).\n", - dev->data[0], dev->urb->actual_length); + dprintk("appletouch: incomplete data package.\n"); goto exit; } /* reorder the sensors values */ - if (atp_is_geyser_3(dev)) { - memset(dev->xy_cur, 0, sizeof(dev->xy_cur)); - - /* - * The values are laid out like this: - * -, Y1, Y2, -, Y3, Y4, -, ..., -, X1, X2, -, X3, X4, ... - * '-' is an unused value. - */ - - /* read X values */ - for (i = 0, j = 19; i < 20; i += 2, j += 3) { - dev->xy_cur[i] = dev->data[j + 1]; - dev->xy_cur[i + 1] = dev->data[j + 2]; - } - /* read Y values */ - for (i = 0, j = 1; i < 9; i += 2, j += 3) { - dev->xy_cur[ATP_XSENSORS + i] = dev->data[j + 1]; - dev->xy_cur[ATP_XSENSORS + i + 1] = dev->data[j + 2]; - } - } else if (atp_is_geyser_2(dev)) { + if (atp_is_geyser_2(dev)) { memset(dev->xy_cur, 0, sizeof(dev->xy_cur)); /* @@ -311,9 +267,6 @@ static void atp_complete(struct urb* urb, struct pt_regs* regs) dev->x_old = dev->y_old = -1; memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old)); - if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */ - goto exit; - /* 17" Powerbooks have extra X sensors */ for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) { if (!dev->xy_cur[i]) continue; @@ -461,50 +414,7 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id dev->udev = udev; dev->input = input_dev; dev->overflowwarn = 0; - if (atp_is_geyser_3(dev)) - dev->datalen = 64; - else if (atp_is_geyser_2(dev)) - dev->datalen = 64; - else - dev->datalen = 81; - - if (atp_is_geyser_3(dev)) { - /* - * By default Geyser 3 device sends standard USB HID mouse - * packets (Report ID 2). This code changes device mode, so it - * sends raw sensor reports (Report ID 5). - */ - char data[8]; - int size; - - size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), - ATP_GEYSER3_MODE_READ_REQUEST_ID, - USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ATP_GEYSER3_MODE_REQUEST_VALUE, - ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); - - if (size != 8) { - err("Could not do mode read request from device" - " (Geyser 3 mode)"); - goto err_free_devs; - } - - /* Apply the mode switch */ - data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE; - - size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - ATP_GEYSER3_MODE_WRITE_REQUEST_ID, - USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ATP_GEYSER3_MODE_REQUEST_VALUE, - ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000); - - if (size != 8) { - err("Could not do mode write request to device" - " (Geyser 3 mode)"); - goto err_free_devs; - } - printk("appletouch Geyser 3 inited.\n"); - } + dev->datalen = (atp_is_geyser_2(dev)?64:81); dev->urb = usb_alloc_urb(0, GFP_KERNEL); if (!dev->urb) { @@ -537,15 +447,7 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id set_bit(EV_ABS, input_dev->evbit); - if (atp_is_geyser_3(dev)) { - /* - * MacBook have 20 X sensors, 10 Y sensors - */ - input_set_abs_params(input_dev, ABS_X, 0, - ((20 - 1) * ATP_XFACT) - 1, ATP_FUZZ, 0); - input_set_abs_params(input_dev, ABS_Y, 0, - ((10 - 1) * ATP_YFACT) - 1, ATP_FUZZ, 0); - } else if (atp_is_geyser_2(dev)) { + if (atp_is_geyser_2(dev)) { /* * Oct 2005 15" PowerBooks have 15 X sensors, 17" are detected * later. @@ -597,9 +499,9 @@ static void atp_disconnect(struct usb_interface *iface) if (dev) { usb_kill_urb(dev->urb); input_unregister_device(dev->input); + usb_free_urb(dev->urb); usb_buffer_free(dev->udev, dev->datalen, dev->data, dev->urb->transfer_dma); - usb_free_urb(dev->urb); kfree(dev); } printk(KERN_INFO "input: appletouch disconnected\n"); diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c index 3719fcb04..99f986cb6 100644 --- a/drivers/usb/input/ati_remote.c +++ b/drivers/usb/input/ati_remote.c @@ -85,13 +85,16 @@ * */ +#include #include #include #include #include #include #include -#include +#include +#include +#include #include #include @@ -111,28 +114,14 @@ #define NAME_BUFSIZE 80 /* size of product name, path buffers */ #define DATA_BUFSIZE 63 /* size of URB data buffers */ -/* - * Duplicate event filtering time. - * Sequential, identical KIND_FILTERED inputs with less than - * FILTER_TIME milliseconds between them are considered as repeat - * events. The hardware generates 5 events for the first keypress - * and we have to take this into account for an accurate repeat - * behaviour. - */ -#define FILTER_TIME 60 /* msec */ - static unsigned long channel_mask; -module_param(channel_mask, ulong, 0644); +module_param(channel_mask, ulong, 0444); MODULE_PARM_DESC(channel_mask, "Bitmask of remote control channels to ignore"); static int debug; -module_param(debug, int, 0644); +module_param(debug, int, 0444); MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); -static int repeat_filter = FILTER_TIME; -module_param(repeat_filter, int, 0644); -MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec"); - #define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) #undef err #define err(format, arg...) printk(KERN_ERR format , ## arg) @@ -157,6 +146,19 @@ MODULE_DEVICE_TABLE(usb, ati_remote_table); static char init1[] = { 0x01, 0x00, 0x20, 0x14 }; static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; +/* Acceleration curve for directional control pad */ +static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; + +/* Duplicate event filtering time. + * Sequential, identical KIND_FILTERED inputs with less than + * FILTER_TIME jiffies between them are considered as repeat + * events. The hardware generates 5 events for the first keypress + * and we have to take this into account for an accurate repeat + * behaviour. + * (HZ / 20) == 50 ms and works well for me. + */ +#define FILTER_TIME (HZ / 20) + struct ati_remote { struct input_dev *idev; struct usb_device *udev; @@ -413,43 +415,6 @@ static int ati_remote_event_lookup(int rem, unsigned char d1, unsigned char d2) return -1; } -/* - * ati_remote_compute_accel - * - * Implements acceleration curve for directional control pad - * If elapsed time since last event is > 1/4 second, user "stopped", - * so reset acceleration. Otherwise, user is probably holding the control - * pad down, so we increase acceleration, ramping up over two seconds to - * a maximum speed. - */ -static int ati_remote_compute_accel(struct ati_remote *ati_remote) -{ - static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; - unsigned long now = jiffies; - int acc; - - if (time_after(now, ati_remote->old_jiffies + msecs_to_jiffies(250))) { - acc = 1; - ati_remote->acc_jiffies = now; - } - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(125))) - acc = accel[0]; - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(250))) - acc = accel[1]; - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(500))) - acc = accel[2]; - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(1000))) - acc = accel[3]; - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(1500))) - acc = accel[4]; - else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(2000))) - acc = accel[5]; - else - acc = accel[6]; - - return acc; -} - /* * ati_remote_report_input */ @@ -503,9 +468,9 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) if (ati_remote_tbl[index].kind == KIND_FILTERED) { /* Filter duplicate events which happen "too close" together. */ - if (ati_remote->old_data[0] == data[1] && - ati_remote->old_data[1] == data[2] && - time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(repeat_filter))) { + if ((ati_remote->old_data[0] == data[1]) && + (ati_remote->old_data[1] == data[2]) && + time_before(jiffies, ati_remote->old_jiffies + FILTER_TIME)) { ati_remote->repeat_count++; } else { ati_remote->repeat_count = 0; @@ -515,61 +480,75 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) ati_remote->old_data[1] = data[2]; ati_remote->old_jiffies = jiffies; - if (ati_remote->repeat_count > 0 && - ati_remote->repeat_count < 5) + if ((ati_remote->repeat_count > 0) + && (ati_remote->repeat_count < 5)) return; input_regs(dev, regs); input_event(dev, ati_remote_tbl[index].type, ati_remote_tbl[index].code, 1); - input_sync(dev); input_event(dev, ati_remote_tbl[index].type, ati_remote_tbl[index].code, 0); input_sync(dev); - } else { - - /* - * Other event kinds are from the directional control pad, and have an - * acceleration factor applied to them. Without this acceleration, the - * control pad is mostly unusable. - */ - acc = ati_remote_compute_accel(ati_remote); - - input_regs(dev, regs); - switch (ati_remote_tbl[index].kind) { - case KIND_ACCEL: - input_event(dev, ati_remote_tbl[index].type, - ati_remote_tbl[index].code, - ati_remote_tbl[index].value * acc); - break; - case KIND_LU: - input_report_rel(dev, REL_X, -acc); - input_report_rel(dev, REL_Y, -acc); - break; - case KIND_RU: - input_report_rel(dev, REL_X, acc); - input_report_rel(dev, REL_Y, -acc); - break; - case KIND_LD: - input_report_rel(dev, REL_X, -acc); - input_report_rel(dev, REL_Y, acc); - break; - case KIND_RD: - input_report_rel(dev, REL_X, acc); - input_report_rel(dev, REL_Y, acc); - break; - default: - dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", - ati_remote_tbl[index].kind); - } - input_sync(dev); + return; + } - ati_remote->old_jiffies = jiffies; - ati_remote->old_data[0] = data[1]; - ati_remote->old_data[1] = data[2]; + /* + * Other event kinds are from the directional control pad, and have an + * acceleration factor applied to them. Without this acceleration, the + * control pad is mostly unusable. + * + * If elapsed time since last event is > 1/4 second, user "stopped", + * so reset acceleration. Otherwise, user is probably holding the control + * pad down, so we increase acceleration, ramping up over two seconds to + * a maximum speed. The acceleration curve is #defined above. + */ + if (time_after(jiffies, ati_remote->old_jiffies + (HZ >> 2))) { + acc = 1; + ati_remote->acc_jiffies = jiffies; + } + else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 3))) acc = accel[0]; + else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 2))) acc = accel[1]; + else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 1))) acc = accel[2]; + else if (time_before(jiffies, ati_remote->acc_jiffies + HZ)) acc = accel[3]; + else if (time_before(jiffies, ati_remote->acc_jiffies + HZ+(HZ>>1))) acc = accel[4]; + else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ << 1))) acc = accel[5]; + else acc = accel[6]; + + input_regs(dev, regs); + switch (ati_remote_tbl[index].kind) { + case KIND_ACCEL: + input_event(dev, ati_remote_tbl[index].type, + ati_remote_tbl[index].code, + ati_remote_tbl[index].value * acc); + break; + case KIND_LU: + input_report_rel(dev, REL_X, -acc); + input_report_rel(dev, REL_Y, -acc); + break; + case KIND_RU: + input_report_rel(dev, REL_X, acc); + input_report_rel(dev, REL_Y, -acc); + break; + case KIND_LD: + input_report_rel(dev, REL_X, -acc); + input_report_rel(dev, REL_Y, acc); + break; + case KIND_RD: + input_report_rel(dev, REL_X, acc); + input_report_rel(dev, REL_Y, acc); + break; + default: + dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", + ati_remote_tbl[index].kind); } + input_sync(dev); + + ati_remote->old_jiffies = jiffies; + ati_remote->old_data[0] = data[1]; + ati_remote->old_data[1] = data[2]; } /* diff --git a/drivers/usb/input/ati_remote2.c b/drivers/usb/input/ati_remote2.c index ea71de81c..ab1a1ae24 100644 --- a/drivers/usb/input/ati_remote2.c +++ b/drivers/usb/input/ati_remote2.c @@ -8,7 +8,7 @@ * as published by the Free Software Foundation. */ -#include +#include #define DRIVER_DESC "ATI/Philips USB RF remote driver" #define DRIVER_VERSION "0.1" diff --git a/drivers/usb/input/fixp-arith.h b/drivers/usb/input/fixp-arith.h index ed3d2da0c..b44d398de 100644 --- a/drivers/usb/input/fixp-arith.h +++ b/drivers/usb/input/fixp-arith.h @@ -2,6 +2,8 @@ #define _FIXP_ARITH_H /* + * $$ + * * Simplistic fixed-point arithmetics. * Hmm, I'm probably duplicating some code :( * @@ -29,20 +31,20 @@ #include -/* The type representing fixed-point values */ +// The type representing fixed-point values typedef s16 fixp_t; #define FRAC_N 8 #define FRAC_MASK ((1<>= 1; diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 19aaf5681..435273e7c 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c @@ -944,28 +944,21 @@ static void hid_reset(void *_hid) dev_dbg(&hid->intf->dev, "resetting device\n"); rc = rc_lock = usb_lock_device_for_reset(hid->dev, hid->intf); if (rc_lock >= 0) { - rc = usb_reset_composite_device(hid->dev, hid->intf); + rc = usb_reset_device(hid->dev); if (rc_lock) usb_unlock_device(hid->dev); } clear_bit(HID_RESET_PENDING, &hid->iofl); - switch (rc) { - case 0: - if (!test_bit(HID_IN_RUNNING, &hid->iofl)) + if (rc == 0) { + hid->retry_delay = 0; + if (hid_start_in(hid)) hid_io_error(hid); - break; - default: + } else if (!(rc == -ENODEV || rc == -EHOSTUNREACH || rc == -EINTR)) err("can't reset device, %s-%s/input%d, status %d", hid->dev->bus->bus_name, hid->dev->devpath, hid->ifnum, rc); - /* FALLTHROUGH */ - case -EHOSTUNREACH: - case -ENODEV: - case -EINTR: - break; - } } /* Main I/O error handler */ @@ -1381,6 +1374,9 @@ void hid_close(struct hid_device *hid) #define USB_VENDOR_ID_PANJIT 0x134c +#define USB_VENDOR_ID_SILVERCREST 0x062a +#define USB_DEVICE_ID_SILVERCREST_KB 0x0201 + /* * Initialize all reports */ @@ -1411,54 +1407,17 @@ void hid_init_reports(struct hid_device *hid) warn("timeout initializing reports"); } -#define USB_VENDOR_ID_GTCO 0x078c -#define USB_DEVICE_ID_GTCO_90 0x0090 -#define USB_DEVICE_ID_GTCO_100 0x0100 -#define USB_DEVICE_ID_GTCO_101 0x0101 -#define USB_DEVICE_ID_GTCO_103 0x0103 -#define USB_DEVICE_ID_GTCO_104 0x0104 -#define USB_DEVICE_ID_GTCO_105 0x0105 -#define USB_DEVICE_ID_GTCO_106 0x0106 -#define USB_DEVICE_ID_GTCO_107 0x0107 -#define USB_DEVICE_ID_GTCO_108 0x0108 -#define USB_DEVICE_ID_GTCO_200 0x0200 -#define USB_DEVICE_ID_GTCO_201 0x0201 -#define USB_DEVICE_ID_GTCO_202 0x0202 -#define USB_DEVICE_ID_GTCO_203 0x0203 -#define USB_DEVICE_ID_GTCO_204 0x0204 -#define USB_DEVICE_ID_GTCO_205 0x0205 -#define USB_DEVICE_ID_GTCO_206 0x0206 -#define USB_DEVICE_ID_GTCO_207 0x0207 -#define USB_DEVICE_ID_GTCO_300 0x0300 -#define USB_DEVICE_ID_GTCO_301 0x0301 -#define USB_DEVICE_ID_GTCO_302 0x0302 -#define USB_DEVICE_ID_GTCO_303 0x0303 -#define USB_DEVICE_ID_GTCO_304 0x0304 -#define USB_DEVICE_ID_GTCO_305 0x0305 -#define USB_DEVICE_ID_GTCO_306 0x0306 -#define USB_DEVICE_ID_GTCO_307 0x0307 -#define USB_DEVICE_ID_GTCO_308 0x0308 -#define USB_DEVICE_ID_GTCO_309 0x0309 -#define USB_DEVICE_ID_GTCO_400 0x0400 -#define USB_DEVICE_ID_GTCO_401 0x0401 -#define USB_DEVICE_ID_GTCO_402 0x0402 -#define USB_DEVICE_ID_GTCO_403 0x0403 -#define USB_DEVICE_ID_GTCO_404 0x0404 -#define USB_DEVICE_ID_GTCO_405 0x0405 -#define USB_DEVICE_ID_GTCO_500 0x0500 -#define USB_DEVICE_ID_GTCO_501 0x0501 -#define USB_DEVICE_ID_GTCO_502 0x0502 -#define USB_DEVICE_ID_GTCO_503 0x0503 -#define USB_DEVICE_ID_GTCO_504 0x0504 -#define USB_DEVICE_ID_GTCO_1000 0x1000 -#define USB_DEVICE_ID_GTCO_1001 0x1001 -#define USB_DEVICE_ID_GTCO_1002 0x1002 -#define USB_DEVICE_ID_GTCO_1003 0x1003 -#define USB_DEVICE_ID_GTCO_1004 0x1004 -#define USB_DEVICE_ID_GTCO_1005 0x1005 -#define USB_DEVICE_ID_GTCO_1006 0x1006 - #define USB_VENDOR_ID_WACOM 0x056a +#define USB_DEVICE_ID_WACOM_PENPARTNER 0x0000 +#define USB_DEVICE_ID_WACOM_GRAPHIRE 0x0010 +#define USB_DEVICE_ID_WACOM_INTUOS 0x0020 +#define USB_DEVICE_ID_WACOM_PL 0x0030 +#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040 +#define USB_DEVICE_ID_WACOM_VOLITO 0x0060 +#define USB_DEVICE_ID_WACOM_PTU 0x0003 +#define USB_DEVICE_ID_WACOM_INTUOS3 0x00B0 +#define USB_DEVICE_ID_WACOM_CINTIQ 0x003F +#define USB_DEVICE_ID_WACOM_DTF 0x00C0 #define USB_VENDOR_ID_ACECAD 0x0460 #define USB_DEVICE_ID_ACECAD_FLAIR 0x0004 @@ -1502,6 +1461,9 @@ void hid_init_reports(struct hid_device *hid) #define USB_VENDOR_ID_ONTRAK 0x0a07 #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064 +#define USB_VENDOR_ID_TANGTOP 0x0d3d +#define USB_DEVICE_ID_TANGTOP_USBPS2 0x0001 + #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 @@ -1544,9 +1506,6 @@ void hid_init_reports(struct hid_device *hid) #define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 #define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 -#define USB_VENDOR_ID_WISEGROUP_LTD 0x6677 -#define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802 - #define USB_VENDOR_ID_CODEMERCS 0x07c0 #define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500 #define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501 @@ -1561,6 +1520,12 @@ void hid_init_reports(struct hid_device *hid) #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076 #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a +#define USB_VENDOR_ID_CHICONY 0x04f2 +#define USB_DEVICE_ID_CHICONY_USBHUB_KB 0x0100 + +#define USB_VENDOR_ID_BTC 0x046e +#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303 + #define USB_VENDOR_ID_VERNIER 0x08f7 #define USB_DEVICE_ID_VERNIER_LABPRO 0x0001 #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 @@ -1584,13 +1549,20 @@ void hid_init_reports(struct hid_device *hid) #define USB_DEVICE_ID_LD_MACHINETEST 0x2040 #define USB_VENDOR_ID_APPLE 0x05ac -#define USB_DEVICE_ID_APPLE_MIGHTYMOUSE 0x0304 +#define USB_DEVICE_ID_APPLE_POWERMOUSE 0x0304 #define USB_VENDOR_ID_CHERRY 0x046a #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 -#define USB_VENDOR_ID_YEALINK 0x6993 -#define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001 +#define USB_VENDOR_ID_HP 0x03f0 +#define USB_DEVICE_ID_HP_USBHUB_KB 0x020c + +#define USB_VENDOR_ID_IBM 0x04b3 +#define USB_DEVICE_ID_IBM_USBHUB_KB 0x3005 + +#define USB_VENDOR_ID_CREATIVELABS 0x062a +#define USB_DEVICE_ID_CREATIVELABS_SILVERCREST 0x0201 + /* * Alphabetically sorted blacklist by quirk type. */ @@ -1625,51 +1597,6 @@ static const struct hid_blacklist { { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_100, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_101, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_103, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_104, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_105, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_106, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_107, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_108, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_200, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_201, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_202, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_203, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_204, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_205, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_206, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_207, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_300, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_301, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_302, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_303, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_304, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_305, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_306, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_307, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_308, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_309, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_400, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_401, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1003, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE }, @@ -1699,9 +1626,51 @@ static const struct hid_blacklist { { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 7, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 8, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 9, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 6, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 1, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 2, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 3, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 4, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 5, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_CINTIQ, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF, HID_QUIRK_IGNORE }, + { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF + 3, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, - { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, @@ -1711,10 +1680,16 @@ static const 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_BTC, USB_DEVICE_ID_BTC_KEYBOARD, HID_QUIRK_NOGET}, + { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET}, + { USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVELABS_SILVERCREST, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_HP, USB_DEVICE_ID_HP_USBHUB_KB, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_USBHUB_KB, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET }, { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, - { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_SILVERCREST, USB_DEVICE_ID_SILVERCREST_KB, HID_QUIRK_NOGET }, - { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_POWERMOUSE, HID_QUIRK_2WHEEL_POWERMOUSE }, { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, @@ -1734,11 +1709,8 @@ static const struct hid_blacklist { { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, + { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN }, - { USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD}, - { USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN }, { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN }, @@ -1817,23 +1789,11 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) char *rdesc; int n, len, insize = 0; - /* Ignore all Wacom devices */ - if (dev->descriptor.idVendor == USB_VENDOR_ID_WACOM) - return NULL; - for (n = 0; hid_blacklist[n].idVendor; n++) if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) && (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct))) quirks = hid_blacklist[n].quirks; - /* Many keyboards and mice don't like to be polled for reports, - * so we will always set the HID_QUIRK_NOGET flag for them. */ - if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT) { - if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_KEYBOARD || - interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE) - quirks |= HID_QUIRK_NOGET; - } - if (quirks & HID_QUIRK_IGNORE) return NULL; @@ -2120,29 +2080,11 @@ static int hid_resume(struct usb_interface *intf) int status; clear_bit(HID_SUSPENDED, &hid->iofl); - hid->retry_delay = 0; status = hid_start_in(hid); dev_dbg(&intf->dev, "resume status %d\n", status); return status; } -/* Treat USB reset pretty much the same as suspend/resume */ -static void hid_pre_reset(struct usb_interface *intf) -{ - /* FIXME: What if the interface is already suspended? */ - hid_suspend(intf, PMSG_ON); -} - -static void hid_post_reset(struct usb_interface *intf) -{ - struct usb_device *dev = interface_to_usbdev (intf); - - hid_set_idle(dev, intf->cur_altsetting->desc.bInterfaceNumber, 0, 0); - /* FIXME: Any more reinitialization needed? */ - - hid_resume(intf); -} - static struct usb_device_id hid_usb_ids [] = { { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, .bInterfaceClass = USB_INTERFACE_CLASS_HID }, @@ -2157,8 +2099,6 @@ static struct usb_driver hid_driver = { .disconnect = hid_disconnect, .suspend = hid_suspend, .resume = hid_resume, - .pre_reset = hid_pre_reset, - .post_reset = hid_post_reset, .id_table = hid_usb_ids, }; diff --git a/drivers/usb/input/hid-debug.h b/drivers/usb/input/hid-debug.h index f04d6d75c..702c48c2f 100644 --- a/drivers/usb/input/hid-debug.h +++ b/drivers/usb/input/hid-debug.h @@ -563,7 +563,7 @@ static char *keys[KEY_MAX + 1] = { [KEY_VOLUMEUP] = "VolumeUp", [KEY_POWER] = "Power", [KEY_KPEQUAL] = "KPEqual", [KEY_KPPLUSMINUS] = "KPPlusMinus", [KEY_PAUSE] = "Pause", [KEY_KPCOMMA] = "KPComma", - [KEY_HANGUEL] = "Hangeul", [KEY_HANJA] = "Hanja", + [KEY_HANGUEL] = "Hanguel", [KEY_HANJA] = "Hanja", [KEY_YEN] = "Yen", [KEY_LEFTMETA] = "LeftMeta", [KEY_RIGHTMETA] = "RightMeta", [KEY_COMPOSE] = "Compose", [KEY_STOP] = "Stop", [KEY_AGAIN] = "Again", diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 2ae4fb9a7..25bc85f8c 100644 --- a/drivers/usb/input/hid-input.c +++ b/drivers/usb/input/hid-input.c @@ -29,7 +29,9 @@ #include #include #include -#include +#include +#include +#include #undef DEBUG @@ -123,12 +125,6 @@ static struct hidinput_key_translation powerbook_numlock_keys[] = { { } }; -static struct hidinput_key_translation powerbook_iso_keyboard[] = { - { KEY_GRAVE, KEY_102ND }, - { KEY_102ND, KEY_GRAVE }, - { } -}; - static int usbhid_pb_fnmode = 1; module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644); MODULE_PARM_DESC(pb_fnmode, @@ -203,14 +199,6 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input, } } - if (hid->quirks & HID_QUIRK_POWERBOOK_ISO_KEYBOARD) { - trans = find_translation(powerbook_iso_keyboard, usage->code); - if (trans) { - input_event(input, usage->type, trans->to, value); - return 1; - } - } - return 0; } @@ -226,9 +214,6 @@ static void hidinput_pb_setup(struct input_dev *input) for (trans = powerbook_numlock_keys; trans->from; trans++) set_bit(trans->to, input->keybit); - - for (trans = powerbook_iso_keyboard; trans->from; trans++) - set_bit(trans->to, input->keybit); } #else static inline int hidinput_pb_event(struct hid_device *hid, struct input_dev *input, @@ -582,23 +567,6 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel break; } - if (device->quirks & HID_QUIRK_MIGHTYMOUSE) { - if (usage->hid == HID_GD_Z) - map_rel(REL_HWHEEL); - else if (usage->code == BTN_1) - map_key(BTN_2); - else if (usage->code == BTN_2) - map_key(BTN_1); - } - - if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && - (usage->type == EV_REL) && (usage->code == REL_WHEEL)) - set_bit(REL_HWHEEL, bit); - - if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005)) - || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) - goto ignore; - set_bit(usage->type, input->evbit); while (usage->code <= max && test_and_set_bit(usage->code, bit)) @@ -607,6 +575,16 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel if (usage->code > max) goto ignore; + if (((device->quirks & (HID_QUIRK_2WHEEL_POWERMOUSE)) && (usage->hid == 0x00010032))) + map_rel(REL_HWHEEL); + + if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && + (usage->type == EV_REL) && (usage->code == REL_WHEEL)) + set_bit(REL_HWHEEL, bit); + + if (((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_5) && (usage->hid == 0x00090005)) + || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) + goto ignore; if (usage->type == EV_ABS) { @@ -624,8 +602,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel } - if (usage->type == EV_ABS && - (usage->hat_min < usage->hat_max || usage->hat_dir)) { + if (usage->hat_min < usage->hat_max || usage->hat_dir) { int i; for (i = usage->code; i < usage->code + 2 && i <= max; i++) { input_set_abs_params(input, i, -1, 1, 0, 0); @@ -670,11 +647,6 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct return; } - if ((hid->quirks & HID_QUIRK_INVERT_HWHEEL) && (usage->code == REL_HWHEEL)) { - input_event(input, usage->type, usage->code, -value); - return; - } - if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON) && (usage->code == REL_WHEEL)) { input_event(input, usage->type, REL_HWHEEL, value); return; diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h index aa85d0b08..9c62837b5 100644 --- a/drivers/usb/input/hid.h +++ b/drivers/usb/input/hid.h @@ -40,14 +40,6 @@ #define USB_INTERFACE_CLASS_HID 3 -/* - * USB HID interface subclass and protocol codes - */ - -#define USB_INTERFACE_SUBCLASS_BOOT 1 -#define USB_INTERFACE_PROTOCOL_KEYBOARD 1 -#define USB_INTERFACE_PROTOCOL_MOUSE 2 - /* * HID class requests */ @@ -255,12 +247,10 @@ struct hid_item { #define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x00000080 #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 -#define HID_QUIRK_MIGHTYMOUSE 0x00000400 +#define HID_QUIRK_2WHEEL_POWERMOUSE 0x00000400 #define HID_QUIRK_CYMOTION 0x00000800 #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 -#define HID_QUIRK_INVERT_HWHEEL 0x00004000 -#define HID_QUIRK_POWERBOOK_ISO_KEYBOARD 0x00010000 /* * This is the global environment of the parser. This information is diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c index f6b839c25..c4670e1d4 100644 --- a/drivers/usb/input/hiddev.c +++ b/drivers/usb/input/hiddev.c @@ -25,6 +25,7 @@ * e-mail - mail your message to Paul Stewart */ +#include #include #include #include @@ -49,7 +50,7 @@ struct hiddev { int open; wait_queue_head_t wait; struct hid_device *hid; - struct list_head list; + struct hiddev_list *list; }; struct hiddev_list { @@ -59,7 +60,7 @@ struct hiddev_list { unsigned flags; struct fasync_struct *fasync; struct hiddev *hiddev; - struct list_head node; + struct hiddev_list *next; }; static struct hiddev *hiddev_table[HIDDEV_MINORS]; @@ -73,15 +74,12 @@ static struct hiddev *hiddev_table[HIDDEV_MINORS]; static struct hid_report * hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo) { - unsigned int flags = rinfo->report_id & ~HID_REPORT_ID_MASK; - unsigned int rid = rinfo->report_id & HID_REPORT_ID_MASK; + unsigned flags = rinfo->report_id & ~HID_REPORT_ID_MASK; struct hid_report_enum *report_enum; - struct hid_report *report; struct list_head *list; if (rinfo->report_type < HID_REPORT_TYPE_MIN || - rinfo->report_type > HID_REPORT_TYPE_MAX) - return NULL; + rinfo->report_type > HID_REPORT_TYPE_MAX) return NULL; report_enum = hid->report_enum + (rinfo->report_type - HID_REPORT_TYPE_MIN); @@ -91,25 +89,21 @@ hiddev_lookup_report(struct hid_device *hid, struct hiddev_report_info *rinfo) break; case HID_REPORT_ID_FIRST: - if (list_empty(&report_enum->report_list)) - return NULL; - list = report_enum->report_list.next; - report = list_entry(list, struct hid_report, list); - rinfo->report_id = report->id; + if (list == &report_enum->report_list) + return NULL; + rinfo->report_id = ((struct hid_report *) list)->id; break; case HID_REPORT_ID_NEXT: - report = report_enum->report_id_hash[rid]; - if (!report) + list = (struct list_head *) + report_enum->report_id_hash[rinfo->report_id & HID_REPORT_ID_MASK]; + if (list == NULL) return NULL; - - list = report->list.next; + list = list->next; if (list == &report_enum->report_list) return NULL; - - report = list_entry(list, struct hid_report, list); - rinfo->report_id = report->id; + rinfo->report_id = ((struct hid_report *) list)->id; break; default: @@ -132,13 +126,12 @@ hiddev_lookup_usage(struct hid_device *hid, struct hiddev_usage_ref *uref) struct hid_field *field; if (uref->report_type < HID_REPORT_TYPE_MIN || - uref->report_type > HID_REPORT_TYPE_MAX) - return NULL; + uref->report_type > HID_REPORT_TYPE_MAX) return NULL; report_enum = hid->report_enum + (uref->report_type - HID_REPORT_TYPE_MIN); - list_for_each_entry(report, &report_enum->report_list, list) { + list_for_each_entry(report, &report_enum->report_list, list) for (i = 0; i < report->maxfield; i++) { field = report->field[i]; for (j = 0; j < field->maxusage; j++) { @@ -150,7 +143,6 @@ hiddev_lookup_usage(struct hid_device *hid, struct hiddev_usage_ref *uref) } } } - } return NULL; } @@ -159,9 +151,9 @@ static void hiddev_send_event(struct hid_device *hid, struct hiddev_usage_ref *uref) { struct hiddev *hiddev = hid->hiddev; - struct hiddev_list *list; + struct hiddev_list *list = hiddev->list; - list_for_each_entry(list, &hiddev->list, node) { + while (list) { if (uref->field_index != HID_FIELD_INDEX_NONE || (list->flags & HIDDEV_FLAG_REPORT) != 0) { list->buffer[list->head] = *uref; @@ -169,6 +161,8 @@ static void hiddev_send_event(struct hid_device *hid, (HIDDEV_BUFFER_SIZE - 1); kill_fasync(&list->fasync, SIGIO, POLL_IN); } + + list = list->next; } wake_up_interruptible(&hiddev->wait); @@ -187,7 +181,7 @@ void hiddev_hid_event(struct hid_device *hid, struct hid_field *field, uref.report_type = (type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT : ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT : - ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE : 0)); + ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0)); uref.report_id = field->report->id; uref.field_index = field->index; uref.usage_index = (usage - field->usage); @@ -207,7 +201,7 @@ void hiddev_report_event(struct hid_device *hid, struct hid_report *report) uref.report_type = (type == HID_INPUT_REPORT) ? HID_REPORT_TYPE_INPUT : ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT : - ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE : 0)); + ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0)); uref.report_id = report->id; uref.field_index = HID_FIELD_INDEX_NONE; @@ -220,9 +214,7 @@ static int hiddev_fasync(int fd, struct file *file, int on) { int retval; struct hiddev_list *list = file->private_data; - retval = fasync_helper(fd, file, on, &list->fasync); - return retval < 0 ? retval : 0; } @@ -233,9 +225,14 @@ static int hiddev_fasync(int fd, struct file *file, int on) static int hiddev_release(struct inode * inode, struct file * file) { struct hiddev_list *list = file->private_data; + struct hiddev_list **listptr; + listptr = &list->hiddev->list; hiddev_fasync(-1, file, 0); - list_del(&list->node); + + while (*listptr && (*listptr != list)) + listptr = &((*listptr)->next); + *listptr = (*listptr)->next; if (!--list->hiddev->open) { if (list->hiddev->exist) @@ -252,8 +249,7 @@ static int hiddev_release(struct inode * inode, struct file * file) /* * open file op */ -static int hiddev_open(struct inode *inode, struct file *file) -{ +static int hiddev_open(struct inode * inode, struct file * file) { struct hiddev_list *list; int i = iminor(inode) - HIDDEV_MINOR_BASE; @@ -265,7 +261,9 @@ static int hiddev_open(struct inode *inode, struct file *file) return -ENOMEM; list->hiddev = hiddev_table[i]; - list_add_tail(&list->node, &hiddev_table[i]->list); + list->next = hiddev_table[i]->list; + hiddev_table[i]->list = list; + file->private_data = list; if (!list->hiddev->open++) @@ -365,7 +363,6 @@ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t coun static unsigned int hiddev_poll(struct file *file, poll_table *wait) { struct hiddev_list *list = file->private_data; - poll_wait(file, &list->hiddev->wait, wait); if (list->head != list->tail) return POLLIN | POLLRDNORM; @@ -386,7 +383,7 @@ static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd struct hiddev_collection_info cinfo; struct hiddev_report_info rinfo; struct hiddev_field_info finfo; - struct hiddev_usage_ref_multi *uref_multi = NULL; + struct hiddev_usage_ref_multi *uref_multi=NULL; struct hiddev_usage_ref *uref; struct hiddev_devinfo dinfo; struct hid_report *report; @@ -768,15 +765,15 @@ int hiddev_connect(struct hid_device *hid) } init_waitqueue_head(&hiddev->wait); - INIT_LIST_HEAD(&hiddev->list); + + hiddev_table[hid->intf->minor - HIDDEV_MINOR_BASE] = hiddev; + hiddev->hid = hid; hiddev->exist = 1; hid->minor = hid->intf->minor; hid->hiddev = hiddev; - hiddev_table[hid->intf->minor - HIDDEV_MINOR_BASE] = hiddev; - return 0; } diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 86acb5f19..7618ae5c1 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c @@ -39,11 +39,14 @@ * *****************************************************************************/ +#include #include #include +#include #include #include -#include +#include +#include /* only an 8 byte buffer necessary for a single packet */ #define ITM_BUFSIZE 8 diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c index 604ade356..f6d5cead5 100644 --- a/drivers/usb/input/kbtab.c +++ b/drivers/usb/input/kbtab.c @@ -1,9 +1,12 @@ #include #include +#include #include #include -#include +#include +#include #include +#include /* * Version Information diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index 4723b310f..3d911976f 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c @@ -11,13 +11,16 @@ * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product. */ +#include #include #include #include #include #include #include -#include +#include +#include +#include #define DRIVER_VERSION "v0.1" #define DRIVER_AUTHOR "Michael Downey " diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index a9ccda881..f018953a5 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c @@ -39,11 +39,14 @@ * *****************************************************************************/ +#include #include #include +#include #include #include -#include +#include +#include #define MTOUCHUSB_MIN_XC 0x0 #define MTOUCHUSB_MAX_RAW_XC 0x4000 diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c index 299ec95b8..d9d9f656b 100644 --- a/drivers/usb/input/pid.c +++ b/drivers/usb/input/pid.c @@ -24,6 +24,7 @@ * e-mail - mail your message to */ +#include #include #include #include diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c index b3c0d0c3e..fdf0f7880 100644 --- a/drivers/usb/input/powermate.c +++ b/drivers/usb/input/powermate.c @@ -30,10 +30,12 @@ #include #include +#include #include #include #include -#include +#include +#include #define POWERMATE_VENDOR 0x077d /* Griffin Technology, Inc. */ #define POWERMATE_PRODUCT_NEW 0x0410 /* Griffin PowerMate */ diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index 0149043ff..697c5e573 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c @@ -24,11 +24,14 @@ //#define DEBUG +#include #include #include +#include #include #include -#include +#include +#include #define TOUCHKIT_MIN_XC 0x0 #define TOUCHKIT_MAX_XC 0x07ff diff --git a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c index 5067a6ae6..2f3edc26c 100644 --- a/drivers/usb/input/usbkbd.c +++ b/drivers/usb/input/usbkbd.c @@ -29,8 +29,10 @@ #include #include #include +#include #include -#include +#include +#include /* * Version Information diff --git a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c index 446935b67..af526135d 100644 --- a/drivers/usb/input/usbmouse.c +++ b/drivers/usb/input/usbmouse.c @@ -28,9 +28,11 @@ #include #include +#include #include #include -#include +#include +#include /* * Version Information diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 1cb8117f8..e9a07c1e9 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c @@ -32,13 +32,14 @@ //#define DEBUG +#include #include #include #include #include #include #include -#include +#include #define DRIVER_VERSION "v0.3" @@ -285,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) { *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); - *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); + *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); *touch = ~pkt[7] & 0x20; @@ -521,7 +522,7 @@ static int usbtouch_probe(struct usb_interface *intf, type->max_press, 0, 0); usb_fill_int_urb(usbtouch->irq, usbtouch->udev, - usb_rcvintpipe(usbtouch->udev, endpoint->bEndpointAddress), + usb_rcvintpipe(usbtouch->udev, 0x81), usbtouch->data, type->rept_size, usbtouch_irq, usbtouch, endpoint->bInterval); diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c index 369461a70..cf84c6096 100644 --- a/drivers/usb/input/wacom.c +++ b/drivers/usb/input/wacom.c @@ -69,10 +69,13 @@ #include #include +#include #include #include -#include +#include +#include #include +#include /* * Version Information diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index 9889b1cda..e278489a8 100644 --- a/drivers/usb/input/xpad.c +++ b/drivers/usb/input/xpad.c @@ -54,12 +54,15 @@ * 2002-07-17 - 0.0.5 : simplified d-pad handling */ +#include #include +#include #include #include #include #include -#include +#include +#include #define DRIVER_VERSION "v0.0.5" #define DRIVER_AUTHOR "Marko Friedemann " diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 7b45fd3de..37d2f0ba0 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c @@ -46,12 +46,15 @@ * 20050816 henk Merge 2.6.13-rc6 */ +#include #include +#include #include #include #include #include -#include +#include +#include #include "map_to_7segment.h" #include "yealink.h" @@ -810,9 +813,12 @@ static int usb_cleanup(struct yealink_dev *yld, int err) if (yld == NULL) return err; - usb_kill_urb(yld->urb_irq); /* parameter validation in core/urb */ - usb_kill_urb(yld->urb_ctl); /* parameter validation in core/urb */ - + if (yld->urb_irq) { + usb_kill_urb(yld->urb_irq); + usb_free_urb(yld->urb_irq); + } + if (yld->urb_ctl) + usb_free_urb(yld->urb_ctl); if (yld->idev) { if (err) input_free_device(yld->idev); @@ -828,9 +834,6 @@ static int usb_cleanup(struct yealink_dev *yld, int err) if (yld->irq_data) usb_buffer_free(yld->udev, USB_PKT_LEN, yld->irq_data, yld->irq_dma); - - usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */ - usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */ kfree(yld); return err; } diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index 88928a4be..8ba6a701e 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -88,20 +88,6 @@ config USB_LED To compile this driver as a module, choose M here: the module will be called usbled. -config USB_CYPRESS_CY7C63 - tristate "Cypress CY7C63xxx USB driver support" - depends on USB - help - Say Y here if you want to connect a Cypress CY7C63xxx - micro controller to your computer's USB port. Currently this - driver supports the pre-programmed devices (incl. firmware) - by AK Modul-Bus Computer GmbH. - - Please see: http://www.ak-modul-bus.de/stat/mikrocontroller.html - - To compile this driver as a module, choose M here: the - module will be called cypress_cy7c63. - config USB_CYTHERM tristate "Cypress USB thermometer driver support" depends on USB @@ -151,15 +137,6 @@ config USB_IDMOUSE See also . -config USB_APPLEDISPLAY - tristate "Apple Cinema Display support" - depends on USB - select BACKLIGHT_LCD_SUPPORT - select BACKLIGHT_CLASS_DEVICE - help - Say Y here if you want to control the backlight of Apple Cinema - Displays over USB. This driver provides a sysfs interface. - source "drivers/usb/misc/sisusbvga/Kconfig" config USB_LD diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 2927260c5..6c693bc68 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile @@ -4,7 +4,6 @@ # obj-$(CONFIG_USB_AUERSWALD) += auerswald.o -obj-$(CONFIG_USB_CYPRESS_CY7C63)+= cypress_cy7c63.o obj-$(CONFIG_USB_CYTHERM) += cytherm.o obj-$(CONFIG_USB_EMI26) += emi26.o obj-$(CONFIG_USB_EMI62) += emi62.o @@ -18,7 +17,6 @@ obj-$(CONFIG_USB_PHIDGETSERVO) += phidgetservo.o obj-$(CONFIG_USB_RIO500) += rio500.o obj-$(CONFIG_USB_TEST) += usbtest.o obj-$(CONFIG_USB_USS720) += uss720.o -obj-$(CONFIG_USB_APPLEDISPLAY) += appledisplay.o obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c deleted file mode 100644 index fc6cc1479..000000000 --- a/drivers/usb/misc/appledisplay.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Apple Cinema Display driver - * - * Copyright (C) 2006 Michael Hanselmann (linux-kernel@hansmi.ch) - * - * Thanks to Caskey L. Dickson for his work with acdctl. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define APPLE_VENDOR_ID 0x05AC - -#define USB_REQ_GET_REPORT 0x01 -#define USB_REQ_SET_REPORT 0x09 - -#define ACD_USB_TIMEOUT 250 - -#define ACD_USB_EDID 0x0302 -#define ACD_USB_BRIGHTNESS 0x0310 - -#define ACD_BTN_NONE 0 -#define ACD_BTN_BRIGHT_UP 3 -#define ACD_BTN_BRIGHT_DOWN 4 - -#define ACD_URB_BUFFER_LEN 2 -#define ACD_MSG_BUFFER_LEN 2 - -#define APPLEDISPLAY_DEVICE(prod) \ - .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ - USB_DEVICE_ID_MATCH_INT_CLASS | \ - USB_DEVICE_ID_MATCH_INT_PROTOCOL, \ - .idVendor = APPLE_VENDOR_ID, \ - .idProduct = (prod), \ - .bInterfaceClass = USB_CLASS_HID, \ - .bInterfaceProtocol = 0x00 - -/* table of devices that work with this driver */ -static struct usb_device_id appledisplay_table [] = { - { APPLEDISPLAY_DEVICE(0x9218) }, - { APPLEDISPLAY_DEVICE(0x9219) }, - { APPLEDISPLAY_DEVICE(0x921d) }, - - /* Terminating entry */ - { } -}; -MODULE_DEVICE_TABLE(usb, appledisplay_table); - -/* Structure to hold all of our device specific stuff */ -struct appledisplay { - struct usb_device *udev; /* usb device */ - struct urb *urb; /* usb request block */ - struct backlight_device *bd; /* backlight device */ - char *urbdata; /* interrupt URB data buffer */ - char *msgdata; /* control message data buffer */ - - struct work_struct work; - int button_pressed; - spinlock_t lock; -}; - -static atomic_t count_displays = ATOMIC_INIT(0); -static struct workqueue_struct *wq; - -static void appledisplay_complete(struct urb *urb, struct pt_regs *regs) -{ - struct appledisplay *pdata = urb->context; - unsigned long flags; - int retval; - - switch (urb->status) { - case 0: - /* success */ - break; - case -EOVERFLOW: - printk(KERN_ERR "appletouch: OVERFLOW with data " - "length %d, actual length is %d\n", - ACD_URB_BUFFER_LEN, pdata->urb->actual_length); - case -ECONNRESET: - case -ENOENT: - case -ESHUTDOWN: - /* This urb is terminated, clean up */ - dbg("%s - urb shutting down with status: %d", - __FUNCTION__, urb->status); - return; - default: - dbg("%s - nonzero urb status received: %d", - __FUNCTION__, urb->status); - goto exit; - } - - spin_lock_irqsave(&pdata->lock, flags); - - switch(pdata->urbdata[1]) { - case ACD_BTN_BRIGHT_UP: - case ACD_BTN_BRIGHT_DOWN: - pdata->button_pressed = 1; - queue_work(wq, &pdata->work); - break; - case ACD_BTN_NONE: - default: - pdata->button_pressed = 0; - break; - } - - spin_unlock_irqrestore(&pdata->lock, flags); - -exit: - retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); - if (retval) { - err("%s - usb_submit_urb failed with result %d", - __FUNCTION__, retval); - } -} - -static int appledisplay_bl_update_status(struct backlight_device *bd) -{ - struct appledisplay *pdata = class_get_devdata(&bd->class_dev); - int retval; - - pdata->msgdata[0] = 0x10; - pdata->msgdata[1] = bd->props->brightness; - - retval = usb_control_msg( - pdata->udev, - usb_sndctrlpipe(pdata->udev, 0), - USB_REQ_SET_REPORT, - USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ACD_USB_BRIGHTNESS, - 0, - pdata->msgdata, 2, - ACD_USB_TIMEOUT); - - return retval; -} - -static int appledisplay_bl_get_brightness(struct backlight_device *bd) -{ - struct appledisplay *pdata = class_get_devdata(&bd->class_dev); - int retval; - - retval = usb_control_msg( - pdata->udev, - usb_rcvctrlpipe(pdata->udev, 0), - USB_REQ_GET_REPORT, - USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - ACD_USB_BRIGHTNESS, - 0, - pdata->msgdata, 2, - ACD_USB_TIMEOUT); - - if (retval < 0) - return retval; - else - return pdata->msgdata[1]; -} - -static struct backlight_properties appledisplay_bl_data = { - .owner = THIS_MODULE, - .get_brightness = appledisplay_bl_get_brightness, - .update_status = appledisplay_bl_update_status, - .max_brightness = 0xFF -}; - -static void appledisplay_work(void *private) -{ - struct appledisplay *pdata = private; - int retval; - - up(&pdata->bd->sem); - retval = appledisplay_bl_get_brightness(pdata->bd); - if (retval >= 0) - pdata->bd->props->brightness = retval; - down(&pdata->bd->sem); - - /* Poll again in about 125ms if there's still a button pressed */ - if (pdata->button_pressed) - schedule_delayed_work(&pdata->work, HZ / 8); -} - -static int appledisplay_probe(struct usb_interface *iface, - const struct usb_device_id *id) -{ - struct appledisplay *pdata; - struct usb_device *udev = interface_to_usbdev(iface); - struct usb_host_interface *iface_desc; - struct usb_endpoint_descriptor *endpoint; - int int_in_endpointAddr = 0; - int i, retval = -ENOMEM, brightness; - char bl_name[20]; - - /* set up the endpoint information */ - /* use only the first interrupt-in endpoint */ - iface_desc = iface->cur_altsetting; - for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { - endpoint = &iface_desc->endpoint[i].desc; - if (!int_in_endpointAddr && - (endpoint->bEndpointAddress & USB_DIR_IN) && - ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == - USB_ENDPOINT_XFER_INT)) { - /* we found an interrupt in endpoint */ - int_in_endpointAddr = endpoint->bEndpointAddress; - break; - } - } - if (!int_in_endpointAddr) { - err("Could not find int-in endpoint"); - return -EIO; - } - - /* allocate memory for our device state and initialize it */ - pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL); - if (!pdata) { - retval = -ENOMEM; - err("Out of memory"); - goto error; - } - - pdata->udev = udev; - - spin_lock_init(&pdata->lock); - INIT_WORK(&pdata->work, appledisplay_work, pdata); - - /* Allocate buffer for control messages */ - pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); - if (!pdata->msgdata) { - retval = -ENOMEM; - err("appledisplay: Allocating buffer for control messages " - "failed"); - goto error; - } - - /* Allocate interrupt URB */ - pdata->urb = usb_alloc_urb(0, GFP_KERNEL); - if (!pdata->urb) { - retval = -ENOMEM; - err("appledisplay: Allocating URB failed"); - goto error; - } - - /* Allocate buffer for interrupt data */ - pdata->urbdata = usb_buffer_alloc(pdata->udev, ACD_URB_BUFFER_LEN, - GFP_KERNEL, &pdata->urb->transfer_dma); - if (!pdata->urbdata) { - retval = -ENOMEM; - err("appledisplay: Allocating URB buffer failed"); - goto error; - } - - /* Configure interrupt URB */ - usb_fill_int_urb(pdata->urb, udev, - usb_rcvintpipe(udev, int_in_endpointAddr), - pdata->urbdata, ACD_URB_BUFFER_LEN, appledisplay_complete, - pdata, 1); - if (usb_submit_urb(pdata->urb, GFP_KERNEL)) { - retval = -EIO; - err("appledisplay: Submitting URB failed"); - goto error; - } - - /* Register backlight device */ - snprintf(bl_name, sizeof(bl_name), "appledisplay%d", - atomic_inc_return(&count_displays) - 1); - pdata->bd = backlight_device_register(bl_name, pdata, - &appledisplay_bl_data); - if (IS_ERR(pdata->bd)) { - err("appledisplay: Backlight registration failed"); - goto error; - } - - /* Try to get brightness */ - up(&pdata->bd->sem); - brightness = appledisplay_bl_get_brightness(pdata->bd); - down(&pdata->bd->sem); - - if (brightness < 0) { - retval = brightness; - err("appledisplay: Error while getting initial brightness: %d", retval); - goto error; - } - - /* Set brightness in backlight device */ - up(&pdata->bd->sem); - pdata->bd->props->brightness = brightness; - down(&pdata->bd->sem); - - /* save our data pointer in the interface device */ - usb_set_intfdata(iface, pdata); - - printk(KERN_INFO "appledisplay: Apple Cinema Display connected\n"); - - return 0; - -error: - if (pdata) { - if (pdata->urb) { - usb_kill_urb(pdata->urb); - if (pdata->urbdata) - usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN, - pdata->urbdata, pdata->urb->transfer_dma); - usb_free_urb(pdata->urb); - } - if (pdata->bd) - backlight_device_unregister(pdata->bd); - kfree(pdata->msgdata); - } - usb_set_intfdata(iface, NULL); - kfree(pdata); - return retval; -} - -static void appledisplay_disconnect(struct usb_interface *iface) -{ - struct appledisplay *pdata = usb_get_intfdata(iface); - - if (pdata) { - usb_kill_urb(pdata->urb); - cancel_delayed_work(&pdata->work); - backlight_device_unregister(pdata->bd); - usb_buffer_free(pdata->udev, ACD_URB_BUFFER_LEN, - pdata->urbdata, pdata->urb->transfer_dma); - usb_free_urb(pdata->urb); - kfree(pdata->msgdata); - kfree(pdata); - } - - printk(KERN_INFO "appledisplay: Apple Cinema Display disconnected\n"); -} - -static struct usb_driver appledisplay_driver = { - .name = "appledisplay", - .probe = appledisplay_probe, - .disconnect = appledisplay_disconnect, - .id_table = appledisplay_table, -}; - -static int __init appledisplay_init(void) -{ - wq = create_singlethread_workqueue("appledisplay"); - if (!wq) { - err("Could not create work queue\n"); - return -ENOMEM; - } - - return usb_register(&appledisplay_driver); -} - -static void __exit appledisplay_exit(void) -{ - flush_workqueue(wq); - destroy_workqueue(wq); - usb_deregister(&appledisplay_driver); -} - -MODULE_AUTHOR("Michael Hanselmann"); -MODULE_DESCRIPTION("Apple Cinema Display driver"); -MODULE_LICENSE("GPL"); - -module_init(appledisplay_init); -module_exit(appledisplay_exit); diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c deleted file mode 100644 index 9c46746d5..000000000 --- a/drivers/usb/misc/cypress_cy7c63.c +++ /dev/null @@ -1,284 +0,0 @@ -/* -* cypress_cy7c63.c -* -* Copyright (c) 2006 Oliver Bock (o.bock@fh-wolfenbuettel.de) -* -* This driver is based on the Cypress USB Driver by Marcus Maul -* (cyport) and the 2.0 version of Greg Kroah-Hartman's -* USB Skeleton driver. -* -* This is a generic driver for the Cypress CY7C63xxx family. -* For the time being it enables you to read from and write to -* the single I/O ports of the device. -* -* Supported vendors: AK Modul-Bus Computer GmbH -* (Firmware "Port-Chip") -* -* Supported devices: CY7C63001A-PC -* CY7C63001C-PXC -* CY7C63001C-SXC -* -* Supported functions: Read/Write Ports -* -* -* 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, version 2. -*/ - -#include -#include -#include -#include - -#define DRIVER_AUTHOR "Oliver Bock (o.bock@fh-wolfenbuettel.de)" -#define DRIVER_DESC "Cypress CY7C63xxx USB driver" - -#define CYPRESS_VENDOR_ID 0xa2c -#define CYPRESS_PRODUCT_ID 0x8 - -#define CYPRESS_READ_PORT 0x4 -#define CYPRESS_WRITE_PORT 0x5 - -#define CYPRESS_READ_RAM 0x2 -#define CYPRESS_WRITE_RAM 0x3 -#define CYPRESS_READ_ROM 0x1 - -#define CYPRESS_READ_PORT_ID0 0 -#define CYPRESS_WRITE_PORT_ID0 0 -#define CYPRESS_READ_PORT_ID1 0x2 -#define CYPRESS_WRITE_PORT_ID1 1 - -#define CYPRESS_MAX_REQSIZE 8 - - -/* table of devices that work with this driver */ -static struct usb_device_id cypress_table [] = { - { USB_DEVICE(CYPRESS_VENDOR_ID, CYPRESS_PRODUCT_ID) }, - { } -}; -MODULE_DEVICE_TABLE(usb, cypress_table); - -/* structure to hold all of our device specific stuff */ -struct cypress { - struct usb_device * udev; - unsigned char port[2]; -}; - -/* used to send usb control messages to device */ -static int vendor_command(struct cypress *dev, unsigned char request, - unsigned char address, unsigned char data) -{ - int retval = 0; - unsigned int pipe; - unsigned char *iobuf; - - /* allocate some memory for the i/o buffer*/ - iobuf = kzalloc(CYPRESS_MAX_REQSIZE, GFP_KERNEL); - if (!iobuf) { - dev_err(&dev->udev->dev, "Out of memory!\n"); - retval = -ENOMEM; - goto error; - } - - dev_dbg(&dev->udev->dev, "Sending usb_control_msg (data: %d)\n", data); - - /* prepare usb control message and send it upstream */ - pipe = usb_rcvctrlpipe(dev->udev, 0); - retval = usb_control_msg(dev->udev, pipe, request, - USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER, - address, data, iobuf, CYPRESS_MAX_REQSIZE, - USB_CTRL_GET_TIMEOUT); - - /* store returned data (more READs to be added) */ - switch (request) { - case CYPRESS_READ_PORT: - if (address == CYPRESS_READ_PORT_ID0) { - dev->port[0] = iobuf[1]; - dev_dbg(&dev->udev->dev, - "READ_PORT0 returned: %d\n", - dev->port[0]); - } - else if (address == CYPRESS_READ_PORT_ID1) { - dev->port[1] = iobuf[1]; - dev_dbg(&dev->udev->dev, - "READ_PORT1 returned: %d\n", - dev->port[1]); - } - break; - } - - kfree(iobuf); -error: - return retval; -} - -/* write port value */ -static ssize_t write_port(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count, - int port_num, int write_id) -{ - int value = -1; - int result = 0; - - struct usb_interface *intf = to_usb_interface(dev); - struct cypress *cyp = usb_get_intfdata(intf); - - dev_dbg(&cyp->udev->dev, "WRITE_PORT%d called\n", port_num); - - /* validate input data */ - if (sscanf(buf, "%d", &value) < 1) { - result = -EINVAL; - goto error; - } - if (value < 0 || value > 255) { - result = -EINVAL; - goto error; - } - - result = vendor_command(cyp, CYPRESS_WRITE_PORT, write_id, - (unsigned char)value); - - dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n", result); -error: - return result < 0 ? result : count; -} - -/* attribute callback handler (write) */ -static ssize_t set_port0_handler(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - return write_port(dev, attr, buf, count, 0, CYPRESS_WRITE_PORT_ID0); -} - -/* attribute callback handler (write) */ -static ssize_t set_port1_handler(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) -{ - return write_port(dev, attr, buf, count, 1, CYPRESS_WRITE_PORT_ID1); -} - -/* read port value */ -static ssize_t read_port(struct device *dev, struct device_attribute *attr, - char *buf, int port_num, int read_id) -{ - int result = 0; - - struct usb_interface *intf = to_usb_interface(dev); - struct cypress *cyp = usb_get_intfdata(intf); - - dev_dbg(&cyp->udev->dev, "READ_PORT%d called\n", port_num); - - result = vendor_command(cyp, CYPRESS_READ_PORT, read_id, 0); - - dev_dbg(&cyp->udev->dev, "Result of vendor_command: %d\n\n", result); - - return sprintf(buf, "%d", cyp->port[port_num]); -} - -/* attribute callback handler (read) */ -static ssize_t get_port0_handler(struct device *dev, - struct device_attribute *attr, char *buf) -{ - return read_port(dev, attr, buf, 0, CYPRESS_READ_PORT_ID0); -} - -/* attribute callback handler (read) */ -static ssize_t get_port1_handler(struct device *dev, - struct device_attribute *attr, char *buf) -{ - return read_port(dev, attr, buf, 1, CYPRESS_READ_PORT_ID1); -} - -static DEVICE_ATTR(port0, S_IWUGO | S_IRUGO, - get_port0_handler, set_port0_handler); - -static DEVICE_ATTR(port1, S_IWUGO | S_IRUGO, - get_port1_handler, set_port1_handler); - - -static int cypress_probe(struct usb_interface *interface, - const struct usb_device_id *id) -{ - struct cypress *dev = NULL; - int retval = -ENOMEM; - - /* allocate memory for our device state and initialize it */ - dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (dev == NULL) { - dev_err(&interface->dev, "Out of memory!\n"); - goto error; - } - - dev->udev = usb_get_dev(interface_to_usbdev(interface)); - - /* save our data pointer in this interface device */ - usb_set_intfdata(interface, dev); - - /* create device attribute files */ - device_create_file(&interface->dev, &dev_attr_port0); - device_create_file(&interface->dev, &dev_attr_port1); - - /* let the user know that the device is now attached */ - dev_info(&interface->dev, - "Cypress CY7C63xxx device now attached\n"); - - retval = 0; -error: - return retval; -} - -static void cypress_disconnect(struct usb_interface *interface) -{ - struct cypress *dev; - - dev = usb_get_intfdata(interface); - usb_set_intfdata(interface, NULL); - - /* remove device attribute files */ - device_remove_file(&interface->dev, &dev_attr_port0); - device_remove_file(&interface->dev, &dev_attr_port1); - - usb_put_dev(dev->udev); - - dev_info(&interface->dev, - "Cypress CY7C63xxx device now disconnected\n"); - - kfree(dev); -} - -static struct usb_driver cypress_driver = { - .name = "cypress_cy7c63", - .probe = cypress_probe, - .disconnect = cypress_disconnect, - .id_table = cypress_table, -}; - -static int __init cypress_init(void) -{ - int result; - - /* register this driver with the USB subsystem */ - result = usb_register(&cypress_driver); - if (result) { - err("Function usb_register failed! Error number: %d\n", result); - } - - return result; -} - -static void __exit cypress_exit(void) -{ - /* deregister this driver with the USB subsystem */ - usb_deregister(&cypress_driver); -} - -module_init(cypress_init); -module_exit(cypress_exit); - -MODULE_AUTHOR(DRIVER_AUTHOR); -MODULE_DESCRIPTION(DRIVER_DESC); - -MODULE_LICENSE("GPL"); diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index b20bec445..a04204292 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c @@ -14,6 +14,7 @@ */ +#include #include #include #include diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index fcd69c52a..d0b167256 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c @@ -16,6 +16,7 @@ */ +#include #include #include #include diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index f30ab1fbb..966acb474 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c @@ -27,6 +27,7 @@ * V0.13 (mh) Added support for LD X-Ray and Machine Test System */ +#include #include #include #include diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 7699d970e..779bcf037 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -75,6 +75,7 @@ * - move reset into open to clean out spurious data */ +#include #include #include #include diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index bfbbbfbb9..997db5d8e 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c @@ -1,8 +1,7 @@ /* * USB PhidgetInterfaceKit driver 1.0 * - * Copyright (C) 2004, 2006 Sean Young - * Copyright (C) 2005 Daniel Saakes + * Copyright (C) 2004 Sean Young * Copyright (C) 2004 Greg Kroah-Hartman * * This program is free software; you can redistribute it and/or modify @@ -13,6 +12,7 @@ * This is a driver for the USB PhidgetInterfaceKit. */ +#include #include #include #include @@ -25,7 +25,6 @@ #define USB_VENDOR_ID_GLAB 0x06c2 #define USB_DEVICE_ID_INTERFACEKIT004 0x0040 -#define USB_DEVICE_ID_INTERFACEKIT01616 0x0044 #define USB_DEVICE_ID_INTERFACEKIT888 0x0045 #define USB_DEVICE_ID_INTERFACEKIT047 0x0051 #define USB_DEVICE_ID_INTERFACEKIT088 0x0053 @@ -33,9 +32,7 @@ #define USB_VENDOR_ID_WISEGROUP 0x0925 #define USB_DEVICE_ID_INTERFACEKIT884 0x8201 -#define MAX_INTERFACES 16 - -#define URB_INT_SIZE 8 +#define MAX_INTERFACES 8 struct driver_interfacekit { int sensors; @@ -55,24 +52,19 @@ ifkit(8, 8, 8, 0); ifkit(0, 4, 7, 1); ifkit(8, 8, 4, 0); ifkit(0, 8, 8, 1); -ifkit(0, 16, 16, 0); -struct interfacekit { +struct phidget_interfacekit { struct usb_device *udev; struct usb_interface *intf; struct driver_interfacekit *ifkit; - unsigned long outputs; - u8 inputs[MAX_INTERFACES]; - u16 sensors[MAX_INTERFACES]; + int outputs[MAX_INTERFACES]; + int inputs[MAX_INTERFACES]; + int sensors[MAX_INTERFACES]; u8 lcd_files_on; struct urb *irq; unsigned char *data; dma_addr_t data_dma; - - struct work_struct do_notify; - unsigned long input_events; - unsigned long sensor_events; }; static struct usb_device_id id_table[] = { @@ -84,33 +76,33 @@ static struct usb_device_id id_table[] = { .driver_info = (kernel_ulong_t)&ph_047}, {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT088), .driver_info = (kernel_ulong_t)&ph_088}, - {USB_DEVICE(USB_VENDOR_ID_GLAB, USB_DEVICE_ID_INTERFACEKIT01616), - .driver_info = (kernel_ulong_t)&ph_01616}, {USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_INTERFACEKIT884), .driver_info = (kernel_ulong_t)&ph_884}, {} }; MODULE_DEVICE_TABLE(usb, id_table); -static int change_outputs(struct interfacekit *kit, int output_num, int enable) +static int change_outputs(struct phidget_interfacekit *kit, int output_num, int enable) { - u8 *buffer; + unsigned char *buffer; int retval; - - if (enable) - set_bit(output_num, &kit->outputs); - else - clear_bit(output_num, &kit->outputs); + int n; buffer = kzalloc(4, GFP_KERNEL); if (!buffer) { - dev_err(&kit->udev->dev, "%s - out of memory\n", __FUNCTION__); + dev_err(&kit->udev->dev, "%s - out of memory\n", + __FUNCTION__); return -ENOMEM; } - buffer[0] = (u8)kit->outputs; - buffer[1] = (u8)(kit->outputs >> 8); - dev_dbg(&kit->udev->dev, "sending data: 0x%04x\n", (u16)kit->outputs); + kit->outputs[output_num] = enable; + for (n=0; n<8; n++) { + if (kit->outputs[n]) { + buffer[0] |= 1 << n; + } + } + + dev_dbg(&kit->udev->dev, "sending data: %02x\n", buffer[0]); retval = usb_control_msg(kit->udev, usb_sndctrlpipe(kit->udev, 0), @@ -124,10 +116,10 @@ static int change_outputs(struct interfacekit *kit, int output_num, int enable) return retval < 0 ? retval : 0; } -static int change_string(struct interfacekit *kit, const char *display, unsigned char row) +static int change_string(struct phidget_interfacekit *kit, const char *display, unsigned char row) { unsigned char *buffer; - unsigned char *form_buffer; + unsigned char *form_buffer; int retval = -ENOMEM; int i,j, len, buf_ptr; @@ -183,7 +175,7 @@ exit: static ssize_t lcd_line_##number(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \ { \ struct usb_interface *intf = to_usb_interface(dev); \ - struct interfacekit *kit = usb_get_intfdata(intf); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ change_string(kit, buf, number - 1); \ return count; \ } \ @@ -194,7 +186,7 @@ set_lcd_line(2); static ssize_t set_backlight(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct usb_interface *intf = to_usb_interface(dev); - struct interfacekit *kit = usb_get_intfdata(intf); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); int enabled; unsigned char *buffer; int retval = -ENOMEM; @@ -228,7 +220,7 @@ exit: } static DEVICE_ATTR(backlight, S_IWUGO, NULL, set_backlight); -static void remove_lcd_files(struct interfacekit *kit) +static void remove_lcd_files(struct phidget_interfacekit *kit) { if (kit->lcd_files_on) { dev_dbg(&kit->udev->dev, "Removing lcd files\n"); @@ -241,7 +233,7 @@ static void remove_lcd_files(struct interfacekit *kit) static ssize_t enable_lcd_files(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct usb_interface *intf = to_usb_interface(dev); - struct interfacekit *kit = usb_get_intfdata(intf); + struct phidget_interfacekit *kit = usb_get_intfdata(intf); int enable; if (kit->ifkit->has_lcd == 0) @@ -271,10 +263,10 @@ static DEVICE_ATTR(lcd, S_IWUGO, NULL, enable_lcd_files); static void interfacekit_irq(struct urb *urb, struct pt_regs *regs) { - struct interfacekit *kit = urb->context; + struct phidget_interfacekit *kit = urb->context; unsigned char *buffer = kit->data; - int i, level, sensor; int status; + int n; switch (urb->status) { case 0: /* success */ @@ -288,63 +280,22 @@ static void interfacekit_irq(struct urb *urb, struct pt_regs *regs) goto resubmit; } - /* digital inputs */ - if (kit->ifkit->inputs == 16) { - for (i=0; i < 8; i++) { - level = (buffer[0] >> i) & 1; - if (kit->inputs[i] != level) { - kit->inputs[i] = level; - set_bit(i, &kit->input_events); - } - level = (buffer[1] >> i) & 1; - if (kit->inputs[8 + i] != level) { - kit->inputs[8 + i] = level; - set_bit(8 + i, &kit->input_events); - } - } - } - else if (kit->ifkit->inputs == 8) { - for (i=0; i < 8; i++) { - level = (buffer[1] >> i) & 1; - if (kit->inputs[i] != level) { - kit->inputs[i] = level; - set_bit(i, &kit->input_events); - } - } + for (n=0; n<8; n++) { + kit->inputs[n] = buffer[1] & (1 << n) ? 1 : 0; } - /* analog inputs */ - if (kit->ifkit->sensors) { - sensor = (buffer[0] & 1) ? 4 : 0; - - level = buffer[2] + (buffer[3] & 0x0f) * 256; - if (level != kit->sensors[sensor]) { - kit->sensors[sensor] = level; - set_bit(sensor, &kit->sensor_events); - } - sensor++; - level = buffer[4] + (buffer[3] & 0xf0) * 16; - if (level != kit->sensors[sensor]) { - kit->sensors[sensor] = level; - set_bit(sensor, &kit->sensor_events); - } - sensor++; - level = buffer[5] + (buffer[6] & 0x0f) * 256; - if (level != kit->sensors[sensor]) { - kit->sensors[sensor] = level; - set_bit(sensor, &kit->sensor_events); - } - sensor++; - level = buffer[7] + (buffer[6] & 0xf0) * 16; - if (level != kit->sensors[sensor]) { - kit->sensors[sensor] = level; - set_bit(sensor, &kit->sensor_events); - } + if (buffer[0] & 1) { + kit->sensors[4] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[5] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[6] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[7] = buffer[7] + (buffer[6] & 0xf0) * 16; + } else { + kit->sensors[0] = buffer[2] + (buffer[3] & 0x0f) * 256; + kit->sensors[1] = buffer[4] + (buffer[3] & 0xf0) * 16; + kit->sensors[2] = buffer[5] + (buffer[6] & 0x0f) * 256; + kit->sensors[3] = buffer[7] + (buffer[6] & 0xf0) * 16; } - if (kit->input_events || kit->sensor_events) - schedule_work(&kit->do_notify); - resubmit: status = usb_submit_urb(urb, SLAB_ATOMIC); if (status) @@ -353,40 +304,20 @@ resubmit: kit->udev->devpath, status); } -static void do_notify(void *data) -{ - struct interfacekit *kit = data; - int i; - char sysfs_file[8]; - - for (i=0; iifkit->inputs; i++) { - if (test_and_clear_bit(i, &kit->input_events)) { - sprintf(sysfs_file, "input%d", i + 1); - sysfs_notify(&kit->intf->dev.kobj, NULL, sysfs_file); - } - } - - for (i=0; iifkit->sensors; i++) { - if (test_and_clear_bit(i, &kit->sensor_events)) { - sprintf(sysfs_file, "sensor%d", i + 1); - sysfs_notify(&kit->intf->dev.kobj, NULL, sysfs_file); - } - } -} - #define show_set_output(value) \ -static ssize_t set_output##value(struct device *dev, struct device_attribute *attr, const char *buf, \ +static ssize_t set_output##value(struct device *dev, struct device_attribute *attr, const char *buf, \ size_t count) \ { \ struct usb_interface *intf = to_usb_interface(dev); \ - struct interfacekit *kit = usb_get_intfdata(intf); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ int enabled; \ int retval; \ \ - if (sscanf(buf, "%d", &enabled) < 1) \ + if (sscanf(buf, "%d", &enabled) < 1) { \ return -EINVAL; \ + } \ \ - retval = change_outputs(kit, value - 1, enabled); \ + retval = change_outputs(kit, value - 1, enabled ? 1 : 0); \ \ return retval ? retval : count; \ } \ @@ -394,9 +325,9 @@ static ssize_t set_output##value(struct device *dev, struct device_attribute *at static ssize_t show_output##value(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct usb_interface *intf = to_usb_interface(dev); \ - struct interfacekit *kit = usb_get_intfdata(intf); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ \ - return sprintf(buf, "%d\n", !!test_bit(value - 1, &kit->outputs));\ + return sprintf(buf, "%d\n", kit->outputs[value - 1]); \ } \ static DEVICE_ATTR(output##value, S_IWUGO | S_IRUGO, \ show_output##value, set_output##value); @@ -407,23 +338,15 @@ show_set_output(4); show_set_output(5); show_set_output(6); show_set_output(7); -show_set_output(8); -show_set_output(9); -show_set_output(10); -show_set_output(11); -show_set_output(12); -show_set_output(13); -show_set_output(14); -show_set_output(15); -show_set_output(16); +show_set_output(8); /* should be MAX_INTERFACES - 1 */ #define show_input(value) \ static ssize_t show_input##value(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct usb_interface *intf = to_usb_interface(dev); \ - struct interfacekit *kit = usb_get_intfdata(intf); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ \ - return sprintf(buf, "%d\n", (int)kit->inputs[value - 1]); \ + return sprintf(buf, "%d\n", kit->inputs[value - 1]); \ } \ static DEVICE_ATTR(input##value, S_IRUGO, show_input##value, NULL); @@ -434,23 +357,15 @@ show_input(4); show_input(5); show_input(6); show_input(7); -show_input(8); -show_input(9); -show_input(10); -show_input(11); -show_input(12); -show_input(13); -show_input(14); -show_input(15); -show_input(16); +show_input(8); /* should be MAX_INTERFACES - 1 */ #define show_sensor(value) \ static ssize_t show_sensor##value(struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct usb_interface *intf = to_usb_interface(dev); \ - struct interfacekit *kit = usb_get_intfdata(intf); \ + struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ \ - return sprintf(buf, "%d\n", (int)kit->sensors[value - 1]); \ + return sprintf(buf, "%d\n", kit->sensors[value - 1]); \ } \ static DEVICE_ATTR(sensor##value, S_IRUGO, show_sensor##value, NULL); @@ -461,16 +376,16 @@ show_sensor(4); show_sensor(5); show_sensor(6); show_sensor(7); -show_sensor(8); +show_sensor(8); /* should be MAX_INTERFACES - 1 */ static int interfacekit_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct usb_device *dev = interface_to_usbdev(intf); struct usb_host_interface *interface; struct usb_endpoint_descriptor *endpoint; - struct interfacekit *kit; + struct phidget_interfacekit *kit; struct driver_interfacekit *ifkit; - int pipe, maxp, rc = -ENOMEM; + int pipe, maxp; ifkit = (struct driver_interfacekit *)id->driver_info; if (!ifkit) @@ -490,23 +405,29 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); kit = kzalloc(sizeof(*kit), GFP_KERNEL); - if (!kit) - goto out; - + if (kit == NULL) { + dev_err(&intf->dev, "%s - out of memory\n", __FUNCTION__); + return -ENOMEM; + } kit->ifkit = ifkit; - kit->data = usb_buffer_alloc(dev, URB_INT_SIZE, SLAB_ATOMIC, &kit->data_dma); - if (!kit->data) - goto out; + + kit->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &kit->data_dma); + if (!kit->data) { + kfree(kit); + return -ENOMEM; + } kit->irq = usb_alloc_urb(0, GFP_KERNEL); - if (!kit->irq) - goto out; + if (!kit->irq) { + usb_buffer_free(dev, 8, kit->data, kit->data_dma); + kfree(kit); + return -ENOMEM; + } kit->udev = usb_get_dev(dev); kit->intf = intf; - INIT_WORK(&kit->do_notify, do_notify, kit); usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data, - maxp > URB_INT_SIZE ? URB_INT_SIZE : maxp, + (maxp > 8 ? 8 : maxp), interfacekit_irq, kit, endpoint->bInterval); kit->irq->transfer_dma = kit->data_dma; kit->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; @@ -514,8 +435,7 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic usb_set_intfdata(intf, kit); if (usb_submit_urb(kit->irq, GFP_KERNEL)) { - rc = -EIO; - goto out; + return -EIO; } if (ifkit->outputs >= 4) { @@ -524,22 +444,12 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic device_create_file(&intf->dev, &dev_attr_output3); device_create_file(&intf->dev, &dev_attr_output4); } - if (ifkit->outputs >= 8) { + if (ifkit->outputs == 8) { device_create_file(&intf->dev, &dev_attr_output5); device_create_file(&intf->dev, &dev_attr_output6); device_create_file(&intf->dev, &dev_attr_output7); device_create_file(&intf->dev, &dev_attr_output8); } - if (ifkit->outputs == 16) { - device_create_file(&intf->dev, &dev_attr_output9); - device_create_file(&intf->dev, &dev_attr_output10); - device_create_file(&intf->dev, &dev_attr_output11); - device_create_file(&intf->dev, &dev_attr_output12); - device_create_file(&intf->dev, &dev_attr_output13); - device_create_file(&intf->dev, &dev_attr_output14); - device_create_file(&intf->dev, &dev_attr_output15); - device_create_file(&intf->dev, &dev_attr_output16); - } if (ifkit->inputs >= 4) { device_create_file(&intf->dev, &dev_attr_input1); @@ -547,22 +457,12 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic device_create_file(&intf->dev, &dev_attr_input3); device_create_file(&intf->dev, &dev_attr_input4); } - if (ifkit->inputs >= 8) { + if (ifkit->inputs == 8) { device_create_file(&intf->dev, &dev_attr_input5); device_create_file(&intf->dev, &dev_attr_input6); device_create_file(&intf->dev, &dev_attr_input7); device_create_file(&intf->dev, &dev_attr_input8); } - if (ifkit->inputs == 16) { - device_create_file(&intf->dev, &dev_attr_input9); - device_create_file(&intf->dev, &dev_attr_input10); - device_create_file(&intf->dev, &dev_attr_input11); - device_create_file(&intf->dev, &dev_attr_input12); - device_create_file(&intf->dev, &dev_attr_input13); - device_create_file(&intf->dev, &dev_attr_input14); - device_create_file(&intf->dev, &dev_attr_input15); - device_create_file(&intf->dev, &dev_attr_input16); - } if (ifkit->sensors >= 4) { device_create_file(&intf->dev, &dev_attr_sensor1); @@ -575,8 +475,9 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic device_create_file(&intf->dev, &dev_attr_sensor6); device_create_file(&intf->dev, &dev_attr_sensor7); } - if (ifkit->sensors == 8) + if (ifkit->sensors == 8) { device_create_file(&intf->dev, &dev_attr_sensor8); + } if (ifkit->has_lcd) device_create_file(&intf->dev, &dev_attr_lcd); @@ -585,56 +486,29 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic ifkit->sensors, ifkit->inputs, ifkit->outputs); return 0; - -out: - if (kit) { - if (kit->irq) - usb_free_urb(kit->irq); - if (kit->data) - usb_buffer_free(dev, URB_INT_SIZE, kit->data, kit->data_dma); - kfree(kit); - } - - return rc; } static void interfacekit_disconnect(struct usb_interface *interface) { - struct interfacekit *kit; + struct phidget_interfacekit *kit; kit = usb_get_intfdata(interface); usb_set_intfdata(interface, NULL); if (!kit) return; - usb_kill_urb(kit->irq); - usb_free_urb(kit->irq); - usb_buffer_free(kit->udev, URB_INT_SIZE, kit->data, kit->data_dma); - - cancel_delayed_work(&kit->do_notify); - if (kit->ifkit->outputs >= 4) { device_remove_file(&interface->dev, &dev_attr_output1); device_remove_file(&interface->dev, &dev_attr_output2); device_remove_file(&interface->dev, &dev_attr_output3); device_remove_file(&interface->dev, &dev_attr_output4); } - if (kit->ifkit->outputs >= 8) { + if (kit->ifkit->outputs == 8) { device_remove_file(&interface->dev, &dev_attr_output5); device_remove_file(&interface->dev, &dev_attr_output6); device_remove_file(&interface->dev, &dev_attr_output7); device_remove_file(&interface->dev, &dev_attr_output8); } - if (kit->ifkit->outputs == 16) { - device_remove_file(&interface->dev, &dev_attr_output9); - device_remove_file(&interface->dev, &dev_attr_output10); - device_remove_file(&interface->dev, &dev_attr_output11); - device_remove_file(&interface->dev, &dev_attr_output12); - device_remove_file(&interface->dev, &dev_attr_output13); - device_remove_file(&interface->dev, &dev_attr_output14); - device_remove_file(&interface->dev, &dev_attr_output15); - device_remove_file(&interface->dev, &dev_attr_output16); - } if (kit->ifkit->inputs >= 4) { device_remove_file(&interface->dev, &dev_attr_input1); @@ -642,22 +516,12 @@ static void interfacekit_disconnect(struct usb_interface *interface) device_remove_file(&interface->dev, &dev_attr_input3); device_remove_file(&interface->dev, &dev_attr_input4); } - if (kit->ifkit->inputs >= 8) { + if (kit->ifkit->inputs == 8) { device_remove_file(&interface->dev, &dev_attr_input5); device_remove_file(&interface->dev, &dev_attr_input6); device_remove_file(&interface->dev, &dev_attr_input7); device_remove_file(&interface->dev, &dev_attr_input8); } - if (kit->ifkit->inputs == 16) { - device_remove_file(&interface->dev, &dev_attr_input9); - device_remove_file(&interface->dev, &dev_attr_input10); - device_remove_file(&interface->dev, &dev_attr_input11); - device_remove_file(&interface->dev, &dev_attr_input12); - device_remove_file(&interface->dev, &dev_attr_input13); - device_remove_file(&interface->dev, &dev_attr_input14); - device_remove_file(&interface->dev, &dev_attr_input15); - device_remove_file(&interface->dev, &dev_attr_input16); - } if (kit->ifkit->sensors >= 4) { device_remove_file(&interface->dev, &dev_attr_sensor1); @@ -670,15 +534,19 @@ static void interfacekit_disconnect(struct usb_interface *interface) device_remove_file(&interface->dev, &dev_attr_sensor6); device_remove_file(&interface->dev, &dev_attr_sensor7); } - if (kit->ifkit->sensors == 8) + if (kit->ifkit->sensors == 8) { device_remove_file(&interface->dev, &dev_attr_sensor8); - + } if (kit->ifkit->has_lcd) device_remove_file(&interface->dev, &dev_attr_lcd); dev_info(&interface->dev, "USB PhidgetInterfaceKit %d/%d/%d detached\n", kit->ifkit->sensors, kit->ifkit->inputs, kit->ifkit->outputs); + usb_kill_urb(kit->irq); + usb_free_urb(kit->irq); + usb_buffer_free(kit->udev, 8, kit->data, kit->data_dma); + usb_put_dev(kit->udev); kfree(kit); } diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index c0df79c96..5a040c205 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c @@ -25,6 +25,7 @@ * */ +#include #include #include #include diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index a1d78ca68..196c8794a 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -36,7 +36,7 @@ * */ -#include +#include #include #include #include @@ -52,7 +52,6 @@ #include #include "sisusb.h" -#include "sisusb_init.h" #ifdef INCL_SISUSB_CON #include @@ -63,6 +62,36 @@ /* Forward declarations / clean-up routines */ #ifdef INCL_SISUSB_CON +int sisusb_setreg(struct sisusb_usb_data *sisusb, int port, u8 data); +int sisusb_getreg(struct sisusb_usb_data *sisusb, int port, u8 *data); +int sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data); +int sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data); +int sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand, u8 myor); +int sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor); +int sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand); + +int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data); +int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data); +int sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data); +int sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data); +int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, + u32 dest, int length, size_t *bytes_written); + +int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init); + +extern int SiSUSBSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); +extern int SiSUSBSetVESAMode(struct SiS_Private *SiS_Pr, unsigned short VModeNo); + +extern void sisusb_init_concode(void); +extern int sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last); +extern void sisusb_console_exit(struct sisusb_usb_data *sisusb); + +extern void sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location); + +extern int sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, + u8 *arg, int cmapsz, int ch512, int dorecalc, + struct vc_data *c, int fh, int uplock); + static int sisusb_first_vc = 0; static int sisusb_last_vc = 0; module_param_named(first, sisusb_first_vc, int, 0); @@ -73,7 +102,7 @@ MODULE_PARM_DESC(last, "Number of last console to take over (1 - MAX_NR_CONSOLES static struct usb_driver sisusb_driver; -DEFINE_MUTEX(disconnect_mutex); +DECLARE_MUTEX(disconnect_sem); static void sisusb_free_buffers(struct sisusb_usb_data *sisusb) @@ -1330,6 +1359,9 @@ sisusb_getreg(struct sisusb_usb_data *sisusb, int port, u8 *data) } #endif +#ifndef INCL_SISUSB_CON +static +#endif int sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data) { @@ -1339,6 +1371,9 @@ sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data) return ret; } +#ifndef INCL_SISUSB_CON +static +#endif int sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data) { @@ -1348,6 +1383,9 @@ sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data) return ret; } +#ifndef INCL_SISUSB_CON +static +#endif int sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand, u8 myor) @@ -1377,12 +1415,18 @@ sisusb_setidxregmask(struct sisusb_usb_data *sisusb, int port, u8 idx, return ret; } +#ifndef INCL_SISUSB_CON +static +#endif int sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor) { return(sisusb_setidxregandor(sisusb, port, index, 0xff, myor)); } +#ifndef INCL_SISUSB_CON +static +#endif int sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand) { @@ -1404,8 +1448,6 @@ sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data) return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data)); } -#if 0 - int sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data) { @@ -1418,8 +1460,6 @@ sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data) return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data)); } -#endif /* 0 */ - int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, u32 dest, int length, size_t *bytes_written) @@ -2512,39 +2552,39 @@ sisusb_open(struct inode *inode, struct file *file) struct usb_interface *interface; int subminor = iminor(inode); - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { printk(KERN_ERR "sisusb[%d]: Failed to find interface\n", subminor); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return -ENODEV; } if (!(sisusb = usb_get_intfdata(interface))) { - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return -ENODEV; } - mutex_lock(&sisusb->lock); + down(&sisusb->lock); if (!sisusb->present || !sisusb->ready) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return -ENODEV; } if (sisusb->isopen) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return -EBUSY; } if (!sisusb->devinit) { if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) { if (sisusb_init_gfxdevice(sisusb, 0)) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); printk(KERN_ERR "sisusbvga[%d]: Failed to initialize " "device\n", @@ -2552,8 +2592,8 @@ sisusb_open(struct inode *inode, struct file *file) return -EIO; } } else { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); printk(KERN_ERR "sisusbvga[%d]: Device not attached to " "USB 2.0 hub\n", @@ -2569,9 +2609,9 @@ sisusb_open(struct inode *inode, struct file *file) file->private_data = sisusb; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return 0; } @@ -2602,14 +2642,14 @@ sisusb_release(struct inode *inode, struct file *file) struct sisusb_usb_data *sisusb; int myminor; - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) { - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return -ENODEV; } - mutex_lock(&sisusb->lock); + down(&sisusb->lock); if (sisusb->present) { /* Wait for all URBs to finish if device still present */ @@ -2622,12 +2662,12 @@ sisusb_release(struct inode *inode, struct file *file) sisusb->isopen = 0; file->private_data = NULL; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); /* decrement the usage count on our device */ kref_put(&sisusb->kref, sisusb_delete); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return 0; } @@ -2645,11 +2685,11 @@ sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Sanity check */ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -ENODEV; } @@ -2744,7 +2784,7 @@ sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) (*ppos) <= SISUSB_PCI_PSEUDO_PCIBASE + 0x5c) { if (count != 4) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EINVAL; } @@ -2768,7 +2808,7 @@ sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) (*ppos) += bytes_read; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return errno ? errno : bytes_read; } @@ -2787,11 +2827,11 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count, if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Sanity check */ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -ENODEV; } @@ -2890,7 +2930,7 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count, (*ppos) <= SISUSB_PCI_PSEUDO_PCIBASE + SISUSB_PCI_PCONFSIZE) { if (count != 4) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EINVAL; } @@ -2916,7 +2956,7 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count, (*ppos) += bytes_written; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return errno ? errno : bytes_written; } @@ -2930,11 +2970,11 @@ sisusb_lseek(struct file *file, loff_t offset, int orig) if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Sanity check */ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -ENODEV; } @@ -2954,7 +2994,7 @@ sisusb_lseek(struct file *file, loff_t offset, int orig) ret = -EINVAL; } - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return ret; } @@ -3096,7 +3136,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Sanity check */ if (!sisusb->present || !sisusb->ready || !sisusb->sisusb_dev) { @@ -3153,7 +3193,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } err_out: - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return retval; } @@ -3218,7 +3258,7 @@ static int sisusb_probe(struct usb_interface *intf, } kref_init(&sisusb->kref); - mutex_init(&(sisusb->lock)); + init_MUTEX(&(sisusb->lock)); /* Register device */ if ((retval = usb_register_dev(intf, &usb_sisusb_class))) { @@ -3389,9 +3429,9 @@ static void sisusb_disconnect(struct usb_interface *intf) * protect all other routines from the disconnect * case, not the other way round. */ - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Wait for all URBs to complete and kill them in case (MUST do) */ if (!sisusb_wait_all_out_complete(sisusb)) @@ -3422,20 +3462,18 @@ static void sisusb_disconnect(struct usb_interface *intf) sisusb->present = 0; sisusb->ready = 0; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); /* decrement our usage count */ kref_put(&sisusb->kref, sisusb_delete); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); printk(KERN_INFO "sisusbvga[%d]: Disconnected\n", minor); } static struct usb_device_id sisusb_table [] = { { USB_DEVICE(0x0711, 0x0900) }, - { USB_DEVICE(0x0711, 0x0901) }, - { USB_DEVICE(0x0711, 0x0902) }, { USB_DEVICE(0x182d, 0x021c) }, { USB_DEVICE(0x182d, 0x0269) }, { } diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h index 8e1120a64..a716825d1 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.h +++ b/drivers/usb/misc/sisusbvga/sisusb.h @@ -41,8 +41,6 @@ #define SISUSB_NEW_CONFIG_COMPAT #endif -#include - /* For older kernels, support for text consoles is by default * off. To ensable text console support, change the following: */ @@ -62,9 +60,11 @@ #define INCL_SISUSB_CON 1 #endif +#ifdef INCL_SISUSB_CON #include #include #include "sisusb_struct.h" +#endif /* USB related */ @@ -116,7 +116,7 @@ struct sisusb_usb_data { struct usb_interface *interface; struct kref kref; wait_queue_head_t wait_q; /* for syncind and timeouts */ - struct mutex lock; /* general race avoidance */ + struct semaphore lock; /* general race avoidance */ unsigned int ifnum; /* interface number of the USB device */ int minor; /* minor (for logging clarity) */ int isopen; /* !=0 if open */ diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index bf26c3c56..be5c1a25a 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -47,7 +47,7 @@ * */ -#include +#include #include #include #include @@ -69,9 +69,27 @@ #include #include "sisusb.h" -#include "sisusb_init.h" #ifdef INCL_SISUSB_CON +extern int sisusb_setreg(struct sisusb_usb_data *, int, u8); +extern int sisusb_getreg(struct sisusb_usb_data *, int, u8 *); +extern int sisusb_setidxreg(struct sisusb_usb_data *, int, u8, u8); +extern int sisusb_getidxreg(struct sisusb_usb_data *, int, u8, u8 *); +extern int sisusb_setidxregor(struct sisusb_usb_data *, int, u8, u8); +extern int sisusb_setidxregand(struct sisusb_usb_data *, int, u8, u8); +extern int sisusb_setidxregandor(struct sisusb_usb_data *, int, u8, u8, u8); + +extern int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data); +extern int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data); +extern int sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data); +extern int sisusb_readw(struct sisusb_usb_data *sisusb, u32 adr, u16 *data); +extern int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, + u32 dest, int length, size_t *bytes_written); + +extern void sisusb_delete(struct kref *kref); +extern int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init); + +extern int SiSUSBSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); #define sisusbcon_writew(val, addr) (*(addr) = (val)) #define sisusbcon_readw(addr) (*(addr)) @@ -84,6 +102,8 @@ static struct sisusb_usb_data *mysisusbs[MAX_NR_CONSOLES]; /* Forward declaration */ static const struct consw sisusb_con; +extern struct semaphore disconnect_sem; + static inline void sisusbcon_memsetw(u16 *s, u16 c, unsigned int count) { @@ -174,11 +194,11 @@ sisusb_get_sisusb_lock_and_check(unsigned short console) if (!(sisusb = sisusb_get_sisusb(console))) return NULL; - mutex_lock(&sisusb->lock); + down(&sisusb->lock); if (!sisusb_sisusb_valid(sisusb) || !sisusb->havethisconsole[console]) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return NULL; } @@ -216,18 +236,18 @@ sisusbcon_init(struct vc_data *c, int init) * are set up/restored. */ - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); if (!(sisusb = sisusb_get_sisusb(c->vc_num))) { - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return; } - mutex_lock(&sisusb->lock); + down(&sisusb->lock); if (!sisusb_sisusb_valid(sisusb)) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return; } @@ -264,9 +284,9 @@ sisusbcon_init(struct vc_data *c, int init) if (!*c->vc_uni_pagedir_loc) con_set_default_unimap(c); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); if (init) { c->vc_cols = cols; @@ -286,14 +306,14 @@ sisusbcon_deinit(struct vc_data *c) * and others, ie not under our control. */ - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); if (!(sisusb = sisusb_get_sisusb(c->vc_num))) { - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); return; } - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Clear ourselves in mysisusbs */ mysisusbs[c->vc_num] = NULL; @@ -312,12 +332,12 @@ sisusbcon_deinit(struct vc_data *c) } } - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); /* decrement the usage count on our sisusb */ kref_put(&sisusb->kref, sisusb_delete); - mutex_unlock(&disconnect_mutex); + up(&disconnect_sem); } /* interface routine */ @@ -397,7 +417,7 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) #endif if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -405,7 +425,7 @@ sisusbcon_putc(struct vc_data *c, int ch, int y, int x) sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(x, y), (u32)SISUSB_HADDR(x, y), 2, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } /* Interface routine */ @@ -433,14 +453,14 @@ sisusbcon_putcs(struct vc_data *c, const unsigned short *s, sisusbcon_writew(sisusbcon_readw(s++), dest++); if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(x, y), (u32)SISUSB_HADDR(x, y), count * 2, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } /* Interface routine */ @@ -484,7 +504,7 @@ sisusbcon_clear(struct vc_data *c, int y, int x, int height, int width) } if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -494,7 +514,7 @@ sisusbcon_clear(struct vc_data *c, int y, int x, int height, int width) sisusb_copy_memory(sisusb, (unsigned char *)SISUSB_VADDR(x, y), (u32)SISUSB_HADDR(x, y), length, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } /* Interface routine */ @@ -556,7 +576,7 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx, #endif if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -566,7 +586,7 @@ sisusbcon_bmove(struct vc_data *c, int sy, int sx, sisusb_copy_memory(sisusb, (unsigned char *)SISUSB_VADDR(dx, dy), (u32)SISUSB_HADDR(dx, dy), length, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } /* interface routine */ @@ -589,7 +609,7 @@ sisusbcon_switch(struct vc_data *c) /* Don't write to screen if in gfx mode */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -598,7 +618,7 @@ sisusbcon_switch(struct vc_data *c) * as origin. */ if (c->vc_origin == (unsigned long)c->vc_screenbuf) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); printk(KERN_DEBUG "sisusb: ASSERT ORIGIN != SCREENBUF!\n"); return 0; } @@ -615,7 +635,7 @@ sisusbcon_switch(struct vc_data *c) (u32)SISUSB_HADDR(0, 0), length, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -637,7 +657,7 @@ sisusbcon_save_screen(struct vc_data *c) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -649,7 +669,7 @@ sisusbcon_save_screen(struct vc_data *c) sisusbcon_memcpyw((u16 *)c->vc_screenbuf, (u16 *)c->vc_origin, length); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } /* interface routine */ @@ -670,7 +690,7 @@ sisusbcon_set_palette(struct vc_data *c, unsigned char *table) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EINVAL; } @@ -685,7 +705,7 @@ sisusbcon_set_palette(struct vc_data *c, unsigned char *table) break; } - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -708,7 +728,7 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch) sisusb->is_gfx = blank ? 1 : 0; if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -757,7 +777,7 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch) cr63 = 0x40; break; default: - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EINVAL; } @@ -768,7 +788,7 @@ sisusbcon_blank(struct vc_data *c, int blank, int mode_switch) } - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return ret; } @@ -789,7 +809,7 @@ sisusbcon_scrolldelta(struct vc_data *c, int lines) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -829,7 +849,7 @@ sisusbcon_scrolldelta(struct vc_data *c, int lines) sisusbcon_set_start_address(sisusb, c); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 1; } @@ -847,7 +867,7 @@ sisusbcon_cursor(struct vc_data *c, int mode) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -859,7 +879,7 @@ sisusbcon_cursor(struct vc_data *c, int mode) if (mode == CM_ERASE) { sisusb_setidxregor(sisusb, SISCR, 0x0a, 0x20); sisusb->sisusb_cursor_size_to = -1; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return; } @@ -899,7 +919,7 @@ sisusbcon_cursor(struct vc_data *c, int mode) sisusb->sisusb_cursor_size_to = to; } - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); } static int @@ -941,7 +961,7 @@ sisusbcon_scroll_area(struct vc_data *c, struct sisusb_usb_data *sisusb, sisusb_copy_memory(sisusb, (char *)SISUSB_VADDR(0, t), (u32)SISUSB_HADDR(0, t), length, &written); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 1; } @@ -974,7 +994,7 @@ sisusbcon_scroll(struct vc_data *c, int t, int b, int dir, int lines) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb)) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -1064,7 +1084,7 @@ sisusbcon_scroll(struct vc_data *c, int t, int b, int dir, int lines) c->vc_pos = c->vc_pos - oldorigin + c->vc_origin; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 1; } @@ -1086,7 +1106,7 @@ sisusbcon_set_origin(struct vc_data *c) /* sisusb->lock is down */ if (sisusb_is_inactive(c, sisusb) || sisusb->con_blanked) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -1096,7 +1116,7 @@ sisusbcon_set_origin(struct vc_data *c) sisusb->con_rolled_over = 0; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 1; } @@ -1113,7 +1133,7 @@ sisusbcon_resize(struct vc_data *c, unsigned int newcols, unsigned int newrows) fh = sisusb->current_font_height; - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); /* We are quite unflexible as regards resizing. The vt code * handles sizes where the line length isn't equal the pitch @@ -1147,7 +1167,7 @@ sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, if ((slot != 0 && slot != 2) || !fh) { if (uplock) - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EINVAL; } @@ -1307,7 +1327,7 @@ sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, } if (uplock) - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); if (dorecalc && c) { int i, rows = c->vc_scan_lines / fh; @@ -1331,7 +1351,7 @@ sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, font_op_error: if (uplock) - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -EIO; } @@ -1397,19 +1417,19 @@ sisusbcon_font_get(struct vc_data *c, struct console_font *font) font->charcount = 256; if (!font->data) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } if (!sisusb->font_backup) { - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return -ENODEV; } /* Copy 256 chars only, like vgacon */ memcpy(font->data, sisusb->font_backup, 256 * 32); - mutex_unlock(&sisusb->lock); + up(&sisusb->lock); return 0; } @@ -1466,7 +1486,7 @@ static int sisusbdummycon_dummy(void) #define SISUSBCONDUMMY (void *)sisusbdummycon_dummy -static const struct consw sisusb_dummy_con = { +const struct consw sisusb_dummy_con = { .owner = THIS_MODULE, .con_startup = sisusbdummycon_startup, .con_init = sisusbdummycon_init, @@ -1492,14 +1512,14 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) { int i, ret, minor = sisusb->minor; - mutex_lock(&disconnect_mutex); + down(&disconnect_sem); - mutex_lock(&sisusb->lock); + down(&sisusb->lock); /* Erm.. that should not happen */ if (sisusb->haveconsole || !sisusb->SiS_Pr) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return 1; } @@ -1509,15 +1529,15 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) if (first > last || first > MAX_NR_CONSOLES || last > MAX_NR_CONSOLES) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return 1; } /* If gfxcore not initialized or no consoles given, quit graciously */ if (!sisusb->gfxinit || first < 1 || last < 1) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); return 0; } @@ -1527,8 +1547,8 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) /* Set up text mode (and upload default font) */ if (sisusb_reset_text_mode(sisusb, 1)) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); printk(KERN_ERR "sisusbvga[%d]: Failed to set up text mode\n", minor); @@ -1551,16 +1571,16 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) /* Allocate screen buffer */ if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) { - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); printk(KERN_ERR "sisusbvga[%d]: Failed to allocate screen buffer\n", minor); return 1; } - mutex_unlock(&sisusb->lock); - mutex_unlock(&disconnect_mutex); + up(&sisusb->lock); + up(&disconnect_sem); /* Now grab the desired console(s) */ ret = take_over_console(&sisusb_con, first - 1, last - 1, 0); diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c index 9b30f8962..044fa4482 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/drivers/usb/misc/sisusbvga/sisusb_init.c @@ -36,6 +36,7 @@ * */ +#include #include #include #include @@ -73,7 +74,6 @@ SiSUSB_InitPtr(struct SiS_Private *SiS_Pr) /* HELPER: Get ModeID */ /*********************************************/ -#if 0 unsigned short SiSUSB_GetModeID(int HDisplay, int VDisplay, int Depth) { @@ -157,7 +157,6 @@ SiSUSB_GetModeID(int HDisplay, int VDisplay, int Depth) return ModeIndex; } -#endif /* 0 */ /*********************************************/ /* HELPER: SetReg, GetReg */ @@ -234,7 +233,7 @@ SiS_DisplayOn(struct SiS_Private *SiS_Pr) /* HELPER: Init Port Addresses */ /*********************************************/ -static void +void SiSUSBRegInit(struct SiS_Private *SiS_Pr, unsigned long BaseAddr) { SiS_Pr->SiS_P3c4 = BaseAddr + 0x14; diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.h b/drivers/usb/misc/sisusbvga/sisusb_init.h index f05f83268..5b1157783 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.h +++ b/drivers/usb/misc/sisusbvga/sisusb_init.h @@ -690,7 +690,7 @@ static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = 0x41}} /* 0x54 */ }; -static const struct SiS_VCLKData SiSUSB_VCLKData[] = +static struct SiS_VCLKData SiSUSB_VCLKData[] = { { 0x1b,0xe1, 25}, /* 0x00 */ { 0x4e,0xe4, 28}, /* 0x01 */ @@ -808,8 +808,8 @@ static const struct SiS_VCLKData SiSUSB_VCLKData[] = { 0x2b,0xc2, 35} /* 0x71 768@576@60 */ }; -extern struct mutex disconnect_mutex; - +void SiSUSBRegInit(struct SiS_Private *SiS_Pr, unsigned long BaseAddr); +unsigned short SiSUSB_GetModeID(int HDisplay, int VDisplay, int Depth); int SiSUSBSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); int SiSUSBSetVESAMode(struct SiS_Private *SiS_Pr, unsigned short VModeNo); @@ -826,19 +826,5 @@ extern int sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, extern int sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand); -void sisusb_delete(struct kref *kref); -int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data); -int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 *data); -int sisusb_copy_memory(struct sisusb_usb_data *sisusb, char *src, - u32 dest, int length, size_t *bytes_written); -int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init); -int sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot, - u8 *arg, int cmapsz, int ch512, int dorecalc, - struct vc_data *c, int fh, int uplock); -void sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location); -int sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last); -void sisusb_console_exit(struct sisusb_usb_data *sisusb); -void sisusb_init_concode(void); - #endif diff --git a/drivers/usb/misc/sisusbvga/sisusb_struct.h b/drivers/usb/misc/sisusbvga/sisusb_struct.h index f325ecb29..94edd4726 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_struct.h +++ b/drivers/usb/misc/sisusbvga/sisusb_struct.h @@ -161,7 +161,7 @@ struct SiS_Private const struct SiS_Ext *SiS_EModeIDTable; const struct SiS_Ext2 *SiS_RefIndex; const struct SiS_CRT1Table *SiS_CRT1Table; - const struct SiS_VCLKData *SiS_VCLKData; + struct SiS_VCLKData *SiS_VCLKData; const struct SiS_ModeResInfo *SiS_ModeResInfo; }; diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index e095772dd..c82c40228 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c @@ -200,8 +200,10 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer, siz /* create a urb, and a buffer for it, and copy the data to the urb */ urb = usb_alloc_urb(0, GFP_KERNEL); - if (!urb) - return -ENOMEM; + if (!urb) { + retval = -ENOMEM; + goto error; + } buf = usb_buffer_alloc(dev->udev, count, GFP_KERNEL, &urb->transfer_dma); if (!buf) { diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c index 0c5ee0ad6..f44196413 100644 --- a/drivers/usb/misc/usbled.c +++ b/drivers/usb/misc/usbled.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 983e104dd..ccc5e8238 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -801,9 +802,7 @@ error: if (u == urb || !u->dev) continue; - spin_unlock(&ctx->lock); status = usb_unlink_urb (u); - spin_lock(&ctx->lock); switch (status) { case -EINPROGRESS: case -EBUSY: @@ -1242,12 +1241,11 @@ done: static int ctrl_out (struct usbtest_dev *dev, unsigned count, unsigned length, unsigned vary) { - unsigned i, j, len; - int retval; + unsigned i, j, len, retval; u8 *buf; char *what = "?"; struct usb_device *udev; - + if (length < 1 || length > 0xffff || vary >= length) return -EINVAL; @@ -1337,9 +1335,7 @@ struct iso_context { unsigned pending; spinlock_t lock; struct completion done; - int submit_error; unsigned long errors; - unsigned long packet_count; struct usbtest_dev *dev; }; @@ -1350,14 +1346,10 @@ static void iso_callback (struct urb *urb, struct pt_regs *regs) spin_lock(&ctx->lock); ctx->count--; - ctx->packet_count += urb->number_of_packets; if (urb->error_count > 0) ctx->errors += urb->error_count; - else if (urb->status != 0) - ctx->errors += urb->number_of_packets; - if (urb->status == 0 && ctx->count > (ctx->pending - 1) - && !ctx->submit_error) { + if (urb->status == 0 && ctx->count > (ctx->pending - 1)) { int status = usb_submit_urb (urb, GFP_ATOMIC); switch (status) { case 0: @@ -1368,8 +1360,6 @@ static void iso_callback (struct urb *urb, struct pt_regs *regs) status); /* FALLTHROUGH */ case -ENODEV: /* disconnected */ - case -ESHUTDOWN: /* endpoint disabled */ - ctx->submit_error = 1; break; } } @@ -1379,8 +1369,8 @@ static void iso_callback (struct urb *urb, struct pt_regs *regs) if (ctx->pending == 0) { if (ctx->errors) dev_dbg (&ctx->dev->intf->dev, - "iso test, %lu errors out of %lu\n", - ctx->errors, ctx->packet_count); + "iso test, %lu errors\n", + ctx->errors); complete (&ctx->done); } done: @@ -1441,14 +1431,15 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, struct usb_device *udev; unsigned i; unsigned long packets = 0; - int status = 0; + int status; struct urb *urbs[10]; /* FIXME no limit */ if (param->sglen > 10) return -EDOM; - memset(&context, 0, sizeof context); context.count = param->iterations * param->sglen; + context.pending = param->sglen; + context.errors = 0; context.dev = dev; init_completion (&context.done); spin_lock_init (&context.lock); @@ -1480,7 +1471,6 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, spin_lock_irq (&context.lock); for (i = 0; i < param->sglen; i++) { - ++context.pending; status = usb_submit_urb (urbs [i], SLAB_ATOMIC); if (status < 0) { ERROR (dev, "submit iso[%d], error %d\n", i, status); @@ -1491,26 +1481,12 @@ test_iso_queue (struct usbtest_dev *dev, struct usbtest_param *param, simple_free_urb (urbs [i]); context.pending--; - context.submit_error = 1; - break; } } spin_unlock_irq (&context.lock); wait_for_completion (&context.done); - - /* - * Isochronous transfers are expected to fail sometimes. As an - * arbitrary limit, we will report an error if any submissions - * fail or if the transfer failure rate is > 10%. - */ - if (status != 0) - ; - else if (context.submit_error) - status = -EACCES; - else if (context.errors > context.packet_count / 10) - status = -EIO; - return status; + return 0; fail: for (i = 0; i < param->sglen; i++) { diff --git a/drivers/usb/mon/mon_dma.c b/drivers/usb/mon/mon_dma.c index ddcfc01e7..0a1367b76 100644 --- a/drivers/usb/mon/mon_dma.c +++ b/drivers/usb/mon/mon_dma.c @@ -13,10 +13,7 @@ #include /* Only needed for declarations in usb_mon.h */ #include "usb_mon.h" -/* - * PC-compatibles, are, fortunately, sufficiently cache-coherent for this. - */ -#if defined(__i386__) || defined(__x86_64__) /* CONFIG_ARCH_I386 doesn't exit */ +#ifdef __i386__ /* CONFIG_ARCH_I386 does not exit */ #define MON_HAS_UNMAP 1 #define phys_to_page(phys) pfn_to_page((phys) >> PAGE_SHIFT) diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c index 275a66f83..6ecc27302 100644 --- a/drivers/usb/mon/mon_main.c +++ b/drivers/usb/mon/mon_main.c @@ -97,7 +97,6 @@ static void mon_submit(struct usb_bus *ubus, struct urb *urb) if (mbus->nreaders == 0) goto out_locked; - mbus->cnt_events++; list_for_each (pos, &mbus->r_list) { r = list_entry(pos, struct mon_reader, r_link); r->rnf_submit(r->r_data, urb); @@ -114,32 +113,20 @@ out_unlocked: /* */ -static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int error) +static void mon_submit_error(struct usb_bus *ubus, struct urb *urb, int err) { struct mon_bus *mbus; - unsigned long flags; - struct list_head *pos; - struct mon_reader *r; mbus = ubus->mon_bus; if (mbus == NULL) goto out_unlocked; - spin_lock_irqsave(&mbus->lock, flags); - if (mbus->nreaders == 0) - goto out_locked; - - mbus->cnt_events++; - list_for_each (pos, &mbus->r_list) { - r = list_entry(pos, struct mon_reader, r_link); - r->rnf_error(r->r_data, urb, error); - } + /* + * XXX Capture the error code and the 'E' event. + */ - spin_unlock_irqrestore(&mbus->lock, flags); return; -out_locked: - spin_unlock_irqrestore(&mbus->lock, flags); out_unlocked: return; } @@ -165,7 +152,6 @@ static void mon_complete(struct usb_bus *ubus, struct urb *urb) } spin_lock_irqsave(&mbus->lock, flags); - mbus->cnt_events++; list_for_each (pos, &mbus->r_list) { r = list_entry(pos, struct mon_reader, r_link); r->rnf_complete(r->r_data, urb); @@ -177,6 +163,7 @@ static void mon_complete(struct usb_bus *ubus, struct urb *urb) /* * Stop monitoring. + * Obviously this must be well locked, so no need to play with mb's. */ static void mon_stop(struct mon_bus *mbus) { diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index 86ad2b381..6e4b165d0 100644 --- a/drivers/usb/mon/mon_stat.c +++ b/drivers/usb/mon/mon_stat.c @@ -28,11 +28,11 @@ static int mon_stat_open(struct inode *inode, struct file *file) if ((sp = kmalloc(sizeof(struct snap), GFP_KERNEL)) == NULL) return -ENOMEM; - mbus = inode->i_private; + mbus = inode->u.generic_ip; sp->slen = snprintf(sp->str, STAT_BUF_SIZE, - "nreaders %d events %u text_lost %u\n", - mbus->nreaders, mbus->cnt_events, mbus->cnt_text_lost); + "nreaders %d text_lost %u\n", + mbus->nreaders, mbus->cnt_text_lost); file->private_data = sp; return 0; diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 2fd39b4fa..ac043ec2b 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c @@ -26,13 +26,10 @@ /* * This limit exists to prevent OOMs when the user process stops reading. - * If usbmon were available to unprivileged processes, it might be open - * to a local DoS. But we have to keep to root in order to prevent - * password sniffing from HID devices. */ -#define EVENT_MAX (2*PAGE_SIZE / sizeof(struct mon_event_text)) +#define EVENT_MAX 25 -#define PRINTF_DFL 160 +#define PRINTF_DFL 130 struct mon_event_text { struct list_head e_link; @@ -64,6 +61,7 @@ struct mon_reader_text { }; static void mon_text_ctor(void *, kmem_cache_t *, unsigned long); +static void mon_text_dtor(void *, kmem_cache_t *, unsigned long); /* * mon_text_submit @@ -113,7 +111,7 @@ static inline char mon_text_get_data(struct mon_event_text *ep, struct urb *urb, * number of corner cases, but it seems that the following is * more or less safe. * - * We do not even try to look at transfer_buffer, because it can + * We do not even try to look transfer_buffer, because it can * contain non-NULL garbage in case the upper level promised to * set DMA for the HCD. */ @@ -181,32 +179,6 @@ static void mon_text_complete(void *data, struct urb *urb) mon_text_event(rp, urb, 'C'); } -static void mon_text_error(void *data, struct urb *urb, int error) -{ - struct mon_reader_text *rp = data; - struct mon_event_text *ep; - - if (rp->nevents >= EVENT_MAX || - (ep = kmem_cache_alloc(rp->e_slab, SLAB_ATOMIC)) == NULL) { - rp->r.m_bus->cnt_text_lost++; - return; - } - - ep->type = 'E'; - ep->pipe = urb->pipe; - ep->id = (unsigned long) urb; - ep->tstamp = 0; - ep->length = 0; - ep->status = error; - - ep->setup_flag = '-'; - ep->data_flag = 'E'; - - rp->nevents++; - list_add_tail(&ep->e_link, &rp->e_list); - wake_up(&rp->wait); -} - /* * Fetch next event from the circular buffer. */ @@ -238,7 +210,7 @@ static int mon_text_open(struct inode *inode, struct file *file) int rc; mutex_lock(&mon_lock); - mbus = inode->i_private; + mbus = inode->u.generic_ip; ubus = mbus->u_bus; rp = kzalloc(sizeof(struct mon_reader_text), GFP_KERNEL); @@ -260,14 +232,13 @@ static int mon_text_open(struct inode *inode, struct file *file) rp->r.m_bus = mbus; rp->r.r_data = rp; rp->r.rnf_submit = mon_text_submit; - rp->r.rnf_error = mon_text_error; rp->r.rnf_complete = mon_text_complete; snprintf(rp->slab_name, SLAB_NAME_SZ, "mon%dt_%lx", ubus->busnum, (long)rp); rp->e_slab = kmem_cache_create(rp->slab_name, sizeof(struct mon_event_text), sizeof(long), 0, - mon_text_ctor, NULL); + mon_text_ctor, mon_text_dtor); if (rp->e_slab == NULL) { rc = -ENOMEM; goto err_slab; @@ -401,7 +372,7 @@ static int mon_text_release(struct inode *inode, struct file *file) struct mon_event_text *ep; mutex_lock(&mon_lock); - mbus = inode->i_private; + mbus = inode->u.generic_ip; if (mbus->nreaders <= 0) { printk(KERN_ERR TAG ": consistency error on close\n"); @@ -458,3 +429,7 @@ static void mon_text_ctor(void *mem, kmem_cache_t *slab, unsigned long sflags) memset(mem, 0xe5, sizeof(struct mon_event_text)); } +static void mon_text_dtor(void *mem, kmem_cache_t *slab, unsigned long sflags) +{ + ; +} diff --git a/drivers/usb/mon/usb_mon.h b/drivers/usb/mon/usb_mon.h index 33678c24e..8e0613c35 100644 --- a/drivers/usb/mon/usb_mon.h +++ b/drivers/usb/mon/usb_mon.h @@ -27,7 +27,6 @@ struct mon_bus { struct kref ref; /* Under mon_lock */ /* Stats */ - unsigned int cnt_events; unsigned int cnt_text_lost; }; @@ -40,7 +39,6 @@ struct mon_reader { void *r_data; /* Use container_of instead? */ void (*rnf_submit)(void *data, struct urb *urb); - void (*rnf_error)(void *data, struct urb *urb, int error); void (*rnf_complete)(void *data, struct urb *urb); }; diff --git a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig index 054059632..efd6ca7e4 100644 --- a/drivers/usb/net/Kconfig +++ b/drivers/usb/net/Kconfig @@ -301,4 +301,21 @@ config USB_NET_ZAURUS some cases CDC MDLM) protocol, not "g_ether". +config USB_ZD1201 + tristate "USB ZD1201 based Wireless device support" + depends on NET_RADIO + select FW_LOADER + ---help--- + Say Y if you want to use wireless LAN adapters based on the ZyDAS + ZD1201 chip. + + This driver makes the adapter appear as a normal Ethernet interface, + typically on wlan0. + + The zd1201 device requires external firmware to be loaded. + This can be found at http://linux-lc100020.sourceforge.net/ + + To compile this driver as a module, choose M here: the + module will be called zd1201. + endmenu diff --git a/drivers/usb/net/Makefile b/drivers/usb/net/Makefile index 160f19dbd..a21e6eaab 100644 --- a/drivers/usb/net/Makefile +++ b/drivers/usb/net/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o obj-$(CONFIG_USB_USBNET) += usbnet.o +obj-$(CONFIG_USB_ZD1201) += zd1201.o ifeq ($(CONFIG_USB_DEBUG),y) EXTRA_CFLAGS += -DDEBUG diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c index 214ce21c1..12b599a0b 100644 --- a/drivers/usb/net/asix.c +++ b/drivers/usb/net/asix.c @@ -1,8 +1,7 @@ /* * ASIX AX8817X based USB 2.0 Ethernet Devices - * Copyright (C) 2003-2006 David Hollis + * Copyright (C) 2003-2005 David Hollis * Copyright (C) 2005 Phil Chang - * Copyright (C) 2006 James Painter * Copyright (c) 2002-2003 TiVo Inc. * * This program is free software; you can redistribute it and/or modify @@ -23,6 +22,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include @@ -37,9 +37,6 @@ #include "usbnet.h" -#define DRIVER_VERSION "14-Jun-2006" -static const char driver_name [] = "asix"; - /* ASIX AX8817X based USB 2.0 Ethernet Devices */ #define AX_CMD_SET_SW_MII 0x06 @@ -50,25 +47,23 @@ static const char driver_name [] = "asix"; #define AX_CMD_WRITE_EEPROM 0x0c #define AX_CMD_WRITE_ENABLE 0x0d #define AX_CMD_WRITE_DISABLE 0x0e -#define AX_CMD_READ_RX_CTL 0x0f #define AX_CMD_WRITE_RX_CTL 0x10 #define AX_CMD_READ_IPG012 0x11 #define AX_CMD_WRITE_IPG0 0x12 #define AX_CMD_WRITE_IPG1 0x13 -#define AX_CMD_READ_NODE_ID 0x13 #define AX_CMD_WRITE_IPG2 0x14 #define AX_CMD_WRITE_MULTI_FILTER 0x16 -#define AX88172_CMD_READ_NODE_ID 0x17 +#define AX_CMD_READ_NODE_ID 0x17 #define AX_CMD_READ_PHY_ID 0x19 #define AX_CMD_READ_MEDIUM_STATUS 0x1a #define AX_CMD_WRITE_MEDIUM_MODE 0x1b #define AX_CMD_READ_MONITOR_MODE 0x1c #define AX_CMD_WRITE_MONITOR_MODE 0x1d -#define AX_CMD_READ_GPIOS 0x1e #define AX_CMD_WRITE_GPIOS 0x1f #define AX_CMD_SW_RESET 0x20 #define AX_CMD_SW_PHY_STATUS 0x21 #define AX_CMD_SW_PHY_SELECT 0x22 +#define AX88772_CMD_READ_NODE_ID 0x13 #define AX_MONITOR_MODE 0x01 #define AX_MONITOR_LINK 0x02 @@ -76,15 +71,15 @@ static const char driver_name [] = "asix"; #define AX_MONITOR_HSFS 0x10 /* AX88172 Medium Status Register values */ -#define AX88172_MEDIUM_FD 0x02 -#define AX88172_MEDIUM_TX 0x04 -#define AX88172_MEDIUM_FC 0x10 -#define AX88172_MEDIUM_DEFAULT \ - ( AX88172_MEDIUM_FD | AX88172_MEDIUM_TX | AX88172_MEDIUM_FC ) +#define AX_MEDIUM_FULL_DUPLEX 0x02 +#define AX_MEDIUM_TX_ABORT_ALLOW 0x04 +#define AX_MEDIUM_FLOW_CONTROL_EN 0x10 #define AX_MCAST_FILTER_SIZE 8 #define AX_MAX_MCAST 64 +#define AX_EEPROM_LEN 0x40 + #define AX_SWRESET_CLEAR 0x00 #define AX_SWRESET_RR 0x01 #define AX_SWRESET_RT 0x02 @@ -98,78 +93,23 @@ static const char driver_name [] = "asix"; #define AX88772_IPG1_DEFAULT 0x0c #define AX88772_IPG2_DEFAULT 0x12 -/* AX88772 & AX88178 Medium Mode Register */ -#define AX_MEDIUM_PF 0x0080 -#define AX_MEDIUM_JFE 0x0040 -#define AX_MEDIUM_TFC 0x0020 -#define AX_MEDIUM_RFC 0x0010 -#define AX_MEDIUM_ENCK 0x0008 -#define AX_MEDIUM_AC 0x0004 -#define AX_MEDIUM_FD 0x0002 -#define AX_MEDIUM_GM 0x0001 -#define AX_MEDIUM_SM 0x1000 -#define AX_MEDIUM_SBP 0x0800 -#define AX_MEDIUM_PS 0x0200 -#define AX_MEDIUM_RE 0x0100 - -#define AX88178_MEDIUM_DEFAULT \ - (AX_MEDIUM_PS | AX_MEDIUM_FD | AX_MEDIUM_AC | \ - AX_MEDIUM_RFC | AX_MEDIUM_TFC | AX_MEDIUM_JFE | \ - AX_MEDIUM_RE ) - +#define AX88772_MEDIUM_FULL_DUPLEX 0x0002 +#define AX88772_MEDIUM_RESERVED 0x0004 +#define AX88772_MEDIUM_RX_FC_ENABLE 0x0010 +#define AX88772_MEDIUM_TX_FC_ENABLE 0x0020 +#define AX88772_MEDIUM_PAUSE_FORMAT 0x0080 +#define AX88772_MEDIUM_RX_ENABLE 0x0100 +#define AX88772_MEDIUM_100MB 0x0200 #define AX88772_MEDIUM_DEFAULT \ - (AX_MEDIUM_FD | AX_MEDIUM_RFC | \ - AX_MEDIUM_TFC | AX_MEDIUM_PS | \ - AX_MEDIUM_AC | AX_MEDIUM_RE ) - -/* AX88772 & AX88178 RX_CTL values */ -#define AX_RX_CTL_SO 0x0080 -#define AX_RX_CTL_AP 0x0020 -#define AX_RX_CTL_AM 0x0010 -#define AX_RX_CTL_AB 0x0008 -#define AX_RX_CTL_SEP 0x0004 -#define AX_RX_CTL_AMALL 0x0002 -#define AX_RX_CTL_PRO 0x0001 -#define AX_RX_CTL_MFB_2048 0x0000 -#define AX_RX_CTL_MFB_4096 0x0100 -#define AX_RX_CTL_MFB_8192 0x0200 -#define AX_RX_CTL_MFB_16384 0x0300 - -#define AX_DEFAULT_RX_CTL \ - (AX_RX_CTL_SO | AX_RX_CTL_AB ) - -/* GPIO 0 .. 2 toggles */ -#define AX_GPIO_GPO0EN 0x01 /* GPIO0 Output enable */ -#define AX_GPIO_GPO_0 0x02 /* GPIO0 Output value */ -#define AX_GPIO_GPO1EN 0x04 /* GPIO1 Output enable */ -#define AX_GPIO_GPO_1 0x08 /* GPIO1 Output value */ -#define AX_GPIO_GPO2EN 0x10 /* GPIO2 Output enable */ -#define AX_GPIO_GPO_2 0x20 /* GPIO2 Output value */ -#define AX_GPIO_RESERVED 0x40 /* Reserved */ -#define AX_GPIO_RSE 0x80 /* Reload serial EEPROM */ - -#define AX_EEPROM_MAGIC 0xdeadbeef -#define AX88172_EEPROM_LEN 0x40 -#define AX88772_EEPROM_LEN 0xff - -#define PHY_MODE_MARVELL 0x0000 -#define MII_MARVELL_LED_CTRL 0x0018 -#define MII_MARVELL_STATUS 0x001b -#define MII_MARVELL_CTRL 0x0014 - -#define MARVELL_LED_MANUAL 0x0019 - -#define MARVELL_STATUS_HWCFG 0x0004 - -#define MARVELL_CTRL_TXDELAY 0x0002 -#define MARVELL_CTRL_RXDELAY 0x0080 + (AX88772_MEDIUM_FULL_DUPLEX | AX88772_MEDIUM_RX_FC_ENABLE | \ + AX88772_MEDIUM_TX_FC_ENABLE | AX88772_MEDIUM_100MB | \ + AX88772_MEDIUM_RESERVED | AX88772_MEDIUM_RX_ENABLE ) + +#define AX_EEPROM_MAGIC 0xdeadbeef /* This structure cannot exceed sizeof(unsigned long [5]) AKA 20 bytes */ struct asix_data { u8 multi_filter[AX_MCAST_FILTER_SIZE]; - u8 phymode; - u8 ledmode; - u8 eeprom_len; }; struct ax88172_int_data { @@ -183,8 +123,6 @@ struct ax88172_int_data { static int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index, u16 size, void *data) { - devdbg(dev,"asix_read_cmd() cmd=0x%02x value=0x%04x index=0x%04x size=%d", - cmd, value, index, size); return usb_control_msg( dev->udev, usb_rcvctrlpipe(dev->udev, 0), @@ -200,8 +138,6 @@ static int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index, static int asix_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index, u16 size, void *data) { - devdbg(dev,"asix_write_cmd() cmd=0x%02x value=0x%04x index=0x%04x size=%d", - cmd, value, index, size); return usb_control_msg( dev->udev, usb_sndctrlpipe(dev->udev, 0), @@ -226,167 +162,12 @@ static void asix_async_cmd_callback(struct urb *urb, struct pt_regs *regs) usb_free_urb(urb); } -static void -asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index, - u16 size, void *data) -{ - struct usb_ctrlrequest *req; - int status; - struct urb *urb; - - devdbg(dev,"asix_write_cmd_async() cmd=0x%02x value=0x%04x index=0x%04x size=%d", - cmd, value, index, size); - if ((urb = usb_alloc_urb(0, GFP_ATOMIC)) == NULL) { - deverr(dev, "Error allocating URB in write_cmd_async!"); - return; - } - - if ((req = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC)) == NULL) { - deverr(dev, "Failed to allocate memory for control request"); - usb_free_urb(urb); - return; - } - - req->bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE; - req->bRequest = cmd; - req->wValue = value; - req->wIndex = index; - req->wLength = size; - - usb_fill_control_urb(urb, dev->udev, - usb_sndctrlpipe(dev->udev, 0), - (void *)req, data, size, - asix_async_cmd_callback, req); - - if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { - deverr(dev, "Error submitting the control message: status=%d", - status); - kfree(req); - usb_free_urb(urb); - } -} - -static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) -{ - u8 *head; - u32 header; - char *packet; - struct sk_buff *ax_skb; - u16 size; - - head = (u8 *) skb->data; - memcpy(&header, head, sizeof(header)); - le32_to_cpus(&header); - packet = head + sizeof(header); - - skb_pull(skb, 4); - - while (skb->len > 0) { - if ((short)(header & 0x0000ffff) != - ~((short)((header & 0xffff0000) >> 16))) { - deverr(dev,"asix_rx_fixup() Bad Header Length"); - } - /* get the packet length */ - size = (u16) (header & 0x0000ffff); - - if ((skb->len) - ((size + 1) & 0xfffe) == 0) - return 2; - if (size > ETH_FRAME_LEN) { - deverr(dev,"asix_rx_fixup() Bad RX Length %d", size); - return 0; - } - ax_skb = skb_clone(skb, GFP_ATOMIC); - if (ax_skb) { - ax_skb->len = size; - ax_skb->data = packet; - ax_skb->tail = packet + size; - usbnet_skb_return(dev, ax_skb); - } else { - return 0; - } - - skb_pull(skb, (size + 1) & 0xfffe); - - if (skb->len == 0) - break; - - head = (u8 *) skb->data; - memcpy(&header, head, sizeof(header)); - le32_to_cpus(&header); - packet = head + sizeof(header); - skb_pull(skb, 4); - } - - if (skb->len < 0) { - deverr(dev,"asix_rx_fixup() Bad SKB Length %d", skb->len); - return 0; - } - return 1; -} - -static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, - gfp_t flags) -{ - int padlen; - int headroom = skb_headroom(skb); - int tailroom = skb_tailroom(skb); - u32 packet_len; - u32 padbytes = 0xffff0000; - - padlen = ((skb->len + 4) % 512) ? 0 : 4; - - if ((!skb_cloned(skb)) - && ((headroom + tailroom) >= (4 + padlen))) { - if ((headroom < 4) || (tailroom < padlen)) { - skb->data = memmove(skb->head + 4, skb->data, skb->len); - skb->tail = skb->data + skb->len; - } - } else { - struct sk_buff *skb2; - skb2 = skb_copy_expand(skb, 4, padlen, flags); - dev_kfree_skb_any(skb); - skb = skb2; - if (!skb) - return NULL; - } - - skb_push(skb, 4); - packet_len = (((skb->len - 4) ^ 0x0000ffff) << 16) + (skb->len - 4); - memcpy(skb->data, &packet_len, sizeof(packet_len)); - - if ((skb->len % 512) == 0) { - memcpy( skb->tail, &padbytes, sizeof(padbytes)); - skb_put(skb, sizeof(padbytes)); - } - return skb; -} - -static void asix_status(struct usbnet *dev, struct urb *urb) -{ - struct ax88172_int_data *event; - int link; - - if (urb->actual_length < 8) - return; - - event = urb->transfer_buffer; - link = event->link & 0x01; - if (netif_carrier_ok(dev->net) != link) { - if (link) { - netif_carrier_on(dev->net); - usbnet_defer_kevent (dev, EVENT_LINK_RESET ); - } else - netif_carrier_off(dev->net); - devdbg(dev, "Link Status is: %d", link); - } -} - static inline int asix_set_sw_mii(struct usbnet *dev) { int ret; ret = asix_write_cmd(dev, AX_CMD_SET_SW_MII, 0x0000, 0, 0, NULL); if (ret < 0) - deverr(dev, "Failed to enable software MII access"); + devdbg(dev, "Failed to enable software MII access"); return ret; } @@ -395,27 +176,24 @@ static inline int asix_set_hw_mii(struct usbnet *dev) int ret; ret = asix_write_cmd(dev, AX_CMD_SET_HW_MII, 0x0000, 0, 0, NULL); if (ret < 0) - deverr(dev, "Failed to enable hardware MII access"); + devdbg(dev, "Failed to enable hardware MII access"); return ret; } -static inline int asix_get_phy_addr(struct usbnet *dev) +static inline int asix_get_phyid(struct usbnet *dev) { int ret = 0; void *buf; - devdbg(dev, "asix_get_phy_addr()"); - buf = kmalloc(2, GFP_KERNEL); if (!buf) goto out1; if ((ret = asix_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 2) { - deverr(dev, "Error reading PHYID register: %02x", ret); + devdbg(dev, "Error reading PHYID register: %02x", ret); goto out2; } - devdbg(dev, "asix_get_phy_addr() returning 0x%04x", *((u16 *)buf)); ret = *((u8 *)buf + 1); out2: kfree(buf); @@ -429,29 +207,8 @@ static int asix_sw_reset(struct usbnet *dev, u8 flags) ret = asix_write_cmd(dev, AX_CMD_SW_RESET, flags, 0, 0, NULL); if (ret < 0) - deverr(dev,"Failed to send software reset: %02x", ret); - - return ret; -} + devdbg(dev,"Failed to send software reset: %02x", ret); -static u16 asix_read_rx_ctl(struct usbnet *dev) -{ - u16 ret = 0; - void *buf; - - buf = kmalloc(2, GFP_KERNEL); - if (!buf) - goto out1; - - if ((ret = asix_read_cmd(dev, AX_CMD_READ_RX_CTL, - 0, 0, 2, buf)) < 2) { - deverr(dev, "Error reading RX_CTL register: %02x", ret); - goto out2; - } - ret = le16_to_cpu(*((u16 *)buf)); -out2: - kfree(buf); -out1: return ret; } @@ -459,79 +216,82 @@ static int asix_write_rx_ctl(struct usbnet *dev, u16 mode) { int ret; - devdbg(dev,"asix_write_rx_ctl() - mode = 0x%04x", mode); ret = asix_write_cmd(dev, AX_CMD_WRITE_RX_CTL, mode, 0, 0, NULL); if (ret < 0) - deverr(dev, "Failed to write RX_CTL mode to 0x%04x: %02x", - mode, ret); + devdbg(dev, "Failed to write RX_CTL mode: %02x", ret); return ret; } -static u16 asix_read_medium_status(struct usbnet *dev) +static void asix_status(struct usbnet *dev, struct urb *urb) { - u16 ret = 0; - void *buf; + struct ax88172_int_data *event; + int link; - buf = kmalloc(2, GFP_KERNEL); - if (!buf) - goto out1; + if (urb->actual_length < 8) + return; - if ((ret = asix_read_cmd(dev, AX_CMD_READ_MEDIUM_STATUS, - 0, 0, 2, buf)) < 2) { - deverr(dev, "Error reading Medium Status register: %02x", ret); - goto out2; + event = urb->transfer_buffer; + link = event->link & 0x01; + if (netif_carrier_ok(dev->net) != link) { + if (link) { + netif_carrier_on(dev->net); + usbnet_defer_kevent (dev, EVENT_LINK_RESET ); + } else + netif_carrier_off(dev->net); + devdbg(dev, "Link Status is: %d", link); } - ret = le16_to_cpu(*((u16 *)buf)); -out2: - kfree(buf); -out1: - return ret; } -static int asix_write_medium_mode(struct usbnet *dev, u16 mode) +static void +asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index, + u16 size, void *data) { - int ret; - - devdbg(dev,"asix_write_medium_mode() - mode = 0x%04x", mode); - ret = asix_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, mode, 0, 0, NULL); - if (ret < 0) - deverr(dev, "Failed to write Medium Mode mode to 0x%04x: %02x", - mode, ret); + struct usb_ctrlrequest *req; + int status; + struct urb *urb; - return ret; -} + if ((urb = usb_alloc_urb(0, GFP_ATOMIC)) == NULL) { + devdbg(dev, "Error allocating URB in write_cmd_async!"); + return; + } -static int asix_write_gpio(struct usbnet *dev, u16 value, int sleep) -{ - int ret; + if ((req = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC)) == NULL) { + deverr(dev, "Failed to allocate memory for control request"); + usb_free_urb(urb); + return; + } - devdbg(dev,"asix_write_gpio() - value = 0x%04x", value); - ret = asix_write_cmd(dev, AX_CMD_WRITE_GPIOS, value, 0, 0, NULL); - if (ret < 0) - deverr(dev, "Failed to write GPIO value 0x%04x: %02x", - value, ret); + req->bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE; + req->bRequest = cmd; + req->wValue = cpu_to_le16(value); + req->wIndex = cpu_to_le16(index); + req->wLength = cpu_to_le16(size); - if (sleep) - msleep(sleep); + usb_fill_control_urb(urb, dev->udev, + usb_sndctrlpipe(dev->udev, 0), + (void *)req, data, size, + asix_async_cmd_callback, req); - return ret; + if((status = usb_submit_urb(urb, GFP_ATOMIC)) < 0) { + deverr(dev, "Error submitting the control message: status=%d", + status); + kfree(req); + usb_free_urb(urb); + } } -/* - * AX88772 & AX88178 have a 16-bit RX_CTL value - */ static void asix_set_multicast(struct net_device *net) { struct usbnet *dev = netdev_priv(net); struct asix_data *data = (struct asix_data *)&dev->data; - u16 rx_ctl = AX_DEFAULT_RX_CTL; + u8 rx_ctl = 0x8c; if (net->flags & IFF_PROMISC) { - rx_ctl |= AX_RX_CTL_PRO; + rx_ctl |= 0x01; } else if (net->flags & IFF_ALLMULTI || net->mc_count > AX_MAX_MCAST) { - rx_ctl |= AX_RX_CTL_AMALL; + rx_ctl |= 0x02; } else if (net->mc_count == 0) { /* just broadcast and directed */ } else { @@ -558,7 +318,7 @@ static void asix_set_multicast(struct net_device *net) asix_write_cmd_async(dev, AX_CMD_WRITE_MULTI_FILTER, 0, 0, AX_MCAST_FILTER_SIZE, data->multi_filter); - rx_ctl |= AX_RX_CTL_AM; + rx_ctl |= 0x10; } asix_write_cmd_async(dev, AX_CMD_WRITE_RX_CTL, rx_ctl, 0, 0, NULL); @@ -574,43 +334,50 @@ static int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) (__u16)loc, 2, (u16 *)&res); asix_set_hw_mii(dev); - devdbg(dev, "asix_mdio_read() phy_id=0x%02x, loc=0x%02x, returns=0x%04x", phy_id, loc, le16_to_cpu(res & 0xffff)); + return res & 0xffff; +} - return le16_to_cpu(res & 0xffff); +/* same as above, but converts resulting value to cpu byte order */ +static int asix_mdio_read_le(struct net_device *netdev, int phy_id, int loc) +{ + return le16_to_cpu(asix_mdio_read(netdev,phy_id, loc)); } static void asix_mdio_write(struct net_device *netdev, int phy_id, int loc, int val) { struct usbnet *dev = netdev_priv(netdev); - u16 res = cpu_to_le16(val); + u16 res = val; - devdbg(dev, "asix_mdio_write() phy_id=0x%02x, loc=0x%02x, val=0x%04x", phy_id, loc, val); asix_set_sw_mii(dev); asix_write_cmd(dev, AX_CMD_WRITE_MII_REG, phy_id, (__u16)loc, 2, (u16 *)&res); asix_set_hw_mii(dev); } -/* Get the PHY Identifier from the PHYSID1 & PHYSID2 MII registers */ -static u32 asix_get_phyid(struct usbnet *dev) +/* same as above, but converts new value to le16 byte order before writing */ +static void +asix_mdio_write_le(struct net_device *netdev, int phy_id, int loc, int val) { - int phy_reg; - u32 phy_id; - - phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); - if (phy_reg < 0) - return 0; - - phy_id = (phy_reg & 0xffff) << 16; + asix_mdio_write( netdev, phy_id, loc, cpu_to_le16(val) ); +} - phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); - if (phy_reg < 0) - return 0; +static int ax88172_link_reset(struct usbnet *dev) +{ + u16 lpa; + u16 adv; + u16 res; + u8 mode; - phy_id |= (phy_reg & 0xffff); + mode = AX_MEDIUM_TX_ABORT_ALLOW | AX_MEDIUM_FLOW_CONTROL_EN; + lpa = asix_mdio_read_le(dev->net, dev->mii.phy_id, MII_LPA); + adv = asix_mdio_read_le(dev->net, dev->mii.phy_id, MII_ADVERTISE); + res = mii_nway_result(lpa|adv); + if (res & LPA_DUPLEX) + mode |= AX_MEDIUM_FULL_DUPLEX; + asix_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, mode, 0, 0, NULL); - return phy_id; + return 0; } static void @@ -657,10 +424,7 @@ asix_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo) static int asix_get_eeprom_len(struct net_device *net) { - struct usbnet *dev = netdev_priv(net); - struct asix_data *data = (struct asix_data *)&dev->data; - - return data->eeprom_len; + return AX_EEPROM_LEN; } static int asix_get_eeprom(struct net_device *net, @@ -690,14 +454,9 @@ static int asix_get_eeprom(struct net_device *net, static void asix_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) { - struct usbnet *dev = netdev_priv(net); - struct asix_data *data = (struct asix_data *)&dev->data; - /* Inherit standard device info */ usbnet_get_drvinfo(net, info); - strncpy (info->driver, driver_name, sizeof info->driver); - strncpy (info->version, DRIVER_VERSION, sizeof info->version); - info->eedump_len = data->eeprom_len; + info->eedump_len = 0x3e; } static int asix_get_settings(struct net_device *net, struct ethtool_cmd *cmd) @@ -708,36 +467,10 @@ static int asix_get_settings(struct net_device *net, struct ethtool_cmd *cmd) } static int asix_set_settings(struct net_device *net, struct ethtool_cmd *cmd) -{ - struct usbnet *dev = netdev_priv(net); - int res = mii_ethtool_sset(&dev->mii,cmd); - - /* link speed/duplex might have changed */ - if (dev->driver_info->link_reset) - dev->driver_info->link_reset(dev); - - return res; -} - -static int asix_nway_reset(struct net_device *net) { struct usbnet *dev = netdev_priv(net); - return mii_nway_restart(&dev->mii); -} - -static u32 asix_get_link(struct net_device *net) -{ - struct usbnet *dev = netdev_priv(net); - - return mii_link_ok(&dev->mii); -} - -static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) -{ - struct usbnet *dev = netdev_priv(net); - - return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); + return mii_ethtool_sset(&dev->mii,cmd); } /* We need to override some ethtool_ops so we require our @@ -745,8 +478,7 @@ static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) devices that may be connected at the same time. */ static struct ethtool_ops ax88172_ethtool_ops = { .get_drvinfo = asix_get_drvinfo, - .get_link = asix_get_link, - .nway_reset = asix_nway_reset, + .get_link = ethtool_op_get_link, .get_msglevel = usbnet_get_msglevel, .set_msglevel = usbnet_set_msglevel, .get_wol = asix_get_wol, @@ -757,66 +489,11 @@ static struct ethtool_ops ax88172_ethtool_ops = { .set_settings = asix_set_settings, }; -static void ax88172_set_multicast(struct net_device *net) +static int asix_ioctl (struct net_device *net, struct ifreq *rq, int cmd) { struct usbnet *dev = netdev_priv(net); - struct asix_data *data = (struct asix_data *)&dev->data; - u8 rx_ctl = 0x8c; - if (net->flags & IFF_PROMISC) { - rx_ctl |= 0x01; - } else if (net->flags & IFF_ALLMULTI - || net->mc_count > AX_MAX_MCAST) { - rx_ctl |= 0x02; - } else if (net->mc_count == 0) { - /* just broadcast and directed */ - } else { - /* We use the 20 byte dev->data - * for our 8 byte filter buffer - * to avoid allocating memory that - * is tricky to free later */ - struct dev_mc_list *mc_list = net->mc_list; - u32 crc_bits; - int i; - - memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); - - /* Build the multicast hash filter. */ - for (i = 0; i < net->mc_count; i++) { - crc_bits = - ether_crc(ETH_ALEN, - mc_list->dmi_addr) >> 26; - data->multi_filter[crc_bits >> 3] |= - 1 << (crc_bits & 7); - mc_list = mc_list->next; - } - - asix_write_cmd_async(dev, AX_CMD_WRITE_MULTI_FILTER, 0, 0, - AX_MCAST_FILTER_SIZE, data->multi_filter); - - rx_ctl |= 0x10; - } - - asix_write_cmd_async(dev, AX_CMD_WRITE_RX_CTL, rx_ctl, 0, 0, NULL); -} - -static int ax88172_link_reset(struct usbnet *dev) -{ - u8 mode; - struct ethtool_cmd ecmd; - - mii_check_media(&dev->mii, 1, 1); - mii_ethtool_gset(&dev->mii, &ecmd); - mode = AX88172_MEDIUM_DEFAULT; - - if (ecmd.duplex != DUPLEX_FULL) - mode |= ~AX88172_MEDIUM_FD; - - devdbg(dev, "ax88172_link_reset() speed: %d duplex: %d setting mode to 0x%04x", ecmd.speed, ecmd.duplex, mode); - - asix_write_medium_mode(dev, mode); - - return 0; + return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); } static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf) @@ -825,9 +502,6 @@ static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf) void *buf; int i; unsigned long gpio_bits = dev->driver_info->data; - struct asix_data *data = (struct asix_data *)&dev->data; - - data->eeprom_len = AX88172_EEPROM_LEN; usbnet_get_endpoints(dev,intf); @@ -846,12 +520,12 @@ static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf) msleep(5); } - if ((ret = asix_write_rx_ctl(dev, 0x80)) < 0) + if ((ret = asix_write_rx_ctl(dev,0x80)) < 0) goto out2; /* Get the MAC address */ memset(buf, 0, ETH_ALEN); - if ((ret = asix_read_cmd(dev, AX88172_CMD_READ_NODE_ID, + if ((ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, 0, 0, 6, buf)) < 0) { dbg("read AX_CMD_READ_NODE_ID failed: %d", ret); goto out2; @@ -864,14 +538,14 @@ static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf) dev->mii.mdio_write = asix_mdio_write; dev->mii.phy_id_mask = 0x3f; dev->mii.reg_num_mask = 0x1f; - dev->mii.phy_id = asix_get_phy_addr(dev); + dev->mii.phy_id = asix_get_phyid(dev); dev->net->do_ioctl = asix_ioctl; - dev->net->set_multicast_list = ax88172_set_multicast; + dev->net->set_multicast_list = asix_set_multicast; dev->net->ethtool_ops = &ax88172_ethtool_ops; - asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); - asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, + asix_mdio_write_le(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); + asix_mdio_write_le(dev->net, dev->mii.phy_id, MII_ADVERTISE, ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP); mii_nway_restart(&dev->mii); @@ -884,8 +558,7 @@ out1: static struct ethtool_ops ax88772_ethtool_ops = { .get_drvinfo = asix_get_drvinfo, - .get_link = asix_get_link, - .nway_reset = asix_nway_reset, + .get_link = ethtool_op_get_link, .get_msglevel = usbnet_get_msglevel, .set_msglevel = usbnet_set_msglevel, .get_wol = asix_get_wol, @@ -896,37 +569,10 @@ static struct ethtool_ops ax88772_ethtool_ops = { .set_settings = asix_set_settings, }; -static int ax88772_link_reset(struct usbnet *dev) -{ - u16 mode; - struct ethtool_cmd ecmd; - - mii_check_media(&dev->mii, 1, 1); - mii_ethtool_gset(&dev->mii, &ecmd); - mode = AX88772_MEDIUM_DEFAULT; - - if (ecmd.speed != SPEED_100) - mode &= ~AX_MEDIUM_PS; - - if (ecmd.duplex != DUPLEX_FULL) - mode &= ~AX_MEDIUM_FD; - - devdbg(dev, "ax88772_link_reset() speed: %d duplex: %d setting mode to 0x%04x", ecmd.speed, ecmd.duplex, mode); - - asix_write_medium_mode(dev, mode); - - return 0; -} - static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) { int ret; void *buf; - u16 rx_ctl; - struct asix_data *data = (struct asix_data *)&dev->data; - u32 phyid; - - data->eeprom_len = AX88772_EEPROM_LEN; usbnet_get_endpoints(dev,intf); @@ -937,12 +583,13 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) goto out1; } - if ((ret = asix_write_gpio(dev, - AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5)) < 0) + if ((ret = asix_write_cmd(dev, AX_CMD_WRITE_GPIOS, + 0x00B0, 0, 0, buf)) < 0) goto out2; + msleep(5); if ((ret = asix_write_cmd(dev, AX_CMD_SW_PHY_SELECT, - 0x0000, 0, 0, buf)) < 0) { + 0x0001, 0, 0, buf)) < 0) { dbg("Select PHY #1 failed: %d", ret); goto out2; } @@ -959,34 +606,36 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) goto out2; msleep(150); - rx_ctl = asix_read_rx_ctl(dev); - dbg("RX_CTL is 0x%04x after software reset", rx_ctl); - if ((ret = asix_write_rx_ctl(dev, 0x0000)) < 0) + if ((ret = asix_write_rx_ctl(dev, 0x00)) < 0) goto out2; - rx_ctl = asix_read_rx_ctl(dev); - dbg("RX_CTL is 0x%04x setting to 0x0000", rx_ctl); - /* Get the MAC address */ memset(buf, 0, ETH_ALEN); - if ((ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, + if ((ret = asix_read_cmd(dev, AX88772_CMD_READ_NODE_ID, 0, 0, ETH_ALEN, buf)) < 0) { dbg("Failed to read MAC address: %d", ret); goto out2; } memcpy(dev->net->dev_addr, buf, ETH_ALEN); + if ((ret = asix_set_sw_mii(dev)) < 0) + goto out2; + + if (((ret = asix_read_cmd(dev, AX_CMD_READ_MII_REG, + 0x0010, 2, 2, buf)) < 0) + || (*((u16 *)buf) != 0x003b)) { + dbg("Read PHY register 2 must be 0x3b00: %d", ret); + goto out2; + } + /* Initialize MII structure */ dev->mii.dev = dev->net; dev->mii.mdio_read = asix_mdio_read; dev->mii.mdio_write = asix_mdio_write; - dev->mii.phy_id_mask = 0x1f; - dev->mii.reg_num_mask = 0x1f; + dev->mii.phy_id_mask = 0xff; + dev->mii.reg_num_mask = 0xff; dev->net->do_ioctl = asix_ioctl; - dev->mii.phy_id = asix_get_phy_addr(dev); - - phyid = asix_get_phyid(dev); - dbg("PHYID=0x%08x", phyid); + dev->mii.phy_id = asix_get_phyid(dev); if ((ret = asix_sw_reset(dev, AX_SWRESET_PRL)) < 0) goto out2; @@ -1001,13 +650,16 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->set_multicast_list = asix_set_multicast; dev->net->ethtool_ops = &ax88772_ethtool_ops; - asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); - asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, + asix_mdio_write_le(dev->net, dev->mii.phy_id, MII_BMCR, BMCR_RESET); + asix_mdio_write_le(dev->net, dev->mii.phy_id, MII_ADVERTISE, ADVERTISE_ALL | ADVERTISE_CSMA); mii_nway_restart(&dev->mii); - if ((ret = asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT)) < 0) + if ((ret = asix_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, + AX88772_MEDIUM_DEFAULT, 0, 0, buf)) < 0) { + dbg("Write medium mode register: %d", ret); goto out2; + } if ((ret = asix_write_cmd(dev, AX_CMD_WRITE_IPG0, AX88772_IPG0_DEFAULT | AX88772_IPG1_DEFAULT, @@ -1015,17 +667,13 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) dbg("Write IPG,IPG1,IPG2 failed: %d", ret); goto out2; } + if ((ret = asix_set_hw_mii(dev)) < 0) + goto out2; /* Set RX_CTL to default values with 2k buffer, and enable cactus */ - if ((ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL)) < 0) + if ((ret = asix_write_rx_ctl(dev, 0x0088)) < 0) goto out2; - rx_ctl = asix_read_rx_ctl(dev); - dbg("RX_CTL is 0x%04x after all initializations", rx_ctl); - - rx_ctl = asix_read_medium_status(dev); - dbg("Medium Status is 0x%04x after all initializations", rx_ctl); - kfree(buf); /* Asix framing packs multiple eth frames into a 2K usb bulk transfer */ @@ -1043,285 +691,120 @@ out1: return ret; } -static struct ethtool_ops ax88178_ethtool_ops = { - .get_drvinfo = asix_get_drvinfo, - .get_link = asix_get_link, - .nway_reset = asix_nway_reset, - .get_msglevel = usbnet_get_msglevel, - .set_msglevel = usbnet_set_msglevel, - .get_wol = asix_get_wol, - .set_wol = asix_set_wol, - .get_eeprom_len = asix_get_eeprom_len, - .get_eeprom = asix_get_eeprom, - .get_settings = asix_get_settings, - .set_settings = asix_set_settings, -}; - -static int marvell_phy_init(struct usbnet *dev) +static int ax88772_rx_fixup(struct usbnet *dev, struct sk_buff *skb) { - struct asix_data *data = (struct asix_data *)&dev->data; - u16 reg; - - devdbg(dev,"marvell_phy_init()"); - - reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_MARVELL_STATUS); - devdbg(dev,"MII_MARVELL_STATUS = 0x%04x", reg); - - asix_mdio_write(dev->net, dev->mii.phy_id, MII_MARVELL_CTRL, - MARVELL_CTRL_RXDELAY | MARVELL_CTRL_TXDELAY); - - if (data->ledmode) { - reg = asix_mdio_read(dev->net, dev->mii.phy_id, - MII_MARVELL_LED_CTRL); - devdbg(dev,"MII_MARVELL_LED_CTRL (1) = 0x%04x", reg); - - reg &= 0xf8ff; - reg |= (1 + 0x0100); - asix_mdio_write(dev->net, dev->mii.phy_id, - MII_MARVELL_LED_CTRL, reg); + u8 *head; + u32 header; + char *packet; + struct sk_buff *ax_skb; + u16 size; - reg = asix_mdio_read(dev->net, dev->mii.phy_id, - MII_MARVELL_LED_CTRL); - devdbg(dev,"MII_MARVELL_LED_CTRL (2) = 0x%04x", reg); - reg &= 0xfc0f; - } + head = (u8 *) skb->data; + memcpy(&header, head, sizeof(header)); + le32_to_cpus(&header); + packet = head + sizeof(header); - return 0; -} + skb_pull(skb, 4); -static int marvell_led_status(struct usbnet *dev, u16 speed) -{ - u16 reg = asix_mdio_read(dev->net, dev->mii.phy_id, MARVELL_LED_MANUAL); + while (skb->len > 0) { + if ((short)(header & 0x0000ffff) != + ~((short)((header & 0xffff0000) >> 16))) { + devdbg(dev,"header length data is error"); + } + /* get the packet length */ + size = (u16) (header & 0x0000ffff); - devdbg(dev, "marvell_led_status() read 0x%04x", reg); + if ((skb->len) - ((size + 1) & 0xfffe) == 0) + return 2; + if (size > ETH_FRAME_LEN) { + devdbg(dev,"invalid rx length %d", size); + return 0; + } + ax_skb = skb_clone(skb, GFP_ATOMIC); + if (ax_skb) { + ax_skb->len = size; + ax_skb->data = packet; + ax_skb->tail = packet + size; + usbnet_skb_return(dev, ax_skb); + } else { + return 0; + } - /* Clear out the center LED bits - 0x03F0 */ - reg &= 0xfc0f; + skb_pull(skb, (size + 1) & 0xfffe); - switch (speed) { - case SPEED_1000: - reg |= 0x03e0; - break; - case SPEED_100: - reg |= 0x03b0; + if (skb->len == 0) break; - default: - reg |= 0x02f0; - } - - devdbg(dev, "marvell_led_status() writing 0x%04x", reg); - asix_mdio_write(dev->net, dev->mii.phy_id, MARVELL_LED_MANUAL, reg); - - return 0; -} -static int ax88178_link_reset(struct usbnet *dev) -{ - u16 mode; - struct ethtool_cmd ecmd; - struct asix_data *data = (struct asix_data *)&dev->data; - - devdbg(dev,"ax88178_link_reset()"); - - mii_check_media(&dev->mii, 1, 1); - mii_ethtool_gset(&dev->mii, &ecmd); - mode = AX88178_MEDIUM_DEFAULT; - - if (ecmd.speed == SPEED_1000) - mode |= AX_MEDIUM_GM | AX_MEDIUM_ENCK; - else if (ecmd.speed == SPEED_100) - mode |= AX_MEDIUM_PS; - else - mode &= ~(AX_MEDIUM_PS | AX_MEDIUM_GM); - - if (ecmd.duplex == DUPLEX_FULL) - mode |= AX_MEDIUM_FD; - else - mode &= ~AX_MEDIUM_FD; - - devdbg(dev, "ax88178_link_reset() speed: %d duplex: %d setting mode to 0x%04x", ecmd.speed, ecmd.duplex, mode); - - asix_write_medium_mode(dev, mode); - - if (data->phymode == PHY_MODE_MARVELL && data->ledmode) - marvell_led_status(dev, ecmd.speed); - - return 0; -} - -static void ax88178_set_mfb(struct usbnet *dev) -{ - u16 mfb = AX_RX_CTL_MFB_16384; - u16 rxctl; - u16 medium; - int old_rx_urb_size = dev->rx_urb_size; - - if (dev->hard_mtu < 2048) { - dev->rx_urb_size = 2048; - mfb = AX_RX_CTL_MFB_2048; - } else if (dev->hard_mtu < 4096) { - dev->rx_urb_size = 4096; - mfb = AX_RX_CTL_MFB_4096; - } else if (dev->hard_mtu < 8192) { - dev->rx_urb_size = 8192; - mfb = AX_RX_CTL_MFB_8192; - } else if (dev->hard_mtu < 16384) { - dev->rx_urb_size = 16384; - mfb = AX_RX_CTL_MFB_16384; + head = (u8 *) skb->data; + memcpy(&header, head, sizeof(header)); + le32_to_cpus(&header); + packet = head + sizeof(header); + skb_pull(skb, 4); } - rxctl = asix_read_rx_ctl(dev); - asix_write_rx_ctl(dev, (rxctl & ~AX_RX_CTL_MFB_16384) | mfb); - - medium = asix_read_medium_status(dev); - if (dev->net->mtu > 1500) - medium |= AX_MEDIUM_JFE; - else - medium &= ~AX_MEDIUM_JFE; - asix_write_medium_mode(dev, medium); - - if (dev->rx_urb_size > old_rx_urb_size) - usbnet_unlink_rx_urbs(dev); -} - -static int ax88178_change_mtu(struct net_device *net, int new_mtu) -{ - struct usbnet *dev = netdev_priv(net); - int ll_mtu = new_mtu + net->hard_header_len + 4; - - devdbg(dev, "ax88178_change_mtu() new_mtu=%d", new_mtu); - - if (new_mtu <= 0 || ll_mtu > 16384) - return -EINVAL; - - if ((ll_mtu % dev->maxpacket) == 0) - return -EDOM; - - net->mtu = new_mtu; - dev->hard_mtu = net->mtu + net->hard_header_len; - ax88178_set_mfb(dev); - - return 0; + if (skb->len < 0) { + devdbg(dev,"invalid rx length %d", skb->len); + return 0; + } + return 1; } -static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf) +static struct sk_buff *ax88772_tx_fixup(struct usbnet *dev, struct sk_buff *skb, + gfp_t flags) { - struct asix_data *data = (struct asix_data *)&dev->data; - int ret; - void *buf; - u16 eeprom; - int gpio0 = 0; - u32 phyid; - - usbnet_get_endpoints(dev,intf); - - buf = kmalloc(6, GFP_KERNEL); - if(!buf) { - dbg ("Cannot allocate memory for buffer"); - ret = -ENOMEM; - goto out1; - } - - eeprom = 0; - asix_read_cmd(dev, AX_CMD_READ_GPIOS, 0, 0, 1, &eeprom); - dbg("GPIO Status: 0x%04x", eeprom); - - asix_write_cmd(dev, AX_CMD_WRITE_ENABLE, 0, 0, 0, NULL); - asix_read_cmd(dev, AX_CMD_READ_EEPROM, 0x0017, 0, 2, &eeprom); - asix_write_cmd(dev, AX_CMD_WRITE_DISABLE, 0, 0, 0, NULL); - - dbg("EEPROM index 0x17 is 0x%04x", eeprom); + int padlen; + int headroom = skb_headroom(skb); + int tailroom = skb_tailroom(skb); + u32 packet_len; + u32 padbytes = 0xffff0000; - if (eeprom == 0xffff) { - data->phymode = PHY_MODE_MARVELL; - data->ledmode = 0; - gpio0 = 1; - } else { - data->phymode = eeprom & 7; - data->ledmode = eeprom >> 8; - gpio0 = (eeprom & 0x80) ? 0 : 1; - } - dbg("GPIO0: %d, PhyMode: %d", gpio0, data->phymode); + padlen = ((skb->len + 4) % 512) ? 0 : 4; - asix_write_gpio(dev, AX_GPIO_RSE | AX_GPIO_GPO_1 | AX_GPIO_GPO1EN, 40); - if ((eeprom >> 8) != 1) { - asix_write_gpio(dev, 0x003c, 30); - asix_write_gpio(dev, 0x001c, 300); - asix_write_gpio(dev, 0x003c, 30); + if ((!skb_cloned(skb)) + && ((headroom + tailroom) >= (4 + padlen))) { + if ((headroom < 4) || (tailroom < padlen)) { + skb->data = memmove(skb->head + 4, skb->data, skb->len); + skb->tail = skb->data + skb->len; + } } else { - dbg("gpio phymode == 1 path"); - asix_write_gpio(dev, AX_GPIO_GPO1EN, 30); - asix_write_gpio(dev, AX_GPIO_GPO1EN | AX_GPIO_GPO_1, 30); - } - - asix_sw_reset(dev, 0); - msleep(150); - - asix_sw_reset(dev, AX_SWRESET_PRL | AX_SWRESET_IPPD); - msleep(150); - - asix_write_rx_ctl(dev, 0); - - /* Get the MAC address */ - memset(buf, 0, ETH_ALEN); - if ((ret = asix_read_cmd(dev, AX_CMD_READ_NODE_ID, - 0, 0, ETH_ALEN, buf)) < 0) { - dbg("Failed to read MAC address: %d", ret); - goto out2; + struct sk_buff *skb2; + skb2 = skb_copy_expand(skb, 4, padlen, flags); + dev_kfree_skb_any(skb); + skb = skb2; + if (!skb) + return NULL; } - memcpy(dev->net->dev_addr, buf, ETH_ALEN); - - /* Initialize MII structure */ - dev->mii.dev = dev->net; - dev->mii.mdio_read = asix_mdio_read; - dev->mii.mdio_write = asix_mdio_write; - dev->mii.phy_id_mask = 0x1f; - dev->mii.reg_num_mask = 0xff; - dev->mii.supports_gmii = 1; - dev->net->do_ioctl = asix_ioctl; - dev->mii.phy_id = asix_get_phy_addr(dev); - dev->net->set_multicast_list = asix_set_multicast; - dev->net->ethtool_ops = &ax88178_ethtool_ops; - dev->net->change_mtu = &ax88178_change_mtu; - phyid = asix_get_phyid(dev); - dbg("PHYID=0x%08x", phyid); + skb_push(skb, 4); + packet_len = (((skb->len - 4) ^ 0x0000ffff) << 16) + (skb->len - 4); + memcpy(skb->data, &packet_len, sizeof(packet_len)); - if (data->phymode == PHY_MODE_MARVELL) { - marvell_phy_init(dev); - msleep(60); + if ((skb->len % 512) == 0) { + memcpy( skb->tail, &padbytes, sizeof(padbytes)); + skb_put(skb, sizeof(padbytes)); } + return skb; +} - asix_mdio_write(dev->net, dev->mii.phy_id, MII_BMCR, - BMCR_RESET | BMCR_ANENABLE); - asix_mdio_write(dev->net, dev->mii.phy_id, MII_ADVERTISE, - ADVERTISE_ALL | ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP); - asix_mdio_write(dev->net, dev->mii.phy_id, MII_CTRL1000, - ADVERTISE_1000FULL); - - mii_nway_restart(&dev->mii); - - if ((ret = asix_write_medium_mode(dev, AX88178_MEDIUM_DEFAULT)) < 0) - goto out2; - - if ((ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL)) < 0) - goto out2; +static int ax88772_link_reset(struct usbnet *dev) +{ + u16 lpa; + u16 adv; + u16 res; + u16 mode; - kfree(buf); + mode = AX88772_MEDIUM_DEFAULT; + lpa = asix_mdio_read_le(dev->net, dev->mii.phy_id, MII_LPA); + adv = asix_mdio_read_le(dev->net, dev->mii.phy_id, MII_ADVERTISE); + res = mii_nway_result(lpa|adv); - /* Asix framing packs multiple eth frames into a 2K usb bulk transfer */ - if (dev->driver_info->flags & FLAG_FRAMING_AX) { - /* hard_mtu is still the default - the device does not support - jumbo eth frames */ - dev->rx_urb_size = 2048; - } + if ((res & LPA_DUPLEX) == 0) + mode &= ~AX88772_MEDIUM_FULL_DUPLEX; + if ((res & LPA_100) == 0) + mode &= ~AX88772_MEDIUM_100MB; + asix_write_cmd(dev, AX_CMD_WRITE_MEDIUM_MODE, mode, 0, 0, NULL); return 0; - -out2: - kfree(buf); -out1: - return ret; } static const struct driver_info ax8817x_info = { @@ -1371,19 +854,8 @@ static const struct driver_info ax88772_info = { .link_reset = ax88772_link_reset, .reset = ax88772_link_reset, .flags = FLAG_ETHER | FLAG_FRAMING_AX, - .rx_fixup = asix_rx_fixup, - .tx_fixup = asix_tx_fixup, -}; - -static const struct driver_info ax88178_info = { - .description = "ASIX AX88178 USB 2.0 Ethernet", - .bind = ax88178_bind, - .status = asix_status, - .link_reset = ax88178_link_reset, - .reset = ax88178_link_reset, - .flags = FLAG_ETHER | FLAG_FRAMING_AX, - .rx_fixup = asix_rx_fixup, - .tx_fixup = asix_tx_fixup, + .rx_fixup = ax88772_rx_fixup, + .tx_fixup = ax88772_tx_fixup, }; static const struct usb_device_id products [] = { @@ -1439,10 +911,6 @@ static const struct usb_device_id products [] = { // ASIX AX88772 10/100 USB_DEVICE (0x0b95, 0x7720), .driver_info = (unsigned long) &ax88772_info, -}, { - // ASIX AX88178 10/100/1000 - USB_DEVICE (0x0b95, 0x1780), - .driver_info = (unsigned long) &ax88178_info, }, { // Linksys USB200M Rev 2 USB_DEVICE (0x13b1, 0x0018), @@ -1451,18 +919,6 @@ static const struct usb_device_id products [] = { // 0Q0 cable ethernet USB_DEVICE (0x1557, 0x7720), .driver_info = (unsigned long) &ax88772_info, -}, { - // DLink DUB-E100 H/W Ver B1 - USB_DEVICE (0x07d1, 0x3c05), - .driver_info = (unsigned long) &ax88772_info, -}, { - // DLink DUB-E100 H/W Ver B1, bonus - USB_DEVICE (0x2001, 0x3c05), - .driver_info = (unsigned long) &ax88772_info, -}, { - // Linksys USB1000 - USB_DEVICE (0x1737, 0x0039), - .driver_info = (unsigned long) &ax88178_info, }, { }, // END }; diff --git a/drivers/usb/net/cdc_ether.c b/drivers/usb/net/cdc_ether.c index 82ce0358d..63f1f3ba8 100644 --- a/drivers/usb/net/cdc_ether.c +++ b/drivers/usb/net/cdc_ether.c @@ -20,6 +20,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include @@ -30,7 +31,7 @@ #include #include #include -#include +#include #include "usbnet.h" @@ -454,18 +455,6 @@ static const struct usb_device_id products [] = { .driver_info = 0, }, -/* Olympus has some models with a Zaurus-compatible option. - * R-1000 uses a FreeScale i.MXL cpu (ARMv4T) - */ -{ - .match_flags = USB_DEVICE_ID_MATCH_INT_INFO - | USB_DEVICE_ID_MATCH_DEVICE, - .idVendor = 0x07B4, - .idProduct = 0x0F02, /* R-1000 */ - ZAURUS_MASTER_INTERFACE, - .driver_info = 0, -}, - /* * WHITELIST!!! * diff --git a/drivers/usb/net/cdc_subset.c b/drivers/usb/net/cdc_subset.c index e2fae8585..ec801e8bb 100644 --- a/drivers/usb/net/cdc_subset.c +++ b/drivers/usb/net/cdc_subset.c @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c index 3155f25f1..faf1e86be 100644 --- a/drivers/usb/net/gl620a.c +++ b/drivers/usb/net/gl620a.c @@ -21,6 +21,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include diff --git a/drivers/usb/net/net1080.c b/drivers/usb/net/net1080.c index a9b6eeac3..78e6a43b1 100644 --- a/drivers/usb/net/net1080.c +++ b/drivers/usb/net/net1080.c @@ -20,6 +20,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index ab21f960d..7683926a1 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -163,8 +163,6 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, /* using ATOMIC, we'd never wake up if we slept */ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - if (ret == -ENODEV) - netif_device_detach(pegasus->net); if (netif_msg_drv(pegasus)) dev_err(&pegasus->intf->dev, "%s, status %d\n", __FUNCTION__, ret); @@ -219,8 +217,6 @@ static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size, set_current_state(TASK_UNINTERRUPTIBLE); if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - if (ret == -ENODEV) - netif_device_detach(pegasus->net); if (netif_msg_drv(pegasus)) dev_err(&pegasus->intf->dev, "%s, status %d\n", __FUNCTION__, ret); @@ -272,8 +268,6 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) set_current_state(TASK_UNINTERRUPTIBLE); if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - if (ret == -ENODEV) - netif_device_detach(pegasus->net); if (netif_msg_drv(pegasus)) dev_err(&pegasus->intf->dev, "%s, status %d\n", __FUNCTION__, ret); @@ -304,13 +298,10 @@ static int update_eth_regs_async(pegasus_t * pegasus) (char *) &pegasus->dr, pegasus->eth_regs, 3, ctrl_callback, pegasus); - if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { - if (ret == -ENODEV) - netif_device_detach(pegasus->net); + if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) if (netif_msg_drv(pegasus)) dev_err(&pegasus->intf->dev, "%s, status %d\n", __FUNCTION__, ret); - } return ret; } @@ -701,10 +692,7 @@ goon: usb_rcvbulkpipe(pegasus->usb, 1), pegasus->rx_skb->data, PEGASUS_MTU + 8, read_bulk_callback, pegasus); - rx_status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC); - if (rx_status == -ENODEV) - netif_device_detach(pegasus->net); - else if (rx_status) { + if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) { pegasus->flags |= PEGASUS_RX_URB_FAIL; goto tl_sched; } else { @@ -721,7 +709,6 @@ static void rx_fixup(unsigned long data) { pegasus_t *pegasus; unsigned long flags; - int status; pegasus = (pegasus_t *) data; if (pegasus->flags & PEGASUS_UNPLUG) @@ -747,10 +734,7 @@ static void rx_fixup(unsigned long data) pegasus->rx_skb->data, PEGASUS_MTU + 8, read_bulk_callback, pegasus); try_again: - status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC); - if (status == -ENODEV) - netif_device_detach(pegasus->net); - else if (status) { + if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) { pegasus->flags |= PEGASUS_RX_URB_FAIL; tasklet_schedule(&pegasus->rx_tl); } else { @@ -852,8 +836,6 @@ static void intr_callback(struct urb *urb, struct pt_regs *regs) } status = usb_submit_urb(urb, SLAB_ATOMIC); - if (status == -ENODEV) - netif_device_detach(pegasus->net); if (status && netif_msg_timer(pegasus)) printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n", net->name, status); @@ -892,7 +874,6 @@ static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net) /* cleanup should already have been scheduled */ break; case -ENODEV: /* disconnect() upcoming */ - netif_device_detach(pegasus->net); break; default: pegasus->stats.tx_errors++; @@ -1018,8 +999,6 @@ static int pegasus_open(struct net_device *net) pegasus->rx_skb->data, PEGASUS_MTU + 8, read_bulk_callback, pegasus); if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { - if (res == -ENODEV) - netif_device_detach(pegasus->net); if (netif_msg_ifup(pegasus)) pr_debug("%s: failed rx_urb, %d", net->name, res); goto exit; @@ -1030,8 +1009,6 @@ static int pegasus_open(struct net_device *net) pegasus->intr_buff, sizeof (pegasus->intr_buff), intr_callback, pegasus, pegasus->intr_interval); if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { - if (res == -ENODEV) - netif_device_detach(pegasus->net); if (netif_msg_ifup(pegasus)) pr_debug("%s: failed intr_urb, %d\n", net->name, res); usb_kill_urb(pegasus->rx_urb); diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h index 006438069..a54752ce1 100644 --- a/drivers/usb/net/pegasus.h +++ b/drivers/usb/net/pegasus.h @@ -131,7 +131,6 @@ struct usb_eth_dev { #define VENDOR_COREGA 0x07aa #define VENDOR_DLINK 0x2001 #define VENDOR_ELCON 0x0db7 -#define VENDOR_ELECOM 0x056e #define VENDOR_ELSA 0x05cc #define VENDOR_GIGABYTE 0x1044 #define VENDOR_HAWKING 0x0e66 @@ -234,8 +233,6 @@ PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002, DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA ) -PEGASUS_DEV( "ELECOM USB Ethernet LD-USB20", VENDOR_ELECOM, 0x4010, - DEFAULT_GPIO_RESET | PEGASUS_II ) PEGASUS_DEV( "EasiDock Ethernet", VENDOR_MOBILITY, 0x0304, DEFAULT_GPIO_RESET ) PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000, diff --git a/drivers/usb/net/plusb.c b/drivers/usb/net/plusb.c index 5d17cdfc7..4fe863389 100644 --- a/drivers/usb/net/plusb.c +++ b/drivers/usb/net/plusb.c @@ -20,6 +20,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c index c2a28d88e..94ddfe16f 100644 --- a/drivers/usb/net/rndis_host.c +++ b/drivers/usb/net/rndis_host.c @@ -20,6 +20,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include @@ -29,7 +30,7 @@ #include #include #include -#include +#include #include "usbnet.h" diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c index a72685b96..1bbbae283 100644 --- a/drivers/usb/net/rtl8150.c +++ b/drivers/usb/net/rtl8150.c @@ -6,6 +6,7 @@ * version 2 as published by the Free Software Foundation. */ +#include #include #include #include @@ -128,13 +129,11 @@ #define VENDOR_ID_MELCO 0x0411 #define VENDOR_ID_MICRONET 0x3980 #define VENDOR_ID_LONGSHINE 0x07b8 -#define VENDOR_ID_ZYXEL 0x0586 #define PRODUCT_ID_RTL8150 0x8150 #define PRODUCT_ID_LUAKTX 0x0012 #define PRODUCT_ID_LCS8138TX 0x401a #define PRODUCT_ID_SP128AR 0x0003 -#define PRODUCT_ID_PRESTIGE 0x401a #undef EEPROM_WRITE @@ -144,7 +143,6 @@ static struct usb_device_id rtl8150_table[] = { {USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)}, {USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)}, {USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)}, - {USB_DEVICE(VENDOR_ID_ZYXEL, PRODUCT_ID_PRESTIGE)}, {} }; @@ -175,8 +173,6 @@ static inline struct sk_buff *pull_skb(rtl8150_t *); static void rtl8150_disconnect(struct usb_interface *intf); static int rtl8150_probe(struct usb_interface *intf, const struct usb_device_id *id); -static int rtl8150_suspend(struct usb_interface *intf, pm_message_t message); -static int rtl8150_resume(struct usb_interface *intf); static const char driver_name [] = "rtl8150"; @@ -185,8 +181,6 @@ static struct usb_driver rtl8150_driver = { .probe = rtl8150_probe, .disconnect = rtl8150_disconnect, .id_table = rtl8150_table, - .suspend = rtl8150_suspend, - .resume = rtl8150_resume }; /* @@ -242,11 +236,9 @@ static int async_set_registers(rtl8150_t * dev, u16 indx, u16 size) usb_fill_control_urb(dev->ctrl_urb, dev->udev, usb_sndctrlpipe(dev->udev, 0), (char *) &dev->dr, &dev->rx_creg, size, ctrl_callback, dev); - if ((ret = usb_submit_urb(dev->ctrl_urb, GFP_ATOMIC))) { - if (ret == -ENODEV) - netif_device_detach(dev->netdev); + if ((ret = usb_submit_urb(dev->ctrl_urb, GFP_ATOMIC))) err("control request submission failed: %d", ret); - } else + else set_bit(RX_REG_SET, &dev->flags); return ret; @@ -422,7 +414,6 @@ static void read_bulk_callback(struct urb *urb, struct pt_regs *regs) struct sk_buff *skb; struct net_device *netdev; u16 rx_stat; - int status; dev = urb->context; if (!dev) @@ -472,10 +463,7 @@ static void read_bulk_callback(struct urb *urb, struct pt_regs *regs) goon: usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev); - status = usb_submit_urb(dev->rx_urb, GFP_ATOMIC); - if (status == -ENODEV) - netif_device_detach(dev->netdev); - else if (status) { + if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) { set_bit(RX_URB_FAIL, &dev->flags); goto resched; } else { @@ -491,7 +479,6 @@ static void rx_fixup(unsigned long data) { rtl8150_t *dev; struct sk_buff *skb; - int status; dev = (rtl8150_t *)data; @@ -510,13 +497,10 @@ static void rx_fixup(unsigned long data) usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev); try_again: - status = usb_submit_urb(dev->rx_urb, GFP_ATOMIC); - if (status == -ENODEV) { - netif_device_detach(dev->netdev); - } else if (status) { + if (usb_submit_urb(dev->rx_urb, GFP_ATOMIC)) { set_bit(RX_URB_FAIL, &dev->flags); goto tlsched; - } else { + } else { clear_bit(RX_URB_FAIL, &dev->flags); } @@ -588,43 +572,12 @@ static void intr_callback(struct urb *urb, struct pt_regs *regs) resubmit: status = usb_submit_urb (urb, SLAB_ATOMIC); - if (status == -ENODEV) - netif_device_detach(dev->netdev); - else if (status) + if (status) err ("can't resubmit intr, %s-%s/input0, status %d", dev->udev->bus->bus_name, dev->udev->devpath, status); } -static int rtl8150_suspend(struct usb_interface *intf, pm_message_t message) -{ - rtl8150_t *dev = usb_get_intfdata(intf); - - netif_device_detach(dev->netdev); - - if (netif_running(dev->netdev)) { - usb_kill_urb(dev->rx_urb); - usb_kill_urb(dev->intr_urb); - } - return 0; -} - -static int rtl8150_resume(struct usb_interface *intf) -{ - rtl8150_t *dev = usb_get_intfdata(intf); - - netif_device_attach(dev->netdev); - if (netif_running(dev->netdev)) { - dev->rx_urb->status = 0; - dev->rx_urb->actual_length = 0; - read_bulk_callback(dev->rx_urb, NULL); - - dev->intr_urb->status = 0; - dev->intr_urb->actual_length = 0; - intr_callback(dev->intr_urb, NULL); - } - return 0; -} /* ** @@ -735,14 +688,9 @@ static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev) usb_fill_bulk_urb(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2), skb->data, count, write_bulk_callback, dev); if ((res = usb_submit_urb(dev->tx_urb, GFP_ATOMIC))) { - /* Can we get/handle EPIPE here? */ - if (res == -ENODEV) - netif_device_detach(dev->netdev); - else { - warn("failed tx_urb %d\n", res); - dev->stats.tx_errors++; - netif_start_queue(netdev); - } + warn("failed tx_urb %d\n", res); + dev->stats.tx_errors++; + netif_start_queue(netdev); } else { dev->stats.tx_packets++; dev->stats.tx_bytes += skb->len; @@ -779,25 +727,16 @@ static int rtl8150_open(struct net_device *netdev) usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev); - if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) { - if (res == -ENODEV) - netif_device_detach(dev->netdev); + if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) warn("%s: rx_urb submit failed: %d", __FUNCTION__, res); - return res; - } usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3), dev->intr_buff, INTBUFSIZE, intr_callback, dev, dev->intr_interval); - if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) { - if (res == -ENODEV) - netif_device_detach(dev->netdev); + if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) warn("%s: intr_urb submit failed: %d", __FUNCTION__, res); - usb_kill_urb(dev->rx_urb); - return res; - } + netif_start_queue(netdev); enable_net_traffic(dev); set_carrier(netdev); - netif_start_queue(netdev); return res; } @@ -972,7 +911,6 @@ static void rtl8150_disconnect(struct usb_interface *intf) if (dev) { set_bit(RTL8150_UNPLUG, &dev->flags); tasklet_disable(&dev->tl); - tasklet_kill(&dev->tl); unregister_netdev(dev->netdev); unlink_all_urbs(dev); free_all_urbs(dev); diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 179b820fc..362d6907c 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c @@ -33,6 +33,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include @@ -521,18 +522,6 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) return count; } -// Flush all pending rx urbs -// minidrivers may need to do this when the MTU changes - -void usbnet_unlink_rx_urbs(struct usbnet *dev) -{ - if (netif_running(dev->net)) { - (void) unlink_urbs (dev, &dev->rxq); - tasklet_schedule(&dev->bh); - } -} -EXPORT_SYMBOL_GPL(usbnet_unlink_rx_urbs); - /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/net/usbnet.h b/drivers/usb/net/usbnet.h index c0746f045..89fc4958e 100644 --- a/drivers/usb/net/usbnet.h +++ b/drivers/usb/net/usbnet.h @@ -166,7 +166,6 @@ struct skb_data { /* skb->cb is one of these */ extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); extern void usbnet_defer_kevent (struct usbnet *, int); extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); -extern void usbnet_unlink_rx_urbs(struct usbnet *); extern u32 usbnet_get_msglevel (struct net_device *); extern void usbnet_set_msglevel (struct net_device *, u32); diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c index 144566bda..f7ac9d6b9 100644 --- a/drivers/usb/net/zaurus.c +++ b/drivers/usb/net/zaurus.c @@ -20,6 +20,7 @@ // #define DEBUG // error path messages, extra info // #define VERBOSE // more; success messages +#include #include #include #include @@ -29,7 +30,7 @@ #include #include #include -#include +#include #include "usbnet.h" @@ -108,7 +109,7 @@ static const struct driver_info zaurus_sl5x00_info = { .check_connect = always_connected, .bind = zaurus_bind, .unbind = usbnet_cdc_unbind, - .tx_fixup = zaurus_tx_fixup, + .tx_fixup = zaurus_tx_fixup, }; #define ZAURUS_STRONGARM_INFO ((unsigned long)&zaurus_sl5x00_info) @@ -118,7 +119,7 @@ static const struct driver_info zaurus_pxa_info = { .check_connect = always_connected, .bind = zaurus_bind, .unbind = usbnet_cdc_unbind, - .tx_fixup = zaurus_tx_fixup, + .tx_fixup = zaurus_tx_fixup, }; #define ZAURUS_PXA_INFO ((unsigned long)&zaurus_pxa_info) @@ -128,7 +129,7 @@ static const struct driver_info olympus_mxl_info = { .check_connect = always_connected, .bind = zaurus_bind, .unbind = usbnet_cdc_unbind, - .tx_fixup = zaurus_tx_fixup, + .tx_fixup = zaurus_tx_fixup, }; #define OLYMPUS_MXL_INFO ((unsigned long)&olympus_mxl_info) @@ -227,11 +228,6 @@ bad_detail: detail->bDetailData[2]); goto bad_desc; } - - /* same extra framing as for non-BLAN mode */ - dev->net->hard_header_len += 6; - dev->rx_urb_size = dev->net->hard_header_len - + dev->net->mtu; break; } next_desc: @@ -262,7 +258,7 @@ static const struct driver_info bogus_mdlm_info = { .description = "pseudo-MDLM (BLAN) device", .flags = FLAG_FRAMING_Z, .check_connect = always_connected, - .tx_fixup = zaurus_tx_fixup, + .tx_fixup = zaurus_tx_fixup, .bind = blan_mdlm_bind, }; @@ -371,13 +367,13 @@ static struct usb_driver zaurus_driver = { static int __init zaurus_init(void) { - return usb_register(&zaurus_driver); + return usb_register(&zaurus_driver); } module_init(zaurus_init); static void __exit zaurus_exit(void) { - usb_deregister(&zaurus_driver); + usb_deregister(&zaurus_driver); } module_exit(zaurus_exit); diff --git a/drivers/net/wireless/zd1201.c b/drivers/usb/net/zd1201.c similarity index 97% rename from drivers/net/wireless/zd1201.c rename to drivers/usb/net/zd1201.c index c52e9bcf8..9b1e4ed1d 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/usb/net/zd1201.c @@ -33,7 +33,7 @@ static struct usb_device_id zd1201_table[] = { {} }; -static int ap; /* Are we an AP or a normal station? */ +static int ap = 0; /* Are we an AP or a normal station? */ #define ZD1201_VERSION "0.15" @@ -49,7 +49,7 @@ MODULE_DEVICE_TABLE(usb, zd1201_table); static int zd1201_fw_upload(struct usb_device *dev, int apfw) { const struct firmware *fw_entry; - char *data; + char* data; unsigned long len; int err; unsigned char ret; @@ -65,7 +65,7 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw) if (err) { dev_err(&dev->dev, "Failed to load %s firmware file!\n", fwfile); dev_err(&dev->dev, "Make sure the hotplug firmware loader is installed.\n"); - dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info.\n"); + dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info\n"); return err; } @@ -94,12 +94,12 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw) USB_DIR_OUT | 0x40, 0, 0, NULL, 0, ZD1201_FW_TIMEOUT); if (err < 0) goto exit; - + err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4, USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT); if (err < 0) goto exit; - + if (ret & 0x80) { err = -EIO; goto exit; @@ -166,13 +166,13 @@ static int zd1201_docmd(struct zd1201 *zd, int cmd, int parm0, return -ENOMEM; } usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2), - command, 16, zd1201_usbfree, zd); + command, 16, zd1201_usbfree, zd); ret = usb_submit_urb(urb, GFP_ATOMIC); if (ret) { kfree(command); usb_free_urb(urb); } - + return ret; } @@ -316,7 +316,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) fc = le16_to_cpu(*(__le16 *)&data[datalen-16]); seq = le16_to_cpu(*(__le16 *)&data[datalen-24]); - if (zd->monitor) { + if(zd->monitor) { if (datalen < 24) goto resubmit; if (!(skb = dev_alloc_skb(datalen+24))) @@ -364,7 +364,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; } hlist_for_each_entry(frag, node, &zd->fraglist, fnode) - if (frag->seq == (seq&IEEE80211_SCTL_SEQ)) + if(frag->seq == (seq&IEEE80211_SCTL_SEQ)) break; if (!frag) goto resubmit; @@ -376,6 +376,7 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) goto resubmit; hlist_del_init(&frag->fnode); kfree(frag); + /* Fallthrough */ } else { if (datalen<14) goto resubmit; @@ -421,7 +422,7 @@ static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata, int rid_fid; int length; unsigned char *pdata; - + zd->rxdatas = 0; err = zd1201_docmd(zd, ZD1201_CMDCODE_ACCESS, rid, 0, 0); if (err) @@ -470,11 +471,11 @@ static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata, length = zd->rxlen; do { - int actual_length; + int actual_length; actual_length = (length > 64) ? 64 : length; - if (pdata[0] != 0x3) { + if(pdata[0] != 0x3) { dev_dbg(&zd->usb->dev, "Rx Resource packet type error: %02X\n", pdata[0]); return -EINVAL; @@ -486,10 +487,11 @@ static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata, } /* Skip the 4 bytes header (RID length and RID) */ - if (i == 0) { + if(i == 0) { pdata += 8; actual_length -= 8; - } else { + } + else { pdata += 4; actual_length -= 4; } @@ -618,7 +620,7 @@ static int zd1201_drvr_start(struct zd1201 *zd) short max; __le16 zdmax; unsigned char *buffer; - + buffer = kzalloc(ZD1201_RXSIZE, GFP_KERNEL); if (!buffer) return -ENOMEM; @@ -630,7 +632,7 @@ static int zd1201_drvr_start(struct zd1201 *zd) err = usb_submit_urb(zd->rx_urb, GFP_KERNEL); if (err) goto err_buffer; - + err = zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0); if (err) goto err_urb; @@ -682,7 +684,7 @@ static int zd1201_enable(struct zd1201 *zd) static int zd1201_disable(struct zd1201 *zd) { int err; - + if (!zd->mac_enabled) return 0; if (zd->monitor) { @@ -762,6 +764,7 @@ static int zd1201_net_open(struct net_device *dev) static int zd1201_net_stop(struct net_device *dev) { netif_stop_queue(dev); + return 0; } @@ -912,6 +915,7 @@ static int zd1201_get_name(struct net_device *dev, struct iw_request_info *info, char *name, char *extra) { strcpy(name, "IEEE 802.11b"); + return 0; } @@ -1009,10 +1013,11 @@ static int zd1201_set_mode(struct net_device *dev, if (err) return err; } - zd->monitor = monitor; + zd->monitor=monitor; /* If monitor mode is set we don't actually turn it on here since it * is done during mac reset anyway (see zd1201_mac_enable). */ + zd1201_mac_reset(zd); return 0; @@ -1112,7 +1117,7 @@ static int zd1201_get_wap(struct net_device *dev, zd->iwstats.qual.updated = 2; } - return zd1201_getconfig(zd, ZD1201_RID_CURRENTBSSID, ap_addr->sa_data, 6); + return zd1201_getconfig(zd,ZD1201_RID_CURRENTBSSID,ap_addr->sa_data,6); } static int zd1201_set_scan(struct net_device *dev, @@ -1270,7 +1275,7 @@ static int zd1201_set_rate(struct net_device *dev, if (!rrq->fixed) { /* Also enable all lower bitrates */ rate |= rate-1; } - + err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL, rate); if (err) return err; @@ -1481,7 +1486,7 @@ static int zd1201_get_encode(struct net_device *dev, return -EINVAL; erq->flags |= i+1; - + erq->length = zd->encode_keylen[i]; memcpy(key, zd->encode_keys[i], erq->length); @@ -1524,7 +1529,11 @@ static int zd1201_set_power(struct net_device *dev, return -EINVAL; } out: - return zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled); + err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled); + if (err) + return err; + + return 0; } static int zd1201_get_power(struct net_device *dev, @@ -1618,11 +1627,15 @@ static int zd1201_set_hostauth(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) { struct zd1201 *zd = (struct zd1201 *)dev->priv; + int err; if (!zd->ap) return -EOPNOTSUPP; - return zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value); + err = zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value); + if (err) + return err; + return 0; } static int zd1201_get_hostauth(struct net_device *dev, @@ -1731,7 +1744,7 @@ static int zd1201_probe(struct usb_interface *interface, { struct zd1201 *zd; struct usb_device *usb; - int err; + int i, err; short porttype; char buf[IW_ESSID_MAX_SIZE+2]; @@ -1760,7 +1773,9 @@ static int zd1201_probe(struct usb_interface *interface, if (!zd->rx_urb || !zd->tx_urb) goto err_zd; - mdelay(100); + for(i = 0; i<100; i++) + udelay(1000); + err = zd1201_drvr_start(zd); if (err) goto err_zd; @@ -1818,10 +1833,8 @@ static int zd1201_probe(struct usb_interface *interface, goto err_net; dev_info(&usb->dev, "%s: ZD1201 USB Wireless interface\n", zd->dev->name); - + usb_set_intfdata(interface, zd); - zd1201_enable(zd); /* zd1201 likes to startup enabled, */ - zd1201_disable(zd); /* interfering with all the wifis in range */ return 0; err_net: diff --git a/drivers/net/wireless/zd1201.h b/drivers/usb/net/zd1201.h similarity index 100% rename from drivers/net/wireless/zd1201.h rename to drivers/usb/net/zd1201.h diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index f5b9438c9..5c60be521 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig @@ -62,6 +62,15 @@ config USB_SERIAL_AIRPRIME To compile this driver as a module, choose M here: the module will be called airprime. +config USB_SERIAL_ANYDATA + tristate "USB AnyData CDMA Wireless Driver" + depends on USB_SERIAL + help + Say Y here if you want to use a AnyData CDMA device. + + To compile this driver as a module, choose M here: the + module will be called anydata. + config USB_SERIAL_ARK3116 tristate "USB ARK Micro 3116 USB Serial Driver (EXPERIMENTAL)" depends on USB_SERIAL && EXPERIMENTAL @@ -408,7 +417,7 @@ config USB_SERIAL_MCT_U232 Magic Control Technology Corp. (U232 is one of the model numbers). This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB - BAY, Belkin F5U109, and Belkin F5U409 devices. + BAY devices. To compile this driver as a module, choose M here: the module will be called mct_u232. @@ -447,17 +456,6 @@ config USB_SERIAL_SAFE_PADDED bool "USB Secure Encapsulated Driver - Padded" depends on USB_SERIAL_SAFE -config USB_SERIAL_SIERRAWIRELESS - tristate "USB Sierra Wireless Driver" - depends on USB_SERIAL - help - Say M here if you want to use a Sierra Wireless device (if - using an PC 5220 or AC580 please use the Airprime driver - instead). - - To compile this driver as a module, choose M here: the - module will be called sierra. - config USB_SERIAL_TI tristate "USB TI 3410/5052 Serial Driver" depends on USB_SERIAL @@ -493,25 +491,16 @@ config USB_SERIAL_XIRCOM module will be called keyspan_pda. config USB_SERIAL_OPTION - tristate "USB driver for GSM and CDMA modems" - depends on USB_SERIAL + tristate "USB Option PCMCIA serial driver" + depends on USB_SERIAL && USB_OHCI_HCD && PCCARD help - Say Y here if you have a GSM or CDMA modem that's connected to USB. - - This driver also supports several PCMCIA cards which have a - built-in OHCI-USB adapter and an internally-connected GSM modem. - The USB bus on these cards is not accessible externally. - - Supported devices include (some of?) those made by: - Option, Huawei, Audiovox, Sierra Wireless, Novatel Wireless, or - Anydata. + Say Y here if you want to use an Option card. This is a + GSM card, controlled by three serial ports which are connected + via an OHCI adapter located on a PC card. To compile this driver as a module, choose M here: the module will be called option. - If this driver doesn't recognize your device, - it might be accessible via the FTDI_SIO driver. - config USB_SERIAL_OMNINET tristate "USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)" depends on USB_SERIAL && EXPERIMENTAL diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index 8efed2ce1..5a0960fc9 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile @@ -12,6 +12,7 @@ usbserial-obj-$(CONFIG_USB_EZUSB) += ezusb.o usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y) obj-$(CONFIG_USB_SERIAL_AIRPRIME) += airprime.o +obj-$(CONFIG_USB_SERIAL_ANYDATA) += anydata.o obj-$(CONFIG_USB_SERIAL_ARK3116) += ark3116.o obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o @@ -38,7 +39,6 @@ obj-$(CONFIG_USB_SERIAL_OMNINET) += omninet.o obj-$(CONFIG_USB_SERIAL_OPTION) += option.o obj-$(CONFIG_USB_SERIAL_PL2303) += pl2303.o obj-$(CONFIG_USB_SERIAL_SAFE) += safe_serial.o -obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 62082532a..694b205f9 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -13,14 +13,12 @@ #include #include #include -#include +#include "usb-serial.h" static struct usb_device_id id_table [] = { - { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ { USB_DEVICE(0xf3d, 0x0112) }, /* AirPrime CDMA Wireless PC Card */ { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */ { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless Aircard 580 */ - { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { }, }; MODULE_DEVICE_TABLE(usb, id_table); diff --git a/drivers/usb/serial/anydata.c b/drivers/usb/serial/anydata.c new file mode 100644 index 000000000..343f6f228 --- /dev/null +++ b/drivers/usb/serial/anydata.c @@ -0,0 +1,123 @@ +/* + * AnyData CDMA Serial USB driver + * + * Copyright (C) 2005 Greg Kroah-Hartman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License version + * 2 as published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include "usb-serial.h" + +static struct usb_device_id id_table [] = { + { USB_DEVICE(0x16d5, 0x6501) }, /* AirData CDMA device */ + { }, +}; +MODULE_DEVICE_TABLE(usb, id_table); + +/* if overridden by the user, then use their value for the size of the + * read and write urbs */ +static int buffer_size; +static int debug; + +static struct usb_driver anydata_driver = { + .name = "anydata", + .probe = usb_serial_probe, + .disconnect = usb_serial_disconnect, + .id_table = id_table, + .no_dynamic_id = 1, +}; + +static int anydata_open(struct usb_serial_port *port, struct file *filp) +{ + char *buffer; + int result = 0; + + dbg("%s - port %d", __FUNCTION__, port->number); + + if (buffer_size) { + /* override the default buffer sizes */ + buffer = kmalloc(buffer_size, GFP_KERNEL); + if (!buffer) { + dev_err(&port->dev, "%s - out of memory.\n", + __FUNCTION__); + return -ENOMEM; + } + kfree (port->read_urb->transfer_buffer); + port->read_urb->transfer_buffer = buffer; + port->read_urb->transfer_buffer_length = buffer_size; + + buffer = kmalloc(buffer_size, GFP_KERNEL); + if (!buffer) { + dev_err(&port->dev, "%s - out of memory.\n", + __FUNCTION__); + return -ENOMEM; + } + kfree (port->write_urb->transfer_buffer); + port->write_urb->transfer_buffer = buffer; + port->write_urb->transfer_buffer_length = buffer_size; + port->bulk_out_size = buffer_size; + } + + /* Start reading from the device */ + usb_fill_bulk_urb(port->read_urb, port->serial->dev, + usb_rcvbulkpipe(port->serial->dev, + port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, + port->read_urb->transfer_buffer_length, + usb_serial_generic_write_bulk_callback, port); + result = usb_submit_urb(port->read_urb, GFP_KERNEL); + if (result) + dev_err(&port->dev, + "%s - failed submitting read urb, error %d\n", + __FUNCTION__, result); + + return result; +} + +static struct usb_serial_driver anydata_device = { + .driver = { + .owner = THIS_MODULE, + .name = "anydata", + }, + .id_table = id_table, + .num_interrupt_in = NUM_DONT_CARE, + .num_bulk_in = NUM_DONT_CARE, + .num_bulk_out = NUM_DONT_CARE, + .num_ports = 1, + .open = anydata_open, +}; + +static int __init anydata_init(void) +{ + int retval; + + retval = usb_serial_register(&anydata_device); + if (retval) + return retval; + retval = usb_register(&anydata_driver); + if (retval) + usb_serial_deregister(&anydata_device); + return retval; +} + +static void __exit anydata_exit(void) +{ + usb_deregister(&anydata_driver); + usb_serial_deregister(&anydata_device); +} + +module_init(anydata_init); +module_exit(anydata_exit); +MODULE_LICENSE("GPL"); + +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Debug enabled or not"); +module_param(buffer_size, int, 0); +MODULE_PARM_DESC(buffer_size, "Size of the transfer buffers"); diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 970d9ef0a..8dec79622 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include "usb-serial.h" static int debug; diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index 70ece9e01..4144777ea 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c @@ -63,6 +63,7 @@ * UsbSnoop on Windows2000 and from examining the other USB drivers. */ +#include #include #include #include @@ -74,7 +75,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "belkin_sa.h" static int debug; diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 6542f2204..e9f9f4baf 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -8,12 +8,13 @@ * 2 as published by the Free Software Foundation. */ +#include #include #include #include #include #include -#include +#include "usb-serial.h" static int usb_serial_device_match (struct device *dev, struct device_driver *drv) { diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 3a9073dbf..8023bb727 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -11,16 +11,18 @@ * */ +#include #include #include #include #include #include #include -#include static int debug; +#include "usb-serial.h" + struct usbcons_info { int magic; int break_flag; @@ -200,7 +202,7 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun struct usb_serial *serial; int retval = -ENODEV; - if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED) + if (!port) return; serial = port->serial; @@ -211,38 +213,17 @@ static void usb_console_write(struct console *co, const char *buf, unsigned coun if (!port->open_count) { dbg ("%s - port not opened", __FUNCTION__); - return; + goto exit; } - while (count) { - unsigned int i; - unsigned int lf; - /* search for LF so we can insert CR if necessary */ - for (i=0, lf=0 ; i < count ; i++) { - if (*(buf + i) == 10) { - lf = 1; - i++; - break; - } - } - /* pass on to the driver specific version of this function if it is available */ - if (serial->type->write) - retval = serial->type->write(port, buf, i); - else - retval = usb_serial_generic_write(port, buf, i); - dbg("%s - return value : %d", __FUNCTION__, retval); - if (lf) { - /* append CR after LF */ - unsigned char cr = 13; - if (serial->type->write) - retval = serial->type->write(port, &cr, 1); - else - retval = usb_serial_generic_write(port, &cr, 1); - dbg("%s - return value : %d", __FUNCTION__, retval); - } - buf += i; - count -= i; - } + /* pass on to the driver specific version of this function if it is available */ + if (serial->type->write) + retval = serial->type->write(port, buf, count); + else + retval = usb_serial_generic_write(port, buf, count); + +exit: + dbg("%s - return value (if we had one): %d", __FUNCTION__, retval); } static struct console usbcons = { @@ -253,14 +234,6 @@ static struct console usbcons = { .index = -1, }; -void usb_serial_console_disconnect(struct usb_serial *serial) -{ - if (serial && serial->port && serial->port[0] && serial->port[0] == usbcons_info.port) { - usb_serial_console_exit(); - usb_serial_put(serial); - } -} - void usb_serial_console_init (int serial_debug, int minor) { debug = serial_debug; @@ -286,11 +259,6 @@ void usb_serial_console_init (int serial_debug, int minor) void usb_serial_console_exit (void) { - if (usbcons_info.port) { - unregister_console(&usbcons); - if (usbcons_info.port->open_count) - usbcons_info.port->open_count--; - usbcons_info.port = NULL; - } + unregister_console(&usbcons); } diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 486c7411b..e0c2acdb3 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c @@ -17,6 +17,7 @@ * */ +#include #include #include #include @@ -26,7 +27,7 @@ #include #include #include -#include +#include "usb-serial.h" /* * Version Information @@ -58,7 +59,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */ { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */ { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ - { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index d954ec34b..2357b1d10 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -28,6 +28,7 @@ */ +#include #include #include #include @@ -39,7 +40,7 @@ #include #include #include -#include +#include "usb-serial.h" #define CYBERJACK_LOCAL_BUF_SIZE 32 @@ -214,14 +215,14 @@ static int cyberjack_write (struct usb_serial_port *port, const unsigned char *b return (0); } - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); spin_lock_irqsave(&priv->lock, flags); @@ -468,7 +469,7 @@ static void cyberjack_write_bulk_callback (struct urb *urb, struct pt_regs *regs exit: spin_unlock(&priv->lock); - usb_serial_port_softint(port); + schedule_work(&port->work); } static int __init cyberjack_init (void) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index ee70fddca..7212fbe3b 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -48,6 +48,7 @@ /* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */ +#include #include #include #include @@ -59,11 +60,11 @@ #include #include #include -#include #include #include #include +#include "usb-serial.h" #include "cypress_m8.h" @@ -823,7 +824,7 @@ send: priv->bytes_out += count; /* do not count the line control and size bytes */ spin_unlock_irqrestore(&priv->lock, flags); - usb_serial_port_softint(port); + schedule_work(&port->work); } /* cypress_send */ diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 9b225183f..b3f776a90 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -233,6 +233,7 @@ * $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $ */ +#include #include #include #include @@ -246,7 +247,7 @@ #include #include #include -#include +#include "usb-serial.h" /* Defines */ diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index daafe405d..63f7c78a1 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c @@ -51,6 +51,7 @@ * */ +#include #include #include #include @@ -62,7 +63,7 @@ #include #include #include -#include +#include "usb-serial.h" static int debug; @@ -334,7 +335,7 @@ static void empeg_write_bulk_callback (struct urb *urb, struct pt_regs *regs) return; } - usb_serial_port_softint(port); + schedule_work(&port->work); } diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c index 5169c2d15..1e419c8d7 100644 --- a/drivers/usb/serial/ezusb.c +++ b/drivers/usb/serial/ezusb.c @@ -8,6 +8,7 @@ * 2 as published by the Free Software Foundation. */ +#include #include #include #include @@ -15,7 +16,7 @@ #include #include #include -#include +#include "usb-serial.h" /* EZ-USB Control and Status Register. Bit 0 controls 8051 reset */ #define CPUCS_REG 0x7F92 diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c6115aa1b..ad9ddecf1 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -245,6 +245,7 @@ /* to talk to the device */ /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */ +#include #include #include #include @@ -257,7 +258,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "ftdi_sio.h" /* @@ -306,8 +307,6 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { static struct usb_device_id id_table_combined [] = { - { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) }, { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) }, { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) }, @@ -315,7 +314,6 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, @@ -339,7 +337,6 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2101_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2102_PID) }, { USB_DEVICE(SEALEVEL_VID, SEALEVEL_2103_PID) }, @@ -503,10 +500,6 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(ICOM_ID1_VID, ICOM_ID1_PID) }, { USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) }, - { USB_DEVICE(TESTO_VID, TESTO_USB_INTERFACE_PID) }, - { USB_DEVICE(FTDI_VID, FTDI_GAMMA_SCOUT_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ }; @@ -555,7 +548,6 @@ struct ftdi_private { spinlock_t rx_lock; /* spinlock for receive state */ struct work_struct rx_work; int rx_processed; - unsigned long rx_bytes; __u16 interface; /* FT2232C port interface (0 for FT232/245) */ @@ -563,7 +555,6 @@ struct ftdi_private { int force_rtscts; /* if non-zero, force RTS-CTS to always be enabled */ spinlock_t tx_lock; /* spinlock for transmit state */ - unsigned long tx_bytes; unsigned long tx_outstanding_bytes; unsigned long tx_outstanding_urbs; }; @@ -1278,6 +1269,7 @@ static void ftdi_shutdown (struct usb_serial *serial) static int ftdi_open (struct usb_serial_port *port, struct file *filp) { /* ftdi_open */ + struct termios tmp_termios; struct usb_device *dev = port->serial->dev; struct ftdi_private *priv = usb_get_serial_port_data(port); unsigned long flags; @@ -1287,15 +1279,8 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp) dbg("%s", __FUNCTION__); - spin_lock_irqsave(&priv->tx_lock, flags); - priv->tx_bytes = 0; - spin_unlock_irqrestore(&priv->tx_lock, flags); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes = 0; - spin_unlock_irqrestore(&priv->rx_lock, flags); - if (port->tty) - port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0; + port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0; /* No error checking for this (will get errors later anyway) */ /* See ftdi_sio.h for description of what is reset */ @@ -1309,8 +1294,7 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp) This is same behaviour as serial.c/rs_open() - Kuba */ /* ftdi_set_termios will send usb control messages */ - if (port->tty) - ftdi_set_termios(port, NULL); + ftdi_set_termios(port, &tmp_termios); /* FIXME: Flow control might be enabled, so it should be checked - we have no control of defaults! */ @@ -1481,7 +1465,6 @@ static int ftdi_write (struct usb_serial_port *port, spin_lock_irqsave(&priv->tx_lock, flags); ++priv->tx_outstanding_urbs; priv->tx_outstanding_bytes += count; - priv->tx_bytes += count; spin_unlock_irqrestore(&priv->tx_lock, flags); } @@ -1531,7 +1514,7 @@ static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs) priv->tx_outstanding_bytes -= countback; spin_unlock_irqrestore(&priv->tx_lock, flags); - usb_serial_port_softint(port); + schedule_work(&port->work); } /* ftdi_write_bulk_callback */ @@ -1584,8 +1567,6 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs) struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct tty_struct *tty; struct ftdi_private *priv; - unsigned long countread; - unsigned long flags; if (urb->number_of_packets > 0) { err("%s transfer_buffer_length %d actual_length %d number of packets %d",__FUNCTION__, @@ -1620,13 +1601,6 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs) return; } - /* count data bytes, but not status bytes */ - countread = urb->actual_length; - countread -= 2 * ((countread + (PKTSZ - 1)) / PKTSZ); - spin_lock_irqsave(&priv->rx_lock, flags); - priv->rx_bytes += countread; - spin_unlock_irqrestore(&priv->rx_lock, flags); - ftdi_process_read(port); } /* ftdi_read_bulk_callback */ @@ -1951,7 +1925,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_ err("%s urb failed to set baudrate", __FUNCTION__); } /* Ensure RTS and DTR are raised when baudrate changed from 0 */ - if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) { + if ((old_termios->c_cflag & CBAUD) == B0) { set_mctrl(port, TIOCM_DTR | TIOCM_RTS); } } diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 77299996f..d69a917e7 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h @@ -32,19 +32,10 @@ #define FTDI_NF_RIC_PID 0x0001 /* Product Id */ -/* www.canusb.com Lawicel CANUSB device */ -#define FTDI_CANUSB_PID 0xFFA8 /* Product Id */ - -/* AlphaMicro Components AMC-232USB01 device */ -#define FTDI_AMC232_PID 0xFF00 /* Product Id */ - /* ACT Solutions HomePro ZWave interface (http://www.act-solutions.com/HomePro.htm) */ #define FTDI_ACTZWAVE_PID 0xF2D0 -/* www.starting-point-systems.com µChameleon device */ -#define FTDI_MICRO_CHAMELEON_PID 0xCAA0 /* Product Id */ - /* www.irtrans.de device */ #define FTDI_IRTRANS_PID 0xFC60 /* Product Id */ @@ -188,10 +179,6 @@ /* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */ #define FTDI_USB_UIRT_PID 0xF850 /* Product Id */ -/* TNC-X USB-to-packet-radio adapter, versions prior to 3.0 (DLP module) */ - -#define FTDI_TNC_X_PID 0xEBE0 - /* * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). * All of these devices use FTDI's vendor ID (0x0403). @@ -449,29 +436,6 @@ */ #define FTDI_ACG_HFDUAL_PID 0xDD20 /* HF Dual ISO Reader (RFID) */ -/* - * Yost Engineering, Inc. products (www.yostengineering.com). - * PID 0xE050 submitted by Aaron Prose. - */ -#define FTDI_YEI_SERVOCENTER31_PID 0xE050 /* YEI ServoCenter3.1 USB */ - -/* - * ThorLabs USB motor drivers - */ -#define FTDI_THORLABS_PID 0xfaf0 /* ThorLabs USB motor drivers */ - -/* - * Testo products (http://www.testo.com/) - * Submitted by Colin Leroy - */ -#define TESTO_VID 0x128D -#define TESTO_USB_INTERFACE_PID 0x0001 - -/* - * Gamma Scout (http://gamma-scout.com/). Submitted by rsc@runtux.com. - */ -#define FTDI_GAMMA_SCOUT_PID 0xD678 /* Gamma Scout online */ - /* Commands */ #define FTDI_SIO_RESET 0 /* Reset the port */ #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c index 77b977206..803721b97 100644 --- a/drivers/usb/serial/funsoft.c +++ b/drivers/usb/serial/funsoft.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include "usb-serial.h" static struct usb_device_id id_table [] = { { USB_DEVICE(0x1404, 0xcddc) }, diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 727852634..5ec9bf5ba 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -23,6 +23,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA */ +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include /* the mode to be set when the port ist opened */ static int initial_mode = 1; @@ -43,6 +43,8 @@ static int initial_mode = 1; /* debug flag */ static int debug = 0; +#include "usb-serial.h" + #define GARMIN_VENDOR_ID 0x091E /* @@ -1010,7 +1012,7 @@ static void garmin_write_bulk_callback (struct urb *urb, struct pt_regs *regs) garmin_data_p->flags |= CLEAR_HALT_REQUIRED; } - usb_serial_port_softint(port); + schedule_work(&port->work); } diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 21cbaa0fb..c62cc2876 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -17,8 +18,8 @@ #include #include #include -#include #include +#include "usb-serial.h" static int debug; @@ -175,14 +176,14 @@ int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char * /* only do something if we have a bulk out endpoint */ if (serial->num_bulk_out) { - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); count = (count > port->bulk_out_size) ? port->bulk_out_size : count; @@ -285,7 +286,6 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg if (result) dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); } -EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { @@ -299,7 +299,9 @@ void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *re return; } - usb_serial_port_softint(port); + usb_serial_port_softint((void *)port); + + schedule_work(&port->work); } EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c index ebcac701b..e9719da2a 100644 --- a/drivers/usb/serial/hp4x.c +++ b/drivers/usb/serial/hp4x.c @@ -12,12 +12,13 @@ * See Documentation/usb/usb-serial.txt for more information on using this driver */ +#include #include #include #include #include #include -#include +#include "usb-serial.h" /* * Version Information diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index c49976c3a..b606c5968 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c @@ -29,6 +29,7 @@ * */ +#include #include #include #include @@ -44,7 +45,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "io_edgeport.h" #include "io_ionsp.h" /* info for the iosp messages */ #include "io_16654.h" /* 16654 UART defines */ @@ -141,7 +142,7 @@ struct edgeport_port { /* This structure holds all of the individual device information */ struct edgeport_serial { - char name[MAX_NAME_LEN+2]; /* string name of this device */ + char name[MAX_NAME_LEN+1]; /* string name of this device */ struct edge_manuf_descriptor manuf_descriptor; /* the manufacturer descriptor */ struct edge_boot_descriptor boot_descriptor; /* the boot firmware descriptor */ @@ -269,7 +270,7 @@ static void get_manufacturing_desc (struct edgeport_serial *edge_serial); static void get_boot_desc (struct edgeport_serial *edge_serial); static void load_application_firmware (struct edgeport_serial *edge_serial); -static void unicode_to_ascii(char *string, int buflen, __le16 *unicode, int unicode_size); +static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size); // ************************************************************************ @@ -372,7 +373,7 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial) * Get string descriptor from device * * * ************************************************************************/ -static int get_string (struct usb_device *dev, int Id, char *string, int buflen) +static int get_string (struct usb_device *dev, int Id, char *string) { struct usb_string_descriptor StringDesc; struct usb_string_descriptor *pStringDesc; @@ -394,7 +395,7 @@ static int get_string (struct usb_device *dev, int Id, char *string, int buflen) return 0; } - unicode_to_ascii(string, buflen, pStringDesc->wData, pStringDesc->bLength/2); + unicode_to_ascii(string, pStringDesc->wData, pStringDesc->bLength/2-1); kfree(pStringDesc); return strlen(string); @@ -2563,20 +2564,16 @@ static void change_port_settings (struct edgeport_port *edge_port, struct termio * ASCII range, but it's only for debugging... * NOTE: expects the unicode in LE format ****************************************************************************/ -static void unicode_to_ascii(char *string, int buflen, __le16 *unicode, int unicode_size) +static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size) { int i; - if (buflen <= 0) /* never happens, but... */ + if (unicode_size <= 0) return; - --buflen; /* space for nul */ - for (i = 0; i < unicode_size; i++) { - if (i >= buflen) - break; + for (i = 0; i < unicode_size; ++i) string[i] = (char)(le16_to_cpu(unicode[i])); - } - string[i] = 0x00; + string[unicode_size] = 0x00; } @@ -2606,17 +2603,11 @@ static void get_manufacturing_desc (struct edgeport_serial *edge_serial) dbg(" BoardRev: %d", edge_serial->manuf_descriptor.BoardRev); dbg(" NumPorts: %d", edge_serial->manuf_descriptor.NumPorts); dbg(" DescDate: %d/%d/%d", edge_serial->manuf_descriptor.DescDate[0], edge_serial->manuf_descriptor.DescDate[1], edge_serial->manuf_descriptor.DescDate[2]+1900); - unicode_to_ascii(string, sizeof(string), - edge_serial->manuf_descriptor.SerialNumber, - edge_serial->manuf_descriptor.SerNumLength/2); + unicode_to_ascii (string, edge_serial->manuf_descriptor.SerialNumber, edge_serial->manuf_descriptor.SerNumLength/2-1); dbg(" SerialNumber: %s", string); - unicode_to_ascii(string, sizeof(string), - edge_serial->manuf_descriptor.AssemblyNumber, - edge_serial->manuf_descriptor.AssemblyNumLength/2); + unicode_to_ascii (string, edge_serial->manuf_descriptor.AssemblyNumber, edge_serial->manuf_descriptor.AssemblyNumLength/2-1); dbg(" AssemblyNumber: %s", string); - unicode_to_ascii(string, sizeof(string), - edge_serial->manuf_descriptor.OemAssyNumber, - edge_serial->manuf_descriptor.OemAssyNumLength/2); + unicode_to_ascii (string, edge_serial->manuf_descriptor.OemAssyNumber, edge_serial->manuf_descriptor.OemAssyNumLength/2-1); dbg(" OemAssyNumber: %s", string); dbg(" UartType: %d", edge_serial->manuf_descriptor.UartType); dbg(" IonPid: %d", edge_serial->manuf_descriptor.IonPid); @@ -2729,7 +2720,7 @@ static int edge_startup (struct usb_serial *serial) struct edgeport_serial *edge_serial; struct edgeport_port *edge_port; struct usb_device *dev; - int i, j; + int i; dev = serial->dev; @@ -2744,11 +2735,11 @@ static int edge_startup (struct usb_serial *serial) usb_set_serial_data(serial, edge_serial); /* get the name for the device from the device */ - i = get_string(dev, dev->descriptor.iManufacturer, - &edge_serial->name[0], MAX_NAME_LEN+1); - edge_serial->name[i++] = ' '; - get_string(dev, dev->descriptor.iProduct, - &edge_serial->name[i], MAX_NAME_LEN+2 - i); + if ( (i = get_string(dev, dev->descriptor.iManufacturer, &edge_serial->name[0])) != 0) { + edge_serial->name[i-1] = ' '; + } + + get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]); dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name); @@ -2793,10 +2784,6 @@ static int edge_startup (struct usb_serial *serial) edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL); if (edge_port == NULL) { dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__); - for (j = 0; j < i; ++j) { - kfree (usb_get_serial_port_data(serial->port[j])); - usb_set_serial_port_data(serial->port[j], NULL); - } usb_set_serial_data(serial, NULL); kfree(edge_serial); return -ENOMEM; diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 17c5b1d23..8e1e22537 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include @@ -39,8 +40,8 @@ #include #include #include -#include +#include "usb-serial.h" #include "io_16654.h" #include "io_usbvend.h" #include "io_ti.h" diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 9840bade7..9a5c97989 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c @@ -44,6 +44,7 @@ * Thanks to info from Heath Robinson and Arieh Davidoff. */ +#include #include #include #include @@ -55,7 +56,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "ipaq.h" #define KP_RETRIES 100 @@ -70,8 +71,6 @@ static __u16 product, vendor; static int debug; -static int connect_retries = KP_RETRIES; -static int initial_wait; /* Function prototypes for an ipaq */ static int ipaq_open (struct usb_serial_port *port, struct file *filp); @@ -250,9 +249,6 @@ static struct usb_device_id ipaq_id_table [] = { { USB_DEVICE(0x04C5, 0x1058) }, /* FUJITSU USB Sync */ { USB_DEVICE(0x04C5, 0x1079) }, /* FUJITSU USB Sync */ { USB_DEVICE(0x04DA, 0x2500) }, /* Panasonic USB Sync */ - { USB_DEVICE(0x04DD, 0x9102) }, /* SHARP WS003SH USB Modem */ - { USB_DEVICE(0x04DD, 0x9121) }, /* SHARP WS004SH USB Modem */ - { USB_DEVICE(0x04DD, 0x9123) }, /* SHARP WS007SH USB Modem */ { USB_DEVICE(0x04E8, 0x5F00) }, /* Samsung NEXiO USB Sync */ { USB_DEVICE(0x04E8, 0x5F01) }, /* Samsung NEXiO USB Sync */ { USB_DEVICE(0x04E8, 0x5F02) }, /* Samsung NEXiO USB Sync */ @@ -587,7 +583,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) struct ipaq_private *priv; struct ipaq_packet *pkt; int i, result = 0; - int retries = connect_retries; + int retries = KP_RETRIES; dbg("%s - port %d", __FUNCTION__, port->number); @@ -651,12 +647,16 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) port->read_urb->transfer_buffer_length = URBDATA_SIZE; port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE; - msleep(1000*initial_wait); /* Start reading from the device */ usb_fill_bulk_urb(port->read_urb, serial->dev, usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, ipaq_read_bulk_callback, port); + result = usb_submit_urb(port->read_urb, GFP_KERNEL); + if (result) { + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); + goto error; + } /* * Send out control message observed in win98 sniffs. Not sure what @@ -671,14 +671,8 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp) usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21, 0x1, 0, NULL, 0, 100); if (result == 0) { - result = usb_submit_urb(port->read_urb, GFP_KERNEL); - if (result) { - err("%s - failed submitting read urb, error %d", __FUNCTION__, result); - goto error; - } return 0; } - msleep(1000); } err("%s - failed doing control urb, error %d", __FUNCTION__, result); goto error; @@ -861,7 +855,6 @@ static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs) if (urb->status) { dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); - return; } spin_lock_irqsave(&write_list_lock, flags); @@ -877,7 +870,7 @@ static void ipaq_write_bulk_callback(struct urb *urb, struct pt_regs *regs) spin_unlock_irqrestore(&write_list_lock, flags); } - usb_serial_port_softint(port); + schedule_work(&port->work); } static int ipaq_write_room(struct usb_serial_port *port) @@ -974,9 +967,3 @@ MODULE_PARM_DESC(vendor, "User specified USB idVendor"); module_param(product, ushort, 0); MODULE_PARM_DESC(product, "User specified USB idProduct"); - -module_param(connect_retries, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(connect_retries, "Maximum number of connect retries (one second each)"); - -module_param(initial_wait, int, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(initial_wait, "Time to wait before attempting a connection (in seconds)"); diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index 812bc213a..e760a7024 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c @@ -46,8 +46,8 @@ #include #include #include -#include #include +#include "usb-serial.h" /* * Version Information @@ -373,12 +373,10 @@ static void ipw_write_bulk_callback(struct urb *urb, struct pt_regs *regs) dbg("%s", __FUNCTION__); - port->write_urb_busy = 0; - if (urb->status) dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); - usb_serial_port_softint(port); + schedule_work(&port->work); } static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int count) @@ -394,14 +392,14 @@ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int return 0; } - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); count = min(count, port->bulk_out_size); memcpy(port->bulk_out_buffer, buf, count); diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index 1b348df38..426182ddc 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c @@ -46,6 +46,7 @@ * initial version released. */ +#include #include #include #include @@ -57,7 +58,7 @@ #include #include #include -#include +#include "usb-serial.h" /* * Version Information @@ -342,14 +343,14 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int if (count == 0) return 0; - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); transfer_buffer = port->write_urb->transfer_buffer; transfer_size = min(count, port->bulk_out_size - 1); @@ -407,7 +408,7 @@ static void ir_write_bulk_callback (struct urb *urb, struct pt_regs *regs) urb->actual_length, urb->transfer_buffer); - usb_serial_port_softint(port); + schedule_work(&port->work); } static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs) @@ -452,7 +453,8 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs) tty = port->tty; /* - * FIXME: must not do this in IRQ context + * FIXME: must not do this in IRQ context, + * must honour TTY_DONT_FLIP */ tty->ldisc.receive_buf( tty, diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 015ad6cc1..052b735c4 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -95,6 +95,7 @@ */ +#include #include #include #include @@ -107,7 +108,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "keyspan.h" static int debug; @@ -480,7 +481,7 @@ static void usa2x_outdat_callback(struct urb *urb, struct pt_regs *regs) dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); if (port->open_count) - usb_serial_port_softint(port); + schedule_work(&port->work); } static void usa26_inack_callback(struct urb *urb, struct pt_regs *regs) diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 59e777f1e..b0441c35f 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -66,6 +66,7 @@ */ +#include #include #include #include @@ -78,7 +79,6 @@ #include #include #include -#include static int debug; @@ -108,6 +108,8 @@ struct ezusb_hex_record { #include "xircom_pgs_fw.h" #endif +#include "usb-serial.h" + /* * Version Information */ @@ -518,13 +520,13 @@ static int keyspan_pda_write(struct usb_serial_port *port, the TX urb is in-flight (wait until it completes) the device is full (wait until it says there is room) */ - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy || priv->tx_throttled) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); /* At this point the URB is in our control, nobody else can submit it again (the only sudden transition was the one from EINPROGRESS to diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 2a2f3e2da..78335a5f7 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c @@ -45,6 +45,7 @@ */ +#include #include #include #include @@ -55,7 +56,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "kl5kusb105.h" static int debug; @@ -568,7 +569,8 @@ static void klsi_105_write_bulk_callback ( struct urb *urb, struct pt_regs *regs return; } - usb_serial_port_softint(port); + /* from generic_write_bulk_callback */ + schedule_work(&port->work); } /* klsi_105_write_bulk_completion_callback */ diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index d50dce034..87dfcd89f 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -35,6 +35,7 @@ */ +#include #include #include #include @@ -46,8 +47,8 @@ #include #include #include -#include #include +#include "usb-serial.h" #include "kobil_sct.h" static int debug; diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index f4d4305c2..35bd29b6c 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -64,6 +64,7 @@ * (via linux-usb-devel). */ +#include #include #include #include @@ -75,7 +76,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "mct_u232.h" /* diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index ac3f8b5d2..7f5440810 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include "usb-serial.h" static int debug; diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index a764ff4e3..238033a87 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c @@ -35,6 +35,7 @@ * */ +#include #include #include #include @@ -46,7 +47,7 @@ #include #include #include -#include +#include "usb-serial.h" static int debug; @@ -256,14 +257,14 @@ static int omninet_write (struct usb_serial_port *port, const unsigned char *buf return (0); } - spin_lock_bh(&wport->lock); + spin_lock(&wport->lock); if (wport->write_urb_busy) { - spin_unlock_bh(&wport->lock); + spin_unlock(&wport->lock); dbg("%s - already writing", __FUNCTION__); return 0; } wport->write_urb_busy = 1; - spin_unlock_bh(&wport->lock); + spin_unlock(&wport->lock); count = (count > OMNINET_BULKOUTSIZE) ? OMNINET_BULKOUTSIZE : count; @@ -319,7 +320,7 @@ static void omninet_write_bulk_callback (struct urb *urb, struct pt_regs *regs) return; } - usb_serial_port_softint(port); + schedule_work(&port->work); } diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index c856e6f40..5cf2b80ad 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1,5 +1,5 @@ /* - USB Driver for GSM modems + Option Card (PCMCIA to) USB to Serial Driver Copyright (C) 2005 Matthias Urlichs @@ -9,29 +9,36 @@ Portions copied from the Keyspan driver by Hugh Blemings - History: see the git log. + History: + + 2005-05-19 v0.1 Initial version, based on incomplete docs + and analysis of misbehavior with the standard driver + 2005-05-20 v0.2 Extended the input buffer to avoid losing + random 64-byte chunks of data + 2005-05-21 v0.3 implemented chars_in_buffer() + turned on low_latency + simplified the code somewhat + 2005-05-24 v0.4 option_write() sometimes deadlocked under heavy load + removed some dead code + added sponsor notice + coding style clean-up + 2005-06-20 v0.4.1 add missing braces :-/ + killed end-of-line whitespace + 2005-07-15 v0.4.2 rename WLAN product to FUSION, add FUSION2 + 2005-09-10 v0.4.3 added HUAWEI E600 card and Audiovox AirCard + 2005-09-20 v0.4.4 increased recv buffer size: the card sometimes + wants to send >2000 bytes. + 2006-04-10 v0.4.2 fixed two array overrun errors :-/ Work sponsored by: Sigos GmbH, Germany - This driver exists because the "normal" serial driver doesn't work too well - with GSM modems. Issues: - - data loss -- one single Receive URB is not nearly enough - - nonstandard flow (Option devices) control - - controlling the baud rate doesn't make sense - - This driver is named "option" because the most common device it's - used for is a PC-Card (with an internal OHCI-USB interface, behind - which the GSM interface sits), made by Option Inc. - - Some of the "one port" devices actually exhibit multiple USB instances - on the USB bus. This is not a bug, these ports are used for different - device features. */ -#define DRIVER_VERSION "v0.7.1" +#define DRIVER_VERSION "v0.4" #define DRIVER_AUTHOR "Matthias Urlichs " -#define DRIVER_DESC "USB Driver for GSM modems" +#define DRIVER_DESC "Option Card (PC-Card to) USB to Serial Driver" +#include #include #include #include @@ -39,7 +46,7 @@ #include #include #include -#include +#include "usb-serial.h" /* Function prototypes */ static int option_open(struct usb_serial_port *port, struct file *filp); @@ -67,45 +74,22 @@ static int option_tiocmset(struct usb_serial_port *port, struct file *file, static int option_send_setup(struct usb_serial_port *port); /* Vendor and product IDs */ -#define OPTION_VENDOR_ID 0x0AF0 -#define HUAWEI_VENDOR_ID 0x12D1 -#define AUDIOVOX_VENDOR_ID 0x0F3D -#define NOVATELWIRELESS_VENDOR_ID 0x1410 -#define ANYDATA_VENDOR_ID 0x16d5 - -#define OPTION_PRODUCT_OLD 0x5000 -#define OPTION_PRODUCT_FUSION 0x6000 -#define OPTION_PRODUCT_FUSION2 0x6300 -#define OPTION_PRODUCT_COBRA 0x6500 -#define OPTION_PRODUCT_COBRA2 0x6600 -#define HUAWEI_PRODUCT_E600 0x1001 -#define AUDIOVOX_PRODUCT_AIRCARD 0x0112 -#define NOVATELWIRELESS_PRODUCT_U740 0x1400 -#define ANYDATA_PRODUCT_ID 0x6501 +#define OPTION_VENDOR_ID 0x0AF0 +#define HUAWEI_VENDOR_ID 0x12D1 +#define AUDIOVOX_VENDOR_ID 0x0F3D -static struct usb_device_id option_ids[] = { - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_OLD) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) }, - { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, - { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, - { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, - { } /* Terminating entry */ -}; +#define OPTION_PRODUCT_OLD 0x5000 +#define OPTION_PRODUCT_FUSION 0x6000 +#define OPTION_PRODUCT_FUSION2 0x6300 +#define HUAWEI_PRODUCT_E600 0x1001 +#define AUDIOVOX_PRODUCT_AIRCARD 0x0112 -static struct usb_device_id option_ids1[] = { +static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_OLD) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_FUSION2) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) }, - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, - { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ }; @@ -122,18 +106,17 @@ static struct usb_driver option_driver = { /* The card has three separate interfaces, which the serial driver * recognizes separately, thus num_port=1. */ - -static struct usb_serial_driver option_1port_device = { +static struct usb_serial_driver option_3port_device = { .driver = { .owner = THIS_MODULE, - .name = "option1", + .name = "option", }, - .description = "GSM modem (1-port)", - .id_table = option_ids1, + .description = "Option 3G data card", + .id_table = option_ids, .num_interrupt_in = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE, - .num_ports = 1, + .num_ports = 1, /* 3, but the card reports its ports separately */ .open = option_open, .close = option_close, .write = option_write, @@ -187,9 +170,9 @@ struct option_port_private { static int __init option_init(void) { int retval; - retval = usb_serial_register(&option_1port_device); + retval = usb_serial_register(&option_3port_device); if (retval) - goto failed_1port_device_register; + goto failed_3port_device_register; retval = usb_register(&option_driver); if (retval) goto failed_driver_register; @@ -199,15 +182,15 @@ static int __init option_init(void) return 0; failed_driver_register: - usb_serial_deregister (&option_1port_device); -failed_1port_device_register: + usb_serial_deregister (&option_3port_device); +failed_3port_device_register: return retval; } static void __exit option_exit(void) { usb_deregister (&option_driver); - usb_serial_deregister (&option_1port_device); + usb_serial_deregister (&option_3port_device); } module_init(option_init); @@ -382,7 +365,8 @@ static void option_outdat_callback(struct urb *urb, struct pt_regs *regs) port = (struct usb_serial_port *) urb->context; - usb_serial_port_softint(port); + if (port->open_count) + schedule_work(&port->work); } static void option_instat_callback(struct urb *urb, struct pt_regs *regs) @@ -589,29 +573,27 @@ static struct urb *option_setup_urb(struct usb_serial *serial, int endpoint, /* Setup urbs */ static void option_setup_urbs(struct usb_serial *serial) { - int i,j; + int j; struct usb_serial_port *port; struct option_port_private *portdata; dbg("%s", __FUNCTION__); - for (i = 0; i < serial->num_ports; i++) { - port = serial->port[i]; - portdata = usb_get_serial_port_data(port); + port = serial->port[0]; + portdata = usb_get_serial_port_data(port); /* Do indat endpoints first */ - for (j = 0; j < N_IN_URB; ++j) { - portdata->in_urbs[j] = option_setup_urb (serial, - port->bulk_in_endpointAddress, USB_DIR_IN, port, - portdata->in_buffer[j], IN_BUFLEN, option_indat_callback); - } + for (j = 0; j < N_IN_URB; ++j) { + portdata->in_urbs[j] = option_setup_urb (serial, + port->bulk_in_endpointAddress, USB_DIR_IN, port, + portdata->in_buffer[j], IN_BUFLEN, option_indat_callback); + } - /* outdat endpoints */ - for (j = 0; j < N_OUT_URB; ++j) { - portdata->out_urbs[j] = option_setup_urb (serial, - port->bulk_out_endpointAddress, USB_DIR_OUT, port, - portdata->out_buffer[j], OUT_BUFLEN, option_outdat_callback); - } + /* outdat endpoints */ + for (j = 0; j < N_OUT_URB; ++j) { + portdata->out_urbs[j] = option_setup_urb (serial, + port->bulk_out_endpointAddress, USB_DIR_OUT, port, + portdata->out_buffer[j], OUT_BUFLEN, option_outdat_callback); } } diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 65e4d0469..c96714bb1 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -14,6 +14,7 @@ * */ +#include #include #include #include @@ -27,7 +28,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "pl2303.h" /* @@ -52,7 +53,6 @@ struct pl2303_buf { static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, - { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, @@ -79,8 +79,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(SAGEM_VENDOR_ID, SAGEM_PRODUCT_ID) }, { USB_DEVICE(LEADTEK_VENDOR_ID, LEADTEK_9531_PRODUCT_ID) }, { USB_DEVICE(SPEEDDRAGON_VENDOR_ID, SPEEDDRAGON_PRODUCT_ID) }, - { USB_DEVICE(DATAPILOT_U2_VENDOR_ID, DATAPILOT_U2_PRODUCT_ID) }, - { USB_DEVICE(BELKIN_VENDOR_ID, BELKIN_PRODUCT_ID) }, + { USB_DEVICE(OTI_VENDOR_ID, OTI_PRODUCT_ID) }, { } /* Terminating entry */ }; @@ -315,7 +314,7 @@ static void pl2303_send(struct usb_serial_port *port) // TODO: reschedule pl2303_send } - usb_serial_port_softint(port); + schedule_work(&port->work); } static int pl2303_write_room(struct usb_serial_port *port) @@ -601,7 +600,7 @@ static void pl2303_close (struct usb_serial_port *port, struct file *filp) unsigned int c_cflag; int bps; long timeout; - wait_queue_t wait; + wait_queue_t wait; \ dbg("%s - port %d", __FUNCTION__, port->number); diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 55195e76e..7f29e81d3 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h @@ -10,7 +10,6 @@ #define PL2303_VENDOR_ID 0x067b #define PL2303_PRODUCT_ID 0x2303 #define PL2303_PRODUCT_ID_RSAQ2 0x04bb -#define PL2303_PRODUCT_ID_DCU11 0x1234 #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 @@ -82,10 +81,6 @@ #define SPEEDDRAGON_VENDOR_ID 0x0e55 #define SPEEDDRAGON_PRODUCT_ID 0x110b -/* DATAPILOT Universal-2 Phone Cable */ -#define DATAPILOT_U2_VENDOR_ID 0x0731 -#define DATAPILOT_U2_PRODUCT_ID 0x2003 - -/* Belkin "F5U257" Serial Adapter */ -#define BELKIN_VENDOR_ID 0x050d -#define BELKIN_PRODUCT_ID 0x0257 +/* Ours Technology Inc DKU-5 clone, chipset: Prolific Technology Inc */ +#define OTI_VENDOR_ID 0x0ea0 +#define OTI_PRODUCT_ID 0x6858 diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 1e07dfad6..f0215f850 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -60,6 +60,7 @@ */ +#include #include #include #include @@ -71,7 +72,7 @@ #include #include #include -#include +#include "usb-serial.h" #ifndef CONFIG_USB_SAFE_PADDED @@ -298,14 +299,14 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i dbg ("%s - write request of 0 bytes", __FUNCTION__); return (0); } - spin_lock_bh(&port->lock); + spin_lock(&port->lock); if (port->write_urb_busy) { - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); dbg("%s - already writing", __FUNCTION__); return 0; } port->write_urb_busy = 1; - spin_unlock_bh(&port->lock); + spin_unlock(&port->lock); packet_length = port->bulk_out_size; // get max packetsize diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c deleted file mode 100644 index d29638daa..000000000 --- a/drivers/usb/serial/sierra.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Sierra Wireless CDMA Wireless Serial USB driver - * - * Current Copy modified by: Kevin Lloyd - * Original Copyright (C) 2005-2006 Greg Kroah-Hartman - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version - * 2 as published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include - -static struct usb_device_id id_table [] = { - { USB_DEVICE(0x1199, 0x0018) }, /* Sierra Wireless MC5720 */ - { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0017) }, /* Sierra Wireless EM5625 */ - { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ - { USB_DEVICE(0x1199, 0x6802) }, /* Sierra Wireless MC8755 */ - { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ - { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 */ - { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ - /* Following devices are supported in the airprime.c driver */ - /* { USB_DEVICE(0x1199, 0x0112) }, */ /* Sierra Wireless AirCard 580 */ - /* { USB_DEVICE(0x0F3D, 0x0112) }, */ /* AirPrime/Sierra PC 5220 */ - { } -}; -MODULE_DEVICE_TABLE(usb, id_table); - -static struct usb_driver sierra_driver = { - .name = "sierra_wireless", - .probe = usb_serial_probe, - .disconnect = usb_serial_disconnect, - .id_table = id_table, -}; - -static struct usb_serial_driver sierra_device = { - .driver = { - .owner = THIS_MODULE, - .name = "Sierra_Wireless", - }, - .id_table = id_table, - .num_interrupt_in = NUM_DONT_CARE, - .num_bulk_in = NUM_DONT_CARE, - .num_bulk_out = NUM_DONT_CARE, - .num_ports = 3, -}; - -static int __init sierra_init(void) -{ - int retval; - - retval = usb_serial_register(&sierra_device); - if (retval) - return retval; - retval = usb_register(&sierra_driver); - if (retval) - usb_serial_deregister(&sierra_device); - return retval; -} - -static void __exit sierra_exit(void) -{ - usb_deregister(&sierra_driver); - usb_serial_deregister(&sierra_device); -} - -module_init(sierra_init); -module_exit(sierra_exit); -MODULE_LICENSE("GPL"); diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index ac9b8ee52..c3a2071b8 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -68,6 +68,7 @@ * fi */ +#include #include #include #include @@ -83,8 +84,8 @@ #include #include #include -#include +#include "usb-serial.h" #include "ti_usb_3410_5052.h" #include "ti_fw_3410.h" /* firmware image for 3410 */ #include "ti_fw_5052.h" /* firmware image for 5052 */ diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e06a41bd0..9c36f0ece 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -16,6 +16,7 @@ * */ +#include #include #include #include @@ -31,7 +32,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "pl2303.h" /* @@ -40,8 +41,6 @@ #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/" #define DRIVER_DESC "USB Serial Driver core" -static void port_free(struct usb_serial_port *port); - /* Driver structure we register with the USB core */ static struct usb_driver usb_serial_driver = { .name = "usbserial", @@ -148,7 +147,18 @@ static void destroy_serial(struct kref *kref) port = serial->port[i]; if (!port) continue; - port_free(port); + usb_kill_urb(port->read_urb); + usb_free_urb(port->read_urb); + usb_kill_urb(port->write_urb); + usb_free_urb(port->write_urb); + usb_kill_urb(port->interrupt_in_urb); + usb_free_urb(port->interrupt_in_urb); + usb_kill_urb(port->interrupt_out_urb); + usb_free_urb(port->interrupt_out_urb); + kfree(port->bulk_in_buffer); + kfree(port->bulk_out_buffer); + kfree(port->interrupt_in_buffer); + kfree(port->interrupt_out_buffer); } } @@ -158,11 +168,6 @@ static void destroy_serial(struct kref *kref) kfree (serial); } -void usb_serial_put(struct usb_serial *serial) -{ - kref_put(&serial->kref, destroy_serial); -} - /***************************************************************************** * Driver tty interface functions *****************************************************************************/ @@ -196,13 +201,13 @@ static int serial_open (struct tty_struct *tty, struct file * filp) ++port->open_count; - /* set up our port structure making the tty driver - * remember our port object, and us it */ - tty->driver_data = port; - port->tty = tty; - if (port->open_count == 1) { + /* set up our port structure making the tty driver + * remember our port object, and us it */ + tty->driver_data = port; + port->tty = tty; + /* lock this module before we call it * this may fail, which means we must bail out, * safe because we are called with BKL held */ @@ -225,11 +230,9 @@ bailout_module_put: module_put(serial->type->driver.owner); bailout_mutex_unlock: port->open_count = 0; - tty->driver_data = NULL; - port->tty = NULL; mutex_unlock(&port->mutex); bailout_kref_put: - usb_serial_put(serial); + kref_put(&serial->kref, destroy_serial); return retval; } @@ -265,7 +268,7 @@ static void serial_close(struct tty_struct *tty, struct file * filp) } mutex_unlock(&port->mutex); - usb_serial_put(port->serial); + kref_put(&port->serial->kref, destroy_serial); } static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) @@ -273,7 +276,7 @@ static int serial_write (struct tty_struct * tty, const unsigned char *buf, int struct usb_serial_port *port = tty->driver_data; int retval = -EINVAL; - if (!port || port->serial->dev->state == USB_STATE_NOTATTACHED) + if (!port) goto exit; dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); @@ -293,7 +296,7 @@ exit: static int serial_write_room (struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - int retval = -ENODEV; + int retval = -EINVAL; if (!port) goto exit; @@ -315,7 +318,7 @@ exit: static int serial_chars_in_buffer (struct tty_struct *tty) { struct usb_serial_port *port = tty->driver_data; - int retval = -ENODEV; + int retval = -EINVAL; if (!port) goto exit; @@ -464,15 +467,13 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int length += sprintf (page+length, " path:%s", tmp); length += sprintf (page+length, "\n"); - if ((length + begin) > (off + count)) { - usb_serial_put(serial); + if ((length + begin) > (off + count)) goto done; - } if ((length + begin) < off) { begin += length; length = 0; } - usb_serial_put(serial); + kref_put(&serial->kref, destroy_serial); } *eof = 1; done: @@ -487,18 +488,19 @@ static int serial_tiocmget (struct tty_struct *tty, struct file *file) struct usb_serial_port *port = tty->driver_data; if (!port) - return -ENODEV; + goto exit; dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { dbg("%s - port not open", __FUNCTION__); - return -ENODEV; + goto exit; } if (port->serial->type->tiocmget) return port->serial->type->tiocmget(port, file); +exit: return -EINVAL; } @@ -508,32 +510,23 @@ static int serial_tiocmset (struct tty_struct *tty, struct file *file, struct usb_serial_port *port = tty->driver_data; if (!port) - return -ENODEV; + goto exit; dbg("%s - port %d", __FUNCTION__, port->number); if (!port->open_count) { dbg("%s - port not open", __FUNCTION__); - return -ENODEV; + goto exit; } if (port->serial->type->tiocmset) return port->serial->type->tiocmset(port, file, set, clear); +exit: return -EINVAL; } -/* - * We would be calling tty_wakeup here, but unfortunately some line - * disciplines have an annoying habit of calling tty->write from - * the write wakeup callback (e.g. n_hdlc.c). - */ -void usb_serial_port_softint(struct usb_serial_port *port) -{ - schedule_work(&port->work); -} - -static void usb_serial_port_work(void *private) +void usb_serial_port_softint(void *private) { struct usb_serial_port *port = private; struct tty_struct *tty; @@ -555,11 +548,6 @@ static void port_release(struct device *dev) struct usb_serial_port *port = to_usb_serial_port(dev); dbg ("%s - %s", __FUNCTION__, dev->bus_id); - port_free(port); -} - -static void port_free(struct usb_serial_port *port) -{ usb_kill_urb(port->read_urb); usb_free_urb(port->read_urb); usb_kill_urb(port->write_urb); @@ -572,7 +560,6 @@ static void port_free(struct usb_serial_port *port) kfree(port->bulk_out_buffer); kfree(port->interrupt_in_buffer); kfree(port->interrupt_out_buffer); - flush_scheduled_work(); /* port->work */ kfree(port); } @@ -802,7 +789,7 @@ int usb_serial_probe(struct usb_interface *interface, port->serial = serial; spin_lock_init(&port->lock); mutex_init(&port->mutex); - INIT_WORK(&port->work, usb_serial_port_work, port); + INIT_WORK(&port->work, usb_serial_port_softint, port); serial->port[i] = port; } @@ -998,7 +985,6 @@ void usb_serial_disconnect(struct usb_interface *interface) struct device *dev = &interface->dev; struct usb_serial_port *port; - usb_serial_console_disconnect(serial); dbg ("%s", __FUNCTION__); usb_set_intfdata (interface, NULL); @@ -1010,7 +996,7 @@ void usb_serial_disconnect(struct usb_interface *interface) } /* let the last holder of this object * cause it to be cleaned up */ - usb_serial_put(serial); + kref_put(&serial->kref, destroy_serial); } dev_info(dev, "device disconnected\n"); } @@ -1055,12 +1041,13 @@ static int __init usb_serial_init(void) usb_serial_tty_driver->owner = THIS_MODULE; usb_serial_tty_driver->driver_name = "usbserial"; + usb_serial_tty_driver->devfs_name = "usb/tts/"; usb_serial_tty_driver->name = "ttyUSB"; usb_serial_tty_driver->major = SERIAL_TTY_MAJOR; usb_serial_tty_driver->minor_start = 0; usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL; - usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; usb_serial_tty_driver->init_termios = tty_std_termios; usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; tty_set_operations(usb_serial_tty_driver, &serial_ops); diff --git a/include/linux/usb/serial.h b/drivers/usb/serial/usb-serial.h similarity index 97% rename from include/linux/usb/serial.h rename to drivers/usb/serial/usb-serial.h index 91c983eef..dc89d8710 100644 --- a/include/linux/usb/serial.h +++ b/drivers/usb/serial/usb-serial.h @@ -1,12 +1,12 @@ /* - * USB Serial Converter stuff + * USB Serial Converter driver * * Copyright (C) 1999 - 2005 * Greg Kroah-Hartman (greg@kroah.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; version 2 of the License. + * the Free Software Foundation; either version 2 of the License. * */ @@ -14,6 +14,7 @@ #ifndef __LINUX_USB_SERIAL_H #define __LINUX_USB_SERIAL_H +#include #include #include @@ -171,7 +172,7 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) * but before the device has been fully initialized by the usb_serial * subsystem. Use this function to download any firmware to the device, * or any other early initialization that might be needed. - * Return 0 to continue on with the initialization sequence. Anything + * Return 0 to continue on with the initialization sequence. Anything * else will abort it. * @attach: pointer to the driver's attach function. * This will be called when the struct usb_serial structure is fully set @@ -235,7 +236,7 @@ struct usb_serial_driver { extern int usb_serial_register(struct usb_serial_driver *driver); extern void usb_serial_deregister(struct usb_serial_driver *driver); -extern void usb_serial_port_softint(struct usb_serial_port *port); +extern void usb_serial_port_softint(void *private); extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); extern void usb_serial_disconnect(struct usb_interface *iface); @@ -247,16 +248,13 @@ extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit); #ifdef CONFIG_USB_SERIAL_CONSOLE extern void usb_serial_console_init (int debug, int minor); extern void usb_serial_console_exit (void); -extern void usb_serial_console_disconnect(struct usb_serial *serial); #else static inline void usb_serial_console_init (int debug, int minor) { } static inline void usb_serial_console_exit (void) { } -static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} #endif /* Functions needed by other parts of the usbserial core */ extern struct usb_serial *usb_serial_get_by_index (unsigned int minor); -extern void usb_serial_put(struct usb_serial *serial); extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp); extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count); extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp); diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 88949f788..f5c3841d4 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -25,7 +26,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "visor.h" /* @@ -302,6 +303,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp) spin_lock_irqsave(&priv->lock, flags); priv->bytes_in = 0; priv->bytes_out = 0; + priv->outstanding_urbs = 0; priv->throttled = 0; spin_unlock_irqrestore(&priv->lock, flags); @@ -434,25 +436,13 @@ static int visor_write (struct usb_serial_port *port, const unsigned char *buf, static int visor_write_room (struct usb_serial_port *port) { - struct visor_private *priv = usb_get_serial_port_data(port); - unsigned long flags; - dbg("%s - port %d", __FUNCTION__, port->number); /* * We really can take anything the user throws at us * but let's pick a nice big number to tell the tty - * layer that we have lots of free space, unless we don't. + * layer that we have lots of free space */ - - spin_lock_irqsave(&priv->lock, flags); - if (priv->outstanding_urbs > URB_UPPER_LIMIT * 2 / 3) { - spin_unlock_irqrestore(&priv->lock, flags); - dbg("%s - write limit hit\n", __FUNCTION__); - return 0; - } - spin_unlock_irqrestore(&priv->lock, flags); - return 2048; } @@ -490,7 +480,7 @@ static void visor_write_bulk_callback (struct urb *urb, struct pt_regs *regs) --priv->outstanding_urbs; spin_unlock_irqrestore(&priv->lock, flags); - usb_serial_port_softint(port); + schedule_work(&port->work); } @@ -769,22 +759,15 @@ static int visor_calc_num_ports (struct usb_serial *serial) static int generic_startup(struct usb_serial *serial) { - struct usb_serial_port **ports = serial->port; struct visor_private *priv; int i; for (i = 0; i < serial->num_ports; ++i) { priv = kzalloc (sizeof(*priv), GFP_KERNEL); - if (!priv) { - while (i-- != 0) { - priv = usb_get_serial_port_data(ports[i]); - usb_set_serial_port_data(ports[i], NULL); - kfree(priv); - } + if (!priv) return -ENOMEM; - } spin_lock_init(&priv->lock); - usb_set_serial_port_data(ports[i], priv); + usb_set_serial_port_data(serial->port[i], priv); } return 0; } @@ -894,18 +877,7 @@ static int clie_5_attach (struct usb_serial *serial) static void visor_shutdown (struct usb_serial *serial) { - struct visor_private *priv; - int i; - dbg("%s", __FUNCTION__); - - for (i = 0; i < serial->num_ports; i++) { - priv = usb_get_serial_port_data(serial->port[i]); - if (priv) { - usb_set_serial_port_data(serial->port[i], NULL); - kfree(priv); - } - } } static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 6e6c7934b..3ced09ca1 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -65,6 +65,7 @@ * */ +#include #include #include #include @@ -79,7 +80,7 @@ #include #include #include -#include +#include "usb-serial.h" #include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */ #include "whiteheat.h" /* WhiteHEAT specific commands */ @@ -685,16 +686,19 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp) wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); urb = wrap->urb; usb_kill_urb(urb); - list_move(tmp, &info->rx_urbs_free); + list_del(tmp); + list_add(tmp, &info->rx_urbs_free); + } + list_for_each_safe(tmp, tmp2, &info->rx_urb_q) { + list_del(tmp); + list_add(tmp, &info->rx_urbs_free); } - list_for_each_safe(tmp, tmp2, &info->rx_urb_q) - list_move(tmp, &info->rx_urbs_free); - list_for_each_safe(tmp, tmp2, &info->tx_urbs_submitted) { wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); urb = wrap->urb; usb_kill_urb(urb); - list_move(tmp, &info->tx_urbs_free); + list_del(tmp); + list_add(tmp, &info->tx_urbs_free); } spin_unlock_irqrestore(&info->lock, flags); @@ -1076,7 +1080,8 @@ static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs) err("%s - Not my urb!", __FUNCTION__); return; } - list_move(&wrap->list, &info->tx_urbs_free); + list_del(&wrap->list); + list_add(&wrap->list, &info->tx_urbs_free); spin_unlock(&info->lock); if (urb->status) { @@ -1084,7 +1089,9 @@ static void whiteheat_write_callback(struct urb *urb, struct pt_regs *regs) return; } - usb_serial_port_softint(port); + usb_serial_port_softint((void *)port); + + schedule_work(&port->work); } @@ -1366,7 +1373,8 @@ static int start_port_read(struct usb_serial_port *port) wrap = list_entry(tmp, struct whiteheat_urb_wrap, list); urb = wrap->urb; usb_kill_urb(urb); - list_move(tmp, &info->rx_urbs_free); + list_del(tmp); + list_add(tmp, &info->rx_urbs_free); } break; } diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h index 77e244a8c..cd2096acc 100644 --- a/drivers/usb/storage/debug.h +++ b/drivers/usb/storage/debug.h @@ -44,6 +44,7 @@ #ifndef _DEBUG_H_ #define _DEBUG_H_ +#include #include #define USB_STORAGE "usb-storage: " diff --git a/drivers/usb/storage/dpcm.c b/drivers/usb/storage/dpcm.c index 1628cb258..92b69e4c8 100644 --- a/drivers/usb/storage/dpcm.c +++ b/drivers/usb/storage/dpcm.c @@ -29,6 +29,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 88aa59ab7..30e96050f 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c @@ -28,6 +28,7 @@ * (http://www.freecom.de/) */ +#include #include #include diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h index 927f77810..f9907a5cf 100644 --- a/drivers/usb/storage/initializers.h +++ b/drivers/usb/storage/initializers.h @@ -37,6 +37,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "usb.h" #include "transport.h" diff --git a/drivers/usb/storage/libusual.c b/drivers/usb/storage/libusual.c index 38faca734..b1ec4a718 100644 --- a/drivers/usb/storage/libusual.c +++ b/drivers/usb/storage/libusual.c @@ -5,7 +5,6 @@ */ #include #include -#include #include #include #include @@ -14,7 +13,6 @@ */ #define USU_MOD_FL_THREAD 1 /* Thread is running */ #define USU_MOD_FL_PRESENT 2 /* The module is loaded */ -#define USU_MOD_FL_FAILED 4 /* The module failed to load */ struct mod_status { unsigned long fls; @@ -35,12 +33,8 @@ static DECLARE_MUTEX_LOCKED(usu_init_notify); static DECLARE_COMPLETION(usu_end_notify); static atomic_t total_threads = ATOMIC_INIT(0); -static int usu_kick(unsigned long type); static int usu_probe_thread(void *arg); -static struct class *usu_class; -static struct class_device *usu_class_device; - /* * The table. */ @@ -117,44 +111,18 @@ int usb_usual_check_type(const struct usb_device_id *id, int caller_type) } EXPORT_SYMBOL_GPL(usb_usual_check_type); -/* - */ -static int usu_uevent(struct class_device *class_dev, - char **envp, int num_envp, char *buffer, int buffer_size) -{ - unsigned long flags; - int i; - - for (i = 1; i < 3; i++) { - spin_lock_irqsave(&usu_lock, flags); - if (stat[i].fls & USU_MOD_FL_FAILED) { - stat[i].fls &= ~USU_MOD_FL_FAILED; - spin_unlock_irqrestore(&usu_lock, flags); - usu_kick(i); - } else { - spin_unlock_irqrestore(&usu_lock, flags); - } - } - return 0; -} - /* */ static int usu_probe(struct usb_interface *intf, const struct usb_device_id *id) { unsigned long type; + int rc; + unsigned long flags; type = USB_US_TYPE(id->driver_info); if (type == 0) type = atomic_read(&usu_bias); - return usu_kick(type); -} - -static int usu_kick(unsigned long type) -{ - int rc; - unsigned long flags; spin_lock_irqsave(&usu_lock, flags); if ((stat[type].fls & (USU_MOD_FL_THREAD|USU_MOD_FL_PRESENT)) != 0) { @@ -218,14 +186,10 @@ static int usu_probe_thread(void *arg) if (rc == 0 && (st->fls & USU_MOD_FL_PRESENT) == 0) { /* * This should not happen, but let us keep tabs on it. - * One common source of this a user who builds USB statically, - * then uses initrd, and has a USB device. When static devices - * are probed, request_module() calls a fake modprobe and fails. */ printk(KERN_NOTICE "libusual: " - "request for %s succeeded, but module is not present\n", + "modprobe for %s succeeded, but module is not present\n", bias_names[type]); - st->fls |= USU_MOD_FL_FAILED; } st->fls &= ~USU_MOD_FL_THREAD; spin_unlock_irqrestore(&usu_lock, flags); @@ -239,27 +203,9 @@ static int __init usb_usual_init(void) { int rc; - usu_class = class_create(THIS_MODULE, "libusual"); - if (IS_ERR(usu_class)) { - rc = PTR_ERR(usu_class_device); - goto err_class; - } - usu_class_device = class_device_create(usu_class, NULL, 0, NULL, "0"); - if (IS_ERR(usu_class_device)) { - rc = PTR_ERR(usu_class_device); - goto err_classdev; - } - usu_class_device->uevent = usu_uevent; - rc = usb_register(&usu_driver); up(&usu_init_notify); return rc; - - // class_device_destroy(usu_class, 0); -err_classdev: - class_destroy(usu_class); -err_class: - return rc; } static void __exit usb_usual_exit(void) @@ -275,9 +221,6 @@ static void __exit usb_usual_exit(void) wait_for_completion(&usu_end_notify); atomic_dec(&total_threads); } - - class_device_destroy(usu_class, 0); - class_destroy(usu_class); } /* diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c index 313920d98..55ee2d36d 100644 --- a/drivers/usb/storage/onetouch.c +++ b/drivers/usb/storage/onetouch.c @@ -28,13 +28,15 @@ * */ +#include #include #include #include #include #include +#include #include -#include +#include #include "usb.h" #include "onetouch.h" #include "debug.h" diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index a4b7df9ff..5f11e19ea 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -112,11 +112,13 @@ static int slave_configure(struct scsi_device *sdev) if (sdev->scsi_level < SCSI_2) sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; - /* Many devices have trouble transfering more than 32KB at a time, - * while others have trouble with more than 64K. At this time we - * are limiting both to 32K (64 sectores). - */ - if ((us->flags & US_FL_MAX_SECTORS_64) && + /* According to the technical support people at Genesys Logic, + * devices using their chips have problems transferring more than + * 32 KB at a time. In practice people have found that 64 KB + * works okay and that's what Windows does. But we'll be + * conservative; people can always use the sysfs interface to + * increase max_sectors. */ + if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS && sdev->request_queue->max_sectors > 64) blk_queue_max_sectors(sdev->request_queue, 64); @@ -284,7 +286,11 @@ static int bus_reset(struct scsi_cmnd *srb) int result; US_DEBUGP("%s called\n", __FUNCTION__); + + mutex_lock(&(us->dev_mutex)); result = usb_stor_port_reset(us); + mutex_unlock(&us->dev_mutex); + return result < 0 ? FAILED : SUCCESS; } diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index 8fcec01dc..f2bc5c9e2 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -131,30 +131,28 @@ static int usbat_write(struct us_data *us, * Convenience function to perform a bulk read */ static int usbat_bulk_read(struct us_data *us, - unsigned char *data, - unsigned int len, - int use_sg) + unsigned char *data, + unsigned int len) { if (len == 0) return USB_STOR_XFER_GOOD; US_DEBUGP("usbat_bulk_read: len = %d\n", len); - return usb_stor_bulk_transfer_sg(us, us->recv_bulk_pipe, data, len, use_sg, NULL); + return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, data, len, NULL); } /* * Convenience function to perform a bulk write */ static int usbat_bulk_write(struct us_data *us, - unsigned char *data, - unsigned int len, - int use_sg) + unsigned char *data, + unsigned int len) { if (len == 0) return USB_STOR_XFER_GOOD; US_DEBUGP("usbat_bulk_write: len = %d\n", len); - return usb_stor_bulk_transfer_sg(us, us->send_bulk_pipe, data, len, use_sg, NULL); + return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, data, len, NULL); } /* @@ -319,8 +317,7 @@ static int usbat_wait_not_busy(struct us_data *us, int minutes) */ static int usbat_read_block(struct us_data *us, unsigned char *content, - unsigned short len, - int use_sg) + unsigned short len) { int result; unsigned char *command = us->iobuf; @@ -341,7 +338,7 @@ static int usbat_read_block(struct us_data *us, if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_ERROR; - result = usbat_bulk_read(us, content, len, use_sg); + result = usbat_bulk_read(us, content, len); return (result == USB_STOR_XFER_GOOD ? USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR); } @@ -353,8 +350,7 @@ static int usbat_write_block(struct us_data *us, unsigned char access, unsigned char *content, unsigned short len, - int minutes, - int use_sg) + int minutes) { int result; unsigned char *command = us->iobuf; @@ -376,7 +372,7 @@ static int usbat_write_block(struct us_data *us, if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_ERROR; - result = usbat_bulk_write(us, content, len, use_sg); + result = usbat_bulk_write(us, content, len); if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_ERROR; @@ -469,7 +465,7 @@ static int usbat_hp8200e_rw_block_test(struct us_data *us, data[1+(j<<1)] = data_out[j]; } - result = usbat_bulk_write(us, data, num_registers*2, 0); + result = usbat_bulk_write(us, data, num_registers*2); if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_ERROR; @@ -587,7 +583,7 @@ static int usbat_multiple_write(struct us_data *us, } /* Send the data */ - result = usbat_bulk_write(us, data, num_registers*2, 0); + result = usbat_bulk_write(us, data, num_registers*2); if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_ERROR; @@ -610,9 +606,8 @@ static int usbat_multiple_write(struct us_data *us, * other related details) are defined beforehand with _set_shuttle_features(). */ static int usbat_read_blocks(struct us_data *us, - unsigned char *buffer, - int len, - int use_sg) + unsigned char *buffer, + int len) { int result; unsigned char *command = us->iobuf; @@ -632,7 +627,7 @@ static int usbat_read_blocks(struct us_data *us, return USB_STOR_TRANSPORT_FAILED; /* Read the blocks we just asked for */ - result = usbat_bulk_read(us, buffer, len, use_sg); + result = usbat_bulk_read(us, buffer, len); if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_FAILED; @@ -653,8 +648,7 @@ static int usbat_read_blocks(struct us_data *us, */ static int usbat_write_blocks(struct us_data *us, unsigned char *buffer, - int len, - int use_sg) + int len) { int result; unsigned char *command = us->iobuf; @@ -674,7 +668,7 @@ static int usbat_write_blocks(struct us_data *us, return USB_STOR_TRANSPORT_FAILED; /* Write the data */ - result = usbat_bulk_write(us, buffer, len, use_sg); + result = usbat_bulk_write(us, buffer, len); if (result != USB_STOR_XFER_GOOD) return USB_STOR_TRANSPORT_FAILED; @@ -893,28 +887,22 @@ static int usbat_identify_device(struct us_data *us, * Set the transport function based on the device type */ static int usbat_set_transport(struct us_data *us, - struct usbat_info *info, - int devicetype) + struct usbat_info *info) { + int rc; - if (!info->devicetype) - info->devicetype = devicetype; - - if (!info->devicetype) - usbat_identify_device(us, info); - - switch (info->devicetype) { - default: - return USB_STOR_TRANSPORT_ERROR; + if (!info->devicetype) { + rc = usbat_identify_device(us, info); + if (rc != USB_STOR_TRANSPORT_GOOD) { + US_DEBUGP("usbat_set_transport: Could not identify device\n"); + return 1; + } + } - case USBAT_DEV_HP8200: + if (usbat_get_device_type(us) == USBAT_DEV_HP8200) us->transport = usbat_hp8200e_transport; - break; - - case USBAT_DEV_FLASH: + else if (usbat_get_device_type(us) == USBAT_DEV_FLASH) us->transport = usbat_flash_transport; - break; - } return 0; } @@ -959,7 +947,7 @@ static int usbat_flash_get_sector_count(struct us_data *us, msleep(100); /* Read the device identification data */ - rc = usbat_read_block(us, reply, 512, 0); + rc = usbat_read_block(us, reply, 512); if (rc != USB_STOR_TRANSPORT_GOOD) goto leave; @@ -1043,7 +1031,7 @@ static int usbat_flash_read_data(struct us_data *us, goto leave; /* Read the data we just requested */ - result = usbat_read_blocks(us, buffer, len, 0); + result = usbat_read_blocks(us, buffer, len); if (result != USB_STOR_TRANSPORT_GOOD) goto leave; @@ -1137,7 +1125,7 @@ static int usbat_flash_write_data(struct us_data *us, goto leave; /* Write the data */ - result = usbat_write_blocks(us, buffer, len, 0); + result = usbat_write_blocks(us, buffer, len); if (result != USB_STOR_TRANSPORT_GOOD) goto leave; @@ -1322,7 +1310,7 @@ static int usbat_select_and_test_registers(struct us_data *us) /* * Initialize the USBAT processor and the storage device */ -static int init_usbat(struct us_data *us, int devicetype) +int init_usbat(struct us_data *us) { int rc; struct usbat_info *info; @@ -1404,7 +1392,7 @@ static int init_usbat(struct us_data *us, int devicetype) US_DEBUGP("INIT 9\n"); /* At this point, we need to detect which device we are using */ - if (usbat_set_transport(us, info, devicetype)) + if (usbat_set_transport(us, info)) return USB_STOR_TRANSPORT_ERROR; US_DEBUGP("INIT 10\n"); @@ -1515,10 +1503,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) * AT SPEED 4 IS UNRELIABLE!!! */ - if ((result = usbat_write_block(us, + if ( (result = usbat_write_block(us, USBAT_ATA, srb->cmnd, 12, - (srb->cmnd[0]==GPCMD_BLANK ? 75 : 10), 0) != - USB_STOR_TRANSPORT_GOOD)) { + srb->cmnd[0]==GPCMD_BLANK ? 75 : 10)) != + USB_STOR_TRANSPORT_GOOD) { return result; } @@ -1545,7 +1533,7 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) len = *status; - result = usbat_read_block(us, srb->request_buffer, len, srb->use_sg); + result = usbat_read_block(us, srb->request_buffer, len); /* Debug-print the first 32 bytes of the transfer */ @@ -1707,22 +1695,6 @@ static int usbat_flash_transport(struct scsi_cmnd * srb, struct us_data *us) return USB_STOR_TRANSPORT_FAILED; } -int init_usbat_cd(struct us_data *us) -{ - return init_usbat(us, USBAT_DEV_HP8200); -} - - -int init_usbat_flash(struct us_data *us) -{ - return init_usbat(us, USBAT_DEV_FLASH); -} - -int init_usbat_probe(struct us_data *us) -{ - return init_usbat(us, 0); -} - /* * Default transport function. Attempts to detect which transport function * should be called, makes it the new default, and calls it. @@ -1736,8 +1708,9 @@ int usbat_transport(struct scsi_cmnd *srb, struct us_data *us) { struct usbat_info *info = (struct usbat_info*) (us->extra); - if (usbat_set_transport(us, info, 0)) + if (usbat_set_transport(us, info)) return USB_STOR_TRANSPORT_ERROR; return us->transport(srb, us); } + diff --git a/drivers/usb/storage/shuttle_usbat.h b/drivers/usb/storage/shuttle_usbat.h index 3ddf143a1..25e7d8b34 100644 --- a/drivers/usb/storage/shuttle_usbat.h +++ b/drivers/usb/storage/shuttle_usbat.h @@ -106,9 +106,7 @@ #define USBAT_FEAT_ET2 0x01 extern int usbat_transport(struct scsi_cmnd *srb, struct us_data *us); -extern int init_usbat_cd(struct us_data *us); -extern int init_usbat_flash(struct us_data *us); -extern int init_usbat_probe(struct us_data *us); +extern int init_usbat(struct us_data *us); struct usbat_info { int devicetype; diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index d6acc92a4..7ca896a34 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -45,6 +45,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -114,6 +115,19 @@ static void usb_stor_blocking_completion(struct urb *urb, struct pt_regs *regs) complete(urb_done_ptr); } + +/* This is the timeout handler which will cancel an URB when its timeout + * expires. + */ +static void timeout_handler(unsigned long us_) +{ + struct us_data *us = (struct us_data *) us_; + + if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->flags)) { + US_DEBUGP("Timeout -- cancelling URB\n"); + usb_unlink_urb(us->current_urb); + } +} /* This is the common part of the URB message submission code * @@ -124,7 +138,7 @@ static void usb_stor_blocking_completion(struct urb *urb, struct pt_regs *regs) static int usb_stor_msg_common(struct us_data *us, int timeout) { struct completion urb_done; - long timeleft; + struct timer_list to_timer; int status; /* don't submit URBs during abort/disconnect processing */ @@ -171,17 +185,22 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) } } + /* submit the timeout timer, if a timeout was requested */ + if (timeout > 0) { + init_timer(&to_timer); + to_timer.expires = jiffies + timeout; + to_timer.function = timeout_handler; + to_timer.data = (unsigned long) us; + add_timer(&to_timer); + } + /* wait for the completion of the URB */ - timeleft = wait_for_completion_interruptible_timeout( - &urb_done, timeout ? : MAX_SCHEDULE_TIMEOUT); - + wait_for_completion(&urb_done); clear_bit(US_FLIDX_URB_ACTIVE, &us->flags); - - if (timeleft <= 0) { - US_DEBUGP("%s -- cancelling URB\n", - timeleft == 0 ? "Timeout" : "Signal"); - usb_kill_urb(us->current_urb); - } + + /* clean up the timeout timer */ + if (timeout > 0) + del_timer_sync(&to_timer); /* return the URB status */ return us->current_urb->status; @@ -702,19 +721,16 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) * device reset. */ Handle_Errors: - /* Set the RESETTING bit, and clear the ABORTING bit so that - * the reset may proceed. */ + /* Let the SCSI layer know we are doing a reset, set the + * RESETTING bit, and clear the ABORTING bit so that the reset + * may proceed. */ scsi_lock(us_to_host(us)); + usb_stor_report_bus_reset(us); set_bit(US_FLIDX_RESETTING, &us->flags); clear_bit(US_FLIDX_ABORTING, &us->flags); scsi_unlock(us_to_host(us)); - /* We must release the device lock because the pre_reset routine - * will want to acquire it. */ - mutex_unlock(&us->dev_mutex); result = usb_stor_port_reset(us); - mutex_lock(&us->dev_mutex); - if (result < 0) { scsi_lock(us_to_host(us)); usb_stor_report_device_reset(us); @@ -1198,30 +1214,31 @@ int usb_stor_Bulk_reset(struct us_data *us) 0, us->ifnum, NULL, 0); } -/* Issue a USB port reset to the device. The caller must not hold - * us->dev_mutex. - */ +/* Issue a USB port reset to the device. But don't do anything if + * there's more than one interface in the device, so that other users + * are not affected. */ int usb_stor_port_reset(struct us_data *us) { - int result, rc_lock; + int result, rc; - result = rc_lock = - usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); - if (result < 0) - US_DEBUGP("unable to lock device for reset: %d\n", result); - else { - /* Were we disconnected while waiting for the lock? */ - if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { - result = -EIO; - US_DEBUGP("No reset during disconnect\n"); - } else { - result = usb_reset_composite_device( - us->pusb_dev, us->pusb_intf); - US_DEBUGP("usb_reset_composite_device returns %d\n", + if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { + result = -EIO; + US_DEBUGP("No reset during disconnect\n"); + } else if (us->pusb_dev->actconfig->desc.bNumInterfaces != 1) { + result = -EBUSY; + US_DEBUGP("Refusing to reset a multi-interface device\n"); + } else { + result = rc = + usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); + if (result < 0) { + US_DEBUGP("unable to lock device for reset: %d\n", result); + } else { + result = usb_reset_device(us->pusb_dev); + if (rc) + usb_unlock_device(us->pusb_dev); + US_DEBUGP("usb_reset_device returns %d\n", result); } - if (rc_lock) - usb_unlock_device(us->pusb_dev); } return result; } diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index b130e170b..a1a83029c 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -31,6 +31,7 @@ * the following thing for it to work: * The macro UNUSUAL_DEV() must be defined before this file is included */ +#include /* If you edit this file, please try to keep it sorted first by VendorID, * then by ProductID. @@ -77,12 +78,12 @@ UNUSUAL_DEV( 0x03f0, 0x0107, 0x0200, 0x0200, UNUSUAL_DEV( 0x03f0, 0x0207, 0x0001, 0x0001, "HP", "CD-Writer+ 8200e", - US_SC_8070, US_PR_USBAT, init_usbat_cd, 0), + US_SC_8070, US_PR_USBAT, init_usbat, 0), UNUSUAL_DEV( 0x03f0, 0x0307, 0x0001, 0x0001, "HP", "CD-Writer+ CD-4e", - US_SC_8070, US_PR_USBAT, init_usbat_cd, 0), + US_SC_8070, US_PR_USBAT, init_usbat, 0), #endif /* Reported by Sebastian Kapfer @@ -112,18 +113,11 @@ UNUSUAL_DEV( 0x0411, 0x001c, 0x0113, 0x0113, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), -/* Submitted by Ernestas Vaiciukevicius */ -UNUSUAL_DEV( 0x0419, 0x0100, 0x0100, 0x0100, - "Samsung Info. Systems America, Inc.", - "MP3 Player", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE ), - /* Reported by Orgad Shaneh */ UNUSUAL_DEV( 0x0419, 0xaace, 0x0100, 0x0100, "Samsung", "MP3 Player", US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE ), + US_FL_IGNORE_RESIDUE), /* Reported by Christian Leber */ UNUSUAL_DEV( 0x0419, 0xaaf5, 0x0100, 0x0100, @@ -145,36 +139,6 @@ UNUSUAL_DEV( 0x0420, 0x0001, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), -/* Reported by Mario Rettig */ -UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100, - "Nokia", - "Nokia 3250", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), - -/* Reported by Sumedha Swamy and - * Einar Th. Einarsson */ -UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, - "Nokia", - "N91", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), - -/* Reported by Jiri Slaby and - * Rene C. Castberg */ -UNUSUAL_DEV( 0x0421, 0x0446, 0x0100, 0x0100, - "Nokia", - "N80", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), - -/* Reported by Matthew Bloch */ -UNUSUAL_DEV( 0x0421, 0x044e, 0x0100, 0x0100, - "Nokia", - "E61", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), - /* Reported by Olaf Hering from novell bug #105878 */ UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210, "SMSC", @@ -241,6 +205,16 @@ UNUSUAL_DEV( 0x0482, 0x0103, 0x0100, 0x0100, "Finecam S5", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY), +/* Patch for Kyocera Finecam L3 + * Submitted by Michael Krauth + * and Alessandro Fracchetti + */ +UNUSUAL_DEV( 0x0482, 0x0105, 0x0100, 0x0100, + "Kyocera", + "Finecam L3", + US_SC_SCSI, US_PR_BULK, NULL, + US_FL_FIX_INQUIRY), + /* Reported by Paul Stewart * This entry is needed because the device reports Sub=ff */ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, @@ -248,14 +222,6 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, "DVD-CAM DZ-MV100A Camcorder", US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN), -/* Patch for Nikon coolpix 2000 - * Submitted by Fabien Cosse */ -UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, - "NIKON", - "NIKON DSC E2000", - US_SC_DEVICE, US_PR_DEVICE,NULL, - US_FL_NOT_LOCKABLE ), - /* Reported by Andreas Bockhold */ UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100, "NIKON", @@ -263,12 +229,13 @@ UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), -/* Reported by Jamie Kitson */ -UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100, +/* Patch for Nikon coolpix 2000 + * Submitted by Fabien Cosse */ +UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, "NIKON", - "NIKON DSC D70s", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY), + "NIKON DSC E2000", + US_SC_DEVICE, US_PR_DEVICE,NULL, + US_FL_NOT_LOCKABLE ), /* BENQ DC5330 * Reported by Manuel Fombuena and @@ -432,7 +399,7 @@ UNUSUAL_DEV( 0x04fc, 0x80c2, 0x0100, 0x0100, UNUSUAL_DEV( 0x04e6, 0x1010, 0x0000, 0x9999, "Shuttle/SCM", "USBAT-02", - US_SC_SCSI, US_PR_USBAT, init_usbat_flash, + US_SC_SCSI, US_PR_USBAT, init_usbat, US_FL_SINGLE_LUN), #endif @@ -498,11 +465,10 @@ UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, US_SC_SCSI, US_PR_DEVICE, NULL, US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), -/* Submitted by Lars Jacob - * This entry is needed because the device reports Sub=ff */ -UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, +/* This entry is needed because the device reports Sub=ff */ +UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0600, "Sony", - "DSC-T1/T5/H5", + "DSC-T1/T5", US_SC_8070, US_PR_DEVICE, NULL, US_FL_SINGLE_LUN ), @@ -589,13 +555,6 @@ UNUSUAL_DEV( 0x054c, 0x0099, 0x0000, 0x9999, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), -/* floppy reports multiple luns */ -UNUSUAL_DEV( 0x055d, 0x2020, 0x0000, 0x0210, - "SAMSUNG", - "SFD-321U [FW 0C]", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_SINGLE_LUN ), - UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, "Y-E Data", @@ -631,6 +590,18 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Digital Camera EX-20 DSC", US_SC_8070, US_PR_DEVICE, NULL, 0 ), +/* The entry was here before I took over, and had US_SC_RBC. It turns + * out that isn't needed. Additionally, Torsten Eriksson + * is able to use his device fine + * without this entry at all - but I don't suspect that will be true + * for all users (the protocol is likely needed), so is staying at + * this time. - Phil Dibowitz + */ +UNUSUAL_DEV( 0x059f, 0xa601, 0x0200, 0x0200, + "LaCie", + "USB Hard Disk", + US_SC_DEVICE, US_PR_CB, NULL, 0 ), + /* Submitted by Joel Bourquard * Some versions of this device need the SubClass and Protocol overrides * while others don't. @@ -729,22 +700,18 @@ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, * They were originally reported by Alexander Oltu * and Peter Marks * respectively. - * - * US_FL_GO_SLOW and US_FL_MAX_SECTORS_64 added by Phil Dibowitz - * as these flags were made and hard-coded - * special-cases were pulled from scsiglue.c. */ UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Optical", US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ), + US_FL_GO_SLOW ), UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff, "Genesys Logic", "USB to IDE Disk", US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ), + US_FL_GO_SLOW ), /* Reported by Hanno Boeck * Taken from the Lycoris Kernel */ @@ -836,7 +803,7 @@ UNUSUAL_DEV( 0x0781, 0x0002, 0x0009, 0x0009, UNUSUAL_DEV( 0x0781, 0x0005, 0x0005, 0x0005, "Sandisk", "ImageMate SDDR-05b", - US_SC_SCSI, US_PR_USBAT, init_usbat_flash, + US_SC_SCSI, US_PR_USBAT, init_usbat, US_FL_SINGLE_LUN ), #endif @@ -1098,15 +1065,7 @@ UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff, "Optio S/S4", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY ), - -/* This is a virtual windows driver CD, which the zd1211rw driver automatically - * converts into a WLAN device. */ -UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, - "ZyXEL", - "G-220F USB-WLAN Install", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_DEVICE ), - + #ifdef CONFIG_USB_STORAGE_ISD200 UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, "ATI", @@ -1229,24 +1188,6 @@ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), -/* Reported by Benjamin Schiller - * It is also sold by Easylite as DJ 20 */ -UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, - "Typhoon", - "My DJ 1820", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), - -/* David Kuehling : - * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI - * errors when trying to write. - */ -UNUSUAL_DEV( 0x0f19, 0x0105, 0x0100, 0x0100, - "C-MEX", - "A-VOX", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE ), - /* Reported by Michael Stattmann */ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, "Sony Ericsson", @@ -1254,18 +1195,11 @@ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NO_WP_DETECT ), -/* Reported by Emmanuel Vasilakis */ -UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, - "Sony Ericsson", - "M600i", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY ), - /* Reported by Kevin Cernekee * Tested on hardware version 1.10. * Entry is needed only for the initializer function override. */ -UNUSUAL_DEV( 0x1019, 0x0c55, 0x0110, 0x0110, +UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x9999, "Desknote", "UCR-61S2B", US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, @@ -1285,15 +1219,6 @@ UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), -/* patch submitted by Davide Perini - * and Renato Perini - */ -UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, - "Motorola", - "RAZR V3x", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), - /* Reported by Radovan Garabik */ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, "MPIO", diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 8d7bdcb59..0142fe82f 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -47,6 +47,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -55,7 +56,6 @@ #include #include #include -#include #include #include @@ -220,37 +220,6 @@ static int storage_resume(struct usb_interface *iface) #endif /* CONFIG_PM */ -/* - * The next two routines get called just before and just after - * a USB port reset, whether from this driver or a different one. - */ - -static void storage_pre_reset(struct usb_interface *iface) -{ - struct us_data *us = usb_get_intfdata(iface); - - US_DEBUGP("%s\n", __FUNCTION__); - - /* Make sure no command runs during the reset */ - mutex_lock(&us->dev_mutex); -} - -static void storage_post_reset(struct usb_interface *iface) -{ - struct us_data *us = usb_get_intfdata(iface); - - US_DEBUGP("%s\n", __FUNCTION__); - - /* Report the reset to the SCSI core */ - scsi_lock(us_to_host(us)); - usb_stor_report_bus_reset(us); - scsi_unlock(us_to_host(us)); - - /* FIXME: Notify the subdrivers that they need to reinitialize - * the device */ - mutex_unlock(&us->dev_mutex); -} - /* * fill_inquiry_response takes an unsigned char array (which must * be at least 36 characters) and populates the vendor name, @@ -374,12 +343,8 @@ static int usb_stor_control_thread(void * __us) /* lock access to the state */ scsi_lock(host); - /* did the command already complete because of a disconnect? */ - if (!us->srb) - ; /* nothing to do */ - /* indicate that the command is done */ - else if (us->srb->result != DID_ABORT << 16) { + if (us->srb->result != DID_ABORT << 16) { US_DEBUGP("scsi cmd done, result=0x%x\n", us->srb->result); us->srb->scsi_done(us->srb); @@ -483,7 +448,7 @@ static struct us_unusual_dev *find_unusual(const struct usb_device_id *id) } /* Get the unusual_devs entries and the string descriptors */ -static int get_device_info(struct us_data *us, const struct usb_device_id *id) +static void get_device_info(struct us_data *us, const struct usb_device_id *id) { struct usb_device *dev = us->pusb_dev; struct usb_interface_descriptor *idesc = @@ -500,11 +465,6 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id) unusual_dev->useTransport; us->flags = USB_US_ORIG_FLAGS(id->driver_info); - if (us->flags & US_FL_IGNORE_DEVICE) { - printk(KERN_INFO USB_STORAGE "device ignored\n"); - return -ENODEV; - } - /* * This flag is only needed when we're in high-speed, so let's * disable it if we're in full-speed @@ -534,8 +494,7 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id) if (msg >= 0 && !(us->flags & US_FL_NEED_OVERRIDE)) printk(KERN_NOTICE USB_STORAGE "This device " "(%04x,%04x,%04x S %02x P %02x)" - " has %s in unusual_devs.h (kernel" - " %s)\n" + " has %s in unusual_devs.h\n" " Please send a copy of this message to " "\n", le16_to_cpu(ddesc->idVendor), @@ -543,11 +502,8 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id) le16_to_cpu(ddesc->bcdDevice), idesc->bInterfaceSubClass, idesc->bInterfaceProtocol, - msgs[msg], - UTS_RELEASE); + msgs[msg]); } - - return 0; } /* Get the transport settings */ @@ -850,34 +806,32 @@ static void dissociate_dev(struct us_data *us) * the host */ static void quiesce_and_remove_host(struct us_data *us) { - struct Scsi_Host *host = us_to_host(us); - /* Prevent new USB transfers, stop the current command, and * interrupt a SCSI-scan or device-reset delay */ - scsi_lock(host); set_bit(US_FLIDX_DISCONNECTING, &us->flags); - scsi_unlock(host); usb_stor_stop_transport(us); wake_up(&us->delay_wait); /* It doesn't matter if the SCSI-scanning thread is still running. * The thread will exit when it sees the DISCONNECTING flag. */ + /* Wait for the current command to finish, then remove the host */ + mutex_lock(&us->dev_mutex); + mutex_unlock(&us->dev_mutex); + /* queuecommand won't accept any new commands and the control * thread won't execute a previously-queued command. If there * is such a command pending, complete it with an error. */ - mutex_lock(&us->dev_mutex); if (us->srb) { us->srb->result = DID_NO_CONNECT << 16; - scsi_lock(host); + scsi_lock(us_to_host(us)); us->srb->scsi_done(us->srb); us->srb = NULL; - scsi_unlock(host); + scsi_unlock(us_to_host(us)); } - mutex_unlock(&us->dev_mutex); /* Now we own no commands so it's safe to remove the SCSI host */ - scsi_remove_host(host); + scsi_remove_host(us_to_host(us)); } /* Second stage of disconnect processing: deallocate all resources */ @@ -976,9 +930,7 @@ static int storage_probe(struct usb_interface *intf, * of the match from the usb_device_id table, so we can find the * corresponding entry in the private table. */ - result = get_device_info(us, id); - if (result) - goto BadDevice; + get_device_info(us, id); /* Get the transport, protocol, and pipe settings */ result = get_transport(us); @@ -1050,8 +1002,6 @@ static struct usb_driver usb_storage_driver = { .suspend = storage_suspend, .resume = storage_resume, #endif - .pre_reset = storage_pre_reset, - .post_reset = storage_post_reset, .id_table = storage_usb_ids, }; diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 21f3ddbc9..009fb0953 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h @@ -160,10 +160,10 @@ struct us_data { }; /* Convert between us_data and the corresponding Scsi_Host */ -static inline struct Scsi_Host *us_to_host(struct us_data *us) { +static struct Scsi_Host inline *us_to_host(struct us_data *us) { return container_of((void *) us, struct Scsi_Host, hostdata); } -static inline struct us_data *host_to_us(struct Scsi_Host *host) { +static struct us_data inline *host_to_us(struct Scsi_Host *host) { return (struct us_data *) host->hostdata; } @@ -176,4 +176,8 @@ extern void fill_inquiry_response(struct us_data *us, #define scsi_unlock(host) spin_unlock_irq(host->host_lock) #define scsi_lock(host) spin_lock_irq(host->host_lock) + +/* Vendor ID list for devices that require special handling */ +#define USB_VENDOR_ID_GENESYS 0x05e3 /* Genesys Logic */ + #endif diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index b36203979..4de9fb56e 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c index 0dda73da8..78488bb41 100644 --- a/drivers/video/68328fb.c +++ b/drivers/video/68328fb.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 702eb933c..2fd9ab7f4 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -4,21 +4,6 @@ menu "Graphics support" -config FIRMWARE_EDID - bool "Enable firmware EDID" - default y - ---help--- - This enables access to the EDID transferred from the firmware. - On the i386, this is from the Video BIOS. Enable this if DDC/I2C - transfers do not work for your driver and if you are using - nvidiafb, i810fb or savagefb. - - In general, choosing Y for this option is safe. If you - experience extremely long delays while booting before you get - something on your display, try setting this to N. Matrox cards in - combination with certain motherboards and monitors are known to - suffer from this problem. - config FB tristate "Support for frame buffer devices" ---help--- @@ -85,12 +70,21 @@ config FB_MACMODES depends on FB default n -config FB_BACKLIGHT - bool - depends on FB - select BACKLIGHT_LCD_SUPPORT - select BACKLIGHT_CLASS_DEVICE - default n +config FB_FIRMWARE_EDID + bool "Enable firmware EDID" + depends on FB + default y + ---help--- + This enables access to the EDID transferred from the firmware. + On the i386, this is from the Video BIOS. Enable this if DDC/I2C + transfers do not work for your driver and if you are using + nvidiafb, i810fb or savagefb. + + In general, choosing Y for this option is safe. If you + experience extremely long delays while booting before you get + something on your display, try setting this to N. Matrox cards in + combination with certain motherboards and monitors are known to + suffer from this problem. config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" @@ -173,69 +167,6 @@ config FB_ARMCLCD here and read . The module will be called amba-clcd. -choice - - depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X) - prompt "LCD Panel" - default FB_ARMCLCD_SHARP_LQ035Q7DB02 - -config FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT - bool "LogicPD LCD 3.5\" QVGA w/HRTFT IC" - help - This is an implementation of the Sharp LQ035Q7DB02, a 3.5" - color QVGA, HRTFT panel. The LogicPD device includes an - an integrated HRTFT controller IC. - The native resolution is 240x320. - -config FB_ARMCLCD_SHARP_LQ057Q3DC02 - bool "LogicPD LCD 5.7\" QVGA" - help - This is an implementation of the Sharp LQ057Q3DC02, a 5.7" - color QVGA, TFT panel. The LogicPD device includes an - The native resolution is 320x240. - -config FB_ARMCLCD_SHARP_LQ64D343 - bool "LogicPD LCD 6.4\" VGA" - help - This is an implementation of the Sharp LQ64D343, a 6.4" - color VGA, TFT panel. The LogicPD device includes an - The native resolution is 640x480. - -config FB_ARMCLCD_SHARP_LQ10D368 - bool "LogicPD LCD 10.4\" VGA" - help - This is an implementation of the Sharp LQ10D368, a 10.4" - color VGA, TFT panel. The LogicPD device includes an - The native resolution is 640x480. - - -config FB_ARMCLCD_SHARP_LQ121S1DG41 - bool "LogicPD LCD 12.1\" SVGA" - help - This is an implementation of the Sharp LQ121S1DG41, a 12.1" - color SVGA, TFT panel. The LogicPD device includes an - The native resolution is 800x600. - - This panel requires a clock rate may be an integer fraction - of the base LCDCLK frequency. The driver will select the - highest frequency available that is lower than the maximum - allowed. The panel may flicker if the clock rate is - slower than the recommended minimum. - -config FB_ARMCLCD_AUO_A070VW01_WIDE - bool "AU Optronics A070VW01 LCD 7.0\" WIDE" - help - This is an implementation of the AU Optronics, a 7.0" - WIDE Color. The native resolution is 234x480. - -config FB_ARMCLCD_HITACHI - bool "Hitachi Wide Screen 800x480" - help - This is an implementation of the Hitachi 800x480. - -endchoice - - config FB_ACORN bool "Acorn VIDC support" depends on (FB = y) && ARM && (ARCH_ACORN || ARCH_CLPS7500) @@ -422,7 +353,7 @@ config FB_OF config FB_CONTROL bool "Apple \"control\" display support" - depends on (FB = y) && PPC_PMAC && PPC32 + depends on (FB = y) && PPC_PMAC select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -433,7 +364,7 @@ config FB_CONTROL config FB_PLATINUM bool "Apple \"platinum\" display support" - depends on (FB = y) && PPC_PMAC && PPC32 + depends on (FB = y) && PPC_PMAC select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -444,7 +375,7 @@ config FB_PLATINUM config FB_VALKYRIE bool "Apple \"valkyrie\" display support" - depends on (FB = y) && (MAC || (PPC_PMAC && PPC32)) + depends on (FB = y) && (MAC || PPC_PMAC) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -455,7 +386,7 @@ config FB_VALKYRIE config FB_CT65550 bool "Chips 65550 display support" - depends on (FB = y) && PPC32 + depends on (FB = y) && PPC select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -552,14 +483,10 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read . If unsure, say Y. -config FB_IMAC - bool "Intel-based Macintosh Framebuffer Support" - depends on (FB = y) && X86 && EFI - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - help - This is the frame buffer device driver for the Intel-based Macintosh +config VIDEO_SELECT + bool + depends on FB_VESA + default y config FB_HGA tristate "Hercules mono graphics support" @@ -583,6 +510,12 @@ config FB_HGA_ACCEL This will compile the Hercules mono graphics with acceleration functions. + +config VIDEO_SELECT + bool + depends on (FB = y) && X86 && !XEN + default y + config FB_SGIVW tristate "SGI Visual Workstation framebuffer support" depends on FB && X86_VISWS @@ -721,14 +654,6 @@ config FB_NVIDIA_I2C independently validate video mode parameters, you should say Y here. -config FB_NVIDIA_BACKLIGHT - bool "Support for backlight control" - depends on FB_NVIDIA && PMAC_BACKLIGHT - select FB_BACKLIGHT - default y - help - Say Y here if you want to control the backlight of your display. - config FB_RIVA tristate "nVidia Riva support" depends on FB && PCI @@ -767,14 +692,6 @@ config FB_RIVA_DEBUG of debugging informations to provide to the maintainer when something goes wrong. -config FB_RIVA_BACKLIGHT - bool "Support for backlight control" - depends on FB_RIVA && PMAC_BACKLIGHT - select FB_BACKLIGHT - default y - help - Say Y here if you want to control the backlight of your display. - config FB_I810 tristate "Intel 810/815 support (EXPERIMENTAL)" depends on FB && EXPERIMENTAL && PCI && X86_32 @@ -826,7 +743,7 @@ config FB_I810_I2C config FB_INTEL tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)" - depends on FB && EXPERIMENTAL && PCI && X86 + depends on FB && EXPERIMENTAL && PCI && X86_32 select AGP select AGP_INTEL select FB_MODE_HELPERS @@ -1013,7 +930,6 @@ config FB_RADEON There is a product page at http://apps.ati.com/ATIcompare/ - config FB_RADEON_I2C bool "DDC/I2C for ATI Radeon support" depends on FB_RADEON @@ -1021,14 +937,6 @@ config FB_RADEON_I2C help Say Y here if you want DDC/I2C support for your Radeon board. -config FB_RADEON_BACKLIGHT - bool "Support for backlight control" - depends on FB_RADEON && PMAC_BACKLIGHT - select FB_BACKLIGHT - default y - help - Say Y here if you want to control the backlight of your display. - config FB_RADEON_DEBUG bool "Lots of debug output from Radeon driver" depends on FB_RADEON @@ -1053,14 +961,6 @@ config FB_ATY128 To compile this driver as a module, choose M here: the module will be called aty128fb. -config FB_ATY128_BACKLIGHT - bool "Support for backlight control" - depends on FB_ATY128 && PMAC_BACKLIGHT - select FB_BACKLIGHT - default y - help - Say Y here if you want to control the backlight of your display. - config FB_ATY tristate "ATI Mach64 display support" if PCI || ATARI depends on FB && !SPARC32 @@ -1103,14 +1003,6 @@ config FB_ATY_GX is at . -config FB_ATY_BACKLIGHT - bool "Support for backlight control" - depends on FB_ATY && PMAC_BACKLIGHT - select FB_BACKLIGHT - default y - help - Say Y here if you want to control the backlight of your display. - config FB_S3TRIO bool "S3 Trio display support" depends on (FB = y) && PPC && BROKEN @@ -1510,26 +1402,6 @@ config FB_PXA_PARAMETERS describes the available parameters. -config FB_MBX - tristate "2700G LCD framebuffer support" - depends on FB && ARCH_PXA - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - ---help--- - Framebuffer driver for the Intel 2700G (Marathon) Graphics - Accelerator - -config FB_MBX_DEBUG - bool "Enable debugging info via debugfs" - depends on FB_MBX && DEBUG_FS - default n - ---help--- - Enable this if you want debugging information using the debug - filesystem (debugfs) - - If unsure, say N. - config FB_W100 tristate "W100 frame buffer support" depends on FB && PXA_SHARPSL @@ -1569,21 +1441,6 @@ config FB_S3C2410_DEBUG Turn on debugging messages. Note that you can set/unset at run time through sysfs -config FB_PNX4008_DUM - tristate "Display Update Module support on Philips PNX4008 board" - depends on FB && ARCH_PNX4008 - ---help--- - Say Y here to enable support for PNX4008 Display Update Module (DUM) - -config FB_PNX4008_DUM_RGB - tristate "RGB Framebuffer support on Philips PNX4008 board" - depends on FB_PNX4008_DUM - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - ---help--- - Say Y here to enable support for PNX4008 RGB Framebuffer - config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" depends on FB @@ -1612,7 +1469,7 @@ if FB || SGI_NEWPORT_CONSOLE source "drivers/video/logo/Kconfig" endif -if SYSFS +if FB && SYSFS source "drivers/video/backlight/Kconfig" endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 481c6c969..23de3b2c7 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -4,16 +4,15 @@ # Each configuration option enables a list of files. -obj-y += fb_notify.o +obj-$(CONFIG_VT) += console/ +obj-$(CONFIG_LOGO) += logo/ +obj-$(CONFIG_SYSFS) += backlight/ + obj-$(CONFIG_FB) += fb.o fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ modedb.o fbcvt.o fb-objs := $(fb-y) -obj-$(CONFIG_VT) += console/ -obj-$(CONFIG_LOGO) += logo/ -obj-$(CONFIG_SYSFS) += backlight/ - obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o obj-$(CONFIG_FB_CFB_COPYAREA) += cfbcopyarea.o obj-$(CONFIG_FB_CFB_IMAGEBLIT) += cfbimgblt.o @@ -39,7 +38,6 @@ obj-$(CONFIG_FB_SIS) += sis/ obj-$(CONFIG_FB_KYRO) += kyro/ obj-$(CONFIG_FB_SAVAGE) += savage/ obj-$(CONFIG_FB_GEODE) += geode/ -obj-$(CONFIG_FB_MBX) += mbx/ obj-$(CONFIG_FB_I810) += vgastate.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o vgastate.o obj-$(CONFIG_FB_VIRGE) += virgefb.o @@ -96,12 +94,9 @@ obj-$(CONFIG_FB_TX3912) += tx3912fb.o obj-$(CONFIG_FB_S1D13XXX) += s1d13xxxfb.o obj-$(CONFIG_FB_IMX) += imxfb.o obj-$(CONFIG_FB_S3C2410) += s3c2410fb.o -obj-$(CONFIG_FB_PNX4008_DUM) += pnx4008/ -obj-$(CONFIG_FB_PNX4008_DUM_RGB) += pnx4008/ # Platform or fallback drivers go here obj-$(CONFIG_FB_VESA) += vesafb.o -obj-$(CONFIG_FB_IMAC) += imacfb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o vgastate.o obj-$(CONFIG_FB_OF) += offb.o diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c index afd146f5f..455fda990 100644 --- a/drivers/video/S3triofb.c +++ b/drivers/video/S3triofb.c @@ -23,11 +23,13 @@ */ +#include #include #include #include #include #include +#include #include #include #include diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 61a8bf159..98baecccb 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c @@ -17,6 +17,7 @@ * - Blanking 8bpp displays with VIDC */ +#include #include #include #include diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index f1ba54f4f..3033c72de 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c @@ -45,8 +45,10 @@ #include #include #include +#include #include #include +#include #include #include #include diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 70dd8115a..466042808 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -560,7 +561,7 @@ static int __init arcfb_probe(struct platform_device *dev) platform_set_drvdata(dev, info); if (irq) { par->irq = irq; - if (request_irq(par->irq, &arcfb_interrupt, IRQF_SHARED, + if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ, "arcfb", info)) { printk(KERN_INFO "arcfb: Failed req IRQ %d\n", par->irq); diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 1fd22f460..29f9f0dfe 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c @@ -29,11 +29,13 @@ * more details. */ +#include #include #include #include #include #include +#include #include #include #include diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 5831893bf..e69ab65f7 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/video/aty/Makefile b/drivers/video/aty/Makefile index a6cc0e9ec..18521397a 100644 --- a/drivers/video/aty/Makefile +++ b/drivers/video/aty/Makefile @@ -10,6 +10,5 @@ atyfb-objs := $(atyfb-y) radeonfb-y := radeon_base.o radeon_pm.o radeon_monitor.o radeon_accel.o radeonfb-$(CONFIG_FB_RADEON_I2C) += radeon_i2c.o -radeonfb-$(CONFIG_FB_RADEON_BACKLIGHT) += radeon_backlight.o radeonfb-objs := $(radeonfb-y) diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 276a21530..f7bbff4dd 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -46,12 +46,14 @@ */ +#include #include #include #include #include #include #include +#include #include #include #include @@ -62,7 +64,6 @@ #include #include #include -#include #include #ifdef CONFIG_PPC_PMAC @@ -98,7 +99,7 @@ #ifndef CONFIG_PPC_PMAC /* default mode */ -static struct fb_var_screeninfo default_var __devinitdata = { +static struct fb_var_screeninfo default_var __initdata = { /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 640, 480, 640, 480, 0, 0, 8, 0, {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, @@ -121,7 +122,7 @@ static struct fb_var_screeninfo default_var = { /* default modedb mode */ /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ -static struct fb_videomode defaultmode __devinitdata = { +static struct fb_videomode defaultmode __initdata = { .refresh = 60, .xres = 640, .yres = 480, @@ -333,7 +334,7 @@ static const struct aty128_meminfo sdr_sgram = static const struct aty128_meminfo ddr_sgram = { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; -static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { +static struct fb_fix_screeninfo aty128fb_fix __initdata = { .id = "ATY Rage128", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, @@ -343,15 +344,15 @@ static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { .accel = FB_ACCEL_ATI_RAGE128, }; -static char *mode_option __devinitdata = NULL; +static char *mode_option __initdata = NULL; #ifdef CONFIG_PPC_PMAC -static int default_vmode __devinitdata = VMODE_1024_768_60; -static int default_cmode __devinitdata = CMODE_8; +static int default_vmode __initdata = VMODE_1024_768_60; +static int default_cmode __initdata = CMODE_8; #endif -static int default_crt_on __devinitdata = 0; -static int default_lcd_on __devinitdata = 1; +static int default_crt_on __initdata = 0; +static int default_lcd_on __initdata = 1; #ifdef CONFIG_MTRR static int mtrr = 1; @@ -443,9 +444,9 @@ static int aty128_encode_var(struct fb_var_screeninfo *var, static int aty128_decode_var(struct fb_var_screeninfo *var, struct aty128fb_par *par); #if 0 -static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, +static void __init aty128_get_pllinfo(struct aty128fb_par *par, void __iomem *bios); -static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par); +static void __init __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par); #endif static void aty128_timings(struct aty128fb_par *par); static void aty128_init_engine(struct aty128fb_par *par); @@ -456,10 +457,6 @@ static void wait_for_fifo(u16 entries, struct aty128fb_par *par); static void wait_for_idle(struct aty128fb_par *par); static u32 depth_to_dst(u32 depth); -#ifdef CONFIG_FB_ATY128_BACKLIGHT -static void aty128_bl_set_power(struct fb_info *info, int power); -#endif - #define BIOS_IN8(v) (readb(bios + (v))) #define BIOS_IN16(v) (readb(bios + (v)) | \ (readb(bios + (v) + 1) << 8)) @@ -483,6 +480,16 @@ static struct fb_ops aty128fb_ops = { .fb_imageblit = cfb_imageblit, }; +#ifdef CONFIG_PMAC_BACKLIGHT +static int aty128_set_backlight_enable(int on, int level, void* data); +static int aty128_set_backlight_level(int level, void* data); + +static struct backlight_controller aty128_backlight_controller = { + aty128_set_backlight_enable, + aty128_set_backlight_level +}; +#endif /* CONFIG_PMAC_BACKLIGHT */ + /* * Functions to read from/write to the mmio registers * - endian conversions may possibly be avoided by @@ -575,7 +582,7 @@ static void aty_pll_writeupdate(const struct aty128fb_par *par) /* write to the scratch register to test r/w functionality */ -static int __devinit register_test(const struct aty128fb_par *par) +static int __init register_test(const struct aty128fb_par *par) { u32 val; int flag = 0; @@ -774,7 +781,7 @@ static u32 depth_to_dst(u32 depth) #ifndef __sparc__ -static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev) +static void __iomem * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev) { u16 dptr; u8 rom_type; @@ -858,7 +865,7 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, s return NULL; } -static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __iomem *bios) +static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __iomem *bios) { unsigned int bios_hdr; unsigned int bios_pll; @@ -905,7 +912,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) #endif /* ndef(__sparc__) */ /* fill in known card constants if pll_block is not available */ -static void __devinit aty128_timings(struct aty128fb_par *par) +static void __init aty128_timings(struct aty128fb_par *par) { #ifdef CONFIG_PPC_OF /* instead of a table lookup, assume OF has properly @@ -1251,21 +1258,19 @@ static void aty128_set_crt_enable(struct aty128fb_par *par, int on) static void aty128_set_lcd_enable(struct aty128fb_par *par, int on) { u32 reg; -#ifdef CONFIG_FB_ATY128_BACKLIGHT - struct fb_info *info = pci_get_drvdata(par->pdev); -#endif if (on) { reg = aty_ld_le32(LVDS_GEN_CNTL); reg |= LVDS_ON | LVDS_EN | LVDS_BLON | LVDS_DIGION; reg &= ~LVDS_DISPLAY_DIS; aty_st_le32(LVDS_GEN_CNTL, reg); -#ifdef CONFIG_FB_ATY128_BACKLIGHT - aty128_bl_set_power(info, FB_BLANK_UNBLANK); +#ifdef CONFIG_PMAC_BACKLIGHT + aty128_set_backlight_enable(get_backlight_enable(), + get_backlight_level(), par); #endif } else { -#ifdef CONFIG_FB_ATY128_BACKLIGHT - aty128_bl_set_power(info, FB_BLANK_POWERDOWN); +#ifdef CONFIG_PMAC_BACKLIGHT + aty128_set_backlight_enable(0, 0, par); #endif reg = aty_ld_le32(LVDS_GEN_CNTL); reg |= LVDS_DISPLAY_DIS; @@ -1633,7 +1638,7 @@ static int aty128fb_sync(struct fb_info *info) } #ifndef MODULE -static int __devinit aty128fb_setup(char *options) +static int __init aty128fb_setup(char *options) { char *this_opt; @@ -1686,211 +1691,6 @@ static int __devinit aty128fb_setup(char *options) } #endif /* MODULE */ -/* Backlight */ -#ifdef CONFIG_FB_ATY128_BACKLIGHT -#define MAX_LEVEL 0xFF - -static struct backlight_properties aty128_bl_data; - -/* Call with fb_info->bl_mutex held */ -static int aty128_bl_get_level_brightness(struct aty128fb_par *par, - int level) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - int atylevel; - - /* Get and convert the value */ - atylevel = MAX_LEVEL - - (info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL); - - if (atylevel < 0) - atylevel = 0; - else if (atylevel > MAX_LEVEL) - atylevel = MAX_LEVEL; - - return atylevel; -} - -/* We turn off the LCD completely instead of just dimming the backlight. - * This provides greater power saving and the display is useless without - * backlight anyway - */ -#define BACKLIGHT_LVDS_OFF -/* That one prevents proper CRT output with LCD off */ -#undef BACKLIGHT_DAC_OFF - -/* Call with fb_info->bl_mutex held */ -static int __aty128_bl_update_status(struct backlight_device *bd) -{ - struct aty128fb_par *par = class_get_devdata(&bd->class_dev); - unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); - int level; - - if (bd->props->power != FB_BLANK_UNBLANK || - bd->props->fb_blank != FB_BLANK_UNBLANK || - !par->lcd_on) - level = 0; - else - level = bd->props->brightness; - - reg |= LVDS_BL_MOD_EN | LVDS_BLON; - if (level > 0) { - reg |= LVDS_DIGION; - if (!(reg & LVDS_ON)) { - reg &= ~LVDS_BLON; - aty_st_le32(LVDS_GEN_CNTL, reg); - aty_ld_le32(LVDS_GEN_CNTL); - mdelay(10); - reg |= LVDS_BLON; - aty_st_le32(LVDS_GEN_CNTL, reg); - } - reg &= ~LVDS_BL_MOD_LEVEL_MASK; - reg |= (aty128_bl_get_level_brightness(par, level) << LVDS_BL_MOD_LEVEL_SHIFT); -#ifdef BACKLIGHT_LVDS_OFF - reg |= LVDS_ON | LVDS_EN; - reg &= ~LVDS_DISPLAY_DIS; -#endif - aty_st_le32(LVDS_GEN_CNTL, reg); -#ifdef BACKLIGHT_DAC_OFF - aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) & (~DAC_PDWN)); -#endif - } else { - reg &= ~LVDS_BL_MOD_LEVEL_MASK; - reg |= (aty128_bl_get_level_brightness(par, 0) << LVDS_BL_MOD_LEVEL_SHIFT); -#ifdef BACKLIGHT_LVDS_OFF - reg |= LVDS_DISPLAY_DIS; - aty_st_le32(LVDS_GEN_CNTL, reg); - aty_ld_le32(LVDS_GEN_CNTL); - udelay(10); - reg &= ~(LVDS_ON | LVDS_EN | LVDS_BLON | LVDS_DIGION); -#endif - aty_st_le32(LVDS_GEN_CNTL, reg); -#ifdef BACKLIGHT_DAC_OFF - aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) | DAC_PDWN); -#endif - } - - return 0; -} - -static int aty128_bl_update_status(struct backlight_device *bd) -{ - struct aty128fb_par *par = class_get_devdata(&bd->class_dev); - struct fb_info *info = pci_get_drvdata(par->pdev); - int ret; - - mutex_lock(&info->bl_mutex); - ret = __aty128_bl_update_status(bd); - mutex_unlock(&info->bl_mutex); - - return ret; -} - -static int aty128_bl_get_brightness(struct backlight_device *bd) -{ - return bd->props->brightness; -} - -static struct backlight_properties aty128_bl_data = { - .owner = THIS_MODULE, - .get_brightness = aty128_bl_get_brightness, - .update_status = aty128_bl_update_status, - .max_brightness = (FB_BACKLIGHT_LEVELS - 1), -}; - -static void aty128_bl_set_power(struct fb_info *info, int power) -{ - mutex_lock(&info->bl_mutex); - - if (info->bl_dev) { - down(&info->bl_dev->sem); - info->bl_dev->props->power = power; - __aty128_bl_update_status(info->bl_dev); - up(&info->bl_dev->sem); - } - - mutex_unlock(&info->bl_mutex); -} - -static void aty128_bl_init(struct aty128fb_par *par) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - struct backlight_device *bd; - char name[12]; - - /* Could be extended to Rage128Pro LVDS output too */ - if (par->chip_gen != rage_M3) - return; - -#ifdef CONFIG_PMAC_BACKLIGHT - if (!pmac_has_backlight_type("ati")) - return; -#endif - - snprintf(name, sizeof(name), "aty128bl%d", info->node); - - bd = backlight_device_register(name, par, &aty128_bl_data); - if (IS_ERR(bd)) { - info->bl_dev = NULL; - printk(KERN_WARNING "aty128: Backlight registration failed\n"); - goto error; - } - - mutex_lock(&info->bl_mutex); - info->bl_dev = bd; - fb_bl_default_curve(info, 0, - 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, - 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); - mutex_unlock(&info->bl_mutex); - - down(&bd->sem); - bd->props->brightness = aty128_bl_data.max_brightness; - bd->props->power = FB_BLANK_UNBLANK; - bd->props->update_status(bd); - up(&bd->sem); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - if (!pmac_backlight) - pmac_backlight = bd; - mutex_unlock(&pmac_backlight_mutex); -#endif - - printk("aty128: Backlight initialized (%s)\n", name); - - return; - -error: - return; -} - -static void aty128_bl_exit(struct aty128fb_par *par) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); -#endif - - mutex_lock(&info->bl_mutex); - if (info->bl_dev) { -#ifdef CONFIG_PMAC_BACKLIGHT - if (pmac_backlight == info->bl_dev) - pmac_backlight = NULL; -#endif - - backlight_device_unregister(info->bl_dev); - info->bl_dev = NULL; - - printk("aty128: Backlight unloaded\n"); - } - mutex_unlock(&info->bl_mutex); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_unlock(&pmac_backlight_mutex); -#endif -} -#endif /* CONFIG_FB_ATY128_BACKLIGHT */ /* * Initialisation @@ -1908,7 +1708,7 @@ static void aty128_early_resume(void *data) } #endif /* CONFIG_PPC_PMAC */ -static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) +static int __init aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) { struct fb_info *info = pci_get_drvdata(pdev); struct aty128fb_par *par = info->par; @@ -1917,6 +1717,9 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i u8 chip_rev; u32 dac; + if (!par->vram_size) /* may have already been probed */ + par->vram_size = aty_ld_le32(CONFIG_MEMSIZE) & 0x03FFFFFF; + /* Get the chip revision */ chip_rev = (aty_ld_le32(CONFIG_CNTL) >> 16) & 0x1F; @@ -2029,18 +1832,20 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i aty128_init_engine(par); + if (register_framebuffer(info) < 0) + return 0; + +#ifdef CONFIG_PMAC_BACKLIGHT + /* Could be extended to Rage128Pro LVDS output too */ + if (par->chip_gen == rage_M3) + register_backlight_controller(&aty128_backlight_controller, par, "ati"); +#endif /* CONFIG_PMAC_BACKLIGHT */ + par->pm_reg = pci_find_capability(pdev, PCI_CAP_ID_PM); par->pdev = pdev; par->asleep = 0; par->lock_blank = 0; - -#ifdef CONFIG_FB_ATY128_BACKLIGHT - aty128_bl_init(par); -#endif - - if (register_framebuffer(info) < 0) - return 0; - + printk(KERN_INFO "fb%d: %s frame buffer device on %s\n", info->node, info->fix.id, video_card); @@ -2049,7 +1854,7 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i #ifdef CONFIG_PCI /* register a card ++ajoshi */ -static int __devinit aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent) +static int __init aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { unsigned long fb_addr, reg_addr; struct aty128fb_par *par; @@ -2090,6 +1895,7 @@ static int __devinit aty128_probe(struct pci_dev *pdev, const struct pci_device_ par = info->par; info->pseudo_palette = par->pseudo_palette; + info->fix = aty128fb_fix; /* Virtualize mmio region */ info->fix.mmio_start = reg_addr; @@ -2175,10 +1981,6 @@ static void __devexit aty128_remove(struct pci_dev *pdev) par = info->par; -#ifdef CONFIG_FB_ATY128_BACKLIGHT - aty128_bl_exit(par); -#endif - unregister_framebuffer(info); #ifdef CONFIG_MTRR if (par->mtrr.vram_valid) @@ -2209,10 +2011,10 @@ static int aty128fb_blank(int blank, struct fb_info *fb) if (par->lock_blank || par->asleep) return 0; -#ifdef CONFIG_FB_ATY128_BACKLIGHT +#ifdef CONFIG_PMAC_BACKLIGHT if (machine_is(powermac) && blank) - aty128_bl_set_power(fb, FB_BLANK_POWERDOWN); -#endif + set_backlight_enable(0); +#endif /* CONFIG_PMAC_BACKLIGHT */ if (blank & FB_BLANK_VSYNC_SUSPEND) state |= 2; @@ -2227,12 +2029,10 @@ static int aty128fb_blank(int blank, struct fb_info *fb) aty128_set_crt_enable(par, par->crt_on && !blank); aty128_set_lcd_enable(par, par->lcd_on && !blank); } - -#ifdef CONFIG_FB_ATY128_BACKLIGHT +#ifdef CONFIG_PMAC_BACKLIGHT if (machine_is(powermac) && !blank) - aty128_bl_set_power(fb, FB_BLANK_UNBLANK); -#endif - + set_backlight_enable(1); +#endif /* CONFIG_PMAC_BACKLIGHT */ return 0; } @@ -2338,6 +2138,73 @@ static int aty128fb_ioctl(struct fb_info *info, u_int cmd, u_long arg) return -EINVAL; } +#ifdef CONFIG_PMAC_BACKLIGHT +static int backlight_conv[] = { + 0xff, 0xc0, 0xb5, 0xaa, 0x9f, 0x94, 0x89, 0x7e, + 0x73, 0x68, 0x5d, 0x52, 0x47, 0x3c, 0x31, 0x24 +}; + +/* We turn off the LCD completely instead of just dimming the backlight. + * This provides greater power saving and the display is useless without + * backlight anyway + */ +#define BACKLIGHT_LVDS_OFF +/* That one prevents proper CRT output with LCD off */ +#undef BACKLIGHT_DAC_OFF + +static int aty128_set_backlight_enable(int on, int level, void *data) +{ + struct aty128fb_par *par = data; + unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); + + if (!par->lcd_on) + on = 0; + reg |= LVDS_BL_MOD_EN | LVDS_BLON; + if (on && level > BACKLIGHT_OFF) { + reg |= LVDS_DIGION; + if (!(reg & LVDS_ON)) { + reg &= ~LVDS_BLON; + aty_st_le32(LVDS_GEN_CNTL, reg); + (void)aty_ld_le32(LVDS_GEN_CNTL); + mdelay(10); + reg |= LVDS_BLON; + aty_st_le32(LVDS_GEN_CNTL, reg); + } + reg &= ~LVDS_BL_MOD_LEVEL_MASK; + reg |= (backlight_conv[level] << LVDS_BL_MOD_LEVEL_SHIFT); +#ifdef BACKLIGHT_LVDS_OFF + reg |= LVDS_ON | LVDS_EN; + reg &= ~LVDS_DISPLAY_DIS; +#endif + aty_st_le32(LVDS_GEN_CNTL, reg); +#ifdef BACKLIGHT_DAC_OFF + aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) & (~DAC_PDWN)); +#endif + } else { + reg &= ~LVDS_BL_MOD_LEVEL_MASK; + reg |= (backlight_conv[0] << LVDS_BL_MOD_LEVEL_SHIFT); +#ifdef BACKLIGHT_LVDS_OFF + reg |= LVDS_DISPLAY_DIS; + aty_st_le32(LVDS_GEN_CNTL, reg); + (void)aty_ld_le32(LVDS_GEN_CNTL); + udelay(10); + reg &= ~(LVDS_ON | LVDS_EN | LVDS_BLON | LVDS_DIGION); +#endif + aty_st_le32(LVDS_GEN_CNTL, reg); +#ifdef BACKLIGHT_DAC_OFF + aty_st_le32(DAC_CNTL, aty_ld_le32(DAC_CNTL) | DAC_PDWN); +#endif + } + + return 0; +} + +static int aty128_set_backlight_level(int level, void* data) +{ + return aty128_set_backlight_enable(1, level, data); +} +#endif /* CONFIG_PMAC_BACKLIGHT */ + #if 0 /* * Accelerated functions @@ -2561,7 +2428,7 @@ static int aty128_pci_resume(struct pci_dev *pdev) } -static int __devinit aty128fb_init(void) +static int __init aty128fb_init(void) { #ifndef MODULE char *option = NULL; diff --git a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h index 55fb8b044..e9b7a64c1 100644 --- a/drivers/video/aty/atyfb.h +++ b/drivers/video/aty/atyfb.h @@ -2,6 +2,7 @@ * ATI Frame Buffer Device Driver Core Definitions */ +#include #include #include /* @@ -150,7 +151,6 @@ struct atyfb_par { int lock_blank; unsigned long res_start; unsigned long res_size; - struct pci_dev *pdev; #ifdef __sparc__ struct pci_mmap_map *mmap_map; u8 mmaped; diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 19a71f045..d9d7d3c4c 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -49,6 +49,7 @@ ******************************************************************************/ +#include #include #include #include @@ -65,7 +66,6 @@ #include #include #include -#include #include #include @@ -315,12 +315,12 @@ static int vram; static int pll; static int mclk; static int xclk; -static int comp_sync __devinitdata = -1; +static int comp_sync __initdata = -1; static char *mode; #ifdef CONFIG_PPC -static int default_vmode __devinitdata = VMODE_CHOOSE; -static int default_cmode __devinitdata = CMODE_CHOOSE; +static int default_vmode __initdata = VMODE_CHOOSE; +static int default_cmode __initdata = CMODE_CHOOSE; module_param_named(vmode, default_vmode, int, 0); MODULE_PARM_DESC(vmode, "int: video mode for mac"); @@ -329,10 +329,10 @@ MODULE_PARM_DESC(cmode, "int: color mode for mac"); #endif #ifdef CONFIG_ATARI -static unsigned int mach64_count __devinitdata = 0; -static unsigned long phys_vmembase[FB_MAX] __devinitdata = { 0, }; -static unsigned long phys_size[FB_MAX] __devinitdata = { 0, }; -static unsigned long phys_guiregbase[FB_MAX] __devinitdata = { 0, }; +static unsigned int mach64_count __initdata = 0; +static unsigned long phys_vmembase[FB_MAX] __initdata = { 0, }; +static unsigned long phys_size[FB_MAX] __initdata = { 0, }; +static unsigned long phys_guiregbase[FB_MAX] __initdata = { 0, }; #endif /* top -> down is an evolution of mach64 chipset, any corrections? */ @@ -582,7 +582,7 @@ static u32 atyfb_get_pixclock(struct fb_var_screeninfo *var, struct atyfb_par *p * Apple monitor sense */ -static int __devinit read_aty_sense(const struct atyfb_par *par) +static int __init read_aty_sense(const struct atyfb_par *par) { int sense, i; @@ -1280,14 +1280,6 @@ static int atyfb_set_par(struct fb_info *info) par->accel_flags = var->accel_flags; /* hack */ - if (var->accel_flags) { - info->fbops->fb_sync = atyfb_sync; - info->flags &= ~FBINFO_HWACCEL_DISABLED; - } else { - info->fbops->fb_sync = NULL; - info->flags |= FBINFO_HWACCEL_DISABLED; - } - if (par->blitter_may_be_busy) wait_for_idle(par); @@ -1567,7 +1559,7 @@ static int aty_enable_irq(struct atyfb_par *par, int reenable) u32 int_cntl; if (!test_and_set_bit(0, &par->irq_flags)) { - if (request_irq(par->irq, aty_irq, IRQF_SHARED, "atyfb", par)) { + if (request_irq(par->irq, aty_irq, SA_SHIRQ, "atyfb", par)) { clear_bit(0, &par->irq_flags); return -EINVAL; } @@ -2123,171 +2115,47 @@ static int atyfb_pci_resume(struct pci_dev *pdev) #endif /* defined(CONFIG_PM) && defined(CONFIG_PCI) */ -/* Backlight */ -#ifdef CONFIG_FB_ATY_BACKLIGHT -#define MAX_LEVEL 0xFF - -static struct backlight_properties aty_bl_data; - -/* Call with fb_info->bl_mutex held */ -static int aty_bl_get_level_brightness(struct atyfb_par *par, int level) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - int atylevel; - - /* Get and convert the value */ - atylevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL; +#ifdef CONFIG_PMAC_BACKLIGHT - if (atylevel < 0) - atylevel = 0; - else if (atylevel > MAX_LEVEL) - atylevel = MAX_LEVEL; + /* + * LCD backlight control + */ - return atylevel; -} +static int backlight_conv[] = { + 0x00, 0x3f, 0x4c, 0x59, 0x66, 0x73, 0x80, 0x8d, + 0x9a, 0xa7, 0xb4, 0xc1, 0xcf, 0xdc, 0xe9, 0xff +}; -/* Call with fb_info->bl_mutex held */ -static int __aty_bl_update_status(struct backlight_device *bd) +static int aty_set_backlight_enable(int on, int level, void *data) { - struct atyfb_par *par = class_get_devdata(&bd->class_dev); + struct fb_info *info = (struct fb_info *) data; + struct atyfb_par *par = (struct atyfb_par *) info->par; unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par); - int level; - - if (bd->props->power != FB_BLANK_UNBLANK || - bd->props->fb_blank != FB_BLANK_UNBLANK) - level = 0; - else - level = bd->props->brightness; reg |= (BLMOD_EN | BIASMOD_EN); - if (level > 0) { + if (on && level > BACKLIGHT_OFF) { reg &= ~BIAS_MOD_LEVEL_MASK; - reg |= (aty_bl_get_level_brightness(par, level) << BIAS_MOD_LEVEL_SHIFT); + reg |= (backlight_conv[level] << BIAS_MOD_LEVEL_SHIFT); } else { reg &= ~BIAS_MOD_LEVEL_MASK; - reg |= (aty_bl_get_level_brightness(par, 0) << BIAS_MOD_LEVEL_SHIFT); + reg |= (backlight_conv[0] << BIAS_MOD_LEVEL_SHIFT); } aty_st_lcd(LCD_MISC_CNTL, reg, par); - return 0; } -static int aty_bl_update_status(struct backlight_device *bd) +static int aty_set_backlight_level(int level, void *data) { - struct atyfb_par *par = class_get_devdata(&bd->class_dev); - struct fb_info *info = pci_get_drvdata(par->pdev); - int ret; - - mutex_lock(&info->bl_mutex); - ret = __aty_bl_update_status(bd); - mutex_unlock(&info->bl_mutex); - - return ret; + return aty_set_backlight_enable(1, level, data); } -static int aty_bl_get_brightness(struct backlight_device *bd) -{ - return bd->props->brightness; -} - -static struct backlight_properties aty_bl_data = { - .owner = THIS_MODULE, - .get_brightness = aty_bl_get_brightness, - .update_status = aty_bl_update_status, - .max_brightness = (FB_BACKLIGHT_LEVELS - 1), +static struct backlight_controller aty_backlight_controller = { + aty_set_backlight_enable, + aty_set_backlight_level }; +#endif /* CONFIG_PMAC_BACKLIGHT */ -static void aty_bl_set_power(struct fb_info *info, int power) -{ - mutex_lock(&info->bl_mutex); - - if (info->bl_dev) { - down(&info->bl_dev->sem); - info->bl_dev->props->power = power; - __aty_bl_update_status(info->bl_dev); - up(&info->bl_dev->sem); - } - - mutex_unlock(&info->bl_mutex); -} - -static void aty_bl_init(struct atyfb_par *par) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - struct backlight_device *bd; - char name[12]; - -#ifdef CONFIG_PMAC_BACKLIGHT - if (!pmac_has_backlight_type("ati")) - return; -#endif - - snprintf(name, sizeof(name), "atybl%d", info->node); - - bd = backlight_device_register(name, par, &aty_bl_data); - if (IS_ERR(bd)) { - info->bl_dev = NULL; - printk(KERN_WARNING "aty: Backlight registration failed\n"); - goto error; - } - - mutex_lock(&info->bl_mutex); - info->bl_dev = bd; - fb_bl_default_curve(info, 0, - 0x3F * FB_BACKLIGHT_MAX / MAX_LEVEL, - 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); - mutex_unlock(&info->bl_mutex); - - down(&bd->sem); - bd->props->brightness = aty_bl_data.max_brightness; - bd->props->power = FB_BLANK_UNBLANK; - bd->props->update_status(bd); - up(&bd->sem); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - if (!pmac_backlight) - pmac_backlight = bd; - mutex_unlock(&pmac_backlight_mutex); -#endif - - printk("aty: Backlight initialized (%s)\n", name); - - return; - -error: - return; -} - -static void aty_bl_exit(struct atyfb_par *par) -{ - struct fb_info *info = pci_get_drvdata(par->pdev); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); -#endif - - mutex_lock(&info->bl_mutex); - if (info->bl_dev) { -#ifdef CONFIG_PMAC_BACKLIGHT - if (pmac_backlight == info->bl_dev) - pmac_backlight = NULL; -#endif - - backlight_device_unregister(info->bl_dev); - - printk("aty: Backlight unloaded\n"); - } - mutex_unlock(&info->bl_mutex); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_unlock(&pmac_backlight_mutex); -#endif -} - -#endif /* CONFIG_FB_ATY_BACKLIGHT */ - -static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) +static void __init aty_calc_mem_refresh(struct atyfb_par *par, int xclk) { const int ragepro_tbl[] = { 44, 50, 55, 66, 75, 80, 100 @@ -2347,7 +2215,7 @@ static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, } #endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ -static int __devinit aty_init(struct fb_info *info, const char *name) +static int __init aty_init(struct fb_info *info, const char *name) { struct atyfb_par *par = (struct atyfb_par *) info->par; const char *ramname = NULL, *xtal; @@ -2428,15 +2296,12 @@ static int __devinit aty_init(struct fb_info *info, const char *name) break; } switch (clk_type) { -#ifdef CONFIG_ATARI case CLK_ATI18818_1: par->pll_ops = &aty_pll_ati18818_1; break; -#else case CLK_IBMRGB514: par->pll_ops = &aty_pll_ibm514; break; -#endif #if 0 /* dead code */ case CLK_STG1703: par->pll_ops = &aty_pll_stg1703; @@ -2641,24 +2506,16 @@ static int __devinit aty_init(struct fb_info *info, const char *name) info->fbops = &atyfb_ops; info->pseudo_palette = pseudo_palette; - info->flags = FBINFO_DEFAULT | - FBINFO_HWACCEL_IMAGEBLIT | - FBINFO_HWACCEL_FILLRECT | - FBINFO_HWACCEL_COPYAREA | - FBINFO_HWACCEL_YPAN; + info->flags = FBINFO_FLAG_DEFAULT; #ifdef CONFIG_PMAC_BACKLIGHT if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) { /* these bits let the 101 powerbook wake up from sleep -- paulus */ aty_st_lcd(POWER_MANAGEMENT, aty_ld_lcd(POWER_MANAGEMENT, par) | (USE_F32KHZ | TRISTATE_MEM_EN), par); - } else -#endif - if (M64_HAS(MOBIL_BUS)) { -#ifdef CONFIG_FB_ATY_BACKLIGHT - aty_bl_init (par); -#endif - } + } else if (M64_HAS(MOBIL_BUS)) + register_backlight_controller(&aty_backlight_controller, info, "ati"); +#endif /* CONFIG_PMAC_BACKLIGHT */ memset(&var, 0, sizeof(var)); #ifdef CONFIG_PPC @@ -2774,7 +2631,7 @@ aty_init_exit: } #ifdef CONFIG_ATARI -static int __devinit store_video_par(char *video_str, unsigned char m64_num) +static int __init store_video_par(char *video_str, unsigned char m64_num) { char *p; unsigned long vmembase, size, guiregbase; @@ -2816,9 +2673,9 @@ static int atyfb_blank(int blank, struct fb_info *info) if (par->lock_blank || par->asleep) return 0; -#ifdef CONFIG_FB_ATY_BACKLIGHT +#ifdef CONFIG_PMAC_BACKLIGHT if (machine_is(powermac) && blank > FB_BLANK_NORMAL) - aty_bl_set_power(info, FB_BLANK_POWERDOWN); + set_backlight_enable(0); #elif defined(CONFIG_FB_ATY_GENERIC_LCD) if (par->lcd_table && blank > FB_BLANK_NORMAL && (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { @@ -2848,9 +2705,9 @@ static int atyfb_blank(int blank, struct fb_info *info) } aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); -#ifdef CONFIG_FB_ATY_BACKLIGHT +#ifdef CONFIG_PMAC_BACKLIGHT if (machine_is(powermac) && blank <= FB_BLANK_NORMAL) - aty_bl_set_power(info, FB_BLANK_UNBLANK); + set_backlight_enable(1); #elif defined(CONFIG_FB_ATY_GENERIC_LCD) if (par->lcd_table && blank <= FB_BLANK_NORMAL && (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { @@ -3109,7 +2966,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, } pcp = pdev->sysdata; - if (node == pcp->prom_node->node) { + if (node == pcp->prom_node) { struct fb_var_screeninfo *var = &default_var; unsigned int N, P, Q, M, T, R; u32 v_total, h_total; @@ -3583,7 +3440,6 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi par->res_start = res_start; par->res_size = res_size; par->irq = pdev->irq; - par->pdev = pdev; /* Setup "info" structure */ #ifdef __sparc__ @@ -3715,11 +3571,6 @@ static void __devexit atyfb_remove(struct fb_info *info) aty_set_crtc(par, &saved_crtc); par->pll_ops->set_pll(info, &saved_pll); -#ifdef CONFIG_FB_ATY_BACKLIGHT - if (M64_HAS(MOBIL_BUS)) - aty_bl_exit(par); -#endif - unregister_framebuffer(info); #ifdef CONFIG_MTRR @@ -3789,7 +3640,7 @@ static struct pci_driver atyfb_driver = { #endif /* CONFIG_PCI */ #ifndef MODULE -static int __devinit atyfb_setup(char *options) +static int __init atyfb_setup(char *options) { char *this_opt; @@ -3861,7 +3712,7 @@ static int __devinit atyfb_setup(char *options) } #endif /* MODULE */ -static int __devinit atyfb_init(void) +static int __init atyfb_init(void) { #ifndef MODULE char *option = NULL; @@ -3871,9 +3722,7 @@ static int __devinit atyfb_init(void) atyfb_setup(option); #endif -#ifdef CONFIG_PCI pci_register_driver(&atyfb_driver); -#endif #ifdef CONFIG_ATARI atyfb_atari_probe(); #endif @@ -3882,9 +3731,7 @@ static int __devinit atyfb_init(void) static void __exit atyfb_exit(void) { -#ifdef CONFIG_PCI pci_unregister_driver(&atyfb_driver); -#endif } module_init(atyfb_init); diff --git a/drivers/video/aty/mach64_accel.c b/drivers/video/aty/mach64_accel.c index 1490e5e1c..c98f4a442 100644 --- a/drivers/video/aty/mach64_accel.c +++ b/drivers/video/aty/mach64_accel.c @@ -200,6 +200,8 @@ void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) if (!area->width || !area->height) return; if (!par->accel_flags) { + if (par->blitter_may_be_busy) + wait_for_idle(par); cfb_copyarea(info, area); return; } @@ -246,6 +248,8 @@ void atyfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) if (!rect->width || !rect->height) return; if (!par->accel_flags) { + if (par->blitter_may_be_busy) + wait_for_idle(par); cfb_fillrect(info, rect); return; } @@ -284,10 +288,14 @@ void atyfb_imageblit(struct fb_info *info, const struct fb_image *image) return; if (!par->accel_flags || (image->depth != 1 && info->var.bits_per_pixel != image->depth)) { + if (par->blitter_may_be_busy) + wait_for_idle(par); + cfb_imageblit(info, image); return; } + wait_for_idle(par); pix_width = pix_width_save = aty_ld_le32(DP_PIX_WIDTH, par); host_cntl = aty_ld_le32(HOST_CNTL, par) | HOST_BYTE_ALIGN; @@ -417,6 +425,8 @@ void atyfb_imageblit(struct fb_info *info, const struct fb_image *image) } } + wait_for_idle(par); + /* restore pix_width */ wait_for_fifo(1, par); aty_st_le32(DP_PIX_WIDTH, pix_width_save, par); diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c index 2a7f381c3..ad8b7496f 100644 --- a/drivers/video/aty/mach64_cursor.c +++ b/drivers/video/aty/mach64_cursor.c @@ -66,6 +66,11 @@ static const u8 cursor_bits_lookup[16] = { 0x01, 0x41, 0x11, 0x51, 0x05, 0x45, 0x15, 0x55 }; +static const u8 cursor_mask_lookup[16] = { + 0xaa, 0x2a, 0x8a, 0x0a, 0xa2, 0x22, 0x82, 0x02, + 0xa8, 0x28, 0x88, 0x08, 0xa0, 0x20, 0x80, 0x00 +}; + static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) { struct atyfb_par *par = (struct atyfb_par *) info->par; @@ -125,13 +130,13 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) fg_idx = cursor->image.fg_color; bg_idx = cursor->image.bg_color; - fg = ((info->cmap.red[fg_idx] & 0xff) << 24) | - ((info->cmap.green[fg_idx] & 0xff) << 16) | - ((info->cmap.blue[fg_idx] & 0xff) << 8) | 0xff; + fg = (info->cmap.red[fg_idx] << 24) | + (info->cmap.green[fg_idx] << 16) | + (info->cmap.blue[fg_idx] << 8) | 15; - bg = ((info->cmap.red[bg_idx] & 0xff) << 24) | - ((info->cmap.green[bg_idx] & 0xff) << 16) | - ((info->cmap.blue[bg_idx] & 0xff) << 8); + bg = (info->cmap.red[bg_idx] << 24) | + (info->cmap.green[bg_idx] << 16) | + (info->cmap.blue[bg_idx] << 8); wait_for_fifo(2, par); aty_st_le32(CUR_CLR0, bg, par); @@ -161,17 +166,19 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) switch (cursor->rop) { case ROP_XOR: // Upper 4 bits of mask data - fb_writeb(cursor_bits_lookup[(b ^ m) >> 4], dst++); + fb_writeb(cursor_mask_lookup[m >> 4 ] | + cursor_bits_lookup[(b ^ m) >> 4], dst++); // Lower 4 bits of mask - fb_writeb(cursor_bits_lookup[(b ^ m) & 0x0f], - dst++); + fb_writeb(cursor_mask_lookup[m & 0x0f ] | + cursor_bits_lookup[(b ^ m) & 0x0f], dst++); break; case ROP_COPY: // Upper 4 bits of mask data - fb_writeb(cursor_bits_lookup[(b & m) >> 4], dst++); + fb_writeb(cursor_mask_lookup[m >> 4 ] | + cursor_bits_lookup[(b & m) >> 4], dst++); // Lower 4 bits of mask - fb_writeb(cursor_bits_lookup[(b & m) & 0x0f], - dst++); + fb_writeb(cursor_mask_lookup[m & 0x0f ] | + cursor_bits_lookup[(b & m) & 0x0f], dst++); break; } } @@ -187,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) return 0; } -int __devinit aty_init_cursor(struct fb_info *info) +int __init aty_init_cursor(struct fb_info *info) { unsigned long addr; diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c deleted file mode 100644 index 585eb7b9e..000000000 --- a/drivers/video/aty/radeon_backlight.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Backlight code for ATI Radeon based graphic cards - * - * Copyright (c) 2000 Ani Joshi - * Copyright (c) 2003 Benjamin Herrenschmidt - * Copyright (c) 2006 Michael Hanselmann - * - * 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 "radeonfb.h" -#include - -#ifdef CONFIG_PMAC_BACKLIGHT -#include -#endif - -#define MAX_RADEON_LEVEL 0xFF - -static struct backlight_properties radeon_bl_data; - -struct radeon_bl_privdata { - struct radeonfb_info *rinfo; - uint8_t negative; -}; - -static int radeon_bl_get_level_brightness(struct radeon_bl_privdata *pdata, - int level) -{ - struct fb_info *info = pdata->rinfo->info; - int rlevel; - - mutex_lock(&info->bl_mutex); - - /* Get and convert the value */ - rlevel = pdata->rinfo->info->bl_curve[level] * - FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL; - - mutex_unlock(&info->bl_mutex); - - if (rlevel < 0) - rlevel = 0; - else if (rlevel > MAX_RADEON_LEVEL) - rlevel = MAX_RADEON_LEVEL; - - if (pdata->negative) - rlevel = MAX_RADEON_LEVEL - rlevel; - - return rlevel; -} - -static int radeon_bl_update_status(struct backlight_device *bd) -{ - struct radeon_bl_privdata *pdata = class_get_devdata(&bd->class_dev); - struct radeonfb_info *rinfo = pdata->rinfo; - u32 lvds_gen_cntl, tmpPixclksCntl; - int level; - - if (rinfo->mon1_type != MT_LCD) - return 0; - - /* We turn off the LCD completely instead of just dimming the - * backlight. This provides some greater power saving and the display - * is useless without backlight anyway. - */ - if (bd->props->power != FB_BLANK_UNBLANK || - bd->props->fb_blank != FB_BLANK_UNBLANK) - level = 0; - else - level = bd->props->brightness; - - del_timer_sync(&rinfo->lvds_timer); - radeon_engine_idle(); - - lvds_gen_cntl = INREG(LVDS_GEN_CNTL); - if (level > 0) { - lvds_gen_cntl &= ~LVDS_DISPLAY_DIS; - if (!(lvds_gen_cntl & LVDS_BLON) || !(lvds_gen_cntl & LVDS_ON)) { - lvds_gen_cntl |= (rinfo->init_state.lvds_gen_cntl & LVDS_DIGON); - lvds_gen_cntl |= LVDS_BLON | LVDS_EN; - OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); - lvds_gen_cntl &= ~LVDS_BL_MOD_LEVEL_MASK; - lvds_gen_cntl |= - (radeon_bl_get_level_brightness(pdata, level) << - LVDS_BL_MOD_LEVEL_SHIFT); - lvds_gen_cntl |= LVDS_ON; - lvds_gen_cntl |= (rinfo->init_state.lvds_gen_cntl & LVDS_BL_MOD_EN); - rinfo->pending_lvds_gen_cntl = lvds_gen_cntl; - mod_timer(&rinfo->lvds_timer, - jiffies + msecs_to_jiffies(rinfo->panel_info.pwr_delay)); - } else { - lvds_gen_cntl &= ~LVDS_BL_MOD_LEVEL_MASK; - lvds_gen_cntl |= - (radeon_bl_get_level_brightness(pdata, level) << - LVDS_BL_MOD_LEVEL_SHIFT); - OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); - } - rinfo->init_state.lvds_gen_cntl &= ~LVDS_STATE_MASK; - rinfo->init_state.lvds_gen_cntl |= rinfo->pending_lvds_gen_cntl - & LVDS_STATE_MASK; - } else { - /* Asic bug, when turning off LVDS_ON, we have to make sure - RADEON_PIXCLK_LVDS_ALWAYS_ON bit is off - */ - tmpPixclksCntl = INPLL(PIXCLKS_CNTL); - if (rinfo->is_mobility || rinfo->is_IGP) - OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb); - lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN); - lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) << - LVDS_BL_MOD_LEVEL_SHIFT); - lvds_gen_cntl |= LVDS_DISPLAY_DIS; - OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); - udelay(100); - lvds_gen_cntl &= ~(LVDS_ON | LVDS_EN); - OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); - lvds_gen_cntl &= ~(LVDS_DIGON); - rinfo->pending_lvds_gen_cntl = lvds_gen_cntl; - mod_timer(&rinfo->lvds_timer, - jiffies + msecs_to_jiffies(rinfo->panel_info.pwr_delay)); - if (rinfo->is_mobility || rinfo->is_IGP) - OUTPLL(PIXCLKS_CNTL, tmpPixclksCntl); - } - rinfo->init_state.lvds_gen_cntl &= ~LVDS_STATE_MASK; - rinfo->init_state.lvds_gen_cntl |= (lvds_gen_cntl & LVDS_STATE_MASK); - - return 0; -} - -static int radeon_bl_get_brightness(struct backlight_device *bd) -{ - return bd->props->brightness; -} - -static struct backlight_properties radeon_bl_data = { - .owner = THIS_MODULE, - .get_brightness = radeon_bl_get_brightness, - .update_status = radeon_bl_update_status, - .max_brightness = (FB_BACKLIGHT_LEVELS - 1), -}; - -void radeonfb_bl_init(struct radeonfb_info *rinfo) -{ - struct backlight_device *bd; - struct radeon_bl_privdata *pdata; - char name[12]; - - if (rinfo->mon1_type != MT_LCD) - return; - -#ifdef CONFIG_PMAC_BACKLIGHT - if (!pmac_has_backlight_type("ati") && - !pmac_has_backlight_type("mnca")) - return; -#endif - - pdata = kmalloc(sizeof(struct radeon_bl_privdata), GFP_KERNEL); - if (!pdata) { - printk("radeonfb: Memory allocation failed\n"); - goto error; - } - - snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node); - - bd = backlight_device_register(name, pdata, &radeon_bl_data); - if (IS_ERR(bd)) { - rinfo->info->bl_dev = NULL; - printk("radeonfb: Backlight registration failed\n"); - goto error; - } - - pdata->rinfo = rinfo; - - /* Pardon me for that hack... maybe some day we can figure out in what - * direction backlight should work on a given panel? - */ - pdata->negative = - (rinfo->family != CHIP_FAMILY_RV200 && - rinfo->family != CHIP_FAMILY_RV250 && - rinfo->family != CHIP_FAMILY_RV280 && - rinfo->family != CHIP_FAMILY_RV350); - -#ifdef CONFIG_PMAC_BACKLIGHT - pdata->negative = pdata->negative || - machine_is_compatible("PowerBook4,3") || - machine_is_compatible("PowerBook6,3") || - machine_is_compatible("PowerBook6,5"); -#endif - - mutex_lock(&rinfo->info->bl_mutex); - rinfo->info->bl_dev = bd; - fb_bl_default_curve(rinfo->info, 0, - 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, - 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); - mutex_unlock(&rinfo->info->bl_mutex); - - down(&bd->sem); - bd->props->brightness = radeon_bl_data.max_brightness; - bd->props->power = FB_BLANK_UNBLANK; - bd->props->update_status(bd); - up(&bd->sem); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - if (!pmac_backlight) - pmac_backlight = bd; - mutex_unlock(&pmac_backlight_mutex); -#endif - - printk("radeonfb: Backlight initialized (%s)\n", name); - - return; - -error: - kfree(pdata); - return; -} - -void radeonfb_bl_exit(struct radeonfb_info *rinfo) -{ -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); -#endif - - mutex_lock(&rinfo->info->bl_mutex); - if (rinfo->info->bl_dev) { - struct radeon_bl_privdata *pdata; - -#ifdef CONFIG_PMAC_BACKLIGHT - if (pmac_backlight == rinfo->info->bl_dev) - pmac_backlight = NULL; -#endif - - pdata = class_get_devdata(&rinfo->info->bl_dev->class_dev); - backlight_device_unregister(rinfo->info->bl_dev); - kfree(pdata); - rinfo->info->bl_dev = NULL; - - printk("radeonfb: Backlight unloaded\n"); - } - mutex_unlock(&rinfo->info->bl_mutex); - -#ifdef CONFIG_PMAC_BACKLIGHT - mutex_unlock(&pmac_backlight_mutex); -#endif -} diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 8e3400d5d..085cf8022 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -52,12 +52,14 @@ #define RADEON_VERSION "0.2.0" +#include #include #include #include #include #include #include +#include #include #include #include @@ -76,6 +78,10 @@ #include #include "../macmodes.h" +#ifdef CONFIG_PMAC_BACKLIGHT +#include +#endif + #ifdef CONFIG_BOOTX_TEXT #include #endif @@ -266,13 +272,28 @@ static int force_measure_pll = 0; #ifdef CONFIG_MTRR static int nomtrr = 0; #endif -static int force_sleep; -static int ignore_devlist; +#if defined(CONFIG_PM) && defined(CONFIG_X86) +int radeon_force_sleep = 0; +#endif /* * prototypes */ + +#ifdef CONFIG_PPC_OF + +#ifdef CONFIG_PMAC_BACKLIGHT +static int radeon_set_backlight_enable(int on, int level, void *data); +static int radeon_set_backlight_level(int level, void *data); +static struct backlight_controller radeon_backlight_controller = { + radeon_set_backlight_enable, + radeon_set_backlight_level +}; +#endif /* CONFIG_PMAC_BACKLIGHT */ + +#endif /* CONFIG_PPC_OF */ + static void radeon_unmap_ROM(struct radeonfb_info *rinfo, struct pci_dev *dev) { if (!rinfo->bios_seg) @@ -1895,6 +1916,116 @@ static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo) return 0; } + +#ifdef CONFIG_PMAC_BACKLIGHT + +/* TODO: Dbl check these tables, we don't go up to full ON backlight + * in these, possibly because we noticed MacOS doesn't, but I'd prefer + * having some more official numbers from ATI + */ +static int backlight_conv_m6[] = { + 0xff, 0xc0, 0xb5, 0xaa, 0x9f, 0x94, 0x89, 0x7e, + 0x73, 0x68, 0x5d, 0x52, 0x47, 0x3c, 0x31, 0x24 +}; +static int backlight_conv_m7[] = { + 0x00, 0x3f, 0x4a, 0x55, 0x60, 0x6b, 0x76, 0x81, + 0x8c, 0x97, 0xa2, 0xad, 0xb8, 0xc3, 0xce, 0xd9 +}; + +#define BACKLIGHT_LVDS_OFF +#undef BACKLIGHT_DAC_OFF + +/* We turn off the LCD completely instead of just dimming the backlight. + * This provides some greater power saving and the display is useless + * without backlight anyway. + */ +static int radeon_set_backlight_enable(int on, int level, void *data) +{ + struct radeonfb_info *rinfo = (struct radeonfb_info *)data; + u32 lvds_gen_cntl, tmpPixclksCntl; + int* conv_table; + + if (rinfo->mon1_type != MT_LCD) + return 0; + + /* Pardon me for that hack... maybe some day we can figure + * out in what direction backlight should work on a given + * panel ? + */ + if ((rinfo->family == CHIP_FAMILY_RV200 || + rinfo->family == CHIP_FAMILY_RV250 || + rinfo->family == CHIP_FAMILY_RV280 || + rinfo->family == CHIP_FAMILY_RV350) && + !machine_is_compatible("PowerBook4,3") && + !machine_is_compatible("PowerBook6,3") && + !machine_is_compatible("PowerBook6,5")) + conv_table = backlight_conv_m7; + else + conv_table = backlight_conv_m6; + + del_timer_sync(&rinfo->lvds_timer); + radeon_engine_idle(); + + lvds_gen_cntl = INREG(LVDS_GEN_CNTL); + if (on && (level > BACKLIGHT_OFF)) { + lvds_gen_cntl &= ~LVDS_DISPLAY_DIS; + if (!(lvds_gen_cntl & LVDS_BLON) || !(lvds_gen_cntl & LVDS_ON)) { + lvds_gen_cntl |= (rinfo->init_state.lvds_gen_cntl & LVDS_DIGON); + lvds_gen_cntl |= LVDS_BLON | LVDS_EN; + OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); + lvds_gen_cntl &= ~LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= (conv_table[level] << + LVDS_BL_MOD_LEVEL_SHIFT); + lvds_gen_cntl |= LVDS_ON; + lvds_gen_cntl |= (rinfo->init_state.lvds_gen_cntl & LVDS_BL_MOD_EN); + rinfo->pending_lvds_gen_cntl = lvds_gen_cntl; + mod_timer(&rinfo->lvds_timer, + jiffies + msecs_to_jiffies(rinfo->panel_info.pwr_delay)); + } else { + lvds_gen_cntl &= ~LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= (conv_table[level] << + LVDS_BL_MOD_LEVEL_SHIFT); + OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); + } + rinfo->init_state.lvds_gen_cntl &= ~LVDS_STATE_MASK; + rinfo->init_state.lvds_gen_cntl |= rinfo->pending_lvds_gen_cntl + & LVDS_STATE_MASK; + } else { + /* Asic bug, when turning off LVDS_ON, we have to make sure + RADEON_PIXCLK_LVDS_ALWAYS_ON bit is off + */ + tmpPixclksCntl = INPLL(PIXCLKS_CNTL); + if (rinfo->is_mobility || rinfo->is_IGP) + OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb); + lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN); + lvds_gen_cntl |= (conv_table[0] << + LVDS_BL_MOD_LEVEL_SHIFT); + lvds_gen_cntl |= LVDS_DISPLAY_DIS; + OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); + udelay(100); + lvds_gen_cntl &= ~(LVDS_ON | LVDS_EN); + OUTREG(LVDS_GEN_CNTL, lvds_gen_cntl); + lvds_gen_cntl &= ~(LVDS_DIGON); + rinfo->pending_lvds_gen_cntl = lvds_gen_cntl; + mod_timer(&rinfo->lvds_timer, + jiffies + msecs_to_jiffies(rinfo->panel_info.pwr_delay)); + if (rinfo->is_mobility || rinfo->is_IGP) + OUTPLL(PIXCLKS_CNTL, tmpPixclksCntl); + } + rinfo->init_state.lvds_gen_cntl &= ~LVDS_STATE_MASK; + rinfo->init_state.lvds_gen_cntl |= (lvds_gen_cntl & LVDS_STATE_MASK); + + return 0; +} + + +static int radeon_set_backlight_level(int level, void *data) +{ + return radeon_set_backlight_enable(1, level, data); +} +#endif /* CONFIG_PMAC_BACKLIGHT */ + + /* * This reconfigure the card's internal memory map. In theory, we'd like * to setup the card's memory at the same address as it's PCI bus address, @@ -2329,9 +2460,9 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, /* -2 is special: means ON on mobility chips and do not * change on others */ - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep); + radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1); } else - radeonfb_pm_init(rinfo, default_dynclk, ignore_devlist, force_sleep); + radeonfb_pm_init(rinfo, default_dynclk); pci_set_drvdata(pdev, info); @@ -2349,7 +2480,14 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, MTRR_TYPE_WRCOMB, 1); #endif - radeonfb_bl_init(rinfo); +#ifdef CONFIG_PMAC_BACKLIGHT + if (rinfo->mon1_type == MT_LCD) { + register_backlight_controller(&radeon_backlight_controller, + rinfo, "ati"); + register_backlight_controller(&radeon_backlight_controller, + rinfo, "mnca"); + } +#endif printk ("radeonfb (%s): %s\n", pci_name(rinfo->pdev), rinfo->name); @@ -2379,6 +2517,7 @@ err_release_pci0: err_release_fb: framebuffer_release(info); err_disable: + pci_disable_device(pdev); err_out: return ret; } @@ -2392,8 +2531,7 @@ static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) if (!rinfo) return; - - radeonfb_bl_exit(rinfo); + radeonfb_pm_exit(rinfo); if (rinfo->mon1_EDID) @@ -2435,6 +2573,7 @@ static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) #endif fb_dealloc_cmap(&info->cmap); framebuffer_release(info); + pci_disable_device(pdev); } @@ -2480,10 +2619,8 @@ static int __init radeonfb_setup (char *options) } else if (!strncmp(this_opt, "ignore_edid", 11)) { ignore_edid = 1; #if defined(CONFIG_PM) && defined(CONFIG_X86) - } else if (!strncmp(this_opt, "force_sleep", 11)) { - force_sleep = 1; - } else if (!strncmp(this_opt, "ignore_devlist", 14)) { - ignore_devlist = 1; + } else if (!strncmp(this_opt, "force_sleep", 11)) { + radeon_force_sleep = 1; #endif } else mode_option = this_opt; @@ -2541,8 +2678,6 @@ MODULE_PARM_DESC(panel_yres, "int: set panel yres"); module_param(mode_option, charp, 0); MODULE_PARM_DESC(mode_option, "Specify resolution as \"x[-][@]\" "); #if defined(CONFIG_PM) && defined(CONFIG_X86) -module_param(force_sleep, bool, 0); -MODULE_PARM_DESC(force_sleep, "bool: force D2 sleep mode on all hardware"); -module_param(ignore_devlist, bool, 0); -MODULE_PARM_DESC(ignore_devlist, "bool: ignore workarounds for bugs in specific laptops"); +module_param(radeon_force_sleep, int, 0); +MODULE_PARM_DESC(radeon_force_sleep, "bool: force ACPI sleep mode on untested machines"); #endif diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c index 9aaca58c0..a9d0414e4 100644 --- a/drivers/video/aty/radeon_i2c.c +++ b/drivers/video/aty/radeon_i2c.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index f31e606a2..459fda622 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c @@ -25,100 +25,25 @@ #include #endif -#include "ati_ids.h" +/* For detecting supported PC laptops */ +#ifdef CONFIG_X86 +#include +#endif -static void radeon_reinitialize_M10(struct radeonfb_info *rinfo); +#include "ati_ids.h" -/* - * Workarounds for bugs in PC laptops: - * - enable D2 sleep in some IBM Thinkpads - * - special case for Samsung P35 - * - * Whitelist by subsystem vendor/device because - * its the subsystem vendor's fault! +#ifdef CONFIG_X86 +/* This array holds a list of supported PC laptops. + * Currently only few IBM models are tested. + * If you want to experiment, use dmidecode to find out + * vendor and product codes for Your laptop. */ - -#if defined(CONFIG_PM) && defined(CONFIG_X86) -struct radeon_device_id { - const char *ident; /* (arbitrary) Name */ - const unsigned short subsystem_vendor; /* Subsystem Vendor ID */ - const unsigned short subsystem_device; /* Subsystem Device ID */ - const enum radeon_pm_mode pm_mode_modifier; /* modify pm_mode */ - const reinit_function_ptr new_reinit_func; /* changed reinit_func */ -}; - -#define BUGFIX(model, sv, sd, pm, fn) { \ - .ident = model, \ - .subsystem_vendor = sv, \ - .subsystem_device = sd, \ - .pm_mode_modifier = pm, \ - .new_reinit_func = fn \ -} - -static struct radeon_device_id radeon_workaround_list[] = { - BUGFIX("IBM Thinkpad R32", - PCI_VENDOR_ID_IBM, 0x1905, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad R40", - PCI_VENDOR_ID_IBM, 0x0526, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad R40", - PCI_VENDOR_ID_IBM, 0x0527, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad R50/R51/T40/T41", - PCI_VENDOR_ID_IBM, 0x0531, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad R51/T40/T41/T42", - PCI_VENDOR_ID_IBM, 0x0530, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad T30", - PCI_VENDOR_ID_IBM, 0x0517, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad T40p", - PCI_VENDOR_ID_IBM, 0x054d, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad T42", - PCI_VENDOR_ID_IBM, 0x0550, - radeon_pm_d2, NULL), - BUGFIX("IBM Thinkpad X31/X32", - PCI_VENDOR_ID_IBM, 0x052f, - radeon_pm_d2, NULL), - BUGFIX("Samsung P35", - PCI_VENDOR_ID_SAMSUNG, 0xc00c, - radeon_pm_off, radeon_reinitialize_M10), - { .ident = NULL } +static struct dmi_system_id __devinitdata radeonfb_dmi_table[] = { +#include "radeon_pm_whitelist.h" }; -static int radeon_apply_workarounds(struct radeonfb_info *rinfo) -{ - struct radeon_device_id *id; - - for (id = radeon_workaround_list; id->ident != NULL; id++ ) - if ((id->subsystem_vendor == rinfo->pdev->subsystem_vendor ) && - (id->subsystem_device == rinfo->pdev->subsystem_device )) { - - /* we found a device that requires workaround */ - printk(KERN_DEBUG "radeonfb: %s detected" - ", enabling workaround\n", id->ident); - - rinfo->pm_mode |= id->pm_mode_modifier; - - if (id->new_reinit_func != NULL) - rinfo->reinit_func = id->new_reinit_func; - - return 1; - } - return 0; /* not found */ -} - -#else /* defined(CONFIG_PM) && defined(CONFIG_X86) */ -static inline int radeon_apply_workarounds(struct radeonfb_info *rinfo) -{ - return 0; -} -#endif /* defined(CONFIG_PM) && defined(CONFIG_X86) */ - - +extern int radeon_force_sleep; +#endif static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo) { @@ -951,18 +876,18 @@ static void radeon_pm_setup_for_suspend(struct radeonfb_info *rinfo) * now (until we get more info on how to compute the correct * value for various X86 bridges). */ + #ifdef CONFIG_PPC_PMAC - if (machine_is(powermac)) { - /* AGP PLL control */ - if (rinfo->family <= CHIP_FAMILY_RV280) { - OUTREG(BUS_CNTL1, INREG(BUS_CNTL1) | BUS_CNTL1__AGPCLK_VALID); - OUTREG(BUS_CNTL1, - (INREG(BUS_CNTL1) & ~BUS_CNTL1__MOBILE_PLATFORM_SEL_MASK) - | (2<family <= CHIP_FAMILY_RV280) { + OUTREG(BUS_CNTL1, INREG(BUS_CNTL1) | BUS_CNTL1__AGPCLK_VALID); + + OUTREG(BUS_CNTL1, + (INREG(BUS_CNTL1) & ~BUS_CNTL1__MOBILE_PLATFORM_SEL_MASK) + | (2<pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM); @@ -2830,13 +2755,22 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis } #if defined(CONFIG_PM) -#if defined(CONFIG_PPC_PMAC) /* Check if we can power manage on suspend/resume. We can do * D2 on M6, M7 and M9, and we can resume from D3 cold a few other * "Mac" cards, but that's all. We need more infos about what the * BIOS does tho. Right now, all this PM stuff is pmac-only for that * reason. --BenH */ + /* Special case for Samsung P35 laptops + */ + if ((rinfo->pdev->vendor == PCI_VENDOR_ID_ATI) && + (rinfo->pdev->device == PCI_CHIP_RV350_NP) && + (rinfo->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG) && + (rinfo->pdev->subsystem_device == 0xc00c)) { + rinfo->reinit_func = radeon_reinitialize_M10; + rinfo->pm_mode |= radeon_pm_off; + } +#if defined(CONFIG_PPC_PMAC) if (machine_is(powermac) && rinfo->of_node) { if (rinfo->is_mobility && rinfo->pm_reg && rinfo->family <= CHIP_FAMILY_RV250) @@ -2883,17 +2817,28 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis #endif /* defined(CONFIG_PPC_PMAC) */ #endif /* defined(CONFIG_PM) */ - if (ignore_devlist) - printk(KERN_DEBUG - "radeonfb: skipping test for device workarounds\n"); - else - radeon_apply_workarounds(rinfo); +/* The PM code also works on some PC laptops. + * Only a few models are actually tested so Your mileage may vary. + * We can do D2 on at least M7 and M9 on some IBM ThinkPad T41 models. + */ +#if defined(CONFIG_PM) && defined(CONFIG_X86) + if (radeon_force_sleep || dmi_check_system(radeonfb_dmi_table)) { + if (radeon_force_sleep) + printk("radeonfb: forcefully enabling sleep mode\n"); + else + printk("radeonfb: enabling sleep mode\n"); + + if (rinfo->is_mobility && rinfo->pm_reg && + rinfo->family <= CHIP_FAMILY_RV250) + rinfo->pm_mode |= radeon_pm_d2; - if (force_sleep) { - printk(KERN_DEBUG - "radeonfb: forcefully enabling D2 sleep mode\n"); - rinfo->pm_mode |= radeon_pm_d2; + /* Power down TV DAC, that saves a significant amount of power, + * we'll have something better once we actually have some TVOut + * support + */ + OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000); } +#endif /* defined(CONFIG_PM) && defined(CONFIG_X86) */ } void radeonfb_pm_exit(struct radeonfb_info *rinfo) diff --git a/drivers/video/aty/radeon_pm_whitelist.h b/drivers/video/aty/radeon_pm_whitelist.h new file mode 100644 index 000000000..c484ee7f8 --- /dev/null +++ b/drivers/video/aty/radeon_pm_whitelist.h @@ -0,0 +1,78 @@ +#define E(_vendor, _product, _ident, _reporter) \ +{ /* _reporter */ \ + .ident = _ident, \ + .matches = { \ + DMI_MATCH(DMI_SYS_VENDOR, _vendor), \ + DMI_MATCH(DMI_PRODUCT_NAME, _product), \ + }, \ +} +E("IBM", "18297RG", "IBM ThinkPad R50", "Borschuk Oleg "), +E("IBM", "18299MG", "IBM ThinkPad R51", "Georges Herber "), +E("IBM", "1829EHG", "IBM ThinkPad R51", "Wouter Cloetens "), +E("IBM", "1829R6G", "IBM ThinkPad R51", "Sten Heinze"), +E("IBM", "1836Q6U", "IBM ThinkPad R51", "Eugene Pavlovsky"), +E("IBM", "236696G", "IBM ThinkPad T30", "Jakob Schiotz "), +E("IBM", "236697G", "IBM ThinkPad T30", "Stephan Groß "), +E("IBM", "2366JBG", "IBM ThinkPad T30", "Thomas M Steenholdt "), +E("IBM", "2366MU9", "IBM ThinkPad T30", "Phillip Jones "), +E("IBM", "2366QU5", "IBM ThinkPad T30", "ChazeFroy "), +/* brads's 2366QU8 works, but dmidecode shows bogus data */ +E("IBM", "2366QU8", "IBM ThinkPad T30", "Brad Smith "), +E("IBM", "23729CU", "IBM ThinkPad T40", "George Avrunin "), +E("IBM", "237314U", "IBM ThinkPad T40", "Dmitriy Zavin "), +E("IBM", "23731FG", "IBM ThinkPad T41", "Aivo Prykk "), +E("IBM", "237322G", "IBM ThinkPad T40", "Michele Lamarca "), +E("IBM", "237325G", "IBM ThinkPad T40", "Klaus Kurzmann "), +E("IBM", "23732FG", "IBM ThinkPad T41", "Antti Andreimann "), +E("IBM", "23733HM", "IBM ThinkPad T41", "Grahame Bowland "), +E("IBM", "23734G2", "IBM ThinkPad T40", "Antti P Miettinen "), +E("IBM", "23737JU", "IBM ThinkPad T41", "Matthew Saltzman "), +E("IBM", "23738CG", "IBM ThinkPad T40", "Pete Toscano "), +E("IBM", "237392G", "IBM ThinkPad T40", "Pete Toscano "), +E("IBM", "237394G", "IBM ThinkPad T40", "Manuel Carro "), +E("IBM", "237394U", "IBM ThinkPad T40", "Pete Toscano "), +E("IBM", "23739FU", "IBM ThinkPad T41", "Peter Jones "), +E("IBM", "23739HG", "IBM ThinkPad T41", "Chris Vanden Berghe "), +E("IBM", "23739HU", "IBM ThinkPad T41", "Ajay Ramaswamy "), +E("IBM", "2373BU7", "IBM ThinkPad T40", "Peter Jones "), +E("IBM", "2373F2G", "IBM ThinkPad T42", "Isaac Wilcox"), +E("IBM", "2373FWG", "IBM ThinkPad T42", "Jerome Poggi and Pete Toscano "), +E("IBM", "2373G1G", "IBM ThinkPad T40p", "Juerg Billeter "), +E("IBM", "2373G1U", "IBM ThinkPad T40p", "Bill Nottingham "), +E("IBM", "2373G3G", "IBM ThinkPad T40p", "Hartwig, Thomas "), +E("IBM", "2373GEU", "IBM ThinkPad T41p", "Eric Benson "), +E("IBM", "2373HU6", "IBM ThinkPad T41", "David Zeuthen "), +E("IBM", "2373JTU", "IBM ThinkPad T42", "Dwight Barkley "), +E("IBM", "2373MU4", "IBM ThinkPad T40", "Vernon Mauery "), +E("IBM", "2373RU1", "IBM ThinkPad T40", "Adam Glasgall "), +E("IBM", "2373TG5", "IBM ThinkPad T41", "Paul Ionescu "), +E("IBM", "2373XNX", "IBM ThinkPad T41", "Ajay Ramaswamy "), +E("IBM", "23746VU", "IBM ThinkPad T42", "Tim Hull "), +E("IBM", "2374CTO", "IBM ThinkPad T42", "Johannes Hansen"), +E("IBM", "2374ZEP", "IBM ThinkPad T42", "Johannes Hansen"), +E("IBM", "2378DEU", "IBM ThinkPad T41", "obi "), +E("IBM", "2378DLU", "IBM ThinkPad T41", "Paul Stanisci "), +E("IBM", "2378DUU", "IBM ThinkPad T42", "Austin Clements "), +E("IBM", "2378R2U", "IBM ThinkPad T42", "Ulrich Drepper "), +E("IBM", "2378RBF", "IBM ThinkPad T42", "Nicolas Dufresne "), +E("IBM", "2378RBU", "IBM ThinkPad T42", "Nicolas Dufresne "), +E("IBM", "2378XXE", "IBM ThinkPad T42", "Tom Marshall"), +E("IBM", "2379D6U", "IBM ThinkPad T41", "anonymous"), +E("IBM", "2379DJU", "IBM ThinkPad T41", "Volker Braun "), +E("IBM", "2658BQG", "IBM ThinkPad R32", "Frank Otto "), +E("IBM", "26725KU", "IBM ThinkPad X31", "Chris Lee "), +E("IBM", "2672A9U", "IBM ThinkPad X31", "Jeremy Katz "), +E("IBM", "2672JHG", "IBM ThinkPad X31", "Daniel P. Berrange "), +E("IBM", "2672RU3", "IBM ThinkPad X31", "Chris Blizzard "), + /* IBM ThinkPad X31 2672-XXH -> works, but doesn't fix the LCD + backlight on during S3 issue. */ +E("IBM", "2672XXH", "IBM ThinkPad X31", "Henrik Brix Andersen "), +E("IBM", "27223GG", "IBM ThinkPad R40", "Frank Schmitt "), +E("IBM", "27225MG", "IBM ThinkPad R40", "Nils Trebing "), +E("IBM", "27226YU", "IBM ThinkPad R40", "Rushi Bhatt"), +E("IBM", "2722B3G", "IBM ThinkPad R40", "Pete Toscano "), +E("IBM", "2722CDG", "IBM ThinkPad R40", "Meik Hellmund "), +{ }, +/* Negative reports: */ +/* E("IBM", "2373KUU", "IBM ThinkPad T42p", "Dax Kelson "), */ +#undef E diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index d5ff224a6..217e00ab4 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h @@ -1,6 +1,7 @@ #ifndef __RADEONFB_H__ #define __RADEONFB_H__ +#include #include #include #include @@ -273,8 +274,6 @@ enum radeon_pm_mode { radeon_pm_off = 0x00000002, /* Can resume from D3 cold */ }; -typedef void (*reinit_function_ptr)(struct radeonfb_info *rinfo); - struct radeonfb_info { struct fb_info *info; @@ -340,7 +339,7 @@ struct radeonfb_info { int dynclk; int no_schedule; enum radeon_pm_mode pm_mode; - reinit_function_ptr reinit_func; + void (*reinit_func)(struct radeonfb_info *rinfo); /* Lock on register access */ spinlock_t reg_lock; @@ -383,7 +382,7 @@ struct radeonfb_info { /* Note about this function: we have some rare cases where we must not schedule, * this typically happen with our special "wake up early" hook which allows us to * wake up the graphic chip (and thus get the console back) before everything else - * on some machines that support that mechanism. At this point, interrupts are off + * on some machines that support that mecanism. At this point, interrupts are off * and scheduling is not permitted */ static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms) @@ -602,7 +601,7 @@ extern int radeon_probe_i2c_connector(struct radeonfb_info *rinfo, int conn, u8 /* PM Functions */ extern int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state); extern int radeonfb_pci_resume(struct pci_dev *pdev); -extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlist, int force_sleep); +extern void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk); extern void radeonfb_pm_exit(struct radeonfb_info *rinfo); /* Monitor probe functions */ @@ -626,13 +625,4 @@ extern int radeon_screen_blank(struct radeonfb_info *rinfo, int blank, int mode_ extern void radeon_write_mode (struct radeonfb_info *rinfo, struct radeon_regs *mode, int reg_only); -/* Backlight functions */ -#ifdef CONFIG_FB_RADEON_BACKLIGHT -extern void radeonfb_bl_init(struct radeonfb_info *rinfo); -extern void radeonfb_bl_exit(struct radeonfb_info *rinfo); -#else -static inline void radeonfb_bl_init(struct radeonfb_info *rinfo) {} -static inline void radeonfb_bl_exit(struct radeonfb_info *rinfo) {} -#endif - #endif /* __RADEONFB_H__ */ diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index f25d5d648..789450bb0 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c @@ -7,8 +7,6 @@ * Karl Lessard * * - * PM support added by Rodolfo Giometti - * * Copyright 2002 MontaVista Software * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com @@ -40,6 +38,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -156,7 +155,7 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) info->fix.visual = FB_VISUAL_TRUECOLOR; info->fix.line_length = info->var.xres_virtual << 1; /* depth=16 */ - } + } } else { /* mono */ info->fix.visual = FB_VISUAL_MONO10; @@ -164,16 +163,20 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) } info->screen_size = info->fix.line_length * info->var.yres_virtual; - info->var.rotate = ((fbdev->panel->control_base&LCD_CONTROL_SM_MASK) \ - >> LCD_CONTROL_SM_BIT) * 90; /* Determine BPP mode and format */ - fbdev->regs->lcd_control = fbdev->panel->control_base; + fbdev->regs->lcd_control = fbdev->panel->control_base | + ((info->var.rotate/90) << LCD_CONTROL_SM_BIT); + + fbdev->regs->lcd_intenable = 0; + fbdev->regs->lcd_intstatus = 0; + fbdev->regs->lcd_horztiming = fbdev->panel->horztiming; + fbdev->regs->lcd_verttiming = fbdev->panel->verttiming; + fbdev->regs->lcd_clkcontrol = fbdev->panel->clkcontrol_base; - fbdev->regs->lcd_intenable = 0; - fbdev->regs->lcd_intstatus = 0; + fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(fbdev->fb_phys); if (panel_is_dual(fbdev->panel)) { @@ -202,8 +205,6 @@ int au1100fb_setmode(struct au1100fb_device *fbdev) /* Resume controller */ fbdev->regs->lcd_control |= LCD_CONTROL_GO; - mdelay(10); - au1100fb_fb_blank(VESA_NO_BLANKING, info); return 0; } @@ -601,52 +602,17 @@ int au1100fb_drv_remove(struct device *dev) return 0; } -#ifdef CONFIG_PM -static u32 sys_clksrc; -static struct au1100fb_regs fbregs; - int au1100fb_drv_suspend(struct device *dev, pm_message_t state) { - struct au1100fb_device *fbdev = dev_get_drvdata(dev); - - if (!fbdev) - return 0; - - /* Save the clock source state */ - sys_clksrc = au_readl(SYS_CLKSRC); - - /* Blank the LCD */ - au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info); - - /* Stop LCD clocking */ - au_writel(sys_clksrc & ~SYS_CS_ML_MASK, SYS_CLKSRC); - - memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs)); - + /* TODO */ return 0; } int au1100fb_drv_resume(struct device *dev) { - struct au1100fb_device *fbdev = dev_get_drvdata(dev); - - if (!fbdev) - return 0; - - memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs)); - - /* Restart LCD clocking */ - au_writel(sys_clksrc, SYS_CLKSRC); - - /* Unblank the LCD */ - au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info); - + /* TODO */ return 0; } -#else -#define au1100fb_drv_suspend NULL -#define au1100fb_drv_resume NULL -#endif static struct device_driver au1100fb_driver = { .name = "au1100-lcd", @@ -740,7 +706,8 @@ void __exit au1100fb_cleanup(void) { driver_unregister(&au1100fb_driver); - kfree(drv_info.opt_mode); + if (drv_info.opt_mode) + kfree(drv_info.opt_mode); } module_init(au1100fb_init); diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index c6a5f0ccc..600d3e0e0 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c @@ -1694,7 +1694,7 @@ static int au1200fb_drv_probe(struct device *dev) /* Now hook interrupt too */ if ((ret = request_irq(AU1200_LCD_INT, au1200fb_handle_irq, - IRQF_DISABLED | IRQF_SHARED, "lcd", (void *)dev)) < 0) { + SA_INTERRUPT | SA_SHIRQ, "lcd", (void *)dev)) < 0) { print_err("fail to request interrupt line %d (err: %d)", AU1200_LCD_INT, ret); goto failed; diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 02f15297a..b895eaaa7 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -50,14 +50,6 @@ config BACKLIGHT_CORGI If you have a Sharp Zaurus SL-C7xx, SL-Cxx00 or SL-6000x say y to enable the backlight driver. -config BACKLIGHT_LOCOMO - tristate "Sharp LOCOMO LCD/Backlight Driver" - depends on BACKLIGHT_DEVICE && SHARP_LOCOMO - default y - help - If you have a Sharp Zaurus SL-5500 (Collie) or SL-5600 (Poodle) say y to - enable the LCD/backlight driver. - config BACKLIGHT_HP680 tristate "HP Jornada 680 Backlight Driver" depends on BACKLIGHT_DEVICE && SH_HP6XX diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile index 65e5553fc..744210c38 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -4,4 +4,4 @@ obj-$(CONFIG_LCD_CLASS_DEVICE) += lcd.o obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o obj-$(CONFIG_BACKLIGHT_CORGI) += corgi_bl.o obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o -obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o +obj-$(CONFIG_SHARP_LOCOMO) += locomolcd.o diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index ffc72ae3a..a71e984c9 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c @@ -27,7 +27,7 @@ static int hp680bl_suspended; static int current_intensity = 0; -static DEFINE_SPINLOCK(bl_lock); +static spinlock_t bl_lock = SPIN_LOCK_UNLOCKED; static struct backlight_device *hp680_backlight_device; static void hp680bl_send_intensity(struct backlight_device *bd) diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index caf1eca19..60831bb23 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c @@ -11,13 +11,12 @@ */ /* LCD power functions */ +#include #include #include #include #include #include -#include -#include #include #include @@ -26,10 +25,7 @@ #include "../../../arch/arm/mach-sa1100/generic.h" -static struct backlight_device *locomolcd_bl_device; static struct locomo_dev *locomolcd_dev; -static unsigned long locomolcd_flags; -#define LOCOMOLCD_SUSPENDED 0x01 static void locomolcd_on(int comadj) { @@ -93,10 +89,12 @@ void locomolcd_power(int on) } /* read comadj */ - if (comadj == -1 && machine_is_collie()) - comadj = 128; - if (comadj == -1 && machine_is_poodle()) - comadj = 118; + if (comadj == -1) { + if (machine_is_poodle()) + comadj = 118; + if (machine_is_collie()) + comadj = 128; + } if (on) locomolcd_on(comadj); @@ -107,100 +105,26 @@ void locomolcd_power(int on) } EXPORT_SYMBOL(locomolcd_power); - -static int current_intensity; - -static int locomolcd_set_intensity(struct backlight_device *bd) -{ - int intensity = bd->props->brightness; - - if (bd->props->power != FB_BLANK_UNBLANK) - intensity = 0; - if (bd->props->fb_blank != FB_BLANK_UNBLANK) - intensity = 0; - if (locomolcd_flags & LOCOMOLCD_SUSPENDED) - intensity = 0; - - switch (intensity) { - /* AC and non-AC are handled differently, but produce same results in sharp code? */ - case 0: locomo_frontlight_set(locomolcd_dev, 0, 0, 161); break; - case 1: locomo_frontlight_set(locomolcd_dev, 117, 0, 161); break; - case 2: locomo_frontlight_set(locomolcd_dev, 163, 0, 148); break; - case 3: locomo_frontlight_set(locomolcd_dev, 194, 0, 161); break; - case 4: locomo_frontlight_set(locomolcd_dev, 194, 1, 161); break; - - default: - return -ENODEV; - } - current_intensity = intensity; - return 0; -} - -static int locomolcd_get_intensity(struct backlight_device *bd) -{ - return current_intensity; -} - -static struct backlight_properties locomobl_data = { - .owner = THIS_MODULE, - .get_brightness = locomolcd_get_intensity, - .update_status = locomolcd_set_intensity, - .max_brightness = 4, -}; - -#ifdef CONFIG_PM -static int locomolcd_suspend(struct locomo_dev *dev, pm_message_t state) -{ - locomolcd_flags |= LOCOMOLCD_SUSPENDED; - locomolcd_set_intensity(locomolcd_bl_device); - return 0; -} - -static int locomolcd_resume(struct locomo_dev *dev) -{ - locomolcd_flags &= ~LOCOMOLCD_SUSPENDED; - locomolcd_set_intensity(locomolcd_bl_device); - return 0; -} -#else -#define locomolcd_suspend NULL -#define locomolcd_resume NULL -#endif - -static int locomolcd_probe(struct locomo_dev *dev) +static int poodle_lcd_probe(struct locomo_dev *dev) { unsigned long flags; local_irq_save(flags); locomolcd_dev = dev; - locomo_gpio_set_dir(dev, LOCOMO_GPIO_FL_VR, 0); - /* the poodle_lcd_power function is called for the first time * from fs_initcall, which is before locomo is activated. * We need to recall poodle_lcd_power here*/ - if (machine_is_poodle()) - locomolcd_power(1); - +#ifdef CONFIG_MACH_POODLE + locomolcd_power(1); +#endif local_irq_restore(flags); - - locomolcd_bl_device = backlight_device_register("locomo-bl", NULL, &locomobl_data); - - if (IS_ERR (locomolcd_bl_device)) - return PTR_ERR (locomolcd_bl_device); - - /* Set up frontlight so that screen is readable */ - locomobl_data.brightness = 2; - locomolcd_set_intensity(locomolcd_bl_device); - return 0; } -static int locomolcd_remove(struct locomo_dev *dev) +static int poodle_lcd_remove(struct locomo_dev *dev) { unsigned long flags; - - backlight_device_unregister(locomolcd_bl_device); local_irq_save(flags); locomolcd_dev = NULL; local_irq_restore(flags); @@ -212,33 +136,19 @@ static struct locomo_driver poodle_lcd_driver = { .name = "locomo-backlight", }, .devid = LOCOMO_DEVID_BACKLIGHT, - .probe = locomolcd_probe, - .remove = locomolcd_remove, - .suspend = locomolcd_suspend, - .resume = locomolcd_resume, + .probe = poodle_lcd_probe, + .remove = poodle_lcd_remove, }; - -static int __init locomolcd_init(void) +static int __init poodle_lcd_init(void) { int ret = locomo_driver_register(&poodle_lcd_driver); - if (ret) - return ret; + if (ret) return ret; #ifdef CONFIG_SA1100_COLLIE sa1100fb_lcd_power = locomolcd_power; #endif return 0; } +device_initcall(poodle_lcd_init); -static void __exit locomolcd_exit(void) -{ - locomo_driver_unregister(&poodle_lcd_driver); -} - -module_init(locomolcd_init); -module_exit(locomolcd_exit); - -MODULE_AUTHOR("John Lenz , Pavel Machek "); -MODULE_DESCRIPTION("Collie LCD driver"); -MODULE_LICENSE("GPL"); diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index c66e3d52c..6577fdfdf 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c @@ -1,6 +1,6 @@ /* bw2.c: BWTWO frame buffer driver * - * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2003 David S. Miller (davem@redhat.com) * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -19,11 +19,14 @@ #include #include +#include #include -#include -#include #include +#ifdef CONFIG_SPARC32 +#include +#endif + #include "sbuslib.h" /* @@ -56,30 +59,30 @@ static struct fb_ops bw2_ops = { #define BWTWO_REGISTER_OFFSET 0x400000 struct bt_regs { - u32 addr; - u32 color_map; - u32 control; - u32 cursor; + volatile u32 addr; + volatile u32 color_map; + volatile u32 control; + volatile u32 cursor; }; struct bw2_regs { struct bt_regs cmap; - u8 control; - u8 status; - u8 cursor_start; - u8 cursor_end; - u8 h_blank_start; - u8 h_blank_end; - u8 h_sync_start; - u8 h_sync_end; - u8 comp_sync_end; - u8 v_blank_start_high; - u8 v_blank_start_low; - u8 v_blank_end; - u8 v_sync_start; - u8 v_sync_end; - u8 xfer_holdoff_start; - u8 xfer_holdoff_end; + volatile u8 control; + volatile u8 status; + volatile u8 cursor_start; + volatile u8 cursor_end; + volatile u8 h_blank_start; + volatile u8 h_blank_end; + volatile u8 h_sync_start; + volatile u8 h_sync_end; + volatile u8 comp_sync_end; + volatile u8 v_blank_start_high; + volatile u8 v_blank_start_low; + volatile u8 v_blank_end; + volatile u8 v_sync_start; + volatile u8 v_sync_end; + volatile u8 xfer_holdoff_start; + volatile u8 xfer_holdoff_end; }; /* Status Register Constants */ @@ -114,8 +117,9 @@ struct bw2_par { #define BW2_FLAG_BLANKED 0x00000001 unsigned long physbase; - unsigned long which_io; unsigned long fbsize; + + struct sbus_dev *sdev; }; /** @@ -170,7 +174,9 @@ static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma) return sbusfb_mmap_helper(bw2_mmap_map, par->physbase, par->fbsize, - par->which_io, + (par->sdev ? + par->sdev->reg_addrs[0].which_io : + 0), vma); } @@ -282,124 +288,139 @@ static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, struct all_info { struct fb_info info; struct bw2_par par; + struct list_head list; }; +static LIST_HEAD(bw2_list); -static int __devinit bw2_init_one(struct of_device *op) +static void bw2_init_one(struct sbus_dev *sdev) { - struct device_node *dp = op->node; struct all_info *all; - int linebytes, err; - - all = kzalloc(sizeof(*all), GFP_KERNEL); - if (!all) - return -ENOMEM; - - spin_lock_init(&all->par.lock); + struct resource *resp; +#ifdef CONFIG_SUN4 + struct resource res; +#endif + int linebytes; - all->par.physbase = op->resource[0].start; - all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; + all = kmalloc(sizeof(*all), GFP_KERNEL); + if (!all) { + printk(KERN_ERR "bw2: Cannot allocate memory.\n"); + return; + } + memset(all, 0, sizeof(*all)); - sbusfb_fill_var(&all->info.var, dp->node, 1); - linebytes = of_getintprop_default(dp, "linebytes", - all->info.var.xres); + INIT_LIST_HEAD(&all->list); + spin_lock_init(&all->par.lock); + all->par.sdev = sdev; + +#ifdef CONFIG_SUN4 + if (!sdev) { + all->par.physbase = sun4_bwtwo_physaddr; + res.start = sun4_bwtwo_physaddr; + res.end = res.start + BWTWO_REGISTER_OFFSET + sizeof(struct bw2_regs) - 1; + res.flags = IORESOURCE_IO; + resp = &res; + all->info.var.xres = all->info.var.xres_virtual = 1152; + all->info.var.yres = all->info.var.yres_virtual = 900; + all->info.var.bits_per_pixel = 1; + linebytes = 1152 / 8; + } else +#else + { + BUG_ON(!sdev); + all->par.physbase = sdev->reg_addrs[0].phys_addr; + resp = &sdev->resource[0]; + sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); + linebytes = prom_getintdefault(sdev->prom_node, "linebytes", + all->info.var.xres); + } +#endif all->info.var.red.length = all->info.var.green.length = all->info.var.blue.length = all->info.var.bits_per_pixel; all->info.var.red.offset = all->info.var.green.offset = all->info.var.blue.offset = 0; - all->par.regs = of_ioremap(&op->resource[0], BWTWO_REGISTER_OFFSET, - sizeof(struct bw2_regs), "bw2 regs"); + all->par.regs = sbus_ioremap(resp, BWTWO_REGISTER_OFFSET, + sizeof(struct bw2_regs), "bw2 regs"); - if (!of_find_property(dp, "width", NULL)) + if (sdev && !prom_getbool(sdev->prom_node, "width")) bw2_do_default_mode(&all->par, &all->info, &linebytes); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); all->info.flags = FBINFO_DEFAULT; all->info.fbops = &bw2_ops; - - all->info.screen_base = - sbus_ioremap(&op->resource[0], 0, all->par.fbsize, "bw2 ram"); +#if defined(CONFIG_SPARC32) + if (sdev) + all->info.screen_base = (char __iomem *) + prom_getintdefault(sdev->prom_node, "address", 0); +#endif + if (!all->info.screen_base) + all->info.screen_base = + sbus_ioremap(resp, 0, all->par.fbsize, "bw2 ram"); all->info.par = &all->par; bw2_blank(0, &all->info); bw2_init_fix(&all->info, linebytes); - err= register_framebuffer(&all->info); - if (err < 0) { - of_iounmap(all->par.regs, sizeof(struct bw2_regs)); - of_iounmap(all->info.screen_base, all->par.fbsize); + if (register_framebuffer(&all->info) < 0) { + printk(KERN_ERR "bw2: Could not register framebuffer.\n"); kfree(all); - return err; + return; } - dev_set_drvdata(&op->dev, all); - - printk("%s: bwtwo at %lx:%lx\n", - dp->full_name, - all->par.which_io, all->par.physbase); - - return 0; -} - -static int __devinit bw2_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct of_device *op = to_of_device(&dev->dev); + list_add(&all->list, &bw2_list); - return bw2_init_one(op); + printk("bw2: bwtwo at %lx:%lx\n", + (long) (sdev ? sdev->reg_addrs[0].which_io : 0), + (long) all->par.physbase); } -static int __devexit bw2_remove(struct of_device *dev) +int __init bw2_init(void) { - struct all_info *all = dev_get_drvdata(&dev->dev); + struct sbus_bus *sbus; + struct sbus_dev *sdev; - unregister_framebuffer(&all->info); - - of_iounmap(all->par.regs, sizeof(struct bw2_regs)); - of_iounmap(all->info.screen_base, all->par.fbsize); - - kfree(all); + if (fb_get_options("bw2fb", NULL)) + return -ENODEV; - dev_set_drvdata(&dev->dev, NULL); +#ifdef CONFIG_SUN4 + bw2_init_one(NULL); +#endif + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "bwtwo")) + bw2_init_one(sdev); + } return 0; } -static struct of_device_id bw2_match[] = { - { - .name = "bwtwo", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, bw2_match); - -static struct of_platform_driver bw2_driver = { - .name = "bw2", - .match_table = bw2_match, - .probe = bw2_probe, - .remove = __devexit_p(bw2_remove), -}; - -static int __init bw2_init(void) +void __exit bw2_exit(void) { - if (fb_get_options("bw2fb", NULL)) - return -ENODEV; + struct list_head *pos, *tmp; - return of_register_driver(&bw2_driver, &of_bus_type); + list_for_each_safe(pos, tmp, &bw2_list) { + struct all_info *all = list_entry(pos, typeof(*all), list); + + unregister_framebuffer(&all->info); + kfree(all); + } } -static void __exit bw2_exit(void) +int __init +bw2_setup(char *arg) { - return of_unregister_driver(&bw2_driver); + /* No cmdline options yet... */ + return 0; } - module_init(bw2_init); + +#ifdef MODULE module_exit(bw2_exit); +#endif MODULE_DESCRIPTION("framebuffer driver for BWTWO chipsets"); -MODULE_AUTHOR("David S. Miller "); -MODULE_VERSION("2.0"); +MODULE_AUTHOR("David S. Miller "); MODULE_LICENSE("GPL"); diff --git a/drivers/video/cfbcopyarea.c b/drivers/video/cfbcopyarea.c index 6faea4034..74415325b 100644 --- a/drivers/video/cfbcopyarea.c +++ b/drivers/video/cfbcopyarea.c @@ -24,6 +24,7 @@ +#include #include #include #include diff --git a/drivers/video/cfbfillrect.c b/drivers/video/cfbfillrect.c index f00b50aab..e5ff62e9c 100644 --- a/drivers/video/cfbfillrect.c +++ b/drivers/video/cfbfillrect.c @@ -17,6 +17,7 @@ * the native cpu endians. I also need to deal with MSB position in the word. * */ +#include #include #include #include diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c index 51d35386a..8ba6152db 100644 --- a/drivers/video/cfbimgblt.c +++ b/drivers/video/cfbimgblt.c @@ -29,6 +29,7 @@ * Also need to add code to deal with cards endians that are different than * the native cpu endians. I also need to deal with MSB position in the word. */ +#include #include #include #include @@ -229,7 +230,6 @@ static inline void fast_imageblit(const struct fb_image *image, struct fb_info * tab = cfb_tab16; break; case 32: - default: tab = cfb_tab32; break; } diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index 7f926c619..63b6c79c8 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -1,6 +1,6 @@ /* cg14.c: CGFOURTEEN frame buffer driver * - * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2003 David S. Miller (davem@redhat.com) * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1995 Miguel de Icaza (miguel@nuclecu.unam.mx) * @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #include #include "sbuslib.h" @@ -99,73 +99,73 @@ static struct fb_ops cg14_ops = { #define CG14_MCR_PIXMODE_32 3 struct cg14_regs{ - u8 mcr; /* Master Control Reg */ - u8 ppr; /* Packed Pixel Reg */ - u8 tms[2]; /* Test Mode Status Regs */ - u8 msr; /* Master Status Reg */ - u8 fsr; /* Fault Status Reg */ - u8 rev; /* Revision & Impl */ - u8 ccr; /* Clock Control Reg */ - u32 tmr; /* Test Mode Read Back */ - u8 mod; /* Monitor Operation Data Reg */ - u8 acr; /* Aux Control */ + volatile u8 mcr; /* Master Control Reg */ + volatile u8 ppr; /* Packed Pixel Reg */ + volatile u8 tms[2]; /* Test Mode Status Regs */ + volatile u8 msr; /* Master Status Reg */ + volatile u8 fsr; /* Fault Status Reg */ + volatile u8 rev; /* Revision & Impl */ + volatile u8 ccr; /* Clock Control Reg */ + volatile u32 tmr; /* Test Mode Read Back */ + volatile u8 mod; /* Monitor Operation Data Reg */ + volatile u8 acr; /* Aux Control */ u8 xxx0[6]; - u16 hct; /* Hor Counter */ - u16 vct; /* Vert Counter */ - u16 hbs; /* Hor Blank Start */ - u16 hbc; /* Hor Blank Clear */ - u16 hss; /* Hor Sync Start */ - u16 hsc; /* Hor Sync Clear */ - u16 csc; /* Composite Sync Clear */ - u16 vbs; /* Vert Blank Start */ - u16 vbc; /* Vert Blank Clear */ - u16 vss; /* Vert Sync Start */ - u16 vsc; /* Vert Sync Clear */ - u16 xcs; - u16 xcc; - u16 fsa; /* Fault Status Address */ - u16 adr; /* Address Registers */ + volatile u16 hct; /* Hor Counter */ + volatile u16 vct; /* Vert Counter */ + volatile u16 hbs; /* Hor Blank Start */ + volatile u16 hbc; /* Hor Blank Clear */ + volatile u16 hss; /* Hor Sync Start */ + volatile u16 hsc; /* Hor Sync Clear */ + volatile u16 csc; /* Composite Sync Clear */ + volatile u16 vbs; /* Vert Blank Start */ + volatile u16 vbc; /* Vert Blank Clear */ + volatile u16 vss; /* Vert Sync Start */ + volatile u16 vsc; /* Vert Sync Clear */ + volatile u16 xcs; + volatile u16 xcc; + volatile u16 fsa; /* Fault Status Address */ + volatile u16 adr; /* Address Registers */ u8 xxx1[0xce]; - u8 pcg[0x100]; /* Pixel Clock Generator */ - u32 vbr; /* Frame Base Row */ - u32 vmcr; /* VBC Master Control */ - u32 vcr; /* VBC refresh */ - u32 vca; /* VBC Config */ + volatile u8 pcg[0x100]; /* Pixel Clock Generator */ + volatile u32 vbr; /* Frame Base Row */ + volatile u32 vmcr; /* VBC Master Control */ + volatile u32 vcr; /* VBC refresh */ + volatile u32 vca; /* VBC Config */ }; #define CG14_CCR_ENABLE 0x04 #define CG14_CCR_SELECT 0x02 /* HW/Full screen */ struct cg14_cursor { - u32 cpl0[32]; /* Enable plane 0 */ - u32 cpl1[32]; /* Color selection plane */ - u8 ccr; /* Cursor Control Reg */ + volatile u32 cpl0[32]; /* Enable plane 0 */ + volatile u32 cpl1[32]; /* Color selection plane */ + volatile u8 ccr; /* Cursor Control Reg */ u8 xxx0[3]; - u16 cursx; /* Cursor x,y position */ - u16 cursy; /* Cursor x,y position */ - u32 color0; - u32 color1; + volatile u16 cursx; /* Cursor x,y position */ + volatile u16 cursy; /* Cursor x,y position */ + volatile u32 color0; + volatile u32 color1; u32 xxx1[0x1bc]; - u32 cpl0i[32]; /* Enable plane 0 autoinc */ - u32 cpl1i[32]; /* Color selection autoinc */ + volatile u32 cpl0i[32]; /* Enable plane 0 autoinc */ + volatile u32 cpl1i[32]; /* Color selection autoinc */ }; struct cg14_dac { - u8 addr; /* Address Register */ + volatile u8 addr; /* Address Register */ u8 xxx0[255]; - u8 glut; /* Gamma table */ + volatile u8 glut; /* Gamma table */ u8 xxx1[255]; - u8 select; /* Register Select */ + volatile u8 select; /* Register Select */ u8 xxx2[255]; - u8 mode; /* Mode Register */ + volatile u8 mode; /* Mode Register */ }; struct cg14_xlut{ - u8 x_xlut [256]; - u8 x_xlutd [256]; + volatile u8 x_xlut [256]; + volatile u8 x_xlutd [256]; u8 xxx0[0x600]; - u8 x_xlut_inc [256]; - u8 x_xlutd_inc [256]; + volatile u8 x_xlut_inc [256]; + volatile u8 x_xlutd_inc [256]; }; /* Color look up table (clut) */ @@ -204,6 +204,7 @@ struct cg14_par { int mode; int ramsize; + struct sbus_dev *sdev; }; static void __cg14_reset(struct cg14_par *par) @@ -354,9 +355,14 @@ static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) * Initialisation */ -static void cg14_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) +static void cg14_init_fix(struct fb_info *info, int linebytes) { - const char *name = dp->name; + struct cg14_par *par = (struct cg14_par *)info->par; + const char *name; + + name = "cgfourteen"; + if (par->sdev) + name = par->sdev->prom_name; strlcpy(info->fix.id, name, sizeof(info->fix.id)); @@ -450,81 +456,98 @@ static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __initdata = { struct all_info { struct fb_info info; struct cg14_par par; + struct list_head list; }; +static LIST_HEAD(cg14_list); -static void cg14_unmap_regs(struct all_info *all) -{ - if (all->par.regs) - of_iounmap(all->par.regs, sizeof(struct cg14_regs)); - if (all->par.clut) - of_iounmap(all->par.clut, sizeof(struct cg14_clut)); - if (all->par.cursor) - of_iounmap(all->par.cursor, sizeof(struct cg14_cursor)); - if (all->info.screen_base) - of_iounmap(all->info.screen_base, all->par.fbsize); -} - -static int __devinit cg14_init_one(struct of_device *op) +static void cg14_init_one(struct sbus_dev *sdev, int node, int parent_node) { - struct device_node *dp = op->node; struct all_info *all; - int is_8mb, linebytes, i, err; + unsigned long phys, rphys; + u32 bases[6]; + int is_8mb, linebytes, i; + + if (!sdev) { + if (prom_getproperty(node, "address", + (char *) &bases[0], sizeof(bases)) <= 0 + || !bases[0]) { + printk(KERN_ERR "cg14: Device is not mapped.\n"); + return; + } + if (__get_iospace(bases[0]) != __get_iospace(bases[1])) { + printk(KERN_ERR "cg14: I/O spaces don't match.\n"); + return; + } + } + + all = kmalloc(sizeof(*all), GFP_KERNEL); + if (!all) { + printk(KERN_ERR "cg14: Cannot allocate memory.\n"); + return; + } + memset(all, 0, sizeof(*all)); - all = kzalloc(sizeof(*all), GFP_KERNEL); - if (!all) - return -ENOMEM; + INIT_LIST_HEAD(&all->list); spin_lock_init(&all->par.lock); - sbusfb_fill_var(&all->info.var, dp->node, 8); + sbusfb_fill_var(&all->info.var, node, 8); all->info.var.red.length = 8; all->info.var.green.length = 8; all->info.var.blue.length = 8; - linebytes = of_getintprop_default(dp, "linebytes", - all->info.var.xres); + linebytes = prom_getintdefault(node, "linebytes", + all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - if (!strcmp(dp->parent->name, "sbus") || - !strcmp(dp->parent->name, "sbi")) { - all->par.physbase = op->resource[0].start; - all->par.iospace = op->resource[0].flags & IORESOURCE_BITS; + all->par.sdev = sdev; + if (sdev) { + rphys = sdev->reg_addrs[0].phys_addr; + all->par.physbase = phys = sdev->reg_addrs[1].phys_addr; + all->par.iospace = sdev->reg_addrs[0].which_io; + + all->par.regs = sbus_ioremap(&sdev->resource[0], 0, + sizeof(struct cg14_regs), + "cg14 regs"); + all->par.clut = sbus_ioremap(&sdev->resource[0], CG14_CLUT1, + sizeof(struct cg14_clut), + "cg14 clut"); + all->par.cursor = sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS, + sizeof(struct cg14_cursor), + "cg14 cursor"); + all->info.screen_base = sbus_ioremap(&sdev->resource[1], 0, + all->par.fbsize, "cg14 ram"); } else { - all->par.physbase = op->resource[1].start; - all->par.iospace = op->resource[0].flags & IORESOURCE_BITS; + rphys = __get_phys(bases[0]); + all->par.physbase = phys = __get_phys(bases[1]); + all->par.iospace = __get_iospace(bases[0]); + all->par.regs = (struct cg14_regs __iomem *)(unsigned long)bases[0]; + all->par.clut = (struct cg14_clut __iomem *)((unsigned long)bases[0] + + CG14_CLUT1); + all->par.cursor = + (struct cg14_cursor __iomem *)((unsigned long)bases[0] + + CG14_CURSORREGS); + + all->info.screen_base = (char __iomem *)(unsigned long)bases[1]; } - all->par.regs = of_ioremap(&op->resource[0], 0, - sizeof(struct cg14_regs), "cg14 regs"); - all->par.clut = of_ioremap(&op->resource[0], CG14_CLUT1, - sizeof(struct cg14_clut), "cg14 clut"); - all->par.cursor = of_ioremap(&op->resource[0], CG14_CURSORREGS, - sizeof(struct cg14_cursor), "cg14 cursor"); + prom_getproperty(node, "reg", (char *) &bases[0], sizeof(bases)); + is_8mb = (bases[5] == 0x800000); - all->info.screen_base = of_ioremap(&op->resource[1], 0, - all->par.fbsize, "cg14 ram"); + if (sizeof(all->par.mmap_map) != sizeof(__cg14_mmap_map)) { + extern void __cg14_mmap_sized_wrongly(void); - if (!all->par.regs || !all->par.clut || !all->par.cursor || - !all->info.screen_base) - cg14_unmap_regs(all); - - is_8mb = (((op->resource[1].end - op->resource[1].start) + 1) == - (8 * 1024 * 1024)); - - BUILD_BUG_ON(sizeof(all->par.mmap_map) != sizeof(__cg14_mmap_map)); + __cg14_mmap_sized_wrongly(); + } - memcpy(&all->par.mmap_map, &__cg14_mmap_map, - sizeof(all->par.mmap_map)); - + memcpy(&all->par.mmap_map, &__cg14_mmap_map, sizeof(all->par.mmap_map)); for (i = 0; i < CG14_MMAP_ENTRIES; i++) { struct sbus_mmap_map *map = &all->par.mmap_map[i]; if (!map->size) break; if (map->poff & 0x80000000) - map->poff = (map->poff & 0x7fffffff) + - (op->resource[0].start - - op->resource[1].start); + map->poff = (map->poff & 0x7fffffff) + rphys - phys; if (is_8mb && map->size >= 0x100000 && map->size <= 0x400000) @@ -541,87 +564,84 @@ static int __devinit cg14_init_one(struct of_device *op) __cg14_reset(&all->par); if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { - cg14_unmap_regs(all); + printk(KERN_ERR "cg14: Could not allocate color map.\n"); kfree(all); - return -ENOMEM; + return; } fb_set_cmap(&all->info.cmap, &all->info); - cg14_init_fix(&all->info, linebytes, dp); + cg14_init_fix(&all->info, linebytes); - err = register_framebuffer(&all->info); - if (err < 0) { + if (register_framebuffer(&all->info) < 0) { + printk(KERN_ERR "cg14: Could not register framebuffer.\n"); fb_dealloc_cmap(&all->info.cmap); - cg14_unmap_regs(all); kfree(all); - return err; + return; } - dev_set_drvdata(&op->dev, all); - - printk("%s: cgfourteen at %lx:%lx, %dMB\n", - dp->full_name, - all->par.iospace, all->par.physbase, - all->par.ramsize >> 20); - - return 0; -} + list_add(&all->list, &cg14_list); -static int __devinit cg14_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct of_device *op = to_of_device(&dev->dev); + printk("cg14: cgfourteen at %lx:%lx, %dMB\n", + all->par.iospace, all->par.physbase, all->par.ramsize >> 20); - return cg14_init_one(op); } -static int __devexit cg14_remove(struct of_device *dev) +int __init cg14_init(void) { - struct all_info *all = dev_get_drvdata(&dev->dev); - - unregister_framebuffer(&all->info); - fb_dealloc_cmap(&all->info.cmap); - - cg14_unmap_regs(all); + struct sbus_bus *sbus; + struct sbus_dev *sdev; - kfree(all); + if (fb_get_options("cg14fb", NULL)) + return -ENODEV; - dev_set_drvdata(&dev->dev, NULL); +#ifdef CONFIG_SPARC32 + { + int root, node; + + root = prom_getchild(prom_root_node); + root = prom_searchsiblings(root, "obio"); + if (root) { + node = prom_searchsiblings(prom_getchild(root), + "cgfourteen"); + if (node) + cg14_init_one(NULL, node, root); + } + } +#endif + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "cgfourteen")) + cg14_init_one(sdev, sdev->prom_node, sbus->prom_node); + } return 0; } -static struct of_device_id cg14_match[] = { - { - .name = "cgfourteen", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, cg14_match); - -static struct of_platform_driver cg14_driver = { - .name = "cg14", - .match_table = cg14_match, - .probe = cg14_probe, - .remove = __devexit_p(cg14_remove), -}; - -int __init cg14_init(void) +void __exit cg14_exit(void) { - if (fb_get_options("cg14fb", NULL)) - return -ENODEV; + struct list_head *pos, *tmp; - return of_register_driver(&cg14_driver, &of_bus_type); + list_for_each_safe(pos, tmp, &cg14_list) { + struct all_info *all = list_entry(pos, typeof(*all), list); + + unregister_framebuffer(&all->info); + fb_dealloc_cmap(&all->info.cmap); + kfree(all); + } } -void __exit cg14_exit(void) +int __init +cg14_setup(char *arg) { - of_unregister_driver(&cg14_driver); + /* No cmdline options yet... */ + return 0; } module_init(cg14_init); + +#ifdef MODULE module_exit(cg14_exit); +#endif MODULE_DESCRIPTION("framebuffer driver for CGfourteen chipsets"); -MODULE_AUTHOR("David S. Miller "); -MODULE_VERSION("2.0"); +MODULE_AUTHOR("David S. Miller "); MODULE_LICENSE("GPL"); diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 9c8c753ef..3de6e1b5a 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c @@ -1,6 +1,6 @@ /* cg3.c: CGTHREE frame buffer driver * - * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2003 David S. Miller (davem@redhat.com) * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -19,9 +19,8 @@ #include #include +#include #include -#include -#include #include #include "sbuslib.h" @@ -81,30 +80,30 @@ enum cg3_type { }; struct bt_regs { - u32 addr; - u32 color_map; - u32 control; - u32 cursor; + volatile u32 addr; + volatile u32 color_map; + volatile u32 control; + volatile u32 cursor; }; struct cg3_regs { struct bt_regs cmap; - u8 control; - u8 status; - u8 cursor_start; - u8 cursor_end; - u8 h_blank_start; - u8 h_blank_end; - u8 h_sync_start; - u8 h_sync_end; - u8 comp_sync_end; - u8 v_blank_start_high; - u8 v_blank_start_low; - u8 v_blank_end; - u8 v_sync_start; - u8 v_sync_end; - u8 xfer_holdoff_start; - u8 xfer_holdoff_end; + volatile u8 control; + volatile u8 status; + volatile u8 cursor_start; + volatile u8 cursor_end; + volatile u8 h_blank_start; + volatile u8 h_blank_end; + volatile u8 h_sync_start; + volatile u8 h_sync_end; + volatile u8 comp_sync_end; + volatile u8 v_blank_start_high; + volatile u8 v_blank_start_low; + volatile u8 v_blank_end; + volatile u8 v_sync_start; + volatile u8 v_sync_end; + volatile u8 xfer_holdoff_start; + volatile u8 xfer_holdoff_end; }; /* Offset of interesting structures in the OBIO space */ @@ -121,8 +120,9 @@ struct cg3_par { #define CG3_FLAG_RDI 0x00000002 unsigned long physbase; - unsigned long which_io; unsigned long fbsize; + + struct sbus_dev *sdev; }; /** @@ -235,7 +235,7 @@ static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma) return sbusfb_mmap_helper(cg3_mmap_map, par->physbase, par->fbsize, - par->which_io, + par->sdev->reg_addrs[0].which_io, vma); } @@ -252,9 +252,11 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) */ static void -cg3_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) +cg3_init_fix(struct fb_info *info, int linebytes) { - strlcpy(info->fix.id, dp->name, sizeof(info->fix.id)); + struct cg3_par *par = (struct cg3_par *)info->par; + + strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); info->fix.type = FB_TYPE_PACKED_PIXELS; info->fix.visual = FB_VISUAL_PSEUDOCOLOR; @@ -265,15 +267,16 @@ cg3_init_fix(struct fb_info *info, int linebytes, struct device_node *dp) } static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, - struct device_node *dp) + struct sbus_dev *sdev) { - char *params; + char buffer[40]; char *p; int ww, hh; - params = of_get_property(dp, "params", NULL); - if (params) { - ww = simple_strtoul(params, &p, 10); + *buffer = 0; + prom_getstring(sdev->prom_node, "params", buffer, sizeof(buffer)); + if (*buffer) { + ww = simple_strtoul(buffer, &p, 10); if (ww && *p == 'x') { hh = simple_strtoul(p + 1, &p, 10); if (hh && *p == '-') { @@ -345,11 +348,11 @@ static void cg3_do_default_mode(struct cg3_par *par) sbus_writeb(p[1], regp); } for (p = cg3_dacvals; *p; p += 2) { - u8 __iomem *regp; + volatile u8 __iomem *regp; - regp = (u8 __iomem *)&par->regs->cmap.addr; + regp = (volatile u8 __iomem *)&par->regs->cmap.addr; sbus_writeb(p[0], regp); - regp = (u8 __iomem *)&par->regs->cmap.control; + regp = (volatile u8 __iomem *)&par->regs->cmap.control; sbus_writeb(p[1], regp); } } @@ -357,137 +360,129 @@ static void cg3_do_default_mode(struct cg3_par *par) struct all_info { struct fb_info info; struct cg3_par par; + struct list_head list; }; +static LIST_HEAD(cg3_list); -static int __devinit cg3_init_one(struct of_device *op) +static void cg3_init_one(struct sbus_dev *sdev) { - struct device_node *dp = op->node; struct all_info *all; - int linebytes, err; + int linebytes; + + all = kmalloc(sizeof(*all), GFP_KERNEL); + if (!all) { + printk(KERN_ERR "cg3: Cannot allocate memory.\n"); + return; + } + memset(all, 0, sizeof(*all)); - all = kzalloc(sizeof(*all), GFP_KERNEL); - if (!all) - return -ENOMEM; + INIT_LIST_HEAD(&all->list); spin_lock_init(&all->par.lock); + all->par.sdev = sdev; - all->par.physbase = op->resource[0].start; - all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; + all->par.physbase = sdev->reg_addrs[0].phys_addr; - sbusfb_fill_var(&all->info.var, dp->node, 8); + sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); all->info.var.red.length = 8; all->info.var.green.length = 8; all->info.var.blue.length = 8; - if (!strcmp(dp->name, "cgRDI")) + if (!strcmp(sdev->prom_name, "cgRDI")) all->par.flags |= CG3_FLAG_RDI; if (all->par.flags & CG3_FLAG_RDI) - cg3_rdi_maybe_fixup_var(&all->info.var, dp); + cg3_rdi_maybe_fixup_var(&all->info.var, sdev); - linebytes = of_getintprop_default(dp, "linebytes", - all->info.var.xres); + linebytes = prom_getintdefault(sdev->prom_node, "linebytes", + all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - all->par.regs = of_ioremap(&op->resource[0], CG3_REGS_OFFSET, - sizeof(struct cg3_regs), "cg3 regs"); + all->par.regs = sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET, + sizeof(struct cg3_regs), "cg3 regs"); all->info.flags = FBINFO_DEFAULT; all->info.fbops = &cg3_ops; - all->info.screen_base = - of_ioremap(&op->resource[0], CG3_RAM_OFFSET, - all->par.fbsize, "cg3 ram"); +#ifdef CONFIG_SPARC32 + all->info.screen_base = (char __iomem *) + prom_getintdefault(sdev->prom_node, "address", 0); +#endif + if (!all->info.screen_base) + all->info.screen_base = + sbus_ioremap(&sdev->resource[0], CG3_RAM_OFFSET, + all->par.fbsize, "cg3 ram"); all->info.par = &all->par; cg3_blank(0, &all->info); - if (!of_find_property(dp, "width", NULL)) + if (!prom_getbool(sdev->prom_node, "width")) cg3_do_default_mode(&all->par); if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { - of_iounmap(all->par.regs, sizeof(struct cg3_regs)); - of_iounmap(all->info.screen_base, all->par.fbsize); + printk(KERN_ERR "cg3: Could not allocate color map.\n"); kfree(all); - return -ENOMEM; + return; } fb_set_cmap(&all->info.cmap, &all->info); - cg3_init_fix(&all->info, linebytes, dp); + cg3_init_fix(&all->info, linebytes); - err = register_framebuffer(&all->info); - if (err < 0) { + if (register_framebuffer(&all->info) < 0) { + printk(KERN_ERR "cg3: Could not register framebuffer.\n"); fb_dealloc_cmap(&all->info.cmap); - of_iounmap(all->par.regs, sizeof(struct cg3_regs)); - of_iounmap(all->info.screen_base, all->par.fbsize); kfree(all); - return err; + return; } - dev_set_drvdata(&op->dev, all); - - printk("%s: cg3 at %lx:%lx\n", - dp->full_name, all->par.which_io, all->par.physbase); + list_add(&all->list, &cg3_list); - return 0; + printk("cg3: %s at %lx:%lx\n", + sdev->prom_name, + (long) sdev->reg_addrs[0].which_io, + (long) sdev->reg_addrs[0].phys_addr); } -static int __devinit cg3_probe(struct of_device *dev, const struct of_device_id *match) +int __init cg3_init(void) { - struct of_device *op = to_of_device(&dev->dev); + struct sbus_bus *sbus; + struct sbus_dev *sdev; - return cg3_init_one(op); -} - -static int __devexit cg3_remove(struct of_device *dev) -{ - struct all_info *all = dev_get_drvdata(&dev->dev); - - unregister_framebuffer(&all->info); - fb_dealloc_cmap(&all->info.cmap); - - of_iounmap(all->par.regs, sizeof(struct cg3_regs)); - of_iounmap(all->info.screen_base, all->par.fbsize); - - kfree(all); + if (fb_get_options("cg3fb", NULL)) + return -ENODEV; - dev_set_drvdata(&dev->dev, NULL); + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "cgthree") || + !strcmp(sdev->prom_name, "cgRDI")) + cg3_init_one(sdev); + } return 0; } -static struct of_device_id cg3_match[] = { - { - .name = "cgthree", - }, - { - .name = "cgRDI", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, cg3_match); - -static struct of_platform_driver cg3_driver = { - .name = "cg3", - .match_table = cg3_match, - .probe = cg3_probe, - .remove = __devexit_p(cg3_remove), -}; - -static int __init cg3_init(void) +void __exit cg3_exit(void) { - if (fb_get_options("cg3fb", NULL)) - return -ENODEV; + struct list_head *pos, *tmp; + + list_for_each_safe(pos, tmp, &cg3_list) { + struct all_info *all = list_entry(pos, typeof(*all), list); - return of_register_driver(&cg3_driver, &of_bus_type); + unregister_framebuffer(&all->info); + fb_dealloc_cmap(&all->info.cmap); + kfree(all); + } } -static void __exit cg3_exit(void) +int __init +cg3_setup(char *arg) { - of_unregister_driver(&cg3_driver); + /* No cmdline options yet... */ + return 0; } module_init(cg3_init); + +#ifdef MODULE module_exit(cg3_exit); +#endif MODULE_DESCRIPTION("framebuffer driver for CGthree chipsets"); -MODULE_AUTHOR("David S. Miller "); -MODULE_VERSION("2.0"); +MODULE_AUTHOR("David S. Miller "); MODULE_LICENSE("GPL"); diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 64146be2e..7aab91ead 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c @@ -1,6 +1,6 @@ /* cg6.c: CGSIX (GX, GXplus, TGX) frame buffer driver * - * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2003 David S. Miller (davem@redhat.com) * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include "sbuslib.h" @@ -164,89 +164,89 @@ static struct fb_ops cg6_ops = { /* The contents are unknown */ struct cg6_tec { - int tec_matrix; - int tec_clip; - int tec_vdc; + volatile int tec_matrix; + volatile int tec_clip; + volatile int tec_vdc; }; struct cg6_thc { - u32 thc_pad0[512]; - u32 thc_hs; /* hsync timing */ - u32 thc_hsdvs; - u32 thc_hd; - u32 thc_vs; /* vsync timing */ - u32 thc_vd; - u32 thc_refresh; - u32 thc_misc; - u32 thc_pad1[56]; - u32 thc_cursxy; /* cursor x,y position (16 bits each) */ - u32 thc_cursmask[32]; /* cursor mask bits */ - u32 thc_cursbits[32]; /* what to show where mask enabled */ + uint thc_pad0[512]; + volatile uint thc_hs; /* hsync timing */ + volatile uint thc_hsdvs; + volatile uint thc_hd; + volatile uint thc_vs; /* vsync timing */ + volatile uint thc_vd; + volatile uint thc_refresh; + volatile uint thc_misc; + uint thc_pad1[56]; + volatile uint thc_cursxy; /* cursor x,y position (16 bits each) */ + volatile uint thc_cursmask[32]; /* cursor mask bits */ + volatile uint thc_cursbits[32]; /* what to show where mask enabled */ }; struct cg6_fbc { - u32 xxx0[1]; - u32 mode; - u32 clip; - u32 xxx1[1]; - u32 s; - u32 draw; - u32 blit; - u32 font; - u32 xxx2[24]; - u32 x0, y0, z0, color0; - u32 x1, y1, z1, color1; - u32 x2, y2, z2, color2; - u32 x3, y3, z3, color3; - u32 offx, offy; - u32 xxx3[2]; - u32 incx, incy; - u32 xxx4[2]; - u32 clipminx, clipminy; - u32 xxx5[2]; - u32 clipmaxx, clipmaxy; - u32 xxx6[2]; - u32 fg; - u32 bg; - u32 alu; - u32 pm; - u32 pixelm; - u32 xxx7[2]; - u32 patalign; - u32 pattern[8]; - u32 xxx8[432]; - u32 apointx, apointy, apointz; - u32 xxx9[1]; - u32 rpointx, rpointy, rpointz; - u32 xxx10[5]; - u32 pointr, pointg, pointb, pointa; - u32 alinex, aliney, alinez; - u32 xxx11[1]; - u32 rlinex, rliney, rlinez; - u32 xxx12[5]; - u32 liner, lineg, lineb, linea; - u32 atrix, atriy, atriz; - u32 xxx13[1]; - u32 rtrix, rtriy, rtriz; - u32 xxx14[5]; - u32 trir, trig, trib, tria; - u32 aquadx, aquady, aquadz; - u32 xxx15[1]; - u32 rquadx, rquady, rquadz; - u32 xxx16[5]; - u32 quadr, quadg, quadb, quada; - u32 arectx, arecty, arectz; - u32 xxx17[1]; - u32 rrectx, rrecty, rrectz; - u32 xxx18[5]; - u32 rectr, rectg, rectb, recta; + u32 xxx0[1]; + volatile u32 mode; + volatile u32 clip; + u32 xxx1[1]; + volatile u32 s; + volatile u32 draw; + volatile u32 blit; + volatile u32 font; + u32 xxx2[24]; + volatile u32 x0, y0, z0, color0; + volatile u32 x1, y1, z1, color1; + volatile u32 x2, y2, z2, color2; + volatile u32 x3, y3, z3, color3; + volatile u32 offx, offy; + u32 xxx3[2]; + volatile u32 incx, incy; + u32 xxx4[2]; + volatile u32 clipminx, clipminy; + u32 xxx5[2]; + volatile u32 clipmaxx, clipmaxy; + u32 xxx6[2]; + volatile u32 fg; + volatile u32 bg; + volatile u32 alu; + volatile u32 pm; + volatile u32 pixelm; + u32 xxx7[2]; + volatile u32 patalign; + volatile u32 pattern[8]; + u32 xxx8[432]; + volatile u32 apointx, apointy, apointz; + u32 xxx9[1]; + volatile u32 rpointx, rpointy, rpointz; + u32 xxx10[5]; + volatile u32 pointr, pointg, pointb, pointa; + volatile u32 alinex, aliney, alinez; + u32 xxx11[1]; + volatile u32 rlinex, rliney, rlinez; + u32 xxx12[5]; + volatile u32 liner, lineg, lineb, linea; + volatile u32 atrix, atriy, atriz; + u32 xxx13[1]; + volatile u32 rtrix, rtriy, rtriz; + u32 xxx14[5]; + volatile u32 trir, trig, trib, tria; + volatile u32 aquadx, aquady, aquadz; + u32 xxx15[1]; + volatile u32 rquadx, rquady, rquadz; + u32 xxx16[5]; + volatile u32 quadr, quadg, quadb, quada; + volatile u32 arectx, arecty, arectz; + u32 xxx17[1]; + volatile u32 rrectx, rrecty, rrectz; + u32 xxx18[5]; + volatile u32 rectr, rectg, rectb, recta; }; struct bt_regs { - u32 addr; - u32 color_map; - u32 control; - u32 cursor; + volatile u32 addr; + volatile u32 color_map; + volatile u32 control; + volatile u32 cursor; }; struct cg6_par { @@ -255,14 +255,15 @@ struct cg6_par { struct cg6_fbc __iomem *fbc; struct cg6_thc __iomem *thc; struct cg6_tec __iomem *tec; - u32 __iomem *fhc; + volatile u32 __iomem *fhc; u32 flags; #define CG6_FLAG_BLANKED 0x00000001 unsigned long physbase; - unsigned long which_io; unsigned long fbsize; + + struct sbus_dev *sdev; }; static int cg6_sync(struct fb_info *info) @@ -528,7 +529,8 @@ static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma) return sbusfb_mmap_helper(cg6_mmap_map, par->physbase, par->fbsize, - par->which_io, vma); + par->sdev->reg_addrs[0].which_io, + vma); } static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) @@ -656,75 +658,62 @@ static void cg6_chip_init(struct fb_info *info) struct all_info { struct fb_info info; struct cg6_par par; + struct list_head list; }; +static LIST_HEAD(cg6_list); -static void cg6_unmap_regs(struct all_info *all) -{ - if (all->par.fbc) - of_iounmap(all->par.fbc, 4096); - if (all->par.tec) - of_iounmap(all->par.tec, sizeof(struct cg6_tec)); - if (all->par.thc) - of_iounmap(all->par.thc, sizeof(struct cg6_thc)); - if (all->par.bt) - of_iounmap(all->par.bt, sizeof(struct bt_regs)); - if (all->par.fhc) - of_iounmap(all->par.fhc, sizeof(u32)); - - if (all->info.screen_base) - of_iounmap(all->info.screen_base, all->par.fbsize); -} - -static int __devinit cg6_init_one(struct of_device *op) +static void cg6_init_one(struct sbus_dev *sdev) { - struct device_node *dp = op->node; struct all_info *all; - int linebytes, err; + int linebytes; - all = kzalloc(sizeof(*all), GFP_KERNEL); - if (!all) - return -ENOMEM; + all = kmalloc(sizeof(*all), GFP_KERNEL); + if (!all) { + printk(KERN_ERR "cg6: Cannot allocate memory.\n"); + return; + } + memset(all, 0, sizeof(*all)); + + INIT_LIST_HEAD(&all->list); spin_lock_init(&all->par.lock); + all->par.sdev = sdev; - all->par.physbase = op->resource[0].start; - all->par.which_io = op->resource[0].flags & IORESOURCE_BITS; + all->par.physbase = sdev->reg_addrs[0].phys_addr; - sbusfb_fill_var(&all->info.var, dp->node, 8); + sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); all->info.var.red.length = 8; all->info.var.green.length = 8; all->info.var.blue.length = 8; - linebytes = of_getintprop_default(dp, "linebytes", - all->info.var.xres); + linebytes = prom_getintdefault(sdev->prom_node, "linebytes", + all->info.var.xres); all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); - if (of_find_property(dp, "dblbuf", NULL)) + if (prom_getbool(sdev->prom_node, "dblbuf")) all->par.fbsize *= 4; - all->par.fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, - 4096, "cgsix fbc"); - all->par.tec = of_ioremap(&op->resource[0], CG6_TEC_OFFSET, - sizeof(struct cg6_tec), "cgsix tec"); - all->par.thc = of_ioremap(&op->resource[0], CG6_THC_OFFSET, - sizeof(struct cg6_thc), "cgsix thc"); - all->par.bt = of_ioremap(&op->resource[0], CG6_BROOKTREE_OFFSET, - sizeof(struct bt_regs), "cgsix dac"); - all->par.fhc = of_ioremap(&op->resource[0], CG6_FHC_OFFSET, - sizeof(u32), "cgsix fhc"); + all->par.fbc = sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET, + 4096, "cgsix fbc"); + all->par.tec = sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET, + sizeof(struct cg6_tec), "cgsix tec"); + all->par.thc = sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET, + sizeof(struct cg6_thc), "cgsix thc"); + all->par.bt = sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET, + sizeof(struct bt_regs), "cgsix dac"); + all->par.fhc = sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET, + sizeof(u32), "cgsix fhc"); all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; all->info.fbops = &cg6_ops; - - all->info.screen_base = of_ioremap(&op->resource[0], CG6_RAM_OFFSET, - all->par.fbsize, "cgsix ram"); - if (!all->par.fbc || !all->par.tec || !all->par.thc || - !all->par.bt || !all->par.fhc || !all->info.screen_base) { - cg6_unmap_regs(all); - kfree(all); - return -ENOMEM; - } - +#ifdef CONFIG_SPARC32 + all->info.screen_base = (char __iomem *) + prom_getintdefault(sdev->prom_node, "address", 0); +#endif + if (!all->info.screen_base) + all->info.screen_base = + sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, + all->par.fbsize, "cgsix ram"); all->info.par = &all->par; all->info.var.accel_flags = FB_ACCELF_TEXT; @@ -734,90 +723,72 @@ static int __devinit cg6_init_one(struct of_device *op) cg6_blank(0, &all->info); if (fb_alloc_cmap(&all->info.cmap, 256, 0)) { - cg6_unmap_regs(all); + printk(KERN_ERR "cg6: Could not allocate color map.\n"); kfree(all); - return -ENOMEM; + return; } fb_set_cmap(&all->info.cmap, &all->info); cg6_init_fix(&all->info, linebytes); - err = register_framebuffer(&all->info); - if (err < 0) { - cg6_unmap_regs(all); + if (register_framebuffer(&all->info) < 0) { + printk(KERN_ERR "cg6: Could not register framebuffer.\n"); fb_dealloc_cmap(&all->info.cmap); kfree(all); - return err; + return; } - dev_set_drvdata(&op->dev, all); + list_add(&all->list, &cg6_list); - printk("%s: CGsix [%s] at %lx:%lx\n", - dp->full_name, + printk("cg6: CGsix [%s] at %lx:%lx\n", all->info.fix.id, - all->par.which_io, all->par.physbase); - - return 0; + (long) sdev->reg_addrs[0].which_io, + (long) sdev->reg_addrs[0].phys_addr); } -static int __devinit cg6_probe(struct of_device *dev, const struct of_device_id *match) +int __init cg6_init(void) { - struct of_device *op = to_of_device(&dev->dev); - - return cg6_init_one(op); -} - -static int __devexit cg6_remove(struct of_device *dev) -{ - struct all_info *all = dev_get_drvdata(&dev->dev); - - unregister_framebuffer(&all->info); - fb_dealloc_cmap(&all->info.cmap); + struct sbus_bus *sbus; + struct sbus_dev *sdev; - cg6_unmap_regs(all); - - kfree(all); + if (fb_get_options("cg6fb", NULL)) + return -ENODEV; - dev_set_drvdata(&dev->dev, NULL); + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "cgsix") || + !strcmp(sdev->prom_name, "cgthree+")) + cg6_init_one(sdev); + } return 0; } -static struct of_device_id cg6_match[] = { - { - .name = "cgsix", - }, - { - .name = "cgthree+", - }, - {}, -}; -MODULE_DEVICE_TABLE(of, cg6_match); - -static struct of_platform_driver cg6_driver = { - .name = "cg6", - .match_table = cg6_match, - .probe = cg6_probe, - .remove = __devexit_p(cg6_remove), -}; - -static int __init cg6_init(void) +void __exit cg6_exit(void) { - if (fb_get_options("cg6fb", NULL)) - return -ENODEV; + struct list_head *pos, *tmp; - return of_register_driver(&cg6_driver, &of_bus_type); + list_for_each_safe(pos, tmp, &cg6_list) { + struct all_info *all = list_entry(pos, typeof(*all), list); + + unregister_framebuffer(&all->info); + fb_dealloc_cmap(&all->info.cmap); + kfree(all); + } } -static void __exit cg6_exit(void) +int __init +cg6_setup(char *arg) { - of_unregister_driver(&cg6_driver); + /* No cmdline options yet... */ + return 0; } module_init(cg6_init); + +#ifdef MODULE module_exit(cg6_exit); +#endif MODULE_DESCRIPTION("framebuffer driver for CGsix chipsets"); -MODULE_AUTHOR("David S. Miller "); -MODULE_VERSION("2.0"); +MODULE_AUTHOR("David S. Miller "); MODULE_LICENSE("GPL"); diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index 73cb426bf..72ff6bf75 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c @@ -14,11 +14,13 @@ * more details. */ +#include #include #include #include #include #include +#include #include #include #include @@ -146,23 +148,9 @@ static int chipsfb_set_par(struct fb_info *info) static int chipsfb_blank(int blank, struct fb_info *info) { #ifdef CONFIG_PMAC_BACKLIGHT - mutex_lock(&pmac_backlight_mutex); - - if (pmac_backlight) { - /* used to disable backlight only for blank > 1, but it seems - * useful at blank = 1 too (saves battery, extends backlight - * life) - */ - down(&pmac_backlight->sem); - if (blank) - pmac_backlight->props->power = FB_BLANK_POWERDOWN; - else - pmac_backlight->props->power = FB_BLANK_UNBLANK; - pmac_backlight->props->update_status(pmac_backlight); - up(&pmac_backlight->sem); - } - - mutex_unlock(&pmac_backlight_mutex); + // used to disable backlight only for blank > 1, but it seems + // useful at blank = 1 too (saves battery, extends backlight life) + set_backlight_enable(!blank); #endif /* CONFIG_PMAC_BACKLIGHT */ return 1; /* get fb_blank to set the colormap to all black */ @@ -413,14 +401,7 @@ chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) #ifdef CONFIG_PMAC_BACKLIGHT /* turn on the backlight */ - mutex_lock(&pmac_backlight_mutex); - if (pmac_backlight) { - down(&pmac_backlight->sem); - pmac_backlight->props->power = FB_BLANK_UNBLANK; - pmac_backlight->props->update_status(pmac_backlight); - up(&pmac_backlight->sem); - } - mutex_unlock(&pmac_backlight_mutex); + set_backlight_enable(1); #endif /* CONFIG_PMAC_BACKLIGHT */ #ifdef CONFIG_PPC diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index daf43f535..1103010af 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c @@ -36,11 +36,13 @@ #define CIRRUSFB_VERSION "2.0-pre2" +#include #include #include #include #include #include +#include #include #include #include @@ -2225,6 +2227,7 @@ static void cirrusfb_pci_unmap (struct cirrusfb_info *cinfo) release_region(0x3C0, 32); pci_release_regions(pdev); framebuffer_release(cinfo->info); + pci_disable_device(pdev); } #endif /* CONFIG_PCI */ @@ -2455,6 +2458,7 @@ err_release_regions: err_release_fb: framebuffer_release(info); err_disable: + pci_disable_device(pdev); err_out: return ret; } diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index 308850df1..eea422eb1 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c @@ -10,6 +10,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index d9315d994..1ecda91e5 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -7,9 +7,9 @@ #include #include +#include #include #include -#include #include #include @@ -22,6 +22,7 @@ #define DUMMY_ROWS ORIG_VIDEO_LINES #elif defined(__hppa__) /* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ +#include #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS #else diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 6165fd966..47ba1a79a 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -58,12 +58,14 @@ #undef FBCONDEBUG +#include #include #include #include #include #include #include /* MSch: for IRQ probe */ +#include #include #include #include @@ -123,8 +125,6 @@ static int softback_lines; static int first_fb_vc; static int last_fb_vc = MAX_NR_CONSOLES - 1; static int fbcon_is_default = 1; -static int fbcon_has_exited; - /* font data */ static char fontname[40]; @@ -140,6 +140,7 @@ static const struct consw fb_con; #define advance_row(p, delta) (unsigned short *)((unsigned long)(p) + (delta) * vc->vc_size_row) +static void fbcon_free_font(struct display *); static int fbcon_set_origin(struct vc_data *); #define CURSOR_DRAW_DELAY (1) @@ -193,9 +194,6 @@ static void fbcon_redraw_move(struct vc_data *vc, struct display *p, int line, int count, int dy); static void fbcon_modechanged(struct fb_info *info); static void fbcon_set_all_vcs(struct fb_info *info); -static void fbcon_start(void); -static void fbcon_exit(void); -static struct class_device *fbcon_class_device; #ifdef CONFIG_MAC /* @@ -254,7 +252,7 @@ static void fbcon_rotate_all(struct fb_info *info, u32 rotate) if (!ops || ops->currcon < 0 || rotate > 3) return; - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { vc = vc_cons[i].d; if (!vc || vc->vc_mode != KD_TEXT || registered_fb[con2fb_map[i]] != info) @@ -391,18 +389,15 @@ static void fb_flashcursor(void *private) int c; int mode; - acquire_console_sem(); - if (ops && ops->currcon != -1) + if (ops->currcon != -1) vc = vc_cons[ops->currcon].d; if (!vc || !CON_IS_VISIBLE(vc) || fbcon_is_inactive(vc, info) || registered_fb[con2fb_map[vc->vc_num]] != info || - vc_cons[ops->currcon].d->vc_deccm != 1) { - release_console_sem(); + vc_cons[ops->currcon].d->vc_deccm != 1) return; - } - + acquire_console_sem(); p = &fb_display[vc->vc_num]; c = scr_readw((u16 *) vc->vc_pos); mode = (!ops->cursor_flash || ops->cursor_state.enable) ? @@ -533,7 +528,7 @@ static int search_fb_in_map(int idx) { int i, retval = 0; - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { if (con2fb_map[i] == idx) retval = 1; } @@ -544,7 +539,7 @@ static int search_for_mapped_con(void) { int i, retval = 0; - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { if (con2fb_map[i] != -1) retval = 1; } @@ -566,7 +561,6 @@ static int fbcon_takeover(int show_logo) err = take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default); - if (err) { for (i = first_fb_vc; i <= last_fb_vc; i++) { con2fb_map[i] = -1; @@ -801,8 +795,8 @@ static int set_con2fb_map(int unit, int newidx, int user) if (oldidx == newidx) return 0; - if (!info || fbcon_has_exited) - return -EINVAL; + if (!info) + err = -EINVAL; if (!err && !search_for_mapped_con()) { info_idx = newidx; @@ -838,9 +832,6 @@ static int set_con2fb_map(int unit, int newidx, int user) con2fb_init_display(vc, info, unit, show_logo); } - if (!search_fb_in_map(info_idx)) - info_idx = newidx; - release_console_sem(); return err; } @@ -1043,7 +1034,6 @@ static const char *fbcon_startup(void) #endif /* CONFIG_MAC */ fbcon_add_cursor_timer(info); - fbcon_has_exited = 0; return display_desc; } @@ -1071,36 +1061,17 @@ static void fbcon_init(struct vc_data *vc, int init) /* If we are not the first console on this fb, copy the font from that console */ - t = &fb_display[fg_console]; - if (!p->fontdata) { - if (t->fontdata) { - struct vc_data *fvc = vc_cons[fg_console].d; - - vc->vc_font.data = (void *)(p->fontdata = - fvc->vc_font.data); - vc->vc_font.width = fvc->vc_font.width; - vc->vc_font.height = fvc->vc_font.height; - p->userfont = t->userfont; - - if (p->userfont) - REFCOUNT(p->fontdata)++; - } else { - const struct font_desc *font = NULL; - - if (!fontname[0] || !(font = find_font(fontname))) - font = get_default_font(info->var.xres, - info->var.yres); - vc->vc_font.width = font->width; - vc->vc_font.height = font->height; - vc->vc_font.data = (void *)(p->fontdata = font->data); - vc->vc_font.charcount = 256; /* FIXME Need to - support more fonts */ - } + t = &fb_display[svc->vc_num]; + if (!vc->vc_font.data) { + vc->vc_font.data = (void *)(p->fontdata = t->fontdata); + vc->vc_font.width = (*default_mode)->vc_font.width; + vc->vc_font.height = (*default_mode)->vc_font.height; + p->userfont = t->userfont; + if (p->userfont) + REFCOUNT(p->fontdata)++; } - if (p->userfont) charcnt = FNTCHARCNT(p->fontdata); - vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; if (charcnt == 256) { @@ -1174,47 +1145,13 @@ static void fbcon_init(struct vc_data *vc, int init) ops->p = &fb_display[fg_console]; } -static void fbcon_free_font(struct display *p) -{ - if (p->userfont && p->fontdata && (--REFCOUNT(p->fontdata) == 0)) - kfree(p->fontdata - FONT_EXTRA_WORDS * sizeof(int)); - p->fontdata = NULL; - p->userfont = 0; -} - static void fbcon_deinit(struct vc_data *vc) { struct display *p = &fb_display[vc->vc_num]; - struct fb_info *info; - struct fbcon_ops *ops; - int idx; + if (info_idx != -1) + return; fbcon_free_font(p); - idx = con2fb_map[vc->vc_num]; - - if (idx == -1) - goto finished; - - info = registered_fb[idx]; - - if (!info) - goto finished; - - ops = info->fbcon_par; - - if (!ops) - goto finished; - - if (CON_IS_VISIBLE(vc)) - fbcon_del_cursor_timer(info); - - ops->flags &= ~FBCON_FLAGS_INIT; -finished: - - if (!con_is_bound(&fb_con)) - fbcon_exit(); - - return; } /* ====================================================================== */ @@ -2162,11 +2099,12 @@ static int fbcon_switch(struct vc_data *vc) if (info->fbops->fb_set_par) info->fbops->fb_set_par(info); - if (old_info != info) + if (old_info != info) { fbcon_del_cursor_timer(old_info); + fbcon_add_cursor_timer(info); + } } - fbcon_add_cursor_timer(info); set_blitting_type(vc, info); ops->cursor_reset = 1; @@ -2284,6 +2222,14 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) return 0; } +static void fbcon_free_font(struct display *p) +{ + if (p->userfont && p->fontdata && (--REFCOUNT(p->fontdata) == 0)) + kfree(p->fontdata - FONT_EXTRA_WORDS * sizeof(int)); + p->fontdata = NULL; + p->userfont = 0; +} + static int fbcon_get_font(struct vc_data *vc, struct console_font *font) { u8 *fontdata = vc->vc_font.data; @@ -2497,7 +2443,7 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font, unsigne FNTSUM(new_data) = csum; /* Check if the same font is on some other console already */ - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { struct vc_data *tmp = vc_cons[i].d; if (fb_display[i].userfont && @@ -2822,7 +2768,7 @@ static void fbcon_set_all_vcs(struct fb_info *info) if (!ops || ops->currcon < 0) return; - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { vc = vc_cons[i].d; if (!vc || vc->vc_mode != KD_TEXT || registered_fb[con2fb_map[i]] != info) @@ -2884,57 +2830,22 @@ static int fbcon_mode_deleted(struct fb_info *info, return found; } -static int fbcon_fb_unregistered(int idx) -{ - int i; - - for (i = first_fb_vc; i <= last_fb_vc; i++) { - if (con2fb_map[i] == idx) - con2fb_map[i] = -1; - } - - if (idx == info_idx) { - info_idx = -1; - - for (i = 0; i < FB_MAX; i++) { - if (registered_fb[i] != NULL) { - info_idx = i; - break; - } - } - } - - if (info_idx != -1) { - for (i = first_fb_vc; i <= last_fb_vc; i++) { - if (con2fb_map[i] == -1) - con2fb_map[i] = info_idx; - } - } - - if (!num_registered_fb) - unregister_con_driver(&fb_con); - - return 0; -} - static int fbcon_fb_registered(int idx) { int ret = 0, i; if (info_idx == -1) { - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { if (con2fb_map_boot[i] == idx) { info_idx = idx; break; } } - if (info_idx != -1) ret = fbcon_takeover(1); } else { - for (i = first_fb_vc; i <= last_fb_vc; i++) { - if (con2fb_map_boot[i] == idx && - con2fb_map[i] == -1) + for (i = 0; i < MAX_NR_CONSOLES; i++) { + if (con2fb_map_boot[i] == idx) set_con2fb_map(i, idx, 0); } } @@ -2971,7 +2882,7 @@ static void fbcon_new_modelist(struct fb_info *info) struct fb_var_screeninfo var; struct fb_videomode *mode; - for (i = first_fb_vc; i <= last_fb_vc; i++) { + for (i = 0; i < MAX_NR_CONSOLES; i++) { if (registered_fb[con2fb_map[i]] != info) continue; if (!fb_display[i].mode) @@ -2999,14 +2910,6 @@ static int fbcon_event_notify(struct notifier_block *self, struct fb_con2fbmap *con2fb; int ret = 0; - /* - * ignore all events except driver registration and deregistration - * if fbcon is not active - */ - if (fbcon_has_exited && !(action == FB_EVENT_FB_REGISTERED || - action == FB_EVENT_FB_UNREGISTERED)) - goto done; - switch(action) { case FB_EVENT_SUSPEND: fbcon_suspended(info); @@ -3027,9 +2930,6 @@ static int fbcon_event_notify(struct notifier_block *self, case FB_EVENT_FB_REGISTERED: ret = fbcon_fb_registered(info->node); break; - case FB_EVENT_FB_UNREGISTERED: - ret = fbcon_fb_unregistered(info->node); - break; case FB_EVENT_SET_CONSOLE_MAP: con2fb = event->data; ret = set_con2fb_map(con2fb->console - 1, @@ -3045,9 +2945,16 @@ static int fbcon_event_notify(struct notifier_block *self, case FB_EVENT_NEW_MODELIST: fbcon_new_modelist(info); break; + case FB_EVENT_SET_CON_ROTATE: + fbcon_rotate(info, *(int *)event->data); + break; + case FB_EVENT_GET_CON_ROTATE: + ret = fbcon_get_rotate(info); + break; + case FB_EVENT_SET_CON_ROTATE_ALL: + fbcon_rotate_all(info, *(int *)event->data); } -done: return ret; } @@ -3085,184 +2992,27 @@ static struct notifier_block fbcon_event_notifier = { .notifier_call = fbcon_event_notify, }; -static ssize_t store_rotate(struct class_device *class_device, - const char *buf, size_t count) -{ - struct fb_info *info; - int rotate, idx; - char **last = NULL; - - if (fbcon_has_exited) - return count; - - acquire_console_sem(); - idx = con2fb_map[fg_console]; - - if (idx == -1 || registered_fb[idx] == NULL) - goto err; - - info = registered_fb[idx]; - rotate = simple_strtoul(buf, last, 0); - fbcon_rotate(info, rotate); -err: - release_console_sem(); - return count; -} - -static ssize_t store_rotate_all(struct class_device *class_device, - const char *buf, size_t count) -{ - struct fb_info *info; - int rotate, idx; - char **last = NULL; - - if (fbcon_has_exited) - return count; - - acquire_console_sem(); - idx = con2fb_map[fg_console]; - - if (idx == -1 || registered_fb[idx] == NULL) - goto err; - - info = registered_fb[idx]; - rotate = simple_strtoul(buf, last, 0); - fbcon_rotate_all(info, rotate); -err: - release_console_sem(); - return count; -} - -static ssize_t show_rotate(struct class_device *class_device, char *buf) +static int __init fb_console_init(void) { - struct fb_info *info; - int rotate = 0, idx; - - if (fbcon_has_exited) - return 0; + int i; acquire_console_sem(); - idx = con2fb_map[fg_console]; - - if (idx == -1 || registered_fb[idx] == NULL) - goto err; - - info = registered_fb[idx]; - rotate = fbcon_get_rotate(info); -err: + fb_register_client(&fbcon_event_notifier); release_console_sem(); - return snprintf(buf, PAGE_SIZE, "%d\n", rotate); -} -static struct class_device_attribute class_device_attrs[] = { - __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate), - __ATTR(rotate_all, S_IWUSR, NULL, store_rotate_all), -}; - -static int fbcon_init_class_device(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) - class_device_create_file(fbcon_class_device, - &class_device_attrs[i]); - return 0; -} + for (i = 0; i < MAX_NR_CONSOLES; i++) + con2fb_map[i] = -1; -static void fbcon_start(void) -{ if (num_registered_fb) { - int i; - - acquire_console_sem(); - for (i = 0; i < FB_MAX; i++) { if (registered_fb[i] != NULL) { info_idx = i; break; } } - - release_console_sem(); fbcon_takeover(0); } -} - -static void fbcon_exit(void) -{ - struct fb_info *info; - int i, j, mapped; - - if (fbcon_has_exited) - return; - -#ifdef CONFIG_ATARI - free_irq(IRQ_AUTO_4, fbcon_vbl_handler); -#endif -#ifdef CONFIG_MAC - if (MACH_IS_MAC && vbl_detected) - free_irq(IRQ_MAC_VBL, fbcon_vbl_handler); -#endif - - kfree((void *)softback_buf); - softback_buf = 0UL; - - for (i = 0; i < FB_MAX; i++) { - mapped = 0; - info = registered_fb[i]; - - if (info == NULL) - continue; - - for (j = first_fb_vc; j <= last_fb_vc; j++) { - if (con2fb_map[j] == i) - mapped = 1; - } - - if (mapped) { - if (info->fbops->fb_release) - info->fbops->fb_release(info, 0); - module_put(info->fbops->owner); - - if (info->fbcon_par) { - struct fbcon_ops *ops = info->fbcon_par; - - fbcon_del_cursor_timer(info); - kfree(ops->cursor_src); - kfree(info->fbcon_par); - info->fbcon_par = NULL; - } - if (info->queue.func == fb_flashcursor) - info->queue.func = NULL; - } - } - - fbcon_has_exited = 1; -} - -static int __init fb_console_init(void) -{ - int i; - - acquire_console_sem(); - fb_register_client(&fbcon_event_notifier); - fbcon_class_device = - class_device_create(fb_class, NULL, MKDEV(0, 0), NULL, "fbcon"); - - if (IS_ERR(fbcon_class_device)) { - printk(KERN_WARNING "Unable to create class_device " - "for fbcon; errno = %ld\n", - PTR_ERR(fbcon_class_device)); - fbcon_class_device = NULL; - } else - fbcon_init_class_device(); - - for (i = 0; i < MAX_NR_CONSOLES; i++) - con2fb_map[i] = -1; - - release_console_sem(); - fbcon_start(); return 0; } @@ -3270,24 +3020,12 @@ module_init(fb_console_init); #ifdef MODULE -static void __exit fbcon_deinit_class_device(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(class_device_attrs); i++) - class_device_remove_file(fbcon_class_device, - &class_device_attrs[i]); -} - static void __exit fb_console_exit(void) { acquire_console_sem(); fb_unregister_client(&fbcon_event_notifier); - fbcon_deinit_class_device(); - class_device_destroy(fb_class, MKDEV(0, 0)); - fbcon_exit(); release_console_sem(); - unregister_con_driver(&fb_con); + give_up_console(&fb_con); } module_exit(fb_console_exit); diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index b9386d168..c38c3d8e7 100644 --- a/drivers/video/console/fbcon.h +++ b/drivers/video/console/fbcon.h @@ -11,6 +11,7 @@ #ifndef _VIDEO_FBCON_H #define _VIDEO_FBCON_H +#include #include #include #include @@ -80,8 +81,6 @@ struct fbcon_ops { char *cursor_data; u8 *fontbuffer; u8 *fontdata; - u8 *cursor_src; - u32 cursor_size; u32 fd_size; }; /* @@ -176,7 +175,6 @@ extern void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info); #endif extern void fbcon_set_bitops(struct fbcon_ops *ops); extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); -extern struct class *fb_class; #define FBCON_ATTRIBUTE_UNDERLINE 1 #define FBCON_ATTRIBUTE_REVERSE 2 diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index 4481c80b8..990289a69 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index 7f92c06af..d44c5fa51 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/console/fbcon_rotate.c index 00884e013..2dc091fbd 100644 --- a/drivers/video/console/fbcon_rotate.c +++ b/drivers/video/console/fbcon_rotate.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index ab91005e6..f56ed068a 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/font_acorn_8x8.c b/drivers/video/console/font_acorn_8x8.c index 40f3d4eeb..2d2e39632 100644 --- a/drivers/video/console/font_acorn_8x8.c +++ b/drivers/video/console/font_acorn_8x8.c @@ -1,5 +1,6 @@ /* Acorn-like font definition, with PC graphics characters */ +#include #include static const unsigned char acorndata_8x8[] = { diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c index c960728b7..0cc1bfda7 100644 --- a/drivers/video/console/fonts.c +++ b/drivers/video/console/fonts.c @@ -12,6 +12,7 @@ * for more details. */ +#include #include #include #include diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index eb4d03fa5..989e4d49e 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -197,7 +198,7 @@ static int __init mdacon_setup(char *str) __setup("mdacon=", mdacon_setup); #endif -static int mda_detect(void) +static int __init mda_detect(void) { int count=0; u16 *p, p_save; @@ -282,7 +283,7 @@ static int mda_detect(void) return 1; } -static void mda_initialize(void) +static void __init mda_initialize(void) { write_mda_b(97, 0x00); /* horizontal total */ write_mda_b(80, 0x01); /* horizontal displayed */ @@ -307,13 +308,13 @@ static void mda_initialize(void) outb_p(0x00, mda_gfx_port); } -static const char *mdacon_startup(void) +static const char __init *mdacon_startup(void) { mda_num_columns = 80; mda_num_lines = 25; + mda_vram_base = VGA_MAP_MEM(0xb0000); mda_vram_len = 0x01000; - mda_vram_base = VGA_MAP_MEM(0xb0000, mda_vram_len); mda_index_port = 0x3b4; mda_value_port = 0x3b5; diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 7fa1afeae..e99fe30e5 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -50,7 +51,6 @@ static int topscan; static int xcurs_correction = 29; static int newport_xsize; static int newport_ysize; -static int newport_has_init; static int newport_set_def_font(int unit, struct console_font *op); @@ -283,15 +283,6 @@ static void newport_get_revisions(void) xcurs_correction = 21; } -static void newport_exit(void) -{ - int i; - - /* free memory used by user font */ - for (i = 0; i < MAX_NR_CONSOLES; i++) - newport_set_def_font(i, NULL); -} - /* Can't be __init, take_over_console may call it later */ static const char *newport_startup(void) { @@ -299,10 +290,8 @@ static const char *newport_startup(void) if (!sgi_gfxaddr) return NULL; - - if (!npregs) - npregs = (struct newport_regs *)/* ioremap cannot fail */ - ioremap(sgi_gfxaddr, sizeof(struct newport_regs)); + npregs = (struct newport_regs *) /* ioremap cannot fail */ + ioremap(sgi_gfxaddr, sizeof(struct newport_regs)); npregs->cset.config = NPORT_CFG_GD0; if (newport_wait(npregs)) @@ -318,11 +307,11 @@ static const char *newport_startup(void) newport_reset(); newport_get_revisions(); newport_get_screensize(); - newport_has_init = 1; return "SGI Newport"; out_unmap: + iounmap((void *)npregs); return NULL; } @@ -335,10 +324,11 @@ static void newport_init(struct vc_data *vc, int init) static void newport_deinit(struct vc_data *c) { - if (!con_is_bound(&newport_con) && newport_has_init) { - newport_exit(); - newport_has_init = 0; - } + int i; + + /* free memory used by user font */ + for (i = 0; i < MAX_NR_CONSOLES; i++) + newport_set_def_font(i, NULL); } static void newport_clear(struct vc_data *vc, int sy, int sx, int height, @@ -738,23 +728,16 @@ const struct consw newport_con = { #ifdef MODULE static int __init newport_console_init(void) { - - if (!sgi_gfxaddr) - return NULL; - - if (!npregs) - npregs = (struct newport_regs *)/* ioremap cannot fail */ - ioremap(sgi_gfxaddr, sizeof(struct newport_regs)); - return take_over_console(&newport_con, 0, MAX_NR_CONSOLES - 1, 1); } -module_init(newport_console_init); static void __exit newport_console_exit(void) { give_up_console(&newport_con); iounmap((void *)npregs); } + +module_init(newport_console_init); module_exit(newport_console_exit); #endif diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c index b78eac634..04f42fcaa 100644 --- a/drivers/video/console/promcon.c +++ b/drivers/video/console/promcon.c @@ -5,11 +5,13 @@ * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) */ +#include #include #include #include #include #include +#include #include #include #include @@ -107,7 +109,7 @@ promcon_end(struct vc_data *conp, char *b) return b - p; } -const char *promcon_startup(void) +const char __init *promcon_startup(void) { const char *display_desc = "PROM"; int node; @@ -131,7 +133,7 @@ const char *promcon_startup(void) return display_desc; } -static void +static void __init promcon_init_unimap(struct vc_data *conp) { mm_segment_t old_fs = get_fs(); diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 7d07d8383..2ade75291 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -20,12 +21,13 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) { - struct fbcon_ops *ops = info->fbcon_par; unsigned int scan_align = info->pixmap.scan_align - 1; unsigned int buf_align = info->pixmap.buf_align - 1; unsigned int i, size, dsize, s_pitch, d_pitch; struct fb_image *image; u8 *dst; + static u8 *src=NULL; + static int allocsize = 0; if (info->state != FBINFO_STATE_RUNNING) return 0; @@ -33,19 +35,19 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) s_pitch = (cursor->image.width + 7) >> 3; dsize = s_pitch * cursor->image.height; - if (dsize + sizeof(struct fb_image) != ops->cursor_size) { - if (ops->cursor_src != NULL) - kfree(ops->cursor_src); - ops->cursor_size = dsize + sizeof(struct fb_image); + if (dsize + sizeof(struct fb_image) != allocsize) { + if (src != NULL) + kfree(src); + allocsize = dsize + sizeof(struct fb_image); - ops->cursor_src = kmalloc(ops->cursor_size, GFP_ATOMIC); - if (!ops->cursor_src) { - ops->cursor_size = 0; + src = kmalloc(allocsize, GFP_ATOMIC); + if (!src) { + allocsize = 0; return -ENOMEM; } } - image = (struct fb_image *) (ops->cursor_src + dsize); + image = (struct fb_image *) (src + dsize); *image = cursor->image; d_pitch = (s_pitch + scan_align) & ~scan_align; @@ -57,21 +59,18 @@ int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) switch (cursor->rop) { case ROP_XOR: for (i = 0; i < dsize; i++) - ops->cursor_src[i] = image->data[i] ^ - cursor->mask[i]; + src[i] = image->data[i] ^ cursor->mask[i]; break; case ROP_COPY: default: for (i = 0; i < dsize; i++) - ops->cursor_src[i] = image->data[i] & - cursor->mask[i]; + src[i] = image->data[i] & cursor->mask[i]; break; } } else - memcpy(ops->cursor_src, image->data, dsize); + memcpy(src, image->data, dsize); - fb_pad_aligned_buffer(dst, d_pitch, ops->cursor_src, s_pitch, - image->height); + fb_pad_aligned_buffer(dst, d_pitch, src, s_pitch, image->height); image->data = dst; info->fbops->fb_imageblit(info, image); return 0; diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 45586aaab..fd5940f41 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,7 @@ static inline void cursor_undrawn(void) cursor_drawn = 0; } -static const char *sticon_startup(void) +static const char *__init sticon_startup(void) { return "STI console"; } diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 88e7038ea..74ac2acaf 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c index d981fe4d8..153352ca9 100644 --- a/drivers/video/console/tileblit.c +++ b/drivers/video/console/tileblit.c @@ -8,6 +8,7 @@ * more details. */ +#include #include #include #include diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 0a2c10a1a..d5a04b68c 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -33,11 +33,13 @@ * more details. */ +#include #include #include #include #include #include +#include #include #include #include @@ -47,7 +49,6 @@ #include #include #include -#include #include #include

> parameter to , , + and . + Work sponsored by SGI. + v0.76 + 19991017 Richard Gooch + Allow multiple unregistrations. + Work sponsored by SGI. + v0.77 + 19991026 Richard Gooch + Added major and minor number to devfsd protocol. + Incremented devfsd protocol revision to 5. + Work sponsored by SGI. + v0.78 + 19991030 Richard Gooch + Support info pointer for all devfs entry types. + Added <> parameter to and + . + Work sponsored by SGI. + v0.79 + 19991031 Richard Gooch + Support "../" when searching devfs namespace. + Work sponsored by SGI. + v0.80 + 19991101 Richard Gooch + Created . + Work sponsored by SGI. + v0.81 + 19991103 Richard Gooch + Exported . + Work sponsored by SGI. + v0.82 + 19991104 Richard Gooch + Removed unused . + 19991105 Richard Gooch + Do not hide entries from devfsd or children. + Removed DEVFS_ FL_TTY_COMPAT flag. + Removed "nottycompat" boot option. + Removed . + Work sponsored by SGI. + v0.83 + 19991107 Richard Gooch + Added DEVFS_FL_WAIT flag. + Work sponsored by SGI. + v0.84 + 19991107 Richard Gooch + Support new "disc" naming scheme in . + Allow NULL fops in . + Work sponsored by SGI. + v0.85 + 19991110 Richard Gooch + Fall back to major table if NULL fops given to . + Work sponsored by SGI. + v0.86 + 19991204 Richard Gooch + Support fifos when unregistering. + Work sponsored by SGI. + v0.87 + 19991209 Richard Gooch + Removed obsolete DEVFS_ FL_COMPAT and DEVFS_ FL_TOLERANT flags. + Work sponsored by SGI. + v0.88 + 19991214 Richard Gooch + Removed kmod support. + Work sponsored by SGI. + v0.89 + 19991216 Richard Gooch + Improved debugging in . + Ensure dentries created by devfsd will be cleaned up. + Work sponsored by SGI. + v0.90 + 19991223 Richard Gooch + Created . + Work sponsored by SGI. + v0.91 + 20000203 Richard Gooch + Ported to kernel 2.3.42. + Removed . + Work sponsored by SGI. + v0.92 + 20000306 Richard Gooch + Added DEVFS_ FL_NO_PERSISTENCE flag. + Removed unnecessary call to in + . + Work sponsored by SGI. + v0.93 + 20000413 Richard Gooch + Set inode->i_size to correct size for symlinks. + 20000414 Richard Gooch + Only give lookup() method to directories to comply with new VFS + assumptions. + Work sponsored by SGI. + 20000415 Richard Gooch + Remove unnecessary tests in symlink methods. + Don't kill existing block ops in . + Work sponsored by SGI. + v0.94 + 20000424 Richard Gooch + Don't create missing directories in . + Work sponsored by SGI. + v0.95 + 20000430 Richard Gooch + Added CONFIG_DEVFS_MOUNT. + Work sponsored by SGI. + v0.96 + 20000608 Richard Gooch + Disabled multi-mount capability (use VFS bindings instead). + Work sponsored by SGI. + v0.97 + 20000610 Richard Gooch + Switched to FS_SINGLE to disable multi-mounts. + 20000612 Richard Gooch + Removed module support. + Removed multi-mount code. + Removed compatibility macros: VFS has changed too much. + Work sponsored by SGI. + v0.98 + 20000614 Richard Gooch + Merged devfs inode into devfs entry. + Work sponsored by SGI. + v0.99 + 20000619 Richard Gooch + Removed dead code in which used to call + . + Work sponsored by SGI. + v0.100 + 20000621 Richard Gooch + Changed interface to . + Work sponsored by SGI. + v0.101 + 20000622 Richard Gooch + Simplified interface to and . + Simplified interface to . + Work sponsored by SGI. + v0.102 + 20010519 Richard Gooch + Ensure terminates string for root entry. + Exported to modules. + 20010520 Richard Gooch + Make send events to devfsd. + Cleaned up option processing in . + 20010521 Richard Gooch + Fixed bugs in handling symlinks: could leak or cause Oops. + 20010522 Richard Gooch + Cleaned up directory handling by separating fops. + v0.103 + 20010601 Richard Gooch + Fixed handling of inverted options in . + v0.104 + 20010604 Richard Gooch + Adjusted to account for fix. + v0.105 + 20010617 Richard Gooch + Answered question posed by Al Viro and removed his comments. + Moved setting of registered flag after other fields are changed. + Fixed race between and . + Global VFS changes added bogus BKL to : removed. + Widened locking in and . + Replaced stack usage with kmalloc. + Simplified locking in and fixed memory leak. + v0.106 + 20010709 Richard Gooch + Removed broken devnum allocation and use . + Fixed old devnum leak by calling new . + v0.107 + 20010712 Richard Gooch + Fixed bug in which could hang boot process. + v0.108 + 20010730 Richard Gooch + Added DEVFSD_NOTIFY_DELETE event. + 20010801 Richard Gooch + Removed #include . + v0.109 + 20010807 Richard Gooch + Fixed inode table races by removing it and using + inode->u.generic_ip instead. + Moved into . + Moved into . + v0.110 + 20010808 Richard Gooch + Fixed race in for uni-processor. + v0.111 + 20010818 Richard Gooch + Removed remnant of multi-mount support in . + Removed unused DEVFS_FL_SHOW_UNREG flag. + v0.112 + 20010820 Richard Gooch + Removed nlink field from struct devfs_inode. + v0.113 + 20010823 Richard Gooch + Replaced BKL with global rwsem to protect symlink data (quick + and dirty hack). + v0.114 + 20010827 Richard Gooch + Replaced global rwsem for symlink with per-link refcount. + v0.115 + 20010919 Richard Gooch + Set inode->i_mapping->a_ops for block nodes in . + v0.116 + 20011008 Richard Gooch + Fixed overrun in by removing function (not needed). + 20011009 Richard Gooch + Fixed buffer underrun in . + 20011029 Richard Gooch + Fixed race in when setting event mask. + 20011114 Richard Gooch + First release of new locking code. + v1.0 + 20011117 Richard Gooch + Discard temporary buffer, now use "%s" for dentry names. + 20011118 Richard Gooch + Don't generate path in : use fake entry instead. + Use "existing" directory in <_devfs_make_parent_for_leaf>. + 20011122 Richard Gooch + Use slab cache rather than fixed buffer for devfsd events. + v1.1 + 20011125 Richard Gooch + Send DEVFSD_NOTIFY_REGISTERED events in . + 20011127 Richard Gooch + Fixed locking bug in due to typo. + Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from + devfsd or children. + v1.2 + 20011202 Richard Gooch + Fixed bug in : was dereferencing freed pointer. + v1.3 + 20011203 Richard Gooch + Fixed bug in : was dereferencing freed pointer. + Added process group check for devfsd privileges. + v1.4 + 20011204 Richard Gooch + Use SLAB_ATOMIC in from . + v1.5 + 20011211 Richard Gooch + Return old entry in for 2.4.x kernels. + 20011212 Richard Gooch + Increment refcount on module in . + 20011215 Richard Gooch + Created and exported . + Increment refcount on module in . + Created . + v1.6 + 20011216 Richard Gooch + Added poisoning to . + Improved debugging messages. + v1.7 + 20011221 Richard Gooch + Corrected (made useful) debugging message in . + Moved in to + 20011224 Richard Gooch + Added magic number to guard against scribbling drivers. + 20011226 Richard Gooch + Only return old entry in if a directory. + Defined macros for error and debug messages. + v1.8 + 20020113 Richard Gooch + Fixed (rare, old) race in . + v1.9 + 20020120 Richard Gooch + Fixed deadlock bug in . + Tag VFS deletable in if handle ignored. + v1.10 + 20020129 Richard Gooch + Added KERN_* to remaining messages. + Cleaned up declaration of . + v1.11 + 20020219 Richard Gooch + Changed to allow later additions if not yet empty. + v1.12 + 20020406 Richard Gooch + Removed silently introduced calls to lock_kernel() and + unlock_kernel() due to recent VFS locking changes. BKL isn't + required in devfs. + v1.13 + 20020428 Richard Gooch + Removed 2.4.x compatibility code. + v1.14 + 20020510 Richard Gooch + Added BKL to because drivers still need it. + v1.15 + 20020512 Richard Gooch + Protected and + from changing directory contents. + v1.16 + 20020514 Richard Gooch + Minor cleanup of . + v1.17 + 20020721 Richard Gooch + Switched to ISO C structure field initialisers. + Switch to set_current_state() and move before add_wait_queue(). + 20020722 Richard Gooch + Fixed devfs entry leak in when *readdir fails. + v1.18 + 20020725 Richard Gooch + Created . + v1.19 + 20020728 Richard Gooch + Removed deprecated . + v1.20 + 20020820 Richard Gooch + Fixed module unload race in . + v1.21 + 20021013 Richard Gooch + Removed DEVFS_ FL_AUTO_OWNER. + Switched lingering structure field initialiser to ISO C. + Added locking when updating FCB flags. + v1.22 +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define DEVFS_VERSION "2004-01-31" + +#define DEVFS_NAME "devfs" + +#define FIRST_INODE 1 + +#define STRING_LENGTH 256 +#define FAKE_BLOCK_SIZE 1024 +#define POISON_PTR ( *(void **) poison_array ) +#define MAGIC_VALUE 0x327db823 + +#ifndef TRUE +# define TRUE 1 +# define FALSE 0 +#endif + +#define MODE_DIR (S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO) + +#define DEBUG_NONE 0x0000000 +#define DEBUG_MODULE_LOAD 0x0000001 +#define DEBUG_REGISTER 0x0000002 +#define DEBUG_UNREGISTER 0x0000004 +#define DEBUG_FREE 0x0000008 +#define DEBUG_SET_FLAGS 0x0000010 +#define DEBUG_S_READ 0x0000100 /* Break */ +#define DEBUG_I_LOOKUP 0x0001000 /* Break */ +#define DEBUG_I_CREATE 0x0002000 +#define DEBUG_I_GET 0x0004000 +#define DEBUG_I_CHANGE 0x0008000 +#define DEBUG_I_UNLINK 0x0010000 +#define DEBUG_I_RLINK 0x0020000 +#define DEBUG_I_FLINK 0x0040000 +#define DEBUG_I_MKNOD 0x0080000 +#define DEBUG_F_READDIR 0x0100000 /* Break */ +#define DEBUG_D_DELETE 0x1000000 /* Break */ +#define DEBUG_D_RELEASE 0x2000000 +#define DEBUG_D_IPUT 0x4000000 +#define DEBUG_ALL 0xfffffff +#define DEBUG_DISABLED DEBUG_NONE + +#define OPTION_NONE 0x00 +#define OPTION_MOUNT 0x01 + +#define PRINTK(format, args...) \ + {printk (KERN_ERR "%s" format, __FUNCTION__ , ## args);} + +#define OOPS(format, args...) \ + {printk (KERN_CRIT "%s" format, __FUNCTION__ , ## args); \ + printk ("Forcing Oops\n"); \ + BUG();} + +#ifdef CONFIG_DEVFS_DEBUG +# define VERIFY_ENTRY(de) \ + {if ((de) && (de)->magic_number != MAGIC_VALUE) \ + OOPS ("(%p): bad magic value: %x\n", (de), (de)->magic_number);} +# define WRITE_ENTRY_MAGIC(de,magic) (de)->magic_number = (magic) +# define DPRINTK(flag, format, args...) \ + {if (devfs_debug & flag) \ + printk (KERN_INFO "%s" format, __FUNCTION__ , ## args);} +#else +# define VERIFY_ENTRY(de) +# define WRITE_ENTRY_MAGIC(de,magic) +# define DPRINTK(flag, format, args...) +#endif + +typedef struct devfs_entry *devfs_handle_t; + +struct directory_type { + rwlock_t lock; /* Lock for searching(R)/updating(W) */ + struct devfs_entry *first; + struct devfs_entry *last; + unsigned char no_more_additions:1; +}; + +struct symlink_type { + unsigned int length; /* Not including the NULL-termimator */ + char *linkname; /* This is NULL-terminated */ +}; + +struct devfs_inode { /* This structure is for "persistent" inode storage */ + struct dentry *dentry; + struct timespec atime; + struct timespec mtime; + struct timespec ctime; + unsigned int ino; /* Inode number as seen in the VFS */ + uid_t uid; + gid_t gid; +}; + +struct devfs_entry { +#ifdef CONFIG_DEVFS_DEBUG + unsigned int magic_number; +#endif + void *info; + atomic_t refcount; /* When this drops to zero, it's unused */ + union { + struct directory_type dir; + dev_t dev; + struct symlink_type symlink; + const char *name; /* Only used for (mode == 0) */ + } u; + struct devfs_entry *prev; /* Previous entry in the parent directory */ + struct devfs_entry *next; /* Next entry in the parent directory */ + struct devfs_entry *parent; /* The parent directory */ + struct devfs_inode inode; + umode_t mode; + unsigned short namelen; /* I think 64k+ filenames are a way off... */ + unsigned char vfs:1; /* Whether the VFS may delete the entry */ + char name[1]; /* This is just a dummy: the allocated array + is bigger. This is NULL-terminated */ +}; + +/* The root of the device tree */ +static struct devfs_entry *root_entry; + +struct devfsd_buf_entry { + struct devfs_entry *de; /* The name is generated with this */ + unsigned short type; /* The type of event */ + umode_t mode; + uid_t uid; + gid_t gid; + struct devfsd_buf_entry *next; +}; + +struct fs_info { /* This structure is for the mounted devfs */ + struct super_block *sb; + spinlock_t devfsd_buffer_lock; /* Lock when inserting/deleting events */ + struct devfsd_buf_entry *devfsd_first_event; + struct devfsd_buf_entry *devfsd_last_event; + volatile int devfsd_sleeping; + volatile struct task_struct *devfsd_task; + volatile pid_t devfsd_pgrp; + volatile struct file *devfsd_file; + struct devfsd_notify_struct *devfsd_info; + volatile unsigned long devfsd_event_mask; + atomic_t devfsd_overrun_count; + wait_queue_head_t devfsd_wait_queue; /* Wake devfsd on input */ + wait_queue_head_t revalidate_wait_queue; /* Wake when devfsd sleeps */ +}; + +static struct fs_info fs_info = {.devfsd_buffer_lock = SPIN_LOCK_UNLOCKED }; +static kmem_cache_t *devfsd_buf_cache; +#ifdef CONFIG_DEVFS_DEBUG +static unsigned int devfs_debug_init __initdata = DEBUG_NONE; +static unsigned int devfs_debug = DEBUG_NONE; +static DEFINE_SPINLOCK(stat_lock); +static unsigned int stat_num_entries; +static unsigned int stat_num_bytes; +#endif +static unsigned char poison_array[8] = + { 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a }; + +#ifdef CONFIG_DEVFS_MOUNT +static unsigned int boot_options = OPTION_MOUNT; +#else +static unsigned int boot_options = OPTION_NONE; +#endif + +/* Forward function declarations */ +static devfs_handle_t _devfs_walk_path(struct devfs_entry *dir, + const char *name, int namelen, + int traverse_symlink); +static ssize_t devfsd_read(struct file *file, char __user *buf, size_t len, + loff_t * ppos); +static int devfsd_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg); +static int devfsd_close(struct inode *inode, struct file *file); +#ifdef CONFIG_DEVFS_DEBUG +static ssize_t stat_read(struct file *file, char __user *buf, size_t len, + loff_t * ppos); +static const struct file_operations stat_fops = { + .open = nonseekable_open, + .read = stat_read, +}; +#endif + +/* Devfs daemon file operations */ +static const struct file_operations devfsd_fops = { + .open = nonseekable_open, + .read = devfsd_read, + .ioctl = devfsd_ioctl, + .release = devfsd_close, +}; + +/* Support functions follow */ + +/** + * devfs_get - Get a reference to a devfs entry. + * @de: The devfs entry. + */ + +static struct devfs_entry *devfs_get(struct devfs_entry *de) +{ + VERIFY_ENTRY(de); + if (de) + atomic_inc(&de->refcount); + return de; +} /* End Function devfs_get */ + +/** + * devfs_put - Put (release) a reference to a devfs entry. + * @de: The handle to the devfs entry. + */ + +static void devfs_put(devfs_handle_t de) +{ + if (!de) + return; + VERIFY_ENTRY(de); + if (de->info == POISON_PTR) + OOPS("(%p): poisoned pointer\n", de); + if (!atomic_dec_and_test(&de->refcount)) + return; + if (de == root_entry) + OOPS("(%p): root entry being freed\n", de); + DPRINTK(DEBUG_FREE, "(%s): de: %p, parent: %p \"%s\"\n", + de->name, de, de->parent, + de->parent ? de->parent->name : "no parent"); + if (S_ISLNK(de->mode)) + kfree(de->u.symlink.linkname); + WRITE_ENTRY_MAGIC(de, 0); +#ifdef CONFIG_DEVFS_DEBUG + spin_lock(&stat_lock); + --stat_num_entries; + stat_num_bytes -= sizeof *de + de->namelen; + if (S_ISLNK(de->mode)) + stat_num_bytes -= de->u.symlink.length + 1; + spin_unlock(&stat_lock); +#endif + de->info = POISON_PTR; + kfree(de); +} /* End Function devfs_put */ + +/** + * _devfs_search_dir - Search for a devfs entry in a directory. + * @dir: The directory to search. + * @name: The name of the entry to search for. + * @namelen: The number of characters in @name. + * + * Search for a devfs entry in a directory and returns a pointer to the entry + * on success, else %NULL. The directory must be locked already. + * An implicit devfs_get() is performed on the returned entry. + */ + +static struct devfs_entry *_devfs_search_dir(struct devfs_entry *dir, + const char *name, + unsigned int namelen) +{ + struct devfs_entry *curr; + + if (!S_ISDIR(dir->mode)) { + PRINTK("(%s): not a directory\n", dir->name); + return NULL; + } + for (curr = dir->u.dir.first; curr != NULL; curr = curr->next) { + if (curr->namelen != namelen) + continue; + if (memcmp(curr->name, name, namelen) == 0) + break; + /* Not found: try the next one */ + } + return devfs_get(curr); +} /* End Function _devfs_search_dir */ + +/** + * _devfs_alloc_entry - Allocate a devfs entry. + * @name: the name of the entry + * @namelen: the number of characters in @name + * @mode: the mode for the entry + * + * Allocate a devfs entry and returns a pointer to the entry on success, else + * %NULL. + */ + +static struct devfs_entry *_devfs_alloc_entry(const char *name, + unsigned int namelen, + umode_t mode) +{ + struct devfs_entry *new; + static unsigned long inode_counter = FIRST_INODE; + static DEFINE_SPINLOCK(counter_lock); + + if (name && (namelen < 1)) + namelen = strlen(name); + if ((new = kmalloc(sizeof *new + namelen, GFP_KERNEL)) == NULL) + return NULL; + memset(new, 0, sizeof *new + namelen); /* Will set '\0' on name */ + new->mode = mode; + if (S_ISDIR(mode)) + rwlock_init(&new->u.dir.lock); + atomic_set(&new->refcount, 1); + spin_lock(&counter_lock); + new->inode.ino = inode_counter++; + spin_unlock(&counter_lock); + if (name) + memcpy(new->name, name, namelen); + new->namelen = namelen; + WRITE_ENTRY_MAGIC(new, MAGIC_VALUE); +#ifdef CONFIG_DEVFS_DEBUG + spin_lock(&stat_lock); + ++stat_num_entries; + stat_num_bytes += sizeof *new + namelen; + spin_unlock(&stat_lock); +#endif + return new; +} /* End Function _devfs_alloc_entry */ + +/** + * _devfs_append_entry - Append a devfs entry to a directory's child list. + * @dir: The directory to add to. + * @de: The devfs entry to append. + * @old_de: If an existing entry exists, it will be written here. This may + * be %NULL. An implicit devfs_get() is performed on this entry. + * + * Append a devfs entry to a directory's list of children, checking first to + * see if an entry of the same name exists. The directory will be locked. + * The value 0 is returned on success, else a negative error code. + * On failure, an implicit devfs_put() is performed on %de. + */ + +static int _devfs_append_entry(devfs_handle_t dir, devfs_handle_t de, + devfs_handle_t * old_de) +{ + int retval; + + if (old_de) + *old_de = NULL; + if (!S_ISDIR(dir->mode)) { + PRINTK("(%s): dir: \"%s\" is not a directory\n", de->name, + dir->name); + devfs_put(de); + return -ENOTDIR; + } + write_lock(&dir->u.dir.lock); + if (dir->u.dir.no_more_additions) + retval = -ENOENT; + else { + struct devfs_entry *old; + + old = _devfs_search_dir(dir, de->name, de->namelen); + if (old_de) + *old_de = old; + else + devfs_put(old); + if (old == NULL) { + de->parent = dir; + de->prev = dir->u.dir.last; + /* Append to the directory's list of children */ + if (dir->u.dir.first == NULL) + dir->u.dir.first = de; + else + dir->u.dir.last->next = de; + dir->u.dir.last = de; + retval = 0; + } else + retval = -EEXIST; + } + write_unlock(&dir->u.dir.lock); + if (retval) + devfs_put(de); + return retval; +} /* End Function _devfs_append_entry */ + +/** + * _devfs_get_root_entry - Get the root devfs entry. + * + * Returns the root devfs entry on success, else %NULL. + * + * TODO it must be called asynchronously due to the fact + * that devfs is initialized relatively late. Proper way + * is to remove module_init from init_devfs_fs and manually + * call it early enough during system init + */ + +static struct devfs_entry *_devfs_get_root_entry(void) +{ + struct devfs_entry *new; + static DEFINE_SPINLOCK(root_lock); + + if (root_entry) + return root_entry; + + new = _devfs_alloc_entry(NULL, 0, MODE_DIR); + if (new == NULL) + return NULL; + + spin_lock(&root_lock); + if (root_entry) { + spin_unlock(&root_lock); + devfs_put(new); + return root_entry; + } + root_entry = new; + spin_unlock(&root_lock); + + return root_entry; +} /* End Function _devfs_get_root_entry */ + +/** + * _devfs_descend - Descend down a tree using the next component name. + * @dir: The directory to search. + * @name: The component name to search for. + * @namelen: The length of %name. + * @next_pos: The position of the next '/' or '\0' is written here. + * + * Descend into a directory, searching for a component. This function forms + * the core of a tree-walking algorithm. The directory will be locked. + * The devfs entry corresponding to the component is returned. If there is + * no matching entry, %NULL is returned. + * An implicit devfs_get() is performed on the returned entry. + */ + +static struct devfs_entry *_devfs_descend(struct devfs_entry *dir, + const char *name, int namelen, + int *next_pos) +{ + const char *stop, *ptr; + struct devfs_entry *entry; + + if ((namelen >= 3) && (strncmp(name, "../", 3) == 0)) { /* Special-case going to parent directory */ + *next_pos = 3; + return devfs_get(dir->parent); + } + stop = name + namelen; + /* Search for a possible '/' */ + for (ptr = name; (ptr < stop) && (*ptr != '/'); ++ptr) ; + *next_pos = ptr - name; + read_lock(&dir->u.dir.lock); + entry = _devfs_search_dir(dir, name, *next_pos); + read_unlock(&dir->u.dir.lock); + return entry; +} /* End Function _devfs_descend */ + +static devfs_handle_t _devfs_make_parent_for_leaf(struct devfs_entry *dir, + const char *name, + int namelen, int *leaf_pos) +{ + int next_pos = 0; + + if (dir == NULL) + dir = _devfs_get_root_entry(); + if (dir == NULL) + return NULL; + devfs_get(dir); + /* Search for possible trailing component and ignore it */ + for (--namelen; (namelen > 0) && (name[namelen] != '/'); --namelen) ; + *leaf_pos = (name[namelen] == '/') ? (namelen + 1) : 0; + for (; namelen > 0; name += next_pos, namelen -= next_pos) { + struct devfs_entry *de, *old = NULL; + + if ((de = + _devfs_descend(dir, name, namelen, &next_pos)) == NULL) { + de = _devfs_alloc_entry(name, next_pos, MODE_DIR); + devfs_get(de); + if (!de || _devfs_append_entry(dir, de, &old)) { + devfs_put(de); + if (!old || !S_ISDIR(old->mode)) { + devfs_put(old); + devfs_put(dir); + return NULL; + } + de = old; /* Use the existing directory */ + } + } + if (de == dir->parent) { + devfs_put(dir); + devfs_put(de); + return NULL; + } + devfs_put(dir); + dir = de; + if (name[next_pos] == '/') + ++next_pos; + } + return dir; +} /* End Function _devfs_make_parent_for_leaf */ + +static devfs_handle_t _devfs_prepare_leaf(devfs_handle_t * dir, + const char *name, umode_t mode) +{ + int namelen, leaf_pos; + struct devfs_entry *de; + + namelen = strlen(name); + if ((*dir = _devfs_make_parent_for_leaf(*dir, name, namelen, + &leaf_pos)) == NULL) { + PRINTK("(%s): could not create parent path\n", name); + return NULL; + } + if ((de = _devfs_alloc_entry(name + leaf_pos, namelen - leaf_pos, mode)) + == NULL) { + PRINTK("(%s): could not allocate entry\n", name); + devfs_put(*dir); + return NULL; + } + return de; +} /* End Function _devfs_prepare_leaf */ + +static devfs_handle_t _devfs_walk_path(struct devfs_entry *dir, + const char *name, int namelen, + int traverse_symlink) +{ + int next_pos = 0; + + if (dir == NULL) + dir = _devfs_get_root_entry(); + if (dir == NULL) + return NULL; + devfs_get(dir); + for (; namelen > 0; name += next_pos, namelen -= next_pos) { + struct devfs_entry *de, *link; + + if (!S_ISDIR(dir->mode)) { + devfs_put(dir); + return NULL; + } + + if ((de = + _devfs_descend(dir, name, namelen, &next_pos)) == NULL) { + devfs_put(dir); + return NULL; + } + if (S_ISLNK(de->mode) && traverse_symlink) { /* Need to follow the link: this is a stack chomper */ + /* FIXME what if it puts outside of mounted tree? */ + link = _devfs_walk_path(dir, de->u.symlink.linkname, + de->u.symlink.length, TRUE); + devfs_put(de); + if (!link) { + devfs_put(dir); + return NULL; + } + de = link; + } + devfs_put(dir); + dir = de; + if (name[next_pos] == '/') + ++next_pos; + } + return dir; +} /* End Function _devfs_walk_path */ + +/** + * _devfs_find_entry - Find a devfs entry. + * @dir: The handle to the parent devfs directory entry. If this is %NULL the + * name is relative to the root of the devfs. + * @name: The name of the entry. This may be %NULL. + * @traverse_symlink: If %TRUE then symbolic links are traversed. + * + * Returns the devfs_entry pointer on success, else %NULL. An implicit + * devfs_get() is performed. + */ + +static struct devfs_entry *_devfs_find_entry(devfs_handle_t dir, + const char *name, + int traverse_symlink) +{ + unsigned int namelen = strlen(name); + + if (name[0] == '/') { + /* Skip leading pathname component */ + if (namelen < 2) { + PRINTK("(%s): too short\n", name); + return NULL; + } + for (++name, --namelen; (*name != '/') && (namelen > 0); + ++name, --namelen) ; + if (namelen < 2) { + PRINTK("(%s): too short\n", name); + return NULL; + } + ++name; + --namelen; + } + return _devfs_walk_path(dir, name, namelen, traverse_symlink); +} /* End Function _devfs_find_entry */ + +static struct devfs_entry *get_devfs_entry_from_vfs_inode(struct inode *inode) +{ + if (inode == NULL) + return NULL; + VERIFY_ENTRY((struct devfs_entry *)inode->u.generic_ip); + return inode->u.generic_ip; +} /* End Function get_devfs_entry_from_vfs_inode */ + +/** + * free_dentry - Free the dentry for a device entry and invalidate inode. + * @de: The entry. + * + * This must only be called after the entry has been unhooked from its + * parent directory. + */ + +static void free_dentry(struct devfs_entry *de) +{ + struct dentry *dentry = de->inode.dentry; + + if (!dentry) + return; + spin_lock(&dcache_lock); + dget_locked(dentry); + spin_unlock(&dcache_lock); + /* Forcefully remove the inode */ + if (dentry->d_inode != NULL) + dentry->d_inode->i_nlink = 0; + d_drop(dentry); + dput(dentry); +} /* End Function free_dentry */ + +/** + * is_devfsd_or_child - Test if the current process is devfsd or one of its children. + * @fs_info: The filesystem information. + * + * Returns %TRUE if devfsd or child, else %FALSE. + */ + +static int is_devfsd_or_child(struct fs_info *fs_info) +{ + struct task_struct *p = current; + + if (p == fs_info->devfsd_task) + return (TRUE); + if (process_group(p) == fs_info->devfsd_pgrp) + return (TRUE); + read_lock(&tasklist_lock); + for (; p != &init_task; p = p->real_parent) { + if (p == fs_info->devfsd_task) { + read_unlock(&tasklist_lock); + return (TRUE); + } + } + read_unlock(&tasklist_lock); + return (FALSE); +} /* End Function is_devfsd_or_child */ + +/** + * devfsd_queue_empty - Test if devfsd has work pending in its event queue. + * @fs_info: The filesystem information. + * + * Returns %TRUE if the queue is empty, else %FALSE. + */ + +static inline int devfsd_queue_empty(struct fs_info *fs_info) +{ + return (fs_info->devfsd_last_event) ? FALSE : TRUE; +} /* End Function devfsd_queue_empty */ + +/** + * wait_for_devfsd_finished - Wait for devfsd to finish processing its event queue. + * @fs_info: The filesystem information. + * + * Returns %TRUE if no more waiting will be required, else %FALSE. + */ + +static int wait_for_devfsd_finished(struct fs_info *fs_info) +{ + DECLARE_WAITQUEUE(wait, current); + + if (fs_info->devfsd_task == NULL) + return (TRUE); + if (devfsd_queue_empty(fs_info) && fs_info->devfsd_sleeping) + return TRUE; + if (is_devfsd_or_child(fs_info)) + return (FALSE); + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&fs_info->revalidate_wait_queue, &wait); + if (!devfsd_queue_empty(fs_info) || !fs_info->devfsd_sleeping) + if (fs_info->devfsd_task) + schedule(); + remove_wait_queue(&fs_info->revalidate_wait_queue, &wait); + __set_current_state(TASK_RUNNING); + return (TRUE); +} /* End Function wait_for_devfsd_finished */ + +/** + * devfsd_notify_de - Notify the devfsd daemon of a change. + * @de: The devfs entry that has changed. This and all parent entries will + * have their reference counts incremented if the event was queued. + * @type: The type of change. + * @mode: The mode of the entry. + * @uid: The user ID. + * @gid: The group ID. + * @fs_info: The filesystem info. + * + * Returns %TRUE if an event was queued and devfsd woken up, else %FALSE. + */ + +static int devfsd_notify_de(struct devfs_entry *de, + unsigned short type, umode_t mode, + uid_t uid, gid_t gid, struct fs_info *fs_info) +{ + struct devfsd_buf_entry *entry; + struct devfs_entry *curr; + + if (!(fs_info->devfsd_event_mask & (1 << type))) + return (FALSE); + if ((entry = kmem_cache_alloc(devfsd_buf_cache, SLAB_KERNEL)) == NULL) { + atomic_inc(&fs_info->devfsd_overrun_count); + return (FALSE); + } + for (curr = de; curr != NULL; curr = curr->parent) + devfs_get(curr); + entry->de = de; + entry->type = type; + entry->mode = mode; + entry->uid = uid; + entry->gid = gid; + entry->next = NULL; + spin_lock(&fs_info->devfsd_buffer_lock); + if (!fs_info->devfsd_first_event) + fs_info->devfsd_first_event = entry; + if (fs_info->devfsd_last_event) + fs_info->devfsd_last_event->next = entry; + fs_info->devfsd_last_event = entry; + spin_unlock(&fs_info->devfsd_buffer_lock); + wake_up_interruptible(&fs_info->devfsd_wait_queue); + return (TRUE); +} /* End Function devfsd_notify_de */ + +/** + * devfsd_notify - Notify the devfsd daemon of a change. + * @de: The devfs entry that has changed. + * @type: The type of change event. + * @wait: If TRUE, the function waits for the daemon to finish processing + * the event. + */ + +static void devfsd_notify(struct devfs_entry *de, unsigned short type) +{ + devfsd_notify_de(de, type, de->mode, current->euid, + current->egid, &fs_info); +} + +static int devfs_mk_dev(dev_t dev, umode_t mode, const char *fmt, va_list args) +{ + struct devfs_entry *dir = NULL, *de; + char buf[64]; + int error, n; + + n = vsnprintf(buf, sizeof(buf), fmt, args); + if (n >= sizeof(buf) || !buf[0]) { + printk(KERN_WARNING "%s: invalid format string %s\n", + __FUNCTION__, fmt); + return -EINVAL; + } + + de = _devfs_prepare_leaf(&dir, buf, mode); + if (!de) { + printk(KERN_WARNING "%s: could not prepare leaf for %s\n", + __FUNCTION__, buf); + return -ENOMEM; /* could be more accurate... */ + } + + de->u.dev = dev; + + error = _devfs_append_entry(dir, de, NULL); + if (error) { + printk(KERN_WARNING "%s: could not append to parent for %s\n", + __FUNCTION__, buf); + goto out; + } + + devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); + out: + devfs_put(dir); + return error; +} + +int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) +{ + va_list args; + + if (!S_ISBLK(mode)) { + printk(KERN_WARNING "%s: invalide mode (%u) for %s\n", + __FUNCTION__, mode, fmt); + return -EINVAL; + } + + va_start(args, fmt); + return devfs_mk_dev(dev, mode, fmt, args); +} + +EXPORT_SYMBOL(devfs_mk_bdev); + +int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) +{ + va_list args; + + if (!S_ISCHR(mode)) { + printk(KERN_WARNING "%s: invalide mode (%u) for %s\n", + __FUNCTION__, mode, fmt); + return -EINVAL; + } + + va_start(args, fmt); + return devfs_mk_dev(dev, mode, fmt, args); +} + +EXPORT_SYMBOL(devfs_mk_cdev); + +/** + * _devfs_unhook - Unhook a device entry from its parents list + * @de: The entry to unhook. + * + * Returns %TRUE if the entry was unhooked, else %FALSE if it was + * previously unhooked. + * The caller must have a write lock on the parent directory. + */ + +static int _devfs_unhook(struct devfs_entry *de) +{ + struct devfs_entry *parent; + + if (!de || (de->prev == de)) + return FALSE; + parent = de->parent; + if (de->prev == NULL) + parent->u.dir.first = de->next; + else + de->prev->next = de->next; + if (de->next == NULL) + parent->u.dir.last = de->prev; + else + de->next->prev = de->prev; + de->prev = de; /* Indicate we're unhooked */ + de->next = NULL; /* Force early termination for */ + return TRUE; +} /* End Function _devfs_unhook */ + +/** + * _devfs_unregister - Unregister a device entry from its parent. + * @dir: The parent directory. + * @de: The entry to unregister. + * + * The caller must have a write lock on the parent directory, which is + * unlocked by this function. + */ + +static void _devfs_unregister(struct devfs_entry *dir, struct devfs_entry *de) +{ + int unhooked = _devfs_unhook(de); + + write_unlock(&dir->u.dir.lock); + if (!unhooked) + return; + devfs_get(dir); + devfsd_notify(de, DEVFSD_NOTIFY_UNREGISTERED); + free_dentry(de); + devfs_put(dir); + if (!S_ISDIR(de->mode)) + return; + while (TRUE) { /* Recursively unregister: this is a stack chomper */ + struct devfs_entry *child; + + write_lock(&de->u.dir.lock); + de->u.dir.no_more_additions = TRUE; + child = de->u.dir.first; + VERIFY_ENTRY(child); + _devfs_unregister(de, child); + if (!child) + break; + DPRINTK(DEBUG_UNREGISTER, "(%s): child: %p refcount: %d\n", + child->name, child, atomic_read(&child->refcount)); + devfs_put(child); + } +} /* End Function _devfs_unregister */ + +static int devfs_do_symlink(devfs_handle_t dir, const char *name, + const char *link, devfs_handle_t * handle) +{ + int err; + unsigned int linklength; + char *newlink; + struct devfs_entry *de; + + if (handle != NULL) + *handle = NULL; + if (name == NULL) { + PRINTK("(): NULL name pointer\n"); + return -EINVAL; + } + if (link == NULL) { + PRINTK("(%s): NULL link pointer\n", name); + return -EINVAL; + } + linklength = strlen(link); + if ((newlink = kmalloc(linklength + 1, GFP_KERNEL)) == NULL) + return -ENOMEM; + memcpy(newlink, link, linklength); + newlink[linklength] = '\0'; + if ((de = _devfs_prepare_leaf(&dir, name, S_IFLNK | S_IRUGO | S_IXUGO)) + == NULL) { + PRINTK("(%s): could not prepare leaf\n", name); + kfree(newlink); + return -ENOTDIR; + } + de->info = NULL; + de->u.symlink.linkname = newlink; + de->u.symlink.length = linklength; + if ((err = _devfs_append_entry(dir, de, NULL)) != 0) { + PRINTK("(%s): could not append to parent, err: %d\n", name, + err); + devfs_put(dir); + return err; + } + devfs_put(dir); +#ifdef CONFIG_DEVFS_DEBUG + spin_lock(&stat_lock); + stat_num_bytes += linklength + 1; + spin_unlock(&stat_lock); +#endif + if (handle != NULL) + *handle = de; + return 0; +} /* End Function devfs_do_symlink */ + +/** + * devfs_mk_symlink Create a symbolic link in the devfs namespace. + * @from: The name of the entry. + * @to: Name of the destination + * + * Returns 0 on success, else a negative error code is returned. + */ + +int devfs_mk_symlink(const char *from, const char *to) +{ + devfs_handle_t de; + int err; + + err = devfs_do_symlink(NULL, from, to, &de); + if (!err) { + de->vfs = TRUE; + devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); + } + + return err; +} + +/** + * devfs_mk_dir - Create a directory in the devfs namespace. + * new name is relative to the root of the devfs. + * @fmt: The name of the entry. + * + * Use of this function is optional. The devfs_register() function + * will automatically create intermediate directories as needed. This function + * is provided for efficiency reasons, as it provides a handle to a directory. + * On failure %NULL is returned. + */ + +int devfs_mk_dir(const char *fmt, ...) +{ + struct devfs_entry *dir = NULL, *de = NULL, *old; + char buf[64]; + va_list args; + int error, n; + + va_start(args, fmt); + n = vsnprintf(buf, 64, fmt, args); + if (n >= 64 || !buf[0]) { + printk(KERN_WARNING "%s: invalid argument.", __FUNCTION__); + return -EINVAL; + } + + de = _devfs_prepare_leaf(&dir, buf, MODE_DIR); + if (!de) { + PRINTK("(%s): could not prepare leaf\n", buf); + return -EINVAL; + } + + error = _devfs_append_entry(dir, de, &old); + if (error == -EEXIST && S_ISDIR(old->mode)) { + /* + * devfs_mk_dir() of an already-existing directory will + * return success. + */ + error = 0; + goto out_put; + } else if (error) { + PRINTK("(%s): could not append to dir: %p \"%s\"\n", + buf, dir, dir->name); + devfs_put(old); + goto out_put; + } + + devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); + + out_put: + devfs_put(dir); + return error; +} + +void devfs_remove(const char *fmt, ...) +{ + char buf[64]; + va_list args; + int n; + + va_start(args, fmt); + n = vsnprintf(buf, sizeof(buf), fmt, args); + if (n < sizeof(buf) && buf[0]) { + devfs_handle_t de = _devfs_find_entry(NULL, buf, 0); + + if (!de) { + printk(KERN_ERR "%s: %s not found, cannot remove\n", + __FUNCTION__, buf); + dump_stack(); + return; + } + + write_lock(&de->parent->u.dir.lock); + _devfs_unregister(de->parent, de); + devfs_put(de); + devfs_put(de); + } +} + +/** + * devfs_generate_path - Generate a pathname for an entry, relative to the devfs root. + * @de: The devfs entry. + * @path: The buffer to write the pathname to. The pathname and '\0' + * terminator will be written at the end of the buffer. + * @buflen: The length of the buffer. + * + * Returns the offset in the buffer where the pathname starts on success, + * else a negative error code. + */ + +static int devfs_generate_path(devfs_handle_t de, char *path, int buflen) +{ + int pos; +#define NAMEOF(de) ( (de)->mode ? (de)->name : (de)->u.name ) + + if (de == NULL) + return -EINVAL; + VERIFY_ENTRY(de); + if (de->namelen >= buflen) + return -ENAMETOOLONG; /* Must be first */ + path[buflen - 1] = '\0'; + if (de->parent == NULL) + return buflen - 1; /* Don't prepend root */ + pos = buflen - de->namelen - 1; + memcpy(path + pos, NAMEOF(de), de->namelen); + for (de = de->parent; de->parent != NULL; de = de->parent) { + if (pos - de->namelen - 1 < 0) + return -ENAMETOOLONG; + path[--pos] = '/'; + pos -= de->namelen; + memcpy(path + pos, NAMEOF(de), de->namelen); + } + return pos; +} /* End Function devfs_generate_path */ + +/** + * devfs_setup - Process kernel boot options. + * @str: The boot options after the "devfs=". + */ + +static int __init devfs_setup(char *str) +{ + static struct { + char *name; + unsigned int mask; + unsigned int *opt; + } devfs_options_tab[] __initdata = { +#ifdef CONFIG_DEVFS_DEBUG + { + "dall", DEBUG_ALL, &devfs_debug_init}, { + "dmod", DEBUG_MODULE_LOAD, &devfs_debug_init}, { + "dreg", DEBUG_REGISTER, &devfs_debug_init}, { + "dunreg", DEBUG_UNREGISTER, &devfs_debug_init}, { + "dfree", DEBUG_FREE, &devfs_debug_init}, { + "diget", DEBUG_I_GET, &devfs_debug_init}, { + "dchange", DEBUG_SET_FLAGS, &devfs_debug_init}, { + "dsread", DEBUG_S_READ, &devfs_debug_init}, { + "dichange", DEBUG_I_CHANGE, &devfs_debug_init}, { + "dimknod", DEBUG_I_MKNOD, &devfs_debug_init}, { + "dilookup", DEBUG_I_LOOKUP, &devfs_debug_init}, { + "diunlink", DEBUG_I_UNLINK, &devfs_debug_init}, +#endif /* CONFIG_DEVFS_DEBUG */ + { + "mount", OPTION_MOUNT, &boot_options}, { + NULL, 0, NULL} + }; + + while ((*str != '\0') && !isspace(*str)) { + int i, found = 0, invert = 0; + + if (strncmp(str, "no", 2) == 0) { + invert = 1; + str += 2; + } + for (i = 0; devfs_options_tab[i].name != NULL; i++) { + int len = strlen(devfs_options_tab[i].name); + + if (strncmp(str, devfs_options_tab[i].name, len) == 0) { + if (invert) + *devfs_options_tab[i].opt &= + ~devfs_options_tab[i].mask; + else + *devfs_options_tab[i].opt |= + devfs_options_tab[i].mask; + str += len; + found = 1; + break; + } + } + if (!found) + return 0; /* No match */ + if (*str != ',') + return 0; /* No more options */ + ++str; + } + return 1; +} /* End Function devfs_setup */ + +__setup("devfs=", devfs_setup); + +EXPORT_SYMBOL(devfs_mk_dir); +EXPORT_SYMBOL(devfs_remove); + +/** + * try_modload - Notify devfsd of an inode lookup by a non-devfsd process. + * @parent: The parent devfs entry. + * @fs_info: The filesystem info. + * @name: The device name. + * @namelen: The number of characters in @name. + * @buf: A working area that will be used. This must not go out of scope + * until devfsd is idle again. + * + * Returns 0 on success (event was queued), else a negative error code. + */ + +static int try_modload(struct devfs_entry *parent, struct fs_info *fs_info, + const char *name, unsigned namelen, + struct devfs_entry *buf) +{ + if (!(fs_info->devfsd_event_mask & (1 << DEVFSD_NOTIFY_LOOKUP))) + return -ENOENT; + if (is_devfsd_or_child(fs_info)) + return -ENOENT; + memset(buf, 0, sizeof *buf); + atomic_set(&buf->refcount, 1); + buf->parent = parent; + buf->namelen = namelen; + buf->u.name = name; + WRITE_ENTRY_MAGIC(buf, MAGIC_VALUE); + if (!devfsd_notify_de(buf, DEVFSD_NOTIFY_LOOKUP, 0, + current->euid, current->egid, fs_info)) + return -ENOENT; + /* Possible success: event has been queued */ + return 0; +} /* End Function try_modload */ + +/* Superblock operations follow */ + +static struct inode_operations devfs_iops; +static struct inode_operations devfs_dir_iops; +static const struct file_operations devfs_fops; +static const struct file_operations devfs_dir_fops; +static struct inode_operations devfs_symlink_iops; + +static int devfs_notify_change(struct dentry *dentry, struct iattr *iattr) +{ + int retval; + struct devfs_entry *de; + struct inode *inode = dentry->d_inode; + struct fs_info *fs_info = inode->i_sb->s_fs_info; + + de = get_devfs_entry_from_vfs_inode(inode); + if (de == NULL) + return -ENODEV; + retval = inode_change_ok(inode, iattr); + if (retval != 0) + return retval; + retval = inode_setattr(inode, iattr); + if (retval != 0) + return retval; + DPRINTK(DEBUG_I_CHANGE, "(%d): VFS inode: %p devfs_entry: %p\n", + (int)inode->i_ino, inode, de); + DPRINTK(DEBUG_I_CHANGE, "(): mode: 0%o uid: %d gid: %d\n", + (int)inode->i_mode, (int)inode->i_uid, (int)inode->i_gid); + /* Inode is not on hash chains, thus must save permissions here rather + than in a write_inode() method */ + de->mode = inode->i_mode; + de->inode.uid = inode->i_uid; + de->inode.gid = inode->i_gid; + de->inode.atime = inode->i_atime; + de->inode.mtime = inode->i_mtime; + de->inode.ctime = inode->i_ctime; + if ((iattr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) && + !is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_CHANGE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + return 0; +} /* End Function devfs_notify_change */ + +static struct super_operations devfs_sops = { + .drop_inode = generic_delete_inode, + .statfs = simple_statfs, +}; + +/** + * _devfs_get_vfs_inode - Get a VFS inode. + * @sb: The super block. + * @de: The devfs inode. + * @dentry: The dentry to register with the devfs inode. + * + * Returns the inode on success, else %NULL. An implicit devfs_get() is + * performed if the inode is created. + */ + +static struct inode *_devfs_get_vfs_inode(struct super_block *sb, + struct devfs_entry *de, + struct dentry *dentry) +{ + struct inode *inode; + + if (de->prev == de) + return NULL; /* Quick check to see if unhooked */ + if ((inode = new_inode(sb)) == NULL) { + PRINTK("(%s): new_inode() failed, de: %p\n", de->name, de); + return NULL; + } + if (de->parent) { + read_lock(&de->parent->u.dir.lock); + if (de->prev != de) + de->inode.dentry = dentry; /* Not unhooked */ + read_unlock(&de->parent->u.dir.lock); + } else + de->inode.dentry = dentry; /* Root: no locking needed */ + if (de->inode.dentry != dentry) { /* Must have been unhooked */ + iput(inode); + return NULL; + } + /* FIXME where is devfs_put? */ + inode->u.generic_ip = devfs_get(de); + inode->i_ino = de->inode.ino; + DPRINTK(DEBUG_I_GET, "(%d): VFS inode: %p devfs_entry: %p\n", + (int)inode->i_ino, inode, de); + inode->i_blocks = 0; + inode->i_blksize = FAKE_BLOCK_SIZE; + inode->i_op = &devfs_iops; + inode->i_mode = de->mode; + if (S_ISDIR(de->mode)) { + inode->i_op = &devfs_dir_iops; + inode->i_fop = &devfs_dir_fops; + } else if (S_ISLNK(de->mode)) { + inode->i_op = &devfs_symlink_iops; + inode->i_size = de->u.symlink.length; + } else if (S_ISCHR(de->mode) || S_ISBLK(de->mode)) { + init_special_inode(inode, de->mode, de->u.dev); + } else if (S_ISFIFO(de->mode) || S_ISSOCK(de->mode)) { + init_special_inode(inode, de->mode, 0); + } else { + PRINTK("(%s): unknown mode %o de: %p\n", + de->name, de->mode, de); + iput(inode); + devfs_put(de); + return NULL; + } + + inode->i_uid = de->inode.uid; + inode->i_gid = de->inode.gid; + inode->i_atime = de->inode.atime; + inode->i_mtime = de->inode.mtime; + inode->i_ctime = de->inode.ctime; + DPRINTK(DEBUG_I_GET, "(): mode: 0%o uid: %d gid: %d\n", + (int)inode->i_mode, (int)inode->i_uid, (int)inode->i_gid); + return inode; +} /* End Function _devfs_get_vfs_inode */ + +/* File operations for device entries follow */ + +static int devfs_readdir(struct file *file, void *dirent, filldir_t filldir) +{ + int err, count; + int stored = 0; + struct fs_info *fs_info; + struct devfs_entry *parent, *de, *next = NULL; + struct inode *inode = file->f_dentry->d_inode; + + fs_info = inode->i_sb->s_fs_info; + parent = get_devfs_entry_from_vfs_inode(file->f_dentry->d_inode); + if ((long)file->f_pos < 0) + return -EINVAL; + DPRINTK(DEBUG_F_READDIR, "(%s): fs_info: %p pos: %ld\n", + parent->name, fs_info, (long)file->f_pos); + switch ((long)file->f_pos) { + case 0: + err = (*filldir) (dirent, "..", 2, file->f_pos, + parent_ino(file->f_dentry), DT_DIR); + if (err == -EINVAL) + break; + if (err < 0) + return err; + file->f_pos++; + ++stored; + /* Fall through */ + case 1: + err = + (*filldir) (dirent, ".", 1, file->f_pos, inode->i_ino, + DT_DIR); + if (err == -EINVAL) + break; + if (err < 0) + return err; + file->f_pos++; + ++stored; + /* Fall through */ + default: + /* Skip entries */ + count = file->f_pos - 2; + read_lock(&parent->u.dir.lock); + for (de = parent->u.dir.first; de && (count > 0); de = de->next) + --count; + devfs_get(de); + read_unlock(&parent->u.dir.lock); + /* Now add all remaining entries */ + while (de) { + err = (*filldir) (dirent, de->name, de->namelen, + file->f_pos, de->inode.ino, + de->mode >> 12); + if (err < 0) + devfs_put(de); + else { + file->f_pos++; + ++stored; + } + if (err == -EINVAL) + break; + if (err < 0) + return err; + read_lock(&parent->u.dir.lock); + next = devfs_get(de->next); + read_unlock(&parent->u.dir.lock); + devfs_put(de); + de = next; + } + break; + } + return stored; +} /* End Function devfs_readdir */ + +/* Open devfs specific special files */ +static int devfs_open(struct inode *inode, struct file *file) +{ + int err; + int minor = MINOR(inode->i_rdev); + struct file_operations *old_fops, *new_fops; + + switch (minor) { + case 0: /* /dev/.devfsd */ + new_fops = fops_get(&devfsd_fops); + break; +#ifdef CONFIG_DEVFS_DEBUG + case 1: /* /dev/.stat */ + new_fops = fops_get(&stat_fops); + break; +#endif + default: + return -ENODEV; + } + + if (new_fops == NULL) + return -ENODEV; + old_fops = file->f_op; + file->f_op = new_fops; + err = new_fops->open ? new_fops->open(inode, file) : 0; + if (err) { + file->f_op = old_fops; + fops_put(new_fops); + } else + fops_put(old_fops); + return err; +} /* End Function devfs_open */ + +static const struct file_operations devfs_fops = { + .open = devfs_open, +}; + +static const struct file_operations devfs_dir_fops = { + .read = generic_read_dir, + .readdir = devfs_readdir, +}; + +/* Dentry operations for device entries follow */ + +/** + * devfs_d_release - Callback for when a dentry is freed. + * @dentry: The dentry. + */ + +static void devfs_d_release(struct dentry *dentry) +{ + DPRINTK(DEBUG_D_RELEASE, "(%p): inode: %p\n", dentry, dentry->d_inode); +} /* End Function devfs_d_release */ + +/** + * devfs_d_iput - Callback for when a dentry loses its inode. + * @dentry: The dentry. + * @inode: The inode. + */ + +static void devfs_d_iput(struct dentry *dentry, struct inode *inode) +{ + struct devfs_entry *de; + + de = get_devfs_entry_from_vfs_inode(inode); + DPRINTK(DEBUG_D_IPUT, + "(%s): dentry: %p inode: %p de: %p de->dentry: %p\n", de->name, + dentry, inode, de, de->inode.dentry); + if (de->inode.dentry && (de->inode.dentry != dentry)) + OOPS("(%s): de: %p dentry: %p de->dentry: %p\n", + de->name, de, dentry, de->inode.dentry); + de->inode.dentry = NULL; + iput(inode); + devfs_put(de); +} /* End Function devfs_d_iput */ + +static int devfs_d_delete(struct dentry *dentry); + +static struct dentry_operations devfs_dops = { + .d_delete = devfs_d_delete, + .d_release = devfs_d_release, + .d_iput = devfs_d_iput, +}; + +static int devfs_d_revalidate_wait(struct dentry *dentry, struct nameidata *); + +static struct dentry_operations devfs_wait_dops = { + .d_delete = devfs_d_delete, + .d_release = devfs_d_release, + .d_iput = devfs_d_iput, + .d_revalidate = devfs_d_revalidate_wait, +}; + +/** + * devfs_d_delete - Callback for when all files for a dentry are closed. + * @dentry: The dentry. + */ + +static int devfs_d_delete(struct dentry *dentry) +{ + struct inode *inode = dentry->d_inode; + + if (dentry->d_op == &devfs_wait_dops) + dentry->d_op = &devfs_dops; + /* Unhash dentry if negative (has no inode) */ + if (inode == NULL) { + DPRINTK(DEBUG_D_DELETE, "(%p): dropping negative dentry\n", + dentry); + return 1; + } + return 0; +} /* End Function devfs_d_delete */ + +struct devfs_lookup_struct { + devfs_handle_t de; + wait_queue_head_t wait_queue; +}; + +/* XXX: this doesn't handle the case where we got a negative dentry + but a devfs entry has been registered in the meanwhile */ +static int devfs_d_revalidate_wait(struct dentry *dentry, struct nameidata *nd) +{ + struct inode *dir = dentry->d_parent->d_inode; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + devfs_handle_t parent = get_devfs_entry_from_vfs_inode(dir); + struct devfs_lookup_struct *lookup_info = dentry->d_fsdata; + DECLARE_WAITQUEUE(wait, current); + int need_lock; + + /* + * FIXME HACK + * + * make sure that + * d_instantiate always runs under lock + * we release i_mutex lock before going to sleep + * + * unfortunately sometimes d_revalidate is called with + * and sometimes without i_mutex lock held. The following checks + * attempt to deduce when we need to add (and drop resp.) lock + * here. This relies on current (2.6.2) calling coventions: + * + * lookup_hash is always run under i_mutex and is passing NULL + * as nd + * + * open(...,O_CREATE,...) calls _lookup_hash under i_mutex + * and sets flags to LOOKUP_OPEN|LOOKUP_CREATE + * + * all other invocations of ->d_revalidate seem to happen + * outside of i_mutex + */ + need_lock = nd && + (!(nd->flags & LOOKUP_CREATE) || (nd->flags & LOOKUP_PARENT)); + + if (need_lock) + mutex_lock(&dir->i_mutex); + + if (is_devfsd_or_child(fs_info)) { + devfs_handle_t de = lookup_info->de; + struct inode *inode; + + DPRINTK(DEBUG_I_LOOKUP, + "(%s): dentry: %p inode: %p de: %p by: \"%s\"\n", + dentry->d_name.name, dentry, dentry->d_inode, de, + current->comm); + if (dentry->d_inode) + goto out; + if (de == NULL) { + read_lock(&parent->u.dir.lock); + de = _devfs_search_dir(parent, dentry->d_name.name, + dentry->d_name.len); + read_unlock(&parent->u.dir.lock); + if (de == NULL) + goto out; + lookup_info->de = de; + } + /* Create an inode, now that the driver information is available */ + inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry); + if (!inode) + goto out; + DPRINTK(DEBUG_I_LOOKUP, + "(%s): new VFS inode(%u): %p de: %p by: \"%s\"\n", + de->name, de->inode.ino, inode, de, current->comm); + d_instantiate(dentry, inode); + goto out; + } + if (lookup_info == NULL) + goto out; /* Early termination */ + read_lock(&parent->u.dir.lock); + if (dentry->d_fsdata) { + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&lookup_info->wait_queue, &wait); + read_unlock(&parent->u.dir.lock); + /* at this point it is always (hopefully) locked */ + mutex_unlock(&dir->i_mutex); + schedule(); + mutex_lock(&dir->i_mutex); + /* + * This does not need nor should remove wait from wait_queue. + * Wait queue head is never reused - nothing is ever added to it + * after all waiters have been waked up and head itself disappears + * very soon after it. Moreover it is local variable on stack that + * is likely to have already disappeared so any reference to it + * at this point is buggy. + */ + + } else + read_unlock(&parent->u.dir.lock); + + out: + if (need_lock) + mutex_unlock(&dir->i_mutex); + return 1; +} /* End Function devfs_d_revalidate_wait */ + +/* Inode operations for device entries follow */ + +static struct dentry *devfs_lookup(struct inode *dir, struct dentry *dentry, + struct nameidata *nd) +{ + struct devfs_entry tmp; /* Must stay in scope until devfsd idle again */ + struct devfs_lookup_struct lookup_info; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + struct devfs_entry *parent, *de; + struct inode *inode; + struct dentry *retval = NULL; + + /* Set up the dentry operations before anything else, to ensure cleaning + up on any error */ + dentry->d_op = &devfs_dops; + /* First try to get the devfs entry for this directory */ + parent = get_devfs_entry_from_vfs_inode(dir); + DPRINTK(DEBUG_I_LOOKUP, "(%s): dentry: %p parent: %p by: \"%s\"\n", + dentry->d_name.name, dentry, parent, current->comm); + if (parent == NULL) + return ERR_PTR(-ENOENT); + read_lock(&parent->u.dir.lock); + de = _devfs_search_dir(parent, dentry->d_name.name, dentry->d_name.len); + read_unlock(&parent->u.dir.lock); + lookup_info.de = de; + init_waitqueue_head(&lookup_info.wait_queue); + dentry->d_fsdata = &lookup_info; + if (de == NULL) { /* Try with devfsd. For any kind of failure, leave a negative dentry + so someone else can deal with it (in the case where the sysadmin + does a mknod()). It's important to do this before hashing the + dentry, so that the devfsd queue is filled before revalidates + can start */ + if (try_modload(parent, fs_info, dentry->d_name.name, dentry->d_name.len, &tmp) < 0) { /* Lookup event was not queued to devfsd */ + d_add(dentry, NULL); + return NULL; + } + } + dentry->d_op = &devfs_wait_dops; + d_add(dentry, NULL); /* Open the floodgates */ + /* Unlock directory semaphore, which will release any waiters. They + will get the hashed dentry, and may be forced to wait for + revalidation */ + mutex_unlock(&dir->i_mutex); + wait_for_devfsd_finished(fs_info); /* If I'm not devfsd, must wait */ + mutex_lock(&dir->i_mutex); /* Grab it again because them's the rules */ + de = lookup_info.de; + /* If someone else has been so kind as to make the inode, we go home + early */ + if (dentry->d_inode) + goto out; + if (de == NULL) { + read_lock(&parent->u.dir.lock); + de = _devfs_search_dir(parent, dentry->d_name.name, + dentry->d_name.len); + read_unlock(&parent->u.dir.lock); + if (de == NULL) + goto out; + /* OK, there's an entry now, but no VFS inode yet */ + } + /* Create an inode, now that the driver information is available */ + inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry); + if (!inode) { + retval = ERR_PTR(-ENOMEM); + goto out; + } + DPRINTK(DEBUG_I_LOOKUP, + "(%s): new VFS inode(%u): %p de: %p by: \"%s\"\n", de->name, + de->inode.ino, inode, de, current->comm); + d_instantiate(dentry, inode); + out: + write_lock(&parent->u.dir.lock); + dentry->d_op = &devfs_dops; + dentry->d_fsdata = NULL; + wake_up(&lookup_info.wait_queue); + write_unlock(&parent->u.dir.lock); + devfs_put(de); + return retval; +} /* End Function devfs_lookup */ + +static int devfs_unlink(struct inode *dir, struct dentry *dentry) +{ + int unhooked; + struct devfs_entry *de; + struct inode *inode = dentry->d_inode; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + + de = get_devfs_entry_from_vfs_inode(inode); + DPRINTK(DEBUG_I_UNLINK, "(%s): de: %p\n", dentry->d_name.name, de); + if (de == NULL) + return -ENOENT; + if (!de->vfs) + return -EPERM; + write_lock(&de->parent->u.dir.lock); + unhooked = _devfs_unhook(de); + write_unlock(&de->parent->u.dir.lock); + if (!unhooked) + return -ENOENT; + if (!is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_DELETE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + free_dentry(de); + devfs_put(de); + return 0; +} /* End Function devfs_unlink */ + +static int devfs_symlink(struct inode *dir, struct dentry *dentry, + const char *symname) +{ + int err; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + struct devfs_entry *parent, *de; + struct inode *inode; + + /* First try to get the devfs entry for this directory */ + parent = get_devfs_entry_from_vfs_inode(dir); + if (parent == NULL) + return -ENOENT; + err = devfs_do_symlink(parent, dentry->d_name.name, symname, &de); + DPRINTK(DEBUG_DISABLED, "(%s): errcode from : %d\n", + dentry->d_name.name, err); + if (err < 0) + return err; + de->vfs = TRUE; + de->inode.uid = current->euid; + de->inode.gid = current->egid; + de->inode.atime = CURRENT_TIME; + de->inode.mtime = CURRENT_TIME; + de->inode.ctime = CURRENT_TIME; + if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) + return -ENOMEM; + DPRINTK(DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n", + dentry->d_name.name, de->inode.ino, inode, dentry); + d_instantiate(dentry, inode); + if (!is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + return 0; +} /* End Function devfs_symlink */ + +static int devfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) +{ + int err; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + struct devfs_entry *parent, *de; + struct inode *inode; + + mode = (mode & ~S_IFMT) | S_IFDIR; /* VFS doesn't pass S_IFMT part */ + parent = get_devfs_entry_from_vfs_inode(dir); + if (parent == NULL) + return -ENOENT; + de = _devfs_alloc_entry(dentry->d_name.name, dentry->d_name.len, mode); + if (!de) + return -ENOMEM; + de->vfs = TRUE; + if ((err = _devfs_append_entry(parent, de, NULL)) != 0) + return err; + de->inode.uid = current->euid; + de->inode.gid = current->egid; + de->inode.atime = CURRENT_TIME; + de->inode.mtime = CURRENT_TIME; + de->inode.ctime = CURRENT_TIME; + if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) + return -ENOMEM; + DPRINTK(DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n", + dentry->d_name.name, de->inode.ino, inode, dentry); + d_instantiate(dentry, inode); + if (!is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + return 0; +} /* End Function devfs_mkdir */ + +static int devfs_rmdir(struct inode *dir, struct dentry *dentry) +{ + int err = 0; + struct devfs_entry *de; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + struct inode *inode = dentry->d_inode; + + if (dir->i_sb->s_fs_info != inode->i_sb->s_fs_info) + return -EINVAL; + de = get_devfs_entry_from_vfs_inode(inode); + if (de == NULL) + return -ENOENT; + if (!S_ISDIR(de->mode)) + return -ENOTDIR; + if (!de->vfs) + return -EPERM; + /* First ensure the directory is empty and will stay that way */ + write_lock(&de->u.dir.lock); + if (de->u.dir.first) + err = -ENOTEMPTY; + else + de->u.dir.no_more_additions = TRUE; + write_unlock(&de->u.dir.lock); + if (err) + return err; + /* Now unhook the directory from its parent */ + write_lock(&de->parent->u.dir.lock); + if (!_devfs_unhook(de)) + err = -ENOENT; + write_unlock(&de->parent->u.dir.lock); + if (err) + return err; + if (!is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_DELETE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + free_dentry(de); + devfs_put(de); + return 0; +} /* End Function devfs_rmdir */ + +static int devfs_mknod(struct inode *dir, struct dentry *dentry, int mode, + dev_t rdev) +{ + int err; + struct fs_info *fs_info = dir->i_sb->s_fs_info; + struct devfs_entry *parent, *de; + struct inode *inode; + + DPRINTK(DEBUG_I_MKNOD, "(%s): mode: 0%o dev: %u:%u\n", + dentry->d_name.name, mode, MAJOR(rdev), MINOR(rdev)); + parent = get_devfs_entry_from_vfs_inode(dir); + if (parent == NULL) + return -ENOENT; + de = _devfs_alloc_entry(dentry->d_name.name, dentry->d_name.len, mode); + if (!de) + return -ENOMEM; + de->vfs = TRUE; + if (S_ISCHR(mode) || S_ISBLK(mode)) + de->u.dev = rdev; + if ((err = _devfs_append_entry(parent, de, NULL)) != 0) + return err; + de->inode.uid = current->euid; + de->inode.gid = current->egid; + de->inode.atime = CURRENT_TIME; + de->inode.mtime = CURRENT_TIME; + de->inode.ctime = CURRENT_TIME; + if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) + return -ENOMEM; + DPRINTK(DEBUG_I_MKNOD, ": new VFS inode(%u): %p dentry: %p\n", + de->inode.ino, inode, dentry); + d_instantiate(dentry, inode); + if (!is_devfsd_or_child(fs_info)) + devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, + inode->i_uid, inode->i_gid, fs_info); + return 0; +} /* End Function devfs_mknod */ + +static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd) +{ + struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); + nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); + return NULL; +} /* End Function devfs_follow_link */ + +static struct inode_operations devfs_iops = { + .setattr = devfs_notify_change, +}; + +static struct inode_operations devfs_dir_iops = { + .lookup = devfs_lookup, + .unlink = devfs_unlink, + .symlink = devfs_symlink, + .mkdir = devfs_mkdir, + .rmdir = devfs_rmdir, + .mknod = devfs_mknod, + .setattr = devfs_notify_change, +}; + +static struct inode_operations devfs_symlink_iops = { + .readlink = generic_readlink, + .follow_link = devfs_follow_link, + .setattr = devfs_notify_change, +}; + +static int devfs_fill_super(struct super_block *sb, void *data, int silent) +{ + struct inode *root_inode = NULL; + + if (_devfs_get_root_entry() == NULL) + goto out_no_root; + atomic_set(&fs_info.devfsd_overrun_count, 0); + init_waitqueue_head(&fs_info.devfsd_wait_queue); + init_waitqueue_head(&fs_info.revalidate_wait_queue); + fs_info.sb = sb; + sb->s_fs_info = &fs_info; + sb->s_blocksize = 1024; + sb->s_blocksize_bits = 10; + sb->s_magic = DEVFS_SUPER_MAGIC; + sb->s_op = &devfs_sops; + sb->s_time_gran = 1; + if ((root_inode = _devfs_get_vfs_inode(sb, root_entry, NULL)) == NULL) + goto out_no_root; + sb->s_root = d_alloc_root(root_inode); + if (!sb->s_root) + goto out_no_root; + DPRINTK(DEBUG_S_READ, "(): made devfs ptr: %p\n", sb->s_fs_info); + return 0; + + out_no_root: + PRINTK("(): get root inode failed\n"); + if (root_inode) + iput(root_inode); + return -EINVAL; +} /* End Function devfs_fill_super */ + +static struct super_block *devfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) +{ + return get_sb_single(fs_type, flags, data, devfs_fill_super); +} + +static struct file_system_type devfs_fs_type = { + .name = DEVFS_NAME, + .get_sb = devfs_get_sb, + .kill_sb = kill_anon_super, +}; + +/* File operations for devfsd follow */ + +static ssize_t devfsd_read(struct file *file, char __user *buf, size_t len, + loff_t * ppos) +{ + int done = FALSE; + int ival; + loff_t pos, devname_offset, tlen, rpos; + devfs_handle_t de; + struct devfsd_buf_entry *entry; + struct fs_info *fs_info = file->f_dentry->d_inode->i_sb->s_fs_info; + struct devfsd_notify_struct *info = fs_info->devfsd_info; + DECLARE_WAITQUEUE(wait, current); + + /* Verify the task has grabbed the queue */ + if (fs_info->devfsd_task != current) + return -EPERM; + info->major = 0; + info->minor = 0; + /* Block for a new entry */ + set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&fs_info->devfsd_wait_queue, &wait); + while (devfsd_queue_empty(fs_info)) { + fs_info->devfsd_sleeping = TRUE; + wake_up(&fs_info->revalidate_wait_queue); + schedule(); + fs_info->devfsd_sleeping = FALSE; + if (signal_pending(current)) { + remove_wait_queue(&fs_info->devfsd_wait_queue, &wait); + __set_current_state(TASK_RUNNING); + return -EINTR; + } + set_current_state(TASK_INTERRUPTIBLE); + } + remove_wait_queue(&fs_info->devfsd_wait_queue, &wait); + __set_current_state(TASK_RUNNING); + /* Now play with the data */ + ival = atomic_read(&fs_info->devfsd_overrun_count); + info->overrun_count = ival; + entry = fs_info->devfsd_first_event; + info->type = entry->type; + info->mode = entry->mode; + info->uid = entry->uid; + info->gid = entry->gid; + de = entry->de; + if (S_ISCHR(de->mode) || S_ISBLK(de->mode)) { + info->major = MAJOR(de->u.dev); + info->minor = MINOR(de->u.dev); + } + pos = devfs_generate_path(de, info->devname, DEVFS_PATHLEN); + if (pos < 0) + return pos; + info->namelen = DEVFS_PATHLEN - pos - 1; + if (info->mode == 0) + info->mode = de->mode; + devname_offset = info->devname - (char *)info; + rpos = *ppos; + if (rpos < devname_offset) { + /* Copy parts of the header */ + tlen = devname_offset - rpos; + if (tlen > len) + tlen = len; + if (copy_to_user(buf, (char *)info + rpos, tlen)) { + return -EFAULT; + } + rpos += tlen; + buf += tlen; + len -= tlen; + } + if ((rpos >= devname_offset) && (len > 0)) { + /* Copy the name */ + tlen = info->namelen + 1; + if (tlen > len) + tlen = len; + else + done = TRUE; + if (copy_to_user + (buf, info->devname + pos + rpos - devname_offset, tlen)) { + return -EFAULT; + } + rpos += tlen; + } + tlen = rpos - *ppos; + if (done) { + devfs_handle_t parent; + + spin_lock(&fs_info->devfsd_buffer_lock); + fs_info->devfsd_first_event = entry->next; + if (entry->next == NULL) + fs_info->devfsd_last_event = NULL; + spin_unlock(&fs_info->devfsd_buffer_lock); + for (; de != NULL; de = parent) { + parent = de->parent; + devfs_put(de); + } + kmem_cache_free(devfsd_buf_cache, entry); + if (ival > 0) + atomic_sub(ival, &fs_info->devfsd_overrun_count); + *ppos = 0; + } else + *ppos = rpos; + return tlen; +} /* End Function devfsd_read */ + +static int devfsd_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + int ival; + struct fs_info *fs_info = inode->i_sb->s_fs_info; + + switch (cmd) { + case DEVFSDIOC_GET_PROTO_REV: + ival = DEVFSD_PROTOCOL_REVISION_KERNEL; + if (copy_to_user((void __user *)arg, &ival, sizeof ival)) + return -EFAULT; + break; + case DEVFSDIOC_SET_EVENT_MASK: + /* Ensure only one reader has access to the queue. This scheme will + work even if the global kernel lock were to be removed, because it + doesn't matter who gets in first, as long as only one gets it */ + if (fs_info->devfsd_task == NULL) { + static DEFINE_SPINLOCK(lock); + + if (!spin_trylock(&lock)) + return -EBUSY; + if (fs_info->devfsd_task != NULL) { /* We lost the race... */ + spin_unlock(&lock); + return -EBUSY; + } + fs_info->devfsd_task = current; + spin_unlock(&lock); + fs_info->devfsd_pgrp = + (process_group(current) == + current->pid) ? process_group(current) : 0; + fs_info->devfsd_file = file; + fs_info->devfsd_info = + kmalloc(sizeof *fs_info->devfsd_info, GFP_KERNEL); + if (!fs_info->devfsd_info) { + devfsd_close(inode, file); + return -ENOMEM; + } + } else if (fs_info->devfsd_task != current) + return -EBUSY; + fs_info->devfsd_event_mask = arg; /* Let the masses come forth */ + break; + case DEVFSDIOC_RELEASE_EVENT_QUEUE: + if (fs_info->devfsd_file != file) + return -EPERM; + return devfsd_close(inode, file); + /*break; */ +#ifdef CONFIG_DEVFS_DEBUG + case DEVFSDIOC_SET_DEBUG_MASK: + if (copy_from_user(&ival, (void __user *)arg, sizeof ival)) + return -EFAULT; + devfs_debug = ival; + break; +#endif + default: + return -ENOIOCTLCMD; + } + return 0; +} /* End Function devfsd_ioctl */ + +static int devfsd_close(struct inode *inode, struct file *file) +{ + struct devfsd_buf_entry *entry, *next; + struct fs_info *fs_info = inode->i_sb->s_fs_info; + + if (fs_info->devfsd_file != file) + return 0; + fs_info->devfsd_event_mask = 0; + fs_info->devfsd_file = NULL; + spin_lock(&fs_info->devfsd_buffer_lock); + entry = fs_info->devfsd_first_event; + fs_info->devfsd_first_event = NULL; + fs_info->devfsd_last_event = NULL; + kfree(fs_info->devfsd_info); + fs_info->devfsd_info = NULL; + spin_unlock(&fs_info->devfsd_buffer_lock); + fs_info->devfsd_pgrp = 0; + fs_info->devfsd_task = NULL; + wake_up(&fs_info->revalidate_wait_queue); + for (; entry; entry = next) { + next = entry->next; + kmem_cache_free(devfsd_buf_cache, entry); + } + return 0; +} /* End Function devfsd_close */ + +#ifdef CONFIG_DEVFS_DEBUG +static ssize_t stat_read(struct file *file, char __user *buf, size_t len, + loff_t * ppos) +{ + ssize_t num; + char txt[80]; + + num = sprintf(txt, "Number of entries: %u number of bytes: %u\n", + stat_num_entries, stat_num_bytes) + 1; + if (*ppos >= num) + return 0; + if (*ppos + len > num) + len = num - *ppos; + if (copy_to_user(buf, txt + *ppos, len)) + return -EFAULT; + *ppos += len; + return len; +} /* End Function stat_read */ +#endif + +static int __init init_devfs_fs(void) +{ + int err; + int major; + struct devfs_entry *devfsd; +#ifdef CONFIG_DEVFS_DEBUG + struct devfs_entry *stat; +#endif + + if (_devfs_get_root_entry() == NULL) + return -ENOMEM; + + printk(KERN_INFO "%s: %s Richard Gooch (rgooch@atnf.csiro.au)\n", + DEVFS_NAME, DEVFS_VERSION); + devfsd_buf_cache = kmem_cache_create("devfsd_event", + sizeof(struct devfsd_buf_entry), + 0, 0, NULL, NULL); + if (!devfsd_buf_cache) + OOPS("(): unable to allocate event slab\n"); +#ifdef CONFIG_DEVFS_DEBUG + devfs_debug = devfs_debug_init; + printk(KERN_INFO "%s: devfs_debug: 0x%0x\n", DEVFS_NAME, devfs_debug); +#endif + printk(KERN_INFO "%s: boot_options: 0x%0x\n", DEVFS_NAME, boot_options); + + /* register special device for devfsd communication */ + major = register_chrdev(0, "devfs", &devfs_fops); + if (major < 0) + return major; + + /* And create the entry for ".devfsd" */ + devfsd = _devfs_alloc_entry(".devfsd", 0, S_IFCHR | S_IRUSR | S_IWUSR); + if (devfsd == NULL) + return -ENOMEM; + devfsd->u.dev = MKDEV(major, 0); + _devfs_append_entry(root_entry, devfsd, NULL); + +#ifdef CONFIG_DEVFS_DEBUG + stat = _devfs_alloc_entry(".stat", 0, S_IFCHR | S_IRUGO); + if (stat == NULL) + return -ENOMEM; + stat->u.dev = MKDEV(major, 1); + _devfs_append_entry(root_entry, stat, NULL); +#endif + + err = register_filesystem(&devfs_fs_type); + return err; +} /* End Function init_devfs_fs */ + +void __init mount_devfs_fs(void) +{ + int err; + + if (!(boot_options & OPTION_MOUNT)) + return; + err = do_mount("none", "/dev", "devfs", 0, NULL); + if (err == 0) + printk(KERN_INFO "Mounted devfs on /dev\n"); + else + PRINTK("(): unable to mount devfs, err: %d\n", err); +} /* End Function mount_devfs_fs */ + +module_init(init_devfs_fs) diff --git a/fs/devfs/util.c b/fs/devfs/util.c new file mode 100644 index 000000000..db06d388c --- /dev/null +++ b/fs/devfs/util.c @@ -0,0 +1,97 @@ +/* devfs (Device FileSystem) utilities. + + Copyright (C) 1999-2002 Richard Gooch + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + Richard Gooch may be reached by email at rgooch@atnf.csiro.au + The postal address is: + Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. + + ChangeLog + + 19991031 Richard Gooch + Created. + 19991103 Richard Gooch + Created <_devfs_convert_name> and supported SCSI and IDE CD-ROMs + 20000203 Richard Gooch + Changed operations pointer type to void *. + 20000621 Richard Gooch + Changed interface to . + 20000622 Richard Gooch + Took account of interface change to . + Took account of interface change to . + 20010519 Richard Gooch + Documentation cleanup. + 20010709 Richard Gooch + Created and . + 20010710 Richard Gooch + Created . + 20010730 Richard Gooch + Documentation typo fix. + 20010806 Richard Gooch + Made and private. + 20010813 Richard Gooch + Fixed bug in : limited to 128 numbers + 20010818 Richard Gooch + Updated major masks up to Linus' "no new majors" proclamation. + Block: were 126 now 122 free, char: were 26 now 19 free. + 20020324 Richard Gooch + Fixed bug in : was clearing beyond + bitfield. + 20020326 Richard Gooch + Fixed bitfield data type for . + Made major bitfield type and initialiser 64 bit safe. + 20020413 Richard Gooch + Fixed shift warning on 64 bit machines. + 20020428 Richard Gooch + Copied and used macro for error messages from fs/devfs/base.c + 20021013 Richard Gooch + Documentation fix. + 20030101 Adam J. Richter + Eliminate DEVFS_SPECIAL_{CHR,BLK}. Use mode_t instead. + 20030106 Christoph Hellwig + Rewrite devfs_{,de}alloc_devnum to look like C code. +*/ +#include +#include +#include +#include +#include +#include +#include + +int devfs_register_tape(const char *name) +{ + char tname[32], dest[64]; + static unsigned int tape_counter; + unsigned int n = tape_counter++; + + sprintf(dest, "../%s", name); + sprintf(tname, "tapes/tape%u", n); + devfs_mk_symlink(tname, dest); + + return n; +} + +EXPORT_SYMBOL(devfs_register_tape); + +void devfs_unregister_tape(int num) +{ + if (num >= 0) + devfs_remove("tapes/tape%u", num); +} + +EXPORT_SYMBOL(devfs_unregister_tape); diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 03d1b3cd4..1e5a57766 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -144,6 +144,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent) inode->i_ino = 1; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_blocks = 0; + inode->i_blksize = 1024; inode->i_uid = inode->i_gid = 0; inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; inode->i_op = &simple_dir_inode_operations; @@ -161,10 +162,10 @@ fail: return -ENOMEM; } -static int devpts_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *devpts_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, devpts_fill_super, mnt); + return get_sb_single(fs_type, flags, data, devpts_fill_super); } static struct file_system_type devpts_fs_type = { @@ -203,13 +204,14 @@ int devpts_pty_new(struct tty_struct *tty) return -ENOMEM; inode->i_ino = number+2; + inode->i_blksize = 1024; inode->i_uid = config.setuid ? config.uid : current->fsuid; inode->i_gid = config.setgid ? config.gid : current->fsgid; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; init_special_inode(inode, S_IFCHR|config.mode, device); inode->i_xid = vx_current_xid(); inode->i_op = &devpts_file_inode_operations; - inode->i_private = tty; + inode->u.generic_ip = tty; dentry = get_node(number); if (!IS_ERR(dentry) && !dentry->d_inode) @@ -228,7 +230,7 @@ struct tty_struct *devpts_get_tty(int number) tty = NULL; if (!IS_ERR(dentry)) { if (dentry->d_inode) - tty = dentry->d_inode->i_private; + tty = dentry->d_inode->u.generic_ip; dput(dentry); } diff --git a/fs/direct-io.c b/fs/direct-io.c index 5981e17f4..b05d1b218 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -162,7 +162,7 @@ static int dio_refill_pages(struct dio *dio) NULL); /* vmas */ up_read(¤t->mm->mmap_sem); - if (ret < 0 && dio->blocks_available && (dio->rw & WRITE)) { + if (ret < 0 && dio->blocks_available && (dio->rw == WRITE)) { struct page *page = ZERO_PAGE(dio->curr_user_address); /* * A memory fault, but the filesystem has some outstanding @@ -220,8 +220,7 @@ static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes) if (dio->end_io && dio->result) dio->end_io(dio->iocb, offset, bytes, dio->map_bh.b_private); if (dio->lock_type == DIO_LOCKING) - /* lockdep: non-owner release */ - up_read_non_owner(&dio->inode->i_alloc_sem); + up_read(&dio->inode->i_alloc_sem); } /* @@ -536,7 +535,7 @@ static int get_more_blocks(struct dio *dio) map_bh->b_state = 0; map_bh->b_size = fs_count << dio->inode->i_blkbits; - create = dio->rw & WRITE; + create = dio->rw == WRITE; if (dio->lock_type == DIO_LOCKING) { if (dio->block_in_file < (i_size_read(dio->inode) >> dio->blkbits)) @@ -868,7 +867,7 @@ do_holes: loff_t i_size_aligned; /* AKPM: eargh, -ENOTBLK is a hack */ - if (dio->rw & WRITE) { + if (dio->rw == WRITE) { page_cache_release(page); return -ENOTBLK; } @@ -1046,7 +1045,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, } } /* end iovec loop */ - if (ret == -ENOTBLK && (rw & WRITE)) { + if (ret == -ENOTBLK && rw == WRITE) { /* * The remaining part of the request will be * be handled by buffered I/O when we return @@ -1090,7 +1089,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, if (dio->is_async) { int should_wait = 0; - if (dio->result < dio->size && (rw & WRITE)) { + if (dio->result < dio->size && rw == WRITE) { dio->waiter = current; should_wait = 1; } @@ -1143,7 +1142,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode, ret = transferred; /* We could have also come here on an AIO file extend */ - if (!is_sync_kiocb(iocb) && (rw & WRITE) && + if (!is_sync_kiocb(iocb) && rw == WRITE && ret >= 0 && dio->result == dio->size) /* * For AIO writes where we have completed the @@ -1195,7 +1194,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, int acquire_i_mutex = 0; if (rw & WRITE) - rw = WRITE_SYNC; + current->flags |= PF_SYNCWRITE; if (bdev) bdev_blkbits = blksize_bits(bdev_hardsect_size(bdev)); @@ -1262,8 +1261,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, } if (dio_lock_type == DIO_LOCKING) - /* lockdep: not the owner will release it */ - down_read_non_owner(&inode->i_alloc_sem); + down_read(&inode->i_alloc_sem); } /* @@ -1272,7 +1270,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, * even for AIO, we need to wait for i/o to complete before * returning in this case. */ - dio->is_async = !is_sync_kiocb(iocb) && !((rw & WRITE) && + dio->is_async = !is_sync_kiocb(iocb) && !((rw == WRITE) && (end > i_size_read(inode))); retval = direct_io_worker(rw, iocb, inode, iov, offset, @@ -1286,6 +1284,8 @@ out: mutex_unlock(&inode->i_mutex); else if (acquire_i_mutex) mutex_lock(&inode->i_mutex); + if (rw & WRITE) + current->flags &= ~PF_SYNCWRITE; return retval; } EXPORT_SYMBOL(__blockdev_direct_IO); diff --git a/fs/dquot.c b/fs/dquot.c index ad46d2520..81d87a413 100644 --- a/fs/dquot.c +++ b/fs/dquot.c @@ -250,7 +250,7 @@ static inline struct dquot *find_dquot(unsigned int hashent, struct super_block /* Add a dquot to the tail of the free list */ static inline void put_dquot_last(struct dquot *dquot) { - list_add_tail(&dquot->dq_free, &free_dquots); + list_add(&dquot->dq_free, free_dquots.prev); dqstats.free_dquots++; } @@ -266,7 +266,7 @@ static inline void put_inuse(struct dquot *dquot) { /* We add to the back of inuse list so we don't have to restart * when traversing this list and we block */ - list_add_tail(&dquot->dq_inuse, &inuse_list); + list_add(&dquot->dq_inuse, inuse_list.prev); dqstats.allocated_dquots++; } @@ -828,23 +828,18 @@ static inline int need_print_warning(struct dquot *dquot) static void print_warning(struct dquot *dquot, const char warntype) { char *msg = NULL; - struct tty_struct *tty; int flag = (warntype == BHARDWARN || warntype == BSOFTLONGWARN) ? DQ_BLKS_B : ((warntype == IHARDWARN || warntype == ISOFTLONGWARN) ? DQ_INODES_B : 0); if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags))) return; - mutex_lock(&tty_mutex); - tty = get_current_tty(); - if (!tty) - goto out_lock; - tty_write_message(tty, dquot->dq_sb->s_id); + tty_write_message(current->signal->tty, dquot->dq_sb->s_id); if (warntype == ISOFTWARN || warntype == BSOFTWARN) - tty_write_message(tty, ": warning, "); + tty_write_message(current->signal->tty, ": warning, "); else - tty_write_message(tty, ": write failed, "); - tty_write_message(tty, quotatypes[dquot->dq_type]); + tty_write_message(current->signal->tty, ": write failed, "); + tty_write_message(current->signal->tty, quotatypes[dquot->dq_type]); switch (warntype) { case IHARDWARN: msg = " file limit reached.\r\n"; @@ -865,9 +860,7 @@ static void print_warning(struct dquot *dquot, const char warntype) msg = " block quota exceeded.\r\n"; break; } - tty_write_message(tty, msg); -out_lock: - mutex_unlock(&tty_mutex); + tty_write_message(current->signal->tty, msg); } static inline void flush_warnings(struct dquot **dquots, char *warntype) diff --git a/fs/efs/inode.c b/fs/efs/inode.c index 174696f9b..180607f93 100644 --- a/fs/efs/inode.c +++ b/fs/efs/inode.c @@ -21,7 +21,7 @@ static sector_t _efs_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,efs_get_block); } -static const struct address_space_operations efs_aops = { +static struct address_space_operations efs_aops = { .readpage = efs_readpage, .sync_page = block_sync_page, .bmap = _efs_bmap diff --git a/fs/efs/super.c b/fs/efs/super.c index 8ac2462ae..dff623e3d 100644 --- a/fs/efs/super.c +++ b/fs/efs/super.c @@ -15,13 +15,13 @@ #include #include -static int efs_statfs(struct dentry *dentry, struct kstatfs *buf); +static int efs_statfs(struct super_block *s, struct kstatfs *buf); static int efs_fill_super(struct super_block *s, void *d, int silent); -static int efs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *efs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, efs_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, efs_fill_super); } static struct file_system_type efs_fs_type = { @@ -322,8 +322,8 @@ out_no_fs: return -EINVAL; } -static int efs_statfs(struct dentry *dentry, struct kstatfs *buf) { - struct efs_sb_info *sb = SUPER_INFO(dentry->d_sb); +static int efs_statfs(struct super_block *s, struct kstatfs *buf) { + struct efs_sb_info *sb = SUPER_INFO(s); buf->f_type = EFS_SUPER_MAGIC; /* efs magic number */ buf->f_bsize = EFS_BLOCKSIZE; /* blocksize */ diff --git a/fs/efs/symlink.c b/fs/efs/symlink.c index 1d30d2ff4..3d9a350e3 100644 --- a/fs/efs/symlink.c +++ b/fs/efs/symlink.c @@ -22,7 +22,7 @@ static int efs_symlink_readpage(struct file *file, struct page *page) err = -ENAMETOOLONG; if (size > 2 * EFS_BLOCKSIZE) - goto fail_notlocked; + goto fail; lock_kernel(); /* read first 512 bytes of link target */ @@ -47,13 +47,12 @@ static int efs_symlink_readpage(struct file *file, struct page *page) return 0; fail: unlock_kernel(); -fail_notlocked: SetPageError(page); kunmap(page); unlock_page(page); return err; } -const struct address_space_operations efs_symlink_aops = { +struct address_space_operations efs_symlink_aops = { .readpage = efs_symlink_readpage }; diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 8d544334b..1b4491cdd 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1,6 +1,6 @@ /* * fs/eventpoll.c ( Efficent event polling implementation ) - * Copyright (C) 2001,...,2006 Davide Libenzi + * Copyright (C) 2001,...,2003 Davide Libenzi * * 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 @@ -120,7 +120,7 @@ struct epoll_filefd { */ struct wake_task_node { struct list_head llink; - struct task_struct *task; + task_t *task; wait_queue_head_t *wq; }; @@ -268,9 +268,9 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, int maxevents, long timeout); static int eventpollfs_delete_dentry(struct dentry *dentry); static struct inode *ep_eventpoll_inode(void); -static int eventpollfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt); +static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data); /* * This semaphore is used to serialize ep_free() and eventpoll_release_file(). @@ -337,20 +337,20 @@ static inline int ep_cmp_ffd(struct epoll_filefd *p1, /* Special initialization for the rb-tree node to detect linkage */ static inline void ep_rb_initnode(struct rb_node *n) { - rb_set_parent(n, n); + n->rb_parent = n; } /* Removes a node from the rb-tree and marks it for a fast is-linked check */ static inline void ep_rb_erase(struct rb_node *n, struct rb_root *r) { rb_erase(n, r); - rb_set_parent(n, n); + n->rb_parent = n; } /* Fast check to verify that the item is linked to the main rb-tree */ static inline int ep_rb_linked(struct rb_node *n) { - return rb_parent(n) != n; + return n->rb_parent != n; } /* @@ -413,7 +413,7 @@ static void ep_poll_safewake(struct poll_safewake *psw, wait_queue_head_t *wq) { int wake_nests = 0; unsigned long flags; - struct task_struct *this_task = current; + task_t *this_task = current; struct list_head *lsthead = &psw->wake_task_list, *lnk; struct wake_task_node *tncur; struct wake_task_node tnode; @@ -1004,7 +1004,7 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event, /* Notify waiting tasks that events are available */ if (waitqueue_active(&ep->wq)) - __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE); + wake_up(&ep->wq); if (waitqueue_active(&ep->poll_wait)) pwake++; } @@ -1083,8 +1083,7 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even /* Notify waiting tasks that events are available */ if (waitqueue_active(&ep->wq)) - __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | - TASK_INTERRUPTIBLE); + wake_up(&ep->wq); if (waitqueue_active(&ep->poll_wait)) pwake++; } @@ -1168,7 +1167,7 @@ static int ep_unlink(struct eventpoll *ep, struct epitem *epi) eexit_1: DNPRINTK(3, (KERN_INFO "[%p] eventpoll: ep_unlink(%p, %p) = %d\n", - current, ep, epi->ffd.file, error)); + current, ep, epi->file, error)); return error; } @@ -1236,7 +1235,7 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *k struct eventpoll *ep = epi->ep; DNPRINTK(3, (KERN_INFO "[%p] eventpoll: poll_callback(%p) epi=%p ep=%p\n", - current, epi->ffd.file, epi, ep)); + current, epi->file, epi, ep)); write_lock_irqsave(&ep->lock, flags); @@ -1261,8 +1260,7 @@ is_linked: * wait list. */ if (waitqueue_active(&ep->wq)) - __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | - TASK_INTERRUPTIBLE); + wake_up(&ep->wq); if (waitqueue_active(&ep->poll_wait)) pwake++; @@ -1446,8 +1444,7 @@ static void ep_reinject_items(struct eventpoll *ep, struct list_head *txlist) * wait list. */ if (waitqueue_active(&ep->wq)) - __wake_up_locked(&ep->wq, TASK_UNINTERRUPTIBLE | - TASK_INTERRUPTIBLE); + wake_up(&ep->wq); if (waitqueue_active(&ep->poll_wait)) pwake++; } @@ -1519,7 +1516,7 @@ retry: * ep_poll_callback() when events will become available. */ init_waitqueue_entry(&wait, current); - __add_wait_queue(&ep->wq, &wait); + add_wait_queue(&ep->wq, &wait); for (;;) { /* @@ -1539,7 +1536,7 @@ retry: jtimeout = schedule_timeout(jtimeout); write_lock_irqsave(&ep->lock, flags); } - __remove_wait_queue(&ep->wq, &wait); + remove_wait_queue(&ep->wq, &wait); set_current_state(TASK_RUNNING); } @@ -1590,6 +1587,7 @@ static struct inode *ep_eventpoll_inode(void) inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_blksize = PAGE_SIZE; return inode; eexit_1: @@ -1597,12 +1595,11 @@ eexit_1: } -static int +static struct super_block * eventpollfs_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, struct vfsmount *mnt) + const char *dev_name, void *data) { - return get_sb_pseudo(fs_type, "eventpoll:", NULL, EVENTPOLLFS_MAGIC, - mnt); + return get_sb_pseudo(fs_type, "eventpoll:", NULL, EVENTPOLLFS_MAGIC); } diff --git a/fs/exec.c b/fs/exec.c index 5434c9d52..5d358131a 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -22,6 +22,7 @@ * formats. */ +#include #include #include #include @@ -48,8 +49,6 @@ #include #include #include -#include -#include #include #include @@ -490,6 +489,8 @@ struct file *open_exec(const char *name) if (!(nd.mnt->mnt_flags & MNT_NOEXEC) && S_ISREG(inode->i_mode)) { int err = vfs_permission(&nd, MAY_EXEC); + if (!err && !(inode->i_mode & 0111)) + err = -EACCES; file = ERR_PTR(err); if (!err) { file = nameidata_to_filp(&nd, O_RDONLY); @@ -667,6 +668,8 @@ static int de_thread(struct task_struct *tsk) * and to assume its PID: */ if (!thread_group_leader(current)) { + struct dentry *proc_dentry1, *proc_dentry2; + /* * Wait for the thread group leader to be a zombie. * It should already be zombie at this point, most @@ -688,6 +691,10 @@ static int de_thread(struct task_struct *tsk) */ current->start_time = leader->start_time; + spin_lock(&leader->proc_lock); + spin_lock(¤t->proc_lock); + proc_dentry1 = proc_pid_unhash(current); + proc_dentry2 = proc_pid_unhash(leader); write_lock_irq(&tasklist_lock); BUG_ON(leader->tgid != current->tgid); @@ -708,7 +715,7 @@ static int de_thread(struct task_struct *tsk) attach_pid(current, PIDTYPE_PID, current->pid); attach_pid(current, PIDTYPE_PGID, current->signal->pgrp); attach_pid(current, PIDTYPE_SID, current->signal->session); - list_replace_rcu(&leader->tasks, ¤t->tasks); + list_add_tail_rcu(¤t->tasks, &init_task.tasks); current->group_leader = current; leader->group_leader = current; @@ -716,6 +723,7 @@ static int de_thread(struct task_struct *tsk) /* Reduce leader to a thread */ detach_pid(leader, PIDTYPE_PGID); detach_pid(leader, PIDTYPE_SID); + list_del_init(&leader->tasks); current->exit_signal = SIGCHLD; @@ -723,6 +731,10 @@ static int de_thread(struct task_struct *tsk) leader->exit_state = EXIT_DEAD; write_unlock_irq(&tasklist_lock); + spin_unlock(&leader->proc_lock); + spin_unlock(¤t->proc_lock); + proc_pid_flush(proc_dentry1); + proc_pid_flush(proc_dentry2); } /* @@ -755,7 +767,7 @@ no_thread_group: write_lock_irq(&tasklist_lock); spin_lock(&oldsighand->siglock); - spin_lock_nested(&newsighand->siglock, SINGLE_DEPTH_NESTING); + spin_lock(&newsighand->siglock); rcu_assign_pointer(current->sighand, newsighand); recalc_sigpending(); @@ -856,6 +868,7 @@ int flush_old_exec(struct linux_binprm * bprm) 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; @@ -924,6 +937,12 @@ int prepare_binprm(struct linux_binprm *bprm) int retval; mode = inode->i_mode; + /* + * Check execute perms again - if the caller has CAP_DAC_OVERRIDE, + * generic_permission lets a non-executable through + */ + if (!(mode & 0111)) /* with at least _one_ execute bit set */ + return -EACCES; if (bprm->file->f_op == NULL) return -EACCES; @@ -1069,11 +1088,6 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) /* kernel module loader fixup */ /* so we don't try to load run modprobe in kernel space. */ set_fs(USER_DS); - - retval = audit_bprm(bprm); - if (retval) - return retval; - retval = -ENOENT; for (try=0; try<2; try++) { read_lock(&binfmt_lock); @@ -1363,102 +1377,67 @@ static void format_corename(char *corename, const char *pattern, long signr) *out_ptr = 0; } -static void zap_process(struct task_struct *start) -{ - struct task_struct *t; - - start->signal->flags = SIGNAL_GROUP_EXIT; - start->signal->group_stop_count = 0; - - t = start; - do { - if (t != current && t->mm) { - t->mm->core_waiters++; - sigaddset(&t->pending.signal, SIGKILL); - signal_wake_up(t, 1); - } - } while ((t = next_thread(t)) != start); -} - -static inline int zap_threads(struct task_struct *tsk, struct mm_struct *mm, - int exit_code) +static void zap_threads (struct mm_struct *mm) { struct task_struct *g, *p; - unsigned long flags; - int err = -EAGAIN; - - spin_lock_irq(&tsk->sighand->siglock); - if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) { - tsk->signal->group_exit_code = exit_code; - zap_process(tsk); - err = 0; + struct task_struct *tsk = current; + struct completion *vfork_done = tsk->vfork_done; + int traced = 0; + + /* + * Make sure nobody is waiting for us to release the VM, + * otherwise we can deadlock when we wait on each other + */ + if (vfork_done) { + tsk->vfork_done = NULL; + complete(vfork_done); } - spin_unlock_irq(&tsk->sighand->siglock); - if (err) - return err; - if (atomic_read(&mm->mm_users) == mm->core_waiters + 1) - goto done; + read_lock(&tasklist_lock); + do_each_thread(g,p) + if (mm == p->mm && p != tsk) { + force_sig_specific(SIGKILL, p); + mm->core_waiters++; + if (unlikely(p->ptrace) && + unlikely(p->parent->mm == mm)) + traced = 1; + } + while_each_thread(g,p); - rcu_read_lock(); - for_each_process(g) { - if (g == tsk->group_leader) - continue; + read_unlock(&tasklist_lock); - p = g; - do { - if (p->mm) { - if (p->mm == mm) { - /* - * p->sighand can't disappear, but - * may be changed by de_thread() - */ - lock_task_sighand(p, &flags); - zap_process(p); - unlock_task_sighand(p, &flags); - } - break; + if (unlikely(traced)) { + /* + * We are zapping a thread and the thread it ptraces. + * If the tracee went into a ptrace stop for exit tracing, + * we could deadlock since the tracer is waiting for this + * coredump to finish. Detach them so they can both die. + */ + write_lock_irq(&tasklist_lock); + do_each_thread(g,p) { + if (mm == p->mm && p != tsk && + p->ptrace && p->parent->mm == mm) { + __ptrace_detach(p, 0); } - } while ((p = next_thread(p)) != g); + } while_each_thread(g,p); + write_unlock_irq(&tasklist_lock); } - rcu_read_unlock(); -done: - return mm->core_waiters; } -static int coredump_wait(int exit_code) +static void coredump_wait(struct mm_struct *mm) { - struct task_struct *tsk = current; - struct mm_struct *mm = tsk->mm; - struct completion startup_done; - struct completion *vfork_done; + DECLARE_COMPLETION(startup_done); int core_waiters; - init_completion(&mm->core_done); - init_completion(&startup_done); mm->core_startup_done = &startup_done; - core_waiters = zap_threads(tsk, mm, exit_code); + zap_threads(mm); + core_waiters = mm->core_waiters; up_write(&mm->mmap_sem); - if (unlikely(core_waiters < 0)) - goto fail; - - /* - * Make sure nobody is waiting for us to release the VM, - * otherwise we can deadlock when we wait on each other - */ - vfork_done = tsk->vfork_done; - if (vfork_done) { - tsk->vfork_done = NULL; - complete(vfork_done); - } - if (core_waiters) wait_for_completion(&startup_done); -fail: BUG_ON(mm->core_waiters); - return core_waiters; } int do_coredump(long signr, int exit_code, struct pt_regs * regs) @@ -1494,9 +1473,22 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) } mm->dumpable = 0; - retval = coredump_wait(exit_code); - if (retval < 0) + retval = -EAGAIN; + spin_lock_irq(¤t->sighand->siglock); + if (!(current->signal->flags & SIGNAL_GROUP_EXIT)) { + current->signal->flags = SIGNAL_GROUP_EXIT; + current->signal->group_exit_code = exit_code; + current->signal->group_stop_count = 0; + retval = 0; + } + spin_unlock_irq(¤t->sighand->siglock); + if (retval) { + up_write(&mm->mmap_sem); goto fail; + } + + init_completion(&mm->core_done); + coredump_wait(mm); /* * Clear any false indication of pending signals that might diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 93e77c3d2..4c3900935 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -315,7 +315,7 @@ struct getdents_callback { * the name matching the specified inode number. */ static int filldir_one(void * __buf, const char * name, int len, - loff_t pos, u64 ino, unsigned int d_type) + loff_t pos, ino_t ino, unsigned int d_type) { struct getdents_callback *buf = __buf; int result = 0; diff --git a/fs/ext2/Makefile b/fs/ext2/Makefile index e0b2b43c1..c5d02da73 100644 --- a/fs/ext2/Makefile +++ b/fs/ext2/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_EXT2_FS) += ext2.o -ext2-y := balloc.o dir.o file.o fsync.o ialloc.o inode.o \ +ext2-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ ioctl.o namei.o super.o symlink.o ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index a49381f74..b4f4d1179 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -11,6 +11,7 @@ * David S. Miller (davem@caip.rutgers.edu), 1995 */ +#include #include "ext2.h" #include #include @@ -104,8 +105,8 @@ static int reserve_blocks(struct super_block *sb, int count) { struct ext2_sb_info *sbi = EXT2_SB(sb); struct ext2_super_block *es = sbi->s_es; - unsigned long free_blocks; - unsigned long root_blocks; + unsigned free_blocks; + unsigned root_blocks; free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); root_blocks = le32_to_cpu(es->s_r_blocks_count); @@ -531,25 +532,6 @@ io_error: goto out_release; } -#ifdef EXT2FS_DEBUG - -static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; - -unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) -{ - unsigned int i; - unsigned long sum = 0; - - if (!map) - return (0); - for (i = 0; i < numchars; i++) - sum += nibblemap[map->b_data[i] & 0xf] + - nibblemap[(map->b_data[i] >> 4) & 0xf]; - return (sum); -} - -#endif /* EXT2FS_DEBUG */ - unsigned long ext2_count_free_blocks (struct super_block * sb) { struct ext2_group_desc * desc; @@ -559,6 +541,7 @@ unsigned long ext2_count_free_blocks (struct super_block * sb) unsigned long bitmap_count, x; struct ext2_super_block *es; + lock_super (sb); es = EXT2_SB(sb)->s_es; desc_count = 0; bitmap_count = 0; @@ -582,6 +565,7 @@ unsigned long ext2_count_free_blocks (struct super_block * sb) printk("ext2_count_free_blocks: stored = %lu, computed = %lu, %lu\n", (long)le32_to_cpu(es->s_free_blocks_count), desc_count, bitmap_count); + unlock_super (sb); return bitmap_count; #else for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) { diff --git a/fs/ext2/bitmap.c b/fs/ext2/bitmap.c new file mode 100644 index 000000000..e9983a0dd --- /dev/null +++ b/fs/ext2/bitmap.c @@ -0,0 +1,32 @@ +/* + * linux/fs/ext2/bitmap.c + * + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) + */ + +#ifdef EXT2FS_DEBUG + +#include + +#include "ext2.h" + +static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; + +unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) +{ + unsigned int i; + unsigned long sum = 0; + + if (!map) + return (0); + for (i = 0; i < numchars; i++) + sum += nibblemap[map->b_data[i] & 0xf] + + nibblemap[(map->b_data[i] >> 4) & 0xf]; + return (sum); +} + +#endif /* EXT2FS_DEBUG */ + diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index b0e7d9feb..d672aa9f4 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -112,7 +112,7 @@ static void ext2_check_page(struct page *page) if (offs != limit) goto Eend; out: - SetPageFsMisc(page); + SetPageChecked(page); return; /* Too bad, we had an error */ @@ -152,20 +152,21 @@ Eend: dir->i_ino, (page->index<inode)); fail: - SetPageFsMisc(page); + SetPageChecked(page); SetPageError(page); } static struct page * ext2_get_page(struct inode *dir, unsigned long n) { struct address_space *mapping = dir->i_mapping; - struct page *page = read_mapping_page(mapping, n, NULL); + struct page *page = read_cache_page(mapping, n, + (filler_t*)mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); kmap(page); if (!PageUptodate(page)) goto fail; - if (!PageFsMisc(page)) + if (!PageChecked(page)) ext2_check_page(page); if (PageError(page)) goto fail; @@ -399,7 +400,8 @@ ino_t ext2_inode_by_name(struct inode * dir, struct dentry *dentry) de = ext2_find_entry (dir, dentry, &page); if (de) { res = le32_to_cpu(de->inode); - ext2_put_page(page); + kunmap(page); + page_cache_release(page); } return res; } diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index c89e9177d..a8ab31e33 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h @@ -162,9 +162,9 @@ extern const struct file_operations ext2_file_operations; extern const struct file_operations ext2_xip_file_operations; /* inode.c */ -extern const struct address_space_operations ext2_aops; -extern const struct address_space_operations ext2_aops_xip; -extern const struct address_space_operations ext2_nobh_aops; +extern struct address_space_operations ext2_aops; +extern struct address_space_operations ext2_aops_xip; +extern struct address_space_operations ext2_nobh_aops; extern int ext2_sync_flags(struct inode *inode); /* namei.c */ diff --git a/fs/ext2/fsync.c b/fs/ext2/fsync.c index 7806b9e81..c9c2e5ffa 100644 --- a/fs/ext2/fsync.c +++ b/fs/ext2/fsync.c @@ -24,7 +24,7 @@ #include "ext2.h" #include -#include /* for sync_mapping_buffers() */ +#include /* for fsync_inode_buffers() */ /* diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c index 8fb7f0062..11e7d7a1c 100644 --- a/fs/ext2/ialloc.c +++ b/fs/ext2/ialloc.c @@ -12,6 +12,7 @@ * David S. Miller (davem@caip.rutgers.edu), 1995 */ +#include #include #include #include @@ -582,6 +583,7 @@ got: inode->i_mode = mode; inode->i_ino = ino; + inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size (for stat), not the fs block size */ inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; memset(ei->i_data, 0, sizeof(ei->i_data)); @@ -659,6 +661,7 @@ unsigned long ext2_count_free_inodes (struct super_block * sb) unsigned long bitmap_count = 0; struct buffer_head *bitmap_bh = NULL; + lock_super (sb); es = EXT2_SB(sb)->s_es; for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) { unsigned x; @@ -681,6 +684,7 @@ unsigned long ext2_count_free_inodes (struct super_block * sb) printk("ext2_count_free_inodes: stored = %lu, computed = %lu, %lu\n", percpu_counter_read(&EXT2_SB(sb)->s_freeinodes_counter), desc_count, bitmap_count); + unlock_super(sb); return desc_count; #else for (i = 0; i < EXT2_SB(sb)->s_groups_count; i++) { diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 2f0c404f0..c6a012874 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -685,7 +685,7 @@ ext2_writepages(struct address_space *mapping, struct writeback_control *wbc) return mpage_writepages(mapping, wbc, ext2_get_block); } -const struct address_space_operations ext2_aops = { +struct address_space_operations ext2_aops = { .readpage = ext2_readpage, .readpages = ext2_readpages, .writepage = ext2_writepage, @@ -698,12 +698,12 @@ const struct address_space_operations ext2_aops = { .migratepage = buffer_migrate_page, }; -const struct address_space_operations ext2_aops_xip = { +struct address_space_operations ext2_aops_xip = { .bmap = ext2_bmap, .get_xip_page = ext2_get_xip_page, }; -const struct address_space_operations ext2_nobh_aops = { +struct address_space_operations ext2_nobh_aops = { .readpage = ext2_readpage, .readpages = ext2_readpages, .writepage = ext2_nobh_writepage, @@ -914,7 +914,7 @@ void ext2_truncate (struct inode * inode) return; if (ext2_inode_is_fast_symlink(inode)) return; - if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) return; ext2_discard_prealloc(inode); @@ -1145,6 +1145,7 @@ void ext2_read_inode (struct inode * inode) brelse (bh); goto bad_inode; } + inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size (for stat), not the fs block size */ inode->i_blocks = le32_to_cpu(raw_inode->i_blocks); ei->i_flags = le32_to_cpu(raw_inode->i_flags); ei->i_faddr = le32_to_cpu(raw_inode->i_faddr); diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 6bd5bfda6..22993252e 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -16,6 +16,7 @@ * David S. Miller (davem@caip.rutgers.edu), 1995 */ +#include #include #include #include @@ -38,7 +39,7 @@ static void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es); static int ext2_remount (struct super_block * sb, int * flags, char * data); -static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf); +static int ext2_statfs (struct super_block * sb, struct kstatfs * buf); void ext2_error (struct super_block * sb, const char * function, const char * fmt, ...) @@ -259,7 +260,7 @@ static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp) struct inode *inode; struct dentry *result; - if (ino < EXT2_FIRST_INO(sb) && ino != EXT2_ROOT_INO) + if (ino != EXT2_ROOT_INO && ino < EXT2_FIRST_INO(sb)) return ERR_PTR(-ESTALE); if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count)) return ERR_PTR(-ESTALE); @@ -272,8 +273,9 @@ static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp) inode = iget(sb, ino); if (inode == NULL) return ERR_PTR(-ENOMEM); - if (is_bad_inode(inode) || - (generation && inode->i_generation != generation)) { + if (is_bad_inode(inode) + || (generation && inode->i_generation != generation) + ) { /* we didn't find the right inode.. */ iput(inode); return ERR_PTR(-ESTALE); @@ -289,6 +291,7 @@ static struct dentry *ext2_get_dentry(struct super_block *sb, void *vobjp) return result; } + /* Yes, most of these are left as NULL!! * A NULL value implies the default, which works with ext2-like file * systems, but can be improved upon. @@ -822,7 +825,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) if (EXT2_INODE_SIZE(sb) == 0) goto cantfind_ext2; sbi->s_inodes_per_block = sb->s_blocksize / EXT2_INODE_SIZE(sb); - if (sbi->s_inodes_per_block == 0 || sbi->s_inodes_per_group == 0) + if (sbi->s_inodes_per_block == 0) goto cantfind_ext2; sbi->s_itb_per_group = sbi->s_inodes_per_group / sbi->s_inodes_per_block; @@ -880,6 +883,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) printk ("EXT2-fs: not enough memory\n"); goto failed_mount; } + percpu_counter_init(&sbi->s_freeblocks_counter); + percpu_counter_init(&sbi->s_freeinodes_counter); + percpu_counter_init(&sbi->s_dirs_counter); bgl_lock_init(&sbi->s_blockgroup_lock); sbi->s_debts = kmalloc(sbi->s_groups_count * sizeof(*sbi->s_debts), GFP_KERNEL); @@ -900,18 +906,12 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) } if (!ext2_check_descriptors (sb)) { printk ("EXT2-fs: group descriptors corrupted!\n"); + db_count = i; goto failed_mount2; } sbi->s_gdb_count = db_count; get_random_bytes(&sbi->s_next_generation, sizeof(u32)); spin_lock_init(&sbi->s_next_gen_lock); - - percpu_counter_init(&sbi->s_freeblocks_counter, - ext2_count_free_blocks(sb)); - percpu_counter_init(&sbi->s_freeinodes_counter, - ext2_count_free_inodes(sb)); - percpu_counter_init(&sbi->s_dirs_counter, - ext2_count_dirs(sb)); /* * set up enough so that it can read an inode */ @@ -923,18 +923,24 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) if (!sb->s_root) { iput(root); printk(KERN_ERR "EXT2-fs: get root inode failed\n"); - goto failed_mount3; + goto failed_mount2; } if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) { dput(sb->s_root); sb->s_root = NULL; printk(KERN_ERR "EXT2-fs: corrupt root inode, run e2fsck\n"); - goto failed_mount3; + goto failed_mount2; } if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) ext2_warning(sb, __FUNCTION__, "mounting ext3 filesystem as ext2"); ext2_setup_super (sb, es, sb->s_flags & MS_RDONLY); + percpu_counter_mod(&sbi->s_freeblocks_counter, + ext2_count_free_blocks(sb)); + percpu_counter_mod(&sbi->s_freeinodes_counter, + ext2_count_free_inodes(sb)); + percpu_counter_mod(&sbi->s_dirs_counter, + ext2_count_dirs(sb)); return 0; cantfind_ext2: @@ -942,10 +948,7 @@ cantfind_ext2: printk("VFS: Can't find an ext2 filesystem on dev %s.\n", sb->s_id); goto failed_mount; -failed_mount3: - percpu_counter_destroy(&sbi->s_freeblocks_counter); - percpu_counter_destroy(&sbi->s_freeinodes_counter); - percpu_counter_destroy(&sbi->s_dirs_counter); + failed_mount2: for (i = 0; i < db_count; i++) brelse(sbi->s_group_desc[i]); @@ -1091,9 +1094,8 @@ restore_opts: return err; } -static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf) +static int ext2_statfs (struct super_block * sb, struct kstatfs * buf) { - struct super_block *sb = dentry->d_sb; struct ext2_sb_info *sbi = EXT2_SB(sb); unsigned long overhead; int i; @@ -1141,10 +1143,10 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf) return 0; } -static int ext2_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ext2_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super); } #ifdef CONFIG_QUOTA @@ -1209,7 +1211,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type, struct buffer_head tmp_bh; struct buffer_head *bh; - mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); + mutex_lock(&inode->i_mutex); while (towrite > 0) { tocopy = sb->s_blocksize - offset < towrite ? sb->s_blocksize - offset : towrite; diff --git a/fs/ext2/xattr.h b/fs/ext2/xattr.h index bf8175b2c..67cfeb66e 100644 --- a/fs/ext2/xattr.h +++ b/fs/ext2/xattr.h @@ -6,6 +6,7 @@ (C) 2001 Andreas Gruenbacher, */ +#include #include #include diff --git a/fs/ext3/acl.h b/fs/ext3/acl.h index 0d1e6279c..92d50b53a 100644 --- a/fs/ext3/acl.h +++ b/fs/ext3/acl.h @@ -62,6 +62,9 @@ extern int ext3_permission (struct inode *, int, struct nameidata *); extern int ext3_acl_chmod (struct inode *); extern int ext3_init_acl (handle_t *, struct inode *, struct inode *); +extern int init_ext3_acl(void); +extern void exit_ext3_acl(void); + #else /* CONFIG_EXT3_FS_POSIX_ACL */ #include #define ext3_permission NULL diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 9de5e42ca..87715e1f8 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c @@ -11,6 +11,7 @@ * David S. Miller (davem@caip.rutgers.edu), 1995 */ +#include #include #include #include @@ -164,19 +165,20 @@ restart: #endif static int -goal_in_my_reservation(struct ext3_reserve_window *rsv, ext3_grpblk_t grp_goal, +goal_in_my_reservation(struct ext3_reserve_window *rsv, int goal, unsigned int group, struct super_block * sb) { - ext3_fsblk_t group_first_block, group_last_block; + unsigned long group_first_block, group_last_block; - group_first_block = ext3_group_first_block_no(sb, group); - group_last_block = group_first_block + (EXT3_BLOCKS_PER_GROUP(sb) - 1); + group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) + + group * EXT3_BLOCKS_PER_GROUP(sb); + group_last_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1; if ((rsv->_rsv_start > group_last_block) || (rsv->_rsv_end < group_first_block)) return 0; - if ((grp_goal >= 0) && ((grp_goal + group_first_block < rsv->_rsv_start) - || (grp_goal + group_first_block > rsv->_rsv_end))) + if ((goal >= 0) && ((goal + group_first_block < rsv->_rsv_start) + || (goal + group_first_block > rsv->_rsv_end))) return 0; return 1; } @@ -187,7 +189,7 @@ goal_in_my_reservation(struct ext3_reserve_window *rsv, ext3_grpblk_t grp_goal, * Returns NULL if there are no windows or if all windows start after the goal. */ static struct ext3_reserve_window_node * -search_reserve_window(struct rb_root *root, ext3_fsblk_t goal) +search_reserve_window(struct rb_root *root, unsigned long goal) { struct rb_node *n = root->rb_node; struct ext3_reserve_window_node *rsv; @@ -223,7 +225,7 @@ void ext3_rsv_window_add(struct super_block *sb, { struct rb_root *root = &EXT3_SB(sb)->s_rsv_window_root; struct rb_node *node = &rsv->rsv_node; - ext3_fsblk_t start = rsv->rsv_start; + unsigned int start = rsv->rsv_start; struct rb_node ** p = &root->rb_node; struct rb_node * parent = NULL; @@ -310,20 +312,20 @@ void ext3_discard_reservation(struct inode *inode) /* Free given blocks, update quota and i_blocks field */ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb, - ext3_fsblk_t block, unsigned long count, - unsigned long *pdquot_freed_blocks) + unsigned long block, unsigned long count, + int *pdquot_freed_blocks) { struct buffer_head *bitmap_bh = NULL; struct buffer_head *gd_bh; unsigned long block_group; - ext3_grpblk_t bit; + unsigned long bit; unsigned long i; unsigned long overflow; struct ext3_group_desc * desc; struct ext3_super_block * es; struct ext3_sb_info *sbi; int err = 0, ret; - ext3_grpblk_t group_freed; + unsigned group_freed; *pdquot_freed_blocks = 0; sbi = EXT3_SB(sb); @@ -333,7 +335,7 @@ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb, block + count > le32_to_cpu(es->s_blocks_count)) { ext3_error (sb, "ext3_free_blocks", "Freeing blocks not in datazone - " - "block = "E3FSBLK", count = %lu", block, count); + "block = %lu, count = %lu", block, count); goto error_return; } @@ -369,7 +371,7 @@ do_more: sbi->s_itb_per_group)) ext3_error (sb, "ext3_free_blocks", "Freeing blocks in system zones - " - "Block = "E3FSBLK", count = %lu", + "Block = %lu, count = %lu", block, count); /* @@ -453,8 +455,7 @@ do_more: bit + i, bitmap_bh->b_data)) { jbd_unlock_bh_state(bitmap_bh); ext3_error(sb, __FUNCTION__, - "bit already cleared for block "E3FSBLK, - block + i); + "bit already cleared for block %lu", block + i); jbd_lock_bh_state(bitmap_bh); BUFFER_TRACE(bitmap_bh, "bit already cleared"); } else { @@ -494,10 +495,10 @@ error_return: /* Free given blocks, update quota and i_blocks field */ void ext3_free_blocks(handle_t *handle, struct inode *inode, - ext3_fsblk_t block, unsigned long count) + unsigned long block, unsigned long count) { struct super_block * sb; - unsigned long dquot_freed_blocks; + int dquot_freed_blocks; sb = inode->i_sb; if (!sb) { @@ -528,7 +529,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode, * data-writes at some point, and disable it for metadata allocations or * sync-data inodes. */ -static int ext3_test_allocatable(ext3_grpblk_t nr, struct buffer_head *bh) +static int ext3_test_allocatable(int nr, struct buffer_head *bh) { int ret; struct journal_head *jh = bh2jh(bh); @@ -545,11 +546,11 @@ static int ext3_test_allocatable(ext3_grpblk_t nr, struct buffer_head *bh) return ret; } -static ext3_grpblk_t -bitmap_search_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, - ext3_grpblk_t maxblocks) +static int +bitmap_search_next_usable_block(int start, struct buffer_head *bh, + int maxblocks) { - ext3_grpblk_t next; + int next; struct journal_head *jh = bh2jh(bh); /* @@ -579,11 +580,10 @@ bitmap_search_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, * the initial goal; then for a free byte somewhere in the bitmap; then * for any free bit in the bitmap. */ -static ext3_grpblk_t -find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, - ext3_grpblk_t maxblocks) +static int +find_next_usable_block(int start, struct buffer_head *bh, int maxblocks) { - ext3_grpblk_t here, next; + int here, next; char *p, *r; if (start > 0) { @@ -595,7 +595,7 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, * less than EXT3_BLOCKS_PER_GROUP. Aligning up to the * next 64-bit boundary is simple.. */ - ext3_grpblk_t end_goal = (start + 63) & ~63; + int end_goal = (start + 63) & ~63; if (end_goal > maxblocks) end_goal = maxblocks; here = ext3_find_next_zero_bit(bh->b_data, end_goal, start); @@ -632,7 +632,7 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh, * zero (failure). */ static inline int -claim_block(spinlock_t *lock, ext3_grpblk_t block, struct buffer_head *bh) +claim_block(spinlock_t *lock, int block, struct buffer_head *bh) { struct journal_head *jh = bh2jh(bh); int ret; @@ -655,18 +655,19 @@ claim_block(spinlock_t *lock, ext3_grpblk_t block, struct buffer_head *bh) * new bitmap. In that case we must release write access to the old one via * ext3_journal_release_buffer(), else we'll run out of credits. */ -static ext3_grpblk_t +static int ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group, - struct buffer_head *bitmap_bh, ext3_grpblk_t grp_goal, + struct buffer_head *bitmap_bh, int goal, unsigned long *count, struct ext3_reserve_window *my_rsv) { - ext3_fsblk_t group_first_block; - ext3_grpblk_t start, end; + int group_first_block, start, end; unsigned long num = 0; /* we do allocation within the reservation window if we have a window */ if (my_rsv) { - group_first_block = ext3_group_first_block_no(sb, group); + group_first_block = + le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) + + group * EXT3_BLOCKS_PER_GROUP(sb); if (my_rsv->_rsv_start >= group_first_block) start = my_rsv->_rsv_start - group_first_block; else @@ -676,13 +677,13 @@ ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group, if (end > EXT3_BLOCKS_PER_GROUP(sb)) /* reservation window crosses group boundary */ end = EXT3_BLOCKS_PER_GROUP(sb); - if ((start <= grp_goal) && (grp_goal < end)) - start = grp_goal; + if ((start <= goal) && (goal < end)) + start = goal; else - grp_goal = -1; + goal = -1; } else { - if (grp_goal > 0) - start = grp_goal; + if (goal > 0) + start = goal; else start = 0; end = EXT3_BLOCKS_PER_GROUP(sb); @@ -691,43 +692,43 @@ ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group, BUG_ON(start > EXT3_BLOCKS_PER_GROUP(sb)); repeat: - if (grp_goal < 0 || !ext3_test_allocatable(grp_goal, bitmap_bh)) { - grp_goal = find_next_usable_block(start, bitmap_bh, end); - if (grp_goal < 0) + if (goal < 0 || !ext3_test_allocatable(goal, bitmap_bh)) { + goal = find_next_usable_block(start, bitmap_bh, end); + if (goal < 0) goto fail_access; if (!my_rsv) { int i; - for (i = 0; i < 7 && grp_goal > start && - ext3_test_allocatable(grp_goal - 1, + for (i = 0; i < 7 && goal > start && + ext3_test_allocatable(goal - 1, bitmap_bh); - i++, grp_goal--) + i++, goal--) ; } } - start = grp_goal; + start = goal; - if (!claim_block(sb_bgl_lock(EXT3_SB(sb), group), grp_goal, bitmap_bh)) { + if (!claim_block(sb_bgl_lock(EXT3_SB(sb), group), goal, bitmap_bh)) { /* * The block was allocated by another thread, or it was * allocated and then freed by another thread */ start++; - grp_goal++; + goal++; if (start >= end) goto fail_access; goto repeat; } num++; - grp_goal++; - while (num < *count && grp_goal < end - && ext3_test_allocatable(grp_goal, bitmap_bh) - && claim_block(sb_bgl_lock(EXT3_SB(sb), group), grp_goal, bitmap_bh)) { + goal++; + while (num < *count && goal < end + && ext3_test_allocatable(goal, bitmap_bh) + && claim_block(sb_bgl_lock(EXT3_SB(sb), group), goal, bitmap_bh)) { num++; - grp_goal++; + goal++; } *count = num; - return grp_goal - num; + return goal - num; fail_access: *count = num; return -1; @@ -769,13 +770,12 @@ fail_access: static int find_next_reservable_window( struct ext3_reserve_window_node *search_head, struct ext3_reserve_window_node *my_rsv, - struct super_block * sb, - ext3_fsblk_t start_block, - ext3_fsblk_t last_block) + struct super_block * sb, int start_block, + int last_block) { struct rb_node *next; struct ext3_reserve_window_node *rsv, *prev; - ext3_fsblk_t cur; + int cur; int size = my_rsv->rsv_goal_size; /* TODO: make the start of the reservation window byte-aligned */ @@ -877,10 +877,10 @@ static int find_next_reservable_window( * * @rsv: the reservation * - * @grp_goal: The goal (group-relative). It is where the search for a + * @goal: The goal (group-relative). It is where the search for a * free reservable space should start from. - * if we have a grp_goal(grp_goal >0 ), then start from there, - * no grp_goal(grp_goal = -1), we start from the first block + * if we have a goal(goal >0 ), then start from there, + * no goal(goal = -1), we start from the first block * of the group. * * @sb: the super block @@ -889,24 +889,25 @@ static int find_next_reservable_window( * */ static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv, - ext3_grpblk_t grp_goal, struct super_block *sb, + int goal, struct super_block *sb, unsigned int group, struct buffer_head *bitmap_bh) { struct ext3_reserve_window_node *search_head; - ext3_fsblk_t group_first_block, group_end_block, start_block; - ext3_grpblk_t first_free_block; + int group_first_block, group_end_block, start_block; + int first_free_block; struct rb_root *fs_rsv_root = &EXT3_SB(sb)->s_rsv_window_root; unsigned long size; int ret; spinlock_t *rsv_lock = &EXT3_SB(sb)->s_rsv_window_lock; - group_first_block = ext3_group_first_block_no(sb, group); - group_end_block = group_first_block + (EXT3_BLOCKS_PER_GROUP(sb) - 1); + group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) + + group * EXT3_BLOCKS_PER_GROUP(sb); + group_end_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1; - if (grp_goal < 0) + if (goal < 0) start_block = group_first_block; else - start_block = grp_goal + group_first_block; + start_block = goal + group_first_block; size = my_rsv->rsv_goal_size; @@ -1060,15 +1061,14 @@ static void try_to_extend_reservation(struct ext3_reserve_window_node *my_rsv, * sorted double linked list should be fast. * */ -static ext3_grpblk_t +static int ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, unsigned int group, struct buffer_head *bitmap_bh, - ext3_grpblk_t grp_goal, - struct ext3_reserve_window_node * my_rsv, + int goal, struct ext3_reserve_window_node * my_rsv, unsigned long *count, int *errp) { - ext3_fsblk_t group_first_block, group_last_block; - ext3_grpblk_t ret = 0; + unsigned long group_first_block; + int ret = 0; int fatal; unsigned long num = *count; @@ -1094,17 +1094,17 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, */ if (my_rsv == NULL ) { ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, - grp_goal, count, NULL); + goal, count, NULL); goto out; } /* - * grp_goal is a group relative block number (if there is a goal) - * 0 < grp_goal < EXT3_BLOCKS_PER_GROUP(sb) + * goal is a group relative block number (if there is a goal) + * 0 < goal < EXT3_BLOCKS_PER_GROUP(sb) * first block is a filesystem wide block number * first block is the block number of the first block in this group */ - group_first_block = ext3_group_first_block_no(sb, group); - group_last_block = group_first_block + (EXT3_BLOCKS_PER_GROUP(sb) - 1); + group_first_block = le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block) + + group * EXT3_BLOCKS_PER_GROUP(sb); /* * Basically we will allocate a new block from inode's reservation @@ -1123,24 +1123,24 @@ ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, */ while (1) { if (rsv_is_empty(&my_rsv->rsv_window) || (ret < 0) || - !goal_in_my_reservation(&my_rsv->rsv_window, grp_goal, group, sb)) { + !goal_in_my_reservation(&my_rsv->rsv_window, goal, group, sb)) { if (my_rsv->rsv_goal_size < *count) my_rsv->rsv_goal_size = *count; - ret = alloc_new_reservation(my_rsv, grp_goal, sb, + ret = alloc_new_reservation(my_rsv, goal, sb, group, bitmap_bh); if (ret < 0) break; /* failed */ - if (!goal_in_my_reservation(&my_rsv->rsv_window, grp_goal, group, sb)) - grp_goal = -1; - } else if (grp_goal > 0 && (my_rsv->rsv_end-grp_goal+1) < *count) + if (!goal_in_my_reservation(&my_rsv->rsv_window, goal, group, sb)) + goal = -1; + } else if (goal > 0 && (my_rsv->rsv_end-goal+1) < *count) try_to_extend_reservation(my_rsv, sb, - *count-my_rsv->rsv_end + grp_goal - 1); + *count-my_rsv->rsv_end + goal - 1); - if ((my_rsv->rsv_start > group_last_block) || - (my_rsv->rsv_end < group_first_block)) + if ((my_rsv->rsv_start >= group_first_block + EXT3_BLOCKS_PER_GROUP(sb)) + || (my_rsv->rsv_end < group_first_block)) BUG(); - ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, grp_goal, + ret = ext3_try_to_allocate(sb, handle, group, bitmap_bh, goal, &num, &my_rsv->rsv_window); if (ret >= 0) { my_rsv->rsv_alloc_hit += num; @@ -1169,14 +1169,13 @@ out: static int ext3_has_free_blocks(struct super_block *sb) { struct ext3_sb_info *sbi = EXT3_SB(sb); - ext3_fsblk_t free_blocks, root_blocks; - int cond; + int free_blocks, root_blocks, cond; free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter); root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count); vxdprintk(VXD_CBIT(dlim, 3), - "ext3_has_free_blocks(%p): free=%lu, root=%lu", + "ext3_has_free_blocks(%p): free=%u, root=%u", sb, free_blocks, root_blocks); DLIMIT_ADJUST_BLOCK(sb, vx_current_xid(), &free_blocks, &root_blocks); @@ -1187,7 +1186,7 @@ static int ext3_has_free_blocks(struct super_block *sb) (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))); vxdprintk(VXD_CBIT(dlim, 3), - "ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d", + "ext3_has_free_blocks(%p): %u<%u+1, %c, %u!=%u r=%d", sb, free_blocks, root_blocks, !capable(CAP_SYS_RESOURCE)?'1':'0', sbi->s_resuid, current->fsuid, cond?0:1); @@ -1219,20 +1218,19 @@ int ext3_should_retry_alloc(struct super_block *sb, int *retries) * bitmap, and then for any free bit if that fails. * This function also updates quota and i_blocks field. */ -ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, unsigned long *count, int *errp) +int ext3_new_blocks(handle_t *handle, struct inode *inode, + unsigned long goal, unsigned long *count, int *errp) { struct buffer_head *bitmap_bh = NULL; struct buffer_head *gdp_bh; int group_no; int goal_group; - ext3_grpblk_t grp_target_blk; /* blockgroup relative goal block */ - ext3_grpblk_t grp_alloc_blk; /* blockgroup-relative allocated block*/ - ext3_fsblk_t ret_block; /* filesyetem-wide allocated block */ + int ret_block; int bgi; /* blockgroup iteration index */ + int target_block; int fatal = 0, err; int performed_allocation = 0; - ext3_grpblk_t free_blocks; /* number of free blocks in a group */ + int free_blocks; struct super_block *sb; struct ext3_group_desc *gdp; struct ext3_super_block *es; @@ -1291,12 +1289,12 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode, goal = le32_to_cpu(es->s_first_data_block); group_no = (goal - le32_to_cpu(es->s_first_data_block)) / EXT3_BLOCKS_PER_GROUP(sb); - goal_group = group_no; -retry_alloc: gdp = ext3_get_group_desc(sb, group_no, &gdp_bh); if (!gdp) goto io_error; + goal_group = group_no; +retry: free_blocks = le16_to_cpu(gdp->bg_free_blocks_count); /* * if there is not enough free blocks to make a new resevation @@ -1307,17 +1305,16 @@ retry_alloc: my_rsv = NULL; if (free_blocks > 0) { - grp_target_blk = ((goal - le32_to_cpu(es->s_first_data_block)) % + ret_block = ((goal - le32_to_cpu(es->s_first_data_block)) % EXT3_BLOCKS_PER_GROUP(sb)); bitmap_bh = read_block_bitmap(sb, group_no); if (!bitmap_bh) goto io_error; - grp_alloc_blk = ext3_try_to_allocate_with_rsv(sb, handle, - group_no, bitmap_bh, grp_target_blk, - my_rsv, &num, &fatal); + ret_block = ext3_try_to_allocate_with_rsv(sb, handle, group_no, + bitmap_bh, ret_block, my_rsv, &num, &fatal); if (fatal) goto out; - if (grp_alloc_blk >= 0) + if (ret_block >= 0) goto allocated; } @@ -1350,15 +1347,11 @@ retry_alloc: bitmap_bh = read_block_bitmap(sb, group_no); if (!bitmap_bh) goto io_error; - /* - * try to allocate block(s) from this group, without a goal(-1). - */ - grp_alloc_blk = ext3_try_to_allocate_with_rsv(sb, handle, - group_no, bitmap_bh, -1, my_rsv, - &num, &fatal); + ret_block = ext3_try_to_allocate_with_rsv(sb, handle, group_no, + bitmap_bh, -1, my_rsv, &num, &fatal); if (fatal) goto out; - if (grp_alloc_blk >= 0) + if (ret_block >= 0) goto allocated; } /* @@ -1371,7 +1364,7 @@ retry_alloc: if (my_rsv) { my_rsv = NULL; group_no = goal_group; - goto retry_alloc; + goto retry; } /* No space left on the device */ *errp = -ENOSPC; @@ -1387,18 +1380,18 @@ allocated: if (fatal) goto out; - ret_block = grp_alloc_blk + ext3_group_first_block_no(sb, group_no); + target_block = ret_block + group_no * EXT3_BLOCKS_PER_GROUP(sb) + + le32_to_cpu(es->s_first_data_block); - if (in_range(le32_to_cpu(gdp->bg_block_bitmap), ret_block, num) || - in_range(le32_to_cpu(gdp->bg_inode_bitmap), ret_block, num) || - in_range(ret_block, le32_to_cpu(gdp->bg_inode_table), + if (in_range(le32_to_cpu(gdp->bg_block_bitmap), target_block, num) || + in_range(le32_to_cpu(gdp->bg_inode_bitmap), target_block, num) || + in_range(target_block, le32_to_cpu(gdp->bg_inode_table), EXT3_SB(sb)->s_itb_per_group) || - in_range(ret_block + num - 1, le32_to_cpu(gdp->bg_inode_table), + in_range(target_block + num - 1, le32_to_cpu(gdp->bg_inode_table), EXT3_SB(sb)->s_itb_per_group)) ext3_error(sb, "ext3_new_block", "Allocating block in system zone - " - "blocks from "E3FSBLK", length %lu", - ret_block, num); + "blocks from %u, length %lu", target_block, num); performed_allocation = 1; @@ -1407,7 +1400,7 @@ allocated: struct buffer_head *debug_bh; /* Record bitmap buffer state in the newly allocated block */ - debug_bh = sb_find_get_block(sb, ret_block); + debug_bh = sb_find_get_block(sb, target_block); if (debug_bh) { BUFFER_TRACE(debug_bh, "state when allocated"); BUFFER_TRACE2(debug_bh, bitmap_bh, "bitmap state"); @@ -1420,21 +1413,24 @@ allocated: int i; for (i = 0; i < num; i++) { - if (ext3_test_bit(grp_alloc_blk+i, + if (ext3_test_bit(ret_block, bh2jh(bitmap_bh)->b_committed_data)) { printk("%s: block was unexpectedly set in " "b_committed_data\n", __FUNCTION__); } } } - ext3_debug("found bit %d\n", grp_alloc_blk); + ext3_debug("found bit %d\n", ret_block); spin_unlock(sb_bgl_lock(sbi, group_no)); jbd_unlock_bh_state(bitmap_bh); #endif + /* ret_block was blockgroup-relative. Now it becomes fs-relative */ + ret_block = target_block; + if (ret_block + num - 1 >= le32_to_cpu(es->s_blocks_count)) { ext3_error(sb, "ext3_new_block", - "block("E3FSBLK") >= blocks count(%d) - " + "block(%d) >= blocks count(%d) - " "block_group = %d, es == %p ", ret_block, le32_to_cpu(es->s_blocks_count), group_no, es); goto out; @@ -1445,7 +1441,7 @@ allocated: * list of some description. We don't know in advance whether * the caller wants to use it as metadata or data. */ - ext3_debug("allocating block %lu. Goal hits %d of %d.\n", + ext3_debug("allocating block %d. Goal hits %d of %d.\n", ret_block, goal_hits, goal_attempts); spin_lock(sb_bgl_lock(sbi, group_no)); @@ -1488,24 +1484,23 @@ out_dlimit: return 0; } -ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int *errp) +int ext3_new_block(handle_t *handle, struct inode *inode, + unsigned long goal, int *errp) { unsigned long count = 1; return ext3_new_blocks(handle, inode, goal, &count, errp); } -ext3_fsblk_t ext3_count_free_blocks(struct super_block *sb) +unsigned long ext3_count_free_blocks(struct super_block *sb) { - ext3_fsblk_t desc_count; + unsigned long desc_count; struct ext3_group_desc *gdp; int i; unsigned long ngroups = EXT3_SB(sb)->s_groups_count; #ifdef EXT3FS_DEBUG struct ext3_super_block *es; - ext3_fsblk_t bitmap_count; - unsigned long x; + unsigned long bitmap_count, x; struct buffer_head *bitmap_bh = NULL; es = EXT3_SB(sb)->s_es; @@ -1530,10 +1525,8 @@ ext3_fsblk_t ext3_count_free_blocks(struct super_block *sb) bitmap_count += x; } brelse(bitmap_bh); - printk("ext3_count_free_blocks: stored = "E3FSBLK - ", computed = "E3FSBLK", "E3FSBLK"\n", - le32_to_cpu(es->s_free_blocks_count), - desc_count, bitmap_count); + printk("ext3_count_free_blocks: stored = %u, computed = %lu, %lu\n", + le32_to_cpu(es->s_free_blocks_count), desc_count, bitmap_count); return bitmap_count; #else desc_count = 0; @@ -1550,7 +1543,7 @@ ext3_fsblk_t ext3_count_free_blocks(struct super_block *sb) } static inline int -block_in_use(ext3_fsblk_t block, struct super_block *sb, unsigned char *map) +block_in_use(unsigned long block, struct super_block *sb, unsigned char *map) { return ext3_test_bit ((block - le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block)) % diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c index f11d6ca46..f37528ed2 100644 --- a/fs/ext3/dir.c +++ b/fs/ext3/dir.c @@ -151,9 +151,6 @@ static int ext3_readdir(struct file * filp, ext3_error (sb, "ext3_readdir", "directory #%lu contains a hole at offset %lu", inode->i_ino, (unsigned long)filp->f_pos); - /* corrupt size? Maybe no more blocks to read */ - if (filp->f_pos > inode->i_blocks << 9) - break; filp->f_pos += sb->s_blocksize - offset; continue; } @@ -287,7 +284,7 @@ static void free_rb_tree_fname(struct rb_root *root) * beginning of the loop and try to free the parent * node. */ - parent = rb_parent(n); + parent = n->rb_parent; fname = rb_entry(n, struct fname, rb_hash); while (fname) { struct fname * old = fname; diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index 792f6df51..17c75f53a 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c @@ -205,7 +205,7 @@ error_return: static int find_group_dir(struct super_block *sb, struct inode *parent) { int ngroups = EXT3_SB(sb)->s_groups_count; - unsigned int freei, avefreei; + int freei, avefreei; struct ext3_group_desc *desc, *best_desc = NULL; struct buffer_head *bh; int group, best_group = -1; @@ -264,12 +264,10 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) struct ext3_super_block *es = sbi->s_es; int ngroups = sbi->s_groups_count; int inodes_per_group = EXT3_INODES_PER_GROUP(sb); - unsigned int freei, avefreei; - ext3_fsblk_t freeb, avefreeb; - ext3_fsblk_t blocks_per_dir; - unsigned int ndirs; - int max_debt, max_dirs, min_inodes; - ext3_grpblk_t min_blocks; + int freei, avefreei; + int freeb, avefreeb; + int blocks_per_dir, ndirs; + int max_debt, max_dirs, min_blocks, min_inodes; int group = -1, i; struct ext3_group_desc *desc; struct buffer_head *bh; @@ -312,7 +310,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) min_inodes = avefreei - inodes_per_group / 4; min_blocks = avefreeb - EXT3_BLOCKS_PER_GROUP(sb) / 4; - max_debt = EXT3_BLOCKS_PER_GROUP(sb) / max(blocks_per_dir, (ext3_fsblk_t)BLOCK_COST); + max_debt = EXT3_BLOCKS_PER_GROUP(sb) / max(blocks_per_dir, BLOCK_COST); if (max_debt * INODE_COST > inodes_per_group) max_debt = inodes_per_group / INODE_COST; if (max_debt > 255) @@ -568,6 +566,7 @@ got: inode->i_ino = ino; /* This is the optimal IO size (for stat), not the fs block size */ + inode->i_blksize = PAGE_SIZE; inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 23d956ff0..4ce217b6d 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -63,7 +63,7 @@ static int ext3_inode_is_fast_symlink(struct inode *inode) * still needs to be revoked. */ int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, - struct buffer_head *bh, ext3_fsblk_t blocknr) + struct buffer_head *bh, int blocknr) { int err; @@ -408,13 +408,13 @@ no_block: * * Caller must make sure that @ind is valid and will stay that way. */ -static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind) +static unsigned long ext3_find_near(struct inode *inode, Indirect *ind) { struct ext3_inode_info *ei = EXT3_I(inode); __le32 *start = ind->bh ? (__le32*) ind->bh->b_data : ei->i_data; __le32 *p; - ext3_fsblk_t bg_start; - ext3_grpblk_t colour; + unsigned long bg_start; + unsigned long colour; /* Try to find previous block */ for (p = ind->p - 1; p >= start; p--) { @@ -430,7 +430,8 @@ static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind) * It is going to be referred to from the inode itself? OK, just put it * into the same cylinder group then. */ - bg_start = ext3_group_first_block_no(inode->i_sb, ei->i_block_group); + bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) + + le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block); colour = (current->pid % 16) * (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16); return bg_start + colour; @@ -448,7 +449,7 @@ static ext3_fsblk_t ext3_find_near(struct inode *inode, Indirect *ind) * stores it in *@goal and returns zero. */ -static ext3_fsblk_t ext3_find_goal(struct inode *inode, long block, +static unsigned long ext3_find_goal(struct inode *inode, long block, Indirect chain[4], Indirect *partial) { struct ext3_block_alloc_info *block_i; @@ -516,13 +517,13 @@ static int ext3_blks_to_allocate(Indirect *branch, int k, unsigned long blks, * direct blocks */ static int ext3_alloc_blocks(handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int indirect_blks, int blks, - ext3_fsblk_t new_blocks[4], int *err) + unsigned long goal, int indirect_blks, int blks, + unsigned long long new_blocks[4], int *err) { int target, i; unsigned long count = 0; int index = 0; - ext3_fsblk_t current_block = 0; + unsigned long current_block = 0; int ret = 0; /* @@ -592,7 +593,7 @@ failed_out: * as described above and return 0. */ static int ext3_alloc_branch(handle_t *handle, struct inode *inode, - int indirect_blks, int *blks, ext3_fsblk_t goal, + int indirect_blks, int *blks, unsigned long goal, int *offsets, Indirect *branch) { int blocksize = inode->i_sb->s_blocksize; @@ -600,8 +601,8 @@ static int ext3_alloc_branch(handle_t *handle, struct inode *inode, int err = 0; struct buffer_head *bh; int num; - ext3_fsblk_t new_blocks[4]; - ext3_fsblk_t current_block; + unsigned long long new_blocks[4]; + unsigned long long current_block; num = ext3_alloc_blocks(handle, inode, goal, indirect_blks, *blks, new_blocks, &err); @@ -688,7 +689,7 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode, int i; int err = 0; struct ext3_block_alloc_info *block_i; - ext3_fsblk_t current_block; + unsigned long current_block; block_i = EXT3_I(inode)->i_block_alloc_info; /* @@ -795,13 +796,13 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, int offsets[4]; Indirect chain[4]; Indirect *partial; - ext3_fsblk_t goal; + unsigned long goal; int indirect_blks; int blocks_to_boundary = 0; int depth; struct ext3_inode_info *ei = EXT3_I(inode); int count = 0; - ext3_fsblk_t first_block = 0; + unsigned long first_block = 0; J_ASSERT(handle != NULL || create == 0); @@ -819,7 +820,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, count++; /*map more blocks*/ while (count < maxblocks && count <= blocks_to_boundary) { - ext3_fsblk_t blk; + unsigned long blk; if (!verify_chain(chain, partial)) { /* @@ -926,7 +927,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, set_buffer_new(bh_result); got_it: map_bh(bh_result, inode->i_sb, le32_to_cpu(chain[depth-1].key)); - if (count > blocks_to_boundary) + if (blocks_to_boundary == 0) set_buffer_boundary(bh_result); err = count; /* Clean up and exit */ @@ -1010,14 +1011,11 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode, buffer_trace_init(&dummy.b_history); err = ext3_get_blocks_handle(handle, inode, block, 1, &dummy, create, 1); - /* - * ext3_get_blocks_handle() returns number of blocks - * mapped. 0 in case of a HOLE. - */ - if (err > 0) { - if (err > 1) - WARN_ON(1); + if (err == 1) { err = 0; + } else if (err >= 0) { + WARN_ON(1); + err = -EIO; } *errp = err; if (!err && buffer_mapped(&dummy)) { @@ -1531,12 +1529,12 @@ static int ext3_journalled_writepage(struct page *page, goto no_write; } - if (!page_has_buffers(page) || PageFsMisc(page)) { + if (!page_has_buffers(page) || PageChecked(page)) { /* * It's mmapped pagecache. Add buffers and journal it. There * doesn't seem much point in redirtying the page here. */ - ClearPageFsMisc(page); + ClearPageChecked(page); ret = block_prepare_write(page, 0, PAGE_CACHE_SIZE, ext3_get_block); if (ret != 0) { @@ -1593,7 +1591,7 @@ static void ext3_invalidatepage(struct page *page, unsigned long offset) * If it's a full truncate we just forget about the pending dirtying */ if (offset == 0) - ClearPageFsMisc(page); + ClearPageChecked(page); journal_invalidatepage(journal, page, offset); } @@ -1602,7 +1600,7 @@ static int ext3_releasepage(struct page *page, gfp_t wait) { journal_t *journal = EXT3_JOURNAL(page->mapping->host); - WARN_ON(PageFsMisc(page)); + WARN_ON(PageChecked(page)); if (!page_has_buffers(page)) return 0; return journal_try_to_free_buffers(journal, page, wait); @@ -1698,11 +1696,11 @@ out: */ static int ext3_journalled_set_page_dirty(struct page *page) { - SetPageFsMisc(page); + SetPageChecked(page); return __set_page_dirty_nobuffers(page); } -static const struct address_space_operations ext3_ordered_aops = { +static struct address_space_operations ext3_ordered_aops = { .readpage = ext3_readpage, .readpages = ext3_readpages, .writepage = ext3_ordered_writepage, @@ -1716,7 +1714,7 @@ static const struct address_space_operations ext3_ordered_aops = { .migratepage = buffer_migrate_page, }; -static const struct address_space_operations ext3_writeback_aops = { +static struct address_space_operations ext3_writeback_aops = { .readpage = ext3_readpage, .readpages = ext3_readpages, .writepage = ext3_writeback_writepage, @@ -1730,7 +1728,7 @@ static const struct address_space_operations ext3_writeback_aops = { .migratepage = buffer_migrate_page, }; -static const struct address_space_operations ext3_journalled_aops = { +static struct address_space_operations ext3_journalled_aops = { .readpage = ext3_readpage, .readpages = ext3_readpages, .writepage = ext3_journalled_writepage, @@ -1762,7 +1760,7 @@ void ext3_set_aops(struct inode *inode) static int ext3_block_truncate_page(handle_t *handle, struct page *page, struct address_space *mapping, loff_t from) { - ext3_fsblk_t index = from >> PAGE_CACHE_SHIFT; + unsigned long index = from >> PAGE_CACHE_SHIFT; unsigned offset = from & (PAGE_CACHE_SIZE-1); unsigned blocksize, iblock, length, pos; struct inode *inode = mapping->host; @@ -1963,7 +1961,7 @@ no_top: * than `count' because there can be holes in there. */ static void ext3_clear_blocks(handle_t *handle, struct inode *inode, - struct buffer_head *bh, ext3_fsblk_t block_to_free, + struct buffer_head *bh, unsigned long block_to_free, unsigned long count, __le32 *first, __le32 *last) { __le32 *p; @@ -2025,12 +2023,12 @@ static void ext3_free_data(handle_t *handle, struct inode *inode, struct buffer_head *this_bh, __le32 *first, __le32 *last) { - ext3_fsblk_t block_to_free = 0; /* Starting block # of a run */ + unsigned long block_to_free = 0; /* Starting block # of a run */ unsigned long count = 0; /* Number of blocks in the run */ __le32 *block_to_free_p = NULL; /* Pointer into inode/ind corresponding to block_to_free */ - ext3_fsblk_t nr; /* Current block # */ + unsigned long nr; /* Current block # */ __le32 *p; /* Pointer into inode/ind for current block */ int err; @@ -2092,7 +2090,7 @@ static void ext3_free_branches(handle_t *handle, struct inode *inode, struct buffer_head *parent_bh, __le32 *first, __le32 *last, int depth) { - ext3_fsblk_t nr; + unsigned long nr; __le32 *p; if (is_handle_aborted(handle)) @@ -2116,7 +2114,7 @@ static void ext3_free_branches(handle_t *handle, struct inode *inode, */ if (!bh) { ext3_error(inode->i_sb, "ext3_free_branches", - "Read failure, inode=%lu, block="E3FSBLK, + "Read failure, inode=%ld, block=%ld", inode->i_ino, nr); continue; } @@ -2246,7 +2244,7 @@ void ext3_truncate(struct inode *inode) return; if (ext3_inode_is_fast_symlink(inode)) return; - if (IS_APPEND(inode) || IS_IXORUNLINK(inode)) + if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) return; /* @@ -2397,12 +2395,11 @@ out_stop: ext3_journal_stop(handle); } -static ext3_fsblk_t ext3_get_inode_block(struct super_block *sb, +static unsigned long ext3_get_inode_block(struct super_block *sb, unsigned long ino, struct ext3_iloc *iloc) { unsigned long desc, group_desc, block_group; - unsigned long offset; - ext3_fsblk_t block; + unsigned long offset, block; struct buffer_head *bh; struct ext3_group_desc * gdp; @@ -2453,7 +2450,7 @@ static ext3_fsblk_t ext3_get_inode_block(struct super_block *sb, static int __ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem) { - ext3_fsblk_t block; + unsigned long block; struct buffer_head *bh; block = ext3_get_inode_block(inode->i_sb, inode->i_ino, iloc); @@ -2464,8 +2461,7 @@ static int __ext3_get_inode_loc(struct inode *inode, if (!bh) { ext3_error (inode->i_sb, "ext3_get_inode_loc", "unable to read inode block - " - "inode=%lu, block="E3FSBLK, - inode->i_ino, block); + "inode=%lu, block=%lu", inode->i_ino, block); return -EIO; } if (!buffer_uptodate(bh)) { @@ -2546,7 +2542,7 @@ make_io: if (!buffer_uptodate(bh)) { ext3_error(inode->i_sb, "ext3_get_inode_loc", "unable to read inode block - " - "inode=%lu, block="E3FSBLK, + "inode=%lu, block=%lu", inode->i_ino, block); brelse(bh); return -EIO; @@ -2698,6 +2694,9 @@ void ext3_read_inode(struct inode * inode) * recovery code: that's fine, we're about to complete * the process of deleting those. */ } + inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size + * (for stat), not the fs block + * size */ inode->i_blocks = le32_to_cpu(raw_inode->i_blocks); ei->i_flags = le32_to_cpu(raw_inode->i_flags); #ifdef EXT3_FRAGMENTS diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c index 5f374c33a..c5e3ff45a 100644 --- a/fs/ext3/ioctl.c +++ b/fs/ext3/ioctl.c @@ -211,7 +211,7 @@ flags_err: return 0; } case EXT3_IOC_GROUP_EXTEND: { - ext3_fsblk_t n_blocks_count; + unsigned long n_blocks_count; struct super_block *sb = inode->i_sb; int err; diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 38e74158e..045f58812 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -552,15 +552,6 @@ static int htree_dirblock_to_tree(struct file *dir_file, dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0)); for (; de < top; de = ext3_next_entry(de)) { - if (!ext3_check_dir_entry("htree_dirblock_to_tree", dir, de, bh, - (block<i_sb)) - +((char *)de - bh->b_data))) { - /* On error, skip the f_pos to the next block. */ - dir_file->f_pos = (dir_file->f_pos | - (dir->i_sb->s_blocksize - 1)) + 1; - brelse (bh); - return count; - } ext3fs_dirhash(de->name, de->name_len, hinfo); if ((hinfo->hash < start_hash) || ((hinfo->hash == start_hash) && @@ -1401,6 +1392,7 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry, int dx_fallback=0; #endif unsigned blocksize; + unsigned nlen, rlen; u32 block, blocks; sb = dir->i_sb; @@ -1438,7 +1430,8 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry, return retval; de = (struct ext3_dir_entry_2 *) bh->b_data; de->inode = 0; - de->rec_len = cpu_to_le16(blocksize); + de->rec_len = cpu_to_le16(rlen = blocksize); + nlen = 0; return add_dirent_to_buf(handle, dentry, inode, de, bh); } @@ -1930,8 +1923,8 @@ int ext3_orphan_add(handle_t *handle, struct inode *inode) if (!err) list_add(&EXT3_I(inode)->i_orphan, &EXT3_SB(sb)->s_orphan); - jbd_debug(4, "superblock will point to %lu\n", inode->i_ino); - jbd_debug(4, "orphan inode %lu will point to %d\n", + jbd_debug(4, "superblock will point to %ld\n", inode->i_ino); + jbd_debug(4, "orphan inode %ld will point to %d\n", inode->i_ino, NEXT_ORPHAN(inode)); out_unlock: unlock_super(sb); diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 11ea0f854..34b39e9a1 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c @@ -8,6 +8,7 @@ * This could probably be made into a module, because it is not often in use. */ +#include #define EXT3FS_DEBUG @@ -27,16 +28,16 @@ static int verify_group_input(struct super_block *sb, { struct ext3_sb_info *sbi = EXT3_SB(sb); struct ext3_super_block *es = sbi->s_es; - ext3_fsblk_t start = le32_to_cpu(es->s_blocks_count); - ext3_fsblk_t end = start + input->blocks_count; + unsigned start = le32_to_cpu(es->s_blocks_count); + unsigned end = start + input->blocks_count; unsigned group = input->group; - ext3_fsblk_t itend = input->inode_table + sbi->s_itb_per_group; + unsigned itend = input->inode_table + sbi->s_itb_per_group; unsigned overhead = ext3_bg_has_super(sb, group) ? (1 + ext3_bg_num_gdb(sb, group) + le16_to_cpu(es->s_reserved_gdt_blocks)) : 0; - ext3_fsblk_t metaend = start + overhead; + unsigned metaend = start + overhead; struct buffer_head *bh = NULL; - ext3_grpblk_t free_blocks_count; + int free_blocks_count; int err = -EINVAL; input->free_blocks_count = free_blocks_count = @@ -63,8 +64,7 @@ static int verify_group_input(struct super_block *sb, ext3_warning(sb, __FUNCTION__, "Bad blocks count %u", input->blocks_count); else if (!(bh = sb_bread(sb, end - 1))) - ext3_warning(sb, __FUNCTION__, - "Cannot read last block ("E3FSBLK")", + ext3_warning(sb, __FUNCTION__, "Cannot read last block (%u)", end - 1); else if (outside(input->block_bitmap, start, end)) ext3_warning(sb, __FUNCTION__, @@ -77,7 +77,7 @@ static int verify_group_input(struct super_block *sb, else if (outside(input->inode_table, start, end) || outside(itend - 1, start, end)) ext3_warning(sb, __FUNCTION__, - "Inode table not in group (blocks %u-"E3FSBLK")", + "Inode table not in group (blocks %u-%u)", input->inode_table, itend - 1); else if (input->inode_bitmap == input->block_bitmap) ext3_warning(sb, __FUNCTION__, @@ -85,27 +85,24 @@ static int verify_group_input(struct super_block *sb, input->block_bitmap); else if (inside(input->block_bitmap, input->inode_table, itend)) ext3_warning(sb, __FUNCTION__, - "Block bitmap (%u) in inode table (%u-"E3FSBLK")", + "Block bitmap (%u) in inode table (%u-%u)", input->block_bitmap, input->inode_table, itend-1); else if (inside(input->inode_bitmap, input->inode_table, itend)) ext3_warning(sb, __FUNCTION__, - "Inode bitmap (%u) in inode table (%u-"E3FSBLK")", + "Inode bitmap (%u) in inode table (%u-%u)", input->inode_bitmap, input->inode_table, itend-1); else if (inside(input->block_bitmap, start, metaend)) ext3_warning(sb, __FUNCTION__, - "Block bitmap (%u) in GDT table" - " ("E3FSBLK"-"E3FSBLK")", + "Block bitmap (%u) in GDT table (%u-%u)", input->block_bitmap, start, metaend - 1); else if (inside(input->inode_bitmap, start, metaend)) ext3_warning(sb, __FUNCTION__, - "Inode bitmap (%u) in GDT table" - " ("E3FSBLK"-"E3FSBLK")", + "Inode bitmap (%u) in GDT table (%u-%u)", input->inode_bitmap, start, metaend - 1); else if (inside(input->inode_table, start, metaend) || inside(itend - 1, start, metaend)) ext3_warning(sb, __FUNCTION__, - "Inode table (%u-"E3FSBLK") overlaps" - "GDT table ("E3FSBLK"-"E3FSBLK")", + "Inode table (%u-%u) overlaps GDT table (%u-%u)", input->inode_table, itend - 1, start, metaend - 1); else err = 0; @@ -115,7 +112,7 @@ static int verify_group_input(struct super_block *sb, } static struct buffer_head *bclean(handle_t *handle, struct super_block *sb, - ext3_fsblk_t blk) + unsigned long blk) { struct buffer_head *bh; int err; @@ -166,14 +163,15 @@ static int setup_new_group_blocks(struct super_block *sb, struct ext3_new_group_data *input) { struct ext3_sb_info *sbi = EXT3_SB(sb); - ext3_fsblk_t start = ext3_group_first_block_no(sb, input->group); + unsigned long start = input->group * sbi->s_blocks_per_group + + le32_to_cpu(sbi->s_es->s_first_data_block); int reserved_gdb = ext3_bg_has_super(sb, input->group) ? le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks) : 0; unsigned long gdblocks = ext3_bg_num_gdb(sb, input->group); struct buffer_head *bh; handle_t *handle; - ext3_fsblk_t block; - ext3_grpblk_t bit; + unsigned long block; + int bit; int i; int err = 0, err2; @@ -330,7 +328,7 @@ static unsigned ext3_list_backups(struct super_block *sb, unsigned *three, static int verify_reserved_gdb(struct super_block *sb, struct buffer_head *primary) { - const ext3_fsblk_t blk = primary->b_blocknr; + const unsigned long blk = primary->b_blocknr; const unsigned long end = EXT3_SB(sb)->s_groups_count; unsigned three = 1; unsigned five = 5; @@ -342,8 +340,7 @@ static int verify_reserved_gdb(struct super_block *sb, while ((grp = ext3_list_backups(sb, &three, &five, &seven)) < end) { if (le32_to_cpu(*p++) != grp * EXT3_BLOCKS_PER_GROUP(sb) + blk){ ext3_warning(sb, __FUNCTION__, - "reserved GDT "E3FSBLK - " missing grp %d ("E3FSBLK")", + "reserved GDT %ld missing grp %d (%ld)", blk, grp, grp * EXT3_BLOCKS_PER_GROUP(sb) + blk); return -EINVAL; @@ -375,7 +372,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, struct super_block *sb = inode->i_sb; struct ext3_super_block *es = EXT3_SB(sb)->s_es; unsigned long gdb_num = input->group / EXT3_DESC_PER_BLOCK(sb); - ext3_fsblk_t gdblock = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + gdb_num; + unsigned long gdblock = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + gdb_num; struct buffer_head **o_group_desc, **n_group_desc; struct buffer_head *dind; int gdbackups; @@ -420,7 +417,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, data = (__u32 *)dind->b_data; if (le32_to_cpu(data[gdb_num % EXT3_ADDR_PER_BLOCK(sb)]) != gdblock) { ext3_warning(sb, __FUNCTION__, - "new group %u GDT block "E3FSBLK" not reserved", + "new group %u GDT block %lu not reserved", input->group, gdblock); err = -EINVAL; goto exit_dind; @@ -518,7 +515,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, struct buffer_head **primary; struct buffer_head *dind; struct ext3_iloc iloc; - ext3_fsblk_t blk; + unsigned long blk; __u32 *data, *end; int gdbackups = 0; int res, i; @@ -543,8 +540,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, for (res = 0; res < reserved_gdb; res++, blk++) { if (le32_to_cpu(*data) != blk) { ext3_warning(sb, __FUNCTION__, - "reserved block "E3FSBLK - " not at offset %ld", + "reserved block %lu not at offset %ld", blk, (long)(data - (__u32 *)dind->b_data)); err = -EINVAL; goto exit_bh; @@ -730,18 +726,6 @@ int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input) return -EPERM; } - if (le32_to_cpu(es->s_blocks_count) + input->blocks_count < - le32_to_cpu(es->s_blocks_count)) { - ext3_warning(sb, __FUNCTION__, "blocks_count overflow\n"); - return -EINVAL; - } - - if (le32_to_cpu(es->s_inodes_count) + EXT3_INODES_PER_GROUP(sb) < - le32_to_cpu(es->s_inodes_count)) { - ext3_warning(sb, __FUNCTION__, "inodes_count overflow\n"); - return -EINVAL; - } - if (reserved_gdb || gdb_off == 0) { if (!EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_RESIZE_INODE)){ @@ -918,16 +902,15 @@ exit_put: * GDT blocks are reserved to grow to the desired size. */ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, - ext3_fsblk_t n_blocks_count) + unsigned long n_blocks_count) { - ext3_fsblk_t o_blocks_count; + unsigned long o_blocks_count; unsigned long o_groups_count; - ext3_grpblk_t last; - ext3_grpblk_t add; + unsigned long last; + int add; struct buffer_head * bh; handle_t *handle; - int err; - unsigned long freed_blocks; + int err, freed_blocks; /* We don't need to worry about locking wrt other resizers just * yet: we're going to revalidate es->s_blocks_count after @@ -936,22 +919,12 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, o_groups_count = EXT3_SB(sb)->s_groups_count; if (test_opt(sb, DEBUG)) - printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK" uto "E3FSBLK" blocks\n", + printk(KERN_DEBUG "EXT3-fs: extending last group from %lu to %lu blocks\n", o_blocks_count, n_blocks_count); if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) return 0; - if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { - printk(KERN_ERR "EXT3-fs: filesystem on %s:" - " too large to resize to %lu blocks safely\n", - sb->s_id, n_blocks_count); - if (sizeof(sector_t) < 8) - ext3_warning(sb, __FUNCTION__, - "CONFIG_LBD not enabled\n"); - return -EINVAL; - } - if (n_blocks_count < o_blocks_count) { ext3_warning(sb, __FUNCTION__, "can't shrink FS - resize aborted"); @@ -970,18 +943,12 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, add = EXT3_BLOCKS_PER_GROUP(sb) - last; - if (o_blocks_count + add < o_blocks_count) { - ext3_warning(sb, __FUNCTION__, "blocks_count overflow"); - return -EINVAL; - } - if (o_blocks_count + add > n_blocks_count) add = n_blocks_count - o_blocks_count; if (o_blocks_count + add < n_blocks_count) ext3_warning(sb, __FUNCTION__, - "will only finish group ("E3FSBLK - " blocks, %u new)", + "will only finish group (%lu blocks, %u new)", o_blocks_count + add, add); /* See if the device is actually as big as what was requested */ @@ -1024,10 +991,10 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh); sb->s_dirt = 1; unlock_super(sb); - ext3_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count, + ext3_debug("freeing blocks %ld through %ld\n", o_blocks_count, o_blocks_count + add); ext3_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks); - ext3_debug("freed blocks "E3FSBLK" through "E3FSBLK"\n", o_blocks_count, + ext3_debug("freed blocks %ld through %ld\n", o_blocks_count, o_blocks_count + add); if ((err = ext3_journal_stop(handle))) goto exit_put; diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 26425a5f1..ed22106c9 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -16,6 +16,7 @@ * David S. Miller (davem@caip.rutgers.edu), 1995 */ +#include #include #include #include @@ -45,7 +46,7 @@ static int ext3_load_journal(struct super_block *, struct ext3_super_block *, unsigned long journal_devnum); static int ext3_create_journal(struct super_block *, struct ext3_super_block *, - unsigned int); + int); static void ext3_commit_super (struct super_block * sb, struct ext3_super_block * es, int sync); @@ -57,7 +58,7 @@ static int ext3_sync_fs(struct super_block *sb, int wait); static const char *ext3_decode_error(struct super_block * sb, int errno, char nbuf[16]); static int ext3_remount (struct super_block * sb, int * flags, char * data); -static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf); +static int ext3_statfs (struct super_block * sb, struct kstatfs * buf); static void ext3_unlockfs(struct super_block *sb); static void ext3_write_super (struct super_block * sb); static void ext3_write_super_lockfs(struct super_block *sb); @@ -376,7 +377,7 @@ static void dump_orphan_list(struct super_block *sb, struct ext3_sb_info *sbi) list_for_each(l, &sbi->s_orphan) { struct inode *inode = orphan_list_entry(l); printk(KERN_ERR " " - "inode %s:%lu at %p: mode %o, nlink %d, next %d\n", + "inode %s:%ld at %p: mode %o, nlink %d, next %d\n", inode->i_sb->s_id, inode->i_ino, inode, inode->i_mode, inode->i_nlink, NEXT_ORPHAN(inode)); @@ -498,21 +499,20 @@ static void ext3_clear_inode(struct inode *inode) { struct ext3_block_alloc_info *rsv = EXT3_I(inode)->i_block_alloc_info; #ifdef CONFIG_EXT3_FS_POSIX_ACL - if (EXT3_I(inode)->i_acl && - EXT3_I(inode)->i_acl != EXT3_ACL_NOT_CACHED) { - posix_acl_release(EXT3_I(inode)->i_acl); - EXT3_I(inode)->i_acl = EXT3_ACL_NOT_CACHED; - } - if (EXT3_I(inode)->i_default_acl && - EXT3_I(inode)->i_default_acl != EXT3_ACL_NOT_CACHED) { - posix_acl_release(EXT3_I(inode)->i_default_acl); - EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED; - } + if (EXT3_I(inode)->i_acl && + EXT3_I(inode)->i_acl != EXT3_ACL_NOT_CACHED) { + posix_acl_release(EXT3_I(inode)->i_acl); + EXT3_I(inode)->i_acl = EXT3_ACL_NOT_CACHED; + } + if (EXT3_I(inode)->i_default_acl && + EXT3_I(inode)->i_default_acl != EXT3_ACL_NOT_CACHED) { + posix_acl_release(EXT3_I(inode)->i_default_acl); + EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED; + } #endif ext3_discard_reservation(inode); EXT3_I(inode)->i_block_alloc_info = NULL; - if (unlikely(rsv)) - kfree(rsv); + kfree(rsv); } static inline void ext3_show_quota_options(struct seq_file *seq, struct super_block *sb) @@ -554,47 +554,6 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) return 0; } - -static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp) -{ - __u32 *objp = vobjp; - unsigned long ino = objp[0]; - __u32 generation = objp[1]; - struct inode *inode; - struct dentry *result; - - if (ino < EXT3_FIRST_INO(sb) && ino != EXT3_ROOT_INO) - return ERR_PTR(-ESTALE); - if (ino > le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)) - return ERR_PTR(-ESTALE); - - /* iget isn't really right if the inode is currently unallocated!! - * - * ext3_read_inode will return a bad_inode if the inode had been - * deleted, so we should be safe. - * - * Currently we don't know the generation for parent directory, so - * a generation of 0 means "accept any" - */ - inode = iget(sb, ino); - if (inode == NULL) - return ERR_PTR(-ENOMEM); - if (is_bad_inode(inode) || - (generation && inode->i_generation != generation)) { - iput(inode); - return ERR_PTR(-ESTALE); - } - /* now to find a dentry. - * If possible, get a well-connected one - */ - result = d_alloc_anon(inode); - if (!result) { - iput(inode); - return ERR_PTR(-ENOMEM); - } - return result; -} - #ifdef CONFIG_QUOTA #define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") #define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) @@ -661,6 +620,45 @@ static struct super_operations ext3_sops = { #endif }; +static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp) +{ + __u32 *objp = vobjp; + unsigned long ino = objp[0]; + __u32 generation = objp[1]; + struct inode *inode; + struct dentry *result; + + if (ino != EXT3_ROOT_INO && ino < EXT3_FIRST_INO(sb)) + return ERR_PTR(-ESTALE); + if (ino > le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)) + return ERR_PTR(-ESTALE); + + /* iget isn't really right if the inode is currently unallocated!! + * ext3_read_inode currently does appropriate checks, but + * it might be "neater" to call ext3_get_inode first and check + * if the inode is valid..... + */ + inode = iget(sb, ino); + if (inode == NULL) + return ERR_PTR(-ENOMEM); + if (is_bad_inode(inode) + || (generation && inode->i_generation != generation) + ) { + /* we didn't find the right inode.. */ + iput(inode); + return ERR_PTR(-ESTALE); + } + /* now to find a dentry. + * If possible, get a well-connected one + */ + result = d_alloc_anon(inode); + if (!result) { + iput(inode); + return ERR_PTR(-ENOMEM); + } + return result; +} + static struct export_operations ext3_export_ops = { .get_parent = ext3_get_parent, .get_dentry = ext3_get_dentry, @@ -671,7 +669,7 @@ enum { Opt_resgid, Opt_resuid, Opt_sb, Opt_err_cont, Opt_err_panic, Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov, Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl, - Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh, + Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev, Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, @@ -707,7 +705,6 @@ static match_table_t tokens = { {Opt_noreservation, "noreservation"}, {Opt_noload, "noload"}, {Opt_nobh, "nobh"}, - {Opt_bh, "bh"}, {Opt_commit, "commit=%u"}, {Opt_journal_update, "journal=update"}, {Opt_journal_inum, "journal=%u"}, @@ -732,15 +729,14 @@ static match_table_t tokens = { {Opt_resize, "resize"}, }; -static ext3_fsblk_t get_sb_block(void **data) +static unsigned long get_sb_block(void **data) { - ext3_fsblk_t sb_block; + unsigned long sb_block; char *options = (char *) *data; if (!options || strncmp(options, "sb=", 3) != 0) return 1; /* Default location */ options += 3; - /*todo: use simple_strtoll with >32bit ext3 */ sb_block = simple_strtoul(options, &options, 0); if (*options && *options != ',') { printk("EXT3-fs: Invalid sb specification: %s\n", @@ -754,8 +750,8 @@ static ext3_fsblk_t get_sb_block(void **data) } static int parse_options (char *options, struct super_block *sb, - unsigned int *inum, unsigned long *journal_devnum, - ext3_fsblk_t *n_blocks_count, int is_remount) + unsigned long *inum, unsigned long *journal_devnum, + unsigned long *n_blocks_count, int is_remount) { struct ext3_sb_info *sbi = EXT3_SB(sb); char * p; @@ -1062,9 +1058,6 @@ clear_qf_name: case Opt_nobh: set_opt(sbi->s_mount_opt, NOBH); break; - case Opt_bh: - clear_opt(sbi->s_mount_opt, NOBH); - break; default: printk (KERN_ERR "EXT3-fs: Unrecognized mount option \"%s\" " @@ -1180,8 +1173,7 @@ static int ext3_setup_super(struct super_block *sb, struct ext3_super_block *es, static int ext3_check_descriptors (struct super_block * sb) { struct ext3_sb_info *sbi = EXT3_SB(sb); - ext3_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block); - ext3_fsblk_t last_block; + unsigned long block = le32_to_cpu(sbi->s_es->s_first_data_block); struct ext3_group_desc * gdp = NULL; int desc_block = 0; int i; @@ -1190,17 +1182,12 @@ static int ext3_check_descriptors (struct super_block * sb) for (i = 0; i < sbi->s_groups_count; i++) { - if (i == sbi->s_groups_count - 1) - last_block = le32_to_cpu(sbi->s_es->s_blocks_count) - 1; - else - last_block = first_block + - (EXT3_BLOCKS_PER_GROUP(sb) - 1); - if ((i % EXT3_DESC_PER_BLOCK(sb)) == 0) gdp = (struct ext3_group_desc *) sbi->s_group_desc[desc_block++]->b_data; - if (le32_to_cpu(gdp->bg_block_bitmap) < first_block || - le32_to_cpu(gdp->bg_block_bitmap) > last_block) + if (le32_to_cpu(gdp->bg_block_bitmap) < block || + le32_to_cpu(gdp->bg_block_bitmap) >= + block + EXT3_BLOCKS_PER_GROUP(sb)) { ext3_error (sb, "ext3_check_descriptors", "Block bitmap for group %d" @@ -1209,8 +1196,9 @@ static int ext3_check_descriptors (struct super_block * sb) le32_to_cpu(gdp->bg_block_bitmap)); return 0; } - if (le32_to_cpu(gdp->bg_inode_bitmap) < first_block || - le32_to_cpu(gdp->bg_inode_bitmap) > last_block) + if (le32_to_cpu(gdp->bg_inode_bitmap) < block || + le32_to_cpu(gdp->bg_inode_bitmap) >= + block + EXT3_BLOCKS_PER_GROUP(sb)) { ext3_error (sb, "ext3_check_descriptors", "Inode bitmap for group %d" @@ -1219,9 +1207,9 @@ static int ext3_check_descriptors (struct super_block * sb) le32_to_cpu(gdp->bg_inode_bitmap)); return 0; } - if (le32_to_cpu(gdp->bg_inode_table) < first_block || - le32_to_cpu(gdp->bg_inode_table) + sbi->s_itb_per_group > - last_block) + if (le32_to_cpu(gdp->bg_inode_table) < block || + le32_to_cpu(gdp->bg_inode_table) + sbi->s_itb_per_group >= + block + EXT3_BLOCKS_PER_GROUP(sb)) { ext3_error (sb, "ext3_check_descriptors", "Inode table for group %d" @@ -1230,7 +1218,7 @@ static int ext3_check_descriptors (struct super_block * sb) le32_to_cpu(gdp->bg_inode_table)); return 0; } - first_block += EXT3_BLOCKS_PER_GROUP(sb); + block += EXT3_BLOCKS_PER_GROUP(sb); gdp++; } @@ -1312,17 +1300,17 @@ static void ext3_orphan_cleanup (struct super_block * sb, DQUOT_INIT(inode); if (inode->i_nlink) { printk(KERN_DEBUG - "%s: truncating inode %lu to %Ld bytes\n", + "%s: truncating inode %ld to %Ld bytes\n", __FUNCTION__, inode->i_ino, inode->i_size); - jbd_debug(2, "truncating inode %lu to %Ld bytes\n", + jbd_debug(2, "truncating inode %ld to %Ld bytes\n", inode->i_ino, inode->i_size); ext3_truncate(inode); nr_truncates++; } else { printk(KERN_DEBUG - "%s: deleting unreferenced inode %lu\n", + "%s: deleting unreferenced inode %ld\n", __FUNCTION__, inode->i_ino); - jbd_debug(2, "deleting unreferenced inode %lu\n", + jbd_debug(2, "deleting unreferenced inode %ld\n", inode->i_ino); nr_orphans++; } @@ -1372,14 +1360,15 @@ static loff_t ext3_max_size(int bits) return res; } -static ext3_fsblk_t descriptor_loc(struct super_block *sb, - ext3_fsblk_t logic_sb_block, +static unsigned long descriptor_loc(struct super_block *sb, + unsigned long logic_sb_block, int nr) { struct ext3_sb_info *sbi = EXT3_SB(sb); - unsigned long bg, first_meta_bg; + unsigned long bg, first_data_block, first_meta_bg; int has_super = 0; + first_data_block = le32_to_cpu(sbi->s_es->s_first_data_block); first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg); if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_META_BG) || @@ -1388,7 +1377,7 @@ static ext3_fsblk_t descriptor_loc(struct super_block *sb, bg = sbi->s_desc_per_block * nr; if (ext3_bg_has_super(sb, bg)) has_super = 1; - return (has_super + ext3_group_first_block_no(sb, bg)); + return (first_data_block + has_super + (bg * sbi->s_blocks_per_group)); } @@ -1397,11 +1386,11 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) struct buffer_head * bh; struct ext3_super_block *es = NULL; struct ext3_sb_info *sbi; - ext3_fsblk_t block; - ext3_fsblk_t sb_block = get_sb_block(&data); - ext3_fsblk_t logic_sb_block; + unsigned long block; + unsigned long sb_block = get_sb_block(&data); + unsigned long logic_sb_block; unsigned long offset = 0; - unsigned int journal_inum = 0; + unsigned long journal_inum = 0; unsigned long journal_devnum = 0; unsigned long def_mount_opts; struct inode *root; @@ -1624,21 +1613,12 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) goto failed_mount; } - if (le32_to_cpu(es->s_blocks_count) > - (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { - printk(KERN_ERR "EXT3-fs: filesystem on %s:" - " too large to mount safely\n", sb->s_id); - if (sizeof(sector_t) < 8) - printk(KERN_WARNING "EXT3-fs: CONFIG_LBD not " - "enabled\n"); - goto failed_mount; - } - if (EXT3_BLOCKS_PER_GROUP(sb) == 0) goto cantfind_ext3; - sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - - le32_to_cpu(es->s_first_data_block) - 1) - / EXT3_BLOCKS_PER_GROUP(sb)) + 1; + sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) - + le32_to_cpu(es->s_first_data_block) + + EXT3_BLOCKS_PER_GROUP(sb) - 1) / + EXT3_BLOCKS_PER_GROUP(sb); db_count = (sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) / EXT3_DESC_PER_BLOCK(sb); sbi->s_group_desc = kmalloc(db_count * sizeof (struct buffer_head *), @@ -1648,6 +1628,9 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) goto failed_mount; } + percpu_counter_init(&sbi->s_freeblocks_counter); + percpu_counter_init(&sbi->s_freeinodes_counter); + percpu_counter_init(&sbi->s_dirs_counter); bgl_lock_init(&sbi->s_blockgroup_lock); for (i = 0; i < db_count; i++) { @@ -1661,20 +1644,12 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) } } if (!ext3_check_descriptors (sb)) { - printk(KERN_ERR "EXT3-fs: group descriptors corrupted!\n"); + printk (KERN_ERR "EXT3-fs: group descriptors corrupted !\n"); goto failed_mount2; } sbi->s_gdb_count = db_count; get_random_bytes(&sbi->s_next_generation, sizeof(u32)); spin_lock_init(&sbi->s_next_gen_lock); - - percpu_counter_init(&sbi->s_freeblocks_counter, - ext3_count_free_blocks(sb)); - percpu_counter_init(&sbi->s_freeinodes_counter, - ext3_count_free_inodes(sb)); - percpu_counter_init(&sbi->s_dirs_counter, - ext3_count_dirs(sb)); - /* per fileystem reservation list head & lock */ spin_lock_init(&sbi->s_rsv_window_lock); sbi->s_rsv_window_root = RB_ROOT; @@ -1713,16 +1688,16 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) if (!test_opt(sb, NOLOAD) && EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) { if (ext3_load_journal(sb, es, journal_devnum)) - goto failed_mount3; + goto failed_mount2; } else if (journal_inum) { if (ext3_create_journal(sb, es, journal_inum)) - goto failed_mount3; + goto failed_mount2; } else { if (!silent) printk (KERN_ERR "ext3: No journal on filesystem on %s\n", sb->s_id); - goto failed_mount3; + goto failed_mount2; } /* We have now updated the journal if required, so we can @@ -1745,7 +1720,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) (sbi->s_journal, 0, 0, JFS_FEATURE_INCOMPAT_REVOKE)) { printk(KERN_ERR "EXT3-fs: Journal does not support " "requested data journaling mode\n"); - goto failed_mount4; + goto failed_mount3; } default: break; @@ -1768,13 +1743,13 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) if (!sb->s_root) { printk(KERN_ERR "EXT3-fs: get root inode failed\n"); iput(root); - goto failed_mount4; + goto failed_mount3; } if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) { dput(sb->s_root); sb->s_root = NULL; printk(KERN_ERR "EXT3-fs: corrupt root inode, run e2fsck\n"); - goto failed_mount4; + goto failed_mount3; } ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); @@ -1797,6 +1772,13 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered": "writeback"); + percpu_counter_mod(&sbi->s_freeblocks_counter, + ext3_count_free_blocks(sb)); + percpu_counter_mod(&sbi->s_freeinodes_counter, + ext3_count_free_inodes(sb)); + percpu_counter_mod(&sbi->s_dirs_counter, + ext3_count_dirs(sb)); + lock_kernel(); return 0; @@ -1806,12 +1788,8 @@ cantfind_ext3: sb->s_id); goto failed_mount; -failed_mount4: - journal_destroy(sbi->s_journal); failed_mount3: - percpu_counter_destroy(&sbi->s_freeblocks_counter); - percpu_counter_destroy(&sbi->s_freeinodes_counter); - percpu_counter_destroy(&sbi->s_dirs_counter); + journal_destroy(sbi->s_journal); failed_mount2: for (i = 0; i < db_count; i++) brelse(sbi->s_group_desc[i]); @@ -1853,8 +1831,7 @@ static void ext3_init_journal_params(struct super_block *sb, journal_t *journal) spin_unlock(&journal->j_state_lock); } -static journal_t *ext3_get_journal(struct super_block *sb, - unsigned int journal_inum) +static journal_t *ext3_get_journal(struct super_block *sb, int journal_inum) { struct inode *journal_inode; journal_t *journal; @@ -1899,10 +1876,10 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb, { struct buffer_head * bh; journal_t *journal; - ext3_fsblk_t start; - ext3_fsblk_t len; + int start; + int len; int hblock, blocksize; - ext3_fsblk_t sb_block; + unsigned long sb_block; unsigned long offset; struct ext3_super_block * es; struct block_device *bdev; @@ -1989,7 +1966,7 @@ static int ext3_load_journal(struct super_block *sb, unsigned long journal_devnum) { journal_t *journal; - unsigned int journal_inum = le32_to_cpu(es->s_journal_inum); + int journal_inum = le32_to_cpu(es->s_journal_inum); dev_t journal_dev; int err = 0; int really_read_only; @@ -2075,7 +2052,7 @@ static int ext3_load_journal(struct super_block *sb, static int ext3_create_journal(struct super_block * sb, struct ext3_super_block * es, - unsigned int journal_inum) + int journal_inum) { journal_t *journal; @@ -2088,7 +2065,7 @@ static int ext3_create_journal(struct super_block * sb, if (!(journal = ext3_get_journal(sb, journal_inum))) return -EINVAL; - printk(KERN_INFO "EXT3-fs: creating new journal on inode %u\n", + printk(KERN_INFO "EXT3-fs: creating new journal on inode %d\n", journal_inum); if (journal_create(journal)) { @@ -2275,7 +2252,7 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) { struct ext3_super_block * es; struct ext3_sb_info *sbi = EXT3_SB(sb); - ext3_fsblk_t n_blocks_count = 0; + unsigned long n_blocks_count = 0; unsigned long old_sb_flags; struct ext3_mount_options old_opts; int err; @@ -2396,12 +2373,11 @@ restore_opts: return err; } -static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) +static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) { - struct super_block *sb = dentry->d_sb; struct ext3_sb_info *sbi = EXT3_SB(sb); struct ext3_super_block *es = sbi->s_es; - ext3_fsblk_t overhead; + unsigned long overhead; int i; if (test_opt (sb, MINIX_DF)) @@ -2676,7 +2652,7 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type, struct buffer_head *bh; handle_t *handle = journal_current_handle(); - mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); + mutex_lock(&inode->i_mutex); while (towrite > 0) { tocopy = sb->s_blocksize - offset < towrite ? sb->s_blocksize - offset : towrite; @@ -2725,10 +2701,10 @@ out: #endif -static int ext3_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ext3_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, ext3_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, ext3_fill_super); } static struct file_system_type ext3_fs_type = { diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c index 74f20d39d..fac3f248b 100644 --- a/fs/ext3/xattr.c +++ b/fs/ext3/xattr.c @@ -76,7 +76,7 @@ #ifdef EXT3_XATTR_DEBUG # define ea_idebug(inode, f...) do { \ - printk(KERN_DEBUG "inode %s:%lu: ", \ + printk(KERN_DEBUG "inode %s:%ld: ", \ inode->i_sb->s_id, inode->i_ino); \ printk(f); \ printk("\n"); \ @@ -226,7 +226,7 @@ ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, error = -ENODATA; if (!EXT3_I(inode)->i_file_acl) goto cleanup; - ea_idebug(inode, "reading block %u", EXT3_I(inode)->i_file_acl); + ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); if (!bh) goto cleanup; @@ -234,7 +234,7 @@ ext3_xattr_block_get(struct inode *inode, int name_index, const char *name, atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); if (ext3_xattr_check_block(bh)) { bad_block: ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: bad block "E3FSBLK, inode->i_ino, + "inode %ld: bad block %d", inode->i_ino, EXT3_I(inode)->i_file_acl); error = -EIO; goto cleanup; @@ -367,7 +367,7 @@ ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) error = 0; if (!EXT3_I(inode)->i_file_acl) goto cleanup; - ea_idebug(inode, "reading block %u", EXT3_I(inode)->i_file_acl); + ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl); bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); error = -EIO; if (!bh) @@ -376,7 +376,7 @@ ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); if (ext3_xattr_check_block(bh)) { ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: bad block "E3FSBLK, inode->i_ino, + "inode %ld: bad block %d", inode->i_ino, EXT3_I(inode)->i_file_acl); error = -EIO; goto cleanup; @@ -649,7 +649,7 @@ ext3_xattr_block_find(struct inode *inode, struct ext3_xattr_info *i, le32_to_cpu(BHDR(bs->bh)->h_refcount)); if (ext3_xattr_check_block(bs->bh)) { ext3_error(sb, __FUNCTION__, - "inode %lu: bad block "E3FSBLK, inode->i_ino, + "inode %ld: bad block %d", inode->i_ino, EXT3_I(inode)->i_file_acl); error = -EIO; goto cleanup; @@ -797,12 +797,11 @@ inserted: get_bh(new_bh); } else { /* We need to allocate a new block */ - ext3_fsblk_t goal = le32_to_cpu( + int goal = le32_to_cpu( EXT3_SB(sb)->s_es->s_first_data_block) + - (ext3_fsblk_t)EXT3_I(inode)->i_block_group * + EXT3_I(inode)->i_block_group * EXT3_BLOCKS_PER_GROUP(sb); - ext3_fsblk_t block = ext3_new_block(handle, inode, - goal, &error); + int block = ext3_new_block(handle, inode, goal, &error); if (error) goto cleanup; ea_idebug(inode, "creating block %d", block); @@ -855,7 +854,7 @@ cleanup_dlimit: bad_block: ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: bad block "E3FSBLK, inode->i_ino, + "inode %ld: bad block %d", inode->i_ino, EXT3_I(inode)->i_file_acl); goto cleanup; @@ -1084,14 +1083,14 @@ ext3_xattr_delete_inode(handle_t *handle, struct inode *inode) bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl); if (!bh) { ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: block "E3FSBLK" read error", inode->i_ino, + "inode %ld: block %d read error", inode->i_ino, EXT3_I(inode)->i_file_acl); goto cleanup; } if (BHDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) || BHDR(bh)->h_blocks != cpu_to_le32(1)) { ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: bad block "E3FSBLK, inode->i_ino, + "inode %ld: bad block %d", inode->i_ino, EXT3_I(inode)->i_file_acl); goto cleanup; } @@ -1218,11 +1217,11 @@ again: bh = sb_bread(inode->i_sb, ce->e_block); if (!bh) { ext3_error(inode->i_sb, __FUNCTION__, - "inode %lu: block %lu read error", + "inode %ld: block %ld read error", inode->i_ino, (unsigned long) ce->e_block); } else if (le32_to_cpu(BHDR(bh)->h_refcount) >= EXT3_XATTR_REFCOUNT_MAX) { - ea_idebug(inode, "block %lu refcount %d>=%d", + ea_idebug(inode, "block %ld refcount %d>=%d", (unsigned long) ce->e_block, le32_to_cpu(BHDR(bh)->h_refcount), EXT3_XATTR_REFCOUNT_MAX); diff --git a/fs/ext3/xattr.h b/fs/ext3/xattr.h index 6b1ae1c61..2ceae38f3 100644 --- a/fs/ext3/xattr.h +++ b/fs/ext3/xattr.h @@ -6,6 +6,7 @@ (C) 2001 Andreas Gruenbacher, */ +#include #include /* Magic value in attribute blocks */ diff --git a/fs/fat/dir.c b/fs/fat/dir.c index 9e6eae903..698b85bb1 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -647,7 +647,7 @@ static int fat_readdir(struct file *filp, void *dirent, filldir_t filldir) } static int fat_ioctl_filldir(void *__buf, const char *name, int name_len, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct fat_ioctl_filldir_callback *buf = __buf; struct dirent __user *d1 = buf->dirent; diff --git a/fs/fat/inode.c b/fs/fat/inode.c index bb3bee034..3c2cbd355 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -196,7 +196,7 @@ static sector_t _fat_bmap(struct address_space *mapping, sector_t block) return generic_block_bmap(mapping, block, fat_get_block); } -static const struct address_space_operations fat_aops = { +static struct address_space_operations fat_aops = { .readpage = fat_readpage, .readpages = fat_readpages, .writepage = fat_writepage, @@ -375,6 +375,8 @@ static int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de) inode->i_flags |= S_IMMUTABLE; } MSDOS_I(inode)->i_attrs = de->attr & ATTR_UNUSED; + /* this is as close to the truth as we can get ... */ + inode->i_blksize = sbi->cluster_size; inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1)) & ~((loff_t)sbi->cluster_size - 1)) >> 9; inode->i_mtime.tv_sec = @@ -537,18 +539,18 @@ static int fat_remount(struct super_block *sb, int *flags, char *data) return 0; } -static int fat_statfs(struct dentry *dentry, struct kstatfs *buf) +static int fat_statfs(struct super_block *sb, struct kstatfs *buf) { - struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); + struct msdos_sb_info *sbi = MSDOS_SB(sb); /* If the count of free cluster is still unknown, counts it here. */ if (sbi->free_clusters == -1) { - int err = fat_count_free_clusters(dentry->d_sb); + int err = fat_count_free_clusters(sb); if (err) return err; } - buf->f_type = dentry->d_sb->s_magic; + buf->f_type = sb->s_magic; buf->f_bsize = sbi->cluster_size; buf->f_blocks = sbi->max_cluster - FAT_START_ENT; buf->f_bfree = sbi->free_clusters; @@ -1136,6 +1138,7 @@ static int fat_read_root(struct inode *inode) MSDOS_I(inode)->i_start = 0; inode->i_size = sbi->dir_entries * sizeof(struct msdos_dir_entry); } + inode->i_blksize = sbi->cluster_size; inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1)) & ~((loff_t)sbi->cluster_size - 1)) >> 9; MSDOS_I(inode)->i_logstart = 0; diff --git a/fs/fat/misc.c b/fs/fat/misc.c index 308f2b6b5..944652e9d 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c @@ -210,3 +210,4 @@ int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs) return err; } +EXPORT_SYMBOL_GPL(fat_sync_bhs); diff --git a/fs/fcntl.c b/fs/fcntl.c index 05a913ac2..2aa5db702 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -539,8 +539,6 @@ int send_sigurg(struct fown_struct *fown) return ret; } -EXPORT_SYMBOL(send_sigurg); - static DEFINE_RWLOCK(fasync_lock); static kmem_cache_t *fasync_cache __read_mostly; diff --git a/fs/file.c b/fs/file.c index b3c6b82e6..4c2cacca4 100644 --- a/fs/file.c +++ b/fs/file.c @@ -240,9 +240,13 @@ static struct fdtable *alloc_fdtable(int nr) if (!fdt) goto out; - nfds = max_t(int, 8 * L1_CACHE_BYTES, roundup_pow_of_two(nr + 1)); - if (nfds > NR_OPEN) - nfds = NR_OPEN; + nfds = 8 * L1_CACHE_BYTES; + /* Expand to the max in easy steps */ + while (nfds <= nr) { + nfds = nfds * 2; + if (nfds > NR_OPEN) + nfds = NR_OPEN; + } new_openset = alloc_fdset(nfds); new_execset = alloc_fdset(nfds); diff --git a/fs/file_table.c b/fs/file_table.c index 0dbfdb47c..6022b86a8 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -5,6 +5,7 @@ * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include @@ -174,7 +175,7 @@ void fastcall __fput(struct file *file) if (file->f_op && file->f_op->release) file->f_op->release(inode, file); security_file_free(file); - if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) + if (unlikely(inode->i_cdev != NULL)) cdev_put(inode->i_cdev); fops_put(file->f_op); if (file->f_mode & FMODE_WRITE) @@ -241,7 +242,6 @@ struct file fastcall *fget_light(unsigned int fd, int *fput_needed) return file; } -EXPORT_SYMBOL_GPL(fget_light); void put_filp(struct file *file) { @@ -309,5 +309,5 @@ void __init files_init(unsigned long mempages) if (files_stat.max_files < NR_FILE) files_stat.max_files = NR_FILE; files_defer_init(); - percpu_counter_init(&nr_files, 0); + percpu_counter_init(&nr_files); } diff --git a/fs/freevxfs/vxfs.h b/fs/freevxfs/vxfs.h index c8a926526..583bd7808 100644 --- a/fs/freevxfs/vxfs.h +++ b/fs/freevxfs/vxfs.h @@ -159,11 +159,11 @@ struct vxfs_sb { * In core superblock filesystem private data for VxFS. */ struct vxfs_sb_info { - struct vxfs_sb *vsi_raw; /* raw (on disk) superblock */ + struct vxfs_sb *vsi_raw; /* raw (on disk) supeblock */ struct buffer_head *vsi_bp; /* buffer for raw superblock*/ struct inode *vsi_fship; /* fileset header inode */ struct inode *vsi_ilist; /* inode list inode */ - struct inode *vsi_stilist; /* structural inode list inode */ + struct inode *vsi_stilist; /* structual inode list inode */ u_long vsi_iext; /* initial inode list */ ino_t vsi_fshino; /* fileset header inode */ daddr_t vsi_oltext; /* OLT extent */ @@ -252,7 +252,7 @@ enum { * Get filesystem private data from VFS inode. */ #define VXFS_INO(ip) \ - ((struct vxfs_inode_info *)(ip)->i_private) + ((struct vxfs_inode_info *)(ip)->u.generic_ip) /* * Get filesystem private data from VFS superblock. diff --git a/fs/freevxfs/vxfs_fshead.c b/fs/freevxfs/vxfs_fshead.c index 78948b4b1..6dee109ae 100644 --- a/fs/freevxfs/vxfs_fshead.c +++ b/fs/freevxfs/vxfs_fshead.c @@ -112,7 +112,7 @@ vxfs_read_fshead(struct super_block *sbp) vip = vxfs_blkiget(sbp, infp->vsi_iext, infp->vsi_fshino); if (!vip) { - printk(KERN_ERR "vxfs: unable to read fsh inode\n"); + printk(KERN_ERR "vxfs: unabled to read fsh inode\n"); return -EINVAL; } if (!VXFS_ISFSH(vip)) { @@ -129,13 +129,13 @@ vxfs_read_fshead(struct super_block *sbp) infp->vsi_fship = vxfs_get_fake_inode(sbp, vip); if (!infp->vsi_fship) { - printk(KERN_ERR "vxfs: unable to get fsh inode\n"); + printk(KERN_ERR "vxfs: unabled to get fsh inode\n"); goto out_free_fship; } sfp = vxfs_getfsh(infp->vsi_fship, 0); if (!sfp) { - printk(KERN_ERR "vxfs: unable to get structural fsh\n"); + printk(KERN_ERR "vxfs: unabled to get structural fsh\n"); goto out_iput_fship; } @@ -145,7 +145,7 @@ vxfs_read_fshead(struct super_block *sbp) pfp = vxfs_getfsh(infp->vsi_fship, 1); if (!pfp) { - printk(KERN_ERR "vxfs: unable to get primary fsh\n"); + printk(KERN_ERR "vxfs: unabled to get primary fsh\n"); goto out_free_sfp; } @@ -159,7 +159,7 @@ vxfs_read_fshead(struct super_block *sbp) infp->vsi_stilist = vxfs_get_fake_inode(sbp, tip); if (!infp->vsi_stilist) { - printk(KERN_ERR "vxfs: unable to get structural list inode\n"); + printk(KERN_ERR "vxfs: unabled to get structual list inode\n"); kfree(tip); goto out_free_pfp; } @@ -174,7 +174,7 @@ vxfs_read_fshead(struct super_block *sbp) goto out_iput_stilist; infp->vsi_ilist = vxfs_get_fake_inode(sbp, tip); if (!infp->vsi_ilist) { - printk(KERN_ERR "vxfs: unable to get inode list inode\n"); + printk(KERN_ERR "vxfs: unabled to get inode list inode\n"); kfree(tip); goto out_iput_stilist; } diff --git a/fs/freevxfs/vxfs_immed.c b/fs/freevxfs/vxfs_immed.c index 4e25f3fbe..6f5df1700 100644 --- a/fs/freevxfs/vxfs_immed.c +++ b/fs/freevxfs/vxfs_immed.c @@ -56,7 +56,7 @@ struct inode_operations vxfs_immed_symlink_iops = { /* * Adress space operations for immed files and directories. */ -const struct address_space_operations vxfs_immed_aops = { +struct address_space_operations vxfs_immed_aops = { .readpage = vxfs_immed_readpage, }; diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c index 4786d51ad..f544aae91 100644 --- a/fs/freevxfs/vxfs_inode.c +++ b/fs/freevxfs/vxfs_inode.c @@ -41,8 +41,8 @@ #include "vxfs_extern.h" -extern const struct address_space_operations vxfs_aops; -extern const struct address_space_operations vxfs_immed_aops; +extern struct address_space_operations vxfs_aops; +extern struct address_space_operations vxfs_immed_aops; extern struct inode_operations vxfs_immed_symlink_iops; @@ -239,10 +239,11 @@ vxfs_iinit(struct inode *ip, struct vxfs_inode_info *vip) ip->i_ctime.tv_nsec = 0; ip->i_mtime.tv_nsec = 0; + ip->i_blksize = PAGE_SIZE; ip->i_blocks = vip->vii_blocks; ip->i_generation = vip->vii_gen; - ip->i_private = vip; + ip->u.generic_ip = (void *)vip; } @@ -294,7 +295,7 @@ vxfs_read_inode(struct inode *ip) { struct super_block *sbp = ip->i_sb; struct vxfs_inode_info *vip; - const struct address_space_operations *aops; + struct address_space_operations *aops; ino_t ino = ip->i_ino; if (!(vip = __vxfs_iget(ino, VXFS_SBI(sbp)->vsi_ilist))) @@ -337,5 +338,5 @@ vxfs_read_inode(struct inode *ip) void vxfs_clear_inode(struct inode *ip) { - kmem_cache_free(vxfs_inode_cachep, ip->i_private); + kmem_cache_free(vxfs_inode_cachep, ip->u.generic_ip); } diff --git a/fs/freevxfs/vxfs_lookup.c b/fs/freevxfs/vxfs_lookup.c index 43886fa00..29cce456c 100644 --- a/fs/freevxfs/vxfs_lookup.c +++ b/fs/freevxfs/vxfs_lookup.c @@ -246,8 +246,6 @@ vxfs_readdir(struct file *fp, void *retp, filldir_t filler) u_long page, npages, block, pblocks, nblocks, offset; loff_t pos; - lock_kernel(); - switch ((long)fp->f_pos) { case 0: if (filler(retp, ".", 1, fp->f_pos, ip->i_ino, DT_DIR) < 0) diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c index 805bbb2e9..50aae7765 100644 --- a/fs/freevxfs/vxfs_subr.c +++ b/fs/freevxfs/vxfs_subr.c @@ -42,7 +42,7 @@ static int vxfs_readpage(struct file *, struct page *); static sector_t vxfs_bmap(struct address_space *, sector_t); -const struct address_space_operations vxfs_aops = { +struct address_space_operations vxfs_aops = { .readpage = vxfs_readpage, .bmap = vxfs_bmap, .sync_page = block_sync_page, @@ -71,14 +71,15 @@ vxfs_get_page(struct address_space *mapping, u_long n) { struct page * pp; - pp = read_mapping_page(mapping, n, NULL); + pp = read_cache_page(mapping, n, + (filler_t*)mapping->a_ops->readpage, NULL); if (!IS_ERR(pp)) { wait_on_page_locked(pp); kmap(pp); if (!PageUptodate(pp)) goto fail; - /** if (!PageFsMisc(pp)) **/ + /** if (!PageChecked(pp)) **/ /** vxfs_check_page(pp); **/ if (PageError(pp)) goto fail; diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c index b74b791fc..b44c916d2 100644 --- a/fs/freevxfs/vxfs_super.c +++ b/fs/freevxfs/vxfs_super.c @@ -40,7 +40,6 @@ #include #include #include -#include #include "vxfs.h" #include "vxfs_extern.h" @@ -56,7 +55,7 @@ MODULE_ALIAS("vxfs"); /* makes mount -t vxfs autoload the module */ static void vxfs_put_super(struct super_block *); -static int vxfs_statfs(struct dentry *, struct kstatfs *); +static int vxfs_statfs(struct super_block *, struct kstatfs *); static int vxfs_remount(struct super_block *, int *, char *); static struct super_operations vxfs_super_ops = { @@ -91,12 +90,12 @@ vxfs_put_super(struct super_block *sbp) /** * vxfs_statfs - get filesystem information - * @dentry: VFS dentry to locate superblock + * @sbp: VFS superblock * @bufp: output buffer * * Description: * vxfs_statfs fills the statfs buffer @bufp with information - * about the filesystem described by @dentry. + * about the filesystem described by @sbp. * * Returns: * Zero. @@ -108,12 +107,12 @@ vxfs_put_super(struct super_block *sbp) * This is everything but complete... */ static int -vxfs_statfs(struct dentry *dentry, struct kstatfs *bufp) +vxfs_statfs(struct super_block *sbp, struct kstatfs *bufp) { - struct vxfs_sb_info *infp = VXFS_SBI(dentry->d_sb); + struct vxfs_sb_info *infp = VXFS_SBI(sbp); bufp->f_type = VXFS_SUPER_MAGIC; - bufp->f_bsize = dentry->d_sb->s_blocksize; + bufp->f_bsize = sbp->s_blocksize; bufp->f_blocks = infp->vsi_raw->vs_dsize; bufp->f_bfree = infp->vsi_raw->vs_free; bufp->f_bavail = 0; @@ -242,11 +241,10 @@ out: /* * The usual module blurb. */ -static int vxfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *vxfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, vxfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, vxfs_fill_super); } static struct file_system_type vxfs_fs_type = { diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 892643dc9..f3fbe2d03 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -461,11 +461,9 @@ void sync_inodes_sb(struct super_block *sb, int wait) { struct writeback_control wbc = { .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_HOLD, - .range_start = 0, - .range_end = LLONG_MAX, }; - unsigned long nr_dirty = global_page_state(NR_FILE_DIRTY); - unsigned long nr_unstable = global_page_state(NR_UNSTABLE_NFS); + unsigned long nr_dirty = read_page_state(nr_dirty); + unsigned long nr_unstable = read_page_state(nr_unstable); wbc.nr_to_write = nr_dirty + nr_unstable + (inodes_stat.nr_inodes - inodes_stat.nr_unused) + @@ -561,8 +559,6 @@ int write_inode_now(struct inode *inode, int sync) struct writeback_control wbc = { .nr_to_write = LONG_MAX, .sync_mode = WB_SYNC_ALL, - .range_start = 0, - .range_end = LLONG_MAX, }; if (!mapping_cap_writeback_dirty(inode->i_mapping)) @@ -623,6 +619,7 @@ int generic_osync_inode(struct inode *inode, struct address_space *mapping, int int need_write_inode_now = 0; int err2; + current->flags |= PF_SYNCWRITE; if (what & OSYNC_DATA) err = filemap_fdatawrite(mapping); if (what & (OSYNC_METADATA|OSYNC_DATA)) { @@ -635,6 +632,7 @@ int generic_osync_inode(struct inode *inode, struct address_space *mapping, int if (!err) err = err2; } + current->flags &= ~PF_SYNCWRITE; spin_lock(&inode_lock); if ((inode->i_state & I_DIRTY) && diff --git a/fs/fscache/Makefile b/fs/fscache/Makefile deleted file mode 100644 index 10f17a38f..000000000 --- a/fs/fscache/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# -# Makefile for general filesystem caching code -# - -fscache-objs := \ - cookie.o \ - fsdef.o \ - main.o \ - page.o - -obj-$(CONFIG_FSCACHE) := fscache.o diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c deleted file mode 100644 index 9a6ac8b70..000000000 --- a/fs/fscache/cookie.c +++ /dev/null @@ -1,1045 +0,0 @@ -/* cookie.c: general filesystem cache cookie management - * - * Copyright (C) 2004-5 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#include -#include "fscache-int.h" - -static LIST_HEAD(fscache_cache_tag_list); -static LIST_HEAD(fscache_cache_list); -static LIST_HEAD(fscache_netfs_list); -static DECLARE_RWSEM(fscache_addremove_sem); -static struct fscache_cache_tag fscache_nomem_tag; - -kmem_cache_t *fscache_cookie_jar; - -static void fscache_withdraw_object(struct fscache_cache *cache, - struct fscache_object *object); - -static void __fscache_cookie_put(struct fscache_cookie *cookie); - -static inline void fscache_cookie_put(struct fscache_cookie *cookie) -{ - /* check to see whether the cookie has already been released by looking - * for the poison when slab debugging is on */ -#ifdef CONFIG_DEBUG_SLAB - BUG_ON((atomic_read(&cookie->usage) & 0xffff0000) == 0x6b6b0000); -#endif - - BUG_ON(atomic_read(&cookie->usage) <= 0); - - if (atomic_dec_and_test(&cookie->usage)) - __fscache_cookie_put(cookie); - -} - -/*****************************************************************************/ -/* - * look up a cache tag - */ -struct fscache_cache_tag *__fscache_lookup_cache_tag(const char *name) -{ - struct fscache_cache_tag *tag, *xtag; - - /* firstly check for the existence of the tag under read lock */ - down_read(&fscache_addremove_sem); - - list_for_each_entry(tag, &fscache_cache_tag_list, link) { - if (strcmp(tag->name, name) == 0) { - atomic_inc(&tag->usage); - up_read(&fscache_addremove_sem); - return tag; - } - } - - up_read(&fscache_addremove_sem); - - /* the tag does not exist - create a candidate */ - xtag = kmalloc(sizeof(*xtag) + strlen(name) + 1, GFP_KERNEL); - if (!xtag) - /* return a dummy tag if out of memory */ - return &fscache_nomem_tag; - - atomic_set(&xtag->usage, 1); - strcpy(xtag->name, name); - - /* write lock, search again and add if still not present */ - down_write(&fscache_addremove_sem); - - list_for_each_entry(tag, &fscache_cache_tag_list, link) { - if (strcmp(tag->name, name) == 0) { - atomic_inc(&tag->usage); - up_write(&fscache_addremove_sem); - kfree(xtag); - return tag; - } - } - - list_add_tail(&xtag->link, &fscache_cache_tag_list); - up_write(&fscache_addremove_sem); - return xtag; -} - -/*****************************************************************************/ -/* - * release a reference to a cache tag - */ -void __fscache_release_cache_tag(struct fscache_cache_tag *tag) -{ - if (tag != &fscache_nomem_tag) { - down_write(&fscache_addremove_sem); - - if (atomic_dec_and_test(&tag->usage)) - list_del_init(&tag->link); - else - tag = NULL; - - up_write(&fscache_addremove_sem); - - kfree(tag); - } -} - -/*****************************************************************************/ -/* - * register a network filesystem for caching - */ -int __fscache_register_netfs(struct fscache_netfs *netfs) -{ - struct fscache_netfs *ptr; - int ret; - - _enter("{%s}", netfs->name); - - INIT_LIST_HEAD(&netfs->link); - - /* allocate a cookie for the primary index */ - netfs->primary_index = - kmem_cache_zalloc(fscache_cookie_jar, SLAB_KERNEL); - - if (!netfs->primary_index) { - _leave(" = -ENOMEM"); - return -ENOMEM; - } - - /* initialise the primary index cookie */ - atomic_set(&netfs->primary_index->usage, 1); - atomic_set(&netfs->primary_index->children, 0); - - netfs->primary_index->def = &fscache_fsdef_netfs_def; - netfs->primary_index->parent = &fscache_fsdef_index; - netfs->primary_index->netfs = netfs; - netfs->primary_index->netfs_data = netfs; - - atomic_inc(&netfs->primary_index->parent->usage); - atomic_inc(&netfs->primary_index->parent->children); - - init_rwsem(&netfs->primary_index->sem); - INIT_HLIST_HEAD(&netfs->primary_index->backing_objects); - - /* check the netfs type is not already present */ - down_write(&fscache_addremove_sem); - - ret = -EEXIST; - list_for_each_entry(ptr, &fscache_netfs_list, link) { - if (strcmp(ptr->name, netfs->name) == 0) - goto already_registered; - } - - list_add(&netfs->link, &fscache_netfs_list); - ret = 0; - - printk("FS-Cache: netfs '%s' registered for caching\n", netfs->name); - -already_registered: - up_write(&fscache_addremove_sem); - - if (ret < 0) { - netfs->primary_index->parent = NULL; - __fscache_cookie_put(netfs->primary_index); - netfs->primary_index = NULL; - } - - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_register_netfs); - -/*****************************************************************************/ -/* - * unregister a network filesystem from the cache - * - all cookies must have been released first - */ -void __fscache_unregister_netfs(struct fscache_netfs *netfs) -{ - _enter("{%s.%u}", netfs->name, netfs->version); - - down_write(&fscache_addremove_sem); - - list_del(&netfs->link); - fscache_relinquish_cookie(netfs->primary_index, 0); - - up_write(&fscache_addremove_sem); - - printk("FS-Cache: netfs '%s' unregistered from caching\n", - netfs->name); - - _leave(""); -} - -EXPORT_SYMBOL(__fscache_unregister_netfs); - -/*****************************************************************************/ -/* - * initialise a cache record - */ -void fscache_init_cache(struct fscache_cache *cache, - struct fscache_cache_ops *ops, - const char *idfmt, - ...) -{ - va_list va; - - memset(cache, 0, sizeof(*cache)); - - cache->ops = ops; - - va_start(va, idfmt); - vsnprintf(cache->identifier, sizeof(cache->identifier), idfmt, va); - va_end(va); - - INIT_LIST_HEAD(&cache->link); - INIT_LIST_HEAD(&cache->object_list); - spin_lock_init(&cache->object_list_lock); - init_rwsem(&cache->withdrawal_sem); -} - -EXPORT_SYMBOL(fscache_init_cache); - -/*****************************************************************************/ -/* - * declare a mounted cache as being open for business - */ -int fscache_add_cache(struct fscache_cache *cache, - struct fscache_object *ifsdef, - const char *tagname) -{ - struct fscache_cache_tag *tag; - - BUG_ON(!cache->ops); - BUG_ON(!ifsdef); - - cache->flags = 0; - - if (!tagname) - tagname = cache->identifier; - - BUG_ON(!tagname[0]); - - _enter("{%s.%s},,%s", cache->ops->name, cache->identifier, tagname); - - if (!cache->ops->grab_object(ifsdef)) - BUG(); - - ifsdef->cookie = &fscache_fsdef_index; - ifsdef->cache = cache; - cache->fsdef = ifsdef; - - down_write(&fscache_addremove_sem); - - /* instantiate or allocate a cache tag */ - list_for_each_entry(tag, &fscache_cache_tag_list, link) { - if (strcmp(tag->name, tagname) == 0) { - if (tag->cache) { - printk(KERN_ERR - "FS-Cache: cache tag '%s' already in use\n", - tagname); - up_write(&fscache_addremove_sem); - return -EEXIST; - } - - atomic_inc(&tag->usage); - goto found_cache_tag; - } - } - - tag = kmalloc(sizeof(*tag) + strlen(tagname) + 1, GFP_KERNEL); - if (!tag) { - up_write(&fscache_addremove_sem); - return -ENOMEM; - } - - atomic_set(&tag->usage, 1); - strcpy(tag->name, tagname); - list_add_tail(&tag->link, &fscache_cache_tag_list); - -found_cache_tag: - tag->cache = cache; - cache->tag = tag; - - /* add the cache to the list */ - list_add(&cache->link, &fscache_cache_list); - - /* add the cache's netfs definition index object to the cache's - * list */ - spin_lock(&cache->object_list_lock); - list_add_tail(&ifsdef->cache_link, &cache->object_list); - spin_unlock(&cache->object_list_lock); - - /* add the cache's netfs definition index object to the top level index - * cookie as a known backing object */ - down_write(&fscache_fsdef_index.sem); - - hlist_add_head(&ifsdef->cookie_link, - &fscache_fsdef_index.backing_objects); - - atomic_inc(&fscache_fsdef_index.usage); - - /* done */ - up_write(&fscache_fsdef_index.sem); - up_write(&fscache_addremove_sem); - - printk(KERN_NOTICE - "FS-Cache: Cache \"%s\" added (type %s)\n", - cache->tag->name, cache->ops->name); - - _leave(" = 0 [%s]", cache->identifier); - return 0; -} - -EXPORT_SYMBOL(fscache_add_cache); - -/*****************************************************************************/ -/* - * note a cache I/O error - */ -void fscache_io_error(struct fscache_cache *cache) -{ - set_bit(FSCACHE_IOERROR, &cache->flags); - - printk(KERN_ERR "FS-Cache: Cache %s stopped due to I/O error\n", - cache->ops->name); -} - -EXPORT_SYMBOL(fscache_io_error); - -/*****************************************************************************/ -/* - * withdraw an unmounted cache from the active service - */ -void fscache_withdraw_cache(struct fscache_cache *cache) -{ - struct fscache_object *object; - - _enter(""); - - printk(KERN_NOTICE - "FS-Cache: Withdrawing cache \"%s\"\n", - cache->tag->name); - - /* make the cache unavailable for cookie acquisition */ - down_write(&cache->withdrawal_sem); - - down_write(&fscache_addremove_sem); - list_del_init(&cache->link); - cache->tag->cache = NULL; - up_write(&fscache_addremove_sem); - - /* mark all objects as being withdrawn */ - spin_lock(&cache->object_list_lock); - list_for_each_entry(object, &cache->object_list, cache_link) { - set_bit(FSCACHE_OBJECT_WITHDRAWN, &object->flags); - } - spin_unlock(&cache->object_list_lock); - - /* make sure all pages pinned by operations on behalf of the netfs are - * written to disc */ - cache->ops->sync_cache(cache); - - /* dissociate all the netfs pages backed by this cache from the block - * mappings in the cache */ - cache->ops->dissociate_pages(cache); - - /* we now have to destroy all the active objects pertaining to this - * cache */ - spin_lock(&cache->object_list_lock); - - while (!list_empty(&cache->object_list)) { - object = list_entry(cache->object_list.next, - struct fscache_object, cache_link); - list_del_init(&object->cache_link); - spin_unlock(&cache->object_list_lock); - - _debug("withdraw %p", object->cookie); - - /* we've extracted an active object from the tree - now dispose - * of it */ - fscache_withdraw_object(cache, object); - - spin_lock(&cache->object_list_lock); - } - - spin_unlock(&cache->object_list_lock); - - fscache_release_cache_tag(cache->tag); - cache->tag = NULL; - - _leave(""); -} - -EXPORT_SYMBOL(fscache_withdraw_cache); - -/*****************************************************************************/ -/* - * withdraw an object from active service at the behest of the cache - * - need break the links to a cached object cookie - * - called under two situations: - * (1) recycler decides to reclaim an in-use object - * (2) a cache is unmounted - * - have to take care as the cookie can be being relinquished by the netfs - * simultaneously - * - the active object is pinned by the caller holding a refcount on it - */ -static void fscache_withdraw_object(struct fscache_cache *cache, - struct fscache_object *object) -{ - struct fscache_cookie *cookie, *xcookie = NULL; - - _enter(",%p", object); - - /* first of all we have to break the links between the object and the - * cookie - * - we have to hold both semaphores BUT we have to get the cookie sem - * FIRST - */ - cache->ops->lock_object(object); - - cookie = object->cookie; - if (cookie) { - /* pin the cookie so that is doesn't escape */ - atomic_inc(&cookie->usage); - - /* re-order the locks to avoid deadlock */ - cache->ops->unlock_object(object); - down_write(&cookie->sem); - cache->ops->lock_object(object); - - /* erase references from the object to the cookie */ - hlist_del_init(&object->cookie_link); - - xcookie = object->cookie; - object->cookie = NULL; - - up_write(&cookie->sem); - } - - cache->ops->unlock_object(object); - - /* we've broken the links between cookie and object */ - if (xcookie) { - fscache_cookie_put(xcookie); - cache->ops->put_object(object); - } - - /* unpin the cookie */ - if (cookie) { - if (cookie->def && cookie->def->now_uncached) - cookie->def->now_uncached(cookie->netfs_data); - fscache_cookie_put(cookie); - } - - _leave(""); -} - -/*****************************************************************************/ -/* - * select a cache on which to store an object - * - the cache addremove semaphore must be at least read-locked by the caller - * - the object will never be an index - */ -static struct fscache_cache *fscache_select_cache_for_object(struct fscache_cookie *cookie) -{ - struct fscache_cache_tag *tag; - struct fscache_object *object; - struct fscache_cache *cache; - - _enter(""); - - if (list_empty(&fscache_cache_list)) { - _leave(" = NULL [no cache]"); - return NULL; - } - - /* we check the parent to determine the cache to use */ - down_read(&cookie->parent->sem); - - /* the first in the parent's backing list should be the preferred - * cache */ - if (!hlist_empty(&cookie->parent->backing_objects)) { - object = hlist_entry(cookie->parent->backing_objects.first, - struct fscache_object, cookie_link); - - cache = object->cache; - if (test_bit(FSCACHE_IOERROR, &cache->flags)) - cache = NULL; - - up_read(&cookie->parent->sem); - _leave(" = %p [parent]", cache); - return cache; - } - - /* the parent is unbacked */ - if (cookie->parent->def->type != FSCACHE_COOKIE_TYPE_INDEX) { - /* parent not an index and is unbacked */ - up_read(&cookie->parent->sem); - _leave(" = NULL [parent ubni]"); - return NULL; - } - - up_read(&cookie->parent->sem); - - if (!cookie->parent->def->select_cache) - goto no_preference; - - /* ask the netfs for its preference */ - tag = cookie->parent->def->select_cache( - cookie->parent->parent->netfs_data, - cookie->parent->netfs_data); - - if (!tag) - goto no_preference; - - if (tag == &fscache_nomem_tag) { - _leave(" = NULL [nomem tag]"); - return NULL; - } - - if (!tag->cache) { - _leave(" = NULL [unbacked tag]"); - return NULL; - } - - if (test_bit(FSCACHE_IOERROR, &tag->cache->flags)) - return NULL; - - _leave(" = %p [specific]", tag->cache); - return tag->cache; - -no_preference: - /* netfs has no preference - just select first cache */ - cache = list_entry(fscache_cache_list.next, - struct fscache_cache, link); - _leave(" = %p [first]", cache); - return cache; -} - -/*****************************************************************************/ -/* - * get a backing object for a cookie from the chosen cache - * - the cookie must be write-locked by the caller - * - all parent indexes will be obtained recursively first - */ -static struct fscache_object *fscache_lookup_object(struct fscache_cookie *cookie, - struct fscache_cache *cache) -{ - struct fscache_cookie *parent = cookie->parent; - struct fscache_object *pobject, *object; - struct hlist_node *_p; - - _enter("{%s/%s},", - parent && parent->def ? parent->def->name : "", - cookie->def ? (char *) cookie->def->name : ""); - - if (test_bit(FSCACHE_IOERROR, &cache->flags)) - return NULL; - - /* see if we have the backing object for this cookie + cache immediately - * to hand - */ - object = NULL; - hlist_for_each_entry(object, _p, - &cookie->backing_objects, cookie_link - ) { - if (object->cache == cache) - break; - } - - if (object) { - _leave(" = %p [old]", object); - return object; - } - - BUG_ON(!parent); /* FSDEF entries don't have a parent */ - - /* we don't have a backing cookie, so we need to consult the object's - * parent index in the selected cache and maybe insert an entry - * therein; so the first thing to do is make sure that the parent index - * is represented on disc - */ - down_read(&parent->sem); - - pobject = NULL; - hlist_for_each_entry(pobject, _p, - &parent->backing_objects, cookie_link - ) { - if (pobject->cache == cache) - break; - } - - if (!pobject) { - /* we don't know about the parent object */ - up_read(&parent->sem); - down_write(&parent->sem); - - pobject = fscache_lookup_object(parent, cache); - if (IS_ERR(pobject)) { - up_write(&parent->sem); - _leave(" = %ld [no ipobj]", PTR_ERR(pobject)); - return pobject; - } - - _debug("pobject=%p", pobject); - - BUG_ON(pobject->cookie != parent); - - downgrade_write(&parent->sem); - } - - /* now we can attempt to look up this object in the parent, possibly - * creating a representation on disc when we do so - */ - object = cache->ops->lookup_object(cache, pobject, cookie); - up_read(&parent->sem); - - if (IS_ERR(object)) { - _leave(" = %ld [no obj]", PTR_ERR(object)); - return object; - } - - /* keep track of it */ - cache->ops->lock_object(object); - - BUG_ON(!hlist_unhashed(&object->cookie_link)); - - /* attach to the cache's object list */ - if (list_empty(&object->cache_link)) { - spin_lock(&cache->object_list_lock); - list_add(&object->cache_link, &cache->object_list); - spin_unlock(&cache->object_list_lock); - } - - /* attach to the cookie */ - object->cookie = cookie; - atomic_inc(&cookie->usage); - hlist_add_head(&object->cookie_link, &cookie->backing_objects); - - /* done */ - cache->ops->unlock_object(object); - _leave(" = %p [new]", object); - return object; -} - -/*****************************************************************************/ -/* - * request a cookie to represent an object (index, datafile, xattr, etc) - * - parent specifies the parent object - * - the top level index cookie for each netfs is stored in the fscache_netfs - * struct upon registration - * - idef points to the definition - * - the netfs_data will be passed to the functions pointed to in *def - * - all attached caches will be searched to see if they contain this object - * - index objects aren't stored on disk until there's a dependent file that - * needs storing - * - other objects are stored in a selected cache immediately, and all the - * indexes forming the path to it are instantiated if necessary - * - we never let on to the netfs about errors - * - we may set a negative cookie pointer, but that's okay - */ -struct fscache_cookie *__fscache_acquire_cookie(struct fscache_cookie *parent, - struct fscache_cookie_def *def, - void *netfs_data) -{ - struct fscache_cookie *cookie; - struct fscache_cache *cache; - struct fscache_object *object; - int ret = 0; - - BUG_ON(!def); - - _enter("{%s},{%s},%p", - parent ? (char *) parent->def->name : "", - def->name, netfs_data); - - /* if there's no parent cookie, then we don't create one here either */ - if (!parent) { - _leave(" [no parent]"); - return NULL; - } - - /* validate the definition */ - BUG_ON(!def->get_key); - BUG_ON(!def->name[0]); - - BUG_ON(def->type == FSCACHE_COOKIE_TYPE_INDEX && - parent->def->type != FSCACHE_COOKIE_TYPE_INDEX); - - /* allocate and initialise a cookie */ - cookie = kmem_cache_alloc(fscache_cookie_jar, SLAB_KERNEL); - if (!cookie) { - _leave(" [ENOMEM]"); - return NULL; - } - - atomic_set(&cookie->usage, 1); - atomic_set(&cookie->children, 0); - - atomic_inc(&parent->usage); - atomic_inc(&parent->children); - - cookie->def = def; - cookie->parent = parent; - cookie->netfs = parent->netfs; - cookie->netfs_data = netfs_data; - - /* now we need to see whether the backing objects for this cookie yet - * exist, if not there'll be nothing to search */ - down_read(&fscache_addremove_sem); - - if (list_empty(&fscache_cache_list)) { - up_read(&fscache_addremove_sem); - _leave(" = %p [no caches]", cookie); - return cookie; - } - - /* if the object is an index then we need do nothing more here - we - * create indexes on disk when we need them as an index may exist in - * multiple caches */ - if (cookie->def->type != FSCACHE_COOKIE_TYPE_INDEX) { - down_write(&cookie->sem); - - /* the object is a file - we need to select a cache in which to - * store it */ - cache = fscache_select_cache_for_object(cookie); - if (!cache) - goto no_cache; /* couldn't decide on a cache */ - - /* create a file index entry on disc, along with all the - * indexes required to find it again later */ - object = fscache_lookup_object(cookie, cache); - if (IS_ERR(object)) { - ret = PTR_ERR(object); - goto error; - } - - up_write(&cookie->sem); - } -out: - up_read(&fscache_addremove_sem); - _leave(" = %p", cookie); - return cookie; - -no_cache: - ret = -ENOMEDIUM; - goto error_cleanup; -error: - printk(KERN_ERR "FS-Cache: error from cache: %d\n", ret); -error_cleanup: - if (cookie) { - up_write(&cookie->sem); - __fscache_cookie_put(cookie); - cookie = NULL; - atomic_dec(&parent->children); - } - - goto out; -} - -EXPORT_SYMBOL(__fscache_acquire_cookie); - -/*****************************************************************************/ -/* - * release a cookie back to the cache - * - the object will be marked as recyclable on disc if retire is true - * - all dependents of this cookie must have already been unregistered - * (indexes/files/pages) - */ -void __fscache_relinquish_cookie(struct fscache_cookie *cookie, int retire) -{ - struct fscache_cache *cache; - struct fscache_object *object; - struct hlist_node *_p; - - if (!cookie) { - _leave(" [no cookie]"); - return; - } - - _enter("%p{%s},%d", cookie, cookie->def->name, retire); - - if (atomic_read(&cookie->children) != 0) { - printk("FS-Cache: cookie still has children\n"); - BUG(); - } - - /* detach pointers back to the netfs */ - down_write(&cookie->sem); - - cookie->netfs_data = NULL; - cookie->def = NULL; - - /* mark retired objects for recycling */ - if (retire) { - hlist_for_each_entry(object, _p, - &cookie->backing_objects, - cookie_link - ) { - set_bit(FSCACHE_OBJECT_RECYCLING, &object->flags); - } - } - - /* break links with all the active objects */ - while (!hlist_empty(&cookie->backing_objects)) { - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, - cookie_link); - - /* detach each cache object from the object cookie */ - set_bit(FSCACHE_OBJECT_RELEASING, &object->flags); - - hlist_del_init(&object->cookie_link); - - cache = object->cache; - cache->ops->lock_object(object); - object->cookie = NULL; - cache->ops->unlock_object(object); - - if (atomic_dec_and_test(&cookie->usage)) - /* the cookie refcount shouldn't be reduced to 0 yet */ - BUG(); - - spin_lock(&cache->object_list_lock); - list_del_init(&object->cache_link); - spin_unlock(&cache->object_list_lock); - - cache->ops->put_object(object); - } - - up_write(&cookie->sem); - - if (cookie->parent) { -#ifdef CONFIG_DEBUG_SLAB - BUG_ON((atomic_read(&cookie->parent->children) & 0xffff0000) == 0x6b6b0000); -#endif - atomic_dec(&cookie->parent->children); - } - - /* finally dispose of the cookie */ - fscache_cookie_put(cookie); - - _leave(""); -} - -EXPORT_SYMBOL(__fscache_relinquish_cookie); - -/*****************************************************************************/ -/* - * update the index entries backing a cookie - */ -void __fscache_update_cookie(struct fscache_cookie *cookie) -{ - struct fscache_object *object; - struct hlist_node *_p; - - if (!cookie) { - _leave(" [no cookie]"); - return; - } - - _enter("{%s}", cookie->def->name); - - BUG_ON(!cookie->def->get_aux); - - down_write(&cookie->sem); - down_read(&cookie->parent->sem); - - /* update the index entry on disc in each cache backing this cookie */ - hlist_for_each_entry(object, _p, - &cookie->backing_objects, cookie_link - ) { - if (!test_bit(FSCACHE_IOERROR, &object->cache->flags)) - object->cache->ops->update_object(object); - } - - up_read(&cookie->parent->sem); - up_write(&cookie->sem); - _leave(""); -} - -EXPORT_SYMBOL(__fscache_update_cookie); - -/*****************************************************************************/ -/* - * destroy a cookie - */ -static void __fscache_cookie_put(struct fscache_cookie *cookie) -{ - struct fscache_cookie *parent; - - _enter("%p", cookie); - - for (;;) { - parent = cookie->parent; - BUG_ON(!hlist_empty(&cookie->backing_objects)); - kmem_cache_free(fscache_cookie_jar, cookie); - - if (!parent) - break; - - cookie = parent; - BUG_ON(atomic_read(&cookie->usage) <= 0); - if (!atomic_dec_and_test(&cookie->usage)) - break; - } - - _leave(""); -} - -/*****************************************************************************/ -/* - * initialise an cookie jar slab element prior to any use - */ -void fscache_cookie_init_once(void *_cookie, kmem_cache_t *cachep, - unsigned long flags) -{ - struct fscache_cookie *cookie = _cookie; - - if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == - SLAB_CTOR_CONSTRUCTOR) { - memset(cookie, 0, sizeof(*cookie)); - init_rwsem(&cookie->sem); - INIT_HLIST_HEAD(&cookie->backing_objects); - } -} - -/*****************************************************************************/ -/* - * pin an object into the cache - */ -int __fscache_pin_cookie(struct fscache_cookie *cookie) -{ - struct fscache_object *object; - int ret; - - _enter("%p", cookie); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" = -ENOBUFS"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it and exclude - * read and write attempts on pages - */ - down_write(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - if (!object->cache->ops->pin_object) { - ret = -EOPNOTSUPP; - goto out; - } - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->pin_object(object); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_write(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_pin_cookie); - -/*****************************************************************************/ -/* - * unpin an object into the cache - */ -void __fscache_unpin_cookie(struct fscache_cookie *cookie) -{ - struct fscache_object *object; - int ret; - - _enter("%p", cookie); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" [no obj]"); - return; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it and exclude - * read and write attempts on pages - */ - down_write(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and unpin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - if (!object->cache->ops->unpin_object) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - object->cache->ops->unpin_object(object); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_write(&cookie->sem); - _leave(""); -} - -EXPORT_SYMBOL(__fscache_unpin_cookie); diff --git a/fs/fscache/fscache-int.h b/fs/fscache/fscache-int.h deleted file mode 100644 index d075660c4..000000000 --- a/fs/fscache/fscache-int.h +++ /dev/null @@ -1,93 +0,0 @@ -/* fscache-int.h: internal definitions - * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#ifndef _FSCACHE_INT_H -#define _FSCACHE_INT_H - -#include -#include -#include - -extern kmem_cache_t *fscache_cookie_jar; - -extern struct fscache_cookie fscache_fsdef_index; -extern struct fscache_cookie_def fscache_fsdef_netfs_def; - -extern void fscache_cookie_init_once(void *_cookie, kmem_cache_t *cachep, unsigned long flags); - -/* - * prevent the cache from being withdrawn whilst an operation is in progress - * - returns false if the cache is being withdrawn already or if the cache is - * waiting to withdraw itself - * - returns true if the cache was not being withdrawn - * - fscache_withdraw_cache() will wait using down_write() until all ops are - * complete - */ -static inline int fscache_operation_lock(struct fscache_object *object) -{ - return down_read_trylock(&object->cache->withdrawal_sem); -} - -/* - * release the operation lock - */ -static inline void fscache_operation_unlock(struct fscache_object *object) -{ - up_read(&object->cache->withdrawal_sem); -} - - -/*****************************************************************************/ -/* - * debug tracing - */ -#define dbgprintk(FMT,...) \ - printk("[%-6.6s] "FMT"\n",current->comm ,##__VA_ARGS__) -#define _dbprintk(FMT,...) do { } while(0) - -#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__) -#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__) -#define kdebug(FMT,...) dbgprintk(FMT ,##__VA_ARGS__) - -#define kjournal(FMT,...) _dbprintk(FMT ,##__VA_ARGS__) - -#define dbgfree(ADDR) _dbprintk("%p:%d: FREEING %p",__FILE__,__LINE__,ADDR) - -#define dbgpgalloc(PAGE) \ -do { \ - _dbprintk("PGALLOC %s:%d: %p {%lx,%lu}\n", \ - __FILE__,__LINE__, \ - (PAGE),(PAGE)->mapping->host->i_ino,(PAGE)->index \ - ); \ -} while(0) - -#define dbgpgfree(PAGE) \ -do { \ - if ((PAGE)) \ - _dbprintk("PGFREE %s:%d: %p {%lx,%lu}\n", \ - __FILE__,__LINE__, \ - (PAGE), \ - (PAGE)->mapping->host->i_ino, \ - (PAGE)->index \ - ); \ -} while(0) - -#ifdef __KDEBUG -#define _enter(FMT,...) kenter(FMT,##__VA_ARGS__) -#define _leave(FMT,...) kleave(FMT,##__VA_ARGS__) -#define _debug(FMT,...) kdebug(FMT,##__VA_ARGS__) -#else -#define _enter(FMT,...) do { } while(0) -#define _leave(FMT,...) do { } while(0) -#define _debug(FMT,...) do { } while(0) -#endif - -#endif /* _FSCACHE_INT_H */ diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c deleted file mode 100644 index 495f63355..000000000 --- a/fs/fscache/fsdef.c +++ /dev/null @@ -1,110 +0,0 @@ -/* fsdef.c: filesystem index definition - * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#include -#include "fscache-int.h" - -static uint16_t fscache_fsdef_netfs_get_key(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax); - -static uint16_t fscache_fsdef_netfs_get_aux(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax); - -static fscache_checkaux_t fscache_fsdef_netfs_check_aux(void *cookie_netfs_data, - const void *data, - uint16_t datalen); - -struct fscache_cookie_def fscache_fsdef_netfs_def = { - .name = "FSDEF.netfs", - .type = FSCACHE_COOKIE_TYPE_INDEX, - .get_key = fscache_fsdef_netfs_get_key, - .get_aux = fscache_fsdef_netfs_get_aux, - .check_aux = fscache_fsdef_netfs_check_aux, -}; - -struct fscache_cookie fscache_fsdef_index = { - .usage = ATOMIC_INIT(1), - .def = NULL, - .sem = __RWSEM_INITIALIZER(fscache_fsdef_index.sem), - .backing_objects = HLIST_HEAD_INIT, -}; - -EXPORT_SYMBOL(fscache_fsdef_index); - -/*****************************************************************************/ -/* - * get the key data for an FSDEF index record - */ -static uint16_t fscache_fsdef_netfs_get_key(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax) -{ - const struct fscache_netfs *netfs = cookie_netfs_data; - unsigned klen; - - _enter("{%s.%u},", netfs->name, netfs->version); - - klen = strlen(netfs->name); - if (klen > bufmax) - return 0; - - memcpy(buffer, netfs->name, klen); - return klen; -} - -/*****************************************************************************/ -/* - * get the auxilliary data for an FSDEF index record - */ -static uint16_t fscache_fsdef_netfs_get_aux(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax) -{ - const struct fscache_netfs *netfs = cookie_netfs_data; - unsigned dlen; - - _enter("{%s.%u},", netfs->name, netfs->version); - - dlen = sizeof(uint32_t); - if (dlen > bufmax) - return 0; - - memcpy(buffer, &netfs->version, dlen); - return dlen; -} - -/*****************************************************************************/ -/* - * check that the version stored in the auxilliary data is correct - */ -static fscache_checkaux_t fscache_fsdef_netfs_check_aux(void *cookie_netfs_data, - const void *data, - uint16_t datalen) -{ - struct fscache_netfs *netfs = cookie_netfs_data; - uint32_t version; - - _enter("{%s},,%hu", netfs->name, datalen); - - if (datalen != sizeof(version)) { - _leave(" = OBSOLETE [dl=%d v=%d]", - datalen, sizeof(version)); - return FSCACHE_CHECKAUX_OBSOLETE; - } - - memcpy(&version, data, sizeof(version)); - if (version != netfs->version) { - _leave(" = OBSOLETE [ver=%x net=%x]", - version, netfs->version); - return FSCACHE_CHECKAUX_OBSOLETE; - } - - _leave(" = OKAY"); - return FSCACHE_CHECKAUX_OKAY; -} diff --git a/fs/fscache/main.c b/fs/fscache/main.c deleted file mode 100644 index d73068cb0..000000000 --- a/fs/fscache/main.c +++ /dev/null @@ -1,105 +0,0 @@ -/* main.c: general filesystem caching manager - * - * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#include -#include -#include -#include -#include -#include "fscache-int.h" - -int fscache_debug; - -static int fscache_init(void); -static void fscache_exit(void); - -fs_initcall(fscache_init); -module_exit(fscache_exit); - -MODULE_DESCRIPTION("FS Cache Manager"); -MODULE_AUTHOR("Red Hat, Inc."); -MODULE_LICENSE("GPL"); - -static void fscache_ktype_release(struct kobject *kobject); - -static struct sysfs_ops fscache_sysfs_ops = { - .show = NULL, - .store = NULL, -}; - -static struct kobj_type fscache_ktype = { - .release = fscache_ktype_release, - .sysfs_ops = &fscache_sysfs_ops, - .default_attrs = NULL, -}; - -struct kset fscache_kset = { - .kobj.name = "fscache", - .kobj.kset = &fs_subsys.kset, - .ktype = &fscache_ktype, -}; - -EXPORT_SYMBOL(fscache_kset); - -/*****************************************************************************/ -/* - * initialise the fs caching module - */ -static int __init fscache_init(void) -{ - int ret; - - fscache_cookie_jar = - kmem_cache_create("fscache_cookie_jar", - sizeof(struct fscache_cookie), - 0, - 0, - fscache_cookie_init_once, - NULL); - - if (!fscache_cookie_jar) { - printk(KERN_NOTICE - "FS-Cache: Failed to allocate a cookie jar\n"); - return -ENOMEM; - } - - ret = kset_register(&fscache_kset); - if (ret < 0) { - kmem_cache_destroy(fscache_cookie_jar); - return ret; - } - - printk(KERN_NOTICE "FS-Cache: Loaded\n"); - return 0; - -} - -/*****************************************************************************/ -/* - * clean up on module removal - */ -static void __exit fscache_exit(void) -{ - _enter(""); - - kset_unregister(&fscache_kset); - kmem_cache_destroy(fscache_cookie_jar); - printk(KERN_NOTICE "FS-Cache: unloaded\n"); - -} - -/*****************************************************************************/ -/* - * release the ktype - */ -static void fscache_ktype_release(struct kobject *kobject) -{ -} diff --git a/fs/fscache/page.c b/fs/fscache/page.c deleted file mode 100644 index fbb771606..000000000 --- a/fs/fscache/page.c +++ /dev/null @@ -1,537 +0,0 @@ -/* page.c: general filesystem cache cookie management - * - * Copyright (C) 2004-5 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#include -#include -#include -#include -#include "fscache-int.h" - -/*****************************************************************************/ -/* - * set the data file size on an object in the cache - */ -int __fscache_set_i_size(struct fscache_cookie *cookie, loff_t i_size) -{ - struct fscache_object *object; - int ret; - - _enter("%p,%llu,", cookie, i_size); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" = -ENOBUFS"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it and exclude - * read and write attempts on pages - */ - down_write(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (object->cache->ops->set_i_size && - fscache_operation_lock(object) - ) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->set_i_size(object, - i_size); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_write(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_set_i_size); - -/*****************************************************************************/ -/* - * reserve space for an object - */ -int __fscache_reserve_space(struct fscache_cookie *cookie, loff_t size) -{ - struct fscache_object *object; - int ret; - - _enter("%p,%llu,", cookie, size); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" = -ENOBUFS"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it and exclude - * read and write attempts on pages - */ - down_write(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - if (!object->cache->ops->reserve_space) { - ret = -EOPNOTSUPP; - goto out; - } - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->reserve_space(object, - size); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_write(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_reserve_space); - -/*****************************************************************************/ -/* - * read a page from the cache or allocate a block in which to store it - * - we return: - * -ENOMEM - out of memory, nothing done - * -EINTR - interrupted - * -ENOBUFS - no backing object available in which to cache the block - * -ENODATA - no data available in the backing object for this block - * 0 - dispatched a read - it'll call end_io_func() when finished - */ -int __fscache_read_or_alloc_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ - struct fscache_object *object; - int ret; - - _enter("%p,{%lu},", cookie, page->index); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" -ENOBUFS [no backing objects]"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it */ - down_read(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->read_or_alloc_page( - object, - page, - end_io_func, - context, - gfp); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_read(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_read_or_alloc_page); - -/*****************************************************************************/ -/* - * read a list of page from the cache or allocate a block in which to store - * them - * - we return: - * -ENOMEM - out of memory, some pages may be being read - * -EINTR - interrupted, some pages may be being read - * -ENOBUFS - no backing object or space available in which to cache any - * pages not being read - * -ENODATA - no data available in the backing object for some or all of - * the pages - * 0 - dispatched a read on all pages - * - * end_io_func() will be called for each page read from the cache as it is - * finishes being read - * - * any pages for which a read is dispatched will be removed from pages and - * nr_pages - */ -int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ - struct fscache_object *object; - int ret; - - _enter("%p,,%d,,,", cookie, *nr_pages); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" -ENOBUFS [no backing objects]"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - BUG_ON(list_empty(pages)); - BUG_ON(*nr_pages <= 0); - - /* prevent the file from being uncached whilst we access it */ - down_read(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->read_or_alloc_pages( - object, - mapping, - pages, - nr_pages, - end_io_func, - context, - gfp); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_read(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_read_or_alloc_pages); - -/*****************************************************************************/ -/* - * allocate a block in the cache on which to store a page - * - we return: - * -ENOMEM - out of memory, nothing done - * -EINTR - interrupted - * -ENOBUFS - no backing object available in which to cache the block - * 0 - block allocated - */ -int __fscache_alloc_page(struct fscache_cookie *cookie, - struct page *page, - gfp_t gfp) -{ - struct fscache_object *object; - int ret; - - _enter("%p,{%lu},", cookie, page->index); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" -ENOBUFS [no backing objects]"); - return -ENOBUFS; - } - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from being uncached whilst we access it */ - down_read(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - /* get and pin the backing object */ - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - if (object->cache->ops->grab_object(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->allocate_page(object, - page, - gfp); - - object->cache->ops->put_object(object); - } - - fscache_operation_unlock(object); - } - } - -out: - up_read(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_alloc_page); - -/*****************************************************************************/ -/* - * request a page be stored in the cache - * - returns: - * -ENOMEM - out of memory, nothing done - * -EINTR - interrupted - * -ENOBUFS - no backing object available in which to cache the page - * 0 - dispatched a write - it'll call end_io_func() when finished - */ -int __fscache_write_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ - struct fscache_object *object; - int ret; - - _enter("%p,{%lu},", cookie, page->index); - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from been uncached whilst we deal with it */ - down_read(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->write_page(object, - page, - end_io_func, - context, - gfp); - fscache_operation_unlock(object); - } - } - -out: - up_read(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_write_page); - -/*****************************************************************************/ -/* - * request several pages be stored in the cache - * - returns: - * -ENOMEM - out of memory, nothing done - * -EINTR - interrupted - * -ENOBUFS - no backing object available in which to cache the page - * 0 - dispatched a write - it'll call end_io_func() when finished - */ -int __fscache_write_pages(struct fscache_cookie *cookie, - struct pagevec *pagevec, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ - struct fscache_object *object; - int ret; - - _enter("%p,{%ld},", cookie, pagevec->nr); - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - /* prevent the file from been uncached whilst we deal with it */ - down_read(&cookie->sem); - - ret = -ENOBUFS; - if (!hlist_empty(&cookie->backing_objects)) { - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - if (test_bit(FSCACHE_IOERROR, &object->cache->flags)) - goto out; - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - /* ask the cache to honour the operation */ - ret = object->cache->ops->write_pages(object, - pagevec, - end_io_func, - context, - gfp); - fscache_operation_unlock(object); - } - } - -out: - up_read(&cookie->sem); - _leave(" = %d", ret); - return ret; -} - -EXPORT_SYMBOL(__fscache_write_pages); - -/*****************************************************************************/ -/* - * remove a page from the cache - */ -void __fscache_uncache_page(struct fscache_cookie *cookie, struct page *page) -{ - struct fscache_object *object; - struct pagevec pagevec; - - _enter(",{%lu}", page->index); - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" [no backing]"); - return; - } - - pagevec_init(&pagevec, 0); - pagevec_add(&pagevec, page); - - /* ask the cache to honour the operation */ - down_read(&cookie->sem); - - if (!hlist_empty(&cookie->backing_objects)) { - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - object->cache->ops->uncache_pages(object, &pagevec); - fscache_operation_unlock(object); - } - } - - up_read(&cookie->sem); - - _leave(""); -} - -EXPORT_SYMBOL(__fscache_uncache_page); - -/*****************************************************************************/ -/* - * remove a bunch of pages from the cache - */ -void __fscache_uncache_pages(struct fscache_cookie *cookie, - struct pagevec *pagevec) -{ - struct fscache_object *object; - - _enter(",{%ld}", pagevec->nr); - - BUG_ON(pagevec->nr <= 0); - BUG_ON(!pagevec->pages[0]); - - /* not supposed to use this for indexes */ - BUG_ON(cookie->def->type == FSCACHE_COOKIE_TYPE_INDEX); - - if (hlist_empty(&cookie->backing_objects)) { - _leave(" [no backing]"); - return; - } - - /* ask the cache to honour the operation */ - down_read(&cookie->sem); - - if (!hlist_empty(&cookie->backing_objects)) { - object = hlist_entry(cookie->backing_objects.first, - struct fscache_object, cookie_link); - - /* prevent the cache from being withdrawn */ - if (fscache_operation_lock(object)) { - object->cache->ops->uncache_pages(object, pagevec); - fscache_operation_unlock(object); - } - } - - up_read(&cookie->sem); - - _leave(""); -} - -EXPORT_SYMBOL(__fscache_uncache_pages); diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile index 72437065f..c3e1f760c 100644 --- a/fs/fuse/Makefile +++ b/fs/fuse/Makefile @@ -4,4 +4,4 @@ obj-$(CONFIG_FUSE_FS) += fuse.o -fuse-objs := dev.o dir.o file.o inode.o control.o +fuse-objs := dev.o dir.o file.o inode.o diff --git a/fs/fuse/control.c b/fs/fuse/control.c deleted file mode 100644 index 79ec1f23d..000000000 --- a/fs/fuse/control.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - FUSE: Filesystem in Userspace - Copyright (C) 2001-2006 Miklos Szeredi - - This program can be distributed under the terms of the GNU GPL. - See the file COPYING. -*/ - -#include "fuse_i.h" - -#include -#include - -#define FUSE_CTL_SUPER_MAGIC 0x65735543 - -/* - * This is non-NULL when the single instance of the control filesystem - * exists. Protected by fuse_mutex - */ -static struct super_block *fuse_control_sb; - -static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file) -{ - struct fuse_conn *fc; - mutex_lock(&fuse_mutex); - fc = file->f_dentry->d_inode->i_private; - if (fc) - fc = fuse_conn_get(fc); - mutex_unlock(&fuse_mutex); - return fc; -} - -static ssize_t fuse_conn_abort_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) -{ - struct fuse_conn *fc = fuse_ctl_file_conn_get(file); - if (fc) { - fuse_abort_conn(fc); - fuse_conn_put(fc); - } - return count; -} - -static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf, - size_t len, loff_t *ppos) -{ - char tmp[32]; - size_t size; - - if (!*ppos) { - struct fuse_conn *fc = fuse_ctl_file_conn_get(file); - if (!fc) - return 0; - - file->private_data=(void *)(long)atomic_read(&fc->num_waiting); - fuse_conn_put(fc); - } - size = sprintf(tmp, "%ld\n", (long)file->private_data); - return simple_read_from_buffer(buf, len, ppos, tmp, size); -} - -static const struct file_operations fuse_ctl_abort_ops = { - .open = nonseekable_open, - .write = fuse_conn_abort_write, -}; - -static const struct file_operations fuse_ctl_waiting_ops = { - .open = nonseekable_open, - .read = fuse_conn_waiting_read, -}; - -static struct dentry *fuse_ctl_add_dentry(struct dentry *parent, - struct fuse_conn *fc, - const char *name, - int mode, int nlink, - struct inode_operations *iop, - const struct file_operations *fop) -{ - struct dentry *dentry; - struct inode *inode; - - BUG_ON(fc->ctl_ndents >= FUSE_CTL_NUM_DENTRIES); - dentry = d_alloc_name(parent, name); - if (!dentry) - return NULL; - - fc->ctl_dentry[fc->ctl_ndents++] = dentry; - inode = new_inode(fuse_control_sb); - if (!inode) - return NULL; - - inode->i_mode = mode; - inode->i_uid = fc->user_id; - inode->i_gid = fc->group_id; - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; - /* setting ->i_op to NULL is not allowed */ - if (iop) - inode->i_op = iop; - inode->i_fop = fop; - inode->i_nlink = nlink; - inode->i_private = fc; - d_add(dentry, inode); - return dentry; -} - -/* - * Add a connection to the control filesystem (if it exists). Caller - * must hold fuse_mutex - */ -int fuse_ctl_add_conn(struct fuse_conn *fc) -{ - struct dentry *parent; - char name[32]; - - if (!fuse_control_sb) - return 0; - - parent = fuse_control_sb->s_root; - parent->d_inode->i_nlink++; - sprintf(name, "%llu", (unsigned long long) fc->id); - parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2, - &simple_dir_inode_operations, - &simple_dir_operations); - if (!parent) - goto err; - - if (!fuse_ctl_add_dentry(parent, fc, "waiting", S_IFREG | 0400, 1, - NULL, &fuse_ctl_waiting_ops) || - !fuse_ctl_add_dentry(parent, fc, "abort", S_IFREG | 0200, 1, - NULL, &fuse_ctl_abort_ops)) - goto err; - - return 0; - - err: - fuse_ctl_remove_conn(fc); - return -ENOMEM; -} - -/* - * Remove a connection from the control filesystem (if it exists). - * Caller must hold fuse_mutex - */ -void fuse_ctl_remove_conn(struct fuse_conn *fc) -{ - int i; - - if (!fuse_control_sb) - return; - - for (i = fc->ctl_ndents - 1; i >= 0; i--) { - struct dentry *dentry = fc->ctl_dentry[i]; - dentry->d_inode->i_private = NULL; - d_drop(dentry); - dput(dentry); - } - fuse_control_sb->s_root->d_inode->i_nlink--; -} - -static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent) -{ - struct tree_descr empty_descr = {""}; - struct fuse_conn *fc; - int err; - - err = simple_fill_super(sb, FUSE_CTL_SUPER_MAGIC, &empty_descr); - if (err) - return err; - - mutex_lock(&fuse_mutex); - BUG_ON(fuse_control_sb); - fuse_control_sb = sb; - list_for_each_entry(fc, &fuse_conn_list, entry) { - err = fuse_ctl_add_conn(fc); - if (err) { - fuse_control_sb = NULL; - mutex_unlock(&fuse_mutex); - return err; - } - } - mutex_unlock(&fuse_mutex); - - return 0; -} - -static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *raw_data, - struct vfsmount *mnt) -{ - return get_sb_single(fs_type, flags, raw_data, - fuse_ctl_fill_super, mnt); -} - -static void fuse_ctl_kill_sb(struct super_block *sb) -{ - mutex_lock(&fuse_mutex); - fuse_control_sb = NULL; - mutex_unlock(&fuse_mutex); - - kill_litter_super(sb); -} - -static struct file_system_type fuse_ctl_fs_type = { - .owner = THIS_MODULE, - .name = "fusectl", - .get_sb = fuse_ctl_get_sb, - .kill_sb = fuse_ctl_kill_sb, -}; - -int __init fuse_ctl_init(void) -{ - return register_filesystem(&fuse_ctl_fs_type); -} - -void fuse_ctl_cleanup(void) -{ - unregister_filesystem(&fuse_ctl_fs_type); -} diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 1e2006caf..104a62dad 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -34,7 +34,6 @@ static void fuse_request_init(struct fuse_req *req) { memset(req, 0, sizeof(*req)); INIT_LIST_HEAD(&req->list); - INIT_LIST_HEAD(&req->intr_entry); init_waitqueue_head(&req->waitq); atomic_set(&req->count, 1); } @@ -65,6 +64,18 @@ static void restore_sigs(sigset_t *oldset) sigprocmask(SIG_SETMASK, oldset, NULL); } +/* + * Reset request, so that it can be reused + * + * The caller must be _very_ careful to make sure, that it is holding + * the only reference to req + */ +void fuse_reset_request(struct fuse_req *req) +{ + BUG_ON(atomic_read(&req->count) != 1); + fuse_request_init(req); +} + static void __fuse_get_request(struct fuse_req *req) { atomic_inc(&req->count); @@ -77,13 +88,6 @@ static void __fuse_put_request(struct fuse_req *req) atomic_dec(&req->count); } -static void fuse_req_init_context(struct fuse_req *req) -{ - req->in.h.uid = current->fsuid; - req->in.h.gid = current->fsgid; - req->in.h.pid = current->pid; -} - struct fuse_req *fuse_get_req(struct fuse_conn *fc) { struct fuse_req *req; @@ -99,16 +103,14 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc) if (intr) goto out; - err = -ENOTCONN; - if (!fc->connected) - goto out; - req = fuse_request_alloc(); err = -ENOMEM; if (!req) goto out; - fuse_req_init_context(req); + req->in.h.uid = current->fsuid; + req->in.h.gid = current->fsgid; + req->in.h.pid = current->pid; req->waiting = 1; return req; @@ -117,183 +119,142 @@ struct fuse_req *fuse_get_req(struct fuse_conn *fc) return ERR_PTR(err); } -/* - * Return request in fuse_file->reserved_req. However that may - * currently be in use. If that is the case, wait for it to become - * available. - */ -static struct fuse_req *get_reserved_req(struct fuse_conn *fc, - struct file *file) +void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req) { - struct fuse_req *req = NULL; - struct fuse_file *ff = file->private_data; - - do { - wait_event(fc->blocked_waitq, ff->reserved_req); - spin_lock(&fc->lock); - if (ff->reserved_req) { - req = ff->reserved_req; - ff->reserved_req = NULL; - get_file(file); - req->stolen_file = file; - } - spin_unlock(&fc->lock); - } while (!req); - - return req; + if (atomic_dec_and_test(&req->count)) { + if (req->waiting) + atomic_dec(&fc->num_waiting); + fuse_request_free(req); + } } /* - * Put stolen request back into fuse_file->reserved_req + * Called with sbput_sem held for read (request_end) or write + * (fuse_put_super). By the time fuse_put_super() is finished, all + * inodes belonging to background requests must be released, so the + * iputs have to be done within the locked region. */ -static void put_reserved_req(struct fuse_conn *fc, struct fuse_req *req) +void fuse_release_background(struct fuse_conn *fc, struct fuse_req *req) { - struct file *file = req->stolen_file; - struct fuse_file *ff = file->private_data; - + iput(req->inode); + iput(req->inode2); spin_lock(&fc->lock); - fuse_request_init(req); - BUG_ON(ff->reserved_req); - ff->reserved_req = req; - wake_up(&fc->blocked_waitq); + list_del(&req->bg_entry); + if (fc->num_background == FUSE_MAX_BACKGROUND) { + fc->blocked = 0; + wake_up_all(&fc->blocked_waitq); + } + fc->num_background--; spin_unlock(&fc->lock); - fput(file); } /* - * Gets a requests for a file operation, always succeeds - * - * This is used for sending the FLUSH request, which must get to - * userspace, due to POSIX locks which may need to be unlocked. + * This function is called when a request is finished. Either a reply + * has arrived or it was interrupted (and not yet sent) or some error + * occurred during communication with userspace, or the device file + * was closed. In case of a background request the reference to the + * stored objects are released. The requester thread is woken up (if + * still waiting), the 'end' callback is called if given, else the + * reference to the request is released * - * If allocation fails due to OOM, use the reserved request in - * fuse_file. + * Releasing extra reference for foreground requests must be done + * within the same locked region as setting state to finished. This + * is because fuse_reset_request() may be called after request is + * finished and it must be the sole possessor. If request is + * interrupted and put in the background, it will return with an error + * and hence never be reset and reused. * - * This is very unlikely to deadlock accidentally, since the - * filesystem should not have it's own file open. If deadlock is - * intentional, it can still be broken by "aborting" the filesystem. + * Called with fc->lock, unlocks it */ -struct fuse_req *fuse_get_req_nofail(struct fuse_conn *fc, struct file *file) +static void request_end(struct fuse_conn *fc, struct fuse_req *req) { - struct fuse_req *req; - - atomic_inc(&fc->num_waiting); - wait_event(fc->blocked_waitq, !fc->blocked); - req = fuse_request_alloc(); - if (!req) - req = get_reserved_req(fc, file); - - fuse_req_init_context(req); - req->waiting = 1; - return req; -} + list_del(&req->list); + req->state = FUSE_REQ_FINISHED; + if (!req->background) { + spin_unlock(&fc->lock); + wake_up(&req->waitq); + fuse_put_request(fc, req); + } else { + void (*end) (struct fuse_conn *, struct fuse_req *) = req->end; + req->end = NULL; + spin_unlock(&fc->lock); + down_read(&fc->sbput_sem); + if (fc->mounted) + fuse_release_background(fc, req); + up_read(&fc->sbput_sem); -void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req) -{ - if (atomic_dec_and_test(&req->count)) { - if (req->waiting) - atomic_dec(&fc->num_waiting); + /* fput must go outside sbput_sem, otherwise it can deadlock */ + if (req->file) + fput(req->file); - if (req->stolen_file) - put_reserved_req(fc, req); + if (end) + end(fc, req); else - fuse_request_free(req); + fuse_put_request(fc, req); } } /* - * This function is called when a request is finished. Either a reply - * has arrived or it was aborted (and not yet sent) or some error - * occurred during communication with userspace, or the device file - * was closed. The requester thread is woken up (if still waiting), - * the 'end' callback is called if given, else the reference to the - * request is released + * Unfortunately request interruption not just solves the deadlock + * problem, it causes problems too. These stem from the fact, that an + * interrupted request is continued to be processed in userspace, + * while all the locks and object references (inode and file) held + * during the operation are released. * - * Called with fc->lock, unlocks it + * To release the locks is exactly why there's a need to interrupt the + * request, so there's not a lot that can be done about this, except + * introduce additional locking in userspace. + * + * More important is to keep inode and file references until userspace + * has replied, otherwise FORGET and RELEASE could be sent while the + * inode/file is still used by the filesystem. + * + * For this reason the concept of "background" request is introduced. + * An interrupted request is backgrounded if it has been already sent + * to userspace. Backgrounding involves getting an extra reference to + * inode(s) or file used in the request, and adding the request to + * fc->background list. When a reply is received for a background + * request, the object references are released, and the request is + * removed from the list. If the filesystem is unmounted while there + * are still background requests, the list is walked and references + * are released as if a reply was received. + * + * There's one more use for a background request. The RELEASE message is + * always sent as background, since it doesn't return an error or + * data. */ -static void request_end(struct fuse_conn *fc, struct fuse_req *req) -{ - void (*end) (struct fuse_conn *, struct fuse_req *) = req->end; - req->end = NULL; - list_del(&req->list); - list_del(&req->intr_entry); - req->state = FUSE_REQ_FINISHED; - if (req->background) { - if (fc->num_background == FUSE_MAX_BACKGROUND) { - fc->blocked = 0; - wake_up_all(&fc->blocked_waitq); - } - fc->num_background--; - } - spin_unlock(&fc->lock); - dput(req->dentry); - mntput(req->vfsmount); +static void background_request(struct fuse_conn *fc, struct fuse_req *req) +{ + req->background = 1; + list_add(&req->bg_entry, &fc->background); + fc->num_background++; + if (fc->num_background == FUSE_MAX_BACKGROUND) + fc->blocked = 1; + if (req->inode) + req->inode = igrab(req->inode); + if (req->inode2) + req->inode2 = igrab(req->inode2); if (req->file) - fput(req->file); - wake_up(&req->waitq); - if (end) - end(fc, req); - else - fuse_put_request(fc, req); + get_file(req->file); } -static void wait_answer_interruptible(struct fuse_conn *fc, - struct fuse_req *req) +/* Called with fc->lock held. Releases, and then reacquires it. */ +static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req) { - if (signal_pending(current)) - return; + sigset_t oldset; spin_unlock(&fc->lock); + block_sigs(&oldset); wait_event_interruptible(req->waitq, req->state == FUSE_REQ_FINISHED); + restore_sigs(&oldset); spin_lock(&fc->lock); -} - -static void queue_interrupt(struct fuse_conn *fc, struct fuse_req *req) -{ - list_add_tail(&req->intr_entry, &fc->interrupts); - wake_up(&fc->waitq); - kill_fasync(&fc->fasync, SIGIO, POLL_IN); -} - -/* Called with fc->lock held. Releases, and then reacquires it. */ -static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req) -{ - if (!fc->no_interrupt) { - /* Any signal may interrupt this */ - wait_answer_interruptible(fc, req); - - if (req->aborted) - goto aborted; - if (req->state == FUSE_REQ_FINISHED) - return; + if (req->state == FUSE_REQ_FINISHED && !req->interrupted) + return; + if (!req->interrupted) { + req->out.h.error = -EINTR; req->interrupted = 1; - if (req->state == FUSE_REQ_SENT) - queue_interrupt(fc, req); - } - - if (req->force) { - spin_unlock(&fc->lock); - wait_event(req->waitq, req->state == FUSE_REQ_FINISHED); - spin_lock(&fc->lock); - } else { - sigset_t oldset; - - /* Only fatal signals may interrupt this */ - block_sigs(&oldset); - wait_answer_interruptible(fc, req); - restore_sigs(&oldset); } - - if (req->aborted) - goto aborted; - if (req->state == FUSE_REQ_FINISHED) - return; - - req->out.h.error = -EINTR; - req->aborted = 1; - - aborted: if (req->locked) { /* This is uninterruptible sleep, because data is being copied to/from the buffers of req. During @@ -307,11 +268,8 @@ static void request_wait_answer(struct fuse_conn *fc, struct fuse_req *req) if (req->state == FUSE_REQ_PENDING) { list_del(&req->list); __fuse_put_request(req); - } else if (req->state == FUSE_REQ_SENT) { - spin_unlock(&fc->lock); - wait_event(req->waitq, req->state == FUSE_REQ_FINISHED); - spin_lock(&fc->lock); - } + } else if (req->state == FUSE_REQ_SENT) + background_request(fc, req); } static unsigned len_args(unsigned numargs, struct fuse_arg *args) @@ -325,19 +283,13 @@ static unsigned len_args(unsigned numargs, struct fuse_arg *args) return nbytes; } -static u64 fuse_get_unique(struct fuse_conn *fc) - { - fc->reqctr++; - /* zero is special */ - if (fc->reqctr == 0) - fc->reqctr = 1; - - return fc->reqctr; -} - static void queue_request(struct fuse_conn *fc, struct fuse_req *req) { - req->in.h.unique = fuse_get_unique(fc); + fc->reqctr++; + /* zero is special */ + if (fc->reqctr == 0) + fc->reqctr = 1; + req->in.h.unique = fc->reqctr; req->in.h.len = sizeof(struct fuse_in_header) + len_args(req->in.numargs, (struct fuse_arg *) req->in.args); list_add_tail(&req->list, &fc->pending); @@ -350,6 +302,9 @@ static void queue_request(struct fuse_conn *fc, struct fuse_req *req) kill_fasync(&fc->fasync, SIGIO, POLL_IN); } +/* + * This can only be interrupted by a SIGKILL + */ void request_send(struct fuse_conn *fc, struct fuse_req *req) { req->isreply = 1; @@ -372,12 +327,8 @@ void request_send(struct fuse_conn *fc, struct fuse_req *req) static void request_send_nowait(struct fuse_conn *fc, struct fuse_req *req) { spin_lock(&fc->lock); + background_request(fc, req); if (fc->connected) { - req->background = 1; - fc->num_background++; - if (fc->num_background == FUSE_MAX_BACKGROUND) - fc->blocked = 1; - queue_request(fc, req); spin_unlock(&fc->lock); } else { @@ -401,14 +352,14 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req) /* * Lock the request. Up to the next unlock_request() there mustn't be * anything that could cause a page-fault. If the request was already - * aborted bail out. + * interrupted bail out. */ static int lock_request(struct fuse_conn *fc, struct fuse_req *req) { int err = 0; if (req) { spin_lock(&fc->lock); - if (req->aborted) + if (req->interrupted) err = -ENOENT; else req->locked = 1; @@ -418,7 +369,7 @@ static int lock_request(struct fuse_conn *fc, struct fuse_req *req) } /* - * Unlock request. If it was aborted during being locked, the + * Unlock request. If it was interrupted during being locked, the * requester thread is currently waiting for it to be unlocked, so * wake it up. */ @@ -427,7 +378,7 @@ static void unlock_request(struct fuse_conn *fc, struct fuse_req *req) if (req) { spin_lock(&fc->lock); req->locked = 0; - if (req->aborted) + if (req->interrupted) wake_up(&req->waitq); spin_unlock(&fc->lock); } @@ -606,18 +557,13 @@ static int fuse_copy_args(struct fuse_copy_state *cs, unsigned numargs, return err; } -static int request_pending(struct fuse_conn *fc) -{ - return !list_empty(&fc->pending) || !list_empty(&fc->interrupts); -} - /* Wait until a request is available on the pending list */ static void request_wait(struct fuse_conn *fc) { DECLARE_WAITQUEUE(wait, current); add_wait_queue_exclusive(&fc->waitq, &wait); - while (fc->connected && !request_pending(fc)) { + while (fc->connected && list_empty(&fc->pending)) { set_current_state(TASK_INTERRUPTIBLE); if (signal_pending(current)) break; @@ -630,51 +576,12 @@ static void request_wait(struct fuse_conn *fc) remove_wait_queue(&fc->waitq, &wait); } -/* - * Transfer an interrupt request to userspace - * - * Unlike other requests this is assembled on demand, without a need - * to allocate a separate fuse_req structure. - * - * Called with fc->lock held, releases it - */ -static int fuse_read_interrupt(struct fuse_conn *fc, struct fuse_req *req, - const struct iovec *iov, unsigned long nr_segs) -{ - struct fuse_copy_state cs; - struct fuse_in_header ih; - struct fuse_interrupt_in arg; - unsigned reqsize = sizeof(ih) + sizeof(arg); - int err; - - list_del_init(&req->intr_entry); - req->intr_unique = fuse_get_unique(fc); - memset(&ih, 0, sizeof(ih)); - memset(&arg, 0, sizeof(arg)); - ih.len = reqsize; - ih.opcode = FUSE_INTERRUPT; - ih.unique = req->intr_unique; - arg.unique = req->in.h.unique; - - spin_unlock(&fc->lock); - if (iov_length(iov, nr_segs) < reqsize) - return -EINVAL; - - fuse_copy_init(&cs, fc, 1, NULL, iov, nr_segs); - err = fuse_copy_one(&cs, &ih, sizeof(ih)); - if (!err) - err = fuse_copy_one(&cs, &arg, sizeof(arg)); - fuse_copy_finish(&cs); - - return err ? err : reqsize; -} - /* * Read a single request into the userspace filesystem's buffer. This * function waits until a request is available, then removes it from * the pending list and copies request data to userspace buffer. If - * no reply is needed (FORGET) or request has been aborted or there - * was an error during the copying then it's finished by calling + * no reply is needed (FORGET) or request has been interrupted or + * there was an error during the copying then it's finished by calling * request_end(). Otherwise add it to the processing list, and set * the 'sent' flag. */ @@ -694,7 +601,7 @@ static ssize_t fuse_dev_readv(struct file *file, const struct iovec *iov, spin_lock(&fc->lock); err = -EAGAIN; if ((file->f_flags & O_NONBLOCK) && fc->connected && - !request_pending(fc)) + list_empty(&fc->pending)) goto err_unlock; request_wait(fc); @@ -702,15 +609,9 @@ static ssize_t fuse_dev_readv(struct file *file, const struct iovec *iov, if (!fc->connected) goto err_unlock; err = -ERESTARTSYS; - if (!request_pending(fc)) + if (list_empty(&fc->pending)) goto err_unlock; - if (!list_empty(&fc->interrupts)) { - req = list_entry(fc->interrupts.next, struct fuse_req, - intr_entry); - return fuse_read_interrupt(fc, req, iov, nr_segs); - } - req = list_entry(fc->pending.next, struct fuse_req, list); req->state = FUSE_REQ_READING; list_move(&req->list, &fc->io); @@ -735,10 +636,10 @@ static ssize_t fuse_dev_readv(struct file *file, const struct iovec *iov, fuse_copy_finish(&cs); spin_lock(&fc->lock); req->locked = 0; - if (!err && req->aborted) + if (!err && req->interrupted) err = -ENOENT; if (err) { - if (!req->aborted) + if (!req->interrupted) req->out.h.error = -EIO; request_end(fc, req); return err; @@ -748,8 +649,6 @@ static ssize_t fuse_dev_readv(struct file *file, const struct iovec *iov, else { req->state = FUSE_REQ_SENT; list_move_tail(&req->list, &fc->processing); - if (req->interrupted) - queue_interrupt(fc, req); spin_unlock(&fc->lock); } return reqsize; @@ -776,7 +675,7 @@ static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique) list_for_each(entry, &fc->processing) { struct fuse_req *req; req = list_entry(entry, struct fuse_req, list); - if (req->in.h.unique == unique || req->intr_unique == unique) + if (req->in.h.unique == unique) return req; } return NULL; @@ -842,33 +741,17 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov, goto err_unlock; req = request_find(fc, oh.unique); + err = -EINVAL; if (!req) goto err_unlock; - if (req->aborted) { + if (req->interrupted) { spin_unlock(&fc->lock); fuse_copy_finish(&cs); spin_lock(&fc->lock); request_end(fc, req); return -ENOENT; } - /* Is it an interrupt reply? */ - if (req->intr_unique == oh.unique) { - err = -EINVAL; - if (nbytes != sizeof(struct fuse_out_header)) - goto err_unlock; - - if (oh.error == -ENOSYS) - fc->no_interrupt = 1; - else if (oh.error == -EAGAIN) - queue_interrupt(fc, req); - - spin_unlock(&fc->lock); - fuse_copy_finish(&cs); - return nbytes; - } - - req->state = FUSE_REQ_WRITING; list_move(&req->list, &fc->io); req->out.h = oh; req->locked = 1; @@ -881,9 +764,9 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov, spin_lock(&fc->lock); req->locked = 0; if (!err) { - if (req->aborted) + if (req->interrupted) err = -ENOENT; - } else if (!req->aborted) + } else if (!req->interrupted) req->out.h.error = -EIO; request_end(fc, req); @@ -917,7 +800,7 @@ static unsigned fuse_dev_poll(struct file *file, poll_table *wait) spin_lock(&fc->lock); if (!fc->connected) mask = POLLERR; - else if (request_pending(fc)) + else if (!list_empty(&fc->pending)) mask |= POLLIN | POLLRDNORM; spin_unlock(&fc->lock); @@ -943,7 +826,7 @@ static void end_requests(struct fuse_conn *fc, struct list_head *head) /* * Abort requests under I/O * - * The requests are set to aborted and finished, and the request + * The requests are set to interrupted and finished, and the request * waiter is woken up. This will make request_wait_answer() wait * until the request is unlocked and then return. * @@ -958,7 +841,7 @@ static void end_io_requests(struct fuse_conn *fc) list_entry(fc->io.next, struct fuse_req, list); void (*end) (struct fuse_conn *, struct fuse_req *) = req->end; - req->aborted = 1; + req->interrupted = 1; req->out.h.error = -ECONNABORTED; req->state = FUSE_REQ_FINISHED; list_del_init(&req->list); @@ -991,20 +874,19 @@ static void end_io_requests(struct fuse_conn *fc) * onto the pending list is prevented by req->connected being false. * * Progression of requests under I/O to the processing list is - * prevented by the req->aborted flag being true for these requests. - * For this reason requests on the io list must be aborted first. + * prevented by the req->interrupted flag being true for these + * requests. For this reason requests on the io list must be aborted + * first. */ void fuse_abort_conn(struct fuse_conn *fc) { spin_lock(&fc->lock); if (fc->connected) { fc->connected = 0; - fc->blocked = 0; end_io_requests(fc); end_requests(fc, &fc->pending); end_requests(fc, &fc->processing); wake_up_all(&fc->waitq); - wake_up_all(&fc->blocked_waitq); kill_fasync(&fc->fasync, SIGIO, POLL_IN); } spin_unlock(&fc->lock); @@ -1020,7 +902,7 @@ static int fuse_dev_release(struct inode *inode, struct file *file) end_requests(fc, &fc->processing); spin_unlock(&fc->lock); fasync_helper(-1, file, 0, &fc->fasync); - fuse_conn_put(fc); + kobject_put(&fc->kobj); } return 0; diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index f75deebbf..8d7546e83 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1,6 +1,6 @@ /* FUSE: Filesystem in Userspace - Copyright (C) 2001-2006 Miklos Szeredi + Copyright (C) 2001-2005 Miklos Szeredi This program can be distributed under the terms of the GNU GPL. See the file COPYING. @@ -14,33 +14,6 @@ #include #include -#if BITS_PER_LONG >= 64 -static inline void fuse_dentry_settime(struct dentry *entry, u64 time) -{ - entry->d_time = time; -} - -static inline u64 fuse_dentry_time(struct dentry *entry) -{ - return entry->d_time; -} -#else -/* - * On 32 bit archs store the high 32 bits of time in d_fsdata - */ -static void fuse_dentry_settime(struct dentry *entry, u64 time) -{ - entry->d_time = time; - entry->d_fsdata = (void *) (unsigned long) (time >> 32); -} - -static u64 fuse_dentry_time(struct dentry *entry) -{ - return (u64) entry->d_time + - ((u64) (unsigned long) entry->d_fsdata << 32); -} -#endif - /* * FUSE caches dentries and attributes with separate timeout. The * time in jiffies until the dentry/attributes are valid is stored in @@ -50,13 +23,10 @@ static u64 fuse_dentry_time(struct dentry *entry) /* * Calculate the time in jiffies until a dentry/attributes are valid */ -static u64 time_to_jiffies(unsigned long sec, unsigned long nsec) +static unsigned long time_to_jiffies(unsigned long sec, unsigned long nsec) { - if (sec || nsec) { - struct timespec ts = {sec, nsec}; - return get_jiffies_64() + timespec_to_jiffies(&ts); - } else - return 0; + struct timespec ts = {sec, nsec}; + return jiffies + timespec_to_jiffies(&ts); } /* @@ -65,8 +35,7 @@ static u64 time_to_jiffies(unsigned long sec, unsigned long nsec) */ static void fuse_change_timeout(struct dentry *entry, struct fuse_entry_out *o) { - fuse_dentry_settime(entry, - time_to_jiffies(o->entry_valid, o->entry_valid_nsec)); + entry->d_time = time_to_jiffies(o->entry_valid, o->entry_valid_nsec); if (entry->d_inode) get_fuse_inode(entry->d_inode)->i_time = time_to_jiffies(o->attr_valid, o->attr_valid_nsec); @@ -78,7 +47,7 @@ static void fuse_change_timeout(struct dentry *entry, struct fuse_entry_out *o) */ void fuse_invalidate_attr(struct inode *inode) { - get_fuse_inode(inode)->i_time = 0; + get_fuse_inode(inode)->i_time = jiffies - 1; } /* @@ -91,7 +60,7 @@ void fuse_invalidate_attr(struct inode *inode) */ static void fuse_invalidate_entry_cache(struct dentry *entry) { - fuse_dentry_settime(entry, 0); + entry->d_time = jiffies - 1; } /* @@ -110,6 +79,7 @@ static void fuse_lookup_init(struct fuse_req *req, struct inode *dir, { req->in.h.opcode = FUSE_LOOKUP; req->in.h.nodeid = get_node_id(dir); + req->inode = dir; req->in.numargs = 1; req->in.args[0].size = entry->d_name.len + 1; req->in.args[0].value = entry->d_name.name; @@ -133,12 +103,11 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) if (inode && is_bad_inode(inode)) return 0; - else if (fuse_dentry_time(entry) < get_jiffies_64()) { + else if (time_after(jiffies, entry->d_time)) { int err; struct fuse_entry_out outarg; struct fuse_conn *fc; struct fuse_req *req; - struct fuse_req *forget_req; /* Doesn't hurt to "reset" the validity timeout */ fuse_invalidate_entry_cache(entry); @@ -152,29 +121,21 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd) if (IS_ERR(req)) return 0; - forget_req = fuse_get_req(fc); - if (IS_ERR(forget_req)) { - fuse_put_request(fc, req); - return 0; - } - fuse_lookup_init(req, entry->d_parent->d_inode, entry, &outarg); request_send(fc, req); err = req->out.h.error; - fuse_put_request(fc, req); /* Zero nodeid is same as -ENOENT */ if (!err && !outarg.nodeid) err = -ENOENT; if (!err) { struct fuse_inode *fi = get_fuse_inode(inode); if (outarg.nodeid != get_node_id(inode)) { - fuse_send_forget(fc, forget_req, - outarg.nodeid, 1); + fuse_send_forget(fc, req, outarg.nodeid, 1); return 0; } fi->nlookup ++; } - fuse_put_request(fc, forget_req); + fuse_put_request(fc, req); if (err || (outarg.attr.mode ^ inode->i_mode) & S_IFMT) return 0; @@ -223,7 +184,6 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, struct inode *inode = NULL; struct fuse_conn *fc = get_fuse_conn(dir); struct fuse_req *req; - struct fuse_req *forget_req; if (entry->d_name.len > FUSE_NAME_MAX) return ERR_PTR(-ENAMETOOLONG); @@ -232,16 +192,9 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, if (IS_ERR(req)) return ERR_PTR(PTR_ERR(req)); - forget_req = fuse_get_req(fc); - if (IS_ERR(forget_req)) { - fuse_put_request(fc, req); - return ERR_PTR(PTR_ERR(forget_req)); - } - fuse_lookup_init(req, dir, entry, &outarg); request_send(fc, req); err = req->out.h.error; - fuse_put_request(fc, req); /* Zero nodeid is same as -ENOENT, but with valid timeout */ if (!err && outarg.nodeid && (invalid_nodeid(outarg.nodeid) || !valid_mode(outarg.attr.mode))) @@ -250,11 +203,11 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation, &outarg.attr); if (!inode) { - fuse_send_forget(fc, forget_req, outarg.nodeid, 1); + fuse_send_forget(fc, req, outarg.nodeid, 1); return ERR_PTR(-ENOMEM); } } - fuse_put_request(fc, forget_req); + fuse_put_request(fc, req); if (err && err != -ENOENT) return ERR_PTR(err); @@ -271,20 +224,6 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, return NULL; } -/* - * Synchronous release for the case when something goes wrong in CREATE_OPEN - */ -static void fuse_sync_release(struct fuse_conn *fc, struct fuse_file *ff, - u64 nodeid, int flags) -{ - struct fuse_req *req; - - req = fuse_release_fill(ff, nodeid, flags, FUSE_RELEASE); - req->force = 1; - request_send(fc, req); - fuse_put_request(fc, req); -} - /* * Atomic create+open operation * @@ -298,7 +237,6 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, struct inode *inode; struct fuse_conn *fc = get_fuse_conn(dir); struct fuse_req *req; - struct fuse_req *forget_req; struct fuse_open_in inarg; struct fuse_open_out outopen; struct fuse_entry_out outentry; @@ -309,14 +247,9 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, if (fc->no_create) return -ENOSYS; - forget_req = fuse_get_req(fc); - if (IS_ERR(forget_req)) - return PTR_ERR(forget_req); - req = fuse_get_req(fc); - err = PTR_ERR(req); if (IS_ERR(req)) - goto out_put_forget_req; + return PTR_ERR(req); err = -ENOMEM; ff = fuse_file_alloc(); @@ -329,6 +262,7 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, inarg.mode = mode; req->in.h.opcode = FUSE_CREATE; req->in.h.nodeid = get_node_id(dir); + req->inode = dir; req->in.numargs = 2; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -351,23 +285,25 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid)) goto out_free_ff; - fuse_put_request(fc, req); inode = fuse_iget(dir->i_sb, outentry.nodeid, outentry.generation, &outentry.attr); + err = -ENOMEM; if (!inode) { flags &= ~(O_CREAT | O_EXCL | O_TRUNC); ff->fh = outopen.fh; - fuse_sync_release(fc, ff, outentry.nodeid, flags); - fuse_send_forget(fc, forget_req, outentry.nodeid, 1); - return -ENOMEM; + /* Special release, with inode = NULL, this will + trigger a 'forget' request when the release is + complete */ + fuse_send_release(fc, ff, outentry.nodeid, NULL, flags, 0); + goto out_put_request; } - fuse_put_request(fc, forget_req); + fuse_put_request(fc, req); d_instantiate(entry, inode); fuse_change_timeout(entry, &outentry); file = lookup_instantiate_filp(nd, entry, generic_file_open); if (IS_ERR(file)) { ff->fh = outopen.fh; - fuse_sync_release(fc, ff, outentry.nodeid, flags); + fuse_send_release(fc, ff, outentry.nodeid, inode, flags, 0); return PTR_ERR(file); } fuse_finish_open(inode, file, ff, &outopen); @@ -377,8 +313,6 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, int mode, fuse_file_free(ff); out_put_request: fuse_put_request(fc, req); - out_put_forget_req: - fuse_put_request(fc, forget_req); return err; } @@ -392,38 +326,32 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, struct fuse_entry_out outarg; struct inode *inode; int err; - struct fuse_req *forget_req; - - forget_req = fuse_get_req(fc); - if (IS_ERR(forget_req)) { - fuse_put_request(fc, req); - return PTR_ERR(forget_req); - } req->in.h.nodeid = get_node_id(dir); + req->inode = dir; req->out.numargs = 1; req->out.args[0].size = sizeof(outarg); req->out.args[0].value = &outarg; request_send(fc, req); err = req->out.h.error; - fuse_put_request(fc, req); - if (err) - goto out_put_forget_req; - + if (err) { + fuse_put_request(fc, req); + return err; + } err = -EIO; if (invalid_nodeid(outarg.nodeid)) - goto out_put_forget_req; + goto out_put_request; if ((outarg.attr.mode ^ mode) & S_IFMT) - goto out_put_forget_req; + goto out_put_request; inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation, &outarg.attr); if (!inode) { - fuse_send_forget(fc, forget_req, outarg.nodeid, 1); + fuse_send_forget(fc, req, outarg.nodeid, 1); return -ENOMEM; } - fuse_put_request(fc, forget_req); + fuse_put_request(fc, req); if (dir_alias(inode)) { iput(inode); @@ -435,8 +363,8 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_req *req, fuse_invalidate_attr(dir); return 0; - out_put_forget_req: - fuse_put_request(fc, forget_req); + out_put_request: + fuse_put_request(fc, req); return err; } @@ -520,6 +448,7 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) req->in.h.opcode = FUSE_UNLINK; req->in.h.nodeid = get_node_id(dir); + req->inode = dir; req->in.numargs = 1; req->in.args[0].size = entry->d_name.len + 1; req->in.args[0].value = entry->d_name.name; @@ -551,6 +480,7 @@ static int fuse_rmdir(struct inode *dir, struct dentry *entry) req->in.h.opcode = FUSE_RMDIR; req->in.h.nodeid = get_node_id(dir); + req->inode = dir; req->in.numargs = 1; req->in.args[0].size = entry->d_name.len + 1; req->in.args[0].value = entry->d_name.name; @@ -580,6 +510,8 @@ static int fuse_rename(struct inode *olddir, struct dentry *oldent, inarg.newdir = get_node_id(newdir); req->in.h.opcode = FUSE_RENAME; req->in.h.nodeid = get_node_id(olddir); + req->inode = olddir; + req->inode2 = newdir; req->in.numargs = 3; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -626,6 +558,7 @@ static int fuse_link(struct dentry *entry, struct inode *newdir, memset(&inarg, 0, sizeof(inarg)); inarg.oldnodeid = get_node_id(inode); req->in.h.opcode = FUSE_LINK; + req->inode2 = inode; req->in.numargs = 2; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -654,6 +587,7 @@ int fuse_do_getattr(struct inode *inode) req->in.h.opcode = FUSE_GETATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->out.numargs = 1; req->out.args[0].size = sizeof(arg); req->out.args[0].value = &arg; @@ -721,7 +655,7 @@ static int fuse_revalidate(struct dentry *entry) if (!fuse_allow_task(fc, current)) return -EACCES; if (get_node_id(inode) != FUSE_ROOT_ID && - fi->i_time >= get_jiffies_64()) + time_before_eq(jiffies, fi->i_time)) return 0; return fuse_do_getattr(inode); @@ -745,6 +679,7 @@ static int fuse_access(struct inode *inode, int mask) inarg.mask = mask; req->in.h.opcode = FUSE_ACCESS; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -885,6 +820,7 @@ static char *read_link(struct dentry *dentry) } req->in.h.opcode = FUSE_READLINK; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->out.argvar = 1; req->out.numargs = 1; req->out.args[0].size = PAGE_SIZE - 1; @@ -959,30 +895,14 @@ static void iattr_to_fattr(struct iattr *iattr, struct fuse_setattr_in *arg) } } -static void fuse_vmtruncate(struct inode *inode, loff_t offset) -{ - struct fuse_conn *fc = get_fuse_conn(inode); - int need_trunc; - - spin_lock(&fc->lock); - need_trunc = inode->i_size > offset; - i_size_write(inode, offset); - spin_unlock(&fc->lock); - - if (need_trunc) { - struct address_space *mapping = inode->i_mapping; - unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1); - truncate_inode_pages(mapping, offset); - } -} - /* * Set attributes, and at the same time refresh them. * * Truncation is slightly complicated, because the 'truncate' request * may fail, in which case we don't want to touch the mapping. - * vmtruncate() doesn't allow for this case, so do the rlimit checking - * and the actual truncation by hand. + * vmtruncate() doesn't allow for this case. So do the rlimit + * checking by hand and call vmtruncate() only after the file has + * actually been truncated. */ static int fuse_setattr(struct dentry *entry, struct iattr *attr) { @@ -1019,6 +939,7 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) iattr_to_fattr(attr, &inarg); req->in.h.opcode = FUSE_SETATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -1033,8 +954,12 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) make_bad_inode(inode); err = -EIO; } else { - if (is_truncate) - fuse_vmtruncate(inode, outarg.attr.size); + if (is_truncate) { + loff_t origsize = i_size_read(inode); + i_size_write(inode, outarg.attr.size); + if (origsize > outarg.attr.size) + vmtruncate(inode, outarg.attr.size); + } fuse_change_attributes(inode, &outarg.attr); fi->i_time = time_to_jiffies(outarg.attr_valid, outarg.attr_valid_nsec); @@ -1077,6 +1002,7 @@ static int fuse_setxattr(struct dentry *entry, const char *name, inarg.flags = flags; req->in.h.opcode = FUSE_SETXATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 3; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -1115,6 +1041,7 @@ static ssize_t fuse_getxattr(struct dentry *entry, const char *name, inarg.size = size; req->in.h.opcode = FUSE_GETXATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 2; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -1164,6 +1091,7 @@ static ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size) inarg.size = size; req->in.h.opcode = FUSE_LISTXATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -1207,6 +1135,7 @@ static int fuse_removexattr(struct dentry *entry, const char *name) req->in.h.opcode = FUSE_REMOVEXATTR; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = strlen(name) + 1; req->in.args[0].value = name; diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 4e174c883..fc342cf7c 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -30,6 +30,7 @@ static int fuse_send_open(struct inode *inode, struct file *file, int isdir, inarg.flags = file->f_flags & ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC); req->in.h.opcode = isdir ? FUSE_OPENDIR : FUSE_OPEN; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -48,8 +49,8 @@ struct fuse_file *fuse_file_alloc(void) struct fuse_file *ff; ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL); if (ff) { - ff->reserved_req = fuse_request_alloc(); - if (!ff->reserved_req) { + ff->release_req = fuse_request_alloc(); + if (!ff->release_req) { kfree(ff); ff = NULL; } @@ -59,7 +60,7 @@ struct fuse_file *fuse_file_alloc(void) void fuse_file_free(struct fuse_file *ff) { - fuse_request_free(ff->reserved_req); + fuse_request_free(ff->release_req); kfree(ff); } @@ -112,22 +113,37 @@ int fuse_open_common(struct inode *inode, struct file *file, int isdir) return err; } -struct fuse_req *fuse_release_fill(struct fuse_file *ff, u64 nodeid, int flags, - int opcode) +/* Special case for failed iget in CREATE */ +static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req) { - struct fuse_req *req = ff->reserved_req; + /* If called from end_io_requests(), req has more than one + reference and fuse_reset_request() cannot work */ + if (fc->connected) { + u64 nodeid = req->in.h.nodeid; + fuse_reset_request(req); + fuse_send_forget(fc, req, nodeid, 1); + } else + fuse_put_request(fc, req); +} + +void fuse_send_release(struct fuse_conn *fc, struct fuse_file *ff, + u64 nodeid, struct inode *inode, int flags, int isdir) +{ + struct fuse_req * req = ff->release_req; struct fuse_release_in *inarg = &req->misc.release_in; inarg->fh = ff->fh; inarg->flags = flags; - req->in.h.opcode = opcode; + req->in.h.opcode = isdir ? FUSE_RELEASEDIR : FUSE_RELEASE; req->in.h.nodeid = nodeid; + req->inode = inode; req->in.numargs = 1; req->in.args[0].size = sizeof(struct fuse_release_in); req->in.args[0].value = inarg; + request_send_background(fc, req); + if (!inode) + req->end = fuse_release_end; kfree(ff); - - return req; } int fuse_release_common(struct inode *inode, struct file *file, int isdir) @@ -135,15 +151,8 @@ int fuse_release_common(struct inode *inode, struct file *file, int isdir) struct fuse_file *ff = file->private_data; if (ff) { struct fuse_conn *fc = get_fuse_conn(inode); - struct fuse_req *req; - - req = fuse_release_fill(ff, get_node_id(inode), file->f_flags, - isdir ? FUSE_RELEASEDIR : FUSE_RELEASE); - - /* Hold vfsmount and dentry until release is finished */ - req->vfsmount = mntget(file->f_vfsmnt); - req->dentry = dget(file->f_dentry); - request_send_background(fc, req); + u64 nodeid = get_node_id(inode); + fuse_send_release(fc, ff, nodeid, inode, file->f_flags, isdir); } /* Return value is ignored by VFS */ @@ -160,29 +169,7 @@ static int fuse_release(struct inode *inode, struct file *file) return fuse_release_common(inode, file, 0); } -/* - * Scramble the ID space with XTEA, so that the value of the files_struct - * pointer is not exposed to userspace. - */ -static u64 fuse_lock_owner_id(struct fuse_conn *fc, fl_owner_t id) -{ - u32 *k = fc->scramble_key; - u64 v = (unsigned long) id; - u32 v0 = v; - u32 v1 = v >> 32; - u32 sum = 0; - int i; - - for (i = 0; i < 32; i++) { - v0 += ((v1 << 4 ^ v1 >> 5) + v1) ^ (sum + k[sum & 3]); - sum += 0x9E3779B9; - v1 += ((v0 << 4 ^ v0 >> 5) + v0) ^ (sum + k[sum>>11 & 3]); - } - - return (u64) v0 + ((u64) v1 << 32); -} - -static int fuse_flush(struct file *file, fl_owner_t id) +static int fuse_flush(struct file *file) { struct inode *inode = file->f_dentry->d_inode; struct fuse_conn *fc = get_fuse_conn(inode); @@ -197,16 +184,19 @@ static int fuse_flush(struct file *file, fl_owner_t id) if (fc->no_flush) return 0; - req = fuse_get_req_nofail(fc, file); + req = fuse_get_req(fc); + if (IS_ERR(req)) + return PTR_ERR(req); + memset(&inarg, 0, sizeof(inarg)); inarg.fh = ff->fh; - inarg.lock_owner = fuse_lock_owner_id(fc, id); req->in.h.opcode = FUSE_FLUSH; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; + req->file = file; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; - req->force = 1; request_send(fc, req); err = req->out.h.error; fuse_put_request(fc, req); @@ -242,6 +232,8 @@ int fuse_fsync_common(struct file *file, struct dentry *de, int datasync, inarg.fsync_flags = datasync ? 1 : 0; req->in.h.opcode = isdir ? FUSE_FSYNCDIR : FUSE_FSYNC; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; + req->file = file; req->in.numargs = 1; req->in.args[0].size = sizeof(inarg); req->in.args[0].value = &inarg; @@ -274,6 +266,8 @@ void fuse_read_fill(struct fuse_req *req, struct file *file, inarg->size = count; req->in.h.opcode = opcode; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; + req->file = file; req->in.numargs = 1; req->in.args[0].size = sizeof(struct fuse_read_in); req->in.args[0].value = inarg; @@ -348,8 +342,6 @@ static void fuse_send_readpages(struct fuse_req *req, struct file *file, req->out.page_zeroing = 1; fuse_read_fill(req, file, inode, pos, count, FUSE_READ); if (fc->async_read) { - get_file(file); - req->file = file; req->end = fuse_readpages_end; request_send_background(fc, req); } else { @@ -395,16 +387,14 @@ static int fuse_readpages(struct file *file, struct address_space *mapping, struct fuse_readpages_data data; int err; - err = -EIO; if (is_bad_inode(inode)) - goto clean_pages_up; + return -EIO; data.file = file; data.inode = inode; data.req = fuse_get_req(fc); - err = PTR_ERR(data.req); if (IS_ERR(data.req)) - goto clean_pages_up; + return PTR_ERR(data.req); err = read_cache_pages(mapping, pages, fuse_readpages_fill, &data); if (!err) { @@ -414,10 +404,6 @@ static int fuse_readpages(struct file *file, struct address_space *mapping, fuse_put_request(fc, data.req); } return err; - -clean_pages_up: - put_pages_list(pages); - return err; } static size_t fuse_send_write(struct fuse_req *req, struct file *file, @@ -434,6 +420,8 @@ static size_t fuse_send_write(struct fuse_req *req, struct file *file, inarg.size = count; req->in.h.opcode = FUSE_WRITE; req->in.h.nodeid = get_node_id(inode); + req->inode = inode; + req->file = file; req->in.argpages = 1; req->in.numargs = 2; req->in.args[0].size = sizeof(struct fuse_write_in); @@ -481,10 +469,8 @@ static int fuse_commit_write(struct file *file, struct page *page, err = -EIO; if (!err) { pos += count; - spin_lock(&fc->lock); - if (pos > inode->i_size) + if (pos > i_size_read(inode)) i_size_write(inode, pos); - spin_unlock(&fc->lock); if (offset == 0 && to == PAGE_CACHE_SIZE) { clear_page_dirty(page); @@ -588,12 +574,8 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf, } fuse_put_request(fc, req); if (res > 0) { - if (write) { - spin_lock(&fc->lock); - if (pos > inode->i_size) - i_size_write(inode, pos); - spin_unlock(&fc->lock); - } + if (write && pos > i_size_read(inode)) + i_size_write(inode, pos); *ppos = pos; } fuse_invalidate_attr(inode); @@ -637,126 +619,6 @@ static int fuse_set_page_dirty(struct page *page) return 0; } -static int convert_fuse_file_lock(const struct fuse_file_lock *ffl, - struct file_lock *fl) -{ - switch (ffl->type) { - case F_UNLCK: - break; - - case F_RDLCK: - case F_WRLCK: - if (ffl->start > OFFSET_MAX || ffl->end > OFFSET_MAX || - ffl->end < ffl->start) - return -EIO; - - fl->fl_start = ffl->start; - fl->fl_end = ffl->end; - fl->fl_pid = ffl->pid; - break; - - default: - return -EIO; - } - fl->fl_type = ffl->type; - return 0; -} - -static void fuse_lk_fill(struct fuse_req *req, struct file *file, - const struct file_lock *fl, int opcode, pid_t pid) -{ - struct inode *inode = file->f_dentry->d_inode; - struct fuse_conn *fc = get_fuse_conn(inode); - struct fuse_file *ff = file->private_data; - struct fuse_lk_in *arg = &req->misc.lk_in; - - arg->fh = ff->fh; - arg->owner = fuse_lock_owner_id(fc, fl->fl_owner); - arg->lk.start = fl->fl_start; - arg->lk.end = fl->fl_end; - arg->lk.type = fl->fl_type; - arg->lk.pid = pid; - req->in.h.opcode = opcode; - req->in.h.nodeid = get_node_id(inode); - req->in.numargs = 1; - req->in.args[0].size = sizeof(*arg); - req->in.args[0].value = arg; -} - -static int fuse_getlk(struct file *file, struct file_lock *fl) -{ - struct inode *inode = file->f_dentry->d_inode; - struct fuse_conn *fc = get_fuse_conn(inode); - struct fuse_req *req; - struct fuse_lk_out outarg; - int err; - - req = fuse_get_req(fc); - if (IS_ERR(req)) - return PTR_ERR(req); - - fuse_lk_fill(req, file, fl, FUSE_GETLK, 0); - req->out.numargs = 1; - req->out.args[0].size = sizeof(outarg); - req->out.args[0].value = &outarg; - request_send(fc, req); - err = req->out.h.error; - fuse_put_request(fc, req); - if (!err) - err = convert_fuse_file_lock(&outarg.lk, fl); - - return err; -} - -static int fuse_setlk(struct file *file, struct file_lock *fl) -{ - struct inode *inode = file->f_dentry->d_inode; - struct fuse_conn *fc = get_fuse_conn(inode); - struct fuse_req *req; - int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK; - pid_t pid = fl->fl_type != F_UNLCK ? current->tgid : 0; - int err; - - /* Unlock on close is handled by the flush method */ - if (fl->fl_flags & FL_CLOSE) - return 0; - - req = fuse_get_req(fc); - if (IS_ERR(req)) - return PTR_ERR(req); - - fuse_lk_fill(req, file, fl, opcode, pid); - request_send(fc, req); - err = req->out.h.error; - /* locking is restartable */ - if (err == -EINTR) - err = -ERESTARTSYS; - fuse_put_request(fc, req); - return err; -} - -static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) -{ - struct inode *inode = file->f_dentry->d_inode; - struct fuse_conn *fc = get_fuse_conn(inode); - int err; - - if (cmd == F_GETLK) { - if (fc->no_lock) { - if (!posix_test_lock(file, fl, fl)) - fl->fl_type = F_UNLCK; - err = 0; - } else - err = fuse_getlk(file, fl); - } else { - if (fc->no_lock) - err = posix_lock_file_wait(file, fl); - else - err = fuse_setlk(file, fl); - } - return err; -} - static const struct file_operations fuse_file_operations = { .llseek = generic_file_llseek, .read = generic_file_read, @@ -766,7 +628,6 @@ static const struct file_operations fuse_file_operations = { .flush = fuse_flush, .release = fuse_release, .fsync = fuse_fsync, - .lock = fuse_file_lock, .sendfile = generic_file_sendfile, }; @@ -778,11 +639,10 @@ static const struct file_operations fuse_direct_io_file_operations = { .flush = fuse_flush, .release = fuse_release, .fsync = fuse_fsync, - .lock = fuse_file_lock, /* no mmap and sendfile */ }; -static const struct address_space_operations fuse_file_aops = { +static struct address_space_operations fuse_file_aops = { .readpage = fuse_readpage, .prepare_write = fuse_prepare_write, .commit_write = fuse_commit_write, diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 69c7750d5..0474202cb 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -8,13 +8,12 @@ #include #include -#include #include #include #include #include #include -#include +#include /** Max number of pages that can be used in a single read request */ #define FUSE_MAX_PAGES_PER_REQ 32 @@ -25,9 +24,6 @@ /** It could be as large as PATH_MAX, but would that have any uses? */ #define FUSE_NAME_MAX 1024 -/** Number of dentries for each connection in the control filesystem */ -#define FUSE_CTL_NUM_DENTRIES 3 - /** If the FUSE_DEFAULT_PERMISSIONS flag is given, the filesystem module will check permissions based on the file mode. Otherwise no permission checking is done in the kernel */ @@ -37,11 +33,6 @@ doing the mount will be allowed to access the filesystem */ #define FUSE_ALLOW_OTHER (1 << 1) -/** List of active connections */ -extern struct list_head fuse_conn_list; - -/** Global mutex protecting fuse_conn_list and the control filesystem */ -extern struct mutex fuse_mutex; /** FUSE inode */ struct fuse_inode { @@ -59,13 +50,13 @@ struct fuse_inode { struct fuse_req *forget_req; /** Time in jiffies until the file attributes are valid */ - u64 i_time; + unsigned long i_time; }; /** FUSE specific file data */ struct fuse_file { /** Request reserved for flush and release */ - struct fuse_req *reserved_req; + struct fuse_req *release_req; /** File handle used by userspace */ u64 fh; @@ -131,7 +122,6 @@ enum fuse_req_state { FUSE_REQ_PENDING, FUSE_REQ_READING, FUSE_REQ_SENT, - FUSE_REQ_WRITING, FUSE_REQ_FINISHED }; @@ -145,15 +135,12 @@ struct fuse_req { fuse_conn */ struct list_head list; - /** Entry on the interrupts list */ - struct list_head intr_entry; + /** Entry on the background list */ + struct list_head bg_entry; /** refcount */ atomic_t count; - /** Unique ID for the interrupt request */ - u64 intr_unique; - /* * The following bitfields are either set once before the * request is queued or setting/clearing them is protected by @@ -163,18 +150,12 @@ struct fuse_req { /** True if the request has reply */ unsigned isreply:1; - /** Force sending of the request even if interrupted */ - unsigned force:1; - - /** The request was aborted */ - unsigned aborted:1; + /** The request was interrupted */ + unsigned interrupted:1; /** Request is sent in the background */ unsigned background:1; - /** The request has been interrupted */ - unsigned interrupted:1; - /** Data is being copied to/from the request */ unsigned locked:1; @@ -200,7 +181,6 @@ struct fuse_req { struct fuse_init_in init_in; struct fuse_init_out init_out; struct fuse_read_in read_in; - struct fuse_lk_in lk_in; } misc; /** page vector */ @@ -212,20 +192,17 @@ struct fuse_req { /** offset of data on first page */ unsigned page_offset; - /** File used in the request (or NULL) */ - struct file *file; + /** Inode used in the request */ + struct inode *inode; - /** vfsmount used in release */ - struct vfsmount *vfsmount; + /** Second inode used in the request (or NULL) */ + struct inode *inode2; - /** dentry used in release */ - struct dentry *dentry; + /** File used in the request (or NULL) */ + struct file *file; /** Request completion callback */ void (*end)(struct fuse_conn *, struct fuse_req *); - - /** Request is stolen from fuse_file->reserved_req */ - struct file *stolen_file; }; /** @@ -239,9 +216,6 @@ struct fuse_conn { /** Lock protecting accessess to members of this structure */ spinlock_t lock; - /** Refcount */ - atomic_t count; - /** The user id for this mount */ uid_t user_id; @@ -269,12 +243,13 @@ struct fuse_conn { /** The list of requests under I/O */ struct list_head io; + /** Requests put in the background (RELEASE or any other + interrupted request) */ + struct list_head background; + /** Number of requests currently in the background */ unsigned num_background; - /** Pending interrupts */ - struct list_head interrupts; - /** Flag indicating if connection is blocked. This will be the case before the INIT reply is received, and if there are too many outstading backgrounds requests */ @@ -283,9 +258,15 @@ struct fuse_conn { /** waitq for blocked connection */ wait_queue_head_t blocked_waitq; + /** RW semaphore for exclusion with fuse_put_super() */ + struct rw_semaphore sbput_sem; + /** The next unique request id */ u64 reqctr; + /** Mount is active */ + unsigned mounted; + /** Connection established, cleared on umount, connection abort and device release */ unsigned connected; @@ -324,18 +305,12 @@ struct fuse_conn { /** Is removexattr not implemented by fs? */ unsigned no_removexattr : 1; - /** Are file locking primitives not implemented by fs? */ - unsigned no_lock : 1; - /** Is access not implemented by fs? */ unsigned no_access : 1; /** Is create not implemented by fs? */ unsigned no_create : 1; - /** Is interrupt not implemented by fs? */ - unsigned no_interrupt : 1; - /** The number of requests waiting for completion */ atomic_t num_waiting; @@ -345,23 +320,11 @@ struct fuse_conn { /** Backing dev info */ struct backing_dev_info bdi; - /** Entry on the fuse_conn_list */ - struct list_head entry; - - /** Unique ID */ - u64 id; - - /** Dentries in the control filesystem */ - struct dentry *ctl_dentry[FUSE_CTL_NUM_DENTRIES]; - - /** number of dentries used in the above array */ - int ctl_ndents; + /** kobject */ + struct kobject kobj; /** O_ASYNC requests */ struct fasync_struct *fasync; - - /** Key for lock owner ID scrambling */ - u32 scramble_key[4]; }; static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb) @@ -374,6 +337,11 @@ static inline struct fuse_conn *get_fuse_conn(struct inode *inode) return get_fuse_conn_super(inode->i_sb); } +static inline struct fuse_conn *get_fuse_conn_kobj(struct kobject *obj) +{ + return container_of(obj, struct fuse_conn, kobj); +} + static inline struct fuse_inode *get_fuse_inode(struct inode *inode) { return container_of(inode, struct fuse_inode, inode); @@ -415,9 +383,12 @@ void fuse_file_free(struct fuse_file *ff); void fuse_finish_open(struct inode *inode, struct file *file, struct fuse_file *ff, struct fuse_open_out *outarg); -/** */ -struct fuse_req *fuse_release_fill(struct fuse_file *ff, u64 nodeid, int flags, - int opcode); +/** + * Send a RELEASE request + */ +void fuse_send_release(struct fuse_conn *fc, struct fuse_file *ff, + u64 nodeid, struct inode *inode, int flags, int isdir); + /** * Send RELEASE or RELEASEDIR request */ @@ -464,9 +435,6 @@ int fuse_dev_init(void); */ void fuse_dev_cleanup(void); -int fuse_ctl_init(void); -void fuse_ctl_cleanup(void); - /** * Allocate a request */ @@ -478,14 +446,14 @@ struct fuse_req *fuse_request_alloc(void); void fuse_request_free(struct fuse_req *req); /** - * Get a request, may fail with -ENOMEM + * Reinitialize a request, the preallocated flag is left unmodified */ -struct fuse_req *fuse_get_req(struct fuse_conn *fc); +void fuse_reset_request(struct fuse_req *req); /** - * Gets a requests for a file operation, always succeeds + * Reserve a preallocated request */ -struct fuse_req *fuse_get_req_nofail(struct fuse_conn *fc, struct file *file); +struct fuse_req *fuse_get_req(struct fuse_conn *fc); /** * Decrement reference count of a request. If count goes to zero free @@ -508,6 +476,11 @@ void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req); */ void request_send_background(struct fuse_conn *fc, struct fuse_req *req); +/** + * Release inodes and file associated with background request + */ +void fuse_release_background(struct fuse_conn *fc, struct fuse_req *req); + /* Abort all requests */ void fuse_abort_conn(struct fuse_conn *fc); @@ -520,23 +493,3 @@ int fuse_do_getattr(struct inode *inode); * Invalidate inode attributes */ void fuse_invalidate_attr(struct inode *inode); - -/** - * Acquire reference to fuse_conn - */ -struct fuse_conn *fuse_conn_get(struct fuse_conn *fc); - -/** - * Release reference to fuse_conn - */ -void fuse_conn_put(struct fuse_conn *fc); - -/** - * Add connection to control filesystem - */ -int fuse_ctl_add_conn(struct fuse_conn *fc); - -/** - * Remove connection from control filesystem - */ -void fuse_ctl_remove_conn(struct fuse_conn *fc); diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 3407d2ee7..762702244 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -11,20 +11,25 @@ #include #include #include +#include #include #include #include #include #include -#include MODULE_AUTHOR("Miklos Szeredi "); MODULE_DESCRIPTION("Filesystem in Userspace"); MODULE_LICENSE("GPL"); static kmem_cache_t *fuse_inode_cachep; -struct list_head fuse_conn_list; -DEFINE_MUTEX(fuse_mutex); +static struct subsystem connections_subsys; + +struct fuse_conn_attr { + struct attribute attr; + ssize_t (*show)(struct fuse_conn *, char *); + ssize_t (*store)(struct fuse_conn *, const char *, size_t); +}; #define FUSE_SUPER_MAGIC 0x65735546 @@ -51,7 +56,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb) return NULL; fi = get_fuse_inode(inode); - fi->i_time = 0; + fi->i_time = jiffies - 1; fi->nodeid = 0; fi->nlookup = 0; fi->forget_req = fuse_request_alloc(); @@ -99,17 +104,8 @@ static void fuse_clear_inode(struct inode *inode) } } -static int fuse_remount_fs(struct super_block *sb, int *flags, char *data) -{ - if (*flags & MS_MANDLOCK) - return -EINVAL; - - return 0; -} - void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr) { - struct fuse_conn *fc = get_fuse_conn(inode); if (S_ISREG(inode->i_mode) && i_size_read(inode) != attr->size) invalidate_inode_pages(inode->i_mapping); @@ -118,9 +114,8 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr) inode->i_nlink = attr->nlink; inode->i_uid = attr->uid; inode->i_gid = attr->gid; - spin_lock(&fc->lock); i_size_write(inode, attr->size); - spin_unlock(&fc->lock); + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = attr->blocks; inode->i_atime.tv_sec = attr->atime; inode->i_atime.tv_nsec = attr->atimensec; @@ -133,7 +128,7 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr) static void fuse_init_inode(struct inode *inode, struct fuse_attr *attr) { inode->i_mode = attr->mode & S_IFMT; - inode->i_size = attr->size; + i_size_write(inode, attr->size); if (S_ISREG(inode->i_mode)) { fuse_init_common(inode); fuse_init_file_inode(inode); @@ -200,29 +195,31 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, return inode; } -static void fuse_umount_begin(struct vfsmount *vfsmnt, int flags) +static void fuse_umount_begin(struct super_block *sb) { - if (flags & MNT_FORCE) - fuse_abort_conn(get_fuse_conn_super(vfsmnt->mnt_sb)); + fuse_abort_conn(get_fuse_conn_super(sb)); } static void fuse_put_super(struct super_block *sb) { struct fuse_conn *fc = get_fuse_conn_super(sb); + down_write(&fc->sbput_sem); + while (!list_empty(&fc->background)) + fuse_release_background(fc, + list_entry(fc->background.next, + struct fuse_req, bg_entry)); + spin_lock(&fc->lock); + fc->mounted = 0; fc->connected = 0; - fc->blocked = 0; spin_unlock(&fc->lock); + up_write(&fc->sbput_sem); /* Flush all readers on this fs */ kill_fasync(&fc->fasync, SIGIO, POLL_IN); wake_up_all(&fc->waitq); - wake_up_all(&fc->blocked_waitq); - mutex_lock(&fuse_mutex); - list_del(&fc->entry); - fuse_ctl_remove_conn(fc); - mutex_unlock(&fuse_mutex); - fuse_conn_put(fc); + kobject_del(&fc->kobj); + kobject_put(&fc->kobj); } static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr) @@ -239,9 +236,8 @@ static void convert_fuse_statfs(struct kstatfs *stbuf, struct fuse_kstatfs *attr /* fsid is left zero */ } -static int fuse_statfs(struct dentry *dentry, struct kstatfs *buf) +static int fuse_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; struct fuse_conn *fc = get_fuse_conn_super(sb); struct fuse_req *req; struct fuse_statfs_out outarg; @@ -372,6 +368,11 @@ static int fuse_show_options(struct seq_file *m, struct vfsmount *mnt) return 0; } +static void fuse_conn_release(struct kobject *kobj) +{ + kfree(get_fuse_conn_kobj(kobj)); +} + static struct fuse_conn *new_conn(void) { struct fuse_conn *fc; @@ -379,35 +380,24 @@ static struct fuse_conn *new_conn(void) fc = kzalloc(sizeof(*fc), GFP_KERNEL); if (fc) { spin_lock_init(&fc->lock); - atomic_set(&fc->count, 1); init_waitqueue_head(&fc->waitq); init_waitqueue_head(&fc->blocked_waitq); INIT_LIST_HEAD(&fc->pending); INIT_LIST_HEAD(&fc->processing); INIT_LIST_HEAD(&fc->io); - INIT_LIST_HEAD(&fc->interrupts); + INIT_LIST_HEAD(&fc->background); + init_rwsem(&fc->sbput_sem); + kobj_set_kset_s(fc, connections_subsys); + kobject_init(&fc->kobj); atomic_set(&fc->num_waiting, 0); fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE; fc->bdi.unplug_io_fn = default_unplug_io_fn; fc->reqctr = 0; fc->blocked = 1; - get_random_bytes(&fc->scramble_key, sizeof(fc->scramble_key)); } return fc; } -void fuse_conn_put(struct fuse_conn *fc) -{ - if (atomic_dec_and_test(&fc->count)) - kfree(fc); -} - -struct fuse_conn *fuse_conn_get(struct fuse_conn *fc) -{ - atomic_inc(&fc->count); - return fc; -} - static struct inode *get_root_inode(struct super_block *sb, unsigned mode) { struct fuse_attr attr; @@ -423,7 +413,6 @@ static struct super_operations fuse_super_operations = { .destroy_inode = fuse_destroy_inode, .read_inode = fuse_read_inode, .clear_inode = fuse_clear_inode, - .remount_fs = fuse_remount_fs, .put_super = fuse_put_super, .umount_begin = fuse_umount_begin, .statfs = fuse_statfs, @@ -443,12 +432,8 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) ra_pages = arg->max_readahead / PAGE_CACHE_SIZE; if (arg->flags & FUSE_ASYNC_READ) fc->async_read = 1; - if (!(arg->flags & FUSE_POSIX_LOCKS)) - fc->no_lock = 1; - } else { + } else ra_pages = fc->max_read / PAGE_CACHE_SIZE; - fc->no_lock = 1; - } fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages); fc->minor = arg->minor; @@ -466,7 +451,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) arg->major = FUSE_KERNEL_VERSION; arg->minor = FUSE_KERNEL_MINOR_VERSION; arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE; - arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS; + arg->flags |= FUSE_ASYNC_READ; req->in.h.opcode = FUSE_INIT; req->in.numargs = 1; req->in.args[0].size = sizeof(*arg); @@ -482,9 +467,10 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req) request_send_background(fc, req); } -static u64 conn_id(void) +static unsigned long long conn_id(void) { - static u64 ctr = 1; + /* BKL is held for ->get_sb() */ + static unsigned long long ctr = 1; return ctr++; } @@ -498,9 +484,6 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) struct fuse_req *init_req; int err; - if (sb->s_flags & MS_MANDLOCK) - return -EINVAL; - if (!parse_fuse_opt((char *) data, &d)) return -EINVAL; @@ -544,21 +527,25 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) if (!init_req) goto err_put_root; - mutex_lock(&fuse_mutex); - err = -EINVAL; - if (file->private_data) - goto err_unlock; + err = kobject_set_name(&fc->kobj, "%llu", conn_id()); + if (err) + goto err_free_req; - fc->id = conn_id(); - err = fuse_ctl_add_conn(fc); + err = kobject_add(&fc->kobj); if (err) - goto err_unlock; + goto err_free_req; + + /* Setting file->private_data can't race with other mount() + instances, since BKL is held for ->get_sb() */ + err = -EINVAL; + if (file->private_data) + goto err_kobject_del; - list_add_tail(&fc->entry, &fuse_conn_list); sb->s_root = root_dentry; + fc->mounted = 1; fc->connected = 1; - file->private_data = fuse_conn_get(fc); - mutex_unlock(&fuse_mutex); + kobject_get(&fc->kobj); + file->private_data = fc; /* * atomic_dec_and_test() in fput() provides the necessary * memory barrier for file->private_data to be visible on all @@ -570,22 +557,23 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) return 0; - err_unlock: - mutex_unlock(&fuse_mutex); + err_kobject_del: + kobject_del(&fc->kobj); + err_free_req: fuse_request_free(init_req); err_put_root: dput(root_dentry); err: fput(file); - fuse_conn_put(fc); + kobject_put(&fc->kobj); return err; } -static int fuse_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *raw_data, struct vfsmount *mnt) +static struct super_block *fuse_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *raw_data) { - return get_sb_nodev(fs_type, flags, raw_data, fuse_fill_super, mnt); + return get_sb_nodev(fs_type, flags, raw_data, fuse_fill_super); } static struct file_system_type fuse_fs_type = { @@ -595,8 +583,68 @@ static struct file_system_type fuse_fs_type = { .kill_sb = kill_anon_super, }; +static ssize_t fuse_conn_waiting_show(struct fuse_conn *fc, char *page) +{ + return sprintf(page, "%i\n", atomic_read(&fc->num_waiting)); +} + +static ssize_t fuse_conn_abort_store(struct fuse_conn *fc, const char *page, + size_t count) +{ + fuse_abort_conn(fc); + return count; +} + +static struct fuse_conn_attr fuse_conn_waiting = + __ATTR(waiting, 0400, fuse_conn_waiting_show, NULL); +static struct fuse_conn_attr fuse_conn_abort = + __ATTR(abort, 0600, NULL, fuse_conn_abort_store); + +static struct attribute *fuse_conn_attrs[] = { + &fuse_conn_waiting.attr, + &fuse_conn_abort.attr, + NULL, +}; + +static ssize_t fuse_conn_attr_show(struct kobject *kobj, + struct attribute *attr, + char *page) +{ + struct fuse_conn_attr *fca = + container_of(attr, struct fuse_conn_attr, attr); + + if (fca->show) + return fca->show(get_fuse_conn_kobj(kobj), page); + else + return -EACCES; +} + +static ssize_t fuse_conn_attr_store(struct kobject *kobj, + struct attribute *attr, + const char *page, size_t count) +{ + struct fuse_conn_attr *fca = + container_of(attr, struct fuse_conn_attr, attr); + + if (fca->store) + return fca->store(get_fuse_conn_kobj(kobj), page, count); + else + return -EACCES; +} + +static struct sysfs_ops fuse_conn_sysfs_ops = { + .show = &fuse_conn_attr_show, + .store = &fuse_conn_attr_store, +}; + +static struct kobj_type ktype_fuse_conn = { + .release = fuse_conn_release, + .sysfs_ops = &fuse_conn_sysfs_ops, + .default_attrs = fuse_conn_attrs, +}; + static decl_subsys(fuse, NULL, NULL); -static decl_subsys(connections, NULL, NULL); +static decl_subsys(connections, &ktype_fuse_conn, NULL); static void fuse_inode_init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) @@ -670,7 +718,6 @@ static int __init fuse_init(void) printk("fuse init (API version %i.%i)\n", FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION); - INIT_LIST_HEAD(&fuse_conn_list); res = fuse_fs_init(); if (res) goto err; @@ -683,14 +730,8 @@ static int __init fuse_init(void) if (res) goto err_dev_cleanup; - res = fuse_ctl_init(); - if (res) - goto err_sysfs_cleanup; - return 0; - err_sysfs_cleanup: - fuse_sysfs_cleanup(); err_dev_cleanup: fuse_dev_cleanup(); err_fs_cleanup: @@ -703,7 +744,6 @@ static void __exit fuse_exit(void) { printk(KERN_DEBUG "fuse exit\n"); - fuse_ctl_cleanup(); fuse_sysfs_cleanup(); fuse_fs_cleanup(); fuse_dev_cleanup(); diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 13231dd5c..1e44dcfe4 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -280,7 +280,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) block = off >> PAGE_CACHE_SHIFT; node->page_offset = off & ~PAGE_CACHE_MASK; for (i = 0; i < tree->pages_per_bnode; i++) { - page = read_mapping_page(mapping, block++, NULL); + page = read_cache_page(mapping, block++, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto fail; if (PageError(page)) { diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 400357994..d20131ce4 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c @@ -59,7 +59,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke unlock_new_inode(tree->inode); mapping = tree->inode->i_mapping; - page = read_mapping_page(mapping, 0, NULL); + page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto free_tree; diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index 735332dfd..3ed8663a8 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -182,8 +182,8 @@ extern void hfs_file_truncate(struct inode *); extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int); /* inode.c */ -extern const struct address_space_operations hfs_aops; -extern const struct address_space_operations hfs_btree_aops; +extern struct address_space_operations hfs_aops; +extern struct address_space_operations hfs_btree_aops; extern struct inode *hfs_new_inode(struct inode *, struct qstr *, int); extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *); diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index d05641c35..2d4ced222 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -114,7 +114,7 @@ static int hfs_writepages(struct address_space *mapping, return mpage_writepages(mapping, wbc, hfs_get_block); } -const struct address_space_operations hfs_btree_aops = { +struct address_space_operations hfs_btree_aops = { .readpage = hfs_readpage, .writepage = hfs_writepage, .sync_page = block_sync_page, @@ -124,7 +124,7 @@ const struct address_space_operations hfs_btree_aops = { .releasepage = hfs_releasepage, }; -const struct address_space_operations hfs_aops = { +struct address_space_operations hfs_aops = { .readpage = hfs_readpage, .writepage = hfs_writepage, .sync_page = block_sync_page, @@ -154,6 +154,7 @@ struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode) inode->i_gid = current->fsgid; inode->i_nlink = 1; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; + inode->i_blksize = HFS_SB(sb)->alloc_blksz; HFS_I(inode)->flags = 0; HFS_I(inode)->rsrc_inode = NULL; HFS_I(inode)->fs_blocks = 0; @@ -283,6 +284,7 @@ static int hfs_read_inode(struct inode *inode, void *data) inode->i_uid = hsb->s_uid; inode->i_gid = hsb->s_gid; inode->i_nlink = 1; + inode->i_blksize = HFS_SB(inode->i_sb)->alloc_blksz; if (idata->key) HFS_I(inode)->cat_key = *idata->key; diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 4af327a89..1181d1161 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -12,6 +12,7 @@ * Based on the minix file system code, (C) 1991, 1992 by Linus Torvalds */ +#include #include #include #include @@ -79,10 +80,8 @@ static void hfs_put_super(struct super_block *sb) * * changed f_files/f_ffree to reflect the fs_ablock/free_ablocks. */ -static int hfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int hfs_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - buf->f_type = HFS_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = (u32)HFS_SB(sb)->fs_ablocks * HFS_SB(sb)->fs_div; @@ -391,7 +390,6 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) hfs_find_exit(&fd); goto bail_no_root; } - res = -EINVAL; root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); hfs_find_exit(&fd); if (!root_inode) @@ -415,11 +413,10 @@ bail: return res; } -static int hfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block *hfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, hfs_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, hfs_fill_super); } static struct file_system_type hfs_fs_type = { diff --git a/fs/hfsplus/bitmap.c b/fs/hfsplus/bitmap.c index d128a25b7..9fb516323 100644 --- a/fs/hfsplus/bitmap.c +++ b/fs/hfsplus/bitmap.c @@ -31,7 +31,8 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *ma dprint(DBG_BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex); mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; - page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL); + page = read_cache_page(mapping, offset / PAGE_CACHE_BITS, + (filler_t *)mapping->a_ops->readpage, NULL); pptr = kmap(page); curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32; i = offset % 32; @@ -71,8 +72,8 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *ma offset += PAGE_CACHE_BITS; if (offset >= size) break; - page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, - NULL); + page = read_cache_page(mapping, offset / PAGE_CACHE_BITS, + (filler_t *)mapping->a_ops->readpage, NULL); curr = pptr = kmap(page); if ((size ^ offset) / PAGE_CACHE_BITS) end = pptr + PAGE_CACHE_BITS / 32; @@ -118,8 +119,8 @@ found: set_page_dirty(page); kunmap(page); offset += PAGE_CACHE_BITS; - page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, - NULL); + page = read_cache_page(mapping, offset / PAGE_CACHE_BITS, + (filler_t *)mapping->a_ops->readpage, NULL); pptr = kmap(page); curr = pptr; end = pptr + PAGE_CACHE_BITS / 32; @@ -166,7 +167,7 @@ int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count) mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex); mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; pnr = offset / PAGE_CACHE_BITS; - page = read_mapping_page(mapping, pnr, NULL); + page = read_cache_page(mapping, pnr, (filler_t *)mapping->a_ops->readpage, NULL); pptr = kmap(page); curr = pptr + (offset & (PAGE_CACHE_BITS - 1)) / 32; end = pptr + PAGE_CACHE_BITS / 32; @@ -198,7 +199,7 @@ int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count) break; set_page_dirty(page); kunmap(page); - page = read_mapping_page(mapping, ++pnr, NULL); + page = read_cache_page(mapping, ++pnr, (filler_t *)mapping->a_ops->readpage, NULL); pptr = kmap(page); curr = pptr; end = pptr + PAGE_CACHE_BITS / 32; diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 77bf434da..746abc9ec 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -440,7 +440,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) block = off >> PAGE_CACHE_SHIFT; node->page_offset = off & ~PAGE_CACHE_MASK; for (i = 0; i < tree->pages_per_bnode; block++, i++) { - page = read_mapping_page(mapping, block, NULL); + page = read_cache_page(mapping, block, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto fail; if (PageError(page)) { diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index cfc852fdd..effa89919 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c @@ -38,7 +38,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) goto free_tree; mapping = tree->inode->i_mapping; - page = read_mapping_page(mapping, 0, NULL); + page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto free_tree; diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 8a1ca5ef7..7ae393637 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h @@ -323,8 +323,8 @@ int hfsplus_file_extend(struct inode *); void hfsplus_file_truncate(struct inode *); /* inode.c */ -extern const struct address_space_operations hfsplus_aops; -extern const struct address_space_operations hfsplus_btree_aops; +extern struct address_space_operations hfsplus_aops; +extern struct address_space_operations hfsplus_btree_aops; void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *); void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *); diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 0eb1a6092..acf66dba3 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -109,7 +109,7 @@ static int hfsplus_writepages(struct address_space *mapping, return mpage_writepages(mapping, wbc, hfsplus_get_block); } -const struct address_space_operations hfsplus_btree_aops = { +struct address_space_operations hfsplus_btree_aops = { .readpage = hfsplus_readpage, .writepage = hfsplus_writepage, .sync_page = block_sync_page, @@ -119,7 +119,7 @@ const struct address_space_operations hfsplus_btree_aops = { .releasepage = hfsplus_releasepage, }; -const struct address_space_operations hfsplus_aops = { +struct address_space_operations hfsplus_aops = { .readpage = hfsplus_readpage, .writepage = hfsplus_writepage, .sync_page = block_sync_page, @@ -304,6 +304,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode) inode->i_gid = current->fsgid; inode->i_nlink = 1; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; + inode->i_blksize = HFSPLUS_SB(sb).alloc_blksz; INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list); init_MUTEX(&HFSPLUS_I(inode).extents_lock); atomic_set(&HFSPLUS_I(inode).opencnt, 0); @@ -406,6 +407,7 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset); HFSPLUS_I(inode).dev = 0; + inode->i_blksize = HFSPLUS_SB(inode->i_sb).alloc_blksz; if (type == HFSPLUS_FOLDER) { struct hfsplus_cat_folder *folder = &entry.folder; diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index d279d5924..7843f792a 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -211,10 +212,8 @@ static void hfsplus_put_super(struct super_block *sb) sb->s_fs_info = NULL; } -static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf) +static int hfsplus_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - buf->f_type = HFSPLUS_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = HFSPLUS_SB(sb).total_blocks << HFSPLUS_SB(sb).fs_shift; @@ -451,12 +450,10 @@ static void hfsplus_destroy_inode(struct inode *inode) #define HFSPLUS_INODE_SIZE sizeof(struct hfsplus_inode_info) -static int hfsplus_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block *hfsplus_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, hfsplus_fill_super); } static struct file_system_type hfsplus_fs_type = { diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 322e876c3..bf0f8e16e 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -54,7 +54,7 @@ static int append = 0; static struct inode_operations hostfs_iops; static struct inode_operations hostfs_dir_iops; -static const struct address_space_operations hostfs_link_aops; +static struct address_space_operations hostfs_link_aops; #ifndef MODULE static int __init hostfs_args(char *options, int *add) @@ -156,6 +156,7 @@ static int read_name(struct inode *ino, char *name) 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; return(0); } @@ -238,7 +239,7 @@ static int read_inode(struct inode *ino) return(err); } -int hostfs_statfs(struct dentry *dentry, struct kstatfs *sf) +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, @@ -251,7 +252,7 @@ int hostfs_statfs(struct dentry *dentry, struct kstatfs *sf) long long f_files; long long f_ffree; - err = do_statfs(HOSTFS_I(dentry->d_sb->s_root->d_inode)->host_filename, + 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); @@ -517,7 +518,7 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from, return(err); } -static const struct address_space_operations hostfs_aops = { +static struct address_space_operations hostfs_aops = { .writepage = hostfs_writepage, .readpage = hostfs_readpage, .set_page_dirty = __set_page_dirty_nobuffers, @@ -934,7 +935,7 @@ int hostfs_link_readpage(struct file *file, struct page *page) return(err); } -static const struct address_space_operations hostfs_link_aops = { +static struct address_space_operations hostfs_link_aops = { .readpage = hostfs_link_readpage, }; @@ -992,11 +993,11 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent) return(err); } -static int hostfs_read_sb(struct file_system_type *type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +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, mnt); + return(get_sb_nodev(type, flags, data, hostfs_fill_sb_common)); } static struct file_system_type hostfs_type = { diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index d9eb19b7b..d3b9fffe4 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c @@ -99,7 +99,7 @@ static sector_t _hpfs_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,hpfs_get_block); } -const struct address_space_operations hpfs_aops = { +struct address_space_operations hpfs_aops = { .readpage = hpfs_readpage, .writepage = hpfs_writepage, .sync_page = block_sync_page, diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index f687d54ed..29b7a3e55 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -268,7 +268,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, char *, char *, int); int hpfs_file_fsync(struct file *, struct dentry *, int); extern const struct file_operations hpfs_file_ops; extern struct inode_operations hpfs_file_iops; -extern const struct address_space_operations hpfs_aops; +extern struct address_space_operations hpfs_aops; /* inode.c */ @@ -304,7 +304,7 @@ void hpfs_decide_conv(struct inode *, unsigned char *, unsigned); /* namei.c */ extern struct inode_operations hpfs_dir_iops; -extern const struct address_space_operations hpfs_symlink_aops; +extern struct address_space_operations hpfs_symlink_aops; static inline struct hpfs_inode_info *hpfs_i(struct inode *inode) { diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index bcf6ee36e..56f2c338c 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c @@ -17,6 +17,7 @@ void hpfs_init_inode(struct inode *i) i->i_gid = hpfs_sb(sb)->sb_gid; i->i_mode = hpfs_sb(sb)->sb_mode; hpfs_inode->i_conv = hpfs_sb(sb)->sb_conv; + i->i_blksize = 512; i->i_size = -1; i->i_blocks = -1; diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 59e7dc182..a03abb12c 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -538,7 +538,7 @@ fail: return err; } -const struct address_space_operations hpfs_symlink_aops = { +struct address_space_operations hpfs_symlink_aops = { .readpage = hpfs_symlink_readpage }; diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index f798480a3..d72d8c87c 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -135,9 +135,8 @@ static unsigned count_bitmaps(struct super_block *s) return count; } -static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int hpfs_statfs(struct super_block *s, struct kstatfs *buf) { - struct super_block *s = dentry->d_sb; struct hpfs_sb_info *sbi = hpfs_sb(s); lock_kernel(); @@ -663,11 +662,10 @@ bail0: return -EINVAL; } -static int hpfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *hpfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super); } static struct file_system_type hpfs_fs_type = { diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c index dcb6d2e98..5e6363be2 100644 --- a/fs/hppfs/hppfs_kern.c +++ b/fs/hppfs/hppfs_kern.c @@ -152,6 +152,7 @@ static void hppfs_read_inode(struct inode *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; } @@ -615,7 +616,7 @@ static const struct file_operations hppfs_dir_fops = { .fsync = hppfs_fsync, }; -static int hppfs_statfs(struct dentry *dentry, struct kstatfs *sf) +static int hppfs_statfs(struct super_block *sb, struct kstatfs *sf) { sf->f_blocks = 0; sf->f_bfree = 0; @@ -768,11 +769,11 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent) return(err); } -static int hppfs_read_super(struct file_system_type *type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +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, mnt); + return(get_sb_nodev(type, flags, data, hppfs_fill_super)); } static struct file_system_type hppfs_type = { diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index e025a31b4..3a5b4e923 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -34,7 +34,7 @@ #define HUGETLBFS_MAGIC 0x958458f6 static struct super_operations hugetlbfs_ops; -static const struct address_space_operations hugetlbfs_aops; +static struct address_space_operations hugetlbfs_aops; const struct file_operations hugetlbfs_file_operations; static struct inode_operations hugetlbfs_dir_inode_operations; static struct inode_operations hugetlbfs_inode_operations; @@ -59,6 +59,7 @@ static void huge_pagevec_release(struct pagevec *pvec) static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) { struct inode *inode = file->f_dentry->d_inode; + struct hugetlbfs_inode_info *info = HUGETLBFS_I(inode); loff_t len, vma_len; int ret; @@ -83,15 +84,16 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) ret = -ENOMEM; len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); - - if (vma->vm_flags & VM_MAYSHARE && - hugetlb_reserve_pages(inode, vma->vm_pgoff >> (HPAGE_SHIFT-PAGE_SHIFT), - len >> HPAGE_SHIFT)) + if (!(vma->vm_flags & VM_WRITE) && len > inode->i_size) goto out; + if (vma->vm_flags & VM_MAYSHARE) + if (hugetlb_extend_reservation(info, len >> HPAGE_SHIFT) != 0) + goto out; + ret = 0; hugetlb_prefault_arch_hook(vma->vm_mm); - if (vma->vm_flags & VM_WRITE && inode->i_size < len) + if (inode->i_size < len) inode->i_size = len; out: mutex_unlock(&inode->i_mutex); @@ -193,8 +195,12 @@ static void truncate_hugepages(struct inode *inode, loff_t lstart) const pgoff_t start = lstart >> HPAGE_SHIFT; struct pagevec pvec; pgoff_t next; - int i, freed = 0; + int i; + hugetlb_truncate_reservation(HUGETLBFS_I(inode), + lstart >> HPAGE_SHIFT); + if (!mapping->nrpages) + return; pagevec_init(&pvec, 0); next = start; while (1) { @@ -215,12 +221,10 @@ static void truncate_hugepages(struct inode *inode, loff_t lstart) truncate_huge_page(page); unlock_page(page); hugetlb_put_quota(mapping); - freed++; } huge_pagevec_release(&pvec); } BUG_ON(!lstart && mapping->nrpages); - hugetlb_unreserve_pages(inode, start, freed); } static void hugetlbfs_delete_inode(struct inode *inode) @@ -357,11 +361,11 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb, uid_t uid, inode->i_mode = mode; inode->i_uid = uid; inode->i_gid = gid; + inode->i_blksize = HPAGE_SIZE; inode->i_blocks = 0; inode->i_mapping->a_ops = &hugetlbfs_aops; inode->i_mapping->backing_dev_info =&hugetlbfs_backing_dev_info; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; - INIT_LIST_HEAD(&inode->i_mapping->private_list); info = HUGETLBFS_I(inode); mpol_shared_policy_init(&info->policy, MPOL_DEFAULT, NULL); switch (mode & S_IFMT) { @@ -463,9 +467,9 @@ static int hugetlbfs_set_page_dirty(struct page *page) return 0; } -static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int hugetlbfs_statfs(struct super_block *sb, struct kstatfs *buf) { - struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(dentry->d_sb); + struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(sb); buf->f_type = HUGETLBFS_MAGIC; buf->f_bsize = HPAGE_SIZE; @@ -534,6 +538,7 @@ static struct inode *hugetlbfs_alloc_inode(struct super_block *sb) hugetlbfs_inc_free_inodes(sbinfo); return NULL; } + p->prereserved_hpages = 0; return &p->vfs_inode; } @@ -544,7 +549,7 @@ static void hugetlbfs_destroy_inode(struct inode *inode) kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode)); } -static const struct address_space_operations hugetlbfs_aops = { +static struct address_space_operations hugetlbfs_aops = { .readpage = hugetlbfs_readpage, .prepare_write = hugetlbfs_prepare_write, .commit_write = hugetlbfs_commit_write, @@ -718,10 +723,10 @@ void hugetlb_put_quota(struct address_space *mapping) } } -static int hugetlbfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *hugetlbfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, hugetlbfs_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, hugetlbfs_fill_super); } static struct file_system_type hugetlbfs_fs_type = { @@ -776,7 +781,8 @@ struct file *hugetlb_zero_setup(size_t size) goto out_file; error = -ENOMEM; - if (hugetlb_reserve_pages(inode, 0, size >> HPAGE_SHIFT)) + if (hugetlb_extend_reservation(HUGETLBFS_I(inode), + size >> HPAGE_SHIFT) != 0) goto out_inode; d_instantiate(dentry, inode); diff --git a/fs/inode.c b/fs/inode.c index e5a4dc1c4..79a986f5a 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -4,6 +4,7 @@ * (C) 1997 Linus Torvalds */ +#include #include #include #include @@ -101,7 +102,7 @@ static kmem_cache_t * inode_cachep __read_mostly; static struct inode *alloc_inode(struct super_block *sb) { - static const struct address_space_operations empty_aops; + static struct address_space_operations empty_aops; static struct inode_operations empty_iops; static const struct file_operations empty_fops; struct inode *inode; @@ -166,7 +167,7 @@ static struct inode *alloc_inode(struct super_block *sb) bdi = sb->s_bdev->bd_inode->i_mapping->backing_dev_info; mapping->backing_dev_info = bdi; } - inode->i_private = 0; + memset(&inode->u, 0, sizeof(inode->u)); inode->i_mapping = mapping; } return inode; @@ -259,9 +260,9 @@ void clear_inode(struct inode *inode) DQUOT_DROP(inode); if (inode->i_sb && inode->i_sb->s_op->clear_inode) inode->i_sb->s_op->clear_inode(inode); - if (S_ISBLK(inode->i_mode) && inode->i_bdev) + if (inode->i_bdev) bd_forget(inode); - if (S_ISCHR(inode->i_mode) && inode->i_cdev) + if (inode->i_cdev) cd_forget(inode); inode->i_state = I_CLEAR; } @@ -456,14 +457,15 @@ static void prune_icache(int nr_to_scan) nr_pruned++; } inodes_stat.nr_unused -= nr_pruned; - if (current_is_kswapd()) - __count_vm_events(KSWAPD_INODESTEAL, reap); - else - __count_vm_events(PGINODESTEAL, reap); spin_unlock(&inode_lock); dispose_list(&freeable); mutex_unlock(&iprune_mutex); + + if (current_is_kswapd()) + mod_page_state(kswapd_inodesteal, reap); + else + mod_page_state(pginodesteal, reap); } /* diff --git a/fs/inotify.c b/fs/inotify.c index 723836a1f..732ec4bd5 100644 --- a/fs/inotify.c +++ b/fs/inotify.c @@ -5,10 +5,7 @@ * John McCutchan * Robert Love * - * Kernel API added by: Amy Griffis - * * Copyright (C) 2005 John McCutchan - * Copyright 2006 Hewlett-Packard Development Company, L.P. * * 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 @@ -23,17 +20,35 @@ #include #include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include #include +#include + +#include static atomic_t inotify_cookie; +static kmem_cache_t *watch_cachep __read_mostly; +static kmem_cache_t *event_cachep __read_mostly; + +static struct vfsmount *inotify_mnt __read_mostly; + +/* these are configurable via /proc/sys/fs/inotify/ */ +int inotify_max_user_instances __read_mostly; +int inotify_max_user_watches __read_mostly; +int inotify_max_queued_events __read_mostly; + /* * Lock ordering: * @@ -41,110 +56,329 @@ static atomic_t inotify_cookie; * iprune_mutex (synchronize shrink_icache_memory()) * inode_lock (protects the super_block->s_inodes list) * inode->inotify_mutex (protects inode->inotify_watches and watches->i_list) - * inotify_handle->mutex (protects inotify_handle and watches->h_list) - * - * The inode->inotify_mutex and inotify_handle->mutex and held during execution - * of a caller's event handler. Thus, the caller must not hold any locks - * taken in their event handler while calling any of the published inotify - * interfaces. + * inotify_dev->mutex (protects inotify_device and watches->d_list) */ /* - * Lifetimes of the three main data structures--inotify_handle, inode, and + * Lifetimes of the three main data structures--inotify_device, inode, and * inotify_watch--are managed by reference count. * - * inotify_handle: Lifetime is from inotify_init() to inotify_destroy(). - * Additional references can bump the count via get_inotify_handle() and drop - * the count via put_inotify_handle(). + * inotify_device: Lifetime is from inotify_init() until release. Additional + * references can bump the count via get_inotify_dev() and drop the count via + * put_inotify_dev(). * - * inotify_watch: for inotify's purposes, lifetime is from inotify_add_watch() - * to remove_watch_no_event(). Additional references can bump the count via - * get_inotify_watch() and drop the count via put_inotify_watch(). The caller - * is reponsible for the final put after receiving IN_IGNORED, or when using - * IN_ONESHOT after receiving the first event. Inotify does the final put if - * inotify_destroy() is called. + * inotify_watch: Lifetime is from create_watch() to destory_watch(). + * Additional references can bump the count via get_inotify_watch() and drop + * the count via put_inotify_watch(). * * inode: Pinned so long as the inode is associated with a watch, from - * inotify_add_watch() to the final put_inotify_watch(). + * create_watch() to put_inotify_watch(). */ /* - * struct inotify_handle - represents an inotify instance + * struct inotify_device - represents an inotify instance * * This structure is protected by the mutex 'mutex'. */ -struct inotify_handle { +struct inotify_device { + wait_queue_head_t wq; /* wait queue for i/o */ struct idr idr; /* idr mapping wd -> watch */ struct mutex mutex; /* protects this bad boy */ + struct list_head events; /* list of queued events */ struct list_head watches; /* list of watches */ atomic_t count; /* reference count */ + struct user_struct *user; /* user who opened this dev */ + unsigned int queue_size; /* size of the queue (bytes) */ + unsigned int event_count; /* number of pending events */ + unsigned int max_events; /* maximum number of events */ u32 last_wd; /* the last wd allocated */ - const struct inotify_operations *in_ops; /* inotify caller operations */ }; -static inline void get_inotify_handle(struct inotify_handle *ih) +/* + * struct inotify_kernel_event - An inotify event, originating from a watch and + * queued for user-space. A list of these is attached to each instance of the + * device. In read(), this list is walked and all events that can fit in the + * buffer are returned. + * + * Protected by dev->mutex of the device in which we are queued. + */ +struct inotify_kernel_event { + struct inotify_event event; /* the user-space event */ + struct list_head list; /* entry in inotify_device's list */ + char *name; /* filename, if any */ +}; + +/* + * struct inotify_watch - represents a watch request on a specific inode + * + * d_list is protected by dev->mutex of the associated watch->dev. + * i_list and mask are protected by inode->inotify_mutex of the associated inode. + * dev, inode, and wd are never written to once the watch is created. + */ +struct inotify_watch { + struct list_head d_list; /* entry in inotify_device's list */ + struct list_head i_list; /* entry in inode's list */ + atomic_t count; /* reference count */ + struct inotify_device *dev; /* associated device */ + struct inode *inode; /* associated inode */ + s32 wd; /* watch descriptor */ + u32 mask; /* event mask for this watch */ +}; + +#ifdef CONFIG_SYSCTL + +#include + +static int zero; + +ctl_table inotify_table[] = { + { + .ctl_name = INOTIFY_MAX_USER_INSTANCES, + .procname = "max_user_instances", + .data = &inotify_max_user_instances, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &zero, + }, + { + .ctl_name = INOTIFY_MAX_USER_WATCHES, + .procname = "max_user_watches", + .data = &inotify_max_user_watches, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &zero, + }, + { + .ctl_name = INOTIFY_MAX_QUEUED_EVENTS, + .procname = "max_queued_events", + .data = &inotify_max_queued_events, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + .extra1 = &zero + }, + { .ctl_name = 0 } +}; +#endif /* CONFIG_SYSCTL */ + +static inline void get_inotify_dev(struct inotify_device *dev) { - atomic_inc(&ih->count); + atomic_inc(&dev->count); } -static inline void put_inotify_handle(struct inotify_handle *ih) +static inline void put_inotify_dev(struct inotify_device *dev) { - if (atomic_dec_and_test(&ih->count)) { - idr_destroy(&ih->idr); - kfree(ih); + if (atomic_dec_and_test(&dev->count)) { + atomic_dec(&dev->user->inotify_devs); + free_uid(dev->user); + idr_destroy(&dev->idr); + kfree(dev); } } -/** - * get_inotify_watch - grab a reference to an inotify_watch - * @watch: watch to grab - */ -void get_inotify_watch(struct inotify_watch *watch) +static inline void get_inotify_watch(struct inotify_watch *watch) { atomic_inc(&watch->count); } -EXPORT_SYMBOL_GPL(get_inotify_watch); -/** +/* * put_inotify_watch - decrements the ref count on a given watch. cleans up - * watch references if the count reaches zero. inotify_watch is freed by - * inotify callers via the destroy_watch() op. - * @watch: watch to release + * the watch and its references if the count reaches zero. */ -void put_inotify_watch(struct inotify_watch *watch) +static inline void put_inotify_watch(struct inotify_watch *watch) { if (atomic_dec_and_test(&watch->count)) { - struct inotify_handle *ih = watch->ih; - + put_inotify_dev(watch->dev); iput(watch->inode); - ih->in_ops->destroy_watch(watch); - put_inotify_handle(ih); + kmem_cache_free(watch_cachep, watch); + } +} + +/* + * kernel_event - create a new kernel event with the given parameters + * + * This function can sleep. + */ +static struct inotify_kernel_event * kernel_event(s32 wd, u32 mask, u32 cookie, + const char *name) +{ + struct inotify_kernel_event *kevent; + + kevent = kmem_cache_alloc(event_cachep, GFP_KERNEL); + if (unlikely(!kevent)) + return NULL; + + /* we hand this out to user-space, so zero it just in case */ + memset(&kevent->event, 0, sizeof(struct inotify_event)); + + kevent->event.wd = wd; + kevent->event.mask = mask; + kevent->event.cookie = cookie; + + INIT_LIST_HEAD(&kevent->list); + + if (name) { + size_t len, rem, event_size = sizeof(struct inotify_event); + + /* + * We need to pad the filename so as to properly align an + * array of inotify_event structures. Because the structure is + * small and the common case is a small filename, we just round + * up to the next multiple of the structure's sizeof. This is + * simple and safe for all architectures. + */ + len = strlen(name) + 1; + rem = event_size - len; + if (len > event_size) { + rem = event_size - (len % event_size); + if (len % event_size == 0) + rem = 0; + } + + kevent->name = kmalloc(len + rem, GFP_KERNEL); + if (unlikely(!kevent->name)) { + kmem_cache_free(event_cachep, kevent); + return NULL; + } + memcpy(kevent->name, name, len); + if (rem) + memset(kevent->name + len, 0, rem); + kevent->event.len = len + rem; + } else { + kevent->event.len = 0; + kevent->name = NULL; + } + + return kevent; +} + +/* + * inotify_dev_get_event - return the next event in the given dev's queue + * + * Caller must hold dev->mutex. + */ +static inline struct inotify_kernel_event * +inotify_dev_get_event(struct inotify_device *dev) +{ + return list_entry(dev->events.next, struct inotify_kernel_event, list); +} + +/* + * inotify_dev_queue_event - add a new event to the given device + * + * Caller must hold dev->mutex. Can sleep (calls kernel_event()). + */ +static void inotify_dev_queue_event(struct inotify_device *dev, + struct inotify_watch *watch, u32 mask, + u32 cookie, const char *name) +{ + struct inotify_kernel_event *kevent, *last; + + /* coalescing: drop this event if it is a dupe of the previous */ + last = inotify_dev_get_event(dev); + if (last && last->event.mask == mask && last->event.wd == watch->wd && + last->event.cookie == cookie) { + const char *lastname = last->name; + + if (!name && !lastname) + return; + if (name && lastname && !strcmp(lastname, name)) + return; + } + + /* the queue overflowed and we already sent the Q_OVERFLOW event */ + if (unlikely(dev->event_count > dev->max_events)) + return; + + /* if the queue overflows, we need to notify user space */ + if (unlikely(dev->event_count == dev->max_events)) + kevent = kernel_event(-1, IN_Q_OVERFLOW, cookie, NULL); + else + kevent = kernel_event(watch->wd, mask, cookie, name); + + if (unlikely(!kevent)) + return; + + /* queue the event and wake up anyone waiting */ + dev->event_count++; + dev->queue_size += sizeof(struct inotify_event) + kevent->event.len; + list_add_tail(&kevent->list, &dev->events); + wake_up_interruptible(&dev->wq); +} + +/* + * remove_kevent - cleans up and ultimately frees the given kevent + * + * Caller must hold dev->mutex. + */ +static void remove_kevent(struct inotify_device *dev, + struct inotify_kernel_event *kevent) +{ + list_del(&kevent->list); + + dev->event_count--; + dev->queue_size -= sizeof(struct inotify_event) + kevent->event.len; + + kfree(kevent->name); + kmem_cache_free(event_cachep, kevent); +} + +/* + * inotify_dev_event_dequeue - destroy an event on the given device + * + * Caller must hold dev->mutex. + */ +static void inotify_dev_event_dequeue(struct inotify_device *dev) +{ + if (!list_empty(&dev->events)) { + struct inotify_kernel_event *kevent; + kevent = inotify_dev_get_event(dev); + remove_kevent(dev, kevent); } } -EXPORT_SYMBOL_GPL(put_inotify_watch); /* - * inotify_handle_get_wd - returns the next WD for use by the given handle + * inotify_dev_get_wd - returns the next WD for use by the given dev * - * Callers must hold ih->mutex. This function can sleep. + * Callers must hold dev->mutex. This function can sleep. */ -static int inotify_handle_get_wd(struct inotify_handle *ih, - struct inotify_watch *watch) +static int inotify_dev_get_wd(struct inotify_device *dev, + struct inotify_watch *watch) { int ret; do { - if (unlikely(!idr_pre_get(&ih->idr, GFP_KERNEL))) + if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL))) return -ENOSPC; - ret = idr_get_new_above(&ih->idr, watch, ih->last_wd+1, &watch->wd); + ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd); } while (ret == -EAGAIN); - if (likely(!ret)) - ih->last_wd = watch->wd; - return ret; } +/* + * find_inode - resolve a user-given path to a specific inode and return a nd + */ +static int find_inode(const char __user *dirname, struct nameidata *nd, + unsigned flags) +{ + int error; + + error = __user_walk(dirname, flags, nd); + if (error) + return error; + /* you can only watch an inode if you have read permissions on it */ + error = vfs_permission(nd, MAY_READ); + if (error) + path_release(nd); + return error; +} + /* * inotify_inode_watched - returns nonzero if there are watches on this inode * and zero otherwise. We call this lockless, we do not care if we race. @@ -188,18 +422,67 @@ static void set_dentry_child_flags(struct inode *inode, int watched) } /* - * inotify_find_handle - find the watch associated with the given inode and - * handle + * create_watch - creates a watch on the given device. + * + * Callers must hold dev->mutex. Calls inotify_dev_get_wd() so may sleep. + * Both 'dev' and 'inode' (by way of nameidata) need to be pinned. + */ +static struct inotify_watch *create_watch(struct inotify_device *dev, + u32 mask, struct inode *inode) +{ + struct inotify_watch *watch; + int ret; + + if (atomic_read(&dev->user->inotify_watches) >= + inotify_max_user_watches) + return ERR_PTR(-ENOSPC); + + watch = kmem_cache_alloc(watch_cachep, GFP_KERNEL); + if (unlikely(!watch)) + return ERR_PTR(-ENOMEM); + + ret = inotify_dev_get_wd(dev, watch); + if (unlikely(ret)) { + kmem_cache_free(watch_cachep, watch); + return ERR_PTR(ret); + } + + dev->last_wd = watch->wd; + watch->mask = mask; + atomic_set(&watch->count, 0); + INIT_LIST_HEAD(&watch->d_list); + INIT_LIST_HEAD(&watch->i_list); + + /* save a reference to device and bump the count to make it official */ + get_inotify_dev(dev); + watch->dev = dev; + + /* + * Save a reference to the inode and bump the ref count to make it + * official. We hold a reference to nameidata, which makes this safe. + */ + watch->inode = igrab(inode); + + /* bump our own count, corresponding to our entry in dev->watches */ + get_inotify_watch(watch); + + atomic_inc(&dev->user->inotify_watches); + + return watch; +} + +/* + * inotify_find_dev - find the watch associated with the given inode and dev * * Callers must hold inode->inotify_mutex. */ -static struct inotify_watch *inode_find_handle(struct inode *inode, - struct inotify_handle *ih) +static struct inotify_watch *inode_find_dev(struct inode *inode, + struct inotify_device *dev) { struct inotify_watch *watch; list_for_each_entry(watch, &inode->inotify_watches, i_list) { - if (watch->ih == ih) + if (watch->dev == dev) return watch; } @@ -207,40 +490,40 @@ static struct inotify_watch *inode_find_handle(struct inode *inode, } /* - * remove_watch_no_event - remove watch without the IN_IGNORED event. - * - * Callers must hold both inode->inotify_mutex and ih->mutex. + * remove_watch_no_event - remove_watch() without the IN_IGNORED event. */ static void remove_watch_no_event(struct inotify_watch *watch, - struct inotify_handle *ih) + struct inotify_device *dev) { list_del(&watch->i_list); - list_del(&watch->h_list); + list_del(&watch->d_list); if (!inotify_inode_watched(watch->inode)) set_dentry_child_flags(watch->inode, 0); - idr_remove(&ih->idr, watch->wd); + atomic_dec(&dev->user->inotify_watches); + idr_remove(&dev->idr, watch->wd); + put_inotify_watch(watch); } -/** - * inotify_remove_watch_locked - Remove a watch from both the handle and the - * inode. Sends the IN_IGNORED event signifying that the inode is no longer - * watched. May be invoked from a caller's event handler. - * @ih: inotify handle associated with watch - * @watch: watch to remove +/* + * remove_watch - Remove a watch from both the device and the inode. Sends + * the IN_IGNORED event to the given device signifying that the inode is no + * longer watched. + * + * Callers must hold both inode->inotify_mutex and dev->mutex. We drop a + * reference to the inode before returning. * - * Callers must hold both inode->inotify_mutex and ih->mutex. + * The inode is not iput() so as to remain atomic. If the inode needs to be + * iput(), the call returns one. Otherwise, it returns zero. */ -void inotify_remove_watch_locked(struct inotify_handle *ih, - struct inotify_watch *watch) +static void remove_watch(struct inotify_watch *watch,struct inotify_device *dev) { - remove_watch_no_event(watch, ih); - ih->in_ops->handle_event(watch, watch->wd, IN_IGNORED, 0, NULL, NULL); + inotify_dev_queue_event(dev, watch, IN_IGNORED, 0, NULL); + remove_watch_no_event(watch, dev); } -EXPORT_SYMBOL_GPL(inotify_remove_watch_locked); -/* Kernel API for producing events */ +/* Kernel API */ /* * inotify_d_instantiate - instantiate dcache entry for inode @@ -280,10 +563,9 @@ void inotify_d_move(struct dentry *entry) * @mask: event mask describing this event * @cookie: cookie for synchronization, or zero * @name: filename, if any - * @n_inode: inode associated with name */ void inotify_inode_queue_event(struct inode *inode, u32 mask, u32 cookie, - const char *name, struct inode *n_inode) + const char *name) { struct inotify_watch *watch, *next; @@ -294,13 +576,14 @@ void inotify_inode_queue_event(struct inode *inode, u32 mask, u32 cookie, list_for_each_entry_safe(watch, next, &inode->inotify_watches, i_list) { u32 watch_mask = watch->mask; if (watch_mask & mask) { - struct inotify_handle *ih= watch->ih; - mutex_lock(&ih->mutex); + struct inotify_device *dev = watch->dev; + get_inotify_watch(watch); + mutex_lock(&dev->mutex); + inotify_dev_queue_event(dev, watch, mask, cookie, name); if (watch_mask & IN_ONESHOT) - remove_watch_no_event(watch, ih); - ih->in_ops->handle_event(watch, watch->wd, mask, cookie, - name, n_inode); - mutex_unlock(&ih->mutex); + remove_watch_no_event(watch, dev); + mutex_unlock(&dev->mutex); + put_inotify_watch(watch); } } mutex_unlock(&inode->inotify_mutex); @@ -330,8 +613,7 @@ void inotify_dentry_parent_queue_event(struct dentry *dentry, u32 mask, if (inotify_inode_watched(inode)) { dget(parent); spin_unlock(&dentry->d_lock); - inotify_inode_queue_event(inode, mask, cookie, name, - dentry->d_inode); + inotify_inode_queue_event(inode, mask, cookie, name); dput(parent); } else spin_unlock(&dentry->d_lock); @@ -383,7 +665,7 @@ void inotify_unmount_inodes(struct list_head *list) need_iput_tmp = need_iput; need_iput = NULL; - /* In case inotify_remove_watch_locked() drops a reference. */ + /* In case the remove_watch() drops a reference. */ if (inode != need_iput_tmp) __iget(inode); else @@ -412,12 +694,11 @@ void inotify_unmount_inodes(struct list_head *list) mutex_lock(&inode->inotify_mutex); watches = &inode->inotify_watches; list_for_each_entry_safe(watch, next_w, watches, i_list) { - struct inotify_handle *ih= watch->ih; - mutex_lock(&ih->mutex); - ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0, - NULL, NULL); - inotify_remove_watch_locked(ih, watch); - mutex_unlock(&ih->mutex); + struct inotify_device *dev = watch->dev; + mutex_lock(&dev->mutex); + inotify_dev_queue_event(dev, watch, IN_UNMOUNT,0,NULL); + remove_watch(watch, dev); + mutex_unlock(&dev->mutex); } mutex_unlock(&inode->inotify_mutex); iput(inode); @@ -437,292 +718,432 @@ void inotify_inode_is_dead(struct inode *inode) mutex_lock(&inode->inotify_mutex); list_for_each_entry_safe(watch, next, &inode->inotify_watches, i_list) { - struct inotify_handle *ih = watch->ih; - mutex_lock(&ih->mutex); - inotify_remove_watch_locked(ih, watch); - mutex_unlock(&ih->mutex); + struct inotify_device *dev = watch->dev; + mutex_lock(&dev->mutex); + remove_watch(watch, dev); + mutex_unlock(&dev->mutex); } mutex_unlock(&inode->inotify_mutex); } EXPORT_SYMBOL_GPL(inotify_inode_is_dead); -/* Kernel Consumer API */ +/* Device Interface */ -/** - * inotify_init - allocate and initialize an inotify instance - * @ops: caller's inotify operations - */ -struct inotify_handle *inotify_init(const struct inotify_operations *ops) +static unsigned int inotify_poll(struct file *file, poll_table *wait) { - struct inotify_handle *ih; - - ih = kmalloc(sizeof(struct inotify_handle), GFP_KERNEL); - if (unlikely(!ih)) - return ERR_PTR(-ENOMEM); + struct inotify_device *dev = file->private_data; + int ret = 0; - idr_init(&ih->idr); - INIT_LIST_HEAD(&ih->watches); - mutex_init(&ih->mutex); - ih->last_wd = 0; - ih->in_ops = ops; - atomic_set(&ih->count, 0); - get_inotify_handle(ih); + poll_wait(file, &dev->wq, wait); + mutex_lock(&dev->mutex); + if (!list_empty(&dev->events)) + ret = POLLIN | POLLRDNORM; + mutex_unlock(&dev->mutex); - return ih; + return ret; } -EXPORT_SYMBOL_GPL(inotify_init); -/** - * inotify_init_watch - initialize an inotify watch - * @watch: watch to initialize - */ -void inotify_init_watch(struct inotify_watch *watch) +static ssize_t inotify_read(struct file *file, char __user *buf, + size_t count, loff_t *pos) { - INIT_LIST_HEAD(&watch->h_list); - INIT_LIST_HEAD(&watch->i_list); - atomic_set(&watch->count, 0); - get_inotify_watch(watch); /* initial get */ + size_t event_size = sizeof (struct inotify_event); + struct inotify_device *dev; + char __user *start; + int ret; + DEFINE_WAIT(wait); + + start = buf; + dev = file->private_data; + + while (1) { + int events; + + prepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE); + + mutex_lock(&dev->mutex); + events = !list_empty(&dev->events); + mutex_unlock(&dev->mutex); + if (events) { + ret = 0; + break; + } + + if (file->f_flags & O_NONBLOCK) { + ret = -EAGAIN; + break; + } + + if (signal_pending(current)) { + ret = -EINTR; + break; + } + + schedule(); + } + + finish_wait(&dev->wq, &wait); + if (ret) + return ret; + + mutex_lock(&dev->mutex); + while (1) { + struct inotify_kernel_event *kevent; + + ret = buf - start; + if (list_empty(&dev->events)) + break; + + kevent = inotify_dev_get_event(dev); + if (event_size + kevent->event.len > count) + break; + + if (copy_to_user(buf, &kevent->event, event_size)) { + ret = -EFAULT; + break; + } + buf += event_size; + count -= event_size; + + if (kevent->name) { + if (copy_to_user(buf, kevent->name, kevent->event.len)){ + ret = -EFAULT; + break; + } + buf += kevent->event.len; + count -= kevent->event.len; + } + + remove_kevent(dev, kevent); + } + mutex_unlock(&dev->mutex); + + return ret; } -EXPORT_SYMBOL_GPL(inotify_init_watch); -/** - * inotify_destroy - clean up and destroy an inotify instance - * @ih: inotify handle - */ -void inotify_destroy(struct inotify_handle *ih) +static int inotify_release(struct inode *ignored, struct file *file) { + struct inotify_device *dev = file->private_data; + /* - * Destroy all of the watches for this handle. Unfortunately, not very + * Destroy all of the watches on this device. Unfortunately, not very * pretty. We cannot do a simple iteration over the list, because we * do not know the inode until we iterate to the watch. But we need to - * hold inode->inotify_mutex before ih->mutex. The following works. + * hold inode->inotify_mutex before dev->mutex. The following works. */ while (1) { struct inotify_watch *watch; struct list_head *watches; struct inode *inode; - mutex_lock(&ih->mutex); - watches = &ih->watches; + mutex_lock(&dev->mutex); + watches = &dev->watches; if (list_empty(watches)) { - mutex_unlock(&ih->mutex); + mutex_unlock(&dev->mutex); break; } - watch = list_entry(watches->next, struct inotify_watch, h_list); + watch = list_entry(watches->next, struct inotify_watch, d_list); get_inotify_watch(watch); - mutex_unlock(&ih->mutex); + mutex_unlock(&dev->mutex); inode = watch->inode; mutex_lock(&inode->inotify_mutex); - mutex_lock(&ih->mutex); + mutex_lock(&dev->mutex); /* make sure we didn't race with another list removal */ - if (likely(idr_find(&ih->idr, watch->wd))) { - remove_watch_no_event(watch, ih); - put_inotify_watch(watch); - } + if (likely(idr_find(&dev->idr, watch->wd))) + remove_watch_no_event(watch, dev); - mutex_unlock(&ih->mutex); + mutex_unlock(&dev->mutex); mutex_unlock(&inode->inotify_mutex); put_inotify_watch(watch); } - /* free this handle: the put matching the get in inotify_init() */ - put_inotify_handle(ih); + /* destroy all of the events on this device */ + mutex_lock(&dev->mutex); + while (!list_empty(&dev->events)) + inotify_dev_event_dequeue(dev); + mutex_unlock(&dev->mutex); + + /* free this device: the put matching the get in inotify_init() */ + put_inotify_dev(dev); + + return 0; } -EXPORT_SYMBOL_GPL(inotify_destroy); -/** - * inotify_find_watch - find an existing watch for an (ih,inode) pair - * @ih: inotify handle - * @inode: inode to watch - * @watchp: pointer to existing inotify_watch +/* + * inotify_ignore - remove a given wd from this inotify instance. * - * Caller must pin given inode (via nameidata). + * Can sleep. */ -s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, - struct inotify_watch **watchp) +static int inotify_ignore(struct inotify_device *dev, s32 wd) { - struct inotify_watch *old; - int ret = -ENOENT; + struct inotify_watch *watch; + struct inode *inode; + + mutex_lock(&dev->mutex); + watch = idr_find(&dev->idr, wd); + if (unlikely(!watch)) { + mutex_unlock(&dev->mutex); + return -EINVAL; + } + get_inotify_watch(watch); + inode = watch->inode; + mutex_unlock(&dev->mutex); mutex_lock(&inode->inotify_mutex); - mutex_lock(&ih->mutex); + mutex_lock(&dev->mutex); - old = inode_find_handle(inode, ih); - if (unlikely(old)) { - get_inotify_watch(old); /* caller must put watch */ - *watchp = old; - ret = old->wd; - } + /* make sure that we did not race */ + if (likely(idr_find(&dev->idr, wd) == watch)) + remove_watch(watch, dev); - mutex_unlock(&ih->mutex); + mutex_unlock(&dev->mutex); mutex_unlock(&inode->inotify_mutex); + put_inotify_watch(watch); - return ret; + return 0; } -EXPORT_SYMBOL_GPL(inotify_find_watch); -/** - * inotify_find_update_watch - find and update the mask of an existing watch - * @ih: inotify handle - * @inode: inode's watch to update - * @mask: mask of events to watch - * - * Caller must pin given inode (via nameidata). - */ -s32 inotify_find_update_watch(struct inotify_handle *ih, struct inode *inode, - u32 mask) +static long inotify_ioctl(struct file *file, unsigned int cmd, + unsigned long arg) { - struct inotify_watch *old; - int mask_add = 0; - int ret; + struct inotify_device *dev; + void __user *p; + int ret = -ENOTTY; - if (mask & IN_MASK_ADD) - mask_add = 1; + dev = file->private_data; + p = (void __user *) arg; - /* don't allow invalid bits: we don't want flags set */ - mask &= IN_ALL_EVENTS | IN_ONESHOT; - if (unlikely(!mask)) - return -EINVAL; + switch (cmd) { + case FIONREAD: + ret = put_user(dev->queue_size, (int __user *) p); + break; + } - mutex_lock(&inode->inotify_mutex); - mutex_lock(&ih->mutex); + return ret; +} - /* - * Handle the case of re-adding a watch on an (inode,ih) pair that we - * are already watching. We just update the mask and return its wd. - */ - old = inode_find_handle(inode, ih); - if (unlikely(!old)) { - ret = -ENOENT; - goto out; +static const struct file_operations inotify_fops = { + .poll = inotify_poll, + .read = inotify_read, + .release = inotify_release, + .unlocked_ioctl = inotify_ioctl, + .compat_ioctl = inotify_ioctl, +}; + +asmlinkage long sys_inotify_init(void) +{ + struct inotify_device *dev; + struct user_struct *user; + struct file *filp; + int fd, ret; + + fd = get_unused_fd(); + if (fd < 0) + return fd; + + filp = get_empty_filp(); + if (!filp) { + ret = -ENFILE; + goto out_put_fd; } - if (mask_add) - old->mask |= mask; - else - old->mask = mask; - ret = old->wd; -out: - mutex_unlock(&ih->mutex); - mutex_unlock(&inode->inotify_mutex); + user = get_uid(current->user); + if (unlikely(atomic_read(&user->inotify_devs) >= + inotify_max_user_instances)) { + ret = -EMFILE; + goto out_free_uid; + } + + dev = kmalloc(sizeof(struct inotify_device), GFP_KERNEL); + if (unlikely(!dev)) { + ret = -ENOMEM; + goto out_free_uid; + } + + filp->f_op = &inotify_fops; + filp->f_vfsmnt = mntget(inotify_mnt); + filp->f_dentry = dget(inotify_mnt->mnt_root); + filp->f_mapping = filp->f_dentry->d_inode->i_mapping; + filp->f_mode = FMODE_READ; + filp->f_flags = O_RDONLY; + filp->private_data = dev; + + idr_init(&dev->idr); + INIT_LIST_HEAD(&dev->events); + INIT_LIST_HEAD(&dev->watches); + init_waitqueue_head(&dev->wq); + mutex_init(&dev->mutex); + dev->event_count = 0; + dev->queue_size = 0; + dev->max_events = inotify_max_queued_events; + dev->user = user; + dev->last_wd = 0; + atomic_set(&dev->count, 0); + + get_inotify_dev(dev); + atomic_inc(&user->inotify_devs); + fd_install(fd, filp); + + return fd; +out_free_uid: + free_uid(user); + put_filp(filp); +out_put_fd: + put_unused_fd(fd); return ret; } -EXPORT_SYMBOL_GPL(inotify_find_update_watch); -/** - * inotify_add_watch - add a watch to an inotify instance - * @ih: inotify handle - * @watch: caller allocated watch structure - * @inode: inode to watch - * @mask: mask of events to watch - * - * Caller must pin given inode (via nameidata). - * Caller must ensure it only calls inotify_add_watch() once per watch. - * Calls inotify_handle_get_wd() so may sleep. - */ -s32 inotify_add_watch(struct inotify_handle *ih, struct inotify_watch *watch, - struct inode *inode, u32 mask) +asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) { - int ret = 0; + struct inotify_watch *watch, *old; + struct inode *inode; + struct inotify_device *dev; + struct nameidata nd; + struct file *filp; + int ret, fput_needed; + int mask_add = 0; + unsigned flags = 0; - /* don't allow invalid bits: we don't want flags set */ - mask &= IN_ALL_EVENTS | IN_ONESHOT; - if (unlikely(!mask)) - return -EINVAL; - watch->mask = mask; + filp = fget_light(fd, &fput_needed); + if (unlikely(!filp)) + return -EBADF; - mutex_lock(&inode->inotify_mutex); - mutex_lock(&ih->mutex); + /* verify that this is indeed an inotify instance */ + if (unlikely(filp->f_op != &inotify_fops)) { + ret = -EINVAL; + goto fput_and_out; + } + + if (!(mask & IN_DONT_FOLLOW)) + flags |= LOOKUP_FOLLOW; + if (mask & IN_ONLYDIR) + flags |= LOOKUP_DIRECTORY; - /* Initialize a new watch */ - ret = inotify_handle_get_wd(ih, watch); + ret = find_inode(path, &nd, flags); if (unlikely(ret)) - goto out; - ret = watch->wd; + goto fput_and_out; - /* save a reference to handle and bump the count to make it official */ - get_inotify_handle(ih); - watch->ih = ih; + /* inode held in place by reference to nd; dev by fget on fd */ + inode = nd.dentry->d_inode; + dev = filp->private_data; + + mutex_lock(&inode->inotify_mutex); + mutex_lock(&dev->mutex); + + if (mask & IN_MASK_ADD) + mask_add = 1; + + /* don't let user-space set invalid bits: we don't want flags set */ + mask &= IN_ALL_EVENTS | IN_ONESHOT; + if (unlikely(!mask)) { + ret = -EINVAL; + goto out; + } /* - * Save a reference to the inode and bump the ref count to make it - * official. We hold a reference to nameidata, which makes this safe. + * Handle the case of re-adding a watch on an (inode,dev) pair that we + * are already watching. We just update the mask and return its wd. */ - watch->inode = igrab(inode); + old = inode_find_dev(inode, dev); + if (unlikely(old)) { + if (mask_add) + old->mask |= mask; + else + old->mask = mask; + ret = old->wd; + goto out; + } + + watch = create_watch(dev, mask, inode); + if (unlikely(IS_ERR(watch))) { + ret = PTR_ERR(watch); + goto out; + } if (!inotify_inode_watched(inode)) set_dentry_child_flags(inode, 1); - /* Add the watch to the handle's and the inode's list */ - list_add(&watch->h_list, &ih->watches); + /* Add the watch to the device's and the inode's list */ + list_add(&watch->d_list, &dev->watches); list_add(&watch->i_list, &inode->inotify_watches); + ret = watch->wd; out: - mutex_unlock(&ih->mutex); + mutex_unlock(&dev->mutex); mutex_unlock(&inode->inotify_mutex); + path_release(&nd); +fput_and_out: + fput_light(filp, fput_needed); return ret; } -EXPORT_SYMBOL_GPL(inotify_add_watch); -/** - * inotify_rm_wd - remove a watch from an inotify instance - * @ih: inotify handle - * @wd: watch descriptor to remove - * - * Can sleep. - */ -int inotify_rm_wd(struct inotify_handle *ih, u32 wd) +asmlinkage long sys_inotify_rm_watch(int fd, u32 wd) { - struct inotify_watch *watch; - struct inode *inode; + struct file *filp; + struct inotify_device *dev; + int ret, fput_needed; - mutex_lock(&ih->mutex); - watch = idr_find(&ih->idr, wd); - if (unlikely(!watch)) { - mutex_unlock(&ih->mutex); - return -EINVAL; - } - get_inotify_watch(watch); - inode = watch->inode; - mutex_unlock(&ih->mutex); + filp = fget_light(fd, &fput_needed); + if (unlikely(!filp)) + return -EBADF; - mutex_lock(&inode->inotify_mutex); - mutex_lock(&ih->mutex); + /* verify that this is indeed an inotify instance */ + if (unlikely(filp->f_op != &inotify_fops)) { + ret = -EINVAL; + goto out; + } - /* make sure that we did not race */ - if (likely(idr_find(&ih->idr, wd) == watch)) - inotify_remove_watch_locked(ih, watch); + dev = filp->private_data; + ret = inotify_ignore(dev, wd); - mutex_unlock(&ih->mutex); - mutex_unlock(&inode->inotify_mutex); - put_inotify_watch(watch); - - return 0; +out: + fput_light(filp, fput_needed); + return ret; } -EXPORT_SYMBOL_GPL(inotify_rm_wd); -/** - * inotify_rm_watch - remove a watch from an inotify instance - * @ih: inotify handle - * @watch: watch to remove - * - * Can sleep. - */ -int inotify_rm_watch(struct inotify_handle *ih, - struct inotify_watch *watch) +static struct super_block * +inotify_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data) { - return inotify_rm_wd(ih, watch->wd); + return get_sb_pseudo(fs_type, "inotify", NULL, 0xBAD1DEA); } -EXPORT_SYMBOL_GPL(inotify_rm_watch); + +static struct file_system_type inotify_fs_type = { + .name = "inotifyfs", + .get_sb = inotify_get_sb, + .kill_sb = kill_anon_super, +}; /* - * inotify_setup - core initialization function + * inotify_setup - Our initialization function. Note that we cannnot return + * error because we have compiled-in VFS hooks. So an (unlikely) failure here + * must result in panic(). */ static int __init inotify_setup(void) { + int ret; + + ret = register_filesystem(&inotify_fs_type); + if (unlikely(ret)) + panic("inotify: register_filesystem returned %d!\n", ret); + + inotify_mnt = kern_mount(&inotify_fs_type); + if (IS_ERR(inotify_mnt)) + panic("inotify: kern_mount ret %ld!\n", PTR_ERR(inotify_mnt)); + + inotify_max_queued_events = 16384; + inotify_max_user_instances = 128; + inotify_max_user_watches = 8192; + atomic_set(&inotify_cookie, 0); + watch_cachep = kmem_cache_create("inotify_watch_cache", + sizeof(struct inotify_watch), + 0, SLAB_PANIC, NULL, NULL); + event_cachep = kmem_cache_create("inotify_event_cache", + sizeof(struct inotify_kernel_event), + 0, SLAB_PANIC, NULL, NULL); + return 0; } diff --git a/fs/inotify_user.c b/fs/inotify_user.c deleted file mode 100644 index 017cb0f13..000000000 --- a/fs/inotify_user.c +++ /dev/null @@ -1,719 +0,0 @@ -/* - * fs/inotify_user.c - inotify support for userspace - * - * Authors: - * John McCutchan - * Robert Love - * - * Copyright (C) 2005 John McCutchan - * Copyright 2006 Hewlett-Packard Development Company, L.P. - * - * 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, 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. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -static kmem_cache_t *watch_cachep __read_mostly; -static kmem_cache_t *event_cachep __read_mostly; - -static struct vfsmount *inotify_mnt __read_mostly; - -/* these are configurable via /proc/sys/fs/inotify/ */ -int inotify_max_user_instances __read_mostly; -int inotify_max_user_watches __read_mostly; -int inotify_max_queued_events __read_mostly; - -/* - * Lock ordering: - * - * inotify_dev->up_mutex (ensures we don't re-add the same watch) - * inode->inotify_mutex (protects inode's watch list) - * inotify_handle->mutex (protects inotify_handle's watch list) - * inotify_dev->ev_mutex (protects device's event queue) - */ - -/* - * Lifetimes of the main data structures: - * - * inotify_device: Lifetime is managed by reference count, from - * sys_inotify_init() until release. Additional references can bump the count - * via get_inotify_dev() and drop the count via put_inotify_dev(). - * - * inotify_user_watch: Lifetime is from create_watch() to the receipt of an - * IN_IGNORED event from inotify, or when using IN_ONESHOT, to receipt of the - * first event, or to inotify_destroy(). - */ - -/* - * struct inotify_device - represents an inotify instance - * - * This structure is protected by the mutex 'mutex'. - */ -struct inotify_device { - wait_queue_head_t wq; /* wait queue for i/o */ - struct mutex ev_mutex; /* protects event queue */ - struct mutex up_mutex; /* synchronizes watch updates */ - struct list_head events; /* list of queued events */ - atomic_t count; /* reference count */ - struct user_struct *user; /* user who opened this dev */ - struct inotify_handle *ih; /* inotify handle */ - unsigned int queue_size; /* size of the queue (bytes) */ - unsigned int event_count; /* number of pending events */ - unsigned int max_events; /* maximum number of events */ -}; - -/* - * struct inotify_kernel_event - An inotify event, originating from a watch and - * queued for user-space. A list of these is attached to each instance of the - * device. In read(), this list is walked and all events that can fit in the - * buffer are returned. - * - * Protected by dev->ev_mutex of the device in which we are queued. - */ -struct inotify_kernel_event { - struct inotify_event event; /* the user-space event */ - struct list_head list; /* entry in inotify_device's list */ - char *name; /* filename, if any */ -}; - -/* - * struct inotify_user_watch - our version of an inotify_watch, we add - * a reference to the associated inotify_device. - */ -struct inotify_user_watch { - struct inotify_device *dev; /* associated device */ - struct inotify_watch wdata; /* inotify watch data */ -}; - -#ifdef CONFIG_SYSCTL - -#include - -static int zero; - -ctl_table inotify_table[] = { - { - .ctl_name = INOTIFY_MAX_USER_INSTANCES, - .procname = "max_user_instances", - .data = &inotify_max_user_instances, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, - .extra1 = &zero, - }, - { - .ctl_name = INOTIFY_MAX_USER_WATCHES, - .procname = "max_user_watches", - .data = &inotify_max_user_watches, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, - .extra1 = &zero, - }, - { - .ctl_name = INOTIFY_MAX_QUEUED_EVENTS, - .procname = "max_queued_events", - .data = &inotify_max_queued_events, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, - .extra1 = &zero - }, - { .ctl_name = 0 } -}; -#endif /* CONFIG_SYSCTL */ - -static inline void get_inotify_dev(struct inotify_device *dev) -{ - atomic_inc(&dev->count); -} - -static inline void put_inotify_dev(struct inotify_device *dev) -{ - if (atomic_dec_and_test(&dev->count)) { - atomic_dec(&dev->user->inotify_devs); - free_uid(dev->user); - kfree(dev); - } -} - -/* - * free_inotify_user_watch - cleans up the watch and its references - */ -static void free_inotify_user_watch(struct inotify_watch *w) -{ - struct inotify_user_watch *watch; - struct inotify_device *dev; - - watch = container_of(w, struct inotify_user_watch, wdata); - dev = watch->dev; - - atomic_dec(&dev->user->inotify_watches); - put_inotify_dev(dev); - kmem_cache_free(watch_cachep, watch); -} - -/* - * kernel_event - create a new kernel event with the given parameters - * - * This function can sleep. - */ -static struct inotify_kernel_event * kernel_event(s32 wd, u32 mask, u32 cookie, - const char *name) -{ - struct inotify_kernel_event *kevent; - - kevent = kmem_cache_alloc(event_cachep, GFP_NOFS); - if (unlikely(!kevent)) - return NULL; - - /* we hand this out to user-space, so zero it just in case */ - memset(&kevent->event, 0, sizeof(struct inotify_event)); - - kevent->event.wd = wd; - kevent->event.mask = mask; - kevent->event.cookie = cookie; - - INIT_LIST_HEAD(&kevent->list); - - if (name) { - size_t len, rem, event_size = sizeof(struct inotify_event); - - /* - * We need to pad the filename so as to properly align an - * array of inotify_event structures. Because the structure is - * small and the common case is a small filename, we just round - * up to the next multiple of the structure's sizeof. This is - * simple and safe for all architectures. - */ - len = strlen(name) + 1; - rem = event_size - len; - if (len > event_size) { - rem = event_size - (len % event_size); - if (len % event_size == 0) - rem = 0; - } - - kevent->name = kmalloc(len + rem, GFP_KERNEL); - if (unlikely(!kevent->name)) { - kmem_cache_free(event_cachep, kevent); - return NULL; - } - memcpy(kevent->name, name, len); - if (rem) - memset(kevent->name + len, 0, rem); - kevent->event.len = len + rem; - } else { - kevent->event.len = 0; - kevent->name = NULL; - } - - return kevent; -} - -/* - * inotify_dev_get_event - return the next event in the given dev's queue - * - * Caller must hold dev->ev_mutex. - */ -static inline struct inotify_kernel_event * -inotify_dev_get_event(struct inotify_device *dev) -{ - return list_entry(dev->events.next, struct inotify_kernel_event, list); -} - -/* - * inotify_dev_queue_event - event handler registered with core inotify, adds - * a new event to the given device - * - * Can sleep (calls kernel_event()). - */ -static void inotify_dev_queue_event(struct inotify_watch *w, u32 wd, u32 mask, - u32 cookie, const char *name, - struct inode *ignored) -{ - struct inotify_user_watch *watch; - struct inotify_device *dev; - struct inotify_kernel_event *kevent, *last; - - watch = container_of(w, struct inotify_user_watch, wdata); - dev = watch->dev; - - mutex_lock(&dev->ev_mutex); - - /* we can safely put the watch as we don't reference it while - * generating the event - */ - if (mask & IN_IGNORED || mask & IN_ONESHOT) - put_inotify_watch(w); /* final put */ - - /* coalescing: drop this event if it is a dupe of the previous */ - last = inotify_dev_get_event(dev); - if (last && last->event.mask == mask && last->event.wd == wd && - last->event.cookie == cookie) { - const char *lastname = last->name; - - if (!name && !lastname) - goto out; - if (name && lastname && !strcmp(lastname, name)) - goto out; - } - - /* the queue overflowed and we already sent the Q_OVERFLOW event */ - if (unlikely(dev->event_count > dev->max_events)) - goto out; - - /* if the queue overflows, we need to notify user space */ - if (unlikely(dev->event_count == dev->max_events)) - kevent = kernel_event(-1, IN_Q_OVERFLOW, cookie, NULL); - else - kevent = kernel_event(wd, mask, cookie, name); - - if (unlikely(!kevent)) - goto out; - - /* queue the event and wake up anyone waiting */ - dev->event_count++; - dev->queue_size += sizeof(struct inotify_event) + kevent->event.len; - list_add_tail(&kevent->list, &dev->events); - wake_up_interruptible(&dev->wq); - -out: - mutex_unlock(&dev->ev_mutex); -} - -/* - * remove_kevent - cleans up and ultimately frees the given kevent - * - * Caller must hold dev->ev_mutex. - */ -static void remove_kevent(struct inotify_device *dev, - struct inotify_kernel_event *kevent) -{ - list_del(&kevent->list); - - dev->event_count--; - dev->queue_size -= sizeof(struct inotify_event) + kevent->event.len; - - kfree(kevent->name); - kmem_cache_free(event_cachep, kevent); -} - -/* - * inotify_dev_event_dequeue - destroy an event on the given device - * - * Caller must hold dev->ev_mutex. - */ -static void inotify_dev_event_dequeue(struct inotify_device *dev) -{ - if (!list_empty(&dev->events)) { - struct inotify_kernel_event *kevent; - kevent = inotify_dev_get_event(dev); - remove_kevent(dev, kevent); - } -} - -/* - * find_inode - resolve a user-given path to a specific inode and return a nd - */ -static int find_inode(const char __user *dirname, struct nameidata *nd, - unsigned flags) -{ - int error; - - error = __user_walk(dirname, flags, nd); - if (error) - return error; - /* you can only watch an inode if you have read permissions on it */ - error = vfs_permission(nd, MAY_READ); - if (error) - path_release(nd); - return error; -} - -/* - * create_watch - creates a watch on the given device. - * - * Callers must hold dev->up_mutex. - */ -static int create_watch(struct inotify_device *dev, struct inode *inode, - u32 mask) -{ - struct inotify_user_watch *watch; - int ret; - - if (atomic_read(&dev->user->inotify_watches) >= - inotify_max_user_watches) - return -ENOSPC; - - watch = kmem_cache_alloc(watch_cachep, GFP_KERNEL); - if (unlikely(!watch)) - return -ENOMEM; - - /* save a reference to device and bump the count to make it official */ - get_inotify_dev(dev); - watch->dev = dev; - - atomic_inc(&dev->user->inotify_watches); - - inotify_init_watch(&watch->wdata); - ret = inotify_add_watch(dev->ih, &watch->wdata, inode, mask); - if (ret < 0) - free_inotify_user_watch(&watch->wdata); - - return ret; -} - -/* Device Interface */ - -static unsigned int inotify_poll(struct file *file, poll_table *wait) -{ - struct inotify_device *dev = file->private_data; - int ret = 0; - - poll_wait(file, &dev->wq, wait); - mutex_lock(&dev->ev_mutex); - if (!list_empty(&dev->events)) - ret = POLLIN | POLLRDNORM; - mutex_unlock(&dev->ev_mutex); - - return ret; -} - -static ssize_t inotify_read(struct file *file, char __user *buf, - size_t count, loff_t *pos) -{ - size_t event_size = sizeof (struct inotify_event); - struct inotify_device *dev; - char __user *start; - int ret; - DEFINE_WAIT(wait); - - start = buf; - dev = file->private_data; - - while (1) { - int events; - - prepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE); - - mutex_lock(&dev->ev_mutex); - events = !list_empty(&dev->events); - mutex_unlock(&dev->ev_mutex); - if (events) { - ret = 0; - break; - } - - if (file->f_flags & O_NONBLOCK) { - ret = -EAGAIN; - break; - } - - if (signal_pending(current)) { - ret = -EINTR; - break; - } - - schedule(); - } - - finish_wait(&dev->wq, &wait); - if (ret) - return ret; - - mutex_lock(&dev->ev_mutex); - while (1) { - struct inotify_kernel_event *kevent; - - ret = buf - start; - if (list_empty(&dev->events)) - break; - - kevent = inotify_dev_get_event(dev); - if (event_size + kevent->event.len > count) - break; - - if (copy_to_user(buf, &kevent->event, event_size)) { - ret = -EFAULT; - break; - } - buf += event_size; - count -= event_size; - - if (kevent->name) { - if (copy_to_user(buf, kevent->name, kevent->event.len)){ - ret = -EFAULT; - break; - } - buf += kevent->event.len; - count -= kevent->event.len; - } - - remove_kevent(dev, kevent); - } - mutex_unlock(&dev->ev_mutex); - - return ret; -} - -static int inotify_release(struct inode *ignored, struct file *file) -{ - struct inotify_device *dev = file->private_data; - - inotify_destroy(dev->ih); - - /* destroy all of the events on this device */ - mutex_lock(&dev->ev_mutex); - while (!list_empty(&dev->events)) - inotify_dev_event_dequeue(dev); - mutex_unlock(&dev->ev_mutex); - - /* free this device: the put matching the get in inotify_init() */ - put_inotify_dev(dev); - - return 0; -} - -static long inotify_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct inotify_device *dev; - void __user *p; - int ret = -ENOTTY; - - dev = file->private_data; - p = (void __user *) arg; - - switch (cmd) { - case FIONREAD: - ret = put_user(dev->queue_size, (int __user *) p); - break; - } - - return ret; -} - -static const struct file_operations inotify_fops = { - .poll = inotify_poll, - .read = inotify_read, - .release = inotify_release, - .unlocked_ioctl = inotify_ioctl, - .compat_ioctl = inotify_ioctl, -}; - -static const struct inotify_operations inotify_user_ops = { - .handle_event = inotify_dev_queue_event, - .destroy_watch = free_inotify_user_watch, -}; - -asmlinkage long sys_inotify_init(void) -{ - struct inotify_device *dev; - struct inotify_handle *ih; - struct user_struct *user; - struct file *filp; - int fd, ret; - - fd = get_unused_fd(); - if (fd < 0) - return fd; - - filp = get_empty_filp(); - if (!filp) { - ret = -ENFILE; - goto out_put_fd; - } - - user = get_uid(current->user); - if (unlikely(atomic_read(&user->inotify_devs) >= - inotify_max_user_instances)) { - ret = -EMFILE; - goto out_free_uid; - } - - dev = kmalloc(sizeof(struct inotify_device), GFP_KERNEL); - if (unlikely(!dev)) { - ret = -ENOMEM; - goto out_free_uid; - } - - ih = inotify_init(&inotify_user_ops); - if (unlikely(IS_ERR(ih))) { - ret = PTR_ERR(ih); - goto out_free_dev; - } - dev->ih = ih; - - filp->f_op = &inotify_fops; - filp->f_vfsmnt = mntget(inotify_mnt); - filp->f_dentry = dget(inotify_mnt->mnt_root); - filp->f_mapping = filp->f_dentry->d_inode->i_mapping; - filp->f_mode = FMODE_READ; - filp->f_flags = O_RDONLY; - filp->private_data = dev; - - INIT_LIST_HEAD(&dev->events); - init_waitqueue_head(&dev->wq); - mutex_init(&dev->ev_mutex); - mutex_init(&dev->up_mutex); - dev->event_count = 0; - dev->queue_size = 0; - dev->max_events = inotify_max_queued_events; - dev->user = user; - atomic_set(&dev->count, 0); - - get_inotify_dev(dev); - atomic_inc(&user->inotify_devs); - fd_install(fd, filp); - - return fd; -out_free_dev: - kfree(dev); -out_free_uid: - free_uid(user); - put_filp(filp); -out_put_fd: - put_unused_fd(fd); - return ret; -} - -asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, u32 mask) -{ - struct inode *inode; - struct inotify_device *dev; - struct nameidata nd; - struct file *filp; - int ret, fput_needed; - unsigned flags = 0; - - filp = fget_light(fd, &fput_needed); - if (unlikely(!filp)) - return -EBADF; - - /* verify that this is indeed an inotify instance */ - if (unlikely(filp->f_op != &inotify_fops)) { - ret = -EINVAL; - goto fput_and_out; - } - - if (!(mask & IN_DONT_FOLLOW)) - flags |= LOOKUP_FOLLOW; - if (mask & IN_ONLYDIR) - flags |= LOOKUP_DIRECTORY; - - ret = find_inode(path, &nd, flags); - if (unlikely(ret)) - goto fput_and_out; - - /* inode held in place by reference to nd; dev by fget on fd */ - inode = nd.dentry->d_inode; - dev = filp->private_data; - - mutex_lock(&dev->up_mutex); - ret = inotify_find_update_watch(dev->ih, inode, mask); - if (ret == -ENOENT) - ret = create_watch(dev, inode, mask); - mutex_unlock(&dev->up_mutex); - - path_release(&nd); -fput_and_out: - fput_light(filp, fput_needed); - return ret; -} - -asmlinkage long sys_inotify_rm_watch(int fd, u32 wd) -{ - struct file *filp; - struct inotify_device *dev; - int ret, fput_needed; - - filp = fget_light(fd, &fput_needed); - if (unlikely(!filp)) - return -EBADF; - - /* verify that this is indeed an inotify instance */ - if (unlikely(filp->f_op != &inotify_fops)) { - ret = -EINVAL; - goto out; - } - - dev = filp->private_data; - - /* we free our watch data when we get IN_IGNORED */ - ret = inotify_rm_wd(dev->ih, wd); - -out: - fput_light(filp, fput_needed); - return ret; -} - -static int -inotify_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, struct vfsmount *mnt) -{ - return get_sb_pseudo(fs_type, "inotify", NULL, 0xBAD1DEA, mnt); -} - -static struct file_system_type inotify_fs_type = { - .name = "inotifyfs", - .get_sb = inotify_get_sb, - .kill_sb = kill_anon_super, -}; - -/* - * inotify_user_setup - Our initialization function. Note that we cannnot return - * error because we have compiled-in VFS hooks. So an (unlikely) failure here - * must result in panic(). - */ -static int __init inotify_user_setup(void) -{ - int ret; - - ret = register_filesystem(&inotify_fs_type); - if (unlikely(ret)) - panic("inotify: register_filesystem returned %d!\n", ret); - - inotify_mnt = kern_mount(&inotify_fs_type); - if (IS_ERR(inotify_mnt)) - panic("inotify: kern_mount ret %ld!\n", PTR_ERR(inotify_mnt)); - - inotify_max_queued_events = 16384; - inotify_max_user_instances = 128; - inotify_max_user_watches = 8192; - - watch_cachep = kmem_cache_create("inotify_watch_cache", - sizeof(struct inotify_user_watch), - 0, SLAB_PANIC, NULL, NULL); - event_cachep = kmem_cache_create("inotify_event_cache", - sizeof(struct inotify_kernel_event), - 0, SLAB_PANIC, NULL, NULL); - - return 0; -} - -module_init(inotify_user_setup); diff --git a/fs/ioctl.c b/fs/ioctl.c index 44f6e4cc4..95ff6a5a4 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -4,6 +4,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include #include #include #include diff --git a/fs/ioprio.c b/fs/ioprio.c index 38b0ca6c8..66240ed9b 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -24,30 +24,21 @@ #include #include #include -#include -#include +#include static int set_task_ioprio(struct task_struct *task, int ioprio) { - int err; struct io_context *ioc; if (task->uid != current->euid && task->uid != current->uid && !capable(CAP_SYS_NICE)) return -EPERM; - err = security_task_setioprio(task, ioprio); - if (err) - return err; - task_lock(task); task->ioprio = ioprio; ioc = task->io_context; - /* see wmb() in current_io_context() */ - smp_read_barrier_depends(); - if (ioc && ioc->set_ioprio) ioc->set_ioprio(ioc, ioprio); @@ -115,9 +106,9 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio) continue; ret = set_task_ioprio(p, ioprio); if (ret) - goto free_uid; + break; } while_each_thread(g, p); -free_uid: + if (who) free_uid(user); break; @@ -129,47 +120,11 @@ free_uid: return ret; } -static int get_task_ioprio(struct task_struct *p) -{ - int ret; - - ret = security_task_getioprio(p); - if (ret) - goto out; - ret = p->ioprio; -out: - return ret; -} - -int ioprio_best(unsigned short aprio, unsigned short bprio) -{ - unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); - unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); - - if (!ioprio_valid(aprio)) - return bprio; - if (!ioprio_valid(bprio)) - return aprio; - - if (aclass == IOPRIO_CLASS_NONE) - aclass = IOPRIO_CLASS_BE; - if (bclass == IOPRIO_CLASS_NONE) - bclass = IOPRIO_CLASS_BE; - - if (aclass == bclass) - return min(aprio, bprio); - if (aclass > bclass) - return bprio; - else - return aprio; -} - asmlinkage long sys_ioprio_get(int which, int who) { struct task_struct *g, *p; struct user_struct *user; int ret = -ESRCH; - int tmpio; read_lock_irq(&tasklist_lock); switch (which) { @@ -179,19 +134,16 @@ asmlinkage long sys_ioprio_get(int which, int who) else p = find_task_by_pid(who); if (p) - ret = get_task_ioprio(p); + ret = p->ioprio; break; case IOPRIO_WHO_PGRP: if (!who) who = process_group(current); do_each_task_pid(who, PIDTYPE_PGID, p) { - tmpio = get_task_ioprio(p); - if (tmpio < 0) - continue; if (ret == -ESRCH) - ret = tmpio; + ret = p->ioprio; else - ret = ioprio_best(ret, tmpio); + ret = ioprio_best(ret, p->ioprio); } while_each_task_pid(who, PIDTYPE_PGID, p); break; case IOPRIO_WHO_USER: @@ -206,13 +158,10 @@ asmlinkage long sys_ioprio_get(int which, int who) do_each_thread(g, p) { if (p->uid != user->uid) continue; - tmpio = get_task_ioprio(p); - if (tmpio < 0) - continue; if (ret == -ESRCH) - ret = tmpio; + ret = p->ioprio; else - ret = ioprio_best(ret, tmpio); + ret = ioprio_best(ret, p->ioprio); } while_each_thread(g, p); if (who) diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index 731816332..4917315db 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c @@ -16,6 +16,7 @@ * Transparent decompression of files on an iso9660 filesystem */ +#include #include #include @@ -311,7 +312,7 @@ eio: return err; } -const struct address_space_operations zisofs_aops = { +struct address_space_operations zisofs_aops = { .readpage = zisofs_readpage, /* No sync_page operation supported? */ /* No bmap operation supported */ diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index 27e276987..5440ea292 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c @@ -10,6 +10,7 @@ * * isofs directory handling functions */ +#include #include #include "isofs.h" diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index e5fbb035a..70adbb98b 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -11,6 +11,7 @@ * 2004 Paul Serice - NFS Export Operations */ +#include #include #include @@ -55,7 +56,7 @@ static void isofs_put_super(struct super_block *sb) } static void isofs_read_inode(struct inode *); -static int isofs_statfs (struct dentry *, struct kstatfs *); +static int isofs_statfs (struct super_block *, struct kstatfs *); static kmem_cache_t *isofs_inode_cachep; @@ -900,10 +901,8 @@ out_freesbi: return -EINVAL; } -static int isofs_statfs (struct dentry *dentry, struct kstatfs *buf) +static int isofs_statfs (struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - buf->f_type = ISOFS_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = (ISOFS_SB(sb)->s_nzones @@ -1053,7 +1052,7 @@ static sector_t _isofs_bmap(struct address_space *mapping, sector_t block) return generic_block_bmap(mapping,block,isofs_get_block); } -static const struct address_space_operations isofs_aops = { +static struct address_space_operations isofs_aops = { .readpage = isofs_readpage, .sync_page = block_sync_page, .bmap = _isofs_bmap @@ -1238,7 +1237,7 @@ static void isofs_read_inode(struct inode *inode) } inode->i_uid = sbi->s_uid; inode->i_gid = sbi->s_gid; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; ei->i_format_parm[0] = 0; ei->i_format_parm[1] = 0; @@ -1294,6 +1293,7 @@ static void isofs_read_inode(struct inode *inode) isonum_711 (de->ext_attr_length)); /* Set the number of blocks for stat() - should be done before RR */ + inode->i_blksize = PAGE_CACHE_SIZE; /* For stat() only */ inode->i_blocks = (inode->i_size + 511) >> 9; /* @@ -1399,11 +1399,10 @@ struct inode *isofs_iget(struct super_block *sb, return inode; } -static int isofs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *isofs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, isofs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, isofs_fill_super); } static struct file_system_type iso9660_fs_type = { diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h index e6308c8b5..b87ba066f 100644 --- a/fs/isofs/isofs.h +++ b/fs/isofs/isofs.h @@ -176,5 +176,5 @@ isofs_normalize_block_and_offset(struct iso_directory_record* de, extern struct inode_operations isofs_dir_inode_operations; extern const struct file_operations isofs_dir_operations; -extern const struct address_space_operations isofs_symlink_aops; +extern struct address_space_operations isofs_symlink_aops; extern struct export_operations isofs_export_ops; diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index c04b3a14a..e7ba0c30e 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -6,6 +6,7 @@ * (C) 1991 Linus Torvalds - minix filesystem */ +#include /* Joliet? */ #include #include "isofs.h" diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c index f3a1db309..4326cb47f 100644 --- a/fs/isofs/rock.c +++ b/fs/isofs/rock.c @@ -754,6 +754,6 @@ error: return -EIO; } -const struct address_space_operations isofs_symlink_aops = { +struct address_space_operations isofs_symlink_aops = { .readpage = rock_ridge_symlink_readpage }; diff --git a/fs/isofs/zisofs.h b/fs/isofs/zisofs.h index 273795709..d78485d10 100644 --- a/fs/isofs/zisofs.h +++ b/fs/isofs/zisofs.h @@ -15,7 +15,7 @@ */ #ifdef CONFIG_ZISOFS -extern const struct address_space_operations zisofs_aops; +extern struct address_space_operations zisofs_aops; extern int __init zisofs_init(void); extern void zisofs_cleanup(void); #endif diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c index 47678a26c..3f5102b06 100644 --- a/fs/jbd/checkpoint.c +++ b/fs/jbd/checkpoint.c @@ -24,67 +24,29 @@ #include /* - * Unlink a buffer from a transaction checkpoint list. + * Unlink a buffer from a transaction. * * Called with j_list_lock held. */ -static inline void __buffer_unlink_first(struct journal_head *jh) -{ - transaction_t *transaction = jh->b_cp_transaction; - - jh->b_cpnext->b_cpprev = jh->b_cpprev; - jh->b_cpprev->b_cpnext = jh->b_cpnext; - if (transaction->t_checkpoint_list == jh) { - transaction->t_checkpoint_list = jh->b_cpnext; - if (transaction->t_checkpoint_list == jh) - transaction->t_checkpoint_list = NULL; - } -} -/* - * Unlink a buffer from a transaction checkpoint(io) list. - * - * Called with j_list_lock held. - */ static inline void __buffer_unlink(struct journal_head *jh) { - transaction_t *transaction = jh->b_cp_transaction; - - __buffer_unlink_first(jh); - if (transaction->t_checkpoint_io_list == jh) { - transaction->t_checkpoint_io_list = jh->b_cpnext; - if (transaction->t_checkpoint_io_list == jh) - transaction->t_checkpoint_io_list = NULL; - } -} - -/* - * Move a buffer from the checkpoint list to the checkpoint io list - * - * Called with j_list_lock held - */ -static inline void __buffer_relink_io(struct journal_head *jh) -{ - transaction_t *transaction = jh->b_cp_transaction; + transaction_t *transaction; - __buffer_unlink_first(jh); + transaction = jh->b_cp_transaction; + jh->b_cp_transaction = NULL; - if (!transaction->t_checkpoint_io_list) { - jh->b_cpnext = jh->b_cpprev = jh; - } else { - jh->b_cpnext = transaction->t_checkpoint_io_list; - jh->b_cpprev = transaction->t_checkpoint_io_list->b_cpprev; - jh->b_cpprev->b_cpnext = jh; - jh->b_cpnext->b_cpprev = jh; - } - transaction->t_checkpoint_io_list = jh; + jh->b_cpnext->b_cpprev = jh->b_cpprev; + jh->b_cpprev->b_cpnext = jh->b_cpnext; + if (transaction->t_checkpoint_list == jh) + transaction->t_checkpoint_list = jh->b_cpnext; + if (transaction->t_checkpoint_list == jh) + transaction->t_checkpoint_list = NULL; } /* * Try to release a checkpointed buffer from its transaction. - * Returns 1 if we released it and 2 if we also released the - * whole transaction. - * + * Returns 1 if we released it. * Requires j_list_lock * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it */ @@ -95,11 +57,12 @@ static int __try_to_free_cp_buf(struct journal_head *jh) if (jh->b_jlist == BJ_None && !buffer_locked(bh) && !buffer_dirty(bh)) { JBUFFER_TRACE(jh, "remove from checkpoint list"); - ret = __journal_remove_checkpoint(jh) + 1; + __journal_remove_checkpoint(jh); jbd_unlock_bh_state(bh); journal_remove_journal_head(bh); BUFFER_TRACE(bh, "release"); __brelse(bh); + ret = 1; } else { jbd_unlock_bh_state(bh); } @@ -154,54 +117,83 @@ static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh) } /* - * Clean up transaction's list of buffers submitted for io. - * We wait for any pending IO to complete and remove any clean - * buffers. Note that we take the buffers in the opposite ordering - * from the one in which they were submitted for IO. + * Clean up a transaction's checkpoint list. + * + * We wait for any pending IO to complete and make sure any clean + * buffers are removed from the transaction. + * + * Return 1 if we performed any actions which might have destroyed the + * checkpoint. (journal_remove_checkpoint() deletes the transaction when + * the last checkpoint buffer is cleansed) * * Called with j_list_lock held. */ -static void __wait_cp_io(journal_t *journal, transaction_t *transaction) +static int __cleanup_transaction(journal_t *journal, transaction_t *transaction) { - struct journal_head *jh; + struct journal_head *jh, *next_jh, *last_jh; struct buffer_head *bh; - tid_t this_tid; - int released = 0; - - this_tid = transaction->t_tid; -restart: - /* Did somebody clean up the transaction in the meanwhile? */ - if (journal->j_checkpoint_transactions != transaction || - transaction->t_tid != this_tid) - return; - while (!released && transaction->t_checkpoint_io_list) { - jh = transaction->t_checkpoint_io_list; + int ret = 0; + + assert_spin_locked(&journal->j_list_lock); + jh = transaction->t_checkpoint_list; + if (!jh) + return 0; + + last_jh = jh->b_cpprev; + next_jh = jh; + do { + jh = next_jh; bh = jh2bh(jh); - if (!jbd_trylock_bh_state(bh)) { - jbd_sync_bh(journal, bh); - spin_lock(&journal->j_list_lock); - goto restart; - } if (buffer_locked(bh)) { atomic_inc(&bh->b_count); spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); wait_on_buffer(bh); /* the journal_head may have gone by now */ BUFFER_TRACE(bh, "brelse"); __brelse(bh); - spin_lock(&journal->j_list_lock); - goto restart; + goto out_return_1; } + /* - * Now in whatever state the buffer currently is, we know that - * it has been written out and so we can drop it from the list + * This is foul */ - released = __journal_remove_checkpoint(jh); - jbd_unlock_bh_state(bh); - journal_remove_journal_head(bh); - __brelse(bh); - } + if (!jbd_trylock_bh_state(bh)) { + jbd_sync_bh(journal, bh); + goto out_return_1; + } + + if (jh->b_transaction != NULL) { + transaction_t *t = jh->b_transaction; + tid_t tid = t->t_tid; + + spin_unlock(&journal->j_list_lock); + jbd_unlock_bh_state(bh); + log_start_commit(journal, tid); + log_wait_commit(journal, tid); + goto out_return_1; + } + + /* + * AKPM: I think the buffer_jbddirty test is redundant - it + * shouldn't have NULL b_transaction? + */ + next_jh = jh->b_cpnext; + if (!buffer_dirty(bh) && !buffer_jbddirty(bh)) { + BUFFER_TRACE(bh, "remove from checkpoint"); + __journal_remove_checkpoint(jh); + jbd_unlock_bh_state(bh); + journal_remove_journal_head(bh); + __brelse(bh); + ret = 1; + } else { + jbd_unlock_bh_state(bh); + } + } while (jh != last_jh); + + return ret; +out_return_1: + spin_lock(&journal->j_list_lock); + return 1; } #define NR_BATCH 64 @@ -211,7 +203,9 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count) { int i; + spin_unlock(&journal->j_list_lock); ll_rw_block(SWRITE, *batch_count, bhs); + spin_lock(&journal->j_list_lock); for (i = 0; i < *batch_count; i++) { struct buffer_head *bh = bhs[i]; clear_buffer_jwrite(bh); @@ -227,43 +221,19 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count) * Return 1 if something happened which requires us to abort the current * scan of the checkpoint list. * - * Called with j_list_lock held and drops it if 1 is returned + * Called with j_list_lock held. * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it */ -static int __process_buffer(journal_t *journal, struct journal_head *jh, - struct buffer_head **bhs, int *batch_count) +static int __flush_buffer(journal_t *journal, struct journal_head *jh, + struct buffer_head **bhs, int *batch_count, + int *drop_count) { struct buffer_head *bh = jh2bh(jh); int ret = 0; - if (buffer_locked(bh)) { - atomic_inc(&bh->b_count); - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - wait_on_buffer(bh); - /* the journal_head may have gone by now */ - BUFFER_TRACE(bh, "brelse"); - __brelse(bh); - ret = 1; - } else if (jh->b_transaction != NULL) { - transaction_t *t = jh->b_transaction; - tid_t tid = t->t_tid; + if (buffer_dirty(bh) && !buffer_locked(bh) && jh->b_jlist == BJ_None) { + J_ASSERT_JH(jh, jh->b_transaction == NULL); - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - log_start_commit(journal, tid); - log_wait_commit(journal, tid); - ret = 1; - } else if (!buffer_dirty(bh)) { - J_ASSERT_JH(jh, !buffer_jbddirty(bh)); - BUFFER_TRACE(bh, "remove from checkpoint"); - __journal_remove_checkpoint(jh); - spin_unlock(&journal->j_list_lock); - jbd_unlock_bh_state(bh); - journal_remove_journal_head(bh); - __brelse(bh); - ret = 1; - } else { /* * Important: we are about to write the buffer, and * possibly block, while still holding the journal lock. @@ -276,30 +246,45 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, J_ASSERT_BH(bh, !buffer_jwrite(bh)); set_buffer_jwrite(bh); bhs[*batch_count] = bh; - __buffer_relink_io(jh); jbd_unlock_bh_state(bh); (*batch_count)++; if (*batch_count == NR_BATCH) { - spin_unlock(&journal->j_list_lock); __flush_batch(journal, bhs, batch_count); ret = 1; } + } else { + int last_buffer = 0; + if (jh->b_cpnext == jh) { + /* We may be about to drop the transaction. Tell the + * caller that the lists have changed. + */ + last_buffer = 1; + } + if (__try_to_free_cp_buf(jh)) { + (*drop_count)++; + ret = last_buffer; + } } return ret; } /* - * Perform an actual checkpoint. We take the first transaction on the - * list of transactions to be checkpointed and send all its buffers - * to disk. We submit larger chunks of data at once. + * Perform an actual checkpoint. We don't write out only enough to + * satisfy the current blocked requests: rather we submit a reasonably + * sized chunk of the outstanding data to disk at once for + * efficiency. __log_wait_for_space() will retry if we didn't free enough. * + * However, we _do_ take into account the amount requested so that once + * the IO has been queued, we can return as soon as enough of it has + * completed to disk. + * * The journal should be locked before calling this function. */ int log_do_checkpoint(journal_t *journal) { - transaction_t *transaction; - tid_t this_tid; int result; + int batch_count = 0; + struct buffer_head *bhs[NR_BATCH]; jbd_debug(1, "Start checkpoint\n"); @@ -314,68 +299,79 @@ int log_do_checkpoint(journal_t *journal) return result; /* - * OK, we need to start writing disk blocks. Take one transaction - * and write it. + * OK, we need to start writing disk blocks. Try to free up a + * quarter of the log in a single checkpoint if we can. */ - spin_lock(&journal->j_list_lock); - if (!journal->j_checkpoint_transactions) - goto out; - transaction = journal->j_checkpoint_transactions; - this_tid = transaction->t_tid; -restart: /* - * If someone cleaned up this transaction while we slept, we're - * done (maybe it's a new transaction, but it fell at the same - * address). + * AKPM: check this code. I had a feeling a while back that it + * degenerates into a busy loop at unmount time. */ - if (journal->j_checkpoint_transactions == transaction && - transaction->t_tid == this_tid) { - int batch_count = 0; - struct buffer_head *bhs[NR_BATCH]; - struct journal_head *jh; - int retry = 0; - - while (!retry && transaction->t_checkpoint_list) { + spin_lock(&journal->j_list_lock); + while (journal->j_checkpoint_transactions) { + transaction_t *transaction; + struct journal_head *jh, *last_jh, *next_jh; + int drop_count = 0; + int cleanup_ret, retry = 0; + tid_t this_tid; + + transaction = journal->j_checkpoint_transactions; + this_tid = transaction->t_tid; + jh = transaction->t_checkpoint_list; + last_jh = jh->b_cpprev; + next_jh = jh; + do { struct buffer_head *bh; - jh = transaction->t_checkpoint_list; + jh = next_jh; + next_jh = jh->b_cpnext; bh = jh2bh(jh); if (!jbd_trylock_bh_state(bh)) { jbd_sync_bh(journal, bh); + spin_lock(&journal->j_list_lock); retry = 1; break; } - retry = __process_buffer(journal, jh, bhs,&batch_count); - if (!retry && lock_need_resched(&journal->j_list_lock)){ - spin_unlock(&journal->j_list_lock); + retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count); + if (cond_resched_lock(&journal->j_list_lock)) { retry = 1; break; } - } + } while (jh != last_jh && !retry); if (batch_count) { - if (!retry) { - spin_unlock(&journal->j_list_lock); - retry = 1; - } __flush_batch(journal, bhs, &batch_count); + retry = 1; } - if (retry) { - spin_lock(&journal->j_list_lock); - goto restart; - } /* - * Now we have cleaned up the first transaction's checkpoint - * list. Let's clean up the second one + * If someone cleaned up this transaction while we slept, we're + * done */ - __wait_cp_io(journal, transaction); + if (journal->j_checkpoint_transactions != transaction) + break; + if (retry) + continue; + /* + * Maybe it's a new transaction, but it fell at the same + * address + */ + if (transaction->t_tid != this_tid) + continue; + /* + * We have walked the whole transaction list without + * finding anything to write to disk. We had better be + * able to make some progress or we are in trouble. + */ + cleanup_ret = __cleanup_transaction(journal, transaction); + J_ASSERT(drop_count != 0 || cleanup_ret != 0); + if (journal->j_checkpoint_transactions != transaction) + break; } -out: spin_unlock(&journal->j_list_lock); result = cleanup_journal_tail(journal); if (result < 0) return result; + return 0; } @@ -459,54 +455,6 @@ int cleanup_journal_tail(journal_t *journal) /* Checkpoint list management */ -/* - * journal_clean_one_cp_list - * - * Find all the written-back checkpoint buffers in the given list and release them. - * - * Called with the journal locked. - * Called with j_list_lock held. - * Returns number of bufers reaped (for debug) - */ - -static int journal_clean_one_cp_list(struct journal_head *jh, int *released) -{ - struct journal_head *last_jh; - struct journal_head *next_jh = jh; - int ret, freed = 0; - - *released = 0; - if (!jh) - return 0; - - last_jh = jh->b_cpprev; - do { - jh = next_jh; - next_jh = jh->b_cpnext; - /* Use trylock because of the ranking */ - if (jbd_trylock_bh_state(jh2bh(jh))) { - ret = __try_to_free_cp_buf(jh); - if (ret) { - freed++; - if (ret == 2) { - *released = 1; - return freed; - } - } - } - /* - * This function only frees up some memory - * if possible so we dont have an obligation - * to finish processing. Bail out if preemption - * requested: - */ - if (need_resched()) - return freed; - } while (jh != last_jh); - - return freed; -} - /* * journal_clean_checkpoint_list * @@ -514,44 +462,46 @@ static int journal_clean_one_cp_list(struct journal_head *jh, int *released) * * Called with the journal locked. * Called with j_list_lock held. - * Returns number of buffers reaped (for debug) + * Returns number of bufers reaped (for debug) */ int __journal_clean_checkpoint_list(journal_t *journal) { transaction_t *transaction, *last_transaction, *next_transaction; int ret = 0; - int released; transaction = journal->j_checkpoint_transactions; - if (!transaction) + if (transaction == 0) goto out; last_transaction = transaction->t_cpprev; next_transaction = transaction; do { + struct journal_head *jh; + transaction = next_transaction; next_transaction = transaction->t_cpnext; - ret += journal_clean_one_cp_list(transaction-> - t_checkpoint_list, &released); - /* - * This function only frees up some memory if possible so we - * dont have an obligation to finish processing. Bail out if - * preemption requested: - */ - if (need_resched()) - goto out; - if (released) - continue; - /* - * It is essential that we are as careful as in the case of - * t_checkpoint_list with removing the buffer from the list as - * we can possibly see not yet submitted buffers on io_list - */ - ret += journal_clean_one_cp_list(transaction-> - t_checkpoint_io_list, &released); - if (need_resched()) - goto out; + jh = transaction->t_checkpoint_list; + if (jh) { + struct journal_head *last_jh = jh->b_cpprev; + struct journal_head *next_jh = jh; + + do { + jh = next_jh; + next_jh = jh->b_cpnext; + /* Use trylock because of the ranknig */ + if (jbd_trylock_bh_state(jh2bh(jh))) + ret += __try_to_free_cp_buf(jh); + /* + * This function only frees up some memory + * if possible so we dont have an obligation + * to finish processing. Bail out if preemption + * requested: + */ + if (need_resched()) + goto out; + } while (jh != last_jh); + } } while (transaction != last_transaction); out: return ret; @@ -566,22 +516,18 @@ out: * buffer updates committed in that transaction have safely been stored * elsewhere on disk. To achieve this, all of the buffers in a * transaction need to be maintained on the transaction's checkpoint - * lists until they have been rewritten, at which point this function is + * list until they have been rewritten, at which point this function is * called to remove the buffer from the existing transaction's - * checkpoint lists. - * - * The function returns 1 if it frees the transaction, 0 otherwise. + * checkpoint list. * * This function is called with the journal locked. * This function is called with j_list_lock held. - * This function is called with jbd_lock_bh_state(jh2bh(jh)) */ -int __journal_remove_checkpoint(struct journal_head *jh) +void __journal_remove_checkpoint(struct journal_head *jh) { transaction_t *transaction; journal_t *journal; - int ret = 0; JBUFFER_TRACE(jh, "entry"); @@ -592,10 +538,8 @@ int __journal_remove_checkpoint(struct journal_head *jh) journal = transaction->t_journal; __buffer_unlink(jh); - jh->b_cp_transaction = NULL; - if (transaction->t_checkpoint_list != NULL || - transaction->t_checkpoint_io_list != NULL) + if (transaction->t_checkpoint_list != NULL) goto out; JBUFFER_TRACE(jh, "transaction has no more buffers"); @@ -621,10 +565,8 @@ int __journal_remove_checkpoint(struct journal_head *jh) /* Just in case anybody was waiting for more transactions to be checkpointed... */ wake_up(&journal->j_wait_logspace); - ret = 1; out: JBUFFER_TRACE(jh, "exit"); - return ret; } /* @@ -686,7 +628,6 @@ void __journal_drop_transaction(journal_t *journal, transaction_t *transaction) J_ASSERT(transaction->t_shadow_list == NULL); J_ASSERT(transaction->t_log_list == NULL); J_ASSERT(transaction->t_checkpoint_list == NULL); - J_ASSERT(transaction->t_checkpoint_io_list == NULL); J_ASSERT(transaction->t_updates == 0); J_ASSERT(journal->j_committing_transaction != transaction); J_ASSERT(journal->j_running_transaction != transaction); diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index e998a60b9..002ad2bbc 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -160,117 +160,6 @@ static int journal_write_commit_record(journal_t *journal, return (ret == -EIO); } -void journal_do_submit_data(struct buffer_head **wbuf, int bufs) -{ - int i; - - for (i = 0; i < bufs; i++) { - wbuf[i]->b_end_io = end_buffer_write_sync; - /* We use-up our safety reference in submit_bh() */ - submit_bh(WRITE, wbuf[i]); - } -} - -/* - * Submit all the data buffers to disk - */ -static void journal_submit_data_buffers(journal_t *journal, - transaction_t *commit_transaction) -{ - struct journal_head *jh; - struct buffer_head *bh; - int locked; - int bufs = 0; - struct buffer_head **wbuf = journal->j_wbuf; - - /* - * Whenever we unlock the journal and sleep, things can get added - * onto ->t_sync_datalist, so we have to keep looping back to - * write_out_data until we *know* that the list is empty. - * - * Cleanup any flushed data buffers from the data list. Even in - * abort mode, we want to flush this out as soon as possible. - */ -write_out_data: - cond_resched(); - spin_lock(&journal->j_list_lock); - - while (commit_transaction->t_sync_datalist) { - jh = commit_transaction->t_sync_datalist; - bh = jh2bh(jh); - locked = 0; - - /* Get reference just to make sure buffer does not disappear - * when we are forced to drop various locks */ - get_bh(bh); - /* If the buffer is dirty, we need to submit IO and hence - * we need the buffer lock. We try to lock the buffer without - * blocking. If we fail, we need to drop j_list_lock and do - * blocking lock_buffer(). - */ - if (buffer_dirty(bh)) { - if (test_set_buffer_locked(bh)) { - BUFFER_TRACE(bh, "needs blocking lock"); - spin_unlock(&journal->j_list_lock); - /* Write out all data to prevent deadlocks */ - journal_do_submit_data(wbuf, bufs); - bufs = 0; - lock_buffer(bh); - spin_lock(&journal->j_list_lock); - } - locked = 1; - } - /* We have to get bh_state lock. Again out of order, sigh. */ - if (!inverted_lock(journal, bh)) { - jbd_lock_bh_state(bh); - spin_lock(&journal->j_list_lock); - } - /* Someone already cleaned up the buffer? */ - if (!buffer_jbd(bh) - || jh->b_transaction != commit_transaction - || jh->b_jlist != BJ_SyncData) { - jbd_unlock_bh_state(bh); - if (locked) - unlock_buffer(bh); - BUFFER_TRACE(bh, "already cleaned up"); - put_bh(bh); - continue; - } - if (locked && test_clear_buffer_dirty(bh)) { - BUFFER_TRACE(bh, "needs writeout, adding to array"); - wbuf[bufs++] = bh; - __journal_file_buffer(jh, commit_transaction, - BJ_Locked); - jbd_unlock_bh_state(bh); - if (bufs == journal->j_wbufsize) { - spin_unlock(&journal->j_list_lock); - journal_do_submit_data(wbuf, bufs); - bufs = 0; - goto write_out_data; - } - } - else { - BUFFER_TRACE(bh, "writeout complete: unfile"); - __journal_unfile_buffer(jh); - jbd_unlock_bh_state(bh); - if (locked) - unlock_buffer(bh); - journal_remove_journal_head(bh); - /* Once for our safety reference, once for - * journal_remove_journal_head() */ - put_bh(bh); - put_bh(bh); - } - - if (lock_need_resched(&journal->j_list_lock)) { - spin_unlock(&journal->j_list_lock); - goto write_out_data; - } - } - spin_unlock(&journal->j_list_lock); - journal_do_submit_data(wbuf, bufs); -} - /* * journal_commit_transaction * @@ -372,7 +261,7 @@ void journal_commit_transaction(journal_t *journal) struct buffer_head *bh = jh2bh(jh); jbd_lock_bh_state(bh); - jbd_slab_free(jh->b_committed_data, bh->b_size); + kfree(jh->b_committed_data); jh->b_committed_data = NULL; jbd_unlock_bh_state(bh); } @@ -424,13 +313,80 @@ void journal_commit_transaction(journal_t *journal) * Now start flushing things to disk, in the order they appear * on the transaction lists. Data blocks go first. */ + err = 0; - journal_submit_data_buffers(journal, commit_transaction); + /* + * Whenever we unlock the journal and sleep, things can get added + * onto ->t_sync_datalist, so we have to keep looping back to + * write_out_data until we *know* that the list is empty. + */ + bufs = 0; + /* + * Cleanup any flushed data buffers from the data list. Even in + * abort mode, we want to flush this out as soon as possible. + */ +write_out_data: + cond_resched(); + spin_lock(&journal->j_list_lock); + + while (commit_transaction->t_sync_datalist) { + struct buffer_head *bh; + + jh = commit_transaction->t_sync_datalist; + commit_transaction->t_sync_datalist = jh->b_tnext; + bh = jh2bh(jh); + if (buffer_locked(bh)) { + BUFFER_TRACE(bh, "locked"); + if (!inverted_lock(journal, bh)) + goto write_out_data; + __journal_temp_unlink_buffer(jh); + __journal_file_buffer(jh, commit_transaction, + BJ_Locked); + jbd_unlock_bh_state(bh); + if (lock_need_resched(&journal->j_list_lock)) { + spin_unlock(&journal->j_list_lock); + goto write_out_data; + } + } else { + if (buffer_dirty(bh)) { + BUFFER_TRACE(bh, "start journal writeout"); + get_bh(bh); + wbuf[bufs++] = bh; + if (bufs == journal->j_wbufsize) { + jbd_debug(2, "submit %d writes\n", + bufs); + spin_unlock(&journal->j_list_lock); + ll_rw_block(SWRITE, bufs, wbuf); + journal_brelse_array(wbuf, bufs); + bufs = 0; + goto write_out_data; + } + } else { + BUFFER_TRACE(bh, "writeout complete: unfile"); + if (!inverted_lock(journal, bh)) + goto write_out_data; + __journal_unfile_buffer(jh); + jbd_unlock_bh_state(bh); + journal_remove_journal_head(bh); + put_bh(bh); + if (lock_need_resched(&journal->j_list_lock)) { + spin_unlock(&journal->j_list_lock); + goto write_out_data; + } + } + } + } + + if (bufs) { + spin_unlock(&journal->j_list_lock); + ll_rw_block(SWRITE, bufs, wbuf); + journal_brelse_array(wbuf, bufs); + spin_lock(&journal->j_list_lock); + } /* * Wait for all previously submitted IO to complete. */ - spin_lock(&journal->j_list_lock); while (commit_transaction->t_locked_list) { struct buffer_head *bh; @@ -789,14 +745,14 @@ restart_loop: * Otherwise, we can just throw away the frozen data now. */ if (jh->b_committed_data) { - jbd_slab_free(jh->b_committed_data, bh->b_size); + kfree(jh->b_committed_data); jh->b_committed_data = NULL; if (jh->b_frozen_data) { jh->b_committed_data = jh->b_frozen_data; jh->b_frozen_data = NULL; } } else if (jh->b_frozen_data) { - jbd_slab_free(jh->b_frozen_data, bh->b_size); + kfree(jh->b_frozen_data); jh->b_frozen_data = NULL; } @@ -834,22 +790,11 @@ restart_loop: jbd_unlock_bh_state(bh); } else { J_ASSERT_BH(bh, !buffer_dirty(bh)); - /* The buffer on BJ_Forget list and not jbddirty means - * it has been freed by this transaction and hence it - * could not have been reallocated until this - * transaction has committed. *BUT* it could be - * reallocated once we have written all the data to - * disk and before we process the buffer on BJ_Forget - * list. */ - JBUFFER_TRACE(jh, "refile or unfile freed buffer"); - __journal_refile_buffer(jh); - if (!jh->b_transaction) { - jbd_unlock_bh_state(bh); - /* needs a brelse */ - journal_remove_journal_head(bh); - release_buffer_page(bh); - } else - jbd_unlock_bh_state(bh); + J_ASSERT_JH(jh, jh->b_next_transaction == NULL); + __journal_unfile_buffer(jh); + jbd_unlock_bh_state(bh); + journal_remove_journal_head(bh); /* needs a brelse */ + release_buffer_page(bh); } cond_resched_lock(&journal->j_list_lock); } diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index f66724ce4..7f96b5cb6 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -84,7 +83,6 @@ EXPORT_SYMBOL(journal_force_commit); static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); static void __journal_abort_soft (journal_t *journal, int errno); -static int journal_create_jbd_slab(size_t slab_size); /* * Helper function used to manage commit timeouts @@ -329,10 +327,10 @@ repeat: char *tmp; jbd_unlock_bh_state(bh_in); - tmp = jbd_slab_alloc(bh_in->b_size, GFP_NOFS); + tmp = jbd_rep_kmalloc(bh_in->b_size, GFP_NOFS); jbd_lock_bh_state(bh_in); if (jh_in->b_frozen_data) { - jbd_slab_free(tmp, bh_in->b_size); + kfree(tmp); goto repeat; } @@ -1070,17 +1068,17 @@ static int load_superblock(journal_t *journal) int journal_load(journal_t *journal) { int err; - journal_superblock_t *sb; err = load_superblock(journal); if (err) return err; - sb = journal->j_superblock; /* If this is a V2 superblock, then we have to check the * features flags on it. */ if (journal->j_format_version >= 2) { + journal_superblock_t *sb = journal->j_superblock; + if ((sb->s_feature_ro_compat & ~cpu_to_be32(JFS_KNOWN_ROCOMPAT_FEATURES)) || (sb->s_feature_incompat & @@ -1091,13 +1089,6 @@ int journal_load(journal_t *journal) } } - /* - * Create a slab for this blocksize - */ - err = journal_create_jbd_slab(cpu_to_be32(sb->s_blocksize)); - if (err) - return err; - /* Let the recovery code check whether it needs to recover any * data from the journal. */ if (journal_recover(journal)) @@ -1619,77 +1610,6 @@ void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry) return kmalloc(size, flags | (retry ? __GFP_NOFAIL : 0)); } -/* - * jbd slab management: create 1k, 2k, 4k, 8k slabs as needed - * and allocate frozen and commit buffers from these slabs. - * - * Reason for doing this is to avoid, SLAB_DEBUG - since it could - * cause bh to cross page boundary. - */ - -#define JBD_MAX_SLABS 5 -#define JBD_SLAB_INDEX(size) (size >> 11) - -static kmem_cache_t *jbd_slab[JBD_MAX_SLABS]; -static const char *jbd_slab_names[JBD_MAX_SLABS] = { - "jbd_1k", "jbd_2k", "jbd_4k", NULL, "jbd_8k" -}; - -static void journal_destroy_jbd_slabs(void) -{ - int i; - - for (i = 0; i < JBD_MAX_SLABS; i++) { - if (jbd_slab[i]) - kmem_cache_destroy(jbd_slab[i]); - jbd_slab[i] = NULL; - } -} - -static int journal_create_jbd_slab(size_t slab_size) -{ - int i = JBD_SLAB_INDEX(slab_size); - - BUG_ON(i >= JBD_MAX_SLABS); - - /* - * Check if we already have a slab created for this size - */ - if (jbd_slab[i]) - return 0; - - /* - * Create a slab and force alignment to be same as slabsize - - * this will make sure that allocations won't cross the page - * boundary. - */ - jbd_slab[i] = kmem_cache_create(jbd_slab_names[i], - slab_size, slab_size, 0, NULL, NULL); - if (!jbd_slab[i]) { - printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n"); - return -ENOMEM; - } - return 0; -} - -void * jbd_slab_alloc(size_t size, gfp_t flags) -{ - int idx; - - idx = JBD_SLAB_INDEX(size); - BUG_ON(jbd_slab[idx] == NULL); - return kmem_cache_alloc(jbd_slab[idx], flags | __GFP_NOFAIL); -} - -void jbd_slab_free(void *ptr, size_t size) -{ - int idx; - - idx = JBD_SLAB_INDEX(size); - BUG_ON(jbd_slab[idx] == NULL); - kmem_cache_free(jbd_slab[idx], ptr); -} - /* * Journal_head storage management */ @@ -1755,7 +1675,7 @@ static void journal_free_journal_head(struct journal_head *jh) { #ifdef CONFIG_JBD_DEBUG atomic_dec(&nr_journal_heads); - memset(jh, JBD_POISON_FREE, sizeof(*jh)); + memset(jh, 0x5b, sizeof(*jh)); #endif kmem_cache_free(journal_head_cache, jh); } @@ -1878,13 +1798,13 @@ static void __journal_remove_journal_head(struct buffer_head *bh) printk(KERN_WARNING "%s: freeing " "b_frozen_data\n", __FUNCTION__); - jbd_slab_free(jh->b_frozen_data, bh->b_size); + kfree(jh->b_frozen_data); } if (jh->b_committed_data) { printk(KERN_WARNING "%s: freeing " "b_committed_data\n", __FUNCTION__); - jbd_slab_free(jh->b_committed_data, bh->b_size); + kfree(jh->b_committed_data); } bh->b_private = NULL; jh->b_bh = NULL; /* debug, really */ @@ -2040,7 +1960,6 @@ static void journal_destroy_caches(void) journal_destroy_revoke_caches(); journal_destroy_journal_head_cache(); journal_destroy_handle_cache(); - journal_destroy_jbd_slabs(); } static int __init journal_init(void) diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index de5bafb4e..80d7f53fd 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c @@ -531,7 +531,6 @@ static int do_one_pass(journal_t *journal, default: jbd_debug(3, "Unrecognised magic %d, end of scan.\n", blocktype); - brelse(bh); goto done; } } diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 3eb8be626..c609f5034 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -227,8 +227,7 @@ repeat_locked: spin_unlock(&transaction->t_handle_lock); spin_unlock(&journal->j_state_lock); out: - if (unlikely(new_transaction)) /* It's usually NULL */ - kfree(new_transaction); + kfree(new_transaction); return ret; } @@ -666,9 +665,8 @@ repeat: if (!frozen_buffer) { JBUFFER_TRACE(jh, "allocate memory for buffer"); jbd_unlock_bh_state(bh); - frozen_buffer = - jbd_slab_alloc(jh2bh(jh)->b_size, - GFP_NOFS); + frozen_buffer = jbd_kmalloc(jh2bh(jh)->b_size, + GFP_NOFS); if (!frozen_buffer) { printk(KERN_EMERG "%s: OOM for frozen_buffer\n", @@ -726,8 +724,7 @@ done: journal_cancel_revoke(handle, jh); out: - if (unlikely(frozen_buffer)) /* It's usually NULL */ - jbd_slab_free(frozen_buffer, bh->b_size); + kfree(frozen_buffer); JBUFFER_TRACE(jh, "exit"); return error; @@ -880,7 +877,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh) repeat: if (!jh->b_committed_data) { - committed_data = jbd_slab_alloc(jh2bh(jh)->b_size, GFP_NOFS); + committed_data = jbd_kmalloc(jh2bh(jh)->b_size, GFP_NOFS); if (!committed_data) { printk(KERN_EMERG "%s: No memory for committed data\n", __FUNCTION__); @@ -906,8 +903,7 @@ repeat: jbd_unlock_bh_state(bh); out: journal_put_journal_head(jh); - if (unlikely(committed_data)) - jbd_slab_free(committed_data, bh->b_size); + kfree(committed_data); return err; } @@ -967,14 +963,6 @@ int journal_dirty_data(handle_t *handle, struct buffer_head *bh) */ jbd_lock_bh_state(bh); spin_lock(&journal->j_list_lock); - - /* Now that we have bh_state locked, are we really still mapped? */ - if (!buffer_mapped(bh)) { - JBUFFER_TRACE(jh, "unmapped, bailing out"); - // printk("caught an unmapped buffer\n"); - goto no_journal; - } - if (jh->b_transaction) { JBUFFER_TRACE(jh, "has transaction"); if (jh->b_transaction != handle->h_transaction) { @@ -1036,11 +1024,6 @@ int journal_dirty_data(handle_t *handle, struct buffer_head *bh) sync_dirty_buffer(bh); jbd_lock_bh_state(bh); spin_lock(&journal->j_list_lock); - /* Since we dropped the lock... */ - if (!buffer_mapped(bh)) { - JBUFFER_TRACE(jh, "Got unmapped"); - goto no_journal; - } /* The buffer may become locked again at any time if it is redirtied */ } @@ -1764,7 +1747,6 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh) int ret; BUFFER_TRACE(bh, "entry"); - //J_ASSERT_BH(bh, PageLocked(bh->b_page)); /* * It is safe to proceed here without the j_list_lock because the @@ -1838,7 +1820,6 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh) } } else if (transaction == journal->j_committing_transaction) { if (jh->b_jlist == BJ_Locked) { - JBUFFER_TRACE(jh, "on committing BJ_Locked"); /* * The buffer is on the committing transaction's locked * list. We have the buffer locked, so I/O has @@ -1872,7 +1853,6 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh) * i_size already for this truncate so recovery will not * expose the disk blocks we are discarding here.) */ J_ASSERT_JH(jh, transaction == journal->j_running_transaction); - JBUFFER_TRACE(jh, "on running transaction"); may_free = __dispose_buffer(jh, transaction); } @@ -2058,8 +2038,7 @@ void __journal_refile_buffer(struct journal_head *jh) __journal_temp_unlink_buffer(jh); jh->b_transaction = jh->b_next_transaction; jh->b_next_transaction = NULL; - __journal_file_buffer(jh, jh->b_transaction, - was_dirty ? BJ_Metadata : BJ_Reserved); + __journal_file_buffer(jh, jh->b_transaction, BJ_Metadata); J_ASSERT_JH(jh, jh->b_transaction->t_state == T_RUNNING); if (was_dirty) diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 61d63dea0..020cc097c 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c @@ -59,7 +59,7 @@ static const struct file_operations jffs_file_operations; static struct inode_operations jffs_file_inode_operations; static const struct file_operations jffs_dir_operations; static struct inode_operations jffs_dir_inode_operations; -static const struct address_space_operations jffs_address_operations; +static struct address_space_operations jffs_address_operations; kmem_cache_t *node_cache = NULL; kmem_cache_t *fm_cache = NULL; @@ -364,11 +364,12 @@ jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode, inode->i_ctime.tv_nsec = 0; inode->i_mtime.tv_nsec = 0; inode->i_atime.tv_nsec = 0; + inode->i_blksize = PAGE_SIZE; inode->i_blocks = (inode->i_size + 511) >> 9; f = jffs_find_file(c, raw_inode->ino); - inode->i_private = (void *)f; + inode->u.generic_ip = (void *)f; insert_inode_hash(inode); return inode; @@ -376,9 +377,9 @@ jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode, /* Get statistics of the file system. */ static int -jffs_statfs(struct dentry *dentry, struct kstatfs *buf) +jffs_statfs(struct super_block *sb, struct kstatfs *buf) { - struct jffs_control *c = (struct jffs_control *) dentry->d_sb->s_fs_info; + struct jffs_control *c = (struct jffs_control *) sb->s_fs_info; struct jffs_fmcontrol *fmc; lock_kernel(); @@ -441,7 +442,7 @@ jffs_rename(struct inode *old_dir, struct dentry *old_dentry, }); result = -ENOTDIR; - if (!(old_dir_f = old_dir->i_private)) { + if (!(old_dir_f = (struct jffs_file *)old_dir->u.generic_ip)) { D(printk("jffs_rename(): Old dir invalid.\n")); goto jffs_rename_end; } @@ -455,7 +456,7 @@ jffs_rename(struct inode *old_dir, struct dentry *old_dentry, /* Find the new directory. */ result = -ENOTDIR; - if (!(new_dir_f = new_dir->i_private)) { + if (!(new_dir_f = (struct jffs_file *)new_dir->u.generic_ip)) { D(printk("jffs_rename(): New dir invalid.\n")); goto jffs_rename_end; } @@ -592,7 +593,7 @@ jffs_readdir(struct file *filp, void *dirent, filldir_t filldir) } else { ddino = ((struct jffs_file *) - inode->i_private)->pino; + inode->u.generic_ip)->pino; } D3(printk("jffs_readdir(): \"..\" %u\n", ddino)); if (filldir(dirent, "..", 2, filp->f_pos, ddino, DT_DIR) < 0) { @@ -603,7 +604,7 @@ jffs_readdir(struct file *filp, void *dirent, filldir_t filldir) } filp->f_pos++; } - f = ((struct jffs_file *)inode->i_private)->children; + f = ((struct jffs_file *)inode->u.generic_ip)->children; j = 2; while(f && (f->deleted || j++ < filp->f_pos )) { @@ -667,7 +668,7 @@ jffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) } r = -EACCES; - if (!(d = (struct jffs_file *)dir->i_private)) { + if (!(d = (struct jffs_file *)dir->u.generic_ip)) { D(printk("jffs_lookup(): No such inode! (%lu)\n", dir->i_ino)); goto jffs_lookup_end; @@ -738,7 +739,7 @@ jffs_do_readpage_nolock(struct file *file, struct page *page) unsigned long read_len; int result; struct inode *inode = (struct inode*)page->mapping->host; - struct jffs_file *f = (struct jffs_file *)inode->i_private; + struct jffs_file *f = (struct jffs_file *)inode->u.generic_ip; struct jffs_control *c = (struct jffs_control *)inode->i_sb->s_fs_info; int r; loff_t offset; @@ -827,7 +828,7 @@ jffs_mkdir(struct inode *dir, struct dentry *dentry, int mode) }); lock_kernel(); - dir_f = dir->i_private; + dir_f = (struct jffs_file *)dir->u.generic_ip; ASSERT(if (!dir_f) { printk(KERN_ERR "jffs_mkdir(): No reference to a " @@ -971,7 +972,7 @@ jffs_remove(struct inode *dir, struct dentry *dentry, int type) kfree(_name); }); - dir_f = dir->i_private; + dir_f = (struct jffs_file *) dir->u.generic_ip; c = dir_f->c; result = -ENOENT; @@ -1081,7 +1082,7 @@ jffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) if (!old_valid_dev(rdev)) return -EINVAL; lock_kernel(); - dir_f = dir->i_private; + dir_f = (struct jffs_file *)dir->u.generic_ip; c = dir_f->c; D3(printk (KERN_NOTICE "mknod(): down biglock\n")); @@ -1185,7 +1186,7 @@ jffs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) kfree(_symname); }); - dir_f = dir->i_private; + dir_f = (struct jffs_file *)dir->u.generic_ip; ASSERT(if (!dir_f) { printk(KERN_ERR "jffs_symlink(): No reference to a " "jffs_file struct in inode.\n"); @@ -1288,7 +1289,7 @@ jffs_create(struct inode *dir, struct dentry *dentry, int mode, kfree(s); }); - dir_f = dir->i_private; + dir_f = (struct jffs_file *)dir->u.generic_ip; ASSERT(if (!dir_f) { printk(KERN_ERR "jffs_create(): No reference to a " "jffs_file struct in inode.\n"); @@ -1402,9 +1403,9 @@ jffs_file_write(struct file *filp, const char *buf, size_t count, goto out_isem; } - if (!(f = inode->i_private)) { - D(printk("jffs_file_write(): inode->i_private = 0x%p\n", - inode->i_private)); + if (!(f = (struct jffs_file *)inode->u.generic_ip)) { + D(printk("jffs_file_write(): inode->u.generic_ip = 0x%p\n", + inode->u.generic_ip)); goto out_isem; } @@ -1613,7 +1614,7 @@ jffs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, } /* jffs_ioctl() */ -static const struct address_space_operations jffs_address_operations = { +static struct address_space_operations jffs_address_operations = { .readpage = jffs_readpage, .prepare_write = jffs_prepare_write, .commit_write = jffs_commit_write, @@ -1692,7 +1693,7 @@ jffs_read_inode(struct inode *inode) mutex_unlock(&c->fmc->biglock); return; } - inode->i_private = f; + inode->u.generic_ip = (void *)f; inode->i_mode = f->mode; inode->i_nlink = f->nlink; inode->i_uid = f->uid; @@ -1705,6 +1706,7 @@ jffs_read_inode(struct inode *inode) inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0; + inode->i_blksize = PAGE_SIZE; inode->i_blocks = (inode->i_size + 511) >> 9; if (S_ISREG(inode->i_mode)) { inode->i_op = &jffs_file_inode_operations; @@ -1746,7 +1748,7 @@ jffs_delete_inode(struct inode *inode) lock_kernel(); inode->i_size = 0; inode->i_blocks = 0; - inode->i_private = NULL; + inode->u.generic_ip = NULL; clear_inode(inode); if (inode->i_nlink == 0) { c = (struct jffs_control *) inode->i_sb->s_fs_info; @@ -1783,11 +1785,10 @@ static struct super_operations jffs_ops = .remount_fs = jffs_remount, }; -static int jffs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *jffs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, jffs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, jffs_fill_super); } static struct file_system_type jffs_fs_type = { diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c index 9000f1eff..0ef207dfa 100644 --- a/fs/jffs/intrep.c +++ b/fs/jffs/intrep.c @@ -55,6 +55,7 @@ * */ +#include #include #include #include @@ -246,7 +247,7 @@ flash_safe_read(struct mtd_info *mtd, loff_t from, D3(printk(KERN_NOTICE "flash_safe_read(%p, %08x, %p, %08x)\n", mtd, (unsigned int) from, buf, count)); - res = mtd->read(mtd, from, count, &retlen, buf); + res = MTD_READ(mtd, from, count, &retlen, buf); if (retlen != count) { panic("Didn't read all bytes in flash_safe_read(). Returned %d\n", res); } @@ -261,7 +262,7 @@ flash_read_u32(struct mtd_info *mtd, loff_t from) __u32 ret; int res; - res = mtd->read(mtd, from, 4, &retlen, (unsigned char *)&ret); + res = MTD_READ(mtd, from, 4, &retlen, (unsigned char *)&ret); if (retlen != 4) { printk("Didn't read all bytes in flash_read_u32(). Returned %d\n", res); return 0; @@ -281,7 +282,7 @@ flash_safe_write(struct mtd_info *mtd, loff_t to, D3(printk(KERN_NOTICE "flash_safe_write(%p, %08x, %p, %08x)\n", mtd, (unsigned int) to, buf, count)); - res = mtd->write(mtd, to, count, &retlen, buf); + res = MTD_WRITE(mtd, to, count, &retlen, buf); if (retlen != count) { printk("Didn't write all bytes in flash_safe_write(). Returned %d\n", res); } @@ -299,9 +300,9 @@ flash_safe_writev(struct mtd_info *mtd, const struct kvec *vecs, D3(printk(KERN_NOTICE "flash_safe_writev(%p, %08x, %p)\n", mtd, (unsigned int) to, vecs)); - + if (mtd->writev) { - res = mtd->writev(mtd, vecs, iovec_cnt, to, &retlen); + res = MTD_WRITEV(mtd, vecs, iovec_cnt, to, &retlen); return res ? res : retlen; } /* Not implemented writev. Repeatedly use write - on the not so @@ -311,8 +312,7 @@ flash_safe_writev(struct mtd_info *mtd, const struct kvec *vecs, retlen=0; for (i=0; !res && iwrite(mtd, to, vecs[i].iov_len, &retlen_a, - vecs[i].iov_base); + res = MTD_WRITE(mtd, to, vecs[i].iov_len, &retlen_a, vecs[i].iov_base); if (retlen_a != vecs[i].iov_len) { printk("Didn't write all bytes in flash_safe_writev(). Returned %d\n", res); if (i != iovec_cnt-1) @@ -393,7 +393,7 @@ flash_erase_region(struct mtd_info *mtd, loff_t start, set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&wait_q, &wait); - if (mtd->erase(mtd, erase) < 0) { + if (MTD_ERASE(mtd, erase) < 0) { set_current_state(TASK_RUNNING); remove_wait_queue(&wait_q, &wait); kfree(erase); diff --git a/fs/jffs/jffs_fm.h b/fs/jffs/jffs_fm.h index 9ee6ad29e..c794d923d 100644 --- a/fs/jffs/jffs_fm.h +++ b/fs/jffs/jffs_fm.h @@ -20,6 +20,7 @@ #ifndef __LINUX_JFFS_FM_H__ #define __LINUX_JFFS_FM_H__ +#include #include #include #include diff --git a/fs/jffs2/Makefile b/fs/jffs2/Makefile index 7f28ee0bd..77dc5561a 100644 --- a/fs/jffs2/Makefile +++ b/fs/jffs2/Makefile @@ -12,9 +12,6 @@ jffs2-y += symlink.o build.o erase.o background.o fs.o writev.o jffs2-y += super.o debug.o jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER) += wbuf.o -jffs2-$(CONFIG_JFFS2_FS_XATTR) += xattr.o xattr_trusted.o xattr_user.o -jffs2-$(CONFIG_JFFS2_FS_SECURITY) += security.o -jffs2-$(CONFIG_JFFS2_FS_POSIX_ACL) += acl.o jffs2-$(CONFIG_JFFS2_RUBIN) += compr_rubin.o jffs2-$(CONFIG_JFFS2_RTIME) += compr_rtime.o jffs2-$(CONFIG_JFFS2_ZLIB) += compr_zlib.o diff --git a/fs/jffs2/README.Locking b/fs/jffs2/README.Locking index c8f0bd64e..b7943439b 100644 --- a/fs/jffs2/README.Locking +++ b/fs/jffs2/README.Locking @@ -150,24 +150,3 @@ the buffer. Ordering constraints: Lock wbuf_sem last, after the alloc_sem or and f->sem. - - - c->xattr_sem - ------------ - -This read/write semaphore protects against concurrent access to the -xattr related objects which include stuff in superblock and ic->xref. -In read-only path, write-semaphore is too much exclusion. It's enough -by read-semaphore. But you must hold write-semaphore when updating, -creating or deleting any xattr related object. - -Once xattr_sem released, there would be no assurance for the existence -of those objects. Thus, a series of processes is often required to retry, -when updating such a object is necessary under holding read semaphore. -For example, do_jffs2_getxattr() holds read-semaphore to scan xref and -xdatum at first. But it retries this process with holding write-semaphore -after release read-semaphore, if it's necessary to load name/value pair -from medium. - -Ordering constraints: - Lock xattr_sem last, after the alloc_sem. diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c deleted file mode 100644 index 0ae3cd107..000000000 --- a/fs/jffs2/acl.c +++ /dev/null @@ -1,485 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "nodelist.h" - -static size_t jffs2_acl_size(int count) -{ - if (count <= 4) { - return sizeof(struct jffs2_acl_header) - + count * sizeof(struct jffs2_acl_entry_short); - } else { - return sizeof(struct jffs2_acl_header) - + 4 * sizeof(struct jffs2_acl_entry_short) - + (count - 4) * sizeof(struct jffs2_acl_entry); - } -} - -static int jffs2_acl_count(size_t size) -{ - size_t s; - - size -= sizeof(struct jffs2_acl_header); - s = size - 4 * sizeof(struct jffs2_acl_entry_short); - if (s < 0) { - if (size % sizeof(struct jffs2_acl_entry_short)) - return -1; - return size / sizeof(struct jffs2_acl_entry_short); - } else { - if (s % sizeof(struct jffs2_acl_entry)) - return -1; - return s / sizeof(struct jffs2_acl_entry) + 4; - } -} - -static struct posix_acl *jffs2_acl_from_medium(void *value, size_t size) -{ - void *end = value + size; - struct jffs2_acl_header *header = value; - struct jffs2_acl_entry *entry; - struct posix_acl *acl; - uint32_t ver; - int i, count; - - if (!value) - return NULL; - if (size < sizeof(struct jffs2_acl_header)) - return ERR_PTR(-EINVAL); - ver = je32_to_cpu(header->a_version); - if (ver != JFFS2_ACL_VERSION) { - JFFS2_WARNING("Invalid ACL version. (=%u)\n", ver); - return ERR_PTR(-EINVAL); - } - - value += sizeof(struct jffs2_acl_header); - count = jffs2_acl_count(size); - if (count < 0) - return ERR_PTR(-EINVAL); - if (count == 0) - return NULL; - - acl = posix_acl_alloc(count, GFP_KERNEL); - if (!acl) - return ERR_PTR(-ENOMEM); - - for (i=0; i < count; i++) { - entry = value; - if (value + sizeof(struct jffs2_acl_entry_short) > end) - goto fail; - acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag); - acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm); - switch (acl->a_entries[i].e_tag) { - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - value += sizeof(struct jffs2_acl_entry_short); - acl->a_entries[i].e_id = ACL_UNDEFINED_ID; - break; - - case ACL_USER: - case ACL_GROUP: - value += sizeof(struct jffs2_acl_entry); - if (value > end) - goto fail; - acl->a_entries[i].e_id = je32_to_cpu(entry->e_id); - break; - - default: - goto fail; - } - } - if (value != end) - goto fail; - return acl; - fail: - posix_acl_release(acl); - return ERR_PTR(-EINVAL); -} - -static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) -{ - struct jffs2_acl_header *header; - struct jffs2_acl_entry *entry; - void *e; - size_t i; - - *size = jffs2_acl_size(acl->a_count); - header = kmalloc(sizeof(*header) + acl->a_count * sizeof(*entry), GFP_KERNEL); - if (!header) - return ERR_PTR(-ENOMEM); - header->a_version = cpu_to_je32(JFFS2_ACL_VERSION); - e = header + 1; - for (i=0; i < acl->a_count; i++) { - entry = e; - entry->e_tag = cpu_to_je16(acl->a_entries[i].e_tag); - entry->e_perm = cpu_to_je16(acl->a_entries[i].e_perm); - switch(acl->a_entries[i].e_tag) { - case ACL_USER: - case ACL_GROUP: - entry->e_id = cpu_to_je32(acl->a_entries[i].e_id); - e += sizeof(struct jffs2_acl_entry); - break; - - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - e += sizeof(struct jffs2_acl_entry_short); - break; - - default: - goto fail; - } - } - return header; - fail: - kfree(header); - return ERR_PTR(-EINVAL); -} - -static struct posix_acl *jffs2_iget_acl(struct inode *inode, struct posix_acl **i_acl) -{ - struct posix_acl *acl = JFFS2_ACL_NOT_CACHED; - - spin_lock(&inode->i_lock); - if (*i_acl != JFFS2_ACL_NOT_CACHED) - acl = posix_acl_dup(*i_acl); - spin_unlock(&inode->i_lock); - return acl; -} - -static void jffs2_iset_acl(struct inode *inode, struct posix_acl **i_acl, struct posix_acl *acl) -{ - spin_lock(&inode->i_lock); - if (*i_acl != JFFS2_ACL_NOT_CACHED) - posix_acl_release(*i_acl); - *i_acl = posix_acl_dup(acl); - spin_unlock(&inode->i_lock); -} - -static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) -{ - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - struct posix_acl *acl; - char *value = NULL; - int rc, xprefix; - - switch (type) { - case ACL_TYPE_ACCESS: - acl = jffs2_iget_acl(inode, &f->i_acl_access); - if (acl != JFFS2_ACL_NOT_CACHED) - return acl; - xprefix = JFFS2_XPREFIX_ACL_ACCESS; - break; - case ACL_TYPE_DEFAULT: - acl = jffs2_iget_acl(inode, &f->i_acl_default); - if (acl != JFFS2_ACL_NOT_CACHED) - return acl; - xprefix = JFFS2_XPREFIX_ACL_DEFAULT; - break; - default: - return ERR_PTR(-EINVAL); - } - rc = do_jffs2_getxattr(inode, xprefix, "", NULL, 0); - if (rc > 0) { - value = kmalloc(rc, GFP_KERNEL); - if (!value) - return ERR_PTR(-ENOMEM); - rc = do_jffs2_getxattr(inode, xprefix, "", value, rc); - } - if (rc > 0) { - acl = jffs2_acl_from_medium(value, rc); - } else if (rc == -ENODATA || rc == -ENOSYS) { - acl = NULL; - } else { - acl = ERR_PTR(rc); - } - if (value) - kfree(value); - if (!IS_ERR(acl)) { - switch (type) { - case ACL_TYPE_ACCESS: - jffs2_iset_acl(inode, &f->i_acl_access, acl); - break; - case ACL_TYPE_DEFAULT: - jffs2_iset_acl(inode, &f->i_acl_default, acl); - break; - } - } - return acl; -} - -static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) -{ - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - size_t size = 0; - char *value = NULL; - int rc, xprefix; - - if (S_ISLNK(inode->i_mode)) - return -EOPNOTSUPP; - - switch (type) { - case ACL_TYPE_ACCESS: - xprefix = JFFS2_XPREFIX_ACL_ACCESS; - if (acl) { - mode_t mode = inode->i_mode; - rc = posix_acl_equiv_mode(acl, &mode); - if (rc < 0) - return rc; - if (inode->i_mode != mode) { - inode->i_mode = mode; - jffs2_dirty_inode(inode); - } - if (rc == 0) - acl = NULL; - } - break; - case ACL_TYPE_DEFAULT: - xprefix = JFFS2_XPREFIX_ACL_DEFAULT; - if (!S_ISDIR(inode->i_mode)) - return acl ? -EACCES : 0; - break; - default: - return -EINVAL; - } - if (acl) { - value = jffs2_acl_to_medium(acl, &size); - if (IS_ERR(value)) - return PTR_ERR(value); - } - - rc = do_jffs2_setxattr(inode, xprefix, "", value, size, 0); - if (!value && rc == -ENODATA) - rc = 0; - if (value) - kfree(value); - if (!rc) { - switch(type) { - case ACL_TYPE_ACCESS: - jffs2_iset_acl(inode, &f->i_acl_access, acl); - break; - case ACL_TYPE_DEFAULT: - jffs2_iset_acl(inode, &f->i_acl_default, acl); - break; - } - } - return rc; -} - -static int jffs2_check_acl(struct inode *inode, int mask) -{ - struct posix_acl *acl; - int rc; - - acl = jffs2_get_acl(inode, ACL_TYPE_ACCESS); - if (IS_ERR(acl)) - return PTR_ERR(acl); - if (acl) { - rc = posix_acl_permission(inode, acl, mask); - posix_acl_release(acl); - return rc; - } - return -EAGAIN; -} - -int jffs2_permission(struct inode *inode, int mask, struct nameidata *nd) -{ - return generic_permission(inode, mask, jffs2_check_acl); -} - -int jffs2_init_acl(struct inode *inode, struct inode *dir) -{ - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - struct posix_acl *acl = NULL, *clone; - mode_t mode; - int rc = 0; - - f->i_acl_access = JFFS2_ACL_NOT_CACHED; - f->i_acl_default = JFFS2_ACL_NOT_CACHED; - if (!S_ISLNK(inode->i_mode)) { - acl = jffs2_get_acl(dir, ACL_TYPE_DEFAULT); - if (IS_ERR(acl)) - return PTR_ERR(acl); - if (!acl) - inode->i_mode &= ~current->fs->umask; - } - if (acl) { - if (S_ISDIR(inode->i_mode)) { - rc = jffs2_set_acl(inode, ACL_TYPE_DEFAULT, acl); - if (rc) - goto cleanup; - } - clone = posix_acl_clone(acl, GFP_KERNEL); - rc = -ENOMEM; - if (!clone) - goto cleanup; - mode = inode->i_mode; - rc = posix_acl_create_masq(clone, &mode); - if (rc >= 0) { - inode->i_mode = mode; - if (rc > 0) - rc = jffs2_set_acl(inode, ACL_TYPE_ACCESS, clone); - } - posix_acl_release(clone); - } - cleanup: - posix_acl_release(acl); - return rc; -} - -void jffs2_clear_acl(struct jffs2_inode_info *f) -{ - if (f->i_acl_access && f->i_acl_access != JFFS2_ACL_NOT_CACHED) { - posix_acl_release(f->i_acl_access); - f->i_acl_access = JFFS2_ACL_NOT_CACHED; - } - if (f->i_acl_default && f->i_acl_default != JFFS2_ACL_NOT_CACHED) { - posix_acl_release(f->i_acl_default); - f->i_acl_default = JFFS2_ACL_NOT_CACHED; - } -} - -int jffs2_acl_chmod(struct inode *inode) -{ - struct posix_acl *acl, *clone; - int rc; - - if (S_ISLNK(inode->i_mode)) - return -EOPNOTSUPP; - acl = jffs2_get_acl(inode, ACL_TYPE_ACCESS); - if (IS_ERR(acl) || !acl) - return PTR_ERR(acl); - clone = posix_acl_clone(acl, GFP_KERNEL); - posix_acl_release(acl); - if (!clone) - return -ENOMEM; - rc = posix_acl_chmod_masq(clone, inode->i_mode); - if (!rc) - rc = jffs2_set_acl(inode, ACL_TYPE_ACCESS, clone); - posix_acl_release(clone); - return rc; -} - -static size_t jffs2_acl_access_listxattr(struct inode *inode, char *list, size_t list_size, - const char *name, size_t name_len) -{ - const int retlen = sizeof(POSIX_ACL_XATTR_ACCESS); - - if (list && retlen <= list_size) - strcpy(list, POSIX_ACL_XATTR_ACCESS); - return retlen; -} - -static size_t jffs2_acl_default_listxattr(struct inode *inode, char *list, size_t list_size, - const char *name, size_t name_len) -{ - const int retlen = sizeof(POSIX_ACL_XATTR_DEFAULT); - - if (list && retlen <= list_size) - strcpy(list, POSIX_ACL_XATTR_DEFAULT); - return retlen; -} - -static int jffs2_acl_getxattr(struct inode *inode, int type, void *buffer, size_t size) -{ - struct posix_acl *acl; - int rc; - - acl = jffs2_get_acl(inode, type); - if (IS_ERR(acl)) - return PTR_ERR(acl); - if (!acl) - return -ENODATA; - rc = posix_acl_to_xattr(acl, buffer, size); - posix_acl_release(acl); - - return rc; -} - -static int jffs2_acl_access_getxattr(struct inode *inode, const char *name, void *buffer, size_t size) -{ - if (name[0] != '\0') - return -EINVAL; - return jffs2_acl_getxattr(inode, ACL_TYPE_ACCESS, buffer, size); -} - -static int jffs2_acl_default_getxattr(struct inode *inode, const char *name, void *buffer, size_t size) -{ - if (name[0] != '\0') - return -EINVAL; - return jffs2_acl_getxattr(inode, ACL_TYPE_DEFAULT, buffer, size); -} - -static int jffs2_acl_setxattr(struct inode *inode, int type, const void *value, size_t size) -{ - struct posix_acl *acl; - int rc; - - if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) - return -EPERM; - - if (value) { - acl = posix_acl_from_xattr(value, size); - if (IS_ERR(acl)) - return PTR_ERR(acl); - if (acl) { - rc = posix_acl_valid(acl); - if (rc) - goto out; - } - } else { - acl = NULL; - } - rc = jffs2_set_acl(inode, type, acl); - out: - posix_acl_release(acl); - return rc; -} - -static int jffs2_acl_access_setxattr(struct inode *inode, const char *name, - const void *buffer, size_t size, int flags) -{ - if (name[0] != '\0') - return -EINVAL; - return jffs2_acl_setxattr(inode, ACL_TYPE_ACCESS, buffer, size); -} - -static int jffs2_acl_default_setxattr(struct inode *inode, const char *name, - const void *buffer, size_t size, int flags) -{ - if (name[0] != '\0') - return -EINVAL; - return jffs2_acl_setxattr(inode, ACL_TYPE_DEFAULT, buffer, size); -} - -struct xattr_handler jffs2_acl_access_xattr_handler = { - .prefix = POSIX_ACL_XATTR_ACCESS, - .list = jffs2_acl_access_listxattr, - .get = jffs2_acl_access_getxattr, - .set = jffs2_acl_access_setxattr, -}; - -struct xattr_handler jffs2_acl_default_xattr_handler = { - .prefix = POSIX_ACL_XATTR_DEFAULT, - .list = jffs2_acl_default_listxattr, - .get = jffs2_acl_default_getxattr, - .set = jffs2_acl_default_setxattr, -}; diff --git a/fs/jffs2/acl.h b/fs/jffs2/acl.h deleted file mode 100644 index fa327dbd3..000000000 --- a/fs/jffs2/acl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -struct jffs2_acl_entry { - jint16_t e_tag; - jint16_t e_perm; - jint32_t e_id; -}; - -struct jffs2_acl_entry_short { - jint16_t e_tag; - jint16_t e_perm; -}; - -struct jffs2_acl_header { - jint32_t a_version; -}; - -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - -#define JFFS2_ACL_NOT_CACHED ((void *)-1) - -extern int jffs2_permission(struct inode *, int, struct nameidata *); -extern int jffs2_acl_chmod(struct inode *); -extern int jffs2_init_acl(struct inode *, struct inode *); -extern void jffs2_clear_acl(struct jffs2_inode_info *); - -extern struct xattr_handler jffs2_acl_access_xattr_handler; -extern struct xattr_handler jffs2_acl_default_xattr_handler; - -#else - -#define jffs2_permission NULL -#define jffs2_acl_chmod(inode) (0) -#define jffs2_init_acl(inode,dir) (0) -#define jffs2_clear_acl(f) - -#endif /* CONFIG_JFFS2_FS_POSIX_ACL */ diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c index 02826967a..70f7a896c 100644 --- a/fs/jffs2/build.c +++ b/fs/jffs2/build.c @@ -160,7 +160,6 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c) ic->scan_dents = NULL; cond_resched(); } - jffs2_build_xattr_subsystem(c); c->flags &= ~JFFS2_SB_FLAG_BUILDING; dbg_fsbuild("FS build complete\n"); @@ -179,7 +178,6 @@ exit: jffs2_free_full_dirent(fd); } } - jffs2_clear_xattr_subsystem(c); } return ret; diff --git a/fs/jffs2/compr.c b/fs/jffs2/compr.c index 7001ba26c..e7944e665 100644 --- a/fs/jffs2/compr.c +++ b/fs/jffs2/compr.c @@ -412,7 +412,7 @@ void jffs2_free_comprbuf(unsigned char *comprbuf, unsigned char *orig) kfree(comprbuf); } -int __init jffs2_compressors_init(void) +int jffs2_compressors_init(void) { /* Registering compressors */ #ifdef CONFIG_JFFS2_ZLIB diff --git a/fs/jffs2/compr.h b/fs/jffs2/compr.h index 509b8b1c0..a77e830d8 100644 --- a/fs/jffs2/compr.h +++ b/fs/jffs2/compr.h @@ -23,8 +23,8 @@ #include #include #include -#include "jffs2_fs_i.h" -#include "jffs2_fs_sb.h" +#include +#include #include "nodelist.h" #define JFFS2_RUBINMIPS_PRIORITY 10 diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 3681d0728..5c63e0cdc 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c @@ -15,6 +15,7 @@ #error "The userspace support got too messy and was removed. Update your mkfs.jffs2" #endif +#include #include #include #include diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index 72b4fc13a..1fe17de71 100644 --- a/fs/jffs2/debug.c +++ b/fs/jffs2/debug.c @@ -192,13 +192,13 @@ __jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c, else my_dirty_size += totlen; - if ((!ref_next(ref2)) != (ref2 == jeb->last_node)) { - JFFS2_ERROR("node_ref for node at %#08x (mem %p) has next at %#08x (mem %p), last_node is at %#08x (mem %p).\n", - ref_offset(ref2), ref2, ref_offset(ref_next(ref2)), ref_next(ref2), - ref_offset(jeb->last_node), jeb->last_node); + if ((!ref2->next_phys) != (ref2 == jeb->last_node)) { + JFFS2_ERROR("node_ref for node at %#08x (mem %p) has next_phys at %#08x (mem %p), last_node is at %#08x (mem %p).\n", + ref_offset(ref2), ref2, ref_offset(ref2->next_phys), ref2->next_phys, + ref_offset(jeb->last_node), jeb->last_node); goto error; } - ref2 = ref_next(ref2); + ref2 = ref2->next_phys; } if (my_used_size != jeb->used_size) { @@ -268,9 +268,9 @@ __jffs2_dbg_dump_node_refs_nolock(struct jffs2_sb_info *c, } printk(JFFS2_DBG); - for (ref = jeb->first_node; ; ref = ref_next(ref)) { + for (ref = jeb->first_node; ; ref = ref->next_phys) { printk("%#08x(%#x)", ref_offset(ref), ref->__totlen); - if (ref_next(ref)) + if (ref->next_phys) printk("->"); else break; diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h index 3daf3bca0..162af6dfe 100644 --- a/fs/jffs2/debug.h +++ b/fs/jffs2/debug.h @@ -13,6 +13,7 @@ #ifndef _JFFS2_DEBUG_H_ #define _JFFS2_DEBUG_H_ +#include #ifndef CONFIG_JFFS2_FS_DEBUG #define CONFIG_JFFS2_FS_DEBUG 0 @@ -170,12 +171,6 @@ #define dbg_memalloc(fmt, ...) #endif -/* Watch the XATTR subsystem */ -#ifdef JFFS2_DBG_XATTR_MESSAGES -#define dbg_xattr(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__) -#else -#define dbg_xattr(fmt, ...) -#endif /* "Sanity" checks */ void diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index edd8371fc..8bc7a5018 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -17,8 +17,8 @@ #include #include #include -#include "jffs2_fs_i.h" -#include "jffs2_fs_sb.h" +#include +#include #include #include "nodelist.h" @@ -57,12 +57,7 @@ struct inode_operations jffs2_dir_inode_operations = .rmdir = jffs2_rmdir, .mknod = jffs2_mknod, .rename = jffs2_rename, - .permission = jffs2_permission, .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, - .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr }; /***********************************************************************/ @@ -83,9 +78,6 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target, D1(printk(KERN_DEBUG "jffs2_lookup()\n")); - if (target->d_name.len > JFFS2_MAX_NAME_LEN) - return ERR_PTR(-ENAMETOOLONG); - dir_f = JFFS2_INODE_INFO(dir_i); c = JFFS2_SB_INFO(dir_i->i_sb); @@ -214,15 +206,12 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, ret = jffs2_do_create(c, dir_f, f, ri, dentry->d_name.name, dentry->d_name.len); - if (ret) - goto fail; - - ret = jffs2_init_security(inode, dir_i); - if (ret) - goto fail; - ret = jffs2_init_acl(inode, dir_i); - if (ret) - goto fail; + if (ret) { + make_bad_inode(inode); + iput(inode); + jffs2_free_raw_inode(ri); + return ret; + } dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime)); @@ -232,12 +221,6 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode, D1(printk(KERN_DEBUG "jffs2_create: Created ino #%lu with mode %o, nlink %d(%d). nrpages %ld\n", inode->i_ino, inode->i_mode, inode->i_nlink, f->inocache->nlink, inode->i_mapping->nrpages)); return 0; - - fail: - make_bad_inode(inode); - iput(inode); - jffs2_free_raw_inode(ri); - return ret; } /***********************************************************************/ @@ -308,7 +291,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char struct jffs2_full_dnode *fn; struct jffs2_full_dirent *fd; int namelen; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret, targetlen = strlen(target); /* FIXME: If you care. We'd need to use frags for the target @@ -327,8 +310,8 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char * Just the node will do for now, though */ namelen = dentry->d_name.len; - ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); if (ret) { jffs2_free_raw_inode(ri); @@ -356,7 +339,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char ri->data_crc = cpu_to_je32(crc32(0, target, targetlen)); ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); - fn = jffs2_write_dnode(c, f, ri, target, targetlen, ALLOC_NORMAL); + fn = jffs2_write_dnode(c, f, ri, target, targetlen, phys_ofs, ALLOC_NORMAL); jffs2_free_raw_inode(ri); @@ -388,20 +371,8 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char up(&f->sem); jffs2_complete_reservation(c); - - ret = jffs2_init_security(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - ret = jffs2_init_acl(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { /* Eep. */ jffs2_clear_inode(inode); @@ -433,7 +404,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, dentry->d_name.name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, ALLOC_NORMAL); + fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, phys_ofs, ALLOC_NORMAL); if (IS_ERR(fd)) { /* dirent failed to write. Delete the inode normally @@ -471,7 +442,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) struct jffs2_full_dnode *fn; struct jffs2_full_dirent *fd; int namelen; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; mode |= S_IFDIR; @@ -486,8 +457,8 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) * Just the node will do for now, though */ namelen = dentry->d_name.len; - ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, - JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL, + JFFS2_SUMMARY_INODE_SIZE); if (ret) { jffs2_free_raw_inode(ri); @@ -512,7 +483,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) ri->data_crc = cpu_to_je32(0); ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); - fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); + fn = jffs2_write_dnode(c, f, ri, NULL, 0, phys_ofs, ALLOC_NORMAL); jffs2_free_raw_inode(ri); @@ -530,20 +501,8 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) up(&f->sem); jffs2_complete_reservation(c); - - ret = jffs2_init_security(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - ret = jffs2_init_acl(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { /* Eep. */ jffs2_clear_inode(inode); @@ -575,7 +534,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode) rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, dentry->d_name.name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, ALLOC_NORMAL); + fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, phys_ofs, ALLOC_NORMAL); if (IS_ERR(fd)) { /* dirent failed to write. Delete the inode normally @@ -629,12 +588,12 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de struct jffs2_full_dnode *fn; struct jffs2_full_dirent *fd; int namelen; - union jffs2_device_node dev; + jint16_t dev; int devlen = 0; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; - if (!new_valid_dev(rdev)) + if (!old_valid_dev(rdev)) return -EINVAL; ri = jffs2_alloc_raw_inode(); @@ -643,15 +602,17 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de c = JFFS2_SB_INFO(dir_i->i_sb); - if (S_ISBLK(mode) || S_ISCHR(mode)) - devlen = jffs2_encode_dev(&dev, rdev); + if (S_ISBLK(mode) || S_ISCHR(mode)) { + dev = cpu_to_je16(old_encode_dev(rdev)); + devlen = sizeof(dev); + } /* Try to reserve enough space for both node and dirent. * Just the node will do for now, though */ namelen = dentry->d_name.len; - ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); if (ret) { jffs2_free_raw_inode(ri); @@ -678,7 +639,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de ri->data_crc = cpu_to_je32(crc32(0, &dev, devlen)); ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); - fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, ALLOC_NORMAL); + fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, phys_ofs, ALLOC_NORMAL); jffs2_free_raw_inode(ri); @@ -696,20 +657,8 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de up(&f->sem); jffs2_complete_reservation(c); - - ret = jffs2_init_security(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - ret = jffs2_init_acl(inode, dir_i); - if (ret) { - jffs2_clear_inode(inode); - return ret; - } - - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { /* Eep. */ jffs2_clear_inode(inode); @@ -744,7 +693,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, dentry->d_name.name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, ALLOC_NORMAL); + fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, phys_ofs, ALLOC_NORMAL); if (IS_ERR(fd)) { /* dirent failed to write. Delete the inode normally diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index ad0121088..dad68fdff 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -30,6 +30,7 @@ static void jffs2_erase_callback(struct erase_info *); #endif static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t bad_offset); static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); +static void jffs2_free_all_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); static void jffs2_erase_block(struct jffs2_sb_info *c, @@ -53,7 +54,8 @@ static void jffs2_erase_block(struct jffs2_sb_info *c, if (!instr) { printk(KERN_WARNING "kmalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n"); spin_lock(&c->erase_completion_lock); - list_move(&jeb->list, &c->erase_pending_list); + list_del(&jeb->list); + list_add(&jeb->list, &c->erase_pending_list); c->erasing_size -= c->sector_size; c->dirty_size += c->sector_size; jeb->dirty_size = c->sector_size; @@ -85,7 +87,8 @@ static void jffs2_erase_block(struct jffs2_sb_info *c, /* Erase failed immediately. Refile it on the list */ D1(printk(KERN_DEBUG "Erase at 0x%08x failed: %d. Refiling on erase_pending_list\n", jeb->offset, ret)); spin_lock(&c->erase_completion_lock); - list_move(&jeb->list, &c->erase_pending_list); + list_del(&jeb->list); + list_add(&jeb->list, &c->erase_pending_list); c->erasing_size -= c->sector_size; c->dirty_size += c->sector_size; jeb->dirty_size = c->sector_size; @@ -133,7 +136,7 @@ void jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count) c->used_size -= jeb->used_size; c->dirty_size -= jeb->dirty_size; jeb->wasted_size = jeb->used_size = jeb->dirty_size = jeb->free_size = 0; - jffs2_free_jeb_node_refs(c, jeb); + jffs2_free_all_node_refs(c, jeb); list_add(&jeb->list, &c->erasing_list); spin_unlock(&c->erase_completion_lock); @@ -159,7 +162,8 @@ static void jffs2_erase_succeeded(struct jffs2_sb_info *c, struct jffs2_eraseblo { D1(printk(KERN_DEBUG "Erase completed successfully at 0x%08x\n", jeb->offset)); spin_lock(&c->erase_completion_lock); - list_move_tail(&jeb->list, &c->erase_complete_list); + list_del(&jeb->list); + list_add_tail(&jeb->list, &c->erase_complete_list); spin_unlock(&c->erase_completion_lock); /* Ensure that kupdated calls us again to mark them clean */ jffs2_erase_pending_trigger(c); @@ -175,7 +179,8 @@ static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock if (!jffs2_write_nand_badblock(c, jeb, bad_offset)) { /* We'd like to give this block another try. */ spin_lock(&c->erase_completion_lock); - list_move(&jeb->list, &c->erase_pending_list); + list_del(&jeb->list); + list_add(&jeb->list, &c->erase_pending_list); c->erasing_size -= c->sector_size; c->dirty_size += c->sector_size; jeb->dirty_size = c->sector_size; @@ -187,7 +192,8 @@ static void jffs2_erase_failed(struct jffs2_sb_info *c, struct jffs2_eraseblock spin_lock(&c->erase_completion_lock); c->erasing_size -= c->sector_size; c->bad_size += c->sector_size; - list_move(&jeb->list, &c->bad_list); + list_del(&jeb->list); + list_add(&jeb->list, &c->bad_list); c->nr_erasing_blocks--; spin_unlock(&c->erase_completion_lock); wake_up(&c->erase_wait); @@ -248,8 +254,7 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c, /* PARANOIA */ if (!ic) { - JFFS2_WARNING("inode_cache/xattr_datum/xattr_ref" - " not found in remove_node_refs()!!\n"); + printk(KERN_WARNING "inode_cache not found in remove_node_refs()!!\n"); return; } @@ -274,42 +279,26 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c, printk("\n"); }); - switch (ic->class) { -#ifdef CONFIG_JFFS2_FS_XATTR - case RAWNODE_CLASS_XATTR_DATUM: - jffs2_release_xattr_datum(c, (struct jffs2_xattr_datum *)ic); - break; - case RAWNODE_CLASS_XATTR_REF: - jffs2_release_xattr_ref(c, (struct jffs2_xattr_ref *)ic); - break; -#endif - default: - if (ic->nodes == (void *)ic && ic->nlink == 0) - jffs2_del_ino_cache(c, ic); - } + if (ic->nodes == (void *)ic && ic->nlink == 0) + jffs2_del_ino_cache(c, ic); } -void jffs2_free_jeb_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) +static void jffs2_free_all_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) { - struct jffs2_raw_node_ref *block, *ref; + struct jffs2_raw_node_ref *ref; D1(printk(KERN_DEBUG "Freeing all node refs for eraseblock offset 0x%08x\n", jeb->offset)); + while(jeb->first_node) { + ref = jeb->first_node; + jeb->first_node = ref->next_phys; - block = ref = jeb->first_node; - - while (ref) { - if (ref->flash_offset == REF_LINK_NODE) { - ref = ref->next_in_ino; - jffs2_free_refblock(block); - block = ref; - continue; - } - if (ref->flash_offset != REF_EMPTY_NODE && ref->next_in_ino) + /* Remove from the inode-list */ + if (ref->next_in_ino) jffs2_remove_node_refs_from_ino_list(c, ref, jeb); /* else it was a non-inode node or already removed, so don't bother */ - ref++; + jffs2_free_raw_node_ref(ref); } - jeb->first_node = jeb->last_node = NULL; + jeb->last_node = NULL; } static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t *bad_offset) @@ -362,6 +351,7 @@ fail: static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) { + struct jffs2_raw_node_ref *marker_ref = NULL; size_t retlen; int ret; uint32_t bad_offset; @@ -383,8 +373,12 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb goto filebad; } - /* Everything else got zeroed before the erase */ + jeb->first_node = jeb->last_node = NULL; jeb->free_size = c->sector_size; + jeb->used_size = 0; + jeb->dirty_size = 0; + jeb->wasted_size = 0; + } else { struct kvec vecs[1]; @@ -394,7 +388,11 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb .totlen = cpu_to_je32(c->cleanmarker_size) }; - jffs2_prealloc_raw_node_refs(c, jeb, 1); + marker_ref = jffs2_alloc_raw_node_ref(); + if (!marker_ref) { + printk(KERN_WARNING "Failed to allocate raw node ref for clean marker. Refiling\n"); + goto refile; + } marker.hdr_crc = cpu_to_je32(crc32(0, &marker, sizeof(struct jffs2_unknown_node)-4)); @@ -410,13 +408,21 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb printk(KERN_WARNING "Short write to newly-erased block at 0x%08x: Wanted %zd, got %zd\n", jeb->offset, sizeof(marker), retlen); + jffs2_free_raw_node_ref(marker_ref); goto filebad; } - /* Everything else got zeroed before the erase */ - jeb->free_size = c->sector_size; - /* FIXME Special case for cleanmarker in empty block */ - jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL, c->cleanmarker_size, NULL); + marker_ref->next_in_ino = NULL; + marker_ref->next_phys = NULL; + marker_ref->flash_offset = jeb->offset | REF_NORMAL; + marker_ref->__totlen = c->cleanmarker_size; + + jeb->first_node = jeb->last_node = marker_ref; + + jeb->free_size = c->sector_size - c->cleanmarker_size; + jeb->used_size = c->cleanmarker_size; + jeb->dirty_size = 0; + jeb->wasted_size = 0; } spin_lock(&c->erase_completion_lock); diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index 3ed6e3e12..9f4171213 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -54,15 +54,10 @@ const struct file_operations jffs2_file_operations = struct inode_operations jffs2_file_inode_operations = { - .permission = jffs2_permission, - .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, - .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr + .setattr = jffs2_setattr }; -const struct address_space_operations jffs2_file_address_operations = +struct address_space_operations jffs2_file_address_operations = { .readpage = jffs2_readpage, .prepare_write =jffs2_prepare_write, @@ -134,13 +129,13 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg, struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); struct jffs2_raw_inode ri; struct jffs2_full_dnode *fn; - uint32_t alloc_len; + uint32_t phys_ofs, alloc_len; D1(printk(KERN_DEBUG "Writing new hole frag 0x%x-0x%x between current EOF and new page\n", (unsigned int)inode->i_size, pageofs)); - ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len, - ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(ri), &phys_ofs, &alloc_len, + ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); if (ret) return ret; @@ -166,7 +161,7 @@ static int jffs2_prepare_write (struct file *filp, struct page *pg, ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); ri.data_crc = cpu_to_je32(0); - fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL); + fn = jffs2_write_dnode(c, f, &ri, NULL, 0, phys_ofs, ALLOC_NORMAL); if (IS_ERR(fn)) { ret = PTR_ERR(fn); @@ -220,20 +215,12 @@ static int jffs2_commit_write (struct file *filp, struct page *pg, D1(printk(KERN_DEBUG "jffs2_commit_write(): ino #%lu, page at 0x%lx, range %d-%d, flags %lx\n", inode->i_ino, pg->index << PAGE_CACHE_SHIFT, start, end, pg->flags)); - if (end == PAGE_CACHE_SIZE) { - if (!start) { - /* We need to avoid deadlock with page_cache_read() in - jffs2_garbage_collect_pass(). So we have to mark the - page up to date, to prevent page_cache_read() from - trying to re-lock it. */ - SetPageUptodate(pg); - } else { - /* When writing out the end of a page, write out the - _whole_ page. This helps to reduce the number of - nodes in files which have many short writes, like - syslog files. */ - start = aligned_start = 0; - } + if (!start && end == PAGE_CACHE_SIZE) { + /* We need to avoid deadlock with page_cache_read() in + jffs2_garbage_collect_pass(). So we have to mark the + page up to date, to prevent page_cache_read() from + trying to re-lock it. */ + SetPageUptodate(pg); } ri = jffs2_alloc_raw_inode(); diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 72d9909d9..09e5d10b8 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -32,11 +33,11 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); struct jffs2_raw_inode *ri; - union jffs2_device_node dev; + unsigned short dev; unsigned char *mdata = NULL; int mdatalen = 0; unsigned int ivalid; - uint32_t alloclen; + uint32_t phys_ofs, alloclen; int ret; D1(printk(KERN_DEBUG "jffs2_setattr(): ino #%lu\n", inode->i_ino)); ret = inode_change_ok(inode, iattr); @@ -50,24 +51,20 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) it out again with the appropriate data attached */ if (S_ISBLK(inode->i_mode) || S_ISCHR(inode->i_mode)) { /* For these, we don't actually need to read the old node */ - mdatalen = jffs2_encode_dev(&dev, inode->i_rdev); + dev = old_encode_dev(inode->i_rdev); mdata = (char *)&dev; + mdatalen = sizeof(dev); D1(printk(KERN_DEBUG "jffs2_setattr(): Writing %d bytes of kdev_t\n", mdatalen)); } else if (S_ISLNK(inode->i_mode)) { - down(&f->sem); mdatalen = f->metadata->size; mdata = kmalloc(f->metadata->size, GFP_USER); - if (!mdata) { - up(&f->sem); + if (!mdata) return -ENOMEM; - } ret = jffs2_read_dnode(c, f, f->metadata, mdata, 0, mdatalen); if (ret) { - up(&f->sem); kfree(mdata); return ret; } - up(&f->sem); D1(printk(KERN_DEBUG "jffs2_setattr(): Writing %d bytes of symlink target\n", mdatalen)); } @@ -78,8 +75,8 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) return -ENOMEM; } - ret = jffs2_reserve_space(c, sizeof(*ri) + mdatalen, &alloclen, - ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(*ri) + mdatalen, &phys_ofs, &alloclen, + ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); if (ret) { jffs2_free_raw_inode(ri); if (S_ISLNK(inode->i_mode & S_IFMT)) @@ -130,7 +127,7 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) else ri->data_crc = cpu_to_je32(0); - new_metadata = jffs2_write_dnode(c, f, ri, mdata, mdatalen, ALLOC_NORMAL); + new_metadata = jffs2_write_dnode(c, f, ri, mdata, mdatalen, phys_ofs, ALLOC_NORMAL); if (S_ISLNK(inode->i_mode)) kfree(mdata); @@ -183,17 +180,12 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) int jffs2_setattr(struct dentry *dentry, struct iattr *iattr) { - int rc; - - rc = jffs2_do_setattr(dentry->d_inode, iattr); - if (!rc && (iattr->ia_valid & ATTR_MODE)) - rc = jffs2_acl_chmod(dentry->d_inode); - return rc; + return jffs2_do_setattr(dentry->d_inode, iattr); } -int jffs2_statfs(struct dentry *dentry, struct kstatfs *buf) +int jffs2_statfs(struct super_block *sb, struct kstatfs *buf) { - struct jffs2_sb_info *c = JFFS2_SB_INFO(dentry->d_sb); + struct jffs2_sb_info *c = JFFS2_SB_INFO(sb); unsigned long avail; buf->f_type = JFFS2_SUPER_MAGIC; @@ -226,6 +218,7 @@ void jffs2_clear_inode (struct inode *inode) struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); D1(printk(KERN_DEBUG "jffs2_clear_inode(): ino #%lu mode %o\n", inode->i_ino, inode->i_mode)); + jffs2_do_clear_inode(c, f); } @@ -234,8 +227,6 @@ void jffs2_read_inode (struct inode *inode) struct jffs2_inode_info *f; struct jffs2_sb_info *c; struct jffs2_raw_inode latest_node; - union jffs2_device_node jdev; - dev_t rdev = 0; int ret; D1(printk(KERN_DEBUG "jffs2_read_inode(): inode->i_ino == %lu\n", inode->i_ino)); @@ -263,9 +254,11 @@ void jffs2_read_inode (struct inode *inode) inode->i_nlink = f->inocache->nlink; + inode->i_blksize = PAGE_SIZE; inode->i_blocks = (inode->i_size + 511) >> 9; switch (inode->i_mode & S_IFMT) { + jint16_t rdev; case S_IFLNK: inode->i_op = &jffs2_symlink_inode_operations; @@ -299,16 +292,8 @@ void jffs2_read_inode (struct inode *inode) case S_IFBLK: case S_IFCHR: /* Read the device numbers from the media */ - if (f->metadata->size != sizeof(jdev.old) && - f->metadata->size != sizeof(jdev.new)) { - printk(KERN_NOTICE "Device node has strange size %d\n", f->metadata->size); - up(&f->sem); - jffs2_do_clear_inode(c, f); - make_bad_inode(inode); - return; - } D1(printk(KERN_DEBUG "Reading device numbers from flash\n")); - if (jffs2_read_dnode(c, f, f->metadata, (char *)&jdev, 0, f->metadata->size) < 0) { + if (jffs2_read_dnode(c, f, f->metadata, (char *)&rdev, 0, sizeof(rdev)) < 0) { /* Eep */ printk(KERN_NOTICE "Read device numbers for inode %lu failed\n", (unsigned long)inode->i_ino); up(&f->sem); @@ -316,15 +301,12 @@ void jffs2_read_inode (struct inode *inode) make_bad_inode(inode); return; } - if (f->metadata->size == sizeof(jdev.old)) - rdev = old_decode_dev(je16_to_cpu(jdev.old)); - else - rdev = new_decode_dev(je32_to_cpu(jdev.new)); case S_IFSOCK: case S_IFIFO: inode->i_op = &jffs2_file_inode_operations; - init_special_inode(inode, inode->i_mode, rdev); + init_special_inode(inode, inode->i_mode, + old_decode_dev((je16_to_cpu(rdev)))); break; default: @@ -448,6 +430,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; ri->atime = ri->mtime = ri->ctime = cpu_to_je32(I_SEC(inode->i_mtime)); + inode->i_blksize = PAGE_SIZE; inode->i_blocks = 0; inode->i_size = 0; @@ -509,8 +492,6 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) } memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *)); - jffs2_init_xattr_subsystem(c); - if ((ret = jffs2_do_mount_fs(c))) goto out_inohash; @@ -545,7 +526,6 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) else kfree(c->blocks); out_inohash: - jffs2_clear_xattr_subsystem(c); kfree(c->inocache_list); out_wbuf: jffs2_flash_cleanup(c); @@ -659,6 +639,13 @@ static int jffs2_flash_setup(struct jffs2_sb_info *c) { return ret; } + /* add setups for other bizarre flashes here... */ + if (jffs2_nor_ecc(c)) { + ret = jffs2_nor_ecc_flash_setup(c); + if (ret) + return ret; + } + /* and Dataflash */ if (jffs2_dataflash(c)) { ret = jffs2_dataflash_setup(c); @@ -682,6 +669,11 @@ void jffs2_flash_cleanup(struct jffs2_sb_info *c) { jffs2_nand_flash_cleanup(c); } + /* add cleanups for other bizarre flashes here... */ + if (jffs2_nor_ecc(c)) { + jffs2_nor_ecc_flash_cleanup(c); + } + /* and DataFlash */ if (jffs2_dataflash(c)) { jffs2_dataflash_cleanup(c); diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index daff3341f..f9ffece45 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -125,7 +125,6 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) struct jffs2_eraseblock *jeb; struct jffs2_raw_node_ref *raw; int ret = 0, inum, nlink; - int xattr = 0; if (down_interruptible(&c->alloc_sem)) return -EINTR; @@ -139,7 +138,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) the node CRCs etc. Do it now. */ /* checked_ino is protected by the alloc_sem */ - if (c->checked_ino > c->highest_ino && xattr) { + if (c->checked_ino > c->highest_ino) { printk(KERN_CRIT "Checked all inodes but still 0x%x bytes of unchecked space?\n", c->unchecked_size); jffs2_dbg_dump_block_lists_nolock(c); @@ -149,9 +148,6 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) spin_unlock(&c->erase_completion_lock); - if (!xattr) - xattr = jffs2_verify_xattr(c); - spin_lock(&c->inocache_lock); ic = jffs2_get_ino_cache(c, c->checked_ino++); @@ -165,7 +161,6 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) D1(printk(KERN_DEBUG "Skipping check of ino #%d with nlink zero\n", ic->ino)); spin_unlock(&c->inocache_lock); - jffs2_xattr_delete_inode(c, ic); continue; } switch(ic->state) { @@ -186,10 +181,6 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) and trigger the BUG() above while we haven't yet finished checking all its nodes */ D1(printk(KERN_DEBUG "Waiting for ino #%u to finish reading\n", ic->ino)); - /* We need to come back again for the _same_ inode. We've - made no progress in this case, but that should be OK */ - c->checked_ino--; - up(&c->alloc_sem); sleep_on_spinunlock(&c->inocache_wq, &c->inocache_lock); return 0; @@ -240,7 +231,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) while(ref_obsolete(raw)) { D1(printk(KERN_DEBUG "Node at 0x%08x is obsolete... skipping\n", ref_offset(raw))); - raw = ref_next(raw); + raw = raw->next_phys; if (unlikely(!raw)) { printk(KERN_WARNING "eep. End of raw list while still supposedly nodes to GC\n"); printk(KERN_WARNING "erase block at 0x%08x. free_size 0x%08x, dirty_size 0x%08x, used_size 0x%08x\n", @@ -257,36 +248,16 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) if (!raw->next_in_ino) { /* Inode-less node. Clean marker, snapshot or something like that */ + /* FIXME: If it's something that needs to be copied, including something + we don't grok that has JFFS2_NODETYPE_RWCOMPAT_COPY, we should do so */ spin_unlock(&c->erase_completion_lock); - if (ref_flags(raw) == REF_PRISTINE) { - /* It's an unknown node with JFFS2_FEATURE_RWCOMPAT_COPY */ - jffs2_garbage_collect_pristine(c, NULL, raw); - } else { - /* Just mark it obsolete */ - jffs2_mark_node_obsolete(c, raw); - } + jffs2_mark_node_obsolete(c, raw); up(&c->alloc_sem); goto eraseit_lock; } ic = jffs2_raw_ref_to_ic(raw); -#ifdef CONFIG_JFFS2_FS_XATTR - /* When 'ic' refers xattr_datum/xattr_ref, this node is GCed as xattr. - * We can decide whether this node is inode or xattr by ic->class. */ - if (ic->class == RAWNODE_CLASS_XATTR_DATUM - || ic->class == RAWNODE_CLASS_XATTR_REF) { - spin_unlock(&c->erase_completion_lock); - - if (ic->class == RAWNODE_CLASS_XATTR_DATUM) { - ret = jffs2_garbage_collect_xattr_datum(c, (struct jffs2_xattr_datum *)ic, raw); - } else { - ret = jffs2_garbage_collect_xattr_ref(c, (struct jffs2_xattr_ref *)ic, raw); - } - goto release_sem; - } -#endif - /* We need to hold the inocache. Either the erase_completion_lock or the inocache_lock are sufficient; we trade down since the inocache_lock causes less contention. */ @@ -528,6 +499,7 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *raw) { union jffs2_node_union *node; + struct jffs2_raw_node_ref *nraw; size_t retlen; int ret; uint32_t phys_ofs, alloclen; @@ -536,16 +508,15 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, D1(printk(KERN_DEBUG "Going to GC REF_PRISTINE node at 0x%08x\n", ref_offset(raw))); - alloclen = rawlen = ref_totlen(c, c->gcblock, raw); + rawlen = ref_totlen(c, c->gcblock, raw); /* Ask for a small amount of space (or the totlen if smaller) because we don't want to force wastage of the end of a block if splitting would work. */ - if (ic && alloclen > sizeof(struct jffs2_raw_inode) + JFFS2_MIN_DATA_LEN) - alloclen = sizeof(struct jffs2_raw_inode) + JFFS2_MIN_DATA_LEN; - - ret = jffs2_reserve_space_gc(c, alloclen, &alloclen, rawlen); - /* 'rawlen' is not the exact summary size; it is only an upper estimation */ + ret = jffs2_reserve_space_gc(c, min_t(uint32_t, sizeof(struct jffs2_raw_inode) + + JFFS2_MIN_DATA_LEN, rawlen), &phys_ofs, &alloclen, rawlen); + /* this is not the exact summary size of it, + it is only an upper estimation */ if (ret) return ret; @@ -609,17 +580,22 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, } break; default: - /* If it's inode-less, we don't _know_ what it is. Just copy it intact */ - if (ic) { - printk(KERN_WARNING "Unknown node type for REF_PRISTINE node at 0x%08x: 0x%04x\n", - ref_offset(raw), je16_to_cpu(node->u.nodetype)); - goto bail; - } + printk(KERN_WARNING "Unknown node type for REF_PRISTINE node at 0x%08x: 0x%04x\n", + ref_offset(raw), je16_to_cpu(node->u.nodetype)); + goto bail; + } + + nraw = jffs2_alloc_raw_node_ref(); + if (!nraw) { + ret = -ENOMEM; + goto out_node; } /* OK, all the CRCs are good; this node can just be copied as-is. */ retry: - phys_ofs = write_ofs(c); + nraw->flash_offset = phys_ofs; + nraw->__totlen = rawlen; + nraw->next_phys = NULL; ret = jffs2_flash_write(c, phys_ofs, rawlen, &retlen, (char *)node); @@ -627,11 +603,17 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, printk(KERN_NOTICE "Write of %d bytes at 0x%08x failed. returned %d, retlen %zd\n", rawlen, phys_ofs, ret, retlen); if (retlen) { - jffs2_add_physical_node_ref(c, phys_ofs | REF_OBSOLETE, rawlen, NULL); + /* Doesn't belong to any inode */ + nraw->next_in_ino = NULL; + + nraw->flash_offset |= REF_OBSOLETE; + jffs2_add_physical_node_ref(c, nraw); + jffs2_mark_node_obsolete(c, nraw); } else { - printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", phys_ofs); + printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", nraw->flash_offset); + jffs2_free_raw_node_ref(nraw); } - if (!retried) { + if (!retried && (nraw = jffs2_alloc_raw_node_ref())) { /* Try to reallocate space and retry */ uint32_t dummy; struct jffs2_eraseblock *jeb = &c->blocks[phys_ofs / c->sector_size]; @@ -643,7 +625,7 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, jffs2_dbg_acct_sanity_check(c,jeb); jffs2_dbg_acct_paranoia_check(c, jeb); - ret = jffs2_reserve_space_gc(c, rawlen, &dummy, rawlen); + ret = jffs2_reserve_space_gc(c, rawlen, &phys_ofs, &dummy, rawlen); /* this is not the exact summary size of it, it is only an upper estimation */ @@ -656,13 +638,25 @@ static int jffs2_garbage_collect_pristine(struct jffs2_sb_info *c, goto retry; } D1(printk(KERN_DEBUG "Failed to allocate space to retry failed write: %d!\n", ret)); + jffs2_free_raw_node_ref(nraw); } + jffs2_free_raw_node_ref(nraw); if (!ret) ret = -EIO; goto out_node; } - jffs2_add_physical_node_ref(c, phys_ofs | REF_PRISTINE, rawlen, ic); + nraw->flash_offset |= REF_PRISTINE; + jffs2_add_physical_node_ref(c, nraw); + + /* Link into per-inode list. This is safe because of the ic + state being INO_STATE_GC. Note that if we're doing this + for an inode which is in-core, the 'nraw' pointer is then + going to be fetched from ic->nodes by our caller. */ + spin_lock(&c->erase_completion_lock); + nraw->next_in_ino = ic->nodes; + ic->nodes = nraw; + spin_unlock(&c->erase_completion_lock); jffs2_mark_node_obsolete(c, raw); D1(printk(KERN_DEBUG "WHEEE! GC REF_PRISTINE node at 0x%08x succeeded\n", ref_offset(raw))); @@ -681,16 +675,19 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ struct jffs2_full_dnode *new_fn; struct jffs2_raw_inode ri; struct jffs2_node_frag *last_frag; - union jffs2_device_node dev; + jint16_t dev; char *mdata = NULL, mdatalen = 0; - uint32_t alloclen, ilen; + uint32_t alloclen, phys_ofs, ilen; int ret; if (S_ISBLK(JFFS2_F_I_MODE(f)) || S_ISCHR(JFFS2_F_I_MODE(f)) ) { /* For these, we don't actually need to read the old node */ - mdatalen = jffs2_encode_dev(&dev, JFFS2_F_I_RDEV(f)); + /* FIXME: for minor or major > 255. */ + dev = cpu_to_je16(((JFFS2_F_I_RDEV_MAJ(f) << 8) | + JFFS2_F_I_RDEV_MIN(f))); mdata = (char *)&dev; + mdatalen = sizeof(dev); D1(printk(KERN_DEBUG "jffs2_garbage_collect_metadata(): Writing %d bytes of kdev_t\n", mdatalen)); } else if (S_ISLNK(JFFS2_F_I_MODE(f))) { mdatalen = fn->size; @@ -709,7 +706,7 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ } - ret = jffs2_reserve_space_gc(c, sizeof(ri) + mdatalen, &alloclen, + ret = jffs2_reserve_space_gc(c, sizeof(ri) + mdatalen, &phys_ofs, &alloclen, JFFS2_SUMMARY_INODE_SIZE); if (ret) { printk(KERN_WARNING "jffs2_reserve_space_gc of %zd bytes for garbage_collect_metadata failed: %d\n", @@ -747,7 +744,7 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); ri.data_crc = cpu_to_je32(crc32(0, mdata, mdatalen)); - new_fn = jffs2_write_dnode(c, f, &ri, mdata, mdatalen, ALLOC_GC); + new_fn = jffs2_write_dnode(c, f, &ri, mdata, mdatalen, phys_ofs, ALLOC_GC); if (IS_ERR(new_fn)) { printk(KERN_WARNING "Error writing new dnode: %ld\n", PTR_ERR(new_fn)); @@ -768,7 +765,7 @@ static int jffs2_garbage_collect_dirent(struct jffs2_sb_info *c, struct jffs2_er { struct jffs2_full_dirent *new_fd; struct jffs2_raw_dirent rd; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; rd.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); @@ -790,14 +787,14 @@ static int jffs2_garbage_collect_dirent(struct jffs2_sb_info *c, struct jffs2_er rd.node_crc = cpu_to_je32(crc32(0, &rd, sizeof(rd)-8)); rd.name_crc = cpu_to_je32(crc32(0, fd->name, rd.nsize)); - ret = jffs2_reserve_space_gc(c, sizeof(rd)+rd.nsize, &alloclen, + ret = jffs2_reserve_space_gc(c, sizeof(rd)+rd.nsize, &phys_ofs, &alloclen, JFFS2_SUMMARY_DIRENT_SIZE(rd.nsize)); if (ret) { printk(KERN_WARNING "jffs2_reserve_space_gc of %zd bytes for garbage_collect_dirent failed: %d\n", sizeof(rd)+rd.nsize, ret); return ret; } - new_fd = jffs2_write_dirent(c, f, &rd, fd->name, rd.nsize, ALLOC_GC); + new_fd = jffs2_write_dirent(c, f, &rd, fd->name, rd.nsize, phys_ofs, ALLOC_GC); if (IS_ERR(new_fd)) { printk(KERN_WARNING "jffs2_write_dirent in garbage_collect_dirent failed: %ld\n", PTR_ERR(new_fd)); @@ -925,7 +922,7 @@ static int jffs2_garbage_collect_hole(struct jffs2_sb_info *c, struct jffs2_eras struct jffs2_raw_inode ri; struct jffs2_node_frag *frag; struct jffs2_full_dnode *new_fn; - uint32_t alloclen, ilen; + uint32_t alloclen, phys_ofs, ilen; int ret; D1(printk(KERN_DEBUG "Writing replacement hole node for ino #%u from offset 0x%x to 0x%x\n", @@ -1004,14 +1001,14 @@ static int jffs2_garbage_collect_hole(struct jffs2_sb_info *c, struct jffs2_eras ri.data_crc = cpu_to_je32(0); ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); - ret = jffs2_reserve_space_gc(c, sizeof(ri), &alloclen, - JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space_gc(c, sizeof(ri), &phys_ofs, &alloclen, + JFFS2_SUMMARY_INODE_SIZE); if (ret) { printk(KERN_WARNING "jffs2_reserve_space_gc of %zd bytes for garbage_collect_hole failed: %d\n", sizeof(ri), ret); return ret; } - new_fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_GC); + new_fn = jffs2_write_dnode(c, f, &ri, NULL, 0, phys_ofs, ALLOC_GC); if (IS_ERR(new_fn)) { printk(KERN_WARNING "Error writing new hole node: %ld\n", PTR_ERR(new_fn)); @@ -1073,7 +1070,7 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era { struct jffs2_full_dnode *new_fn; struct jffs2_raw_inode ri; - uint32_t alloclen, offset, orig_end, orig_start; + uint32_t alloclen, phys_ofs, offset, orig_end, orig_start; int ret = 0; unsigned char *comprbuf = NULL, *writebuf; unsigned long pg; @@ -1230,7 +1227,7 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era uint32_t cdatalen; uint16_t comprtype = JFFS2_COMPR_NONE; - ret = jffs2_reserve_space_gc(c, sizeof(ri) + JFFS2_MIN_DATA_LEN, + ret = jffs2_reserve_space_gc(c, sizeof(ri) + JFFS2_MIN_DATA_LEN, &phys_ofs, &alloclen, JFFS2_SUMMARY_INODE_SIZE); if (ret) { @@ -1267,7 +1264,7 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_era ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); ri.data_crc = cpu_to_je32(crc32(0, comprbuf, cdatalen)); - new_fn = jffs2_write_dnode(c, f, &ri, comprbuf, cdatalen, ALLOC_GC); + new_fn = jffs2_write_dnode(c, f, &ri, comprbuf, cdatalen, phys_ofs, ALLOC_GC); jffs2_free_comprbuf(comprbuf, writebuf); diff --git a/fs/jffs2/histo.h b/fs/jffs2/histo.h new file mode 100644 index 000000000..22a93a082 --- /dev/null +++ b/fs/jffs2/histo.h @@ -0,0 +1,3 @@ +/* This file provides the bit-probabilities for the input file */ +#define BIT_DIVIDER 629 +static int bits[9] = { 179,167,183,165,159,198,178,119,}; /* ia32 .so files */ diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c index 33f291005..036cbd11c 100644 --- a/fs/jffs2/malloc.c +++ b/fs/jffs2/malloc.c @@ -26,10 +26,6 @@ static kmem_cache_t *tmp_dnode_info_slab; static kmem_cache_t *raw_node_ref_slab; static kmem_cache_t *node_frag_slab; static kmem_cache_t *inode_cache_slab; -#ifdef CONFIG_JFFS2_FS_XATTR -static kmem_cache_t *xattr_datum_cache; -static kmem_cache_t *xattr_ref_cache; -#endif int __init jffs2_create_slab_caches(void) { @@ -57,8 +53,8 @@ int __init jffs2_create_slab_caches(void) if (!tmp_dnode_info_slab) goto err; - raw_node_ref_slab = kmem_cache_create("jffs2_refblock", - sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1), + raw_node_ref_slab = kmem_cache_create("jffs2_raw_node_ref", + sizeof(struct jffs2_raw_node_ref), 0, 0, NULL, NULL); if (!raw_node_ref_slab) goto err; @@ -72,24 +68,8 @@ int __init jffs2_create_slab_caches(void) inode_cache_slab = kmem_cache_create("jffs2_inode_cache", sizeof(struct jffs2_inode_cache), 0, 0, NULL, NULL); - if (!inode_cache_slab) - goto err; - -#ifdef CONFIG_JFFS2_FS_XATTR - xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum", - sizeof(struct jffs2_xattr_datum), - 0, 0, NULL, NULL); - if (!xattr_datum_cache) - goto err; - - xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref", - sizeof(struct jffs2_xattr_ref), - 0, 0, NULL, NULL); - if (!xattr_ref_cache) - goto err; -#endif - - return 0; + if (inode_cache_slab) + return 0; err: jffs2_destroy_slab_caches(); return -ENOMEM; @@ -111,12 +91,6 @@ void jffs2_destroy_slab_caches(void) kmem_cache_destroy(node_frag_slab); if(inode_cache_slab) kmem_cache_destroy(inode_cache_slab); -#ifdef CONFIG_JFFS2_FS_XATTR - if (xattr_datum_cache) - kmem_cache_destroy(xattr_datum_cache); - if (xattr_ref_cache) - kmem_cache_destroy(xattr_ref_cache); -#endif } struct jffs2_full_dirent *jffs2_alloc_full_dirent(int namesize) @@ -190,65 +164,15 @@ void jffs2_free_tmp_dnode_info(struct jffs2_tmp_dnode_info *x) kmem_cache_free(tmp_dnode_info_slab, x); } -static struct jffs2_raw_node_ref *jffs2_alloc_refblock(void) +struct jffs2_raw_node_ref *jffs2_alloc_raw_node_ref(void) { struct jffs2_raw_node_ref *ret; - ret = kmem_cache_alloc(raw_node_ref_slab, GFP_KERNEL); - if (ret) { - int i = 0; - for (i=0; i < REFS_PER_BLOCK; i++) { - ret[i].flash_offset = REF_EMPTY_NODE; - ret[i].next_in_ino = NULL; - } - ret[i].flash_offset = REF_LINK_NODE; - ret[i].next_in_ino = NULL; - } + dbg_memalloc("%p\n", ret); return ret; } -int jffs2_prealloc_raw_node_refs(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, int nr) -{ - struct jffs2_raw_node_ref **p, *ref; - int i = nr; - - dbg_memalloc("%d\n", nr); - - p = &jeb->last_node; - ref = *p; - - dbg_memalloc("Reserving %d refs for block @0x%08x\n", nr, jeb->offset); - - /* If jeb->last_node is really a valid node then skip over it */ - if (ref && ref->flash_offset != REF_EMPTY_NODE) - ref++; - - while (i) { - if (!ref) { - dbg_memalloc("Allocating new refblock linked from %p\n", p); - ref = *p = jffs2_alloc_refblock(); - if (!ref) - return -ENOMEM; - } - if (ref->flash_offset == REF_LINK_NODE) { - p = &ref->next_in_ino; - ref = *p; - continue; - } - i--; - ref++; - } - jeb->allocated_refs = nr; - - dbg_memalloc("Reserved %d refs for block @0x%08x, last_node is %p (%08x,%p)\n", - nr, jeb->offset, jeb->last_node, jeb->last_node->flash_offset, - jeb->last_node->next_in_ino); - - return 0; -} - -void jffs2_free_refblock(struct jffs2_raw_node_ref *x) +void jffs2_free_raw_node_ref(struct jffs2_raw_node_ref *x) { dbg_memalloc("%p\n", x); kmem_cache_free(raw_node_ref_slab, x); @@ -281,42 +205,3 @@ void jffs2_free_inode_cache(struct jffs2_inode_cache *x) dbg_memalloc("%p\n", x); kmem_cache_free(inode_cache_slab, x); } - -#ifdef CONFIG_JFFS2_FS_XATTR -struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void) -{ - struct jffs2_xattr_datum *xd; - xd = kmem_cache_alloc(xattr_datum_cache, GFP_KERNEL); - dbg_memalloc("%p\n", xd); - - memset(xd, 0, sizeof(struct jffs2_xattr_datum)); - xd->class = RAWNODE_CLASS_XATTR_DATUM; - xd->node = (void *)xd; - INIT_LIST_HEAD(&xd->xindex); - return xd; -} - -void jffs2_free_xattr_datum(struct jffs2_xattr_datum *xd) -{ - dbg_memalloc("%p\n", xd); - kmem_cache_free(xattr_datum_cache, xd); -} - -struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void) -{ - struct jffs2_xattr_ref *ref; - ref = kmem_cache_alloc(xattr_ref_cache, GFP_KERNEL); - dbg_memalloc("%p\n", ref); - - memset(ref, 0, sizeof(struct jffs2_xattr_ref)); - ref->class = RAWNODE_CLASS_XATTR_REF; - ref->node = (void *)ref; - return ref; -} - -void jffs2_free_xattr_ref(struct jffs2_xattr_ref *ref) -{ - dbg_memalloc("%p\n", ref); - kmem_cache_free(xattr_ref_cache, ref); -} -#endif diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index 5a6b4d642..1d46677af 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -21,9 +21,6 @@ #include #include "nodelist.h" -static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, - struct jffs2_node_frag *this); - void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full_dirent **list) { struct jffs2_full_dirent **prev = list; @@ -90,8 +87,7 @@ void jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint } } -static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, - struct jffs2_node_frag *this) +void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this) { if (this->node) { this->node->frags--; @@ -442,7 +438,8 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info if (c->mtd->point) { err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer); if (!err && retlen < tn->csize) { - JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize); + JFFS2_WARNING("MTD point returned len too short: %zu " + "instead of %u.\n", retlen, tn->csize); c->mtd->unpoint(c->mtd, buffer, ofs, len); } else if (err) JFFS2_WARNING("MTD point failed: error code %d.\n", err); @@ -465,7 +462,8 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info } if (retlen != len) { - JFFS2_ERROR("short read at %#08x: %zd instead of %d.\n", ofs, retlen, len); + JFFS2_ERROR("short read at %#08x: %zd instead of %d.\n", + ofs, retlen, len); err = -EIO; goto free_out; } @@ -910,9 +908,6 @@ void jffs2_del_ino_cache(struct jffs2_sb_info *c, struct jffs2_inode_cache *old) { struct jffs2_inode_cache **prev; -#ifdef CONFIG_JFFS2_FS_XATTR - BUG_ON(old->xref); -#endif dbg_inocache("del %p (ino #%u)\n", old, old->ino); spin_lock(&c->inocache_lock); @@ -945,7 +940,6 @@ void jffs2_free_ino_caches(struct jffs2_sb_info *c) this = c->inocache_list[i]; while (this) { next = this->next; - jffs2_xattr_free_inode(c, this); jffs2_free_inode_cache(this); this = next; } @@ -960,13 +954,9 @@ void jffs2_free_raw_node_refs(struct jffs2_sb_info *c) for (i=0; inr_blocks; i++) { this = c->blocks[i].first_node; - while (this) { - if (this[REFS_PER_BLOCK].flash_offset == REF_LINK_NODE) - next = this[REFS_PER_BLOCK].next_in_ino; - else - next = NULL; - - jffs2_free_refblock(this); + while(this) { + next = this->next_phys; + jffs2_free_raw_node_ref(this); this = next; } c->blocks[i].first_node = c->blocks[i].last_node = NULL; @@ -1057,169 +1047,3 @@ void jffs2_kill_fragtree(struct rb_root *root, struct jffs2_sb_info *c) cond_resched(); } } - -struct jffs2_raw_node_ref *jffs2_link_node_ref(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, - uint32_t ofs, uint32_t len, - struct jffs2_inode_cache *ic) -{ - struct jffs2_raw_node_ref *ref; - - BUG_ON(!jeb->allocated_refs); - jeb->allocated_refs--; - - ref = jeb->last_node; - - dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, - ref->next_in_ino); - - while (ref->flash_offset != REF_EMPTY_NODE) { - if (ref->flash_offset == REF_LINK_NODE) - ref = ref->next_in_ino; - else - ref++; - } - - dbg_noderef("New ref is %p (%08x becomes %08x,%p) len 0x%x\n", ref, - ref->flash_offset, ofs, ref->next_in_ino, len); - - ref->flash_offset = ofs; - - if (!jeb->first_node) { - jeb->first_node = ref; - BUG_ON(ref_offset(ref) != jeb->offset); - } else if (unlikely(ref_offset(ref) != jeb->offset + c->sector_size - jeb->free_size)) { - uint32_t last_len = ref_totlen(c, jeb, jeb->last_node); - - JFFS2_ERROR("Adding new ref %p at (0x%08x-0x%08x) not immediately after previous (0x%08x-0x%08x)\n", - ref, ref_offset(ref), ref_offset(ref)+len, - ref_offset(jeb->last_node), - ref_offset(jeb->last_node)+last_len); - BUG(); - } - jeb->last_node = ref; - - if (ic) { - ref->next_in_ino = ic->nodes; - ic->nodes = ref; - } else { - ref->next_in_ino = NULL; - } - - switch(ref_flags(ref)) { - case REF_UNCHECKED: - c->unchecked_size += len; - jeb->unchecked_size += len; - break; - - case REF_NORMAL: - case REF_PRISTINE: - c->used_size += len; - jeb->used_size += len; - break; - - case REF_OBSOLETE: - c->dirty_size += len; - jeb->dirty_size += len; - break; - } - c->free_size -= len; - jeb->free_size -= len; - -#ifdef TEST_TOTLEN - /* Set (and test) __totlen field... for now */ - ref->__totlen = len; - ref_totlen(c, jeb, ref); -#endif - return ref; -} - -/* No locking, no reservation of 'ref'. Do not use on a live file system */ -int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - uint32_t size) -{ - if (!size) - return 0; - if (unlikely(size > jeb->free_size)) { - printk(KERN_CRIT "Dirty space 0x%x larger then free_size 0x%x (wasted 0x%x)\n", - size, jeb->free_size, jeb->wasted_size); - BUG(); - } - /* REF_EMPTY_NODE is !obsolete, so that works OK */ - if (jeb->last_node && ref_obsolete(jeb->last_node)) { -#ifdef TEST_TOTLEN - jeb->last_node->__totlen += size; -#endif - c->dirty_size += size; - c->free_size -= size; - jeb->dirty_size += size; - jeb->free_size -= size; - } else { - uint32_t ofs = jeb->offset + c->sector_size - jeb->free_size; - ofs |= REF_OBSOLETE; - - jffs2_link_node_ref(c, jeb, ofs, size, NULL); - } - - return 0; -} - -/* Calculate totlen from surrounding nodes or eraseblock */ -static inline uint32_t __ref_totlen(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, - struct jffs2_raw_node_ref *ref) -{ - uint32_t ref_end; - struct jffs2_raw_node_ref *next_ref = ref_next(ref); - - if (next_ref) - ref_end = ref_offset(next_ref); - else { - if (!jeb) - jeb = &c->blocks[ref->flash_offset / c->sector_size]; - - /* Last node in block. Use free_space */ - if (unlikely(ref != jeb->last_node)) { - printk(KERN_CRIT "ref %p @0x%08x is not jeb->last_node (%p @0x%08x)\n", - ref, ref_offset(ref), jeb->last_node, jeb->last_node?ref_offset(jeb->last_node):0); - BUG(); - } - ref_end = jeb->offset + c->sector_size - jeb->free_size; - } - return ref_end - ref_offset(ref); -} - -uint32_t __jffs2_ref_totlen(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - struct jffs2_raw_node_ref *ref) -{ - uint32_t ret; - - ret = __ref_totlen(c, jeb, ref); - -#ifdef TEST_TOTLEN - if (unlikely(ret != ref->__totlen)) { - if (!jeb) - jeb = &c->blocks[ref->flash_offset / c->sector_size]; - - printk(KERN_CRIT "Totlen for ref at %p (0x%08x-0x%08x) miscalculated as 0x%x instead of %x\n", - ref, ref_offset(ref), ref_offset(ref)+ref->__totlen, - ret, ref->__totlen); - if (ref_next(ref)) { - printk(KERN_CRIT "next %p (0x%08x-0x%08x)\n", ref_next(ref), ref_offset(ref_next(ref)), - ref_offset(ref_next(ref))+ref->__totlen); - } else - printk(KERN_CRIT "No next ref. jeb->last_node is %p\n", jeb->last_node); - - printk(KERN_CRIT "jeb->wasted_size %x, dirty_size %x, used_size %x, free_size %x\n", jeb->wasted_size, jeb->dirty_size, jeb->used_size, jeb->free_size); - -#if defined(JFFS2_DBG_DUMPS) || defined(JFFS2_DBG_PARANOIA_CHECKS) - __jffs2_dbg_dump_node_refs_nolock(c, jeb); -#endif - - WARN_ON(1); - - ret = ref->__totlen; - } -#endif /* TEST_TOTLEN */ - return ret; -} diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 0ddfd7030..23a67bb30 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h @@ -14,13 +14,12 @@ #ifndef __JFFS2_NODELIST_H__ #define __JFFS2_NODELIST_H__ +#include #include #include #include -#include "jffs2_fs_sb.h" -#include "jffs2_fs_i.h" -#include "xattr.h" -#include "acl.h" +#include +#include #include "summary.h" #ifdef __ECOS @@ -76,50 +75,14 @@ struct jffs2_raw_node_ref { struct jffs2_raw_node_ref *next_in_ino; /* Points to the next raw_node_ref - for this object. If this _is_ the last, it points to the inode_cache, - xattr_ref or xattr_datum instead. The common part of those structures - has NULL in the first word. See jffs2_raw_ref_to_ic() below */ + for this inode. If this is the last, it points to the inode_cache + for this inode instead. The inode_cache will have NULL in the first + word so you know when you've got there :) */ + struct jffs2_raw_node_ref *next_phys; uint32_t flash_offset; -#define TEST_TOTLEN -#ifdef TEST_TOTLEN uint32_t __totlen; /* This may die; use ref_totlen(c, jeb, ) below */ -#endif }; -#define REF_LINK_NODE ((int32_t)-1) -#define REF_EMPTY_NODE ((int32_t)-2) - -/* Use blocks of about 256 bytes */ -#define REFS_PER_BLOCK ((255/sizeof(struct jffs2_raw_node_ref))-1) - -static inline struct jffs2_raw_node_ref *ref_next(struct jffs2_raw_node_ref *ref) -{ - ref++; - - /* Link to another block of refs */ - if (ref->flash_offset == REF_LINK_NODE) { - ref = ref->next_in_ino; - if (!ref) - return ref; - } - - /* End of chain */ - if (ref->flash_offset == REF_EMPTY_NODE) - return NULL; - - return ref; -} - -static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_node_ref *raw) -{ - while(raw->next_in_ino) - raw = raw->next_in_ino; - - /* NB. This can be a jffs2_xattr_datum or jffs2_xattr_ref and - not actually a jffs2_inode_cache. Check ->class */ - return ((struct jffs2_inode_cache *)raw); -} - /* flash_offset & 3 always has to be zero, because nodes are always aligned at 4 bytes. So we have a couple of extra bits to play with, which indicate the node's status; see below: */ @@ -132,11 +95,6 @@ static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_nod #define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) #define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0) -/* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates - it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get - copied. If you need to do anything different to GC inode-less nodes, then - you need to modify gc.c accordingly. */ - /* For each inode in the filesystem, we need to keep a record of nlink, because it would be a PITA to scan the whole directory tree at read_inode() time to calculate it, and to keep sufficient information @@ -145,27 +103,15 @@ static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_nod a pointer to the first physical node which is part of this inode, too. */ struct jffs2_inode_cache { - /* First part of structure is shared with other objects which - can terminate the raw node refs' next_in_ino list -- which - currently struct jffs2_xattr_datum and struct jffs2_xattr_ref. */ - struct jffs2_full_dirent *scan_dents; /* Used during scan to hold temporary lists of dirents, and later must be set to NULL to mark the end of the raw_node_ref->next_in_ino chain. */ + struct jffs2_inode_cache *next; struct jffs2_raw_node_ref *nodes; - uint8_t class; /* It's used for identification */ - - /* end of shared structure */ - - uint8_t flags; - uint16_t state; uint32_t ino; - struct jffs2_inode_cache *next; -#ifdef CONFIG_JFFS2_FS_XATTR - struct jffs2_xattr_ref *xref; -#endif int nlink; + int state; }; /* Inode states for 'state' above. We need the 'GC' state to prevent @@ -179,16 +125,8 @@ struct jffs2_inode_cache { #define INO_STATE_READING 5 /* In read_inode() */ #define INO_STATE_CLEARING 6 /* In clear_inode() */ -#define INO_FLAGS_XATTR_CHECKED 0x01 /* has no duplicate xattr_ref */ - -#define RAWNODE_CLASS_INODE_CACHE 0 -#define RAWNODE_CLASS_XATTR_DATUM 1 -#define RAWNODE_CLASS_XATTR_REF 2 - #define INOCACHE_HASHSIZE 128 -#define write_ofs(c) ((c)->nextblock->offset + (c)->sector_size - (c)->nextblock->free_size) - /* Larger representation of a raw node, kept in-core only when the struct inode for this particular ino is instantiated. @@ -254,7 +192,6 @@ struct jffs2_eraseblock uint32_t wasted_size; uint32_t free_size; /* Note that sector_size - free_size is the address of the first free space */ - uint32_t allocated_refs; struct jffs2_raw_node_ref *first_node; struct jffs2_raw_node_ref *last_node; @@ -266,7 +203,57 @@ static inline int jffs2_blocks_use_vmalloc(struct jffs2_sb_info *c) return ((c->flash_size / c->sector_size) * sizeof (struct jffs2_eraseblock)) > (128 * 1024); } -#define ref_totlen(a, b, c) __jffs2_ref_totlen((a), (b), (c)) +/* Calculate totlen from surrounding nodes or eraseblock */ +static inline uint32_t __ref_totlen(struct jffs2_sb_info *c, + struct jffs2_eraseblock *jeb, + struct jffs2_raw_node_ref *ref) +{ + uint32_t ref_end; + + if (ref->next_phys) + ref_end = ref_offset(ref->next_phys); + else { + if (!jeb) + jeb = &c->blocks[ref->flash_offset / c->sector_size]; + + /* Last node in block. Use free_space */ + BUG_ON(ref != jeb->last_node); + ref_end = jeb->offset + c->sector_size - jeb->free_size; + } + return ref_end - ref_offset(ref); +} + +static inline uint32_t ref_totlen(struct jffs2_sb_info *c, + struct jffs2_eraseblock *jeb, + struct jffs2_raw_node_ref *ref) +{ + uint32_t ret; + +#if CONFIG_JFFS2_FS_DEBUG > 0 + if (jeb && jeb != &c->blocks[ref->flash_offset / c->sector_size]) { + printk(KERN_CRIT "ref_totlen called with wrong block -- at 0x%08x instead of 0x%08x; ref 0x%08x\n", + jeb->offset, c->blocks[ref->flash_offset / c->sector_size].offset, ref_offset(ref)); + BUG(); + } +#endif + +#if 1 + ret = ref->__totlen; +#else + /* This doesn't actually work yet */ + ret = __ref_totlen(c, jeb, ref); + if (ret != ref->__totlen) { + printk(KERN_CRIT "Totlen for ref at %p (0x%08x-0x%08x) miscalculated as 0x%x instead of %x\n", + ref, ref_offset(ref), ref_offset(ref)+ref->__totlen, + ret, ref->__totlen); + if (!jeb) + jeb = &c->blocks[ref->flash_offset / c->sector_size]; + jffs2_dbg_dump_node_refs_nolock(c, jeb); + BUG(); + } +#endif + return ret; +} #define ALLOC_NORMAL 0 /* Normal allocation */ #define ALLOC_DELETION 1 /* Deletion node. Best to allow it */ @@ -281,15 +268,13 @@ static inline int jffs2_blocks_use_vmalloc(struct jffs2_sb_info *c) #define PAD(x) (((x)+3)&~3) -static inline int jffs2_encode_dev(union jffs2_device_node *jdev, dev_t rdev) +static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_node_ref *raw) { - if (old_valid_dev(rdev)) { - jdev->old = cpu_to_je16(old_encode_dev(rdev)); - return sizeof(jdev->old); - } else { - jdev->new = cpu_to_je32(new_encode_dev(rdev)); - return sizeof(jdev->new); + while(raw->next_in_ino) { + raw = raw->next_in_ino; } + + return ((struct jffs2_inode_cache *)raw); } static inline struct jffs2_node_frag *frag_first(struct rb_root *root) @@ -314,6 +299,7 @@ static inline struct jffs2_node_frag *frag_last(struct rb_root *root) return rb_entry(node, struct jffs2_node_frag, rb); } +#define rb_parent(rb) ((rb)->rb_parent) #define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb) #define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb) #define frag_parent(frag) rb_entry(rb_parent(&(frag)->rb), struct jffs2_node_frag, rb) @@ -334,47 +320,32 @@ void jffs2_kill_fragtree(struct rb_root *root, struct jffs2_sb_info *c_delete); struct rb_node *rb_next(struct rb_node *); struct rb_node *rb_prev(struct rb_node *); void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root); +void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, struct jffs2_node_frag *this); int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn); void jffs2_truncate_fragtree (struct jffs2_sb_info *c, struct rb_root *list, uint32_t size); int jffs2_add_older_frag_to_fragtree(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_tmp_dnode_info *tn); -struct jffs2_raw_node_ref *jffs2_link_node_ref(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, - uint32_t ofs, uint32_t len, - struct jffs2_inode_cache *ic); -extern uint32_t __jffs2_ref_totlen(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, - struct jffs2_raw_node_ref *ref); /* nodemgmt.c */ int jffs2_thread_should_wake(struct jffs2_sb_info *c); -int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, +int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, uint32_t *len, int prio, uint32_t sumsize); -int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, +int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, uint32_t *len, uint32_t sumsize); -struct jffs2_raw_node_ref *jffs2_add_physical_node_ref(struct jffs2_sb_info *c, - uint32_t ofs, uint32_t len, - struct jffs2_inode_cache *ic); +int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new); void jffs2_complete_reservation(struct jffs2_sb_info *c); void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *raw); /* write.c */ int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri); -struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, - struct jffs2_raw_inode *ri, const unsigned char *data, - uint32_t datalen, int alloc_mode); -struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, - struct jffs2_raw_dirent *rd, const unsigned char *name, - uint32_t namelen, int alloc_mode); +struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const unsigned char *data, uint32_t datalen, uint32_t flash_ofs, int alloc_mode); +struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_dirent *rd, const unsigned char *name, uint32_t namelen, uint32_t flash_ofs, int alloc_mode); int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, unsigned char *buf, uint32_t offset, uint32_t writelen, uint32_t *retlen); -int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, struct jffs2_inode_info *f, - struct jffs2_raw_inode *ri, const char *name, int namelen); -int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, const char *name, - int namelen, struct jffs2_inode_info *dead_f, uint32_t time); -int jffs2_do_link(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino, - uint8_t type, const char *name, int namelen, uint32_t time); +int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const char *name, int namelen); +int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, const char *name, int namelen, struct jffs2_inode_info *dead_f, uint32_t time); +int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino, uint8_t type, const char *name, int namelen, uint32_t time); /* readinode.c */ @@ -397,19 +368,12 @@ struct jffs2_raw_inode *jffs2_alloc_raw_inode(void); void jffs2_free_raw_inode(struct jffs2_raw_inode *); struct jffs2_tmp_dnode_info *jffs2_alloc_tmp_dnode_info(void); void jffs2_free_tmp_dnode_info(struct jffs2_tmp_dnode_info *); -int jffs2_prealloc_raw_node_refs(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, int nr); -void jffs2_free_refblock(struct jffs2_raw_node_ref *); +struct jffs2_raw_node_ref *jffs2_alloc_raw_node_ref(void); +void jffs2_free_raw_node_ref(struct jffs2_raw_node_ref *); struct jffs2_node_frag *jffs2_alloc_node_frag(void); void jffs2_free_node_frag(struct jffs2_node_frag *); struct jffs2_inode_cache *jffs2_alloc_inode_cache(void); void jffs2_free_inode_cache(struct jffs2_inode_cache *); -#ifdef CONFIG_JFFS2_FS_XATTR -struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void); -void jffs2_free_xattr_datum(struct jffs2_xattr_datum *); -struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void); -void jffs2_free_xattr_ref(struct jffs2_xattr_ref *); -#endif /* gc.c */ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c); @@ -425,16 +389,16 @@ char *jffs2_getlink(struct jffs2_sb_info *c, struct jffs2_inode_info *f); /* scan.c */ int jffs2_scan_medium(struct jffs2_sb_info *c); void jffs2_rotate_lists(struct jffs2_sb_info *c); +int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf, + uint32_t ofs, uint32_t len); struct jffs2_inode_cache *jffs2_scan_make_ino_cache(struct jffs2_sb_info *c, uint32_t ino); int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); -int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, uint32_t size); /* build.c */ int jffs2_do_mount_fs(struct jffs2_sb_info *c); /* erase.c */ void jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count); -void jffs2_free_jeb_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb); #ifdef CONFIG_JFFS2_FS_WRITEBUFFER /* wbuf.c */ diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index d88376992..49127a1f0 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -23,12 +23,13 @@ * jffs2_reserve_space - request physical space to write nodes to flash * @c: superblock info * @minsize: Minimum acceptable size of allocation + * @ofs: Returned value of node offset * @len: Returned value of allocation length * @prio: Allocation type - ALLOC_{NORMAL,DELETION} * * Requests a block of physical space on the flash. Returns zero for success - * and puts 'len' into the appropriate place, or returns -ENOSPC or other - * error if appropriate. Doesn't return len since that's + * and puts 'ofs' and 'len' into the appriopriate place, or returns -ENOSPC + * or other error if appropriate. * * If it returns zero, jffs2_reserve_space() also downs the per-filesystem * allocation semaphore, to prevent more than one allocation from being @@ -39,9 +40,9 @@ */ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, - uint32_t *len, uint32_t sumsize); + uint32_t *ofs, uint32_t *len, uint32_t sumsize); -int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, +int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, uint32_t *len, int prio, uint32_t sumsize) { int ret = -EAGAIN; @@ -131,21 +132,19 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, spin_lock(&c->erase_completion_lock); } - ret = jffs2_do_reserve_space(c, minsize, len, sumsize); + ret = jffs2_do_reserve_space(c, minsize, ofs, len, sumsize); if (ret) { D1(printk(KERN_DEBUG "jffs2_reserve_space: ret is %d\n", ret)); } } spin_unlock(&c->erase_completion_lock); - if (!ret) - ret = jffs2_prealloc_raw_node_refs(c, c->nextblock, 1); if (ret) up(&c->alloc_sem); return ret; } -int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, - uint32_t *len, uint32_t sumsize) +int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, + uint32_t *len, uint32_t sumsize) { int ret = -EAGAIN; minsize = PAD(minsize); @@ -154,15 +153,12 @@ int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, spin_lock(&c->erase_completion_lock); while(ret == -EAGAIN) { - ret = jffs2_do_reserve_space(c, minsize, len, sumsize); + ret = jffs2_do_reserve_space(c, minsize, ofs, len, sumsize); if (ret) { D1(printk(KERN_DEBUG "jffs2_reserve_space_gc: looping, ret is %d\n", ret)); } } spin_unlock(&c->erase_completion_lock); - if (!ret) - ret = jffs2_prealloc_raw_node_refs(c, c->nextblock, 1); - return ret; } @@ -211,7 +207,8 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c) struct jffs2_eraseblock *ejeb; ejeb = list_entry(c->erasable_list.next, struct jffs2_eraseblock, list); - list_move_tail(&ejeb->list, &c->erase_pending_list); + list_del(&ejeb->list); + list_add_tail(&ejeb->list, &c->erase_pending_list); c->nr_erasing_blocks++; jffs2_erase_pending_trigger(c); D1(printk(KERN_DEBUG "jffs2_find_nextblock: Triggering erase of erasable block at 0x%08x\n", @@ -262,11 +259,10 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c) } /* Called with alloc sem _and_ erase_completion_lock */ -static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, - uint32_t *len, uint32_t sumsize) +static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, uint32_t *len, uint32_t sumsize) { struct jffs2_eraseblock *jeb = c->nextblock; - uint32_t reserved_size; /* for summary information at the end of the jeb */ + uint32_t reserved_size; /* for summary information at the end of the jeb */ int ret; restart: @@ -316,8 +312,6 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, } } else { if (jeb && minsize > jeb->free_size) { - uint32_t waste; - /* Skip the end of this block and file it as having some dirty space */ /* If there's a pending write to it, flush now */ @@ -330,26 +324,10 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, goto restart; } - spin_unlock(&c->erase_completion_lock); - - ret = jffs2_prealloc_raw_node_refs(c, jeb, 1); - if (ret) - return ret; - /* Just lock it again and continue. Nothing much can change because - we hold c->alloc_sem anyway. In fact, it's not entirely clear why - we hold c->erase_completion_lock in the majority of this function... - but that's a question for another (more caffeine-rich) day. */ - spin_lock(&c->erase_completion_lock); - - waste = jeb->free_size; - jffs2_link_node_ref(c, jeb, - (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, - waste, NULL); - /* FIXME: that made it count as dirty. Convert to wasted */ - jeb->dirty_size -= waste; - c->dirty_size -= waste; - jeb->wasted_size += waste; - c->wasted_size += waste; + c->wasted_size += jeb->free_size; + c->free_size -= jeb->free_size; + jeb->wasted_size += jeb->free_size; + jeb->free_size = 0; jffs2_close_nextblock(c, jeb); jeb = NULL; @@ -371,6 +349,7 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, } /* OK, jeb (==c->nextblock) is now pointing at a block which definitely has enough space */ + *ofs = jeb->offset + (c->sector_size - jeb->free_size); *len = jeb->free_size - reserved_size; if (c->cleanmarker_size && jeb->used_size == c->cleanmarker_size && @@ -386,8 +365,7 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, spin_lock(&c->erase_completion_lock); } - D1(printk(KERN_DEBUG "jffs2_do_reserve_space(): Giving 0x%x bytes at 0x%x\n", - *len, jeb->offset + (c->sector_size - jeb->free_size))); + D1(printk(KERN_DEBUG "jffs2_do_reserve_space(): Giving 0x%x bytes at 0x%x\n", *len, *ofs)); return 0; } @@ -396,6 +374,7 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, * @c: superblock info * @new: new node reference to add * @len: length of this physical node + * @dirty: dirty flag for new node * * Should only be used to report nodes for which space has been allocated * by jffs2_reserve_space. @@ -403,30 +382,42 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, * Must be called with the alloc_sem held. */ -struct jffs2_raw_node_ref *jffs2_add_physical_node_ref(struct jffs2_sb_info *c, - uint32_t ofs, uint32_t len, - struct jffs2_inode_cache *ic) +int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new) { struct jffs2_eraseblock *jeb; - struct jffs2_raw_node_ref *new; + uint32_t len; - jeb = &c->blocks[ofs / c->sector_size]; + jeb = &c->blocks[new->flash_offset / c->sector_size]; + len = ref_totlen(c, jeb, new); - D1(printk(KERN_DEBUG "jffs2_add_physical_node_ref(): Node at 0x%x(%d), size 0x%x\n", - ofs & ~3, ofs & 3, len)); + D1(printk(KERN_DEBUG "jffs2_add_physical_node_ref(): Node at 0x%x(%d), size 0x%x\n", ref_offset(new), ref_flags(new), len)); #if 1 - /* Allow non-obsolete nodes only to be added at the end of c->nextblock, - if c->nextblock is set. Note that wbuf.c will file obsolete nodes - even after refiling c->nextblock */ - if ((c->nextblock || ((ofs & 3) != REF_OBSOLETE)) - && (jeb != c->nextblock || (ofs & ~3) != jeb->offset + (c->sector_size - jeb->free_size))) { + /* we could get some obsolete nodes after nextblock was refiled + in wbuf.c */ + if ((c->nextblock || !ref_obsolete(new)) + &&(jeb != c->nextblock || ref_offset(new) != jeb->offset + (c->sector_size - jeb->free_size))) { printk(KERN_WARNING "argh. node added in wrong place\n"); - return ERR_PTR(-EINVAL); + jffs2_free_raw_node_ref(new); + return -EINVAL; } #endif spin_lock(&c->erase_completion_lock); - new = jffs2_link_node_ref(c, jeb, ofs, len, ic); + if (!jeb->first_node) + jeb->first_node = new; + if (jeb->last_node) + jeb->last_node->next_phys = new; + jeb->last_node = new; + + jeb->free_size -= len; + c->free_size -= len; + if (ref_obsolete(new)) { + jeb->dirty_size += len; + c->dirty_size += len; + } else { + jeb->used_size += len; + c->used_size += len; + } if (!jeb->free_size && !jeb->dirty_size && !ISDIRTY(jeb->wasted_size)) { /* If it lives on the dirty_list, jffs2_reserve_space will put it there */ @@ -447,7 +438,7 @@ struct jffs2_raw_node_ref *jffs2_add_physical_node_ref(struct jffs2_sb_info *c, spin_unlock(&c->erase_completion_lock); - return new; + return 0; } @@ -479,9 +470,8 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref struct jffs2_unknown_node n; int ret, addedsize; size_t retlen; - uint32_t freed_len; - if(unlikely(!ref)) { + if(!ref) { printk(KERN_NOTICE "EEEEEK. jffs2_mark_node_obsolete called with NULL node\n"); return; } @@ -509,34 +499,32 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref spin_lock(&c->erase_completion_lock); - freed_len = ref_totlen(c, jeb, ref); - if (ref_flags(ref) == REF_UNCHECKED) { - D1(if (unlikely(jeb->unchecked_size < freed_len)) { + D1(if (unlikely(jeb->unchecked_size < ref_totlen(c, jeb, ref))) { printk(KERN_NOTICE "raw unchecked node of size 0x%08x freed from erase block %d at 0x%08x, but unchecked_size was already 0x%08x\n", - freed_len, blocknr, ref->flash_offset, jeb->used_size); + ref_totlen(c, jeb, ref), blocknr, ref->flash_offset, jeb->used_size); BUG(); }) - D1(printk(KERN_DEBUG "Obsoleting previously unchecked node at 0x%08x of len %x: ", ref_offset(ref), freed_len)); - jeb->unchecked_size -= freed_len; - c->unchecked_size -= freed_len; + D1(printk(KERN_DEBUG "Obsoleting previously unchecked node at 0x%08x of len %x: ", ref_offset(ref), ref_totlen(c, jeb, ref))); + jeb->unchecked_size -= ref_totlen(c, jeb, ref); + c->unchecked_size -= ref_totlen(c, jeb, ref); } else { - D1(if (unlikely(jeb->used_size < freed_len)) { + D1(if (unlikely(jeb->used_size < ref_totlen(c, jeb, ref))) { printk(KERN_NOTICE "raw node of size 0x%08x freed from erase block %d at 0x%08x, but used_size was already 0x%08x\n", - freed_len, blocknr, ref->flash_offset, jeb->used_size); + ref_totlen(c, jeb, ref), blocknr, ref->flash_offset, jeb->used_size); BUG(); }) - D1(printk(KERN_DEBUG "Obsoleting node at 0x%08x of len %#x: ", ref_offset(ref), freed_len)); - jeb->used_size -= freed_len; - c->used_size -= freed_len; + D1(printk(KERN_DEBUG "Obsoleting node at 0x%08x of len %#x: ", ref_offset(ref), ref_totlen(c, jeb, ref))); + jeb->used_size -= ref_totlen(c, jeb, ref); + c->used_size -= ref_totlen(c, jeb, ref); } // Take care, that wasted size is taken into concern - if ((jeb->dirty_size || ISDIRTY(jeb->wasted_size + freed_len)) && jeb != c->nextblock) { - D1(printk("Dirtying\n")); - addedsize = freed_len; - jeb->dirty_size += freed_len; - c->dirty_size += freed_len; + if ((jeb->dirty_size || ISDIRTY(jeb->wasted_size + ref_totlen(c, jeb, ref))) && jeb != c->nextblock) { + D1(printk(KERN_DEBUG "Dirtying\n")); + addedsize = ref_totlen(c, jeb, ref); + jeb->dirty_size += ref_totlen(c, jeb, ref); + c->dirty_size += ref_totlen(c, jeb, ref); /* Convert wasted space to dirty, if not a bad block */ if (jeb->wasted_size) { @@ -555,10 +543,10 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref } } } else { - D1(printk("Wasting\n")); + D1(printk(KERN_DEBUG "Wasting\n")); addedsize = 0; - jeb->wasted_size += freed_len; - c->wasted_size += freed_len; + jeb->wasted_size += ref_totlen(c, jeb, ref); + c->wasted_size += ref_totlen(c, jeb, ref); } ref->flash_offset = ref_offset(ref) | REF_OBSOLETE; @@ -634,7 +622,7 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref /* The erase_free_sem is locked, and has been since before we marked the node obsolete and potentially put its eraseblock onto the erase_pending_list. Thus, we know that the block hasn't _already_ been erased, and that 'ref' itself hasn't been freed yet - by jffs2_free_jeb_node_refs() in erase.c. Which is nice. */ + by jffs2_free_all_node_refs() in erase.c. Which is nice. */ D1(printk(KERN_DEBUG "obliterating obsoleted node at 0x%08x\n", ref_offset(ref))); ret = jffs2_flash_read(c, ref_offset(ref), sizeof(n), &retlen, (char *)&n); @@ -646,8 +634,8 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref printk(KERN_WARNING "Short read from obsoleted node at 0x%08x: %zd\n", ref_offset(ref), retlen); goto out_erase_sem; } - if (PAD(je32_to_cpu(n.totlen)) != PAD(freed_len)) { - printk(KERN_WARNING "Node totlen on flash (0x%08x) != totlen from node ref (0x%08x)\n", je32_to_cpu(n.totlen), freed_len); + if (PAD(je32_to_cpu(n.totlen)) != PAD(ref_totlen(c, jeb, ref))) { + printk(KERN_WARNING "Node totlen on flash (0x%08x) != totlen from node ref (0x%08x)\n", je32_to_cpu(n.totlen), ref_totlen(c, jeb, ref)); goto out_erase_sem; } if (!(je16_to_cpu(n.nodetype) & JFFS2_NODE_ACCURATE)) { @@ -689,23 +677,57 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *p = ref->next_in_ino; ref->next_in_ino = NULL; - switch (ic->class) { -#ifdef CONFIG_JFFS2_FS_XATTR - case RAWNODE_CLASS_XATTR_DATUM: - jffs2_release_xattr_datum(c, (struct jffs2_xattr_datum *)ic); - break; - case RAWNODE_CLASS_XATTR_REF: - jffs2_release_xattr_ref(c, (struct jffs2_xattr_ref *)ic); - break; -#endif - default: - if (ic->nodes == (void *)ic && ic->nlink == 0) - jffs2_del_ino_cache(c, ic); - break; + if (ic->nodes == (void *)ic && ic->nlink == 0) + jffs2_del_ino_cache(c, ic); + + spin_unlock(&c->erase_completion_lock); + } + + + /* Merge with the next node in the physical list, if there is one + and if it's also obsolete and if it doesn't belong to any inode */ + if (ref->next_phys && ref_obsolete(ref->next_phys) && + !ref->next_phys->next_in_ino) { + struct jffs2_raw_node_ref *n = ref->next_phys; + + spin_lock(&c->erase_completion_lock); + + ref->__totlen += n->__totlen; + ref->next_phys = n->next_phys; + if (jeb->last_node == n) jeb->last_node = ref; + if (jeb->gc_node == n) { + /* gc will be happy continuing gc on this node */ + jeb->gc_node=ref; } spin_unlock(&c->erase_completion_lock); + + jffs2_free_raw_node_ref(n); } + /* Also merge with the previous node in the list, if there is one + and that one is obsolete */ + if (ref != jeb->first_node ) { + struct jffs2_raw_node_ref *p = jeb->first_node; + + spin_lock(&c->erase_completion_lock); + + while (p->next_phys != ref) + p = p->next_phys; + + if (ref_obsolete(p) && !ref->next_in_ino) { + p->__totlen += ref->__totlen; + if (jeb->last_node == ref) { + jeb->last_node = p; + } + if (jeb->gc_node == ref) { + /* gc will be happy continuing gc on this node */ + jeb->gc_node=p; + } + p->next_phys = ref->next_phys; + jffs2_free_raw_node_ref(ref); + } + spin_unlock(&c->erase_completion_lock); + } out_erase_sem: up(&c->erase_free_sem); } diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 9f41fc01a..d307cf548 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h @@ -31,7 +31,9 @@ struct kvec; #define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode) #define JFFS2_F_I_UID(f) (OFNI_EDONI_2SFFJ(f)->i_uid) #define JFFS2_F_I_GID(f) (OFNI_EDONI_2SFFJ(f)->i_gid) -#define JFFS2_F_I_RDEV(f) (OFNI_EDONI_2SFFJ(f)->i_rdev) + +#define JFFS2_F_I_RDEV_MIN(f) (iminor(OFNI_EDONI_2SFFJ(f))) +#define JFFS2_F_I_RDEV_MAJ(f) (imajor(OFNI_EDONI_2SFFJ(f))) #define ITIME(sec) ((struct timespec){sec, 0}) #define I_SEC(tv) ((tv).tv_sec) @@ -58,10 +60,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) f->target = NULL; f->flags = 0; f->usercompr = 0; -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - f->i_acl_access = JFFS2_ACL_NOT_CACHED; - f->i_acl_default = JFFS2_ACL_NOT_CACHED; -#endif } @@ -92,10 +90,13 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) #define jffs2_flash_writev(a,b,c,d,e,f) jffs2_flash_direct_writev(a,b,c,d,e) #define jffs2_wbuf_timeout NULL #define jffs2_wbuf_process NULL +#define jffs2_nor_ecc(c) (0) #define jffs2_dataflash(c) (0) +#define jffs2_nor_wbuf_flash(c) (0) +#define jffs2_nor_ecc_flash_setup(c) (0) +#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0) #define jffs2_dataflash_setup(c) (0) #define jffs2_dataflash_cleanup(c) do {} while (0) -#define jffs2_nor_wbuf_flash(c) (0) #define jffs2_nor_wbuf_flash_setup(c) (0) #define jffs2_nor_wbuf_flash_cleanup(c) do {} while (0) @@ -106,7 +107,9 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) #ifdef CONFIG_JFFS2_SUMMARY #define jffs2_can_mark_obsolete(c) (0) #else -#define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE)) +#define jffs2_can_mark_obsolete(c) \ + ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_ECC|MTD_PROGRAM_REGIONS))) || \ + c->mtd->type == MTD_RAM) #endif #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) @@ -130,11 +133,15 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c); int jffs2_nand_flash_setup(struct jffs2_sb_info *c); void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c); +#define jffs2_nor_ecc(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_ECC)) +int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c); +void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c); + #define jffs2_dataflash(c) (c->mtd->type == MTD_DATAFLASH) int jffs2_dataflash_setup(struct jffs2_sb_info *c); void jffs2_dataflash_cleanup(struct jffs2_sb_info *c); -#define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && ! (c->mtd->flags & MTD_BIT_WRITEABLE)) +#define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_PROGRAM_REGIONS)) int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c); void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c); @@ -158,7 +165,7 @@ extern struct inode_operations jffs2_dir_inode_operations; /* file.c */ extern const struct file_operations jffs2_file_operations; extern struct inode_operations jffs2_file_inode_operations; -extern const struct address_space_operations jffs2_file_address_operations; +extern struct address_space_operations jffs2_file_address_operations; int jffs2_fsync(struct file *, struct dentry *, int); int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg); @@ -175,7 +182,7 @@ void jffs2_clear_inode (struct inode *); void jffs2_dirty_inode(struct inode *inode); struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_inode *ri); -int jffs2_statfs (struct dentry *, struct kstatfs *); +int jffs2_statfs (struct super_block *, struct kstatfs *); void jffs2_write_super (struct super_block *); int jffs2_remount_fs (struct super_block *, int *, char *); int jffs2_do_fill_super(struct super_block *sb, void *data, int silent); diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 266423b27..f1695642d 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -66,7 +66,7 @@ static void jffs2_free_tmp_dnode_info_list(struct rb_root *list) jffs2_free_full_dnode(tn->fn); jffs2_free_tmp_dnode_info(tn); - this = rb_parent(this); + this = this->rb_parent; if (!this) break; @@ -116,42 +116,19 @@ static inline int read_direntry(struct jffs2_sb_info *c, struct jffs2_raw_node_r uint32_t *latest_mctime, uint32_t *mctime_ver) { struct jffs2_full_dirent *fd; - uint32_t crc; + /* The direntry nodes are checked during the flash scanning */ + BUG_ON(ref_flags(ref) == REF_UNCHECKED); /* Obsoleted. This cannot happen, surely? dwmw2 20020308 */ BUG_ON(ref_obsolete(ref)); - crc = crc32(0, rd, sizeof(*rd) - 8); - if (unlikely(crc != je32_to_cpu(rd->node_crc))) { - JFFS2_NOTICE("header CRC failed on dirent node at %#08x: read %#08x, calculated %#08x\n", - ref_offset(ref), je32_to_cpu(rd->node_crc), crc); + /* Sanity check */ + if (unlikely(PAD((rd->nsize + sizeof(*rd))) != PAD(je32_to_cpu(rd->totlen)))) { + JFFS2_ERROR("illegal nsize in node at %#08x: nsize %#02x, totlen %#04x\n", + ref_offset(ref), rd->nsize, je32_to_cpu(rd->totlen)); return 1; } - /* If we've never checked the CRCs on this node, check them now */ - if (ref_flags(ref) == REF_UNCHECKED) { - struct jffs2_eraseblock *jeb; - int len; - - /* Sanity check */ - if (unlikely(PAD((rd->nsize + sizeof(*rd))) != PAD(je32_to_cpu(rd->totlen)))) { - JFFS2_ERROR("illegal nsize in node at %#08x: nsize %#02x, totlen %#04x\n", - ref_offset(ref), rd->nsize, je32_to_cpu(rd->totlen)); - return 1; - } - - jeb = &c->blocks[ref->flash_offset / c->sector_size]; - len = ref_totlen(c, jeb, ref); - - spin_lock(&c->erase_completion_lock); - jeb->used_size += len; - jeb->unchecked_size -= len; - c->used_size += len; - c->unchecked_size -= len; - ref->flash_offset = ref_offset(ref) | REF_PRISTINE; - spin_unlock(&c->erase_completion_lock); - } - fd = jffs2_alloc_full_dirent(rd->nsize + 1); if (unlikely(!fd)) return -ENOMEM; @@ -221,21 +198,13 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref struct jffs2_tmp_dnode_info *tn; uint32_t len, csize; int ret = 1; - uint32_t crc; /* Obsoleted. This cannot happen, surely? dwmw2 20020308 */ BUG_ON(ref_obsolete(ref)); - crc = crc32(0, rd, sizeof(*rd) - 8); - if (unlikely(crc != je32_to_cpu(rd->node_crc))) { - JFFS2_NOTICE("node CRC failed on dnode at %#08x: read %#08x, calculated %#08x\n", - ref_offset(ref), je32_to_cpu(rd->node_crc), crc); - return 1; - } - tn = jffs2_alloc_tmp_dnode_info(); if (!tn) { - JFFS2_ERROR("failed to allocate tn (%zu bytes).\n", sizeof(*tn)); + JFFS2_ERROR("failed to allocate tn (%d bytes).\n", sizeof(*tn)); return -ENOMEM; } @@ -244,6 +213,14 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref /* If we've never checked the CRCs on this node, check them now */ if (ref_flags(ref) == REF_UNCHECKED) { + uint32_t crc; + + crc = crc32(0, rd, sizeof(*rd) - 8); + if (unlikely(crc != je32_to_cpu(rd->node_crc))) { + JFFS2_NOTICE("header CRC failed on node at %#08x: read %#08x, calculated %#08x\n", + ref_offset(ref), je32_to_cpu(rd->node_crc), crc); + goto free_out; + } /* Sanity checks */ if (unlikely(je32_to_cpu(rd->offset) > je32_to_cpu(rd->isize)) || @@ -366,7 +343,7 @@ free_out: * Helper function for jffs2_get_inode_nodes(). * It is called every time an unknown node is found. * - * Returns: 0 on success; + * Returns: 0 on succes; * 1 if the node should be marked obsolete; * negative error code on failure. */ @@ -377,30 +354,37 @@ static inline int read_unknown(struct jffs2_sb_info *c, struct jffs2_raw_node_re un->nodetype = cpu_to_je16(JFFS2_NODE_ACCURATE | je16_to_cpu(un->nodetype)); - switch(je16_to_cpu(un->nodetype) & JFFS2_COMPAT_MASK) { + if (crc32(0, un, sizeof(struct jffs2_unknown_node) - 4) != je32_to_cpu(un->hdr_crc)) { + /* Hmmm. This should have been caught at scan time. */ + JFFS2_NOTICE("node header CRC failed at %#08x. But it must have been OK earlier.\n", ref_offset(ref)); + jffs2_dbg_dump_node(c, ref_offset(ref)); + return 1; + } else { + switch(je16_to_cpu(un->nodetype) & JFFS2_COMPAT_MASK) { - case JFFS2_FEATURE_INCOMPAT: - JFFS2_ERROR("unknown INCOMPAT nodetype %#04X at %#08x\n", - je16_to_cpu(un->nodetype), ref_offset(ref)); - /* EEP */ - BUG(); - break; + case JFFS2_FEATURE_INCOMPAT: + JFFS2_ERROR("unknown INCOMPAT nodetype %#04X at %#08x\n", + je16_to_cpu(un->nodetype), ref_offset(ref)); + /* EEP */ + BUG(); + break; - case JFFS2_FEATURE_ROCOMPAT: - JFFS2_ERROR("unknown ROCOMPAT nodetype %#04X at %#08x\n", - je16_to_cpu(un->nodetype), ref_offset(ref)); - BUG_ON(!(c->flags & JFFS2_SB_FLAG_RO)); - break; + case JFFS2_FEATURE_ROCOMPAT: + JFFS2_ERROR("unknown ROCOMPAT nodetype %#04X at %#08x\n", + je16_to_cpu(un->nodetype), ref_offset(ref)); + BUG_ON(!(c->flags & JFFS2_SB_FLAG_RO)); + break; - case JFFS2_FEATURE_RWCOMPAT_COPY: - JFFS2_NOTICE("unknown RWCOMPAT_COPY nodetype %#04X at %#08x\n", - je16_to_cpu(un->nodetype), ref_offset(ref)); - break; + case JFFS2_FEATURE_RWCOMPAT_COPY: + JFFS2_NOTICE("unknown RWCOMPAT_COPY nodetype %#04X at %#08x\n", + je16_to_cpu(un->nodetype), ref_offset(ref)); + break; - case JFFS2_FEATURE_RWCOMPAT_DELETE: - JFFS2_NOTICE("unknown RWCOMPAT_DELETE nodetype %#04X at %#08x\n", - je16_to_cpu(un->nodetype), ref_offset(ref)); - return 1; + case JFFS2_FEATURE_RWCOMPAT_DELETE: + JFFS2_NOTICE("unknown RWCOMPAT_DELETE nodetype %#04X at %#08x\n", + je16_to_cpu(un->nodetype), ref_offset(ref)); + return 1; + } } return 0; @@ -450,7 +434,7 @@ static int read_more(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref, } if (retlen < len) { - JFFS2_ERROR("short read at %#08x: %zu instead of %d.\n", + JFFS2_ERROR("short read at %#08x: %d instead of %d.\n", offs, retlen, len); return -EIO; } @@ -558,25 +542,13 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf } if (retlen < len) { - JFFS2_ERROR("short read at %#08x: %zu instead of %d.\n", ref_offset(ref), retlen, len); + JFFS2_ERROR("short read at %#08x: %d instead of %d.\n", ref_offset(ref), retlen, len); err = -EIO; goto free_out; } node = (union jffs2_node_union *)bufstart; - /* No need to mask in the valid bit; it shouldn't be invalid */ - if (je32_to_cpu(node->u.hdr_crc) != crc32(0, node, sizeof(node->u)-4)) { - JFFS2_NOTICE("Node header CRC failed at %#08x. {%04x,%04x,%08x,%08x}\n", - ref_offset(ref), je16_to_cpu(node->u.magic), - je16_to_cpu(node->u.nodetype), - je32_to_cpu(node->u.totlen), - je32_to_cpu(node->u.hdr_crc)); - jffs2_dbg_dump_node(c, ref_offset(ref)); - jffs2_mark_node_obsolete(c, ref); - goto cont; - } - switch (je16_to_cpu(node->u.nodetype)) { case JFFS2_NODETYPE_DIRENT: @@ -634,7 +606,6 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf goto free_out; } - cont: spin_lock(&c->erase_completion_lock); } @@ -708,12 +679,12 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c, jffs2_mark_node_obsolete(c, fn->raw); BUG_ON(rb->rb_left); - if (rb_parent(rb) && rb_parent(rb)->rb_left == rb) { + if (rb->rb_parent && rb->rb_parent->rb_left == rb) { /* We were then left-hand child of our parent. We need * to move our own right-hand child into our place. */ repl_rb = rb->rb_right; if (repl_rb) - rb_set_parent(repl_rb, rb_parent(rb)); + repl_rb->rb_parent = rb->rb_parent; } else repl_rb = NULL; @@ -721,14 +692,14 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c, /* Remove the spent tn from the tree; don't bother rebalancing * but put our right-hand child in our own place. */ - if (rb_parent(&tn->rb)) { - if (rb_parent(&tn->rb)->rb_left == &tn->rb) - rb_parent(&tn->rb)->rb_left = repl_rb; - else if (rb_parent(&tn->rb)->rb_right == &tn->rb) - rb_parent(&tn->rb)->rb_right = repl_rb; + if (tn->rb.rb_parent) { + if (tn->rb.rb_parent->rb_left == &tn->rb) + tn->rb.rb_parent->rb_left = repl_rb; + else if (tn->rb.rb_parent->rb_right == &tn->rb) + tn->rb.rb_parent->rb_right = repl_rb; else BUG(); } else if (tn->rb.rb_right) - rb_set_parent(tn->rb.rb_right, NULL); + tn->rb.rb_right->rb_parent = NULL; jffs2_free_tmp_dnode_info(tn); if (ret) { @@ -968,8 +939,6 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f) struct jffs2_full_dirent *fd, *fds; int deleted; - jffs2_clear_acl(f); - jffs2_xattr_delete_inode(c, f->inocache); down(&f->sem); deleted = f->inocache && !f->inocache->nlink; diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index e2413466d..cf55b221f 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -65,28 +65,6 @@ static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) { return DEFAULT_EMPTY_SCAN_SIZE; } -static int file_dirty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) -{ - int ret; - - if ((ret = jffs2_prealloc_raw_node_refs(c, jeb, 1))) - return ret; - if ((ret = jffs2_scan_dirty_space(c, jeb, jeb->free_size))) - return ret; - /* Turned wasted size into dirty, since we apparently - think it's recoverable now. */ - jeb->dirty_size += jeb->wasted_size; - c->dirty_size += jeb->wasted_size; - c->wasted_size -= jeb->wasted_size; - jeb->wasted_size = 0; - if (VERYDIRTY(c, jeb->dirty_size)) { - list_add(&jeb->list, &c->very_dirty_list); - } else { - list_add(&jeb->list, &c->dirty_list); - } - return 0; -} - int jffs2_scan_medium(struct jffs2_sb_info *c) { int i, ret; @@ -192,20 +170,34 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) (!c->nextblock || c->nextblock->free_size < jeb->free_size)) { /* Better candidate for the next writes to go to */ if (c->nextblock) { - ret = file_dirty(c, c->nextblock); - if (ret) - return ret; + c->nextblock->dirty_size += c->nextblock->free_size + c->nextblock->wasted_size; + c->dirty_size += c->nextblock->free_size + c->nextblock->wasted_size; + c->free_size -= c->nextblock->free_size; + c->wasted_size -= c->nextblock->wasted_size; + c->nextblock->free_size = c->nextblock->wasted_size = 0; + if (VERYDIRTY(c, c->nextblock->dirty_size)) { + list_add(&c->nextblock->list, &c->very_dirty_list); + } else { + list_add(&c->nextblock->list, &c->dirty_list); + } /* deleting summary information of the old nextblock */ jffs2_sum_reset_collected(c->summary); } - /* update collected summary information for the current nextblock */ + /* update collected summary infromation for the current nextblock */ jffs2_sum_move_collected(c, s); D1(printk(KERN_DEBUG "jffs2_scan_medium(): new nextblock = 0x%08x\n", jeb->offset)); c->nextblock = jeb; } else { - ret = file_dirty(c, jeb); - if (ret) - return ret; + jeb->dirty_size += jeb->free_size + jeb->wasted_size; + c->dirty_size += jeb->free_size + jeb->wasted_size; + c->free_size -= jeb->free_size; + c->wasted_size -= jeb->wasted_size; + jeb->free_size = jeb->wasted_size = 0; + if (VERYDIRTY(c, jeb->dirty_size)) { + list_add(&jeb->list, &c->very_dirty_list); + } else { + list_add(&jeb->list, &c->dirty_list); + } } break; @@ -230,6 +222,9 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) } } + if (jffs2_sum_active() && s) + kfree(s); + /* Nextblock dirty is always seen as wasted, because we cannot recycle it now */ if (c->nextblock && (c->nextblock->dirty_size)) { c->nextblock->wasted_size += c->nextblock->dirty_size; @@ -247,8 +242,11 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) D1(printk(KERN_DEBUG "jffs2_scan_medium(): Skipping %d bytes in nextblock to ensure page alignment\n", skip)); - jffs2_prealloc_raw_node_refs(c, c->nextblock, 1); - jffs2_scan_dirty_space(c, c->nextblock, skip); + c->nextblock->wasted_size += skip; + c->wasted_size += skip; + + c->nextblock->free_size -= skip; + c->free_size -= skip; } #endif if (c->nr_erasing_blocks) { @@ -268,14 +266,11 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) else c->mtd->unpoint(c->mtd, flashbuf, 0, c->mtd->size); #endif - if (s) - kfree(s); - return ret; } -static int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf, - uint32_t ofs, uint32_t len) +int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf, + uint32_t ofs, uint32_t len) { int ret; size_t retlen; @@ -295,7 +290,7 @@ static int jffs2_fill_scan_buf(struct jffs2_sb_info *c, void *buf, int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) { if ((jeb->used_size + jeb->unchecked_size) == PAD(c->cleanmarker_size) && !jeb->dirty_size - && (!jeb->first_node || !ref_next(jeb->first_node)) ) + && (!jeb->first_node || !jeb->first_node->next_phys) ) return BLK_STATE_CLEANMARKER; /* move blocks with max 4 byte dirty space to cleanlist */ @@ -311,126 +306,11 @@ int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *je return BLK_STATE_ALLDIRTY; } -#ifdef CONFIG_JFFS2_FS_XATTR -static int jffs2_scan_xattr_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - struct jffs2_raw_xattr *rx, uint32_t ofs, - struct jffs2_summary *s) -{ - struct jffs2_xattr_datum *xd; - uint32_t xid, version, totlen, crc; - int err; - - crc = crc32(0, rx, sizeof(struct jffs2_raw_xattr) - 4); - if (crc != je32_to_cpu(rx->node_crc)) { - JFFS2_WARNING("node CRC failed at %#08x, read=%#08x, calc=%#08x\n", - ofs, je32_to_cpu(rx->node_crc), crc); - if ((err = jffs2_scan_dirty_space(c, jeb, je32_to_cpu(rx->totlen)))) - return err; - return 0; - } - - xid = je32_to_cpu(rx->xid); - version = je32_to_cpu(rx->version); - - totlen = PAD(sizeof(struct jffs2_raw_xattr) - + rx->name_len + 1 + je16_to_cpu(rx->value_len)); - if (totlen != je32_to_cpu(rx->totlen)) { - JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%u\n", - ofs, je32_to_cpu(rx->totlen), totlen); - if ((err = jffs2_scan_dirty_space(c, jeb, je32_to_cpu(rx->totlen)))) - return err; - return 0; - } - - xd = jffs2_setup_xattr_datum(c, xid, version); - if (IS_ERR(xd)) - return PTR_ERR(xd); - - if (xd->version > version) { - struct jffs2_raw_node_ref *raw - = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, totlen, NULL); - raw->next_in_ino = xd->node->next_in_ino; - xd->node->next_in_ino = raw; - } else { - xd->version = version; - xd->xprefix = rx->xprefix; - xd->name_len = rx->name_len; - xd->value_len = je16_to_cpu(rx->value_len); - xd->data_crc = je32_to_cpu(rx->data_crc); - - jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, totlen, (void *)xd); - } - - if (jffs2_sum_active()) - jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset); - dbg_xattr("scaning xdatum at %#08x (xid=%u, version=%u)\n", - ofs, xd->xid, xd->version); - return 0; -} - -static int jffs2_scan_xref_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - struct jffs2_raw_xref *rr, uint32_t ofs, - struct jffs2_summary *s) -{ - struct jffs2_xattr_ref *ref; - uint32_t crc; - int err; - - crc = crc32(0, rr, sizeof(*rr) - 4); - if (crc != je32_to_cpu(rr->node_crc)) { - JFFS2_WARNING("node CRC failed at %#08x, read=%#08x, calc=%#08x\n", - ofs, je32_to_cpu(rr->node_crc), crc); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(rr->totlen))))) - return err; - return 0; - } - - if (PAD(sizeof(struct jffs2_raw_xref)) != je32_to_cpu(rr->totlen)) { - JFFS2_WARNING("node length mismatch at %#08x, read=%u, calc=%zd\n", - ofs, je32_to_cpu(rr->totlen), - PAD(sizeof(struct jffs2_raw_xref))); - if ((err = jffs2_scan_dirty_space(c, jeb, je32_to_cpu(rr->totlen)))) - return err; - return 0; - } - - ref = jffs2_alloc_xattr_ref(); - if (!ref) - return -ENOMEM; - - /* BEFORE jffs2_build_xattr_subsystem() called, - * and AFTER xattr_ref is marked as a dead xref, - * ref->xid is used to store 32bit xid, xd is not used - * ref->ino is used to store 32bit inode-number, ic is not used - * Thoes variables are declared as union, thus using those - * are exclusive. In a similar way, ref->next is temporarily - * used to chain all xattr_ref object. It's re-chained to - * jffs2_inode_cache in jffs2_build_xattr_subsystem() correctly. - */ - ref->ino = je32_to_cpu(rr->ino); - ref->xid = je32_to_cpu(rr->xid); - ref->xseqno = je32_to_cpu(rr->xseqno); - if (ref->xseqno > c->highest_xseqno) - c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); - ref->next = c->xref_temp; - c->xref_temp = ref; - - jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, PAD(je32_to_cpu(rr->totlen)), (void *)ref); - - if (jffs2_sum_active()) - jffs2_sum_add_xref_mem(s, rr, ofs - jeb->offset); - dbg_xattr("scan xref at %#08x (xid=%u, ino=%u)\n", - ofs, ref->xid, ref->ino); - return 0; -} -#endif - -/* Called with 'buf_size == 0' if buf is in fact a pointer _directly_ into - the flash, XIP-style */ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - unsigned char *buf, uint32_t buf_size, struct jffs2_summary *s) { + unsigned char *buf, uint32_t buf_size, struct jffs2_summary *s) { struct jffs2_unknown_node *node; struct jffs2_unknown_node crcnode; + struct jffs2_sum_marker *sm; uint32_t ofs, prevofs; uint32_t hdr_crc, buf_ofs, buf_len; int err; @@ -464,75 +344,44 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo #endif if (jffs2_sum_active()) { - struct jffs2_sum_marker *sm; - void *sumptr = NULL; - uint32_t sumlen; - - if (!buf_size) { - /* XIP case. Just look, point at the summary if it's there */ - sm = (void *)buf + c->sector_size - sizeof(*sm); - if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { - sumptr = buf + je32_to_cpu(sm->offset); - sumlen = c->sector_size - je32_to_cpu(sm->offset); - } - } else { - /* If NAND flash, read a whole page of it. Else just the end */ - if (c->wbuf_pagesize) - buf_len = c->wbuf_pagesize; - else - buf_len = sizeof(*sm); - - /* Read as much as we want into the _end_ of the preallocated buffer */ - err = jffs2_fill_scan_buf(c, buf + buf_size - buf_len, - jeb->offset + c->sector_size - buf_len, - buf_len); - if (err) - return err; - - sm = (void *)buf + buf_size - sizeof(*sm); - if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { - sumlen = c->sector_size - je32_to_cpu(sm->offset); - sumptr = buf + buf_size - sumlen; - - /* Now, make sure the summary itself is available */ - if (sumlen > buf_size) { - /* Need to kmalloc for this. */ - sumptr = kmalloc(sumlen, GFP_KERNEL); - if (!sumptr) - return -ENOMEM; - memcpy(sumptr + sumlen - buf_len, buf + buf_size - buf_len, buf_len); - } - if (buf_len < sumlen) { - /* Need to read more so that the entire summary node is present */ - err = jffs2_fill_scan_buf(c, sumptr, - jeb->offset + c->sector_size - sumlen, - sumlen - buf_len); - if (err) - return err; - } - } - + sm = kmalloc(sizeof(struct jffs2_sum_marker), GFP_KERNEL); + if (!sm) { + return -ENOMEM; } - if (sumptr) { - err = jffs2_sum_scan_sumnode(c, jeb, sumptr, sumlen, &pseudo_random); + err = jffs2_fill_scan_buf(c, (unsigned char *) sm, jeb->offset + c->sector_size - + sizeof(struct jffs2_sum_marker), sizeof(struct jffs2_sum_marker)); + if (err) { + kfree(sm); + return err; + } - if (buf_size && sumlen > buf_size) - kfree(sumptr); - /* If it returns with a real error, bail. - If it returns positive, that's a block classification - (i.e. BLK_STATE_xxx) so return that too. - If it returns zero, fall through to full scan. */ - if (err) + if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC ) { + err = jffs2_sum_scan_sumnode(c, jeb, je32_to_cpu(sm->offset), &pseudo_random); + if (err) { + kfree(sm); return err; + } } + + kfree(sm); + + ofs = jeb->offset; + prevofs = jeb->offset - 1; } buf_ofs = jeb->offset; if (!buf_size) { - /* This is the XIP case -- we're reading _directly_ from the flash chip */ buf_len = c->sector_size; + + if (jffs2_sum_active()) { + /* must reread because of summary test */ + err = jffs2_fill_scan_buf(c, buf, buf_ofs, buf_len); + if (err) + return err; + } + } else { buf_len = EMPTY_SCAN_SIZE(c->sector_size); err = jffs2_fill_scan_buf(c, buf, buf_ofs, buf_len); @@ -569,10 +418,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo if (ofs) { D1(printk(KERN_DEBUG "Free space at %08x ends at %08x\n", jeb->offset, jeb->offset + ofs)); - if ((err = jffs2_prealloc_raw_node_refs(c, jeb, 1))) - return err; - if ((err = jffs2_scan_dirty_space(c, jeb, ofs))) - return err; + DIRTY_SPACE(ofs); } /* Now ofs is a complete physical flash offset as it always was... */ @@ -587,11 +433,6 @@ scan_more: jffs2_dbg_acct_paranoia_check_nolock(c, jeb); - /* Make sure there are node refs available for use */ - err = jffs2_prealloc_raw_node_refs(c, jeb, 2); - if (err) - return err; - cond_resched(); if (ofs & 3) { @@ -601,8 +442,7 @@ scan_more: } if (ofs == prevofs) { printk(KERN_WARNING "ofs 0x%08x has already been seen. Skipping\n", ofs); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } @@ -611,8 +451,7 @@ scan_more: if (jeb->offset + c->sector_size < ofs + sizeof(*node)) { D1(printk(KERN_DEBUG "Fewer than %zd bytes left to end of block. (%x+%x<%x+%zx) Not reading\n", sizeof(struct jffs2_unknown_node), jeb->offset, c->sector_size, ofs, sizeof(*node))); - if ((err = jffs2_scan_dirty_space(c, jeb, (jeb->offset + c->sector_size)-ofs))) - return err; + DIRTY_SPACE((jeb->offset + c->sector_size)-ofs); break; } @@ -642,8 +481,7 @@ scan_more: if (*(uint32_t *)(&buf[inbuf_ofs]) != 0xffffffff) { printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n", empty_start, ofs); - if ((err = jffs2_scan_dirty_space(c, jeb, ofs-empty_start))) - return err; + DIRTY_SPACE(ofs-empty_start); goto scan_more; } @@ -656,7 +494,7 @@ scan_more: /* If we're only checking the beginning of a block with a cleanmarker, bail now */ if (buf_ofs == jeb->offset && jeb->used_size == PAD(c->cleanmarker_size) && - c->cleanmarker_size && !jeb->dirty_size && !ref_next(jeb->first_node)) { + c->cleanmarker_size && !jeb->dirty_size && !jeb->first_node->next_phys) { D1(printk(KERN_DEBUG "%d bytes at start of block seems clean... assuming all clean\n", EMPTY_SCAN_SIZE(c->sector_size))); return BLK_STATE_CLEANMARKER; } @@ -680,23 +518,20 @@ scan_more: if (ofs == jeb->offset && je16_to_cpu(node->magic) == KSAMTIB_CIGAM_2SFFJ) { printk(KERN_WARNING "Magic bitmask is backwards at offset 0x%08x. Wrong endian filesystem?\n", ofs); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } if (je16_to_cpu(node->magic) == JFFS2_DIRTY_BITMASK) { D1(printk(KERN_DEBUG "Dirty bitmask at 0x%08x\n", ofs)); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } if (je16_to_cpu(node->magic) == JFFS2_OLD_MAGIC_BITMASK) { printk(KERN_WARNING "Old JFFS2 bitmask found at 0x%08x\n", ofs); printk(KERN_WARNING "You cannot use older JFFS2 filesystems with newer kernels\n"); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } @@ -705,8 +540,7 @@ scan_more: noisy_printk(&noise, "jffs2_scan_eraseblock(): Magic bitmask 0x%04x not found at 0x%08x: 0x%04x instead\n", JFFS2_MAGIC_BITMASK, ofs, je16_to_cpu(node->magic)); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } @@ -723,8 +557,7 @@ scan_more: je32_to_cpu(node->totlen), je32_to_cpu(node->hdr_crc), hdr_crc); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } @@ -735,8 +568,7 @@ scan_more: printk(KERN_WARNING "Node at 0x%08x with length 0x%08x would run over the end of the erase block\n", ofs, je32_to_cpu(node->totlen)); printk(KERN_WARNING "Perhaps the file system was created with the wrong erase size?\n"); - if ((err = jffs2_scan_dirty_space(c, jeb, 4))) - return err; + DIRTY_SPACE(4); ofs += 4; continue; } @@ -744,8 +576,7 @@ scan_more: if (!(je16_to_cpu(node->nodetype) & JFFS2_NODE_ACCURATE)) { /* Wheee. This is an obsoleted node */ D2(printk(KERN_DEBUG "Node at 0x%08x is obsolete. Skipping\n", ofs)); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); ofs += PAD(je32_to_cpu(node->totlen)); continue; } @@ -783,59 +614,30 @@ scan_more: ofs += PAD(je32_to_cpu(node->totlen)); break; -#ifdef CONFIG_JFFS2_FS_XATTR - case JFFS2_NODETYPE_XATTR: - if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { - buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); - D1(printk(KERN_DEBUG "Fewer than %d bytes (xattr node)" - " left to end of buf. Reading 0x%x at 0x%08x\n", - je32_to_cpu(node->totlen), buf_len, ofs)); - err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); - if (err) - return err; - buf_ofs = ofs; - node = (void *)buf; - } - err = jffs2_scan_xattr_node(c, jeb, (void *)node, ofs, s); - if (err) - return err; - ofs += PAD(je32_to_cpu(node->totlen)); - break; - case JFFS2_NODETYPE_XREF: - if (buf_ofs + buf_len < ofs + je32_to_cpu(node->totlen)) { - buf_len = min_t(uint32_t, buf_size, jeb->offset + c->sector_size - ofs); - D1(printk(KERN_DEBUG "Fewer than %d bytes (xref node)" - " left to end of buf. Reading 0x%x at 0x%08x\n", - je32_to_cpu(node->totlen), buf_len, ofs)); - err = jffs2_fill_scan_buf(c, buf, ofs, buf_len); - if (err) - return err; - buf_ofs = ofs; - node = (void *)buf; - } - err = jffs2_scan_xref_node(c, jeb, (void *)node, ofs, s); - if (err) - return err; - ofs += PAD(je32_to_cpu(node->totlen)); - break; -#endif /* CONFIG_JFFS2_FS_XATTR */ - case JFFS2_NODETYPE_CLEANMARKER: D1(printk(KERN_DEBUG "CLEANMARKER node found at 0x%08x\n", ofs)); if (je32_to_cpu(node->totlen) != c->cleanmarker_size) { printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x has totlen 0x%x != normal 0x%x\n", ofs, je32_to_cpu(node->totlen), c->cleanmarker_size); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(sizeof(struct jffs2_unknown_node))))) - return err; + DIRTY_SPACE(PAD(sizeof(struct jffs2_unknown_node))); ofs += PAD(sizeof(struct jffs2_unknown_node)); } else if (jeb->first_node) { printk(KERN_NOTICE "CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n", ofs, jeb->offset); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(sizeof(struct jffs2_unknown_node))))) - return err; + DIRTY_SPACE(PAD(sizeof(struct jffs2_unknown_node))); ofs += PAD(sizeof(struct jffs2_unknown_node)); } else { - jffs2_link_node_ref(c, jeb, ofs | REF_NORMAL, c->cleanmarker_size, NULL); + struct jffs2_raw_node_ref *marker_ref = jffs2_alloc_raw_node_ref(); + if (!marker_ref) { + printk(KERN_NOTICE "Failed to allocate node ref for clean marker\n"); + return -ENOMEM; + } + marker_ref->next_in_ino = NULL; + marker_ref->next_phys = NULL; + marker_ref->flash_offset = ofs | REF_NORMAL; + marker_ref->__totlen = c->cleanmarker_size; + jeb->first_node = jeb->last_node = marker_ref; + USED_SPACE(PAD(c->cleanmarker_size)); ofs += PAD(c->cleanmarker_size); } break; @@ -843,8 +645,7 @@ scan_more: case JFFS2_NODETYPE_PADDING: if (jffs2_sum_active()) jffs2_sum_add_padding_mem(s, je32_to_cpu(node->totlen)); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); ofs += PAD(je32_to_cpu(node->totlen)); break; @@ -855,8 +656,7 @@ scan_more: c->flags |= JFFS2_SB_FLAG_RO; if (!(jffs2_is_readonly(c))) return -EROFS; - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); ofs += PAD(je32_to_cpu(node->totlen)); break; @@ -866,21 +666,15 @@ scan_more: case JFFS2_FEATURE_RWCOMPAT_DELETE: D1(printk(KERN_NOTICE "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_cpu(node->nodetype), ofs)); - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(node->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(node->totlen))); ofs += PAD(je32_to_cpu(node->totlen)); break; - case JFFS2_FEATURE_RWCOMPAT_COPY: { + case JFFS2_FEATURE_RWCOMPAT_COPY: D1(printk(KERN_NOTICE "Unknown but compatible feature node (0x%04x) found at offset 0x%08x\n", je16_to_cpu(node->nodetype), ofs)); - - jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, PAD(je32_to_cpu(node->totlen)), NULL); - - /* We can't summarise nodes we don't grok */ - jffs2_sum_disable_collecting(s); + USED_SPACE(PAD(je32_to_cpu(node->totlen))); ofs += PAD(je32_to_cpu(node->totlen)); break; - } } } } @@ -893,9 +687,9 @@ scan_more: } } - D1(printk(KERN_DEBUG "Block at 0x%08x: free 0x%08x, dirty 0x%08x, unchecked 0x%08x, used 0x%08x, wasted 0x%08x\n", - jeb->offset,jeb->free_size, jeb->dirty_size, jeb->unchecked_size, jeb->used_size, jeb->wasted_size)); - + D1(printk(KERN_DEBUG "Block at 0x%08x: free 0x%08x, dirty 0x%08x, unchecked 0x%08x, used 0x%08x\n", jeb->offset, + jeb->free_size, jeb->dirty_size, jeb->unchecked_size, jeb->used_size)); + /* mark_node_obsolete can add to wasted !! */ if (jeb->wasted_size) { jeb->dirty_size += jeb->wasted_size; @@ -936,9 +730,9 @@ struct jffs2_inode_cache *jffs2_scan_make_ino_cache(struct jffs2_sb_info *c, uin static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, struct jffs2_raw_inode *ri, uint32_t ofs, struct jffs2_summary *s) { + struct jffs2_raw_node_ref *raw; struct jffs2_inode_cache *ic; uint32_t ino = je32_to_cpu(ri->ino); - int err; D1(printk(KERN_DEBUG "jffs2_scan_inode_node(): Node at 0x%08x\n", ofs)); @@ -951,6 +745,12 @@ static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_erasebloc Which means that the _full_ amount of time to get to proper write mode with GC operational may actually be _longer_ than before. Sucks to be me. */ + raw = jffs2_alloc_raw_node_ref(); + if (!raw) { + printk(KERN_NOTICE "jffs2_scan_inode_node(): allocation of node reference failed\n"); + return -ENOMEM; + } + ic = jffs2_get_ino_cache(c, ino); if (!ic) { /* Inocache get failed. Either we read a bogus ino# or it's just genuinely the @@ -962,17 +762,30 @@ static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_erasebloc printk(KERN_NOTICE "jffs2_scan_inode_node(): CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n", ofs, je32_to_cpu(ri->node_crc), crc); /* We believe totlen because the CRC on the node _header_ was OK, just the node itself failed. */ - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(ri->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(ri->totlen))); + jffs2_free_raw_node_ref(raw); return 0; } ic = jffs2_scan_make_ino_cache(c, ino); - if (!ic) + if (!ic) { + jffs2_free_raw_node_ref(raw); return -ENOMEM; + } } /* Wheee. It worked */ - jffs2_link_node_ref(c, jeb, ofs | REF_UNCHECKED, PAD(je32_to_cpu(ri->totlen)), ic); + + raw->flash_offset = ofs | REF_UNCHECKED; + raw->__totlen = PAD(je32_to_cpu(ri->totlen)); + raw->next_phys = NULL; + raw->next_in_ino = ic->nodes; + + ic->nodes = raw; + if (!jeb->first_node) + jeb->first_node = raw; + if (jeb->last_node) + jeb->last_node->next_phys = raw; + jeb->last_node = raw; D1(printk(KERN_DEBUG "Node is ino #%u, version %d. Range 0x%x-0x%x\n", je32_to_cpu(ri->ino), je32_to_cpu(ri->version), @@ -981,6 +794,8 @@ static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_erasebloc pseudo_random += je32_to_cpu(ri->version); + UNCHECKED_SPACE(PAD(je32_to_cpu(ri->totlen))); + if (jffs2_sum_active()) { jffs2_sum_add_inode_mem(s, ri, ofs - jeb->offset); } @@ -991,10 +806,10 @@ static int jffs2_scan_inode_node(struct jffs2_sb_info *c, struct jffs2_erasebloc static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, struct jffs2_raw_dirent *rd, uint32_t ofs, struct jffs2_summary *s) { + struct jffs2_raw_node_ref *raw; struct jffs2_full_dirent *fd; struct jffs2_inode_cache *ic; uint32_t crc; - int err; D1(printk(KERN_DEBUG "jffs2_scan_dirent_node(): Node at 0x%08x\n", ofs)); @@ -1006,8 +821,7 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo printk(KERN_NOTICE "jffs2_scan_dirent_node(): Node CRC failed on node at 0x%08x: Read 0x%08x, calculated 0x%08x\n", ofs, je32_to_cpu(rd->node_crc), crc); /* We believe totlen because the CRC on the node _header_ was OK, just the node itself failed. */ - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(rd->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(rd->totlen))); return 0; } @@ -1028,23 +842,40 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo jffs2_free_full_dirent(fd); /* FIXME: Why do we believe totlen? */ /* We believe totlen because the CRC on the node _header_ was OK, just the name failed. */ - if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(rd->totlen))))) - return err; + DIRTY_SPACE(PAD(je32_to_cpu(rd->totlen))); return 0; } + raw = jffs2_alloc_raw_node_ref(); + if (!raw) { + jffs2_free_full_dirent(fd); + printk(KERN_NOTICE "jffs2_scan_dirent_node(): allocation of node reference failed\n"); + return -ENOMEM; + } ic = jffs2_scan_make_ino_cache(c, je32_to_cpu(rd->pino)); if (!ic) { jffs2_free_full_dirent(fd); + jffs2_free_raw_node_ref(raw); return -ENOMEM; } - fd->raw = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, PAD(je32_to_cpu(rd->totlen)), ic); + raw->__totlen = PAD(je32_to_cpu(rd->totlen)); + raw->flash_offset = ofs | REF_PRISTINE; + raw->next_phys = NULL; + raw->next_in_ino = ic->nodes; + ic->nodes = raw; + if (!jeb->first_node) + jeb->first_node = raw; + if (jeb->last_node) + jeb->last_node->next_phys = raw; + jeb->last_node = raw; + fd->raw = raw; fd->next = NULL; fd->version = je32_to_cpu(rd->version); fd->ino = je32_to_cpu(rd->ino); fd->nhash = full_name_hash(fd->name, rd->nsize); fd->type = rd->type; + USED_SPACE(PAD(je32_to_cpu(rd->totlen))); jffs2_add_fd_to_list(c, fd, &ic->scan_dents); if (jffs2_sum_active()) { diff --git a/fs/jffs2/security.c b/fs/jffs2/security.c deleted file mode 100644 index 52a9894a6..000000000 --- a/fs/jffs2/security.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "nodelist.h" - -/* ---- Initial Security Label Attachment -------------- */ -int jffs2_init_security(struct inode *inode, struct inode *dir) -{ - int rc; - size_t len; - void *value; - char *name; - - rc = security_inode_init_security(inode, dir, &name, &value, &len); - if (rc) { - if (rc == -EOPNOTSUPP) - return 0; - return rc; - } - rc = do_jffs2_setxattr(inode, JFFS2_XPREFIX_SECURITY, name, value, len, 0); - - kfree(name); - kfree(value); - return rc; -} - -/* ---- XATTR Handler for "security.*" ----------------- */ -static int jffs2_security_getxattr(struct inode *inode, const char *name, - void *buffer, size_t size) -{ - if (!strcmp(name, "")) - return -EINVAL; - - return do_jffs2_getxattr(inode, JFFS2_XPREFIX_SECURITY, name, buffer, size); -} - -static int jffs2_security_setxattr(struct inode *inode, const char *name, const void *buffer, - size_t size, int flags) -{ - if (!strcmp(name, "")) - return -EINVAL; - - return do_jffs2_setxattr(inode, JFFS2_XPREFIX_SECURITY, name, buffer, size, flags); -} - -static size_t jffs2_security_listxattr(struct inode *inode, char *list, size_t list_size, - const char *name, size_t name_len) -{ - size_t retlen = XATTR_SECURITY_PREFIX_LEN + name_len + 1; - - if (list && retlen <= list_size) { - strcpy(list, XATTR_SECURITY_PREFIX); - strcpy(list + XATTR_SECURITY_PREFIX_LEN, name); - } - - return retlen; -} - -struct xattr_handler jffs2_security_xattr_handler = { - .prefix = XATTR_SECURITY_PREFIX, - .list = jffs2_security_listxattr, - .set = jffs2_security_setxattr, - .get = jffs2_security_getxattr -}; diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index e52cef526..fb9cec61f 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -5,7 +5,6 @@ * Zoltan Sogor , * Patrik Kluba , * University of Szeged, Hungary - * 2006 KaiGai Kohei * * For licensing information, see the file 'LICENCE' in this directory. * @@ -43,7 +42,7 @@ int jffs2_sum_init(struct jffs2_sb_info *c) return -ENOMEM; } - dbg_summary("returned successfully\n"); + dbg_summary("returned succesfully\n"); return 0; } @@ -82,19 +81,6 @@ static int jffs2_sum_add_mem(struct jffs2_summary *s, union jffs2_sum_mem *item) dbg_summary("dirent (%u) added to summary\n", je32_to_cpu(item->d.ino)); break; -#ifdef CONFIG_JFFS2_FS_XATTR - case JFFS2_NODETYPE_XATTR: - s->sum_size += JFFS2_SUMMARY_XATTR_SIZE; - s->sum_num++; - dbg_summary("xattr (xid=%u, version=%u) added to summary\n", - je32_to_cpu(item->x.xid), je32_to_cpu(item->x.version)); - break; - case JFFS2_NODETYPE_XREF: - s->sum_size += JFFS2_SUMMARY_XREF_SIZE; - s->sum_num++; - dbg_summary("xref added to summary\n"); - break; -#endif default: JFFS2_WARNING("UNKNOWN node type %u\n", je16_to_cpu(item->u.nodetype)); @@ -155,40 +141,6 @@ int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *r return jffs2_sum_add_mem(s, (union jffs2_sum_mem *)temp); } -#ifdef CONFIG_JFFS2_FS_XATTR -int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs) -{ - struct jffs2_sum_xattr_mem *temp; - - temp = kmalloc(sizeof(struct jffs2_sum_xattr_mem), GFP_KERNEL); - if (!temp) - return -ENOMEM; - - temp->nodetype = rx->nodetype; - temp->xid = rx->xid; - temp->version = rx->version; - temp->offset = cpu_to_je32(ofs); - temp->totlen = rx->totlen; - temp->next = NULL; - - return jffs2_sum_add_mem(s, (union jffs2_sum_mem *)temp); -} - -int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs) -{ - struct jffs2_sum_xref_mem *temp; - - temp = kmalloc(sizeof(struct jffs2_sum_xref_mem), GFP_KERNEL); - if (!temp) - return -ENOMEM; - - temp->nodetype = rr->nodetype; - temp->offset = cpu_to_je32(ofs); - temp->next = NULL; - - return jffs2_sum_add_mem(s, (union jffs2_sum_mem *)temp); -} -#endif /* Cleanup every collected summary information */ static void jffs2_sum_clean_collected(struct jffs2_summary *s) @@ -252,11 +204,6 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, union jffs2_node_union *node; struct jffs2_eraseblock *jeb; - if (c->summary->sum_size == JFFS2_SUMMARY_NOSUM_SIZE) { - dbg_summary("Summary is disabled for this jeb! Skipping summary info!\n"); - return 0; - } - node = invecs[0].iov_base; jeb = &c->blocks[ofs / c->sector_size]; ofs -= jeb->offset; @@ -312,34 +259,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp); } -#ifdef CONFIG_JFFS2_FS_XATTR - case JFFS2_NODETYPE_XATTR: { - struct jffs2_sum_xattr_mem *temp; - temp = kmalloc(sizeof(struct jffs2_sum_xattr_mem), GFP_KERNEL); - if (!temp) - goto no_mem; - - temp->nodetype = node->x.nodetype; - temp->xid = node->x.xid; - temp->version = node->x.version; - temp->totlen = node->x.totlen; - temp->offset = cpu_to_je32(ofs); - temp->next = NULL; - - return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp); - } - case JFFS2_NODETYPE_XREF: { - struct jffs2_sum_xref_mem *temp; - temp = kmalloc(sizeof(struct jffs2_sum_xref_mem), GFP_KERNEL); - if (!temp) - goto no_mem; - temp->nodetype = node->r.nodetype; - temp->offset = cpu_to_je32(ofs); - temp->next = NULL; - return jffs2_sum_add_mem(c->summary, (union jffs2_sum_mem *)temp); - } -#endif case JFFS2_NODETYPE_PADDING: dbg_summary("node PADDING\n"); c->summary->sum_padded += je32_to_cpu(node->u.totlen); @@ -368,41 +288,23 @@ no_mem: return -ENOMEM; } -static struct jffs2_raw_node_ref *sum_link_node_ref(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, - uint32_t ofs, uint32_t len, - struct jffs2_inode_cache *ic) -{ - /* If there was a gap, mark it dirty */ - if ((ofs & ~3) > c->sector_size - jeb->free_size) { - /* Ew. Summary doesn't actually tell us explicitly about dirty space */ - jffs2_scan_dirty_space(c, jeb, (ofs & ~3) - (c->sector_size - jeb->free_size)); - } - - return jffs2_link_node_ref(c, jeb, jeb->offset + ofs, len, ic); -} /* Process the stored summary information - helper function for jffs2_sum_scan_sumnode() */ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, struct jffs2_raw_summary *summary, uint32_t *pseudo_random) { + struct jffs2_raw_node_ref *raw; struct jffs2_inode_cache *ic; struct jffs2_full_dirent *fd; void *sp; int i, ino; - int err; sp = summary->sum; for (i=0; isum_num); i++) { dbg_summary("processing summary index %d\n", i); - /* Make sure there's a spare ref for dirty space */ - err = jffs2_prealloc_raw_node_refs(c, jeb, 2); - if (err) - return err; - switch (je16_to_cpu(((struct jffs2_sum_unknown_flash *)sp)->nodetype)) { case JFFS2_NODETYPE_INODE: { struct jffs2_sum_inode_flash *spi; @@ -410,21 +312,39 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras ino = je32_to_cpu(spi->inode); - dbg_summary("Inode at 0x%08x-0x%08x\n", - jeb->offset + je32_to_cpu(spi->offset), - jeb->offset + je32_to_cpu(spi->offset) + je32_to_cpu(spi->totlen)); + dbg_summary("Inode at 0x%08x\n", + jeb->offset + je32_to_cpu(spi->offset)); + + raw = jffs2_alloc_raw_node_ref(); + if (!raw) { + JFFS2_NOTICE("allocation of node reference failed\n"); + kfree(summary); + return -ENOMEM; + } ic = jffs2_scan_make_ino_cache(c, ino); if (!ic) { JFFS2_NOTICE("scan_make_ino_cache failed\n"); + jffs2_free_raw_node_ref(raw); + kfree(summary); return -ENOMEM; } - sum_link_node_ref(c, jeb, je32_to_cpu(spi->offset) | REF_UNCHECKED, - PAD(je32_to_cpu(spi->totlen)), ic); - + raw->flash_offset = (jeb->offset + je32_to_cpu(spi->offset)) | REF_UNCHECKED; + raw->__totlen = PAD(je32_to_cpu(spi->totlen)); + raw->next_phys = NULL; + raw->next_in_ino = ic->nodes; + + ic->nodes = raw; + if (!jeb->first_node) + jeb->first_node = raw; + if (jeb->last_node) + jeb->last_node->next_phys = raw; + jeb->last_node = raw; *pseudo_random += je32_to_cpu(spi->version); + UNCHECKED_SPACE(PAD(je32_to_cpu(spi->totlen))); + sp += JFFS2_SUMMARY_INODE_SIZE; break; @@ -434,33 +354,52 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras struct jffs2_sum_dirent_flash *spd; spd = sp; - dbg_summary("Dirent at 0x%08x-0x%08x\n", - jeb->offset + je32_to_cpu(spd->offset), - jeb->offset + je32_to_cpu(spd->offset) + je32_to_cpu(spd->totlen)); - + dbg_summary("Dirent at 0x%08x\n", + jeb->offset + je32_to_cpu(spd->offset)); fd = jffs2_alloc_full_dirent(spd->nsize+1); - if (!fd) + if (!fd) { + kfree(summary); return -ENOMEM; + } memcpy(&fd->name, spd->name, spd->nsize); fd->name[spd->nsize] = 0; + raw = jffs2_alloc_raw_node_ref(); + if (!raw) { + jffs2_free_full_dirent(fd); + JFFS2_NOTICE("allocation of node reference failed\n"); + kfree(summary); + return -ENOMEM; + } + ic = jffs2_scan_make_ino_cache(c, je32_to_cpu(spd->pino)); if (!ic) { jffs2_free_full_dirent(fd); + jffs2_free_raw_node_ref(raw); + kfree(summary); return -ENOMEM; } - fd->raw = sum_link_node_ref(c, jeb, je32_to_cpu(spd->offset) | REF_UNCHECKED, - PAD(je32_to_cpu(spd->totlen)), ic); - + raw->__totlen = PAD(je32_to_cpu(spd->totlen)); + raw->flash_offset = (jeb->offset + je32_to_cpu(spd->offset)) | REF_PRISTINE; + raw->next_phys = NULL; + raw->next_in_ino = ic->nodes; + ic->nodes = raw; + if (!jeb->first_node) + jeb->first_node = raw; + if (jeb->last_node) + jeb->last_node->next_phys = raw; + jeb->last_node = raw; + + fd->raw = raw; fd->next = NULL; fd->version = je32_to_cpu(spd->version); fd->ino = je32_to_cpu(spd->ino); fd->nhash = full_name_hash(fd->name, spd->nsize); fd->type = spd->type; - + USED_SPACE(PAD(je32_to_cpu(spd->totlen))); jffs2_add_fd_to_list(c, fd, &ic->scan_dents); *pseudo_random += je32_to_cpu(spd->version); @@ -469,100 +408,48 @@ static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eras break; } -#ifdef CONFIG_JFFS2_FS_XATTR - case JFFS2_NODETYPE_XATTR: { - struct jffs2_xattr_datum *xd; - struct jffs2_sum_xattr_flash *spx; - - spx = (struct jffs2_sum_xattr_flash *)sp; - dbg_summary("xattr at %#08x-%#08x (xid=%u, version=%u)\n", - jeb->offset + je32_to_cpu(spx->offset), - jeb->offset + je32_to_cpu(spx->offset) + je32_to_cpu(spx->totlen), - je32_to_cpu(spx->xid), je32_to_cpu(spx->version)); - - xd = jffs2_setup_xattr_datum(c, je32_to_cpu(spx->xid), - je32_to_cpu(spx->version)); - if (IS_ERR(xd)) - return PTR_ERR(xd); - if (xd->version > je32_to_cpu(spx->version)) { - /* node is not the newest one */ - struct jffs2_raw_node_ref *raw - = sum_link_node_ref(c, jeb, je32_to_cpu(spx->offset) | REF_UNCHECKED, - PAD(je32_to_cpu(spx->totlen)), NULL); - raw->next_in_ino = xd->node->next_in_ino; - xd->node->next_in_ino = raw; - } else { - xd->version = je32_to_cpu(spx->version); - sum_link_node_ref(c, jeb, je32_to_cpu(spx->offset) | REF_UNCHECKED, - PAD(je32_to_cpu(spx->totlen)), (void *)xd); - } - *pseudo_random += je32_to_cpu(spx->xid); - sp += JFFS2_SUMMARY_XATTR_SIZE; - - break; - } - case JFFS2_NODETYPE_XREF: { - struct jffs2_xattr_ref *ref; - struct jffs2_sum_xref_flash *spr; - - spr = (struct jffs2_sum_xref_flash *)sp; - dbg_summary("xref at %#08x-%#08x\n", - jeb->offset + je32_to_cpu(spr->offset), - jeb->offset + je32_to_cpu(spr->offset) + - (uint32_t)PAD(sizeof(struct jffs2_raw_xref))); - - ref = jffs2_alloc_xattr_ref(); - if (!ref) { - JFFS2_NOTICE("allocation of xattr_datum failed\n"); - return -ENOMEM; - } - ref->next = c->xref_temp; - c->xref_temp = ref; - sum_link_node_ref(c, jeb, je32_to_cpu(spr->offset) | REF_UNCHECKED, - PAD(sizeof(struct jffs2_raw_xref)), (void *)ref); - - *pseudo_random += ref->node->flash_offset; - sp += JFFS2_SUMMARY_XREF_SIZE; - - break; - } -#endif default : { - uint16_t nodetype = je16_to_cpu(((struct jffs2_sum_unknown_flash *)sp)->nodetype); - JFFS2_WARNING("Unsupported node type %x found in summary! Exiting...\n", nodetype); - if ((nodetype & JFFS2_COMPAT_MASK) == JFFS2_FEATURE_INCOMPAT) - return -EIO; - - /* For compatible node types, just fall back to the full scan */ - c->wasted_size -= jeb->wasted_size; - c->free_size += c->sector_size - jeb->free_size; - c->used_size -= jeb->used_size; - c->dirty_size -= jeb->dirty_size; - jeb->wasted_size = jeb->used_size = jeb->dirty_size = 0; - jeb->free_size = c->sector_size; - - jffs2_free_jeb_node_refs(c, jeb); - return -ENOTRECOVERABLE; + JFFS2_WARNING("Unsupported node type found in summary! Exiting..."); + kfree(summary); + return -EIO; } } } + + kfree(summary); return 0; } /* Process the summary node - called from jffs2_scan_eraseblock() */ + int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - struct jffs2_raw_summary *summary, uint32_t sumsize, - uint32_t *pseudo_random) + uint32_t ofs, uint32_t *pseudo_random) { struct jffs2_unknown_node crcnode; - int ret, ofs; + struct jffs2_raw_node_ref *cache_ref; + struct jffs2_raw_summary *summary; + int ret, sumsize; uint32_t crc; - ofs = c->sector_size - sumsize; + sumsize = c->sector_size - ofs; + ofs += jeb->offset; dbg_summary("summary found for 0x%08x at 0x%08x (0x%x bytes)\n", - jeb->offset, jeb->offset + ofs, sumsize); + jeb->offset, ofs, sumsize); + + summary = kmalloc(sumsize, GFP_KERNEL); + + if (!summary) { + return -ENOMEM; + } + + ret = jffs2_fill_scan_buf(c, (unsigned char *)summary, ofs, sumsize); + + if (ret) { + kfree(summary); + return ret; + } /* OK, now check for node validity and CRC */ crcnode.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); @@ -599,50 +486,67 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb dbg_summary("Summary : CLEANMARKER node \n"); - ret = jffs2_prealloc_raw_node_refs(c, jeb, 1); - if (ret) - return ret; - if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) { dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n", je32_to_cpu(summary->cln_mkr), c->cleanmarker_size); - if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) - return ret; + UNCHECKED_SPACE(PAD(je32_to_cpu(summary->cln_mkr))); } else if (jeb->first_node) { dbg_summary("CLEANMARKER node not first node in block " "(0x%08x)\n", jeb->offset); - if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) - return ret; + UNCHECKED_SPACE(PAD(je32_to_cpu(summary->cln_mkr))); } else { - jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL, - je32_to_cpu(summary->cln_mkr), NULL); + struct jffs2_raw_node_ref *marker_ref = jffs2_alloc_raw_node_ref(); + + if (!marker_ref) { + JFFS2_NOTICE("Failed to allocate node ref for clean marker\n"); + kfree(summary); + return -ENOMEM; + } + + marker_ref->next_in_ino = NULL; + marker_ref->next_phys = NULL; + marker_ref->flash_offset = jeb->offset | REF_NORMAL; + marker_ref->__totlen = je32_to_cpu(summary->cln_mkr); + jeb->first_node = jeb->last_node = marker_ref; + + USED_SPACE( PAD(je32_to_cpu(summary->cln_mkr)) ); } } - ret = jffs2_sum_process_sum_data(c, jeb, summary, pseudo_random); - /* -ENOTRECOVERABLE isn't a fatal error -- it means we should do a full - scan of this eraseblock. So return zero */ - if (ret == -ENOTRECOVERABLE) - return 0; - if (ret) - return ret; /* real error */ + if (je32_to_cpu(summary->padded)) { + DIRTY_SPACE(je32_to_cpu(summary->padded)); + } - /* for PARANOIA_CHECK */ - ret = jffs2_prealloc_raw_node_refs(c, jeb, 2); + ret = jffs2_sum_process_sum_data(c, jeb, summary, pseudo_random); if (ret) return ret; - sum_link_node_ref(c, jeb, ofs | REF_NORMAL, sumsize, NULL); + /* for PARANOIA_CHECK */ + cache_ref = jffs2_alloc_raw_node_ref(); - if (unlikely(jeb->free_size)) { - JFFS2_WARNING("Free size 0x%x bytes in eraseblock @0x%08x with summary?\n", - jeb->free_size, jeb->offset); - jeb->wasted_size += jeb->free_size; - c->wasted_size += jeb->free_size; - c->free_size -= jeb->free_size; - jeb->free_size = 0; + if (!cache_ref) { + JFFS2_NOTICE("Failed to allocate node ref for cache\n"); + return -ENOMEM; } + cache_ref->next_in_ino = NULL; + cache_ref->next_phys = NULL; + cache_ref->flash_offset = ofs | REF_NORMAL; + cache_ref->__totlen = sumsize; + + if (!jeb->first_node) + jeb->first_node = cache_ref; + if (jeb->last_node) + jeb->last_node->next_phys = cache_ref; + jeb->last_node = cache_ref; + + USED_SPACE(sumsize); + + jeb->wasted_size += jeb->free_size; + c->wasted_size += jeb->free_size; + c->free_size -= jeb->free_size; + jeb->free_size = 0; + return jffs2_scan_classify_jeb(c, jeb); crc_err: @@ -660,7 +564,6 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock union jffs2_sum_mem *temp; struct jffs2_sum_marker *sm; struct kvec vecs[2]; - uint32_t sum_ofs; void *wpage; int ret; size_t retlen; @@ -678,17 +581,16 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock wpage = c->summary->sum_buf; while (c->summary->sum_num) { - temp = c->summary->sum_list_head; - switch (je16_to_cpu(temp->u.nodetype)) { + switch (je16_to_cpu(c->summary->sum_list_head->u.nodetype)) { case JFFS2_NODETYPE_INODE: { struct jffs2_sum_inode_flash *sino_ptr = wpage; - sino_ptr->nodetype = temp->i.nodetype; - sino_ptr->inode = temp->i.inode; - sino_ptr->version = temp->i.version; - sino_ptr->offset = temp->i.offset; - sino_ptr->totlen = temp->i.totlen; + sino_ptr->nodetype = c->summary->sum_list_head->i.nodetype; + sino_ptr->inode = c->summary->sum_list_head->i.inode; + sino_ptr->version = c->summary->sum_list_head->i.version; + sino_ptr->offset = c->summary->sum_list_head->i.offset; + sino_ptr->totlen = c->summary->sum_list_head->i.totlen; wpage += JFFS2_SUMMARY_INODE_SIZE; @@ -698,60 +600,30 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock case JFFS2_NODETYPE_DIRENT: { struct jffs2_sum_dirent_flash *sdrnt_ptr = wpage; - sdrnt_ptr->nodetype = temp->d.nodetype; - sdrnt_ptr->totlen = temp->d.totlen; - sdrnt_ptr->offset = temp->d.offset; - sdrnt_ptr->pino = temp->d.pino; - sdrnt_ptr->version = temp->d.version; - sdrnt_ptr->ino = temp->d.ino; - sdrnt_ptr->nsize = temp->d.nsize; - sdrnt_ptr->type = temp->d.type; + sdrnt_ptr->nodetype = c->summary->sum_list_head->d.nodetype; + sdrnt_ptr->totlen = c->summary->sum_list_head->d.totlen; + sdrnt_ptr->offset = c->summary->sum_list_head->d.offset; + sdrnt_ptr->pino = c->summary->sum_list_head->d.pino; + sdrnt_ptr->version = c->summary->sum_list_head->d.version; + sdrnt_ptr->ino = c->summary->sum_list_head->d.ino; + sdrnt_ptr->nsize = c->summary->sum_list_head->d.nsize; + sdrnt_ptr->type = c->summary->sum_list_head->d.type; - memcpy(sdrnt_ptr->name, temp->d.name, - temp->d.nsize); + memcpy(sdrnt_ptr->name, c->summary->sum_list_head->d.name, + c->summary->sum_list_head->d.nsize); - wpage += JFFS2_SUMMARY_DIRENT_SIZE(temp->d.nsize); + wpage += JFFS2_SUMMARY_DIRENT_SIZE(c->summary->sum_list_head->d.nsize); break; } -#ifdef CONFIG_JFFS2_FS_XATTR - case JFFS2_NODETYPE_XATTR: { - struct jffs2_sum_xattr_flash *sxattr_ptr = wpage; - - temp = c->summary->sum_list_head; - sxattr_ptr->nodetype = temp->x.nodetype; - sxattr_ptr->xid = temp->x.xid; - sxattr_ptr->version = temp->x.version; - sxattr_ptr->offset = temp->x.offset; - sxattr_ptr->totlen = temp->x.totlen; - - wpage += JFFS2_SUMMARY_XATTR_SIZE; - break; - } - case JFFS2_NODETYPE_XREF: { - struct jffs2_sum_xref_flash *sxref_ptr = wpage; - temp = c->summary->sum_list_head; - sxref_ptr->nodetype = temp->r.nodetype; - sxref_ptr->offset = temp->r.offset; - - wpage += JFFS2_SUMMARY_XREF_SIZE; - break; - } -#endif default : { - if ((je16_to_cpu(temp->u.nodetype) & JFFS2_COMPAT_MASK) - == JFFS2_FEATURE_RWCOMPAT_COPY) { - dbg_summary("Writing unknown RWCOMPAT_COPY node type %x\n", - je16_to_cpu(temp->u.nodetype)); - jffs2_sum_disable_collecting(c->summary); - } else { - BUG(); /* unknown node in summary information */ - } + BUG(); /* unknown node in summary information */ } } - c->summary->sum_list_head = temp->u.next; + temp = c->summary->sum_list_head; + c->summary->sum_list_head = c->summary->sum_list_head->u.next; kfree(temp); c->summary->sum_num--; @@ -773,34 +645,25 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock vecs[1].iov_base = c->summary->sum_buf; vecs[1].iov_len = datasize; - sum_ofs = jeb->offset + c->sector_size - jeb->free_size; - dbg_summary("JFFS2: writing out data to flash to pos : 0x%08x\n", - sum_ofs); + jeb->offset + c->sector_size - jeb->free_size); - ret = jffs2_flash_writev(c, vecs, 2, sum_ofs, &retlen, 0); - - if (ret || (retlen != infosize)) { + spin_unlock(&c->erase_completion_lock); + ret = jffs2_flash_writev(c, vecs, 2, jeb->offset + c->sector_size - + jeb->free_size, &retlen, 0); + spin_lock(&c->erase_completion_lock); - JFFS2_WARNING("Write of %u bytes at 0x%08x failed. returned %d, retlen %zd\n", - infosize, sum_ofs, ret, retlen); - if (retlen) { - /* Waste remaining space */ - spin_lock(&c->erase_completion_lock); - jffs2_link_node_ref(c, jeb, sum_ofs | REF_OBSOLETE, infosize, NULL); - spin_unlock(&c->erase_completion_lock); - } + if (ret || (retlen != infosize)) { + JFFS2_WARNING("Write of %zd bytes at 0x%08x failed. returned %d, retlen %zd\n", + infosize, jeb->offset + c->sector_size - jeb->free_size, ret, retlen); c->summary->sum_size = JFFS2_SUMMARY_NOSUM_SIZE; + WASTED_SPACE(infosize); - return 0; + return 1; } - spin_lock(&c->erase_completion_lock); - jffs2_link_node_ref(c, jeb, sum_ofs | REF_NORMAL, infosize, NULL); - spin_unlock(&c->erase_completion_lock); - return 0; } @@ -808,16 +671,13 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock int jffs2_sum_write_sumnode(struct jffs2_sb_info *c) { - int datasize, infosize, padsize; + struct jffs2_raw_node_ref *summary_ref; + int datasize, infosize, padsize, ret; struct jffs2_eraseblock *jeb; - int ret; dbg_summary("called\n"); - spin_unlock(&c->erase_completion_lock); - jeb = c->nextblock; - jffs2_prealloc_raw_node_refs(c, jeb, 1); if (!c->summary->sum_num || !c->summary->sum_list_head) { JFFS2_WARNING("Empty summary info!!!\n"); @@ -836,11 +696,35 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c) jffs2_sum_disable_collecting(c->summary); JFFS2_WARNING("Not enough space for summary, padsize = %d\n", padsize); - spin_lock(&c->erase_completion_lock); return 0; } ret = jffs2_sum_write_data(c, jeb, infosize, datasize, padsize); + if (ret) + return 0; /* can't write out summary, block is marked as NOSUM_SIZE */ + + /* for ACCT_PARANOIA_CHECK */ + spin_unlock(&c->erase_completion_lock); + summary_ref = jffs2_alloc_raw_node_ref(); spin_lock(&c->erase_completion_lock); - return ret; + + if (!summary_ref) { + JFFS2_NOTICE("Failed to allocate node ref for summary\n"); + return -ENOMEM; + } + + summary_ref->next_in_ino = NULL; + summary_ref->next_phys = NULL; + summary_ref->flash_offset = (jeb->offset + c->sector_size - jeb->free_size) | REF_NORMAL; + summary_ref->__totlen = infosize; + + if (!jeb->first_node) + jeb->first_node = summary_ref; + if (jeb->last_node) + jeb->last_node->next_phys = summary_ref; + jeb->last_node = summary_ref; + + USED_SPACE(infosize); + + return 0; } diff --git a/fs/jffs2/summary.h b/fs/jffs2/summary.h index 6bf1f6aa4..b7a678be1 100644 --- a/fs/jffs2/summary.h +++ b/fs/jffs2/summary.h @@ -18,6 +18,23 @@ #include #include +#define DIRTY_SPACE(x) do { typeof(x) _x = (x); \ + c->free_size -= _x; c->dirty_size += _x; \ + jeb->free_size -= _x ; jeb->dirty_size += _x; \ + }while(0) +#define USED_SPACE(x) do { typeof(x) _x = (x); \ + c->free_size -= _x; c->used_size += _x; \ + jeb->free_size -= _x ; jeb->used_size += _x; \ + }while(0) +#define WASTED_SPACE(x) do { typeof(x) _x = (x); \ + c->free_size -= _x; c->wasted_size += _x; \ + jeb->free_size -= _x ; jeb->wasted_size += _x; \ + }while(0) +#define UNCHECKED_SPACE(x) do { typeof(x) _x = (x); \ + c->free_size -= _x; c->unchecked_size += _x; \ + jeb->free_size -= _x ; jeb->unchecked_size += _x; \ + }while(0) + #define BLK_STATE_ALLFF 0 #define BLK_STATE_CLEAN 1 #define BLK_STATE_PARTDIRTY 2 @@ -28,8 +45,6 @@ #define JFFS2_SUMMARY_NOSUM_SIZE 0xffffffff #define JFFS2_SUMMARY_INODE_SIZE (sizeof(struct jffs2_sum_inode_flash)) #define JFFS2_SUMMARY_DIRENT_SIZE(x) (sizeof(struct jffs2_sum_dirent_flash) + (x)) -#define JFFS2_SUMMARY_XATTR_SIZE (sizeof(struct jffs2_sum_xattr_flash)) -#define JFFS2_SUMMARY_XREF_SIZE (sizeof(struct jffs2_sum_xref_flash)) /* Summary structures used on flash */ @@ -60,28 +75,11 @@ struct jffs2_sum_dirent_flash uint8_t name[0]; /* dirent name */ } __attribute__((packed)); -struct jffs2_sum_xattr_flash -{ - jint16_t nodetype; /* == JFFS2_NODETYPE_XATR */ - jint32_t xid; /* xattr identifier */ - jint32_t version; /* version number */ - jint32_t offset; /* offset on jeb */ - jint32_t totlen; /* node length */ -} __attribute__((packed)); - -struct jffs2_sum_xref_flash -{ - jint16_t nodetype; /* == JFFS2_NODETYPE_XREF */ - jint32_t offset; /* offset on jeb */ -} __attribute__((packed)); - union jffs2_sum_flash { struct jffs2_sum_unknown_flash u; struct jffs2_sum_inode_flash i; struct jffs2_sum_dirent_flash d; - struct jffs2_sum_xattr_flash x; - struct jffs2_sum_xref_flash r; }; /* Summary structures used in the memory */ @@ -116,30 +114,11 @@ struct jffs2_sum_dirent_mem uint8_t name[0]; /* dirent name */ } __attribute__((packed)); -struct jffs2_sum_xattr_mem -{ - union jffs2_sum_mem *next; - jint16_t nodetype; - jint32_t xid; - jint32_t version; - jint32_t offset; - jint32_t totlen; -} __attribute__((packed)); - -struct jffs2_sum_xref_mem -{ - union jffs2_sum_mem *next; - jint16_t nodetype; - jint32_t offset; -} __attribute__((packed)); - union jffs2_sum_mem { struct jffs2_sum_unknown_mem u; struct jffs2_sum_inode_mem i; struct jffs2_sum_dirent_mem d; - struct jffs2_sum_xattr_mem x; - struct jffs2_sum_xref_mem r; }; /* Summary related information stored in superblock */ @@ -180,11 +159,8 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c); int jffs2_sum_add_padding_mem(struct jffs2_summary *s, uint32_t size); int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, uint32_t ofs); int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *rd, uint32_t ofs); -int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs); -int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs); int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, - struct jffs2_raw_summary *summary, uint32_t sumlen, - uint32_t *pseudo_random); + uint32_t ofs, uint32_t *pseudo_random); #else /* SUMMARY DISABLED */ @@ -200,9 +176,7 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb #define jffs2_sum_add_padding_mem(a,b) #define jffs2_sum_add_inode_mem(a,b,c) #define jffs2_sum_add_dirent_mem(a,b,c) -#define jffs2_sum_add_xattr_mem(a,b,c) -#define jffs2_sum_add_xref_mem(a,b,c) -#define jffs2_sum_scan_sumnode(a,b,c,d,e) (0) +#define jffs2_sum_scan_sumnode(a,b,c,d) (0) #endif /* CONFIG_JFFS2_SUMMARY */ diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 68e395341..ffd8e84b2 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -110,10 +111,9 @@ static int jffs2_sb_set(struct super_block *sb, void *data) return 0; } -static int jffs2_get_sb_mtd(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct mtd_info *mtd, - struct vfsmount *mnt) +static struct super_block *jffs2_get_sb_mtd(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data, struct mtd_info *mtd) { struct super_block *sb; struct jffs2_sb_info *c; @@ -121,20 +121,19 @@ static int jffs2_get_sb_mtd(struct file_system_type *fs_type, c = kmalloc(sizeof(*c), GFP_KERNEL); if (!c) - return -ENOMEM; + return ERR_PTR(-ENOMEM); memset(c, 0, sizeof(*c)); c->mtd = mtd; sb = sget(fs_type, jffs2_sb_compare, jffs2_sb_set, c); if (IS_ERR(sb)) - goto out_error; + goto out_put; if (sb->s_root) { /* New mountpoint for JFFS2 which is already mounted */ D1(printk(KERN_DEBUG "jffs2_get_sb_mtd(): Device %d (\"%s\") is already mounted\n", mtd->index, mtd->name)); - ret = simple_set_mnt(mnt, sb); goto out_put; } @@ -152,57 +151,51 @@ static int jffs2_get_sb_mtd(struct file_system_type *fs_type, sb->s_op = &jffs2_super_operations; sb->s_flags = flags | MS_NOATIME; - sb->s_xattr = jffs2_xattr_handlers; -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - sb->s_flags |= MS_POSIXACL; -#endif + ret = jffs2_do_fill_super(sb, data, flags & MS_SILENT ? 1 : 0); if (ret) { /* Failure case... */ up_write(&sb->s_umount); deactivate_super(sb); - return ret; + return ERR_PTR(ret); } sb->s_flags |= MS_ACTIVE; - return simple_set_mnt(mnt, sb); + return sb; -out_error: - ret = PTR_ERR(sb); out_put: kfree(c); put_mtd_device(mtd); - return ret; + return sb; } -static int jffs2_get_sb_mtdnr(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, int mtdnr, - struct vfsmount *mnt) +static struct super_block *jffs2_get_sb_mtdnr(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data, int mtdnr) { struct mtd_info *mtd; mtd = get_mtd_device(NULL, mtdnr); if (!mtd) { D1(printk(KERN_DEBUG "jffs2: MTD device #%u doesn't appear to exist\n", mtdnr)); - return -EINVAL; + return ERR_PTR(-EINVAL); } - return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd, mnt); + return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd); } -static int jffs2_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *jffs2_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { int err; struct nameidata nd; int mtdnr; if (!dev_name) - return -EINVAL; + return ERR_PTR(-EINVAL); D1(printk(KERN_DEBUG "jffs2_get_sb(): dev_name \"%s\"\n", dev_name)); @@ -224,7 +217,7 @@ static int jffs2_get_sb(struct file_system_type *fs_type, mtd = get_mtd_device(NULL, mtdnr); if (mtd) { if (!strcmp(mtd->name, dev_name+4)) - return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd, mnt); + return jffs2_get_sb_mtd(fs_type, flags, dev_name, data, mtd); put_mtd_device(mtd); } } @@ -237,7 +230,7 @@ static int jffs2_get_sb(struct file_system_type *fs_type, if (!*endptr) { /* It was a valid number */ D1(printk(KERN_DEBUG "jffs2_get_sb(): mtd%%d, mtdnr %d\n", mtdnr)); - return jffs2_get_sb_mtdnr(fs_type, flags, dev_name, data, mtdnr, mnt); + return jffs2_get_sb_mtdnr(fs_type, flags, dev_name, data, mtdnr); } } } @@ -251,7 +244,7 @@ static int jffs2_get_sb(struct file_system_type *fs_type, err, nd.dentry->d_inode)); if (err) - return err; + return ERR_PTR(err); err = -EINVAL; @@ -273,11 +266,11 @@ static int jffs2_get_sb(struct file_system_type *fs_type, mtdnr = iminor(nd.dentry->d_inode); path_release(&nd); - return jffs2_get_sb_mtdnr(fs_type, flags, dev_name, data, mtdnr, mnt); + return jffs2_get_sb_mtdnr(fs_type, flags, dev_name, data, mtdnr); out: path_release(&nd); - return err; + return ERR_PTR(err); } static void jffs2_put_super (struct super_block *sb) @@ -300,7 +293,6 @@ static void jffs2_put_super (struct super_block *sb) kfree(c->blocks); jffs2_flash_cleanup(c); kfree(c->inocache_list); - jffs2_clear_xattr_subsystem(c); if (c->mtd->sync) c->mtd->sync(c->mtd); @@ -328,18 +320,6 @@ static int __init init_jffs2_fs(void) { int ret; - /* Paranoia checks for on-medium structures. If we ask GCC - to pack them with __attribute__((packed)) then it _also_ - assumes that they're not aligned -- so it emits crappy - code on some architectures. Ideally we want an attribute - which means just 'no padding', without the alignment - thing. But GCC doesn't have that -- we have to just - hope the structs are the right sizes, instead. */ - BUG_ON(sizeof(struct jffs2_unknown_node) != 12); - BUG_ON(sizeof(struct jffs2_raw_dirent) != 40); - BUG_ON(sizeof(struct jffs2_raw_inode) != 68); - BUG_ON(sizeof(struct jffs2_raw_summary) != 32); - printk(KERN_INFO "JFFS2 version 2.2." #ifdef CONFIG_JFFS2_FS_WRITEBUFFER " (NAND)" @@ -347,7 +327,7 @@ static int __init init_jffs2_fs(void) #ifdef CONFIG_JFFS2_SUMMARY " (SUMMARY) " #endif - " (C) 2001-2006 Red Hat, Inc.\n"); + " (C) 2001-2003 Red Hat, Inc.\n"); jffs2_inode_cachep = kmem_cache_create("jffs2_i", sizeof(struct jffs2_inode_info), diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index fc211b6e9..d55754fe8 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c @@ -24,12 +24,7 @@ struct inode_operations jffs2_symlink_inode_operations = { .readlink = generic_readlink, .follow_link = jffs2_follow_link, - .permission = jffs2_permission, - .setattr = jffs2_setattr, - .setxattr = jffs2_setxattr, - .getxattr = jffs2_getxattr, - .listxattr = jffs2_listxattr, - .removexattr = jffs2_removexattr + .setattr = jffs2_setattr }; static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index b9b700730..4cebf0e57 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -156,130 +156,69 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock jffs2_erase_pending_trigger(c); } - if (!jffs2_prealloc_raw_node_refs(c, jeb, 1)) { - uint32_t oldfree = jeb->free_size; - - jffs2_link_node_ref(c, jeb, - (jeb->offset+c->sector_size-oldfree) | REF_OBSOLETE, - oldfree, NULL); - /* convert to wasted */ - c->wasted_size += oldfree; - jeb->wasted_size += oldfree; - c->dirty_size -= oldfree; - jeb->dirty_size -= oldfree; - } + /* Adjust its size counts accordingly */ + c->wasted_size += jeb->free_size; + c->free_size -= jeb->free_size; + jeb->wasted_size += jeb->free_size; + jeb->free_size = 0; jffs2_dbg_dump_block_lists_nolock(c); jffs2_dbg_acct_sanity_check_nolock(c,jeb); jffs2_dbg_acct_paranoia_check_nolock(c, jeb); } -static struct jffs2_raw_node_ref **jffs2_incore_replace_raw(struct jffs2_sb_info *c, - struct jffs2_inode_info *f, - struct jffs2_raw_node_ref *raw, - union jffs2_node_union *node) -{ - struct jffs2_node_frag *frag; - struct jffs2_full_dirent *fd; - - dbg_noderef("incore_replace_raw: node at %p is {%04x,%04x}\n", - node, je16_to_cpu(node->u.magic), je16_to_cpu(node->u.nodetype)); - - BUG_ON(je16_to_cpu(node->u.magic) != 0x1985 && - je16_to_cpu(node->u.magic) != 0); - - switch (je16_to_cpu(node->u.nodetype)) { - case JFFS2_NODETYPE_INODE: - if (f->metadata && f->metadata->raw == raw) { - dbg_noderef("Will replace ->raw in f->metadata at %p\n", f->metadata); - return &f->metadata->raw; - } - frag = jffs2_lookup_node_frag(&f->fragtree, je32_to_cpu(node->i.offset)); - BUG_ON(!frag); - /* Find a frag which refers to the full_dnode we want to modify */ - while (!frag->node || frag->node->raw != raw) { - frag = frag_next(frag); - BUG_ON(!frag); - } - dbg_noderef("Will replace ->raw in full_dnode at %p\n", frag->node); - return &frag->node->raw; - - case JFFS2_NODETYPE_DIRENT: - for (fd = f->dents; fd; fd = fd->next) { - if (fd->raw == raw) { - dbg_noderef("Will replace ->raw in full_dirent at %p\n", fd); - return &fd->raw; - } - } - BUG(); - - default: - dbg_noderef("Don't care about replacing raw for nodetype %x\n", - je16_to_cpu(node->u.nodetype)); - break; - } - return NULL; -} - /* Recover from failure to write wbuf. Recover the nodes up to the * wbuf, not the one which we were starting to try to write. */ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) { struct jffs2_eraseblock *jeb, *new_jeb; - struct jffs2_raw_node_ref *raw, *next, *first_raw = NULL; + struct jffs2_raw_node_ref **first_raw, **raw; size_t retlen; int ret; - int nr_refile = 0; unsigned char *buf; uint32_t start, end, ofs, len; + spin_lock(&c->erase_completion_lock); + jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; - spin_lock(&c->erase_completion_lock); jffs2_block_refile(c, jeb, REFILE_NOTEMPTY); - spin_unlock(&c->erase_completion_lock); - - BUG_ON(!ref_obsolete(jeb->last_node)); /* Find the first node to be recovered, by skipping over every node which ends before the wbuf starts, or which is obsolete. */ - for (next = raw = jeb->first_node; next; raw = next) { - next = ref_next(raw); - - if (ref_obsolete(raw) || - (next && ref_offset(next) <= c->wbuf_ofs)) { - dbg_noderef("Skipping node at 0x%08x(%d)-0x%08x which is either before 0x%08x or obsolete\n", - ref_offset(raw), ref_flags(raw), - (ref_offset(raw) + ref_totlen(c, jeb, raw)), - c->wbuf_ofs); - continue; - } - dbg_noderef("First node to be recovered is at 0x%08x(%d)-0x%08x\n", - ref_offset(raw), ref_flags(raw), - (ref_offset(raw) + ref_totlen(c, jeb, raw))); - - first_raw = raw; - break; + first_raw = &jeb->first_node; + while (*first_raw && + (ref_obsolete(*first_raw) || + (ref_offset(*first_raw)+ref_totlen(c, jeb, *first_raw)) < c->wbuf_ofs)) { + D1(printk(KERN_DEBUG "Skipping node at 0x%08x(%d)-0x%08x which is either before 0x%08x or obsolete\n", + ref_offset(*first_raw), ref_flags(*first_raw), + (ref_offset(*first_raw) + ref_totlen(c, jeb, *first_raw)), + c->wbuf_ofs)); + first_raw = &(*first_raw)->next_phys; } - if (!first_raw) { + if (!*first_raw) { /* All nodes were obsolete. Nothing to recover. */ D1(printk(KERN_DEBUG "No non-obsolete nodes to be recovered. Just filing block bad\n")); - c->wbuf_len = 0; + spin_unlock(&c->erase_completion_lock); return; } - start = ref_offset(first_raw); - end = ref_offset(jeb->last_node); - nr_refile = 1; + start = ref_offset(*first_raw); + end = ref_offset(*first_raw) + ref_totlen(c, jeb, *first_raw); + + /* Find the last node to be recovered */ + raw = first_raw; + while ((*raw)) { + if (!ref_obsolete(*raw)) + end = ref_offset(*raw) + ref_totlen(c, jeb, *raw); - /* Count the number of refs which need to be copied */ - while ((raw = ref_next(raw)) != jeb->last_node) - nr_refile++; + raw = &(*raw)->next_phys; + } + spin_unlock(&c->erase_completion_lock); - dbg_noderef("wbuf recover %08x-%08x (%d bytes in %d nodes)\n", - start, end, end - start, nr_refile); + D1(printk(KERN_DEBUG "wbuf recover %08x-%08x\n", start, end)); buf = NULL; if (start < c->wbuf_ofs) { @@ -294,37 +233,28 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) } /* Do the read... */ - ret = c->mtd->read(c->mtd, start, c->wbuf_ofs - start, &retlen, buf); + if (jffs2_cleanmarker_oob(c)) + ret = c->mtd->read_ecc(c->mtd, start, c->wbuf_ofs - start, &retlen, buf, NULL, c->oobinfo); + else + ret = c->mtd->read(c->mtd, start, c->wbuf_ofs - start, &retlen, buf); - /* ECC recovered ? */ - if ((ret == -EUCLEAN || ret == -EBADMSG) && - (retlen == c->wbuf_ofs - start)) + if (ret == -EBADMSG && retlen == c->wbuf_ofs - start) { + /* ECC recovered */ ret = 0; - + } if (ret || retlen != c->wbuf_ofs - start) { printk(KERN_CRIT "Old data are already lost in wbuf recovery. Data loss ensues.\n"); kfree(buf); buf = NULL; read_failed: - first_raw = ref_next(first_raw); - nr_refile--; - while (first_raw && ref_obsolete(first_raw)) { - first_raw = ref_next(first_raw); - nr_refile--; - } - + first_raw = &(*first_raw)->next_phys; /* If this was the only node to be recovered, give up */ - if (!first_raw) { - c->wbuf_len = 0; + if (!(*first_raw)) return; - } /* It wasn't. Go on and try to recover nodes complete in the wbuf */ - start = ref_offset(first_raw); - dbg_noderef("wbuf now recover %08x-%08x (%d bytes in %d nodes)\n", - start, end, end - start, nr_refile); - + start = ref_offset(*first_raw); } else { /* Read succeeded. Copy the remaining data from the wbuf */ memcpy(buf + (c->wbuf_ofs - start), c->wbuf, end - c->wbuf_ofs); @@ -333,23 +263,14 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) /* OK... we're to rewrite (end-start) bytes of data from first_raw onwards. Either 'buf' contains the data, or we find it in the wbuf */ + /* ... and get an allocation of space from a shiny new block instead */ - ret = jffs2_reserve_space_gc(c, end-start, &len, JFFS2_SUMMARY_NOSUM_SIZE); + ret = jffs2_reserve_space_gc(c, end-start, &ofs, &len, JFFS2_SUMMARY_NOSUM_SIZE); if (ret) { printk(KERN_WARNING "Failed to allocate space for wbuf recovery. Data loss ensues.\n"); kfree(buf); return; } - - ret = jffs2_prealloc_raw_node_refs(c, c->nextblock, nr_refile); - if (ret) { - printk(KERN_WARNING "Failed to allocate node refs for wbuf recovery. Data loss ensues.\n"); - kfree(buf); - return; - } - - ofs = write_ofs(c); - if (end-start >= c->wbuf_pagesize) { /* Need to do another write immediately, but it's possible that this is just because the wbuf itself is completely @@ -367,22 +288,36 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) if (breakme++ == 20) { printk(KERN_NOTICE "Faking write error at 0x%08x\n", ofs); breakme = 0; - c->mtd->write(c->mtd, ofs, towrite, &retlen, - brokenbuf); + c->mtd->write_ecc(c->mtd, ofs, towrite, &retlen, + brokenbuf, NULL, c->oobinfo); ret = -EIO; } else #endif - ret = c->mtd->write(c->mtd, ofs, towrite, &retlen, - rewrite_buf); + if (jffs2_cleanmarker_oob(c)) + ret = c->mtd->write_ecc(c->mtd, ofs, towrite, &retlen, + rewrite_buf, NULL, c->oobinfo); + else + ret = c->mtd->write(c->mtd, ofs, towrite, &retlen, rewrite_buf); if (ret || retlen != towrite) { /* Argh. We tried. Really we did. */ printk(KERN_CRIT "Recovery of wbuf failed due to a second write error\n"); kfree(buf); - if (retlen) - jffs2_add_physical_node_ref(c, ofs | REF_OBSOLETE, ref_totlen(c, jeb, first_raw), NULL); + if (retlen) { + struct jffs2_raw_node_ref *raw2; + + raw2 = jffs2_alloc_raw_node_ref(); + if (!raw2) + return; + raw2->flash_offset = ofs | REF_OBSOLETE; + raw2->__totlen = ref_totlen(c, jeb, *first_raw); + raw2->next_phys = NULL; + raw2->next_in_ino = NULL; + + jffs2_add_physical_node_ref(c, raw2); + } return; } printk(KERN_NOTICE "Recovery of wbuf succeeded to %08x\n", ofs); @@ -391,10 +326,12 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) c->wbuf_ofs = ofs + towrite; memmove(c->wbuf, rewrite_buf + towrite, c->wbuf_len); /* Don't muck about with c->wbuf_inodes. False positives are harmless. */ + kfree(buf); } else { /* OK, now we're left with the dregs in whichever buffer we're using */ if (buf) { memcpy(c->wbuf, buf, end-start); + kfree(buf); } else { memmove(c->wbuf, c->wbuf + (start - c->wbuf_ofs), end - start); } @@ -406,110 +343,62 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) new_jeb = &c->blocks[ofs / c->sector_size]; spin_lock(&c->erase_completion_lock); - for (raw = first_raw; raw != jeb->last_node; raw = ref_next(raw)) { - uint32_t rawlen = ref_totlen(c, jeb, raw); - struct jffs2_inode_cache *ic; - struct jffs2_raw_node_ref *new_ref; - struct jffs2_raw_node_ref **adjust_ref = NULL; - struct jffs2_inode_info *f = NULL; - - D1(printk(KERN_DEBUG "Refiling block of %08x at %08x(%d) to %08x\n", - rawlen, ref_offset(raw), ref_flags(raw), ofs)); - - ic = jffs2_raw_ref_to_ic(raw); - - /* Ick. This XATTR mess should be fixed shortly... */ - if (ic && ic->class == RAWNODE_CLASS_XATTR_DATUM) { - struct jffs2_xattr_datum *xd = (void *)ic; - BUG_ON(xd->node != raw); - adjust_ref = &xd->node; - raw->next_in_ino = NULL; - ic = NULL; - } else if (ic && ic->class == RAWNODE_CLASS_XATTR_REF) { - struct jffs2_xattr_datum *xr = (void *)ic; - BUG_ON(xr->node != raw); - adjust_ref = &xr->node; - raw->next_in_ino = NULL; - ic = NULL; - } else if (ic && ic->class == RAWNODE_CLASS_INODE_CACHE) { - struct jffs2_raw_node_ref **p = &ic->nodes; - - /* Remove the old node from the per-inode list */ - while (*p && *p != (void *)ic) { - if (*p == raw) { - (*p) = (raw->next_in_ino); - raw->next_in_ino = NULL; - break; - } - p = &((*p)->next_in_ino); - } - - if (ic->state == INO_STATE_PRESENT && !ref_obsolete(raw)) { - /* If it's an in-core inode, then we have to adjust any - full_dirent or full_dnode structure to point to the - new version instead of the old */ - f = jffs2_gc_fetch_inode(c, ic->ino, ic->nlink); - if (IS_ERR(f)) { - /* Should never happen; it _must_ be present */ - JFFS2_ERROR("Failed to iget() ino #%u, err %ld\n", - ic->ino, PTR_ERR(f)); - BUG(); - } - /* We don't lock f->sem. There's a number of ways we could - end up in here with it already being locked, and nobody's - going to modify it on us anyway because we hold the - alloc_sem. We're only changing one ->raw pointer too, - which we can get away with without upsetting readers. */ - adjust_ref = jffs2_incore_replace_raw(c, f, raw, - (void *)(buf?:c->wbuf) + (ref_offset(raw) - start)); - } else if (unlikely(ic->state != INO_STATE_PRESENT && - ic->state != INO_STATE_CHECKEDABSENT && - ic->state != INO_STATE_GC)) { - JFFS2_ERROR("Inode #%u is in strange state %d!\n", ic->ino, ic->state); - BUG(); - } - } + if (new_jeb->first_node) { + /* Odd, but possible with ST flash later maybe */ + new_jeb->last_node->next_phys = *first_raw; + } else { + new_jeb->first_node = *first_raw; + } - new_ref = jffs2_link_node_ref(c, new_jeb, ofs | ref_flags(raw), rawlen, ic); + raw = first_raw; + while (*raw) { + uint32_t rawlen = ref_totlen(c, jeb, *raw); - if (adjust_ref) { - BUG_ON(*adjust_ref != raw); - *adjust_ref = new_ref; - } - if (f) - jffs2_gc_release_inode(c, f); + D1(printk(KERN_DEBUG "Refiling block of %08x at %08x(%d) to %08x\n", + rawlen, ref_offset(*raw), ref_flags(*raw), ofs)); - if (!ref_obsolete(raw)) { + if (ref_obsolete(*raw)) { + /* Shouldn't really happen much */ + new_jeb->dirty_size += rawlen; + new_jeb->free_size -= rawlen; + c->dirty_size += rawlen; + } else { + new_jeb->used_size += rawlen; + new_jeb->free_size -= rawlen; jeb->dirty_size += rawlen; jeb->used_size -= rawlen; c->dirty_size += rawlen; - c->used_size -= rawlen; - raw->flash_offset = ref_offset(raw) | REF_OBSOLETE; - BUG_ON(raw->next_in_ino); } + c->free_size -= rawlen; + (*raw)->flash_offset = ofs | ref_flags(*raw); ofs += rawlen; - } + new_jeb->last_node = *raw; - kfree(buf); + raw = &(*raw)->next_phys; + } /* Fix up the original jeb now it's on the bad_list */ - if (first_raw == jeb->first_node) { + *first_raw = NULL; + if (first_raw == &jeb->first_node) { + jeb->last_node = NULL; D1(printk(KERN_DEBUG "Failing block at %08x is now empty. Moving to erase_pending_list\n", jeb->offset)); - list_move(&jeb->list, &c->erase_pending_list); + list_del(&jeb->list); + list_add(&jeb->list, &c->erase_pending_list); c->nr_erasing_blocks++; jffs2_erase_pending_trigger(c); } + else + jeb->last_node = container_of(first_raw, struct jffs2_raw_node_ref, next_phys); jffs2_dbg_acct_sanity_check_nolock(c, jeb); - jffs2_dbg_acct_paranoia_check_nolock(c, jeb); + jffs2_dbg_acct_paranoia_check_nolock(c, jeb); jffs2_dbg_acct_sanity_check_nolock(c, new_jeb); - jffs2_dbg_acct_paranoia_check_nolock(c, new_jeb); + jffs2_dbg_acct_paranoia_check_nolock(c, new_jeb); spin_unlock(&c->erase_completion_lock); - D1(printk(KERN_DEBUG "wbuf recovery completed OK. wbuf_ofs 0x%08x, len 0x%x\n", c->wbuf_ofs, c->wbuf_len)); - + D1(printk(KERN_DEBUG "wbuf recovery completed OK\n")); } /* Meaning of pad argument: @@ -523,7 +412,6 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) { - struct jffs2_eraseblock *wbuf_jeb; int ret; size_t retlen; @@ -541,10 +429,6 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) if (!c->wbuf_len) /* already checked c->wbuf above */ return 0; - wbuf_jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; - if (jffs2_prealloc_raw_node_refs(c, wbuf_jeb, c->nextblock->allocated_refs + 1)) - return -ENOMEM; - /* claim remaining space on the page this happens, if we have a change to a new block, or if fsync forces us to flush the writebuffer. @@ -574,12 +458,15 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) if (breakme++ == 20) { printk(KERN_NOTICE "Faking write error at 0x%08x\n", c->wbuf_ofs); breakme = 0; - c->mtd->write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, - brokenbuf); + c->mtd->write_ecc(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, + &retlen, brokenbuf, NULL, c->oobinfo); ret = -EIO; } else #endif + if (jffs2_cleanmarker_oob(c)) + ret = c->mtd->write_ecc(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf, NULL, c->oobinfo); + else ret = c->mtd->write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf); if (ret || retlen != c->wbuf_pagesize) { @@ -596,34 +483,32 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) return ret; } + spin_lock(&c->erase_completion_lock); + /* Adjust free size of the block if we padded. */ if (pad) { - uint32_t waste = c->wbuf_pagesize - c->wbuf_len; + struct jffs2_eraseblock *jeb; + + jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; D1(printk(KERN_DEBUG "jffs2_flush_wbuf() adjusting free_size of %sblock at %08x\n", - (wbuf_jeb==c->nextblock)?"next":"", wbuf_jeb->offset)); + (jeb==c->nextblock)?"next":"", jeb->offset)); /* wbuf_pagesize - wbuf_len is the amount of space that's to be padded. If there is less free space in the block than that, something screwed up */ - if (wbuf_jeb->free_size < waste) { + if (jeb->free_size < (c->wbuf_pagesize - c->wbuf_len)) { printk(KERN_CRIT "jffs2_flush_wbuf(): Accounting error. wbuf at 0x%08x has 0x%03x bytes, 0x%03x left.\n", - c->wbuf_ofs, c->wbuf_len, waste); + c->wbuf_ofs, c->wbuf_len, c->wbuf_pagesize-c->wbuf_len); printk(KERN_CRIT "jffs2_flush_wbuf(): But free_size for block at 0x%08x is only 0x%08x\n", - wbuf_jeb->offset, wbuf_jeb->free_size); + jeb->offset, jeb->free_size); BUG(); } - - spin_lock(&c->erase_completion_lock); - - jffs2_link_node_ref(c, wbuf_jeb, (c->wbuf_ofs + c->wbuf_len) | REF_OBSOLETE, waste, NULL); - /* FIXME: that made it count as dirty. Convert to wasted */ - wbuf_jeb->dirty_size -= waste; - c->dirty_size -= waste; - wbuf_jeb->wasted_size += waste; - c->wasted_size += waste; - } else - spin_lock(&c->erase_completion_lock); + jeb->free_size -= (c->wbuf_pagesize - c->wbuf_len); + c->free_size -= (c->wbuf_pagesize - c->wbuf_len); + jeb->wasted_size += (c->wbuf_pagesize - c->wbuf_len); + c->wasted_size += (c->wbuf_pagesize - c->wbuf_len); + } /* Stick any now-obsoleted blocks on the erase_pending_list */ jffs2_refile_wbuf_blocks(c); @@ -718,30 +603,20 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c) return ret; } - -static size_t jffs2_fill_wbuf(struct jffs2_sb_info *c, const uint8_t *buf, - size_t len) -{ - if (len && !c->wbuf_len && (len >= c->wbuf_pagesize)) - return 0; - - if (len > (c->wbuf_pagesize - c->wbuf_len)) - len = c->wbuf_pagesize - c->wbuf_len; - memcpy(c->wbuf + c->wbuf_len, buf, len); - c->wbuf_len += (uint32_t) len; - return len; -} - -int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, - unsigned long count, loff_t to, size_t *retlen, - uint32_t ino) +int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, unsigned long count, loff_t to, size_t *retlen, uint32_t ino) { - struct jffs2_eraseblock *jeb; - size_t wbuf_retlen, donelen = 0; + struct kvec outvecs[3]; + uint32_t totlen = 0; + uint32_t split_ofs = 0; + uint32_t old_totlen; + int ret, splitvec = -1; + int invec, outvec; + size_t wbuf_retlen; + unsigned char *wbuf_ptr; + size_t donelen = 0; uint32_t outvec_to = to; - int ret, invec; - /* If not writebuffered flash, don't bother */ + /* If not NAND flash, don't bother */ if (!jffs2_is_writebuffered(c)) return jffs2_flash_direct_writev(c, invecs, count, to, retlen); @@ -754,22 +629,34 @@ int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, memset(c->wbuf,0xff,c->wbuf_pagesize); } - /* - * Sanity checks on target address. It's permitted to write - * at PAD(c->wbuf_len+c->wbuf_ofs), and it's permitted to - * write at the beginning of a new erase block. Anything else, - * and you die. New block starts at xxx000c (0-b = block - * header) - */ + /* Fixup the wbuf if we are moving to a new eraseblock. The checks below + fail for ECC'd NOR because cleanmarker == 16, so a block starts at + xxx0010. */ + if (jffs2_nor_ecc(c)) { + if (((c->wbuf_ofs % c->sector_size) == 0) && !c->wbuf_len) { + c->wbuf_ofs = PAGE_DIV(to); + c->wbuf_len = PAGE_MOD(to); + memset(c->wbuf,0xff,c->wbuf_pagesize); + } + } + + /* Sanity checks on target address. + It's permitted to write at PAD(c->wbuf_len+c->wbuf_ofs), + and it's permitted to write at the beginning of a new + erase block. Anything else, and you die. + New block starts at xxx000c (0-b = block header) + */ if (SECTOR_ADDR(to) != SECTOR_ADDR(c->wbuf_ofs)) { /* It's a write to a new block */ if (c->wbuf_len) { - D1(printk(KERN_DEBUG "jffs2_flash_writev() to 0x%lx " - "causes flush of wbuf at 0x%08x\n", - (unsigned long)to, c->wbuf_ofs)); + D1(printk(KERN_DEBUG "jffs2_flash_writev() to 0x%lx causes flush of wbuf at 0x%08x\n", (unsigned long)to, c->wbuf_ofs)); ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT); - if (ret) - goto outerr; + if (ret) { + /* the underlying layer has to check wbuf_len to do the cleanup */ + D1(printk(KERN_WARNING "jffs2_flush_wbuf() called from jffs2_flash_writev() failed %d\n", ret)); + *retlen = 0; + goto exit; + } } /* set pointer to new block */ c->wbuf_ofs = PAGE_DIV(to); @@ -778,70 +665,165 @@ int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, if (to != PAD(c->wbuf_ofs + c->wbuf_len)) { /* We're not writing immediately after the writebuffer. Bad. */ - printk(KERN_CRIT "jffs2_flash_writev(): Non-contiguous write " - "to %08lx\n", (unsigned long)to); + printk(KERN_CRIT "jffs2_flash_writev(): Non-contiguous write to %08lx\n", (unsigned long)to); if (c->wbuf_len) printk(KERN_CRIT "wbuf was previously %08x-%08x\n", - c->wbuf_ofs, c->wbuf_ofs+c->wbuf_len); + c->wbuf_ofs, c->wbuf_ofs+c->wbuf_len); BUG(); } - /* adjust alignment offset */ - if (c->wbuf_len != PAGE_MOD(to)) { - c->wbuf_len = PAGE_MOD(to); - /* take care of alignment to next page */ - if (!c->wbuf_len) { - c->wbuf_len = c->wbuf_pagesize; - ret = __jffs2_flush_wbuf(c, NOPAD); - if (ret) - goto outerr; - } + /* Note outvecs[3] above. We know count is never greater than 2 */ + if (count > 2) { + printk(KERN_CRIT "jffs2_flash_writev(): count is %ld\n", count); + BUG(); } - for (invec = 0; invec < count; invec++) { - int vlen = invecs[invec].iov_len; - uint8_t *v = invecs[invec].iov_base; + invec = 0; + outvec = 0; - wbuf_retlen = jffs2_fill_wbuf(c, v, vlen); + /* Fill writebuffer first, if already in use */ + if (c->wbuf_len) { + uint32_t invec_ofs = 0; - if (c->wbuf_len == c->wbuf_pagesize) { - ret = __jffs2_flush_wbuf(c, NOPAD); - if (ret) - goto outerr; + /* adjust alignment offset */ + if (c->wbuf_len != PAGE_MOD(to)) { + c->wbuf_len = PAGE_MOD(to); + /* take care of alignment to next page */ + if (!c->wbuf_len) + c->wbuf_len = c->wbuf_pagesize; } - vlen -= wbuf_retlen; - outvec_to += wbuf_retlen; - donelen += wbuf_retlen; - v += wbuf_retlen; - - if (vlen >= c->wbuf_pagesize) { - ret = c->mtd->write(c->mtd, outvec_to, PAGE_DIV(vlen), - &wbuf_retlen, v); - if (ret < 0 || wbuf_retlen != PAGE_DIV(vlen)) - goto outfile; - - vlen -= wbuf_retlen; - outvec_to += wbuf_retlen; - c->wbuf_ofs = outvec_to; - donelen += wbuf_retlen; - v += wbuf_retlen; + + while(c->wbuf_len < c->wbuf_pagesize) { + uint32_t thislen; + + if (invec == count) + goto alldone; + + thislen = c->wbuf_pagesize - c->wbuf_len; + + if (thislen >= invecs[invec].iov_len) + thislen = invecs[invec].iov_len; + + invec_ofs = thislen; + + memcpy(c->wbuf + c->wbuf_len, invecs[invec].iov_base, thislen); + c->wbuf_len += thislen; + donelen += thislen; + /* Get next invec, if actual did not fill the buffer */ + if (c->wbuf_len < c->wbuf_pagesize) + invec++; } - wbuf_retlen = jffs2_fill_wbuf(c, v, vlen); - if (c->wbuf_len == c->wbuf_pagesize) { - ret = __jffs2_flush_wbuf(c, NOPAD); - if (ret) - goto outerr; + /* write buffer is full, flush buffer */ + ret = __jffs2_flush_wbuf(c, NOPAD); + if (ret) { + /* the underlying layer has to check wbuf_len to do the cleanup */ + D1(printk(KERN_WARNING "jffs2_flush_wbuf() called from jffs2_flash_writev() failed %d\n", ret)); + /* Retlen zero to make sure our caller doesn't mark the space dirty. + We've already done everything that's necessary */ + *retlen = 0; + goto exit; + } + outvec_to += donelen; + c->wbuf_ofs = outvec_to; + + /* All invecs done ? */ + if (invec == count) + goto alldone; + + /* Set up the first outvec, containing the remainder of the + invec we partially used */ + if (invecs[invec].iov_len > invec_ofs) { + outvecs[0].iov_base = invecs[invec].iov_base+invec_ofs; + totlen = outvecs[0].iov_len = invecs[invec].iov_len-invec_ofs; + if (totlen > c->wbuf_pagesize) { + splitvec = outvec; + split_ofs = outvecs[0].iov_len - PAGE_MOD(totlen); + } + outvec++; + } + invec++; + } + + /* OK, now we've flushed the wbuf and the start of the bits + we have been asked to write, now to write the rest.... */ + + /* totlen holds the amount of data still to be written */ + old_totlen = totlen; + for ( ; invec < count; invec++,outvec++ ) { + outvecs[outvec].iov_base = invecs[invec].iov_base; + totlen += outvecs[outvec].iov_len = invecs[invec].iov_len; + if (PAGE_DIV(totlen) != PAGE_DIV(old_totlen)) { + splitvec = outvec; + split_ofs = outvecs[outvec].iov_len - PAGE_MOD(totlen); + old_totlen = totlen; + } + } + + /* Now the outvecs array holds all the remaining data to write */ + /* Up to splitvec,split_ofs is to be written immediately. The rest + goes into the (now-empty) wbuf */ + + if (splitvec != -1) { + uint32_t remainder; + + remainder = outvecs[splitvec].iov_len - split_ofs; + outvecs[splitvec].iov_len = split_ofs; + + /* We did cross a page boundary, so we write some now */ + if (jffs2_cleanmarker_oob(c)) + ret = c->mtd->writev_ecc(c->mtd, outvecs, splitvec+1, outvec_to, &wbuf_retlen, NULL, c->oobinfo); + else + ret = jffs2_flash_direct_writev(c, outvecs, splitvec+1, outvec_to, &wbuf_retlen); + + if (ret < 0 || wbuf_retlen != PAGE_DIV(totlen)) { + /* At this point we have no problem, + c->wbuf is empty. However refile nextblock to avoid + writing again to same address. + */ + struct jffs2_eraseblock *jeb; + + spin_lock(&c->erase_completion_lock); + + jeb = &c->blocks[outvec_to / c->sector_size]; + jffs2_block_refile(c, jeb, REFILE_ANYWAY); + + *retlen = 0; + spin_unlock(&c->erase_completion_lock); + goto exit; } - outvec_to += wbuf_retlen; donelen += wbuf_retlen; + c->wbuf_ofs = PAGE_DIV(outvec_to) + PAGE_DIV(totlen); + + if (remainder) { + outvecs[splitvec].iov_base += split_ofs; + outvecs[splitvec].iov_len = remainder; + } else { + splitvec++; + } + + } else { + splitvec = 0; } - /* - * If there's a remainder in the wbuf and it's a non-GC write, - * remember that the wbuf affects this ino - */ + /* Now splitvec points to the start of the bits we have to copy + into the wbuf */ + wbuf_ptr = c->wbuf; + + for ( ; splitvec < outvec; splitvec++) { + /* Don't copy the wbuf into itself */ + if (outvecs[splitvec].iov_base == c->wbuf) + continue; + memcpy(wbuf_ptr, outvecs[splitvec].iov_base, outvecs[splitvec].iov_len); + wbuf_ptr += outvecs[splitvec].iov_len; + donelen += outvecs[splitvec].iov_len; + } + c->wbuf_len = wbuf_ptr - c->wbuf; + + /* If there's a remainder in the wbuf and it's a non-GC write, + remember that the wbuf affects this ino */ +alldone: *retlen = donelen; if (jffs2_sum_active()) { @@ -854,24 +836,8 @@ int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, jffs2_wbuf_dirties_inode(c, ino); ret = 0; - up_write(&c->wbuf_sem); - return ret; -outfile: - /* - * At this point we have no problem, c->wbuf is empty. However - * refile nextblock to avoid writing again to same address. - */ - - spin_lock(&c->erase_completion_lock); - - jeb = &c->blocks[outvec_to / c->sector_size]; - jffs2_block_refile(c, jeb, REFILE_ANYWAY); - - spin_unlock(&c->erase_completion_lock); - -outerr: - *retlen = 0; +exit: up_write(&c->wbuf_sem); return ret; } @@ -880,8 +846,7 @@ outerr: * This is the entry for flash write. * Check, if we work on NAND FLASH, if so build an kvec and write it via vritev */ -int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, - size_t *retlen, const u_char *buf) +int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char *buf) { struct kvec vecs[1]; @@ -906,23 +871,25 @@ int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *re /* Read flash */ down_read(&c->wbuf_sem); - ret = c->mtd->read(c->mtd, ofs, len, retlen, buf); - - if ( (ret == -EBADMSG || ret == -EUCLEAN) && (*retlen == len) ) { - if (ret == -EBADMSG) - printk(KERN_WARNING "mtd->read(0x%zx bytes from 0x%llx)" - " returned ECC error\n", len, ofs); + if (jffs2_cleanmarker_oob(c)) + ret = c->mtd->read_ecc(c->mtd, ofs, len, retlen, buf, NULL, c->oobinfo); + else + ret = c->mtd->read(c->mtd, ofs, len, retlen, buf); + + if ( (ret == -EBADMSG) && (*retlen == len) ) { + printk(KERN_WARNING "mtd->read(0x%zx bytes from 0x%llx) returned ECC error\n", + len, ofs); /* - * We have the raw data without ECC correction in the buffer, - * maybe we are lucky and all data or parts are correct. We - * check the node. If data are corrupted node check will sort - * it out. We keep this block, it will fail on write or erase - * and the we mark it bad. Or should we do that now? But we - * should give him a chance. Maybe we had a system crash or - * power loss before the ecc write or a erase was completed. + * We have the raw data without ECC correction in the buffer, maybe + * we are lucky and all data or parts are correct. We check the node. + * If data are corrupted node check will sort it out. + * We keep this block, it will fail on write or erase and the we + * mark it bad. Or should we do that now? But we should give him a chance. + * Maybe we had a system crash or power loss before the ecc write or + * a erase was completed. * So we return success. :) */ - ret = 0; + ret = 0; } /* if no writebuffer available or write buffer empty, return */ @@ -944,7 +911,7 @@ int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *re orbf = (c->wbuf_ofs - ofs); /* offset in read buffer */ if (orbf > len) /* is write beyond write buffer ? */ goto exit; - lwbf = len - orbf; /* number of bytes to copy */ + lwbf = len - orbf; /* number of bytes to copy */ if (lwbf > c->wbuf_len) lwbf = c->wbuf_len; } @@ -956,159 +923,158 @@ exit: return ret; } -#define NR_OOB_SCAN_PAGES 4 - /* - * Check, if the out of band area is empty + * Check, if the out of band area is empty */ -int jffs2_check_oob_empty(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb, int mode) +int jffs2_check_oob_empty( struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, int mode) { - int i, page, ret; - int oobsize = c->mtd->oobsize; - struct mtd_oob_ops ops; - - ops.len = NR_OOB_SCAN_PAGES * oobsize; - ops.ooblen = oobsize; - ops.oobbuf = c->oobbuf; - ops.ooboffs = 0; - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - ret = c->mtd->read_oob(c->mtd, jeb->offset, &ops); + unsigned char *buf; + int ret = 0; + int i,len,page; + size_t retlen; + int oob_size; + + /* allocate a buffer for all oob data in this sector */ + oob_size = c->mtd->oobsize; + len = 4 * oob_size; + buf = kmalloc(len, GFP_KERNEL); + if (!buf) { + printk(KERN_NOTICE "jffs2_check_oob_empty(): allocation of temporary data buffer for oob check failed\n"); + return -ENOMEM; + } + /* + * if mode = 0, we scan for a total empty oob area, else we have + * to take care of the cleanmarker in the first page of the block + */ + ret = jffs2_flash_read_oob(c, jeb->offset, len , &retlen, buf); if (ret) { - D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB " - "failed %d for block at %08x\n", ret, jeb->offset)); - return ret; + D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB failed %d for block at %08x\n", ret, jeb->offset)); + goto out; } - if (ops.retlen < ops.len) { - D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB " - "returned short read (%zd bytes not %d) for block " - "at %08x\n", ops.retlen, ops.len, jeb->offset)); - return -EIO; + if (retlen < len) { + D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB return short read " + "(%zd bytes not %d) for block at %08x\n", retlen, len, jeb->offset)); + ret = -EIO; + goto out; } /* Special check for first page */ - for(i = 0; i < oobsize ; i++) { + for(i = 0; i < oob_size ; i++) { /* Yeah, we know about the cleanmarker. */ if (mode && i >= c->fsdata_pos && i < c->fsdata_pos + c->fsdata_len) continue; - if (ops.oobbuf[i] != 0xFF) { - D2(printk(KERN_DEBUG "Found %02x at %x in OOB for " - "%08x\n", ops.oobbuf[i], i, jeb->offset)); - return 1; + if (buf[i] != 0xFF) { + D2(printk(KERN_DEBUG "Found %02x at %x in OOB for %08x\n", + buf[i], i, jeb->offset)); + ret = 1; + goto out; } } /* we know, we are aligned :) */ - for (page = oobsize; page < ops.len; page += sizeof(long)) { - long dat = *(long *)(&ops.oobbuf[page]); - if(dat != -1) - return 1; + for (page = oob_size; page < len; page += sizeof(long)) { + unsigned long dat = *(unsigned long *)(&buf[page]); + if(dat != -1) { + ret = 1; + goto out; + } } - return 0; + +out: + kfree(buf); + + return ret; } /* - * Scan for a valid cleanmarker and for bad blocks - */ -int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb) +* Scan for a valid cleanmarker and for bad blocks +* For virtual blocks (concatenated physical blocks) check the cleanmarker +* only in the first page of the first physical block, but scan for bad blocks in all +* physical blocks +*/ +int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) { struct jffs2_unknown_node n; - struct mtd_oob_ops ops; - int oobsize = c->mtd->oobsize; - unsigned char *p,*b; - int i, ret; - size_t offset = jeb->offset; - - /* Check first if the block is bad. */ - if (c->mtd->block_isbad(c->mtd, offset)) { - D1 (printk(KERN_WARNING "jffs2_check_nand_cleanmarker()" - ": Bad block at %08x\n", jeb->offset)); - return 2; - } - - ops.len = oobsize; - ops.ooblen = oobsize; - ops.oobbuf = c->oobbuf; - ops.ooboffs = 0; - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - ret = c->mtd->read_oob(c->mtd, offset, &ops); - if (ret) { - D1 (printk(KERN_WARNING "jffs2_check_nand_cleanmarker(): " - "Read OOB failed %d for block at %08x\n", - ret, jeb->offset)); - return ret; - } + unsigned char buf[2 * NAND_MAX_OOBSIZE]; + unsigned char *p; + int ret, i, cnt, retval = 0; + size_t retlen, offset; + int oob_size; + + offset = jeb->offset; + oob_size = c->mtd->oobsize; + + /* Loop through the physical blocks */ + for (cnt = 0; cnt < (c->sector_size / c->mtd->erasesize); cnt++) { + /* Check first if the block is bad. */ + if (c->mtd->block_isbad (c->mtd, offset)) { + D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): Bad block at %08x\n", jeb->offset)); + return 2; + } + /* + * We read oob data from page 0 and 1 of the block. + * page 0 contains cleanmarker and badblock info + * page 1 contains failure count of this block + */ + ret = c->mtd->read_oob (c->mtd, offset, oob_size << 1, &retlen, buf); - if (ops.retlen < ops.len) { - D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): " - "Read OOB return short read (%zd bytes not %d) " - "for block at %08x\n", ops.retlen, ops.len, - jeb->offset)); - return -EIO; - } + if (ret) { + D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): Read OOB failed %d for block at %08x\n", ret, jeb->offset)); + return ret; + } + if (retlen < (oob_size << 1)) { + D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): Read OOB return short read (%zd bytes not %d) for block at %08x\n", retlen, oob_size << 1, jeb->offset)); + return -EIO; + } - n.magic = cpu_to_je16 (JFFS2_MAGIC_BITMASK); - n.nodetype = cpu_to_je16 (JFFS2_NODETYPE_CLEANMARKER); - n.totlen = cpu_to_je32 (8); - p = (unsigned char *) &n; - b = c->oobbuf + c->fsdata_pos; + /* Check cleanmarker only on the first physical block */ + if (!cnt) { + n.magic = cpu_to_je16 (JFFS2_MAGIC_BITMASK); + n.nodetype = cpu_to_je16 (JFFS2_NODETYPE_CLEANMARKER); + n.totlen = cpu_to_je32 (8); + p = (unsigned char *) &n; - for (i = c->fsdata_len; i; i--) { - if (*b++ != *p++) - ret = 1; + for (i = 0; i < c->fsdata_len; i++) { + if (buf[c->fsdata_pos + i] != p[i]) { + retval = 1; + } + } + D1(if (retval == 1) { + printk(KERN_WARNING "jffs2_check_nand_cleanmarker(): Cleanmarker node not detected in block at %08x\n", jeb->offset); + printk(KERN_WARNING "OOB at %08x was ", offset); + for (i=0; i < oob_size; i++) { + printk("%02x ", buf[i]); + } + printk("\n"); + }) + } + offset += c->mtd->erasesize; } - - D1(if (ret == 1) { - printk(KERN_WARNING "jffs2_check_nand_cleanmarker(): " - "Cleanmarker node not detected in block at %08x\n", - offset); - printk(KERN_WARNING "OOB at %08zx was ", offset); - for (i=0; i < oobsize; i++) - printk("%02x ", c->oobbuf[i]); - printk("\n"); - }); - return ret; + return retval; } -int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, - struct jffs2_eraseblock *jeb) +int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) { - struct jffs2_unknown_node n; - int ret; - struct mtd_oob_ops ops; + struct jffs2_unknown_node n; + int ret; + size_t retlen; n.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); n.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER); n.totlen = cpu_to_je32(8); - ops.len = c->fsdata_len; - ops.ooblen = c->fsdata_len;; - ops.oobbuf = (uint8_t *)&n; - ops.ooboffs = c->fsdata_pos; - ops.datbuf = NULL; - ops.mode = MTD_OOB_PLACE; - - ret = c->mtd->write_oob(c->mtd, jeb->offset, &ops); + ret = jffs2_flash_write_oob(c, jeb->offset + c->fsdata_pos, c->fsdata_len, &retlen, (unsigned char *)&n); if (ret) { - D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): " - "Write failed for block at %08x: error %d\n", - jeb->offset, ret)); + D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): Write failed for block at %08x: error %d\n", jeb->offset, ret)); return ret; } - if (ops.retlen != ops.len) { - D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): " - "Short write for block at %08x: %zd not %d\n", - jeb->offset, ops.retlen, ops.len)); - return -EIO; + if (retlen != c->fsdata_len) { + D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): Short write for block at %08x: %zd not %d\n", jeb->offset, retlen, c->fsdata_len)); + return ret; } return 0; } @@ -1142,9 +1108,18 @@ int jffs2_write_nand_badblock(struct jffs2_sb_info *c, struct jffs2_eraseblock * return 1; } +#define NAND_JFFS2_OOB16_FSDALEN 8 + +static struct nand_oobinfo jffs2_oobinfo_docecc = { + .useecc = MTD_NANDECC_PLACE, + .eccbytes = 6, + .eccpos = {0,1,2,3,4,5} +}; + + static int jffs2_nand_set_oobinfo(struct jffs2_sb_info *c) { - struct nand_ecclayout *oinfo = c->mtd->ecclayout; + struct nand_oobinfo *oinfo = &c->mtd->oobinfo; /* Do this only, if we have an oob buffer */ if (!c->mtd->oobsize) @@ -1154,23 +1129,33 @@ static int jffs2_nand_set_oobinfo(struct jffs2_sb_info *c) c->cleanmarker_size = 0; /* Should we use autoplacement ? */ - if (!oinfo) { - D1(printk(KERN_DEBUG "JFFS2 on NAND. No autoplacment info found\n")); - return -EINVAL; - } + if (oinfo && oinfo->useecc == MTD_NANDECC_AUTOPLACE) { + D1(printk(KERN_DEBUG "JFFS2 using autoplace on NAND\n")); + /* Get the position of the free bytes */ + if (!oinfo->oobfree[0][1]) { + printk (KERN_WARNING "jffs2_nand_set_oobinfo(): Eeep. Autoplacement selected and no empty space in oob\n"); + return -ENOSPC; + } + c->fsdata_pos = oinfo->oobfree[0][0]; + c->fsdata_len = oinfo->oobfree[0][1]; + if (c->fsdata_len > 8) + c->fsdata_len = 8; + } else { + /* This is just a legacy fallback and should go away soon */ + switch(c->mtd->ecctype) { + case MTD_ECC_RS_DiskOnChip: + printk(KERN_WARNING "JFFS2 using DiskOnChip hardware ECC without autoplacement. Fix it!\n"); + c->oobinfo = &jffs2_oobinfo_docecc; + c->fsdata_pos = 6; + c->fsdata_len = NAND_JFFS2_OOB16_FSDALEN; + c->badblock_pos = 15; + break; - D1(printk(KERN_DEBUG "JFFS2 using autoplace on NAND\n")); - /* Get the position of the free bytes */ - if (!oinfo->oobfree[0].length) { - printk (KERN_WARNING "jffs2_nand_set_oobinfo(): Eeep." - " Autoplacement selected and no empty space in oob\n"); - return -ENOSPC; + default: + D1(printk(KERN_DEBUG "JFFS2 on NAND. No autoplacment info found\n")); + return -EINVAL; + } } - c->fsdata_pos = oinfo->oobfree[0].offset; - c->fsdata_len = oinfo->oobfree[0].length; - if (c->fsdata_len > 8) - c->fsdata_len = 8; - return 0; } @@ -1180,17 +1165,13 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c) /* Initialise write buffer */ init_rwsem(&c->wbuf_sem); - c->wbuf_pagesize = c->mtd->writesize; + c->wbuf_pagesize = c->mtd->oobblock; c->wbuf_ofs = 0xFFFFFFFF; c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); if (!c->wbuf) return -ENOMEM; - c->oobbuf = kmalloc(NR_OOB_SCAN_PAGES * c->mtd->oobsize, GFP_KERNEL); - if (!c->oobbuf) - return -ENOMEM; - res = jffs2_nand_set_oobinfo(c); #ifdef BREAKME @@ -1208,7 +1189,6 @@ int jffs2_nand_flash_setup(struct jffs2_sb_info *c) void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c) { kfree(c->wbuf); - kfree(c->oobbuf); } int jffs2_dataflash_setup(struct jffs2_sb_info *c) { @@ -1256,14 +1236,33 @@ void jffs2_dataflash_cleanup(struct jffs2_sb_info *c) { kfree(c->wbuf); } +int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c) { + /* Cleanmarker is actually larger on the flashes */ + c->cleanmarker_size = 16; + + /* Initialize write buffer */ + init_rwsem(&c->wbuf_sem); + c->wbuf_pagesize = c->mtd->eccsize; + c->wbuf_ofs = 0xFFFFFFFF; + + c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); + if (!c->wbuf) + return -ENOMEM; + + return 0; +} + +void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) { + kfree(c->wbuf); +} + int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) { - /* Cleanmarker currently occupies whole programming regions, - * either one or 2 for 8Byte STMicro flashes. */ - c->cleanmarker_size = max(16u, c->mtd->writesize); + /* Cleanmarker currently occupies a whole programming region */ + c->cleanmarker_size = MTD_PROGREGION_SIZE(c->mtd); /* Initialize write buffer */ init_rwsem(&c->wbuf_sem); - c->wbuf_pagesize = c->mtd->writesize; + c->wbuf_pagesize = MTD_PROGREGION_SIZE(c->mtd); c->wbuf_ofs = 0xFFFFFFFF; c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index 67176792e..1342f0158 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c @@ -37,6 +37,7 @@ int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint f->inocache->nodes = (struct jffs2_raw_node_ref *)f->inocache; f->inocache->state = INO_STATE_PRESENT; + jffs2_add_ino_cache(c, f->inocache); D1(printk(KERN_DEBUG "jffs2_do_new_inode(): Assigned ino# %d\n", f->inocache->ino)); ri->ino = cpu_to_je32(f->inocache->ino); @@ -56,14 +57,12 @@ int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint /* jffs2_write_dnode - given a raw_inode, allocate a full_dnode for it, write it to the flash, link it into the existing inode/fragment list */ -struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, - struct jffs2_raw_inode *ri, const unsigned char *data, - uint32_t datalen, int alloc_mode) +struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const unsigned char *data, uint32_t datalen, uint32_t flash_ofs, int alloc_mode) { + struct jffs2_raw_node_ref *raw; struct jffs2_full_dnode *fn; size_t retlen; - uint32_t flash_ofs; struct kvec vecs[2]; int ret; int retried = 0; @@ -79,21 +78,34 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 vecs[1].iov_base = (unsigned char *)data; vecs[1].iov_len = datalen; + jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); + if (je32_to_cpu(ri->totlen) != sizeof(*ri) + datalen) { printk(KERN_WARNING "jffs2_write_dnode: ri->totlen (0x%08x) != sizeof(*ri) (0x%08zx) + datalen (0x%08x)\n", je32_to_cpu(ri->totlen), sizeof(*ri), datalen); } + raw = jffs2_alloc_raw_node_ref(); + if (!raw) + return ERR_PTR(-ENOMEM); fn = jffs2_alloc_full_dnode(); - if (!fn) + if (!fn) { + jffs2_free_raw_node_ref(raw); return ERR_PTR(-ENOMEM); + } + + fn->ofs = je32_to_cpu(ri->offset); + fn->size = je32_to_cpu(ri->dsize); + fn->frags = 0; /* check number of valid vecs */ if (!datalen || !data) cnt = 1; retry: - flash_ofs = write_ofs(c); + fn->raw = raw; - jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); + raw->flash_offset = flash_ofs; + raw->__totlen = PAD(sizeof(*ri)+datalen); + raw->next_phys = NULL; if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) { BUG_ON(!retried); @@ -113,16 +125,22 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 /* Mark the space as dirtied */ if (retlen) { + /* Doesn't belong to any inode */ + raw->next_in_ino = NULL; + /* Don't change raw->size to match retlen. We may have written the node header already, and only the data will seem corrupted, in which case the scan would skip over any node we write before the original intended end of this node */ - jffs2_add_physical_node_ref(c, flash_ofs | REF_OBSOLETE, PAD(sizeof(*ri)+datalen), NULL); + raw->flash_offset |= REF_OBSOLETE; + jffs2_add_physical_node_ref(c, raw); + jffs2_mark_node_obsolete(c, raw); } else { - printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", flash_ofs); + printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset); + jffs2_free_raw_node_ref(raw); } - if (!retried && alloc_mode != ALLOC_NORETRY) { + if (!retried && alloc_mode != ALLOC_NORETRY && (raw = jffs2_alloc_raw_node_ref())) { /* Try to reallocate space and retry */ uint32_t dummy; struct jffs2_eraseblock *jeb = &c->blocks[flash_ofs / c->sector_size]; @@ -135,20 +153,19 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 jffs2_dbg_acct_paranoia_check(c, jeb); if (alloc_mode == ALLOC_GC) { - ret = jffs2_reserve_space_gc(c, sizeof(*ri) + datalen, &dummy, - JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space_gc(c, sizeof(*ri) + datalen, &flash_ofs, + &dummy, JFFS2_SUMMARY_INODE_SIZE); } else { /* Locking pain */ up(&f->sem); jffs2_complete_reservation(c); - ret = jffs2_reserve_space(c, sizeof(*ri) + datalen, &dummy, - alloc_mode, JFFS2_SUMMARY_INODE_SIZE); + ret = jffs2_reserve_space(c, sizeof(*ri) + datalen, &flash_ofs, + &dummy, alloc_mode, JFFS2_SUMMARY_INODE_SIZE); down(&f->sem); } if (!ret) { - flash_ofs = write_ofs(c); D1(printk(KERN_DEBUG "Allocated space at 0x%08x to retry failed write.\n", flash_ofs)); jffs2_dbg_acct_sanity_check(c,jeb); @@ -157,6 +174,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 goto retry; } D1(printk(KERN_DEBUG "Failed to allocate space to retry failed write: %d!\n", ret)); + jffs2_free_raw_node_ref(raw); } /* Release the full_dnode which is now useless, and return */ jffs2_free_full_dnode(fn); @@ -170,17 +188,20 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 if ((je32_to_cpu(ri->dsize) >= PAGE_CACHE_SIZE) || ( ((je32_to_cpu(ri->offset)&(PAGE_CACHE_SIZE-1))==0) && (je32_to_cpu(ri->dsize)+je32_to_cpu(ri->offset) == je32_to_cpu(ri->isize)))) { - flash_ofs |= REF_PRISTINE; + raw->flash_offset |= REF_PRISTINE; } else { - flash_ofs |= REF_NORMAL; + raw->flash_offset |= REF_NORMAL; } - fn->raw = jffs2_add_physical_node_ref(c, flash_ofs, PAD(sizeof(*ri)+datalen), f->inocache); - fn->ofs = je32_to_cpu(ri->offset); - fn->size = je32_to_cpu(ri->dsize); - fn->frags = 0; + jffs2_add_physical_node_ref(c, raw); + + /* Link into per-inode list */ + spin_lock(&c->erase_completion_lock); + raw->next_in_ino = f->inocache->nodes; + f->inocache->nodes = raw; + spin_unlock(&c->erase_completion_lock); D1(printk(KERN_DEBUG "jffs2_write_dnode wrote node at 0x%08x(%d) with dsize 0x%x, csize 0x%x, node_crc 0x%08x, data_crc 0x%08x, totlen 0x%08x\n", - flash_ofs & ~3, flash_ofs & 3, je32_to_cpu(ri->dsize), + flash_ofs, ref_flags(raw), je32_to_cpu(ri->dsize), je32_to_cpu(ri->csize), je32_to_cpu(ri->node_crc), je32_to_cpu(ri->data_crc), je32_to_cpu(ri->totlen))); @@ -191,14 +212,12 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 return fn; } -struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, - struct jffs2_raw_dirent *rd, const unsigned char *name, - uint32_t namelen, int alloc_mode) +struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_dirent *rd, const unsigned char *name, uint32_t namelen, uint32_t flash_ofs, int alloc_mode) { + struct jffs2_raw_node_ref *raw; struct jffs2_full_dirent *fd; size_t retlen; struct kvec vecs[2]; - uint32_t flash_ofs; int retried = 0; int ret; @@ -209,16 +228,26 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff D1(if(je32_to_cpu(rd->hdr_crc) != crc32(0, rd, sizeof(struct jffs2_unknown_node)-4)) { printk(KERN_CRIT "Eep. CRC not correct in jffs2_write_dirent()\n"); BUG(); - }); + } + ); vecs[0].iov_base = rd; vecs[0].iov_len = sizeof(*rd); vecs[1].iov_base = (unsigned char *)name; vecs[1].iov_len = namelen; + jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); + + raw = jffs2_alloc_raw_node_ref(); + + if (!raw) + return ERR_PTR(-ENOMEM); + fd = jffs2_alloc_full_dirent(namelen+1); - if (!fd) + if (!fd) { + jffs2_free_raw_node_ref(raw); return ERR_PTR(-ENOMEM); + } fd->version = je32_to_cpu(rd->version); fd->ino = je32_to_cpu(rd->ino); @@ -228,9 +257,11 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff fd->name[namelen]=0; retry: - flash_ofs = write_ofs(c); + fd->raw = raw; - jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); + raw->flash_offset = flash_ofs; + raw->__totlen = PAD(sizeof(*rd)+namelen); + raw->next_phys = NULL; if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(rd->version) < f->highest_version)) { BUG_ON(!retried); @@ -249,11 +280,15 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff sizeof(*rd)+namelen, flash_ofs, ret, retlen); /* Mark the space as dirtied */ if (retlen) { - jffs2_add_physical_node_ref(c, flash_ofs | REF_OBSOLETE, PAD(sizeof(*rd)+namelen), NULL); + raw->next_in_ino = NULL; + raw->flash_offset |= REF_OBSOLETE; + jffs2_add_physical_node_ref(c, raw); + jffs2_mark_node_obsolete(c, raw); } else { - printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", flash_ofs); + printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset); + jffs2_free_raw_node_ref(raw); } - if (!retried) { + if (!retried && (raw = jffs2_alloc_raw_node_ref())) { /* Try to reallocate space and retry */ uint32_t dummy; struct jffs2_eraseblock *jeb = &c->blocks[flash_ofs / c->sector_size]; @@ -266,33 +301,39 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff jffs2_dbg_acct_paranoia_check(c, jeb); if (alloc_mode == ALLOC_GC) { - ret = jffs2_reserve_space_gc(c, sizeof(*rd) + namelen, &dummy, - JFFS2_SUMMARY_DIRENT_SIZE(namelen)); + ret = jffs2_reserve_space_gc(c, sizeof(*rd) + namelen, &flash_ofs, + &dummy, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); } else { /* Locking pain */ up(&f->sem); jffs2_complete_reservation(c); - ret = jffs2_reserve_space(c, sizeof(*rd) + namelen, &dummy, - alloc_mode, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); + ret = jffs2_reserve_space(c, sizeof(*rd) + namelen, &flash_ofs, + &dummy, alloc_mode, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); down(&f->sem); } if (!ret) { - flash_ofs = write_ofs(c); D1(printk(KERN_DEBUG "Allocated space at 0x%08x to retry failed write.\n", flash_ofs)); jffs2_dbg_acct_sanity_check(c,jeb); jffs2_dbg_acct_paranoia_check(c, jeb); goto retry; } D1(printk(KERN_DEBUG "Failed to allocate space to retry failed write: %d!\n", ret)); + jffs2_free_raw_node_ref(raw); } /* Release the full_dnode which is now useless, and return */ jffs2_free_full_dirent(fd); return ERR_PTR(ret?ret:-EIO); } /* Mark the space used */ - fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, PAD(sizeof(*rd)+namelen), f->inocache); + raw->flash_offset |= REF_PRISTINE; + jffs2_add_physical_node_ref(c, raw); + + spin_lock(&c->erase_completion_lock); + raw->next_in_ino = f->inocache->nodes; + f->inocache->nodes = raw; + spin_unlock(&c->erase_completion_lock); if (retried) { jffs2_dbg_acct_sanity_check(c,NULL); @@ -318,14 +359,14 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_full_dnode *fn; unsigned char *comprbuf = NULL; uint16_t comprtype = JFFS2_COMPR_NONE; - uint32_t alloclen; + uint32_t phys_ofs, alloclen; uint32_t datalen, cdatalen; int retried = 0; retry: D2(printk(KERN_DEBUG "jffs2_commit_write() loop: 0x%x to write to 0x%x\n", writelen, offset)); - ret = jffs2_reserve_space(c, sizeof(*ri) + JFFS2_MIN_DATA_LEN, + ret = jffs2_reserve_space(c, sizeof(*ri) + JFFS2_MIN_DATA_LEN, &phys_ofs, &alloclen, ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); if (ret) { D1(printk(KERN_DEBUG "jffs2_reserve_space returned %d\n", ret)); @@ -353,7 +394,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); ri->data_crc = cpu_to_je32(crc32(0, comprbuf, cdatalen)); - fn = jffs2_write_dnode(c, f, ri, comprbuf, cdatalen, ALLOC_NORETRY); + fn = jffs2_write_dnode(c, f, ri, comprbuf, cdatalen, phys_ofs, ALLOC_NORETRY); jffs2_free_comprbuf(comprbuf, buf); @@ -407,13 +448,13 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str struct jffs2_raw_dirent *rd; struct jffs2_full_dnode *fn; struct jffs2_full_dirent *fd; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; /* Try to reserve enough space for both node and dirent. * Just the node will do for now, though */ - ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, + ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); D1(printk(KERN_DEBUG "jffs2_do_create(): reserved 0x%x bytes\n", alloclen)); if (ret) { @@ -424,7 +465,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str ri->data_crc = cpu_to_je32(0); ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); - fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); + fn = jffs2_write_dnode(c, f, ri, NULL, 0, phys_ofs, ALLOC_NORMAL); D1(printk(KERN_DEBUG "jffs2_do_create created file with mode 0x%x\n", jemode_to_cpu(ri->mode))); @@ -443,7 +484,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str up(&f->sem); jffs2_complete_reservation(c); - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { @@ -475,7 +516,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, ALLOC_NORMAL); + fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); jffs2_free_raw_dirent(rd); @@ -504,7 +545,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, { struct jffs2_raw_dirent *rd; struct jffs2_full_dirent *fd; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; if (1 /* alternative branch needs testing */ || @@ -515,7 +556,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, if (!rd) return -ENOMEM; - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_DELETION, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { jffs2_free_raw_dirent(rd); @@ -539,7 +580,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, ALLOC_DELETION); + fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_DELETION); jffs2_free_raw_dirent(rd); @@ -618,14 +659,14 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint { struct jffs2_raw_dirent *rd; struct jffs2_full_dirent *fd; - uint32_t alloclen; + uint32_t alloclen, phys_ofs; int ret; rd = jffs2_alloc_raw_dirent(); if (!rd) return -ENOMEM; - ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, + ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); if (ret) { jffs2_free_raw_dirent(rd); @@ -651,7 +692,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8)); rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); - fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, ALLOC_NORMAL); + fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); jffs2_free_raw_dirent(rd); diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c deleted file mode 100644 index 4da09ce1d..000000000 --- a/fs/jffs2/xattr.c +++ /dev/null @@ -1,1324 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "nodelist.h" -/* -------- xdatum related functions ---------------- - * xattr_datum_hashkey(xprefix, xname, xvalue, xsize) - * is used to calcurate xdatum hashkey. The reminder of hashkey into XATTRINDEX_HASHSIZE is - * the index of the xattr name/value pair cache (c->xattrindex). - * is_xattr_datum_unchecked(c, xd) - * returns 1, if xdatum contains any unchecked raw nodes. if all raw nodes are not - * unchecked, it returns 0. - * unload_xattr_datum(c, xd) - * is used to release xattr name/value pair and detach from c->xattrindex. - * reclaim_xattr_datum(c) - * is used to reclaim xattr name/value pairs on the xattr name/value pair cache when - * memory usage by cache is over c->xdatum_mem_threshold. Currentry, this threshold - * is hard coded as 32KiB. - * do_verify_xattr_datum(c, xd) - * is used to load the xdatum informations without name/value pair from the medium. - * It's necessary once, because those informations are not collected during mounting - * process when EBS is enabled. - * 0 will be returned, if success. An negative return value means recoverable error, and - * positive return value means unrecoverable error. Thus, caller must remove this xdatum - * and xref when it returned positive value. - * do_load_xattr_datum(c, xd) - * is used to load name/value pair from the medium. - * The meanings of return value is same as do_verify_xattr_datum(). - * load_xattr_datum(c, xd) - * is used to be as a wrapper of do_verify_xattr_datum() and do_load_xattr_datum(). - * If xd need to call do_verify_xattr_datum() at first, it's called before calling - * do_load_xattr_datum(). The meanings of return value is same as do_verify_xattr_datum(). - * save_xattr_datum(c, xd) - * is used to write xdatum to medium. xd->version will be incremented. - * create_xattr_datum(c, xprefix, xname, xvalue, xsize) - * is used to create new xdatum and write to medium. - * unrefer_xattr_datum(c, xd) - * is used to delete a xdatum. When nobody refers this xdatum, JFFS2_XFLAGS_DEAD - * is set on xd->flags and chained xattr_dead_list or release it immediately. - * In the first case, the garbage collector release it later. - * -------------------------------------------------- */ -static uint32_t xattr_datum_hashkey(int xprefix, const char *xname, const char *xvalue, int xsize) -{ - int name_len = strlen(xname); - - return crc32(xprefix, xname, name_len) ^ crc32(xprefix, xvalue, xsize); -} - -static int is_xattr_datum_unchecked(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - struct jffs2_raw_node_ref *raw; - int rc = 0; - - spin_lock(&c->erase_completion_lock); - for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { - if (ref_flags(raw) == REF_UNCHECKED) { - rc = 1; - break; - } - } - spin_unlock(&c->erase_completion_lock); - return rc; -} - -static void unload_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - D1(dbg_xattr("%s: xid=%u, version=%u\n", __FUNCTION__, xd->xid, xd->version)); - if (xd->xname) { - c->xdatum_mem_usage -= (xd->name_len + 1 + xd->value_len); - kfree(xd->xname); - } - - list_del_init(&xd->xindex); - xd->hashkey = 0; - xd->xname = NULL; - xd->xvalue = NULL; -} - -static void reclaim_xattr_datum(struct jffs2_sb_info *c) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_xattr_datum *xd, *_xd; - uint32_t target, before; - static int index = 0; - int count; - - if (c->xdatum_mem_threshold > c->xdatum_mem_usage) - return; - - before = c->xdatum_mem_usage; - target = c->xdatum_mem_usage * 4 / 5; /* 20% reduction */ - for (count = 0; count < XATTRINDEX_HASHSIZE; count++) { - list_for_each_entry_safe(xd, _xd, &c->xattrindex[index], xindex) { - if (xd->flags & JFFS2_XFLAGS_HOT) { - xd->flags &= ~JFFS2_XFLAGS_HOT; - } else if (!(xd->flags & JFFS2_XFLAGS_BIND)) { - unload_xattr_datum(c, xd); - } - if (c->xdatum_mem_usage <= target) - goto out; - } - index = (index+1) % XATTRINDEX_HASHSIZE; - } - out: - JFFS2_NOTICE("xdatum_mem_usage from %u byte to %u byte (%u byte reclaimed)\n", - before, c->xdatum_mem_usage, before - c->xdatum_mem_usage); -} - -static int do_verify_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_eraseblock *jeb; - struct jffs2_raw_node_ref *raw; - struct jffs2_raw_xattr rx; - size_t readlen; - uint32_t crc, offset, totlen; - int rc; - - spin_lock(&c->erase_completion_lock); - offset = ref_offset(xd->node); - if (ref_flags(xd->node) == REF_PRISTINE) - goto complete; - spin_unlock(&c->erase_completion_lock); - - rc = jffs2_flash_read(c, offset, sizeof(rx), &readlen, (char *)&rx); - if (rc || readlen != sizeof(rx)) { - JFFS2_WARNING("jffs2_flash_read()=%d, req=%zu, read=%zu at %#08x\n", - rc, sizeof(rx), readlen, offset); - return rc ? rc : -EIO; - } - crc = crc32(0, &rx, sizeof(rx) - 4); - if (crc != je32_to_cpu(rx.node_crc)) { - JFFS2_ERROR("node CRC failed at %#08x, read=%#08x, calc=%#08x\n", - offset, je32_to_cpu(rx.hdr_crc), crc); - xd->flags |= JFFS2_XFLAGS_INVALID; - return EIO; - } - totlen = PAD(sizeof(rx) + rx.name_len + 1 + je16_to_cpu(rx.value_len)); - if (je16_to_cpu(rx.magic) != JFFS2_MAGIC_BITMASK - || je16_to_cpu(rx.nodetype) != JFFS2_NODETYPE_XATTR - || je32_to_cpu(rx.totlen) != totlen - || je32_to_cpu(rx.xid) != xd->xid - || je32_to_cpu(rx.version) != xd->version) { - JFFS2_ERROR("inconsistent xdatum at %#08x, magic=%#04x/%#04x, " - "nodetype=%#04x/%#04x, totlen=%u/%u, xid=%u/%u, version=%u/%u\n", - offset, je16_to_cpu(rx.magic), JFFS2_MAGIC_BITMASK, - je16_to_cpu(rx.nodetype), JFFS2_NODETYPE_XATTR, - je32_to_cpu(rx.totlen), totlen, - je32_to_cpu(rx.xid), xd->xid, - je32_to_cpu(rx.version), xd->version); - xd->flags |= JFFS2_XFLAGS_INVALID; - return EIO; - } - xd->xprefix = rx.xprefix; - xd->name_len = rx.name_len; - xd->value_len = je16_to_cpu(rx.value_len); - xd->data_crc = je32_to_cpu(rx.data_crc); - - spin_lock(&c->erase_completion_lock); - complete: - for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { - jeb = &c->blocks[ref_offset(raw) / c->sector_size]; - totlen = PAD(ref_totlen(c, jeb, raw)); - if (ref_flags(raw) == REF_UNCHECKED) { - c->unchecked_size -= totlen; c->used_size += totlen; - jeb->unchecked_size -= totlen; jeb->used_size += totlen; - } - raw->flash_offset = ref_offset(raw) | ((xd->node==raw) ? REF_PRISTINE : REF_NORMAL); - } - spin_unlock(&c->erase_completion_lock); - - /* unchecked xdatum is chained with c->xattr_unchecked */ - list_del_init(&xd->xindex); - - dbg_xattr("success on verfying xdatum (xid=%u, version=%u)\n", - xd->xid, xd->version); - - return 0; -} - -static int do_load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - char *data; - size_t readlen; - uint32_t crc, length; - int i, ret, retry = 0; - - BUG_ON(ref_flags(xd->node) != REF_PRISTINE); - BUG_ON(!list_empty(&xd->xindex)); - retry: - length = xd->name_len + 1 + xd->value_len; - data = kmalloc(length, GFP_KERNEL); - if (!data) - return -ENOMEM; - - ret = jffs2_flash_read(c, ref_offset(xd->node)+sizeof(struct jffs2_raw_xattr), - length, &readlen, data); - - if (ret || length!=readlen) { - JFFS2_WARNING("jffs2_flash_read() returned %d, request=%d, readlen=%zu, at %#08x\n", - ret, length, readlen, ref_offset(xd->node)); - kfree(data); - return ret ? ret : -EIO; - } - - data[xd->name_len] = '\0'; - crc = crc32(0, data, length); - if (crc != xd->data_crc) { - JFFS2_WARNING("node CRC failed (JFFS2_NODETYPE_XREF)" - " at %#08x, read: 0x%08x calculated: 0x%08x\n", - ref_offset(xd->node), xd->data_crc, crc); - kfree(data); - xd->flags |= JFFS2_XFLAGS_INVALID; - return EIO; - } - - xd->flags |= JFFS2_XFLAGS_HOT; - xd->xname = data; - xd->xvalue = data + xd->name_len+1; - - c->xdatum_mem_usage += length; - - xd->hashkey = xattr_datum_hashkey(xd->xprefix, xd->xname, xd->xvalue, xd->value_len); - i = xd->hashkey % XATTRINDEX_HASHSIZE; - list_add(&xd->xindex, &c->xattrindex[i]); - if (!retry) { - retry = 1; - reclaim_xattr_datum(c); - if (!xd->xname) - goto retry; - } - - dbg_xattr("success on loading xdatum (xid=%u, xprefix=%u, xname='%s')\n", - xd->xid, xd->xprefix, xd->xname); - - return 0; -} - -static int load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem); - * rc < 0 : recoverable error, try again - * rc = 0 : success - * rc > 0 : Unrecoverable error, this node should be deleted. - */ - int rc = 0; - - BUG_ON(xd->flags & JFFS2_XFLAGS_DEAD); - if (xd->xname) - return 0; - if (xd->flags & JFFS2_XFLAGS_INVALID) - return EIO; - if (unlikely(is_xattr_datum_unchecked(c, xd))) - rc = do_verify_xattr_datum(c, xd); - if (!rc) - rc = do_load_xattr_datum(c, xd); - return rc; -} - -static int save_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_raw_xattr rx; - struct kvec vecs[2]; - size_t length; - int rc, totlen; - uint32_t phys_ofs = write_ofs(c); - - BUG_ON(!xd->xname); - BUG_ON(xd->flags & (JFFS2_XFLAGS_DEAD|JFFS2_XFLAGS_INVALID)); - - vecs[0].iov_base = ℞ - vecs[0].iov_len = sizeof(rx); - vecs[1].iov_base = xd->xname; - vecs[1].iov_len = xd->name_len + 1 + xd->value_len; - totlen = vecs[0].iov_len + vecs[1].iov_len; - - /* Setup raw-xattr */ - memset(&rx, 0, sizeof(rx)); - rx.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); - rx.nodetype = cpu_to_je16(JFFS2_NODETYPE_XATTR); - rx.totlen = cpu_to_je32(PAD(totlen)); - rx.hdr_crc = cpu_to_je32(crc32(0, &rx, sizeof(struct jffs2_unknown_node) - 4)); - - rx.xid = cpu_to_je32(xd->xid); - rx.version = cpu_to_je32(++xd->version); - rx.xprefix = xd->xprefix; - rx.name_len = xd->name_len; - rx.value_len = cpu_to_je16(xd->value_len); - rx.data_crc = cpu_to_je32(crc32(0, vecs[1].iov_base, vecs[1].iov_len)); - rx.node_crc = cpu_to_je32(crc32(0, &rx, sizeof(struct jffs2_raw_xattr) - 4)); - - rc = jffs2_flash_writev(c, vecs, 2, phys_ofs, &length, 0); - if (rc || totlen != length) { - JFFS2_WARNING("jffs2_flash_writev()=%d, req=%u, wrote=%zu, at %#08x\n", - rc, totlen, length, phys_ofs); - rc = rc ? rc : -EIO; - if (length) - jffs2_add_physical_node_ref(c, phys_ofs | REF_OBSOLETE, PAD(totlen), NULL); - - return rc; - } - /* success */ - jffs2_add_physical_node_ref(c, phys_ofs | REF_PRISTINE, PAD(totlen), (void *)xd); - - dbg_xattr("success on saving xdatum (xid=%u, version=%u, xprefix=%u, xname='%s')\n", - xd->xid, xd->version, xd->xprefix, xd->xname); - - return 0; -} - -static struct jffs2_xattr_datum *create_xattr_datum(struct jffs2_sb_info *c, - int xprefix, const char *xname, - const char *xvalue, int xsize) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_xattr_datum *xd; - uint32_t hashkey, name_len; - char *data; - int i, rc; - - /* Search xattr_datum has same xname/xvalue by index */ - hashkey = xattr_datum_hashkey(xprefix, xname, xvalue, xsize); - i = hashkey % XATTRINDEX_HASHSIZE; - list_for_each_entry(xd, &c->xattrindex[i], xindex) { - if (xd->hashkey==hashkey - && xd->xprefix==xprefix - && xd->value_len==xsize - && !strcmp(xd->xname, xname) - && !memcmp(xd->xvalue, xvalue, xsize)) { - atomic_inc(&xd->refcnt); - return xd; - } - } - - /* Not found, Create NEW XATTR-Cache */ - name_len = strlen(xname); - - xd = jffs2_alloc_xattr_datum(); - if (!xd) - return ERR_PTR(-ENOMEM); - - data = kmalloc(name_len + 1 + xsize, GFP_KERNEL); - if (!data) { - jffs2_free_xattr_datum(xd); - return ERR_PTR(-ENOMEM); - } - strcpy(data, xname); - memcpy(data + name_len + 1, xvalue, xsize); - - atomic_set(&xd->refcnt, 1); - xd->xid = ++c->highest_xid; - xd->flags |= JFFS2_XFLAGS_HOT; - xd->xprefix = xprefix; - - xd->hashkey = hashkey; - xd->xname = data; - xd->xvalue = data + name_len + 1; - xd->name_len = name_len; - xd->value_len = xsize; - xd->data_crc = crc32(0, data, xd->name_len + 1 + xd->value_len); - - rc = save_xattr_datum(c, xd); - if (rc) { - kfree(xd->xname); - jffs2_free_xattr_datum(xd); - return ERR_PTR(rc); - } - - /* Insert Hash Index */ - i = hashkey % XATTRINDEX_HASHSIZE; - list_add(&xd->xindex, &c->xattrindex[i]); - - c->xdatum_mem_usage += (xd->name_len + 1 + xd->value_len); - reclaim_xattr_datum(c); - - return xd; -} - -static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) { - uint32_t xid = xd->xid, version = xd->version; - - unload_xattr_datum(c, xd); - xd->flags |= JFFS2_XFLAGS_DEAD; - if (xd->node == (void *)xd) { - BUG_ON(!(xd->flags & JFFS2_XFLAGS_INVALID)); - jffs2_free_xattr_datum(xd); - } else { - list_add(&xd->xindex, &c->xattr_dead_list); - } - spin_unlock(&c->erase_completion_lock); - - dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n", xid, version); - } -} - -/* -------- xref related functions ------------------ - * verify_xattr_ref(c, ref) - * is used to load xref information from medium. Because summary data does not - * contain xid/ino, it's necessary to verify once while mounting process. - * save_xattr_ref(c, ref) - * is used to write xref to medium. If delete marker is marked, it write - * a delete marker of xref into medium. - * create_xattr_ref(c, ic, xd) - * is used to create a new xref and write to medium. - * delete_xattr_ref(c, ref) - * is used to delete jffs2_xattr_ref. It marks xref XREF_DELETE_MARKER, - * and allows GC to reclaim those physical nodes. - * jffs2_xattr_delete_inode(c, ic) - * is called to remove xrefs related to obsolete inode when inode is unlinked. - * jffs2_xattr_free_inode(c, ic) - * is called to release xattr related objects when unmounting. - * check_xattr_ref_inode(c, ic) - * is used to confirm inode does not have duplicate xattr name/value pair. - * -------------------------------------------------- */ -static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) -{ - struct jffs2_eraseblock *jeb; - struct jffs2_raw_node_ref *raw; - struct jffs2_raw_xref rr; - size_t readlen; - uint32_t crc, offset, totlen; - int rc; - - spin_lock(&c->erase_completion_lock); - if (ref_flags(ref->node) != REF_UNCHECKED) - goto complete; - offset = ref_offset(ref->node); - spin_unlock(&c->erase_completion_lock); - - rc = jffs2_flash_read(c, offset, sizeof(rr), &readlen, (char *)&rr); - if (rc || sizeof(rr) != readlen) { - JFFS2_WARNING("jffs2_flash_read()=%d, req=%zu, read=%zu, at %#08x\n", - rc, sizeof(rr), readlen, offset); - return rc ? rc : -EIO; - } - /* obsolete node */ - crc = crc32(0, &rr, sizeof(rr) - 4); - if (crc != je32_to_cpu(rr.node_crc)) { - JFFS2_ERROR("node CRC failed at %#08x, read=%#08x, calc=%#08x\n", - offset, je32_to_cpu(rr.node_crc), crc); - return EIO; - } - if (je16_to_cpu(rr.magic) != JFFS2_MAGIC_BITMASK - || je16_to_cpu(rr.nodetype) != JFFS2_NODETYPE_XREF - || je32_to_cpu(rr.totlen) != PAD(sizeof(rr))) { - JFFS2_ERROR("inconsistent xref at %#08x, magic=%#04x/%#04x, " - "nodetype=%#04x/%#04x, totlen=%u/%zu\n", - offset, je16_to_cpu(rr.magic), JFFS2_MAGIC_BITMASK, - je16_to_cpu(rr.nodetype), JFFS2_NODETYPE_XREF, - je32_to_cpu(rr.totlen), PAD(sizeof(rr))); - return EIO; - } - ref->ino = je32_to_cpu(rr.ino); - ref->xid = je32_to_cpu(rr.xid); - ref->xseqno = je32_to_cpu(rr.xseqno); - if (ref->xseqno > c->highest_xseqno) - c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); - - spin_lock(&c->erase_completion_lock); - complete: - for (raw=ref->node; raw != (void *)ref; raw=raw->next_in_ino) { - jeb = &c->blocks[ref_offset(raw) / c->sector_size]; - totlen = PAD(ref_totlen(c, jeb, raw)); - if (ref_flags(raw) == REF_UNCHECKED) { - c->unchecked_size -= totlen; c->used_size += totlen; - jeb->unchecked_size -= totlen; jeb->used_size += totlen; - } - raw->flash_offset = ref_offset(raw) | ((ref->node==raw) ? REF_PRISTINE : REF_NORMAL); - } - spin_unlock(&c->erase_completion_lock); - - dbg_xattr("success on verifying xref (ino=%u, xid=%u) at %#08x\n", - ref->ino, ref->xid, ref_offset(ref->node)); - return 0; -} - -static int save_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_raw_xref rr; - size_t length; - uint32_t xseqno, phys_ofs = write_ofs(c); - int ret; - - rr.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); - rr.nodetype = cpu_to_je16(JFFS2_NODETYPE_XREF); - rr.totlen = cpu_to_je32(PAD(sizeof(rr))); - rr.hdr_crc = cpu_to_je32(crc32(0, &rr, sizeof(struct jffs2_unknown_node) - 4)); - - xseqno = (c->highest_xseqno += 2); - if (is_xattr_ref_dead(ref)) { - xseqno |= XREF_DELETE_MARKER; - rr.ino = cpu_to_je32(ref->ino); - rr.xid = cpu_to_je32(ref->xid); - } else { - rr.ino = cpu_to_je32(ref->ic->ino); - rr.xid = cpu_to_je32(ref->xd->xid); - } - rr.xseqno = cpu_to_je32(xseqno); - rr.node_crc = cpu_to_je32(crc32(0, &rr, sizeof(rr) - 4)); - - ret = jffs2_flash_write(c, phys_ofs, sizeof(rr), &length, (char *)&rr); - if (ret || sizeof(rr) != length) { - JFFS2_WARNING("jffs2_flash_write() returned %d, request=%zu, retlen=%zu, at %#08x\n", - ret, sizeof(rr), length, phys_ofs); - ret = ret ? ret : -EIO; - if (length) - jffs2_add_physical_node_ref(c, phys_ofs | REF_OBSOLETE, PAD(sizeof(rr)), NULL); - - return ret; - } - /* success */ - ref->xseqno = xseqno; - jffs2_add_physical_node_ref(c, phys_ofs | REF_PRISTINE, PAD(sizeof(rr)), (void *)ref); - - dbg_xattr("success on saving xref (ino=%u, xid=%u)\n", ref->ic->ino, ref->xd->xid); - - return 0; -} - -static struct jffs2_xattr_ref *create_xattr_ref(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic, - struct jffs2_xattr_datum *xd) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_xattr_ref *ref; - int ret; - - ref = jffs2_alloc_xattr_ref(); - if (!ref) - return ERR_PTR(-ENOMEM); - ref->ic = ic; - ref->xd = xd; - - ret = save_xattr_ref(c, ref); - if (ret) { - jffs2_free_xattr_ref(ref); - return ERR_PTR(ret); - } - - /* Chain to inode */ - ref->next = ic->xref; - ic->xref = ref; - - return ref; /* success */ -} - -static void delete_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) -{ - /* must be called under down_write(xattr_sem) */ - struct jffs2_xattr_datum *xd; - - xd = ref->xd; - ref->xseqno |= XREF_DELETE_MARKER; - ref->ino = ref->ic->ino; - ref->xid = ref->xd->xid; - spin_lock(&c->erase_completion_lock); - ref->next = c->xref_dead_list; - c->xref_dead_list = ref; - spin_unlock(&c->erase_completion_lock); - - dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) was removed.\n", - ref->ino, ref->xid, ref->xseqno); - - unrefer_xattr_datum(c, xd); -} - -void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) -{ - /* It's called from jffs2_clear_inode() on inode removing. - When an inode with XATTR is removed, those XATTRs must be removed. */ - struct jffs2_xattr_ref *ref, *_ref; - - if (!ic || ic->nlink > 0) - return; - - down_write(&c->xattr_sem); - for (ref = ic->xref; ref; ref = _ref) { - _ref = ref->next; - delete_xattr_ref(c, ref); - } - ic->xref = NULL; - up_write(&c->xattr_sem); -} - -void jffs2_xattr_free_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) -{ - /* It's called from jffs2_free_ino_caches() until unmounting FS. */ - struct jffs2_xattr_datum *xd; - struct jffs2_xattr_ref *ref, *_ref; - - down_write(&c->xattr_sem); - for (ref = ic->xref; ref; ref = _ref) { - _ref = ref->next; - xd = ref->xd; - if (atomic_dec_and_test(&xd->refcnt)) { - unload_xattr_datum(c, xd); - jffs2_free_xattr_datum(xd); - } - jffs2_free_xattr_ref(ref); - } - ic->xref = NULL; - up_write(&c->xattr_sem); -} - -static int check_xattr_ref_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic) -{ - /* success of check_xattr_ref_inode() means taht inode (ic) dose not have - * duplicate name/value pairs. If duplicate name/value pair would be found, - * one will be removed. - */ - struct jffs2_xattr_ref *ref, *cmp, **pref, **pcmp; - int rc = 0; - - if (likely(ic->flags & INO_FLAGS_XATTR_CHECKED)) - return 0; - down_write(&c->xattr_sem); - retry: - rc = 0; - for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { - if (!ref->xd->xname) { - rc = load_xattr_datum(c, ref->xd); - if (unlikely(rc > 0)) { - *pref = ref->next; - delete_xattr_ref(c, ref); - goto retry; - } else if (unlikely(rc < 0)) - goto out; - } - for (cmp=ref->next, pcmp=&ref->next; cmp; pcmp=&cmp->next, cmp=cmp->next) { - if (!cmp->xd->xname) { - ref->xd->flags |= JFFS2_XFLAGS_BIND; - rc = load_xattr_datum(c, cmp->xd); - ref->xd->flags &= ~JFFS2_XFLAGS_BIND; - if (unlikely(rc > 0)) { - *pcmp = cmp->next; - delete_xattr_ref(c, cmp); - goto retry; - } else if (unlikely(rc < 0)) - goto out; - } - if (ref->xd->xprefix == cmp->xd->xprefix - && !strcmp(ref->xd->xname, cmp->xd->xname)) { - if (ref->xseqno > cmp->xseqno) { - *pcmp = cmp->next; - delete_xattr_ref(c, cmp); - } else { - *pref = ref->next; - delete_xattr_ref(c, ref); - } - goto retry; - } - } - } - ic->flags |= INO_FLAGS_XATTR_CHECKED; - out: - up_write(&c->xattr_sem); - - return rc; -} - -/* -------- xattr subsystem functions --------------- - * jffs2_init_xattr_subsystem(c) - * is used to initialize semaphore and list_head, and some variables. - * jffs2_find_xattr_datum(c, xid) - * is used to lookup xdatum while scanning process. - * jffs2_clear_xattr_subsystem(c) - * is used to release any xattr related objects. - * jffs2_build_xattr_subsystem(c) - * is used to associate xdatum and xref while super block building process. - * jffs2_setup_xattr_datum(c, xid, version) - * is used to insert xdatum while scanning process. - * -------------------------------------------------- */ -void jffs2_init_xattr_subsystem(struct jffs2_sb_info *c) -{ - int i; - - for (i=0; i < XATTRINDEX_HASHSIZE; i++) - INIT_LIST_HEAD(&c->xattrindex[i]); - INIT_LIST_HEAD(&c->xattr_unchecked); - INIT_LIST_HEAD(&c->xattr_dead_list); - c->xref_dead_list = NULL; - c->xref_temp = NULL; - - init_rwsem(&c->xattr_sem); - c->highest_xid = 0; - c->highest_xseqno = 0; - c->xdatum_mem_usage = 0; - c->xdatum_mem_threshold = 32 * 1024; /* Default 32KB */ -} - -static struct jffs2_xattr_datum *jffs2_find_xattr_datum(struct jffs2_sb_info *c, uint32_t xid) -{ - struct jffs2_xattr_datum *xd; - int i = xid % XATTRINDEX_HASHSIZE; - - /* It's only used in scanning/building process. */ - BUG_ON(!(c->flags & (JFFS2_SB_FLAG_SCANNING|JFFS2_SB_FLAG_BUILDING))); - - list_for_each_entry(xd, &c->xattrindex[i], xindex) { - if (xd->xid==xid) - return xd; - } - return NULL; -} - -void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c) -{ - struct jffs2_xattr_datum *xd, *_xd; - struct jffs2_xattr_ref *ref, *_ref; - int i; - - for (ref=c->xref_temp; ref; ref = _ref) { - _ref = ref->next; - jffs2_free_xattr_ref(ref); - } - - for (ref=c->xref_dead_list; ref; ref = _ref) { - _ref = ref->next; - jffs2_free_xattr_ref(ref); - } - - for (i=0; i < XATTRINDEX_HASHSIZE; i++) { - list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) { - list_del(&xd->xindex); - if (xd->xname) - kfree(xd->xname); - jffs2_free_xattr_datum(xd); - } - } - - list_for_each_entry_safe(xd, _xd, &c->xattr_dead_list, xindex) { - list_del(&xd->xindex); - jffs2_free_xattr_datum(xd); - } -} - -#define XREF_TMPHASH_SIZE (128) -void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c) -{ - struct jffs2_xattr_ref *ref, *_ref; - struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE]; - struct jffs2_xattr_datum *xd, *_xd; - struct jffs2_inode_cache *ic; - struct jffs2_raw_node_ref *raw; - int i, xdatum_count = 0, xdatum_unchecked_count = 0, xref_count = 0; - int xdatum_orphan_count = 0, xref_orphan_count = 0, xref_dead_count = 0; - - BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING)); - - /* Phase.1 : Merge same xref */ - for (i=0; i < XREF_TMPHASH_SIZE; i++) - xref_tmphash[i] = NULL; - for (ref=c->xref_temp; ref; ref=_ref) { - struct jffs2_xattr_ref *tmp; - - _ref = ref->next; - if (ref_flags(ref->node) != REF_PRISTINE) { - if (verify_xattr_ref(c, ref)) { - BUG_ON(ref->node->next_in_ino != (void *)ref); - ref->node->next_in_ino = NULL; - jffs2_mark_node_obsolete(c, ref->node); - jffs2_free_xattr_ref(ref); - continue; - } - } - - i = (ref->ino ^ ref->xid) % XREF_TMPHASH_SIZE; - for (tmp=xref_tmphash[i]; tmp; tmp=tmp->next) { - if (tmp->ino == ref->ino && tmp->xid == ref->xid) - break; - } - if (tmp) { - raw = ref->node; - if (ref->xseqno > tmp->xseqno) { - tmp->xseqno = ref->xseqno; - raw->next_in_ino = tmp->node; - tmp->node = raw; - } else { - raw->next_in_ino = tmp->node->next_in_ino; - tmp->node->next_in_ino = raw; - } - jffs2_free_xattr_ref(ref); - continue; - } else { - ref->next = xref_tmphash[i]; - xref_tmphash[i] = ref; - } - } - c->xref_temp = NULL; - - /* Phase.2 : Bind xref with inode_cache and xattr_datum */ - for (i=0; i < XREF_TMPHASH_SIZE; i++) { - for (ref=xref_tmphash[i]; ref; ref=_ref) { - xref_count++; - _ref = ref->next; - if (is_xattr_ref_dead(ref)) { - ref->next = c->xref_dead_list; - c->xref_dead_list = ref; - xref_dead_count++; - continue; - } - /* At this point, ref->xid and ref->ino contain XID and inode number. - ref->xd and ref->ic are not valid yet. */ - xd = jffs2_find_xattr_datum(c, ref->xid); - ic = jffs2_get_ino_cache(c, ref->ino); - if (!xd || !ic) { - dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) is orphan.\n", - ref->ino, ref->xid, ref->xseqno); - ref->xseqno |= XREF_DELETE_MARKER; - ref->next = c->xref_dead_list; - c->xref_dead_list = ref; - xref_orphan_count++; - continue; - } - ref->xd = xd; - ref->ic = ic; - atomic_inc(&xd->refcnt); - ref->next = ic->xref; - ic->xref = ref; - } - } - - /* Phase.3 : Link unchecked xdatum to xattr_unchecked list */ - for (i=0; i < XATTRINDEX_HASHSIZE; i++) { - list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) { - xdatum_count++; - list_del_init(&xd->xindex); - if (!atomic_read(&xd->refcnt)) { - dbg_xattr("xdatum(xid=%u, version=%u) is orphan.\n", - xd->xid, xd->version); - xd->flags |= JFFS2_XFLAGS_DEAD; - list_add(&xd->xindex, &c->xattr_unchecked); - xdatum_orphan_count++; - continue; - } - if (is_xattr_datum_unchecked(c, xd)) { - dbg_xattr("unchecked xdatum(xid=%u, version=%u)\n", - xd->xid, xd->version); - list_add(&xd->xindex, &c->xattr_unchecked); - xdatum_unchecked_count++; - } - } - } - /* build complete */ - JFFS2_NOTICE("complete building xattr subsystem, %u of xdatum" - " (%u unchecked, %u orphan) and " - "%u of xref (%u dead, %u orphan) found.\n", - xdatum_count, xdatum_unchecked_count, xdatum_orphan_count, - xref_count, xref_dead_count, xref_orphan_count); -} - -struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, - uint32_t xid, uint32_t version) -{ - struct jffs2_xattr_datum *xd; - - xd = jffs2_find_xattr_datum(c, xid); - if (!xd) { - xd = jffs2_alloc_xattr_datum(); - if (!xd) - return ERR_PTR(-ENOMEM); - xd->xid = xid; - xd->version = version; - if (xd->xid > c->highest_xid) - c->highest_xid = xd->xid; - list_add_tail(&xd->xindex, &c->xattrindex[xid % XATTRINDEX_HASHSIZE]); - } - return xd; -} - -/* -------- xattr subsystem functions --------------- - * xprefix_to_handler(xprefix) - * is used to translate xprefix into xattr_handler. - * jffs2_listxattr(dentry, buffer, size) - * is an implementation of listxattr handler on jffs2. - * do_jffs2_getxattr(inode, xprefix, xname, buffer, size) - * is an implementation of getxattr handler on jffs2. - * do_jffs2_setxattr(inode, xprefix, xname, buffer, size, flags) - * is an implementation of setxattr handler on jffs2. - * -------------------------------------------------- */ -struct xattr_handler *jffs2_xattr_handlers[] = { - &jffs2_user_xattr_handler, -#ifdef CONFIG_JFFS2_FS_SECURITY - &jffs2_security_xattr_handler, -#endif -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - &jffs2_acl_access_xattr_handler, - &jffs2_acl_default_xattr_handler, -#endif - &jffs2_trusted_xattr_handler, - NULL -}; - -static struct xattr_handler *xprefix_to_handler(int xprefix) { - struct xattr_handler *ret; - - switch (xprefix) { - case JFFS2_XPREFIX_USER: - ret = &jffs2_user_xattr_handler; - break; -#ifdef CONFIG_JFFS2_FS_SECURITY - case JFFS2_XPREFIX_SECURITY: - ret = &jffs2_security_xattr_handler; - break; -#endif -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - case JFFS2_XPREFIX_ACL_ACCESS: - ret = &jffs2_acl_access_xattr_handler; - break; - case JFFS2_XPREFIX_ACL_DEFAULT: - ret = &jffs2_acl_default_xattr_handler; - break; -#endif - case JFFS2_XPREFIX_TRUSTED: - ret = &jffs2_trusted_xattr_handler; - break; - default: - ret = NULL; - break; - } - return ret; -} - -ssize_t jffs2_listxattr(struct dentry *dentry, char *buffer, size_t size) -{ - struct inode *inode = dentry->d_inode; - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); - struct jffs2_inode_cache *ic = f->inocache; - struct jffs2_xattr_ref *ref, **pref; - struct jffs2_xattr_datum *xd; - struct xattr_handler *xhandle; - ssize_t len, rc; - int retry = 0; - - rc = check_xattr_ref_inode(c, ic); - if (unlikely(rc)) - return rc; - - down_read(&c->xattr_sem); - retry: - len = 0; - for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { - BUG_ON(ref->ic != ic); - xd = ref->xd; - if (!xd->xname) { - /* xdatum is unchached */ - if (!retry) { - retry = 1; - up_read(&c->xattr_sem); - down_write(&c->xattr_sem); - goto retry; - } else { - rc = load_xattr_datum(c, xd); - if (unlikely(rc > 0)) { - *pref = ref->next; - delete_xattr_ref(c, ref); - goto retry; - } else if (unlikely(rc < 0)) - goto out; - } - } - xhandle = xprefix_to_handler(xd->xprefix); - if (!xhandle) - continue; - if (buffer) { - rc = xhandle->list(inode, buffer+len, size-len, xd->xname, xd->name_len); - } else { - rc = xhandle->list(inode, NULL, 0, xd->xname, xd->name_len); - } - if (rc < 0) - goto out; - len += rc; - } - rc = len; - out: - if (!retry) { - up_read(&c->xattr_sem); - } else { - up_write(&c->xattr_sem); - } - return rc; -} - -int do_jffs2_getxattr(struct inode *inode, int xprefix, const char *xname, - char *buffer, size_t size) -{ - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); - struct jffs2_inode_cache *ic = f->inocache; - struct jffs2_xattr_datum *xd; - struct jffs2_xattr_ref *ref, **pref; - int rc, retry = 0; - - rc = check_xattr_ref_inode(c, ic); - if (unlikely(rc)) - return rc; - - down_read(&c->xattr_sem); - retry: - for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { - BUG_ON(ref->ic!=ic); - - xd = ref->xd; - if (xd->xprefix != xprefix) - continue; - if (!xd->xname) { - /* xdatum is unchached */ - if (!retry) { - retry = 1; - up_read(&c->xattr_sem); - down_write(&c->xattr_sem); - goto retry; - } else { - rc = load_xattr_datum(c, xd); - if (unlikely(rc > 0)) { - *pref = ref->next; - delete_xattr_ref(c, ref); - goto retry; - } else if (unlikely(rc < 0)) { - goto out; - } - } - } - if (!strcmp(xname, xd->xname)) { - rc = xd->value_len; - if (buffer) { - if (size < rc) { - rc = -ERANGE; - } else { - memcpy(buffer, xd->xvalue, rc); - } - } - goto out; - } - } - rc = -ENODATA; - out: - if (!retry) { - up_read(&c->xattr_sem); - } else { - up_write(&c->xattr_sem); - } - return rc; -} - -int do_jffs2_setxattr(struct inode *inode, int xprefix, const char *xname, - const char *buffer, size_t size, int flags) -{ - struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); - struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb); - struct jffs2_inode_cache *ic = f->inocache; - struct jffs2_xattr_datum *xd; - struct jffs2_xattr_ref *ref, *newref, **pref; - uint32_t length, request; - int rc; - - rc = check_xattr_ref_inode(c, ic); - if (unlikely(rc)) - return rc; - - request = PAD(sizeof(struct jffs2_raw_xattr) + strlen(xname) + 1 + size); - rc = jffs2_reserve_space(c, request, &length, - ALLOC_NORMAL, JFFS2_SUMMARY_XATTR_SIZE); - if (rc) { - JFFS2_WARNING("jffs2_reserve_space()=%d, request=%u\n", rc, request); - return rc; - } - - /* Find existing xattr */ - down_write(&c->xattr_sem); - retry: - for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { - xd = ref->xd; - if (xd->xprefix != xprefix) - continue; - if (!xd->xname) { - rc = load_xattr_datum(c, xd); - if (unlikely(rc > 0)) { - *pref = ref->next; - delete_xattr_ref(c, ref); - goto retry; - } else if (unlikely(rc < 0)) - goto out; - } - if (!strcmp(xd->xname, xname)) { - if (flags & XATTR_CREATE) { - rc = -EEXIST; - goto out; - } - if (!buffer) { - ref->ino = ic->ino; - ref->xid = xd->xid; - ref->xseqno |= XREF_DELETE_MARKER; - rc = save_xattr_ref(c, ref); - if (!rc) { - *pref = ref->next; - spin_lock(&c->erase_completion_lock); - ref->next = c->xref_dead_list; - c->xref_dead_list = ref; - spin_unlock(&c->erase_completion_lock); - unrefer_xattr_datum(c, xd); - } else { - ref->ic = ic; - ref->xd = xd; - ref->xseqno &= ~XREF_DELETE_MARKER; - } - goto out; - } - goto found; - } - } - /* not found */ - if (flags & XATTR_REPLACE) { - rc = -ENODATA; - goto out; - } - if (!buffer) { - rc = -ENODATA; - goto out; - } - found: - xd = create_xattr_datum(c, xprefix, xname, buffer, size); - if (IS_ERR(xd)) { - rc = PTR_ERR(xd); - goto out; - } - up_write(&c->xattr_sem); - jffs2_complete_reservation(c); - - /* create xattr_ref */ - request = PAD(sizeof(struct jffs2_raw_xref)); - rc = jffs2_reserve_space(c, request, &length, - ALLOC_NORMAL, JFFS2_SUMMARY_XREF_SIZE); - down_write(&c->xattr_sem); - if (rc) { - JFFS2_WARNING("jffs2_reserve_space()=%d, request=%u\n", rc, request); - unrefer_xattr_datum(c, xd); - up_write(&c->xattr_sem); - return rc; - } - if (ref) - *pref = ref->next; - newref = create_xattr_ref(c, ic, xd); - if (IS_ERR(newref)) { - if (ref) { - ref->next = ic->xref; - ic->xref = ref; - } - rc = PTR_ERR(newref); - unrefer_xattr_datum(c, xd); - } else if (ref) { - delete_xattr_ref(c, ref); - } - out: - up_write(&c->xattr_sem); - jffs2_complete_reservation(c); - return rc; -} - -/* -------- garbage collector functions ------------- - * jffs2_garbage_collect_xattr_datum(c, xd, raw) - * is used to move xdatum into new node. - * jffs2_garbage_collect_xattr_ref(c, ref, raw) - * is used to move xref into new node. - * jffs2_verify_xattr(c) - * is used to call do_verify_xattr_datum() before garbage collecting. - * jffs2_release_xattr_datum(c, xd) - * is used to release an in-memory object of xdatum. - * jffs2_release_xattr_ref(c, ref) - * is used to release an in-memory object of xref. - * -------------------------------------------------- */ -int jffs2_garbage_collect_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd, - struct jffs2_raw_node_ref *raw) -{ - uint32_t totlen, length, old_ofs; - int rc = 0; - - down_write(&c->xattr_sem); - if (xd->node != raw) - goto out; - if (xd->flags & (JFFS2_XFLAGS_DEAD|JFFS2_XFLAGS_INVALID)) - goto out; - - rc = load_xattr_datum(c, xd); - if (unlikely(rc)) { - rc = (rc > 0) ? 0 : rc; - goto out; - } - old_ofs = ref_offset(xd->node); - totlen = PAD(sizeof(struct jffs2_raw_xattr) - + xd->name_len + 1 + xd->value_len); - rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XATTR_SIZE); - if (rc) { - JFFS2_WARNING("jffs2_reserve_space_gc()=%d, request=%u\n", rc, totlen); - goto out; - } - rc = save_xattr_datum(c, xd); - if (!rc) - dbg_xattr("xdatum (xid=%u, version=%u) GC'ed from %#08x to %08x\n", - xd->xid, xd->version, old_ofs, ref_offset(xd->node)); - out: - if (!rc) - jffs2_mark_node_obsolete(c, raw); - up_write(&c->xattr_sem); - return rc; -} - -int jffs2_garbage_collect_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref, - struct jffs2_raw_node_ref *raw) -{ - uint32_t totlen, length, old_ofs; - int rc = 0; - - down_write(&c->xattr_sem); - BUG_ON(!ref->node); - - if (ref->node != raw) - goto out; - if (is_xattr_ref_dead(ref) && (raw->next_in_ino == (void *)ref)) - goto out; - - old_ofs = ref_offset(ref->node); - totlen = ref_totlen(c, c->gcblock, ref->node); - - rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XREF_SIZE); - if (rc) { - JFFS2_WARNING("%s: jffs2_reserve_space_gc() = %d, request = %u\n", - __FUNCTION__, rc, totlen); - rc = rc ? rc : -EBADFD; - goto out; - } - rc = save_xattr_ref(c, ref); - if (!rc) - dbg_xattr("xref (ino=%u, xid=%u) GC'ed from %#08x to %08x\n", - ref->ic->ino, ref->xd->xid, old_ofs, ref_offset(ref->node)); - out: - if (!rc) - jffs2_mark_node_obsolete(c, raw); - up_write(&c->xattr_sem); - return rc; -} - -int jffs2_verify_xattr(struct jffs2_sb_info *c) -{ - struct jffs2_xattr_datum *xd, *_xd; - struct jffs2_eraseblock *jeb; - struct jffs2_raw_node_ref *raw; - uint32_t totlen; - int rc; - - down_write(&c->xattr_sem); - list_for_each_entry_safe(xd, _xd, &c->xattr_unchecked, xindex) { - rc = do_verify_xattr_datum(c, xd); - if (rc < 0) - continue; - list_del_init(&xd->xindex); - spin_lock(&c->erase_completion_lock); - for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { - if (ref_flags(raw) != REF_UNCHECKED) - continue; - jeb = &c->blocks[ref_offset(raw) / c->sector_size]; - totlen = PAD(ref_totlen(c, jeb, raw)); - c->unchecked_size -= totlen; c->used_size += totlen; - jeb->unchecked_size -= totlen; jeb->used_size += totlen; - raw->flash_offset = ref_offset(raw) - | ((xd->node == (void *)raw) ? REF_PRISTINE : REF_NORMAL); - } - if (xd->flags & JFFS2_XFLAGS_DEAD) - list_add(&xd->xindex, &c->xattr_dead_list); - spin_unlock(&c->erase_completion_lock); - } - up_write(&c->xattr_sem); - return list_empty(&c->xattr_unchecked) ? 1 : 0; -} - -void jffs2_release_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) -{ - /* must be called under spin_lock(&c->erase_completion_lock) */ - if (atomic_read(&xd->refcnt) || xd->node != (void *)xd) - return; - - list_del(&xd->xindex); - jffs2_free_xattr_datum(xd); -} - -void jffs2_release_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) -{ - /* must be called under spin_lock(&c->erase_completion_lock) */ - struct jffs2_xattr_ref *tmp, **ptmp; - - if (ref->node != (void *)ref) - return; - - for (tmp=c->xref_dead_list, ptmp=&c->xref_dead_list; tmp; ptmp=&tmp->next, tmp=tmp->next) { - if (ref == tmp) { - *ptmp = tmp->next; - break; - } - } - jffs2_free_xattr_ref(ref); -} diff --git a/fs/jffs2/xattr.h b/fs/jffs2/xattr.h deleted file mode 100644 index 06a5c69dc..000000000 --- a/fs/jffs2/xattr.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#ifndef _JFFS2_FS_XATTR_H_ -#define _JFFS2_FS_XATTR_H_ - -#include -#include - -#define JFFS2_XFLAGS_HOT (0x01) /* This datum is HOT */ -#define JFFS2_XFLAGS_BIND (0x02) /* This datum is not reclaimed */ -#define JFFS2_XFLAGS_DEAD (0x40) /* This datum is already dead */ -#define JFFS2_XFLAGS_INVALID (0x80) /* This datum contains crc error */ - -struct jffs2_xattr_datum -{ - void *always_null; - struct jffs2_raw_node_ref *node; - uint8_t class; - uint8_t flags; - uint16_t xprefix; /* see JFFS2_XATTR_PREFIX_* */ - - struct list_head xindex; /* chained from c->xattrindex[n] */ - atomic_t refcnt; /* # of xattr_ref refers this */ - uint32_t xid; - uint32_t version; - - uint32_t data_crc; - uint32_t hashkey; - char *xname; /* XATTR name without prefix */ - uint32_t name_len; /* length of xname */ - char *xvalue; /* XATTR value */ - uint32_t value_len; /* length of xvalue */ -}; - -struct jffs2_inode_cache; -struct jffs2_xattr_ref -{ - void *always_null; - struct jffs2_raw_node_ref *node; - uint8_t class; - uint8_t flags; /* Currently unused */ - u16 unused; - - uint32_t xseqno; - union { - struct jffs2_inode_cache *ic; /* reference to jffs2_inode_cache */ - uint32_t ino; /* only used in scanning/building */ - }; - union { - struct jffs2_xattr_datum *xd; /* reference to jffs2_xattr_datum */ - uint32_t xid; /* only used in sccanning/building */ - }; - struct jffs2_xattr_ref *next; /* chained from ic->xref_list */ -}; - -#define XREF_DELETE_MARKER (0x00000001) -static inline int is_xattr_ref_dead(struct jffs2_xattr_ref *ref) -{ - return ((ref->xseqno & XREF_DELETE_MARKER) != 0); -} - -#ifdef CONFIG_JFFS2_FS_XATTR - -extern void jffs2_init_xattr_subsystem(struct jffs2_sb_info *c); -extern void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c); -extern void jffs2_clear_xattr_subsystem(struct jffs2_sb_info *c); - -extern struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c, - uint32_t xid, uint32_t version); - -extern void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); -extern void jffs2_xattr_free_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic); - -extern int jffs2_garbage_collect_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd, - struct jffs2_raw_node_ref *raw); -extern int jffs2_garbage_collect_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref, - struct jffs2_raw_node_ref *raw); -extern int jffs2_verify_xattr(struct jffs2_sb_info *c); -extern void jffs2_release_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd); -extern void jffs2_release_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref); - -extern int do_jffs2_getxattr(struct inode *inode, int xprefix, const char *xname, - char *buffer, size_t size); -extern int do_jffs2_setxattr(struct inode *inode, int xprefix, const char *xname, - const char *buffer, size_t size, int flags); - -extern struct xattr_handler *jffs2_xattr_handlers[]; -extern struct xattr_handler jffs2_user_xattr_handler; -extern struct xattr_handler jffs2_trusted_xattr_handler; - -extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); -#define jffs2_getxattr generic_getxattr -#define jffs2_setxattr generic_setxattr -#define jffs2_removexattr generic_removexattr - -#else - -#define jffs2_init_xattr_subsystem(c) -#define jffs2_build_xattr_subsystem(c) -#define jffs2_clear_xattr_subsystem(c) - -#define jffs2_xattr_delete_inode(c, ic) -#define jffs2_xattr_free_inode(c, ic) -#define jffs2_verify_xattr(c) (1) - -#define jffs2_xattr_handlers NULL -#define jffs2_listxattr NULL -#define jffs2_getxattr NULL -#define jffs2_setxattr NULL -#define jffs2_removexattr NULL - -#endif /* CONFIG_JFFS2_FS_XATTR */ - -#ifdef CONFIG_JFFS2_FS_SECURITY -extern int jffs2_init_security(struct inode *inode, struct inode *dir); -extern struct xattr_handler jffs2_security_xattr_handler; -#else -#define jffs2_init_security(inode,dir) (0) -#endif /* CONFIG_JFFS2_FS_SECURITY */ - -#endif /* _JFFS2_FS_XATTR_H_ */ diff --git a/fs/jffs2/xattr_trusted.c b/fs/jffs2/xattr_trusted.c deleted file mode 100644 index ed046e19d..000000000 --- a/fs/jffs2/xattr_trusted.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#include -#include -#include -#include -#include -#include "nodelist.h" - -static int jffs2_trusted_getxattr(struct inode *inode, const char *name, - void *buffer, size_t size) -{ - if (!strcmp(name, "")) - return -EINVAL; - return do_jffs2_getxattr(inode, JFFS2_XPREFIX_TRUSTED, name, buffer, size); -} - -static int jffs2_trusted_setxattr(struct inode *inode, const char *name, const void *buffer, - size_t size, int flags) -{ - if (!strcmp(name, "")) - return -EINVAL; - return do_jffs2_setxattr(inode, JFFS2_XPREFIX_TRUSTED, name, buffer, size, flags); -} - -static size_t jffs2_trusted_listxattr(struct inode *inode, char *list, size_t list_size, - const char *name, size_t name_len) -{ - size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1; - - if (list && retlen<=list_size) { - strcpy(list, XATTR_TRUSTED_PREFIX); - strcpy(list + XATTR_TRUSTED_PREFIX_LEN, name); - } - - return retlen; -} - -struct xattr_handler jffs2_trusted_xattr_handler = { - .prefix = XATTR_TRUSTED_PREFIX, - .list = jffs2_trusted_listxattr, - .set = jffs2_trusted_setxattr, - .get = jffs2_trusted_getxattr -}; diff --git a/fs/jffs2/xattr_user.c b/fs/jffs2/xattr_user.c deleted file mode 100644 index 2f8e9aa01..000000000 --- a/fs/jffs2/xattr_user.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * JFFS2 -- Journalling Flash File System, Version 2. - * - * Copyright (C) 2006 NEC Corporation - * - * Created by KaiGai Kohei - * - * For licensing information, see the file 'LICENCE' in this directory. - * - */ -#include -#include -#include -#include -#include -#include "nodelist.h" - -static int jffs2_user_getxattr(struct inode *inode, const char *name, - void *buffer, size_t size) -{ - if (!strcmp(name, "")) - return -EINVAL; - return do_jffs2_getxattr(inode, JFFS2_XPREFIX_USER, name, buffer, size); -} - -static int jffs2_user_setxattr(struct inode *inode, const char *name, const void *buffer, - size_t size, int flags) -{ - if (!strcmp(name, "")) - return -EINVAL; - return do_jffs2_setxattr(inode, JFFS2_XPREFIX_USER, name, buffer, size, flags); -} - -static size_t jffs2_user_listxattr(struct inode *inode, char *list, size_t list_size, - const char *name, size_t name_len) -{ - size_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1; - - if (list && retlen <= list_size) { - strcpy(list, XATTR_USER_PREFIX); - strcpy(list + XATTR_USER_PREFIX_LEN, name); - } - - return retlen; -} - -struct xattr_handler jffs2_user_xattr_handler = { - .prefix = XATTR_USER_PREFIX, - .list = jffs2_user_listxattr, - .set = jffs2_user_setxattr, - .get = jffs2_user_getxattr -}; diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index f8a1714ba..11d65d961 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -170,15 +170,16 @@ void jfs_dirty_inode(struct inode *inode) set_cflag(COMMIT_Dirty, inode); } -int jfs_get_block(struct inode *ip, sector_t lblock, - struct buffer_head *bh_result, int create) +static int +jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks, + struct buffer_head *bh_result, int create) { s64 lblock64 = lblock; int rc = 0; xad_t xad; s64 xaddr; int xflag; - s32 xlen = bh_result->b_size >> ip->i_blkbits; + s32 xlen = max_blocks; /* * Take appropriate lock on inode @@ -189,7 +190,7 @@ int jfs_get_block(struct inode *ip, sector_t lblock, IREAD_LOCK(ip); if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && - (!xtLookup(ip, lblock64, xlen, &xflag, &xaddr, &xlen, 0)) && + (!xtLookup(ip, lblock64, max_blocks, &xflag, &xaddr, &xlen, 0)) && xaddr) { if (xflag & XAD_NOTRECORDED) { if (!create) @@ -256,6 +257,13 @@ int jfs_get_block(struct inode *ip, sector_t lblock, return rc; } +static int jfs_get_block(struct inode *ip, sector_t lblock, + struct buffer_head *bh_result, int create) +{ + return jfs_get_blocks(ip, lblock, bh_result->b_size >> ip->i_blkbits, + bh_result, create); +} + static int jfs_writepage(struct page *page, struct writeback_control *wbc) { return nobh_writepage(page, jfs_get_block, wbc); @@ -299,7 +307,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, offset, nr_segs, jfs_get_block, NULL); } -const struct address_space_operations jfs_aops = { +struct address_space_operations jfs_aops = { .readpage = jfs_readpage, .readpages = jfs_readpages, .writepage = jfs_writepage, diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index ecf3ac3d7..0ce43f3db 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c @@ -127,7 +127,7 @@ extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, boolean_t abnr) /* allocate the disk blocks for the extent. initially, extBalloc() * will try to allocate disk blocks for the requested size (xlen). - * if this fails (xlen contiguous free blocks not avaliable), it'll + * if this fails (xlen contigious free blocks not avaliable), it'll * try to allocate a smaller number of blocks (producing a smaller * extent), with this smaller number of blocks consisting of the * requested number of blocks rounded down to the next smaller @@ -486,7 +486,7 @@ int extRecord(struct inode *ip, xad_t * xp) int extFill(struct inode *ip, xad_t * xp) { int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage; - s64 blkno = offsetXAD(xp) >> ip->i_blkbits; + s64 blkno = offsetXAD(xp) >> ip->i_blksize; // assert(ISSPARSE(ip)); @@ -511,7 +511,7 @@ int extFill(struct inode *ip, xad_t * xp) * * initially, we will try to allocate disk blocks for the * requested size (nblocks). if this fails (nblocks - * contiguous free blocks not avaliable), we'll try to allocate + * contigious free blocks not avaliable), we'll try to allocate * a smaller number of blocks (producing a smaller extent), with * this smaller number of blocks consisting of the requested * number of blocks rounded down to the next smaller power of 2 @@ -547,7 +547,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) /* get the number of blocks to initially attempt to allocate. * we'll first try the number of blocks requested unless this - * number is greater than the maximum number of contiguous free + * number is greater than the maximum number of contigious free * blocks in the map. in that case, we'll start off with the * maximum free. */ @@ -604,7 +604,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno) * in place. if this fails, we'll try to move the extent * to a new set of blocks. if moving the extent, we initially * will try to allocate disk blocks for the requested size - * (nnew). if this fails (new contiguous free blocks not + * (nnew). if this fails (nnew contigious free blocks not * avaliable), we'll try to allocate a smaller number of * blocks (producing a smaller extent), with this smaller * number of blocks consisting of the requested number of diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 361920334..d88cf0b1b 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -319,7 +319,7 @@ int diRead(struct inode *ip) struct inomap *imap; int block_offset; int inodes_left; - unsigned long pageno; + uint pageno; int rel_inode; jfs_info("diRead: ino = %ld", ip->i_ino); @@ -607,7 +607,7 @@ int diWrite(tid_t tid, struct inode *ip) int block_offset; int inodes_left; struct metapage *mp; - unsigned long pageno; + uint pageno; int rel_inode; int dioffset; struct inode *ipimap; @@ -3122,6 +3122,7 @@ static int copy_from_dinode(struct dinode * dip, struct inode *ip) ip->i_mtime.tv_nsec = le32_to_cpu(dip->di_mtime.tv_nsec); ip->i_ctime.tv_sec = le32_to_cpu(dip->di_ctime.tv_sec); ip->i_ctime.tv_nsec = le32_to_cpu(dip->di_ctime.tv_nsec); + ip->i_blksize = ip->i_sb->s_blocksize; ip->i_blocks = LBLK2PBLK(ip->i_sb, le64_to_cpu(dip->di_nblocks)); ip->i_generation = le32_to_cpu(dip->di_gen); diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index 9ba919e87..8512641bc 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -164,6 +164,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) } jfs_inode->mode2 |= mode; + inode->i_blksize = sb->s_blocksize; inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; jfs_inode->otime = inode->i_ctime.tv_sec; diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h index ab6d106b5..5249ac5ea 100644 --- a/fs/jfs/jfs_inode.h +++ b/fs/jfs/jfs_inode.h @@ -33,9 +33,8 @@ extern void jfs_free_zero_link(struct inode *); extern struct dentry *jfs_get_parent(struct dentry *dentry); extern int jfs_sync_flags(struct inode *); extern void jfs_set_inode_flags(struct inode *); -extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int); -extern const struct address_space_operations jfs_aops; +extern struct address_space_operations jfs_aops; extern struct inode_operations jfs_dir_inode_operations; extern const struct file_operations jfs_dir_operations; extern struct inode_operations jfs_file_inode_operations; diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index f5afc129d..2b220dd6b 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c @@ -257,7 +257,7 @@ static sector_t metapage_get_blocks(struct inode *inode, sector_t lblock, int rc = 0; int xflag; s64 xaddr; - sector_t file_blocks = (inode->i_size + inode->i_sb->s_blocksize - 1) >> + sector_t file_blocks = (inode->i_size + inode->i_blksize - 1) >> inode->i_blkbits; if (lblock >= file_blocks) @@ -577,7 +577,7 @@ static void metapage_invalidatepage(struct page *page, unsigned long offset) metapage_releasepage(page, 0); } -const struct address_space_operations jfs_metapage_aops = { +struct address_space_operations jfs_metapage_aops = { .readpage = metapage_readpage, .writepage = metapage_writepage, .sync_page = block_sync_page, @@ -632,9 +632,10 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, } SetPageUptodate(page); } else { - page = read_mapping_page(mapping, page_index, NULL); + page = read_cache_page(mapping, page_index, + (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page) || !PageUptodate(page)) { - jfs_err("read_mapping_page failed!"); + jfs_err("read_cache_page failed!"); return NULL; } lock_page(page); diff --git a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h index d17a3290f..f0b7d3282 100644 --- a/fs/jfs/jfs_metapage.h +++ b/fs/jfs/jfs_metapage.h @@ -139,7 +139,7 @@ static inline void metapage_homeok(struct metapage *mp) put_metapage(mp); } -extern const struct address_space_operations jfs_metapage_aops; +extern struct address_space_operations jfs_metapage_aops; /* * This routines invalidate all pages for an extent. diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index efbb586be..ac3d66948 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -842,7 +842,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, TXN_UNLOCK(); release_metapage(mp); TXN_LOCK(); - xtid = tlck->tid; /* reacquire after dropping TXN_LOCK */ + xtid = tlck->tid; /* reaquire after dropping TXN_LOCK */ jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d", tid, xtid, lid); @@ -2944,7 +2944,7 @@ int jfs_sync(void *arg) * Inode is being freed */ list_del_init(&jfs_ip->anon_inode_list); - } else if (mutex_trylock(&jfs_ip->commit_mutex)) { + } else if (! !mutex_trylock(&jfs_ip->commit_mutex)) { /* * inode will be removed from anonymous list * when it is committed diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index f743ee5ec..2d7f32ab8 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -166,8 +166,8 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, out3: txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); if (rc) { free_ea_wmap(ip); ip->i_nlink = 0; @@ -301,8 +301,8 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) out3: txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); if (rc) { free_ea_wmap(ip); ip->i_nlink = 0; @@ -385,8 +385,8 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry) if (rc == -EIO) txAbort(tid, 1); txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); goto out2; } @@ -423,8 +423,8 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry) txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); /* * Truncating the directory index table is not guaranteed. It @@ -504,8 +504,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) if (rc == -EIO) txAbort(tid, 1); /* Marks FS Dirty */ txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); IWRITE_UNLOCK(ip); goto out1; } @@ -528,8 +528,8 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) if ((new_size = commitZeroLink(tid, ip)) < 0) { txAbort(tid, 1); /* Marks FS Dirty */ txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); IWRITE_UNLOCK(ip); rc = new_size; goto out1; @@ -557,8 +557,9 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry) txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); + while (new_size && (rc == 0)) { tid = txBegin(dip->i_sb, 0); @@ -847,8 +848,8 @@ static int jfs_link(struct dentry *old_dentry, out: txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dir)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); jfs_info("jfs_link: rc:%d", rc); return rc; @@ -1037,8 +1038,8 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, out3: txEnd(tid); - mutex_unlock(&JFS_IP(ip)->commit_mutex); mutex_unlock(&JFS_IP(dip)->commit_mutex); + mutex_unlock(&JFS_IP(ip)->commit_mutex); if (rc) { free_ea_wmap(ip); ip->i_nlink = 0; @@ -1160,11 +1161,10 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, if (S_ISDIR(new_ip->i_mode)) { new_ip->i_nlink--; if (new_ip->i_nlink) { - mutex_unlock(&JFS_IP(new_ip)->commit_mutex); + mutex_unlock(&JFS_IP(new_dir)->commit_mutex); + mutex_unlock(&JFS_IP(old_ip)->commit_mutex); if (old_dir != new_dir) mutex_unlock(&JFS_IP(old_dir)->commit_mutex); - mutex_unlock(&JFS_IP(old_ip)->commit_mutex); - mutex_unlock(&JFS_IP(new_dir)->commit_mutex); if (!S_ISDIR(old_ip->i_mode) && new_ip) IWRITE_UNLOCK(new_ip); jfs_error(new_ip->i_sb, @@ -1282,12 +1282,13 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, out4: txEnd(tid); - if (new_ip) - mutex_unlock(&JFS_IP(new_ip)->commit_mutex); + + mutex_unlock(&JFS_IP(new_dir)->commit_mutex); + mutex_unlock(&JFS_IP(old_ip)->commit_mutex); if (old_dir != new_dir) mutex_unlock(&JFS_IP(old_dir)->commit_mutex); - mutex_unlock(&JFS_IP(old_ip)->commit_mutex); - mutex_unlock(&JFS_IP(new_dir)->commit_mutex); + if (new_ip) + mutex_unlock(&JFS_IP(new_ip)->commit_mutex); while (new_size && (rc == 0)) { tid = txBegin(new_ip->i_sb, 0); diff --git a/fs/jfs/super.c b/fs/jfs/super.c index b84a6ec0a..2d6c03d6d 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include @@ -139,9 +139,9 @@ static void jfs_destroy_inode(struct inode *inode) kmem_cache_free(jfs_inode_cachep, ji); } -static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int jfs_statfs(struct super_block *sb, struct kstatfs *buf) { - struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb); + struct jfs_sb_info *sbi = JFS_SBI(sb); s64 maxinodes; struct inomap *imap = JFS_IP(sbi->ipimap)->i_imap; @@ -301,7 +301,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, break; } -#ifdef CONFIG_QUOTA +#if defined(CONFIG_QUOTA) case Opt_quota: case Opt_usrquota: *flag |= JFS_USRQUOTA; @@ -582,11 +582,10 @@ static void jfs_unlockfs(struct super_block *sb) } } -static int jfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *jfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super); } static int jfs_sync_fs(struct super_block *sb, int wait) @@ -615,7 +614,7 @@ static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs) if (sbi->flag & JFS_NOINTEGRITY) seq_puts(seq, ",nointegrity"); -#ifdef CONFIG_QUOTA +#if defined(CONFIG_QUOTA) if (sbi->flag & JFS_USRQUOTA) seq_puts(seq, ",usrquota"); @@ -626,113 +625,6 @@ static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs) return 0; } -#ifdef CONFIG_QUOTA - -/* Read data from quotafile - avoid pagecache and such because we cannot afford - * acquiring the locks... As quota files are never truncated and quota code - * itself serializes the operations (and noone else should touch the files) - * we don't have to be afraid of races */ -static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data, - size_t len, loff_t off) -{ - struct inode *inode = sb_dqopt(sb)->files[type]; - sector_t blk = off >> sb->s_blocksize_bits; - int err = 0; - int offset = off & (sb->s_blocksize - 1); - int tocopy; - size_t toread; - struct buffer_head tmp_bh; - struct buffer_head *bh; - loff_t i_size = i_size_read(inode); - - if (off > i_size) - return 0; - if (off+len > i_size) - len = i_size-off; - toread = len; - while (toread > 0) { - tocopy = sb->s_blocksize - offset < toread ? - sb->s_blocksize - offset : toread; - - tmp_bh.b_state = 0; - tmp_bh.b_size = 1 << inode->i_blkbits; - err = jfs_get_block(inode, blk, &tmp_bh, 0); - if (err) - return err; - if (!buffer_mapped(&tmp_bh)) /* A hole? */ - memset(data, 0, tocopy); - else { - bh = sb_bread(sb, tmp_bh.b_blocknr); - if (!bh) - return -EIO; - memcpy(data, bh->b_data+offset, tocopy); - brelse(bh); - } - offset = 0; - toread -= tocopy; - data += tocopy; - blk++; - } - return len; -} - -/* Write to quotafile */ -static ssize_t jfs_quota_write(struct super_block *sb, int type, - const char *data, size_t len, loff_t off) -{ - struct inode *inode = sb_dqopt(sb)->files[type]; - sector_t blk = off >> sb->s_blocksize_bits; - int err = 0; - int offset = off & (sb->s_blocksize - 1); - int tocopy; - size_t towrite = len; - struct buffer_head tmp_bh; - struct buffer_head *bh; - - mutex_lock(&inode->i_mutex); - while (towrite > 0) { - tocopy = sb->s_blocksize - offset < towrite ? - sb->s_blocksize - offset : towrite; - - tmp_bh.b_state = 0; - tmp_bh.b_size = 1 << inode->i_blkbits; - err = jfs_get_block(inode, blk, &tmp_bh, 1); - if (err) - goto out; - if (offset || tocopy != sb->s_blocksize) - bh = sb_bread(sb, tmp_bh.b_blocknr); - else - bh = sb_getblk(sb, tmp_bh.b_blocknr); - if (!bh) { - err = -EIO; - goto out; - } - lock_buffer(bh); - memcpy(bh->b_data+offset, data, tocopy); - flush_dcache_page(bh->b_page); - set_buffer_uptodate(bh); - mark_buffer_dirty(bh); - unlock_buffer(bh); - brelse(bh); - offset = 0; - towrite -= tocopy; - data += tocopy; - blk++; - } -out: - if (len == towrite) - return err; - if (inode->i_size < off+len-towrite) - i_size_write(inode, off+len-towrite); - inode->i_version++; - inode->i_mtime = inode->i_ctime = CURRENT_TIME; - mark_inode_dirty(inode); - mutex_unlock(&inode->i_mutex); - return len - towrite; -} - -#endif - static struct super_operations jfs_super_operations = { .alloc_inode = jfs_alloc_inode, .destroy_inode = jfs_destroy_inode, @@ -746,11 +638,7 @@ static struct super_operations jfs_super_operations = { .unlockfs = jfs_unlockfs, .statfs = jfs_statfs, .remount_fs = jfs_remount, - .show_options = jfs_show_options, -#ifdef CONFIG_QUOTA - .quota_read = jfs_quota_read, - .quota_write = jfs_quota_write, -#endif + .show_options = jfs_show_options }; static struct export_operations jfs_export_operations = { diff --git a/fs/libfs.c b/fs/libfs.c index 16b38b189..26e627b59 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -20,9 +20,9 @@ int simple_getattr(struct vfsmount *mnt, struct dentry *dentry, return 0; } -int simple_statfs(struct dentry *dentry, struct kstatfs *buf) +int simple_statfs(struct super_block *sb, struct kstatfs *buf) { - buf->f_type = dentry->d_sb->s_magic; + buf->f_type = sb->s_magic; buf->f_bsize = PAGE_CACHE_SIZE; buf->f_namelen = NAME_MAX; return 0; @@ -150,9 +150,10 @@ static inline int do_dcache_readdir_filter(struct file * filp, /* fallthrough */ default: spin_lock(&dcache_lock); - if (filp->f_pos == 2) - list_move(q, &dentry->d_subdirs); - + if (filp->f_pos == 2) { + list_del(q); + list_add(q, &dentry->d_subdirs); + } for (p=q->next; p != &dentry->d_subdirs; p=p->next) { struct dentry *next; next = list_entry(p, struct dentry, d_u.d_child); @@ -166,7 +167,8 @@ static inline int do_dcache_readdir_filter(struct file * filp, return 0; spin_lock(&dcache_lock); /* next is still alive */ - list_move(q, p); + list_del(q); + list_add(q, p); p = q; filp->f_pos++; } @@ -209,9 +211,9 @@ struct inode_operations simple_dir_inode_operations = { * Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that * will never be mountable) */ -int get_sb_pseudo(struct file_system_type *fs_type, char *name, - struct super_operations *ops, unsigned long magic, - struct vfsmount *mnt) +struct super_block * +get_sb_pseudo(struct file_system_type *fs_type, char *name, + struct super_operations *ops, unsigned long magic) { struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); static struct super_operations default_ops = {.statfs = simple_statfs}; @@ -220,7 +222,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, struct qstr d_name = {.name = name, .len = strlen(name)}; if (IS_ERR(s)) - return PTR_ERR(s); + return s; s->s_flags = MS_NOUSER; s->s_maxbytes = ~0ULL; @@ -245,12 +247,12 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, d_instantiate(dentry, root); s->s_root = dentry; s->s_flags |= MS_ACTIVE; - return simple_set_mnt(mnt, s); + return s; Enomem: up_write(&s->s_umount); deactivate_super(s); - return -ENOMEM; + return ERR_PTR(-ENOMEM); } int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) @@ -398,6 +400,7 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files return -ENOMEM; inode->i_mode = S_IFDIR | 0755; inode->i_uid = inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_op = &simple_dir_inode_operations; @@ -419,6 +422,7 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files goto out; inode->i_mode = S_IFREG | files->mode; inode->i_uid = inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_fop = files->ops; @@ -435,13 +439,13 @@ out: static DEFINE_SPINLOCK(pin_fs_lock); -int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *count) +int simple_pin_fs(char *name, struct vfsmount **mount, int *count) { struct vfsmount *mnt = NULL; spin_lock(&pin_fs_lock); if (unlikely(!*mount)) { spin_unlock(&pin_fs_lock); - mnt = vfs_kern_mount(type, 0, type->name, NULL); + mnt = do_kern_mount(name, 0, name, NULL); if (IS_ERR(mnt)) return PTR_ERR(mnt); spin_lock(&pin_fs_lock); @@ -560,7 +564,7 @@ int simple_attr_open(struct inode *inode, struct file *file, attr->get = get; attr->set = set; - attr->data = inode->i_private; + attr->data = inode->u.generic_ip; attr->fmt = fmt; mutex_init(&attr->mutex); diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 52774feab..bce744468 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -147,10 +147,11 @@ u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock) * Someone has sent us an SM_NOTIFY. Ensure we bind to the new port number, * that we mark locks for reclaiming, and that we bump the pseudo NSM state. */ -static void nlmclnt_prepare_reclaim(struct nlm_host *host) +static inline +void nlmclnt_prepare_reclaim(struct nlm_host *host, u32 newstate) { - down_write(&host->h_rwsem); host->h_monitored = 0; + host->h_nsmstate = newstate; host->h_state++; host->h_nextrebind = 0; nlm_rebind_host(host); @@ -163,13 +164,6 @@ static void nlmclnt_prepare_reclaim(struct nlm_host *host) dprintk("NLM: reclaiming locks for host %s", host->h_name); } -static void nlmclnt_finish_reclaim(struct nlm_host *host) -{ - host->h_reclaiming = 0; - up_write(&host->h_rwsem); - dprintk("NLM: done reclaiming locks for host %s", host->h_name); -} - /* * Reclaim all locks on server host. We do this by spawning a separate * reclaimer thread. @@ -177,10 +171,12 @@ static void nlmclnt_finish_reclaim(struct nlm_host *host) void nlmclnt_recovery(struct nlm_host *host, u32 newstate) { - if (host->h_nsmstate == newstate) - return; - host->h_nsmstate = newstate; - if (!host->h_reclaiming++) { + if (host->h_reclaiming++) { + if (host->h_nsmstate == newstate) + return; + nlmclnt_prepare_reclaim(host, newstate); + } else { + nlmclnt_prepare_reclaim(host, newstate); nlm_get_host(host); __module_get(THIS_MODULE); if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0) @@ -194,7 +190,6 @@ reclaimer(void *ptr) struct nlm_host *host = (struct nlm_host *) ptr; struct nlm_wait *block; struct file_lock *fl, *next; - u32 nsmstate; daemonize("%s-reclaim", host->h_name); allow_signal(SIGKILL); @@ -204,25 +199,19 @@ reclaimer(void *ptr) lock_kernel(); lockd_up(); - nlmclnt_prepare_reclaim(host); /* First, reclaim all locks that have been marked. */ restart: - nsmstate = host->h_nsmstate; list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) { list_del_init(&fl->fl_u.nfs_fl.list); if (signalled()) continue; - if (nlmclnt_reclaim(host, fl) != 0) - continue; - list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); - if (host->h_nsmstate != nsmstate) { - /* Argh! The server rebooted again! */ - list_splice_init(&host->h_granted, &host->h_reclaim); - goto restart; - } + if (nlmclnt_reclaim(host, fl) == 0) + list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); + goto restart; } - nlmclnt_finish_reclaim(host); + + host->h_reclaiming = 0; /* Now, wake up all processes that sleep on a blocked lock */ list_for_each_entry(block, &nlm_blocked, b_list) { diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 782f4c98c..f8509ee35 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -6,6 +6,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include @@ -456,7 +457,7 @@ static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *ho fl->fl_ops = &nlmclnt_lock_ops; } -static int do_vfs_lock(struct file_lock *fl) +static void do_vfs_lock(struct file_lock *fl) { int res = 0; switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { @@ -469,7 +470,9 @@ static int do_vfs_lock(struct file_lock *fl) default: BUG(); } - return res; + if (res < 0) + printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", + __FUNCTION__); } /* @@ -498,7 +501,6 @@ nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl) struct nlm_host *host = req->a_host; struct nlm_res *resp = &req->a_res; struct nlm_wait *block = NULL; - unsigned char fl_flags = fl->fl_flags; int status = -ENOLCK; if (!host->h_monitored && nsm_monitor(host) < 0) { @@ -506,16 +508,9 @@ nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl) host->h_name); goto out; } - fl->fl_flags |= FL_ACCESS; - status = do_vfs_lock(fl); - if (status < 0) - goto out; block = nlmclnt_prepare_block(host, fl); -again: for(;;) { - /* Reboot protection */ - fl->fl_u.nfs_fl.state = host->h_state; status = nlmclnt_call(req, NLMPROC_LOCK); if (status < 0) goto out_unblock; @@ -538,17 +533,10 @@ again: } if (resp->status == NLM_LCK_GRANTED) { - down_read(&host->h_rwsem); - /* Check whether or not the server has rebooted */ - if (fl->fl_u.nfs_fl.state != host->h_state) { - up_read(&host->h_rwsem); - goto again; - } + fl->fl_u.nfs_fl.state = host->h_state; + fl->fl_flags |= FL_SLEEP; /* Ensure the resulting lock will get added to granted list */ - fl->fl_flags = fl_flags | FL_SLEEP; - if (do_vfs_lock(fl) < 0) - printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __FUNCTION__); - up_read(&host->h_rwsem); + do_vfs_lock(fl); } status = nlm_stat_to_errno(resp->status); out_unblock: @@ -558,7 +546,6 @@ out_unblock: nlmclnt_cancel(host, req->a_args.block, fl); out: nlm_release_call(req); - fl->fl_flags = fl_flags; return status; } @@ -611,22 +598,15 @@ nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl) static int nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) { - struct nlm_host *host = req->a_host; struct nlm_res *resp = &req->a_res; - int status = 0; + int status; /* * Note: the server is supposed to either grant us the unlock * request, or to deny it with NLM_LCK_DENIED_GRACE_PERIOD. In either * case, we want to unlock. */ - fl->fl_flags |= FL_EXISTS; - down_read(&host->h_rwsem); - if (do_vfs_lock(fl) == -ENOENT) { - up_read(&host->h_rwsem); - goto out; - } - up_read(&host->h_rwsem); + do_vfs_lock(fl); if (req->a_flags & RPC_TASK_ASYNC) return nlm_async_call(req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops); @@ -635,6 +615,7 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) if (status < 0) goto out; + status = 0; if (resp->status == NLM_LCK_GRANTED) goto out; diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 38b0e8a1a..729ac427d 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -112,12 +112,11 @@ nlm_lookup_host(int server, struct sockaddr_in *sin, host->h_version = version; host->h_proto = proto; host->h_rpcclnt = NULL; - mutex_init(&host->h_mutex); + init_MUTEX(&host->h_sema); host->h_nextrebind = jiffies + NLM_HOST_REBIND; host->h_expires = jiffies + NLM_HOST_EXPIRE; atomic_set(&host->h_count, 1); init_waitqueue_head(&host->h_gracewait); - init_rwsem(&host->h_rwsem); host->h_state = 0; /* pseudo NSM state */ host->h_nsmstate = 0; /* real NSM state */ host->h_server = server; @@ -173,7 +172,7 @@ nlm_bind_host(struct nlm_host *host) (unsigned)ntohl(host->h_addr.sin_addr.s_addr)); /* Lock host handle */ - mutex_lock(&host->h_mutex); + down(&host->h_sema); /* If we've already created an RPC client, check whether * RPC rebind is required @@ -205,12 +204,12 @@ nlm_bind_host(struct nlm_host *host) host->h_rpcclnt = clnt; } - mutex_unlock(&host->h_mutex); + up(&host->h_sema); return clnt; forgetit: printk("lockd: couldn't create RPC handle for %s\n", host->h_name); - mutex_unlock(&host->h_mutex); + up(&host->h_sema); return NULL; } diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index a945261fa..fdb941215 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -12,6 +12,7 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ +#include #include #include #include diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index c9d419703..3ef739120 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -20,6 +20,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include @@ -638,6 +639,9 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data) if (task->tk_status < 0) { /* RPC error: Re-insert for retransmission */ timeout = 10 * HZ; + } else if (block->b_done) { + /* Block already removed, kill it for real */ + timeout = 0; } else { /* Call was successful, now wait for client callback */ timeout = 60 * HZ; @@ -706,10 +710,13 @@ nlmsvc_retry_blocked(void) break; if (time_after(block->b_when,jiffies)) break; - dprintk("nlmsvc_retry_blocked(%p, when=%ld)\n", - block, block->b_when); + dprintk("nlmsvc_retry_blocked(%p, when=%ld, done=%d)\n", + block, block->b_when, block->b_done); kref_get(&block->b_count); - nlmsvc_grant_blocked(block); + if (block->b_done) + nlmsvc_unlink_block(block); + else + nlmsvc_grant_blocked(block); nlmsvc_release_block(block); } diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index dbb66a3b5..d210cf304 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c @@ -7,6 +7,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 01b4db9e5..a570e5c8a 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -6,6 +6,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include @@ -237,22 +238,19 @@ static int nlm_traverse_files(struct nlm_host *host, int action) { struct nlm_file *file, **fp; - int i, ret = 0; + int i; mutex_lock(&nlm_file_mutex); for (i = 0; i < FILE_NRHASH; i++) { fp = nlm_files + i; while ((file = *fp) != NULL) { - file->f_count++; - mutex_unlock(&nlm_file_mutex); - /* Traverse locks, blocks and shares of this file * and update file->f_locks count */ - if (nlm_inspect_file(host, file, action)) - ret = 1; + if (nlm_inspect_file(host, file, action)) { + mutex_unlock(&nlm_file_mutex); + return 1; + } - mutex_lock(&nlm_file_mutex); - file->f_count--; /* No more references to this file. Let go of it. */ if (!file->f_blocks && !file->f_locks && !file->f_shares && !file->f_count) { @@ -265,7 +263,7 @@ nlm_traverse_files(struct nlm_host *host, int action) } } mutex_unlock(&nlm_file_mutex); - return ret; + return 0; } /* diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 033ea4ac2..f22a37644 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c @@ -6,6 +6,7 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ +#include #include #include #include diff --git a/fs/locks.c b/fs/locks.c index d3501facc..5a9a7fded 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -716,7 +716,7 @@ EXPORT_SYMBOL(posix_test_lock); * from a broken NFS client. But broken NFS clients have a lot more to * worry about than proper deadlock detection anyway... --okir */ -static int posix_locks_deadlock(struct file_lock *caller_fl, +int posix_locks_deadlock(struct file_lock *caller_fl, struct file_lock *block_fl) { struct list_head *tmp; @@ -735,13 +735,11 @@ next_task: return 0; } +EXPORT_SYMBOL(posix_locks_deadlock); + /* Try to create a FLOCK lock on filp. We always insert new FLOCK locks * at the head of the list, but that's secret knowledge known only to * flock_lock_file and posix_lock_file. - * - * Note that if called with an FL_EXISTS argument, the caller may determine - * whether or not a lock was successfully freed by testing the return - * value for -ENOENT. */ static int flock_lock_file(struct file *filp, struct file_lock *request) { @@ -752,8 +750,6 @@ static int flock_lock_file(struct file *filp, struct file_lock *request) int found = 0; lock_kernel(); - if (request->fl_flags & FL_ACCESS) - goto find_conflict; for_each_lock(inode, before) { struct file_lock *fl = *before; if (IS_POSIX(fl)) @@ -769,11 +765,8 @@ static int flock_lock_file(struct file *filp, struct file_lock *request) break; } - if (request->fl_type == F_UNLCK) { - if ((request->fl_flags & FL_EXISTS) && !found) - error = -ENOENT; + if (request->fl_type == F_UNLCK) goto out; - } error = -ENOMEM; new_fl = locks_alloc_lock(); @@ -786,7 +779,6 @@ static int flock_lock_file(struct file *filp, struct file_lock *request) if (found) cond_resched(); -find_conflict: for_each_lock(inode, before) { struct file_lock *fl = *before; if (IS_POSIX(fl)) @@ -800,8 +792,6 @@ find_conflict: locks_insert_block(fl, request); goto out; } - if (request->fl_flags & FL_ACCESS) - goto out; locks_copy_lock(new_fl, request); vx_locks_inc(new_fl); locks_insert_lock(&inode->i_flock, new_fl); @@ -819,8 +809,7 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request struct file_lock *conflock, xid_t xid) { struct file_lock *fl; - struct file_lock *new_fl = NULL; - struct file_lock *new_fl2 = NULL; + struct file_lock *new_fl, *new_fl2; struct file_lock *left = NULL; struct file_lock *right = NULL; struct file_lock **before; @@ -829,19 +818,13 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request /* * We may need two file_lock structures for this operation, * so we get them in advance to avoid races. - * - * In some cases we can be sure, that no new locks will be needed */ - if (!(request->fl_flags & FL_ACCESS) && - (request->fl_type != F_UNLCK || - request->fl_start != 0 || request->fl_end != OFFSET_MAX)) { - new_fl = locks_alloc_lock(); - new_fl->fl_xid = xid; - vx_locks_inc(new_fl); - new_fl2 = locks_alloc_lock(); - new_fl2->fl_xid = xid; - vx_locks_inc(new_fl2); - } + new_fl = locks_alloc_lock(); + new_fl->fl_xid = xid; + vx_locks_inc(new_fl); + new_fl2 = locks_alloc_lock(); + new_fl2->fl_xid = xid; + vx_locks_inc(new_fl2); lock_kernel(); if (request->fl_type != F_UNLCK) { @@ -870,7 +853,14 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request if (request->fl_flags & FL_ACCESS) goto out; + error = -ENOLCK; /* "no luck" */ + if (!(new_fl && new_fl2)) + goto out; + /* + * We've allocated the new locks in advance, so there are no + * errors possible (and no blocking operations) from here on. + * * Find the first old lock with the same owner as the new lock. */ @@ -967,28 +957,10 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request before = &fl->fl_next; } - /* - * The above code only modifies existing locks in case of - * merging or replacing. If new lock(s) need to be inserted - * all modifications are done bellow this, so it's safe yet to - * bail out. - */ - error = -ENOLCK; /* "no luck" */ - if (right && left == right && !new_fl2) - goto out; - error = 0; if (!added) { - if (request->fl_type == F_UNLCK) { - if (request->fl_flags & FL_EXISTS) - error = -ENOENT; + if (request->fl_type == F_UNLCK) goto out; - } - - if (!new_fl) { - error = -ENOLCK; - goto out; - } locks_copy_lock(new_fl, request); locks_insert_lock(before, new_fl); new_fl = NULL; @@ -1030,10 +1002,6 @@ static int __posix_lock_file_conf(struct inode *inode, struct file_lock *request * Add a POSIX style lock to a file. * We merge adjacent & overlapping locks whenever possible. * POSIX locks are sorted by owner task, then by starting address - * - * Note that if called with an FL_EXISTS argument, the caller may determine - * whether or not a lock was successfully freed by testing the return - * value for -ENOENT. */ int posix_lock_file(struct file *filp, struct file_lock *fl) { @@ -1942,18 +1910,19 @@ out: */ void locks_remove_posix(struct file *filp, fl_owner_t owner) { - struct file_lock lock; + struct file_lock lock, **before; /* * If there are no locks held on this file, we don't need to call * posix_lock_file(). Another process could be setting a lock on this * file at the same time, but we wouldn't remove that lock anyway. */ - if (!filp->f_dentry->d_inode->i_flock) + before = &filp->f_dentry->d_inode->i_flock; + if (*before == NULL) return; lock.fl_type = F_UNLCK; - lock.fl_flags = FL_POSIX | FL_CLOSE; + lock.fl_flags = FL_POSIX; lock.fl_start = 0; lock.fl_end = OFFSET_MAX; lock.fl_owner = owner; @@ -1962,11 +1931,25 @@ void locks_remove_posix(struct file *filp, fl_owner_t owner) lock.fl_ops = NULL; lock.fl_lmops = NULL; - if (filp->f_op && filp->f_op->lock != NULL) + if (filp->f_op && filp->f_op->lock != NULL) { filp->f_op->lock(filp, F_SETLK, &lock); - else - posix_lock_file(filp, &lock); + goto out; + } + /* Can't use posix_lock_file here; we need to remove it no matter + * which pid we have. + */ + lock_kernel(); + while (*before != NULL) { + struct file_lock *fl = *before; + if (IS_POSIX(fl) && posix_same_owner(fl, &lock)) { + locks_delete_lock(before); + continue; + } + before = &fl->fl_next; + } + unlock_kernel(); +out: if (lock.fl_ops && lock.fl_ops->fl_release_private) lock.fl_ops->fl_release_private(&lock); } @@ -2256,6 +2239,63 @@ int lock_may_write(struct inode *inode, loff_t start, unsigned long len) EXPORT_SYMBOL(lock_may_write); +static inline void __steal_locks(struct file *file, fl_owner_t from) +{ + struct inode *inode = file->f_dentry->d_inode; + struct file_lock *fl = inode->i_flock; + + while (fl) { + if (fl->fl_file == file && fl->fl_owner == from) + fl->fl_owner = current->files; + fl = fl->fl_next; + } +} + +/* When getting ready for executing a binary, we make sure that current + * has a files_struct on its own. Before dropping the old files_struct, + * we take over ownership of all locks for all file descriptors we own. + * Note that we may accidentally steal a lock for a file that a sibling + * has created since the unshare_files() call. + */ +void steal_locks(fl_owner_t from) +{ + struct files_struct *files = current->files; + int i, j; + struct fdtable *fdt; + + if (from == files) + return; + + lock_kernel(); + j = 0; + + /* + * We are not taking a ref to the file structures, so + * we need to acquire ->file_lock. + */ + spin_lock(&files->file_lock); + fdt = files_fdtable(files); + for (;;) { + unsigned long set; + i = j * __NFDBITS; + if (i >= fdt->max_fdset || i >= fdt->max_fds) + break; + set = fdt->open_fds->fds_bits[j++]; + while (set) { + if (set & 1) { + struct file *file = fdt->fd[i]; + if (file) + __steal_locks(file, from); + } + i++; + set >>= 1; + } + } + spin_unlock(&files->file_lock); + unlock_kernel(); +} +EXPORT_SYMBOL(steal_locks); + static int __init filelock_init(void) { filelock_cache = kmem_cache_create("file_lock_cache", diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c index df6b1075b..4a6abc494 100644 --- a/fs/minix/bitmap.c +++ b/fs/minix/bitmap.c @@ -254,7 +254,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error) inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; inode->i_ino = j; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; memset(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u)); insert_inode_hash(inode); mark_inode_dirty(inode); diff --git a/fs/minix/dir.c b/fs/minix/dir.c index 2b0a389d1..69224d1fe 100644 --- a/fs/minix/dir.c +++ b/fs/minix/dir.c @@ -60,7 +60,8 @@ static int dir_commit_chunk(struct page *page, unsigned from, unsigned to) static struct page * dir_get_page(struct inode *dir, unsigned long n) { struct address_space *mapping = dir->i_mapping; - struct page *page = read_mapping_page(mapping, n, NULL); + struct page *page = read_cache_page(mapping, n, + (filler_t*)mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); kmap(page); diff --git a/fs/minix/inode.c b/fs/minix/inode.c index f8c7b026f..2dcccf1d1 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -19,7 +19,7 @@ static void minix_read_inode(struct inode * inode); static int minix_write_inode(struct inode * inode, int wait); -static int minix_statfs(struct dentry *dentry, struct kstatfs *buf); +static int minix_statfs(struct super_block *sb, struct kstatfs *buf); static int minix_remount (struct super_block * sb, int * flags, char * data); static void minix_delete_inode(struct inode *inode) @@ -204,8 +204,6 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) /* * Allocate the buffer map to keep the superblock small. */ - if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0) - goto out_illegal_sb; i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh); map = kmalloc(i, GFP_KERNEL); if (!map) @@ -265,7 +263,7 @@ out_no_root: out_no_bitmap: printk("MINIX-fs: bad superblock or unable to read bitmaps\n"); -out_freemap: + out_freemap: for (i = 0; i < sbi->s_imap_blocks; i++) brelse(sbi->s_imap[i]); for (i = 0; i < sbi->s_zmap_blocks; i++) @@ -278,16 +276,11 @@ out_no_map: printk("MINIX-fs: can't allocate map\n"); goto out_release; -out_illegal_sb: - if (!silent) - printk("MINIX-fs: bad superblock\n"); - goto out_release; - out_no_fs: if (!silent) printk("VFS: Can't find a Minix or Minix V2 filesystem " "on device %s\n", s->s_id); -out_release: + out_release: brelse(bh); goto out; @@ -297,17 +290,17 @@ out_bad_hblock: out_bad_sb: printk("MINIX-fs: unable to read superblock\n"); -out: + out: s->s_fs_info = NULL; kfree(sbi); return -EINVAL; } -static int minix_statfs(struct dentry *dentry, struct kstatfs *buf) +static int minix_statfs(struct super_block *sb, struct kstatfs *buf) { - struct minix_sb_info *sbi = minix_sb(dentry->d_sb); - buf->f_type = dentry->d_sb->s_magic; - buf->f_bsize = dentry->d_sb->s_blocksize; + struct minix_sb_info *sbi = minix_sb(sb); + buf->f_type = sb->s_magic; + buf->f_bsize = sb->s_blocksize; buf->f_blocks = (sbi->s_nzones - sbi->s_firstdatazone) << sbi->s_log_zone_size; buf->f_bfree = minix_count_free_blocks(sbi); buf->f_bavail = buf->f_bfree; @@ -342,7 +335,7 @@ static sector_t minix_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,minix_get_block); } -static const struct address_space_operations minix_aops = { +static struct address_space_operations minix_aops = { .readpage = minix_readpage, .writepage = minix_writepage, .sync_page = block_sync_page, @@ -399,7 +392,7 @@ static void V1_minix_read_inode(struct inode * inode) inode->i_mtime.tv_nsec = 0; inode->i_atime.tv_nsec = 0; inode->i_ctime.tv_nsec = 0; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; for (i = 0; i < 9; i++) minix_inode->u.i1_data[i] = raw_inode->i_zone[i]; minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0])); @@ -432,7 +425,7 @@ static void V2_minix_read_inode(struct inode * inode) inode->i_mtime.tv_nsec = 0; inode->i_atime.tv_nsec = 0; inode->i_ctime.tv_nsec = 0; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; for (i = 0; i < 10; i++) minix_inode->u.i2_data[i] = raw_inode->i_zone[i]; minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0])); @@ -566,11 +559,10 @@ void minix_truncate(struct inode * inode) V2_minix_truncate(inode); } -static int minix_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *minix_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, minix_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, minix_fill_super); } static struct file_system_type minix_fs_type = { diff --git a/fs/mpage.c b/fs/mpage.c index 1e4598247..9bf2eb30e 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -707,9 +707,9 @@ mpage_writepages(struct address_space *mapping, struct pagevec pvec; int nr_pages; pgoff_t index; - pgoff_t end; /* Inclusive */ + pgoff_t end = -1; /* Inclusive */ int scanned = 0; - int range_whole = 0; + int is_range = 0; if (wbc->nonblocking && bdi_write_congested(bdi)) { wbc->encountered_congestion = 1; @@ -721,14 +721,16 @@ mpage_writepages(struct address_space *mapping, writepage = mapping->a_ops->writepage; pagevec_init(&pvec, 0); - if (wbc->range_cyclic) { + if (wbc->sync_mode == WB_SYNC_NONE) { index = mapping->writeback_index; /* Start from prev offset */ - end = -1; } else { - index = wbc->range_start >> PAGE_CACHE_SHIFT; - end = wbc->range_end >> PAGE_CACHE_SHIFT; - if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX) - range_whole = 1; + index = 0; /* whole-file sweep */ + scanned = 1; + } + if (wbc->start || wbc->end) { + index = wbc->start >> PAGE_CACHE_SHIFT; + end = wbc->end >> PAGE_CACHE_SHIFT; + is_range = 1; scanned = 1; } retry: @@ -757,7 +759,7 @@ retry: continue; } - if (!wbc->range_cyclic && page->index > end) { + if (unlikely(is_range) && page->index > end) { done = 1; unlock_page(page); continue; @@ -808,7 +810,7 @@ retry: index = 0; goto retry; } - if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0)) + if (!is_range) mapping->writeback_index = index; if (bio) mpage_bio_submit(WRITE, bio); diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c index 9e44158a7..5b76ccd19 100644 --- a/fs/msdos/namei.c +++ b/fs/msdos/namei.c @@ -661,12 +661,11 @@ static int msdos_fill_super(struct super_block *sb, void *data, int silent) return 0; } -static int msdos_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *msdos_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super); } static struct file_system_type msdos_fs_type = { diff --git a/fs/namei.c b/fs/namei.c index 3a5c38739..577bf134f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -163,7 +163,7 @@ char * getname(const char __user * filename) #ifdef CONFIG_AUDITSYSCALL void putname(const char *name) { - if (unlikely(!audit_dummy_context())) + if (unlikely(current->audit_context)) audit_putname(name); else __putname(name); @@ -231,7 +231,7 @@ int generic_permission(struct inode *inode, int mask, static inline int vx_barrier(struct inode *inode) { - if (IS_BARRIER(inode) && !vx_check(0, VX_ADMIN|VX_WATCH)) { + if (IS_BARRIER(inode) && !vx_check(0, VX_ADMIN)) { vxwprintk(1, "xid=%d did hit the barrier.", vx_current_xid()); return 1; @@ -264,10 +264,10 @@ static inline int xid_permission(struct inode *inode, int mask, struct nameidata int permission(struct inode *inode, int mask, struct nameidata *nd) { - umode_t mode = inode->i_mode; int retval, submask; if (mask & MAY_WRITE) { + umode_t mode = inode->i_mode; /* * Nobody gets write access to a read-only fs. @@ -284,13 +284,6 @@ int permission(struct inode *inode, int mask, struct nameidata *nd) } - /* - * MAY_EXEC on regular files requires special handling: We override - * filesystem execute permissions if the mode bits aren't set. - */ - if ((mask & MAY_EXEC) && S_ISREG(mode) && !(mode & S_IXUGO)) - return -EACCES; - /* Ordinary permission routines do not understand MAY_APPEND. */ submask = mask & ~MAY_APPEND; if ((retval = xid_permission(inode, mask, nd))) @@ -411,29 +404,6 @@ void release_open_intent(struct nameidata *nd) fput(nd->intent.open.file); } -static inline struct dentry *do_revalidate(struct dentry *dentry, struct nameidata *nd) -{ - int status = dentry->d_op->d_revalidate(dentry, nd); - if (unlikely(status <= 0)) { - /* - * The dentry failed validation. - * If d_revalidate returned 0 attempt to invalidate - * the dentry otherwise d_revalidate is asking us - * to return a fail status. - */ - if (!status) { - if (!d_invalidate(dentry)) { - dput(dentry); - dentry = NULL; - } - } else { - dput(dentry); - dentry = ERR_PTR(status); - } - } - return dentry; -} - /* * Internal lookup() using the new generic dcache. * SMP-safe @@ -448,9 +418,12 @@ static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name, if (!dentry) dentry = d_lookup(parent, name); - if (dentry && dentry->d_op && dentry->d_op->d_revalidate) - dentry = do_revalidate(dentry, nd); - + if (dentry && dentry->d_op && dentry->d_op->d_revalidate) { + if (!dentry->d_op->d_revalidate(dentry, nd) && !d_invalidate(dentry)) { + dput(dentry); + dentry = NULL; + } + } return dentry; } @@ -545,9 +518,10 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, s */ mutex_unlock(&dir->i_mutex); if (result->d_op && result->d_op->d_revalidate) { - result = do_revalidate(result, nd); - if (!result) + if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) { + dput(result); result = ERR_PTR(-ENOENT); + } } return result; } @@ -816,11 +790,9 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, goto need_lookup; if (dentry->d_op && dentry->d_op->d_revalidate) goto need_revalidate; -done: inode = dentry->d_inode; if (!inode) - goto no_inode; - + goto done; #ifdef CONFIG_VSERVER_FILESHARING /* MEF: PlanetLab FS module assumes that any file that can be * named (e.g., via a cross mount) is not hidden from another @@ -839,7 +811,7 @@ done: if (de && !vx_hide_check(0, de->vx_flags)) goto hidden; } -no_inode: +done: path->mnt = mnt; path->dentry = dentry; __follow_mount(path); @@ -862,12 +834,12 @@ need_lookup: need_revalidate: if (atomic) return -EWOULDBLOCKIO; - dentry = do_revalidate(dentry, nd); - if (!dentry) - goto need_lookup; - if (IS_ERR(dentry)) - goto fail; - goto done; + if (dentry->d_op->d_revalidate(dentry, nd)) + goto done; + if (d_invalidate(dentry)) + goto done; + dput(dentry); + goto need_lookup; fail: return PTR_ERR(dentry); @@ -1229,9 +1201,9 @@ static int fastcall do_path_lookup(int dfd, const char *name, retval = link_path_walk(name, nd); out: if (likely(retval == 0)) { - if (unlikely(!audit_dummy_context() && nd && nd->dentry && + if (unlikely(current->audit_context && nd && nd->dentry && nd->dentry->d_inode)) - audit_inode(name, nd->dentry->d_inode); + audit_inode(name, nd->dentry->d_inode, flags); } out_fail: return retval; @@ -1462,7 +1434,7 @@ static int may_delete(struct inode *dir, struct dentry *victim, return -ENOENT; BUG_ON(victim->d_parent->d_inode != dir); - audit_inode_child(victim->d_name.name, victim->d_inode, dir); + audit_inode_child(victim->d_name.name, victim->d_inode, dir->i_ino); error = permission(dir,MAY_WRITE | MAY_EXEC, nd); if (error) @@ -1530,7 +1502,7 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) struct dentry *p; if (p1 == p2) { - mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&p1->d_inode->i_mutex); return NULL; } @@ -1538,22 +1510,22 @@ struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) for (p = p1; p->d_parent != p; p = p->d_parent) { if (p->d_parent == p2) { - mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_PARENT); - mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&p2->d_inode->i_mutex); + mutex_lock(&p1->d_inode->i_mutex); return p; } } for (p = p2; p->d_parent != p; p = p->d_parent) { if (p->d_parent == p1) { - mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT); - mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&p1->d_inode->i_mutex); + mutex_lock(&p2->d_inode->i_mutex); return p; } } - mutex_lock_nested(&p1->d_inode->i_mutex, I_MUTEX_PARENT); - mutex_lock_nested(&p2->d_inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&p1->d_inode->i_mutex); + mutex_lock(&p2->d_inode->i_mutex); return NULL; } @@ -1767,7 +1739,6 @@ do_last: * It already exists. */ mutex_unlock(&dir->d_inode->i_mutex); - audit_inode_update(path.dentry->d_inode); error = -EEXIST; if (flag & O_EXCL) @@ -1778,7 +1749,6 @@ do_last: if (flag & O_NOFOLLOW) goto exit_dput; } - error = -ENOENT; if (!path.dentry->d_inode) goto exit_dput; @@ -1867,7 +1837,7 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) { struct dentry *dentry = ERR_PTR(-EEXIST); - mutex_lock_nested(&nd->dentry->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&nd->dentry->d_inode->i_mutex); /* * Yucky last component or no last component at all? * (foo/., foo/.., /////) @@ -1875,8 +1845,6 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) if (nd->last_type != LAST_NORM) goto fail; nd->flags &= ~LOOKUP_PARENT; - nd->flags |= LOOKUP_CREATE; - nd->intent.open.flags = O_EXCL; /* * Do the final lookup. @@ -2131,7 +2099,7 @@ static long do_rmdir(int dfd, const char __user *pathname) error = -EBUSY; goto exit1; } - mutex_lock_nested(&nd.dentry->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&nd.dentry->d_inode->i_mutex); dentry = lookup_hash(&nd); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -2206,7 +2174,7 @@ static long do_unlinkat(int dfd, const char __user *pathname) error = -EISDIR; if (nd.last_type != LAST_NORM) goto exit1; - mutex_lock_nested(&nd.dentry->d_inode->i_mutex, I_MUTEX_PARENT); + mutex_lock(&nd.dentry->d_inode->i_mutex); dentry = lookup_hash(&nd); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -2370,16 +2338,14 @@ asmlinkage long sys_linkat(int olddfd, const char __user *oldname, int error; char * to; - if ((flags & ~AT_SYMLINK_FOLLOW) != 0) + if (flags != 0) return -EINVAL; to = getname(newname); if (IS_ERR(to)) return PTR_ERR(to); - error = __user_walk_fd(olddfd, oldname, - flags & AT_SYMLINK_FOLLOW ? LOOKUP_FOLLOW : 0, - &old_nd); + error = __user_walk_fd(olddfd, oldname, 0, &old_nd); if (error) goto exit; error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd); @@ -2715,7 +2681,8 @@ static char *page_getlink(struct dentry * dentry, struct page **ppage) { struct page * page; struct address_space *mapping = dentry->d_inode->i_mapping; - page = read_mapping_page(mapping, 0, NULL); + page = read_cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage, + NULL); if (IS_ERR(page)) goto sync_fail; wait_on_page_locked(page); diff --git a/fs/namespace.c b/fs/namespace.c index b09441d09..daa212a0d 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -8,6 +8,7 @@ * Heavily rewritten. */ +#include #include #include #include @@ -88,15 +89,6 @@ struct vfsmount *alloc_vfsmnt(const char *name) return mnt; } -int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb) -{ - mnt->mnt_sb = sb; - mnt->mnt_root = dget(sb->s_root); - return 0; -} - -EXPORT_SYMBOL(simple_set_mnt); - void free_vfsmnt(struct vfsmount *mnt) { kfree(mnt->mnt_devname); @@ -581,8 +573,10 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill) { struct vfsmount *p; - for (p = mnt; p; p = next_mnt(p, mnt)) - list_move(&p->mnt_hash, kill); + for (p = mnt; p; p = next_mnt(p, mnt)) { + list_del(&p->mnt_hash); + list_add(&p->mnt_hash, kill); + } if (propagate) propagate_umount(kill); @@ -638,8 +632,8 @@ static int do_umount(struct vfsmount *mnt, int flags) */ lock_kernel(); - if (sb->s_op->umount_begin) - sb->s_op->umount_begin(mnt, flags); + if ((flags & MNT_FORCE) && sb->s_op->umount_begin) + sb->s_op->umount_begin(sb); unlock_kernel(); /* @@ -1233,40 +1227,6 @@ static void expire_mount(struct vfsmount *mnt, struct list_head *mounts, } } -/* - * go through the vfsmounts we've just consigned to the graveyard to - * - check that they're still dead - * - delete the vfsmount from the appropriate namespace under lock - * - dispose of the corpse - */ -static void expire_mount_list(struct list_head *graveyard, struct list_head *mounts) -{ - struct namespace *namespace; - struct vfsmount *mnt; - - while (!list_empty(graveyard)) { - LIST_HEAD(umounts); - mnt = list_entry(graveyard->next, struct vfsmount, mnt_expire); - list_del_init(&mnt->mnt_expire); - - /* don't do anything if the namespace is dead - all the - * vfsmounts from it are going away anyway */ - namespace = mnt->mnt_namespace; - if (!namespace || !namespace->root) - continue; - get_namespace(namespace); - - spin_unlock(&vfsmount_lock); - down_write(&namespace_sem); - expire_mount(mnt, mounts, &umounts); - up_write(&namespace_sem); - release_mounts(&umounts); - mntput(mnt); - put_namespace(namespace); - spin_lock(&vfsmount_lock); - } -} - /* * process a list of expirable mountpoints with the intent of discarding any * mountpoints that aren't in use and haven't been touched since last we came @@ -1274,6 +1234,7 @@ static void expire_mount_list(struct list_head *graveyard, struct list_head *mou */ void mark_mounts_for_expiry(struct list_head *mounts) { + struct namespace *namespace; struct vfsmount *mnt, *next; LIST_HEAD(graveyard); @@ -1297,79 +1258,38 @@ void mark_mounts_for_expiry(struct list_head *mounts) list_move(&mnt->mnt_expire, &graveyard); } - expire_mount_list(&graveyard, mounts); - - spin_unlock(&vfsmount_lock); -} - -EXPORT_SYMBOL_GPL(mark_mounts_for_expiry); - -/* - * Ripoff of 'select_parent()' - * - * search the list of submounts for a given mountpoint, and move any - * shrinkable submounts to the 'graveyard' list. - */ -static int select_submounts(struct vfsmount *parent, struct list_head *graveyard) -{ - struct vfsmount *this_parent = parent; - struct list_head *next; - int found = 0; - -repeat: - next = this_parent->mnt_mounts.next; -resume: - while (next != &this_parent->mnt_mounts) { - struct list_head *tmp = next; - struct vfsmount *mnt = list_entry(tmp, struct vfsmount, mnt_child); - - next = tmp->next; - if (!(mnt->mnt_flags & MNT_SHRINKABLE)) - continue; - /* - * Descend a level if the d_mounts list is non-empty. - */ - if (!list_empty(&mnt->mnt_mounts)) { - this_parent = mnt; - goto repeat; - } - - if (!propagate_mount_busy(mnt, 1)) { - mntget(mnt); - list_move_tail(&mnt->mnt_expire, graveyard); - found++; - } - } /* - * All done at this level ... ascend and resume the search + * go through the vfsmounts we've just consigned to the graveyard to + * - check that they're still dead + * - delete the vfsmount from the appropriate namespace under lock + * - dispose of the corpse */ - if (this_parent != parent) { - next = this_parent->mnt_child.next; - this_parent = this_parent->mnt_parent; - goto resume; - } - return found; -} - -/* - * process a list of expirable mountpoints with the intent of discarding any - * submounts of a specific parent mountpoint - */ -void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts) -{ - LIST_HEAD(graveyard); - int found; + while (!list_empty(&graveyard)) { + LIST_HEAD(umounts); + mnt = list_entry(graveyard.next, struct vfsmount, mnt_expire); + list_del_init(&mnt->mnt_expire); - spin_lock(&vfsmount_lock); + /* don't do anything if the namespace is dead - all the + * vfsmounts from it are going away anyway */ + namespace = mnt->mnt_namespace; + if (!namespace || !namespace->root) + continue; + get_namespace(namespace); - /* extract submounts of 'mountpoint' from the expiration list */ - while ((found = select_submounts(mountpoint, &graveyard)) != 0) - expire_mount_list(&graveyard, mounts); + spin_unlock(&vfsmount_lock); + down_write(&namespace_sem); + expire_mount(mnt, mounts, &umounts); + up_write(&namespace_sem); + release_mounts(&umounts); + mntput(mnt); + put_namespace(namespace); + spin_lock(&vfsmount_lock); + } spin_unlock(&vfsmount_lock); } -EXPORT_SYMBOL_GPL(shrink_submounts); +EXPORT_SYMBOL_GPL(mark_mounts_for_expiry); /* * Some copy_from_user() implementations do not return the exact number of diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index b4ee89250..f0860c602 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c @@ -10,6 +10,7 @@ * */ +#include #include #include diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index b76e57b75..a1f3e972c 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c @@ -9,6 +9,7 @@ * */ +#include #include #include @@ -38,7 +39,7 @@ static void ncp_delete_inode(struct inode *); static void ncp_put_super(struct super_block *); -static int ncp_statfs(struct dentry *, struct kstatfs *); +static int ncp_statfs(struct super_block *, struct kstatfs *); static kmem_cache_t * ncp_inode_cachep; @@ -104,7 +105,7 @@ static struct super_operations ncp_sops = extern struct dentry_operations ncp_root_dentry_operations; #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) -extern const struct address_space_operations ncp_symlink_aops; +extern struct address_space_operations ncp_symlink_aops; extern int ncp_symlink(struct inode*, struct dentry*, const char*); #endif @@ -224,6 +225,7 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo) inode->i_nlink = 1; inode->i_uid = server->m.uid; inode->i_gid = server->m.gid; + inode->i_blksize = NCP_BLOCK_SIZE; ncp_update_dates(inode, &nwinfo->i); ncp_update_inode(inode, nwinfo); @@ -722,14 +724,13 @@ static void ncp_put_super(struct super_block *sb) kfree(server); } -static int ncp_statfs(struct dentry *dentry, struct kstatfs *buf) +static int ncp_statfs(struct super_block *sb, struct kstatfs *buf) { struct dentry* d; struct inode* i; struct ncp_inode_info* ni; struct ncp_server* s; struct ncp_volume_info vi; - struct super_block *sb = dentry->d_sb; int err; __u8 dh; @@ -956,10 +957,10 @@ out: return result; } -static int ncp_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ncp_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, ncp_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, ncp_fill_super); } static struct file_system_type ncp_fs_type = { diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index 42039fe06..eb3813ad1 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c @@ -7,6 +7,7 @@ * */ +#include #include #include diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c index e7d5a3097..52d60c3d8 100644 --- a/fs/ncpfs/mmap.c +++ b/fs/ncpfs/mmap.c @@ -93,7 +93,7 @@ static struct page* ncp_file_mmap_nopage(struct vm_area_struct *area, */ if (type) *type = VM_FAULT_MAJOR; - count_vm_event(PGMAJFAULT); + inc_page_state(pgmajfault); return page; } diff --git a/fs/ncpfs/ncplib_kernel.c b/fs/ncpfs/ncplib_kernel.c index 551e0bac7..d9ebf6439 100644 --- a/fs/ncpfs/ncplib_kernel.c +++ b/fs/ncpfs/ncplib_kernel.c @@ -10,6 +10,7 @@ */ +#include #include "ncplib_kernel.h" diff --git a/fs/ncpfs/ncplib_kernel.h b/fs/ncpfs/ncplib_kernel.h index 2441d1ab5..799e5c2be 100644 --- a/fs/ncpfs/ncplib_kernel.h +++ b/fs/ncpfs/ncplib_kernel.h @@ -12,6 +12,7 @@ #ifndef _NCPLIB_H #define _NCPLIB_H +#include #include #include diff --git a/fs/ncpfs/ncpsign_kernel.c b/fs/ncpfs/ncpsign_kernel.c index 749a18d33..a6ec90cd8 100644 --- a/fs/ncpfs/ncpsign_kernel.c +++ b/fs/ncpfs/ncpsign_kernel.c @@ -5,6 +5,7 @@ * */ +#include #ifdef CONFIG_NCPFS_PACKET_SIGNING diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index 11c2b252e..8783eb7ec 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c @@ -8,6 +8,7 @@ * */ +#include #include #include diff --git a/fs/ncpfs/symlink.c b/fs/ncpfs/symlink.c index ca92c2406..e935f1b34 100644 --- a/fs/ncpfs/symlink.c +++ b/fs/ncpfs/symlink.c @@ -20,6 +20,7 @@ * */ +#include #include @@ -98,7 +99,7 @@ fail: /* * symlinks can't do much... */ -const struct address_space_operations ncp_symlink_aops = { +struct address_space_operations ncp_symlink_aops = { .readpage = ncp_symlink_readpage, }; diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile index 2af6f22df..ec61fd56a 100644 --- a/fs/nfs/Makefile +++ b/fs/nfs/Makefile @@ -4,17 +4,14 @@ obj-$(CONFIG_NFS_FS) += nfs.o -nfs-y := client.o dir.o file.o getroot.o inode.o super.o nfs2xdr.o \ - pagelist.o proc.o read.o symlink.o unlink.o \ - write.o namespace.o +nfs-y := dir.o file.o inode.o nfs2xdr.o pagelist.o \ + proc.o read.o symlink.o unlink.o write.o nfs-$(CONFIG_ROOT_NFS) += nfsroot.o mount_clnt.o nfs-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o nfs-$(CONFIG_NFS_V3_ACL) += nfs3acl.o nfs-$(CONFIG_NFS_V4) += nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o \ delegation.o idmap.o \ - callback.o callback_xdr.o callback_proc.o \ - nfs4namespace.o + callback.o callback_xdr.o callback_proc.o nfs-$(CONFIG_NFS_DIRECTIO) += direct.o nfs-$(CONFIG_SYSCTL) += sysctl.o -nfs-$(CONFIG_NFS_FSCACHE) += fscache.o nfs-objs := $(nfs-y) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index a3ee11364..90c95adc8 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -6,6 +6,7 @@ * NFSv4 callback handling */ +#include #include #include #include @@ -19,7 +20,6 @@ #include "nfs4_fs.h" #include "callback.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_CALLBACK @@ -37,21 +37,6 @@ static struct svc_program nfs4_callback_program; unsigned int nfs_callback_set_tcpport; unsigned short nfs_callback_tcpport; -static const int nfs_set_port_min = 0; -static const int nfs_set_port_max = 65535; - -static int param_set_port(const char *val, struct kernel_param *kp) -{ - char *endp; - int num = simple_strtol(val, &endp, 0); - if (endp == val || *endp || num < nfs_set_port_min || num > nfs_set_port_max) - return -EINVAL; - *((int *)kp->arg) = num; - return 0; -} - -module_param_call(callback_tcpport, param_set_port, param_get_int, - &nfs_callback_set_tcpport, 0644); /* * This is the callback kernel thread. @@ -150,8 +135,10 @@ out_err: /* * Kill the server process if it is not already up. */ -void nfs_callback_down(void) +int nfs_callback_down(void) { + int ret = 0; + lock_kernel(); mutex_lock(&nfs_callback_mutex); nfs_callback_info.users--; @@ -163,19 +150,20 @@ void nfs_callback_down(void) } while (wait_for_completion_timeout(&nfs_callback_info.stopped, 5*HZ) == 0); mutex_unlock(&nfs_callback_mutex); unlock_kernel(); + return ret; } static int nfs_callback_authenticate(struct svc_rqst *rqstp) { - struct sockaddr_in *addr = &rqstp->rq_addr; - struct nfs_client *clp; + struct in_addr *addr = &rqstp->rq_addr.sin_addr; + struct nfs4_client *clp; /* Don't talk to strangers */ - clp = nfs_find_client(addr, 4); + clp = nfs4_find_client(addr); if (clp == NULL) return SVC_DROP; - dprintk("%s: %u.%u.%u.%u NFSv4 callback!\n", __FUNCTION__, NIPQUAD(addr->sin_addr)); - nfs_put_client(clp); + dprintk("%s: %u.%u.%u.%u NFSv4 callback!\n", __FUNCTION__, NIPQUAD(addr)); + nfs4_put_client(clp); switch (rqstp->rq_authop->flavour) { case RPC_AUTH_NULL: if (rqstp->rq_proc != CB_NULL) @@ -194,6 +182,8 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp) /* * Define NFS4 callback program */ +extern struct svc_version nfs4_callback_version1; + static struct svc_version *nfs4_callback_version[] = { [1] = &nfs4_callback_version1, }; diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h index 5676163d2..b252e7fe5 100644 --- a/fs/nfs/callback.h +++ b/fs/nfs/callback.h @@ -62,13 +62,8 @@ struct cb_recallargs { extern unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res); extern unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy); -#ifdef CONFIG_NFS_V4 extern int nfs_callback_up(void); -extern void nfs_callback_down(void); -#else -#define nfs_callback_up() (0) -#define nfs_callback_down() do {} while(0) -#endif +extern int nfs_callback_down(void); extern unsigned int nfs_callback_set_tcpport; extern unsigned short nfs_callback_tcpport; diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 97cf8f714..462cfceb5 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -5,25 +5,25 @@ * * NFSv4 callback procedures */ +#include #include #include #include "nfs4_fs.h" #include "callback.h" #include "delegation.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_CALLBACK unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res) { - struct nfs_client *clp; + struct nfs4_client *clp; struct nfs_delegation *delegation; struct nfs_inode *nfsi; struct inode *inode; res->bitmap[0] = res->bitmap[1] = 0; res->status = htonl(NFS4ERR_BADHANDLE); - clp = nfs_find_client(args->addr, 4); + clp = nfs4_find_client(&args->addr->sin_addr); if (clp == NULL) goto out; inode = nfs_delegation_find_inode(clp, &args->fh); @@ -49,7 +49,7 @@ out_iput: up_read(&nfsi->rwsem); iput(inode); out_putclient: - nfs_put_client(clp); + nfs4_put_client(clp); out: dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(res->status)); return res->status; @@ -57,12 +57,12 @@ out: unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy) { - struct nfs_client *clp; + struct nfs4_client *clp; struct inode *inode; unsigned res; res = htonl(NFS4ERR_BADHANDLE); - clp = nfs_find_client(args->addr, 4); + clp = nfs4_find_client(&args->addr->sin_addr); if (clp == NULL) goto out; inode = nfs_delegation_find_inode(clp, &args->fh); @@ -81,7 +81,7 @@ unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy) } iput(inode); out_putclient: - nfs_put_client(clp); + nfs4_put_client(clp); out: dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(res)); return res; diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 29f932192..05c38cf40 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -5,6 +5,7 @@ * * NFSv4 callback encode/decode procedures */ +#include #include #include #include @@ -201,7 +202,7 @@ static unsigned decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xd status = decode_fh(xdr, &args->fh); out: dprintk("%s: exit with status = %d\n", __FUNCTION__, status); - return status; + return 0; } static unsigned encode_string(struct xdr_stream *xdr, unsigned int len, const char *str) diff --git a/fs/nfs/client.c b/fs/nfs/client.c deleted file mode 100644 index aa9e41219..000000000 --- a/fs/nfs/client.c +++ /dev/null @@ -1,1436 +0,0 @@ -/* client.c: NFS client sharing and management code - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "nfs4_fs.h" -#include "callback.h" -#include "delegation.h" -#include "iostat.h" -#include "internal.h" - -#define NFSDBG_FACILITY NFSDBG_CLIENT - -static DEFINE_SPINLOCK(nfs_client_lock); -static LIST_HEAD(nfs_client_list); -static LIST_HEAD(nfs_volume_list); -static DECLARE_WAIT_QUEUE_HEAD(nfs_client_active_wq); - -/* - * RPC cruft for NFS - */ -static struct rpc_version *nfs_version[5] = { - [2] = &nfs_version2, -#ifdef CONFIG_NFS_V3 - [3] = &nfs_version3, -#endif -#ifdef CONFIG_NFS_V4 - [4] = &nfs_version4, -#endif -}; - -struct rpc_program nfs_program = { - .name = "nfs", - .number = NFS_PROGRAM, - .nrvers = ARRAY_SIZE(nfs_version), - .version = nfs_version, - .stats = &nfs_rpcstat, - .pipe_dir_name = "/nfs", -}; - -struct rpc_stat nfs_rpcstat = { - .program = &nfs_program -}; - - -#ifdef CONFIG_NFS_V3_ACL -static struct rpc_stat nfsacl_rpcstat = { &nfsacl_program }; -static struct rpc_version * nfsacl_version[] = { - [3] = &nfsacl_version3, -}; - -struct rpc_program nfsacl_program = { - .name = "nfsacl", - .number = NFS_ACL_PROGRAM, - .nrvers = ARRAY_SIZE(nfsacl_version), - .version = nfsacl_version, - .stats = &nfsacl_rpcstat, -}; -#endif /* CONFIG_NFS_V3_ACL */ - -/* - * Allocate a shared client record - * - * Since these are allocated/deallocated very rarely, we don't - * bother putting them in a slab cache... - */ -static struct nfs_client *nfs_alloc_client(const char *hostname, - const struct sockaddr_in *addr, - int nfsversion) -{ - struct nfs_client *clp; - int error; - - if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) - goto error_0; - - error = rpciod_up(); - if (error < 0) { - dprintk("%s: couldn't start rpciod! Error = %d\n", - __FUNCTION__, error); - goto error_1; - } - __set_bit(NFS_CS_RPCIOD, &clp->cl_res_state); - - if (nfsversion == 4) { - if (nfs_callback_up() < 0) - goto error_2; - __set_bit(NFS_CS_CALLBACK, &clp->cl_res_state); - } - - atomic_set(&clp->cl_count, 1); - clp->cl_cons_state = NFS_CS_INITING; - - clp->cl_nfsversion = nfsversion; - memcpy(&clp->cl_addr, addr, sizeof(clp->cl_addr)); - - if (hostname) { - clp->cl_hostname = kstrdup(hostname, GFP_KERNEL); - if (!clp->cl_hostname) - goto error_3; - } - - INIT_LIST_HEAD(&clp->cl_superblocks); - clp->cl_rpcclient = ERR_PTR(-EINVAL); - -#ifdef CONFIG_NFS_V4 - init_rwsem(&clp->cl_sem); - INIT_LIST_HEAD(&clp->cl_delegations); - INIT_LIST_HEAD(&clp->cl_state_owners); - INIT_LIST_HEAD(&clp->cl_unused); - spin_lock_init(&clp->cl_lock); - INIT_WORK(&clp->cl_renewd, nfs4_renew_state, clp); - rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS client"); - clp->cl_boot_time = CURRENT_TIME; - clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED; -#endif - - nfs_fscache_get_client_cookie(clp); - - return clp; - -error_3: - if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) - nfs_callback_down(); -error_2: - rpciod_down(); - __clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state); -error_1: - kfree(clp); -error_0: - return NULL; -} - -static void nfs4_shutdown_client(struct nfs_client *clp) -{ -#ifdef CONFIG_NFS_V4 - if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) - nfs4_kill_renewd(clp); - while (!list_empty(&clp->cl_unused)) { - struct nfs4_state_owner *sp; - - sp = list_entry(clp->cl_unused.next, - struct nfs4_state_owner, - so_list); - list_del(&sp->so_list); - kfree(sp); - } - BUG_ON(!list_empty(&clp->cl_state_owners)); - if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state)) - nfs_idmap_delete(clp); -#endif -} - -/* - * Destroy a shared client record - */ -static void nfs_free_client(struct nfs_client *clp) -{ - dprintk("--> nfs_free_client(%d)\n", clp->cl_nfsversion); - - nfs4_shutdown_client(clp); - - nfs_fscache_release_client_cookie(clp); - - /* -EIO all pending I/O */ - if (!IS_ERR(clp->cl_rpcclient)) - rpc_shutdown_client(clp->cl_rpcclient); - - if (__test_and_clear_bit(NFS_CS_CALLBACK, &clp->cl_res_state)) - nfs_callback_down(); - - if (__test_and_clear_bit(NFS_CS_RPCIOD, &clp->cl_res_state)) - rpciod_down(); - - kfree(clp->cl_hostname); - kfree(clp); - - dprintk("<-- nfs_free_client()\n"); -} - -/* - * Release a reference to a shared client record - */ -void nfs_put_client(struct nfs_client *clp) -{ - if (!clp) - return; - - dprintk("--> nfs_put_client({%d})\n", atomic_read(&clp->cl_count)); - - if (atomic_dec_and_lock(&clp->cl_count, &nfs_client_lock)) { - list_del(&clp->cl_share_link); - spin_unlock(&nfs_client_lock); - - BUG_ON(!list_empty(&clp->cl_superblocks)); - - nfs_free_client(clp); - } -} - -/* - * Find a client by address - * - caller must hold nfs_client_lock - */ -static struct nfs_client *__nfs_find_client(const struct sockaddr_in *addr, int nfsversion) -{ - struct nfs_client *clp; - - list_for_each_entry(clp, &nfs_client_list, cl_share_link) { - /* Different NFS versions cannot share the same nfs_client */ - if (clp->cl_nfsversion != nfsversion) - continue; - - if (memcmp(&clp->cl_addr.sin_addr, &addr->sin_addr, - sizeof(clp->cl_addr.sin_addr)) != 0) - continue; - - if (clp->cl_addr.sin_port == addr->sin_port) - goto found; - } - - return NULL; - -found: - atomic_inc(&clp->cl_count); - return clp; -} - -/* - * Find a client by IP address and protocol version - * - returns NULL if no such client - */ -struct nfs_client *nfs_find_client(const struct sockaddr_in *addr, int nfsversion) -{ - struct nfs_client *clp; - - spin_lock(&nfs_client_lock); - clp = __nfs_find_client(addr, nfsversion); - spin_unlock(&nfs_client_lock); - - BUG_ON(clp->cl_cons_state == 0); - - return clp; -} - -/* - * Look up a client by IP address and protocol version - * - creates a new record if one doesn't yet exist - */ -static struct nfs_client *nfs_get_client(const char *hostname, - const struct sockaddr_in *addr, - int nfsversion) -{ - struct nfs_client *clp, *new = NULL; - int error; - - dprintk("--> nfs_get_client(%s,"NIPQUAD_FMT":%d,%d)\n", - hostname ?: "", NIPQUAD(addr->sin_addr), - addr->sin_port, nfsversion); - - /* see if the client already exists */ - do { - spin_lock(&nfs_client_lock); - - clp = __nfs_find_client(addr, nfsversion); - if (clp) - goto found_client; - if (new) - goto install_client; - - spin_unlock(&nfs_client_lock); - - new = nfs_alloc_client(hostname, addr, nfsversion); - } while (new); - - return ERR_PTR(-ENOMEM); - - /* install a new client and return with it unready */ -install_client: - clp = new; - list_add(&clp->cl_share_link, &nfs_client_list); - spin_unlock(&nfs_client_lock); - dprintk("--> nfs_get_client() = %p [new]\n", clp); - return clp; - - /* found an existing client - * - make sure it's ready before returning - */ -found_client: - spin_unlock(&nfs_client_lock); - - if (new) - nfs_free_client(new); - - error = wait_event_interruptible(nfs_client_active_wq, - clp->cl_cons_state != NFS_CS_INITING); - if (error < 0) { - nfs_put_client(clp); - return ERR_PTR(-ERESTARTSYS); - } - - if (clp->cl_cons_state < NFS_CS_READY) { - error = clp->cl_cons_state; - nfs_put_client(clp); - return ERR_PTR(error); - } - - BUG_ON(clp->cl_cons_state != NFS_CS_READY); - - dprintk("--> nfs_get_client() = %p [share]\n", clp); - return clp; -} - -/* - * Mark a server as ready or failed - */ -static void nfs_mark_client_ready(struct nfs_client *clp, int state) -{ - clp->cl_cons_state = state; - wake_up_all(&nfs_client_active_wq); -} - -/* - * Initialise the timeout values for a connection - */ -static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, - unsigned int timeo, unsigned int retrans) -{ - to->to_initval = timeo * HZ / 10; - to->to_retries = retrans; - if (!to->to_retries) - to->to_retries = 2; - - switch (proto) { - case IPPROTO_TCP: - if (!to->to_initval) - to->to_initval = 60 * HZ; - if (to->to_initval > NFS_MAX_TCP_TIMEOUT) - to->to_initval = NFS_MAX_TCP_TIMEOUT; - to->to_increment = to->to_initval; - to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); - to->to_exponential = 0; - break; - case IPPROTO_UDP: - default: - if (!to->to_initval) - to->to_initval = 11 * HZ / 10; - if (to->to_initval > NFS_MAX_UDP_TIMEOUT) - to->to_initval = NFS_MAX_UDP_TIMEOUT; - to->to_maxval = NFS_MAX_UDP_TIMEOUT; - to->to_exponential = 1; - break; - } -} - -/* - * Create an RPC client handle - */ -static int nfs_create_rpc_client(struct nfs_client *clp, int proto, - unsigned int timeo, - unsigned int retrans, - rpc_authflavor_t flavor) -{ - struct rpc_timeout timeparms; - struct rpc_xprt *xprt = NULL; - struct rpc_clnt *clnt = NULL; - - if (!IS_ERR(clp->cl_rpcclient)) - return 0; - - nfs_init_timeout_values(&timeparms, proto, timeo, retrans); - clp->retrans_timeo = timeparms.to_initval; - clp->retrans_count = timeparms.to_retries; - - /* create transport and client */ - xprt = xprt_create_proto(proto, &clp->cl_addr, &timeparms); - if (IS_ERR(xprt)) { - dprintk("%s: cannot create RPC transport. Error = %ld\n", - __FUNCTION__, PTR_ERR(xprt)); - return PTR_ERR(xprt); - } - - /* Bind to a reserved port! */ - xprt->resvport = 1; - /* Create the client RPC handle */ - clnt = rpc_create_client(xprt, clp->cl_hostname, &nfs_program, - clp->rpc_ops->version, RPC_AUTH_UNIX); - if (IS_ERR(clnt)) { - dprintk("%s: cannot create RPC client. Error = %ld\n", - __FUNCTION__, PTR_ERR(clnt)); - return PTR_ERR(clnt); - } - - clnt->cl_intr = 1; - clnt->cl_softrtry = 1; - clnt->cl_tagxid = 1; - clp->cl_rpcclient = clnt; - return 0; -} - -/* - * Version 2 or 3 client destruction - */ -static void nfs_destroy_server(struct nfs_server *server) -{ - if (!IS_ERR(server->client_acl)) - rpc_shutdown_client(server->client_acl); - - if (!(server->flags & NFS_MOUNT_NONLM)) - lockd_down(); /* release rpc.lockd */ -} - -/* - * Version 2 or 3 lockd setup - */ -static int nfs_start_lockd(struct nfs_server *server) -{ - int error = 0; - - if (server->nfs_client->cl_nfsversion > 3) - goto out; - if (server->flags & NFS_MOUNT_NONLM) - goto out; - error = lockd_up(); - if (error < 0) - server->flags |= NFS_MOUNT_NONLM; - else - server->destroy = nfs_destroy_server; -out: - return error; -} - -/* - * Initialise an NFSv3 ACL client connection - */ -#ifdef CONFIG_NFS_V3_ACL -static void nfs_init_server_aclclient(struct nfs_server *server) -{ - if (server->nfs_client->cl_nfsversion != 3) - goto out_noacl; - if (server->flags & NFS_MOUNT_NOACL) - goto out_noacl; - - server->client_acl = rpc_bind_new_program(server->client, &nfsacl_program, 3); - if (IS_ERR(server->client_acl)) - goto out_noacl; - - /* No errors! Assume that Sun nfsacls are supported */ - server->caps |= NFS_CAP_ACLS; - return; - -out_noacl: - server->caps &= ~NFS_CAP_ACLS; -} -#else -static inline void nfs_init_server_aclclient(struct nfs_server *server) -{ - server->flags &= ~NFS_MOUNT_NOACL; - server->caps &= ~NFS_CAP_ACLS; -} -#endif - -/* - * Create a general RPC client - */ -static int nfs_init_server_rpcclient(struct nfs_server *server, rpc_authflavor_t pseudoflavour) -{ - struct nfs_client *clp = server->nfs_client; - - server->client = rpc_clone_client(clp->cl_rpcclient); - if (IS_ERR(server->client)) { - dprintk("%s: couldn't create rpc_client!\n", __FUNCTION__); - return PTR_ERR(server->client); - } - - if (pseudoflavour != clp->cl_rpcclient->cl_auth->au_flavor) { - struct rpc_auth *auth; - - auth = rpcauth_create(pseudoflavour, server->client); - if (IS_ERR(auth)) { - dprintk("%s: couldn't create credcache!\n", __FUNCTION__); - return PTR_ERR(auth); - } - } - server->client->cl_softrtry = 0; - if (server->flags & NFS_MOUNT_SOFT) - server->client->cl_softrtry = 1; - - server->client->cl_intr = 0; - if (server->flags & NFS4_MOUNT_INTR) - server->client->cl_intr = 1; - - server->client->cl_tagxid = (server->flags & NFS_MOUNT_TAGXID) ? 1 : 0; - - return 0; -} - -/* - * Initialise an NFS2 or NFS3 client - */ -static int nfs_init_client(struct nfs_client *clp, const struct nfs_mount_data *data) -{ - int proto = (data->flags & NFS_MOUNT_TCP) ? IPPROTO_TCP : IPPROTO_UDP; - int error; - - if (clp->cl_cons_state == NFS_CS_READY) { - /* the client is already initialised */ - dprintk("<-- nfs_init_client() = 0 [already %p]\n", clp); - return 0; - } - - /* Check NFS protocol revision and initialize RPC op vector */ - clp->rpc_ops = &nfs_v2_clientops; -#ifdef CONFIG_NFS_V3 - if (clp->cl_nfsversion == 3) - clp->rpc_ops = &nfs_v3_clientops; -#endif - /* - * Create a client RPC handle for doing FSSTAT with UNIX auth only - * - RFC 2623, sec 2.3.2 - */ - error = nfs_create_rpc_client(clp, proto, data->timeo, data->retrans, - RPC_AUTH_UNIX); - if (error < 0) - goto error; - nfs_mark_client_ready(clp, NFS_CS_READY); - return 0; - -error: - nfs_mark_client_ready(clp, error); - dprintk("<-- nfs_init_client() = xerror %d\n", error); - return error; -} - -/* - * Create a version 2 or 3 client - */ -static int nfs_init_server(struct nfs_server *server, const struct nfs_mount_data *data) -{ - struct nfs_client *clp; - int error, nfsvers = 2; - - dprintk("--> nfs_init_server()\n"); - -#ifdef CONFIG_NFS_V3 - if (data->flags & NFS_MOUNT_VER3) - nfsvers = 3; -#endif - - /* Allocate or find a client reference we can use */ - clp = nfs_get_client(data->hostname, &data->addr, nfsvers); - if (IS_ERR(clp)) { - dprintk("<-- nfs_init_server() = error %ld\n", PTR_ERR(clp)); - return PTR_ERR(clp); - } - - error = nfs_init_client(clp, data); - if (error < 0) - goto error; - - server->nfs_client = clp; - - /* Initialise the client representation from the mount data */ - server->flags = data->flags & NFS_MOUNT_FLAGMASK; - - if (data->rsize) - server->rsize = nfs_block_size(data->rsize, NULL); - if (data->wsize) - server->wsize = nfs_block_size(data->wsize, NULL); - - server->acregmin = data->acregmin * HZ; - server->acregmax = data->acregmax * HZ; - server->acdirmin = data->acdirmin * HZ; - server->acdirmax = data->acdirmax * HZ; - - /* Start lockd here, before we might error out */ - error = nfs_start_lockd(server); - if (error < 0) - goto error; - - error = nfs_init_server_rpcclient(server, data->pseudoflavor); - if (error < 0) - goto error; - - server->namelen = data->namlen; - /* Create a client RPC handle for the NFSv3 ACL management interface */ - nfs_init_server_aclclient(server); - if (clp->cl_nfsversion == 3) { - if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN) - server->namelen = NFS3_MAXNAMLEN; - server->caps |= NFS_CAP_READDIRPLUS; - } else { - if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN) - server->namelen = NFS2_MAXNAMLEN; - } - - dprintk("<-- nfs_init_server() = 0 [new %p]\n", clp); - return 0; - -error: - server->nfs_client = NULL; - nfs_put_client(clp); - dprintk("<-- nfs_init_server() = xerror %d\n", error); - return error; -} - -/* - * Load up the server record from information gained in an fsinfo record - */ -static void nfs_server_set_fsinfo(struct nfs_server *server, struct nfs_fsinfo *fsinfo) -{ - unsigned long max_rpc_payload; - - /* Work out a lot of parameters */ - if (server->rsize == 0) - server->rsize = nfs_block_size(fsinfo->rtpref, NULL); - if (server->wsize == 0) - server->wsize = nfs_block_size(fsinfo->wtpref, NULL); - - if (fsinfo->rtmax >= 512 && server->rsize > fsinfo->rtmax) - server->rsize = nfs_block_size(fsinfo->rtmax, NULL); - if (fsinfo->wtmax >= 512 && server->wsize > fsinfo->wtmax) - server->wsize = nfs_block_size(fsinfo->wtmax, NULL); - - max_rpc_payload = nfs_block_size(rpc_max_payload(server->client), NULL); - if (server->rsize > max_rpc_payload) - server->rsize = max_rpc_payload; - if (server->rsize > NFS_MAX_FILE_IO_SIZE) - server->rsize = NFS_MAX_FILE_IO_SIZE; - server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; - - if (server->wsize > max_rpc_payload) - server->wsize = max_rpc_payload; - if (server->wsize > NFS_MAX_FILE_IO_SIZE) - server->wsize = NFS_MAX_FILE_IO_SIZE; - server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - server->wtmult = nfs_block_bits(fsinfo->wtmult, NULL); - - server->dtsize = nfs_block_size(fsinfo->dtpref, NULL); - if (server->dtsize > PAGE_CACHE_SIZE) - server->dtsize = PAGE_CACHE_SIZE; - if (server->dtsize > server->rsize) - server->dtsize = server->rsize; - - if (server->flags & NFS_MOUNT_NOAC) { - server->acregmin = server->acregmax = 0; - server->acdirmin = server->acdirmax = 0; - } - - server->maxfilesize = fsinfo->maxfilesize; - - /* We're airborne Set socket buffersize */ - rpc_setbufsize(server->client, server->wsize + 100, server->rsize + 100); -} - -/* - * Probe filesystem information, including the FSID on v2/v3 - */ -static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs_fattr *fattr) -{ - struct nfs_fsinfo fsinfo; - struct nfs_client *clp = server->nfs_client; - int error; - - dprintk("--> nfs_probe_fsinfo()\n"); - - if (clp->rpc_ops->set_capabilities != NULL) { - error = clp->rpc_ops->set_capabilities(server, mntfh); - if (error < 0) - goto out_error; - } - - fsinfo.fattr = fattr; - nfs_fattr_init(fattr); - error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo); - if (error < 0) - goto out_error; - - nfs_server_set_fsinfo(server, &fsinfo); - - /* Get some general file system info */ - if (server->namelen == 0) { - struct nfs_pathconf pathinfo; - - pathinfo.fattr = fattr; - nfs_fattr_init(fattr); - - if (clp->rpc_ops->pathconf(server, mntfh, &pathinfo) >= 0) - server->namelen = pathinfo.max_namelen; - } - - dprintk("<-- nfs_probe_fsinfo() = 0\n"); - return 0; - -out_error: - dprintk("nfs_probe_fsinfo: error = %d\n", -error); - return error; -} - -/* - * Copy useful information when duplicating a server record - */ -static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_server *source) -{ - target->flags = source->flags; - target->acregmin = source->acregmin; - target->acregmax = source->acregmax; - target->acdirmin = source->acdirmin; - target->acdirmax = source->acdirmax; - target->caps = source->caps; -} - -/* - * Allocate and initialise a server record - */ -static struct nfs_server *nfs_alloc_server(void) -{ - struct nfs_server *server; - - server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL); - if (!server) - return NULL; - - server->client = server->client_acl = ERR_PTR(-EINVAL); - - /* Zero out the NFS state stuff */ - INIT_LIST_HEAD(&server->client_link); - INIT_LIST_HEAD(&server->master_link); - - server->io_stats = nfs_alloc_iostats(); - if (!server->io_stats) { - kfree(server); - return NULL; - } - - return server; -} - -/* - * Free up a server record - */ -void nfs_free_server(struct nfs_server *server) -{ - dprintk("--> nfs_free_server()\n"); - - spin_lock(&nfs_client_lock); - list_del(&server->client_link); - list_del(&server->master_link); - spin_unlock(&nfs_client_lock); - - if (server->destroy != NULL) - server->destroy(server); - if (!IS_ERR(server->client)) - rpc_shutdown_client(server->client); - - nfs_put_client(server->nfs_client); - - nfs_free_iostats(server->io_stats); - kfree(server); - nfs_release_automount_timer(); - dprintk("<-- nfs_free_server()\n"); -} - -/* - * Create a version 2 or 3 volume record - * - keyed on server and FSID - */ -struct nfs_server *nfs_create_server(const struct nfs_mount_data *data, - struct nfs_fh *mntfh) -{ - struct nfs_server *server; - struct nfs_fattr fattr; - int error; - - server = nfs_alloc_server(); - if (!server) - return ERR_PTR(-ENOMEM); - - /* Get a client representation */ - error = nfs_init_server(server, data); - if (error < 0) - goto error; - - BUG_ON(!server->nfs_client); - BUG_ON(!server->nfs_client->rpc_ops); - BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); - - /* Probe the root fh to retrieve its FSID */ - error = nfs_probe_fsinfo(server, mntfh, &fattr); - if (error < 0) - goto error; - if (!(fattr.valid & NFS_ATTR_FATTR)) { - error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr); - if (error < 0) { - dprintk("nfs_create_server: getattr error = %d\n", -error); - goto error; - } - } - memcpy(&server->fsid, &fattr.fsid, sizeof(server->fsid)); - - dprintk("Server FSID: %llx:%llx\n", server->fsid.major, server->fsid.minor); - - BUG_ON(!server->nfs_client); - BUG_ON(!server->nfs_client->rpc_ops); - BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); - - spin_lock(&nfs_client_lock); - list_add_tail(&server->client_link, &server->nfs_client->cl_superblocks); - list_add_tail(&server->master_link, &nfs_volume_list); - spin_unlock(&nfs_client_lock); - - server->mount_time = jiffies; - return server; - -error: - nfs_free_server(server); - return ERR_PTR(error); -} - -#ifdef CONFIG_NFS_V4 -/* - * Initialise an NFS4 client record - */ -static int nfs4_init_client(struct nfs_client *clp, - int proto, int timeo, int retrans, - rpc_authflavor_t authflavour) -{ - int error; - - if (clp->cl_cons_state == NFS_CS_READY) { - /* the client is initialised already */ - dprintk("<-- nfs4_init_client() = 0 [already %p]\n", clp); - return 0; - } - - /* Check NFS protocol revision and initialize RPC op vector */ - clp->rpc_ops = &nfs_v4_clientops; - - error = nfs_create_rpc_client(clp, proto, timeo, retrans, authflavour); - if (error < 0) - goto error; - - error = nfs_idmap_new(clp); - if (error < 0) { - dprintk("%s: failed to create idmapper. Error = %d\n", - __FUNCTION__, error); - goto error; - } - __set_bit(NFS_CS_IDMAP, &clp->cl_res_state); - - nfs_mark_client_ready(clp, NFS_CS_READY); - return 0; - -error: - nfs_mark_client_ready(clp, error); - dprintk("<-- nfs4_init_client() = xerror %d\n", error); - return error; -} - -/* - * Set up an NFS4 client - */ -static int nfs4_set_client(struct nfs_server *server, - const char *hostname, const struct sockaddr_in *addr, - rpc_authflavor_t authflavour, - int proto, int timeo, int retrans) -{ - struct nfs_client *clp; - int error; - - dprintk("--> nfs4_set_client()\n"); - - /* Allocate or find a client reference we can use */ - clp = nfs_get_client(hostname, addr, 4); - if (IS_ERR(clp)) { - error = PTR_ERR(clp); - goto error; - } - error = nfs4_init_client(clp, proto, timeo, retrans, authflavour); - if (error < 0) - goto error_put; - - server->nfs_client = clp; - dprintk("<-- nfs4_set_client() = 0 [new %p]\n", clp); - return 0; - -error_put: - nfs_put_client(clp); -error: - dprintk("<-- nfs4_set_client() = xerror %d\n", error); - return error; -} - -/* - * Create a version 4 volume record - */ -static int nfs4_init_server(struct nfs_server *server, - const struct nfs4_mount_data *data, rpc_authflavor_t authflavour) -{ - int error; - - dprintk("--> nfs4_init_server()\n"); - - /* Initialise the client representation from the mount data */ - server->flags = data->flags & NFS_MOUNT_FLAGMASK; - server->caps |= NFS_CAP_ATOMIC_OPEN; - - if (data->rsize) - server->rsize = nfs_block_size(data->rsize, NULL); - if (data->wsize) - server->wsize = nfs_block_size(data->wsize, NULL); - - server->acregmin = data->acregmin * HZ; - server->acregmax = data->acregmax * HZ; - server->acdirmin = data->acdirmin * HZ; - server->acdirmax = data->acdirmax * HZ; - - error = nfs_init_server_rpcclient(server, authflavour); - - /* Done */ - dprintk("<-- nfs4_init_server() = %d\n", error); - return error; -} - -/* - * Create a version 4 volume record - * - keyed on server and FSID - */ -struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data, - const char *hostname, - const struct sockaddr_in *addr, - const char *mntpath, - const char *ip_addr, - rpc_authflavor_t authflavour, - struct nfs_fh *mntfh) -{ - struct nfs_fattr fattr; - struct nfs_server *server; - int error; - - dprintk("--> nfs4_create_server()\n"); - - server = nfs_alloc_server(); - if (!server) - return ERR_PTR(-ENOMEM); - - /* Get a client record */ - error = nfs4_set_client(server, hostname, addr, authflavour, - data->proto, data->timeo, data->retrans); - if (error < 0) - goto error; - - /* set up the general RPC client */ - error = nfs4_init_server(server, data, authflavour); - if (error < 0) - goto error; - - BUG_ON(!server->nfs_client); - BUG_ON(!server->nfs_client->rpc_ops); - BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); - - /* Probe the root fh to retrieve its FSID */ - error = nfs4_path_walk(server, mntfh, mntpath); - if (error < 0) - goto error; - - dprintk("Server FSID: %llx:%llx\n", server->fsid.major, server->fsid.minor); - dprintk("Mount FH: %d\n", mntfh->size); - - error = nfs_probe_fsinfo(server, mntfh, &fattr); - if (error < 0) - goto error; - - BUG_ON(!server->nfs_client); - BUG_ON(!server->nfs_client->rpc_ops); - BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); - - spin_lock(&nfs_client_lock); - list_add_tail(&server->client_link, &server->nfs_client->cl_superblocks); - list_add_tail(&server->master_link, &nfs_volume_list); - spin_unlock(&nfs_client_lock); - - server->mount_time = jiffies; - dprintk("<-- nfs4_create_server() = %p\n", server); - return server; - -error: - nfs_free_server(server); - dprintk("<-- nfs4_create_server() = error %d\n", error); - return ERR_PTR(error); -} - -/* - * Create an NFS4 referral server record - */ -struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, - struct nfs_fh *fh) -{ - struct nfs_client *parent_client; - struct nfs_server *server, *parent_server; - struct nfs_fattr fattr; - int error; - - dprintk("--> nfs4_create_referral_server()\n"); - - server = nfs_alloc_server(); - if (!server) - return ERR_PTR(-ENOMEM); - - parent_server = NFS_SB(data->sb); - parent_client = parent_server->nfs_client; - - /* Get a client representation. - * Note: NFSv4 always uses TCP, */ - error = nfs4_set_client(server, data->hostname, data->addr, - data->authflavor, - parent_server->client->cl_xprt->prot, - parent_client->retrans_timeo, - parent_client->retrans_count); - - /* Initialise the client representation from the parent server */ - nfs_server_copy_userdata(server, parent_server); - server->caps |= NFS_CAP_ATOMIC_OPEN; - - error = nfs_init_server_rpcclient(server, data->authflavor); - if (error < 0) - goto error; - - BUG_ON(!server->nfs_client); - BUG_ON(!server->nfs_client->rpc_ops); - BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops); - - /* probe the filesystem info for this server filesystem */ - error = nfs_probe_fsinfo(server, fh, &fattr); - if (error < 0) - goto error; - - dprintk("Referral FSID: %llx:%llx\n", - server->fsid.major, server->fsid.minor); - - spin_lock(&nfs_client_lock); - list_add_tail(&server->client_link, &server->nfs_client->cl_superblocks); - list_add_tail(&server->master_link, &nfs_volume_list); - spin_unlock(&nfs_client_lock); - - server->mount_time = jiffies; - - dprintk("<-- nfs_create_referral_server() = %p\n", server); - return server; - -error: - nfs_free_server(server); - dprintk("<-- nfs4_create_referral_server() = error %d\n", error); - return ERR_PTR(error); -} - -#endif /* CONFIG_NFS_V4 */ - -/* - * Clone an NFS2, NFS3 or NFS4 server record - */ -struct nfs_server *nfs_clone_server(struct nfs_server *source, - struct nfs_fh *fh, - struct nfs_fattr *fattr) -{ - struct nfs_server *server; - struct nfs_fattr fattr_fsinfo; - int error; - - dprintk("--> nfs_clone_server(,%llx:%llx,)\n", - fattr->fsid.major, fattr->fsid.minor); - - server = nfs_alloc_server(); - if (!server) - return ERR_PTR(-ENOMEM); - - /* Copy data from the source */ - server->nfs_client = source->nfs_client; - atomic_inc(&server->nfs_client->cl_count); - nfs_server_copy_userdata(server, source); - - server->fsid = fattr->fsid; - - error = nfs_init_server_rpcclient(server, source->client->cl_auth->au_flavor); - if (error < 0) - goto out_free_server; - if (!IS_ERR(source->client_acl)) - nfs_init_server_aclclient(server); - - /* probe the filesystem info for this server filesystem */ - error = nfs_probe_fsinfo(server, fh, &fattr_fsinfo); - if (error < 0) - goto out_free_server; - - dprintk("Cloned FSID: %llx:%llx\n", - server->fsid.major, server->fsid.minor); - - error = nfs_start_lockd(server); - if (error < 0) - goto out_free_server; - - spin_lock(&nfs_client_lock); - list_add_tail(&server->client_link, &server->nfs_client->cl_superblocks); - list_add_tail(&server->master_link, &nfs_volume_list); - spin_unlock(&nfs_client_lock); - - server->mount_time = jiffies; - - dprintk("<-- nfs_clone_server() = %p\n", server); - return server; - -out_free_server: - nfs_free_server(server); - dprintk("<-- nfs_clone_server() = error %d\n", error); - return ERR_PTR(error); -} - -#ifdef CONFIG_PROC_FS -static struct proc_dir_entry *proc_fs_nfs; - -static int nfs_server_list_open(struct inode *inode, struct file *file); -static void *nfs_server_list_start(struct seq_file *p, loff_t *pos); -static void *nfs_server_list_next(struct seq_file *p, void *v, loff_t *pos); -static void nfs_server_list_stop(struct seq_file *p, void *v); -static int nfs_server_list_show(struct seq_file *m, void *v); - -static struct seq_operations nfs_server_list_ops = { - .start = nfs_server_list_start, - .next = nfs_server_list_next, - .stop = nfs_server_list_stop, - .show = nfs_server_list_show, -}; - -static struct file_operations nfs_server_list_fops = { - .open = nfs_server_list_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - -static int nfs_volume_list_open(struct inode *inode, struct file *file); -static void *nfs_volume_list_start(struct seq_file *p, loff_t *pos); -static void *nfs_volume_list_next(struct seq_file *p, void *v, loff_t *pos); -static void nfs_volume_list_stop(struct seq_file *p, void *v); -static int nfs_volume_list_show(struct seq_file *m, void *v); - -static struct seq_operations nfs_volume_list_ops = { - .start = nfs_volume_list_start, - .next = nfs_volume_list_next, - .stop = nfs_volume_list_stop, - .show = nfs_volume_list_show, -}; - -static struct file_operations nfs_volume_list_fops = { - .open = nfs_volume_list_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - -/* - * open "/proc/fs/nfsfs/servers" which provides a summary of servers with which - * we're dealing - */ -static int nfs_server_list_open(struct inode *inode, struct file *file) -{ - struct seq_file *m; - int ret; - - ret = seq_open(file, &nfs_server_list_ops); - if (ret < 0) - return ret; - - m = file->private_data; - m->private = PDE(inode)->data; - - return 0; -} - -/* - * set up the iterator to start reading from the server list and return the first item - */ -static void *nfs_server_list_start(struct seq_file *m, loff_t *_pos) -{ - struct list_head *_p; - loff_t pos = *_pos; - - /* lock the list against modification */ - spin_lock(&nfs_client_lock); - - /* allow for the header line */ - if (!pos) - return SEQ_START_TOKEN; - pos--; - - /* find the n'th element in the list */ - list_for_each(_p, &nfs_client_list) - if (!pos--) - break; - - return _p != &nfs_client_list ? _p : NULL; -} - -/* - * move to next server - */ -static void *nfs_server_list_next(struct seq_file *p, void *v, loff_t *pos) -{ - struct list_head *_p; - - (*pos)++; - - _p = v; - _p = (v == SEQ_START_TOKEN) ? nfs_client_list.next : _p->next; - - return _p != &nfs_client_list ? _p : NULL; -} - -/* - * clean up after reading from the transports list - */ -static void nfs_server_list_stop(struct seq_file *p, void *v) -{ - spin_unlock(&nfs_client_lock); -} - -/* - * display a header line followed by a load of call lines - */ -static int nfs_server_list_show(struct seq_file *m, void *v) -{ - struct nfs_client *clp; - - /* display header on line 1 */ - if (v == SEQ_START_TOKEN) { - seq_puts(m, "NV SERVER PORT USE HOSTNAME\n"); - return 0; - } - - /* display one transport per line on subsequent lines */ - clp = list_entry(v, struct nfs_client, cl_share_link); - - seq_printf(m, "v%d %02x%02x%02x%02x %4hx %3d %s\n", - clp->cl_nfsversion, - NIPQUAD(clp->cl_addr.sin_addr), - ntohs(clp->cl_addr.sin_port), - atomic_read(&clp->cl_count), - clp->cl_hostname); - - return 0; -} - -/* - * open "/proc/fs/nfsfs/volumes" which provides a summary of extant volumes - */ -static int nfs_volume_list_open(struct inode *inode, struct file *file) -{ - struct seq_file *m; - int ret; - - ret = seq_open(file, &nfs_volume_list_ops); - if (ret < 0) - return ret; - - m = file->private_data; - m->private = PDE(inode)->data; - - return 0; -} - -/* - * set up the iterator to start reading from the volume list and return the first item - */ -static void *nfs_volume_list_start(struct seq_file *m, loff_t *_pos) -{ - struct list_head *_p; - loff_t pos = *_pos; - - /* lock the list against modification */ - spin_lock(&nfs_client_lock); - - /* allow for the header line */ - if (!pos) - return SEQ_START_TOKEN; - pos--; - - /* find the n'th element in the list */ - list_for_each(_p, &nfs_volume_list) - if (!pos--) - break; - - return _p != &nfs_volume_list ? _p : NULL; -} - -/* - * move to next volume - */ -static void *nfs_volume_list_next(struct seq_file *p, void *v, loff_t *pos) -{ - struct list_head *_p; - - (*pos)++; - - _p = v; - _p = (v == SEQ_START_TOKEN) ? nfs_volume_list.next : _p->next; - - return _p != &nfs_volume_list ? _p : NULL; -} - -/* - * clean up after reading from the transports list - */ -static void nfs_volume_list_stop(struct seq_file *p, void *v) -{ - spin_unlock(&nfs_client_lock); -} - -/* - * display a header line followed by a load of call lines - */ -static int nfs_volume_list_show(struct seq_file *m, void *v) -{ - struct nfs_server *server; - struct nfs_client *clp; - char dev[8], fsid[17]; - - /* display header on line 1 */ - if (v == SEQ_START_TOKEN) { - seq_puts(m, "NV SERVER PORT DEV FSID FSC\n"); - return 0; - } - /* display one transport per line on subsequent lines */ - server = list_entry(v, struct nfs_server, master_link); - clp = server->nfs_client; - - snprintf(dev, 8, "%u:%u", - MAJOR(server->s_dev), MINOR(server->s_dev)); - - snprintf(fsid, 17, "%llx:%llx", - server->fsid.major, server->fsid.minor); - - seq_printf(m, "v%d %02x%02x%02x%02x %4hx %-7s %-17s %s\n", - clp->cl_nfsversion, - NIPQUAD(clp->cl_addr.sin_addr), - ntohs(clp->cl_addr.sin_port), - dev, - fsid, - nfs_server_fscache_state(server)); - - return 0; -} - -/* - * initialise the /proc/fs/nfsfs/ directory - */ -int __init nfs_fs_proc_init(void) -{ - struct proc_dir_entry *p; - - proc_fs_nfs = proc_mkdir("nfsfs", proc_root_fs); - if (!proc_fs_nfs) - goto error_0; - - proc_fs_nfs->owner = THIS_MODULE; - - /* a file of servers with which we're dealing */ - p = create_proc_entry("servers", S_IFREG|S_IRUGO, proc_fs_nfs); - if (!p) - goto error_1; - - p->proc_fops = &nfs_server_list_fops; - p->owner = THIS_MODULE; - - /* a file of volumes that we have mounted */ - p = create_proc_entry("volumes", S_IFREG|S_IRUGO, proc_fs_nfs); - if (!p) - goto error_2; - - p->proc_fops = &nfs_volume_list_fops; - p->owner = THIS_MODULE; - return 0; - -error_2: - remove_proc_entry("servers", proc_fs_nfs); -error_1: - remove_proc_entry("nfsfs", proc_root_fs); -error_0: - return -ENOMEM; -} - -/* - * clean up the /proc/fs/nfsfs/ directory - */ -void nfs_fs_proc_exit(void) -{ - remove_proc_entry("volumes", proc_fs_nfs); - remove_proc_entry("servers", proc_fs_nfs); - remove_proc_entry("nfsfs", proc_root_fs); -} - -#endif /* CONFIG_PROC_FS */ diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 57133678d..d3be923d4 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -6,6 +6,7 @@ * NFS file delegation management * */ +#include #include #include #include @@ -18,7 +19,6 @@ #include "nfs4_fs.h" #include "delegation.h" -#include "internal.h" static struct nfs_delegation *nfs_alloc_delegation(void) { @@ -53,7 +53,7 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_ case -NFS4ERR_EXPIRED: /* kill_proc(fl->fl_pid, SIGLOST, 1); */ case -NFS4ERR_STALE_CLIENTID: - nfs4_schedule_state_recovery(NFS_SERVER(inode)->nfs_client); + nfs4_schedule_state_recovery(NFS_SERVER(inode)->nfs4_state); goto out_err; } } @@ -115,7 +115,7 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st */ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) { - struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; + struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; struct nfs_inode *nfsi = NFS_I(inode); struct nfs_delegation *delegation; int status = 0; @@ -146,7 +146,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct sizeof(delegation->stateid)) != 0 || delegation->type != nfsi->delegation->type) { printk("%s: server %u.%u.%u.%u, handed out a duplicate delegation!\n", - __FUNCTION__, NIPQUAD(clp->cl_addr.sin_addr)); + __FUNCTION__, NIPQUAD(clp->cl_addr)); status = -EIO; } } @@ -177,7 +177,7 @@ static void nfs_msync_inode(struct inode *inode) */ int __nfs_inode_return_delegation(struct inode *inode) { - struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; + struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; struct nfs_inode *nfsi = NFS_I(inode); struct nfs_delegation *delegation; int res = 0; @@ -209,7 +209,7 @@ int __nfs_inode_return_delegation(struct inode *inode) */ void nfs_return_all_delegations(struct super_block *sb) { - struct nfs_client *clp = NFS_SB(sb)->nfs_client; + struct nfs4_client *clp = NFS_SB(sb)->nfs4_state; struct nfs_delegation *delegation; struct inode *inode; @@ -233,7 +233,7 @@ restart: int nfs_do_expire_all_delegations(void *ptr) { - struct nfs_client *clp = ptr; + struct nfs4_client *clp = ptr; struct nfs_delegation *delegation; struct inode *inode; @@ -255,11 +255,11 @@ restart: } out: spin_unlock(&clp->cl_lock); - nfs_put_client(clp); + nfs4_put_client(clp); module_put_and_exit(0); } -void nfs_expire_all_delegations(struct nfs_client *clp) +void nfs_expire_all_delegations(struct nfs4_client *clp) { struct task_struct *task; @@ -267,17 +267,17 @@ void nfs_expire_all_delegations(struct nfs_client *clp) atomic_inc(&clp->cl_count); task = kthread_run(nfs_do_expire_all_delegations, clp, "%u.%u.%u.%u-delegreturn", - NIPQUAD(clp->cl_addr.sin_addr)); + NIPQUAD(clp->cl_addr)); if (!IS_ERR(task)) return; - nfs_put_client(clp); + nfs4_put_client(clp); module_put(THIS_MODULE); } /* * Return all delegations following an NFS4ERR_CB_PATH_DOWN error. */ -void nfs_handle_cb_pathdown(struct nfs_client *clp) +void nfs_handle_cb_pathdown(struct nfs4_client *clp) { struct nfs_delegation *delegation; struct inode *inode; @@ -300,7 +300,7 @@ restart: struct recall_threadargs { struct inode *inode; - struct nfs_client *clp; + struct nfs4_client *clp; const nfs4_stateid *stateid; struct completion started; @@ -311,7 +311,7 @@ static int recall_thread(void *data) { struct recall_threadargs *args = (struct recall_threadargs *)data; struct inode *inode = igrab(args->inode); - struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; + struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; struct nfs_inode *nfsi = NFS_I(inode); struct nfs_delegation *delegation; @@ -372,7 +372,7 @@ out_module_put: /* * Retrieve the inode associated with a delegation */ -struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle) +struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle) { struct nfs_delegation *delegation; struct inode *res = NULL; @@ -390,7 +390,7 @@ struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs /* * Mark all delegations as needing to be reclaimed */ -void nfs_delegation_mark_reclaim(struct nfs_client *clp) +void nfs_delegation_mark_reclaim(struct nfs4_client *clp) { struct nfs_delegation *delegation; spin_lock(&clp->cl_lock); @@ -402,7 +402,7 @@ void nfs_delegation_mark_reclaim(struct nfs_client *clp) /* * Reap all unclaimed delegations after reboot recovery is done */ -void nfs_delegation_reap_unclaimed(struct nfs_client *clp) +void nfs_delegation_reap_unclaimed(struct nfs4_client *clp) { struct nfs_delegation *delegation, *n; LIST_HEAD(head); @@ -424,7 +424,7 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp) int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode) { - struct nfs_client *clp = NFS_SERVER(inode)->nfs_client; + struct nfs4_client *clp = NFS_SERVER(inode)->nfs4_state; struct nfs_inode *nfsi = NFS_I(inode); struct nfs_delegation *delegation; int res = 0; diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h index 2cfd4b24c..385869465 100644 --- a/fs/nfs/delegation.h +++ b/fs/nfs/delegation.h @@ -29,13 +29,13 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st int __nfs_inode_return_delegation(struct inode *inode); int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); -struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); +struct inode *nfs_delegation_find_inode(struct nfs4_client *clp, const struct nfs_fh *fhandle); void nfs_return_all_delegations(struct super_block *sb); -void nfs_expire_all_delegations(struct nfs_client *clp); -void nfs_handle_cb_pathdown(struct nfs_client *clp); +void nfs_expire_all_delegations(struct nfs4_client *clp); +void nfs_handle_cb_pathdown(struct nfs4_client *clp); -void nfs_delegation_mark_reclaim(struct nfs_client *clp); -void nfs_delegation_reap_unclaimed(struct nfs_client *clp); +void nfs_delegation_mark_reclaim(struct nfs4_client *clp); +void nfs_delegation_reap_unclaimed(struct nfs4_client *clp); /* NFSv4 delegation-related procedures */ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid); diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d424d082d..ff57cb4ce 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -28,10 +28,10 @@ #include #include #include +#include #include #include #include -#include #include #include "nfs4_fs.h" @@ -398,7 +398,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, struct file *file = desc->file; struct nfs_entry *entry = desc->entry; struct dentry *dentry = NULL; - u64 fileid; + unsigned long fileid; int loop_count = 0, res; @@ -409,7 +409,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, unsigned d_type = DT_UNKNOWN; /* Note: entry->prev_cookie contains the cookie for * retrieving the current dirent on the server */ - fileid = entry->ino; + fileid = nfs_fileid_to_ino_t(entry->ino); /* Get a dentry if we have one */ if (dentry != NULL) @@ -419,7 +419,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, /* Use readdirplus info */ if (dentry != NULL && dentry->d_inode != NULL) { d_type = dt_type(dentry->d_inode); - fileid = NFS_FILEID(dentry->d_inode); + fileid = dentry->d_inode->i_ino; } res = filldir(dirent, entry->name, entry->len, @@ -530,7 +530,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) lock_kernel(); - res = nfs_revalidate_mapping(inode, filp->f_mapping); + res = nfs_revalidate_inode(NFS_SERVER(inode), inode); if (res < 0) { unlock_kernel(); return res; @@ -692,9 +692,7 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd) goto out_force; /* This is an open(2) */ if (nfs_lookup_check_intent(nd, LOOKUP_OPEN) != 0 && - !(server->flags & NFS_MOUNT_NOCTO) && - (S_ISREG(inode->i_mode) || - S_ISDIR(inode->i_mode))) + !(server->flags & NFS_MOUNT_NOCTO)) goto out_force; } return nfs_revalidate_inode(server, inode); @@ -872,17 +870,6 @@ int nfs_is_exclusive_create(struct inode *dir, struct nameidata *nd) return (nd->intent.open.flags & O_EXCL) != 0; } -static inline int nfs_reval_fsid(struct vfsmount *mnt, struct inode *dir, - struct nfs_fh *fh, struct nfs_fattr *fattr) -{ - struct nfs_server *server = NFS_SERVER(dir); - - if (!nfs_fsid_equal(&server->fsid, &fattr->fsid)) - /* Revalidate fsid on root dir */ - return __nfs_revalidate_inode(server, mnt->mnt_root->d_inode); - return 0; -} - static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) { struct dentry *res; @@ -904,15 +891,9 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru lock_kernel(); - /* - * If we're doing an exclusive create, optimize away the lookup - * but don't hash the dentry. - */ - if (nfs_is_exclusive_create(dir, nd)) { - d_instantiate(dentry, NULL); - res = NULL; - goto out_unlock; - } + /* If we're doing an exclusive create, optimize away the lookup */ + if (nfs_is_exclusive_create(dir, nd)) + goto no_entry; error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr); if (error == -ENOENT) @@ -921,19 +902,13 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru res = ERR_PTR(error); goto out_unlock; } - error = nfs_reval_fsid(nd->mnt, dir, &fhandle, &fattr); - if (error < 0) { - res = ERR_PTR(error); - goto out_unlock; - } inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr); res = (struct dentry *)inode; if (IS_ERR(res)) goto out_unlock; vx_propagate_xid(nd, inode); - no_entry: - res = d_materialise_unique(dentry, inode); + res = d_add_unique(dentry, inode); if (res != NULL) dentry = res; nfs_renew_times(dentry); @@ -1128,13 +1103,11 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) dput(dentry); return NULL; } - - alias = d_materialise_unique(dentry, inode); + alias = d_add_unique(dentry, inode); if (alias != NULL) { dput(dentry); dentry = alias; } - nfs_renew_times(dentry); nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); return dentry; @@ -1160,7 +1133,7 @@ int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle, } if (!(fattr->valid & NFS_ATTR_FATTR)) { struct nfs_server *server = NFS_SB(dentry->d_sb); - error = server->nfs_client->rpc_ops->getattr(server, fhandle, fattr); + error = server->rpc_ops->getattr(server, fhandle, fattr); if (error < 0) goto out_err; } @@ -1169,8 +1142,6 @@ int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle, if (IS_ERR(inode)) goto out_err; d_instantiate(dentry, inode); - if (d_unhashed(dentry)) - d_rehash(dentry); return 0; out_err: d_drop(dentry); diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 125d71fc2..3c72b0c07 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -38,6 +38,7 @@ * */ +#include #include #include #include @@ -67,19 +68,25 @@ struct nfs_direct_req { struct kref kref; /* release manager */ /* I/O parameters */ + struct list_head list, /* nfs_read/write_data structs */ + rewrite_list; /* saved nfs_write_data structs */ struct nfs_open_context *ctx; /* file open context info */ struct kiocb * iocb; /* controlling i/o request */ struct inode * inode; /* target file of i/o */ + unsigned long user_addr; /* location of user's buffer */ + size_t user_count; /* total bytes to move */ + loff_t pos; /* starting offset in file */ + struct page ** pages; /* pages in our buffer */ + unsigned int npages; /* count of pages */ /* completion state */ - atomic_t io_count; /* i/os we're waiting for */ spinlock_t lock; /* protect completion state */ + int outstanding; /* i/os we're waiting for */ ssize_t count, /* bytes actually processed */ error; /* any reported error */ struct completion completion; /* wait for i/o completion */ /* commit state */ - struct list_head rewrite_list; /* saved nfs_write_data structs */ struct nfs_write_data * commit_data; /* special write_data for commits */ int flags; #define NFS_ODIRECT_DO_COMMIT (1) /* an unstable reply was received */ @@ -87,18 +94,8 @@ struct nfs_direct_req { struct nfs_writeverf verf; /* unstable write verifier */ }; +static void nfs_direct_write_schedule(struct nfs_direct_req *dreq, int sync); static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode *inode); -static const struct rpc_call_ops nfs_write_direct_ops; - -static inline void get_dreq(struct nfs_direct_req *dreq) -{ - atomic_inc(&dreq->io_count); -} - -static inline int put_dreq(struct nfs_direct_req *dreq) -{ - return atomic_dec_and_test(&dreq->io_count); -} /** * nfs_direct_IO - NFS address space operation for direct I/O @@ -122,21 +119,50 @@ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_ return -EINVAL; } -static void nfs_direct_dirty_pages(struct page **pages, int npages) +static void nfs_free_user_pages(struct page **pages, int npages, int do_dirty) { int i; for (i = 0; i < npages; i++) { struct page *page = pages[i]; - if (!PageCompound(page)) + if (do_dirty && !PageCompound(page)) set_page_dirty_lock(page); + page_cache_release(page); } + kfree(pages); } -static void nfs_direct_release_pages(struct page **pages, int npages) +static inline int nfs_get_user_pages(int rw, unsigned long user_addr, size_t size, struct page ***pages) { - int i; - for (i = 0; i < npages; i++) - page_cache_release(pages[i]); + int result = -ENOMEM; + unsigned long page_count; + size_t array_size; + + page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT; + page_count -= user_addr >> PAGE_SHIFT; + + array_size = (page_count * sizeof(struct page *)); + *pages = kmalloc(array_size, GFP_KERNEL); + if (*pages) { + down_read(¤t->mm->mmap_sem); + result = get_user_pages(current, current->mm, user_addr, + page_count, (rw == READ), 0, + *pages, NULL); + up_read(¤t->mm->mmap_sem); + if (result != page_count) { + /* + * If we got fewer pages than expected from + * get_user_pages(), the user buffer runs off the + * end of a mapping; return EFAULT. + */ + if (result >= 0) { + nfs_free_user_pages(*pages, result, 0); + result = -EFAULT; + } else + kfree(*pages); + *pages = NULL; + } + } + return result; } static inline struct nfs_direct_req *nfs_direct_req_alloc(void) @@ -148,13 +174,13 @@ static inline struct nfs_direct_req *nfs_direct_req_alloc(void) return NULL; kref_init(&dreq->kref); - kref_get(&dreq->kref); init_completion(&dreq->completion); + INIT_LIST_HEAD(&dreq->list); INIT_LIST_HEAD(&dreq->rewrite_list); dreq->iocb = NULL; dreq->ctx = NULL; spin_lock_init(&dreq->lock); - atomic_set(&dreq->io_count, 0); + dreq->outstanding = 0; dreq->count = 0; dreq->error = 0; dreq->flags = 0; @@ -195,11 +221,18 @@ out: } /* - * Synchronous I/O uses a stack-allocated iocb. Thus we can't trust - * the iocb is still valid here if this is a synchronous request. + * We must hold a reference to all the pages in this direct read request + * until the RPCs complete. This could be long *after* we are woken up in + * nfs_direct_wait (for instance, if someone hits ^C on a slow server). + * + * In addition, synchronous I/O uses a stack-allocated iocb. Thus we + * can't trust the iocb is still valid here if this is a synchronous + * request. If the waiter is woken prematurely, the iocb is long gone. */ static void nfs_direct_complete(struct nfs_direct_req *dreq) { + nfs_free_user_pages(dreq->pages, dreq->npages, 1); + if (dreq->iocb) { long res = (long) dreq->error; if (!res) @@ -212,10 +245,48 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq) } /* - * We must hold a reference to all the pages in this direct read request - * until the RPCs complete. This could be long *after* we are woken up in - * nfs_direct_wait (for instance, if someone hits ^C on a slow server). + * Note we also set the number of requests we have in the dreq when we are + * done. This prevents races with I/O completion so we will always wait + * until all requests have been dispatched and completed. */ +static struct nfs_direct_req *nfs_direct_read_alloc(size_t nbytes, size_t rsize) +{ + struct list_head *list; + struct nfs_direct_req *dreq; + unsigned int rpages = (rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; + + dreq = nfs_direct_req_alloc(); + if (!dreq) + return NULL; + + list = &dreq->list; + for(;;) { + struct nfs_read_data *data = nfs_readdata_alloc(rpages); + + if (unlikely(!data)) { + while (!list_empty(list)) { + data = list_entry(list->next, + struct nfs_read_data, pages); + list_del(&data->pages); + nfs_readdata_free(data); + } + kref_put(&dreq->kref, nfs_direct_req_release); + return NULL; + } + + INIT_LIST_HEAD(&data->pages); + list_add(&data->pages, list); + + data->req = (struct nfs_page *) dreq; + dreq->outstanding++; + if (nbytes <= rsize) + break; + nbytes -= rsize; + } + kref_get(&dreq->kref); + return dreq; +} + static void nfs_direct_read_result(struct rpc_task *task, void *calldata) { struct nfs_read_data *data = calldata; @@ -224,9 +295,6 @@ static void nfs_direct_read_result(struct rpc_task *task, void *calldata) if (nfs_readpage_result(task, data) != 0) return; - nfs_direct_dirty_pages(data->pagevec, data->npages); - nfs_direct_release_pages(data->pagevec, data->npages); - spin_lock(&dreq->lock); if (likely(task->tk_status >= 0)) @@ -234,10 +302,13 @@ static void nfs_direct_read_result(struct rpc_task *task, void *calldata) else dreq->error = task->tk_status; - spin_unlock(&dreq->lock); + if (--dreq->outstanding) { + spin_unlock(&dreq->lock); + return; + } - if (put_dreq(dreq)) - nfs_direct_complete(dreq); + spin_unlock(&dreq->lock); + nfs_direct_complete(dreq); } static const struct rpc_call_ops nfs_read_direct_ops = { @@ -246,56 +317,41 @@ static const struct rpc_call_ops nfs_read_direct_ops = { }; /* - * For each rsize'd chunk of the user's buffer, dispatch an NFS READ - * operation. If nfs_readdata_alloc() or get_user_pages() fails, - * bail and stop sending more reads. Read length accounting is - * handled automatically by nfs_direct_read_result(). Otherwise, if - * no requests have been sent, just return an error. + * For each nfs_read_data struct that was allocated on the list, dispatch + * an NFS READ operation */ -static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned long user_addr, size_t count, loff_t pos) +static void nfs_direct_read_schedule(struct nfs_direct_req *dreq) { struct nfs_open_context *ctx = dreq->ctx; struct inode *inode = ctx->dentry->d_inode; + struct list_head *list = &dreq->list; + struct page **pages = dreq->pages; + size_t count = dreq->user_count; + loff_t pos = dreq->pos; size_t rsize = NFS_SERVER(inode)->rsize; - unsigned int pgbase; - int result; - ssize_t started = 0; - - get_dreq(dreq); + unsigned int curpage, pgbase; + curpage = 0; + pgbase = dreq->user_addr & ~PAGE_MASK; do { struct nfs_read_data *data; size_t bytes; - pgbase = user_addr & ~PAGE_MASK; - bytes = min(rsize,count); + bytes = rsize; + if (count < rsize) + bytes = count; - result = -ENOMEM; - data = nfs_readdata_alloc(pgbase + bytes); - if (unlikely(!data)) - break; + BUG_ON(list_empty(list)); + data = list_entry(list->next, struct nfs_read_data, pages); + list_del_init(&data->pages); - down_read(¤t->mm->mmap_sem); - result = get_user_pages(current, current->mm, user_addr, - data->npages, 1, 0, data->pagevec, NULL); - up_read(¤t->mm->mmap_sem); - if (unlikely(result < data->npages)) { - if (result > 0) - nfs_direct_release_pages(data->pagevec, result); - nfs_readdata_release(data); - break; - } - - get_dreq(dreq); - - data->req = (struct nfs_page *) dreq; data->inode = inode; data->cred = ctx->cred; data->args.fh = NFS_FH(inode); data->args.context = ctx; data->args.offset = pos; data->args.pgbase = pgbase; - data->args.pages = data->pagevec; + data->args.pages = &pages[curpage]; data->args.count = bytes; data->res.fattr = &data->fattr; data->res.eof = 0; @@ -318,37 +374,33 @@ static ssize_t nfs_direct_read_schedule(struct nfs_direct_req *dreq, unsigned lo bytes, (unsigned long long)data->args.offset); - started += bytes; - user_addr += bytes; pos += bytes; - /* FIXME: Remove this unnecessary math from final patch */ pgbase += bytes; + curpage += pgbase >> PAGE_SHIFT; pgbase &= ~PAGE_MASK; - BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); count -= bytes; } while (count != 0); - - if (put_dreq(dreq)) - nfs_direct_complete(dreq); - - if (started) - return 0; - return result < 0 ? (ssize_t) result : -EFAULT; + BUG_ON(!list_empty(list)); } -static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos) +static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos, struct page **pages, unsigned int nr_pages) { - ssize_t result = 0; + ssize_t result; sigset_t oldset; struct inode *inode = iocb->ki_filp->f_mapping->host; struct rpc_clnt *clnt = NFS_CLIENT(inode); struct nfs_direct_req *dreq; - dreq = nfs_direct_req_alloc(); + dreq = nfs_direct_read_alloc(count, NFS_SERVER(inode)->rsize); if (!dreq) return -ENOMEM; + dreq->user_addr = user_addr; + dreq->user_count = count; + dreq->pos = pos; + dreq->pages = pages; + dreq->npages = nr_pages; dreq->inode = inode; dreq->ctx = get_nfs_open_context((struct nfs_open_context *)iocb->ki_filp->private_data); if (!is_sync_kiocb(iocb)) @@ -356,9 +408,8 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size nfs_add_stats(inode, NFSIOS_DIRECTREADBYTES, count); rpc_clnt_sigmask(clnt, &oldset); - result = nfs_direct_read_schedule(dreq, user_addr, count, pos); - if (!result) - result = nfs_direct_wait(dreq); + nfs_direct_read_schedule(dreq); + result = nfs_direct_wait(dreq); rpc_clnt_sigunmask(clnt, &oldset); return result; @@ -366,10 +417,10 @@ static ssize_t nfs_direct_read(struct kiocb *iocb, unsigned long user_addr, size static void nfs_direct_free_writedata(struct nfs_direct_req *dreq) { - while (!list_empty(&dreq->rewrite_list)) { - struct nfs_write_data *data = list_entry(dreq->rewrite_list.next, struct nfs_write_data, pages); + list_splice_init(&dreq->rewrite_list, &dreq->list); + while (!list_empty(&dreq->list)) { + struct nfs_write_data *data = list_entry(dreq->list.next, struct nfs_write_data, pages); list_del(&data->pages); - nfs_direct_release_pages(data->pagevec, data->npages); nfs_writedata_release(data); } } @@ -377,51 +428,14 @@ static void nfs_direct_free_writedata(struct nfs_direct_req *dreq) #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) { - struct inode *inode = dreq->inode; - struct list_head *p; - struct nfs_write_data *data; + struct list_head *pos; + list_splice_init(&dreq->rewrite_list, &dreq->list); + list_for_each(pos, &dreq->list) + dreq->outstanding++; dreq->count = 0; - get_dreq(dreq); - - list_for_each(p, &dreq->rewrite_list) { - data = list_entry(p, struct nfs_write_data, pages); - - get_dreq(dreq); - - /* - * Reset data->res. - */ - nfs_fattr_init(&data->fattr); - data->res.count = data->args.count; - memset(&data->verf, 0, sizeof(data->verf)); - - /* - * Reuse data->task; data->args should not have changed - * since the original request was sent. - */ - rpc_init_task(&data->task, NFS_CLIENT(inode), RPC_TASK_ASYNC, - &nfs_write_direct_ops, data); - NFS_PROTO(inode)->write_setup(data, FLUSH_STABLE); - data->task.tk_priority = RPC_PRIORITY_NORMAL; - data->task.tk_cookie = (unsigned long) inode; - - /* - * We're called via an RPC callback, so BKL is already held. - */ - rpc_execute(&data->task); - - dprintk("NFS: %5u rescheduled direct write call (req %s/%Ld, %u bytes @ offset %Lu)\n", - data->task.tk_pid, - inode->i_sb->s_id, - (long long)NFS_FILEID(inode), - data->args.count, - (unsigned long long)data->args.offset); - } - - if (put_dreq(dreq)) - nfs_direct_write_complete(dreq, inode); + nfs_direct_write_schedule(dreq, FLUSH_STABLE); } static void nfs_direct_commit_result(struct rpc_task *task, void *calldata) @@ -458,8 +472,8 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq) data->cred = dreq->ctx->cred; data->args.fh = NFS_FH(data->inode); - data->args.offset = 0; - data->args.count = 0; + data->args.offset = dreq->pos; + data->args.count = dreq->user_count; data->res.count = 0; data->res.fattr = &data->fattr; data->res.verf = &data->verf; @@ -503,7 +517,7 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode static void nfs_alloc_commit_data(struct nfs_direct_req *dreq) { - dreq->commit_data = nfs_commit_alloc(); + dreq->commit_data = nfs_commit_alloc(0); if (dreq->commit_data != NULL) dreq->commit_data->req = (struct nfs_page *) dreq; } @@ -521,6 +535,47 @@ static void nfs_direct_write_complete(struct nfs_direct_req *dreq, struct inode } #endif +static struct nfs_direct_req *nfs_direct_write_alloc(size_t nbytes, size_t wsize) +{ + struct list_head *list; + struct nfs_direct_req *dreq; + unsigned int wpages = (wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; + + dreq = nfs_direct_req_alloc(); + if (!dreq) + return NULL; + + list = &dreq->list; + for(;;) { + struct nfs_write_data *data = nfs_writedata_alloc(wpages); + + if (unlikely(!data)) { + while (!list_empty(list)) { + data = list_entry(list->next, + struct nfs_write_data, pages); + list_del(&data->pages); + nfs_writedata_free(data); + } + kref_put(&dreq->kref, nfs_direct_req_release); + return NULL; + } + + INIT_LIST_HEAD(&data->pages); + list_add(&data->pages, list); + + data->req = (struct nfs_page *) dreq; + dreq->outstanding++; + if (nbytes <= wsize) + break; + nbytes -= wsize; + } + + nfs_alloc_commit_data(dreq); + + kref_get(&dreq->kref); + return dreq; +} + static void nfs_direct_write_result(struct rpc_task *task, void *calldata) { struct nfs_write_data *data = calldata; @@ -532,12 +587,10 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata) spin_lock(&dreq->lock); - if (unlikely(status < 0)) { - dreq->error = status; - goto out_unlock; - } - - dreq->count += data->res.count; + if (likely(status >= 0)) + dreq->count += data->res.count; + else + dreq->error = task->tk_status; if (data->res.verf->committed != NFS_FILE_SYNC) { switch (dreq->flags) { @@ -552,7 +605,9 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata) } } } -out_unlock: + /* In case we have to resend */ + data->args.stable = NFS_FILE_SYNC; + spin_unlock(&dreq->lock); } @@ -565,8 +620,14 @@ static void nfs_direct_write_release(void *calldata) struct nfs_write_data *data = calldata; struct nfs_direct_req *dreq = (struct nfs_direct_req *) data->req; - if (put_dreq(dreq)) - nfs_direct_write_complete(dreq, data->inode); + spin_lock(&dreq->lock); + if (--dreq->outstanding) { + spin_unlock(&dreq->lock); + return; + } + spin_unlock(&dreq->lock); + + nfs_direct_write_complete(dreq, data->inode); } static const struct rpc_call_ops nfs_write_direct_ops = { @@ -575,58 +636,41 @@ static const struct rpc_call_ops nfs_write_direct_ops = { }; /* - * For each wsize'd chunk of the user's buffer, dispatch an NFS WRITE - * operation. If nfs_writedata_alloc() or get_user_pages() fails, - * bail and stop sending more writes. Write length accounting is - * handled automatically by nfs_direct_write_result(). Otherwise, if - * no requests have been sent, just return an error. + * For each nfs_write_data struct that was allocated on the list, dispatch + * an NFS WRITE operation */ -static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned long user_addr, size_t count, loff_t pos, int sync) +static void nfs_direct_write_schedule(struct nfs_direct_req *dreq, int sync) { struct nfs_open_context *ctx = dreq->ctx; struct inode *inode = ctx->dentry->d_inode; + struct list_head *list = &dreq->list; + struct page **pages = dreq->pages; + size_t count = dreq->user_count; + loff_t pos = dreq->pos; size_t wsize = NFS_SERVER(inode)->wsize; - unsigned int pgbase; - int result; - ssize_t started = 0; - - get_dreq(dreq); + unsigned int curpage, pgbase; + curpage = 0; + pgbase = dreq->user_addr & ~PAGE_MASK; do { struct nfs_write_data *data; size_t bytes; - pgbase = user_addr & ~PAGE_MASK; - bytes = min(wsize,count); - - result = -ENOMEM; - data = nfs_writedata_alloc(pgbase + bytes); - if (unlikely(!data)) - break; - - down_read(¤t->mm->mmap_sem); - result = get_user_pages(current, current->mm, user_addr, - data->npages, 0, 0, data->pagevec, NULL); - up_read(¤t->mm->mmap_sem); - if (unlikely(result < data->npages)) { - if (result > 0) - nfs_direct_release_pages(data->pagevec, result); - nfs_writedata_release(data); - break; - } - - get_dreq(dreq); + bytes = wsize; + if (count < wsize) + bytes = count; + BUG_ON(list_empty(list)); + data = list_entry(list->next, struct nfs_write_data, pages); list_move_tail(&data->pages, &dreq->rewrite_list); - data->req = (struct nfs_page *) dreq; data->inode = inode; data->cred = ctx->cred; data->args.fh = NFS_FH(inode); data->args.context = ctx; data->args.offset = pos; data->args.pgbase = pgbase; - data->args.pages = data->pagevec; + data->args.pages = &pages[curpage]; data->args.count = bytes; data->res.fattr = &data->fattr; data->res.count = bytes; @@ -650,29 +694,19 @@ static ssize_t nfs_direct_write_schedule(struct nfs_direct_req *dreq, unsigned l bytes, (unsigned long long)data->args.offset); - started += bytes; - user_addr += bytes; pos += bytes; - - /* FIXME: Remove this useless math from the final patch */ pgbase += bytes; + curpage += pgbase >> PAGE_SHIFT; pgbase &= ~PAGE_MASK; - BUG_ON(pgbase != (user_addr & ~PAGE_MASK)); count -= bytes; } while (count != 0); - - if (put_dreq(dreq)) - nfs_direct_write_complete(dreq, inode); - - if (started) - return 0; - return result < 0 ? (ssize_t) result : -EFAULT; + BUG_ON(!list_empty(list)); } -static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos) +static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, size_t count, loff_t pos, struct page **pages, int nr_pages) { - ssize_t result = 0; + ssize_t result; sigset_t oldset; struct inode *inode = iocb->ki_filp->f_mapping->host; struct rpc_clnt *clnt = NFS_CLIENT(inode); @@ -680,14 +714,17 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, siz size_t wsize = NFS_SERVER(inode)->wsize; int sync = 0; - dreq = nfs_direct_req_alloc(); + dreq = nfs_direct_write_alloc(count, wsize); if (!dreq) return -ENOMEM; - nfs_alloc_commit_data(dreq); - if (dreq->commit_data == NULL || count < wsize) sync = FLUSH_STABLE; + dreq->user_addr = user_addr; + dreq->user_count = count; + dreq->pos = pos; + dreq->pages = pages; + dreq->npages = nr_pages; dreq->inode = inode; dreq->ctx = get_nfs_open_context((struct nfs_open_context *)iocb->ki_filp->private_data); if (!is_sync_kiocb(iocb)) @@ -698,9 +735,8 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, siz nfs_begin_data_update(inode); rpc_clnt_sigmask(clnt, &oldset); - result = nfs_direct_write_schedule(dreq, user_addr, count, pos, sync); - if (!result) - result = nfs_direct_wait(dreq); + nfs_direct_write_schedule(dreq, sync); + result = nfs_direct_wait(dreq); rpc_clnt_sigunmask(clnt, &oldset); return result; @@ -730,6 +766,8 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, unsigned long user_addr, siz ssize_t nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t pos) { ssize_t retval = -EINVAL; + int page_count; + struct page **pages; struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; @@ -751,7 +789,14 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, if (retval) goto out; - retval = nfs_direct_read(iocb, (unsigned long) buf, count, pos); + retval = nfs_get_user_pages(READ, (unsigned long) buf, + count, &pages); + if (retval < 0) + goto out; + page_count = retval; + + retval = nfs_direct_read(iocb, (unsigned long) buf, count, pos, + pages, page_count); if (retval > 0) iocb->ki_pos = pos + retval; @@ -787,6 +832,8 @@ out: ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t pos) { ssize_t retval; + int page_count; + struct page **pages; struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; @@ -814,7 +861,14 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t if (retval) goto out; - retval = nfs_direct_write(iocb, (unsigned long) buf, count, pos); + retval = nfs_get_user_pages(WRITE, (unsigned long) buf, + count, &pages); + if (retval < 0) + goto out; + page_count = retval; + + retval = nfs_direct_write(iocb, (unsigned long) buf, count, + pos, pages, page_count); /* * XXX: nfs_end_data_update() already ensures this file's @@ -838,7 +892,7 @@ out: * nfs_init_directcache - create a slab cache for nfs_direct_req structures * */ -int __init nfs_init_directcache(void) +int nfs_init_directcache(void) { nfs_direct_cachep = kmem_cache_create("nfs_direct_cache", sizeof(struct nfs_direct_req), @@ -852,7 +906,7 @@ int __init nfs_init_directcache(void) } /** - * nfs_destroy_directcache - destroy the slab cache for nfs_direct_req structures + * nfs_init_directcache - destroy the slab cache for nfs_direct_req structures * */ void nfs_destroy_directcache(void) diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 453268663..fade02c15 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -27,14 +27,12 @@ #include #include #include -#include #include #include #include "delegation.h" #include "iostat.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_FILE @@ -45,7 +43,7 @@ static int nfs_file_mmap(struct file *, struct vm_area_struct *); static ssize_t nfs_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); static ssize_t nfs_file_read(struct kiocb *, char __user *, size_t, loff_t); static ssize_t nfs_file_write(struct kiocb *, const char __user *, size_t, loff_t); -static int nfs_file_flush(struct file *, fl_owner_t id); +static int nfs_file_flush(struct file *); static int nfs_fsync(struct file *, struct dentry *dentry, int datasync); static int nfs_check_flags(int flags); static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); @@ -113,7 +111,7 @@ nfs_file_open(struct inode *inode, struct file *filp) nfs_inc_stats(inode, NFSIOS_VFSOPEN); lock_kernel(); - res = NFS_PROTO(inode)->file_open(inode, filp); + res = NFS_SERVER(inode)->rpc_ops->file_open(inode, filp); unlock_kernel(); return res; } @@ -128,6 +126,23 @@ nfs_file_release(struct inode *inode, struct file *filp) return NFS_PROTO(inode)->file_release(inode, filp); } +/** + * nfs_revalidate_file - Revalidate the page cache & related metadata + * @inode - pointer to inode struct + * @file - pointer to file + */ +static int nfs_revalidate_file(struct inode *inode, struct file *filp) +{ + struct nfs_inode *nfsi = NFS_I(inode); + int retval = 0; + + if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR)) + || nfs_attribute_timeout(inode)) + retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode); + nfs_revalidate_mapping(inode, filp->f_mapping); + return 0; +} + /** * nfs_revalidate_size - Revalidate the file size * @inode - pointer to inode struct @@ -173,7 +188,7 @@ static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin) * */ static int -nfs_file_flush(struct file *file, fl_owner_t id) +nfs_file_flush(struct file *file) { struct nfs_open_context *ctx = (struct nfs_open_context *)file->private_data; struct inode *inode = file->f_dentry->d_inode; @@ -213,7 +228,7 @@ nfs_file_read(struct kiocb *iocb, char __user * buf, size_t count, loff_t pos) dentry->d_parent->d_name.name, dentry->d_name.name, (unsigned long) count, (unsigned long) pos); - result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); + result = nfs_revalidate_file(inode, iocb->ki_filp); nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, count); if (!result) result = generic_file_aio_read(iocb, buf, count, pos); @@ -232,7 +247,7 @@ nfs_file_sendfile(struct file *filp, loff_t *ppos, size_t count, dentry->d_parent->d_name.name, dentry->d_name.name, (unsigned long) count, (unsigned long long) *ppos); - res = nfs_revalidate_mapping(inode, filp->f_mapping); + res = nfs_revalidate_file(inode, filp); if (!res) res = generic_file_sendfile(filp, ppos, count, actor, target); return res; @@ -248,13 +263,9 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma) dfprintk(VFS, "nfs: mmap(%s/%s)\n", dentry->d_parent->d_name.name, dentry->d_name.name); - status = nfs_revalidate_mapping(inode, file->f_mapping); + status = nfs_revalidate_file(inode, file); if (!status) status = generic_file_mmap(file, vma); - - if (status == 0) - nfs_fscache_install_vm_ops(inode, vma); - return status; } @@ -309,48 +320,15 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse static void nfs_invalidate_page(struct page *page, unsigned long offset) { - struct inode *inode = page->mapping->host; - - /* Cancel any unstarted writes on this page */ - if (offset == 0) - nfs_sync_inode_wait(inode, page->index, 1, FLUSH_INVALIDATE); - - nfs_fscache_invalidate_page(page, inode, offset); - - /* we can do this here as the bits are only set with the page lock - * held, and our caller is holding that */ - if (!page->private) - ClearPagePrivate(page); + /* FIXME: we really should cancel any unstarted writes on this page */ } static int nfs_release_page(struct page *page, gfp_t gfp) { - if (gfp & __GFP_FS) { - int error = nfs_wb_page(page->mapping->host, page); - - if (error == 0) { - nfs_fscache_release_page(page); - - /* may have been set due to either caching or writing */ - ClearPagePrivate(page); - } - - /* releasepage() returns true/false */ - return (error == 0) ? 1 : 0; - } - else - /* - * Avoid deadlock on nfs_wait_on_request(). - */ - return 0; + return !nfs_wb_page(page->mapping->host, page); } -/* - * Since we use page->private for our own nefarious purposes when using - * fscache, we have to override extra address space ops to prevent fs/buffer.c - * from getting confused, even though we may not have asked its opinion - */ -const struct address_space_operations nfs_file_aops = { +struct address_space_operations nfs_file_aops = { .readpage = nfs_readpage, .readpages = nfs_readpages, .set_page_dirty = __set_page_dirty_nobuffers, @@ -363,9 +341,6 @@ const struct address_space_operations nfs_file_aops = { #ifdef CONFIG_NFS_DIRECTIO .direct_IO = nfs_direct_IO, #endif -#ifdef CONFIG_NFS_FSCACHE - .sync_page = block_sync_page, -#endif }; /* @@ -398,6 +373,7 @@ nfs_file_write(struct kiocb *iocb, const char __user *buf, size_t count, loff_t if (result) goto out; } + nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); result = count; if (!count) diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c deleted file mode 100644 index 0949bacdb..000000000 --- a/fs/nfs/fscache.c +++ /dev/null @@ -1,345 +0,0 @@ -/* fscache.c: NFS filesystem cache interface - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - - -#include -#include -#include -#include -#include -#include - -#include "internal.h" - -/* - * Sysctl variables - */ -atomic_t nfs_fscache_to_pages; -atomic_t nfs_fscache_from_pages; -atomic_t nfs_fscache_uncache_page; -int nfs_fscache_from_error; -int nfs_fscache_to_error; - -#define NFSDBG_FACILITY NFSDBG_FSCACHE - -/* the auxiliary data in the cache (used for coherency management) */ -struct nfs_fh_auxdata { - struct timespec i_mtime; - struct timespec i_ctime; - loff_t i_size; -}; - -static struct fscache_netfs_operations nfs_cache_ops = { -}; - -struct fscache_netfs nfs_cache_netfs = { - .name = "nfs", - .version = 0, - .ops = &nfs_cache_ops, -}; - -static const uint8_t nfs_cache_ipv6_wrapper_for_ipv4[12] = { - [0 ... 9] = 0x00, - [10 ... 11] = 0xff -}; - -struct nfs_server_key { - uint16_t nfsversion; - uint16_t port; - union { - struct { - uint8_t ipv6wrapper[12]; - struct in_addr addr; - } ipv4_addr; - struct in6_addr ipv6_addr; - }; -}; - -static uint16_t nfs_server_get_key(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax) -{ - const struct nfs_client *clp = cookie_netfs_data; - struct nfs_server_key *key = buffer; - uint16_t len = 0; - - key->nfsversion = clp->cl_nfsversion; - - switch (clp->cl_addr.sin_family) { - case AF_INET: - key->port = clp->cl_addr.sin_port; - - memcpy(&key->ipv4_addr.ipv6wrapper, - &nfs_cache_ipv6_wrapper_for_ipv4, - sizeof(key->ipv4_addr.ipv6wrapper)); - memcpy(&key->ipv4_addr.addr, - &clp->cl_addr.sin_addr, - sizeof(key->ipv4_addr.addr)); - len = sizeof(struct nfs_server_key); - break; - - case AF_INET6: - key->port = clp->cl_addr.sin_port; - - memcpy(&key->ipv6_addr, - &clp->cl_addr.sin_addr, - sizeof(key->ipv6_addr)); - len = sizeof(struct nfs_server_key); - break; - - default: - len = 0; - printk(KERN_WARNING "NFS: Unknown network family '%d'\n", - clp->cl_addr.sin_family); - break; - } - - return len; -} - -/* - * the root index for the filesystem is defined by nfsd IP address and ports - */ -struct fscache_cookie_def nfs_cache_server_index_def = { - .name = "NFS.servers", - .type = FSCACHE_COOKIE_TYPE_INDEX, - .get_key = nfs_server_get_key, -}; - -static uint16_t nfs_fh_get_key(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax) -{ - const struct nfs_inode *nfsi = cookie_netfs_data; - uint16_t nsize; - - /* set the file handle */ - nsize = nfsi->fh.size; - memcpy(buffer, nfsi->fh.data, nsize); - return nsize; -} - -/* - * indication of pages that now have cache metadata retained - * - this function should mark the specified pages as now being cached - */ -static void nfs_fh_mark_pages_cached(void *cookie_netfs_data, - struct address_space *mapping, - struct pagevec *cached_pvec) -{ - struct nfs_inode *nfsi = cookie_netfs_data; - unsigned long loop; - - dprintk("NFS: nfs_fh_mark_pages_cached: nfs_inode 0x%p pages %ld\n", - nfsi, cached_pvec->nr); - - for (loop = 0; loop < cached_pvec->nr; loop++) - SetPageNfsCached(cached_pvec->pages[loop]); -} - -/* - * get an extra reference on a read context - * - this function can be absent if the completion function doesn't - * require a context - */ -static void nfs_fh_get_context(void *cookie_netfs_data, void *context) -{ - get_nfs_open_context(context); -} - -/* - * release an extra reference on a read context - * - this function can be absent if the completion function doesn't - * require a context - */ -static void nfs_fh_put_context(void *cookie_netfs_data, void *context) -{ - if (context) - put_nfs_open_context(context); -} - -/* - * indication the cookie is no longer uncached - * - this function is called when the backing store currently caching a cookie - * is removed - * - the netfs should use this to clean up any markers indicating cached pages - * - this is mandatory for any object that may have data - */ -static void nfs_fh_now_uncached(void *cookie_netfs_data) -{ - struct nfs_inode *nfsi = cookie_netfs_data; - struct pagevec pvec; - pgoff_t first; - int loop, nr_pages; - - pagevec_init(&pvec, 0); - first = 0; - - dprintk("NFS: nfs_fh_now_uncached: nfs_inode 0x%p\n", nfsi); - - for (;;) { - /* grab a bunch of pages to clean */ - nr_pages = pagevec_lookup(&pvec, - nfsi->vfs_inode.i_mapping, - first, - PAGEVEC_SIZE - pagevec_count(&pvec)); - if (!nr_pages) - break; - - for (loop = 0; loop < nr_pages; loop++) - ClearPageNfsCached(pvec.pages[loop]); - - first = pvec.pages[nr_pages - 1]->index + 1; - - pvec.nr = nr_pages; - pagevec_release(&pvec); - cond_resched(); - } -} - -/* - * get certain file attributes from the netfs data - * - this function can be absent for an index - * - not permitted to return an error - * - the netfs data from the cookie being used as the source is - * presented - */ -static void nfs_fh_get_attr(const void *cookie_netfs_data, uint64_t *size) -{ - const struct nfs_inode *nfsi = cookie_netfs_data; - - *size = nfsi->vfs_inode.i_size; -} - -/* - * get the auxilliary data from netfs data - * - this function can be absent if the index carries no state data - * - should store the auxilliary data in the buffer - * - should return the amount of amount stored - * - not permitted to return an error - * - the netfs data from the cookie being used as the source is - * presented - */ -static uint16_t nfs_fh_get_aux(const void *cookie_netfs_data, - void *buffer, uint16_t bufmax) -{ - struct nfs_fh_auxdata auxdata; - const struct nfs_inode *nfsi = cookie_netfs_data; - - auxdata.i_size = nfsi->vfs_inode.i_size; - auxdata.i_mtime = nfsi->vfs_inode.i_mtime; - auxdata.i_ctime = nfsi->vfs_inode.i_ctime; - - if (bufmax > sizeof(auxdata)) - bufmax = sizeof(auxdata); - - memcpy(buffer, &auxdata, bufmax); - return bufmax; -} - -/* - * consult the netfs about the state of an object - * - this function can be absent if the index carries no state data - * - the netfs data from the cookie being used as the target is - * presented, as is the auxilliary data - */ -static fscache_checkaux_t nfs_fh_check_aux(void *cookie_netfs_data, - const void *data, uint16_t datalen) -{ - struct nfs_fh_auxdata auxdata; - struct nfs_inode *nfsi = cookie_netfs_data; - - if (datalen > sizeof(auxdata)) - return FSCACHE_CHECKAUX_OBSOLETE; - - auxdata.i_size = nfsi->vfs_inode.i_size; - auxdata.i_mtime = nfsi->vfs_inode.i_mtime; - auxdata.i_ctime = nfsi->vfs_inode.i_ctime; - - if (memcmp(data, &auxdata, datalen) != 0) - return FSCACHE_CHECKAUX_OBSOLETE; - - return FSCACHE_CHECKAUX_OKAY; -} - -/* - * the primary index for each server is simply made up of a series of NFS file - * handles - */ -struct fscache_cookie_def nfs_cache_fh_index_def = { - .name = "NFS.fh", - .type = FSCACHE_COOKIE_TYPE_DATAFILE, - .get_key = nfs_fh_get_key, - .get_attr = nfs_fh_get_attr, - .get_aux = nfs_fh_get_aux, - .check_aux = nfs_fh_check_aux, - .get_context = nfs_fh_get_context, - .put_context = nfs_fh_put_context, - .mark_pages_cached = nfs_fh_mark_pages_cached, - .now_uncached = nfs_fh_now_uncached, -}; - -static int nfs_file_page_mkwrite(struct vm_area_struct *vma, struct page *page) -{ - wait_on_page_fs_misc(page); - return 0; -} - -struct vm_operations_struct nfs_fs_vm_operations = { - .nopage = filemap_nopage, - .populate = filemap_populate, - .page_mkwrite = nfs_file_page_mkwrite, -}; - -/* - * handle completion of a page being stored in the cache - */ -void nfs_readpage_to_fscache_complete(struct page *page, void *data, int error) -{ - dfprintk(FSCACHE, - "NFS: readpage_to_fscache_complete (p:%p(i:%lx f:%lx)/%d)\n", - page, page->index, page->flags, error); - - end_page_fs_misc(page); -} - -/* - * handle completion of a page being read from the cache - * - called in process (keventd) context - */ -void nfs_readpage_from_fscache_complete(struct page *page, - void *context, - int error) -{ - dfprintk(FSCACHE, - "NFS: readpage_from_fscache_complete (0x%p/0x%p/%d)\n", - page, context, error); - - /* if the read completes with an error, we just unlock the page and let - * the VM reissue the readpage */ - if (!error) { - SetPageUptodate(page); - unlock_page(page); - } else { - error = nfs_readpage_async(context, page->mapping->host, page); - if (error) - unlock_page(page); - } -} - -/* - * handle completion of a page being read from the cache - * - really need to synchronise the end of writeback, probably using a page - * flag, but for the moment we disable caching on writable files - */ -void nfs_writepage_to_fscache_complete(struct page *page, - void *data, - int error) -{ -} diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h deleted file mode 100644 index 69f0f4041..000000000 --- a/fs/nfs/fscache.h +++ /dev/null @@ -1,466 +0,0 @@ -/* fscache.h: NFS filesystem cache interface definitions - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#ifndef _NFS_FSCACHE_H -#define _NFS_FSCACHE_H - -#include -#include -#include - -#ifdef CONFIG_NFS_FSCACHE -#include - -extern struct fscache_netfs nfs_cache_netfs; -extern struct fscache_cookie_def nfs_cache_server_index_def; -extern struct fscache_cookie_def nfs_cache_fh_index_def; -extern struct vm_operations_struct nfs_fs_vm_operations; - -extern void nfs_invalidatepage(struct page *, unsigned long); -extern int nfs_releasepage(struct page *, gfp_t); - -extern atomic_t nfs_fscache_to_pages; -extern atomic_t nfs_fscache_from_pages; -extern atomic_t nfs_fscache_uncache_page; -extern int nfs_fscache_from_error; -extern int nfs_fscache_to_error; - -/* - * register NFS for caching - */ -static inline int nfs_fscache_register(void) -{ - return fscache_register_netfs(&nfs_cache_netfs); -} - -/* - * unregister NFS for caching - */ -static inline void nfs_fscache_unregister(void) -{ - fscache_unregister_netfs(&nfs_cache_netfs); -} - -/* - * get the per-client index cookie for an NFS client if the appropriate mount - * flag was set - * - we always try and get an index cookie for the client, but get filehandle - * cookies on a per-superblock basis, depending on the mount flags - */ -static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) -{ - /* create a cache index for looking up filehandles */ - clp->fscache = fscache_acquire_cookie(nfs_cache_netfs.primary_index, - &nfs_cache_server_index_def, - clp); - dfprintk(FSCACHE,"NFS: get client cookie (0x%p/0x%p)\n", - clp, clp->fscache); -} - -/* - * dispose of a per-client cookie - */ -static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) -{ - dfprintk(FSCACHE,"NFS: releasing client cookie (0x%p/0x%p)\n", - clp, clp->fscache); - - fscache_relinquish_cookie(clp->fscache, 0); - clp->fscache = NULL; -} - -/* - * indicate the client caching state as readable text - */ -static inline const char *nfs_server_fscache_state(struct nfs_server *server) -{ - if (server->nfs_client->fscache && (server->flags & NFS_MOUNT_FSCACHE)) - return "yes"; - return "no "; -} - -/* - * get the per-filehandle cookie for an NFS inode - */ -static inline void nfs_fscache_get_fh_cookie(struct super_block *sb, - struct nfs_inode *nfsi, - int maycache) -{ - nfsi->fscache = NULL; - if (maycache && (NFS_SB(sb)->flags & NFS_MOUNT_FSCACHE)) { - nfsi->fscache = fscache_acquire_cookie( - NFS_SB(sb)->nfs_client->fscache, - &nfs_cache_fh_index_def, - nfsi); - - fscache_set_i_size(nfsi->fscache, nfsi->vfs_inode.i_size); - - dfprintk(FSCACHE, "NFS: get FH cookie (0x%p/0x%p/0x%p)\n", - sb, nfsi, nfsi->fscache); - } -} - -/* - * change the filesize associated with a per-filehandle cookie - */ -static inline void nfs_fscache_set_size(struct nfs_server *server, - struct nfs_inode *nfsi, - loff_t i_size) -{ - fscache_set_i_size(nfsi->fscache, i_size); -} - -/* - * replace a per-filehandle cookie due to revalidation detecting a file having - * changed on the server - */ -static inline void nfs_fscache_renew_fh_cookie(struct nfs_server *server, - struct nfs_inode *nfsi) -{ - struct fscache_cookie *old = nfsi->fscache; - - if (nfsi->fscache) { - /* retire the current fscache cache and get a new one */ - fscache_relinquish_cookie(nfsi->fscache, 1); - - nfsi->fscache = fscache_acquire_cookie( - server->nfs_client->fscache, - &nfs_cache_fh_index_def, - nfsi); - fscache_set_i_size(nfsi->fscache, nfsi->vfs_inode.i_size); - - dfprintk(FSCACHE, - "NFS: revalidation new cookie (0x%p/0x%p/0x%p/0x%p)\n", - server, nfsi, old, nfsi->fscache); - } -} - -/* - * release a per-filehandle cookie - */ -static inline void nfs_fscache_release_fh_cookie(struct nfs_server *server, - struct nfs_inode *nfsi) -{ - dfprintk(FSCACHE, "NFS: clear cookie (0x%p/0x%p)\n", - nfsi, nfsi->fscache); - - fscache_relinquish_cookie(nfsi->fscache, 0); - nfsi->fscache = NULL; -} - -/* - * retire a per-filehandle cookie, destroying the data attached to it - */ -static inline void nfs_fscache_zap_fh_cookie(struct nfs_server *server, - struct nfs_inode *nfsi) -{ - dfprintk(FSCACHE,"NFS: zapping cookie (0x%p/0x%p)\n", - nfsi, nfsi->fscache); - - fscache_relinquish_cookie(nfsi->fscache, 1); - nfsi->fscache = NULL; -} - -/* - * turn off the cache with regard to a filehandle cookie if opened for writing, - * invalidating all the pages in the page cache relating to the associated - * inode to clear the per-page caching - */ -static inline void nfs_fscache_disable_fh_cookie(struct inode *inode) -{ - if (NFS_I(inode)->fscache) { - dfprintk(FSCACHE, - "NFS: nfsi 0x%p turning cache off\n", NFS_I(inode)); - - /* Need to invalided any mapped pages that were read in before - * turning off the cache. - */ - if (inode->i_mapping && inode->i_mapping->nrpages) - invalidate_inode_pages2(inode->i_mapping); - - nfs_fscache_zap_fh_cookie(NFS_SERVER(inode), NFS_I(inode)); - } -} - -/* - * install the VM ops for mmap() of an NFS file so that we can hold up writes - * to pages on shared writable mappings until the store to the cache is - * complete - */ -static inline void nfs_fscache_install_vm_ops(struct inode *inode, - struct vm_area_struct *vma) -{ - if (NFS_I(inode)->fscache) - vma->vm_ops = &nfs_fs_vm_operations; -} - -/* - * release the caching state associated with a page - */ -static void nfs_fscache_release_page(struct page *page) -{ - if (PageNfsCached(page)) { - struct nfs_inode *nfsi = NFS_I(page->mapping->host); - - BUG_ON(nfsi->fscache == NULL); - - dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n", - nfsi->fscache, page, nfsi); - - wait_on_page_fs_misc(page); - fscache_uncache_page(nfsi->fscache, page); - atomic_inc(&nfs_fscache_uncache_page); - ClearPageNfsCached(page); - } -} - -/* - * release the caching state associated with a page if undergoing complete page - * invalidation - */ -static inline void nfs_fscache_invalidate_page(struct page *page, - struct inode *inode, - unsigned long offset) -{ - if (PageNfsCached(page)) { - struct nfs_inode *nfsi = NFS_I(page->mapping->host); - - BUG_ON(!nfsi->fscache); - - dfprintk(FSCACHE, - "NFS: fscache invalidatepage (0x%p/0x%p/0x%p)\n", - nfsi->fscache, page, nfsi); - - if (offset == 0) { - BUG_ON(!PageLocked(page)); - if (!PageWriteback(page)) - nfs_fscache_release_page(page); - } - } -} - -/* - * store a newly fetched page in fscache - */ -extern void nfs_readpage_to_fscache_complete(struct page *, void *, int); - -static inline void nfs_readpage_to_fscache(struct inode *inode, - struct page *page, - int sync) -{ - int ret; - - if (PageNfsCached(page)) { - dfprintk(FSCACHE, - "NFS: " - "readpage_to_fscache(fsc:%p/p:%p(i:%lx f:%lx)/%d)\n", - NFS_I(inode)->fscache, page, page->index, page->flags, - sync); - - if (TestSetPageFsMisc(page)) - BUG(); - - ret = fscache_write_page(NFS_I(inode)->fscache, page, - nfs_readpage_to_fscache_complete, - NULL, GFP_KERNEL); - dfprintk(FSCACHE, - "NFS: " - "readpage_to_fscache: p:%p(i:%lu f:%lx) ret %d\n", - page, page->index, page->flags, ret); - - if (ret != 0) { - fscache_uncache_page(NFS_I(inode)->fscache, page); - atomic_inc(&nfs_fscache_uncache_page); - ClearPageNfsCached(page); - end_page_fs_misc(page); - nfs_fscache_to_error = ret; - } else { - atomic_inc(&nfs_fscache_to_pages); - } - } -} - -/* - * retrieve a page from fscache - */ -extern void nfs_readpage_from_fscache_complete(struct page *, void *, int); - -static inline -int nfs_readpage_from_fscache(struct nfs_open_context *ctx, - struct inode *inode, - struct page *page) -{ - int ret; - - if (!NFS_I(inode)->fscache) - return 1; - - dfprintk(FSCACHE, - "NFS: readpage_from_fscache(fsc:%p/p:%p(i:%lx f:%lx)/0x%p)\n", - NFS_I(inode)->fscache, page, page->index, page->flags, inode); - - ret = fscache_read_or_alloc_page(NFS_I(inode)->fscache, - page, - nfs_readpage_from_fscache_complete, - ctx, - GFP_KERNEL); - - switch (ret) { - case 0: /* read BIO submitted (page in fscache) */ - dfprintk(FSCACHE, - "NFS: readpage_from_fscache: BIO submitted\n"); - atomic_inc(&nfs_fscache_from_pages); - return ret; - - case -ENOBUFS: /* inode not in cache */ - case -ENODATA: /* page not in cache */ - dfprintk(FSCACHE, - "NFS: readpage_from_fscache error %d\n", ret); - return 1; - - default: - dfprintk(FSCACHE, "NFS: readpage_from_fscache %d\n", ret); - nfs_fscache_from_error = ret; - } - return ret; -} - -/* - * retrieve a set of pages from fscache - */ -static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx, - struct inode *inode, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages) -{ - int ret, npages = *nr_pages; - - if (!NFS_I(inode)->fscache) - return 1; - - dfprintk(FSCACHE, - "NFS: nfs_getpages_from_fscache (0x%p/%u/0x%p)\n", - NFS_I(inode)->fscache, *nr_pages, inode); - - ret = fscache_read_or_alloc_pages(NFS_I(inode)->fscache, - mapping, pages, nr_pages, - nfs_readpage_from_fscache_complete, - ctx, - mapping_gfp_mask(mapping)); - - - switch (ret) { - case 0: /* read BIO submitted (page in fscache) */ - BUG_ON(!list_empty(pages)); - BUG_ON(*nr_pages != 0); - dfprintk(FSCACHE, - "NFS: nfs_getpages_from_fscache: BIO submitted\n"); - - atomic_add(npages, &nfs_fscache_from_pages); - return ret; - - case -ENOBUFS: /* inode not in cache */ - case -ENODATA: /* page not in cache */ - dfprintk(FSCACHE, - "NFS: nfs_getpages_from_fscache: no page: %d\n", ret); - return 1; - - default: - dfprintk(FSCACHE, - "NFS: nfs_getpages_from_fscache: ret %d\n", ret); - nfs_fscache_from_error = ret; - } - - return ret; -} - -/* - * store an updated page in fscache - */ -extern void nfs_writepage_to_fscache_complete(struct page *page, void *data, int error); - -static inline void nfs_writepage_to_fscache(struct inode *inode, - struct page *page) -{ - int error; - - if (PageNfsCached(page) && NFS_I(inode)->fscache) { - dfprintk(FSCACHE, - "NFS: writepage_to_fscache (0x%p/0x%p/0x%p)\n", - NFS_I(inode)->fscache, page, inode); - - error = fscache_write_page(NFS_I(inode)->fscache, page, - nfs_writepage_to_fscache_complete, - NULL, GFP_KERNEL); - if (error != 0) { - dfprintk(FSCACHE, - "NFS: fscache_write_page error %d\n", - error); - fscache_uncache_page(NFS_I(inode)->fscache, page); - } - } -} - -#else /* CONFIG_NFS_FSCACHE */ -static inline int nfs_fscache_register(void) { return 0; } -static inline void nfs_fscache_unregister(void) {} -static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) {} -static inline void nfs4_fscache_get_client_cookie(struct nfs_client *clp) {} -static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) {} -static inline const char *nfs_server_fscache_state(struct nfs_server *server) { return "no "; } - -static inline void nfs_fscache_get_fh_cookie(struct super_block *sb, - struct nfs_inode *nfsi, - int maycache) -{ -} -static inline void nfs_fscache_set_size(struct nfs_server *server, - struct nfs_inode *nfsi, - loff_t i_size) -{ -} -static inline void nfs_fscache_release_fh_cookie(struct nfs_server *server, - struct nfs_inode *nfsi) -{ -} -static inline void nfs_fscache_zap_fh_cookie(struct nfs_server *server, struct nfs_inode *nfsi) {} -static inline void nfs_fscache_renew_fh_cookie(struct nfs_server *server, struct nfs_inode *nfsi) {} -static inline void nfs_fscache_disable_fh_cookie(struct inode *inode) {} -static inline void nfs_fscache_install_vm_ops(struct inode *inode, struct vm_area_struct *vma) {} -static inline void nfs_fscache_release_page(struct page *page) {} -static inline void nfs_fscache_invalidate_page(struct page *page, - struct inode *inode, - unsigned long offset) -{ -} -static inline void nfs_readpage_to_fscache(struct inode *inode, struct page *page, int sync) {} -static inline int nfs_readpage_from_fscache(struct nfs_open_context *ctx, - struct inode *inode, struct page *page) -{ - return -ENOBUFS; -} -static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx, - struct inode *inode, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages) -{ - return -ENOBUFS; -} - -static inline void nfs_writepage_to_fscache(struct inode *inode, struct page *page) -{ - BUG_ON(PageNfsCached(page)); -} - -#endif /* CONFIG_NFS_FSCACHE */ -#endif /* _NFS_FSCACHE_H */ diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c deleted file mode 100644 index 20c6f39ea..000000000 --- a/fs/nfs/getroot.c +++ /dev/null @@ -1,310 +0,0 @@ -/* getroot.c: get the root dentry for an NFS mount - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "nfs4_fs.h" -#include "delegation.h" -#include "internal.h" - -#define NFSDBG_FACILITY NFSDBG_CLIENT -#define NFS_PARANOIA 1 - -/* - * get an NFS2/NFS3 root dentry from the root filehandle - */ -struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh) -{ - struct nfs_server *server = NFS_SB(sb); - struct nfs_fsinfo fsinfo; - struct nfs_fattr fattr; - struct dentry *mntroot; - struct inode *inode; - int error; - - /* create a dummy root dentry with dummy inode for this superblock */ - if (!sb->s_root) { - struct nfs_fh dummyfh; - struct dentry *root; - struct inode *iroot; - - memset(&dummyfh, 0, sizeof(dummyfh)); - memset(&fattr, 0, sizeof(fattr)); - nfs_fattr_init(&fattr); - fattr.valid = NFS_ATTR_FATTR; - fattr.type = NFDIR; - fattr.mode = S_IFDIR | S_IRUSR | S_IWUSR; - fattr.nlink = 2; - - iroot = nfs_fhget(sb, &dummyfh, &fattr); - if (IS_ERR(iroot)) - return ERR_PTR(PTR_ERR(iroot)); - - root = d_alloc_root(iroot); - if (!root) { - iput(iroot); - return ERR_PTR(-ENOMEM); - } - - sb->s_root = root; - } - - /* get the actual root for this mount */ - fsinfo.fattr = &fattr; - - error = server->nfs_client->rpc_ops->getroot(server, mntfh, &fsinfo); - if (error < 0) { - dprintk("nfs_get_root: getattr error = %d\n", -error); - return ERR_PTR(error); - } - - inode = nfs_fhget(sb, mntfh, fsinfo.fattr); - if (IS_ERR(inode)) { - dprintk("nfs_get_root: get root inode failed\n"); - return ERR_PTR(PTR_ERR(inode)); - } - - /* root dentries normally start off anonymous and get spliced in later - * if the dentry tree reaches them; however if the dentry already - * exists, we'll pick it up at this point and use it as the root - */ - mntroot = d_alloc_anon(inode); - if (!mntroot) { - iput(inode); - dprintk("nfs_get_root: get root dentry failed\n"); - return ERR_PTR(-ENOMEM); - } - - security_d_instantiate(mntroot, inode); - - if (!mntroot->d_op) - mntroot->d_op = server->nfs_client->rpc_ops->dentry_ops; - - return mntroot; -} - -#ifdef CONFIG_NFS_V4 - -/* - * Do a simple pathwalk from the root FH of the server to the nominated target - * of the mountpoint - * - give error on symlinks - * - give error on ".." occurring in the path - * - follow traversals - */ -int nfs4_path_walk(struct nfs_server *server, - struct nfs_fh *mntfh, - const char *path) -{ - struct nfs_fsinfo fsinfo; - struct nfs_fattr fattr; - struct nfs_fh lastfh; - struct qstr name; - int ret; - //int referral_count = 0; - - dprintk("--> nfs4_path_walk(,,%s)\n", path); - - fsinfo.fattr = &fattr; - nfs_fattr_init(&fattr); - - if (*path++ != '/') { - dprintk("nfs4_get_root: Path does not begin with a slash\n"); - return -EINVAL; - } - - /* Start by getting the root filehandle from the server */ - ret = server->nfs_client->rpc_ops->getroot(server, mntfh, &fsinfo); - if (ret < 0) { - dprintk("nfs4_get_root: getroot error = %d\n", -ret); - return ret; - } - - if (fattr.type != NFDIR) { - printk(KERN_ERR "nfs4_get_root:" - " getroot encountered non-directory\n"); - return -ENOTDIR; - } - - if (fattr.valid & NFS_ATTR_FATTR_V4_REFERRAL) { - printk(KERN_ERR "nfs4_get_root:" - " getroot obtained referral\n"); - return -EREMOTE; - } - -next_component: - dprintk("Next: %s\n", path); - - /* extract the next bit of the path */ - if (!*path) - goto path_walk_complete; - - name.name = path; - while (*path && *path != '/') - path++; - name.len = path - (const char *) name.name; - -eat_dot_dir: - while (*path == '/') - path++; - - if (path[0] == '.' && (path[1] == '/' || !path[1])) { - path += 2; - goto eat_dot_dir; - } - - if (path[0] == '.' && path[1] == '.' && (path[2] == '/' || !path[2]) - ) { - printk(KERN_ERR "nfs4_get_root:" - " Mount path contains reference to \"..\"\n"); - return -EINVAL; - } - - /* lookup the next FH in the sequence */ - memcpy(&lastfh, mntfh, sizeof(lastfh)); - - dprintk("LookupFH: %*.*s [%s]\n", name.len, name.len, name.name, path); - - ret = server->nfs_client->rpc_ops->lookupfh(server, &lastfh, &name, - mntfh, &fattr); - if (ret < 0) { - dprintk("nfs4_get_root: getroot error = %d\n", -ret); - return ret; - } - - if (fattr.type != NFDIR) { - printk(KERN_ERR "nfs4_get_root:" - " lookupfh encountered non-directory\n"); - return -ENOTDIR; - } - - if (fattr.valid & NFS_ATTR_FATTR_V4_REFERRAL) { - printk(KERN_ERR "nfs4_get_root:" - " lookupfh obtained referral\n"); - return -EREMOTE; - } - - goto next_component; - -path_walk_complete: - memcpy(&server->fsid, &fattr.fsid, sizeof(server->fsid)); - dprintk("<-- nfs4_path_walk() = 0\n"); - return 0; -} - -/* - * get an NFS4 root dentry from the root filehandle - */ -struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh) -{ - struct nfs_server *server = NFS_SB(sb); - struct nfs_fattr fattr; - struct dentry *mntroot; - struct inode *inode; - int error; - - dprintk("--> nfs4_get_root()\n"); - - /* create a dummy root dentry with dummy inode for this superblock */ - if (!sb->s_root) { - struct nfs_fh dummyfh; - struct dentry *root; - struct inode *iroot; - - memset(&dummyfh, 0, sizeof(dummyfh)); - memset(&fattr, 0, sizeof(fattr)); - nfs_fattr_init(&fattr); - fattr.valid = NFS_ATTR_FATTR; - fattr.type = NFDIR; - fattr.mode = S_IFDIR | S_IRUSR | S_IWUSR; - fattr.nlink = 2; - - iroot = nfs_fhget(sb, &dummyfh, &fattr); - if (IS_ERR(iroot)) - return ERR_PTR(PTR_ERR(iroot)); - - root = d_alloc_root(iroot); - if (!root) { - iput(iroot); - return ERR_PTR(-ENOMEM); - } - - sb->s_root = root; - } - - /* get the info about the server and filesystem */ - error = nfs4_server_capabilities(server, mntfh); - if (error < 0) { - dprintk("nfs_get_root: getcaps error = %d\n", - -error); - return ERR_PTR(error); - } - - /* get the actual root for this mount */ - error = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr); - if (error < 0) { - dprintk("nfs_get_root: getattr error = %d\n", -error); - return ERR_PTR(error); - } - - inode = nfs_fhget(sb, mntfh, &fattr); - if (IS_ERR(inode)) { - dprintk("nfs_get_root: get root inode failed\n"); - return ERR_PTR(PTR_ERR(inode)); - } - - /* root dentries normally start off anonymous and get spliced in later - * if the dentry tree reaches them; however if the dentry already - * exists, we'll pick it up at this point and use it as the root - */ - mntroot = d_alloc_anon(inode); - if (!mntroot) { - iput(inode); - dprintk("nfs_get_root: get root dentry failed\n"); - return ERR_PTR(-ENOMEM); - } - - security_d_instantiate(mntroot, inode); - - if (!mntroot->d_op) - mntroot->d_op = server->nfs_client->rpc_ops->dentry_ops; - - dprintk("<-- nfs4_get_root()\n"); - return mntroot; -} - -#endif /* CONFIG_NFS_V4 */ diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index f96dfac7d..3fab5b0cf 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -57,20 +58,6 @@ /* Default cache timeout is 10 minutes */ unsigned int nfs_idmap_cache_timeout = 600 * HZ; -static int param_set_idmap_timeout(const char *val, struct kernel_param *kp) -{ - char *endp; - int num = simple_strtol(val, &endp, 0); - int jif = num * HZ; - if (endp == val || *endp || num < 0 || jif < num) - return -EINVAL; - *((int *)kp->arg) = jif; - return 0; -} - -module_param_call(idmap_cache_timeout, param_set_idmap_timeout, param_get_int, - &nfs_idmap_cache_timeout, 0644); - struct idmap_hashent { unsigned long ih_expires; __u32 ih_id; @@ -108,16 +95,15 @@ static struct rpc_pipe_ops idmap_upcall_ops = { .destroy_msg = idmap_pipe_destroy_msg, }; -int -nfs_idmap_new(struct nfs_client *clp) +void +nfs_idmap_new(struct nfs4_client *clp) { struct idmap *idmap; - int error; - - BUG_ON(clp->cl_idmap != NULL); + if (clp->cl_idmap != NULL) + return; if ((idmap = kzalloc(sizeof(*idmap), GFP_KERNEL)) == NULL) - return -ENOMEM; + return; snprintf(idmap->idmap_path, sizeof(idmap->idmap_path), "%s/idmap", clp->cl_rpcclient->cl_pathname); @@ -125,9 +111,8 @@ nfs_idmap_new(struct nfs_client *clp) idmap->idmap_dentry = rpc_mkpipe(idmap->idmap_path, idmap, &idmap_upcall_ops, 0); if (IS_ERR(idmap->idmap_dentry)) { - error = PTR_ERR(idmap->idmap_dentry); kfree(idmap); - return error; + return; } mutex_init(&idmap->idmap_lock); @@ -137,17 +122,18 @@ nfs_idmap_new(struct nfs_client *clp) idmap->idmap_group_hash.h_type = IDMAP_TYPE_GROUP; clp->cl_idmap = idmap; - return 0; } void -nfs_idmap_delete(struct nfs_client *clp) +nfs_idmap_delete(struct nfs4_client *clp) { struct idmap *idmap = clp->cl_idmap; if (!idmap) return; - rpc_unlink(idmap->idmap_dentry); + dput(idmap->idmap_dentry); + idmap->idmap_dentry = NULL; + rpc_unlink(idmap->idmap_path); clp->cl_idmap = NULL; kfree(idmap); } @@ -494,27 +480,27 @@ static unsigned int fnvhash32(const void *buf, size_t buflen) return (hash); } -int nfs_map_name_to_uid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid) +int nfs_map_name_to_uid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid) { struct idmap *idmap = clp->cl_idmap; return nfs_idmap_id(idmap, &idmap->idmap_user_hash, name, namelen, uid); } -int nfs_map_group_to_gid(struct nfs_client *clp, const char *name, size_t namelen, __u32 *uid) +int nfs_map_group_to_gid(struct nfs4_client *clp, const char *name, size_t namelen, __u32 *uid) { struct idmap *idmap = clp->cl_idmap; return nfs_idmap_id(idmap, &idmap->idmap_group_hash, name, namelen, uid); } -int nfs_map_uid_to_name(struct nfs_client *clp, __u32 uid, char *buf) +int nfs_map_uid_to_name(struct nfs4_client *clp, __u32 uid, char *buf) { struct idmap *idmap = clp->cl_idmap; return nfs_idmap_name(idmap, &idmap->idmap_user_hash, uid, buf); } -int nfs_map_gid_to_group(struct nfs_client *clp, __u32 uid, char *buf) +int nfs_map_gid_to_group(struct nfs4_client *clp, __u32 uid, char *buf) { struct idmap *idmap = clp->cl_idmap; diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 2d8cf645f..64bae2207 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -13,6 +13,7 @@ * */ +#include #include #include @@ -35,8 +36,6 @@ #include #include #include -#include -#include #include #include @@ -46,19 +45,98 @@ #include "callback.h" #include "delegation.h" #include "iostat.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_VFS #define NFS_PARANOIA 1 +/* Maximum number of readahead requests + * FIXME: this should really be a sysctl so that users may tune it to suit + * their needs. People that do NFS over a slow network, might for + * instance want to reduce it to something closer to 1 for improved + * interactive response. + */ +#define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) + static void nfs_invalidate_inode(struct inode *); static int nfs_update_inode(struct inode *, struct nfs_fattr *); +static struct inode *nfs_alloc_inode(struct super_block *sb); +static void nfs_destroy_inode(struct inode *); +static int nfs_write_inode(struct inode *,int); +static void nfs_delete_inode(struct inode *); +static void nfs_clear_inode(struct inode *); +static void nfs_umount_begin(struct super_block *); +static int nfs_statfs(struct super_block *, struct kstatfs *); +static int nfs_show_options(struct seq_file *, struct vfsmount *); +static int nfs_show_stats(struct seq_file *, struct vfsmount *); static void nfs_zap_acl_cache(struct inode *); -static kmem_cache_t * nfs_inode_cachep; +static struct rpc_program nfs_program; + +static struct super_operations nfs_sops = { + .alloc_inode = nfs_alloc_inode, + .destroy_inode = nfs_destroy_inode, + .write_inode = nfs_write_inode, + .delete_inode = nfs_delete_inode, + .statfs = nfs_statfs, + .clear_inode = nfs_clear_inode, + .umount_begin = nfs_umount_begin, + .show_options = nfs_show_options, + .show_stats = nfs_show_stats, +}; + +/* + * RPC cruft for NFS + */ +static struct rpc_stat nfs_rpcstat = { + .program = &nfs_program +}; +static struct rpc_version * nfs_version[] = { + NULL, + NULL, + &nfs_version2, +#if defined(CONFIG_NFS_V3) + &nfs_version3, +#elif defined(CONFIG_NFS_V4) + NULL, +#endif +#if defined(CONFIG_NFS_V4) + &nfs_version4, +#endif +}; + +static struct rpc_program nfs_program = { + .name = "nfs", + .number = NFS_PROGRAM, + .nrvers = ARRAY_SIZE(nfs_version), + .version = nfs_version, + .stats = &nfs_rpcstat, + .pipe_dir_name = "/nfs", +}; + +#ifdef CONFIG_NFS_V3_ACL +static struct rpc_stat nfsacl_rpcstat = { &nfsacl_program }; +static struct rpc_version * nfsacl_version[] = { + [3] = &nfsacl_version3, +}; + +struct rpc_program nfsacl_program = { + .name = "nfsacl", + .number = NFS_ACL_PROGRAM, + .nrvers = ARRAY_SIZE(nfsacl_version), + .version = nfsacl_version, + .stats = &nfsacl_rpcstat, +}; +#endif /* CONFIG_NFS_V3_ACL */ -int nfs_write_inode(struct inode *inode, int sync) +static inline unsigned long +nfs_fattr_to_ino_t(struct nfs_fattr *fattr) +{ + return nfs_fileid_to_ino_t(fattr->fileid); +} + +static int +nfs_write_inode(struct inode *inode, int sync) { int flags = sync ? FLUSH_SYNC : 0; int ret; @@ -69,25 +147,593 @@ int nfs_write_inode(struct inode *inode, int sync) return 0; } -void nfs_clear_inode(struct inode *inode) +static void +nfs_delete_inode(struct inode * inode) { - struct nfs_inode *nfsi = NFS_I(inode); - struct rpc_cred *cred; + dprintk("NFS: delete_inode(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); + truncate_inode_pages(&inode->i_data, 0); + + nfs_wb_all(inode); /* * The following should never happen... */ - BUG_ON(nfs_have_writebacks(inode)); + if (nfs_have_writebacks(inode)) { + printk(KERN_ERR "nfs_delete_inode: inode %ld has pending RPC requests\n", inode->i_ino); + } + + clear_inode(inode); +} + +static void +nfs_clear_inode(struct inode *inode) +{ + struct nfs_inode *nfsi = NFS_I(inode); + struct rpc_cred *cred; + + nfs_wb_all(inode); BUG_ON (!list_empty(&nfsi->open_files)); nfs_zap_acl_cache(inode); cred = nfsi->cache_access.cred; if (cred) put_rpccred(cred); - - nfs_fscache_release_fh_cookie(NFS_SERVER(inode), nfsi); BUG_ON(atomic_read(&nfsi->data_updates) != 0); } +void +nfs_umount_begin(struct super_block *sb) +{ + struct rpc_clnt *rpc = NFS_SB(sb)->client; + + /* -EIO all pending I/O */ + if (!IS_ERR(rpc)) + rpc_killall_tasks(rpc); + rpc = NFS_SB(sb)->client_acl; + if (!IS_ERR(rpc)) + rpc_killall_tasks(rpc); +} + + +static inline unsigned long +nfs_block_bits(unsigned long bsize, unsigned char *nrbitsp) +{ + /* make sure blocksize is a power of two */ + if ((bsize & (bsize - 1)) || nrbitsp) { + unsigned char nrbits; + + for (nrbits = 31; nrbits && !(bsize & (1 << nrbits)); nrbits--) + ; + bsize = 1 << nrbits; + if (nrbitsp) + *nrbitsp = nrbits; + } + + return bsize; +} + +/* + * Calculate the number of 512byte blocks used. + */ +static inline unsigned long +nfs_calc_block_size(u64 tsize) +{ + loff_t used = (tsize + 511) >> 9; + return (used > ULONG_MAX) ? ULONG_MAX : used; +} + +/* + * Compute and set NFS server blocksize + */ +static inline unsigned long +nfs_block_size(unsigned long bsize, unsigned char *nrbitsp) +{ + if (bsize < NFS_MIN_FILE_IO_SIZE) + bsize = NFS_DEF_FILE_IO_SIZE; + else if (bsize >= NFS_MAX_FILE_IO_SIZE) + bsize = NFS_MAX_FILE_IO_SIZE; + + return nfs_block_bits(bsize, nrbitsp); +} + +/* + * Obtain the root inode of the file system. + */ +static struct inode * +nfs_get_root(struct super_block *sb, struct nfs_fh *rootfh, struct nfs_fsinfo *fsinfo) +{ + struct nfs_server *server = NFS_SB(sb); + int error; + + error = server->rpc_ops->getroot(server, rootfh, fsinfo); + if (error < 0) { + dprintk("nfs_get_root: getattr error = %d\n", -error); + return ERR_PTR(error); + } + + return nfs_fhget(sb, rootfh, fsinfo->fattr); +} + +/* + * Do NFS version-independent mount processing, and sanity checking + */ +static int +nfs_sb_init(struct super_block *sb, rpc_authflavor_t authflavor) +{ + struct nfs_server *server; + struct inode *root_inode; + struct nfs_fattr fattr; + struct nfs_fsinfo fsinfo = { + .fattr = &fattr, + }; + struct nfs_pathconf pathinfo = { + .fattr = &fattr, + }; + int no_root_error = 0; + unsigned long max_rpc_payload; + + /* We probably want something more informative here */ + snprintf(sb->s_id, sizeof(sb->s_id), "%x:%x", MAJOR(sb->s_dev), MINOR(sb->s_dev)); + + server = NFS_SB(sb); + + sb->s_magic = NFS_SUPER_MAGIC; + + server->io_stats = nfs_alloc_iostats(); + if (server->io_stats == NULL) + return -ENOMEM; + + root_inode = nfs_get_root(sb, &server->fh, &fsinfo); + /* Did getting the root inode fail? */ + if (IS_ERR(root_inode)) { + no_root_error = PTR_ERR(root_inode); + goto out_no_root; + } + sb->s_root = d_alloc_root(root_inode); + if (!sb->s_root) { + no_root_error = -ENOMEM; + goto out_no_root; + } + sb->s_root->d_op = server->rpc_ops->dentry_ops; + + /* mount time stamp, in seconds */ + server->mount_time = jiffies; + + /* Get some general file system info */ + if (server->namelen == 0 && + server->rpc_ops->pathconf(server, &server->fh, &pathinfo) >= 0) + server->namelen = pathinfo.max_namelen; + /* Work out a lot of parameters */ + if (server->rsize == 0) + server->rsize = nfs_block_size(fsinfo.rtpref, NULL); + if (server->wsize == 0) + server->wsize = nfs_block_size(fsinfo.wtpref, NULL); + + if (fsinfo.rtmax >= 512 && server->rsize > fsinfo.rtmax) + server->rsize = nfs_block_size(fsinfo.rtmax, NULL); + if (fsinfo.wtmax >= 512 && server->wsize > fsinfo.wtmax) + server->wsize = nfs_block_size(fsinfo.wtmax, NULL); + + max_rpc_payload = nfs_block_size(rpc_max_payload(server->client), NULL); + if (server->rsize > max_rpc_payload) + server->rsize = max_rpc_payload; + if (server->rsize > NFS_MAX_FILE_IO_SIZE) + server->rsize = NFS_MAX_FILE_IO_SIZE; + server->rpages = (server->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; + + if (server->wsize > max_rpc_payload) + server->wsize = max_rpc_payload; + if (server->wsize > NFS_MAX_FILE_IO_SIZE) + server->wsize = NFS_MAX_FILE_IO_SIZE; + server->wpages = (server->wsize + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; + + if (sb->s_blocksize == 0) + sb->s_blocksize = nfs_block_bits(server->wsize, + &sb->s_blocksize_bits); + server->wtmult = nfs_block_bits(fsinfo.wtmult, NULL); + + server->dtsize = nfs_block_size(fsinfo.dtpref, NULL); + if (server->dtsize > PAGE_CACHE_SIZE) + server->dtsize = PAGE_CACHE_SIZE; + if (server->dtsize > server->rsize) + server->dtsize = server->rsize; + + if (server->flags & NFS_MOUNT_NOAC) { + server->acregmin = server->acregmax = 0; + server->acdirmin = server->acdirmax = 0; + sb->s_flags |= MS_SYNCHRONOUS; + } + server->backing_dev_info.ra_pages = server->rpages * NFS_MAX_READAHEAD; + + if (server->flags & NFS_MOUNT_TAGXID) + sb->s_flags |= MS_TAGXID; + + sb->s_maxbytes = fsinfo.maxfilesize; + if (sb->s_maxbytes > MAX_LFS_FILESIZE) + sb->s_maxbytes = MAX_LFS_FILESIZE; + + server->client->cl_intr = (server->flags & NFS_MOUNT_INTR) ? 1 : 0; + server->client->cl_softrtry = (server->flags & NFS_MOUNT_SOFT) ? 1 : 0; + server->client->cl_tagxid = (server->flags & NFS_MOUNT_TAGXID) ? 1 : 0; + + /* We're airborne Set socket buffersize */ + rpc_setbufsize(server->client, server->wsize + 100, server->rsize + 100); + return 0; + /* Yargs. It didn't work out. */ +out_no_root: + dprintk("nfs_sb_init: get root inode failed: errno %d\n", -no_root_error); + if (!IS_ERR(root_inode)) + iput(root_inode); + return no_root_error; +} + +static void nfs_init_timeout_values(struct rpc_timeout *to, int proto, unsigned int timeo, unsigned int retrans) +{ + to->to_initval = timeo * HZ / 10; + to->to_retries = retrans; + if (!to->to_retries) + to->to_retries = 2; + + switch (proto) { + case IPPROTO_TCP: + if (!to->to_initval) + to->to_initval = 60 * HZ; + if (to->to_initval > NFS_MAX_TCP_TIMEOUT) + to->to_initval = NFS_MAX_TCP_TIMEOUT; + to->to_increment = to->to_initval; + to->to_maxval = to->to_initval + (to->to_increment * to->to_retries); + to->to_exponential = 0; + break; + case IPPROTO_UDP: + default: + if (!to->to_initval) + to->to_initval = 11 * HZ / 10; + if (to->to_initval > NFS_MAX_UDP_TIMEOUT) + to->to_initval = NFS_MAX_UDP_TIMEOUT; + to->to_maxval = NFS_MAX_UDP_TIMEOUT; + to->to_exponential = 1; + break; + } +} + +/* + * Create an RPC client handle. + */ +static struct rpc_clnt * +nfs_create_client(struct nfs_server *server, const struct nfs_mount_data *data) +{ + struct rpc_timeout timeparms; + struct rpc_xprt *xprt = NULL; + struct rpc_clnt *clnt = NULL; + int proto = (data->flags & NFS_MOUNT_TCP) ? IPPROTO_TCP : IPPROTO_UDP; + + nfs_init_timeout_values(&timeparms, proto, data->timeo, data->retrans); + + server->retrans_timeo = timeparms.to_initval; + server->retrans_count = timeparms.to_retries; + + /* create transport and client */ + xprt = xprt_create_proto(proto, &server->addr, &timeparms); + if (IS_ERR(xprt)) { + dprintk("%s: cannot create RPC transport. Error = %ld\n", + __FUNCTION__, PTR_ERR(xprt)); + return (struct rpc_clnt *)xprt; + } + clnt = rpc_create_client(xprt, server->hostname, &nfs_program, + server->rpc_ops->version, data->pseudoflavor); + if (IS_ERR(clnt)) { + dprintk("%s: cannot create RPC client. Error = %ld\n", + __FUNCTION__, PTR_ERR(xprt)); + goto out_fail; + } + + clnt->cl_intr = 1; + clnt->cl_softrtry = 1; + clnt->cl_tagxid = 1; + + return clnt; + +out_fail: + return clnt; +} + +/* + * The way this works is that the mount process passes a structure + * in the data argument which contains the server's IP address + * and the root file handle obtained from the server's mount + * daemon. We stash these away in the private superblock fields. + */ +static int +nfs_fill_super(struct super_block *sb, struct nfs_mount_data *data, int silent) +{ + struct nfs_server *server; + rpc_authflavor_t authflavor; + + server = NFS_SB(sb); + sb->s_blocksize_bits = 0; + sb->s_blocksize = 0; + if (data->bsize) + sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits); + if (data->rsize) + server->rsize = nfs_block_size(data->rsize, NULL); + if (data->wsize) + server->wsize = nfs_block_size(data->wsize, NULL); + server->flags = data->flags & NFS_MOUNT_FLAGMASK; + + server->acregmin = data->acregmin*HZ; + server->acregmax = data->acregmax*HZ; + server->acdirmin = data->acdirmin*HZ; + server->acdirmax = data->acdirmax*HZ; + + /* Start lockd here, before we might error out */ + if (!(server->flags & NFS_MOUNT_NONLM)) + lockd_up(); + + server->namelen = data->namlen; + server->hostname = kmalloc(strlen(data->hostname) + 1, GFP_KERNEL); + if (!server->hostname) + return -ENOMEM; + strcpy(server->hostname, data->hostname); + + /* Check NFS protocol revision and initialize RPC op vector + * and file handle pool. */ +#ifdef CONFIG_NFS_V3 + if (server->flags & NFS_MOUNT_VER3) { + server->rpc_ops = &nfs_v3_clientops; + server->caps |= NFS_CAP_READDIRPLUS; + } else { + server->rpc_ops = &nfs_v2_clientops; + } +#else + server->rpc_ops = &nfs_v2_clientops; +#endif + + /* Fill in pseudoflavor for mount version < 5 */ + if (!(data->flags & NFS_MOUNT_SECFLAVOUR)) + data->pseudoflavor = RPC_AUTH_UNIX; + authflavor = data->pseudoflavor; /* save for sb_init() */ + /* XXX maybe we want to add a server->pseudoflavor field */ + + /* Create RPC client handles */ + server->client = nfs_create_client(server, data); + if (IS_ERR(server->client)) + return PTR_ERR(server->client); + /* RFC 2623, sec 2.3.2 */ + if (authflavor != RPC_AUTH_UNIX) { + struct rpc_auth *auth; + + server->client_sys = rpc_clone_client(server->client); + if (IS_ERR(server->client_sys)) + return PTR_ERR(server->client_sys); + auth = rpcauth_create(RPC_AUTH_UNIX, server->client_sys); + if (IS_ERR(auth)) + return PTR_ERR(auth); + } else { + atomic_inc(&server->client->cl_count); + server->client_sys = server->client; + } + if (server->flags & NFS_MOUNT_VER3) { +#ifdef CONFIG_NFS_V3_ACL + if (!(server->flags & NFS_MOUNT_NOACL)) { + server->client_acl = rpc_bind_new_program(server->client, &nfsacl_program, 3); + /* No errors! Assume that Sun nfsacls are supported */ + if (!IS_ERR(server->client_acl)) + server->caps |= NFS_CAP_ACLS; + } +#else + server->flags &= ~NFS_MOUNT_NOACL; +#endif /* CONFIG_NFS_V3_ACL */ + /* + * The VFS shouldn't apply the umask to mode bits. We will + * do so ourselves when necessary. + */ + sb->s_flags |= MS_POSIXACL; + if (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN) + server->namelen = NFS3_MAXNAMLEN; + sb->s_time_gran = 1; + } else { + if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN) + server->namelen = NFS2_MAXNAMLEN; + } + + sb->s_op = &nfs_sops; + return nfs_sb_init(sb, authflavor); +} + +static int +nfs_statfs(struct super_block *sb, struct kstatfs *buf) +{ + struct nfs_server *server = NFS_SB(sb); + unsigned char blockbits; + unsigned long blockres; + struct nfs_fh *rootfh = NFS_FH(sb->s_root->d_inode); + struct nfs_fattr fattr; + struct nfs_fsstat res = { + .fattr = &fattr, + }; + int error; + + lock_kernel(); + + error = server->rpc_ops->statfs(server, rootfh, &res); + buf->f_type = NFS_SUPER_MAGIC; + if (error < 0) + goto out_err; + + /* + * Current versions of glibc do not correctly handle the + * case where f_frsize != f_bsize. Eventually we want to + * report the value of wtmult in this field. + */ + buf->f_frsize = sb->s_blocksize; + + /* + * On most *nix systems, f_blocks, f_bfree, and f_bavail + * are reported in units of f_frsize. Linux hasn't had + * an f_frsize field in its statfs struct until recently, + * thus historically Linux's sys_statfs reports these + * fields in units of f_bsize. + */ + buf->f_bsize = sb->s_blocksize; + blockbits = sb->s_blocksize_bits; + blockres = (1 << blockbits) - 1; + buf->f_blocks = (res.tbytes + blockres) >> blockbits; + buf->f_bfree = (res.fbytes + blockres) >> blockbits; + buf->f_bavail = (res.abytes + blockres) >> blockbits; + + buf->f_files = res.tfiles; + buf->f_ffree = res.afiles; + + buf->f_namelen = server->namelen; + out: + unlock_kernel(); + return 0; + + out_err: + dprintk("%s: statfs error = %d\n", __FUNCTION__, -error); + buf->f_bsize = buf->f_blocks = buf->f_bfree = buf->f_bavail = -1; + goto out; + +} + +static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, int showdefaults) +{ + static struct proc_nfs_info { + int flag; + char *str; + char *nostr; + } nfs_info[] = { + { NFS_MOUNT_SOFT, ",soft", ",hard" }, + { NFS_MOUNT_INTR, ",intr", "" }, + { NFS_MOUNT_NOCTO, ",nocto", "" }, + { NFS_MOUNT_NOAC, ",noac", "" }, + { NFS_MOUNT_NONLM, ",nolock", "" }, + { NFS_MOUNT_NOACL, ",noacl", "" }, + { NFS_MOUNT_TAGXID, ",tagxid", "" }, + { 0, NULL, NULL } + }; + struct proc_nfs_info *nfs_infop; + char buf[12]; + char *proto; + + seq_printf(m, ",vers=%d", nfss->rpc_ops->version); + seq_printf(m, ",rsize=%d", nfss->rsize); + seq_printf(m, ",wsize=%d", nfss->wsize); + if (nfss->acregmin != 3*HZ || showdefaults) + seq_printf(m, ",acregmin=%d", nfss->acregmin/HZ); + if (nfss->acregmax != 60*HZ || showdefaults) + seq_printf(m, ",acregmax=%d", nfss->acregmax/HZ); + if (nfss->acdirmin != 30*HZ || showdefaults) + seq_printf(m, ",acdirmin=%d", nfss->acdirmin/HZ); + if (nfss->acdirmax != 60*HZ || showdefaults) + seq_printf(m, ",acdirmax=%d", nfss->acdirmax/HZ); + for (nfs_infop = nfs_info; nfs_infop->flag; nfs_infop++) { + if (nfss->flags & nfs_infop->flag) + seq_puts(m, nfs_infop->str); + else + seq_puts(m, nfs_infop->nostr); + } + switch (nfss->client->cl_xprt->prot) { + case IPPROTO_TCP: + proto = "tcp"; + break; + case IPPROTO_UDP: + proto = "udp"; + break; + default: + snprintf(buf, sizeof(buf), "%u", nfss->client->cl_xprt->prot); + proto = buf; + } + seq_printf(m, ",proto=%s", proto); + seq_printf(m, ",timeo=%lu", 10U * nfss->retrans_timeo / HZ); + seq_printf(m, ",retrans=%u", nfss->retrans_count); +} + +static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) +{ + struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); + + nfs_show_mount_options(m, nfss, 0); + + seq_puts(m, ",addr="); + seq_escape(m, nfss->hostname, " \t\n\\"); + + return 0; +} + +static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) +{ + int i, cpu; + struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); + struct rpc_auth *auth = nfss->client->cl_auth; + struct nfs_iostats totals = { }; + + seq_printf(m, "statvers=%s", NFS_IOSTAT_VERS); + + /* + * Display all mount option settings + */ + seq_printf(m, "\n\topts:\t"); + seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? "ro" : "rw"); + seq_puts(m, mnt->mnt_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); + seq_puts(m, mnt->mnt_sb->s_flags & MS_NOATIME ? ",noatime" : ""); + seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); + nfs_show_mount_options(m, nfss, 1); + + seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); + + seq_printf(m, "\n\tcaps:\t"); + seq_printf(m, "caps=0x%x", nfss->caps); + seq_printf(m, ",wtmult=%d", nfss->wtmult); + seq_printf(m, ",dtsize=%d", nfss->dtsize); + seq_printf(m, ",bsize=%d", nfss->bsize); + seq_printf(m, ",namelen=%d", nfss->namelen); + +#ifdef CONFIG_NFS_V4 + if (nfss->rpc_ops->version == 4) { + seq_printf(m, "\n\tnfsv4:\t"); + seq_printf(m, "bm0=0x%x", nfss->attr_bitmask[0]); + seq_printf(m, ",bm1=0x%x", nfss->attr_bitmask[1]); + seq_printf(m, ",acl=0x%x", nfss->acl_bitmask); + } +#endif + + /* + * Display security flavor in effect for this mount + */ + seq_printf(m, "\n\tsec:\tflavor=%d", auth->au_ops->au_flavor); + if (auth->au_flavor) + seq_printf(m, ",pseudoflavor=%d", auth->au_flavor); + + /* + * Display superblock I/O counters + */ + for_each_possible_cpu(cpu) { + struct nfs_iostats *stats; + + preempt_disable(); + stats = per_cpu_ptr(nfss->io_stats, cpu); + + for (i = 0; i < __NFSIOS_COUNTSMAX; i++) + totals.events[i] += stats->events[i]; + for (i = 0; i < __NFSIOS_BYTESMAX; i++) + totals.bytes[i] += stats->bytes[i]; + + preempt_enable(); + } + + seq_printf(m, "\n\tevents:\t"); + for (i = 0; i < __NFSIOS_COUNTSMAX; i++) + seq_printf(m, "%lu ", totals.events[i]); + seq_printf(m, "\n\tbytes:\t"); + for (i = 0; i < __NFSIOS_BYTESMAX; i++) + seq_printf(m, "%Lu ", totals.bytes[i]); + seq_printf(m, "\n"); + + rpc_print_iostats(m, nfss->client); + + return 0; +} + /** * nfs_sync_mapping - helper to flush all mmapped dirty data to disk */ @@ -131,8 +777,6 @@ void nfs_zap_caches(struct inode *inode) spin_lock(&inode->i_lock); nfs_zap_caches_locked(inode); spin_unlock(&inode->i_lock); - - nfs_fscache_zap_fh_cookie(NFS_SERVER(inode), NFS_I(inode)); } static void nfs_zap_acl_cache(struct inode *inode) @@ -211,7 +855,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) }; struct inode *inode = ERR_PTR(-ENOENT); unsigned long hash; - int maycache = 1; if ((fattr->valid & NFS_ATTR_FATTR) == 0) goto out_no_inode; @@ -221,9 +864,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) goto out_no_inode; } - hash = fattr->fileid; - if (sizeof(hash) < sizeof(u64)) - hash ^= fattr->fileid >> (sizeof(u64) - sizeof(ino_t)) * 8; + hash = nfs_fattr_to_ino_t(fattr); inode = iget5_locked(sb, hash, nfs_find_actor, nfs_init_locked, &desc); if (inode == NULL) { @@ -234,10 +875,9 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) if (inode->i_state & I_NEW) { struct nfs_inode *nfsi = NFS_I(inode); - /* We set i_ino for the few things that still rely on it, such - * as printing messages; stat and filldir use the fileid - * directly since i_ino may not be large enough */ - inode->i_ino = fattr->fileid; + /* We set i_ino for the few things that still rely on it, + * such as stat(2) */ + inode->i_ino = hash; /* We can't support update_atime(), since the server will reset it */ inode->i_flags |= S_NOATIME|S_NOCMTIME; @@ -245,26 +885,17 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) /* Why so? Because we want revalidate for devices/FIFOs, and * that's precisely what we have in nfs_file_inode_operations. */ - inode->i_op = NFS_SB(sb)->nfs_client->rpc_ops->file_inode_ops; + inode->i_op = NFS_SB(sb)->rpc_ops->file_inode_ops; if (S_ISREG(inode->i_mode)) { inode->i_fop = &nfs_file_operations; inode->i_data.a_ops = &nfs_file_aops; inode->i_data.backing_dev_info = &NFS_SB(sb)->backing_dev_info; } else if (S_ISDIR(inode->i_mode)) { - inode->i_op = NFS_SB(sb)->nfs_client->rpc_ops->dir_inode_ops; + inode->i_op = NFS_SB(sb)->rpc_ops->dir_inode_ops; inode->i_fop = &nfs_dir_operations; if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS) && fattr->size <= NFS_LIMIT_READDIRPLUS) set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); - /* Deal with crossing mountpoints */ - if (!nfs_fsid_equal(&NFS_SB(sb)->fsid, &fattr->fsid)) { - if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) - inode->i_op = &nfs_referral_inode_operations; - else - inode->i_op = &nfs_mountpoint_inode_operations; - inode->i_fop = NULL; - maycache = 0; - } } else if (S_ISLNK(inode->i_mode)) inode->i_op = &nfs_symlink_inode_operations; else @@ -288,16 +919,16 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) * report the blocks in 512byte units */ inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used); + inode->i_blksize = inode->i_sb->s_blocksize; } else { inode->i_blocks = fattr->du.nfs2.blocks; + inode->i_blksize = fattr->du.nfs2.blocksize; } nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); nfsi->attrtimeo_timestamp = jiffies; memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf)); nfsi->cache_access.cred = NULL; - nfs_fscache_get_fh_cookie(sb, nfsi, maycache); - unlock_new_inode(inode); } else nfs_refresh_inode(inode, fattr); @@ -382,7 +1013,6 @@ void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr) if ((attr->ia_valid & ATTR_SIZE) != 0) { nfs_inc_stats(inode, NFSIOS_SETATTRTRUNC); inode->i_size = attr->ia_size; - nfs_fscache_set_size(NFS_SERVER(inode), NFS_I(inode), inode->i_size); vmtruncate(inode, attr->ia_size); } } @@ -448,10 +1078,8 @@ int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) err = __nfs_revalidate_inode(NFS_SERVER(inode), inode); else err = nfs_revalidate_inode(NFS_SERVER(inode), inode); - if (!err) { + if (!err) generic_fillattr(inode, stat); - stat->ino = NFS_FILEID(inode); - } return err; } @@ -567,8 +1195,6 @@ int nfs_open(struct inode *inode, struct file *filp) ctx->mode = filp->f_mode; nfs_file_set_open_context(filp, ctx); put_nfs_open_context(ctx); - if ((filp->f_flags & O_ACCMODE) != O_RDONLY) - nfs_fscache_disable_fh_cookie(inode); return 0; } @@ -592,7 +1218,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) dfprintk(PAGECACHE, "NFS: revalidating (%s/%Ld)\n", inode->i_sb->s_id, (long long)NFS_FILEID(inode)); - nfs_inc_stats(inode, NFSIOS_INODEREVALIDATE); lock_kernel(); if (!inode || is_bad_inode(inode)) goto out_nowait; @@ -606,7 +1231,7 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) status = -ESTALE; /* Do we trust the cached ESTALE? */ if (NFS_ATTRTIMEO(inode) != 0) { - if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME)) { + if (nfsi->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ATIME)) { /* no */ } else goto out; @@ -637,6 +1262,8 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) } spin_unlock(&inode->i_lock); + nfs_revalidate_mapping(inode, inode->i_mapping); + if (nfsi->cache_validity & NFS_INO_INVALID_ACL) nfs_zap_acl_cache(inode); @@ -670,7 +1297,8 @@ int nfs_attribute_timeout(struct inode *inode) */ int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) { - if (!(NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATTR) + nfs_inc_stats(inode, NFSIOS_INODEREVALIDATE); + if (!(NFS_I(inode)->cache_validity & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA)) && !nfs_attribute_timeout(inode)) return NFS_STALE(inode) ? -ESTALE : 0; return __nfs_revalidate_inode(server, inode); @@ -681,16 +1309,9 @@ int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode) * @inode - pointer to host inode * @mapping - pointer to mapping */ -int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) +void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) { struct nfs_inode *nfsi = NFS_I(inode); - int ret = 0; - - if (NFS_STALE(inode)) - ret = -ESTALE; - if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) - || nfs_attribute_timeout(inode)) - ret = __nfs_revalidate_inode(NFS_SERVER(inode), inode); if (nfsi->cache_validity & NFS_INO_INVALID_DATA) { nfs_inc_stats(inode, NFSIOS_DATAINVALIDATE); @@ -707,13 +1328,10 @@ int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping) } spin_unlock(&inode->i_lock); - nfs_fscache_renew_fh_cookie(NFS_SERVER(inode), nfsi); - dfprintk(PAGECACHE, "NFS: (%s/%Ld) data cache invalidated\n", inode->i_sb->s_id, (long long)NFS_FILEID(inode)); } - return ret; } /** @@ -753,6 +1371,12 @@ static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr) { struct nfs_inode *nfsi = NFS_I(inode); + if ((fattr->valid & NFS_ATTR_PRE_CHANGE) != 0 + && nfsi->change_attr == fattr->pre_change_attr) { + nfsi->change_attr = fattr->change_attr; + nfsi->cache_change_attribute = jiffies; + } + /* If we have atomic WCC data, we may update some attributes */ if ((fattr->valid & NFS_ATTR_WCC) != 0) { if (timespec_equal(&inode->i_ctime, &fattr->pre_ctime)) { @@ -789,6 +1413,9 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat xid_t xid; + if ((fattr->valid & NFS_ATTR_FATTR) == 0) + return 0; + /* Has the inode gone and changed behind our back? */ if (nfsi->fileid != fattr->fileid || (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) { @@ -801,13 +1428,20 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat /* Do atomic weak cache consistency updates */ nfs_wcc_update_inode(inode, fattr); - if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0 && - nfsi->change_attr != fattr->change_attr) - nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; + if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0) { + if (nfsi->change_attr == fattr->change_attr) + goto out; + nfsi->cache_validity |= NFS_INO_INVALID_ATTR; + if (!data_unstable) + nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE; + } /* Verify a few of the more important attributes */ - if (!timespec_equal(&inode->i_mtime, &fattr->mtime)) - nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; + if (!timespec_equal(&inode->i_mtime, &fattr->mtime)) { + nfsi->cache_validity |= NFS_INO_INVALID_ATTR; + if (!data_unstable) + nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE; + } cur_size = i_size_read(inode); new_isize = nfs_size_to_loff_t(fattr->size); @@ -829,6 +1463,7 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat if (inode->i_nlink != fattr->nlink) nfsi->cache_validity |= NFS_INO_INVALID_ATTR; +out: if (!timespec_equal(&inode->i_atime, &fattr->atime)) nfsi->cache_validity |= NFS_INO_INVALID_ATIME; @@ -854,6 +1489,7 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr) if ((fattr->valid & NFS_ATTR_FATTR) == 0) return 0; spin_lock(&inode->i_lock); + nfsi->cache_validity &= ~NFS_INO_REVAL_PAGECACHE; if (time_after(fattr->time_start, nfsi->last_updated)) status = nfs_update_inode(inode, fattr); else @@ -878,7 +1514,7 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr) spin_lock(&inode->i_lock); if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) { - nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; + nfsi->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; goto out; } status = nfs_update_inode(inode, fattr); @@ -901,7 +1537,6 @@ out: */ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) { - struct nfs_server *server; struct nfs_inode *nfsi = NFS_I(inode); loff_t cur_isize, new_isize; unsigned int invalid = 0; @@ -914,6 +1549,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) __FUNCTION__, inode->i_sb->s_id, inode->i_ino, atomic_read(&inode->i_count), fattr->valid); + if ((fattr->valid & NFS_ATTR_FATTR) == 0) + return 0; + if (nfsi->fileid != fattr->fileid) goto out_fileid; @@ -923,12 +1561,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) if ((inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) goto out_changed; - server = NFS_SERVER(inode); - /* Update the fsid if and only if this is the root directory */ - if (inode == inode->i_sb->s_root->d_inode - && !nfs_fsid_equal(&server->fsid, &fattr->fsid)) - server->fsid = fattr->fsid; - /* * Update the read time so we don't revalidate too often. */ @@ -938,7 +1570,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) /* Are we racing with known updates of the metadata on the server? */ data_stable = nfs_verify_change_attribute(inode, fattr->time_start); if (data_stable) - nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATIME); + nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ATIME); /* Do atomic weak cache consistency updates */ nfs_wcc_update_inode(inode, fattr); @@ -953,13 +1585,11 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) if (data_stable) { inode->i_size = new_isize; invalid |= NFS_INO_INVALID_DATA; - nfs_fscache_set_size(NFS_SERVER(inode), nfsi, inode->i_size); } invalid |= NFS_INO_INVALID_ATTR; } else if (new_isize > cur_isize) { inode->i_size = new_isize; invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; - nfs_fscache_set_size(NFS_SERVER(inode), nfsi, inode->i_size); } nfsi->cache_change_attribute = jiffies; dprintk("NFS: isize change on server for file %s/%ld\n", @@ -1004,17 +1634,21 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) * report the blocks in 512byte units */ inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used); + inode->i_blksize = inode->i_sb->s_blocksize; } else { inode->i_blocks = fattr->du.nfs2.blocks; + inode->i_blksize = fattr->du.nfs2.blocksize; } - if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0 && - nfsi->change_attr != fattr->change_attr) { - dprintk("NFS: change_attr change on server for file %s/%ld\n", - inode->i_sb->s_id, inode->i_ino); - nfsi->change_attr = fattr->change_attr; - invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; - nfsi->cache_change_attribute = jiffies; + if ((fattr->valid & NFS_ATTR_FATTR_V4)) { + if (nfsi->change_attr != fattr->change_attr) { + dprintk("NFS: change_attr change on server for file %s/%ld\n", + inode->i_sb->s_id, inode->i_ino); + nfsi->change_attr = fattr->change_attr; + invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; + nfsi->cache_change_attribute = jiffies; + } else + invalid &= ~(NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA); } /* Update attrtimeo value if we're out of the unstable period */ @@ -1057,20 +1691,195 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) out_fileid: printk(KERN_ERR "NFS: server %s error: fileid changed\n" "fsid %s: expected fileid 0x%Lx, got 0x%Lx\n", - NFS_SERVER(inode)->nfs_client->cl_hostname, inode->i_sb->s_id, + NFS_SERVER(inode)->hostname, inode->i_sb->s_id, (long long)nfsi->fileid, (long long)fattr->fileid); goto out_err; } +/* + * File system information + */ + +static int nfs_set_super(struct super_block *s, void *data) +{ + s->s_fs_info = data; + return set_anon_super(s, data); +} + +static int nfs_compare_super(struct super_block *sb, void *data) +{ + struct nfs_server *server = data; + struct nfs_server *old = NFS_SB(sb); + + if (old->addr.sin_addr.s_addr != server->addr.sin_addr.s_addr) + return 0; + if (old->addr.sin_port != server->addr.sin_port) + return 0; + return !nfs_compare_fh(&old->fh, &server->fh); +} + +static struct super_block *nfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *raw_data) +{ + int error; + struct nfs_server *server = NULL; + struct super_block *s; + struct nfs_fh *root; + struct nfs_mount_data *data = raw_data; + + s = ERR_PTR(-EINVAL); + if (data == NULL) { + dprintk("%s: missing data argument\n", __FUNCTION__); + goto out_err; + } + if (data->version <= 0 || data->version > NFS_MOUNT_VERSION) { + dprintk("%s: bad mount version\n", __FUNCTION__); + goto out_err; + } + switch (data->version) { + case 1: + data->namlen = 0; + case 2: + data->bsize = 0; + case 3: + if (data->flags & NFS_MOUNT_VER3) { + dprintk("%s: mount structure version %d does not support NFSv3\n", + __FUNCTION__, + data->version); + goto out_err; + } + data->root.size = NFS2_FHSIZE; + memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE); + case 4: + if (data->flags & NFS_MOUNT_SECFLAVOUR) { + dprintk("%s: mount structure version %d does not support strong security\n", + __FUNCTION__, + data->version); + goto out_err; + } + case 5: + memset(data->context, 0, sizeof(data->context)); + } +#ifndef CONFIG_NFS_V3 + /* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */ + s = ERR_PTR(-EPROTONOSUPPORT); + if (data->flags & NFS_MOUNT_VER3) { + dprintk("%s: NFSv3 not compiled into kernel\n", __FUNCTION__); + goto out_err; + } +#endif /* CONFIG_NFS_V3 */ + + s = ERR_PTR(-ENOMEM); + server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL); + if (!server) + goto out_err; + /* Zero out the NFS state stuff */ + init_nfsv4_state(server); + server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); + + root = &server->fh; + if (data->flags & NFS_MOUNT_VER3) + root->size = data->root.size; + else + root->size = NFS2_FHSIZE; + s = ERR_PTR(-EINVAL); + if (root->size > sizeof(root->data)) { + dprintk("%s: invalid root filehandle\n", __FUNCTION__); + goto out_err; + } + memcpy(root->data, data->root.data, root->size); + + /* We now require that the mount process passes the remote address */ + memcpy(&server->addr, &data->addr, sizeof(server->addr)); + if (server->addr.sin_addr.s_addr == INADDR_ANY) { + dprintk("%s: mount program didn't pass remote address!\n", + __FUNCTION__); + goto out_err; + } + + /* Fire up rpciod if not yet running */ + s = ERR_PTR(rpciod_up()); + if (IS_ERR(s)) { + dprintk("%s: couldn't start rpciod! Error = %ld\n", + __FUNCTION__, PTR_ERR(s)); + goto out_err; + } + + s = sget(fs_type, nfs_compare_super, nfs_set_super, server); + if (IS_ERR(s) || s->s_root) + goto out_rpciod_down; + + s->s_flags = flags; + + error = nfs_fill_super(s, data, flags & MS_SILENT ? 1 : 0); + if (error) { + up_write(&s->s_umount); + deactivate_super(s); + return ERR_PTR(error); + } + s->s_flags |= MS_ACTIVE; + return s; +out_rpciod_down: + rpciod_down(); +out_err: + kfree(server); + return s; +} + +static void nfs_kill_super(struct super_block *s) +{ + struct nfs_server *server = NFS_SB(s); + + kill_anon_super(s); + + if (!IS_ERR(server->client)) + rpc_shutdown_client(server->client); + if (!IS_ERR(server->client_sys)) + rpc_shutdown_client(server->client_sys); + if (!IS_ERR(server->client_acl)) + rpc_shutdown_client(server->client_acl); + + if (!(server->flags & NFS_MOUNT_NONLM)) + lockd_down(); /* release rpc.lockd */ + + rpciod_down(); /* release rpciod */ + + nfs_free_iostats(server->io_stats); + kfree(server->hostname); + kfree(server); +} + +static struct file_system_type nfs_fs_type = { + .owner = THIS_MODULE, + .name = "nfs", + .get_sb = nfs_get_sb, + .kill_sb = nfs_kill_super, + .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, +}; #ifdef CONFIG_NFS_V4 +static void nfs4_clear_inode(struct inode *); + + +static struct super_operations nfs4_sops = { + .alloc_inode = nfs_alloc_inode, + .destroy_inode = nfs_destroy_inode, + .write_inode = nfs_write_inode, + .delete_inode = nfs_delete_inode, + .statfs = nfs_statfs, + .clear_inode = nfs4_clear_inode, + .umount_begin = nfs_umount_begin, + .show_options = nfs_show_options, + .show_stats = nfs_show_stats, +}; + /* * Clean out any remaining NFSv4 state that might be left over due * to open() calls that passed nfs_atomic_lookup, but failed to call * nfs_open(). */ -void nfs4_clear_inode(struct inode *inode) +static void nfs4_clear_inode(struct inode *inode) { struct nfs_inode *nfsi = NFS_I(inode); @@ -1094,9 +1903,357 @@ void nfs4_clear_inode(struct inode *inode) nfs4_close_state(state, state->state); } } + + +static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data, int silent) +{ + struct nfs_server *server; + struct nfs4_client *clp = NULL; + struct rpc_xprt *xprt = NULL; + struct rpc_clnt *clnt = NULL; + struct rpc_timeout timeparms; + rpc_authflavor_t authflavour; + int err = -EIO; + + sb->s_blocksize_bits = 0; + sb->s_blocksize = 0; + server = NFS_SB(sb); + if (data->rsize != 0) + server->rsize = nfs_block_size(data->rsize, NULL); + if (data->wsize != 0) + server->wsize = nfs_block_size(data->wsize, NULL); + server->flags = data->flags & NFS_MOUNT_FLAGMASK; + server->caps = NFS_CAP_ATOMIC_OPEN; + + server->acregmin = data->acregmin*HZ; + server->acregmax = data->acregmax*HZ; + server->acdirmin = data->acdirmin*HZ; + server->acdirmax = data->acdirmax*HZ; + + server->rpc_ops = &nfs_v4_clientops; + + nfs_init_timeout_values(&timeparms, data->proto, data->timeo, data->retrans); + + server->retrans_timeo = timeparms.to_initval; + server->retrans_count = timeparms.to_retries; + + clp = nfs4_get_client(&server->addr.sin_addr); + if (!clp) { + dprintk("%s: failed to create NFS4 client.\n", __FUNCTION__); + return -EIO; + } + + /* Now create transport and client */ + authflavour = RPC_AUTH_UNIX; + if (data->auth_flavourlen != 0) { + if (data->auth_flavourlen != 1) { + dprintk("%s: Invalid number of RPC auth flavours %d.\n", + __FUNCTION__, data->auth_flavourlen); + err = -EINVAL; + goto out_fail; + } + if (copy_from_user(&authflavour, data->auth_flavours, sizeof(authflavour))) { + err = -EFAULT; + goto out_fail; + } + } + + down_write(&clp->cl_sem); + if (IS_ERR(clp->cl_rpcclient)) { + xprt = xprt_create_proto(data->proto, &server->addr, &timeparms); + if (IS_ERR(xprt)) { + up_write(&clp->cl_sem); + err = PTR_ERR(xprt); + dprintk("%s: cannot create RPC transport. Error = %d\n", + __FUNCTION__, err); + goto out_fail; + } + clnt = rpc_create_client(xprt, server->hostname, &nfs_program, + server->rpc_ops->version, authflavour); + if (IS_ERR(clnt)) { + up_write(&clp->cl_sem); + err = PTR_ERR(clnt); + dprintk("%s: cannot create RPC client. Error = %d\n", + __FUNCTION__, err); + goto out_fail; + } + clnt->cl_intr = 1; + clnt->cl_softrtry = 1; + clp->cl_rpcclient = clnt; + memcpy(clp->cl_ipaddr, server->ip_addr, sizeof(clp->cl_ipaddr)); + nfs_idmap_new(clp); + } + list_add_tail(&server->nfs4_siblings, &clp->cl_superblocks); + clnt = rpc_clone_client(clp->cl_rpcclient); + if (!IS_ERR(clnt)) + server->nfs4_state = clp; + up_write(&clp->cl_sem); + clp = NULL; + + if (IS_ERR(clnt)) { + err = PTR_ERR(clnt); + dprintk("%s: cannot create RPC client. Error = %d\n", + __FUNCTION__, err); + return err; + } + + server->client = clnt; + + if (server->nfs4_state->cl_idmap == NULL) { + dprintk("%s: failed to create idmapper.\n", __FUNCTION__); + return -ENOMEM; + } + + if (clnt->cl_auth->au_flavor != authflavour) { + struct rpc_auth *auth; + + auth = rpcauth_create(authflavour, clnt); + if (IS_ERR(auth)) { + dprintk("%s: couldn't create credcache!\n", __FUNCTION__); + return PTR_ERR(auth); + } + } + + sb->s_time_gran = 1; + + sb->s_op = &nfs4_sops; + err = nfs_sb_init(sb, authflavour); + if (err == 0) + return 0; +out_fail: + if (clp) + nfs4_put_client(clp); + return err; +} + +static int nfs4_compare_super(struct super_block *sb, void *data) +{ + struct nfs_server *server = data; + struct nfs_server *old = NFS_SB(sb); + + if (strcmp(server->hostname, old->hostname) != 0) + return 0; + if (strcmp(server->mnt_path, old->mnt_path) != 0) + return 0; + return 1; +} + +static void * +nfs_copy_user_string(char *dst, struct nfs_string *src, int maxlen) +{ + void *p = NULL; + + if (!src->len) + return ERR_PTR(-EINVAL); + if (src->len < maxlen) + maxlen = src->len; + if (dst == NULL) { + p = dst = kmalloc(maxlen + 1, GFP_KERNEL); + if (p == NULL) + return ERR_PTR(-ENOMEM); + } + if (copy_from_user(dst, src->data, maxlen)) { + kfree(p); + return ERR_PTR(-EFAULT); + } + dst[maxlen] = '\0'; + return dst; +} + +static struct super_block *nfs4_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *raw_data) +{ + int error; + struct nfs_server *server; + struct super_block *s; + struct nfs4_mount_data *data = raw_data; + void *p; + + if (data == NULL) { + dprintk("%s: missing data argument\n", __FUNCTION__); + return ERR_PTR(-EINVAL); + } + if (data->version <= 0 || data->version > NFS4_MOUNT_VERSION) { + dprintk("%s: bad mount version\n", __FUNCTION__); + return ERR_PTR(-EINVAL); + } + + server = kzalloc(sizeof(struct nfs_server), GFP_KERNEL); + if (!server) + return ERR_PTR(-ENOMEM); + /* Zero out the NFS state stuff */ + init_nfsv4_state(server); + server->client = server->client_sys = server->client_acl = ERR_PTR(-EINVAL); + + p = nfs_copy_user_string(NULL, &data->hostname, 256); + if (IS_ERR(p)) + goto out_err; + server->hostname = p; + + p = nfs_copy_user_string(NULL, &data->mnt_path, 1024); + if (IS_ERR(p)) + goto out_err; + server->mnt_path = p; + + p = nfs_copy_user_string(server->ip_addr, &data->client_addr, + sizeof(server->ip_addr) - 1); + if (IS_ERR(p)) + goto out_err; + + /* We now require that the mount process passes the remote address */ + if (data->host_addrlen != sizeof(server->addr)) { + s = ERR_PTR(-EINVAL); + goto out_free; + } + if (copy_from_user(&server->addr, data->host_addr, sizeof(server->addr))) { + s = ERR_PTR(-EFAULT); + goto out_free; + } + if (server->addr.sin_family != AF_INET || + server->addr.sin_addr.s_addr == INADDR_ANY) { + dprintk("%s: mount program didn't pass remote IP address!\n", + __FUNCTION__); + s = ERR_PTR(-EINVAL); + goto out_free; + } + + /* Fire up rpciod if not yet running */ + s = ERR_PTR(rpciod_up()); + if (IS_ERR(s)) { + dprintk("%s: couldn't start rpciod! Error = %ld\n", + __FUNCTION__, PTR_ERR(s)); + goto out_free; + } + + s = sget(fs_type, nfs4_compare_super, nfs_set_super, server); + + if (IS_ERR(s) || s->s_root) + goto out_free; + + s->s_flags = flags; + + error = nfs4_fill_super(s, data, flags & MS_SILENT ? 1 : 0); + if (error) { + up_write(&s->s_umount); + deactivate_super(s); + return ERR_PTR(error); + } + s->s_flags |= MS_ACTIVE; + return s; +out_err: + s = (struct super_block *)p; +out_free: + kfree(server->mnt_path); + kfree(server->hostname); + kfree(server); + return s; +} + +static void nfs4_kill_super(struct super_block *sb) +{ + struct nfs_server *server = NFS_SB(sb); + + nfs_return_all_delegations(sb); + kill_anon_super(sb); + + nfs4_renewd_prepare_shutdown(server); + + if (server->client != NULL && !IS_ERR(server->client)) + rpc_shutdown_client(server->client); + + destroy_nfsv4_state(server); + + rpciod_down(); + + nfs_free_iostats(server->io_stats); + kfree(server->hostname); + kfree(server); +} + +static struct file_system_type nfs4_fs_type = { + .owner = THIS_MODULE, + .name = "nfs4", + .get_sb = nfs4_get_sb, + .kill_sb = nfs4_kill_super, + .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, +}; + +static const int nfs_set_port_min = 0; +static const int nfs_set_port_max = 65535; +static int param_set_port(const char *val, struct kernel_param *kp) +{ + char *endp; + int num = simple_strtol(val, &endp, 0); + if (endp == val || *endp || num < nfs_set_port_min || num > nfs_set_port_max) + return -EINVAL; + *((int *)kp->arg) = num; + return 0; +} + +module_param_call(callback_tcpport, param_set_port, param_get_int, + &nfs_callback_set_tcpport, 0644); + +static int param_set_idmap_timeout(const char *val, struct kernel_param *kp) +{ + char *endp; + int num = simple_strtol(val, &endp, 0); + int jif = num * HZ; + if (endp == val || *endp || num < 0 || jif < num) + return -EINVAL; + *((int *)kp->arg) = jif; + return 0; +} + +module_param_call(idmap_cache_timeout, param_set_idmap_timeout, param_get_int, + &nfs_idmap_cache_timeout, 0644); + +#define nfs4_init_once(nfsi) \ + do { \ + INIT_LIST_HEAD(&(nfsi)->open_states); \ + nfsi->delegation = NULL; \ + nfsi->delegation_state = 0; \ + init_rwsem(&nfsi->rwsem); \ + } while(0) + +static inline int register_nfs4fs(void) +{ + int ret; + + ret = nfs_register_sysctl(); + if (ret != 0) + return ret; + ret = register_filesystem(&nfs4_fs_type); + if (ret != 0) + nfs_unregister_sysctl(); + return ret; +} + +static inline void unregister_nfs4fs(void) +{ + unregister_filesystem(&nfs4_fs_type); + nfs_unregister_sysctl(); +} +#else +#define nfs4_init_once(nfsi) \ + do { } while (0) +#define register_nfs4fs() (0) +#define unregister_nfs4fs() #endif -struct inode *nfs_alloc_inode(struct super_block *sb) +extern int nfs_init_nfspagecache(void); +extern void nfs_destroy_nfspagecache(void); +extern int nfs_init_readpagecache(void); +extern void nfs_destroy_readpagecache(void); +extern int nfs_init_writepagecache(void); +extern void nfs_destroy_writepagecache(void); +#ifdef CONFIG_NFS_DIRECTIO +extern int nfs_init_directcache(void); +extern void nfs_destroy_directcache(void); +#endif + +static kmem_cache_t * nfs_inode_cachep; + +static struct inode *nfs_alloc_inode(struct super_block *sb) { struct nfs_inode *nfsi; nfsi = (struct nfs_inode *)kmem_cache_alloc(nfs_inode_cachep, SLAB_KERNEL); @@ -1115,21 +2272,11 @@ struct inode *nfs_alloc_inode(struct super_block *sb) return &nfsi->vfs_inode; } -void nfs_destroy_inode(struct inode *inode) +static void nfs_destroy_inode(struct inode *inode) { kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); } -static inline void nfs4_init_once(struct nfs_inode *nfsi) -{ -#ifdef CONFIG_NFS_V4 - INIT_LIST_HEAD(&nfsi->open_states); - nfsi->delegation = NULL; - nfsi->delegation_state = 0; - init_rwsem(&nfsi->rwsem); -#endif -} - static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) { struct nfs_inode *nfsi = (struct nfs_inode *) foo; @@ -1150,7 +2297,7 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) } } -static int __init nfs_init_inodecache(void) +static int nfs_init_inodecache(void) { nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", sizeof(struct nfs_inode), @@ -1176,14 +2323,6 @@ static int __init init_nfs_fs(void) { int err; - err = nfs_fscache_register(); - if (err < 0) - goto out6; - - err = nfs_fs_proc_init(); - if (err) - goto out5; - err = nfs_init_nfspagecache(); if (err) goto out4; @@ -1200,22 +2339,29 @@ static int __init init_nfs_fs(void) if (err) goto out1; +#ifdef CONFIG_NFS_DIRECTIO err = nfs_init_directcache(); if (err) goto out0; +#endif #ifdef CONFIG_PROC_FS rpc_proc_register(&nfs_rpcstat); #endif - if ((err = register_nfs_fs()) != 0) + err = register_filesystem(&nfs_fs_type); + if (err) + goto out; + if ((err = register_nfs4fs()) != 0) goto out; return 0; out: #ifdef CONFIG_PROC_FS rpc_proc_unregister("nfs"); #endif +#ifdef CONFIG_NFS_DIRECTIO nfs_destroy_directcache(); out0: +#endif nfs_destroy_writepagecache(); out1: nfs_destroy_readpagecache(); @@ -1224,26 +2370,23 @@ out2: out3: nfs_destroy_nfspagecache(); out4: - nfs_fs_proc_exit(); -out5: - nfs_fscache_unregister(); -out6: return err; } static void __exit exit_nfs_fs(void) { +#ifdef CONFIG_NFS_DIRECTIO nfs_destroy_directcache(); +#endif nfs_destroy_writepagecache(); nfs_destroy_readpagecache(); nfs_destroy_inodecache(); nfs_destroy_nfspagecache(); - nfs_fscache_unregister(); #ifdef CONFIG_PROC_FS rpc_proc_unregister("nfs"); #endif - unregister_nfs_fs(); - nfs_fs_proc_exit(); + unregister_filesystem(&nfs_fs_type); + unregister_nfs4fs(); } /* Not quite true; I just maintain it */ diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h deleted file mode 100644 index 18febb4c2..000000000 --- a/fs/nfs/internal.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * NFS internal definitions - */ - -#include - -#define NFS_PAGE_WRITING 0 -#define NFS_PAGE_CACHED 1 - -#define PageNfsBit(bit, page) test_bit(bit, &(page)->private) - -#define SetPageNfsBit(bit, page) \ -do { \ - SetPagePrivate((page)); \ - set_bit(bit, &(page)->private); \ -} while(0) - -#define ClearPageNfsBit(bit, page) \ -do { \ - clear_bit(bit, &(page)->private); \ -} while(0) - -#define PageNfsWriting(page) PageNfsBit(NFS_PAGE_WRITING, (page)) -#define SetPageNfsWriting(page) SetPageNfsBit(NFS_PAGE_WRITING, (page)) -#define ClearPageNfsWriting(page) ClearPageNfsBit(NFS_PAGE_WRITING, (page)) - -#define PageNfsCached(page) PageNfsBit(NFS_PAGE_CACHED, (page)) -#define SetPageNfsCached(page) SetPageNfsBit(NFS_PAGE_CACHED, (page)) -#define ClearPageNfsCached(page) ClearPageNfsBit(NFS_PAGE_CACHED, (page)) - -struct nfs_string; -struct nfs_mount_data; -struct nfs4_mount_data; - -/* Maximum number of readahead requests - * FIXME: this should really be a sysctl so that users may tune it to suit - * their needs. People that do NFS over a slow network, might for - * instance want to reduce it to something closer to 1 for improved - * interactive response. - */ -#define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) - -struct nfs_clone_mount { - const struct super_block *sb; - const struct dentry *dentry; - struct nfs_fh *fh; - struct nfs_fattr *fattr; - char *hostname; - char *mnt_path; - struct sockaddr_in *addr; - rpc_authflavor_t authflavor; -}; - -/* - * include filesystem caching stuff here - */ -#include "fscache.h" - -/* client.c */ -extern struct rpc_program nfs_program; - -extern void nfs_put_client(struct nfs_client *); -extern struct nfs_client *nfs_find_client(const struct sockaddr_in *, int); -extern struct nfs_server *nfs_create_server(const struct nfs_mount_data *, - struct nfs_fh *); -extern struct nfs_server *nfs4_create_server(const struct nfs4_mount_data *, - const char *, - const struct sockaddr_in *, - const char *, - const char *, - rpc_authflavor_t, - struct nfs_fh *); -extern struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *, - struct nfs_fh *); -extern void nfs_free_server(struct nfs_server *server); -extern struct nfs_server *nfs_clone_server(struct nfs_server *, - struct nfs_fh *, - struct nfs_fattr *); -#ifdef CONFIG_PROC_FS -extern int __init nfs_fs_proc_init(void); -extern void nfs_fs_proc_exit(void); -#else -static inline int nfs_fs_proc_init(void) -{ - return 0; -} -static inline void nfs_fs_proc_exit(void) -{ -} -#endif - -/* nfs4namespace.c */ -#ifdef CONFIG_NFS_V4 -extern struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry); -#else -static inline -struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry) -{ - return ERR_PTR(-ENOENT); -} -#endif - -/* callback_xdr.c */ -extern struct svc_version nfs4_callback_version1; - -/* pagelist.c */ -extern int __init nfs_init_nfspagecache(void); -extern void nfs_destroy_nfspagecache(void); -extern int __init nfs_init_readpagecache(void); -extern void nfs_destroy_readpagecache(void); -extern int __init nfs_init_writepagecache(void); -extern void nfs_destroy_writepagecache(void); - -#ifdef CONFIG_NFS_DIRECTIO -extern int __init nfs_init_directcache(void); -extern void nfs_destroy_directcache(void); -#else -#define nfs_init_directcache() (0) -#define nfs_destroy_directcache() do {} while(0) -#endif - -/* nfs2xdr.c */ -extern int nfs_stat_to_errno(int); -extern struct rpc_procinfo nfs_procedures[]; -extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int); - -/* nfs3xdr.c */ -extern struct rpc_procinfo nfs3_procedures[]; -extern u32 *nfs3_decode_dirent(u32 *, struct nfs_entry *, int); - -/* nfs4xdr.c */ -#ifdef CONFIG_NFS_V4 -extern u32 *nfs4_decode_dirent(u32 *p, struct nfs_entry *entry, int plus); -#endif - -/* nfs4proc.c */ -#ifdef CONFIG_NFS_V4 -extern struct rpc_procinfo nfs4_procedures[]; - -extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, - struct nfs4_fs_locations *fs_locations, - struct page *page); -#endif - -/* inode.c */ -extern struct inode *nfs_alloc_inode(struct super_block *sb); -extern void nfs_destroy_inode(struct inode *); -extern int nfs_write_inode(struct inode *,int); -extern void nfs_clear_inode(struct inode *); -#ifdef CONFIG_NFS_V4 -extern void nfs4_clear_inode(struct inode *); -#endif - -/* super.c */ -extern struct file_system_type nfs_xdev_fs_type; -#ifdef CONFIG_NFS_V4 -extern struct file_system_type nfs4_xdev_fs_type; -extern struct file_system_type nfs4_referral_fs_type; -#endif - -extern struct rpc_stat nfs_rpcstat; - -extern int __init register_nfs_fs(void); -extern void __exit unregister_nfs_fs(void); - -/* namespace.c */ -extern char *nfs_path(const char *base, - const struct dentry *droot, - const struct dentry *dentry, - char *buffer, ssize_t buflen); - -/* getroot.c */ -extern struct dentry *nfs_get_root(struct super_block *, struct nfs_fh *); -#ifdef CONFIG_NFS_V4 -extern struct dentry *nfs4_get_root(struct super_block *, struct nfs_fh *); - -extern int nfs4_path_walk(struct nfs_server *server, - struct nfs_fh *mntfh, - const char *path); -#endif - -/* read.c */ -extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, struct page *); - -/* - * Determine the device name as a string - */ -static inline char *nfs_devname(const struct vfsmount *mnt_parent, - const struct dentry *dentry, - char *buffer, ssize_t buflen) -{ - return nfs_path(mnt_parent->mnt_devname, mnt_parent->mnt_root, - dentry, buffer, buflen); -} - -/* - * Determine the actual block size (and log2 thereof) - */ -static inline -unsigned long nfs_block_bits(unsigned long bsize, unsigned char *nrbitsp) -{ - /* make sure blocksize is a power of two */ - if ((bsize & (bsize - 1)) || nrbitsp) { - unsigned char nrbits; - - for (nrbits = 31; nrbits && !(bsize & (1 << nrbits)); nrbits--) - ; - bsize = 1 << nrbits; - if (nrbitsp) - *nrbitsp = nrbits; - } - - return bsize; -} - -/* - * Calculate the number of 512byte blocks used. - */ -static inline unsigned long nfs_calc_block_size(u64 tsize) -{ - loff_t used = (tsize + 511) >> 9; - return (used > ULONG_MAX) ? ULONG_MAX : used; -} - -/* - * Compute and set NFS server blocksize - */ -static inline -unsigned long nfs_block_size(unsigned long bsize, unsigned char *nrbitsp) -{ - if (bsize < NFS_MIN_FILE_IO_SIZE) - bsize = NFS_DEF_FILE_IO_SIZE; - else if (bsize >= NFS_MAX_FILE_IO_SIZE) - bsize = NFS_MAX_FILE_IO_SIZE; - - return nfs_block_bits(bsize, nrbitsp); -} - -/* - * Determine the maximum file size for a superblock - */ -static inline -void nfs_super_set_maxbytes(struct super_block *sb, __u64 maxfilesize) -{ - sb->s_maxbytes = (loff_t)maxfilesize; - if (sb->s_maxbytes > MAX_LFS_FILESIZE || sb->s_maxbytes <= 0) - sb->s_maxbytes = MAX_LFS_FILESIZE; -} diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index ed88119e5..445abb4d4 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -91,7 +91,6 @@ mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version, clnt->cl_softrtry = 1; clnt->cl_oneshot = 1; clnt->cl_intr = 1; - clnt->cl_tagxid = 1; } return clnt; } diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c deleted file mode 100644 index f4763c181..000000000 --- a/fs/nfs/namespace.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * linux/fs/nfs/namespace.c - * - * Copyright (C) 2005 Trond Myklebust - * - Modified by David Howells - * - * NFS namespace - */ - -#include -#include -#include -#include -#include -#include -#include -#include "internal.h" - -#define NFSDBG_FACILITY NFSDBG_VFS - -static void nfs_expire_automounts(void *list); - -LIST_HEAD(nfs_automount_list); -static DECLARE_WORK(nfs_automount_task, nfs_expire_automounts, &nfs_automount_list); -int nfs_mountpoint_expiry_timeout = 500 * HZ; - -/* - * nfs_path - reconstruct the path given an arbitrary dentry - * @base - arbitrary string to prepend to the path - * @droot - pointer to root dentry for mountpoint - * @dentry - pointer to dentry - * @buffer - result buffer - * @buflen - length of buffer - * - * Helper function for constructing the path from the - * root dentry to an arbitrary hashed dentry. - * - * This is mainly for use in figuring out the path on the - * server side when automounting on top of an existing partition. - */ -char *nfs_path(const char *base, - const struct dentry *droot, - const struct dentry *dentry, - char *buffer, ssize_t buflen) -{ - char *end = buffer+buflen; - int namelen; - - *--end = '\0'; - buflen--; - spin_lock(&dcache_lock); - while (!IS_ROOT(dentry) && dentry != droot) { - namelen = dentry->d_name.len; - buflen -= namelen + 1; - if (buflen < 0) - goto Elong_unlock; - end -= namelen; - memcpy(end, dentry->d_name.name, namelen); - *--end = '/'; - dentry = dentry->d_parent; - } - spin_unlock(&dcache_lock); - namelen = strlen(base); - /* Strip off excess slashes in base string */ - while (namelen > 0 && base[namelen - 1] == '/') - namelen--; - buflen -= namelen; - if (buflen < 0) - goto Elong; - end -= namelen; - memcpy(end, base, namelen); - return end; -Elong_unlock: - spin_unlock(&dcache_lock); -Elong: - return ERR_PTR(-ENAMETOOLONG); -} - -/* - * nfs_follow_mountpoint - handle crossing a mountpoint on the server - * @dentry - dentry of mountpoint - * @nd - nameidata info - * - * When we encounter a mountpoint on the server, we want to set up - * a mountpoint on the client too, to prevent inode numbers from - * colliding, and to allow "df" to work properly. - * On NFSv4, we also want to allow for the fact that different - * filesystems may be migrated to different servers in a failover - * situation, and that different filesystems may want to use - * different security flavours. - */ -static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) -{ - struct vfsmount *mnt; - struct nfs_server *server = NFS_SERVER(dentry->d_inode); - struct dentry *parent; - struct nfs_fh fh; - struct nfs_fattr fattr; - int err; - - dprintk("--> nfs_follow_mountpoint()\n"); - - BUG_ON(IS_ROOT(dentry)); - dprintk("%s: enter\n", __FUNCTION__); - dput(nd->dentry); - nd->dentry = dget(dentry); - - /* Look it up again */ - parent = dget_parent(nd->dentry); - err = server->nfs_client->rpc_ops->lookup(parent->d_inode, - &nd->dentry->d_name, - &fh, &fattr); - dput(parent); - if (err != 0) - goto out_err; - - if (fattr.valid & NFS_ATTR_FATTR_V4_REFERRAL) - mnt = nfs_do_refmount(nd->mnt, nd->dentry); - else - mnt = nfs_do_submount(nd->mnt, nd->dentry, &fh, &fattr); - err = PTR_ERR(mnt); - if (IS_ERR(mnt)) - goto out_err; - - mntget(mnt); - err = do_add_mount(mnt, nd, nd->mnt->mnt_flags|MNT_SHRINKABLE, &nfs_automount_list); - if (err < 0) { - mntput(mnt); - if (err == -EBUSY) - goto out_follow; - goto out_err; - } - mntput(nd->mnt); - dput(nd->dentry); - nd->mnt = mnt; - nd->dentry = dget(mnt->mnt_root); - schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); -out: - dprintk("%s: done, returned %d\n", __FUNCTION__, err); - - dprintk("<-- nfs_follow_mountpoint() = %d\n", err); - return ERR_PTR(err); -out_err: - path_release(nd); - goto out; -out_follow: - while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry)) - ; - err = 0; - goto out; -} - -struct inode_operations nfs_mountpoint_inode_operations = { - .follow_link = nfs_follow_mountpoint, - .getattr = nfs_getattr, -}; - -struct inode_operations nfs_referral_inode_operations = { - .follow_link = nfs_follow_mountpoint, -}; - -static void nfs_expire_automounts(void *data) -{ - struct list_head *list = (struct list_head *)data; - - mark_mounts_for_expiry(list); - if (!list_empty(list)) - schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); -} - -void nfs_release_automount_timer(void) -{ - if (list_empty(&nfs_automount_list)) { - cancel_delayed_work(&nfs_automount_task); - flush_scheduled_work(); - } -} - -/* - * Clone a mountpoint of the appropriate type - */ -static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server, - const char *devname, - struct nfs_clone_mount *mountdata) -{ -#ifdef CONFIG_NFS_V4 - struct vfsmount *mnt = NULL; - switch (server->nfs_client->cl_nfsversion) { - case 2: - case 3: - mnt = vfs_kern_mount(&nfs_xdev_fs_type, 0, devname, mountdata); - break; - case 4: - mnt = vfs_kern_mount(&nfs4_xdev_fs_type, 0, devname, mountdata); - } - return mnt; -#else - return vfs_kern_mount(&nfs_xdev_fs_type, 0, devname, mountdata); -#endif -} - -/** - * nfs_do_submount - set up mountpoint when crossing a filesystem boundary - * @mnt_parent - mountpoint of parent directory - * @dentry - parent directory - * @fh - filehandle for new root dentry - * @fattr - attributes for new root inode - * - */ -struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, - const struct dentry *dentry, struct nfs_fh *fh, - struct nfs_fattr *fattr) -{ - struct nfs_clone_mount mountdata = { - .sb = mnt_parent->mnt_sb, - .dentry = dentry, - .fh = fh, - .fattr = fattr, - }; - struct vfsmount *mnt = ERR_PTR(-ENOMEM); - char *page = (char *) __get_free_page(GFP_USER); - char *devname; - - dprintk("--> nfs_do_submount()\n"); - - dprintk("%s: submounting on %s/%s\n", __FUNCTION__, - dentry->d_parent->d_name.name, - dentry->d_name.name); - if (page == NULL) - goto out; - devname = nfs_devname(mnt_parent, dentry, page, PAGE_SIZE); - mnt = (struct vfsmount *)devname; - if (IS_ERR(devname)) - goto free_page; - mnt = nfs_do_clone_mount(NFS_SB(mnt_parent->mnt_sb), devname, &mountdata); -free_page: - free_page((unsigned long)page); -out: - dprintk("%s: done\n", __FUNCTION__); - - dprintk("<-- nfs_do_submount() = %p\n", mnt); - return mnt; -} diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 67391eef6..f0015fa87 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -23,11 +23,12 @@ #include #include #include -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_XDR /* #define NFS_PARANOIA 1 */ +extern int nfs_stat_to_errno(int stat); + /* Mapping from NFS error code to "errno" error code. */ #define errno_NFSERR_IO EIO @@ -130,8 +131,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) fattr->du.nfs2.blocksize = ntohl(*p++); rdev = ntohl(*p++); fattr->du.nfs2.blocks = ntohl(*p++); - fattr->fsid.major = ntohl(*p++); - fattr->fsid.minor = 0; + fattr->fsid_u.nfs3 = ntohl(*p++); fattr->fileid = ntohl(*p++); p = xdr_decode_time(p, &fattr->atime); p = xdr_decode_time(p, &fattr->mtime); diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 7322da4d2..33287879b 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -172,10 +172,8 @@ static void nfs3_cache_acls(struct inode *inode, struct posix_acl *acl, inode->i_ino, acl, dfacl); spin_lock(&inode->i_lock); __nfs3_forget_cached_acls(NFS_I(inode)); - if (!IS_ERR(acl)) - nfsi->acl_access = posix_acl_dup(acl); - if (!IS_ERR(dfacl)) - nfsi->acl_default = posix_acl_dup(dfacl); + nfsi->acl_access = posix_acl_dup(acl); + nfsi->acl_default = posix_acl_dup(dfacl); spin_unlock(&inode->i_lock); } @@ -256,9 +254,7 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type) res.acl_access = NULL; } } - nfs3_cache_acls(inode, - (res.mask & NFS_ACL) ? res.acl_access : ERR_PTR(-EINVAL), - (res.mask & NFS_DFACL) ? res.acl_default : ERR_PTR(-EINVAL)); + nfs3_cache_acls(inode, res.acl_access, res.acl_default); switch(type) { case ACL_TYPE_ACCESS: @@ -333,7 +329,6 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, switch (status) { case 0: status = nfs_refresh_inode(inode, &fattr); - nfs3_cache_acls(inode, acl, dfacl); break; case -EPFNOSUPPORT: case -EPROTONOSUPPORT: diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 9e8258ece..cf186f0d2 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c @@ -20,10 +20,11 @@ #include #include "iostat.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_PROC +extern struct rpc_procinfo nfs3_procedures[]; + /* A wrapper to handle the EJUKEBOX error message */ static int nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) @@ -81,7 +82,7 @@ do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle, } /* - * Bare-bones access to getattr: this is for nfs_get_root/nfs_get_sb + * Bare-bones access to getattr: this is for nfs_read_super. */ static int nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, @@ -90,8 +91,8 @@ nfs3_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, int status; status = do_proc_get_root(server->client, fhandle, info); - if (status && server->nfs_client->cl_rpcclient != server->client) - status = do_proc_get_root(server->nfs_client->cl_rpcclient, fhandle, info); + if (status && server->client_sys != server->client) + status = do_proc_get_root(server->client_sys, fhandle, info); return status; } @@ -785,7 +786,7 @@ nfs3_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, dprintk("NFS call fsinfo\n"); nfs_fattr_init(info->fattr); - status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); + status = rpc_call_sync(server->client_sys, &msg, 0); dprintk("NFS reply fsinfo: %d\n", status); return status; } @@ -808,6 +809,8 @@ nfs3_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle, return status; } +extern u32 *nfs3_decode_dirent(u32 *, struct nfs_entry *, int); + static int nfs3_read_done(struct rpc_task *task, struct nfs_read_data *data) { if (nfs3_async_handle_jukebox(task, data->inode)) @@ -886,7 +889,7 @@ nfs3_proc_lock(struct file *filp, int cmd, struct file_lock *fl) return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl); } -const struct nfs_rpc_ops nfs_v3_clientops = { +struct nfs_rpc_ops nfs_v3_clientops = { .version = 3, /* protocol version */ .dentry_ops = &nfs_dentry_operations, .dir_inode_ops = &nfs3_dir_inode_operations, diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 442d8c4bb..884969461 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c @@ -23,13 +23,14 @@ #include #include #include -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_XDR /* Mapping from NFS error code to "errno" error code. */ #define errno_NFSERR_IO EIO +extern int nfs_stat_to_errno(int); + /* * Declare the space requirements for NFS arguments and replies as * number of 32bit-words @@ -166,8 +167,7 @@ xdr_decode_fattr(u32 *p, struct nfs_fattr *fattr) if (MAJOR(fattr->rdev) != major || MINOR(fattr->rdev) != minor) fattr->rdev = 0; - p = xdr_decode_hyper(p, &fattr->fsid.major); - fattr->fsid.minor = 0; + p = xdr_decode_hyper(p, &fattr->fsid_u.nfs3); p = xdr_decode_hyper(p, &fattr->fileid); p = xdr_decode_time3(p, &fattr->atime); p = xdr_decode_time3(p, &fattr->mtime); diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 61095fe4b..0f5e4e7cd 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -42,6 +42,55 @@ enum nfs4_client_state { NFS4CLNT_LEASE_EXPIRED, }; +/* + * The nfs4_client identifies our client state to the server. + */ +struct nfs4_client { + struct list_head cl_servers; /* Global list of servers */ + struct in_addr cl_addr; /* Server identifier */ + u64 cl_clientid; /* constant */ + nfs4_verifier cl_confirm; + unsigned long cl_state; + + u32 cl_lockowner_id; + + /* + * The following rwsem ensures exclusive access to the server + * while we recover the state following a lease expiration. + */ + struct rw_semaphore cl_sem; + + struct list_head cl_delegations; + struct list_head cl_state_owners; + struct list_head cl_unused; + int cl_nunused; + spinlock_t cl_lock; + atomic_t cl_count; + + struct rpc_clnt * cl_rpcclient; + + struct list_head cl_superblocks; /* List of nfs_server structs */ + + unsigned long cl_lease_time; + unsigned long cl_last_renewal; + struct work_struct cl_renewd; + struct work_struct cl_recoverd; + + struct rpc_wait_queue cl_rpcwaitq; + + /* used for the setclientid verifier */ + struct timespec cl_boot_time; + + /* idmapper */ + struct idmap * cl_idmap; + + /* Our own IP address, as a null-terminated string. + * This is used to generate the clientid, and the callback address. + */ + char cl_ipaddr[16]; + unsigned char cl_id_uniquifier; +}; + /* * struct rpc_sequence ensures that RPC calls are sent in the exact * order that they appear on the list. @@ -78,7 +127,7 @@ static inline void nfs_confirm_seqid(struct nfs_seqid_counter *seqid, int status struct nfs4_state_owner { spinlock_t so_lock; struct list_head so_list; /* per-clientid list of state_owners */ - struct nfs_client *so_client; + struct nfs4_client *so_client; u32 so_id; /* 32-bit identifier, unique */ atomic_t so_count; @@ -161,16 +210,13 @@ extern ssize_t nfs4_listxattr(struct dentry *, char *, size_t); /* nfs4proc.c */ extern int nfs4_map_errors(int err); -extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *); -extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct rpc_cred *); -extern int nfs4_proc_async_renew(struct nfs_client *, struct rpc_cred *); -extern int nfs4_proc_renew(struct nfs_client *, struct rpc_cred *); +extern int nfs4_proc_setclientid(struct nfs4_client *, u32, unsigned short, struct rpc_cred *); +extern int nfs4_proc_setclientid_confirm(struct nfs4_client *, struct rpc_cred *); +extern int nfs4_proc_async_renew(struct nfs4_client *, struct rpc_cred *); +extern int nfs4_proc_renew(struct nfs4_client *, struct rpc_cred *); extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state); extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *); -extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle); -extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, - struct nfs4_fs_locations *fs_locations, struct page *page); extern struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops; extern struct nfs4_state_recovery_ops nfs4_network_partition_recovery_ops; @@ -179,17 +225,21 @@ extern const u32 nfs4_fattr_bitmap[2]; extern const u32 nfs4_statfs_bitmap[2]; extern const u32 nfs4_pathconf_bitmap[2]; extern const u32 nfs4_fsinfo_bitmap[2]; -extern const u32 nfs4_fs_locations_bitmap[2]; /* nfs4renewd.c */ -extern void nfs4_schedule_state_renewal(struct nfs_client *); +extern void nfs4_schedule_state_renewal(struct nfs4_client *); extern void nfs4_renewd_prepare_shutdown(struct nfs_server *); -extern void nfs4_kill_renewd(struct nfs_client *); +extern void nfs4_kill_renewd(struct nfs4_client *); extern void nfs4_renew_state(void *); /* nfs4state.c */ -struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp); -extern u32 nfs4_alloc_lockowner_id(struct nfs_client *); +extern void init_nfsv4_state(struct nfs_server *); +extern void destroy_nfsv4_state(struct nfs_server *); +extern struct nfs4_client *nfs4_get_client(struct in_addr *); +extern void nfs4_put_client(struct nfs4_client *clp); +extern struct nfs4_client *nfs4_find_client(struct in_addr *); +struct rpc_cred *nfs4_get_renew_cred(struct nfs4_client *clp); +extern u32 nfs4_alloc_lockowner_id(struct nfs4_client *); extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); extern void nfs4_put_state_owner(struct nfs4_state_owner *); @@ -198,7 +248,7 @@ extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state extern void nfs4_put_open_state(struct nfs4_state *); extern void nfs4_close_state(struct nfs4_state *, mode_t); extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t); -extern void nfs4_schedule_state_recovery(struct nfs_client *); +extern void nfs4_schedule_state_recovery(struct nfs4_client *); extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl); extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t); @@ -222,6 +272,10 @@ extern struct svc_version nfs4_callback_version1; #else +#define init_nfsv4_state(server) do { } while (0) +#define destroy_nfsv4_state(server) do { } while (0) +#define nfs4_put_state_owner(inode, owner) do { } while (0) +#define nfs4_put_open_state(state) do { } while (0) #define nfs4_close_state(a, b) do { } while (0) #endif /* CONFIG_NFS_V4 */ diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c deleted file mode 100644 index b872779d7..000000000 --- a/fs/nfs/nfs4namespace.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - * linux/fs/nfs/nfs4namespace.c - * - * Copyright (C) 2005 Trond Myklebust - * - Modified by David Howells - * - * NFSv4 namespace - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "internal.h" - -#define NFSDBG_FACILITY NFSDBG_VFS - -/* - * Check if fs_root is valid - */ -static inline char *nfs4_pathname_string(const struct nfs4_pathname *pathname, - char *buffer, ssize_t buflen) -{ - char *end = buffer + buflen; - int n; - - *--end = '\0'; - buflen--; - - n = pathname->ncomponents; - while (--n >= 0) { - const struct nfs4_string *component = &pathname->components[n]; - buflen -= component->len + 1; - if (buflen < 0) - goto Elong; - end -= component->len; - memcpy(end, component->data, component->len); - *--end = '/'; - } - return end; -Elong: - return ERR_PTR(-ENAMETOOLONG); -} - -/* - * Determine the mount path as a string - */ -static char *nfs4_path(const struct vfsmount *mnt_parent, - const struct dentry *dentry, - char *buffer, ssize_t buflen) -{ - const char *srvpath; - - srvpath = strchr(mnt_parent->mnt_devname, ':'); - if (srvpath) - srvpath++; - else - srvpath = mnt_parent->mnt_devname; - - return nfs_path(srvpath, mnt_parent->mnt_root, dentry, buffer, buflen); -} - -/* - * Check that fs_locations::fs_root [RFC3530 6.3] is a prefix for what we - * believe to be the server path to this dentry - */ -static int nfs4_validate_fspath(const struct vfsmount *mnt_parent, - const struct dentry *dentry, - const struct nfs4_fs_locations *locations, - char *page, char *page2) -{ - const char *path, *fs_path; - - path = nfs4_path(mnt_parent, dentry, page, PAGE_SIZE); - if (IS_ERR(path)) - return PTR_ERR(path); - - fs_path = nfs4_pathname_string(&locations->fs_path, page2, PAGE_SIZE); - if (IS_ERR(fs_path)) - return PTR_ERR(fs_path); - - if (strncmp(path, fs_path, strlen(fs_path)) != 0) { - dprintk("%s: path %s does not begin with fsroot %s\n", - __FUNCTION__, path, fs_path); - return -ENOENT; - } - - return 0; -} - -/* - * Check if the string represents a "valid" IPv4 address - */ -static inline int valid_ipaddr4(const char *buf) -{ - int rc, count, in[4]; - - rc = sscanf(buf, "%d.%d.%d.%d", &in[0], &in[1], &in[2], &in[3]); - if (rc != 4) - return -EINVAL; - for (count = 0; count < 4; count++) { - if (in[count] > 255) - return -EINVAL; - } - return 0; -} - -/** - * nfs_follow_referral - set up mountpoint when hitting a referral on moved error - * @mnt_parent - mountpoint of parent directory - * @dentry - parent directory - * @fspath - fs path returned in fs_locations - * @mntpath - mount path to new server - * @hostname - hostname of new server - * @addr - host addr of new server - * - */ -static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent, - const struct dentry *dentry, - const struct nfs4_fs_locations *locations) -{ - struct vfsmount *mnt = ERR_PTR(-ENOENT); - struct nfs_clone_mount mountdata = { - .sb = mnt_parent->mnt_sb, - .dentry = dentry, - .authflavor = NFS_SB(mnt_parent->mnt_sb)->client->cl_auth->au_flavor, - }; - char *page = NULL, *page2 = NULL; - char *devname; - int loc, s, error; - - if (locations == NULL || locations->nlocations <= 0) - goto out; - - dprintk("%s: referral at %s/%s\n", __FUNCTION__, - dentry->d_parent->d_name.name, dentry->d_name.name); - - page = (char *) __get_free_page(GFP_USER); - if (!page) - goto out; - - page2 = (char *) __get_free_page(GFP_USER); - if (!page2) - goto out; - - /* Ensure fs path is a prefix of current dentry path */ - error = nfs4_validate_fspath(mnt_parent, dentry, locations, page, page2); - if (error < 0) { - mnt = ERR_PTR(error); - goto out; - } - - devname = nfs_devname(mnt_parent, dentry, page, PAGE_SIZE); - if (IS_ERR(devname)) { - mnt = (struct vfsmount *)devname; - goto out; - } - - loc = 0; - while (loc < locations->nlocations && IS_ERR(mnt)) { - const struct nfs4_fs_location *location = &locations->locations[loc]; - char *mnt_path; - - if (location == NULL || location->nservers <= 0 || - location->rootpath.ncomponents == 0) { - loc++; - continue; - } - - mnt_path = nfs4_pathname_string(&location->rootpath, page2, PAGE_SIZE); - if (IS_ERR(mnt_path)) { - loc++; - continue; - } - mountdata.mnt_path = mnt_path; - - s = 0; - while (s < location->nservers) { - struct sockaddr_in addr = {}; - - if (location->servers[s].len <= 0 || - valid_ipaddr4(location->servers[s].data) < 0) { - s++; - continue; - } - - mountdata.hostname = location->servers[s].data; - addr.sin_addr.s_addr = in_aton(mountdata.hostname); - addr.sin_family = AF_INET; - addr.sin_port = htons(NFS_PORT); - mountdata.addr = &addr; - - mnt = vfs_kern_mount(&nfs4_referral_fs_type, 0, devname, &mountdata); - if (!IS_ERR(mnt)) { - break; - } - s++; - } - loc++; - } - -out: - free_page((unsigned long) page); - free_page((unsigned long) page2); - dprintk("%s: done\n", __FUNCTION__); - return mnt; -} - -/* - * nfs_do_refmount - handle crossing a referral on server - * @dentry - dentry of referral - * @nd - nameidata info - * - */ -struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry) -{ - struct vfsmount *mnt = ERR_PTR(-ENOMEM); - struct dentry *parent; - struct nfs4_fs_locations *fs_locations = NULL; - struct page *page; - int err; - - /* BUG_ON(IS_ROOT(dentry)); */ - dprintk("%s: enter\n", __FUNCTION__); - - page = alloc_page(GFP_KERNEL); - if (page == NULL) - goto out; - - fs_locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL); - if (fs_locations == NULL) - goto out_free; - - /* Get locations */ - mnt = ERR_PTR(-ENOENT); - - parent = dget_parent(dentry); - dprintk("%s: getting locations for %s/%s\n", - __FUNCTION__, parent->d_name.name, dentry->d_name.name); - - err = nfs4_proc_fs_locations(parent->d_inode, dentry, fs_locations, page); - dput(parent); - if (err != 0 || - fs_locations->nlocations <= 0 || - fs_locations->fs_path.ncomponents <= 0) - goto out_free; - - mnt = nfs_follow_referral(mnt_parent, dentry, fs_locations); -out_free: - __free_page(page); - kfree(fs_locations); -out: - dprintk("%s: done\n", __FUNCTION__); - return mnt; -} diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a825547e8..d86c0db7b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -64,7 +64,9 @@ static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinf static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *); static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry); static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception); -static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp); +static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp); +extern u32 *nfs4_decode_dirent(u32 *p, struct nfs_entry *entry, int plus); +extern struct rpc_procinfo nfs4_procedures[]; /* Prevent leaks of NFSv4 errors into userland */ int nfs4_map_errors(int err) @@ -119,25 +121,6 @@ const u32 nfs4_fsinfo_bitmap[2] = { FATTR4_WORD0_MAXFILESIZE 0 }; -const u32 nfs4_fs_locations_bitmap[2] = { - FATTR4_WORD0_TYPE - | FATTR4_WORD0_CHANGE - | FATTR4_WORD0_SIZE - | FATTR4_WORD0_FSID - | FATTR4_WORD0_FILEID - | FATTR4_WORD0_FS_LOCATIONS, - FATTR4_WORD1_MODE - | FATTR4_WORD1_NUMLINKS - | FATTR4_WORD1_OWNER - | FATTR4_WORD1_OWNER_GROUP - | FATTR4_WORD1_RAWDEV - | FATTR4_WORD1_SPACE_USED - | FATTR4_WORD1_TIME_ACCESS - | FATTR4_WORD1_TIME_METADATA - | FATTR4_WORD1_TIME_MODIFY - | FATTR4_WORD1_MOUNTED_ON_FILEID -}; - static void nfs4_setup_readdir(u64 cookie, u32 *verifier, struct dentry *dentry, struct nfs4_readdir_arg *readdir) { @@ -195,22 +178,22 @@ static void nfs4_setup_readdir(u64 cookie, u32 *verifier, struct dentry *dentry, static void renew_lease(const struct nfs_server *server, unsigned long timestamp) { - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; spin_lock(&clp->cl_lock); if (time_before(clp->cl_last_renewal,timestamp)) clp->cl_last_renewal = timestamp; spin_unlock(&clp->cl_lock); } -static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) +static void update_changeattr(struct inode *inode, struct nfs4_change_info *cinfo) { - struct nfs_inode *nfsi = NFS_I(dir); + struct nfs_inode *nfsi = NFS_I(inode); - spin_lock(&dir->i_lock); - nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; + spin_lock(&inode->i_lock); + nfsi->cache_validity |= NFS_INO_INVALID_ATTR; if (cinfo->before == nfsi->change_attr && cinfo->atomic) nfsi->change_attr = cinfo->after; - spin_unlock(&dir->i_lock); + spin_unlock(&inode->i_lock); } struct nfs4_opendata { @@ -252,7 +235,7 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, atomic_inc(&sp->so_count); p->o_arg.fh = NFS_FH(dir); p->o_arg.open_flags = flags, - p->o_arg.clientid = server->nfs_client->cl_clientid; + p->o_arg.clientid = server->nfs4_state->cl_clientid; p->o_arg.id = sp->so_id; p->o_arg.name = &dentry->d_name; p->o_arg.server = server; @@ -550,7 +533,7 @@ int nfs4_open_delegation_recall(struct dentry *dentry, struct nfs4_state *state) case -NFS4ERR_STALE_STATEID: case -NFS4ERR_EXPIRED: /* Don't recall a delegation if it was lost */ - nfs4_schedule_state_recovery(server->nfs_client); + nfs4_schedule_state_recovery(server->nfs4_state); return err; } err = nfs4_handle_exception(server, err, &exception); @@ -758,7 +741,7 @@ static int _nfs4_proc_open(struct nfs4_opendata *data) } nfs_confirm_seqid(&data->owner->so_seqid, 0); if (!(o_res->f_attr->valid & NFS_ATTR_FATTR)) - return server->nfs_client->rpc_ops->getattr(server, &o_res->fh, o_res->f_attr); + return server->rpc_ops->getattr(server, &o_res->fh, o_res->f_attr); return 0; } @@ -792,7 +775,7 @@ out: int nfs4_recover_expired_lease(struct nfs_server *server) { - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) nfs4_schedule_state_recovery(clp); @@ -867,7 +850,7 @@ static int _nfs4_open_delegated(struct inode *inode, int flags, struct rpc_cred { struct nfs_delegation *delegation; struct nfs_server *server = NFS_SERVER(inode); - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; struct nfs_inode *nfsi = NFS_I(inode); struct nfs4_state_owner *sp = NULL; struct nfs4_state *state = NULL; @@ -953,7 +936,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st struct nfs4_state_owner *sp; struct nfs4_state *state = NULL; struct nfs_server *server = NFS_SERVER(dir); - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; struct nfs4_opendata *opendata; int status; @@ -970,7 +953,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st status = -ENOMEM; opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr); if (opendata == NULL) - goto err_release_rwsem; + goto err_put_state_owner; status = _nfs4_proc_open(opendata); if (status != 0) @@ -989,11 +972,11 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st return 0; err_opendata_free: nfs4_opendata_free(opendata); -err_release_rwsem: - up_read(&clp->cl_sem); err_put_state_owner: nfs4_put_state_owner(sp); out_err: + /* Note: clp->cl_sem must be released before nfs4_put_open_state()! */ + up_read(&clp->cl_sem); *res = NULL; return status; } @@ -1133,7 +1116,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data) break; case -NFS4ERR_STALE_STATEID: case -NFS4ERR_EXPIRED: - nfs4_schedule_state_recovery(server->nfs_client); + nfs4_schedule_state_recovery(server->nfs4_state); break; default: if (nfs4_async_handle_error(task, server) == -EAGAIN) { @@ -1268,7 +1251,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) BUG_ON(nd->intent.open.flags & O_CREAT); } - cred = rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); + cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); if (IS_ERR(cred)) return (struct dentry *)cred; state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred); @@ -1291,7 +1274,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st struct rpc_cred *cred; struct nfs4_state *state; - cred = rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); + cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); if (IS_ERR(cred)) return PTR_ERR(cred); state = nfs4_open_delegated(dentry->d_inode, openflags, cred); @@ -1348,7 +1331,7 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f return status; } -int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) +static int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) { struct nfs4_exception exception = { }; int err; @@ -1393,64 +1376,71 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle, return err; } -/* - * get the file handle for the "/" directory on the server - */ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, - struct nfs_fsinfo *info) + struct nfs_fsinfo *info) { + struct nfs_fattr * fattr = info->fattr; + unsigned char * p; + struct qstr q; + struct nfs4_lookup_arg args = { + .dir_fh = fhandle, + .name = &q, + .bitmask = nfs4_fattr_bitmap, + }; + struct nfs4_lookup_res res = { + .server = server, + .fattr = fattr, + .fh = fhandle, + }; + struct rpc_message msg = { + .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUP], + .rpc_argp = &args, + .rpc_resp = &res, + }; int status; + /* + * Now we do a separate LOOKUP for each component of the mount path. + * The LOOKUPs are done separately so that we can conveniently + * catch an ERR_WRONGSEC if it occurs along the way... + */ status = nfs4_lookup_root(server, fhandle, info); + if (status) + goto out; + + p = server->mnt_path; + for (;;) { + struct nfs4_exception exception = { }; + + while (*p == '/') + p++; + if (!*p) + break; + q.name = p; + while (*p && (*p != '/')) + p++; + q.len = p - q.name; + + do { + nfs_fattr_init(fattr); + status = nfs4_handle_exception(server, + rpc_call_sync(server->client, &msg, 0), + &exception); + } while (exception.retry); + if (status == 0) + continue; + if (status == -ENOENT) { + printk(KERN_NOTICE "NFS: mount path %s does not exist!\n", server->mnt_path); + printk(KERN_NOTICE "NFS: suggestion: try mounting '/' instead.\n"); + } + break; + } if (status == 0) status = nfs4_server_capabilities(server, fhandle); if (status == 0) status = nfs4_do_fsinfo(server, fhandle, info); - return nfs4_map_errors(status); -} - -/* - * Get locations and (maybe) other attributes of a referral. - * Note that we'll actually follow the referral later when - * we detect fsid mismatch in inode revalidation - */ -static int nfs4_get_referral(struct inode *dir, struct qstr *name, struct nfs_fattr *fattr, struct nfs_fh *fhandle) -{ - int status = -ENOMEM; - struct page *page = NULL; - struct nfs4_fs_locations *locations = NULL; - struct dentry dentry = {}; - - page = alloc_page(GFP_KERNEL); - if (page == NULL) - goto out; - locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL); - if (locations == NULL) - goto out; - - dentry.d_name.name = name->name; - dentry.d_name.len = name->len; - status = nfs4_proc_fs_locations(dir, &dentry, locations, page); - if (status != 0) - goto out; - /* Make sure server returned a different fsid for the referral */ - if (nfs_fsid_equal(&NFS_SERVER(dir)->fsid, &locations->fattr.fsid)) { - dprintk("%s: server did not return a different fsid for a referral at %s\n", __FUNCTION__, name->name); - status = -EIO; - goto out; - } - - memcpy(fattr, &locations->fattr, sizeof(struct nfs_fattr)); - fattr->valid |= NFS_ATTR_FATTR_V4_REFERRAL; - if (!fattr->mode) - fattr->mode = S_IFDIR; - memset(fhandle, 0, sizeof(struct nfs_fh)); out: - if (page) - __free_page(page); - if (locations) - kfree(locations); - return status; + return nfs4_map_errors(status); } static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr) @@ -1514,7 +1504,7 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, nfs_fattr_init(fattr); - cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0); + cred = rpcauth_lookupcred(NFS_SERVER(inode)->client->cl_auth, 0); if (IS_ERR(cred)) return PTR_ERR(cred); @@ -1532,52 +1522,6 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, return status; } -static int _nfs4_proc_lookupfh(struct nfs_server *server, struct nfs_fh *dirfh, - struct qstr *name, struct nfs_fh *fhandle, - struct nfs_fattr *fattr) -{ - int status; - struct nfs4_lookup_arg args = { - .bitmask = server->attr_bitmask, - .dir_fh = dirfh, - .name = name, - }; - struct nfs4_lookup_res res = { - .server = server, - .fattr = fattr, - .fh = fhandle, - }; - struct rpc_message msg = { - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_LOOKUP], - .rpc_argp = &args, - .rpc_resp = &res, - }; - - nfs_fattr_init(fattr); - - dprintk("NFS call lookupfh %s\n", name->name); - status = rpc_call_sync(server->client, &msg, 0); - dprintk("NFS reply lookupfh: %d\n", status); - if (status == -NFS4ERR_MOVED) - status = -EREMOTE; - return status; -} - -static int nfs4_proc_lookupfh(struct nfs_server *server, struct nfs_fh *dirfh, - struct qstr *name, struct nfs_fh *fhandle, - struct nfs_fattr *fattr) -{ - struct nfs4_exception exception = { }; - int err; - do { - err = nfs4_handle_exception(server, - _nfs4_proc_lookupfh(server, dirfh, name, - fhandle, fattr), - &exception); - } while (exception.retry); - return err; -} - static int _nfs4_proc_lookup(struct inode *dir, struct qstr *name, struct nfs_fh *fhandle, struct nfs_fattr *fattr) { @@ -1603,8 +1547,6 @@ static int _nfs4_proc_lookup(struct inode *dir, struct qstr *name, dprintk("NFS call lookup %s\n", name->name); status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); - if (status == -NFS4ERR_MOVED) - status = nfs4_get_referral(dir, name, fattr, fhandle); dprintk("NFS reply lookup: %d\n", status); return status; } @@ -1876,7 +1818,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, struct rpc_cred *cred; int status = 0; - cred = rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); + cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0); if (IS_ERR(cred)) { status = PTR_ERR(cred); goto out; @@ -2066,7 +2008,7 @@ static int _nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr * if (!status) { update_changeattr(dir, &res.cinfo); nfs_post_op_update_inode(dir, res.dir_attr); - nfs_post_op_update_inode(inode, res.fattr); + nfs_refresh_inode(inode, res.fattr); } return status; @@ -2516,7 +2458,7 @@ static void nfs4_proc_commit_setup(struct nfs_write_data *data, int how) */ static void nfs4_renew_done(struct rpc_task *task, void *data) { - struct nfs_client *clp = (struct nfs_client *)task->tk_msg.rpc_argp; + struct nfs4_client *clp = (struct nfs4_client *)task->tk_msg.rpc_argp; unsigned long timestamp = (unsigned long)data; if (task->tk_status < 0) { @@ -2538,7 +2480,7 @@ static const struct rpc_call_ops nfs4_renew_ops = { .rpc_call_done = nfs4_renew_done, }; -int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred) +int nfs4_proc_async_renew(struct nfs4_client *clp, struct rpc_cred *cred) { struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], @@ -2550,7 +2492,7 @@ int nfs4_proc_async_renew(struct nfs_client *clp, struct rpc_cred *cred) &nfs4_renew_ops, (void *)jiffies); } -int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred) +int nfs4_proc_renew(struct nfs4_client *clp, struct rpc_cred *cred) { struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENEW], @@ -2663,7 +2605,7 @@ out: nfs4_set_cached_acl(inode, acl); } -static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen) +static inline ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen) { struct page *pages[NFS4ACL_MAXPAGES]; struct nfs_getaclargs args = { @@ -2716,19 +2658,6 @@ out_free: return ret; } -static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen) -{ - struct nfs4_exception exception = { }; - ssize_t ret; - do { - ret = __nfs4_get_acl_uncached(inode, buf, buflen); - if (ret >= 0) - break; - ret = nfs4_handle_exception(NFS_SERVER(inode), ret, &exception); - } while (exception.retry); - return ret; -} - static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen) { struct nfs_server *server = NFS_SERVER(inode); @@ -2745,7 +2674,7 @@ static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen) return nfs4_get_acl_uncached(inode, buf, buflen); } -static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen) +static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen) { struct nfs_server *server = NFS_SERVER(inode); struct page *pages[NFS4ACL_MAXPAGES]; @@ -2765,28 +2694,16 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl return -EOPNOTSUPP; nfs_inode_return_delegation(inode); buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase); - ret = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); + ret = rpc_call_sync(NFS_SERVER(inode)->client, &msg, 0); if (ret == 0) nfs4_write_cached_acl(inode, buf, buflen); return ret; } -static int nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t buflen) -{ - struct nfs4_exception exception = { }; - int err; - do { - err = nfs4_handle_exception(NFS_SERVER(inode), - __nfs4_proc_set_acl(inode, buf, buflen), - &exception); - } while (exception.retry); - return err; -} - static int nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) { - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; if (!clp || task->tk_status >= 0) return 0; @@ -2823,7 +2740,7 @@ static int nfs4_wait_bit_interruptible(void *word) return 0; } -static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp) +static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp) { sigset_t oldset; int res; @@ -2866,7 +2783,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) */ int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) { - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; int ret = errorcode; exception->retry = 0; @@ -2893,7 +2810,7 @@ int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct return nfs4_map_errors(ret); } -int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) +int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) { nfs4_verifier sc_verifier; struct nfs4_setclientid setclientid = { @@ -2917,7 +2834,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po for(;;) { setclientid.sc_name_len = scnprintf(setclientid.sc_name, sizeof(setclientid.sc_name), "%s/%u.%u.%u.%u %s %u", - clp->cl_ipaddr, NIPQUAD(clp->cl_addr.sin_addr), + clp->cl_ipaddr, NIPQUAD(clp->cl_addr.s_addr), cred->cr_ops->cr_name, clp->cl_id_uniquifier); setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, @@ -2940,7 +2857,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short po return status; } -static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) +static int _nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) { struct nfs_fsinfo fsinfo; struct rpc_message msg = { @@ -2964,7 +2881,7 @@ static int _nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cre return status; } -int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) +int nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) { long timeout; int err; @@ -3072,7 +2989,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4 switch (err) { case -NFS4ERR_STALE_STATEID: case -NFS4ERR_EXPIRED: - nfs4_schedule_state_recovery(server->nfs_client); + nfs4_schedule_state_recovery(server->nfs4_state); case 0: return 0; } @@ -3101,7 +3018,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock { struct inode *inode = state->inode; struct nfs_server *server = NFS_SERVER(inode); - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; struct nfs_lockt_args arg = { .fh = NFS_FH(inode), .fl = request, @@ -3164,6 +3081,9 @@ static int do_vfs_lock(struct file *file, struct file_lock *fl) default: BUG(); } + if (res < 0) + printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", + __FUNCTION__); return res; } @@ -3226,7 +3146,7 @@ static void nfs4_locku_done(struct rpc_task *task, void *data) break; case -NFS4ERR_STALE_STATEID: case -NFS4ERR_EXPIRED: - nfs4_schedule_state_recovery(calldata->server->nfs_client); + nfs4_schedule_state_recovery(calldata->server->nfs4_state); break; default: if (nfs4_async_handle_error(task, calldata->server) == -EAGAIN) { @@ -3275,6 +3195,8 @@ static struct rpc_task *nfs4_do_unlck(struct file_lock *fl, return ERR_PTR(-ENOMEM); } + /* Unlock _before_ we do the RPC call */ + do_vfs_lock(fl->fl_file, fl); return rpc_run_task(NFS_CLIENT(lsp->ls_state->inode), RPC_TASK_ASYNC, &nfs4_locku_ops, data); } @@ -3285,28 +3207,30 @@ static int nfs4_proc_unlck(struct nfs4_state *state, int cmd, struct file_lock * struct rpc_task *task; int status = 0; - status = nfs4_set_lock_state(state, request); - /* Unlock _before_ we do the RPC call */ - request->fl_flags |= FL_EXISTS; - if (do_vfs_lock(request->fl_file, request) == -ENOENT) - goto out; - if (status != 0) - goto out; /* Is this a delegated lock? */ if (test_bit(NFS_DELEGATED_STATE, &state->flags)) - goto out; + goto out_unlock; + /* Is this open_owner holding any locks on the server? */ + if (test_bit(LK_STATE_IN_USE, &state->flags) == 0) + goto out_unlock; + + status = nfs4_set_lock_state(state, request); + if (status != 0) + goto out_unlock; lsp = request->fl_u.nfs4_fl.owner; - seqid = nfs_alloc_seqid(&lsp->ls_seqid); status = -ENOMEM; + seqid = nfs_alloc_seqid(&lsp->ls_seqid); if (seqid == NULL) - goto out; + goto out_unlock; task = nfs4_do_unlck(request, request->fl_file->private_data, lsp, seqid); status = PTR_ERR(task); if (IS_ERR(task)) - goto out; + goto out_unlock; status = nfs4_wait_for_completion_rpc_task(task); rpc_release_task(task); -out: + return status; +out_unlock: + do_vfs_lock(request->fl_file, request); return status; } @@ -3338,7 +3262,7 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, if (p->arg.lock_seqid == NULL) goto out_free; p->arg.lock_stateid = &lsp->ls_stateid; - p->arg.lock_owner.clientid = server->nfs_client->cl_clientid; + p->arg.lock_owner.clientid = server->nfs4_state->cl_clientid; p->arg.lock_owner.id = lsp->ls_id; p->lsp = lsp; atomic_inc(&lsp->ls_count); @@ -3474,10 +3398,10 @@ static int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request struct nfs4_exception exception = { }; int err; + /* Cache the lock if possible... */ + if (test_bit(NFS_DELEGATED_STATE, &state->flags)) + return 0; do { - /* Cache the lock if possible... */ - if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0) - return 0; err = _nfs4_do_setlk(state, F_SETLK, request, 1); if (err != -NFS4ERR_DELAY) break; @@ -3496,8 +3420,6 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request if (err != 0) return err; do { - if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0) - return 0; err = _nfs4_do_setlk(state, F_SETLK, request, 0); if (err != -NFS4ERR_DELAY) break; @@ -3508,43 +3430,30 @@ static int nfs4_lock_expired(struct nfs4_state *state, struct file_lock *request static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request) { - struct nfs_client *clp = state->owner->so_client; - unsigned char fl_flags = request->fl_flags; + struct nfs4_client *clp = state->owner->so_client; int status; /* Is this a delegated open? */ - status = nfs4_set_lock_state(state, request); - if (status != 0) - goto out; - request->fl_flags |= FL_ACCESS; - status = do_vfs_lock(request->fl_file, request); - if (status < 0) - goto out; - down_read(&clp->cl_sem); - if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { - struct nfs_inode *nfsi = NFS_I(state->inode); + if (NFS_I(state->inode)->delegation_state != 0) { /* Yes: cache locks! */ - down_read(&nfsi->rwsem); + status = do_vfs_lock(request->fl_file, request); /* ...but avoid races with delegation recall... */ - if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { - request->fl_flags = fl_flags & ~FL_SLEEP; - status = do_vfs_lock(request->fl_file, request); - up_read(&nfsi->rwsem); - goto out_unlock; - } - up_read(&nfsi->rwsem); + if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) + return status; } + down_read(&clp->cl_sem); + status = nfs4_set_lock_state(state, request); + if (status != 0) + goto out; status = _nfs4_do_setlk(state, cmd, request, 0); if (status != 0) - goto out_unlock; + goto out; /* Note: we always want to sleep here! */ - request->fl_flags = fl_flags | FL_SLEEP; + request->fl_flags |= FL_SLEEP; if (do_vfs_lock(request->fl_file, request) < 0) printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __FUNCTION__); -out_unlock: - up_read(&clp->cl_sem); out: - request->fl_flags = fl_flags; + up_read(&clp->cl_sem); return status; } @@ -3661,36 +3570,6 @@ ssize_t nfs4_listxattr(struct dentry *dentry, char *buf, size_t buflen) return len; } -int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, - struct nfs4_fs_locations *fs_locations, struct page *page) -{ - struct nfs_server *server = NFS_SERVER(dir); - u32 bitmask[2] = { - [0] = FATTR4_WORD0_FSID | FATTR4_WORD0_FS_LOCATIONS, - [1] = FATTR4_WORD1_MOUNTED_ON_FILEID, - }; - struct nfs4_fs_locations_arg args = { - .dir_fh = NFS_FH(dir), - .name = &dentry->d_name, - .page = page, - .bitmask = bitmask, - }; - struct rpc_message msg = { - .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS], - .rpc_argp = &args, - .rpc_resp = fs_locations, - }; - int status; - - dprintk("%s: start\n", __FUNCTION__); - fs_locations->fattr.valid = 0; - fs_locations->server = server; - fs_locations->nlocations = 0; - status = rpc_call_sync(server->client, &msg, 0); - dprintk("%s: returned status = %d\n", __FUNCTION__, status); - return status; -} - struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { .recover_open = nfs4_open_reclaim, .recover_lock = nfs4_lock_reclaim, @@ -3710,7 +3589,7 @@ static struct inode_operations nfs4_file_inode_operations = { .listxattr = nfs4_listxattr, }; -const struct nfs_rpc_ops nfs_v4_clientops = { +struct nfs_rpc_ops nfs_v4_clientops = { .version = 4, /* protocol version */ .dentry_ops = &nfs4_dentry_operations, .dir_inode_ops = &nfs4_dir_inode_operations, @@ -3718,7 +3597,6 @@ const struct nfs_rpc_ops nfs_v4_clientops = { .getroot = nfs4_proc_get_root, .getattr = nfs4_proc_getattr, .setattr = nfs4_proc_setattr, - .lookupfh = nfs4_proc_lookupfh, .lookup = nfs4_proc_lookup, .access = nfs4_proc_access, .readlink = nfs4_proc_readlink, @@ -3739,7 +3617,6 @@ const struct nfs_rpc_ops nfs_v4_clientops = { .statfs = nfs4_proc_statfs, .fsinfo = nfs4_proc_fsinfo, .pathconf = nfs4_proc_pathconf, - .set_capabilities = nfs4_server_capabilities, .decode_dirent = nfs4_decode_dirent, .read_setup = nfs4_proc_read_setup, .read_done = nfs4_read_done, diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 7b6df1852..5d764d8e6 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c @@ -61,7 +61,7 @@ void nfs4_renew_state(void *data) { - struct nfs_client *clp = (struct nfs_client *)data; + struct nfs4_client *clp = (struct nfs4_client *)data; struct rpc_cred *cred; long lease, timeout; unsigned long last, now; @@ -108,7 +108,7 @@ out: /* Must be called with clp->cl_sem locked for writes */ void -nfs4_schedule_state_renewal(struct nfs_client *clp) +nfs4_schedule_state_renewal(struct nfs4_client *clp) { long timeout; @@ -121,20 +121,32 @@ nfs4_schedule_state_renewal(struct nfs_client *clp) __FUNCTION__, (timeout + HZ - 1) / HZ); cancel_delayed_work(&clp->cl_renewd); schedule_delayed_work(&clp->cl_renewd, timeout); - set_bit(NFS_CS_RENEWD, &clp->cl_res_state); spin_unlock(&clp->cl_lock); } void nfs4_renewd_prepare_shutdown(struct nfs_server *server) { + struct nfs4_client *clp = server->nfs4_state; + + if (!clp) + return; flush_scheduled_work(); + down_write(&clp->cl_sem); + if (!list_empty(&server->nfs4_siblings)) + list_del_init(&server->nfs4_siblings); + up_write(&clp->cl_sem); } +/* Must be called with clp->cl_sem locked for writes */ void -nfs4_kill_renewd(struct nfs_client *clp) +nfs4_kill_renewd(struct nfs4_client *clp) { down_read(&clp->cl_sem); + if (!list_empty(&clp->cl_superblocks)) { + up_read(&clp->cl_sem); + return; + } cancel_delayed_work(&clp->cl_renewd); up_read(&clp->cl_sem); flush_scheduled_work(); diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 5fffbdfa9..96e5b82c1 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -38,6 +38,7 @@ * subsequent patch. */ +#include #include #include #include @@ -50,15 +51,149 @@ #include "nfs4_fs.h" #include "callback.h" #include "delegation.h" -#include "internal.h" #define OPENOWNER_POOL_SIZE 8 const nfs4_stateid zero_stateid; +static DEFINE_SPINLOCK(state_spinlock); static LIST_HEAD(nfs4_clientid_list); -static int nfs4_init_client(struct nfs_client *clp, struct rpc_cred *cred) +void +init_nfsv4_state(struct nfs_server *server) +{ + server->nfs4_state = NULL; + INIT_LIST_HEAD(&server->nfs4_siblings); +} + +void +destroy_nfsv4_state(struct nfs_server *server) +{ + kfree(server->mnt_path); + server->mnt_path = NULL; + if (server->nfs4_state) { + nfs4_put_client(server->nfs4_state); + server->nfs4_state = NULL; + } +} + +/* + * nfs4_get_client(): returns an empty client structure + * nfs4_put_client(): drops reference to client structure + * + * Since these are allocated/deallocated very rarely, we don't + * bother putting them in a slab cache... + */ +static struct nfs4_client * +nfs4_alloc_client(struct in_addr *addr) +{ + struct nfs4_client *clp; + + if (nfs_callback_up() < 0) + return NULL; + if ((clp = kzalloc(sizeof(*clp), GFP_KERNEL)) == NULL) { + nfs_callback_down(); + return NULL; + } + memcpy(&clp->cl_addr, addr, sizeof(clp->cl_addr)); + init_rwsem(&clp->cl_sem); + INIT_LIST_HEAD(&clp->cl_delegations); + INIT_LIST_HEAD(&clp->cl_state_owners); + INIT_LIST_HEAD(&clp->cl_unused); + spin_lock_init(&clp->cl_lock); + atomic_set(&clp->cl_count, 1); + INIT_WORK(&clp->cl_renewd, nfs4_renew_state, clp); + INIT_LIST_HEAD(&clp->cl_superblocks); + rpc_init_wait_queue(&clp->cl_rpcwaitq, "NFS4 client"); + clp->cl_rpcclient = ERR_PTR(-EINVAL); + clp->cl_boot_time = CURRENT_TIME; + clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED; + return clp; +} + +static void +nfs4_free_client(struct nfs4_client *clp) +{ + struct nfs4_state_owner *sp; + + while (!list_empty(&clp->cl_unused)) { + sp = list_entry(clp->cl_unused.next, + struct nfs4_state_owner, + so_list); + list_del(&sp->so_list); + kfree(sp); + } + BUG_ON(!list_empty(&clp->cl_state_owners)); + nfs_idmap_delete(clp); + if (!IS_ERR(clp->cl_rpcclient)) + rpc_shutdown_client(clp->cl_rpcclient); + kfree(clp); + nfs_callback_down(); +} + +static struct nfs4_client *__nfs4_find_client(struct in_addr *addr) +{ + struct nfs4_client *clp; + list_for_each_entry(clp, &nfs4_clientid_list, cl_servers) { + if (memcmp(&clp->cl_addr, addr, sizeof(clp->cl_addr)) == 0) { + atomic_inc(&clp->cl_count); + return clp; + } + } + return NULL; +} + +struct nfs4_client *nfs4_find_client(struct in_addr *addr) +{ + struct nfs4_client *clp; + spin_lock(&state_spinlock); + clp = __nfs4_find_client(addr); + spin_unlock(&state_spinlock); + return clp; +} + +struct nfs4_client * +nfs4_get_client(struct in_addr *addr) +{ + struct nfs4_client *clp, *new = NULL; + + spin_lock(&state_spinlock); + for (;;) { + clp = __nfs4_find_client(addr); + if (clp != NULL) + break; + clp = new; + if (clp != NULL) { + list_add(&clp->cl_servers, &nfs4_clientid_list); + new = NULL; + break; + } + spin_unlock(&state_spinlock); + new = nfs4_alloc_client(addr); + spin_lock(&state_spinlock); + if (new == NULL) + break; + } + spin_unlock(&state_spinlock); + if (new) + nfs4_free_client(new); + return clp; +} + +void +nfs4_put_client(struct nfs4_client *clp) +{ + if (!atomic_dec_and_lock(&clp->cl_count, &state_spinlock)) + return; + list_del(&clp->cl_servers); + spin_unlock(&state_spinlock); + BUG_ON(!list_empty(&clp->cl_superblocks)); + rpc_wake_up(&clp->cl_rpcwaitq); + nfs4_kill_renewd(clp); + nfs4_free_client(clp); +} + +static int nfs4_init_client(struct nfs4_client *clp, struct rpc_cred *cred) { int status = nfs4_proc_setclientid(clp, NFS4_CALLBACK, nfs_callback_tcpport, cred); @@ -70,13 +205,13 @@ static int nfs4_init_client(struct nfs_client *clp, struct rpc_cred *cred) } u32 -nfs4_alloc_lockowner_id(struct nfs_client *clp) +nfs4_alloc_lockowner_id(struct nfs4_client *clp) { return clp->cl_lockowner_id ++; } static struct nfs4_state_owner * -nfs4_client_grab_unused(struct nfs_client *clp, struct rpc_cred *cred) +nfs4_client_grab_unused(struct nfs4_client *clp, struct rpc_cred *cred) { struct nfs4_state_owner *sp = NULL; @@ -90,7 +225,7 @@ nfs4_client_grab_unused(struct nfs_client *clp, struct rpc_cred *cred) return sp; } -struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp) +struct rpc_cred *nfs4_get_renew_cred(struct nfs4_client *clp) { struct nfs4_state_owner *sp; struct rpc_cred *cred = NULL; @@ -104,7 +239,7 @@ struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp) return cred; } -struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp) +struct rpc_cred *nfs4_get_setclientid_cred(struct nfs4_client *clp) { struct nfs4_state_owner *sp; @@ -117,7 +252,7 @@ struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp) } static struct nfs4_state_owner * -nfs4_find_state_owner(struct nfs_client *clp, struct rpc_cred *cred) +nfs4_find_state_owner(struct nfs4_client *clp, struct rpc_cred *cred) { struct nfs4_state_owner *sp, *res = NULL; @@ -160,7 +295,7 @@ nfs4_alloc_state_owner(void) void nfs4_drop_state_owner(struct nfs4_state_owner *sp) { - struct nfs_client *clp = sp->so_client; + struct nfs4_client *clp = sp->so_client; spin_lock(&clp->cl_lock); list_del_init(&sp->so_list); spin_unlock(&clp->cl_lock); @@ -172,7 +307,7 @@ nfs4_drop_state_owner(struct nfs4_state_owner *sp) */ struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct rpc_cred *cred) { - struct nfs_client *clp = server->nfs_client; + struct nfs4_client *clp = server->nfs4_state; struct nfs4_state_owner *sp, *new; get_rpccred(cred); @@ -203,7 +338,7 @@ struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *server, struct */ void nfs4_put_state_owner(struct nfs4_state_owner *sp) { - struct nfs_client *clp = sp->so_client; + struct nfs4_client *clp = sp->so_client; struct rpc_cred *cred = sp->so_cred; if (!atomic_dec_and_lock(&sp->so_count, &clp->cl_lock)) @@ -406,7 +541,7 @@ __nfs4_find_lock_state(struct nfs4_state *state, fl_owner_t fl_owner) static struct nfs4_lock_state *nfs4_alloc_lock_state(struct nfs4_state *state, fl_owner_t fl_owner) { struct nfs4_lock_state *lsp; - struct nfs_client *clp = state->owner->so_client; + struct nfs4_client *clp = state->owner->so_client; lsp = kzalloc(sizeof(*lsp), GFP_KERNEL); if (lsp == NULL) @@ -618,7 +753,7 @@ out: static int reclaimer(void *); -static inline void nfs4_clear_recover_bit(struct nfs_client *clp) +static inline void nfs4_clear_recover_bit(struct nfs4_client *clp) { smp_mb__before_clear_bit(); clear_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state); @@ -630,25 +765,25 @@ static inline void nfs4_clear_recover_bit(struct nfs_client *clp) /* * State recovery routine */ -static void nfs4_recover_state(struct nfs_client *clp) +static void nfs4_recover_state(struct nfs4_client *clp) { struct task_struct *task; __module_get(THIS_MODULE); atomic_inc(&clp->cl_count); task = kthread_run(reclaimer, clp, "%u.%u.%u.%u-reclaim", - NIPQUAD(clp->cl_addr.sin_addr)); + NIPQUAD(clp->cl_addr)); if (!IS_ERR(task)) return; nfs4_clear_recover_bit(clp); - nfs_put_client(clp); + nfs4_put_client(clp); module_put(THIS_MODULE); } /* * Schedule a state recovery attempt */ -void nfs4_schedule_state_recovery(struct nfs_client *clp) +void nfs4_schedule_state_recovery(struct nfs4_client *clp) { if (!clp) return; @@ -745,7 +880,7 @@ out_err: return status; } -static void nfs4_state_mark_reclaim(struct nfs_client *clp) +static void nfs4_state_mark_reclaim(struct nfs4_client *clp) { struct nfs4_state_owner *sp; struct nfs4_state *state; @@ -769,7 +904,7 @@ static void nfs4_state_mark_reclaim(struct nfs_client *clp) static int reclaimer(void *ptr) { - struct nfs_client *clp = ptr; + struct nfs4_client *clp = ptr; struct nfs4_state_owner *sp; struct nfs4_state_recovery_ops *ops; struct rpc_cred *cred; @@ -836,12 +971,12 @@ out: if (status == -NFS4ERR_CB_PATH_DOWN) nfs_handle_cb_pathdown(clp); nfs4_clear_recover_bit(clp); - nfs_put_client(clp); + nfs4_put_client(clp); module_put_and_exit(0); return 0; out_error: printk(KERN_WARNING "Error: state recovery failed on NFSv4 server %u.%u.%u.%u with error %d\n", - NIPQUAD(clp->cl_addr.sin_addr), -status); + NIPQUAD(clp->cl_addr.s_addr), -status); set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state); goto out; } diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 99926067e..7c5d70efe 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -58,7 +58,7 @@ /* Mapping from NFS error code to "errno" error code. */ #define errno_NFSERR_IO EIO -static int nfs4_stat_to_errno(int); +static int nfs_stat_to_errno(int); /* NFSv4 COMPOUND tags are only wanted for debugging purposes */ #ifdef DEBUG @@ -411,15 +411,6 @@ static int nfs4_stat_to_errno(int); #define NFS4_dec_setacl_sz (compound_decode_hdr_maxsz + \ decode_putfh_maxsz + \ op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz) -#define NFS4_enc_fs_locations_sz \ - (compound_encode_hdr_maxsz + \ - encode_putfh_maxsz + \ - encode_getattr_maxsz) -#define NFS4_dec_fs_locations_sz \ - (compound_decode_hdr_maxsz + \ - decode_putfh_maxsz + \ - op_decode_hdr_maxsz + \ - nfs4_fattr_bitmap_maxsz) static struct { unsigned int mode; @@ -529,7 +520,7 @@ static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const s if (iap->ia_valid & ATTR_MODE) len += 4; if (iap->ia_valid & ATTR_UID) { - owner_namelen = nfs_map_uid_to_name(server->nfs_client, iap->ia_uid, owner_name); + owner_namelen = nfs_map_uid_to_name(server->nfs4_state, iap->ia_uid, owner_name); if (owner_namelen < 0) { printk(KERN_WARNING "nfs: couldn't resolve uid %d to string\n", iap->ia_uid); @@ -541,7 +532,7 @@ static int encode_attrs(struct xdr_stream *xdr, const struct iattr *iap, const s len += 4 + (XDR_QUADLEN(owner_namelen) << 2); } if (iap->ia_valid & ATTR_GID) { - owner_grouplen = nfs_map_gid_to_group(server->nfs_client, iap->ia_gid, owner_group); + owner_grouplen = nfs_map_gid_to_group(server->nfs4_state, iap->ia_gid, owner_group); if (owner_grouplen < 0) { printk(KERN_WARNING "nfs4: couldn't resolve gid %d to string\n", iap->ia_gid); @@ -731,13 +722,6 @@ static int encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask) bitmask[1] & nfs4_fsinfo_bitmap[1]); } -static int encode_fs_locations(struct xdr_stream *xdr, const u32* bitmask) -{ - return encode_getattr_two(xdr, - bitmask[0] & nfs4_fs_locations_bitmap[0], - bitmask[1] & nfs4_fs_locations_bitmap[1]); -} - static int encode_getfh(struct xdr_stream *xdr) { uint32_t *p; @@ -1160,7 +1144,7 @@ static int encode_rename(struct xdr_stream *xdr, const struct qstr *oldname, con return 0; } -static int encode_renew(struct xdr_stream *xdr, const struct nfs_client *client_stateid) +static int encode_renew(struct xdr_stream *xdr, const struct nfs4_client *client_stateid) { uint32_t *p; @@ -1246,7 +1230,7 @@ static int encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclien return 0; } -static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs_client *client_state) +static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs4_client *client_state) { uint32_t *p; @@ -1945,7 +1929,7 @@ static int nfs4_xdr_enc_server_caps(struct rpc_rqst *req, uint32_t *p, const str /* * a RENEW request */ -static int nfs4_xdr_enc_renew(struct rpc_rqst *req, uint32_t *p, struct nfs_client *clp) +static int nfs4_xdr_enc_renew(struct rpc_rqst *req, uint32_t *p, struct nfs4_client *clp) { struct xdr_stream xdr; struct compound_hdr hdr = { @@ -1975,7 +1959,7 @@ static int nfs4_xdr_enc_setclientid(struct rpc_rqst *req, uint32_t *p, struct nf /* * a SETCLIENTID_CONFIRM request */ -static int nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req, uint32_t *p, struct nfs_client *clp) +static int nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req, uint32_t *p, struct nfs4_client *clp) { struct xdr_stream xdr; struct compound_hdr hdr = { @@ -2018,38 +2002,6 @@ out: return status; } -/* - * Encode FS_LOCATIONS request - */ -static int nfs4_xdr_enc_fs_locations(struct rpc_rqst *req, uint32_t *p, struct nfs4_fs_locations_arg *args) -{ - struct xdr_stream xdr; - struct compound_hdr hdr = { - .nops = 3, - }; - struct rpc_auth *auth = req->rq_task->tk_auth; - int replen; - int status; - - xdr_init_encode(&xdr, &req->rq_snd_buf, p); - encode_compound_hdr(&xdr, &hdr); - if ((status = encode_putfh(&xdr, args->dir_fh)) != 0) - goto out; - if ((status = encode_lookup(&xdr, args->name)) != 0) - goto out; - if ((status = encode_fs_locations(&xdr, args->bitmask)) != 0) - goto out; - /* set up reply - * toplevel_status + OP_PUTFH + status - * + OP_LOOKUP + status + OP_GETATTR + status = 7 - */ - replen = (RPC_REPHDRSIZE + auth->au_rslack + 7) << 2; - xdr_inline_pages(&req->rq_rcv_buf, replen, &args->page, - 0, PAGE_SIZE); -out: - return status; -} - /* * START OF "GENERIC" DECODE ROUTINES. * These may look a little ugly since they are imported from a "generic" @@ -2084,7 +2036,7 @@ out: } \ } while (0) -static int decode_opaque_inline(struct xdr_stream *xdr, unsigned int *len, char **string) +static int decode_opaque_inline(struct xdr_stream *xdr, uint32_t *len, char **string) { uint32_t *p; @@ -2127,15 +2079,15 @@ static int decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected) } READ32(nfserr); if (nfserr != NFS_OK) - return -nfs4_stat_to_errno(nfserr); + return -nfs_stat_to_errno(nfserr); return 0; } /* Dummy routine */ -static int decode_ace(struct xdr_stream *xdr, void *ace, struct nfs_client *clp) +static int decode_ace(struct xdr_stream *xdr, void *ace, struct nfs4_client *clp) { uint32_t *p; - unsigned int strlen; + uint32_t strlen; char *str; READ_BUF(12); @@ -2265,7 +2217,7 @@ static int decode_attr_symlink_support(struct xdr_stream *xdr, uint32_t *bitmap, return 0; } -static int decode_attr_fsid(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_fsid *fsid) +static int decode_attr_fsid(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_fsid *fsid) { uint32_t *p; @@ -2333,22 +2285,6 @@ static int decode_attr_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t return 0; } -static int decode_attr_mounted_on_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid) -{ - uint32_t *p; - - *fileid = 0; - if (unlikely(bitmap[1] & (FATTR4_WORD1_MOUNTED_ON_FILEID - 1U))) - return -EIO; - if (likely(bitmap[1] & FATTR4_WORD1_MOUNTED_ON_FILEID)) { - READ_BUF(8); - READ64(*fileid); - bitmap[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID; - } - dprintk("%s: fileid=%Lu\n", __FUNCTION__, (unsigned long long)*fileid); - return 0; -} - static int decode_attr_files_avail(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res) { uint32_t *p; @@ -2400,116 +2336,6 @@ static int decode_attr_files_total(struct xdr_stream *xdr, uint32_t *bitmap, uin return status; } -static int decode_pathname(struct xdr_stream *xdr, struct nfs4_pathname *path) -{ - int n; - uint32_t *p; - int status = 0; - - READ_BUF(4); - READ32(n); - if (n < 0) - goto out_eio; - if (n == 0) - goto root_path; - dprintk("path "); - path->ncomponents = 0; - while (path->ncomponents < n) { - struct nfs4_string *component = &path->components[path->ncomponents]; - status = decode_opaque_inline(xdr, &component->len, &component->data); - if (unlikely(status != 0)) - goto out_eio; - if (path->ncomponents != n) - dprintk("/"); - dprintk("%s", component->data); - if (path->ncomponents < NFS4_PATHNAME_MAXCOMPONENTS) - path->ncomponents++; - else { - dprintk("cannot parse %d components in path\n", n); - goto out_eio; - } - } -out: - dprintk("\n"); - return status; -root_path: -/* a root pathname is sent as a zero component4 */ - path->ncomponents = 1; - path->components[0].len=0; - path->components[0].data=NULL; - dprintk("path /\n"); - goto out; -out_eio: - dprintk(" status %d", status); - status = -EIO; - goto out; -} - -static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_fs_locations *res) -{ - int n; - uint32_t *p; - int status = -EIO; - - if (unlikely(bitmap[0] & (FATTR4_WORD0_FS_LOCATIONS -1U))) - goto out; - status = 0; - if (unlikely(!(bitmap[0] & FATTR4_WORD0_FS_LOCATIONS))) - goto out; - dprintk("%s: fsroot ", __FUNCTION__); - status = decode_pathname(xdr, &res->fs_path); - if (unlikely(status != 0)) - goto out; - READ_BUF(4); - READ32(n); - if (n <= 0) - goto out_eio; - res->nlocations = 0; - while (res->nlocations < n) { - int m; - struct nfs4_fs_location *loc = &res->locations[res->nlocations]; - - READ_BUF(4); - READ32(m); - if (m <= 0) - goto out_eio; - - loc->nservers = 0; - dprintk("%s: servers ", __FUNCTION__); - while (loc->nservers < m) { - struct nfs4_string *server = &loc->servers[loc->nservers]; - status = decode_opaque_inline(xdr, &server->len, &server->data); - if (unlikely(status != 0)) - goto out_eio; - dprintk("%s ", server->data); - if (loc->nservers < NFS4_FS_LOCATION_MAXSERVERS) - loc->nservers++; - else { - int i; - dprintk("%s: using first %d of %d servers returned for location %d\n", __FUNCTION__, NFS4_FS_LOCATION_MAXSERVERS, m, res->nlocations); - for (i = loc->nservers; i < m; i++) { - int len; - char *data; - status = decode_opaque_inline(xdr, &len, &data); - if (unlikely(status != 0)) - goto out_eio; - } - } - } - status = decode_pathname(xdr, &loc->rootpath); - if (unlikely(status != 0)) - goto out_eio; - if (res->nlocations < NFS4_FS_LOCATIONS_MAXENTRIES) - res->nlocations++; - } -out: - dprintk("%s: fs_locations done, error = %d\n", __FUNCTION__, status); - return status; -out_eio: - status = -EIO; - goto out; -} - static int decode_attr_maxfilesize(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *res) { uint32_t *p; @@ -2636,7 +2462,7 @@ static int decode_attr_nlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t return 0; } -static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *uid) +static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_client *clp, int32_t *uid) { uint32_t len, *p; @@ -2660,7 +2486,7 @@ static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nf return 0; } -static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *gid) +static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs4_client *clp, int32_t *gid) { uint32_t len, *p; @@ -3015,7 +2841,6 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons bitmap[2] = {0}, type; int status, fmode = 0; - uint64_t fileid; if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) goto xdr_error; @@ -3038,22 +2863,18 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons goto xdr_error; if ((status = decode_attr_size(xdr, bitmap, &fattr->size)) != 0) goto xdr_error; - if ((status = decode_attr_fsid(xdr, bitmap, &fattr->fsid)) != 0) + if ((status = decode_attr_fsid(xdr, bitmap, &fattr->fsid_u.nfs4)) != 0) goto xdr_error; if ((status = decode_attr_fileid(xdr, bitmap, &fattr->fileid)) != 0) goto xdr_error; - if ((status = decode_attr_fs_locations(xdr, bitmap, container_of(fattr, - struct nfs4_fs_locations, - fattr))) != 0) - goto xdr_error; if ((status = decode_attr_mode(xdr, bitmap, &fattr->mode)) != 0) goto xdr_error; fattr->mode |= fmode; if ((status = decode_attr_nlink(xdr, bitmap, &fattr->nlink)) != 0) goto xdr_error; - if ((status = decode_attr_owner(xdr, bitmap, server->nfs_client, &fattr->uid)) != 0) + if ((status = decode_attr_owner(xdr, bitmap, server->nfs4_state, &fattr->uid)) != 0) goto xdr_error; - if ((status = decode_attr_group(xdr, bitmap, server->nfs_client, &fattr->gid)) != 0) + if ((status = decode_attr_group(xdr, bitmap, server->nfs4_state, &fattr->gid)) != 0) goto xdr_error; if ((status = decode_attr_rdev(xdr, bitmap, &fattr->rdev)) != 0) goto xdr_error; @@ -3065,10 +2886,6 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons goto xdr_error; if ((status = decode_attr_time_modify(xdr, bitmap, &fattr->mtime)) != 0) goto xdr_error; - if ((status = decode_attr_mounted_on_fileid(xdr, bitmap, &fileid)) != 0) - goto xdr_error; - if (fattr->fileid == 0 && fileid != 0) - fattr->fileid = fileid; if ((status = verify_attr_len(xdr, savep, attrlen)) == 0) fattr->valid = NFS_ATTR_FATTR | NFS_ATTR_FATTR_V3 | NFS_ATTR_FATTR_V4; xdr_error: @@ -3254,7 +3071,7 @@ static int decode_delegation(struct xdr_stream *xdr, struct nfs_openres *res) if (decode_space_limit(xdr, &res->maxsize) < 0) return -EIO; } - return decode_ace(xdr, NULL, res->server->nfs_client); + return decode_ace(xdr, NULL, res->server->nfs4_state); } static int decode_open(struct xdr_stream *xdr, struct nfs_openres *res) @@ -3355,7 +3172,7 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n struct kvec *iov = rcvbuf->head; unsigned int nr, pglen = rcvbuf->page_len; uint32_t *end, *entry, *p, *kaddr; - uint32_t len, attrlen, xlen; + uint32_t len, attrlen; int hdrlen, recvd, status; status = decode_op_hdr(xdr, OP_READDIR); @@ -3377,10 +3194,10 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n BUG_ON(pglen + readdir->pgbase > PAGE_CACHE_SIZE); kaddr = p = (uint32_t *) kmap_atomic(page, KM_USER0); - end = p + ((pglen + readdir->pgbase) >> 2); + end = (uint32_t *) ((char *)p + pglen + readdir->pgbase); entry = p; for (nr = 0; *p++; nr++) { - if (end - p < 3) + if (p + 3 > end) goto short_pkt; dprintk("cookie = %Lu, ", *((unsigned long long *)p)); p += 2; /* cookie */ @@ -3389,19 +3206,18 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)\n", len); goto err_unmap; } - xlen = XDR_QUADLEN(len); - if (end - p < xlen + 1) - goto short_pkt; dprintk("filename = %*s\n", len, (char *)p); - p += xlen; - len = ntohl(*p++); /* bitmap length */ - if (end - p < len + 1) + p += XDR_QUADLEN(len); + if (p + 1 > end) goto short_pkt; + len = ntohl(*p++); /* bitmap length */ p += len; - attrlen = XDR_QUADLEN(ntohl(*p++)); - if (end - p < attrlen + 2) + if (p + 1 > end) goto short_pkt; + attrlen = XDR_QUADLEN(ntohl(*p++)); p += attrlen; /* attributes */ + if (p + 2 > end) + goto short_pkt; entry = p; } if (!nr && (entry[0] != 0 || entry[1] == 0)) @@ -3534,7 +3350,8 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req, attrlen, recvd); return -EINVAL; } - xdr_read_pages(xdr, attrlen); + if (attrlen <= *acl_len) + xdr_read_pages(xdr, attrlen); *acl_len = attrlen; } else status = -EOPNOTSUPP; @@ -3565,7 +3382,7 @@ static int decode_setattr(struct xdr_stream *xdr, struct nfs_setattrres *res) return 0; } -static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp) +static int decode_setclientid(struct xdr_stream *xdr, struct nfs4_client *clp) { uint32_t *p; uint32_t opnum; @@ -3598,7 +3415,7 @@ static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp) READ_BUF(len); return -NFSERR_CLID_INUSE; } else - return -nfs4_stat_to_errno(nfserr); + return -nfs_stat_to_errno(nfserr); return 0; } @@ -4256,7 +4073,7 @@ static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, uint32_t *p, struct nfs_fsi if (!status) status = decode_fsinfo(&xdr, fsinfo); if (!status) - status = -nfs4_stat_to_errno(hdr.status); + status = -nfs_stat_to_errno(hdr.status); return status; } @@ -4335,7 +4152,7 @@ static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, uint32_t *p, void *dummy) * a SETCLIENTID request */ static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req, uint32_t *p, - struct nfs_client *clp) + struct nfs4_client *clp) { struct xdr_stream xdr; struct compound_hdr hdr; @@ -4346,7 +4163,7 @@ static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req, uint32_t *p, if (!status) status = decode_setclientid(&xdr, clp); if (!status) - status = -nfs4_stat_to_errno(hdr.status); + status = -nfs_stat_to_errno(hdr.status); return status; } @@ -4368,7 +4185,7 @@ static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req, uint32_t *p, s if (!status) status = decode_fsinfo(&xdr, fsinfo); if (!status) - status = -nfs4_stat_to_errno(hdr.status); + status = -nfs_stat_to_errno(hdr.status); return status; } @@ -4394,29 +4211,6 @@ out: return status; } -/* - * FS_LOCATIONS request - */ -static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req, uint32_t *p, struct nfs4_fs_locations *res) -{ - struct xdr_stream xdr; - struct compound_hdr hdr; - int status; - - xdr_init_decode(&xdr, &req->rq_rcv_buf, p); - status = decode_compound_hdr(&xdr, &hdr); - if (status != 0) - goto out; - if ((status = decode_putfh(&xdr)) != 0) - goto out; - if ((status = decode_lookup(&xdr)) != 0) - goto out; - xdr_enter_page(&xdr, PAGE_SIZE); - status = decode_getfattr(&xdr, &res->fattr, res->server); -out: - return status; -} - uint32_t *nfs4_decode_dirent(uint32_t *p, struct nfs_entry *entry, int plus) { uint32_t bitmap[2] = {0}; @@ -4521,7 +4315,7 @@ static struct { * This one is used jointly by NFSv2 and NFSv3. */ static int -nfs4_stat_to_errno(int stat) +nfs_stat_to_errno(int stat) { int i; for (i = 0; nfs_errtbl[i].stat != -1; i++) { @@ -4588,7 +4382,6 @@ struct rpc_procinfo nfs4_procedures[] = { PROC(DELEGRETURN, enc_delegreturn, dec_delegreturn), PROC(GETACL, enc_getacl, dec_getacl), PROC(SETACL, enc_setacl, dec_setacl), - PROC(FS_LOCATIONS, enc_fs_locations, dec_fs_locations), }; struct rpc_version nfs_version4 = { diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index aa0cd586d..095fe662f 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -69,6 +69,7 @@ * Fabian Frederick: Option parser rebuilt (using parser lib) */ +#include #include #include #include diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index c45f724f1..106aca388 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include "internal.h" #define NFS_PARANOIA 1 @@ -85,7 +85,7 @@ nfs_create_request(struct nfs_open_context *ctx, struct inode *inode, atomic_set(&req->wb_complete, 0); req->wb_index = page->index; page_cache_get(page); - BUG_ON(PageNfsWriting(page)); + BUG_ON(PagePrivate(page)); BUG_ON(!PageLocked(page)); BUG_ON(page->mapping->host != inode); req->wb_offset = offset; @@ -315,7 +315,6 @@ nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst, req->wb_index, NFS_PAGE_TAG_DIRTY); nfs_list_remove_request(req); nfs_list_add_request(req, dst); - dec_zone_page_state(req->wb_page, NR_FILE_DIRTY); res++; } } @@ -326,7 +325,6 @@ out: /** * nfs_scan_list - Scan a list for matching requests - * @nfsi: NFS inode * @head: One of the NFS inode request lists * @dst: Destination list * @idx_start: lower bound of page->index to scan @@ -338,15 +336,14 @@ out: * The requests are *not* checked to ensure that they form a contiguous set. * You must be holding the inode's req_lock when calling this function */ -int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, - struct list_head *dst, unsigned long idx_start, - unsigned int npages) +int +nfs_scan_list(struct list_head *head, struct list_head *dst, + unsigned long idx_start, unsigned int npages) { - struct nfs_page *pgvec[NFS_SCAN_MAXENTRIES]; - struct nfs_page *req; - unsigned long idx_end; - int found, i; - int res; + struct list_head *pos, *tmp; + struct nfs_page *req; + unsigned long idx_end; + int res; res = 0; if (npages == 0) @@ -354,32 +351,25 @@ int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, else idx_end = idx_start + npages - 1; - for (;;) { - found = radix_tree_gang_lookup(&nfsi->nfs_page_tree, - (void **)&pgvec[0], idx_start, - NFS_SCAN_MAXENTRIES); - if (found <= 0) + list_for_each_safe(pos, tmp, head) { + + req = nfs_list_entry(pos); + + if (req->wb_index < idx_start) + continue; + if (req->wb_index > idx_end) break; - for (i = 0; i < found; i++) { - req = pgvec[i]; - if (req->wb_index > idx_end) - goto out; - idx_start = req->wb_index + 1; - if (req->wb_list_head != head) - continue; - if (nfs_set_page_writeback_locked(req)) { - nfs_list_remove_request(req); - nfs_list_add_request(req, dst); - res++; - } - } + if (!nfs_set_page_writeback_locked(req)) + continue; + nfs_list_remove_request(req); + nfs_list_add_request(req, dst); + res++; } -out: return res; } -int __init nfs_init_nfspagecache(void) +int nfs_init_nfspagecache(void) { nfs_page_cachep = kmem_cache_create("nfs_page", sizeof(struct nfs_page), diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 5a8b9407e..9dd85cac2 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c @@ -44,10 +44,11 @@ #include #include #include -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_PROC +extern struct rpc_procinfo nfs_procedures[]; + /* * Bare-bones access to getattr: this is for nfs_read_super. */ @@ -66,14 +67,14 @@ nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, dprintk("%s: call getattr\n", __FUNCTION__); nfs_fattr_init(fattr); - status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); + status = rpc_call_sync(server->client_sys, &msg, 0); dprintk("%s: reply getattr: %d\n", __FUNCTION__, status); if (status) return status; dprintk("%s: call statfs\n", __FUNCTION__); msg.rpc_proc = &nfs_procedures[NFSPROC_STATFS]; msg.rpc_resp = &fsinfo; - status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); + status = rpc_call_sync(server->client_sys, &msg, 0); dprintk("%s: reply statfs: %d\n", __FUNCTION__, status); if (status) return status; @@ -610,6 +611,8 @@ nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle, return 0; } +extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int); + static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data) { if (task->tk_status >= 0) { @@ -671,7 +674,7 @@ nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl) } -const struct nfs_rpc_ops nfs_v2_clientops = { +struct nfs_rpc_ops nfs_v2_clientops = { .version = 2, /* protocol version */ .dentry_ops = &nfs_dentry_operations, .dir_inode_ops = &nfs_dir_inode_operations, diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 30115bd49..624ca7146 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -15,6 +15,7 @@ * within the RPC code when root squashing is suspected. */ +#include #include #include #include @@ -26,13 +27,11 @@ #include #include #include -#include #include #include #include "iostat.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_PAGECACHE @@ -45,20 +44,21 @@ static mempool_t *nfs_rdata_mempool; #define MIN_POOL_READ (32) -struct nfs_read_data *nfs_readdata_alloc(size_t len) +struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) { - unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT; struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); if (p) { memset(p, 0, sizeof(*p)); INIT_LIST_HEAD(&p->pages); - p->npages = pagecount; - if (pagecount <= ARRAY_SIZE(p->page_array)) - p->pagevec = p->page_array; + if (pagecount < NFS_PAGEVEC_SIZE) + p->pagevec = &p->page_array[0]; else { - p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS); - if (!p->pagevec) { + size_t size = ++pagecount * sizeof(struct page *); + p->pagevec = kmalloc(size, GFP_NOFS); + if (p->pagevec) { + memset(p->pagevec, 0, size); + } else { mempool_free(p, nfs_rdata_mempool); p = NULL; } @@ -67,7 +67,7 @@ struct nfs_read_data *nfs_readdata_alloc(size_t len) return p; } -static void nfs_readdata_free(struct nfs_read_data *p) +void nfs_readdata_free(struct nfs_read_data *p) { if (p && (p->pagevec != &p->page_array[0])) kfree(p->pagevec); @@ -104,35 +104,6 @@ int nfs_return_empty_page(struct page *page) return 0; } -static void nfs_readpage_truncate_uninitialised_page(struct nfs_read_data *data) -{ - unsigned int remainder = data->args.count - data->res.count; - unsigned int base = data->args.pgbase + data->res.count; - unsigned int pglen; - struct page **pages; - - if (data->res.eof == 0 || remainder == 0) - return; - /* - * Note: "remainder" can never be negative, since we check for - * this in the XDR code. - */ - pages = &data->args.pages[base >> PAGE_CACHE_SHIFT]; - base &= ~PAGE_CACHE_MASK; - pglen = PAGE_CACHE_SIZE - base; - for (;;) { - if (remainder <= pglen) { - memclear_highpage_flush(*pages, base, remainder); - break; - } - memclear_highpage_flush(*pages, base, pglen); - pages++; - remainder -= pglen; - pglen = PAGE_CACHE_SIZE; - base = 0; - } -} - /* * Read a page synchronously. */ @@ -144,7 +115,7 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, int result; struct nfs_read_data *rdata; - rdata = nfs_readdata_alloc(count); + rdata = nfs_readdata_alloc(1); if (!rdata) return -ENOMEM; @@ -173,7 +144,7 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, rdata->args.offset = page_offset(page) + rdata->args.pgbase; dprintk("NFS: nfs_proc_read(%s, (%s/%Ld), %Lu, %u)\n", - NFS_SERVER(inode)->nfs_client->cl_hostname, + NFS_SERVER(inode)->hostname, inode->i_sb->s_id, (long long)NFS_FILEID(inode), (unsigned long long)rdata->args.pgbase, @@ -206,25 +177,20 @@ static int nfs_readpage_sync(struct nfs_open_context *ctx, struct inode *inode, NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATIME; spin_unlock(&inode->i_lock); - if (rdata->res.eof || rdata->res.count == rdata->args.count) { - SetPageUptodate(page); - if (rdata->res.eof && count != 0) - memclear_highpage_flush(page, rdata->args.pgbase, count); - } + if (count) + memclear_highpage_flush(page, rdata->args.pgbase, count); + SetPageUptodate(page); + if (PageError(page)) + ClearPageError(page); result = 0; - nfs_readpage_to_fscache(inode, page, 1); - unlock_page(page); - - return result; - io_error: unlock_page(page); nfs_readdata_free(rdata); return result; } -int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, +static int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, struct page *page) { LIST_HEAD(one_request); @@ -249,11 +215,6 @@ int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, static void nfs_readpage_release(struct nfs_page *req) { - struct inode *d_inode = req->wb_context->dentry->d_inode; - - if (PageUptodate(req->wb_page)) - nfs_readpage_to_fscache(d_inode, req->wb_page, 0); - unlock_page(req->wb_page); dprintk("NFS: read done (%s/%Ld %d@%Ld)\n", @@ -352,25 +313,25 @@ static int nfs_pagein_multi(struct list_head *head, struct inode *inode) struct nfs_page *req = nfs_list_entry(head->next); struct page *page = req->wb_page; struct nfs_read_data *data; - size_t rsize = NFS_SERVER(inode)->rsize, nbytes; - unsigned int offset; + unsigned int rsize = NFS_SERVER(inode)->rsize; + unsigned int nbytes, offset; int requests = 0; LIST_HEAD(list); nfs_list_remove_request(req); nbytes = req->wb_bytes; - do { - size_t len = min(nbytes,rsize); - - data = nfs_readdata_alloc(len); + for(;;) { + data = nfs_readdata_alloc(1); if (!data) goto out_bad; INIT_LIST_HEAD(&data->pages); list_add(&data->pages, &list); requests++; - nbytes -= len; - } while(nbytes != 0); + if (nbytes <= rsize) + break; + nbytes -= rsize; + } atomic_set(&req->wb_complete, requests); ClearPageError(page); @@ -418,7 +379,7 @@ static int nfs_pagein_one(struct list_head *head, struct inode *inode) if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) return nfs_pagein_multi(head, inode); - data = nfs_readdata_alloc(NFS_SERVER(inode)->rsize); + data = nfs_readdata_alloc(NFS_SERVER(inode)->rpages); if (!data) goto out_bad; @@ -475,12 +436,20 @@ static void nfs_readpage_result_partial(struct rpc_task *task, void *calldata) struct nfs_page *req = data->req; struct page *page = req->wb_page; - if (likely(task->tk_status >= 0)) - nfs_readpage_truncate_uninitialised_page(data); - else - SetPageError(page); if (nfs_readpage_result(task, data) != 0) return; + if (task->tk_status >= 0) { + unsigned int request = data->args.count; + unsigned int result = data->res.count; + + if (result < request) { + memclear_highpage_flush(page, + data->args.pgbase + result, + request - result); + } + } else + SetPageError(page); + if (atomic_dec_and_test(&req->wb_complete)) { if (!PageError(page)) SetPageUptodate(page); @@ -493,40 +462,6 @@ static const struct rpc_call_ops nfs_read_partial_ops = { .rpc_release = nfs_readdata_release, }; -static void nfs_readpage_set_pages_uptodate(struct nfs_read_data *data) -{ - unsigned int count = data->res.count; - unsigned int base = data->args.pgbase; - struct page **pages; - - if (data->res.eof) - count = data->args.count; - if (unlikely(count == 0)) - return; - pages = &data->args.pages[base >> PAGE_CACHE_SHIFT]; - base &= ~PAGE_CACHE_MASK; - count += base; - for (;count >= PAGE_CACHE_SIZE; count -= PAGE_CACHE_SIZE, pages++) - SetPageUptodate(*pages); - if (count != 0) - SetPageUptodate(*pages); -} - -static void nfs_readpage_set_pages_error(struct nfs_read_data *data) -{ - unsigned int count = data->args.count; - unsigned int base = data->args.pgbase; - struct page **pages; - - pages = &data->args.pages[base >> PAGE_CACHE_SHIFT]; - base &= ~PAGE_CACHE_MASK; - count += base; - for (;count >= PAGE_CACHE_SIZE; count -= PAGE_CACHE_SIZE, pages++) - SetPageError(*pages); - if (count != 0) - SetPageError(*pages); -} - /* * This is the callback from RPC telling us whether a reply was * received or some error occurred (timeout or socket shutdown). @@ -534,24 +469,27 @@ static void nfs_readpage_set_pages_error(struct nfs_read_data *data) static void nfs_readpage_result_full(struct rpc_task *task, void *calldata) { struct nfs_read_data *data = calldata; + unsigned int count = data->res.count; - /* - * Note: nfs_readpage_result may change the values of - * data->args. In the multi-page case, we therefore need - * to ensure that we call the next nfs_readpage_set_page_uptodate() - * first in the multi-page case. - */ - if (likely(task->tk_status >= 0)) { - nfs_readpage_truncate_uninitialised_page(data); - nfs_readpage_set_pages_uptodate(data); - } else - nfs_readpage_set_pages_error(data); if (nfs_readpage_result(task, data) != 0) return; while (!list_empty(&data->pages)) { struct nfs_page *req = nfs_list_entry(data->pages.next); - + struct page *page = req->wb_page; nfs_list_remove_request(req); + + if (task->tk_status >= 0) { + if (count < PAGE_CACHE_SIZE) { + if (count < req->wb_bytes) + memclear_highpage_flush(page, + req->wb_pgbase + count, + req->wb_bytes - count); + count = 0; + } else + count -= PAGE_CACHE_SIZE; + SetPageUptodate(page); + } else + SetPageError(page); nfs_readpage_release(req); } } @@ -636,10 +574,6 @@ int nfs_readpage(struct file *file, struct page *page) ctx = get_nfs_open_context((struct nfs_open_context *) file->private_data); if (!IS_SYNC(inode)) { - error = nfs_readpage_from_fscache(ctx, inode, page); - if (error == 0) - goto out; - error = nfs_readpage_async(ctx, inode, page); goto out; } @@ -670,7 +604,6 @@ readpage_async_filler(void *data, struct page *page) unsigned int len; nfs_wb_page(inode, page); - len = nfs_page_length(inode, page); if (len == 0) return nfs_return_empty_page(page); @@ -710,17 +643,6 @@ int nfs_readpages(struct file *filp, struct address_space *mapping, } else desc.ctx = get_nfs_open_context((struct nfs_open_context *) filp->private_data); - - /* attempt to read as many of the pages as possible from the cache - * - this returns -ENOBUFS immediately if the cookie is negative - */ - ret = nfs_readpages_from_fscache(desc.ctx, inode, mapping, - pages, &nr_pages); - if (ret == 0) { - put_nfs_open_context(desc.ctx); - return ret; /* all read */ - } - ret = read_cache_pages(mapping, pages, readpage_async_filler, &desc); if (!list_empty(&head)) { int err = nfs_pagein_list(&head, server->rpages); @@ -732,7 +654,7 @@ int nfs_readpages(struct file *filp, struct address_space *mapping, return ret; } -int __init nfs_init_readpagecache(void) +int nfs_init_readpagecache(void) { nfs_rdata_cachep = kmem_cache_create("nfs_read_data", sizeof(struct nfs_read_data), diff --git a/fs/nfs/super.c b/fs/nfs/super.c deleted file mode 100644 index 62e627b47..000000000 --- a/fs/nfs/super.c +++ /dev/null @@ -1,1068 +0,0 @@ -/* - * linux/fs/nfs/super.c - * - * Copyright (C) 1992 Rick Sladkey - * - * nfs superblock handling functions - * - * Modularised by Alan Cox , while hacking some - * experimental NFS changes. Modularisation taken straight from SYS5 fs. - * - * Change to nfs_read_super() to permit NFS mounts to multi-homed hosts. - * J.S.Peatfield@damtp.cam.ac.uk - * - * Split from inode.c by David Howells - * - * - superblocks are indexed on server only - all inodes, dentries, etc. associated with a - * particular server are held in the same superblock - * - NFS superblocks can have several effective roots to the dentry tree - * - directory type roots are spliced into the tree when a path from one root reaches the root - * of another (see nfs_lookup()) - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "nfs4_fs.h" -#include "callback.h" -#include "delegation.h" -#include "iostat.h" -#include "internal.h" - -#define NFSDBG_FACILITY NFSDBG_VFS - -static void nfs_umount_begin(struct vfsmount *, int); -static int nfs_statfs(struct dentry *, struct kstatfs *); -static int nfs_show_options(struct seq_file *, struct vfsmount *); -static int nfs_show_stats(struct seq_file *, struct vfsmount *); -static int nfs_get_sb(struct file_system_type *, int, const char *, void *, struct vfsmount *); -static int nfs_xdev_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); -static void nfs_kill_super(struct super_block *); - -static struct file_system_type nfs_fs_type = { - .owner = THIS_MODULE, - .name = "nfs", - .get_sb = nfs_get_sb, - .kill_sb = nfs_kill_super, - .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, -}; - -struct file_system_type nfs_xdev_fs_type = { - .owner = THIS_MODULE, - .name = "nfs", - .get_sb = nfs_xdev_get_sb, - .kill_sb = nfs_kill_super, - .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, -}; - -static struct super_operations nfs_sops = { - .alloc_inode = nfs_alloc_inode, - .destroy_inode = nfs_destroy_inode, - .write_inode = nfs_write_inode, - .statfs = nfs_statfs, - .clear_inode = nfs_clear_inode, - .umount_begin = nfs_umount_begin, - .show_options = nfs_show_options, - .show_stats = nfs_show_stats, -}; - -#ifdef CONFIG_NFS_V4 -static int nfs4_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); -static int nfs4_xdev_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); -static int nfs4_referral_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt); -static void nfs4_kill_super(struct super_block *sb); - -static struct file_system_type nfs4_fs_type = { - .owner = THIS_MODULE, - .name = "nfs4", - .get_sb = nfs4_get_sb, - .kill_sb = nfs4_kill_super, - .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, -}; - -struct file_system_type nfs4_xdev_fs_type = { - .owner = THIS_MODULE, - .name = "nfs4", - .get_sb = nfs4_xdev_get_sb, - .kill_sb = nfs4_kill_super, - .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, -}; - -struct file_system_type nfs4_referral_fs_type = { - .owner = THIS_MODULE, - .name = "nfs4", - .get_sb = nfs4_referral_get_sb, - .kill_sb = nfs4_kill_super, - .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, -}; - -static struct super_operations nfs4_sops = { - .alloc_inode = nfs_alloc_inode, - .destroy_inode = nfs_destroy_inode, - .write_inode = nfs_write_inode, - .statfs = nfs_statfs, - .clear_inode = nfs4_clear_inode, - .umount_begin = nfs_umount_begin, - .show_options = nfs_show_options, - .show_stats = nfs_show_stats, -}; -#endif - -/* - * Register the NFS filesystems - */ -int __init register_nfs_fs(void) -{ - int ret; - - ret = register_filesystem(&nfs_fs_type); - if (ret < 0) - goto error_0; - -#ifdef CONFIG_NFS_V4 - ret = nfs_register_sysctl(); - if (ret < 0) - goto error_1; - ret = register_filesystem(&nfs4_fs_type); - if (ret < 0) - goto error_2; -#endif - return 0; - -#ifdef CONFIG_NFS_V4 -error_2: - nfs_unregister_sysctl(); -error_1: - unregister_filesystem(&nfs_fs_type); -#endif -error_0: - return ret; -} - -/* - * Unregister the NFS filesystems - */ -void __exit unregister_nfs_fs(void) -{ -#ifdef CONFIG_NFS_V4 - unregister_filesystem(&nfs4_fs_type); - nfs_unregister_sysctl(); -#endif - unregister_filesystem(&nfs_fs_type); -} - -/* - * Deliver file system statistics to userspace - */ -static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) -{ - struct nfs_server *server = NFS_SB(dentry->d_sb); - unsigned char blockbits; - unsigned long blockres; - struct nfs_fh *fh = NFS_FH(dentry->d_inode); - struct nfs_fattr fattr; - struct nfs_fsstat res = { - .fattr = &fattr, - }; - int error; - - lock_kernel(); - - error = server->nfs_client->rpc_ops->statfs(server, fh, &res); - buf->f_type = NFS_SUPER_MAGIC; - if (error < 0) - goto out_err; - - /* - * Current versions of glibc do not correctly handle the - * case where f_frsize != f_bsize. Eventually we want to - * report the value of wtmult in this field. - */ - buf->f_frsize = dentry->d_sb->s_blocksize; - - /* - * On most *nix systems, f_blocks, f_bfree, and f_bavail - * are reported in units of f_frsize. Linux hasn't had - * an f_frsize field in its statfs struct until recently, - * thus historically Linux's sys_statfs reports these - * fields in units of f_bsize. - */ - buf->f_bsize = dentry->d_sb->s_blocksize; - blockbits = dentry->d_sb->s_blocksize_bits; - blockres = (1 << blockbits) - 1; - buf->f_blocks = (res.tbytes + blockres) >> blockbits; - buf->f_bfree = (res.fbytes + blockres) >> blockbits; - buf->f_bavail = (res.abytes + blockres) >> blockbits; - - buf->f_files = res.tfiles; - buf->f_ffree = res.afiles; - - buf->f_namelen = server->namelen; - out: - unlock_kernel(); - return 0; - - out_err: - dprintk("%s: statfs error = %d\n", __FUNCTION__, -error); - buf->f_bsize = buf->f_blocks = buf->f_bfree = buf->f_bavail = -1; - goto out; - -} - -/* - * Map the security flavour number to a name - */ -static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour) -{ - static const struct { - rpc_authflavor_t flavour; - const char *str; - } sec_flavours[] = { - { RPC_AUTH_NULL, "null" }, - { RPC_AUTH_UNIX, "sys" }, - { RPC_AUTH_GSS_KRB5, "krb5" }, - { RPC_AUTH_GSS_KRB5I, "krb5i" }, - { RPC_AUTH_GSS_KRB5P, "krb5p" }, - { RPC_AUTH_GSS_LKEY, "lkey" }, - { RPC_AUTH_GSS_LKEYI, "lkeyi" }, - { RPC_AUTH_GSS_LKEYP, "lkeyp" }, - { RPC_AUTH_GSS_SPKM, "spkm" }, - { RPC_AUTH_GSS_SPKMI, "spkmi" }, - { RPC_AUTH_GSS_SPKMP, "spkmp" }, - { -1, "unknown" } - }; - int i; - - for (i=0; sec_flavours[i].flavour != -1; i++) { - if (sec_flavours[i].flavour == flavour) - break; - } - return sec_flavours[i].str; -} - -/* - * Describe the mount options in force on this server representation - */ -static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, int showdefaults) -{ - static const struct proc_nfs_info { - int flag; - const char *str; - const char *nostr; - } nfs_info[] = { - { NFS_MOUNT_SOFT, ",soft", ",hard" }, - { NFS_MOUNT_INTR, ",intr", "" }, - { NFS_MOUNT_NOCTO, ",nocto", "" }, - { NFS_MOUNT_NOAC, ",noac", "" }, - { NFS_MOUNT_NONLM, ",nolock", "" }, - { NFS_MOUNT_NOACL, ",noacl", "" }, - { NFS_MOUNT_FSCACHE, ",fsc", "" }, - { NFS_MOUNT_TAGXID, ",tagxid", "" }, - { 0, NULL, NULL } - }; - const struct proc_nfs_info *nfs_infop; - struct nfs_client *clp = nfss->nfs_client; - char buf[12]; - const char *proto; - - seq_printf(m, ",vers=%d", clp->rpc_ops->version); - seq_printf(m, ",rsize=%d", nfss->rsize); - seq_printf(m, ",wsize=%d", nfss->wsize); - if (nfss->acregmin != 3*HZ || showdefaults) - seq_printf(m, ",acregmin=%d", nfss->acregmin/HZ); - if (nfss->acregmax != 60*HZ || showdefaults) - seq_printf(m, ",acregmax=%d", nfss->acregmax/HZ); - if (nfss->acdirmin != 30*HZ || showdefaults) - seq_printf(m, ",acdirmin=%d", nfss->acdirmin/HZ); - if (nfss->acdirmax != 60*HZ || showdefaults) - seq_printf(m, ",acdirmax=%d", nfss->acdirmax/HZ); - for (nfs_infop = nfs_info; nfs_infop->flag; nfs_infop++) { - if (nfss->flags & nfs_infop->flag) - seq_puts(m, nfs_infop->str); - else - seq_puts(m, nfs_infop->nostr); - } - switch (nfss->client->cl_xprt->prot) { - case IPPROTO_TCP: - proto = "tcp"; - break; - case IPPROTO_UDP: - proto = "udp"; - break; - default: - snprintf(buf, sizeof(buf), "%u", nfss->client->cl_xprt->prot); - proto = buf; - } - seq_printf(m, ",proto=%s", proto); - seq_printf(m, ",timeo=%lu", 10U * clp->retrans_timeo / HZ); - seq_printf(m, ",retrans=%u", clp->retrans_count); - seq_printf(m, ",sec=%s", nfs_pseudoflavour_to_name(nfss->client->cl_auth->au_flavor)); -} - -/* - * Describe the mount options on this VFS mountpoint - */ -static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) -{ - struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); - - nfs_show_mount_options(m, nfss, 0); - - seq_puts(m, ",addr="); - seq_escape(m, nfss->nfs_client->cl_hostname, " \t\n\\"); - - return 0; -} - -/* - * Present statistical information for this VFS mountpoint - */ -static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) -{ - int i, cpu; - struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); - struct rpc_auth *auth = nfss->client->cl_auth; - struct nfs_iostats totals = { }; - - seq_printf(m, "statvers=%s", NFS_IOSTAT_VERS); - - /* - * Display all mount option settings - */ - seq_printf(m, "\n\topts:\t"); - seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? "ro" : "rw"); - seq_puts(m, mnt->mnt_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); - seq_puts(m, mnt->mnt_sb->s_flags & MS_NOATIME ? ",noatime" : ""); - seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); - nfs_show_mount_options(m, nfss, 1); - - seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); - - seq_printf(m, "\n\tcaps:\t"); - seq_printf(m, "caps=0x%x", nfss->caps); - seq_printf(m, ",wtmult=%d", nfss->wtmult); - seq_printf(m, ",dtsize=%d", nfss->dtsize); - seq_printf(m, ",bsize=%d", nfss->bsize); - seq_printf(m, ",namelen=%d", nfss->namelen); - -#ifdef CONFIG_NFS_V4 - if (nfss->nfs_client->cl_nfsversion == 4) { - seq_printf(m, "\n\tnfsv4:\t"); - seq_printf(m, "bm0=0x%x", nfss->attr_bitmask[0]); - seq_printf(m, ",bm1=0x%x", nfss->attr_bitmask[1]); - seq_printf(m, ",acl=0x%x", nfss->acl_bitmask); - } -#endif - - /* - * Display security flavor in effect for this mount - */ - seq_printf(m, "\n\tsec:\tflavor=%d", auth->au_ops->au_flavor); - if (auth->au_flavor) - seq_printf(m, ",pseudoflavor=%d", auth->au_flavor); - - /* - * Display superblock I/O counters - */ - for_each_possible_cpu(cpu) { - struct nfs_iostats *stats; - - preempt_disable(); - stats = per_cpu_ptr(nfss->io_stats, cpu); - - for (i = 0; i < __NFSIOS_COUNTSMAX; i++) - totals.events[i] += stats->events[i]; - for (i = 0; i < __NFSIOS_BYTESMAX; i++) - totals.bytes[i] += stats->bytes[i]; - - preempt_enable(); - } - - seq_printf(m, "\n\tevents:\t"); - for (i = 0; i < __NFSIOS_COUNTSMAX; i++) - seq_printf(m, "%lu ", totals.events[i]); - seq_printf(m, "\n\tbytes:\t"); - for (i = 0; i < __NFSIOS_BYTESMAX; i++) - seq_printf(m, "%Lu ", totals.bytes[i]); - seq_printf(m, "\n"); - - rpc_print_iostats(m, nfss->client); - - return 0; -} - -/* - * Begin unmount by attempting to remove all automounted mountpoints we added - * in response to xdev traversals and referrals - */ -static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags) -{ - shrink_submounts(vfsmnt, &nfs_automount_list); -} - -/* - * Validate the NFS2/NFS3 mount data - * - fills in the mount root filehandle - */ -static int nfs_validate_mount_data(struct nfs_mount_data *data, - struct nfs_fh *mntfh) -{ - if (data == NULL) { - dprintk("%s: missing data argument\n", __FUNCTION__); - return -EINVAL; - } - - if (data->version <= 0 || data->version > NFS_MOUNT_VERSION) { - dprintk("%s: bad mount version\n", __FUNCTION__); - return -EINVAL; - } - - switch (data->version) { - case 1: - data->namlen = 0; - case 2: - data->bsize = 0; - case 3: - if (data->flags & NFS_MOUNT_VER3) { - dprintk("%s: mount structure version %d does not support NFSv3\n", - __FUNCTION__, - data->version); - return -EINVAL; - } - data->root.size = NFS2_FHSIZE; - memcpy(data->root.data, data->old_root.data, NFS2_FHSIZE); - case 4: - if (data->flags & NFS_MOUNT_SECFLAVOUR) { - dprintk("%s: mount structure version %d does not support strong security\n", - __FUNCTION__, - data->version); - return -EINVAL; - } - /* Fill in pseudoflavor for mount version < 5 */ - data->pseudoflavor = RPC_AUTH_UNIX; - case 5: - memset(data->context, 0, sizeof(data->context)); - } - -#ifndef CONFIG_NFS_V3 - /* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */ - if (data->flags & NFS_MOUNT_VER3) { - dprintk("%s: NFSv3 not compiled into kernel\n", __FUNCTION__); - return -EPROTONOSUPPORT; - } -#endif /* CONFIG_NFS_V3 */ - - /* We now require that the mount process passes the remote address */ - if (data->addr.sin_addr.s_addr == INADDR_ANY) { - dprintk("%s: mount program didn't pass remote address!\n", - __FUNCTION__); - return -EINVAL; - } - - /* Prepare the root filehandle */ - if (data->flags & NFS_MOUNT_VER3) - mntfh->size = data->root.size; - else - mntfh->size = NFS2_FHSIZE; - - if (mntfh->size > sizeof(mntfh->data)) { - dprintk("%s: invalid root filehandle\n", __FUNCTION__); - return -EINVAL; - } - - memcpy(mntfh->data, data->root.data, mntfh->size); - if (mntfh->size < sizeof(mntfh->data)) - memset(mntfh->data + mntfh->size, 0, - sizeof(mntfh->data) - mntfh->size); - - return 0; -} - -/* - * Initialise the common bits of the superblock - */ -static inline void nfs_initialise_sb(struct super_block *sb) -{ - struct nfs_server *server = NFS_SB(sb); - - sb->s_magic = NFS_SUPER_MAGIC; - - /* We probably want something more informative here */ - snprintf(sb->s_id, sizeof(sb->s_id), - "%x:%x", MAJOR(sb->s_dev), MINOR(sb->s_dev)); - - if (sb->s_blocksize == 0) - sb->s_blocksize = nfs_block_bits(server->wsize, - &sb->s_blocksize_bits); - - if (server->flags & NFS_MOUNT_NOAC) - sb->s_flags |= MS_SYNCHRONOUS; - if (server->flags & NFS_MOUNT_TAGXID) - sb->s_flags |= MS_TAGXID; - - nfs_super_set_maxbytes(sb, server->maxfilesize); -} - -/* - * Finish setting up an NFS2/3 superblock - */ -static void nfs_fill_super(struct super_block *sb, struct nfs_mount_data *data) -{ - struct nfs_server *server = NFS_SB(sb); - - sb->s_blocksize_bits = 0; - sb->s_blocksize = 0; - if (data->bsize) - sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits); - - if (server->flags & NFS_MOUNT_VER3) { - /* The VFS shouldn't apply the umask to mode bits. We will do - * so ourselves when necessary. - */ - sb->s_flags |= MS_POSIXACL; - sb->s_time_gran = 1; - } - - sb->s_op = &nfs_sops; - nfs_initialise_sb(sb); -} - -/* - * Finish setting up a cloned NFS2/3 superblock - */ -static void nfs_clone_super(struct super_block *sb, - const struct super_block *old_sb) -{ - struct nfs_server *server = NFS_SB(sb); - - sb->s_blocksize_bits = old_sb->s_blocksize_bits; - sb->s_blocksize = old_sb->s_blocksize; - sb->s_maxbytes = old_sb->s_maxbytes; - - if (server->flags & NFS_MOUNT_VER3) { - /* The VFS shouldn't apply the umask to mode bits. We will do - * so ourselves when necessary. - */ - sb->s_flags |= MS_POSIXACL; - sb->s_time_gran = 1; - } - - sb->s_op = old_sb->s_op; - nfs_initialise_sb(sb); -} - -static int nfs_set_super(struct super_block *s, void *_server) -{ - struct nfs_server *server = _server; - int ret; - - s->s_fs_info = server; - ret = set_anon_super(s, server); - if (ret == 0) - server->s_dev = s->s_dev; - return ret; -} - -static int nfs_compare_super(struct super_block *sb, void *data) -{ - struct nfs_server *server = data, *old = NFS_SB(sb); - - if (old->nfs_client != server->nfs_client) - return 0; - if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0) - return 0; - return 1; -} - -static int nfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt) -{ - struct nfs_server *server = NULL; - struct super_block *s; - struct nfs_fh mntfh; - struct nfs_mount_data *data = raw_data; - struct dentry *mntroot; - int error; - - /* Validate the mount data */ - error = nfs_validate_mount_data(data, &mntfh); - if (error < 0) - return error; - - /* Get a volume representation */ - server = nfs_create_server(data, &mntfh); - if (IS_ERR(server)) { - error = PTR_ERR(server); - goto out_err_noserver; - } - - /* Get a superblock - note that we may end up sharing one that already exists */ - s = sget(fs_type, nfs_compare_super, nfs_set_super, server); - if (IS_ERR(s)) { - error = PTR_ERR(s); - goto out_err_nosb; - } - - if (s->s_fs_info != server) { - nfs_free_server(server); - server = NULL; - } - - if (!s->s_root) { - /* initial superblock/root creation */ - s->s_flags = flags; - nfs_fill_super(s, data); - } - - mntroot = nfs_get_root(s, &mntfh); - if (IS_ERR(mntroot)) { - error = PTR_ERR(mntroot); - goto error_splat_super; - } - - s->s_flags |= MS_ACTIVE; - mnt->mnt_sb = s; - mnt->mnt_root = mntroot; - return 0; - -out_err_nosb: - nfs_free_server(server); -out_err_noserver: - return error; - -error_splat_super: - up_write(&s->s_umount); - deactivate_super(s); - return error; -} - -/* - * Destroy an NFS2/3 superblock - */ -static void nfs_kill_super(struct super_block *s) -{ - struct nfs_server *server = NFS_SB(s); - - kill_anon_super(s); - nfs_free_server(server); -} - -/* - * Clone an NFS2/3 server record on xdev traversal (FSID-change) - */ -static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *raw_data, - struct vfsmount *mnt) -{ - struct nfs_clone_mount *data = raw_data; - struct super_block *s; - struct nfs_server *server; - struct dentry *mntroot; - int error; - - dprintk("--> nfs_xdev_get_sb()\n"); - - /* create a new volume representation */ - server = nfs_clone_server(NFS_SB(data->sb), data->fh, data->fattr); - if (IS_ERR(server)) { - error = PTR_ERR(server); - goto out_err_noserver; - } - - /* Get a superblock - note that we may end up sharing one that already exists */ - s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); - if (IS_ERR(s)) { - error = PTR_ERR(s); - goto out_err_nosb; - } - - if (s->s_fs_info != server) { - nfs_free_server(server); - server = NULL; - } - - if (!s->s_root) { - /* initial superblock/root creation */ - s->s_flags = flags; - nfs_clone_super(s, data->sb); - } - - mntroot = nfs_get_root(s, data->fh); - if (IS_ERR(mntroot)) { - error = PTR_ERR(mntroot); - goto error_splat_super; - } - - s->s_flags |= MS_ACTIVE; - mnt->mnt_sb = s; - mnt->mnt_root = mntroot; - - dprintk("<-- nfs_xdev_get_sb() = 0\n"); - return 0; - -out_err_nosb: - nfs_free_server(server); -out_err_noserver: - dprintk("<-- nfs_xdev_get_sb() = %d [error]\n", error); - return error; - -error_splat_super: - up_write(&s->s_umount); - deactivate_super(s); - dprintk("<-- nfs_xdev_get_sb() = %d [splat]\n", error); - return error; -} - -#ifdef CONFIG_NFS_V4 - -/* - * Finish setting up a cloned NFS4 superblock - */ -static void nfs4_clone_super(struct super_block *sb, - const struct super_block *old_sb) -{ - sb->s_blocksize_bits = old_sb->s_blocksize_bits; - sb->s_blocksize = old_sb->s_blocksize; - sb->s_maxbytes = old_sb->s_maxbytes; - sb->s_time_gran = 1; - sb->s_op = old_sb->s_op; - nfs_initialise_sb(sb); -} - -/* - * Set up an NFS4 superblock - */ -static void nfs4_fill_super(struct super_block *sb) -{ - sb->s_time_gran = 1; - sb->s_op = &nfs4_sops; - nfs_initialise_sb(sb); -} - -static void *nfs_copy_user_string(char *dst, struct nfs_string *src, int maxlen) -{ - void *p = NULL; - - if (!src->len) - return ERR_PTR(-EINVAL); - if (src->len < maxlen) - maxlen = src->len; - if (dst == NULL) { - p = dst = kmalloc(maxlen + 1, GFP_KERNEL); - if (p == NULL) - return ERR_PTR(-ENOMEM); - } - if (copy_from_user(dst, src->data, maxlen)) { - kfree(p); - return ERR_PTR(-EFAULT); - } - dst[maxlen] = '\0'; - return dst; -} - -/* - * Get the superblock for an NFS4 mountpoint - */ -static int nfs4_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt) -{ - struct nfs4_mount_data *data = raw_data; - struct super_block *s; - struct nfs_server *server; - struct sockaddr_in addr; - rpc_authflavor_t authflavour; - struct nfs_fh mntfh; - struct dentry *mntroot; - char *mntpath = NULL, *hostname = NULL, ip_addr[16]; - void *p; - int error; - - if (data == NULL) { - dprintk("%s: missing data argument\n", __FUNCTION__); - return -EINVAL; - } - if (data->version <= 0 || data->version > NFS4_MOUNT_VERSION) { - dprintk("%s: bad mount version\n", __FUNCTION__); - return -EINVAL; - } - - /* We now require that the mount process passes the remote address */ - if (data->host_addrlen != sizeof(addr)) - return -EINVAL; - - if (copy_from_user(&addr, data->host_addr, sizeof(addr))) - return -EFAULT; - - if (addr.sin_family != AF_INET || - addr.sin_addr.s_addr == INADDR_ANY - ) { - dprintk("%s: mount program didn't pass remote IP address!\n", - __FUNCTION__); - return -EINVAL; - } - - /* Grab the authentication type */ - authflavour = RPC_AUTH_UNIX; - if (data->auth_flavourlen != 0) { - if (data->auth_flavourlen != 1) { - dprintk("%s: Invalid number of RPC auth flavours %d.\n", - __FUNCTION__, data->auth_flavourlen); - error = -EINVAL; - goto out_err_noserver; - } - - if (copy_from_user(&authflavour, data->auth_flavours, - sizeof(authflavour))) { - error = -EFAULT; - goto out_err_noserver; - } - } - - p = nfs_copy_user_string(NULL, &data->hostname, 256); - if (IS_ERR(p)) - goto out_err; - hostname = p; - - p = nfs_copy_user_string(NULL, &data->mnt_path, 1024); - if (IS_ERR(p)) - goto out_err; - mntpath = p; - - dprintk("MNTPATH: %s\n", mntpath); - - p = nfs_copy_user_string(ip_addr, &data->client_addr, - sizeof(ip_addr) - 1); - if (IS_ERR(p)) - goto out_err; - - /* Get a volume representation */ - server = nfs4_create_server(data, hostname, &addr, mntpath, ip_addr, - authflavour, &mntfh); - if (IS_ERR(server)) { - error = PTR_ERR(server); - goto out_err_noserver; - } - - /* Get a superblock - note that we may end up sharing one that already exists */ - s = sget(fs_type, nfs_compare_super, nfs_set_super, server); - if (IS_ERR(s)) { - error = PTR_ERR(s); - goto out_free; - } - - if (s->s_fs_info != server) { - nfs_free_server(server); - server = NULL; - } - - if (!s->s_root) { - /* initial superblock/root creation */ - s->s_flags = flags; - nfs4_fill_super(s); - } - - mntroot = nfs4_get_root(s, &mntfh); - if (IS_ERR(mntroot)) { - error = PTR_ERR(mntroot); - goto error_splat_super; - } - - s->s_flags |= MS_ACTIVE; - mnt->mnt_sb = s; - mnt->mnt_root = mntroot; - kfree(mntpath); - kfree(hostname); - return 0; - -out_err: - error = PTR_ERR(p); - goto out_err_noserver; - -out_free: - nfs_free_server(server); -out_err_noserver: - kfree(mntpath); - kfree(hostname); - return error; - -error_splat_super: - up_write(&s->s_umount); - deactivate_super(s); - goto out_err_noserver; -} - -static void nfs4_kill_super(struct super_block *sb) -{ - struct nfs_server *server = NFS_SB(sb); - - nfs_return_all_delegations(sb); - kill_anon_super(sb); - - nfs4_renewd_prepare_shutdown(server); - nfs_free_server(server); -} - -/* - * Clone an NFS4 server record on xdev traversal (FSID-change) - */ -static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *raw_data, - struct vfsmount *mnt) -{ - struct nfs_clone_mount *data = raw_data; - struct super_block *s; - struct nfs_server *server; - struct dentry *mntroot; - int error; - - dprintk("--> nfs4_xdev_get_sb()\n"); - - /* create a new volume representation */ - server = nfs_clone_server(NFS_SB(data->sb), data->fh, data->fattr); - if (IS_ERR(server)) { - error = PTR_ERR(server); - goto out_err_noserver; - } - - /* Get a superblock - note that we may end up sharing one that already exists */ - s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); - if (IS_ERR(s)) { - error = PTR_ERR(s); - goto out_err_nosb; - } - - if (s->s_fs_info != server) { - nfs_free_server(server); - server = NULL; - } - - if (!s->s_root) { - /* initial superblock/root creation */ - s->s_flags = flags; - nfs4_clone_super(s, data->sb); - } - - mntroot = nfs4_get_root(s, data->fh); - if (IS_ERR(mntroot)) { - error = PTR_ERR(mntroot); - goto error_splat_super; - } - - s->s_flags |= MS_ACTIVE; - mnt->mnt_sb = s; - mnt->mnt_root = mntroot; - - dprintk("<-- nfs4_xdev_get_sb() = 0\n"); - return 0; - -out_err_nosb: - nfs_free_server(server); -out_err_noserver: - dprintk("<-- nfs4_xdev_get_sb() = %d [error]\n", error); - return error; - -error_splat_super: - up_write(&s->s_umount); - deactivate_super(s); - dprintk("<-- nfs4_xdev_get_sb() = %d [splat]\n", error); - return error; -} - -/* - * Create an NFS4 server record on referral traversal - */ -static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *raw_data, - struct vfsmount *mnt) -{ - struct nfs_clone_mount *data = raw_data; - struct super_block *s; - struct nfs_server *server; - struct dentry *mntroot; - struct nfs_fh mntfh; - int error; - - dprintk("--> nfs4_referral_get_sb()\n"); - - /* create a new volume representation */ - server = nfs4_create_referral_server(data, &mntfh); - if (IS_ERR(server)) { - error = PTR_ERR(server); - goto out_err_noserver; - } - - /* Get a superblock - note that we may end up sharing one that already exists */ - s = sget(&nfs_fs_type, nfs_compare_super, nfs_set_super, server); - if (IS_ERR(s)) { - error = PTR_ERR(s); - goto out_err_nosb; - } - - if (s->s_fs_info != server) { - nfs_free_server(server); - server = NULL; - } - - if (!s->s_root) { - /* initial superblock/root creation */ - s->s_flags = flags; - nfs4_fill_super(s); - } - - mntroot = nfs4_get_root(s, data->fh); - if (IS_ERR(mntroot)) { - error = PTR_ERR(mntroot); - goto error_splat_super; - } - - s->s_flags |= MS_ACTIVE; - mnt->mnt_sb = s; - mnt->mnt_root = mntroot; - - dprintk("<-- nfs4_referral_get_sb() = 0\n"); - return 0; - -out_err_nosb: - nfs_free_server(server); -out_err_noserver: - dprintk("<-- nfs4_referral_get_sb() = %d [error]\n", error); - return error; - -error_splat_super: - up_write(&s->s_umount); - deactivate_super(s); - dprintk("<-- nfs4_referral_get_sb() = %d [splat]\n", error); - return error; -} - -#endif /* CONFIG_NFS_V4 */ diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c index 600bbe630..18dc95b0b 100644 --- a/fs/nfs/symlink.c +++ b/fs/nfs/symlink.c @@ -52,7 +52,7 @@ static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd) { struct inode *inode = dentry->d_inode; struct page *page; - void *err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping)); + void *err = ERR_PTR(nfs_revalidate_inode(NFS_SERVER(inode), inode)); if (err) goto read_failed; page = read_cache_page(&inode->i_data, 0, @@ -75,13 +75,22 @@ read_failed: return NULL; } +static void nfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) +{ + if (cookie) { + struct page *page = cookie; + kunmap(page); + page_cache_release(page); + } +} + /* * symlinks can't do much... */ struct inode_operations nfs_symlink_inode_operations = { .readlink = generic_readlink, .follow_link = nfs_follow_link, - .put_link = page_put_link, + .put_link = nfs_put_link, .getattr = nfs_getattr, .setattr = nfs_setattr, }; diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c index 7a25a6d16..4c486eb86 100644 --- a/fs/nfs/sysctl.c +++ b/fs/nfs/sysctl.c @@ -3,6 +3,7 @@ * * Sysctl interface to NFS parameters */ +#include #include #include #include @@ -11,10 +12,8 @@ #include #include #include -#include #include "callback.h" -#include "internal.h" static const int nfs_set_port_min = 0; static const int nfs_set_port_max = 65535; @@ -46,57 +45,6 @@ static ctl_table nfs_cb_sysctls[] = { .proc_handler = &proc_dointvec_jiffies, .strategy = &sysctl_jiffies, }, -#endif - { - .ctl_name = CTL_UNNUMBERED, - .procname = "nfs_mountpoint_timeout", - .data = &nfs_mountpoint_expiry_timeout, - .maxlen = sizeof(nfs_mountpoint_expiry_timeout), - .mode = 0644, - .proc_handler = &proc_dointvec_jiffies, - .strategy = &sysctl_jiffies, - }, -#ifdef CONFIG_NFS_FSCACHE - { - .ctl_name = CTL_UNNUMBERED, - .procname = "fscache_from_error", - .data = &nfs_fscache_from_error, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .ctl_name = CTL_UNNUMBERED, - .procname = "fscache_to_error", - .data = &nfs_fscache_to_error, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .ctl_name = CTL_UNNUMBERED, - .procname = "fscache_uncache_page", - .data = &nfs_fscache_uncache_page, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, - { - .ctl_name = CTL_UNNUMBERED, - .procname = "fscache_to_pages", - .data = &nfs_fscache_to_pages, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, - }, - { - .ctl_name = CTL_UNNUMBERED, - .procname = "fscache_from_pages", - .data = &nfs_fscache_from_pages, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, #endif { .ctl_name = 0 } }; diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 24de4f3c5..4cfada2cc 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -46,6 +46,7 @@ * Copyright (C) 1996, 1997, Olaf Kirch */ +#include #include #include #include @@ -63,7 +64,6 @@ #include "delegation.h" #include "iostat.h" -#include "internal.h" #define NFSDBG_FACILITY NFSDBG_PAGECACHE @@ -91,13 +91,23 @@ static mempool_t *nfs_commit_mempool; static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion); -struct nfs_write_data *nfs_commit_alloc(void) +struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount) { struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS); if (p) { memset(p, 0, sizeof(*p)); INIT_LIST_HEAD(&p->pages); + if (pagecount < NFS_PAGEVEC_SIZE) + p->pagevec = &p->page_array[0]; + else { + size_t size = ++pagecount * sizeof(struct page *); + p->pagevec = kzalloc(size, GFP_NOFS); + if (!p->pagevec) { + mempool_free(p, nfs_commit_mempool); + p = NULL; + } + } } return p; } @@ -109,20 +119,21 @@ void nfs_commit_free(struct nfs_write_data *p) mempool_free(p, nfs_commit_mempool); } -struct nfs_write_data *nfs_writedata_alloc(size_t len) +struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) { - unsigned int pagecount = (len + PAGE_SIZE - 1) >> PAGE_SHIFT; struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); if (p) { memset(p, 0, sizeof(*p)); INIT_LIST_HEAD(&p->pages); - p->npages = pagecount; - if (pagecount <= ARRAY_SIZE(p->page_array)) - p->pagevec = p->page_array; + if (pagecount < NFS_PAGEVEC_SIZE) + p->pagevec = &p->page_array[0]; else { - p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS); - if (!p->pagevec) { + size_t size = ++pagecount * sizeof(struct page *); + p->pagevec = kmalloc(size, GFP_NOFS); + if (p->pagevec) { + memset(p->pagevec, 0, size); + } else { mempool_free(p, nfs_wdata_mempool); p = NULL; } @@ -131,7 +142,7 @@ struct nfs_write_data *nfs_writedata_alloc(size_t len) return p; } -static void nfs_writedata_free(struct nfs_write_data *p) +void nfs_writedata_free(struct nfs_write_data *p) { if (p && (p->pagevec != &p->page_array[0])) kfree(p->pagevec); @@ -157,9 +168,6 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c return; nfs_inc_stats(inode, NFSIOS_EXTENDWRITE); i_size_write(inode, end); -#ifdef FSCACHE_WRITE_SUPPORT - nfs_set_fscsize(NFS_SERVER(inode), NFS_I(inode), end); -#endif } /* We can set the PG_uptodate flag if we see that a write request @@ -205,7 +213,7 @@ static int nfs_writepage_sync(struct nfs_open_context *ctx, struct inode *inode, int result, written = 0; struct nfs_write_data *wdata; - wdata = nfs_writedata_alloc(wsize); + wdata = nfs_writedata_alloc(1); if (!wdata) return -ENOMEM; @@ -339,9 +347,6 @@ do_it: err = -EBADF; goto out; } - - nfs_writepage_to_fscache(inode, page); - lock_kernel(); if (!IS_SYNC(inode) && inode_referenced) { err = nfs_writepage_async(ctx, inode, page, 0, offset); @@ -424,7 +429,7 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req) if (nfs_have_delegation(inode, FMODE_WRITE)) nfsi->change_attr++; } - SetPageNfsWriting(req->wb_page); + SetPagePrivate(req->wb_page); nfsi->npages++; atomic_inc(&req->wb_count); return 0; @@ -441,7 +446,7 @@ static void nfs_inode_remove_request(struct nfs_page *req) BUG_ON (!NFS_WBACK_BUSY(req)); spin_lock(&nfsi->req_lock); - ClearPageNfsWriting(req->wb_page); + ClearPagePrivate(req->wb_page); radix_tree_delete(&nfsi->nfs_page_tree, req->wb_index); nfsi->npages--; if (!nfsi->npages) { @@ -496,7 +501,7 @@ nfs_mark_request_dirty(struct nfs_page *req) nfs_list_add_request(req, &nfsi->dirty); nfsi->ndirty++; spin_unlock(&nfsi->req_lock); - inc_zone_page_state(req->wb_page, NR_FILE_DIRTY); + inc_page_state(nr_dirty); mark_inode_dirty(inode); } @@ -524,7 +529,7 @@ nfs_mark_request_commit(struct nfs_page *req) nfs_list_add_request(req, &nfsi->commit); nfsi->ncommit++; spin_unlock(&nfsi->req_lock); - inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + inc_page_state(nr_unstable); mark_inode_dirty(inode); } #endif @@ -578,30 +583,6 @@ static int nfs_wait_on_requests(struct inode *inode, unsigned long idx_start, un return ret; } -static void nfs_cancel_dirty_list(struct list_head *head) -{ - struct nfs_page *req; - while(!list_empty(head)) { - req = nfs_list_entry(head->next); - nfs_list_remove_request(req); - nfs_inode_remove_request(req); - nfs_clear_page_writeback(req); - } -} - -static void nfs_cancel_commit_list(struct list_head *head) -{ - struct nfs_page *req; - - while(!list_empty(head)) { - req = nfs_list_entry(head->next); - nfs_list_remove_request(req); - nfs_inode_remove_request(req); - dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); - nfs_clear_page_writeback(req); - } -} - /* * nfs_scan_dirty - Scan an inode for dirty requests * @inode: NFS inode to scan @@ -621,6 +602,7 @@ nfs_scan_dirty(struct inode *inode, struct list_head *dst, unsigned long idx_sta if (nfsi->ndirty != 0) { res = nfs_scan_lock_dirty(nfsi, dst, idx_start, npages); nfsi->ndirty -= res; + sub_page_state(nr_dirty,res); if ((nfsi->ndirty == 0) != list_empty(&nfsi->dirty)) printk(KERN_ERR "NFS: desynchronized value of nfs_i.ndirty.\n"); } @@ -645,7 +627,7 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, unsigned long idx_st int res = 0; if (nfsi->ncommit != 0) { - res = nfs_scan_list(nfsi, &nfsi->commit, dst, idx_start, npages); + res = nfs_scan_list(&nfsi->commit, dst, idx_start, npages); nfsi->ncommit -= res; if ((nfsi->ncommit == 0) != list_empty(&nfsi->commit)) printk(KERN_ERR "NFS: desynchronized value of nfs_i.ncommit.\n"); @@ -999,24 +981,24 @@ static int nfs_flush_multi(struct inode *inode, struct list_head *head, int how) struct nfs_page *req = nfs_list_entry(head->next); struct page *page = req->wb_page; struct nfs_write_data *data; - size_t wsize = NFS_SERVER(inode)->wsize, nbytes; - unsigned int offset; + unsigned int wsize = NFS_SERVER(inode)->wsize; + unsigned int nbytes, offset; int requests = 0; LIST_HEAD(list); nfs_list_remove_request(req); nbytes = req->wb_bytes; - do { - size_t len = min(nbytes, wsize); - - data = nfs_writedata_alloc(len); + for (;;) { + data = nfs_writedata_alloc(1); if (!data) goto out_bad; list_add(&data->pages, &list); requests++; - nbytes -= len; - } while (nbytes != 0); + if (nbytes <= wsize) + break; + nbytes -= wsize; + } atomic_set(&req->wb_complete, requests); ClearPageError(page); @@ -1070,7 +1052,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, int how) struct nfs_write_data *data; unsigned int count; - data = nfs_writedata_alloc(NFS_SERVER(inode)->wsize); + data = nfs_writedata_alloc(NFS_SERVER(inode)->wpages); if (!data) goto out_bad; @@ -1280,7 +1262,7 @@ int nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data) if (time_before(complain, jiffies)) { dprintk("NFS: faulty NFS server %s:" " (committed = %d) != (stable = %d)\n", - NFS_SERVER(data->inode)->nfs_client->cl_hostname, + NFS_SERVER(data->inode)->hostname, resp->verf->committed, argp->stable); complain = jiffies + 300 * HZ; } @@ -1378,7 +1360,7 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how) struct nfs_write_data *data; struct nfs_page *req; - data = nfs_commit_alloc(); + data = nfs_commit_alloc(NFS_SERVER(inode)->wpages); if (!data) goto out_bad; @@ -1393,7 +1375,6 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how) req = nfs_list_entry(head->next); nfs_list_remove_request(req); nfs_mark_request_commit(req); - dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); nfs_clear_page_writeback(req); } return -ENOMEM; @@ -1406,6 +1387,7 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata) { struct nfs_write_data *data = calldata; struct nfs_page *req; + int res = 0; dprintk("NFS: %4d nfs_commit_done (status %d)\n", task->tk_pid, task->tk_status); @@ -1417,7 +1399,6 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata) while (!list_empty(&data->pages)) { req = nfs_list_entry(data->pages.next); nfs_list_remove_request(req); - dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); dprintk("NFS: commit (%s/%Ld %d@%Ld)", req->wb_context->dentry->d_inode->i_sb->s_id, @@ -1444,7 +1425,9 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata) nfs_mark_request_dirty(req); next: nfs_clear_page_writeback(req); + res++; } + sub_page_state(nr_unstable,res); } static const struct rpc_call_ops nfs_commit_ops = { @@ -1512,25 +1495,15 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start, pages = nfs_scan_dirty(inode, &head, idx_start, npages); if (pages != 0) { spin_unlock(&nfsi->req_lock); - if (how & FLUSH_INVALIDATE) - nfs_cancel_dirty_list(&head); - else - ret = nfs_flush_list(inode, &head, pages, how); + ret = nfs_flush_list(inode, &head, pages, how); spin_lock(&nfsi->req_lock); continue; } if (nocommit) break; - pages = nfs_scan_commit(inode, &head, idx_start, npages); + pages = nfs_scan_commit(inode, &head, 0, 0); if (pages == 0) break; - if (how & FLUSH_INVALIDATE) { - spin_unlock(&nfsi->req_lock); - nfs_cancel_commit_list(&head); - spin_lock(&nfsi->req_lock); - continue; - } - pages += nfs_scan_commit(inode, &head, 0, 0); spin_unlock(&nfsi->req_lock); ret = nfs_commit_list(inode, &head, how); spin_lock(&nfsi->req_lock); @@ -1539,7 +1512,7 @@ int nfs_sync_inode_wait(struct inode *inode, unsigned long idx_start, return ret; } -int __init nfs_init_writepagecache(void) +int nfs_init_writepagecache(void) { nfs_wdata_cachep = kmem_cache_create("nfs_write_data", sizeof(struct nfs_write_data), diff --git a/fs/nfsctl.c b/fs/nfsctl.c index c043136a8..a5a18d4ac 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c @@ -4,6 +4,7 @@ * This should eventually move to userland. * */ +#include #include #include #include diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 01bc68c62..3eec30000 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -126,7 +126,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) if (*ep) goto out; dprintk("found fsidtype %d\n", fsidtype); - if (key_len(fsidtype)==0) /* invalid type */ + if (fsidtype > 2) goto out; if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0) goto out; diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 54b37b1d2..dbaf3f93f 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -33,6 +33,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index bea6b9478..4b6aa60df 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -34,6 +34,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index ee4eff27a..b0e095ea0 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -721,12 +721,6 @@ nfsd4_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) return nfs_ok; } -static inline void nfsd4_increment_op_stats(u32 opnum) -{ - if (opnum >= FIRST_NFS4_OP && opnum <= LAST_NFS4_OP) - nfsdstats.nfs4_opcount[opnum]++; -} - /* * COMPOUND call. @@ -936,8 +930,6 @@ encode_op: /* XXX Ugh, we need to get rid of this kind of special case: */ if (op->opnum == OP_READ && op->u.read.rd_filp) fput(op->u.read.rd_filp); - - nfsd4_increment_op_stats(op->opnum); } out: diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index b32c87b4d..a725cd17b 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c @@ -183,7 +183,7 @@ struct dentry_list_arg { static int nfsd4_build_dentrylist(void *arg, const char *name, int namlen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct dentry_list_arg *dla = arg; struct list_head *dentries = &dla->dentries; diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index e280ad4f6..e11b9cdfc 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -123,7 +123,7 @@ static void release_stateid(struct nfs4_stateid *stp, int flags); */ /* recall_lock protects the del_recall_lru */ -static DEFINE_SPINLOCK(recall_lock); +static spinlock_t recall_lock = SPIN_LOCK_UNLOCKED; static struct list_head del_recall_lru; static void @@ -529,7 +529,8 @@ move_to_confirmed(struct nfs4_client *clp) dprintk("NFSD: move_to_confirm nfs4_client %p\n", clp); list_del_init(&clp->cl_strhash); - list_move(&clp->cl_idhash, &conf_id_hashtbl[idhashval]); + list_del_init(&clp->cl_idhash); + list_add(&clp->cl_idhash, &conf_id_hashtbl[idhashval]); strhashval = clientstr_hashval(clp->cl_recdir); list_add(&clp->cl_strhash, &conf_str_hashtbl[strhashval]); renew_client(clp); @@ -1237,15 +1238,8 @@ find_file(struct inode *ino) return NULL; } -static int access_valid(u32 x) -{ - return (x > 0 && x < 4); -} - -static int deny_valid(u32 x) -{ - return (x >= 0 && x < 5); -} +#define TEST_ACCESS(x) ((x > 0 || x < 4)?1:0) +#define TEST_DENY(x) ((x >= 0 || x < 5)?1:0) static void set_access(unsigned int *access, unsigned long bmap) { @@ -1752,8 +1746,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf int status; status = nfserr_inval; - if (!access_valid(open->op_share_access) - || !deny_valid(open->op_share_deny)) + if (!TEST_ACCESS(open->op_share_access) || !TEST_DENY(open->op_share_deny)) goto out; /* * Lookup file; if found, lookup stateid and check open request, @@ -1790,10 +1783,10 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf } else { /* Stateid was not found, this is a new OPEN */ int flags = 0; - if (open->op_share_access & NFS4_SHARE_ACCESS_READ) - flags |= MAY_READ; if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE) - flags |= MAY_WRITE; + flags = MAY_WRITE; + else + flags = MAY_READ; status = nfs4_new_open(rqstp, &stp, dp, current_fh, flags); if (status) goto out; @@ -2078,12 +2071,16 @@ nfs4_preprocess_stateid_op(struct svc_fh *current_fh, stateid_t *stateid, int fl if (!stateid->si_fileid) { /* delegation stateid */ if(!(dp = find_delegation_stateid(ino, stateid))) { dprintk("NFSD: delegation stateid not found\n"); + if (nfs4_in_grace()) + status = nfserr_grace; goto out; } stidp = &dp->dl_stateid; } else { /* open or lock stateid */ if (!(stp = find_stateid(stateid, flags))) { dprintk("NFSD: open or lock stateid not found\n"); + if (nfs4_in_grace()) + status = nfserr_grace; goto out; } if ((flags & CHECK_FH) && nfs4_check_fh(current_fh, stp)) @@ -2256,9 +2253,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfs (int)current_fh->fh_dentry->d_name.len, current_fh->fh_dentry->d_name.name); - status = fh_verify(rqstp, current_fh, S_IFREG, 0); - if (status) - return status; + if ((status = fh_verify(rqstp, current_fh, S_IFREG, 0))) + goto out; nfs4_lock_state(); @@ -2325,8 +2321,7 @@ nfsd4_open_downgrade(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct n (int)current_fh->fh_dentry->d_name.len, current_fh->fh_dentry->d_name.name); - if (!access_valid(od->od_share_access) - || !deny_valid(od->od_share_deny)) + if (!TEST_ACCESS(od->od_share_access) || !TEST_DENY(od->od_share_deny)) return nfserr_inval; nfs4_lock_state(); diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 9dc858744..67d68009e 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1311,7 +1311,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL)) || (bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL))) { - status = vfs_statfs(dentry, &statfs); + status = vfs_statfs(dentry->d_inode->i_sb, &statfs); if (status) goto out_nfserr; } diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index fdf7cf3df..d852ebb53 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -103,7 +103,8 @@ nfsd_cache_shutdown(void) static void lru_put_end(struct svc_cacherep *rp) { - list_move_tail(&rp->c_lru, &lru_head); + list_del(&rp->c_lru); + list_add_tail(&rp->c_lru, &lru_head); } /* diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 42165e5ec..8fd615fd6 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -6,6 +6,7 @@ * Copyright (C) 1995, 1996 Olaf Kirch */ +#include #include #include @@ -552,10 +553,10 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) return simple_fill_super(sb, 0x6e667364, nfsd_files); } -static int nfsd_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *nfsd_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, nfsd_fill_super, mnt); + return get_sb_single(fs_type, flags, data, nfsd_fill_super); } static struct file_system_type nfsd_fs_type = { diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 501d83884..3f2ec2e6d 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -188,9 +188,11 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) } /* Set user creds for this exportpoint */ - error = nfserrno(nfsd_setuser(rqstp, exp)); - if (error) + error = nfsd_setuser(rqstp, exp); + if (error) { + error = nfserrno(error); goto out; + } /* * Look up the dentry using the NFS file handle. @@ -246,18 +248,9 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) dprintk("nfsd: fh_verify - just checking\n"); dentry = fhp->fh_dentry; exp = fhp->fh_export; - /* Set user creds for this exportpoint; necessary even - * in the "just checking" case because this may be a - * filehandle that was created by fh_compose, and that - * is about to be used in another nfsv4 compound - * operation */ - error = nfserrno(nfsd_setuser(rqstp, exp)); - if (error) - goto out; } cache_get(&exp->h); - error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type); if (error) goto out; @@ -319,8 +312,8 @@ int fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, struct svc_fh *ref_fh) { /* ref_fh is a reference file handle. - * if it is non-null and for the same filesystem, then we should compose - * a filehandle which is of the same version, where possible. + * if it is non-null, then we should compose a filehandle which is + * of the same version, where possible. * Currently, that means that if ref_fh->fh_handle.fh_version == 0xca * Then create a 32byte filehandle using nfs_fhbase_old * @@ -339,7 +332,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, st parent->d_name.name, dentry->d_name.name, (inode ? inode->i_ino : 0)); - if (ref_fh && ref_fh->fh_export == exp) { + if (ref_fh) { ref_fh_version = ref_fh->fh_handle.fh_version; if (ref_fh_version == 0xca) ref_fh_fsid_type = 0; @@ -468,7 +461,7 @@ fh_update(struct svc_fh *fhp) } else { int size; if (fhp->fh_handle.fh_fileid_type != 0) - goto out; + goto out_uptodate; datap = fhp->fh_handle.fh_auth+ fhp->fh_handle.fh_size/4 -1; size = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4; @@ -488,6 +481,10 @@ out_negative: printk(KERN_ERR "fh_update: %s/%s still negative!\n", dentry->d_parent->d_name.name, dentry->d_name.name); goto out; +out_uptodate: + printk(KERN_ERR "fh_update: %s/%s already up-to-date!\n", + dentry->d_parent->d_name.name, dentry->d_name.name); + goto out; } /* diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 4e06810b6..06cd0db0f 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -225,7 +225,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, nfserr = nfserr_exist; if (isdotent(argp->name, argp->len)) goto done; - fh_lock_nested(dirfhp, I_MUTEX_PARENT); + fh_lock(dirfhp); dchild = lookup_one_len(argp->name, dirfhp->fh_dentry, argp->len); if (IS_ERR(dchild)) { nfserr = nfserrno(PTR_ERR(dchild)); diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 509d27b0d..f7997ebcd 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -8,6 +8,7 @@ * Copyright (C) 1995, 1996, 1997 Olaf Kirch */ +#include #include #include diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c index 71944cddf..57265d563 100644 --- a/fs/nfsd/stats.c +++ b/fs/nfsd/stats.c @@ -72,16 +72,6 @@ static int nfsd_proc_show(struct seq_file *seq, void *v) /* show my rpc info */ svc_seq_show(seq, &nfsd_svcstats); -#ifdef CONFIG_NFSD_V4 - /* Show count for individual nfsv4 operations */ - /* Writing operation numbers 0 1 2 also for maintaining uniformity */ - seq_printf(seq,"proc4ops %u", LAST_NFS4_OP + 1); - for (i = 0; i <= LAST_NFS4_OP; i++) - seq_printf(seq, " %u", nfsdstats.nfs4_opcount[i]); - - seq_putc(seq, '\n'); -#endif - return 0; } diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 98a6df852..95645569f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -16,6 +16,7 @@ * Zerocpy NFS support (C) 2002 Hirokazu Takahashi */ +#include #include #include #include @@ -672,10 +673,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, goto out_nfserr; if (access & MAY_WRITE) { - if (access & MAY_READ) - flags = O_RDWR|O_LARGEFILE; - else - flags = O_WRONLY|O_LARGEFILE; + flags = O_WRONLY|O_LARGEFILE; DQUOT_INIT(inode); } @@ -836,7 +834,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, if (ra && ra->p_set) file->f_ra = ra->p_ra; - if (file->f_op->sendfile && rqstp->rq_sendfile_ok) { + if (file->f_op->sendfile) { svc_pushback_unused_pages(rqstp); err = file->f_op->sendfile(file, &offset, *count, nfsd_read_actor, rqstp); @@ -1114,7 +1112,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, */ if (!resfhp->fh_dentry) { /* called from nfsd_proc_mkdir, or possibly nfsd3_proc_create */ - fh_lock_nested(fhp, I_MUTEX_PARENT); + fh_lock(fhp); dchild = lookup_one_len(fname, dentry, flen); err = PTR_ERR(dchild); if (IS_ERR(dchild)) @@ -1240,7 +1238,7 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp, err = nfserr_notdir; if(!dirp->i_op || !dirp->i_op->lookup) goto out; - fh_lock_nested(fhp, I_MUTEX_PARENT); + fh_lock(fhp); /* * Compose the response file handle. @@ -1496,7 +1494,7 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp, if (isdotent(name, len)) goto out; - fh_lock_nested(ffhp, I_MUTEX_PARENT); + fh_lock(ffhp); ddir = ffhp->fh_dentry; dirp = ddir->d_inode; @@ -1521,15 +1519,14 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp, err = nfserrno(err); } - dput(dnew); -out_unlock: fh_unlock(ffhp); + dput(dnew); out: return err; out_nfserr: err = nfserrno(err); - goto out_unlock; + goto out; } /* @@ -1558,7 +1555,7 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, tdir = tdentry->d_inode; err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev; - if (ffhp->fh_export != tfhp->fh_export) + if (fdir->i_sb != tdir->i_sb) goto out; err = nfserr_perm; @@ -1646,7 +1643,7 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, if (err) goto out; - fh_lock_nested(fhp, I_MUTEX_PARENT); + fh_lock(fhp); dentry = fhp->fh_dentry; dirp = dentry->d_inode; @@ -1742,7 +1739,7 @@ int nfsd_statfs(struct svc_rqst *rqstp, struct svc_fh *fhp, struct kstatfs *stat) { int err = fh_verify(rqstp, fhp, 0, MAY_NOP); - if (!err && vfs_statfs(fhp->fh_dentry,stat)) + if (!err && vfs_statfs(fhp->fh_dentry->d_inode->i_sb,stat)) err = nfserr_io; return err; } diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 9de6b495f..a912debcd 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index bc579bfdf..580412d33 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c @@ -1544,7 +1544,7 @@ err_out: /** * ntfs_aops - general address space operations for inodes and attributes */ -const struct address_space_operations ntfs_aops = { +struct address_space_operations ntfs_aops = { .readpage = ntfs_readpage, /* Fill page with data. */ .sync_page = block_sync_page, /* Currently, just unplugs the disk request queue. */ @@ -1560,7 +1560,7 @@ const struct address_space_operations ntfs_aops = { * ntfs_mst_aops - general address space operations for mst protecteed inodes * and attributes */ -const struct address_space_operations ntfs_mst_aops = { +struct address_space_operations ntfs_mst_aops = { .readpage = ntfs_readpage, /* Fill page with data. */ .sync_page = block_sync_page, /* Currently, just unplugs the disk request queue. */ diff --git a/fs/ntfs/aops.h b/fs/ntfs/aops.h index 325ce261a..3b74e66ca 100644 --- a/fs/ntfs/aops.h +++ b/fs/ntfs/aops.h @@ -86,7 +86,8 @@ static inline void ntfs_unmap_page(struct page *page) static inline struct page *ntfs_map_page(struct address_space *mapping, unsigned long index) { - struct page *page = read_mapping_page(mapping, index, NULL); + struct page *page = read_cache_page(mapping, index, + (filler_t*)mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 6708e1d68..1663f5c3c 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c @@ -2529,7 +2529,8 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) end >>= PAGE_CACHE_SHIFT; /* If there is a first partial page, need to do it the slow way. */ if (start_ofs) { - page = read_mapping_page(mapping, idx, NULL); + page = read_cache_page(mapping, idx, + (filler_t*)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) { ntfs_error(vol->sb, "Failed to read first partial " "page (sync error, index 0x%lx).", idx); @@ -2599,7 +2600,8 @@ int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt, const u8 val) } /* If there is a last partial page, need to do it the slow way. */ if (end_ofs) { - page = read_mapping_page(mapping, idx, NULL); + page = read_cache_page(mapping, idx, + (filler_t*)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) { ntfs_error(vol->sb, "Failed to read last partial page " "(sync error, index 0x%lx).", idx); diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index 2e42c2dca..36e1e136b 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -231,7 +231,8 @@ do_non_resident_extend: * Read the page. If the page is not present, this will zero * the uninitialized regions for us. */ - page = read_mapping_page(mapping, index, NULL); + page = read_cache_page(mapping, index, + (filler_t*)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) { err = PTR_ERR(page); goto init_err_out; @@ -1358,7 +1359,7 @@ err_out: goto out; } -static size_t __ntfs_copy_from_user_iovec_inatomic(char *vaddr, +static size_t __ntfs_copy_from_user_iovec(char *vaddr, const struct iovec *iov, size_t iov_ofs, size_t bytes) { size_t total = 0; @@ -1376,6 +1377,10 @@ static size_t __ntfs_copy_from_user_iovec_inatomic(char *vaddr, bytes -= len; vaddr += len; if (unlikely(left)) { + /* + * Zero the rest of the target like __copy_from_user(). + */ + memset(vaddr, 0, bytes); total -= left; break; } @@ -1416,13 +1421,11 @@ static inline void ntfs_set_next_iovec(const struct iovec **iovp, * pages (out to offset + bytes), to emulate ntfs_copy_from_user()'s * single-segment behaviour. * - * We call the same helper (__ntfs_copy_from_user_iovec_inatomic()) both - * when atomic and when not atomic. This is ok because - * __ntfs_copy_from_user_iovec_inatomic() calls __copy_from_user_inatomic() - * and it is ok to call this when non-atomic. - * Infact, the only difference between __copy_from_user_inatomic() and - * __copy_from_user() is that the latter calls might_sleep() and the former - * should not zero the tail of the buffer on error. And on many + * We call the same helper (__ntfs_copy_from_user_iovec()) both when atomic and + * when not atomic. This is ok because __ntfs_copy_from_user_iovec() calls + * __copy_from_user_inatomic() and it is ok to call this when non-atomic. In + * fact, the only difference between __copy_from_user_inatomic() and + * __copy_from_user() is that the latter calls might_sleep(). And on many * architectures __copy_from_user_inatomic() is just defined to * __copy_from_user() so it makes no difference at all on those architectures. */ @@ -1439,18 +1442,14 @@ static inline size_t ntfs_copy_from_user_iovec(struct page **pages, if (len > bytes) len = bytes; kaddr = kmap_atomic(*pages, KM_USER0); - copied = __ntfs_copy_from_user_iovec_inatomic(kaddr + ofs, + copied = __ntfs_copy_from_user_iovec(kaddr + ofs, *iov, *iov_ofs, len); kunmap_atomic(kaddr, KM_USER0); if (unlikely(copied != len)) { /* Do it the slow way. */ kaddr = kmap(*pages); - copied = __ntfs_copy_from_user_iovec_inatomic(kaddr + ofs, + copied = __ntfs_copy_from_user_iovec(kaddr + ofs, *iov, *iov_ofs, len); - /* - * Zero the rest of the target like __copy_from_user(). - */ - memset(kaddr + ofs + copied, 0, len - copied); kunmap(*pages); if (unlikely(copied != len)) goto err_out; diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c index 6d44ceabc..4c86b7e1d 100644 --- a/fs/ntfs/inode.c +++ b/fs/ntfs/inode.c @@ -367,12 +367,6 @@ static void ntfs_destroy_extent_inode(ntfs_inode *ni) kmem_cache_free(ntfs_inode_cache, ni); } -/* - * The attribute runlist lock has separate locking rules from the - * normal runlist lock, so split the two lock-classes: - */ -static struct lock_class_key attr_list_rl_lock_class; - /** * __ntfs_init_inode - initialize ntfs specific part of an inode * @sb: super block of mounted volume @@ -400,8 +394,6 @@ void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni) ni->attr_list_size = 0; ni->attr_list = NULL; ntfs_init_runlist(&ni->attr_list_rl); - lockdep_set_class(&ni->attr_list_rl.lock, - &attr_list_rl_lock_class); ni->itype.index.bmp_ino = NULL; ni->itype.index.block_size = 0; ni->itype.index.vcn_size = 0; @@ -413,13 +405,6 @@ void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni) ni->ext.base_ntfs_ino = NULL; } -/* - * Extent inodes get MFT-mapped in a nested way, while the base inode - * is still mapped. Teach this nesting to the lock validator by creating - * a separate class for nested inode's mrec_lock's: - */ -static struct lock_class_key extent_inode_mrec_lock_key; - inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb, unsigned long mft_no) { @@ -428,7 +413,6 @@ inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb, ntfs_debug("Entering."); if (likely(ni != NULL)) { __ntfs_init_inode(sb, ni); - lockdep_set_class(&ni->mrec_lock, &extent_inode_mrec_lock_key); ni->mft_no = mft_no; ni->type = AT_UNUSED; ni->name = NULL; @@ -556,6 +540,8 @@ static int ntfs_read_locked_inode(struct inode *vi) /* Setup the generic vfs inode parts now. */ + /* This is the optimal IO size (for stat), not the fs block size. */ + vi->i_blksize = PAGE_CACHE_SIZE; /* * This is for checking whether an inode has changed w.r.t. a file so * that the file can be updated if necessary (compare with f_version). @@ -1232,6 +1218,7 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) base_ni = NTFS_I(base_vi); /* Just mirror the values from the base inode. */ + vi->i_blksize = base_vi->i_blksize; vi->i_version = base_vi->i_version; vi->i_uid = base_vi->i_uid; vi->i_gid = base_vi->i_gid; @@ -1501,6 +1488,7 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) ni = NTFS_I(vi); base_ni = NTFS_I(base_vi); /* Just mirror the values from the base inode. */ + vi->i_blksize = base_vi->i_blksize; vi->i_version = base_vi->i_version; vi->i_uid = base_vi->i_uid; vi->i_gid = base_vi->i_gid; @@ -1734,15 +1722,6 @@ err_out: return err; } -/* - * The MFT inode has special locking, so teach the lock validator - * about this by splitting off the locking rules of the MFT from - * the locking rules of other inodes. The MFT inode can never be - * accessed from the VFS side (or even internally), only by the - * map_mft functions. - */ -static struct lock_class_key mft_ni_runlist_lock_key, mft_ni_mrec_lock_key; - /** * ntfs_read_inode_mount - special read_inode for mount time use only * @vi: inode to read @@ -2169,14 +2148,6 @@ int ntfs_read_inode_mount(struct inode *vi) ntfs_attr_put_search_ctx(ctx); ntfs_debug("Done."); ntfs_free(m); - - /* - * Split the locking rules of the MFT inode from the - * locking rules of other inodes: - */ - lockdep_set_class(&ni->runlist.lock, &mft_ni_runlist_lock_key); - lockdep_set_class(&ni->mrec_lock, &mft_ni_mrec_lock_key); - return 0; em_put_err_out: diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index abce25836..2438c00ec 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c @@ -2637,6 +2637,11 @@ mft_rec_already_initialized: goto undo_mftbmp_alloc; } vi->i_ino = bit; + /* + * This is the optimal IO size (for stat), not the fs block + * size. + */ + vi->i_blksize = PAGE_CACHE_SIZE; /* * This is for checking whether an inode has changed w.r.t. a * file so that the file can be updated if necessary (compare diff --git a/fs/ntfs/ntfs.h b/fs/ntfs/ntfs.h index ddd3d5030..bf7b3d7c0 100644 --- a/fs/ntfs/ntfs.h +++ b/fs/ntfs/ntfs.h @@ -57,8 +57,8 @@ extern struct kmem_cache *ntfs_attr_ctx_cache; extern struct kmem_cache *ntfs_index_ctx_cache; /* The various operations structs defined throughout the driver files. */ -extern const struct address_space_operations ntfs_aops; -extern const struct address_space_operations ntfs_mst_aops; +extern struct address_space_operations ntfs_aops; +extern struct address_space_operations ntfs_mst_aops; extern const struct file_operations ntfs_file_ops; extern struct inode_operations ntfs_file_inode_ops; diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 74e0ee8fc..27833f6df 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -1724,14 +1724,6 @@ upcase_failed: return FALSE; } -/* - * The lcn and mft bitmap inodes are NTFS-internal inodes with - * their own special locking rules: - */ -static struct lock_class_key - lcnbmp_runlist_lock_key, lcnbmp_mrec_lock_key, - mftbmp_runlist_lock_key, mftbmp_mrec_lock_key; - /** * load_system_files - open the system files using normal functions * @vol: ntfs super block describing device whose system files to load @@ -1788,10 +1780,6 @@ static BOOL load_system_files(ntfs_volume *vol) ntfs_error(sb, "Failed to load $MFT/$BITMAP attribute."); goto iput_mirr_err_out; } - lockdep_set_class(&NTFS_I(vol->mftbmp_ino)->runlist.lock, - &mftbmp_runlist_lock_key); - lockdep_set_class(&NTFS_I(vol->mftbmp_ino)->mrec_lock, - &mftbmp_mrec_lock_key); /* Read upcase table and setup @vol->upcase and @vol->upcase_len. */ if (!load_and_init_upcase(vol)) goto iput_mftbmp_err_out; @@ -1814,11 +1802,6 @@ static BOOL load_system_files(ntfs_volume *vol) iput(vol->lcnbmp_ino); goto bitmap_failed; } - lockdep_set_class(&NTFS_I(vol->lcnbmp_ino)->runlist.lock, - &lcnbmp_runlist_lock_key); - lockdep_set_class(&NTFS_I(vol->lcnbmp_ino)->mrec_lock, - &lcnbmp_mrec_lock_key); - NInoSetSparseDisabled(NTFS_I(vol->lcnbmp_ino)); if ((vol->nr_clusters + 7) >> 3 > i_size_read(vol->lcnbmp_ino)) { iput(vol->lcnbmp_ino); @@ -2618,10 +2601,10 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, /** * ntfs_statfs - return information about mounted NTFS volume - * @dentry: dentry from mounted volume + * @sb: super block of mounted volume * @sfs: statfs structure in which to return the information * - * Return information about the mounted NTFS volume @dentry in the statfs structure + * Return information about the mounted NTFS volume @sb in the statfs structure * pointed to by @sfs (this is initialized with zeros before ntfs_statfs is * called). We interpret the values to be correct of the moment in time at * which we are called. Most values are variable otherwise and this isn't just @@ -2634,9 +2617,8 @@ static unsigned long __get_nr_free_mft_records(ntfs_volume *vol, * * Return 0 on success or -errno on error. */ -static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs) +static int ntfs_statfs(struct super_block *sb, struct kstatfs *sfs) { - struct super_block *sb = dentry->d_sb; s64 size; ntfs_volume *vol = NTFS_SB(sb); ntfs_inode *mft_ni = NTFS_I(vol->mft_ino); @@ -2760,17 +2742,6 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) struct inode *tmp_ino; int blocksize, result; - /* - * We do a pretty difficult piece of bootstrap by reading the - * MFT (and other metadata) from disk into memory. We'll only - * release this metadata during umount, so the locking patterns - * observed during bootstrap do not count. So turn off the - * observation of locking patterns (strictly for this context - * only) while mounting NTFS. [The validator is still active - * otherwise, even for this context: it will for example record - * lock class registrations.] - */ - lockdep_off(); ntfs_debug("Entering."); #ifndef NTFS_RW sb->s_flags |= MS_RDONLY; @@ -2782,7 +2753,6 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) if (!silent) ntfs_error(sb, "Allocation of NTFS volume structure " "failed. Aborting mount..."); - lockdep_on(); return -ENOMEM; } /* Initialize ntfs_volume structure. */ @@ -2969,7 +2939,6 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent) mutex_unlock(&ntfs_lock); sb->s_export_op = &ntfs_export_ops; lock_kernel(); - lockdep_on(); return 0; } ntfs_error(sb, "Failed to allocate root directory."); @@ -3089,7 +3058,6 @@ err_out_now: sb->s_fs_info = NULL; kfree(vol); ntfs_debug("Failed, returning -EINVAL."); - lockdep_on(); return -EINVAL; } @@ -3125,11 +3093,10 @@ struct kmem_cache *ntfs_index_ctx_cache; /* Driver wide mutex. */ DEFINE_MUTEX(ntfs_lock); -static int ntfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ntfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, ntfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, ntfs_fill_super); } static struct file_system_type ntfs_fs_type = { diff --git a/fs/ntfs/sysctl.h b/fs/ntfs/sysctl.h index beda5bf96..c8064cae8 100644 --- a/fs/ntfs/sysctl.h +++ b/fs/ntfs/sysctl.h @@ -24,6 +24,7 @@ #ifndef _LINUX_NTFS_SYSCTL_H #define _LINUX_NTFS_SYSCTL_H +#include #if defined(DEBUG) && defined(CONFIG_SYSCTL) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index f1d1c342c..47152bf9a 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -558,9 +558,16 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, u64 vbo_max; /* file offset, max_blocks from iblock */ u64 p_blkno; int contig_blocks; - unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; + unsigned char blocksize_bits; unsigned long max_blocks = bh_result->b_size >> inode->i_blkbits; + if (!inode || !bh_result) { + mlog(ML_ERROR, "inode or bh_result is null\n"); + return -EIO; + } + + blocksize_bits = inode->i_sb->s_blocksize_bits; + /* This function won't even be called if the request isn't all * nicely aligned and of the right size, so there's no need * for us to check any of that. */ @@ -659,7 +666,7 @@ out: return ret; } -const struct address_space_operations ocfs2_aops = { +struct address_space_operations ocfs2_aops = { .readpage = ocfs2_readpage, .writepage = ocfs2_writepage, .prepare_write = ocfs2_prepare_write, diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 504595d6c..21f38accd 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -54,7 +54,7 @@ static DECLARE_RWSEM(o2hb_callback_sem); * multiple hb threads are watching multiple regions. A node is live * whenever any of the threads sees activity from the node in its region. */ -static DEFINE_SPINLOCK(o2hb_live_lock); +static spinlock_t o2hb_live_lock = SPIN_LOCK_UNLOCKED; static struct list_head o2hb_live_slots[O2NM_MAX_NODES]; static unsigned long o2hb_live_node_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; static LIST_HEAD(o2hb_node_events); @@ -517,7 +517,6 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, hb_block->hb_seq = cpu_to_le64(cputime); hb_block->hb_node = node_num; hb_block->hb_generation = cpu_to_le64(generation); - hb_block->hb_dead_ms = cpu_to_le32(o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS); /* This step must always happen last! */ hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg, @@ -646,8 +645,6 @@ static int o2hb_check_slot(struct o2hb_region *reg, struct o2nm_node *node; struct o2hb_disk_heartbeat_block *hb_block = reg->hr_tmp_block; u64 cputime; - unsigned int dead_ms = o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS; - unsigned int slot_dead_ms; memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes); @@ -736,23 +733,6 @@ fire_callbacks: &o2hb_live_slots[slot->ds_node_num]); slot->ds_equal_samples = 0; - - /* We want to be sure that all nodes agree on the - * number of milliseconds before a node will be - * considered dead. The self-fencing timeout is - * computed from this value, and a discrepancy might - * result in heartbeat calling a node dead when it - * hasn't self-fenced yet. */ - slot_dead_ms = le32_to_cpu(hb_block->hb_dead_ms); - if (slot_dead_ms && slot_dead_ms != dead_ms) { - /* TODO: Perhaps we can fail the region here. */ - mlog(ML_ERROR, "Node %d on device %s has a dead count " - "of %u ms, but our count is %u ms.\n" - "Please double check your configuration values " - "for 'O2CB_HEARTBEAT_THRESHOLD'\n", - slot->ds_node_num, reg->hr_dev_name, slot_dead_ms, - dead_ms); - } goto out; } diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index a42628ba9..73edad782 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h @@ -123,17 +123,6 @@ #define MLOG_MASK_PREFIX 0 #endif -/* - * When logging is disabled, force the bit test to 0 for anything other - * than errors and notices, allowing gcc to remove the code completely. - * When enabled, allow all masks. - */ -#if defined(CONFIG_OCFS2_DEBUG_MASKLOG) -#define ML_ALLOWED_BITS ~0 -#else -#define ML_ALLOWED_BITS (ML_ERROR|ML_NOTICE) -#endif - #define MLOG_MAX_BITS 64 struct mlog_bits { @@ -198,8 +187,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; #define mlog(mask, fmt, args...) do { \ u64 __m = MLOG_MASK_PREFIX | (mask); \ - if ((__m & ML_ALLOWED_BITS) && \ - __mlog_test_u64(__m, mlog_and_bits) && \ + if (__mlog_test_u64(__m, mlog_and_bits) && \ !__mlog_test_u64(__m, mlog_not_bits)) { \ if (__m & ML_ERROR) \ __mlog_printk(KERN_ERR, "ERROR: "fmt , ##args); \ @@ -216,7 +204,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ } while (0) -#if defined(CONFIG_OCFS2_DEBUG_MASKLOG) #define mlog_entry(fmt, args...) do { \ mlog(ML_ENTRY, "ENTRY:" fmt , ##args); \ } while (0) @@ -260,13 +247,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; #define mlog_exit_void() do { \ mlog(ML_EXIT, "EXIT\n"); \ } while (0) -#else -#define mlog_entry(...) do { } while (0) -#define mlog_entry_void(...) do { } while (0) -#define mlog_exit(...) do { } while (0) -#define mlog_exit_ptr(...) do { } while (0) -#define mlog_exit_void(...) do { } while (0) -#endif /* defined(CONFIG_OCFS2_DEBUG_MASKLOG) */ #define mlog_bug_on_msg(cond, fmt, args...) do { \ if (cond) { \ diff --git a/fs/ocfs2/cluster/ocfs2_heartbeat.h b/fs/ocfs2/cluster/ocfs2_heartbeat.h index 3f4151da9..94096069c 100644 --- a/fs/ocfs2/cluster/ocfs2_heartbeat.h +++ b/fs/ocfs2/cluster/ocfs2_heartbeat.h @@ -32,7 +32,6 @@ struct o2hb_disk_heartbeat_block { __u8 hb_pad1[3]; __le32 hb_cksum; __le64 hb_generation; - __le32 hb_dead_ms; }; #endif /* _OCFS2_HEARTBEAT_H */ diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index b650efa8c..0f60cc0d3 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -108,7 +108,7 @@ ##args); \ } while (0) -static DEFINE_RWLOCK(o2net_handler_lock); +static rwlock_t o2net_handler_lock = RW_LOCK_UNLOCKED; static struct rb_root o2net_handler_tree = RB_ROOT; static struct o2net_node o2net_nodes[O2NM_MAX_NODES]; @@ -396,8 +396,8 @@ static void o2net_set_nn_state(struct o2net_node *nn, } if (was_valid && !valid) { - printk(KERN_INFO "o2net: no longer connected to " - SC_NODEF_FMT "\n", SC_NODEF_ARGS(old_sc)); + mlog(ML_NOTICE, "no longer connected to " SC_NODEF_FMT "\n", + SC_NODEF_ARGS(old_sc)); o2net_complete_nodes_nsw(nn); } @@ -409,10 +409,10 @@ static void o2net_set_nn_state(struct o2net_node *nn, * the only way to start connecting again is to down * heartbeat and bring it back up. */ cancel_delayed_work(&nn->nn_connect_expired); - printk(KERN_INFO "o2net: %s " SC_NODEF_FMT "\n", - o2nm_this_node() > sc->sc_node->nd_num ? - "connected to" : "accepted connection from", - SC_NODEF_ARGS(sc)); + mlog(ML_NOTICE, "%s " SC_NODEF_FMT "\n", + o2nm_this_node() > sc->sc_node->nd_num ? + "connected to" : "accepted connection from", + SC_NODEF_ARGS(sc)); } /* trigger the connecting worker func as long as we're not valid, @@ -1280,7 +1280,7 @@ static void o2net_idle_timer(unsigned long data) do_gettimeofday(&now); - printk(KERN_INFO "o2net: connection to " SC_NODEF_FMT " has been idle for 10 " + mlog(ML_NOTICE, "connection to " SC_NODEF_FMT " has been idle for 10 " "seconds, shutting it down.\n", SC_NODEF_ARGS(sc)); mlog(ML_NOTICE, "here are some times that might help debug the " "situation: (tmr %ld.%ld now %ld.%ld dr %ld.%ld adv " diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 3d494d1a5..ae47f4507 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -213,9 +213,11 @@ int ocfs2_find_files_on_disk(const char *name, struct ocfs2_dir_entry **dirent) { int status = -ENOENT; + struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - mlog_entry("(name=%.*s, blkno=%p, inode=%p, dirent_bh=%p, dirent=%p)\n", - namelen, name, blkno, inode, dirent_bh, dirent); + mlog_entry("(osb=%p, parent=%llu, name='%.*s', blkno=%p, inode=%p)\n", + osb, (unsigned long long)OCFS2_I(inode)->ip_blkno, + namelen, name, blkno, inode); *dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent); if (!*dirent_bh || !*dirent) { diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 42775e2bb..355593dd8 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -197,14 +197,12 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, lock->ml.node == dlm->node_num ? "master" : "remote"); memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); + } else if (lksb->flags & DLM_LKSB_PUT_LVB) { + mlog(0, "setting lvb from lockres for %s node\n", + lock->ml.node == dlm->node_num ? "master" : + "remote"); + memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN); } - /* Do nothing for lvb put requests - they should be done in - * place when the lock is downconverted - otherwise we risk - * racing gets and puts which could result in old lvb data - * being propagated. We leave the put flag set and clear it - * here. In the future we might want to clear it at the time - * the put is actually done. - */ spin_unlock(&res->spinlock); } @@ -383,7 +381,8 @@ do_ast: ret = DLM_NORMAL; if (past->type == DLM_AST) { /* do not alter lock refcount. switching lists. */ - list_move_tail(&lock->list, &res->granted); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->granted); mlog(0, "ast: adding to granted list... type=%d, " "convert_type=%d\n", lock->ml.type, lock->ml.convert_type); if (lock->ml.convert_type != LKM_IVMODE) { diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 14530ee7e..88cc43df1 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h @@ -37,17 +37,7 @@ #define DLM_THREAD_SHUFFLE_INTERVAL 5 // flush everything every 5 passes #define DLM_THREAD_MS 200 // flush at least every 200 ms -#define DLM_HASH_SIZE_DEFAULT (1 << 14) -#if DLM_HASH_SIZE_DEFAULT < PAGE_SIZE -# define DLM_HASH_PAGES 1 -#else -# define DLM_HASH_PAGES (DLM_HASH_SIZE_DEFAULT / PAGE_SIZE) -#endif -#define DLM_BUCKETS_PER_PAGE (PAGE_SIZE / sizeof(struct hlist_head)) -#define DLM_HASH_BUCKETS (DLM_HASH_PAGES * DLM_BUCKETS_PER_PAGE) - -/* Intended to make it easier for us to switch out hash functions */ -#define dlm_lockid_hash(_n, _l) full_name_hash(_n, _l) +#define DLM_HASH_BUCKETS (PAGE_SIZE / sizeof(struct hlist_head)) enum dlm_ast_type { DLM_AST = 0, @@ -71,8 +61,7 @@ static inline int dlm_is_recovery_lock(const char *lock_name, int name_len) return 0; } -#define DLM_RECO_STATE_ACTIVE 0x0001 -#define DLM_RECO_STATE_FINALIZE 0x0002 +#define DLM_RECO_STATE_ACTIVE 0x0001 struct dlm_recovery_ctxt { @@ -96,7 +85,7 @@ enum dlm_ctxt_state { struct dlm_ctxt { struct list_head list; - struct hlist_head **lockres_hash; + struct hlist_head *lockres_hash; struct list_head dirty_list; struct list_head purge_list; struct list_head pending_asts; @@ -131,7 +120,6 @@ struct dlm_ctxt struct o2hb_callback_func dlm_hb_down; struct task_struct *dlm_thread_task; struct task_struct *dlm_reco_thread_task; - struct workqueue_struct *dlm_worker; wait_queue_head_t dlm_thread_wq; wait_queue_head_t dlm_reco_thread_wq; wait_queue_head_t ast_wq; @@ -144,11 +132,6 @@ struct dlm_ctxt struct list_head dlm_eviction_callbacks; }; -static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned i) -{ - return dlm->lockres_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + (i % DLM_BUCKETS_PER_PAGE); -} - /* these keventd work queue items are for less-frequently * called functions that cannot be directly called from the * net message handlers for some reason, usually because @@ -233,29 +216,20 @@ struct dlm_lock_resource /* WARNING: Please see the comment in dlm_init_lockres before * adding fields here. */ struct hlist_node hash_node; - struct qstr lockname; struct kref refs; - /* - * Please keep granted, converting, and blocked in this order, - * as some funcs want to iterate over all lists. - * - * All four lists are protected by the hash's reference. - */ + /* please keep these next 3 in this order + * some funcs want to iterate over all lists */ struct list_head granted; struct list_head converting; struct list_head blocked; - struct list_head purge; - /* - * These two lists require you to hold an additional reference - * while they are on the list. - */ struct list_head dirty; struct list_head recovering; // dlm_recovery_ctxt.resources list /* unused lock resources have their last_used stamped and are * put on a list for the dlm thread to run. */ + struct list_head purge; unsigned long last_used; unsigned migration_pending:1; @@ -264,6 +238,7 @@ struct dlm_lock_resource wait_queue_head_t wq; u8 owner; //node which owns the lock resource, or unknown u16 state; + struct qstr lockname; char lvb[DLM_LVB_LEN]; }; @@ -325,15 +300,6 @@ enum dlm_lockres_list { DLM_BLOCKED_LIST }; -static inline int dlm_lvb_is_empty(char *lvb) -{ - int i; - for (i=0; irefs); -} +void dlm_lockres_get(struct dlm_lock_resource *res); void dlm_lockres_put(struct dlm_lock_resource *res); void __dlm_unhash_lockres(struct dlm_lock_resource *res); void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res); struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, const char *name, - unsigned int len, - unsigned int hash); + unsigned int len); struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm, const char *name, unsigned int len); @@ -822,6 +780,8 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data); int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data); int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, u8 nodenum, u8 *real_master); +int dlm_lockres_master_requery(struct dlm_ctxt *dlm, + struct dlm_lock_resource *res, u8 *real_master); int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, @@ -859,7 +819,6 @@ void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node); int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock); -int __dlm_lockres_unused(struct dlm_lock_resource *res); static inline const char * dlm_lock_mode_name(int mode) { diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index c764dc8e4..8285228d9 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c @@ -214,9 +214,6 @@ grant: if (lock->ml.node == dlm->node_num) mlog(0, "doing in-place convert for nonlocal lock\n"); lock->ml.type = type; - if (lock->lksb->flags & DLM_LKSB_PUT_LVB) - memcpy(res->lvb, lock->lksb->lvb, DLM_LVB_LEN); - status = DLM_NORMAL; *call_ast = 1; goto unlock_exit; @@ -234,7 +231,8 @@ switch_queues: lock->ml.convert_type = type; /* do not alter lock refcount. switching lists. */ - list_move_tail(&lock->list, &res->converting); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->converting); unlock_exit: spin_unlock(&lock->spinlock); @@ -250,7 +248,8 @@ void dlm_revert_pending_convert(struct dlm_lock_resource *res, struct dlm_lock *lock) { /* do not alter lock refcount. switching lists. */ - list_move_tail(&lock->list, &res->granted); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->granted); lock->ml.convert_type = LKM_IVMODE; lock->lksb->flags &= ~(DLM_LKSB_GET_LVB|DLM_LKSB_PUT_LVB); } @@ -295,7 +294,8 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, res->state |= DLM_LOCK_RES_IN_PROGRESS; /* move lock to local convert queue */ /* do not alter lock refcount. switching lists. */ - list_move_tail(&lock->list, &res->converting); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->converting); lock->convert_pending = 1; lock->ml.convert_type = type; @@ -464,12 +464,6 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) } spin_lock(&res->spinlock); - status = __dlm_lockres_state_to_status(res); - if (status != DLM_NORMAL) { - spin_unlock(&res->spinlock); - dlm_error(status); - goto leave; - } list_for_each(iter, &res->granted) { lock = list_entry(iter, struct dlm_lock, list); if (lock->ml.cookie == cnv->cookie && @@ -479,21 +473,6 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) } lock = NULL; } - if (!lock) { - __dlm_print_one_lock_resource(res); - list_for_each(iter, &res->granted) { - lock = list_entry(iter, struct dlm_lock, list); - if (lock->ml.node == cnv->node_idx) { - mlog(ML_ERROR, "There is something here " - "for node %u, lock->ml.cookie=%llu, " - "cnv->cookie=%llu\n", cnv->node_idx, - (unsigned long long)lock->ml.cookie, - (unsigned long long)cnv->cookie); - break; - } - } - lock = NULL; - } spin_unlock(&res->spinlock); if (!lock) { status = DLM_IVLOCKID; diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index 3f6c8d88f..c7eae5d33 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c @@ -37,8 +37,10 @@ #include "dlmapi.h" #include "dlmcommon.h" +#include "dlmdebug.h" #include "dlmdomain.h" +#include "dlmdebug.h" #define MLOG_MASK_PREFIX ML_DLM #include "cluster/masklog.h" @@ -118,7 +120,6 @@ void dlm_print_one_lock(struct dlm_lock *lockid) } EXPORT_SYMBOL_GPL(dlm_print_one_lock); -#if 0 void dlm_dump_lock_resources(struct dlm_ctxt *dlm) { struct dlm_lock_resource *res; @@ -135,13 +136,12 @@ void dlm_dump_lock_resources(struct dlm_ctxt *dlm) spin_lock(&dlm->spinlock); for (i=0; ilockres_hash[i]); hlist_for_each_entry(res, iter, bucket, hash_node) dlm_print_one_lock_resource(res); } spin_unlock(&dlm->spinlock); } -#endif /* 0 */ static const char *dlm_errnames[] = { [DLM_NORMAL] = "DLM_NORMAL", diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h new file mode 100644 index 000000000..6858510c3 --- /dev/null +++ b/fs/ocfs2/dlm/dlmdebug.h @@ -0,0 +1,30 @@ +/* -*- mode: c; c-basic-offset: 8; -*- + * vim: noexpandtab sw=8 ts=8 sts=0: + * + * dlmdebug.h + * + * Copyright (C) 2004 Oracle. 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. 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 021110-1307, USA. + * + */ + +#ifndef DLMDEBUG_H +#define DLMDEBUG_H + +void dlm_dump_lock_resources(struct dlm_ctxt *dlm); + +#endif diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 8d1065f8b..8f3a9e310 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c @@ -41,6 +41,7 @@ #include "dlmapi.h" #include "dlmcommon.h" +#include "dlmdebug.h" #include "dlmdomain.h" #include "dlmver.h" @@ -48,33 +49,6 @@ #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_DOMAIN) #include "cluster/masklog.h" -static void dlm_free_pagevec(void **vec, int pages) -{ - while (pages--) - free_page((unsigned long)vec[pages]); - kfree(vec); -} - -static void **dlm_alloc_pagevec(int pages) -{ - void **vec = kmalloc(pages * sizeof(void *), GFP_KERNEL); - int i; - - if (!vec) - return NULL; - - for (i = 0; i < pages; i++) - if (!(vec[i] = (void *)__get_free_page(GFP_KERNEL))) - goto out_free; - - mlog(0, "Allocated DLM hash pagevec; %d pages (%lu expected), %lu buckets per page\n", - pages, DLM_HASH_PAGES, (unsigned long)DLM_BUCKETS_PER_PAGE); - return vec; -out_free: - dlm_free_pagevec(vec, i); - return NULL; -} - /* * * spinlock lock ordering: if multiple locks are needed, obey this ordering: @@ -88,7 +62,7 @@ out_free: * */ -DEFINE_SPINLOCK(dlm_domain_lock); +spinlock_t dlm_domain_lock = SPIN_LOCK_UNLOCKED; LIST_HEAD(dlm_domains); static DECLARE_WAIT_QUEUE_HEAD(dlm_domain_events); @@ -116,7 +90,8 @@ void __dlm_insert_lockres(struct dlm_ctxt *dlm, assert_spin_locked(&dlm->spinlock); q = &res->lockname; - bucket = dlm_lockres_hash(dlm, q->hash); + q->hash = full_name_hash(q->name, q->len); + bucket = &(dlm->lockres_hash[q->hash % DLM_HASH_BUCKETS]); /* get a reference for our hashtable */ dlm_lockres_get(res); @@ -125,32 +100,34 @@ void __dlm_insert_lockres(struct dlm_ctxt *dlm, } struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm, - const char *name, - unsigned int len, - unsigned int hash) + const char *name, + unsigned int len) { + unsigned int hash; + struct hlist_node *iter; + struct dlm_lock_resource *tmpres=NULL; struct hlist_head *bucket; - struct hlist_node *list; mlog_entry("%.*s\n", len, name); assert_spin_locked(&dlm->spinlock); - bucket = dlm_lockres_hash(dlm, hash); + hash = full_name_hash(name, len); - hlist_for_each(list, bucket) { - struct dlm_lock_resource *res = hlist_entry(list, - struct dlm_lock_resource, hash_node); - if (res->lockname.name[0] != name[0]) - continue; - if (unlikely(res->lockname.len != len)) - continue; - if (memcmp(res->lockname.name + 1, name + 1, len - 1)) - continue; - dlm_lockres_get(res); - return res; + bucket = &(dlm->lockres_hash[hash % DLM_HASH_BUCKETS]); + + /* check for pre-existing lock */ + hlist_for_each(iter, bucket) { + tmpres = hlist_entry(iter, struct dlm_lock_resource, hash_node); + if (tmpres->lockname.len == len && + memcmp(tmpres->lockname.name, name, len) == 0) { + dlm_lockres_get(tmpres); + break; + } + + tmpres = NULL; } - return NULL; + return tmpres; } struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm, @@ -158,10 +135,9 @@ struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm, unsigned int len) { struct dlm_lock_resource *res; - unsigned int hash = dlm_lockid_hash(name, len); spin_lock(&dlm->spinlock); - res = __dlm_lookup_lockres(dlm, name, len, hash); + res = __dlm_lookup_lockres(dlm, name, len); spin_unlock(&dlm->spinlock); return res; } @@ -218,7 +194,7 @@ static int dlm_wait_on_domain_helper(const char *domain) static void dlm_free_ctxt_mem(struct dlm_ctxt *dlm) { if (dlm->lockres_hash) - dlm_free_pagevec((void **)dlm->lockres_hash, DLM_HASH_PAGES); + free_page((unsigned long) dlm->lockres_hash); if (dlm->name) kfree(dlm->name); @@ -302,21 +278,11 @@ int dlm_domain_fully_joined(struct dlm_ctxt *dlm) return ret; } -static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm) -{ - if (dlm->dlm_worker) { - flush_workqueue(dlm->dlm_worker); - destroy_workqueue(dlm->dlm_worker); - dlm->dlm_worker = NULL; - } -} - static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm) { dlm_unregister_domain_handlers(dlm); dlm_complete_thread(dlm); dlm_complete_recovery_thread(dlm); - dlm_destroy_dlm_worker(dlm); /* We've left the domain. Now we can take ourselves out of the * list and allow the kref stuff to help us free the @@ -338,8 +304,8 @@ static void dlm_migrate_all_locks(struct dlm_ctxt *dlm) restart: spin_lock(&dlm->spinlock); for (i = 0; i < DLM_HASH_BUCKETS; i++) { - while (!hlist_empty(dlm_lockres_hash(dlm, i))) { - res = hlist_entry(dlm_lockres_hash(dlm, i)->first, + while (!hlist_empty(&dlm->lockres_hash[i])) { + res = hlist_entry(dlm->lockres_hash[i].first, struct dlm_lock_resource, hash_node); /* need reference when manually grabbing lockres */ dlm_lockres_get(res); @@ -408,13 +374,12 @@ static void __dlm_print_nodes(struct dlm_ctxt *dlm) assert_spin_locked(&dlm->spinlock); - printk(KERN_INFO "ocfs2_dlm: Nodes in domain (\"%s\"): ", dlm->name); + mlog(ML_NOTICE, "Nodes in my domain (\"%s\"):\n", dlm->name); while ((node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES, node + 1)) < O2NM_MAX_NODES) { - printk("%d ", node); + mlog(ML_NOTICE, " node %d\n", node); } - printk("\n"); } static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data) @@ -430,7 +395,7 @@ static int dlm_exit_domain_handler(struct o2net_msg *msg, u32 len, void *data) node = exit_msg->node_idx; - printk(KERN_INFO "ocfs2_dlm: Node %u leaves domain %s\n", node, dlm->name); + mlog(0, "Node %u leaves domain %s\n", node, dlm->name); spin_lock(&dlm->spinlock); clear_bit(node, dlm->domain_map); @@ -679,8 +644,6 @@ static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data) set_bit(assert->node_idx, dlm->domain_map); __dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN); - printk(KERN_INFO "ocfs2_dlm: Node %u joins domain %s\n", - assert->node_idx, dlm->name); __dlm_print_nodes(dlm); /* notify anything attached to the heartbeat events */ @@ -1163,13 +1126,6 @@ static int dlm_join_domain(struct dlm_ctxt *dlm) goto bail; } - dlm->dlm_worker = create_singlethread_workqueue("dlm_wq"); - if (!dlm->dlm_worker) { - status = -ENOMEM; - mlog_errno(status); - goto bail; - } - do { unsigned int backoff; status = dlm_try_to_join_domain(dlm); @@ -1210,7 +1166,6 @@ bail: dlm_unregister_domain_handlers(dlm); dlm_complete_thread(dlm); dlm_complete_recovery_thread(dlm); - dlm_destroy_dlm_worker(dlm); } return status; @@ -1236,7 +1191,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain, goto leave; } - dlm->lockres_hash = (struct hlist_head **)dlm_alloc_pagevec(DLM_HASH_PAGES); + dlm->lockres_hash = (struct hlist_head *) __get_free_page(GFP_KERNEL); if (!dlm->lockres_hash) { mlog_errno(-ENOMEM); kfree(dlm->name); @@ -1245,8 +1200,8 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain, goto leave; } - for (i = 0; i < DLM_HASH_BUCKETS; i++) - INIT_HLIST_HEAD(dlm_lockres_hash(dlm, i)); + for (i=0; ilockres_hash[i]); strcpy(dlm->name, domain); dlm->key = key; @@ -1276,7 +1231,6 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain, dlm->dlm_thread_task = NULL; dlm->dlm_reco_thread_task = NULL; - dlm->dlm_worker = NULL; init_waitqueue_head(&dlm->dlm_thread_wq); init_waitqueue_head(&dlm->dlm_reco_thread_wq); init_waitqueue_head(&dlm->reco.event); diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 856c97110..7e88e24b3 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c @@ -116,7 +116,7 @@ static int dlmfs_file_open(struct inode *inode, * doesn't make sense for LVB writes. */ file->f_flags &= ~O_APPEND; - fp = kmalloc(sizeof(*fp), GFP_NOFS); + fp = kmalloc(sizeof(*fp), GFP_KERNEL); if (!fp) { status = -ENOMEM; goto bail; @@ -196,7 +196,7 @@ static ssize_t dlmfs_file_read(struct file *filp, else readlen = count - *ppos; - lvb_buf = kmalloc(readlen, GFP_NOFS); + lvb_buf = kmalloc(readlen, GFP_KERNEL); if (!lvb_buf) return -ENOMEM; @@ -240,7 +240,7 @@ static ssize_t dlmfs_file_write(struct file *filp, else writelen = count - *ppos; - lvb_buf = kmalloc(writelen, GFP_NOFS); + lvb_buf = kmalloc(writelen, GFP_KERNEL); if (!lvb_buf) return -ENOMEM; @@ -335,6 +335,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb) inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; @@ -361,6 +362,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent, inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; @@ -572,10 +574,10 @@ static struct inode_operations dlmfs_file_inode_operations = { .getattr = simple_getattr, }; -static int dlmfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *dlmfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, dlmfs_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, dlmfs_fill_super); } static struct file_system_type dlmfs_fs_type = { diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index 5ca57ec65..6fea28318 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c @@ -53,7 +53,7 @@ #define MLOG_MASK_PREFIX ML_DLM #include "cluster/masklog.h" -static DEFINE_SPINLOCK(dlm_cookie_lock); +static spinlock_t dlm_cookie_lock = SPIN_LOCK_UNLOCKED; static u64 dlm_next_cookie = 1; static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, @@ -201,7 +201,6 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, struct dlm_lock *lock, int flags) { enum dlm_status status = DLM_DENIED; - int lockres_changed = 1; mlog_entry("type=%d\n", lock->ml.type); mlog(0, "lockres %.*s, flags = 0x%x\n", res->lockname.len, @@ -227,25 +226,8 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, res->state &= ~DLM_LOCK_RES_IN_PROGRESS; lock->lock_pending = 0; if (status != DLM_NORMAL) { - if (status == DLM_RECOVERING && - dlm_is_recovery_lock(res->lockname.name, - res->lockname.len)) { - /* recovery lock was mastered by dead node. - * we need to have calc_usage shoot down this - * lockres and completely remaster it. */ - mlog(0, "%s: recovery lock was owned by " - "dead node %u, remaster it now.\n", - dlm->name, res->owner); - } else if (status != DLM_NOTQUEUED) { - /* - * DO NOT call calc_usage, as this would unhash - * the remote lockres before we ever get to use - * it. treat as if we never made any change to - * the lockres. - */ - lockres_changed = 0; + if (status != DLM_NOTQUEUED) dlm_error(status); - } dlm_revert_pending_lock(res, lock); dlm_lock_put(lock); } else if (dlm_is_recovery_lock(res->lockname.name, @@ -257,12 +239,12 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, mlog(0, "%s: $RECOVERY lock for this node (%u) is " "mastered by %u; got lock, manually granting (no ast)\n", dlm->name, dlm->node_num, res->owner); - list_move_tail(&lock->list, &res->granted); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->granted); } spin_unlock(&res->spinlock); - if (lockres_changed) - dlm_lockres_calc_usage(dlm, res); + dlm_lockres_calc_usage(dlm, res); wake_up(&res->wq); return status; @@ -299,14 +281,6 @@ static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, if (tmpret >= 0) { // successfully sent and received ret = status; // this is already a dlm_status - if (ret == DLM_REJECTED) { - mlog(ML_ERROR, "%s:%.*s: BUG. this is a stale lockres " - "no longer owned by %u. that node is coming back " - "up currently.\n", dlm->name, create.namelen, - create.name, res->owner); - dlm_print_one_lock_resource(res); - BUG(); - } } else { mlog_errno(tmpret); if (dlm_is_host_down(tmpret)) { @@ -408,13 +382,13 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, struct dlm_lock *lock; int kernel_allocated = 0; - lock = kcalloc(1, sizeof(*lock), GFP_NOFS); + lock = kcalloc(1, sizeof(*lock), GFP_KERNEL); if (!lock) return NULL; if (!lksb) { /* zero memory only if kernel-allocated */ - lksb = kcalloc(1, sizeof(*lksb), GFP_NOFS); + lksb = kcalloc(1, sizeof(*lksb), GFP_KERNEL); if (!lksb) { kfree(lock); return NULL; @@ -455,16 +429,11 @@ int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data) if (!dlm_grab(dlm)) return DLM_REJECTED; + mlog_bug_on_msg(!dlm_domain_fully_joined(dlm), + "Domain %s not fully joined!\n", dlm->name); + name = create->name; namelen = create->namelen; - status = DLM_REJECTED; - if (!dlm_domain_fully_joined(dlm)) { - mlog(ML_ERROR, "Domain %s not fully joined, but node %u is " - "sending a create_lock message for lock %.*s!\n", - dlm->name, create->node_idx, namelen, name); - dlm_error(status); - goto leave; - } status = DLM_IVBUFLEN; if (namelen > DLM_LOCKID_NAME_MAX) { @@ -700,22 +669,18 @@ retry_lock: msleep(100); /* no waiting for dlm_reco_thread */ if (recovery) { - if (status != DLM_RECOVERING) - goto retry_lock; - - mlog(0, "%s: got RECOVERING " - "for $RECOVERY lock, master " - "was %u\n", dlm->name, - res->owner); - /* wait to see the node go down, then - * drop down and allow the lockres to - * get cleaned up. need to remaster. */ - dlm_wait_for_node_death(dlm, res->owner, - DLM_NODE_DEATH_WAIT_MAX); + if (status == DLM_RECOVERING) { + mlog(0, "%s: got RECOVERING " + "for $REOCVERY lock, master " + "was %u\n", dlm->name, + res->owner); + dlm_wait_for_node_death(dlm, res->owner, + DLM_NODE_DEATH_WAIT_MAX); + } } else { dlm_wait_for_recovery(dlm); - goto retry_lock; } + goto retry_lock; } if (status != DLM_NORMAL) { diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 9503240ef..940be4c13 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -47,6 +47,7 @@ #include "dlmapi.h" #include "dlmcommon.h" +#include "dlmdebug.h" #include "dlmdomain.h" #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_MASTER) @@ -73,7 +74,6 @@ struct dlm_master_list_entry wait_queue_head_t wq; atomic_t woken; struct kref mle_refs; - int inuse; unsigned long maybe_map[BITS_TO_LONGS(O2NM_MAX_NODES)]; unsigned long vote_map[BITS_TO_LONGS(O2NM_MAX_NODES)]; unsigned long response_map[BITS_TO_LONGS(O2NM_MAX_NODES)]; @@ -127,30 +127,18 @@ static inline int dlm_mle_equal(struct dlm_ctxt *dlm, return 1; } -#define dlm_print_nodemap(m) _dlm_print_nodemap(m,#m) -static void _dlm_print_nodemap(unsigned long *map, const char *mapname) -{ - int i; - printk("%s=[ ", mapname); - for (i=0; imaybe_map, - *vote = mle->vote_map, - *resp = mle->response_map, - *node = mle->node_map; k = &mle->mle_refs; if (mle->type == DLM_MLE_BLOCK) @@ -171,29 +159,18 @@ static void dlm_print_one_mle(struct dlm_master_list_entry *mle) name = mle->u.res->lockname.name; } - mlog(ML_NOTICE, "%.*s: %3s refs=%3d mas=%3u new=%3u evt=%c inuse=%d ", - namelen, name, type, refs, master, mle->new_master, attached, - mle->inuse); - dlm_print_nodemap(maybe); - printk(", "); - dlm_print_nodemap(vote); - printk(", "); - dlm_print_nodemap(resp); - printk(", "); - dlm_print_nodemap(node); - printk(", "); - printk("\n"); + mlog(ML_NOTICE, " #%3d: %3s %3d %3u %3u %c (%d)%.*s\n", + i, type, refs, master, mle->new_master, attached, + namelen, namelen, name); } -#if 0 -/* Code here is included but defined out as it aids debugging */ - static void dlm_dump_mles(struct dlm_ctxt *dlm) { struct dlm_master_list_entry *mle; struct list_head *iter; mlog(ML_NOTICE, "dumping all mles for domain %s:\n", dlm->name); + mlog(ML_NOTICE, " ####: type refs owner new events? lockname nodemap votemap respmap maybemap\n"); spin_lock(&dlm->master_lock); list_for_each(iter, &dlm->master_list) { mle = list_entry(iter, struct dlm_master_list_entry, list); @@ -337,31 +314,6 @@ static inline void dlm_mle_detach_hb_events(struct dlm_ctxt *dlm, spin_unlock(&dlm->spinlock); } -static void dlm_get_mle_inuse(struct dlm_master_list_entry *mle) -{ - struct dlm_ctxt *dlm; - dlm = mle->dlm; - - assert_spin_locked(&dlm->spinlock); - assert_spin_locked(&dlm->master_lock); - mle->inuse++; - kref_get(&mle->mle_refs); -} - -static void dlm_put_mle_inuse(struct dlm_master_list_entry *mle) -{ - struct dlm_ctxt *dlm; - dlm = mle->dlm; - - spin_lock(&dlm->spinlock); - spin_lock(&dlm->master_lock); - mle->inuse--; - __dlm_put_mle(mle); - spin_unlock(&dlm->master_lock); - spin_unlock(&dlm->spinlock); - -} - /* remove from list and free */ static void __dlm_put_mle(struct dlm_master_list_entry *mle) { @@ -370,14 +322,9 @@ static void __dlm_put_mle(struct dlm_master_list_entry *mle) assert_spin_locked(&dlm->spinlock); assert_spin_locked(&dlm->master_lock); - if (!atomic_read(&mle->mle_refs.refcount)) { - /* this may or may not crash, but who cares. - * it's a BUG. */ - mlog(ML_ERROR, "bad mle: %p\n", mle); - dlm_print_one_mle(mle); - BUG(); - } else - kref_put(&mle->mle_refs, dlm_mle_release); + BUG_ON(!atomic_read(&mle->mle_refs.refcount)); + + kref_put(&mle->mle_refs, dlm_mle_release); } @@ -420,7 +367,6 @@ static void dlm_init_mle(struct dlm_master_list_entry *mle, memset(mle->response_map, 0, sizeof(mle->response_map)); mle->master = O2NM_MAX_NODES; mle->new_master = O2NM_MAX_NODES; - mle->inuse = 0; if (mle->type == DLM_MLE_MASTER) { BUG_ON(!res); @@ -618,28 +564,6 @@ static void dlm_lockres_release(struct kref *kref) mlog(0, "destroying lockres %.*s\n", res->lockname.len, res->lockname.name); - if (!hlist_unhashed(&res->hash_node) || - !list_empty(&res->granted) || - !list_empty(&res->converting) || - !list_empty(&res->blocked) || - !list_empty(&res->dirty) || - !list_empty(&res->recovering) || - !list_empty(&res->purge)) { - mlog(ML_ERROR, - "Going to BUG for resource %.*s." - " We're on a list! [%c%c%c%c%c%c%c]\n", - res->lockname.len, res->lockname.name, - !hlist_unhashed(&res->hash_node) ? 'H' : ' ', - !list_empty(&res->granted) ? 'G' : ' ', - !list_empty(&res->converting) ? 'C' : ' ', - !list_empty(&res->blocked) ? 'B' : ' ', - !list_empty(&res->dirty) ? 'D' : ' ', - !list_empty(&res->recovering) ? 'R' : ' ', - !list_empty(&res->purge) ? 'P' : ' '); - - dlm_print_one_lock_resource(res); - } - /* By the time we're ready to blow this guy away, we shouldn't * be on any lists. */ BUG_ON(!hlist_unhashed(&res->hash_node)); @@ -655,6 +579,11 @@ static void dlm_lockres_release(struct kref *kref) kfree(res); } +void dlm_lockres_get(struct dlm_lock_resource *res) +{ + kref_get(&res->refs); +} + void dlm_lockres_put(struct dlm_lock_resource *res) { kref_put(&res->refs, dlm_lockres_release); @@ -674,7 +603,7 @@ static void dlm_init_lockres(struct dlm_ctxt *dlm, memcpy(qname, name, namelen); res->lockname.len = namelen; - res->lockname.hash = dlm_lockid_hash(name, namelen); + res->lockname.hash = full_name_hash(name, namelen); init_waitqueue_head(&res->wq); spin_lock_init(&res->spinlock); @@ -708,11 +637,11 @@ struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm, { struct dlm_lock_resource *res; - res = kmalloc(sizeof(struct dlm_lock_resource), GFP_NOFS); + res = kmalloc(sizeof(struct dlm_lock_resource), GFP_KERNEL); if (!res) return NULL; - res->lockname.name = kmalloc(namelen, GFP_NOFS); + res->lockname.name = kmalloc(namelen, GFP_KERNEL); if (!res->lockname.name) { kfree(res); return NULL; @@ -748,20 +677,19 @@ struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm, int blocked = 0; int ret, nodenum; struct dlm_node_iter iter; - unsigned int namelen, hash; + unsigned int namelen; int tries = 0; int bit, wait_on_recovery = 0; BUG_ON(!lockid); namelen = strlen(lockid); - hash = dlm_lockid_hash(lockid, namelen); mlog(0, "get lockres %s (len %d)\n", lockid, namelen); lookup: spin_lock(&dlm->spinlock); - tmpres = __dlm_lookup_lockres(dlm, lockid, namelen, hash); + tmpres = __dlm_lookup_lockres(dlm, lockid, namelen); if (tmpres) { spin_unlock(&dlm->spinlock); mlog(0, "found in hash!\n"); @@ -776,7 +704,7 @@ lookup: mlog(0, "allocating a new resource\n"); /* nothing found and we need to allocate one. */ alloc_mle = (struct dlm_master_list_entry *) - kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); + kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL); if (!alloc_mle) goto leave; res = dlm_new_lockres(dlm, lockid, namelen); @@ -862,11 +790,10 @@ lookup: * if so, the creator of the BLOCK may try to put the last * ref at this time in the assert master handler, so we * need an extra one to keep from a bad ptr deref. */ - dlm_get_mle_inuse(mle); + dlm_get_mle(mle); spin_unlock(&dlm->master_lock); spin_unlock(&dlm->spinlock); -redo_request: while (wait_on_recovery) { /* any cluster changes that occurred after dropping the * dlm spinlock would be detectable be a change on the mle, @@ -885,7 +812,7 @@ redo_request: } dlm_kick_recovery_thread(dlm); - msleep(1000); + msleep(100); dlm_wait_for_recovery(dlm); spin_lock(&dlm->spinlock); @@ -898,15 +825,13 @@ redo_request: } else wait_on_recovery = 0; spin_unlock(&dlm->spinlock); - - if (wait_on_recovery) - dlm_wait_for_node_recovery(dlm, bit, 10000); } /* must wait for lock to be mastered elsewhere */ if (blocked) goto wait; +redo_request: ret = -EINVAL; dlm_node_iter_init(mle->vote_map, &iter); while ((nodenum = dlm_node_iter_next(&iter)) >= 0) { @@ -931,7 +856,6 @@ wait: /* keep going until the response map includes all nodes */ ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked); if (ret < 0) { - wait_on_recovery = 1; mlog(0, "%s:%.*s: node map changed, redo the " "master request now, blocked=%d\n", dlm->name, res->lockname.len, @@ -942,7 +866,7 @@ wait: dlm->name, res->lockname.len, res->lockname.name, blocked); dlm_print_one_lock_resource(res); - dlm_print_one_mle(mle); + /* dlm_print_one_mle(mle); */ tries = 0; } goto redo_request; @@ -956,7 +880,7 @@ wait: dlm_mle_detach_hb_events(dlm, mle); dlm_put_mle(mle); /* put the extra ref */ - dlm_put_mle_inuse(mle); + dlm_put_mle(mle); wake_waiters: spin_lock(&res->spinlock); @@ -997,14 +921,12 @@ recheck: spin_unlock(&res->spinlock); /* this will cause the master to re-assert across * the whole cluster, freeing up mles */ - if (res->owner != dlm->node_num) { - ret = dlm_do_master_request(mle, res->owner); - if (ret < 0) { - /* give recovery a chance to run */ - mlog(ML_ERROR, "link to %u went down?: %d\n", res->owner, ret); - msleep(500); - goto recheck; - } + ret = dlm_do_master_request(mle, res->owner); + if (ret < 0) { + /* give recovery a chance to run */ + mlog(ML_ERROR, "link to %u went down?: %d\n", res->owner, ret); + msleep(500); + goto recheck; } ret = 0; goto leave; @@ -1040,12 +962,6 @@ recheck: "rechecking now\n", dlm->name, res->lockname.len, res->lockname.name); goto recheck; - } else { - if (!voting_done) { - mlog(0, "map not changed and voting not done " - "for %s:%.*s\n", dlm->name, res->lockname.len, - res->lockname.name); - } } if (m != O2NM_MAX_NODES) { @@ -1213,6 +1129,18 @@ static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm, set_bit(node, mle->vote_map); } else { mlog(ML_ERROR, "node down! %d\n", node); + + /* if the node wasn't involved in mastery skip it, + * but clear it out from the maps so that it will + * not affect mastery of this lockres */ + clear_bit(node, mle->response_map); + clear_bit(node, mle->vote_map); + if (!test_bit(node, mle->maybe_map)) + goto next; + + /* if we're already blocked on lock mastery, and the + * dead node wasn't the expected master, or there is + * another node in the maybe_map, keep waiting */ if (blocked) { int lowest = find_next_bit(mle->maybe_map, O2NM_MAX_NODES, 0); @@ -1220,53 +1148,54 @@ static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm, /* act like it was never there */ clear_bit(node, mle->maybe_map); - if (node == lowest) { - mlog(0, "expected master %u died" - " while this node was blocked " - "waiting on it!\n", node); - lowest = find_next_bit(mle->maybe_map, - O2NM_MAX_NODES, - lowest+1); - if (lowest < O2NM_MAX_NODES) { - mlog(0, "%s:%.*s:still " - "blocked. waiting on %u " - "now\n", dlm->name, - res->lockname.len, - res->lockname.name, - lowest); - } else { - /* mle is an MLE_BLOCK, but - * there is now nothing left to - * block on. we need to return - * all the way back out and try - * again with an MLE_MASTER. - * dlm_do_local_recovery_cleanup - * has already run, so the mle - * refcount is ok */ - mlog(0, "%s:%.*s: no " - "longer blocking. try to " - "master this here\n", - dlm->name, - res->lockname.len, - res->lockname.name); - mle->type = DLM_MLE_MASTER; - mle->u.res = res; - } + if (node != lowest) + goto next; + + mlog(ML_ERROR, "expected master %u died while " + "this node was blocked waiting on it!\n", + node); + lowest = find_next_bit(mle->maybe_map, + O2NM_MAX_NODES, + lowest+1); + if (lowest < O2NM_MAX_NODES) { + mlog(0, "still blocked. waiting " + "on %u now\n", lowest); + goto next; } - } - /* now blank out everything, as if we had never - * contacted anyone */ - memset(mle->maybe_map, 0, sizeof(mle->maybe_map)); - memset(mle->response_map, 0, sizeof(mle->response_map)); - /* reset the vote_map to the current node_map */ - memcpy(mle->vote_map, mle->node_map, - sizeof(mle->node_map)); - /* put myself into the maybe map */ - if (mle->type != DLM_MLE_BLOCK) + /* mle is an MLE_BLOCK, but there is now + * nothing left to block on. we need to return + * all the way back out and try again with + * an MLE_MASTER. dlm_do_local_recovery_cleanup + * has already run, so the mle refcount is ok */ + mlog(0, "no longer blocking. we can " + "try to master this here\n"); + mle->type = DLM_MLE_MASTER; + memset(mle->maybe_map, 0, + sizeof(mle->maybe_map)); + memset(mle->response_map, 0, + sizeof(mle->maybe_map)); + memcpy(mle->vote_map, mle->node_map, + sizeof(mle->node_map)); + mle->u.res = res; set_bit(dlm->node_num, mle->maybe_map); + + ret = -EAGAIN; + goto next; + } + + clear_bit(node, mle->maybe_map); + if (node > dlm->node_num) + goto next; + + mlog(0, "dead node in map!\n"); + /* yuck. go back and re-contact all nodes + * in the vote_map, removing this node. */ + memset(mle->response_map, 0, + sizeof(mle->response_map)); } ret = -EAGAIN; +next: node = dlm_bitmap_diff_iter_next(&bdi, &sc); } return ret; @@ -1387,7 +1316,7 @@ int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data) struct dlm_master_request *request = (struct dlm_master_request *) msg->buf; struct dlm_master_list_entry *mle = NULL, *tmpmle = NULL; char *name; - unsigned int namelen, hash; + unsigned int namelen; int found, ret; int set_maybe; int dispatch_assert = 0; @@ -1402,7 +1331,6 @@ int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data) name = request->name; namelen = request->namelen; - hash = dlm_lockid_hash(name, namelen); if (namelen > DLM_LOCKID_NAME_MAX) { response = DLM_IVBUFLEN; @@ -1411,7 +1339,7 @@ int dlm_master_request_handler(struct o2net_msg *msg, u32 len, void *data) way_up_top: spin_lock(&dlm->spinlock); - res = __dlm_lookup_lockres(dlm, name, namelen, hash); + res = __dlm_lookup_lockres(dlm, name, namelen); if (res) { spin_unlock(&dlm->spinlock); @@ -1531,18 +1459,21 @@ way_up_top: spin_unlock(&dlm->spinlock); mle = (struct dlm_master_list_entry *) - kmem_cache_alloc(dlm_mle_cache, GFP_NOFS); + kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL); if (!mle) { response = DLM_MASTER_RESP_ERROR; mlog_errno(-ENOMEM); goto send_response; } + spin_lock(&dlm->spinlock); + dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL, + name, namelen); + spin_unlock(&dlm->spinlock); goto way_up_top; } // mlog(0, "this is second time thru, already allocated, " // "add the block.\n"); - dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL, name, namelen); set_bit(request->node_idx, mle->maybe_map); list_add(&mle->list, &dlm->master_list); response = DLM_MASTER_RESP_NO; @@ -1625,8 +1556,6 @@ again: dlm_node_iter_init(nodemap, &iter); while ((to = dlm_node_iter_next(&iter)) >= 0) { int r = 0; - struct dlm_master_list_entry *mle = NULL; - mlog(0, "sending assert master to %d (%.*s)\n", to, namelen, lockname); memset(&assert, 0, sizeof(assert)); @@ -1638,28 +1567,20 @@ again: tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key, &assert, sizeof(assert), to, &r); if (tmpret < 0) { - mlog(0, "assert_master returned %d!\n", tmpret); + mlog(ML_ERROR, "assert_master returned %d!\n", tmpret); if (!dlm_is_host_down(tmpret)) { - mlog(ML_ERROR, "unhandled error=%d!\n", tmpret); + mlog(ML_ERROR, "unhandled error!\n"); BUG(); } /* a node died. finish out the rest of the nodes. */ - mlog(0, "link to %d went down!\n", to); + mlog(ML_ERROR, "link to %d went down!\n", to); /* any nonzero status return will do */ ret = tmpret; } else if (r < 0) { /* ok, something horribly messed. kill thyself. */ mlog(ML_ERROR,"during assert master of %.*s to %u, " "got %d.\n", namelen, lockname, to, r); - spin_lock(&dlm->spinlock); - spin_lock(&dlm->master_lock); - if (dlm_find_mle(dlm, &mle, (char *)lockname, - namelen)) { - dlm_print_one_mle(mle); - __dlm_put_mle(mle); - } - spin_unlock(&dlm->master_lock); - spin_unlock(&dlm->spinlock); + dlm_dump_lock_resources(dlm); BUG(); } else if (r == EAGAIN) { mlog(0, "%.*s: node %u create mles on other " @@ -1691,7 +1612,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) struct dlm_assert_master *assert = (struct dlm_assert_master *)msg->buf; struct dlm_lock_resource *res = NULL; char *name; - unsigned int namelen, hash; + unsigned int namelen; u32 flags; int master_request = 0; int ret = 0; @@ -1701,7 +1622,6 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) name = assert->name; namelen = assert->namelen; - hash = dlm_lockid_hash(name, namelen); flags = be32_to_cpu(assert->flags); if (namelen > DLM_LOCKID_NAME_MAX) { @@ -1726,7 +1646,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) if (bit >= O2NM_MAX_NODES) { /* not necessarily an error, though less likely. * could be master just re-asserting. */ - mlog(0, "no bits set in the maybe_map, but %u " + mlog(ML_ERROR, "no bits set in the maybe_map, but %u " "is asserting! (%.*s)\n", assert->node_idx, namelen, name); } else if (bit != assert->node_idx) { @@ -1738,36 +1658,19 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) * number winning the mastery will respond * YES to mastery requests, but this node * had no way of knowing. let it pass. */ - mlog(0, "%u is the lowest node, " + mlog(ML_ERROR, "%u is the lowest node, " "%u is asserting. (%.*s) %u must " "have begun after %u won.\n", bit, assert->node_idx, namelen, name, bit, assert->node_idx); } } - if (mle->type == DLM_MLE_MIGRATION) { - if (flags & DLM_ASSERT_MASTER_MLE_CLEANUP) { - mlog(0, "%s:%.*s: got cleanup assert" - " from %u for migration\n", - dlm->name, namelen, name, - assert->node_idx); - } else if (!(flags & DLM_ASSERT_MASTER_FINISH_MIGRATION)) { - mlog(0, "%s:%.*s: got unrelated assert" - " from %u for migration, ignoring\n", - dlm->name, namelen, name, - assert->node_idx); - __dlm_put_mle(mle); - spin_unlock(&dlm->master_lock); - spin_unlock(&dlm->spinlock); - goto done; - } - } } spin_unlock(&dlm->master_lock); /* ok everything checks out with the MLE * now check to see if there is a lockres */ - res = __dlm_lookup_lockres(dlm, name, namelen, hash); + res = __dlm_lookup_lockres(dlm, name, namelen); if (res) { spin_lock(&res->spinlock); if (res->state & DLM_LOCK_RES_RECOVERING) { @@ -1776,8 +1679,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) goto kill; } if (!mle) { - if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN && - res->owner != assert->node_idx) { + if (res->owner != assert->node_idx) { mlog(ML_ERROR, "assert_master from " "%u, but current owner is " "%u! (%.*s)\n", @@ -1830,7 +1732,6 @@ ok: if (mle) { int extra_ref = 0; int nn = -1; - int rr, err = 0; spin_lock(&mle->spinlock); if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION) @@ -1850,64 +1751,27 @@ ok: wake_up(&mle->wq); spin_unlock(&mle->spinlock); - if (res) { + if (mle->type == DLM_MLE_MIGRATION && res) { + mlog(0, "finishing off migration of lockres %.*s, " + "from %u to %u\n", + res->lockname.len, res->lockname.name, + dlm->node_num, mle->new_master); spin_lock(&res->spinlock); - if (mle->type == DLM_MLE_MIGRATION) { - mlog(0, "finishing off migration of lockres %.*s, " - "from %u to %u\n", - res->lockname.len, res->lockname.name, - dlm->node_num, mle->new_master); - res->state &= ~DLM_LOCK_RES_MIGRATING; - dlm_change_lockres_owner(dlm, res, mle->new_master); - BUG_ON(res->state & DLM_LOCK_RES_DIRTY); - } else { - dlm_change_lockres_owner(dlm, res, mle->master); - } + res->state &= ~DLM_LOCK_RES_MIGRATING; + dlm_change_lockres_owner(dlm, res, mle->new_master); + BUG_ON(res->state & DLM_LOCK_RES_DIRTY); spin_unlock(&res->spinlock); } - - /* master is known, detach if not already detached. - * ensures that only one assert_master call will happen - * on this mle. */ - spin_lock(&dlm->spinlock); - spin_lock(&dlm->master_lock); - - rr = atomic_read(&mle->mle_refs.refcount); - if (mle->inuse > 0) { - if (extra_ref && rr < 3) - err = 1; - else if (!extra_ref && rr < 2) - err = 1; - } else { - if (extra_ref && rr < 2) - err = 1; - else if (!extra_ref && rr < 1) - err = 1; - } - if (err) { - mlog(ML_ERROR, "%s:%.*s: got assert master from %u " - "that will mess up this node, refs=%d, extra=%d, " - "inuse=%d\n", dlm->name, namelen, name, - assert->node_idx, rr, extra_ref, mle->inuse); - dlm_print_one_mle(mle); - } - list_del_init(&mle->list); - __dlm_mle_detach_hb_events(dlm, mle); - __dlm_put_mle(mle); + /* master is known, detach if not already detached */ + dlm_mle_detach_hb_events(dlm, mle); + dlm_put_mle(mle); + if (extra_ref) { /* the assert master message now balances the extra * ref given by the master / migration request message. * if this is the last put, it will be removed * from the list. */ - __dlm_put_mle(mle); - } - spin_unlock(&dlm->master_lock); - spin_unlock(&dlm->spinlock); - } else if (res) { - if (res->owner != assert->node_idx) { - mlog(0, "assert_master from %u, but current " - "owner is %u (%.*s), no mle\n", assert->node_idx, - res->owner, namelen, name); + dlm_put_mle(mle); } } @@ -1924,12 +1788,12 @@ done: kill: /* kill the caller! */ - mlog(ML_ERROR, "Bad message received from another node. Dumping state " - "and killing the other node now! This node is OK and can continue.\n"); - __dlm_print_one_lock_resource(res); spin_unlock(&res->spinlock); spin_unlock(&dlm->spinlock); dlm_lockres_put(res); + mlog(ML_ERROR, "Bad message received from another node. Dumping state " + "and killing the other node now! This node is OK and can continue.\n"); + dlm_dump_lock_resources(dlm); dlm_put(dlm); return -EINVAL; } @@ -1939,7 +1803,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, int ignore_higher, u8 request_from, u32 flags) { struct dlm_work_item *item; - item = kcalloc(1, sizeof(*item), GFP_NOFS); + item = kcalloc(1, sizeof(*item), GFP_KERNEL); if (!item) return -ENOMEM; @@ -1961,7 +1825,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, list_add_tail(&item->list, &dlm->work_list); spin_unlock(&dlm->work_lock); - queue_work(dlm->dlm_worker, &dlm->dispatched_work); + schedule_work(&dlm->dispatched_work); return 0; } @@ -2002,23 +1866,6 @@ static void dlm_assert_master_worker(struct dlm_work_item *item, void *data) } } - /* - * If we're migrating this lock to someone else, we are no - * longer allowed to assert out own mastery. OTOH, we need to - * prevent migration from starting while we're still asserting - * our dominance. The reserved ast delays migration. - */ - spin_lock(&res->spinlock); - if (res->state & DLM_LOCK_RES_MIGRATING) { - mlog(0, "Someone asked us to assert mastery, but we're " - "in the middle of migration. Skipping assert, " - "the new master will handle that.\n"); - spin_unlock(&res->spinlock); - goto put; - } else - __dlm_lockres_reserve_ast(res); - spin_unlock(&res->spinlock); - /* this call now finishes out the nodemap * even if one or more nodes die */ mlog(0, "worker about to master %.*s here, this=%u\n", @@ -2028,14 +1875,9 @@ static void dlm_assert_master_worker(struct dlm_work_item *item, void *data) nodemap, flags); if (ret < 0) { /* no need to restart, we are done */ - if (!dlm_is_host_down(ret)) - mlog_errno(ret); + mlog_errno(ret); } - /* Ok, we've asserted ourselves. Let's let migration start. */ - dlm_lockres_release_ast(dlm, res); - -put: dlm_lockres_put(res); mlog(0, "finished with dlm_assert_master_worker\n"); @@ -2074,7 +1916,6 @@ static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, BUG(); /* host is down, so answer for that node would be * DLM_LOCK_RES_OWNER_UNKNOWN. continue. */ - ret = 0; } if (master != DLM_LOCK_RES_OWNER_UNKNOWN) { @@ -2175,14 +2016,14 @@ int dlm_migrate_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, */ ret = -ENOMEM; - mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_NOFS); + mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_KERNEL); if (!mres) { mlog_errno(ret); goto leave; } mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, - GFP_NOFS); + GFP_KERNEL); if (!mle) { mlog_errno(ret); goto leave; @@ -2276,7 +2117,7 @@ fail: * take both dlm->spinlock and dlm->master_lock */ spin_lock(&dlm->spinlock); spin_lock(&dlm->master_lock); - dlm_get_mle_inuse(mle); + dlm_get_mle(mle); spin_unlock(&dlm->master_lock); spin_unlock(&dlm->spinlock); @@ -2293,10 +2134,7 @@ fail: /* migration failed, detach and clean up mle */ dlm_mle_detach_hb_events(dlm, mle); dlm_put_mle(mle); - dlm_put_mle_inuse(mle); - spin_lock(&res->spinlock); - res->state &= ~DLM_LOCK_RES_MIGRATING; - spin_unlock(&res->spinlock); + dlm_put_mle(mle); goto leave; } @@ -2326,8 +2164,8 @@ fail: /* avoid hang during shutdown when migrating lockres * to a node which also goes down */ if (dlm_is_node_dead(dlm, target)) { - mlog(0, "%s:%.*s: expected migration " - "target %u is no longer up, restarting\n", + mlog(0, "%s:%.*s: expected migration target %u " + "is no longer up. restarting.\n", dlm->name, res->lockname.len, res->lockname.name, target); ret = -ERESTARTSYS; @@ -2337,10 +2175,7 @@ fail: /* migration failed, detach and clean up mle */ dlm_mle_detach_hb_events(dlm, mle); dlm_put_mle(mle); - dlm_put_mle_inuse(mle); - spin_lock(&res->spinlock); - res->state &= ~DLM_LOCK_RES_MIGRATING; - spin_unlock(&res->spinlock); + dlm_put_mle(mle); goto leave; } /* TODO: if node died: stop, clean up, return error */ @@ -2356,7 +2191,7 @@ fail: /* master is known, detach if not already detached */ dlm_mle_detach_hb_events(dlm, mle); - dlm_put_mle_inuse(mle); + dlm_put_mle(mle); ret = 0; dlm_lockres_calc_usage(dlm, res); @@ -2375,6 +2210,7 @@ leave: mlog(0, "returning %d\n", ret); return ret; } +EXPORT_SYMBOL_GPL(dlm_migrate_lockres); int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock) { @@ -2626,7 +2462,7 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data) struct dlm_migrate_request *migrate = (struct dlm_migrate_request *) msg->buf; struct dlm_master_list_entry *mle = NULL, *oldmle = NULL; const char *name; - unsigned int namelen, hash; + unsigned int namelen; int ret = 0; if (!dlm_grab(dlm)) @@ -2634,11 +2470,10 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data) name = migrate->name; namelen = migrate->namelen; - hash = dlm_lockid_hash(name, namelen); /* preallocate.. if this fails, abort */ mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache, - GFP_NOFS); + GFP_KERNEL); if (!mle) { ret = -ENOMEM; @@ -2647,7 +2482,7 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data) /* check for pre-existing lock */ spin_lock(&dlm->spinlock); - res = __dlm_lookup_lockres(dlm, name, namelen, hash); + res = __dlm_lookup_lockres(dlm, name, namelen); spin_lock(&dlm->master_lock); if (res) { @@ -2745,7 +2580,6 @@ static int dlm_add_migration_mle(struct dlm_ctxt *dlm, /* remove it from the list so that only one * mle will be found */ list_del_init(&tmp->list); - __dlm_mle_detach_hb_events(dlm, mle); } spin_unlock(&tmp->spinlock); } @@ -2767,7 +2601,6 @@ void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node) struct list_head *iter, *iter2; struct dlm_master_list_entry *mle; struct dlm_lock_resource *res; - unsigned int hash; mlog_entry("dlm=%s, dead node=%u\n", dlm->name, dead_node); top: @@ -2807,7 +2640,7 @@ top: * may result in the mle being unlinked and * freed, but there may still be a process * waiting in the dlmlock path which is fine. */ - mlog(0, "node %u was expected master\n", + mlog(ML_ERROR, "node %u was expected master\n", dead_node); atomic_set(&mle->woken, 1); spin_unlock(&mle->spinlock); @@ -2840,21 +2673,19 @@ top: /* remove from the list early. NOTE: unlinking * list_head while in list_for_each_safe */ - __dlm_mle_detach_hb_events(dlm, mle); spin_lock(&mle->spinlock); list_del_init(&mle->list); atomic_set(&mle->woken, 1); spin_unlock(&mle->spinlock); wake_up(&mle->wq); - mlog(0, "%s: node %u died during migration from " - "%u to %u!\n", dlm->name, dead_node, + mlog(0, "node %u died during migration from " + "%u to %u!\n", dead_node, mle->master, mle->new_master); /* if there is a lockres associated with this * mle, find it and set its owner to UNKNOWN */ - hash = dlm_lockid_hash(mle->u.name.name, mle->u.name.len); res = __dlm_lookup_lockres(dlm, mle->u.name.name, - mle->u.name.len, hash); + mle->u.name.len); if (res) { /* unfortunately if we hit this rare case, our * lock ordering is messed. we need to drop diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 594745fab..805cbabac 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -95,14 +95,11 @@ static void dlm_reco_unlock_ast(void *astdata, enum dlm_status st); static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data); static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data); -static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, - struct dlm_lock_resource *res, - u8 *real_master); static u64 dlm_get_next_mig_cookie(void); -static DEFINE_SPINLOCK(dlm_reco_state_lock); -static DEFINE_SPINLOCK(dlm_mig_cookie_lock); +static spinlock_t dlm_reco_state_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t dlm_mig_cookie_lock = SPIN_LOCK_UNLOCKED; static u64 dlm_mig_cookie = 1; static u64 dlm_get_next_mig_cookie(void) @@ -118,37 +115,12 @@ static u64 dlm_get_next_mig_cookie(void) return c; } -static inline void dlm_set_reco_dead_node(struct dlm_ctxt *dlm, - u8 dead_node) -{ - assert_spin_locked(&dlm->spinlock); - if (dlm->reco.dead_node != dead_node) - mlog(0, "%s: changing dead_node from %u to %u\n", - dlm->name, dlm->reco.dead_node, dead_node); - dlm->reco.dead_node = dead_node; -} - -static inline void dlm_set_reco_master(struct dlm_ctxt *dlm, - u8 master) -{ - assert_spin_locked(&dlm->spinlock); - mlog(0, "%s: changing new_master from %u to %u\n", - dlm->name, dlm->reco.new_master, master); - dlm->reco.new_master = master; -} - -static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm) -{ - assert_spin_locked(&dlm->spinlock); - clear_bit(dlm->reco.dead_node, dlm->recovery_map); - dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); - dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM); -} - static inline void dlm_reset_recovery(struct dlm_ctxt *dlm) { spin_lock(&dlm->spinlock); - __dlm_reset_recovery(dlm); + clear_bit(dlm->reco.dead_node, dlm->recovery_map); + dlm->reco.dead_node = O2NM_INVALID_NODE_NUM; + dlm->reco.new_master = O2NM_INVALID_NODE_NUM; spin_unlock(&dlm->spinlock); } @@ -160,20 +132,11 @@ void dlm_dispatch_work(void *data) struct list_head *iter, *iter2; struct dlm_work_item *item; dlm_workfunc_t *workfunc; - int tot=0; - - if (!dlm_joined(dlm)) - return; spin_lock(&dlm->work_lock); list_splice_init(&dlm->work_list, &tmp_list); spin_unlock(&dlm->work_lock); - list_for_each_safe(iter, iter2, &tmp_list) { - tot++; - } - mlog(0, "%s: work thread has %d work items\n", dlm->name, tot); - list_for_each_safe(iter, iter2, &tmp_list) { item = list_entry(iter, struct dlm_work_item, list); workfunc = item->func; @@ -257,52 +220,6 @@ void dlm_complete_recovery_thread(struct dlm_ctxt *dlm) * */ -static void dlm_print_reco_node_status(struct dlm_ctxt *dlm) -{ - struct dlm_reco_node_data *ndata; - struct dlm_lock_resource *res; - - mlog(ML_NOTICE, "%s(%d): recovery info, state=%s, dead=%u, master=%u\n", - dlm->name, dlm->dlm_reco_thread_task->pid, - dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive", - dlm->reco.dead_node, dlm->reco.new_master); - - list_for_each_entry(ndata, &dlm->reco.node_data, list) { - char *st = "unknown"; - switch (ndata->state) { - case DLM_RECO_NODE_DATA_INIT: - st = "init"; - break; - case DLM_RECO_NODE_DATA_REQUESTING: - st = "requesting"; - break; - case DLM_RECO_NODE_DATA_DEAD: - st = "dead"; - break; - case DLM_RECO_NODE_DATA_RECEIVING: - st = "receiving"; - break; - case DLM_RECO_NODE_DATA_REQUESTED: - st = "requested"; - break; - case DLM_RECO_NODE_DATA_DONE: - st = "done"; - break; - case DLM_RECO_NODE_DATA_FINALIZE_SENT: - st = "finalize-sent"; - break; - default: - st = "bad"; - break; - } - mlog(ML_NOTICE, "%s: reco state, node %u, state=%s\n", - dlm->name, ndata->node_num, st); - } - list_for_each_entry(res, &dlm->reco.resources, recovering) { - mlog(ML_NOTICE, "%s: lockres %.*s on recovering list\n", - dlm->name, res->lockname.len, res->lockname.name); - } -} #define DLM_RECO_THREAD_TIMEOUT_MS (5 * 1000) @@ -350,23 +267,11 @@ int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node) { int dead; spin_lock(&dlm->spinlock); - dead = !test_bit(node, dlm->domain_map); + dead = test_bit(node, dlm->domain_map); spin_unlock(&dlm->spinlock); return dead; } -/* returns true if node is no longer in the domain - * could be dead or just not joined */ -static int dlm_is_node_recovered(struct dlm_ctxt *dlm, u8 node) -{ - int recovered; - spin_lock(&dlm->spinlock); - recovered = !test_bit(node, dlm->recovery_map); - spin_unlock(&dlm->spinlock); - return recovered; -} - - int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout) { if (timeout) { @@ -385,24 +290,6 @@ int dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout) return 0; } -int dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout) -{ - if (timeout) { - mlog(0, "%s: waiting %dms for notification of " - "recovery of node %u\n", dlm->name, timeout, node); - wait_event_timeout(dlm->dlm_reco_thread_wq, - dlm_is_node_recovered(dlm, node), - msecs_to_jiffies(timeout)); - } else { - mlog(0, "%s: waiting indefinitely for notification " - "of recovery of node %u\n", dlm->name, node); - wait_event(dlm->dlm_reco_thread_wq, - dlm_is_node_recovered(dlm, node)); - } - /* for now, return 0 */ - return 0; -} - /* callers of the top-level api calls (dlmlock/dlmunlock) should * block on the dlm->reco.event when recovery is in progress. * the dlm recovery thread will set this state when it begins @@ -421,13 +308,6 @@ static int dlm_in_recovery(struct dlm_ctxt *dlm) void dlm_wait_for_recovery(struct dlm_ctxt *dlm) { - if (dlm_in_recovery(dlm)) { - mlog(0, "%s: reco thread %d in recovery: " - "state=%d, master=%u, dead=%u\n", - dlm->name, dlm->dlm_reco_thread_task->pid, - dlm->reco.state, dlm->reco.new_master, - dlm->reco.dead_node); - } wait_event(dlm->reco.event, !dlm_in_recovery(dlm)); } @@ -461,7 +341,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) mlog(0, "new master %u died while recovering %u!\n", dlm->reco.new_master, dlm->reco.dead_node); /* unset the new_master, leave dead_node */ - dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM); + dlm->reco.new_master = O2NM_INVALID_NODE_NUM; } /* select a target to recover */ @@ -470,14 +350,14 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) bit = find_next_bit (dlm->recovery_map, O2NM_MAX_NODES+1, 0); if (bit >= O2NM_MAX_NODES || bit < 0) - dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); + dlm->reco.dead_node = O2NM_INVALID_NODE_NUM; else - dlm_set_reco_dead_node(dlm, bit); + dlm->reco.dead_node = bit; } else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) { /* BUG? */ mlog(ML_ERROR, "dead_node %u no longer in recovery map!\n", dlm->reco.dead_node); - dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM); + dlm->reco.dead_node = O2NM_INVALID_NODE_NUM; } if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { @@ -486,8 +366,7 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) /* return to main thread loop and sleep. */ return 0; } - mlog(0, "%s(%d):recovery thread found node %u in the recovery map!\n", - dlm->name, dlm->dlm_reco_thread_task->pid, + mlog(0, "recovery thread found node %u in the recovery map!\n", dlm->reco.dead_node); spin_unlock(&dlm->spinlock); @@ -510,8 +389,8 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) } mlog(0, "another node will master this recovery session.\n"); } - mlog(0, "dlm=%s (%d), new_master=%u, this node=%u, dead_node=%u\n", - dlm->name, dlm->dlm_reco_thread_task->pid, dlm->reco.new_master, + mlog(0, "dlm=%s, new_master=%u, this node=%u, dead_node=%u\n", + dlm->name, dlm->reco.new_master, dlm->node_num, dlm->reco.dead_node); /* it is safe to start everything back up here @@ -523,13 +402,11 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) return 0; master_here: - mlog(0, "(%d) mastering recovery of %s:%u here(this=%u)!\n", - dlm->dlm_reco_thread_task->pid, + mlog(0, "mastering recovery of %s:%u here(this=%u)!\n", dlm->name, dlm->reco.dead_node, dlm->node_num); status = dlm_remaster_locks(dlm, dlm->reco.dead_node); if (status < 0) { - /* we should never hit this anymore */ mlog(ML_ERROR, "error %d remastering locks for node %u, " "retrying.\n", status, dlm->reco.dead_node); /* yield a bit to allow any final network messages @@ -556,16 +433,9 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) int destroy = 0; int pass = 0; - do { - /* we have become recovery master. there is no escaping - * this, so just keep trying until we get it. */ - status = dlm_init_recovery_area(dlm, dead_node); - if (status < 0) { - mlog(ML_ERROR, "%s: failed to alloc recovery area, " - "retrying\n", dlm->name); - msleep(1000); - } - } while (status != 0); + status = dlm_init_recovery_area(dlm, dead_node); + if (status < 0) + goto leave; /* safe to access the node data list without a lock, since this * process is the only one to change the list */ @@ -582,36 +452,16 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) continue; } - do { - status = dlm_request_all_locks(dlm, ndata->node_num, - dead_node); - if (status < 0) { - mlog_errno(status); - if (dlm_is_host_down(status)) { - /* node died, ignore it for recovery */ - status = 0; - ndata->state = DLM_RECO_NODE_DATA_DEAD; - /* wait for the domain map to catch up - * with the network state. */ - wait_event_timeout(dlm->dlm_reco_thread_wq, - dlm_is_node_dead(dlm, - ndata->node_num), - msecs_to_jiffies(1000)); - mlog(0, "waited 1 sec for %u, " - "dead? %s\n", ndata->node_num, - dlm_is_node_dead(dlm, ndata->node_num) ? - "yes" : "no"); - } else { - /* -ENOMEM on the other node */ - mlog(0, "%s: node %u returned " - "%d during recovery, retrying " - "after a short wait\n", - dlm->name, ndata->node_num, - status); - msleep(100); - } + status = dlm_request_all_locks(dlm, ndata->node_num, dead_node); + if (status < 0) { + mlog_errno(status); + if (dlm_is_host_down(status)) + ndata->state = DLM_RECO_NODE_DATA_DEAD; + else { + destroy = 1; + goto leave; } - } while (status != 0); + } switch (ndata->state) { case DLM_RECO_NODE_DATA_INIT: @@ -623,9 +473,10 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) mlog(0, "node %u died after requesting " "recovery info for node %u\n", ndata->node_num, dead_node); - /* fine. don't need this node's info. - * continue without it. */ - break; + // start all over + destroy = 1; + status = -EAGAIN; + goto leave; case DLM_RECO_NODE_DATA_REQUESTING: ndata->state = DLM_RECO_NODE_DATA_REQUESTED; mlog(0, "now receiving recovery data from " @@ -669,26 +520,35 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) BUG(); break; case DLM_RECO_NODE_DATA_DEAD: - mlog(0, "node %u died after " + mlog(ML_NOTICE, "node %u died after " "requesting recovery info for " "node %u\n", ndata->node_num, dead_node); - break; + spin_unlock(&dlm_reco_state_lock); + // start all over + destroy = 1; + status = -EAGAIN; + /* instead of spinning like crazy here, + * wait for the domain map to catch up + * with the network state. otherwise this + * can be hit hundreds of times before + * the node is really seen as dead. */ + wait_event_timeout(dlm->dlm_reco_thread_wq, + dlm_is_node_dead(dlm, + ndata->node_num), + msecs_to_jiffies(1000)); + mlog(0, "waited 1 sec for %u, " + "dead? %s\n", ndata->node_num, + dlm_is_node_dead(dlm, ndata->node_num) ? + "yes" : "no"); + goto leave; case DLM_RECO_NODE_DATA_RECEIVING: case DLM_RECO_NODE_DATA_REQUESTED: - mlog(0, "%s: node %u still in state %s\n", - dlm->name, ndata->node_num, - ndata->state==DLM_RECO_NODE_DATA_RECEIVING ? - "receiving" : "requested"); all_nodes_done = 0; break; case DLM_RECO_NODE_DATA_DONE: - mlog(0, "%s: node %u state is done\n", - dlm->name, ndata->node_num); break; case DLM_RECO_NODE_DATA_FINALIZE_SENT: - mlog(0, "%s: node %u state is finalize\n", - dlm->name, ndata->node_num); break; } } @@ -718,7 +578,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) jiffies, dlm->reco.dead_node, dlm->node_num, dlm->reco.new_master); destroy = 1; - status = 0; + status = ret; /* rescan everything marked dirty along the way */ dlm_kick_thread(dlm, NULL); break; @@ -731,6 +591,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) } +leave: if (destroy) dlm_destroy_recovery_area(dlm, dead_node); @@ -756,7 +617,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node) } BUG_ON(num == dead_node); - ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS); + ndata = kcalloc(1, sizeof(*ndata), GFP_KERNEL); if (!ndata) { dlm_destroy_recovery_area(dlm, dead_node); return -ENOMEM; @@ -830,25 +691,16 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data) if (!dlm_grab(dlm)) return -EINVAL; - if (lr->dead_node != dlm->reco.dead_node) { - mlog(ML_ERROR, "%s: node %u sent dead_node=%u, but local " - "dead_node is %u\n", dlm->name, lr->node_idx, - lr->dead_node, dlm->reco.dead_node); - dlm_print_reco_node_status(dlm); - /* this is a hack */ - dlm_put(dlm); - return -ENOMEM; - } BUG_ON(lr->dead_node != dlm->reco.dead_node); - item = kcalloc(1, sizeof(*item), GFP_NOFS); + item = kcalloc(1, sizeof(*item), GFP_KERNEL); if (!item) { dlm_put(dlm); return -ENOMEM; } /* this will get freed by dlm_request_all_locks_worker */ - buf = (char *) __get_free_page(GFP_NOFS); + buf = (char *) __get_free_page(GFP_KERNEL); if (!buf) { kfree(item); dlm_put(dlm); @@ -863,7 +715,7 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data) spin_lock(&dlm->work_lock); list_add_tail(&item->list, &dlm->work_list); spin_unlock(&dlm->work_lock); - queue_work(dlm->dlm_worker, &dlm->dispatched_work); + schedule_work(&dlm->dispatched_work); dlm_put(dlm); return 0; @@ -878,34 +730,32 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) struct list_head *iter; int ret; u8 dead_node, reco_master; - int skip_all_done = 0; dlm = item->dlm; dead_node = item->u.ral.dead_node; reco_master = item->u.ral.reco_master; mres = (struct dlm_migratable_lockres *)data; - mlog(0, "%s: recovery worker started, dead=%u, master=%u\n", - dlm->name, dead_node, reco_master); - if (dead_node != dlm->reco.dead_node || reco_master != dlm->reco.new_master) { - /* worker could have been created before the recovery master - * died. if so, do not continue, but do not error. */ - if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { - mlog(ML_NOTICE, "%s: will not send recovery state, " - "recovery master %u died, thread=(dead=%u,mas=%u)" - " current=(dead=%u,mas=%u)\n", dlm->name, - reco_master, dead_node, reco_master, - dlm->reco.dead_node, dlm->reco.new_master); - } else { - mlog(ML_NOTICE, "%s: reco state invalid: reco(dead=%u, " - "master=%u), request(dead=%u, master=%u)\n", - dlm->name, dlm->reco.dead_node, - dlm->reco.new_master, dead_node, reco_master); - } - goto leave; + /* show extra debug info if the recovery state is messed */ + mlog(ML_ERROR, "%s: bad reco state: reco(dead=%u, master=%u), " + "request(dead=%u, master=%u)\n", + dlm->name, dlm->reco.dead_node, dlm->reco.new_master, + dead_node, reco_master); + mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " + "entry[0]={c=%u:%llu,l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", + dlm->name, mres->lockname_len, mres->lockname, mres->master, + mres->num_locks, mres->total_locks, mres->flags, + dlm_get_lock_cookie_node(mres->ml[0].cookie), + dlm_get_lock_cookie_seq(mres->ml[0].cookie), + mres->ml[0].list, mres->ml[0].flags, + mres->ml[0].type, mres->ml[0].convert_type, + mres->ml[0].highest_blocked, mres->ml[0].node); + BUG(); } + BUG_ON(dead_node != dlm->reco.dead_node); + BUG_ON(reco_master != dlm->reco.new_master); /* lock resources should have already been moved to the * dlm->reco.resources list. now move items from that list @@ -916,20 +766,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) dlm_move_reco_locks_to_list(dlm, &resources, dead_node); /* now we can begin blasting lockreses without the dlm lock */ - - /* any errors returned will be due to the new_master dying, - * the dlm_reco_thread should detect this */ list_for_each(iter, &resources) { res = list_entry (iter, struct dlm_lock_resource, recovering); ret = dlm_send_one_lockres(dlm, res, mres, reco_master, DLM_MRES_RECOVERY); - if (ret < 0) { - mlog(ML_ERROR, "%s: node %u went down while sending " - "recovery state for dead node %u, ret=%d\n", dlm->name, - reco_master, dead_node, ret); - skip_all_done = 1; - break; - } + if (ret < 0) + mlog_errno(ret); } /* move the resources back to the list */ @@ -937,15 +779,10 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) list_splice_init(&resources, &dlm->reco.resources); spin_unlock(&dlm->spinlock); - if (!skip_all_done) { - ret = dlm_send_all_done_msg(dlm, dead_node, reco_master); - if (ret < 0) { - mlog(ML_ERROR, "%s: node %u went down while sending " - "recovery all-done for dead node %u, ret=%d\n", - dlm->name, reco_master, dead_node, ret); - } - } -leave: + ret = dlm_send_all_done_msg(dlm, dead_node, reco_master); + if (ret < 0) + mlog_errno(ret); + free_page((unsigned long)data); } @@ -964,14 +801,8 @@ static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, u8 dead_node, u8 send_to) ret = o2net_send_message(DLM_RECO_DATA_DONE_MSG, dlm->key, &done_msg, sizeof(done_msg), send_to, &tmpret); - if (ret < 0) { - if (!dlm_is_host_down(ret)) { - mlog_errno(ret); - mlog(ML_ERROR, "%s: unknown error sending data-done " - "to %u\n", dlm->name, send_to); - BUG(); - } - } else + /* negative status is ignored by the caller */ + if (ret >= 0) ret = tmpret; return ret; } @@ -991,11 +822,7 @@ int dlm_reco_data_done_handler(struct o2net_msg *msg, u32 len, void *data) mlog(0, "got DATA DONE: dead_node=%u, reco.dead_node=%u, " "node_idx=%u, this node=%u\n", done->dead_node, dlm->reco.dead_node, done->node_idx, dlm->node_num); - - mlog_bug_on_msg((done->dead_node != dlm->reco.dead_node), - "Got DATA DONE: dead_node=%u, reco.dead_node=%u, " - "node_idx=%u, this node=%u\n", done->dead_node, - dlm->reco.dead_node, done->node_idx, dlm->node_num); + BUG_ON(done->dead_node != dlm->reco.dead_node); spin_lock(&dlm_reco_state_lock); list_for_each(iter, &dlm->reco.node_data) { @@ -1078,11 +905,13 @@ static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm, mlog(0, "found lockres owned by dead node while " "doing recovery for node %u. sending it.\n", dead_node); - list_move_tail(&res->recovering, list); + list_del_init(&res->recovering); + list_add_tail(&res->recovering, list); } else if (res->owner == DLM_LOCK_RES_OWNER_UNKNOWN) { mlog(0, "found UNKNOWN owner while doing recovery " "for node %u. sending it.\n", dead_node); - list_move_tail(&res->recovering, list); + list_del_init(&res->recovering); + list_add_tail(&res->recovering, list); } } spin_unlock(&dlm->spinlock); @@ -1194,9 +1023,8 @@ static int dlm_add_lock_to_array(struct dlm_lock *lock, ml->type == LKM_PRMODE) { /* if it is already set, this had better be a PR * and it has to match */ - if (!dlm_lvb_is_empty(mres->lvb) && - (ml->type == LKM_EXMODE || - memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) { + if (mres->lvb[0] && (ml->type == LKM_EXMODE || + memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) { mlog(ML_ERROR, "mismatched lvbs!\n"); __dlm_print_one_lock_resource(lock->lockres); BUG(); @@ -1255,25 +1083,22 @@ int dlm_send_one_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, * we must send it immediately. */ ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, res, total_locks); - if (ret < 0) - goto error; + if (ret < 0) { + // TODO + mlog(ML_ERROR, "dlm_send_mig_lockres_msg " + "returned %d, TODO\n", ret); + BUG(); + } } } /* flush any remaining locks */ ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, res, total_locks); - if (ret < 0) - goto error; - return ret; - -error: - mlog(ML_ERROR, "%s: dlm_send_mig_lockres_msg returned %d\n", - dlm->name, ret); - if (!dlm_is_host_down(ret)) + if (ret < 0) { + // TODO + mlog(ML_ERROR, "dlm_send_mig_lockres_msg returned %d, " + "TODO\n", ret); BUG(); - mlog(0, "%s: node %u went down while sending %s " - "lockres %.*s\n", dlm->name, send_to, - flags & DLM_MRES_RECOVERY ? "recovery" : "migration", - res->lockname.len, res->lockname.name); + } return ret; } @@ -1321,8 +1146,8 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data) mlog(0, "all done flag. all lockres data received!\n"); ret = -ENOMEM; - buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS); - item = kcalloc(1, sizeof(*item), GFP_NOFS); + buf = kmalloc(be16_to_cpu(msg->data_len), GFP_KERNEL); + item = kcalloc(1, sizeof(*item), GFP_KERNEL); if (!buf || !item) goto leave; @@ -1413,7 +1238,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data) spin_lock(&dlm->work_lock); list_add_tail(&item->list, &dlm->work_list); spin_unlock(&dlm->work_lock); - queue_work(dlm->dlm_worker, &dlm->dispatched_work); + schedule_work(&dlm->dispatched_work); leave: dlm_put(dlm); @@ -1487,9 +1312,8 @@ leave: -static int dlm_lockres_master_requery(struct dlm_ctxt *dlm, - struct dlm_lock_resource *res, - u8 *real_master) +int dlm_lockres_master_requery(struct dlm_ctxt *dlm, + struct dlm_lock_resource *res, u8 *real_master) { struct dlm_node_iter iter; int nodenum; @@ -1582,7 +1406,6 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data) struct dlm_ctxt *dlm = data; struct dlm_master_requery *req = (struct dlm_master_requery *)msg->buf; struct dlm_lock_resource *res = NULL; - unsigned int hash; int master = DLM_LOCK_RES_OWNER_UNKNOWN; u32 flags = DLM_ASSERT_MASTER_REQUERY; @@ -1592,10 +1415,8 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data) return master; } - hash = dlm_lockid_hash(req->name, req->namelen); - spin_lock(&dlm->spinlock); - res = __dlm_lookup_lockres(dlm, req->name, req->namelen, hash); + res = __dlm_lookup_lockres(dlm, req->name, req->namelen); if (res) { spin_lock(&res->spinlock); master = res->owner; @@ -1662,7 +1483,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, struct dlm_lock *newlock = NULL; struct dlm_lockstatus *lksb = NULL; int ret = 0; - int i, bad; + int i; struct list_head *iter; struct dlm_lock *lock = NULL; @@ -1708,7 +1529,8 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, /* move the lock to its proper place */ /* do not alter lock refcount. switching lists. */ - list_move_tail(&lock->list, queue); + list_del_init(&lock->list); + list_add_tail(&lock->list, queue); spin_unlock(&res->spinlock); mlog(0, "just reordered a local lock!\n"); @@ -1731,48 +1553,28 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, } lksb->flags |= (ml->flags & (DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB)); - - if (ml->type == LKM_NLMODE) - goto skip_lvb; - - if (!dlm_lvb_is_empty(mres->lvb)) { + + if (mres->lvb[0]) { if (lksb->flags & DLM_LKSB_PUT_LVB) { /* other node was trying to update * lvb when node died. recreate the * lksb with the updated lvb. */ memcpy(lksb->lvb, mres->lvb, DLM_LVB_LEN); - /* the lock resource lvb update must happen - * NOW, before the spinlock is dropped. - * we no longer wait for the AST to update - * the lvb. */ - memcpy(res->lvb, mres->lvb, DLM_LVB_LEN); } else { /* otherwise, the node is sending its * most recent valid lvb info */ BUG_ON(ml->type != LKM_EXMODE && ml->type != LKM_PRMODE); - if (!dlm_lvb_is_empty(res->lvb) && - (ml->type == LKM_EXMODE || - memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) { - int i; - mlog(ML_ERROR, "%s:%.*s: received bad " - "lvb! type=%d\n", dlm->name, - res->lockname.len, - res->lockname.name, ml->type); - printk("lockres lvb=["); - for (i=0; ilvb[i]); - printk("]\nmigrated lvb=["); - for (i=0; ilvb[i]); - printk("]\n"); - dlm_print_one_lock_resource(res); - BUG(); + if (res->lvb[0] && (ml->type == LKM_EXMODE || + memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) { + mlog(ML_ERROR, "received bad lvb!\n"); + __dlm_print_one_lock_resource(res); + BUG(); } memcpy(res->lvb, mres->lvb, DLM_LVB_LEN); } } -skip_lvb: + /* NOTE: * wrt lock queue ordering and recovery: @@ -1790,33 +1592,9 @@ skip_lvb: * relative to each other, but clearly *not* * preserved relative to locks from other nodes. */ - bad = 0; spin_lock(&res->spinlock); - list_for_each_entry(lock, queue, list) { - if (lock->ml.cookie == ml->cookie) { - u64 c = lock->ml.cookie; - mlog(ML_ERROR, "%s:%.*s: %u:%llu: lock already " - "exists on this lockres!\n", dlm->name, - res->lockname.len, res->lockname.name, - dlm_get_lock_cookie_node(c), - dlm_get_lock_cookie_seq(c)); - - mlog(ML_NOTICE, "sent lock: type=%d, conv=%d, " - "node=%u, cookie=%u:%llu, queue=%d\n", - ml->type, ml->convert_type, ml->node, - dlm_get_lock_cookie_node(ml->cookie), - dlm_get_lock_cookie_seq(ml->cookie), - ml->list); - - __dlm_print_one_lock_resource(res); - bad = 1; - break; - } - } - if (!bad) { - dlm_lock_get(newlock); - list_add_tail(&newlock->list, queue); - } + dlm_lock_get(newlock); + list_add_tail(&newlock->list, queue); spin_unlock(&res->spinlock); } mlog(0, "done running all the locks\n"); @@ -1840,14 +1618,8 @@ void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm, struct dlm_lock *lock; res->state |= DLM_LOCK_RES_RECOVERING; - if (!list_empty(&res->recovering)) { - mlog(0, - "Recovering res %s:%.*s, is already on recovery list!\n", - dlm->name, res->lockname.len, res->lockname.name); + if (!list_empty(&res->recovering)) list_del_init(&res->recovering); - } - /* We need to hold a reference while on the recovery list */ - dlm_lockres_get(res); list_add_tail(&res->recovering, &dlm->reco.resources); /* find any pending locks and put them back on proper list */ @@ -1936,11 +1708,9 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, spin_lock(&res->spinlock); dlm_change_lockres_owner(dlm, res, new_master); res->state &= ~DLM_LOCK_RES_RECOVERING; - if (!__dlm_lockres_unused(res)) - __dlm_dirty_lockres(dlm, res); + __dlm_dirty_lockres(dlm, res); spin_unlock(&res->spinlock); wake_up(&res->wq); - dlm_lockres_put(res); } } @@ -1949,7 +1719,7 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, * the RECOVERING state and set the owner * if necessary */ for (i = 0; i < DLM_HASH_BUCKETS; i++) { - bucket = dlm_lockres_hash(dlm, i); + bucket = &(dlm->lockres_hash[i]); hlist_for_each_entry(res, hash_iter, bucket, hash_node) { if (res->state & DLM_LOCK_RES_RECOVERING) { if (res->owner == dead_node) { @@ -1973,13 +1743,11 @@ static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm, dlm->name, res->lockname.len, res->lockname.name, res->owner); list_del_init(&res->recovering); - dlm_lockres_put(res); } spin_lock(&res->spinlock); dlm_change_lockres_owner(dlm, res, new_master); res->state &= ~DLM_LOCK_RES_RECOVERING; - if (!__dlm_lockres_unused(res)) - __dlm_dirty_lockres(dlm, res); + __dlm_dirty_lockres(dlm, res); spin_unlock(&res->spinlock); wake_up(&res->wq); } @@ -2116,7 +1884,7 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node) * need to be fired as a result. */ for (i = 0; i < DLM_HASH_BUCKETS; i++) { - bucket = dlm_lockres_hash(dlm, i); + bucket = &(dlm->lockres_hash[i]); hlist_for_each_entry(res, iter, bucket, hash_node) { /* always prune any $RECOVERY entries for dead nodes, * otherwise hangs can occur during later recovery */ @@ -2156,20 +1924,6 @@ static void __dlm_hb_node_down(struct dlm_ctxt *dlm, int idx) { assert_spin_locked(&dlm->spinlock); - if (dlm->reco.new_master == idx) { - mlog(0, "%s: recovery master %d just died\n", - dlm->name, idx); - if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { - /* finalize1 was reached, so it is safe to clear - * the new_master and dead_node. that recovery - * is complete. */ - mlog(0, "%s: dead master %d had reached " - "finalize1 state, clearing\n", dlm->name, idx); - dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; - __dlm_reset_recovery(dlm); - } - } - /* check to see if the node is already considered dead */ if (!test_bit(idx, dlm->live_nodes_map)) { mlog(0, "for domain %s, node %d is already dead. " @@ -2333,7 +2087,7 @@ again: /* set the new_master to this node */ spin_lock(&dlm->spinlock); - dlm_set_reco_master(dlm, dlm->node_num); + dlm->reco.new_master = dlm->node_num; spin_unlock(&dlm->spinlock); } @@ -2371,10 +2125,6 @@ again: mlog(0, "%s: reco master %u is ready to recover %u\n", dlm->name, dlm->reco.new_master, dlm->reco.dead_node); status = -EEXIST; - } else if (ret == DLM_RECOVERING) { - mlog(0, "dlm=%s dlmlock says master node died (this=%u)\n", - dlm->name, dlm->node_num); - goto again; } else { struct dlm_lock_resource *res; @@ -2406,7 +2156,7 @@ static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node) mlog_entry("%u\n", dead_node); - mlog(0, "%s: dead node is %u\n", dlm->name, dead_node); + mlog(0, "dead node is %u\n", dead_node); spin_lock(&dlm->spinlock); dlm_node_iter_init(dlm->domain_map, &iter); @@ -2464,14 +2214,6 @@ retry: * another ENOMEM */ msleep(100); goto retry; - } else if (ret == EAGAIN) { - mlog(0, "%s: trying to start recovery of node " - "%u, but node %u is waiting for last recovery " - "to complete, backoff for a bit\n", dlm->name, - dead_node, nodenum); - /* TODO Look into replacing msleep with cond_resched() */ - msleep(100); - goto retry; } } @@ -2487,20 +2229,8 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data) if (!dlm_grab(dlm)) return 0; - spin_lock(&dlm->spinlock); - if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { - mlog(0, "%s: node %u wants to recover node %u (%u:%u) " - "but this node is in finalize state, waiting on finalize2\n", - dlm->name, br->node_idx, br->dead_node, - dlm->reco.dead_node, dlm->reco.new_master); - spin_unlock(&dlm->spinlock); - return EAGAIN; - } - spin_unlock(&dlm->spinlock); - - mlog(0, "%s: node %u wants to recover node %u (%u:%u)\n", - dlm->name, br->node_idx, br->dead_node, - dlm->reco.dead_node, dlm->reco.new_master); + mlog(0, "node %u wants to recover node %u\n", + br->node_idx, br->dead_node); dlm_fire_domain_eviction_callbacks(dlm, br->dead_node); @@ -2522,8 +2252,8 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data) "node %u changing it to %u\n", dlm->name, dlm->reco.dead_node, br->node_idx, br->dead_node); } - dlm_set_reco_master(dlm, br->node_idx); - dlm_set_reco_dead_node(dlm, br->dead_node); + dlm->reco.new_master = br->node_idx; + dlm->reco.dead_node = br->dead_node; if (!test_bit(br->dead_node, dlm->recovery_map)) { mlog(0, "recovery master %u sees %u as dead, but this " "node has not yet. marking %u as dead\n", @@ -2542,16 +2272,10 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data) spin_unlock(&dlm->spinlock); dlm_kick_recovery_thread(dlm); - - mlog(0, "%s: recovery started by node %u, for %u (%u:%u)\n", - dlm->name, br->node_idx, br->dead_node, - dlm->reco.dead_node, dlm->reco.new_master); - dlm_put(dlm); return 0; } -#define DLM_FINALIZE_STAGE2 0x01 static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm) { int ret = 0; @@ -2559,31 +2283,25 @@ static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm) struct dlm_node_iter iter; int nodenum; int status; - int stage = 1; - mlog(0, "finishing recovery for node %s:%u, " - "stage %d\n", dlm->name, dlm->reco.dead_node, stage); + mlog(0, "finishing recovery for node %s:%u\n", + dlm->name, dlm->reco.dead_node); spin_lock(&dlm->spinlock); dlm_node_iter_init(dlm->domain_map, &iter); spin_unlock(&dlm->spinlock); -stage2: memset(&fr, 0, sizeof(fr)); fr.node_idx = dlm->node_num; fr.dead_node = dlm->reco.dead_node; - if (stage == 2) - fr.flags |= DLM_FINALIZE_STAGE2; while ((nodenum = dlm_node_iter_next(&iter)) >= 0) { if (nodenum == dlm->node_num) continue; ret = o2net_send_message(DLM_FINALIZE_RECO_MSG, dlm->key, &fr, sizeof(fr), nodenum, &status); - if (ret >= 0) + if (ret >= 0) { ret = status; - if (ret < 0) { - mlog_errno(ret); if (dlm_is_host_down(ret)) { /* this has no effect on this recovery * session, so set the status to zero to @@ -2591,17 +2309,13 @@ stage2: mlog(ML_ERROR, "node %u went down after this " "node finished recovery.\n", nodenum); ret = 0; - continue; } + } + if (ret < 0) { + mlog_errno(ret); break; } } - if (stage == 1) { - /* reset the node_iter back to the top and send finalize2 */ - iter.curnode = -1; - stage = 2; - goto stage2; - } return ret; } @@ -2610,19 +2324,14 @@ int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data) { struct dlm_ctxt *dlm = data; struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf; - int stage = 1; /* ok to return 0, domain has gone away */ if (!dlm_grab(dlm)) return 0; - if (fr->flags & DLM_FINALIZE_STAGE2) - stage = 2; + mlog(0, "node %u finalizing recovery of node %u\n", + fr->node_idx, fr->dead_node); - mlog(0, "%s: node %u finalizing recovery stage%d of " - "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage, - fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); - spin_lock(&dlm->spinlock); if (dlm->reco.new_master != fr->node_idx) { @@ -2638,41 +2347,13 @@ int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data) BUG(); } - switch (stage) { - case 1: - dlm_finish_local_lockres_recovery(dlm, fr->dead_node, fr->node_idx); - if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { - mlog(ML_ERROR, "%s: received finalize1 from " - "new master %u for dead node %u, but " - "this node has already received it!\n", - dlm->name, fr->node_idx, fr->dead_node); - dlm_print_reco_node_status(dlm); - BUG(); - } - dlm->reco.state |= DLM_RECO_STATE_FINALIZE; - spin_unlock(&dlm->spinlock); - break; - case 2: - if (!(dlm->reco.state & DLM_RECO_STATE_FINALIZE)) { - mlog(ML_ERROR, "%s: received finalize2 from " - "new master %u for dead node %u, but " - "this node did not have finalize1!\n", - dlm->name, fr->node_idx, fr->dead_node); - dlm_print_reco_node_status(dlm); - BUG(); - } - dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; - spin_unlock(&dlm->spinlock); - dlm_reset_recovery(dlm); - dlm_kick_recovery_thread(dlm); - break; - default: - BUG(); - } + dlm_finish_local_lockres_recovery(dlm, fr->dead_node, fr->node_idx); - mlog(0, "%s: recovery done, reco master was %u, dead now %u, master now %u\n", - dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master); + spin_unlock(&dlm->spinlock); + dlm_reset_recovery(dlm); + + dlm_kick_recovery_thread(dlm); dlm_put(dlm); return 0; } diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index 0c822f3ff..5be9d14f1 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c @@ -39,7 +39,6 @@ #include #include #include -#include #include "cluster/heartbeat.h" @@ -54,8 +53,6 @@ #include "cluster/masklog.h" static int dlm_thread(void *data); -static void dlm_purge_lockres_now(struct dlm_ctxt *dlm, - struct dlm_lock_resource *lockres); static void dlm_flush_asts(struct dlm_ctxt *dlm); @@ -83,7 +80,7 @@ repeat: } -int __dlm_lockres_unused(struct dlm_lock_resource *res) +static int __dlm_lockres_unused(struct dlm_lock_resource *res) { if (list_empty(&res->granted) && list_empty(&res->converting) && @@ -106,20 +103,6 @@ void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm, assert_spin_locked(&res->spinlock); if (__dlm_lockres_unused(res)){ - /* For now, just keep any resource we master */ - if (res->owner == dlm->node_num) - { - if (!list_empty(&res->purge)) { - mlog(0, "we master %s:%.*s, but it is on " - "the purge list. Removing\n", - dlm->name, res->lockname.len, - res->lockname.name); - list_del_init(&res->purge); - dlm->purge_count--; - } - return; - } - if (list_empty(&res->purge)) { mlog(0, "putting lockres %.*s from purge list\n", res->lockname.len, res->lockname.name); @@ -127,23 +110,10 @@ void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm, res->last_used = jiffies; list_add_tail(&res->purge, &dlm->purge_list); dlm->purge_count++; - - /* if this node is not the owner, there is - * no way to keep track of who the owner could be. - * unhash it to avoid serious problems. */ - if (res->owner != dlm->node_num) { - mlog(0, "%s:%.*s: doing immediate " - "purge of lockres owned by %u\n", - dlm->name, res->lockname.len, - res->lockname.name, res->owner); - - dlm_purge_lockres_now(dlm, res); - } } } else if (!list_empty(&res->purge)) { - mlog(0, "removing lockres %.*s from purge list, " - "owner=%u\n", res->lockname.len, res->lockname.name, - res->owner); + mlog(0, "removing lockres %.*s from purge list\n", + res->lockname.len, res->lockname.name); list_del_init(&res->purge); dlm->purge_count--; @@ -195,7 +165,6 @@ again: } else if (ret < 0) { mlog(ML_NOTICE, "lockres %.*s: migrate failed, retrying\n", lockres->lockname.len, lockres->lockname.name); - msleep(100); goto again; } @@ -209,24 +178,6 @@ finish: __dlm_unhash_lockres(lockres); } -/* make an unused lockres go away immediately. - * as soon as the dlm spinlock is dropped, this lockres - * will not be found. kfree still happens on last put. */ -static void dlm_purge_lockres_now(struct dlm_ctxt *dlm, - struct dlm_lock_resource *lockres) -{ - assert_spin_locked(&dlm->spinlock); - assert_spin_locked(&lockres->spinlock); - - BUG_ON(!__dlm_lockres_unused(lockres)); - - if (!list_empty(&lockres->purge)) { - list_del_init(&lockres->purge); - dlm->purge_count--; - } - __dlm_unhash_lockres(lockres); -} - static void dlm_run_purge_list(struct dlm_ctxt *dlm, int purge_now) { @@ -367,7 +318,8 @@ converting: target->ml.type = target->ml.convert_type; target->ml.convert_type = LKM_IVMODE; - list_move_tail(&target->list, &res->granted); + list_del_init(&target->list); + list_add_tail(&target->list, &res->granted); BUG_ON(!target->lksb); target->lksb->status = DLM_NORMAL; @@ -428,7 +380,8 @@ blocked: target->ml.type, target->ml.node); // target->ml.type is already correct - list_move_tail(&target->list, &res->granted); + list_del_init(&target->list); + list_add_tail(&target->list, &res->granted); BUG_ON(!target->lksb); target->lksb->status = DLM_NORMAL; @@ -469,8 +422,6 @@ void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) /* don't shuffle secondary queues */ if ((res->owner == dlm->node_num) && !(res->state & DLM_LOCK_RES_DIRTY)) { - /* ref for dirty_list */ - dlm_lockres_get(res); list_add_tail(&res->dirty, &dlm->dirty_list); res->state |= DLM_LOCK_RES_DIRTY; } @@ -655,8 +606,6 @@ static int dlm_thread(void *data) list_del_init(&res->dirty); spin_unlock(&res->spinlock); spin_unlock(&dlm->spinlock); - /* Drop dirty_list ref */ - dlm_lockres_put(res); /* lockres can be re-dirtied/re-added to the * dirty_list in this gap, but that is ok */ @@ -693,9 +642,8 @@ static int dlm_thread(void *data) * spinlock and do NOT have the dlm lock. * safe to reserve/queue asts and run the lists. */ - mlog(0, "calling dlm_shuffle_lists with dlm=%s, " - "res=%.*s\n", dlm->name, - res->lockname.len, res->lockname.name); + mlog(0, "calling dlm_shuffle_lists with dlm=%p, " + "res=%p\n", dlm, res); /* called while holding lockres lock */ dlm_shuffle_lists(dlm, res); @@ -709,8 +657,6 @@ in_progress: /* if the lock was in-progress, stick * it on the back of the list */ if (delay) { - /* ref for dirty_list */ - dlm_lockres_get(res); spin_lock(&res->spinlock); list_add_tail(&res->dirty, &dlm->dirty_list); res->state |= DLM_LOCK_RES_DIRTY; @@ -731,7 +677,7 @@ in_progress: /* yield and continue right away if there is more work to do */ if (!n) { - cond_resched(); + yield(); continue; } diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index 37be4b2e0..7b1a27542 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c @@ -155,7 +155,7 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, else status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); - if (status != DLM_NORMAL && (status != DLM_CANCELGRANT || !master_node)) + if (status != DLM_NORMAL) goto leave; /* By now this has been masked out of cancel requests. */ @@ -183,7 +183,8 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, spin_lock(&lock->spinlock); /* if the master told us the lock was already granted, * let the ast handle all of these actions */ - if (status == DLM_CANCELGRANT) { + if (status == DLM_NORMAL && + lksb->status == DLM_CANCELGRANT) { actions &= ~(DLM_UNLOCK_REMOVE_LOCK| DLM_UNLOCK_REGRANT_LOCK| DLM_UNLOCK_CLEAR_CONVERT_TYPE); @@ -270,7 +271,8 @@ void dlm_commit_pending_unlock(struct dlm_lock_resource *res, void dlm_commit_pending_cancel(struct dlm_lock_resource *res, struct dlm_lock *lock) { - list_move_tail(&lock->list, &res->granted); + list_del_init(&lock->list); + list_add_tail(&lock->list, &res->granted); lock->ml.convert_type = LKM_IVMODE; } @@ -317,16 +319,6 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, mlog_entry("%.*s\n", res->lockname.len, res->lockname.name); - if (owner == dlm->node_num) { - /* ended up trying to contact ourself. this means - * that the lockres had been remote but became local - * via a migration. just retry it, now as local */ - mlog(0, "%s:%.*s: this node became the master due to a " - "migration, re-evaluate now\n", dlm->name, - res->lockname.len, res->lockname.name); - return DLM_FORWARD; - } - memset(&unlock, 0, sizeof(unlock)); unlock.node_idx = dlm->node_num; unlock.flags = cpu_to_be32(flags); @@ -348,9 +340,14 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, vec, veclen, owner, &status); if (tmpret >= 0) { // successfully sent and received - if (status == DLM_FORWARD) + if (status == DLM_CANCELGRANT) + ret = DLM_NORMAL; + else if (status == DLM_FORWARD) { mlog(0, "master was in-progress. retry\n"); - ret = status; + ret = DLM_FORWARD; + } else + ret = status; + lksb->status = status; } else { mlog_errno(tmpret); if (dlm_is_host_down(tmpret)) { @@ -366,6 +363,7 @@ static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm, /* something bad. this will BUG in ocfs2 */ ret = dlm_err_to_dlm_status(tmpret); } + lksb->status = ret; } return ret; @@ -476,10 +474,6 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data) /* lock was found on queue */ lksb = lock->lksb; - if (flags & (LKM_VALBLK|LKM_PUT_LVB) && - lock->ml.type != LKM_EXMODE) - flags &= ~(LKM_VALBLK|LKM_PUT_LVB); - /* unlockast only called on originating node */ if (flags & LKM_PUT_LVB) { lksb->flags |= DLM_LKSB_PUT_LVB; @@ -504,8 +498,11 @@ not_found: "cookie=%u:%llu\n", dlm_get_lock_cookie_node(unlock->cookie), dlm_get_lock_cookie_seq(unlock->cookie)); - else + else { + /* send the lksb->status back to the other node */ + status = lksb->status; dlm_lock_put(lock); + } leave: if (res) @@ -527,22 +524,26 @@ static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm, if (dlm_lock_on_list(&res->blocked, lock)) { /* cancel this outright */ + lksb->status = DLM_NORMAL; status = DLM_NORMAL; *actions = (DLM_UNLOCK_CALL_AST | DLM_UNLOCK_REMOVE_LOCK); } else if (dlm_lock_on_list(&res->converting, lock)) { /* cancel the request, put back on granted */ + lksb->status = DLM_NORMAL; status = DLM_NORMAL; *actions = (DLM_UNLOCK_CALL_AST | DLM_UNLOCK_REMOVE_LOCK | DLM_UNLOCK_REGRANT_LOCK | DLM_UNLOCK_CLEAR_CONVERT_TYPE); } else if (dlm_lock_on_list(&res->granted, lock)) { - /* too late, already granted. */ - status = DLM_CANCELGRANT; + /* too late, already granted. DLM_CANCELGRANT */ + lksb->status = DLM_CANCELGRANT; + status = DLM_NORMAL; *actions = DLM_UNLOCK_CALL_AST; } else { mlog(ML_ERROR, "lock to cancel is not on any list!\n"); + lksb->status = DLM_IVLOCKID; status = DLM_IVLOCKID; *actions = 0; } @@ -559,11 +560,13 @@ static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm, /* unlock request */ if (!dlm_lock_on_list(&res->granted, lock)) { + lksb->status = DLM_DENIED; status = DLM_DENIED; dlm_error(status); *actions = 0; } else { /* unlock granted lock */ + lksb->status = DLM_NORMAL; status = DLM_NORMAL; *actions = (DLM_UNLOCK_FREE_LOCK | DLM_UNLOCK_CALL_AST | @@ -620,8 +623,6 @@ retry: spin_lock(&res->spinlock); is_master = (res->owner == dlm->node_num); - if (flags & LKM_VALBLK && lock->ml.type != LKM_EXMODE) - flags &= ~LKM_VALBLK; spin_unlock(&res->spinlock); if (is_master) { @@ -655,7 +656,7 @@ retry: } if (call_ast) { - mlog(0, "calling unlockast(%p, %d)\n", data, status); + mlog(0, "calling unlockast(%p, %d)\n", data, lksb->status); if (is_master) { /* it is possible that there is one last bast * pending. make sure it is flushed, then @@ -667,12 +668,9 @@ retry: wait_event(dlm->ast_wq, dlm_lock_basts_flushed(dlm, lock)); } - (*unlockast)(data, status); + (*unlockast)(data, lksb->status); } - if (status == DLM_CANCELGRANT) - status = DLM_NORMAL; - if (status == DLM_NORMAL) { mlog(0, "kicking the thread\n"); dlm_kick_thread(dlm, res); diff --git a/fs/ocfs2/dlm/userdlm.c b/fs/ocfs2/dlm/userdlm.c index e641b084b..74ca4e5f9 100644 --- a/fs/ocfs2/dlm/userdlm.c +++ b/fs/ocfs2/dlm/userdlm.c @@ -672,7 +672,7 @@ struct dlm_ctxt *user_dlm_register_context(struct qstr *name) u32 dlm_key; char *domain; - domain = kmalloc(name->len + 1, GFP_NOFS); + domain = kmalloc(name->len + 1, GFP_KERNEL); if (!domain) { mlog_errno(-ENOMEM); return ERR_PTR(-ENOMEM); diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 1869d233f..64cd52860 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -242,7 +242,7 @@ static void ocfs2_build_lock_name(enum ocfs2_lock_type type, mlog_exit_void(); } -static DEFINE_SPINLOCK(ocfs2_dlm_tracking_lock); +static spinlock_t ocfs2_dlm_tracking_lock = SPIN_LOCK_UNLOCKED; static void ocfs2_add_lockres_tracking(struct ocfs2_lock_res *res, struct ocfs2_dlm_debug *dlm_debug) @@ -1995,7 +1995,7 @@ static int ocfs2_dlm_debug_open(struct inode *inode, struct file *file) mlog_errno(ret); goto out; } - osb = inode->i_private; + osb = (struct ocfs2_super *) inode->u.generic_ip; ocfs2_get_dlm_debug(osb->osb_dlm_debug); priv->p_dlm_debug = osb->osb_dlm_debug; INIT_LIST_HEAD(&priv->p_iter_res.l_debug_list); @@ -2071,7 +2071,8 @@ int ocfs2_dlm_init(struct ocfs2_super *osb) } /* launch vote thread */ - osb->vote_task = kthread_run(ocfs2_vote_thread, osb, "ocfs2vote"); + osb->vote_task = kthread_run(ocfs2_vote_thread, osb, "ocfs2vote-%d", + osb->osb_id); if (IS_ERR(osb->vote_task)) { status = PTR_ERR(osb->vote_task); osb->vote_task = NULL; diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c index fcd4475d1..1a5c69071 100644 --- a/fs/ocfs2/extent_map.c +++ b/fs/ocfs2/extent_map.c @@ -298,7 +298,7 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode, ret = ocfs2_extent_map_insert(inode, rec, le16_to_cpu(el->l_tree_depth)); - if (ret && (ret != -EEXIST)) { + if (ret) { mlog_errno(ret); goto out_free; } @@ -427,11 +427,6 @@ static int ocfs2_extent_map_insert_entry(struct ocfs2_extent_map *em, /* * Simple rule: on any return code other than -EAGAIN, anything left * in the insert_context will be freed. - * - * Simple rule #2: A return code of -EEXIST from this function or - * its calls to ocfs2_extent_map_insert_entry() signifies that another - * thread beat us to the insert. It is not an actual error, but it - * tells the caller we have no more work to do. */ static int ocfs2_extent_map_try_insert(struct inode *inode, struct ocfs2_extent_rec *rec, @@ -453,32 +448,22 @@ static int ocfs2_extent_map_try_insert(struct inode *inode, goto out_unlock; } - /* Since insert_entry failed, the map MUST have old_ent */ old_ent = ocfs2_extent_map_lookup(em, le32_to_cpu(rec->e_cpos), - le32_to_cpu(rec->e_clusters), - NULL, NULL); + le32_to_cpu(rec->e_clusters), NULL, + NULL); BUG_ON(!old_ent); - if (old_ent->e_tree_depth < tree_depth) { - /* Another thread beat us to the lower tree_depth */ - ret = -EEXIST; + ret = -EEXIST; + if (old_ent->e_tree_depth < tree_depth) goto out_unlock; - } if (old_ent->e_tree_depth == tree_depth) { - /* - * Another thread beat us to this tree_depth. - * Let's make sure we agree with that thread (the - * extent_rec should be identical). - */ if (!memcmp(rec, &old_ent->e_rec, sizeof(struct ocfs2_extent_rec))) ret = 0; - else - /* FIXME: Should this be ESRCH/EBADR??? */ - ret = -EEXIST; + /* FIXME: Should this be ESRCH/EBADR??? */ goto out_unlock; } @@ -614,7 +599,7 @@ static int ocfs2_extent_map_insert(struct inode *inode, tree_depth, &ctxt); } while (ret == -EAGAIN); - if ((ret < 0) && (ret != -EEXIST)) + if (ret < 0) mlog_errno(ret); if (ctxt.left_ent) diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index fa3a6dc0c..327a5b7b8 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -251,6 +251,7 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe, inode->i_mode = le16_to_cpu(fe->i_mode); inode->i_uid = le32_to_cpu(fe->i_uid); inode->i_gid = le32_to_cpu(fe->i_gid); + inode->i_blksize = (u32)osb->s_clustersize; /* Fast symlinks will have i_size but no allocated clusters. */ if (S_ISLNK(inode->i_mode) && !fe->i_clusters) @@ -1163,6 +1164,8 @@ leave: void ocfs2_refresh_inode(struct inode *inode, struct ocfs2_dinode *fe) { + struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); + spin_lock(&OCFS2_I(inode)->ip_lock); OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters); @@ -1171,6 +1174,7 @@ void ocfs2_refresh_inode(struct inode *inode, inode->i_uid = le32_to_cpu(fe->i_uid); inode->i_gid = le32_to_cpu(fe->i_gid); inode->i_mode = le16_to_cpu(fe->i_mode); + inode->i_blksize = (u32) osb->s_clustersize; if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0) inode->i_blocks = 0; else diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index 35140f6cf..84c507961 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h @@ -114,7 +114,7 @@ static inline struct ocfs2_inode_info *OCFS2_I(struct inode *inode) extern kmem_cache_t *ocfs2_inode_cache; -extern const struct address_space_operations ocfs2_aops; +extern struct address_space_operations ocfs2_aops; struct buffer_head *ocfs2_bread(struct inode *inode, int block, int *err, int reada); diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index f92bf1dd3..eebc3cfa6 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -49,7 +49,7 @@ #include "buffer_head_io.h" -DEFINE_SPINLOCK(trans_inc_lock); +spinlock_t trans_inc_lock = SPIN_LOCK_UNLOCKED; static int ocfs2_force_read_journal(struct inode *inode); static int ocfs2_recover_node(struct ocfs2_super *osb, @@ -222,7 +222,8 @@ void ocfs2_handle_add_inode(struct ocfs2_journal_handle *handle, BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list)); OCFS2_I(inode)->ip_handle = handle; - list_move_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list)); + list_del(&(OCFS2_I(inode)->ip_handle_list)); + list_add_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list)); } static void ocfs2_handle_unlock_inodes(struct ocfs2_journal_handle *handle) @@ -784,7 +785,8 @@ int ocfs2_journal_load(struct ocfs2_journal *journal) } /* Launch the commit thread */ - osb->commit_task = kthread_run(ocfs2_commit_thread, osb, "ocfs2cmt"); + osb->commit_task = kthread_run(ocfs2_commit_thread, osb, "ocfs2cmt-%d", + osb->osb_id); if (IS_ERR(osb->commit_task)) { status = PTR_ERR(osb->commit_task); osb->commit_task = NULL; @@ -1117,7 +1119,7 @@ void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) goto out; osb->recovery_thread_task = kthread_run(__ocfs2_recovery_thread, osb, - "ocfs2rec"); + "ocfs2rec-%d", osb->osb_id); if (IS_ERR(osb->recovery_thread_task)) { mlog_errno((int)PTR_ERR(osb->recovery_thread_task)); osb->recovery_thread_task = NULL; diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 1f17a4d08..0d1973ea3 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -840,12 +840,6 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, mlog(0, "Allocating %u clusters for a new window.\n", ocfs2_local_alloc_window_bits(osb)); - - /* Instruct the allocation code to try the most recently used - * cluster group. We'll re-record the group used this pass - * below. */ - ac->ac_last_group = osb->la_last_gd; - /* we used the generic suballoc reserve function, but we set * everything up nicely, so there's no reason why we can't use * the more specific cluster api to claim bits. */ @@ -858,8 +852,6 @@ static int ocfs2_local_alloc_new_window(struct ocfs2_super *osb, goto bail; } - osb->la_last_gd = ac->ac_last_group; - la->la_bm_off = cpu_to_le32(cluster_off); alloc->id1.bitmap1.i_total = cpu_to_le32(cluster_count); /* just in case... In the future when we find space ourselves, diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 83934e33e..843cf9dde 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c @@ -46,12 +46,12 @@ static struct page *ocfs2_nopage(struct vm_area_struct * area, unsigned long address, int *type) { + struct inode *inode = area->vm_file->f_dentry->d_inode; struct page *page = NOPAGE_SIGBUS; sigset_t blocked, oldset; int ret; - mlog_entry("(area=%p, address=%lu, type=%p)\n", area, address, - type); + mlog_entry("(inode %lu, address %lu)\n", inode->i_ino, address); /* The best way to deal with signals in this path is * to block them upfront, rather than allowing the diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 0462a7f4e..da1093039 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h @@ -184,6 +184,7 @@ struct ocfs2_journal; struct ocfs2_journal_handle; struct ocfs2_super { + u32 osb_id; /* id used by the proc interface */ struct task_struct *commit_task; struct super_block *sb; struct inode *root_inode; @@ -197,6 +198,7 @@ struct ocfs2_super struct ocfs2_node_map recovery_map; struct ocfs2_node_map umount_map; + u32 num_clusters; u64 root_blkno; u64 system_dir_blkno; u64 bitmap_blkno; @@ -220,11 +222,13 @@ struct ocfs2_super unsigned long s_mount_opt; u16 max_slots; + u16 num_nodes; s16 node_num; s16 slot_num; int s_sectsize_bits; int s_clustersize; int s_clustersize_bits; + struct proc_dir_entry *proc_sub_dir; /* points to /proc/fs/ocfs2/ */ atomic_t vol_state; struct mutex recovery_lock; @@ -236,7 +240,6 @@ struct ocfs2_super enum ocfs2_local_alloc_state local_alloc_state; struct buffer_head *local_alloc_bh; - u64 la_last_gd; /* Next two fields are for local node slot recovery during * mount. */ @@ -291,6 +294,7 @@ struct ocfs2_super }; #define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info) +#define OCFS2_MAX_OSB_ID 65536 static inline int ocfs2_should_order_data(struct inode *inode) { diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index aa6f5aade..871627961 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c @@ -264,7 +264,7 @@ int ocfs2_find_slot(struct ocfs2_super *osb) osb->slot_num = slot; spin_unlock(&si->si_lock); - mlog(0, "taking node slot %d\n", osb->slot_num); + mlog(ML_NOTICE, "taking node slot %d\n", osb->slot_num); status = ocfs2_update_disk_slots(osb, si); if (status < 0) diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 9d91e66f5..195523090 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c @@ -70,6 +70,12 @@ static int ocfs2_block_group_search(struct inode *inode, struct buffer_head *group_bh, u32 bits_wanted, u32 min_bits, u16 *bit_off, u16 *bits_found); +static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, + u32 bits_wanted, + u32 min_bits, + u16 *bit_off, + unsigned int *num_bits, + u64 *bg_blkno); static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, struct ocfs2_alloc_context *ac, u32 bits_wanted, @@ -79,6 +85,11 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, u64 *bg_blkno); static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, int nr); +static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb, + struct buffer_head *bg_bh, + unsigned int bits_wanted, + u16 *bit_off, + u16 *bits_found); static inline int ocfs2_block_group_set_bits(struct ocfs2_journal_handle *handle, struct inode *alloc_inode, struct ocfs2_group_desc *bg, @@ -132,64 +143,6 @@ static u32 ocfs2_bits_per_group(struct ocfs2_chain_list *cl) return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc); } -/* somewhat more expensive than our other checks, so use sparingly. */ -static int ocfs2_check_group_descriptor(struct super_block *sb, - struct ocfs2_dinode *di, - struct ocfs2_group_desc *gd) -{ - unsigned int max_bits; - - if (!OCFS2_IS_VALID_GROUP_DESC(gd)) { - OCFS2_RO_ON_INVALID_GROUP_DESC(sb, gd); - return -EIO; - } - - if (di->i_blkno != gd->bg_parent_dinode) { - ocfs2_error(sb, "Group descriptor # %llu has bad parent " - "pointer (%llu, expected %llu)", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - (unsigned long long)le64_to_cpu(gd->bg_parent_dinode), - (unsigned long long)le64_to_cpu(di->i_blkno)); - return -EIO; - } - - max_bits = le16_to_cpu(di->id2.i_chain.cl_cpg) * le16_to_cpu(di->id2.i_chain.cl_bpc); - if (le16_to_cpu(gd->bg_bits) > max_bits) { - ocfs2_error(sb, "Group descriptor # %llu has bit count of %u", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - le16_to_cpu(gd->bg_bits)); - return -EIO; - } - - if (le16_to_cpu(gd->bg_chain) >= - le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) { - ocfs2_error(sb, "Group descriptor # %llu has bad chain %u", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - le16_to_cpu(gd->bg_chain)); - return -EIO; - } - - if (le16_to_cpu(gd->bg_free_bits_count) > le16_to_cpu(gd->bg_bits)) { - ocfs2_error(sb, "Group descriptor # %llu has bit count %u but " - "claims that %u are free", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - le16_to_cpu(gd->bg_bits), - le16_to_cpu(gd->bg_free_bits_count)); - return -EIO; - } - - if (le16_to_cpu(gd->bg_bits) > (8 * le16_to_cpu(gd->bg_size))) { - ocfs2_error(sb, "Group descriptor # %llu has bit count %u but " - "max bitmap bits of %u", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - le16_to_cpu(gd->bg_bits), - 8 * le16_to_cpu(gd->bg_size)); - return -EIO; - } - - return 0; -} - static int ocfs2_block_group_fill(struct ocfs2_journal_handle *handle, struct inode *alloc_inode, struct buffer_head *bg_bh, @@ -710,7 +663,6 @@ static int ocfs2_test_bg_bit_allocatable(struct buffer_head *bg_bh, static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb, struct buffer_head *bg_bh, unsigned int bits_wanted, - unsigned int total_bits, u16 *bit_off, u16 *bits_found) { @@ -727,8 +679,10 @@ static int ocfs2_block_group_find_clear_bits(struct ocfs2_super *osb, found = start = best_offset = best_size = 0; bitmap = bg->bg_bitmap; - while((offset = ocfs2_find_next_zero_bit(bitmap, total_bits, start)) != -1) { - if (offset == total_bits) + while((offset = ocfs2_find_next_zero_bit(bitmap, + le16_to_cpu(bg->bg_bits), + start)) != -1) { + if (offset == le16_to_cpu(bg->bg_bits)) break; if (!ocfs2_test_bg_bit_allocatable(bg_bh, offset)) { @@ -957,35 +911,14 @@ static int ocfs2_cluster_group_search(struct inode *inode, { int search = -ENOSPC; int ret; - struct ocfs2_group_desc *gd = (struct ocfs2_group_desc *) group_bh->b_data; + struct ocfs2_group_desc *bg = (struct ocfs2_group_desc *) group_bh->b_data; u16 tmp_off, tmp_found; - unsigned int max_bits, gd_cluster_off; BUG_ON(!ocfs2_is_cluster_bitmap(inode)); - if (gd->bg_free_bits_count) { - max_bits = le16_to_cpu(gd->bg_bits); - - /* Tail groups in cluster bitmaps which aren't cpg - * aligned are prone to partial extention by a failed - * fs resize. If the file system resize never got to - * update the dinode cluster count, then we don't want - * to trust any clusters past it, regardless of what - * the group descriptor says. */ - gd_cluster_off = ocfs2_blocks_to_clusters(inode->i_sb, - le64_to_cpu(gd->bg_blkno)); - if ((gd_cluster_off + max_bits) > - OCFS2_I(inode)->ip_clusters) { - max_bits = OCFS2_I(inode)->ip_clusters - gd_cluster_off; - mlog(0, "Desc %llu, bg_bits %u, clusters %u, use %u\n", - (unsigned long long)le64_to_cpu(gd->bg_blkno), - le16_to_cpu(gd->bg_bits), - OCFS2_I(inode)->ip_clusters, max_bits); - } - + if (bg->bg_free_bits_count) { ret = ocfs2_block_group_find_clear_bits(OCFS2_SB(inode->i_sb), group_bh, bits_wanted, - max_bits, &tmp_off, &tmp_found); if (ret) return ret; @@ -1018,109 +951,17 @@ static int ocfs2_block_group_search(struct inode *inode, if (bg->bg_free_bits_count) ret = ocfs2_block_group_find_clear_bits(OCFS2_SB(inode->i_sb), group_bh, bits_wanted, - le16_to_cpu(bg->bg_bits), bit_off, bits_found); return ret; } -static int ocfs2_alloc_dinode_update_counts(struct inode *inode, - struct ocfs2_journal_handle *handle, - struct buffer_head *di_bh, - u32 num_bits, - u16 chain) -{ - int ret; - u32 tmp_used; - struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; - struct ocfs2_chain_list *cl = (struct ocfs2_chain_list *) &di->id2.i_chain; - - ret = ocfs2_journal_access(handle, inode, di_bh, - OCFS2_JOURNAL_ACCESS_WRITE); - if (ret < 0) { - mlog_errno(ret); - goto out; - } - - tmp_used = le32_to_cpu(di->id1.bitmap1.i_used); - di->id1.bitmap1.i_used = cpu_to_le32(num_bits + tmp_used); - le32_add_cpu(&cl->cl_recs[chain].c_free, -num_bits); - - ret = ocfs2_journal_dirty(handle, di_bh); - if (ret < 0) - mlog_errno(ret); - -out: - return ret; -} - -static int ocfs2_search_one_group(struct ocfs2_alloc_context *ac, - u32 bits_wanted, - u32 min_bits, - u16 *bit_off, - unsigned int *num_bits, - u64 gd_blkno, - u16 *bits_left) -{ - int ret; - u16 found; - struct buffer_head *group_bh = NULL; - struct ocfs2_group_desc *gd; - struct inode *alloc_inode = ac->ac_inode; - struct ocfs2_journal_handle *handle = ac->ac_handle; - - ret = ocfs2_read_block(OCFS2_SB(alloc_inode->i_sb), gd_blkno, - &group_bh, OCFS2_BH_CACHED, alloc_inode); - if (ret < 0) { - mlog_errno(ret); - return ret; - } - - gd = (struct ocfs2_group_desc *) group_bh->b_data; - if (!OCFS2_IS_VALID_GROUP_DESC(gd)) { - OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, gd); - ret = -EIO; - goto out; - } - - ret = ac->ac_group_search(alloc_inode, group_bh, bits_wanted, min_bits, - bit_off, &found); - if (ret < 0) { - if (ret != -ENOSPC) - mlog_errno(ret); - goto out; - } - - *num_bits = found; - - ret = ocfs2_alloc_dinode_update_counts(alloc_inode, handle, ac->ac_bh, - *num_bits, - le16_to_cpu(gd->bg_chain)); - if (ret < 0) { - mlog_errno(ret); - goto out; - } - - ret = ocfs2_block_group_set_bits(handle, alloc_inode, gd, group_bh, - *bit_off, *num_bits); - if (ret < 0) - mlog_errno(ret); - - *bits_left = le16_to_cpu(gd->bg_free_bits_count); - -out: - brelse(group_bh); - - return ret; -} - static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, u32 bits_wanted, u32 min_bits, u16 *bit_off, unsigned int *num_bits, - u64 *bg_blkno, - u16 *bits_left) + u64 *bg_blkno) { int status; u16 chain, tmp_bits; @@ -1147,9 +988,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, goto bail; } bg = (struct ocfs2_group_desc *) group_bh->b_data; - status = ocfs2_check_group_descriptor(alloc_inode->i_sb, fe, bg); - if (status) { - mlog_errno(status); + if (!OCFS2_IS_VALID_GROUP_DESC(bg)) { + OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, bg); + status = -EIO; goto bail; } @@ -1177,9 +1018,9 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, goto bail; } bg = (struct ocfs2_group_desc *) group_bh->b_data; - status = ocfs2_check_group_descriptor(alloc_inode->i_sb, fe, bg); - if (status) { - mlog_errno(status); + if (!OCFS2_IS_VALID_GROUP_DESC(bg)) { + OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, bg); + status = -EIO; goto bail; } } @@ -1258,7 +1099,6 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac, (unsigned long long)fe->i_blkno); *bg_blkno = le64_to_cpu(bg->bg_blkno); - *bits_left = le16_to_cpu(bg->bg_free_bits_count); bail: if (group_bh) brelse(group_bh); @@ -1280,8 +1120,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, { int status; u16 victim, i; - u16 bits_left = 0; - u64 hint_blkno = ac->ac_last_group; struct ocfs2_chain_list *cl; struct ocfs2_dinode *fe; @@ -1308,28 +1146,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, goto bail; } - if (hint_blkno) { - /* Attempt to short-circuit the usual search mechanism - * by jumping straight to the most recently used - * allocation group. This helps us mantain some - * contiguousness across allocations. */ - status = ocfs2_search_one_group(ac, bits_wanted, min_bits, - bit_off, num_bits, - hint_blkno, &bits_left); - if (!status) { - /* Be careful to update *bg_blkno here as the - * caller is expecting it to be filled in, and - * ocfs2_search_one_group() won't do that for - * us. */ - *bg_blkno = hint_blkno; - goto set_hint; - } - if (status < 0 && status != -ENOSPC) { - mlog_errno(status); - goto bail; - } - } - cl = (struct ocfs2_chain_list *) &fe->id2.i_chain; victim = ocfs2_find_victim_chain(cl); @@ -1337,9 +1153,9 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, ac->ac_allow_chain_relink = 1; status = ocfs2_search_chain(ac, bits_wanted, min_bits, bit_off, - num_bits, bg_blkno, &bits_left); + num_bits, bg_blkno); if (!status) - goto set_hint; + goto bail; if (status < 0 && status != -ENOSPC) { mlog_errno(status); goto bail; @@ -1361,8 +1177,8 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, ac->ac_chain = i; status = ocfs2_search_chain(ac, bits_wanted, min_bits, - bit_off, num_bits, bg_blkno, - &bits_left); + bit_off, num_bits, + bg_blkno); if (!status) break; if (status < 0 && status != -ENOSPC) { @@ -1370,19 +1186,8 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_super *osb, goto bail; } } - -set_hint: - if (status != -ENOSPC) { - /* If the next search of this group is not likely to - * yield a suitable extent, then we reset the last - * group hint so as to not waste a disk read */ - if (bits_left < min_bits) - ac->ac_last_group = 0; - else - ac->ac_last_group = *bg_blkno; - } - bail: + mlog_exit(status); return status; } @@ -1536,7 +1341,7 @@ int ocfs2_claim_clusters(struct ocfs2_super *osb, { int status; unsigned int bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given; - u64 bg_blkno = 0; + u64 bg_blkno; u16 bg_bit_off; mlog_entry_void(); @@ -1689,9 +1494,9 @@ static int ocfs2_free_suballoc_bits(struct ocfs2_journal_handle *handle, } group = (struct ocfs2_group_desc *) group_bh->b_data; - status = ocfs2_check_group_descriptor(alloc_inode->i_sb, fe, group); - if (status) { - mlog_errno(status); + if (!OCFS2_IS_VALID_GROUP_DESC(group)) { + OCFS2_RO_ON_INVALID_GROUP_DESC(alloc_inode->i_sb, group); + status = -EIO; goto bail; } BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits)); diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index c787838d1..a76c82a7c 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h @@ -49,8 +49,6 @@ struct ocfs2_alloc_context { u16 ac_chain; int ac_allow_chain_relink; group_search_t *ac_group_search; - - u64 ac_last_group; }; void ocfs2_free_alloc_context(struct ocfs2_alloc_context *ac); diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index d17e33e66..949b3dac3 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -68,6 +68,13 @@ #include "buffer_head_io.h" +/* + * Globals + */ +static spinlock_t ocfs2_globals_lock = SPIN_LOCK_UNLOCKED; + +static u32 osb_id; /* Keeps track of next available OSB Id */ + static kmem_cache_t *ocfs2_inode_cachep = NULL; kmem_cache_t *ocfs2_lock_cache = NULL; @@ -93,7 +100,7 @@ static int ocfs2_initialize_mem_caches(void); static void ocfs2_free_mem_caches(void); static void ocfs2_delete_osb(struct ocfs2_super *osb); -static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf); +static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf); static int ocfs2_sync_fs(struct super_block *sb, int wait); @@ -635,9 +642,10 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) ocfs2_complete_mount_recovery(osb); - printk(KERN_INFO "ocfs2: Mounting device (%s) on (node %d, slot %d) " - "with %s data mode.\n", - osb->dev_str, osb->node_num, osb->slot_num, + printk("ocfs2: Mounting device (%u,%u) on (node %d, slot %d) with %s " + "data mode.\n", + MAJOR(sb->s_dev), MINOR(sb->s_dev), osb->node_num, + osb->slot_num, osb->s_mount_opt & OCFS2_MOUNT_DATA_WRITEBACK ? "writeback" : "ordered"); @@ -664,14 +672,12 @@ read_super_error: return status; } -static int ocfs2_get_sb(struct file_system_type *fs_type, - int flags, - const char *dev_name, - void *data, - struct vfsmount *mnt) +static struct super_block *ocfs2_get_sb(struct file_system_type *fs_type, + int flags, + const char *dev_name, + void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super); } static struct file_system_type ocfs2_fs_type = { @@ -792,6 +798,10 @@ static int __init ocfs2_init(void) goto leave; } + spin_lock(&ocfs2_globals_lock); + osb_id = 0; + spin_unlock(&ocfs2_globals_lock); + ocfs2_debugfs_root = debugfs_create_dir("ocfs2", NULL); if (!ocfs2_debugfs_root) { status = -EFAULT; @@ -845,7 +855,7 @@ static void ocfs2_put_super(struct super_block *sb) mlog_exit_void(); } -static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) +static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf) { struct ocfs2_super *osb; u32 numbits, freebits; @@ -854,9 +864,9 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) struct buffer_head *bh = NULL; struct inode *inode = NULL; - mlog_entry("(%p, %p)\n", dentry->d_sb, buf); + mlog_entry("(%p, %p)\n", sb, buf); - osb = OCFS2_SB(dentry->d_sb); + osb = OCFS2_SB(sb); inode = ocfs2_get_system_file_inode(osb, GLOBAL_BITMAP_SYSTEM_INODE, @@ -879,7 +889,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used); buf->f_type = OCFS2_SUPER_MAGIC; - buf->f_bsize = dentry->d_sb->s_blocksize; + buf->f_bsize = sb->s_blocksize; buf->f_namelen = OCFS2_MAX_FILENAME_LEN; buf->f_blocks = ((sector_t) numbits) * (osb->s_clustersize >> osb->sb->s_blocksize_bits); @@ -1008,7 +1018,7 @@ static int ocfs2_fill_local_node_info(struct ocfs2_super *osb) goto bail; } - mlog(0, "I am node %d\n", osb->node_num); + mlog(ML_NOTICE, "I am node %d\n", osb->node_num); status = 0; bail: @@ -1179,8 +1189,8 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) atomic_set(&osb->vol_state, VOLUME_DISMOUNTED); - printk(KERN_INFO "ocfs2: Unmounting device (%s) on (node %d)\n", - osb->dev_str, osb->node_num); + printk("ocfs2: Unmounting device (%u,%u) on (node %d)\n", + MAJOR(osb->sb->s_dev), MINOR(osb->sb->s_dev), osb->node_num); ocfs2_delete_osb(osb); kfree(osb); @@ -1200,6 +1210,8 @@ static int ocfs2_setup_osb_uuid(struct ocfs2_super *osb, const unsigned char *uu if (osb->uuid_str == NULL) return -ENOMEM; + memcpy(osb->uuid, uuid, OCFS2_VOL_UUID_LEN); + for (i = 0, ptr = osb->uuid_str; i < OCFS2_VOL_UUID_LEN; i++) { /* print with null */ ret = snprintf(ptr, 3, "%02X", uuid[i]); @@ -1297,6 +1309,13 @@ static int ocfs2_initialize_super(struct super_block *sb, goto bail; } + osb->uuid = kmalloc(OCFS2_VOL_UUID_LEN, GFP_KERNEL); + if (!osb->uuid) { + mlog(ML_ERROR, "unable to alloc uuid\n"); + status = -ENOMEM; + goto bail; + } + di = (struct ocfs2_dinode *)bh->b_data; osb->max_slots = le16_to_cpu(di->id2.i_super.s_max_slots); @@ -1306,7 +1325,7 @@ static int ocfs2_initialize_super(struct super_block *sb, status = -EINVAL; goto bail; } - mlog(0, "max_slots for this device: %u\n", osb->max_slots); + mlog(ML_NOTICE, "max_slots for this device: %u\n", osb->max_slots); init_waitqueue_head(&osb->osb_wipe_event); osb->osb_orphan_wipes = kcalloc(osb->max_slots, @@ -1397,7 +1416,7 @@ static int ocfs2_initialize_super(struct super_block *sb, goto bail; } - memcpy(&uuid_net_key, di->id2.i_super.s_uuid, sizeof(uuid_net_key)); + memcpy(&uuid_net_key, &osb->uuid[i], sizeof(osb->net_key)); osb->net_key = le32_to_cpu(uuid_net_key); strncpy(osb->vol_label, di->id2.i_super.s_label, 63); @@ -1442,13 +1461,8 @@ static int ocfs2_initialize_super(struct super_block *sb, osb->bitmap_blkno = OCFS2_I(inode)->ip_blkno; - /* We don't have a cluster lock on the bitmap here because - * we're only interested in static information and the extra - * complexity at mount time isn't worht it. Don't pass the - * inode in to the read function though as we don't want it to - * be put in the cache. */ status = ocfs2_read_block(osb, osb->bitmap_blkno, &bitmap_bh, 0, - NULL); + inode); iput(inode); if (status < 0) { mlog_errno(status); @@ -1457,6 +1471,7 @@ static int ocfs2_initialize_super(struct super_block *sb, di = (struct ocfs2_dinode *) bitmap_bh->b_data; osb->bitmap_cpg = le16_to_cpu(di->id2.i_chain.cl_cpg); + osb->num_clusters = le32_to_cpu(di->id1.bitmap1.i_total); brelse(bitmap_bh); mlog(0, "cluster bitmap inode: %llu, clusters per group: %u\n", (unsigned long long)osb->bitmap_blkno, osb->bitmap_cpg); @@ -1467,6 +1482,18 @@ static int ocfs2_initialize_super(struct super_block *sb, goto bail; } + /* Link this osb onto the global linked list of all osb structures. */ + /* The Global Link List is mainted for the whole driver . */ + spin_lock(&ocfs2_globals_lock); + osb->osb_id = osb_id; + if (osb_id < OCFS2_MAX_OSB_ID) + osb_id++; + else { + mlog(ML_ERROR, "Too many volumes mounted\n"); + status = -ENOMEM; + } + spin_unlock(&ocfs2_globals_lock); + bail: mlog_exit(status); return status; diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c index c0f68aa6c..f6986bd79 100644 --- a/fs/ocfs2/symlink.c +++ b/fs/ocfs2/symlink.c @@ -64,7 +64,8 @@ static char *ocfs2_page_getlink(struct dentry * dentry, { struct page * page; struct address_space *mapping = dentry->d_inode->i_mapping; - page = read_mapping_page(mapping, 0, NULL); + page = read_cache_page(mapping, 0, + (filler_t *)mapping->a_ops->readpage, NULL); if (IS_ERR(page)) goto sync_fail; wait_on_page_locked(page); @@ -154,7 +155,7 @@ static void *ocfs2_follow_link(struct dentry *dentry, } status = vfs_follow_link(nd, link); - if (status && status != -ENOENT) + if (status) mlog_errno(status); bail: if (page) { diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c index cf70fe207..ee42765a8 100644 --- a/fs/ocfs2/vote.c +++ b/fs/ocfs2/vote.c @@ -988,7 +988,9 @@ int ocfs2_request_mount_vote(struct ocfs2_super *osb) } bail: - kfree(request); + if (request) + kfree(request); + return status; } @@ -1019,7 +1021,9 @@ int ocfs2_request_umount_vote(struct ocfs2_super *osb) } bail: - kfree(request); + if (request) + kfree(request); + return status; } diff --git a/fs/open.c b/fs/open.c index fcff05571..bd7c18a4a 100644 --- a/fs/open.c +++ b/fs/open.c @@ -35,20 +35,18 @@ #include -int vfs_statfs(struct dentry *dentry, struct kstatfs *buf) +int vfs_statfs(struct super_block *sb, struct kstatfs *buf) { int retval = -ENODEV; - if (dentry) { - struct super_block *sb = dentry->d_sb; - + if (sb) { retval = -ENOSYS; if (sb->s_op->statfs) { memset(buf, 0, sizeof(*buf)); - retval = security_sb_statfs(dentry); + retval = security_sb_statfs(sb); if (retval) return retval; - retval = sb->s_op->statfs(dentry, buf); + retval = sb->s_op->statfs(sb, buf); if (retval == 0 && buf->f_frsize == 0) buf->f_frsize = buf->f_bsize; } @@ -60,12 +58,12 @@ int vfs_statfs(struct dentry *dentry, struct kstatfs *buf) EXPORT_SYMBOL(vfs_statfs); -static int vfs_statfs_native(struct dentry *dentry, struct statfs *buf) +static int vfs_statfs_native(struct super_block *sb, struct statfs *buf) { struct kstatfs st; int retval; - retval = vfs_statfs(dentry, &st); + retval = vfs_statfs(sb, &st); if (retval) return retval; @@ -103,12 +101,12 @@ static int vfs_statfs_native(struct dentry *dentry, struct statfs *buf) return 0; } -static int vfs_statfs64(struct dentry *dentry, struct statfs64 *buf) +static int vfs_statfs64(struct super_block *sb, struct statfs64 *buf) { struct kstatfs st; int retval; - retval = vfs_statfs(dentry, &st); + retval = vfs_statfs(sb, &st); if (retval) return retval; @@ -138,7 +136,7 @@ asmlinkage long sys_statfs(const char __user * path, struct statfs __user * buf) error = user_path_walk(path, &nd); if (!error) { struct statfs tmp; - error = vfs_statfs_native(nd.dentry, &tmp); + error = vfs_statfs_native(nd.dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; path_release(&nd); @@ -157,7 +155,7 @@ asmlinkage long sys_statfs64(const char __user *path, size_t sz, struct statfs64 error = user_path_walk(path, &nd); if (!error) { struct statfs64 tmp; - error = vfs_statfs64(nd.dentry, &tmp); + error = vfs_statfs64(nd.dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; path_release(&nd); @@ -176,7 +174,7 @@ asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf) file = fget(fd); if (!file) goto out; - error = vfs_statfs_native(file->f_dentry, &tmp); + error = vfs_statfs_native(file->f_dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; fput(file); @@ -197,7 +195,7 @@ asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user file = fget(fd); if (!file) goto out; - error = vfs_statfs64(file->f_dentry, &tmp); + error = vfs_statfs64(file->f_dentry->d_inode->i_sb, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; fput(file); @@ -330,7 +328,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) error = locks_verify_truncate(inode, file, length); if (!error) - error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file); + error = do_truncate(dentry, length, 0, file); out_putf: fput(file); out: @@ -646,7 +644,7 @@ asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) dentry = file->f_dentry; inode = dentry->d_inode; - audit_inode(NULL, inode); + audit_inode(NULL, inode, 0); err = -EROFS; if (IS_RDONLY(inode) || MNT_IS_RDONLY(file->f_vfsmnt)) @@ -800,7 +798,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group) if (file) { struct dentry * dentry; dentry = file->f_dentry; - audit_inode(NULL, dentry->d_inode); + audit_inode(NULL, dentry->d_inode, 0); error = chown_common(dentry, file->f_vfsmnt, user, group); fput(file); } @@ -1167,7 +1165,7 @@ int filp_close(struct file *filp, fl_owner_t id) } if (filp->f_op && filp->f_op->flush) - retval = filp->f_op->flush(filp, id); + retval = filp->f_op->flush(filp); dnotify_flush(filp, id); locks_remove_posix(filp, id); @@ -1215,7 +1213,6 @@ EXPORT_SYMBOL(sys_close); asmlinkage long sys_vhangup(void) { if (capable(CAP_SYS_TTY_CONFIG)) { - /* XXX: this needs locking */ tty_vhangup(current->signal->tty); return 0; } diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c index 93a56bd4a..0f14276a2 100644 --- a/fs/openpromfs/inode.c +++ b/fs/openpromfs/inode.c @@ -1,4 +1,5 @@ -/* inode.c: /proc/openprom handling routines +/* $Id: inode.c,v 1.15 2001/11/12 09:43:39 davem Exp $ + * openpromfs.c: /proc/openprom handling routines * * Copyright (C) 1996-1999 Jakub Jelinek (jakub@redhat.com) * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) @@ -11,245 +12,756 @@ #include #include #include -#include +#include #include #include -#include #include -static DEFINE_MUTEX(op_mutex); - -#define OPENPROM_ROOT_INO 0 - -enum op_inode_type { - op_inode_node, - op_inode_prop, -}; - -union op_inode_data { - struct device_node *node; - struct property *prop; -}; - -struct op_inode_info { - struct inode vfs_inode; - enum op_inode_type type; - union op_inode_data u; -}; +#define ALIASES_NNODES 64 + +typedef struct { + u16 parent; + u16 next; + u16 child; + u16 first_prop; + u32 node; +} openpromfs_node; + +typedef struct { +#define OPP_STRING 0x10 +#define OPP_STRINGLIST 0x20 +#define OPP_BINARY 0x40 +#define OPP_HEXSTRING 0x80 +#define OPP_DIRTY 0x01 +#define OPP_QUOTED 0x02 +#define OPP_NOTQUOTED 0x04 +#define OPP_ASCIIZ 0x08 + u32 flag; + u32 alloclen; + u32 len; + char *value; + char name[8]; +} openprom_property; + +static openpromfs_node *nodes; +static int alloced; +static u16 last_node; +static u16 first_prop; +static u16 options = 0xffff; +static u16 aliases = 0xffff; +static int aliases_nodes; +static char *alias_names [ALIASES_NNODES]; + +#define OPENPROM_ROOT_INO 16 +#define OPENPROM_FIRST_INO OPENPROM_ROOT_INO +#define NODE(ino) nodes[ino - OPENPROM_FIRST_INO] +#define NODE2INO(node) (node + OPENPROM_FIRST_INO) +#define NODEP2INO(no) (no + OPENPROM_FIRST_INO + last_node) + +static int openpromfs_create (struct inode *, struct dentry *, int, struct nameidata *); +static int openpromfs_readdir(struct file *, void *, filldir_t); +static struct dentry *openpromfs_lookup(struct inode *, struct dentry *dentry, struct nameidata *nd); +static int openpromfs_unlink (struct inode *, struct dentry *dentry); -static inline struct op_inode_info *OP_I(struct inode *inode) +static ssize_t nodenum_read(struct file *file, char __user *buf, + size_t count, loff_t *ppos) { - return container_of(inode, struct op_inode_info, vfs_inode); + struct inode *inode = file->f_dentry->d_inode; + char buffer[10]; + + if (count < 0 || !inode->u.generic_ip) + return -EINVAL; + sprintf (buffer, "%8.8x\n", (u32)(long)(inode->u.generic_ip)); + if (file->f_pos >= 9) + return 0; + if (count > 9 - file->f_pos) + count = 9 - file->f_pos; + if (copy_to_user(buf, buffer + file->f_pos, count)) + return -EFAULT; + *ppos += count; + return count; } -static int is_string(unsigned char *p, int len) +static ssize_t property_read(struct file *filp, char __user *buf, + size_t count, loff_t *ppos) { - int i; - - for (i = 0; i < len; i++) { - unsigned char val = p[i]; - - if ((i && !val) || - (val >= ' ' && val <= '~')) - continue; - + struct inode *inode = filp->f_dentry->d_inode; + int i, j, k; + u32 node; + char *p, *s; + u32 *q; + openprom_property *op; + char buffer[64]; + + if (!filp->private_data) { + node = nodes[(u16)((long)inode->u.generic_ip)].node; + i = ((u32)(long)inode->u.generic_ip) >> 16; + if ((u16)((long)inode->u.generic_ip) == aliases) { + if (i >= aliases_nodes) + p = NULL; + else + p = alias_names [i]; + } else + for (p = prom_firstprop (node, buffer); + i && p && *p; + p = prom_nextprop (node, p, buffer), i--) + /* nothing */ ; + if (!p || !*p) + return -EIO; + i = prom_getproplen (node, p); + if (i < 0) { + if ((u16)((long)inode->u.generic_ip) == aliases) + i = 0; + else + return -EIO; + } + k = i; + if (i < 64) i = 64; + filp->private_data = kmalloc (sizeof (openprom_property) + + (j = strlen (p)) + 2 * i, + GFP_KERNEL); + if (!filp->private_data) + return -ENOMEM; + op = (openprom_property *)filp->private_data; + op->flag = 0; + op->alloclen = 2 * i; + strcpy (op->name, p); + op->value = (char *)(((unsigned long)(op->name + j + 4)) & ~3); + op->len = k; + if (k && prom_getproperty (node, p, op->value, i) < 0) + return -EIO; + op->value [k] = 0; + if (k) { + for (s = NULL, p = op->value; p < op->value + k; p++) { + if ((*p >= ' ' && *p <= '~') || *p == '\n') { + op->flag |= OPP_STRING; + s = p; + continue; + } + if (p > op->value && !*p && s == p - 1) { + if (p < op->value + k - 1) + op->flag |= OPP_STRINGLIST; + else + op->flag |= OPP_ASCIIZ; + continue; + } + if (k == 1 && !*p) { + op->flag |= (OPP_STRING|OPP_ASCIIZ); + break; + } + op->flag &= ~(OPP_STRING|OPP_STRINGLIST); + if (k & 3) + op->flag |= OPP_HEXSTRING; + else + op->flag |= OPP_BINARY; + break; + } + if (op->flag & OPP_STRINGLIST) + op->flag &= ~(OPP_STRING); + if (op->flag & OPP_ASCIIZ) + op->len--; + } + } else + op = (openprom_property *)filp->private_data; + if (!count || !(op->len || (op->flag & OPP_ASCIIZ))) return 0; + if (*ppos >= 0xffffff || count >= 0xffffff) + return -EINVAL; + if (op->flag & OPP_STRINGLIST) { + for (k = 0, p = op->value; p < op->value + op->len; p++) + if (!*p) + k++; + i = op->len + 4 * k + 3; + } else if (op->flag & OPP_STRING) { + i = op->len + 3; + } else if (op->flag & OPP_BINARY) { + i = (op->len * 9) >> 2; + } else { + i = (op->len << 1) + 1; } + k = *ppos; + if (k >= i) return 0; + if (count > i - k) count = i - k; + if (op->flag & OPP_STRING) { + if (!k) { + if (put_user('\'', buf)) + return -EFAULT; + k++; + count--; + } - return 1; -} - -static int property_show(struct seq_file *f, void *v) -{ - struct property *prop = f->private; - void *pval; - int len; + if (k + count >= i - 2) + j = i - 2 - k; + else + j = count; + + if (j >= 0) { + if (copy_to_user(buf + k - *ppos, + op->value + k - 1, j)) + return -EFAULT; + count -= j; + k += j; + } - len = prop->length; - pval = prop->value; + if (count) { + if (put_user('\'', &buf [k++ - *ppos])) + return -EFAULT; + } + if (count > 1) { + if (put_user('\n', &buf [k++ - *ppos])) + return -EFAULT; + } + } else if (op->flag & OPP_STRINGLIST) { + char *tmp; + + tmp = kmalloc (i, GFP_KERNEL); + if (!tmp) + return -ENOMEM; + + s = tmp; + *s++ = '\''; + for (p = op->value; p < op->value + op->len; p++) { + if (!*p) { + strcpy(s, "' + '"); + s += 5; + continue; + } + *s++ = *p; + } + strcpy(s, "'\n"); + + if (copy_to_user(buf, tmp + k, count)) + return -EFAULT; + + kfree(tmp); + k += count; + + } else if (op->flag & OPP_BINARY) { + char buffer[10]; + u32 *first, *last; + int first_off, last_cnt; + + first = ((u32 *)op->value) + k / 9; + first_off = k % 9; + last = ((u32 *)op->value) + (k + count - 1) / 9; + last_cnt = (k + count) % 9; + if (!last_cnt) last_cnt = 9; + + if (first == last) { + sprintf (buffer, "%08x.", *first); + if (copy_to_user(buf, buffer + first_off, + last_cnt - first_off)) + return -EFAULT; + buf += last_cnt - first_off; + } else { + for (q = first; q <= last; q++) { + sprintf (buffer, "%08x.", *q); + if (q == first) { + if (copy_to_user(buf, buffer + first_off, + 9 - first_off)) + return -EFAULT; + buf += 9 - first_off; + } else if (q == last) { + if (copy_to_user(buf, buffer, last_cnt)) + return -EFAULT; + buf += last_cnt; + } else { + if (copy_to_user(buf, buffer, 9)) + return -EFAULT; + buf += 9; + } + } + } - if (is_string(pval, len)) { - while (len > 0) { - int n = strlen(pval); + if (last == (u32 *)(op->value + op->len - 4) && last_cnt == 9) { + if (put_user('\n', (buf - 1))) + return -EFAULT; + } - seq_printf(f, "%s", (char *) pval); + k += count; - /* Skip over the NULL byte too. */ - pval += n + 1; - len -= n + 1; + } else if (op->flag & OPP_HEXSTRING) { + char buffer[3]; - if (len > 0) - seq_printf(f, " + "); + if ((k < i - 1) && (k & 1)) { + sprintf (buffer, "%02x", + (unsigned char) *(op->value + (k >> 1)) & 0xff); + if (put_user(buffer[1], &buf[k++ - *ppos])) + return -EFAULT; + count--; } - } else { - if (len & 3) { - while (len) { - len--; - if (len) - seq_printf(f, "%02x.", - *(unsigned char *) pval); - else - seq_printf(f, "%02x", - *(unsigned char *) pval); - pval++; - } - } else { - while (len >= 4) { - len -= 4; - if (len) - seq_printf(f, "%08x.", - *(unsigned int *) pval); - else - seq_printf(f, "%08x", - *(unsigned int *) pval); - pval += 4; - } + for (; (count > 1) && (k < i - 1); k += 2) { + sprintf (buffer, "%02x", + (unsigned char) *(op->value + (k >> 1)) & 0xff); + if (copy_to_user(buf + k - *ppos, buffer, 2)) + return -EFAULT; + count -= 2; } - } - seq_printf(f, "\n"); - - return 0; -} -static void *property_start(struct seq_file *f, loff_t *pos) -{ - if (*pos == 0) - return pos; - return NULL; -} + if (count && (k < i - 1)) { + sprintf (buffer, "%02x", + (unsigned char) *(op->value + (k >> 1)) & 0xff); + if (put_user(buffer[0], &buf[k++ - *ppos])) + return -EFAULT; + count--; + } -static void *property_next(struct seq_file *f, void *v, loff_t *pos) -{ - (*pos)++; - return NULL; + if (count) { + if (put_user('\n', &buf [k++ - *ppos])) + return -EFAULT; + } + } + count = k - *ppos; + *ppos = k; + return count; } -static void property_stop(struct seq_file *f, void *v) +static ssize_t property_write(struct file *filp, const char __user *buf, + size_t count, loff_t *ppos) { - /* Nothing to do */ + int i, j, k; + char *p; + u32 *q; + void *b; + openprom_property *op; + + if (*ppos >= 0xffffff || count >= 0xffffff) + return -EINVAL; + if (!filp->private_data) { + i = property_read (filp, NULL, 0, NULL); + if (i) + return i; + } + k = *ppos; + op = (openprom_property *)filp->private_data; + if (!(op->flag & OPP_STRING)) { + u32 *first, *last; + int first_off, last_cnt; + u32 mask, mask2; + char tmp [9]; + int forcelen = 0; + + j = k % 9; + for (i = 0; i < count; i++, j++) { + if (j == 9) j = 0; + if (!j) { + char ctmp; + if (get_user(ctmp, &buf[i])) + return -EFAULT; + if (ctmp != '.') { + if (ctmp != '\n') { + if (op->flag & OPP_BINARY) + return -EINVAL; + else + goto write_try_string; + } else { + count = i + 1; + forcelen = 1; + break; + } + } + } else { + char ctmp; + if (get_user(ctmp, &buf[i])) + return -EFAULT; + if (ctmp < '0' || + (ctmp > '9' && ctmp < 'A') || + (ctmp > 'F' && ctmp < 'a') || + ctmp > 'f') { + if (op->flag & OPP_BINARY) + return -EINVAL; + else + goto write_try_string; + } + } + } + op->flag |= OPP_BINARY; + tmp [8] = 0; + i = ((count + k + 8) / 9) << 2; + if (op->alloclen <= i) { + b = kmalloc (sizeof (openprom_property) + 2 * i, + GFP_KERNEL); + if (!b) + return -ENOMEM; + memcpy (b, filp->private_data, + sizeof (openprom_property) + + strlen (op->name) + op->alloclen); + memset (((char *)b) + sizeof (openprom_property) + + strlen (op->name) + op->alloclen, + 0, 2 * i - op->alloclen); + op = (openprom_property *)b; + op->alloclen = 2*i; + b = filp->private_data; + filp->private_data = (void *)op; + kfree (b); + } + first = ((u32 *)op->value) + (k / 9); + first_off = k % 9; + last = (u32 *)(op->value + i); + last_cnt = (k + count) % 9; + if (first + 1 == last) { + memset (tmp, '0', 8); + if (copy_from_user(tmp + first_off, buf, + (count + first_off > 8) ? + 8 - first_off : count)) + return -EFAULT; + mask = 0xffffffff; + mask2 = 0xffffffff; + for (j = 0; j < first_off; j++) + mask >>= 1; + for (j = 8 - count - first_off; j > 0; j--) + mask2 <<= 1; + mask &= mask2; + if (mask) { + *first &= ~mask; + *first |= simple_strtoul (tmp, NULL, 16); + op->flag |= OPP_DIRTY; + } + } else { + op->flag |= OPP_DIRTY; + for (q = first; q < last; q++) { + if (q == first) { + if (first_off < 8) { + memset (tmp, '0', 8); + if (copy_from_user(tmp + first_off, + buf, + 8 - first_off)) + return -EFAULT; + mask = 0xffffffff; + for (j = 0; j < first_off; j++) + mask >>= 1; + *q &= ~mask; + *q |= simple_strtoul (tmp,NULL,16); + } + buf += 9; + } else if ((q == last - 1) && last_cnt + && (last_cnt < 8)) { + memset (tmp, '0', 8); + if (copy_from_user(tmp, buf, last_cnt)) + return -EFAULT; + mask = 0xffffffff; + for (j = 0; j < 8 - last_cnt; j++) + mask <<= 1; + *q &= ~mask; + *q |= simple_strtoul (tmp, NULL, 16); + buf += last_cnt; + } else { + char tchars[17]; /* XXX yuck... */ + + if (copy_from_user(tchars, buf, 16)) + return -EFAULT; + *q = simple_strtoul (tchars, NULL, 16); + buf += 9; + } + } + } + if (!forcelen) { + if (op->len < i) + op->len = i; + } else + op->len = i; + *ppos += count; + } +write_try_string: + if (!(op->flag & OPP_BINARY)) { + if (!(op->flag & (OPP_QUOTED | OPP_NOTQUOTED))) { + char ctmp; + + /* No way, if somebody starts writing from the middle, + * we don't know whether he uses quotes around or not + */ + if (k > 0) + return -EINVAL; + if (get_user(ctmp, buf)) + return -EFAULT; + if (ctmp == '\'') { + op->flag |= OPP_QUOTED; + buf++; + count--; + (*ppos)++; + if (!count) { + op->flag |= OPP_STRING; + return 1; + } + } else + op->flag |= OPP_NOTQUOTED; + } + op->flag |= OPP_STRING; + if (op->alloclen <= count + *ppos) { + b = kmalloc (sizeof (openprom_property) + + 2 * (count + *ppos), GFP_KERNEL); + if (!b) + return -ENOMEM; + memcpy (b, filp->private_data, + sizeof (openprom_property) + + strlen (op->name) + op->alloclen); + memset (((char *)b) + sizeof (openprom_property) + + strlen (op->name) + op->alloclen, + 0, 2*(count - *ppos) - op->alloclen); + op = (openprom_property *)b; + op->alloclen = 2*(count + *ppos); + b = filp->private_data; + filp->private_data = (void *)op; + kfree (b); + } + p = op->value + *ppos - ((op->flag & OPP_QUOTED) ? 1 : 0); + if (copy_from_user(p, buf, count)) + return -EFAULT; + op->flag |= OPP_DIRTY; + for (i = 0; i < count; i++, p++) + if (*p == '\n') { + *p = 0; + break; + } + if (i < count) { + op->len = p - op->value; + *ppos += i + 1; + if ((p > op->value) && (op->flag & OPP_QUOTED) + && (*(p - 1) == '\'')) + op->len--; + } else { + if (p - op->value > op->len) + op->len = p - op->value; + *ppos += count; + } + } + return *ppos - k; } -static struct seq_operations property_op = { - .start = property_start, - .next = property_next, - .stop = property_stop, - .show = property_show -}; - -static int property_open(struct inode *inode, struct file *file) +int property_release (struct inode *inode, struct file *filp) { - struct op_inode_info *oi = OP_I(inode); - int ret; - - BUG_ON(oi->type != op_inode_prop); - - ret = seq_open(file, &property_op); - if (!ret) { - struct seq_file *m = file->private_data; - m->private = oi->u.prop; + openprom_property *op = (openprom_property *)filp->private_data; + int error; + u32 node; + + if (!op) + return 0; + lock_kernel(); + node = nodes[(u16)((long)inode->u.generic_ip)].node; + if ((u16)((long)inode->u.generic_ip) == aliases) { + if ((op->flag & OPP_DIRTY) && (op->flag & OPP_STRING)) { + char *p = op->name; + int i = (op->value - op->name) - strlen (op->name) - 1; + op->value [op->len] = 0; + *(op->value - 1) = ' '; + if (i) { + for (p = op->value - i - 2; p >= op->name; p--) + p[i] = *p; + p = op->name + i; + } + memcpy (p - 8, "nvalias ", 8); + prom_feval (p - 8); + } + } else if (op->flag & OPP_DIRTY) { + if (op->flag & OPP_STRING) { + op->value [op->len] = 0; + error = prom_setprop (node, op->name, + op->value, op->len + 1); + if (error <= 0) + printk (KERN_WARNING "openpromfs: " + "Couldn't write property %s\n", + op->name); + } else if ((op->flag & OPP_BINARY) || !op->len) { + error = prom_setprop (node, op->name, + op->value, op->len); + if (error <= 0) + printk (KERN_WARNING "openpromfs: " + "Couldn't write property %s\n", + op->name); + } else { + printk (KERN_WARNING "openpromfs: " + "Unknown property type of %s\n", + op->name); + } } - return ret; + unlock_kernel(); + kfree (filp->private_data); + return 0; } static const struct file_operations openpromfs_prop_ops = { - .open = property_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, + .read = property_read, + .write = property_write, + .release = property_release, }; -static int openpromfs_readdir(struct file *, void *, filldir_t); +static const struct file_operations openpromfs_nodenum_ops = { + .read = nodenum_read, +}; static const struct file_operations openprom_operations = { .read = generic_read_dir, .readdir = openpromfs_readdir, }; -static struct dentry *openpromfs_lookup(struct inode *, struct dentry *, struct nameidata *); +static struct inode_operations openprom_alias_inode_operations = { + .create = openpromfs_create, + .lookup = openpromfs_lookup, + .unlink = openpromfs_unlink, +}; static struct inode_operations openprom_inode_operations = { .lookup = openpromfs_lookup, }; -static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) +static int lookup_children(u16 n, const char * name, int len) +{ + int ret; + u16 node; + for (; n != 0xffff; n = nodes[n].next) { + node = nodes[n].child; + if (node != 0xffff) { + char buffer[128]; + int i; + char *p; + + while (node != 0xffff) { + if (prom_getname (nodes[node].node, + buffer, 128) >= 0) { + i = strlen (buffer); + if ((len == i) + && !strncmp (buffer, name, len)) + return NODE2INO(node); + p = strchr (buffer, '@'); + if (p && (len == p - buffer) + && !strncmp (buffer, name, len)) + return NODE2INO(node); + } + node = nodes[node].next; + } + } else + continue; + ret = lookup_children (nodes[n].child, name, len); + if (ret) return ret; + } + return 0; +} + +static struct dentry *openpromfs_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) { - struct op_inode_info *ent_oi, *oi = OP_I(dir); - struct device_node *dp, *child; - struct property *prop; - enum op_inode_type ent_type; - union op_inode_data ent_data; + int ino = 0; +#define OPFSL_DIR 0 +#define OPFSL_PROPERTY 1 +#define OPFSL_NODENUM 2 + int type = 0; + char buffer[128]; + char *p; const char *name; + u32 n; + u16 dirnode; + unsigned int len; + int i; struct inode *inode; - unsigned int ino; - int len; + char buffer2[64]; - BUG_ON(oi->type != op_inode_node); - - dp = oi->u.node; - + inode = NULL; name = dentry->d_name.name; len = dentry->d_name.len; - - mutex_lock(&op_mutex); - - child = dp->child; - while (child) { - int n = strlen(child->path_component_name); - - if (len == n && - !strncmp(child->path_component_name, name, len)) { - ent_type = op_inode_node; - ent_data.node = child; - ino = child->unique_id; - goto found; + lock_kernel(); + if (name [0] == '.' && len == 5 && !strncmp (name + 1, "node", 4)) { + ino = NODEP2INO(NODE(dir->i_ino).first_prop); + type = OPFSL_NODENUM; + } + if (!ino) { + u16 node = NODE(dir->i_ino).child; + while (node != 0xffff) { + if (prom_getname (nodes[node].node, buffer, 128) >= 0) { + i = strlen (buffer); + if (len == i && !strncmp (buffer, name, len)) { + ino = NODE2INO(node); + type = OPFSL_DIR; + break; + } + p = strchr (buffer, '@'); + if (p && (len == p - buffer) + && !strncmp (buffer, name, len)) { + ino = NODE2INO(node); + type = OPFSL_DIR; + break; + } + } + node = nodes[node].next; } - child = child->sibling; } - - prop = dp->properties; - while (prop) { - int n = strlen(prop->name); - - if (len == n && !strncmp(prop->name, name, len)) { - ent_type = op_inode_prop; - ent_data.prop = prop; - ino = prop->unique_id; - goto found; + n = NODE(dir->i_ino).node; + dirnode = dir->i_ino - OPENPROM_FIRST_INO; + if (!ino) { + int j = NODEP2INO(NODE(dir->i_ino).first_prop); + if (dirnode != aliases) { + for (p = prom_firstprop (n, buffer2); + p && *p; + p = prom_nextprop (n, p, buffer2)) { + j++; + if ((len == strlen (p)) + && !strncmp (p, name, len)) { + ino = j; + type = OPFSL_PROPERTY; + break; + } + } + } else { + int k; + for (k = 0; k < aliases_nodes; k++) { + j++; + if (alias_names [k] + && (len == strlen (alias_names [k])) + && !strncmp (alias_names [k], name, len)) { + ino = j; + type = OPFSL_PROPERTY; + break; + } + } } - - prop = prop->next; } - - mutex_unlock(&op_mutex); - return ERR_PTR(-ENOENT); - -found: - inode = iget(dir->i_sb, ino); - mutex_unlock(&op_mutex); + if (!ino) { + ino = lookup_children (NODE(dir->i_ino).child, name, len); + if (ino) + type = OPFSL_DIR; + else { + unlock_kernel(); + return ERR_PTR(-ENOENT); + } + } + inode = iget (dir->i_sb, ino); + unlock_kernel(); if (!inode) return ERR_PTR(-EINVAL); - ent_oi = OP_I(inode); - ent_oi->type = ent_type; - ent_oi->u = ent_data; - - switch (ent_type) { - case op_inode_node: + switch (type) { + case OPFSL_DIR: inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; - inode->i_op = &openprom_inode_operations; + if (ino == OPENPROM_FIRST_INO + aliases) { + inode->i_mode |= S_IWUSR; + inode->i_op = &openprom_alias_inode_operations; + } else + inode->i_op = &openprom_inode_operations; inode->i_fop = &openprom_operations; inode->i_nlink = 2; break; - case op_inode_prop: - if (!strcmp(dp->name, "options") && (len == 17) && - !strncmp (name, "security-password", 17)) + case OPFSL_NODENUM: + inode->i_mode = S_IFREG | S_IRUGO; + inode->i_fop = &openpromfs_nodenum_ops; + inode->i_nlink = 1; + inode->u.generic_ip = (void *)(long)(n); + break; + case OPFSL_PROPERTY: + if ((dirnode == options) && (len == 17) + && !strncmp (name, "security-password", 17)) inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR; - else + else { inode->i_mode = S_IFREG | S_IRUGO; + if (dirnode == options || dirnode == aliases) { + if (len != 4 || strncmp (name, "name", 4)) + inode->i_mode |= S_IWUSR; + } + } inode->i_fop = &openpromfs_prop_ops; inode->i_nlink = 1; - inode->i_size = ent_oi->u.prop->length; + if (inode->i_size < 0) + inode->i_size = 0; + inode->u.generic_ip = (void *)(long)(((u16)dirnode) | + (((u16)(ino - NODEP2INO(NODE(dir->i_ino).first_prop) - 1)) << 16)); break; } @@ -263,89 +775,237 @@ found: static int openpromfs_readdir(struct file * filp, void * dirent, filldir_t filldir) { struct inode *inode = filp->f_dentry->d_inode; - struct op_inode_info *oi = OP_I(inode); - struct device_node *dp = oi->u.node; - struct device_node *child; - struct property *prop; unsigned int ino; - int i; - - mutex_lock(&op_mutex); + u32 n; + int i, j; + char buffer[128]; + u16 node; + char *p; + char buffer2[64]; + + lock_kernel(); ino = inode->i_ino; i = filp->f_pos; switch (i) { case 0: - if (filldir(dirent, ".", 1, i, ino, DT_DIR) < 0) - goto out; + if (filldir(dirent, ".", 1, i, ino, DT_DIR) < 0) goto out; i++; filp->f_pos++; /* fall thru */ case 1: - if (filldir(dirent, "..", 2, i, - (dp->parent == NULL ? - OPENPROM_ROOT_INO : - dp->parent->unique_id), DT_DIR) < 0) + if (filldir(dirent, "..", 2, i, + (NODE(ino).parent == 0xffff) ? + OPENPROM_ROOT_INO : NODE2INO(NODE(ino).parent), DT_DIR) < 0) goto out; i++; filp->f_pos++; /* fall thru */ default: i -= 2; - - /* First, the children nodes as directories. */ - child = dp->child; - while (i && child) { - child = child->sibling; + node = NODE(ino).child; + while (i && node != 0xffff) { + node = nodes[node].next; i--; } - while (child) { - if (filldir(dirent, - child->path_component_name, - strlen(child->path_component_name), - filp->f_pos, child->unique_id, DT_DIR) < 0) + while (node != 0xffff) { + if (prom_getname (nodes[node].node, buffer, 128) < 0) + goto out; + if (filldir(dirent, buffer, strlen(buffer), + filp->f_pos, NODE2INO(node), DT_DIR) < 0) goto out; - filp->f_pos++; - child = child->sibling; + node = nodes[node].next; } - - /* Next, the properties as files. */ - prop = dp->properties; - while (i && prop) { - prop = prop->next; - i--; - } - while (prop) { - if (filldir(dirent, prop->name, strlen(prop->name), - filp->f_pos, prop->unique_id, DT_REG) < 0) + j = NODEP2INO(NODE(ino).first_prop); + if (!i) { + if (filldir(dirent, ".node", 5, filp->f_pos, j, DT_REG) < 0) goto out; - filp->f_pos++; - prop = prop->next; + } else + i--; + n = NODE(ino).node; + if (ino == OPENPROM_FIRST_INO + aliases) { + for (j++; i < aliases_nodes; i++, j++) { + if (alias_names [i]) { + if (filldir (dirent, alias_names [i], + strlen (alias_names [i]), + filp->f_pos, j, DT_REG) < 0) goto out; + filp->f_pos++; + } + } + } else { + for (p = prom_firstprop (n, buffer2); + p && *p; + p = prom_nextprop (n, p, buffer2)) { + j++; + if (i) i--; + else { + if (filldir(dirent, p, strlen(p), + filp->f_pos, j, DT_REG) < 0) + goto out; + filp->f_pos++; + } + } } } out: - mutex_unlock(&op_mutex); + unlock_kernel(); + return 0; +} + +static int openpromfs_create (struct inode *dir, struct dentry *dentry, int mode, + struct nameidata *nd) +{ + char *p; + struct inode *inode; + + if (!dir) + return -ENOENT; + if (dentry->d_name.len > 256) + return -EINVAL; + p = kmalloc (dentry->d_name.len + 1, GFP_KERNEL); + if (!p) + return -ENOMEM; + strncpy (p, dentry->d_name.name, dentry->d_name.len); + p [dentry->d_name.len] = 0; + lock_kernel(); + if (aliases_nodes == ALIASES_NNODES) { + kfree(p); + unlock_kernel(); + return -EIO; + } + alias_names [aliases_nodes++] = p; + inode = iget (dir->i_sb, + NODEP2INO(NODE(dir->i_ino).first_prop) + aliases_nodes); + if (!inode) { + unlock_kernel(); + return -EINVAL; + } + inode->i_mode = S_IFREG | S_IRUGO | S_IWUSR; + inode->i_fop = &openpromfs_prop_ops; + inode->i_nlink = 1; + if (inode->i_size < 0) inode->i_size = 0; + inode->u.generic_ip = (void *)(long)(((u16)aliases) | + (((u16)(aliases_nodes - 1)) << 16)); + unlock_kernel(); + d_instantiate(dentry, inode); return 0; } -static kmem_cache_t *op_inode_cachep; +static int openpromfs_unlink (struct inode *dir, struct dentry *dentry) +{ + unsigned int len; + char *p; + const char *name; + int i; + + name = dentry->d_name.name; + len = dentry->d_name.len; + lock_kernel(); + for (i = 0; i < aliases_nodes; i++) + if ((strlen (alias_names [i]) == len) + && !strncmp (name, alias_names[i], len)) { + char buffer[512]; + + p = alias_names [i]; + alias_names [i] = NULL; + kfree (p); + strcpy (buffer, "nvunalias "); + memcpy (buffer + 10, name, len); + buffer [10 + len] = 0; + prom_feval (buffer); + } + unlock_kernel(); + return 0; +} -static struct inode *openprom_alloc_inode(struct super_block *sb) +/* {{{ init section */ +static int __init check_space (u16 n) { - struct op_inode_info *oi; + unsigned long pages; - oi = kmem_cache_alloc(op_inode_cachep, SLAB_KERNEL); - if (!oi) - return NULL; + if ((1 << alloced) * PAGE_SIZE < (n + 2) * sizeof(openpromfs_node)) { + pages = __get_free_pages (GFP_KERNEL, alloced + 1); + if (!pages) + return -1; - return &oi->vfs_inode; + if (nodes) { + memcpy ((char *)pages, (char *)nodes, + (1 << alloced) * PAGE_SIZE); + free_pages ((unsigned long)nodes, alloced); + } + alloced++; + nodes = (openpromfs_node *)pages; + } + return 0; } -static void openprom_destroy_inode(struct inode *inode) +static u16 __init get_nodes (u16 parent, u32 node) { - kmem_cache_free(op_inode_cachep, OP_I(inode)); + char *p; + u16 n = last_node++, i; + char buffer[64]; + + if (check_space (n) < 0) + return 0xffff; + nodes[n].parent = parent; + nodes[n].node = node; + nodes[n].next = 0xffff; + nodes[n].child = 0xffff; + nodes[n].first_prop = first_prop++; + if (!parent) { + char buffer[8]; + int j; + + if ((j = prom_getproperty (node, "name", buffer, 8)) >= 0) { + buffer[j] = 0; + if (!strcmp (buffer, "options")) + options = n; + else if (!strcmp (buffer, "aliases")) + aliases = n; + } + } + if (n != aliases) + for (p = prom_firstprop (node, buffer); + p && p != (char *)-1 && *p; + p = prom_nextprop (node, p, buffer)) + first_prop++; + else { + char *q; + for (p = prom_firstprop (node, buffer); + p && p != (char *)-1 && *p; + p = prom_nextprop (node, p, buffer)) { + if (aliases_nodes == ALIASES_NNODES) + break; + for (i = 0; i < aliases_nodes; i++) + if (!strcmp (p, alias_names [i])) + break; + if (i < aliases_nodes) + continue; + q = kmalloc (strlen (p) + 1, GFP_KERNEL); + if (!q) + return 0xffff; + strcpy (q, p); + alias_names [aliases_nodes++] = q; + } + first_prop += ALIASES_NNODES; + } + node = prom_getchild (node); + if (node) { + parent = get_nodes (n, node); + if (parent == 0xffff) + return 0xffff; + nodes[n].child = parent; + while ((node = prom_getsibling (node)) != 0) { + i = get_nodes (n, node); + if (i == 0xffff) + return 0xffff; + nodes[parent].next = i; + parent = i; + } + } + return n; } static void openprom_read_inode(struct inode * inode) @@ -365,8 +1025,6 @@ static int openprom_remount(struct super_block *sb, int *flags, char *data) } static struct super_operations openprom_sops = { - .alloc_inode = openprom_alloc_inode, - .destroy_inode = openprom_destroy_inode, .read_inode = openprom_read_inode, .statfs = simple_statfs, .remount_fs = openprom_remount, @@ -374,8 +1032,7 @@ static struct super_operations openprom_sops = { static int openprom_fill_super(struct super_block *s, void *data, int silent) { - struct inode *root_inode; - struct op_inode_info *oi; + struct inode * root_inode; s->s_flags |= MS_NOATIME; s->s_blocksize = 1024; @@ -386,11 +1043,6 @@ static int openprom_fill_super(struct super_block *s, void *data, int silent) root_inode = iget(s, OPENPROM_ROOT_INO); if (!root_inode) goto out_no_root; - - oi = OP_I(root_inode); - oi->type = op_inode_node; - oi->u.node = of_find_node_by_path("/"); - s->s_root = d_alloc_root(root_inode); if (!s->s_root) goto out_no_root; @@ -402,10 +1054,10 @@ out_no_root: return -ENOMEM; } -static int openprom_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *openprom_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, openprom_fill_super, mnt); + return get_sb_single(fs_type, flags, data, openprom_fill_super); } static struct file_system_type openprom_fs_type = { @@ -415,39 +1067,29 @@ static struct file_system_type openprom_fs_type = { .kill_sb = kill_anon_super, }; -static void op_inode_init_once(void *data, kmem_cache_t * cachep, unsigned long flags) -{ - struct op_inode_info *oi = (struct op_inode_info *) data; - - if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == - SLAB_CTOR_CONSTRUCTOR) - inode_init_once(&oi->vfs_inode); -} - static int __init init_openprom_fs(void) { - int err; - - op_inode_cachep = kmem_cache_create("op_inode_cache", - sizeof(struct op_inode_info), - 0, - (SLAB_RECLAIM_ACCOUNT | - SLAB_MEM_SPREAD), - op_inode_init_once, NULL); - if (!op_inode_cachep) - return -ENOMEM; - - err = register_filesystem(&openprom_fs_type); - if (err) - kmem_cache_destroy(op_inode_cachep); - - return err; + nodes = (openpromfs_node *)__get_free_pages(GFP_KERNEL, 0); + if (!nodes) { + printk (KERN_WARNING "openpromfs: can't get free page\n"); + return -EIO; + } + if (get_nodes (0xffff, prom_root_node) == 0xffff) { + printk (KERN_WARNING "openpromfs: couldn't setup tree\n"); + return -EIO; + } + nodes[last_node].first_prop = first_prop; + return register_filesystem(&openprom_fs_type); } static void __exit exit_openprom_fs(void) { + int i; unregister_filesystem(&openprom_fs_type); - kmem_cache_destroy(op_inode_cachep); + free_pages ((unsigned long)nodes, alloced); + for (i = 0; i < aliases_nodes; i++) + kfree (alias_names [i]); + nodes = NULL; } module_init(init_openprom_fs) diff --git a/fs/partitions/Kconfig b/fs/partitions/Kconfig index e478f1941..c9a478099 100644 --- a/fs/partitions/Kconfig +++ b/fs/partitions/Kconfig @@ -99,7 +99,7 @@ config IBM_PARTITION config MAC_PARTITION bool "Macintosh partition map support" if PARTITION_ADVANCED - default y if (MAC || PPC_PMAC) + default y if MAC help Say Y here if you would like to use hard disks under Linux which were partitioned on a Macintosh. diff --git a/fs/partitions/Makefile b/fs/partitions/Makefile index d713ce6b3..42c7d3878 100644 --- a/fs/partitions/Makefile +++ b/fs/partitions/Makefile @@ -4,6 +4,7 @@ obj-y := check.o +obj-$(CONFIG_DEVFS_FS) += devfs.o obj-$(CONFIG_ACORN_PARTITION) += acorn.o obj-$(CONFIG_AMIGA_PARTITION) += amiga.o obj-$(CONFIG_ATARI_PARTITION) += atari.o diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c index 1bc9f372c..c05085710 100644 --- a/fs/partitions/acorn.c +++ b/fs/partitions/acorn.c @@ -12,6 +12,7 @@ * every single manufacturer of SCSI and IDE cards created their own * method. */ +#include #include #include diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 51c6a748d..7ef1f094d 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -18,8 +18,10 @@ #include #include #include +#include #include "check.h" +#include "devfs.h" #include "acorn.h" #include "amiga.h" @@ -159,11 +161,18 @@ check_partition(struct gendisk *hd, struct block_device *bdev) if (!state) return NULL; - disk_name(hd, 0, state->name); - printk(KERN_INFO " %s:", state->name); - if (isdigit(state->name[strlen(state->name)-1])) +#ifdef CONFIG_DEVFS_FS + if (hd->devfs_name[0] != '\0') { + printk(KERN_INFO " /dev/%s:", hd->devfs_name); sprintf(state->name, "p"); - + } +#endif + else { + disk_name(hd, 0, state->name); + printk(KERN_INFO " %s:", state->name); + if (isdigit(state->name[strlen(state->name)-1])) + sprintf(state->name, "p"); + } state->limit = hd->minors; i = res = 0; while (!res && check_part[i]) { @@ -319,7 +328,7 @@ void delete_partition(struct gendisk *disk, int part) p->nr_sects = 0; p->ios[0] = p->ios[1] = 0; p->sectors[0] = p->sectors[1] = 0; - sysfs_remove_link(&p->kobj, "subsystem"); + devfs_remove("%s/part%d", disk->devfs_name, part); if (p->holder_dir) kobject_unregister(p->holder_dir); kobject_uevent(&p->kobj, KOBJ_REMOVE); @@ -339,7 +348,10 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len) p->start_sect = start; p->nr_sects = len; p->partno = part; - p->policy = disk->policy; + + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part), + S_IFBLK|S_IRUSR|S_IWUSR, + "%s/part%d", disk->devfs_name, part); if (isdigit(disk->kobj.name[strlen(disk->kobj.name)-1])) snprintf(p->kobj.name,KOBJ_NAME_LEN,"%sp%d",disk->kobj.name,part); @@ -351,7 +363,6 @@ void add_partition(struct gendisk *disk, int part, sector_t start, sector_t len) kobject_add(&p->kobj); if (!disk->part_uevent_suppress) kobject_uevent(&p->kobj, KOBJ_ADD); - sysfs_create_link(&p->kobj, &block_subsys.kset.kobj, "subsystem"); partition_sysfs_add_subdir(p); disk->part[part-1] = p; } @@ -387,7 +398,6 @@ static void disk_sysfs_symlinks(struct gendisk *disk) kfree(disk_name); } } - sysfs_create_link(&disk->kobj, &block_subsys.kset.kobj, "subsystem"); } /* Not exported, helper to add_disk(). */ @@ -410,8 +420,14 @@ void register_disk(struct gendisk *disk) disk_sysfs_add_subdirs(disk); /* No minors to use for partitions */ - if (disk->minors == 1) + if (disk->minors == 1) { + if (disk->devfs_name[0] != '\0') + devfs_add_disk(disk); goto exit; + } + + /* always add handle for the whole disk */ + devfs_add_partitioned(disk); /* No such device (e.g., media were just removed) */ if (!get_capacity(disk)) @@ -465,10 +481,6 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) sector_t from = state->parts[p].from; if (!size) continue; - if (from + size > get_capacity(disk)) { - printk(" %s: p%d exceeds device capacity\n", - disk->disk_name, p); - } add_partition(disk, p, from, size); #ifdef CONFIG_BLK_DEV_MD if (state->parts[p].flags) @@ -484,8 +496,8 @@ unsigned char *read_dev_sector(struct block_device *bdev, sector_t n, Sector *p) struct address_space *mapping = bdev->bd_inode->i_mapping; struct page *page; - page = read_mapping_page(mapping, (pgoff_t)(n >> (PAGE_CACHE_SHIFT-9)), - NULL); + page = read_cache_page(mapping, (pgoff_t)(n >> (PAGE_CACHE_SHIFT-9)), + (filler_t *)mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); if (!PageUptodate(page)) @@ -519,6 +531,8 @@ void del_gendisk(struct gendisk *disk) disk_stat_set_all(disk, 0); disk->stamp = 0; + devfs_remove_disk(disk); + kobject_uevent(&disk->kobj, KOBJ_REMOVE); if (disk->holder_dir) kobject_unregister(disk->holder_dir); @@ -534,6 +548,5 @@ void del_gendisk(struct gendisk *disk) put_device(disk->driverfs_dev); disk->driverfs_dev = NULL; } - sysfs_remove_link(&disk->kobj, "subsystem"); kobject_del(&disk->kobj); } diff --git a/fs/partitions/devfs.c b/fs/partitions/devfs.c new file mode 100644 index 000000000..3f0a780c9 --- /dev/null +++ b/fs/partitions/devfs.c @@ -0,0 +1,130 @@ +/* + * This tries to keep block devices away from devfs as much as possible. + */ +#include +#include +#include +#include +#include +#include + + +struct unique_numspace { + u32 num_free; /* Num free in bits */ + u32 length; /* Array length in bytes */ + unsigned long *bits; + struct semaphore mutex; +}; + +static DEFINE_MUTEX(numspace_mutex); + +static int expand_numspace(struct unique_numspace *s) +{ + u32 length; + void *bits; + + if (s->length < 16) + length = 16; + else + length = s->length << 1; + + bits = vmalloc(length); + if (!bits) + return -ENOMEM; + if (s->bits) { + memcpy(bits, s->bits, s->length); + vfree(s->bits); + } + + s->num_free = (length - s->length) << 3; + s->bits = bits; + memset(bits + s->length, 0, length - s->length); + s->length = length; + + return 0; +} + +static int alloc_unique_number(struct unique_numspace *s) +{ + int rval = 0; + + mutex_lock(&numspace_mutex); + if (s->num_free < 1) + rval = expand_numspace(s); + if (!rval) { + rval = find_first_zero_bit(s->bits, s->length << 3); + --s->num_free; + __set_bit(rval, s->bits); + } + mutex_unlock(&numspace_mutex); + + return rval; +} + +static void dealloc_unique_number(struct unique_numspace *s, int number) +{ + int old_val; + + if (number >= 0) { + mutex_lock(&numspace_mutex); + old_val = __test_and_clear_bit(number, s->bits); + if (old_val) + ++s->num_free; + mutex_unlock(&numspace_mutex); + } +} + +static struct unique_numspace disc_numspace; +static struct unique_numspace cdrom_numspace; + +void devfs_add_partitioned(struct gendisk *disk) +{ + char dirname[64], symlink[16]; + + devfs_mk_dir(disk->devfs_name); + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), + S_IFBLK|S_IRUSR|S_IWUSR, + "%s/disc", disk->devfs_name); + + disk->number = alloc_unique_number(&disc_numspace); + + sprintf(symlink, "discs/disc%d", disk->number); + sprintf(dirname, "../%s", disk->devfs_name); + devfs_mk_symlink(symlink, dirname); + +} + +void devfs_add_disk(struct gendisk *disk) +{ + devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), + (disk->flags & GENHD_FL_CD) ? + S_IFBLK|S_IRUGO|S_IWUGO : + S_IFBLK|S_IRUSR|S_IWUSR, + "%s", disk->devfs_name); + + if (disk->flags & GENHD_FL_CD) { + char dirname[64], symlink[16]; + + disk->number = alloc_unique_number(&cdrom_numspace); + + sprintf(symlink, "cdroms/cdrom%d", disk->number); + sprintf(dirname, "../%s", disk->devfs_name); + devfs_mk_symlink(symlink, dirname); + } +} + +void devfs_remove_disk(struct gendisk *disk) +{ + if (disk->minors != 1) { + devfs_remove("discs/disc%d", disk->number); + dealloc_unique_number(&disc_numspace, disk->number); + devfs_remove("%s/disc", disk->devfs_name); + } + if (disk->flags & GENHD_FL_CD) { + devfs_remove("cdroms/cdrom%d", disk->number); + dealloc_unique_number(&cdrom_numspace, disk->number); + } + devfs_remove(disk->devfs_name); +} + + diff --git a/fs/partitions/devfs.h b/fs/partitions/devfs.h new file mode 100644 index 000000000..176118b4e --- /dev/null +++ b/fs/partitions/devfs.h @@ -0,0 +1,10 @@ + +#ifdef CONFIG_DEVFS_FS +void devfs_add_disk(struct gendisk *dev); +void devfs_add_partitioned(struct gendisk *dev); +void devfs_remove_disk(struct gendisk *dev); +#else +# define devfs_add_disk(disk) do { } while (0) +# define devfs_add_partitioned(disk) do { } while (0) +# define devfs_remove_disk(disk) do { } while (0) +#endif diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c index 63730282a..0f5b017ae 100644 --- a/fs/partitions/efi.c +++ b/fs/partitions/efi.c @@ -91,6 +91,7 @@ * - Code works, detects all the partitions. * ************************************************************/ +#include #include #include "check.h" #include "efi.h" diff --git a/fs/partitions/efi.h b/fs/partitions/efi.h index 2cc89d047..c44fb0561 100644 --- a/fs/partitions/efi.h +++ b/fs/partitions/efi.h @@ -26,6 +26,7 @@ #define FS_PART_EFI_H_INCLUDED #include +#include #include #include #include diff --git a/fs/partitions/ibm.c b/fs/partitions/ibm.c index d352a7381..830c55d86 100644 --- a/fs/partitions/ibm.c +++ b/fs/partitions/ibm.c @@ -6,6 +6,7 @@ * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 */ +#include #include #include #include diff --git a/fs/partitions/mac.c b/fs/partitions/mac.c index c0871002d..813292f21 100644 --- a/fs/partitions/mac.c +++ b/fs/partitions/mac.c @@ -6,6 +6,7 @@ * Re-organised Feb 1998 Russell King */ +#include #include #include "check.h" #include "mac.h" diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index 8f12587c3..9935d2541 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c @@ -19,6 +19,7 @@ * Re-organised Feb 1998 Russell King */ +#include #include "check.h" #include "msdos.h" diff --git a/fs/partitions/sun.c b/fs/partitions/sun.c index 0a5927c80..abe91ca03 100644 --- a/fs/partitions/sun.c +++ b/fs/partitions/sun.c @@ -74,7 +74,7 @@ int sun_partition(struct parsed_partitions *state, struct block_device *bdev) spc = be16_to_cpu(label->ntrks) * be16_to_cpu(label->nsect); for (i = 0; i < 8; i++, p++) { unsigned long st_sector; - unsigned int num_sectors; + int num_sectors; st_sector = be32_to_cpu(p->start_cylinder) * spc; num_sectors = be32_to_cpu(p->num_sectors); diff --git a/fs/pipe.c b/fs/pipe.c index ed0d780ed..359fe9018 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -879,6 +879,7 @@ static struct inode * get_pipe_inode(void) inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_blksize = PAGE_SIZE; return inode; @@ -980,11 +981,12 @@ EXPORT_SYMBOL_GPL(do_pipe); * any operations on the root directory. However, we need a non-trivial * d_name - pipe: will go nicely and kill the special-casing in procfs. */ -static int pipefs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - struct vfsmount *mnt) + +static struct super_block * +pipefs_get_sb(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data) { - return get_sb_pseudo(fs_type, "pipe:", NULL, PIPEFS_MAGIC, mnt); + return get_sb_pseudo(fs_type, "pipe:", NULL, PIPEFS_MAGIC); } static struct file_system_type pipe_fs_type = { diff --git a/fs/pnode.c b/fs/pnode.c index da42ee61c..37b568ed0 100644 --- a/fs/pnode.c +++ b/fs/pnode.c @@ -53,7 +53,8 @@ static int do_make_slave(struct vfsmount *mnt) if (master) { list_for_each_entry(slave_mnt, &mnt->mnt_slave_list, mnt_slave) slave_mnt->mnt_master = master; - list_move(&mnt->mnt_slave, &master->mnt_slave_list); + list_del(&mnt->mnt_slave); + list_add(&mnt->mnt_slave, &master->mnt_slave_list); list_splice(&mnt->mnt_slave_list, master->mnt_slave_list.prev); INIT_LIST_HEAD(&mnt->mnt_slave_list); } else { @@ -282,8 +283,10 @@ static void __propagate_umount(struct vfsmount *mnt) * umount the child only if the child has no * other children */ - if (child && list_empty(&child->mnt_mounts)) - list_move_tail(&child->mnt_hash, &mnt->mnt_hash); + if (child && list_empty(&child->mnt_mounts)) { + list_del(&child->mnt_hash); + list_add_tail(&child->mnt_hash, &mnt->mnt_hash); + } } } diff --git a/fs/proc/array.c b/fs/proc/array.c index 8e7277336..dc4d1d0aa 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -52,6 +52,7 @@ * : base.c too. */ +#include #include #include #include @@ -74,7 +75,9 @@ #include #include #include -#include +#include +#include +#include #include #include @@ -400,8 +403,6 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) sigemptyset(&sigign); sigemptyset(&sigcatch); cutime = cstime = utime = stime = cputime_zero; - - mutex_lock(&tty_mutex); read_lock(&tasklist_lock); if (task->sighand) { spin_lock_irq(&task->sighand->siglock); @@ -447,7 +448,6 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) pgid = vx_info_map_pid(task->vx_info, pgid); read_unlock(&tasklist_lock); - mutex_unlock(&tty_mutex); if (!whole || num_threads<2) { wchan = 0; @@ -487,7 +487,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \ %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \ -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu %llu\n", +%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n", pid, tcomm, state, @@ -531,8 +531,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) task->exit_signal, task_cpu(task), task->rt_priority, - task->policy, - (unsigned long long)delayacct_blkio_ticks(task)); + task->policy); if(mm) mmput(mm); return res; diff --git a/fs/proc/base.c b/fs/proc/base.c index d491006a2..d0dc96d04 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -49,6 +49,7 @@ #include +#include #include #include #include @@ -72,18 +73,10 @@ #include #include +#include +#include #include "internal.h" -/* NOTE: - * Implementing inode permission operations in /proc is almost - * certainly an error. Permission checks need to happen during - * each system call not at open time. The reason is that most of - * what we wish to check for permissions in /proc varies at runtime. - * - * The classic example of a problem is opening file descriptors - * in /proc for a task before it execs a suid executable. - */ - /* * For hysterical raisins we keep the same inumbers as in the old procfs. * Feel free to change the macro below - just keep the range distinct from @@ -131,8 +124,6 @@ enum pid_directory_inos { PROC_TGID_ATTR_PREV, PROC_TGID_ATTR_EXEC, PROC_TGID_ATTR_FSCREATE, - PROC_TGID_ATTR_KEYCREATE, - PROC_TGID_ATTR_SOCKCREATE, #endif PROC_TGID_VX_INFO, PROC_TGID_IP_INFO, @@ -176,8 +167,6 @@ enum pid_directory_inos { PROC_TID_ATTR_PREV, PROC_TID_ATTR_EXEC, PROC_TID_ATTR_FSCREATE, - PROC_TID_ATTR_KEYCREATE, - PROC_TID_ATTR_SOCKCREATE, #endif PROC_TID_VX_INFO, PROC_TID_IP_INFO, @@ -191,9 +180,6 @@ enum pid_directory_inos { PROC_TID_FD_DIR = 0x8000, /* 0x8000-0xffff */ }; -/* Worst case buffer size needed for holding an integer. */ -#define PROC_NUMBUF 10 - struct pid_entry { int type; int len; @@ -300,8 +286,6 @@ static struct pid_entry tgid_attr_stuff[] = { E(PROC_TGID_ATTR_PREV, "prev", S_IFREG|S_IRUGO), E(PROC_TGID_ATTR_EXEC, "exec", S_IFREG|S_IRUGO|S_IWUGO), E(PROC_TGID_ATTR_FSCREATE, "fscreate", S_IFREG|S_IRUGO|S_IWUGO), - E(PROC_TGID_ATTR_KEYCREATE, "keycreate", S_IFREG|S_IRUGO|S_IWUGO), - E(PROC_TGID_ATTR_SOCKCREATE, "sockcreate", S_IFREG|S_IRUGO|S_IWUGO), {0,0,NULL,0} }; static struct pid_entry tid_attr_stuff[] = { @@ -309,8 +293,6 @@ static struct pid_entry tid_attr_stuff[] = { E(PROC_TID_ATTR_PREV, "prev", S_IFREG|S_IRUGO), E(PROC_TID_ATTR_EXEC, "exec", S_IFREG|S_IRUGO|S_IWUGO), E(PROC_TID_ATTR_FSCREATE, "fscreate", S_IFREG|S_IRUGO|S_IWUGO), - E(PROC_TID_ATTR_KEYCREATE, "keycreate", S_IFREG|S_IRUGO|S_IWUGO), - E(PROC_TID_ATTR_SOCKCREATE, "sockcreate", S_IFREG|S_IRUGO|S_IWUGO), {0,0,NULL,0} }; #endif @@ -319,15 +301,12 @@ static struct pid_entry tid_attr_stuff[] = { static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) { - struct task_struct *task = get_proc_task(inode); - struct files_struct *files = NULL; + struct task_struct *task = proc_task(inode); + struct files_struct *files; struct file *file; - int fd = proc_fd(inode); + int fd = proc_type(inode) - PROC_TID_FD_DIR; - if (task) { - files = get_files_struct(task); - put_task_struct(task); - } + files = get_files_struct(task); if (files) { /* * We are not taking a ref to the file structure, so we must @@ -359,29 +338,10 @@ static struct fs_struct *get_fs_struct(struct task_struct *task) return fs; } -static int get_nr_threads(struct task_struct *tsk) -{ - /* Must be called with the rcu_read_lock held */ - unsigned long flags; - int count = 0; - - if (lock_task_sighand(tsk, &flags)) { - count = atomic_read(&tsk->signal->count); - unlock_task_sighand(tsk, &flags); - } - return count; -} - static int proc_cwd_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) { - struct task_struct *task = get_proc_task(inode); - struct fs_struct *fs = NULL; + struct fs_struct *fs = get_fs_struct(proc_task(inode)); int result = -ENOENT; - - if (task) { - fs = get_fs_struct(task); - put_task_struct(task); - } if (fs) { read_lock(&fs->lock); *mnt = mntget(fs->pwdmnt); @@ -395,14 +355,55 @@ static int proc_cwd_link(struct inode *inode, struct dentry **dentry, struct vfs static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vfsmount **mnt) { - struct task_struct *task = get_proc_task(inode); - struct fs_struct *fs = NULL; + struct fs_struct *fs = get_fs_struct(proc_task(inode)); + int result = -ENOENT; + if (fs) { + read_lock(&fs->lock); + *mnt = mntget(fs->rootmnt); + *dentry = dget(fs->root); + read_unlock(&fs->lock); + result = 0; + put_fs_struct(fs); + } + return result; +} + + +/* Same as proc_root_link, but this addionally tries to get fs from other + * threads in the group */ +static int proc_task_root_link(struct inode *inode, struct dentry **dentry, + struct vfsmount **mnt) +{ + struct fs_struct *fs; int result = -ENOENT; + struct task_struct *leader = proc_task(inode); - if (task) { - fs = get_fs_struct(task); - put_task_struct(task); + task_lock(leader); + fs = leader->fs; + if (fs) { + atomic_inc(&fs->count); + task_unlock(leader); + } else { + /* Try to get fs from other threads */ + task_unlock(leader); + read_lock(&tasklist_lock); + if (pid_alive(leader)) { + struct task_struct *task = leader; + + while ((task = next_thread(task)) != leader) { + task_lock(task); + fs = task->fs; + if (fs) { + atomic_inc(&fs->count); + task_unlock(task); + break; + } + task_unlock(task); + } + } + read_unlock(&tasklist_lock); } + if (fs) { read_lock(&fs->lock); *mnt = mntget(fs->rootmnt); @@ -414,6 +415,7 @@ static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vf return result; } + #define MAY_PTRACE(task) \ (task == current || \ (task->parent == current && \ @@ -430,7 +432,7 @@ struct mm_struct *mm_for_maps(struct task_struct *task) task_lock(task); if (task->mm != mm) goto out; - if (task->mm != current->mm && __ptrace_may_attach(task) < 0) + if (task->mm != current->mm && __ptrace_may_attach(task)) goto out; task_unlock(task); return mm; @@ -564,20 +566,70 @@ static int proc_oom_score(struct task_struct *task, char *buffer) /************************************************************************/ /* permission checks */ -static int proc_fd_access_allowed(struct inode *inode) + +/* If the process being read is separated by chroot from the reading process, + * don't let the reader access the threads. + * + * note: this does dput(root) and mntput(vfsmnt) on exit. + */ +static int proc_check_chroot(struct dentry *root, struct vfsmount *vfsmnt) { - struct task_struct *task; - int allowed = 0; - /* Allow access to a task's file descriptors if it is us or we - * may use ptrace attach to the process and find out that - * information. - */ - task = get_proc_task(inode); - if (task) { - allowed = ptrace_may_attach(task); - put_task_struct(task); + struct dentry *de, *base; + struct vfsmount *our_vfsmnt, *mnt; + int res = 0; + + /* context admin override */ + if (capable(CAP_CONTEXT)) + goto override; + + read_lock(¤t->fs->lock); + our_vfsmnt = mntget(current->fs->rootmnt); + base = dget(current->fs->root); + read_unlock(¤t->fs->lock); + + spin_lock(&vfsmount_lock); + de = root; + mnt = vfsmnt; + + while (mnt != our_vfsmnt) { + if (mnt == mnt->mnt_parent) + goto out; + de = mnt->mnt_mountpoint; + mnt = mnt->mnt_parent; } - return allowed; + + if (!is_subdir(de, base)) + goto out; + spin_unlock(&vfsmount_lock); + +exit: + dput(base); + mntput(our_vfsmnt); +override: + dput(root); + mntput(vfsmnt); + return res; +out: + spin_unlock(&vfsmount_lock); + res = -EACCES; + goto exit; +} + +static int proc_check_root(struct inode *inode) +{ + struct dentry *root; + struct vfsmount *vfsmnt; + + if (proc_root_link(inode, &root, &vfsmnt)) /* Ewww... */ + return -ENOENT; + return proc_check_chroot(root, vfsmnt); +} + +static int proc_permission(struct inode *inode, int mask, struct nameidata *nd) +{ + if (generic_permission(inode, mask, NULL) != 0) + return -EACCES; + return proc_check_root(inode); } static int proc_setattr(struct dentry *dentry, struct iattr *attr) @@ -601,6 +653,81 @@ static struct inode_operations proc_def_inode_operations = { .setattr = proc_setattr, }; +static int proc_task_permission(struct inode *inode, int mask, struct nameidata *nd) +{ + struct dentry *root; + struct vfsmount *vfsmnt; + + if (generic_permission(inode, mask, NULL) != 0) + return -EACCES; + + if (proc_task_root_link(inode, &root, &vfsmnt)) + return -ENOENT; + + return proc_check_chroot(root, vfsmnt); +} + +extern struct seq_operations proc_pid_maps_op; +static int maps_open(struct inode *inode, struct file *file) +{ + struct task_struct *task = proc_task(inode); + int ret = seq_open(file, &proc_pid_maps_op); + if (!ret) { + struct seq_file *m = file->private_data; + m->private = task; + } + return ret; +} + +static struct file_operations proc_maps_operations = { + .open = maps_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +#ifdef CONFIG_NUMA +extern struct seq_operations proc_pid_numa_maps_op; +static int numa_maps_open(struct inode *inode, struct file *file) +{ + struct task_struct *task = proc_task(inode); + int ret = seq_open(file, &proc_pid_numa_maps_op); + if (!ret) { + struct seq_file *m = file->private_data; + m->private = task; + } + return ret; +} + +static struct file_operations proc_numa_maps_operations = { + .open = numa_maps_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; +#endif + +#ifdef CONFIG_MMU +extern struct seq_operations proc_pid_smaps_op; +static int smaps_open(struct inode *inode, struct file *file) +{ + struct task_struct *task = proc_task(inode); + int ret = seq_open(file, &proc_pid_smaps_op); + if (!ret) { + struct seq_file *m = file->private_data; + m->private = task; + } + return ret; +} + +static struct file_operations proc_smaps_operations = { + .open = smaps_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; +#endif + extern struct seq_operations mounts_op; struct proc_mounts { struct seq_file m; @@ -609,19 +736,16 @@ struct proc_mounts { static int mounts_open(struct inode *inode, struct file *file) { - struct task_struct *task = get_proc_task(inode); - struct namespace *namespace = NULL; + struct task_struct *task = proc_task(inode); + struct namespace *namespace; struct proc_mounts *p; int ret = -EINVAL; - if (task) { - task_lock(task); - namespace = task->namespace; - if (namespace) - get_namespace(namespace); - task_unlock(task); - put_task_struct(task); - } + task_lock(task); + namespace = task->namespace; + if (namespace) + get_namespace(namespace); + task_unlock(task); if (namespace) { ret = -ENOMEM; @@ -678,21 +802,17 @@ static struct file_operations proc_mounts_operations = { extern struct seq_operations mountstats_op; static int mountstats_open(struct inode *inode, struct file *file) { + struct task_struct *task = proc_task(inode); int ret = seq_open(file, &mountstats_op); if (!ret) { struct seq_file *m = file->private_data; - struct namespace *namespace = NULL; - struct task_struct *task = get_proc_task(inode); - - if (task) { - task_lock(task); - namespace = task->namespace; - if (namespace) - get_namespace(namespace); - task_unlock(task); - put_task_struct(task); - } + struct namespace *namespace; + task_lock(task); + namespace = task->namespace; + if (namespace) + get_namespace(namespace); + task_unlock(task); if (namespace) m->private = namespace; @@ -719,27 +839,18 @@ static ssize_t proc_info_read(struct file * file, char __user * buf, struct inode * inode = file->f_dentry->d_inode; unsigned long page; ssize_t length; - struct task_struct *task = get_proc_task(inode); - - length = -ESRCH; - if (!task) - goto out_no_task; + struct task_struct *task = proc_task(inode); if (count > PROC_BLOCK_SIZE) count = PROC_BLOCK_SIZE; - - length = -ENOMEM; if (!(page = __get_free_page(GFP_KERNEL))) - goto out; + return -ENOMEM; length = PROC_I(inode)->op.proc_read(task, (char*)page); if (length >= 0) length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); free_page(page); -out: - put_task_struct(task); -out_no_task: return length; } @@ -756,15 +867,12 @@ static int mem_open(struct inode* inode, struct file* file) static ssize_t mem_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); + struct task_struct *task = proc_task(file->f_dentry->d_inode); char *page; unsigned long src = *ppos; int ret = -ESRCH; struct mm_struct *mm; - if (!task) - goto out_no_task; - if (!MAY_PTRACE(task) || !ptrace_may_attach(task)) goto out; @@ -814,8 +922,6 @@ out_put: out_free: free_page((unsigned long) page); out: - put_task_struct(task); -out_no_task: return ret; } @@ -828,20 +934,15 @@ static ssize_t mem_write(struct file * file, const char * buf, { int copied = 0; char *page; - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); + struct task_struct *task = proc_task(file->f_dentry->d_inode); unsigned long dst = *ppos; - copied = -ESRCH; - if (!task) - goto out_no_task; - if (!MAY_PTRACE(task) || !ptrace_may_attach(task)) - goto out; + return -ESRCH; - copied = -ENOMEM; page = (char *)__get_free_page(GFP_USER); if (!page) - goto out; + return -ENOMEM; while (count > 0) { int this_len, retval; @@ -864,9 +965,6 @@ static ssize_t mem_write(struct file * file, const char * buf, } *ppos = dst; free_page((unsigned long) page); -out: - put_task_struct(task); -out_no_task: return copied; } #endif @@ -897,18 +995,13 @@ static struct file_operations proc_mem_operations = { static ssize_t oom_adjust_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); - char buffer[PROC_NUMBUF]; + struct task_struct *task = proc_task(file->f_dentry->d_inode); + char buffer[8]; size_t len; - int oom_adjust; + int oom_adjust = task->oomkilladj; loff_t __ppos = *ppos; - if (!task) - return -ESRCH; - oom_adjust = task->oomkilladj; - put_task_struct(task); - - len = snprintf(buffer, sizeof(buffer), "%i\n", oom_adjust); + len = sprintf(buffer, "%i\n", oom_adjust); if (__ppos >= len) return 0; if (count > len-__ppos) @@ -922,15 +1015,15 @@ static ssize_t oom_adjust_read(struct file *file, char __user *buf, static ssize_t oom_adjust_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct task_struct *task; - char buffer[PROC_NUMBUF], *end; + struct task_struct *task = proc_task(file->f_dentry->d_inode); + char buffer[8], *end; int oom_adjust; if (!capable(CAP_SYS_RESOURCE)) return -EPERM; - memset(buffer, 0, sizeof(buffer)); - if (count > sizeof(buffer) - 1) - count = sizeof(buffer) - 1; + memset(buffer, 0, 8); + if (count > 6) + count = 6; if (copy_from_user(buffer, buf, count)) return -EFAULT; oom_adjust = simple_strtol(buffer, &end, 0); @@ -938,11 +1031,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, return -EINVAL; if (*end == '\n') end++; - task = get_proc_task(file->f_dentry->d_inode); - if (!task) - return -ESRCH; task->oomkilladj = oom_adjust; - put_task_struct(task); if (end - buffer == 0) return -EIO; return end - buffer; @@ -953,21 +1042,23 @@ static struct file_operations proc_oom_adjust_operations = { .write = oom_adjust_write, }; +static struct inode_operations proc_mem_inode_operations = { + .permission = proc_permission, + .setattr = proc_setattr, +}; + #ifdef CONFIG_AUDITSYSCALL #define TMPBUFLEN 21 static ssize_t proc_loginuid_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { struct inode * inode = file->f_dentry->d_inode; - struct task_struct *task = get_proc_task(inode); + struct task_struct *task = proc_task(inode); ssize_t length; char tmpbuf[TMPBUFLEN]; - if (!task) - return -ESRCH; length = scnprintf(tmpbuf, TMPBUFLEN, "%u", audit_get_loginuid(task->audit_context)); - put_task_struct(task); return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); } @@ -977,16 +1068,17 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf, struct inode * inode = file->f_dentry->d_inode; char *page, *tmp; ssize_t length; + struct task_struct *task = proc_task(inode); uid_t loginuid; if (!capable(CAP_AUDIT_CONTROL)) return -EPERM; - if (current != pid_task(proc_pid(inode), PIDTYPE_PID)) + if (current != task) return -EPERM; - if (count >= PAGE_SIZE) - count = PAGE_SIZE - 1; + if (count > PAGE_SIZE) + count = PAGE_SIZE; if (*ppos != 0) { /* No partial writes. */ @@ -999,14 +1091,13 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf, if (copy_from_user(page, buf, count)) goto out_free_page; - page[count] = '\0'; loginuid = simple_strtoul(page, &tmp, 10); if (tmp == page) { length = -EINVAL; goto out_free_page; } - length = audit_set_loginuid(current, loginuid); + length = audit_set_loginuid(task, loginuid); if (likely(length == 0)) length = count; @@ -1025,16 +1116,13 @@ static struct file_operations proc_loginuid_operations = { static ssize_t seccomp_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct task_struct *tsk = get_proc_task(file->f_dentry->d_inode); + struct task_struct *tsk = proc_task(file->f_dentry->d_inode); char __buf[20]; loff_t __ppos = *ppos; size_t len; - if (!tsk) - return -ESRCH; /* no need to print the trailing zero, so use only len */ len = sprintf(__buf, "%u\n", tsk->seccomp.mode); - put_task_struct(tsk); if (__ppos >= len) return 0; if (count > len - __ppos) @@ -1048,43 +1136,29 @@ static ssize_t seccomp_read(struct file *file, char __user *buf, static ssize_t seccomp_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct task_struct *tsk = get_proc_task(file->f_dentry->d_inode); + struct task_struct *tsk = proc_task(file->f_dentry->d_inode); char __buf[20], *end; unsigned int seccomp_mode; - ssize_t result; - - result = -ESRCH; - if (!tsk) - goto out_no_task; /* can set it only once to be even more secure */ - result = -EPERM; if (unlikely(tsk->seccomp.mode)) - goto out; + return -EPERM; - result = -EFAULT; memset(__buf, 0, sizeof(__buf)); count = min(count, sizeof(__buf) - 1); if (copy_from_user(__buf, buf, count)) - goto out; - + return -EFAULT; seccomp_mode = simple_strtoul(__buf, &end, 0); if (*end == '\n') end++; - result = -EINVAL; if (seccomp_mode && seccomp_mode <= NR_SECCOMP_MODES) { tsk->seccomp.mode = seccomp_mode; set_tsk_thread_flag(tsk, TIF_SECCOMP); } else - goto out; - result = -EIO; + return -EINVAL; if (unlikely(!(end - __buf))) - goto out; - result = end - __buf; -out: - put_task_struct(tsk); -out_no_task: - return result; + return -EIO; + return end - __buf; } static struct file_operations proc_seccomp_operations = { @@ -1101,8 +1175,10 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd) /* We don't need a base pointer in the /proc filesystem */ path_release(nd); - /* Are we allowed to snoop on the tasks file descriptors? */ - if (!proc_fd_access_allowed(inode)) + if (current->fsuid != inode->i_uid && !capable(CAP_DAC_OVERRIDE)) + goto out; + error = proc_check_root(inode); + if (error) goto out; error = PROC_I(inode)->op.proc_get_link(inode, &nd->dentry, &nd->mnt); @@ -1144,8 +1220,12 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b struct dentry *de; struct vfsmount *mnt = NULL; - /* Are we allowed to snoop on the tasks file descriptors? */ - if (!proc_fd_access_allowed(inode)) + lock_kernel(); + + if (current->fsuid != inode->i_uid && !capable(CAP_DAC_OVERRIDE)) + goto out; + error = proc_check_root(inode); + if (error) goto out; error = PROC_I(inode)->op.proc_get_link(inode, &de, &mnt); @@ -1156,6 +1236,7 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b dput(de); mntput(mnt); out: + unlock_kernel(); return error; } @@ -1165,20 +1246,21 @@ static struct inode_operations proc_pid_link_inode_operations = { .setattr = proc_setattr, }; +#define NUMBUF 10 + static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) { - struct dentry *dentry = filp->f_dentry; - struct inode *inode = dentry->d_inode; - struct task_struct *p = get_proc_task(inode); + struct inode *inode = filp->f_dentry->d_inode; + struct task_struct *p = proc_task(inode); unsigned int fd, tid, ino; int retval; - char buf[PROC_NUMBUF]; + char buf[NUMBUF]; struct files_struct * files; struct fdtable *fdt; retval = -ENOENT; - if (!p) - goto out_no_task; + if (!pid_alive(p)) + goto out; retval = 0; tid = p->pid; @@ -1189,7 +1271,7 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) goto out; filp->f_pos++; case 1: - ino = parent_ino(dentry); + ino = fake_ino(tid, PROC_TID_INO); if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0) goto out; filp->f_pos++; @@ -1208,7 +1290,7 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) continue; rcu_read_unlock(); - j = PROC_NUMBUF; + j = NUMBUF; i = fd; do { j--; @@ -1217,7 +1299,7 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) } while (i); ino = fake_ino(tid, PROC_TID_FD_DIR + fd); - if (filldir(dirent, buf+j, PROC_NUMBUF-j, fd+2, ino, DT_LNK) < 0) { + if (filldir(dirent, buf+j, NUMBUF-j, fd+2, ino, DT_LNK) < 0) { rcu_read_lock(); break; } @@ -1227,8 +1309,6 @@ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) put_files_struct(files); } out: - put_task_struct(p); -out_no_task: return retval; } @@ -1240,18 +1320,16 @@ static int proc_pident_readdir(struct file *filp, int pid; struct dentry *dentry = filp->f_dentry; struct inode *inode = dentry->d_inode; - struct task_struct *task = get_proc_task(inode); struct pid_entry *p; ino_t ino; int ret, hide; ret = -ENOENT; - if (!task) + if (!pid_alive(proc_task(inode))) goto out; ret = 0; - pid = task->pid; - put_task_struct(task); + pid = proc_task(inode)->pid; i = filp->f_pos; switch (i) { case 0: @@ -1343,20 +1421,23 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st /* Common stuff */ ei = PROC_I(inode); + ei->task = NULL; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_ino = fake_ino(task->pid, ino); inode->i_op = &proc_def_inode_operations; + if (!pid_alive(task)) + goto out_unlock; + /* * grab the reference to task. */ - ei->pid = get_pid(task->pids[PIDTYPE_PID].pid); - if (!ei->pid) - goto out_unlock; - + get_task_struct(task); + ei->task = task; + ei->type = ino; inode->i_uid = 0; inode->i_gid = 0; - if (task_dumpable(task)) { + if (ino == PROC_TGID_INO || ino == PROC_TID_INO || task_dumpable(task)) { inode->i_uid = task->euid; inode->i_gid = task->egid; } @@ -1367,6 +1448,7 @@ out: return inode; out_unlock: + ei->pde = NULL; iput(inode); return NULL; } @@ -1380,29 +1462,18 @@ out_unlock: * * Rewrite the inode's ownerships here because the owning task may have * performed a setuid(), etc. - * - * Before the /proc/pid/status file was created the only way to read - * the effective uid of a /process was to stat /proc/pid. Reading - * /proc/pid/status is slow enough that procps and other packages - * kept stating /proc/pid. To keep the rules in /proc simple I have - * made this apply to all per process world readable and executable - * directories. */ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd) { struct inode *inode = dentry->d_inode; - struct task_struct *task = get_proc_task(inode); - int ret = 0; - - if (task) { - int pid = (inode->i_ino >> 16) & 0xFFFF; + struct task_struct *task = proc_task(inode); - if (!vx_proc_pid_visible(task, pid)) - goto out_drop; + if (!vx_check(vx_task_xid(task), VX_IDENT)) + goto out_drop; + /* discard wrong fakeinit */ - ret = 1; - if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) || - task_dumpable(task)) { + if (pid_alive(task)) { + if (proc_type(inode) == PROC_TGID_INO || proc_type(inode) == PROC_TID_INO || task_dumpable(task)) { inode->i_uid = task->euid; inode->i_gid = task->egid; } else { @@ -1411,79 +1482,61 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd) } inode->i_mode &= ~(S_ISUID | S_ISGID); security_task_to_inode(task, inode); - goto out_put; + return 1; } out_drop: d_drop(dentry); -out_put: - if (task) - put_task_struct(task); - return ret; -} - -static int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -{ - struct inode *inode = dentry->d_inode; - struct task_struct *task; - generic_fillattr(inode, stat); - - rcu_read_lock(); - stat->uid = 0; - stat->gid = 0; - task = pid_task(proc_pid(inode), PIDTYPE_PID); - if (task) { - if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) || - task_dumpable(task)) { - stat->uid = task->euid; - stat->gid = task->egid; - } - } - rcu_read_unlock(); return 0; } static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd) { struct inode *inode = dentry->d_inode; - struct task_struct *task = get_proc_task(inode); - int fd = proc_fd(inode); + struct task_struct *task = proc_task(inode); + int fd = proc_type(inode) - PROC_TID_FD_DIR; struct files_struct *files; - if (task) { - files = get_files_struct(task); - if (files) { - rcu_read_lock(); - if (fcheck_files(files, fd)) { - rcu_read_unlock(); - put_files_struct(files); - if (task_dumpable(task)) { - inode->i_uid = task->euid; - inode->i_gid = task->egid; - } else { - inode->i_uid = 0; - inode->i_gid = 0; - } - inode->i_mode &= ~(S_ISUID | S_ISGID); - security_task_to_inode(task, inode); - put_task_struct(task); - return 1; - } + files = get_files_struct(task); + if (files) { + rcu_read_lock(); + if (fcheck_files(files, fd)) { rcu_read_unlock(); put_files_struct(files); + if (task_dumpable(task)) { + inode->i_uid = task->euid; + inode->i_gid = task->egid; + } else { + inode->i_uid = 0; + inode->i_gid = 0; + } + inode->i_mode &= ~(S_ISUID | S_ISGID); + security_task_to_inode(task, inode); + return 1; } - put_task_struct(task); + rcu_read_unlock(); + put_files_struct(files); } d_drop(dentry); return 0; } +static void pid_base_iput(struct dentry *dentry, struct inode *inode) +{ + struct task_struct *task = proc_task(inode); + spin_lock(&task->proc_lock); + if (task->proc_dentry == dentry) + task->proc_dentry = NULL; + spin_unlock(&task->proc_lock); + iput(inode); +} + static int pid_delete_dentry(struct dentry * dentry) { /* Is the task we represent dead? * If so, then don't put the dentry on the lru list, * kill it immediately. */ - return !proc_pid(dentry->d_inode)->tasks[PIDTYPE_PID].first; + return !pid_alive(proc_task(dentry->d_inode)); } static struct dentry_operations tid_fd_dentry_operations = @@ -1498,6 +1551,13 @@ static struct dentry_operations pid_dentry_operations = .d_delete = pid_delete_dentry, }; +static struct dentry_operations pid_base_dentry_operations = +{ + .d_revalidate = pid_revalidate, + .d_iput = pid_base_iput, + .d_delete = pid_delete_dentry, +}; + /* Lookups */ static unsigned name_to_int(struct dentry *dentry) @@ -1525,24 +1585,22 @@ out: /* SMP-safe */ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry, struct nameidata *nd) { - struct task_struct *task = get_proc_task(dir); + struct task_struct *task = proc_task(dir); unsigned fd = name_to_int(dentry); - struct dentry *result = ERR_PTR(-ENOENT); struct file * file; struct files_struct * files; struct inode *inode; struct proc_inode *ei; - if (!task) - goto out_no_task; if (fd == ~0U) goto out; + if (!pid_alive(task)) + goto out; inode = proc_pid_make_inode(dir->i_sb, task, PROC_TID_FD_DIR+fd); if (!inode) goto out; ei = PROC_I(inode); - ei->fd = fd; files = get_files_struct(task); if (!files) goto out_unlock; @@ -1567,25 +1625,19 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry, ei->op.proc_get_link = proc_fd_link; dentry->d_op = &tid_fd_dentry_operations; d_add(dentry, inode); - /* Close the race of the process dying before we return the dentry */ - if (tid_fd_revalidate(dentry, NULL)) - result = NULL; -out: - put_task_struct(task); -out_no_task: - return result; + return NULL; out_unlock2: spin_unlock(&files->file_lock); put_files_struct(files); out_unlock: iput(inode); - goto out; +out: + return ERR_PTR(-ENOENT); } static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir); static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd); -static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat); static struct file_operations proc_fd_operations = { .read = generic_read_dir, @@ -1602,12 +1654,13 @@ static struct file_operations proc_task_operations = { */ static struct inode_operations proc_fd_inode_operations = { .lookup = proc_lookupfd, + .permission = proc_permission, .setattr = proc_setattr, }; static struct inode_operations proc_task_inode_operations = { .lookup = proc_task_lookup, - .getattr = proc_task_getattr, + .permission = proc_task_permission, .setattr = proc_setattr, }; @@ -1618,17 +1671,12 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, struct inode * inode = file->f_dentry->d_inode; unsigned long page; ssize_t length; - struct task_struct *task = get_proc_task(inode); - - length = -ESRCH; - if (!task) - goto out_no_task; + struct task_struct *task = proc_task(inode); if (count > PAGE_SIZE) count = PAGE_SIZE; - length = -ENOMEM; if (!(page = __get_free_page(GFP_KERNEL))) - goto out; + return -ENOMEM; length = security_getprocattr(task, (char*)file->f_dentry->d_name.name, @@ -1636,9 +1684,6 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, if (length >= 0) length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); free_page(page); -out: - put_task_struct(task); -out_no_task: return length; } @@ -1648,36 +1693,26 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, struct inode * inode = file->f_dentry->d_inode; char *page; ssize_t length; - struct task_struct *task = get_proc_task(inode); + struct task_struct *task = proc_task(inode); - length = -ESRCH; - if (!task) - goto out_no_task; if (count > PAGE_SIZE) count = PAGE_SIZE; - - /* No partial writes. */ - length = -EINVAL; - if (*ppos != 0) - goto out; - - length = -ENOMEM; + if (*ppos != 0) { + /* No partial writes. */ + return -EINVAL; + } page = (char*)__get_free_page(GFP_USER); if (!page) - goto out; - + return -ENOMEM; length = -EFAULT; if (copy_from_user(page, buf, count)) - goto out_free; + goto out; length = security_setprocattr(task, (char*)file->f_dentry->d_name.name, (void*)page, count); -out_free: - free_page((unsigned long) page); out: - put_task_struct(task); -out_no_task: + free_page((unsigned long) page); return length; } @@ -1695,8 +1730,7 @@ static struct inode_operations proc_tgid_attr_inode_operations; extern int proc_pid_vx_info(struct task_struct *, char *); extern int proc_pid_nx_info(struct task_struct *, char *); -extern int proc_pid_vx_info(struct task_struct *, char *); -extern int proc_pid_nx_info(struct task_struct *, char *); +static int get_tid_list(int index, unsigned int *tids, struct inode *dir); /* SMP-safe */ static struct dentry *proc_pident_lookup(struct inode *dir, @@ -1704,16 +1738,16 @@ static struct dentry *proc_pident_lookup(struct inode *dir, struct pid_entry *ents) { struct inode *inode; - struct dentry *error; - struct task_struct *task = get_proc_task(dir); + int error; + struct task_struct *task = proc_task(dir); struct pid_entry *p; struct proc_inode *ei; - error = ERR_PTR(-ENOENT); + error = -ENOENT; inode = NULL; - if (!task) - goto out_no_task; + if (!pid_alive(task)) + goto out; for (p = ents; p->name; p++) { if (p->len != dentry->d_name.len) @@ -1724,18 +1758,7 @@ static struct dentry *proc_pident_lookup(struct inode *dir, if (!p->name) goto out; - switch(p->type) { - case PROC_TID_VX_INFO: - case PROC_TGID_VX_INFO: - case PROC_TID_IP_INFO: - case PROC_TGID_IP_INFO: - if (task_vx_flags(task, VXF_INFO_HIDE, 0)) - goto out; - default: - break; - } - - error = ERR_PTR(-EINVAL); + error = -EINVAL; inode = proc_pid_make_inode(dir->i_sb, task, p->type); if (!inode) goto out; @@ -1748,7 +1771,7 @@ static struct dentry *proc_pident_lookup(struct inode *dir, */ switch(p->type) { case PROC_TGID_TASK: - inode->i_nlink = 2; + inode->i_nlink = 2 + get_tid_list(2, NULL, dir); inode->i_op = &proc_task_inode_operations; inode->i_fop = &proc_task_operations; break; @@ -1818,6 +1841,7 @@ static struct dentry *proc_pident_lookup(struct inode *dir, #endif case PROC_TID_MEM: case PROC_TGID_MEM: + inode->i_op = &proc_mem_inode_operations; inode->i_fop = &proc_mem_operations; break; #ifdef CONFIG_SECCOMP @@ -1859,10 +1883,6 @@ static struct dentry *proc_pident_lookup(struct inode *dir, case PROC_TGID_ATTR_EXEC: case PROC_TID_ATTR_FSCREATE: case PROC_TGID_ATTR_FSCREATE: - case PROC_TID_ATTR_KEYCREATE: - case PROC_TGID_ATTR_KEYCREATE: - case PROC_TID_ATTR_SOCKCREATE: - case PROC_TGID_ATTR_SOCKCREATE: inode->i_fop = &proc_pid_attr_operations; break; #endif @@ -1903,29 +1923,33 @@ static struct dentry *proc_pident_lookup(struct inode *dir, #endif case PROC_TID_VX_INFO: case PROC_TGID_VX_INFO: + if (task_vx_flags(task, VXF_INFO_HIDE, 0)) + goto out_noent; inode->i_fop = &proc_info_file_operations; ei->op.proc_read = proc_pid_vx_info; break; case PROC_TID_IP_INFO: case PROC_TGID_IP_INFO: + if (task_vx_flags(task, VXF_INFO_HIDE, 0)) + goto out_noent; inode->i_fop = &proc_info_file_operations; ei->op.proc_read = proc_pid_nx_info; break; default: printk("procfs: impossible type (%d)",p->type); - iput(inode); - error = ERR_PTR(-EINVAL); - goto out; + error = -EINVAL; + goto out_put; } dentry->d_op = &pid_dentry_operations; d_add(dentry, inode); - /* Close the race of the process dying before we return the dentry */ - if (pid_revalidate(dentry, NULL)) - error = NULL; + return NULL; + +out_noent: + error=-ENOENT; +out_put: + iput(inode); out: - put_task_struct(task); -out_no_task: - return error; + return ERR_PTR(error); } static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ @@ -1948,13 +1972,11 @@ static struct file_operations proc_tid_base_operations = { static struct inode_operations proc_tgid_base_inode_operations = { .lookup = proc_tgid_base_lookup, - .getattr = pid_getattr, .setattr = proc_setattr, }; static struct inode_operations proc_tid_base_inode_operations = { .lookup = proc_tid_base_lookup, - .getattr = pid_getattr, .setattr = proc_setattr, }; @@ -1997,13 +2019,11 @@ static struct dentry *proc_tid_attr_lookup(struct inode *dir, static struct inode_operations proc_tgid_attr_inode_operations = { .lookup = proc_tgid_attr_lookup, - .getattr = pid_getattr, .setattr = proc_setattr, }; static struct inode_operations proc_tid_attr_inode_operations = { .lookup = proc_tid_attr_lookup, - .getattr = pid_getattr, .setattr = proc_setattr, }; #endif @@ -2014,14 +2034,14 @@ static struct inode_operations proc_tid_attr_inode_operations = { static int proc_self_readlink(struct dentry *dentry, char __user *buffer, int buflen) { - char tmp[PROC_NUMBUF]; + char tmp[30]; sprintf(tmp, "%d", vx_map_tgid(current->tgid)); return vfs_readlink(dentry,buffer,buflen,tmp); } static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) { - char tmp[PROC_NUMBUF]; + char tmp[30]; sprintf(tmp, "%d", vx_map_tgid(current->tgid)); return ERR_PTR(vfs_follow_link(nd,tmp)); } @@ -2029,83 +2049,85 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) static struct inode_operations proc_self_inode_operations = { .readlink = proc_self_readlink, .follow_link = proc_self_follow_link, + .setattr = proc_setattr, }; /** - * proc_flush_task - Remove dcache entries for @task from the /proc dcache. + * proc_pid_unhash - Unhash /proc/@pid entry from the dcache. + * @p: task that should be flushed. * - * @task: task that should be flushed. + * Drops the /proc/@pid dcache entry from the hash chains. * - * Looks in the dcache for - * /proc/@pid - * /proc/@tgid/task/@pid - * if either directory is present flushes it and all of it'ts children - * from the dcache. - * - * It is safe and reasonable to cache /proc entries for a task until - * that task exits. After that they just clog up the dcache with - * useless entries, possibly causing useful dcache entries to be - * flushed instead. This routine is proved to flush those useless - * dcache entries at process exit time. - * - * NOTE: This routine is just an optimization so it does not guarantee - * that no dcache entries will exist at process exit time it - * just makes it very unlikely that any will persist. + * Dropping /proc/@pid entries and detach_pid must be synchroneous, + * otherwise e.g. /proc/@pid/exe might point to the wrong executable, + * if the pid value is immediately reused. This is enforced by + * - caller must acquire spin_lock(p->proc_lock) + * - must be called before detach_pid() + * - proc_pid_lookup acquires proc_lock, and checks that + * the target is not dead by looking at the attach count + * of PIDTYPE_PID. */ -void proc_flush_task(struct task_struct *task) + +struct dentry *proc_pid_unhash(struct task_struct *p) { - struct dentry *dentry, *leader, *dir; - char buf[PROC_NUMBUF]; - struct qstr name; - - name.name = buf; - name.len = snprintf(buf, sizeof(buf), "%d", task->pid); - dentry = d_hash_and_lookup(proc_mnt->mnt_root, &name); - if (dentry) { - shrink_dcache_parent(dentry); - d_drop(dentry); - dput(dentry); - } + struct dentry *proc_dentry; - if (thread_group_leader(task)) - goto out; + proc_dentry = p->proc_dentry; + if (proc_dentry != NULL) { - name.name = buf; - name.len = snprintf(buf, sizeof(buf), "%d", task->tgid); - leader = d_hash_and_lookup(proc_mnt->mnt_root, &name); - if (!leader) - goto out; + spin_lock(&dcache_lock); + spin_lock(&proc_dentry->d_lock); + if (!d_unhashed(proc_dentry)) { + dget_locked(proc_dentry); + __d_drop(proc_dentry); + spin_unlock(&proc_dentry->d_lock); + } else { + spin_unlock(&proc_dentry->d_lock); + proc_dentry = NULL; + } + spin_unlock(&dcache_lock); + } + return proc_dentry; +} - name.name = "task"; - name.len = strlen(name.name); - dir = d_hash_and_lookup(leader, &name); - if (!dir) - goto out_put_leader; - - name.name = buf; - name.len = snprintf(buf, sizeof(buf), "%d", task->pid); - dentry = d_hash_and_lookup(dir, &name); - if (dentry) { - shrink_dcache_parent(dentry); - d_drop(dentry); - dput(dentry); +/** + * proc_pid_flush - recover memory used by stale /proc/@pid/x entries + * @proc_dentry: directoy to prune. + * + * Shrink the /proc directory that was used by the just killed thread. + */ + +void proc_pid_flush(struct dentry *proc_dentry) +{ + might_sleep(); + if(proc_dentry != NULL) { + shrink_dcache_parent(proc_dentry); + dput(proc_dentry); } +} - dput(dir); -out_put_leader: - dput(leader); -out: - return; +#define VXF_FAKE_INIT (VXF_INFO_INIT|VXF_STATE_INIT) + +static inline int proc_pid_visible(struct task_struct *task, int pid) +{ + if ((pid == 1) && + !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT)) + goto visible; + if (vx_check(vx_task_xid(task), VX_WATCH|VX_IDENT)) + goto visible; + return 0; +visible: + return 1; } /* SMP-safe */ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) { - struct dentry *result = ERR_PTR(-ENOENT); struct task_struct *task; 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); @@ -2126,17 +2148,21 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct if (tgid == ~0U) goto out; - rcu_read_lock(); - task = vx_find_proc_task_by_pid(tgid); + read_lock(&tasklist_lock); + task = find_task_by_pid(tgid); if (task) get_task_struct(task); - rcu_read_unlock(); + read_unlock(&tasklist_lock); if (!task) goto out; + /* check for context visibility */ + if (!proc_pid_visible(task, tgid)) + goto out_drop_task; + inode = proc_pid_make_inode(dir->i_sb, task, PROC_TGID_INO); if (!inode) - goto out_put_task; + goto out_drop_task; inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO; inode->i_op = &proc_tgid_base_inode_operations; @@ -2148,52 +2174,62 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct inode->i_nlink = 4; #endif - dentry->d_op = &pid_dentry_operations; + dentry->d_op = &pid_base_dentry_operations; + died = 0; d_add(dentry, inode); - /* Close the race of the process dying before we return the dentry */ - if (pid_revalidate(dentry, NULL)) - result = NULL; + spin_lock(&task->proc_lock); + task->proc_dentry = dentry; + if (!pid_alive(task)) { + dentry = proc_pid_unhash(task); + died = 1; + } + spin_unlock(&task->proc_lock); -out_put_task: + put_task_struct(task); + if (died) { + proc_pid_flush(dentry); + goto out; + } + return NULL; +out_drop_task: put_task_struct(task); out: - return result; + return ERR_PTR(-ENOENT); } /* SMP-safe */ static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) { - struct dentry *result = ERR_PTR(-ENOENT); struct task_struct *task; - struct task_struct *leader = get_proc_task(dir); + struct task_struct *leader = proc_task(dir); struct inode *inode; unsigned tid; - if (!leader) - goto out_no_task; - tid = name_to_int(dentry); if (tid == ~0U) goto out; if (vx_current_initpid(tid)) goto out; - rcu_read_lock(); - task = vx_find_proc_task_by_pid(tid); + read_lock(&tasklist_lock); + task = find_task_by_pid(tid); if (task) get_task_struct(task); - rcu_read_unlock(); + read_unlock(&tasklist_lock); if (!task) goto out; if (leader->tgid != task->tgid) goto out_drop_task; - inode = proc_pid_make_inode(dir->i_sb, task, PROC_TID_INO); - + /* check for context visibility */ + if (!proc_pid_visible(task, tid)) + goto out_drop_task; + inode = proc_pid_make_inode(dir->i_sb, task, PROC_TID_INO); if (!inode) goto out_drop_task; + inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO; inode->i_op = &proc_tid_base_inode_operations; inode->i_fop = &proc_tid_base_operations; @@ -2204,95 +2240,108 @@ static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry inode->i_nlink = 3; #endif - dentry->d_op = &pid_dentry_operations; + dentry->d_op = &pid_base_dentry_operations; d_add(dentry, inode); - /* Close the race of the process dying before we return the dentry */ - if (pid_revalidate(dentry, NULL)) - result = NULL; + put_task_struct(task); + return NULL; out_drop_task: put_task_struct(task); out: - put_task_struct(leader); -out_no_task: - return result; + return ERR_PTR(-ENOENT); } +#define PROC_NUMBUF 10 +#define PROC_MAXPIDS 20 + /* - * Find the first tgid to return to user space. - * - * Usually this is just whatever follows &init_task, but if the users - * buffer was too small to hold the full list or there was a seek into - * the middle of the directory we have more work to do. - * - * In the case of a short read we start with find_task_by_pid. - * - * In the case of a seek we start with &init_task and walk nr - * threads past it. + * Get a few tgid's to return for filldir - we need to hold the + * tasklist lock while doing this, and we must release it before + * we actually do the filldir itself, so we use a temp buffer.. */ -static struct task_struct *first_tgid(int tgid, unsigned int nr) -{ - struct task_struct *pos; - rcu_read_lock(); - if (tgid && nr) { - pos = vx_find_proc_task_by_pid(tgid); - if (pos && thread_group_leader(pos)) - goto found; +static int get_tgid_list(int index, unsigned long version, unsigned int *tgids) +{ + struct task_struct *p; + int nr_tgids = 0; + + index--; + read_lock(&tasklist_lock); + p = NULL; + if (version) { + p = find_task_by_real_pid(version); + if (p && !thread_group_leader(p)) + p = NULL; } - /* If nr exceeds the number of processes get out quickly */ - pos = NULL; - if (nr && nr >= nr_processes()) - goto done; - /* If we haven't found our starting place yet start with - * the init_task and walk nr tasks forward. - */ - for (pos = next_task(&init_task); nr > 0; --nr) { - pos = next_task(pos); - if (pos == &init_task) { - pos = NULL; - goto done; - } + if (p) + index = 0; + else + p = next_task(&init_task); + + for ( ; p != &init_task; p = next_task(p)) { + int tgid = p->pid; + + if (!pid_alive(p)) + continue; + /* check for context visibility */ + if (!proc_pid_visible(p, tgid)) + continue; + if (--index >= 0) + continue; + tgids[nr_tgids] = vx_map_tgid(tgid); + nr_tgids++; + if (nr_tgids >= PROC_MAXPIDS) + break; } -found: - get_task_struct(pos); -done: - rcu_read_unlock(); - return pos; + read_unlock(&tasklist_lock); + return nr_tgids; } /* - * Find the next task in the task list. - * Return NULL if we loop or there is any error. - * - * The reference to the input task_struct is released. + * Get a few tid's to return for filldir - we need to hold the + * tasklist lock while doing this, and we must release it before + * we actually do the filldir itself, so we use a temp buffer.. */ -static struct task_struct *next_tgid(struct task_struct *start) -{ - struct task_struct *pos; - rcu_read_lock(); - pos = start; - if (pid_alive(start)) - pos = next_task(start); - if (pid_alive(pos) && (pos != &init_task)) { - get_task_struct(pos); - goto done; - } - pos = NULL; -done: - rcu_read_unlock(); - put_task_struct(start); - return pos; +static int get_tid_list(int index, unsigned int *tids, struct inode *dir) +{ + struct task_struct *leader_task = proc_task(dir); + struct task_struct *task = leader_task; + int nr_tids = 0; + + index -= 2; + read_lock(&tasklist_lock); + /* + * The starting point task (leader_task) might be an already + * unlinked task, which cannot be used to access the task-list + * via next_thread(). + */ + if (pid_alive(task)) do { + int tid = task->pid; + + /* check for context visibility */ + if (!proc_pid_visible(task, tid)) + continue; + if (--index >= 0) + continue; + if (tids != NULL) + tids[nr_tids] = vx_map_pid(tid); + nr_tids++; + if (nr_tids >= PROC_MAXPIDS) + break; + } while ((task = next_thread(task)) != leader_task); + read_unlock(&tasklist_lock); + return nr_tids; } /* for the /proc/ directory itself, after non-process stuff has been done */ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) { + unsigned int tgid_array[PROC_MAXPIDS]; char buf[PROC_NUMBUF]; unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; - struct task_struct *task; - int tgid; + unsigned int nr_tgids, i; + int next_tgid; if (!nr) { ino_t ino = fake_ino(0,PROC_TGID_INO); @@ -2301,119 +2350,66 @@ int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) filp->f_pos++; nr++; } - nr -= 1; /* f_version caches the tgid value that the last readdir call couldn't * return. lseek aka telldir automagically resets f_version to 0. */ - tgid = filp->f_version; + next_tgid = filp->f_version; filp->f_version = 0; - for (task = first_tgid(tgid, nr); - task; - task = next_tgid(task), filp->f_pos++) { - int len; - ino_t ino; - tgid = vx_map_tgid(task->pid); - if (!vx_proc_pid_visible(task, tgid)) - continue; - - len = snprintf(buf, sizeof(buf), "%d", tgid); - ino = fake_ino(tgid, PROC_TGID_INO); - if (filldir(dirent, buf, len, filp->f_pos, ino, DT_DIR) < 0) { - /* returning this tgid failed, save it as the first - * pid for the next readir call */ - filp->f_version = tgid; - put_task_struct(task); + for (;;) { + nr_tgids = get_tgid_list(nr, next_tgid, tgid_array); + if (!nr_tgids) { + /* no more entries ! */ break; } - } - return 0; -} + next_tgid = 0; -/* - * Find the first tid of a thread group to return to user space. - * - * Usually this is just the thread group leader, but if the users - * buffer was too small or there was a seek into the middle of the - * directory we have more work todo. - * - * In the case of a short read we start with find_task_by_pid. - * - * In the case of a seek we start with the leader and walk nr - * threads past it. - */ -static struct task_struct *first_tid(struct task_struct *leader, - int tid, int nr) -{ - struct task_struct *pos; + /* do not use the last found pid, reserve it for next_tgid */ + if (nr_tgids == PROC_MAXPIDS) { + nr_tgids--; + next_tgid = tgid_array[nr_tgids]; + } - rcu_read_lock(); - /* Attempt to start with the pid of a thread */ - if (tid && (nr > 0)) { - pos = vx_find_proc_task_by_pid(tid); - if (pos && (pos->group_leader == leader)) - goto found; - } + for (i=0;i= get_nr_threads(leader)) - goto out; + do + buf[--j] = '0' + (tgid % 10); + while ((tgid /= 10) != 0); - /* If we haven't found our starting place yet start - * with the leader and walk nr threads forward. - */ - for (pos = leader; nr > 0; --nr) { - pos = next_thread(pos); - if (pos == leader) { - pos = NULL; - goto out; + if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, ino, DT_DIR) < 0) { + /* returning this tgid failed, save it as the first + * pid for the next readir call */ + filp->f_version = tgid_array[i]; + goto out; + } + filp->f_pos++; + nr++; } } -found: - get_task_struct(pos); out: - rcu_read_unlock(); - return pos; -} - -/* - * Find the next thread in the thread list. - * Return NULL if there is an error or no next thread. - * - * The reference to the input task_struct is released. - */ -static struct task_struct *next_tid(struct task_struct *start) -{ - struct task_struct *pos = NULL; - rcu_read_lock(); - if (pid_alive(start)) { - pos = next_thread(start); - if (thread_group_leader(pos)) - pos = NULL; - else - get_task_struct(pos); - } - rcu_read_unlock(); - put_task_struct(start); - return pos; + return 0; } /* for the /proc/TGID/task/ directories */ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir) { + unsigned int tid_array[PROC_MAXPIDS]; char buf[PROC_NUMBUF]; + unsigned int nr_tids, i; struct dentry *dentry = filp->f_dentry; struct inode *inode = dentry->d_inode; - struct task_struct *leader = get_proc_task(inode); - struct task_struct *task; + struct task_struct *task = proc_task(inode); int retval = -ENOENT; ino_t ino; - int tid; unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */ - if (!leader) - goto out_no_task; + if (!vx_check(vx_task_xid(task), VX_WATCH|VX_IDENT)) + goto out; + if (!pid_alive(task)) + goto out; retval = 0; switch (pos) { @@ -2431,48 +2427,24 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi /* fall through */ } - /* f_version caches the tgid value that the last readdir call couldn't - * return. lseek aka telldir automagically resets f_version to 0. - */ - tid = filp->f_version; - filp->f_version = 0; - for (task = first_tid(leader, tid, pos - 2); - task; - task = next_tid(task), pos++) { - int len; - tid = vx_map_pid(task->pid); - if (!vx_proc_pid_visible(task, tid)) - continue; + nr_tids = get_tid_list(pos, tid_array, inode); + inode->i_nlink = pos + nr_tids; + + for (i = 0; i < nr_tids; i++) { + unsigned long j = PROC_NUMBUF; + int tid = tid_array[i]; + + ino = fake_ino(tid,PROC_TID_INO); + + do + buf[--j] = '0' + (tid % 10); + while ((tid /= 10) != 0); - len = snprintf(buf, sizeof(buf), "%d", tid); - ino = fake_ino(tid, PROC_TID_INO); - if (filldir(dirent, buf, len, pos, ino, DT_DIR < 0)) { - /* returning this tgid failed, save it as the first - * pid for the next readir call */ - filp->f_version = tid; - put_task_struct(task); + if (filldir(dirent, buf+j, PROC_NUMBUF-j, pos, ino, DT_DIR) < 0) break; - } + pos++; } out: filp->f_pos = pos; - put_task_struct(leader); -out_no_task: return retval; } - -static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) -{ - struct inode *inode = dentry->d_inode; - struct task_struct *p = get_proc_task(inode); - generic_fillattr(inode, stat); - - if (p) { - rcu_read_lock(); - stat->nlink += get_nr_threads(p); - rcu_read_unlock(); - put_task_struct(p); - } - - return 0; -} diff --git a/fs/proc/inode.c b/fs/proc/inode.c index b1f53f47a..2120c8090 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -58,11 +58,14 @@ static void de_put(struct proc_dir_entry *de) static void proc_delete_inode(struct inode *inode) { struct proc_dir_entry *de; + struct task_struct *tsk; truncate_inode_pages(&inode->i_data, 0); - /* Stop tracking associated processes */ - put_pid(PROC_I(inode)->pid); + /* Let go of any associated process */ + tsk = PROC_I(inode)->task; + if (tsk) + put_task_struct(tsk); /* Let go of any associated proc directory entry */ de = PROC_I(inode)->pde; @@ -91,8 +94,8 @@ static struct inode *proc_alloc_inode(struct super_block *sb) ei = (struct proc_inode *)kmem_cache_alloc(proc_inode_cachep, SLAB_KERNEL); if (!ei) return NULL; - ei->pid = NULL; - ei->fd = 0; + ei->task = NULL; + ei->type = 0; ei->op.proc_get_link = NULL; ei->pde = NULL; inode = &ei->vfs_inode; @@ -194,7 +197,7 @@ int proc_fill_super(struct super_block *s, void *data, int silent) { struct inode * root_inode; - s->s_flags |= MS_NODIRATIME | MS_NOSUID | MS_NOEXEC; + s->s_flags |= MS_NODIRATIME; s->s_blocksize = 1024; s->s_blocksize_bits = 10; s->s_magic = PROC_SUPER_MAGIC; diff --git a/fs/proc/internal.h b/fs/proc/internal.h index b68867436..cd172cea2 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -10,10 +10,6 @@ */ #include -#include -#include -#include -#include struct vmalloc_info { unsigned long used; @@ -43,30 +39,16 @@ extern int proc_tgid_stat(struct task_struct *, char *); extern int proc_pid_status(struct task_struct *, char *); extern int proc_pid_statm(struct task_struct *, char *); -extern struct file_operations proc_maps_operations; -extern struct file_operations proc_numa_maps_operations; -extern struct file_operations proc_smaps_operations; - -extern struct file_operations proc_maps_operations; -extern struct file_operations proc_numa_maps_operations; -extern struct file_operations proc_smaps_operations; - - void free_proc_entry(struct proc_dir_entry *de); int proc_init_inodecache(void); -static inline struct pid *proc_pid(struct inode *inode) -{ - return PROC_I(inode)->pid; -} - -static inline struct task_struct *get_proc_task(struct inode *inode) +static inline struct task_struct *proc_task(struct inode *inode) { - return vx_get_proc_task(inode, proc_pid(inode)); + return PROC_I(inode)->task; } -static inline int proc_fd(struct inode *inode) +static inline int proc_type(struct inode *inode) { - return PROC_I(inode)->fd; + return PROC_I(inode)->type; } diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 150d9c5f1..5c08a9c55 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -9,6 +9,7 @@ * Safe accesses to vmalloc/direct-mapped discontiguous areas, Kanoj Sarcar */ +#include #include #include #include @@ -42,6 +43,8 @@ const struct file_operations proc_kcore_operations = { #define kc_offset_to_vaddr(o) ((o) + PAGE_OFFSET) #endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + /* An ELF note in memory */ struct memelfnote { @@ -382,7 +385,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) */ if (n) { if (clear_user(buffer + tsz - n, - n)) + tsz - n)) return -EFAULT; } } else { diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index f8eebe6c7..16271a10a 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +53,8 @@ #include #include "internal.h" +#include + #define LOAD_INT(x) ((x) >> FSHIFT) #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) /* @@ -137,6 +140,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, { struct sysinfo i; int len; + struct page_state ps; unsigned long inactive; unsigned long active; unsigned long free; @@ -145,6 +149,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, struct vmalloc_info vmi; long cached; + get_page_state(&ps); get_zone_counts(&active, &inactive, &free); /* @@ -157,8 +162,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, allowed = ((totalram_pages - hugetlb_total_pages()) * sysctl_overcommit_ratio / 100) + total_swap_pages; - cached = global_page_state(NR_FILE_PAGES) - - total_swapcache_pages - i.bufferram; + cached = get_page_cache_size() - total_swapcache_pages - i.bufferram; if (cached < 0 || vx_flags(VXF_VIRT_MEM, 0)) cached = 0; @@ -183,14 +187,11 @@ static int meminfo_read_proc(char *page, char **start, off_t off, "SwapFree: %8lu kB\n" "Dirty: %8lu kB\n" "Writeback: %8lu kB\n" - "AnonPages: %8lu kB\n" "Mapped: %8lu kB\n" "Slab: %8lu kB\n" - "PageTables: %8lu kB\n" - "NFS_Unstable: %8lu kB\n" - "Bounce: %8lu kB\n" "CommitLimit: %8lu kB\n" "Committed_AS: %8lu kB\n" + "PageTables: %8lu kB\n" "VmallocTotal: %8lu kB\n" "VmallocUsed: %8lu kB\n" "VmallocChunk: %8lu kB\n", @@ -207,16 +208,13 @@ static int meminfo_read_proc(char *page, char **start, off_t off, K(i.freeram-i.freehigh), K(i.totalswap), K(i.freeswap), - K(global_page_state(NR_FILE_DIRTY)), - K(global_page_state(NR_WRITEBACK)), - K(global_page_state(NR_ANON_PAGES)), - K(global_page_state(NR_FILE_MAPPED)), - K(global_page_state(NR_SLAB)), - K(global_page_state(NR_PAGETABLE)), - K(global_page_state(NR_UNSTABLE_NFS)), - K(global_page_state(NR_BOUNCE)), + K(ps.nr_dirty), + K(ps.nr_writeback), + K(ps.nr_mapped), + K(ps.nr_slab), K(allowed), K(committed), + K(ps.nr_page_table_pages), (unsigned long)VMALLOC_TOTAL >> 10, vmi.used >> 10, vmi.largest_chunk >> 10 diff --git a/fs/proc/root.c b/fs/proc/root.c index 0aa9fc57d..307ba7be0 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -28,10 +29,10 @@ struct proc_dir_entry *proc_virtual; extern void proc_vx_init(void); -static int proc_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *proc_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, proc_fill_super, mnt); + return get_sb_single(fs_type, flags, data, proc_fill_super); } static struct file_system_type proc_fs_type = { diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index cdfef5698..34fbee766 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -85,13 +85,9 @@ int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount * { struct vm_area_struct * vma; int result = -ENOENT; - struct task_struct *task = get_proc_task(inode); - struct mm_struct * mm = NULL; + struct task_struct *task = proc_task(inode); + struct mm_struct * mm = get_task_mm(task); - if (task) { - mm = get_task_mm(task); - put_task_struct(task); - } if (!mm) goto out; down_read(&mm->mmap_sem); @@ -132,18 +128,9 @@ struct mem_size_stats unsigned long private_dirty; }; -__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma) -{ - return NULL; -} - static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats *mss) { - struct proc_maps_private *priv = m->private; - struct task_struct *task = priv->task; -#ifdef __i386__ - struct mm_struct *tmm = get_task_mm(task); -#endif + struct task_struct *task = m->private; struct vm_area_struct *vma = v; struct mm_struct *mm = vma->vm_mm; struct file *file = vma->vm_file; @@ -165,18 +152,14 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats flags & VM_WRITE ? 'w' : '-', (flags & VM_EXEC #ifdef __i386__ - || (!nx_enabled && tmm && - (vma->vm_start < tmm->context.exec_limit)) + || (!nx_enabled && + (vma->vm_start < task->mm->context.exec_limit)) #endif ) ? 'x' : '-', flags & VM_MAYSHARE ? 's' : 'p', vma->vm_pgoff << PAGE_SHIFT, MAJOR(dev), MINOR(dev), ino, &len); -#ifdef __i386__ - if (tmm) - mmput(tmm); -#endif /* * Print the dentry name for named mappings, and a @@ -186,23 +169,26 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats pad_len_spaces(m, len); seq_path(m, file->f_vfsmnt, file->f_dentry, "\n"); } else { - const char *name = arch_vma_name(vma); - if (!name) { - if (mm) { - if (vma->vm_start <= mm->start_brk && - vma->vm_end >= mm->brk) { - name = "[heap]"; - } else if (vma->vm_start <= mm->start_stack && - vma->vm_end >= mm->start_stack) { - name = "[stack]"; + if (mm) { + if (vma->vm_end == mm->brk) { + pad_len_spaces(m, len); + seq_puts(m, "[heap]"); + } else if (vma->vm_start <= mm->start_stack && + vma->vm_end >= mm->start_stack) { + + pad_len_spaces(m, len); + seq_puts(m, "[stack]"); } - } else { - name = "[vdso]"; +#ifdef __i386__ + else if (vma->vm_start == + (unsigned long)mm->context.vdso) { + pad_len_spaces(m, len); + seq_puts(m, "[vdso]"); } - } - if (name) { +#endif + } else { pad_len_spaces(m, len); - seq_puts(m, name); + seq_puts(m, "[vdso]"); } } seq_putc(m, '\n'); @@ -329,16 +315,12 @@ static int show_smap(struct seq_file *m, void *v) static void *m_start(struct seq_file *m, loff_t *pos) { - struct proc_maps_private *priv = m->private; + struct task_struct *task = m->private; unsigned long last_addr = m->version; struct mm_struct *mm; - struct vm_area_struct *vma, *tail_vma = NULL; + struct vm_area_struct *vma, *tail_vma; loff_t l = *pos; - /* Clear the per syscall fields in priv */ - priv->task = NULL; - priv->tail_vma = NULL; - /* * We remember last_addr rather than next_addr to hit with * mmap_cache most of the time. We have zero last_addr at @@ -349,15 +331,11 @@ static void *m_start(struct seq_file *m, loff_t *pos) if (last_addr == -1UL) return NULL; - priv->task = get_pid_task(priv->pid, PIDTYPE_PID); - if (!priv->task) - return NULL; - - mm = mm_for_maps(priv->task); + mm = mm_for_maps(task); if (!mm) return NULL; - priv->tail_vma = tail_vma = get_gate_vma(priv->task); + tail_vma = get_gate_vma(task); /* Start with last addr hint */ if (last_addr && (vma = find_vma(mm, last_addr))) { @@ -391,9 +369,11 @@ out: return tail_vma; } -static void vma_stop(struct proc_maps_private *priv, struct vm_area_struct *vma) +static void m_stop(struct seq_file *m, void *v) { - if (vma && vma != priv->tail_vma) { + struct task_struct *task = m->private; + struct vm_area_struct *vma = v; + if (vma && vma != get_gate_vma(task)) { struct mm_struct *mm = vma->vm_mm; up_read(&mm->mmap_sem); mmput(mm); @@ -402,103 +382,38 @@ static void vma_stop(struct proc_maps_private *priv, struct vm_area_struct *vma) static void *m_next(struct seq_file *m, void *v, loff_t *pos) { - struct proc_maps_private *priv = m->private; + struct task_struct *task = m->private; struct vm_area_struct *vma = v; - struct vm_area_struct *tail_vma = priv->tail_vma; + struct vm_area_struct *tail_vma = get_gate_vma(task); (*pos)++; if (vma && (vma != tail_vma) && vma->vm_next) return vma->vm_next; - vma_stop(priv, vma); + m_stop(m, v); return (vma != tail_vma)? tail_vma: NULL; } -static void m_stop(struct seq_file *m, void *v) -{ - struct proc_maps_private *priv = m->private; - struct vm_area_struct *vma = v; - - vma_stop(priv, vma); - if (priv->task) - put_task_struct(priv->task); -} - -static struct seq_operations proc_pid_maps_op = { +struct seq_operations proc_pid_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, .show = show_map }; -static struct seq_operations proc_pid_smaps_op = { +struct seq_operations proc_pid_smaps_op = { .start = m_start, .next = m_next, .stop = m_stop, .show = show_smap }; -static int do_maps_open(struct inode *inode, struct file *file, - struct seq_operations *ops) -{ - struct proc_maps_private *priv; - int ret = -ENOMEM; - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (priv) { - priv->pid = proc_pid(inode); - ret = seq_open(file, ops); - if (!ret) { - struct seq_file *m = file->private_data; - m->private = priv; - } else { - kfree(priv); - } - } - return ret; -} - -static int maps_open(struct inode *inode, struct file *file) -{ - return do_maps_open(inode, file, &proc_pid_maps_op); -} - -struct file_operations proc_maps_operations = { - .open = maps_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_private, -}; - #ifdef CONFIG_NUMA extern int show_numa_map(struct seq_file *m, void *v); -static struct seq_operations proc_pid_numa_maps_op = { +struct seq_operations proc_pid_numa_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, .show = show_numa_map }; - -static int numa_maps_open(struct inode *inode, struct file *file) -{ - return do_maps_open(inode, file, &proc_pid_numa_maps_op); -} - -struct file_operations proc_numa_maps_operations = { - .open = numa_maps_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_private, -}; #endif - -static int smaps_open(struct inode *inode, struct file *file) -{ - return do_maps_open(inode, file, &proc_pid_smaps_op); -} - -struct file_operations proc_smaps_operations = { - .open = smaps_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release_private, -}; diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 4616ed50f..8f68827ed 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -107,7 +107,7 @@ int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount * { struct vm_list_struct *vml; struct vm_area_struct *vma; - struct task_struct *task = get_proc_task(inode); + struct task_struct *task = proc_task(inode); struct mm_struct *mm = get_task_mm(task); int result = -ENOENT; @@ -156,28 +156,9 @@ static void *m_next(struct seq_file *m, void *v, loff_t *pos) { return NULL; } -static struct seq_operations proc_pid_maps_op = { +struct seq_operations proc_pid_maps_op = { .start = m_start, .next = m_next, .stop = m_stop, .show = show_map }; - -static int maps_open(struct inode *inode, struct file *file) -{ - int ret; - ret = seq_open(file, &proc_pid_maps_op); - if (!ret) { - struct seq_file *m = file->private_data; - m->private = NULL; - } - return ret; -} - -struct file_operations proc_maps_operations = { - .open = maps_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index d96050728..20d4b2237 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include diff --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c index 8425cf6e9..46efbf52c 100644 --- a/fs/qnx4/bitmap.c +++ b/fs/qnx4/bitmap.c @@ -13,6 +13,7 @@ * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) . */ +#include #include #include #include diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c index 0d7103fa0..9031948fe 100644 --- a/fs/qnx4/dir.c +++ b/fs/qnx4/dir.c @@ -11,6 +11,7 @@ * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support. */ +#include #include #include #include diff --git a/fs/qnx4/fsync.c b/fs/qnx4/fsync.c index aa3b19544..df5bc75d5 100644 --- a/fs/qnx4/fsync.c +++ b/fs/qnx4/fsync.c @@ -10,6 +10,7 @@ * 24-03-1998 by Richard Frowijn : first release. */ +#include #include #include #include diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 3b2546971..2ecd46f85 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c @@ -12,6 +12,7 @@ * 30-06-1998 by Frank Denis : first step to write inodes. */ +#include #include #include #include @@ -127,7 +128,7 @@ static struct inode *qnx4_alloc_inode(struct super_block *sb); static void qnx4_destroy_inode(struct inode *inode); static void qnx4_read_inode(struct inode *); static int qnx4_remount(struct super_block *sb, int *flags, char *data); -static int qnx4_statfs(struct dentry *, struct kstatfs *); +static int qnx4_statfs(struct super_block *, struct kstatfs *); static struct super_operations qnx4_sops = { @@ -281,10 +282,8 @@ unsigned long qnx4_block_map( struct inode *inode, long iblock ) return block; } -static int qnx4_statfs(struct dentry *dentry, struct kstatfs *buf) +static int qnx4_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - lock_kernel(); buf->f_type = sb->s_magic; @@ -449,7 +448,7 @@ static sector_t qnx4_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,qnx4_get_block); } -static const struct address_space_operations qnx4_aops = { +static struct address_space_operations qnx4_aops = { .readpage = qnx4_readpage, .writepage = qnx4_writepage, .sync_page = block_sync_page, @@ -497,6 +496,7 @@ static void qnx4_read_inode(struct inode *inode) inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->di_ctime); inode->i_ctime.tv_nsec = 0; inode->i_blocks = le32_to_cpu(raw_inode->di_first_xtnt.xtnt_size); + inode->i_blksize = QNX4_DIR_ENTRY_SIZE; memcpy(qnx4_inode, raw_inode, QNX4_DIR_ENTRY_SIZE); if (S_ISREG(inode->i_mode)) { @@ -561,11 +561,10 @@ static void destroy_inodecache(void) "qnx4_inode_cache: not all structures were freed\n"); } -static int qnx4_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *qnx4_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, qnx4_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, qnx4_fill_super); } static struct file_system_type qnx4_fs_type = { diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c index c3d83f671..4af4951d7 100644 --- a/fs/qnx4/namei.c +++ b/fs/qnx4/namei.c @@ -12,6 +12,7 @@ * 04-07-1998 by Frank Denis : first step for rmdir/unlink. */ +#include #include #include #include diff --git a/fs/qnx4/truncate.c b/fs/qnx4/truncate.c index 6437c1c3d..86563ec01 100644 --- a/fs/qnx4/truncate.c +++ b/fs/qnx4/truncate.c @@ -10,6 +10,7 @@ * 30-06-1998 by Frank DENIS : ugly filler. */ +#include #include #include #include diff --git a/fs/ramfs/file-mmu.c b/fs/ramfs/file-mmu.c index 86f14cacf..00a933eb8 100644 --- a/fs/ramfs/file-mmu.c +++ b/fs/ramfs/file-mmu.c @@ -26,7 +26,7 @@ #include -const struct address_space_operations ramfs_aops = { +struct address_space_operations ramfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, .commit_write = simple_commit_write diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 677139b48..f443a84b9 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -27,7 +27,7 @@ static int ramfs_nommu_setattr(struct dentry *, struct iattr *); -const struct address_space_operations ramfs_aops = { +struct address_space_operations ramfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, .commit_write = simple_commit_write @@ -283,9 +283,9 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file, /*****************************************************************************/ /* - * set up a mapping for shared memory segments + * set up a mapping */ int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) { - return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; + return 0; } diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index bc0e51662..14bd2246f 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -58,6 +58,7 @@ struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev) inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->a_ops = &ramfs_aops; inode->i_mapping->backing_dev_info = &ramfs_backing_dev_info; @@ -184,17 +185,16 @@ static int ramfs_fill_super(struct super_block * sb, void * data, int silent) return 0; } -int ramfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +struct super_block *ramfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, ramfs_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, ramfs_fill_super); } -static int rootfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *rootfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super, - mnt); + return get_sb_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super); } static struct file_system_type ramfs_fs_type = { diff --git a/fs/ramfs/internal.h b/fs/ramfs/internal.h index c2bb58e74..313237631 100644 --- a/fs/ramfs/internal.h +++ b/fs/ramfs/internal.h @@ -10,6 +10,6 @@ */ -extern const struct address_space_operations ramfs_aops; +extern struct address_space_operations ramfs_aops; extern const struct file_operations ramfs_file_operations; extern struct inode_operations ramfs_file_inode_operations; diff --git a/fs/read_write.c b/fs/read_write.c index c5b80d98d..c71dd10e5 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -438,7 +438,7 @@ unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to) return seg; } -EXPORT_UNUSED_SYMBOL(iov_shorten); /* June 2006 */ +EXPORT_SYMBOL(iov_shorten); /* A write operation does a read from user space and vice versa */ #define vrfy_dir(type) ((type) == READ ? VERIFY_WRITE : VERIFY_READ) diff --git a/fs/readdir.c b/fs/readdir.c index bff3ee58e..b6109329b 100644 --- a/fs/readdir.c +++ b/fs/readdir.c @@ -69,24 +69,20 @@ struct readdir_callback { }; static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) + ino_t ino, unsigned int d_type) { struct readdir_callback * buf = (struct readdir_callback *) __buf; struct old_linux_dirent __user * dirent; - unsigned long d_ino; if (buf->result) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; buf->result++; dirent = buf->dirent; if (!access_ok(VERIFY_WRITE, dirent, (unsigned long)(dirent->d_name + namlen + 1) - (unsigned long)dirent)) goto efault; - if ( __put_user(d_ino, &dirent->d_ino) || + if ( __put_user(ino, &dirent->d_ino) || __put_user(offset, &dirent->d_offset) || __put_user(namlen, &dirent->d_namlen) || __copy_to_user(dirent->d_name, name, namlen) || @@ -142,26 +138,22 @@ struct getdents_callback { }; static int filldir(void * __buf, const char * name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) + ino_t ino, unsigned int d_type) { struct linux_dirent __user * dirent; struct getdents_callback * buf = (struct getdents_callback *) __buf; - unsigned long d_ino; int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) return -EINVAL; - d_ino = ino; - if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) - return -EOVERFLOW; dirent = buf->previous; if (dirent) { if (__put_user(offset, &dirent->d_off)) goto efault; } dirent = buf->current_dir; - if (__put_user(d_ino, &dirent->d_ino)) + if (__put_user(ino, &dirent->d_ino)) goto efault; if (__put_user(reclen, &dirent->d_reclen)) goto efault; @@ -230,7 +222,7 @@ struct getdents_callback64 { }; static int filldir64(void * __buf, const char * name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) + ino_t ino, unsigned int d_type) { struct linux_dirent64 __user *dirent; struct getdents_callback64 * buf = (struct getdents_callback64 *) __buf; diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index 3d239f448..3e5f39f43 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c @@ -3,6 +3,7 @@ */ /* Reiserfs block (de)allocator, bitmap-based. */ +#include #include #include #include diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 9aabcc0cc..973c819f8 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c index fba304e64..b2264ba3c 100644 --- a/fs/reiserfs/do_balan.c +++ b/fs/reiserfs/do_balan.c @@ -15,6 +15,7 @@ ** **/ +#include #include #include #include diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 4127ad1f4..0eea8b468 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c @@ -48,8 +48,8 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) return 0; } - mutex_lock(&inode->i_mutex); reiserfs_write_lock(inode->i_sb); + mutex_lock(&inode->i_mutex); /* freeing preallocation only involves relogging blocks that * are already in the current transaction. preallocation gets * freed at the end of each transaction, so it is impossible for @@ -860,12 +860,8 @@ static int reiserfs_submit_file_region_for_write(struct reiserfs_transaction_han // this sets the proper flags for O_SYNC to trigger a commit mark_inode_dirty(inode); reiserfs_write_unlock(inode->i_sb); - } else { - reiserfs_write_lock(inode->i_sb); - reiserfs_update_inode_transaction(inode); + } else mark_inode_dirty(inode); - reiserfs_write_unlock(inode->i_sb); - } sd_update = 1; } @@ -1564,6 +1560,12 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t return res; } +static ssize_t reiserfs_aio_write(struct kiocb *iocb, const char __user * buf, + size_t count, loff_t pos) +{ + return generic_file_aio_write(iocb, buf, count, pos); +} + const struct file_operations reiserfs_file_operations = { .read = generic_file_read, .write = reiserfs_file_write, @@ -1573,7 +1575,7 @@ const struct file_operations reiserfs_file_operations = { .fsync = reiserfs_sync_file, .sendfile = generic_file_sendfile, .aio_read = generic_file_aio_read, - .aio_write = generic_file_aio_write, + .aio_write = reiserfs_aio_write, .splice_read = generic_file_splice_read, .splice_write = generic_file_splice_write, }; diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 6d0e554da..5600d3d60 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c @@ -34,6 +34,7 @@ ** **/ +#include #include #include #include diff --git a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c index de391a82b..6c5a726fd 100644 --- a/fs/reiserfs/ibalance.c +++ b/fs/reiserfs/ibalance.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 52a9e2a3a..5375e5ffd 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include @@ -19,6 +20,8 @@ #include #include +extern int reiserfs_default_io_size; /* default io size devuned in super.c */ + static int reiserfs_commit_write(struct file *f, struct page *page, unsigned from, unsigned to); static int reiserfs_prepare_write(struct file *f, struct page *page, @@ -39,10 +42,14 @@ void reiserfs_delete_inode(struct inode *inode) /* The = 0 happens when we abort creating a new inode for some reason like lack of space.. */ if (!(inode->i_state & I_NEW) && INODE_PKEY(inode)->k_objectid != 0) { /* also handles bad_inode case */ + mutex_lock(&inode->i_mutex); + reiserfs_delete_xattrs(inode); - if (journal_begin(&th, inode->i_sb, jbegin_count)) + if (journal_begin(&th, inode->i_sb, jbegin_count)) { + mutex_unlock(&inode->i_mutex); goto out; + } reiserfs_update_inode_transaction(inode); err = reiserfs_delete_object(&th, inode); @@ -54,8 +61,12 @@ void reiserfs_delete_inode(struct inode *inode) DQUOT_FREE_INODE(inode); DLIMIT_FREE_INODE(inode); - if (journal_end(&th, inode->i_sb, jbegin_count)) + if (journal_end(&th, inode->i_sb, jbegin_count)) { + mutex_unlock(&inode->i_mutex); goto out; + } + + mutex_unlock(&inode->i_mutex); /* check return value from reiserfs_delete_object after * ending the transaction @@ -1125,6 +1136,7 @@ static void init_inode(struct inode *inode, struct path *path) ih = PATH_PITEM_HEAD(path); copy_key(INODE_PKEY(inode), &(ih->ih_key)); + inode->i_blksize = reiserfs_default_io_size; INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list)); REISERFS_I(inode)->i_flags = 0; @@ -1891,6 +1903,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, } // these do not go to on-disk stat data inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid); + inode->i_blksize = reiserfs_default_io_size; // store in in-core inode the key of stat data and version all // object items will have (directory items will have old offset @@ -2356,11 +2369,10 @@ static int reiserfs_write_full_page(struct page *page, unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT; int error = 0; unsigned long block; - sector_t last_block; struct buffer_head *head, *bh; int partial = 0; int nr = 0; - int checked = PageFsMisc(page); + int checked = PageChecked(page); struct reiserfs_transaction_handle th; struct super_block *s = inode->i_sb; int bh_per_page = PAGE_CACHE_SIZE / s->s_blocksize; @@ -2404,19 +2416,10 @@ static int reiserfs_write_full_page(struct page *page, } bh = head; block = page->index << (PAGE_CACHE_SHIFT - s->s_blocksize_bits); - last_block = (i_size_read(inode) - 1) >> inode->i_blkbits; /* first map all the buffers, logging any direct items we find */ do { - if (block > last_block) { - /* - * This can happen when the block size is less than - * the page size. The corresponding bytes in the page - * were zero filled above - */ - clear_buffer_dirty(bh); - set_buffer_uptodate(bh); - } else if ((checked || buffer_dirty(bh)) && - (!buffer_mapped(bh) || (buffer_mapped(bh) + if ((checked || buffer_dirty(bh)) && (!buffer_mapped(bh) || + (buffer_mapped(bh) && bh->b_blocknr == 0))) { /* not mapped yet, or it points to a direct item, search @@ -2438,7 +2441,7 @@ static int reiserfs_write_full_page(struct page *page, * blocks we're going to log */ if (checked) { - ClearPageFsMisc(page); + ClearPageChecked(page); reiserfs_write_lock(s); error = journal_begin(&th, s, bh_per_page + 1); if (error) { @@ -2835,7 +2838,7 @@ static void reiserfs_invalidatepage(struct page *page, unsigned long offset) BUG_ON(!PageLocked(page)); if (offset == 0) - ClearPageFsMisc(page); + ClearPageChecked(page); if (!page_has_buffers(page)) goto out; @@ -2876,7 +2879,7 @@ static int reiserfs_set_page_dirty(struct page *page) { struct inode *inode = page->mapping->host; if (reiserfs_file_data_log(inode)) { - SetPageFsMisc(page); + SetPageChecked(page); return __set_page_dirty_nobuffers(page); } return __set_page_dirty_buffers(page); @@ -2899,7 +2902,7 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags) struct buffer_head *bh; int ret = 1; - WARN_ON(PageFsMisc(page)); + WARN_ON(PageChecked(page)); spin_lock(&j->j_dirty_buffers_lock); head = page_buffers(page); bh = head; @@ -2982,11 +2985,6 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) } if (error) goto out; - /* - * file size is changed, ctime and mtime are - * to be updated - */ - attr->ia_valid |= (ATTR_MTIME | ATTR_CTIME); } } @@ -3055,7 +3053,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) return error; } -const struct address_space_operations reiserfs_address_space_operations = { +struct address_space_operations reiserfs_address_space_operations = { .writepage = reiserfs_writepage, .readpage = reiserfs_readpage, .readpages = reiserfs_readpages, diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index f2872cc9b..e2dbca076 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c @@ -125,12 +125,12 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp) if (REISERFS_I(inode)->i_flags & i_nopack_mask) { return 0; } + reiserfs_write_lock(inode->i_sb); /* we need to make sure nobody is changing the file size beneath ** us */ mutex_lock(&inode->i_mutex); - reiserfs_write_lock(inode->i_sb); write_from = inode->i_size & (blocksize - 1); /* if we are on a block boundary, we are already unpacked. */ diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 9b3672d69..1b73529b8 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -34,6 +34,7 @@ ** from within kupdate, it will ignore the immediate flag */ +#include #include #include @@ -833,7 +834,8 @@ static int write_ordered_buffers(spinlock_t * lock, get_bh(bh); if (test_set_buffer_locked(bh)) { if (!buffer_dirty(bh)) { - list_move(&jh->list, &tmp); + list_del_init(&jh->list); + list_add(&jh->list, &tmp); goto loop_next; } spin_unlock(lock); @@ -853,7 +855,8 @@ static int write_ordered_buffers(spinlock_t * lock, ret = -EIO; } if (buffer_dirty(bh)) { - list_move(&jh->list, &tmp); + list_del_init(&jh->list); + list_add(&jh->list, &tmp); add_to_chunk(&chunk, bh, lock, write_ordered_chunk); } else { reiserfs_free_jh(bh); diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c index 281f8061a..2533c1f64 100644 --- a/fs/reiserfs/lbalance.c +++ b/fs/reiserfs/lbalance.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 002ff2102..6faa29eeb 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c @@ -11,6 +11,7 @@ * NO WARRANTY */ +#include #include #include #include diff --git a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c index 65feba4de..f62590aa9 100644 --- a/fs/reiserfs/objectid.c +++ b/fs/reiserfs/objectid.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index bc808a91e..27bd3a1df 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include #include #include #include diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index c533ec1bc..731688e1c 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c @@ -10,6 +10,7 @@ /* $Id: procfs.c,v 1.1.8.2 2001/07/15 17:08:42 god Exp $ */ +#include #include #include #include @@ -492,17 +493,9 @@ static void add_file(struct super_block *sb, char *name, int reiserfs_proc_info_init(struct super_block *sb) { - char b[BDEVNAME_SIZE]; - char *s; - - /* Some block devices use /'s */ - strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); - s = strchr(b, '/'); - if (s) - *s = '!'; - spin_lock_init(&__PINFO(sb).lock); - REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root); + REISERFS_SB(sb)->procdir = + proc_mkdir(reiserfs_bdevname(sb), proc_info_root); if (REISERFS_SB(sb)->procdir) { REISERFS_SB(sb)->procdir->owner = THIS_MODULE; REISERFS_SB(sb)->procdir->data = sb; @@ -516,22 +509,13 @@ int reiserfs_proc_info_init(struct super_block *sb) return 0; } reiserfs_warning(sb, "reiserfs: cannot create /proc/%s/%s", - proc_info_root_name, b); + proc_info_root_name, reiserfs_bdevname(sb)); return 1; } int reiserfs_proc_info_done(struct super_block *sb) { struct proc_dir_entry *de = REISERFS_SB(sb)->procdir; - char b[BDEVNAME_SIZE]; - char *s; - - /* Some block devices use /'s */ - strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); - s = strchr(b, '/'); - if (s) - *s = '!'; - if (de) { remove_proc_entry("journal", de); remove_proc_entry("oidmap", de); @@ -545,7 +529,7 @@ int reiserfs_proc_info_done(struct super_block *sb) __PINFO(sb).exiting = 1; spin_unlock(&__PINFO(sb).lock); if (proc_info_root) { - remove_proc_entry(b, proc_info_root); + remove_proc_entry(reiserfs_bdevname(sb), proc_info_root); REISERFS_SB(sb)->procdir = NULL; } return 0; diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index da05a72e3..8357de4ab 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c @@ -49,6 +49,7 @@ * reiserfs_insert_item */ +#include #include #include #include diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index c5868981c..bb275eb7b 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -11,6 +11,7 @@ * NO WARRANTY */ +#include #include #include #include @@ -59,7 +60,7 @@ static int is_any_reiserfs_magic_string(struct reiserfs_super_block *rs) } static int reiserfs_remount(struct super_block *s, int *flags, char *data); -static int reiserfs_statfs(struct dentry *dentry, struct kstatfs *buf); +static int reiserfs_statfs(struct super_block *s, struct kstatfs *buf); static int reiserfs_sync_fs(struct super_block *s, int wait) { @@ -430,29 +431,22 @@ int remove_save_link(struct inode *inode, int truncate) return journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT); } -static void reiserfs_kill_sb(struct super_block *s) -{ - if (REISERFS_SB(s)) { - if (REISERFS_SB(s)->xattr_root) { - d_invalidate(REISERFS_SB(s)->xattr_root); - dput(REISERFS_SB(s)->xattr_root); - REISERFS_SB(s)->xattr_root = NULL; - } - if (REISERFS_SB(s)->priv_root) { - d_invalidate(REISERFS_SB(s)->priv_root); - dput(REISERFS_SB(s)->priv_root); - REISERFS_SB(s)->priv_root = NULL; - } - kill_block_super(s); - } -} - static void reiserfs_put_super(struct super_block *s) { int i; struct reiserfs_transaction_handle th; th.t_trans_id = 0; + if (REISERFS_SB(s)->xattr_root) { + d_invalidate(REISERFS_SB(s)->xattr_root); + dput(REISERFS_SB(s)->xattr_root); + } + + if (REISERFS_SB(s)->priv_root) { + d_invalidate(REISERFS_SB(s)->priv_root); + dput(REISERFS_SB(s)->priv_root); + } + /* change file system state to current state if it was mounted with read-write permissions */ if (!(s->s_flags & MS_RDONLY)) { if (!journal_begin(&th, s, 10)) { @@ -1957,15 +1951,15 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) return errval; } -static int reiserfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int reiserfs_statfs(struct super_block *s, struct kstatfs *buf) { - struct reiserfs_super_block *rs = SB_DISK_SUPER_BLOCK(dentry->d_sb); + struct reiserfs_super_block *rs = SB_DISK_SUPER_BLOCK(s); buf->f_namelen = (REISERFS_MAX_NAME(s->s_blocksize)); buf->f_bfree = sb_free_blocks(rs); buf->f_bavail = buf->f_bfree; buf->f_blocks = sb_block_count(rs) - sb_bmap_nr(rs) - 1; - buf->f_bsize = dentry->d_sb->s_blocksize; + buf->f_bsize = s->s_blocksize; /* changed to accommodate gcc folks. */ buf->f_type = REISERFS_SUPER_MAGIC; return 0; @@ -2223,7 +2217,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, size_t towrite = len; struct buffer_head tmp_bh, *bh; - mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); + mutex_lock(&inode->i_mutex); while (towrite > 0) { tocopy = sb->s_blocksize - offset < towrite ? sb->s_blocksize - offset : towrite; @@ -2268,12 +2262,11 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, #endif -static int get_super_block(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *get_super_block(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super); } static int __init init_reiserfs_fs(void) @@ -2320,7 +2313,7 @@ struct file_system_type reiserfs_fs_type = { .owner = THIS_MODULE, .name = "reiserfs", .get_sb = get_super_block, - .kill_sb = reiserfs_kill_sb, + .kill_sb = kill_block_super, .fs_flags = FS_REQUIRES_DEV, }; diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c index 36f108fc1..196e971c0 100644 --- a/fs/reiserfs/tail_conversion.c +++ b/fs/reiserfs/tail_conversion.c @@ -2,6 +2,7 @@ * Copyright 1999 Hans Reiser, see reiserfs/README for licensing and copyright details */ +#include #include #include #include diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 1243010cc..b99819abf 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -425,7 +425,7 @@ int xattr_readdir(struct file *file, filldir_t filler, void *buf) int res = -ENOTDIR; if (!file->f_op || !file->f_op->readdir) goto out; - mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR); + mutex_lock(&inode->i_mutex); // down(&inode->i_zombie); res = -ENOENT; if (!IS_DEADDIR(inode)) { @@ -453,7 +453,8 @@ static struct page *reiserfs_get_page(struct inode *dir, unsigned long n) /* We can deadlock if we try to free dentries, and an unlink/rmdir has just occured - GFP_NOFS avoids this */ mapping_set_gfp_mask(mapping, GFP_NOFS); - page = read_mapping_page(mapping, n, NULL); + page = read_cache_page(mapping, n, + (filler_t *) mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); kmap(page); @@ -774,7 +775,7 @@ int reiserfs_xattr_del(struct inode *inode, const char *name) static int reiserfs_delete_xattrs_filler(void *buf, const char *name, int namelen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct dentry *xadir = (struct dentry *)buf; @@ -852,7 +853,7 @@ struct reiserfs_chown_buf { /* XXX: If there is a better way to do this, I'd love to hear about it */ static int reiserfs_chown_xattrs_filler(void *buf, const char *name, int namelen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct reiserfs_chown_buf *chown_buf = (struct reiserfs_chown_buf *)buf; struct dentry *xafile, *xadir = chown_buf->xadir; @@ -1037,7 +1038,7 @@ struct reiserfs_listxattr_buf { static int reiserfs_listxattr_filler(void *buf, const char *name, int namelen, - loff_t offset, u64 ino, unsigned int d_type) + loff_t offset, ino_t ino, unsigned int d_type) { struct reiserfs_listxattr_buf *b = (struct reiserfs_listxattr_buf *)buf; int len = 0; diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index 22eed61eb..9b9eda7b3 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -179,12 +179,12 @@ outnobh: /* That's simple too. */ static int -romfs_statfs(struct dentry *dentry, struct kstatfs *buf) +romfs_statfs(struct super_block *sb, struct kstatfs *buf) { buf->f_type = ROMFS_MAGIC; buf->f_bsize = ROMBSIZE; buf->f_bfree = buf->f_bavail = buf->f_ffree; - buf->f_blocks = (romfs_maxsize(dentry->d_sb)+ROMBSIZE-1)>>ROMBSBITS; + buf->f_blocks = (romfs_maxsize(sb)+ROMBSIZE-1)>>ROMBSBITS; buf->f_namelen = ROMFS_MAXFN; return 0; } @@ -459,7 +459,7 @@ err_out: /* Mapping from our types to the kernel */ -static const struct address_space_operations romfs_aops = { +static struct address_space_operations romfs_aops = { .readpage = romfs_readpage }; @@ -607,11 +607,10 @@ static struct super_operations romfs_ops = { .remount_fs = romfs_remount, }; -static int romfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *romfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, romfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, romfs_fill_super); } static struct file_system_type romfs_fs_type = { diff --git a/fs/select.c b/fs/select.c index 33b72ba0f..8cd6dc31f 100644 --- a/fs/select.c +++ b/fs/select.c @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -65,7 +66,8 @@ EXPORT_SYMBOL(poll_initwait); static void free_poll_entry(struct poll_table_entry *entry) { - remove_wait_queue(entry->wait_address,&entry->wait); + if (remove_wait_queue(entry->wait_address,&entry->wait) < 0) + print_symbol("bad poll-entry for %s", (unsigned long) entry->filp->f_op->poll); fput(entry->filp); } @@ -546,38 +548,37 @@ struct poll_list { #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd)) -/* - * Fish for pollable events on the pollfd->fd file descriptor. We're only - * interested in events matching the pollfd->events mask, and the result - * matching that mask is both recorded in pollfd->revents and returned. The - * pwait poll_table will be used by the fd-provided poll handler for waiting, - * if non-NULL. - */ -static inline unsigned int do_pollfd(struct pollfd *pollfd, poll_table *pwait) +static void do_pollfd(unsigned int num, struct pollfd * fdpage, + poll_table ** pwait, int *count) { - unsigned int mask; - int fd; - - mask = 0; - fd = pollfd->fd; - if (fd >= 0) { - int fput_needed; - struct file * file; - - file = fget_light(fd, &fput_needed); - mask = POLLNVAL; - if (file != NULL) { - mask = DEFAULT_POLLMASK; - if (file->f_op && file->f_op->poll) - mask = file->f_op->poll(file, pwait); - /* Mask out unneeded events. */ - mask &= pollfd->events | POLLERR | POLLHUP; - fput_light(file, fput_needed); + int i; + + for (i = 0; i < num; i++) { + int fd; + unsigned int mask; + struct pollfd *fdp; + + mask = 0; + fdp = fdpage+i; + fd = fdp->fd; + if (fd >= 0) { + int fput_needed; + struct file * file = fget_light(fd, &fput_needed); + mask = POLLNVAL; + if (file != NULL) { + mask = DEFAULT_POLLMASK; + if (file->f_op && file->f_op->poll) + mask = file->f_op->poll(file, *pwait); + mask &= fdp->events | POLLERR | POLLHUP; + fput_light(file, fput_needed); + } + if (mask) { + *pwait = NULL; + (*count)++; + } } + fdp->revents = mask; } - pollfd->revents = mask; - - return mask; } static int do_poll(unsigned int nfds, struct poll_list *list, @@ -595,29 +596,11 @@ static int do_poll(unsigned int nfds, struct poll_list *list, long __timeout; set_current_state(TASK_INTERRUPTIBLE); - for (walk = list; walk != NULL; walk = walk->next) { - struct pollfd * pfd, * pfd_end; - - pfd = walk->entries; - pfd_end = pfd + walk->len; - for (; pfd != pfd_end; pfd++) { - /* - * Fish for events. If we found one, record it - * and kill the poll_table, so we don't - * needlessly register any other waiters after - * this. They'll get immediately deregistered - * when we break out and return. - */ - if (do_pollfd(pfd, pt)) { - count++; - pt = NULL; - } - } + walk = list; + while(walk != NULL) { + do_pollfd( walk->len, walk->entries, &pt, &count); + walk = walk->next; } - /* - * All waiters have already been registered, so don't provide - * a poll_table to them on the next loop iteration. - */ pt = NULL; if (count || !*timeout || signal_pending(current)) break; @@ -746,9 +729,9 @@ out_fds: asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, long timeout_msecs) { - s64 timeout_jiffies; + s64 timeout_jiffies = 0; - if (timeout_msecs > 0) { + if (timeout_msecs) { #if HZ > 1000 /* We can only overflow if HZ > 1000 */ if (timeout_msecs / 1000 > (s64)0x7fffffffffffffffULL / (s64)HZ) @@ -756,9 +739,6 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, else #endif timeout_jiffies = msecs_to_jiffies(timeout_msecs); - } else { - /* Infinite (< 0) or no (0) timeout */ - timeout_jiffies = timeout_msecs; } return do_sys_poll(ufds, nfds, &timeout_jiffies); diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index dae67048b..ed9a24d19 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c @@ -306,7 +306,7 @@ static int smb_commit_write(struct file *file, struct page *page, return status; } -const struct address_space_operations smb_file_aops = { +struct address_space_operations smb_file_aops = { .readpage = smb_readpage, .writepage = smb_writepage, .prepare_write = smb_prepare_write, diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index 3c5c3d852..fdeabc0a3 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -7,6 +7,7 @@ * Please add a note about your changes to smbfs in the ChangeLog file. */ +#include #include #include #include @@ -47,7 +48,7 @@ static void smb_delete_inode(struct inode *); static void smb_put_super(struct super_block *); -static int smb_statfs(struct dentry *, struct kstatfs *); +static int smb_statfs(struct super_block *, struct kstatfs *); static int smb_show_options(struct seq_file *, struct vfsmount *); static kmem_cache_t *smb_inode_cachep; @@ -167,6 +168,7 @@ smb_get_inode_attr(struct inode *inode, struct smb_fattr *fattr) fattr->f_mtime = inode->i_mtime; fattr->f_ctime = inode->i_ctime; fattr->f_atime = inode->i_atime; + fattr->f_blksize= inode->i_blksize; fattr->f_blocks = inode->i_blocks; fattr->attr = SMB_I(inode)->attr; @@ -200,6 +202,7 @@ smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr) inode->i_uid = fattr->f_uid; inode->i_gid = fattr->f_gid; inode->i_ctime = fattr->f_ctime; + inode->i_blksize= fattr->f_blksize; inode->i_blocks = fattr->f_blocks; inode->i_size = fattr->f_size; inode->i_mtime = fattr->f_mtime; @@ -638,13 +641,13 @@ out_no_server: } static int -smb_statfs(struct dentry *dentry, struct kstatfs *buf) +smb_statfs(struct super_block *sb, struct kstatfs *buf) { int result; lock_kernel(); - result = smb_proc_dskattr(dentry, buf); + result = smb_proc_dskattr(sb, buf); unlock_kernel(); @@ -779,10 +782,10 @@ out: return error; } -static int smb_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *smb_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, smb_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, smb_fill_super); } static struct file_system_type smb_fs_type = { diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c index 40e174db9..b1b878b81 100644 --- a/fs/smbfs/proc.c +++ b/fs/smbfs/proc.c @@ -1826,6 +1826,7 @@ smb_init_dirent(struct smb_sb_info *server, struct smb_fattr *fattr) fattr->f_nlink = 1; fattr->f_uid = server->mnt->uid; fattr->f_gid = server->mnt->gid; + fattr->f_blksize = SMB_ST_BLKSIZE; fattr->f_unix = 0; } @@ -3225,9 +3226,9 @@ smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr) } int -smb_proc_dskattr(struct dentry *dentry, struct kstatfs *attr) +smb_proc_dskattr(struct super_block *sb, struct kstatfs *attr) { - struct smb_sb_info *server = SMB_SB(dentry->d_sb); + struct smb_sb_info *server = SMB_SB(sb); int result; char *p; long unit; diff --git a/fs/smbfs/proto.h b/fs/smbfs/proto.h index 34fb462b2..47664597e 100644 --- a/fs/smbfs/proto.h +++ b/fs/smbfs/proto.h @@ -29,7 +29,7 @@ extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr); extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor); extern int smb_proc_settime(struct dentry *dentry, struct smb_fattr *fattr); -extern int smb_proc_dskattr(struct dentry *dentry, struct kstatfs *attr); +extern int smb_proc_dskattr(struct super_block *sb, struct kstatfs *attr); extern int smb_proc_read_link(struct smb_sb_info *server, struct dentry *d, char *buffer, int len); extern int smb_proc_symlink(struct smb_sb_info *server, struct dentry *d, const char *oldpath); extern int smb_proc_link(struct smb_sb_info *server, struct dentry *dentry, struct dentry *new_dentry); @@ -63,7 +63,7 @@ extern int smb_revalidate_inode(struct dentry *dentry); extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat); extern int smb_notify_change(struct dentry *dentry, struct iattr *attr); /* file.c */ -extern const struct address_space_operations smb_file_aops; +extern struct address_space_operations smb_file_aops; extern const struct file_operations smb_file_operations; extern struct inode_operations smb_file_inode_operations; /* ioctl.c */ diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index c8e96195b..c71dd2760 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c @@ -400,7 +400,8 @@ static int smb_request_send_req(struct smb_request *req) if (!(req->rq_flags & SMB_REQ_TRANSMITTED)) goto out; - list_move_tail(&req->rq_queue, &server->recvq); + list_del_init(&req->rq_queue); + list_add_tail(&req->rq_queue, &server->recvq); result = 1; out: return result; @@ -434,7 +435,8 @@ int smb_request_send_server(struct smb_sb_info *server) result = smb_request_send_req(req); if (result < 0) { server->conn_error = result; - list_move(&req->rq_queue, &server->xmitq); + list_del_init(&req->rq_queue); + list_add(&req->rq_queue, &server->xmitq); result = -EIO; goto out; } diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c index e67540441..481a97a42 100644 --- a/fs/smbfs/smbiod.c +++ b/fs/smbfs/smbiod.c @@ -5,6 +5,7 @@ * Copyright (C) 2001, Urban Widmark */ +#include #include #include @@ -19,7 +20,6 @@ #include #include #include -#include #include #include @@ -40,7 +40,7 @@ enum smbiod_state { }; static enum smbiod_state smbiod_state = SMBIOD_DEAD; -static struct task_struct *smbiod_thread; +static pid_t smbiod_pid; static DECLARE_WAIT_QUEUE_HEAD(smbiod_wait); static LIST_HEAD(smb_servers); static DEFINE_SPINLOCK(servers_lock); @@ -67,29 +67,20 @@ void smbiod_wake_up(void) */ static int smbiod_start(void) { - struct task_struct *tsk; - int err = 0; - + pid_t pid; if (smbiod_state != SMBIOD_DEAD) return 0; smbiod_state = SMBIOD_STARTING; __module_get(THIS_MODULE); spin_unlock(&servers_lock); - tsk = kthread_run(smbiod, NULL, "smbiod"); - if (IS_ERR(tsk)) { - err = PTR_ERR(tsk); + pid = kernel_thread(smbiod, NULL, 0); + if (pid < 0) module_put(THIS_MODULE); - } spin_lock(&servers_lock); - if (err < 0) { - smbiod_state = SMBIOD_DEAD; - smbiod_thread = NULL; - } else { - smbiod_state = SMBIOD_RUNNING; - smbiod_thread = tsk; - } - return err; + smbiod_state = pid < 0 ? SMBIOD_DEAD : SMBIOD_RUNNING; + smbiod_pid = pid; + return pid; } /* @@ -192,7 +183,8 @@ int smbiod_retry(struct smb_sb_info *server) if (req->rq_flags & SMB_REQ_RETRY) { /* must move the request to the xmitq */ VERBOSE("retrying request %p on recvq\n", req); - list_move(&req->rq_queue, &server->xmitq); + list_del(&req->rq_queue); + list_add(&req->rq_queue, &server->xmitq); continue; } #endif @@ -298,6 +290,8 @@ out: */ static int smbiod(void *unused) { + daemonize("smbiod"); + allow_signal(SIGKILL); VERBOSE("SMB Kernel thread starting (%d) ...\n", current->pid); diff --git a/fs/splice.c b/fs/splice.c index 0b8316692..8fef6672b 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -55,43 +55,31 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { struct page *page = buf->page; - struct address_space *mapping; + struct address_space *mapping = page_mapping(page); lock_page(page); - mapping = page_mapping(page); - if (mapping) { - WARN_ON(!PageUptodate(page)); + WARN_ON(!PageUptodate(page)); - /* - * At least for ext2 with nobh option, we need to wait on - * writeback completing on this page, since we'll remove it - * from the pagecache. Otherwise truncate wont wait on the - * page, allowing the disk blocks to be reused by someone else - * before we actually wrote our data to them. fs corruption - * ensues. - */ - wait_on_page_writeback(page); + /* + * At least for ext2 with nobh option, we need to wait on writeback + * completing on this page, since we'll remove it from the pagecache. + * Otherwise truncate wont wait on the page, allowing the disk + * blocks to be reused by someone else before we actually wrote our + * data to them. fs corruption ensues. + */ + wait_on_page_writeback(page); - if (PagePrivate(page)) - try_to_release_page(page, mapping_gfp_mask(mapping)); + if (PagePrivate(page)) + try_to_release_page(page, mapping_gfp_mask(mapping)); - /* - * If we succeeded in removing the mapping, set LRU flag - * and return good. - */ - if (remove_mapping(mapping, page)) { - buf->flags |= PIPE_BUF_FLAG_LRU; - return 0; - } + if (!remove_mapping(mapping, page)) { + unlock_page(page); + return 1; } - /* - * Raced with truncate or failed to remove page from current - * address space, unlock and return failure. - */ - unlock_page(page); - return 1; + buf->flags |= PIPE_BUF_FLAG_LRU; + return 0; } static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe, @@ -607,7 +595,7 @@ find_page: ret = -ENOMEM; page = page_cache_alloc_cold(mapping); if (unlikely(!page)) - goto out_ret; + goto out_nomem; /* * This will also lock the page @@ -666,7 +654,7 @@ find_page: if (sd->pos + this_len > isize) vmtruncate(mapping->host, isize); - goto out_ret; + goto out; } if (buf->page != page) { @@ -698,7 +686,7 @@ find_page: out: page_cache_release(page); unlock_page(page); -out_ret: +out_nomem: return ret; } @@ -1041,19 +1029,6 @@ out_release: EXPORT_SYMBOL(do_splice_direct); -/* - * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same - * location, so checking ->i_pipe is not enough to verify that this is a - * pipe. - */ -static inline int is_pipe(struct inode *inode) -{ - if (inode->i_pipe && S_ISFIFO(inode->i_mode)) - return 1; - - return 0; -} - /* * Determine where to splice to/from. */ @@ -1065,8 +1040,8 @@ static long do_splice(struct file *in, loff_t __user *off_in, loff_t offset, *off; long ret; - if (is_pipe(in->f_dentry->d_inode)) { - pipe = in->f_dentry->d_inode->i_pipe; + pipe = in->f_dentry->d_inode->i_pipe; + if (pipe) { if (off_in) return -ESPIPE; if (off_out) { @@ -1086,8 +1061,8 @@ static long do_splice(struct file *in, loff_t __user *off_in, return ret; } - if (is_pipe(out->f_dentry->d_inode)) { - pipe = out->f_dentry->d_inode->i_pipe; + pipe = out->f_dentry->d_inode->i_pipe; + if (pipe) { if (off_out) return -ESPIPE; if (off_in) { @@ -1244,7 +1219,7 @@ static int get_iovec_page_array(const struct iovec __user *iov, static long do_vmsplice(struct file *file, const struct iovec __user *iov, unsigned long nr_segs, unsigned int flags) { - struct pipe_inode_info *pipe; + struct pipe_inode_info *pipe = file->f_dentry->d_inode->i_pipe; struct page *pages[PIPE_BUFFERS]; struct partial_page partial[PIPE_BUFFERS]; struct splice_pipe_desc spd = { @@ -1254,7 +1229,7 @@ static long do_vmsplice(struct file *file, const struct iovec __user *iov, .ops = &user_page_pipe_buf_ops, }; - if (!is_pipe(file->f_dentry->d_inode)) + if (unlikely(!pipe)) return -EBADF; if (unlikely(nr_segs > UIO_MAXIOV)) return -EINVAL; @@ -1266,7 +1241,6 @@ static long do_vmsplice(struct file *file, const struct iovec __user *iov, if (spd.nr_pages <= 0) return spd.nr_pages; - pipe = file->f_dentry->d_inode->i_pipe; return splice_to_pipe(pipe, &spd); } @@ -1415,11 +1389,11 @@ static int link_pipe(struct pipe_inode_info *ipipe, * could deadlock (one doing tee from A -> B, the other from B -> A). */ if (ipipe->inode < opipe->inode) { - mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_PARENT); - mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&ipipe->inode->i_mutex); + mutex_lock(&opipe->inode->i_mutex); } else { - mutex_lock_nested(&opipe->inode->i_mutex, I_MUTEX_PARENT); - mutex_lock_nested(&ipipe->inode->i_mutex, I_MUTEX_CHILD); + mutex_lock(&opipe->inode->i_mutex); + mutex_lock(&ipipe->inode->i_mutex); } do { @@ -1489,20 +1463,15 @@ static int link_pipe(struct pipe_inode_info *ipipe, static long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags) { - struct pipe_inode_info *ipipe; - struct pipe_inode_info *opipe; + struct pipe_inode_info *ipipe = in->f_dentry->d_inode->i_pipe; + struct pipe_inode_info *opipe = out->f_dentry->d_inode->i_pipe; int ret = -EINVAL; - if (!is_pipe(in->f_dentry->d_inode) || !is_pipe(out->f_dentry->d_inode)) - return ret; - /* * Duplicate the contents of ipipe to opipe without actually * copying the data. */ - ipipe = in->f_dentry->d_inode->i_pipe; - opipe = out->f_dentry->d_inode->i_pipe; - if (ipipe != opipe) { + if (ipipe && opipe && ipipe != opipe) { /* * Keep going, unless we encounter an error. The ipipe/opipe * ordering doesn't really matter. diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile index 1bc7b0609..842001b2b 100644 --- a/fs/squashfs/Makefile +++ b/fs/squashfs/Makefile @@ -3,5 +3,5 @@ # obj-$(CONFIG_SQUASHFS) += squashfs.o -squashfs-y += inode.o -squashfs-y += squashfs2_0.o + +squashfs-objs := inode.o diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c index ccbaeb6bf..f8b806d91 100644 --- a/fs/squashfs/inode.c +++ b/fs/squashfs/inode.c @@ -1,8 +1,7 @@ /* * Squashfs - a compressed read only filesystem for Linux * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher + * Copyright (c) 2002, 2003, 2004, 2005 Phillip Lougher * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -21,12 +20,13 @@ * inode.c */ +#define SQUASHFS_1_0_COMPATIBILITY + #include #include #include #include #include -#include #include #include #include @@ -36,34 +36,56 @@ #include #include #include +#include #include +#include +#include #include #include -#include -#include -#include "squashfs.h" +#ifdef SQUASHFS_TRACE +#define TRACE(s, args...) printk(KERN_NOTICE "SQUASHFS: "s, ## args) +#else +#define TRACE(s, args...) {} +#endif + +#define ERROR(s, args...) printk(KERN_ERR "SQUASHFS error: "s, ## args) + +#define SERROR(s, args...) if(!silent) printk(KERN_ERR "SQUASHFS error: "s, ## args) +#define WARNING(s, args...) printk(KERN_WARNING "SQUASHFS: "s, ## args) static void squashfs_put_super(struct super_block *); -static int squashfs_statfs(struct dentry *, struct kstatfs *); +static int squashfs_statfs(struct super_block *, struct kstatfs *); static int squashfs_symlink_readpage(struct file *file, struct page *page); static int squashfs_readpage(struct file *file, struct page *page); static int squashfs_readpage4K(struct file *file, struct page *page); static int squashfs_readdir(struct file *, void *, filldir_t); +static struct dentry *squashfs_lookup(struct inode *, struct dentry *, struct nameidata *); +static unsigned int read_data(struct super_block *s, char *buffer, + unsigned int index, unsigned int length, unsigned int *next_index); +static int squashfs_get_cached_block(struct super_block *s, char *buffer, + unsigned int block, unsigned int offset, int length, + unsigned int *next_block, unsigned int *next_offset); +static struct inode *squashfs_iget(struct super_block *s, squashfs_inode inode); +static unsigned int read_blocklist(struct inode *inode, int index, int readahead_blks, + char *block_list, unsigned short **block_p, unsigned int *bsize); +static void squashfs_put_super(struct super_block *s); +static struct super_block *squashfs_get_sb(struct file_system_type *, int, const char *, void *); static struct inode *squashfs_alloc_inode(struct super_block *sb); static void squashfs_destroy_inode(struct inode *inode); static int init_inodecache(void); static void destroy_inodecache(void); -static struct dentry *squashfs_lookup(struct inode *, struct dentry *, - struct nameidata *); -static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode); -static long long read_blocklist(struct inode *inode, int index, - int readahead_blks, char *block_list, - unsigned short **block_p, unsigned int *bsize); -static int squashfs_get_sb(struct file_system_type *,int, const char *, void *, - struct vfsmount *); -static void vfs_read_inode(struct inode *i); -static struct dentry *squashfs_get_parent(struct dentry *child); + +#ifdef SQUASHFS_1_0_COMPATIBILITY +static int squashfs_readpage_lessthan4K(struct file *file, struct page *page); +static struct inode *squashfs_iget_1(struct super_block *s, squashfs_inode inode); +static unsigned int read_blocklist_1(struct inode *inode, int index, int readahead_blks, + char *block_list, unsigned short **block_p, unsigned int *bsize); +#endif + +DECLARE_MUTEX(read_data_mutex); + +static z_stream stream; static struct file_system_type squashfs_fs_type = { .owner = THIS_MODULE, @@ -71,57 +93,57 @@ static struct file_system_type squashfs_fs_type = { .get_sb = squashfs_get_sb, .kill_sb = kill_block_super, .fs_flags = FS_REQUIRES_DEV -}; + }; static unsigned char squashfs_filetype_table[] = { DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK }; -static struct super_operations squashfs_super_ops = { - .alloc_inode = squashfs_alloc_inode, - .destroy_inode = squashfs_destroy_inode, - .statfs = squashfs_statfs, - .put_super = squashfs_put_super, -}; - -static struct super_operations squashfs_export_super_ops = { +static struct super_operations squashfs_ops = { .alloc_inode = squashfs_alloc_inode, .destroy_inode = squashfs_destroy_inode, .statfs = squashfs_statfs, .put_super = squashfs_put_super, - .read_inode = vfs_read_inode -}; - -struct export_operations squashfs_export_ops = { - .get_parent = squashfs_get_parent }; -SQSH_EXTERN struct address_space_operations squashfs_symlink_aops = { +static struct address_space_operations squashfs_symlink_aops = { .readpage = squashfs_symlink_readpage }; -SQSH_EXTERN struct address_space_operations squashfs_aops = { +static struct address_space_operations squashfs_aops = { .readpage = squashfs_readpage }; -SQSH_EXTERN struct address_space_operations squashfs_aops_4K = { +static struct address_space_operations squashfs_aops_4K = { .readpage = squashfs_readpage4K }; +#ifdef SQUASHFS_1_0_COMPATIBILITY +static struct address_space_operations squashfs_aops_lessthan4K = { + .readpage = squashfs_readpage_lessthan4K +}; +#endif + static struct file_operations squashfs_dir_ops = { .read = generic_read_dir, .readdir = squashfs_readdir }; -SQSH_EXTERN struct inode_operations squashfs_dir_inode_ops = { +static struct inode_operations squashfs_dir_inode_ops = { .lookup = squashfs_lookup }; +static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode) +{ + return list_entry(inode, struct squashfs_inode_info, vfs_inode); +} + + static struct buffer_head *get_block_length(struct super_block *s, int *cur_index, int *offset, int *c_byte) { - struct squashfs_sb_info *msblk = s->s_fs_info; + squashfs_sb_info *msblk = s->s_fs_info; unsigned short temp; struct buffer_head *bh; @@ -162,7 +184,7 @@ static struct buffer_head *get_block_length(struct super_block *s, *offset += 2; } - if (SQUASHFS_CHECK_DATA(msblk->sblk.flags)) { + if (SQUASHFS_CHECK_DATA(msblk->sBlk.flags)) { if (*offset == msblk->devblksize) { brelse(bh); if (!(bh = sb_bread(s, ++(*cur_index)))) @@ -185,76 +207,58 @@ out: } -SQSH_EXTERN unsigned int squashfs_read_data(struct super_block *s, char *buffer, - long long index, unsigned int length, - long long *next_index, int srclength) +static unsigned int read_data(struct super_block *s, char *buffer, + unsigned int index, unsigned int length, unsigned int *next_index) { - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - struct buffer_head *bh[((SQUASHFS_FILE_MAX_SIZE - 1) >> - msblk->devblksize_log2) + 2]; - unsigned int offset = index & ((1 << msblk->devblksize_log2) - 1); - unsigned int cur_index = index >> msblk->devblksize_log2; - int bytes, avail_bytes, b = 0, k = 0; + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + struct buffer_head *bh[((SQUASHFS_FILE_MAX_SIZE - 1) >> msBlk->devblksize_log2) + 2]; + unsigned int offset = index & ((1 << msBlk->devblksize_log2) - 1); + unsigned int cur_index = index >> msBlk->devblksize_log2; + int bytes, avail_bytes, b = 0, k; char *c_buffer; unsigned int compressed; unsigned int c_byte = length; - if (c_byte) { - bytes = msblk->devblksize - offset; + if(c_byte) { + bytes = msBlk->devblksize - offset; compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte); - c_buffer = compressed ? msblk->read_data : buffer; + c_buffer = compressed ? msBlk->read_data : buffer; c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte); - TRACE("Block @ 0x%llx, %scompressed size %d, src size %d\n", index, compressed - ? "" : "un", (unsigned int) c_byte, srclength); - - if (c_byte > srclength || index < 0 || (index + c_byte) > sblk->bytes_used) - goto read_failure; + TRACE("Block @ 0x%x, %scompressed size %d\n", index, compressed ? "" : "un", (unsigned int) c_byte); - if (!(bh[0] = sb_getblk(s, cur_index))) + if(!(bh[0] = sb_getblk(s, cur_index))) goto block_release; - - for (b = 1; bytes < c_byte; b++) { - if (!(bh[b] = sb_getblk(s, ++cur_index))) + for(b = 1; bytes < c_byte; b++) { + if(!(bh[b] = sb_getblk(s, ++cur_index))) goto block_release; - bytes += msblk->devblksize; + bytes += msBlk->devblksize; } ll_rw_block(READ, b, bh); } else { - if (index < 0 || (index + 2) > sblk->bytes_used) - goto read_failure; - - if (!(bh[0] = get_block_length(s, &cur_index, &offset, - &c_byte))) + if(!(bh[0] = get_block_length(s, &cur_index, &offset, &c_byte))) goto read_failure; - bytes = msblk->devblksize - offset; + bytes = msBlk->devblksize - offset; compressed = SQUASHFS_COMPRESSED(c_byte); - c_buffer = compressed ? msblk->read_data : buffer; + c_buffer = compressed ? msBlk->read_data : buffer; c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte); - TRACE("Block @ 0x%llx, %scompressed size %d\n", index, compressed - ? "" : "un", (unsigned int) c_byte); + TRACE("Block @ 0x%x, %scompressed size %d\n", index, compressed ? "" : "un", (unsigned int) c_byte); - if (c_byte > srclength || (index + c_byte) > sblk->bytes_used) - goto read_failure; - - for (b = 1; bytes < c_byte; b++) { - if (!(bh[b] = sb_getblk(s, ++cur_index))) + for(b = 1; bytes < c_byte; b++) { + if(!(bh[b] = sb_getblk(s, ++cur_index))) goto block_release; - bytes += msblk->devblksize; + bytes += msBlk->devblksize; } ll_rw_block(READ, b - 1, bh + 1); } - if (compressed) - down(&msblk->read_data_mutex); + if(compressed) + down(&read_data_mutex); - for (bytes = 0; k < b; k++) { - avail_bytes = (c_byte - bytes) > (msblk->devblksize - offset) ? - msblk->devblksize - offset : - c_byte - bytes; + for(bytes = 0, k = 0; k < b; k++) { + avail_bytes = (c_byte - bytes) > (msBlk->devblksize - offset) ? msBlk->devblksize - offset : c_byte - bytes; wait_on_buffer(bh[k]); if (!buffer_uptodate(bh[k])) goto block_release; @@ -267,39 +271,30 @@ SQSH_EXTERN unsigned int squashfs_read_data(struct super_block *s, char *buffer, /* * uncompress block */ - if (compressed) { + if(compressed) { int zlib_err; - msblk->stream.next_in = c_buffer; - msblk->stream.avail_in = c_byte; - msblk->stream.next_out = buffer; - //msblk->stream.avail_out = msblk->read_size;//srclength; - msblk->stream.avail_out = srclength; - - if (((zlib_err = zlib_inflateInit(&msblk->stream)) != Z_OK) || - ((zlib_err = zlib_inflate(&msblk->stream, Z_FINISH)) - != Z_STREAM_END) || ((zlib_err = - zlib_inflateEnd(&msblk->stream)) != Z_OK)) { - //ERROR("zlib_fs returned unexpected result 0x%x\n", - // zlib_err); - ERROR("zlib_fs returned unexpected result 0x%x, srclength %d\n", - zlib_err, srclength); + stream.next_in = c_buffer; + stream.avail_in = c_byte; + stream.next_out = buffer; + stream.avail_out = msBlk->read_size; + if(((zlib_err = zlib_inflateInit(&stream)) != Z_OK) || + ((zlib_err = zlib_inflate(&stream, Z_FINISH)) != Z_STREAM_END) || + ((zlib_err = zlib_inflateEnd(&stream)) != Z_OK)) { + ERROR("zlib_fs returned unexpected result 0x%x\n", zlib_err); bytes = 0; } else - bytes = msblk->stream.total_out; - - up(&msblk->read_data_mutex); + bytes = stream.total_out; + up(&read_data_mutex); } - if (next_index) - *next_index = index + c_byte + (length ? 0 : - (SQUASHFS_CHECK_DATA(msblk->sblk.flags) - ? 3 : 2)); + if(next_index) + *next_index = index + c_byte + (length ? 0 : (SQUASHFS_CHECK_DATA(msBlk->sBlk.flags) ? 3 : 2)); + return bytes; block_release: - for (; k < b; k++) - brelse(bh[k]); + while(--b >= 0) brelse(bh[b]); read_failure: ERROR("sb_bread failed reading block 0x%x\n", cur_index); @@ -307,1009 +302,820 @@ read_failure: } -SQSH_EXTERN int squashfs_get_cached_block(struct super_block *s, char *buffer, - long long block, unsigned int offset, - int length, long long *next_block, - unsigned int *next_offset) +static int squashfs_get_cached_block(struct super_block *s, char *buffer, + unsigned int block, unsigned int offset, int length, + unsigned int *next_block, unsigned int *next_offset) { - struct squashfs_sb_info *msblk = s->s_fs_info; + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; int n, i, bytes, return_length = length; - long long next_index; + unsigned int next_index; - TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset); + TRACE("Entered squashfs_get_cached_block [%x:%x]\n", block, offset); - while ( 1 ) { - for (i = 0; i < SQUASHFS_CACHED_BLKS; i++) - if (msblk->block_cache[i].block == block) + for(;;) { + for(i = 0; i < SQUASHFS_CACHED_BLKS; i++) + if(msBlk->block_cache[i].block == block) break; - down(&msblk->block_cache_mutex); - - if (i == SQUASHFS_CACHED_BLKS) { + down(&msBlk->block_cache_mutex); + if(i == SQUASHFS_CACHED_BLKS) { /* read inode header block */ - for (i = msblk->next_cache, n = SQUASHFS_CACHED_BLKS; - n ; n --, i = (i + 1) % - SQUASHFS_CACHED_BLKS) - if (msblk->block_cache[i].block != - SQUASHFS_USED_BLK) + for(i = msBlk->next_cache, n = SQUASHFS_CACHED_BLKS; n ; n --, i = (i + 1) % SQUASHFS_CACHED_BLKS) + if(msBlk->block_cache[i].block != SQUASHFS_USED_BLK) break; - - if (n == 0) { + if(n == 0) { wait_queue_t wait; init_waitqueue_entry(&wait, current); - add_wait_queue(&msblk->waitq, &wait); + add_wait_queue(&msBlk->waitq, &wait); + up(&msBlk->block_cache_mutex); set_current_state(TASK_UNINTERRUPTIBLE); - up(&msblk->block_cache_mutex); schedule(); set_current_state(TASK_RUNNING); - remove_wait_queue(&msblk->waitq, &wait); + remove_wait_queue(&msBlk->waitq, &wait); continue; } - msblk->next_cache = (i + 1) % SQUASHFS_CACHED_BLKS; - - if (msblk->block_cache[i].block == - SQUASHFS_INVALID_BLK) { - if (!(msblk->block_cache[i].data = - kmalloc(SQUASHFS_METADATA_SIZE, - GFP_KERNEL))) { - ERROR("Failed to allocate cache" - "block\n"); - up(&msblk->block_cache_mutex); - goto out; + msBlk->next_cache = (i + 1) % SQUASHFS_CACHED_BLKS; + + if(msBlk->block_cache[i].block == SQUASHFS_INVALID_BLK) { + if(!(msBlk->block_cache[i].data = (unsigned char *) + kmalloc(SQUASHFS_METADATA_SIZE, GFP_KERNEL))) { + ERROR("Failed to allocate cache block\n"); + up(&msBlk->block_cache_mutex); + return 0; } } - msblk->block_cache[i].block = SQUASHFS_USED_BLK; - up(&msblk->block_cache_mutex); - - msblk->block_cache[i].length = squashfs_read_data(s, - msblk->block_cache[i].data, block, 0, &next_index, SQUASHFS_METADATA_SIZE); - if (msblk->block_cache[i].length == 0) { - ERROR("Unable to read cache block [%llx:%x]\n", - block, offset); - down(&msblk->block_cache_mutex); - msblk->block_cache[i].block = SQUASHFS_INVALID_BLK; - kfree(msblk->block_cache[i].data); - wake_up(&msblk->waitq); - up(&msblk->block_cache_mutex); - goto out; + msBlk->block_cache[i].block = SQUASHFS_USED_BLK; + up(&msBlk->block_cache_mutex); + if(!(msBlk->block_cache[i].length = read_data(s, msBlk->block_cache[i].data, block, 0, + &next_index))) { + ERROR("Unable to read cache block [%x:%x]\n", block, offset); + return 0; } - - down(&msblk->block_cache_mutex); - wake_up(&msblk->waitq); - msblk->block_cache[i].block = block; - msblk->block_cache[i].next_index = next_index; - TRACE("Read cache block [%llx:%x]\n", block, offset); + down(&msBlk->block_cache_mutex); + wake_up(&msBlk->waitq); + msBlk->block_cache[i].block = block; + msBlk->block_cache[i].next_index = next_index; + TRACE("Read cache block [%x:%x]\n", block, offset); } - if (msblk->block_cache[i].block != block) { - up(&msblk->block_cache_mutex); + if(msBlk->block_cache[i].block != block) { + up(&msBlk->block_cache_mutex); continue; } - bytes = msblk->block_cache[i].length - offset; - - if (bytes < 1) { - up(&msblk->block_cache_mutex); - goto out; - } else if (bytes >= length) { - if (buffer) - memcpy(buffer, msblk->block_cache[i].data + - offset, length); - if (msblk->block_cache[i].length - offset == length) { - *next_block = msblk->block_cache[i].next_index; + if((bytes = msBlk->block_cache[i].length - offset) >= length) { + if(buffer) + memcpy(buffer, msBlk->block_cache[i].data + offset, length); + if(msBlk->block_cache[i].length - offset == length) { + *next_block = msBlk->block_cache[i].next_index; *next_offset = 0; } else { *next_block = block; *next_offset = offset + length; } - up(&msblk->block_cache_mutex); - goto finish; + + up(&msBlk->block_cache_mutex); + return return_length; } else { - if (buffer) { - memcpy(buffer, msblk->block_cache[i].data + - offset, bytes); + if(buffer) { + memcpy(buffer, msBlk->block_cache[i].data + offset, bytes); buffer += bytes; } - block = msblk->block_cache[i].next_index; - up(&msblk->block_cache_mutex); + block = msBlk->block_cache[i].next_index; + up(&msBlk->block_cache_mutex); length -= bytes; offset = 0; } } - -finish: - return return_length; -out: - return 0; } -static int get_fragment_location(struct super_block *s, unsigned int fragment, - long long *fragment_start_block, - unsigned int *fragment_size) +static int get_fragment_location(struct super_block *s, unsigned int fragment, unsigned int *fragment_start_block, unsigned int *fragment_size) { - struct squashfs_sb_info *msblk = s->s_fs_info; - long long start_block = - msblk->fragment_index[SQUASHFS_FRAGMENT_INDEX(fragment)]; + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + unsigned int start_block = msBlk->fragment_index[SQUASHFS_FRAGMENT_INDEX(fragment)]; int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment); - struct squashfs_fragment_entry fragment_entry; + squashfs_fragment_entry fragment_entry; - if (msblk->swap) { - struct squashfs_fragment_entry sfragment_entry; + if(msBlk->swap) { + squashfs_fragment_entry sfragment_entry; - if (!squashfs_get_cached_block(s, (char *) &sfragment_entry, - start_block, offset, - sizeof(sfragment_entry), &start_block, - &offset)) - goto out; + if(!squashfs_get_cached_block(s, (char *) &sfragment_entry, start_block, offset, + sizeof(sfragment_entry), &start_block, &offset)) + return 0; SQUASHFS_SWAP_FRAGMENT_ENTRY(&fragment_entry, &sfragment_entry); } else - if (!squashfs_get_cached_block(s, (char *) &fragment_entry, - start_block, offset, - sizeof(fragment_entry), &start_block, - &offset)) - goto out; + if(!squashfs_get_cached_block(s, (char *) &fragment_entry, start_block, offset, + sizeof(fragment_entry), &start_block, &offset)) + return 0; *fragment_start_block = fragment_entry.start_block; *fragment_size = fragment_entry.size; return 1; - -out: - return 0; } -SQSH_EXTERN void release_cached_fragment(struct squashfs_sb_info *msblk, struct - squashfs_fragment_cache *fragment) +void release_cached_fragment(squashfs_sb_info *msBlk, struct squashfs_fragment_cache *fragment) { - down(&msblk->fragment_mutex); + down(&msBlk->fragment_mutex); fragment->locked --; - wake_up(&msblk->fragment_wait_queue); - up(&msblk->fragment_mutex); + wake_up(&msBlk->fragment_wait_queue); + up(&msBlk->fragment_mutex); } -SQSH_EXTERN struct squashfs_fragment_cache *get_cached_fragment(struct super_block - *s, long long start_block, - int length) +struct squashfs_fragment_cache *get_cached_fragment(struct super_block *s, unsigned int start_block, int length) { int i, n; - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - - while ( 1 ) { - down(&msblk->fragment_mutex); - - for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS && - msblk->fragment[i].block != start_block; i++); + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; - if (i == SQUASHFS_CACHED_FRAGMENTS) { - for (i = msblk->next_fragment, n = - SQUASHFS_CACHED_FRAGMENTS; n && - msblk->fragment[i].locked; n--, i = (i + 1) % - SQUASHFS_CACHED_FRAGMENTS); + for(;;) { + down(&msBlk->fragment_mutex); + for(i = 0; i < SQUASHFS_CACHED_FRAGMENTS && msBlk->fragment[i].block != start_block; i++); + if(i == SQUASHFS_CACHED_FRAGMENTS) { + for(i = msBlk->next_fragment, n = SQUASHFS_CACHED_FRAGMENTS; + n && msBlk->fragment[i].locked; n--, i = (i + 1) % SQUASHFS_CACHED_FRAGMENTS); - if (n == 0) { + if(n == 0) { wait_queue_t wait; init_waitqueue_entry(&wait, current); - add_wait_queue(&msblk->fragment_wait_queue, - &wait); + add_wait_queue(&msBlk->fragment_wait_queue, &wait); + up(&msBlk->fragment_mutex); set_current_state(TASK_UNINTERRUPTIBLE); - up(&msblk->fragment_mutex); schedule(); set_current_state(TASK_RUNNING); - remove_wait_queue(&msblk->fragment_wait_queue, - &wait); + remove_wait_queue(&msBlk->fragment_wait_queue, &wait); continue; } - msblk->next_fragment = (msblk->next_fragment + 1) % - SQUASHFS_CACHED_FRAGMENTS; + msBlk->next_fragment = (msBlk->next_fragment + 1) % SQUASHFS_CACHED_FRAGMENTS; - if (msblk->fragment[i].data == NULL) - if (!(msblk->fragment[i].data = SQUASHFS_ALLOC - (SQUASHFS_FILE_MAX_SIZE))) { - ERROR("Failed to allocate fragment " - "cache block\n"); - up(&msblk->fragment_mutex); - goto out; + if(msBlk->fragment[i].data == NULL) + if(!(msBlk->fragment[i].data = (unsigned char *) + SQUASHFS_ALLOC(SQUASHFS_FILE_MAX_SIZE))) { + ERROR("Failed to allocate fragment cache block\n"); + up(&msBlk->fragment_mutex); + return NULL; } - msblk->fragment[i].block = SQUASHFS_INVALID_BLK; - msblk->fragment[i].locked = 1; - up(&msblk->fragment_mutex); - - if (!(msblk->fragment[i].length = squashfs_read_data(s, - msblk->fragment[i].data, - start_block, length, NULL, sblk->block_size))) { - ERROR("Unable to read fragment cache block " - "[%llx]\n", start_block); - msblk->fragment[i].locked = 0; - goto out; + msBlk->fragment[i].block = SQUASHFS_INVALID_BLK; + msBlk->fragment[i].locked = 1; + up(&msBlk->fragment_mutex); + if(!(msBlk->fragment[i].length = read_data(s, msBlk->fragment[i].data, start_block, length, + NULL))) { + ERROR("Unable to read fragment cache block [%x]\n", start_block); + msBlk->fragment[i].locked = 0; + return NULL; } - - msblk->fragment[i].block = start_block; - TRACE("New fragment %d, start block %lld, locked %d\n", - i, msblk->fragment[i].block, - msblk->fragment[i].locked); - break; + msBlk->fragment[i].block = start_block; + TRACE("New fragment %d, start block %d, locked %d\n", i, msBlk->fragment[i].block, msBlk->fragment[i].locked); + return &msBlk->fragment[i]; } - msblk->fragment[i].locked++; - up(&msblk->fragment_mutex); - TRACE("Got fragment %d, start block %lld, locked %d\n", i, - msblk->fragment[i].block, - msblk->fragment[i].locked); - break; + msBlk->fragment[i].locked ++; + up(&msBlk->fragment_mutex); + + TRACE("Got fragment %d, start block %d, locked %d\n", i, msBlk->fragment[i].block, msBlk->fragment[i].locked); + return &msBlk->fragment[i]; } - - return &msblk->fragment[i]; - -out: - return NULL; } -static void squashfs_new_inode(struct squashfs_sb_info *msblk, struct inode *i, - struct squashfs_base_inode_header *inodeb) +#ifdef SQUASHFS_1_0_COMPATIBILITY +static struct inode *squashfs_iget_1(struct super_block *s, squashfs_inode inode) { - i->i_ino = inodeb->inode_number; - i->i_mtime.tv_sec = inodeb->mtime; - i->i_atime.tv_sec = inodeb->mtime; - i->i_ctime.tv_sec = inodeb->mtime; - i->i_uid = msblk->uid[inodeb->uid]; - i->i_mode = inodeb->mode; - i->i_size = 0; - if (inodeb->guid == SQUASHFS_GUIDS) - i->i_gid = i->i_uid; - else - i->i_gid = msblk->guid[inodeb->guid]; -} + struct inode *i = new_inode(s); + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + unsigned int block = SQUASHFS_INODE_BLK(inode) + sBlk->inode_table_start; + unsigned int offset = SQUASHFS_INODE_OFFSET(inode); + unsigned int next_block, next_offset; + squashfs_base_inode_header_1 inodeb; + TRACE("Entered squashfs_iget_1\n"); -static squashfs_inode_t squashfs_inode_lookup(struct super_block *s, int ino) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - long long start = msblk->inode_lookup_table[SQUASHFS_LOOKUP_BLOCK(ino - 1)]; - int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino - 1); - squashfs_inode_t inode; + if(msBlk->swap) { + squashfs_base_inode_header_1 sinodeb; - TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino); + if(!squashfs_get_cached_block(s, (char *) &sinodeb, block, offset, + sizeof(sinodeb), &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_BASE_INODE_HEADER_1(&inodeb, &sinodeb, sizeof(sinodeb)); + } else + if(!squashfs_get_cached_block(s, (char *) &inodeb, block, offset, + sizeof(inodeb), &next_block, &next_offset)) + goto failed_read; - if (msblk->swap) { - squashfs_inode_t sinode; + i->i_nlink = 1; - if (!squashfs_get_cached_block(s, (char *) &sinode, start, offset, - sizeof(sinode), &start, &offset)) - goto out; - SQUASHFS_SWAP_INODE_T((&inode), &sinode); - } else if (!squashfs_get_cached_block(s, (char *) &inode, start, offset, - sizeof(inode), &start, &offset)) - goto out; + i->i_mtime.tv_sec = sBlk->mkfs_time; + i->i_atime.tv_sec = sBlk->mkfs_time; + i->i_ctime.tv_sec = sBlk->mkfs_time; - TRACE("squashfs_inode_lookup, inode = 0x%llx\n", inode); + if(inodeb.inode_type != SQUASHFS_IPC_TYPE) + i->i_uid = msBlk->uid[((inodeb.inode_type - 1) / SQUASHFS_TYPES) * 16 + inodeb.uid]; + i->i_ino = SQUASHFS_MK_VFS_INODE(block - sBlk->inode_table_start, offset); - return inode; + i->i_mode = inodeb.mode; -out: - return SQUASHFS_INVALID_BLK; -} - + switch(inodeb.inode_type == SQUASHFS_IPC_TYPE ? SQUASHFS_IPC_TYPE : (inodeb.inode_type - 1) % SQUASHFS_TYPES + 1) { + case SQUASHFS_FILE_TYPE: { + squashfs_reg_inode_header_1 inodep; -static void vfs_read_inode(struct inode *i) -{ - struct squashfs_sb_info *msblk = i->i_sb->s_fs_info; - squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, i->i_ino); + if(msBlk->swap) { + squashfs_reg_inode_header_1 sinodep; - TRACE("Entered vfs_read_inode\n"); + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_REG_INODE_HEADER_1(&inodep, &sinodep); + } else + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) + goto failed_read; - if(inode != SQUASHFS_INVALID_BLK) - (msblk->read_inode)(i, inode); -} + i->i_size = inodep.file_size; + i->i_fop = &generic_ro_fops; + if(sBlk->block_size > 4096) + i->i_data.a_ops = &squashfs_aops; + else if(sBlk->block_size == 4096) + i->i_data.a_ops = &squashfs_aops_4K; + else + i->i_data.a_ops = &squashfs_aops_lessthan4K; + i->i_mode |= S_IFREG; + i->i_mtime.tv_sec = inodep.mtime; + i->i_atime.tv_sec = inodep.mtime; + i->i_ctime.tv_sec = inodep.mtime; + i->i_blocks = ((i->i_size - 1) >> 9) + 1; + i->i_blksize = PAGE_CACHE_SIZE; + SQUASHFS_I(i)->u.s1.fragment_start_block = SQUASHFS_INVALID_BLK; + SQUASHFS_I(i)->u.s1.fragment_offset = 0; + SQUASHFS_I(i)->start_block = inodep.start_block; + SQUASHFS_I(i)->block_list_start = next_block; + SQUASHFS_I(i)->offset = next_offset; + TRACE("File inode %x:%x, start_block %x, block_list_start %x, offset %x\n", + SQUASHFS_INODE_BLK(inode), offset, inodep.start_block, next_block, next_offset); + break; + } + case SQUASHFS_DIR_TYPE: { + squashfs_dir_inode_header_1 inodep; + if(msBlk->swap) { + squashfs_dir_inode_header_1 sinodep; -static struct dentry *squashfs_get_parent(struct dentry *child) -{ - struct inode *i = child->d_inode; - struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode); - struct dentry *rv; + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_DIR_INODE_HEADER_1(&inodep, &sinodep); + } else + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) + goto failed_read; - TRACE("Entered squashfs_get_parent\n"); + i->i_size = inodep.file_size; + i->i_op = &squashfs_dir_inode_ops; + i->i_fop = &squashfs_dir_ops; + i->i_mode |= S_IFDIR; + i->i_mtime.tv_sec = inodep.mtime; + i->i_atime.tv_sec = inodep.mtime; + i->i_ctime.tv_sec = inodep.mtime; + SQUASHFS_I(i)->start_block = inodep.start_block; + SQUASHFS_I(i)->offset = inodep.offset; + SQUASHFS_I(i)->u.s2.directory_index_count = 0; + TRACE("Directory inode %x:%x, start_block %x, offset %x\n", SQUASHFS_INODE_BLK(inode), offset, + inodep.start_block, inodep.offset); + break; + } + case SQUASHFS_SYMLINK_TYPE: { + squashfs_symlink_inode_header_1 inodep; + + if(msBlk->swap) { + squashfs_symlink_inode_header_1 sinodep; - if(parent == NULL) { - rv = ERR_PTR(-EACCES); - goto out; - } + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(&inodep, &sinodep); + } else + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) + goto failed_read; - rv = d_alloc_anon(parent); - if(rv == NULL) - rv = ERR_PTR(-ENOMEM); + i->i_size = inodep.symlink_size; + i->i_op = &page_symlink_inode_operations; + i->i_data.a_ops = &squashfs_symlink_aops; + i->i_mode |= S_IFLNK; + SQUASHFS_I(i)->start_block = next_block; + SQUASHFS_I(i)->offset = next_offset; + TRACE("Symbolic link inode %x:%x, start_block %x, offset %x\n", + SQUASHFS_INODE_BLK(inode), offset, next_block, next_offset); + break; + } + case SQUASHFS_BLKDEV_TYPE: + case SQUASHFS_CHRDEV_TYPE: { + squashfs_dev_inode_header_1 inodep; -out: - return rv; -} + if(msBlk->swap) { + squashfs_dev_inode_header_1 sinodep; - -SQSH_EXTERN struct inode *squashfs_iget(struct super_block *s, squashfs_inode_t inode, unsigned int inode_number) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct inode *i = iget_locked(s, inode_number); + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_DEV_INODE_HEADER_1(&inodep, &sinodep); + } else + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) + goto failed_read; - TRACE("Entered squashfs_iget\n"); + i->i_size = 0; + i->i_mode |= (inodeb.inode_type == SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : S_IFBLK; + init_special_inode(i, i->i_mode, old_decode_dev(inodep.rdev)); + TRACE("Device inode %x:%x, rdev %x\n", SQUASHFS_INODE_BLK(inode), offset, inodep.rdev); + break; + } + case SQUASHFS_IPC_TYPE: { + squashfs_ipc_inode_header_1 inodep; + + if(msBlk->swap) { + squashfs_ipc_inode_header_1 sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) + goto failed_read; + SQUASHFS_SWAP_IPC_INODE_HEADER_1(&inodep, &sinodep); + } else + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) + goto failed_read; - if(i && (i->i_state & I_NEW)) { - (msblk->read_inode)(i, inode); - unlock_new_inode(i); + i->i_size = 0; + i->i_mode |= (inodep.type == SQUASHFS_FIFO_TYPE) ? S_IFIFO : S_IFSOCK; + i->i_uid = msBlk->uid[inodep.offset * 16 + inodeb.uid]; + init_special_inode(i, i->i_mode, 0); + break; + } + default: + ERROR("Unknown inode type %d in squashfs_iget!\n", inodeb.inode_type); + goto failed_read1; } + + if(inodeb.guid == 15) + i->i_gid = i->i_uid; + else + i->i_gid = msBlk->guid[inodeb.guid]; + insert_inode_hash(i); return i; + +failed_read: + ERROR("Unable to read inode [%x:%x]\n", block, offset); + +failed_read1: + return NULL; } +#endif -static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode) +static struct inode *squashfs_iget(struct super_block *s, squashfs_inode inode) { - struct super_block *s = i->i_sb; - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - long long block = SQUASHFS_INODE_BLK(inode) + - sblk->inode_table_start; + struct inode *i = new_inode(s); + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + unsigned int block = SQUASHFS_INODE_BLK(inode) + sBlk->inode_table_start; unsigned int offset = SQUASHFS_INODE_OFFSET(inode); - long long next_block; - unsigned int next_offset; - union squashfs_inode_header id, sid; - struct squashfs_base_inode_header *inodeb = &id.base, - *sinodeb = &sid.base; - - TRACE("Entered squashfs_read_inode\n"); - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) sinodeb, block, - offset, sizeof(*sinodeb), &next_block, - &next_offset)) + unsigned int next_block, next_offset; + squashfs_base_inode_header inodeb; + + TRACE("Entered squashfs_iget\n"); + + if(msBlk->swap) { + squashfs_base_inode_header sinodeb; + + if(!squashfs_get_cached_block(s, (char *) &sinodeb, block, offset, + sizeof(sinodeb), &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_BASE_INODE_HEADER(inodeb, sinodeb, - sizeof(*sinodeb)); + SQUASHFS_SWAP_BASE_INODE_HEADER(&inodeb, &sinodeb, sizeof(sinodeb)); } else - if (!squashfs_get_cached_block(s, (char *) inodeb, block, - offset, sizeof(*inodeb), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodeb, block, offset, + sizeof(inodeb), &next_block, &next_offset)) goto failed_read; - squashfs_new_inode(msblk, i, inodeb); + i->i_nlink = 1; + + i->i_mtime.tv_sec = sBlk->mkfs_time; + i->i_atime.tv_sec = sBlk->mkfs_time; + i->i_ctime.tv_sec = sBlk->mkfs_time; + + i->i_uid = msBlk->uid[inodeb.uid]; + i->i_ino = SQUASHFS_MK_VFS_INODE(block - sBlk->inode_table_start, offset); - switch(inodeb->inode_type) { + i->i_mode = inodeb.mode; + + switch(inodeb.inode_type) { case SQUASHFS_FILE_TYPE: { - unsigned int frag_size; - long long frag_blk; - struct squashfs_reg_inode_header *inodep = &id.reg; - struct squashfs_reg_inode_header *sinodep = &sid.reg; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) + squashfs_reg_inode_header inodep; + + if(msBlk->swap) { + squashfs_reg_inode_header sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_REG_INODE_HEADER(inodep, sinodep); + SQUASHFS_SWAP_REG_INODE_HEADER(&inodep, &sinodep); } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) goto failed_read; - frag_blk = SQUASHFS_INVALID_BLK; - if (inodep->fragment != SQUASHFS_INVALID_FRAG && - !get_fragment_location(s, - inodep->fragment, &frag_blk, &frag_size)) + SQUASHFS_I(i)->u.s1.fragment_start_block = SQUASHFS_INVALID_BLK; + if(inodep.fragment != SQUASHFS_INVALID_BLK && !get_fragment_location(s, inodep.fragment, + &SQUASHFS_I(i)->u.s1.fragment_start_block, &SQUASHFS_I(i)->u.s1.fragment_size)) goto failed_read; - - i->i_nlink = 1; - i->i_size = inodep->file_size; + + SQUASHFS_I(i)->u.s1.fragment_offset = inodep.offset; + i->i_size = inodep.file_size; i->i_fop = &generic_ro_fops; - i->i_mode |= S_IFREG; - i->i_blocks = ((i->i_size - 1) >> 9) + 1; - SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk; - SQUASHFS_I(i)->u.s1.fragment_size = frag_size; - SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->u.s1.block_list_start = next_block; - SQUASHFS_I(i)->offset = next_offset; - if (sblk->block_size > 4096) + if(sBlk->block_size > 4096) i->i_data.a_ops = &squashfs_aops; else i->i_data.a_ops = &squashfs_aops_4K; - - TRACE("File inode %x:%x, start_block %llx, " - "block_list_start %llx, offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->start_block, next_block, - next_offset); - break; - } - case SQUASHFS_LREG_TYPE: { - unsigned int frag_size; - long long frag_blk; - struct squashfs_lreg_inode_header *inodep = &id.lreg; - struct squashfs_lreg_inode_header *sinodep = &sid.lreg; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_LREG_INODE_HEADER(inodep, sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - frag_blk = SQUASHFS_INVALID_BLK; - if (inodep->fragment != SQUASHFS_INVALID_FRAG && - !get_fragment_location(s, - inodep->fragment, &frag_blk, &frag_size)) - goto failed_read; - - i->i_nlink = inodep->nlink; - i->i_size = inodep->file_size; - i->i_fop = &generic_ro_fops; i->i_mode |= S_IFREG; + i->i_mtime.tv_sec = inodep.mtime; + i->i_atime.tv_sec = inodep.mtime; + i->i_ctime.tv_sec = inodep.mtime; i->i_blocks = ((i->i_size - 1) >> 9) + 1; - SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk; - SQUASHFS_I(i)->u.s1.fragment_size = frag_size; - SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->u.s1.block_list_start = next_block; + i->i_blksize = PAGE_CACHE_SIZE; + SQUASHFS_I(i)->start_block = inodep.start_block; + SQUASHFS_I(i)->block_list_start = next_block; SQUASHFS_I(i)->offset = next_offset; - if (sblk->block_size > 4096) - i->i_data.a_ops = &squashfs_aops; - else - i->i_data.a_ops = &squashfs_aops_4K; - - TRACE("File inode %x:%x, start_block %llx, " - "block_list_start %llx, offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->start_block, next_block, - next_offset); + TRACE("File inode %x:%x, start_block %x, block_list_start %x, offset %x\n", + SQUASHFS_INODE_BLK(inode), offset, inodep.start_block, next_block, next_offset); break; } case SQUASHFS_DIR_TYPE: { - struct squashfs_dir_inode_header *inodep = &id.dir; - struct squashfs_dir_inode_header *sinodep = &sid.dir; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) + squashfs_dir_inode_header inodep; + + if(msBlk->swap) { + squashfs_dir_inode_header sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_DIR_INODE_HEADER(inodep, sinodep); + SQUASHFS_SWAP_DIR_INODE_HEADER(&inodep, &sinodep); } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) goto failed_read; - i->i_nlink = inodep->nlink; - i->i_size = inodep->file_size; + i->i_size = inodep.file_size; i->i_op = &squashfs_dir_inode_ops; i->i_fop = &squashfs_dir_ops; i->i_mode |= S_IFDIR; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->offset = inodep->offset; + i->i_mtime.tv_sec = inodep.mtime; + i->i_atime.tv_sec = inodep.mtime; + i->i_ctime.tv_sec = inodep.mtime; + SQUASHFS_I(i)->start_block = inodep.start_block; + SQUASHFS_I(i)->offset = inodep.offset; SQUASHFS_I(i)->u.s2.directory_index_count = 0; - SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode; - - TRACE("Directory inode %x:%x, start_block %x, offset " - "%x\n", SQUASHFS_INODE_BLK(inode), - offset, inodep->start_block, - inodep->offset); + TRACE("Directory inode %x:%x, start_block %x, offset %x\n", SQUASHFS_INODE_BLK(inode), offset, + inodep.start_block, inodep.offset); break; } case SQUASHFS_LDIR_TYPE: { - struct squashfs_ldir_inode_header *inodep = &id.ldir; - struct squashfs_ldir_inode_header *sinodep = &sid.ldir; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) + squashfs_ldir_inode_header inodep; + + if(msBlk->swap) { + squashfs_ldir_inode_header sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_LDIR_INODE_HEADER(inodep, - sinodep); + SQUASHFS_SWAP_LDIR_INODE_HEADER(&inodep, &sinodep); } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) goto failed_read; - i->i_nlink = inodep->nlink; - i->i_size = inodep->file_size; + i->i_size = inodep.file_size; i->i_op = &squashfs_dir_inode_ops; i->i_fop = &squashfs_dir_ops; i->i_mode |= S_IFDIR; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->offset = inodep->offset; + i->i_mtime.tv_sec = inodep.mtime; + i->i_atime.tv_sec = inodep.mtime; + i->i_ctime.tv_sec = inodep.mtime; + SQUASHFS_I(i)->start_block = inodep.start_block; + SQUASHFS_I(i)->offset = inodep.offset; SQUASHFS_I(i)->u.s2.directory_index_start = next_block; - SQUASHFS_I(i)->u.s2.directory_index_offset = - next_offset; - SQUASHFS_I(i)->u.s2.directory_index_count = - inodep->i_count; - SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode; - - TRACE("Long directory inode %x:%x, start_block %x, " - "offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->start_block, inodep->offset); + SQUASHFS_I(i)->u.s2.directory_index_offset = next_offset; + SQUASHFS_I(i)->u.s2.directory_index_count = inodep.i_count; + TRACE("Long directory inode %x:%x, start_block %x, offset %x\n", SQUASHFS_INODE_BLK(inode), offset, + inodep.start_block, inodep.offset); break; } case SQUASHFS_SYMLINK_TYPE: { - struct squashfs_symlink_inode_header *inodep = - &id.symlink; - struct squashfs_symlink_inode_header *sinodep = - &sid.symlink; + squashfs_symlink_inode_header inodep; - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) + if(msBlk->swap) { + squashfs_symlink_inode_header sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_SYMLINK_INODE_HEADER(inodep, - sinodep); + SQUASHFS_SWAP_SYMLINK_INODE_HEADER(&inodep, &sinodep); } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) goto failed_read; - i->i_nlink = inodep->nlink; - i->i_size = inodep->symlink_size; + i->i_size = inodep.symlink_size; i->i_op = &page_symlink_inode_operations; i->i_data.a_ops = &squashfs_symlink_aops; i->i_mode |= S_IFLNK; SQUASHFS_I(i)->start_block = next_block; SQUASHFS_I(i)->offset = next_offset; - - TRACE("Symbolic link inode %x:%x, start_block %llx, " - "offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - next_block, next_offset); + TRACE("Symbolic link inode %x:%x, start_block %x, offset %x\n", + SQUASHFS_INODE_BLK(inode), offset, next_block, next_offset); break; } case SQUASHFS_BLKDEV_TYPE: case SQUASHFS_CHRDEV_TYPE: { - struct squashfs_dev_inode_header *inodep = &id.dev; - struct squashfs_dev_inode_header *sinodep = &sid.dev; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) + squashfs_dev_inode_header inodep; + + if(msBlk->swap) { + squashfs_dev_inode_header sinodep; + + if(!squashfs_get_cached_block(s, (char *) &sinodep, block, offset, sizeof(sinodep), + &next_block, &next_offset)) goto failed_read; - SQUASHFS_SWAP_DEV_INODE_HEADER(inodep, sinodep); + SQUASHFS_SWAP_DEV_INODE_HEADER(&inodep, &sinodep); } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(s, (char *) &inodep, block, offset, sizeof(inodep), + &next_block, &next_offset)) goto failed_read; - i->i_nlink = inodep->nlink; - i->i_mode |= (inodeb->inode_type == - SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : - S_IFBLK; - init_special_inode(i, i->i_mode, - old_decode_dev(inodep->rdev)); - - TRACE("Device inode %x:%x, rdev %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->rdev); + i->i_size = 0; + i->i_mode |= (inodeb.inode_type == SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : S_IFBLK; + init_special_inode(i, i->i_mode, old_decode_dev(inodep.rdev)); + TRACE("Device inode %x:%x, rdev %x\n", SQUASHFS_INODE_BLK(inode), offset, inodep.rdev); break; } case SQUASHFS_FIFO_TYPE: case SQUASHFS_SOCKET_TYPE: { - struct squashfs_ipc_inode_header *inodep = &id.ipc; - struct squashfs_ipc_inode_header *sinodep = &sid.ipc; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_IPC_INODE_HEADER(inodep, sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - i->i_nlink = inodep->nlink; - i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE) - ? S_IFIFO : S_IFSOCK; + i->i_size = 0; + i->i_mode |= (inodeb.inode_type == SQUASHFS_FIFO_TYPE) ? S_IFIFO : S_IFSOCK; init_special_inode(i, i->i_mode, 0); break; } default: - ERROR("Unknown inode type %d in squashfs_iget!\n", - inodeb->inode_type); - goto failed_read1; + ERROR("Unknown inode type %d in squashfs_iget!\n", inodeb.inode_type); + goto failed_read1; } - return 1; + if(inodeb.guid == SQUASHFS_GUIDS) + i->i_gid = i->i_uid; + else + i->i_gid = msBlk->guid[inodeb.guid]; + + insert_inode_hash(i); + return i; failed_read: - ERROR("Unable to read inode [%llx:%x]\n", block, offset); + ERROR("Unable to read inode [%x:%x]\n", block, offset); failed_read1: - make_bad_inode(i); - return 0; -} - - -static int read_inode_lookup_table(struct super_block *s) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - unsigned int length = SQUASHFS_LOOKUP_BLOCK_BYTES(sblk->inodes); - - TRACE("In read_inode_lookup_table, length %d\n", length); - - /* Allocate inode lookup table */ - if (!(msblk->inode_lookup_table = kmalloc(length, GFP_KERNEL))) { - ERROR("Failed to allocate inode lookup table\n"); - return 0; - } - - if (!squashfs_read_data(s, (char *) msblk->inode_lookup_table, - sblk->lookup_table_start, length | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) { - ERROR("unable to read inode lookup table\n"); - return 0; - } - - if (msblk->swap) { - int i; - long long block; - - for (i = 0; i < SQUASHFS_LOOKUP_BLOCKS(sblk->inodes); i++) { - SQUASHFS_SWAP_LOOKUP_BLOCKS((&block), - &msblk->inode_lookup_table[i], 1); - msblk->inode_lookup_table[i] = block; - } - } - - return 1; -} - - -static int read_fragment_index_table(struct super_block *s) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - unsigned int length = SQUASHFS_FRAGMENT_INDEX_BYTES(sblk->fragments); - - if(length == 0) - return 1; - - /* Allocate fragment index table */ - if (!(msblk->fragment_index = kmalloc(length, GFP_KERNEL))) { - ERROR("Failed to allocate fragment index table\n"); - return 0; - } - - if (!squashfs_read_data(s, (char *) msblk->fragment_index, - sblk->fragment_table_start, length | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) { - ERROR("unable to read fragment index table\n"); - return 0; - } - - if (msblk->swap) { - int i; - long long fragment; - - for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES(sblk->fragments); i++) { - SQUASHFS_SWAP_FRAGMENT_INDEXES((&fragment), - &msblk->fragment_index[i], 1); - msblk->fragment_index[i] = fragment; - } - } - - return 1; -} - - -static int supported_squashfs_filesystem(struct squashfs_sb_info *msblk, int silent) -{ - struct squashfs_super_block *sblk = &msblk->sblk; - - msblk->read_inode = squashfs_read_inode; - msblk->read_blocklist = read_blocklist; - msblk->read_fragment_index_table = read_fragment_index_table; - - if (sblk->s_major == 1) { - if (!squashfs_1_0_supported(msblk)) { - SERROR("Major/Minor mismatch, Squashfs 1.0 filesystems " - "are unsupported\n"); - SERROR("Please recompile with " - "Squashfs 1.0 support enabled\n"); - return 0; - } - } else if (sblk->s_major == 2) { - if (!squashfs_2_0_supported(msblk)) { - SERROR("Major/Minor mismatch, Squashfs 2.0 filesystems " - "are unsupported\n"); - SERROR("Please recompile with " - "Squashfs 2.0 support enabled\n"); - return 0; - } - } else if(sblk->s_major != SQUASHFS_MAJOR || sblk->s_minor > - SQUASHFS_MINOR) { - SERROR("Major/Minor mismatch, trying to mount newer %d.%d " - "filesystem\n", sblk->s_major, sblk->s_minor); - SERROR("Please update your kernel\n"); - return 0; - } - - return 1; + return NULL; } -static int squashfs_fill_super(struct super_block *s, void *data, int silent) +static int squashfs_fill_super(struct super_block *s, + void *data, int silent) { - struct squashfs_sb_info *msblk; - struct squashfs_super_block *sblk; + squashfs_sb_info *msBlk; + squashfs_super_block *sBlk; int i; char b[BDEVNAME_SIZE]; - struct inode *root; TRACE("Entered squashfs_read_superblock\n"); - if (!(s->s_fs_info = kmalloc(sizeof(struct squashfs_sb_info), - GFP_KERNEL))) { + if(!(s->s_fs_info = (void *) kmalloc(sizeof(squashfs_sb_info), GFP_KERNEL))) { ERROR("Failed to allocate superblock\n"); - goto failure; - } - memset(s->s_fs_info, 0, sizeof(struct squashfs_sb_info)); - msblk = s->s_fs_info; - if (!(msblk->stream.workspace = vmalloc(zlib_inflate_workspacesize()))) { - ERROR("Failed to allocate zlib workspace\n"); - goto failure; + return -ENOMEM; } - sblk = &msblk->sblk; + msBlk = (squashfs_sb_info *) s->s_fs_info; + sBlk = &msBlk->sBlk; - msblk->devblksize = sb_min_blocksize(s, BLOCK_SIZE); - msblk->devblksize_log2 = ffz(~msblk->devblksize); - - init_MUTEX(&msblk->read_data_mutex); - init_MUTEX(&msblk->read_page_mutex); - init_MUTEX(&msblk->block_cache_mutex); - init_MUTEX(&msblk->fragment_mutex); - init_MUTEX(&msblk->meta_index_mutex); + msBlk->devblksize = sb_min_blocksize(s, BLOCK_SIZE); + msBlk->devblksize_log2 = ffz(~msBlk->devblksize); + + init_MUTEX(&msBlk->read_page_mutex); + init_MUTEX(&msBlk->block_cache_mutex); + init_MUTEX(&msBlk->fragment_mutex); - init_waitqueue_head(&msblk->waitq); - init_waitqueue_head(&msblk->fragment_wait_queue); + init_waitqueue_head(&msBlk->waitq); + init_waitqueue_head(&msBlk->fragment_wait_queue); - sblk->bytes_used = sizeof(struct squashfs_super_block); - if (!squashfs_read_data(s, (char *) sblk, SQUASHFS_START, - sizeof(struct squashfs_super_block) | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, sizeof(struct squashfs_super_block))) { + if(!read_data(s, (char *) sBlk, SQUASHFS_START, sizeof(squashfs_super_block) | SQUASHFS_COMPRESSED_BIT_BLOCK, NULL)) { SERROR("unable to read superblock\n"); goto failed_mount; } /* Check it is a SQUASHFS superblock */ - msblk->swap = 0; - if ((s->s_magic = sblk->s_magic) != SQUASHFS_MAGIC) { - if (sblk->s_magic == SQUASHFS_MAGIC_SWAP) { - struct squashfs_super_block ssblk; - - WARNING("Mounting a different endian SQUASHFS " - "filesystem on %s\n", bdevname(s->s_bdev, b)); - - SQUASHFS_SWAP_SUPER_BLOCK(&ssblk, sblk); - memcpy(sblk, &ssblk, sizeof(struct squashfs_super_block)); - msblk->swap = 1; + msBlk->swap = 0; + if((s->s_magic = sBlk->s_magic) != SQUASHFS_MAGIC) { + if(sBlk->s_magic == SQUASHFS_MAGIC_SWAP) { + squashfs_super_block sblk; + WARNING("Mounting a different endian SQUASHFS filesystem on %s\n", bdevname(s->s_bdev, b)); + SQUASHFS_SWAP_SUPER_BLOCK(&sblk, sBlk); + memcpy(sBlk, &sblk, sizeof(squashfs_super_block)); + msBlk->swap = 1; } else { - SERROR("Can't find a SQUASHFS superblock on %s\n", - bdevname(s->s_bdev, b)); + SERROR("Can't find a SQUASHFS superblock on %s\n", bdevname(s->s_bdev, b)); goto failed_mount; } } /* Check the MAJOR & MINOR versions */ - if(!supported_squashfs_filesystem(msblk, silent)) - goto failed_mount; - - /* Check the filesystem does not extend beyond the end of the - block device */ - if(sblk->bytes_used < 0 || sblk->bytes_used > i_size_read(s->s_bdev->bd_inode)) +#ifdef SQUASHFS_1_0_COMPATIBILITY + if((sBlk->s_major != 1) && (sBlk->s_major != 2 || sBlk->s_minor > SQUASHFS_MINOR)) { + SERROR("Major/Minor mismatch, filesystem is (%d:%d), I support (1 : x) or (2 : <= %d)\n", + sBlk->s_major, sBlk->s_minor, SQUASHFS_MINOR); goto failed_mount; - - /* Check the root inode for sanity */ - if (SQUASHFS_INODE_OFFSET(sblk->root_inode) > SQUASHFS_METADATA_SIZE) + } + if(sBlk->s_major == 1) + sBlk->block_size = sBlk->block_size_1; +#else + if(sBlk->s_major != SQUASHFS_MAJOR || sBlk->s_minor > SQUASHFS_MINOR) { + SERROR("Major/Minor mismatch, filesystem is (%d:%d), I support (%d: <= %d)\n", + sBlk->s_major, sBlk->s_minor, SQUASHFS_MAJOR, SQUASHFS_MINOR); goto failed_mount; + } +#endif TRACE("Found valid superblock on %s\n", bdevname(s->s_bdev, b)); - TRACE("Inodes are %scompressed\n", - SQUASHFS_UNCOMPRESSED_INODES - (sblk->flags) ? "un" : ""); - TRACE("Data is %scompressed\n", - SQUASHFS_UNCOMPRESSED_DATA(sblk->flags) - ? "un" : ""); - TRACE("Check data is %s present in the filesystem\n", - SQUASHFS_CHECK_DATA(sblk->flags) ? - "" : "not"); - TRACE("Filesystem size %lld bytes\n", sblk->bytes_used); - TRACE("Block size %d\n", sblk->block_size); - TRACE("Number of inodes %d\n", sblk->inodes); - if (sblk->s_major > 1) - TRACE("Number of fragments %d\n", sblk->fragments); - TRACE("Number of uids %d\n", sblk->no_uids); - TRACE("Number of gids %d\n", sblk->no_guids); - TRACE("sblk->inode_table_start %llx\n", sblk->inode_table_start); - TRACE("sblk->directory_table_start %llx\n", sblk->directory_table_start); - if (sblk->s_major > 1) - TRACE("sblk->fragment_table_start %llx\n", - sblk->fragment_table_start); - TRACE("sblk->uid_start %llx\n", sblk->uid_start); + TRACE("Inodes are %scompressed\n", SQUASHFS_UNCOMPRESSED_INODES(sBlk->flags) ? "un" : ""); + TRACE("Data is %scompressed\n", SQUASHFS_UNCOMPRESSED_DATA(sBlk->flags) ? "un" : ""); + TRACE("Check data is %s present in the filesystem\n", SQUASHFS_CHECK_DATA(sBlk->flags) ? "" : "not"); + TRACE("Filesystem size %d bytes\n", sBlk->bytes_used); + TRACE("Block size %d\n", sBlk->block_size); + TRACE("Number of inodes %d\n", sBlk->inodes); + if(sBlk->s_major > 1) + TRACE("Number of fragments %d\n", sBlk->fragments); + TRACE("Number of uids %d\n", sBlk->no_uids); + TRACE("Number of gids %d\n", sBlk->no_guids); + TRACE("sBlk->inode_table_start %x\n", sBlk->inode_table_start); + TRACE("sBlk->directory_table_start %x\n", sBlk->directory_table_start); + if(sBlk->s_major > 1) + TRACE("sBlk->fragment_table_start %x\n", sBlk->fragment_table_start); + TRACE("sBlk->uid_start %x\n", sBlk->uid_start); s->s_flags |= MS_RDONLY; - s->s_op = &squashfs_super_ops; + s->s_op = &squashfs_ops; /* Init inode_table block pointer array */ - if (!(msblk->block_cache = kmalloc(sizeof(struct squashfs_cache) * - SQUASHFS_CACHED_BLKS, GFP_KERNEL))) { + if(!(msBlk->block_cache = (squashfs_cache *) kmalloc(sizeof(squashfs_cache) * SQUASHFS_CACHED_BLKS, GFP_KERNEL))) { ERROR("Failed to allocate block cache\n"); goto failed_mount; } - for (i = 0; i < SQUASHFS_CACHED_BLKS; i++) - msblk->block_cache[i].block = SQUASHFS_INVALID_BLK; + for(i = 0; i < SQUASHFS_CACHED_BLKS; i++) + msBlk->block_cache[i].block = SQUASHFS_INVALID_BLK; - msblk->next_cache = 0; + msBlk->next_cache = 0; /* Allocate read_data block */ - msblk->read_size = (sblk->block_size < SQUASHFS_METADATA_SIZE) ? - SQUASHFS_METADATA_SIZE : - sblk->block_size; - - if (!(msblk->read_data = kmalloc(msblk->read_size, GFP_KERNEL))) { + msBlk->read_size = (sBlk->block_size < SQUASHFS_METADATA_SIZE) ? SQUASHFS_METADATA_SIZE : sBlk->block_size; + if(!(msBlk->read_data = (char *) kmalloc(msBlk->read_size, GFP_KERNEL))) { ERROR("Failed to allocate read_data block\n"); - goto failed_mount; + goto failed_mount1; } /* Allocate read_page block */ - if (!(msblk->read_page = kmalloc(sblk->block_size, GFP_KERNEL))) { - ERROR("Failed to allocate read_page block\n"); - goto failed_mount; - } + if(sBlk->block_size > PAGE_CACHE_SIZE) { + if(!(msBlk->read_page = (char *) kmalloc(sBlk->block_size, GFP_KERNEL))) { + ERROR("Failed to allocate read_page block\n"); + goto failed_mount2; + } + } else + msBlk->read_page = NULL; /* Allocate uid and gid tables */ - if (!(msblk->uid = kmalloc((sblk->no_uids + sblk->no_guids) * - sizeof(unsigned int), GFP_KERNEL))) { + if(!(msBlk->uid = (squashfs_uid *) kmalloc((sBlk->no_uids + + sBlk->no_guids) * sizeof(squashfs_uid), GFP_KERNEL))) { ERROR("Failed to allocate uid/gid table\n"); - goto failed_mount; + goto failed_mount3; } - msblk->guid = msblk->uid + sblk->no_uids; + msBlk->guid = msBlk->uid + sBlk->no_uids; - if (msblk->swap) { - unsigned int suid[sblk->no_uids + sblk->no_guids]; - - if (!squashfs_read_data(s, (char *) &suid, sblk->uid_start, - ((sblk->no_uids + sblk->no_guids) * - sizeof(unsigned int)) | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) { - ERROR("unable to read uid/gid table\n"); - goto failed_mount; - } + if(msBlk->swap) { + squashfs_uid suid[sBlk->no_uids + sBlk->no_guids]; - SQUASHFS_SWAP_DATA(msblk->uid, suid, (sblk->no_uids + - sblk->no_guids), (sizeof(unsigned int) * 8)); + if(!read_data(s, (char *) &suid, sBlk->uid_start, ((sBlk->no_uids + sBlk->no_guids) * + sizeof(squashfs_uid)) | SQUASHFS_COMPRESSED_BIT_BLOCK, NULL)) { + SERROR("unable to read uid/gid table\n"); + goto failed_mount4; + } + SQUASHFS_SWAP_DATA(msBlk->uid, suid, (sBlk->no_uids + sBlk->no_guids), (sizeof(squashfs_uid) * 8)); } else - if (!squashfs_read_data(s, (char *) msblk->uid, sblk->uid_start, - ((sblk->no_uids + sblk->no_guids) * - sizeof(unsigned int)) | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) { - ERROR("unable to read uid/gid table\n"); - goto failed_mount; + if(!read_data(s, (char *) msBlk->uid, sBlk->uid_start, ((sBlk->no_uids + sBlk->no_guids) * + sizeof(squashfs_uid)) | SQUASHFS_COMPRESSED_BIT_BLOCK, NULL)) { + SERROR("unable to read uid/gid table\n"); + goto failed_mount4; } - if (sblk->s_major == 1 && squashfs_1_0_supported(msblk)) +#ifdef SQUASHFS_1_0_COMPATIBILITY + if(sBlk->s_major == 1) { + msBlk->iget = squashfs_iget_1; + msBlk->read_blocklist = read_blocklist_1; + msBlk->fragment = NULL; + msBlk->fragment_index = NULL; goto allocate_root; + } +#endif + msBlk->iget = squashfs_iget; + msBlk->read_blocklist = read_blocklist; - if (!(msblk->fragment = kmalloc(sizeof(struct squashfs_fragment_cache) * - SQUASHFS_CACHED_FRAGMENTS, GFP_KERNEL))) { + if(!(msBlk->fragment = (struct squashfs_fragment_cache *) kmalloc(sizeof(struct squashfs_fragment_cache) * SQUASHFS_CACHED_FRAGMENTS, GFP_KERNEL))) { ERROR("Failed to allocate fragment block cache\n"); - goto failed_mount; + goto failed_mount4; } - for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) { - msblk->fragment[i].locked = 0; - msblk->fragment[i].block = SQUASHFS_INVALID_BLK; - msblk->fragment[i].data = NULL; + for(i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) { + msBlk->fragment[i].locked = 0; + msBlk->fragment[i].block = SQUASHFS_INVALID_BLK; + msBlk->fragment[i].data = NULL; } - msblk->next_fragment = 0; + msBlk->next_fragment = 0; - /* Allocate and read fragment index table */ - if (msblk->read_fragment_index_table(s) == 0) - goto failed_mount; - - if(sblk->lookup_table_start == SQUASHFS_INVALID_BLK) - goto allocate_root; + /* Allocate fragment index table */ + if(!(msBlk->fragment_index = (squashfs_fragment_index *) kmalloc(SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments), GFP_KERNEL))) { + ERROR("Failed to allocate uid/gid table\n"); + goto failed_mount5; + } + + if(SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments) && + !read_data(s, (char *) msBlk->fragment_index, sBlk->fragment_table_start, + SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk->fragments) | SQUASHFS_COMPRESSED_BIT_BLOCK, NULL)) { + SERROR("unable to read fragment index table\n"); + goto failed_mount6; + } - /* Allocate and read inode lookup table */ - if (read_inode_lookup_table(s) == 0) - goto failed_mount; + if(msBlk->swap) { + int i; + squashfs_fragment_index fragment; - s->s_op = &squashfs_export_super_ops; - s->s_export_op = &squashfs_export_ops; + for(i = 0; i < SQUASHFS_FRAGMENT_INDEXES(sBlk->fragments); i++) { + SQUASHFS_SWAP_FRAGMENT_INDEXES((&fragment), &msBlk->fragment_index[i], 1); + msBlk->fragment_index[i] = fragment; + } + } +#ifdef SQUASHFS_1_0_COMPATIBILITY allocate_root: - root = new_inode(s); - if ((msblk->read_inode)(root, sblk->root_inode) == 0) - goto failed_mount; - insert_inode_hash(root); - - if ((s->s_root = d_alloc_root(root)) == NULL) { +#endif + if(!(s->s_root = d_alloc_root((msBlk->iget)(s, sBlk->root_inode)))) { ERROR("Root inode create failed\n"); - iput(root); - goto failed_mount; + goto failed_mount5; } TRACE("Leaving squashfs_read_super\n"); return 0; +failed_mount6: + kfree(msBlk->fragment_index); +failed_mount5: + kfree(msBlk->fragment); +failed_mount4: + kfree(msBlk->uid); +failed_mount3: + kfree(msBlk->read_page); +failed_mount2: + kfree(msBlk->read_data); +failed_mount1: + kfree(msBlk->block_cache); failed_mount: - kfree(msblk->inode_lookup_table); - kfree(msblk->fragment_index); - kfree(msblk->fragment); - kfree(msblk->uid); - kfree(msblk->read_page); - kfree(msblk->read_data); - kfree(msblk->block_cache); - kfree(msblk->fragment_index_2); - vfree(msblk->stream.workspace); kfree(s->s_fs_info); s->s_fs_info = NULL; return -EINVAL; - -failure: - return -ENOMEM; } -static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int squashfs_statfs(struct super_block *s, struct kstatfs *buf) { - struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; + squashfs_super_block *sBlk = &((squashfs_sb_info *)s->s_fs_info)->sBlk; TRACE("Entered squashfs_statfs\n"); - buf->f_type = SQUASHFS_MAGIC; - buf->f_bsize = sblk->block_size; - buf->f_blocks = ((sblk->bytes_used - 1) >> sblk->block_log) + 1; + buf->f_bsize = sBlk->block_size; + buf->f_blocks = ((sBlk->bytes_used - 1) >> sBlk->block_log) + 1; buf->f_bfree = buf->f_bavail = 0; - buf->f_files = sblk->inodes; + buf->f_files = sBlk->inodes; buf->f_ffree = 0; buf->f_namelen = SQUASHFS_NAME_LEN; - return 0; } @@ -1318,41 +1124,35 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page) { struct inode *inode = page->mapping->host; int index = page->index << PAGE_CACHE_SHIFT, length, bytes; - long long block = SQUASHFS_I(inode)->start_block; + unsigned int block = SQUASHFS_I(inode)->start_block; int offset = SQUASHFS_I(inode)->offset; void *pageaddr = kmap(page); - TRACE("Entered squashfs_symlink_readpage, page index %ld, start block " - "%llx, offset %x\n", page->index, - SQUASHFS_I(inode)->start_block, - SQUASHFS_I(inode)->offset); - - for (length = 0; length < index; length += bytes) { - if (!(bytes = squashfs_get_cached_block(inode->i_sb, NULL, - block, offset, PAGE_CACHE_SIZE, &block, - &offset))) { - ERROR("Unable to read symbolic link [%llx:%x]\n", block, - offset); + TRACE("Entered squashfs_symlink_readpage, page index %d, start block %x, offset %x\n", + page->index, SQUASHFS_I(inode)->start_block, SQUASHFS_I(inode)->offset); + + for(length = 0; length < index; length += bytes) { + if(!(bytes = squashfs_get_cached_block(inode->i_sb, NULL, block, offset, + PAGE_CACHE_SIZE, &block, &offset))) { + ERROR("Unable to read symbolic link [%x:%x]\n", block, offset); goto skip_read; } } - if (length != index) { + if(length != index) { ERROR("(squashfs_symlink_readpage) length != index\n"); bytes = 0; goto skip_read; } - bytes = (i_size_read(inode) - length) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : - i_size_read(inode) - length; - - if (!(bytes = squashfs_get_cached_block(inode->i_sb, pageaddr, block, - offset, bytes, &block, &offset))) - ERROR("Unable to read symbolic link [%llx:%x]\n", block, offset); + bytes = (inode->i_size - length) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : inode->i_size - length; + if(!(bytes = squashfs_get_cached_block(inode->i_sb, pageaddr, block, offset, bytes, &block, &offset))) + ERROR("Unable to read symbolic link [%x:%x]\n", block, offset); skip_read: memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes); kunmap(page); + flush_dcache_page(page); SetPageUptodate(page); unlock_page(page); @@ -1360,386 +1160,179 @@ skip_read: } -struct meta_index *locate_meta_index(struct inode *inode, int index, int offset) -{ - struct meta_index *meta = NULL; - struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; - int i; - - down(&msblk->meta_index_mutex); - - TRACE("locate_meta_index: index %d, offset %d\n", index, offset); - - if(msblk->meta_index == NULL) - goto not_allocated; - - for (i = 0; i < SQUASHFS_META_NUMBER; i ++) - if (msblk->meta_index[i].inode_number == inode->i_ino && - msblk->meta_index[i].offset >= offset && - msblk->meta_index[i].offset <= index && - msblk->meta_index[i].locked == 0) { - TRACE("locate_meta_index: entry %d, offset %d\n", i, - msblk->meta_index[i].offset); - meta = &msblk->meta_index[i]; - offset = meta->offset; - } - - if (meta) - meta->locked = 1; - -not_allocated: - up(&msblk->meta_index_mutex); - - return meta; -} - +#define SIZE 256 -struct meta_index *empty_meta_index(struct inode *inode, int offset, int skip) +#ifdef SQUASHFS_1_0_COMPATIBILITY +static unsigned int read_blocklist_1(struct inode *inode, int index, int readahead_blks, + char *block_list, unsigned short **block_p, unsigned int *bsize) { - struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; - struct meta_index *meta = NULL; - int i; - - down(&msblk->meta_index_mutex); - - TRACE("empty_meta_index: offset %d, skip %d\n", offset, skip); + squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info; + unsigned short *block_listp; + int i = 0; + int block_ptr = SQUASHFS_I(inode)->block_list_start; + int offset = SQUASHFS_I(inode)->offset; + unsigned int block = SQUASHFS_I(inode)->start_block; - if(msblk->meta_index == NULL) { - if (!(msblk->meta_index = kmalloc(sizeof(struct meta_index) * - SQUASHFS_META_NUMBER, GFP_KERNEL))) { - ERROR("Failed to allocate meta_index\n"); - goto failed; - } - for(i = 0; i < SQUASHFS_META_NUMBER; i++) { - msblk->meta_index[i].inode_number = 0; - msblk->meta_index[i].locked = 0; + for(;;) { + int blocks = (index + readahead_blks - i); + if(blocks > (SIZE >> 1)) { + if((index - i) <= (SIZE >> 1)) + blocks = index - i; + else + blocks = SIZE >> 1; } - msblk->next_meta_index = 0; - } - for(i = SQUASHFS_META_NUMBER; i && - msblk->meta_index[msblk->next_meta_index].locked; i --) - msblk->next_meta_index = (msblk->next_meta_index + 1) % - SQUASHFS_META_NUMBER; - - if(i == 0) { - TRACE("empty_meta_index: failed!\n"); - goto failed; + if(msBlk->swap) { + unsigned char sblock_list[SIZE]; + if(!squashfs_get_cached_block(inode->i_sb, (char *) sblock_list, block_ptr, offset, blocks << 1, &block_ptr, &offset)) { + ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset); + return 0; + } + SQUASHFS_SWAP_SHORTS(((unsigned short *)block_list), ((unsigned short *)sblock_list), blocks); + } else + if(!squashfs_get_cached_block(inode->i_sb, (char *) block_list, block_ptr, offset, blocks << 1, &block_ptr, &offset)) { + ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset); + return 0; + } + for(block_listp = (unsigned short *) block_list; i < index && blocks; i ++, block_listp ++, blocks --) + block += SQUASHFS_COMPRESSED_SIZE(*block_listp); + if(blocks >= readahead_blks) + break; } - TRACE("empty_meta_index: returned meta entry %d, %p\n", - msblk->next_meta_index, - &msblk->meta_index[msblk->next_meta_index]); - - meta = &msblk->meta_index[msblk->next_meta_index]; - msblk->next_meta_index = (msblk->next_meta_index + 1) % - SQUASHFS_META_NUMBER; - - meta->inode_number = inode->i_ino; - meta->offset = offset; - meta->skip = skip; - meta->entries = 0; - meta->locked = 1; - -failed: - up(&msblk->meta_index_mutex); - return meta; -} - - -void release_meta_index(struct inode *inode, struct meta_index *meta) -{ - meta->locked = 0; -} - - -static int read_block_index(struct super_block *s, int blocks, char *block_list, - long long *start_block, int *offset) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - unsigned int *block_listp; - int block = 0; - - if (msblk->swap) { - char sblock_list[blocks << 2]; - - if (!squashfs_get_cached_block(s, sblock_list, *start_block, - *offset, blocks << 2, start_block, offset)) { - ERROR("Unable to read block list [%llx:%x]\n", - *start_block, *offset); - goto failure; - } - SQUASHFS_SWAP_INTS(((unsigned int *)block_list), - ((unsigned int *)sblock_list), blocks); - } else - if (!squashfs_get_cached_block(s, block_list, *start_block, - *offset, blocks << 2, start_block, offset)) { - ERROR("Unable to read block list [%llx:%x]\n", - *start_block, *offset); - goto failure; - } - - for (block_listp = (unsigned int *) block_list; blocks; - block_listp++, blocks --) - block += SQUASHFS_COMPRESSED_SIZE_BLOCK(*block_listp); - + if(bsize) + *bsize = SQUASHFS_COMPRESSED_SIZE(*block_listp) | (!SQUASHFS_COMPRESSED(*block_listp) ? SQUASHFS_COMPRESSED_BIT_BLOCK : 0); + else + *block_p = block_listp; return block; - -failure: - return -1; } +#endif -#define SIZE 256 - -static inline int calculate_skip(int blocks) { - int skip = (blocks - 1) / ((SQUASHFS_SLOTS * SQUASHFS_META_ENTRIES + 1) * SQUASHFS_META_INDEXES); - return skip >= 7 ? 7 : skip + 1; -} - - -static int get_meta_index(struct inode *inode, int index, - long long *index_block, int *index_offset, - long long *data_block, char *block_list) +static unsigned int read_blocklist(struct inode *inode, int index, int readahead_blks, + char *block_list, unsigned short **block_p, unsigned int *bsize) { - struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - int skip = calculate_skip(i_size_read(inode) >> sblk->block_log); - int offset = 0; - struct meta_index *meta; - struct meta_entry *meta_entry; - long long cur_index_block = SQUASHFS_I(inode)->u.s1.block_list_start; - int cur_offset = SQUASHFS_I(inode)->offset; - long long cur_data_block = SQUASHFS_I(inode)->start_block; - int i; - - index /= SQUASHFS_META_INDEXES * skip; - - while ( offset < index ) { - meta = locate_meta_index(inode, index, offset + 1); + squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info; + unsigned int *block_listp; + int i = 0; + int block_ptr = SQUASHFS_I(inode)->block_list_start; + int offset = SQUASHFS_I(inode)->offset; + unsigned int block = SQUASHFS_I(inode)->start_block; - if (meta == NULL) { - if ((meta = empty_meta_index(inode, offset + 1, - skip)) == NULL) - goto all_done; - } else { - if(meta->entries == 0) - goto failed; - offset = index < meta->offset + meta->entries ? index : - meta->offset + meta->entries - 1; - meta_entry = &meta->meta_entry[offset - meta->offset]; - cur_index_block = meta_entry->index_block + sblk->inode_table_start; - cur_offset = meta_entry->offset; - cur_data_block = meta_entry->data_block; - TRACE("get_meta_index: offset %d, meta->offset %d, " - "meta->entries %d\n", offset, meta->offset, - meta->entries); - TRACE("get_meta_index: index_block 0x%llx, offset 0x%x" - " data_block 0x%llx\n", cur_index_block, - cur_offset, cur_data_block); + for(;;) { + int blocks = (index + readahead_blks - i); + if(blocks > (SIZE >> 2)) { + if((index - i) <= (SIZE >> 2)) + blocks = index - i; + else + blocks = SIZE >> 2; } - for (i = meta->offset + meta->entries; i <= index && - i < meta->offset + SQUASHFS_META_ENTRIES; i++) { - int blocks = skip * SQUASHFS_META_INDEXES; - - while (blocks) { - int block = blocks > (SIZE >> 2) ? (SIZE >> 2) : - blocks; - int res = read_block_index(inode->i_sb, block, - block_list, &cur_index_block, - &cur_offset); - - if (res == -1) - goto failed; - - cur_data_block += res; - blocks -= block; + if(msBlk->swap) { + unsigned char sblock_list[SIZE]; + if(!squashfs_get_cached_block(inode->i_sb, (char *) sblock_list, block_ptr, offset, blocks << 2, &block_ptr, &offset)) { + ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset); + return 0; } - - meta_entry = &meta->meta_entry[i - meta->offset]; - meta_entry->index_block = cur_index_block - sblk->inode_table_start; - meta_entry->offset = cur_offset; - meta_entry->data_block = cur_data_block; - meta->entries ++; - offset ++; - } - - TRACE("get_meta_index: meta->offset %d, meta->entries %d\n", - meta->offset, meta->entries); - - release_meta_index(inode, meta); - } - -all_done: - *index_block = cur_index_block; - *index_offset = cur_offset; - *data_block = cur_data_block; - - return offset * SQUASHFS_META_INDEXES * skip; - -failed: - release_meta_index(inode, meta); - return -1; -} - - -static long long read_blocklist(struct inode *inode, int index, - int readahead_blks, char *block_list, - unsigned short **block_p, unsigned int *bsize) -{ - long long block_ptr; - int offset; - long long block; - int res = get_meta_index(inode, index, &block_ptr, &offset, &block, - block_list); - - TRACE("read_blocklist: res %d, index %d, block_ptr 0x%llx, offset" - " 0x%x, block 0x%llx\n", res, index, block_ptr, offset, - block); - - if(res == -1) - goto failure; - - index -= res; - - while ( index ) { - int blocks = index > (SIZE >> 2) ? (SIZE >> 2) : index; - int res = read_block_index(inode->i_sb, blocks, block_list, - &block_ptr, &offset); - if (res == -1) - goto failure; - block += res; - index -= blocks; + SQUASHFS_SWAP_INTS(((unsigned int *)block_list), ((unsigned int *)sblock_list), blocks); + } else + if(!squashfs_get_cached_block(inode->i_sb, (char *) block_list, block_ptr, offset, blocks << 2, &block_ptr, &offset)) { + ERROR("Unable to read block list [%d:%x]\n", block_ptr, offset); + return 0; + } + for(block_listp = (unsigned int *) block_list; i < index && blocks; i ++, block_listp ++, blocks --) + block += SQUASHFS_COMPRESSED_SIZE_BLOCK(*block_listp); + if(blocks >= readahead_blks) + break; } - if (read_block_index(inode->i_sb, 1, block_list, - &block_ptr, &offset) == -1) - goto failure; - *bsize = *((unsigned int *) block_list); - + *bsize = *block_listp; return block; - -failure: - return 0; } static int squashfs_readpage(struct file *file, struct page *page) { struct inode *inode = page->mapping->host; - struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - unsigned char *block_list; - long long block; - unsigned int bsize, i = 0, bytes = 0, byte_offset = 0; - int index = page->index >> (sblk->block_log - PAGE_CACHE_SHIFT); - void *pageaddr; + squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + unsigned char block_list[SIZE]; + unsigned int bsize, block, i = 0, bytes = 0, byte_offset = 0; + int index = page->index >> (sBlk->block_log - PAGE_CACHE_SHIFT); + void *pageaddr = kmap(page); struct squashfs_fragment_cache *fragment = NULL; - char *data_ptr = msblk->read_page; + char *data_ptr = msBlk->read_page; - int mask = (1 << (sblk->block_log - PAGE_CACHE_SHIFT)) - 1; + int mask = (1 << (sBlk->block_log - PAGE_CACHE_SHIFT)) - 1; int start_index = page->index & ~mask; int end_index = start_index | mask; - TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n", - page->index, - SQUASHFS_I(inode)->start_block); + TRACE("Entered squashfs_readpage, page index %x, start block %x\n", (unsigned int) page->index, + SQUASHFS_I(inode)->start_block); - if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) { - ERROR("Failed to allocate block_list\n"); + if(page->index >= ((inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)) { goto skip_read; } - if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> - PAGE_CACHE_SHIFT)) - goto skip_read; - - if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK - || index < (i_size_read(inode) >> - sblk->block_log)) { - if ((block = (msblk->read_blocklist)(inode, index, 1, - block_list, NULL, &bsize)) == 0) + if(SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK || index < (inode->i_size >> sBlk->block_log)) { + if((block = (msBlk->read_blocklist)(inode, index, 1, block_list, NULL, &bsize)) == 0) goto skip_read; - down(&msblk->read_page_mutex); - - if (!(bytes = squashfs_read_data(inode->i_sb, msblk->read_page, - block, bsize, NULL, sblk->block_size))) { - ERROR("Unable to read page, block %llx, size %x\n", block, - bsize); - up(&msblk->read_page_mutex); + down(&msBlk->read_page_mutex); + if(!(bytes = read_data(inode->i_sb, msBlk->read_page, block, bsize, NULL))) { + ERROR("Unable to read page, block %x, size %x\n", block, bsize); + up(&msBlk->read_page_mutex); goto skip_read; } } else { - if ((fragment = get_cached_fragment(inode->i_sb, - SQUASHFS_I(inode)-> - u.s1.fragment_start_block, - SQUASHFS_I(inode)->u.s1.fragment_size)) - == NULL) { - ERROR("Unable to read page, block %llx, size %x\n", - SQUASHFS_I(inode)-> - u.s1.fragment_start_block, - (int) SQUASHFS_I(inode)-> - u.s1.fragment_size); + if((fragment = get_cached_fragment(inode->i_sb, SQUASHFS_I(inode)->u.s1.fragment_start_block, SQUASHFS_I(inode)->u.s1.fragment_size)) == NULL) { + ERROR("Unable to read page, block %x, size %x\n", SQUASHFS_I(inode)->u.s1.fragment_start_block, (int) SQUASHFS_I(inode)->u.s1.fragment_size); goto skip_read; } - bytes = SQUASHFS_I(inode)->u.s1.fragment_offset + - (i_size_read(inode) & (sblk->block_size - - 1)); + bytes = SQUASHFS_I(inode)->u.s1.fragment_offset + (inode->i_size & (sBlk->block_size - 1)); byte_offset = SQUASHFS_I(inode)->u.s1.fragment_offset; data_ptr = fragment->data; } - for (i = start_index; i <= end_index && byte_offset < bytes; - i++, byte_offset += PAGE_CACHE_SIZE) { + for(i = start_index; i <= end_index && byte_offset < bytes; i++, byte_offset += PAGE_CACHE_SIZE) { struct page *push_page; - int avail = (bytes - byte_offset) > PAGE_CACHE_SIZE ? - PAGE_CACHE_SIZE : bytes - byte_offset; - - TRACE("bytes %d, i %d, byte_offset %d, available_bytes %d\n", - bytes, i, byte_offset, avail); - - push_page = (i == page->index) ? page : - grab_cache_page_nowait(page->mapping, i); - - if (!push_page) - continue; - - if (PageUptodate(push_page)) - goto skip_page; - - pageaddr = kmap_atomic(push_page, KM_USER0); - memcpy(pageaddr, data_ptr + byte_offset, avail); - memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail); - kunmap_atomic(pageaddr, KM_USER0); - flush_dcache_page(push_page); - SetPageUptodate(push_page); -skip_page: - unlock_page(push_page); - if(i != page->index) + int available_bytes = (bytes - byte_offset) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE : bytes - byte_offset; + + TRACE("bytes %d, i %d, byte_offset %d, available_bytes %d\n", bytes, i, byte_offset, available_bytes); + + if(i == page->index) { + memcpy(pageaddr, data_ptr + byte_offset, available_bytes); + memset(pageaddr + available_bytes, 0, PAGE_CACHE_SIZE - available_bytes); + kunmap(page); + flush_dcache_page(page); + SetPageUptodate(page); + unlock_page(page); + } else if((push_page = grab_cache_page_nowait(page->mapping, i))) { + void *pageaddr = kmap(push_page); + memcpy(pageaddr, data_ptr + byte_offset, available_bytes); + memset(pageaddr + available_bytes, 0, PAGE_CACHE_SIZE - available_bytes); + kunmap(push_page); + flush_dcache_page(push_page); + SetPageUptodate(push_page); + unlock_page(push_page); page_cache_release(push_page); + } } - if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK - || index < (i_size_read(inode) >> - sblk->block_log)) - up(&msblk->read_page_mutex); + if(SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK || index < (inode->i_size >> sBlk->block_log)) + up(&msBlk->read_page_mutex); else - release_cached_fragment(msblk, fragment); + release_cached_fragment(msBlk, fragment); - kfree(block_list); return 0; skip_read: - pageaddr = kmap_atomic(page, KM_USER0); memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes); - kunmap_atomic(pageaddr, KM_USER0); + kunmap(page); flush_dcache_page(page); SetPageUptodate(page); unlock_page(page); - kfree(block_list); return 0; } @@ -1747,439 +1340,346 @@ skip_read: static int squashfs_readpage4K(struct file *file, struct page *page) { struct inode *inode = page->mapping->host; - struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - unsigned char *block_list; - long long block; - unsigned int bsize, bytes = 0; - void *pageaddr; + squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + unsigned char block_list[SIZE]; + unsigned int bsize, block, bytes = 0; + void *pageaddr = kmap(page); - TRACE("Entered squashfs_readpage4K, page index %lx, start block %llx\n", - page->index, - SQUASHFS_I(inode)->start_block); + TRACE("Entered squashfs_readpage4K, page index %x, start block %x\n", (unsigned int) page->index, + SQUASHFS_I(inode)->start_block); - if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> - PAGE_CACHE_SHIFT)) { - block_list = NULL; + if(page->index >= ((inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT)) { goto skip_read; } - if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) { - ERROR("Failed to allocate block_list\n"); - goto skip_read; - } + if(SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK || page->index < (inode->i_size >> sBlk->block_log)) { + block = (msBlk->read_blocklist)(inode, page->index, 1, block_list, NULL, &bsize); - if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK - || page->index < (i_size_read(inode) >> - sblk->block_log)) { - block = (msblk->read_blocklist)(inode, page->index, 1, - block_list, NULL, &bsize); - if(block == 0) - goto skip_read; - - down(&msblk->read_page_mutex); - bytes = squashfs_read_data(inode->i_sb, msblk->read_page, block, - bsize, NULL, sblk->block_size); - if (bytes) { - pageaddr = kmap_atomic(page, KM_USER0); - memcpy(pageaddr, msblk->read_page, bytes); - kunmap_atomic(pageaddr, KM_USER0); - } else - ERROR("Unable to read page, block %llx, size %x\n", - block, bsize); - up(&msblk->read_page_mutex); + if(!(bytes = read_data(inode->i_sb, pageaddr, block, bsize, NULL))) + ERROR("Unable to read page, block %x, size %x\n", block, bsize); } else { - struct squashfs_fragment_cache *fragment = - get_cached_fragment(inode->i_sb, - SQUASHFS_I(inode)-> - u.s1.fragment_start_block, - SQUASHFS_I(inode)-> u.s1.fragment_size); - if (fragment) { - bytes = i_size_read(inode) & (sblk->block_size - 1); - pageaddr = kmap_atomic(page, KM_USER0); - memcpy(pageaddr, fragment->data + SQUASHFS_I(inode)-> - u.s1.fragment_offset, bytes); - kunmap_atomic(pageaddr, KM_USER0); - release_cached_fragment(msblk, fragment); - } else - ERROR("Unable to read page, block %llx, size %x\n", - SQUASHFS_I(inode)-> - u.s1.fragment_start_block, (int) - SQUASHFS_I(inode)-> u.s1.fragment_size); + struct squashfs_fragment_cache *fragment; + + if((fragment = get_cached_fragment(inode->i_sb, SQUASHFS_I(inode)->u.s1.fragment_start_block, SQUASHFS_I(inode)->u.s1.fragment_size)) == NULL) + ERROR("Unable to read page, block %x, size %x\n", SQUASHFS_I(inode)->u.s1.fragment_start_block, (int) SQUASHFS_I(inode)->u.s1.fragment_size); + else { + bytes = inode->i_size & (sBlk->block_size - 1); + memcpy(pageaddr, fragment->data + SQUASHFS_I(inode)->u.s1.fragment_offset, bytes); + release_cached_fragment(msBlk, fragment); + } } skip_read: - pageaddr = kmap_atomic(page, KM_USER0); memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes); - kunmap_atomic(pageaddr, KM_USER0); + kunmap(page); + flush_dcache_page(page); + SetPageUptodate(page); + unlock_page(page); + + return 0; +} + + +#ifdef SQUASHFS_1_0_COMPATIBILITY +static int squashfs_readpage_lessthan4K(struct file *file, struct page *page) +{ + struct inode *inode = page->mapping->host; + squashfs_sb_info *msBlk = (squashfs_sb_info *)inode->i_sb->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + unsigned char block_list[SIZE]; + unsigned short *block_listp, block, bytes = 0; + int index = page->index << (PAGE_CACHE_SHIFT - sBlk->block_log); + int file_blocks = ((inode->i_size - 1) >> sBlk->block_log) + 1; + int readahead_blks = 1 << (PAGE_CACHE_SHIFT - sBlk->block_log); + void *pageaddr = kmap(page); + + int i_end = index + (1 << (PAGE_CACHE_SHIFT - sBlk->block_log)); + int byte; + + TRACE("Entered squashfs_readpage_lessthan4K, page index %x, start block %x\n", (unsigned int) page->index, + SQUASHFS_I(inode)->start_block); + + block = read_blocklist_1(inode, index, readahead_blks, block_list, &block_listp, NULL); + + if(i_end > file_blocks) + i_end = file_blocks; + + while(index < i_end) { + int c_byte = !SQUASHFS_COMPRESSED(*block_listp) ? SQUASHFS_COMPRESSED_SIZE(*block_listp) | SQUASHFS_COMPRESSED_BIT_BLOCK : *block_listp; + if(!(byte = read_data(inode->i_sb, pageaddr, block, c_byte, NULL))) { + ERROR("Unable to read page, block %x, size %x\n", block, *block_listp); + goto skip_read; + } + block += SQUASHFS_COMPRESSED_SIZE(*block_listp); + pageaddr += byte; + bytes += byte; + index ++; + block_listp ++; + } + +skip_read: + memset(pageaddr, 0, PAGE_CACHE_SIZE - bytes); + kunmap(page); flush_dcache_page(page); SetPageUptodate(page); unlock_page(page); - kfree(block_list); return 0; } +#endif -static int get_dir_index_using_offset(struct super_block *s, long long - *next_block, unsigned int *next_offset, - long long index_start, - unsigned int index_offset, int i_count, - long long f_pos) +static int get_dir_index_using_offset(struct super_block *s, unsigned int *next_block, + unsigned int *next_offset, unsigned int index_start, unsigned int index_offset, + int i_count, long long f_pos) { - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; int i, length = 0; - struct squashfs_dir_index index; + squashfs_dir_index index; - TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n", - i_count, (unsigned int) f_pos); + TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n", i_count, (unsigned int) f_pos); - f_pos =- 3; - if (f_pos == 0) - goto finish; + if(f_pos == 0) + return 0; - for (i = 0; i < i_count; i++) { - if (msblk->swap) { - struct squashfs_dir_index sindex; - squashfs_get_cached_block(s, (char *) &sindex, - index_start, index_offset, - sizeof(sindex), &index_start, - &index_offset); + for(i = 0; i < i_count; i++) { + if(msBlk->swap) { + squashfs_dir_index sindex; + squashfs_get_cached_block(s, (char *) &sindex, index_start, index_offset, + sizeof(sindex), &index_start, &index_offset); SQUASHFS_SWAP_DIR_INDEX(&index, &sindex); } else - squashfs_get_cached_block(s, (char *) &index, - index_start, index_offset, - sizeof(index), &index_start, - &index_offset); + squashfs_get_cached_block(s, (char *) &index, index_start, index_offset, + sizeof(index), &index_start, &index_offset); - if (index.index > f_pos) + if(index.index > f_pos) break; squashfs_get_cached_block(s, NULL, index_start, index_offset, - index.size + 1, &index_start, - &index_offset); + index.size + 1, &index_start, &index_offset); length = index.index; - *next_block = index.start_block + sblk->directory_table_start; + *next_block = index.start_block + sBlk->directory_table_start; } *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; - -finish: - return length + 3; + return length; } -static int get_dir_index_using_name(struct super_block *s, long long - *next_block, unsigned int *next_offset, - long long index_start, - unsigned int index_offset, int i_count, - const char *name, int size) +static int get_dir_index_using_name(struct super_block *s, unsigned int *next_block, + unsigned int *next_offset, unsigned int index_start, unsigned int index_offset, + int i_count, const char *name, int size) { - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; + squashfs_sb_info *msBlk = (squashfs_sb_info *)s->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; int i, length = 0; - struct squashfs_dir_index *index; - char *str; + char buffer[sizeof(squashfs_dir_index) + SQUASHFS_NAME_LEN + 1]; + squashfs_dir_index *index = (squashfs_dir_index *) buffer; + char str[SQUASHFS_NAME_LEN + 1]; TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count); - if (!(str = kmalloc(sizeof(struct squashfs_dir_index) + - (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) { - ERROR("Failed to allocate squashfs_dir_index\n"); - goto failure; - } - - index = (struct squashfs_dir_index *) (str + SQUASHFS_NAME_LEN + 1); strncpy(str, name, size); str[size] = '\0'; - for (i = 0; i < i_count; i++) { - if (msblk->swap) { - struct squashfs_dir_index sindex; - squashfs_get_cached_block(s, (char *) &sindex, - index_start, index_offset, - sizeof(sindex), &index_start, - &index_offset); + for(i = 0; i < i_count; i++) { + if(msBlk->swap) { + squashfs_dir_index sindex; + squashfs_get_cached_block(s, (char *) &sindex, index_start, index_offset, + sizeof(sindex), &index_start, &index_offset); SQUASHFS_SWAP_DIR_INDEX(index, &sindex); } else - squashfs_get_cached_block(s, (char *) index, - index_start, index_offset, - sizeof(struct squashfs_dir_index), - &index_start, &index_offset); + squashfs_get_cached_block(s, (char *) index, index_start, index_offset, + sizeof(squashfs_dir_index), &index_start, &index_offset); - squashfs_get_cached_block(s, index->name, index_start, - index_offset, index->size + 1, - &index_start, &index_offset); + squashfs_get_cached_block(s, index->name, index_start, index_offset, + index->size + 1, &index_start, &index_offset); index->name[index->size + 1] = '\0'; - if (strcmp(index->name, str) > 0) + if(strcmp(index->name, str) > 0) break; length = index->index; - *next_block = index->start_block + sblk->directory_table_start; + *next_block = index->start_block + sBlk->directory_table_start; } *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; - kfree(str); -failure: - return length + 3; + return length; } static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir) { struct inode *i = file->f_dentry->d_inode; - struct squashfs_sb_info *msblk = i->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - long long next_block = SQUASHFS_I(i)->start_block + - sblk->directory_table_start; - int next_offset = SQUASHFS_I(i)->offset, length = 0, - dir_count; - struct squashfs_dir_header dirh; - struct squashfs_dir_entry *dire; - - TRACE("Entered squashfs_readdir [%llx:%x]\n", next_block, next_offset); - - if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) + - SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) { - ERROR("Failed to allocate squashfs_dir_entry\n"); - goto finish; - } + squashfs_sb_info *msBlk = (squashfs_sb_info *)i->i_sb->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + int next_block = SQUASHFS_I(i)->start_block + sBlk->directory_table_start, next_offset = + SQUASHFS_I(i)->offset, length = 0, dirs_read = 0, dir_count; + squashfs_dir_header dirh; + char buffer[sizeof(squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1]; + squashfs_dir_entry *dire = (squashfs_dir_entry *) buffer; - while(file->f_pos < 3) { - char *name; - int size, i_ino; + TRACE("Entered squashfs_readdir [%x:%x]\n", next_block, next_offset); - if(file->f_pos == 0) { - name = "."; - size = 1; - i_ino = i->i_ino; - } else { - name = ".."; - size = 2; - i_ino = SQUASHFS_I(i)->u.s2.parent_inode; - } - TRACE("Calling filldir(%x, %s, %d, %d, %d, %d)\n", - (unsigned int) dirent, name, size, (int) - file->f_pos, i_ino, - squashfs_filetype_table[1]); - - if (filldir(dirent, name, size, - file->f_pos, i_ino, - squashfs_filetype_table[1]) < 0) { - TRACE("Filldir returned less than 0\n"); - goto finish; - } - file->f_pos += size; - } + lock_kernel(); - length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset, - SQUASHFS_I(i)->u.s2.directory_index_start, - SQUASHFS_I(i)->u.s2.directory_index_offset, - SQUASHFS_I(i)->u.s2.directory_index_count, - file->f_pos); + length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset, SQUASHFS_I(i)->u.s2.directory_index_start, + SQUASHFS_I(i)->u.s2.directory_index_offset, SQUASHFS_I(i)->u.s2.directory_index_count, file->f_pos); - while (length < i_size_read(i)) { + while(length < i->i_size) { /* read directory header */ - if (msblk->swap) { - struct squashfs_dir_header sdirh; - - if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, - next_block, next_offset, sizeof(sdirh), - &next_block, &next_offset)) + if(msBlk->swap) { + squashfs_dir_header sdirh; + if(!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, next_block, + next_offset, sizeof(sdirh), &next_block, &next_offset)) goto failed_read; - length += sizeof(sdirh); SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh); } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh, - next_block, next_offset, sizeof(dirh), - &next_block, &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, (char *) &dirh, next_block, + next_offset, sizeof(dirh), &next_block, &next_offset)) goto failed_read; - length += sizeof(dirh); } dir_count = dirh.count + 1; - while (dir_count--) { - if (msblk->swap) { - struct squashfs_dir_entry sdire; - if (!squashfs_get_cached_block(i->i_sb, (char *) - &sdire, next_block, next_offset, - sizeof(sdire), &next_block, - &next_offset)) + while(dir_count--) { + if(msBlk->swap) { + squashfs_dir_entry sdire; + if(!squashfs_get_cached_block(i->i_sb, (char *) &sdire, next_block, + next_offset, sizeof(sdire), &next_block, &next_offset)) goto failed_read; - length += sizeof(sdire); SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire); } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) - dire, next_block, next_offset, - sizeof(*dire), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, (char *) dire, next_block, + next_offset, sizeof(*dire), &next_block, &next_offset)) goto failed_read; - length += sizeof(*dire); } - if (!squashfs_get_cached_block(i->i_sb, dire->name, - next_block, next_offset, - dire->size + 1, &next_block, - &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, dire->name, next_block, + next_offset, dire->size + 1, &next_block, &next_offset)) goto failed_read; - length += dire->size + 1; - if (file->f_pos >= length) + if(file->f_pos >= length) continue; dire->name[dire->size + 1] = '\0'; - TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d, %d)\n", - (unsigned int) dirent, dire->name, - dire->size + 1, (int) file->f_pos, - dirh.start_block, dire->offset, - dirh.inode_number + dire->inode_number, - squashfs_filetype_table[dire->type]); - - if (filldir(dirent, dire->name, dire->size + 1, - file->f_pos, - dirh.inode_number + dire->inode_number, - squashfs_filetype_table[dire->type]) - < 0) { + TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d)\n", (unsigned int) dirent, + dire->name, dire->size + 1, (int) file->f_pos, + dirh.start_block, dire->offset, squashfs_filetype_table[dire->type]); + + if(filldir(dirent, dire->name, dire->size + 1, file->f_pos, SQUASHFS_MK_VFS_INODE(dirh.start_block, + dire->offset), squashfs_filetype_table[dire->type]) < 0) { TRACE("Filldir returned less than 0\n"); - goto finish; + unlock_kernel(); + return dirs_read; } + file->f_pos = length; + dirs_read ++; } } -finish: - kfree(dire); - return 0; + unlock_kernel(); + return dirs_read; failed_read: - ERROR("Unable to read directory block [%llx:%x]\n", next_block, - next_offset); - kfree(dire); + unlock_kernel(); + ERROR("Unable to read directory block [%x:%x]\n", next_block, next_offset); return 0; } -static struct dentry *squashfs_lookup(struct inode *i, struct dentry *dentry, - struct nameidata *nd) +static struct dentry *squashfs_lookup(struct inode *i, struct dentry *dentry, struct nameidata *nd) { - const unsigned char *name = dentry->d_name.name; + const unsigned char *name =dentry->d_name.name; int len = dentry->d_name.len; struct inode *inode = NULL; - struct squashfs_sb_info *msblk = i->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - long long next_block = SQUASHFS_I(i)->start_block + - sblk->directory_table_start; - int next_offset = SQUASHFS_I(i)->offset, length = 0, - dir_count; - struct squashfs_dir_header dirh; - struct squashfs_dir_entry *dire; - - TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset); - - if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) + - SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) { - ERROR("Failed to allocate squashfs_dir_entry\n"); - goto exit_lookup; - } + squashfs_sb_info *msBlk = (squashfs_sb_info *)i->i_sb->s_fs_info; + squashfs_super_block *sBlk = &msBlk->sBlk; + int next_block = SQUASHFS_I(i)->start_block + sBlk->directory_table_start, next_offset = + SQUASHFS_I(i)->offset, length = 0, dir_count; + squashfs_dir_header dirh; + char buffer[sizeof(squashfs_dir_entry) + SQUASHFS_NAME_LEN]; + squashfs_dir_entry *dire = (squashfs_dir_entry *) buffer; + int squashfs_2_1 = sBlk->s_major == 2 && sBlk->s_minor == 1; - if (len > SQUASHFS_NAME_LEN) - goto exit_lookup; + TRACE("Entered squashfs_lookup [%x:%x]\n", next_block, next_offset); - length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset, - SQUASHFS_I(i)->u.s2.directory_index_start, - SQUASHFS_I(i)->u.s2.directory_index_offset, - SQUASHFS_I(i)->u.s2.directory_index_count, name, - len); + lock_kernel(); - while (length < i_size_read(i)) { + length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset, SQUASHFS_I(i)->u.s2.directory_index_start, + SQUASHFS_I(i)->u.s2.directory_index_offset, SQUASHFS_I(i)->u.s2.directory_index_count, name, len); + + while(length < i->i_size) { /* read directory header */ - if (msblk->swap) { - struct squashfs_dir_header sdirh; - if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, - next_block, next_offset, sizeof(sdirh), - &next_block, &next_offset)) + if(msBlk->swap) { + squashfs_dir_header sdirh; + if(!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, next_block, next_offset, + sizeof(sdirh), &next_block, &next_offset)) goto failed_read; - length += sizeof(sdirh); SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh); } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh, - next_block, next_offset, sizeof(dirh), - &next_block, &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, (char *) &dirh, next_block, next_offset, + sizeof(dirh), &next_block, &next_offset)) goto failed_read; - length += sizeof(dirh); } dir_count = dirh.count + 1; - while (dir_count--) { - if (msblk->swap) { - struct squashfs_dir_entry sdire; - if (!squashfs_get_cached_block(i->i_sb, (char *) - &sdire, next_block,next_offset, - sizeof(sdire), &next_block, - &next_offset)) + while(dir_count--) { + if(msBlk->swap) { + squashfs_dir_entry sdire; + if(!squashfs_get_cached_block(i->i_sb, (char *) &sdire, + next_block,next_offset, sizeof(sdire), &next_block, &next_offset)) goto failed_read; - length += sizeof(sdire); SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire); } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) - dire, next_block,next_offset, - sizeof(*dire), &next_block, - &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, (char *) dire, + next_block,next_offset, sizeof(*dire), &next_block, &next_offset)) goto failed_read; - length += sizeof(*dire); } - if (!squashfs_get_cached_block(i->i_sb, dire->name, - next_block, next_offset, dire->size + 1, - &next_block, &next_offset)) + if(!squashfs_get_cached_block(i->i_sb, dire->name, + next_block, next_offset, dire->size + 1, &next_block, &next_offset)) goto failed_read; - length += dire->size + 1; - if (name[0] < dire->name[0]) - goto exit_lookup; + if(squashfs_2_1 && name[0] < dire->name[0]) + goto exit_loop; - if ((len == dire->size + 1) && !strncmp(name, dire->name, len)) { - squashfs_inode_t ino = SQUASHFS_MKINODE(dirh.start_block, - dire->offset); + if((len == dire->size + 1) && !strncmp(name, dire->name, len)) { + squashfs_inode ino = SQUASHFS_MKINODE(dirh.start_block, dire->offset); - TRACE("calling squashfs_iget for directory " - "entry %s, inode %x:%x, %d\n", name, - dirh.start_block, dire->offset, - dirh.inode_number + dire->inode_number); + TRACE("calling squashfs_iget for directory entry %s, inode %x:%x\n", + name, dirh.start_block, dire->offset); - inode = squashfs_iget(i->i_sb, ino, dirh.inode_number + dire->inode_number); + inode = (msBlk->iget)(i->i_sb, ino); - goto exit_lookup; + goto exit_loop; } } } -exit_lookup: - kfree(dire); - if (inode) - return d_splice_alias(inode, dentry); +exit_loop: d_add(dentry, inode); + unlock_kernel(); return ERR_PTR(0); failed_read: - ERROR("Unable to read directory block [%llx:%x]\n", next_block, - next_offset); - goto exit_lookup; + ERROR("Unable to read directory block [%x:%x]\n", next_block, next_offset); + goto exit_loop; } @@ -2187,59 +1687,62 @@ static void squashfs_put_super(struct super_block *s) { int i; - if (s->s_fs_info) { - struct squashfs_sb_info *sbi = s->s_fs_info; - if (sbi->block_cache) - for (i = 0; i < SQUASHFS_CACHED_BLKS; i++) - if (sbi->block_cache[i].block != - SQUASHFS_INVALID_BLK) + if(s->s_fs_info) { + squashfs_sb_info *sbi = (squashfs_sb_info *) s->s_fs_info; + if(sbi->block_cache) { + for(i = 0; i < SQUASHFS_CACHED_BLKS; i++) + if(sbi->block_cache[i].block != SQUASHFS_INVALID_BLK) kfree(sbi->block_cache[i].data); - if (sbi->fragment) - for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) - SQUASHFS_FREE(sbi->fragment[i].data); - kfree(sbi->fragment); - kfree(sbi->block_cache); - kfree(sbi->read_data); - kfree(sbi->read_page); - kfree(sbi->uid); - kfree(sbi->fragment_index); - kfree(sbi->fragment_index_2); - kfree(sbi->meta_index); - vfree(sbi->stream.workspace); + kfree(sbi->block_cache); + } + if(sbi->read_data) kfree(sbi->read_data); + if(sbi->read_page) kfree(sbi->read_page); + if(sbi->uid) kfree(sbi->uid); + if(sbi->fragment) { + for(i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) + if(sbi->fragment[i].data != NULL) + SQUASHFS_FREE(sbi->fragment[i].data); + kfree(sbi->fragment); + } + if(sbi->fragment_index) kfree(sbi->fragment_index); kfree(s->s_fs_info); s->s_fs_info = NULL; } } -static int squashfs_get_sb(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block *squashfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super); } static int __init init_squashfs_fs(void) { int err = init_inodecache(); - if (err) - goto out; + if(err) + return err; - printk(KERN_INFO "squashfs: version 3.2-alpha (2006/12/12) " - "Phillip Lougher\n"); + printk(KERN_INFO "Squashfs 2.2-r2 (released 2005/09/08) (C) 2002-2005 Phillip Lougher\n"); - if ((err = register_filesystem(&squashfs_fs_type))) + if(!(stream.workspace = (char *) vmalloc(zlib_inflate_workspacesize()))) { + ERROR("Failed to allocate zlib workspace\n"); destroy_inodecache(); + return -ENOMEM; + } + + if((err = register_filesystem(&squashfs_fs_type))) { + vfree(stream.workspace); + destroy_inodecache(); + } -out: return err; } static void __exit exit_squashfs_fs(void) { + vfree(stream.workspace); unregister_filesystem(&squashfs_fs_type); destroy_inodecache(); } @@ -2251,7 +1754,7 @@ static kmem_cache_t * squashfs_inode_cachep; static struct inode *squashfs_alloc_inode(struct super_block *sb) { struct squashfs_inode_info *ei; - ei = kmem_cache_alloc(squashfs_inode_cachep, SLAB_KERNEL); + ei = (struct squashfs_inode_info *)kmem_cache_alloc(squashfs_inode_cachep, SLAB_KERNEL); if (!ei) return NULL; return &ei->vfs_inode; @@ -2266,20 +1769,20 @@ static void squashfs_destroy_inode(struct inode *inode) static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) { - struct squashfs_inode_info *ei = foo; + struct squashfs_inode_info *ei = (struct squashfs_inode_info *) foo; if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == - SLAB_CTOR_CONSTRUCTOR) + SLAB_CTOR_CONSTRUCTOR) inode_init_once(&ei->vfs_inode); } -static int __init init_inodecache(void) +static int init_inodecache(void) { squashfs_inode_cachep = kmem_cache_create("squashfs_inode_cache", - sizeof(struct squashfs_inode_info), - 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, - init_once, NULL); + sizeof(struct squashfs_inode_info), + 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, + init_once, NULL); if (squashfs_inode_cachep == NULL) return -ENOMEM; return 0; @@ -2288,12 +1791,13 @@ static int __init init_inodecache(void) static void destroy_inodecache(void) { - kmem_cache_destroy(squashfs_inode_cachep); + if (kmem_cache_destroy(squashfs_inode_cachep)) + printk(KERN_INFO "squashfs_inode_cache: not all structures were freed\n"); } module_init(init_squashfs_fs); module_exit(exit_squashfs_fs); -MODULE_DESCRIPTION("squashfs 3.2, a compressed read-only filesystem"); -MODULE_AUTHOR("Phillip Lougher "); +MODULE_DESCRIPTION("squashfs, a compressed read-only filesystem"); +MODULE_AUTHOR("Phillip Lougher "); MODULE_LICENSE("GPL"); diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h deleted file mode 100644 index dcbef0d11..000000000 --- a/fs/squashfs/squashfs.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Squashfs - a compressed read only filesystem for Linux - * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher - * - * 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, - * 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * squashfs.h - */ - -#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY -#undef CONFIG_SQUASHFS_1_0_COMPATIBILITY -#endif - -#ifdef SQUASHFS_TRACE -#define TRACE(s, args...) printk(KERN_NOTICE "SQUASHFS: "s, ## args) -#else -#define TRACE(s, args...) {} -#endif - -#define ERROR(s, args...) printk(KERN_ERR "SQUASHFS error: "s, ## args) - -#define SERROR(s, args...) do { \ - if (!silent) \ - printk(KERN_ERR "SQUASHFS error: "s, ## args);\ - } while(0) - -#define WARNING(s, args...) printk(KERN_WARNING "SQUASHFS: "s, ## args) - -static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode) -{ - return list_entry(inode, struct squashfs_inode_info, vfs_inode); -} - -#if defined(CONFIG_SQUASHFS_1_0_COMPATIBILITY ) || defined(CONFIG_SQUASHFS_2_0_COMPATIBILITY) -#define SQSH_EXTERN -extern unsigned int squashfs_read_data(struct super_block *s, char *buffer, - long long index, unsigned int length, - long long *next_index); -extern int squashfs_get_cached_block(struct super_block *s, char *buffer, - long long block, unsigned int offset, - int length, long long *next_block, - unsigned int *next_offset); -extern void release_cached_fragment(struct squashfs_sb_info *msblk, struct - squashfs_fragment_cache *fragment); -extern struct squashfs_fragment_cache *get_cached_fragment(struct super_block - *s, long long start_block, - int length); -extern struct address_space_operations squashfs_symlink_aops; -extern struct address_space_operations squashfs_aops; -extern struct address_space_operations squashfs_aops_4K; -extern struct inode_operations squashfs_dir_inode_ops; -#else -#define SQSH_EXTERN static -#endif - -#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY -extern int squashfs_1_0_supported(struct squashfs_sb_info *msblk); -#else -static inline int squashfs_1_0_supported(struct squashfs_sb_info *msblk) -{ - return 0; -} -#endif - -#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY -extern int squashfs_2_0_supported(struct squashfs_sb_info *msblk); -#else -static inline int squashfs_2_0_supported(struct squashfs_sb_info *msblk) -{ - return 0; -} -#endif diff --git a/fs/squashfs/squashfs2_0.c b/fs/squashfs/squashfs2_0.c deleted file mode 100644 index 53ce95e26..000000000 --- a/fs/squashfs/squashfs2_0.c +++ /dev/null @@ -1,758 +0,0 @@ -/* - * Squashfs - a compressed read only filesystem for Linux - * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher - * - * 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, - * 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * squashfs2_0.c - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "squashfs.h" -static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir); -static struct dentry *squashfs_lookup_2(struct inode *, struct dentry *, - struct nameidata *); - -static struct file_operations squashfs_dir_ops_2 = { - .read = generic_read_dir, - .readdir = squashfs_readdir_2 -}; - -static struct inode_operations squashfs_dir_inode_ops_2 = { - .lookup = squashfs_lookup_2 -}; - -static unsigned char squashfs_filetype_table[] = { - DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK -}; - -static int read_fragment_index_table_2(struct super_block *s) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - - if (!(msblk->fragment_index_2 = kmalloc(SQUASHFS_FRAGMENT_INDEX_BYTES_2 - (sblk->fragments), GFP_KERNEL))) { - ERROR("Failed to allocate uid/gid table\n"); - return 0; - } - - if (SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments) && - !squashfs_read_data(s, (char *) - msblk->fragment_index_2, - sblk->fragment_table_start, - SQUASHFS_FRAGMENT_INDEX_BYTES_2 - (sblk->fragments) | - SQUASHFS_COMPRESSED_BIT_BLOCK, NULL)) { - ERROR("unable to read fragment index table\n"); - return 0; - } - - if (msblk->swap) { - int i; - unsigned int fragment; - - for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES_2(sblk->fragments); - i++) { - SQUASHFS_SWAP_FRAGMENT_INDEXES_2((&fragment), - &msblk->fragment_index_2[i], 1); - msblk->fragment_index_2[i] = fragment; - } - } - - return 1; -} - - -static int get_fragment_location_2(struct super_block *s, unsigned int fragment, - long long *fragment_start_block, - unsigned int *fragment_size) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - long long start_block = - msblk->fragment_index_2[SQUASHFS_FRAGMENT_INDEX_2(fragment)]; - int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET_2(fragment); - struct squashfs_fragment_entry_2 fragment_entry; - - if (msblk->swap) { - struct squashfs_fragment_entry_2 sfragment_entry; - - if (!squashfs_get_cached_block(s, (char *) &sfragment_entry, - start_block, offset, - sizeof(sfragment_entry), &start_block, - &offset)) - goto out; - SQUASHFS_SWAP_FRAGMENT_ENTRY_2(&fragment_entry, &sfragment_entry); - } else - if (!squashfs_get_cached_block(s, (char *) &fragment_entry, - start_block, offset, - sizeof(fragment_entry), &start_block, - &offset)) - goto out; - - *fragment_start_block = fragment_entry.start_block; - *fragment_size = fragment_entry.size; - - return 1; - -out: - return 0; -} - - -static struct inode *squashfs_new_inode(struct super_block *s, - struct squashfs_base_inode_header_2 *inodeb, unsigned int ino) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - struct inode *i = new_inode(s); - - if (i) { - i->i_ino = ino; - i->i_mtime.tv_sec = sblk->mkfs_time; - i->i_atime.tv_sec = sblk->mkfs_time; - i->i_ctime.tv_sec = sblk->mkfs_time; - i->i_uid = msblk->uid[inodeb->uid]; - i->i_mode = inodeb->mode; - i->i_nlink = 1; - i->i_size = 0; - if (inodeb->guid == SQUASHFS_GUIDS) - i->i_gid = i->i_uid; - else - i->i_gid = msblk->guid[inodeb->guid]; - } - - return i; -} - - -static struct inode *squashfs_iget_2(struct super_block *s, squashfs_inode_t inode) -{ - struct inode *i; - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - unsigned int block = SQUASHFS_INODE_BLK(inode) + - sblk->inode_table_start; - unsigned int offset = SQUASHFS_INODE_OFFSET(inode); - unsigned int ino = SQUASHFS_MK_VFS_INODE(block - - sblk->inode_table_start, offset); - long long next_block; - unsigned int next_offset; - union squashfs_inode_header_2 id, sid; - struct squashfs_base_inode_header_2 *inodeb = &id.base, - *sinodeb = &sid.base; - - TRACE("Entered squashfs_iget\n"); - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) sinodeb, block, - offset, sizeof(*sinodeb), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_BASE_INODE_HEADER_2(inodeb, sinodeb, - sizeof(*sinodeb)); - } else - if (!squashfs_get_cached_block(s, (char *) inodeb, block, - offset, sizeof(*inodeb), &next_block, - &next_offset)) - goto failed_read; - - switch(inodeb->inode_type) { - case SQUASHFS_FILE_TYPE: { - struct squashfs_reg_inode_header_2 *inodep = &id.reg; - struct squashfs_reg_inode_header_2 *sinodep = &sid.reg; - long long frag_blk; - unsigned int frag_size; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_REG_INODE_HEADER_2(inodep, sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - frag_blk = SQUASHFS_INVALID_BLK; - if (inodep->fragment != SQUASHFS_INVALID_FRAG && - !get_fragment_location_2(s, - inodep->fragment, &frag_blk, &frag_size)) - goto failed_read; - - if((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_size = inodep->file_size; - i->i_fop = &generic_ro_fops; - i->i_mode |= S_IFREG; - i->i_mtime.tv_sec = inodep->mtime; - i->i_atime.tv_sec = inodep->mtime; - i->i_ctime.tv_sec = inodep->mtime; - i->i_blocks = ((i->i_size - 1) >> 9) + 1; - SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk; - SQUASHFS_I(i)->u.s1.fragment_size = frag_size; - SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->u.s1.block_list_start = next_block; - SQUASHFS_I(i)->offset = next_offset; - if (sblk->block_size > 4096) - i->i_data.a_ops = &squashfs_aops; - else - i->i_data.a_ops = &squashfs_aops_4K; - - TRACE("File inode %x:%x, start_block %x, " - "block_list_start %llx, offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->start_block, next_block, - next_offset); - break; - } - case SQUASHFS_DIR_TYPE: { - struct squashfs_dir_inode_header_2 *inodep = &id.dir; - struct squashfs_dir_inode_header_2 *sinodep = &sid.dir; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_DIR_INODE_HEADER_2(inodep, sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - if((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_size = inodep->file_size; - i->i_op = &squashfs_dir_inode_ops_2; - i->i_fop = &squashfs_dir_ops_2; - i->i_mode |= S_IFDIR; - i->i_mtime.tv_sec = inodep->mtime; - i->i_atime.tv_sec = inodep->mtime; - i->i_ctime.tv_sec = inodep->mtime; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->offset = inodep->offset; - SQUASHFS_I(i)->u.s2.directory_index_count = 0; - SQUASHFS_I(i)->u.s2.parent_inode = 0; - - TRACE("Directory inode %x:%x, start_block %x, offset " - "%x\n", SQUASHFS_INODE_BLK(inode), - offset, inodep->start_block, - inodep->offset); - break; - } - case SQUASHFS_LDIR_TYPE: { - struct squashfs_ldir_inode_header_2 *inodep = &id.ldir; - struct squashfs_ldir_inode_header_2 *sinodep = &sid.ldir; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_LDIR_INODE_HEADER_2(inodep, - sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - if((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_size = inodep->file_size; - i->i_op = &squashfs_dir_inode_ops_2; - i->i_fop = &squashfs_dir_ops_2; - i->i_mode |= S_IFDIR; - i->i_mtime.tv_sec = inodep->mtime; - i->i_atime.tv_sec = inodep->mtime; - i->i_ctime.tv_sec = inodep->mtime; - SQUASHFS_I(i)->start_block = inodep->start_block; - SQUASHFS_I(i)->offset = inodep->offset; - SQUASHFS_I(i)->u.s2.directory_index_start = next_block; - SQUASHFS_I(i)->u.s2.directory_index_offset = - next_offset; - SQUASHFS_I(i)->u.s2.directory_index_count = - inodep->i_count; - SQUASHFS_I(i)->u.s2.parent_inode = 0; - - TRACE("Long directory inode %x:%x, start_block %x, " - "offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->start_block, inodep->offset); - break; - } - case SQUASHFS_SYMLINK_TYPE: { - struct squashfs_symlink_inode_header_2 *inodep = - &id.symlink; - struct squashfs_symlink_inode_header_2 *sinodep = - &sid.symlink; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(inodep, - sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - if((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_size = inodep->symlink_size; - i->i_op = &page_symlink_inode_operations; - i->i_data.a_ops = &squashfs_symlink_aops; - i->i_mode |= S_IFLNK; - SQUASHFS_I(i)->start_block = next_block; - SQUASHFS_I(i)->offset = next_offset; - - TRACE("Symbolic link inode %x:%x, start_block %llx, " - "offset %x\n", - SQUASHFS_INODE_BLK(inode), offset, - next_block, next_offset); - break; - } - case SQUASHFS_BLKDEV_TYPE: - case SQUASHFS_CHRDEV_TYPE: { - struct squashfs_dev_inode_header_2 *inodep = &id.dev; - struct squashfs_dev_inode_header_2 *sinodep = &sid.dev; - - if (msblk->swap) { - if (!squashfs_get_cached_block(s, (char *) - sinodep, block, offset, - sizeof(*sinodep), &next_block, - &next_offset)) - goto failed_read; - SQUASHFS_SWAP_DEV_INODE_HEADER_2(inodep, sinodep); - } else - if (!squashfs_get_cached_block(s, (char *) - inodep, block, offset, - sizeof(*inodep), &next_block, - &next_offset)) - goto failed_read; - - if ((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_mode |= (inodeb->inode_type == - SQUASHFS_CHRDEV_TYPE) ? S_IFCHR : - S_IFBLK; - init_special_inode(i, i->i_mode, - old_decode_dev(inodep->rdev)); - - TRACE("Device inode %x:%x, rdev %x\n", - SQUASHFS_INODE_BLK(inode), offset, - inodep->rdev); - break; - } - case SQUASHFS_FIFO_TYPE: - case SQUASHFS_SOCKET_TYPE: { - if ((i = squashfs_new_inode(s, inodeb, ino)) == NULL) - goto failed_read1; - - i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE) - ? S_IFIFO : S_IFSOCK; - init_special_inode(i, i->i_mode, 0); - break; - } - default: - ERROR("Unknown inode type %d in squashfs_iget!\n", - inodeb->inode_type); - goto failed_read1; - } - - insert_inode_hash(i); - return i; - -failed_read: - ERROR("Unable to read inode [%x:%x]\n", block, offset); - -failed_read1: - return NULL; -} - - -static int get_dir_index_using_offset(struct super_block *s, long long - *next_block, unsigned int *next_offset, - long long index_start, - unsigned int index_offset, int i_count, - long long f_pos) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - int i, length = 0; - struct squashfs_dir_index_2 index; - - TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n", - i_count, (unsigned int) f_pos); - - if (f_pos == 0) - goto finish; - - for (i = 0; i < i_count; i++) { - if (msblk->swap) { - struct squashfs_dir_index_2 sindex; - squashfs_get_cached_block(s, (char *) &sindex, - index_start, index_offset, - sizeof(sindex), &index_start, - &index_offset); - SQUASHFS_SWAP_DIR_INDEX_2(&index, &sindex); - } else - squashfs_get_cached_block(s, (char *) &index, - index_start, index_offset, - sizeof(index), &index_start, - &index_offset); - - if (index.index > f_pos) - break; - - squashfs_get_cached_block(s, NULL, index_start, index_offset, - index.size + 1, &index_start, - &index_offset); - - length = index.index; - *next_block = index.start_block + sblk->directory_table_start; - } - - *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; - -finish: - return length; -} - - -static int get_dir_index_using_name(struct super_block *s, long long - *next_block, unsigned int *next_offset, - long long index_start, - unsigned int index_offset, int i_count, - const char *name, int size) -{ - struct squashfs_sb_info *msblk = s->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - int i, length = 0; - char buffer[sizeof(struct squashfs_dir_index_2) + SQUASHFS_NAME_LEN + 1]; - struct squashfs_dir_index_2 *index = (struct squashfs_dir_index_2 *) buffer; - char str[SQUASHFS_NAME_LEN + 1]; - - TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count); - - strncpy(str, name, size); - str[size] = '\0'; - - for (i = 0; i < i_count; i++) { - if (msblk->swap) { - struct squashfs_dir_index_2 sindex; - squashfs_get_cached_block(s, (char *) &sindex, - index_start, index_offset, - sizeof(sindex), &index_start, - &index_offset); - SQUASHFS_SWAP_DIR_INDEX_2(index, &sindex); - } else - squashfs_get_cached_block(s, (char *) index, - index_start, index_offset, - sizeof(struct squashfs_dir_index_2), - &index_start, &index_offset); - - squashfs_get_cached_block(s, index->name, index_start, - index_offset, index->size + 1, - &index_start, &index_offset); - - index->name[index->size + 1] = '\0'; - - if (strcmp(index->name, str) > 0) - break; - - length = index->index; - *next_block = index->start_block + sblk->directory_table_start; - } - - *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; - return length; -} - - -static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir) -{ - struct inode *i = file->f_dentry->d_inode; - struct squashfs_sb_info *msblk = i->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - long long next_block = SQUASHFS_I(i)->start_block + - sblk->directory_table_start; - int next_offset = SQUASHFS_I(i)->offset, length = 0, dirs_read = 0, - dir_count; - struct squashfs_dir_header_2 dirh; - char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1]; - struct squashfs_dir_entry_2 *dire = (struct squashfs_dir_entry_2 *) buffer; - - TRACE("Entered squashfs_readdir_2 [%llx:%x]\n", next_block, next_offset); - - length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset, - SQUASHFS_I(i)->u.s2.directory_index_start, - SQUASHFS_I(i)->u.s2.directory_index_offset, - SQUASHFS_I(i)->u.s2.directory_index_count, - file->f_pos); - - while (length < i_size_read(i)) { - /* read directory header */ - if (msblk->swap) { - struct squashfs_dir_header_2 sdirh; - - if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, - next_block, next_offset, sizeof(sdirh), - &next_block, &next_offset)) - goto failed_read; - - length += sizeof(sdirh); - SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh); - } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh, - next_block, next_offset, sizeof(dirh), - &next_block, &next_offset)) - goto failed_read; - - length += sizeof(dirh); - } - - dir_count = dirh.count + 1; - while (dir_count--) { - if (msblk->swap) { - struct squashfs_dir_entry_2 sdire; - if (!squashfs_get_cached_block(i->i_sb, (char *) - &sdire, next_block, next_offset, - sizeof(sdire), &next_block, - &next_offset)) - goto failed_read; - - length += sizeof(sdire); - SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire); - } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) - dire, next_block, next_offset, - sizeof(*dire), &next_block, - &next_offset)) - goto failed_read; - - length += sizeof(*dire); - } - - if (!squashfs_get_cached_block(i->i_sb, dire->name, - next_block, next_offset, - dire->size + 1, &next_block, - &next_offset)) - goto failed_read; - - length += dire->size + 1; - - if (file->f_pos >= length) - continue; - - dire->name[dire->size + 1] = '\0'; - - TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d)\n", - (unsigned int) dirent, dire->name, - dire->size + 1, (int) file->f_pos, - dirh.start_block, dire->offset, - squashfs_filetype_table[dire->type]); - - if (filldir(dirent, dire->name, dire->size + 1, - file->f_pos, SQUASHFS_MK_VFS_INODE( - dirh.start_block, dire->offset), - squashfs_filetype_table[dire->type]) - < 0) { - TRACE("Filldir returned less than 0\n"); - goto finish; - } - file->f_pos = length; - dirs_read++; - } - } - -finish: - return dirs_read; - -failed_read: - ERROR("Unable to read directory block [%llx:%x]\n", next_block, - next_offset); - return 0; -} - - -static struct dentry *squashfs_lookup_2(struct inode *i, struct dentry *dentry, - struct nameidata *nd) -{ - const unsigned char *name = dentry->d_name.name; - int len = dentry->d_name.len; - struct inode *inode = NULL; - struct squashfs_sb_info *msblk = i->i_sb->s_fs_info; - struct squashfs_super_block *sblk = &msblk->sblk; - long long next_block = SQUASHFS_I(i)->start_block + - sblk->directory_table_start; - int next_offset = SQUASHFS_I(i)->offset, length = 0, - dir_count; - struct squashfs_dir_header_2 dirh; - char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN]; - struct squashfs_dir_entry_2 *dire = (struct squashfs_dir_entry_2 *) buffer; - int sorted = sblk->s_major == 2 && sblk->s_minor >= 1; - - TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset); - - if (len > SQUASHFS_NAME_LEN) - goto exit_loop; - - length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset, - SQUASHFS_I(i)->u.s2.directory_index_start, - SQUASHFS_I(i)->u.s2.directory_index_offset, - SQUASHFS_I(i)->u.s2.directory_index_count, name, - len); - - while (length < i_size_read(i)) { - /* read directory header */ - if (msblk->swap) { - struct squashfs_dir_header_2 sdirh; - if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh, - next_block, next_offset, sizeof(sdirh), - &next_block, &next_offset)) - goto failed_read; - - length += sizeof(sdirh); - SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh); - } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh, - next_block, next_offset, sizeof(dirh), - &next_block, &next_offset)) - goto failed_read; - - length += sizeof(dirh); - } - - dir_count = dirh.count + 1; - while (dir_count--) { - if (msblk->swap) { - struct squashfs_dir_entry_2 sdire; - if (!squashfs_get_cached_block(i->i_sb, (char *) - &sdire, next_block,next_offset, - sizeof(sdire), &next_block, - &next_offset)) - goto failed_read; - - length += sizeof(sdire); - SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire); - } else { - if (!squashfs_get_cached_block(i->i_sb, (char *) - dire, next_block,next_offset, - sizeof(*dire), &next_block, - &next_offset)) - goto failed_read; - - length += sizeof(*dire); - } - - if (!squashfs_get_cached_block(i->i_sb, dire->name, - next_block, next_offset, dire->size + 1, - &next_block, &next_offset)) - goto failed_read; - - length += dire->size + 1; - - if (sorted && name[0] < dire->name[0]) - goto exit_loop; - - if ((len == dire->size + 1) && !strncmp(name, - dire->name, len)) { - squashfs_inode_t ino = - SQUASHFS_MKINODE(dirh.start_block, - dire->offset); - - TRACE("calling squashfs_iget for directory " - "entry %s, inode %x:%x, %lld\n", name, - dirh.start_block, dire->offset, ino); - - inode = (msblk->iget)(i->i_sb, ino); - - goto exit_loop; - } - } - } - -exit_loop: - d_add(dentry, inode); - return ERR_PTR(0); - -failed_read: - ERROR("Unable to read directory block [%llx:%x]\n", next_block, - next_offset); - goto exit_loop; -} - - -int squashfs_2_0_supported(struct squashfs_sb_info *msblk) -{ - struct squashfs_super_block *sblk = &msblk->sblk; - - msblk->iget = squashfs_iget_2; - msblk->read_fragment_index_table = read_fragment_index_table_2; - - sblk->bytes_used = sblk->bytes_used_2; - sblk->uid_start = sblk->uid_start_2; - sblk->guid_start = sblk->guid_start_2; - sblk->inode_table_start = sblk->inode_table_start_2; - sblk->directory_table_start = sblk->directory_table_start_2; - sblk->fragment_table_start = sblk->fragment_table_start_2; - - return 1; -} diff --git a/fs/stat.c b/fs/stat.c index c592ee599..b8babca88 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -4,6 +4,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include #include #include @@ -34,7 +34,7 @@ void generic_fillattr(struct inode *inode, struct kstat *stat) stat->ctime = inode->i_ctime; stat->size = i_size_read(inode); stat->blocks = inode->i_blocks; - stat->blksize = PAGE_CACHE_SIZE; + stat->blksize = inode->i_blksize; } EXPORT_SYMBOL(generic_fillattr); @@ -141,8 +141,6 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta memset(&tmp, 0, sizeof(struct __old_kernel_stat)); tmp.st_dev = old_encode_dev(stat->dev); tmp.st_ino = stat->ino; - if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) - return -EOVERFLOW; tmp.st_mode = stat->mode; tmp.st_nlink = stat->nlink; if (tmp.st_nlink != stat->nlink) @@ -213,8 +211,6 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) tmp.st_dev = new_encode_dev(stat->dev); #endif tmp.st_ino = stat->ino; - if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) - return -EOVERFLOW; tmp.st_mode = stat->mode; tmp.st_nlink = stat->nlink; if (tmp.st_nlink != stat->nlink) @@ -352,8 +348,6 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) tmp.st_rdev = huge_encode_dev(stat->rdev); #endif tmp.st_ino = stat->ino; - if (sizeof(tmp.st_ino) < sizeof(stat->ino) && tmp.st_ino != stat->ino) - return -EOVERFLOW; #ifdef STAT64_HAS_BROKEN_ST_INO tmp.__st_ino = stat->ino; #endif diff --git a/fs/super.c b/fs/super.c index 3c7d86845..c9b8403c2 100644 --- a/fs/super.c +++ b/fs/super.c @@ -20,6 +20,7 @@ * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000 */ +#include #include #include #include @@ -52,12 +53,11 @@ DEFINE_SPINLOCK(sb_lock); /** * alloc_super - create new superblock - * @type: filesystem type superblock should belong to * * Allocates and initializes a new &struct super_block. alloc_super() * returns a pointer new superblock or %NULL if allocation had failed. */ -static struct super_block *alloc_super(struct file_system_type *type) +static struct super_block *alloc_super(void) { struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER); static struct super_operations default_op; @@ -76,13 +76,6 @@ static struct super_block *alloc_super(struct file_system_type *type) INIT_LIST_HEAD(&s->s_inodes); init_rwsem(&s->s_umount); mutex_init(&s->s_lock); - lockdep_set_class(&s->s_umount, &type->s_umount_key); - /* - * The locking rules for s_lock are up to the - * filesystem. For example ext3fs has different - * lock ordering than usbfs: - */ - lockdep_set_class(&s->s_lock, &type->s_lock_key); down_write(&s->s_umount); s->s_count = S_BIAS; atomic_set(&s->s_active, 1); @@ -232,17 +225,17 @@ static int grab_super(struct super_block *s) * that need destruction out of superblock, call generic_shutdown_super() * and release aforementioned objects. Note: dentries and inodes _are_ * taken care of and do not need specific handling. - * - * Upon calling this function, the filesystem may no longer alter or - * rearrange the set of dentries belonging to this super_block, nor may it - * change the attachments of dentries to inodes. */ void generic_shutdown_super(struct super_block *sb) { + struct dentry *root = sb->s_root; struct super_operations *sop = sb->s_op; - if (sb->s_root) { - shrink_dcache_for_umount(sb); + if (root) { + sb->s_root = NULL; + shrink_dcache_parent(root); + shrink_dcache_anon(&sb->s_anon); + dput(root); fsync_super(sb); lock_super(sb); sb->s_flags &= ~MS_ACTIVE; @@ -306,7 +299,7 @@ retry: } if (!s) { spin_unlock(&sb_lock); - s = alloc_super(type); + s = alloc_super(); if (!s) return ERR_PTR(-ENOMEM); goto retry; @@ -496,7 +489,7 @@ asmlinkage long sys_ustat(unsigned dev, struct ustat __user * ubuf) s = user_get_super(new_decode_dev(dev)); if (s == NULL) goto out; - err = vfs_statfs(s->s_root, &sbuf); + err = vfs_statfs(s, &sbuf); drop_super(s); if (err) goto out; @@ -686,10 +679,9 @@ static void bdev_uevent(struct block_device *bdev, enum kobject_action action) } } -int get_sb_bdev(struct file_system_type *fs_type, +struct super_block *get_sb_bdev(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt) + int (*fill_super)(struct super_block *, void *, int)) { struct block_device *bdev; struct super_block *s; @@ -697,7 +689,7 @@ int get_sb_bdev(struct file_system_type *fs_type, bdev = open_bdev_excl(dev_name, flags, fs_type); if (IS_ERR(bdev)) - return PTR_ERR(bdev); + return (struct super_block *)bdev; /* * once the super is inserted into the list by sget, s_umount @@ -708,17 +700,15 @@ int get_sb_bdev(struct file_system_type *fs_type, s = sget(fs_type, test_bdev_super, set_bdev_super, bdev); mutex_unlock(&bdev->bd_mount_mutex); if (IS_ERR(s)) - goto error_s; + goto out; if (s->s_root) { if ((flags ^ s->s_flags) & MS_RDONLY) { up_write(&s->s_umount); deactivate_super(s); - error = -EBUSY; - goto error_bdev; + s = ERR_PTR(-EBUSY); } - - close_bdev_excl(bdev); + goto out; } else { char b[BDEVNAME_SIZE]; @@ -729,21 +719,18 @@ int get_sb_bdev(struct file_system_type *fs_type, if (error) { up_write(&s->s_umount); deactivate_super(s); - goto error; + s = ERR_PTR(error); + } else { + s->s_flags |= MS_ACTIVE; + bdev_uevent(bdev, KOBJ_MOUNT); } - - s->s_flags |= MS_ACTIVE; - bdev_uevent(bdev, KOBJ_MOUNT); } - return simple_set_mnt(mnt, s); + return s; -error_s: - error = PTR_ERR(s); -error_bdev: +out: close_bdev_excl(bdev); -error: - return error; + return s; } EXPORT_SYMBOL(get_sb_bdev); @@ -760,16 +747,15 @@ void kill_block_super(struct super_block *sb) EXPORT_SYMBOL(kill_block_super); -int get_sb_nodev(struct file_system_type *fs_type, +struct super_block *get_sb_nodev(struct file_system_type *fs_type, int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt) + int (*fill_super)(struct super_block *, void *, int)) { int error; struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); if (IS_ERR(s)) - return PTR_ERR(s); + return s; s->s_flags = flags; @@ -777,10 +763,10 @@ int get_sb_nodev(struct file_system_type *fs_type, if (error) { up_write(&s->s_umount); deactivate_super(s); - return error; + return ERR_PTR(error); } s->s_flags |= MS_ACTIVE; - return simple_set_mnt(mnt, s); + return s; } EXPORT_SYMBOL(get_sb_nodev); @@ -790,116 +776,107 @@ static int compare_single(struct super_block *s, void *p) return 1; } -int get_sb_single(struct file_system_type *fs_type, +struct super_block *get_sb_single(struct file_system_type *fs_type, int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt) + int (*fill_super)(struct super_block *, void *, int)) { struct super_block *s; int error; s = sget(fs_type, compare_single, set_anon_super, NULL); if (IS_ERR(s)) - return PTR_ERR(s); + return s; if (!s->s_root) { s->s_flags = flags; error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); if (error) { up_write(&s->s_umount); deactivate_super(s); - return error; + return ERR_PTR(error); } s->s_flags |= MS_ACTIVE; } do_remount_sb(s, flags, data, 0); - return simple_set_mnt(mnt, s); + return s; } EXPORT_SYMBOL(get_sb_single); struct vfsmount * -vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data) +do_kern_mount(const char *fstype, int flags, const char *name, void *data) { - struct vfsmount *mnt; + struct file_system_type *type = get_fs_type(fstype); struct super_block *sb; - char *secdata = NULL; + struct vfsmount *mnt; int error; + char *secdata = NULL; if (!type) return ERR_PTR(-ENODEV); - error = -ENOMEM; + sb = ERR_PTR(-EPERM); + if ((type->fs_flags & FS_BINARY_MOUNTDATA) && + !vx_capable(CAP_SYS_ADMIN, VXC_BINARY_MOUNT)) + goto out; + + sb = ERR_PTR(-ENOMEM); mnt = alloc_vfsmnt(name); if (!mnt) goto out; if (data) { secdata = alloc_secdata(); - if (!secdata) + if (!secdata) { + sb = ERR_PTR(-ENOMEM); goto out_mnt; + } error = security_sb_copy_data(type, data, secdata); - if (error) + if (error) { + sb = ERR_PTR(error); goto out_free_secdata; + } } - error = type->get_sb(type, flags, name, data, mnt); - if (error < 0) + sb = type->get_sb(type, flags, name, data); + if (IS_ERR(sb)) goto out_free_secdata; - sb = mnt->mnt_sb; error = -EPERM; - if (!vx_capable(CAP_SYS_ADMIN, VXC_BINARY_MOUNT) && !sb->s_bdev && + if (!capable(CAP_SYS_ADMIN) && !sb->s_bdev && (sb->s_magic != PROC_SUPER_MAGIC) && (sb->s_magic != DEVPTS_SUPER_MAGIC)) goto out_sb; - error = security_sb_kern_mount(sb, secdata); + error = security_sb_kern_mount(sb, secdata); if (error) goto out_sb; - - mnt->mnt_mountpoint = mnt->mnt_root; + mnt->mnt_sb = sb; + mnt->mnt_root = dget(sb->s_root); + mnt->mnt_mountpoint = sb->s_root; mnt->mnt_parent = mnt; - up_write(&mnt->mnt_sb->s_umount); + up_write(&sb->s_umount); free_secdata(secdata); + put_filesystem(type); return mnt; out_sb: - dput(mnt->mnt_root); - up_write(&mnt->mnt_sb->s_umount); - deactivate_super(mnt->mnt_sb); + up_write(&sb->s_umount); + deactivate_super(sb); + sb = ERR_PTR(error); out_free_secdata: free_secdata(secdata); out_mnt: free_vfsmnt(mnt); out: - return ERR_PTR(error); -} - -EXPORT_SYMBOL_GPL(vfs_kern_mount); - -struct vfsmount * -do_kern_mount(const char *fstype, int flags, const char *name, void *data) -{ - struct file_system_type *type = get_fs_type(fstype); - struct vfsmount *mnt; - - if (!type) - return ERR_PTR(-ENODEV); - - mnt = ERR_PTR(-EPERM); - if ((type->fs_flags & FS_BINARY_MOUNTDATA) && - !vx_capable(CAP_SYS_ADMIN, VXC_BINARY_MOUNT)) - goto out_put; - - mnt = vfs_kern_mount(type, flags, name, data); -out_put: put_filesystem(type); - return mnt; + return (struct vfsmount *)sb; } +EXPORT_SYMBOL_GPL(do_kern_mount); + struct vfsmount *kern_mount(struct file_system_type *type) { - return vfs_kern_mount(type, 0, type->name, NULL); + return do_kern_mount(type->name, 0, type->name, NULL); } EXPORT_SYMBOL(kern_mount); diff --git a/fs/sync.c b/fs/sync.c index 955aef04d..aab5ffe77 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -100,7 +100,7 @@ asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, } if (nbytes == 0) - endbyte = LLONG_MAX; + endbyte = -1; else endbyte--; /* inclusive */ diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 61c42430c..610b5bdbe 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -430,9 +430,10 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) i++; /* fallthrough */ default: - if (filp->f_pos == 2) - list_move(q, &parent_sd->s_children); - + if (filp->f_pos == 2) { + list_del(q); + list_add(q, &parent_sd->s_children); + } for (p=q->next; p!= &parent_sd->s_children; p=p->next) { struct sysfs_dirent *next; const char * name; @@ -454,7 +455,8 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) dt_type(next)) < 0) return 0; - list_move(q, p); + list_del(q); + list_add(q, p); p = q; filp->f_pos++; } diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 222910ee8..da0b930e8 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -490,6 +490,11 @@ int sysfs_update_file(struct kobject * kobj, const struct attribute * attr) (victim->d_parent->d_inode == dir->d_inode)) { victim->d_inode->i_mtime = CURRENT_TIME; fsnotify_modify(victim); + + /** + * Drop reference from initial sysfs_get_dentry(). + */ + dput(victim); res = 0; } else d_drop(victim); diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 44ea5a03a..f0b347bd1 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -16,7 +16,7 @@ extern struct super_block * sysfs_sb; -static const struct address_space_operations sysfs_aops = { +static struct address_space_operations sysfs_aops = { .readpage = simple_readpage, .prepare_write = simple_prepare_write, .commit_write = simple_commit_write @@ -109,26 +109,15 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) inode->i_ctime = iattr->ia_ctime; } - -/* - * sysfs has a different i_mutex lock order behavior for i_mutex than other - * filesystems; sysfs i_mutex is called in many places with subsystem locks - * held. At the same time, many of the VFS locking rules do not apply to - * sysfs at all (cross directory rename for example). To untangle this mess - * (which gives false positives in lockdep), we're giving sysfs inodes their - * own class for i_mutex. - */ -static struct lock_class_key sysfs_inode_imutex_key; - struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd) { struct inode * inode = new_inode(sysfs_sb); if (inode) { + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->a_ops = &sysfs_aops; inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info; inode->i_op = &sysfs_inode_operations; - lockdep_set_class(&inode->i_mutex, &sysfs_inode_imutex_key); if (sd->s_iattr) { /* sysfs_dirent has non-default attributes diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 19662d00a..ea01b08fb 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -64,10 +64,10 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent) return 0; } -static int sysfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *sysfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, sysfs_fill_super, mnt); + return get_sb_single(fs_type, flags, data, sysfs_fill_super); } static struct file_system_type sysfs_fs_type = { diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c index f2bef962d..d7074341e 100644 --- a/fs/sysv/dir.c +++ b/fs/sysv/dir.c @@ -53,7 +53,8 @@ static int dir_commit_chunk(struct page *page, unsigned from, unsigned to) static struct page * dir_get_page(struct inode *dir, unsigned long n) { struct address_space *mapping = dir->i_mapping; - struct page *page = read_mapping_page(mapping, n, NULL); + struct page *page = read_cache_page(mapping, n, + (filler_t*)mapping->a_ops->readpage, NULL); if (!IS_ERR(page)) { wait_on_page_locked(page); kmap(page); diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c index 115ab0d6f..9b585d108 100644 --- a/fs/sysv/ialloc.c +++ b/fs/sysv/ialloc.c @@ -170,7 +170,7 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode) inode->i_uid = current->fsuid; inode->i_ino = fs16_to_cpu(sbi, ino); inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; memset(SYSV_I(inode)->i_data, 0, sizeof(SYSV_I(inode)->i_data)); SYSV_I(inode)->i_dir_start_lookup = 0; insert_inode_hash(inode); diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index d63c5e48b..3ff89cc58 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c @@ -85,9 +85,8 @@ static void sysv_put_super(struct super_block *sb) kfree(sbi); } -static int sysv_statfs(struct dentry *dentry, struct kstatfs *buf) +static int sysv_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; struct sysv_sb_info *sbi = SYSV_SB(sb); buf->f_type = sb->s_magic; @@ -201,7 +200,7 @@ static void sysv_read_inode(struct inode *inode) inode->i_ctime.tv_nsec = 0; inode->i_atime.tv_nsec = 0; inode->i_mtime.tv_nsec = 0; - inode->i_blocks = 0; + inode->i_blocks = inode->i_blksize = 0; si = SYSV_I(inode); for (block = 0; block < 10+1+1+1; block++) diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c index f2bcccd1d..86f5f8d43 100644 --- a/fs/sysv/itree.c +++ b/fs/sysv/itree.c @@ -465,7 +465,7 @@ static sector_t sysv_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,get_block); } -const struct address_space_operations sysv_aops = { +struct address_space_operations sysv_aops = { .readpage = sysv_readpage, .writepage = sysv_writepage, .sync_page = block_sync_page, diff --git a/fs/sysv/super.c b/fs/sysv/super.c index 876639b93..e92b991e6 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c @@ -506,17 +506,16 @@ failed: /* Every kernel module contains stuff like this. */ -static int sysv_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *sysv_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, sysv_fill_super); } -static int v7_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *v7_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, v7_fill_super); } static struct file_system_type sysv_fs_type = { diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h index 9dcc82120..393a480e4 100644 --- a/fs/sysv/sysv.h +++ b/fs/sysv/sysv.h @@ -161,7 +161,7 @@ extern struct inode_operations sysv_dir_inode_operations; extern struct inode_operations sysv_fast_symlink_inode_operations; extern const struct file_operations sysv_file_operations; extern const struct file_operations sysv_dir_operations; -extern const struct address_space_operations sysv_aops; +extern struct address_space_operations sysv_aops; extern struct super_operations sysv_sops; extern struct dentry_operations sysv_dentry_operations; diff --git a/fs/udf/file.c b/fs/udf/file.c index a59e5f33d..e34b00e30 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c @@ -95,7 +95,7 @@ static int udf_adinicb_commit_write(struct file *file, struct page *page, unsign return 0; } -const struct address_space_operations udf_adinicb_aops = { +struct address_space_operations udf_adinicb_aops = { .readpage = udf_adinicb_readpage, .writepage = udf_adinicb_writepage, .sync_page = block_sync_page, diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index d954d266c..3873c672c 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c @@ -75,12 +75,6 @@ struct inode * udf_new_inode (struct inode *dir, int mode, int * err) } *err = -ENOSPC; - UDF_I_UNIQUE(inode) = 0; - UDF_I_LENEXTENTS(inode) = 0; - UDF_I_NEXT_ALLOC_BLOCK(inode) = 0; - UDF_I_NEXT_ALLOC_GOAL(inode) = 0; - UDF_I_STRAT4096(inode) = 0; - block = udf_new_block(dir->i_sb, NULL, UDF_I_LOCATION(dir).partitionReferenceNum, start, err); if (*err) @@ -90,6 +84,11 @@ struct inode * udf_new_inode (struct inode *dir, int mode, int * err) } mutex_lock(&sbi->s_alloc_mutex); + UDF_I_UNIQUE(inode) = 0; + UDF_I_LENEXTENTS(inode) = 0; + UDF_I_NEXT_ALLOC_BLOCK(inode) = 0; + UDF_I_NEXT_ALLOC_GOAL(inode) = 0; + UDF_I_STRAT4096(inode) = 0; if (UDF_SB_LVIDBH(sb)) { struct logicalVolHeaderDesc *lvhd; @@ -121,6 +120,7 @@ struct inode * udf_new_inode (struct inode *dir, int mode, int * err) UDF_I_LOCATION(inode).logicalBlockNum = block; UDF_I_LOCATION(inode).partitionReferenceNum = UDF_I_LOCATION(dir).partitionReferenceNum; inode->i_ino = udf_get_lb_pblock(sb, UDF_I_LOCATION(inode), 0); + inode->i_blksize = PAGE_SIZE; inode->i_blocks = 0; UDF_I_LENEATTR(inode) = 0; UDF_I_LENALLOC(inode) = 0; diff --git a/fs/udf/inode.c b/fs/udf/inode.c index b223b32db..2983afd5e 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -132,7 +132,7 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block) return generic_block_bmap(mapping,block,udf_get_block); } -const struct address_space_operations udf_aops = { +struct address_space_operations udf_aops = { .readpage = udf_readpage, .writepage = udf_writepage, .sync_page = block_sync_page, @@ -916,6 +916,8 @@ __udf_read_inode(struct inode *inode) * i_nlink = 1 * i_op = NULL; */ + inode->i_blksize = PAGE_SIZE; + bh = udf_read_ptagged(inode->i_sb, UDF_I_LOCATION(inode), 0, &ident); if (!bh) diff --git a/fs/udf/super.c b/fs/udf/super.c index fcce1a21a..73fc0d8ae 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -40,6 +40,7 @@ #include "udfdecl.h" +#include #include #include #include @@ -90,13 +91,13 @@ static void udf_load_partdesc(struct super_block *, struct buffer_head *); static void udf_open_lvid(struct super_block *); static void udf_close_lvid(struct super_block *); static unsigned int udf_count_free(struct super_block *); -static int udf_statfs(struct dentry *, struct kstatfs *); +static int udf_statfs(struct super_block *, struct kstatfs *); /* UDF filesystem type */ -static int udf_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *udf_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, udf_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, udf_fill_super); } static struct file_system_type udf_fstype = { @@ -115,13 +116,6 @@ static struct inode *udf_alloc_inode(struct super_block *sb) ei = (struct udf_inode_info *)kmem_cache_alloc(udf_inode_cachep, SLAB_KERNEL); if (!ei) return NULL; - - ei->i_unique = 0; - ei->i_lenExtents = 0; - ei->i_next_alloc_block = 0; - ei->i_next_alloc_goal = 0; - ei->i_strat4096 = 0; - return &ei->vfs_inode; } @@ -1785,10 +1779,8 @@ udf_put_super(struct super_block *sb) * Written, tested, and released. */ static int -udf_statfs(struct dentry *dentry, struct kstatfs *buf) +udf_statfs(struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - buf->f_type = UDF_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = UDF_SB_PARTLEN(sb, UDF_SB_PARTITION(sb)); diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index ba068a786..674bb40ed 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c @@ -113,6 +113,6 @@ out: /* * symlinks can't do much... */ -const struct address_space_operations udf_symlink_aops = { +struct address_space_operations udf_symlink_aops = { .readpage = udf_symlink_filler, }; diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index 1033b7cf2..023e19ba5 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h @@ -6,6 +6,7 @@ #include "osta_udf.h" #include +#include #include #include #include @@ -46,9 +47,9 @@ extern struct inode_operations udf_dir_inode_operations; extern const struct file_operations udf_dir_operations; extern struct inode_operations udf_file_inode_operations; extern const struct file_operations udf_file_operations; -extern const struct address_space_operations udf_aops; -extern const struct address_space_operations udf_adinicb_aops; -extern const struct address_space_operations udf_symlink_aops; +extern struct address_space_operations udf_aops; +extern struct address_space_operations udf_adinicb_aops; +extern struct address_space_operations udf_symlink_aops; struct udf_fileident_bh { diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index b82381475..3ada9dcf5 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c @@ -21,6 +21,14 @@ #include "swab.h" #include "util.h" +#undef UFS_BALLOC_DEBUG + +#ifdef UFS_BALLOC_DEBUG +#define UFSD(x) printk("(%s, %d), %s:", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + static unsigned ufs_add_fragments (struct inode *, unsigned, unsigned, unsigned, int *); static unsigned ufs_alloc_fragments (struct inode *, unsigned, unsigned, unsigned, int *); static unsigned ufs_alloccg_block (struct inode *, struct ufs_cg_private_info *, unsigned, int *); @@ -31,8 +39,7 @@ static void ufs_clusteracct(struct super_block *, struct ufs_cg_private_info *, /* * Free 'count' fragments from fragment number 'fragment' */ -void ufs_free_fragments(struct inode *inode, unsigned fragment, unsigned count) -{ +void ufs_free_fragments (struct inode * inode, unsigned fragment, unsigned count) { struct super_block * sb; struct ufs_sb_private_info * uspi; struct ufs_super_block_first * usb1; @@ -44,7 +51,7 @@ void ufs_free_fragments(struct inode *inode, unsigned fragment, unsigned count) uspi = UFS_SB(sb)->s_uspi; usb1 = ubh_get_usb_first(uspi); - UFSD("ENTER, fragment %u, count %u\n", fragment, count); + UFSD(("ENTER, fragment %u, count %u\n", fragment, count)) if (ufs_fragnum(fragment) + count > uspi->s_fpg) ufs_error (sb, "ufs_free_fragments", "internal error"); @@ -61,7 +68,7 @@ void ufs_free_fragments(struct inode *inode, unsigned fragment, unsigned count) ucpi = ufs_load_cylinder (sb, cgno); if (!ucpi) goto failed; - ucg = ubh_get_ucg (UCPI_UBH(ucpi)); + ucg = ubh_get_ucg (UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) { ufs_panic (sb, "ufs_free_fragments", "internal error, bad magic number on cg %u", cgno); goto failed; @@ -69,11 +76,11 @@ void ufs_free_fragments(struct inode *inode, unsigned fragment, unsigned count) end_bit = bit + count; bbase = ufs_blknum (bit); - blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase); + blkmap = ubh_blkmap (UCPI_UBH, ucpi->c_freeoff, bbase); ufs_fragacct (sb, blkmap, ucg->cg_frsum, -1); for (i = bit; i < end_bit; i++) { - if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, i)) - ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, i); + if (ubh_isclr (UCPI_UBH, ucpi->c_freeoff, i)) + ubh_setbit (UCPI_UBH, ucpi->c_freeoff, i); else ufs_error (sb, "ufs_free_fragments", "bit already cleared for fragment %u", i); @@ -83,52 +90,51 @@ void ufs_free_fragments(struct inode *inode, unsigned fragment, unsigned count) fs32_add(sb, &ucg->cg_cs.cs_nffree, count); - uspi->cs_total.cs_nffree += count; + fs32_add(sb, &usb1->fs_cstotal.cs_nffree, count); fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); - blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase); + blkmap = ubh_blkmap (UCPI_UBH, ucpi->c_freeoff, bbase); ufs_fragacct(sb, blkmap, ucg->cg_frsum, 1); /* * Trying to reassemble free fragments into block */ blkno = ufs_fragstoblks (bbase); - if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno)) { + if (ubh_isblockset(UCPI_UBH, ucpi->c_freeoff, blkno)) { fs32_sub(sb, &ucg->cg_cs.cs_nffree, uspi->s_fpb); - uspi->cs_total.cs_nffree -= uspi->s_fpb; + fs32_sub(sb, &usb1->fs_cstotal.cs_nffree, uspi->s_fpb); fs32_sub(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, uspi->s_fpb); if ((UFS_SB(sb)->s_flags & UFS_CG_MASK) == UFS_CG_44BSD) ufs_clusteracct (sb, ucpi, blkno, 1); fs32_add(sb, &ucg->cg_cs.cs_nbfree, 1); - uspi->cs_total.cs_nbfree++; + fs32_add(sb, &usb1->fs_cstotal.cs_nbfree, 1); fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nbfree, 1); cylno = ufs_cbtocylno (bbase); fs16_add(sb, &ubh_cg_blks(ucpi, cylno, ufs_cbtorpos(bbase)), 1); fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), 1); } - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **)&ucpi); + ubh_wait_on_buffer (UCPI_UBH); } sb->s_dirt = 1; unlock_super (sb); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return; failed: unlock_super (sb); - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return; } /* * Free 'count' fragments from fragment number 'fragment' (free whole blocks) */ -void ufs_free_blocks(struct inode *inode, unsigned fragment, unsigned count) -{ +void ufs_free_blocks (struct inode * inode, unsigned fragment, unsigned count) { struct super_block * sb; struct ufs_sb_private_info * uspi; struct ufs_super_block_first * usb1; @@ -140,7 +146,7 @@ void ufs_free_blocks(struct inode *inode, unsigned fragment, unsigned count) uspi = UFS_SB(sb)->s_uspi; usb1 = ubh_get_usb_first(uspi); - UFSD("ENTER, fragment %u, count %u\n", fragment, count); + UFSD(("ENTER, fragment %u, count %u\n", fragment, count)) if ((fragment & uspi->s_fpbmask) || (count & uspi->s_fpbmask)) { ufs_error (sb, "ufs_free_blocks", "internal error, " @@ -156,7 +162,7 @@ do_more: bit = ufs_dtogd (fragment); if (cgno >= uspi->s_ncg) { ufs_panic (sb, "ufs_free_blocks", "freeing blocks are outside device"); - goto failed_unlock; + goto failed; } end_bit = bit + count; if (end_bit > uspi->s_fpg) { @@ -167,36 +173,36 @@ do_more: ucpi = ufs_load_cylinder (sb, cgno); if (!ucpi) - goto failed_unlock; - ucg = ubh_get_ucg (UCPI_UBH(ucpi)); + goto failed; + ucg = ubh_get_ucg (UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) { ufs_panic (sb, "ufs_free_blocks", "internal error, bad magic number on cg %u", cgno); - goto failed_unlock; + goto failed; } for (i = bit; i < end_bit; i += uspi->s_fpb) { blkno = ufs_fragstoblks(i); - if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno)) { + if (ubh_isblockset(UCPI_UBH, ucpi->c_freeoff, blkno)) { ufs_error(sb, "ufs_free_blocks", "freeing free fragment"); } - ubh_setblock(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno); + ubh_setblock(UCPI_UBH, ucpi->c_freeoff, blkno); if ((UFS_SB(sb)->s_flags & UFS_CG_MASK) == UFS_CG_44BSD) ufs_clusteracct (sb, ucpi, blkno, 1); DQUOT_FREE_BLOCK(inode, uspi->s_fpb); fs32_add(sb, &ucg->cg_cs.cs_nbfree, 1); - uspi->cs_total.cs_nbfree++; + fs32_add(sb, &usb1->fs_cstotal.cs_nbfree, 1); fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nbfree, 1); cylno = ufs_cbtocylno(i); fs16_add(sb, &ubh_cg_blks(ucpi, cylno, ufs_cbtorpos(i)), 1); fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), 1); } - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **)&ucpi); + ubh_wait_on_buffer (UCPI_UBH); } if (overflow) { @@ -207,83 +213,38 @@ do_more: sb->s_dirt = 1; unlock_super (sb); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return; -failed_unlock: - unlock_super (sb); failed: - UFSD("EXIT (FAILED)\n"); + unlock_super (sb); + UFSD(("EXIT (FAILED)\n")) return; } -/* - * Modify inode page cache in such way: - * have - blocks with b_blocknr equal to oldb...oldb+count-1 - * get - blocks with b_blocknr equal to newb...newb+count-1 - * also we suppose that oldb...oldb+count-1 blocks - * situated at the end of file. - * - * We can come here from ufs_writepage or ufs_prepare_write, - * locked_page is argument of these functions, so we already lock it. - */ -static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, - unsigned int count, unsigned int oldb, - unsigned int newb, struct page *locked_page) -{ - unsigned int blk_per_page = 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits); - struct address_space *mapping = inode->i_mapping; - pgoff_t index, cur_index = locked_page->index; - unsigned int i, j; - struct page *page; - struct buffer_head *head, *bh; - - UFSD("ENTER, ino %lu, count %u, oldb %u, newb %u\n", - inode->i_ino, count, oldb, newb); - - BUG_ON(!PageLocked(locked_page)); - - for (i = 0; i < count; i += blk_per_page) { - index = (baseblk+i) >> (PAGE_CACHE_SHIFT - inode->i_blkbits); - - if (likely(cur_index != index)) { - page = ufs_get_locked_page(mapping, index); - if (!page || IS_ERR(page)) /* it was truncated or EIO */ - continue; - } else - page = locked_page; - - j = i; - head = page_buffers(page); - bh = head; - do { - if (likely(bh->b_blocknr == j + oldb && j < count)) { - unmap_underlying_metadata(bh->b_bdev, - bh->b_blocknr); - bh->b_blocknr = newb + j++; - mark_buffer_dirty(bh); - } - bh = bh->b_this_page; - } while (bh != head); - set_page_dirty(page); - - if (likely(cur_index != index)) - ufs_put_locked_page(page); - } - UFSD("EXIT\n"); -} +#define NULLIFY_FRAGMENTS \ + for (i = oldcount; i < newcount; i++) { \ + bh = sb_getblk(sb, result + i); \ + memset (bh->b_data, 0, sb->s_blocksize); \ + set_buffer_uptodate(bh); \ + mark_buffer_dirty (bh); \ + if (IS_SYNC(inode)) \ + sync_dirty_buffer(bh); \ + brelse (bh); \ + } -unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, - unsigned goal, unsigned count, int * err, struct page *locked_page) +unsigned ufs_new_fragments (struct inode * inode, __fs32 * p, unsigned fragment, + unsigned goal, unsigned count, int * err ) { struct super_block * sb; struct ufs_sb_private_info * uspi; struct ufs_super_block_first * usb1; - unsigned cgno, oldcount, newcount, tmp, request, result; + struct buffer_head * bh; + unsigned cgno, oldcount, newcount, tmp, request, i, result; - UFSD("ENTER, ino %lu, fragment %u, goal %u, count %u\n", inode->i_ino, fragment, goal, count); + UFSD(("ENTER, ino %lu, fragment %u, goal %u, count %u\n", inode->i_ino, fragment, goal, count)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -312,14 +273,14 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, return (unsigned)-1; } if (fragment < UFS_I(inode)->i_lastfrag) { - UFSD("EXIT (ALREADY ALLOCATED)\n"); + UFSD(("EXIT (ALREADY ALLOCATED)\n")) unlock_super (sb); return 0; } } else { if (tmp) { - UFSD("EXIT (ALREADY ALLOCATED)\n"); + UFSD(("EXIT (ALREADY ALLOCATED)\n")) unlock_super(sb); return 0; } @@ -328,9 +289,9 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, /* * There is not enough space for user on the device */ - if (!capable(CAP_SYS_RESOURCE) && ufs_freespace(uspi, UFS_MINFREE) <= 0) { + if (!capable(CAP_SYS_RESOURCE) && ufs_freespace(usb1, UFS_MINFREE) <= 0) { unlock_super (sb); - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return 0; } @@ -349,10 +310,12 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, if (result) { *p = cpu_to_fs32(sb, result); *err = 0; + inode->i_blocks += count << uspi->s_nspfshift; UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); + NULLIFY_FRAGMENTS } unlock_super(sb); - UFSD("EXIT, result %u\n", result); + UFSD(("EXIT, result %u\n", result)) return result; } @@ -362,9 +325,11 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, result = ufs_add_fragments (inode, tmp, oldcount, newcount, err); if (result) { *err = 0; + inode->i_blocks += count << uspi->s_nspfshift; UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); + NULLIFY_FRAGMENTS unlock_super(sb); - UFSD("EXIT, result %u\n", result); + UFSD(("EXIT, result %u\n", result)) return result; } @@ -374,8 +339,8 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, switch (fs32_to_cpu(sb, usb1->fs_optim)) { case UFS_OPTSPACE: request = newcount; - if (uspi->s_minfree < 5 || uspi->cs_total.cs_nffree - > uspi->s_dsize * uspi->s_minfree / (2 * 100)) + if (uspi->s_minfree < 5 || fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree) + > uspi->s_dsize * uspi->s_minfree / (2 * 100) ) break; usb1->fs_optim = cpu_to_fs32(sb, UFS_OPTTIME); break; @@ -384,7 +349,7 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, case UFS_OPTTIME: request = uspi->s_fpb; - if (uspi->cs_total.cs_nffree < uspi->s_dsize * + if (fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree) < uspi->s_dsize * (uspi->s_minfree - 2) / 100) break; usb1->fs_optim = cpu_to_fs32(sb, UFS_OPTTIME); @@ -392,22 +357,39 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, } result = ufs_alloc_fragments (inode, cgno, goal, request, err); if (result) { - ufs_change_blocknr(inode, fragment - oldcount, oldcount, tmp, - result, locked_page); - + for (i = 0; i < oldcount; i++) { + bh = sb_bread(sb, tmp + i); + if(bh) + { + clear_buffer_dirty(bh); + bh->b_blocknr = result + i; + mark_buffer_dirty (bh); + if (IS_SYNC(inode)) + sync_dirty_buffer(bh); + brelse (bh); + } + else + { + printk(KERN_ERR "ufs_new_fragments: bread fail\n"); + unlock_super(sb); + return 0; + } + } *p = cpu_to_fs32(sb, result); *err = 0; + inode->i_blocks += count << uspi->s_nspfshift; UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); + NULLIFY_FRAGMENTS unlock_super(sb); if (newcount < request) ufs_free_fragments (inode, result + newcount, request - newcount); ufs_free_fragments (inode, tmp, oldcount); - UFSD("EXIT, result %u\n", result); + UFSD(("EXIT, result %u\n", result)) return result; } unlock_super(sb); - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return 0; } @@ -422,7 +404,7 @@ ufs_add_fragments (struct inode * inode, unsigned fragment, struct ufs_cylinder_group * ucg; unsigned cgno, fragno, fragoff, count, fragsize, i; - UFSD("ENTER, fragment %u, oldcount %u, newcount %u\n", fragment, oldcount, newcount); + UFSD(("ENTER, fragment %u, oldcount %u, newcount %u\n", fragment, oldcount, newcount)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -437,7 +419,7 @@ ufs_add_fragments (struct inode * inode, unsigned fragment, ucpi = ufs_load_cylinder (sb, cgno); if (!ucpi) return 0; - ucg = ubh_get_ucg (UCPI_UBH(ucpi)); + ucg = ubh_get_ucg (UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) { ufs_panic (sb, "ufs_add_fragments", "internal error, bad magic number on cg %u", cgno); @@ -447,14 +429,14 @@ ufs_add_fragments (struct inode * inode, unsigned fragment, fragno = ufs_dtogd (fragment); fragoff = ufs_fragnum (fragno); for (i = oldcount; i < newcount; i++) - if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i)) + if (ubh_isclr (UCPI_UBH, ucpi->c_freeoff, fragno + i)) return 0; /* * Block can be extended */ ucg->cg_time = cpu_to_fs32(sb, get_seconds()); for (i = newcount; i < (uspi->s_fpb - fragoff); i++) - if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i)) + if (ubh_isclr (UCPI_UBH, ucpi->c_freeoff, fragno + i)) break; fragsize = i - oldcount; if (!fs32_to_cpu(sb, ucg->cg_frsum[fragsize])) @@ -464,7 +446,7 @@ ufs_add_fragments (struct inode * inode, unsigned fragment, if (fragsize != count) fs32_add(sb, &ucg->cg_frsum[fragsize - count], 1); for (i = oldcount; i < newcount; i++) - ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i); + ubh_clrbit (UCPI_UBH, ucpi->c_freeoff, fragno + i); if(DQUOT_ALLOC_BLOCK(inode, count)) { *err = -EDQUOT; return 0; @@ -472,17 +454,17 @@ ufs_add_fragments (struct inode * inode, unsigned fragment, fs32_sub(sb, &ucg->cg_cs.cs_nffree, count); fs32_sub(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); - uspi->cs_total.cs_nffree -= count; + fs32_sub(sb, &usb1->fs_cstotal.cs_nffree, count); - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **)&ucpi); + ubh_wait_on_buffer (UCPI_UBH); } sb->s_dirt = 1; - UFSD("EXIT, fragment %u\n", fragment); + UFSD(("EXIT, fragment %u\n", fragment)) return fragment; } @@ -505,7 +487,7 @@ static unsigned ufs_alloc_fragments (struct inode * inode, unsigned cgno, struct ufs_cylinder_group * ucg; unsigned oldcg, i, j, k, result, allocsize; - UFSD("ENTER, ino %lu, cgno %u, goal %u, count %u\n", inode->i_ino, cgno, goal, count); + UFSD(("ENTER, ino %lu, cgno %u, goal %u, count %u\n", inode->i_ino, cgno, goal, count)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -539,14 +521,14 @@ static unsigned ufs_alloc_fragments (struct inode * inode, unsigned cgno, UFS_TEST_FREE_SPACE_CG } - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return 0; cg_found: ucpi = ufs_load_cylinder (sb, cgno); if (!ucpi) return 0; - ucg = ubh_get_ucg (UCPI_UBH(ucpi)); + ucg = ubh_get_ucg (UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) ufs_panic (sb, "ufs_alloc_fragments", "internal error, bad magic number on cg %u", cgno); @@ -569,12 +551,12 @@ cg_found: return 0; goal = ufs_dtogd (result); for (i = count; i < uspi->s_fpb; i++) - ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, goal + i); + ubh_setbit (UCPI_UBH, ucpi->c_freeoff, goal + i); i = uspi->s_fpb - count; DQUOT_FREE_BLOCK(inode, i); fs32_add(sb, &ucg->cg_cs.cs_nffree, i); - uspi->cs_total.cs_nffree += i; + fs32_add(sb, &usb1->fs_cstotal.cs_nffree, i); fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, i); fs32_add(sb, &ucg->cg_frsum[i], 1); goto succed; @@ -588,10 +570,10 @@ cg_found: return 0; } for (i = 0; i < count; i++) - ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, result + i); + ubh_clrbit (UCPI_UBH, ucpi->c_freeoff, result + i); fs32_sub(sb, &ucg->cg_cs.cs_nffree, count); - uspi->cs_total.cs_nffree -= count; + fs32_sub(sb, &usb1->fs_cstotal.cs_nffree, count); fs32_sub(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); fs32_sub(sb, &ucg->cg_frsum[allocsize], 1); @@ -599,16 +581,16 @@ cg_found: fs32_add(sb, &ucg->cg_frsum[allocsize - count], 1); succed: - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **)&ucpi); + ubh_wait_on_buffer (UCPI_UBH); } sb->s_dirt = 1; result += cgno * uspi->s_fpg; - UFSD("EXIT3, result %u\n", result); + UFSD(("EXIT3, result %u\n", result)) return result; } @@ -621,12 +603,12 @@ static unsigned ufs_alloccg_block (struct inode * inode, struct ufs_cylinder_group * ucg; unsigned result, cylno, blkno; - UFSD("ENTER, goal %u\n", goal); + UFSD(("ENTER, goal %u\n", goal)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; usb1 = ubh_get_usb_first(uspi); - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); + ucg = ubh_get_ucg(UCPI_UBH); if (goal == 0) { goal = ucpi->c_rotor; @@ -638,7 +620,7 @@ static unsigned ufs_alloccg_block (struct inode * inode, /* * If the requested block is available, use it. */ - if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, ufs_fragstoblks(goal))) { + if (ubh_isblockset(UCPI_UBH, ucpi->c_freeoff, ufs_fragstoblks(goal))) { result = goal; goto gotit; } @@ -650,7 +632,7 @@ norot: ucpi->c_rotor = result; gotit: blkno = ufs_fragstoblks(result); - ubh_clrblock (UCPI_UBH(ucpi), ucpi->c_freeoff, blkno); + ubh_clrblock (UCPI_UBH, ucpi->c_freeoff, blkno); if ((UFS_SB(sb)->s_flags & UFS_CG_MASK) == UFS_CG_44BSD) ufs_clusteracct (sb, ucpi, blkno, -1); if(DQUOT_ALLOC_BLOCK(inode, uspi->s_fpb)) { @@ -659,76 +641,31 @@ gotit: } fs32_sub(sb, &ucg->cg_cs.cs_nbfree, 1); - uspi->cs_total.cs_nbfree--; + fs32_sub(sb, &usb1->fs_cstotal.cs_nbfree, 1); fs32_sub(sb, &UFS_SB(sb)->fs_cs(ucpi->c_cgx).cs_nbfree, 1); cylno = ufs_cbtocylno(result); fs16_sub(sb, &ubh_cg_blks(ucpi, cylno, ufs_cbtorpos(result)), 1); fs32_sub(sb, &ubh_cg_blktot(ucpi, cylno), 1); - UFSD("EXIT, result %u\n", result); + UFSD(("EXIT, result %u\n", result)) return result; } -static unsigned ubh_scanc(struct ufs_sb_private_info *uspi, - struct ufs_buffer_head *ubh, - unsigned begin, unsigned size, - unsigned char *table, unsigned char mask) +static unsigned ufs_bitmap_search (struct super_block * sb, + struct ufs_cg_private_info * ucpi, unsigned goal, unsigned count) { - unsigned rest, offset; - unsigned char *cp; - - - offset = begin & ~uspi->s_fmask; - begin >>= uspi->s_fshift; - for (;;) { - if ((offset + size) < uspi->s_fsize) - rest = size; - else - rest = uspi->s_fsize - offset; - size -= rest; - cp = ubh->bh[begin]->b_data + offset; - while ((table[*cp++] & mask) == 0 && --rest) - ; - if (rest || !size) - break; - begin++; - offset = 0; - } - return (size + rest); -} - -/* - * Find a block of the specified size in the specified cylinder group. - * @sp: pointer to super block - * @ucpi: pointer to cylinder group info - * @goal: near which block we want find new one - * @count: specified size - */ -static unsigned ufs_bitmap_search(struct super_block *sb, - struct ufs_cg_private_info *ucpi, - unsigned goal, unsigned count) -{ - /* - * Bit patterns for identifying fragments in the block map - * used as ((map & mask_arr) == want_arr) - */ - static const int mask_arr[9] = { - 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff - }; - static const int want_arr[9] = { - 0x0, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe - }; - struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; - struct ufs_super_block_first *usb1; - struct ufs_cylinder_group *ucg; - unsigned start, length, loc, result; - unsigned pos, want, blockmap, mask, end; - - UFSD("ENTER, cg %u, goal %u, count %u\n", ucpi->c_cgx, goal, count); + struct ufs_sb_private_info * uspi; + struct ufs_super_block_first * usb1; + struct ufs_cylinder_group * ucg; + unsigned start, length, location, result; + unsigned possition, fragsize, blockmap, mask; + + UFSD(("ENTER, cg %u, goal %u, count %u\n", ucpi->c_cgx, goal, count)) + uspi = UFS_SB(sb)->s_uspi; usb1 = ubh_get_usb_first (uspi); - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); + ucg = ubh_get_ucg(UCPI_UBH); if (goal) start = ufs_dtogd(goal) >> 3; @@ -736,50 +673,53 @@ static unsigned ufs_bitmap_search(struct super_block *sb, start = ucpi->c_frotor >> 3; length = ((uspi->s_fpg + 7) >> 3) - start; - loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff + start, length, + location = ubh_scanc(UCPI_UBH, ucpi->c_freeoff + start, length, (uspi->s_fpb == 8) ? ufs_fragtable_8fpb : ufs_fragtable_other, 1 << (count - 1 + (uspi->s_fpb & 7))); - if (loc == 0) { + if (location == 0) { length = start + 1; - loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff, length, - (uspi->s_fpb == 8) ? ufs_fragtable_8fpb : - ufs_fragtable_other, - 1 << (count - 1 + (uspi->s_fpb & 7))); - if (loc == 0) { - ufs_error(sb, "ufs_bitmap_search", - "bitmap corrupted on cg %u, start %u," - " length %u, count %u, freeoff %u\n", - ucpi->c_cgx, start, length, count, - ucpi->c_freeoff); + location = ubh_scanc(UCPI_UBH, ucpi->c_freeoff, length, + (uspi->s_fpb == 8) ? ufs_fragtable_8fpb : ufs_fragtable_other, + 1 << (count - 1 + (uspi->s_fpb & 7))); + if (location == 0) { + ufs_error (sb, "ufs_bitmap_search", + "bitmap corrupted on cg %u, start %u, length %u, count %u, freeoff %u\n", + ucpi->c_cgx, start, length, count, ucpi->c_freeoff); return (unsigned)-1; } start = 0; } - result = (start + length - loc) << 3; + result = (start + length - location) << 3; ucpi->c_frotor = result; /* * found the byte in the map */ - - for (end = result + 8; result < end; result += uspi->s_fpb) { - blockmap = ubh_blkmap(UCPI_UBH(ucpi), ucpi->c_freeoff, result); - blockmap <<= 1; - mask = mask_arr[count]; - want = want_arr[count]; - for (pos = 0; pos <= uspi->s_fpb - count; pos++) { - if ((blockmap & mask) == want) { - UFSD("EXIT, result %u\n", result); - return result + pos; - } - mask <<= 1; - want <<= 1; - } - } - - ufs_error(sb, "ufs_bitmap_search", "block not in map on cg %u\n", - ucpi->c_cgx); - UFSD("EXIT (FAILED)\n"); + blockmap = ubh_blkmap(UCPI_UBH, ucpi->c_freeoff, result); + fragsize = 0; + for (possition = 0, mask = 1; possition < 8; possition++, mask <<= 1) { + if (blockmap & mask) { + if (!(possition & uspi->s_fpbmask)) + fragsize = 1; + else + fragsize++; + } + else { + if (fragsize == count) { + result += possition - count; + UFSD(("EXIT, result %u\n", result)) + return result; + } + fragsize = 0; + } + } + if (fragsize == count) { + result += possition - count; + UFSD(("EXIT, result %u\n", result)) + return result; + } + ufs_error (sb, "ufs_bitmap_search", "block not in map on cg %u\n", ucpi->c_cgx); + UFSD(("EXIT (FAILED)\n")) return (unsigned)-1; } @@ -794,9 +734,9 @@ static void ufs_clusteracct(struct super_block * sb, return; if (cnt > 0) - ubh_setbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno); + ubh_setbit(UCPI_UBH, ucpi->c_clusteroff, blkno); else - ubh_clrbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno); + ubh_clrbit(UCPI_UBH, ucpi->c_clusteroff, blkno); /* * Find the size of the cluster going forward. @@ -805,7 +745,7 @@ static void ufs_clusteracct(struct super_block * sb, end = start + uspi->s_contigsumsize; if ( end >= ucpi->c_nclusterblks) end = ucpi->c_nclusterblks; - i = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, end, start); + i = ubh_find_next_zero_bit (UCPI_UBH, ucpi->c_clusteroff, end, start); if (i > end) i = end; forw = i - start; @@ -817,7 +757,7 @@ static void ufs_clusteracct(struct super_block * sb, end = start - uspi->s_contigsumsize; if (end < 0 ) end = -1; - i = ubh_find_last_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, start, end); + i = ubh_find_last_zero_bit (UCPI_UBH, ucpi->c_clusteroff, start, end); if ( i < end) i = end; back = start - i; @@ -829,11 +769,11 @@ static void ufs_clusteracct(struct super_block * sb, i = back + forw + 1; if (i > uspi->s_contigsumsize) i = uspi->s_contigsumsize; - fs32_add(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (i << 2)), cnt); + fs32_add(sb, (__fs32*)ubh_get_addr(UCPI_UBH, ucpi->c_clustersumoff + (i << 2)), cnt); if (back > 0) - fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (back << 2)), cnt); + fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH, ucpi->c_clustersumoff + (back << 2)), cnt); if (forw > 0) - fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (forw << 2)), cnt); + fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH, ucpi->c_clustersumoff + (forw << 2)), cnt); } diff --git a/fs/ufs/cylinder.c b/fs/ufs/cylinder.c index 09c39e5e6..14abb8b83 100644 --- a/fs/ufs/cylinder.c +++ b/fs/ufs/cylinder.c @@ -20,6 +20,15 @@ #include "swab.h" #include "util.h" +#undef UFS_CYLINDER_DEBUG + +#ifdef UFS_CYLINDER_DEBUG +#define UFSD(x) printk("(%s, %d), %s:", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + + /* * Read cylinder group into cache. The memory space for ufs_cg_private_info * structure is already allocated during ufs_read_super. @@ -33,19 +42,19 @@ static void ufs_read_cylinder (struct super_block * sb, struct ufs_cylinder_group * ucg; unsigned i, j; - UFSD("ENTER, cgno %u, bitmap_nr %u\n", cgno, bitmap_nr); + UFSD(("ENTER, cgno %u, bitmap_nr %u\n", cgno, bitmap_nr)) uspi = sbi->s_uspi; ucpi = sbi->s_ucpi[bitmap_nr]; ucg = (struct ufs_cylinder_group *)sbi->s_ucg[cgno]->b_data; - UCPI_UBH(ucpi)->fragment = ufs_cgcmin(cgno); - UCPI_UBH(ucpi)->count = uspi->s_cgsize >> sb->s_blocksize_bits; + UCPI_UBH->fragment = ufs_cgcmin(cgno); + UCPI_UBH->count = uspi->s_cgsize >> sb->s_blocksize_bits; /* * We have already the first fragment of cylinder group block in buffer */ - UCPI_UBH(ucpi)->bh[0] = sbi->s_ucg[cgno]; - for (i = 1; i < UCPI_UBH(ucpi)->count; i++) - if (!(UCPI_UBH(ucpi)->bh[i] = sb_bread(sb, UCPI_UBH(ucpi)->fragment + i))) + UCPI_UBH->bh[0] = sbi->s_ucg[cgno]; + for (i = 1; i < UCPI_UBH->count; i++) + if (!(UCPI_UBH->bh[i] = sb_bread(sb, UCPI_UBH->fragment + i))) goto failed; sbi->s_cgno[bitmap_nr] = cgno; @@ -64,7 +73,7 @@ static void ufs_read_cylinder (struct super_block * sb, ucpi->c_clustersumoff = fs32_to_cpu(sb, ucg->cg_u.cg_44.cg_clustersumoff); ucpi->c_clusteroff = fs32_to_cpu(sb, ucg->cg_u.cg_44.cg_clusteroff); ucpi->c_nclusterblks = fs32_to_cpu(sb, ucg->cg_u.cg_44.cg_nclusterblks); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return; failed: @@ -86,15 +95,15 @@ void ufs_put_cylinder (struct super_block * sb, unsigned bitmap_nr) struct ufs_cylinder_group * ucg; unsigned i; - UFSD("ENTER, bitmap_nr %u\n", bitmap_nr); + UFSD(("ENTER, bitmap_nr %u\n", bitmap_nr)) uspi = sbi->s_uspi; if (sbi->s_cgno[bitmap_nr] == UFS_CGNO_EMPTY) { - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return; } ucpi = sbi->s_ucpi[bitmap_nr]; - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); + ucg = ubh_get_ucg(UCPI_UBH); if (uspi->s_ncg > UFS_MAX_GROUP_LOADED && bitmap_nr >= sbi->s_cg_loaded) { ufs_panic (sb, "ufs_put_cylinder", "internal error"); @@ -107,13 +116,13 @@ void ufs_put_cylinder (struct super_block * sb, unsigned bitmap_nr) ucg->cg_rotor = cpu_to_fs32(sb, ucpi->c_rotor); ucg->cg_frotor = cpu_to_fs32(sb, ucpi->c_frotor); ucg->cg_irotor = cpu_to_fs32(sb, ucpi->c_irotor); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); - for (i = 1; i < UCPI_UBH(ucpi)->count; i++) { - brelse (UCPI_UBH(ucpi)->bh[i]); + ubh_mark_buffer_dirty (UCPI_UBH); + for (i = 1; i < UCPI_UBH->count; i++) { + brelse (UCPI_UBH->bh[i]); } sbi->s_cgno[bitmap_nr] = UFS_CGNO_EMPTY; - UFSD("EXIT\n"); + UFSD(("EXIT\n")) } /* @@ -130,7 +139,7 @@ struct ufs_cg_private_info * ufs_load_cylinder ( struct ufs_cg_private_info * ucpi; unsigned cg, i, j; - UFSD("ENTER, cgno %u\n", cgno); + UFSD(("ENTER, cgno %u\n", cgno)) uspi = sbi->s_uspi; if (cgno >= uspi->s_ncg) { @@ -141,7 +150,7 @@ struct ufs_cg_private_info * ufs_load_cylinder ( * Cylinder group number cg it in cache and it was last used */ if (sbi->s_cgno[0] == cgno) { - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return sbi->s_ucpi[0]; } /* @@ -151,16 +160,16 @@ struct ufs_cg_private_info * ufs_load_cylinder ( if (sbi->s_cgno[cgno] != UFS_CGNO_EMPTY) { if (sbi->s_cgno[cgno] != cgno) { ufs_panic (sb, "ufs_load_cylinder", "internal error, wrong number of cg in cache"); - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return NULL; } else { - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return sbi->s_ucpi[cgno]; } } else { ufs_read_cylinder (sb, cgno, cgno); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return sbi->s_ucpi[cgno]; } } @@ -195,6 +204,6 @@ struct ufs_cg_private_info * ufs_load_cylinder ( sbi->s_ucpi[0] = ucpi; ufs_read_cylinder (sb, cgno, 0); } - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return sbi->s_ucpi[0]; } diff --git a/fs/ufs/dir.c b/fs/ufs/dir.c index e04327cb8..1a561202d 100644 --- a/fs/ufs/dir.c +++ b/fs/ufs/dir.c @@ -11,20 +11,31 @@ * 4.4BSD (FreeBSD) support added on February 1st 1998 by * Niels Kristian Bech Jensen partially based * on code by Martin von Loewis . - * - * Migration to usage of "page cache" on May 2006 by - * Evgeniy Dushistov based on ext2 code base. */ #include #include #include #include +#include #include #include "swab.h" #include "util.h" +#undef UFS_DIR_DEBUG + +#ifdef UFS_DIR_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + +static int +ufs_check_dir_entry (const char *, struct inode *, struct ufs_dir_entry *, + struct buffer_head *, unsigned long); + + /* * NOTE! unlike strncmp, ufs_match returns 1 for success, 0 for failure. * @@ -40,541 +51,495 @@ static inline int ufs_match(struct super_block *sb, int len, return !memcmp(name, de->d_name, len); } -static int ufs_commit_chunk(struct page *page, unsigned from, unsigned to) +/* + * This is blatantly stolen from ext2fs + */ +static int +ufs_readdir (struct file * filp, void * dirent, filldir_t filldir) { - struct inode *dir = page->mapping->host; - int err = 0; - dir->i_version++; - page->mapping->a_ops->commit_write(NULL, page, from, to); - if (IS_DIRSYNC(dir)) - err = write_one_page(page, 1); - else - unlock_page(page); - return err; -} + struct inode *inode = filp->f_dentry->d_inode; + int error = 0; + unsigned long offset, lblk; + int i, stored; + struct buffer_head * bh; + struct ufs_dir_entry * de; + struct super_block * sb; + int de_reclen; + unsigned flags; + u64 blk= 0L; + + lock_kernel(); + + sb = inode->i_sb; + flags = UFS_SB(sb)->s_flags; + + UFSD(("ENTER, ino %lu f_pos %lu\n", inode->i_ino, (unsigned long) filp->f_pos)) + + stored = 0; + bh = NULL; + offset = filp->f_pos & (sb->s_blocksize - 1); + + while (!error && !stored && filp->f_pos < inode->i_size) { + lblk = (filp->f_pos) >> sb->s_blocksize_bits; + blk = ufs_frag_map(inode, lblk); + if (!blk || !(bh = sb_bread(sb, blk))) { + /* XXX - error - skip to the next block */ + printk("ufs_readdir: " + "dir inode %lu has a hole at offset %lu\n", + inode->i_ino, (unsigned long int)filp->f_pos); + filp->f_pos += sb->s_blocksize - offset; + continue; + } -static inline void ufs_put_page(struct page *page) -{ - kunmap(page); - page_cache_release(page); -} +revalidate: + /* If the dir block has changed since the last call to + * readdir(2), then we might be pointing to an invalid + * dirent right now. Scan from the start of the block + * to make sure. */ + if (filp->f_version != inode->i_version) { + for (i = 0; i < sb->s_blocksize && i < offset; ) { + de = (struct ufs_dir_entry *)(bh->b_data + i); + /* It's too expensive to do a full + * dirent test each time round this + * loop, but we do have to test at + * least that it is non-zero. A + * failure will be detected in the + * dirent test below. */ + de_reclen = fs16_to_cpu(sb, de->d_reclen); + if (de_reclen < 1) + break; + i += de_reclen; + } + offset = i; + filp->f_pos = (filp->f_pos & ~(sb->s_blocksize - 1)) + | offset; + filp->f_version = inode->i_version; + } -static inline unsigned long ufs_dir_pages(struct inode *inode) -{ - return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT; -} + while (!error && filp->f_pos < inode->i_size + && offset < sb->s_blocksize) { + de = (struct ufs_dir_entry *) (bh->b_data + offset); + /* XXX - put in a real ufs_check_dir_entry() */ + if ((de->d_reclen == 0) || (ufs_get_de_namlen(sb, de) == 0)) { + filp->f_pos = (filp->f_pos & + (sb->s_blocksize - 1)) + + sb->s_blocksize; + brelse(bh); + unlock_kernel(); + return stored; + } + if (!ufs_check_dir_entry ("ufs_readdir", inode, de, + bh, offset)) { + /* On error, skip the f_pos to the + next block. */ + filp->f_pos = (filp->f_pos | + (sb->s_blocksize - 1)) + + 1; + brelse (bh); + unlock_kernel(); + return stored; + } + offset += fs16_to_cpu(sb, de->d_reclen); + if (de->d_ino) { + /* We might block in the next section + * if the data destination is + * currently swapped out. So, use a + * version stamp to detect whether or + * not the directory has been modified + * during the copy operation. */ + unsigned long version = filp->f_version; + unsigned char d_type = DT_UNKNOWN; -ino_t ufs_inode_by_name(struct inode *dir, struct dentry *dentry) -{ - ino_t res = 0; - struct ufs_dir_entry *de; - struct page *page; - - de = ufs_find_entry(dir, dentry, &page); - if (de) { - res = fs32_to_cpu(dir->i_sb, de->d_ino); - ufs_put_page(page); + UFSD(("filldir(%s,%u)\n", de->d_name, + fs32_to_cpu(sb, de->d_ino))) + UFSD(("namlen %u\n", ufs_get_de_namlen(sb, de))) + + if ((flags & UFS_DE_MASK) == UFS_DE_44BSD) + d_type = de->d_u.d_44.d_type; + error = filldir(dirent, de->d_name, + ufs_get_de_namlen(sb, de), filp->f_pos, + fs32_to_cpu(sb, de->d_ino), d_type); + if (error) + break; + if (version != filp->f_version) + goto revalidate; + stored ++; + } + filp->f_pos += fs16_to_cpu(sb, de->d_reclen); + } + offset = 0; + brelse (bh); } - return res; + unlock_kernel(); + return 0; } +/* + * define how far ahead to read directories while searching them. + */ +#define NAMEI_RA_CHUNKS 2 +#define NAMEI_RA_BLOCKS 4 +#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) +#define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b)) -/* Releases the page */ -void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, - struct page *page, struct inode *inode) +/* + * ufs_find_entry() + * + * finds an entry in the specified directory with the wanted name. It + * returns the cache buffer in which the entry was found, and the entry + * itself (as a parameter - res_bh). It does NOT read the inode of the + * entry - you'll have to do that yourself if you want to. + */ +struct ufs_dir_entry * ufs_find_entry (struct dentry *dentry, + struct buffer_head ** res_bh) { - unsigned from = (char *) de - (char *) page_address(page); - unsigned to = from + fs16_to_cpu(dir->i_sb, de->d_reclen); - int err; + struct super_block * sb; + struct buffer_head * bh_use[NAMEI_RA_SIZE]; + struct buffer_head * bh_read[NAMEI_RA_SIZE]; + unsigned long offset; + int block, toread, i, err; + struct inode *dir = dentry->d_parent->d_inode; + const char *name = dentry->d_name.name; + int namelen = dentry->d_name.len; - lock_page(page); - err = page->mapping->a_ops->prepare_write(NULL, page, from, to); - BUG_ON(err); - de->d_ino = cpu_to_fs32(dir->i_sb, inode->i_ino); - ufs_set_de_type(dir->i_sb, de, inode->i_mode); - err = ufs_commit_chunk(page, from, to); - ufs_put_page(page); - dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; - mark_inode_dirty(dir); -} + UFSD(("ENTER, dir_ino %lu, name %s, namlen %u\n", dir->i_ino, name, namelen)) + + *res_bh = NULL; + + sb = dir->i_sb; + + if (namelen > UFS_MAXNAMLEN) + return NULL; + memset (bh_use, 0, sizeof (bh_use)); + toread = 0; + for (block = 0; block < NAMEI_RA_SIZE; ++block) { + struct buffer_head * bh; -static void ufs_check_page(struct page *page) -{ - struct inode *dir = page->mapping->host; - struct super_block *sb = dir->i_sb; - char *kaddr = page_address(page); - unsigned offs, rec_len; - unsigned limit = PAGE_CACHE_SIZE; - struct ufs_dir_entry *p; - char *error; - - if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) { - limit = dir->i_size & ~PAGE_CACHE_MASK; - if (limit & (UFS_SECTOR_SIZE - 1)) - goto Ebadsize; - if (!limit) - goto out; - } - for (offs = 0; offs <= limit - UFS_DIR_REC_LEN(1); offs += rec_len) { - p = (struct ufs_dir_entry *)(kaddr + offs); - rec_len = fs16_to_cpu(sb, p->d_reclen); - - if (rec_len < UFS_DIR_REC_LEN(1)) - goto Eshort; - if (rec_len & 3) - goto Ealign; - if (rec_len < UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, p))) - goto Enamelen; - if (((offs + rec_len - 1) ^ offs) & ~(UFS_SECTOR_SIZE-1)) - goto Espan; - if (fs32_to_cpu(sb, p->d_ino) > (UFS_SB(sb)->s_uspi->s_ipg * - UFS_SB(sb)->s_uspi->s_ncg)) - goto Einumber; + if ((block << sb->s_blocksize_bits) >= dir->i_size) + break; + bh = ufs_getfrag (dir, block, 0, &err); + bh_use[block] = bh; + if (bh && !buffer_uptodate(bh)) + bh_read[toread++] = bh; } - if (offs != limit) - goto Eend; -out: - SetPageFsMisc(page); - return; - - /* Too bad, we had an error */ - -Ebadsize: - ufs_error(sb, "ufs_check_page", - "size of directory #%lu is not a multiple of chunk size", - dir->i_ino - ); - goto fail; -Eshort: - error = "rec_len is smaller than minimal"; - goto bad_entry; -Ealign: - error = "unaligned directory entry"; - goto bad_entry; -Enamelen: - error = "rec_len is too small for name_len"; - goto bad_entry; -Espan: - error = "directory entry across blocks"; - goto bad_entry; -Einumber: - error = "inode out of bounds"; -bad_entry: - ufs_error (sb, "ufs_check_page", "bad entry in directory #%lu: %s - " - "offset=%lu, rec_len=%d, name_len=%d", - dir->i_ino, error, (page->index<i_ino, (page->index<i_mapping; - struct page *page = read_cache_page(mapping, n, - (filler_t*)mapping->a_ops->readpage, NULL); - if (!IS_ERR(page)) { - wait_on_page_locked(page); - kmap(page); - if (!PageUptodate(page)) - goto fail; - if (!PageFsMisc(page)) - ufs_check_page(page); - if (PageError(page)) - goto fail; + for (block = 0, offset = 0; offset < dir->i_size; block++) { + struct buffer_head * bh; + struct ufs_dir_entry * de; + char * dlimit; + + if ((block % NAMEI_RA_BLOCKS) == 0 && toread) { + ll_rw_block (READ, toread, bh_read); + toread = 0; + } + bh = bh_use[block % NAMEI_RA_SIZE]; + if (!bh) { + ufs_error (sb, "ufs_find_entry", + "directory #%lu contains a hole at offset %lu", + dir->i_ino, offset); + offset += sb->s_blocksize; + continue; + } + wait_on_buffer (bh); + if (!buffer_uptodate(bh)) { + /* + * read error: all bets are off + */ + break; + } + + de = (struct ufs_dir_entry *) bh->b_data; + dlimit = bh->b_data + sb->s_blocksize; + while ((char *) de < dlimit && offset < dir->i_size) { + /* this code is executed quadratically often */ + /* do minimal checking by hand */ + int de_len; + + if ((char *) de + namelen <= dlimit && + ufs_match(sb, namelen, name, de)) { + /* found a match - + just to be sure, do a full check */ + if (!ufs_check_dir_entry("ufs_find_entry", + dir, de, bh, offset)) + goto failed; + for (i = 0; i < NAMEI_RA_SIZE; ++i) { + if (bh_use[i] != bh) + brelse (bh_use[i]); + } + *res_bh = bh; + return de; + } + /* prevent looping on a bad block */ + de_len = fs16_to_cpu(sb, de->d_reclen); + if (de_len <= 0) + goto failed; + offset += de_len; + de = (struct ufs_dir_entry *) ((char *) de + de_len); + } + + brelse (bh); + if (((block + NAMEI_RA_SIZE) << sb->s_blocksize_bits ) >= + dir->i_size) + bh = NULL; + else + bh = ufs_getfrag (dir, block + NAMEI_RA_SIZE, 0, &err); + bh_use[block % NAMEI_RA_SIZE] = bh; + if (bh && !buffer_uptodate(bh)) + bh_read[toread++] = bh; } - return page; -fail: - ufs_put_page(page); - return ERR_PTR(-EIO); +failed: + for (i = 0; i < NAMEI_RA_SIZE; ++i) brelse (bh_use[i]); + UFSD(("EXIT\n")) + return NULL; } -/* - * Return the offset into page `page_nr' of the last valid - * byte in that page, plus one. - */ -static unsigned -ufs_last_byte(struct inode *inode, unsigned long page_nr) +static int +ufs_check_dir_entry (const char *function, struct inode *dir, + struct ufs_dir_entry *de, struct buffer_head *bh, + unsigned long offset) { - unsigned last_byte = inode->i_size; - - last_byte -= page_nr << PAGE_CACHE_SHIFT; - if (last_byte > PAGE_CACHE_SIZE) - last_byte = PAGE_CACHE_SIZE; - return last_byte; + struct super_block *sb = dir->i_sb; + const char *error_msg = NULL; + int rlen = fs16_to_cpu(sb, de->d_reclen); + + if (rlen < UFS_DIR_REC_LEN(1)) + error_msg = "reclen is smaller than minimal"; + else if (rlen % 4 != 0) + error_msg = "reclen % 4 != 0"; + else if (rlen < UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de))) + error_msg = "reclen is too small for namlen"; + else if (((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize) + error_msg = "directory entry across blocks"; + else if (fs32_to_cpu(sb, de->d_ino) > (UFS_SB(sb)->s_uspi->s_ipg * + UFS_SB(sb)->s_uspi->s_ncg)) + error_msg = "inode out of bounds"; + + if (error_msg != NULL) + ufs_error (sb, function, "bad entry in directory #%lu, size %Lu: %s - " + "offset=%lu, inode=%lu, reclen=%d, namlen=%d", + dir->i_ino, dir->i_size, error_msg, offset, + (unsigned long)fs32_to_cpu(sb, de->d_ino), + rlen, ufs_get_de_namlen(sb, de)); + + return (error_msg == NULL ? 1 : 0); } -static inline struct ufs_dir_entry * -ufs_next_entry(struct super_block *sb, struct ufs_dir_entry *p) +struct ufs_dir_entry *ufs_dotdot(struct inode *dir, struct buffer_head **p) { - return (struct ufs_dir_entry *)((char *)p + - fs16_to_cpu(sb, p->d_reclen)); -} + int err; + struct buffer_head *bh = ufs_bread (dir, 0, 0, &err); + struct ufs_dir_entry *res = NULL; -struct ufs_dir_entry *ufs_dotdot(struct inode *dir, struct page **p) + if (bh) { + res = (struct ufs_dir_entry *) bh->b_data; + res = (struct ufs_dir_entry *)((char *)res + + fs16_to_cpu(dir->i_sb, res->d_reclen)); + } + *p = bh; + return res; +} +ino_t ufs_inode_by_name(struct inode * dir, struct dentry *dentry) { - struct page *page = ufs_get_page(dir, 0); - struct ufs_dir_entry *de = NULL; + ino_t res = 0; + struct ufs_dir_entry * de; + struct buffer_head *bh; - if (!IS_ERR(page)) { - de = ufs_next_entry(dir->i_sb, - (struct ufs_dir_entry *)page_address(page)); - *p = page; + de = ufs_find_entry (dentry, &bh); + if (de) { + res = fs32_to_cpu(dir->i_sb, de->d_ino); + brelse(bh); } - return de; + return res; } -/* - * ufs_find_entry() - * - * finds an entry in the specified directory with the wanted name. It - * returns the page in which the entry was found, and the entry itself - * (as a parameter - res_dir). Page is returned mapped and unlocked. - * Entry is guaranteed to be valid. - */ -struct ufs_dir_entry *ufs_find_entry(struct inode *dir, struct dentry *dentry, - struct page **res_page) +void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, + struct buffer_head *bh, struct inode *inode) { - struct super_block *sb = dir->i_sb; - const char *name = dentry->d_name.name; - int namelen = dentry->d_name.len; - unsigned reclen = UFS_DIR_REC_LEN(namelen); - unsigned long start, n; - unsigned long npages = ufs_dir_pages(dir); - struct page *page = NULL; - struct ufs_inode_info *ui = UFS_I(dir); - struct ufs_dir_entry *de; - - UFSD("ENTER, dir_ino %lu, name %s, namlen %u\n", dir->i_ino, name, namelen); - - if (npages == 0 || namelen > UFS_MAXNAMLEN) - goto out; - - /* OFFSET_CACHE */ - *res_page = NULL; - - start = ui->i_dir_start_lookup; - - if (start >= npages) - start = 0; - n = start; - do { - char *kaddr; - page = ufs_get_page(dir, n); - if (!IS_ERR(page)) { - kaddr = page_address(page); - de = (struct ufs_dir_entry *) kaddr; - kaddr += ufs_last_byte(dir, n) - reclen; - while ((char *) de <= kaddr) { - if (de->d_reclen == 0) { - ufs_error(dir->i_sb, __FUNCTION__, - "zero-length directory entry"); - ufs_put_page(page); - goto out; - } - if (ufs_match(sb, namelen, name, de)) - goto found; - de = ufs_next_entry(sb, de); - } - ufs_put_page(page); - } - if (++n >= npages) - n = 0; - } while (n != start); -out: - return NULL; - -found: - *res_page = page; - ui->i_dir_start_lookup = n; - return de; + dir->i_version++; + de->d_ino = cpu_to_fs32(dir->i_sb, inode->i_ino); + mark_buffer_dirty(bh); + if (IS_DIRSYNC(dir)) + sync_dirty_buffer(bh); + brelse (bh); } /* - * Parent is locked. + * ufs_add_entry() + * + * adds a file entry to the specified directory, using the same + * semantics as ufs_find_entry(). It returns NULL if it failed. */ int ufs_add_link(struct dentry *dentry, struct inode *inode) { + struct super_block * sb; + struct ufs_sb_private_info * uspi; + unsigned long offset; + unsigned fragoff; + unsigned short rec_len; + struct buffer_head * bh; + struct ufs_dir_entry * de, * de1; struct inode *dir = dentry->d_parent->d_inode; const char *name = dentry->d_name.name; int namelen = dentry->d_name.len; - struct super_block *sb = dir->i_sb; - unsigned reclen = UFS_DIR_REC_LEN(namelen); - unsigned short rec_len, name_len; - struct page *page = NULL; - struct ufs_dir_entry *de; - unsigned long npages = ufs_dir_pages(dir); - unsigned long n; - char *kaddr; - unsigned from, to; int err; - UFSD("ENTER, name %s, namelen %u\n", name, namelen); - - /* - * We take care of directory expansion in the same loop. - * This code plays outside i_size, so it locks the page - * to protect that region. - */ - for (n = 0; n <= npages; n++) { - char *dir_end; - - page = ufs_get_page(dir, n); - err = PTR_ERR(page); - if (IS_ERR(page)) - goto out; - lock_page(page); - kaddr = page_address(page); - dir_end = kaddr + ufs_last_byte(dir, n); - de = (struct ufs_dir_entry *)kaddr; - kaddr += PAGE_CACHE_SIZE - reclen; - while ((char *)de <= kaddr) { - if ((char *)de == dir_end) { - /* We hit i_size */ - name_len = 0; - rec_len = UFS_SECTOR_SIZE; - de->d_reclen = cpu_to_fs16(sb, UFS_SECTOR_SIZE); - de->d_ino = 0; - goto got_it; + UFSD(("ENTER, name %s, namelen %u\n", name, namelen)) + + sb = dir->i_sb; + uspi = UFS_SB(sb)->s_uspi; + + if (!namelen) + return -EINVAL; + bh = ufs_bread (dir, 0, 0, &err); + if (!bh) + return err; + rec_len = UFS_DIR_REC_LEN(namelen); + offset = 0; + de = (struct ufs_dir_entry *) bh->b_data; + while (1) { + if ((char *)de >= UFS_SECTOR_SIZE + bh->b_data) { + fragoff = offset & ~uspi->s_fmask; + if (fragoff != 0 && fragoff != UFS_SECTOR_SIZE) + ufs_error (sb, "ufs_add_entry", "internal error" + " fragoff %u", fragoff); + if (!fragoff) { + brelse (bh); + bh = ufs_bread (dir, offset >> sb->s_blocksize_bits, 1, &err); + if (!bh) + return err; } - if (de->d_reclen == 0) { - ufs_error(dir->i_sb, __FUNCTION__, - "zero-length directory entry"); - err = -EIO; - goto out_unlock; + if (dir->i_size <= offset) { + if (dir->i_size == 0) { + brelse(bh); + return -ENOENT; + } + de = (struct ufs_dir_entry *) (bh->b_data + fragoff); + de->d_ino = 0; + de->d_reclen = cpu_to_fs16(sb, UFS_SECTOR_SIZE); + ufs_set_de_namlen(sb, de, 0); + dir->i_size = offset + UFS_SECTOR_SIZE; + mark_inode_dirty(dir); + } else { + de = (struct ufs_dir_entry *) bh->b_data; } - err = -EEXIST; - if (ufs_match(sb, namelen, name, de)) - goto out_unlock; - name_len = UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de)); - rec_len = fs16_to_cpu(sb, de->d_reclen); - if (!de->d_ino && rec_len >= reclen) - goto got_it; - if (rec_len >= name_len + reclen) - goto got_it; - de = (struct ufs_dir_entry *) ((char *) de + rec_len); } - unlock_page(page); - ufs_put_page(page); + if (!ufs_check_dir_entry ("ufs_add_entry", dir, de, bh, offset)) { + brelse (bh); + return -ENOENT; + } + if (ufs_match(sb, namelen, name, de)) { + brelse (bh); + return -EEXIST; + } + if (de->d_ino == 0 && fs16_to_cpu(sb, de->d_reclen) >= rec_len) + break; + + if (fs16_to_cpu(sb, de->d_reclen) >= + UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de)) + rec_len) + break; + offset += fs16_to_cpu(sb, de->d_reclen); + de = (struct ufs_dir_entry *) ((char *) de + fs16_to_cpu(sb, de->d_reclen)); } - BUG(); - return -EINVAL; - -got_it: - from = (char*)de - (char*)page_address(page); - to = from + rec_len; - err = page->mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - goto out_unlock; - if (de->d_ino) { - struct ufs_dir_entry *de1 = - (struct ufs_dir_entry *) ((char *) de + name_len); - de1->d_reclen = cpu_to_fs16(sb, rec_len - name_len); - de->d_reclen = cpu_to_fs16(sb, name_len); + if (de->d_ino) { + de1 = (struct ufs_dir_entry *) ((char *) de + + UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de))); + de1->d_reclen = + cpu_to_fs16(sb, fs16_to_cpu(sb, de->d_reclen) - + UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de))); + de->d_reclen = + cpu_to_fs16(sb, UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, de))); de = de1; } - + de->d_ino = 0; ufs_set_de_namlen(sb, de, namelen); - memcpy(de->d_name, name, namelen + 1); + memcpy (de->d_name, name, namelen + 1); de->d_ino = cpu_to_fs32(sb, inode->i_ino); ufs_set_de_type(sb, de, inode->i_mode); - - err = ufs_commit_chunk(page, from, to); + mark_buffer_dirty(bh); + if (IS_DIRSYNC(dir)) + sync_dirty_buffer(bh); + brelse (bh); dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC; - + dir->i_version++; mark_inode_dirty(dir); - /* OFFSET_CACHE */ -out_put: - ufs_put_page(page); -out: - return err; -out_unlock: - unlock_page(page); - goto out_put; -} -static inline unsigned -ufs_validate_entry(struct super_block *sb, char *base, - unsigned offset, unsigned mask) -{ - struct ufs_dir_entry *de = (struct ufs_dir_entry*)(base + offset); - struct ufs_dir_entry *p = (struct ufs_dir_entry*)(base + (offset&mask)); - while ((char*)p < (char*)de) { - if (p->d_reclen == 0) - break; - p = ufs_next_entry(sb, p); - } - return (char *)p - base; -} - - -/* - * This is blatantly stolen from ext2fs - */ -static int -ufs_readdir(struct file *filp, void *dirent, filldir_t filldir) -{ - loff_t pos = filp->f_pos; - struct inode *inode = filp->f_dentry->d_inode; - struct super_block *sb = inode->i_sb; - unsigned int offset = pos & ~PAGE_CACHE_MASK; - unsigned long n = pos >> PAGE_CACHE_SHIFT; - unsigned long npages = ufs_dir_pages(inode); - unsigned chunk_mask = ~(UFS_SECTOR_SIZE - 1); - int need_revalidate = filp->f_version != inode->i_version; - unsigned flags = UFS_SB(sb)->s_flags; - - UFSD("BEGIN\n"); - - if (pos > inode->i_size - UFS_DIR_REC_LEN(1)) - return 0; - - for ( ; n < npages; n++, offset = 0) { - char *kaddr, *limit; - struct ufs_dir_entry *de; - - struct page *page = ufs_get_page(inode, n); - - if (IS_ERR(page)) { - ufs_error(sb, __FUNCTION__, - "bad page in #%lu", - inode->i_ino); - filp->f_pos += PAGE_CACHE_SIZE - offset; - return -EIO; - } - kaddr = page_address(page); - if (unlikely(need_revalidate)) { - if (offset) { - offset = ufs_validate_entry(sb, kaddr, offset, chunk_mask); - filp->f_pos = (n<f_version = inode->i_version; - need_revalidate = 0; - } - de = (struct ufs_dir_entry *)(kaddr+offset); - limit = kaddr + ufs_last_byte(inode, n) - UFS_DIR_REC_LEN(1); - for ( ;(char*)de <= limit; de = ufs_next_entry(sb, de)) { - if (de->d_reclen == 0) { - ufs_error(sb, __FUNCTION__, - "zero-length directory entry"); - ufs_put_page(page); - return -EIO; - } - if (de->d_ino) { - int over; - unsigned char d_type = DT_UNKNOWN; - - offset = (char *)de - kaddr; - - UFSD("filldir(%s,%u)\n", de->d_name, - fs32_to_cpu(sb, de->d_ino)); - UFSD("namlen %u\n", ufs_get_de_namlen(sb, de)); - - if ((flags & UFS_DE_MASK) == UFS_DE_44BSD) - d_type = de->d_u.d_44.d_type; - - over = filldir(dirent, de->d_name, - ufs_get_de_namlen(sb, de), - (n<d_ino), d_type); - if (over) { - ufs_put_page(page); - return 0; - } - } - filp->f_pos += fs16_to_cpu(sb, de->d_reclen); - } - ufs_put_page(page); - } + UFSD(("EXIT\n")) return 0; } - /* * ufs_delete_entry deletes a directory entry by merging it with the * previous entry. */ -int ufs_delete_entry(struct inode *inode, struct ufs_dir_entry *dir, - struct page * page) +int ufs_delete_entry (struct inode * inode, struct ufs_dir_entry * dir, + struct buffer_head * bh ) + { - struct super_block *sb = inode->i_sb; - struct address_space *mapping = page->mapping; - char *kaddr = page_address(page); - unsigned from = ((char*)dir - kaddr) & ~(UFS_SECTOR_SIZE - 1); - unsigned to = ((char*)dir - kaddr) + fs16_to_cpu(sb, dir->d_reclen); - struct ufs_dir_entry *pde = NULL; - struct ufs_dir_entry *de = (struct ufs_dir_entry *) (kaddr + from); - int err; - - UFSD("ENTER\n"); - - UFSD("ino %u, reclen %u, namlen %u, name %s\n", - fs32_to_cpu(sb, de->d_ino), - fs16_to_cpu(sb, de->d_reclen), - ufs_get_de_namlen(sb, de), de->d_name); + struct super_block * sb; + struct ufs_dir_entry * de, * pde; + unsigned i; + + UFSD(("ENTER\n")) - while ((char*)de < (char*)dir) { - if (de->d_reclen == 0) { - ufs_error(inode->i_sb, __FUNCTION__, - "zero-length directory entry"); - err = -EIO; - goto out; + sb = inode->i_sb; + i = 0; + pde = NULL; + de = (struct ufs_dir_entry *) bh->b_data; + + UFSD(("ino %u, reclen %u, namlen %u, name %s\n", + fs32_to_cpu(sb, de->d_ino), + fs16_to_cpu(sb, de->d_reclen), + ufs_get_de_namlen(sb, de), de->d_name)) + + while (i < bh->b_size) { + if (!ufs_check_dir_entry ("ufs_delete_entry", inode, de, bh, i)) { + brelse(bh); + return -EIO; + } + if (de == dir) { + if (pde) + fs16_add(sb, &pde->d_reclen, + fs16_to_cpu(sb, dir->d_reclen)); + dir->d_ino = 0; + inode->i_version++; + inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; + mark_inode_dirty(inode); + mark_buffer_dirty(bh); + if (IS_DIRSYNC(inode)) + sync_dirty_buffer(bh); + brelse(bh); + UFSD(("EXIT\n")) + return 0; } - pde = de; - de = ufs_next_entry(sb, de); + i += fs16_to_cpu(sb, de->d_reclen); + if (i == UFS_SECTOR_SIZE) pde = NULL; + else pde = de; + de = (struct ufs_dir_entry *) + ((char *) de + fs16_to_cpu(sb, de->d_reclen)); + if (i == UFS_SECTOR_SIZE && de->d_reclen == 0) + break; } - if (pde) - from = (char*)pde - (char*)page_address(page); - lock_page(page); - err = mapping->a_ops->prepare_write(NULL, page, from, to); - BUG_ON(err); - if (pde) - pde->d_reclen = cpu_to_fs16(sb, to-from); - dir->d_ino = 0; - err = ufs_commit_chunk(page, from, to); - inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC; - mark_inode_dirty(inode); -out: - ufs_put_page(page); - UFSD("EXIT\n"); - return err; + UFSD(("EXIT\n")) + brelse(bh); + return -ENOENT; } int ufs_make_empty(struct inode * inode, struct inode *dir) { struct super_block * sb = dir->i_sb; - struct address_space *mapping = inode->i_mapping; - struct page *page = grab_cache_page(mapping, 0); + struct buffer_head * dir_block; struct ufs_dir_entry * de; - char *base; int err; - if (!page) - return -ENOMEM; - kmap(page); - err = mapping->a_ops->prepare_write(NULL, page, 0, UFS_SECTOR_SIZE); - if (err) { - unlock_page(page); - goto fail; - } - - - base = (char*)page_address(page); - memset(base, 0, PAGE_CACHE_SIZE); - - de = (struct ufs_dir_entry *) base; + dir_block = ufs_bread (inode, 0, 1, &err); + if (!dir_block) + return err; + inode->i_blocks = sb->s_blocksize / UFS_SECTOR_SIZE; + de = (struct ufs_dir_entry *) dir_block->b_data; de->d_ino = cpu_to_fs32(sb, inode->i_ino); ufs_set_de_type(sb, de, inode->i_mode); ufs_set_de_namlen(sb, de, 1); @@ -587,65 +552,72 @@ int ufs_make_empty(struct inode * inode, struct inode *dir) de->d_reclen = cpu_to_fs16(sb, UFS_SECTOR_SIZE - UFS_DIR_REC_LEN(1)); ufs_set_de_namlen(sb, de, 2); strcpy (de->d_name, ".."); - - err = ufs_commit_chunk(page, 0, UFS_SECTOR_SIZE); -fail: - kunmap(page); - page_cache_release(page); - return err; + mark_buffer_dirty(dir_block); + brelse (dir_block); + mark_inode_dirty(inode); + return 0; } /* * routine to check that the specified directory is empty (for rmdir) */ -int ufs_empty_dir(struct inode * inode) +int ufs_empty_dir (struct inode * inode) { - struct super_block *sb = inode->i_sb; - struct page *page = NULL; - unsigned long i, npages = ufs_dir_pages(inode); - - for (i = 0; i < npages; i++) { - char *kaddr; - struct ufs_dir_entry *de; - page = ufs_get_page(inode, i); - - if (IS_ERR(page)) - continue; - - kaddr = page_address(page); - de = (struct ufs_dir_entry *)kaddr; - kaddr += ufs_last_byte(inode, i) - UFS_DIR_REC_LEN(1); - - while ((char *)de <= kaddr) { - if (de->d_reclen == 0) { - ufs_error(inode->i_sb, __FUNCTION__, - "zero-length directory entry: " - "kaddr=%p, de=%p\n", kaddr, de); - goto not_empty; - } - if (de->d_ino) { - u16 namelen=ufs_get_de_namlen(sb, de); - /* check for . and .. */ - if (de->d_name[0] != '.') - goto not_empty; - if (namelen > 2) - goto not_empty; - if (namelen < 2) { - if (inode->i_ino != - fs32_to_cpu(sb, de->d_ino)) - goto not_empty; - } else if (de->d_name[1] != '.') - goto not_empty; + struct super_block * sb; + unsigned long offset; + struct buffer_head * bh; + struct ufs_dir_entry * de, * de1; + int err; + + sb = inode->i_sb; + + if (inode->i_size < UFS_DIR_REC_LEN(1) + UFS_DIR_REC_LEN(2) || + !(bh = ufs_bread (inode, 0, 0, &err))) { + ufs_warning (inode->i_sb, "empty_dir", + "bad directory (dir #%lu) - no data block", + inode->i_ino); + return 1; + } + de = (struct ufs_dir_entry *) bh->b_data; + de1 = (struct ufs_dir_entry *) + ((char *)de + fs16_to_cpu(sb, de->d_reclen)); + if (fs32_to_cpu(sb, de->d_ino) != inode->i_ino || de1->d_ino == 0 || + strcmp (".", de->d_name) || strcmp ("..", de1->d_name)) { + ufs_warning (inode->i_sb, "empty_dir", + "bad directory (dir #%lu) - no `.' or `..'", + inode->i_ino); + return 1; + } + offset = fs16_to_cpu(sb, de->d_reclen) + fs16_to_cpu(sb, de1->d_reclen); + de = (struct ufs_dir_entry *) + ((char *)de1 + fs16_to_cpu(sb, de1->d_reclen)); + while (offset < inode->i_size ) { + if (!bh || (void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { + brelse (bh); + bh = ufs_bread (inode, offset >> sb->s_blocksize_bits, 1, &err); + if (!bh) { + ufs_error (sb, "empty_dir", + "directory #%lu contains a hole at offset %lu", + inode->i_ino, offset); + offset += sb->s_blocksize; + continue; } - de = ufs_next_entry(sb, de); + de = (struct ufs_dir_entry *) bh->b_data; + } + if (!ufs_check_dir_entry ("empty_dir", inode, de, bh, offset)) { + brelse (bh); + return 1; } - ufs_put_page(page); + if (de->d_ino) { + brelse (bh); + return 0; + } + offset += fs16_to_cpu(sb, de->d_reclen); + de = (struct ufs_dir_entry *) + ((char *)de + fs16_to_cpu(sb, de->d_reclen)); } + brelse (bh); return 1; - -not_empty: - ufs_put_page(page); - return 0; } const struct file_operations ufs_dir_operations = { diff --git a/fs/ufs/file.c b/fs/ufs/file.c index a9c6e5f04..312fd3f86 100644 --- a/fs/ufs/file.c +++ b/fs/ufs/file.c @@ -25,26 +25,6 @@ #include #include -#include /* for sync_mapping_buffers() */ - -static int ufs_sync_file(struct file *file, struct dentry *dentry, int datasync) -{ - struct inode *inode = dentry->d_inode; - int err; - int ret; - - ret = sync_mapping_buffers(inode->i_mapping); - if (!(inode->i_state & I_DIRTY)) - return ret; - if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) - return ret; - - err = ufs_sync_inode(inode); - if (ret == 0) - ret = err; - return ret; -} - /* * We have mostly NULL's here: the current defaults are ok for @@ -57,6 +37,9 @@ const struct file_operations ufs_file_operations = { .write = generic_file_write, .mmap = generic_file_mmap, .open = generic_file_open, - .fsync = ufs_sync_file, .sendfile = generic_file_sendfile, }; + +struct inode_operations ufs_file_inode_operations = { + .truncate = ufs_truncate, +}; diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c index 2ad1259c6..c7a47ed4f 100644 --- a/fs/ufs/ialloc.c +++ b/fs/ufs/ialloc.c @@ -34,6 +34,14 @@ #include "swab.h" #include "util.h" +#undef UFS_IALLOC_DEBUG + +#ifdef UFS_IALLOC_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + /* * NOTE! When we get the inode, we're the only people * that have access to it, and as such there are no @@ -60,7 +68,7 @@ void ufs_free_inode (struct inode * inode) int is_directory; unsigned ino, cg, bit; - UFSD("ENTER, ino %lu\n", inode->i_ino); + UFSD(("ENTER, ino %lu\n", inode->i_ino)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -83,7 +91,7 @@ void ufs_free_inode (struct inode * inode) unlock_super (sb); return; } - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); + ucg = ubh_get_ucg(UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) ufs_panic (sb, "ufs_free_fragments", "internal error, bad cg magic number"); @@ -96,33 +104,33 @@ void ufs_free_inode (struct inode * inode) clear_inode (inode); - if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit)) + if (ubh_isclr (UCPI_UBH, ucpi->c_iusedoff, bit)) ufs_error(sb, "ufs_free_inode", "bit already cleared for inode %u", ino); else { - ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit); + ubh_clrbit (UCPI_UBH, ucpi->c_iusedoff, bit); if (ino < ucpi->c_irotor) ucpi->c_irotor = ino; fs32_add(sb, &ucg->cg_cs.cs_nifree, 1); - uspi->cs_total.cs_nifree++; + fs32_add(sb, &usb1->fs_cstotal.cs_nifree, 1); fs32_add(sb, &UFS_SB(sb)->fs_cs(cg).cs_nifree, 1); if (is_directory) { fs32_sub(sb, &ucg->cg_cs.cs_ndir, 1); - uspi->cs_total.cs_ndir--; + fs32_sub(sb, &usb1->fs_cstotal.cs_ndir, 1); fs32_sub(sb, &UFS_SB(sb)->fs_cs(cg).cs_ndir, 1); } } - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi); + ubh_wait_on_buffer (UCPI_UBH); } sb->s_dirt = 1; unlock_super (sb); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) } /* @@ -147,7 +155,7 @@ struct inode * ufs_new_inode(struct inode * dir, int mode) unsigned cg, bit, i, j, start; struct ufs_inode_info *ufsi; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) /* Cannot create files in a deleted directory */ if (!dir || !dir->i_nlink) @@ -205,43 +213,43 @@ cg_found: ucpi = ufs_load_cylinder (sb, cg); if (!ucpi) goto failed; - ucg = ubh_get_ucg(UCPI_UBH(ucpi)); + ucg = ubh_get_ucg(UCPI_UBH); if (!ufs_cg_chkmagic(sb, ucg)) ufs_panic (sb, "ufs_new_inode", "internal error, bad cg magic number"); start = ucpi->c_irotor; - bit = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_iusedoff, uspi->s_ipg, start); + bit = ubh_find_next_zero_bit (UCPI_UBH, ucpi->c_iusedoff, uspi->s_ipg, start); if (!(bit < uspi->s_ipg)) { - bit = ubh_find_first_zero_bit (UCPI_UBH(ucpi), ucpi->c_iusedoff, start); + bit = ubh_find_first_zero_bit (UCPI_UBH, ucpi->c_iusedoff, start); if (!(bit < start)) { ufs_error (sb, "ufs_new_inode", "cylinder group %u corrupted - error in inode bitmap\n", cg); goto failed; } } - UFSD("start = %u, bit = %u, ipg = %u\n", start, bit, uspi->s_ipg); - if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit)) - ubh_setbit (UCPI_UBH(ucpi), ucpi->c_iusedoff, bit); + UFSD(("start = %u, bit = %u, ipg = %u\n", start, bit, uspi->s_ipg)) + if (ubh_isclr (UCPI_UBH, ucpi->c_iusedoff, bit)) + ubh_setbit (UCPI_UBH, ucpi->c_iusedoff, bit); else { ufs_panic (sb, "ufs_new_inode", "internal error"); goto failed; } fs32_sub(sb, &ucg->cg_cs.cs_nifree, 1); - uspi->cs_total.cs_nifree--; + fs32_sub(sb, &usb1->fs_cstotal.cs_nifree, 1); fs32_sub(sb, &sbi->fs_cs(cg).cs_nifree, 1); if (S_ISDIR(mode)) { fs32_add(sb, &ucg->cg_cs.cs_ndir, 1); - uspi->cs_total.cs_ndir++; + fs32_add(sb, &usb1->fs_cstotal.cs_ndir, 1); fs32_add(sb, &sbi->fs_cs(cg).cs_ndir, 1); } - ubh_mark_buffer_dirty (USPI_UBH(uspi)); - ubh_mark_buffer_dirty (UCPI_UBH(ucpi)); + ubh_mark_buffer_dirty (USPI_UBH); + ubh_mark_buffer_dirty (UCPI_UBH); if (sb->s_flags & MS_SYNCHRONOUS) { - ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi)); - ubh_wait_on_buffer (UCPI_UBH(ucpi)); + ubh_ll_rw_block (SWRITE, 1, (struct ufs_buffer_head **) &ucpi); + ubh_wait_on_buffer (UCPI_UBH); } sb->s_dirt = 1; @@ -255,6 +263,7 @@ cg_found: inode->i_gid = current->fsgid; inode->i_ino = cg * uspi->s_ipg + bit; + inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size (for stat), not the fs block size */ inode->i_blocks = 0; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC; ufsi->i_flags = UFS_I(dir)->i_flags; @@ -263,7 +272,6 @@ cg_found: ufsi->i_shadow = 0; ufsi->i_osync = 0; ufsi->i_oeftflag = 0; - ufsi->i_dir_start_lookup = 0; memset(&ufsi->i_u1, 0, sizeof(ufsi->i_u1)); insert_inode_hash(inode); @@ -279,14 +287,14 @@ cg_found: return ERR_PTR(-EDQUOT); } - UFSD("allocating inode %lu\n", inode->i_ino); - UFSD("EXIT\n"); + UFSD(("allocating inode %lu\n", inode->i_ino)) + UFSD(("EXIT\n")) return inode; failed: unlock_super (sb); make_bad_inode(inode); iput (inode); - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return ERR_PTR(-ENOSPC); } diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index ee1eaa6f4..3c3f62ce2 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -41,7 +41,14 @@ #include "swab.h" #include "util.h" -static u64 ufs_frag_map(struct inode *inode, sector_t frag); +#undef UFS_INODE_DEBUG +#undef UFS_INODE_DEBUG_MORE + +#ifdef UFS_INODE_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t offsets[4]) { @@ -54,7 +61,7 @@ static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t off int n = 0; - UFSD("ptrs=uspi->s_apb = %d,double_blocks=%ld \n",ptrs,double_blocks); + UFSD(("ptrs=uspi->s_apb = %d,double_blocks=%ld \n",ptrs,double_blocks)); if (i_block < 0) { ufs_warning(inode->i_sb, "ufs_block_to_path", "block < 0"); } else if (i_block < direct_blocks) { @@ -82,7 +89,7 @@ static int ufs_block_to_path(struct inode *inode, sector_t i_block, sector_t off * the begining of the filesystem. */ -static u64 ufs_frag_map(struct inode *inode, sector_t frag) +u64 ufs_frag_map(struct inode *inode, sector_t frag) { struct ufs_inode_info *ufsi = UFS_I(inode); struct super_block *sb = inode->i_sb; @@ -97,10 +104,8 @@ static u64 ufs_frag_map(struct inode *inode, sector_t frag) unsigned flags = UFS_SB(sb)->s_flags; u64 temp = 0L; - UFSD(": frag = %llu depth = %d\n", (unsigned long long)frag, depth); - UFSD(": uspi->s_fpbshift = %d ,uspi->s_apbmask = %x, mask=%llx\n", - uspi->s_fpbshift, uspi->s_apbmask, - (unsigned long long)mask); + UFSD((": frag = %llu depth = %d\n", (unsigned long long)frag, depth)); + UFSD((": uspi->s_fpbshift = %d ,uspi->s_apbmask = %x, mask=%llx\n",uspi->s_fpbshift,uspi->s_apbmask,mask)); if (depth == 0) return 0; @@ -156,66 +161,26 @@ out: return ret; } -static void ufs_clear_frag(struct inode *inode, struct buffer_head *bh) -{ - lock_buffer(bh); - memset(bh->b_data, 0, inode->i_sb->s_blocksize); - set_buffer_uptodate(bh); - mark_buffer_dirty(bh); - unlock_buffer(bh); - if (IS_SYNC(inode)) - sync_dirty_buffer(bh); -} - -static struct buffer_head * -ufs_clear_frags(struct inode *inode, sector_t beg, - unsigned int n, sector_t want) -{ - struct buffer_head *res = NULL, *bh; - sector_t end = beg + n; - - for (; beg < end; ++beg) { - bh = sb_getblk(inode->i_sb, beg); - ufs_clear_frag(inode, bh); - if (want != beg) - brelse(bh); - else - res = bh; - } - BUG_ON(!res); - return res; -} - -/** - * ufs_inode_getfrag() - allocate new fragment(s) - * @inode - pointer to inode - * @fragment - number of `fragment' which hold pointer - * to new allocated fragment(s) - * @new_fragment - number of new allocated fragment(s) - * @required - how many fragment(s) we require - * @err - we set it if something wrong - * @phys - pointer to where we save physical number of new allocated fragments, - * NULL if we allocate not data(indirect blocks for example). - * @new - we set it if we allocate new block - * @locked_page - for ufs_new_fragments() - */ -static struct buffer_head * -ufs_inode_getfrag(struct inode *inode, unsigned int fragment, - sector_t new_fragment, unsigned int required, int *err, - long *phys, int *new, struct page *locked_page) +static struct buffer_head * ufs_inode_getfrag (struct inode *inode, + unsigned int fragment, unsigned int new_fragment, + unsigned int required, int *err, int metadata, long *phys, int *new) { struct ufs_inode_info *ufsi = UFS_I(inode); - struct super_block *sb = inode->i_sb; - struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; + struct super_block * sb; + struct ufs_sb_private_info * uspi; struct buffer_head * result; unsigned block, blockoff, lastfrag, lastblock, lastblockoff; unsigned tmp, goal; __fs32 * p, * p2; + unsigned flags = 0; - UFSD("ENTER, ino %lu, fragment %u, new_fragment %llu, required %u, " - "metadata %d\n", inode->i_ino, fragment, - (unsigned long long)new_fragment, required, !phys); + UFSD(("ENTER, ino %lu, fragment %u, new_fragment %u, required %u\n", + inode->i_ino, fragment, new_fragment, required)) + sb = inode->i_sb; + uspi = UFS_SB(sb)->s_uspi; + + flags = UFS_SB(sb)->s_flags; /* TODO : to be done for write support if ( (flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) goto ufs2; @@ -230,16 +195,16 @@ repeat: tmp = fs32_to_cpu(sb, *p); lastfrag = ufsi->i_lastfrag; if (tmp && fragment < lastfrag) { - if (!phys) { + if (metadata) { result = sb_getblk(sb, uspi->s_sbbase + tmp + blockoff); if (tmp == fs32_to_cpu(sb, *p)) { - UFSD("EXIT, result %u\n", tmp + blockoff); + UFSD(("EXIT, result %u\n", tmp + blockoff)) return result; } brelse (result); goto repeat; } else { - *phys = tmp + blockoff; + *phys = tmp; return NULL; } } @@ -256,8 +221,7 @@ repeat: if (lastblockoff) { p2 = ufsi->i_u1.i_data + lastblock; tmp = ufs_new_fragments (inode, p2, lastfrag, - fs32_to_cpu(sb, *p2), uspi->s_fpb - lastblockoff, - err, locked_page); + fs32_to_cpu(sb, *p2), uspi->s_fpb - lastblockoff, err); if (!tmp) { if (lastfrag != ufsi->i_lastfrag) goto repeat; @@ -267,31 +231,25 @@ repeat: lastfrag = ufsi->i_lastfrag; } - tmp = fs32_to_cpu(sb, ufsi->i_u1.i_data[lastblock]); - if (tmp) - goal = tmp + uspi->s_fpb; + goal = fs32_to_cpu(sb, ufsi->i_u1.i_data[lastblock]) + uspi->s_fpb; tmp = ufs_new_fragments (inode, p, fragment - blockoff, - goal, required + blockoff, - err, locked_page); + goal, required + blockoff, err); } /* * We will extend last allocated block */ else if (lastblock == block) { - tmp = ufs_new_fragments(inode, p, fragment - (blockoff - lastblockoff), - fs32_to_cpu(sb, *p), required + (blockoff - lastblockoff), - err, locked_page); - } else /* (lastblock > block) */ { + tmp = ufs_new_fragments (inode, p, fragment - (blockoff - lastblockoff), + fs32_to_cpu(sb, *p), required + (blockoff - lastblockoff), err); + } /* * We will allocate new block before last allocated block */ - if (block) { - tmp = fs32_to_cpu(sb, ufsi->i_u1.i_data[block-1]); - if (tmp) - goal = tmp + uspi->s_fpb; - } - tmp = ufs_new_fragments(inode, p, fragment - blockoff, - goal, uspi->s_fpb, err, locked_page); + else /* (lastblock > block) */ { + if (lastblock && (tmp = fs32_to_cpu(sb, ufsi->i_u1.i_data[lastblock-1]))) + goal = tmp + uspi->s_fpb; + tmp = ufs_new_fragments (inode, p, fragment - blockoff, + goal, uspi->s_fpb, err); } if (!tmp) { if ((!blockoff && *p) || @@ -301,10 +259,14 @@ repeat: return NULL; } - if (!phys) { - result = ufs_clear_frags(inode, tmp, required, tmp + blockoff); + /* The nullification of framgents done in ufs/balloc.c is + * something I don't have the stomache to move into here right + * now. -DaveM + */ + if (metadata) { + result = sb_getblk(inode->i_sb, tmp + blockoff); } else { - *phys = tmp + blockoff; + *phys = tmp; result = NULL; *err = 0; *new = 1; @@ -314,7 +276,7 @@ repeat: if (IS_SYNC(inode)) ufs_sync_inode (inode); mark_inode_dirty(inode); - UFSD("EXIT, result %u\n", tmp + blockoff); + UFSD(("EXIT, result %u\n", tmp + blockoff)) return result; /* This part : To be implemented .... @@ -333,35 +295,22 @@ repeat2: */ } -/** - * ufs_inode_getblock() - allocate new block - * @inode - pointer to inode - * @bh - pointer to block which hold "pointer" to new allocated block - * @fragment - number of `fragment' which hold pointer - * to new allocated block - * @new_fragment - number of new allocated fragment - * (block will hold this fragment and also uspi->s_fpb-1) - * @err - see ufs_inode_getfrag() - * @phys - see ufs_inode_getfrag() - * @new - see ufs_inode_getfrag() - * @locked_page - see ufs_inode_getfrag() - */ -static struct buffer_head * -ufs_inode_getblock(struct inode *inode, struct buffer_head *bh, - unsigned int fragment, sector_t new_fragment, int *err, - long *phys, int *new, struct page *locked_page) +static struct buffer_head * ufs_block_getfrag (struct inode *inode, + struct buffer_head *bh, unsigned int fragment, unsigned int new_fragment, + unsigned int blocksize, int * err, int metadata, long *phys, int *new) { - struct super_block *sb = inode->i_sb; - struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; + struct super_block * sb; + struct ufs_sb_private_info * uspi; struct buffer_head * result; unsigned tmp, goal, block, blockoff; __fs32 * p; + sb = inode->i_sb; + uspi = UFS_SB(sb)->s_uspi; block = ufs_fragstoblks (fragment); blockoff = ufs_fragnum (fragment); - UFSD("ENTER, ino %lu, fragment %u, new_fragment %llu, metadata %d\n", - inode->i_ino, fragment, (unsigned long long)new_fragment, !phys); + UFSD(("ENTER, ino %lu, fragment %u, new_fragment %u\n", inode->i_ino, fragment, new_fragment)) result = NULL; if (!bh) @@ -377,36 +326,37 @@ ufs_inode_getblock(struct inode *inode, struct buffer_head *bh, repeat: tmp = fs32_to_cpu(sb, *p); if (tmp) { - if (!phys) { + if (metadata) { result = sb_getblk(sb, uspi->s_sbbase + tmp + blockoff); if (tmp == fs32_to_cpu(sb, *p)) goto out; brelse (result); goto repeat; } else { - *phys = tmp + blockoff; + *phys = tmp; goto out; } } - if (block && (tmp = fs32_to_cpu(sb, ((__fs32*)bh->b_data)[block-1]))) + if (block && (tmp = fs32_to_cpu(sb, ((__fs32*)bh->b_data)[block-1]) + uspi->s_fpb)) goal = tmp + uspi->s_fpb; else goal = bh->b_blocknr + uspi->s_fpb; - tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal, - uspi->s_fpb, err, locked_page); + tmp = ufs_new_fragments (inode, p, ufs_blknum(new_fragment), goal, uspi->s_fpb, err); if (!tmp) { if (fs32_to_cpu(sb, *p)) goto repeat; goto out; } - - if (!phys) { - result = ufs_clear_frags(inode, tmp, uspi->s_fpb, - tmp + blockoff); + /* The nullification of framgents done in ufs/balloc.c is + * something I don't have the stomache to move into here right + * now. -DaveM + */ + if (metadata) { + result = sb_getblk(sb, tmp + blockoff); } else { - *phys = tmp + blockoff; + *phys = tmp; *new = 1; } @@ -415,19 +365,18 @@ repeat: sync_dirty_buffer(bh); inode->i_ctime = CURRENT_TIME_SEC; mark_inode_dirty(inode); - UFSD("result %u\n", tmp + blockoff); + UFSD(("result %u\n", tmp + blockoff)); out: brelse (bh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")); return result; } -/** - * ufs_getfrag_bloc() - `get_block_t' function, interface between UFS and - * readpage, writepage and so on +/* + * This function gets the block which contains the fragment. */ -int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create) +int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create) { struct super_block * sb = inode->i_sb; struct ufs_sb_private_info * uspi = UFS_SB(sb)->s_uspi; @@ -438,7 +387,7 @@ int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head if (!create) { phys64 = ufs_frag_map(inode, fragment); - UFSD("phys64 = %llu\n", (unsigned long long)phys64); + UFSD(("phys64 = %llu \n",phys64)); if (phys64) map_bh(bh_result, sb, phys64); return 0; @@ -453,7 +402,7 @@ int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head lock_kernel(); - UFSD("ENTER, ino %lu, fragment %llu\n", inode->i_ino, (unsigned long long)fragment); + UFSD(("ENTER, ino %lu, fragment %llu\n", inode->i_ino, (unsigned long long)fragment)) if (fragment < 0) goto abort_negative; if (fragment > @@ -469,15 +418,15 @@ int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head * it much more readable: */ #define GET_INODE_DATABLOCK(x) \ - ufs_inode_getfrag(inode, x, fragment, 1, &err, &phys, &new, bh_result->b_page) + ufs_inode_getfrag(inode, x, fragment, 1, &err, 0, &phys, &new) #define GET_INODE_PTR(x) \ - ufs_inode_getfrag(inode, x, fragment, uspi->s_fpb, &err, NULL, NULL, bh_result->b_page) + ufs_inode_getfrag(inode, x, fragment, uspi->s_fpb, &err, 1, NULL, NULL) #define GET_INDIRECT_DATABLOCK(x) \ - ufs_inode_getblock(inode, bh, x, fragment, \ - &err, &phys, &new, bh_result->b_page); + ufs_block_getfrag(inode, bh, x, fragment, sb->s_blocksize, \ + &err, 0, &phys, &new); #define GET_INDIRECT_PTR(x) \ - ufs_inode_getblock(inode, bh, x, fragment, \ - &err, NULL, NULL, bh_result->b_page); + ufs_block_getfrag(inode, bh, x, fragment, sb->s_blocksize, \ + &err, 1, NULL, NULL); if (ptr < UFS_NDIR_FRAGMENT) { bh = GET_INODE_DATABLOCK(ptr); @@ -525,9 +474,8 @@ abort_too_big: goto abort; } -static struct buffer_head *ufs_getfrag(struct inode *inode, - unsigned int fragment, - int create, int *err) +struct buffer_head *ufs_getfrag(struct inode *inode, unsigned int fragment, + int create, int *err) { struct buffer_head dummy; int error; @@ -554,7 +502,7 @@ struct buffer_head * ufs_bread (struct inode * inode, unsigned fragment, { struct buffer_head * bh; - UFSD("ENTER, ino %lu, fragment %u\n", inode->i_ino, fragment); + UFSD(("ENTER, ino %lu, fragment %u\n", inode->i_ino, fragment)) bh = ufs_getfrag (inode, fragment, create, err); if (!bh || buffer_uptodate(bh)) return bh; @@ -583,7 +531,7 @@ static sector_t ufs_bmap(struct address_space *mapping, sector_t block) { return generic_block_bmap(mapping,block,ufs_getfrag_block); } -const struct address_space_operations ufs_aops = { +struct address_space_operations ufs_aops = { .readpage = ufs_readpage, .writepage = ufs_writepage, .sync_page = block_sync_page, @@ -592,34 +540,39 @@ const struct address_space_operations ufs_aops = { .bmap = ufs_bmap }; -static void ufs_set_inode_ops(struct inode *inode) -{ - if (S_ISREG(inode->i_mode)) { - inode->i_op = &ufs_file_inode_operations; - inode->i_fop = &ufs_file_operations; - inode->i_mapping->a_ops = &ufs_aops; - } else if (S_ISDIR(inode->i_mode)) { - inode->i_op = &ufs_dir_inode_operations; - inode->i_fop = &ufs_dir_operations; - inode->i_mapping->a_ops = &ufs_aops; - } else if (S_ISLNK(inode->i_mode)) { - if (!inode->i_blocks) - inode->i_op = &ufs_fast_symlink_inode_operations; - else { - inode->i_op = &page_symlink_inode_operations; - inode->i_mapping->a_ops = &ufs_aops; - } - } else - init_special_inode(inode, inode->i_mode, - ufs_get_inode_dev(inode->i_sb, UFS_I(inode))); -} - -static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) +void ufs_read_inode (struct inode * inode) { struct ufs_inode_info *ufsi = UFS_I(inode); - struct super_block *sb = inode->i_sb; + struct super_block * sb; + struct ufs_sb_private_info * uspi; + struct ufs_inode * ufs_inode; + struct ufs2_inode *ufs2_inode; + struct buffer_head * bh; mode_t mode; unsigned i; + unsigned flags; + + UFSD(("ENTER, ino %lu\n", inode->i_ino)) + + sb = inode->i_sb; + uspi = UFS_SB(sb)->s_uspi; + flags = UFS_SB(sb)->s_flags; + + if (inode->i_ino < UFS_ROOTINO || + inode->i_ino > (uspi->s_ncg * uspi->s_ipg)) { + ufs_warning (sb, "ufs_read_inode", "bad inode number (%lu)\n", inode->i_ino); + goto bad_inode; + } + + bh = sb_bread(sb, uspi->s_sbbase + ufs_inotofsba(inode->i_ino)); + if (!bh) { + ufs_warning (sb, "ufs_read_inode", "unable to read inode %lu\n", inode->i_ino); + goto bad_inode; + } + if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) + goto ufs2_inode; + + ufs_inode = (struct ufs_inode *) (bh->b_data + sizeof(struct ufs_inode) * ufs_inotofsbo(inode->i_ino)); /* * Copy data to the in-core inode. @@ -643,29 +596,56 @@ static void ufs1_read_inode(struct inode *inode, struct ufs_inode *ufs_inode) inode->i_atime.tv_nsec = 0; inode->i_ctime.tv_nsec = 0; inode->i_blocks = fs32_to_cpu(sb, ufs_inode->ui_blocks); + inode->i_blksize = PAGE_SIZE; /* This is the optimal IO size (for stat) */ + inode->i_version++; ufsi->i_flags = fs32_to_cpu(sb, ufs_inode->ui_flags); ufsi->i_gen = fs32_to_cpu(sb, ufs_inode->ui_gen); ufsi->i_shadow = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_shadow); ufsi->i_oeftflag = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_oeftflag); - + ufsi->i_lastfrag = (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift; if (S_ISCHR(mode) || S_ISBLK(mode) || inode->i_blocks) { for (i = 0; i < (UFS_NDADDR + UFS_NINDIR); i++) ufsi->i_u1.i_data[i] = ufs_inode->ui_u2.ui_addr.ui_db[i]; - } else { + } + else { for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) ufsi->i_u1.i_symlink[i] = ufs_inode->ui_u2.ui_symlink[i]; } -} + ufsi->i_osync = 0; -static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) -{ - struct ufs_inode_info *ufsi = UFS_I(inode); - struct super_block *sb = inode->i_sb; - mode_t mode; - unsigned i; + if (S_ISREG(inode->i_mode)) { + inode->i_op = &ufs_file_inode_operations; + inode->i_fop = &ufs_file_operations; + inode->i_mapping->a_ops = &ufs_aops; + } else if (S_ISDIR(inode->i_mode)) { + inode->i_op = &ufs_dir_inode_operations; + inode->i_fop = &ufs_dir_operations; + } else if (S_ISLNK(inode->i_mode)) { + if (!inode->i_blocks) + inode->i_op = &ufs_fast_symlink_inode_operations; + else { + inode->i_op = &page_symlink_inode_operations; + inode->i_mapping->a_ops = &ufs_aops; + } + } else + init_special_inode(inode, inode->i_mode, + ufs_get_inode_dev(sb, ufsi)); + + brelse (bh); + + UFSD(("EXIT\n")) + return; + +bad_inode: + make_bad_inode(inode); + return; + +ufs2_inode : + UFSD(("Reading ufs2 inode, ino %lu\n", inode->i_ino)) + + ufs2_inode = (struct ufs2_inode *)(bh->b_data + sizeof(struct ufs2_inode) * ufs_inotofsbo(inode->i_ino)); - UFSD("Reading ufs2 inode, ino %lu\n", inode->i_ino); /* * Copy data to the in-core inode. */ @@ -688,74 +668,50 @@ static void ufs2_read_inode(struct inode *inode, struct ufs2_inode *ufs2_inode) inode->i_atime.tv_nsec = 0; inode->i_ctime.tv_nsec = 0; inode->i_blocks = fs64_to_cpu(sb, ufs2_inode->ui_blocks); + inode->i_blksize = PAGE_SIZE; /*This is the optimal IO size(for stat)*/ + + inode->i_version++; ufsi->i_flags = fs32_to_cpu(sb, ufs2_inode->ui_flags); ufsi->i_gen = fs32_to_cpu(sb, ufs2_inode->ui_gen); /* ufsi->i_shadow = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_shadow); ufsi->i_oeftflag = fs32_to_cpu(sb, ufs_inode->ui_u3.ui_sun.ui_oeftflag); */ + ufsi->i_lastfrag= (inode->i_size + uspi->s_fsize- 1) >> uspi->s_fshift; if (S_ISCHR(mode) || S_ISBLK(mode) || inode->i_blocks) { for (i = 0; i < (UFS_NDADDR + UFS_NINDIR); i++) ufsi->i_u1.u2_i_data[i] = ufs2_inode->ui_u2.ui_addr.ui_db[i]; - } else { + } + else { for (i = 0; i < (UFS_NDADDR + UFS_NINDIR) * 4; i++) ufsi->i_u1.i_symlink[i] = ufs2_inode->ui_u2.ui_symlink[i]; } -} - -void ufs_read_inode(struct inode * inode) -{ - struct ufs_inode_info *ufsi = UFS_I(inode); - struct super_block * sb; - struct ufs_sb_private_info * uspi; - struct buffer_head * bh; - - UFSD("ENTER, ino %lu\n", inode->i_ino); - - sb = inode->i_sb; - uspi = UFS_SB(sb)->s_uspi; - - if (inode->i_ino < UFS_ROOTINO || - inode->i_ino > (uspi->s_ncg * uspi->s_ipg)) { - ufs_warning(sb, "ufs_read_inode", "bad inode number (%lu)\n", - inode->i_ino); - goto bad_inode; - } - - bh = sb_bread(sb, uspi->s_sbbase + ufs_inotofsba(inode->i_ino)); - if (!bh) { - ufs_warning(sb, "ufs_read_inode", "unable to read inode %lu\n", - inode->i_ino); - goto bad_inode; - } - if ((UFS_SB(sb)->s_flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { - struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data; - - ufs2_read_inode(inode, - ufs2_inode + ufs_inotofsbo(inode->i_ino)); - } else { - struct ufs_inode *ufs_inode = (struct ufs_inode *)bh->b_data; - - ufs1_read_inode(inode, ufs_inode + ufs_inotofsbo(inode->i_ino)); - } - - inode->i_version++; - ufsi->i_lastfrag = - (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift; - ufsi->i_dir_start_lookup = 0; ufsi->i_osync = 0; - ufs_set_inode_ops(inode); + if (S_ISREG(inode->i_mode)) { + inode->i_op = &ufs_file_inode_operations; + inode->i_fop = &ufs_file_operations; + inode->i_mapping->a_ops = &ufs_aops; + } else if (S_ISDIR(inode->i_mode)) { + inode->i_op = &ufs_dir_inode_operations; + inode->i_fop = &ufs_dir_operations; + } else if (S_ISLNK(inode->i_mode)) { + if (!inode->i_blocks) + inode->i_op = &ufs_fast_symlink_inode_operations; + else { + inode->i_op = &page_symlink_inode_operations; + inode->i_mapping->a_ops = &ufs_aops; + } + } else /* TODO : here ...*/ + init_special_inode(inode, inode->i_mode, + ufs_get_inode_dev(sb, ufsi)); brelse(bh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return; - -bad_inode: - make_bad_inode(inode); } static int ufs_update_inode(struct inode * inode, int do_sync) @@ -768,7 +724,7 @@ static int ufs_update_inode(struct inode * inode, int do_sync) unsigned i; unsigned flags; - UFSD("ENTER, ino %lu\n", inode->i_ino); + UFSD(("ENTER, ino %lu\n", inode->i_ino)) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -829,7 +785,7 @@ static int ufs_update_inode(struct inode * inode, int do_sync) sync_dirty_buffer(bh); brelse (bh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return 0; } @@ -849,17 +805,14 @@ int ufs_sync_inode (struct inode *inode) void ufs_delete_inode (struct inode * inode) { - loff_t old_i_size; - truncate_inode_pages(&inode->i_data, 0); /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ lock_kernel(); mark_inode_dirty(inode); ufs_update_inode(inode, IS_SYNC(inode)); - old_i_size = inode->i_size; inode->i_size = 0; - if (inode->i_blocks && ufs_truncate(inode, old_i_size)) - ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n"); + if (inode->i_blocks) + ufs_truncate (inode); ufs_free_inode (inode); unlock_kernel(); } diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index d344b411e..8d5f98a01 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -1,9 +1,6 @@ /* * linux/fs/ufs/namei.c * - * Migration to usage of "page cache" on May 2006 by - * Evgeniy Dushistov based on ext2 code base. - * * Copyright (C) 1998 * Daniel Pirkl * Charles University, Faculty of Mathematics and Physics @@ -31,9 +28,21 @@ #include #include #include +#include #include "swab.h" /* will go away - see comment in mknod() */ #include "util.h" +/* +#undef UFS_NAMEI_DEBUG +*/ +#define UFS_NAMEI_DEBUG + +#ifdef UFS_NAMEI_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) { int err = ufs_add_link(dentry, inode); @@ -79,13 +88,8 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) { - struct inode *inode; - int err; - - UFSD("BEGIN\n"); - inode = ufs_new_inode(dir, mode); - err = PTR_ERR(inode); - + struct inode * inode = ufs_new_inode(dir, mode); + int err = PTR_ERR(inode); if (!IS_ERR(inode)) { inode->i_op = &ufs_file_inode_operations; inode->i_fop = &ufs_file_operations; @@ -95,7 +99,6 @@ static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, err = ufs_add_nondir(dentry, inode); unlock_kernel(); } - UFSD("END: err=%d\n", err); return err; } @@ -129,7 +132,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, struct inode * inode; if (l > sb->s_blocksize) - goto out_notlocked; + goto out; lock_kernel(); inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); @@ -155,7 +158,6 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, err = ufs_add_nondir(dentry, inode); out: unlock_kernel(); -out_notlocked: return err; out_fail: @@ -203,7 +205,6 @@ static int ufs_mkdir(struct inode * dir, struct dentry * dentry, int mode) inode->i_op = &ufs_dir_inode_operations; inode->i_fop = &ufs_dir_operations; - inode->i_mapping->a_ops = &ufs_aops; inode_inc_link_count(inode); @@ -230,18 +231,19 @@ out_dir: goto out; } -static int ufs_unlink(struct inode *dir, struct dentry *dentry) +static int ufs_unlink(struct inode * dir, struct dentry *dentry) { struct inode * inode = dentry->d_inode; - struct ufs_dir_entry *de; - struct page *page; + struct buffer_head * bh; + struct ufs_dir_entry * de; int err = -ENOENT; - de = ufs_find_entry(dir, dentry, &page); + lock_kernel(); + de = ufs_find_entry (dentry, &bh); if (!de) goto out; - err = ufs_delete_entry(dir, de, page); + err = ufs_delete_entry (dir, de, bh); if (err) goto out; @@ -249,6 +251,7 @@ static int ufs_unlink(struct inode *dir, struct dentry *dentry) inode_dec_link_count(inode); err = 0; out: + unlock_kernel(); return err; } @@ -270,42 +273,42 @@ static int ufs_rmdir (struct inode * dir, struct dentry *dentry) return err; } -static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, struct dentry *new_dentry) +static int ufs_rename (struct inode * old_dir, struct dentry * old_dentry, + struct inode * new_dir, struct dentry * new_dentry ) { struct inode *old_inode = old_dentry->d_inode; struct inode *new_inode = new_dentry->d_inode; - struct page *dir_page = NULL; - struct ufs_dir_entry * dir_de = NULL; - struct page *old_page; + struct buffer_head *dir_bh = NULL; + struct ufs_dir_entry *dir_de = NULL; + struct buffer_head *old_bh; struct ufs_dir_entry *old_de; int err = -ENOENT; - old_de = ufs_find_entry(old_dir, old_dentry, &old_page); + lock_kernel(); + old_de = ufs_find_entry (old_dentry, &old_bh); if (!old_de) goto out; if (S_ISDIR(old_inode->i_mode)) { err = -EIO; - dir_de = ufs_dotdot(old_inode, &dir_page); + dir_de = ufs_dotdot(old_inode, &dir_bh); if (!dir_de) goto out_old; } if (new_inode) { - struct page *new_page; + struct buffer_head *new_bh; struct ufs_dir_entry *new_de; err = -ENOTEMPTY; - if (dir_de && !ufs_empty_dir(new_inode)) + if (dir_de && !ufs_empty_dir (new_inode)) goto out_dir; - err = -ENOENT; - new_de = ufs_find_entry(new_dir, new_dentry, &new_page); + new_de = ufs_find_entry (new_dentry, &new_bh); if (!new_de) goto out_dir; inode_inc_link_count(old_inode); - ufs_set_link(new_dir, new_de, new_page, old_inode); + ufs_set_link(new_dir, new_de, new_bh, old_inode); new_inode->i_ctime = CURRENT_TIME_SEC; if (dir_de) new_inode->i_nlink--; @@ -326,32 +329,24 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry, inode_inc_link_count(new_dir); } - /* - * Like most other Unix systems, set the ctime for inodes on a - * rename. - * inode_dec_link_count() will mark the inode dirty. - */ - old_inode->i_ctime = CURRENT_TIME_SEC; + ufs_delete_entry (old_dir, old_de, old_bh); - ufs_delete_entry(old_dir, old_de, old_page); inode_dec_link_count(old_inode); if (dir_de) { - ufs_set_link(old_inode, dir_de, dir_page, new_dir); + ufs_set_link(old_inode, dir_de, dir_bh, new_dir); inode_dec_link_count(old_dir); } + unlock_kernel(); return 0; - out_dir: - if (dir_de) { - kunmap(dir_page); - page_cache_release(dir_page); - } + if (dir_de) + brelse(dir_bh); out_old: - kunmap(old_page); - page_cache_release(old_page); + brelse (old_bh); out: + unlock_kernel(); return err; } diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 992ee0b87..db98a4c71 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -64,6 +64,7 @@ */ +#include #include #include @@ -89,84 +90,95 @@ #include "swab.h" #include "util.h" -#ifdef CONFIG_UFS_DEBUG +#undef UFS_SUPER_DEBUG +#undef UFS_SUPER_DEBUG_MORE + + +#undef UFS_SUPER_DEBUG_MORE +#ifdef UFS_SUPER_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + +#ifdef UFS_SUPER_DEBUG_MORE /* * Print contents of ufs_super_block, useful for debugging */ -static void ufs_print_super_stuff(struct super_block *sb, unsigned flags, - struct ufs_super_block_first *usb1, - struct ufs_super_block_second *usb2, - struct ufs_super_block_third *usb3) +void ufs_print_super_stuff(struct super_block *sb, + struct ufs_super_block_first * usb1, + struct ufs_super_block_second * usb2, + struct ufs_super_block_third * usb3) { printk("ufs_print_super_stuff\n"); - printk(" magic: 0x%x\n", fs32_to_cpu(sb, usb3->fs_magic)); - if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { - printk(" fs_size: %llu\n", (unsigned long long) - fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size)); - printk(" fs_dsize: %llu\n", (unsigned long long) - fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize)); - printk(" bsize: %u\n", - fs32_to_cpu(sb, usb1->fs_bsize)); - printk(" fsize: %u\n", - fs32_to_cpu(sb, usb1->fs_fsize)); - printk(" fs_volname: %s\n", usb2->fs_un.fs_u2.fs_volname); - printk(" fs_sblockloc: %llu\n", (unsigned long long) - fs64_to_cpu(sb, usb2->fs_un.fs_u2.fs_sblockloc)); - printk(" cs_ndir(No of dirs): %llu\n", (unsigned long long) - fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir)); - printk(" cs_nbfree(No of free blocks): %llu\n", - (unsigned long long) - fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree)); - } else { - printk(" sblkno: %u\n", fs32_to_cpu(sb, usb1->fs_sblkno)); - printk(" cblkno: %u\n", fs32_to_cpu(sb, usb1->fs_cblkno)); - printk(" iblkno: %u\n", fs32_to_cpu(sb, usb1->fs_iblkno)); - printk(" dblkno: %u\n", fs32_to_cpu(sb, usb1->fs_dblkno)); - printk(" cgoffset: %u\n", - fs32_to_cpu(sb, usb1->fs_cgoffset)); - printk(" ~cgmask: 0x%x\n", - ~fs32_to_cpu(sb, usb1->fs_cgmask)); - printk(" size: %u\n", fs32_to_cpu(sb, usb1->fs_size)); - printk(" dsize: %u\n", fs32_to_cpu(sb, usb1->fs_dsize)); - printk(" ncg: %u\n", fs32_to_cpu(sb, usb1->fs_ncg)); - printk(" bsize: %u\n", fs32_to_cpu(sb, usb1->fs_bsize)); - printk(" fsize: %u\n", fs32_to_cpu(sb, usb1->fs_fsize)); - printk(" frag: %u\n", fs32_to_cpu(sb, usb1->fs_frag)); - printk(" fragshift: %u\n", - fs32_to_cpu(sb, usb1->fs_fragshift)); - printk(" ~fmask: %u\n", ~fs32_to_cpu(sb, usb1->fs_fmask)); - printk(" fshift: %u\n", fs32_to_cpu(sb, usb1->fs_fshift)); - printk(" sbsize: %u\n", fs32_to_cpu(sb, usb1->fs_sbsize)); - printk(" spc: %u\n", fs32_to_cpu(sb, usb1->fs_spc)); - printk(" cpg: %u\n", fs32_to_cpu(sb, usb1->fs_cpg)); - printk(" ipg: %u\n", fs32_to_cpu(sb, usb1->fs_ipg)); - printk(" fpg: %u\n", fs32_to_cpu(sb, usb1->fs_fpg)); - printk(" csaddr: %u\n", fs32_to_cpu(sb, usb1->fs_csaddr)); - printk(" cssize: %u\n", fs32_to_cpu(sb, usb1->fs_cssize)); - printk(" cgsize: %u\n", fs32_to_cpu(sb, usb1->fs_cgsize)); - printk(" fstodb: %u\n", - fs32_to_cpu(sb, usb1->fs_fsbtodb)); - printk(" nrpos: %u\n", fs32_to_cpu(sb, usb3->fs_nrpos)); - printk(" ndir %u\n", - fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir)); - printk(" nifree %u\n", - fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree)); - printk(" nbfree %u\n", - fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree)); - printk(" nffree %u\n", - fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree)); - } + printk("size of usb: %u\n", sizeof(struct ufs_super_block)); + printk(" magic: 0x%x\n", fs32_to_cpu(sb, usb3->fs_magic)); + printk(" sblkno: %u\n", fs32_to_cpu(sb, usb1->fs_sblkno)); + printk(" cblkno: %u\n", fs32_to_cpu(sb, usb1->fs_cblkno)); + printk(" iblkno: %u\n", fs32_to_cpu(sb, usb1->fs_iblkno)); + printk(" dblkno: %u\n", fs32_to_cpu(sb, usb1->fs_dblkno)); + printk(" cgoffset: %u\n", fs32_to_cpu(sb, usb1->fs_cgoffset)); + printk(" ~cgmask: 0x%x\n", ~fs32_to_cpu(sb, usb1->fs_cgmask)); + printk(" size: %u\n", fs32_to_cpu(sb, usb1->fs_size)); + printk(" dsize: %u\n", fs32_to_cpu(sb, usb1->fs_dsize)); + printk(" ncg: %u\n", fs32_to_cpu(sb, usb1->fs_ncg)); + printk(" bsize: %u\n", fs32_to_cpu(sb, usb1->fs_bsize)); + printk(" fsize: %u\n", fs32_to_cpu(sb, usb1->fs_fsize)); + printk(" frag: %u\n", fs32_to_cpu(sb, usb1->fs_frag)); + printk(" fragshift: %u\n", fs32_to_cpu(sb, usb1->fs_fragshift)); + printk(" ~fmask: %u\n", ~fs32_to_cpu(sb, usb1->fs_fmask)); + printk(" fshift: %u\n", fs32_to_cpu(sb, usb1->fs_fshift)); + printk(" sbsize: %u\n", fs32_to_cpu(sb, usb1->fs_sbsize)); + printk(" spc: %u\n", fs32_to_cpu(sb, usb1->fs_spc)); + printk(" cpg: %u\n", fs32_to_cpu(sb, usb1->fs_cpg)); + printk(" ipg: %u\n", fs32_to_cpu(sb, usb1->fs_ipg)); + printk(" fpg: %u\n", fs32_to_cpu(sb, usb1->fs_fpg)); + printk(" csaddr: %u\n", fs32_to_cpu(sb, usb1->fs_csaddr)); + printk(" cssize: %u\n", fs32_to_cpu(sb, usb1->fs_cssize)); + printk(" cgsize: %u\n", fs32_to_cpu(sb, usb1->fs_cgsize)); + printk(" fstodb: %u\n", fs32_to_cpu(sb, usb1->fs_fsbtodb)); + printk(" contigsumsize: %d\n", fs32_to_cpu(sb, usb3->fs_u2.fs_44.fs_contigsumsize)); + printk(" postblformat: %u\n", fs32_to_cpu(sb, usb3->fs_postblformat)); + printk(" nrpos: %u\n", fs32_to_cpu(sb, usb3->fs_nrpos)); + printk(" ndir %u\n", fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir)); + printk(" nifree %u\n", fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree)); + printk(" nbfree %u\n", fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree)); + printk(" nffree %u\n", fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree)); + printk("\n"); +} + +/* + * Print contents of ufs2 ufs_super_block, useful for debugging + */ +void ufs2_print_super_stuff( + struct super_block *sb, + struct ufs_super_block *usb) +{ + printk("ufs_print_super_stuff\n"); + printk("size of usb: %u\n", sizeof(struct ufs_super_block)); + printk(" magic: 0x%x\n", fs32_to_cpu(sb, usb->fs_magic)); + printk(" fs_size: %u\n",fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_size)); + printk(" fs_dsize: %u\n",fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_dsize)); + printk(" bsize: %u\n", fs32_to_cpu(usb, usb->fs_bsize)); + printk(" fsize: %u\n", fs32_to_cpu(usb, usb->fs_fsize)); + printk(" fs_volname: %s\n", usb->fs_u11.fs_u2.fs_volname); + printk(" fs_fsmnt: %s\n", usb->fs_u11.fs_u2.fs_fsmnt); + printk(" fs_sblockloc: %u\n",fs64_to_cpu(sb, + usb->fs_u11.fs_u2.fs_sblockloc)); + printk(" cs_ndir(No of dirs): %u\n",fs64_to_cpu(sb, + usb->fs_u11.fs_u2.fs_cstotal.cs_ndir)); + printk(" cs_nbfree(No of free blocks): %u\n",fs64_to_cpu(sb, + usb->fs_u11.fs_u2.fs_cstotal.cs_nbfree)); printk("\n"); } /* * Print contents of ufs_cylinder_group, useful for debugging */ -static void ufs_print_cylinder_stuff(struct super_block *sb, - struct ufs_cylinder_group *cg) +void ufs_print_cylinder_stuff(struct super_block *sb, struct ufs_cylinder_group *cg) { printk("\nufs_print_cylinder_stuff\n"); - printk("size of ucg: %zu\n", sizeof(struct ufs_cylinder_group)); + printk("size of ucg: %u\n", sizeof(struct ufs_cylinder_group)); printk(" magic: %x\n", fs32_to_cpu(sb, cg->cg_magic)); printk(" time: %u\n", fs32_to_cpu(sb, cg->cg_time)); printk(" cgx: %u\n", fs32_to_cpu(sb, cg->cg_cgx)); @@ -190,18 +202,12 @@ static void ufs_print_cylinder_stuff(struct super_block *sb, printk(" iuseoff: %u\n", fs32_to_cpu(sb, cg->cg_iusedoff)); printk(" freeoff: %u\n", fs32_to_cpu(sb, cg->cg_freeoff)); printk(" nextfreeoff: %u\n", fs32_to_cpu(sb, cg->cg_nextfreeoff)); - printk(" clustersumoff %u\n", - fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clustersumoff)); - printk(" clusteroff %u\n", - fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clusteroff)); - printk(" nclusterblks %u\n", - fs32_to_cpu(sb, cg->cg_u.cg_44.cg_nclusterblks)); + printk(" clustersumoff %u\n", fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clustersumoff)); + printk(" clusteroff %u\n", fs32_to_cpu(sb, cg->cg_u.cg_44.cg_clusteroff)); + printk(" nclusterblks %u\n", fs32_to_cpu(sb, cg->cg_u.cg_44.cg_nclusterblks)); printk("\n"); } -#else -# define ufs_print_super_stuff(sb, flags, usb1, usb2, usb3) /**/ -# define ufs_print_cylinder_stuff(sb, cg) /**/ -#endif /* CONFIG_UFS_DEBUG */ +#endif /* UFS_SUPER_DEBUG_MORE */ static struct super_operations ufs_super_ops; @@ -219,7 +225,7 @@ void ufs_error (struct super_block * sb, const char * function, if (!(sb->s_flags & MS_RDONLY)) { usb1->fs_clean = UFS_FSBAD; - ubh_mark_buffer_dirty(USPI_UBH(uspi)); + ubh_mark_buffer_dirty(USPI_UBH); sb->s_dirt = 1; sb->s_flags |= MS_RDONLY; } @@ -251,7 +257,7 @@ void ufs_panic (struct super_block * sb, const char * function, if (!(sb->s_flags & MS_RDONLY)) { usb1->fs_clean = UFS_FSBAD; - ubh_mark_buffer_dirty(USPI_UBH(uspi)); + ubh_mark_buffer_dirty(USPI_UBH); sb->s_dirt = 1; } va_start (args, fmt); @@ -303,7 +309,7 @@ static int ufs_parse_options (char * options, unsigned * mount_options) { char * p; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) if (!options) return 1; @@ -379,58 +385,28 @@ static int ufs_parse_options (char * options, unsigned * mount_options) return 1; } -/* - * Diffrent types of UFS hold fs_cstotal in different - * places, and use diffrent data structure for it. - * To make things simplier we just copy fs_cstotal to ufs_sb_private_info - */ -static void ufs_setup_cstotal(struct super_block *sb) -{ - struct ufs_sb_info *sbi = UFS_SB(sb); - struct ufs_sb_private_info *uspi = sbi->s_uspi; - struct ufs_super_block_first *usb1; - struct ufs_super_block_second *usb2; - struct ufs_super_block_third *usb3; - unsigned mtype = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; - - UFSD("ENTER, mtype=%u\n", mtype); - usb1 = ubh_get_usb_first(uspi); - usb2 = ubh_get_usb_second(uspi); - usb3 = ubh_get_usb_third(uspi); - - if ((mtype == UFS_MOUNT_UFSTYPE_44BSD && - (usb1->fs_flags & UFS_FLAGS_UPDATED)) || - mtype == UFS_MOUNT_UFSTYPE_UFS2) { - /*we have statistic in different place, then usual*/ - uspi->cs_total.cs_ndir = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_ndir); - uspi->cs_total.cs_nbfree = fs64_to_cpu(sb, usb2->fs_un.fs_u2.cs_nbfree); - uspi->cs_total.cs_nifree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nifree); - uspi->cs_total.cs_nffree = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree); - } else { - uspi->cs_total.cs_ndir = fs32_to_cpu(sb, usb1->fs_cstotal.cs_ndir); - uspi->cs_total.cs_nbfree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree); - uspi->cs_total.cs_nifree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree); - uspi->cs_total.cs_nffree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree); - } - UFSD("EXIT\n"); -} - /* * Read on-disk structures associated with cylinder groups */ -static int ufs_read_cylinder_structures(struct super_block *sb) +static int ufs_read_cylinder_structures (struct super_block *sb) { - struct ufs_sb_info *sbi = UFS_SB(sb); - struct ufs_sb_private_info *uspi = sbi->s_uspi; - unsigned flags = sbi->s_flags; + struct ufs_sb_info * sbi = UFS_SB(sb); + struct ufs_sb_private_info * uspi; + struct ufs_super_block *usb; struct ufs_buffer_head * ubh; unsigned char * base, * space; unsigned size, blks, i; - struct ufs_super_block_third *usb3; + unsigned flags = 0; + + UFSD(("ENTER\n")) + + uspi = sbi->s_uspi; - UFSD("ENTER\n"); + usb = (struct ufs_super_block *) + ((struct ufs_buffer_head *)uspi)->bh[0]->b_data; - usb3 = ubh_get_usb_third(uspi); + flags = UFS_SB(sb)->s_flags; + /* * Read cs structures from (usually) first data block * on the device. @@ -448,7 +424,7 @@ static int ufs_read_cylinder_structures(struct super_block *sb) if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) ubh = ubh_bread(sb, - fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_csaddr) + i, size); + fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_csaddr) + i, size); else ubh = ubh_bread(sb, uspi->s_csaddr + i, size); @@ -475,13 +451,14 @@ static int ufs_read_cylinder_structures(struct super_block *sb) sbi->s_cgno[i] = UFS_CGNO_EMPTY; } for (i = 0; i < uspi->s_ncg; i++) { - UFSD("read cg %u\n", i); + UFSD(("read cg %u\n", i)) if (!(sbi->s_ucg[i] = sb_bread(sb, ufs_cgcmin(i)))) goto failed; if (!ufs_cg_chkmagic (sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data)) goto failed; - +#ifdef UFS_SUPER_DEBUG_MORE ufs_print_cylinder_stuff(sb, (struct ufs_cylinder_group *) sbi->s_ucg[i]->b_data); +#endif } for (i = 0; i < UFS_MAX_GROUP_LOADED; i++) { if (!(sbi->s_ucpi[i] = kmalloc (sizeof(struct ufs_cg_private_info), GFP_KERNEL))) @@ -489,7 +466,7 @@ static int ufs_read_cylinder_structures(struct super_block *sb) sbi->s_cgno[i] = UFS_CGNO_EMPTY; } sbi->s_cg_loaded = 0; - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return 1; failed: @@ -502,69 +479,26 @@ failed: for (i = 0; i < UFS_MAX_GROUP_LOADED; i++) kfree (sbi->s_ucpi[i]); } - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return 0; } /* - * Sync our internal copy of fs_cstotal with disk - */ -static void ufs_put_cstotal(struct super_block *sb) -{ - unsigned mtype = UFS_SB(sb)->s_mount_opt & UFS_MOUNT_UFSTYPE; - struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; - struct ufs_super_block_first *usb1; - struct ufs_super_block_second *usb2; - struct ufs_super_block_third *usb3; - - UFSD("ENTER\n"); - usb1 = ubh_get_usb_first(uspi); - usb2 = ubh_get_usb_second(uspi); - usb3 = ubh_get_usb_third(uspi); - - if ((mtype == UFS_MOUNT_UFSTYPE_44BSD && - (usb1->fs_flags & UFS_FLAGS_UPDATED)) || - mtype == UFS_MOUNT_UFSTYPE_UFS2) { - /*we have statistic in different place, then usual*/ - usb2->fs_un.fs_u2.cs_ndir = - cpu_to_fs64(sb, uspi->cs_total.cs_ndir); - usb2->fs_un.fs_u2.cs_nbfree = - cpu_to_fs64(sb, uspi->cs_total.cs_nbfree); - usb3->fs_un1.fs_u2.cs_nifree = - cpu_to_fs64(sb, uspi->cs_total.cs_nifree); - usb3->fs_un1.fs_u2.cs_nffree = - cpu_to_fs64(sb, uspi->cs_total.cs_nffree); - } else { - usb1->fs_cstotal.cs_ndir = - cpu_to_fs32(sb, uspi->cs_total.cs_ndir); - usb1->fs_cstotal.cs_nbfree = - cpu_to_fs32(sb, uspi->cs_total.cs_nbfree); - usb1->fs_cstotal.cs_nifree = - cpu_to_fs32(sb, uspi->cs_total.cs_nifree); - usb1->fs_cstotal.cs_nffree = - cpu_to_fs32(sb, uspi->cs_total.cs_nffree); - } - ubh_mark_buffer_dirty(USPI_UBH(uspi)); - UFSD("EXIT\n"); -} - -/** - * ufs_put_super_internal() - put on-disk intrenal structures - * @sb: pointer to super_block structure - * Put on-disk structures associated with cylinder groups - * and write them back to disk, also update cs_total on disk + * Put on-disk structures associated with cylinder groups and + * write them back to disk */ -static void ufs_put_super_internal(struct super_block *sb) +static void ufs_put_cylinder_structures (struct super_block *sb) { - struct ufs_sb_info *sbi = UFS_SB(sb); - struct ufs_sb_private_info *uspi = sbi->s_uspi; + struct ufs_sb_info * sbi = UFS_SB(sb); + struct ufs_sb_private_info * uspi; struct ufs_buffer_head * ubh; unsigned char * base, * space; unsigned blks, size, i; - - UFSD("ENTER\n"); - ufs_put_cstotal(sb); + UFSD(("ENTER\n")) + + uspi = sbi->s_uspi; + size = uspi->s_cssize; blks = (size + uspi->s_fsize - 1) >> uspi->s_fshift; base = space = (char*) sbi->s_csp; @@ -589,7 +523,7 @@ static void ufs_put_super_internal(struct super_block *sb) brelse (sbi->s_ucg[i]); kfree (sbi->s_ucg); kfree (base); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) } static int ufs_fill_super(struct super_block *sb, void *data, int silent) @@ -599,6 +533,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) struct ufs_super_block_first * usb1; struct ufs_super_block_second * usb2; struct ufs_super_block_third * usb3; + struct ufs_super_block *usb; struct ufs_buffer_head * ubh; struct inode *inode; unsigned block_size, super_block_size; @@ -609,7 +544,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ubh = NULL; flags = 0; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) sbi = kmalloc(sizeof(struct ufs_sb_info), GFP_KERNEL); if (!sbi) @@ -617,7 +552,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) sb->s_fs_info = sbi; memset(sbi, 0, sizeof(struct ufs_sb_info)); - UFSD("flag %u\n", (int)(sb->s_flags & MS_RDONLY)); + UFSD(("flag %u\n", (int)(sb->s_flags & MS_RDONLY))) #ifndef CONFIG_UFS_FS_WRITE if (!(sb->s_flags & MS_RDONLY)) { @@ -658,7 +593,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) the rules */ switch (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) { case UFS_MOUNT_UFSTYPE_44BSD: - UFSD("ufstype=44bsd\n"); + UFSD(("ufstype=44bsd\n")) uspi->s_fsize = block_size = 512; uspi->s_fmask = ~(512 - 1); uspi->s_fshift = 9; @@ -667,7 +602,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD; break; case UFS_MOUNT_UFSTYPE_UFS2: - UFSD("ufstype=ufs2\n"); + UFSD(("ufstype=ufs2\n")); super_block_offset=SBLOCK_UFS2; uspi->s_fsize = block_size = 512; uspi->s_fmask = ~(512 - 1); @@ -682,7 +617,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_SUN: - UFSD("ufstype=sun\n"); + UFSD(("ufstype=sun\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -693,7 +628,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_SUNx86: - UFSD("ufstype=sunx86\n"); + UFSD(("ufstype=sunx86\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -704,7 +639,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_OLD: - UFSD("ufstype=old\n"); + UFSD(("ufstype=old\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -719,7 +654,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_NEXTSTEP: - UFSD("ufstype=nextstep\n"); + UFSD(("ufstype=nextstep\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -734,7 +669,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_NEXTSTEP_CD: - UFSD("ufstype=nextstep-cd\n"); + UFSD(("ufstype=nextstep-cd\n")) uspi->s_fsize = block_size = 2048; uspi->s_fmask = ~(2048 - 1); uspi->s_fshift = 11; @@ -749,7 +684,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_OPENSTEP: - UFSD("ufstype=openstep\n"); + UFSD(("ufstype=openstep\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -764,7 +699,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) break; case UFS_MOUNT_UFSTYPE_HP: - UFSD("ufstype=hp\n"); + UFSD(("ufstype=hp\n")) uspi->s_fsize = block_size = 1024; uspi->s_fmask = ~(1024 - 1); uspi->s_fshift = 10; @@ -802,6 +737,8 @@ again: usb1 = ubh_get_usb_first(uspi); usb2 = ubh_get_usb_second(uspi); usb3 = ubh_get_usb_third(uspi); + usb = (struct ufs_super_block *) + ((struct ufs_buffer_head *)uspi)->bh[0]->b_data ; /* * Check ufs magic number @@ -883,12 +820,16 @@ magic_found: ubh = NULL; block_size = uspi->s_fsize; super_block_size = uspi->s_sbsize; - UFSD("another value of block_size or super_block_size %u, %u\n", block_size, super_block_size); + UFSD(("another value of block_size or super_block_size %u, %u\n", block_size, super_block_size)) goto again; } - - ufs_print_super_stuff(sb, flags, usb1, usb2, usb3); +#ifdef UFS_SUPER_DEBUG_MORE + if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) + ufs2_print_super_stuff(sb,usb); + else + ufs_print_super_stuff(sb, usb1, usb2, usb3); +#endif /* * Check, if file system was correctly unmounted. @@ -901,13 +842,13 @@ magic_found: (ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time))))) { switch(usb1->fs_clean) { case UFS_FSCLEAN: - UFSD("fs is clean\n"); + UFSD(("fs is clean\n")) break; case UFS_FSSTABLE: - UFSD("fs is stable\n"); + UFSD(("fs is stable\n")) break; case UFS_FSOSF1: - UFSD("fs is DEC OSF/1\n"); + UFSD(("fs is DEC OSF/1\n")) break; case UFS_FSACTIVE: printk("ufs_read_super: fs is active\n"); @@ -922,7 +863,8 @@ magic_found: sb->s_flags |= MS_RDONLY; break; } - } else { + } + else { printk("ufs_read_super: fs needs fsck\n"); sb->s_flags |= MS_RDONLY; } @@ -942,9 +884,10 @@ magic_found: uspi->s_cgmask = fs32_to_cpu(sb, usb1->fs_cgmask); if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { - uspi->s_u2_size = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_size); - uspi->s_u2_dsize = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); - } else { + uspi->s_u2_size = fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_size); + uspi->s_u2_dsize = fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_dsize); + } + else { uspi->s_size = fs32_to_cpu(sb, usb1->fs_size); uspi->s_dsize = fs32_to_cpu(sb, usb1->fs_dsize); } @@ -958,8 +901,8 @@ magic_found: uspi->s_fmask = fs32_to_cpu(sb, usb1->fs_fmask); uspi->s_bshift = fs32_to_cpu(sb, usb1->fs_bshift); uspi->s_fshift = fs32_to_cpu(sb, usb1->fs_fshift); - UFSD("uspi->s_bshift = %d,uspi->s_fshift = %d", uspi->s_bshift, - uspi->s_fshift); + UFSD(("uspi->s_bshift = %d,uspi->s_fshift = %d", uspi->s_bshift, + uspi->s_fshift)); uspi->s_fpbshift = fs32_to_cpu(sb, usb1->fs_fragshift); uspi->s_fsbtodb = fs32_to_cpu(sb, usb1->fs_fsbtodb); /* s_sbsize already set */ @@ -979,8 +922,8 @@ magic_found: uspi->s_spc = fs32_to_cpu(sb, usb1->fs_spc); uspi->s_ipg = fs32_to_cpu(sb, usb1->fs_ipg); uspi->s_fpg = fs32_to_cpu(sb, usb1->fs_fpg); - uspi->s_cpc = fs32_to_cpu(sb, usb2->fs_un.fs_u1.fs_cpc); - uspi->s_contigsumsize = fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_contigsumsize); + uspi->s_cpc = fs32_to_cpu(sb, usb2->fs_cpc); + uspi->s_contigsumsize = fs32_to_cpu(sb, usb3->fs_u2.fs_44.fs_contigsumsize); uspi->s_qbmask = ufs_get_fs_qbmask(sb, usb3); uspi->s_qfmask = ufs_get_fs_qfmask(sb, usb3); uspi->s_postblformat = fs32_to_cpu(sb, usb3->fs_postblformat); @@ -992,11 +935,12 @@ magic_found: * Compute another frequently used values */ uspi->s_fpbmask = uspi->s_fpb - 1; - if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) + if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { uspi->s_apbshift = uspi->s_bshift - 3; - else + } + else { uspi->s_apbshift = uspi->s_bshift - 2; - + } uspi->s_2apbshift = uspi->s_apbshift * 2; uspi->s_3apbshift = uspi->s_apbshift * 3; uspi->s_apb = 1 << uspi->s_apbshift; @@ -1012,7 +956,7 @@ magic_found: if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_44BSD) uspi->s_maxsymlinklen = - fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen); + fs32_to_cpu(sb, usb3->fs_u2.fs_44.fs_maxsymlinklen); sbi->s_flags = flags; @@ -1023,7 +967,7 @@ magic_found: if (!sb->s_root) goto dalloc_failed; - ufs_setup_cstotal(sb); + /* * Read cylinder group structures */ @@ -1031,7 +975,7 @@ magic_found: if (!ufs_read_cylinder_structures(sb)) goto failed; - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return 0; dalloc_failed: @@ -1042,16 +986,15 @@ failed: kfree (uspi); kfree(sbi); sb->s_fs_info = NULL; - UFSD("EXIT (FAILED)\n"); + UFSD(("EXIT (FAILED)\n")) return -EINVAL; failed_nomem: - UFSD("EXIT (NOMEM)\n"); + UFSD(("EXIT (NOMEM)\n")) return -ENOMEM; } -static void ufs_write_super(struct super_block *sb) -{ +static void ufs_write_super (struct super_block *sb) { struct ufs_sb_private_info * uspi; struct ufs_super_block_first * usb1; struct ufs_super_block_third * usb3; @@ -1059,7 +1002,7 @@ static void ufs_write_super(struct super_block *sb) lock_kernel(); - UFSD("ENTER\n"); + UFSD(("ENTER\n")) flags = UFS_SB(sb)->s_flags; uspi = UFS_SB(sb)->s_uspi; usb1 = ubh_get_usb_first(uspi); @@ -1071,27 +1014,26 @@ static void ufs_write_super(struct super_block *sb) || (flags & UFS_ST_MASK) == UFS_ST_SUNx86) ufs_set_fs_state(sb, usb1, usb3, UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); - ufs_put_cstotal(sb); + ubh_mark_buffer_dirty (USPI_UBH); } sb->s_dirt = 0; - UFSD("EXIT\n"); + UFSD(("EXIT\n")) unlock_kernel(); } -static void ufs_put_super(struct super_block *sb) +static void ufs_put_super (struct super_block *sb) { struct ufs_sb_info * sbi = UFS_SB(sb); - UFSD("ENTER\n"); + UFSD(("ENTER\n")) if (!(sb->s_flags & MS_RDONLY)) - ufs_put_super_internal(sb); + ufs_put_cylinder_structures (sb); ubh_brelse_uspi (sbi->s_uspi); kfree (sbi->s_uspi); kfree (sbi); sb->s_fs_info = NULL; - UFSD("EXIT\n"); return; } @@ -1120,7 +1062,8 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) return -EINVAL; if (!(new_mount_opt & UFS_MOUNT_UFSTYPE)) { new_mount_opt |= ufstype; - } else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) { + } + else if ((new_mount_opt & UFS_MOUNT_UFSTYPE) != ufstype) { printk("ufstype can't be changed during remount\n"); return -EINVAL; } @@ -1134,19 +1077,20 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) * fs was mouted as rw, remounting ro */ if (*mount_flags & MS_RDONLY) { - ufs_put_super_internal(sb); + ufs_put_cylinder_structures(sb); usb1->fs_time = cpu_to_fs32(sb, get_seconds()); if ((flags & UFS_ST_MASK) == UFS_ST_SUN || (flags & UFS_ST_MASK) == UFS_ST_SUNx86) ufs_set_fs_state(sb, usb1, usb3, UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)); - ubh_mark_buffer_dirty (USPI_UBH(uspi)); + ubh_mark_buffer_dirty (USPI_UBH); sb->s_dirt = 0; sb->s_flags |= MS_RDONLY; - } else { + } /* * fs was mounted as ro, remounting rw */ + else { #ifndef CONFIG_UFS_FS_WRITE printk("ufs was compiled with read-only support, " "can't be mounted as read-write\n"); @@ -1158,7 +1102,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) printk("this ufstype is read-only supported\n"); return -EINVAL; } - if (!ufs_read_cylinder_structures(sb)) { + if (!ufs_read_cylinder_structures (sb)) { printk("failed during remounting\n"); return -EPERM; } @@ -1169,31 +1113,36 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data) return 0; } -static int ufs_statfs(struct dentry *dentry, struct kstatfs *buf) +static int ufs_statfs (struct super_block *sb, struct kstatfs *buf) { - struct super_block *sb = dentry->d_sb; - struct ufs_sb_private_info *uspi= UFS_SB(sb)->s_uspi; - unsigned flags = UFS_SB(sb)->s_flags; - struct ufs_super_block_first *usb1; - struct ufs_super_block_second *usb2; - struct ufs_super_block_third *usb3; + struct ufs_sb_private_info * uspi; + struct ufs_super_block_first * usb1; + struct ufs_super_block * usb; + unsigned flags = 0; lock_kernel(); - usb1 = ubh_get_usb_first(uspi); - usb2 = ubh_get_usb_second(uspi); - usb3 = ubh_get_usb_third(uspi); + uspi = UFS_SB(sb)->s_uspi; + usb1 = ubh_get_usb_first (uspi); + usb = (struct ufs_super_block *) + ((struct ufs_buffer_head *)uspi)->bh[0]->b_data ; + flags = UFS_SB(sb)->s_flags; if ((flags & UFS_TYPE_MASK) == UFS_TYPE_UFS2) { buf->f_type = UFS2_MAGIC; - buf->f_blocks = fs64_to_cpu(sb, usb3->fs_un1.fs_u2.fs_dsize); - } else { + buf->f_blocks = fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_dsize); + buf->f_bfree = ufs_blkstofrags(fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_cstotal.cs_nbfree)) + + fs64_to_cpu(sb, usb->fs_u11.fs_u2.fs_cstotal.cs_nffree); + buf->f_ffree = fs64_to_cpu(sb, + usb->fs_u11.fs_u2.fs_cstotal.cs_nifree); + } + else { buf->f_type = UFS_MAGIC; buf->f_blocks = uspi->s_dsize; + buf->f_bfree = ufs_blkstofrags(fs32_to_cpu(sb, usb1->fs_cstotal.cs_nbfree)) + + fs32_to_cpu(sb, usb1->fs_cstotal.cs_nffree); + buf->f_ffree = fs32_to_cpu(sb, usb1->fs_cstotal.cs_nifree); } - buf->f_bfree = ufs_blkstofrags(uspi->cs_total.cs_nbfree) + - uspi->cs_total.cs_nffree; - buf->f_ffree = uspi->cs_total.cs_nifree; buf->f_bsize = sb->s_blocksize; buf->f_bavail = (buf->f_bfree > (((long)buf->f_blocks / 100) * uspi->s_minfree)) ? (buf->f_bfree - (((long)buf->f_blocks / 100) * uspi->s_minfree)) : 0; @@ -1326,7 +1275,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, size_t towrite = len; struct buffer_head *bh; - mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); + mutex_lock(&inode->i_mutex); while (towrite > 0) { tocopy = sb->s_blocksize - offset < towrite ? sb->s_blocksize - offset : towrite; @@ -1362,10 +1311,10 @@ out: #endif -static int ufs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *ufs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, ufs_fill_super, mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, ufs_fill_super); } static struct file_system_type ufs_fs_type = { diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index ea11d04c4..02e86291e 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -49,6 +49,14 @@ #include "swab.h" #include "util.h" +#undef UFS_TRUNCATE_DEBUG + +#ifdef UFS_TRUNCATE_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + /* * Secure deletion currently doesn't work. It interacts very badly * with buffers shared with memory mappings, and for that reason @@ -74,7 +82,7 @@ static int ufs_trunc_direct (struct inode * inode) unsigned i, tmp; int retry; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -97,7 +105,7 @@ static int ufs_trunc_direct (struct inode * inode) block2 = ufs_fragstoblks (frag3); } - UFSD("frag1 %u, frag2 %u, block1 %u, block2 %u, frag3 %u, frag4 %u\n", frag1, frag2, block1, block2, frag3, frag4); + UFSD(("frag1 %u, frag2 %u, block1 %u, block2 %u, frag3 %u, frag4 %u\n", frag1, frag2, block1, block2, frag3, frag4)) if (frag1 >= frag2) goto next1; @@ -112,8 +120,9 @@ static int ufs_trunc_direct (struct inode * inode) frag1 = ufs_fragnum (frag1); frag2 = ufs_fragnum (frag2); - ufs_free_fragments (inode, tmp + frag1, frag2 - frag1); + inode->i_blocks -= (frag2-frag1) << uspi->s_nspfshift; mark_inode_dirty(inode); + ufs_free_fragments (inode, tmp + frag1, frag2 - frag1); frag_to_free = tmp + frag1; next1: @@ -127,7 +136,8 @@ next1: continue; *p = 0; - + inode->i_blocks -= uspi->s_nspb; + mark_inode_dirty(inode); if (free_count == 0) { frag_to_free = tmp; free_count = uspi->s_fpb; @@ -138,7 +148,6 @@ next1: frag_to_free = tmp; free_count = uspi->s_fpb; } - mark_inode_dirty(inode); } if (free_count > 0) @@ -157,12 +166,12 @@ next1: frag4 = ufs_fragnum (frag4); *p = 0; - - ufs_free_fragments (inode, tmp, frag4); + inode->i_blocks -= frag4 << uspi->s_nspfshift; mark_inode_dirty(inode); + ufs_free_fragments (inode, tmp, frag4); next3: - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return retry; } @@ -177,7 +186,7 @@ static int ufs_trunc_indirect (struct inode * inode, unsigned offset, __fs32 *p) unsigned frag_to_free, free_count; int retry; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -218,7 +227,7 @@ static int ufs_trunc_indirect (struct inode * inode, unsigned offset, __fs32 *p) frag_to_free = tmp; free_count = uspi->s_fpb; } - + inode->i_blocks -= uspi->s_nspb; mark_inode_dirty(inode); } @@ -229,21 +238,26 @@ static int ufs_trunc_indirect (struct inode * inode, unsigned offset, __fs32 *p) if (*ubh_get_addr32(ind_ubh,i)) break; if (i >= uspi->s_apb) { - tmp = fs32_to_cpu(sb, *p); - *p = 0; - - ufs_free_blocks (inode, tmp, uspi->s_fpb); - mark_inode_dirty(inode); - ubh_bforget(ind_ubh); - ind_ubh = NULL; + if (ubh_max_bcount(ind_ubh) != 1) { + retry = 1; + } + else { + tmp = fs32_to_cpu(sb, *p); + *p = 0; + inode->i_blocks -= uspi->s_nspb; + mark_inode_dirty(inode); + ufs_free_blocks (inode, tmp, uspi->s_fpb); + ubh_bforget(ind_ubh); + ind_ubh = NULL; + } } if (IS_SYNC(inode) && ind_ubh && ubh_buffer_dirty(ind_ubh)) { - ubh_ll_rw_block(SWRITE, ind_ubh); + ubh_ll_rw_block (SWRITE, 1, &ind_ubh); ubh_wait_on_buffer (ind_ubh); } ubh_brelse (ind_ubh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return retry; } @@ -257,7 +271,7 @@ static int ufs_trunc_dindirect (struct inode *inode, unsigned offset, __fs32 *p) __fs32 * dind; int retry = 0; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -292,21 +306,25 @@ static int ufs_trunc_dindirect (struct inode *inode, unsigned offset, __fs32 *p) if (*ubh_get_addr32 (dind_bh, i)) break; if (i >= uspi->s_apb) { - tmp = fs32_to_cpu(sb, *p); - *p = 0; - - ufs_free_blocks(inode, tmp, uspi->s_fpb); - mark_inode_dirty(inode); - ubh_bforget(dind_bh); - dind_bh = NULL; + if (ubh_max_bcount(dind_bh) != 1) + retry = 1; + else { + tmp = fs32_to_cpu(sb, *p); + *p = 0; + inode->i_blocks -= uspi->s_nspb; + mark_inode_dirty(inode); + ufs_free_blocks (inode, tmp, uspi->s_fpb); + ubh_bforget(dind_bh); + dind_bh = NULL; + } } if (IS_SYNC(inode) && dind_bh && ubh_buffer_dirty(dind_bh)) { - ubh_ll_rw_block(SWRITE, dind_bh); + ubh_ll_rw_block (SWRITE, 1, &dind_bh); ubh_wait_on_buffer (dind_bh); } ubh_brelse (dind_bh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return retry; } @@ -321,7 +339,7 @@ static int ufs_trunc_tindirect (struct inode * inode) __fs32 * tind, * p; int retry; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) sb = inode->i_sb; uspi = UFS_SB(sb)->s_uspi; @@ -352,100 +370,45 @@ static int ufs_trunc_tindirect (struct inode * inode) if (*ubh_get_addr32 (tind_bh, i)) break; if (i >= uspi->s_apb) { - tmp = fs32_to_cpu(sb, *p); - *p = 0; - - ufs_free_blocks(inode, tmp, uspi->s_fpb); - mark_inode_dirty(inode); - ubh_bforget(tind_bh); - tind_bh = NULL; + if (ubh_max_bcount(tind_bh) != 1) + retry = 1; + else { + tmp = fs32_to_cpu(sb, *p); + *p = 0; + inode->i_blocks -= uspi->s_nspb; + mark_inode_dirty(inode); + ufs_free_blocks (inode, tmp, uspi->s_fpb); + ubh_bforget(tind_bh); + tind_bh = NULL; + } } if (IS_SYNC(inode) && tind_bh && ubh_buffer_dirty(tind_bh)) { - ubh_ll_rw_block(SWRITE, tind_bh); + ubh_ll_rw_block (SWRITE, 1, &tind_bh); ubh_wait_on_buffer (tind_bh); } ubh_brelse (tind_bh); - UFSD("EXIT\n"); + UFSD(("EXIT\n")) return retry; } - -static int ufs_alloc_lastblock(struct inode *inode) -{ - int err = 0; - struct address_space *mapping = inode->i_mapping; - struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; - unsigned lastfrag, i, end; - struct page *lastpage; - struct buffer_head *bh; - - lastfrag = (i_size_read(inode) + uspi->s_fsize - 1) >> uspi->s_fshift; - - if (!lastfrag) - goto out; - - lastfrag--; - - lastpage = ufs_get_locked_page(mapping, lastfrag >> - (PAGE_CACHE_SHIFT - inode->i_blkbits)); - if (IS_ERR(lastpage)) { - err = -EIO; - goto out; - } - - end = lastfrag & ((1 << (PAGE_CACHE_SHIFT - inode->i_blkbits)) - 1); - bh = page_buffers(lastpage); - for (i = 0; i < end; ++i) - bh = bh->b_this_page; - - - err = ufs_getfrag_block(inode, lastfrag, bh, 1); - - if (unlikely(err)) - goto out_unlock; - - if (buffer_new(bh)) { - clear_buffer_new(bh); - unmap_underlying_metadata(bh->b_bdev, - bh->b_blocknr); - /* - * we do not zeroize fragment, because of - * if it maped to hole, it already contains zeroes - */ - set_buffer_uptodate(bh); - mark_buffer_dirty(bh); - set_page_dirty(lastpage); - } - -out_unlock: - ufs_put_locked_page(lastpage); -out: - return err; -} - -int ufs_truncate(struct inode *inode, loff_t old_i_size) + +void ufs_truncate (struct inode * inode) { struct ufs_inode_info *ufsi = UFS_I(inode); - struct super_block *sb = inode->i_sb; - struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; - int retry, err = 0; + struct super_block * sb; + struct ufs_sb_private_info * uspi; + int retry; - UFSD("ENTER\n"); + UFSD(("ENTER\n")) + sb = inode->i_sb; + uspi = UFS_SB(sb)->s_uspi; - if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || - S_ISLNK(inode->i_mode))) - return -EINVAL; + if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) + return; if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) - return -EPERM; - - err = ufs_alloc_lastblock(inode); - - if (err) { - i_size_write(inode, old_i_size); - goto out; - } + return; - block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block); + block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block); lock_kernel(); while (1) { @@ -467,41 +430,5 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size) ufsi->i_lastfrag = DIRECT_FRAGMENT; unlock_kernel(); mark_inode_dirty(inode); -out: - UFSD("EXIT: err %d\n", err); - return err; -} - - -/* - * We don't define our `inode->i_op->truncate', and call it here, - * because of: - * - there is no way to know old size - * - there is no way inform user about error, if it happens in `truncate' - */ -static int ufs_setattr(struct dentry *dentry, struct iattr *attr) -{ - struct inode *inode = dentry->d_inode; - unsigned int ia_valid = attr->ia_valid; - int error; - - error = inode_change_ok(inode, attr); - if (error) - return error; - - if (ia_valid & ATTR_SIZE && - attr->ia_size != i_size_read(inode)) { - loff_t old_i_size = inode->i_size; - error = vmtruncate(inode, attr->ia_size); - if (error) - return error; - error = ufs_truncate(inode, old_i_size); - if (error) - return error; - } - return inode_setattr(inode, attr); + UFSD(("EXIT\n")) } - -struct inode_operations ufs_file_inode_operations = { - .setattr = ufs_setattr, -}; diff --git a/fs/ufs/util.c b/fs/ufs/util.c index 22f820a9b..59acc8f07 100644 --- a/fs/ufs/util.c +++ b/fs/ufs/util.c @@ -14,6 +14,15 @@ #include "swab.h" #include "util.h" +#undef UFS_UTILS_DEBUG + +#ifdef UFS_UTILS_DEBUG +#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; +#else +#define UFSD(x) +#endif + + struct ufs_buffer_head * _ubh_bread_ (struct ufs_sb_private_info * uspi, struct super_block *sb, u64 fragment, u64 size) { @@ -54,17 +63,17 @@ struct ufs_buffer_head * ubh_bread_uspi (struct ufs_sb_private_info * uspi, count = size >> uspi->s_fshift; if (count <= 0 || count > UFS_MAXFRAG) return NULL; - USPI_UBH(uspi)->fragment = fragment; - USPI_UBH(uspi)->count = count; + USPI_UBH->fragment = fragment; + USPI_UBH->count = count; for (i = 0; i < count; i++) - if (!(USPI_UBH(uspi)->bh[i] = sb_bread(sb, fragment + i))) + if (!(USPI_UBH->bh[i] = sb_bread(sb, fragment + i))) goto failed; for (; i < UFS_MAXFRAG; i++) - USPI_UBH(uspi)->bh[i] = NULL; - return USPI_UBH(uspi); + USPI_UBH->bh[i] = NULL; + return USPI_UBH; failed: for (j = 0; j < i; j++) - brelse (USPI_UBH(uspi)->bh[j]); + brelse (USPI_UBH->bh[j]); return NULL; } @@ -81,11 +90,11 @@ void ubh_brelse (struct ufs_buffer_head * ubh) void ubh_brelse_uspi (struct ufs_sb_private_info * uspi) { unsigned i; - if (!USPI_UBH(uspi)) + if (!USPI_UBH) return; - for ( i = 0; i < USPI_UBH(uspi)->count; i++ ) { - brelse (USPI_UBH(uspi)->bh[i]); - USPI_UBH(uspi)->bh[i] = NULL; + for ( i = 0; i < USPI_UBH->count; i++ ) { + brelse (USPI_UBH->bh[i]); + USPI_UBH->bh[i] = NULL; } } @@ -112,12 +121,13 @@ void ubh_mark_buffer_uptodate (struct ufs_buffer_head * ubh, int flag) } } -void ubh_ll_rw_block(int rw, struct ufs_buffer_head *ubh) +void ubh_ll_rw_block (int rw, unsigned nr, struct ufs_buffer_head * ubh[]) { + unsigned i; if (!ubh) return; - - ll_rw_block(rw, ubh->count, ubh->bh); + for ( i = 0; i < nr; i++ ) + ll_rw_block (rw, ubh[i]->count, ubh[i]->bh); } void ubh_wait_on_buffer (struct ufs_buffer_head * ubh) @@ -129,6 +139,18 @@ void ubh_wait_on_buffer (struct ufs_buffer_head * ubh) wait_on_buffer (ubh->bh[i]); } +unsigned ubh_max_bcount (struct ufs_buffer_head * ubh) +{ + unsigned i; + unsigned max = 0; + if (!ubh) + return 0; + for ( i = 0; i < ubh->count; i++ ) + if ( atomic_read(&ubh->bh[i]->b_count) > max ) + max = atomic_read(&ubh->bh[i]->b_count); + return max; +} + void ubh_bforget (struct ufs_buffer_head * ubh) { unsigned i; @@ -233,58 +255,3 @@ ufs_set_inode_dev(struct super_block *sb, struct ufs_inode_info *ufsi, dev_t dev else ufsi->i_u1.i_data[0] = fs32; } - -/** - * ufs_get_locked_page() - locate, pin and lock a pagecache page, if not exist - * read it from disk. - * @mapping: the address_space to search - * @index: the page index - * - * Locates the desired pagecache page, if not exist we'll read it, - * locks it, increments its reference - * count and returns its address. - * - */ - -struct page *ufs_get_locked_page(struct address_space *mapping, - pgoff_t index) -{ - struct page *page; - - page = find_lock_page(mapping, index); - if (!page) { - page = read_cache_page(mapping, index, - (filler_t*)mapping->a_ops->readpage, - NULL); - - if (IS_ERR(page)) { - printk(KERN_ERR "ufs_change_blocknr: " - "read_cache_page error: ino %lu, index: %lu\n", - mapping->host->i_ino, index); - goto out; - } - - lock_page(page); - - if (unlikely(page->mapping == NULL)) { - /* Truncate got there first */ - unlock_page(page); - page_cache_release(page); - page = NULL; - goto out; - } - - if (!PageUptodate(page) || PageError(page)) { - unlock_page(page); - page_cache_release(page); - - printk(KERN_ERR "ufs_change_blocknr: " - "can not read page: ino %lu, index: %lu\n", - mapping->host->i_ino, index); - - page = ERR_PTR(-EIO); - } - } -out: - return page; -} diff --git a/fs/ufs/util.h b/fs/ufs/util.h index 28fce6c23..48d6d9bcc 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h @@ -17,16 +17,10 @@ #define in_range(b,first,len) ((b)>=(first)&&(b)<(first)+(len)) /* - * functions used for retyping + * macros used for retyping */ -static inline struct ufs_buffer_head *UCPI_UBH(struct ufs_cg_private_info *cpi) -{ - return &cpi->c_ubh; -} -static inline struct ufs_buffer_head *USPI_UBH(struct ufs_sb_private_info *spi) -{ - return &spi->s_ubh; -} +#define UCPI_UBH ((struct ufs_buffer_head *)ucpi) +#define USPI_UBH ((struct ufs_buffer_head *)uspi) @@ -39,12 +33,12 @@ ufs_get_fs_state(struct super_block *sb, struct ufs_super_block_first *usb1, { switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) { case UFS_ST_SUN: - return fs32_to_cpu(sb, usb3->fs_un2.fs_sun.fs_state); + return fs32_to_cpu(sb, usb3->fs_u2.fs_sun.fs_state); case UFS_ST_SUNx86: return fs32_to_cpu(sb, usb1->fs_u1.fs_sunx86.fs_state); case UFS_ST_44BSD: default: - return fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_state); + return fs32_to_cpu(sb, usb3->fs_u2.fs_44.fs_state); } } @@ -54,13 +48,13 @@ ufs_set_fs_state(struct super_block *sb, struct ufs_super_block_first *usb1, { switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) { case UFS_ST_SUN: - usb3->fs_un2.fs_sun.fs_state = cpu_to_fs32(sb, value); + usb3->fs_u2.fs_sun.fs_state = cpu_to_fs32(sb, value); break; case UFS_ST_SUNx86: usb1->fs_u1.fs_sunx86.fs_state = cpu_to_fs32(sb, value); break; case UFS_ST_44BSD: - usb3->fs_un2.fs_44.fs_state = cpu_to_fs32(sb, value); + usb3->fs_u2.fs_44.fs_state = cpu_to_fs32(sb, value); break; } } @@ -70,7 +64,7 @@ ufs_get_fs_npsect(struct super_block *sb, struct ufs_super_block_first *usb1, struct ufs_super_block_third *usb3) { if ((UFS_SB(sb)->s_flags & UFS_ST_MASK) == UFS_ST_SUNx86) - return fs32_to_cpu(sb, usb3->fs_un2.fs_sunx86.fs_npsect); + return fs32_to_cpu(sb, usb3->fs_u2.fs_sunx86.fs_npsect); else return fs32_to_cpu(sb, usb1->fs_u1.fs_sun.fs_npsect); } @@ -82,16 +76,16 @@ ufs_get_fs_qbmask(struct super_block *sb, struct ufs_super_block_third *usb3) switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) { case UFS_ST_SUN: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_sun.fs_qbmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_sun.fs_qbmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_sun.fs_qbmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_sun.fs_qbmask[1]; break; case UFS_ST_SUNx86: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_sunx86.fs_qbmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_sunx86.fs_qbmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_sunx86.fs_qbmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_sunx86.fs_qbmask[1]; break; case UFS_ST_44BSD: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_44.fs_qbmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_44.fs_qbmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_44.fs_qbmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_44.fs_qbmask[1]; break; } @@ -105,16 +99,16 @@ ufs_get_fs_qfmask(struct super_block *sb, struct ufs_super_block_third *usb3) switch (UFS_SB(sb)->s_flags & UFS_ST_MASK) { case UFS_ST_SUN: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_sun.fs_qfmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_sun.fs_qfmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_sun.fs_qfmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_sun.fs_qfmask[1]; break; case UFS_ST_SUNx86: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_sunx86.fs_qfmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_sunx86.fs_qfmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_sunx86.fs_qfmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_sunx86.fs_qfmask[1]; break; case UFS_ST_44BSD: - ((__fs32 *)&tmp)[0] = usb3->fs_un2.fs_44.fs_qfmask[0]; - ((__fs32 *)&tmp)[1] = usb3->fs_un2.fs_44.fs_qfmask[1]; + ((__fs32 *)&tmp)[0] = usb3->fs_u2.fs_44.fs_qfmask[0]; + ((__fs32 *)&tmp)[1] = usb3->fs_u2.fs_44.fs_qfmask[1]; break; } @@ -242,8 +236,9 @@ extern void ubh_brelse (struct ufs_buffer_head *); extern void ubh_brelse_uspi (struct ufs_sb_private_info *); extern void ubh_mark_buffer_dirty (struct ufs_buffer_head *); extern void ubh_mark_buffer_uptodate (struct ufs_buffer_head *, int); -extern void ubh_ll_rw_block(int, struct ufs_buffer_head *); +extern void ubh_ll_rw_block (int, unsigned, struct ufs_buffer_head **); extern void ubh_wait_on_buffer (struct ufs_buffer_head *); +extern unsigned ubh_max_bcount (struct ufs_buffer_head *); extern void ubh_bforget (struct ufs_buffer_head *); extern int ubh_buffer_dirty (struct ufs_buffer_head *); #define ubh_ubhcpymem(mem,ubh,size) _ubh_ubhcpymem_(uspi,mem,ubh,size) @@ -251,14 +246,6 @@ extern void _ubh_ubhcpymem_(struct ufs_sb_private_info *, unsigned char *, struc #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head *, unsigned char *, unsigned); -/* This functions works with cache pages*/ -extern struct page *ufs_get_locked_page(struct address_space *mapping, - pgoff_t index); -static inline void ufs_put_locked_page(struct page *page) -{ - unlock_page(page); - page_cache_release(page); -} /* @@ -310,26 +297,40 @@ static inline void *get_usb_offset(struct ufs_sb_private_info *uspi, #define ubh_blkmap(ubh,begin,bit) \ ((*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) >> ((bit) & 7)) & (0xff >> (UFS_MAXFRAG - uspi->s_fpb))) + +/* + * Macros for access to superblock array structures + */ +#define ubh_postbl(ubh,cylno,i) \ + ((uspi->s_postblformat != UFS_DYNAMICPOSTBLFMT) \ + ? (*(__s16*)(ubh_get_addr(ubh, \ + (unsigned)(&((struct ufs_super_block *)0)->fs_opostbl) \ + + (((cylno) * 16 + (i)) << 1) ) )) \ + : (*(__s16*)(ubh_get_addr(ubh, \ + uspi->s_postbloff + (((cylno) * uspi->s_nrpos + (i)) << 1) )))) + +#define ubh_rotbl(ubh,i) \ + ((uspi->s_postblformat != UFS_DYNAMICPOSTBLFMT) \ + ? (*(__u8*)(ubh_get_addr(ubh, \ + (unsigned)(&((struct ufs_super_block *)0)->fs_space) + (i)))) \ + : (*(__u8*)(ubh_get_addr(ubh, uspi->s_rotbloff + (i))))) + /* * Determine the number of available frags given a * percentage to hold in reserve. */ -static inline u64 -ufs_freespace(struct ufs_sb_private_info *uspi, int percentreserved) -{ - return ufs_blkstofrags(uspi->cs_total.cs_nbfree) + - uspi->cs_total.cs_nffree - - (uspi->s_dsize * (percentreserved) / 100); -} +#define ufs_freespace(usb, percentreserved) \ + (ufs_blkstofrags(fs32_to_cpu(sb, (usb)->fs_cstotal.cs_nbfree)) + \ + fs32_to_cpu(sb, (usb)->fs_cstotal.cs_nffree) - (uspi->s_dsize * (percentreserved) / 100)) /* * Macros to access cylinder group array structures */ #define ubh_cg_blktot(ucpi,cylno) \ - (*((__fs32*)ubh_get_addr(UCPI_UBH(ucpi), (ucpi)->c_btotoff + ((cylno) << 2)))) + (*((__fs32*)ubh_get_addr(UCPI_UBH, (ucpi)->c_btotoff + ((cylno) << 2)))) #define ubh_cg_blks(ucpi,cylno,rpos) \ - (*((__fs16*)ubh_get_addr(UCPI_UBH(ucpi), \ + (*((__fs16*)ubh_get_addr(UCPI_UBH, \ (ucpi)->c_boff + (((cylno) * uspi->s_nrpos + (rpos)) << 1 )))) /* @@ -507,3 +508,29 @@ static inline void ufs_fragacct (struct super_block * sb, unsigned blockmap, if (fragsize > 0 && fragsize < uspi->s_fpb) fs32_add(sb, &fraglist[fragsize], cnt); } + +#define ubh_scanc(ubh,begin,size,table,mask) _ubh_scanc_(uspi,ubh,begin,size,table,mask) +static inline unsigned _ubh_scanc_(struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, + unsigned begin, unsigned size, unsigned char * table, unsigned char mask) +{ + unsigned rest, offset; + unsigned char * cp; + + + offset = begin & ~uspi->s_fmask; + begin >>= uspi->s_fshift; + for (;;) { + if ((offset + size) < uspi->s_fsize) + rest = size; + else + rest = uspi->s_fsize - offset; + size -= rest; + cp = ubh->bh[begin]->b_data + offset; + while ((table[*cp++] & mask) == 0 && --rest); + if (rest || !size) + break; + begin++; + offset = 0; + } + return (size + rest); +} diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index 9a8f48bae..a56cec3be 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c @@ -1023,12 +1023,11 @@ static int vfat_fill_super(struct super_block *sb, void *data, int silent) return 0; } -static int vfat_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *vfat_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super); } static struct file_system_type vfat_fs_type = { diff --git a/fs/xattr.c b/fs/xattr.c index 1422a01e2..1940c63f1 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -246,7 +246,7 @@ sys_fsetxattr(int fd, char __user *name, void __user *value, if (!f) return error; dentry = f->f_dentry; - audit_inode(NULL, dentry->d_inode); + audit_inode(NULL, dentry->d_inode, 0); error = setxattr(dentry, name, value, size, flags, f->f_vfsmnt); fput(f); return error; @@ -476,7 +476,7 @@ sys_fremovexattr(int fd, char __user *name) if (!f) return error; dentry = f->f_dentry; - audit_inode(NULL, dentry->d_inode); + audit_inode(NULL, dentry->d_inode, 0); error = removexattr(dentry, name, f->f_vfsmnt); fput(f); return error; diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig index 26b364c9d..bac27d661 100644 --- a/fs/xfs/Kconfig +++ b/fs/xfs/Kconfig @@ -1,5 +1,6 @@ config XFS_FS tristate "XFS filesystem support" + select EXPORTFS if NFSD!=n help XFS is a high performance journaling filesystem which originated on the SGI IRIX platform. It is completely multi-threaded, can @@ -17,6 +18,11 @@ config XFS_FS system of your root partition is compiled as a module, you'll need to use an initial ramdisk (initrd) to boot. +config XFS_EXPORT + bool + depends on XFS_FS && EXPORTFS + default y + config XFS_QUOTA bool "XFS Quota support" depends on XFS_FS @@ -59,19 +65,18 @@ config XFS_POSIX_ACL If you don't know what Access Control Lists are, say N. config XFS_RT - bool "XFS Realtime subvolume support" - depends on XFS_FS + bool "XFS Realtime support (EXPERIMENTAL)" + depends on XFS_FS && EXPERIMENTAL help If you say Y here you will be able to mount and use XFS filesystems - which contain a realtime subvolume. The realtime subvolume is a - separate area of disk space where only file data is stored. It was - originally designed to provide deterministic data rates suitable - for media streaming applications, but is also useful as a generic - mechanism for ensuring data and metadata/log I/Os are completely - separated. Regular file I/Os are isolated to a separate device - from all other requests, and this can be done quite transparently - to applications via the inherit-realtime directory inode flag. + which contain a realtime subvolume. The realtime subvolume is a + separate area of disk space where only file data is stored. The + realtime subvolume is designed to provide very deterministic + data rates suitable for media streaming applications. + + See the xfs man page in section 5 for a bit more information. - See the xfs man page in section 5 for additional information. + This feature is unsupported at this time, is not yet fully + functional, and may cause serious problems. If unsure, say N. diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6 index 9e7f85986..5d73eaa19 100644 --- a/fs/xfs/Makefile-linux-2.6 +++ b/fs/xfs/Makefile-linux-2.6 @@ -59,6 +59,7 @@ xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o xfs-$(CONFIG_SYSCTL) += $(XFS_LINUX)/xfs_sysctl.o xfs-$(CONFIG_COMPAT) += $(XFS_LINUX)/xfs_ioctl32.o +xfs-$(CONFIG_XFS_EXPORT) += $(XFS_LINUX)/xfs_export.o xfs-y += xfs_alloc.o \ @@ -72,12 +73,14 @@ xfs-y += xfs_alloc.o \ xfs_btree.o \ xfs_buf_item.o \ xfs_da_btree.o \ + xfs_dir.o \ xfs_dir2.o \ xfs_dir2_block.o \ xfs_dir2_data.o \ xfs_dir2_leaf.o \ xfs_dir2_node.o \ xfs_dir2_sf.o \ + xfs_dir_leaf.o \ xfs_error.o \ xfs_extfree_item.o \ xfs_fsops.o \ @@ -114,7 +117,6 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \ kmem.o \ xfs_aops.o \ xfs_buf.o \ - xfs_export.o \ xfs_file.o \ xfs_fs_subr.o \ xfs_globals.o \ diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index 939bd84bc..2cfd33d4d 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h @@ -22,6 +22,42 @@ #include #include +/* + * Process flags handling + */ + +#define PFLAGS_TEST_NOIO() (current->flags & PF_NOIO) +#define PFLAGS_TEST_FSTRANS() (current->flags & PF_FSTRANS) + +#define PFLAGS_SET_NOIO() do { \ + current->flags |= PF_NOIO; \ +} while (0) + +#define PFLAGS_CLEAR_NOIO() do { \ + current->flags &= ~PF_NOIO; \ +} while (0) + +/* these could be nested, so we save state */ +#define PFLAGS_SET_FSTRANS(STATEP) do { \ + *(STATEP) = current->flags; \ + current->flags |= PF_FSTRANS; \ +} while (0) + +#define PFLAGS_CLEAR_FSTRANS(STATEP) do { \ + *(STATEP) = current->flags; \ + current->flags &= ~PF_FSTRANS; \ +} while (0) + +/* Restore the PF_FSTRANS state to what was saved in STATEP */ +#define PFLAGS_RESTORE_FSTRANS(STATEP) do { \ + current->flags = ((current->flags & ~PF_FSTRANS) | \ + (*(STATEP) & PF_FSTRANS)); \ +} while (0) + +#define PFLAGS_DUP(OSTATEP, NSTATEP) do { \ + *(NSTATEP) = *(OSTATEP); \ +} while (0) + /* * General memory allocation interfaces */ @@ -47,7 +83,7 @@ kmem_flags_convert(unsigned int __nocast flags) lflags = GFP_ATOMIC | __GFP_NOWARN; } else { lflags = GFP_KERNEL | __GFP_NOWARN; - if ((current->flags & PF_FSTRANS) || (flags & KM_NOFS)) + if (PFLAGS_TEST_FSTRANS() || (flags & KM_NOFS)) lflags &= ~__GFP_FS; } return lflags; diff --git a/fs/xfs/linux-2.6/mrlock.h b/fs/xfs/linux-2.6/mrlock.h index 32e1ce0f0..1b262b790 100644 --- a/fs/xfs/linux-2.6/mrlock.h +++ b/fs/xfs/linux-2.6/mrlock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ typedef struct { } mrlock_t; #define mrinit(mrp, name) \ - do { (mrp)->mr_writer = 0; init_rwsem(&(mrp)->mr_lock); } while (0) + ( (mrp)->mr_writer = 0, init_rwsem(&(mrp)->mr_lock) ) #define mrlock_init(mrp, t,n,s) mrinit(mrp, n) #define mrfree(mrp) do { } while (0) #define mraccess(mrp) mraccessf(mrp, 0) diff --git a/fs/xfs/linux-2.6/sema.h b/fs/xfs/linux-2.6/sema.h index b25090094..194a84490 100644 --- a/fs/xfs/linux-2.6/sema.h +++ b/fs/xfs/linux-2.6/sema.h @@ -34,21 +34,20 @@ typedef struct semaphore sema_t; #define initnsema(sp, val, name) sema_init(sp, val) #define psema(sp, b) down(sp) #define vsema(sp) up(sp) -#define freesema(sema) do { } while (0) - -static inline int issemalocked(sema_t *sp) -{ - return down_trylock(sp) || (up(sp), 0); -} +#define valusema(sp) (atomic_read(&(sp)->count)) +#define freesema(sema) /* * Map cpsema (try to get the sema) to down_trylock. We need to switch * the return values since cpsema returns 1 (acquired) 0 (failed) and * down_trylock returns the reverse 0 (acquired) 1 (failed). */ -static inline int cpsema(sema_t *sp) -{ - return down_trylock(sp) ? 0 : 1; -} + +#define cpsema(sp) (down_trylock(sp) ? 0 : 1) + +/* + * Didn't do cvsema(sp). Not sure how to map this to up/down/... + * It does a vsema if the values is < 0 other wise nothing. + */ #endif /* __XFS_SUPPORT_SEMA_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 34dcb43a7..4d191ef39 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -21,6 +21,7 @@ #include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_trans.h" #include "xfs_dmapi.h" @@ -28,6 +29,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -74,7 +76,7 @@ xfs_page_trace( int mask) { xfs_inode_t *ip; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); loff_t isize = i_size_read(inode); loff_t offset = page_offset(page); int delalloc = -1, unmapped = -1, unwritten = -1; @@ -134,10 +136,9 @@ xfs_destroy_ioend( for (bh = ioend->io_buffer_head; bh; bh = next) { next = bh->b_private; - bh->b_end_io(bh, !ioend->io_error); + bh->b_end_io(bh, ioend->io_uptodate); } - if (unlikely(ioend->io_error)) - vn_ioerror(ioend->io_vnode, ioend->io_error, __FILE__,__LINE__); + vn_iowake(ioend->io_vnode); mempool_free(ioend, xfs_ioend_pool); } @@ -179,12 +180,13 @@ xfs_end_bio_unwritten( void *data) { xfs_ioend_t *ioend = data; - bhv_vnode_t *vp = ioend->io_vnode; + vnode_t *vp = ioend->io_vnode; xfs_off_t offset = ioend->io_offset; size_t size = ioend->io_size; + int error; - if (likely(!ioend->io_error)) - bhv_vop_bmap(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL); + if (ioend->io_uptodate) + VOP_BMAP(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL, error); xfs_destroy_ioend(ioend); } @@ -209,7 +211,7 @@ xfs_alloc_ioend( * all the I/O from calling the completion routine too early. */ atomic_set(&ioend->io_remaining, 1); - ioend->io_error = 0; + ioend->io_uptodate = 1; /* cleared if any I/O fails */ ioend->io_list = NULL; ioend->io_type = type; ioend->io_vnode = vn_from_inode(inode); @@ -237,10 +239,10 @@ xfs_map_blocks( xfs_iomap_t *mapp, int flags) { - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); int error, nmaps = 1; - error = bhv_vop_bmap(vp, offset, count, flags, mapp, &nmaps); + VOP_BMAP(vp, offset, count, flags, mapp, &nmaps, error); if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) VMODIFY(vp); return -error; @@ -269,14 +271,16 @@ xfs_end_bio( if (bio->bi_size) return 1; + ASSERT(ioend); ASSERT(atomic_read(&bio->bi_cnt) >= 1); - ioend->io_error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? 0 : error; /* Toss bio and pass work off to an xfsdatad thread */ + if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) + ioend->io_uptodate = 0; bio->bi_private = NULL; bio->bi_end_io = NULL; - bio_put(bio); + bio_put(bio); xfs_finish_ioend(ioend); return 0; } @@ -1123,7 +1127,7 @@ xfs_vm_writepage( * then mark the page dirty again and leave the page * as is. */ - if (current_test_flags(PF_FSTRANS) && need_trans) + if (PFLAGS_TEST_FSTRANS() && need_trans) goto out_fail; /* @@ -1154,18 +1158,6 @@ out_unlock: return error; } -STATIC int -xfs_vm_writepages( - struct address_space *mapping, - struct writeback_control *wbc) -{ - struct bhv_vnode *vp = vn_from_inode(mapping->host); - - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); - return generic_writepages(mapping, wbc); -} - /* * Called to move a page into cleanable state - and from there * to be released. Possibly the page is already clean. We always @@ -1212,7 +1204,7 @@ xfs_vm_releasepage( /* If we are already inside a transaction or the thread cannot * do I/O, we cannot release this page. */ - if (current_test_flags(PF_FSTRANS)) + if (PFLAGS_TEST_FSTRANS()) return 0; /* @@ -1239,7 +1231,7 @@ __xfs_get_blocks( int direct, bmapi_flags_t flags) { - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); xfs_iomap_t iomap; xfs_off_t offset; ssize_t size; @@ -1249,8 +1241,8 @@ __xfs_get_blocks( offset = (xfs_off_t)iblock << inode->i_blkbits; ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); size = bh_result->b_size; - error = bhv_vop_bmap(vp, offset, size, - create ? flags : BMAPI_READ, &iomap, &niomap); + VOP_BMAP(vp, offset, size, + create ? flags : BMAPI_READ, &iomap, &niomap, error); if (error) return -error; if (niomap == 0) @@ -1378,31 +1370,23 @@ xfs_vm_direct_IO( { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); xfs_iomap_t iomap; int maps = 1; int error; ssize_t ret; - error = bhv_vop_bmap(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps); + VOP_BMAP(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps, error); if (error) return -error; iocb->private = xfs_alloc_ioend(inode, IOMAP_UNWRITTEN); - if (rw == WRITE) { - ret = blockdev_direct_IO_own_locking(rw, iocb, inode, - iomap.iomap_target->bt_bdev, - iov, offset, nr_segs, - xfs_get_blocks_direct, - xfs_end_io_direct); - } else { - ret = blockdev_direct_IO_no_locking(rw, iocb, inode, - iomap.iomap_target->bt_bdev, - iov, offset, nr_segs, - xfs_get_blocks_direct, - xfs_end_io_direct); - } + ret = blockdev_direct_IO_own_locking(rw, iocb, inode, + iomap.iomap_target->bt_bdev, + iov, offset, nr_segs, + xfs_get_blocks_direct, + xfs_end_io_direct); if (unlikely(ret <= 0 && iocb->private)) xfs_destroy_ioend(iocb->private); @@ -1425,12 +1409,14 @@ xfs_vm_bmap( sector_t block) { struct inode *inode = (struct inode *)mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + int error; vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - bhv_vop_rwlock(vp, VRWLOCK_READ); - bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); - bhv_vop_rwunlock(vp, VRWLOCK_READ); + + VOP_RWLOCK(vp, VRWLOCK_READ); + VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); + VOP_RWUNLOCK(vp, VRWLOCK_READ); return generic_block_bmap(mapping, block, xfs_get_blocks); } @@ -1462,11 +1448,10 @@ xfs_vm_invalidatepage( block_invalidatepage(page, offset); } -const struct address_space_operations xfs_address_space_operations = { +struct address_space_operations xfs_address_space_operations = { .readpage = xfs_vm_readpage, .readpages = xfs_vm_readpages, .writepage = xfs_vm_writepage, - .writepages = xfs_vm_writepages, .sync_page = block_sync_page, .releasepage = xfs_vm_releasepage, .invalidatepage = xfs_vm_invalidatepage, diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 2244e516b..60716543c 100644 --- a/fs/xfs/linux-2.6/xfs_aops.h +++ b/fs/xfs/linux-2.6/xfs_aops.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2006 Silicon Graphics, Inc. + * Copyright (c) 2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -30,9 +30,9 @@ typedef void (*xfs_ioend_func_t)(void *); typedef struct xfs_ioend { struct xfs_ioend *io_list; /* next ioend in chain */ unsigned int io_type; /* delalloc / unwritten */ - int io_error; /* I/O error code */ + unsigned int io_uptodate; /* I/O status register */ atomic_t io_remaining; /* hold count */ - struct bhv_vnode *io_vnode; /* file being written to */ + struct vnode *io_vnode; /* file being written to */ struct buffer_head *io_buffer_head;/* buffer linked list head */ struct buffer_head *io_buffer_tail;/* buffer linked list tail */ size_t io_size; /* size of the extent */ @@ -40,7 +40,7 @@ typedef struct xfs_ioend { struct work_struct io_work; /* xfsdatad work queue */ } xfs_ioend_t; -extern const struct address_space_operations xfs_address_space_operations; +extern struct address_space_operations xfs_address_space_operations; extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int); -#endif /* __XFS_AOPS_H__ */ +#endif /* __XFS_IOPS_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 2af528dcf..26fed0756 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -1520,7 +1520,7 @@ xfs_mapping_buftarg( struct backing_dev_info *bdi; struct inode *inode; struct address_space *mapping; - static const struct address_space_operations mapping_aops = { + static struct address_space_operations mapping_aops = { .sync_page = block_sync_page, .migratepage = fail_migrate_page, }; diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 7858703ed..4dd6592d5 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h @@ -18,6 +18,7 @@ #ifndef __XFS_BUF_H__ #define __XFS_BUF_H__ +#include #include #include #include @@ -246,8 +247,8 @@ extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *); #define BUF_BUSY XBF_DONT_BLOCK #define XFS_BUF_BFLAGS(bp) ((bp)->b_flags) -#define XFS_BUF_ZEROFLAGS(bp) ((bp)->b_flags &= \ - ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI|XBF_ORDERED)) +#define XFS_BUF_ZEROFLAGS(bp) \ + ((bp)->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI)) #define XFS_BUF_STALE(bp) ((bp)->b_flags |= XFS_B_STALE) #define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XFS_B_STALE) diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index 5fb75d915..b768ea910 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c @@ -21,6 +21,7 @@ #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_mount.h" #include "xfs_export.h" @@ -96,7 +97,7 @@ xfs_fs_encode_fh( int len; int is64 = 0; #if XFS_BIG_INUMS - bhv_vfs_t *vfs = vfs_from_sb(inode->i_sb); + vfs_t *vfs = vfs_from_sb(inode->i_sb); if (!(vfs->vfs_flag & VFS_32BITINODES)) { /* filesystem may contain 64bit inode numbers */ @@ -135,13 +136,13 @@ xfs_fs_get_dentry( struct super_block *sb, void *data) { - bhv_vnode_t *vp; + vnode_t *vp; struct inode *inode; struct dentry *result; - bhv_vfs_t *vfsp = vfs_from_sb(sb); + vfs_t *vfsp = vfs_from_sb(sb); int error; - error = bhv_vfs_vget(vfsp, &vp, (fid_t *)data); + VFS_VGET(vfsp, &vp, (fid_t *)data, error); if (error || vp == NULL) return ERR_PTR(-ESTALE) ; @@ -159,12 +160,12 @@ xfs_fs_get_parent( struct dentry *child) { int error; - bhv_vnode_t *vp, *cvp; + vnode_t *vp, *cvp; struct dentry *parent; cvp = NULL; vp = vn_from_inode(child->d_inode); - error = bhv_vop_lookup(vp, &dotdot, &cvp, 0, NULL, NULL); + VOP_LOOKUP(vp, &dotdot, &cvp, 0, NULL, NULL, error); if (unlikely(error)) return ERR_PTR(-error); diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 3d4f6dff2..c847416f6 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -21,6 +21,7 @@ #include "xfs_inum.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_trans.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_alloc.h" #include "xfs_btree.h" #include "xfs_attr_sf.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" @@ -56,12 +58,15 @@ __xfs_file_read( { struct iovec iov = {buf, count}; struct file *file = iocb->ki_filp; - bhv_vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); + vnode_t *vp = vn_from_inode(file->f_dentry->d_inode); + ssize_t rval; BUG_ON(iocb->ki_pos != pos); + if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - return bhv_vop_read(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL); + VOP_READ(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval); + return rval; } STATIC ssize_t @@ -95,12 +100,15 @@ __xfs_file_write( struct iovec iov = {(void __user *)buf, count}; struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + ssize_t rval; BUG_ON(iocb->ki_pos != pos); if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - return bhv_vop_write(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL); + + VOP_WRITE(vp, iocb, &iov, 1, &iocb->ki_pos, ioflags, NULL, rval); + return rval; } STATIC ssize_t @@ -132,7 +140,7 @@ __xfs_file_readv( loff_t *ppos) { struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); struct kiocb kiocb; ssize_t rval; @@ -141,8 +149,7 @@ __xfs_file_readv( if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - rval = bhv_vop_read(vp, &kiocb, iov, nr_segs, - &kiocb.ki_pos, ioflags, NULL); + VOP_READ(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); *ppos = kiocb.ki_pos; return rval; @@ -177,7 +184,7 @@ __xfs_file_writev( loff_t *ppos) { struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); struct kiocb kiocb; ssize_t rval; @@ -186,8 +193,7 @@ __xfs_file_writev( if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - rval = bhv_vop_write(vp, &kiocb, iov, nr_segs, - &kiocb.ki_pos, ioflags, NULL); + VOP_WRITE(vp, &kiocb, iov, nr_segs, &kiocb.ki_pos, ioflags, NULL, rval); *ppos = kiocb.ki_pos; return rval; @@ -221,8 +227,11 @@ xfs_file_sendfile( read_actor_t actor, void *target) { - return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), - filp, pos, 0, count, actor, target, NULL); + vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); + ssize_t rval; + + VOP_SENDFILE(vp, filp, pos, 0, count, actor, target, NULL, rval); + return rval; } STATIC ssize_t @@ -233,8 +242,11 @@ xfs_file_sendfile_invis( read_actor_t actor, void *target) { - return bhv_vop_sendfile(vn_from_inode(filp->f_dentry->d_inode), - filp, pos, IO_INVIS, count, actor, target, NULL); + vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); + ssize_t rval; + + VOP_SENDFILE(vp, filp, pos, IO_INVIS, count, actor, target, NULL, rval); + return rval; } STATIC ssize_t @@ -245,8 +257,11 @@ xfs_file_splice_read( size_t len, unsigned int flags) { - return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), - infilp, ppos, pipe, len, flags, 0, NULL); + vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); + ssize_t rval; + + VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, 0, NULL, rval); + return rval; } STATIC ssize_t @@ -257,9 +272,11 @@ xfs_file_splice_read_invis( size_t len, unsigned int flags) { - return bhv_vop_splice_read(vn_from_inode(infilp->f_dentry->d_inode), - infilp, ppos, pipe, len, flags, IO_INVIS, - NULL); + vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); + ssize_t rval; + + VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, IO_INVIS, NULL, rval); + return rval; } STATIC ssize_t @@ -270,8 +287,11 @@ xfs_file_splice_write( size_t len, unsigned int flags) { - return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), - pipe, outfilp, ppos, len, flags, 0, NULL); + vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); + ssize_t rval; + + VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, 0, NULL, rval); + return rval; } STATIC ssize_t @@ -282,9 +302,11 @@ xfs_file_splice_write_invis( size_t len, unsigned int flags) { - return bhv_vop_splice_write(vn_from_inode(outfilp->f_dentry->d_inode), - pipe, outfilp, ppos, len, flags, IO_INVIS, - NULL); + vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); + ssize_t rval; + + VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, IO_INVIS, NULL, rval); + return rval; } STATIC int @@ -292,18 +314,13 @@ xfs_file_open( struct inode *inode, struct file *filp) { + vnode_t *vp = vn_from_inode(inode); + int error; + if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) return -EFBIG; - return -bhv_vop_open(vn_from_inode(inode), NULL); -} - -STATIC int -xfs_file_close( - struct file *filp, - fl_owner_t id) -{ - return -bhv_vop_close(vn_from_inode(filp->f_dentry->d_inode), 0, - file_count(filp) > 1 ? L_FALSE : L_TRUE, NULL); + VOP_OPEN(vp, NULL, error); + return -error; } STATIC int @@ -311,11 +328,12 @@ xfs_file_release( struct inode *inode, struct file *filp) { - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + int error = 0; if (vp) - return -bhv_vop_release(vp); - return 0; + VOP_RELEASE(vp, error); + return -error; } STATIC int @@ -324,14 +342,15 @@ xfs_file_fsync( struct dentry *dentry, int datasync) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); + struct inode *inode = dentry->d_inode; + vnode_t *vp = vn_from_inode(inode); + int error; int flags = FSYNC_WAIT; if (datasync) flags |= FSYNC_DATA; - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); - return -bhv_vop_fsync(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1); + VOP_FSYNC(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1, error); + return -error; } #ifdef CONFIG_XFS_DMAPI @@ -342,11 +361,16 @@ xfs_vm_nopage( int *type) { struct inode *inode = area->vm_file->f_dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); + int error; ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); - if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) + + error = XFS_SEND_MMAP(mp, area, 0); + if (error) return NULL; + return filemap_nopage(area, address, type); } #endif /* CONFIG_XFS_DMAPI */ @@ -358,7 +382,7 @@ xfs_file_readdir( filldir_t filldir) { int error = 0; - bhv_vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); + vnode_t *vp = vn_from_inode(filp->f_dentry->d_inode); uio_t uio; iovec_t iov; int eof = 0; @@ -393,7 +417,7 @@ xfs_file_readdir( start_offset = uio.uio_offset; - error = bhv_vop_readdir(vp, &uio, NULL, &eof); + VOP_READDIR(vp, &uio, NULL, &eof, error); if ((uio.uio_offset == start_offset) || error) { size = 0; break; @@ -432,28 +456,38 @@ xfs_file_mmap( struct file *filp, struct vm_area_struct *vma) { + struct inode *ip = filp->f_dentry->d_inode; + vnode_t *vp = vn_from_inode(ip); + vattr_t vattr; + int error; + vma->vm_ops = &xfs_file_vm_ops; #ifdef CONFIG_XFS_DMAPI - if (vn_from_inode(filp->f_dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) + if (vp->v_vfsp->vfs_flag & VFS_DMI) { vma->vm_ops = &xfs_dmapi_file_vm_ops; + } #endif /* CONFIG_XFS_DMAPI */ - file_accessed(filp); + vattr.va_mask = XFS_AT_UPDATIME; + VOP_SETATTR(vp, &vattr, XFS_AT_UPDATIME, NULL, error); + if (likely(!error)) + __vn_revalidate(vp, &vattr); /* update flags */ return 0; } + STATIC long xfs_file_ioctl( struct file *filp, unsigned int cmd, - unsigned long p) + unsigned long arg) { int error; struct inode *inode = filp->f_dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); - error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p); + VOP_IOCTL(vp, inode, filp, 0, cmd, (void __user *)arg, error); VMODIFY(vp); /* NOTE: some of the ioctl's return positive #'s as a @@ -469,13 +503,13 @@ STATIC long xfs_file_ioctl_invis( struct file *filp, unsigned int cmd, - unsigned long p) + unsigned long arg) { - int error; struct inode *inode = filp->f_dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + int error; - error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p); + VOP_IOCTL(vp, inode, filp, IO_INVIS, cmd, (void __user *)arg, error); VMODIFY(vp); /* NOTE: some of the ioctl's return positive #'s as a @@ -494,7 +528,7 @@ xfs_vm_mprotect( struct vm_area_struct *vma, unsigned int newflags) { - bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); + vnode_t *vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); int error = 0; if (vp->v_vfsp->vfs_flag & VFS_DMI) { @@ -520,19 +554,24 @@ STATIC int xfs_file_open_exec( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); - - if (unlikely(vp->v_vfsp->vfs_flag & VFS_DMI)) { - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - xfs_inode_t *ip = xfs_vtoi(vp); + vnode_t *vp = vn_from_inode(inode); + xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); + int error = 0; + xfs_inode_t *ip; - if (!ip) - return -EINVAL; - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) - return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, + if (vp->v_vfsp->vfs_flag & VFS_DMI) { + ip = xfs_vtoi(vp); + if (!ip) { + error = -EINVAL; + goto open_exec_out; + } + if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) { + error = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); + } } - return 0; +open_exec_out: + return error; } #endif /* HAVE_FOP_OPEN_EXEC */ @@ -553,7 +592,6 @@ const struct file_operations xfs_file_operations = { #endif .mmap = xfs_file_mmap, .open = xfs_file_open, - .flush = xfs_file_close, .release = xfs_file_release, .fsync = xfs_file_fsync, #ifdef HAVE_FOP_OPEN_EXEC @@ -578,7 +616,6 @@ const struct file_operations xfs_invis_file_operations = { #endif .mmap = xfs_file_mmap, .open = xfs_file_open, - .flush = xfs_file_close, .release = xfs_file_release, .fsync = xfs_file_fsync, }; diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index dc0562828..575f2a790 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002,2005-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -15,12 +15,40 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + #include "xfs.h" -int fs_noerr(void) { return 0; } -int fs_nosys(void) { return ENOSYS; } -void fs_noval(void) { return; } +/* + * Stub for no-op vnode operations that return error status. + */ +int +fs_noerr(void) +{ + return 0; +} +/* + * Operation unsupported under this file system. + */ +int +fs_nosys(void) +{ + return ENOSYS; +} + +/* + * Stub for inactive, strategy, and read/write lock/unlock. Does nothing. + */ +/* ARGSUSED */ +void +fs_noval(void) +{ +} + +/* + * vnode pcache layer for vnode_tosspages. + * 'last' parameter unused but left in for IRIX compatibility + */ void fs_tosspages( bhv_desc_t *bdp, @@ -28,13 +56,18 @@ fs_tosspages( xfs_off_t last, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); + vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = vn_to_inode(vp); if (VN_CACHED(vp)) truncate_inode_pages(ip->i_mapping, first); } + +/* + * vnode pcache layer for vnode_flushinval_pages. + * 'last' parameter unused but left in for IRIX compatibility + */ void fs_flushinval_pages( bhv_desc_t *bdp, @@ -42,17 +75,20 @@ fs_flushinval_pages( xfs_off_t last, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); + vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = vn_to_inode(vp); if (VN_CACHED(vp)) { - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); filemap_write_and_wait(ip->i_mapping); + truncate_inode_pages(ip->i_mapping, first); } } +/* + * vnode pcache layer for vnode_flush_pages. + * 'last' parameter unused but left in for IRIX compatibility + */ int fs_flush_pages( bhv_desc_t *bdp, @@ -61,16 +97,15 @@ fs_flush_pages( uint64_t flags, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); + vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = vn_to_inode(vp); - if (VN_DIRTY(vp)) { - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); + if (VN_CACHED(vp)) { filemap_fdatawrite(ip->i_mapping); if (flags & XFS_B_ASYNC) return 0; filemap_fdatawait(ip->i_mapping); } + return 0; } diff --git a/fs/xfs/linux-2.6/xfs_globals.c b/fs/xfs/linux-2.6/xfs_globals.c index 6c162c3dd..6e8085f34 100644 --- a/fs/xfs/linux-2.6/xfs_globals.c +++ b/fs/xfs/linux-2.6/xfs_globals.c @@ -45,7 +45,6 @@ xfs_param_t xfs_params = { .xfs_buf_age = { 1*100, 15*100, 7200*100}, .inherit_nosym = { 0, 0, 1 }, .rotorstep = { 1, 1, 255 }, - .inherit_nodfrg = { 0, 1, 1 }, }; /* diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 4bbd09217..1d6ff3d5f 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -30,6 +31,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_attr_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" @@ -76,7 +78,7 @@ xfs_find_handle( xfs_handle_t handle; xfs_fsop_handlereq_t hreq; struct inode *inode; - bhv_vnode_t *vp; + struct vnode *vp; if (copy_from_user(&hreq, arg, sizeof(hreq))) return -XFS_ERROR(EFAULT); @@ -190,7 +192,7 @@ xfs_vget_fsop_handlereq( xfs_mount_t *mp, struct inode *parinode, /* parent inode pointer */ xfs_fsop_handlereq_t *hreq, - bhv_vnode_t **vp, + vnode_t **vp, struct inode **inode) { void __user *hanp; @@ -200,7 +202,7 @@ xfs_vget_fsop_handlereq( xfs_handle_t handle; xfs_inode_t *ip; struct inode *inodep; - bhv_vnode_t *vpp; + vnode_t *vpp; xfs_ino_t ino; __u32 igen; int error; @@ -275,7 +277,7 @@ xfs_open_by_handle( struct file *filp; struct inode *inode; struct dentry *dentry; - bhv_vnode_t *vp; + vnode_t *vp; xfs_fsop_handlereq_t hreq; if (!capable(CAP_SYS_ADMIN)) @@ -360,7 +362,7 @@ xfs_readlink_by_handle( struct uio auio; struct inode *inode; xfs_fsop_handlereq_t hreq; - bhv_vnode_t *vp; + vnode_t *vp; __u32 olen; if (!capable(CAP_SYS_ADMIN)) @@ -391,11 +393,9 @@ xfs_readlink_by_handle( auio.uio_segflg = UIO_USERSPACE; auio.uio_resid = olen; - error = bhv_vop_readlink(vp, &auio, IO_INVIS, NULL); - VN_RELE(vp); - if (error) - return -error; + VOP_READLINK(vp, &auio, IO_INVIS, NULL, error); + VN_RELE(vp); return (olen - auio.uio_resid); } @@ -411,7 +411,7 @@ xfs_fssetdm_by_handle( xfs_fsop_setdm_handlereq_t dmhreq; struct inode *inode; bhv_desc_t *bdp; - bhv_vnode_t *vp; + vnode_t *vp; if (!capable(CAP_MKNOD)) return -XFS_ERROR(EPERM); @@ -452,7 +452,7 @@ xfs_attrlist_by_handle( attrlist_cursor_kern_t *cursor; xfs_fsop_attrlist_handlereq_t al_hreq; struct inode *inode; - bhv_vnode_t *vp; + vnode_t *vp; char *kbuf; if (!capable(CAP_SYS_ADMIN)) @@ -472,8 +472,8 @@ xfs_attrlist_by_handle( goto out_vn_rele; cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; - error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags, - cursor, NULL); + VOP_ATTR_LIST(vp, kbuf, al_hreq.buflen, al_hreq.flags, + cursor, NULL, error); if (error) goto out_kfree; @@ -490,7 +490,7 @@ xfs_attrlist_by_handle( STATIC int xfs_attrmulti_attr_get( - bhv_vnode_t *vp, + struct vnode *vp, char *name, char __user *ubuf, __uint32_t *len, @@ -505,7 +505,7 @@ xfs_attrmulti_attr_get( if (!kbuf) return ENOMEM; - error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL); + VOP_ATTR_GET(vp, name, kbuf, len, flags, NULL, error); if (error) goto out_kfree; @@ -519,7 +519,7 @@ xfs_attrmulti_attr_get( STATIC int xfs_attrmulti_attr_set( - bhv_vnode_t *vp, + struct vnode *vp, char *name, const char __user *ubuf, __uint32_t len, @@ -542,7 +542,7 @@ xfs_attrmulti_attr_set( if (copy_from_user(kbuf, ubuf, len)) goto out_kfree; - error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL); + VOP_ATTR_SET(vp, name, kbuf, len, flags, NULL, error); out_kfree: kfree(kbuf); @@ -551,15 +551,20 @@ xfs_attrmulti_attr_set( STATIC int xfs_attrmulti_attr_remove( - bhv_vnode_t *vp, + struct vnode *vp, char *name, __uint32_t flags) { + int error; + + if (IS_RDONLY(&vp->v_inode)) return -EROFS; if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) return EPERM; - return bhv_vop_attr_remove(vp, name, flags, NULL); + + VOP_ATTR_REMOVE(vp, name, flags, NULL, error); + return error; } STATIC int @@ -573,7 +578,7 @@ xfs_attrmulti_by_handle( xfs_attr_multiop_t *ops; xfs_fsop_attrmulti_handlereq_t am_hreq; struct inode *inode; - bhv_vnode_t *vp; + vnode_t *vp; unsigned int i, size; char *attr_name; @@ -653,7 +658,7 @@ xfs_attrmulti_by_handle( STATIC int xfs_ioc_space( bhv_desc_t *bdp, - bhv_vnode_t *vp, + vnode_t *vp, struct file *filp, int flags, unsigned int cmd, @@ -677,7 +682,7 @@ xfs_ioc_fsgeometry( STATIC int xfs_ioc_xattr( - bhv_vnode_t *vp, + vnode_t *vp, xfs_inode_t *ip, struct file *filp, unsigned int cmd, @@ -706,7 +711,7 @@ xfs_ioctl( void __user *arg) { int error; - bhv_vnode_t *vp; + vnode_t *vp; xfs_inode_t *ip; xfs_mount_t *mp; @@ -957,7 +962,7 @@ xfs_ioctl( STATIC int xfs_ioc_space( bhv_desc_t *bdp, - bhv_vnode_t *vp, + vnode_t *vp, struct file *filp, int ioflags, unsigned int cmd, @@ -1154,14 +1159,14 @@ xfs_di2lxflags( STATIC int xfs_ioc_xattr( - bhv_vnode_t *vp, + vnode_t *vp, xfs_inode_t *ip, struct file *filp, unsigned int cmd, void __user *arg) { struct fsxattr fa; - struct bhv_vattr *vattr; + struct vattr *vattr; int error = 0; int attr_flags; unsigned int flags; @@ -1174,7 +1179,7 @@ xfs_ioc_xattr( case XFS_IOC_FSGETXATTR: { vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ XFS_AT_NEXTENTS | XFS_AT_PROJID; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + VOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { error = -error; break; @@ -1207,7 +1212,7 @@ xfs_ioc_xattr( vattr->va_extsize = fa.fsx_extsize; vattr->va_projid = fa.fsx_projid; - error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); + VOP_SETATTR(vp, vattr, attr_flags, NULL, error); if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ error = -error; @@ -1217,7 +1222,7 @@ xfs_ioc_xattr( case XFS_IOC_FSGETXATTRA: { vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ XFS_AT_ANEXTENTS | XFS_AT_PROJID; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + VOP_GETATTR(vp, vattr, 0, NULL, error); if (unlikely(error)) { error = -error; break; @@ -1263,7 +1268,7 @@ xfs_ioc_xattr( vattr->va_xflags = xfs_merge_ioc_xflags(flags, xfs_ip2xflags(ip)); - error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); + VOP_SETATTR(vp, vattr, attr_flags, NULL, error); if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ error = -error; diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 270db0f38..251bfe451 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c @@ -15,6 +15,7 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -113,7 +114,7 @@ xfs_compat_ioctl( unsigned long arg) { struct inode *inode = file->f_dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); int error; switch (cmd) { @@ -192,7 +193,7 @@ xfs_compat_ioctl( return -ENOIOCTLCMD; } - error = bhv_vop_ioctl(vp, inode, file, mode, cmd, (void __user *)arg); + VOP_IOCTL(vp, inode, file, mode, cmd, (void __user *)arg, error); VMODIFY(vp); return error; diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 1e7ec5df3..a9a289b25 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -60,7 +62,7 @@ */ xfs_inode_t * xfs_vtoi( - bhv_vnode_t *vp) + struct vnode *vp) { bhv_desc_t *bdp; @@ -79,7 +81,7 @@ void xfs_synchronize_atime( xfs_inode_t *ip) { - bhv_vnode_t *vp; + vnode_t *vp; vp = XFS_ITOV_NULL(ip); if (vp) { @@ -199,10 +201,14 @@ xfs_ichgtime_fast( STATIC void xfs_validate_fields( struct inode *ip, - bhv_vattr_t *vattr) + struct vattr *vattr) { + vnode_t *vp = vn_from_inode(ip); + int error; + vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; - if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) { + VOP_GETATTR(vp, vattr, ATTR_LAZY, NULL, error); + if (likely(!error)) { ip->i_nlink = vattr->va_nlink; ip->i_blocks = vattr->va_nblocks; @@ -220,7 +226,7 @@ xfs_validate_fields( */ STATIC int xfs_init_security( - bhv_vnode_t *vp, + struct vnode *vp, struct inode *dir) { struct inode *ip = vn_to_inode(vp); @@ -236,7 +242,7 @@ xfs_init_security( return -error; } - error = bhv_vop_attr_set(vp, name, value, length, ATTR_SECURE, NULL); + VOP_ATTR_SET(vp, name, value, length, ATTR_SECURE, NULL, error); if (!error) VMODIFY(vp); @@ -259,12 +265,13 @@ xfs_has_fs_struct(struct task_struct *task) STATIC inline void xfs_cleanup_inode( - bhv_vnode_t *dvp, - bhv_vnode_t *vp, + vnode_t *dvp, + vnode_t *vp, struct dentry *dentry, int mode) { struct dentry teardown = {}; + int error; /* Oh, the horror. * If we can't add the ACL or we fail in @@ -275,9 +282,9 @@ xfs_cleanup_inode( teardown.d_name = dentry->d_name; if (S_ISDIR(mode)) - bhv_vop_rmdir(dvp, &teardown, NULL); + VOP_RMDIR(dvp, &teardown, NULL, error); else - bhv_vop_remove(dvp, &teardown, NULL); + VOP_REMOVE(dvp, &teardown, NULL, error); VN_RELE(vp); } @@ -289,8 +296,8 @@ xfs_vn_mknod( dev_t rdev) { struct inode *ip; - bhv_vattr_t vattr = { 0 }; - bhv_vnode_t *vp = NULL, *dvp = vn_from_inode(dir); + vattr_t vattr = { 0 }; + vnode_t *vp = NULL, *dvp = vn_from_inode(dir); xfs_acl_t *default_acl = NULL; attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS; int error; @@ -324,10 +331,10 @@ xfs_vn_mknod( vattr.va_mask |= XFS_AT_RDEV; /*FALLTHROUGH*/ case S_IFREG: - error = bhv_vop_create(dvp, dentry, &vattr, &vp, NULL); + VOP_CREATE(dvp, dentry, &vattr, &vp, NULL, error); break; case S_IFDIR: - error = bhv_vop_mkdir(dvp, dentry, &vattr, &vp, NULL); + VOP_MKDIR(dvp, dentry, &vattr, &vp, NULL, error); break; default: error = EINVAL; @@ -390,14 +397,14 @@ xfs_vn_lookup( struct dentry *dentry, struct nameidata *nd) { - bhv_vnode_t *vp = vn_from_inode(dir), *cvp; + struct vnode *vp = vn_from_inode(dir), *cvp; int error; if (dentry->d_name.len >= MAXNAMELEN) return ERR_PTR(-ENAMETOOLONG); - error = bhv_vop_lookup(vp, dentry, &cvp, 0, NULL, NULL); - if (unlikely(error)) { + VOP_LOOKUP(vp, dentry, &cvp, 0, NULL, NULL, error); + if (error) { if (unlikely(error != ENOENT)) return ERR_PTR(-error); d_add(dentry, NULL); @@ -415,21 +422,22 @@ xfs_vn_link( struct dentry *dentry) { struct inode *ip; /* inode of guy being linked to */ - bhv_vnode_t *tdvp; /* target directory for new name/link */ - bhv_vnode_t *vp; /* vp of name being linked */ - bhv_vattr_t vattr; + vnode_t *tdvp; /* target directory for new name/link */ + vnode_t *vp; /* vp of name being linked */ + vattr_t vattr; int error; ip = old_dentry->d_inode; /* inode being linked to */ + if (S_ISDIR(ip->i_mode)) + return -EPERM; + tdvp = vn_from_inode(dir); vp = vn_from_inode(ip); - VN_HOLD(vp); - error = bhv_vop_link(tdvp, vp, dentry, NULL); - if (unlikely(error)) { - VN_RELE(vp); - } else { + VOP_LINK(tdvp, vp, dentry, NULL, error); + if (likely(!error)) { VMODIFY(tdvp); + VN_HOLD(vp); xfs_validate_fields(ip, &vattr); d_instantiate(dentry, ip); } @@ -442,14 +450,14 @@ xfs_vn_unlink( struct dentry *dentry) { struct inode *inode; - bhv_vnode_t *dvp; /* directory containing name to remove */ - bhv_vattr_t vattr; + vnode_t *dvp; /* directory containing name to remove */ + vattr_t vattr; int error; inode = dentry->d_inode; dvp = vn_from_inode(dir); - error = bhv_vop_remove(dvp, dentry, NULL); + VOP_REMOVE(dvp, dentry, NULL, error); if (likely(!error)) { xfs_validate_fields(dir, &vattr); /* size needs update */ xfs_validate_fields(inode, &vattr); @@ -464,26 +472,27 @@ xfs_vn_symlink( const char *symname) { struct inode *ip; - bhv_vattr_t va = { 0 }; - bhv_vnode_t *dvp; /* directory containing name of symlink */ - bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */ + vattr_t vattr = { 0 }; + vnode_t *dvp; /* directory containing name of symlink */ + vnode_t *cvp; /* used to lookup symlink to put in dentry */ int error; dvp = vn_from_inode(dir); cvp = NULL; - va.va_mode = S_IFLNK | + vattr.va_mode = S_IFLNK | (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); - va.va_mask = XFS_AT_TYPE|XFS_AT_MODE; + vattr.va_mask = XFS_AT_TYPE|XFS_AT_MODE; - error = bhv_vop_symlink(dvp, dentry, &va, (char *)symname, &cvp, NULL); + error = 0; + VOP_SYMLINK(dvp, dentry, &vattr, (char *)symname, &cvp, NULL, error); if (likely(!error && cvp)) { error = xfs_init_security(cvp, dir); if (likely(!error)) { ip = vn_to_inode(cvp); d_instantiate(dentry, ip); - xfs_validate_fields(dir, &va); - xfs_validate_fields(ip, &va); + xfs_validate_fields(dir, &vattr); + xfs_validate_fields(ip, &vattr); } else { xfs_cleanup_inode(dvp, cvp, dentry, 0); } @@ -497,11 +506,11 @@ xfs_vn_rmdir( struct dentry *dentry) { struct inode *inode = dentry->d_inode; - bhv_vnode_t *dvp = vn_from_inode(dir); - bhv_vattr_t vattr; + vnode_t *dvp = vn_from_inode(dir); + vattr_t vattr; int error; - error = bhv_vop_rmdir(dvp, dentry, NULL); + VOP_RMDIR(dvp, dentry, NULL, error); if (likely(!error)) { xfs_validate_fields(inode, &vattr); xfs_validate_fields(dir, &vattr); @@ -517,15 +526,15 @@ xfs_vn_rename( struct dentry *ndentry) { struct inode *new_inode = ndentry->d_inode; - bhv_vnode_t *fvp; /* from directory */ - bhv_vnode_t *tvp; /* target directory */ - bhv_vattr_t vattr; + vnode_t *fvp; /* from directory */ + vnode_t *tvp; /* target directory */ + vattr_t vattr; int error; fvp = vn_from_inode(odir); tvp = vn_from_inode(ndir); - error = bhv_vop_rename(fvp, odentry, tvp, ndentry, NULL); + VOP_RENAME(fvp, odentry, tvp, ndentry, NULL, error); if (likely(!error)) { if (new_inode) xfs_validate_fields(new_inode, &vattr); @@ -546,7 +555,7 @@ xfs_vn_follow_link( struct dentry *dentry, struct nameidata *nd) { - bhv_vnode_t *vp; + vnode_t *vp; uio_t *uio; iovec_t iov; int error; @@ -579,8 +588,8 @@ xfs_vn_follow_link( uio->uio_resid = MAXPATHLEN; uio->uio_iovcnt = 1; - error = bhv_vop_readlink(vp, uio, 0, NULL); - if (unlikely(error)) { + VOP_READLINK(vp, uio, 0, NULL, error); + if (error) { kfree(link); link = ERR_PTR(-error); } else { @@ -611,7 +620,12 @@ xfs_vn_permission( int mode, struct nameidata *nd) { - return -bhv_vop_access(vn_from_inode(inode), mode << 6, NULL); + vnode_t *vp = vn_from_inode(inode); + int error; + + mode <<= 6; /* convert from linux to vnode access bits */ + VOP_ACCESS(vp, mode, NULL, error); + return -error; } #else #define xfs_vn_permission NULL @@ -624,29 +638,14 @@ xfs_vn_getattr( struct kstat *stat) { struct inode *inode = dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); - bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT }; - int error; + vnode_t *vp = vn_from_inode(inode); + int error = 0; - error = bhv_vop_getattr(vp, &vattr, ATTR_LAZY, NULL); - if (likely(!error)) { - stat->size = i_size_read(inode); - stat->dev = inode->i_sb->s_dev; - stat->rdev = (vattr.va_rdev == 0) ? 0 : - MKDEV(sysv_major(vattr.va_rdev) & 0x1ff, - sysv_minor(vattr.va_rdev)); - stat->mode = vattr.va_mode; - stat->nlink = vattr.va_nlink; - stat->uid = vattr.va_uid; - stat->gid = vattr.va_gid; - stat->ino = vattr.va_nodeid; - stat->atime = vattr.va_atime; - stat->mtime = vattr.va_mtime; - stat->ctime = vattr.va_ctime; - stat->blocks = vattr.va_nblocks; - stat->blksize = vattr.va_blocksize; - } - return -error; + if (unlikely(vp->v_flag & VMODIFIED)) + error = vn_revalidate(vp); + if (!error) + generic_fillattr(inode, stat); + return 0; } STATIC int @@ -656,8 +655,8 @@ xfs_vn_setattr( { struct inode *inode = dentry->d_inode; unsigned int ia_valid = attr->ia_valid; - bhv_vnode_t *vp = vn_from_inode(inode); - bhv_vattr_t vattr = { 0 }; + vnode_t *vp = vn_from_inode(inode); + vattr_t vattr = { 0 }; int flags = 0; int error; @@ -708,7 +707,7 @@ xfs_vn_setattr( flags |= ATTR_NONBLOCK; #endif - error = bhv_vop_setattr(vp, &vattr, flags, NULL); + VOP_SETATTR(vp, &vattr, flags, NULL, error); if (likely(!error)) __vn_revalidate(vp, &vattr); return -error; @@ -725,16 +724,15 @@ STATIC int xfs_vn_sync_flags(struct inode *inode) { unsigned int oldflags, newflags; + vattr_t vattr; int flags = 0; int error; - bhv_vattr_t vattr; - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); - memset(&vattr, 0, sizeof vattr); + memset(&vattr, 0, sizeof(vattr_t)); vattr.va_mask = XFS_AT_XFLAGS; - error = bhv_vop_getattr(vp, &vattr, 0, NULL); - + VOP_GETATTR(vp, &vattr, 0, NULL, error); if (error) return error; oldflags = vattr.va_xflags; @@ -751,7 +749,7 @@ xfs_vn_sync_flags(struct inode *inode) if (oldflags ^ newflags) { vattr.va_xflags = newflags; vattr.va_mask |= XFS_AT_XFLAGS; - error = bhv_vop_setattr(vp, &vattr, flags, NULL); + VOP_SETATTR(vp, &vattr, flags, NULL, error); } vn_revalidate(vp); return error; @@ -765,7 +763,7 @@ xfs_vn_setxattr( size_t size, int flags) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); + vnode_t *vp = vn_from_inode(dentry->d_inode); char *attr = (char *)name; attrnames_t *namesp; int xflags = 0; @@ -795,7 +793,7 @@ xfs_vn_getxattr( void *data, size_t size) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); + vnode_t *vp = vn_from_inode(dentry->d_inode); char *attr = (char *)name; attrnames_t *namesp; int xflags = 0; @@ -824,7 +822,7 @@ xfs_vn_listxattr( char *data, size_t size) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); + vnode_t *vp = vn_from_inode(dentry->d_inode); int error, xflags = ATTR_KERNAMELS; ssize_t result; @@ -843,7 +841,7 @@ xfs_vn_removexattr( struct dentry *dentry, const char *name) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); + vnode_t *vp = vn_from_inode(dentry->d_inode); char *attr = (char *)name; attrnames_t *namesp; int xflags = 0; diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index bf9f7b6e3..39e014c94 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -19,6 +19,7 @@ #define __XFS_LINUX__ #include +#include /* * Some types are conditional depending on the target system. @@ -133,20 +134,15 @@ BUFFER_FNS(PrivateStart, unwritten); #define xfs_buf_age_centisecs xfs_params.xfs_buf_age.val #define xfs_inherit_nosymlinks xfs_params.inherit_nosym.val #define xfs_rotorstep xfs_params.rotorstep.val -#define xfs_inherit_nodefrag xfs_params.inherit_nodfrg.val -#define current_cpu() (raw_smp_processor_id()) +#ifndef raw_smp_processor_id +#define raw_smp_processor_id() smp_processor_id() +#endif +#define current_cpu() raw_smp_processor_id() #define current_pid() (current->pid) #define current_fsuid(cred) (current->fsuid) #define current_fsgid(cred) (current->fsgid) #define current_fsxid(cred,vp) (vx_current_fsxid(vn_to_inode(vp)->i_sb)) -#define current_test_flags(f) (current->flags & (f)) -#define current_set_flags_nested(sp, f) \ - (*(sp) = current->flags, current->flags |= (f)) -#define current_clear_flags_nested(sp, f) \ - (*(sp) = current->flags, current->flags &= ~(f)) -#define current_restore_flags_nested(sp, f) \ - (current->flags = ((current->flags & ~(f)) | (*(sp) & (f)))) #define NBPP PAGE_SIZE #define DPPSHFT (PAGE_SHIFT - 9) @@ -192,9 +188,25 @@ BUFFER_FNS(PrivateStart, unwritten); /* bytes to clicks */ #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) +#ifndef ENOATTR #define ENOATTR ENODATA /* Attribute not found */ -#define EWRONGFS EINVAL /* Mount with wrong filesystem type */ -#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ +#endif + +/* Note: EWRONGFS never visible outside the kernel */ +#define EWRONGFS EINVAL /* Mount with wrong filesystem type */ + +/* + * XXX EFSCORRUPTED needs a real value in errno.h. asm-i386/errno.h won't + * return codes out of its known range in errno. + * XXX Also note: needs to be < 1000 and fairly unique on Linux (mustn't + * conflict with any code we use already or any code a driver may use) + * XXX Some options (currently we do #2): + * 1/ New error code ["Filesystem is corrupted", _after_ glibc updated] + * 2/ 990 ["Unknown error 990"] + * 3/ EUCLEAN ["Structure needs cleaning"] + * 4/ Convert EFSCORRUPTED to EIO [just prior to return into userspace] + */ +#define EFSCORRUPTED 990 /* Filesystem is corrupted */ #define SYNCHRONIZE() barrier() #define __return_address __builtin_return_address(0) @@ -216,6 +228,7 @@ BUFFER_FNS(PrivateStart, unwritten); #define MIN(a,b) (min(a,b)) #define MAX(a,b) (max(a,b)) #define howmany(x, y) (((x)+((y)-1))/(y)) +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* * Various platform dependent calls that don't fit anywhere else diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index ee788b1cb..67efe3308 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -204,7 +206,7 @@ xfs_read( xfs_fsize_t n; xfs_inode_t *ip; xfs_mount_t *mp; - bhv_vnode_t *vp; + vnode_t *vp; unsigned long seg; ip = XFS_BHVTOI(bdp); @@ -256,7 +258,7 @@ xfs_read( if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { - bhv_vrwlock_t locktype = VRWLOCK_READ; + vrwlock_t locktype = VRWLOCK_READ; int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, @@ -264,19 +266,14 @@ xfs_read( dmflags, &locktype); if (ret) { xfs_iunlock(ip, XFS_IOLOCK_SHARED); - if (unlikely(ioflags & IO_ISDIRECT)) - mutex_unlock(&inode->i_mutex); - return ret; + goto unlock_mutex; } } if (unlikely((ioflags & IO_ISDIRECT) && VN_CACHED(vp))) - bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), + VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(*offset)), -1, FI_REMAPF_LOCKED); - if (unlikely(ioflags & IO_ISDIRECT)) - mutex_unlock(&inode->i_mutex); - xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore, (void *)iovp, segs, *offset, ioflags); ret = __generic_file_aio_read(iocb, iovp, segs, offset); @@ -286,6 +283,10 @@ xfs_read( XFS_STATS_ADD(xs_read_bytes, ret); xfs_iunlock(ip, XFS_IOLOCK_SHARED); + +unlock_mutex: + if (unlikely(ioflags & IO_ISDIRECT)) + mutex_unlock(&inode->i_mutex); return ret; } @@ -312,7 +313,7 @@ xfs_sendfile( if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && (!(ioflags & IO_INVIS))) { - bhv_vrwlock_t locktype = VRWLOCK_READ; + vrwlock_t locktype = VRWLOCK_READ; int error; error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), @@ -356,7 +357,7 @@ xfs_splice_read( if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && (!(ioflags & IO_INVIS))) { - bhv_vrwlock_t locktype = VRWLOCK_READ; + vrwlock_t locktype = VRWLOCK_READ; int error; error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), @@ -391,8 +392,6 @@ xfs_splice_write( xfs_inode_t *ip = XFS_BHVTOI(bdp); xfs_mount_t *mp = ip->i_mount; ssize_t ret; - struct inode *inode = outfilp->f_mapping->host; - xfs_fsize_t isize; XFS_STATS_INC(xs_write_calls); if (XFS_FORCED_SHUTDOWN(ip->i_mount)) @@ -402,7 +401,7 @@ xfs_splice_write( if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) && (!(ioflags & IO_INVIS))) { - bhv_vrwlock_t locktype = VRWLOCK_WRITE; + vrwlock_t locktype = VRWLOCK_WRITE; int error; error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp), @@ -419,20 +418,6 @@ xfs_splice_write( if (ret > 0) XFS_STATS_ADD(xs_write_bytes, ret); - isize = i_size_read(inode); - if (unlikely(ret < 0 && ret != -EFAULT && *ppos > isize)) - *ppos = isize; - - if (*ppos > ip->i_d.di_size) { - xfs_ilock(ip, XFS_ILOCK_EXCL); - if (*ppos > ip->i_d.di_size) { - ip->i_d.di_size = *ppos; - i_size_write(inode, *ppos); - ip->i_update_core = 1; - ip->i_update_size = 1; - } - xfs_iunlock(ip, XFS_ILOCK_EXCL); - } xfs_iunlock(ip, XFS_IOLOCK_EXCL); return ret; } @@ -473,7 +458,7 @@ xfs_zero_last_block( last_fsb = XFS_B_TO_FSBT(mp, isize); nimaps = 1; error = XFS_BMAPI(mp, NULL, io, last_fsb, 1, 0, NULL, 0, &imap, - &nimaps, NULL, NULL); + &nimaps, NULL); if (error) { return error; } @@ -514,7 +499,7 @@ xfs_zero_last_block( int /* error (positive) */ xfs_zero_eof( - bhv_vnode_t *vp, + vnode_t *vp, xfs_iocore_t *io, xfs_off_t offset, /* starting I/O offset */ xfs_fsize_t isize, /* current inode size */ @@ -525,6 +510,7 @@ xfs_zero_eof( xfs_fileoff_t end_zero_fsb; xfs_fileoff_t zero_count_fsb; xfs_fileoff_t last_fsb; + xfs_extlen_t buf_len_fsb; xfs_mount_t *mp = io->io_mount; int nimaps; int error = 0; @@ -570,7 +556,7 @@ xfs_zero_eof( nimaps = 1; zero_count_fsb = end_zero_fsb - start_zero_fsb + 1; error = XFS_BMAPI(mp, NULL, io, start_zero_fsb, zero_count_fsb, - 0, NULL, 0, &imap, &nimaps, NULL, NULL); + 0, NULL, 0, &imap, &nimaps, NULL); if (error) { ASSERT(ismrlocked(io->io_lock, MR_UPDATE)); ASSERT(ismrlocked(io->io_iolock, MR_UPDATE)); @@ -593,7 +579,16 @@ xfs_zero_eof( } /* - * There are blocks we need to zero. + * There are blocks in the range requested. + * Zero them a single write at a time. We actually + * don't zero the entire range returned if it is + * too big and simply loop around to get the rest. + * That is not the most efficient thing to do, but it + * is simple and this path should not be exercised often. + */ + buf_len_fsb = XFS_FILBLKS_MIN(imap.br_blockcount, + mp->m_writeio_blocks << 8); + /* * Drop the inode lock while we're doing the I/O. * We'll still have the iolock to protect us. */ @@ -601,13 +596,14 @@ xfs_zero_eof( error = xfs_iozero(ip, XFS_FSB_TO_B(mp, start_zero_fsb), - XFS_FSB_TO_B(mp, imap.br_blockcount), + XFS_FSB_TO_B(mp, buf_len_fsb), end_size); + if (error) { goto out_lock; } - start_zero_fsb = imap.br_startoff + imap.br_blockcount; + start_zero_fsb = imap.br_startoff + buf_len_fsb; ASSERT(start_zero_fsb <= (end_zero_fsb + 1)); XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD); @@ -641,11 +637,11 @@ xfs_write( ssize_t ret = 0, error = 0; xfs_fsize_t isize, new_size; xfs_iocore_t *io; - bhv_vnode_t *vp; + vnode_t *vp; unsigned long seg; int iolock; int eventsent = 0; - bhv_vrwlock_t locktype; + vrwlock_t locktype; size_t ocount = 0, count; loff_t pos; int need_i_mutex = 1, need_flush = 0; @@ -683,11 +679,11 @@ xfs_write( io = &xip->i_iocore; mp = io->io_mount; - vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE); - if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; + fs_check_frozen(vp->v_vfsp, SB_FREEZE_WRITE); + if (ioflags & IO_ISDIRECT) { xfs_buftarg_t *target = (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? @@ -818,7 +814,7 @@ retry: if (need_flush) { xfs_inval_cached_trace(io, pos, -1, ctooff(offtoct(pos)), -1); - bhv_vop_flushinval_pages(vp, ctooff(offtoct(pos)), + VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(pos)), -1, FI_REMAPF_LOCKED); } @@ -907,9 +903,79 @@ retry: /* Handle various SYNC-type writes */ if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { - error = xfs_write_sync_logforce(mp, xip); - if (error) - goto out_unlock_internal; + /* + * If we're treating this as O_DSYNC and we have not updated the + * size, force the log. + */ + if (!(mp->m_flags & XFS_MOUNT_OSYNCISOSYNC) && + !(xip->i_update_size)) { + xfs_inode_log_item_t *iip = xip->i_itemp; + + /* + * If an allocation transaction occurred + * without extending the size, then we have to force + * the log up the proper point to ensure that the + * allocation is permanent. We can't count on + * the fact that buffered writes lock out direct I/O + * writes - the direct I/O write could have extended + * the size nontransactionally, then finished before + * we started. xfs_write_file will think that the file + * didn't grow but the update isn't safe unless the + * size change is logged. + * + * Force the log if we've committed a transaction + * against the inode or if someone else has and + * the commit record hasn't gone to disk (e.g. + * the inode is pinned). This guarantees that + * all changes affecting the inode are permanent + * when we return. + */ + if (iip && iip->ili_last_lsn) { + xfs_log_force(mp, iip->ili_last_lsn, + XFS_LOG_FORCE | XFS_LOG_SYNC); + } else if (xfs_ipincount(xip) > 0) { + xfs_log_force(mp, (xfs_lsn_t)0, + XFS_LOG_FORCE | XFS_LOG_SYNC); + } + + } else { + xfs_trans_t *tp; + + /* + * O_SYNC or O_DSYNC _with_ a size update are handled + * the same way. + * + * If the write was synchronous then we need to make + * sure that the inode modification time is permanent. + * We'll have updated the timestamp above, so here + * we use a synchronous transaction to log the inode. + * It's not fast, but it's necessary. + * + * If this a dsync write and the size got changed + * non-transactionally, then we need to ensure that + * the size change gets logged in a synchronous + * transaction. + */ + + tp = xfs_trans_alloc(mp, XFS_TRANS_WRITE_SYNC); + if ((error = xfs_trans_reserve(tp, 0, + XFS_SWRITE_LOG_RES(mp), + 0, 0, 0))) { + /* Transaction reserve failed */ + xfs_trans_cancel(tp, 0); + } else { + /* Transaction reserve successful */ + xfs_ilock(xip, XFS_ILOCK_EXCL); + xfs_trans_ijoin(tp, xip, XFS_ILOCK_EXCL); + xfs_trans_ihold(tp, xip); + xfs_trans_log_inode(tp, xip, XFS_ILOG_CORE); + xfs_trans_set_sync(tp); + error = xfs_trans_commit(tp, 0, NULL); + xfs_iunlock(xip, XFS_ILOCK_EXCL); + } + if (error) + goto out_unlock_internal; + } xfs_rwunlock(bdp, locktype); if (need_i_mutex) diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index c77e62efb..8f4539952 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h @@ -18,8 +18,8 @@ #ifndef __XFS_LRW_H__ #define __XFS_LRW_H__ +struct vnode; struct bhv_desc; -struct bhv_vnode; struct xfs_mount; struct xfs_iocore; struct xfs_inode; @@ -49,7 +49,7 @@ struct xfs_iomap; #define XFS_CTRUNC4 14 #define XFS_CTRUNC5 15 #define XFS_CTRUNC6 16 -#define XFS_BUNMAP 17 +#define XFS_BUNMAPI 17 #define XFS_INVAL_CACHED 18 #define XFS_DIORD_ENTER 19 #define XFS_DIOWR_ENTER 20 @@ -82,7 +82,7 @@ extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *); extern int xfs_bdstrat_cb(struct xfs_buf *); extern int xfs_dev_is_read_only(struct xfs_mount *, char *); -extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t, +extern int xfs_zero_eof(struct vnode *, struct xfs_iocore *, xfs_off_t, xfs_fsize_t, xfs_fsize_t); extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *, const struct iovec *, unsigned int, diff --git a/fs/xfs/linux-2.6/xfs_stats.c b/fs/xfs/linux-2.6/xfs_stats.c index e480b6102..1f0589a05 100644 --- a/fs/xfs/linux-2.6/xfs_stats.c +++ b/fs/xfs/linux-2.6/xfs_stats.c @@ -62,7 +62,7 @@ xfs_read_xfsstats( while (j < xstats[i].endpoint) { val = 0; /* sum over all cpus */ - for_each_possible_cpu(c) + for_each_cpu(c) val += *(((__u32*)&per_cpu(xfsstats, c) + j)); len += sprintf(buffer + len, " %u", val); j++; @@ -70,7 +70,7 @@ xfs_read_xfsstats( buffer[len++] = '\n'; } /* extra precision counters */ - for_each_possible_cpu(i) { + for_each_cpu(i) { xs_xstrat_bytes += per_cpu(xfsstats, i).xs_xstrat_bytes; xs_write_bytes += per_cpu(xfsstats, i).xs_write_bytes; xs_read_bytes += per_cpu(xfsstats, i).xs_read_bytes; diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 49c220dab..4a79c7f2d 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -149,7 +151,7 @@ xfs_set_inodeops( STATIC __inline__ void xfs_revalidate_inode( xfs_mount_t *mp, - bhv_vnode_t *vp, + vnode_t *vp, xfs_inode_t *ip) { struct inode *inode = vn_to_inode(vp); @@ -172,6 +174,7 @@ xfs_revalidate_inode( break; } + inode->i_blksize = xfs_preferred_iosize(mp); inode->i_generation = ip->i_d.di_gen; i_size_write(inode, ip->i_d.di_size); inode->i_blocks = @@ -212,7 +215,7 @@ xfs_revalidate_inode( void xfs_initialize_vnode( bhv_desc_t *bdp, - bhv_vnode_t *vp, + vnode_t *vp, bhv_desc_t *inode_bhv, int unlock) { @@ -322,13 +325,6 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp) return; } - if (xfs_readonly_buftarg(mp->m_ddev_targp)) { - xfs_fs_cmn_err(CE_NOTE, mp, - "Disabling barriers, underlying device is readonly"); - mp->m_flags &= ~XFS_MOUNT_BARRIER; - return; - } - error = xfs_barrier_test(mp); if (error) { xfs_fs_cmn_err(CE_NOTE, mp, @@ -349,7 +345,7 @@ STATIC struct inode * xfs_fs_alloc_inode( struct super_block *sb) { - bhv_vnode_t *vp; + vnode_t *vp; vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); if (unlikely(!vp)) @@ -372,13 +368,13 @@ xfs_fs_inode_init_once( { if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == SLAB_CTOR_CONSTRUCTOR) - inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); + inode_init_once(vn_to_inode((vnode_t *)vnode)); } STATIC int xfs_init_zones(void) { - xfs_vnode_zone = kmem_zone_init_flags(sizeof(bhv_vnode_t), "xfs_vnode", + xfs_vnode_zone = kmem_zone_init_flags(sizeof(vnode_t), "xfs_vnode_t", KM_ZONE_HWALIGN | KM_ZONE_RECLAIM | KM_ZONE_SPREAD, xfs_fs_inode_init_once); @@ -422,17 +418,22 @@ xfs_fs_write_inode( struct inode *inode, int sync) { - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); int error = 0, flags = FLUSH_INODE; if (vp) { vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); if (sync) flags |= FLUSH_SYNC; - error = bhv_vop_iflush(vp, flags); - if (error == EAGAIN) - error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0; + VOP_IFLUSH(vp, flags, error); + if (error == EAGAIN) { + if (sync) + VOP_IFLUSH(vp, flags | FLUSH_LOG, error); + else + error = 0; + } } + return -error; } @@ -440,7 +441,8 @@ STATIC void xfs_fs_clear_inode( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); + vnode_t *vp = vn_from_inode(inode); + int error, cache; vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -453,18 +455,20 @@ xfs_fs_clear_inode( * This can happen because xfs_iget_core calls xfs_idestroy if we * find an inode with di_mode == 0 but without IGET_CREATE set. */ - if (VNHEAD(vp)) - bhv_vop_inactive(vp, NULL); + if (vp->v_fbhv) + VOP_INACTIVE(vp, NULL, cache); VN_LOCK(vp); vp->v_flag &= ~VMODIFIED; VN_UNLOCK(vp, 0); - if (VNHEAD(vp)) - if (bhv_vop_reclaim(vp)) - panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); + if (vp->v_fbhv) { + VOP_RECLAIM(vp, error); + if (error) + panic("vn_purge: cannot reclaim"); + } - ASSERT(VNHEAD(vp) == NULL); + ASSERT(vp->v_fbhv == NULL); #ifdef XFS_VNODE_TRACE ktrace_free(vp->v_trace); @@ -480,13 +484,13 @@ xfs_fs_clear_inode( */ STATIC void xfs_syncd_queue_work( - struct bhv_vfs *vfs, + struct vfs *vfs, void *data, - void (*syncer)(bhv_vfs_t *, void *)) + void (*syncer)(vfs_t *, void *)) { - struct bhv_vfs_sync_work *work; + vfs_sync_work_t *work; - work = kmem_alloc(sizeof(struct bhv_vfs_sync_work), KM_SLEEP); + work = kmem_alloc(sizeof(struct vfs_sync_work), KM_SLEEP); INIT_LIST_HEAD(&work->w_list); work->w_syncer = syncer; work->w_data = data; @@ -505,7 +509,7 @@ xfs_syncd_queue_work( */ STATIC void xfs_flush_inode_work( - bhv_vfs_t *vfs, + vfs_t *vfs, void *inode) { filemap_flush(((struct inode *)inode)->i_mapping); @@ -517,7 +521,7 @@ xfs_flush_inode( xfs_inode_t *ip) { struct inode *inode = vn_to_inode(XFS_ITOV(ip)); - struct bhv_vfs *vfs = XFS_MTOVFS(ip->i_mount); + struct vfs *vfs = XFS_MTOVFS(ip->i_mount); igrab(inode); xfs_syncd_queue_work(vfs, inode, xfs_flush_inode_work); @@ -530,7 +534,7 @@ xfs_flush_inode( */ STATIC void xfs_flush_device_work( - bhv_vfs_t *vfs, + vfs_t *vfs, void *inode) { sync_blockdev(vfs->vfs_super->s_bdev); @@ -542,7 +546,7 @@ xfs_flush_device( xfs_inode_t *ip) { struct inode *inode = vn_to_inode(XFS_ITOV(ip)); - struct bhv_vfs *vfs = XFS_MTOVFS(ip->i_mount); + struct vfs *vfs = XFS_MTOVFS(ip->i_mount); igrab(inode); xfs_syncd_queue_work(vfs, inode, xfs_flush_device_work); @@ -550,16 +554,16 @@ xfs_flush_device( xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC); } +#define SYNCD_FLAGS (SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR|SYNC_REFCACHE) STATIC void vfs_sync_worker( - bhv_vfs_t *vfsp, + vfs_t *vfsp, void *unused) { int error; if (!(vfsp->vfs_flag & VFS_RDONLY)) - error = bhv_vfs_sync(vfsp, SYNC_FSDATA | SYNC_BDFLUSH | \ - SYNC_ATTR | SYNC_REFCACHE, NULL); + VFS_SYNC(vfsp, SYNCD_FLAGS, NULL, error); vfsp->vfs_sync_seq++; wmb(); wake_up(&vfsp->vfs_wait_single_sync_task); @@ -570,8 +574,8 @@ xfssyncd( void *arg) { long timeleft; - bhv_vfs_t *vfsp = (bhv_vfs_t *) arg; - bhv_vfs_sync_work_t *work, *n; + vfs_t *vfsp = (vfs_t *) arg; + struct vfs_sync_work *work, *n; LIST_HEAD (tmp); timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); @@ -605,7 +609,7 @@ xfssyncd( list_del(&work->w_list); if (work == &vfsp->vfs_sync_work) continue; - kmem_free(work, sizeof(struct bhv_vfs_sync_work)); + kmem_free(work, sizeof(struct vfs_sync_work)); } } @@ -614,7 +618,7 @@ xfssyncd( STATIC int xfs_fs_start_syncd( - bhv_vfs_t *vfsp) + vfs_t *vfsp) { vfsp->vfs_sync_work.w_syncer = vfs_sync_worker; vfsp->vfs_sync_work.w_vfs = vfsp; @@ -626,7 +630,7 @@ xfs_fs_start_syncd( STATIC void xfs_fs_stop_syncd( - bhv_vfs_t *vfsp) + vfs_t *vfsp) { kthread_stop(vfsp->vfs_sync_task); } @@ -635,26 +639,35 @@ STATIC void xfs_fs_put_super( struct super_block *sb) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); + vfs_t *vfsp = vfs_from_sb(sb); int error; xfs_fs_stop_syncd(vfsp); - bhv_vfs_sync(vfsp, SYNC_ATTR | SYNC_DELWRI, NULL); - error = bhv_vfs_unmount(vfsp, 0, NULL); + VFS_SYNC(vfsp, SYNC_ATTR|SYNC_DELWRI, NULL, error); + if (!error) + VFS_UNMOUNT(vfsp, 0, NULL, error); if (error) { - printk("XFS: unmount got error=%d\n", error); - printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp); - } else { - vfs_deallocate(vfsp); + printk("XFS unmount got error %d\n", error); + printk("%s: vfsp/0x%p left dangling!\n", __FUNCTION__, vfsp); + return; } + + vfs_deallocate(vfsp); } STATIC void xfs_fs_write_super( struct super_block *sb) { - if (!(sb->s_flags & MS_RDONLY)) - bhv_vfs_sync(vfs_from_sb(sb), SYNC_FSDATA, NULL); + vfs_t *vfsp = vfs_from_sb(sb); + int error; + + if (sb->s_flags & MS_RDONLY) { + sb->s_dirt = 0; /* paranoia */ + return; + } + /* Push the log and superblock a little */ + VFS_SYNC(vfsp, SYNC_FSDATA, NULL, error); sb->s_dirt = 0; } @@ -663,16 +676,16 @@ xfs_fs_sync_super( struct super_block *sb, int wait) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); - int error; - int flags; + vfs_t *vfsp = vfs_from_sb(sb); + int error; + int flags = SYNC_FSDATA; if (unlikely(sb->s_frozen == SB_FREEZE_WRITE)) flags = SYNC_QUIESCE; else flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); - error = bhv_vfs_sync(vfsp, flags, NULL); + VFS_SYNC(vfsp, flags, NULL, error); sb->s_dirt = 0; if (unlikely(laptop_mode)) { @@ -699,11 +712,14 @@ xfs_fs_sync_super( STATIC int xfs_fs_statfs( - struct dentry *dentry, + struct super_block *sb, struct kstatfs *statp) { - return -bhv_vfs_statvfs(vfs_from_sb(dentry->d_sb), statp, - vn_from_inode(dentry->d_inode)); + vfs_t *vfsp = vfs_from_sb(sb); + int error; + + VFS_STATVFS(vfsp, statp, NULL, error); + return -error; } STATIC int @@ -712,11 +728,11 @@ xfs_fs_remount( int *flags, char *options) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); + vfs_t *vfsp = vfs_from_sb(sb); struct xfs_mount_args *args = xfs_args_allocate(sb, 0); int error; - error = bhv_vfs_parseargs(vfsp, options, args, 1); + VFS_PARSEARGS(vfsp, options, args, 1, error); if ((args->flags2 & XFSMNT2_TAGXID) && !(sb->s_flags & MS_TAGXID)) { printk("XFS: %s: tagxid not permitted on remount.\n", @@ -724,7 +740,7 @@ xfs_fs_remount( error = EINVAL; } if (!error) - error = bhv_vfs_mntupdate(vfsp, flags, args); + VFS_MNTUPDATE(vfsp, flags, args, error); kmem_free(args, sizeof(*args)); return -error; } @@ -733,7 +749,7 @@ STATIC void xfs_fs_lockfs( struct super_block *sb) { - bhv_vfs_freeze(vfs_from_sb(sb)); + VFS_FREEZE(vfs_from_sb(sb)); } STATIC int @@ -741,7 +757,11 @@ xfs_fs_show_options( struct seq_file *m, struct vfsmount *mnt) { - return -bhv_vfs_showargs(vfs_from_sb(mnt->mnt_sb), m); + struct vfs *vfsp = vfs_from_sb(mnt->mnt_sb); + int error; + + VFS_SHOWARGS(vfsp, m, error); + return error; } STATIC int @@ -749,7 +769,11 @@ xfs_fs_quotasync( struct super_block *sb, int type) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), Q_XQUOTASYNC, 0, NULL); + struct vfs *vfsp = vfs_from_sb(sb); + int error; + + VFS_QUOTACTL(vfsp, Q_XQUOTASYNC, 0, (caddr_t)NULL, error); + return -error; } STATIC int @@ -757,7 +781,11 @@ xfs_fs_getxstate( struct super_block *sb, struct fs_quota_stat *fqs) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), Q_XGETQSTAT, 0, (caddr_t)fqs); + struct vfs *vfsp = vfs_from_sb(sb); + int error; + + VFS_QUOTACTL(vfsp, Q_XGETQSTAT, 0, (caddr_t)fqs, error); + return -error; } STATIC int @@ -766,7 +794,11 @@ xfs_fs_setxstate( unsigned int flags, int op) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), op, 0, (caddr_t)&flags); + struct vfs *vfsp = vfs_from_sb(sb); + int error; + + VFS_QUOTACTL(vfsp, op, 0, (caddr_t)&flags, error); + return -error; } STATIC int @@ -776,10 +808,13 @@ xfs_fs_getxquota( qid_t id, struct fs_disk_quota *fdq) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), - (type == USRQUOTA) ? Q_XGETQUOTA : - ((type == GRPQUOTA) ? Q_XGETGQUOTA : - Q_XGETPQUOTA), id, (caddr_t)fdq); + struct vfs *vfsp = vfs_from_sb(sb); + int error, getmode; + + getmode = (type == USRQUOTA) ? Q_XGETQUOTA : + ((type == GRPQUOTA) ? Q_XGETGQUOTA : Q_XGETPQUOTA); + VFS_QUOTACTL(vfsp, getmode, id, (caddr_t)fdq, error); + return -error; } STATIC int @@ -789,10 +824,13 @@ xfs_fs_setxquota( qid_t id, struct fs_disk_quota *fdq) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), - (type == USRQUOTA) ? Q_XSETQLIM : - ((type == GRPQUOTA) ? Q_XSETGQLIM : - Q_XSETPQLIM), id, (caddr_t)fdq); + struct vfs *vfsp = vfs_from_sb(sb); + int error, setmode; + + setmode = (type == USRQUOTA) ? Q_XSETQLIM : + ((type == GRPQUOTA) ? Q_XSETGQLIM : Q_XSETPQLIM); + VFS_QUOTACTL(vfsp, setmode, id, (caddr_t)fdq, error); + return -error; } STATIC int @@ -801,32 +839,34 @@ xfs_fs_fill_super( void *data, int silent) { - struct bhv_vnode *rootvp; - struct bhv_vfs *vfsp = vfs_allocate(sb); + vnode_t *rootvp; + struct vfs *vfsp = vfs_allocate(sb); struct xfs_mount_args *args = xfs_args_allocate(sb, silent); struct kstatfs statvfs; - int error; + int error, error2; bhv_insert_all_vfsops(vfsp); - error = bhv_vfs_parseargs(vfsp, (char *)data, args, 0); + VFS_PARSEARGS(vfsp, (char *)data, args, 0, error); if (error) { bhv_remove_all_vfsops(vfsp, 1); goto fail_vfsop; } sb_min_blocksize(sb, BBSIZE); +#ifdef CONFIG_XFS_EXPORT sb->s_export_op = &xfs_export_operations; +#endif sb->s_qcop = &xfs_quotactl_operations; sb->s_op = &xfs_super_operations; - error = bhv_vfs_mount(vfsp, args, NULL); + VFS_MOUNT(vfsp, args, NULL, error); if (error) { bhv_remove_all_vfsops(vfsp, 1); goto fail_vfsop; } - error = bhv_vfs_statvfs(vfsp, &statvfs, NULL); + VFS_STATVFS(vfsp, &statvfs, NULL, error); if (error) goto fail_unmount; @@ -838,7 +878,7 @@ xfs_fs_fill_super( sb->s_time_gran = 1; set_posix_acl_flag(sb); - error = bhv_vfs_root(vfsp, &rootvp); + VFS_ROOT(vfsp, &rootvp, error); if (error) goto fail_unmount; @@ -867,7 +907,7 @@ fail_vnrele: } fail_unmount: - bhv_vfs_unmount(vfsp, 0, NULL); + VFS_UNMOUNT(vfsp, 0, NULL, error2); fail_vfsop: vfs_deallocate(vfsp); @@ -875,16 +915,14 @@ fail_vfsop: return -error; } -STATIC int +STATIC struct super_block * xfs_fs_get_sb( struct file_system_type *fs_type, int flags, const char *dev_name, - void *data, - struct vfsmount *mnt) + void *data) { - return get_sb_bdev(fs_type, flags, dev_name, data, xfs_fs_fill_super, - mnt); + return get_sb_bdev(fs_type, flags, dev_name, data, xfs_fs_fill_super); } STATIC struct super_operations xfs_super_operations = { diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h index 33dd1ca13..376b96cb5 100644 --- a/fs/xfs/linux-2.6/xfs_super.h +++ b/fs/xfs/linux-2.6/xfs_super.h @@ -105,7 +105,7 @@ struct block_device; extern __uint64_t xfs_max_file_offset(unsigned int); -extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, bhv_desc_t *, int); +extern void xfs_initialize_vnode(bhv_desc_t *, vnode_t *, bhv_desc_t *, int); extern void xfs_flush_inode(struct xfs_inode *); extern void xfs_flush_device(struct xfs_inode *); diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 95ac0bede..f464bfac4 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -38,7 +38,7 @@ xfs_stats_clear_proc_handler( if (!ret && write && *valp) { printk("XFS Clearing xfsstats\n"); - for_each_possible_cpu(c) { + for_each_cpu(c) { preempt_disable(); /* save vn_active, it's a universal truth! */ vn_active = per_cpu(xfsstats, c).vn_active; @@ -120,11 +120,6 @@ STATIC ctl_table xfs_table[] = { NULL, &sysctl_intvec, NULL, &xfs_params.rotorstep.min, &xfs_params.rotorstep.max}, - {XFS_INHERIT_NODFRG, "inherit_nodefrag", &xfs_params.inherit_nodfrg.val, - sizeof(int), 0644, NULL, &proc_dointvec_minmax, - NULL, &sysctl_intvec, NULL, - &xfs_params.inherit_nodfrg.min, &xfs_params.inherit_nodfrg.max}, - /* please keep this the last entry */ #ifdef CONFIG_PROC_FS {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val, diff --git a/fs/xfs/linux-2.6/xfs_sysctl.h b/fs/xfs/linux-2.6/xfs_sysctl.h index a631fb8cc..bc8c11f13 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.h +++ b/fs/xfs/linux-2.6/xfs_sysctl.h @@ -46,7 +46,6 @@ typedef struct xfs_param { xfs_sysctl_val_t xfs_buf_age; /* Metadata buffer age before flush. */ xfs_sysctl_val_t inherit_nosym; /* Inherit the "nosymlinks" flag. */ xfs_sysctl_val_t rotorstep; /* inode32 AG rotoring control knob */ - xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */ } xfs_param_t; /* @@ -85,7 +84,6 @@ enum { /* XFS_IO_BYPASS = 18 */ XFS_INHERIT_NOSYM = 19, XFS_ROTORSTEP = 20, - XFS_INHERIT_NODFRG = 21, }; extern xfs_param_t xfs_params; diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 6145e8bd0..6f7c9f7a8 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_imap.h" #include "xfs_alloc.h" @@ -103,7 +104,7 @@ vfs_mntupdate( int vfs_root( struct bhv_desc *bdp, - struct bhv_vnode **vpp) + struct vnode **vpp) { struct bhv_desc *next = bdp; @@ -116,15 +117,15 @@ vfs_root( int vfs_statvfs( struct bhv_desc *bdp, - bhv_statvfs_t *statp, - struct bhv_vnode *vp) + xfs_statfs_t *sp, + struct vnode *vp) { struct bhv_desc *next = bdp; ASSERT(next); while (! (bhvtovfsops(next))->vfs_statvfs) next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_statvfs)(next, statp, vp)); + return ((*bhvtovfsops(next)->vfs_statvfs)(next, sp, vp)); } int @@ -144,7 +145,7 @@ vfs_sync( int vfs_vget( struct bhv_desc *bdp, - struct bhv_vnode **vpp, + struct vnode **vpp, struct fid *fidp) { struct bhv_desc *next = bdp; @@ -186,7 +187,7 @@ vfs_quotactl( void vfs_init_vnode( struct bhv_desc *bdp, - struct bhv_vnode *vp, + struct vnode *vp, struct bhv_desc *bp, int unlock) { @@ -225,13 +226,13 @@ vfs_freeze( ((*bhvtovfsops(next)->vfs_freeze)(next)); } -bhv_vfs_t * +vfs_t * vfs_allocate( struct super_block *sb) { - struct bhv_vfs *vfsp; + struct vfs *vfsp; - vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); + vfsp = kmem_zalloc(sizeof(vfs_t), KM_SLEEP); bhv_head_init(VFS_BHVHEAD(vfsp), "vfs"); INIT_LIST_HEAD(&vfsp->vfs_sync_list); spin_lock_init(&vfsp->vfs_sync_lock); @@ -246,25 +247,25 @@ vfs_allocate( return vfsp; } -bhv_vfs_t * +vfs_t * vfs_from_sb( struct super_block *sb) { - return (bhv_vfs_t *)sb->s_fs_info; + return (vfs_t *)sb->s_fs_info; } void vfs_deallocate( - struct bhv_vfs *vfsp) + struct vfs *vfsp) { bhv_head_destroy(VFS_BHVHEAD(vfsp)); - kmem_free(vfsp, sizeof(bhv_vfs_t)); + kmem_free(vfsp, sizeof(vfs_t)); } void vfs_insertops( - struct bhv_vfs *vfsp, - struct bhv_module_vfsops *vfsops) + struct vfs *vfsp, + struct bhv_vfsops *vfsops) { struct bhv_desc *bdp; @@ -275,9 +276,9 @@ vfs_insertops( void vfs_insertbhv( - struct bhv_vfs *vfsp, + struct vfs *vfsp, struct bhv_desc *bdp, - struct bhv_vfsops *vfsops, + struct vfsops *vfsops, void *mount) { bhv_desc_init(bdp, mount, vfsp, vfsops); @@ -286,7 +287,7 @@ vfs_insertbhv( void bhv_remove_vfsops( - struct bhv_vfs *vfsp, + struct vfs *vfsp, int pos) { struct bhv_desc *bhv; @@ -300,7 +301,7 @@ bhv_remove_vfsops( void bhv_remove_all_vfsops( - struct bhv_vfs *vfsp, + struct vfs *vfsp, int freebase) { struct xfs_mount *mp; @@ -316,7 +317,7 @@ bhv_remove_all_vfsops( void bhv_insert_all_vfsops( - struct bhv_vfs *vfsp) + struct vfs *vfsp) { struct xfs_mount *mp; diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h index 91fc2c4b3..841200c03 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.h +++ b/fs/xfs/linux-2.6/xfs_vfs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -21,40 +21,42 @@ #include #include "xfs_fs.h" -struct bhv_vfs; -struct bhv_vnode; - struct fid; +struct vfs; struct cred; +struct vnode; +struct kstatfs; struct seq_file; struct super_block; struct xfs_mount_args; -typedef struct kstatfs bhv_statvfs_t; +typedef struct kstatfs xfs_statfs_t; -typedef struct bhv_vfs_sync_work { +typedef struct vfs_sync_work { struct list_head w_list; - struct bhv_vfs *w_vfs; + struct vfs *w_vfs; void *w_data; /* syncer routine argument */ - void (*w_syncer)(struct bhv_vfs *, void *); -} bhv_vfs_sync_work_t; + void (*w_syncer)(struct vfs *, void *); +} vfs_sync_work_t; -typedef struct bhv_vfs { +typedef struct vfs { u_int vfs_flag; /* flags */ xfs_fsid_t vfs_fsid; /* file system ID */ xfs_fsid_t *vfs_altfsid; /* An ID fixed for life of FS */ bhv_head_t vfs_bh; /* head of vfs behavior chain */ struct super_block *vfs_super; /* generic superblock pointer */ struct task_struct *vfs_sync_task; /* generalised sync thread */ - bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ + vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ struct list_head vfs_sync_list; /* sync thread work item list */ spinlock_t vfs_sync_lock; /* work item list lock */ - int vfs_sync_seq; /* sync thread generation no. */ + int vfs_sync_seq; /* sync thread generation no. */ wait_queue_head_t vfs_wait_single_sync_task; -} bhv_vfs_t; +} vfs_t; + +#define vfs_fbhv vfs_bh.bh_first /* 1st on vfs behavior chain */ -#define bhvtovfs(bdp) ( (struct bhv_vfs *)BHV_VOBJ(bdp) ) -#define bhvtovfsops(bdp) ( (struct bhv_vfsops *)BHV_OPS(bdp) ) +#define bhvtovfs(bdp) ( (struct vfs *)BHV_VOBJ(bdp) ) +#define bhvtovfsops(bdp) ( (struct vfsops *)BHV_OPS(bdp) ) #define VFS_BHVHEAD(vfs) ( &(vfs)->vfs_bh ) #define VFS_REMOVEBHV(vfs, bdp) ( bhv_remove(VFS_BHVHEAD(vfs), bdp) ) @@ -69,7 +71,7 @@ typedef enum { VFS_BHV_QM, /* quota manager */ VFS_BHV_IO, /* IO path */ VFS_BHV_END /* housekeeping end-of-range */ -} bhv_vfs_type_t; +} vfs_bhv_t; #define VFS_POSITION_XFS (BHV_POSITION_BASE) #define VFS_POSITION_DM (VFS_POSITION_BASE+10) @@ -79,9 +81,8 @@ typedef enum { #define VFS_RDONLY 0x0001 /* read-only vfs */ #define VFS_GRPID 0x0002 /* group-ID assigned from directory */ #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ -#define VFS_UMOUNT 0x0008 /* unmount in progress */ -#define VFS_32BITINODES 0x0010 /* do not use inums above 32 bits */ -#define VFS_END 0x0010 /* max flag */ +#define VFS_32BITINODES 0x0008 /* do not use inums above 32 bits */ +#define VFS_END 0x0008 /* max flag */ #define SYNC_ATTR 0x0001 /* sync attributes */ #define SYNC_CLOSE 0x0002 /* close file system down */ @@ -91,14 +92,7 @@ typedef enum { #define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */ #define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ #define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ -#define SYNC_QUIESCE 0x0100 /* quiesce fileystem for a snapshot */ - -#define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */ -#define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */ -#define SHUTDOWN_FORCE_UMOUNT 0x0004 /* shutdown from a forced unmount */ -#define SHUTDOWN_CORRUPT_INCORE 0x0008 /* corrupt in-memory data structures */ -#define SHUTDOWN_REMOTE_REQ 0x0010 /* shutdown came from remote cell */ -#define SHUTDOWN_DEVICE_REQ 0x0020 /* failed all paths to the device */ +#define SYNC_QUIESCE 0x0100 /* quiesce filesystem for a snapshot */ typedef int (*vfs_mount_t)(bhv_desc_t *, struct xfs_mount_args *, struct cred *); @@ -108,19 +102,18 @@ typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *); typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, struct xfs_mount_args *); -typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); -typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *, - struct bhv_vnode *); +typedef int (*vfs_root_t)(bhv_desc_t *, struct vnode **); +typedef int (*vfs_statvfs_t)(bhv_desc_t *, xfs_statfs_t *, struct vnode *); typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); +typedef int (*vfs_vget_t)(bhv_desc_t *, struct vnode **, struct fid *); typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); typedef void (*vfs_init_vnode_t)(bhv_desc_t *, - struct bhv_vnode *, bhv_desc_t *, int); + struct vnode *, bhv_desc_t *, int); typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); typedef void (*vfs_freeze_t)(bhv_desc_t *); -typedef struct bhv_vfsops { +typedef struct vfsops { bhv_position_t vf_position; /* behavior chain position */ vfs_mount_t vfs_mount; /* mount file system */ vfs_parseargs_t vfs_parseargs; /* parse mount options */ @@ -136,82 +129,82 @@ typedef struct bhv_vfsops { vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */ vfs_freeze_t vfs_freeze; /* freeze fs for snapshot */ -} bhv_vfsops_t; +} vfsops_t; /* - * Virtual filesystem operations, operating from head bhv. + * VFS's. Operates on vfs structure pointers (starts at bhv head). */ -#define VFSHEAD(v) ((v)->vfs_bh.bh_first) -#define bhv_vfs_mount(v, ma,cr) vfs_mount(VFSHEAD(v), ma,cr) -#define bhv_vfs_parseargs(v, o,ma,f) vfs_parseargs(VFSHEAD(v), o,ma,f) -#define bhv_vfs_showargs(v, m) vfs_showargs(VFSHEAD(v), m) -#define bhv_vfs_unmount(v, f,cr) vfs_unmount(VFSHEAD(v), f,cr) -#define bhv_vfs_mntupdate(v, fl,args) vfs_mntupdate(VFSHEAD(v), fl,args) -#define bhv_vfs_root(v, vpp) vfs_root(VFSHEAD(v), vpp) -#define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) -#define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) -#define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) -#define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p) -#define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) -#define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) -#define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) -#define bhv_vfs_freeze(v) vfs_freeze(VFSHEAD(v)) +#define VHEAD(v) ((v)->vfs_fbhv) +#define VFS_MOUNT(v, ma,cr, rv) ((rv) = vfs_mount(VHEAD(v), ma,cr)) +#define VFS_PARSEARGS(v, o,ma,f, rv) ((rv) = vfs_parseargs(VHEAD(v), o,ma,f)) +#define VFS_SHOWARGS(v, m, rv) ((rv) = vfs_showargs(VHEAD(v), m)) +#define VFS_UNMOUNT(v, f, cr, rv) ((rv) = vfs_unmount(VHEAD(v), f,cr)) +#define VFS_MNTUPDATE(v, fl, args, rv) ((rv) = vfs_mntupdate(VHEAD(v), fl, args)) +#define VFS_ROOT(v, vpp, rv) ((rv) = vfs_root(VHEAD(v), vpp)) +#define VFS_STATVFS(v, sp,vp, rv) ((rv) = vfs_statvfs(VHEAD(v), sp,vp)) +#define VFS_SYNC(v, flag,cr, rv) ((rv) = vfs_sync(VHEAD(v), flag,cr)) +#define VFS_VGET(v, vpp,fidp, rv) ((rv) = vfs_vget(VHEAD(v), vpp,fidp)) +#define VFS_DMAPIOPS(v, p, rv) ((rv) = vfs_dmapiops(VHEAD(v), p)) +#define VFS_QUOTACTL(v, c,id,p, rv) ((rv) = vfs_quotactl(VHEAD(v), c,id,p)) +#define VFS_INIT_VNODE(v, vp,b,ul) ( vfs_init_vnode(VHEAD(v), vp,b,ul) ) +#define VFS_FORCE_SHUTDOWN(v, fl,f,l) ( vfs_force_shutdown(VHEAD(v), fl,f,l) ) +#define VFS_FREEZE(v) ( vfs_freeze(VHEAD(v)) ) /* - * Virtual filesystem operations, operating from next bhv. + * PVFS's. Operates on behavior descriptor pointers. */ -#define bhv_next_vfs_mount(b, ma,cr) vfs_mount(b, ma,cr) -#define bhv_next_vfs_parseargs(b, o,ma,f) vfs_parseargs(b, o,ma,f) -#define bhv_next_vfs_showargs(b, m) vfs_showargs(b, m) -#define bhv_next_vfs_unmount(b, f,cr) vfs_unmount(b, f,cr) -#define bhv_next_vfs_mntupdate(b, fl,args) vfs_mntupdate(b, fl, args) -#define bhv_next_vfs_root(b, vpp) vfs_root(b, vpp) -#define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) -#define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) -#define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) -#define bhv_next_vfs_dmapiops(b, p) vfs_dmapiops(b, p) -#define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p) -#define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) -#define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l) -#define bhv_next_vfs_freeze(b) vfs_freeze(b) +#define PVFS_MOUNT(b, ma,cr, rv) ((rv) = vfs_mount(b, ma,cr)) +#define PVFS_PARSEARGS(b, o,ma,f, rv) ((rv) = vfs_parseargs(b, o,ma,f)) +#define PVFS_SHOWARGS(b, m, rv) ((rv) = vfs_showargs(b, m)) +#define PVFS_UNMOUNT(b, f,cr, rv) ((rv) = vfs_unmount(b, f,cr)) +#define PVFS_MNTUPDATE(b, fl, args, rv) ((rv) = vfs_mntupdate(b, fl, args)) +#define PVFS_ROOT(b, vpp, rv) ((rv) = vfs_root(b, vpp)) +#define PVFS_STATVFS(b, sp,vp, rv) ((rv) = vfs_statvfs(b, sp,vp)) +#define PVFS_SYNC(b, flag,cr, rv) ((rv) = vfs_sync(b, flag,cr)) +#define PVFS_VGET(b, vpp,fidp, rv) ((rv) = vfs_vget(b, vpp,fidp)) +#define PVFS_DMAPIOPS(b, p, rv) ((rv) = vfs_dmapiops(b, p)) +#define PVFS_QUOTACTL(b, c,id,p, rv) ((rv) = vfs_quotactl(b, c,id,p)) +#define PVFS_INIT_VNODE(b, vp,b2,ul) ( vfs_init_vnode(b, vp,b2,ul) ) +#define PVFS_FORCE_SHUTDOWN(b, fl,f,l) ( vfs_force_shutdown(b, fl,f,l) ) +#define PVFS_FREEZE(b) ( vfs_freeze(b) ) extern int vfs_mount(bhv_desc_t *, struct xfs_mount_args *, struct cred *); extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int); extern int vfs_showargs(bhv_desc_t *, struct seq_file *); extern int vfs_unmount(bhv_desc_t *, int, struct cred *); extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); -extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); -extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *); +extern int vfs_root(bhv_desc_t *, struct vnode **); +extern int vfs_statvfs(bhv_desc_t *, xfs_statfs_t *, struct vnode *); extern int vfs_sync(bhv_desc_t *, int, struct cred *); -extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); +extern int vfs_vget(bhv_desc_t *, struct vnode **, struct fid *); extern int vfs_dmapiops(bhv_desc_t *, caddr_t); extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); -extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int); +extern void vfs_init_vnode(bhv_desc_t *, struct vnode *, bhv_desc_t *, int); extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); extern void vfs_freeze(bhv_desc_t *); -#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen) -#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l)) - -typedef struct bhv_module_vfsops { - struct bhv_vfsops bhv_common; +typedef struct bhv_vfsops { + struct vfsops bhv_common; void * bhv_custom; -} bhv_module_vfsops_t; +} bhv_vfsops_t; -#define vfs_bhv_lookup(v, id) (bhv_lookup_range(&(v)->vfs_bh, (id), (id))) -#define vfs_bhv_custom(b) (((bhv_module_vfsops_t*)BHV_OPS(b))->bhv_custom) -#define vfs_bhv_set_custom(b,o) ((b)->bhv_custom = (void *)(o)) -#define vfs_bhv_clr_custom(b) ((b)->bhv_custom = NULL) +#define vfs_bhv_lookup(v, id) ( bhv_lookup_range(&(v)->vfs_bh, (id), (id)) ) +#define vfs_bhv_custom(b) ( ((bhv_vfsops_t *)BHV_OPS(b))->bhv_custom ) +#define vfs_bhv_set_custom(b,o) ( (b)->bhv_custom = (void *)(o)) +#define vfs_bhv_clr_custom(b) ( (b)->bhv_custom = NULL ) -extern bhv_vfs_t *vfs_allocate(struct super_block *); -extern bhv_vfs_t *vfs_from_sb(struct super_block *); -extern void vfs_deallocate(bhv_vfs_t *); -extern void vfs_insertbhv(bhv_vfs_t *, bhv_desc_t *, bhv_vfsops_t *, void *); +extern vfs_t *vfs_allocate(struct super_block *); +extern vfs_t *vfs_from_sb(struct super_block *); +extern void vfs_deallocate(vfs_t *); +extern void vfs_insertops(vfs_t *, bhv_vfsops_t *); +extern void vfs_insertbhv(vfs_t *, bhv_desc_t *, vfsops_t *, void *); -extern void vfs_insertops(bhv_vfs_t *, bhv_module_vfsops_t *); +extern void bhv_insert_all_vfsops(struct vfs *); +extern void bhv_remove_all_vfsops(struct vfs *, int); +extern void bhv_remove_vfsops(struct vfs *, int); -extern void bhv_insert_all_vfsops(struct bhv_vfs *); -extern void bhv_remove_all_vfsops(struct bhv_vfs *, int); -extern void bhv_remove_vfsops(struct bhv_vfs *, int); +#define fs_frozen(vfsp) ((vfsp)->vfs_super->s_frozen) +#define fs_check_frozen(vfsp, level) \ + vfs_check_frozen(vfsp->vfs_super, level); #endif /* __XFS_VFS_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index e41cf3d79..ef2207580 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c @@ -39,7 +39,7 @@ vn_init(void) void vn_iowait( - bhv_vnode_t *vp) + struct vnode *vp) { wait_queue_head_t *wq = vptosync(vp); @@ -48,33 +48,17 @@ vn_iowait( void vn_iowake( - bhv_vnode_t *vp) + struct vnode *vp) { if (atomic_dec_and_test(&vp->v_iocount)) wake_up(vptosync(vp)); } -/* - * Volume managers supporting multiple paths can send back ENODEV when the - * final path disappears. In this case continuing to fill the page cache - * with dirty data which cannot be written out is evil, so prevent that. - */ -void -vn_ioerror( - bhv_vnode_t *vp, - int error, - char *f, - int l) -{ - if (unlikely(error == -ENODEV)) - bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); -} - -bhv_vnode_t * +struct vnode * vn_initialize( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); + struct vnode *vp = vn_from_inode(inode); XFS_STATS_INC(vn_active); XFS_STATS_INC(vn_alloc); @@ -110,8 +94,8 @@ vn_initialize( */ void vn_revalidate_core( - bhv_vnode_t *vp, - bhv_vattr_t *vap) + struct vnode *vp, + vattr_t *vap) { struct inode *inode = vn_to_inode(vp); @@ -123,6 +107,7 @@ vn_revalidate_core( inode->i_blocks = vap->va_nblocks; inode->i_mtime = vap->va_mtime; inode->i_ctime = vap->va_ctime; + inode->i_blksize = vap->va_blocksize; if (vap->va_xflags & XFS_XFLAG_IMMUTABLE) inode->i_flags |= S_IMMUTABLE; else @@ -154,14 +139,14 @@ vn_revalidate_core( */ int __vn_revalidate( - bhv_vnode_t *vp, - bhv_vattr_t *vattr) + struct vnode *vp, + struct vattr *vattr) { int error; vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + VOP_GETATTR(vp, vattr, 0, NULL, error); if (likely(!error)) { vn_revalidate_core(vp, vattr); VUNMODIFY(vp); @@ -171,9 +156,9 @@ __vn_revalidate( int vn_revalidate( - bhv_vnode_t *vp) + struct vnode *vp) { - bhv_vattr_t vattr; + vattr_t vattr; return __vn_revalidate(vp, &vattr); } @@ -181,9 +166,9 @@ vn_revalidate( /* * Add a reference to a referenced vnode. */ -bhv_vnode_t * +struct vnode * vn_hold( - bhv_vnode_t *vp) + struct vnode *vp) { struct inode *inode; @@ -216,31 +201,31 @@ vn_hold( * Vnode tracing code. */ void -vn_trace_entry(bhv_vnode_t *vp, const char *func, inst_t *ra) +vn_trace_entry(vnode_t *vp, const char *func, inst_t *ra) { KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); } void -vn_trace_exit(bhv_vnode_t *vp, const char *func, inst_t *ra) +vn_trace_exit(vnode_t *vp, const char *func, inst_t *ra) { KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); } void -vn_trace_hold(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_hold(vnode_t *vp, char *file, int line, inst_t *ra) { KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); } void -vn_trace_ref(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_ref(vnode_t *vp, char *file, int line, inst_t *ra) { KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); } void -vn_trace_rele(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_rele(vnode_t *vp, char *file, int line, inst_t *ra) { KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); } diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 035b16385..2848cd300 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h @@ -14,35 +14,57 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Portions Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #ifndef __XFS_VNODE_H__ #define __XFS_VNODE_H__ struct uio; struct file; -struct bhv_vfs; -struct bhv_vattr; +struct vattr; struct xfs_iomap; struct attrlist_cursor_kern; -typedef struct dentry bhv_vname_t; -typedef __u64 bhv_vnumber_t; -typedef enum bhv_vflags { - VMODIFIED = 0x08, /* XFS inode state possibly differs */ - /* to the Linux inode state. */ - VTRUNCATED = 0x40, /* truncated down so flush-on-close */ -} bhv_vflags_t; +typedef xfs_ino_t vnumber_t; +typedef struct dentry vname_t; +typedef bhv_head_t vn_bhv_head_t; /* * MP locking protocols: * v_flag, v_vfsp VN_LOCK/VN_UNLOCK */ -typedef struct bhv_vnode { - bhv_vflags_t v_flag; /* vnode flags (see above) */ - bhv_vfs_t *v_vfsp; /* ptr to containing VFS */ - bhv_vnumber_t v_number; /* in-core vnode number */ - bhv_head_t v_bh; /* behavior head */ +typedef struct vnode { + __u32 v_flag; /* vnode flags (see below) */ + struct vfs *v_vfsp; /* ptr to containing VFS */ + vnumber_t v_number; /* in-core vnode number */ + vn_bhv_head_t v_bh; /* behavior head */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ atomic_t v_iocount; /* outstanding I/O count */ #ifdef XFS_VNODE_TRACE @@ -50,7 +72,7 @@ typedef struct bhv_vnode { #endif struct inode v_inode; /* Linux inode */ /* inode MUST be last */ -} bhv_vnode_t; +} vnode_t; #define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode) #define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode) @@ -58,6 +80,9 @@ typedef struct bhv_vnode { #define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) #define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) +#define v_fbhv v_bh.bh_first /* first behavior */ +#define v_fops v_bh.bh_first->bd_ops /* first behavior ops */ + #define VNODE_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ #define VNODE_POSITION_TOP BHV_POSITION_TOP /* chain top */ #define VNODE_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ @@ -79,8 +104,8 @@ typedef enum { /* * Macros for dealing with the behavior descriptor inside of the vnode. */ -#define BHV_TO_VNODE(bdp) ((bhv_vnode_t *)BHV_VOBJ(bdp)) -#define BHV_TO_VNODE_NULL(bdp) ((bhv_vnode_t *)BHV_VOBJNULL(bdp)) +#define BHV_TO_VNODE(bdp) ((vnode_t *)BHV_VOBJ(bdp)) +#define BHV_TO_VNODE_NULL(bdp) ((vnode_t *)BHV_VOBJNULL(bdp)) #define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) #define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) @@ -91,29 +116,35 @@ typedef enum { /* * Vnode to Linux inode mapping. */ -static inline struct bhv_vnode *vn_from_inode(struct inode *inode) +static inline struct vnode *vn_from_inode(struct inode *inode) { - return container_of(inode, bhv_vnode_t, v_inode); + return (vnode_t *)list_entry(inode, vnode_t, v_inode); } -static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) +static inline struct inode *vn_to_inode(struct vnode *vnode) { return &vnode->v_inode; } /* - * Values for the vop_rwlock/rwunlock flags parameter. + * Vnode flags. + */ +#define VMODIFIED 0x8 /* XFS inode state possibly differs */ + /* to the Linux inode state. */ + +/* + * Values for the VOP_RWLOCK and VOP_RWUNLOCK flags parameter. */ -typedef enum bhv_vrwlock { +typedef enum vrwlock { VRWLOCK_NONE, VRWLOCK_READ, VRWLOCK_WRITE, VRWLOCK_WRITE_DIRECT, VRWLOCK_TRY_READ, VRWLOCK_TRY_WRITE -} bhv_vrwlock_t; +} vrwlock_t; /* - * Return values for bhv_vop_inactive. A return value of + * Return values for VOP_INACTIVE. A return value of * VN_INACTIVE_NOCACHE implies that the file system behavior * has disassociated its state and bhv_desc_t from the vnode. */ @@ -121,20 +152,18 @@ typedef enum bhv_vrwlock { #define VN_INACTIVE_NOCACHE 1 /* - * Values for the cmd code given to vop_vnode_change. + * Values for the cmd code given to VOP_VNODE_CHANGE. */ -typedef enum bhv_vchange { +typedef enum vchange { VCHANGE_FLAGS_FRLOCKS = 0, VCHANGE_FLAGS_ENF_LOCKING = 1, VCHANGE_FLAGS_TRUNCATED = 2, VCHANGE_FLAGS_PAGE_DIRTY = 3, VCHANGE_FLAGS_IOEXCL_COUNT = 4 -} bhv_vchange_t; +} vchange_t; -typedef enum { L_FALSE, L_TRUE } lastclose_t; typedef int (*vop_open_t)(bhv_desc_t *, struct cred *); -typedef int (*vop_close_t)(bhv_desc_t *, int, lastclose_t, struct cred *); typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *, const struct iovec *, unsigned int, loff_t *, int, struct cred *); @@ -152,27 +181,27 @@ typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *, struct cred *); typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, int, unsigned int, void __user *); -typedef int (*vop_getattr_t)(bhv_desc_t *, struct bhv_vattr *, int, +typedef int (*vop_getattr_t)(bhv_desc_t *, struct vattr *, int, struct cred *); -typedef int (*vop_setattr_t)(bhv_desc_t *, struct bhv_vattr *, int, +typedef int (*vop_setattr_t)(bhv_desc_t *, struct vattr *, int, struct cred *); typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vop_lookup_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t **, - int, bhv_vnode_t *, struct cred *); -typedef int (*vop_create_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *, - bhv_vnode_t **, struct cred *); -typedef int (*vop_remove_t)(bhv_desc_t *, bhv_vname_t *, struct cred *); -typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, bhv_vname_t *, +typedef int (*vop_lookup_t)(bhv_desc_t *, vname_t *, vnode_t **, + int, vnode_t *, struct cred *); +typedef int (*vop_create_t)(bhv_desc_t *, vname_t *, struct vattr *, + vnode_t **, struct cred *); +typedef int (*vop_remove_t)(bhv_desc_t *, vname_t *, struct cred *); +typedef int (*vop_link_t)(bhv_desc_t *, vnode_t *, vname_t *, + struct cred *); +typedef int (*vop_rename_t)(bhv_desc_t *, vname_t *, vnode_t *, vname_t *, struct cred *); -typedef int (*vop_rename_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *, - bhv_vname_t *, struct cred *); -typedef int (*vop_mkdir_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *, - bhv_vnode_t **, struct cred *); -typedef int (*vop_rmdir_t)(bhv_desc_t *, bhv_vname_t *, struct cred *); +typedef int (*vop_mkdir_t)(bhv_desc_t *, vname_t *, struct vattr *, + vnode_t **, struct cred *); +typedef int (*vop_rmdir_t)(bhv_desc_t *, vname_t *, struct cred *); typedef int (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *, int *); -typedef int (*vop_symlink_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr*, - char *, bhv_vnode_t **, struct cred *); +typedef int (*vop_symlink_t)(bhv_desc_t *, vname_t *, struct vattr *, + char *, vnode_t **, struct cred *); typedef int (*vop_readlink_t)(bhv_desc_t *, struct uio *, int, struct cred *); typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, @@ -180,8 +209,8 @@ typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, typedef int (*vop_inactive_t)(bhv_desc_t *, struct cred *); typedef int (*vop_fid2_t)(bhv_desc_t *, struct fid *); typedef int (*vop_release_t)(bhv_desc_t *); -typedef int (*vop_rwlock_t)(bhv_desc_t *, bhv_vrwlock_t); -typedef void (*vop_rwunlock_t)(bhv_desc_t *, bhv_vrwlock_t); +typedef int (*vop_rwlock_t)(bhv_desc_t *, vrwlock_t); +typedef void (*vop_rwunlock_t)(bhv_desc_t *, vrwlock_t); typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, struct xfs_iomap *, int *); typedef int (*vop_reclaim_t)(bhv_desc_t *); @@ -193,8 +222,8 @@ typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, int, struct cred *); typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, struct attrlist_cursor_kern *, struct cred *); -typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int); -typedef void (*vop_vnode_change_t)(bhv_desc_t *, bhv_vchange_t, __psint_t); +typedef void (*vop_link_removed_t)(bhv_desc_t *, vnode_t *, int); +typedef void (*vop_vnode_change_t)(bhv_desc_t *, vchange_t, __psint_t); typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); typedef void (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, @@ -202,10 +231,9 @@ typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, typedef int (*vop_iflush_t)(bhv_desc_t *, int); -typedef struct bhv_vnodeops { +typedef struct vnodeops { bhv_position_t vn_position; /* position within behavior chain */ vop_open_t vop_open; - vop_close_t vop_close; vop_read_t vop_read; vop_write_t vop_write; vop_sendfile_t vop_sendfile; @@ -243,80 +271,103 @@ typedef struct bhv_vnodeops { vop_pflushvp_t vop_flush_pages; vop_release_t vop_release; vop_iflush_t vop_iflush; -} bhv_vnodeops_t; +} vnodeops_t; /* - * Virtual node operations, operating from head bhv. + * VOP's. + */ +#define _VOP_(op, vp) (*((vnodeops_t *)(vp)->v_fops)->op) + +#define VOP_READ(vp,file,iov,segs,offset,ioflags,cr,rv) \ + rv = _VOP_(vop_read, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) +#define VOP_WRITE(vp,file,iov,segs,offset,ioflags,cr,rv) \ + rv = _VOP_(vop_write, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) +#define VOP_SENDFILE(vp,f,off,ioflags,cnt,act,targ,cr,rv) \ + rv = _VOP_(vop_sendfile, vp)((vp)->v_fbhv,f,off,ioflags,cnt,act,targ,cr) +#define VOP_SPLICE_READ(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ + rv = _VOP_(vop_splice_read, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) +#define VOP_SPLICE_WRITE(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ + rv = _VOP_(vop_splice_write, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) +#define VOP_BMAP(vp,of,sz,rw,b,n,rv) \ + rv = _VOP_(vop_bmap, vp)((vp)->v_fbhv,of,sz,rw,b,n) +#define VOP_OPEN(vp, cr, rv) \ + rv = _VOP_(vop_open, vp)((vp)->v_fbhv, cr) +#define VOP_GETATTR(vp, vap, f, cr, rv) \ + rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr) +#define VOP_SETATTR(vp, vap, f, cr, rv) \ + rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr) +#define VOP_ACCESS(vp, mode, cr, rv) \ + rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr) +#define VOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \ + rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr) +#define VOP_CREATE(dvp,d,vap,vpp,cr,rv) \ + rv = _VOP_(vop_create, dvp)((dvp)->v_fbhv,d,vap,vpp,cr) +#define VOP_REMOVE(dvp,d,cr,rv) \ + rv = _VOP_(vop_remove, dvp)((dvp)->v_fbhv,d,cr) +#define VOP_LINK(tdvp,fvp,d,cr,rv) \ + rv = _VOP_(vop_link, tdvp)((tdvp)->v_fbhv,fvp,d,cr) +#define VOP_RENAME(fvp,fnm,tdvp,tnm,cr,rv) \ + rv = _VOP_(vop_rename, fvp)((fvp)->v_fbhv,fnm,tdvp,tnm,cr) +#define VOP_MKDIR(dp,d,vap,vpp,cr,rv) \ + rv = _VOP_(vop_mkdir, dp)((dp)->v_fbhv,d,vap,vpp,cr) +#define VOP_RMDIR(dp,d,cr,rv) \ + rv = _VOP_(vop_rmdir, dp)((dp)->v_fbhv,d,cr) +#define VOP_READDIR(vp,uiop,cr,eofp,rv) \ + rv = _VOP_(vop_readdir, vp)((vp)->v_fbhv,uiop,cr,eofp) +#define VOP_SYMLINK(dvp,d,vap,tnm,vpp,cr,rv) \ + rv = _VOP_(vop_symlink, dvp) ((dvp)->v_fbhv,d,vap,tnm,vpp,cr) +#define VOP_READLINK(vp,uiop,fl,cr,rv) \ + rv = _VOP_(vop_readlink, vp)((vp)->v_fbhv,uiop,fl,cr) +#define VOP_FSYNC(vp,f,cr,b,e,rv) \ + rv = _VOP_(vop_fsync, vp)((vp)->v_fbhv,f,cr,b,e) +#define VOP_INACTIVE(vp, cr, rv) \ + rv = _VOP_(vop_inactive, vp)((vp)->v_fbhv, cr) +#define VOP_RELEASE(vp, rv) \ + rv = _VOP_(vop_release, vp)((vp)->v_fbhv) +#define VOP_FID2(vp, fidp, rv) \ + rv = _VOP_(vop_fid2, vp)((vp)->v_fbhv, fidp) +#define VOP_RWLOCK(vp,i) \ + (void)_VOP_(vop_rwlock, vp)((vp)->v_fbhv, i) +#define VOP_RWLOCK_TRY(vp,i) \ + _VOP_(vop_rwlock, vp)((vp)->v_fbhv, i) +#define VOP_RWUNLOCK(vp,i) \ + (void)_VOP_(vop_rwunlock, vp)((vp)->v_fbhv, i) +#define VOP_FRLOCK(vp,c,fl,flags,offset,fr,rv) \ + rv = _VOP_(vop_frlock, vp)((vp)->v_fbhv,c,fl,flags,offset,fr) +#define VOP_RECLAIM(vp, rv) \ + rv = _VOP_(vop_reclaim, vp)((vp)->v_fbhv) +#define VOP_ATTR_GET(vp, name, val, vallenp, fl, cred, rv) \ + rv = _VOP_(vop_attr_get, vp)((vp)->v_fbhv,name,val,vallenp,fl,cred) +#define VOP_ATTR_SET(vp, name, val, vallen, fl, cred, rv) \ + rv = _VOP_(vop_attr_set, vp)((vp)->v_fbhv,name,val,vallen,fl,cred) +#define VOP_ATTR_REMOVE(vp, name, flags, cred, rv) \ + rv = _VOP_(vop_attr_remove, vp)((vp)->v_fbhv,name,flags,cred) +#define VOP_ATTR_LIST(vp, buf, buflen, fl, cursor, cred, rv) \ + rv = _VOP_(vop_attr_list, vp)((vp)->v_fbhv,buf,buflen,fl,cursor,cred) +#define VOP_LINK_REMOVED(vp, dvp, linkzero) \ + (void)_VOP_(vop_link_removed, vp)((vp)->v_fbhv, dvp, linkzero) +#define VOP_VNODE_CHANGE(vp, cmd, val) \ + (void)_VOP_(vop_vnode_change, vp)((vp)->v_fbhv,cmd,val) +/* + * These are page cache functions that now go thru VOPs. + * 'last' parameter is unused and left in for IRIX compatibility */ -#define VNHEAD(vp) ((vp)->v_bh.bh_first) -#define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op) -#define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr) -#define bhv_vop_close(vp, f,last,cr) VOP(vop_close, vp)(VNHEAD(vp),f,last,cr) -#define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \ - VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) -#define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ - VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) -#define bhv_vop_sendfile(vp,f,off,ioflags,cnt,act,targ,cr) \ - VOP(vop_sendfile, vp)(VNHEAD(vp),f,off,ioflags,cnt,act,targ,cr) -#define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \ - VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) -#define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \ - VOP(vop_splice_write, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) -#define bhv_vop_bmap(vp,of,sz,rw,b,n) \ - VOP(vop_bmap, vp)(VNHEAD(vp),of,sz,rw,b,n) -#define bhv_vop_getattr(vp, vap,f,cr) \ - VOP(vop_getattr, vp)(VNHEAD(vp), vap,f,cr) -#define bhv_vop_setattr(vp, vap,f,cr) \ - VOP(vop_setattr, vp)(VNHEAD(vp), vap,f,cr) -#define bhv_vop_access(vp, mode,cr) VOP(vop_access, vp)(VNHEAD(vp), mode,cr) -#define bhv_vop_lookup(vp,d,vpp,f,rdir,cr) \ - VOP(vop_lookup, vp)(VNHEAD(vp),d,vpp,f,rdir,cr) -#define bhv_vop_create(dvp,d,vap,vpp,cr) \ - VOP(vop_create, dvp)(VNHEAD(dvp),d,vap,vpp,cr) -#define bhv_vop_remove(dvp,d,cr) VOP(vop_remove, dvp)(VNHEAD(dvp),d,cr) -#define bhv_vop_link(dvp,fvp,d,cr) VOP(vop_link, dvp)(VNHEAD(dvp),fvp,d,cr) -#define bhv_vop_rename(fvp,fnm,tdvp,tnm,cr) \ - VOP(vop_rename, fvp)(VNHEAD(fvp),fnm,tdvp,tnm,cr) -#define bhv_vop_mkdir(dp,d,vap,vpp,cr) \ - VOP(vop_mkdir, dp)(VNHEAD(dp),d,vap,vpp,cr) -#define bhv_vop_rmdir(dp,d,cr) VOP(vop_rmdir, dp)(VNHEAD(dp),d,cr) -#define bhv_vop_readdir(vp,uiop,cr,eofp) \ - VOP(vop_readdir, vp)(VNHEAD(vp),uiop,cr,eofp) -#define bhv_vop_symlink(dvp,d,vap,tnm,vpp,cr) \ - VOP(vop_symlink, dvp)(VNHEAD(dvp),d,vap,tnm,vpp,cr) -#define bhv_vop_readlink(vp,uiop,fl,cr) \ - VOP(vop_readlink, vp)(VNHEAD(vp),uiop,fl,cr) -#define bhv_vop_fsync(vp,f,cr,b,e) VOP(vop_fsync, vp)(VNHEAD(vp),f,cr,b,e) -#define bhv_vop_inactive(vp,cr) VOP(vop_inactive, vp)(VNHEAD(vp),cr) -#define bhv_vop_release(vp) VOP(vop_release, vp)(VNHEAD(vp)) -#define bhv_vop_fid2(vp,fidp) VOP(vop_fid2, vp)(VNHEAD(vp),fidp) -#define bhv_vop_rwlock(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) -#define bhv_vop_rwlock_try(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) -#define bhv_vop_rwunlock(vp,i) VOP(vop_rwunlock, vp)(VNHEAD(vp),i) -#define bhv_vop_frlock(vp,c,fl,flags,offset,fr) \ - VOP(vop_frlock, vp)(VNHEAD(vp),c,fl,flags,offset,fr) -#define bhv_vop_reclaim(vp) VOP(vop_reclaim, vp)(VNHEAD(vp)) -#define bhv_vop_attr_get(vp, name, val, vallenp, fl, cred) \ - VOP(vop_attr_get, vp)(VNHEAD(vp),name,val,vallenp,fl,cred) -#define bhv_vop_attr_set(vp, name, val, vallen, fl, cred) \ - VOP(vop_attr_set, vp)(VNHEAD(vp),name,val,vallen,fl,cred) -#define bhv_vop_attr_remove(vp, name, flags, cred) \ - VOP(vop_attr_remove, vp)(VNHEAD(vp),name,flags,cred) -#define bhv_vop_attr_list(vp, buf, buflen, fl, cursor, cred) \ - VOP(vop_attr_list, vp)(VNHEAD(vp),buf,buflen,fl,cursor,cred) -#define bhv_vop_link_removed(vp, dvp, linkzero) \ - VOP(vop_link_removed, vp)(VNHEAD(vp), dvp, linkzero) -#define bhv_vop_vnode_change(vp, cmd, val) \ - VOP(vop_vnode_change, vp)(VNHEAD(vp), cmd, val) -#define bhv_vop_toss_pages(vp, first, last, fiopt) \ - VOP(vop_tosspages, vp)(VNHEAD(vp), first, last, fiopt) -#define bhv_vop_flushinval_pages(vp, first, last, fiopt) \ - VOP(vop_flushinval_pages, vp)(VNHEAD(vp),first,last,fiopt) -#define bhv_vop_flush_pages(vp, first, last, flags, fiopt) \ - VOP(vop_flush_pages, vp)(VNHEAD(vp),first,last,flags,fiopt) -#define bhv_vop_ioctl(vp, inode, filp, fl, cmd, arg) \ - VOP(vop_ioctl, vp)(VNHEAD(vp),inode,filp,fl,cmd,arg) -#define bhv_vop_iflush(vp, flags) VOP(vop_iflush, vp)(VNHEAD(vp), flags) +#define VOP_TOSS_PAGES(vp, first, last, fiopt) \ + _VOP_(vop_tosspages, vp)((vp)->v_fbhv,first, last, fiopt) +/* + * 'last' parameter is unused and left in for IRIX compatibility + */ +#define VOP_FLUSHINVAL_PAGES(vp, first, last, fiopt) \ + _VOP_(vop_flushinval_pages, vp)((vp)->v_fbhv,first,last,fiopt) +/* + * 'last' parameter is unused and left in for IRIX compatibility + */ +#define VOP_FLUSH_PAGES(vp, first, last, flags, fiopt, rv) \ + rv = _VOP_(vop_flush_pages, vp)((vp)->v_fbhv,first,last,flags,fiopt) +#define VOP_IOCTL(vp, inode, filp, fl, cmd, arg, rv) \ + rv = _VOP_(vop_ioctl, vp)((vp)->v_fbhv,inode,filp,fl,cmd,arg) +#define VOP_IFLUSH(vp, flags, rv) \ + rv = _VOP_(vop_iflush, vp)((vp)->v_fbhv, flags) /* * Flags for read/write calls - same values as IRIX @@ -326,7 +377,7 @@ typedef struct bhv_vnodeops { #define IO_INVIS 0x00020 /* don't update inode timestamps */ /* - * Flags for vop_iflush call + * Flags for VOP_IFLUSH call */ #define FLUSH_SYNC 1 /* wait for flush to complete */ #define FLUSH_INODE 2 /* flush the inode itself */ @@ -334,7 +385,8 @@ typedef struct bhv_vnodeops { * this inode out to disk */ /* - * Flush/Invalidate options for vop_toss/flush/flushinval_pages. + * Flush/Invalidate options for VOP_TOSS_PAGES, VOP_FLUSHINVAL_PAGES and + * VOP_FLUSH_PAGES. */ #define FI_NONE 0 /* none */ #define FI_REMAPF 1 /* Do a remapf prior to the operation */ @@ -346,7 +398,7 @@ typedef struct bhv_vnodeops { * Vnode attributes. va_mask indicates those attributes the caller * wants to set or extract. */ -typedef struct bhv_vattr { +typedef struct vattr { int va_mask; /* bit-mask of attributes present */ mode_t va_mode; /* file access mode and type */ xfs_nlink_t va_nlink; /* number of references to file */ @@ -367,7 +419,7 @@ typedef struct bhv_vattr { u_long va_nextents; /* number of extents in file */ u_long va_anextents; /* number of attr extents in file */ prid_t va_projid; /* project id */ -} bhv_vattr_t; +} vattr_t; /* * setattr or getattr attributes @@ -443,17 +495,29 @@ typedef struct bhv_vattr { (VN_ISREG(vp) && ((mode) & (VSGID|(VEXEC>>3))) == VSGID) extern void vn_init(void); -extern bhv_vnode_t *vn_initialize(struct inode *); -extern int vn_revalidate(struct bhv_vnode *); -extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *); -extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *); +extern vnode_t *vn_initialize(struct inode *); + +/* + * vnode_map structures _must_ match vn_epoch and vnode structure sizes. + */ +typedef struct vnode_map { + vfs_t *v_vfsp; + vnumber_t v_number; /* in-core vnode number */ + xfs_ino_t v_ino; /* inode # */ +} vmap_t; + +#define VMAP(vp, vmap) {(vmap).v_vfsp = (vp)->v_vfsp, \ + (vmap).v_number = (vp)->v_number, \ + (vmap).v_ino = (vp)->v_inode.i_ino; } -extern void vn_iowait(struct bhv_vnode *vp); -extern void vn_iowake(struct bhv_vnode *vp); +extern int vn_revalidate(struct vnode *); +extern int __vn_revalidate(struct vnode *, vattr_t *); +extern void vn_revalidate_core(struct vnode *, vattr_t *); -extern void vn_ioerror(struct bhv_vnode *vp, int error, char *f, int l); +extern void vn_iowait(struct vnode *vp); +extern void vn_iowake(struct vnode *vp); -static inline int vn_count(struct bhv_vnode *vp) +static inline int vn_count(struct vnode *vp) { return atomic_read(&vn_to_inode(vp)->i_count); } @@ -461,7 +525,7 @@ static inline int vn_count(struct bhv_vnode *vp) /* * Vnode reference counting functions (and macros for compatibility). */ -extern bhv_vnode_t *vn_hold(struct bhv_vnode *); +extern vnode_t *vn_hold(struct vnode *); #if defined(XFS_VNODE_TRACE) #define VN_HOLD(vp) \ @@ -475,7 +539,7 @@ extern bhv_vnode_t *vn_hold(struct bhv_vnode *); #define VN_RELE(vp) (iput(vn_to_inode(vp))) #endif -static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) +static inline struct vnode *vn_grab(struct vnode *vp) { struct inode *inode = igrab(vn_to_inode(vp)); return inode ? vn_from_inode(inode) : NULL; @@ -493,39 +557,32 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) */ #define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) #define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) +#define VN_FLAGSET(vp,b) vn_flagset(vp,b) +#define VN_FLAGCLR(vp,b) vn_flagclr(vp,b) -static __inline__ void vn_flagset(struct bhv_vnode *vp, uint flag) +static __inline__ void vn_flagset(struct vnode *vp, uint flag) { spin_lock(&vp->v_lock); vp->v_flag |= flag; spin_unlock(&vp->v_lock); } -static __inline__ uint vn_flagclr(struct bhv_vnode *vp, uint flag) +static __inline__ void vn_flagclr(struct vnode *vp, uint flag) { - uint cleared; - spin_lock(&vp->v_lock); - cleared = (vp->v_flag & flag); vp->v_flag &= ~flag; spin_unlock(&vp->v_lock); - return cleared; } -#define VMODIFY(vp) vn_flagset(vp, VMODIFIED) -#define VUNMODIFY(vp) vn_flagclr(vp, VMODIFIED) -#define VTRUNCATE(vp) vn_flagset(vp, VTRUNCATED) -#define VUNTRUNCATE(vp) vn_flagclr(vp, VTRUNCATED) - /* * Dealing with bad inodes */ -static inline void vn_mark_bad(struct bhv_vnode *vp) +static inline void vn_mark_bad(struct vnode *vp) { make_bad_inode(vn_to_inode(vp)); } -static inline int VN_BAD(struct bhv_vnode *vp) +static inline int VN_BAD(struct vnode *vp) { return is_bad_inode(vn_to_inode(vp)); } @@ -533,18 +590,18 @@ static inline int VN_BAD(struct bhv_vnode *vp) /* * Extracting atime values in various formats */ -static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) +static inline void vn_atime_to_bstime(struct vnode *vp, xfs_bstime_t *bs_atime) { bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; } -static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) +static inline void vn_atime_to_timespec(struct vnode *vp, struct timespec *ts) { *ts = vp->v_inode.i_atime; } -static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) +static inline void vn_atime_to_time_t(struct vnode *vp, time_t *tt) { *tt = vp->v_inode.i_atime.tv_sec; } @@ -556,10 +613,11 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) #define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages) #define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \ PAGECACHE_TAG_DIRTY) -#define VN_TRUNC(vp) ((vp)->v_flag & VTRUNCATED) +#define VMODIFY(vp) VN_FLAGSET(vp, VMODIFIED) +#define VUNMODIFY(vp) VN_FLAGCLR(vp, VMODIFIED) /* - * Flags to vop_setattr/getattr. + * Flags to VOP_SETATTR/VOP_GETATTR. */ #define ATTR_UTIME 0x01 /* non-default utime(2) request */ #define ATTR_DMI 0x08 /* invocation from a DMI function */ @@ -569,7 +627,7 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ /* - * Flags to vop_fsync/reclaim. + * Flags to VOP_FSYNC and VOP_RECLAIM. */ #define FSYNC_NOWAIT 0 /* asynchronous flush */ #define FSYNC_WAIT 0x1 /* synchronous fsync or forced reclaim */ @@ -588,11 +646,11 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) #define VNODE_KTRACE_REF 4 #define VNODE_KTRACE_RELE 5 -extern void vn_trace_entry(struct bhv_vnode *, const char *, inst_t *); -extern void vn_trace_exit(struct bhv_vnode *, const char *, inst_t *); -extern void vn_trace_hold(struct bhv_vnode *, char *, int, inst_t *); -extern void vn_trace_ref(struct bhv_vnode *, char *, int, inst_t *); -extern void vn_trace_rele(struct bhv_vnode *, char *, int, inst_t *); +extern void vn_trace_entry(struct vnode *, const char *, inst_t *); +extern void vn_trace_exit(struct vnode *, const char *, inst_t *); +extern void vn_trace_hold(struct vnode *, char *, int, inst_t *); +extern void vn_trace_ref(struct vnode *, char *, int, inst_t *); +extern void vn_trace_rele(struct vnode *, char *, int, inst_t *); #define VN_TRACE(vp) \ vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address) diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 3aa771531..772ac4832 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -442,7 +444,7 @@ xfs_qm_dqalloc( XFS_BMAPI_METADATA | XFS_BMAPI_WRITE, &firstblock, XFS_QM_DQALLOC_SPACE_RES(mp), - &map, &nmaps, &flist, NULL))) { + &map, &nmaps, &flist))) { goto error0; } ASSERT(map.br_blockcount == XFS_DQUOT_CLUSTER_SIZE_FSB); @@ -557,7 +559,7 @@ xfs_qm_dqtobp( error = xfs_bmapi(NULL, quotip, dqp->q_fileoffset, XFS_DQUOT_CLUSTER_SIZE_FSB, XFS_BMAPI_METADATA, - NULL, 0, &map, &nmaps, NULL, NULL); + NULL, 0, &map, &nmaps, NULL); xfs_iunlock(quotip, XFS_ILOCK_SHARED); if (error) @@ -1259,7 +1261,7 @@ xfs_qm_dqflush( if (xfs_qm_dqcheck(&dqp->q_core, be32_to_cpu(ddqp->d_id), 0, XFS_QMOPT_DOWARN, "dqflush (incore copy)")) { - xfs_force_shutdown(dqp->q_mount, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(dqp->q_mount, XFS_CORRUPT_INCORE); return XFS_ERROR(EIO); } diff --git a/fs/xfs/quota/xfs_dquot.h b/fs/xfs/quota/xfs_dquot.h index 78d3ab95c..c0c629663 100644 --- a/fs/xfs/quota/xfs_dquot.h +++ b/fs/xfs/quota/xfs_dquot.h @@ -119,7 +119,7 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp) */ #define xfs_dqflock(dqp) { psema(&((dqp)->q_flock), PINOD | PRECALC);\ (dqp)->dq_flags |= XFS_DQ_FLOCKED; } -#define xfs_dqfunlock(dqp) { ASSERT(issemalocked(&((dqp)->q_flock))); \ +#define xfs_dqfunlock(dqp) { ASSERT(valusema(&((dqp)->q_flock)) <= 0); \ vsema(&((dqp)->q_flock)); \ (dqp)->dq_flags &= ~(XFS_DQ_FLOCKED); } @@ -128,7 +128,7 @@ XFS_DQ_IS_LOCKED(xfs_dquot_t *dqp) #define XFS_DQ_PINUNLOCK(dqp, s) mutex_spinunlock( \ &(XFS_DQ_TO_QINF(dqp)->qi_pinlock), s) -#define XFS_DQ_IS_FLUSH_LOCKED(dqp) (issemalocked(&((dqp)->q_flock))) +#define XFS_DQ_IS_FLUSH_LOCKED(dqp) (valusema(&((dqp)->q_flock)) <= 0) #define XFS_DQ_IS_ON_FREELIST(dqp) ((dqp)->dq_flnext != (dqp)) #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->dq_flags & XFS_DQ_DIRTY) #define XFS_QM_ISUDQ(dqp) ((dqp)->dq_flags & XFS_DQ_USER) diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index 5b2dcc58b..546f48af8 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -246,7 +248,7 @@ xfs_qm_dquot_logitem_pushbuf( * inode flush completed and the inode was taken off the AIL. * So, just get out. */ - if (!issemalocked(&(dqp->q_flock)) || + if ((valusema(&(dqp->q_flock)) > 0) || ((qip->qli_item.li_flags & XFS_LI_IN_AIL) == 0)) { qip->qli_pushbuf_flag = 0; xfs_dqunlock(dqp); @@ -259,7 +261,7 @@ xfs_qm_dquot_logitem_pushbuf( if (bp != NULL) { if (XFS_BUF_ISDELAYWRITE(bp)) { dopush = ((qip->qli_item.li_flags & XFS_LI_IN_AIL) && - issemalocked(&(dqp->q_flock))); + (valusema(&(dqp->q_flock)) <= 0)); qip->qli_pushbuf_flag = 0; xfs_dqunlock(dqp); diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index e23e45535..7fb5eca9b 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -32,6 +33,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -1601,7 +1603,7 @@ xfs_qm_dqiterate( maxlblkcnt - lblkno, XFS_BMAPI_METADATA, NULL, - 0, map, &nmaps, NULL, NULL); + 0, map, &nmaps, NULL); xfs_iunlock(qip, XFS_ILOCK_SHARED); if (error) break; @@ -1903,7 +1905,9 @@ xfs_qm_quotacheck( */ if ((error = xfs_bulkstat(mp, &lastino, &count, xfs_qm_dqusage_adjust, NULL, - structsz, NULL, BULKSTAT_FG_IGET, &done))) + structsz, NULL, + BULKSTAT_FG_IGET|BULKSTAT_FG_VFSLOCKED, + &done))) break; } while (! done); diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index db8872be8..6838b36d9 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -32,6 +33,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -127,7 +129,7 @@ xfs_qm_parseargs( return XFS_ERROR(EINVAL); } - error = bhv_next_vfs_parseargs(BHV_NEXT(bhv), options, args, update); + PVFS_PARSEARGS(BHV_NEXT(bhv), options, args, update, error); if (!error && !referenced) bhv_remove_vfsops(bhvtovfs(bhv), VFS_POSITION_QM); return error; @@ -138,8 +140,9 @@ xfs_qm_showargs( struct bhv_desc *bhv, struct seq_file *m) { - struct bhv_vfs *vfsp = bhvtovfs(bhv); + struct vfs *vfsp = bhvtovfs(bhv); struct xfs_mount *mp = XFS_VFSTOM(vfsp); + int error; if (mp->m_qflags & XFS_UQUOTA_ACCT) { (mp->m_qflags & XFS_UQUOTA_ENFD) ? @@ -162,7 +165,8 @@ xfs_qm_showargs( if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) seq_puts(m, "," MNTOPT_NOQUOTA); - return bhv_next_vfs_showargs(BHV_NEXT(bhv), m); + PVFS_SHOWARGS(BHV_NEXT(bhv), m, error); + return error; } STATIC int @@ -171,74 +175,14 @@ xfs_qm_mount( struct xfs_mount_args *args, struct cred *cr) { - struct bhv_vfs *vfsp = bhvtovfs(bhv); + struct vfs *vfsp = bhvtovfs(bhv); struct xfs_mount *mp = XFS_VFSTOM(vfsp); + int error; if (args->flags & (XFSMNT_UQUOTA | XFSMNT_GQUOTA | XFSMNT_PQUOTA)) xfs_qm_mount_quotainit(mp, args->flags); - return bhv_next_vfs_mount(BHV_NEXT(bhv), args, cr); -} - -/* - * Directory tree accounting is implemented using project quotas, where - * the project identifier is inherited from parent directories. - * A statvfs (df, etc.) of a directory that is using project quota should - * return a statvfs of the project, not the entire filesystem. - * This makes such trees appear as if they are filesystems in themselves. - */ -STATIC int -xfs_qm_statvfs( - struct bhv_desc *bhv, - bhv_statvfs_t *statp, - struct bhv_vnode *vnode) -{ - xfs_mount_t *mp; - xfs_inode_t *ip; - xfs_dquot_t *dqp; - xfs_disk_dquot_t *dp; - __uint64_t limit; - int error; - - error = bhv_next_vfs_statvfs(BHV_NEXT(bhv), statp, vnode); - if (error || !vnode) - return error; - - mp = xfs_vfstom(bhvtovfs(bhv)); - ip = xfs_vtoi(vnode); - - if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)) - return 0; - if (!(mp->m_qflags & XFS_PQUOTA_ACCT)) - return 0; - if (!(mp->m_qflags & XFS_OQUOTA_ENFD)) - return 0; - - if (xfs_qm_dqget(mp, NULL, ip->i_d.di_projid, XFS_DQ_PROJ, 0, &dqp)) - return 0; - dp = &dqp->q_core; - - limit = dp->d_blk_softlimit ? - be64_to_cpu(dp->d_blk_softlimit) : - be64_to_cpu(dp->d_blk_hardlimit); - if (limit && statp->f_blocks > limit) { - statp->f_blocks = limit; - statp->f_bfree = - (statp->f_blocks > be64_to_cpu(dp->d_bcount)) ? - (statp->f_blocks - be64_to_cpu(dp->d_bcount)) : 0; - } - - limit = dp->d_ino_softlimit ? - be64_to_cpu(dp->d_ino_softlimit) : - be64_to_cpu(dp->d_ino_hardlimit); - if (limit && statp->f_files > limit) { - statp->f_files = limit; - statp->f_ffree = - (statp->f_files > be64_to_cpu(dp->d_icount)) ? - (statp->f_ffree - be64_to_cpu(dp->d_icount)) : 0; - } - - xfs_qm_dqput(dqp); - return 0; + PVFS_MOUNT(BHV_NEXT(bhv), args, cr, error); + return error; } STATIC int @@ -247,7 +191,7 @@ xfs_qm_syncall( int flags, cred_t *credp) { - struct bhv_vfs *vfsp = bhvtovfs(bhv); + struct vfs *vfsp = bhvtovfs(bhv); struct xfs_mount *mp = XFS_VFSTOM(vfsp); int error; @@ -266,7 +210,8 @@ xfs_qm_syncall( } } } - return bhv_next_vfs_sync(BHV_NEXT(bhv), flags, credp); + PVFS_SYNC(BHV_NEXT(bhv), flags, credp, error); + return error; } STATIC int @@ -401,12 +346,11 @@ STATIC struct xfs_qmops xfs_qmcore_xfs = { .xfs_dqtrxops = &xfs_trans_dquot_ops, }; -struct bhv_module_vfsops xfs_qmops = { { +struct bhv_vfsops xfs_qmops = { { BHV_IDENTITY_INIT(VFS_BHV_QM, VFS_POSITION_QM), .vfs_parseargs = xfs_qm_parseargs, .vfs_showargs = xfs_qm_showargs, .vfs_mount = xfs_qm_mount, - .vfs_statvfs = xfs_qm_statvfs, .vfs_sync = xfs_qm_syncall, .vfs_quotactl = xfs_qm_quotactl, }, }; diff --git a/fs/xfs/quota/xfs_qm_stats.c b/fs/xfs/quota/xfs_qm_stats.c index 6f858fb81..0570f7733 100644 --- a/fs/xfs/quota/xfs_qm_stats.c +++ b/fs/xfs/quota/xfs_qm_stats.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index a2f9be4bf..8a588760d 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c @@ -27,6 +27,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -35,6 +36,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -90,8 +92,8 @@ xfs_qm_quotactl( xfs_caddr_t addr) { xfs_mount_t *mp; - bhv_vfs_t *vfsp; int error; + struct vfs *vfsp; vfsp = bhvtovfs(bdp); mp = XFS_VFSTOM(vfsp); @@ -1034,7 +1036,7 @@ xfs_qm_dqrele_all_inodes( { xfs_inode_t *ip, *topino; uint ireclaims; - bhv_vnode_t *vp; + vnode_t *vp; boolean_t vnode_refd; ASSERT(mp->m_quotainfo); diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c index 0242e9666..9168918db 100644 --- a/fs/xfs/quota/xfs_trans_dquot.c +++ b/fs/xfs/quota/xfs_trans_dquot.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -32,6 +33,7 @@ #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_attr_sf.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index 36fbeccdc..b08b3d934 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c @@ -47,7 +47,7 @@ cmn_err(register int level, char *fmt, ...) va_start(ap, fmt); if (*fmt == '!') fp++; len = vsprintf(message, fp, ap); - if (level != CE_DEBUG && message[len-1] != '\n') + if (message[len-1] != '\n') strcat(message, "\n"); printk("%s%s", err_level[level], message); va_end(ap); @@ -68,7 +68,7 @@ icmn_err(register int level, char *fmt, va_list ap) level = XFS_MAX_ERR_LEVEL; spin_lock_irqsave(&xfs_err_lock,flags); len = vsprintf(message, fmt, ap); - if (level != CE_DEBUG && message[len-1] != '\n') + if (message[len-1] != '\n') strcat(message, "\n"); spin_unlock_irqrestore(&xfs_err_lock,flags); printk("%s%s", err_level[level], message); diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index 4f54dca66..e3bf58112 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h @@ -33,6 +33,9 @@ extern void cmn_err(int, char *, ...) __attribute__ ((format (printf, 2, 3))); extern void assfail(char *expr, char *f, int l); +#define prdev(fmt,targ,args...) \ + printk("Device %s - " fmt "\n", XFS_BUFTARG_NAME(targ), ## args) + #define ASSERT_ALWAYS(expr) \ (unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 4b0cb474b..2539af34e 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -21,10 +21,12 @@ #include "xfs_bit.h" #include "xfs_inum.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -37,15 +39,15 @@ #include #include -STATIC int xfs_acl_setmode(bhv_vnode_t *, xfs_acl_t *, int *); +STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *); STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); STATIC void xfs_acl_get_endian(xfs_acl_t *); STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); STATIC int xfs_acl_invalid(xfs_acl_t *); STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); -STATIC void xfs_acl_get_attr(bhv_vnode_t *, xfs_acl_t *, int, int, int *); -STATIC void xfs_acl_set_attr(bhv_vnode_t *, xfs_acl_t *, int, int *); -STATIC int xfs_acl_allow_set(bhv_vnode_t *, int); +STATIC void xfs_acl_get_attr(vnode_t *, xfs_acl_t *, int, int, int *); +STATIC void xfs_acl_set_attr(vnode_t *, xfs_acl_t *, int, int *); +STATIC int xfs_acl_allow_set(vnode_t *, int); kmem_zone_t *xfs_acl_zone; @@ -55,7 +57,7 @@ kmem_zone_t *xfs_acl_zone; */ int xfs_acl_vhasacl_access( - bhv_vnode_t *vp) + vnode_t *vp) { int error; @@ -68,7 +70,7 @@ xfs_acl_vhasacl_access( */ int xfs_acl_vhasacl_default( - bhv_vnode_t *vp) + vnode_t *vp) { int error; @@ -207,7 +209,7 @@ posix_acl_xfs_to_xattr( int xfs_acl_vget( - bhv_vnode_t *vp, + vnode_t *vp, void *acl, size_t size, int kind) @@ -239,10 +241,10 @@ xfs_acl_vget( goto out; } if (kind == _ACL_TYPE_ACCESS) { - bhv_vattr_t va; + vattr_t va; va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + VOP_GETATTR(vp, &va, 0, sys_cred, error); if (error) goto out; xfs_acl_sync_mode(va.va_mode, xfs_acl); @@ -258,7 +260,7 @@ out: int xfs_acl_vremove( - bhv_vnode_t *vp, + vnode_t *vp, int kind) { int error; @@ -266,9 +268,9 @@ xfs_acl_vremove( VN_HOLD(vp); error = xfs_acl_allow_set(vp, kind); if (!error) { - error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT? - SGI_ACL_DEFAULT: SGI_ACL_FILE, - ATTR_ROOT, sys_cred); + VOP_ATTR_REMOVE(vp, kind == _ACL_TYPE_DEFAULT? + SGI_ACL_DEFAULT: SGI_ACL_FILE, + ATTR_ROOT, sys_cred, error); if (error == ENOATTR) error = 0; /* 'scool */ } @@ -278,7 +280,7 @@ xfs_acl_vremove( int xfs_acl_vset( - bhv_vnode_t *vp, + vnode_t *vp, void *acl, size_t size, int kind) @@ -368,10 +370,10 @@ xfs_acl_iaccess( STATIC int xfs_acl_allow_set( - bhv_vnode_t *vp, + vnode_t *vp, int kind) { - bhv_vattr_t va; + vattr_t va; int error; if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND)) @@ -381,7 +383,7 @@ xfs_acl_allow_set( if (vp->v_vfsp->vfs_flag & VFS_RDONLY) return EROFS; va.va_mask = XFS_AT_UID; - error = bhv_vop_getattr(vp, &va, 0, NULL); + VOP_GETATTR(vp, &va, 0, NULL, error); if (error) return error; if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) @@ -604,7 +606,7 @@ xfs_acl_get_endian( */ STATIC void xfs_acl_get_attr( - bhv_vnode_t *vp, + vnode_t *vp, xfs_acl_t *aclp, int kind, int flags, @@ -614,9 +616,9 @@ xfs_acl_get_attr( ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); flags |= ATTR_ROOT; - *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ? - SGI_ACL_FILE : SGI_ACL_DEFAULT, - (char *)aclp, &len, flags, sys_cred); + VOP_ATTR_GET(vp, + kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE : SGI_ACL_DEFAULT, + (char *)aclp, &len, flags, sys_cred, *error); if (*error || (flags & ATTR_KERNOVAL)) return; xfs_acl_get_endian(aclp); @@ -627,7 +629,7 @@ xfs_acl_get_attr( */ STATIC void xfs_acl_set_attr( - bhv_vnode_t *vp, + vnode_t *vp, xfs_acl_t *aclp, int kind, int *error) @@ -652,19 +654,19 @@ xfs_acl_set_attr( INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); } INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); - *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ? - SGI_ACL_FILE: SGI_ACL_DEFAULT, - (char *)newacl, len, ATTR_ROOT, sys_cred); + VOP_ATTR_SET(vp, + kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE: SGI_ACL_DEFAULT, + (char *)newacl, len, ATTR_ROOT, sys_cred, *error); _ACL_FREE(newacl); } int xfs_acl_vtoacl( - bhv_vnode_t *vp, + vnode_t *vp, xfs_acl_t *access_acl, xfs_acl_t *default_acl) { - bhv_vattr_t va; + vattr_t va; int error = 0; if (access_acl) { @@ -676,7 +678,7 @@ xfs_acl_vtoacl( if (!error) { /* Got the ACL, need the mode... */ va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + VOP_GETATTR(vp, &va, 0, sys_cred, error); } if (error) @@ -699,8 +701,8 @@ xfs_acl_vtoacl( */ int xfs_acl_inherit( - bhv_vnode_t *vp, - bhv_vattr_t *vap, + vnode_t *vp, + vattr_t *vap, xfs_acl_t *pdaclp) { xfs_acl_t *cacl; @@ -755,11 +757,11 @@ xfs_acl_inherit( */ STATIC int xfs_acl_setmode( - bhv_vnode_t *vp, + vnode_t *vp, xfs_acl_t *acl, int *basicperms) { - bhv_vattr_t va; + vattr_t va; xfs_acl_entry_t *ap; xfs_acl_entry_t *gap = NULL; int i, error, nomask = 1; @@ -774,7 +776,7 @@ xfs_acl_setmode( * mode. The m:: bits take precedence over the g:: bits. */ va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + VOP_GETATTR(vp, &va, 0, sys_cred, error); if (error) return error; @@ -808,7 +810,8 @@ xfs_acl_setmode( if (gap && nomask) va.va_mode |= gap->ae_perm << 3; - return bhv_vop_setattr(vp, &va, 0, sys_cred); + VOP_SETATTR(vp, &va, 0, sys_cred, error); + return error; } /* diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h index f853cf1a6..538d0d65b 100644 --- a/fs/xfs/xfs_acl.h +++ b/fs/xfs/xfs_acl.h @@ -50,7 +50,7 @@ typedef struct xfs_acl { #ifdef CONFIG_XFS_POSIX_ACL struct vattr; -struct bhv_vnode; +struct vnode; struct xfs_inode; extern struct kmem_zone *xfs_acl_zone; @@ -58,14 +58,14 @@ extern struct kmem_zone *xfs_acl_zone; (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) #define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) -extern int xfs_acl_inherit(struct bhv_vnode *, struct bhv_vattr *, xfs_acl_t *); +extern int xfs_acl_inherit(struct vnode *, struct vattr *, xfs_acl_t *); extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); -extern int xfs_acl_vtoacl(struct bhv_vnode *, xfs_acl_t *, xfs_acl_t *); -extern int xfs_acl_vhasacl_access(struct bhv_vnode *); -extern int xfs_acl_vhasacl_default(struct bhv_vnode *); -extern int xfs_acl_vset(struct bhv_vnode *, void *, size_t, int); -extern int xfs_acl_vget(struct bhv_vnode *, void *, size_t, int); -extern int xfs_acl_vremove(struct bhv_vnode *, int); +extern int xfs_acl_vtoacl(struct vnode *, xfs_acl_t *, xfs_acl_t *); +extern int xfs_acl_vhasacl_access(struct vnode *); +extern int xfs_acl_vhasacl_default(struct vnode *); +extern int xfs_acl_vset(struct vnode *, void *, size_t, int); +extern int xfs_acl_vget(struct vnode *, void *, size_t, int); +extern int xfs_acl_vremove(struct vnode *vp, int); #define _ACL_TYPE_ACCESS 1 #define _ACL_TYPE_DEFAULT 2 diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index d2bbcd882..855822628 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -1835,47 +1837,40 @@ xfs_alloc_fix_freelist( &agbp))) return error; if (!pag->pagf_init) { - ASSERT(flags & XFS_ALLOC_FLAG_TRYLOCK); - ASSERT(!(flags & XFS_ALLOC_FLAG_FREEING)); args->agbp = NULL; return 0; } } else agbp = NULL; - /* - * If this is a metadata preferred pag and we are user data + /* If this is a metadata preferred pag and we are user data * then try somewhere else if we are not being asked to * try harder at this point */ - if (pag->pagf_metadata && args->userdata && - (flags & XFS_ALLOC_FLAG_TRYLOCK)) { - ASSERT(!(flags & XFS_ALLOC_FLAG_FREEING)); + if (pag->pagf_metadata && args->userdata && flags) { args->agbp = NULL; return 0; } - if (!(flags & XFS_ALLOC_FLAG_FREEING)) { - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; - /* - * If it looks like there isn't a long enough extent, or enough - * total blocks, reject it. - */ - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); - if ((args->minlen + args->alignment + args->minalignslop - 1) > - longest || - ((int)(pag->pagf_freeblks + pag->pagf_flcount - - need - args->total) < (int)args->minleft)) { - if (agbp) - xfs_trans_brelse(tp, agbp); - args->agbp = NULL; - return 0; - } + need = XFS_MIN_FREELIST_PAG(pag, mp); + delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; + /* + * If it looks like there isn't a long enough extent, or enough + * total blocks, reject it. + */ + longest = (pag->pagf_longest > delta) ? + (pag->pagf_longest - delta) : + (pag->pagf_flcount > 0 || pag->pagf_longest > 0); + if (args->minlen + args->alignment + args->minalignslop - 1 > longest || + (args->minleft && + (int)(pag->pagf_freeblks + pag->pagf_flcount - + need - args->total) < + (int)args->minleft)) { + if (agbp) + xfs_trans_brelse(tp, agbp); + args->agbp = NULL; + return 0; } - /* * Get the a.g. freespace buffer. * Can fail if we're not blocking on locks, and it's held. @@ -1885,8 +1880,6 @@ xfs_alloc_fix_freelist( &agbp))) return error; if (agbp == NULL) { - ASSERT(flags & XFS_ALLOC_FLAG_TRYLOCK); - ASSERT(!(flags & XFS_ALLOC_FLAG_FREEING)); args->agbp = NULL; return 0; } @@ -1896,24 +1889,22 @@ xfs_alloc_fix_freelist( */ agf = XFS_BUF_TO_AGF(agbp); need = XFS_MIN_FREELIST(agf, mp); + delta = need > be32_to_cpu(agf->agf_flcount) ? + (need - be32_to_cpu(agf->agf_flcount)) : 0; /* * If there isn't enough total or single-extent, reject it. */ - if (!(flags & XFS_ALLOC_FLAG_FREEING)) { - delta = need > be32_to_cpu(agf->agf_flcount) ? - (need - be32_to_cpu(agf->agf_flcount)) : 0; - longest = be32_to_cpu(agf->agf_longest); - longest = (longest > delta) ? (longest - delta) : - (be32_to_cpu(agf->agf_flcount) > 0 || longest > 0); - if ((args->minlen + args->alignment + args->minalignslop - 1) > - longest || - ((int)(be32_to_cpu(agf->agf_freeblks) + - be32_to_cpu(agf->agf_flcount) - need - args->total) < - (int)args->minleft)) { - xfs_trans_brelse(tp, agbp); - args->agbp = NULL; - return 0; - } + longest = be32_to_cpu(agf->agf_longest); + longest = (longest > delta) ? (longest - delta) : + (be32_to_cpu(agf->agf_flcount) > 0 || longest > 0); + if (args->minlen + args->alignment + args->minalignslop - 1 > longest || + (args->minleft && + (int)(be32_to_cpu(agf->agf_freeblks) + + be32_to_cpu(agf->agf_flcount) - need - args->total) < + (int)args->minleft)) { + xfs_trans_brelse(tp, agbp); + args->agbp = NULL; + return 0; } /* * Make the freelist shorter if it's too long. @@ -1960,13 +1951,8 @@ xfs_alloc_fix_freelist( * the restrictions correctly. Can happen for free calls * on a completely full ag. */ - if (targs.agbno == NULLAGBLOCK) { - if (flags & XFS_ALLOC_FLAG_FREEING) - break; - xfs_trans_brelse(tp, agflbp); - args->agbp = NULL; - return 0; - } + if (targs.agbno == NULLAGBLOCK) + break; /* * Put each allocated block on the list. */ @@ -2374,19 +2360,8 @@ xfs_alloc_vextent( if (args->agno == sagno && type == XFS_ALLOCTYPE_START_BNO) args->type = XFS_ALLOCTYPE_THIS_AG; - /* - * For the first allocation, we can try any AG to get - * space. However, if we already have allocated a - * block, we don't want to try AGs whose number is below - * sagno. Otherwise, we may end up with out-of-order - * locking of AGF, which might cause deadlock. - */ - if (++(args->agno) == mp->m_sb.sb_agcount) { - if (args->firstblock != NULLFSBLOCK) - args->agno = sagno; - else - args->agno = 0; - } + if (++(args->agno) == mp->m_sb.sb_agcount) + args->agno = 0; /* * Reached the starting a.g., must either be done * or switch to non-trylock mode. @@ -2452,26 +2427,31 @@ xfs_free_extent( xfs_fsblock_t bno, /* starting block number of extent */ xfs_extlen_t len) /* length of extent */ { - xfs_alloc_arg_t args; +#ifdef DEBUG + xfs_agf_t *agf; /* a.g. freespace header */ +#endif + xfs_alloc_arg_t args; /* allocation argument structure */ int error; ASSERT(len != 0); - memset(&args, 0, sizeof(xfs_alloc_arg_t)); args.tp = tp; args.mp = tp->t_mountp; args.agno = XFS_FSB_TO_AGNO(args.mp, bno); ASSERT(args.agno < args.mp->m_sb.sb_agcount); args.agbno = XFS_FSB_TO_AGBNO(args.mp, bno); + args.alignment = 1; + args.minlen = args.minleft = args.minalignslop = 0; down_read(&args.mp->m_peraglock); args.pag = &args.mp->m_perag[args.agno]; - if ((error = xfs_alloc_fix_freelist(&args, XFS_ALLOC_FLAG_FREEING))) + if ((error = xfs_alloc_fix_freelist(&args, 0))) goto error0; #ifdef DEBUG ASSERT(args.agbp != NULL); - ASSERT((args.agbno + len) <= - be32_to_cpu(XFS_BUF_TO_AGF(args.agbp)->agf_length)); + agf = XFS_BUF_TO_AGF(args.agbp); + ASSERT(args.agbno + len <= be32_to_cpu(agf->agf_length)); #endif - error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0); + error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, + len, 0); error0: up_read(&args.mp->m_peraglock); return error; diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h index 5a4256120..2d1f8928b 100644 --- a/fs/xfs/xfs_alloc.h +++ b/fs/xfs/xfs_alloc.h @@ -41,27 +41,6 @@ typedef enum xfs_alloctype * Flags for xfs_alloc_fix_freelist. */ #define XFS_ALLOC_FLAG_TRYLOCK 0x00000001 /* use trylock for buffer locking */ -#define XFS_ALLOC_FLAG_FREEING 0x00000002 /* indicate caller is freeing extents*/ - -/* - * In order to avoid ENOSPC-related deadlock caused by - * out-of-order locking of AGF buffer (PV 947395), we place - * constraints on the relationship among actual allocations for - * data blocks, freelist blocks, and potential file data bmap - * btree blocks. However, these restrictions may result in no - * actual space allocated for a delayed extent, for example, a data - * block in a certain AG is allocated but there is no additional - * block for the additional bmap btree block due to a split of the - * bmap btree of the file. The result of this may lead to an - * infinite loop in xfssyncd when the file gets flushed to disk and - * all delayed extents need to be actually allocated. To get around - * this, we explicitly set aside a few blocks which will not be - * reserved in delayed allocation. Considering the minimum number of - * needed freelist blocks is 4 fsbs _per AG_, a potential split of file's bmap - * btree requires 1 fsb, so we set the number of set-aside blocks - * to 4 + 4*agcount. - */ -#define XFS_ALLOC_SET_ASIDE(mp) (4 + ((mp)->m_sb.sb_agcount * 4)) /* * Argument structure for xfs_alloc routines. @@ -91,7 +70,6 @@ typedef struct xfs_alloc_arg { char wasfromfl; /* set if allocation is from freelist */ char isfl; /* set if is freelist blocks - !acctg */ char userdata; /* set if this is user data */ - xfs_fsblock_t firstblock; /* io first block allocated */ } xfs_alloc_arg_t; /* diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index 7446556e8..a1d92da86 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 1a2101043..b6e1e02bb 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -27,6 +27,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -34,6 +35,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -1908,7 +1910,7 @@ xfs_attr_rmtval_get(xfs_da_args_t *args) error = xfs_bmapi(args->trans, args->dp, (xfs_fileoff_t)lblkno, args->rmtblkcnt, XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, - NULL, 0, map, &nmap, NULL, NULL); + NULL, 0, map, &nmap, NULL); if (error) return(error); ASSERT(nmap >= 1); @@ -1986,7 +1988,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args) XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA | XFS_BMAPI_WRITE, args->firstblock, args->total, &map, &nmap, - args->flist, NULL); + args->flist); if (!error) { error = xfs_bmap_finish(&args->trans, args->flist, *args->firstblock, &committed); @@ -2037,8 +2039,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args) error = xfs_bmapi(NULL, dp, (xfs_fileoff_t)lblkno, args->rmtblkcnt, XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, - args->firstblock, 0, &map, &nmap, - NULL, NULL); + args->firstblock, 0, &map, &nmap, NULL); if (error) { return(error); } @@ -2103,7 +2104,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args) args->rmtblkcnt, XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, args->firstblock, 0, &map, &nmap, - args->flist, NULL); + args->flist); if (error) { return(error); } @@ -2141,8 +2142,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args) XFS_BMAP_INIT(args->flist, args->firstblock); error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt, XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, - 1, args->firstblock, args->flist, - NULL, &done); + 1, args->firstblock, args->flist, &done); if (!error) { error = xfs_bmap_finish(&args->trans, args->flist, *args->firstblock, &committed); @@ -2322,56 +2322,56 @@ xfs_attr_trace_enter(int type, char *where, STATIC int posix_acl_access_set( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + vnode_t *vp, char *name, void *data, size_t size, int xflags) { return xfs_acl_vset(vp, data, size, _ACL_TYPE_ACCESS); } STATIC int posix_acl_access_remove( - bhv_vnode_t *vp, char *name, int xflags) + struct vnode *vp, char *name, int xflags) { return xfs_acl_vremove(vp, _ACL_TYPE_ACCESS); } STATIC int posix_acl_access_get( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + vnode_t *vp, char *name, void *data, size_t size, int xflags) { return xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS); } STATIC int posix_acl_access_exists( - bhv_vnode_t *vp) + vnode_t *vp) { return xfs_acl_vhasacl_access(vp); } STATIC int posix_acl_default_set( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + vnode_t *vp, char *name, void *data, size_t size, int xflags) { return xfs_acl_vset(vp, data, size, _ACL_TYPE_DEFAULT); } STATIC int posix_acl_default_get( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + vnode_t *vp, char *name, void *data, size_t size, int xflags) { return xfs_acl_vget(vp, data, size, _ACL_TYPE_DEFAULT); } STATIC int posix_acl_default_remove( - bhv_vnode_t *vp, char *name, int xflags) + struct vnode *vp, char *name, int xflags) { return xfs_acl_vremove(vp, _ACL_TYPE_DEFAULT); } STATIC int posix_acl_default_exists( - bhv_vnode_t *vp) + vnode_t *vp) { return xfs_acl_vhasacl_default(vp); } @@ -2404,18 +2404,21 @@ STATIC struct attrnames *attr_system_names[] = STATIC int attr_generic_set( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + struct vnode *vp, char *name, void *data, size_t size, int xflags) { - return -bhv_vop_attr_set(vp, name, data, size, xflags, NULL); + int error; + + VOP_ATTR_SET(vp, name, data, size, xflags, NULL, error); + return -error; } STATIC int attr_generic_get( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + struct vnode *vp, char *name, void *data, size_t size, int xflags) { int error, asize = size; - error = bhv_vop_attr_get(vp, name, data, &asize, xflags, NULL); + VOP_ATTR_GET(vp, name, data, &asize, xflags, NULL, error); if (!error) return asize; return -error; @@ -2423,9 +2426,12 @@ attr_generic_get( STATIC int attr_generic_remove( - bhv_vnode_t *vp, char *name, int xflags) + struct vnode *vp, char *name, int xflags) { - return -bhv_vop_attr_remove(vp, name, xflags, NULL); + int error; + + VOP_ATTR_REMOVE(vp, name, xflags, NULL, error); + return -error; } STATIC int @@ -2453,7 +2459,7 @@ attr_generic_listadd( STATIC int attr_system_list( - bhv_vnode_t *vp, + struct vnode *vp, void *data, size_t size, ssize_t *result) @@ -2475,12 +2481,12 @@ attr_system_list( int attr_generic_list( - bhv_vnode_t *vp, void *data, size_t size, int xflags, ssize_t *result) + struct vnode *vp, void *data, size_t size, int xflags, ssize_t *result) { attrlist_cursor_kern_t cursor = { 0 }; int error; - error = bhv_vop_attr_list(vp, data, size, xflags, &cursor, NULL); + VOP_ATTR_LIST(vp, data, size, xflags, &cursor, NULL, error); if (error > 0) return -error; *result = -error; @@ -2508,7 +2514,7 @@ attr_lookup_namespace( */ STATIC int attr_user_capable( - bhv_vnode_t *vp, + struct vnode *vp, cred_t *cred) { struct inode *inode = vn_to_inode(vp); @@ -2526,7 +2532,7 @@ attr_user_capable( STATIC int attr_trusted_capable( - bhv_vnode_t *vp, + struct vnode *vp, cred_t *cred) { struct inode *inode = vn_to_inode(vp); @@ -2540,7 +2546,7 @@ attr_trusted_capable( STATIC int attr_secure_capable( - bhv_vnode_t *vp, + struct vnode *vp, cred_t *cred) { return -ENOSECURITY; @@ -2548,7 +2554,7 @@ attr_secure_capable( STATIC int attr_system_set( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + struct vnode *vp, char *name, void *data, size_t size, int xflags) { attrnames_t *namesp; int error; @@ -2567,7 +2573,7 @@ attr_system_set( STATIC int attr_system_get( - bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) + struct vnode *vp, char *name, void *data, size_t size, int xflags) { attrnames_t *namesp; @@ -2579,7 +2585,7 @@ attr_system_get( STATIC int attr_system_remove( - bhv_vnode_t *vp, char *name, int xflags) + struct vnode *vp, char *name, int xflags) { attrnames_t *namesp; diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index 981633f6c..b2c7b9fcd 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h @@ -36,13 +36,13 @@ *========================================================================*/ struct cred; -struct bhv_vnode; +struct vnode; -typedef int (*attrset_t)(struct bhv_vnode *, char *, void *, size_t, int); -typedef int (*attrget_t)(struct bhv_vnode *, char *, void *, size_t, int); -typedef int (*attrremove_t)(struct bhv_vnode *, char *, int); -typedef int (*attrexists_t)(struct bhv_vnode *); -typedef int (*attrcapable_t)(struct bhv_vnode *, struct cred *); +typedef int (*attrset_t)(struct vnode *, char *, void *, size_t, int); +typedef int (*attrget_t)(struct vnode *, char *, void *, size_t, int); +typedef int (*attrremove_t)(struct vnode *, char *, int); +typedef int (*attrexists_t)(struct vnode *); +typedef int (*attrcapable_t)(struct vnode *, struct cred *); typedef struct attrnames { char * attr_name; @@ -63,7 +63,7 @@ extern struct attrnames attr_trusted; extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT]; extern attrnames_t *attr_lookup_namespace(char *, attrnames_t **, int); -extern int attr_generic_list(struct bhv_vnode *, void *, size_t, int, ssize_t *); +extern int attr_generic_list(struct vnode *, void *, size_t, int, ssize_t *); #define ATTR_DONTFOLLOW 0x0001 /* -- unused, from IRIX -- */ #define ATTR_ROOT 0x0002 /* use attrs in root (trusted) namespace */ diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 9455051f0..9462be86a 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -33,6 +34,7 @@ #include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -2988,7 +2990,7 @@ xfs_attr_leaf_freextent(xfs_trans_t **trans, xfs_inode_t *dp, nmap = 1; error = xfs_bmapi(*trans, dp, (xfs_fileoff_t)tblkno, tblkcnt, XFS_BMAPI_ATTRFORK | XFS_BMAPI_METADATA, - NULL, 0, &map, &nmap, NULL, NULL); + NULL, 0, &map, &nmap, NULL); if (error) { return(error); } diff --git a/fs/xfs/xfs_behavior.h b/fs/xfs/xfs_behavior.h index 6e6e56fb3..1d8ff1032 100644 --- a/fs/xfs/xfs_behavior.h +++ b/fs/xfs/xfs_behavior.h @@ -78,12 +78,15 @@ * */ +struct bhv_head_lock; + /* * Behavior head. Head of the chain of behaviors. * Contained within each virtualized object data structure. */ typedef struct bhv_head { struct bhv_desc *bh_first; /* first behavior in chain */ + struct bhv_head_lock *bh_lockp; /* pointer to lock info struct */ } bhv_head_t; /* diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index bf46fae30..26939d364 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -24,11 +24,13 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -38,15 +40,13 @@ #include "xfs_mount.h" #include "xfs_ialloc.h" #include "xfs_itable.h" -#include "xfs_dir2_data.h" -#include "xfs_dir2_leaf.h" -#include "xfs_dir2_block.h" #include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_rtalloc.h" #include "xfs_error.h" +#include "xfs_dir_leaf.h" #include "xfs_attr_leaf.h" #include "xfs_rw.h" #include "xfs_quota.h" @@ -101,7 +101,6 @@ xfs_bmap_add_extent( xfs_fsblock_t *first, /* pointer to firstblock variable */ xfs_bmap_free_t *flist, /* list of extents to be freed */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork, /* data or attr fork */ int rsvd); /* OK to allocate reserved blocks */ @@ -119,7 +118,6 @@ xfs_bmap_add_extent_delay_real( xfs_fsblock_t *first, /* pointer to firstblock variable */ xfs_bmap_free_t *flist, /* list of extents to be freed */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int rsvd); /* OK to allocate reserved blocks */ /* @@ -133,7 +131,6 @@ xfs_bmap_add_extent_hole_delay( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ int *logflagsp,/* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int rsvd); /* OK to allocate reserved blocks */ /* @@ -147,7 +144,6 @@ xfs_bmap_add_extent_hole_real( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork); /* data or attr fork */ /* @@ -160,8 +156,7 @@ xfs_bmap_add_extent_unwritten_real( xfs_extnum_t idx, /* extent number to update/insert */ xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ - int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta); /* Change made to incore extents */ + int *logflagsp); /* inode logging flags */ /* * xfs_bmap_alloc is called by xfs_bmapi to allocate an extent for a file. @@ -208,7 +203,6 @@ xfs_bmap_del_extent( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ int *logflagsp,/* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork, /* data or attr fork */ int rsvd); /* OK to allocate reserved blocks */ @@ -516,7 +510,7 @@ xfs_bmap_add_attrfork_local( dargs.total = mp->m_dirblkfsbs; dargs.whichfork = XFS_DATA_FORK; dargs.trans = tp; - error = xfs_dir2_sf_to_block(&dargs); + error = XFS_DIR_SHORTFORM_TO_SINGLE(mp, &dargs); } else error = xfs_bmap_local_to_extents(tp, ip, firstblock, 1, flags, XFS_DATA_FORK); @@ -536,7 +530,6 @@ xfs_bmap_add_extent( xfs_fsblock_t *first, /* pointer to firstblock variable */ xfs_bmap_free_t *flist, /* list of extents to be freed */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork, /* data or attr fork */ int rsvd) /* OK to use reserved data blocks */ { @@ -574,15 +567,6 @@ xfs_bmap_add_extent( logflags = XFS_ILOG_CORE | XFS_ILOG_FEXT(whichfork); } else logflags = 0; - /* DELTA: single new extent */ - if (delta) { - if (delta->xed_startoff > new->br_startoff) - delta->xed_startoff = new->br_startoff; - if (delta->xed_blockcount < - new->br_startoff + new->br_blockcount) - delta->xed_blockcount = new->br_startoff + - new->br_blockcount; - } } /* * Any kind of new delayed allocation goes here. @@ -592,7 +576,7 @@ xfs_bmap_add_extent( ASSERT((cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL) == 0); if ((error = xfs_bmap_add_extent_hole_delay(ip, idx, cur, new, - &logflags, delta, rsvd))) + &logflags, rsvd))) goto done; } /* @@ -603,7 +587,7 @@ xfs_bmap_add_extent( ASSERT((cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL) == 0); if ((error = xfs_bmap_add_extent_hole_real(ip, idx, cur, new, - &logflags, delta, whichfork))) + &logflags, whichfork))) goto done; } else { xfs_bmbt_irec_t prev; /* old extent at offset idx */ @@ -628,17 +612,17 @@ xfs_bmap_add_extent( XFS_BTCUR_BPRV_WASDEL); if ((error = xfs_bmap_add_extent_delay_real(ip, idx, &cur, new, &da_new, first, flist, - &logflags, delta, rsvd))) + &logflags, rsvd))) goto done; } else if (new->br_state == XFS_EXT_NORM) { ASSERT(new->br_state == XFS_EXT_NORM); if ((error = xfs_bmap_add_extent_unwritten_real( - ip, idx, &cur, new, &logflags, delta))) + ip, idx, &cur, new, &logflags))) goto done; } else { ASSERT(new->br_state == XFS_EXT_UNWRITTEN); if ((error = xfs_bmap_add_extent_unwritten_real( - ip, idx, &cur, new, &logflags, delta))) + ip, idx, &cur, new, &logflags))) goto done; } ASSERT(*curp == cur || *curp == NULL); @@ -651,7 +635,7 @@ xfs_bmap_add_extent( ASSERT((cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL) == 0); if ((error = xfs_bmap_add_extent_hole_real(ip, idx, cur, - new, &logflags, delta, whichfork))) + new, &logflags, whichfork))) goto done; } } @@ -716,7 +700,6 @@ xfs_bmap_add_extent_delay_real( xfs_fsblock_t *first, /* pointer to firstblock variable */ xfs_bmap_free_t *flist, /* list of extents to be freed */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int rsvd) /* OK to use reserved data block allocation */ { xfs_btree_cur_t *cur; /* btree cursor */ @@ -733,8 +716,8 @@ xfs_bmap_add_extent_delay_real( /* left is 0, right is 1, prev is 2 */ int rval=0; /* return value (logging flags) */ int state = 0;/* state bits, accessed thru macros */ - xfs_filblks_t temp=0; /* value for dnew calculations */ - xfs_filblks_t temp2=0;/* value for dnew calculations */ + xfs_filblks_t temp; /* value for dnew calculations */ + xfs_filblks_t temp2; /* value for dnew calculations */ int tmp_rval; /* partial logging flags */ enum { /* bit number definitions for state */ LEFT_CONTIG, RIGHT_CONTIG, @@ -856,11 +839,6 @@ xfs_bmap_add_extent_delay_real( goto done; } *dnew = 0; - /* DELTA: Three in-core extents are replaced by one. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK3(LEFT_FILLING, RIGHT_FILLING, LEFT_CONTIG): @@ -894,10 +872,6 @@ xfs_bmap_add_extent_delay_real( goto done; } *dnew = 0; - /* DELTA: Two in-core extents are replaced by one. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount; break; case MASK3(LEFT_FILLING, RIGHT_FILLING, RIGHT_CONTIG): @@ -932,10 +906,6 @@ xfs_bmap_add_extent_delay_real( goto done; } *dnew = 0; - /* DELTA: Two in-core extents are replaced by one. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK2(LEFT_FILLING, RIGHT_FILLING): @@ -966,9 +936,6 @@ xfs_bmap_add_extent_delay_real( ASSERT(i == 1); } *dnew = 0; - /* DELTA: The in-core extent described by new changed type. */ - temp = new->br_startoff; - temp2 = new->br_blockcount; break; case MASK2(LEFT_FILLING, LEFT_CONTIG): @@ -1011,10 +978,6 @@ xfs_bmap_add_extent_delay_real( xfs_bmap_trace_post_update(fname, "LF|LC", ip, idx, XFS_DATA_FORK); *dnew = temp; - /* DELTA: The boundary between two in-core extents moved. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount; break; case MASK(LEFT_FILLING): @@ -1062,9 +1025,6 @@ xfs_bmap_add_extent_delay_real( xfs_bmap_trace_post_update(fname, "LF", ip, idx + 1, XFS_DATA_FORK); *dnew = temp; - /* DELTA: One in-core extent is split in two. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case MASK2(RIGHT_FILLING, RIGHT_CONTIG): @@ -1107,10 +1067,6 @@ xfs_bmap_add_extent_delay_real( xfs_bmap_trace_post_update(fname, "RF|RC", ip, idx, XFS_DATA_FORK); *dnew = temp; - /* DELTA: The boundary between two in-core extents moved. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK(RIGHT_FILLING): @@ -1156,9 +1112,6 @@ xfs_bmap_add_extent_delay_real( xfs_bmbt_set_startblock(ep, NULLSTARTBLOCK((int)temp)); xfs_bmap_trace_post_update(fname, "RF", ip, idx, XFS_DATA_FORK); *dnew = temp; - /* DELTA: One in-core extent is split in two. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case 0: @@ -1241,9 +1194,6 @@ xfs_bmap_add_extent_delay_real( xfs_bmap_trace_post_update(fname, "0", ip, idx + 2, XFS_DATA_FORK); *dnew = temp + temp2; - /* DELTA: One in-core extent is split in three. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case MASK3(LEFT_FILLING, LEFT_CONTIG, RIGHT_CONTIG): @@ -1259,13 +1209,6 @@ xfs_bmap_add_extent_delay_real( ASSERT(0); } *curp = cur; - if (delta) { - temp2 += temp; - if (delta->xed_startoff > temp) - delta->xed_startoff = temp; - if (delta->xed_blockcount < temp2) - delta->xed_blockcount = temp2; - } done: *logflagsp = rval; return error; @@ -1292,8 +1235,7 @@ xfs_bmap_add_extent_unwritten_real( xfs_extnum_t idx, /* extent number to update/insert */ xfs_btree_cur_t **curp, /* if *curp is null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ - int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta) /* Change made to incore extents */ + int *logflagsp) /* inode logging flags */ { xfs_btree_cur_t *cur; /* btree cursor */ xfs_bmbt_rec_t *ep; /* extent entry for idx */ @@ -1310,8 +1252,6 @@ xfs_bmap_add_extent_unwritten_real( /* left is 0, right is 1, prev is 2 */ int rval=0; /* return value (logging flags) */ int state = 0;/* state bits, accessed thru macros */ - xfs_filblks_t temp=0; - xfs_filblks_t temp2=0; enum { /* bit number definitions for state */ LEFT_CONTIG, RIGHT_CONTIG, LEFT_FILLING, RIGHT_FILLING, @@ -1440,11 +1380,6 @@ xfs_bmap_add_extent_unwritten_real( RIGHT.br_blockcount, LEFT.br_state))) goto done; } - /* DELTA: Three in-core extents are replaced by one. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK3(LEFT_FILLING, RIGHT_FILLING, LEFT_CONTIG): @@ -1484,10 +1419,6 @@ xfs_bmap_add_extent_unwritten_real( LEFT.br_state))) goto done; } - /* DELTA: Two in-core extents are replaced by one. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount; break; case MASK3(LEFT_FILLING, RIGHT_FILLING, RIGHT_CONTIG): @@ -1528,10 +1459,6 @@ xfs_bmap_add_extent_unwritten_real( newext))) goto done; } - /* DELTA: Two in-core extents are replaced by one. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK2(LEFT_FILLING, RIGHT_FILLING): @@ -1560,9 +1487,6 @@ xfs_bmap_add_extent_unwritten_real( newext))) goto done; } - /* DELTA: The in-core extent described by new changed type. */ - temp = new->br_startoff; - temp2 = new->br_blockcount; break; case MASK2(LEFT_FILLING, LEFT_CONTIG): @@ -1610,10 +1534,6 @@ xfs_bmap_add_extent_unwritten_real( LEFT.br_state)) goto done; } - /* DELTA: The boundary between two in-core extents moved. */ - temp = LEFT.br_startoff; - temp2 = LEFT.br_blockcount + - PREV.br_blockcount; break; case MASK(LEFT_FILLING): @@ -1654,9 +1574,6 @@ xfs_bmap_add_extent_unwritten_real( goto done; ASSERT(i == 1); } - /* DELTA: One in-core extent is split in two. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case MASK2(RIGHT_FILLING, RIGHT_CONTIG): @@ -1700,10 +1617,6 @@ xfs_bmap_add_extent_unwritten_real( newext))) goto done; } - /* DELTA: The boundary between two in-core extents moved. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount + - RIGHT.br_blockcount; break; case MASK(RIGHT_FILLING): @@ -1744,9 +1657,6 @@ xfs_bmap_add_extent_unwritten_real( goto done; ASSERT(i == 1); } - /* DELTA: One in-core extent is split in two. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case 0: @@ -1800,9 +1710,6 @@ xfs_bmap_add_extent_unwritten_real( goto done; ASSERT(i == 1); } - /* DELTA: One in-core extent is split in three. */ - temp = PREV.br_startoff; - temp2 = PREV.br_blockcount; break; case MASK3(LEFT_FILLING, LEFT_CONTIG, RIGHT_CONTIG): @@ -1818,13 +1725,6 @@ xfs_bmap_add_extent_unwritten_real( ASSERT(0); } *curp = cur; - if (delta) { - temp2 += temp; - if (delta->xed_startoff > temp) - delta->xed_startoff = temp; - if (delta->xed_blockcount < temp2) - delta->xed_blockcount = temp2; - } done: *logflagsp = rval; return error; @@ -1853,7 +1753,6 @@ xfs_bmap_add_extent_hole_delay( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int rsvd) /* OK to allocate reserved blocks */ { xfs_bmbt_rec_t *ep; /* extent record for idx */ @@ -1866,8 +1765,7 @@ xfs_bmap_add_extent_hole_delay( xfs_filblks_t oldlen=0; /* old indirect size */ xfs_bmbt_irec_t right; /* right neighbor extent entry */ int state; /* state bits, accessed thru macros */ - xfs_filblks_t temp=0; /* temp for indirect calculations */ - xfs_filblks_t temp2=0; + xfs_filblks_t temp; /* temp for indirect calculations */ enum { /* bit number definitions for state */ LEFT_CONTIG, RIGHT_CONTIG, LEFT_DELAY, RIGHT_DELAY, @@ -1946,9 +1844,6 @@ xfs_bmap_add_extent_hole_delay( XFS_DATA_FORK); xfs_iext_remove(ifp, idx, 1); ip->i_df.if_lastex = idx - 1; - /* DELTA: Two in-core extents were replaced by one. */ - temp2 = temp; - temp = left.br_startoff; break; case MASK(LEFT_CONTIG): @@ -1969,9 +1864,6 @@ xfs_bmap_add_extent_hole_delay( xfs_bmap_trace_post_update(fname, "LC", ip, idx - 1, XFS_DATA_FORK); ip->i_df.if_lastex = idx - 1; - /* DELTA: One in-core extent grew into a hole. */ - temp2 = temp; - temp = left.br_startoff; break; case MASK(RIGHT_CONTIG): @@ -1989,9 +1881,6 @@ xfs_bmap_add_extent_hole_delay( NULLSTARTBLOCK((int)newlen), temp, right.br_state); xfs_bmap_trace_post_update(fname, "RC", ip, idx, XFS_DATA_FORK); ip->i_df.if_lastex = idx; - /* DELTA: One in-core extent grew into a hole. */ - temp2 = temp; - temp = new->br_startoff; break; case 0: @@ -2005,9 +1894,6 @@ xfs_bmap_add_extent_hole_delay( XFS_DATA_FORK); xfs_iext_insert(ifp, idx, 1, new); ip->i_df.if_lastex = idx; - /* DELTA: A new in-core extent was added in a hole. */ - temp2 = new->br_blockcount; - temp = new->br_startoff; break; } if (oldlen != newlen) { @@ -2018,13 +1904,6 @@ xfs_bmap_add_extent_hole_delay( * Nothing to do for disk quota accounting here. */ } - if (delta) { - temp2 += temp; - if (delta->xed_startoff > temp) - delta->xed_startoff = temp; - if (delta->xed_blockcount < temp2) - delta->xed_blockcount = temp2; - } *logflagsp = 0; return 0; #undef MASK @@ -2046,7 +1925,6 @@ xfs_bmap_add_extent_hole_real( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *new, /* new data to add to file extents */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork) /* data or attr fork */ { xfs_bmbt_rec_t *ep; /* pointer to extent entry ins. point */ @@ -2058,10 +1936,7 @@ xfs_bmap_add_extent_hole_real( xfs_ifork_t *ifp; /* inode fork pointer */ xfs_bmbt_irec_t left; /* left neighbor extent entry */ xfs_bmbt_irec_t right; /* right neighbor extent entry */ - int rval=0; /* return value (logging flags) */ int state; /* state bits, accessed thru macros */ - xfs_filblks_t temp=0; - xfs_filblks_t temp2=0; enum { /* bit number definitions for state */ LEFT_CONTIG, RIGHT_CONTIG, LEFT_DELAY, RIGHT_DELAY, @@ -2118,7 +1993,6 @@ xfs_bmap_add_extent_hole_real( left.br_blockcount + new->br_blockcount + right.br_blockcount <= MAXEXTLEN)); - error = 0; /* * Select which case we're in here, and implement it. */ @@ -2144,35 +2018,25 @@ xfs_bmap_add_extent_hole_real( XFS_IFORK_NEXT_SET(ip, whichfork, XFS_IFORK_NEXTENTS(ip, whichfork) - 1); if (cur == NULL) { - rval = XFS_ILOG_CORE | XFS_ILOG_FEXT(whichfork); - } else { - rval = XFS_ILOG_CORE; - if ((error = xfs_bmbt_lookup_eq(cur, - right.br_startoff, - right.br_startblock, - right.br_blockcount, &i))) - goto done; - ASSERT(i == 1); - if ((error = xfs_bmbt_delete(cur, &i))) - goto done; - ASSERT(i == 1); - if ((error = xfs_bmbt_decrement(cur, 0, &i))) - goto done; - ASSERT(i == 1); - if ((error = xfs_bmbt_update(cur, left.br_startoff, - left.br_startblock, - left.br_blockcount + - new->br_blockcount + - right.br_blockcount, - left.br_state))) - goto done; + *logflagsp = XFS_ILOG_CORE | XFS_ILOG_FEXT(whichfork); + return 0; } - /* DELTA: Two in-core extents were replaced by one. */ - temp = left.br_startoff; - temp2 = left.br_blockcount + - new->br_blockcount + - right.br_blockcount; - break; + *logflagsp = XFS_ILOG_CORE; + if ((error = xfs_bmbt_lookup_eq(cur, right.br_startoff, + right.br_startblock, right.br_blockcount, &i))) + return error; + ASSERT(i == 1); + if ((error = xfs_bmbt_delete(cur, &i))) + return error; + ASSERT(i == 1); + if ((error = xfs_bmbt_decrement(cur, 0, &i))) + return error; + ASSERT(i == 1); + error = xfs_bmbt_update(cur, left.br_startoff, + left.br_startblock, + left.br_blockcount + new->br_blockcount + + right.br_blockcount, left.br_state); + return error; case MASK(LEFT_CONTIG): /* @@ -2186,27 +2050,19 @@ xfs_bmap_add_extent_hole_real( xfs_bmap_trace_post_update(fname, "LC", ip, idx - 1, whichfork); ifp->if_lastex = idx - 1; if (cur == NULL) { - rval = XFS_ILOG_FEXT(whichfork); - } else { - rval = 0; - if ((error = xfs_bmbt_lookup_eq(cur, - left.br_startoff, - left.br_startblock, - left.br_blockcount, &i))) - goto done; - ASSERT(i == 1); - if ((error = xfs_bmbt_update(cur, left.br_startoff, - left.br_startblock, - left.br_blockcount + - new->br_blockcount, - left.br_state))) - goto done; + *logflagsp = XFS_ILOG_FEXT(whichfork); + return 0; } - /* DELTA: One in-core extent grew. */ - temp = left.br_startoff; - temp2 = left.br_blockcount + - new->br_blockcount; - break; + *logflagsp = 0; + if ((error = xfs_bmbt_lookup_eq(cur, left.br_startoff, + left.br_startblock, left.br_blockcount, &i))) + return error; + ASSERT(i == 1); + error = xfs_bmbt_update(cur, left.br_startoff, + left.br_startblock, + left.br_blockcount + new->br_blockcount, + left.br_state); + return error; case MASK(RIGHT_CONTIG): /* @@ -2221,27 +2077,19 @@ xfs_bmap_add_extent_hole_real( xfs_bmap_trace_post_update(fname, "RC", ip, idx, whichfork); ifp->if_lastex = idx; if (cur == NULL) { - rval = XFS_ILOG_FEXT(whichfork); - } else { - rval = 0; - if ((error = xfs_bmbt_lookup_eq(cur, - right.br_startoff, - right.br_startblock, - right.br_blockcount, &i))) - goto done; - ASSERT(i == 1); - if ((error = xfs_bmbt_update(cur, new->br_startoff, - new->br_startblock, - new->br_blockcount + - right.br_blockcount, - right.br_state))) - goto done; + *logflagsp = XFS_ILOG_FEXT(whichfork); + return 0; } - /* DELTA: One in-core extent grew. */ - temp = new->br_startoff; - temp2 = new->br_blockcount + - right.br_blockcount; - break; + *logflagsp = 0; + if ((error = xfs_bmbt_lookup_eq(cur, right.br_startoff, + right.br_startblock, right.br_blockcount, &i))) + return error; + ASSERT(i == 1); + error = xfs_bmbt_update(cur, new->br_startoff, + new->br_startblock, + new->br_blockcount + right.br_blockcount, + right.br_state); + return error; case 0: /* @@ -2256,41 +2104,29 @@ xfs_bmap_add_extent_hole_real( XFS_IFORK_NEXT_SET(ip, whichfork, XFS_IFORK_NEXTENTS(ip, whichfork) + 1); if (cur == NULL) { - rval = XFS_ILOG_CORE | XFS_ILOG_FEXT(whichfork); - } else { - rval = XFS_ILOG_CORE; - if ((error = xfs_bmbt_lookup_eq(cur, - new->br_startoff, - new->br_startblock, - new->br_blockcount, &i))) - goto done; - ASSERT(i == 0); - cur->bc_rec.b.br_state = new->br_state; - if ((error = xfs_bmbt_insert(cur, &i))) - goto done; - ASSERT(i == 1); + *logflagsp = XFS_ILOG_CORE | XFS_ILOG_FEXT(whichfork); + return 0; } - /* DELTA: A new extent was added in a hole. */ - temp = new->br_startoff; - temp2 = new->br_blockcount; - break; - } - if (delta) { - temp2 += temp; - if (delta->xed_startoff > temp) - delta->xed_startoff = temp; - if (delta->xed_blockcount < temp2) - delta->xed_blockcount = temp2; + *logflagsp = XFS_ILOG_CORE; + if ((error = xfs_bmbt_lookup_eq(cur, new->br_startoff, + new->br_startblock, new->br_blockcount, &i))) + return error; + ASSERT(i == 0); + cur->bc_rec.b.br_state = new->br_state; + if ((error = xfs_bmbt_insert(cur, &i))) + return error; + ASSERT(i == 1); + return 0; } -done: - *logflagsp = rval; - return error; #undef MASK #undef MASK2 #undef STATE_SET #undef STATE_TEST #undef STATE_SET_TEST #undef SWITCH_STATE + /* NOTREACHED */ + ASSERT(0); + return 0; /* keep gcc quite */ } /* @@ -2762,7 +2598,6 @@ xfs_bmap_btalloc( args.mp = mp; args.fsbno = ap->rval; args.maxlen = MIN(ap->alen, mp->m_sb.sb_agblocks); - args.firstblock = ap->firstblock; blen = 0; if (nullfb) { args.type = XFS_ALLOCTYPE_START_BNO; @@ -2822,7 +2657,7 @@ xfs_bmap_btalloc( else args.minlen = ap->alen; } else if (ap->low) { - args.type = XFS_ALLOCTYPE_START_BNO; + args.type = XFS_ALLOCTYPE_FIRST_AG; args.total = args.minlen = ap->minlen; } else { args.type = XFS_ALLOCTYPE_NEAR_BNO; @@ -2834,7 +2669,7 @@ xfs_bmap_btalloc( args.prod = ap->ip->i_d.di_extsize; if ((args.mod = (xfs_extlen_t)do_mod(ap->off, args.prod))) args.mod = (xfs_extlen_t)(args.prod - args.mod); - } else if (mp->m_sb.sb_blocksize >= NBPP) { + } else if (unlikely(mp->m_sb.sb_blocksize >= NBPP)) { args.prod = 1; args.mod = 0; } else { @@ -3050,7 +2885,6 @@ xfs_bmap_del_extent( xfs_btree_cur_t *cur, /* if null, not a btree */ xfs_bmbt_irec_t *del, /* data to remove from extents */ int *logflagsp, /* inode logging flags */ - xfs_extdelta_t *delta, /* Change made to incore extents */ int whichfork, /* data or attr fork */ int rsvd) /* OK to allocate reserved blocks */ { @@ -3359,14 +3193,6 @@ xfs_bmap_del_extent( if (da_old > da_new) xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int)(da_old - da_new), rsvd); - if (delta) { - /* DELTA: report the original extent. */ - if (delta->xed_startoff > got.br_startoff) - delta->xed_startoff = got.br_startoff; - if (delta->xed_blockcount < got.br_startoff+got.br_blockcount) - delta->xed_blockcount = got.br_startoff + - got.br_blockcount; - } done: *logflagsp = flags; return error; @@ -3453,7 +3279,6 @@ xfs_bmap_extents_to_btree( XFS_IFORK_FMT_SET(ip, whichfork, XFS_DINODE_FMT_BTREE); args.tp = tp; args.mp = mp; - args.firstblock = *firstblock; if (*firstblock == NULLFSBLOCK) { args.type = XFS_ALLOCTYPE_START_BNO; args.fsbno = XFS_INO_TO_FSB(mp, ip->i_ino); @@ -3589,7 +3414,6 @@ xfs_bmap_local_to_extents( args.tp = tp; args.mp = ip->i_mount; - args.firstblock = *firstblock; ASSERT((ifp->if_flags & (XFS_IFINLINE|XFS_IFEXTENTS|XFS_IFEXTIREC)) == XFS_IFINLINE); /* @@ -3929,7 +3753,7 @@ xfs_bunmap_trace( if (ip->i_rwtrace == NULL) return; ktrace_enter(ip->i_rwtrace, - (void *)(__psint_t)XFS_BUNMAP, + (void *)(__psint_t)XFS_BUNMAPI, (void *)ip, (void *)(__psint_t)((ip->i_d.di_size >> 32) & 0xffffffff), (void *)(__psint_t)(ip->i_d.di_size & 0xffffffff), @@ -4263,8 +4087,8 @@ xfs_bmap_finish( if (!XFS_FORCED_SHUTDOWN(mp)) xfs_force_shutdown(mp, (error == EFSCORRUPTED) ? - SHUTDOWN_CORRUPT_INCORE : - SHUTDOWN_META_IO_ERROR); + XFS_CORRUPT_INCORE : + XFS_METADATA_IO_ERROR); return error; } xfs_trans_log_efd_extent(ntp, efd, free->xbfi_startblock, @@ -4714,8 +4538,7 @@ xfs_bmapi( xfs_extlen_t total, /* total blocks needed */ xfs_bmbt_irec_t *mval, /* output: map values */ int *nmap, /* i/o: mval size/count */ - xfs_bmap_free_t *flist, /* i/o: list extents to free */ - xfs_extdelta_t *delta) /* o: change made to incore extents */ + xfs_bmap_free_t *flist) /* i/o: list extents to free */ { xfs_fsblock_t abno; /* allocated block number */ xfs_extlen_t alen; /* allocated extent length */ @@ -4827,10 +4650,6 @@ xfs_bmapi( end = bno + len; obno = bno; bma.ip = NULL; - if (delta) { - delta->xed_startoff = NULLFILEOFF; - delta->xed_blockcount = 0; - } while (bno < end && n < *nmap) { /* * Reading past eof, act as though there's a hole @@ -4993,7 +4812,7 @@ xfs_bmapi( bma.firstblock = *firstblock; bma.alen = alen; bma.off = aoff; - bma.conv = !!(flags & XFS_BMAPI_CONVERT); + bma.conv = (flags & XFS_BMAPI_CONVERT); bma.wasdel = wasdelay; bma.minlen = minlen; bma.low = flist->xbf_low; @@ -5067,8 +4886,8 @@ xfs_bmapi( got.br_state = XFS_EXT_UNWRITTEN; } error = xfs_bmap_add_extent(ip, lastx, &cur, &got, - firstblock, flist, &tmp_logflags, delta, - whichfork, (flags & XFS_BMAPI_RSVBLOCKS)); + firstblock, flist, &tmp_logflags, whichfork, + (flags & XFS_BMAPI_RSVBLOCKS)); logflags |= tmp_logflags; if (error) goto error0; @@ -5164,8 +4983,8 @@ xfs_bmapi( } mval->br_state = XFS_EXT_NORM; error = xfs_bmap_add_extent(ip, lastx, &cur, mval, - firstblock, flist, &tmp_logflags, delta, - whichfork, (flags & XFS_BMAPI_RSVBLOCKS)); + firstblock, flist, &tmp_logflags, whichfork, + (flags & XFS_BMAPI_RSVBLOCKS)); logflags |= tmp_logflags; if (error) goto error0; @@ -5254,14 +5073,7 @@ xfs_bmapi( ASSERT(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE || XFS_IFORK_NEXTENTS(ip, whichfork) > ifp->if_ext_max); error = 0; - if (delta && delta->xed_startoff != NULLFILEOFF) { - /* A change was actually made. - * Note that delta->xed_blockount is an offset at this - * point and needs to be converted to a block count. - */ - ASSERT(delta->xed_blockcount > delta->xed_startoff); - delta->xed_blockcount -= delta->xed_startoff; - } + error0: /* * Log everything. Do this after conversion, there's no point in @@ -5373,8 +5185,6 @@ xfs_bunmapi( xfs_fsblock_t *firstblock, /* first allocated block controls a.g. for allocs */ xfs_bmap_free_t *flist, /* i/o: list extents to free */ - xfs_extdelta_t *delta, /* o: change made to incore - extents */ int *done) /* set if not done yet */ { xfs_btree_cur_t *cur; /* bmap btree cursor */ @@ -5432,10 +5242,6 @@ xfs_bunmapi( bno = start + len - 1; ep = xfs_bmap_search_extents(ip, bno, whichfork, &eof, &lastx, &got, &prev); - if (delta) { - delta->xed_startoff = NULLFILEOFF; - delta->xed_blockcount = 0; - } /* * Check to see if the given block number is past the end of the * file, back up to the last block if so... @@ -5534,8 +5340,7 @@ xfs_bunmapi( } del.br_state = XFS_EXT_UNWRITTEN; error = xfs_bmap_add_extent(ip, lastx, &cur, &del, - firstblock, flist, &logflags, delta, - XFS_DATA_FORK, 0); + firstblock, flist, &logflags, XFS_DATA_FORK, 0); if (error) goto error0; goto nodelete; @@ -5589,7 +5394,7 @@ xfs_bunmapi( prev.br_state = XFS_EXT_UNWRITTEN; error = xfs_bmap_add_extent(ip, lastx - 1, &cur, &prev, firstblock, flist, &logflags, - delta, XFS_DATA_FORK, 0); + XFS_DATA_FORK, 0); if (error) goto error0; goto nodelete; @@ -5598,7 +5403,7 @@ xfs_bunmapi( del.br_state = XFS_EXT_UNWRITTEN; error = xfs_bmap_add_extent(ip, lastx, &cur, &del, firstblock, flist, &logflags, - delta, XFS_DATA_FORK, 0); + XFS_DATA_FORK, 0); if (error) goto error0; goto nodelete; @@ -5651,7 +5456,7 @@ xfs_bunmapi( goto error0; } error = xfs_bmap_del_extent(ip, tp, lastx, flist, cur, &del, - &tmp_logflags, delta, whichfork, rsvd); + &tmp_logflags, whichfork, rsvd); logflags |= tmp_logflags; if (error) goto error0; @@ -5708,14 +5513,6 @@ nodelete: ASSERT(ifp->if_ext_max == XFS_IFORK_SIZE(ip, whichfork) / (uint)sizeof(xfs_bmbt_rec_t)); error = 0; - if (delta && delta->xed_startoff != NULLFILEOFF) { - /* A change was actually made. - * Note that delta->xed_blockount is an offset at this - * point and needs to be converted to a block count. - */ - ASSERT(delta->xed_blockcount > delta->xed_startoff); - delta->xed_blockcount -= delta->xed_startoff; - } error0: /* * Log everything. Do this after conversion, there's no point in @@ -5759,7 +5556,7 @@ xfs_getbmap( __int64_t fixlen; /* length for -1 case */ int i; /* extent number */ xfs_inode_t *ip; /* xfs incore inode pointer */ - bhv_vnode_t *vp; /* corresponding vnode */ + vnode_t *vp; /* corresponding vnode */ int lock; /* lock state */ xfs_bmbt_irec_t *map; /* buffer for user's data */ xfs_mount_t *mp; /* file system mount point */ @@ -5856,7 +5653,7 @@ xfs_getbmap( if (whichfork == XFS_DATA_FORK && ip->i_delayed_blks) { /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */ - error = bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); + VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); } ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0); @@ -5892,8 +5689,7 @@ xfs_getbmap( nmap = (nexleft > subnex) ? subnex : nexleft; error = xfs_bmapi(NULL, ip, XFS_BB_TO_FSBT(mp, bmv->bmv_offset), XFS_BB_TO_FSB(mp, bmv->bmv_length), - bmapi_flags, NULL, 0, map, &nmap, - NULL, NULL); + bmapi_flags, NULL, 0, map, &nmap, NULL); if (error) goto unlock_and_return; ASSERT(nmap <= subnex); diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index 80e93409b..8e0d73d9c 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -25,20 +25,6 @@ struct xfs_inode; struct xfs_mount; struct xfs_trans; -/* - * DELTA: describe a change to the in-core extent list. - * - * Internally the use of xed_blockount is somewhat funky. - * xed_blockcount contains an offset much of the time because this - * makes merging changes easier. (xfs_fileoff_t and xfs_filblks_t are - * the same underlying type). - */ -typedef struct xfs_extdelta -{ - xfs_fileoff_t xed_startoff; /* offset of range */ - xfs_filblks_t xed_blockcount; /* blocks in range */ -} xfs_extdelta_t; - /* * List of extents to be free "later". * The list is kept sorted on xbf_startblock. @@ -289,9 +275,7 @@ xfs_bmapi( xfs_extlen_t total, /* total blocks needed */ struct xfs_bmbt_irec *mval, /* output: map values */ int *nmap, /* i/o: mval size/count */ - xfs_bmap_free_t *flist, /* i/o: list extents to free */ - xfs_extdelta_t *delta); /* o: change made to incore - extents */ + xfs_bmap_free_t *flist); /* i/o: list extents to free */ /* * Map file blocks to filesystem blocks, simple version. @@ -325,8 +309,6 @@ xfs_bunmapi( xfs_fsblock_t *firstblock, /* first allocated block controls a.g. for allocs */ xfs_bmap_free_t *flist, /* i/o: list extents to free */ - xfs_extdelta_t *delta, /* o: change made to incore - extents */ int *done); /* set if not done yet */ /* diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 18fb7385d..bea44709a 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -1567,11 +1569,12 @@ xfs_bmbt_split( lbno = XFS_DADDR_TO_FSB(args.mp, XFS_BUF_ADDR(lbp)); left = XFS_BUF_TO_BMBT_BLOCK(lbp); args.fsbno = cur->bc_private.b.firstblock; - args.firstblock = args.fsbno; if (args.fsbno == NULLFSBLOCK) { args.fsbno = lbno; args.type = XFS_ALLOCTYPE_START_BNO; - } else + } else if (cur->bc_private.b.flist->xbf_low) + args.type = XFS_ALLOCTYPE_FIRST_AG; + else args.type = XFS_ALLOCTYPE_NEAR_BNO; args.mod = args.minleft = args.alignment = args.total = args.isfl = args.userdata = args.minalignslop = 0; @@ -2353,7 +2356,6 @@ xfs_bmbt_newroot( args.userdata = args.minalignslop = 0; args.minlen = args.maxlen = args.prod = 1; args.wasdel = cur->bc_private.b.flags & XFS_BTCUR_BPRV_WASDEL; - args.firstblock = args.fsbno; if (args.fsbno == NULLFSBLOCK) { #ifdef DEBUG if ((error = xfs_btree_check_lptr(cur, INT_GET(*pp, ARCH_CONVERT), level))) { @@ -2363,7 +2365,9 @@ xfs_bmbt_newroot( #endif args.fsbno = INT_GET(*pp, ARCH_CONVERT); args.type = XFS_ALLOCTYPE_START_BNO; - } else + } else if (args.wasdel) + args.type = XFS_ALLOCTYPE_FIRST_AG; + else args.type = XFS_ALLOCTYPE_NEAR_BNO; if ((error = xfs_alloc_vextent(&args))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index ee2255bd6..52d5d095f 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index a4aa53974..5fed15682 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -23,6 +23,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_buf_item.h" @@ -1029,9 +1030,9 @@ xfs_buf_iodone_callbacks( if ((XFS_BUF_TARGET(bp) != lasttarg) || (time_after(jiffies, (lasttime + 5*HZ)))) { lasttime = jiffies; - cmn_err(CE_ALERT, "Device %s, XFS metadata write error" - " block 0x%llx in %s", - XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), + prdev("XFS write error in file system meta-data " + "block 0x%llx in %s", + XFS_BUF_TARGET(bp), (__uint64_t)XFS_BUF_ADDR(bp), mp->m_fsname); } lasttarg = XFS_BUF_TARGET(bp); @@ -1107,7 +1108,7 @@ xfs_buf_error_relse( XFS_BUF_ERROR(bp,0); xfs_buftrace("BUF_ERROR_RELSE", bp); if (! XFS_FORCED_SHUTDOWN(mp)) - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); + xfs_force_shutdown(mp, XFS_METADATA_IO_ERROR); /* * We have to unpin the pinned buffers so do the * callbacks. diff --git a/fs/xfs/xfs_cap.h b/fs/xfs/xfs_cap.h index 7a0e482dd..d0035c6e9 100644 --- a/fs/xfs/xfs_cap.h +++ b/fs/xfs/xfs_cap.h @@ -49,12 +49,12 @@ typedef struct xfs_cap_set { #include -struct bhv_vnode; +struct vnode; -extern int xfs_cap_vhascap(struct bhv_vnode *); -extern int xfs_cap_vset(struct bhv_vnode *, void *, size_t); -extern int xfs_cap_vget(struct bhv_vnode *, void *, size_t); -extern int xfs_cap_vremove(struct bhv_vnode *); +extern int xfs_cap_vhascap(struct vnode *); +extern int xfs_cap_vset(struct vnode *, void *, size_t); +extern int xfs_cap_vget(struct vnode *, void *, size_t); +extern int xfs_cap_vremove(struct vnode *vp); #define _CAP_EXISTS xfs_cap_vhascap diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 32ab61d17..8988b9051 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -41,6 +43,7 @@ #include "xfs_bmap.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" +#include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" @@ -156,7 +159,7 @@ xfs_da_split(xfs_da_state_t *state) max = state->path.active - 1; ASSERT((max >= 0) && (max < XFS_DA_NODE_MAXDEPTH)); ASSERT(state->path.blk[max].magic == XFS_ATTR_LEAF_MAGIC || - state->path.blk[max].magic == XFS_DIR2_LEAFN_MAGIC); + state->path.blk[max].magic == XFS_DIRX_LEAF_MAGIC(state->mp)); addblk = &state->path.blk[max]; /* initial dummy value */ for (i = max; (i >= 0) && addblk; state->path.active--, i--) { @@ -196,7 +199,38 @@ xfs_da_split(xfs_da_state_t *state) return(error); /* GROT: attr inconsistent */ addblk = newblk; break; + case XFS_DIR_LEAF_MAGIC: + ASSERT(XFS_DIR_IS_V1(state->mp)); + error = xfs_dir_leaf_split(state, oldblk, newblk); + if ((error != 0) && (error != ENOSPC)) { + return(error); /* GROT: dir is inconsistent */ + } + if (!error) { + addblk = newblk; + break; + } + /* + * Entry wouldn't fit, split the leaf again. + */ + state->extravalid = 1; + if (state->inleaf) { + state->extraafter = 0; /* before newblk */ + error = xfs_dir_leaf_split(state, oldblk, + &state->extrablk); + if (error) + return(error); /* GROT: dir incon. */ + addblk = newblk; + } else { + state->extraafter = 1; /* after newblk */ + error = xfs_dir_leaf_split(state, newblk, + &state->extrablk); + if (error) + return(error); /* GROT: dir incon. */ + addblk = newblk; + } + break; case XFS_DIR2_LEAFN_MAGIC: + ASSERT(XFS_DIR_IS_V2(state->mp)); error = xfs_dir2_leafn_split(state, oldblk, newblk); if (error) return error; @@ -329,6 +363,7 @@ xfs_da_root_split(xfs_da_state_t *state, xfs_da_state_blk_t *blk1, size = (int)((char *)&oldroot->btree[be16_to_cpu(oldroot->hdr.count)] - (char *)oldroot); } else { + ASSERT(XFS_DIR_IS_V2(mp)); ASSERT(be16_to_cpu(oldroot->hdr.info.magic) == XFS_DIR2_LEAFN_MAGIC); leaf = (xfs_dir2_leaf_t *)oldroot; size = (int)((char *)&leaf->ents[be16_to_cpu(leaf->hdr.count)] - @@ -344,7 +379,8 @@ xfs_da_root_split(xfs_da_state_t *state, xfs_da_state_blk_t *blk1, * Set up the new root node. */ error = xfs_da_node_create(args, - (args->whichfork == XFS_DATA_FORK) ? mp->m_dirleafblk : 0, + args->whichfork == XFS_DATA_FORK && + XFS_DIR_IS_V2(mp) ? mp->m_dirleafblk : 0, be16_to_cpu(node->hdr.level) + 1, &bp, args->whichfork); if (error) return(error); @@ -391,9 +427,10 @@ xfs_da_node_split(xfs_da_state_t *state, xfs_da_state_blk_t *oldblk, ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC); /* - * With V2 dirs the extra block is data or freespace. + * With V2 the extra block is data or freespace. */ - useextra = state->extravalid && state->args->whichfork == XFS_ATTR_FORK; + useextra = state->extravalid && (XFS_DIR_IS_V1(state->mp) || + state->args->whichfork == XFS_ATTR_FORK); newcount = 1 + useextra; /* * Do we have to split the node? @@ -587,7 +624,7 @@ xfs_da_node_add(xfs_da_state_t *state, xfs_da_state_blk_t *oldblk, ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC); ASSERT((oldblk->index >= 0) && (oldblk->index <= be16_to_cpu(node->hdr.count))); ASSERT(newblk->blkno != 0); - if (state->args->whichfork == XFS_DATA_FORK) + if (state->args->whichfork == XFS_DATA_FORK && XFS_DIR_IS_V2(mp)) ASSERT(newblk->blkno >= mp->m_dirleafblk && newblk->blkno < mp->m_dirfreeblk); @@ -633,7 +670,7 @@ xfs_da_join(xfs_da_state_t *state) save_blk = &state->altpath.blk[ state->path.active-1 ]; ASSERT(state->path.blk[0].magic == XFS_DA_NODE_MAGIC); ASSERT(drop_blk->magic == XFS_ATTR_LEAF_MAGIC || - drop_blk->magic == XFS_DIR2_LEAFN_MAGIC); + drop_blk->magic == XFS_DIRX_LEAF_MAGIC(state->mp)); /* * Walk back up the tree joining/deallocating as necessary. @@ -656,7 +693,17 @@ xfs_da_join(xfs_da_state_t *state) return(0); xfs_attr_leaf_unbalance(state, drop_blk, save_blk); break; + case XFS_DIR_LEAF_MAGIC: + ASSERT(XFS_DIR_IS_V1(state->mp)); + error = xfs_dir_leaf_toosmall(state, &action); + if (error) + return(error); + if (action == 0) + return(0); + xfs_dir_leaf_unbalance(state, drop_blk, save_blk); + break; case XFS_DIR2_LEAFN_MAGIC: + ASSERT(XFS_DIR_IS_V2(state->mp)); error = xfs_dir2_leafn_toosmall(state, &action); if (error) return error; @@ -743,7 +790,7 @@ xfs_da_root_join(xfs_da_state_t *state, xfs_da_state_blk_t *root_blk) ASSERT(bp != NULL); blkinfo = bp->data; if (be16_to_cpu(oldroot->hdr.level) == 1) { - ASSERT(be16_to_cpu(blkinfo->magic) == XFS_DIR2_LEAFN_MAGIC || + ASSERT(be16_to_cpu(blkinfo->magic) == XFS_DIRX_LEAF_MAGIC(state->mp) || be16_to_cpu(blkinfo->magic) == XFS_ATTR_LEAF_MAGIC); } else { ASSERT(be16_to_cpu(blkinfo->magic) == XFS_DA_NODE_MAGIC); @@ -904,7 +951,14 @@ xfs_da_fixhashpath(xfs_da_state_t *state, xfs_da_state_path_t *path) if (count == 0) return; break; + case XFS_DIR_LEAF_MAGIC: + ASSERT(XFS_DIR_IS_V1(state->mp)); + lasthash = xfs_dir_leaf_lasthash(blk->bp, &count); + if (count == 0) + return; + break; case XFS_DIR2_LEAFN_MAGIC: + ASSERT(XFS_DIR_IS_V2(state->mp)); lasthash = xfs_dir2_leafn_lasthash(blk->bp, &count); if (count == 0) return; @@ -1063,7 +1117,10 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result) * Descend thru the B-tree searching each level for the right * node to use, until the right hashval is found. */ - blkno = (args->whichfork == XFS_DATA_FORK)? state->mp->m_dirleafblk : 0; + if (args->whichfork == XFS_DATA_FORK && XFS_DIR_IS_V2(state->mp)) + blkno = state->mp->m_dirleafblk; + else + blkno = 0; for (blk = &state->path.blk[0], state->path.active = 1; state->path.active <= XFS_DA_NODE_MAXDEPTH; blk++, state->path.active++) { @@ -1080,7 +1137,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result) } curr = blk->bp->data; ASSERT(be16_to_cpu(curr->magic) == XFS_DA_NODE_MAGIC || - be16_to_cpu(curr->magic) == XFS_DIR2_LEAFN_MAGIC || + be16_to_cpu(curr->magic) == XFS_DIRX_LEAF_MAGIC(state->mp) || be16_to_cpu(curr->magic) == XFS_ATTR_LEAF_MAGIC); /* @@ -1133,10 +1190,16 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result) blk->index = probe; blkno = be32_to_cpu(btree->before); } - } else if (be16_to_cpu(curr->magic) == XFS_ATTR_LEAF_MAGIC) { + } + else if (be16_to_cpu(curr->magic) == XFS_ATTR_LEAF_MAGIC) { blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); break; - } else if (be16_to_cpu(curr->magic) == XFS_DIR2_LEAFN_MAGIC) { + } + else if (be16_to_cpu(curr->magic) == XFS_DIR_LEAF_MAGIC) { + blk->hashval = xfs_dir_leaf_lasthash(blk->bp, NULL); + break; + } + else if (be16_to_cpu(curr->magic) == XFS_DIR2_LEAFN_MAGIC) { blk->hashval = xfs_dir2_leafn_lasthash(blk->bp, NULL); break; } @@ -1149,7 +1212,12 @@ xfs_da_node_lookup_int(xfs_da_state_t *state, int *result) * next leaf and keep searching. */ for (;;) { - if (blk->magic == XFS_DIR2_LEAFN_MAGIC) { + if (blk->magic == XFS_DIR_LEAF_MAGIC) { + ASSERT(XFS_DIR_IS_V1(state->mp)); + retval = xfs_dir_leaf_lookup_int(blk->bp, args, + &blk->index); + } else if (blk->magic == XFS_DIR2_LEAFN_MAGIC) { + ASSERT(XFS_DIR_IS_V2(state->mp)); retval = xfs_dir2_leafn_lookup_int(blk->bp, args, &blk->index, state); } @@ -1202,7 +1270,7 @@ xfs_da_blk_link(xfs_da_state_t *state, xfs_da_state_blk_t *old_blk, old_info = old_blk->bp->data; new_info = new_blk->bp->data; ASSERT(old_blk->magic == XFS_DA_NODE_MAGIC || - old_blk->magic == XFS_DIR2_LEAFN_MAGIC || + old_blk->magic == XFS_DIRX_LEAF_MAGIC(state->mp) || old_blk->magic == XFS_ATTR_LEAF_MAGIC); ASSERT(old_blk->magic == be16_to_cpu(old_info->magic)); ASSERT(new_blk->magic == be16_to_cpu(new_info->magic)); @@ -1212,7 +1280,12 @@ xfs_da_blk_link(xfs_da_state_t *state, xfs_da_state_blk_t *old_blk, case XFS_ATTR_LEAF_MAGIC: before = xfs_attr_leaf_order(old_blk->bp, new_blk->bp); break; + case XFS_DIR_LEAF_MAGIC: + ASSERT(XFS_DIR_IS_V1(state->mp)); + before = xfs_dir_leaf_order(old_blk->bp, new_blk->bp); + break; case XFS_DIR2_LEAFN_MAGIC: + ASSERT(XFS_DIR_IS_V2(state->mp)); before = xfs_dir2_leafn_order(old_blk->bp, new_blk->bp); break; case XFS_DA_NODE_MAGIC: @@ -1331,7 +1404,7 @@ xfs_da_blk_unlink(xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk, save_info = save_blk->bp->data; drop_info = drop_blk->bp->data; ASSERT(save_blk->magic == XFS_DA_NODE_MAGIC || - save_blk->magic == XFS_DIR2_LEAFN_MAGIC || + save_blk->magic == XFS_DIRX_LEAF_MAGIC(state->mp) || save_blk->magic == XFS_ATTR_LEAF_MAGIC); ASSERT(save_blk->magic == be16_to_cpu(save_info->magic)); ASSERT(drop_blk->magic == be16_to_cpu(drop_info->magic)); @@ -1456,7 +1529,7 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path, ASSERT(blk->bp != NULL); info = blk->bp->data; ASSERT(be16_to_cpu(info->magic) == XFS_DA_NODE_MAGIC || - be16_to_cpu(info->magic) == XFS_DIR2_LEAFN_MAGIC || + be16_to_cpu(info->magic) == XFS_DIRX_LEAF_MAGIC(state->mp) || be16_to_cpu(info->magic) == XFS_ATTR_LEAF_MAGIC); blk->magic = be16_to_cpu(info->magic); if (blk->magic == XFS_DA_NODE_MAGIC) { @@ -1475,13 +1548,20 @@ xfs_da_path_shift(xfs_da_state_t *state, xfs_da_state_path_t *path, blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); break; + case XFS_DIR_LEAF_MAGIC: + ASSERT(XFS_DIR_IS_V1(state->mp)); + blk->hashval = xfs_dir_leaf_lasthash(blk->bp, + NULL); + break; case XFS_DIR2_LEAFN_MAGIC: + ASSERT(XFS_DIR_IS_V2(state->mp)); blk->hashval = xfs_dir2_leafn_lasthash(blk->bp, NULL); break; default: ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC || - blk->magic == XFS_DIR2_LEAFN_MAGIC); + blk->magic == + XFS_DIRX_LEAF_MAGIC(state->mp)); break; } } @@ -1540,6 +1620,7 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) xfs_bmbt_irec_t *mapp; xfs_inode_t *dp; int nmap, error, w, count, c, got, i, mapi; + xfs_fsize_t size; xfs_trans_t *tp; xfs_mount_t *mp; @@ -1550,7 +1631,7 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) /* * For new directories adjust the file offset and block count. */ - if (w == XFS_DATA_FORK) { + if (w == XFS_DATA_FORK && XFS_DIR_IS_V2(mp)) { bno = mp->m_dirleafblk; count = mp->m_dirblkfsbs; } else { @@ -1560,9 +1641,10 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) /* * Find a spot in the file space to put the new block. */ - if ((error = xfs_bmap_first_unused(tp, dp, count, &bno, w))) + if ((error = xfs_bmap_first_unused(tp, dp, count, &bno, w))) { return error; - if (w == XFS_DATA_FORK) + } + if (w == XFS_DATA_FORK && XFS_DIR_IS_V2(mp)) ASSERT(bno >= mp->m_dirleafblk && bno < mp->m_dirfreeblk); /* * Try mapping it in one filesystem block. @@ -1573,7 +1655,7 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE|XFS_BMAPI_METADATA| XFS_BMAPI_CONTIG, args->firstblock, args->total, &map, &nmap, - args->flist, NULL))) { + args->flist))) { return error; } ASSERT(nmap <= 1); @@ -1594,8 +1676,7 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) XFS_BMAPI_AFLAG(w)|XFS_BMAPI_WRITE| XFS_BMAPI_METADATA, args->firstblock, args->total, - &mapp[mapi], &nmap, args->flist, - NULL))) { + &mapp[mapi], &nmap, args->flist))) { kmem_free(mapp, sizeof(*mapp) * count); return error; } @@ -1624,6 +1705,19 @@ xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno) if (mapp != &map) kmem_free(mapp, sizeof(*mapp) * count); *new_blkno = (xfs_dablk_t)bno; + /* + * For version 1 directories, adjust the file size if it changed. + */ + if (w == XFS_DATA_FORK && XFS_DIR_IS_V1(mp)) { + ASSERT(mapi == 1); + if ((error = xfs_bmap_last_offset(tp, dp, &bno, w))) + return error; + size = XFS_FSB_TO_B(mp, bno); + if (size != dp->i_d.di_size) { + dp->i_d.di_size = size; + xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); + } + } return 0; } @@ -1648,6 +1742,7 @@ xfs_da_swap_lastblock(xfs_da_args_t *args, xfs_dablk_t *dead_blknop, int error, w, entno, level, dead_level; xfs_da_blkinfo_t *dead_info, *sib_info; xfs_da_intnode_t *par_node, *dead_node; + xfs_dir_leafblock_t *dead_leaf; xfs_dir2_leaf_t *dead_leaf2; xfs_dahash_t dead_hash; @@ -1658,8 +1753,11 @@ xfs_da_swap_lastblock(xfs_da_args_t *args, xfs_dablk_t *dead_blknop, w = args->whichfork; ASSERT(w == XFS_DATA_FORK); mp = ip->i_mount; - lastoff = mp->m_dirfreeblk; - error = xfs_bmap_last_before(tp, ip, &lastoff, w); + if (XFS_DIR_IS_V2(mp)) { + lastoff = mp->m_dirfreeblk; + error = xfs_bmap_last_before(tp, ip, &lastoff, w); + } else + error = xfs_bmap_last_offset(tp, ip, &lastoff, w); if (error) return error; if (unlikely(lastoff == 0)) { @@ -1682,7 +1780,14 @@ xfs_da_swap_lastblock(xfs_da_args_t *args, xfs_dablk_t *dead_blknop, /* * Get values from the moved block. */ - if (be16_to_cpu(dead_info->magic) == XFS_DIR2_LEAFN_MAGIC) { + if (be16_to_cpu(dead_info->magic) == XFS_DIR_LEAF_MAGIC) { + ASSERT(XFS_DIR_IS_V1(mp)); + dead_leaf = (xfs_dir_leafblock_t *)dead_info; + dead_level = 0; + dead_hash = + INT_GET(dead_leaf->entries[INT_GET(dead_leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT); + } else if (be16_to_cpu(dead_info->magic) == XFS_DIR2_LEAFN_MAGIC) { + ASSERT(XFS_DIR_IS_V2(mp)); dead_leaf2 = (xfs_dir2_leaf_t *)dead_info; dead_level = 0; dead_hash = be32_to_cpu(dead_leaf2->ents[be16_to_cpu(dead_leaf2->hdr.count) - 1].hashval); @@ -1737,7 +1842,7 @@ xfs_da_swap_lastblock(xfs_da_args_t *args, xfs_dablk_t *dead_blknop, xfs_da_buf_done(sib_buf); sib_buf = NULL; } - par_blkno = mp->m_dirleafblk; + par_blkno = XFS_DIR_IS_V1(mp) ? 0 : mp->m_dirleafblk; level = -1; /* * Walk down the tree looking for the parent of the moved block. @@ -1836,6 +1941,8 @@ xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, { xfs_inode_t *dp; int done, error, w, count; + xfs_fileoff_t bno; + xfs_fsize_t size; xfs_trans_t *tp; xfs_mount_t *mp; @@ -1843,7 +1950,7 @@ xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, w = args->whichfork; tp = args->trans; mp = dp->i_mount; - if (w == XFS_DATA_FORK) + if (w == XFS_DATA_FORK && XFS_DIR_IS_V2(mp)) count = mp->m_dirblkfsbs; else count = 1; @@ -1854,17 +1961,34 @@ xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno, */ if ((error = xfs_bunmapi(tp, dp, dead_blkno, count, XFS_BMAPI_AFLAG(w)|XFS_BMAPI_METADATA, - 0, args->firstblock, args->flist, NULL, + 0, args->firstblock, args->flist, &done)) == ENOSPC) { if (w != XFS_DATA_FORK) - break; + goto done; if ((error = xfs_da_swap_lastblock(args, &dead_blkno, &dead_buf))) - break; - } else { + goto done; + } else if (error) + goto done; + else break; + } + ASSERT(done); + xfs_da_binval(tp, dead_buf); + /* + * Adjust the directory size for version 1. + */ + if (w == XFS_DATA_FORK && XFS_DIR_IS_V1(mp)) { + if ((error = xfs_bmap_last_offset(tp, dp, &bno, w))) + return error; + size = XFS_FSB_TO_B(dp->i_mount, bno); + if (size != dp->i_d.di_size) { + dp->i_d.di_size = size; + xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); } } + return 0; +done: xfs_da_binval(tp, dead_buf); return error; } @@ -1925,7 +2049,10 @@ xfs_da_do_buf( xfs_dabuf_t *rbp; mp = dp->i_mount; - nfsb = (whichfork == XFS_DATA_FORK) ? mp->m_dirblkfsbs : 1; + if (whichfork == XFS_DATA_FORK && XFS_DIR_IS_V2(mp)) + nfsb = mp->m_dirblkfsbs; + else + nfsb = 1; mappedbno = *mappedbnop; /* * Caller doesn't have a mapping. -2 means don't complain @@ -1959,7 +2086,7 @@ xfs_da_do_buf( nfsb, XFS_BMAPI_METADATA | XFS_BMAPI_AFLAG(whichfork), - NULL, 0, mapp, &nmap, NULL, NULL))) + NULL, 0, mapp, &nmap, NULL))) goto exit0; } } else { @@ -2071,6 +2198,7 @@ xfs_da_do_buf( magic1 = be32_to_cpu(data->hdr.magic); if (unlikely( XFS_TEST_ERROR((magic != XFS_DA_NODE_MAGIC) && + (magic != XFS_DIR_LEAF_MAGIC) && (magic != XFS_ATTR_LEAF_MAGIC) && (magic != XFS_DIR2_LEAF1_MAGIC) && (magic != XFS_DIR2_LEAFN_MAGIC) && diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h index 4ab865ec8..243a730d5 100644 --- a/fs/xfs/xfs_da_btree.h +++ b/fs/xfs/xfs_da_btree.h @@ -36,10 +36,14 @@ struct zone; * level in the Btree, and to identify which type of block this is. */ #define XFS_DA_NODE_MAGIC 0xfebe /* magic number: non-leaf blocks */ +#define XFS_DIR_LEAF_MAGIC 0xfeeb /* magic number: directory leaf blks */ #define XFS_ATTR_LEAF_MAGIC 0xfbee /* magic number: attribute leaf blks */ #define XFS_DIR2_LEAF1_MAGIC 0xd2f1 /* magic number: v2 dirlf single blks */ #define XFS_DIR2_LEAFN_MAGIC 0xd2ff /* magic number: v2 dirlf multi blks */ +#define XFS_DIRX_LEAF_MAGIC(mp) \ + (XFS_DIR_IS_V1(mp) ? XFS_DIR_LEAF_MAGIC : XFS_DIR2_LEAFN_MAGIC) + typedef struct xfs_da_blkinfo { __be32 forw; /* previous block in list */ __be32 back; /* following block in list */ diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 80562b60f..4968a6358 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -52,14 +54,24 @@ xfs_swapext( xfs_swapext_t __user *sxu) { xfs_swapext_t *sxp; - xfs_inode_t *ip=NULL, *tip=NULL; + xfs_inode_t *ip=NULL, *tip=NULL, *ips[2]; + xfs_trans_t *tp; xfs_mount_t *mp; + xfs_bstat_t *sbp; struct file *fp = NULL, *tfp = NULL; - bhv_vnode_t *vp, *tvp; + vnode_t *vp, *tvp; + static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; + int ilf_fields, tilf_fields; int error = 0; + xfs_ifork_t *tempifp, *ifp, *tifp; + __uint64_t tmp; + int aforkblks = 0; + int taforkblks = 0; + char locked = 0; sxp = kmem_alloc(sizeof(xfs_swapext_t), KM_MAYFAIL); - if (!sxp) { + tempifp = kmem_alloc(sizeof(xfs_ifork_t), KM_MAYFAIL); + if (!sxp || !tempifp) { error = XFS_ERROR(ENOMEM); goto error0; } @@ -106,56 +118,14 @@ xfs_swapext( mp = ip->i_mount; + sbp = &sxp->sx_stat; + if (XFS_FORCED_SHUTDOWN(mp)) { error = XFS_ERROR(EIO); goto error0; } - error = XFS_SWAP_EXTENTS(mp, &ip->i_iocore, &tip->i_iocore, sxp); - - error0: - if (fp != NULL) - fput(fp); - if (tfp != NULL) - fput(tfp); - - if (sxp != NULL) - kmem_free(sxp, sizeof(xfs_swapext_t)); - - return error; -} - -int -xfs_swap_extents( - xfs_inode_t *ip, - xfs_inode_t *tip, - xfs_swapext_t *sxp) -{ - xfs_mount_t *mp; - xfs_inode_t *ips[2]; - xfs_trans_t *tp; - xfs_bstat_t *sbp = &sxp->sx_stat; - bhv_vnode_t *vp, *tvp; - xfs_ifork_t *tempifp, *ifp, *tifp; - int ilf_fields, tilf_fields; - static uint lock_flags = XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL; - int error = 0; - int aforkblks = 0; - int taforkblks = 0; - __uint64_t tmp; - char locked = 0; - - mp = ip->i_mount; - - tempifp = kmem_alloc(sizeof(xfs_ifork_t), KM_MAYFAIL); - if (!tempifp) { - error = XFS_ERROR(ENOMEM); - goto error0; - } - - sbp = &sxp->sx_stat; - vp = XFS_ITOV(ip); - tvp = XFS_ITOV(tip); + locked = 1; /* Lock in i_ino order */ if (ip->i_ino < tip->i_ino) { @@ -167,7 +137,6 @@ xfs_swap_extents( } xfs_lock_inodes(ips, 2, 0, lock_flags); - locked = 1; /* Check permissions */ error = xfs_iaccess(ip, S_IWUSR, NULL); @@ -200,7 +169,7 @@ xfs_swap_extents( if (VN_CACHED(tvp) != 0) { xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1); - bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED); + VOP_FLUSHINVAL_PAGES(tvp, 0, -1, FI_REMAPF_LOCKED); } /* Verify O_DIRECT for ftmp */ @@ -245,7 +214,7 @@ xfs_swap_extents( /* We need to fail if the file is memory mapped. Once we have tossed * all existing pages, the page fault will have no option * but to go to the filesystem for pages. By making the page fault call - * vop_read (or write in the case of autogrow) they block on the iolock + * VOP_READ (or write in the case of autogrow) they block on the iolock * until we have switched the extents. */ if (VN_MAPPED(vp)) { @@ -264,7 +233,7 @@ xfs_swap_extents( * fields change. */ - bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); + VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF); tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); if ((error = xfs_trans_reserve(tp, 0, @@ -391,7 +360,16 @@ xfs_swap_extents( xfs_iunlock(ip, lock_flags); xfs_iunlock(tip, lock_flags); } + + if (fp != NULL) + fput(fp); + if (tfp != NULL) + fput(tfp); + + if (sxp != NULL) + kmem_free(sxp, sizeof(xfs_swapext_t)); if (tempifp != NULL) kmem_free(tempifp, sizeof(xfs_ifork_t)); + return error; } diff --git a/fs/xfs/xfs_dfrag.h b/fs/xfs/xfs_dfrag.h index da178205b..f678559ab 100644 --- a/fs/xfs/xfs_dfrag.h +++ b/fs/xfs/xfs_dfrag.h @@ -48,9 +48,6 @@ typedef struct xfs_swapext */ int xfs_swapext(struct xfs_swapext __user *sx); -int xfs_swap_extents(struct xfs_inode *ip, struct xfs_inode *tip, - struct xfs_swapext *sxp); - #endif /* __KERNEL__ */ #endif /* __XFS_DFRAG_H__ */ diff --git a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h index 1dcc5b7cb..a70e0b375 100644 --- a/fs/xfs/xfs_dinode.h +++ b/fs/xfs/xfs_dinode.h @@ -86,6 +86,7 @@ typedef struct xfs_dinode union { xfs_bmdr_block_t di_bmbt; /* btree root block */ xfs_bmbt_rec_32_t di_bmx[1]; /* extent list */ + xfs_dir_shortform_t di_dirsf; /* shortform directory */ xfs_dir2_sf_t di_dir2sf; /* shortform directory v2 */ char di_c[1]; /* local contents */ xfs_dev_t di_dev; /* device for S_IFCHR/S_IFBLK */ @@ -257,9 +258,8 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_NOSYMLINKS_BIT 10 /* disallow symlink creation */ #define XFS_DIFLAG_EXTSIZE_BIT 11 /* inode extent size allocator hint */ #define XFS_DIFLAG_EXTSZINHERIT_BIT 12 /* inherit inode extent size */ -#define XFS_DIFLAG_NODEFRAG_BIT 13 /* do not reorganize/defragment */ -#define XFS_DIFLAG_BARRIER_BIT 14 /* chroot() barrier */ -#define XFS_DIFLAG_IUNLINK_BIT 15 /* immutable unlink */ +#define XFS_DIFLAG_BARRIER_BIT 13 /* chroot() barrier */ +#define XFS_DIFLAG_IUNLINK_BIT 14 /* immutable unlink */ #define XFS_DIFLAG_REALTIME (1 << XFS_DIFLAG_REALTIME_BIT) #define XFS_DIFLAG_PREALLOC (1 << XFS_DIFLAG_PREALLOC_BIT) @@ -274,7 +274,6 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_NOSYMLINKS (1 << XFS_DIFLAG_NOSYMLINKS_BIT) #define XFS_DIFLAG_EXTSIZE (1 << XFS_DIFLAG_EXTSIZE_BIT) #define XFS_DIFLAG_EXTSZINHERIT (1 << XFS_DIFLAG_EXTSZINHERIT_BIT) -#define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) #define XFS_DIFLAG_BARRIER (1 << XFS_DIFLAG_BARRIER_BIT) #define XFS_DIFLAG_IUNLINK (1 << XFS_DIFLAG_IUNLINK_BIT) @@ -283,7 +282,6 @@ typedef enum xfs_dinode_fmt XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ XFS_DIFLAG_NOATIME | XFS_DIFLAG_NODUMP | XFS_DIFLAG_RTINHERIT | \ XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS | XFS_DIFLAG_EXTSIZE | \ - XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_BARRIER | \ - XFS_DIFLAG_IUNLINK) + XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_BARRIER | XFS_DIFLAG_IUNLINK) #endif /* __XFS_DINODE_H__ */ diff --git a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c new file mode 100644 index 000000000..9cc702a83 --- /dev/null +++ b/fs/xfs/xfs_dir.c @@ -0,0 +1,1217 @@ +/* + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * 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. + * + * 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. 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 the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "xfs.h" +#include "xfs_fs.h" +#include "xfs_types.h" +#include "xfs_log.h" +#include "xfs_inum.h" +#include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_dir.h" +#include "xfs_dir2.h" +#include "xfs_dmapi.h" +#include "xfs_mount.h" +#include "xfs_da_btree.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_bmap.h" +#include "xfs_dir_leaf.h" +#include "xfs_error.h" + +/* + * xfs_dir.c + * + * Provide the external interfaces to manage directories. + */ + +/*======================================================================== + * Function prototypes for the kernel. + *========================================================================*/ + +/* + * Functions for the dirops interfaces. + */ +static void xfs_dir_mount(struct xfs_mount *mp); + +static int xfs_dir_isempty(struct xfs_inode *dp); + +static int xfs_dir_init(struct xfs_trans *trans, + struct xfs_inode *dir, + struct xfs_inode *parent_dir); + +static int xfs_dir_createname(struct xfs_trans *trans, + struct xfs_inode *dp, + char *name_string, + int name_len, + xfs_ino_t inode_number, + xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, + xfs_extlen_t total); + +static int xfs_dir_lookup(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name_string, + int name_length, + xfs_ino_t *inode_number); + +static int xfs_dir_removename(struct xfs_trans *trans, + struct xfs_inode *dp, + char *name_string, + int name_length, + xfs_ino_t ino, + xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, + xfs_extlen_t total); + +static int xfs_dir_getdents(struct xfs_trans *tp, + struct xfs_inode *dp, + struct uio *uiop, + int *eofp); + +static int xfs_dir_replace(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name_string, + int name_length, + xfs_ino_t inode_number, + xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, + xfs_extlen_t total); + +static int xfs_dir_canenter(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name_string, + int name_length); + +static int xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, + xfs_dinode_t *dip); + +xfs_dirops_t xfsv1_dirops = { + .xd_mount = xfs_dir_mount, + .xd_isempty = xfs_dir_isempty, + .xd_init = xfs_dir_init, + .xd_createname = xfs_dir_createname, + .xd_lookup = xfs_dir_lookup, + .xd_removename = xfs_dir_removename, + .xd_getdents = xfs_dir_getdents, + .xd_replace = xfs_dir_replace, + .xd_canenter = xfs_dir_canenter, + .xd_shortform_validate_ondisk = xfs_dir_shortform_validate_ondisk, + .xd_shortform_to_single = xfs_dir_shortform_to_leaf, +}; + +/* + * Internal routines when dirsize == XFS_LBSIZE(mp). + */ +STATIC int xfs_dir_leaf_lookup(xfs_da_args_t *args); +STATIC int xfs_dir_leaf_removename(xfs_da_args_t *args, int *number_entries, + int *total_namebytes); +STATIC int xfs_dir_leaf_getdents(xfs_trans_t *trans, xfs_inode_t *dp, + uio_t *uio, int *eofp, + xfs_dirent_t *dbp, + xfs_dir_put_t put); +STATIC int xfs_dir_leaf_replace(xfs_da_args_t *args); + +/* + * Internal routines when dirsize > XFS_LBSIZE(mp). + */ +STATIC int xfs_dir_node_addname(xfs_da_args_t *args); +STATIC int xfs_dir_node_lookup(xfs_da_args_t *args); +STATIC int xfs_dir_node_removename(xfs_da_args_t *args); +STATIC int xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, + uio_t *uio, int *eofp, + xfs_dirent_t *dbp, + xfs_dir_put_t put); +STATIC int xfs_dir_node_replace(xfs_da_args_t *args); + +#if defined(XFS_DIR_TRACE) +ktrace_t *xfs_dir_trace_buf; +#endif + + +/*======================================================================== + * Overall external interface routines. + *========================================================================*/ + +xfs_dahash_t xfs_dir_hash_dot, xfs_dir_hash_dotdot; + +/* + * One-time startup routine called from xfs_init(). + */ +void +xfs_dir_startup(void) +{ + xfs_dir_hash_dot = xfs_da_hashname(".", 1); + xfs_dir_hash_dotdot = xfs_da_hashname("..", 2); +} + +/* + * Initialize directory-related fields in the mount structure. + */ +static void +xfs_dir_mount(xfs_mount_t *mp) +{ + uint shortcount, leafcount, count; + + mp->m_dirversion = 1; + if (!(mp->m_flags & XFS_MOUNT_ATTR2)) { + shortcount = (mp->m_attroffset - + (uint)sizeof(xfs_dir_sf_hdr_t)) / + (uint)sizeof(xfs_dir_sf_entry_t); + leafcount = (XFS_LBSIZE(mp) - + (uint)sizeof(xfs_dir_leaf_hdr_t)) / + ((uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_name_t)); + } else { + shortcount = (XFS_BMDR_SPACE_CALC(MINABTPTRS) - + (uint)sizeof(xfs_dir_sf_hdr_t)) / + (uint)sizeof(xfs_dir_sf_entry_t); + leafcount = (XFS_LBSIZE(mp) - + (uint)sizeof(xfs_dir_leaf_hdr_t)) / + ((uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_name_t)); + } + count = shortcount > leafcount ? shortcount : leafcount; + mp->m_dircook_elog = xfs_da_log2_roundup(count + 1); + ASSERT(mp->m_dircook_elog <= mp->m_sb.sb_blocklog); + mp->m_dir_node_ents = mp->m_attr_node_ents = + (XFS_LBSIZE(mp) - (uint)sizeof(xfs_da_node_hdr_t)) / + (uint)sizeof(xfs_da_node_entry_t); + mp->m_dir_magicpct = (XFS_LBSIZE(mp) * 37) / 100; + mp->m_dirblksize = mp->m_sb.sb_blocksize; + mp->m_dirblkfsbs = 1; +} + +/* + * Return 1 if directory contains only "." and "..". + */ +static int +xfs_dir_isempty(xfs_inode_t *dp) +{ + xfs_dir_sf_hdr_t *hdr; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + if (dp->i_d.di_size == 0) + return(1); + if (dp->i_d.di_size > XFS_IFORK_DSIZE(dp)) + return(0); + hdr = (xfs_dir_sf_hdr_t *)dp->i_df.if_u1.if_data; + return(hdr->count == 0); +} + +/* + * Initialize a directory with its "." and ".." entries. + */ +static int +xfs_dir_init(xfs_trans_t *trans, xfs_inode_t *dir, xfs_inode_t *parent_dir) +{ + xfs_da_args_t args; + int error; + + memset((char *)&args, 0, sizeof(args)); + args.dp = dir; + args.trans = trans; + + ASSERT((dir->i_d.di_mode & S_IFMT) == S_IFDIR); + if ((error = xfs_dir_ino_validate(trans->t_mountp, parent_dir->i_ino))) + return error; + + return(xfs_dir_shortform_create(&args, parent_dir->i_ino)); +} + +/* + * Generic handler routine to add a name to a directory. + * Transitions directory from shortform to Btree as necessary. + */ +static int /* error */ +xfs_dir_createname(xfs_trans_t *trans, xfs_inode_t *dp, char *name, + int namelen, xfs_ino_t inum, xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, xfs_extlen_t total) +{ + xfs_da_args_t args; + int retval, newsize, done; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + + if ((retval = xfs_dir_ino_validate(trans->t_mountp, inum))) + return (retval); + + XFS_STATS_INC(xs_dir_create); + /* + * Fill in the arg structure for this request. + */ + args.name = name; + args.namelen = namelen; + args.hashval = xfs_da_hashname(name, namelen); + args.inumber = inum; + args.dp = dp; + args.firstblock = firstblock; + args.flist = flist; + args.total = total; + args.whichfork = XFS_DATA_FORK; + args.trans = trans; + args.justcheck = 0; + args.addname = args.oknoent = 1; + + /* + * Decide on what work routines to call based on the inode size. + */ + done = 0; + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + newsize = XFS_DIR_SF_ENTSIZE_BYNAME(args.namelen); + if ((dp->i_d.di_size + newsize) <= XFS_IFORK_DSIZE(dp)) { + retval = xfs_dir_shortform_addname(&args); + done = 1; + } else { + if (total == 0) + return XFS_ERROR(ENOSPC); + retval = xfs_dir_shortform_to_leaf(&args); + done = retval != 0; + } + } + if (!done && xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_addname(&args); + done = retval != ENOSPC; + if (!done) { + if (total == 0) + return XFS_ERROR(ENOSPC); + retval = xfs_dir_leaf_to_node(&args); + done = retval != 0; + } + } + if (!done) { + retval = xfs_dir_node_addname(&args); + } + return(retval); +} + +/* + * Generic handler routine to check if a name can be added to a directory, + * without adding any blocks to the directory. + */ +static int /* error */ +xfs_dir_canenter(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen) +{ + xfs_da_args_t args; + int retval, newsize; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + /* + * Fill in the arg structure for this request. + */ + args.name = name; + args.namelen = namelen; + args.hashval = xfs_da_hashname(name, namelen); + args.inumber = 0; + args.dp = dp; + args.firstblock = NULL; + args.flist = NULL; + args.total = 0; + args.whichfork = XFS_DATA_FORK; + args.trans = trans; + args.justcheck = args.addname = args.oknoent = 1; + + /* + * Decide on what work routines to call based on the inode size. + */ + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + newsize = XFS_DIR_SF_ENTSIZE_BYNAME(args.namelen); + if ((dp->i_d.di_size + newsize) <= XFS_IFORK_DSIZE(dp)) + retval = 0; + else + retval = XFS_ERROR(ENOSPC); + } else if (xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_addname(&args); + } else { + retval = xfs_dir_node_addname(&args); + } + return(retval); +} + +/* + * Generic handler routine to remove a name from a directory. + * Transitions directory from Btree to shortform as necessary. + */ +static int /* error */ +xfs_dir_removename(xfs_trans_t *trans, xfs_inode_t *dp, char *name, + int namelen, xfs_ino_t ino, xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, xfs_extlen_t total) +{ + xfs_da_args_t args; + int count, totallen, newsize, retval; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + XFS_STATS_INC(xs_dir_remove); + /* + * Fill in the arg structure for this request. + */ + args.name = name; + args.namelen = namelen; + args.hashval = xfs_da_hashname(name, namelen); + args.inumber = ino; + args.dp = dp; + args.firstblock = firstblock; + args.flist = flist; + args.total = total; + args.whichfork = XFS_DATA_FORK; + args.trans = trans; + args.justcheck = args.addname = args.oknoent = 0; + + /* + * Decide on what work routines to call based on the inode size. + */ + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + retval = xfs_dir_shortform_removename(&args); + } else if (xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_removename(&args, &count, &totallen); + if (retval == 0) { + newsize = XFS_DIR_SF_ALLFIT(count, totallen); + if (newsize <= XFS_IFORK_DSIZE(dp)) { + retval = xfs_dir_leaf_to_shortform(&args); + } + } + } else { + retval = xfs_dir_node_removename(&args); + } + return(retval); +} + +static int /* error */ +xfs_dir_lookup(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen, + xfs_ino_t *inum) +{ + xfs_da_args_t args; + int retval; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + + XFS_STATS_INC(xs_dir_lookup); + /* + * Fill in the arg structure for this request. + */ + args.name = name; + args.namelen = namelen; + args.hashval = xfs_da_hashname(name, namelen); + args.inumber = 0; + args.dp = dp; + args.firstblock = NULL; + args.flist = NULL; + args.total = 0; + args.whichfork = XFS_DATA_FORK; + args.trans = trans; + args.justcheck = args.addname = 0; + args.oknoent = 1; + + /* + * Decide on what work routines to call based on the inode size. + */ + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + retval = xfs_dir_shortform_lookup(&args); + } else if (xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_lookup(&args); + } else { + retval = xfs_dir_node_lookup(&args); + } + if (retval == EEXIST) + retval = 0; + *inum = args.inumber; + return(retval); +} + +/* + * Implement readdir. + */ +static int /* error */ +xfs_dir_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio, int *eofp) +{ + xfs_dirent_t *dbp; + int alignment, retval; + xfs_dir_put_t put; + + XFS_STATS_INC(xs_dir_getdents); + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + + /* + * If our caller has given us a single contiguous memory buffer, + * just work directly within that buffer. If it's in user memory, + * lock it down first. + */ + alignment = sizeof(xfs_off_t) - 1; + if ((uio->uio_iovcnt == 1) && + (((__psint_t)uio->uio_iov[0].iov_base & alignment) == 0) && + ((uio->uio_iov[0].iov_len & alignment) == 0)) { + dbp = NULL; + put = xfs_dir_put_dirent64_direct; + } else { + dbp = kmem_alloc(sizeof(*dbp) + MAXNAMELEN, KM_SLEEP); + put = xfs_dir_put_dirent64_uio; + } + + /* + * Decide on what work routines to call based on the inode size. + */ + *eofp = 0; + + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + retval = xfs_dir_shortform_getdents(dp, uio, eofp, dbp, put); + } else if (xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_getdents(trans, dp, uio, eofp, dbp, put); + } else { + retval = xfs_dir_node_getdents(trans, dp, uio, eofp, dbp, put); + } + if (dbp != NULL) + kmem_free(dbp, sizeof(*dbp) + MAXNAMELEN); + + return(retval); +} + +static int /* error */ +xfs_dir_replace(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen, + xfs_ino_t inum, xfs_fsblock_t *firstblock, + xfs_bmap_free_t *flist, xfs_extlen_t total) +{ + xfs_da_args_t args; + int retval; + + ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); + + if ((retval = xfs_dir_ino_validate(trans->t_mountp, inum))) + return retval; + + /* + * Fill in the arg structure for this request. + */ + args.name = name; + args.namelen = namelen; + args.hashval = xfs_da_hashname(name, namelen); + args.inumber = inum; + args.dp = dp; + args.firstblock = firstblock; + args.flist = flist; + args.total = total; + args.whichfork = XFS_DATA_FORK; + args.trans = trans; + args.justcheck = args.addname = args.oknoent = 0; + + /* + * Decide on what work routines to call based on the inode size. + */ + if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) { + retval = xfs_dir_shortform_replace(&args); + } else if (xfs_bmap_one_block(dp, XFS_DATA_FORK)) { + retval = xfs_dir_leaf_replace(&args); + } else { + retval = xfs_dir_node_replace(&args); + } + + return(retval); +} + +static int +xfs_dir_shortform_validate_ondisk(xfs_mount_t *mp, xfs_dinode_t *dp) +{ + xfs_ino_t ino; + int namelen_sum; + int count; + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + int i; + + + + if ((INT_GET(dp->di_core.di_mode, ARCH_CONVERT) & S_IFMT) != S_IFDIR) { + return 0; + } + if (INT_GET(dp->di_core.di_format, ARCH_CONVERT) != XFS_DINODE_FMT_LOCAL) { + return 0; + } + if (INT_GET(dp->di_core.di_size, ARCH_CONVERT) < sizeof(sf->hdr)) { + xfs_fs_cmn_err(CE_WARN, mp, "Invalid shortform size: dp 0x%p", + dp); + return 1; + } + sf = (xfs_dir_shortform_t *)(&dp->di_u.di_dirsf); + ino = XFS_GET_DIR_INO8(sf->hdr.parent); + if (xfs_dir_ino_validate(mp, ino)) + return 1; + + count = sf->hdr.count; + if ((count < 0) || ((count * 10) > XFS_LITINO(mp))) { + xfs_fs_cmn_err(CE_WARN, mp, + "Invalid shortform count: dp 0x%p", dp); + return(1); + } + + if (count == 0) { + return 0; + } + + namelen_sum = 0; + sfe = &sf->list[0]; + for (i = sf->hdr.count - 1; i >= 0; i--) { + ino = XFS_GET_DIR_INO8(sfe->inumber); + xfs_dir_ino_validate(mp, ino); + if (sfe->namelen >= XFS_LITINO(mp)) { + xfs_fs_cmn_err(CE_WARN, mp, + "Invalid shortform namelen: dp 0x%p", dp); + return 1; + } + namelen_sum += sfe->namelen; + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + if (namelen_sum >= XFS_LITINO(mp)) { + xfs_fs_cmn_err(CE_WARN, mp, + "Invalid shortform namelen: dp 0x%p", dp); + return 1; + } + + return 0; +} + +/*======================================================================== + * External routines when dirsize == XFS_LBSIZE(dp->i_mount). + *========================================================================*/ + +/* + * Add a name to the leaf directory structure + * This is the external routine. + */ +int +xfs_dir_leaf_addname(xfs_da_args_t *args) +{ + int index, retval; + xfs_dabuf_t *bp; + + retval = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp, + XFS_DATA_FORK); + if (retval) + return(retval); + ASSERT(bp != NULL); + + retval = xfs_dir_leaf_lookup_int(bp, args, &index); + if (retval == ENOENT) + retval = xfs_dir_leaf_add(bp, args, index); + xfs_da_buf_done(bp); + return(retval); +} + +/* + * Remove a name from the leaf directory structure + * This is the external routine. + */ +STATIC int +xfs_dir_leaf_removename(xfs_da_args_t *args, int *count, int *totallen) +{ + xfs_dir_leafblock_t *leaf; + int index, retval; + xfs_dabuf_t *bp; + + retval = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp, + XFS_DATA_FORK); + if (retval) + return(retval); + ASSERT(bp != NULL); + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + retval = xfs_dir_leaf_lookup_int(bp, args, &index); + if (retval == EEXIST) { + (void)xfs_dir_leaf_remove(args->trans, bp, index); + *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); + *totallen = INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); + retval = 0; + } + xfs_da_buf_done(bp); + return(retval); +} + +/* + * Look up a name in a leaf directory structure. + * This is the external routine. + */ +STATIC int +xfs_dir_leaf_lookup(xfs_da_args_t *args) +{ + int index, retval; + xfs_dabuf_t *bp; + + retval = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp, + XFS_DATA_FORK); + if (retval) + return(retval); + ASSERT(bp != NULL); + retval = xfs_dir_leaf_lookup_int(bp, args, &index); + xfs_da_brelse(args->trans, bp); + return(retval); +} + +/* + * Copy out directory entries for getdents(), for leaf directories. + */ +STATIC int +xfs_dir_leaf_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio, + int *eofp, xfs_dirent_t *dbp, xfs_dir_put_t put) +{ + xfs_dabuf_t *bp; + int retval, eob; + + retval = xfs_da_read_buf(dp->i_transp, dp, 0, -1, &bp, XFS_DATA_FORK); + if (retval) + return(retval); + ASSERT(bp != NULL); + retval = xfs_dir_leaf_getdents_int(bp, dp, 0, uio, &eob, dbp, put, -1); + xfs_da_brelse(trans, bp); + *eofp = (eob == 0); + return(retval); +} + +/* + * Look up a name in a leaf directory structure, replace the inode number. + * This is the external routine. + */ +STATIC int +xfs_dir_leaf_replace(xfs_da_args_t *args) +{ + int index, retval; + xfs_dabuf_t *bp; + xfs_ino_t inum; + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + + inum = args->inumber; + retval = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp, + XFS_DATA_FORK); + if (retval) + return(retval); + ASSERT(bp != NULL); + retval = xfs_dir_leaf_lookup_int(bp, args, &index); + if (retval == EEXIST) { + leaf = bp->data; + entry = &leaf->entries[index]; + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + /* XXX - replace assert? */ + XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, namest, sizeof(namest->inumber))); + xfs_da_buf_done(bp); + retval = 0; + } else + xfs_da_brelse(args->trans, bp); + return(retval); +} + + +/*======================================================================== + * External routines when dirsize > XFS_LBSIZE(mp). + *========================================================================*/ + +/* + * Add a name to a Btree-format directory. + * + * This will involve walking down the Btree, and may involve splitting + * leaf nodes and even splitting intermediate nodes up to and including + * the root node (a special case of an intermediate node). + */ +STATIC int +xfs_dir_node_addname(xfs_da_args_t *args) +{ + xfs_da_state_t *state; + xfs_da_state_blk_t *blk; + int retval, error; + + /* + * Fill in bucket of arguments/results/context to carry around. + */ + state = xfs_da_state_alloc(); + state->args = args; + state->mp = args->dp->i_mount; + state->blocksize = state->mp->m_sb.sb_blocksize; + state->node_ents = state->mp->m_dir_node_ents; + + /* + * Search to see if name already exists, and get back a pointer + * to where it should go. + */ + error = xfs_da_node_lookup_int(state, &retval); + if (error) + retval = error; + if (retval != ENOENT) + goto error; + blk = &state->path.blk[ state->path.active-1 ]; + ASSERT(blk->magic == XFS_DIR_LEAF_MAGIC); + retval = xfs_dir_leaf_add(blk->bp, args, blk->index); + if (retval == 0) { + /* + * Addition succeeded, update Btree hashvals. + */ + if (!args->justcheck) + xfs_da_fixhashpath(state, &state->path); + } else { + /* + * Addition failed, split as many Btree elements as required. + */ + if (args->total == 0) { + ASSERT(retval == ENOSPC); + goto error; + } + retval = xfs_da_split(state); + } +error: + xfs_da_state_free(state); + + return(retval); +} + +/* + * Remove a name from a B-tree directory. + * + * This will involve walking down the Btree, and may involve joining + * leaf nodes and even joining intermediate nodes up to and including + * the root node (a special case of an intermediate node). + */ +STATIC int +xfs_dir_node_removename(xfs_da_args_t *args) +{ + xfs_da_state_t *state; + xfs_da_state_blk_t *blk; + int retval, error; + + state = xfs_da_state_alloc(); + state->args = args; + state->mp = args->dp->i_mount; + state->blocksize = state->mp->m_sb.sb_blocksize; + state->node_ents = state->mp->m_dir_node_ents; + + /* + * Search to see if name exists, and get back a pointer to it. + */ + error = xfs_da_node_lookup_int(state, &retval); + if (error) + retval = error; + if (retval != EEXIST) { + xfs_da_state_free(state); + return(retval); + } + + /* + * Remove the name and update the hashvals in the tree. + */ + blk = &state->path.blk[ state->path.active-1 ]; + ASSERT(blk->magic == XFS_DIR_LEAF_MAGIC); + retval = xfs_dir_leaf_remove(args->trans, blk->bp, blk->index); + xfs_da_fixhashpath(state, &state->path); + + /* + * Check to see if the tree needs to be collapsed. + */ + error = 0; + if (retval) { + error = xfs_da_join(state); + } + + xfs_da_state_free(state); + if (error) + return(error); + return(0); +} + +/* + * Look up a filename in a int directory. + * Use an internal routine to actually do all the work. + */ +STATIC int +xfs_dir_node_lookup(xfs_da_args_t *args) +{ + xfs_da_state_t *state; + int retval, error, i; + + state = xfs_da_state_alloc(); + state->args = args; + state->mp = args->dp->i_mount; + state->blocksize = state->mp->m_sb.sb_blocksize; + state->node_ents = state->mp->m_dir_node_ents; + + /* + * Search to see if name exists, + * and get back a pointer to it. + */ + error = xfs_da_node_lookup_int(state, &retval); + if (error) { + retval = error; + } + + /* + * If not in a transaction, we have to release all the buffers. + */ + for (i = 0; i < state->path.active; i++) { + xfs_da_brelse(args->trans, state->path.blk[i].bp); + state->path.blk[i].bp = NULL; + } + + xfs_da_state_free(state); + return(retval); +} + +STATIC int +xfs_dir_node_getdents(xfs_trans_t *trans, xfs_inode_t *dp, uio_t *uio, + int *eofp, xfs_dirent_t *dbp, xfs_dir_put_t put) +{ + xfs_da_intnode_t *node; + xfs_da_node_entry_t *btree; + xfs_dir_leafblock_t *leaf = NULL; + xfs_dablk_t bno, nextbno; + xfs_dahash_t cookhash; + xfs_mount_t *mp; + int error, eob, i; + xfs_dabuf_t *bp; + xfs_daddr_t nextda; + + /* + * Pick up our context. + */ + mp = dp->i_mount; + bp = NULL; + bno = XFS_DA_COOKIE_BNO(mp, uio->uio_offset); + cookhash = XFS_DA_COOKIE_HASH(mp, uio->uio_offset); + + xfs_dir_trace_g_du("node: start", dp, uio); + + /* + * Re-find our place, even if we're confused about what our place is. + * + * First we check the block number from the magic cookie, it is a + * cache of where we ended last time. If we find a leaf block, and + * the starting hashval in that block is less than our desired + * hashval, then we run with it. + */ + if (bno > 0) { + error = xfs_da_read_buf(trans, dp, bno, -2, &bp, XFS_DATA_FORK); + if ((error != 0) && (error != EFSCORRUPTED)) + return(error); + if (bp) + leaf = bp->data; + if (bp && be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) { + xfs_dir_trace_g_dub("node: block not a leaf", + dp, uio, bno); + xfs_da_brelse(trans, bp); + bp = NULL; + } + if (bp && INT_GET(leaf->entries[0].hashval, ARCH_CONVERT) > cookhash) { + xfs_dir_trace_g_dub("node: leaf hash too large", + dp, uio, bno); + xfs_da_brelse(trans, bp); + bp = NULL; + } + if (bp && + cookhash > INT_GET(leaf->entries[INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1].hashval, ARCH_CONVERT)) { + xfs_dir_trace_g_dub("node: leaf hash too small", + dp, uio, bno); + xfs_da_brelse(trans, bp); + bp = NULL; + } + } + + /* + * If we did not find a leaf block from the blockno in the cookie, + * or we there was no blockno in the cookie (eg: first time thru), + * the we start at the top of the Btree and re-find our hashval. + */ + if (bp == NULL) { + xfs_dir_trace_g_du("node: start at root" , dp, uio); + bno = 0; + for (;;) { + error = xfs_da_read_buf(trans, dp, bno, -1, &bp, + XFS_DATA_FORK); + if (error) + return(error); + if (bp == NULL) + return(XFS_ERROR(EFSCORRUPTED)); + node = bp->data; + if (be16_to_cpu(node->hdr.info.magic) != XFS_DA_NODE_MAGIC) + break; + btree = &node->btree[0]; + xfs_dir_trace_g_dun("node: node detail", dp, uio, node); + for (i = 0; i < be16_to_cpu(node->hdr.count); btree++, i++) { + if (be32_to_cpu(btree->hashval) >= cookhash) { + bno = be32_to_cpu(btree->before); + break; + } + } + if (i == be16_to_cpu(node->hdr.count)) { + xfs_da_brelse(trans, bp); + xfs_dir_trace_g_du("node: hash beyond EOF", + dp, uio); + uio->uio_offset = XFS_DA_MAKE_COOKIE(mp, 0, 0, + XFS_DA_MAXHASH); + *eofp = 1; + return(0); + } + xfs_dir_trace_g_dub("node: going to block", + dp, uio, bno); + xfs_da_brelse(trans, bp); + } + } + ASSERT(cookhash != XFS_DA_MAXHASH); + + /* + * We've dropped down to the (first) leaf block that contains the + * hashval we are interested in. Continue rolling upward thru the + * leaf blocks until we fill up our buffer. + */ + for (;;) { + leaf = bp->data; + if (unlikely(be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC)) { + xfs_dir_trace_g_dul("node: not a leaf", dp, uio, leaf); + xfs_da_brelse(trans, bp); + XFS_CORRUPTION_ERROR("xfs_dir_node_getdents(1)", + XFS_ERRLEVEL_LOW, mp, leaf); + return XFS_ERROR(EFSCORRUPTED); + } + xfs_dir_trace_g_dul("node: leaf detail", dp, uio, leaf); + if ((nextbno = be32_to_cpu(leaf->hdr.info.forw))) { + nextda = xfs_da_reada_buf(trans, dp, nextbno, + XFS_DATA_FORK); + } else + nextda = -1; + error = xfs_dir_leaf_getdents_int(bp, dp, bno, uio, &eob, dbp, + put, nextda); + xfs_da_brelse(trans, bp); + bno = nextbno; + if (eob) { + xfs_dir_trace_g_dub("node: E-O-B", dp, uio, bno); + *eofp = 0; + return(error); + } + if (bno == 0) + break; + error = xfs_da_read_buf(trans, dp, bno, nextda, &bp, + XFS_DATA_FORK); + if (error) + return(error); + if (unlikely(bp == NULL)) { + XFS_ERROR_REPORT("xfs_dir_node_getdents(2)", + XFS_ERRLEVEL_LOW, mp); + return(XFS_ERROR(EFSCORRUPTED)); + } + } + *eofp = 1; + xfs_dir_trace_g_du("node: E-O-F", dp, uio); + return(0); +} + +/* + * Look up a filename in an int directory, replace the inode number. + * Use an internal routine to actually do the lookup. + */ +STATIC int +xfs_dir_node_replace(xfs_da_args_t *args) +{ + xfs_da_state_t *state; + xfs_da_state_blk_t *blk; + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + xfs_ino_t inum; + int retval, error, i; + xfs_dabuf_t *bp; + + state = xfs_da_state_alloc(); + state->args = args; + state->mp = args->dp->i_mount; + state->blocksize = state->mp->m_sb.sb_blocksize; + state->node_ents = state->mp->m_dir_node_ents; + inum = args->inumber; + + /* + * Search to see if name exists, + * and get back a pointer to it. + */ + error = xfs_da_node_lookup_int(state, &retval); + if (error) { + retval = error; + } + + if (retval == EEXIST) { + blk = &state->path.blk[state->path.active - 1]; + ASSERT(blk->magic == XFS_DIR_LEAF_MAGIC); + bp = blk->bp; + leaf = bp->data; + entry = &leaf->entries[blk->index]; + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + /* XXX - replace assert ? */ + XFS_DIR_SF_PUT_DIRINO(&inum, &namest->inumber); + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, namest, sizeof(namest->inumber))); + xfs_da_buf_done(bp); + blk->bp = NULL; + retval = 0; + } else { + i = state->path.active - 1; + xfs_da_brelse(args->trans, state->path.blk[i].bp); + state->path.blk[i].bp = NULL; + } + for (i = 0; i < state->path.active - 1; i++) { + xfs_da_brelse(args->trans, state->path.blk[i].bp); + state->path.blk[i].bp = NULL; + } + + xfs_da_state_free(state); + return(retval); +} + +#if defined(XFS_DIR_TRACE) +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_du(char *where, xfs_inode_t *dp, uio_t *uio) +{ + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DU, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + NULL, NULL, NULL, NULL, NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_dub(char *where, xfs_inode_t *dp, uio_t *uio, xfs_dablk_t bno) +{ + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUB, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + (void *)(unsigned long)bno, + NULL, NULL, NULL, NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_dun(char *where, xfs_inode_t *dp, uio_t *uio, + xfs_da_intnode_t *node) +{ + int last = be16_to_cpu(node->hdr.count) - 1; + + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUN, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + (void *)(unsigned long)be32_to_cpu(node->hdr.info.forw), + (void *)(unsigned long) + be16_to_cpu(node->hdr.count), + (void *)(unsigned long) + be32_to_cpu(node->btree[0].hashval), + (void *)(unsigned long) + be32_to_cpu(node->btree[last].hashval), + NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_dul(char *where, xfs_inode_t *dp, uio_t *uio, + xfs_dir_leafblock_t *leaf) +{ + int last = INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1; + + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUL, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + (void *)(unsigned long)be32_to_cpu(leaf->hdr.info.forw), + (void *)(unsigned long) + INT_GET(leaf->hdr.count, ARCH_CONVERT), + (void *)(unsigned long) + INT_GET(leaf->entries[0].hashval, ARCH_CONVERT), + (void *)(unsigned long) + INT_GET(leaf->entries[last].hashval, ARCH_CONVERT), + NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_due(char *where, xfs_inode_t *dp, uio_t *uio, + xfs_dir_leaf_entry_t *entry) +{ + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUE, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + (void *)(unsigned long) + INT_GET(entry->hashval, ARCH_CONVERT), + NULL, NULL, NULL, NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for an inode and a uio. + */ +void +xfs_dir_trace_g_duc(char *where, xfs_inode_t *dp, uio_t *uio, xfs_off_t cookie) +{ + xfs_dir_trace_enter(XFS_DIR_KTRACE_G_DUC, where, + (void *)dp, (void *)dp->i_mount, + (void *)((unsigned long)(uio->uio_offset >> 32)), + (void *)((unsigned long)(uio->uio_offset & 0xFFFFFFFF)), + (void *)(unsigned long)uio->uio_resid, + (void *)((unsigned long)(cookie >> 32)), + (void *)((unsigned long)(cookie & 0xFFFFFFFF)), + NULL, NULL, NULL, NULL, NULL); +} + +/* + * Add a trace buffer entry for the arguments given to the routine, + * generic form. + */ +void +xfs_dir_trace_enter(int type, char *where, + void * a0, void * a1, + void * a2, void * a3, + void * a4, void * a5, + void * a6, void * a7, + void * a8, void * a9, + void * a10, void * a11) +{ + ASSERT(xfs_dir_trace_buf); + ktrace_enter(xfs_dir_trace_buf, (void *)(unsigned long)type, + (void *)where, + (void *)a0, (void *)a1, (void *)a2, + (void *)a3, (void *)a4, (void *)a5, + (void *)a6, (void *)a7, (void *)a8, + (void *)a9, (void *)a10, (void *)a11, + NULL, NULL); +} +#endif /* XFS_DIR_TRACE */ diff --git a/fs/xfs/xfs_dir.h b/fs/xfs/xfs_dir.h new file mode 100644 index 000000000..8cc8afb9f --- /dev/null +++ b/fs/xfs/xfs_dir.h @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * 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. + * + * 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. 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 the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __XFS_DIR_H__ +#define __XFS_DIR_H__ + +/* + * Large directories are structured around Btrees where all the data + * elements are in the leaf nodes. Filenames are hashed into an int, + * then that int is used as the index into the Btree. Since the hashval + * of a filename may not be unique, we may have duplicate keys. The + * internal links in the Btree are logical block offsets into the file. + * + * Small directories use a different format and are packed as tightly + * as possible so as to fit into the literal area of the inode. + */ + +/*======================================================================== + * Function prototypes for the kernel. + *========================================================================*/ + +struct uio; +struct xfs_bmap_free; +struct xfs_da_args; +struct xfs_dinode; +struct xfs_inode; +struct xfs_mount; +struct xfs_trans; + +/* + * Directory function types. + * Put in structures (xfs_dirops_t) for v1 and v2 directories. + */ +typedef void (*xfs_dir_mount_t)(struct xfs_mount *mp); +typedef int (*xfs_dir_isempty_t)(struct xfs_inode *dp); +typedef int (*xfs_dir_init_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + struct xfs_inode *pdp); +typedef int (*xfs_dir_createname_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name, + int namelen, + xfs_ino_t inum, + xfs_fsblock_t *first, + struct xfs_bmap_free *flist, + xfs_extlen_t total); +typedef int (*xfs_dir_lookup_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name, + int namelen, + xfs_ino_t *inum); +typedef int (*xfs_dir_removename_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name, + int namelen, + xfs_ino_t ino, + xfs_fsblock_t *first, + struct xfs_bmap_free *flist, + xfs_extlen_t total); +typedef int (*xfs_dir_getdents_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + struct uio *uio, + int *eofp); +typedef int (*xfs_dir_replace_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name, + int namelen, + xfs_ino_t inum, + xfs_fsblock_t *first, + struct xfs_bmap_free *flist, + xfs_extlen_t total); +typedef int (*xfs_dir_canenter_t)(struct xfs_trans *tp, + struct xfs_inode *dp, + char *name, + int namelen); +typedef int (*xfs_dir_shortform_validate_ondisk_t)(struct xfs_mount *mp, + struct xfs_dinode *dip); +typedef int (*xfs_dir_shortform_to_single_t)(struct xfs_da_args *args); + +typedef struct xfs_dirops { + xfs_dir_mount_t xd_mount; + xfs_dir_isempty_t xd_isempty; + xfs_dir_init_t xd_init; + xfs_dir_createname_t xd_createname; + xfs_dir_lookup_t xd_lookup; + xfs_dir_removename_t xd_removename; + xfs_dir_getdents_t xd_getdents; + xfs_dir_replace_t xd_replace; + xfs_dir_canenter_t xd_canenter; + xfs_dir_shortform_validate_ondisk_t xd_shortform_validate_ondisk; + xfs_dir_shortform_to_single_t xd_shortform_to_single; +} xfs_dirops_t; + +/* + * Overall external interface routines. + */ +void xfs_dir_startup(void); /* called exactly once */ + +#define XFS_DIR_MOUNT(mp) \ + ((mp)->m_dirops.xd_mount(mp)) +#define XFS_DIR_ISEMPTY(mp,dp) \ + ((mp)->m_dirops.xd_isempty(dp)) +#define XFS_DIR_INIT(mp,tp,dp,pdp) \ + ((mp)->m_dirops.xd_init(tp,dp,pdp)) +#define XFS_DIR_CREATENAME(mp,tp,dp,name,namelen,inum,first,flist,total) \ + ((mp)->m_dirops.xd_createname(tp,dp,name,namelen,inum,first,flist,\ + total)) +#define XFS_DIR_LOOKUP(mp,tp,dp,name,namelen,inum) \ + ((mp)->m_dirops.xd_lookup(tp,dp,name,namelen,inum)) +#define XFS_DIR_REMOVENAME(mp,tp,dp,name,namelen,ino,first,flist,total) \ + ((mp)->m_dirops.xd_removename(tp,dp,name,namelen,ino,first,flist,total)) +#define XFS_DIR_GETDENTS(mp,tp,dp,uio,eofp) \ + ((mp)->m_dirops.xd_getdents(tp,dp,uio,eofp)) +#define XFS_DIR_REPLACE(mp,tp,dp,name,namelen,inum,first,flist,total) \ + ((mp)->m_dirops.xd_replace(tp,dp,name,namelen,inum,first,flist,total)) +#define XFS_DIR_CANENTER(mp,tp,dp,name,namelen) \ + ((mp)->m_dirops.xd_canenter(tp,dp,name,namelen)) +#define XFS_DIR_SHORTFORM_VALIDATE_ONDISK(mp,dip) \ + ((mp)->m_dirops.xd_shortform_validate_ondisk(mp,dip)) +#define XFS_DIR_SHORTFORM_TO_SINGLE(mp,args) \ + ((mp)->m_dirops.xd_shortform_to_single(args)) + +#define XFS_DIR_IS_V1(mp) ((mp)->m_dirversion == 1) +#define XFS_DIR_IS_V2(mp) ((mp)->m_dirversion == 2) +extern xfs_dirops_t xfsv1_dirops; +extern xfs_dirops_t xfsv2_dirops; + +#endif /* __XFS_DIR_H__ */ diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 8edbe1adb..022c8398a 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c @@ -24,18 +24,21 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_inode_item.h" #include "xfs_bmap.h" +#include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" @@ -43,14 +46,69 @@ #include "xfs_dir2_trace.h" #include "xfs_error.h" +/* + * Declarations for interface routines. + */ +static void xfs_dir2_mount(xfs_mount_t *mp); +static int xfs_dir2_isempty(xfs_inode_t *dp); +static int xfs_dir2_init(xfs_trans_t *tp, xfs_inode_t *dp, + xfs_inode_t *pdp); +static int xfs_dir2_createname(xfs_trans_t *tp, xfs_inode_t *dp, + char *name, int namelen, xfs_ino_t inum, + xfs_fsblock_t *first, + xfs_bmap_free_t *flist, xfs_extlen_t total); +static int xfs_dir2_lookup(xfs_trans_t *tp, xfs_inode_t *dp, char *name, + int namelen, xfs_ino_t *inum); +static int xfs_dir2_removename(xfs_trans_t *tp, xfs_inode_t *dp, + char *name, int namelen, xfs_ino_t ino, + xfs_fsblock_t *first, + xfs_bmap_free_t *flist, xfs_extlen_t total); +static int xfs_dir2_getdents(xfs_trans_t *tp, xfs_inode_t *dp, uio_t *uio, + int *eofp); +static int xfs_dir2_replace(xfs_trans_t *tp, xfs_inode_t *dp, char *name, + int namelen, xfs_ino_t inum, + xfs_fsblock_t *first, xfs_bmap_free_t *flist, + xfs_extlen_t total); +static int xfs_dir2_canenter(xfs_trans_t *tp, xfs_inode_t *dp, char *name, + int namelen); +static int xfs_dir2_shortform_validate_ondisk(xfs_mount_t *mp, + xfs_dinode_t *dip); + +/* + * Utility routine declarations. + */ static int xfs_dir2_put_dirent64_direct(xfs_dir2_put_args_t *pa); static int xfs_dir2_put_dirent64_uio(xfs_dir2_put_args_t *pa); -void -xfs_dir_mount( - xfs_mount_t *mp) +/* + * Directory operations vector. + */ +xfs_dirops_t xfsv2_dirops = { + .xd_mount = xfs_dir2_mount, + .xd_isempty = xfs_dir2_isempty, + .xd_init = xfs_dir2_init, + .xd_createname = xfs_dir2_createname, + .xd_lookup = xfs_dir2_lookup, + .xd_removename = xfs_dir2_removename, + .xd_getdents = xfs_dir2_getdents, + .xd_replace = xfs_dir2_replace, + .xd_canenter = xfs_dir2_canenter, + .xd_shortform_validate_ondisk = xfs_dir2_shortform_validate_ondisk, + .xd_shortform_to_single = xfs_dir2_sf_to_block, +}; + +/* + * Interface routines. + */ + +/* + * Initialize directory-related fields in the mount structure. + */ +static void +xfs_dir2_mount( + xfs_mount_t *mp) /* filesystem mount point */ { - ASSERT(XFS_SB_VERSION_HASDIRV2(&mp->m_sb)); + mp->m_dirversion = 2; ASSERT((1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog)) <= XFS_MAX_BLOCKSIZE); mp->m_dirblksize = 1 << (mp->m_sb.sb_blocklog + mp->m_sb.sb_dirblklog); @@ -70,99 +128,73 @@ xfs_dir_mount( /* * Return 1 if directory contains only "." and "..". */ -int -xfs_dir_isempty( - xfs_inode_t *dp) +static int /* return code */ +xfs_dir2_isempty( + xfs_inode_t *dp) /* incore inode structure */ { - xfs_dir2_sf_t *sfp; + xfs_dir2_sf_t *sfp; /* shortform directory structure */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); - if (dp->i_d.di_size == 0) /* might happen during shutdown. */ + /* + * Might happen during shutdown. + */ + if (dp->i_d.di_size == 0) { return 1; + } if (dp->i_d.di_size > XFS_IFORK_DSIZE(dp)) return 0; sfp = (xfs_dir2_sf_t *)dp->i_df.if_u1.if_data; return !sfp->hdr.count; } -/* - * Validate a given inode number. - */ -int -xfs_dir_ino_validate( - xfs_mount_t *mp, - xfs_ino_t ino) -{ - xfs_agblock_t agblkno; - xfs_agino_t agino; - xfs_agnumber_t agno; - int ino_ok; - int ioff; - - agno = XFS_INO_TO_AGNO(mp, ino); - agblkno = XFS_INO_TO_AGBNO(mp, ino); - ioff = XFS_INO_TO_OFFSET(mp, ino); - agino = XFS_OFFBNO_TO_AGINO(mp, agblkno, ioff); - ino_ok = - agno < mp->m_sb.sb_agcount && - agblkno < mp->m_sb.sb_agblocks && - agblkno != 0 && - ioff < (1 << mp->m_sb.sb_inopblog) && - XFS_AGINO_TO_INO(mp, agno, agino) == ino; - if (unlikely(XFS_TEST_ERROR(!ino_ok, mp, XFS_ERRTAG_DIR_INO_VALIDATE, - XFS_RANDOM_DIR_INO_VALIDATE))) { - xfs_fs_cmn_err(CE_WARN, mp, "Invalid inode number 0x%Lx", - (unsigned long long) ino); - XFS_ERROR_REPORT("xfs_dir_ino_validate", XFS_ERRLEVEL_LOW, mp); - return XFS_ERROR(EFSCORRUPTED); - } - return 0; -} - /* * Initialize a directory with its "." and ".." entries. */ -int -xfs_dir_init( - xfs_trans_t *tp, - xfs_inode_t *dp, - xfs_inode_t *pdp) +static int /* error */ +xfs_dir2_init( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ + xfs_inode_t *pdp) /* incore parent directory inode */ { - xfs_da_args_t args; - int error; + xfs_da_args_t args; /* operation arguments */ + int error; /* error return value */ memset((char *)&args, 0, sizeof(args)); args.dp = dp; args.trans = tp; ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); - if ((error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino))) + if ((error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino))) { return error; + } return xfs_dir2_sf_create(&args, pdp->i_ino); } /* Enter a name in a directory. */ -int -xfs_dir_createname( - xfs_trans_t *tp, - xfs_inode_t *dp, - char *name, - int namelen, +static int /* error */ +xfs_dir2_createname( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ + char *name, /* new entry name */ + int namelen, /* new entry name length */ xfs_ino_t inum, /* new entry inode number */ xfs_fsblock_t *first, /* bmap's firstblock */ xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_extlen_t total) /* bmap's total block count */ { - xfs_da_args_t args; - int rval; + xfs_da_args_t args; /* operation arguments */ + int rval; /* return value */ int v; /* type-checking value */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); - if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) + if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) { return rval; + } XFS_STATS_INC(xs_dir_create); - + /* + * Fill in the arg structure for this request. + */ args.name = name; args.namelen = namelen; args.hashval = xfs_da_hashname(name, namelen); @@ -175,16 +207,18 @@ xfs_dir_createname( args.trans = tp; args.justcheck = 0; args.addname = args.oknoent = 1; - + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_addname(&args); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_block_addname(&args); - else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) + else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_leaf_addname(&args); else rval = xfs_dir2_node_addname(&args); @@ -194,21 +228,24 @@ xfs_dir_createname( /* * Lookup a name in a directory, give back the inode number. */ -int -xfs_dir_lookup( - xfs_trans_t *tp, - xfs_inode_t *dp, - char *name, - int namelen, +static int /* error */ +xfs_dir2_lookup( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ + char *name, /* lookup name */ + int namelen, /* lookup name length */ xfs_ino_t *inum) /* out: inode number */ { - xfs_da_args_t args; - int rval; + xfs_da_args_t args; /* operation arguments */ + int rval; /* return value */ int v; /* type-checking value */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); XFS_STATS_INC(xs_dir_lookup); + /* + * Fill in the arg structure for this request. + */ args.name = name; args.namelen = namelen; args.hashval = xfs_da_hashname(name, namelen); @@ -221,16 +258,18 @@ xfs_dir_lookup( args.trans = tp; args.justcheck = args.addname = 0; args.oknoent = 1; - + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_lookup(&args); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_block_lookup(&args); - else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) + else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_leaf_lookup(&args); else rval = xfs_dir2_node_lookup(&args); @@ -244,24 +283,26 @@ xfs_dir_lookup( /* * Remove an entry from a directory. */ -int -xfs_dir_removename( - xfs_trans_t *tp, - xfs_inode_t *dp, - char *name, - int namelen, - xfs_ino_t ino, +static int /* error */ +xfs_dir2_removename( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ + char *name, /* name of entry to remove */ + int namelen, /* name length of entry to remove */ + xfs_ino_t ino, /* inode number of entry to remove */ xfs_fsblock_t *first, /* bmap's firstblock */ xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_extlen_t total) /* bmap's total block count */ { - xfs_da_args_t args; - int rval; + xfs_da_args_t args; /* operation arguments */ + int rval; /* return value */ int v; /* type-checking value */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); XFS_STATS_INC(xs_dir_remove); - + /* + * Fill in the arg structure for this request. + */ args.name = name; args.namelen = namelen; args.hashval = xfs_da_hashname(name, namelen); @@ -273,16 +314,18 @@ xfs_dir_removename( args.whichfork = XFS_DATA_FORK; args.trans = tp; args.justcheck = args.addname = args.oknoent = 0; - + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_removename(&args); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_block_removename(&args); - else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) + else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_leaf_removename(&args); else rval = xfs_dir2_node_removename(&args); @@ -292,10 +335,10 @@ xfs_dir_removename( /* * Read a directory. */ -int -xfs_dir_getdents( - xfs_trans_t *tp, - xfs_inode_t *dp, +static int /* error */ +xfs_dir2_getdents( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ uio_t *uio, /* caller's buffer control */ int *eofp) /* out: eof reached */ { @@ -324,11 +367,14 @@ xfs_dir_getdents( } *eofp = 0; + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_getdents(dp, uio, eofp, dbp, put); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { ; - else if (v) + } else if (v) rval = xfs_dir2_block_getdents(tp, dp, uio, eofp, dbp, put); else rval = xfs_dir2_leaf_getdents(tp, dp, uio, eofp, dbp, put); @@ -340,26 +386,29 @@ xfs_dir_getdents( /* * Replace the inode number of a directory entry. */ -int -xfs_dir_replace( - xfs_trans_t *tp, - xfs_inode_t *dp, +static int /* error */ +xfs_dir2_replace( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ char *name, /* name of entry to replace */ - int namelen, + int namelen, /* name length of entry to replace */ xfs_ino_t inum, /* new inode number */ xfs_fsblock_t *first, /* bmap's firstblock */ xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_extlen_t total) /* bmap's total block count */ { - xfs_da_args_t args; - int rval; + xfs_da_args_t args; /* operation arguments */ + int rval; /* return value */ int v; /* type-checking value */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); - if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) + if ((rval = xfs_dir_ino_validate(tp->t_mountp, inum))) { return rval; - + } + /* + * Fill in the arg structure for this request. + */ args.name = name; args.namelen = namelen; args.hashval = xfs_da_hashname(name, namelen); @@ -371,16 +420,18 @@ xfs_dir_replace( args.whichfork = XFS_DATA_FORK; args.trans = tp; args.justcheck = args.addname = args.oknoent = 0; - + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_replace(&args); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_block_replace(&args); - else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) + else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_leaf_replace(&args); else rval = xfs_dir2_node_replace(&args); @@ -390,19 +441,21 @@ xfs_dir_replace( /* * See if this entry can be added to the directory without allocating space. */ -int -xfs_dir_canenter( - xfs_trans_t *tp, - xfs_inode_t *dp, +static int /* error */ +xfs_dir2_canenter( + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ char *name, /* name of entry to add */ - int namelen) + int namelen) /* name length of entry to add */ { - xfs_da_args_t args; - int rval; + xfs_da_args_t args; /* operation arguments */ + int rval; /* return value */ int v; /* type-checking value */ ASSERT((dp->i_d.di_mode & S_IFMT) == S_IFDIR); - + /* + * Fill in the arg structure for this request. + */ args.name = name; args.namelen = namelen; args.hashval = xfs_da_hashname(name, namelen); @@ -414,22 +467,37 @@ xfs_dir_canenter( args.whichfork = XFS_DATA_FORK; args.trans = tp; args.justcheck = args.addname = args.oknoent = 1; - + /* + * Decide on what work routines to call based on the inode size. + */ if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) rval = xfs_dir2_sf_addname(&args); - else if ((rval = xfs_dir2_isblock(tp, dp, &v))) + else if ((rval = xfs_dir2_isblock(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_block_addname(&args); - else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) + else if ((rval = xfs_dir2_isleaf(tp, dp, &v))) { return rval; - else if (v) + } else if (v) rval = xfs_dir2_leaf_addname(&args); else rval = xfs_dir2_node_addname(&args); return rval; } +/* + * Dummy routine for shortform inode validation. + * Can't really do this. + */ +/* ARGSUSED */ +static int /* error */ +xfs_dir2_shortform_validate_ondisk( + xfs_mount_t *mp, /* filesystem mount point */ + xfs_dinode_t *dip) /* ondisk inode */ +{ + return 0; +} + /* * Utility routines. */ @@ -439,24 +507,24 @@ xfs_dir_canenter( * This routine is for data and free blocks, not leaf/node blocks * which are handled by xfs_da_grow_inode. */ -int +int /* error */ xfs_dir2_grow_inode( - xfs_da_args_t *args, + xfs_da_args_t *args, /* operation arguments */ int space, /* v2 dir's space XFS_DIR2_xxx_SPACE */ xfs_dir2_db_t *dbp) /* out: block number added */ { xfs_fileoff_t bno; /* directory offset of new block */ int count; /* count of filesystem blocks */ xfs_inode_t *dp; /* incore directory inode */ - int error; + int error; /* error return value */ int got; /* blocks actually mapped */ - int i; + int i; /* temp mapping index */ xfs_bmbt_irec_t map; /* single structure for bmap */ int mapi; /* mapping index */ xfs_bmbt_irec_t *mapp; /* bmap mapping structure(s) */ - xfs_mount_t *mp; + xfs_mount_t *mp; /* filesystem mount point */ int nmap; /* number of bmap entries */ - xfs_trans_t *tp; + xfs_trans_t *tp; /* transaction pointer */ xfs_dir2_trace_args_s("grow_inode", args, space); dp = args->dp; @@ -470,8 +538,9 @@ xfs_dir2_grow_inode( /* * Find the first hole for our block. */ - if ((error = xfs_bmap_first_unused(tp, dp, count, &bno, XFS_DATA_FORK))) + if ((error = xfs_bmap_first_unused(tp, dp, count, &bno, XFS_DATA_FORK))) { return error; + } nmap = 1; ASSERT(args->firstblock != NULL); /* @@ -480,9 +549,13 @@ xfs_dir2_grow_inode( if ((error = xfs_bmapi(tp, dp, bno, count, XFS_BMAPI_WRITE|XFS_BMAPI_METADATA|XFS_BMAPI_CONTIG, args->firstblock, args->total, &map, &nmap, - args->flist, NULL))) + args->flist))) { return error; + } ASSERT(nmap <= 1); + /* + * Got it in 1. + */ if (nmap == 1) { mapp = ↦ mapi = 1; @@ -512,8 +585,7 @@ xfs_dir2_grow_inode( if ((error = xfs_bmapi(tp, dp, b, c, XFS_BMAPI_WRITE|XFS_BMAPI_METADATA, args->firstblock, args->total, - &mapp[mapi], &nmap, args->flist, - NULL))) { + &mapp[mapi], &nmap, args->flist))) { kmem_free(mapp, sizeof(*mapp) * count); return error; } @@ -573,19 +645,20 @@ xfs_dir2_grow_inode( /* * See if the directory is a single-block form directory. */ -int +int /* error */ xfs_dir2_isblock( - xfs_trans_t *tp, - xfs_inode_t *dp, + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ int *vp) /* out: 1 is block, 0 is not block */ { xfs_fileoff_t last; /* last file offset */ - xfs_mount_t *mp; - int rval; + xfs_mount_t *mp; /* filesystem mount point */ + int rval; /* return value */ mp = dp->i_mount; - if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) + if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) { return rval; + } rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize; ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize); *vp = rval; @@ -595,19 +668,20 @@ xfs_dir2_isblock( /* * See if the directory is a single-leaf form directory. */ -int +int /* error */ xfs_dir2_isleaf( - xfs_trans_t *tp, - xfs_inode_t *dp, + xfs_trans_t *tp, /* transaction pointer */ + xfs_inode_t *dp, /* incore directory inode */ int *vp) /* out: 1 is leaf, 0 is not leaf */ { xfs_fileoff_t last; /* last file offset */ - xfs_mount_t *mp; - int rval; + xfs_mount_t *mp; /* filesystem mount point */ + int rval; /* return value */ mp = dp->i_mount; - if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) + if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK))) { return rval; + } *vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog); return 0; } @@ -615,9 +689,9 @@ xfs_dir2_isleaf( /* * Getdents put routine for 64-bit ABI, direct form. */ -static int +static int /* error */ xfs_dir2_put_dirent64_direct( - xfs_dir2_put_args_t *pa) + xfs_dir2_put_args_t *pa) /* argument bundle */ { xfs_dirent_t *idbp; /* dirent pointer */ iovec_t *iovp; /* io vector */ @@ -652,9 +726,9 @@ xfs_dir2_put_dirent64_direct( /* * Getdents put routine for 64-bit ABI, uio form. */ -static int +static int /* error */ xfs_dir2_put_dirent64_uio( - xfs_dir2_put_args_t *pa) + xfs_dir2_put_args_t *pa) /* argument bundle */ { xfs_dirent_t *idbp; /* dirent pointer */ int namelen; /* entry name length */ @@ -690,17 +764,17 @@ xfs_dir2_put_dirent64_uio( */ int xfs_dir2_shrink_inode( - xfs_da_args_t *args, - xfs_dir2_db_t db, - xfs_dabuf_t *bp) + xfs_da_args_t *args, /* operation arguments */ + xfs_dir2_db_t db, /* directory block number */ + xfs_dabuf_t *bp) /* block's buffer */ { xfs_fileoff_t bno; /* directory file offset */ xfs_dablk_t da; /* directory file offset */ int done; /* bunmap is finished */ - xfs_inode_t *dp; - int error; - xfs_mount_t *mp; - xfs_trans_t *tp; + xfs_inode_t *dp; /* incore directory inode */ + int error; /* error return value */ + xfs_mount_t *mp; /* filesystem mount point */ + xfs_trans_t *tp; /* transaction pointer */ xfs_dir2_trace_args_db("shrink_inode", args, db, bp); dp = args->dp; @@ -712,7 +786,7 @@ xfs_dir2_shrink_inode( */ if ((error = xfs_bunmapi(tp, dp, da, mp->m_dirblkfsbs, XFS_BMAPI_METADATA, 0, args->firstblock, args->flist, - NULL, &done))) { + &done))) { /* * ENOSPC actually can happen if we're in a removename with * no space reservation, and the resulting block removal diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h index 86560b6f7..7dd364b1e 100644 --- a/fs/xfs/xfs_dir2.h +++ b/fs/xfs/xfs_dir2.h @@ -22,9 +22,7 @@ struct uio; struct xfs_dabuf; struct xfs_da_args; struct xfs_dir2_put_args; -struct xfs_bmap_free; struct xfs_inode; -struct xfs_mount; struct xfs_trans; /* @@ -75,35 +73,7 @@ typedef struct xfs_dir2_put_args { } xfs_dir2_put_args_t; /* - * Generic directory interface routines - */ -extern void xfs_dir_startup(void); -extern void xfs_dir_mount(struct xfs_mount *mp); -extern int xfs_dir_isempty(struct xfs_inode *dp); -extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp, - struct xfs_inode *pdp); -extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp, - char *name, int namelen, xfs_ino_t inum, - xfs_fsblock_t *first, - struct xfs_bmap_free *flist, xfs_extlen_t tot); -extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp, - char *name, int namelen, xfs_ino_t *inum); -extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp, - char *name, int namelen, xfs_ino_t ino, - xfs_fsblock_t *first, - struct xfs_bmap_free *flist, xfs_extlen_t tot); -extern int xfs_dir_getdents(struct xfs_trans *tp, struct xfs_inode *dp, - uio_t *uio, int *eofp); -extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp, - char *name, int namelen, xfs_ino_t inum, - xfs_fsblock_t *first, - struct xfs_bmap_free *flist, xfs_extlen_t tot); -extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, - char *name, int namelen); -extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); - -/* - * Utility routines for v2 directories. + * Other interfaces used by the rest of the dir v2 code. */ extern int xfs_dir2_grow_inode(struct xfs_da_args *args, int space, xfs_dir2_db_t *dbp); diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 9d7438bba..972ded595 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c @@ -22,16 +22,19 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_inode_item.h" +#include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" @@ -48,18 +51,6 @@ static int xfs_dir2_block_lookup_int(xfs_da_args_t *args, xfs_dabuf_t **bpp, int *entno); static int xfs_dir2_block_sort(const void *a, const void *b); -static xfs_dahash_t xfs_dir_hash_dot, xfs_dir_hash_dotdot; - -/* - * One-time startup routine called from xfs_init(). - */ -void -xfs_dir_startup(void) -{ - xfs_dir_hash_dot = xfs_da_hashname(".", 1); - xfs_dir_hash_dotdot = xfs_da_hashname("..", 2); -} - /* * Add an entry to a block directory. */ @@ -409,7 +400,7 @@ xfs_dir2_block_addname( /* * Create the new data entry. */ - dep->inumber = cpu_to_be64(args->inumber); + INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); dep->namelen = args->namelen; memcpy(dep->name, args->name, args->namelen); tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -517,7 +508,7 @@ xfs_dir2_block_getdents( p.cook = XFS_DIR2_DB_OFF_TO_DATAPTR(mp, mp->m_dirdatablk, ptr - (char *)block); - p.ino = be64_to_cpu(dep->inumber); + p.ino = INT_GET(dep->inumber, ARCH_CONVERT); #if XFS_BIG_INUMS p.ino += mp->m_inoadd; #endif @@ -635,7 +626,7 @@ xfs_dir2_block_lookup( /* * Fill in inode number, release the block. */ - args->inumber = be64_to_cpu(dep->inumber); + args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); xfs_da_brelse(args->trans, bp); return XFS_ERROR(EEXIST); } @@ -853,11 +844,11 @@ xfs_dir2_block_replace( */ dep = (xfs_dir2_data_entry_t *) ((char *)block + XFS_DIR2_DATAPTR_TO_OFF(mp, be32_to_cpu(blp[ent].address))); - ASSERT(be64_to_cpu(dep->inumber) != args->inumber); + ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) != args->inumber); /* * Change the inode number to the new value. */ - dep->inumber = cpu_to_be64(args->inumber); + INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); xfs_dir2_data_log_entry(args->trans, bp, dep); xfs_dir2_data_check(dp, bp); xfs_da_buf_done(bp); @@ -1139,7 +1130,7 @@ xfs_dir2_sf_to_block( */ dep = (xfs_dir2_data_entry_t *) ((char *)block + XFS_DIR2_DATA_DOT_OFFSET); - dep->inumber = cpu_to_be64(dp->i_ino); + INT_SET(dep->inumber, ARCH_CONVERT, dp->i_ino); dep->namelen = 1; dep->name[0] = '.'; tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -1153,7 +1144,7 @@ xfs_dir2_sf_to_block( */ dep = (xfs_dir2_data_entry_t *) ((char *)block + XFS_DIR2_DATA_DOTDOT_OFFSET); - dep->inumber = cpu_to_be64(XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); + INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); dep->namelen = 2; dep->name[0] = dep->name[1] = '.'; tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -1202,7 +1193,7 @@ xfs_dir2_sf_to_block( * Copy a real entry. */ dep = (xfs_dir2_data_entry_t *)((char *)block + newoffset); - dep->inumber = cpu_to_be64(XFS_DIR2_SF_GET_INUMBER(sfp, + INT_SET(dep->inumber, ARCH_CONVERT, XFS_DIR2_SF_GET_INUMBER(sfp, XFS_DIR2_SF_INUMBERP(sfep))); dep->namelen = sfep->namelen; memcpy(dep->name, sfep->name, dep->namelen); diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index f7c799217..bb3d03ff0 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c @@ -22,15 +22,18 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" @@ -130,7 +133,7 @@ xfs_dir2_data_check( */ dep = (xfs_dir2_data_entry_t *)p; ASSERT(dep->namelen != 0); - ASSERT(xfs_dir_ino_validate(mp, be64_to_cpu(dep->inumber)) == 0); + ASSERT(xfs_dir_ino_validate(mp, INT_GET(dep->inumber, ARCH_CONVERT)) == 0); ASSERT(be16_to_cpu(*XFS_DIR2_DATA_ENTRY_TAG_P(dep)) == (char *)dep - (char *)d); count++; diff --git a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h index a6ae2d21c..0847cbb53 100644 --- a/fs/xfs/xfs_dir2_data.h +++ b/fs/xfs/xfs_dir2_data.h @@ -85,11 +85,11 @@ typedef struct xfs_dir2_data_hdr { * Tag appears as the last 2 bytes. */ typedef struct xfs_dir2_data_entry { - __be64 inumber; /* inode number */ - __u8 namelen; /* name length */ - __u8 name[1]; /* name bytes, no null */ + xfs_ino_t inumber; /* inode number */ + __uint8_t namelen; /* name length */ + __uint8_t name[1]; /* name bytes, no null */ /* variable offset */ - __be16 tag; /* starting offset of us */ + xfs_dir2_data_off_t tag; /* starting offset of us */ } xfs_dir2_data_entry_t; /* diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index b1cf1fbf4..0f5e2f2ce 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_attr_sf.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" @@ -405,7 +407,7 @@ xfs_dir2_leaf_addname( * Initialize our new entry (at last). */ dep = (xfs_dir2_data_entry_t *)dup; - dep->inumber = cpu_to_be64(args->inumber); + INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); dep->namelen = args->namelen; memcpy(dep->name, args->name, dep->namelen); tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -882,7 +884,7 @@ xfs_dir2_leaf_getdents( XFS_DIR2_BYTE_TO_DA(mp, XFS_DIR2_LEAF_OFFSET) - map_off, XFS_BMAPI_METADATA, NULL, 0, - &map[map_valid], &nmap, NULL, NULL); + &map[map_valid], &nmap, NULL); /* * Don't know if we should ignore this or * try to return an error. @@ -1096,7 +1098,7 @@ xfs_dir2_leaf_getdents( p->cook = XFS_DIR2_BYTE_TO_DATAPTR(mp, curoff + length); - p->ino = be64_to_cpu(dep->inumber); + p->ino = INT_GET(dep->inumber, ARCH_CONVERT); #if XFS_BIG_INUMS p->ino += mp->m_inoadd; #endif @@ -1317,7 +1319,7 @@ xfs_dir2_leaf_lookup( /* * Return the found inode number. */ - args->inumber = be64_to_cpu(dep->inumber); + args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); xfs_da_brelse(tp, dbp); xfs_da_brelse(tp, lbp); return XFS_ERROR(EEXIST); @@ -1604,11 +1606,11 @@ xfs_dir2_leaf_replace( dep = (xfs_dir2_data_entry_t *) ((char *)dbp->data + XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address))); - ASSERT(args->inumber != be64_to_cpu(dep->inumber)); + ASSERT(args->inumber != INT_GET(dep->inumber, ARCH_CONVERT)); /* * Put the new inode number in, log it. */ - dep->inumber = cpu_to_be64(args->inumber); + INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); tp = args->trans; xfs_dir2_data_log_entry(tp, dbp, dep); xfs_da_buf_done(dbp); diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index 9ca71719b..0655cc3cb 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -22,11 +22,13 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -503,6 +505,7 @@ xfs_dir2_leafn_lookup_int( XFS_DATA_FORK))) { return error; } + curfdb = newfdb; free = curbp->data; ASSERT(be32_to_cpu(free->hdr.magic) == XFS_DIR2_FREE_MAGIC); @@ -524,11 +527,8 @@ xfs_dir2_leafn_lookup_int( if (unlikely(be16_to_cpu(free->bests[fi]) == NULLDATAOFF)) { XFS_ERROR_REPORT("xfs_dir2_leafn_lookup_int", XFS_ERRLEVEL_LOW, mp); - if (curfdb != newfdb) - xfs_da_brelse(tp, curbp); return XFS_ERROR(EFSCORRUPTED); } - curfdb = newfdb; if (be16_to_cpu(free->bests[fi]) >= length) { *indexp = index; state->extravalid = 1; @@ -580,7 +580,7 @@ xfs_dir2_leafn_lookup_int( if (dep->namelen == args->namelen && dep->name[0] == args->name[0] && memcmp(dep->name, args->name, args->namelen) == 0) { - args->inumber = be64_to_cpu(dep->inumber); + args->inumber = INT_GET(dep->inumber, ARCH_CONVERT); *indexp = index; state->extravalid = 1; state->extrablk.bp = curbp; @@ -1695,7 +1695,7 @@ xfs_dir2_node_addname_int( * Fill in the new entry and log it. */ dep = (xfs_dir2_data_entry_t *)dup; - dep->inumber = cpu_to_be64(args->inumber); + INT_SET(dep->inumber, ARCH_CONVERT, args->inumber); dep->namelen = args->namelen; memcpy(dep->name, args->name, dep->namelen); tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep); @@ -1905,11 +1905,11 @@ xfs_dir2_node_replace( dep = (xfs_dir2_data_entry_t *) ((char *)data + XFS_DIR2_DATAPTR_TO_OFF(state->mp, be32_to_cpu(lep->address))); - ASSERT(inum != be64_to_cpu(dep->inumber)); + ASSERT(inum != INT_GET(dep->inumber, ARCH_CONVERT)); /* * Fill in the new inode number and log the entry. */ - dep->inumber = cpu_to_be64(inum); + INT_SET(dep->inumber, ARCH_CONVERT, inum); xfs_dir2_data_log_entry(args->trans, state->extrablk.bp, dep); rval = 0; } diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c index 0cd77b17b..d98a41d1f 100644 --- a/fs/xfs/xfs_dir2_sf.c +++ b/fs/xfs/xfs_dir2_sf.c @@ -22,16 +22,19 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_inode_item.h" +#include "xfs_dir_leaf.h" #include "xfs_error.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" @@ -114,13 +117,13 @@ xfs_dir2_block_sfsize( dep->name[0] == '.' && dep->name[1] == '.'; #if XFS_BIG_INUMS if (!isdot) - i8count += be64_to_cpu(dep->inumber) > XFS_DIR2_MAX_SHORT_INUM; + i8count += INT_GET(dep->inumber, ARCH_CONVERT) > XFS_DIR2_MAX_SHORT_INUM; #endif if (!isdot && !isdotdot) { count++; namelen += dep->namelen; } else if (isdotdot) - parent = be64_to_cpu(dep->inumber); + parent = INT_GET(dep->inumber, ARCH_CONVERT); /* * Calculate the new size, see if we should give up yet. */ @@ -226,13 +229,13 @@ xfs_dir2_block_to_sf( * Skip . */ if (dep->namelen == 1 && dep->name[0] == '.') - ASSERT(be64_to_cpu(dep->inumber) == dp->i_ino); + ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) == dp->i_ino); /* * Skip .., but make sure the inode number is right. */ else if (dep->namelen == 2 && dep->name[0] == '.' && dep->name[1] == '.') - ASSERT(be64_to_cpu(dep->inumber) == + ASSERT(INT_GET(dep->inumber, ARCH_CONVERT) == XFS_DIR2_SF_GET_INUMBER(sfp, &sfp->hdr.parent)); /* * Normal entry, copy it into shortform. @@ -243,7 +246,7 @@ xfs_dir2_block_to_sf( (xfs_dir2_data_aoff_t) ((char *)dep - (char *)block)); memcpy(sfep->name, dep->name, dep->namelen); - temp = be64_to_cpu(dep->inumber); + temp=INT_GET(dep->inumber, ARCH_CONVERT); XFS_DIR2_SF_PUT_INUMBER(sfp, &temp, XFS_DIR2_SF_INUMBERP(sfep)); sfep = XFS_DIR2_SF_NEXTENTRY(sfp, sfep); diff --git a/fs/xfs/xfs_dir2_trace.c b/fs/xfs/xfs_dir2_trace.c index f3fb2ffd6..c626943b4 100644 --- a/fs/xfs/xfs_dir2_trace.c +++ b/fs/xfs/xfs_dir2_trace.c @@ -19,9 +19,11 @@ #include "xfs_fs.h" #include "xfs_types.h" #include "xfs_inum.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c new file mode 100644 index 000000000..6d7118692 --- /dev/null +++ b/fs/xfs/xfs_dir_leaf.c @@ -0,0 +1,2213 @@ +/* + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * 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. + * + * 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. 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 the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "xfs.h" +#include "xfs_fs.h" +#include "xfs_types.h" +#include "xfs_log.h" +#include "xfs_inum.h" +#include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_dir.h" +#include "xfs_dir2.h" +#include "xfs_dmapi.h" +#include "xfs_mount.h" +#include "xfs_da_btree.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" +#include "xfs_bmap.h" +#include "xfs_dir_leaf.h" +#include "xfs_error.h" + +/* + * xfs_dir_leaf.c + * + * Routines to implement leaf blocks of directories as Btrees of hashed names. + */ + +/*======================================================================== + * Function prototypes for the kernel. + *========================================================================*/ + +/* + * Routines used for growing the Btree. + */ +STATIC void xfs_dir_leaf_add_work(xfs_dabuf_t *leaf_buffer, xfs_da_args_t *args, + int insertion_index, + int freemap_index); +STATIC int xfs_dir_leaf_compact(xfs_trans_t *trans, xfs_dabuf_t *leaf_buffer, + int musthave, int justcheck); +STATIC void xfs_dir_leaf_rebalance(xfs_da_state_t *state, + xfs_da_state_blk_t *blk1, + xfs_da_state_blk_t *blk2); +STATIC int xfs_dir_leaf_figure_balance(xfs_da_state_t *state, + xfs_da_state_blk_t *leaf_blk_1, + xfs_da_state_blk_t *leaf_blk_2, + int *number_entries_in_blk1, + int *number_namebytes_in_blk1); + +STATIC int xfs_dir_leaf_create(struct xfs_da_args *args, + xfs_dablk_t which_block, + struct xfs_dabuf **bpp); + +/* + * Utility routines. + */ +STATIC void xfs_dir_leaf_moveents(xfs_dir_leafblock_t *src_leaf, + int src_start, + xfs_dir_leafblock_t *dst_leaf, + int dst_start, int move_count, + xfs_mount_t *mp); + + +/*======================================================================== + * External routines when dirsize < XFS_IFORK_DSIZE(dp). + *========================================================================*/ + + +/* + * Validate a given inode number. + */ +int +xfs_dir_ino_validate(xfs_mount_t *mp, xfs_ino_t ino) +{ + xfs_agblock_t agblkno; + xfs_agino_t agino; + xfs_agnumber_t agno; + int ino_ok; + int ioff; + + agno = XFS_INO_TO_AGNO(mp, ino); + agblkno = XFS_INO_TO_AGBNO(mp, ino); + ioff = XFS_INO_TO_OFFSET(mp, ino); + agino = XFS_OFFBNO_TO_AGINO(mp, agblkno, ioff); + ino_ok = + agno < mp->m_sb.sb_agcount && + agblkno < mp->m_sb.sb_agblocks && + agblkno != 0 && + ioff < (1 << mp->m_sb.sb_inopblog) && + XFS_AGINO_TO_INO(mp, agno, agino) == ino; + if (unlikely(XFS_TEST_ERROR(!ino_ok, mp, XFS_ERRTAG_DIR_INO_VALIDATE, + XFS_RANDOM_DIR_INO_VALIDATE))) { + xfs_fs_cmn_err(CE_WARN, mp, "Invalid inode number 0x%Lx", + (unsigned long long) ino); + XFS_ERROR_REPORT("xfs_dir_ino_validate", XFS_ERRLEVEL_LOW, mp); + return XFS_ERROR(EFSCORRUPTED); + } + return 0; +} + +/* + * Create the initial contents of a shortform directory. + */ +int +xfs_dir_shortform_create(xfs_da_args_t *args, xfs_ino_t parent) +{ + xfs_dir_sf_hdr_t *hdr; + xfs_inode_t *dp; + + dp = args->dp; + ASSERT(dp != NULL); + ASSERT(dp->i_d.di_size == 0); + if (dp->i_d.di_format == XFS_DINODE_FMT_EXTENTS) { + dp->i_df.if_flags &= ~XFS_IFEXTENTS; /* just in case */ + dp->i_d.di_format = XFS_DINODE_FMT_LOCAL; + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE); + dp->i_df.if_flags |= XFS_IFINLINE; + } + ASSERT(dp->i_df.if_flags & XFS_IFINLINE); + ASSERT(dp->i_df.if_bytes == 0); + xfs_idata_realloc(dp, sizeof(*hdr), XFS_DATA_FORK); + hdr = (xfs_dir_sf_hdr_t *)dp->i_df.if_u1.if_data; + XFS_DIR_SF_PUT_DIRINO(&parent, &hdr->parent); + + hdr->count = 0; + dp->i_d.di_size = sizeof(*hdr); + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_DDATA); + return 0; +} + +/* + * Add a name to the shortform directory structure. + * Overflow from the inode has already been checked for. + */ +int +xfs_dir_shortform_addname(xfs_da_args_t *args) +{ + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + int i, offset, size; + xfs_inode_t *dp; + + dp = args->dp; + ASSERT(dp->i_df.if_flags & XFS_IFINLINE); + /* + * Catch the case where the conversion from shortform to leaf + * failed part way through. + */ + if (dp->i_d.di_size < sizeof(xfs_dir_sf_hdr_t)) { + ASSERT(XFS_FORCED_SHUTDOWN(dp->i_mount)); + return XFS_ERROR(EIO); + } + ASSERT(dp->i_df.if_bytes == dp->i_d.di_size); + ASSERT(dp->i_df.if_u1.if_data != NULL); + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + sfe = &sf->list[0]; + for (i = sf->hdr.count-1; i >= 0; i--) { + if (sfe->namelen == args->namelen && + args->name[0] == sfe->name[0] && + memcmp(args->name, sfe->name, args->namelen) == 0) + return XFS_ERROR(EEXIST); + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + + offset = (int)((char *)sfe - (char *)sf); + size = XFS_DIR_SF_ENTSIZE_BYNAME(args->namelen); + xfs_idata_realloc(dp, size, XFS_DATA_FORK); + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + sfe = (xfs_dir_sf_entry_t *)((char *)sf + offset); + + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sfe->inumber); + sfe->namelen = args->namelen; + memcpy(sfe->name, args->name, sfe->namelen); + sf->hdr.count++; + + dp->i_d.di_size += size; + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_DDATA); + + return 0; +} + +/* + * Remove a name from the shortform directory structure. + */ +int +xfs_dir_shortform_removename(xfs_da_args_t *args) +{ + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + int base, size = 0, i; + xfs_inode_t *dp; + + dp = args->dp; + ASSERT(dp->i_df.if_flags & XFS_IFINLINE); + /* + * Catch the case where the conversion from shortform to leaf + * failed part way through. + */ + if (dp->i_d.di_size < sizeof(xfs_dir_sf_hdr_t)) { + ASSERT(XFS_FORCED_SHUTDOWN(dp->i_mount)); + return XFS_ERROR(EIO); + } + ASSERT(dp->i_df.if_bytes == dp->i_d.di_size); + ASSERT(dp->i_df.if_u1.if_data != NULL); + base = sizeof(xfs_dir_sf_hdr_t); + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + sfe = &sf->list[0]; + for (i = sf->hdr.count-1; i >= 0; i--) { + size = XFS_DIR_SF_ENTSIZE_BYENTRY(sfe); + if (sfe->namelen == args->namelen && + sfe->name[0] == args->name[0] && + memcmp(sfe->name, args->name, args->namelen) == 0) + break; + base += size; + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + if (i < 0) { + ASSERT(args->oknoent); + return XFS_ERROR(ENOENT); + } + + if ((base + size) != dp->i_d.di_size) { + memmove(&((char *)sf)[base], &((char *)sf)[base+size], + dp->i_d.di_size - (base+size)); + } + sf->hdr.count--; + + xfs_idata_realloc(dp, -size, XFS_DATA_FORK); + dp->i_d.di_size -= size; + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE | XFS_ILOG_DDATA); + + return 0; +} + +/* + * Look up a name in a shortform directory structure. + */ +int +xfs_dir_shortform_lookup(xfs_da_args_t *args) +{ + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + int i; + xfs_inode_t *dp; + + dp = args->dp; + ASSERT(dp->i_df.if_flags & XFS_IFINLINE); + /* + * Catch the case where the conversion from shortform to leaf + * failed part way through. + */ + if (dp->i_d.di_size < sizeof(xfs_dir_sf_hdr_t)) { + ASSERT(XFS_FORCED_SHUTDOWN(dp->i_mount)); + return XFS_ERROR(EIO); + } + ASSERT(dp->i_df.if_bytes == dp->i_d.di_size); + ASSERT(dp->i_df.if_u1.if_data != NULL); + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + if (args->namelen == 2 && + args->name[0] == '.' && args->name[1] == '.') { + XFS_DIR_SF_GET_DIRINO(&sf->hdr.parent, &args->inumber); + return(XFS_ERROR(EEXIST)); + } + if (args->namelen == 1 && args->name[0] == '.') { + args->inumber = dp->i_ino; + return(XFS_ERROR(EEXIST)); + } + sfe = &sf->list[0]; + for (i = sf->hdr.count-1; i >= 0; i--) { + if (sfe->namelen == args->namelen && + sfe->name[0] == args->name[0] && + memcmp(args->name, sfe->name, args->namelen) == 0) { + XFS_DIR_SF_GET_DIRINO(&sfe->inumber, &args->inumber); + return(XFS_ERROR(EEXIST)); + } + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + ASSERT(args->oknoent); + return(XFS_ERROR(ENOENT)); +} + +/* + * Convert from using the shortform to the leaf. + */ +int +xfs_dir_shortform_to_leaf(xfs_da_args_t *iargs) +{ + xfs_inode_t *dp; + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + xfs_da_args_t args; + xfs_ino_t inumber; + char *tmpbuffer; + int retval, i, size; + xfs_dablk_t blkno; + xfs_dabuf_t *bp; + + dp = iargs->dp; + /* + * Catch the case where the conversion from shortform to leaf + * failed part way through. + */ + if (dp->i_d.di_size < sizeof(xfs_dir_sf_hdr_t)) { + ASSERT(XFS_FORCED_SHUTDOWN(dp->i_mount)); + return XFS_ERROR(EIO); + } + ASSERT(dp->i_df.if_bytes == dp->i_d.di_size); + ASSERT(dp->i_df.if_u1.if_data != NULL); + size = dp->i_df.if_bytes; + tmpbuffer = kmem_alloc(size, KM_SLEEP); + ASSERT(tmpbuffer != NULL); + + memcpy(tmpbuffer, dp->i_df.if_u1.if_data, size); + + sf = (xfs_dir_shortform_t *)tmpbuffer; + XFS_DIR_SF_GET_DIRINO(&sf->hdr.parent, &inumber); + + xfs_idata_realloc(dp, -size, XFS_DATA_FORK); + dp->i_d.di_size = 0; + xfs_trans_log_inode(iargs->trans, dp, XFS_ILOG_CORE); + retval = xfs_da_grow_inode(iargs, &blkno); + if (retval) + goto out; + + ASSERT(blkno == 0); + retval = xfs_dir_leaf_create(iargs, blkno, &bp); + if (retval) + goto out; + xfs_da_buf_done(bp); + + args.name = "."; + args.namelen = 1; + args.hashval = xfs_dir_hash_dot; + args.inumber = dp->i_ino; + args.dp = dp; + args.firstblock = iargs->firstblock; + args.flist = iargs->flist; + args.total = iargs->total; + args.whichfork = XFS_DATA_FORK; + args.trans = iargs->trans; + args.justcheck = 0; + args.addname = args.oknoent = 1; + retval = xfs_dir_leaf_addname(&args); + if (retval) + goto out; + + args.name = ".."; + args.namelen = 2; + args.hashval = xfs_dir_hash_dotdot; + args.inumber = inumber; + retval = xfs_dir_leaf_addname(&args); + if (retval) + goto out; + + sfe = &sf->list[0]; + for (i = 0; i < sf->hdr.count; i++) { + args.name = (char *)(sfe->name); + args.namelen = sfe->namelen; + args.hashval = xfs_da_hashname((char *)(sfe->name), + sfe->namelen); + XFS_DIR_SF_GET_DIRINO(&sfe->inumber, &args.inumber); + retval = xfs_dir_leaf_addname(&args); + if (retval) + goto out; + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + retval = 0; + +out: + kmem_free(tmpbuffer, size); + return retval; +} + +STATIC int +xfs_dir_shortform_compare(const void *a, const void *b) +{ + xfs_dir_sf_sort_t *sa, *sb; + + sa = (xfs_dir_sf_sort_t *)a; + sb = (xfs_dir_sf_sort_t *)b; + if (sa->hash < sb->hash) + return -1; + else if (sa->hash > sb->hash) + return 1; + else + return sa->entno - sb->entno; +} + +/* + * Copy out directory entries for getdents(), for shortform directories. + */ +/*ARGSUSED*/ +int +xfs_dir_shortform_getdents(xfs_inode_t *dp, uio_t *uio, int *eofp, + xfs_dirent_t *dbp, xfs_dir_put_t put) +{ + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + int retval, i, sbsize, nsbuf, lastresid=0, want_entno; + xfs_mount_t *mp; + xfs_dahash_t cookhash, hash; + xfs_dir_put_args_t p; + xfs_dir_sf_sort_t *sbuf, *sbp; + + mp = dp->i_mount; + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + cookhash = XFS_DA_COOKIE_HASH(mp, uio->uio_offset); + want_entno = XFS_DA_COOKIE_ENTRY(mp, uio->uio_offset); + nsbuf = sf->hdr.count + 2; + sbsize = (nsbuf + 1) * sizeof(*sbuf); + sbp = sbuf = kmem_alloc(sbsize, KM_SLEEP); + + xfs_dir_trace_g_du("sf: start", dp, uio); + + /* + * Collect all the entries into the buffer. + * Entry 0 is . + */ + sbp->entno = 0; + sbp->seqno = 0; + sbp->hash = xfs_dir_hash_dot; + sbp->ino = dp->i_ino; + sbp->name = "."; + sbp->namelen = 1; + sbp++; + + /* + * Entry 1 is .. + */ + sbp->entno = 1; + sbp->seqno = 0; + sbp->hash = xfs_dir_hash_dotdot; + sbp->ino = XFS_GET_DIR_INO8(sf->hdr.parent); + sbp->name = ".."; + sbp->namelen = 2; + sbp++; + + /* + * Scan the directory data for the rest of the entries. + */ + for (i = 0, sfe = &sf->list[0]; i < sf->hdr.count; i++) { + + if (unlikely( + ((char *)sfe < (char *)sf) || + ((char *)sfe >= ((char *)sf + dp->i_df.if_bytes)))) { + xfs_dir_trace_g_du("sf: corrupted", dp, uio); + XFS_CORRUPTION_ERROR("xfs_dir_shortform_getdents", + XFS_ERRLEVEL_LOW, mp, sfe); + kmem_free(sbuf, sbsize); + return XFS_ERROR(EFSCORRUPTED); + } + + sbp->entno = i + 2; + sbp->seqno = 0; + sbp->hash = xfs_da_hashname((char *)sfe->name, sfe->namelen); + sbp->ino = XFS_GET_DIR_INO8(sfe->inumber); + sbp->name = (char *)sfe->name; + sbp->namelen = sfe->namelen; + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + sbp++; + } + + /* + * Sort the entries on hash then entno. + */ + xfs_sort(sbuf, nsbuf, sizeof(*sbuf), xfs_dir_shortform_compare); + /* + * Stuff in last entry. + */ + sbp->entno = nsbuf; + sbp->hash = XFS_DA_MAXHASH; + sbp->seqno = 0; + /* + * Figure out the sequence numbers in case there's a hash duplicate. + */ + for (hash = sbuf->hash, sbp = sbuf + 1; + sbp < &sbuf[nsbuf + 1]; sbp++) { + if (sbp->hash == hash) + sbp->seqno = sbp[-1].seqno + 1; + else + hash = sbp->hash; + } + + /* + * Set up put routine. + */ + p.dbp = dbp; + p.put = put; + p.uio = uio; + + /* + * Find our place. + */ + for (sbp = sbuf; sbp < &sbuf[nsbuf + 1]; sbp++) { + if (sbp->hash > cookhash || + (sbp->hash == cookhash && sbp->seqno >= want_entno)) + break; + } + + /* + * Did we fail to find anything? We stop at the last entry, + * the one we put maxhash into. + */ + if (sbp == &sbuf[nsbuf]) { + kmem_free(sbuf, sbsize); + xfs_dir_trace_g_du("sf: hash beyond end", dp, uio); + uio->uio_offset = XFS_DA_MAKE_COOKIE(mp, 0, 0, XFS_DA_MAXHASH); + *eofp = 1; + return 0; + } + + /* + * Loop putting entries into the user buffer. + */ + while (sbp < &sbuf[nsbuf]) { + /* + * Save the first resid in a run of equal-hashval entries + * so that we can back them out if they don't all fit. + */ + if (sbp->seqno == 0 || sbp == sbuf) + lastresid = uio->uio_resid; + XFS_PUT_COOKIE(p.cook, mp, 0, sbp[1].seqno, sbp[1].hash); + p.ino = sbp->ino; +#if XFS_BIG_INUMS + p.ino += mp->m_inoadd; +#endif + p.name = sbp->name; + p.namelen = sbp->namelen; + retval = p.put(&p); + if (!p.done) { + uio->uio_offset = + XFS_DA_MAKE_COOKIE(mp, 0, 0, sbp->hash); + kmem_free(sbuf, sbsize); + uio->uio_resid = lastresid; + xfs_dir_trace_g_du("sf: E-O-B", dp, uio); + return retval; + } + sbp++; + } + kmem_free(sbuf, sbsize); + uio->uio_offset = p.cook.o; + *eofp = 1; + xfs_dir_trace_g_du("sf: E-O-F", dp, uio); + return 0; +} + +/* + * Look up a name in a shortform directory structure, replace the inode number. + */ +int +xfs_dir_shortform_replace(xfs_da_args_t *args) +{ + xfs_dir_shortform_t *sf; + xfs_dir_sf_entry_t *sfe; + xfs_inode_t *dp; + int i; + + dp = args->dp; + ASSERT(dp->i_df.if_flags & XFS_IFINLINE); + /* + * Catch the case where the conversion from shortform to leaf + * failed part way through. + */ + if (dp->i_d.di_size < sizeof(xfs_dir_sf_hdr_t)) { + ASSERT(XFS_FORCED_SHUTDOWN(dp->i_mount)); + return XFS_ERROR(EIO); + } + ASSERT(dp->i_df.if_bytes == dp->i_d.di_size); + ASSERT(dp->i_df.if_u1.if_data != NULL); + sf = (xfs_dir_shortform_t *)dp->i_df.if_u1.if_data; + if (args->namelen == 2 && + args->name[0] == '.' && args->name[1] == '.') { + /* XXX - replace assert? */ + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sf->hdr.parent); + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_DDATA); + return 0; + } + ASSERT(args->namelen != 1 || args->name[0] != '.'); + sfe = &sf->list[0]; + for (i = sf->hdr.count-1; i >= 0; i--) { + if (sfe->namelen == args->namelen && + sfe->name[0] == args->name[0] && + memcmp(args->name, sfe->name, args->namelen) == 0) { + ASSERT(memcmp((char *)&args->inumber, + (char *)&sfe->inumber, sizeof(xfs_ino_t))); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &sfe->inumber); + xfs_trans_log_inode(args->trans, dp, XFS_ILOG_DDATA); + return 0; + } + sfe = XFS_DIR_SF_NEXTENTRY(sfe); + } + ASSERT(args->oknoent); + return XFS_ERROR(ENOENT); +} + +/* + * Convert a leaf directory to shortform structure + */ +int +xfs_dir_leaf_to_shortform(xfs_da_args_t *iargs) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_hdr_t *hdr; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + xfs_da_args_t args; + xfs_inode_t *dp; + xfs_ino_t parent = 0; + char *tmpbuffer; + int retval, i; + xfs_dabuf_t *bp; + + dp = iargs->dp; + tmpbuffer = kmem_alloc(XFS_LBSIZE(dp->i_mount), KM_SLEEP); + ASSERT(tmpbuffer != NULL); + + retval = xfs_da_read_buf(iargs->trans, iargs->dp, 0, -1, &bp, + XFS_DATA_FORK); + if (retval) + goto out; + ASSERT(bp != NULL); + memcpy(tmpbuffer, bp->data, XFS_LBSIZE(dp->i_mount)); + leaf = (xfs_dir_leafblock_t *)tmpbuffer; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + memset(bp->data, 0, XFS_LBSIZE(dp->i_mount)); + + /* + * Find and special case the parent inode number + */ + hdr = &leaf->hdr; + entry = &leaf->entries[0]; + for (i = INT_GET(hdr->count, ARCH_CONVERT)-1; i >= 0; entry++, i--) { + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + if ((entry->namelen == 2) && + (namest->name[0] == '.') && + (namest->name[1] == '.')) { + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &parent); + entry->nameidx = 0; + } else if ((entry->namelen == 1) && (namest->name[0] == '.')) { + entry->nameidx = 0; + } + } + retval = xfs_da_shrink_inode(iargs, 0, bp); + if (retval) + goto out; + retval = xfs_dir_shortform_create(iargs, parent); + if (retval) + goto out; + + /* + * Copy the rest of the filenames + */ + entry = &leaf->entries[0]; + args.dp = dp; + args.firstblock = iargs->firstblock; + args.flist = iargs->flist; + args.total = iargs->total; + args.whichfork = XFS_DATA_FORK; + args.trans = iargs->trans; + args.justcheck = 0; + args.addname = args.oknoent = 1; + for (i = 0; i < INT_GET(hdr->count, ARCH_CONVERT); entry++, i++) { + if (!entry->nameidx) + continue; + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + args.name = (char *)(namest->name); + args.namelen = entry->namelen; + args.hashval = INT_GET(entry->hashval, ARCH_CONVERT); + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &args.inumber); + xfs_dir_shortform_addname(&args); + } + +out: + kmem_free(tmpbuffer, XFS_LBSIZE(dp->i_mount)); + return retval; +} + +/* + * Convert from using a single leaf to a root node and a leaf. + */ +int +xfs_dir_leaf_to_node(xfs_da_args_t *args) +{ + xfs_dir_leafblock_t *leaf; + xfs_da_intnode_t *node; + xfs_inode_t *dp; + xfs_dabuf_t *bp1, *bp2; + xfs_dablk_t blkno; + int retval; + + dp = args->dp; + retval = xfs_da_grow_inode(args, &blkno); + ASSERT(blkno == 1); + if (retval) + return retval; + retval = xfs_da_read_buf(args->trans, args->dp, 0, -1, &bp1, + XFS_DATA_FORK); + if (retval) + return retval; + ASSERT(bp1 != NULL); + retval = xfs_da_get_buf(args->trans, args->dp, 1, -1, &bp2, + XFS_DATA_FORK); + if (retval) { + xfs_da_buf_done(bp1); + return retval; + } + ASSERT(bp2 != NULL); + memcpy(bp2->data, bp1->data, XFS_LBSIZE(dp->i_mount)); + xfs_da_buf_done(bp1); + xfs_da_log_buf(args->trans, bp2, 0, XFS_LBSIZE(dp->i_mount) - 1); + + /* + * Set up the new root node. + */ + retval = xfs_da_node_create(args, 0, 1, &bp1, XFS_DATA_FORK); + if (retval) { + xfs_da_buf_done(bp2); + return retval; + } + node = bp1->data; + leaf = bp2->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + node->btree[0].hashval = cpu_to_be32( + INT_GET(leaf->entries[ + INT_GET(leaf->hdr.count, ARCH_CONVERT)-1].hashval, ARCH_CONVERT)); + xfs_da_buf_done(bp2); + node->btree[0].before = cpu_to_be32(blkno); + node->hdr.count = cpu_to_be16(1); + xfs_da_log_buf(args->trans, bp1, + XFS_DA_LOGRANGE(node, &node->btree[0], sizeof(node->btree[0]))); + xfs_da_buf_done(bp1); + + return retval; +} + + +/*======================================================================== + * Routines used for growing the Btree. + *========================================================================*/ + +/* + * Create the initial contents of a leaf directory + * or a leaf in a node directory. + */ +STATIC int +xfs_dir_leaf_create(xfs_da_args_t *args, xfs_dablk_t blkno, xfs_dabuf_t **bpp) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_hdr_t *hdr; + xfs_inode_t *dp; + xfs_dabuf_t *bp; + int retval; + + dp = args->dp; + ASSERT(dp != NULL); + retval = xfs_da_get_buf(args->trans, dp, blkno, -1, &bp, XFS_DATA_FORK); + if (retval) + return retval; + ASSERT(bp != NULL); + leaf = bp->data; + memset((char *)leaf, 0, XFS_LBSIZE(dp->i_mount)); + hdr = &leaf->hdr; + hdr->info.magic = cpu_to_be16(XFS_DIR_LEAF_MAGIC); + INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount)); + if (!hdr->firstused) + INT_SET(hdr->firstused, ARCH_CONVERT, XFS_LBSIZE(dp->i_mount) - 1); + INT_SET(hdr->freemap[0].base, ARCH_CONVERT, sizeof(xfs_dir_leaf_hdr_t)); + INT_SET(hdr->freemap[0].size, ARCH_CONVERT, INT_GET(hdr->firstused, ARCH_CONVERT) - INT_GET(hdr->freemap[0].base, ARCH_CONVERT)); + + xfs_da_log_buf(args->trans, bp, 0, XFS_LBSIZE(dp->i_mount) - 1); + + *bpp = bp; + return 0; +} + +/* + * Split the leaf node, rebalance, then add the new entry. + */ +int +xfs_dir_leaf_split(xfs_da_state_t *state, xfs_da_state_blk_t *oldblk, + xfs_da_state_blk_t *newblk) +{ + xfs_dablk_t blkno; + xfs_da_args_t *args; + int error; + + /* + * Allocate space for a new leaf node. + */ + args = state->args; + ASSERT(args != NULL); + ASSERT(oldblk->magic == XFS_DIR_LEAF_MAGIC); + error = xfs_da_grow_inode(args, &blkno); + if (error) + return error; + error = xfs_dir_leaf_create(args, blkno, &newblk->bp); + if (error) + return error; + newblk->blkno = blkno; + newblk->magic = XFS_DIR_LEAF_MAGIC; + + /* + * Rebalance the entries across the two leaves. + */ + xfs_dir_leaf_rebalance(state, oldblk, newblk); + error = xfs_da_blk_link(state, oldblk, newblk); + if (error) + return error; + + /* + * Insert the new entry in the correct block. + */ + if (state->inleaf) { + error = xfs_dir_leaf_add(oldblk->bp, args, oldblk->index); + } else { + error = xfs_dir_leaf_add(newblk->bp, args, newblk->index); + } + + /* + * Update last hashval in each block since we added the name. + */ + oldblk->hashval = xfs_dir_leaf_lasthash(oldblk->bp, NULL); + newblk->hashval = xfs_dir_leaf_lasthash(newblk->bp, NULL); + return error; +} + +/* + * Add a name to the leaf directory structure. + * + * Must take into account fragmented leaves and leaves where spacemap has + * lost some freespace information (ie: holes). + */ +int +xfs_dir_leaf_add(xfs_dabuf_t *bp, xfs_da_args_t *args, int index) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_hdr_t *hdr; + xfs_dir_leaf_map_t *map; + int tablesize, entsize, sum, i, tmp, error; + + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + ASSERT((index >= 0) && (index <= INT_GET(leaf->hdr.count, ARCH_CONVERT))); + hdr = &leaf->hdr; + entsize = XFS_DIR_LEAF_ENTSIZE_BYNAME(args->namelen); + + /* + * Search through freemap for first-fit on new name length. + * (may need to figure in size of entry struct too) + */ + tablesize = (INT_GET(hdr->count, ARCH_CONVERT) + 1) * (uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_hdr_t); + map = &hdr->freemap[XFS_DIR_LEAF_MAPSIZE-1]; + for (sum = 0, i = XFS_DIR_LEAF_MAPSIZE-1; i >= 0; map--, i--) { + if (tablesize > INT_GET(hdr->firstused, ARCH_CONVERT)) { + sum += INT_GET(map->size, ARCH_CONVERT); + continue; + } + if (!map->size) + continue; /* no space in this map */ + tmp = entsize; + if (INT_GET(map->base, ARCH_CONVERT) < INT_GET(hdr->firstused, ARCH_CONVERT)) + tmp += (uint)sizeof(xfs_dir_leaf_entry_t); + if (INT_GET(map->size, ARCH_CONVERT) >= tmp) { + if (!args->justcheck) + xfs_dir_leaf_add_work(bp, args, index, i); + return 0; + } + sum += INT_GET(map->size, ARCH_CONVERT); + } + + /* + * If there are no holes in the address space of the block, + * and we don't have enough freespace, then compaction will do us + * no good and we should just give up. + */ + if (!hdr->holes && (sum < entsize)) + return XFS_ERROR(ENOSPC); + + /* + * Compact the entries to coalesce free space. + * Pass the justcheck flag so the checking pass can return + * an error, without changing anything, if it won't fit. + */ + error = xfs_dir_leaf_compact(args->trans, bp, + args->total == 0 ? + entsize + + (uint)sizeof(xfs_dir_leaf_entry_t) : 0, + args->justcheck); + if (error) + return error; + /* + * After compaction, the block is guaranteed to have only one + * free region, in freemap[0]. If it is not big enough, give up. + */ + if (INT_GET(hdr->freemap[0].size, ARCH_CONVERT) < + (entsize + (uint)sizeof(xfs_dir_leaf_entry_t))) + return XFS_ERROR(ENOSPC); + + if (!args->justcheck) + xfs_dir_leaf_add_work(bp, args, index, 0); + return 0; +} + +/* + * Add a name to a leaf directory structure. + */ +STATIC void +xfs_dir_leaf_add_work(xfs_dabuf_t *bp, xfs_da_args_t *args, int index, + int mapindex) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_hdr_t *hdr; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + xfs_dir_leaf_map_t *map; + /* REFERENCED */ + xfs_mount_t *mp; + int tmp, i; + + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + hdr = &leaf->hdr; + ASSERT((mapindex >= 0) && (mapindex < XFS_DIR_LEAF_MAPSIZE)); + ASSERT((index >= 0) && (index <= INT_GET(hdr->count, ARCH_CONVERT))); + + /* + * Force open some space in the entry array and fill it in. + */ + entry = &leaf->entries[index]; + if (index < INT_GET(hdr->count, ARCH_CONVERT)) { + tmp = INT_GET(hdr->count, ARCH_CONVERT) - index; + tmp *= (uint)sizeof(xfs_dir_leaf_entry_t); + memmove(entry + 1, entry, tmp); + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, entry, tmp + (uint)sizeof(*entry))); + } + INT_MOD(hdr->count, ARCH_CONVERT, +1); + + /* + * Allocate space for the new string (at the end of the run). + */ + map = &hdr->freemap[mapindex]; + mp = args->trans->t_mountp; + ASSERT(INT_GET(map->base, ARCH_CONVERT) < XFS_LBSIZE(mp)); + ASSERT(INT_GET(map->size, ARCH_CONVERT) >= XFS_DIR_LEAF_ENTSIZE_BYNAME(args->namelen)); + ASSERT(INT_GET(map->size, ARCH_CONVERT) < XFS_LBSIZE(mp)); + INT_MOD(map->size, ARCH_CONVERT, -(XFS_DIR_LEAF_ENTSIZE_BYNAME(args->namelen))); + INT_SET(entry->nameidx, ARCH_CONVERT, INT_GET(map->base, ARCH_CONVERT) + INT_GET(map->size, ARCH_CONVERT)); + INT_SET(entry->hashval, ARCH_CONVERT, args->hashval); + entry->namelen = args->namelen; + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, entry, sizeof(*entry))); + + /* + * Copy the string and inode number into the new space. + */ + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + XFS_DIR_SF_PUT_DIRINO(&args->inumber, &namest->inumber); + memcpy(namest->name, args->name, args->namelen); + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, namest, XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry))); + + /* + * Update the control info for this leaf node + */ + if (INT_GET(entry->nameidx, ARCH_CONVERT) < INT_GET(hdr->firstused, ARCH_CONVERT)) + INT_COPY(hdr->firstused, entry->nameidx, ARCH_CONVERT); + ASSERT(INT_GET(hdr->firstused, ARCH_CONVERT) >= ((INT_GET(hdr->count, ARCH_CONVERT)*sizeof(*entry))+sizeof(*hdr))); + tmp = (INT_GET(hdr->count, ARCH_CONVERT)-1) * (uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_hdr_t); + map = &hdr->freemap[0]; + for (i = 0; i < XFS_DIR_LEAF_MAPSIZE; map++, i++) { + if (INT_GET(map->base, ARCH_CONVERT) == tmp) { + INT_MOD(map->base, ARCH_CONVERT, (uint)sizeof(xfs_dir_leaf_entry_t)); + INT_MOD(map->size, ARCH_CONVERT, -((uint)sizeof(xfs_dir_leaf_entry_t))); + } + } + INT_MOD(hdr->namebytes, ARCH_CONVERT, args->namelen); + xfs_da_log_buf(args->trans, bp, + XFS_DA_LOGRANGE(leaf, hdr, sizeof(*hdr))); +} + +/* + * Garbage collect a leaf directory block by copying it to a new buffer. + */ +STATIC int +xfs_dir_leaf_compact(xfs_trans_t *trans, xfs_dabuf_t *bp, int musthave, + int justcheck) +{ + xfs_dir_leafblock_t *leaf_s, *leaf_d; + xfs_dir_leaf_hdr_t *hdr_s, *hdr_d; + xfs_mount_t *mp; + char *tmpbuffer; + char *tmpbuffer2=NULL; + int rval; + int lbsize; + + mp = trans->t_mountp; + lbsize = XFS_LBSIZE(mp); + tmpbuffer = kmem_alloc(lbsize, KM_SLEEP); + ASSERT(tmpbuffer != NULL); + memcpy(tmpbuffer, bp->data, lbsize); + + /* + * Make a second copy in case xfs_dir_leaf_moveents() + * below destroys the original. + */ + if (musthave || justcheck) { + tmpbuffer2 = kmem_alloc(lbsize, KM_SLEEP); + memcpy(tmpbuffer2, bp->data, lbsize); + } + memset(bp->data, 0, lbsize); + + /* + * Copy basic information + */ + leaf_s = (xfs_dir_leafblock_t *)tmpbuffer; + leaf_d = bp->data; + hdr_s = &leaf_s->hdr; + hdr_d = &leaf_d->hdr; + hdr_d->info = hdr_s->info; /* struct copy */ + INT_SET(hdr_d->firstused, ARCH_CONVERT, lbsize); + if (!hdr_d->firstused) + INT_SET(hdr_d->firstused, ARCH_CONVERT, lbsize - 1); + hdr_d->namebytes = 0; + hdr_d->count = 0; + hdr_d->holes = 0; + INT_SET(hdr_d->freemap[0].base, ARCH_CONVERT, sizeof(xfs_dir_leaf_hdr_t)); + INT_SET(hdr_d->freemap[0].size, ARCH_CONVERT, INT_GET(hdr_d->firstused, ARCH_CONVERT) - INT_GET(hdr_d->freemap[0].base, ARCH_CONVERT)); + + /* + * Copy all entry's in the same (sorted) order, + * but allocate filenames packed and in sequence. + * This changes the source (leaf_s) as well. + */ + xfs_dir_leaf_moveents(leaf_s, 0, leaf_d, 0, (int)INT_GET(hdr_s->count, ARCH_CONVERT), mp); + + if (musthave && INT_GET(hdr_d->freemap[0].size, ARCH_CONVERT) < musthave) + rval = XFS_ERROR(ENOSPC); + else + rval = 0; + + if (justcheck || rval == ENOSPC) { + ASSERT(tmpbuffer2); + memcpy(bp->data, tmpbuffer2, lbsize); + } else { + xfs_da_log_buf(trans, bp, 0, lbsize - 1); + } + + kmem_free(tmpbuffer, lbsize); + if (musthave || justcheck) + kmem_free(tmpbuffer2, lbsize); + return rval; +} + +/* + * Redistribute the directory entries between two leaf nodes, + * taking into account the size of the new entry. + * + * NOTE: if new block is empty, then it will get the upper half of old block. + */ +STATIC void +xfs_dir_leaf_rebalance(xfs_da_state_t *state, xfs_da_state_blk_t *blk1, + xfs_da_state_blk_t *blk2) +{ + xfs_da_state_blk_t *tmp_blk; + xfs_dir_leafblock_t *leaf1, *leaf2; + xfs_dir_leaf_hdr_t *hdr1, *hdr2; + int count, totallen, max, space, swap; + + /* + * Set up environment. + */ + ASSERT(blk1->magic == XFS_DIR_LEAF_MAGIC); + ASSERT(blk2->magic == XFS_DIR_LEAF_MAGIC); + leaf1 = blk1->bp->data; + leaf2 = blk2->bp->data; + ASSERT(be16_to_cpu(leaf1->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + ASSERT(be16_to_cpu(leaf2->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + + /* + * Check ordering of blocks, reverse if it makes things simpler. + */ + swap = 0; + if (xfs_dir_leaf_order(blk1->bp, blk2->bp)) { + tmp_blk = blk1; + blk1 = blk2; + blk2 = tmp_blk; + leaf1 = blk1->bp->data; + leaf2 = blk2->bp->data; + swap = 1; + } + hdr1 = &leaf1->hdr; + hdr2 = &leaf2->hdr; + + /* + * Examine entries until we reduce the absolute difference in + * byte usage between the two blocks to a minimum. Then get + * the direction to copy and the number of elements to move. + */ + state->inleaf = xfs_dir_leaf_figure_balance(state, blk1, blk2, + &count, &totallen); + if (swap) + state->inleaf = !state->inleaf; + + /* + * Move any entries required from leaf to leaf: + */ + if (count < INT_GET(hdr1->count, ARCH_CONVERT)) { + /* + * Figure the total bytes to be added to the destination leaf. + */ + count = INT_GET(hdr1->count, ARCH_CONVERT) - count; /* number entries being moved */ + space = INT_GET(hdr1->namebytes, ARCH_CONVERT) - totallen; + space += count * ((uint)sizeof(xfs_dir_leaf_name_t)-1); + space += count * (uint)sizeof(xfs_dir_leaf_entry_t); + + /* + * leaf2 is the destination, compact it if it looks tight. + */ + max = INT_GET(hdr2->firstused, ARCH_CONVERT) - (uint)sizeof(xfs_dir_leaf_hdr_t); + max -= INT_GET(hdr2->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t); + if (space > max) { + xfs_dir_leaf_compact(state->args->trans, blk2->bp, + 0, 0); + } + + /* + * Move high entries from leaf1 to low end of leaf2. + */ + xfs_dir_leaf_moveents(leaf1, INT_GET(hdr1->count, ARCH_CONVERT) - count, + leaf2, 0, count, state->mp); + + xfs_da_log_buf(state->args->trans, blk1->bp, 0, + state->blocksize-1); + xfs_da_log_buf(state->args->trans, blk2->bp, 0, + state->blocksize-1); + + } else if (count > INT_GET(hdr1->count, ARCH_CONVERT)) { + /* + * Figure the total bytes to be added to the destination leaf. + */ + count -= INT_GET(hdr1->count, ARCH_CONVERT); /* number entries being moved */ + space = totallen - INT_GET(hdr1->namebytes, ARCH_CONVERT); + space += count * ((uint)sizeof(xfs_dir_leaf_name_t)-1); + space += count * (uint)sizeof(xfs_dir_leaf_entry_t); + + /* + * leaf1 is the destination, compact it if it looks tight. + */ + max = INT_GET(hdr1->firstused, ARCH_CONVERT) - (uint)sizeof(xfs_dir_leaf_hdr_t); + max -= INT_GET(hdr1->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t); + if (space > max) { + xfs_dir_leaf_compact(state->args->trans, blk1->bp, + 0, 0); + } + + /* + * Move low entries from leaf2 to high end of leaf1. + */ + xfs_dir_leaf_moveents(leaf2, 0, leaf1, (int)INT_GET(hdr1->count, ARCH_CONVERT), + count, state->mp); + + xfs_da_log_buf(state->args->trans, blk1->bp, 0, + state->blocksize-1); + xfs_da_log_buf(state->args->trans, blk2->bp, 0, + state->blocksize-1); + } + + /* + * Copy out last hashval in each block for B-tree code. + */ + blk1->hashval = INT_GET(leaf1->entries[ INT_GET(leaf1->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT); + blk2->hashval = INT_GET(leaf2->entries[ INT_GET(leaf2->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT); + + /* + * Adjust the expected index for insertion. + * GROT: this doesn't work unless blk2 was originally empty. + */ + if (!state->inleaf) { + blk2->index = blk1->index - INT_GET(leaf1->hdr.count, ARCH_CONVERT); + } +} + +/* + * Examine entries until we reduce the absolute difference in + * byte usage between the two blocks to a minimum. + * GROT: Is this really necessary? With other than a 512 byte blocksize, + * GROT: there will always be enough room in either block for a new entry. + * GROT: Do a double-split for this case? + */ +STATIC int +xfs_dir_leaf_figure_balance(xfs_da_state_t *state, + xfs_da_state_blk_t *blk1, + xfs_da_state_blk_t *blk2, + int *countarg, int *namebytesarg) +{ + xfs_dir_leafblock_t *leaf1, *leaf2; + xfs_dir_leaf_hdr_t *hdr1, *hdr2; + xfs_dir_leaf_entry_t *entry; + int count, max, totallen, half; + int lastdelta, foundit, tmp; + + /* + * Set up environment. + */ + leaf1 = blk1->bp->data; + leaf2 = blk2->bp->data; + hdr1 = &leaf1->hdr; + hdr2 = &leaf2->hdr; + foundit = 0; + totallen = 0; + + /* + * Examine entries until we reduce the absolute difference in + * byte usage between the two blocks to a minimum. + */ + max = INT_GET(hdr1->count, ARCH_CONVERT) + INT_GET(hdr2->count, ARCH_CONVERT); + half = (max+1) * (uint)(sizeof(*entry)+sizeof(xfs_dir_leaf_entry_t)-1); + half += INT_GET(hdr1->namebytes, ARCH_CONVERT) + INT_GET(hdr2->namebytes, ARCH_CONVERT) + state->args->namelen; + half /= 2; + lastdelta = state->blocksize; + entry = &leaf1->entries[0]; + for (count = 0; count < max; entry++, count++) { + +#define XFS_DIR_ABS(A) (((A) < 0) ? -(A) : (A)) + /* + * The new entry is in the first block, account for it. + */ + if (count == blk1->index) { + tmp = totallen + (uint)sizeof(*entry) + + XFS_DIR_LEAF_ENTSIZE_BYNAME(state->args->namelen); + if (XFS_DIR_ABS(half - tmp) > lastdelta) + break; + lastdelta = XFS_DIR_ABS(half - tmp); + totallen = tmp; + foundit = 1; + } + + /* + * Wrap around into the second block if necessary. + */ + if (count == INT_GET(hdr1->count, ARCH_CONVERT)) { + leaf1 = leaf2; + entry = &leaf1->entries[0]; + } + + /* + * Figure out if next leaf entry would be too much. + */ + tmp = totallen + (uint)sizeof(*entry) + + XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry); + if (XFS_DIR_ABS(half - tmp) > lastdelta) + break; + lastdelta = XFS_DIR_ABS(half - tmp); + totallen = tmp; +#undef XFS_DIR_ABS + } + + /* + * Calculate the number of namebytes that will end up in lower block. + * If new entry not in lower block, fix up the count. + */ + totallen -= + count * (uint)(sizeof(*entry)+sizeof(xfs_dir_leaf_entry_t)-1); + if (foundit) { + totallen -= (sizeof(*entry)+sizeof(xfs_dir_leaf_entry_t)-1) + + state->args->namelen; + } + + *countarg = count; + *namebytesarg = totallen; + return foundit; +} + +/*======================================================================== + * Routines used for shrinking the Btree. + *========================================================================*/ + +/* + * Check a leaf block and its neighbors to see if the block should be + * collapsed into one or the other neighbor. Always keep the block + * with the smaller block number. + * If the current block is over 50% full, don't try to join it, return 0. + * If the block is empty, fill in the state structure and return 2. + * If it can be collapsed, fill in the state structure and return 1. + * If nothing can be done, return 0. + */ +int +xfs_dir_leaf_toosmall(xfs_da_state_t *state, int *action) +{ + xfs_dir_leafblock_t *leaf; + xfs_da_state_blk_t *blk; + xfs_da_blkinfo_t *info; + int count, bytes, forward, error, retval, i; + xfs_dablk_t blkno; + xfs_dabuf_t *bp; + + /* + * Check for the degenerate case of the block being over 50% full. + * If so, it's not worth even looking to see if we might be able + * to coalesce with a sibling. + */ + blk = &state->path.blk[ state->path.active-1 ]; + info = blk->bp->data; + ASSERT(be16_to_cpu(info->magic) == XFS_DIR_LEAF_MAGIC); + leaf = (xfs_dir_leafblock_t *)info; + count = INT_GET(leaf->hdr.count, ARCH_CONVERT); + bytes = (uint)sizeof(xfs_dir_leaf_hdr_t) + + count * (uint)sizeof(xfs_dir_leaf_entry_t) + + count * ((uint)sizeof(xfs_dir_leaf_name_t)-1) + + INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); + if (bytes > (state->blocksize >> 1)) { + *action = 0; /* blk over 50%, don't try to join */ + return 0; + } + + /* + * Check for the degenerate case of the block being empty. + * If the block is empty, we'll simply delete it, no need to + * coalesce it with a sibling block. We choose (arbitrarily) + * to merge with the forward block unless it is NULL. + */ + if (count == 0) { + /* + * Make altpath point to the block we want to keep and + * path point to the block we want to drop (this one). + */ + forward = (info->forw != 0); + memcpy(&state->altpath, &state->path, sizeof(state->path)); + error = xfs_da_path_shift(state, &state->altpath, forward, + 0, &retval); + if (error) + return error; + if (retval) { + *action = 0; + } else { + *action = 2; + } + return 0; + } + + /* + * Examine each sibling block to see if we can coalesce with + * at least 25% free space to spare. We need to figure out + * whether to merge with the forward or the backward block. + * We prefer coalescing with the lower numbered sibling so as + * to shrink a directory over time. + */ + forward = (be32_to_cpu(info->forw) < be32_to_cpu(info->back)); /* start with smaller blk num */ + for (i = 0; i < 2; forward = !forward, i++) { + if (forward) + blkno = be32_to_cpu(info->forw); + else + blkno = be32_to_cpu(info->back); + if (blkno == 0) + continue; + error = xfs_da_read_buf(state->args->trans, state->args->dp, + blkno, -1, &bp, + XFS_DATA_FORK); + if (error) + return error; + ASSERT(bp != NULL); + + leaf = (xfs_dir_leafblock_t *)info; + count = INT_GET(leaf->hdr.count, ARCH_CONVERT); + bytes = state->blocksize - (state->blocksize>>2); + bytes -= INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + count += INT_GET(leaf->hdr.count, ARCH_CONVERT); + bytes -= INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); + bytes -= count * ((uint)sizeof(xfs_dir_leaf_name_t) - 1); + bytes -= count * (uint)sizeof(xfs_dir_leaf_entry_t); + bytes -= (uint)sizeof(xfs_dir_leaf_hdr_t); + if (bytes >= 0) + break; /* fits with at least 25% to spare */ + + xfs_da_brelse(state->args->trans, bp); + } + if (i >= 2) { + *action = 0; + return 0; + } + xfs_da_buf_done(bp); + + /* + * Make altpath point to the block we want to keep (the lower + * numbered block) and path point to the block we want to drop. + */ + memcpy(&state->altpath, &state->path, sizeof(state->path)); + if (blkno < blk->blkno) { + error = xfs_da_path_shift(state, &state->altpath, forward, + 0, &retval); + } else { + error = xfs_da_path_shift(state, &state->path, forward, + 0, &retval); + } + if (error) + return error; + if (retval) { + *action = 0; + } else { + *action = 1; + } + return 0; +} + +/* + * Remove a name from the leaf directory structure. + * + * Return 1 if leaf is less than 37% full, 0 if >= 37% full. + * If two leaves are 37% full, when combined they will leave 25% free. + */ +int +xfs_dir_leaf_remove(xfs_trans_t *trans, xfs_dabuf_t *bp, int index) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_hdr_t *hdr; + xfs_dir_leaf_map_t *map; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + int before, after, smallest, entsize; + int tablesize, tmp, i; + xfs_mount_t *mp; + + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + hdr = &leaf->hdr; + mp = trans->t_mountp; + ASSERT((INT_GET(hdr->count, ARCH_CONVERT) > 0) && (INT_GET(hdr->count, ARCH_CONVERT) < (XFS_LBSIZE(mp)/8))); + ASSERT((index >= 0) && (index < INT_GET(hdr->count, ARCH_CONVERT))); + ASSERT(INT_GET(hdr->firstused, ARCH_CONVERT) >= ((INT_GET(hdr->count, ARCH_CONVERT)*sizeof(*entry))+sizeof(*hdr))); + entry = &leaf->entries[index]; + ASSERT(INT_GET(entry->nameidx, ARCH_CONVERT) >= INT_GET(hdr->firstused, ARCH_CONVERT)); + ASSERT(INT_GET(entry->nameidx, ARCH_CONVERT) < XFS_LBSIZE(mp)); + + /* + * Scan through free region table: + * check for adjacency of free'd entry with an existing one, + * find smallest free region in case we need to replace it, + * adjust any map that borders the entry table, + */ + tablesize = INT_GET(hdr->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_hdr_t); + map = &hdr->freemap[0]; + tmp = INT_GET(map->size, ARCH_CONVERT); + before = after = -1; + smallest = XFS_DIR_LEAF_MAPSIZE - 1; + entsize = XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry); + for (i = 0; i < XFS_DIR_LEAF_MAPSIZE; map++, i++) { + ASSERT(INT_GET(map->base, ARCH_CONVERT) < XFS_LBSIZE(mp)); + ASSERT(INT_GET(map->size, ARCH_CONVERT) < XFS_LBSIZE(mp)); + if (INT_GET(map->base, ARCH_CONVERT) == tablesize) { + INT_MOD(map->base, ARCH_CONVERT, -((uint)sizeof(xfs_dir_leaf_entry_t))); + INT_MOD(map->size, ARCH_CONVERT, (uint)sizeof(xfs_dir_leaf_entry_t)); + } + + if ((INT_GET(map->base, ARCH_CONVERT) + INT_GET(map->size, ARCH_CONVERT)) == INT_GET(entry->nameidx, ARCH_CONVERT)) { + before = i; + } else if (INT_GET(map->base, ARCH_CONVERT) == (INT_GET(entry->nameidx, ARCH_CONVERT) + entsize)) { + after = i; + } else if (INT_GET(map->size, ARCH_CONVERT) < tmp) { + tmp = INT_GET(map->size, ARCH_CONVERT); + smallest = i; + } + } + + /* + * Coalesce adjacent freemap regions, + * or replace the smallest region. + */ + if ((before >= 0) || (after >= 0)) { + if ((before >= 0) && (after >= 0)) { + map = &hdr->freemap[before]; + INT_MOD(map->size, ARCH_CONVERT, entsize); + INT_MOD(map->size, ARCH_CONVERT, INT_GET(hdr->freemap[after].size, ARCH_CONVERT)); + hdr->freemap[after].base = 0; + hdr->freemap[after].size = 0; + } else if (before >= 0) { + map = &hdr->freemap[before]; + INT_MOD(map->size, ARCH_CONVERT, entsize); + } else { + map = &hdr->freemap[after]; + INT_COPY(map->base, entry->nameidx, ARCH_CONVERT); + INT_MOD(map->size, ARCH_CONVERT, entsize); + } + } else { + /* + * Replace smallest region (if it is smaller than free'd entry) + */ + map = &hdr->freemap[smallest]; + if (INT_GET(map->size, ARCH_CONVERT) < entsize) { + INT_COPY(map->base, entry->nameidx, ARCH_CONVERT); + INT_SET(map->size, ARCH_CONVERT, entsize); + } + } + + /* + * Did we remove the first entry? + */ + if (INT_GET(entry->nameidx, ARCH_CONVERT) == INT_GET(hdr->firstused, ARCH_CONVERT)) + smallest = 1; + else + smallest = 0; + + /* + * Compress the remaining entries and zero out the removed stuff. + */ + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + memset((char *)namest, 0, entsize); + xfs_da_log_buf(trans, bp, XFS_DA_LOGRANGE(leaf, namest, entsize)); + + INT_MOD(hdr->namebytes, ARCH_CONVERT, -(entry->namelen)); + tmp = (INT_GET(hdr->count, ARCH_CONVERT) - index) * (uint)sizeof(xfs_dir_leaf_entry_t); + memmove(entry, entry + 1, tmp); + INT_MOD(hdr->count, ARCH_CONVERT, -1); + xfs_da_log_buf(trans, bp, + XFS_DA_LOGRANGE(leaf, entry, tmp + (uint)sizeof(*entry))); + entry = &leaf->entries[INT_GET(hdr->count, ARCH_CONVERT)]; + memset((char *)entry, 0, sizeof(xfs_dir_leaf_entry_t)); + + /* + * If we removed the first entry, re-find the first used byte + * in the name area. Note that if the entry was the "firstused", + * then we don't have a "hole" in our block resulting from + * removing the name. + */ + if (smallest) { + tmp = XFS_LBSIZE(mp); + entry = &leaf->entries[0]; + for (i = INT_GET(hdr->count, ARCH_CONVERT)-1; i >= 0; entry++, i--) { + ASSERT(INT_GET(entry->nameidx, ARCH_CONVERT) >= INT_GET(hdr->firstused, ARCH_CONVERT)); + ASSERT(INT_GET(entry->nameidx, ARCH_CONVERT) < XFS_LBSIZE(mp)); + if (INT_GET(entry->nameidx, ARCH_CONVERT) < tmp) + tmp = INT_GET(entry->nameidx, ARCH_CONVERT); + } + INT_SET(hdr->firstused, ARCH_CONVERT, tmp); + if (!hdr->firstused) + INT_SET(hdr->firstused, ARCH_CONVERT, tmp - 1); + } else { + hdr->holes = 1; /* mark as needing compaction */ + } + + xfs_da_log_buf(trans, bp, XFS_DA_LOGRANGE(leaf, hdr, sizeof(*hdr))); + + /* + * Check if leaf is less than 50% full, caller may want to + * "join" the leaf with a sibling if so. + */ + tmp = (uint)sizeof(xfs_dir_leaf_hdr_t); + tmp += INT_GET(leaf->hdr.count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t); + tmp += INT_GET(leaf->hdr.count, ARCH_CONVERT) * ((uint)sizeof(xfs_dir_leaf_name_t) - 1); + tmp += INT_GET(leaf->hdr.namebytes, ARCH_CONVERT); + if (tmp < mp->m_dir_magicpct) + return 1; /* leaf is < 37% full */ + return 0; +} + +/* + * Move all the directory entries from drop_leaf into save_leaf. + */ +void +xfs_dir_leaf_unbalance(xfs_da_state_t *state, xfs_da_state_blk_t *drop_blk, + xfs_da_state_blk_t *save_blk) +{ + xfs_dir_leafblock_t *drop_leaf, *save_leaf, *tmp_leaf; + xfs_dir_leaf_hdr_t *drop_hdr, *save_hdr, *tmp_hdr; + xfs_mount_t *mp; + char *tmpbuffer; + + /* + * Set up environment. + */ + mp = state->mp; + ASSERT(drop_blk->magic == XFS_DIR_LEAF_MAGIC); + ASSERT(save_blk->magic == XFS_DIR_LEAF_MAGIC); + drop_leaf = drop_blk->bp->data; + save_leaf = save_blk->bp->data; + ASSERT(be16_to_cpu(drop_leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + ASSERT(be16_to_cpu(save_leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + drop_hdr = &drop_leaf->hdr; + save_hdr = &save_leaf->hdr; + + /* + * Save last hashval from dying block for later Btree fixup. + */ + drop_blk->hashval = INT_GET(drop_leaf->entries[ drop_leaf->hdr.count-1 ].hashval, ARCH_CONVERT); + + /* + * Check if we need a temp buffer, or can we do it in place. + * Note that we don't check "leaf" for holes because we will + * always be dropping it, toosmall() decided that for us already. + */ + if (save_hdr->holes == 0) { + /* + * dest leaf has no holes, so we add there. May need + * to make some room in the entry array. + */ + if (xfs_dir_leaf_order(save_blk->bp, drop_blk->bp)) { + xfs_dir_leaf_moveents(drop_leaf, 0, save_leaf, 0, + (int)INT_GET(drop_hdr->count, ARCH_CONVERT), mp); + } else { + xfs_dir_leaf_moveents(drop_leaf, 0, + save_leaf, INT_GET(save_hdr->count, ARCH_CONVERT), + (int)INT_GET(drop_hdr->count, ARCH_CONVERT), mp); + } + } else { + /* + * Destination has holes, so we make a temporary copy + * of the leaf and add them both to that. + */ + tmpbuffer = kmem_alloc(state->blocksize, KM_SLEEP); + ASSERT(tmpbuffer != NULL); + memset(tmpbuffer, 0, state->blocksize); + tmp_leaf = (xfs_dir_leafblock_t *)tmpbuffer; + tmp_hdr = &tmp_leaf->hdr; + tmp_hdr->info = save_hdr->info; /* struct copy */ + tmp_hdr->count = 0; + INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize); + if (!tmp_hdr->firstused) + INT_SET(tmp_hdr->firstused, ARCH_CONVERT, state->blocksize - 1); + tmp_hdr->namebytes = 0; + if (xfs_dir_leaf_order(save_blk->bp, drop_blk->bp)) { + xfs_dir_leaf_moveents(drop_leaf, 0, tmp_leaf, 0, + (int)INT_GET(drop_hdr->count, ARCH_CONVERT), mp); + xfs_dir_leaf_moveents(save_leaf, 0, + tmp_leaf, INT_GET(tmp_leaf->hdr.count, ARCH_CONVERT), + (int)INT_GET(save_hdr->count, ARCH_CONVERT), mp); + } else { + xfs_dir_leaf_moveents(save_leaf, 0, tmp_leaf, 0, + (int)INT_GET(save_hdr->count, ARCH_CONVERT), mp); + xfs_dir_leaf_moveents(drop_leaf, 0, + tmp_leaf, INT_GET(tmp_leaf->hdr.count, ARCH_CONVERT), + (int)INT_GET(drop_hdr->count, ARCH_CONVERT), mp); + } + memcpy(save_leaf, tmp_leaf, state->blocksize); + kmem_free(tmpbuffer, state->blocksize); + } + + xfs_da_log_buf(state->args->trans, save_blk->bp, 0, + state->blocksize - 1); + + /* + * Copy out last hashval in each block for B-tree code. + */ + save_blk->hashval = INT_GET(save_leaf->entries[ INT_GET(save_leaf->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT); +} + +/*======================================================================== + * Routines used for finding things in the Btree. + *========================================================================*/ + +/* + * Look up a name in a leaf directory structure. + * This is the internal routine, it uses the caller's buffer. + * + * Note that duplicate keys are allowed, but only check within the + * current leaf node. The Btree code must check in adjacent leaf nodes. + * + * Return in *index the index into the entry[] array of either the found + * entry, or where the entry should have been (insert before that entry). + * + * Don't change the args->inumber unless we find the filename. + */ +int +xfs_dir_leaf_lookup_int(xfs_dabuf_t *bp, xfs_da_args_t *args, int *index) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + int probe, span; + xfs_dahash_t hashval; + + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + ASSERT(INT_GET(leaf->hdr.count, ARCH_CONVERT) < (XFS_LBSIZE(args->dp->i_mount)/8)); + + /* + * Binary search. (note: small blocks will skip this loop) + */ + hashval = args->hashval; + probe = span = INT_GET(leaf->hdr.count, ARCH_CONVERT) / 2; + for (entry = &leaf->entries[probe]; span > 4; + entry = &leaf->entries[probe]) { + span /= 2; + if (INT_GET(entry->hashval, ARCH_CONVERT) < hashval) + probe += span; + else if (INT_GET(entry->hashval, ARCH_CONVERT) > hashval) + probe -= span; + else + break; + } + ASSERT((probe >= 0) && \ + ((!leaf->hdr.count) || (probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)))); + ASSERT((span <= 4) || (INT_GET(entry->hashval, ARCH_CONVERT) == hashval)); + + /* + * Since we may have duplicate hashval's, find the first matching + * hashval in the leaf. + */ + while ((probe > 0) && (INT_GET(entry->hashval, ARCH_CONVERT) >= hashval)) { + entry--; + probe--; + } + while ((probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)) && (INT_GET(entry->hashval, ARCH_CONVERT) < hashval)) { + entry++; + probe++; + } + if ((probe == INT_GET(leaf->hdr.count, ARCH_CONVERT)) || (INT_GET(entry->hashval, ARCH_CONVERT) != hashval)) { + *index = probe; + ASSERT(args->oknoent); + return XFS_ERROR(ENOENT); + } + + /* + * Duplicate keys may be present, so search all of them for a match. + */ + while ((probe < INT_GET(leaf->hdr.count, ARCH_CONVERT)) && (INT_GET(entry->hashval, ARCH_CONVERT) == hashval)) { + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, INT_GET(entry->nameidx, ARCH_CONVERT)); + if (entry->namelen == args->namelen && + namest->name[0] == args->name[0] && + memcmp(args->name, namest->name, args->namelen) == 0) { + XFS_DIR_SF_GET_DIRINO(&namest->inumber, &args->inumber); + *index = probe; + return XFS_ERROR(EEXIST); + } + entry++; + probe++; + } + *index = probe; + ASSERT(probe == INT_GET(leaf->hdr.count, ARCH_CONVERT) || args->oknoent); + return XFS_ERROR(ENOENT); +} + +/*======================================================================== + * Utility routines. + *========================================================================*/ + +/* + * Move the indicated entries from one leaf to another. + * NOTE: this routine modifies both source and destination leaves. + */ +/* ARGSUSED */ +STATIC void +xfs_dir_leaf_moveents(xfs_dir_leafblock_t *leaf_s, int start_s, + xfs_dir_leafblock_t *leaf_d, int start_d, + int count, xfs_mount_t *mp) +{ + xfs_dir_leaf_hdr_t *hdr_s, *hdr_d; + xfs_dir_leaf_entry_t *entry_s, *entry_d; + int tmp, i; + + /* + * Check for nothing to do. + */ + if (count == 0) + return; + + /* + * Set up environment. + */ + ASSERT(be16_to_cpu(leaf_s->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + ASSERT(be16_to_cpu(leaf_d->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + hdr_s = &leaf_s->hdr; + hdr_d = &leaf_d->hdr; + ASSERT((INT_GET(hdr_s->count, ARCH_CONVERT) > 0) && (INT_GET(hdr_s->count, ARCH_CONVERT) < (XFS_LBSIZE(mp)/8))); + ASSERT(INT_GET(hdr_s->firstused, ARCH_CONVERT) >= + ((INT_GET(hdr_s->count, ARCH_CONVERT)*sizeof(*entry_s))+sizeof(*hdr_s))); + ASSERT(INT_GET(hdr_d->count, ARCH_CONVERT) < (XFS_LBSIZE(mp)/8)); + ASSERT(INT_GET(hdr_d->firstused, ARCH_CONVERT) >= + ((INT_GET(hdr_d->count, ARCH_CONVERT)*sizeof(*entry_d))+sizeof(*hdr_d))); + + ASSERT(start_s < INT_GET(hdr_s->count, ARCH_CONVERT)); + ASSERT(start_d <= INT_GET(hdr_d->count, ARCH_CONVERT)); + ASSERT(count <= INT_GET(hdr_s->count, ARCH_CONVERT)); + + /* + * Move the entries in the destination leaf up to make a hole? + */ + if (start_d < INT_GET(hdr_d->count, ARCH_CONVERT)) { + tmp = INT_GET(hdr_d->count, ARCH_CONVERT) - start_d; + tmp *= (uint)sizeof(xfs_dir_leaf_entry_t); + entry_s = &leaf_d->entries[start_d]; + entry_d = &leaf_d->entries[start_d + count]; + memcpy(entry_d, entry_s, tmp); + } + + /* + * Copy all entry's in the same (sorted) order, + * but allocate filenames packed and in sequence. + */ + entry_s = &leaf_s->entries[start_s]; + entry_d = &leaf_d->entries[start_d]; + for (i = 0; i < count; entry_s++, entry_d++, i++) { + ASSERT(INT_GET(entry_s->nameidx, ARCH_CONVERT) >= INT_GET(hdr_s->firstused, ARCH_CONVERT)); + tmp = XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry_s); + INT_MOD(hdr_d->firstused, ARCH_CONVERT, -(tmp)); + entry_d->hashval = entry_s->hashval; /* INT_: direct copy */ + INT_COPY(entry_d->nameidx, hdr_d->firstused, ARCH_CONVERT); + entry_d->namelen = entry_s->namelen; + ASSERT(INT_GET(entry_d->nameidx, ARCH_CONVERT) + tmp <= XFS_LBSIZE(mp)); + memcpy(XFS_DIR_LEAF_NAMESTRUCT(leaf_d, INT_GET(entry_d->nameidx, ARCH_CONVERT)), + XFS_DIR_LEAF_NAMESTRUCT(leaf_s, INT_GET(entry_s->nameidx, ARCH_CONVERT)), tmp); + ASSERT(INT_GET(entry_s->nameidx, ARCH_CONVERT) + tmp <= XFS_LBSIZE(mp)); + memset((char *)XFS_DIR_LEAF_NAMESTRUCT(leaf_s, INT_GET(entry_s->nameidx, ARCH_CONVERT)), + 0, tmp); + INT_MOD(hdr_s->namebytes, ARCH_CONVERT, -(entry_d->namelen)); + INT_MOD(hdr_d->namebytes, ARCH_CONVERT, entry_d->namelen); + INT_MOD(hdr_s->count, ARCH_CONVERT, -1); + INT_MOD(hdr_d->count, ARCH_CONVERT, +1); + tmp = INT_GET(hdr_d->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t) + + (uint)sizeof(xfs_dir_leaf_hdr_t); + ASSERT(INT_GET(hdr_d->firstused, ARCH_CONVERT) >= tmp); + + } + + /* + * Zero out the entries we just copied. + */ + if (start_s == INT_GET(hdr_s->count, ARCH_CONVERT)) { + tmp = count * (uint)sizeof(xfs_dir_leaf_entry_t); + entry_s = &leaf_s->entries[start_s]; + ASSERT((char *)entry_s + tmp <= (char *)leaf_s + XFS_LBSIZE(mp)); + memset((char *)entry_s, 0, tmp); + } else { + /* + * Move the remaining entries down to fill the hole, + * then zero the entries at the top. + */ + tmp = INT_GET(hdr_s->count, ARCH_CONVERT) - count; + tmp *= (uint)sizeof(xfs_dir_leaf_entry_t); + entry_s = &leaf_s->entries[start_s + count]; + entry_d = &leaf_s->entries[start_s]; + memcpy(entry_d, entry_s, tmp); + + tmp = count * (uint)sizeof(xfs_dir_leaf_entry_t); + entry_s = &leaf_s->entries[INT_GET(hdr_s->count, ARCH_CONVERT)]; + ASSERT((char *)entry_s + tmp <= (char *)leaf_s + XFS_LBSIZE(mp)); + memset((char *)entry_s, 0, tmp); + } + + /* + * Fill in the freemap information + */ + INT_SET(hdr_d->freemap[0].base, ARCH_CONVERT, (uint)sizeof(xfs_dir_leaf_hdr_t)); + INT_MOD(hdr_d->freemap[0].base, ARCH_CONVERT, INT_GET(hdr_d->count, ARCH_CONVERT) * (uint)sizeof(xfs_dir_leaf_entry_t)); + INT_SET(hdr_d->freemap[0].size, ARCH_CONVERT, INT_GET(hdr_d->firstused, ARCH_CONVERT) - INT_GET(hdr_d->freemap[0].base, ARCH_CONVERT)); + INT_SET(hdr_d->freemap[1].base, ARCH_CONVERT, (hdr_d->freemap[2].base = 0)); + INT_SET(hdr_d->freemap[1].size, ARCH_CONVERT, (hdr_d->freemap[2].size = 0)); + hdr_s->holes = 1; /* leaf may not be compact */ +} + +/* + * Compare two leaf blocks "order". + */ +int +xfs_dir_leaf_order(xfs_dabuf_t *leaf1_bp, xfs_dabuf_t *leaf2_bp) +{ + xfs_dir_leafblock_t *leaf1, *leaf2; + + leaf1 = leaf1_bp->data; + leaf2 = leaf2_bp->data; + ASSERT((be16_to_cpu(leaf1->hdr.info.magic) == XFS_DIR_LEAF_MAGIC) && + (be16_to_cpu(leaf2->hdr.info.magic) == XFS_DIR_LEAF_MAGIC)); + if ((INT_GET(leaf1->hdr.count, ARCH_CONVERT) > 0) && (INT_GET(leaf2->hdr.count, ARCH_CONVERT) > 0) && + ((INT_GET(leaf2->entries[ 0 ].hashval, ARCH_CONVERT) < + INT_GET(leaf1->entries[ 0 ].hashval, ARCH_CONVERT)) || + (INT_GET(leaf2->entries[ INT_GET(leaf2->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT) < + INT_GET(leaf1->entries[ INT_GET(leaf1->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT)))) { + return 1; + } + return 0; +} + +/* + * Pick up the last hashvalue from a leaf block. + */ +xfs_dahash_t +xfs_dir_leaf_lasthash(xfs_dabuf_t *bp, int *count) +{ + xfs_dir_leafblock_t *leaf; + + leaf = bp->data; + ASSERT(be16_to_cpu(leaf->hdr.info.magic) == XFS_DIR_LEAF_MAGIC); + if (count) + *count = INT_GET(leaf->hdr.count, ARCH_CONVERT); + if (!leaf->hdr.count) + return(0); + return(INT_GET(leaf->entries[ INT_GET(leaf->hdr.count, ARCH_CONVERT)-1 ].hashval, ARCH_CONVERT)); +} + +/* + * Copy out directory entries for getdents(), for leaf directories. + */ +int +xfs_dir_leaf_getdents_int( + xfs_dabuf_t *bp, + xfs_inode_t *dp, + xfs_dablk_t bno, + uio_t *uio, + int *eobp, + xfs_dirent_t *dbp, + xfs_dir_put_t put, + xfs_daddr_t nextda) +{ + xfs_dir_leafblock_t *leaf; + xfs_dir_leaf_entry_t *entry; + xfs_dir_leaf_name_t *namest; + int entno, want_entno, i, nextentno; + xfs_mount_t *mp; + xfs_dahash_t cookhash; + xfs_dahash_t nexthash = 0; +#if (BITS_PER_LONG == 32) + xfs_dahash_t lasthash = XFS_DA_MAXHASH; +#endif + xfs_dir_put_args_t p; + + mp = dp->i_mount; + leaf = bp->data; + if (be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) { + *eobp = 1; + return XFS_ERROR(ENOENT); /* XXX wrong code */ + } + + want_entno = XFS_DA_COOKIE_ENTRY(mp, uio->uio_offset); + + cookhash = XFS_DA_COOKIE_HASH(mp, uio->uio_offset); + + xfs_dir_trace_g_dul("leaf: start", dp, uio, leaf); + + /* + * Re-find our place. + */ + for (i = entno = 0, entry = &leaf->entries[0]; + i < INT_GET(leaf->hdr.count, ARCH_CONVERT); + entry++, i++) { + + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, + INT_GET(entry->nameidx, ARCH_CONVERT)); + + if (unlikely( + ((char *)namest < (char *)leaf) || + ((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)))) { + XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(1)", + XFS_ERRLEVEL_LOW, mp, leaf); + xfs_dir_trace_g_du("leaf: corrupted", dp, uio); + return XFS_ERROR(EFSCORRUPTED); + } + if (INT_GET(entry->hashval, ARCH_CONVERT) >= cookhash) { + if ( entno < want_entno + && INT_GET(entry->hashval, ARCH_CONVERT) + == cookhash) { + /* + * Trying to get to a particular offset in a + * run of equal-hashval entries. + */ + entno++; + } else if ( want_entno > 0 + && entno == want_entno + && INT_GET(entry->hashval, ARCH_CONVERT) + == cookhash) { + break; + } else { + entno = 0; + break; + } + } + } + + if (i == INT_GET(leaf->hdr.count, ARCH_CONVERT)) { + xfs_dir_trace_g_du("leaf: hash not found", dp, uio); + if (!leaf->hdr.info.forw) + uio->uio_offset = + XFS_DA_MAKE_COOKIE(mp, 0, 0, XFS_DA_MAXHASH); + /* + * Don't set uio_offset if there's another block: + * the node code will be setting uio_offset anyway. + */ + *eobp = 0; + return 0; + } + xfs_dir_trace_g_due("leaf: hash found", dp, uio, entry); + + p.dbp = dbp; + p.put = put; + p.uio = uio; + + /* + * We're synchronized, start copying entries out to the user. + */ + for (; entno >= 0 && i < INT_GET(leaf->hdr.count, ARCH_CONVERT); + entry++, i++, (entno = nextentno)) { + int lastresid=0, retval; + xfs_dircook_t lastoffset; + xfs_dahash_t thishash; + + /* + * Check for a damaged directory leaf block and pick up + * the inode number from this entry. + */ + namest = XFS_DIR_LEAF_NAMESTRUCT(leaf, + INT_GET(entry->nameidx, ARCH_CONVERT)); + + if (unlikely( + ((char *)namest < (char *)leaf) || + ((char *)namest >= (char *)leaf + XFS_LBSIZE(mp)))) { + XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(2)", + XFS_ERRLEVEL_LOW, mp, leaf); + xfs_dir_trace_g_du("leaf: corrupted", dp, uio); + return XFS_ERROR(EFSCORRUPTED); + } + + xfs_dir_trace_g_duc("leaf: middle cookie ", + dp, uio, p.cook.o); + + if (i < (INT_GET(leaf->hdr.count, ARCH_CONVERT) - 1)) { + nexthash = INT_GET(entry[1].hashval, ARCH_CONVERT); + + if (nexthash == INT_GET(entry->hashval, ARCH_CONVERT)) + nextentno = entno + 1; + else + nextentno = 0; + XFS_PUT_COOKIE(p.cook, mp, bno, nextentno, nexthash); + xfs_dir_trace_g_duc("leaf: middle cookie ", + dp, uio, p.cook.o); + + } else if ((thishash = be32_to_cpu(leaf->hdr.info.forw))) { + xfs_dabuf_t *bp2; + xfs_dir_leafblock_t *leaf2; + + ASSERT(nextda != -1); + + retval = xfs_da_read_buf(dp->i_transp, dp, thishash, + nextda, &bp2, XFS_DATA_FORK); + if (retval) + return retval; + + ASSERT(bp2 != NULL); + + leaf2 = bp2->data; + + if (unlikely( + (be16_to_cpu(leaf2->hdr.info.magic) + != XFS_DIR_LEAF_MAGIC) + || (be32_to_cpu(leaf2->hdr.info.back) + != bno))) { /* GROT */ + XFS_CORRUPTION_ERROR("xfs_dir_leaf_getdents_int(3)", + XFS_ERRLEVEL_LOW, mp, + leaf2); + xfs_da_brelse(dp->i_transp, bp2); + + return XFS_ERROR(EFSCORRUPTED); + } + + nexthash = INT_GET(leaf2->entries[0].hashval, + ARCH_CONVERT); + nextentno = -1; + XFS_PUT_COOKIE(p.cook, mp, thishash, 0, nexthash); + xfs_da_brelse(dp->i_transp, bp2); + xfs_dir_trace_g_duc("leaf: next blk cookie", + dp, uio, p.cook.o); + } else { + nextentno = -1; + XFS_PUT_COOKIE(p.cook, mp, 0, 0, XFS_DA_MAXHASH); + } + + /* + * Save off the cookie so we can fall back should the + * 'put' into the outgoing buffer fails. To handle a run + * of equal-hashvals, the off_t structure on 64bit + * builds has entno built into the cookie to ID the + * entry. On 32bit builds, we only have space for the + * hashval so we can't ID specific entries within a group + * of same hashval entries. For this, lastoffset is set + * to the first in the run of equal hashvals so we don't + * include any entries unless we can include all entries + * that share the same hashval. Hopefully the buffer + * provided is big enough to handle it (see pv763517). + */ +#if (BITS_PER_LONG == 32) + if ((thishash = INT_GET(entry->hashval, ARCH_CONVERT)) + != lasthash) { + XFS_PUT_COOKIE(lastoffset, mp, bno, entno, thishash); + lastresid = uio->uio_resid; + lasthash = thishash; + } else { + xfs_dir_trace_g_duc("leaf: DUP COOKIES, skipped", + dp, uio, p.cook.o); + } +#else + thishash = INT_GET(entry->hashval, ARCH_CONVERT); + XFS_PUT_COOKIE(lastoffset, mp, bno, entno, thishash); + lastresid = uio->uio_resid; +#endif /* BITS_PER_LONG == 32 */ + + /* + * Put the current entry into the outgoing buffer. If we fail + * then restore the UIO to the first entry in the current + * run of equal-hashval entries (probably one 1 entry long). + */ + p.ino = XFS_GET_DIR_INO8(namest->inumber); +#if XFS_BIG_INUMS + p.ino += mp->m_inoadd; +#endif + p.name = (char *)namest->name; + p.namelen = entry->namelen; + + retval = p.put(&p); + + if (!p.done) { + uio->uio_offset = lastoffset.o; + uio->uio_resid = lastresid; + + *eobp = 1; + + xfs_dir_trace_g_du("leaf: E-O-B", dp, uio); + + return retval; + } + } + + uio->uio_offset = p.cook.o; + + *eobp = 0; + + xfs_dir_trace_g_du("leaf: E-O-F", dp, uio); + + return 0; +} + +/* + * Format a dirent64 structure and copy it out the the user's buffer. + */ +int +xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa) +{ + iovec_t *iovp; + int reclen, namelen; + xfs_dirent_t *idbp; + uio_t *uio; + + namelen = pa->namelen; + reclen = DIRENTSIZE(namelen); + uio = pa->uio; + if (reclen > uio->uio_resid) { + pa->done = 0; + return 0; + } + iovp = uio->uio_iov; + idbp = (xfs_dirent_t *)iovp->iov_base; + iovp->iov_base = (char *)idbp + reclen; + iovp->iov_len -= reclen; + uio->uio_resid -= reclen; + idbp->d_reclen = reclen; + idbp->d_ino = pa->ino; + idbp->d_off = pa->cook.o; + idbp->d_name[namelen] = '\0'; + pa->done = 1; + memcpy(idbp->d_name, pa->name, namelen); + return 0; +} + +/* + * Format a dirent64 structure and copy it out the the user's buffer. + */ +int +xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa) +{ + int retval, reclen, namelen; + xfs_dirent_t *idbp; + uio_t *uio; + + namelen = pa->namelen; + reclen = DIRENTSIZE(namelen); + uio = pa->uio; + if (reclen > uio->uio_resid) { + pa->done = 0; + return 0; + } + idbp = pa->dbp; + idbp->d_reclen = reclen; + idbp->d_ino = pa->ino; + idbp->d_off = pa->cook.o; + idbp->d_name[namelen] = '\0'; + memcpy(idbp->d_name, pa->name, namelen); + retval = uio_read((caddr_t)idbp, reclen, uio); + pa->done = (retval == 0); + return retval; +} diff --git a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h new file mode 100644 index 000000000..eb8cd9a46 --- /dev/null +++ b/fs/xfs/xfs_dir_leaf.h @@ -0,0 +1,231 @@ +/* + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * 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. + * + * 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. 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 the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __XFS_DIR_LEAF_H__ +#define __XFS_DIR_LEAF_H__ + +/* + * Directory layout, internal structure, access macros, etc. + * + * Large directories are structured around Btrees where all the data + * elements are in the leaf nodes. Filenames are hashed into an int, + * then that int is used as the index into the Btree. Since the hashval + * of a filename may not be unique, we may have duplicate keys. The + * internal links in the Btree are logical block offsets into the file. + */ + +struct uio; +struct xfs_bmap_free; +struct xfs_dabuf; +struct xfs_da_args; +struct xfs_da_state; +struct xfs_da_state_blk; +struct xfs_dir_put_args; +struct xfs_inode; +struct xfs_mount; +struct xfs_trans; + +/*======================================================================== + * Directory Structure when equal to XFS_LBSIZE(mp) bytes. + *========================================================================*/ + +/* + * This is the structure of the leaf nodes in the Btree. + * + * Struct leaf_entry's are packed from the top. Names grow from the bottom + * but are not packed. The freemap contains run-length-encoded entries + * for the free bytes after the leaf_entry's, but only the N largest such, + * smaller runs are dropped. When the freemap doesn't show enough space + * for an allocation, we compact the namelist area and try again. If we + * still don't have enough space, then we have to split the block. + * + * Since we have duplicate hash keys, for each key that matches, compare + * the actual string. The root and intermediate node search always takes + * the first-in-the-block key match found, so we should only have to work + * "forw"ard. If none matches, continue with the "forw"ard leaf nodes + * until the hash key changes or the filename is found. + * + * The parent directory and the self-pointer are explicitly represented + * (ie: there are entries for "." and ".."). + * + * Note that the count being a __uint16_t limits us to something like a + * blocksize of 1.3MB in the face of worst case (short) filenames. + */ +#define XFS_DIR_LEAF_MAPSIZE 3 /* how many freespace slots */ + +typedef struct xfs_dir_leaf_map { /* RLE map of free bytes */ + __uint16_t base; /* base of free region */ + __uint16_t size; /* run length of free region */ +} xfs_dir_leaf_map_t; + +typedef struct xfs_dir_leaf_hdr { /* constant-structure header block */ + xfs_da_blkinfo_t info; /* block type, links, etc. */ + __uint16_t count; /* count of active leaf_entry's */ + __uint16_t namebytes; /* num bytes of name strings stored */ + __uint16_t firstused; /* first used byte in name area */ + __uint8_t holes; /* != 0 if blk needs compaction */ + __uint8_t pad1; + xfs_dir_leaf_map_t freemap[XFS_DIR_LEAF_MAPSIZE]; +} xfs_dir_leaf_hdr_t; + +typedef struct xfs_dir_leaf_entry { /* sorted on key, not name */ + xfs_dahash_t hashval; /* hash value of name */ + __uint16_t nameidx; /* index into buffer of name */ + __uint8_t namelen; /* length of name string */ + __uint8_t pad2; +} xfs_dir_leaf_entry_t; + +typedef struct xfs_dir_leaf_name { + xfs_dir_ino_t inumber; /* inode number for this key */ + __uint8_t name[1]; /* name string itself */ +} xfs_dir_leaf_name_t; + +typedef struct xfs_dir_leafblock { + xfs_dir_leaf_hdr_t hdr; /* constant-structure header block */ + xfs_dir_leaf_entry_t entries[1]; /* var sized array */ + xfs_dir_leaf_name_t namelist[1]; /* grows from bottom of buf */ +} xfs_dir_leafblock_t; + +/* + * Length of name for which a 512-byte block filesystem + * can get a double split. + */ +#define XFS_DIR_LEAF_CAN_DOUBLE_SPLIT_LEN \ + (512 - (uint)sizeof(xfs_dir_leaf_hdr_t) - \ + (uint)sizeof(xfs_dir_leaf_entry_t) * 2 - \ + (uint)sizeof(xfs_dir_leaf_name_t) * 2 - (MAXNAMELEN - 2) + 1 + 1) + +typedef int (*xfs_dir_put_t)(struct xfs_dir_put_args *pa); + +typedef union { + xfs_off_t o; /* offset (cookie) */ + /* + * Watch the order here (endian-ness dependent). + */ + struct { +#ifndef XFS_NATIVE_HOST + xfs_dahash_t h; /* hash value */ + __uint32_t be; /* block and entry */ +#else + __uint32_t be; /* block and entry */ + xfs_dahash_t h; /* hash value */ +#endif /* XFS_NATIVE_HOST */ + } s; +} xfs_dircook_t; + +#define XFS_PUT_COOKIE(c,mp,bno,entry,hash) \ + ((c).s.be = XFS_DA_MAKE_BNOENTRY(mp, bno, entry), (c).s.h = (hash)) + +typedef struct xfs_dir_put_args { + xfs_dircook_t cook; /* cookie of (next) entry */ + xfs_intino_t ino; /* inode number */ + struct xfs_dirent *dbp; /* buffer pointer */ + char *name; /* directory entry name */ + int namelen; /* length of name */ + int done; /* output: set if value was stored */ + xfs_dir_put_t put; /* put function ptr (i/o) */ + struct uio *uio; /* uio control structure */ +} xfs_dir_put_args_t; + +#define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) \ + xfs_dir_leaf_entsize_byname(len) +static inline int xfs_dir_leaf_entsize_byname(int len) +{ + return (uint)sizeof(xfs_dir_leaf_name_t)-1 + len; +} + +#define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \ + xfs_dir_leaf_entsize_byentry(entry) +static inline int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry) +{ + return (uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen; +} + +#define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \ + xfs_dir_leaf_namestruct(leafp,offset) +static inline xfs_dir_leaf_name_t * +xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset) +{ + return (xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]; +} + +/*======================================================================== + * Function prototypes for the kernel. + *========================================================================*/ + +/* + * Internal routines when dirsize < XFS_LITINO(mp). + */ +int xfs_dir_shortform_create(struct xfs_da_args *args, xfs_ino_t parent); +int xfs_dir_shortform_addname(struct xfs_da_args *args); +int xfs_dir_shortform_lookup(struct xfs_da_args *args); +int xfs_dir_shortform_to_leaf(struct xfs_da_args *args); +int xfs_dir_shortform_removename(struct xfs_da_args *args); +int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, + struct xfs_dirent *dbp, xfs_dir_put_t put); +int xfs_dir_shortform_replace(struct xfs_da_args *args); + +/* + * Internal routines when dirsize == XFS_LBSIZE(mp). + */ +int xfs_dir_leaf_to_node(struct xfs_da_args *args); +int xfs_dir_leaf_to_shortform(struct xfs_da_args *args); + +/* + * Routines used for growing the Btree. + */ +int xfs_dir_leaf_split(struct xfs_da_state *state, + struct xfs_da_state_blk *oldblk, + struct xfs_da_state_blk *newblk); +int xfs_dir_leaf_add(struct xfs_dabuf *leaf_buffer, + struct xfs_da_args *args, int insertion_index); +int xfs_dir_leaf_addname(struct xfs_da_args *args); +int xfs_dir_leaf_lookup_int(struct xfs_dabuf *leaf_buffer, + struct xfs_da_args *args, + int *index_found_at); +int xfs_dir_leaf_remove(struct xfs_trans *trans, + struct xfs_dabuf *leaf_buffer, + int index_to_remove); +int xfs_dir_leaf_getdents_int(struct xfs_dabuf *bp, struct xfs_inode *dp, + xfs_dablk_t bno, struct uio *uio, + int *eobp, struct xfs_dirent *dbp, + xfs_dir_put_t put, xfs_daddr_t nextda); + +/* + * Routines used for shrinking the Btree. + */ +int xfs_dir_leaf_toosmall(struct xfs_da_state *state, int *retval); +void xfs_dir_leaf_unbalance(struct xfs_da_state *state, + struct xfs_da_state_blk *drop_blk, + struct xfs_da_state_blk *save_blk); + +/* + * Utility routines. + */ +uint xfs_dir_leaf_lasthash(struct xfs_dabuf *bp, int *count); +int xfs_dir_leaf_order(struct xfs_dabuf *leaf1_bp, + struct xfs_dabuf *leaf2_bp); +int xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa); +int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa); +int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); + +/* + * Global data. + */ +extern xfs_dahash_t xfs_dir_hash_dot, xfs_dir_hash_dotdot; + +#endif /* __XFS_DIR_LEAF_H__ */ diff --git a/fs/xfs/xfs_dir_sf.h b/fs/xfs/xfs_dir_sf.h new file mode 100644 index 000000000..5b20b4d3f --- /dev/null +++ b/fs/xfs/xfs_dir_sf.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * 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. + * + * 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. 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 the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef __XFS_DIR_SF_H__ +#define __XFS_DIR_SF_H__ + +/* + * Directory layout when stored internal to an inode. + * + * Small directories are packed as tightly as possible so as to + * fit into the literal area of the inode. + */ + +typedef struct { __uint8_t i[sizeof(xfs_ino_t)]; } xfs_dir_ino_t; + +/* + * The parent directory has a dedicated field, and the self-pointer must + * be calculated on the fly. + * + * Entries are packed toward the top as tight as possible. The header + * and the elements much be memcpy'd out into a work area to get correct + * alignment for the inode number fields. + */ +typedef struct xfs_dir_sf_hdr { /* constant-structure header block */ + xfs_dir_ino_t parent; /* parent dir inode number */ + __uint8_t count; /* count of active entries */ +} xfs_dir_sf_hdr_t; + +typedef struct xfs_dir_sf_entry { + xfs_dir_ino_t inumber; /* referenced inode number */ + __uint8_t namelen; /* actual length of name (no NULL) */ + __uint8_t name[1]; /* name */ +} xfs_dir_sf_entry_t; + +typedef struct xfs_dir_shortform { + xfs_dir_sf_hdr_t hdr; + xfs_dir_sf_entry_t list[1]; /* variable sized array */ +} xfs_dir_shortform_t; + +/* + * We generate this then sort it, so that readdirs are returned in + * hash-order. Else seekdir won't work. + */ +typedef struct xfs_dir_sf_sort { + __uint8_t entno; /* .=0, ..=1, else entry# + 2 */ + __uint8_t seqno; /* sequence # with same hash value */ + __uint8_t namelen; /* length of name value (no null) */ + xfs_dahash_t hash; /* this entry's hash value */ + xfs_intino_t ino; /* this entry's inode number */ + char *name; /* name value, pointer into buffer */ +} xfs_dir_sf_sort_t; + +#define XFS_DIR_SF_GET_DIRINO(from,to) xfs_dir_sf_get_dirino(from, to) +static inline void xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to) +{ + *(to) = XFS_GET_DIR_INO8(*from); +} + +#define XFS_DIR_SF_PUT_DIRINO(from,to) xfs_dir_sf_put_dirino(from, to) +static inline void xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to) +{ + XFS_PUT_DIR_INO8(*(from), *(to)); +} + +#define XFS_DIR_SF_ENTSIZE_BYNAME(len) xfs_dir_sf_entsize_byname(len) +static inline int xfs_dir_sf_entsize_byname(int len) +{ + return (uint)sizeof(xfs_dir_sf_entry_t)-1 + (len); +} + +#define XFS_DIR_SF_ENTSIZE_BYENTRY(sfep) xfs_dir_sf_entsize_byentry(sfep) +static inline int xfs_dir_sf_entsize_byentry(xfs_dir_sf_entry_t *sfep) +{ + return (uint)sizeof(xfs_dir_sf_entry_t)-1 + (sfep)->namelen; +} + +#define XFS_DIR_SF_NEXTENTRY(sfep) xfs_dir_sf_nextentry(sfep) +static inline xfs_dir_sf_entry_t *xfs_dir_sf_nextentry(xfs_dir_sf_entry_t *sfep) +{ + return (xfs_dir_sf_entry_t *) \ + ((char *)(sfep) + XFS_DIR_SF_ENTSIZE_BYENTRY(sfep)); +} + +#define XFS_DIR_SF_ALLFIT(count,totallen) \ + xfs_dir_sf_allfit(count,totallen) +static inline int xfs_dir_sf_allfit(int count, int totallen) +{ + return ((uint)sizeof(xfs_dir_sf_hdr_t) + \ + ((uint)sizeof(xfs_dir_sf_entry_t)-1)*(count) + (totallen)); +} + +#if defined(XFS_DIR_TRACE) + +/* + * Kernel tracing support for directories. + */ +struct uio; +struct xfs_inode; +struct xfs_da_intnode; +struct xfs_dinode; +struct xfs_dir_leafblock; +struct xfs_dir_leaf_entry; + +#define XFS_DIR_TRACE_SIZE 4096 /* size of global trace buffer */ +extern ktrace_t *xfs_dir_trace_buf; + +/* + * Trace record types. + */ +#define XFS_DIR_KTRACE_G_DU 1 /* dp, uio */ +#define XFS_DIR_KTRACE_G_DUB 2 /* dp, uio, bno */ +#define XFS_DIR_KTRACE_G_DUN 3 /* dp, uio, node */ +#define XFS_DIR_KTRACE_G_DUL 4 /* dp, uio, leaf */ +#define XFS_DIR_KTRACE_G_DUE 5 /* dp, uio, leaf entry */ +#define XFS_DIR_KTRACE_G_DUC 6 /* dp, uio, cookie */ + +void xfs_dir_trace_g_du(char *where, struct xfs_inode *dp, struct uio *uio); +void xfs_dir_trace_g_dub(char *where, struct xfs_inode *dp, struct uio *uio, + xfs_dablk_t bno); +void xfs_dir_trace_g_dun(char *where, struct xfs_inode *dp, struct uio *uio, + struct xfs_da_intnode *node); +void xfs_dir_trace_g_dul(char *where, struct xfs_inode *dp, struct uio *uio, + struct xfs_dir_leafblock *leaf); +void xfs_dir_trace_g_due(char *where, struct xfs_inode *dp, struct uio *uio, + struct xfs_dir_leaf_entry *entry); +void xfs_dir_trace_g_duc(char *where, struct xfs_inode *dp, struct uio *uio, + xfs_off_t cookie); +void xfs_dir_trace_enter(int type, char *where, + void *a0, void *a1, void *a2, void *a3, + void *a4, void *a5, void *a6, void *a7, + void *a8, void *a9, void *a10, void *a11); +#else +#define xfs_dir_trace_g_du(w,d,u) +#define xfs_dir_trace_g_dub(w,d,u,b) +#define xfs_dir_trace_g_dun(w,d,u,n) +#define xfs_dir_trace_g_dul(w,d,u,l) +#define xfs_dir_trace_g_due(w,d,u,e) +#define xfs_dir_trace_g_duc(w,d,u,c) +#endif /* DEBUG */ + +#endif /* __XFS_DIR_SF_H__ */ diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index 4e7865ad6..00b1540f8 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h @@ -189,6 +189,6 @@ typedef enum { #define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0) -extern struct bhv_module_vfsops xfs_dmops; +extern struct bhv_vfsops xfs_dmops; #endif /* __XFS_DMAPI_H__ */ diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c index 1e4a35ddf..629795b3b 100644 --- a/fs/xfs/xfs_dmops.c +++ b/fs/xfs/xfs_dmops.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index b95681b03..2a21c5024 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c @@ -22,10 +22,12 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 6cf6d8769..f19282ec8 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" @@ -292,62 +293,6 @@ xfs_efi_init(xfs_mount_t *mp, return (efip); } -/* - * Copy an EFI format buffer from the given buf, and into the destination - * EFI format structure. - * The given buffer can be in 32 bit or 64 bit form (which has different padding), - * one of which will be the native format for this kernel. - * It will handle the conversion of formats if necessary. - */ -int -xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt) -{ - xfs_efi_log_format_t *src_efi_fmt = (xfs_efi_log_format_t *)buf->i_addr; - uint i; - uint len = sizeof(xfs_efi_log_format_t) + - (src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_t); - uint len32 = sizeof(xfs_efi_log_format_32_t) + - (src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_32_t); - uint len64 = sizeof(xfs_efi_log_format_64_t) + - (src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_64_t); - - if (buf->i_len == len) { - memcpy((char *)dst_efi_fmt, (char*)src_efi_fmt, len); - return 0; - } else if (buf->i_len == len32) { - xfs_efi_log_format_32_t *src_efi_fmt_32 = - (xfs_efi_log_format_32_t *)buf->i_addr; - - dst_efi_fmt->efi_type = src_efi_fmt_32->efi_type; - dst_efi_fmt->efi_size = src_efi_fmt_32->efi_size; - dst_efi_fmt->efi_nextents = src_efi_fmt_32->efi_nextents; - dst_efi_fmt->efi_id = src_efi_fmt_32->efi_id; - for (i = 0; i < dst_efi_fmt->efi_nextents; i++) { - dst_efi_fmt->efi_extents[i].ext_start = - src_efi_fmt_32->efi_extents[i].ext_start; - dst_efi_fmt->efi_extents[i].ext_len = - src_efi_fmt_32->efi_extents[i].ext_len; - } - return 0; - } else if (buf->i_len == len64) { - xfs_efi_log_format_64_t *src_efi_fmt_64 = - (xfs_efi_log_format_64_t *)buf->i_addr; - - dst_efi_fmt->efi_type = src_efi_fmt_64->efi_type; - dst_efi_fmt->efi_size = src_efi_fmt_64->efi_size; - dst_efi_fmt->efi_nextents = src_efi_fmt_64->efi_nextents; - dst_efi_fmt->efi_id = src_efi_fmt_64->efi_id; - for (i = 0; i < dst_efi_fmt->efi_nextents; i++) { - dst_efi_fmt->efi_extents[i].ext_start = - src_efi_fmt_64->efi_extents[i].ext_start; - dst_efi_fmt->efi_extents[i].ext_len = - src_efi_fmt_64->efi_extents[i].ext_len; - } - return 0; - } - return EFSCORRUPTED; -} - /* * This is called by the efd item code below to release references to * the given efi item. Each efd calls this with the number of diff --git a/fs/xfs/xfs_extfree_item.h b/fs/xfs/xfs_extfree_item.h index 0ea45edaa..5bf681708 100644 --- a/fs/xfs/xfs_extfree_item.h +++ b/fs/xfs/xfs_extfree_item.h @@ -26,24 +26,6 @@ typedef struct xfs_extent { xfs_extlen_t ext_len; } xfs_extent_t; -/* - * Since an xfs_extent_t has types (start:64, len: 32) - * there are different alignments on 32 bit and 64 bit kernels. - * So we provide the different variants for use by a - * conversion routine. - */ - -typedef struct xfs_extent_32 { - xfs_dfsbno_t ext_start; - xfs_extlen_t ext_len; -} __attribute__((packed)) xfs_extent_32_t; - -typedef struct xfs_extent_64 { - xfs_dfsbno_t ext_start; - xfs_extlen_t ext_len; - __uint32_t ext_pad; -} xfs_extent_64_t; - /* * This is the structure used to lay out an efi log item in the * log. The efi_extents field is a variable size array whose @@ -57,22 +39,6 @@ typedef struct xfs_efi_log_format { xfs_extent_t efi_extents[1]; /* array of extents to free */ } xfs_efi_log_format_t; -typedef struct xfs_efi_log_format_32 { - unsigned short efi_type; /* efi log item type */ - unsigned short efi_size; /* size of this item */ - uint efi_nextents; /* # extents to free */ - __uint64_t efi_id; /* efi identifier */ - xfs_extent_32_t efi_extents[1]; /* array of extents to free */ -} __attribute__((packed)) xfs_efi_log_format_32_t; - -typedef struct xfs_efi_log_format_64 { - unsigned short efi_type; /* efi log item type */ - unsigned short efi_size; /* size of this item */ - uint efi_nextents; /* # extents to free */ - __uint64_t efi_id; /* efi identifier */ - xfs_extent_64_t efi_extents[1]; /* array of extents to free */ -} xfs_efi_log_format_64_t; - /* * This is the structure used to lay out an efd log item in the * log. The efd_extents array is a variable size array whose @@ -86,22 +52,6 @@ typedef struct xfs_efd_log_format { xfs_extent_t efd_extents[1]; /* array of extents freed */ } xfs_efd_log_format_t; -typedef struct xfs_efd_log_format_32 { - unsigned short efd_type; /* efd log item type */ - unsigned short efd_size; /* size of this item */ - uint efd_nextents; /* # of extents freed */ - __uint64_t efd_efi_id; /* id of corresponding efi */ - xfs_extent_32_t efd_extents[1]; /* array of extents freed */ -} __attribute__((packed)) xfs_efd_log_format_32_t; - -typedef struct xfs_efd_log_format_64 { - unsigned short efd_type; /* efd log item type */ - unsigned short efd_size; /* size of this item */ - uint efd_nextents; /* # of extents freed */ - __uint64_t efd_efi_id; /* id of corresponding efi */ - xfs_extent_64_t efd_extents[1]; /* array of extents freed */ -} xfs_efd_log_format_64_t; - #ifdef __KERNEL__ @@ -153,8 +103,7 @@ extern struct kmem_zone *xfs_efd_zone; xfs_efi_log_item_t *xfs_efi_init(struct xfs_mount *, uint); xfs_efd_log_item_t *xfs_efd_init(struct xfs_mount *, xfs_efi_log_item_t *, uint); -int xfs_efi_copy_format(xfs_log_iovec_t *buf, - xfs_efi_log_format_t *dst_efi_fmt); + void xfs_efi_item_free(xfs_efi_log_item_t *); #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index 29b164e4a..5354048c2 100644 --- a/fs/xfs/xfs_fs.h +++ b/fs/xfs/xfs_fs.h @@ -67,7 +67,6 @@ struct fsxattr { #define XFS_XFLAG_NOSYMLINKS 0x00000400 /* disallow symlink creation */ #define XFS_XFLAG_EXTSIZE 0x00000800 /* extent size allocator hint */ #define XFS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */ -#define XFS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */ #define XFS_XFLAG_BARRIER 0x00004000 /* chroot() barrier */ #define XFS_XFLAG_IUNLINK 0x00008000 /* immutable unlink */ #define XFS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ @@ -75,9 +74,9 @@ struct fsxattr { /* * Structure for XFS_IOC_GETBMAP. * On input, fill in bmv_offset and bmv_length of the first structure - * to indicate the area of interest in the file, and bmv_entries with - * the number of array elements given back. The first structure is - * updated on return to give the offset and length for the next call. + * to indicate the area of interest in the file, and bmv_entry with the + * number of array elements given. The first structure is updated on + * return to give the offset and length for the next call. */ #ifndef HAVE_GETBMAP struct getbmap { diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index c064e72ad..dfa3527b2 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -462,7 +464,7 @@ xfs_fs_counts( xfs_icsb_sync_counters_lazy(mp); s = XFS_SB_LOCK(mp); - cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); + cnt->freedata = mp->m_sb.sb_fdblocks; cnt->freertx = mp->m_sb.sb_frextents; cnt->freeino = mp->m_sb.sb_ifree; cnt->allocino = mp->m_sb.sb_icount; @@ -519,19 +521,15 @@ xfs_reserve_blocks( } mp->m_resblks = request; } else { - __int64_t free; - - free = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); delta = request - mp->m_resblks; - lcounter = free - delta; + lcounter = mp->m_sb.sb_fdblocks - delta; if (lcounter < 0) { /* We can't satisfy the request, just get what we can */ - mp->m_resblks += free; - mp->m_resblks_avail += free; - mp->m_sb.sb_fdblocks = XFS_ALLOC_SET_ASIDE(mp); + mp->m_resblks += mp->m_sb.sb_fdblocks; + mp->m_resblks_avail += mp->m_sb.sb_fdblocks; + mp->m_sb.sb_fdblocks = 0; } else { - mp->m_sb.sb_fdblocks = - lcounter + XFS_ALLOC_SET_ASIDE(mp); + mp->m_sb.sb_fdblocks = lcounter; mp->m_resblks = request; mp->m_resblks_avail += delta; } @@ -544,13 +542,14 @@ xfs_reserve_blocks( } void -xfs_fs_log_dummy( - xfs_mount_t *mp) +xfs_fs_log_dummy(xfs_mount_t *mp) { - xfs_trans_t *tp; - xfs_inode_t *ip; + xfs_trans_t *tp; + xfs_inode_t *ip; + tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); + atomic_inc(&mp->m_active_trans); if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) { xfs_trans_cancel(tp, 0); return; @@ -575,22 +574,21 @@ xfs_fs_goingdown( { switch (inflags) { case XFS_FSOP_GOING_FLAGS_DEFAULT: { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); + struct vfs *vfsp = XFS_MTOVFS(mp); struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); if (sb && !IS_ERR(sb)) { - xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); + xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); thaw_bdev(sb->s_bdev, sb); } break; } case XFS_FSOP_GOING_FLAGS_LOGFLUSH: - xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); + xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); break; case XFS_FSOP_GOING_FLAGS_NOLOGFLUSH: - xfs_force_shutdown(mp, - SHUTDOWN_FORCE_UMOUNT | SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(mp, XFS_FORCE_UMOUNT|XFS_LOG_IO_ERROR); break; default: return XFS_ERROR(EINVAL); diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 33164a85a..deddbd03c 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -1172,9 +1174,6 @@ xfs_dilocate( if (agno >= mp->m_sb.sb_agcount || agbno >= mp->m_sb.sb_agblocks || ino != XFS_AGINO_TO_INO(mp, agno, agino)) { #ifdef DEBUG - /* no diagnostics for bulkstat, ino comes from userspace */ - if (flags & XFS_IMAP_BULKSTAT) - return XFS_ERROR(EINVAL); if (agno >= mp->m_sb.sb_agcount) { xfs_fs_cmn_err(CE_ALERT, mp, "xfs_dilocate: agno (%d) >= " diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 616eeeb69..60c656834 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index b905e538f..b53854325 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -184,7 +186,7 @@ xfs_ihash_promote( */ STATIC int xfs_iget_core( - bhv_vnode_t *vp, + vnode_t *vp, xfs_mount_t *mp, xfs_trans_t *tp, xfs_ino_t ino, @@ -196,7 +198,7 @@ xfs_iget_core( xfs_ihash_t *ih; xfs_inode_t *ip; xfs_inode_t *iq; - bhv_vnode_t *inode_vp; + vnode_t *inode_vp; ulong version; int error; /* REFERENCED */ @@ -466,7 +468,7 @@ finish_inode: * If we have a real type for an on-disk inode, we can set ops(&unlock) * now. If it's a new inode being created, xfs_ialloc will handle it. */ - bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, XFS_ITOBHV(ip), 1); + VFS_INIT_VNODE(XFS_MTOVFS(mp), vp, XFS_ITOBHV(ip), 1); return 0; } @@ -487,7 +489,7 @@ xfs_iget( xfs_daddr_t bno) { struct inode *inode; - bhv_vnode_t *vp = NULL; + vnode_t *vp = NULL; int error; XFS_STATS_INC(xs_ig_attempts); @@ -541,7 +543,7 @@ retry: void xfs_inode_lock_init( xfs_inode_t *ip, - bhv_vnode_t *vp) + vnode_t *vp) { mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER, "xfsino", (long)vp->v_number); @@ -601,10 +603,12 @@ void xfs_iput(xfs_inode_t *ip, uint lock_flags) { - bhv_vnode_t *vp = XFS_ITOV(ip); + vnode_t *vp = XFS_ITOV(ip); vn_trace_entry(vp, "xfs_iput", (inst_t *)__return_address); + xfs_iunlock(ip, lock_flags); + VN_RELE(vp); } @@ -615,7 +619,7 @@ void xfs_iput_new(xfs_inode_t *ip, uint lock_flags) { - bhv_vnode_t *vp = XFS_ITOV(ip); + vnode_t *vp = XFS_ITOV(ip); struct inode *inode = vn_to_inode(vp); vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); @@ -641,7 +645,7 @@ xfs_iput_new(xfs_inode_t *ip, void xfs_ireclaim(xfs_inode_t *ip) { - bhv_vnode_t *vp; + vnode_t *vp; /* * Remove from old hash list and mount list. @@ -676,8 +680,6 @@ xfs_ireclaim(xfs_inode_t *ip) vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); } - xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); - /* * Free all memory associated with the inode. */ @@ -1031,6 +1033,6 @@ xfs_iflock_nowait(xfs_inode_t *ip) void xfs_ifunlock(xfs_inode_t *ip) { - ASSERT(issemalocked(&(ip->i_flock))); + ASSERT(valusema(&(ip->i_flock)) <= 0); vsema(&(ip->i_flock)); } diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 7b5dfd116..33f589f5e 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -26,12 +26,14 @@ #include "xfs_trans_priv.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -255,11 +257,13 @@ xfs_itobp( xfs_daddr_t bno, uint imap_flags) { - xfs_imap_t imap; xfs_buf_t *bp; int error; + xfs_imap_t imap; +#ifdef __KERNEL__ int i; int ni; +#endif if (ip->i_blkno == (xfs_daddr_t)0) { /* @@ -316,6 +320,7 @@ xfs_itobp( */ error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, imap.im_blkno, (int)imap.im_len, XFS_BUF_LOCK, &bp); + if (error) { #ifdef DEBUG xfs_fs_cmn_err(CE_ALERT, mp, "xfs_itobp: " @@ -326,20 +331,17 @@ xfs_itobp( #endif /* DEBUG */ return error; } - +#ifdef __KERNEL__ /* * Validate the magic number and version of every inode in the buffer * (if DEBUG kernel) or the first inode in the buffer, otherwise. - * No validation is done here in userspace (xfs_repair). */ -#if !defined(__KERNEL__) - ni = 0; -#elif defined(DEBUG) - ni = BBTOB(imap.im_len) >> mp->m_sb.sb_inodelog; -#else /* usual case */ - ni = 1; +#ifdef DEBUG + ni = (imap_flags & XFS_IMAP_BULKSTAT) ? 0 : + (BBTOB(imap.im_len) >> mp->m_sb.sb_inodelog); +#else + ni = (imap_flags & XFS_IMAP_BULKSTAT) ? 0 : 1; #endif - for (i = 0; i < ni; i++) { int di_ok; xfs_dinode_t *dip; @@ -348,18 +350,11 @@ xfs_itobp( (i << mp->m_sb.sb_inodelog)); di_ok = INT_GET(dip->di_core.di_magic, ARCH_CONVERT) == XFS_DINODE_MAGIC && XFS_DINODE_GOOD_VERSION(INT_GET(dip->di_core.di_version, ARCH_CONVERT)); - if (unlikely(XFS_TEST_ERROR(!di_ok, mp, - XFS_ERRTAG_ITOBP_INOTOBP, - XFS_RANDOM_ITOBP_INOTOBP))) { - if (imap_flags & XFS_IMAP_BULKSTAT) { - xfs_trans_brelse(tp, bp); - return XFS_ERROR(EINVAL); - } + if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP, + XFS_RANDOM_ITOBP_INOTOBP))) { #ifdef DEBUG - cmn_err(CE_ALERT, - "Device %s - bad inode magic/vsn " - "daddr %lld #%d (magic=%x)", - XFS_BUFTARG_NAME(mp->m_ddev_targp), + prdev("bad inode magic/vsn daddr %lld #%d (magic=%x)", + mp->m_ddev_targp, (unsigned long long)imap.im_blkno, i, INT_GET(dip->di_core.di_magic, ARCH_CONVERT)); #endif @@ -369,6 +364,7 @@ xfs_itobp( return XFS_ERROR(EFSCORRUPTED); } } +#endif /* __KERNEL__ */ xfs_inobp_check(mp, bp); @@ -802,6 +798,7 @@ xfs_xlate_dinode_core( STATIC uint _xfs_dic2xflags( + xfs_dinode_core_t *dic, __uint16_t di_flags) { uint flags = 0; @@ -835,8 +832,6 @@ _xfs_dic2xflags( flags |= XFS_XFLAG_EXTSIZE; if (di_flags & XFS_DIFLAG_EXTSZINHERIT) flags |= XFS_XFLAG_EXTSZINHERIT; - if (di_flags & XFS_DIFLAG_NODEFRAG) - flags |= XFS_XFLAG_NODEFRAG; } return flags; @@ -848,16 +843,16 @@ xfs_ip2xflags( { xfs_dinode_core_t *dic = &ip->i_d; - return _xfs_dic2xflags(dic->di_flags) | - (XFS_CFORK_Q(dic) ? XFS_XFLAG_HASATTR : 0); + return _xfs_dic2xflags(dic, dic->di_flags) | + (XFS_CFORK_Q(dic) ? XFS_XFLAG_HASATTR : 0); } uint xfs_dic2xflags( xfs_dinode_core_t *dic) { - return _xfs_dic2xflags(INT_GET(dic->di_flags, ARCH_CONVERT)) | - (XFS_CFORK_Q_DISK(dic) ? XFS_XFLAG_HASATTR : 0); + return _xfs_dic2xflags(dic, INT_GET(dic->di_flags, ARCH_CONVERT)) | + (XFS_CFORK_Q_DISK(dic) ? XFS_XFLAG_HASATTR : 0); } /* @@ -1108,7 +1103,7 @@ xfs_ialloc( { xfs_ino_t ino; xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; uint flags; int error; @@ -1247,9 +1242,6 @@ xfs_ialloc( di_flags |= XFS_DIFLAG_NOSYMLINKS; if (pip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) di_flags |= XFS_DIFLAG_PROJINHERIT; - if ((pip->i_d.di_flags & XFS_DIFLAG_NODEFRAG) && - xfs_inherit_nodefrag) - di_flags |= XFS_DIFLAG_NODEFRAG; ip->i_d.di_flags |= di_flags; } /* FALLTHROUGH */ @@ -1273,8 +1265,8 @@ xfs_ialloc( */ xfs_trans_log_inode(tp, ip, flags); - /* now that we have an i_mode we can setup inode ops and unlock */ - bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, XFS_ITOBHV(ip), 1); + /* now that we have an i_mode we can set Linux inode ops (& unlock) */ + VFS_INIT_VNODE(XFS_MTOVFS(tp->t_mountp), vp, XFS_ITOBHV(ip), 1); *ipp = ip; return 0; @@ -1314,7 +1306,7 @@ xfs_isize_check( (xfs_ufsize_t)XFS_MAXIOFFSET(mp)) - map_first), XFS_BMAPI_ENTIRE, NULL, 0, imaps, &nimaps, - NULL, NULL)) + NULL)) return; ASSERT(nimaps == 1); ASSERT(imaps[0].br_startblock == HOLESTARTBLOCK); @@ -1450,7 +1442,7 @@ xfs_itruncate_start( xfs_fsize_t last_byte; xfs_off_t toss_start; xfs_mount_t *mp; - bhv_vnode_t *vp; + vnode_t *vp; ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); ASSERT((new_size == 0) || (new_size <= ip->i_d.di_size)); @@ -1463,9 +1455,9 @@ xfs_itruncate_start( vn_iowait(vp); /* wait for the completion of any pending DIOs */ /* - * Call toss_pages or flushinval_pages to get rid of pages + * Call VOP_TOSS_PAGES() or VOP_FLUSHINVAL_PAGES() to get rid of pages and buffers * overlapping the region being removed. We have to use - * the less efficient flushinval_pages in the case that the + * the less efficient VOP_FLUSHINVAL_PAGES() in the case that the * caller may not be able to finish the truncate without * dropping the inode's I/O lock. Make sure * to catch any pages brought in by buffers overlapping @@ -1474,10 +1466,10 @@ xfs_itruncate_start( * so that we don't toss things on the same block as * new_size but before it. * - * Before calling toss_page or flushinval_pages, make sure to + * Before calling VOP_TOSS_PAGES() or VOP_FLUSHINVAL_PAGES(), make sure to * call remapf() over the same region if the file is mapped. * This frees up mapped file references to the pages in the - * given range and for the flushinval_pages case it ensures + * given range and for the VOP_FLUSHINVAL_PAGES() case it ensures * that we get the latest mapped changes flushed out. */ toss_start = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size); @@ -1495,9 +1487,9 @@ xfs_itruncate_start( last_byte); if (last_byte > toss_start) { if (flags & XFS_ITRUNC_DEFINITE) { - bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); + VOP_TOSS_PAGES(vp, toss_start, -1, FI_REMAPF_LOCKED); } else { - bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); + VOP_FLUSHINVAL_PAGES(vp, toss_start, -1, FI_REMAPF_LOCKED); } } @@ -1695,13 +1687,12 @@ xfs_itruncate_finish( * runs. */ XFS_BMAP_INIT(&free_list, &first_block); - error = XFS_BUNMAPI(mp, ntp, &ip->i_iocore, - first_unmap_block, unmap_len, + error = xfs_bunmapi(ntp, ip, first_unmap_block, + unmap_len, XFS_BMAPI_AFLAG(fork) | (sync ? 0 : XFS_BMAPI_ASYNC), XFS_ITRUNC_MAX_EXTENTS, - &first_block, &free_list, - NULL, &done); + &first_block, &free_list, &done); if (error) { /* * If the bunmapi call encounters an error, @@ -1985,9 +1976,9 @@ xfs_iunlink_remove( xfs_agino_t agino; xfs_agino_t next_agino; xfs_buf_t *last_ibp; - xfs_dinode_t *last_dip = NULL; + xfs_dinode_t *last_dip; short bucket_index; - int offset, last_offset = 0; + int offset, last_offset; int error; int agi_ok; @@ -2775,14 +2766,13 @@ xfs_iunpin( * the inode to become unpinned. */ if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { - bhv_vnode_t *vp = XFS_ITOV_NULL(ip); + vnode_t *vp = XFS_ITOV_NULL(ip); /* make sync come back and flush this inode */ if (vp) { struct inode *inode = vn_to_inode(vp); - if (!(inode->i_state & - (I_NEW|I_FREEING|I_CLEAR))) + if (!(inode->i_state & I_NEW)) mark_inode_dirty_sync(inode); } } @@ -2947,6 +2937,13 @@ xfs_iflush_fork( ASSERT(ifp->if_bytes <= XFS_IFORK_SIZE(ip, whichfork)); memcpy(cp, ifp->if_u1.if_data, ifp->if_bytes); } + if (whichfork == XFS_DATA_FORK) { + if (unlikely(XFS_DIR_SHORTFORM_VALIDATE_ONDISK(mp, dip))) { + XFS_ERROR_REPORT("xfs_iflush_fork", + XFS_ERRLEVEL_LOW, mp); + return XFS_ERROR(EFSCORRUPTED); + } + } break; case XFS_DINODE_FMT_EXTENTS: @@ -3030,7 +3027,7 @@ xfs_iflush( XFS_STATS_INC(xs_iflush_count); ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); - ASSERT(issemalocked(&(ip->i_flock))); + ASSERT(valusema(&ip->i_flock) <= 0); ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || ip->i_d.di_nextents > ip->i_df.if_ext_max); @@ -3223,7 +3220,7 @@ xfs_iflush( corrupt_out: xfs_buf_relse(bp); - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); xfs_iflush_abort(ip); /* * Unlocks the flush lock @@ -3245,7 +3242,7 @@ cluster_corrupt_out: xfs_buf_relse(bp); } - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); if(!bufwasdelwri) { /* @@ -3288,7 +3285,7 @@ xfs_iflush_int( SPLDECL(s); ASSERT(ismrlocked(&ip->i_lock, MR_UPDATE|MR_ACCESS)); - ASSERT(issemalocked(&(ip->i_flock))); + ASSERT(valusema(&ip->i_flock) <= 0); ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_BTREE || ip->i_d.di_nextents > ip->i_df.if_ext_max); @@ -3528,7 +3525,7 @@ xfs_iflush_all( xfs_mount_t *mp) { xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; again: XFS_MOUNT_ILOCK(mp); @@ -4204,7 +4201,7 @@ xfs_iext_direct_to_inline( */ memcpy(ifp->if_u2.if_inline_ext, ifp->if_u1.if_extents, nextents * sizeof(xfs_bmbt_rec_t)); - kmem_free(ifp->if_u1.if_extents, ifp->if_real_bytes); + kmem_free(ifp->if_u1.if_extents, KM_SLEEP); ifp->if_u1.if_extents = ifp->if_u2.if_inline_ext; ifp->if_real_bytes = 0; } diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index d10b76ed1..3b544db17 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -102,9 +102,9 @@ typedef struct xfs_ifork { #ifdef __KERNEL__ struct bhv_desc; -struct bhv_vnode; struct cred; struct ktrace; +struct vnode; struct xfs_buf; struct xfs_bmap_free; struct xfs_bmbt_irec; @@ -400,7 +400,7 @@ void xfs_chash_init(struct xfs_mount *); void xfs_chash_free(struct xfs_mount *); xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, struct xfs_trans *); -void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *); +void xfs_inode_lock_init(xfs_inode_t *, struct vnode *); int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, uint, uint, xfs_inode_t **, xfs_daddr_t); void xfs_iput(xfs_inode_t *, uint); @@ -461,7 +461,7 @@ void xfs_ichgtime(xfs_inode_t *, int); xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); void xfs_lock_inodes(xfs_inode_t **, int, int, uint); -xfs_inode_t *xfs_vtoi(struct bhv_vnode *vp); +xfs_inode_t *xfs_vtoi(struct vnode *vp); void xfs_synchronize_atime(xfs_inode_t *); @@ -509,6 +509,7 @@ extern struct kmem_zone *xfs_chashlist_zone; extern struct kmem_zone *xfs_ifork_zone; extern struct kmem_zone *xfs_inode_zone; extern struct kmem_zone *xfs_ili_zone; +extern struct vnodeops xfs_vnodeops; #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index f8e80d8e7..7497a481b 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -25,6 +25,7 @@ #include "xfs_buf_item.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -32,6 +33,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -792,7 +794,7 @@ xfs_inode_item_pushbuf( * inode flush completed and the inode was taken off the AIL. * So, just get out. */ - if (!issemalocked(&(ip->i_flock)) || + if ((valusema(&(ip->i_flock)) > 0) || ((iip->ili_item.li_flags & XFS_LI_IN_AIL) == 0)) { iip->ili_pushbuf_flag = 0; xfs_iunlock(ip, XFS_ILOCK_SHARED); @@ -814,7 +816,7 @@ xfs_inode_item_pushbuf( * If not, we can flush it async. */ dopush = ((iip->ili_item.li_flags & XFS_LI_IN_AIL) && - issemalocked(&(ip->i_flock))); + (valusema(&(ip->i_flock)) <= 0)); iip->ili_pushbuf_flag = 0; xfs_iunlock(ip, XFS_ILOCK_SHARED); xfs_buftrace("INODE ITEM PUSH", bp); @@ -862,7 +864,7 @@ xfs_inode_item_push( ip = iip->ili_inode; ASSERT(ismrlocked(&(ip->i_lock), MR_ACCESS)); - ASSERT(issemalocked(&(ip->i_flock))); + ASSERT(valusema(&(ip->i_flock)) <= 0); /* * Since we were able to lock the inode's flush lock and * we found it on the AIL, the inode must be dirty. This @@ -1082,52 +1084,3 @@ xfs_istale_done( { xfs_iflush_abort(iip->ili_inode); } - -/* - * convert an xfs_inode_log_format struct from either 32 or 64 bit versions - * (which can have different field alignments) to the native version - */ -int -xfs_inode_item_format_convert( - xfs_log_iovec_t *buf, - xfs_inode_log_format_t *in_f) -{ - if (buf->i_len == sizeof(xfs_inode_log_format_32_t)) { - xfs_inode_log_format_32_t *in_f32; - - in_f32 = (xfs_inode_log_format_32_t *)buf->i_addr; - in_f->ilf_type = in_f32->ilf_type; - in_f->ilf_size = in_f32->ilf_size; - in_f->ilf_fields = in_f32->ilf_fields; - in_f->ilf_asize = in_f32->ilf_asize; - in_f->ilf_dsize = in_f32->ilf_dsize; - in_f->ilf_ino = in_f32->ilf_ino; - /* copy biggest field of ilf_u */ - memcpy(in_f->ilf_u.ilfu_uuid.__u_bits, - in_f32->ilf_u.ilfu_uuid.__u_bits, - sizeof(uuid_t)); - in_f->ilf_blkno = in_f32->ilf_blkno; - in_f->ilf_len = in_f32->ilf_len; - in_f->ilf_boffset = in_f32->ilf_boffset; - return 0; - } else if (buf->i_len == sizeof(xfs_inode_log_format_64_t)){ - xfs_inode_log_format_64_t *in_f64; - - in_f64 = (xfs_inode_log_format_64_t *)buf->i_addr; - in_f->ilf_type = in_f64->ilf_type; - in_f->ilf_size = in_f64->ilf_size; - in_f->ilf_fields = in_f64->ilf_fields; - in_f->ilf_asize = in_f64->ilf_asize; - in_f->ilf_dsize = in_f64->ilf_dsize; - in_f->ilf_ino = in_f64->ilf_ino; - /* copy biggest field of ilf_u */ - memcpy(in_f->ilf_u.ilfu_uuid.__u_bits, - in_f64->ilf_u.ilfu_uuid.__u_bits, - sizeof(uuid_t)); - in_f->ilf_blkno = in_f64->ilf_blkno; - in_f->ilf_len = in_f64->ilf_len; - in_f->ilf_boffset = in_f64->ilf_boffset; - return 0; - } - return EFSCORRUPTED; -} diff --git a/fs/xfs/xfs_inode_item.h b/fs/xfs/xfs_inode_item.h index 5db6cd1b4..c5dbf93b6 100644 --- a/fs/xfs/xfs_inode_item.h +++ b/fs/xfs/xfs_inode_item.h @@ -23,6 +23,25 @@ * log. The size of the inline data/extents/b-tree root to be logged * (if any) is indicated in the ilf_dsize field. Changes to this structure * must be added on to the end. + * + * Convention for naming inode log item versions : The current version + * is always named XFS_LI_INODE. When an inode log item gets superseded, + * add the latest version of IRIX that will generate logs with that item + * to the version name. + * + * -Version 1 of this structure (XFS_LI_5_3_INODE) included up to the first + * union (ilf_u) field. This was released with IRIX 5.3-XFS. + * -Version 2 of this structure (XFS_LI_6_1_INODE) is currently the entire + * structure. This was released with IRIX 6.0.1-XFS and IRIX 6.1. + * -Version 3 of this structure (XFS_LI_INODE) is the same as version 2 + * so a new structure definition wasn't necessary. However, we had + * to add a new type because the inode cluster size changed from 4K + * to 8K and the version number had to be rev'ved to keep older kernels + * from trying to recover logs with the 8K buffers in them. The logging + * code can handle recovery on different-sized clusters now so hopefully + * this'll be the last time we need to change the inode log item just + * for a change in the inode cluster size. This new version was + * released with IRIX 6.2. */ typedef struct xfs_inode_log_format { unsigned short ilf_type; /* inode log item type */ @@ -40,38 +59,18 @@ typedef struct xfs_inode_log_format { int ilf_boffset; /* off of inode in buffer */ } xfs_inode_log_format_t; -typedef struct xfs_inode_log_format_32 { - unsigned short ilf_type; /* 16: inode log item type */ - unsigned short ilf_size; /* 16: size of this item */ - uint ilf_fields; /* 32: flags for fields logged */ - ushort ilf_asize; /* 32: size of attr d/ext/root */ - ushort ilf_dsize; /* 32: size of data/ext/root */ - xfs_ino_t ilf_ino; /* 64: inode number */ - union { - xfs_dev_t ilfu_rdev; /* 32: rdev value for dev inode*/ - uuid_t ilfu_uuid; /* 128: mount point value */ - } ilf_u; - __int64_t ilf_blkno; /* 64: blkno of inode buffer */ - int ilf_len; /* 32: len of inode buffer */ - int ilf_boffset; /* 32: off of inode in buffer */ -} __attribute__((packed)) xfs_inode_log_format_32_t; - -typedef struct xfs_inode_log_format_64 { - unsigned short ilf_type; /* 16: inode log item type */ - unsigned short ilf_size; /* 16: size of this item */ - uint ilf_fields; /* 32: flags for fields logged */ - ushort ilf_asize; /* 32: size of attr d/ext/root */ - ushort ilf_dsize; /* 32: size of data/ext/root */ - __uint32_t ilf_pad; /* 32: pad for 64 bit boundary */ - xfs_ino_t ilf_ino; /* 64: inode number */ +/* Initial version shipped with IRIX 5.3-XFS */ +typedef struct xfs_inode_log_format_v1 { + unsigned short ilf_type; /* inode log item type */ + unsigned short ilf_size; /* size of this item */ + uint ilf_fields; /* flags for fields logged */ + uint ilf_dsize; /* size of data/ext/root */ + xfs_ino_t ilf_ino; /* inode number */ union { - xfs_dev_t ilfu_rdev; /* 32: rdev value for dev inode*/ - uuid_t ilfu_uuid; /* 128: mount point value */ + xfs_dev_t ilfu_rdev; /* rdev value for dev inode*/ + uuid_t ilfu_uuid; /* mount point value */ } ilf_u; - __int64_t ilf_blkno; /* 64: blkno of inode buffer */ - int ilf_len; /* 32: len of inode buffer */ - int ilf_boffset; /* 32: off of inode in buffer */ -} xfs_inode_log_format_64_t; +} xfs_inode_log_format_t_v1; /* * Flags for xfs_trans_log_inode flags field. @@ -173,8 +172,6 @@ extern void xfs_inode_item_destroy(struct xfs_inode *); extern void xfs_iflush_done(struct xfs_buf *, xfs_inode_log_item_t *); extern void xfs_istale_done(struct xfs_buf *, xfs_inode_log_item_t *); extern void xfs_iflush_abort(struct xfs_inode *); -extern int xfs_inode_item_format_convert(xfs_log_iovec_t *, - xfs_inode_log_format_t *); #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_iocore.c b/fs/xfs/xfs_iocore.c index 06d710c9c..a07815661 100644 --- a/fs/xfs/xfs_iocore.c +++ b/fs/xfs/xfs_iocore.c @@ -24,13 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" -#include "xfs_dfrag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -57,7 +58,7 @@ xfs_size_fn( STATIC int xfs_ioinit( - struct bhv_vfs *vfsp, + struct vfs *vfsp, struct xfs_mount_args *mntargs, int flags) { @@ -67,7 +68,6 @@ xfs_ioinit( xfs_ioops_t xfs_iocore_xfs = { .xfs_ioinit = (xfs_ioinit_t) xfs_ioinit, .xfs_bmapi_func = (xfs_bmapi_t) xfs_bmapi, - .xfs_bunmapi_func = (xfs_bunmapi_t) xfs_bunmapi, .xfs_bmap_eof_func = (xfs_bmap_eof_t) xfs_bmap_eof, .xfs_iomap_write_direct = (xfs_iomap_write_direct_t) xfs_iomap_write_direct, @@ -84,7 +84,6 @@ xfs_ioops_t xfs_iocore_xfs = { .xfs_unlock = (xfs_unlk_t) xfs_iunlock, .xfs_size_func = (xfs_size_t) xfs_size_fn, .xfs_iodone = (xfs_iodone_t) fs_noerr, - .xfs_swap_extents_func = (xfs_swap_extents_t) xfs_swap_extents, }; void diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index f1949c16d..d5dfedcb8 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -250,7 +252,7 @@ xfs_iomap( error = XFS_BMAPI(mp, NULL, io, offset_fsb, (xfs_filblks_t)(end_fsb - offset_fsb), bmapi_flags, NULL, 0, &imap, - &nimaps, NULL, NULL); + &nimaps, NULL); if (error) goto out; @@ -517,8 +519,8 @@ xfs_iomap_write_direct( */ XFS_BMAP_INIT(&free_list, &firstfsb); nimaps = 1; - error = XFS_BMAPI(mp, tp, io, offset_fsb, count_fsb, bmapi_flag, - &firstfsb, 0, &imap, &nimaps, &free_list, NULL); + error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, + bmapi_flag, &firstfsb, 0, &imap, &nimaps, &free_list); if (error) goto error0; @@ -608,8 +610,8 @@ xfs_iomap_eof_want_preallocate( while (count_fsb > 0) { imaps = nimaps; firstblock = NULLFSBLOCK; - error = XFS_BMAPI(mp, NULL, io, start_fsb, count_fsb, 0, - &firstblock, 0, imap, &imaps, NULL, NULL); + error = XFS_BMAPI(mp, NULL, io, start_fsb, count_fsb, + 0, &firstblock, 0, imap, &imaps, NULL); if (error) return error; for (n = 0; n < imaps; n++) { @@ -693,11 +695,11 @@ retry: nimaps = XFS_WRITE_IMAPS; firstblock = NULLFSBLOCK; - error = XFS_BMAPI(mp, NULL, io, offset_fsb, + error = xfs_bmapi(NULL, ip, offset_fsb, (xfs_filblks_t)(last_fsb - offset_fsb), XFS_BMAPI_DELAY | XFS_BMAPI_WRITE | XFS_BMAPI_ENTIRE, &firstblock, 1, imap, - &nimaps, NULL, NULL); + &nimaps, NULL); if (error && (error != ENOSPC)) return XFS_ERROR(error); @@ -830,9 +832,9 @@ xfs_iomap_write_allocate( } /* Go get the actual blocks */ - error = XFS_BMAPI(mp, tp, io, map_start_fsb, count_fsb, + error = xfs_bmapi(tp, ip, map_start_fsb, count_fsb, XFS_BMAPI_WRITE, &first_block, 1, - imap, &nimaps, &free_list, NULL); + imap, &nimaps, &free_list); if (error) goto trans_cancel; @@ -953,9 +955,9 @@ xfs_iomap_write_unwritten( */ XFS_BMAP_INIT(&free_list, &firstfsb); nimaps = 1; - error = XFS_BMAPI(mp, tp, io, offset_fsb, count_fsb, + error = xfs_bmapi(tp, ip, offset_fsb, count_fsb, XFS_BMAPI_WRITE|XFS_BMAPI_CONVERT, &firstfsb, - 1, &imap, &nimaps, &free_list, NULL); + 1, &imap, &nimaps, &free_list); if (error) goto error_on_bmapi_transaction; diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 7d44fdb75..c4df708a3 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -39,6 +41,11 @@ #include "xfs_error.h" #include "xfs_btree.h" +#ifndef HAVE_USERACC +#define useracc(ubuffer, size, flags, foo) (0) +#define unuseracc(ubuffer, size, flags) +#endif + STATIC int xfs_bulkstat_one_iget( xfs_mount_t *mp, /* mount point for filesystem */ @@ -49,7 +56,7 @@ xfs_bulkstat_one_iget( { xfs_dinode_core_t *dic; /* dinode core info pointer */ xfs_inode_t *ip; /* incore inode pointer */ - bhv_vnode_t *vp; + vnode_t *vp; int error; error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_SHARED, &ip, bno); @@ -330,6 +337,15 @@ xfs_bulkstat( (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog); nimask = ~(nicluster - 1); nbcluster = nicluster >> mp->m_sb.sb_inopblog; + /* + * Lock down the user's buffer. If a buffer was not sent, as in the case + * disk quota code calls here, we skip this. + */ + if (ubuffer && + (error = useracc(ubuffer, ubcount * statstruct_size, + (B_READ|B_PHYS), NULL))) { + return error; + } /* * Allocate a page-sized buffer for inode btree records. * We could try allocating something smaller, but for normal @@ -636,6 +652,8 @@ xfs_bulkstat( * Done, we're either out of filesystem or space to put the data. */ kmem_free(irbuf, NBPC); + if (ubuffer) + unuseracc(ubuffer, ubcount * statstruct_size, (B_READ|B_PHYS)); *ubcountp = ubelem; if (agno >= mp->m_sb.sb_agcount) { /* diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h index be5f12e07..11eb4e1b1 100644 --- a/fs/xfs/xfs_itable.h +++ b/fs/xfs/xfs_itable.h @@ -45,6 +45,7 @@ typedef int (*bulkstat_one_pf)(struct xfs_mount *mp, */ #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */ #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */ +#define BULKSTAT_FG_VFSLOCKED 0x4 /* Already have vfs lock */ /* * Return stat information in bulk (by-inode) for the filesystem. diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 21ac1a67e..32e841d2f 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -35,6 +36,7 @@ #include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" #include "xfs_trans_priv.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -400,7 +402,7 @@ xfs_log_release_iclog(xfs_mount_t *mp, xlog_in_core_t *iclog = (xlog_in_core_t *)iclog_hndl; if (xlog_state_release_iclog(log, iclog)) { - xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); return EIO; } @@ -496,8 +498,9 @@ xfs_log_mount(xfs_mount_t *mp, * just worked. */ if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); - int error, readonly = (vfsp->vfs_flag & VFS_RDONLY); + int error; + vfs_t *vfsp = XFS_MTOVFS(mp); + int readonly = (vfsp->vfs_flag & VFS_RDONLY); if (readonly) vfsp->vfs_flag &= ~VFS_RDONLY; @@ -723,7 +726,7 @@ xfs_log_write(xfs_mount_t * mp, return XFS_ERROR(EIO); if ((error = xlog_write(mp, reg, nentries, tic, start_lsn, NULL, 0))) { - xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); } return error; } /* xfs_log_write */ @@ -813,9 +816,9 @@ xfs_log_need_covered(xfs_mount_t *mp) SPLDECL(s); int needed = 0, gen; xlog_t *log = mp->m_log; - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); + vfs_t *vfsp = XFS_MTOVFS(mp); - if (vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) || + if (fs_frozen(vfsp) || XFS_FORCED_SHUTDOWN(mp) || (vfsp->vfs_flag & VFS_RDONLY)) return 0; @@ -953,7 +956,7 @@ xlog_iodone(xfs_buf_t *bp) XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp)); XFS_BUF_STALE(bp); - xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(l->l_mp, XFS_LOG_IO_ERROR); /* * This flag will be propagated to the trans-committed * callback routines to let them know that the log-commit @@ -1258,7 +1261,7 @@ xlog_commit_record(xfs_mount_t *mp, ASSERT_ALWAYS(iclog); if ((error = xlog_write(mp, reg, 1, ticket, commitlsnp, iclog, XLOG_COMMIT_TRANS))) { - xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); } return error; } /* xlog_commit_record */ @@ -1413,7 +1416,7 @@ xlog_sync(xlog_t *log, ops = iclog->ic_header.h_num_logops; INT_SET(iclog->ic_header.h_num_logops, ARCH_CONVERT, ops); - bp = iclog->ic_bp; + bp = iclog->ic_bp; ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long)1); XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)2); XFS_BUF_SET_ADDR(bp, BLOCK_LSN(INT_GET(iclog->ic_header.h_lsn, ARCH_CONVERT))); @@ -1430,14 +1433,15 @@ xlog_sync(xlog_t *log, } XFS_BUF_SET_PTR(bp, (xfs_caddr_t) &(iclog->ic_header), count); XFS_BUF_SET_FSPRIVATE(bp, iclog); /* save for later */ - XFS_BUF_ZEROFLAGS(bp); XFS_BUF_BUSY(bp); XFS_BUF_ASYNC(bp); /* * Do an ordered write for the log block. - * Its unnecessary to flush the first split block in the log wrap case. + * + * It may not be needed to flush the first split block in the log wrap + * case, but do it anyways to be safe -AK */ - if (!split && (log->l_mp->m_flags & XFS_MOUNT_BARRIER)) + if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) XFS_BUF_ORDERED(bp); ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); @@ -1459,7 +1463,7 @@ xlog_sync(xlog_t *log, return error; } if (split) { - bp = iclog->ic_log->l_xbuf; + bp = iclog->ic_log->l_xbuf; ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long)1); XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)2); @@ -1467,7 +1471,6 @@ xlog_sync(xlog_t *log, XFS_BUF_SET_PTR(bp, (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+ (__psint_t)count), split); XFS_BUF_SET_FSPRIVATE(bp, iclog); - XFS_BUF_ZEROFLAGS(bp); XFS_BUF_BUSY(bp); XFS_BUF_ASYNC(bp); if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) @@ -1740,10 +1743,10 @@ xlog_write(xfs_mount_t * mp, xlog_in_core_t **commit_iclog, uint flags) { - xlog_t *log = mp->m_log; + xlog_t *log = mp->m_log; xlog_ticket_t *ticket = (xlog_ticket_t *)tic; - xlog_in_core_t *iclog = NULL; /* ptr to current in-core log */ xlog_op_header_t *logop_head; /* ptr to log operation header */ + xlog_in_core_t *iclog; /* ptr to current in-core log */ __psint_t ptr; /* copy address into data region */ int len; /* # xlog_write() bytes 2 still copy */ int index; /* region index currently copying */ @@ -1787,7 +1790,7 @@ xlog_write(xfs_mount_t * mp, xfs_cmn_err(XFS_PTAG_LOGRES, CE_ALERT, mp, "xfs_log_write: reservation ran out. Need to up reservation"); /* If we did not panic, shutdown the filesystem */ - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); #endif } else ticket->t_curr_res -= len; diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3cb678e3a..1f0016b0b 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -191,14 +193,14 @@ xlog_header_check_dump( { int b; - cmn_err(CE_DEBUG, "%s: SB : uuid = ", __FUNCTION__); + printk("%s: SB : uuid = ", __FUNCTION__); for (b = 0; b < 16; b++) - cmn_err(CE_DEBUG, "%02x", ((uchar_t *)&mp->m_sb.sb_uuid)[b]); - cmn_err(CE_DEBUG, ", fmt = %d\n", XLOG_FMT); - cmn_err(CE_DEBUG, " log : uuid = "); + printk("%02x",((unsigned char *)&mp->m_sb.sb_uuid)[b]); + printk(", fmt = %d\n", XLOG_FMT); + printk(" log : uuid = "); for (b = 0; b < 16; b++) - cmn_err(CE_DEBUG, "%02x",((uchar_t *)&head->h_fs_uuid)[b]); - cmn_err(CE_DEBUG, ", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT)); + printk("%02x",((unsigned char *)&head->h_fs_uuid)[b]); + printk(", fmt = %d\n", INT_GET(head->h_fmt, ARCH_CONVERT)); } #else #define xlog_header_check_dump(mp, head) @@ -280,7 +282,7 @@ xlog_recover_iodone( mp = XFS_BUF_FSPRIVATE(bp, xfs_mount_t *); xfs_ioerror_alert("xlog_recover_iodone", mp, bp, XFS_BUF_ADDR(bp)); - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); + xfs_force_shutdown(mp, XFS_METADATA_IO_ERROR); } XFS_BUF_SET_FSPRIVATE(bp, NULL); XFS_BUF_CLR_IODONE_FUNC(bp); @@ -990,8 +992,6 @@ xlog_find_zeroed( xfs_daddr_t num_scan_bblks; int error, log_bbnum = log->l_logBBsize; - *blk_no = 0; - /* check totally zeroed log */ bp = xlog_get_bp(log, 1); if (!bp) @@ -1889,7 +1889,7 @@ xlog_recover_do_inode_buffer( buffer_nextp = (xfs_agino_t *)xfs_buf_offset(bp, next_unlinked_offset); - *buffer_nextp = *logged_nextp; + INT_SET(*buffer_nextp, ARCH_CONVERT, *logged_nextp); } return 0; @@ -2292,22 +2292,12 @@ xlog_recover_do_inode_trans( int attr_index; uint fields; xfs_dinode_core_t *dicp; - int need_free = 0; if (pass == XLOG_RECOVER_PASS1) { return 0; } - if (item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_t)) { - in_f = (xfs_inode_log_format_t *)item->ri_buf[0].i_addr; - } else { - in_f = (xfs_inode_log_format_t *)kmem_alloc( - sizeof(xfs_inode_log_format_t), KM_SLEEP); - need_free = 1; - error = xfs_inode_item_format_convert(&item->ri_buf[0], in_f); - if (error) - goto error; - } + in_f = (xfs_inode_log_format_t *)item->ri_buf[0].i_addr; ino = in_f->ilf_ino; mp = log->l_mp; if (ITEM_TYPE(item) == XFS_LI_INODE) { @@ -2333,10 +2323,8 @@ xlog_recover_do_inode_trans( * Inode buffers can be freed, look out for it, * and do not replay the inode. */ - if (xlog_check_buffer_cancelled(log, imap.im_blkno, imap.im_len, 0)) { - error = 0; - goto error; - } + if (xlog_check_buffer_cancelled(log, imap.im_blkno, imap.im_len, 0)) + return 0; bp = xfs_buf_read_flags(mp->m_ddev_targp, imap.im_blkno, imap.im_len, XFS_BUF_LOCK); @@ -2345,7 +2333,7 @@ xlog_recover_do_inode_trans( bp, imap.im_blkno); error = XFS_BUF_GETERROR(bp); xfs_buf_relse(bp); - goto error; + return error; } error = 0; ASSERT(in_f->ilf_fields & XFS_ILOG_CORE); @@ -2362,8 +2350,7 @@ xlog_recover_do_inode_trans( dip, bp, ino); XFS_ERROR_REPORT("xlog_recover_do_inode_trans(1)", XFS_ERRLEVEL_LOW, mp); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } dicp = (xfs_dinode_core_t*)(item->ri_buf[1].i_addr); if (unlikely(dicp->di_magic != XFS_DINODE_MAGIC)) { @@ -2373,8 +2360,7 @@ xlog_recover_do_inode_trans( item, ino); XFS_ERROR_REPORT("xlog_recover_do_inode_trans(2)", XFS_ERRLEVEL_LOW, mp); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } /* Skip replay when the on disk inode is newer than the log one */ @@ -2390,8 +2376,7 @@ xlog_recover_do_inode_trans( /* do nothing */ } else { xfs_buf_relse(bp); - error = 0; - goto error; + return 0; } } /* Take the opportunity to reset the flush iteration count */ @@ -2406,8 +2391,7 @@ xlog_recover_do_inode_trans( xfs_fs_cmn_err(CE_ALERT, mp, "xfs_inode_recover: Bad regular inode log record, rec ptr 0x%p, ino ptr = 0x%p, ino bp = 0x%p, ino %Ld", item, dip, bp, ino); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } } else if (unlikely((dicp->di_mode & S_IFMT) == S_IFDIR)) { if ((dicp->di_format != XFS_DINODE_FMT_EXTENTS) && @@ -2419,8 +2403,7 @@ xlog_recover_do_inode_trans( xfs_fs_cmn_err(CE_ALERT, mp, "xfs_inode_recover: Bad dir inode log record, rec ptr 0x%p, ino ptr = 0x%p, ino bp = 0x%p, ino %Ld", item, dip, bp, ino); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } } if (unlikely(dicp->di_nextents + dicp->di_anextents > dicp->di_nblocks)){ @@ -2432,8 +2415,7 @@ xlog_recover_do_inode_trans( item, dip, bp, ino, dicp->di_nextents + dicp->di_anextents, dicp->di_nblocks); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } if (unlikely(dicp->di_forkoff > mp->m_sb.sb_inodesize)) { XFS_CORRUPTION_ERROR("xlog_recover_do_inode_trans(6)", @@ -2442,8 +2424,7 @@ xlog_recover_do_inode_trans( xfs_fs_cmn_err(CE_ALERT, mp, "xfs_inode_recover: Bad inode log rec ptr 0x%p, dino ptr 0x%p, dino bp 0x%p, ino %Ld, forkoff 0x%x", item, dip, bp, ino, dicp->di_forkoff); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } if (unlikely(item->ri_buf[1].i_len > sizeof(xfs_dinode_core_t))) { XFS_CORRUPTION_ERROR("xlog_recover_do_inode_trans(7)", @@ -2452,8 +2433,7 @@ xlog_recover_do_inode_trans( xfs_fs_cmn_err(CE_ALERT, mp, "xfs_inode_recover: Bad inode log record length %d, rec ptr 0x%p", item->ri_buf[1].i_len, item); - error = EFSCORRUPTED; - goto error; + return XFS_ERROR(EFSCORRUPTED); } /* The core is in in-core format */ @@ -2541,8 +2521,7 @@ xlog_recover_do_inode_trans( xlog_warn("XFS: xlog_recover_do_inode_trans: Invalid flag"); ASSERT(0); xfs_buf_relse(bp); - error = EIO; - goto error; + return XFS_ERROR(EIO); } } @@ -2558,10 +2537,7 @@ write_inode_buffer: error = xfs_bwrite(mp, bp); } -error: - if (need_free) - kmem_free(in_f, sizeof(*in_f)); - return XFS_ERROR(error); + return (error); } /* @@ -2698,32 +2674,32 @@ xlog_recover_do_dquot_trans( * structure into it, and adds the efi to the AIL with the given * LSN. */ -STATIC int +STATIC void xlog_recover_do_efi_trans( xlog_t *log, xlog_recover_item_t *item, xfs_lsn_t lsn, int pass) { - int error; xfs_mount_t *mp; xfs_efi_log_item_t *efip; xfs_efi_log_format_t *efi_formatp; SPLDECL(s); if (pass == XLOG_RECOVER_PASS1) { - return 0; + return; } efi_formatp = (xfs_efi_log_format_t *)item->ri_buf[0].i_addr; + ASSERT(item->ri_buf[0].i_len == + (sizeof(xfs_efi_log_format_t) + + ((efi_formatp->efi_nextents - 1) * sizeof(xfs_extent_t)))); mp = log->l_mp; efip = xfs_efi_init(mp, efi_formatp->efi_nextents); - if ((error = xfs_efi_copy_format(&(item->ri_buf[0]), - &(efip->efi_format)))) { - xfs_efi_item_free(efip); - return error; - } + memcpy((char *)&(efip->efi_format), (char *)efi_formatp, + sizeof(xfs_efi_log_format_t) + + ((efi_formatp->efi_nextents - 1) * sizeof(xfs_extent_t))); efip->efi_next_extent = efi_formatp->efi_nextents; efip->efi_flags |= XFS_EFI_COMMITTED; @@ -2732,7 +2708,6 @@ xlog_recover_do_efi_trans( * xfs_trans_update_ail() drops the AIL lock. */ xfs_trans_update_ail(mp, (xfs_log_item_t *)efip, lsn, s); - return 0; } @@ -2763,10 +2738,9 @@ xlog_recover_do_efd_trans( } efd_formatp = (xfs_efd_log_format_t *)item->ri_buf[0].i_addr; - ASSERT((item->ri_buf[0].i_len == (sizeof(xfs_efd_log_format_32_t) + - ((efd_formatp->efd_nextents - 1) * sizeof(xfs_extent_32_t)))) || - (item->ri_buf[0].i_len == (sizeof(xfs_efd_log_format_64_t) + - ((efd_formatp->efd_nextents - 1) * sizeof(xfs_extent_64_t))))); + ASSERT(item->ri_buf[0].i_len == + (sizeof(xfs_efd_log_format_t) + + ((efd_formatp->efd_nextents - 1) * sizeof(xfs_extent_t)))); efi_id = efd_formatp->efd_efi_id; /* @@ -2836,14 +2810,15 @@ xlog_recover_do_trans( if ((error = xlog_recover_do_buffer_trans(log, item, pass))) break; - } else if ((ITEM_TYPE(item) == XFS_LI_INODE)) { + } else if ((ITEM_TYPE(item) == XFS_LI_INODE) || + (ITEM_TYPE(item) == XFS_LI_6_1_INODE) || + (ITEM_TYPE(item) == XFS_LI_5_3_INODE)) { if ((error = xlog_recover_do_inode_trans(log, item, pass))) break; } else if (ITEM_TYPE(item) == XFS_LI_EFI) { - if ((error = xlog_recover_do_efi_trans(log, item, trans->r_lsn, - pass))) - break; + xlog_recover_do_efi_trans(log, item, trans->r_lsn, + pass); } else if (ITEM_TYPE(item) == XFS_LI_EFD) { xlog_recover_do_efd_trans(log, item, pass); } else if (ITEM_TYPE(item) == XFS_LI_DQUOT) { @@ -3444,13 +3419,13 @@ xlog_unpack_data_checksum( if (rhead->h_chksum || ((log->l_flags & XLOG_CHKSUM_MISMATCH) == 0)) { cmn_err(CE_DEBUG, - "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)\n", + "XFS: LogR chksum mismatch: was (0x%x) is (0x%x)", INT_GET(rhead->h_chksum, ARCH_CONVERT), chksum); cmn_err(CE_DEBUG, "XFS: Disregard message if filesystem was created with non-DEBUG kernel"); if (XFS_SB_VERSION_HASLOGV2(&log->l_mp->m_sb)) { cmn_err(CE_DEBUG, - "XFS: LogR this is a LogV2 filesystem\n"); + "XFS: LogR this is a LogV2 filesystem"); } log->l_flags |= XLOG_CHKSUM_MISMATCH; } @@ -3823,7 +3798,7 @@ xlog_do_log_recovery( error = xlog_do_recovery_pass(log, head_blk, tail_blk, XLOG_RECOVER_PASS2); #ifdef DEBUG - if (!error) { + { int i; for (i = 0; i < XLOG_BC_TABLE_SIZE; i++) @@ -3999,7 +3974,7 @@ xlog_recover_finish( log->l_flags &= ~XLOG_RECOVERY_NEEDED; } else { cmn_err(CE_DEBUG, - "!Ending clean XFS mount for filesystem: %s\n", + "!Ending clean XFS mount for filesystem: %s", log->l_mp->m_fsname); } return 0; diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 9dfae18d9..c0b1c2906 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -194,7 +196,7 @@ xfs_mount_free( kmem_free(mp->m_logname, strlen(mp->m_logname) + 1); if (remove_bhv) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); + struct vfs *vfsp = XFS_MTOVFS(mp); bhv_remove_all_vfsops(vfsp, 0); VFS_REMOVEBHV(vfsp, &mp->m_bhv); @@ -335,7 +337,7 @@ xfs_mount_validate_sb( xfs_agnumber_t xfs_initialize_perag( - bhv_vfs_t *vfs, + struct vfs *vfs, xfs_mount_t *mp, xfs_agnumber_t agcount) { @@ -649,14 +651,14 @@ xfs_mount_common(xfs_mount_t *mp, xfs_sb_t *sbp) */ int xfs_mountfs( - bhv_vfs_t *vfsp, + vfs_t *vfsp, xfs_mount_t *mp, int mfsi_flags) { xfs_buf_t *bp; xfs_sb_t *sbp = &(mp->m_sb); xfs_inode_t *rip; - bhv_vnode_t *rvp = NULL; + vnode_t *rvp = NULL; int readio_log, writeio_log; xfs_daddr_t d; __uint64_t ret64; @@ -932,7 +934,18 @@ xfs_mountfs( vfsp->vfs_altfsid = (xfs_fsid_t *)mp->m_fixedfsid; mp->m_dmevmask = 0; /* not persistent; set after each mount */ - xfs_dir_mount(mp); + /* + * Select the right directory manager. + */ + mp->m_dirops = + XFS_SB_VERSION_HASDIRV2(&mp->m_sb) ? + xfsv2_dirops : + xfsv1_dirops; + + /* + * Initialize directory manager's entries. + */ + XFS_DIR_MOUNT(mp); /* * Initialize the attribute manager's entries. @@ -993,9 +1006,8 @@ xfs_mountfs( if (unlikely((rip->i_d.di_mode & S_IFMT) != S_IFDIR)) { cmn_err(CE_WARN, "XFS: corrupted root inode"); - cmn_err(CE_WARN, "Device %s - root %llu is not a directory", - XFS_BUFTARG_NAME(mp->m_ddev_targp), - (unsigned long long)rip->i_ino); + prdev("Root inode %llu is not a directory", + mp->m_ddev_targp, (unsigned long long)rip->i_ino); xfs_iunlock(rip, XFS_ILOCK_EXCL); XFS_ERROR_REPORT("xfs_mountfs_int(2)", XFS_ERRLEVEL_LOW, mp); @@ -1082,7 +1094,7 @@ xfs_mountfs( int xfs_unmountfs(xfs_mount_t *mp, struct cred *cr) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); + struct vfs *vfsp = XFS_MTOVFS(mp); #if defined(DEBUG) || defined(INDUCE_IO_ERROR) int64_t fsid; #endif @@ -1242,8 +1254,6 @@ xfs_mod_sb(xfs_trans_t *tp, __int64_t fields) xfs_trans_log_buf(tp, bp, first, last); } - - /* * xfs_mod_incore_sb_unlocked() is a utility routine common used to apply * a delta to a specified field in the in-core superblock. Simply @@ -1288,8 +1298,7 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, return 0; case XFS_SBS_FDBLOCKS: - lcounter = (long long) - mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); + lcounter = (long long)mp->m_sb.sb_fdblocks; res_used = (long long)(mp->m_resblks - mp->m_resblks_avail); if (delta > 0) { /* Putting blocks back */ @@ -1323,7 +1332,7 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, } } - mp->m_sb.sb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp); + mp->m_sb.sb_fdblocks = lcounter; return 0; case XFS_SBS_FREXTENTS: lcounter = (long long)mp->m_sb.sb_frextents; @@ -1704,14 +1713,15 @@ xfs_mount_log_sbunit( * is present to prevent thrashing). */ -#ifdef CONFIG_HOTPLUG_CPU /* * hot-plug CPU notifier support. * - * We need a notifier per filesystem as we need to be able to identify - * the filesystem to balance the counters out. This is achieved by - * having a notifier block embedded in the xfs_mount_t and doing pointer - * magic to get the mount pointer from the notifier block address. + * We cannot use the hotcpu_register() function because it does + * not allow notifier instances. We need a notifier per filesystem + * as we need to be able to identify the filesystem to balance + * the counters out. This is achieved by having a notifier block + * embedded in the xfs_mount_t and doing pointer magic to get the + * mount pointer from the notifier block address. */ STATIC int xfs_icsb_cpu_notify( @@ -1761,7 +1771,6 @@ xfs_icsb_cpu_notify( return NOTIFY_OK; } -#endif /* CONFIG_HOTPLUG_CPU */ int xfs_icsb_init_counters( @@ -1774,11 +1783,9 @@ xfs_icsb_init_counters( if (mp->m_sb_cnts == NULL) return -ENOMEM; -#ifdef CONFIG_HOTPLUG_CPU mp->m_icsb_notifier.notifier_call = xfs_icsb_cpu_notify; mp->m_icsb_notifier.priority = 0; - register_hotcpu_notifier(&mp->m_icsb_notifier); -#endif /* CONFIG_HOTPLUG_CPU */ + register_cpu_notifier(&mp->m_icsb_notifier); for_each_online_cpu(i) { cntp = (xfs_icsb_cnts_t *)per_cpu_ptr(mp->m_sb_cnts, i); @@ -1797,7 +1804,7 @@ xfs_icsb_destroy_counters( xfs_mount_t *mp) { if (mp->m_sb_cnts) { - unregister_hotcpu_notifier(&mp->m_icsb_notifier); + unregister_cpu_notifier(&mp->m_icsb_notifier); free_percpu(mp->m_sb_cnts); } } @@ -2004,15 +2011,14 @@ xfs_icsb_sync_counters_lazy( * when we get near ENOSPC. */ #define XFS_ICSB_INO_CNTR_REENABLE 64 -#define XFS_ICSB_FDBLK_CNTR_REENABLE(mp) \ - (512 + XFS_ALLOC_SET_ASIDE(mp)) +#define XFS_ICSB_FDBLK_CNTR_REENABLE 512 STATIC void xfs_icsb_balance_counter( xfs_mount_t *mp, xfs_sb_field_t field, int flags) { - uint64_t count, resid; + uint64_t count, resid = 0; int weight = num_online_cpus(); int s; @@ -2039,12 +2045,11 @@ xfs_icsb_balance_counter( case XFS_SBS_FDBLOCKS: count = mp->m_sb.sb_fdblocks; resid = do_div(count, weight); - if (count < XFS_ICSB_FDBLK_CNTR_REENABLE(mp)) + if (count < XFS_ICSB_FDBLK_CNTR_REENABLE) goto out; break; default: BUG(); - count = resid = 0; /* quiet, gcc */ break; } @@ -2094,11 +2099,11 @@ again: case XFS_SBS_FDBLOCKS: BUG_ON((mp->m_resblks - mp->m_resblks_avail) != 0); - lcounter = icsbp->icsb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); + lcounter = icsbp->icsb_fdblocks; lcounter += delta; if (unlikely(lcounter < 0)) goto slow_path; - icsbp->icsb_fdblocks = lcounter + XFS_ALLOC_SET_ASIDE(mp); + icsbp->icsb_fdblocks = lcounter; break; default: BUG(); diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 60d48507c..5e8189714 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -53,8 +53,8 @@ typedef struct xfs_trans_reservations { #else struct cred; struct log; -struct bhv_vfs; -struct bhv_vnode; +struct vfs; +struct vnode; struct xfs_mount_args; struct xfs_ihash; struct xfs_chash; @@ -63,11 +63,9 @@ struct xfs_perag; struct xfs_iocore; struct xfs_bmbt_irec; struct xfs_bmap_free; -struct xfs_extdelta; -struct xfs_swapext; -extern struct bhv_vfsops xfs_vfsops; -extern struct bhv_vnodeops xfs_vnodeops; +extern struct vfsops xfs_vfsops; +extern struct vnodeops xfs_vnodeops; #define AIL_LOCK_T lock_t #define AIL_LOCKINIT(x,y) spinlock_init(x,y) @@ -80,15 +78,15 @@ extern struct bhv_vnodeops xfs_vnodeops; * Prototypes and functions for the Data Migration subsystem. */ -typedef int (*xfs_send_data_t)(int, struct bhv_vnode *, - xfs_off_t, size_t, int, bhv_vrwlock_t *); +typedef int (*xfs_send_data_t)(int, struct vnode *, + xfs_off_t, size_t, int, vrwlock_t *); typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); -typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t); -typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, - struct bhv_vnode *, - dm_right_t, struct bhv_vnode *, dm_right_t, +typedef int (*xfs_send_destroy_t)(struct vnode *, dm_right_t); +typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct vfs *, + struct vnode *, + dm_right_t, struct vnode *, dm_right_t, char *, char *, mode_t, int, int); -typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct bhv_vnode *, +typedef void (*xfs_send_unmount_t)(struct vfs *, struct vnode *, dm_right_t, mode_t, int, int); typedef struct xfs_dmops { @@ -190,18 +188,13 @@ typedef struct xfs_qmops { * Prototypes and functions for I/O core modularization. */ -typedef int (*xfs_ioinit_t)(struct bhv_vfs *, +typedef int (*xfs_ioinit_t)(struct vfs *, struct xfs_mount_args *, int); typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, xfs_fileoff_t, xfs_filblks_t, int, xfs_fsblock_t *, xfs_extlen_t, struct xfs_bmbt_irec *, int *, - struct xfs_bmap_free *, struct xfs_extdelta *); -typedef int (*xfs_bunmapi_t)(struct xfs_trans *, - void *, xfs_fileoff_t, - xfs_filblks_t, int, xfs_extnum_t, - xfs_fsblock_t *, struct xfs_bmap_free *, - struct xfs_extdelta *, int *); + struct xfs_bmap_free *); typedef int (*xfs_bmap_eof_t)(void *, xfs_fileoff_t, int, int *); typedef int (*xfs_iomap_write_direct_t)( void *, xfs_off_t, size_t, int, @@ -220,14 +213,11 @@ typedef void (*xfs_lock_demote_t)(void *, uint); typedef int (*xfs_lock_nowait_t)(void *, uint); typedef void (*xfs_unlk_t)(void *, unsigned int); typedef xfs_fsize_t (*xfs_size_t)(void *); -typedef xfs_fsize_t (*xfs_iodone_t)(struct bhv_vfs *); -typedef int (*xfs_swap_extents_t)(void *, void *, - struct xfs_swapext*); +typedef xfs_fsize_t (*xfs_iodone_t)(struct vfs *); typedef struct xfs_ioops { xfs_ioinit_t xfs_ioinit; xfs_bmapi_t xfs_bmapi_func; - xfs_bunmapi_t xfs_bunmapi_func; xfs_bmap_eof_t xfs_bmap_eof_func; xfs_iomap_write_direct_t xfs_iomap_write_direct; xfs_iomap_write_delay_t xfs_iomap_write_delay; @@ -240,17 +230,13 @@ typedef struct xfs_ioops { xfs_unlk_t xfs_unlock; xfs_size_t xfs_size_func; xfs_iodone_t xfs_iodone; - xfs_swap_extents_t xfs_swap_extents_func; } xfs_ioops_t; #define XFS_IOINIT(vfsp, args, flags) \ (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags) -#define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \ +#define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist) \ (*(mp)->m_io_ops.xfs_bmapi_func) \ - (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta) -#define XFS_BUNMAPI(mp, trans,io,bno,len,f,nexts,first,flist,delta,done) \ - (*(mp)->m_io_ops.xfs_bunmapi_func) \ - (trans,(io)->io_obj,bno,len,f,nexts,first,flist,delta,done) + (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist) #define XFS_BMAP_EOF(mp, io, endoff, whichfork, eof) \ (*(mp)->m_io_ops.xfs_bmap_eof_func) \ ((io)->io_obj, endoff, whichfork, eof) @@ -280,9 +266,6 @@ typedef struct xfs_ioops { (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) #define XFS_IODONE(vfsp) \ (*(mp)->m_io_ops.xfs_iodone)(vfsp) -#define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \ - (*(mp)->m_io_ops.xfs_swap_extents_func) \ - ((io)->io_obj, (tio)->io_obj, sxp) #ifdef HAVE_PERCPU_SB @@ -403,6 +386,8 @@ typedef struct xfs_mount { __uint8_t m_inode_quiesce;/* call quiesce on new inodes. field governed by m_ilock */ __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ + __uint8_t m_dirversion; /* 1 or 2 */ + xfs_dirops_t m_dirops; /* table of dir funcs */ int m_dirblksize; /* directory block sz--bytes */ int m_dirblkfsbs; /* directory block sz--fsbs */ xfs_dablk_t m_dirdatablk; /* blockno of dir data v2 */ @@ -510,7 +495,16 @@ xfs_preferred_iosize(xfs_mount_t *mp) #define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN) #define xfs_force_shutdown(m,f) \ - bhv_vfs_force_shutdown((XFS_MTOVFS(m)), f, __FILE__, __LINE__) + VFS_FORCE_SHUTDOWN((XFS_MTOVFS(m)), f, __FILE__, __LINE__) + +/* + * Flags sent to xfs_force_shutdown. + */ +#define XFS_METADATA_IO_ERROR 0x1 +#define XFS_LOG_IO_ERROR 0x2 +#define XFS_FORCE_UMOUNT 0x4 +#define XFS_CORRUPT_INCORE 0x8 /* Corrupt in-memory data structures */ +#define XFS_SHUTDOWN_REMOTE_REQ 0x10 /* Shutdown came from remote cell */ /* * Flags for xfs_mountfs @@ -528,7 +522,7 @@ xfs_preferred_iosize(xfs_mount_t *mp) * Macros for getting from mount to vfs and back. */ #define XFS_MTOVFS(mp) xfs_mtovfs(mp) -static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp) +static inline struct vfs *xfs_mtovfs(xfs_mount_t *mp) { return bhvtovfs(&mp->m_bhv); } @@ -540,7 +534,7 @@ static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp) } #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) -static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) +static inline xfs_mount_t *xfs_vfstom(vfs_t *vfs) { return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); } @@ -578,7 +572,7 @@ typedef struct xfs_mod_sb { extern xfs_mount_t *xfs_mount_init(void); extern void xfs_mod_sb(xfs_trans_t *, __int64_t); extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv); -extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); +extern int xfs_mountfs(struct vfs *, xfs_mount_t *mp, int); extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); extern int xfs_unmountfs(xfs_mount_t *, struct cred *); @@ -596,7 +590,7 @@ extern void xfs_freesb(xfs_mount_t *); extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); extern int xfs_syncsub(xfs_mount_t *, int, int, int *); extern int xfs_sync_inodes(xfs_mount_t *, int, int, int *); -extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, +extern xfs_agnumber_t xfs_initialize_perag(struct vfs *, xfs_mount_t *, xfs_agnumber_t); extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t); diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c index 320d63ff9..1408a32ee 100644 --- a/fs/xfs/xfs_qmops.c +++ b/fs/xfs/xfs_qmops.c @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h index acb853b33..7fbef974b 100644 --- a/fs/xfs/xfs_quota.h +++ b/fs/xfs/xfs_quota.h @@ -365,7 +365,7 @@ typedef struct xfs_dqtrxops { extern int xfs_qm_dqcheck(xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *); extern int xfs_mount_reset_sbqflags(struct xfs_mount *); -extern struct bhv_module_vfsops xfs_qmops; +extern struct bhv_vfsops xfs_qmops; #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index d98171dea..1f148762e 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -22,11 +22,13 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -38,6 +40,7 @@ #include "xfs_refcache.h" #include "xfs_utils.h" #include "xfs_trans_space.h" +#include "xfs_dir_leaf.h" /* @@ -84,8 +87,8 @@ STATIC int xfs_lock_for_rename( xfs_inode_t *dp1, /* old (source) directory inode */ xfs_inode_t *dp2, /* new (target) directory inode */ - bhv_vname_t *vname1,/* old entry name */ - bhv_vname_t *vname2,/* new entry name */ + vname_t *vname1,/* old entry name */ + vname_t *vname2,/* new entry name */ xfs_inode_t **ipp1, /* inode of old entry */ xfs_inode_t **ipp2, /* inode of new entry, if it already exists, NULL otherwise. */ @@ -222,9 +225,9 @@ xfs_lock_for_rename( int xfs_rename( bhv_desc_t *src_dir_bdp, - bhv_vname_t *src_vname, - bhv_vnode_t *target_dir_vp, - bhv_vname_t *target_vname, + vname_t *src_vname, + vnode_t *target_dir_vp, + vname_t *target_vname, cred_t *credp) { xfs_trans_t *tp; @@ -239,7 +242,7 @@ xfs_rename( int committed; xfs_inode_t *inodes[4]; int target_ip_dropped = 0; /* dropped target_ip link? */ - bhv_vnode_t *src_dir_vp; + vnode_t *src_dir_vp; int spaceres; int target_link_zero = 0; int num_inodes; @@ -395,29 +398,34 @@ xfs_rename( * fit before actually inserting it. */ if (spaceres == 0 && - (error = xfs_dir_canenter(tp, target_dp, target_name, - target_namelen))) + (error = XFS_DIR_CANENTER(mp, tp, target_dp, target_name, + target_namelen))) { goto error_return; + } /* * If target does not exist and the rename crosses * directories, adjust the target directory link count * to account for the ".." reference from the new entry. */ - error = xfs_dir_createname(tp, target_dp, target_name, + error = XFS_DIR_CREATENAME(mp, tp, target_dp, target_name, target_namelen, src_ip->i_ino, &first_block, &free_list, spaceres); - if (error == ENOSPC) + if (error == ENOSPC) { goto error_return; - if (error) + } + if (error) { goto abort_return; + } xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); if (new_parent && src_is_directory) { error = xfs_bumplink(tp, target_dp); - if (error) + if (error) { goto abort_return; + } } } else { /* target_ip != NULL */ + /* * If target exists and it's a directory, check that both * target and source are directories and that target can be @@ -427,7 +435,7 @@ xfs_rename( /* * Make sure target dir is empty. */ - if (!(xfs_dir_isempty(target_ip)) || + if (!(XFS_DIR_ISEMPTY(target_ip->i_mount, target_ip)) || (target_ip->i_d.di_nlink > 2)) { error = XFS_ERROR(EEXIST); goto error_return; @@ -443,11 +451,12 @@ xfs_rename( * In case there is already an entry with the same * name at the destination directory, remove it first. */ - error = xfs_dir_replace(tp, target_dp, target_name, - target_namelen, src_ip->i_ino, - &first_block, &free_list, spaceres); - if (error) + error = XFS_DIR_REPLACE(mp, tp, target_dp, target_name, + target_namelen, src_ip->i_ino, &first_block, + &free_list, spaceres); + if (error) { goto abort_return; + } xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); /* @@ -455,8 +464,9 @@ xfs_rename( * dir no longer points to it. */ error = xfs_droplink(tp, target_ip); - if (error) + if (error) { goto abort_return; + } target_ip_dropped = 1; if (src_is_directory) { @@ -464,8 +474,9 @@ xfs_rename( * Drop the link from the old "." entry. */ error = xfs_droplink(tp, target_ip); - if (error) + if (error) { goto abort_return; + } } /* Do this test while we still hold the locks */ @@ -477,15 +488,18 @@ xfs_rename( * Remove the source. */ if (new_parent && src_is_directory) { + /* * Rewrite the ".." entry to point to the new * directory. */ - error = xfs_dir_replace(tp, src_ip, "..", 2, target_dp->i_ino, - &first_block, &free_list, spaceres); + error = XFS_DIR_REPLACE(mp, tp, src_ip, "..", 2, + target_dp->i_ino, &first_block, + &free_list, spaceres); ASSERT(error != EEXIST); - if (error) + if (error) { goto abort_return; + } xfs_ichgtime(src_ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); } else { @@ -513,14 +527,16 @@ xfs_rename( * entry that's moved no longer points to it. */ error = xfs_droplink(tp, src_dp); - if (error) + if (error) { goto abort_return; + } } - error = xfs_dir_removename(tp, src_dp, src_name, src_namelen, + error = XFS_DIR_REMOVENAME(mp, tp, src_dp, src_name, src_namelen, src_ip->i_ino, &first_block, &free_list, spaceres); - if (error) + if (error) { goto abort_return; + } xfs_ichgtime(src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); /* @@ -593,7 +609,7 @@ xfs_rename( * Let interposed file systems know about removed links. */ if (target_ip_dropped) { - bhv_vop_link_removed(XFS_ITOV(target_ip), target_dir_vp, + VOP_LINK_REMOVED(XFS_ITOV(target_ip), target_dir_vp, target_link_zero); IRELE(target_ip); } diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 5a0b67895..5b413946b 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -139,7 +141,7 @@ xfs_growfs_rt_alloc( cancelflags |= XFS_TRANS_ABORT; error = xfs_bmapi(tp, ip, oblocks, nblocks - oblocks, XFS_BMAPI_WRITE | XFS_BMAPI_METADATA, &firstblock, - resblks, &map, &nmap, &flist, NULL); + resblks, &map, &nmap, &flist); if (!error && nmap < 1) error = XFS_ERROR(ENOSPC); if (error) @@ -1929,7 +1931,7 @@ xfs_growfs_rt( /* * Initial error checking. */ - if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL || + if (mp->m_rtdev_targp || mp->m_rbmip == NULL || (nrblocks = in->newblocks) <= sbp->sb_rblocks || (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize))) return XFS_ERROR(EINVAL); @@ -2402,10 +2404,10 @@ xfs_rtprint_range( { xfs_extlen_t i; /* block number in the extent */ - cmn_err(CE_DEBUG, "%Ld: ", (long long)start); + printk("%Ld: ", (long long)start); for (i = 0; i < len; i++) - cmn_err(CE_DEBUG, "%d", xfs_rtcheck_bit(mp, tp, start + i, 1)); - cmn_err(CE_DEBUG, "\n"); + printk("%d", xfs_rtcheck_bit(mp, tp, start + i, 1)); + printk("\n"); } /* @@ -2429,17 +2431,17 @@ xfs_rtprint_summary( (void)xfs_rtget_summary(mp, tp, l, i, &sumbp, &sb, &c); if (c) { if (!p) { - cmn_err(CE_DEBUG, "%Ld-%Ld:", 1LL << l, + printk("%Ld-%Ld:", 1LL << l, XFS_RTMIN((1LL << l) + ((1LL << l) - 1LL), mp->m_sb.sb_rextents)); p = 1; } - cmn_err(CE_DEBUG, " %Ld:%d", (long long)i, c); + printk(" %Ld:%d", (long long)i, c); } } if (p) - cmn_err(CE_DEBUG, "\n"); + printk("\n"); } if (sumbp) xfs_trans_brelse(tp, sumbp); diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c index defb2feba..a59c102cf 100644 --- a/fs/xfs/xfs_rw.c +++ b/fs/xfs/xfs_rw.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -89,90 +91,6 @@ xfs_write_clear_setuid( return 0; } -/* - * Handle logging requirements of various synchronous types of write. - */ -int -xfs_write_sync_logforce( - xfs_mount_t *mp, - xfs_inode_t *ip) -{ - int error = 0; - - /* - * If we're treating this as O_DSYNC and we have not updated the - * size, force the log. - */ - if (!(mp->m_flags & XFS_MOUNT_OSYNCISOSYNC) && - !(ip->i_update_size)) { - xfs_inode_log_item_t *iip = ip->i_itemp; - - /* - * If an allocation transaction occurred - * without extending the size, then we have to force - * the log up the proper point to ensure that the - * allocation is permanent. We can't count on - * the fact that buffered writes lock out direct I/O - * writes - the direct I/O write could have extended - * the size nontransactionally, then finished before - * we started. xfs_write_file will think that the file - * didn't grow but the update isn't safe unless the - * size change is logged. - * - * Force the log if we've committed a transaction - * against the inode or if someone else has and - * the commit record hasn't gone to disk (e.g. - * the inode is pinned). This guarantees that - * all changes affecting the inode are permanent - * when we return. - */ - if (iip && iip->ili_last_lsn) { - xfs_log_force(mp, iip->ili_last_lsn, - XFS_LOG_FORCE | XFS_LOG_SYNC); - } else if (xfs_ipincount(ip) > 0) { - xfs_log_force(mp, (xfs_lsn_t)0, - XFS_LOG_FORCE | XFS_LOG_SYNC); - } - - } else { - xfs_trans_t *tp; - - /* - * O_SYNC or O_DSYNC _with_ a size update are handled - * the same way. - * - * If the write was synchronous then we need to make - * sure that the inode modification time is permanent. - * We'll have updated the timestamp above, so here - * we use a synchronous transaction to log the inode. - * It's not fast, but it's necessary. - * - * If this a dsync write and the size got changed - * non-transactionally, then we need to ensure that - * the size change gets logged in a synchronous - * transaction. - */ - tp = xfs_trans_alloc(mp, XFS_TRANS_WRITE_SYNC); - if ((error = xfs_trans_reserve(tp, 0, - XFS_SWRITE_LOG_RES(mp), - 0, 0, 0))) { - /* Transaction reserve failed */ - xfs_trans_cancel(tp, 0); - } else { - /* Transaction reserve successful */ - xfs_ilock(ip, XFS_ILOCK_EXCL); - xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); - xfs_trans_ihold(tp, ip); - xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); - xfs_trans_set_sync(tp); - error = xfs_trans_commit(tp, 0, NULL); - xfs_iunlock(ip, XFS_ILOCK_EXCL); - } - } - - return error; -} - /* * Force a shutdown of the filesystem instantly while keeping * the filesystem consistent. We don't do an unmount here; just shutdown @@ -191,12 +109,12 @@ xfs_do_force_shutdown( xfs_mount_t *mp; mp = XFS_BHVTOM(bdp); - logerror = flags & SHUTDOWN_LOG_IO_ERROR; + logerror = flags & XFS_LOG_IO_ERROR; - if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { - cmn_err(CE_NOTE, "xfs_force_shutdown(%s,0x%x) called from " - "line %d of file %s. Return address = 0x%p", - mp->m_fsname, flags, lnnum, fname, __return_address); + if (!(flags & XFS_FORCE_UMOUNT)) { + cmn_err(CE_NOTE, + "xfs_force_shutdown(%s,0x%x) called from line %d of file %s. Return address = 0x%p", + mp->m_fsname,flags,lnnum,fname,__return_address); } /* * No need to duplicate efforts. @@ -207,37 +125,33 @@ xfs_do_force_shutdown( /* * This flags XFS_MOUNT_FS_SHUTDOWN, makes sure that we don't * queue up anybody new on the log reservations, and wakes up - * everybody who's sleeping on log reservations to tell them - * the bad news. + * everybody who's sleeping on log reservations and tells + * them the bad news. */ if (xfs_log_force_umount(mp, logerror)) return; - if (flags & SHUTDOWN_CORRUPT_INCORE) { + if (flags & XFS_CORRUPT_INCORE) { xfs_cmn_err(XFS_PTAG_SHUTDOWN_CORRUPT, CE_ALERT, mp, "Corruption of in-memory data detected. Shutting down filesystem: %s", mp->m_fsname); if (XFS_ERRLEVEL_HIGH <= xfs_error_level) { xfs_stack_trace(); } - } else if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { + } else if (!(flags & XFS_FORCE_UMOUNT)) { if (logerror) { xfs_cmn_err(XFS_PTAG_SHUTDOWN_LOGERROR, CE_ALERT, mp, - "Log I/O Error Detected. Shutting down filesystem: %s", - mp->m_fsname); - } else if (flags & SHUTDOWN_DEVICE_REQ) { - xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp, - "All device paths lost. Shutting down filesystem: %s", + "Log I/O Error Detected. Shutting down filesystem: %s", mp->m_fsname); - } else if (!(flags & SHUTDOWN_REMOTE_REQ)) { + } else if (!(flags & XFS_SHUTDOWN_REMOTE_REQ)) { xfs_cmn_err(XFS_PTAG_SHUTDOWN_IOERROR, CE_ALERT, mp, - "I/O Error Detected. Shutting down filesystem: %s", + "I/O Error Detected. Shutting down filesystem: %s", mp->m_fsname); } } - if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { - cmn_err(CE_ALERT, "Please umount the filesystem, " - "and rectify the problem(s)"); + if (!(flags & XFS_FORCE_UMOUNT)) { + cmn_err(CE_ALERT, + "Please umount the filesystem, and rectify the problem(s)"); } } @@ -421,7 +335,7 @@ xfs_bwrite( * from bwrite and we could be tracing a buffer that has * been reused. */ - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); + xfs_force_shutdown(mp, XFS_METADATA_IO_ERROR); } return (error); } diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index 188b296ff..e63795644 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -75,7 +75,6 @@ xfs_fsb_to_db_io(struct xfs_iocore *io, xfs_fsblock_t fsb) * Prototypes for functions in xfs_rw.c. */ extern int xfs_write_clear_setuid(struct xfs_inode *ip); -extern int xfs_write_sync_logforce(struct xfs_mount *mp, struct xfs_inode *ip); extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp); extern int xfs_bioerror(struct xfs_buf *bp); extern int xfs_bioerror_relse(struct xfs_buf *bp); @@ -88,10 +87,9 @@ extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp, /* * Prototypes for functions in xfs_vnodeops.c. */ -extern int xfs_rwlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock); -extern void xfs_rwunlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock); -extern int xfs_setattr(bhv_desc_t *, bhv_vattr_t *vap, int flags, - cred_t *credp); +extern int xfs_rwlock(bhv_desc_t *bdp, vrwlock_t write_lock); +extern void xfs_rwunlock(bhv_desc_t *bdp, vrwlock_t write_lock); +extern int xfs_setattr(bhv_desc_t *bdp, vattr_t *vap, int flags, cred_t *credp); extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf, xfs_off_t offset, cred_t *credp, int flags); extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state, diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index ee2721e0d..8d056cef5 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -32,6 +33,7 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -234,8 +236,11 @@ xfs_trans_alloc( xfs_mount_t *mp, uint type) { - vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS); - return _xfs_trans_alloc(mp, type); + fs_check_frozen(XFS_MTOVFS(mp), SB_FREEZE_TRANS); + atomic_inc(&mp->m_active_trans); + + return (_xfs_trans_alloc(mp, type)); + } xfs_trans_t * @@ -245,9 +250,12 @@ _xfs_trans_alloc( { xfs_trans_t *tp; - atomic_inc(&mp->m_active_trans); - + ASSERT(xfs_trans_zone != NULL); tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); + + /* + * Initialize the transaction structure. + */ tp->t_magic = XFS_TRANS_MAGIC; tp->t_type = type; tp->t_mountp = mp; @@ -255,7 +263,8 @@ _xfs_trans_alloc( tp->t_busy_free = XFS_LBC_NUM_SLOTS; XFS_LIC_INIT(&(tp->t_items)); XFS_LBC_INIT(&(tp->t_busy)); - return tp; + + return (tp); } /* @@ -294,7 +303,7 @@ xfs_trans_dup( tp->t_blk_res = tp->t_blk_res_used; ntp->t_rtx_res = tp->t_rtx_res - tp->t_rtx_res_used; tp->t_rtx_res = tp->t_rtx_res_used; - ntp->t_pflags = tp->t_pflags; + PFLAGS_DUP(&tp->t_pflags, &ntp->t_pflags); XFS_TRANS_DUP_DQINFO(tp->t_mountp, tp, ntp); @@ -326,11 +335,14 @@ xfs_trans_reserve( uint logcount) { int log_flags; - int error = 0; - int rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0; + int error; + int rsvd; + + error = 0; + rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0; /* Mark this thread as being in a transaction */ - current_set_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_SET_FSTRANS(&tp->t_pflags); /* * Attempt to reserve the needed disk blocks by decrementing @@ -341,7 +353,7 @@ xfs_trans_reserve( error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FDBLOCKS, -blocks, rsvd); if (error != 0) { - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); return (XFS_ERROR(ENOSPC)); } tp->t_blk_res += blocks; @@ -414,9 +426,9 @@ undo_blocks: tp->t_blk_res = 0; } - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); - return error; + return (error); } @@ -807,7 +819,7 @@ shut_us_down: if (commit_lsn == -1 && !shutdown) shutdown = XFS_ERROR(EIO); } - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); xfs_trans_free_items(tp, shutdown? XFS_TRANS_ABORT : 0); xfs_trans_free_busy(tp); xfs_trans_free(tp); @@ -834,7 +846,7 @@ shut_us_down: */ nvec = xfs_trans_count_vecs(tp); if (nvec == 0) { - xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR); + xfs_force_shutdown(mp, XFS_LOG_IO_ERROR); goto shut_us_down; } else if (nvec <= XFS_TRANS_LOGVEC_COUNT) { log_vector = log_vector_fast; @@ -872,7 +884,7 @@ shut_us_down: * had pinned, clean up, free trans structure, and return error. */ if (error || commit_lsn == -1) { - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); xfs_trans_uncommit(tp, flags|XFS_TRANS_ABORT); return XFS_ERROR(EIO); } @@ -914,7 +926,7 @@ shut_us_down: /* * Mark this thread as no longer being in a transaction */ - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); /* * Once all the items of the transaction have been copied @@ -1136,7 +1148,7 @@ xfs_trans_cancel( */ if ((tp->t_flags & XFS_TRANS_DIRTY) && !XFS_FORCED_SHUTDOWN(mp)) { XFS_ERROR_REPORT("xfs_trans_cancel", XFS_ERRLEVEL_LOW, mp); - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); } #ifdef DEBUG if (!(flags & XFS_TRANS_ABORT)) { @@ -1170,7 +1182,7 @@ xfs_trans_cancel( } /* mark this thread as no longer being in a transaction */ - current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); + PFLAGS_RESTORE_FSTRANS(&tp->t_pflags); xfs_trans_free_items(tp, flags); xfs_trans_free_busy(tp); diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 9dc88b380..100d9a4b3 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h @@ -338,6 +338,8 @@ typedef void (*xfs_trans_callback_t)(struct xfs_trans *, void *); typedef struct xfs_trans { unsigned int t_magic; /* magic number */ xfs_log_callback_t t_logcb; /* log callback struct */ + struct xfs_trans *t_forw; /* async list pointers */ + struct xfs_trans *t_back; /* async list pointers */ unsigned int t_type; /* transaction type */ unsigned int t_log_res; /* amt of log space resvd */ unsigned int t_log_count; /* count for perm log res */ @@ -362,11 +364,9 @@ typedef struct xfs_trans { long t_res_fdblocks_delta; /* on-disk only chg */ long t_frextents_delta;/* superblock freextents chg*/ long t_res_frextents_delta; /* on-disk only chg */ -#ifdef DEBUG long t_ag_freeblks_delta; /* debugging counter */ long t_ag_flist_delta; /* debugging counter */ long t_ag_btree_delta; /* debugging counter */ -#endif long t_dblocks_delta;/* superblock dblocks change */ long t_agcount_delta;/* superblock agcount change */ long t_imaxpct_delta;/* superblock imaxpct change */ @@ -805,9 +805,12 @@ typedef struct xfs_trans { ((mp)->m_sb.sb_inodesize + \ (mp)->m_sb.sb_sectsize * 2 + \ (mp)->m_dirblksize + \ - XFS_FSB_TO_B(mp, (XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK) + 1)) + \ + (XFS_DIR_IS_V1(mp) ? 0 : \ + XFS_FSB_TO_B(mp, (XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK) + 1))) + \ XFS_ALLOCFREE_LOG_RES(mp, 1) + \ - (128 * (4 + (XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK) + 1) + \ + (128 * (4 + \ + (XFS_DIR_IS_V1(mp) ? 0 : \ + XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK) + 1) + \ XFS_ALLOCFREE_LOG_COUNT(mp, 1)))) #define XFS_ADDAFORK_LOG_RES(mp) ((mp)->m_reservations.tr_addafork) diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index 558c87ff0..19ab24af1 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" @@ -362,10 +363,9 @@ xfs_trans_delete_ail( AIL_UNLOCK(mp, s); else { xfs_cmn_err(XFS_PTAG_AILDELETE, CE_ALERT, mp, - "%s: attempting to delete a log item that is not in the AIL", - __FUNCTION__); + "xfs_trans_delete_ail: attempting to delete a log item that is not in the AIL"); AIL_UNLOCK(mp, s); - xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); + xfs_force_shutdown(mp, XFS_CORRUPT_INCORE); } } } diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 60b6b8980..c74c31ebc 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -318,7 +320,7 @@ xfs_trans_read_buf( if (xfs_error_target == target) { if (((xfs_req_num++) % xfs_error_mod) == 0) { xfs_buf_relse(bp); - cmn_err(CE_DEBUG, "Returning error!\n"); + printk("Returning error!\n"); return XFS_ERROR(EIO); } } @@ -367,7 +369,7 @@ xfs_trans_read_buf( */ if (tp->t_flags & XFS_TRANS_DIRTY) xfs_force_shutdown(tp->t_mountp, - SHUTDOWN_META_IO_ERROR); + XFS_METADATA_IO_ERROR); return error; } } @@ -412,7 +414,7 @@ xfs_trans_read_buf( xfs_ioerror_alert("xfs_trans_read_buf", mp, bp, blkno); if (tp->t_flags & XFS_TRANS_DIRTY) - xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR); + xfs_force_shutdown(tp->t_mountp, XFS_METADATA_IO_ERROR); xfs_buf_relse(bp); return error; } @@ -421,9 +423,9 @@ xfs_trans_read_buf( if (xfs_error_target == target) { if (((xfs_req_num++) % xfs_error_mod) == 0) { xfs_force_shutdown(tp->t_mountp, - SHUTDOWN_META_IO_ERROR); + XFS_METADATA_IO_ERROR); xfs_buf_relse(bp); - cmn_err(CE_DEBUG, "Returning trans error!\n"); + printk("Returning error in trans!\n"); return XFS_ERROR(EIO); } } diff --git a/fs/xfs/xfs_trans_extfree.c b/fs/xfs/xfs_trans_extfree.c index b290270dd..7d7d627f2 100644 --- a/fs/xfs/xfs_trans_extfree.c +++ b/fs/xfs/xfs_trans_extfree.c @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_dir.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index b8db1d5cd..7c5894d59 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c @@ -24,12 +24,14 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" diff --git a/fs/xfs/xfs_trans_item.c b/fs/xfs/xfs_trans_item.c index 2912aac07..1117d600d 100644 --- a/fs/xfs/xfs_trans_item.c +++ b/fs/xfs/xfs_trans_item.c @@ -493,7 +493,7 @@ xfs_trans_add_busy(xfs_trans_t *tp, xfs_agnumber_t ag, xfs_extlen_t idx) break; } else { /* out-of-order vacancy */ - cmn_err(CE_DEBUG, "OOO vacancy lbcp 0x%p\n", lbcp); + printk("OOO vacancy lbcp 0x%p\n", lbcp); ASSERT(0); } } diff --git a/fs/xfs/xfs_trans_space.h b/fs/xfs/xfs_trans_space.h index 4ea2e5074..7fe3792b1 100644 --- a/fs/xfs/xfs_trans_space.h +++ b/fs/xfs/xfs_trans_space.h @@ -30,7 +30,8 @@ XFS_EXTENTADD_SPACE_RES(mp,w)) #define XFS_DAENTER_1B(mp,w) ((w) == XFS_DATA_FORK ? (mp)->m_dirblkfsbs : 1) #define XFS_DAENTER_DBS(mp,w) \ - (XFS_DA_NODE_MAXDEPTH + (((w) == XFS_DATA_FORK) ? 2 : 0)) + (XFS_DA_NODE_MAXDEPTH + \ + ((XFS_DIR_IS_V2(mp) && (w) == XFS_DATA_FORK) ? 2 : 0)) #define XFS_DAENTER_BLOCKS(mp,w) \ (XFS_DAENTER_1B(mp,w) * XFS_DAENTER_DBS(mp,w)) #define XFS_DAENTER_BMAP1B(mp,w) \ @@ -40,7 +41,10 @@ #define XFS_DAENTER_SPACE_RES(mp,w) \ (XFS_DAENTER_BLOCKS(mp,w) + XFS_DAENTER_BMAPS(mp,w)) #define XFS_DAREMOVE_SPACE_RES(mp,w) XFS_DAENTER_BMAPS(mp,w) -#define XFS_DIRENTER_MAX_SPLIT(mp,nl) 1 +#define XFS_DIRENTER_MAX_SPLIT(mp,nl) \ + (((mp)->m_sb.sb_blocksize == 512 && \ + XFS_DIR_IS_V1(mp) && \ + (nl) >= XFS_DIR_LEAF_CAN_DOUBLE_SPLIT_LEN) ? 2 : 1) #define XFS_DIRENTER_SPACE_RES(mp,nl) \ (XFS_DAENTER_SPACE_RES(mp, XFS_DATA_FORK) * \ XFS_DIRENTER_MAX_SPLIT(mp,nl)) @@ -53,7 +57,8 @@ * Space reservation values for various transactions. */ #define XFS_ADDAFORK_SPACE_RES(mp) \ - ((mp)->m_dirblkfsbs + XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK)) + ((mp)->m_dirblkfsbs + \ + (XFS_DIR_IS_V1(mp) ? 0 : XFS_DAENTER_BMAP1B(mp, XFS_DATA_FORK))) #define XFS_ATTRRM_SPACE_RES(mp) \ XFS_DAREMOVE_SPACE_RES(mp, XFS_ATTR_FORK) /* This macro is not used - see inline code in xfs_attr_set */ diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 9014d7e44..34654ec6a 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c @@ -24,10 +24,12 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -49,10 +51,10 @@ */ int xfs_get_dir_entry( - bhv_vname_t *dentry, + vname_t *dentry, xfs_inode_t **ipp) { - bhv_vnode_t *vp; + vnode_t *vp; vp = VNAME_TO_VNODE(dentry); @@ -67,11 +69,11 @@ int xfs_dir_lookup_int( bhv_desc_t *dir_bdp, uint lock_mode, - bhv_vname_t *dentry, + vname_t *dentry, xfs_ino_t *inum, xfs_inode_t **ipp) { - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; xfs_inode_t *dp; int error; @@ -80,7 +82,8 @@ xfs_dir_lookup_int( dp = XFS_BHVTOI(dir_bdp); - error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); + error = XFS_DIR_LOOKUP(dp->i_mount, NULL, dp, + VNAME(dentry), VNAMELEN(dentry), inum); if (!error) { /* * Unlock the directory. We do this because we can't diff --git a/fs/xfs/xfs_utils.h b/fs/xfs/xfs_utils.h index fe953e98a..472661a3b 100644 --- a/fs/xfs/xfs_utils.h +++ b/fs/xfs/xfs_utils.h @@ -23,10 +23,9 @@ #define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ (inst_t *)__return_address) -extern int xfs_rename (bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *, - bhv_vname_t *, cred_t *); -extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); -extern int xfs_dir_lookup_int (bhv_desc_t *, uint, bhv_vname_t *, xfs_ino_t *, +extern int xfs_rename (bhv_desc_t *, vname_t *, vnode_t *, vname_t *, cred_t *); +extern int xfs_get_dir_entry (vname_t *, xfs_inode_t **); +extern int xfs_dir_lookup_int (bhv_desc_t *, uint, vname_t *, xfs_ino_t *, xfs_inode_t **); extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *); extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t, diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index ec8787d3c..0cbe00591 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -24,6 +24,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -31,6 +32,7 @@ #include "xfs_bmap_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_alloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" @@ -129,6 +131,9 @@ xfs_init(void) #ifdef XFS_BMBT_TRACE xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_SLEEP); #endif +#ifdef XFS_DIR_TRACE + xfs_dir_trace_buf = ktrace_alloc(XFS_DIR_TRACE_SIZE, KM_SLEEP); +#endif #ifdef XFS_ATTR_TRACE xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_SLEEP); #endif @@ -172,6 +177,9 @@ xfs_cleanup(void) #ifdef XFS_ATTR_TRACE ktrace_free(xfs_attr_trace_buf); #endif +#ifdef XFS_DIR_TRACE + ktrace_free(xfs_dir_trace_buf); +#endif #ifdef XFS_BMBT_TRACE ktrace_free(xfs_bmbt_trace_buf); #endif @@ -204,7 +212,7 @@ xfs_cleanup(void) */ STATIC int xfs_start_flags( - struct bhv_vfs *vfs, + struct vfs *vfs, struct xfs_mount_args *ap, struct xfs_mount *mp) { @@ -331,7 +339,7 @@ xfs_start_flags( */ STATIC int xfs_finish_flags( - struct bhv_vfs *vfs, + struct vfs *vfs, struct xfs_mount_args *ap, struct xfs_mount *mp) { @@ -419,7 +427,7 @@ xfs_mount( struct xfs_mount_args *args, cred_t *credp) { - struct bhv_vfs *vfsp = bhvtovfs(bhvp); + struct vfs *vfsp = bhvtovfs(bhvp); struct bhv_desc *p; struct xfs_mount *mp = XFS_BHVTOM(bhvp); struct block_device *ddev, *logdev, *rtdev; @@ -519,7 +527,7 @@ xfs_mount( if (error) goto error2; - if (mp->m_flags & XFS_MOUNT_BARRIER) + if ((mp->m_flags & XFS_MOUNT_BARRIER) && !(vfsp->vfs_flag & VFS_RDONLY)) xfs_mountfs_check_barriers(mp); error = XFS_IOINIT(vfsp, args, flags); @@ -548,10 +556,10 @@ xfs_unmount( int flags, cred_t *credp) { - bhv_vfs_t *vfsp = bhvtovfs(bdp); + struct vfs *vfsp = bhvtovfs(bdp); xfs_mount_t *mp = XFS_BHVTOM(bdp); xfs_inode_t *rip; - bhv_vnode_t *rvp; + vnode_t *rvp; int unmount_event_wanted = 0; int unmount_event_flags = 0; int xfs_unmountfs_needed = 0; @@ -661,8 +669,9 @@ xfs_mntupdate( int *flags, struct xfs_mount_args *args) { - bhv_vfs_t *vfsp = bhvtovfs(bdp); + struct vfs *vfsp = bhvtovfs(bdp); xfs_mount_t *mp = XFS_BHVTOM(bdp); + int error; if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ if (vfsp->vfs_flag & VFS_RDONLY) @@ -674,7 +683,7 @@ xfs_mntupdate( mp->m_flags &= ~XFS_MOUNT_BARRIER; } } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ - bhv_vfs_sync(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL); + VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL, error); xfs_quiesce_fs(mp); xfs_log_unmount_write(mp); xfs_unmountfs_writesb(mp); @@ -697,7 +706,7 @@ xfs_unmount_flush( xfs_inode_t *rip = mp->m_rootip; xfs_inode_t *rbmip; xfs_inode_t *rsumip = NULL; - bhv_vnode_t *rvp = XFS_ITOV(rip); + vnode_t *rvp = XFS_ITOV(rip); int error; xfs_ilock(rip, XFS_ILOCK_EXCL); @@ -776,9 +785,9 @@ fscorrupt_out2: STATIC int xfs_root( bhv_desc_t *bdp, - bhv_vnode_t **vpp) + vnode_t **vpp) { - bhv_vnode_t *vp; + vnode_t *vp; vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); VN_HOLD(vp); @@ -796,8 +805,8 @@ xfs_root( STATIC int xfs_statvfs( bhv_desc_t *bdp, - bhv_statvfs_t *statp, - bhv_vnode_t *vp) + xfs_statfs_t *statp, + vnode_t *vp) { __uint64_t fakeinos; xfs_extlen_t lsize; @@ -815,8 +824,7 @@ xfs_statvfs( statp->f_bsize = sbp->sb_blocksize; lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0; statp->f_blocks = sbp->sb_dblocks - lsize; - statp->f_bfree = statp->f_bavail = - sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); + statp->f_bfree = statp->f_bavail = sbp->sb_fdblocks; fakeinos = statp->f_bfree << sbp->sb_inopblog; #if XFS_BIG_INUMS fakeinos += mp->m_inoadd; @@ -896,7 +904,7 @@ xfs_sync( /* * xfs sync routine for internal use * - * This routine supports all of the flags defined for the generic vfs_sync + * This routine supports all of the flags defined for the generic VFS_SYNC * interface as explained above under xfs_sync. In the interests of not * changing interfaces within the 6.5 family, additional internally- * required functions are specified within a separate xflags parameter, @@ -913,7 +921,7 @@ xfs_sync_inodes( xfs_inode_t *ip = NULL; xfs_inode_t *ip_next; xfs_buf_t *bp; - bhv_vnode_t *vp = NULL; + vnode_t *vp = NULL; int error; int last_error; uint64_t fflag; @@ -1152,9 +1160,9 @@ xfs_sync_inodes( xfs_iunlock(ip, XFS_ILOCK_SHARED); if (XFS_FORCED_SHUTDOWN(mp)) { - bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); + VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF); } else { - bhv_vop_flushinval_pages(vp, 0, -1, FI_REMAPF); + VOP_FLUSHINVAL_PAGES(vp, 0, -1, FI_REMAPF); } xfs_ilock(ip, XFS_ILOCK_SHARED); @@ -1174,8 +1182,8 @@ xfs_sync_inodes( * across calls to the buffer cache. */ xfs_iunlock(ip, XFS_ILOCK_SHARED); - error = bhv_vop_flush_pages(vp, (xfs_off_t)0, - -1, fflag, FI_NONE); + VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, + fflag, FI_NONE, error); xfs_ilock(ip, XFS_ILOCK_SHARED); } @@ -1227,7 +1235,9 @@ xfs_sync_inodes( * marker and free it. */ XFS_MOUNT_ILOCK(mp); + IPOINTER_REMOVE(ip, mp); + XFS_MOUNT_IUNLOCK(mp); ASSERT(!(lock_flags & @@ -1415,7 +1425,7 @@ xfs_sync_inodes( /* * xfs sync routine for internal use * - * This routine supports all of the flags defined for the generic vfs_sync + * This routine supports all of the flags defined for the generic VFS_SYNC * interface as explained above under xfs_sync. In the interests of not * changing interfaces within the 6.5 family, additional internally- * required functions are specified within a separate xflags parameter, @@ -1568,7 +1578,7 @@ xfs_syncsub( STATIC int xfs_vget( bhv_desc_t *bdp, - bhv_vnode_t **vpp, + vnode_t **vpp, fid_t *fidp) { xfs_mount_t *mp = XFS_BHVTOM(bdp); @@ -1652,10 +1662,10 @@ xfs_vget( #define MNTOPT_TAGXID "tagxid" /* context xid tagging for inodes */ STATIC unsigned long -suffix_strtoul(char *s, char **endp, unsigned int base) +suffix_strtoul(const char *cp, char **endp, unsigned int base) { int last, shift_left_factor = 0; - char *value = s; + char *value = (char *)cp; last = strlen(value) - 1; if (value[last] == 'K' || value[last] == 'k') { @@ -1671,7 +1681,7 @@ suffix_strtoul(char *s, char **endp, unsigned int base) value[last] = '\0'; } - return simple_strtoul((const char *)s, endp, base) << shift_left_factor; + return simple_strtoul(cp, endp, base) << shift_left_factor; } STATIC int @@ -1681,7 +1691,7 @@ xfs_parseargs( struct xfs_mount_args *args, int update) { - bhv_vfs_t *vfsp = bhvtovfs(bhv); + struct vfs *vfsp = bhvtovfs(bhv); char *this_char, *value, *eov; int dsunit, dswidth, vol_dsunit, vol_dswidth; int iosize; @@ -1703,48 +1713,42 @@ xfs_parseargs( if (!strcmp(this_char, MNTOPT_LOGBUFS)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } args->logbufs = simple_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_LOGBSIZE)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } args->logbufsize = suffix_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_LOGDEV)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } strncpy(args->logname, value, MAXNAMELEN); } else if (!strcmp(this_char, MNTOPT_MTPT)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } strncpy(args->mtpt, value, MAXNAMELEN); } else if (!strcmp(this_char, MNTOPT_RTDEV)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } strncpy(args->rtname, value, MAXNAMELEN); } else if (!strcmp(this_char, MNTOPT_BIOSIZE)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } @@ -1753,8 +1757,7 @@ xfs_parseargs( args->iosizelog = (uint8_t) iosize; } else if (!strcmp(this_char, MNTOPT_ALLOCSIZE)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } @@ -1763,8 +1766,7 @@ xfs_parseargs( args->iosizelog = ffs(iosize) - 1; } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } @@ -1785,8 +1787,7 @@ xfs_parseargs( } else if (!strcmp(this_char, MNTOPT_INO64)) { args->flags |= XFSMNT_INO64; #if !XFS_BIG_INUMS - cmn_err(CE_WARN, - "XFS: %s option not allowed on this system", + printk("XFS: %s option not allowed on this system\n", this_char); return EINVAL; #endif @@ -1796,16 +1797,14 @@ xfs_parseargs( args->flags |= XFSMNT_SWALLOC; } else if (!strcmp(this_char, MNTOPT_SUNIT)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } dsunit = simple_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_SWIDTH)) { if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", + printk("XFS: %s option requires an argument\n", this_char); return EINVAL; } @@ -1813,8 +1812,7 @@ xfs_parseargs( } else if (!strcmp(this_char, MNTOPT_64BITINODE)) { args->flags &= ~XFSMNT_32BITINODES; #if !XFS_BIG_INUMS - cmn_err(CE_WARN, - "XFS: %s option not allowed on this system", + printk("XFS: %s option not allowed on this system\n", this_char); return EINVAL; #endif @@ -1842,41 +1840,36 @@ xfs_parseargs( #endif } else if (!strcmp(this_char, "osyncisdsync")) { /* no-op, this is now the default */ - cmn_err(CE_WARN, - "XFS: osyncisdsync is now the default, option is deprecated."); +printk("XFS: osyncisdsync is now the default, option is deprecated.\n"); } else if (!strcmp(this_char, "irixsgid")) { - cmn_err(CE_WARN, - "XFS: irixsgid is now a sysctl(2) variable, option is deprecated."); +printk("XFS: irixsgid is now a sysctl(2) variable, option is deprecated.\n"); } else { - cmn_err(CE_WARN, - "XFS: unknown mount option [%s].", this_char); + printk("XFS: unknown mount option [%s].\n", this_char); return EINVAL; } } if (args->flags & XFSMNT_NORECOVERY) { if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { - cmn_err(CE_WARN, - "XFS: no-recovery mounts must be read-only."); + printk("XFS: no-recovery mounts must be read-only.\n"); return EINVAL; } } if ((args->flags & XFSMNT_NOALIGN) && (dsunit || dswidth)) { - cmn_err(CE_WARN, - "XFS: sunit and swidth options incompatible with the noalign option"); + printk( + "XFS: sunit and swidth options incompatible with the noalign option\n"); return EINVAL; } if ((dsunit && !dswidth) || (!dsunit && dswidth)) { - cmn_err(CE_WARN, - "XFS: sunit and swidth must be specified together"); + printk("XFS: sunit and swidth must be specified together\n"); return EINVAL; } if (dsunit && (dswidth % dsunit != 0)) { - cmn_err(CE_WARN, - "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)", + printk( + "XFS: stripe width (%d) must be a multiple of the stripe unit (%d)\n", dswidth, dsunit); return EINVAL; } @@ -1923,7 +1916,7 @@ xfs_showargs( }; struct proc_xfs_info *xfs_infop; struct xfs_mount *mp = XFS_BHVTOM(bhv); - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); + struct vfs *vfsp = XFS_MTOVFS(mp); for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { if (mp->m_flags & xfs_infop->flag) @@ -1983,7 +1976,7 @@ xfs_freeze( } -bhv_vfsops_t xfs_vfsops = { +vfsops_t xfs_vfsops = { BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), .vfs_parseargs = xfs_parseargs, .vfs_showargs = xfs_showargs, diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 7151482fc..8abbe3573 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or @@ -16,6 +16,8 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "xfs.h" #include "xfs_fs.h" #include "xfs_types.h" @@ -25,6 +27,7 @@ #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" +#include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" @@ -32,11 +35,13 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_inode_item.h" +#include "xfs_dir_leaf.h" #include "xfs_itable.h" #include "xfs_btree.h" #include "xfs_ialloc.h" @@ -53,14 +58,32 @@ #include "xfs_log_priv.h" #include "xfs_mac.h" + +/* + * The maximum pathlen is 1024 bytes. Since the minimum file system + * blocksize is 512 bytes, we can get a max of 2 extents back from + * bmapi. + */ +#define SYMLINK_MAPS 2 + +/* + * For xfs, we check that the file isn't too big to be opened by this kernel. + * No other open action is required for regular files. Devices are handled + * through the specfs file system, pipes through fifofs. Device and + * fifo vnodes are "wrapped" by specfs and fifofs vnodes, respectively, + * when a new vnode is first looked up or created. + */ STATIC int xfs_open( bhv_desc_t *bdp, cred_t *credp) { int mode; - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - xfs_inode_t *ip = XFS_BHVTOI(bdp); + vnode_t *vp; + xfs_inode_t *ip; + + vp = BHV_TO_VNODE(bdp); + ip = XFS_BHVTOI(bdp); if (XFS_FORCED_SHUTDOWN(ip->i_mount)) return XFS_ERROR(EIO); @@ -78,35 +101,6 @@ xfs_open( return 0; } -STATIC int -xfs_close( - bhv_desc_t *bdp, - int flags, - lastclose_t lastclose, - cred_t *credp) -{ - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - xfs_inode_t *ip = XFS_BHVTOI(bdp); - - if (XFS_FORCED_SHUTDOWN(ip->i_mount)) - return XFS_ERROR(EIO); - - if (lastclose != L_TRUE || !VN_ISREG(vp)) - return 0; - - /* - * If we previously truncated this file and removed old data in - * the process, we want to initiate "early" writeout on the last - * close. This is an attempt to combat the notorious NULL files - * problem which is particularly noticable from a truncate down, - * buffered (re-)write (delalloc), followed by a crash. What we - * are effectively doing here is significantly reducing the time - * window where we'd otherwise be exposed to that problem. - */ - if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) - return bhv_vop_flush_pages(vp, 0, -1, XFS_B_ASYNC, FI_NONE); - return 0; -} /* * xfs_getattr @@ -114,13 +108,13 @@ xfs_close( STATIC int xfs_getattr( bhv_desc_t *bdp, - bhv_vattr_t *vap, + vattr_t *vap, int flags, cred_t *credp) { xfs_inode_t *ip; xfs_mount_t *mp; - bhv_vnode_t *vp; + vnode_t *vp; vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -248,7 +242,7 @@ xfs_getattr( int xfs_setattr( bhv_desc_t *bdp, - bhv_vattr_t *vap, + vattr_t *vap, int flags, cred_t *credp) { @@ -263,7 +257,7 @@ xfs_setattr( gid_t gid=0, igid=0; xid_t xid=0, ixid=0; int timeflags = 0; - bhv_vnode_t *vp; + vnode_t *vp; xfs_prid_t projid=0, iprojid=0; int mandlock_before, mandlock_after; struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; @@ -356,6 +350,7 @@ xfs_setattr( */ tp = NULL; lock_flags = XFS_ILOCK_EXCL; + ASSERT(flags & ATTR_NOLOCK ? flags & ATTR_DMI : 1); if (flags & ATTR_NOLOCK) need_iolock = 0; if (!(mask & XFS_AT_SIZE)) { @@ -679,17 +674,9 @@ xfs_setattr( ((ip->i_d.di_nlink != 0 || !(mp->m_flags & XFS_MOUNT_WSYNC)) ? 1 : 0)); - if (code) + if (code) { goto abort_return; - /* - * Truncated "down", so we're removing references - * to old data here - if we now delay flushing for - * a long time, we expose ourselves unduly to the - * notorious NULL files problem. So, we mark this - * vnode and flush it when the file is closed, and - * do not wait the usual (long) time for writeout. - */ - VTRUNCATE(vp); + } } /* * Have to do this even if the file's size doesn't change. @@ -831,8 +818,6 @@ xfs_setattr( di_flags |= XFS_DIFLAG_NODUMP; if (vap->va_xflags & XFS_XFLAG_PROJINHERIT) di_flags |= XFS_DIFLAG_PROJINHERIT; - if (vap->va_xflags & XFS_XFLAG_NODEFRAG) - di_flags |= XFS_DIFLAG_NODEFRAG; if ((ip->i_d.di_mode & S_IFMT) == S_IFDIR) { if (vap->va_xflags & XFS_XFLAG_RTINHERIT) di_flags |= XFS_DIFLAG_RTINHERIT; @@ -902,7 +887,7 @@ xfs_setattr( */ mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); if (mandlock_before != mandlock_after) { - bhv_vop_vnode_change(vp, VCHANGE_FLAGS_ENF_LOCKING, + VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_ENF_LOCKING, mandlock_after); } @@ -968,13 +953,6 @@ xfs_access( } -/* - * The maximum pathlen is 1024 bytes. Since the minimum file system - * blocksize is 512 bytes, we can get a max of 2 extents back from - * bmapi. - */ -#define SYMLINK_MAPS 2 - /* * xfs_readlink * @@ -990,7 +968,7 @@ xfs_readlink( int count; xfs_off_t offset; int pathlen; - bhv_vnode_t *vp; + vnode_t *vp; int error = 0; xfs_mount_t *mp; int nmaps; @@ -1040,7 +1018,7 @@ xfs_readlink( nmaps = SYMLINK_MAPS; error = xfs_bmapi(NULL, ip, 0, XFS_B_TO_FSB(mp, pathlen), - 0, NULL, 0, mval, &nmaps, NULL, NULL); + 0, NULL, 0, mval, &nmaps, NULL); if (error) { goto error_return; @@ -1248,8 +1226,8 @@ xfs_inactive_free_eofblocks( nimaps = 1; xfs_ilock(ip, XFS_ILOCK_SHARED); - error = XFS_BMAPI(mp, NULL, &ip->i_iocore, end_fsb, map_len, 0, - NULL, 0, &imap, &nimaps, NULL, NULL); + error = xfs_bmapi(NULL, ip, end_fsb, map_len, 0, + NULL, 0, &imap, &nimaps, NULL); xfs_iunlock(ip, XFS_ILOCK_SHARED); if (!error && (nimaps != 0) && @@ -1378,7 +1356,7 @@ xfs_inactive_symlink_rmt( nmaps = ARRAY_SIZE(mval); if ((error = xfs_bmapi(tp, ip, 0, XFS_B_TO_FSB(mp, size), XFS_BMAPI_METADATA, &first_block, 0, mval, &nmaps, - &free_list, NULL))) + &free_list))) goto error0; /* * Invalidate the block(s). @@ -1393,7 +1371,7 @@ xfs_inactive_symlink_rmt( * Unmap the dead block(s) to the free_list. */ if ((error = xfs_bunmapi(tp, ip, 0, size, XFS_BMAPI_METADATA, nmaps, - &first_block, &free_list, NULL, &done))) + &first_block, &free_list, &done))) goto error1; ASSERT(done); /* @@ -1509,6 +1487,9 @@ xfs_inactive_symlink_local( return 0; } +/* + * + */ STATIC int xfs_inactive_attrs( xfs_inode_t *ip, @@ -1561,16 +1542,16 @@ xfs_release( bhv_desc_t *bdp) { xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; xfs_mount_t *mp; int error; vp = BHV_TO_VNODE(bdp); ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - if (!VN_ISREG(vp) || (ip->i_d.di_mode == 0)) + if (!VN_ISREG(vp) || (ip->i_d.di_mode == 0)) { return 0; + } /* If this is a read-only mount, don't do this (would generate I/O) */ if (vp->v_vfsp->vfs_flag & VFS_RDONLY) @@ -1582,6 +1563,8 @@ xfs_release( return 0; #endif + mp = ip->i_mount; + if (ip->i_d.di_nlink != 0) { if ((((ip->i_d.di_mode & S_IFMT) == S_IFREG) && ((ip->i_d.di_size > 0) || (VN_CACHED(vp) > 0 || @@ -1614,8 +1597,8 @@ xfs_inactive( cred_t *credp) { xfs_inode_t *ip; - bhv_vnode_t *vp; - xfs_bmap_free_t free_list; + vnode_t *vp; + xfs_bmap_free_t free_list; xfs_fsblock_t first_block; int committed; xfs_trans_t *tp; @@ -1795,7 +1778,7 @@ xfs_inactive( cmn_err(CE_NOTE, "xfs_inactive: xfs_ifree() returned an error = %d on %s", error, mp->m_fsname); - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); + xfs_force_shutdown(mp, XFS_METADATA_IO_ERROR); } xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT); } else { @@ -1830,17 +1813,17 @@ xfs_inactive( STATIC int xfs_lookup( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vnode_t **vpp, + vname_t *dentry, + vnode_t **vpp, int flags, - bhv_vnode_t *rdir, + vnode_t *rdir, cred_t *credp) { xfs_inode_t *dp, *ip; xfs_ino_t e_inum; int error; uint lock_mode; - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; dir_vp = BHV_TO_VNODE(dir_bdp); vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); @@ -1867,15 +1850,15 @@ xfs_lookup( STATIC int xfs_create( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, - bhv_vnode_t **vpp, + vname_t *dentry, + vattr_t *vap, + vnode_t **vpp, cred_t *credp) { char *name = VNAME(dentry); - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; xfs_inode_t *dp, *ip; - bhv_vnode_t *vp = NULL; + vnode_t *vp=NULL; xfs_trans_t *tp; xfs_mount_t *mp; xfs_dev_t rdev; @@ -1973,7 +1956,8 @@ xfs_create( if (error) goto error_return; - if (resblks == 0 && (error = xfs_dir_canenter(tp, dp, name, namelen))) + if (resblks == 0 && + (error = XFS_DIR_CANENTER(mp, tp, dp, name, namelen))) goto error_return; rdev = (vap->va_mask & XFS_AT_RDEV) ? vap->va_rdev : 0; error = xfs_dir_ialloc(&tp, dp, vap->va_mode, 1, @@ -2004,9 +1988,9 @@ xfs_create( xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); dp_joined_to_trans = B_TRUE; - error = xfs_dir_createname(tp, dp, name, namelen, ip->i_ino, - &first_block, &free_list, resblks ? - resblks - XFS_IALLOC_SPACE_RES(mp) : 0); + error = XFS_DIR_CREATENAME(mp, tp, dp, name, namelen, ip->i_ino, + &first_block, &free_list, + resblks ? resblks - XFS_IALLOC_SPACE_RES(mp) : 0); if (error) { ASSERT(error != ENOSPC); goto abort_return; @@ -2060,7 +2044,7 @@ xfs_create( * Propagate the fact that the vnode changed after the * xfs_inode locks have been released. */ - bhv_vop_vnode_change(vp, VCHANGE_FLAGS_TRUNCATED, 3); + VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_TRUNCATED, 3); *vpp = vp; @@ -2141,7 +2125,7 @@ int xfs_rm_attempts; STATIC int xfs_lock_dir_and_entry( xfs_inode_t *dp, - bhv_vname_t *dentry, + vname_t *dentry, xfs_inode_t *ip) /* inode of entry 'name' */ { int attempts; @@ -2355,10 +2339,10 @@ int remove_which_error_return = 0; STATIC int xfs_remove( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, + vname_t *dentry, cred_t *credp) { - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; char *name = VNAME(dentry); xfs_inode_t *dp, *ip; xfs_trans_t *tp = NULL; @@ -2482,8 +2466,8 @@ xfs_remove( * Entry must exist since we did a lookup in xfs_lock_dir_and_entry. */ XFS_BMAP_INIT(&free_list, &first_block); - error = xfs_dir_removename(tp, dp, name, namelen, ip->i_ino, - &first_block, &free_list, 0); + error = XFS_DIR_REMOVENAME(mp, tp, dp, name, namelen, ip->i_ino, + &first_block, &free_list, 0); if (error) { ASSERT(error != ENOENT); REMOVE_DEBUG_TRACE(__LINE__); @@ -2545,7 +2529,7 @@ xfs_remove( /* * Let interposed file systems know about removed links. */ - bhv_vop_link_removed(XFS_ITOV(ip), dir_vp, link_zero); + VOP_LINK_REMOVED(XFS_ITOV(ip), dir_vp, link_zero); IRELE(ip); @@ -2598,8 +2582,8 @@ xfs_remove( STATIC int xfs_link( bhv_desc_t *target_dir_bdp, - bhv_vnode_t *src_vp, - bhv_vname_t *dentry, + vnode_t *src_vp, + vname_t *dentry, cred_t *credp) { xfs_inode_t *tdp, *sip; @@ -2611,7 +2595,7 @@ xfs_link( xfs_fsblock_t first_block; int cancel_flags; int committed; - bhv_vnode_t *target_dir_vp; + vnode_t *target_dir_vp; int resblks; char *target_name = VNAME(dentry); int target_namelen; @@ -2621,7 +2605,8 @@ xfs_link( vn_trace_entry(src_vp, __FUNCTION__, (inst_t *)__return_address); target_namelen = VNAMELEN(dentry); - ASSERT(!VN_ISDIR(src_vp)); + if (VN_ISDIR(src_vp)) + return XFS_ERROR(EPERM); sip = xfs_vtoi(src_vp); tdp = XFS_BHVTOI(target_dir_bdp); @@ -2701,12 +2686,13 @@ xfs_link( } if (resblks == 0 && - (error = xfs_dir_canenter(tp, tdp, target_name, target_namelen))) + (error = XFS_DIR_CANENTER(mp, tp, tdp, target_name, + target_namelen))) goto error_return; XFS_BMAP_INIT(&free_list, &first_block); - error = xfs_dir_createname(tp, tdp, target_name, target_namelen, + error = XFS_DIR_CREATENAME(mp, tp, tdp, target_name, target_namelen, sip->i_ino, &first_block, &free_list, resblks); if (error) @@ -2716,8 +2702,9 @@ xfs_link( xfs_trans_log_inode(tp, tdp, XFS_ILOG_CORE); error = xfs_bumplink(tp, sip); - if (error) + if (error) { goto abort_return; + } /* * If this is a synchronous mount, make sure that the @@ -2735,8 +2722,9 @@ xfs_link( } error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); - if (error) + if (error) { goto std_return; + } /* Fall through to std_return with error = 0. */ std_return: @@ -2757,8 +2745,6 @@ std_return: xfs_trans_cancel(tp, cancel_flags); goto std_return; } - - /* * xfs_mkdir * @@ -2766,15 +2752,15 @@ std_return: STATIC int xfs_mkdir( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, - bhv_vnode_t **vpp, + vname_t *dentry, + vattr_t *vap, + vnode_t **vpp, cred_t *credp) { char *dir_name = VNAME(dentry); xfs_inode_t *dp; xfs_inode_t *cdp; /* inode of created dir */ - bhv_vnode_t *cvp; /* vnode of created dir */ + vnode_t *cvp; /* vnode of created dir */ xfs_trans_t *tp; xfs_mount_t *mp; int cancel_flags; @@ -2782,7 +2768,7 @@ xfs_mkdir( int committed; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; boolean_t dp_joined_to_trans; boolean_t created = B_FALSE; int dm_event_sent = 0; @@ -2872,7 +2858,7 @@ xfs_mkdir( goto error_return; if (resblks == 0 && - (error = xfs_dir_canenter(tp, dp, dir_name, dir_namelen))) + (error = XFS_DIR_CANENTER(mp, tp, dp, dir_name, dir_namelen))) goto error_return; /* * create the directory inode. @@ -2899,9 +2885,9 @@ xfs_mkdir( XFS_BMAP_INIT(&free_list, &first_block); - error = xfs_dir_createname(tp, dp, dir_name, dir_namelen, cdp->i_ino, - &first_block, &free_list, resblks ? - resblks - XFS_IALLOC_SPACE_RES(mp) : 0); + error = XFS_DIR_CREATENAME(mp, tp, dp, dir_name, dir_namelen, + cdp->i_ino, &first_block, &free_list, + resblks ? resblks - XFS_IALLOC_SPACE_RES(mp) : 0); if (error) { ASSERT(error != ENOSPC); goto error1; @@ -2915,14 +2901,16 @@ xfs_mkdir( */ dp->i_gen++; - error = xfs_dir_init(tp, cdp, dp); - if (error) + error = XFS_DIR_INIT(mp, tp, cdp, dp); + if (error) { goto error2; + } cdp->i_gen = 1; error = xfs_bumplink(tp, dp); - if (error) + if (error) { goto error2; + } cvp = XFS_ITOV(cdp); @@ -2999,7 +2987,7 @@ std_return: STATIC int xfs_rmdir( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, + vname_t *dentry, cred_t *credp) { char *name = VNAME(dentry); @@ -3012,7 +3000,7 @@ xfs_rmdir( xfs_fsblock_t first_block; int cancel_flags; int committed; - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; int dm_di_mode = 0; int last_cdp_link; int namelen; @@ -3131,15 +3119,16 @@ xfs_rmdir( error = XFS_ERROR(ENOTEMPTY); goto error_return; } - if (!xfs_dir_isempty(cdp)) { + if (!XFS_DIR_ISEMPTY(mp, cdp)) { error = XFS_ERROR(ENOTEMPTY); goto error_return; } - error = xfs_dir_removename(tp, dp, name, namelen, cdp->i_ino, - &first_block, &free_list, resblks); - if (error) + error = XFS_DIR_REMOVENAME(mp, tp, dp, name, namelen, cdp->i_ino, + &first_block, &free_list, resblks); + if (error) { goto error1; + } xfs_ichgtime(dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); @@ -3210,7 +3199,7 @@ xfs_rmdir( /* * Let interposed file systems know about removed links. */ - bhv_vop_link_removed(XFS_ITOV(cdp), dir_vp, last_cdp_link); + VOP_LINK_REMOVED(XFS_ITOV(cdp), dir_vp, last_cdp_link); IRELE(cdp); @@ -3238,6 +3227,8 @@ xfs_rmdir( /* + * xfs_readdir + * * Read dp's entries starting at uiop->uio_offset and translate them into * bufsize bytes worth of struct dirents starting at bufbase. */ @@ -3257,23 +3248,28 @@ xfs_readdir( (inst_t *)__return_address); dp = XFS_BHVTOI(dir_bdp); - if (XFS_FORCED_SHUTDOWN(dp->i_mount)) + if (XFS_FORCED_SHUTDOWN(dp->i_mount)) { return XFS_ERROR(EIO); + } lock_mode = xfs_ilock_map_shared(dp); - error = xfs_dir_getdents(tp, dp, uiop, eofp); + error = XFS_DIR_GETDENTS(dp->i_mount, tp, dp, uiop, eofp); xfs_iunlock_map_shared(dp, lock_mode); return error; } +/* + * xfs_symlink + * + */ STATIC int xfs_symlink( bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, + vname_t *dentry, + vattr_t *vap, char *target_path, - bhv_vnode_t **vpp, + vnode_t **vpp, cred_t *credp) { xfs_trans_t *tp; @@ -3285,7 +3281,7 @@ xfs_symlink( xfs_bmap_free_t free_list; xfs_fsblock_t first_block; boolean_t dp_joined_to_trans; - bhv_vnode_t *dir_vp; + vnode_t *dir_vp; uint cancel_flags; int committed; xfs_fileoff_t first_fsb; @@ -3330,7 +3326,7 @@ xfs_symlink( int len, total; char *path; - for (total = 0, path = target_path; total < pathlen;) { + for(total = 0, path = target_path; total < pathlen;) { /* * Skip any slashes. */ @@ -3424,7 +3420,7 @@ xfs_symlink( * Check for ability to enter directory entry, if no space reserved. */ if (resblks == 0 && - (error = xfs_dir_canenter(tp, dp, link_name, link_namelen))) + (error = XFS_DIR_CANENTER(mp, tp, dp, link_name, link_namelen))) goto error_return; /* * Initialize the bmap freelist prior to calling either @@ -3479,7 +3475,7 @@ xfs_symlink( error = xfs_bmapi(tp, ip, first_fsb, fs_blocks, XFS_BMAPI_WRITE | XFS_BMAPI_METADATA, &first_block, resblks, mval, &nmaps, - &free_list, NULL); + &free_list); if (error) { goto error1; } @@ -3511,10 +3507,11 @@ xfs_symlink( /* * Create the directory entry for the symlink. */ - error = xfs_dir_createname(tp, dp, link_name, link_namelen, ip->i_ino, - &first_block, &free_list, resblks); - if (error) + error = XFS_DIR_CREATENAME(mp, tp, dp, link_name, link_namelen, + ip->i_ino, &first_block, &free_list, resblks); + if (error) { goto error1; + } xfs_ichgtime(dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); @@ -3562,7 +3559,7 @@ std_return: } if (!error) { - bhv_vnode_t *vp; + vnode_t *vp; ASSERT(ip); vp = XFS_ITOV(ip); @@ -3627,10 +3624,10 @@ xfs_fid2( int xfs_rwlock( bhv_desc_t *bdp, - bhv_vrwlock_t locktype) + vrwlock_t locktype) { xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; vp = BHV_TO_VNODE(bdp); if (VN_ISDIR(vp)) @@ -3658,10 +3655,10 @@ xfs_rwlock( void xfs_rwunlock( bhv_desc_t *bdp, - bhv_vrwlock_t locktype) + vrwlock_t locktype) { xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; vp = BHV_TO_VNODE(bdp); if (VN_ISDIR(vp)) @@ -3765,6 +3762,7 @@ xfs_inode_flush( return error; } + int xfs_set_dmattrs ( bhv_desc_t *bdp, @@ -3805,12 +3803,16 @@ xfs_set_dmattrs ( return error; } + +/* + * xfs_reclaim + */ STATIC int xfs_reclaim( bhv_desc_t *bdp) { xfs_inode_t *ip; - bhv_vnode_t *vp; + vnode_t *vp; vp = BHV_TO_VNODE(bdp); ip = XFS_BHVTOI(bdp); @@ -3865,7 +3867,7 @@ xfs_finish_reclaim( int sync_mode) { xfs_ihash_t *ih = ip->i_hash; - bhv_vnode_t *vp = XFS_ITOV_NULL(ip); + vnode_t *vp = XFS_ITOV_NULL(ip); int error; if (vp && VN_BAD(vp)) @@ -4132,10 +4134,10 @@ retry: * Issue the xfs_bmapi() call to allocate the blocks */ XFS_BMAP_INIT(&free_list, &firstfsb); - error = XFS_BMAPI(mp, tp, &ip->i_iocore, startoffset_fsb, + error = xfs_bmapi(tp, ip, startoffset_fsb, allocatesize_fsb, bmapi_flag, &firstfsb, 0, imapp, &nimaps, - &free_list, NULL); + &free_list); if (error) { goto error0; } @@ -4215,8 +4217,8 @@ xfs_zero_remaining_bytes( for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { offset_fsb = XFS_B_TO_FSBT(mp, offset); nimap = 1; - error = XFS_BMAPI(mp, NULL, &ip->i_iocore, offset_fsb, 1, 0, - NULL, 0, &imap, &nimap, NULL, NULL); + error = xfs_bmapi(NULL, ip, offset_fsb, 1, 0, NULL, 0, &imap, + &nimap, NULL); if (error || nimap < 1) break; ASSERT(imap.br_blockcount >= 1); @@ -4275,7 +4277,7 @@ xfs_free_file_space( xfs_off_t len, int attr_flags) { - bhv_vnode_t *vp; + vnode_t *vp; int committed; int done; xfs_off_t end_dmi_offset; @@ -4324,6 +4326,7 @@ xfs_free_file_space( return error; } + ASSERT(attr_flags & ATTR_NOLOCK ? attr_flags & ATTR_DMI : 1); if (attr_flags & ATTR_NOLOCK) need_iolock = 0; if (need_iolock) { @@ -4341,7 +4344,7 @@ xfs_free_file_space( if (VN_CACHED(vp) != 0) { xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, ctooff(offtoct(ioffset)), -1); - bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), + VOP_FLUSHINVAL_PAGES(vp, ctooff(offtoct(ioffset)), -1, FI_REMAPF_LOCKED); } @@ -4353,8 +4356,8 @@ xfs_free_file_space( */ if (rt && !XFS_SB_VERSION_HASEXTFLGBIT(&mp->m_sb)) { nimap = 1; - error = XFS_BMAPI(mp, NULL, &ip->i_iocore, startoffset_fsb, - 1, 0, NULL, 0, &imap, &nimap, NULL, NULL); + error = xfs_bmapi(NULL, ip, startoffset_fsb, 1, 0, NULL, 0, + &imap, &nimap, NULL); if (error) goto out_unlock_iolock; ASSERT(nimap == 0 || nimap == 1); @@ -4368,8 +4371,8 @@ xfs_free_file_space( startoffset_fsb += mp->m_sb.sb_rextsize - mod; } nimap = 1; - error = XFS_BMAPI(mp, NULL, &ip->i_iocore, endoffset_fsb - 1, - 1, 0, NULL, 0, &imap, &nimap, NULL, NULL); + error = xfs_bmapi(NULL, ip, endoffset_fsb - 1, 1, 0, NULL, 0, + &imap, &nimap, NULL); if (error) goto out_unlock_iolock; ASSERT(nimap == 0 || nimap == 1); @@ -4441,9 +4444,9 @@ xfs_free_file_space( * issue the bunmapi() call to free the blocks */ XFS_BMAP_INIT(&free_list, &firstfsb); - error = XFS_BUNMAPI(mp, tp, &ip->i_iocore, startoffset_fsb, + error = xfs_bunmapi(tp, ip, startoffset_fsb, endoffset_fsb - startoffset_fsb, - 0, 2, &firstfsb, &free_list, NULL, &done); + 0, 2, &firstfsb, &free_list, &done); if (error) { goto error0; } @@ -4503,8 +4506,8 @@ xfs_change_file_space( xfs_off_t startoffset; xfs_off_t llen; xfs_trans_t *tp; - bhv_vattr_t va; - bhv_vnode_t *vp; + vattr_t va; + vnode_t *vp; vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -4657,10 +4660,9 @@ xfs_change_file_space( return error; } -bhv_vnodeops_t xfs_vnodeops = { +vnodeops_t xfs_vnodeops = { BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), .vop_open = xfs_open, - .vop_close = xfs_close, .vop_read = xfs_read, #ifdef HAVE_SENDFILE .vop_sendfile = xfs_sendfile, diff --git a/include/Kbuild b/include/Kbuild deleted file mode 100644 index 2d03f9958..000000000 --- a/include/Kbuild +++ /dev/null @@ -1,9 +0,0 @@ -header-y += asm-generic/ -header-y += linux/ -header-y += scsi/ -header-y += sound/ -header-y += mtd/ -header-y += rdma/ -header-y += video/ - -header-y += asm-$(ARCH)/ diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 9e6c23c36..e27dc8f29 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -63,7 +63,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20060707 +#define ACPI_CA_VERSION 0x20060127 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, @@ -81,7 +81,6 @@ #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ -#define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ /* * Should the subsystem abort the loading of an ACPI table if the @@ -103,9 +102,9 @@ #define ACPI_MAX_SEMAPHORE_COUNT 256 -/* Maximum object reference count (detects object deletion issues) */ +/* Max reference count (for debug only) */ -#define ACPI_MAX_REFERENCE_COUNT 0x800 +#define ACPI_MAX_REFERENCE_COUNT 0x400 /* Size of cached memory mapping for system memory operation region */ @@ -172,7 +171,12 @@ /* Array sizes. Used for range checking also */ -#define ACPI_MAX_MATCH_OPCODE 5 +#define ACPI_NUM_ACCESS_TYPES 6 +#define ACPI_NUM_UPDATE_RULES 3 +#define ACPI_NUM_LOCK_RULES 2 +#define ACPI_NUM_MATCH_OPS 6 +#define ACPI_NUM_OPCODES 256 +#define ACPI_NUM_FIELD_NAMES 2 /* RSDP checksums */ @@ -183,6 +187,10 @@ #define ACPI_SMBUS_BUFFER_SIZE 34 +/* Number of strings associated with the _OSI reserved method */ + +#define ACPI_NUM_OSI_STRINGS 10 + /****************************************************************************** * * ACPI AML Debugger diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 9a7d6921f..11a8fe39c 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h @@ -50,72 +50,26 @@ #define BLOCK_PAREN 1 #define BLOCK_BRACE 2 #define BLOCK_COMMA_LIST 4 -#define ACPI_DEFAULT_RESNAME *(u32 *) "__RD" struct acpi_external_list { char *path; - char *internal_path; struct acpi_external_list *next; - u32 value; - u16 length; - u8 type; }; extern struct acpi_external_list *acpi_gbl_external_list; -typedef const struct acpi_dmtable_info { - u8 opcode; - u8 offset; - char *name; - -} acpi_dmtable_info; - -/* - * Values for Opcode above. - * Note: 0-7 must not change, used as a flag shift value - */ -#define ACPI_DMT_FLAG0 0 -#define ACPI_DMT_FLAG1 1 -#define ACPI_DMT_FLAG2 2 -#define ACPI_DMT_FLAG3 3 -#define ACPI_DMT_FLAG4 4 -#define ACPI_DMT_FLAG5 5 -#define ACPI_DMT_FLAG6 6 -#define ACPI_DMT_FLAG7 7 -#define ACPI_DMT_FLAGS0 8 -#define ACPI_DMT_FLAGS2 9 -#define ACPI_DMT_UINT8 10 -#define ACPI_DMT_UINT16 11 -#define ACPI_DMT_UINT24 12 -#define ACPI_DMT_UINT32 13 -#define ACPI_DMT_UINT56 14 -#define ACPI_DMT_UINT64 15 -#define ACPI_DMT_STRING 16 -#define ACPI_DMT_NAME4 17 -#define ACPI_DMT_NAME6 18 -#define ACPI_DMT_NAME8 19 -#define ACPI_DMT_CHKSUM 20 -#define ACPI_DMT_SPACEID 21 -#define ACPI_DMT_GAS 22 -#define ACPI_DMT_MADT 23 -#define ACPI_DMT_SRAT 24 -#define ACPI_DMT_EXIT 25 - -typedef -void (*ACPI_TABLE_HANDLER) (struct acpi_table_header * table); +/* Strings used for decoding flags to ASL keywords */ -struct acpi_dmtable_data { - char *signature; - struct acpi_dmtable_info *table_info; - ACPI_TABLE_HANDLER table_handler; -}; +extern const char *acpi_gbl_word_decode[4]; +extern const char *acpi_gbl_irq_decode[2]; +extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; +extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; +extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; +extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; struct acpi_op_walk_info { u32 level; - u32 last_level; - u32 count; u32 bit_offset; - u32 flags; struct acpi_walk_state *walk_state; }; @@ -123,100 +77,6 @@ typedef acpi_status(*asl_walk_callback) (union acpi_parse_object * op, u32 level, void *context); -struct acpi_resource_tag { - u32 bit_index; - char *tag; -}; - -/* Strings used for decoding flags to ASL keywords */ - -extern const char *acpi_gbl_word_decode[]; -extern const char *acpi_gbl_irq_decode[]; -extern const char *acpi_gbl_lock_rule[]; -extern const char *acpi_gbl_access_types[]; -extern const char *acpi_gbl_update_rules[]; -extern const char *acpi_gbl_match_ops[]; - -extern struct acpi_dmtable_info acpi_dm_table_info_asf0[]; -extern struct acpi_dmtable_info acpi_dm_table_info_asf1[]; -extern struct acpi_dmtable_info acpi_dm_table_info_asf2[]; -extern struct acpi_dmtable_info acpi_dm_table_info_asf3[]; -extern struct acpi_dmtable_info acpi_dm_table_info_asf4[]; -extern struct acpi_dmtable_info acpi_dm_table_info_asf_hdr[]; -extern struct acpi_dmtable_info acpi_dm_table_info_boot[]; -extern struct acpi_dmtable_info acpi_dm_table_info_cpep[]; -extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[]; -extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[]; -extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[]; -extern struct acpi_dmtable_info acpi_dm_table_info_facs[]; -extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[]; -extern struct acpi_dmtable_info acpi_dm_table_info_fadt2[]; -extern struct acpi_dmtable_info acpi_dm_table_info_gas[]; -extern struct acpi_dmtable_info acpi_dm_table_info_header[]; -extern struct acpi_dmtable_info acpi_dm_table_info_hpet[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt0[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt1[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt2[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt3[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt4[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt5[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt6[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt7[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt8[]; -extern struct acpi_dmtable_info acpi_dm_table_info_madt_hdr[]; -extern struct acpi_dmtable_info acpi_dm_table_info_mcfg[]; -extern struct acpi_dmtable_info acpi_dm_table_info_mcfg0[]; -extern struct acpi_dmtable_info acpi_dm_table_info_rsdp1[]; -extern struct acpi_dmtable_info acpi_dm_table_info_rsdp2[]; -extern struct acpi_dmtable_info acpi_dm_table_info_sbst[]; -extern struct acpi_dmtable_info acpi_dm_table_info_slit[]; -extern struct acpi_dmtable_info acpi_dm_table_info_spcr[]; -extern struct acpi_dmtable_info acpi_dm_table_info_spmi[]; -extern struct acpi_dmtable_info acpi_dm_table_info_srat[]; -extern struct acpi_dmtable_info acpi_dm_table_info_srat0[]; -extern struct acpi_dmtable_info acpi_dm_table_info_srat1[]; -extern struct acpi_dmtable_info acpi_dm_table_info_tcpa[]; -extern struct acpi_dmtable_info acpi_dm_table_info_wdrt[]; - -/* - * dmtable - */ -void acpi_dm_dump_data_table(struct acpi_table_header *table); - -void -acpi_dm_dump_table(u32 table_length, - u32 table_offset, - void *table, - u32 sub_table_length, struct acpi_dmtable_info *info); - -void acpi_dm_line_header(u32 offset, u32 byte_length, char *name); - -void acpi_dm_line_header2(u32 offset, u32 byte_length, char *name, u32 value); - -/* - * dmtbdump - */ -void acpi_dm_dump_asf(struct acpi_table_header *table); - -void acpi_dm_dump_cpep(struct acpi_table_header *table); - -void acpi_dm_dump_fadt(struct acpi_table_header *table); - -void acpi_dm_dump_srat(struct acpi_table_header *table); - -void acpi_dm_dump_mcfg(struct acpi_table_header *table); - -void acpi_dm_dump_madt(struct acpi_table_header *table); - -u32 acpi_dm_dump_rsdp(struct acpi_table_header *table); - -void acpi_dm_dump_rsdt(struct acpi_table_header *table); - -void acpi_dm_dump_slit(struct acpi_table_header *table); - -void acpi_dm_dump_xsdt(struct acpi_table_header *table); - /* * dmwalk */ @@ -224,11 +84,6 @@ void acpi_dm_disassemble(struct acpi_walk_state *walk_state, union acpi_parse_object *origin, u32 num_opcodes); -void -acpi_dm_walk_parse_tree(union acpi_parse_object *op, - asl_walk_callback descending_callback, - asl_walk_callback ascending_callback, void *context); - /* * dmopcode */ @@ -311,7 +166,6 @@ void acpi_dm_dump_integer64(u64 value, char *name); void acpi_dm_resource_template(struct acpi_op_walk_info *info, - union acpi_parse_object *op, u8 * byte_data, u32 byte_count); u8 acpi_dm_is_resource_template(union acpi_parse_object *op); @@ -322,8 +176,6 @@ void acpi_dm_bit_list(u16 mask); void acpi_dm_decode_attribute(u8 attribute); -void acpi_dm_descriptor_name(void); - /* * dmresrcl */ @@ -396,15 +248,6 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource, /* * dmutils */ -void acpi_dm_add_to_external_list(char *path, u8 type, u32 value); - -/* - * dmrestag - */ -void acpi_dm_find_resources(union acpi_parse_object *root); - -void -acpi_dm_check_resource_reference(union acpi_parse_object *op, - struct acpi_walk_state *walk_state); +void acpi_dm_add_to_external_list(char *path); #endif /* __ACDISASM_H__ */ diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index a22fe9cf8..c41a926ff 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h @@ -194,14 +194,12 @@ acpi_status acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, union acpi_operand_object *return_desc); -void -acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, - struct acpi_walk_state *walk_state); +void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state); acpi_status acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, union acpi_operand_object *obj_desc, - struct acpi_walk_state *walk_state); + struct acpi_namespace_node *calling_method_node); acpi_status acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); @@ -304,7 +302,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, struct acpi_namespace_node *method_node, u8 * aml_start, u32 aml_length, - struct acpi_evaluate_info *info, u8 pass_number); + struct acpi_parameter_info *info, u8 pass_number); acpi_status acpi_ds_obj_stack_pop_and_delete(u32 pop_count, diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index 234142828..f2717be4f 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h @@ -93,7 +93,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, */ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info); -acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback); +acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback); acpi_status acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, @@ -138,7 +138,7 @@ acpi_status acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, u32 function, acpi_physical_address address, - u32 bit_width, acpi_integer * value); + u32 bit_width, void *value); acpi_status acpi_ev_attach_region(union acpi_operand_object *handler_obj, diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 797ca1ea5..dc768aa58 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -160,9 +160,8 @@ #define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001F | AE_CODE_AML) #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML) #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x0021 | AE_CODE_AML) -#define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0022 | AE_CODE_AML) -#define AE_CODE_AML_MAX 0x0022 +#define AE_CODE_AML_MAX 0x0021 /* * Internal exceptions used for control @@ -276,8 +275,7 @@ char const *acpi_gbl_exception_names_aml[] = { "AE_AML_NO_RESOURCE_END_TAG", "AE_AML_BAD_RESOURCE_VALUE", "AE_AML_CIRCULAR_REFERENCE", - "AE_AML_BAD_RESOURCE_LENGTH", - "AE_AML_ILLEGAL_ADDRESS" + "AE_AML_BAD_RESOURCE_LENGTH" }; char const *acpi_gbl_exception_names_ctrl[] = { diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 06972e663..734cc77bf 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h @@ -107,7 +107,6 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags; * 3) Allow access to uninitialized locals/args (auto-init to integer 0) * 4) Allow ANY object type to be a source operand for the Store() operator * 5) Allow unresolved references (invalid target name) in package objects - * 6) Enable warning messages for behavior that is not ACPI spec compliant */ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); @@ -115,7 +114,7 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); * Automatically serialize ALL control methods? Default is FALSE, meaning * to use the Serialized/not_serialized method flags on a per method basis. * Only change this if the ASL code is poorly written and cannot handle - * reentrancy even though methods are marked "NotSerialized". + * reentrancy even though methods are marked "not_serialized". */ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE); @@ -150,10 +149,10 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE); ACPI_EXTERN u32 acpi_gbl_table_flags; ACPI_EXTERN u32 acpi_gbl_rsdt_table_count; ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP; -ACPI_EXTERN struct xsdt_descriptor *acpi_gbl_XSDT; -ACPI_EXTERN struct fadt_descriptor *acpi_gbl_FADT; +ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT; +ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT; ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT; -ACPI_EXTERN struct facs_descriptor *acpi_gbl_FACS; +ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS; ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS; /* * Since there may be multiple SSDTs and PSDTs, a single pointer is not @@ -178,35 +177,15 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; /* * ACPI Table info arrays */ -extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; -extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; - -/***************************************************************************** - * - * Mutual exlusion within ACPICA subsystem - * - ****************************************************************************/ +extern struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES]; +extern struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES]; /* * Predefined mutex objects. This array contains the * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. * (The table maps local handles to the real OS handles) */ -ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; - -/* - * Global lock semaphore works in conjunction with the actual HW global lock - */ -ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore; - -/* - * Spinlocks are used for interfaces that can be possibly called at - * interrupt level - */ -ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */ -ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */ -#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock -#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock +ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX]; /***************************************************************************** * @@ -224,7 +203,6 @@ ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; /* Object caches */ -ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; @@ -237,6 +215,7 @@ ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; +ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; /* Misc */ @@ -265,6 +244,7 @@ extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; extern const char *acpi_gbl_highest_dstate_names[4]; extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]; extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; +extern const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS]; /***************************************************************************** * @@ -309,6 +289,14 @@ ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list; ACPI_EXTERN u8 acpi_gbl_cm_single_step; +/***************************************************************************** + * + * Parser globals + * + ****************************************************************************/ + +ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root; + /***************************************************************************** * * Hardware globals @@ -333,6 +321,7 @@ ACPI_EXTERN struct acpi_fixed_event_handler ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; ACPI_EXTERN struct acpi_gpe_block_info *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; +ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock; /***************************************************************************** * diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 91586d0d5..9f22cfcb6 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h @@ -53,14 +53,10 @@ #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info)) /* - * If possible, pack the following structures to byte alignment, since we - * don't care about performance for debug output. Two cases where we cannot - * pack the structures: - * - * 1) Hardware does not support misaligned memory transfers - * 2) Compiler does not support pointers within packed structures + * If possible, pack the following structure to byte alignment, since we + * don't care about performance for debug output */ -#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) +#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED #pragma pack(1) #endif @@ -291,10 +287,7 @@ acpi_ex_system_wait_event(union acpi_operand_object *time, acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); -acpi_status -acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout); - -acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout); +acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout); /* * exoparg1 - ACPI AML execution, 1 operand diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index a4d0e73d5..8361820d2 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -44,14 +44,10 @@ #ifndef __ACLOCAL_H__ #define __ACLOCAL_H__ -/* acpisrc:struct_defs -- for acpisrc conversion */ - #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ -#define ACPI_DO_NOT_WAIT 0 -#define ACPI_SERIALIZED 0xFF +typedef void *acpi_mutex; typedef u32 acpi_mutex_handle; -#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1) /* Total number of aml opcodes defined */ @@ -73,53 +69,52 @@ union acpi_parse_object; * Predefined handles for the mutex objects used within the subsystem * All mutex objects are automatically created by acpi_ut_mutex_initialize. * - * The acquire/release ordering protocol is implied via this list. Mutexes + * The acquire/release ordering protocol is implied via this list. Mutexes * with a lower value must be acquired before mutexes with a higher value. * - * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names - * table below also! + * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also! */ -#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ -#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */ -#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */ -#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ -#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */ -#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */ -#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ -#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ - -#define ACPI_MAX_MUTEX 7 -#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 +#define ACPI_MTX_EXECUTE 0 +#define ACPI_MTX_INTERPRETER 1 +#define ACPI_MTX_PARSER 2 +#define ACPI_MTX_DISPATCHER 3 +#define ACPI_MTX_TABLES 4 +#define ACPI_MTX_OP_REGIONS 5 +#define ACPI_MTX_NAMESPACE 6 +#define ACPI_MTX_EVENTS 7 +#define ACPI_MTX_HARDWARE 8 +#define ACPI_MTX_CACHES 9 +#define ACPI_MTX_MEMORY 10 +#define ACPI_MTX_DEBUG_CMD_COMPLETE 11 +#define ACPI_MTX_DEBUG_CMD_READY 12 + +#define MAX_MUTEX 12 +#define NUM_MUTEX MAX_MUTEX+1 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) #ifdef DEFINE_ACPI_GLOBALS -/* Debug names for the mutexes above */ +/* Names for the mutexes used in the subsystem */ -static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { +static char *acpi_gbl_mutex_names[] = { + "ACPI_MTX_Execute", "ACPI_MTX_Interpreter", + "ACPI_MTX_Parser", + "ACPI_MTX_Dispatcher", "ACPI_MTX_Tables", + "ACPI_MTX_op_regions", "ACPI_MTX_Namespace", "ACPI_MTX_Events", + "ACPI_MTX_Hardware", "ACPI_MTX_Caches", "ACPI_MTX_Memory", - "ACPI_MTX_CommandComplete", - "ACPI_MTX_CommandReady" + "ACPI_MTX_debug_cmd_complete", + "ACPI_MTX_debug_cmd_ready", }; #endif #endif -/* - * Predefined handles for spinlocks used within the subsystem. - * These spinlocks are created by acpi_ut_mutex_initialize - */ -#define ACPI_LOCK_GPES 0 -#define ACPI_LOCK_HARDWARE 1 - -#define ACPI_MAX_LOCK 1 -#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1 - /* Owner IDs are used to track namespace nodes for selective deletion */ typedef u8 acpi_owner_id; @@ -127,14 +122,14 @@ typedef u8 acpi_owner_id; /* This Thread ID means that the mutex is not in use (unlocked) */ -#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0 +#define ACPI_MUTEX_NOT_ACQUIRED (u32) -1 /* Table for the global mutexes */ struct acpi_mutex_info { acpi_mutex mutex; u32 use_count; - acpi_thread_id thread_id; + u32 thread_id; }; /* Lock flag parameter for various interfaces */ @@ -149,8 +144,6 @@ struct acpi_mutex_info { #define ACPI_FIELD_DWORD_GRANULARITY 4 #define ACPI_FIELD_QWORD_GRANULARITY 8 -#define ACPI_ENTRY_NOT_FOUND NULL - /***************************************************************************** * * Namespace typedefs and structs @@ -165,55 +158,49 @@ typedef enum { ACPI_IMODE_EXECUTE = 0x0E } acpi_interpreter_mode; +/* + * The Node describes a named object that appears in the AML + * An acpi_node is used to store Nodes. + * + * data_type is used to differentiate between internal descriptors, and MUST + * be the first byte in this structure. + */ union acpi_name_union { u32 integer; char ascii[4]; }; -/* - * The Namespace Node describes a named object that appears in the AML. - * descriptor_type is used to differentiate between internal descriptors. - * - * The node is optimized for both 32-bit and 64-bit platforms: - * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. - * - * Note: The descriptor_type and Type fields must appear in the identical - * position in both the struct acpi_namespace_node and union acpi_operand_object - * structures. - */ struct acpi_namespace_node { - union acpi_operand_object *object; /* Interpreter object */ - u8 descriptor_type; /* Differentiate object descriptor types */ - u8 type; /* ACPI Type associated with this name */ - u8 flags; /* Miscellaneous flags */ - acpi_owner_id owner_id; /* Node creator */ + u8 descriptor; /* Used to differentiate object descriptor types */ + u8 type; /* Type associated with this name */ + u16 reference_count; /* Current count of references and children */ union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ + union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */ struct acpi_namespace_node *child; /* First child */ - struct acpi_namespace_node *peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */ + struct acpi_namespace_node *peer; /* Next peer */ + u8 owner_id; /* Who created this node */ + u8 flags; - /* - * The following fields are used by the ASL compiler and disassembler only - */ -#ifdef ACPI_LARGE_NAMESPACE_NODE - union acpi_parse_object *op; + /* Fields used by the ASL compiler only */ + +#ifdef ACPI_ASL_COMPILER u32 value; - u32 length; + union acpi_parse_object *op; #endif }; -/* Namespace Node flags */ +#define ACPI_ENTRY_NOT_FOUND NULL -#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ -#define ANOBJ_RESERVED 0x02 /* Available for future use */ -#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ -#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ -#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ +/* Node flags */ -#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ -#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ -#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */ -#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */ -#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */ +#define ANOBJ_RESERVED 0x01 +#define ANOBJ_END_OF_PEER_LIST 0x02 +#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */ +#define ANOBJ_METHOD_ARG 0x08 +#define ANOBJ_METHOD_LOCAL 0x10 +#define ANOBJ_METHOD_NO_RETVAL 0x20 +#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40 +#define ANOBJ_IS_BIT_OFFSET 0x80 /* * ACPI Table Descriptor. One per ACPI table @@ -225,8 +212,8 @@ struct acpi_table_desc { struct acpi_table_header *pointer; u8 *aml_start; u64 physical_address; - acpi_size length; u32 aml_length; + acpi_size length; acpi_owner_id owner_id; u8 type; u8 allocation; @@ -289,9 +276,6 @@ struct acpi_create_field_info { u8 field_type; }; -typedef -acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); - /* * Bitmapped ACPI types. Used internally only */ @@ -393,7 +377,7 @@ struct acpi_gpe_walk_info { struct acpi_gpe_block_info *gpe_block; }; -typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * +typedef acpi_status(*ACPI_GPE_CALLBACK) (struct acpi_gpe_xrupt_info * gpe_xrupt_info, struct acpi_gpe_block_info * gpe_block); @@ -432,14 +416,13 @@ struct acpi_field_info { #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 -#define ACPI_STATE_COMMON \ - void *next; \ - u8 descriptor_type; /* To differentiate various internal objs */\ - u8 flags; \ - u16 value; \ - u16 state; - - /* There are 2 bytes available here until the next natural alignment boundary */ +#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ + u8 data_type; /* To differentiate various internal objs */\ + u8 flags; \ + u16 value; \ + u16 state; \ + u16 reserved; \ + void *next; struct acpi_common_state { ACPI_STATE_COMMON}; @@ -455,12 +438,12 @@ struct acpi_update_state { * Pkg state - used to traverse nested package structures */ struct acpi_pkg_state { - ACPI_STATE_COMMON u16 index; - union acpi_operand_object *source_object; + ACPI_STATE_COMMON union acpi_operand_object *source_object; union acpi_operand_object *dest_object; struct acpi_walk_state *walk_state; void *this_target_obj; u32 num_packages; + u16 index; }; /* @@ -468,10 +451,10 @@ struct acpi_pkg_state { * Allows nesting of these constructs */ struct acpi_control_state { - ACPI_STATE_COMMON u16 opcode; - union acpi_parse_object *predicate_op; + ACPI_STATE_COMMON union acpi_parse_object *predicate_op; u8 *aml_predicate_start; /* Start of if/while predicate */ u8 *package_end; /* End of if/while block */ + u16 opcode; }; /* @@ -482,11 +465,11 @@ struct acpi_scope_state { }; struct acpi_pscope_state { - ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */ - union acpi_parse_object *op; /* Current op being parsed */ + ACPI_STATE_COMMON union acpi_parse_object *op; /* Current op being parsed */ u8 *arg_end; /* Current argument end */ u8 *pkg_end; /* Current package end */ u32 arg_list; /* Next argument to parse */ + u32 arg_count; /* Number of fixed arguments */ }; /* @@ -494,10 +477,10 @@ struct acpi_pscope_state { * states are created when there are nested control methods executing. */ struct acpi_thread_state { - ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */ - struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ + ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ - acpi_thread_id thread_id; /* Running thread ID */ + u32 thread_id; /* Running thread ID */ + u8 current_sync_level; /* Mutex Sync (nested acquire) level */ }; /* @@ -505,9 +488,10 @@ struct acpi_thread_state { * AML arguments */ struct acpi_result_values { - ACPI_STATE_COMMON u8 num_results; + ACPI_STATE_COMMON + union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS]; + u8 num_results; u8 last_insert; - union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS]; }; typedef @@ -562,7 +546,7 @@ struct acpi_opcode_info { #endif u32 parse_args; /* Grammar/Parse time arguments */ u32 runtime_args; /* Interpret time arguments */ - u16 flags; /* Misc flags */ + u32 flags; /* Misc flags */ u8 object_type; /* Corresponding internal object type */ u8 class; /* Opcode class */ u8 type; /* Opcode type */ @@ -579,31 +563,29 @@ union acpi_parse_value { }; #define ACPI_PARSE_COMMON \ - union acpi_parse_object *parent; /* Parent op */\ - u8 descriptor_type; /* To differentiate various internal objs */\ - u8 flags; /* Type of Op */\ - u16 aml_opcode; /* AML opcode */\ - u32 aml_offset; /* Offset of declaration in AML */\ - union acpi_parse_object *next; /* Next op */\ - struct acpi_namespace_node *node; /* For use by interpreter */\ - union acpi_parse_value value; /* Value or args associated with the opcode */\ + u8 data_type; /* To differentiate various internal objs */\ + u8 flags; /* Type of Op */\ + u16 aml_opcode; /* AML opcode */\ + u32 aml_offset; /* Offset of declaration in AML */\ + union acpi_parse_object *parent; /* Parent op */\ + union acpi_parse_object *next; /* Next op */\ ACPI_DISASM_ONLY_MEMBERS (\ - u8 disasm_flags; /* Used during AML disassembly */\ - u8 disasm_opcode; /* Subtype used for disassembly */\ - char aml_op_name[16]) /* Op name (debug only) */ - -#define ACPI_DASM_BUFFER 0x00 -#define ACPI_DASM_RESOURCE 0x01 -#define ACPI_DASM_STRING 0x02 -#define ACPI_DASM_UNICODE 0x03 -#define ACPI_DASM_EISAID 0x04 -#define ACPI_DASM_MATCHOP 0x05 -#define ACPI_DASM_LNOT_PREFIX 0x06 -#define ACPI_DASM_LNOT_SUFFIX 0x07 -#define ACPI_DASM_IGNORE 0x08 + u8 disasm_flags; /* Used during AML disassembly */\ + u8 disasm_opcode; /* Subtype used for disassembly */\ + char aml_op_name[16]) /* Op name (debug only) */\ + /* NON-DEBUG members below: */\ + struct acpi_namespace_node *node; /* For use by interpreter */\ + union acpi_parse_value value; /* Value or args associated with the opcode */ + +#define ACPI_DASM_BUFFER 0x00 +#define ACPI_DASM_RESOURCE 0x01 +#define ACPI_DASM_STRING 0x02 +#define ACPI_DASM_UNICODE 0x03 +#define ACPI_DASM_EISAID 0x04 +#define ACPI_DASM_MATCHOP 0x05 /* - * Generic operation (for example: If, While, Store) + * generic operation (for example: If, While, Store) */ struct acpi_parse_obj_common { ACPI_PARSE_COMMON}; @@ -619,7 +601,7 @@ struct acpi_parse_obj_named { u32 name; /* 4-byte name or zero if no name */ }; -/* This version is used by the i_aSL compiler only */ +/* The parse node is the fundamental element of the parse tree */ #define ACPI_MAX_PARSEOP_NAME 20 @@ -661,6 +643,7 @@ union acpi_parse_object { * method. */ struct acpi_parse_state { + u32 aml_size; u8 *aml_start; /* First AML byte */ u8 *aml; /* Next AML byte */ u8 *aml_end; /* (last + 1) AML byte */ @@ -670,23 +653,22 @@ struct acpi_parse_state { struct acpi_namespace_node *start_node; union acpi_generic_state *scope; /* Current scope */ union acpi_parse_object *start_scope; - u32 aml_size; }; /* Parse object flags */ -#define ACPI_PARSEOP_GENERIC 0x01 -#define ACPI_PARSEOP_NAMED 0x02 -#define ACPI_PARSEOP_DEFERRED 0x04 -#define ACPI_PARSEOP_BYTELIST 0x08 -#define ACPI_PARSEOP_IN_CACHE 0x80 +#define ACPI_PARSEOP_GENERIC 0x01 +#define ACPI_PARSEOP_NAMED 0x02 +#define ACPI_PARSEOP_DEFERRED 0x04 +#define ACPI_PARSEOP_BYTELIST 0x08 +#define ACPI_PARSEOP_IN_CACHE 0x80 /* Parse object disasm_flags */ -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMLIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_SPECIAL 0x10 +#define ACPI_PARSEOP_IGNORE 0x01 +#define ACPI_PARSEOP_PARAMLIST 0x02 +#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 +#define ACPI_PARSEOP_SPECIAL 0x10 /***************************************************************************** * @@ -694,8 +676,8 @@ struct acpi_parse_state { * ****************************************************************************/ -#define PCI_ROOT_HID_STRING "PNP0A03" -#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" +#define PCI_ROOT_HID_STRING "PNP0A03" +#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" struct acpi_bit_register_info { u8 parent_register; @@ -703,13 +685,6 @@ struct acpi_bit_register_info { u16 access_bit_mask; }; -/* - * Some ACPI registers have bits that must be ignored -- meaning that they - * must be preserved. - */ -#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */ -#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */ - /* * Register IDs * These are the full ACPI registers @@ -735,14 +710,13 @@ struct acpi_bit_register_info { #define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */ #define ACPI_BITMASK_WAKE_STATUS 0x8000 -#define ACPI_BITMASK_ALL_FIXED_STATUS (\ - ACPI_BITMASK_TIMER_STATUS | \ - ACPI_BITMASK_BUS_MASTER_STATUS | \ - ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ - ACPI_BITMASK_POWER_BUTTON_STATUS | \ - ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ - ACPI_BITMASK_RT_CLOCK_STATUS | \ - ACPI_BITMASK_WAKE_STATUS) +#define ACPI_BITMASK_ALL_FIXED_STATUS (ACPI_BITMASK_TIMER_STATUS | \ + ACPI_BITMASK_BUS_MASTER_STATUS | \ + ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ + ACPI_BITMASK_POWER_BUTTON_STATUS | \ + ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ + ACPI_BITMASK_RT_CLOCK_STATUS | \ + ACPI_BITMASK_WAKE_STATUS) #define ACPI_BITMASK_TIMER_ENABLE 0x0001 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020 @@ -846,7 +820,7 @@ struct acpi_bit_register_info { * ****************************************************************************/ -#define ACPI_ASCII_ZERO 0x30 +#define ACPI_ASCII_ZERO 0x30 /***************************************************************************** * @@ -868,9 +842,9 @@ struct acpi_integrity_info { u32 objects; }; -#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 -#define ACPI_DB_CONSOLE_OUTPUT 0x02 -#define ACPI_DB_DUPLICATE_OUTPUT 0x03 +#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 +#define ACPI_DB_CONSOLE_OUTPUT 0x02 +#define ACPI_DB_DUPLICATE_OUTPUT 0x03 /***************************************************************************** * @@ -880,18 +854,18 @@ struct acpi_integrity_info { /* Entry for a memory allocation (debug only) */ -#define ACPI_MEM_MALLOC 0 -#define ACPI_MEM_CALLOC 1 -#define ACPI_MAX_MODULE_NAME 16 +#define ACPI_MEM_MALLOC 0 +#define ACPI_MEM_CALLOC 1 +#define ACPI_MAX_MODULE_NAME 16 #define ACPI_COMMON_DEBUG_MEM_HEADER \ - struct acpi_debug_mem_block *previous; \ - struct acpi_debug_mem_block *next; \ - u32 size; \ - u32 component; \ - u32 line; \ - char module[ACPI_MAX_MODULE_NAME]; \ - u8 alloc_type; + struct acpi_debug_mem_block *previous; \ + struct acpi_debug_mem_block *next; \ + u32 size; \ + u32 component; \ + u32 line; \ + char module[ACPI_MAX_MODULE_NAME]; \ + u8 alloc_type; struct acpi_debug_mem_header { ACPI_COMMON_DEBUG_MEM_HEADER}; diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 192fa095a..f2be2a881 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h @@ -56,10 +56,6 @@ #define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) #define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) -/* Size calculation */ - -#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) - #if ACPI_MACHINE_WIDTH == 16 /* @@ -103,7 +99,7 @@ * printf() format helpers */ -/* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ +/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) @@ -134,6 +130,7 @@ #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) +#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) #if ACPI_MACHINE_WIDTH == 16 #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) @@ -144,12 +141,6 @@ #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) #endif -#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) -#else -#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE)) -#endif - /* * Macros for moving data around to/from buffers that are possibly unaligned. * If the hardware supports the transfer of unaligned data, just do the store. @@ -350,33 +341,29 @@ /* * Rounding macros (Power of two boundaries only) */ -#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ +#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ (~(((acpi_native_uint) boundary)-1))) -#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ +#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ (((acpi_native_uint) boundary)-1)) & \ (~(((acpi_native_uint) boundary)-1))) -/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ - -#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4) -#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8) -#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint)) +#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) +#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) +#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY) -#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4) -#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8) -#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint)) +#define ACPI_ROUND_UP_to_32_bITS(a) ACPI_ROUND_UP(a,4) +#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8) +#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY) -#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) -#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) +#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) +#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) -#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10) +#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10) /* Generic (non-power-of-two) rounding */ -#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) - -#define ACPI_IS_MISALIGNED(value) (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1)) +#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) /* * Bitmask creation @@ -384,18 +371,16 @@ * MASK_BITS_ABOVE creates a mask starting AT the position and above * MASK_BITS_BELOW creates a mask starting one bit BELOW the position */ -#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) -#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) +#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) +#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) -#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) +#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) /* Bitfields within ACPI registers */ #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) -#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) - /* Generate a UUID */ #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ @@ -411,8 +396,8 @@ * * The "Descriptor" field is the first field in both structures. */ -#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type) -#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t) +#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id) +#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t) /* Macro to test the object type */ @@ -501,6 +486,7 @@ #define ACPI_ERROR(plist) #define ACPI_ERROR_NAMESPACE(s,e) #define ACPI_ERROR_METHOD(s,n,p,e) + #endif /* @@ -528,12 +514,12 @@ #define ACPI_GET_FUNCTION_NAME _acpi_function_name /* * The Name parameter should be the procedure name as a quoted string. - * This is declared as a local string ("MyFunctionName") so that it can + * This is declared as a local string ("my_function_name") so that it can * be also used by the function exit macros below. * Note: (const char) is used to be compatible with the debug interfaces * and macros such as __FUNCTION__. */ -#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = #name; +#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = name; #else /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ @@ -542,13 +528,13 @@ #endif #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ - acpi_ut_trace(ACPI_DEBUG_PARAMETERS) + acpi_ut_trace(ACPI_DEBUG_PARAMETERS) #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ - acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) + acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ - acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b) + acpi_ut_trace_u32(ACPI_DEBUG_PARAMETERS,(u32)b) #define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \ - acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b) + acpi_ut_trace_str(ACPI_DEBUG_PARAMETERS,(char *)b) #define ACPI_FUNCTION_ENTRY() acpi_ut_track_stack_ptr() @@ -557,7 +543,7 @@ * WARNING: These macros include a return statement. This is usually considered * bad form, but having a separate exit macro is very ugly and difficult to maintain. * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros - * so that "_AcpiFunctionName" is defined. + * so that "_acpi_function_name" is defined. * * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining * about these constructs. @@ -668,7 +654,6 @@ #define ACPI_DUMP_STACK_ENTRY(a) #define ACPI_DUMP_OPERANDS(a,b,c,d,e) #define ACPI_DUMP_ENTRY(a,b) -#define ACPI_DUMP_TABLES(a,b) #define ACPI_DUMP_PATHNAME(a,b,c,d) #define ACPI_DUMP_RESOURCE_LIST(a) #define ACPI_DUMP_BUFFER(a,b) @@ -724,25 +709,19 @@ /* Memory allocation */ -#ifndef ACPI_ALLOCATE -#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) -#endif -#ifndef ACPI_ALLOCATE_ZEROED -#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) -#endif -#ifndef ACPI_FREE -#define ACPI_FREE(a) acpio_os_free(a) -#endif +#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_FREE(a) acpi_os_free(a) #define ACPI_MEM_TRACKING(a) #else /* Memory allocation */ -#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_MEM_TRACKING(a) a +#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_TRACKING(a) a #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index 83b52f9f8..b667a804f 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h @@ -63,8 +63,6 @@ #define ACPI_NS_DONT_OPEN_SCOPE 0x02 #define ACPI_NS_NO_PEER_SEARCH 0x04 #define ACPI_NS_ERROR_IF_FOUND 0x08 -#define ACPI_NS_PREFIX_IS_SCOPE 0x10 -#define ACPI_NS_EXTERNAL 0x20 #define ACPI_NS_WALK_UNLOCK TRUE #define ACPI_NS_WALK_NO_UNLOCK FALSE @@ -173,17 +171,19 @@ acpi_ns_dump_objects(acpi_object_type type, /* * nseval - Namespace evaluation functions */ -acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info); +acpi_status acpi_ns_evaluate_by_handle(struct acpi_parameter_info *info); + +acpi_status +acpi_ns_evaluate_by_name(char *pathname, struct acpi_parameter_info *info); + +acpi_status +acpi_ns_evaluate_relative(char *pathname, struct acpi_parameter_info *info); /* * nsnames - Name and Scope manipulation */ u32 acpi_ns_opens_scope(acpi_object_type type); -void -acpi_ns_build_external_path(struct acpi_namespace_node *node, - acpi_size size, char *name_buffer); - char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node); char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state); @@ -196,9 +196,9 @@ u8 acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for); acpi_status -acpi_ns_get_node(struct acpi_namespace_node *prefix_node, - char *external_pathname, - u32 flags, struct acpi_namespace_node **out_node); +acpi_ns_get_node_by_path(char *external_pathname, + struct acpi_namespace_node *in_prefix_node, + u32 flags, struct acpi_namespace_node **out_node); acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node); @@ -241,10 +241,10 @@ acpi_ns_search_and_enter(u32 entry_name, u32 flags, struct acpi_namespace_node **ret_node); acpi_status -acpi_ns_search_one_scope(u32 entry_name, - struct acpi_namespace_node *node, - acpi_object_type type, - struct acpi_namespace_node **ret_node); +acpi_ns_search_node(u32 entry_name, + struct acpi_namespace_node *node, + acpi_object_type type, + struct acpi_namespace_node **ret_node); void acpi_ns_install_node(struct acpi_walk_state *walk_state, diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 8fdee3111..d130cfed8 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h @@ -1,7 +1,7 @@ /****************************************************************************** * - * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) + * Name: acobject.h - Definition of union acpi_operand_object (Internal object only) * *****************************************************************************/ @@ -45,12 +45,10 @@ #ifndef _ACOBJECT_H #define _ACOBJECT_H -/* acpisrc:struct_defs -- for acpisrc conversion */ - /* - * The union acpi_operand_object is used to pass AML operands from the dispatcher + * The union acpi_operand_object is used to pass AML operands from the dispatcher * to the interpreter, and to keep track of the various handlers such as - * address space handlers and notify handlers. The object is a constant + * address space handlers and notify handlers. The object is a constant * size in order to allow it to be cached and reused. */ @@ -63,25 +61,17 @@ /* * Common area for all objects. * - * descriptor_type is used to differentiate between internal descriptors, and - * must be in the same place across all descriptors - * - * Note: The descriptor_type and Type fields must appear in the identical - * position in both the struct acpi_namespace_node and union acpi_operand_object - * structures. + * data_type is used to differentiate between internal descriptors, and MUST + * be the first byte in this structure. */ -#define ACPI_OBJECT_COMMON_HEADER \ - union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ - u8 descriptor_type; /* To differentiate various internal objs */\ - u8 type; /* acpi_object_type */\ - u16 reference_count; /* For object deletion management */\ - u8 flags; - /* - * Note: There are 3 bytes available here before the - * next natural alignment boundary (for both 32/64 cases) - */ - -/* Values for Flag byte above */ +#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\ + u8 descriptor; /* To differentiate various internal objs */\ + u8 type; /* acpi_object_type */\ + u16 reference_count; /* For object deletion management */\ + union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ + u8 flags; + +/* Values for flag byte above */ #define AOPOBJ_AML_CONSTANT 0x01 #define AOPOBJ_STATIC_POINTER 0x02 @@ -89,7 +79,36 @@ #define AOPOBJ_OBJECT_INITIALIZED 0x08 #define AOPOBJ_SETUP_COMPLETE 0x10 #define AOPOBJ_SINGLE_DATUM 0x20 -#define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an op_region address */ + +/* + * Common bitfield for the field objects + * "Field Datum" -- a datum from the actual field object + * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field + */ +#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\ + u8 field_flags; /* Access, update, and lock bits */\ + u8 attribute; /* From access_as keyword */\ + u8 access_byte_width; /* Read/Write size in bytes */\ + u32 bit_length; /* Length of field in bits */\ + u32 base_byte_offset; /* Byte offset within containing object */\ + u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ + u8 access_bit_width; /* Read/Write size in bits (8-64) */\ + u32 value; /* Value to store into the Bank or Index register */\ + struct acpi_namespace_node *node; /* Link back to parent node */ + +/* + * Fields common to both Strings and Buffers + */ +#define ACPI_COMMON_BUFFER_INFO \ + u32 length; + +/* + * Common fields for objects that support ASL notifications + */ +#define ACPI_COMMON_NOTIFY_INFO \ + union acpi_operand_object *system_notify; /* Handler for system notifies */\ + union acpi_operand_object *device_notify; /* Handler for driver notifies */\ + union acpi_operand_object *handler; /* Handler for Address space */ /****************************************************************************** * @@ -106,31 +125,25 @@ struct acpi_object_integer { /* * Note: The String and Buffer object must be identical through the Pointer - * and length elements. There is code that depends on this. - * - * Fields common to both Strings and Buffers + * element. There is code that depends on this. */ -#define ACPI_COMMON_BUFFER_INFO(_type) \ - _type *pointer; \ - u32 length; - struct acpi_object_string { /* Null terminated, ASCII characters only */ - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */ + ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO char *pointer; /* String in AML stream or allocated string */ }; struct acpi_object_buffer { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML stream or allocated buffer */ - u32 aml_length; - u8 *aml_start; + ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO u8 * pointer; /* Buffer in AML stream or allocated buffer */ struct acpi_namespace_node *node; /* Link back to parent node */ + u8 *aml_start; + u32 aml_length; }; struct acpi_object_package { - ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Link back to parent node */ - union acpi_operand_object **elements; /* Array of pointers to acpi_objects */ - u8 *aml_start; + ACPI_OBJECT_COMMON_HEADER u32 count; /* # of elements in package */ u32 aml_length; - u32 count; /* # of elements in package */ + u8 *aml_start; + struct acpi_namespace_node *node; /* Link back to parent node */ + union acpi_operand_object **elements; /* Array of pointers to acpi_objects */ }; /****************************************************************************** @@ -140,14 +153,31 @@ struct acpi_object_package { *****************************************************************************/ struct acpi_object_event { - ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */ + ACPI_OBJECT_COMMON_HEADER void *semaphore; +}; + +#define ACPI_INFINITE_CONCURRENCY 0xFF + +typedef +acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); + +struct acpi_object_method { + ACPI_OBJECT_COMMON_HEADER u8 method_flags; + u8 param_count; + u32 aml_length; + void *semaphore; + u8 *aml_start; + ACPI_INTERNAL_METHOD implementation; + u8 concurrency; + u8 thread_count; + acpi_owner_id owner_id; }; struct acpi_object_mutex { ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ u16 acquisition_depth; /* Allow multiple Acquires, same thread */ struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ - acpi_mutex os_mutex; /* Actual OS synchronization object */ + void *semaphore; /* Actual OS synchronization object */ union acpi_operand_object *prev; /* Link for list of acquired mutexes */ union acpi_operand_object *next; /* Link for list of acquired mutexes */ struct acpi_namespace_node *node; /* Containing namespace node */ @@ -156,23 +186,11 @@ struct acpi_object_mutex { struct acpi_object_region { ACPI_OBJECT_COMMON_HEADER u8 space_id; - struct acpi_namespace_node *node; /* Containing namespace node */ union acpi_operand_object *handler; /* Handler for region access */ + struct acpi_namespace_node *node; /* Containing namespace node */ union acpi_operand_object *next; - acpi_physical_address address; u32 length; -}; - -struct acpi_object_method { - ACPI_OBJECT_COMMON_HEADER u8 method_flags; - u8 param_count; - u8 sync_level; - union acpi_operand_object *mutex; - u8 *aml_start; - ACPI_INTERNAL_METHOD implementation; - u32 aml_length; - u8 thread_count; - acpi_owner_id owner_id; + acpi_physical_address address; }; /****************************************************************************** @@ -181,14 +199,6 @@ struct acpi_object_method { * *****************************************************************************/ -/* - * Common fields for objects that support ASL notifications - */ -#define ACPI_COMMON_NOTIFY_INFO \ - union acpi_operand_object *system_notify; /* Handler for system notifies */\ - union acpi_operand_object *device_notify; /* Handler for driver notifies */\ - union acpi_operand_object *handler; /* Handler for Address space */ - struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; @@ -203,9 +213,9 @@ struct acpi_object_power_resource { }; struct acpi_object_processor { - ACPI_OBJECT_COMMON_HEADER u8 proc_id; - u8 length; - ACPI_COMMON_NOTIFY_INFO acpi_io_address address; + ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 proc_id; + u32 length; + acpi_io_address address; }; struct acpi_object_thermal_zone { @@ -217,24 +227,9 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; * *****************************************************************************/ -/* - * Common bitfield for the field objects - * "Field Datum" -- a datum from the actual field object - * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field - */ -#define ACPI_COMMON_FIELD_INFO \ - u8 field_flags; /* Access, update, and lock bits */\ - u8 attribute; /* From access_as keyword */\ - u8 access_byte_width; /* Read/Write size in bytes */\ - struct acpi_namespace_node *node; /* Link back to parent node */\ - u32 bit_length; /* Length of field in bits */\ - u32 base_byte_offset; /* Byte offset within containing object */\ - u32 value; /* Value to store into the Bank or Index register */\ - u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ - u8 access_bit_width; /* Read/Write size in bits (8-64) */ - struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */ + ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing Operation Region object */ + /* (REGION/BANK fields only) */ }; struct acpi_object_region_field { @@ -249,7 +244,7 @@ struct acpi_object_bank_field { struct acpi_object_index_field { ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO /* - * No "RegionObj" pointer needed since the Index and Data registers + * No "region_obj" pointer needed since the Index and Data registers * are each field definitions unto themselves. */ union acpi_operand_object *index_obj; /* Index register */ @@ -274,9 +269,13 @@ struct acpi_object_notify_handler { void *context; }; +/* Flags for address handler */ + +#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1 + struct acpi_object_addr_handler { ACPI_OBJECT_COMMON_HEADER u8 space_id; - u8 handler_flags; + u16 hflags; acpi_adr_space_handler handler; struct acpi_namespace_node *node; /* Parent device */ void *context; @@ -285,10 +284,6 @@ struct acpi_object_addr_handler { union acpi_operand_object *next; }; -/* Flags for address handler (handler_flags) */ - -#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 - /****************************************************************************** * * Special internal objects @@ -302,10 +297,10 @@ struct acpi_object_addr_handler { struct acpi_object_reference { ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for index_op */ u16 opcode; - void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ + u32 offset; /* Used for arg_op, local_op, and index_op */ + void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */ struct acpi_namespace_node *node; union acpi_operand_object **where; - u32 offset; /* Used for arg_op, local_op, and index_op */ }; /* @@ -316,10 +311,12 @@ struct acpi_object_reference { * Currently: Region and field_unit types */ struct acpi_object_extra { - ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ - void *region_context; /* Region-specific data */ - u8 *aml_start; + ACPI_OBJECT_COMMON_HEADER u8 byte_fill1; + u16 word_fill1; u32 aml_length; + u8 *aml_start; + struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ + void *region_context; /* Region-specific data */ }; /* Additional data that can be attached to namespace nodes */ @@ -394,13 +391,8 @@ union acpi_operand_object { #define ACPI_DESC_TYPE_NAMED 0x0F #define ACPI_DESC_TYPE_MAX 0x0F -struct acpi_common_descriptor { - void *common_pointer; - u8 descriptor_type; /* To differentiate various internal objs */ -}; - union acpi_descriptor { - struct acpi_common_descriptor common; + u8 descriptor_id; /* To differentiate various internal objs */ union acpi_operand_object object; struct acpi_namespace_node node; union acpi_parse_object op; diff --git a/include/acpi/acopcode.h b/include/acpi/acopcode.h index 7659a46bc..e6d78bd9e 100644 --- a/include/acpi/acopcode.h +++ b/include/acpi/acopcode.h @@ -94,7 +94,7 @@ #define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME) #define ARGP_CONTINUE_OP ARG_NONE -#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME) +#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME) #define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) #define ARGP_CREATE_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) #define ARGP_CREATE_DWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 8d5039d0b..7785d481d 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -50,7 +50,7 @@ * component basis and a per-exception-type basis. */ -/* Component IDs are used in the global "DebugLayer" */ +/* Component IDs are used in the global "debug_layer" */ #define ACPI_UTILITIES 0x00000001 #define ACPI_HARDWARE 0x00000002 @@ -121,7 +121,7 @@ #define ACPI_LV_INTERRUPTS 0x08000000 #define ACPI_LV_VERBOSITY3 0x0F000000 | ACPI_LV_VERBOSITY2 -/* Exceptionally verbose output -- also used in the global "DebugLevel" */ +/* Exceptionally verbose output -- also used in the global "debug_level" */ #define ACPI_LV_AML_DISASSEMBLE 0x10000000 #define ACPI_LV_VERBOSE_INFO 0x20000000 @@ -135,7 +135,7 @@ */ #define ACPI_DEBUG_LEVEL(dl) (u32) dl,ACPI_DEBUG_PARAMETERS -/* Exception level -- used in the global "DebugLevel" */ +/* Exception level -- used in the global "debug_level" */ #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) @@ -144,13 +144,13 @@ /* * These two levels are essentially obsolete, all instances in the - * ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING + * ACPICA core code have been replaced by REPORT_ERROR and REPORT_WARNING * (Kept here because some drivers may still use them) */ #define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR) #define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN) -/* Trace level -- also used in the global "DebugLevel" */ +/* Trace level -- also used in the global "debug_level" */ #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) #define ACPI_DB_THREADS ACPI_DEBUG_LEVEL (ACPI_LV_THREADS) diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index 9d49d3c41..5a1ff484a 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h @@ -46,7 +46,7 @@ #define OP_HAS_RETURN_VALUE 1 -/* Variable number of arguments. This field must be 32 bits */ +/* variable # arguments */ #define ACPI_VAR_ARGS ACPI_UINT32_MAX @@ -71,7 +71,7 @@ /* * psxface - Parser external interfaces */ -acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info); +acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info); /* * psargs - Parse AML opcode arguments diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index f338e40bd..6dca3d542 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -26,7 +26,7 @@ #ifndef __ACPI_BUS_H__ #define __ACPI_BUS_H__ -#include +#include #include @@ -59,7 +59,7 @@ acpi_evaluate_reference(acpi_handle handle, #define ACPI_BUS_FILE_ROOT "acpi" extern struct proc_dir_entry *acpi_root_dir; -extern struct fadt_descriptor acpi_fadt; +extern FADT_DESCRIPTOR acpi_fadt; enum acpi_bus_removal_type { ACPI_BUS_REMOVAL_NORMAL = 0, @@ -169,8 +169,7 @@ struct acpi_device_flags { u32 power_manageable:1; u32 performance_manageable:1; u32 wake_capable:1; /* Wakeup(_PRW) supported? */ - u32 force_power_state:1; - u32 reserved:19; + u32 reserved:20; }; /* File System */ @@ -297,7 +296,6 @@ struct acpi_device { struct acpi_driver *driver; void *driver_data; struct kobject kobj; - struct device dev; }; #define acpi_driver_data(d) ((d)->driver_data) @@ -329,12 +327,12 @@ int acpi_bus_set_power(acpi_handle handle, int state); int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data); int acpi_bus_receive_event(struct acpi_bus_event *event); int acpi_bus_register_driver(struct acpi_driver *driver); -void acpi_bus_unregister_driver(struct acpi_driver *driver); +int acpi_bus_unregister_driver(struct acpi_driver *driver); int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, acpi_handle handle, int type); int acpi_bus_trim(struct acpi_device *start, int rmdevice); int acpi_bus_start(struct acpi_device *device); -acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd); + int acpi_match_ids(struct acpi_device *device, char *ids); int acpi_create_dir(struct acpi_device *); void acpi_remove_dir(struct acpi_device *); diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 6a5bdcefe..b425f9bb6 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h @@ -110,21 +110,4 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type); extern int acpi_specific_hotkey_enabled; -/*-------------------------------------------------------------------------- - Dock Station - -------------------------------------------------------------------------- */ -#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE) -extern int is_dock_device(acpi_handle handle); -extern int register_dock_notifier(struct notifier_block *nb); -extern void unregister_dock_notifier(struct notifier_block *nb); -extern int register_hotplug_dock_device(acpi_handle handle, - acpi_notify_handler handler, void *context); -extern void unregister_hotplug_dock_device(acpi_handle handle); -#else -#define is_dock_device(h) (0) -#define register_dock_notifier(nb) (-ENODEV) -#define unregister_dock_notifier(nb) do { } while(0) -#define register_hotplug_dock_device(h1, h2, c) (-ENODEV) -#define unregister_hotplug_dock_device(h) do { } while(0) -#endif #endif /*__ACPI_DRIVERS_H__*/ diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h deleted file mode 100644 index 1049f2a0a..000000000 --- a/include/acpi/acpi_numa.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __ACPI_NUMA_H -#define __ACPI_NUMA_H - -#ifdef CONFIG_ACPI_NUMA -#include - -/* Proximity bitmap length */ -#if MAX_NUMNODES > 256 -#define MAX_PXM_DOMAINS MAX_NUMNODES -#else -#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */ -#endif - -extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]; -extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]; - -extern int __cpuinit pxm_to_node(int); -extern int __cpuinit node_to_pxm(int); -extern int __cpuinit acpi_map_pxm_to_node(int); -extern void __cpuinit acpi_unmap_pxm_to_node(int); - -#endif /* CONFIG_ACPI_NUMA */ -#endif /* __ACP_NUMA_H */ diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 0cd63bce0..970e9a637 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -50,16 +50,12 @@ #include "platform/acenv.h" #include "actypes.h" -/* Types for acpi_os_execute */ +/* Priorities for acpi_os_queue_for_execution */ -typedef enum { - OSL_GLOBAL_LOCK_HANDLER, - OSL_NOTIFY_HANDLER, - OSL_GPE_HANDLER, - OSL_DEBUGGER_THREAD, - OSL_EC_POLL_HANDLER, - OSL_EC_BURST_HANDLER -} acpi_execute_type; +#define OSD_PRIORITY_GPE 1 +#define OSD_PRIORITY_HIGH 2 +#define OSD_PRIORITY_MED 3 +#define OSD_PRIORITY_LO 4 #define ACPI_NO_UNIT_LIMIT ((u32) -1) #define ACPI_MUTEX_SEM 1 @@ -96,53 +92,33 @@ acpi_os_table_override(struct acpi_table_header *existing_table, struct acpi_table_header **new_table); /* - * Spinlock primitives - */ -acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); - -void acpi_os_delete_lock(acpi_spinlock handle); - -acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); - -void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); - -/* - * Semaphore primitives + * Synchronization primitives */ acpi_status acpi_os_create_semaphore(u32 max_units, - u32 initial_units, acpi_semaphore * out_handle); + u32 initial_units, acpi_handle * out_handle); -acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); +acpi_status acpi_os_delete_semaphore(acpi_handle handle); -acpi_status -acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); - -acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); - -/* - * Mutex primitives - */ -acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); +acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); -void acpi_os_delete_mutex(acpi_mutex handle); +acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); -acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); +acpi_status acpi_os_create_lock(acpi_handle * out_handle); -void acpi_os_release_mutex(acpi_mutex handle); +void acpi_os_delete_lock(acpi_handle handle); -/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */ +acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); -#define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle) -#define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle) -#define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time) -#define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1) +void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); /* * Memory allocation and mapping */ void *acpi_os_allocate(acpi_size size); +void acpi_os_free(void *memory); + acpi_status acpi_os_map_memory(acpi_physical_address physical_address, acpi_size size, void __iomem ** logical_address); @@ -185,11 +161,13 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); /* * Threads and Scheduling */ -acpi_thread_id acpi_os_get_thread_id(void); +u32 acpi_os_get_thread_id(void); acpi_status -acpi_os_execute(acpi_execute_type type, - acpi_osd_exec_callback function, void *context); +acpi_os_queue_for_execution(u32 priority, + acpi_osd_exec_callback function, void *context); + +void acpi_os_wait_events_complete(void *context); void acpi_os_wait_events_complete(void *context); @@ -236,12 +214,6 @@ acpi_os_derive_pci_id(acpi_handle rhandle, /* * Miscellaneous */ -acpi_status acpi_os_validate_interface(char *interface); - -acpi_status -acpi_os_validate_address(u8 space_id, - acpi_physical_address address, acpi_size length); - u8 acpi_os_readable(void *pointer, acpi_size length); #ifdef ACPI_FUTURE_USAGE @@ -283,4 +255,11 @@ char *acpi_os_get_next_filename(void *dir_handle); void acpi_os_close_directory(void *dir_handle); +/* + * Debug + */ +void +acpi_os_dbg_assert(void *failed_assertion, + void *file_name, u32 line_number, char *message); + #endif /* __ACPIOSXF_H__ */ diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 049e9aa1b..66cf2ecef 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -268,7 +268,7 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); * Resource interfaces */ typedef -acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * resource, +acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource, void *context); acpi_status @@ -290,7 +290,7 @@ acpi_get_possible_resources(acpi_handle device_handle, acpi_status acpi_walk_resources(acpi_handle device_handle, char *name, - acpi_walk_resource_callback user_function, void *context); + ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); acpi_status acpi_set_current_resources(acpi_handle device_handle, diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index 80a3b3357..fa02e8083 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h @@ -50,13 +50,9 @@ /* * If possible, pack the following structures to byte alignment, since we - * don't care about performance for debug output. Two cases where we cannot - * pack the structures: - * - * 1) Hardware does not support misaligned memory transfers - * 2) Compiler does not support pointers within packed structures + * don't care about performance for debug output */ -#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) +#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED #pragma pack(1) #endif @@ -168,26 +164,23 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* * rsutils */ - acpi_status -acpi_rs_get_prt_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer); +acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); acpi_status -acpi_rs_get_crs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer); +acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); +#ifdef ACPI_FUTURE_USAGE acpi_status -acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer); +acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); +#endif /* ACPI_FUTURE_USAGE */ acpi_status acpi_rs_get_method_data(acpi_handle handle, char *path, struct acpi_buffer *ret_buffer); acpi_status -acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer); +acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); /* * rscalc @@ -205,9 +198,8 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, acpi_size * buffer_size_needed); acpi_status -acpi_rs_convert_aml_to_resources(u8 * aml, - u32 length, - u32 offset, u8 resource_index, void **context); +acpi_rs_convert_aml_to_resources(u8 * aml_buffer, + u32 aml_buffer_length, u8 * output_buffer); acpi_status acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index 5e8095f0f..d8c1c2cda 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h @@ -44,8 +44,6 @@ #ifndef __ACSTRUCT_H__ #define __ACSTRUCT_H__ -/* acpisrc:struct_defs -- for acpisrc conversion */ - /***************************************************************************** * * Tree walking typedefs and structs @@ -53,76 +51,67 @@ ****************************************************************************/ /* - * Walk state - current state of a parse tree walk. Used for both a leisurely - * stroll through the tree (for whatever reason), and for control method - * execution. + * Walk state - current state of a parse tree walk. Used for both a leisurely stroll through + * the tree (for whatever reason), and for control method execution. */ #define ACPI_NEXT_OP_DOWNWARD 1 #define ACPI_NEXT_OP_UPWARD 2 -/* - * Groups of definitions for walk_type used for different implementations of - * walkers (never simultaneously) - flags for interpreter: - */ #define ACPI_WALK_NON_METHOD 0 -#define ACPI_WALK_METHOD 0x01 -#define ACPI_WALK_METHOD_RESTART 0x02 - -/* Flags for i_aSL compiler only */ - -#define ACPI_WALK_CONST_REQUIRED 0x10 -#define ACPI_WALK_CONST_OPTIONAL 0x20 +#define ACPI_WALK_METHOD 1 +#define ACPI_WALK_METHOD_RESTART 2 +#define ACPI_WALK_CONST_REQUIRED 3 +#define ACPI_WALK_CONST_OPTIONAL 4 struct acpi_walk_state { - struct acpi_walk_state *next; /* Next walk_state in list */ - u8 descriptor_type; /* To differentiate various internal objs */ + u8 data_type; /* To differentiate various internal objs MUST BE FIRST! */ u8 walk_type; - u16 opcode; /* Current AML opcode */ - u8 next_op_info; /* Info about next_op */ - u8 num_operands; /* Stack pointer for Operands[] array */ acpi_owner_id owner_id; /* Owner of objects created during the walk */ u8 last_predicate; /* Result of last predicate */ - u8 current_result; + u8 current_result; /* */ + u8 next_op_info; /* Info about next_op */ + u8 num_operands; /* Stack pointer for Operands[] array */ u8 return_used; + u16 opcode; /* Current AML opcode */ u8 scope_depth; u8 pass_number; /* Parse pass during table load */ + u32 arg_count; /* push for fixed or var args */ u32 aml_offset; u32 arg_types; u32 method_breakpoint; /* For single stepping */ u32 user_breakpoint; /* User AML breakpoint */ u32 parse_flags; - - struct acpi_parse_state parser_state; /* Current state of parser */ u32 prev_arg_types; - u32 arg_count; /* push for fixed or var args */ - - struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ - struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */ - union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */ - union acpi_operand_object **params; u8 *aml_last_while; + struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ union acpi_operand_object **caller_return_desc; union acpi_generic_state *control_state; /* List of control states (nested IFs) */ struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */ struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */ union acpi_operand_object *implicit_return_obj; + struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */ struct acpi_namespace_node *method_call_node; /* Called method Node */ union acpi_parse_object *method_call_op; /* method_call Op if running a method */ union acpi_operand_object *method_desc; /* Method descriptor if running a method */ struct acpi_namespace_node *method_node; /* Method node if running a method. */ union acpi_parse_object *op; /* Current parser op */ + union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */ const struct acpi_opcode_info *op_info; /* Info on current opcode */ union acpi_parse_object *origin; /* Start of walk [Obsolete] */ + union acpi_operand_object **params; + struct acpi_parse_state parser_state; /* Current state of parser */ union acpi_operand_object *result_obj; union acpi_generic_state *results; /* Stack of accumulated results */ union acpi_operand_object *return_desc; /* Return object, if any */ union acpi_generic_state *scope_info; /* Stack of nested scopes */ + union acpi_parse_object *prev_op; /* Last op that was processed */ union acpi_parse_object *next_op; /* next op to be processed */ - struct acpi_thread_state *thread; acpi_parse_downwards descending_callback; acpi_parse_upwards ascending_callback; + struct acpi_thread_state *thread; + struct acpi_walk_state *next; /* Next walk_state in list */ }; /* Info used by acpi_ps_init_objects */ @@ -142,6 +131,32 @@ struct acpi_init_walk_info { struct acpi_table_desc *table_desc; }; +/* Info used by acpi_ns_initialize_devices */ + +struct acpi_device_walk_info { + u16 device_count; + u16 num_STA; + u16 num_INI; + struct acpi_table_desc *table_desc; +}; + +/* TBD: [Restructure] Merge with struct above */ + +struct acpi_walk_info { + u32 debug_level; + u32 count; + acpi_owner_id owner_id; + u8 display_type; +}; + +/* Display Types */ + +#define ACPI_DISPLAY_SUMMARY (u8) 0 +#define ACPI_DISPLAY_OBJECTS (u8) 1 +#define ACPI_DISPLAY_MASK (u8) 1 + +#define ACPI_DISPLAY_SHORT (u8) 2 + struct acpi_get_devices_info { acpi_walk_callback user_function; void *context; @@ -174,21 +189,16 @@ union acpi_aml_operands { } mid; }; -/* - * Structure used to pass object evaluation parameters. - * Purpose is to reduce CPU stack use. - */ -struct acpi_evaluate_info { - struct acpi_namespace_node *prefix_node; - char *pathname; +/* Internal method parameter list */ + +struct acpi_parameter_info { + struct acpi_namespace_node *node; union acpi_operand_object *obj_desc; union acpi_operand_object **parameters; - struct acpi_namespace_node *resolved_node; union acpi_operand_object *return_object; u8 pass_number; u8 parameter_type; u8 return_object_type; - u8 flags; }; /* Types for parameter_type above */ @@ -196,35 +206,4 @@ struct acpi_evaluate_info { #define ACPI_PARAM_ARGS 0 #define ACPI_PARAM_GPE 1 -/* Values for Flags above */ - -#define ACPI_IGNORE_RETURN_VALUE 1 - -/* Info used by acpi_ns_initialize_devices */ - -struct acpi_device_walk_info { - u16 device_count; - u16 num_STA; - u16 num_INI; - struct acpi_table_desc *table_desc; - struct acpi_evaluate_info *evaluate_info; -}; - -/* TBD: [Restructure] Merge with struct above */ - -struct acpi_walk_info { - u32 debug_level; - u32 count; - acpi_owner_id owner_id; - u8 display_type; -}; - -/* Display Types */ - -#define ACPI_DISPLAY_SUMMARY (u8) 0 -#define ACPI_DISPLAY_OBJECTS (u8) 1 -#define ACPI_DISPLAY_MASK (u8) 1 - -#define ACPI_DISPLAY_SHORT (u8) 2 - #endif diff --git a/include/acpi/actables.h b/include/acpi/actables.h index 4dbaf02fe..30a47542e 100644 --- a/include/acpi/actables.h +++ b/include/acpi/actables.h @@ -136,11 +136,7 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc); acpi_status acpi_tb_verify_table_checksum(struct acpi_table_header *table_header); -u8 acpi_tb_sum_table(void *buffer, u32 length); - -u8 acpi_tb_generate_checksum(struct acpi_table_header *table); - -void acpi_tb_set_checksum(struct acpi_table_header *table); +u8 acpi_tb_generate_checksum(void *buffer, u32 length); acpi_status acpi_tb_validate_table_header(struct acpi_table_header *table_header); diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index b125ceed9..ed53f842d 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Name: actbl.h - Basic ACPI Table Definitions + * Name: actbl.h - Table data structures defined in ACPI specification * *****************************************************************************/ @@ -45,45 +45,66 @@ #define __ACTBL_H__ /* - * Values for description table header signatures. Useful because they make - * it more difficult to inadvertently type in the wrong signature. + * Note about bitfields: The u8 type is used for bitfields in ACPI tables. + * This is the only type that is even remotely portable. Anything else is not + * portable, so do not use any other bitfield types. + */ + +/* + * Values for description table header signatures */ +#define RSDP_NAME "RSDP" +#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ +#define APIC_SIG "APIC" /* Multiple APIC Description Table */ #define DSDT_SIG "DSDT" /* Differentiated System Description Table */ #define FADT_SIG "FACP" /* Fixed ACPI Description Table */ #define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ #define PSDT_SIG "PSDT" /* Persistent System Description Table */ -#define RSDP_SIG "RSD PTR " /* Root System Description Pointer */ #define RSDT_SIG "RSDT" /* Root System Description Table */ #define XSDT_SIG "XSDT" /* Extended System Description Table */ #define SSDT_SIG "SSDT" /* Secondary System Description Table */ -#define RSDP_NAME "RSDP" +#define SBST_SIG "SBST" /* Smart Battery Specification Table */ +#define SPIC_SIG "SPIC" /* IOSAPIC table */ +#define BOOT_SIG "BOOT" /* Boot table */ + +#define GL_OWNED 0x02 /* Ownership of global lock is bit 1 */ /* - * All tables and structures must be byte-packed to match the ACPI - * specification, since the tables are provided by the system BIOS + * Common table types. The base code can remain + * constant if the underlying tables are changed */ +#define RSDT_DESCRIPTOR struct rsdt_descriptor_rev2 +#define XSDT_DESCRIPTOR struct xsdt_descriptor_rev2 +#define FACS_DESCRIPTOR struct facs_descriptor_rev2 +#define FADT_DESCRIPTOR struct fadt_descriptor_rev2 + #pragma pack(1) /* - * These are the ACPI tables that are directly consumed by the subsystem. - * - * The RSDP and FACS do not use the common ACPI table header. All other ACPI - * tables use the header. + * ACPI Version-independent tables * - * Note about bitfields: The u8 type is used for bitfields in ACPI tables. - * This is the only type that is even remotely portable. Anything else is not - * portable, so do not use any other bitfield types. + * NOTE: The tables that are specific to ACPI versions (1.0, 2.0, etc.) + * are in separate files. */ +struct rsdp_descriptor { /* Root System Descriptor Pointer */ + char signature[8]; /* ACPI signature, contains "RSD PTR " */ + u8 checksum; /* ACPI 1.0 checksum */ + char oem_id[6]; /* OEM identification */ + u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ + u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ + u32 length; /* XSDT Length in bytes, including header */ + u64 xsdt_physical_address; /* 64-bit physical address of the XSDT */ + u8 extended_checksum; /* Checksum of entire table (ACPI 2.0) */ + char reserved[3]; /* Reserved, must be zero */ +}; -/******************************************************************************* - * - * ACPI Table Header. This common header is used by all tables except the - * RSDP and FACS. The define is used for direct inclusion of header into - * other ACPI tables - * - ******************************************************************************/ +struct acpi_common_facs { /* Common FACS for internal use */ + u32 *global_lock; + u64 *firmware_waking_vector; + u8 vector_width; +}; -#define ACPI_TABLE_HEADER_DEF \ +#define ACPI_TABLE_HEADER_DEF /* ACPI common table header */ \ char signature[4]; /* ASCII table signature */\ u32 length; /* Length of table in bytes, including this header */\ u8 revision; /* ACPI Specification minor version # */\ @@ -91,237 +112,152 @@ char oem_id[6]; /* ASCII OEM identification */\ char oem_table_id[8]; /* ASCII OEM table identification */\ u32 oem_revision; /* OEM revision number */\ - char asl_compiler_id[4]; /* ASCII ASL compiler vendor ID */\ + char asl_compiler_id [4]; /* ASCII ASL compiler vendor ID */\ u32 asl_compiler_revision; /* ASL compiler version */ -struct acpi_table_header { +struct acpi_table_header { /* ACPI common table header */ ACPI_TABLE_HEADER_DEF}; /* - * GAS - Generic Address Structure (ACPI 2.0+) + * MADT values and structures */ -struct acpi_generic_address { - u8 address_space_id; /* Address space where struct or register exists */ - u8 register_bit_width; /* Size in bits of given register */ - u8 register_bit_offset; /* Bit offset within the register */ - u8 access_width; /* Minimum Access size (ACPI 3.0) */ - u64 address; /* 64-bit address of struct or register */ -}; -/******************************************************************************* - * - * RSDP - Root System Description Pointer (Signature is "RSD PTR ") - * - ******************************************************************************/ - -struct rsdp_descriptor { - char signature[8]; /* ACPI signature, contains "RSD PTR " */ - u8 checksum; /* ACPI 1.0 checksum */ - char oem_id[6]; /* OEM identification */ - u8 revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */ - u32 rsdt_physical_address; /* 32-bit physical address of the RSDT */ - u32 length; /* Table length in bytes, including header (ACPI 2.0+) */ - u64 xsdt_physical_address; /* 64-bit physical address of the XSDT (ACPI 2.0+) */ - u8 extended_checksum; /* Checksum of entire table (ACPI 2.0+) */ - u8 reserved[3]; /* Reserved, must be zero */ -}; +/* Values for MADT PCATCompat */ -#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ +#define DUAL_PIC 0 +#define MULTIPLE_APIC 1 -/******************************************************************************* - * - * RSDT/XSDT - Root System Description Tables - * - ******************************************************************************/ +/* Master MADT */ -struct rsdt_descriptor { - ACPI_TABLE_HEADER_DEF u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ -}; - -struct xsdt_descriptor { - ACPI_TABLE_HEADER_DEF u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ -}; - -/******************************************************************************* - * - * FACS - Firmware ACPI Control Structure (FACS) - * - ******************************************************************************/ - -struct facs_descriptor { - char signature[4]; /* ASCII table signature */ - u32 length; /* Length of structure, in bytes */ - u32 hardware_signature; /* Hardware configuration signature */ - u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector */ - u32 global_lock; /* Global Lock for shared hardware resources */ +struct multiple_apic_table { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + u32 local_apic_address; /* Physical address of local APIC */ /* Flags (32 bits) */ - u8 S4bios_f:1; /* 00: S4BIOS support is present */ + u8 PCATcompat:1; /* 00: System also has dual 8259s */ u8:7; /* 01-07: Reserved, must be zero */ u8 reserved1[3]; /* 08-31: Reserved, must be zero */ - - u64 xfirmware_waking_vector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */ - u8 version; /* Version of this table (ACPI 2.0+) */ - u8 reserved[31]; /* Reserved, must be zero */ }; -#define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */ -#define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */ +/* Values for Type in APIC_HEADER_DEF */ + +#define APIC_PROCESSOR 0 +#define APIC_IO 1 +#define APIC_XRUPT_OVERRIDE 2 +#define APIC_NMI 3 +#define APIC_LOCAL_NMI 4 +#define APIC_ADDRESS_OVERRIDE 5 +#define APIC_IO_SAPIC 6 +#define APIC_LOCAL_SAPIC 7 +#define APIC_XRUPT_SOURCE 8 +#define APIC_RESERVED 9 /* 9 and greater are reserved */ /* - * Common FACS - This is a version-independent FACS structure used for internal use only + * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE) */ -struct acpi_common_facs { - u32 *global_lock; - u64 *firmware_waking_vector; - u8 vector_width; +#define APIC_HEADER_DEF /* Common APIC sub-structure header */\ + u8 type; \ + u8 length; + +struct apic_header { +APIC_HEADER_DEF}; + +/* Values for MPS INTI flags */ + +#define POLARITY_CONFORMS 0 +#define POLARITY_ACTIVE_HIGH 1 +#define POLARITY_RESERVED 2 +#define POLARITY_ACTIVE_LOW 3 + +#define TRIGGER_CONFORMS 0 +#define TRIGGER_EDGE 1 +#define TRIGGER_RESERVED 2 +#define TRIGGER_LEVEL 3 + +/* Common flag definitions (16 bits each) */ + +#define MPS_INTI_FLAGS \ + u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\ + u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\ + u8 : 4; /* 04-07: Reserved, must be zero */\ + u8 reserved1; /* 08-15: Reserved, must be zero */ + +#define LOCAL_APIC_FLAGS \ + u8 processor_enabled: 1; /* 00: Processor is usable if set */\ + u8 : 7; /* 01-07: Reserved, must be zero */\ + u8 reserved2; /* 08-15: Reserved, must be zero */ + +/* Sub-structures for MADT */ + +struct madt_processor_apic { + APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ + u8 local_apic_id; /* Processor's local APIC id */ + LOCAL_APIC_FLAGS}; + +struct madt_io_apic { + APIC_HEADER_DEF u8 io_apic_id; /* I/O APIC ID */ + u8 reserved; /* Reserved - must be zero */ + u32 address; /* APIC physical address */ + u32 interrupt; /* Global system interrupt where INTI + * lines start */ }; -/******************************************************************************* - * - * FADT - Fixed ACPI Description Table (Signature "FACP") - * - ******************************************************************************/ - -/* Fields common to all versions of the FADT */ - -#define ACPI_FADT_COMMON \ - ACPI_TABLE_HEADER_DEF \ - u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ - u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ - u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ - u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ - u16 sci_int; /* System vector of SCI interrupt */ \ - u32 smi_cmd; /* Port address of SMI command port */ \ - u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \ - u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \ - u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \ - u8 pstate_cnt; /* Processor performance state control*/ \ - u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a Event Reg Blk */ \ - u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b Event Reg Blk */ \ - u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ - u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ - u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ - u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ - u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ - u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ - u8 pm1_evt_len; /* Byte Length of ports at pm1_x_evt_blk */ \ - u8 pm1_cnt_len; /* Byte Length of ports at pm1_x_cnt_blk */ \ - u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ - u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ - u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ - u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \ - u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \ - u8 cst_cnt; /* Support for the _CST object and C States change notification.*/ \ - u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \ - u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \ - u16 flush_size; /* Processor's memory cache line width, in bytes */ \ - u16 flush_stride; /* Number of flush strides that need to be read */ \ - u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/ \ - u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/ \ - u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \ - u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \ - u8 century; /* Index to century in RTC CMOS RAM */ \ - u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \ - u8 reserved2; /* Reserved, must be zero */ +struct madt_interrupt_override { + APIC_HEADER_DEF u8 bus; /* 0 - ISA */ + u8 source; /* Interrupt source (IRQ) */ + u32 interrupt; /* Global system interrupt */ + MPS_INTI_FLAGS}; -/* - * ACPI 2.0+ FADT - */ -struct fadt_descriptor { - ACPI_FADT_COMMON - /* Flags (32 bits) */ - u8 wb_invd:1; /* 00: The wbinvd instruction works properly */ - u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */ - u8 proc_c1:1; /* 02: All processors support C1 state */ - u8 plvl2_up:1; /* 03: C2 state works on MP system */ - u8 pwr_button:1; /* 04: Power button is handled as a generic feature */ - u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */ - u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */ - u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */ - u8 tmr_val_ext:1; /* 08: tmr_val is 32 bits 0=24-bits */ - u8 dock_cap:1; /* 09: Docking supported */ - u8 reset_reg_sup:1; /* 10: System reset via the FADT RESET_REG supported */ - u8 sealed_case:1; /* 11: No internal expansion capabilities and case is sealed */ - u8 headless:1; /* 12: No local video capabilities or local input devices */ - u8 cpu_sw_sleep:1; /* 13: Must execute native instruction after writing SLP_TYPx register */ - - u8 pci_exp_wak:1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ - u8 use_platform_clock:1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ - u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ - u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ - u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ - u8 force_apic_physical_destination_mode:1; /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */ - u8:4; /* 20-23: Reserved, must be zero */ - u8 reserved3; /* 24-31: Reserved, must be zero */ - - struct acpi_generic_address reset_register; /* Reset register address in GAS format */ - u8 reset_value; /* Value to write to the reset_register port to reset the system */ - u8 reserved4[3]; /* These three bytes must be zero */ - u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ - u64 Xdsdt; /* 64-bit physical address of DSDT */ - struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */ - struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */ - struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */ - struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */ - struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */ - struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ - struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */ - struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */ +struct madt_nmi_source { + APIC_HEADER_DEF MPS_INTI_FLAGS u32 interrupt; /* Global system interrupt */ }; -/* - * "Down-revved" ACPI 2.0 FADT descriptor - * Defined here to allow compiler to generate the length of the struct - */ -struct fadt_descriptor_rev2_minus { - ACPI_FADT_COMMON u32 flags; - struct acpi_generic_address reset_register; /* Reset register address in GAS format */ - u8 reset_value; /* Value to write to the reset_register port to reset the system. */ - u8 reserved7[3]; /* Reserved, must be zero */ +struct madt_local_apic_nmi { + APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ + MPS_INTI_FLAGS u8 lint; /* LINTn to which NMI is connected */ }; -/* - * ACPI 1.0 FADT - * Defined here to allow compiler to generate the length of the struct - */ -struct fadt_descriptor_rev1 { - ACPI_FADT_COMMON u32 flags; +struct madt_address_override { + APIC_HEADER_DEF u16 reserved; /* Reserved, must be zero */ + u64 address; /* APIC physical address */ }; -/* FADT: Prefered Power Management Profiles */ - -#define PM_UNSPECIFIED 0 -#define PM_DESKTOP 1 -#define PM_MOBILE 2 -#define PM_WORKSTATION 3 -#define PM_ENTERPRISE_SERVER 4 -#define PM_SOHO_SERVER 5 -#define PM_APPLIANCE_PC 6 - -/* FADT: Boot Arch Flags */ - -#define BAF_LEGACY_DEVICES 0x0001 -#define BAF_8042_KEYBOARD_CONTROLLER 0x0002 - -#define FADT2_REVISION_ID 3 -#define FADT2_MINUS_REVISION_ID 2 +struct madt_io_sapic { + APIC_HEADER_DEF u8 io_sapic_id; /* I/O SAPIC ID */ + u8 reserved; /* Reserved, must be zero */ + u32 interrupt_base; /* Glocal interrupt for SAPIC start */ + u64 address; /* SAPIC physical address */ +}; -/* Reset to default packing */ +struct madt_local_sapic { + APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ + u8 local_sapic_id; /* SAPIC ID */ + u8 local_sapic_eid; /* SAPIC EID */ + u8 reserved[3]; /* Reserved, must be zero */ + LOCAL_APIC_FLAGS u32 processor_uID; /* Numeric UID - ACPI 3.0 */ + char processor_uIDstring[1]; /* String UID - ACPI 3.0 */ +}; -#pragma pack() +struct madt_interrupt_source { + APIC_HEADER_DEF MPS_INTI_FLAGS u8 interrupt_type; /* 1=PMI, 2=INIT, 3=corrected */ + u8 processor_id; /* Processor ID */ + u8 processor_eid; /* Processor EID */ + u8 io_sapic_vector; /* Vector value for PMI interrupts */ + u32 interrupt; /* Global system interrupt */ + u32 flags; /* Interrupt Source Flags */ +}; /* - * This macro is temporary until the table bitfield flag definitions - * are removed and replaced by a Flags field. + * Smart Battery */ -#define ACPI_FLAG_OFFSET(d,f,o) (u8) (ACPI_OFFSET (d,f) + \ - sizeof(((d *)0)->f) + o) -/* - * Get the remaining ACPI tables - */ -#include "actbl1.h" +struct smart_battery_table { + ACPI_TABLE_HEADER_DEF u32 warning_level; + u32 low_level; + u32 critical_level; +}; + +#pragma pack() /* * ACPI Table information. We save the table address, length, @@ -354,17 +290,27 @@ struct acpi_table_support { u8 flags; }; +/* + * Get the ACPI version-specific tables + */ +#include "actbl1.h" /* Acpi 1.0 table definitions */ +#include "actbl2.h" /* Acpi 2.0 table definitions */ + extern u8 acpi_fadt_is_v1; /* is set to 1 if FADT is revision 1, * needed for certain workarounds */ -/* Macros used to generate offsets to specific table fields */ -#define ACPI_FACS_OFFSET(f) (u8) ACPI_OFFSET (struct facs_descriptor,f) -#define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct fadt_descriptor, f) -#define ACPI_GAS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_generic_address,f) -#define ACPI_HDR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_header,f) -#define ACPI_RSDP_OFFSET(f) (u8) ACPI_OFFSET (struct rsdp_descriptor,f) +#pragma pack(1) +/* + * High performance timer + */ +struct hpet_table { + ACPI_TABLE_HEADER_DEF u32 hardware_id; + struct acpi_generic_address base_address; + u8 hpet_number; + u16 clock_tick; + u8 attributes; +}; -#define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct fadt_descriptor,f,o) -#define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct facs_descriptor,f,o) +#pragma pack() #endif /* __ACTBL_H__ */ diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 745a6445a..cd428d57a 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1,6 +1,6 @@ /****************************************************************************** * - * Name: actbl1.h - Additional ACPI table definitions + * Name: actbl1.h - ACPI 1.0 tables * *****************************************************************************/ @@ -44,599 +44,92 @@ #ifndef __ACTBL1_H__ #define __ACTBL1_H__ -/******************************************************************************* - * - * Additional ACPI Tables - * - * These tables are not consumed directly by the ACPICA subsystem, but are - * included here to support device drivers and the AML disassembler. - * - ******************************************************************************/ - -/* - * Values for description table header signatures. Useful because they make - * it more difficult to inadvertently type in the wrong signature. - */ -#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */ -#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */ -#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */ -#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */ -#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */ -#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ -#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ -#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ -#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ -#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ -#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ -#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ -#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ -#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ -#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ - -/* Legacy names */ - -#define APIC_SIG "APIC" /* Multiple APIC Description Table */ -#define BOOT_SIG "BOOT" /* Simple Boot Flag Table */ -#define SBST_SIG "SBST" /* Smart Battery Specification Table */ - -/* - * All tables must be byte-packed to match the ACPI specification, since - * the tables are provided by the system BIOS. - */ #pragma pack(1) /* - * Note about bitfields: The u8 type is used for bitfields in ACPI tables. - * This is the only type that is even remotely portable. Anything else is not - * portable, so do not use any other bitfield types. + * ACPI 1.0 Root System Description Table (RSDT) */ - -/******************************************************************************* - * - * ASF - Alert Standard Format table (Signature "ASF!") - * - ******************************************************************************/ - -struct acpi_table_asf { -ACPI_TABLE_HEADER_DEF}; - -#define ACPI_ASF_HEADER_DEF \ - u8 type; \ - u8 reserved; \ - u16 length; - -struct acpi_asf_header { -ACPI_ASF_HEADER_DEF}; - -/* Values for Type field */ - -#define ASF_INFO 0 -#define ASF_ALERT 1 -#define ASF_CONTROL 2 -#define ASF_BOOT 3 -#define ASF_ADDRESS 4 -#define ASF_RESERVED 5 +struct rsdt_descriptor_rev1 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ +}; /* - * ASF subtables + * ACPI 1.0 Firmware ACPI Control Structure (FACS) */ - -/* 0: ASF Information */ - -struct acpi_asf_info { - ACPI_ASF_HEADER_DEF u8 min_reset_value; - u8 min_poll_interval; - u16 system_id; - u32 mfg_id; - u8 flags; - u8 reserved2[3]; -}; - -/* 1: ASF Alerts */ - -struct acpi_asf_alert { - ACPI_ASF_HEADER_DEF u8 assert_mask; - u8 deassert_mask; - u8 alerts; - u8 data_length; - u8 array[1]; -}; - -/* 2: ASF Remote Control */ - -struct acpi_asf_remote { - ACPI_ASF_HEADER_DEF u8 controls; - u8 data_length; - u16 reserved2; - u8 array[1]; -}; - -/* 3: ASF RMCP Boot Options */ - -struct acpi_asf_rmcp { - ACPI_ASF_HEADER_DEF u8 capabilities[7]; - u8 completion_code; - u32 enterprise_id; - u8 command; - u16 parameter; - u16 boot_options; - u16 oem_parameters; -}; - -/* 4: ASF Address */ - -struct acpi_asf_address { - ACPI_ASF_HEADER_DEF u8 eprom_address; - u8 devices; - u8 smbus_addresses[1]; -}; - -/******************************************************************************* - * - * BOOT - Simple Boot Flag Table - * - ******************************************************************************/ - -struct acpi_table_boot { - ACPI_TABLE_HEADER_DEF u8 cmos_index; /* Index in CMOS RAM for the boot register */ - u8 reserved[3]; -}; - -/******************************************************************************* - * - * CPEP - Corrected Platform Error Polling table - * - ******************************************************************************/ - -struct acpi_table_cpep { - ACPI_TABLE_HEADER_DEF u64 reserved; -}; - -/* Subtable */ - -struct acpi_cpep_polling { - u8 type; - u8 length; - u8 processor_id; /* Processor ID */ - u8 processor_eid; /* Processor EID */ - u32 polling_interval; /* Polling interval (msec) */ -}; - -/******************************************************************************* - * - * DBGP - Debug Port table - * - ******************************************************************************/ - -struct acpi_table_dbgp { - ACPI_TABLE_HEADER_DEF u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ - u8 reserved[3]; - struct acpi_generic_address debug_port; -}; - -/******************************************************************************* - * - * ECDT - Embedded Controller Boot Resources Table - * - ******************************************************************************/ - -struct ec_boot_resources { - ACPI_TABLE_HEADER_DEF struct acpi_generic_address ec_control; /* Address of EC command/status register */ - struct acpi_generic_address ec_data; /* Address of EC data register */ - u32 uid; /* Unique ID - must be same as the EC _UID method */ - u8 gpe_bit; /* The GPE for the EC */ - u8 ec_id[1]; /* Full namepath of the EC in the ACPI namespace */ -}; - -/******************************************************************************* - * - * HPET - High Precision Event Timer table - * - ******************************************************************************/ - -struct acpi_hpet_table { - ACPI_TABLE_HEADER_DEF u32 hardware_id; /* Hardware ID of event timer block */ - struct acpi_generic_address base_address; /* Address of event timer block */ - u8 hpet_number; /* HPET sequence number */ - u16 clock_tick; /* Main counter min tick, periodic mode */ - u8 attributes; -}; - -#if 0 /* HPET flags to be converted to macros */ -struct { /* Flags (8 bits) */ - u8 page_protect:1; /* 00: No page protection */ - u8 page_protect4:1; /* 01: 4_kB page protected */ - u8 page_protect64:1; /* 02: 64_kB page protected */ - u8:5; /* 03-07: Reserved, must be zero */ -} flags; -#endif - -/******************************************************************************* - * - * MADT - Multiple APIC Description Table - * - ******************************************************************************/ - -struct multiple_apic_table { - ACPI_TABLE_HEADER_DEF u32 local_apic_address; /* Physical address of local APIC */ +struct facs_descriptor_rev1 { + char signature[4]; /* ASCII table signature */ + u32 length; /* Length of structure in bytes */ + u32 hardware_signature; /* Hardware configuration signature */ + u32 firmware_waking_vector; /* ACPI OS waking vector */ + u32 global_lock; /* Global Lock */ /* Flags (32 bits) */ - u8 PCATcompat:1; /* 00: System also has dual 8259s */ + u8 S4bios_f:1; /* 00: S4BIOS support is present */ u8:7; /* 01-07: Reserved, must be zero */ u8 reserved1[3]; /* 08-31: Reserved, must be zero */ -}; - -/* Values for MADT PCATCompat */ - -#define DUAL_PIC 0 -#define MULTIPLE_APIC 1 - -/* Common MADT Sub-table header */ - -#define APIC_HEADER_DEF \ - u8 type; \ - u8 length; - -struct apic_header { -APIC_HEADER_DEF}; -/* Values for Type in struct apic_header */ - -#define APIC_PROCESSOR 0 -#define APIC_IO 1 -#define APIC_XRUPT_OVERRIDE 2 -#define APIC_NMI 3 -#define APIC_LOCAL_NMI 4 -#define APIC_ADDRESS_OVERRIDE 5 -#define APIC_IO_SAPIC 6 -#define APIC_LOCAL_SAPIC 7 -#define APIC_XRUPT_SOURCE 8 -#define APIC_RESERVED 9 /* 9 and greater are reserved */ - -/* Flag definitions for MADT sub-tables */ - -#define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \ - u8 polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\ - u8 trigger_mode : 2; /* 02-03: Trigger mode of APIC input signals */\ - u8 : 4; /* 04-07: Reserved, must be zero */\ - u8 reserved1; /* 08-15: Reserved, must be zero */ - -#define ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \ - u8 processor_enabled: 1; /* 00: Processor is usable if set */\ - u8 : 7; /* 01-07: Reserved, must be zero */\ - u8 reserved2[3]; /* 08-31: Reserved, must be zero */ - -/* Values for MPS INTI flags */ - -#define POLARITY_CONFORMS 0 -#define POLARITY_ACTIVE_HIGH 1 -#define POLARITY_RESERVED 2 -#define POLARITY_ACTIVE_LOW 3 - -#define TRIGGER_CONFORMS 0 -#define TRIGGER_EDGE 1 -#define TRIGGER_RESERVED 2 -#define TRIGGER_LEVEL 3 + u8 reserved2[40]; /* Reserved, must be zero */ +}; /* - * MADT Sub-tables, correspond to Type in struct apic_header + * ACPI 1.0 Fixed ACPI Description Table (FADT) */ - -/* 0: processor APIC */ - -struct madt_processor_apic { - APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ - u8 local_apic_id; /* Processor's local APIC id */ - ACPI_MADT_LFLAGS}; - -/* 1: IO APIC */ - -struct madt_io_apic { - APIC_HEADER_DEF u8 io_apic_id; /* I/O APIC ID */ - u8 reserved; /* Reserved - must be zero */ - u32 address; /* APIC physical address */ - u32 interrupt; /* Global system interrupt where INTI lines start */ -}; - -/* 2: Interrupt Override */ - -struct madt_interrupt_override { - APIC_HEADER_DEF u8 bus; /* 0 - ISA */ - u8 source; /* Interrupt source (IRQ) */ - u32 interrupt; /* Global system interrupt */ - ACPI_MADT_IFLAGS}; - -/* 3: NMI Sources */ - -struct madt_nmi_source { - APIC_HEADER_DEF ACPI_MADT_IFLAGS u32 interrupt; /* Global system interrupt */ -}; - -/* 4: Local APIC NMI */ - -struct madt_local_apic_nmi { - APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ - ACPI_MADT_IFLAGS u8 lint; /* LINTn to which NMI is connected */ -}; - -/* 5: Address Override */ - -struct madt_address_override { - APIC_HEADER_DEF u16 reserved; /* Reserved, must be zero */ - u64 address; /* APIC physical address */ -}; - -/* 6: I/O Sapic */ - -struct madt_io_sapic { - APIC_HEADER_DEF u8 io_sapic_id; /* I/O SAPIC ID */ - u8 reserved; /* Reserved, must be zero */ - u32 interrupt_base; /* Glocal interrupt for SAPIC start */ - u64 address; /* SAPIC physical address */ -}; - -/* 7: Local Sapic */ - -struct madt_local_sapic { - APIC_HEADER_DEF u8 processor_id; /* ACPI processor id */ - u8 local_sapic_id; /* SAPIC ID */ - u8 local_sapic_eid; /* SAPIC EID */ - u8 reserved[3]; /* Reserved, must be zero */ - ACPI_MADT_LFLAGS u32 processor_uID; /* Numeric UID - ACPI 3.0 */ - char processor_uIDstring[1]; /* String UID - ACPI 3.0 */ -}; - -/* 8: Platform Interrupt Source */ - -struct madt_interrupt_source { - APIC_HEADER_DEF ACPI_MADT_IFLAGS u8 interrupt_type; /* 1=PMI, 2=INIT, 3=corrected */ - u8 processor_id; /* Processor ID */ - u8 processor_eid; /* Processor EID */ - u8 io_sapic_vector; /* Vector value for PMI interrupts */ - u32 interrupt; /* Global system interrupt */ - u32 flags; /* Interrupt Source Flags */ -}; - -#ifdef DUPLICATE_DEFINITION_WITH_LINUX_ACPI_H -/******************************************************************************* - * - * MCFG - PCI Memory Mapped Configuration table and sub-table - * - ******************************************************************************/ - -struct acpi_table_mcfg { - ACPI_TABLE_HEADER_DEF u8 reserved[8]; -}; - -struct acpi_mcfg_allocation { - u64 base_address; /* Base address, processor-relative */ - u16 pci_segment; /* PCI segment group number */ - u8 start_bus_number; /* Starting PCI Bus number */ - u8 end_bus_number; /* Final PCI Bus number */ - u32 reserved; -}; -#endif - -/******************************************************************************* - * - * SBST - Smart Battery Specification Table - * - ******************************************************************************/ - -struct smart_battery_table { - ACPI_TABLE_HEADER_DEF u32 warning_level; - u32 low_level; - u32 critical_level; -}; - -/******************************************************************************* - * - * SLIT - System Locality Distance Information Table - * - ******************************************************************************/ - -struct system_locality_info { - ACPI_TABLE_HEADER_DEF u64 locality_count; - u8 entry[1][1]; -}; - -/******************************************************************************* - * - * SPCR - Serial Port Console Redirection table - * - ******************************************************************************/ - -struct acpi_table_spcr { - ACPI_TABLE_HEADER_DEF u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ - u8 reserved[3]; - struct acpi_generic_address serial_port; - u8 interrupt_type; - u8 pc_interrupt; - u32 interrupt; - u8 baud_rate; - u8 parity; - u8 stop_bits; - u8 flow_control; - u8 terminal_type; - u8 reserved2; - u16 pci_device_id; - u16 pci_vendor_id; - u8 pci_bus; - u8 pci_device; - u8 pci_function; - u32 pci_flags; - u8 pci_segment; - u32 reserved3; -}; - -/******************************************************************************* - * - * SPMI - Server Platform Management Interface table - * - ******************************************************************************/ - -struct acpi_table_spmi { - ACPI_TABLE_HEADER_DEF u8 reserved; - u8 interface_type; - u16 spec_revision; /* Version of IPMI */ - u8 interrupt_type; - u8 gpe_number; /* GPE assigned */ - u8 reserved2; - u8 pci_device_flag; - u32 interrupt; - struct acpi_generic_address ipmi_register; - u8 pci_segment; - u8 pci_bus; - u8 pci_device; - u8 pci_function; -}; - -/******************************************************************************* - * - * SRAT - System Resource Affinity Table - * - ******************************************************************************/ - -struct system_resource_affinity { - ACPI_TABLE_HEADER_DEF u32 reserved1; /* Must be value '1' */ - u64 reserved2; /* Reserved, must be zero */ -}; - -/* SRAT common sub-table header */ - -#define SRAT_SUBTABLE_HEADER \ - u8 type; \ - u8 length; - -/* Values for Type above */ - -#define SRAT_CPU_AFFINITY 0 -#define SRAT_MEMORY_AFFINITY 1 -#define SRAT_RESERVED 2 - -/* SRAT sub-tables */ - -struct static_resource_alloc { - SRAT_SUBTABLE_HEADER u8 proximity_domain_lo; - u8 apic_id; - - /* Flags (32 bits) */ - - u8 enabled:1; /* 00: Use affinity structure */ - u8:7; /* 01-07: Reserved, must be zero */ - u8 reserved3[3]; /* 08-31: Reserved, must be zero */ - - u8 local_sapic_eid; - u8 proximity_domain_hi[3]; - u32 reserved4; /* Reserved, must be zero */ -}; - -struct memory_affinity { - SRAT_SUBTABLE_HEADER u32 proximity_domain; - u16 reserved3; - u64 base_address; - u64 address_length; - u32 reserved4; +struct fadt_descriptor_rev1 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + u32 firmware_ctrl; /* Physical address of FACS */ + u32 dsdt; /* Physical address of DSDT */ + u8 model; /* System Interrupt Model */ + u8 reserved1; /* Reserved, must be zero */ + u16 sci_int; /* System vector of SCI interrupt */ + u32 smi_cmd; /* Port address of SMI command port */ + u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ + u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ + u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ + u8 reserved2; /* Reserved, must be zero */ + u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */ + u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */ + u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ + u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ + u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ + u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ + u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ + u32 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ + u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ + u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ + u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ + u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ + u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ + u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ + u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ + u8 reserved3; /* Reserved, must be zero */ + u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ + u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ + u16 flush_size; /* Size of area read to flush caches */ + u16 flush_stride; /* Stride used in flushing caches */ + u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */ + u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */ + u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ + u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ + u8 century; /* Index to century in RTC CMOS RAM */ + u8 reserved4[3]; /* Reserved, must be zero */ /* Flags (32 bits) */ - u8 enabled:1; /* 00: Use affinity structure */ - u8 hot_pluggable:1; /* 01: Memory region is hot pluggable */ - u8 non_volatile:1; /* 02: Memory is non-volatile */ - u8:5; /* 03-07: Reserved, must be zero */ - u8 reserved5[3]; /* 08-31: Reserved, must be zero */ - - u64 reserved6; /* Reserved, must be zero */ -}; - -/******************************************************************************* - * - * TCPA - Trusted Computing Platform Alliance table - * - ******************************************************************************/ - -struct acpi_table_tcpa { - ACPI_TABLE_HEADER_DEF u16 reserved; - u32 max_log_length; /* Maximum length for the event log area */ - u64 log_address; /* Address of the event log area */ + u8 wb_invd:1; /* 00: The wbinvd instruction works properly */ + u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */ + u8 proc_c1:1; /* 02: All processors support C1 state */ + u8 plvl2_up:1; /* 03: C2 state works on MP system */ + u8 pwr_button:1; /* 04: Power button is handled as a generic feature */ + u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */ + u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */ + u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */ + u8 tmr_val_ext:1; /* 08: tmr_val width is 32 bits (0 = 24 bits) */ + u8:7; /* 09-15: Reserved, must be zero */ + u8 reserved5[2]; /* 16-31: Reserved, must be zero */ }; -/******************************************************************************* - * - * WDRT - Watchdog Resource Table - * - ******************************************************************************/ - -struct acpi_table_wdrt { - ACPI_TABLE_HEADER_DEF u32 header_length; /* Watchdog Header Length */ - u8 pci_segment; /* PCI Segment number */ - u8 pci_bus; /* PCI Bus number */ - u8 pci_device; /* PCI Device number */ - u8 pci_function; /* PCI Function number */ - u32 timer_period; /* Period of one timer count (msec) */ - u32 max_count; /* Maximum counter value supported */ - u32 min_count; /* Minimum counter value */ - u8 flags; - u8 reserved[3]; - u32 entries; /* Number of watchdog entries that follow */ -}; - -#if 0 /* Flags, will be converted to macros */ -u8 enabled:1; /* 00: Timer enabled */ -u8:6; /* 01-06: Reserved */ -u8 sleep_stop:1; /* 07: Timer stopped in sleep state */ -#endif - -/* Macros used to generate offsets to specific table fields */ - -#define ACPI_ASF0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_info,f) -#define ACPI_ASF1_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_alert,f) -#define ACPI_ASF2_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_remote,f) -#define ACPI_ASF3_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_rmcp,f) -#define ACPI_ASF4_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_asf_address,f) -#define ACPI_BOOT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_boot,f) -#define ACPI_CPEP_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_cpep,f) -#define ACPI_CPEP0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_cpep_polling,f) -#define ACPI_DBGP_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_dbgp,f) -#define ACPI_ECDT_OFFSET(f) (u8) ACPI_OFFSET (struct ec_boot_resources,f) -#define ACPI_HPET_OFFSET(f) (u8) ACPI_OFFSET (struct hpet_table,f) -#define ACPI_MADT_OFFSET(f) (u8) ACPI_OFFSET (struct multiple_apic_table,f) -#define ACPI_MADT0_OFFSET(f) (u8) ACPI_OFFSET (struct madt_processor_apic,f) -#define ACPI_MADT1_OFFSET(f) (u8) ACPI_OFFSET (struct madt_io_apic,f) -#define ACPI_MADT2_OFFSET(f) (u8) ACPI_OFFSET (struct madt_interrupt_override,f) -#define ACPI_MADT3_OFFSET(f) (u8) ACPI_OFFSET (struct madt_nmi_source,f) -#define ACPI_MADT4_OFFSET(f) (u8) ACPI_OFFSET (struct madt_local_apic_nmi,f) -#define ACPI_MADT5_OFFSET(f) (u8) ACPI_OFFSET (struct madt_address_override,f) -#define ACPI_MADT6_OFFSET(f) (u8) ACPI_OFFSET (struct madt_io_sapic,f) -#define ACPI_MADT7_OFFSET(f) (u8) ACPI_OFFSET (struct madt_local_sapic,f) -#define ACPI_MADT8_OFFSET(f) (u8) ACPI_OFFSET (struct madt_interrupt_source,f) -#define ACPI_MADTH_OFFSET(f) (u8) ACPI_OFFSET (struct apic_header,f) -#define ACPI_MCFG_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_mcfg,f) -#define ACPI_MCFG0_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_mcfg_allocation,f) -#define ACPI_SBST_OFFSET(f) (u8) ACPI_OFFSET (struct smart_battery_table,f) -#define ACPI_SLIT_OFFSET(f) (u8) ACPI_OFFSET (struct system_locality_info,f) -#define ACPI_SPCR_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_spcr,f) -#define ACPI_SPMI_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_spmi,f) -#define ACPI_SRAT_OFFSET(f) (u8) ACPI_OFFSET (struct system_resource_affinity,f) -#define ACPI_SRAT0_OFFSET(f) (u8) ACPI_OFFSET (struct static_resource_alloc,f) -#define ACPI_SRAT1_OFFSET(f) (u8) ACPI_OFFSET (struct memory_affinity,f) -#define ACPI_TCPA_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_tcpa,f) -#define ACPI_WDRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_wdrt,f) - -#define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct hpet_table,f,o) -#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct static_resource_alloc,f,o) -#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct memory_affinity,f,o) -#define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct multiple_apic_table,f,o) -#define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_processor_apic,f,o) -#define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_interrupt_override,f,o) -#define ACPI_MADT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_nmi_source,f,o) -#define ACPI_MADT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_local_apic_nmi,f,o) -#define ACPI_MADT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_local_sapic,f,o) -#define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (struct madt_interrupt_source,f,o) - -/* Reset to default packing */ - #pragma pack() #endif /* __ACTBL1_H__ */ diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 67efe6cad..dfc7ac109 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -44,6 +44,234 @@ #ifndef __ACTBL2_H__ #define __ACTBL2_H__ -/* Code moved to both actbl.h and actbl1.h */ +/* + * Prefered Power Management Profiles + */ +#define PM_UNSPECIFIED 0 +#define PM_DESKTOP 1 +#define PM_MOBILE 2 +#define PM_WORKSTATION 3 +#define PM_ENTERPRISE_SERVER 4 +#define PM_SOHO_SERVER 5 +#define PM_APPLIANCE_PC 6 + +/* + * ACPI Boot Arch Flags + */ +#define BAF_LEGACY_DEVICES 0x0001 +#define BAF_8042_KEYBOARD_CONTROLLER 0x0002 + +#define FADT2_REVISION_ID 3 +#define FADT2_MINUS_REVISION_ID 2 + +#pragma pack(1) + +/* + * ACPI 2.0 Root System Description Table (RSDT) + */ +struct rsdt_descriptor_rev2 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + u32 table_offset_entry[1]; /* Array of pointers to ACPI tables */ +}; + +/* + * ACPI 2.0 Extended System Description Table (XSDT) + */ +struct xsdt_descriptor_rev2 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + u64 table_offset_entry[1]; /* Array of pointers to ACPI tables */ +}; + +/* + * ACPI 2.0 Firmware ACPI Control Structure (FACS) + */ +struct facs_descriptor_rev2 { + char signature[4]; /* ASCII table signature */ + u32 length; /* Length of structure, in bytes */ + u32 hardware_signature; /* Hardware configuration signature */ + u32 firmware_waking_vector; /* 32-bit physical address of the Firmware Waking Vector. */ + u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */ + + /* Flags (32 bits) */ + + u8 S4bios_f:1; /* 00: S4BIOS support is present */ + u8:7; /* 01-07: Reserved, must be zero */ + u8 reserved1[3]; /* 08-31: Reserved, must be zero */ + + u64 xfirmware_waking_vector; /* 64-bit physical address of the Firmware Waking Vector. */ + u8 version; /* Version of this table */ + u8 reserved3[31]; /* Reserved, must be zero */ +}; + +/* + * ACPI 2.0+ Generic Address Structure (GAS) + */ +struct acpi_generic_address { + u8 address_space_id; /* Address space where struct or register exists. */ + u8 register_bit_width; /* Size in bits of given register */ + u8 register_bit_offset; /* Bit offset within the register */ + u8 access_width; /* Minimum Access size (ACPI 3.0) */ + u64 address; /* 64-bit address of struct or register */ +}; + +#define FADT_REV2_COMMON \ + u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ + u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ + u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ + u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ + u16 sci_int; /* System vector of SCI interrupt */ \ + u32 smi_cmd; /* Port address of SMI command port */ \ + u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */ \ + u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \ + u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \ + u8 pstate_cnt; /* Processor performance state control*/ \ + u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */ \ + u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */ \ + u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ + u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ + u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ + u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ + u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ + u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ + u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ \ + u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ \ + u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ + u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ + u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ + u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */ \ + u8 gpe1_base; /* Offset in gpe model where gpe1 events start */ \ + u8 cst_cnt; /* Support for the _CST object and C States change notification.*/ \ + u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */ \ + u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */ \ + u16 flush_size; /* Number of flush strides that need to be read */ \ + u16 flush_stride; /* Processor's memory cache line width, in bytes */ \ + u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/ \ + u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/ \ + u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \ + u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \ + u8 century; /* Index to century in RTC CMOS RAM */ \ + u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ + +/* + * ACPI 2.0+ Fixed ACPI Description Table (FADT) + */ +struct fadt_descriptor_rev2 { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + FADT_REV2_COMMON u8 reserved2; /* Reserved, must be zero */ + + /* Flags (32 bits) */ + + u8 wb_invd:1; /* 00: The wbinvd instruction works properly */ + u8 wb_invd_flush:1; /* 01: The wbinvd flushes but does not invalidate */ + u8 proc_c1:1; /* 02: All processors support C1 state */ + u8 plvl2_up:1; /* 03: C2 state works on MP system */ + u8 pwr_button:1; /* 04: Power button is handled as a generic feature */ + u8 sleep_button:1; /* 05: Sleep button is handled as a generic feature, or not present */ + u8 fixed_rTC:1; /* 06: RTC wakeup stat not in fixed register space */ + u8 rtcs4:1; /* 07: RTC wakeup stat not possible from S4 */ + u8 tmr_val_ext:1; /* 08: tmr_val is 32 bits 0=24-bits */ + u8 dock_cap:1; /* 09: Docking supported */ + u8 reset_reg_sup:1; /* 10: System reset via the FADT RESET_REG supported */ + u8 sealed_case:1; /* 11: No internal expansion capabilities and case is sealed */ + u8 headless:1; /* 12: No local video capabilities or local input devices */ + u8 cpu_sw_sleep:1; /* 13: Must execute native instruction after writing SLP_TYPx register */ + + u8 pci_exp_wak:1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ + u8 use_platform_clock:1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ + u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ + u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ + u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ + u8 force_apic_physical_destination_mode:1; /* 19: all local x_aPICs must use physical dest mode (ACPI 3.0) */ + u8:4; /* 20-23: Reserved, must be zero */ + u8 reserved3; /* 24-31: Reserved, must be zero */ + + struct acpi_generic_address reset_register; /* Reset register address in GAS format */ + u8 reset_value; /* Value to write to the reset_register port to reset the system */ + u8 reserved4[3]; /* These three bytes must be zero */ + u64 xfirmware_ctrl; /* 64-bit physical address of FACS */ + u64 Xdsdt; /* 64-bit physical address of DSDT */ + struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */ + struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */ + struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */ + struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */ + struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */ + struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ + struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */ + struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */ +}; + +/* "Down-revved" ACPI 2.0 FADT descriptor */ + +struct fadt_descriptor_rev2_minus { + ACPI_TABLE_HEADER_DEF /* ACPI common table header */ + FADT_REV2_COMMON u8 reserved2; /* Reserved, must be zero */ + u32 flags; + struct acpi_generic_address reset_register; /* Reset register address in GAS format */ + u8 reset_value; /* Value to write to the reset_register port to reset the system. */ + u8 reserved7[3]; /* Reserved, must be zero */ +}; + +/* ECDT - Embedded Controller Boot Resources Table */ + +struct ec_boot_resources { + ACPI_TABLE_HEADER_DEF struct acpi_generic_address ec_control; /* Address of EC command/status register */ + struct acpi_generic_address ec_data; /* Address of EC data register */ + u32 uid; /* Unique ID - must be same as the EC _UID method */ + u8 gpe_bit; /* The GPE for the EC */ + u8 ec_id[1]; /* Full namepath of the EC in the ACPI namespace */ +}; + +/* SRAT - System Resource Affinity Table */ + +struct static_resource_alloc { + u8 type; + u8 length; + u8 proximity_domain_lo; + u8 apic_id; + + /* Flags (32 bits) */ + + u8 enabled:1; /* 00: Use affinity structure */ + u8:7; /* 01-07: Reserved, must be zero */ + u8 reserved3[3]; /* 08-31: Reserved, must be zero */ + + u8 local_sapic_eid; + u8 proximity_domain_hi[3]; + u32 reserved4; /* Reserved, must be zero */ +}; + +struct memory_affinity { + u8 type; + u8 length; + u32 proximity_domain; + u16 reserved3; + u64 base_address; + u64 address_length; + u32 reserved4; + + /* Flags (32 bits) */ + + u8 enabled:1; /* 00: Use affinity structure */ + u8 hot_pluggable:1; /* 01: Memory region is hot pluggable */ + u8 non_volatile:1; /* 02: Memory is non-volatile */ + u8:5; /* 03-07: Reserved, must be zero */ + u8 reserved5[3]; /* 08-31: Reserved, must be zero */ + + u64 reserved6; /* Reserved, must be zero */ +}; + +struct system_resource_affinity { + ACPI_TABLE_HEADER_DEF u32 reserved1; /* Must be value '1' */ + u64 reserved2; /* Reserved, must be zero */ +}; + +/* SLIT - System Locality Distance Information Table */ + +struct system_locality_info { + ACPI_TABLE_HEADER_DEF u64 locality_count; + u8 entry[1][1]; +}; + +#pragma pack() #endif /* __ACTBL2_H__ */ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 64b603cfe..7ca89cde7 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -44,8 +44,6 @@ #ifndef __ACTYPES_H__ #define __ACTYPES_H__ -/* acpisrc:struct_defs -- for acpisrc conversion */ - /* * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header * and must be either 16, 32, or 64 @@ -156,6 +154,7 @@ typedef u64 acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT64_MAX #define ACPI_SIZE_MAX ACPI_UINT64_MAX +#define ALIGNED_ADDRESS_BOUNDARY 0x00000008 #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ /* @@ -196,6 +195,8 @@ typedef u64 acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX +#define ALIGNED_ADDRESS_BOUNDARY 0x00000004 + /******************************************************************************* * * Types specific to 16-bit targets @@ -222,6 +223,7 @@ typedef char *acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT16_MAX #define ACPI_SIZE_MAX ACPI_UINT16_MAX +#define ALIGNED_ADDRESS_BOUNDARY 0x00000002 #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ /* 64-bit integers cannot be supported */ @@ -241,7 +243,7 @@ typedef acpi_native_uint acpi_size; /******************************************************************************* * - * OS-dependent and compiler-dependent types + * OS- or compiler-dependent types * * If the defaults below are not appropriate for the host system, they can * be defined in the compiler-specific or OS-specific header, and this will @@ -249,34 +251,27 @@ typedef acpi_native_uint acpi_size; * ******************************************************************************/ -/* Value returned by acpi_os_get_thread_id */ - -#ifndef acpi_thread_id -#define acpi_thread_id acpi_native_uint -#endif - -/* Object returned from acpi_os_create_lock */ - -#ifndef acpi_spinlock -#define acpi_spinlock void * -#endif - -/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ +/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ -#ifndef acpi_cpu_flags -#define acpi_cpu_flags acpi_native_uint +#ifndef acpi_uintptr_t +#define acpi_uintptr_t void * #endif -/* Object returned from acpi_os_create_cache */ - +/* + * If acpi_cache_t was not defined in the OS-dependent header, + * define it now. This is typically the case where the local cache + * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) + */ #ifndef acpi_cache_t -#define acpi_cache_t struct acpi_memory_list +#define acpi_cache_t struct acpi_memory_list #endif -/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ - -#ifndef acpi_uintptr_t -#define acpi_uintptr_t void * +/* + * Allow the CPU flags word to be defined per-OS to simplify the use of the + * lock and unlock OSL interfaces. + */ +#ifndef acpi_cpu_flags +#define acpi_cpu_flags acpi_native_uint #endif /* @@ -297,14 +292,6 @@ typedef acpi_native_uint acpi_size; #define ACPI_UNUSED_VAR #endif -/* - * All ACPICA functions that are available to the rest of the kernel are - * tagged with this macro which can be defined as appropriate for the host. - */ -#ifndef ACPI_EXPORT_SYMBOL -#define ACPI_EXPORT_SYMBOL(symbol) -#endif - /******************************************************************************* * * Independent types @@ -380,11 +367,6 @@ struct uint32_struct { u32 hi; }; -/* Synchronization objects */ - -#define acpi_mutex void * -#define acpi_semaphore void * - /* * Acpi integer width. In ACPI version 1, integers are * 32 bits. In ACPI version 2, integers are 64 bits. @@ -495,15 +477,15 @@ typedef u64 acpi_integer; */ typedef u32 acpi_table_type; -#define ACPI_TABLE_ID_RSDP (acpi_table_type) 0 -#define ACPI_TABLE_ID_DSDT (acpi_table_type) 1 -#define ACPI_TABLE_ID_FADT (acpi_table_type) 2 -#define ACPI_TABLE_ID_FACS (acpi_table_type) 3 -#define ACPI_TABLE_ID_PSDT (acpi_table_type) 4 -#define ACPI_TABLE_ID_SSDT (acpi_table_type) 5 -#define ACPI_TABLE_ID_XSDT (acpi_table_type) 6 -#define ACPI_TABLE_ID_MAX 6 -#define ACPI_NUM_TABLE_TYPES (ACPI_TABLE_ID_MAX+1) +#define ACPI_TABLE_RSDP (acpi_table_type) 0 +#define ACPI_TABLE_DSDT (acpi_table_type) 1 +#define ACPI_TABLE_FADT (acpi_table_type) 2 +#define ACPI_TABLE_FACS (acpi_table_type) 3 +#define ACPI_TABLE_PSDT (acpi_table_type) 4 +#define ACPI_TABLE_SSDT (acpi_table_type) 5 +#define ACPI_TABLE_XSDT (acpi_table_type) 6 +#define ACPI_TABLE_MAX 6 +#define NUM_ACPI_TABLE_TYPES (ACPI_TABLE_MAX+1) /* * Types associated with ACPI names and objects. The first group of @@ -834,7 +816,7 @@ struct acpi_system_info { u32 debug_level; u32 debug_layer; u32 num_table_types; - struct acpi_table_info table_info[ACPI_TABLE_ID_MAX + 1]; + struct acpi_table_info table_info[NUM_ACPI_TABLE_TYPES]; }; /* @@ -876,7 +858,7 @@ acpi_status(*acpi_adr_space_handler) (u32 function, void *handler_context, void *region_context); -#define ACPI_DEFAULT_HANDLER NULL +#define ACPI_DEFAULT_HANDLER NULL typedef acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, @@ -929,13 +911,12 @@ struct acpi_compatible_id_list { #define ACPI_STA_DEVICE_PRESENT 0x01 #define ACPI_STA_DEVICE_ENABLED 0x02 #define ACPI_STA_DEVICE_UI 0x04 -#define ACPI_STA_DEVICE_FUNCTIONING 0x08 -#define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ +#define ACPI_STA_DEVICE_OK 0x08 #define ACPI_STA_BATTERY_PRESENT 0x10 #define ACPI_COMMON_OBJ_INFO \ - acpi_object_type type; /* ACPI object type */ \ - acpi_name name /* ACPI object Name */ + acpi_object_type type; /* ACPI object type */ \ + acpi_name name /* ACPI object Name */ struct acpi_obj_info_header { ACPI_COMMON_OBJ_INFO; @@ -976,7 +957,7 @@ struct acpi_mem_space_context { * Definitions for Resource Attributes */ typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ -typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */ +typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */ /* * Memory Attributes @@ -991,8 +972,8 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 /* * IO Attributes - * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. - * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. + * The ISA Io ranges are: n000-n0_ffh, n400-n4_ffh, n800-n8_ffh, n_c00-n_cFFh. + * The non-ISA Io ranges are: n100-n3_ffh, n500-n7_ffh, n900-n_bFfh, n_cd0-n_fFFh. */ #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 #define ACPI_ISA_ONLY_RANGES (u8) 0x02 @@ -1190,12 +1171,12 @@ struct acpi_resource_source { /* Fields common to all address descriptors, 16/32/64 bit */ #define ACPI_RESOURCE_ADDRESS_COMMON \ - u8 resource_type; \ - u8 producer_consumer; \ - u8 decode; \ - u8 min_address_fixed; \ - u8 max_address_fixed; \ - union acpi_resource_attribute info; + u8 resource_type; \ + u8 producer_consumer; \ + u8 decode; \ + u8 min_address_fixed; \ + u8 max_address_fixed; \ + union acpi_resource_attribute info; struct acpi_resource_address { ACPI_RESOURCE_ADDRESS_COMMON}; @@ -1316,6 +1297,16 @@ struct acpi_resource { #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) +#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED +#define ACPI_ALIGN_RESOURCE_SIZE(length) (length) +#else +#define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) +#endif + +/* + * END: of definitions for Resource Attributes + */ + struct acpi_pci_routing_table { u32 length; u32 pin; @@ -1324,4 +1315,8 @@ struct acpi_pci_routing_table { char source[4]; /* pad to 64 bits so sizeof() works in all cases */ }; +/* + * END: of definitions for PCI Routing tables + */ + #endif /* __ACTYPES_H__ */ diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index ba039ea1a..0927765df 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h @@ -50,24 +50,24 @@ extern const u8 acpi_gbl_resource_aml_sizes[]; #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) -extern const char *acpi_gbl_bm_decode[]; -extern const char *acpi_gbl_config_decode[]; -extern const char *acpi_gbl_consume_decode[]; -extern const char *acpi_gbl_dec_decode[]; -extern const char *acpi_gbl_he_decode[]; -extern const char *acpi_gbl_io_decode[]; -extern const char *acpi_gbl_ll_decode[]; -extern const char *acpi_gbl_max_decode[]; -extern const char *acpi_gbl_mem_decode[]; -extern const char *acpi_gbl_min_decode[]; -extern const char *acpi_gbl_mtp_decode[]; -extern const char *acpi_gbl_rng_decode[]; -extern const char *acpi_gbl_rw_decode[]; -extern const char *acpi_gbl_shr_decode[]; -extern const char *acpi_gbl_siz_decode[]; -extern const char *acpi_gbl_trs_decode[]; -extern const char *acpi_gbl_ttp_decode[]; -extern const char *acpi_gbl_typ_decode[]; +extern const char *acpi_gbl_BMdecode[2]; +extern const char *acpi_gbl_config_decode[4]; +extern const char *acpi_gbl_consume_decode[2]; +extern const char *acpi_gbl_DECdecode[2]; +extern const char *acpi_gbl_HEdecode[2]; +extern const char *acpi_gbl_io_decode[2]; +extern const char *acpi_gbl_LLdecode[2]; +extern const char *acpi_gbl_max_decode[2]; +extern const char *acpi_gbl_MEMdecode[4]; +extern const char *acpi_gbl_min_decode[2]; +extern const char *acpi_gbl_MTPdecode[4]; +extern const char *acpi_gbl_RNGdecode[4]; +extern const char *acpi_gbl_RWdecode[2]; +extern const char *acpi_gbl_SHRdecode[2]; +extern const char *acpi_gbl_SIZdecode[4]; +extern const char *acpi_gbl_TRSdecode[2]; +extern const char *acpi_gbl_TTPdecode[2]; +extern const char *acpi_gbl_TYPdecode[4]; #endif /* Types for Resource descriptor entries */ @@ -77,12 +77,6 @@ extern const char *acpi_gbl_typ_decode[]; #define ACPI_VARIABLE_LENGTH 2 #define ACPI_SMALL_VARIABLE_LENGTH 3 -typedef -acpi_status(*acpi_walk_aml_callback) (u8 * aml, - u32 length, - u32 offset, - u8 resource_index, void **context); - typedef acpi_status(*acpi_pkg_callback) (u8 object_type, union acpi_operand_object * source_object, @@ -283,8 +277,6 @@ acpi_ut_ptr_exit(u32 line_number, void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); -void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display); - void acpi_ut_report_error(char *module_name, u32 line_number); void acpi_ut_report_info(char *module_name, u32 line_number); @@ -453,8 +445,6 @@ acpi_ut_short_divide(acpi_integer in_dividend, /* * utmisc */ -u8 acpi_ut_is_aml_table(struct acpi_table_header *table); - acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); void acpi_ut_release_owner_id(acpi_owner_id * owner_id); @@ -470,9 +460,7 @@ void acpi_ut_print_string(char *string, u8 max_length); u8 acpi_ut_valid_acpi_name(u32 name); -acpi_name acpi_ut_repair_name(acpi_name name); - -u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); +u8 acpi_ut_valid_acpi_character(char character); acpi_status acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); @@ -481,25 +469,6 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); #define ACPI_ANY_BASE 0 -u32 acpi_ut_dword_byte_swap(u32 value); - -void acpi_ut_set_integer_width(u8 revision); - -#ifdef ACPI_DEBUG_OUTPUT -void -acpi_ut_display_init_pathname(u8 type, - struct acpi_namespace_node *obj_handle, - char *path); -#endif - -/* - * utresrc - */ -acpi_status -acpi_ut_walk_aml_resources(u8 * aml, - acpi_size aml_length, - acpi_walk_aml_callback user_function, void **context); - acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); u32 acpi_ut_get_descriptor_length(void *aml); @@ -514,6 +483,20 @@ acpi_status acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 ** end_tag); +u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); + +u32 acpi_ut_dword_byte_swap(u32 value); + +void acpi_ut_set_integer_width(u8 revision); + +#ifdef ACPI_DEBUG_OUTPUT +void +acpi_ut_display_init_pathname(u8 type, + struct acpi_namespace_node *obj_handle, + char *path); + +#endif + /* * utmutex - mutex support */ @@ -540,15 +523,14 @@ acpi_ut_initialize_buffer(struct acpi_buffer *buffer, void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); -void *acpi_ut_allocate_zeroed(acpi_size size, - u32 component, char *module, u32 line); +void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); #ifdef ACPI_DBG_TRACK_ALLOCATIONS void *acpi_ut_allocate_and_track(acpi_size size, u32 component, char *module, u32 line); -void *acpi_ut_allocate_zeroed_and_track(acpi_size size, - u32 component, char *module, u32 line); +void *acpi_ut_callocate_and_track(acpi_size size, + u32 component, char *module, u32 line); void acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); @@ -558,11 +540,6 @@ void acpi_ut_dump_allocation_info(void); #endif /* ACPI_FUTURE_USAGE */ void acpi_ut_dump_allocations(u32 component, char *module); - -acpi_status -acpi_ut_create_list(char *list_name, - u16 object_size, struct acpi_memory_list **return_cache); - #endif #endif /* _ACUTILS_H */ diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index cf18426a8..37964a59a 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h @@ -180,10 +180,8 @@ #define AML_BANK_FIELD_OP (u16) 0x5b87 #define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */ -/* - * Combination opcodes (actually two one-byte opcodes) - * Used by the disassembler and i_aSL compiler - */ +/* Bogus opcodes (they are actually two separate opcodes) */ + #define AML_LGREATEREQUAL_OP (u16) 0x9295 #define AML_LLESSEQUAL_OP (u16) 0x9294 #define AML_LNOTEQUAL_OP (u16) 0x9293 diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index be03818af..fb4735315 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h @@ -42,45 +42,39 @@ * POSSIBILITY OF SUCH DAMAGES. */ -/* acpisrc:struct_defs -- for acpisrc conversion */ - #ifndef __AMLRESRC_H #define __AMLRESRC_H -/* - * Resource descriptor tags, as defined in the ACPI specification. - * Used to symbolically reference fields within a descriptor. - */ -#define ACPI_RESTAG_ADDRESS "_ADR" -#define ACPI_RESTAG_ALIGNMENT "_ALN" -#define ACPI_RESTAG_ADDRESSSPACE "_ASI" -#define ACPI_RESTAG_ACCESSSIZE "_ASZ" -#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" -#define ACPI_RESTAG_BASEADDRESS "_BAS" -#define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ -#define ACPI_RESTAG_DECODE "_DEC" -#define ACPI_RESTAG_DMA "_DMA" -#define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ -#define ACPI_RESTAG_GRANULARITY "_GRA" -#define ACPI_RESTAG_INTERRUPT "_INT" -#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ -#define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ -#define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ -#define ACPI_RESTAG_LENGTH "_LEN" -#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ -#define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ -#define ACPI_RESTAG_MAXADDR "_MAX" -#define ACPI_RESTAG_MINADDR "_MIN" -#define ACPI_RESTAG_MAXTYPE "_MAF" -#define ACPI_RESTAG_MINTYPE "_MIF" -#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" -#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" -#define ACPI_RESTAG_RANGETYPE "_RNG" -#define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ -#define ACPI_RESTAG_TRANSLATION "_TRA" -#define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ -#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ -#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ +#define ASL_RESNAME_ADDRESS "_ADR" +#define ASL_RESNAME_ALIGNMENT "_ALN" +#define ASL_RESNAME_ADDRESSSPACE "_ASI" +#define ASL_RESNAME_ACCESSSIZE "_ASZ" +#define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT" +#define ASL_RESNAME_BASEADDRESS "_BAS" +#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ +#define ASL_RESNAME_DECODE "_DEC" +#define ASL_RESNAME_DMA "_DMA" +#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ +#define ASL_RESNAME_GRANULARITY "_GRA" +#define ASL_RESNAME_INTERRUPT "_INT" +#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ +#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ +#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ +#define ASL_RESNAME_LENGTH "_LEN" +#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ +#define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ +#define ASL_RESNAME_MAXADDR "_MAX" +#define ASL_RESNAME_MINADDR "_MIN" +#define ASL_RESNAME_MAXTYPE "_MAF" +#define ASL_RESNAME_MINTYPE "_MIF" +#define ASL_RESNAME_REGISTERBITOFFSET "_RBO" +#define ASL_RESNAME_REGISTERBITWIDTH "_RBW" +#define ASL_RESNAME_RANGETYPE "_RNG" +#define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ +#define ASL_RESNAME_TRANSLATION "_TRA" +#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ +#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ +#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ /* Default sizes for "small" resource descriptors */ @@ -115,7 +109,7 @@ struct asl_resource_node { * SMALL descriptors */ #define AML_RESOURCE_SMALL_HEADER_COMMON \ - u8 descriptor_type; + u8 descriptor_type; struct aml_resource_small_header { AML_RESOURCE_SMALL_HEADER_COMMON}; @@ -168,8 +162,8 @@ struct aml_resource_end_tag { * LARGE descriptors */ #define AML_RESOURCE_LARGE_HEADER_COMMON \ - u8 descriptor_type;\ - u16 resource_length; + u8 descriptor_type;\ + u16 resource_length; struct aml_resource_large_header { AML_RESOURCE_LARGE_HEADER_COMMON}; @@ -200,9 +194,9 @@ struct aml_resource_fixed_memory32 { }; #define AML_RESOURCE_ADDRESS_COMMON \ - u8 resource_type; \ - u8 flags; \ - u8 specific_flags; + u8 resource_type; \ + u8 flags; \ + u8 specific_flags; struct aml_resource_address { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; @@ -272,7 +266,6 @@ struct aml_resource_generic_register { union aml_resource { /* Descriptor headers */ - u8 descriptor_type; struct aml_resource_small_header small_header; struct aml_resource_large_header large_header; @@ -303,9 +296,9 @@ union aml_resource { /* Utility overlays */ struct aml_resource_address address; - u32 dword_item; - u16 word_item; - u8 byte_item; + u32 u32_item; + u16 u16_item; + u8 U8item; }; #endif diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h index c5472be6f..3fa81d55c 100644 --- a/include/acpi/pdc_intel.h +++ b/include/acpi/pdc_intel.h @@ -18,11 +18,6 @@ ACPI_PDC_C_C1_HALT | \ ACPI_PDC_P_FFH) -#define ACPI_PDC_EST_CAPABILITY_SWSMP (ACPI_PDC_SMP_C1PT | \ - ACPI_PDC_C_C1_HALT | \ - ACPI_PDC_SMP_P_SWCOORD | \ - ACPI_PDC_P_FFH) - #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ ACPI_PDC_SMP_C1PT | \ ACPI_PDC_C_C1_HALT) diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 453a469fd..223ec6467 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -49,41 +49,33 @@ */ #ifdef ACPI_LIBRARY -/* - * Note: The non-debug version of the acpi_library does not contain any - * debug support, for minimimal size. The debug version uses ACPI_FULL_DEBUG - */ #define ACPI_USE_LOCAL_CACHE #endif -#ifdef ACPI_ASL_COMPILER +#ifdef ACPI_DUMP_APP +#ifndef MSDOS #define ACPI_DEBUG_OUTPUT +#endif #define ACPI_APPLICATION #define ACPI_DISASSEMBLER -#define ACPI_CONSTANT_EVAL_ONLY -#define ACPI_LARGE_NAMESPACE_NODE -#define ACPI_DATA_TABLE_DISASSEMBLY +#define ACPI_NO_METHOD_EXECUTION #endif #ifdef ACPI_EXEC_APP #undef DEBUGGER_THREADING #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED -#define ACPI_FULL_DEBUG +#define ACPI_DEBUG_OUTPUT #define ACPI_APPLICATION #define ACPI_DEBUGGER +#define ACPI_DISASSEMBLER #define ACPI_MUTEX_DEBUG -#define ACPI_DBG_TRACK_ALLOCATIONS #endif -#ifdef ACPI_DASM_APP -#ifndef MSDOS +#ifdef ACPI_ASL_COMPILER #define ACPI_DEBUG_OUTPUT -#endif #define ACPI_APPLICATION #define ACPI_DISASSEMBLER -#define ACPI_NO_METHOD_EXECUTION -#define ACPI_LARGE_NAMESPACE_NODE -#define ACPI_DATA_TABLE_DISASSEMBLY +#define ACPI_CONSTANT_EVAL_ONLY #endif #ifdef ACPI_APPLICATION @@ -91,12 +83,6 @@ #define ACPI_USE_LOCAL_CACHE #endif -#ifdef ACPI_FULL_DEBUG -#define ACPI_DEBUGGER -#define ACPI_DEBUG_OUTPUT -#define ACPI_DISASSEMBLER -#endif - /* * Environment configuration. The purpose of this file is to interface to the * local generation environment. @@ -151,7 +137,7 @@ #elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */ #include "acdos16.h" -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#elif defined(__FreeBSD__) #include "acfreebsd.h" #elif defined(__NetBSD__) @@ -177,6 +163,17 @@ #endif +/* + * Memory allocation tracking. Used only if + * 1) This is the debug version + * 2) This is NOT a 16-bit version of the code (not enough real-mode memory) + */ +#ifdef ACPI_DEBUG_OUTPUT +#if ACPI_MACHINE_WIDTH != 16 +#define ACPI_DBG_TRACK_ALLOCATIONS +#endif +#endif + /*! [End] no source code translation !*/ /* @@ -274,8 +271,8 @@ typedef char *va_list; /* * Storage alignment properties */ -#define _AUPBND (sizeof (acpi_native_int) - 1) -#define _ADNBND (sizeof (acpi_native_int) - 1) +#define _AUPBND (sizeof (acpi_native_uint) - 1) +#define _ADNBND (sizeof (acpi_native_uint) - 1) /* * Variable argument list macro definitions diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 47faf2791..2e6d54569 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -49,27 +49,30 @@ #ifdef __KERNEL__ +#include #include #include -#include #include #include #include #include #include -#include -#include -#include -/* Host-dependent types and defines */ +#define strtoul simple_strtoul + +#define ACPI_MACHINE_WIDTH BITS_PER_LONG + +/* Type(s) for the OSL */ -#define ACPI_MACHINE_WIDTH BITS_PER_LONG -#define acpi_cache_t kmem_cache_t -#define acpi_spinlock spinlock_t * -#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); -#define strtoul simple_strtoul +#ifdef ACPI_USE_LOCAL_CACHE +#define acpi_cache_t struct acpi_memory_list +#else +#include +#define acpi_cache_t kmem_cache_t +#endif /* Full namespace pathname length limit - arbitrary */ + #define ACPI_PATHNAME_MAX 256 #else /* !__KERNEL__ */ @@ -101,30 +104,4 @@ #define acpi_cpu_flags unsigned long -#define acpi_thread_id struct task_struct * - -static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; } - -/* - * The irqs_disabled() check is for resume from RAM. - * Interrupts are off during resume, just like they are for boot. - * However, boot has (system_state != SYSTEM_RUNNING) - * to quiet __might_sleep() in kmalloc() and resume does not. - */ -#include -static inline void *acpi_os_allocate(acpi_size size) { - return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); -} -static inline void *acpi_os_allocate_zeroed(acpi_size size) { - return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); -} - -static inline void *acpi_os_acquire_object(acpi_cache_t * cache) { - return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); -} - -#define ACPI_ALLOCATE(a) acpi_os_allocate(a) -#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) -#define ACPI_FREE(a) kfree(a) - #endif /* __ACLINUX_H__ */ diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 9dd5b7596..badf0277b 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h @@ -2,7 +2,7 @@ #define __ACPI_PROCESSOR_H #include -#include +#include #include @@ -18,17 +18,6 @@ #define ACPI_PDC_REVISION_ID 0x1 -#define ACPI_PSD_REV0_REVISION 0 /* Support for _PSD as in ACPI 3.0 */ -#define ACPI_PSD_REV0_ENTRIES 5 - -/* - * Types of coordination defined in ACPI 3.0. Same macros can be used across - * P, C and T states - */ -#define DOMAIN_COORD_TYPE_SW_ALL 0xfc -#define DOMAIN_COORD_TYPE_SW_ANY 0xfd -#define DOMAIN_COORD_TYPE_HW_ALL 0xfe - /* Power Management */ struct acpi_processor_cx; @@ -62,7 +51,6 @@ struct acpi_processor_cx { u32 latency_ticks; u32 power; u32 usage; - u64 time; struct acpi_processor_cx_policy promotion; struct acpi_processor_cx_policy demotion; }; @@ -78,14 +66,6 @@ struct acpi_processor_power { /* Performance Management */ -struct acpi_psd_package { - acpi_integer num_entries; - acpi_integer revision; - acpi_integer domain; - acpi_integer coord_type; - acpi_integer num_processors; -} __attribute__ ((packed)); - struct acpi_pct_register { u8 descriptor; u16 length; @@ -112,9 +92,7 @@ struct acpi_processor_performance { struct acpi_pct_register status_register; unsigned int state_count; struct acpi_processor_px *states; - struct acpi_psd_package domain_info; - cpumask_t shared_cpu_map; - unsigned int shared_type; + }; /* Throttling Control */ @@ -183,9 +161,6 @@ struct acpi_processor_errata { } piix4; }; -extern int acpi_processor_preregister_performance( - struct acpi_processor_performance **performance); - extern int acpi_processor_register_performance(struct acpi_processor_performance *performance, unsigned int cpu); extern void acpi_processor_unregister_performance(struct diff --git a/include/asm-alpha/Kbuild b/include/asm-alpha/Kbuild deleted file mode 100644 index b7c8f188b..000000000 --- a/include/asm-alpha/Kbuild +++ /dev/null @@ -1,11 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += gentrap.h -header-y += regdef.h -header-y += pal.h -header-y += reg.h - -unifdef-y += console.h -unifdef-y += fpu.h -unifdef-y += sysinfo.h -unifdef-y += compiler.h diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h index 384dc08d6..681ff581a 100644 --- a/include/asm-alpha/barrier.h +++ b/include/asm-alpha/barrier.h @@ -30,4 +30,7 @@ __asm__ __volatile__("mb": : :"memory") #define set_mb(var, value) \ do { var = value; mb(); } while (0) +#define set_wmb(var, value) \ +do { var = value; wmb(); } while (0) + #endif /* __BARRIER_H */ diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index 4b6ef7f21..3f88715e8 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_BITOPS_H #define _ALPHA_BITOPS_H +#include #include /* diff --git a/include/asm-alpha/cache.h b/include/asm-alpha/cache.h index f199e69a5..e6d4d1695 100644 --- a/include/asm-alpha/cache.h +++ b/include/asm-alpha/cache.h @@ -4,6 +4,7 @@ #ifndef __ARCH_ALPHA_CACHE_H #define __ARCH_ALPHA_CACHE_H +#include /* Bytes per L1 (data) cache line. */ #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_EV6) diff --git a/include/asm-alpha/cacheflush.h b/include/asm-alpha/cacheflush.h index 805640b41..3fc6ef726 100644 --- a/include/asm-alpha/cacheflush.h +++ b/include/asm-alpha/cacheflush.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_CACHEFLUSH_H #define _ALPHA_CACHEFLUSH_H +#include #include /* Caches aren't brain-dead on the Alpha. */ diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index d2768cc3d..00c6f57ad 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h @@ -90,7 +90,6 @@ __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) #endif -#ifdef __KERNEL__ /* Some idiots over in thought inline should imply always_inline. This breaks stuff. We'll include this file whenever we run into such problems. */ @@ -102,6 +101,4 @@ #undef __always_inline #define __always_inline inline __attribute__((always_inline)) -#endif /* __KERNEL__ */ - #endif /* __ALPHA_COMPILER_H */ diff --git a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h index 9e0516c0c..3a70d68bf 100644 --- a/include/asm-alpha/core_cia.h +++ b/include/asm-alpha/core_cia.h @@ -4,6 +4,7 @@ /* Define to experiment with fitting everything into one 512MB HAE window. */ #define CIA_ONE_HAE_WINDOW 1 +#include #include #include diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index 457c34b6e..5c1c40338 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h @@ -1,6 +1,7 @@ #ifndef __ALPHA_T2__H__ #define __ALPHA_T2__H__ +#include #include #include #include @@ -435,7 +436,7 @@ static inline void t2_outl(u32 b, unsigned long addr) set_hae(msb); \ } -static DEFINE_SPINLOCK(t2_hae_lock); +static spinlock_t t2_hae_lock = SPIN_LOCK_UNLOCKED; __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr) { diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h index b9ff4d8cb..62d0d6681 100644 --- a/include/asm-alpha/dma-mapping.h +++ b/include/asm-alpha/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_DMA_MAPPING_H #define _ALPHA_DMA_MAPPING_H +#include #ifdef CONFIG_PCI diff --git a/include/asm-alpha/dma.h b/include/asm-alpha/dma.h index 87cfdbdf0..683afaa3d 100644 --- a/include/asm-alpha/dma.h +++ b/include/asm-alpha/dma.h @@ -18,6 +18,7 @@ #ifndef _ASM_DMA_H #define _ASM_DMA_H +#include #include #include diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h index 6a9f02af9..289a00d51 100644 --- a/include/asm-alpha/floppy.h +++ b/include/asm-alpha/floppy.h @@ -10,6 +10,7 @@ #ifndef __ASM_ALPHA_FLOPPY_H #define __ASM_ALPHA_FLOPPY_H +#include #define fd_inb(port) inb_p(port) #define fd_outb(value,port) outb_p(value,port) @@ -25,8 +26,9 @@ #define fd_enable_irq() enable_irq(FLOPPY_IRQ) #define fd_disable_irq() disable_irq(FLOPPY_IRQ) #define fd_cacheflush(addr,size) /* nothing */ -#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ - IRQF_DISABLED, "floppy", NULL) +#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ + SA_INTERRUPT|SA_SAMPLE_RANDOM, \ + "floppy", NULL) #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); #ifdef CONFIG_PCI diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h index d953e234d..7bb6a36c9 100644 --- a/include/asm-alpha/hardirq.h +++ b/include/asm-alpha/hardirq.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_HARDIRQ_H #define _ALPHA_HARDIRQ_H +#include #include #include diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h index a37db0f95..a310b9efc 100644 --- a/include/asm-alpha/hw_irq.h +++ b/include/asm-alpha/hw_irq.h @@ -1,6 +1,9 @@ #ifndef _ALPHA_HW_IRQ_H #define _ALPHA_HW_IRQ_H +#include + +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} extern volatile unsigned long irq_err_count; diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h index 2a5cc0b36..6126afe27 100644 --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ +#include #define IDE_ARCH_OBSOLETE_DEFAULTS diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index f5ae98c25..3ebbeee75 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-alpha/irq.h b/include/asm-alpha/irq.h index 917b9fe37..566db7200 100644 --- a/include/asm-alpha/irq.h +++ b/include/asm-alpha/irq.h @@ -8,6 +8,7 @@ */ #include +#include #if defined(CONFIG_ALPHA_GENERIC) @@ -92,4 +93,8 @@ extern void enable_irq(unsigned int); struct pt_regs; extern void (*perf_irq)(unsigned long, struct pt_regs *); +struct irqaction; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + + #endif /* _ALPHA_IRQ_H */ diff --git a/include/asm-alpha/kmap_types.h b/include/asm-alpha/kmap_types.h index 3e6735a34..3d10cd3ea 100644 --- a/include/asm-alpha/kmap_types.h +++ b/include/asm-alpha/kmap_types.h @@ -3,6 +3,7 @@ /* Dummy header just to define km_type. */ +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h index aced22f91..ece166a20 100644 --- a/include/asm-alpha/machvec.h +++ b/include/asm-alpha/machvec.h @@ -1,6 +1,7 @@ #ifndef __ALPHA_MACHVEC_H #define __ALPHA_MACHVEC_H 1 +#include #include /* diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h index fe249e9d3..0c017fc18 100644 --- a/include/asm-alpha/mmu_context.h +++ b/include/asm-alpha/mmu_context.h @@ -7,6 +7,7 @@ * Copyright (C) 1996, Linus Torvalds */ +#include #include #include #include diff --git a/include/asm-alpha/mmzone.h b/include/asm-alpha/mmzone.h index 64d0ab98f..192d80c87 100644 --- a/include/asm-alpha/mmzone.h +++ b/include/asm-alpha/mmzone.h @@ -5,6 +5,7 @@ #ifndef _ASM_MMZONE_H_ #define _ASM_MMZONE_H_ +#include #include struct bootmem_data_t; /* stupid forward decl. */ diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index fca1bc747..bc6f28e37 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h @@ -1,8 +1,7 @@ #ifndef _ALPHA_PAGE_H #define _ALPHA_PAGE_H -#ifdef __KERNEL__ - +#include #include /* PAGE_SHIFT determines the page size */ @@ -10,6 +9,8 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #ifndef __ASSEMBLY__ #define STRICT_MM_TYPECHECKS @@ -92,11 +93,10 @@ typedef unsigned long pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) - #define devmem_is_allowed(x) 1 +#endif /* __KERNEL__ */ #include #include -#endif /* __KERNEL__ */ #endif /* _ALPHA_PAGE_H */ diff --git a/include/asm-alpha/param.h b/include/asm-alpha/param.h index 214e79963..3ed0b3b02 100644 --- a/include/asm-alpha/param.h +++ b/include/asm-alpha/param.h @@ -5,6 +5,7 @@ hardware ignores reprogramming. We also need userland buy-in to the change in HZ, since this is visible in the wait4 resources etc. */ +#include #ifndef HZ # ifndef CONFIG_ALPHA_RAWHIDE diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h index 471864e8d..308475642 100644 --- a/include/asm-alpha/pgalloc.h +++ b/include/asm-alpha/pgalloc.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_PGALLOC_H #define _ALPHA_PGALLOC_H +#include #include #include diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 93eaa58b7..a985cd29b 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -10,6 +10,7 @@ * This hopefully works with any standard Alpha page-size, as defined * in (currently 8192). */ +#include #include #include diff --git a/include/asm-alpha/rwsem.h b/include/asm-alpha/rwsem.h index 1570c0b54..fafdd4f70 100644 --- a/include/asm-alpha/rwsem.h +++ b/include/asm-alpha/rwsem.h @@ -36,11 +36,20 @@ struct rw_semaphore { #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) spinlock_t wait_lock; struct list_head wait_list; +#if RWSEM_DEBUG + int debug; +#endif }; +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 +#else +#define __RWSEM_DEBUG_INIT /* */ +#endif + #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ - LIST_HEAD_INIT((name).wait_list) } + LIST_HEAD_INIT((name).wait_list) __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -50,6 +59,9 @@ static inline void init_rwsem(struct rw_semaphore *sem) sem->count = RWSEM_UNLOCKED_VALUE; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } static inline void __down_read(struct rw_semaphore *sem) diff --git a/include/asm-alpha/serial.h b/include/asm-alpha/serial.h index 9d263e8d8..7e4b2987d 100644 --- a/include/asm-alpha/serial.h +++ b/include/asm-alpha/serial.h @@ -2,6 +2,7 @@ * include/asm-alpha/serial.h */ +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 13c2305d3..1a2c52a05 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h @@ -77,6 +77,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -97,6 +98,7 @@ typedef unsigned long sigset_t; #define SA_ONESHOT SA_RESETHAND #define SA_NOMASK SA_NODEFER +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ /* * sigaltstack controls diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h index a1a1eca6b..e1432102b 100644 --- a/include/asm-alpha/smp.h +++ b/include/asm-alpha/smp.h @@ -1,6 +1,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #include #include #include diff --git a/include/asm-alpha/socket.h b/include/asm-alpha/socket.h index d22ab97ea..b51932291 100644 --- a/include/asm-alpha/socket.h +++ b/include/asm-alpha/socket.h @@ -51,7 +51,6 @@ #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_PEERSEC 30 -#define SO_PASSSEC 34 /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 19 diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h index 0c294c9b0..8197c69ef 100644 --- a/include/asm-alpha/spinlock.h +++ b/include/asm-alpha/spinlock.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_SPINLOCK_H #define _ALPHA_SPINLOCK_H +#include #include #include #include diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index 03e9c0e5e..f3b7b1a59 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -1,6 +1,7 @@ #ifndef __ALPHA_SYSTEM_H #define __ALPHA_SYSTEM_H +#include #include #include #include diff --git a/include/asm-alpha/tlbflush.h b/include/asm-alpha/tlbflush.h index 1ca3ed3bd..9d484c1fd 100644 --- a/include/asm-alpha/tlbflush.h +++ b/include/asm-alpha/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_TLBFLUSH_H #define _ALPHA_TLBFLUSH_H +#include #include #include diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h index bc6e6a925..ef25b6585 100644 --- a/include/asm-alpha/unistd.h +++ b/include/asm-alpha/unistd.h @@ -383,8 +383,6 @@ #define __NR_inotify_add_watch 445 #define __NR_inotify_rm_watch 446 -#ifdef __KERNEL__ - #define NR_SYSCALLS 447 #if defined(__GNUC__) @@ -567,8 +565,9 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\ _syscall_return(type); \ } -#endif /* __GNUC__ */ +#endif /* __LIBRARY__ && __GNUC__ */ +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_STAT64 @@ -579,6 +578,7 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6)\ #define __ARCH_WANT_SYS_OLD_GETRLIMIT #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_SIGPENDING +#endif #ifdef __KERNEL_SYSCALLS__ @@ -661,5 +661,4 @@ asmlinkage long sys_rt_sigaction(int sig, #define cond_syscall(x) asm(".weak\t" #x "\n" #x " = sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ALPHA_UNISTD_H */ diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h index ed06f59b5..8ca4f6b2d 100644 --- a/include/asm-alpha/vga.h +++ b/include/asm-alpha/vga.h @@ -46,6 +46,6 @@ extern void scr_memcpyw(u16 *d, const u16 *s, unsigned int count); #define vga_readb(a) readb((u8 __iomem *)(a)) #define vga_writeb(v,a) writeb(v, (u8 __iomem *)(a)) -#define VGA_MAP_MEM(x,s) ((unsigned long) ioremap(x, s)) +#define VGA_MAP_MEM(x) ((unsigned long) ioremap(x, 0)) #endif diff --git a/include/asm-arm/Kbuild b/include/asm-arm/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-arm/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-arm/apm.h b/include/asm-arm/apm.h index d09113b37..3a50eb759 100644 --- a/include/asm-arm/apm.h +++ b/include/asm-arm/apm.h @@ -13,6 +13,7 @@ #ifndef ARM_ASM_SA1100_APM_H #define ARM_ASM_SA1100_APM_H +#include #include /* diff --git a/include/asm-arm/arch-aaec2000/io.h b/include/asm-arm/arch-aaec2000/io.h index d710204ac..8d67907fd 100644 --- a/include/asm-arm/arch-aaec2000/io.h +++ b/include/asm-arm/arch-aaec2000/io.h @@ -16,5 +16,6 @@ */ #define __io(a) ((void __iomem *)(a)) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h index 24b51cccd..d8209f891 100644 --- a/include/asm-arm/arch-aaec2000/memory.h +++ b/include/asm-arm/arch-aaec2000/memory.h @@ -11,6 +11,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H +#include #define PHYS_OFFSET UL(0xf0000000) diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h b/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h deleted file mode 100644 index bff5ea45f..000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * include/asm-arm/arch-at91rm9200/at91rm9200_spi.h - * - * Copyright (C) 2005 Ivan Kokshaysky - * Copyright (C) SAN People - * - * Serial Peripheral Interface (SPI) registers. - * Based on AT91RM9200 datasheet revision E. - * - * 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 AT91RM9200_SPI_H -#define AT91RM9200_SPI_H - -#define AT91_SPI_CR 0x00 /* Control Register */ -#define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */ -#define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */ -#define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */ -#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_MR 0x04 /* Mode Register */ -#define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */ -#define AT91_SPI_PS (1 << 1) /* Peripheral Select */ -#define AT91_SPI_PS_FIXED (0 << 1) -#define AT91_SPI_PS_VARIABLE (1 << 1) -#define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */ -#define AT91_SPI_DIV32 (1 << 3) /* Clock Selection */ -#define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */ -#define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */ -#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ -#define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */ - -#define AT91_SPI_RDR 0x08 /* Receive Data Register */ -#define AT91_SPI_RD (0xffff << 0) /* Receive Data */ -#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ - -#define AT91_SPI_TDR 0x0c /* Transmit Data Register */ -#define AT91_SPI_TD (0xffff << 0) /* Transmit Data */ -#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ -#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_SR 0x10 /* Status Register */ -#define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */ -#define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */ -#define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */ -#define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */ -#define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */ -#define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */ -#define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */ -#define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */ -#define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */ -#define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */ -#define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */ - -#define AT91_SPI_IER 0x14 /* Interrupt Enable Register */ -#define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */ -#define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */ - -#define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */ -#define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */ -#define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */ -#define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */ -#define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */ -#define AT91_SPI_BITS_8 (0 << 4) -#define AT91_SPI_BITS_9 (1 << 4) -#define AT91_SPI_BITS_10 (2 << 4) -#define AT91_SPI_BITS_11 (3 << 4) -#define AT91_SPI_BITS_12 (4 << 4) -#define AT91_SPI_BITS_13 (5 << 4) -#define AT91_SPI_BITS_14 (6 << 4) -#define AT91_SPI_BITS_15 (7 << 4) -#define AT91_SPI_BITS_16 (8 << 4) -#define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */ -#define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */ -#define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */ - -#endif diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h deleted file mode 100644 index ac8802271..000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h - * - * Copyright (C) SAN People - * - * Serial Synchronous Controller (SSC) registers. - * Based on AT91RM9200 datasheet revision E. - * - * 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 AT91RM9200_SSC_H -#define AT91RM9200_SSC_H - -#define AT91_SSC_CR 0x00 /* Control Register */ -#define AT91_SSC_RXEN (1 << 0) /* Receive Enable */ -#define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */ -#define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */ -#define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */ -#define AT91_SSC_SWRST (1 << 15) /* Software Reset */ - -#define AT91_SSC_CMR 0x04 /* Clock Mode Register */ -#define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */ - -#define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */ -#define AT91_SSC_CKS (3 << 0) /* Clock Selection */ -#define AT91_SSC_CKS_DIV (0 << 0) -#define AT91_SSC_CKS_CLOCK (1 << 0) -#define AT91_SSC_CKS_PIN (2 << 0) -#define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */ -#define AT91_SSC_CKO_NONE (0 << 2) -#define AT91_SSC_CKO_CONTINUOUS (1 << 2) -#define AT91_SSC_CKI (1 << 5) /* Clock Inversion */ -#define AT91_SSC_CKI_FALLING (0 << 5) -#define AT91_SSC_CK_RISING (1 << 5) -#define AT91_SSC_START (0xf << 8) /* Start Selection */ -#define AT91_SSC_START_CONTINUOUS (0 << 8) -#define AT91_SSC_START_TX_RX (1 << 8) -#define AT91_SSC_START_LOW_RF (2 << 8) -#define AT91_SSC_START_HIGH_RF (3 << 8) -#define AT91_SSC_START_FALLING_RF (4 << 8) -#define AT91_SSC_START_RISING_RF (5 << 8) -#define AT91_SSC_START_LEVEL_RF (6 << 8) -#define AT91_SSC_START_EDGE_RF (7 << 8) -#define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */ -#define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */ - -#define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */ -#define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */ -#define AT91_SSC_LOOP (1 << 5) /* Loop Mode */ -#define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */ -#define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */ -#define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */ -#define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */ -#define AT91_SSC_FSOS_NONE (0 << 20) -#define AT91_SSC_FSOS_NEGATIVE (1 << 20) -#define AT91_SSC_FSOS_POSITIVE (2 << 20) -#define AT91_SSC_FSOS_LOW (3 << 20) -#define AT91_SSC_FSOS_HIGH (4 << 20) -#define AT91_SSC_FSOS_TOGGLE (5 << 20) -#define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */ -#define AT91_SSC_FSEDGE_POSITIVE (0 << 24) -#define AT91_SSC_FSEDGE_NEGATIVE (1 << 24) - -#define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */ -#define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */ -#define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */ -#define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */ - -#define AT91_SSC_RHR 0x20 /* Receive Holding Register */ -#define AT91_SSC_THR 0x24 /* Transmit Holding Register */ -#define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */ -#define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */ - -#define AT91_SSC_SR 0x40 /* Status Register */ -#define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */ -#define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */ -#define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */ -#define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */ -#define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */ -#define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */ -#define AT91_SSC_ENDRX (1 << 6) /* End of Reception */ -#define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */ -#define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */ -#define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */ -#define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */ -#define AT91_SSC_RXENA (1 << 17) /* Receive Enable */ - -#define AT91_SSC_IER 0x44 /* Interrupt Enable Register */ -#define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */ -#define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */ - -#endif diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h index 0f4c12d5f..2910d359f 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h @@ -68,17 +68,8 @@ #define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ #define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ #define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ - #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ -#define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ -#define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ -#define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ -#define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ -#define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ -#define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ -#define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ -#define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ /* @@ -250,7 +241,7 @@ #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ -#define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ +#define At91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h deleted file mode 100644 index f4da752bb..000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * include/asm-arm/arch-at91rm9200/at91rm9200_tc.h - * - * Copyright (C) SAN People - * - * Timer/Counter Unit (TC) registers. - * Based on AT91RM9200 datasheet revision E. - * - * 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 AT91RM9200_TC_H -#define AT91RM9200_TC_H - -#define AT91_TC_BCR 0xc0 /* TC Block Control Register */ -#define AT91_TC_SYNC (1 << 0) /* Synchro Command */ - -#define AT91_TC_BMR 0xc4 /* TC Block Mode Register */ -#define AT91_TC_TC0XC0S (3 << 0) /* External Clock Signal 0 Selection */ -#define AT91_TC_TC0XC0S_TCLK0 (0 << 0) -#define AT91_TC_TC0XC0S_NONE (1 << 0) -#define AT91_TC_TC0XC0S_TIOA1 (2 << 0) -#define AT91_TC_TC0XC0S_TIOA2 (3 << 0) -#define AT91_TC_TC1XC1S (3 << 2) /* External Clock Signal 1 Selection */ -#define AT91_TC_TC1XC1S_TCLK1 (0 << 2) -#define AT91_TC_TC1XC1S_NONE (1 << 2) -#define AT91_TC_TC1XC1S_TIOA0 (2 << 2) -#define AT91_TC_TC1XC1S_TIOA2 (3 << 2) -#define AT91_TC_TC2XC2S (3 << 4) /* External Clock Signal 2 Selection */ -#define AT91_TC_TC2XC2S_TCLK2 (0 << 4) -#define AT91_TC_TC2XC2S_NONE (1 << 4) -#define AT91_TC_TC2XC2S_TIOA0 (2 << 4) -#define AT91_TC_TC2XC2S_TIOA1 (3 << 4) - - -#define AT91_TC_CCR 0x00 /* Channel Control Register */ -#define AT91_TC_CLKEN (1 << 0) /* Counter Clock Enable Command */ -#define AT91_TC_CLKDIS (1 << 1) /* Counter CLock Disable Command */ -#define AT91_TC_SWTRG (1 << 2) /* Software Trigger Command */ - -#define AT91_TC_CMR 0x04 /* Channel Mode Register */ -#define AT91_TC_TCCLKS (7 << 0) /* Capture/Waveform Mode: Clock Selection */ -#define AT91_TC_TIMER_CLOCK1 (0 << 0) -#define AT91_TC_TIMER_CLOCK2 (1 << 0) -#define AT91_TC_TIMER_CLOCK3 (2 << 0) -#define AT91_TC_TIMER_CLOCK4 (3 << 0) -#define AT91_TC_TIMER_CLOCK5 (4 << 0) -#define AT91_TC_XC0 (5 << 0) -#define AT91_TC_XC1 (6 << 0) -#define AT91_TC_XC2 (7 << 0) -#define AT91_TC_CLKI (1 << 3) /* Capture/Waveform Mode: Clock Invert */ -#define AT91_TC_BURST (3 << 4) /* Capture/Waveform Mode: Burst Signal Selection */ -#define AT91_TC_LDBSTOP (1 << 6) /* Capture Mode: Counter Clock Stopped with TB Loading */ -#define AT91_TC_LDBDIS (1 << 7) /* Capture Mode: Counter Clock Disable with RB Loading */ -#define AT91_TC_ETRGEDG (3 << 8) /* Capture Mode: External Trigger Edge Selection */ -#define AT91_TC_ABETRG (1 << 10) /* Capture Mode: TIOA or TIOB External Trigger Selection */ -#define AT91_TC_CPCTRG (1 << 14) /* Capture Mode: RC Compare Trigger Enable */ -#define AT91_TC_WAVE (1 << 15) /* Capture/Waveform mode */ -#define AT91_TC_LDRA (3 << 16) /* Capture Mode: RA Loading Selection */ -#define AT91_TC_LDRB (3 << 18) /* Capture Mode: RB Loading Selection */ - -#define AT91_TC_CPCSTOP (1 << 6) /* Waveform Mode: Counter Clock Stopped with RC Compare */ -#define AT91_TC_CPCDIS (1 << 7) /* Waveform Mode: Counter Clock Disable with RC Compare */ -#define AT91_TC_EEVTEDG (3 << 8) /* Waveform Mode: External Event Edge Selection */ -#define AT91_TC_EEVTEDG_NONE (0 << 8) -#define AT91_TC_EEVTEDG_RISING (1 << 8) -#define AT91_TC_EEVTEDG_FALLING (2 << 8) -#define AT91_TC_EEVTEDG_BOTH (3 << 8) -#define AT91_TC_EEVT (3 << 10) /* Waveform Mode: External Event Selection */ -#define AT91_TC_EEVT_TIOB (0 << 10) -#define AT91_TC_EEVT_XC0 (1 << 10) -#define AT91_TC_EEVT_XC1 (2 << 10) -#define AT91_TC_EEVT_XC2 (3 << 10) -#define AT91_TC_ENETRG (1 << 12) /* Waveform Mode: External Event Trigger Enable */ -#define AT91_TC_WAVESEL (3 << 13) /* Waveform Mode: Waveform Selection */ -#define AT91_TC_WAVESEL_UP (0 << 13) -#define AT91_TC_WAVESEL_UP_AUTO (2 << 13) -#define AT91_TC_WAVESEL_UPDOWN (1 << 13) -#define AT91_TC_WAVESEL_UPDOWN_AUTO (3 << 13) -#define AT91_TC_ACPA (3 << 16) /* Waveform Mode: RA Compare Effect on TIOA */ -#define AT91_TC_ACPA_NONE (0 << 16) -#define AT91_TC_ACPA_SET (1 << 16) -#define AT91_TC_ACPA_CLEAR (2 << 16) -#define AT91_TC_ACPA_TOGGLE (3 << 16) -#define AT91_TC_ACPC (3 << 18) /* Waveform Mode: RC Compre Effect on TIOA */ -#define AT91_TC_ACPC_NONE (0 << 18) -#define AT91_TC_ACPC_SET (1 << 18) -#define AT91_TC_ACPC_CLEAR (2 << 18) -#define AT91_TC_ACPC_TOGGLE (3 << 18) -#define AT91_TC_AEEVT (3 << 20) /* Waveform Mode: External Event Effect on TIOA */ -#define AT91_TC_AEEVT_NONE (0 << 20) -#define AT91_TC_AEEVT_SET (1 << 20) -#define AT91_TC_AEEVT_CLEAR (2 << 20) -#define AT91_TC_AEEVT_TOGGLE (3 << 20) -#define AT91_TC_ASWTRG (3 << 22) /* Waveform Mode: Software Trigger Effect on TIOA */ -#define AT91_TC_ASWTRG_NONE (0 << 22) -#define AT91_TC_ASWTRG_SET (1 << 22) -#define AT91_TC_ASWTRG_CLEAR (2 << 22) -#define AT91_TC_ASWTRG_TOGGLE (3 << 22) -#define AT91_TC_BCPB (3 << 24) /* Waveform Mode: RB Compare Effect on TIOB */ -#define AT91_TC_BCPB_NONE (0 << 24) -#define AT91_TC_BCPB_SET (1 << 24) -#define AT91_TC_BCPB_CLEAR (2 << 24) -#define AT91_TC_BCPB_TOGGLE (3 << 24) -#define AT91_TC_BCPC (3 << 26) /* Waveform Mode: RC Compare Effect on TIOB */ -#define AT91_TC_BCPC_NONE (0 << 26) -#define AT91_TC_BCPC_SET (1 << 26) -#define AT91_TC_BCPC_CLEAR (2 << 26) -#define AT91_TC_BCPC_TOGGLE (3 << 26) -#define AT91_TC_BEEVT (3 << 28) /* Waveform Mode: External Event Effect on TIOB */ -#define AT91_TC_BEEVT_NONE (0 << 28) -#define AT91_TC_BEEVT_SET (1 << 28) -#define AT91_TC_BEEVT_CLEAR (2 << 28) -#define AT91_TC_BEEVT_TOGGLE (3 << 28) -#define AT91_TC_BSWTRG (3 << 30) /* Waveform Mode: Software Trigger Effect on TIOB */ -#define AT91_TC_BSWTRG_NONE (0 << 30) -#define AT91_TC_BSWTRG_SET (1 << 30) -#define AT91_TC_BSWTRG_CLEAR (2 << 30) -#define AT91_TC_BSWTRG_TOGGLE (3 << 30) - -#define AT91_TC_CV 0x10 /* Counter Value */ -#define AT91_TC_RA 0x14 /* Register A */ -#define AT91_TC_RB 0x18 /* Register B */ -#define AT91_TC_RC 0x1c /* Register C */ - -#define AT91_TC_SR 0x20 /* Status Register */ -#define AT91_TC_COVFS (1 << 0) /* Counter Overflow Status */ -#define AT91_TC_LOVRS (1 << 1) /* Load Overrun Status */ -#define AT91_TC_CPAS (1 << 2) /* RA Compare Status */ -#define AT91_TC_CPBS (1 << 3) /* RB Compare Status */ -#define AT91_TC_CPCS (1 << 4) /* RC Compare Status */ -#define AT91_TC_LDRAS (1 << 5) /* RA Loading Status */ -#define AT91_TC_LDRBS (1 << 6) /* RB Loading Status */ -#define AT91_TC_ETRGS (1 << 7) /* External Trigger Status */ -#define AT91_TC_CLKSTA (1 << 16) /* Clock Enabling Status */ -#define AT91_TC_MTIOA (1 << 17) /* TIOA Mirror */ -#define AT91_TC_MTIOB (1 << 18) /* TIOB Mirror */ - -#define AT91_TC_IER 0x24 /* Interrupt Enable Register */ -#define AT91_TC_IDR 0x28 /* Interrupt Disable Register */ -#define AT91_TC_IMR 0x2c /* Interrupt Mask Register */ - -#endif diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h deleted file mode 100644 index 951e3f61c..000000000 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * include/asm-arm/arch-at91rm9200/at91rm9200_udp.h - * - * Copyright (C) 2005 Ivan Kokshaysky - * Copyright (C) SAN People - * - * USB Device Port (UDP) registers. - * Based on AT91RM9200 datasheet revision E. - * - * 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 AT91RM9200_UDP_H -#define AT91RM9200_UDP_H - -#define AT91_UDP_FRM_NUM 0x00 /* Frame Number Register */ -#define AT91_UDP_NUM (0x7ff << 0) /* Frame Number */ -#define AT91_UDP_FRM_ERR (1 << 16) /* Frame Error */ -#define AT91_UDP_FRM_OK (1 << 17) /* Frame OK */ - -#define AT91_UDP_GLB_STAT 0x04 /* Global State Register */ -#define AT91_UDP_FADDEN (1 << 0) /* Function Address Enable */ -#define AT91_UDP_CONFG (1 << 1) /* Configured */ -#define AT91_UDP_ESR (1 << 2) /* Enable Send Resume */ -#define AT91_UDP_RSMINPR (1 << 3) /* Resume has been sent */ -#define AT91_UDP_RMWUPE (1 << 4) /* Remote Wake Up Enable */ - -#define AT91_UDP_FADDR 0x08 /* Function Address Register */ -#define AT91_UDP_FADD (0x7f << 0) /* Function Address Value */ -#define AT91_UDP_FEN (1 << 8) /* Function Enable */ - -#define AT91_UDP_IER 0x10 /* Interrupt Enable Register */ -#define AT91_UDP_IDR 0x14 /* Interrupt Disable Register */ -#define AT91_UDP_IMR 0x18 /* Interrupt Mask Register */ - -#define AT91_UDP_ISR 0x1c /* Interrupt Status Register */ -#define AT91_UDP_EP(n) (1 << (n)) /* Endpoint Interrupt Status */ -#define AT91_UDP_RXSUSP (1 << 8) /* USB Suspend Interrupt Status */ -#define AT91_UDP_RXRSM (1 << 9) /* USB Resume Interrupt Status */ -#define AT91_UDP_EXTRSM (1 << 10) /* External Resume Interrupt Status */ -#define AT91_UDP_SOFINT (1 << 11) /* Start of Frame Interrupt Status */ -#define AT91_UDP_ENDBUSRES (1 << 12) /* End of Bus Reset Interrpt Status */ -#define AT91_UDP_WAKEUP (1 << 13) /* USB Wakeup Interrupt Status */ - -#define AT91_UDP_ICR 0x20 /* Interrupt Clear Register */ -#define AT91_UDP_RST_EP 0x28 /* Reset Endpoint Register */ - -#define AT91_UDP_CSR(n) (0x30 + ((n) * 4)) /* Endpoint Control/Status Registers 0-7 */ -#define AT91_UDP_TXCOMP (1 << 0) /* Generates IN packet with data previously written in DPR */ -#define AT91_UDP_RX_DATA_BK0 (1 << 1) /* Receive Data Bank 0 */ -#define AT91_UDP_RXSETUP (1 << 2) /* Send STALL to the host */ -#define AT91_UDP_STALLSENT (1 << 3) /* Stall Sent / Isochronous error (Isochronous endpoints) */ -#define AT91_UDP_TXPKTRDY (1 << 4) /* Transmit Packet Ready */ -#define AT91_UDP_FORCESTALL (1 << 5) /* Force Stall */ -#define AT91_UDP_RX_DATA_BK1 (1 << 6) /* Receive Data Bank 1 */ -#define AT91_UDP_DIR (1 << 7) /* Transfer Direction */ -#define AT91_UDP_EPTYPE (7 << 8) /* Endpoint Type */ -#define AT91_UDP_EPTYPE_CTRL (0 << 8) -#define AT91_UDP_EPTYPE_ISO_OUT (1 << 8) -#define AT91_UDP_EPTYPE_BULK_OUT (2 << 8) -#define AT91_UDP_EPTYPE_INT_OUT (3 << 8) -#define AT91_UDP_EPTYPE_ISO_IN (5 << 8) -#define AT91_UDP_EPTYPE_BULK_IN (6 << 8) -#define AT91_UDP_EPTYPE_INT_IN (7 << 8) -#define AT91_UDP_DTGLE (1 << 11) /* Data Toggle */ -#define AT91_UDP_EPEDS (1 << 15) /* Endpoint Enable/Disable */ -#define AT91_UDP_RXBYTECNT (0x7ff << 16) /* Number of bytes in FIFO */ - -#define AT91_UDP_FDR(n) (0x50 + ((n) * 4)) /* Endpoint FIFO Data Registers 0-7 */ - -#define AT91_UDP_TXVC 0x74 /* Transceiver Control Register */ -#define AT91_UDP_TXVC_TXVDIS (1 << 8) /* Transceiver Disable */ - -#endif diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h index c1ca9a465..4fdef13d0 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h @@ -20,7 +20,7 @@ /* * These are data structures found in platform_device.dev.platform_data, - * and describing board-specific data needed by drivers. For example, + * and describing board-specfic data needed by drivers. For example, * which pin is used for a given GPIO role. * * In 2.6, drivers should strongly avoid board-specific knowledge so @@ -31,9 +31,14 @@ #ifndef __ASM_ARCH_BOARD_H #define __ASM_ARCH_BOARD_H + /* Clocks */ +extern unsigned long at91_master_clock; + + /* Serial Port */ +extern int at91_serial_map[AT91_NR_UART]; +extern int at91_console_port; + #include -#include -#include /* USB Device */ struct at91_udc_data { @@ -86,25 +91,10 @@ struct at91_nand_data { extern void __init at91_add_device_nand(struct at91_nand_data *data); /* I2C*/ -extern void __init at91_add_device_i2c(void); - - /* SPI */ -extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); +void __init at91_add_device_i2c(void); - /* Serial */ -struct at91_uart_config { - unsigned short console_tty; /* tty number of serial console */ - unsigned short nr_tty; /* number of serial tty's */ - short tty_map[]; /* map UART to tty number */ -}; -extern struct platform_device *at91_default_console_device; -extern void __init at91_init_serial(struct at91_uart_config *config); - -struct at91_uart_data { - short use_dma_tx; /* use transmit DMA? */ - short use_dma_rx; /* use receive DMA? */ -}; -extern void __init at91_add_device_serial(void); + /* RTC */ +void __init at91_add_device_rtc(void); /* LEDs */ extern u8 at91_leds_cpu; diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index dbde1baaf..6176ab2dc 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h @@ -13,8 +13,6 @@ #ifndef __ASM_ARCH_AT91RM9200_GPIO_H #define __ASM_ARCH_AT91RM9200_GPIO_H -#include - #define PIN_BASE NR_AIC_IRQS #define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */ @@ -190,9 +188,6 @@ extern int at91_set_multi_drive(unsigned pin, int is_on); /* callable at any time */ extern int at91_set_gpio_value(unsigned pin, int value); extern int at91_get_gpio_value(unsigned pin); - -extern void at91_gpio_suspend(void); -extern void at91_gpio_resume(void); #endif #endif diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 235d39d91..59e6f44d3 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h @@ -50,12 +50,9 @@ #define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0) /* Internal SRAM */ -#define AT91_SRAM_BASE 0x00200000 /* Internal SRAM base address */ +#define AT91_BASE_SRAM 0x00200000 /* Internal SRAM base address */ #define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */ - /* Internal SRAM is mapped below the IO devices */ -#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE) - /* Serial ports */ #define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */ @@ -84,14 +81,14 @@ static inline unsigned int at91_sys_read(unsigned int reg_offset) { void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; - return __raw_readl(addr + reg_offset); + return readl(addr + reg_offset); } static inline void at91_sys_write(unsigned int reg_offset, unsigned long value) { void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; - __raw_writel(value, addr + reg_offset); + writel(value, addr + reg_offset); } #endif diff --git a/include/asm-arm/arch-at91rm9200/io.h b/include/asm-arm/arch-at91rm9200/io.h index 88fd1bebc..23e670d85 100644 --- a/include/asm-arm/arch-at91rm9200/io.h +++ b/include/asm-arm/arch-at91rm9200/io.h @@ -21,6 +21,7 @@ #ifndef __ASM_ARCH_IO_H #define __ASM_ARCH_IO_H +#include #include #define IO_SPACE_LIMIT 0xFFFFFFFF diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h index f63842c2c..27b0497f1 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91rm9200/irqs.h @@ -37,6 +37,16 @@ * symbols in gpio.h for ones handled indirectly as GPIOs. * We make provision for 4 banks of GPIO. */ +#include + #define NR_IRQS (NR_AIC_IRQS + (4 * 32)) + +#ifndef __ASSEMBLY__ +/* + * Initialize the IRQ controller. + */ +extern void at91rm9200_init_irq(unsigned int priority[]); +#endif + #endif diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h index f985069e6..462f1f0ad 100644 --- a/include/asm-arm/arch-at91rm9200/memory.h +++ b/include/asm-arm/arch-at91rm9200/memory.h @@ -21,7 +21,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H -#include +#include #define PHYS_OFFSET (AT91_SDRAM_BASE) @@ -33,7 +33,9 @@ * bus_to_virt: Used to convert an address for DMA operations * to an address that the kernel can use. */ +#define __virt_to_bus__is_a_macro #define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro #define __bus_to_virt(x) __phys_to_virt(x) #endif diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h new file mode 100644 index 000000000..a89501b4a --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/pio.h @@ -0,0 +1,115 @@ +/* + * include/asm-arm/arch-at91rm9200/pio.h + * + * Copyright (C) 2003 SAN People + * + * 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 __ASM_ARCH_PIO_H +#define __ASM_ARCH_PIO_H + +#include + +static inline void AT91_CfgPIO_USART0(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA17_TXD0 | AT91_PA18_RXD0 | AT91_PA20_CTS0); + + /* + * Errata #39 - RTS0 is not internally connected to PA21. We need to drive + * the pin manually. Default is off (RTS is active low). + */ + at91_sys_write(AT91_PIOA + PIO_PER, AT91_PA21_RTS0); + at91_sys_write(AT91_PIOA + PIO_OER, AT91_PA21_RTS0); + at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); +} + +static inline void AT91_CfgPIO_USART1(void) { + at91_sys_write(AT91_PIOB + PIO_PDR, AT91_PB18_RI1 | AT91_PB19_DTR1 + | AT91_PB20_TXD1 | AT91_PB21_RXD1 | AT91_PB23_DCD1 + | AT91_PB24_CTS1 | AT91_PB25_DSR1 | AT91_PB26_RTS1); +} + +static inline void AT91_CfgPIO_USART2(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA22_RXD2 | AT91_PA23_TXD2); +} + +static inline void AT91_CfgPIO_USART3(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_TXD3 | AT91_PA6_RXD3); + at91_sys_write(AT91_PIOA + PIO_BSR, AT91_PA5_TXD3 | AT91_PA6_RXD3); +} + +static inline void AT91_CfgPIO_DBGU(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA31_DTXD | AT91_PA30_DRXD); +} + +/* + * Enable the Two-Wire interface. + */ +static inline void AT91_CfgPIO_TWI(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA25_TWD | AT91_PA26_TWCK); + at91_sys_write(AT91_PIOA + PIO_ASR, AT91_PA25_TWD | AT91_PA26_TWCK); + at91_sys_write(AT91_PIOA + PIO_MDER, AT91_PA25_TWD | AT91_PA26_TWCK); /* open drain */ +} + +/* + * Enable the Serial Peripheral Interface. + */ +static inline void AT91_CfgPIO_SPI(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA0_MISO | AT91_PA1_MOSI | AT91_PA2_SPCK); +} + +static inline void AT91_CfgPIO_SPI_CS0(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA3_NPCS0); +} + +static inline void AT91_CfgPIO_SPI_CS1(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA4_NPCS1); +} + +static inline void AT91_CfgPIO_SPI_CS2(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_NPCS2); +} + +static inline void AT91_CfgPIO_SPI_CS3(void) { + at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA6_NPCS3); +} + +/* + * Select the DataFlash card. + */ +static inline void AT91_CfgPIO_DataFlashCard(void) { + at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(7)); + at91_sys_write(AT91_PIOB + PIO_OER, AT91_PIO_P(7)); + at91_sys_write(AT91_PIOB + PIO_CODR, AT91_PIO_P(7)); +} + +/* + * Enable NAND Flash (SmartMedia) interface. + */ +static inline void AT91_CfgPIO_SmartMedia(void) { + /* enable PC0=SMCE, PC1=SMOE, PC3=SMWE, A21=CLE, A22=ALE */ + at91_sys_write(AT91_PIOC + PIO_ASR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE); + at91_sys_write(AT91_PIOC + PIO_PDR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE); + + /* Configure PC2 as input (signal READY of the SmartMedia) */ + at91_sys_write(AT91_PIOC + PIO_PER, AT91_PC2_BFAVD); /* enable direct output enable */ + at91_sys_write(AT91_PIOC + PIO_ODR, AT91_PC2_BFAVD); /* disable output */ + + /* Configure PB1 as input (signal Card Detect of the SmartMedia) */ + at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(1)); /* enable direct output enable */ + at91_sys_write(AT91_PIOB + PIO_ODR, AT91_PIO_P(1)); /* disable output */ +} + +static inline int AT91_PIO_SmartMedia_RDY(void) { + return (at91_sys_read(AT91_PIOC + PIO_PDSR) & AT91_PIO_P(2)) ? 1 : 0; +} + +static inline int AT91_PIO_SmartMedia_CardDetect(void) { + return (at91_sys_read(AT91_PIOB + PIO_PDSR) & AT91_PIO_P(1)) ? 1 : 0; +} + +#endif diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91rm9200/system.h index 8a2ff472e..29c42655f 100644 --- a/include/asm-arm/arch-at91rm9200/system.h +++ b/include/asm-arm/arch-at91rm9200/system.h @@ -21,7 +21,7 @@ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H -#include +#include static inline void arch_idle(void) { @@ -48,12 +48,4 @@ static inline void arch_reset(char mode) at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); } -#define ARCH_ID_AT91RM9200 0x09200080 -#define ARCH_ID_AT91SAM9261 0x019000a0 - -static inline unsigned long arch_identify(void) -{ - return at91_sys_read(AT91_DBGU_CIDR) & (AT91_CIDR_EPROC | AT91_CIDR_ARCH); -} - #endif diff --git a/include/asm-arm/arch-at91rm9200/timex.h b/include/asm-arm/arch-at91rm9200/timex.h index 88687cefe..3f112dd12 100644 --- a/include/asm-arm/arch-at91rm9200/timex.h +++ b/include/asm-arm/arch-at91rm9200/timex.h @@ -21,7 +21,7 @@ #ifndef __ASM_ARCH_TIMEX_H #define __ASM_ARCH_TIMEX_H -#include +#include #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h index ec7811ab0..7b38497c2 100644 --- a/include/asm-arm/arch-at91rm9200/uncompress.h +++ b/include/asm-arm/arch-at91rm9200/uncompress.h @@ -21,7 +21,7 @@ #ifndef __ASM_ARCH_UNCOMPRESS_H #define __ASM_ARCH_UNCOMPRESS_H -#include +#include /* * The following code assumes the serial port has already been diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91rm9200/vmalloc.h index 4c367eb57..34d9718fe 100644 --- a/include/asm-arm/arch-at91rm9200/vmalloc.h +++ b/include/asm-arm/arch-at91rm9200/vmalloc.h @@ -21,6 +21,6 @@ #ifndef __ASM_ARCH_VMALLOC_H #define __ASM_ARCH_VMALLOC_H -#define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK) +#define VMALLOC_END (AT91_IO_VIRT_BASE & PGDIR_MASK) #endif diff --git a/include/asm-arm/arch-cl7500/acornfb.h b/include/asm-arm/arch-cl7500/acornfb.h index aea6330c9..3867231a4 100644 --- a/include/asm-arm/arch-cl7500/acornfb.h +++ b/include/asm-arm/arch-cl7500/acornfb.h @@ -1,3 +1,4 @@ +#include #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119) static inline void diff --git a/include/asm-arm/arch-clps711x/hardware.h b/include/asm-arm/arch-clps711x/hardware.h index 0fdbe72ff..1386871e1 100644 --- a/include/asm-arm/arch-clps711x/hardware.h +++ b/include/asm-arm/arch-clps711x/hardware.h @@ -22,6 +22,7 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H +#include #define CLPS7111_VIRT_BASE 0xff000000 #define CLPS7111_BASE CLPS7111_VIRT_BASE diff --git a/include/asm-arm/arch-clps711x/io.h b/include/asm-arm/arch-clps711x/io.h index 53d790202..62613b0e2 100644 --- a/include/asm-arm/arch-clps711x/io.h +++ b/include/asm-arm/arch-clps711x/io.h @@ -26,6 +26,7 @@ #define __io(a) ((void __iomem *)(a)) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) /* * We don't support ins[lb]/outs[lb]. Make them fault. diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h index c6e8dcf67..61d871740 100644 --- a/include/asm-arm/arch-clps711x/memory.h +++ b/include/asm-arm/arch-clps711x/memory.h @@ -20,6 +20,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H +#include /* * Physical DRAM offset. diff --git a/include/asm-arm/arch-clps711x/uncompress.h b/include/asm-arm/arch-clps711x/uncompress.h index 03d233ae8..07157b7e4 100644 --- a/include/asm-arm/arch-clps711x/uncompress.h +++ b/include/asm-arm/arch-clps711x/uncompress.h @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h index daad8ee2d..ec51fe924 100644 --- a/include/asm-arm/arch-ebsa285/hardware.h +++ b/include/asm-arm/arch-ebsa285/hardware.h @@ -12,6 +12,7 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H +#include #include #ifdef CONFIG_ARCH_FOOTBRIDGE diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h index f9c729141..776f9d377 100644 --- a/include/asm-arm/arch-ebsa285/io.h +++ b/include/asm-arm/arch-ebsa285/io.h @@ -24,6 +24,7 @@ #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) #if 1 #define __mem_pci(a) (a) +#define __mem_isa(a) ((a) + PCIMEM_BASE) #else static inline void __iomem *___mem_pci(void __iomem *p) @@ -33,7 +34,14 @@ static inline void __iomem *___mem_pci(void __iomem *p) return p; } +static inline void __iomem *___mem_isa(void __iomem *p) +{ + unsigned long a = (unsigned long)p; + BUG_ON(a >= 16*1048576); + return p + PCIMEM_BASE; +} #define __mem_pci(a) ___mem_pci(a) +#define __mem_isa(a) ___mem_isa(a) #endif #endif diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h index cbd7ae64b..99181ffc7 100644 --- a/include/asm-arm/arch-ebsa285/memory.h +++ b/include/asm-arm/arch-ebsa285/memory.h @@ -19,6 +19,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H +#include #if defined(CONFIG_FOOTBRIDGE_ADDIN) /* diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h index 025982009..d1ca955ce 100644 --- a/include/asm-arm/arch-ebsa285/vmalloc.h +++ b/include/asm-arm/arch-ebsa285/vmalloc.h @@ -6,6 +6,7 @@ * published by the Free Software Foundation. */ +#include #ifdef CONFIG_ARCH_FOOTBRIDGE #define VMALLOC_END (PAGE_OFFSET + 0x30000000) diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h index 8c322975f..71cea0b58 100644 --- a/include/asm-arm/arch-ep93xx/ep93xx-regs.h +++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h @@ -115,8 +115,6 @@ #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) -#define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) -#define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h index d7a34ce20..df9cbb6ef 100644 --- a/include/asm-arm/arch-ep93xx/platform.h +++ b/include/asm-arm/arch-ep93xx/platform.h @@ -8,7 +8,6 @@ void ep93xx_map_io(void); void ep93xx_init_irq(void); void ep93xx_init_time(unsigned long); void ep93xx_init_devices(void); -void ep93xx_clock_init(void); extern struct sys_timer ep93xx_timer; diff --git a/include/asm-arm/arch-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h index 53e923dba..4a1bfd78a 100644 --- a/include/asm-arm/arch-h720x/memory.h +++ b/include/asm-arm/arch-h720x/memory.h @@ -23,7 +23,9 @@ * There is something to do here later !, Mar 2000, Jungjun Kim */ +#define __virt_to_bus__is_a_macro #define __virt_to_bus(x) __virt_to_phys(x) +#define __bus_to_virt__is_a_macro #define __bus_to_virt(x) __phys_to_virt(x) #endif diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h index 599f03e5a..f2063c1d6 100644 --- a/include/asm-arm/arch-imx/imx-dma.h +++ b/include/asm-arm/arch-imx/imx-dma.h @@ -46,7 +46,7 @@ struct imx_dma_channel { const char *name; void (*irq_handler) (int, void *, struct pt_regs *); - void (*err_handler) (int, void *, struct pt_regs *, int errcode); + void (*err_handler) (int, void *, struct pt_regs *); void *data; dmamode_t dma_mode; struct scatterlist *sg; @@ -58,10 +58,6 @@ struct imx_dma_channel { extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; -#define IMX_DMA_ERR_BURST 1 -#define IMX_DMA_ERR_REQUEST 2 -#define IMX_DMA_ERR_TRANSFER 4 -#define IMX_DMA_ERR_BUFFER 8 /* The type to distinguish channel numbers parameter from ordinal int type */ typedef int imx_dmach_t; @@ -78,7 +74,7 @@ imx_dma_setup_sg(imx_dmach_t dma_ch, int imx_dma_setup_handlers(imx_dmach_t dma_ch, void (*irq_handler) (int, void *, struct pt_regs *), - void (*err_handler) (int, void *, struct pt_regs *, int), void *data); + void (*err_handler) (int, void *, struct pt_regs *), void *data); void imx_dma_enable(imx_dmach_t dma_ch); diff --git a/include/asm-arm/arch-imx/memory.h b/include/asm-arm/arch-imx/memory.h index 5ad901279..d09ae32cd 100644 --- a/include/asm-arm/arch-imx/memory.h +++ b/include/asm-arm/arch-imx/memory.h @@ -30,7 +30,9 @@ * bus_to_virt: Used to convert an address for DMA operations * to an address that the kernel can use. */ -#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) -#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) +#define __virt_to_bus__is_a_macro +#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) +#define __bus_to_virt__is_a_macro +#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) #endif diff --git a/include/asm-arm/arch-integrator/io.h b/include/asm-arm/arch-integrator/io.h index c8f217594..31f2deab5 100644 --- a/include/asm-arm/arch-integrator/io.h +++ b/include/asm-arm/arch-integrator/io.h @@ -32,5 +32,6 @@ #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) #define __mem_pci(a) (a) +#define __mem_isa(a) ((a) + PCI_MEMORY_VADDR) #endif diff --git a/include/asm-arm/arch-integrator/smp.h b/include/asm-arm/arch-integrator/smp.h index ab2c79bb9..da6981efd 100644 --- a/include/asm-arm/arch-integrator/smp.h +++ b/include/asm-arm/arch-integrator/smp.h @@ -1,6 +1,7 @@ #ifndef ASMARM_ARCH_SMP_H #define ASMARM_ARCH_SMP_H +#include #include #include diff --git a/include/asm-arm/arch-iop3xx/io.h b/include/asm-arm/arch-iop3xx/io.h index 36adbdf50..f39046a6a 100644 --- a/include/asm-arm/arch-iop3xx/io.h +++ b/include/asm-arm/arch-iop3xx/io.h @@ -17,5 +17,6 @@ #define __io(p) ((void __iomem *)(p)) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-iop3xx/iop331-irqs.h b/include/asm-arm/arch-iop3xx/iop331-irqs.h index 7135ad7e3..8ff73d487 100644 --- a/include/asm-arm/arch-iop3xx/iop331-irqs.h +++ b/include/asm-arm/arch-iop3xx/iop331-irqs.h @@ -91,6 +91,7 @@ #define NR_IRQS NR_IOP331_IRQS +#if defined(CONFIG_ARCH_IQ80331) /* * Interrupts available on the IQ80331 board */ @@ -110,6 +111,7 @@ #define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 #define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 +#elif defined(CONFIG_MACH_IQ80332) /* * Interrupts available on the IQ80332 board */ @@ -129,4 +131,6 @@ #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 +#endif + #endif // _IOP331_IRQ_H_ diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h index e43ebd984..bc62f4b13 100644 --- a/include/asm-arm/arch-iop3xx/memory.h +++ b/include/asm-arm/arch-iop3xx/memory.h @@ -5,6 +5,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H +#include #include /* diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h index 14ca8d0f7..472badb45 100644 --- a/include/asm-arm/arch-iop3xx/timex.h +++ b/include/asm-arm/arch-iop3xx/timex.h @@ -3,6 +3,7 @@ * * IOP3xx architecture timex specifications */ +#include #include #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) diff --git a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h index fbdd5af64..c98eb6254 100644 --- a/include/asm-arm/arch-iop3xx/uncompress.h +++ b/include/asm-arm/arch-iop3xx/uncompress.h @@ -1,6 +1,7 @@ /* * linux/include/asm-arm/arch-iop3xx/uncompress.h */ +#include #include #include #include diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S index 867761677..0ef4e6016 100644 --- a/include/asm-arm/arch-ixp23xx/entry-macro.S +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S @@ -8,7 +8,7 @@ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) ldr \irqnr, [\irqnr] @ get interrupt number - cmp \irqnr, #0x0 @ spurious interrupt ? + cmp \irqnr, #0x0 @ suprious interrupt ? movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits subne \irqnr, \irqnr, #1 @ convert to 0 based diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h index 3927b1d61..e49e1ca61 100644 --- a/include/asm-arm/arch-ixp23xx/ixp23xx.h +++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h @@ -124,7 +124,6 @@ #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) -#define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34) #define IXP23XX_EXP_BUS_PHYS 0x90000000 #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 @@ -252,7 +251,7 @@ * CAP CSRs. ****************************************************************************/ #define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) -#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00) +#define IXP23XX_PROD_IDG IXP23XX_GLOBAL_REG(0x00) #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) @@ -266,8 +265,6 @@ #define IXP23XX_PCI_UNIT_RESET (1 << 1) #define IXP23XX_XSCALE_RESET (1 << 0) -#define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000) - /**************************************************************************** * PCI CSRs. @@ -295,4 +292,15 @@ #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) +#ifndef __ASSEMBLY__ +/* + * Is system memory on the XSI or CPP bus? + */ +static inline unsigned ixp23xx_cpp_boot(void) +{ + return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); +} +#endif + + #endif diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h index 56e16d666..e4d99060a 100644 --- a/include/asm-arm/arch-ixp23xx/platform.h +++ b/include/asm-arm/arch-ixp23xx/platform.h @@ -14,21 +14,6 @@ #ifndef __ASSEMBLY__ -extern inline unsigned long ixp2000_reg_read(volatile void *reg) -{ - return *((volatile unsigned long *)reg); -} - -extern inline void ixp2000_reg_write(volatile void *reg, unsigned long val) -{ - *((volatile unsigned long *)reg) = val; -} - -extern inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) -{ - *((volatile unsigned long *)reg) = val; -} - struct pci_sys_data; void ixp23xx_map_io(void); @@ -43,15 +28,5 @@ extern struct sys_timer ixp23xx_timer; #define IXP23XX_UART_XTAL 14745600 -#ifndef __ASSEMBLY__ -/* - * Is system memory on the XSI or CPP bus? - */ -static inline unsigned ixp23xx_cpp_boot(void) -{ - return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); -} -#endif - #endif diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h index 16c1110f2..013575e6a 100644 --- a/include/asm-arm/arch-ixp23xx/uncompress.h +++ b/include/asm-arm/arch-ixp23xx/uncompress.h @@ -11,7 +11,7 @@ #ifndef __ASM_ARCH_UNCOMPRESS_H #define __ASM_ARCH_UNCOMPRESS_H -#include +#include #include #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) diff --git a/include/asm-arm/arch-ixp4xx/dma.h b/include/asm-arm/arch-ixp4xx/dma.h index 789f7f53c..b1a071ece 100644 --- a/include/asm-arm/arch-ixp4xx/dma.h +++ b/include/asm-arm/arch-ixp4xx/dma.h @@ -11,6 +11,7 @@ #ifndef __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H +#include #include #include #include diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 0d517267f..b59520e56 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h @@ -38,7 +38,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); * 2) If > 64MB of memory space is required, the IXP4xx can be configured * to use indirect registers to access PCI (as we do below for I/O * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff) - * of memory on the bus. The disadvantage of this is that every + * of memory on the bus. The disadvantadge of this is that every * PCI access requires three local register accesses plus a spinlock, * but in some cases the performance hit is acceptable. In addition, * you cannot mmap() PCI devices in this case. diff --git a/include/asm-arm/arch-l7200/io.h b/include/asm-arm/arch-l7200/io.h index cd080d838..cab8ad0ad 100644 --- a/include/asm-arm/arch-l7200/io.h +++ b/include/asm-arm/arch-l7200/io.h @@ -19,6 +19,7 @@ */ #define __io_pci(a) ((void __iomem *)(PCIO_BASE + (a))) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #define __ioaddr(p) __io_pci(p) diff --git a/include/asm-arm/arch-lh7a40x/clocks.h b/include/asm-arm/arch-lh7a40x/clocks.h deleted file mode 100644 index 7d0ba18ad..000000000 --- a/include/asm-arm/arch-lh7a40x/clocks.h +++ /dev/null @@ -1,18 +0,0 @@ -/* include/asm-arm/arch-lh7a40x/clocks.h - * - * Copyright (C) 2004 Marc Singer - * - * 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. - * - */ - -#ifndef __ASM_ARCH_CLOCKS_H -#define __ASM_ARCH_CLOCKS_H - -unsigned int fclkfreq_get (void); -unsigned int hclkfreq_get (void); -unsigned int pclkfreq_get (void); - -#endif /* _ASM_ARCH_CLOCKS_H */ diff --git a/include/asm-arm/arch-lh7a40x/constants.h b/include/asm-arm/arch-lh7a40x/constants.h index 51de96e87..52c1cb9c3 100644 --- a/include/asm-arm/arch-lh7a40x/constants.h +++ b/include/asm-arm/arch-lh7a40x/constants.h @@ -12,6 +12,7 @@ #ifndef __ASM_ARCH_CONSTANTS_H #define __ASM_ARCH_CONSTANTS_H +#include /* Addressing constants */ @@ -28,7 +29,8 @@ #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) -# define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */ +# define IOBARRIER_PHYS 0xc0000000 /* Start of SDRAM */ +/*# define IOBARRIER_PHYS 0x00000000 */ /* Start of flash */ # define IOBARRIER_VIRT 0xf0000000 # define IOBARRIER_SIZE PAGE_SIZE @@ -51,9 +53,6 @@ # define CPLD08_PHYS CPLDX_PHYS (0x08) # define CPLD08_VIRT CPLDX_VIRT (0x08) # define CPLD08_SIZE PAGE_SIZE -# define CPLD0A_PHYS CPLDX_PHYS (0x0a) -# define CPLD0A_VIRT CPLDX_VIRT (0x0a) -# define CPLD0A_SIZE PAGE_SIZE # define CPLD0C_PHYS CPLDX_PHYS (0x0c) # define CPLD0C_VIRT CPLDX_VIRT (0x0c) # define CPLD0C_SIZE PAGE_SIZE @@ -85,7 +84,5 @@ #define XTAL_IN 14745600 /* 14.7456 MHz crystal */ #define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */ #define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */ -#define HCLK (99993600) -//#define HCLK (119808000) #endif /* __ASM_ARCH_CONSTANTS_H */ diff --git a/include/asm-arm/arch-lh7a40x/dma.h b/include/asm-arm/arch-lh7a40x/dma.h index a8cbd14bb..15492e325 100644 --- a/include/asm-arm/arch-lh7a40x/dma.h +++ b/include/asm-arm/arch-lh7a40x/dma.h @@ -1,86 +1,9 @@ /* include/asm-arm/arch-lh7a40x/dma.h * - * Copyright (C) 2005 Marc Singer + * Copyright (C) 2003 Coastal Environmental Systems * * 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. * */ - -typedef enum { - DMA_M2M0 = 0, - DMA_M2M1 = 1, - DMA_M2P0 = 2, /* Tx */ - DMA_M2P1 = 3, /* Rx */ - DMA_M2P2 = 4, /* Tx */ - DMA_M2P3 = 5, /* Rx */ - DMA_M2P4 = 6, /* Tx - AC97 */ - DMA_M2P5 = 7, /* Rx - AC97 */ - DMA_M2P6 = 8, /* Tx */ - DMA_M2P7 = 9, /* Rx */ -} dma_device_t; - -#define DMA_LENGTH_MAX ((64*1024) - 4) /* bytes */ - -#define DMAC_GCA __REG(DMAC_PHYS + 0x2b80) -#define DMAC_GIR __REG(DMAC_PHYS + 0x2bc0) - -#define DMAC_GIR_MMI1 (1<<11) -#define DMAC_GIR_MMI0 (1<<10) -#define DMAC_GIR_MPI8 (1<<9) -#define DMAC_GIR_MPI9 (1<<8) -#define DMAC_GIR_MPI6 (1<<7) -#define DMAC_GIR_MPI7 (1<<6) -#define DMAC_GIR_MPI4 (1<<5) -#define DMAC_GIR_MPI5 (1<<4) -#define DMAC_GIR_MPI2 (1<<3) -#define DMAC_GIR_MPI3 (1<<2) -#define DMAC_GIR_MPI0 (1<<1) -#define DMAC_GIR_MPI1 (1<<0) - -#define DMAC_M2P0 0x0000 -#define DMAC_M2P1 0x0040 -#define DMAC_M2P2 0x0080 -#define DMAC_M2P3 0x00c0 -#define DMAC_M2P4 0x0240 -#define DMAC_M2P5 0x0200 -#define DMAC_M2P6 0x02c0 -#define DMAC_M2P7 0x0280 -#define DMAC_M2P8 0x0340 -#define DMAC_M2P9 0x0300 -#define DMAC_M2M0 0x0100 -#define DMAC_M2M1 0x0140 - -#define DMAC_P_PCONTROL(c) __REG(DMAC_PHYS + (c) + 0x00) -#define DMAC_P_PINTERRUPT(c) __REG(DMAC_PHYS + (c) + 0x04) -#define DMAC_P_PPALLOC(c) __REG(DMAC_PHYS + (c) + 0x08) -#define DMAC_P_PSTATUS(c) __REG(DMAC_PHYS + (c) + 0x0c) -#define DMAC_P_REMAIN(c) __REG(DMAC_PHYS + (c) + 0x14) -#define DMAC_P_MAXCNT0(c) __REG(DMAC_PHYS + (c) + 0x20) -#define DMAC_P_BASE0(c) __REG(DMAC_PHYS + (c) + 0x24) -#define DMAC_P_CURRENT0(c) __REG(DMAC_PHYS + (c) + 0x28) -#define DMAC_P_MAXCNT1(c) __REG(DMAC_PHYS + (c) + 0x30) -#define DMAC_P_BASE1(c) __REG(DMAC_PHYS + (c) + 0x34) -#define DMAC_P_CURRENT1(c) __REG(DMAC_PHYS + (c) + 0x38) - -#define DMAC_PCONTROL_ENABLE (1<<4) - -#define DMAC_PORT_USB 0 -#define DMAC_PORT_SDMMC 1 -#define DMAC_PORT_AC97_1 2 -#define DMAC_PORT_AC97_2 3 -#define DMAC_PORT_AC97_3 4 -#define DMAC_PORT_UART1 6 -#define DMAC_PORT_UART2 7 -#define DMAC_PORT_UART3 8 - -#define DMAC_PSTATUS_CURRSTATE_SHIFT 4 -#define DMAC_PSTATUS_CURRSTATE_MASK 0x3 - -#define DMAC_PSTATUS_NEXTBUF (1<<6) -#define DMAC_PSTATUS_STALLRINT (1<<0) - -#define DMAC_INT_CHE (1<<3) -#define DMAC_INT_NFB (1<<1) -#define DMAC_INT_STALL (1<<0) diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S index 9fc7f4988..a2f67c06d 100644 --- a/include/asm-arm/arch-lh7a40x/entry-macro.S +++ b/include/asm-arm/arch-lh7a40x/entry-macro.S @@ -10,73 +10,11 @@ #include #include -/* In order to allow there to be support for both of the processor - classes at the same time, we make a hack here that isn't very - pretty. At startup, the link pointed to with the - branch_irq_lh7a400 symbol is replaced with a NOP when the CPU is - detected as a lh7a404. +# if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) +# error "LH7A400 and LH7A404 are mutually exclusive" +# endif - *** FIXME: we should clean this up so that there is only one - implementation for each CPU's design. - -*/ - -#if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) - - .macro disable_fiq - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - -branch_irq_lh7a400: b 1000f - -@ Implementation of the LH7A404 get_irqnr_and_base. - - mov \irqnr, #0 @ VIC1 irq base - mov \base, #io_p2v(0x80000000) @ APB registers - add \base, \base, #0x8000 - ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR - tst \tmp, #VA_VECTORED @ Direct vectored - bne 1002f - tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1 - ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS - bne 1001f - add \base, \base, #(0xa000 - 0x8000) - ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR - tst \tmp, #VA_VECTORED @ Direct vectored - bne 1002f - ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS - mov \irqnr, #32 @ VIC2 irq base - -1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry - bcs 1008f @ Bit set; irq found - add \irqnr, \irqnr, #1 - bne 1001b @ Until no bits - b 1009f @ Nothing? Hmm. -1002: and \irqnr, \tmp, #0x3f @ Mask for valid bits -1008: movs \irqstat, #1 @ Force !Z - str \tmp, [\base, #0x0030] @ Clear vector - b 1009f - -@ Implementation of the LH7A400 get_irqnr_and_base. - -1000: mov \irqnr, #0 - mov \base, #io_p2v(0x80000000) @ APB registers - ldr \irqstat, [\base, #0x500] @ PIC INTSR - -1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry - bcs 1008f @ Bit set; irq found - add \irqnr, \irqnr, #1 - bne 1001b @ Until no bits - b 1009f @ Nothing? Hmm. -1008: movs \irqstat, #1 @ Force !Z - -1009: - .endm - - - -#elif defined (CONFIG_ARCH_LH7A400) +# if defined (CONFIG_ARCH_LH7A400) .macro disable_fiq .endm diff --git a/include/asm-arm/arch-lh7a40x/hardware.h b/include/asm-arm/arch-lh7a40x/hardware.h index e9ff74fd7..aeb07c162 100644 --- a/include/asm-arm/arch-lh7a40x/hardware.h +++ b/include/asm-arm/arch-lh7a40x/hardware.h @@ -13,8 +13,6 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H -#include /* Added for the sake of amba-clcd driver */ - #define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff)) #define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff)) @@ -55,8 +53,6 @@ typedef struct { volatile u8 offset[4096]; } __regbase8; #endif -#define MASK_AND_SET(v,m,s) (v) = ((v)&~(m))|(s) - #include "registers.h" #endif /* _ASM_ARCH_HARDWARE_H */ diff --git a/include/asm-arm/arch-lh7a40x/io.h b/include/asm-arm/arch-lh7a40x/io.h index 17bc94097..bbcd4335f 100644 --- a/include/asm-arm/arch-lh7a40x/io.h +++ b/include/asm-arm/arch-lh7a40x/io.h @@ -18,5 +18,6 @@ /* No ISA or PCI bus on this machine. */ #define __io(a) ((void __iomem *)(a)) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif /* __ASM_ARCH_IO_H */ diff --git a/include/asm-arm/arch-lh7a40x/irqs.h b/include/asm-arm/arch-lh7a40x/irqs.h index afe8c7cba..f91f3e59f 100644 --- a/include/asm-arm/arch-lh7a40x/irqs.h +++ b/include/asm-arm/arch-lh7a40x/irqs.h @@ -18,6 +18,7 @@ #ifndef __ASM_ARCH_IRQS_H #define __ASM_ARCH_IRQS_H +#include #define FIQ_START 80 @@ -153,10 +154,9 @@ #if !defined (IRQ_GPIO0INTR) # define IRQ_GPIO0INTR IRQ_GPIO0FIQ #endif -#define IRQ_TICK IRQ_TINTR +#define IRQ_TICK IRQ_TINTR #define IRQ_PCC1_RDY IRQ_GPIO6INTR /* PCCard 1 ready */ #define IRQ_PCC2_RDY IRQ_GPIO7INTR /* PCCard 2 ready */ -#define IRQ_USB IRQ_USBINTR /* USB device */ #ifdef CONFIG_MACH_KEV7A400 # define IRQ_TS IRQ_GPIOFIQ /* Touchscreen */ @@ -191,10 +191,6 @@ # define IRQ_LPD7A400_TS IRQ_LPD7A40X_CPLD + 1 /* Touch screen */ #endif -#if defined (CONFIG_MACH_LPD7A400) -# define IRQ_TOUCH IRQ_LPD7A400_TS -#endif - #define NR_IRQS (NR_IRQ_CPU + NR_IRQ_BOARD) #endif diff --git a/include/asm-arm/arch-lh7a40x/registers.h b/include/asm-arm/arch-lh7a40x/registers.h index b4f09b3e2..2edb22e35 100644 --- a/include/asm-arm/arch-lh7a40x/registers.h +++ b/include/asm-arm/arch-lh7a40x/registers.h @@ -9,6 +9,7 @@ * */ +#include #include #ifndef __ASM_ARCH_REGISTERS_H @@ -17,7 +18,7 @@ /* Physical register base addresses */ -#define AC97C_PHYS (0x80000000) /* AC97 Controller */ +#define AC97_PHYS (0x80000000) /* AC97 Controller */ #define MMC_PHYS (0x80000100) /* Multimedia Card Controller */ #define USB_PHYS (0x80000200) /* USB Client */ #define SCI_PHYS (0x80000300) /* Secure Card Interface */ @@ -34,8 +35,6 @@ #define RTC_PHYS (0x80000d00) /* Real-time Clock */ #define GPIO_PHYS (0x80000e00) /* General Purpose IO */ #define BMI_PHYS (0x80000f00) /* Battery Monitor Interface */ -#define HRTFTC_PHYS (0x80001000) /* High-res TFT Controller (LH7A400) */ -#define ALI_PHYS (0x80001000) /* Advanced LCD Interface (LH7A404) */ #define WDT_PHYS (0x80001400) /* Watchdog Timer */ #define SMC_PHYS (0x80002000) /* Static Memory Controller */ #define SDRC_PHYS (0x80002400) /* SDRAM Controller */ @@ -44,7 +43,6 @@ /* Physical registers of the LH7A404 */ -#define ADC_PHYS (0x80001300) /* A/D & Touchscreen Controller */ #define VIC1_PHYS (0x80008000) /* Vectored Interrupt Controller 1 */ #define USBH_PHYS (0x80009000) /* USB OHCI host controller */ #define VIC2_PHYS (0x8000a000) /* Vectored Interrupt Controller 2 */ @@ -55,32 +53,10 @@ /* Clock/State Controller register */ -#define CSC_PWRSR __REG(CSC_PHYS + 0x00) /* Reset register & ID */ #define CSC_PWRCNT __REG(CSC_PHYS + 0x04) /* Power control */ -#define CSC_CLKSET __REG(CSC_PHYS + 0x20) /* Clock speed control */ -#define CSC_USBDRESET __REG(CSC_PHYS + 0x4c) /* USB Device resets */ #define CSC_PWRCNT_USBH_EN (1<<28) /* USB Host power enable */ -#define CSC_PWRCNT_DMAC_M2M1_EN (1<<27) -#define CSC_PWRCNT_DMAC_M2M0_EN (1<<26) -#define CSC_PWRCNT_DMAC_M2P8_EN (1<<25) -#define CSC_PWRCNT_DMAC_M2P9_EN (1<<24) -#define CSC_PWRCNT_DMAC_M2P6_EN (1<<23) -#define CSC_PWRCNT_DMAC_M2P7_EN (1<<22) -#define CSC_PWRCNT_DMAC_M2P4_EN (1<<21) -#define CSC_PWRCNT_DMAC_M2P5_EN (1<<20) -#define CSC_PWRCNT_DMAC_M2P2_EN (1<<19) -#define CSC_PWRCNT_DMAC_M2P3_EN (1<<18) -#define CSC_PWRCNT_DMAC_M2P0_EN (1<<17) -#define CSC_PWRCNT_DMAC_M2P1_EN (1<<16) - -#define CSC_PWRSR_CHIPMAN_SHIFT (24) -#define CSC_PWRSR_CHIPMAN_MASK (0xff) -#define CSC_PWRSR_CHIPID_SHIFT (16) -#define CSC_PWRSR_CHIPID_MASK (0xff) - -#define CSC_USBDRESET_APBRESETREG (1<<1) -#define CSC_USBDRESET_IORESETREG (1<<0) + /* Interrupt Controller registers */ @@ -133,13 +109,6 @@ #define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIO End-of-Interrupt */ #define GPIO_GPIOINTEN __REG(GPIO_PHYS + 0x58) /* GPIO Interrupt Enable */ #define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIO Interrupt Status */ -#define GPIO_PINMUX __REG(GPIO_PHYS + 0x2c) -#define GPIO_PADD __REG(GPIO_PHYS + 0x10) -#define GPIO_PAD __REG(GPIO_PHYS + 0x00) -#define GPIO_PCD __REG(GPIO_PHYS + 0x08) -#define GPIO_PCDD __REG(GPIO_PHYS + 0x18) -#define GPIO_PEDD __REG(GPIO_PHYS + 0x24) -#define GPIO_PED __REG(GPIO_PHYS + 0x20) /* Static Memory Controller registers */ @@ -169,22 +138,21 @@ #endif #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) - -# define CPLD_CONTROL __REG16(CPLD02_PHYS) -# define CPLD_SPI_DATA __REG16(CPLD06_PHYS) -# define CPLD_SPI_CONTROL __REG16(CPLD08_PHYS) -# define CPLD_SPI_EEPROM __REG16(CPLD0A_PHYS) -# define CPLD_INTERRUPTS __REG16(CPLD0C_PHYS) /* IRQ mask/status */ -# define CPLD_BOOT_MODE __REG16(CPLD0E_PHYS) -# define CPLD_FLASH __REG16(CPLD10_PHYS) -# define CPLD_POWER_MGMT __REG16(CPLD12_PHYS) -# define CPLD_REVISION __REG16(CPLD14_PHYS) -# define CPLD_GPIO_EXT __REG16(CPLD16_PHYS) -# define CPLD_GPIO_DATA __REG16(CPLD18_PHYS) -# define CPLD_GPIO_DIR __REG16(CPLD1A_PHYS) - +# define CPLD_CONTROL __REG8(CPLD02_PHYS) +# define CPLD_SPI_DATA __REG8(CPLD06_PHYS) +# define CPLD_SPI_CONTROL __REG8(CPLD08_PHYS) +# define CPLD_SPI_EEPROM __REG8(CPLD0A_PHYS) +# define CPLD_INTERRUPTS __REG8(CPLD0C_PHYS) /* IRQ mask/status */ +# define CPLD_BOOT_MODE __REG8(CPLD0E_PHYS) +# define CPLD_FLASH __REG8(CPLD10_PHYS) +# define CPLD_POWER_MGMT __REG8(CPLD12_PHYS) +# define CPLD_REVISION __REG8(CPLD14_PHYS) +# define CPLD_GPIO_EXT __REG8(CPLD16_PHYS) +# define CPLD_GPIO_DATA __REG8(CPLD18_PHYS) +# define CPLD_GPIO_DIR __REG8(CPLD1A_PHYS) #endif + /* Timer registers */ #define TIMER_LOAD1 __REG(TIMER_PHYS + 0x00) /* Timer 1 initial value */ @@ -222,3 +190,4 @@ #endif /* _ASM_ARCH_REGISTERS_H */ + diff --git a/include/asm-arm/arch-lh7a40x/ssp.h b/include/asm-arm/arch-lh7a40x/ssp.h deleted file mode 100644 index 132b1c4d5..000000000 --- a/include/asm-arm/arch-lh7a40x/ssp.h +++ /dev/null @@ -1,71 +0,0 @@ -/* ssp.h - $Id$ - - written by Marc Singer - 6 Dec 2004 - - Copyright (C) 2004 Marc Singer - - ----------- - DESCRIPTION - ----------- - - This SSP header is available throughout the kernel, for this - machine/architecture, because drivers that use it may be dispersed. - - This file was cloned from the 7952x implementation. It would be - better to share them, but we're taking an easier approach for the - time being. - -*/ - -#if !defined (__SSP_H__) -# define __SSP_H__ - -/* ----- Includes */ - -/* ----- Types */ - -struct ssp_driver { - int (*init) (void); - void (*exit) (void); - void (*acquire) (void); - void (*release) (void); - int (*configure) (int device, int mode, int speed, - int frame_size_write, int frame_size_read); - void (*chip_select) (int enable); - void (*set_callbacks) (void* handle, - irqreturn_t (*callback_tx)(void*), - irqreturn_t (*callback_rx)(void*)); - void (*enable) (void); - void (*disable) (void); -// int (*save_state) (void*); -// void (*restore_state) (void*); - int (*read) (void); - int (*write) (u16 data); - int (*write_read) (u16 data); - void (*flush) (void); - void (*write_async) (void* pv, size_t cb); - size_t (*write_pos) (void); -}; - - /* These modes are only available on the LH79524 */ -#define SSP_MODE_SPI (1) -#define SSP_MODE_SSI (2) -#define SSP_MODE_MICROWIRE (3) -#define SSP_MODE_I2S (4) - - /* CPLD SPI devices */ -#define DEVICE_EEPROM 0 /* Configuration eeprom */ -#define DEVICE_MAC 1 /* MAC eeprom (LPD79524) */ -#define DEVICE_CODEC 2 /* Audio codec */ -#define DEVICE_TOUCH 3 /* Touch screen (LPD79520) */ - -/* ----- Globals */ - -/* ----- Prototypes */ - -//extern struct ssp_driver lh79520_i2s_driver; -extern struct ssp_driver lh7a400_cpld_ssp_driver; - -#endif /* __SSP_H__ */ diff --git a/include/asm-arm/arch-lh7a40x/uncompress.h b/include/asm-arm/arch-lh7a40x/uncompress.h index 3d1ce0426..f8053346f 100644 --- a/include/asm-arm/arch-lh7a40x/uncompress.h +++ b/include/asm-arm/arch-lh7a40x/uncompress.h @@ -16,7 +16,7 @@ #ifndef UART_R_STATUS # define UART_R_STATUS (0x10) #endif -#define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */ +#define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */ /* Access UART with physical addresses before MMU is setup */ #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS)) diff --git a/include/asm-arm/arch-netx/debug-macro.S b/include/asm-arm/arch-netx/debug-macro.S deleted file mode 100644 index a940d0e80..000000000 --- a/include/asm-arm/arch-netx/debug-macro.S +++ /dev/null @@ -1,38 +0,0 @@ -/* linux/include/asm-arm/arch-netx/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * 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 "hardware.h" - - .macro addruart,rx - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - moveq \rx, #0x00100000 @ physical - movne \rx, #io_p2v(0x00100000) @ virtual - orr \rx, \rx, #0x00000a00 - .endm - - .macro senduart,rd,rx - str \rd, [\rx, #0] - .endm - - .macro busyuart,rd,rx -1002: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1002b - .endm - - .macro waituart,rd,rx -1001: ldr \rd, [\rx, #0x18] - tst \rd, #(1 << 3) - bne 1001b - .endm diff --git a/include/asm-arm/arch-netx/dma.h b/include/asm-arm/arch-netx/dma.h deleted file mode 100644 index 4eda5feed..000000000 --- a/include/asm-arm/arch-netx/dma.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/dma.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -#define MAX_DMA_CHANNELS 0 -#define MAX_DMA_ADDRESS ~0 diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S deleted file mode 100644 index 658df4d60..000000000 --- a/include/asm-arm/arch-netx/entry-macro.S +++ /dev/null @@ -1,35 +0,0 @@ -/* - * include/asm-arm/arch-netx/entry-macro.S - * - * Low-level IRQ helper macros for Hilscher netX based platforms - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - - .macro disable_fiq - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - mov \base, #io_p2v(0x00100000) - add \base, \base, #0x000ff000 - - ldr \irqstat, [\base, #0] - clz \irqnr, \irqstat - rsb \irqnr, \irqnr, #31 - cmp \irqstat, #0 - .endm - diff --git a/include/asm-arm/arch-netx/eth.h b/include/asm-arm/arch-netx/eth.h deleted file mode 100644 index 643c90ef8..000000000 --- a/include/asm-arm/arch-netx/eth.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * include/asm-arm/arch-netx/eth.h - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 ASMARM_ARCH_ETH_H -#define ASMARM_ARCH_ETH_H - -struct netxeth_platform_data { - unsigned int xcno; /* number of xmac/xpec engine this eth uses */ -}; - -#endif diff --git a/include/asm-arm/arch-netx/hardware.h b/include/asm-arm/arch-netx/hardware.h deleted file mode 100644 index 7786c4545..000000000 --- a/include/asm-arm/arch-netx/hardware.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * include/asm-arm/arch-netx/hardware.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -#define NETX_IO_PHYS 0x00100000 -#define NETX_IO_VIRT 0xe0000000 -#define NETX_IO_SIZE 0x00100000 - -#define SRAM_INTERNAL_PHYS_0 0x00000 -#define SRAM_INTERNAL_PHYS_1 0x08000 -#define SRAM_INTERNAL_PHYS_2 0x10000 -#define SRAM_INTERNAL_PHYS_3 0x18000 -#define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000) - -#define XPEC_MEM_SIZE 0x4000 -#define XMAC_MEM_SIZE 0x1000 -#define SRAM_MEM_SIZE 0x8000 - -#define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT) -#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS) - -#endif diff --git a/include/asm-arm/arch-netx/io.h b/include/asm-arm/arch-netx/io.h deleted file mode 100644 index a7a53f801..000000000 --- a/include/asm-arm/arch-netx/io.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/io.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffffffff - -#define __io(a) ((void __iomem *)(a)) -#define __mem_pci(a) (a) - -#endif diff --git a/include/asm-arm/arch-netx/irqs.h b/include/asm-arm/arch-netx/irqs.h deleted file mode 100644 index a487dc6e2..000000000 --- a/include/asm-arm/arch-netx/irqs.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * include/asm-arm/arch-netx/irqs.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -#define NETX_IRQ_VIC_START 0 -#define NETX_IRQ_SOFTINT 0 -#define NETX_IRQ_TIMER0 1 -#define NETX_IRQ_TIMER1 2 -#define NETX_IRQ_TIMER2 3 -#define NETX_IRQ_SYSTIME_NS 4 -#define NETX_IRQ_SYSTIME_S 5 -#define NETX_IRQ_GPIO_15 6 -#define NETX_IRQ_WATCHDOG 7 -#define NETX_IRQ_UART0 8 -#define NETX_IRQ_UART1 9 -#define NETX_IRQ_UART2 10 -#define NETX_IRQ_USB 11 -#define NETX_IRQ_SPI 12 -#define NETX_IRQ_I2C 13 -#define NETX_IRQ_LCD 14 -#define NETX_IRQ_HIF 15 -#define NETX_IRQ_GPIO_0_14 16 -#define NETX_IRQ_XPEC0 17 -#define NETX_IRQ_XPEC1 18 -#define NETX_IRQ_XPEC2 19 -#define NETX_IRQ_XPEC3 20 -#define NETX_IRQ_XPEC(no) (17 + (no)) -#define NETX_IRQ_MSYNC0 21 -#define NETX_IRQ_MSYNC1 22 -#define NETX_IRQ_MSYNC2 23 -#define NETX_IRQ_MSYNC3 24 -#define NETX_IRQ_IRQ_PHY 25 -#define NETX_IRQ_ISO_AREA 26 -/* int 27 is reserved */ -/* int 28 is reserved */ -#define NETX_IRQ_TIMER3 29 -#define NETX_IRQ_TIMER4 30 -/* int 31 is reserved */ - -#define NETX_IRQS 32 - -/* for multiplexed irqs on gpio 0..14 */ -#define NETX_IRQ_GPIO(x) (NETX_IRQS + (x)) -#define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14) - -/* Host interface interrupts */ -#define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x)) -#define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0) -#define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1) -#define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2) -#define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3) -#define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4) -#define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4) - -#define NR_IRQS (NETX_IRQ_HIF_LAST + 1) diff --git a/include/asm-arm/arch-netx/memory.h b/include/asm-arm/arch-netx/memory.h deleted file mode 100644 index 6d8d2df3e..000000000 --- a/include/asm-arm/arch-netx/memory.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/memory.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -#define PHYS_OFFSET UL(0x80000000) - -/* - * Virtual view <-> DMA view memory address translations - * virt_to_bus: Used to translate the virtual address to an - * address suitable to be passed to set_dma_addr - * bus_to_virt: Used to convert an address for DMA operations - * to an address that the kernel can use. - */ -#define __virt_to_bus(x) __virt_to_phys(x) -#define __bus_to_virt(x) __phys_to_virt(x) - -#endif - diff --git a/include/asm-arm/arch-netx/netx-regs.h b/include/asm-arm/arch-netx/netx-regs.h deleted file mode 100644 index 8ab45bea8..000000000 --- a/include/asm-arm/arch-netx/netx-regs.h +++ /dev/null @@ -1,410 +0,0 @@ -/* - * include/asm-arm/arch-netx/netx-regs.h - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARCH_NETX_REGS_H -#define __ASM_ARCH_NETX_REGS_H - -/* offsets relative to the beginning of the io space */ -#define NETX_OFS_SYSTEM 0x00000 -#define NETX_OFS_MEMCR 0x00100 -#define NETX_OFS_DPMAS 0x03000 -#define NETX_OFS_GPIO 0x00800 -#define NETX_OFS_PIO 0x00900 -#define NETX_OFS_UART0 0x00a00 -#define NETX_OFS_UART1 0x00a40 -#define NETX_OFS_UART2 0x00a80 -#define NETX_OF_MIIMU 0x00b00 -#define NETX_OFS_SPI 0x00c00 -#define NETX_OFS_I2C 0x00d00 -#define NETX_OFS_SYSTIME 0x01100 -#define NETX_OFS_RTC 0x01200 -#define NETX_OFS_EXTBUS 0x03600 -#define NETX_OFS_LCD 0x04000 -#define NETX_OFS_USB 0x20000 -#define NETX_OFS_XMAC0 0x60000 -#define NETX_OFS_XMAC1 0x61000 -#define NETX_OFS_XMAC2 0x62000 -#define NETX_OFS_XMAC3 0x63000 -#define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000) -#define NETX_OFS_PFIFO 0x64000 -#define NETX_OFS_XPEC0 0x70000 -#define NETX_OFS_XPEC1 0x74000 -#define NETX_OFS_XPEC2 0x78000 -#define NETX_OFS_XPEC3 0x7c000 -#define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000) -#define NETX_OFS_VIC 0xff000 - -/* physical addresses */ -#define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM) -#define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR) -#define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPMAS) -#define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO) -#define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO) -#define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0) -#define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1) -#define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2) -#define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU) -#define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI) -#define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C) -#define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME) -#define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC) -#define NETX_PA_EXTBUS (NETX_IO_PHYS + NETX_OFS_EXTBUS) -#define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD) -#define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB) -#define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0) -#define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1) -#define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2) -#define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3) -#define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no)) -#define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO) -#define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0) -#define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1) -#define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2) -#define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3) -#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no)) -#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC) - -/* virual addresses */ -#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM) -#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR) -#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS) -#define NETX_VA_GPIO (NETX_IO_VIRT + NETX_OFS_GPIO) -#define NETX_VA_PIO (NETX_IO_VIRT + NETX_OFS_PIO) -#define NETX_VA_UART0 (NETX_IO_VIRT + NETX_OFS_UART0) -#define NETX_VA_UART1 (NETX_IO_VIRT + NETX_OFS_UART1) -#define NETX_VA_UART2 (NETX_IO_VIRT + NETX_OFS_UART2) -#define NETX_VA_MIIMU (NETX_IO_VIRT + NETX_OF_MIIMU) -#define NETX_VA_SPI (NETX_IO_VIRT + NETX_OFS_SPI) -#define NETX_VA_I2C (NETX_IO_VIRT + NETX_OFS_I2C) -#define NETX_VA_SYSTIME (NETX_IO_VIRT + NETX_OFS_SYSTIME) -#define NETX_VA_RTC (NETX_IO_VIRT + NETX_OFS_RTC) -#define NETX_VA_EXTBUS (NETX_IO_VIRT + NETX_OFS_EXTBUS) -#define NETX_VA_LCD (NETX_IO_VIRT + NETX_OFS_LCD) -#define NETX_VA_USB (NETX_IO_VIRT + NETX_OFS_USB) -#define NETX_VA_XMAC0 (NETX_IO_VIRT + NETX_OFS_XMAC0) -#define NETX_VA_XMAC1 (NETX_IO_VIRT + NETX_OFS_XMAC1) -#define NETX_VA_XMAC2 (NETX_IO_VIRT + NETX_OFS_XMAC2) -#define NETX_VA_XMAC3 (NETX_IO_VIRT + NETX_OFS_XMAC3) -#define NETX_VA_XMAC(no) (NETX_IO_VIRT + NETX_OFS_XMAC(no)) -#define NETX_VA_PFIFO (NETX_IO_VIRT + NETX_OFS_PFIFO) -#define NETX_VA_XPEC0 (NETX_IO_VIRT + NETX_OFS_XPEC0) -#define NETX_VA_XPEC1 (NETX_IO_VIRT + NETX_OFS_XPEC1) -#define NETX_VA_XPEC2 (NETX_IO_VIRT + NETX_OFS_XPEC2) -#define NETX_VA_XPEC3 (NETX_IO_VIRT + NETX_OFS_XPEC3) -#define NETX_VA_XPEC(no) (NETX_IO_VIRT + NETX_OFS_XPEC(no)) -#define NETX_VA_VIC (NETX_IO_VIRT + NETX_OFS_VIC) - -/********************************* - * System functions * - *********************************/ - -/* Registers */ -#define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs)) -#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00) -#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04) -#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08) - -/* FIXME: Docs are not consistent */ -#define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x08) -/* #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x0c) */ - -#define NETX_SYSTEM_PHY_CONTROL NETX_SYSTEM_REG(0x10) -#define NETX_SYSTEM_REV NETX_SYSTEM_REG(0x34) -#define NETX_SYSTEM_IOC_ACCESS_KEY NETX_SYSTEM_REG(0x70) -#define NETX_SYSTEM_WDG_TR NETX_SYSTEM_REG(0x200) -#define NETX_SYSTEM_WDG_CTR NETX_SYSTEM_REG(0x204) -#define NETX_SYSTEM_WDG_IRQ_TIMEOUT NETX_SYSTEM_REG(0x208) -#define NETX_SYSTEM_WDG_RES_TIMEOUT NETX_SYSTEM_REG(0x20c) - -/* Bits */ -#define NETX_SYSTEM_RES_CR_RSTIN (1<<0) -#define NETX_SYSTEM_RES_CR_WDG_RES (1<<1) -#define NETX_SYSTEM_RES_CR_HOST_RES (1<<2) -#define NETX_SYSTEM_RES_CR_FIRMW_RES (1<<3) -#define NETX_SYSTEM_RES_CR_XPEC0_RES (1<<4) -#define NETX_SYSTEM_RES_CR_XPEC1_RES (1<<5) -#define NETX_SYSTEM_RES_CR_XPEC2_RES (1<<6) -#define NETX_SYSTEM_RES_CR_XPEC3_RES (1<<7) -#define NETX_SYSTEM_RES_CR_DIS_XPEC0_RES (1<<16) -#define NETX_SYSTEM_RES_CR_DIS_XPEC1_RES (1<<17) -#define NETX_SYSTEM_RES_CR_DIS_XPEC2_RES (1<<18) -#define NETX_SYSTEM_RES_CR_DIS_XPEC3_RES (1<<19) -#define NETX_SYSTEM_RES_CR_FIRMW_FLG0 (1<<20) -#define NETX_SYSTEM_RES_CR_FIRMW_FLG1 (1<<21) -#define NETX_SYSTEM_RES_CR_FIRMW_FLG2 (1<<22) -#define NETX_SYSTEM_RES_CR_FIRMW_FLG3 (1<<23) -#define NETX_SYSTEM_RES_CR_FIRMW_RES_EN (1<<24) -#define NETX_SYSTEM_RES_CR_RSTOUT (1<<25) -#define NETX_SYSTEM_RES_CR_EN_RSTOUT (1<<26) - -#define PHY_CONTROL_RESET (1<<31) -#define PHY_CONTROL_SIM_BYP (1<<30) -#define PHY_CONTROL_CLK_XLATIN (1<<29) -#define PHY_CONTROL_PHY1_EN (1<<21) -#define PHY_CONTROL_PHY1_NP_MSG_CODE -#define PHY_CONTROL_PHY1_AUTOMDIX (1<<17) -#define PHY_CONTROL_PHY1_FIXMODE (1<<16) -#define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13) -#define PHY_CONTROL_PHY0_EN (1<<12) -#define PHY_CONTROL_PHY0_NP_MSG_CODE -#define PHY_CONTROL_PHY0_AUTOMDIX (1<<8) -#define PHY_CONTROL_PHY0_FIXMODE (1<<7) -#define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4) -#define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf) - -#define PHY_MODE_10BASE_T_HALF 0 -#define PHY_MODE_10BASE_T_FULL 1 -#define PHY_MODE_100BASE_TX_FX_FULL 2 -#define PHY_MODE_100BASE_TX_FX_HALF 3 -#define PHY_MODE_100BASE_TX_HALF 4 -#define PHY_MODE_REPEATER 5 -#define PHY_MODE_POWER_DOWN 6 -#define PHY_MODE_ALL 7 - -/* Bits */ -#define VECT_CNTL_ENABLE (1 << 5) - -/******************************* - * GPIO and timer module * - *******************************/ - -/* Registers */ -#define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs)) -#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2)) -#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2)) -#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2)) -#define NETX_GPIO_COUNTER_MAX(counter) NETX_GPIO_REG(0x94 + ((counter)<<2)) -#define NETX_GPIO_COUNTER_CURRENT(counter) NETX_GPIO_REG(0xa8 + ((counter)<<2)) -#define NETX_GPIO_IRQ_ENABLE NETX_GPIO_REG(0xbc) -#define NETX_GPIO_IRQ_DISABLE NETX_GPIO_REG(0xc0) -#define NETX_GPIO_SYSTIME_NS_CMP NETX_GPIO_REG(0xc4) -#define NETX_GPIO_LINE NETX_GPIO_REG(0xc8) -#define NETX_GPIO_IRQ NETX_GPIO_REG(0xd0) - -/* Bits */ -#define NETX_GPIO_CFG_IOCFG_GP_INPUT (0x0) -#define NETX_GPIO_CFG_IOCFG_GP_OUTPUT (0x1) -#define NETX_GPIO_CFG_IOCFG_GP_UART (0x2) -#define NETX_GPIO_CFG_INV (1<<2) -#define NETX_GPIO_CFG_MODE_INPUT_READ (0<<3) -#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3) -#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3) -#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3) -#define NETX_GPIO_CFG_COUNT_REF_COUNTER0 (0<<5) -#define NETX_GPIO_CFG_COUNT_REF_COUNTER1 (1<<5) -#define NETX_GPIO_CFG_COUNT_REF_COUNTER2 (2<<5) -#define NETX_GPIO_CFG_COUNT_REF_COUNTER3 (3<<5) -#define NETX_GPIO_CFG_COUNT_REF_COUNTER4 (4<<5) -#define NETX_GPIO_CFG_COUNT_REF_SYSTIME (7<<5) - -#define NETX_GPIO_COUNTER_CTRL_RUN (1<<0) -#define NETX_GPIO_COUNTER_CTRL_SYM (1<<1) -#define NETX_GPIO_COUNTER_CTRL_ONCE (1<<2) -#define NETX_GPIO_COUNTER_CTRL_IRQ_EN (1<<3) -#define NETX_GPIO_COUNTER_CTRL_CNT_EVENT (1<<4) -#define NETX_GPIO_COUNTER_CTRL_RST_EN (1<<5) -#define NETX_GPIO_COUNTER_CTRL_SEL_EVENT (1<<6) -#define NETX_GPIO_COUNTER_CTRL_GPIO_REF /* FIXME */ - -#define GPIO_BIT(gpio) (1<<(gpio)) -#define COUNTER_BIT(counter) ((1<<16)<<(counter)) - -/******************************* - * PIO * - *******************************/ - -/* Registers */ -#define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs)) -#define NETX_PIO_INPIO NETX_PIO_REG(0x0) -#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4) -#define NETX_PIO_OEPIO NETX_PIO_REG(0x8) - -/******************************* - * MII Unit * - *******************************/ - -/* Registers */ -#define NETX_MIIMU __io(NETX_VA_MIIMU) - -/* Bits */ -#define MIIMU_SNRDY (1<<0) -#define MIIMU_PREAMBLE (1<<1) -#define MIIMU_OPMODE_WRITE (1<<2) -#define MIIMU_MDC_PERIOD (1<<3) -#define MIIMU_PHY_NRES (1<<4) -#define MIIMU_RTA (1<<5) -#define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6) -#define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11) -#define MIIMU_DATA(data) (((data) & 0xffff) << 16) - -/******************************* - * xmac / xpec * - *******************************/ - -/* XPEC register offsets relative to NETX_VA_XPEC(no) */ -#define NETX_XPEC_R0_OFS 0x00 -#define NETX_XPEC_R1_OFS 0x04 -#define NETX_XPEC_R2_OFS 0x08 -#define NETX_XPEC_R3_OFS 0x0c -#define NETX_XPEC_R4_OFS 0x10 -#define NETX_XPEC_R5_OFS 0x14 -#define NETX_XPEC_R6_OFS 0x18 -#define NETX_XPEC_R7_OFS 0x1c -#define NETX_XPEC_RANGE01_OFS 0x20 -#define NETX_XPEC_RANGE23_OFS 0x24 -#define NETX_XPEC_RANGE45_OFS 0x28 -#define NETX_XPEC_RANGE67_OFS 0x2c -#define NETX_XPEC_PC_OFS 0x48 -#define NETX_XPEC_TIMER_OFS(timer) (0x30 + ((timer)<<2)) -#define NETX_XPEC_IRQ_OFS 0x8c -#define NETX_XPEC_SYSTIME_NS_OFS 0x90 -#define NETX_XPEC_FIFO_DATA_OFS 0x94 -#define NETX_XPEC_SYSTIME_S_OFS 0x98 -#define NETX_XPEC_ADC_OFS 0x9c -#define NETX_XPEC_URX_COUNT_OFS 0x40 -#define NETX_XPEC_UTX_COUNT_OFS 0x44 -#define NETX_XPEC_PC_OFS 0x48 -#define NETX_XPEC_ZERO_OFS 0x4c -#define NETX_XPEC_STATCFG_OFS 0x50 -#define NETX_XPEC_EC_MASKA_OFS 0x54 -#define NETX_XPEC_EC_MASKB_OFS 0x58 -#define NETX_XPEC_EC_MASK0_OFS 0x5c -#define NETX_XPEC_EC_MASK8_OFS 0x7c -#define NETX_XPEC_EC_MASK9_OFS 0x80 -#define NETX_XPEC_XPU_HOLD_PC_OFS 0x100 -#define NETX_XPEC_RAM_START_OFS 0x2000 - -/* Bits */ -#define XPU_HOLD_PC (1<<0) - -/* XMAC register offsets relative to NETX_VA_XMAC(no) */ -#define NETX_XMAC_RPU_PROGRAM_START_OFS 0x000 -#define NETX_XMAC_RPU_PROGRAM_END_OFS 0x3ff -#define NETX_XMAC_TPU_PROGRAM_START_OFS 0x400 -#define NETX_XMAC_TPU_PROGRAM_END_OFS 0x7ff -#define NETX_XMAC_RPU_HOLD_PC_OFS 0xa00 -#define NETX_XMAC_TPU_HOLD_PC_OFS 0xa04 -#define NETX_XMAC_STATUS_SHARED0_OFS 0x840 -#define NETX_XMAC_CONFIG_SHARED0_OFS 0x844 -#define NETX_XMAC_STATUS_SHARED1_OFS 0x848 -#define NETX_XMAC_CONFIG_SHARED1_OFS 0x84c -#define NETX_XMAC_STATUS_SHARED2_OFS 0x850 -#define NETX_XMAC_CONFIG_SHARED2_OFS 0x854 -#define NETX_XMAC_STATUS_SHARED3_OFS 0x858 -#define NETX_XMAC_CONFIG_SHARED3_OFS 0x85c - -#define RPU_HOLD_PC (1<<15) -#define TPU_HOLD_PC (1<<15) - -/******************************* - * Pointer FIFO * - *******************************/ - -/* Registers */ -#define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs)) -#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2)) -#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2)) -#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100) -#define NETX_PFIFO_FULL NETX_PFIFO_REG(0x104) -#define NETX_PFIFO_EMPTY NETX_PFIFO_REG(0x108) -#define NETX_PFIFO_OVEFLOW NETX_PFIFO_REG(0x10c) -#define NETX_PFIFO_UNDERRUN NETX_PFIFO_REG(0x110) -#define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2)) -#define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2)) - -/******************************* - * Dual Port Memory * - *******************************/ - -/* Registers */ -#define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs)) -#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8) -#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0) -#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0) -#define NETX_DPMAS_IF_CONF0 NETX_DPMAS_REG(0x608) -#define NETX_DPMAS_IF_CONF1 NETX_DPMAS_REG(0x60c) -#define NETX_DPMAS_EXT_CONFIG(cs) NETX_DPMAS_REG(0x610 + 4 * (cs)) -#define NETX_DPMAS_IO_MODE0 NETX_DPMAS_REG(0x620) /* I/O 32..63 */ -#define NETX_DPMAS_DRV_EN0 NETX_DPMAS_REG(0x624) -#define NETX_DPMAS_DATA0 NETX_DPMAS_REG(0x628) -#define NETX_DPMAS_IO_MODE1 NETX_DPMAS_REG(0x630) /* I/O 64..84 */ -#define NETX_DPMAS_DRV_EN1 NETX_DPMAS_REG(0x634) -#define NETX_DPMAS_DATA1 NETX_DPMAS_REG(0x638) - -/* Bits */ -#define NETX_DPMAS_INT_EN_GLB_EN (1<<31) -#define NETX_DPMAS_INT_EN_MEM_LCK (1<<30) -#define NETX_DPMAS_INT_EN_WDG (1<<29) -#define NETX_DPMAS_INT_EN_PIO72 (1<<28) -#define NETX_DPMAS_INT_EN_PIO47 (1<<27) -#define NETX_DPMAS_INT_EN_PIO40 (1<<26) -#define NETX_DPMAS_INT_EN_PIO36 (1<<25) -#define NETX_DPMAS_INT_EN_PIO35 (1<<24) - -#define NETX_DPMAS_IF_CONF0_HIF_DISABLED (0<<28) -#define NETX_DPMAS_IF_CONF0_HIF_EXT_BUS (1<<28) -#define NETX_DPMAS_IF_CONF0_HIF_UP_8BIT (2<<28) -#define NETX_DPMAS_IF_CONF0_HIF_UP_16BIT (3<<28) -#define NETX_DPMAS_IF_CONF0_HIF_IO (4<<28) -#define NETX_DPMAS_IF_CONF0_WAIT_DRV_PP (1<<14) -#define NETX_DPMAS_IF_CONF0_WAIT_DRV_OD (2<<14) -#define NETX_DPMAS_IF_CONF0_WAIT_DRV_TRI (3<<14) - -#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO35 (1<<26) -#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO36 (1<<27) -#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO40 (1<<28) -#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO47 (1<<29) -#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO72 (1<<30) - -#define NETX_EXT_CONFIG_TALEWIDTH(x) (((x) & 0x7) << 29) -#define NETX_EXT_CONFIG_TADRHOLD(x) (((x) & 0x7) << 26) -#define NETX_EXT_CONFIG_TCSON(x) (((x) & 0x7) << 23) -#define NETX_EXT_CONFIG_TRDON(x) (((x) & 0x7) << 20) -#define NETX_EXT_CONFIG_TWRON(x) (((x) & 0x7) << 17) -#define NETX_EXT_CONFIG_TWROFF(x) (((x) & 0x1f) << 12) -#define NETX_EXT_CONFIG_TRDWRCYC(x) (((x) & 0x1f) << 7) -#define NETX_EXT_CONFIG_WAIT_POL (1<<6) -#define NETX_EXT_CONFIG_WAIT_EN (1<<5) -#define NETX_EXT_CONFIG_NRD_MODE (1<<4) -#define NETX_EXT_CONFIG_DS_MODE (1<<3) -#define NETX_EXT_CONFIG_NWR_MODE (1<<2) -#define NETX_EXT_CONFIG_16BIT (1<<1) -#define NETX_EXT_CONFIG_CS_ENABLE (1<<0) - -#define NETX_DPMAS_IO_MODE0_WRL (1<<13) -#define NETX_DPMAS_IO_MODE0_WAIT (1<<14) -#define NETX_DPMAS_IO_MODE0_READY (1<<15) -#define NETX_DPMAS_IO_MODE0_CS0 (1<<19) -#define NETX_DPMAS_IO_MODE0_EXTRD (1<<20) - -#define NETX_DPMAS_IO_MODE1_CS2 (1<<15) -#define NETX_DPMAS_IO_MODE1_CS1 (1<<16) -#define NETX_DPMAS_IO_MODE1_SAMPLE_NPOR (0<<30) -#define NETX_DPMAS_IO_MODE1_SAMPLE_100MHZ (1<<30) -#define NETX_DPMAS_IO_MODE1_SAMPLE_NPIO36 (2<<30) -#define NETX_DPMAS_IO_MODE1_SAMPLE_PIO36 (3<<30) - -/******************************* - * I2C * - *******************************/ -#define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs)) -#define NETX_I2C_CTRL NETX_I2C_REG(0x0) -#define NETX_I2C_DATA NETX_I2C_REG(0x4) - -#endif /* __ASM_ARCH_NETX_REGS_H */ diff --git a/include/asm-arm/arch-netx/param.h b/include/asm-arm/arch-netx/param.h deleted file mode 100644 index 7a80c2617..000000000 --- a/include/asm-arm/arch-netx/param.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/param.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ diff --git a/include/asm-arm/arch-netx/pfifo.h b/include/asm-arm/arch-netx/pfifo.h deleted file mode 100644 index 4af2ee4a3..000000000 --- a/include/asm-arm/arch-netx/pfifo.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * include/asm-arm/arch-netx/pfifo.h - * - * Copyright (c) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 ASM_ARCH_PFIFO_H -#define ASM_ARCH_PFIFO_H - -static inline int pfifo_push(int no, unsigned int pointer) -{ - writel(pointer, NETX_PFIFO_BASE(no)); - return 0; -} - -static inline unsigned int pfifo_pop(int no) -{ - return readl(NETX_PFIFO_BASE(no)); -} - -static inline int pfifo_fill_level(int no) -{ - - return readl(NETX_PFIFO_FILL_LEVEL(no)); -} - -static inline int pfifo_full(int no) -{ - return readl(NETX_PFIFO_FULL) & (1<, Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARCH_SYSTEM_H -#define __ASM_ARCH_SYSTEM_H - -#include -#include -#include "netx-regs.h" - -static inline void arch_idle(void) -{ - cpu_do_idle(); -} - -static inline void arch_reset(char mode) -{ - writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, - NETX_SYSTEM_RES_CR); -} - -#endif - diff --git a/include/asm-arm/arch-netx/timex.h b/include/asm-arm/arch-netx/timex.h deleted file mode 100644 index 7fdb42da0..000000000 --- a/include/asm-arm/arch-netx/timex.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * include/asm-arm/arch-netx/timex.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -#define CLOCK_TICK_RATE 100000000 diff --git a/include/asm-arm/arch-netx/uncompress.h b/include/asm-arm/arch-netx/uncompress.h deleted file mode 100644 index f89434547..000000000 --- a/include/asm-arm/arch-netx/uncompress.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * include/asm-arm/arch-netx/uncompress.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ - -/* - * The following code assumes the serial port has already been - * initialized by the bootloader. We search for the first enabled - * port in the most probable order. If you didn't setup a port in - * your bootloader then nothing will appear (which might be desired). - * - * This does not append a newline - */ - -#define REG(x) (*(volatile unsigned long *)(x)) - -#define UART1_BASE 0x100a00 -#define UART2_BASE 0x100a80 - -#define UART_DR 0x0 - -#define UART_CR 0x14 -#define CR_UART_EN (1<<0) - -#define UART_FR 0x18 -#define FR_BUSY (1<<3) -#define FR_TXFF (1<<5) - -static void putc(char c) -{ - unsigned long base; - - if (REG(UART1_BASE + UART_CR) & CR_UART_EN) - base = UART1_BASE; - else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) - base = UART2_BASE; - else - return; - - while (REG(base + UART_FR) & FR_TXFF); - REG(base + UART_DR) = c; -} - -static inline void flush(void) -{ - unsigned long base; - - if (REG(UART1_BASE + UART_CR) & CR_UART_EN) - base = UART1_BASE; - else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) - base = UART2_BASE; - else - return; - - while (REG(base + UART_FR) & FR_BUSY); -} - -/* - * nothing to do - */ -#define arch_decomp_setup() -#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-netx/vmalloc.h b/include/asm-arm/arch-netx/vmalloc.h deleted file mode 100644 index da2da5a59..000000000 --- a/include/asm-arm/arch-netx/vmalloc.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/vmalloc.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 - */ -#define VMALLOC_END (PAGE_OFFSET + 0x10000000) diff --git a/include/asm-arm/arch-netx/xc.h b/include/asm-arm/arch-netx/xc.h deleted file mode 100644 index 659af1951..000000000 --- a/include/asm-arm/arch-netx/xc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * linux/include/asm-arm/arch-netx/xc.h - * - * Copyright (C) 2005 Sascha Hauer , Pengutronix - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This 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 __ASM_ARCH_XC_H -#define __ASM_ARCH_XC_H - -struct xc { - int no; - unsigned int type; - unsigned int version; - void __iomem *xpec_base; - void __iomem *xmac_base; - void __iomem *sram_base; - int irq; - struct device *dev; -}; - -int xc_reset(struct xc *x); -int xc_stop(struct xc* x); -int xc_start(struct xc *x); -int xc_running(struct xc *x); -int xc_request_firmware(struct xc* x); -struct xc* request_xc(int xcno, struct device *dev); -void free_xc(struct xc *x); - -#endif /* __ASM_ARCH_XC_H */ diff --git a/include/asm-arm/arch-omap/board-fsample.h b/include/asm-arm/arch-omap/board-fsample.h deleted file mode 100644 index 89a1e529f..000000000 --- a/include/asm-arm/arch-omap/board-fsample.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * linux/include/asm-arm/arch-omap/board-fsample.h - * - * Board-specific goodies for TI F-Sample. - * - * Copyright (C) 2006 Google, Inc. - * Author: Brian Swetland - * - * 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. - */ - -#ifndef __ASM_ARCH_OMAP_FSAMPLE_H -#define __ASM_ARCH_OMAP_FSAMPLE_H - -/* fsample is pretty close to p2-sample */ -#include - -#define fsample_cpld_read(reg) __raw_readb(reg) -#define fsample_cpld_write(val, reg) __raw_writeb(val, reg) - -#define FSAMPLE_CPLD_BASE 0xE8100000 -#define FSAMPLE_CPLD_SIZE SZ_4K -#define FSAMPLE_CPLD_START 0x05080000 - -#define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00) -#define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02) -#define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02) -#define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04) -#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06) -#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06) - -#define FSAMPLE_CPLD_BIT_BT_RESET 0 -#define FSAMPLE_CPLD_BIT_LCD_RESET 1 -#define FSAMPLE_CPLD_BIT_CAM_PWDN 2 -#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3 -#define FSAMPLE_CPLD_BIT_SD_MMC_EN 4 -#define FSAMPLE_CPLD_BIT_aGPS_PWREN 5 -#define FSAMPLE_CPLD_BIT_BACKLIGHT 6 -#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7 -#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8 -#define FSAMPLE_CPLD_BIT_OTG_RESET 9 - -#define fsample_cpld_set(bit) \ - fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR) - -#define fsample_cpld_clear(bit) \ - fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR) - -#endif diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index edf1dc6ad..6d6240a46 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h @@ -10,6 +10,7 @@ #ifndef _OMAP_BOARD_H #define _OMAP_BOARD_H +#include #include /* Different peripheral ids */ @@ -22,7 +23,6 @@ #define OMAP_TAG_UART 0x4f07 #define OMAP_TAG_FBMEM 0x4f08 #define OMAP_TAG_STI_CONSOLE 0x4f09 -#define OMAP_TAG_CAMERA_SENSOR 0x4f0a #define OMAP_TAG_BOOT_REASON 0x4f80 #define OMAP_TAG_FLASH_PART 0x4f81 @@ -62,12 +62,6 @@ struct omap_sti_console_config { u8 channel; }; -struct omap_camera_sensor_config { - u16 reset_gpio; - int (*power_on)(void * data); - int (*power_off)(void * data); -}; - struct omap_usb_config { /* Configure drivers according to the connectors on your board: * - "A" connector (rectagular) diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index f83003f52..3c4eb9fbe 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h @@ -48,6 +48,8 @@ struct clk_functions { }; extern unsigned int mpurate; +extern struct list_head clocks; +extern spinlock_t clockfw_lock; extern int clk_init(struct clk_functions * custom_clocks); extern int clk_register(struct clk *clk); diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index 1b1b02307..ca1202312 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h @@ -185,8 +185,8 @@ /* DMA channels for 24xx */ #define OMAP24XX_DMA_NO_DEVICE 0 #define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ -#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */ -#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */ +#define OMAP24XX_DMA_EXT_NDMA_REQ0 2 /* S_DMA_1 */ +#define OMAP24XX_DMA_EXT_NDMA_REQ1 3 /* S_DMA_2 */ #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ @@ -197,9 +197,7 @@ #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ -#define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */ -#define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */ -#define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */ + #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ @@ -246,7 +244,6 @@ #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ -#define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */ /*----------------------------------------------------------------------------*/ @@ -277,7 +274,7 @@ #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) -#define OMAP1_DMA_TOUT_IRQ (1 << 0) +#define OMAP_DMA_TOUT_IRQ (1 << 0) /* Only on omap1 */ #define OMAP_DMA_DROP_IRQ (1 << 1) #define OMAP_DMA_HALF_IRQ (1 << 2) #define OMAP_DMA_FRAME_IRQ (1 << 3) @@ -318,11 +315,11 @@ enum { OMAP_LCD_DMA_B2_BOTTOM }; +/* REVISIT: Check if BURST_4 is really 1 (or 2) */ enum omap_dma_burst_mode { OMAP_DMA_DATA_BURST_DIS = 0, OMAP_DMA_DATA_BURST_4, - OMAP_DMA_DATA_BURST_8, - OMAP_DMA_DATA_BURST_16, + OMAP_DMA_DATA_BURST_8 }; enum omap_dma_color_mode { diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h index 7a289ff07..e6522e6a3 100644 --- a/include/asm-arm/arch-omap/dmtimer.h +++ b/include/asm-arm/arch-omap/dmtimer.h @@ -5,7 +5,6 @@ * * Copyright (C) 2005 Nokia Corporation * Author: Lauri Leukkunen - * PWM and clock framwork support by Timo Teras. * * 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 @@ -26,56 +25,69 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __ASM_ARCH_DMTIMER_H -#define __ASM_ARCH_DMTIMER_H - -/* clock sources */ -#define OMAP_TIMER_SRC_SYS_CLK 0x00 -#define OMAP_TIMER_SRC_32_KHZ 0x01 -#define OMAP_TIMER_SRC_EXT_CLK 0x02 +#ifndef __ASM_ARCH_TIMER_H +#define __ASM_ARCH_TIMER_H + +#include + +#define OMAP_TIMER_SRC_ARMXOR 0x00 +#define OMAP_TIMER_SRC_32_KHZ 0x01 +#define OMAP_TIMER_SRC_EXT_CLK 0x02 + +/* timer control reg bits */ +#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) +#define OMAP_TIMER_CTRL_PT (1 << 12) +#define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10) +#define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10) +#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) +#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) +#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) +#define OMAP_TIMER_CTRL_SCPWM (1 << 7) +#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ +#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ +#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ +#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ +#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ /* timer interrupt enable bits */ -#define OMAP_TIMER_INT_CAPTURE (1 << 2) -#define OMAP_TIMER_INT_OVERFLOW (1 << 1) -#define OMAP_TIMER_INT_MATCH (1 << 0) +#define OMAP_TIMER_INT_CAPTURE (1 << 2) +#define OMAP_TIMER_INT_OVERFLOW (1 << 1) +#define OMAP_TIMER_INT_MATCH (1 << 0) -/* trigger types */ -#define OMAP_TIMER_TRIGGER_NONE 0x00 -#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 -#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 -struct omap_dm_timer; -struct clk; +struct omap_dm_timer { + struct list_head timer_list; -int omap_dm_timer_init(void); + u32 base; + unsigned int irq; +}; -struct omap_dm_timer *omap_dm_timer_request(void); -struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); -void omap_dm_timer_free(struct omap_dm_timer *timer); +u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg); +void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value); -int omap_dm_timer_get_irq(struct omap_dm_timer *timer); +struct omap_dm_timer * omap_dm_timer_request(void); +void omap_dm_timer_free(struct omap_dm_timer *timer); +void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); -u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); -struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer); +void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); +void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value); +void omap_dm_timer_enable_compare(struct omap_dm_timer *timer); +void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer); void omap_dm_timer_trigger(struct omap_dm_timer *timer); void omap_dm_timer_start(struct omap_dm_timer *timer); void omap_dm_timer_stop(struct omap_dm_timer *timer); -void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); -void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value); -void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match); -void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger); -void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); - -void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); +void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load); +void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match); unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); + unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); -void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value); +void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); int omap_dm_timers_active(void); +u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); - -#endif /* __ASM_ARCH_DMTIMER_H */ +#endif /* __ASM_ARCH_TIMER_H */ diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h deleted file mode 100644 index 1a0a52078..000000000 --- a/include/asm-arm/arch-omap/gpmc.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * General-Purpose Memory Controller for OMAP2 - * - * Copyright (C) 2005-2006 Nokia Corporation - * - * 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. - */ - -#ifndef __OMAP2_GPMC_H -#define __OMAP2_GPMC_H - -#define GPMC_CS_CONFIG1 0x00 -#define GPMC_CS_CONFIG2 0x04 -#define GPMC_CS_CONFIG3 0x08 -#define GPMC_CS_CONFIG4 0x0c -#define GPMC_CS_CONFIG5 0x10 -#define GPMC_CS_CONFIG6 0x14 -#define GPMC_CS_CONFIG7 0x18 -#define GPMC_CS_NAND_COMMAND 0x1c -#define GPMC_CS_NAND_ADDRESS 0x20 -#define GPMC_CS_NAND_DATA 0x24 - -#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31) -#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20) -#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29) -#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29) -#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27) -#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27) -#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25) -#define GPMC_CONFIG1_PAGE_LEN(val) ((val & 3) << 23) -#define GPMC_CONFIG1_WAIT_READ_MON (1 << 22) -#define GPMC_CONFIG1_WAIT_WRITE_MON (1 << 21) -#define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18) -#define GPMC_CONFIG1_WAIT_PIN_SEL(val) ((val & 3) << 16) -#define GPMC_CONFIG1_DEVICESIZE(val) ((val & 3) << 12) -#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) -#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) -#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) -#define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1) -#define GPMC_CONFIG1_MUXADDDATA (1 << 9) -#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) -#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) -#define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) -#define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2)) -#define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3)) - -/* - * Note that all values in this struct are in nanoseconds, while - * the register values are in gpmc_fck cycles. - */ -struct gpmc_timings { - /* Minimum clock period for synchronous mode */ - u16 sync_clk; - - /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */ - u16 cs_on; /* Assertion time */ - u16 cs_rd_off; /* Read deassertion time */ - u16 cs_wr_off; /* Write deassertion time */ - - /* ADV signal timings corresponding to GPMC_CONFIG3 */ - u16 adv_on; /* Assertion time */ - u16 adv_rd_off; /* Read deassertion time */ - u16 adv_wr_off; /* Write deassertion time */ - - /* WE signals timings corresponding to GPMC_CONFIG4 */ - u16 we_on; /* WE assertion time */ - u16 we_off; /* WE deassertion time */ - - /* OE signals timings corresponding to GPMC_CONFIG4 */ - u16 oe_on; /* OE assertion time */ - u16 oe_off; /* OE deassertion time */ - - /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */ - u16 page_burst_access; /* Multiple access word delay */ - u16 access; /* Start-cycle to first data valid delay */ - u16 rd_cycle; /* Total read cycle time */ - u16 wr_cycle; /* Total write cycle time */ -}; - -extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); - -extern void gpmc_cs_write_reg(int cs, int idx, u32 val); -extern u32 gpmc_cs_read_reg(int cs, int idx); -extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk); -extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); -extern unsigned long gpmc_cs_get_base_addr(int cs); - - -#endif diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 481048d65..7909b7298 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h @@ -37,6 +37,7 @@ #define __ASM_ARCH_OMAP_HARDWARE_H #include +#include #ifndef __ASSEMBLER__ #include #include @@ -297,10 +298,6 @@ #include "board-perseus2.h" #endif -#ifdef CONFIG_MACH_OMAP_FSAMPLE -#include "board-fsample.h" -#endif - #ifdef CONFIG_MACH_OMAP_H3 #include "board-h3.h" #endif diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index 78f68e6a4..b726acfca 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h @@ -44,6 +44,7 @@ */ #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) /* * ---------------------------------------------------------------------------- diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 2542495d8..42098d99f 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h @@ -242,24 +242,10 @@ #define INT_24XX_GPIO_BANK2 30 #define INT_24XX_GPIO_BANK3 31 #define INT_24XX_GPIO_BANK4 32 -#define INT_24XX_GPTIMER1 37 -#define INT_24XX_GPTIMER2 38 -#define INT_24XX_GPTIMER3 39 -#define INT_24XX_GPTIMER4 40 -#define INT_24XX_GPTIMER5 41 -#define INT_24XX_GPTIMER6 42 -#define INT_24XX_GPTIMER7 43 -#define INT_24XX_GPTIMER8 44 -#define INT_24XX_GPTIMER9 45 -#define INT_24XX_GPTIMER10 46 -#define INT_24XX_GPTIMER11 47 -#define INT_24XX_GPTIMER12 48 #define INT_24XX_MCBSP1_IRQ_TX 59 #define INT_24XX_MCBSP1_IRQ_RX 60 #define INT_24XX_MCBSP2_IRQ_TX 62 #define INT_24XX_MCBSP2_IRQ_RX 63 -#define INT_24XX_UART1_IRQ 72 -#define INT_24XX_UART2_IRQ 73 #define INT_24XX_UART3_IRQ 74 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 679869c5e..0dc24d4ba 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h @@ -410,12 +410,6 @@ enum omap24xx_index { /* 24xx clock */ W14_24XX_SYS_CLKOUT, - /* 24xx GPMC wait pin monitoring */ - L3_GPMC_WAIT0, - N7_GPMC_WAIT1, - M1_GPMC_WAIT2, - P1_GPMC_WAIT3, - /* 242X McBSP */ Y15_24XX_MCBSP2_CLKX, R14_24XX_MCBSP2_FSX, @@ -435,26 +429,6 @@ enum omap24xx_index { M15_24XX_GPIO92, V14_24XX_GPIO117, - /* 242x DBG GPIO */ - V4_242X_GPIO49, - W2_242X_GPIO50, - U4_242X_GPIO51, - V3_242X_GPIO52, - V2_242X_GPIO53, - V6_242X_GPIO53, - T4_242X_GPIO54, - Y4_242X_GPIO54, - T3_242X_GPIO55, - U2_242X_GPIO56, - - /* 24xx external DMA requests */ - AA10_242X_DMAREQ0, - AA6_242X_DMAREQ1, - E4_242X_DMAREQ2, - G4_242X_DMAREQ3, - D3_242X_DMAREQ4, - E3_242X_DMAREQ5, - P20_24XX_TSC_IRQ, /* UART3 */ diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index e46623c61..05b003f3a 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h @@ -299,43 +299,10 @@ enum omap24xx_save_state { OMAP24XX_SLEEP_SAVE_INTC_MIR0, OMAP24XX_SLEEP_SAVE_INTC_MIR1, OMAP24XX_SLEEP_SAVE_INTC_MIR2, - - OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU, - OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE, - OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX, - OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP, - OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM, - - OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU, - OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE, - OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX, - OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP, - OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM, - - OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE, - OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE, - OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE, - OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE, - OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX, - OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP, - OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN, - OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP, - OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM, - - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP, - OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM, - OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, - OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE, OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index ac2bfa433..67970d1a2 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h @@ -4,6 +4,7 @@ */ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H +#include #include #include diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index aca0adfef..ca2c8bec8 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h @@ -17,6 +17,7 @@ * kind, whether express or implied. */ +#include #include #include #include diff --git a/include/asm-arm/arch-pnx4008/clock.h b/include/asm-arm/arch-pnx4008/clock.h deleted file mode 100644 index 91ae0030f..000000000 --- a/include/asm-arm/arch-pnx4008/clock.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/clock.h - * - * Clock control driver for PNX4008 - header file - * - * Authors: Vitaly Wool, Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#ifndef __PNX4008_CLOCK_H__ -#define __PNX4008_CLOCK_H__ - -struct module; -struct clk; - -#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE) -#define HCLKDIVCTRL_REG (PWRMAN_VA_BASE + 0x40) -#define PWRCTRL_REG (PWRMAN_VA_BASE + 0x44) -#define PLLCTRL_REG (PWRMAN_VA_BASE + 0x48) -#define OSC13CTRL_REG (PWRMAN_VA_BASE + 0x4c) -#define SYSCLKCTRL_REG (PWRMAN_VA_BASE + 0x50) -#define HCLKPLLCTRL_REG (PWRMAN_VA_BASE + 0x58) -#define USBCTRL_REG (PWRMAN_VA_BASE + 0x64) -#define SDRAMCLKCTRL_REG (PWRMAN_VA_BASE + 0x68) -#define MSCTRL_REG (PWRMAN_VA_BASE + 0x80) -#define BTCLKCTRL (PWRMAN_VA_BASE + 0x84) -#define DUMCLKCTRL_REG (PWRMAN_VA_BASE + 0x90) -#define I2CCLKCTRL_REG (PWRMAN_VA_BASE + 0xac) -#define KEYCLKCTRL_REG (PWRMAN_VA_BASE + 0xb0) -#define TSCLKCTRL_REG (PWRMAN_VA_BASE + 0xb4) -#define PWMCLKCTRL_REG (PWRMAN_VA_BASE + 0xb8) -#define SPICTRL_REG (PWRMAN_VA_BASE + 0xc4) -#define FLASHCLKCTRL_REG (PWRMAN_VA_BASE + 0xc8) -#define UART3CLK_REG (PWRMAN_VA_BASE + 0xd0) -#define UARTCLKCTRL_REG (PWRMAN_VA_BASE + 0xe4) -#define DMACLKCTRL_REG (PWRMAN_VA_BASE + 0xe8) -#define AUTOCLK_CTRL (PWRMAN_VA_BASE + 0xec) -#define JPEGCLKCTRL_REG (PWRMAN_VA_BASE + 0xfc) - -#define AUDIOCONFIG_VA_BASE IO_ADDRESS(PNX4008_AUDIOCONFIG_BASE) -#define DSPPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x60) -#define DSPCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x64) -#define AUDIOCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x68) -#define AUDIOPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x6C) - -#define USB_OTG_CLKCTRL_REG IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0xff4) - -#define VFP9CLKCTRL_REG IO_ADDRESS(PNX4008_DEBUG_BASE) - -#define CLK_RATE_13MHZ 13000 -#define CLK_RATE_1MHZ 1000 -#define CLK_RATE_208MHZ 208000 -#define CLK_RATE_48MHZ 48000 -#define CLK_RATE_32KHZ 32 - -#define PNX4008_UART_CLK CLK_RATE_13MHZ * 1000 /* in MHz */ - -#endif diff --git a/include/asm-arm/arch-pnx4008/debug-macro.S b/include/asm-arm/arch-pnx4008/debug-macro.S deleted file mode 100644 index 67d18a203..000000000 --- a/include/asm-arm/arch-pnx4008/debug-macro.S +++ /dev/null @@ -1,23 +0,0 @@ -/* linux/include/asm-arm/arch-pnx4008/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * 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. - * -*/ - - .macro addruart,rx - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - mov \rx, #0x00090000 - addeq \rx, \rx, #0x40000000 - addne \rx, \rx, #0xf4000000 - .endm - -#define UART_SHIFT 2 -#include diff --git a/include/asm-arm/arch-pnx4008/dma.h b/include/asm-arm/arch-pnx4008/dma.h deleted file mode 100644 index 3aee12047..000000000 --- a/include/asm-arm/arch-pnx4008/dma.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/dma.h - * - * PNX4008 DMA header file - * - * Author: Vitaly Wool - * Copyright: MontaVista Software Inc. (c) 2005 - * - * 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. - */ - -#ifndef __ASM_ARCH_DMA_H -#define __ASM_ARCH_DMA_H - -#include "platform.h" - -#define MAX_DMA_ADDRESS 0xffffffff - -#define MAX_DMA_CHANNELS 8 - -#define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE) -#define DMAC_INT_STAT (DMAC_BASE + 0x0000) -#define DMAC_INT_TC_STAT (DMAC_BASE + 0x0004) -#define DMAC_INT_TC_CLEAR (DMAC_BASE + 0x0008) -#define DMAC_INT_ERR_STAT (DMAC_BASE + 0x000c) -#define DMAC_INT_ERR_CLEAR (DMAC_BASE + 0x0010) -#define DMAC_SOFT_SREQ (DMAC_BASE + 0x0024) -#define DMAC_CONFIG (DMAC_BASE + 0x0030) -#define DMAC_Cx_SRC_ADDR(c) (DMAC_BASE + 0x0100 + (c) * 0x20) -#define DMAC_Cx_DEST_ADDR(c) (DMAC_BASE + 0x0104 + (c) * 0x20) -#define DMAC_Cx_LLI(c) (DMAC_BASE + 0x0108 + (c) * 0x20) -#define DMAC_Cx_CONTROL(c) (DMAC_BASE + 0x010c + (c) * 0x20) -#define DMAC_Cx_CONFIG(c) (DMAC_BASE + 0x0110 + (c) * 0x20) - -enum { - WIDTH_BYTE = 0, - WIDTH_HWORD, - WIDTH_WORD -}; - -enum { - FC_MEM2MEM_DMA, - FC_MEM2PER_DMA, - FC_PER2MEM_DMA, - FC_PER2PER_DMA, - FC_PER2PER_DPER, - FC_MEM2PER_PER, - FC_PER2MEM_PER, - FC_PER2PER_SPER -}; - -enum { - DMA_INT_UNKNOWN = 0, - DMA_ERR_INT = 1, - DMA_TC_INT = 2, -}; - -enum { - DMA_BUFFER_ALLOCATED = 1, - DMA_HAS_LL = 2, -}; - -enum { - PER_CAM_DMA_1 = 0, - PER_NDF_FLASH = 1, - PER_MBX_SLAVE_FIFO = 2, - PER_SPI2_REC_XMIT = 3, - PER_MS_SD_RX_XMIT = 4, - PER_HS_UART_1_XMIT = 5, - PER_HS_UART_1_RX = 6, - PER_HS_UART_2_XMIT = 7, - PER_HS_UART_2_RX = 8, - PER_HS_UART_7_XMIT = 9, - PER_HS_UART_7_RX = 10, - PER_SPI1_REC_XMIT = 11, - PER_MLC_NDF_SREC = 12, - PER_CAM_DMA_2 = 13, - PER_PRNG_INFIFO = 14, - PER_PRNG_OUTFIFO = 15, -}; - -struct pnx4008_dma_ch_ctrl { - int tc_mask; - int cacheable; - int bufferable; - int priv_mode; - int di; - int si; - int dest_ahb1; - int src_ahb1; - int dwidth; - int swidth; - int dbsize; - int sbsize; - int tr_size; -}; - -struct pnx4008_dma_ch_config { - int halt; - int active; - int lock; - int itc; - int ie; - int flow_cntrl; - int dest_per; - int src_per; -}; - -struct pnx4008_dma_ll { - unsigned long src_addr; - unsigned long dest_addr; - u32 next_dma; - unsigned long ch_ctrl; - struct pnx4008_dma_ll *next; - int flags; - void *alloc_data; - int (*free) (void *); -}; - -struct pnx4008_dma_config { - int is_ll; - unsigned long src_addr; - unsigned long dest_addr; - unsigned long ch_ctrl; - unsigned long ch_cfg; - struct pnx4008_dma_ll *ll; - u32 ll_dma; - int flags; - void *alloc_data; - int (*free) (void *); -}; - -extern struct pnx4008_dma_ll *pnx4008_alloc_ll_entry(dma_addr_t *); -extern void pnx4008_free_ll_entry(struct pnx4008_dma_ll *, dma_addr_t); -extern void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll *); - -extern int pnx4008_request_channel(char *, int, - void (*)(int, int, void *, struct pt_regs *), - void *); -extern void pnx4008_free_channel(int); -extern int pnx4008_config_dma(int, int, int); -extern int pnx4008_dma_pack_control(const struct pnx4008_dma_ch_ctrl *, - unsigned long *); -extern int pnx4008_dma_parse_control(unsigned long, - struct pnx4008_dma_ch_ctrl *); -extern int pnx4008_dma_pack_config(const struct pnx4008_dma_ch_config *, - unsigned long *); -extern int pnx4008_dma_parse_config(unsigned long, - struct pnx4008_dma_ch_config *); -extern int pnx4008_config_channel(int, struct pnx4008_dma_config *); -extern int pnx4008_channel_get_config(int, struct pnx4008_dma_config *); -extern int pnx4008_dma_ch_enable(int); -extern int pnx4008_dma_ch_disable(int); -extern int pnx4008_dma_ch_enabled(int); -extern void pnx4008_dma_split_head_entry(struct pnx4008_dma_config *, - struct pnx4008_dma_ch_ctrl *); -extern void pnx4008_dma_split_ll_entry(struct pnx4008_dma_ll *, - struct pnx4008_dma_ch_ctrl *); - -#endif /* _ASM_ARCH_DMA_H */ diff --git a/include/asm-arm/arch-pnx4008/entry-macro.S b/include/asm-arm/arch-pnx4008/entry-macro.S deleted file mode 100644 index c1c198e36..000000000 --- a/include/asm-arm/arch-pnx4008/entry-macro.S +++ /dev/null @@ -1,121 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/entry-macro.S - * - * Low-level IRQ helper macros for PNX4008-based platforms - * - * 2005-2006 (c) MontaVista Software, Inc. - * Author: Vitaly Wool - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include "platform.h" - -#define IO_BASE 0xF0000000 -#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE) - -#define INTRC_MASK 0x00 -#define INTRC_RAW_STAT 0x04 -#define INTRC_STAT 0x08 -#define INTRC_POLAR 0x0C -#define INTRC_ACT_TYPE 0x10 -#define INTRC_TYPE 0x14 - -#define SIC1_BASE_INT 32 -#define SIC2_BASE_INT 64 - - .macro disable_fiq - .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp -/* decode the MIC interrupt numbers */ - ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) - ldr \irqstat, [\base, #INTRC_STAT] - - cmp \irqstat,#1<<16 - movhs \irqnr,#16 - movlo \irqnr,#0 - movhs \irqstat,\irqstat,lsr#16 - cmp \irqstat,#1<<8 - addhs \irqnr,\irqnr,#8 - movhs \irqstat,\irqstat,lsr#8 - cmp \irqstat,#1<<4 - addhs \irqnr,\irqnr,#4 - movhs \irqstat,\irqstat,lsr#4 - cmp \irqstat,#1<<2 - addhs \irqnr,\irqnr,#2 - movhs \irqstat,\irqstat,lsr#2 - cmp \irqstat,#1<<1 - addhs \irqnr,\irqnr,#1 - -/* was there an interrupt ? if not then drop out with EQ status */ - teq \irqstat,#0 - beq 1003f - -/* and now check for extended IRQ reasons */ - cmp \irqnr,#1 - bls 1003f - cmp \irqnr,#30 - blo 1002f - -/* IRQ 31,30 : High priority cascade IRQ handle */ -/* read the correct SIC */ -/* decoding status after compare : eq is 30 (SIC1) , ne is 31 (SIC2) */ -/* set the base IRQ number */ - ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) - moveq \irqnr,#SIC1_BASE_INT - ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) - movne \irqnr,#SIC2_BASE_INT - ldr \irqstat, [\base, #INTRC_STAT] - ldr \tmp, [\base, #INTRC_TYPE] -/* and with inverted mask : low priority interrupts */ - and \irqstat,\irqstat,\tmp - b 1004f - -1003: -/* IRQ 1,0 : Low priority cascade IRQ handle */ -/* read the correct SIC */ -/* decoding status after compare : eq is 1 (SIC2) , ne is 0 (SIC1)*/ -/* read the correct SIC */ -/* set the base IRQ number */ - ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) - movne \irqnr,#SIC1_BASE_INT - ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) - moveq \irqnr,#SIC2_BASE_INT - ldr \irqstat, [\base, #INTRC_STAT] - ldr \tmp, [\base, #INTRC_TYPE] -/* and with inverted mask : low priority interrupts */ - bic \irqstat,\irqstat,\tmp - -1004: - - cmp \irqstat,#1<<16 - addhs \irqnr,\irqnr,#16 - movhs \irqstat,\irqstat,lsr#16 - cmp \irqstat,#1<<8 - addhs \irqnr,\irqnr,#8 - movhs \irqstat,\irqstat,lsr#8 - cmp \irqstat,#1<<4 - addhs \irqnr,\irqnr,#4 - movhs \irqstat,\irqstat,lsr#4 - cmp \irqstat,#1<<2 - addhs \irqnr,\irqnr,#2 - movhs \irqstat,\irqstat,lsr#2 - cmp \irqstat,#1<<1 - addhs \irqnr,\irqnr,#1 - - -/* is irqstat not zero */ - -1002: -/* we assert that irqstat is not equal to zero and return ne status if true*/ - teq \irqstat,#0 -1003: - .endm - - - .macro irq_prio_table - .endm - - diff --git a/include/asm-arm/arch-pnx4008/gpio.h b/include/asm-arm/arch-pnx4008/gpio.h deleted file mode 100644 index d01bf83d5..000000000 --- a/include/asm-arm/arch-pnx4008/gpio.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/gpio.h - * - * PNX4008 GPIO driver - header file - * - * Author: Dmitry Chigirev - * - * Based on reference code by Iwo Mergler and Z.Tabaaloute from Philips: - * Copyright (c) 2005 Koninklijke Philips Electronics N.V. - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef _PNX4008_GPIO_H_ -#define _PNX4008_GPIO_H_ - - -/* Block numbers */ -#define GPIO_IN (0) -#define GPIO_OUT (0x100) -#define GPIO_BID (0x200) -#define GPIO_RAM (0x300) -#define GPIO_MUX (0x400) - -#define GPIO_TYPE_MASK(K) ((K) & 0x700) - -/* INPUT GPIOs */ -/* GPI */ -#define GPI_00 (GPIO_IN | 0) -#define GPI_01 (GPIO_IN | 1) -#define GPI_02 (GPIO_IN | 2) -#define GPI_03 (GPIO_IN | 3) -#define GPI_04 (GPIO_IN | 4) -#define GPI_05 (GPIO_IN | 5) -#define GPI_06 (GPIO_IN | 6) -#define GPI_07 (GPIO_IN | 7) -#define GPI_08 (GPIO_IN | 8) -#define GPI_09 (GPIO_IN | 9) -#define U1_RX (GPIO_IN | 15) -#define U2_HTCS (GPIO_IN | 16) -#define U2_RX (GPIO_IN | 17) -#define U3_RX (GPIO_IN | 18) -#define U4_RX (GPIO_IN | 19) -#define U5_RX (GPIO_IN | 20) -#define U6_IRRX (GPIO_IN | 21) -#define U7_HCTS (GPIO_IN | 22) -#define U7_RX (GPIO_IN | 23) -/* MISC IN */ -#define SPI1_DATIN (GPIO_IN | 25) -#define DISP_SYNC (GPIO_IN | 26) -#define SPI2_DATIN (GPIO_IN | 27) -#define GPI_11 (GPIO_IN | 28) - -#define GPIO_IN_MASK 0x1eff83ff - -/* OUTPUT GPIOs */ -/* GPO */ -#define GPO_00 (GPIO_OUT | 0) -#define GPO_01 (GPIO_OUT | 1) -#define GPO_02 (GPIO_OUT | 2) -#define GPO_03 (GPIO_OUT | 3) -#define GPO_04 (GPIO_OUT | 4) -#define GPO_05 (GPIO_OUT | 5) -#define GPO_06 (GPIO_OUT | 6) -#define GPO_07 (GPIO_OUT | 7) -#define GPO_08 (GPIO_OUT | 8) -#define GPO_09 (GPIO_OUT | 9) -#define GPO_10 (GPIO_OUT | 10) -#define GPO_11 (GPIO_OUT | 11) -#define GPO_12 (GPIO_OUT | 12) -#define GPO_13 (GPIO_OUT | 13) -#define GPO_14 (GPIO_OUT | 14) -#define GPO_15 (GPIO_OUT | 15) -#define GPO_16 (GPIO_OUT | 16) -#define GPO_17 (GPIO_OUT | 17) -#define GPO_18 (GPIO_OUT | 18) -#define GPO_19 (GPIO_OUT | 19) -#define GPO_20 (GPIO_OUT | 20) -#define GPO_21 (GPIO_OUT | 21) -#define GPO_22 (GPIO_OUT | 22) -#define GPO_23 (GPIO_OUT | 23) - -#define GPIO_OUT_MASK 0xffffff - -/* BIDIRECTIONAL GPIOs */ -/* RAM pins */ -#define RAM_D19 (GPIO_RAM | 0) -#define RAM_D20 (GPIO_RAM | 1) -#define RAM_D21 (GPIO_RAM | 2) -#define RAM_D22 (GPIO_RAM | 3) -#define RAM_D23 (GPIO_RAM | 4) -#define RAM_D24 (GPIO_RAM | 5) -#define RAM_D25 (GPIO_RAM | 6) -#define RAM_D26 (GPIO_RAM | 7) -#define RAM_D27 (GPIO_RAM | 8) -#define RAM_D28 (GPIO_RAM | 9) -#define RAM_D29 (GPIO_RAM | 10) -#define RAM_D30 (GPIO_RAM | 11) -#define RAM_D31 (GPIO_RAM | 12) - -#define GPIO_RAM_MASK 0x1fff - -/* I/O pins */ -#define GPIO_00 (GPIO_BID | 25) -#define GPIO_01 (GPIO_BID | 26) -#define GPIO_02 (GPIO_BID | 27) -#define GPIO_03 (GPIO_BID | 28) -#define GPIO_04 (GPIO_BID | 29) -#define GPIO_05 (GPIO_BID | 30) - -#define GPIO_BID_MASK 0x7e000000 - -/* Non-GPIO multiplexed PIOs. For multiplexing with GPIO, please use GPIO macros */ -#define GPIO_SDRAM_SEL (GPIO_MUX | 3) - -#define GPIO_MUX_MASK 0x8 - -/* Extraction/assembly macros */ -#define GPIO_BIT_MASK(K) ((K) & 0x1F) -#define GPIO_BIT(K) (1 << GPIO_BIT_MASK(K)) -#define GPIO_ISMUX(K) ((GPIO_TYPE_MASK(K) == GPIO_MUX) && (GPIO_BIT(K) & GPIO_MUX_MASK)) -#define GPIO_ISRAM(K) ((GPIO_TYPE_MASK(K) == GPIO_RAM) && (GPIO_BIT(K) & GPIO_RAM_MASK)) -#define GPIO_ISBID(K) ((GPIO_TYPE_MASK(K) == GPIO_BID) && (GPIO_BIT(K) & GPIO_BID_MASK)) -#define GPIO_ISOUT(K) ((GPIO_TYPE_MASK(K) == GPIO_OUT) && (GPIO_BIT(K) & GPIO_OUT_MASK)) -#define GPIO_ISIN(K) ((GPIO_TYPE_MASK(K) == GPIO_IN) && (GPIO_BIT(K) & GPIO_IN_MASK)) - -/* Start Enable Pin Interrupts - table 58 page 66 */ - -#define SE_PIN_BASE_INT 32 - -#define SE_U7_RX_INT 63 -#define SE_U7_HCTS_INT 62 -#define SE_BT_CLKREQ_INT 61 -#define SE_U6_IRRX_INT 60 -/*59 unused*/ -#define SE_U5_RX_INT 58 -#define SE_GPI_11_INT 57 -#define SE_U3_RX_INT 56 -#define SE_U2_HCTS_INT 55 -#define SE_U2_RX_INT 54 -#define SE_U1_RX_INT 53 -#define SE_DISP_SYNC_INT 52 -/*51 unused*/ -#define SE_SDIO_INT_N 50 -#define SE_MSDIO_START_INT 49 -#define SE_GPI_06_INT 48 -#define SE_GPI_05_INT 47 -#define SE_GPI_04_INT 46 -#define SE_GPI_03_INT 45 -#define SE_GPI_02_INT 44 -#define SE_GPI_01_INT 43 -#define SE_GPI_00_INT 42 -#define SE_SYSCLKEN_PIN_INT 41 -#define SE_SPI1_DATAIN_INT 40 -#define SE_GPI_07_INT 39 -#define SE_SPI2_DATAIN_INT 38 -#define SE_GPI_10_INT 37 -#define SE_GPI_09_INT 36 -#define SE_GPI_08_INT 35 -/*34-32 unused*/ - -/* Start Enable Internal Interrupts - table 57 page 65 */ - -#define SE_INT_BASE_INT 0 - -#define SE_TS_IRQ 31 -#define SE_TS_P_INT 30 -#define SE_TS_AUX_INT 29 -/*27-28 unused*/ -#define SE_USB_AHB_NEED_CLK_INT 26 -#define SE_MSTIMER_INT 25 -#define SE_RTC_INT 24 -#define SE_USB_NEED_CLK_INT 23 -#define SE_USB_INT 22 -#define SE_USB_I2C_INT 21 -#define SE_USB_OTG_TIMER_INT 20 -#define SE_USB_OTG_ATX_INT_N 19 -/*18 unused*/ -#define SE_DSP_GPIO4_INT 17 -#define SE_KEY_IRQ 16 -#define SE_DSP_SLAVEPORT_INT 15 -#define SE_DSP_GPIO1_INT 14 -#define SE_DSP_GPIO0_INT 13 -#define SE_DSP_AHB_INT 12 -/*11-6 unused*/ -#define SE_GPIO_05_INT 5 -#define SE_GPIO_04_INT 4 -#define SE_GPIO_03_INT 3 -#define SE_GPIO_02_INT 2 -#define SE_GPIO_01_INT 1 -#define SE_GPIO_00_INT 0 - -#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F)) - -#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1))) -#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1))) -#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1))) -#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1))) - -extern int pnx4008_gpio_register_pin(unsigned short pin); -extern int pnx4008_gpio_unregister_pin(unsigned short pin); -extern unsigned long pnx4008_gpio_read_pin(unsigned short pin); -extern int pnx4008_gpio_write_pin(unsigned short pin, int output); -extern int pnx4008_gpio_set_pin_direction(unsigned short pin, int output); -extern int pnx4008_gpio_read_pin_direction(unsigned short pin); -extern int pnx4008_gpio_set_pin_mux(unsigned short pin, int output); -extern int pnx4008_gpio_read_pin_mux(unsigned short pin); - -static inline void start_int_umask(u8 irq) -{ - __raw_writel(__raw_readl(START_INT_ER_REG(irq)) | - START_INT_REG_BIT(irq), START_INT_ER_REG(irq)); -} - -static inline void start_int_mask(u8 irq) -{ - __raw_writel(__raw_readl(START_INT_ER_REG(irq)) & - ~START_INT_REG_BIT(irq), START_INT_ER_REG(irq)); -} - -static inline void start_int_ack(u8 irq) -{ - __raw_writel(START_INT_REG_BIT(irq), START_INT_RSR_REG(irq)); -} - -static inline void start_int_set_falling_edge(u8 irq) -{ - __raw_writel(__raw_readl(START_INT_APR_REG(irq)) & - ~START_INT_REG_BIT(irq), START_INT_APR_REG(irq)); -} - -static inline void start_int_set_rising_edge(u8 irq) -{ - __raw_writel(__raw_readl(START_INT_APR_REG(irq)) | - START_INT_REG_BIT(irq), START_INT_APR_REG(irq)); -} - -#endif /* _PNX4008_GPIO_H_ */ diff --git a/include/asm-arm/arch-pnx4008/hardware.h b/include/asm-arm/arch-pnx4008/hardware.h deleted file mode 100644 index a4410397a..000000000 --- a/include/asm-arm/arch-pnx4008/hardware.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/hardware.h - * - * Copyright (c) 2005 MontaVista Software, 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 __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -#include -#include - -/* Start of virtual addresses for IO devices */ -#define IO_BASE 0xF0000000 - -/* This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 */ -#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE) - -#endif diff --git a/include/asm-arm/arch-pnx4008/io.h b/include/asm-arm/arch-pnx4008/io.h deleted file mode 100644 index 29ee43955..000000000 --- a/include/asm-arm/arch-pnx4008/io.h +++ /dev/null @@ -1,21 +0,0 @@ - -/* - * include/asm-arm/arch-pnx4008/io.h - * - * Author: Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __ASM_ARM_ARCH_IO_H -#define __ASM_ARM_ARCH_IO_H - -#define IO_SPACE_LIMIT 0xffffffff - -#define __io(a) ((void __iomem *)(a)) -#define __mem_pci(a) (a) - -#endif diff --git a/include/asm-arm/arch-pnx4008/irq.h b/include/asm-arm/arch-pnx4008/irq.h deleted file mode 100644 index fabff5dc3..000000000 --- a/include/asm-arm/arch-pnx4008/irq.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/irq.h - * - * PNX4008 IRQ controller driver - header file - * this one is used in entry-arnv.S as well so it cannot contain C code - * - * Copyright (c) 2005 Philips Semiconductors - * Copyright (c) 2005 MontaVista Software, 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. - */ -#ifndef __PNX4008_IRQ_H__ -#define __PNX4008_IRQ_H__ - -#define MIC_VA_BASE IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) -#define SIC1_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) -#define SIC2_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) - -/* Manual: Chapter 20, page 195 */ - -#define INTC_BIT(irq) (1<< ((irq) & 0x1F)) - -#define INTC_ER(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x0 + (((irq)&(0x3<<5))<<9))) -#define INTC_RSR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x4 + (((irq)&(0x3<<5))<<9))) -#define INTC_SR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x8 + (((irq)&(0x3<<5))<<9))) -#define INTC_APR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0xC + (((irq)&(0x3<<5))<<9))) -#define INTC_ATR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x10 + (((irq)&(0x3<<5))<<9))) -#define INTC_ITR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x14 + (((irq)&(0x3<<5))<<9))) - -#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F)) - -#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1))) -#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1))) -#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1))) -#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1))) - -extern void __init pnx4008_init_irq(void); - -#endif /* __PNX4008_IRQ_H__ */ diff --git a/include/asm-arm/arch-pnx4008/irqs.h b/include/asm-arm/arch-pnx4008/irqs.h deleted file mode 100644 index 13ec7ed0f..000000000 --- a/include/asm-arm/arch-pnx4008/irqs.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/irqs.h - * - * PNX4008 IRQ controller driver - header file - * - * Author: Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#ifndef __PNX4008_IRQS_h__ -#define __PNX4008_IRQS_h__ - -#define NR_IRQS 96 - -/*Manual: table 259, page 199*/ - -/*SUB2 Interrupt Routing (SIC2)*/ - -#define SIC2_BASE_INT 64 - -#define CLK_SWITCH_ARM_INT 95 /*manual: Clkswitch ARM */ -#define CLK_SWITCH_DSP_INT 94 /*manual: ClkSwitch DSP */ -#define CLK_SWITCH_AUD_INT 93 /*manual: Clkswitch AUD */ -#define GPI_06_INT 92 -#define GPI_05_INT 91 -#define GPI_04_INT 90 -#define GPI_03_INT 89 -#define GPI_02_INT 88 -#define GPI_01_INT 87 -#define GPI_00_INT 86 -#define BT_CLKREQ_INT 85 -#define SPI1_DATIN_INT 84 -#define U5_RX_INT 83 -#define SDIO_INT_N 82 -#define CAM_HS_INT 81 -#define CAM_VS_INT 80 -#define GPI_07_INT 79 -#define DISP_SYNC_INT 78 -#define DSP_INT8 77 -#define U7_HCTS_INT 76 -#define GPI_10_INT 75 -#define GPI_09_INT 74 -#define GPI_08_INT 73 -#define DSP_INT7 72 -#define U2_HCTS_INT 71 -#define SPI2_DATIN_INT 70 -#define GPIO_05_INT 69 -#define GPIO_04_INT 68 -#define GPIO_03_INT 67 -#define GPIO_02_INT 66 -#define GPIO_01_INT 65 -#define GPIO_00_INT 64 - -/*Manual: table 258, page 198*/ - -/*SUB1 Interrupt Routing (SIC1)*/ - -#define SIC1_BASE_INT 32 - -#define USB_I2C_INT 63 -#define USB_DEV_HP_INT 62 -#define USB_DEV_LP_INT 61 -#define USB_DEV_DMA_INT 60 -#define USB_HOST_INT 59 -#define USB_OTG_ATX_INT_N 58 -#define USB_OTG_TIMER_INT 57 -#define SW_INT 56 -#define SPI1_INT 55 -#define KEY_IRQ 54 -#define DSP_M_INT 53 -#define RTC_INT 52 -#define I2C_1_INT 51 -#define I2C_2_INT 50 -#define PLL1_LOCK_INT 49 -#define PLL2_LOCK_INT 48 -#define PLL3_LOCK_INT 47 -#define PLL4_LOCK_INT 46 -#define PLL5_LOCK_INT 45 -#define SPI2_INT 44 -#define DSP_INT1 43 -#define DSP_INT2 42 -#define DSP_TDM_INT2 41 -#define TS_AUX_INT 40 -#define TS_IRQ 39 -#define TS_P_INT 38 -#define UOUT1_TO_PAD_INT 37 -#define GPI_11_INT 36 -#define DSP_INT4 35 -#define JTAG_COMM_RX_INT 34 -#define JTAG_COMM_TX_INT 33 -#define DSP_INT3 32 - -/*Manual: table 257, page 197*/ - -/*MAIN Interrupt Routing*/ - -#define MAIN_BASE_INT 0 - -#define SUB2_FIQ_N 31 /*active low */ -#define SUB1_FIQ_N 30 /*active low */ -#define JPEG_INT 29 -#define DMA_INT 28 -#define MSTIMER_INT 27 -#define IIR1_INT 26 -#define IIR2_INT 25 -#define IIR7_INT 24 -#define DSP_TDM_INT0 23 -#define DSP_TDM_INT1 22 -#define DSP_P_INT 21 -#define DSP_INT0 20 -#define DUM_INT 19 -#define UOUT0_TO_PAD_INT 18 -#define MP4_ENC_INT 17 -#define MP4_DEC_INT 16 -#define SD0_INT 15 -#define MBX_INT 14 -#define SD1_INT 13 -#define MS_INT_N 12 -#define FLASH_INT 11 /*NAND*/ -#define IIR6_INT 10 -#define IIR5_INT 9 -#define IIR4_INT 8 -#define IIR3_INT 7 -#define WATCH_INT 6 -#define HSTIMER_INT 5 -#define ARCH_TIMER_IRQ HSTIMER_INT -#define CAM_INT 4 -#define PRNG_INT 3 -#define CRYPTO_INT 2 -#define SUB2_IRQ_N 1 /*active low */ -#define SUB1_IRQ_N 0 /*active low */ - -#define PNX4008_IRQ_TYPES \ -{ /*IRQ #'s: */ \ -IRQT_LOW, IRQT_LOW, IRQT_LOW, IRQT_HIGH, /* 0, 1, 2, 3 */ \ -IRQT_LOW, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 4, 5, 6, 7 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 8, 9,10,11 */ \ -IRQT_LOW, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 12,13,14,15 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 16,17,18,19 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 20,21,22,23 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 24,25,26,27 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_LOW, /* 28,29,30,31 */ \ -IRQT_HIGH, IRQT_LOW, IRQT_HIGH, IRQT_HIGH, /* 32,33,34,35 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_FALLING, IRQT_HIGH, /* 36,37,38,39 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 40,41,42,43 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 44,45,46,47 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_LOW, /* 48,49,50,51 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 52,53,54,55 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_HIGH, /* 56,57,58,59 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 60,61,62,63 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 64,65,66,67 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 68,69,70,71 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 72,73,74,75 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 76,77,78,79 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 80,81,82,83 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 84,85,86,87 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 88,89,90,91 */ \ -IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 92,93,94,95 */ \ -} - -/* Start Enable Pin Interrupts - table 58 page 66 */ - -#define SE_PIN_BASE_INT 32 - -#define SE_U7_RX_INT 63 -#define SE_U7_HCTS_INT 62 -#define SE_BT_CLKREQ_INT 61 -#define SE_U6_IRRX_INT 60 -/*59 unused*/ -#define SE_U5_RX_INT 58 -#define SE_GPI_11_INT 57 -#define SE_U3_RX_INT 56 -#define SE_U2_HCTS_INT 55 -#define SE_U2_RX_INT 54 -#define SE_U1_RX_INT 53 -#define SE_DISP_SYNC_INT 52 -/*51 unused*/ -#define SE_SDIO_INT_N 50 -#define SE_MSDIO_START_INT 49 -#define SE_GPI_06_INT 48 -#define SE_GPI_05_INT 47 -#define SE_GPI_04_INT 46 -#define SE_GPI_03_INT 45 -#define SE_GPI_02_INT 44 -#define SE_GPI_01_INT 43 -#define SE_GPI_00_INT 42 -#define SE_SYSCLKEN_PIN_INT 41 -#define SE_SPI1_DATAIN_INT 40 -#define SE_GPI_07_INT 39 -#define SE_SPI2_DATAIN_INT 38 -#define SE_GPI_10_INT 37 -#define SE_GPI_09_INT 36 -#define SE_GPI_08_INT 35 -/*34-32 unused*/ - -/* Start Enable Internal Interrupts - table 57 page 65 */ - -#define SE_INT_BASE_INT 0 - -#define SE_TS_IRQ 31 -#define SE_TS_P_INT 30 -#define SE_TS_AUX_INT 29 -/*27-28 unused*/ -#define SE_USB_AHB_NEED_CLK_INT 26 -#define SE_MSTIMER_INT 25 -#define SE_RTC_INT 24 -#define SE_USB_NEED_CLK_INT 23 -#define SE_USB_INT 22 -#define SE_USB_I2C_INT 21 -#define SE_USB_OTG_TIMER_INT 20 - -#endif /* __PNX4008_IRQS_h__ */ diff --git a/include/asm-arm/arch-pnx4008/memory.h b/include/asm-arm/arch-pnx4008/memory.h deleted file mode 100644 index 0d8268a95..000000000 --- a/include/asm-arm/arch-pnx4008/memory.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/memory.h - * - * Copyright (c) 2005 Philips Semiconductors - * Copyright (c) 2005 MontaVista Software, 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. - */ - -#ifndef __ASM_ARCH_MEMORY_H -#define __ASM_ARCH_MEMORY_H - -/* - * Physical DRAM offset. - */ -#define PHYS_OFFSET (0x80000000) - -#define __virt_to_bus(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) -#define __bus_to_virt(x) ((x) + PAGE_OFFSET - PHYS_OFFSET) - -#endif diff --git a/include/asm-arm/arch-pnx4008/param.h b/include/asm-arm/arch-pnx4008/param.h deleted file mode 100644 index 95d5f547b..000000000 --- a/include/asm-arm/arch-pnx4008/param.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/param.h - * - * Copyright (C) 1999 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define HZ 100 diff --git a/include/asm-arm/arch-pnx4008/platform.h b/include/asm-arm/arch-pnx4008/platform.h deleted file mode 100644 index 485a3651b..000000000 --- a/include/asm-arm/arch-pnx4008/platform.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/platfrom.h - * - * PNX4008 Base addresses - header file - * - * Author: Dmitry Chigirev - * - * Based on reference code received from Philips: - * Copyright (C) 2003 Philips Semiconductors - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - - -#ifndef __ASM_ARCH_PLATFORM_H__ -#define __ASM_ARCH_PLATFORM_H__ - -#define PNX4008_IRAM_BASE 0x08000000 -#define PNX4008_IRAM_SIZE 0x00010000 -#define PNX4008_YUV_SLAVE_BASE 0x10000000 -#define PNX4008_DUM_SLAVE_BASE 0x18000000 -#define PNX4008_NDF_FLASH_BASE 0x20020000 -#define PNX4008_SPI1_BASE 0x20088000 -#define PNX4008_SPI2_BASE 0x20090000 -#define PNX4008_SD_CONFIG_BASE 0x20098000 -#define PNX4008_FLASH_DATA 0x200B0000 -#define PNX4008_MLC_FLASH_BASE 0x200B8000 -#define PNX4008_JPEG_CONFIG_BASE 0x300A0000 -#define PNX4008_DMA_CONFIG_BASE 0x31000000 -#define PNX4008_USB_CONFIG_BASE 0x31020000 -#define PNX4008_SDRAM_CFG_BASE 0x31080000 -#define PNX4008_AHB2FAB_BASE 0x40000000 -#define PNX4008_PWRMAN_BASE 0x40004000 -#define PNX4008_INTCTRLMIC_BASE 0x40008000 -#define PNX4008_INTCTRLSIC1_BASE 0x4000C000 -#define PNX4008_INTCTRLSIC2_BASE 0x40010000 -#define PNX4008_HSUART1_BASE 0x40014000 -#define PNX4008_HSUART2_BASE 0x40018000 -#define PNX4008_HSUART7_BASE 0x4001C000 -#define PNX4008_RTC_BASE 0x40024000 -#define PNX4008_PIO_BASE 0x40028000 -#define PNX4008_MSTIMER_BASE 0x40034000 -#define PNX4008_HSTIMER_BASE 0x40038000 -#define PNX4008_WDOG_BASE 0x4003C000 -#define PNX4008_DEBUG_BASE 0x40040000 -#define PNX4008_TOUCH1_BASE 0x40048000 -#define PNX4008_KEYSCAN_BASE 0x40050000 -#define PNX4008_UARTCTRL_BASE 0x40054000 -#define PNX4008_PWM_BASE 0x4005C000 -#define PNX4008_UART3_BASE 0x40080000 -#define PNX4008_UART4_BASE 0x40088000 -#define PNX4008_UART5_BASE 0x40090000 -#define PNX4008_UART6_BASE 0x40098000 -#define PNX4008_I2C1_BASE 0x400A0000 -#define PNX4008_I2C2_BASE 0x400A8000 -#define PNX4008_MAGICGATE_BASE 0x400B0000 -#define PNX4008_DUMCONF_BASE 0x400B8000 -#define PNX4008_DUM_MAINCFG_BASE 0x400BC000 -#define PNX4008_DSP_BASE 0x400C0000 -#define PNX4008_PROFCOUNTER_BASE 0x400C8000 -#define PNX4008_CRYPTO_BASE 0x400D0000 -#define PNX4008_CAMIFCONF_BASE 0x400D8000 -#define PNX4008_YUV2RGB_BASE 0x400E0000 -#define PNX4008_AUDIOCONFIG_BASE 0x400E8000 - -#endif diff --git a/include/asm-arm/arch-pnx4008/pm.h b/include/asm-arm/arch-pnx4008/pm.h deleted file mode 100644 index bac1634cb..000000000 --- a/include/asm-arm/arch-pnx4008/pm.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/pm.h - * - * PNX4008 Power Management Routiness - header file - * - * Authors: Vitaly Wool, Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __ASM_ARCH_PNX4008_PM_H -#define __ASM_ARCH_PNX4008_PM_H - -#ifndef __ASSEMBLER__ -#include "irq.h" -#include "irqs.h" -#include "clock.h" - -extern void pnx4008_pm_idle(void); -extern void pnx4008_pm_suspend(void); -extern unsigned int pnx4008_cpu_suspend_sz; -extern void pnx4008_cpu_suspend(void); -extern unsigned int pnx4008_cpu_standby_sz; -extern void pnx4008_cpu_standby(void); - -extern int pnx4008_startup_pll(struct clk *); -extern int pnx4008_shutdown_pll(struct clk *); - -#endif /* ASSEMBLER */ -#endif /* __ASM_ARCH_PNX4008_PM_H */ diff --git a/include/asm-arm/arch-pnx4008/system.h b/include/asm-arm/arch-pnx4008/system.h deleted file mode 100644 index 6e3da70ab..000000000 --- a/include/asm-arm/arch-pnx4008/system.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/system.h - * - * Copyright (C) 2003 Philips Semiconductors - * Copyright (C) 2005 MontaVista Software, 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 __ASM_ARCH_SYSTEM_H -#define __ASM_ARCH_SYSTEM_H - -#include -#include -#include - -static void arch_idle(void) -{ - cpu_do_idle(); -} - -static inline void arch_reset(char mode) -{ - cpu_reset(0); -} - -#endif diff --git a/include/asm-arm/arch-pnx4008/timex.h b/include/asm-arm/arch-pnx4008/timex.h deleted file mode 100644 index ee470a390..000000000 --- a/include/asm-arm/arch-pnx4008/timex.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/timex.h - * - * PNX4008 timers header file - * - * Author: Dmitry Chigirev - * - * 2005 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef __PNX4008_TIMEX_H -#define __PNX4008_TIMEX_H - -#include -#include - -#define CLOCK_TICK_RATE 1000000 - -#define TICKS2USECS(x) (x) - -/* MilliSecond Timer - Chapter 21 Page 202 */ - -#define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0)) -#define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4)) -#define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8)) -#define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14)) -#define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18)) -#define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c)) - -/* High Speed Timer - Chpater 22, Page 205 */ - -#define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0)) -#define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4)) -#define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8)) -#define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC)) -#define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10)) -#define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14)) -#define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18)) -#define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c)) -#define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20)) -#define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28)) -#define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C)) -#define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30)) - -/* IMPORTANT: both timers are UPCOUNTING */ - -/* xSTIM_MCTRL bit definitions */ -#define MR0_INT 1 -#define RESET_COUNT0 (1<<1) -#define STOP_COUNT0 (1<<2) -#define MR1_INT (1<<3) -#define RESET_COUNT1 (1<<4) -#define STOP_COUNT1 (1<<5) -#define MR2_INT (1<<6) -#define RESET_COUNT2 (1<<7) -#define STOP_COUNT2 (1<<8) - -/* xSTIM_CTRL bit definitions */ -#define COUNT_ENAB 1 -#define RESET_COUNT (1<<1) -#define DEBUG_EN (1<<2) - -/* xSTIM_INT bit definitions */ -#define MATCH0_INT 1 -#define MATCH1_INT (1<<1) -#define MATCH2_INT (1<<2) -#define RTC_TICK0 (1<<4) -#define RTC_TICK1 (1<<5) - -#endif diff --git a/include/asm-arm/arch-pnx4008/uncompress.h b/include/asm-arm/arch-pnx4008/uncompress.h deleted file mode 100644 index 8fa4d24b7..000000000 --- a/include/asm-arm/arch-pnx4008/uncompress.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * linux/include/asm-arm/arch-pnx4008/uncompress.h - * - * Copyright (C) 1999 ARM Limited - * Copyright (C) 2006 MontaVista Software, 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 - */ - -#define UART5_BASE 0x40090000 - -#define UART5_DR (*(volatile unsigned char *) (UART5_BASE)) -#define UART5_FR (*(volatile unsigned char *) (UART5_BASE + 18)) - -static __inline__ void putc(char c) -{ - while (UART5_FR & (1 << 5)) - barrier(); - - UART5_DR = c; -} - -/* - * This does not append a newline - */ -static inline void flush(void) -{ -} - -/* - * nothing to do - */ -#define arch_decomp_setup() -#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-pnx4008/vmalloc.h b/include/asm-arm/arch-pnx4008/vmalloc.h deleted file mode 100644 index 140d925f6..000000000 --- a/include/asm-arm/arch-pnx4008/vmalloc.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * include/asm-arm/arch-pnx4008/vmalloc.h - * - * Author: Vitaly Wool - * - * 2006 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -/* - * Just any arbitrary offset to the start of the vmalloc VM area: the - * current 8MB value just means that there will be a 8MB "hole" after the - * physical memory until the kernel virtual memory starts. That means that - * any out-of-bounds memory accesses will hopefully be caught. - * The vmalloc() routines leaves a hole of 4kB between each vmalloced - * area for the same reason. ;) - */ -#define VMALLOC_END (PAGE_OFFSET + 0x10000000) diff --git a/include/asm-arm/arch-pxa/idp.h b/include/asm-arm/arch-pxa/idp.h index b6952534a..e7ef49741 100644 --- a/include/asm-arm/arch-pxa/idp.h +++ b/include/asm-arm/arch-pxa/idp.h @@ -15,6 +15,7 @@ * Changes for 2.6 kernel. */ +#include /* * Note: this file must be safe to include in assembly files diff --git a/include/asm-arm/arch-pxa/io.h b/include/asm-arm/arch-pxa/io.h index 7f8d817b4..eb2dd58d3 100644 --- a/include/asm-arm/arch-pxa/io.h +++ b/include/asm-arm/arch-pxa/io.h @@ -16,5 +16,6 @@ */ #define __io(a) ((void __iomem *)(a)) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index f3bc70eee..67af238a8 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #ifdef CONFIG_PXA27x #define PXA_IRQ_SKIP 0 diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h index 4d6a40315..6b5ac5144 100644 --- a/include/asm-arm/arch-pxa/poodle.h +++ b/include/asm-arm/arch-pxa/poodle.h @@ -31,7 +31,6 @@ #define POODLE_GPIO_CF_CD (14) #define POODLE_GPIO_CF_STSCHG (14) #define POODLE_GPIO_SD_PWR (33) -#define POODLE_GPIO_SD_PWR1 (3) #define POODLE_GPIO_nSD_CLK (6) #define POODLE_GPIO_nSD_WP (7) #define POODLE_GPIO_nSD_INT (8) @@ -43,7 +42,6 @@ #define POODLE_GPIO_BYPASS_ON (36) #define POODLE_GPIO_CHRG_ON (38) #define POODLE_GPIO_CHRG_FULL (16) -#define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */ /* PXA GPIOs */ #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) @@ -70,6 +68,4 @@ #define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) #define POODLE_SCOOP_IO_OUT ( 0 ) -extern struct platform_device poodle_locomo_device; - #endif /* __ASM_ARCH_POODLE_H */ diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index f5cc65dd7..c8f53a71c 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h @@ -13,6 +13,7 @@ #ifndef __PXA_REGS_H #define __PXA_REGS_H +#include /* * PXA Chip selects @@ -1329,7 +1330,6 @@ #define GPIO84_NSRXD 84 /* NSSP receive */ #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ -#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ @@ -1472,7 +1472,6 @@ #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) -#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) @@ -1627,7 +1626,7 @@ #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ -#define SSCR0_SlotsPerFrm(x) ((x) - 1) /* Time slots per frame [1..8] */ +#define SSCR0_SlotsPerFrm(c) ((x) - 1) /* Time slots per frame [1..8] */ #define SSCR0_ADC (1 << 30) /* Audio clock select */ #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ #endif @@ -1708,10 +1707,6 @@ #if defined (CONFIG_PXA27x) #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ -#define SSTSA_P1 __REG(0x41000030) /* SSP Port 1 Tx Timeslot Active */ -#define SSRSA_P1 __REG(0x41000034) /* SSP Port 1 Rx Timeslot Active */ -#define SSTSS_P1 __REG(0x41000038) /* SSP Port 1 Timeslot Status */ -#define SSACD_P1 __REG(0x4100003C) /* SSP Port 1 Audio Clock Divider */ #define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ #define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ #define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ @@ -1719,10 +1714,6 @@ #define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */ #define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */ #define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ -#define SSTSA_P2 __REG(0x41700030) /* SSP Port 2 Tx Timeslot Active */ -#define SSRSA_P2 __REG(0x41700034) /* SSP Port 2 Rx Timeslot Active */ -#define SSTSS_P2 __REG(0x41700038) /* SSP Port 2 Timeslot Status */ -#define SSACD_P2 __REG(0x4170003C) /* SSP Port 2 Audio Clock Divider */ #define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ #define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ #define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ @@ -1730,10 +1721,6 @@ #define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */ #define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */ #define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ -#define SSTSA_P3 __REG(0x41900030) /* SSP Port 3 Tx Timeslot Active */ -#define SSRSA_P3 __REG(0x41900034) /* SSP Port 3 Rx Timeslot Active */ -#define SSTSS_P3 __REG(0x41900038) /* SSP Port 3 Timeslot Status */ -#define SSACD_P3 __REG(0x4190003C) /* SSP Port 3 Audio Clock Divider */ #else /* PXA255 (only port 2) and PXA26x ports*/ #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ @@ -1760,10 +1747,6 @@ #define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL)) #define SSTO_P(x) (*(((x) == 1) ? &SSTO_P1 : ((x) == 2) ? &SSTO_P2 : ((x) == 3) ? &SSTO_P3 : NULL)) #define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL)) -#define SSTSA_P(x) (*(((x) == 1) ? &SSTSA_P1 : ((x) == 2) ? &SSTSA_P2 : ((x) == 3) ? &SSTSA_P3 : NULL)) -#define SSRSA_P(x) (*(((x) == 1) ? &SSRSA_P1 : ((x) == 2) ? &SSRSA_P2 : ((x) == 3) ? &SSRSA_P3 : NULL)) -#define SSTSS_P(x) (*(((x) == 1) ? &SSTSS_P1 : ((x) == 2) ? &SSTSS_P2 : ((x) == 3) ? &SSTSS_P3 : NULL)) -#define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL)) /* * MultiMediaCard (MMC) controller diff --git a/include/asm-arm/arch-pxa/ssp.h b/include/asm-arm/arch-pxa/ssp.h index ea200551a..949878c0d 100644 --- a/include/asm-arm/arch-pxa/ssp.h +++ b/include/asm-arm/arch-pxa/ssp.h @@ -40,8 +40,8 @@ struct ssp_dev { }; int ssp_write_word(struct ssp_dev *dev, u32 data); -int ssp_read_word(struct ssp_dev *dev, u32 *data); -int ssp_flush(struct ssp_dev *dev); +int ssp_read_word(struct ssp_dev *dev); +void ssp_flush(struct ssp_dev *dev); void ssp_enable(struct ssp_dev *dev); void ssp_disable(struct ssp_dev *dev); void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp); diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index 1d56a3ef8..840a46bfb 100644 --- a/include/asm-arm/arch-pxa/system.h +++ b/include/asm-arm/arch-pxa/system.h @@ -10,7 +10,6 @@ * published by the Free Software Foundation. */ -#include #include "hardware.h" #include "pxa-regs.h" diff --git a/include/asm-arm/arch-pxa/timex.h b/include/asm-arm/arch-pxa/timex.h index 2473bb51d..aa125ec56 100644 --- a/include/asm-arm/arch-pxa/timex.h +++ b/include/asm-arm/arch-pxa/timex.h @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #if defined(CONFIG_PXA25x) /* PXA250/210 timer base */ diff --git a/include/asm-arm/arch-pxa/trizeps4.h b/include/asm-arm/arch-pxa/trizeps4.h deleted file mode 100644 index 641d0ec11..000000000 --- a/include/asm-arm/arch-pxa/trizeps4.h +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************ - * Include file for TRIZEPS4 SoM and ConXS eval-board - * Copyright (c) Jürgen Schindele - * 2006 - ************************************************************************/ - -/* - * Includes/Defines - */ -#ifndef _TRIPEPS4_H_ -#define _TRIPEPS4_H_ - -/* physical memory regions */ -#define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ -#define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ -#define TRIZEPS4_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */ -#define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ -#define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ - -#define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ -#define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ -#define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ -#define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ -#define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ - -/* virtual memory regions */ -#define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ - -#define TRIZEPS4_PIC_VIRT 0xF0100000 /* not used */ -#define TRIZEPS4_CFSR_VIRT 0xF0100000 -#define TRIZEPS4_BOCR_VIRT 0xF0200000 -#define TRIZEPS4_DICR_VIRT 0xF0300000 -#define TRIZEPS4_IRCR_VIRT 0xF0400000 -#define TRIZEPS4_UPSR_VIRT 0xF0500000 - -/* size of flash */ -#define TRIZEPS4_FLASH_SIZE 0x02000000 /* Flash size 32 MB */ - -/* Ethernet Controller Davicom DM9000 */ -#define GPIO_DM9000 101 -#define TRIZEPS4_ETH_IRQ IRQ_GPIO(GPIO_DM9000) - -/* UCB1400 audio / TS-controller */ -#define GPIO_UCB1400 1 -#define TRIZEPS4_UCB1400_IRQ IRQ_GPIO(GPIO_UCB1400) - -/* PCMCIA socket Compact Flash */ -#define GPIO_PCD 11 /* PCMCIA Card Detect */ -#define TRIZEPS4_CD_IRQ IRQ_GPIO(GPIO_PCD) -#define GPIO_PRDY 13 /* READY / nINT */ -#define TRIZEPS4_READY_NINT IRQ_GPIO(GPIO_PRDY) - -/* MMC socket */ -#define GPIO_MMC_DET 12 -#define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) - -/* LEDS using tx2 / rx2 */ -#define GPIO_SYS_BUSY_LED 46 -#define GPIO_HEARTBEAT_LED 47 - -/* Off-module PIC on ConXS board */ -#define GPIO_PIC 0 -#define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) - -#define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) -#define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) - -#define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT) -#define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS) - -#define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) -#define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) - -#ifndef __ASSEMBLY__ -#define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) -#define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) -#define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) -#else -#define ConXS_CFSR CFSR_P2V(0x0C000000) -#define ConXS_BCR BCR_P2V(0x0E000000) -#define ConXS_DCR DCR_P2V(0x0F800000) -#endif - -#define ConXS_CFSR_BVD_MASK 0x0003 -#define ConXS_CFSR_BVD1 (1 << 0) -#define ConXS_CFSR_BVD2 (1 << 1) -#define ConXS_CFSR_VS_MASK 0x000C -#define ConXS_CFSR_VS1 (1 << 2) -#define ConXS_CFSR_VS2 (1 << 3) -#define ConXS_CFSR_VS_5V (0x3 << 2) -#define ConXS_CFSR_VS_3V3 0x0 - -#define ConXS_BCR_S0_POW_EN0 (1 << 0) -#define ConXS_BCR_S0_POW_EN1 (1 << 1) -#define ConXS_BCR_L_DISP (1 << 4) -#define ConXS_BCR_CF_BUF_EN (1 << 5) -#define ConXS_BCR_CF_RESET (1 << 7) -#define ConXS_BCR_S0_VCC_3V3 0x1 -#define ConXS_BCR_S0_VCC_5V0 0x2 -#define ConXS_BCR_S0_VPP_12V 0x4 -#define ConXS_BCR_S0_VPP_3V3 0x8 - -#define ConXS_IRCR_MODE (1 << 0) -#define ConXS_IRCR_SD (1 << 1) - -#endif /* _TRIPEPS4_H_ */ diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h index c70f1dfbe..d444a68ac 100644 --- a/include/asm-arm/arch-realview/io.h +++ b/include/asm-arm/arch-realview/io.h @@ -29,5 +29,6 @@ static inline void __iomem *__io(unsigned long addr) #define __io(a) __io(a) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-realview/smp.h b/include/asm-arm/arch-realview/smp.h index 515819efd..fc87783e8 100644 --- a/include/asm-arm/arch-realview/smp.h +++ b/include/asm-arm/arch-realview/smp.h @@ -1,6 +1,7 @@ #ifndef ASMARM_ARCH_SMP_H #define ASMARM_ARCH_SMP_H +#include #include diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 40e8e270d..5675b1796 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h @@ -9,6 +9,9 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * */ #ifndef __ASM_ARCH_ANUBISCPLD_H diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h index 4b5f42377..82f15dbd9 100644 --- a/include/asm-arm/arch-s3c2410/anubis-irq.h +++ b/include/asm-arm/arch-s3c2410/anubis-irq.h @@ -9,7 +9,9 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * Changelog: + */ #ifndef __ASM_ARCH_ANUBISIRQ_H #define __ASM_ARCH_ANUBISIRQ_H diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index 058a2104b..d529ffda8 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h @@ -9,6 +9,8 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: */ /* needs arch/map.h including with this */ diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 7e0222276..0d276e67f 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h @@ -9,6 +9,10 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 20-Nov-2004 BJD Created file + * 07-Mar-2005 BJD Added suspend/resume calls */ #ifndef __ASM_ARCH_AUDIO_H diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h index 8969cffe8..e28ca51a4 100644 --- a/include/asm-arm/arch-s3c2410/bast-cpld.h +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h @@ -8,6 +8,11 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 25-May-2003 BJD Created file, added CTRL1 registers + * 30-Aug-2004 BJD Updated definitions from 2.4.26 port + * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions */ #ifndef __ASM_ARCH_BASTCPLD_H diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h index 15ffa66f5..b79b47f0d 100644 --- a/include/asm-arm/arch-s3c2410/bast-irq.h +++ b/include/asm-arm/arch-s3c2410/bast-irq.h @@ -8,7 +8,11 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * Changelog: + * 14-Sep-2004 BJD Fixed IRQ_USBOC definition + * 06-Jan-2003 BJD Linux 2.6.0 version + */ #ifndef __ASM_ARCH_BASTIRQ_H #define __ASM_ARCH_BASTIRQ_H diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h index 727cef84c..29c07e302 100644 --- a/include/asm-arm/arch-s3c2410/bast-map.h +++ b/include/asm-arm/arch-s3c2410/bast-map.h @@ -8,6 +8,10 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h + * 12-Mar-2004 BJD Fixed header include protection */ /* needs arch/map.h including with this */ diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h index 82836027f..758c5c59d 100644 --- a/include/asm-arm/arch-s3c2410/bast-pmu.h +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h @@ -9,6 +9,9 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 08-Oct-2003 BJD Initial creation */ #ifndef __ASM_ARCH_BASTPMU_H diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 93064860e..5f8223e70 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S @@ -10,6 +10,9 @@ * 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. + * + * Modifications: + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA */ #include @@ -30,7 +33,7 @@ .endm .macro senduart,rd,rx - strb \rd, [\rx, # S3C2410_UTXH ] + str \rd, [\rx, # S3C2410_UTXH ] .endm .macro busyuart, rd, rx @@ -39,12 +42,6 @@ beq 1001f @ @ FIFO enabled... 1003: - @ check for arm920 vs arm926. currently assume all arm926 - @ devices have an 64 byte FIFO identical to the s3c2440 - mrc p15, 0, \rd, c0, c0 - and \rd, \rd, #0xff0 - teq \rd, #0x260 - beq 1004f mrc p15, 0, \rd, c1, c0 tst \rd, #1 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) @@ -53,7 +50,7 @@ ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] and \rd, \rd, #0x00ff0000 teq \rd, #0x00440000 @ is it 2440? -1004: + ldr \rd, [ \rx, # S3C2410_UFSTAT ] moveq \rd, \rd, lsr #SHIFT_2440TXF tst \rd, #S3C2410_UFSTAT_TXFULL diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 3661e465b..b011e14f3 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h @@ -1,41 +1,49 @@ -/* linux/include/asm-arm/arch-s3c2410/dma.h +/* linux/include/asm-arm/arch-bast/dma.h * - * Copyright (C) 2003,2004,2006 Simtec Electronics + * Copyright (C) 2003,2004 Simtec Electronics * Ben Dooks * - * Samsung S3C241XX DMA support + * Samsung S3C2410X DMA support * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * ??-May-2003 BJD Created file + * ??-Jun-2003 BJD Added more dma functionality to go with arch + * 10-Nov-2004 BJD Added sys_device support */ #ifndef __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H __FILE__ +#include #include #include "hardware.h" + /* * This is the maximum DMA address(physical address) that can be DMAd to. * */ -#define MAX_DMA_ADDRESS 0x40000000 +#define MAX_DMA_ADDRESS 0x20000000 #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ + /* we have 4 dma channels */ #define S3C2410_DMA_CHANNELS (4) /* types */ -enum s3c2410_dma_state { +typedef enum { S3C2410_DMA_IDLE, S3C2410_DMA_RUNNING, S3C2410_DMA_PAUSED -}; +} s3c2410_dma_state_t; -/* enum s3c2410_dma_loadst +/* s3c2410_dma_loadst_t * * This represents the state of the DMA engine, wrt to the loaded / running * transfers. Since we don't have any way of knowing exactly the state of @@ -63,40 +71,44 @@ enum s3c2410_dma_state { * currently running. */ -enum s3c2410_dma_loadst { +typedef enum { S3C2410_DMALOAD_NONE, S3C2410_DMALOAD_1LOADED, S3C2410_DMALOAD_1RUNNING, S3C2410_DMALOAD_1LOADED_1RUNNING, -}; +} s3c2410_dma_loadst_t; -enum s3c2410_dma_buffresult { +typedef enum { S3C2410_RES_OK, S3C2410_RES_ERR, S3C2410_RES_ABORT -}; +} s3c2410_dma_buffresult_t; -enum s3c2410_dmasrc { - S3C2410_DMASRC_HW, /* source is memory */ - S3C2410_DMASRC_MEM /* source is hardware */ + +typedef enum s3c2410_dmasrc_e s3c2410_dmasrc_t; + +enum s3c2410_dmasrc_e { + S3C2410_DMASRC_HW, /* source is memory */ + S3C2410_DMASRC_MEM /* source is hardware */ }; -/* enum s3c2410_chan_op +/* enum s3c2410_chan_op_e * * operation codes passed to the DMA code by the user, and also used * to inform the current channel owner of any changes to the system state */ -enum s3c2410_chan_op { +enum s3c2410_chan_op_e { S3C2410_DMAOP_START, S3C2410_DMAOP_STOP, S3C2410_DMAOP_PAUSE, S3C2410_DMAOP_RESUME, S3C2410_DMAOP_FLUSH, - S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ - S3C2410_DMAOP_STARTED, /* indicate channel started */ + S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ }; +typedef enum s3c2410_chan_op_e s3c2410_chan_op_t; + /* flags */ #define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about @@ -105,100 +117,104 @@ enum s3c2410_chan_op { /* dma buffer */ +typedef struct s3c2410_dma_buf_s s3c2410_dma_buf_t; + struct s3c2410_dma_client { char *name; }; +typedef struct s3c2410_dma_client s3c2410_dma_client_t; + /* s3c2410_dma_buf_s * * internally used buffer structure to describe a queued or running * buffer. */ -struct s3c2410_dma_buf; -struct s3c2410_dma_buf { - struct s3c2410_dma_buf *next; - int magic; /* magic */ - int size; /* buffer size in bytes */ - dma_addr_t data; /* start of DMA data */ - dma_addr_t ptr; /* where the DMA got to [1] */ - void *id; /* client's id */ +struct s3c2410_dma_buf_s { + s3c2410_dma_buf_t *next; + int magic; /* magic */ + int size; /* buffer size in bytes */ + dma_addr_t data; /* start of DMA data */ + dma_addr_t ptr; /* where the DMA got to [1] */ + void *id; /* client's id */ }; /* [1] is this updated for both recv/send modes? */ -struct s3c2410_dma_chan; +typedef struct s3c2410_dma_chan_s s3c2410_dma_chan_t; /* s3c2410_dma_cbfn_t * * buffer callback routine type */ -typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *, - void *buf, int size, - enum s3c2410_dma_buffresult result); +typedef void (*s3c2410_dma_cbfn_t)(s3c2410_dma_chan_t *, void *buf, int size, + s3c2410_dma_buffresult_t result); -typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *, - enum s3c2410_chan_op ); +typedef int (*s3c2410_dma_opfn_t)(s3c2410_dma_chan_t *, + s3c2410_chan_op_t ); -struct s3c2410_dma_stats { - unsigned long loads; - unsigned long timeout_longest; - unsigned long timeout_shortest; - unsigned long timeout_avg; - unsigned long timeout_failed; +struct s3c2410_dma_stats_s { + unsigned long loads; + unsigned long timeout_longest; + unsigned long timeout_shortest; + unsigned long timeout_avg; + unsigned long timeout_failed; }; -/* struct s3c2410_dma_chan +typedef struct s3c2410_dma_stats_s s3c2410_dma_stats_t; + +/* struct s3c2410_dma_chan_s * * full state information for each DMA channel */ -struct s3c2410_dma_chan { +struct s3c2410_dma_chan_s { /* channel state flags and information */ - unsigned char number; /* number of this dma channel */ - unsigned char in_use; /* channel allocated */ - unsigned char irq_claimed; /* irq claimed for channel */ - unsigned char irq_enabled; /* irq enabled for channel */ - unsigned char xfer_unit; /* size of an transfer */ + unsigned char number; /* number of this dma channel */ + unsigned char in_use; /* channel allocated */ + unsigned char irq_claimed; /* irq claimed for channel */ + unsigned char irq_enabled; /* irq enabled for channel */ + unsigned char xfer_unit; /* size of an transfer */ /* channel state */ - enum s3c2410_dma_state state; - enum s3c2410_dma_loadst load_state; - struct s3c2410_dma_client *client; + s3c2410_dma_state_t state; + s3c2410_dma_loadst_t load_state; + s3c2410_dma_client_t *client; /* channel configuration */ - enum s3c2410_dmasrc source; - unsigned long dev_addr; - unsigned long load_timeout; - unsigned int flags; /* channel flags */ + s3c2410_dmasrc_t source; + unsigned long dev_addr; + unsigned long load_timeout; + unsigned int flags; /* channel flags */ /* channel's hardware position and configuration */ - void __iomem *regs; /* channels registers */ - void __iomem *addr_reg; /* data address register */ - unsigned int irq; /* channel irq */ - unsigned long dcon; /* default value of DCON */ + void __iomem *regs; /* channels registers */ + void __iomem *addr_reg; /* data address register */ + unsigned int irq; /* channel irq */ + unsigned long dcon; /* default value of DCON */ /* driver handles */ - s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ - s3c2410_dma_opfn_t op_fn; /* channel op callback */ + s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ + s3c2410_dma_opfn_t op_fn; /* channel operation callback */ /* stats gathering */ - struct s3c2410_dma_stats *stats; - struct s3c2410_dma_stats stats_store; + s3c2410_dma_stats_t *stats; + s3c2410_dma_stats_t stats_store; /* buffer list and information */ - struct s3c2410_dma_buf *curr; /* current dma buffer */ - struct s3c2410_dma_buf *next; /* next buffer to load */ - struct s3c2410_dma_buf *end; /* end of queue */ + s3c2410_dma_buf_t *curr; /* current dma buffer */ + s3c2410_dma_buf_t *next; /* next buffer to load */ + s3c2410_dma_buf_t *end; /* end of queue */ /* system device */ struct sys_device dev; }; /* the currently allocated channel information */ -extern struct s3c2410_dma_chan s3c2410_chans[]; +extern s3c2410_dma_chan_t s3c2410_chans[]; /* note, we don't really use dma_device_t at the moment */ typedef unsigned long dma_device_t; @@ -211,7 +227,7 @@ typedef unsigned long dma_device_t; */ extern int s3c2410_dma_request(dmach_t channel, - struct s3c2410_dma_client *, void *dev); + s3c2410_dma_client_t *, void *dev); /* s3c2410_dma_ctrl @@ -219,7 +235,7 @@ extern int s3c2410_dma_request(dmach_t channel, * change the state of the dma channel */ -extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op); +extern int s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op); /* s3c2410_dma_setflags * @@ -234,7 +250,7 @@ extern int s3c2410_dma_setflags(dmach_t channel, * free the dma channel (will also abort any outstanding operations) */ -extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *); +extern int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *); /* s3c2410_dma_enqueue * @@ -258,7 +274,7 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon); * configure the device we're talking to */ -extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source, +extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source, int hwcfg, unsigned long devaddr); /* s3c2410_dma_getposition diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index e09a6b8ec..894c35cf3 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S @@ -18,6 +18,8 @@ #define INTPND (0x10) #define INTOFFSET (0x14) +#define EXTINTPEND (0xa8) +#define EXTINTMASK (0xa4) #include #include @@ -26,23 +28,37 @@ mov \base, #S3C24XX_VA_IRQ + ldr \irqstat, [ \base, #INTPND] + bics \irqnr, \irqstat, #3<<4 @@ only an GPIO IRQ + beq 2000f + @@ try the interrupt offset register, since it is there - ldr \irqstat, [ \base, #INTPND ] - teq \irqstat, #0 - beq 1002f ldr \irqnr, [ \base, #INTOFFSET ] mov \tmp, #1 tst \irqstat, \tmp, lsl \irqnr + addne \irqnr, \irqnr, #IRQ_EINT0 bne 1001f @@ the number specified is not a valid irq, so try @@ and work it out for ourselves - mov \irqnr, #0 @@ start here + mov \irqnr, #IRQ_EINT0 @@ start here + b 3000f - @@ work out which irq (if any) we got +2000: + @@ load the GPIO interrupt register, and check it + + add \tmp, \base, #S3C24XX_VA_GPIO - S3C24XX_VA_IRQ + ldr \irqstat, [ \tmp, # EXTINTPEND ] + ldr \irqnr, [ \tmp, # EXTINTMASK ] + bics \irqstat, \irqstat, \irqnr + beq 1001f + mov \irqnr, #(IRQ_EINT4 - 4) + + @@ work out which irq (if any) we got +3000: movs \tmp, \irqstat, lsl#16 addeq \irqnr, \irqnr, #16 moveq \irqstat, \irqstat, lsr#16 @@ -59,9 +75,9 @@ addeq \irqnr, \irqnr, #1 @@ we have the value + movs \irqnr, \irqnr + 1001: - adds \irqnr, \irqnr, #IRQ_EINT0 -1002: @@ exit here, Z flag unset if IRQ .endm diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h index 71161797b..4790491ba 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h @@ -7,6 +7,13 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * + * Changelog: + * 07-Sep-2004 RTP Created file + * 03-Nov-2004 BJD Updated and minor cleanups + * 03-Aug-2005 RTP Renamed to fb.h + * 26-Oct-2005 BJD Changed name of platdata init */ #ifndef __ASM_ARM_FB_H diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 871f8af09..a2330bf83 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h @@ -8,6 +8,16 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 21-May-2003 BJD Created file + * 06-Jun-2003 BJD Added CPU frequency settings + * 03-Sep-2003 BJD Linux v2.6 support + * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars + * 14-Sep-2004 BJD Added misccr and getpin to gpio + * 01-Oct-2004 BJD Added the new gpio functions + * 16-Oct-2004 BJD Removed the clock variables + * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() */ #ifndef __ASM_ARCH_HARDWARE_H diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h index eed450608..749227c09 100644 --- a/include/asm-arm/arch-s3c2410/idle.h +++ b/include/asm-arm/arch-s3c2410/idle.h @@ -8,6 +8,10 @@ * published by the Free Software Foundation. * * S3C2410 CPU Idle controls + * + * Changelog: + * 28-Oct-2004 BJD Initial version + * */ #ifndef __ASM_ARCH_IDLE_H diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h index ed3d6c7bf..518547f6d 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/arch-s3c2410/iic.h @@ -8,6 +8,10 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 05-Oct-2004 BJD Created file + * 19-Oct-2004 BJD Updated for s3c2440 */ #ifndef __ASM_ARCH_IIC_H diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 6b35a4f26..16fbc8aff 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h @@ -4,7 +4,13 @@ * * Copyright (C) 1997 Russell King * (C) 2003 Simtec Electronics -*/ + * + * Modifications: + * 06-Dec-1997 RMK Created. + * 02-Sep-2003 BJD Modified for S3C2410 + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range + */ #ifndef __ASM_ARM_ARCH_IO_H #define __ASM_ARM_ARCH_IO_H diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 39a69829d..d9773d697 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h @@ -6,7 +6,14 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * Changelog: + * 12-May-2003 BJD Created file + * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out + * 12-Mar-2004 BJD Fixed bug in header protection + * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv + * 28-Feb-2005 BJD Updated s3c2440 IRQs + */ #ifndef __ASM_ARCH_IRQS_H diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 27ba0ac3f..c380d264a 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h @@ -8,6 +8,13 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 12-May-2003 BJD Created file + * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out + * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv + * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names + * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources */ #ifndef __ASM_ARCH_MAP_H @@ -119,18 +126,9 @@ #define S3C24XX_SZ_IIS SZ_1M /* GPIO ports */ - -/* the calculation for the VA of this must ensure that - * it is the same distance apart from the UART in the - * phsyical address space, as the initial mapping for the IO - * is done as a 1:1 maping. This puts it (currently) at - * 0xF6800000, which is not in the way of any current mapping - * by the base system. -*/ - +#define S3C24XX_VA_GPIO S3C2410_ADDR(0x00E00000) #define S3C2400_PA_GPIO (0x15600000) #define S3C2410_PA_GPIO (0x56000000) -#define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) #define S3C24XX_SZ_GPIO SZ_1M /* RTC */ @@ -229,20 +227,4 @@ #define S3C24XX_PA_SPI S3C2410_PA_SPI #endif -/* deal with the registers that move under the 2412/2413 */ - -#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) -#ifndef __ASSEMBLY__ -extern void __iomem *s3c24xx_va_gpio2; -#endif -#ifdef CONFIG_CPU_S3C2412_ONLY -#define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10) -#else -#define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2 -#endif -#else -#define s3c24xx_va_gpio2 S3C24XX_VA_GPIO -#define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO -#endif - #endif /* __ASM_ARCH_MAP_H */ diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 4be6a74c4..6ab834a14 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h @@ -1,4 +1,6 @@ -/* linux/include/asm-arm/arch-s3c2410/memory.h +/* + * linux/include/asm-arm/arch-s3c2410/memory.h + * * from linux/include/asm-arm/arch-rpc/memory.h * * Copyright (C) 1996,1997,1998 Russell King. @@ -6,6 +8,16 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 20-Oct-1996 RMK Created + * 31-Dec-1997 RMK Fixed definitions to reduce warnings + * 11-Jan-1998 RMK Uninlined to reduce hits on cache + * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt + * 21-Mar-1999 RMK Renamed to memory.h + * RMK Added TASK_SIZE and PAGE_OFFSET + * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 + * 17-Mar-2005 LCVR Modified for S3C2400 */ #ifndef __ASM_ARCH_MEMORY_H diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h index e350ae2ac..9148ac045 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/arch-s3c2410/nand.h @@ -8,6 +8,9 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 23-Sep-2004 BJD Created file */ /* struct s3c2410_nand_set diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index e2d406218..7c4b0cd2d 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h @@ -9,6 +9,8 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: */ /* needs arch/map.h including with this */ diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index c7b90b3ec..15bfc2f57 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h @@ -7,6 +7,9 @@ * published by the Free Software Foundation. * * S3C2410 ADC registers + * + * Changelog: + * 27-09-2004 SAH Created file */ #ifndef __ASM_ARCH_REGS_ADC_H diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index b2f4690c0..34360706e 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h @@ -1,6 +1,6 @@ /* linux/include/asm/arch-s3c2410/regs-clock.h * - * Copyright (c) 2003,2004,2005,2006 Simtec Electronics + * Copyright (c) 2003,2004,2005 Simtec Electronics * http://armlinux.simtec.co.uk/ * * This program is free software; you can redistribute it and/or modify @@ -8,6 +8,18 @@ * published by the Free Software Foundation. * * S3C2410 clock register definitions + * + * Changelog: + * 18-Aug-2004 Ben Dooks Added 2440 definitions + * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions + * 19-06-2003 Ben Dooks Created file + * 12-03-2004 Ben Dooks Updated include protection + * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion + * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) + * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA + * 27-Aug-2005 Ben Dooks Add clock-slow info + * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) + * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) */ #ifndef __ASM_ARM_REGS_CLOCK @@ -102,7 +114,7 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) #endif /* __ASSEMBLY__ */ -#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) +#ifdef CONFIG_CPU_S3C2440 /* extra registers */ #define S3C2440_CAMDIVN S3C2410_CLKREG(0x18) @@ -124,70 +136,7 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) #define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) #define S3C2440_CAMDIVN_DVSEN (1<<12) -#define S3C2442_CAMDIVN_CAMCLK_DIV3 (1<<5) - -#endif /* CONFIG_CPU_S3C2440 or CONFIG_CPU_S3C2442 */ - -#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) - -#define S3C2412_OSCSET S3C2410_CLKREG(0x18) -#define S3C2412_CLKSRC S3C2410_CLKREG(0x1C) - -#define S3C2412_PLLCON_OFF (1<<20) - -#define S3C2412_CLKDIVN_PDIVN (1<<2) -#define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) -#define S3C2421_CLKDIVN_ARMDIVN (1<<3) -#define S3C2412_CLKDIVN_USB48DIV (1<<6) -#define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) -#define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) -#define S3C2412_CLKDIVN_I2SDIV_MASK (15<<12) -#define S3C2412_CLKDIVN_I2SDIV_SHIFT (12) -#define S3C2412_CLKDIVN_CAMDIV_MASK (15<<16) -#define S3C2412_CLKDIVN_CAMDIV_SHIFT (16) - -#define S3C2412_CLKCON_WDT (1<<28) -#define S3C2412_CLKCON_SPI (1<<27) -#define S3C2412_CLKCON_IIS (1<<26) -#define S3C2412_CLKCON_IIC (1<<25) -#define S3C2412_CLKCON_ADC (1<<24) -#define S3C2412_CLKCON_RTC (1<<23) -#define S3C2412_CLKCON_GPIO (1<<22) -#define S3C2412_CLKCON_UART2 (1<<21) -#define S3C2412_CLKCON_UART1 (1<<20) -#define S3C2412_CLKCON_UART0 (1<<19) -#define S3C2412_CLKCON_SDI (1<<18) -#define S3C2412_CLKCON_PWMT (1<<17) -#define S3C2412_CLKCON_USBD (1<<16) -#define S3C2412_CLKCON_CAMCLK (1<<15) -#define S3C2412_CLKCON_UARTCLK (1<<14) -/* missing 13 */ -#define S3C2412_CLKCON_USB_HOST48 (1<<12) -#define S3C2412_CLKCON_USB_DEV48 (1<<11) -#define S3C2412_CLKCON_HCLKdiv2 (1<<10) -#define S3C2412_CLKCON_HCLKx2 (1<<9) -#define S3C2412_CLKCON_SDRAM (1<<8) -/* missing 7 */ -#define S3C2412_CLKCON_USBH S3C2410_CLKCON_USBH -#define S3C2412_CLKCON_LCDC S3C2410_CLKCON_LCDC -#define S3C2412_CLKCON_NAND S3C2410_CLKCON_NAND -#define S3C2412_CLKCON_DMA3 (1<<3) -#define S3C2412_CLKCON_DMA2 (1<<2) -#define S3C2412_CLKCON_DMA1 (1<<1) -#define S3C2412_CLKCON_DMA0 (1<<0) - -/* clock sourec controls */ - -#define S3C2412_CLKSRC_EXTCLKDIV_MASK (7 << 0) -#define S3C2412_CLKSRC_EXTCLKDIV_SHIFT (0) -#define S3C2412_CLKSRC_MDIVCLK_EXTCLKDIV (1<<3) -#define S3C2412_CLKSRC_MSYSCLK_MPLL (1<<4) -#define S3C2412_CLKSRC_USYSCLK_UPLL (1<<5) -#define S3C2412_CLKSRC_UARTCLK_MPLL (1<<8) -#define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9) -#define S3C2412_CLKSRC_USBCLK_HCLK (1<<10) -#define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11) - -#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ +#endif /* CONFIG_CPU_S3C2440 */ + #endif /* __ASM_ARM_REGS_CLOCK */ diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index a0a124875..a023b0434 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h @@ -7,19 +7,18 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * S3C2440/S3C2412 Signal Drive Strength Control + * S3C2440 Signal Drive Strength Control + * + * Changelog: + * 11-Aug-2004 BJD Created file + * 25-Aug-2004 BJD Added the _SELECT_* defs for using with functions */ #ifndef __ASM_ARCH_REGS_DSC_H #define __ASM_ARCH_REGS_DSC_H "2440-dsc" -#if defined(CONFIG_CPU_S3C2412) -#define S3C2412_DSC0 S3C2410_GPIOREG(0xdc) -#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) -#endif - -#if defined(CONFIG_CPU_S3C2440) +#ifdef CONFIG_CPU_S3C2440 #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) @@ -171,7 +170,7 @@ #define S3C2440_DSC1_CS1_4mA (3<<2) #define S3C2440_DSC1_CS1_MASK (3<<2) -#define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0) +#define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0 #define S3C2440_DSC1_CS0_10mA (0<<0) #define S3C2440_DSC1_CS0_8mA (1<<0) #define S3C2440_DSC1_CS0_6mA (2<<0) diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 93c49432d..d25740846 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h @@ -8,6 +8,21 @@ * published by the Free Software Foundation. * * S3C2410 GPIO register definitions + * + * Changelog: + * 19-06-2003 BJD Created file + * 23-06-2003 BJD Updated GSTATUS registers + * 12-03-2004 BJD Updated include protection + * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions + * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs + * 17-10-2004 BJD Added GSTATUS1 register definitions + * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 + * 18-11-2004 BJD Added S3C2440 AC97 controls + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 28-Mar-2005 LCVR Fixed definition of GPB10 + * 26-Oct-2005 BJD Added generic configuration types + * 27-Nov-2005 LCVR Added definitions to S3C2400 registers + * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro */ @@ -30,7 +45,7 @@ #define S3C24XX_MISCCR S3C2400_MISCCR #else #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) -#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80) +#define S3C24XX_MISCCR S3C2410_MISCCR #endif /* CONFIG_CPU_S3C2400 */ @@ -58,15 +73,9 @@ #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ -/* register address for the GPIO registers. - * S3C24XX_GPIOREG2 is for the second set of registers in the - * GPIO which move between s3c2410 and s3c2412 type systems */ +/* configure GPIO ports A..G */ #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) -#define S3C24XX_GPIOREG2(x) ((x) + S3C24XX_VA_GPIO2) - - -/* configure GPIO ports A..G */ /* port A - S3C2410: 22bits, zero in bit X makes pin X output * S3C2400: 18bits, zero in bit X makes pin X output @@ -441,14 +450,12 @@ #define S3C2410_GPD0_OUTP (0x01 << 0) #define S3C2410_GPD0_VD8 (0x02 << 0) #define S3C2400_GPD0_VFRAME (0x02 << 0) -#define S3C2442_GPD0_nSPICS1 (0x03 << 0) #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) #define S3C2410_GPD1_INP (0x00 << 2) #define S3C2410_GPD1_OUTP (0x01 << 2) #define S3C2410_GPD1_VD9 (0x02 << 2) #define S3C2400_GPD1_VM (0x02 << 2) -#define S3C2442_GPD1_SPICLK1 (0x03 << 2) #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) #define S3C2410_GPD2_INP (0x00 << 4) @@ -851,7 +858,6 @@ #define S3C2410_GPG12_OUTP (0x01 << 24) #define S3C2410_GPG12_EINT20 (0x02 << 24) #define S3C2410_GPG12_XMON (0x03 << 24) -#define S3C2442_GPG12_nSPICS0 (0x03 << 24) #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) #define S3C2410_GPG13_INP (0x00 << 26) @@ -937,25 +943,17 @@ #define S3C2410_GPH9_INP (0x00 << 18) #define S3C2410_GPH9_OUTP (0x01 << 18) #define S3C2410_GPH9_CLKOUT0 (0x02 << 18) -#define S3C2442_GPH9_nSPICS0 (0x03 << 18) #define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10) #define S3C2410_GPH10_INP (0x00 << 20) #define S3C2410_GPH10_OUTP (0x01 << 20) #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) -/* The S3C2412 and S3C2413 move the GPJ register set to after - * GPH, which means all registers after 0x80 are now offset by 0x10 - * for the 2412/2413 from the 2410/2440/2442 -*/ - /* miscellaneous control */ #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) -#define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84) - /* see clock.h for dclk definitions */ /* pullup control on databus */ @@ -983,8 +981,6 @@ #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) #define S3C2410_MISCCR_CLK0_MASK (7<<4) -#define S3C2412_MISCCR_CLK0_RTC (2<<4) - #define S3C2410_MISCCR_CLK1_MPLL (0<<8) #define S3C2410_MISCCR_CLK1_UPLL (1<<8) #define S3C2410_MISCCR_CLK1_FCLK (2<<8) @@ -993,8 +989,6 @@ #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) #define S3C2410_MISCCR_CLK1_MASK (7<<8) -#define S3C2412_MISCCR_CLK1_CLKsrc (0<<8) - #define S3C2410_MISCCR_USBSUSPND0 (1<<12) #define S3C2410_MISCCR_USBSUSPND1 (1<<13) @@ -1002,7 +996,7 @@ #define S3C2410_MISCCR_nEN_SCLK0 (1<<17) #define S3C2410_MISCCR_nEN_SCLK1 (1<<18) -#define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */ +#define S3C2410_MISCCR_nEN_SCLKE (1<<19) #define S3C2410_MISCCR_SDSLEEP (7<<17) /* external interrupt control... */ @@ -1019,10 +1013,6 @@ #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) -#define S3C24XX_EXTINT0 S3C24XX_GPIOREG2(0x88) -#define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) -#define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) - /* values for S3C2410_EXTINT0/1/2 */ #define S3C2410_EXTINT_LOWLEV (0x00) #define S3C2410_EXTINT_HILEV (0x01) @@ -1036,11 +1026,6 @@ #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) #define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0) -#define S3C24XX_EINFLT0 S3C24XX_GPIOREG2(0x94) -#define S3C24XX_EINFLT1 S3C24XX_GPIOREG2(0x98) -#define S3C24XX_EINFLT2 S3C24XX_GPIOREG2(0x9C) -#define S3C24XX_EINFLT3 S3C24XX_GPIOREG2(0xA0) - /* values for interrupt filtering */ #define S3C2410_EINTFLT_PCLK (0x00) #define S3C2410_EINTFLT_EXTCLK (1<<7) @@ -1050,7 +1035,6 @@ /* GSTATUS have miscellaneous information in them * - * These move between s3c2410 and s3c2412 style systems. */ #define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC) @@ -1059,18 +1043,6 @@ #define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8) #define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC) -#define S3C2412_GSTATUS0 S3C2410_GPIOREG(0x0BC) -#define S3C2412_GSTATUS1 S3C2410_GPIOREG(0x0C0) -#define S3C2412_GSTATUS2 S3C2410_GPIOREG(0x0C4) -#define S3C2412_GSTATUS3 S3C2410_GPIOREG(0x0C8) -#define S3C2412_GSTATUS4 S3C2410_GPIOREG(0x0CC) - -#define S3C24XX_GSTATUS0 S3C24XX_GPIOREG2(0x0AC) -#define S3C24XX_GSTATUS1 S3C24XX_GPIOREG2(0x0B0) -#define S3C24XX_GSTATUS2 S3C24XX_GPIOREG2(0x0B4) -#define S3C24XX_GSTATUS3 S3C24XX_GPIOREG2(0x0B8) -#define S3C24XX_GSTATUS4 S3C24XX_GPIOREG2(0x0BC) - #define S3C2410_GSTATUS0_nWAIT (1<<3) #define S3C2410_GSTATUS0_NCON (1<<2) #define S3C2410_GSTATUS0_RnB (1<<1) @@ -1078,9 +1050,7 @@ #define S3C2410_GSTATUS1_IDMASK (0xffff0000) #define S3C2410_GSTATUS1_2410 (0x32410000) -#define S3C2410_GSTATUS1_2412 (0x32412001) #define S3C2410_GSTATUS1_2440 (0x32440000) -#define S3C2410_GSTATUS1_2442 (0x32440aaa) #define S3C2410_GSTATUS2_WTRESET (1<<2) #define S3C2410_GSTATUS2_OFFRESET (1<<1) @@ -1102,22 +1072,5 @@ #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) -/* 2412/2413 sleep configuration registers */ - -#define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) -#define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) -#define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) -#define S3C2412_GPESLPCON S3C2410_GPIOREG(0x4C) -#define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) -#define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) -#define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) - -/* definitions for each pin bit */ -#define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) -#define S3C2412_SLPCON_HI(x) ( 0x01 << ((x) * 2)) -#define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) -#define S3C2412_SLPCON_PDWN(x) ( 0x03 << ((x) * 2)) -#define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2)) - #endif /* __ASM_ARCH_REGS_GPIO_H */ diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 91cefa260..3ad2324ac 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h @@ -8,6 +8,10 @@ * published by the Free Software Foundation. * * S3C2440 GPIO J register definitions + * + * Changelog: + * 11-Aug-2004 BJD Created file + * 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat) */ @@ -28,11 +32,6 @@ #define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) #define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) -#define S3C2413_GPJCON S3C2410_GPIOREG(0x80) -#define S3C2413_GPJDAT S3C2410_GPIOREG(0x84) -#define S3C2413_GPJUP S3C2410_GPIOREG(0x88) -#define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C) - #define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) #define S3C2440_GPJ0_INP (0x00 << 0) #define S3C2440_GPJ0_OUTP (0x01 << 0) diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index 2ae29522f..fed3288e2 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h @@ -8,6 +8,10 @@ * published by the Free Software Foundation. * * S3C2410 I2C Controller + * + * Changelog: + * 03-Oct-2004 BJD Initial include for Linux + * 08-Nov-2004 BJD Added S3C2440 filter register */ #ifndef __ASM_ARCH_REGS_IIC_H diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index 72cd25098..7fdde9b91 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h @@ -8,7 +8,17 @@ * published by the Free Software Foundation. * * S3C2410 IIS register definition -*/ + * + * Changelog: + * 19-06-2003 BJD Created file + * 26-06-2003 BJD Finished off definitions for register addresses + * 12-03-2004 BJD Updated include protection + * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL + * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400 + * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL + * Correct IISMOD_256FS and IISMOD_384FS + * Add IISCON_PSCEN + */ #ifndef __ASM_ARCH_REGS_IIS_H #define __ASM_ARCH_REGS_IIS_H diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 29fb8ef67..24b7292df 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h @@ -6,7 +6,14 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * + * + * Changelog: + * 19-06-2003 BJD Created file + * 12-03-2004 BJD Updated include protection + * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + */ #ifndef ___ASM_ARCH_REGS_IRQ_H @@ -16,7 +23,6 @@ #define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ) #define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO) -#define S3C24XX_EINTREG(x) ((x) + S3C24XX_VA_GPIO2) #define S3C2410_SRCPND S3C2410_IRQREG(0x000) #define S3C2410_INTMOD S3C2410_IRQREG(0x004) @@ -34,10 +40,5 @@ #define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4) #define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8) -#define S3C2412_EINTMASK S3C2410_EINTREG(0x0B4) -#define S3C2412_EINTPEND S3C2410_EINTREG(0X0B8) - -#define S3C24XX_EINTMASK S3C24XX_EINTREG(0x0A4) -#define S3C24XX_EINTPEND S3C24XX_EINTREG(0X0A8) #endif /* ___ASM_ARCH_REGS_IRQ_H */ diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b306d6e31..b6b1b4e8b 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h @@ -6,6 +6,14 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * + * + * Changelog: + * 12-06-2003 BJD Created file + * 26-06-2003 BJD Updated LCDCON register definitions + * 12-03-2004 BJD Updated include protection + * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA */ diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index 375dca503..a2d7d0cec 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h @@ -8,6 +8,12 @@ * published by the Free Software Foundation. * * S3C2410 Memory Control register definitions + * + * Changelog: + * 29-Sep-2004 BJD Initial include for Linux + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA + * 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions + * */ #ifndef __ASM_ARM_MEMREGS_H diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index b824d371a..7cff235e6 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h @@ -8,6 +8,10 @@ * published by the Free Software Foundation. * * S3C2410 NAND register definitions + * + * Changelog: + * 18-Aug-2004 BJD Copied file from 2.4 and updated + * 01-May-2005 BJD Added definitions for s3c2440 controller */ #ifndef __ASM_ARM_REGS_NAND @@ -35,19 +39,10 @@ #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) -#define S3C2440_NFSECC S3C24E10_NFREG(0x34) +#define S3C2440_NFSECC S3C2410_NFREG(0x34) #define S3C2440_NFSBLK S3C2410_NFREG(0x38) #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) -#define S3C2412_NFSBLK S3C2410_NFREG(0x20) -#define S3C2412_NFEBLK S3C2410_NFREG(0x24) -#define S3C2412_NFSTAT S3C2410_NFREG(0x28) -#define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C) -#define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30) -#define S3C2412_NFMECC0 S3C2410_NFREG(0x34) -#define S3C2412_NFMECC1 S3C2410_NFREG(0x38) -#define S3C2412_NFSECC S3C2410_NFREG(0x3C) - #define S3C2410_NFCONF_EN (1<<15) #define S3C2410_NFCONF_512BYTE (1<<14) #define S3C2410_NFCONF_4STEP (1<<13) @@ -82,42 +77,5 @@ #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) -#define S3C2412_NFCONF_NANDBOOT (1<<31) -#define S3C2412_NFCONF_ECCCLKCON (1<<30) -#define S3C2412_NFCONF_ECC_MLC (1<<24) -#define S3C2412_NFCONF_TACLS_MASK (7<<12) /* 1 extra bit of Tacls */ - -#define S3C2412_NFCONT_ECC4_DIRWR (1<<18) -#define S3C2412_NFCONT_LOCKTIGHT (1<<17) -#define S3C2412_NFCONT_SOFTLOCK (1<<16) -#define S3C2412_NFCONT_ECC4_ENCINT (1<<13) -#define S3C2412_NFCONT_ECC4_DECINT (1<<12) -#define S3C2412_NFCONT_MAIN_ECC_LOCK (1<<7) -#define S3C2412_NFCONT_INIT_MAIN_ECC (1<<5) -#define S3C2412_NFCONT_nFCE1 (1<<2) -#define S3C2412_NFCONT_nFCE0 (1<<1) - -#define S3C2412_NFSTAT_ECC_ENCDONE (1<<7) -#define S3C2412_NFSTAT_ECC_DECDONE (1<<6) -#define S3C2412_NFSTAT_ILLEGAL_ACCESS (1<<5) -#define S3C2412_NFSTAT_RnB_CHANGE (1<<4) -#define S3C2412_NFSTAT_nFCE1 (1<<3) -#define S3C2412_NFSTAT_nFCE0 (1<<2) -#define S3C2412_NFSTAT_Res1 (1<<1) -#define S3C2412_NFSTAT_READY (1<<0) - -#define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf) -#define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7) -#define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff) -#define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7) -#define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3) -#define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3) -#define S3C2412_NFECCERR_NONE (0) -#define S3C2412_NFECCERR_1BIT (1) -#define S3C2412_NFECCERR_MULTIBIT (2) -#define S3C2412_NFECCERR_ECCAREA (3) - - - #endif /* __ASM_ARM_REGS_NAND */ diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h deleted file mode 100644 index 6c319ea2a..000000000 --- a/include/asm-arm/arch-s3c2410/regs-power.h +++ /dev/null @@ -1,34 +0,0 @@ -/* linux/include/asm/arch-s3c2410/regs-power.h - * - * Copyright (c) 2003,2004,2005,2006 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * - * 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. - * - * S3C24XX power control register definitions -*/ - -#ifndef __ASM_ARM_REGS_PWR -#define __ASM_ARM_REGS_PWR __FILE__ - -#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR) - -#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20) -#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24) - -#define S3C2412_PWRCFG_BATF_IGNORE (0<<0) -#define S3C2412_PWRCFG_BATF_SLEEP (3<<0) -#define S3C2412_PWRCFG_BATF_MASK (3<<0) - -#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6) -#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6) -#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6) -#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6) -#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6) - -#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8) -#define S3C2412_PWRCFG_NAND_NORST (1<<9) - -#endif /* __ASM_ARM_REGS_PWR */ diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index cd88fd634..228983f89 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h @@ -8,12 +8,17 @@ * published by the Free Software Foundation. * * S3C2410 Internal RTC register definition + * + * Changelog: + * 19-06-2003 BJD Created file + * 12-03-2004 BJD Updated include protection + * 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) */ #ifndef __ASM_ARCH_REGS_RTC_H #define __ASM_ARCH_REGS_RTC_H __FILE__ -#define S3C2410_RTCREG(x) (x) +#define S3C2410_RTCREG(x) ((x) + S3C24XX_VA_RTC) #define S3C2410_RTCCON S3C2410_RTCREG(0x40) #define S3C2410_RTCCON_RTCEN (1<<0) diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h index 06e716e5b..ca9a26fbe 100644 --- a/include/asm-arm/arch-s3c2410/regs-sdi.h +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h @@ -8,6 +8,11 @@ * published by the Free Software Foundation. * * S3C2410 MMC/SDIO register definitions + * + * Changelog: + * 18-Aug-2004 Ben Dooks Created initial file + * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates + * 29-Nov-2004 Ben Dooks Updated Koen's patch */ #ifndef __ASM_ARM_REGS_SDI diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 19c77da9c..83b01254c 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h @@ -27,7 +27,10 @@ * 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 -*/ + * + * Modifications: + * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) + */ #ifndef __ASM_ARM_REGS_SERIAL_H #define __ASM_ARM_REGS_SERIAL_H @@ -79,12 +82,6 @@ #define S3C2440_UCON2_DIVMASK (7 << 12) #define S3C2440_UCON_DIVSHIFT (12) -#define S3C2412_UCON_CLKMASK (3<<10) -#define S3C2412_UCON_UCLK (1<<10) -#define S3C2412_UCON_USYSCLK (3<<10) -#define S3C2412_UCON_PCLK (0<<10) -#define S3C2412_UCON_PCLK2 (2<<10) - #define S3C2410_UCON_UCLK (1<<10) #define S3C2410_UCON_SBREAK (1<<4) @@ -127,15 +124,6 @@ #define S3C2410_UMCOM_AFC (1<<4) #define S3C2410_UMCOM_RTS_LOW (1<<0) -#define S3C2412_UMCON_AFC_63 (0<<5) -#define S3C2412_UMCON_AFC_56 (1<<5) -#define S3C2412_UMCON_AFC_48 (2<<5) -#define S3C2412_UMCON_AFC_40 (3<<5) -#define S3C2412_UMCON_AFC_32 (4<<5) -#define S3C2412_UMCON_AFC_24 (5<<5) -#define S3C2412_UMCON_AFC_16 (6<<5) -#define S3C2412_UMCON_AFC_8 (7<<5) - #define S3C2410_UFSTAT_TXFULL (1<<9) #define S3C2410_UFSTAT_RXFULL (1<<8) #define S3C2410_UFSTAT_TXMASK (15<<4) diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h index 3552280d1..338217858 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/arch-s3c2410/regs-spi.h @@ -7,7 +7,13 @@ * published by the Free Software Foundation. * * S3C2410 SPI register definition -*/ + * + * Changelog: + * 20-04-2004 KF Created file + * 04-10-2004 BJD Removed VA address (no longer mapped) + * tidied file for submission + * 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition + */ #ifndef __ASM_ARCH_REGS_SPI_H #define __ASM_ARCH_REGS_SPI_H diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h index 731918e77..169064e27 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/arch-s3c2410/regs-timer.h @@ -8,6 +8,13 @@ * published by the Free Software Foundation. * * S3C2410 Timer configuration + * + * Changelog: + * 05-06-2003 BJD Created file + * 26-06-2003 BJD Added more timer definitions to mux / control + * 12-03-2004 BJD Updated include protection + * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat) + * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA */ diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index 3aa31a27d..bf315b763 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h @@ -6,7 +6,13 @@ * 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. -*/ + * + * Changelog: + * 01-08-2004 Initial creation + * 12-09-2004 Cleanup for submission + * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition + * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA + */ #ifndef __ASM_ARCH_REGS_UDC_H #define __ASM_ARCH_REGS_UDC_H diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h index f4fff448c..d199ca6af 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h @@ -1,4 +1,4 @@ -/* linux/include/asm/arch-s3c2410/regs-watchdog.h +/* linux/include/asm/arch-s3c2410/regs0watchdog.h * * Copyright (c) 2003 Simtec Electronics * http://www.simtec.co.uk/products/SWLINUX/ @@ -8,6 +8,11 @@ * published by the Free Software Foundation. * * S3C2410 Watchdog timer control + * + * Changelog: + * 21-06-2003 BJD Created file + * 12-03-2004 BJD Updated include protection + * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA */ diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 718246d85..9b0d85024 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h @@ -8,7 +8,14 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * Changelog: + * 12-May-2003 BJD Created file + * 14-May-2003 BJD Removed idle to aid debugging + * 12-Jun-2003 BJD Added reset via watchdog + * 04-Sep-2003 BJD Moved to v2.6 + * 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic() + */ #include #include diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h index 703c337c5..3558a3a75 100644 --- a/include/asm-arm/arch-s3c2410/timex.h +++ b/include/asm-arm/arch-s3c2410/timex.h @@ -8,6 +8,12 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 02-Sep-2003 BJD Created file + * 05-Jan-2004 BJD Updated for Linux 2.6.0 + * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE + * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate */ #ifndef __ASM_ARCH_TIMEX_H diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 81b3e91c5..a6f6a0e44 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h @@ -8,11 +8,21 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 22-May-2003 BJD Created + * 08-Sep-2003 BJD Moved to linux v2.6 + * 12-Mar-2004 BJD Updated header protection + * 12-Oct-2004 BJD Take account of debug uart configuration + * 15-Nov-2004 BJD Fixed uart configuration + * 22-Feb-2005 BJD Added watchdog to uncompress + * 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1) */ #ifndef __ASM_ARCH_UNCOMPRESS_H #define __ASM_ARCH_UNCOMPRESS_H +#include /* defines for UART registers */ #include "asm/arch/regs-serial.h" @@ -72,8 +82,7 @@ static void putc(int ch) while (1) { level = uart_rd(S3C2410_UFSTAT); - if (cpuid == S3C2410_GSTATUS1_2440 || - cpuid == S3C2410_GSTATUS1_2442) { + if (cpuid == S3C2410_GSTATUS1_2440) { level &= S3C2440_UFSTAT_TXMASK; level >>= S3C2440_UFSTAT_TXSHIFT; } else { @@ -121,7 +130,7 @@ static void arch_decomp_wdog_start(void) { __raw_writel(WDOG_COUNT, S3C2410_WTDAT); __raw_writel(WDOG_COUNT, S3C2410_WTCNT); - __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); + __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); } #else diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h index 35723569a..bd43b566d 100644 --- a/include/asm-arm/arch-s3c2410/usb-control.h +++ b/include/asm-arm/arch-s3c2410/usb-control.h @@ -8,6 +8,11 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 11-Sep-2004 BJD Created file + * 21-Sep-2004 BJD Updated port info + * 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc */ #ifndef __ASM_ARCH_USBCONTROL_H diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h index 0ae3bdb7e..33963cd54 100644 --- a/include/asm-arm/arch-s3c2410/vmalloc.h +++ b/include/asm-arm/arch-s3c2410/vmalloc.h @@ -10,7 +10,11 @@ * published by the Free Software Foundation. * * S3C2410 vmalloc definition -*/ + * + * Changelog: + * 12-Mar-2004 BJD Fixed header, added include protection + * 12=Mar-2004 BJD Fixed VMALLOC_END definitions + */ #ifndef __ASM_ARCH_VMALLOC_H #define __ASM_ARCH_VMALLOC_H diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h index a341b1e1b..0ee373ac6 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h +++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h @@ -8,6 +8,10 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 25-May-2003 BJD Created file, added CTRL1 registers + * 19-Mar-2004 BJD Added VR1000 CPLD definitions */ #ifndef __ASM_ARCH_VR1000CPLD_H diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h index c39a0ffa6..694f7715d 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-irq.h +++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h @@ -8,7 +8,11 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. -*/ + * + * Changelog: + * 06-Jan-2003 BJD Linux 2.6.0 version + * 19-Mar-2004 BJD Updates for VR1000 + */ #ifndef __ASM_ARCH_VR1000IRQ_H #define __ASM_ARCH_VR1000IRQ_H diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h index 1fe4db36c..867c9355f 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-map.h +++ b/include/asm-arm/arch-s3c2410/vr1000-map.h @@ -8,6 +8,12 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. + * + * Changelog: + * 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h + * 12-Mar-2004 BJD Fixed header include protection + * 19-Mar-2004 BJD Copied to VR1000 machine headers. + * 19-Jan-2005 BJD Updated map definitions */ /* needs arch/map.h including with this */ diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h index d6a1bb5b4..1f59b368c 100644 --- a/include/asm-arm/arch-sa1100/assabet.h +++ b/include/asm-arm/arch-sa1100/assabet.h @@ -12,6 +12,7 @@ #ifndef __ASM_ARCH_ASSABET_H #define __ASM_ARCH_ASSABET_H +#include /* System Configuration Register flags */ diff --git a/include/asm-arm/arch-sa1100/cerf.h b/include/asm-arm/arch-sa1100/cerf.h index 9a19c3d07..356d5ba88 100644 --- a/include/asm-arm/arch-sa1100/cerf.h +++ b/include/asm-arm/arch-sa1100/cerf.h @@ -10,6 +10,7 @@ #ifndef _INCLUDE_CERF_H_ #define _INCLUDE_CERF_H_ +#include #define CERF_ETH_IO 0xf0000000 #define CERF_ETH_IRQ IRQ_GPIO26 diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h index 14a344aa3..d49e5ff63 100644 --- a/include/asm-arm/arch-sa1100/collie.h +++ b/include/asm-arm/arch-sa1100/collie.h @@ -13,6 +13,7 @@ #ifndef __ASM_ARCH_COLLIE_H #define __ASM_ARCH_COLLIE_H +#include #define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11 #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 diff --git a/include/asm-arm/arch-sa1100/dma.h b/include/asm-arm/arch-sa1100/dma.h index 6b7917a2e..02575d72a 100644 --- a/include/asm-arm/arch-sa1100/dma.h +++ b/include/asm-arm/arch-sa1100/dma.h @@ -10,6 +10,7 @@ #ifndef __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H +#include #include "hardware.h" diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h index 1abd7cfc8..ee008a548 100644 --- a/include/asm-arm/arch-sa1100/hardware.h +++ b/include/asm-arm/arch-sa1100/hardware.h @@ -12,6 +12,7 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H +#include #define UNCACHEABLE_ADDR 0xfa050000 diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h index 98b10bcf9..215353806 100644 --- a/include/asm-arm/arch-sa1100/ide.h +++ b/include/asm-arm/arch-sa1100/ide.h @@ -9,6 +9,7 @@ * architectures. */ +#include #include #include #include diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h index 075626940..040ccde7a 100644 --- a/include/asm-arm/arch-sa1100/io.h +++ b/include/asm-arm/arch-sa1100/io.h @@ -22,5 +22,6 @@ static inline void __iomem *__io(unsigned long addr) } #define __io(a) __io(a) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h index d7940683e..eabd3be3d 100644 --- a/include/asm-arm/arch-sa1100/irqs.h +++ b/include/asm-arm/arch-sa1100/irqs.h @@ -7,6 +7,7 @@ * * 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs. */ +#include #define IRQ_GPIO0 0 #define IRQ_GPIO1 1 diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index 1ff172dc8..a29fac138 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h @@ -7,6 +7,7 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H +#include #include /* diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h index aef91e3b6..0f0612f79 100644 --- a/include/asm-arm/arch-sa1100/system.h +++ b/include/asm-arm/arch-sa1100/system.h @@ -3,6 +3,7 @@ * * Copyright (c) 1999 Nicolas Pitre */ +#include #include static inline void arch_idle(void) diff --git a/include/asm-arm/arch-versatile/io.h b/include/asm-arm/arch-versatile/io.h index c4d01948e..47e904cf2 100644 --- a/include/asm-arm/arch-versatile/io.h +++ b/include/asm-arm/arch-versatile/io.h @@ -28,5 +28,6 @@ static inline void __iomem *__io(unsigned long addr) } #define __io(a) __io(a) #define __mem_pci(a) (a) +#define __mem_isa(a) (a) #endif diff --git a/include/asm-arm/arch-versatile/platform.h b/include/asm-arm/arch-versatile/platform.h index 2af9d7c9c..72ef87456 100644 --- a/include/asm-arm/arch-versatile/platform.h +++ b/include/asm-arm/arch-versatile/platform.h @@ -65,8 +65,6 @@ #define VERSATILE_SYS_OSC1_OFFSET 0x1C #endif -#define VERSATILE_SYS_OSCCLCD_OFFSET 0x1c - #define VERSATILE_SYS_LOCK_OFFSET 0x20 #define VERSATILE_SYS_100HZ_OFFSET 0x24 #define VERSATILE_SYS_CFGDATA1_OFFSET 0x28 diff --git a/include/asm-arm/arch-versatile/system.h b/include/asm-arm/arch-versatile/system.h index 71c6254c0..8889a1897 100644 --- a/include/asm-arm/arch-versatile/system.h +++ b/include/asm-arm/arch-versatile/system.h @@ -36,14 +36,16 @@ static inline void arch_idle(void) static inline void arch_reset(char mode) { - u32 val; + unsigned int hdr_ctrl = (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_RESETCTL_OFFSET); + unsigned int val; - val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7; - val |= 0x105; - - __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK)); - __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL)); - __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK)); + /* + * To reset, we hit the on-board reset register + * in the system FPGA + */ + val = __raw_readl(hdr_ctrl); + val |= VERSATILE_SYS_CTRL_RESET_CONFIGCLR; + __raw_writel(val, hdr_ctrl); } #endif diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index fce832820..d53bafa9b 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h @@ -55,6 +55,30 @@ #define PLD(code...) #endif +#define MODE_USR USR_MODE +#define MODE_FIQ FIQ_MODE +#define MODE_IRQ IRQ_MODE +#define MODE_SVC SVC_MODE + +#define DEFAULT_FIQ MODE_FIQ + +/* + * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + */ +#ifdef __STDC__ +#define LOADREGS(cond, base, reglist...)\ + ldm##cond base,reglist +#else +#define LOADREGS(cond, base, reglist...)\ + ldm/**/cond base,reglist +#endif + +/* + * Build a return instruction for this processor type. + */ +#define RETINSTR(instr, regs...)\ + instr regs + /* * Enable and disable interrupts */ @@ -93,6 +117,18 @@ msr cpsr_c, \oldcpsr .endm +/* + * These two are used to save LR/restore PC over a user-based access. + * The old 26-bit architecture requires that we do. On 32-bit + * architecture, we can safely ignore this requirement. + */ + .macro save_lr + .endm + + .macro restore_pc + mov pc, lr + .endm + #define USER(x...) \ 9999: x; \ .section __ex_table,"a"; \ diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h index 4b0ce3e7d..3d7283d84 100644 --- a/include/asm-arm/atomic.h +++ b/include/asm-arm/atomic.h @@ -11,6 +11,7 @@ #ifndef __ASM_ARM_ATOMIC_H #define __ASM_ARM_ATOMIC_H +#include #include typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 0e36fd5d8..5ab8216f5 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h @@ -1,6 +1,8 @@ #ifndef _ASMARM_BUG_H #define _ASMARM_BUG_H +#include +#include #ifdef CONFIG_BUG #ifdef CONFIG_DEBUG_BUGVERBOSE diff --git a/include/asm-arm/bugs.h b/include/asm-arm/bugs.h index ca54eb0f1..4c80ec519 100644 --- a/include/asm-arm/bugs.h +++ b/include/asm-arm/bugs.h @@ -10,12 +10,8 @@ #ifndef __ASM_BUGS_H #define __ASM_BUGS_H -#ifdef CONFIG_MMU extern void check_writebuffer_bugs(void); #define check_bugs() check_writebuffer_bugs() -#else -#define check_bugs() do { } while (0) -#endif #endif diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h index e6f7fcdc7..17eaf8bdf 100644 --- a/include/asm-arm/byteorder.h +++ b/include/asm-arm/byteorder.h @@ -22,18 +22,16 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) { __u32 t; -#ifndef __thumb__ - if (!__builtin_constant_p(x)) { + if (__builtin_constant_p(x)) { + t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ + } else { /* * The compiler needs a bit of a hint here to always do the * right thing and not screw it up to different degrees * depending on the gcc version. */ asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); - } else -#endif - t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ - + } x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index e4a2569c6..746be56b1 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -10,6 +10,7 @@ #ifndef _ASMARM_CACHEFLUSH_H #define _ASMARM_CACHEFLUSH_H +#include #include #include @@ -247,12 +248,14 @@ extern void dmac_flush_range(unsigned long, unsigned long); */ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ - flush_ptrace_access(vma, page, vaddr, dst, len, 1);\ + flush_dcache_page(page); \ } while (0) #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ do { \ + flush_cache_page(vma, vaddr, page_to_pfn(page));\ memcpy(dst, src, len); \ } while (0) @@ -283,24 +286,10 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned l __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); } } - -static inline void -flush_ptrace_access(struct vm_area_struct *vma, struct page *page, - unsigned long uaddr, void *kaddr, - unsigned long len, int write) -{ - if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { - unsigned long addr = (unsigned long)kaddr; - __cpuc_coherent_kern_range(addr, addr + len); - } -} #else extern void flush_cache_mm(struct mm_struct *mm); extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); -extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, - unsigned long uaddr, void *kaddr, - unsigned long len, int write); #endif /* diff --git a/include/asm-arm/cpu.h b/include/asm-arm/cpu.h index 715426b9b..751bc7462 100644 --- a/include/asm-arm/cpu.h +++ b/include/asm-arm/cpu.h @@ -10,6 +10,7 @@ #ifndef __ASM_ARM_CPU_H #define __ASM_ARM_CPU_H +#include #include struct cpuinfo_arm { diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index 55eb4dc32..63ca7412a 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include /* need struct page */ #include diff --git a/include/asm-arm/dma.h b/include/asm-arm/dma.h index 9f2c5305c..49c01e2bf 100644 --- a/include/asm-arm/dma.h +++ b/include/asm-arm/dma.h @@ -3,6 +3,7 @@ typedef unsigned int dmach_t; +#include #include #include #include diff --git a/include/asm-arm/domain.h b/include/asm-arm/domain.h index 4c2885abb..f8ea2de48 100644 --- a/include/asm-arm/domain.h +++ b/include/asm-arm/domain.h @@ -50,8 +50,6 @@ #define domain_val(dom,type) ((type) << (2*(dom))) #ifndef __ASSEMBLY__ - -#ifdef CONFIG_MMU #define set_domain(x) \ do { \ __asm__ __volatile__( \ @@ -68,10 +66,5 @@ set_domain(thread->cpu_domain); \ } while (0) -#else -#define set_domain(x) do { } while (0) -#define modify_domain(dom,type) do { } while (0) -#endif - #endif #endif /* !__ASSEMBLY__ */ diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h deleted file mode 100644 index 19fab2d2b..000000000 --- a/include/asm-arm/dyntick.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASMARM_DYNTICK_H -#define _ASMARM_DYNTICK_H - -#include - -#endif /* _ASMARM_DYNTICK_H */ diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 17f0c656d..2d44b42d1 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h @@ -1,6 +1,7 @@ #ifndef __ASMARM_ELF_H #define __ASMARM_ELF_H +#include /* * ELF register definitions.. @@ -8,6 +9,7 @@ #include #include +#include typedef unsigned long elf_greg_t; typedef unsigned long elf_freg_t[3]; @@ -28,6 +30,11 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef struct user_fp elf_fpregset_t; +/* + * This is used to ensure we don't load something for the wrong architecture. + */ +#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) + /* * These are used to set parameters in the core dumps. */ @@ -39,14 +46,6 @@ typedef struct user_fp elf_fpregset_t; #endif #define ELF_ARCH EM_ARM -#ifdef __KERNEL__ -#include - -/* - * This is used to ensure we don't load something for the wrong architecture. - */ -#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) ) - #define USE_ELF_CORE_DUMP #define ELF_EXEC_PAGESIZE 4096 @@ -83,6 +82,8 @@ typedef struct user_fp elf_fpregset_t; extern char elf_platform[]; #define ELF_PLATFORM (elf_platform) +#ifdef __KERNEL__ + /* * 32-bit code is always OK. Some cpus can do 26-bit, some can't. */ diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h index 54b5ae44e..6ea657c88 100644 --- a/include/asm-arm/floppy.h +++ b/include/asm-arm/floppy.h @@ -25,7 +25,7 @@ #define fd_inb(port) inb((port)) #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ - IRQF_DISABLED,"floppy",NULL) + SA_INTERRUPT|SA_SAMPLE_RANDOM,"floppy",NULL) #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 6af4e6bd1..52bae088a 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h @@ -11,6 +11,7 @@ #ifndef __ASM_ARM_FPSTATE_H #define __ASM_ARM_FPSTATE_H +#include #ifndef __ASSEMBLY__ @@ -72,14 +73,6 @@ union fp_state { #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) -struct crunch_state { - unsigned int mvdx[16][2]; - unsigned int mvax[4][3]; - unsigned int dspsc[2]; -}; - -#define CRUNCH_SIZE sizeof(struct crunch_state) - #endif #endif diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h index 0cc5d3b10..223e0d6c4 100644 --- a/include/asm-arm/glue.h +++ b/include/asm-arm/glue.h @@ -15,6 +15,7 @@ */ #ifdef __KERNEL__ +#include #ifdef __STDC__ #define ____glue(name,fn) name##fn diff --git a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h index 182310b99..1cbb173bf 100644 --- a/include/asm-arm/hardirq.h +++ b/include/asm-arm/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-arm/hardware/dec21285.h b/include/asm-arm/hardware/dec21285.h index 546f7077b..6685e3fb9 100644 --- a/include/asm-arm/hardware/dec21285.h +++ b/include/asm-arm/hardware/dec21285.h @@ -18,6 +18,7 @@ #define DC21285_PCI_IO 0x7c000000 #define DC21285_PCI_MEM 0x80000000 +#include #ifndef __ASSEMBLY__ #include #define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) diff --git a/include/asm-arm/hardware/iomd.h b/include/asm-arm/hardware/iomd.h index 396e55ad0..82fa2c279 100644 --- a/include/asm-arm/hardware/iomd.h +++ b/include/asm-arm/hardware/iomd.h @@ -13,6 +13,7 @@ #ifndef __ASMARM_HARDWARE_IOMD_H #define __ASMARM_HARDWARE_IOMD_H +#include #ifndef __ASSEMBLY__ diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h index 22dfb1737..5f10048ec 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h @@ -111,8 +111,6 @@ #define LOCOMO_ALS 0x00 /* Adjust light cycle */ #define LOCOMO_ALD 0x04 /* Adjust light duty */ -#define LOCOMO_ALC_EN 0x8000 - /* Backlight controller: TFT signal */ #define LOCOMO_BACKLIGHT 0x38 #define LOCOMO_TC 0x00 /* TFT control signal */ @@ -205,7 +203,4 @@ void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int /* M62332 control function */ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); -/* Frontlight control */ -void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf); - #endif diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h index ecf15b839..36983e5f3 100644 --- a/include/asm-arm/hardware/sharpsl_pm.h +++ b/include/asm-arm/hardware/sharpsl_pm.h @@ -16,7 +16,6 @@ struct sharpsl_charger_machinfo { void (*exit)(void); int gpio_acin; int gpio_batfull; - int batfull_irq; int gpio_batlock; int gpio_fatal; void (*discharge)(int); @@ -35,19 +34,9 @@ struct sharpsl_charger_machinfo { #define SHARPSL_STATUS_FATAL 7 unsigned long (*charger_wakeup)(void); int (*should_wakeup)(unsigned int resume_on_alarm); - void (*backlight_limit)(int); - int (*backlight_get_status) (void); - int charge_on_volt; - int charge_on_temp; - int charge_acin_high; - int charge_acin_low; - int fatal_acin_volt; - int fatal_noacin_volt; int bat_levels; struct battery_thresh *bat_levels_noac; struct battery_thresh *bat_levels_acin; - struct battery_thresh *bat_levels_noac_bl; - struct battery_thresh *bat_levels_acin_bl; int status_high_acin; int status_low_acin; int status_high_noac; diff --git a/include/asm-arm/hardware/ssp.h b/include/asm-arm/hardware/ssp.h index 3b42e1819..28aa11b76 100644 --- a/include/asm-arm/hardware/ssp.h +++ b/include/asm-arm/hardware/ssp.h @@ -16,8 +16,8 @@ struct ssp_state { }; int ssp_write_word(u16 data); -int ssp_read_word(u16 *data); -int ssp_flush(void); +int ssp_read_word(void); +void ssp_flush(void); void ssp_enable(void); void ssp_disable(void); void ssp_save_state(struct ssp_state *ssp); diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h deleted file mode 100644 index ea8569719..000000000 --- a/include/asm-arm/hw_irq.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Nothing to see here yet - */ -#ifndef _ARCH_ARM_HW_IRQ_H -#define _ARCH_ARM_HW_IRQ_H - -#include - -#if defined(CONFIG_NO_IDLE_HZ) -# include -# define handle_dynamic_tick(action) \ - if (!(action->flags & IRQF_TIMER) && system_timer->dyn_tick) { \ - write_seqlock(&xtime_lock); \ - if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \ - system_timer->dyn_tick->handler(irq, 0, regs); \ - write_sequnlock(&xtime_lock); \ - } -#endif - -#endif diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index bf7b9dea3..b3479fc1c 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -291,12 +291,5 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); */ #define xlate_dev_kmem_ptr(p) p -/* - * Register ISA memory and port locations for glibc iopl/inb/outb - * emulation. - */ -extern void register_isa_ports(unsigned int mmio, unsigned int io, - unsigned int io_shift); - #endif /* __KERNEL__ */ #endif /* __ASM_ARM_IO_H */ diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 283af50a1..60b5105c9 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h @@ -21,13 +21,18 @@ struct irqaction; +extern void disable_irq_nosync(unsigned int); +extern void disable_irq(unsigned int); +extern void enable_irq(unsigned int); + /* - * Migration helpers + * These correspond with the SA_TRIGGER_* defines, and therefore the + * IORESOURCE_IRQ_* defines. */ -#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING -#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING -#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW -#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH +#define __IRQT_RISEDGE (1 << 0) +#define __IRQT_FALEDGE (1 << 1) +#define __IRQT_HIGHLVL (1 << 2) +#define __IRQT_LOWLVL (1 << 3) #define IRQT_NOEDGE (0) #define IRQT_RISING (__IRQT_RISEDGE) @@ -35,7 +40,16 @@ struct irqaction; #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) #define IRQT_LOW (__IRQT_LOWLVL) #define IRQT_HIGH (__IRQT_HIGHLVL) -#define IRQT_PROBE IRQ_TYPE_PROBE +#define IRQT_PROBE (1 << 4) + +int set_irq_type(unsigned int irq, unsigned int type); +void disable_irq_wake(unsigned int irq); +void enable_irq_wake(unsigned int irq); +int setup_irq(unsigned int, struct irqaction *); + +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); extern void migrate_irqs(void); #endif diff --git a/include/asm-arm/leds.h b/include/asm-arm/leds.h index 12290ea55..88ce4124f 100644 --- a/include/asm-arm/leds.h +++ b/include/asm-arm/leds.h @@ -13,6 +13,7 @@ #ifndef ASM_ARM_LEDS_H #define ASM_ARM_LEDS_H +#include typedef enum { led_idle_start, diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index 131f33733..d4d420ecf 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h @@ -10,32 +10,114 @@ #ifndef __ASM_ARM_MACH_IRQ_H #define __ASM_ARM_MACH_IRQ_H -#include - +struct irqdesc; +struct pt_regs; struct seq_file; +typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *); +typedef void (*irq_control_t)(unsigned int); + +struct irqchip { + /* + * Acknowledge the IRQ. + * If this is a level-based IRQ, then it is expected to mask the IRQ + * as well. + */ + void (*ack)(unsigned int); + /* + * Mask the IRQ in hardware. + */ + void (*mask)(unsigned int); + /* + * Unmask the IRQ in hardware. + */ + void (*unmask)(unsigned int); + /* + * Ask the hardware to re-trigger the IRQ. + * Note: This method _must_ _not_ call the interrupt handler. + * If you are unable to retrigger the interrupt, do not + * provide a function, or if you do, return non-zero. + */ + int (*retrigger)(unsigned int); + /* + * Set the type of the IRQ. + */ + int (*set_type)(unsigned int, unsigned int); + /* + * Set wakeup-enable on the selected IRQ + */ + int (*set_wake)(unsigned int, unsigned int); + +#ifdef CONFIG_SMP + /* + * Route an interrupt to a CPU + */ + void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu); +#endif +}; + +struct irqdesc { + irq_handler_t handle; + struct irqchip *chip; + struct irqaction *action; + struct list_head pend; + void __iomem *base; + void *data; + unsigned int disable_depth; + + unsigned int triggered: 1; /* IRQ has occurred */ + unsigned int running : 1; /* IRQ is running */ + unsigned int pending : 1; /* IRQ is pending */ + unsigned int probing : 1; /* IRQ in use for a probe */ + unsigned int probe_ok : 1; /* IRQ can be used for probe */ + unsigned int valid : 1; /* IRQ claimable */ + unsigned int noautoenable : 1; /* don't automatically enable IRQ */ + unsigned int unused :25; + + unsigned int irqs_unhandled; + struct proc_dir_entry *procdir; + +#ifdef CONFIG_SMP + cpumask_t affinity; + unsigned int cpu; +#endif + + /* + * IRQ lock detection + */ + unsigned int lck_cnt; + unsigned int lck_pc; + unsigned int lck_jif; +}; + +extern struct irqdesc irq_desc[]; + +/* + * Helpful inline function for calling irq descriptor handlers. + */ +static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) +{ + desc->handle(irq, desc, regs); +} + /* * This is internal. Do not use it. */ extern void (*init_arch_irq)(void); extern void init_FIQ(void); extern int show_fiq_list(struct seq_file *, void *); +void __set_irq_handler(unsigned int irq, irq_handler_t, int); /* - * Function wrappers - */ -#define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d) -#define get_irq_chipdata(irq) get_irq_chip_data(irq) - -/* - * Obsolete inline function for calling irq descriptor handlers. + * External stuff. */ -static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) -{ - desc->handle_irq(irq, desc, regs); -} +#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) +#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) +#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) +#define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) +#define get_irq_chipdata(irq) (irq_desc[irq].base) +void set_irq_chip(unsigned int irq, struct irqchip *); void set_irq_flags(unsigned int irq, unsigned int flags); #define IRQF_VALID (1 << 0) @@ -43,25 +125,12 @@ void set_irq_flags(unsigned int irq, unsigned int flags); #define IRQF_NOAUTOEN (1 << 2) /* - * This is for easy migration, but should be changed in the source + * Built-in IRQ handlers. */ -#define do_level_IRQ handle_level_irq -#define do_edge_IRQ handle_edge_irq -#define do_simple_IRQ handle_simple_irq -#define irqdesc irq_desc -#define irqchip irq_chip - -#define do_bad_IRQ(irq,desc,regs) \ -do { \ - spin_lock(&desc->lock); \ - handle_bad_irq(irq, desc, regs); \ - spin_unlock(&desc->lock); \ -} while(0) - -extern unsigned long irq_err_count; -static inline void ack_bad_irq(int irq) -{ - irq_err_count++; -} +void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); +void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); +void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); +void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); +void dummy_mask_unmask_irq(unsigned int irq); #endif diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index cef5364ed..e8ea67c97 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h @@ -16,6 +16,8 @@ struct map_desc { unsigned int type; }; +struct meminfo; + #define MT_DEVICE 0 #define MT_CACHECLEAN 1 #define MT_MINICLEAN 2 @@ -26,8 +28,7 @@ struct map_desc { #define MT_IXP2000_DEVICE 7 #define MT_NONSHARED_DEVICE 8 -#ifdef CONFIG_MMU +extern void create_memmap_holes(struct meminfo *); +extern void memtable_init(struct meminfo *); extern void iotable_init(struct map_desc *, int); -#else -#define iotable_init(map,num) do { } while (0) -#endif +extern void setup_io_desc(void); diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 923e0ca66..25d540ed0 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h @@ -28,7 +28,7 @@ struct hw_pci { struct pci_sys_data { struct list_head node; int busnr; /* primary bus number */ - u64 mem_offset; /* bus->cpu memory mapping offset */ + unsigned long mem_offset; /* bus->cpu memory mapping offset */ unsigned long io_offset; /* bus->cpu IO mapping offset */ struct pci_bus *bus; /* PCI bus */ struct resource *resource[3]; /* Primary PCI bus resources */ diff --git a/include/asm-arm/mach/serial_at91.h b/include/asm-arm/mach/serial_at91rm9200.h similarity index 71% rename from include/asm-arm/mach/serial_at91.h rename to include/asm-arm/mach/serial_at91rm9200.h index 1290bb328..98f4b0cb8 100644 --- a/include/asm-arm/mach/serial_at91.h +++ b/include/asm-arm/mach/serial_at91rm9200.h @@ -1,5 +1,5 @@ /* - * linux/include/asm-arm/mach/serial_at91.h + * linux/include/asm-arm/mach/serial_at91rm9200.h * * Based on serial_sa1100.h by Nicolas Pitre * @@ -7,6 +7,7 @@ * * Low level machine dependent UART functions. */ +#include struct uart_port; @@ -14,7 +15,7 @@ struct uart_port; * This is a temporary structure for registering these * functions; it is intended to be discarded after boot. */ -struct at91_port_fns { +struct at91rm9200_port_fns { void (*set_mctrl)(struct uart_port *, u_int); u_int (*get_mctrl)(struct uart_port *); void (*enable_ms)(struct uart_port *); @@ -25,9 +26,11 @@ struct at91_port_fns { }; #if defined(CONFIG_SERIAL_AT91) -void at91_register_uart_fns(struct at91_port_fns *fns); +void at91_register_uart_fns(struct at91rm9200_port_fns *fns); +void at91_register_uart(int idx, int port); #else #define at91_register_uart_fns(fns) do { } while (0) +#define at91_register_uart(idx,port) do { } while (0) #endif diff --git a/include/asm-arm/mach/serial_sa1100.h b/include/asm-arm/mach/serial_sa1100.h index 20c22bb21..916201858 100644 --- a/include/asm-arm/mach/serial_sa1100.h +++ b/include/asm-arm/mach/serial_sa1100.h @@ -7,6 +7,7 @@ * * Low level machine dependent UART functions. */ +#include struct uart_port; struct uart_info; diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h index dee0bc336..96c6db7dd 100644 --- a/include/asm-arm/mach/time.h +++ b/include/asm-arm/mach/time.h @@ -50,7 +50,6 @@ struct sys_timer { #define DYN_TICK_ENABLED (1 << 1) struct dyn_tick_timer { - spinlock_t lock; unsigned int state; /* Current state */ int (*enable)(void); /* Enables dynamic tick */ int (*disable)(void); /* Disables dynamic tick */ @@ -69,7 +68,6 @@ extern void timer_tick(struct pt_regs *); /* * Kernel time keeping support. */ -struct timespec; extern int (*set_rtc)(void); extern void save_time_delta(struct timespec *delta, struct timespec *rtc); extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 91d536c21..209289407 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -2,7 +2,6 @@ * linux/include/asm-arm/memory.h * * Copyright (C) 2000-2002 Russell King - * modification for nommu, Hyok S. Choi, 2004 * * 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 @@ -23,12 +22,11 @@ #define UL(x) (x) #endif +#include #include #include #include -#ifdef CONFIG_MMU - #ifndef TASK_SIZE /* * TASK_SIZE - the maximum size of a user space task. @@ -50,65 +48,6 @@ #define PAGE_OFFSET UL(0xc0000000) #endif -/* - * The module space lives between the addresses given by TASK_SIZE - * and PAGE_OFFSET - it must be within 32MB of the kernel text. - */ -#define MODULE_END (PAGE_OFFSET) -#define MODULE_START (MODULE_END - 16*1048576) - -#if TASK_SIZE > MODULE_START -#error Top of user space clashes with start of module space -#endif - -/* - * The XIP kernel gets mapped at the bottom of the module vm area. - * Since we use sections to map it, this macro replaces the physical address - * with its virtual address while keeping offset from the base section. - */ -#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) - -/* - * Allow 16MB-aligned ioremap pages - */ -#define IOREMAP_MAX_ORDER 24 - -#else /* CONFIG_MMU */ - -/* - * The limitation of user task size can grow up to the end of free ram region. - * It is difficult to define and perhaps will never meet the original meaning - * of this define that was meant to. - * Fortunately, there is no reference for this in noMMU mode, for now. - */ -#ifndef TASK_SIZE -#define TASK_SIZE (CONFIG_DRAM_SIZE) -#endif - -#ifndef TASK_UNMAPPED_BASE -#define TASK_UNMAPPED_BASE UL(0x00000000) -#endif - -#ifndef PHYS_OFFSET -#define PHYS_OFFSET (CONFIG_DRAM_BASE) -#endif - -#ifndef END_MEM -#define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE) -#endif - -#ifndef PAGE_OFFSET -#define PAGE_OFFSET (PHYS_OFFSET) -#endif - -/* - * The module can be at any place in ram in nommu mode. - */ -#define MODULE_END (END_MEM) -#define MODULE_START (PHYS_OFFSET) - -#endif /* !CONFIG_MMU */ - /* * Size of DMA-consistent memory region. Must be multiple of 2M, * between 2MB and 14MB inclusive. @@ -133,6 +72,24 @@ #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) +/* + * The module space lives between the addresses given by TASK_SIZE + * and PAGE_OFFSET - it must be within 32MB of the kernel text. + */ +#define MODULE_END (PAGE_OFFSET) +#define MODULE_START (MODULE_END - 16*1048576) + +#if TASK_SIZE > MODULE_START +#error Top of user space clashes with start of module space +#endif + +/* + * The XIP kernel gets mapped at the bottom of the module vm area. + * Since we use sections to map it, this macro replaces the physical address + * with its virtual address while keeping offset from the base section. + */ +#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) + #ifndef __ASSEMBLY__ /* diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h index fe2a23b56..a457cb719 100644 --- a/include/asm-arm/mmu.h +++ b/include/asm-arm/mmu.h @@ -1,13 +1,10 @@ #ifndef __ARM_MMU_H #define __ARM_MMU_H -#ifdef CONFIG_MMU - typedef struct { #if __LINUX_ARM_ARCH__ >= 6 unsigned int id; #endif - unsigned int kvm_seq; } mm_context_t; #if __LINUX_ARM_ARCH__ >= 6 @@ -16,18 +13,4 @@ typedef struct { #define ASID(mm) (0) #endif -#else - -/* - * From nommu.h: - * Copyright (C) 2002, David McCullough - * modified for 2.6 by Hyok S. Choi - */ -typedef struct { - struct vm_list_struct *vmlist; - unsigned long end_brk; -} mm_context_t; - -#endif - #endif diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index d1a65b1ed..81c59face 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h @@ -17,8 +17,6 @@ #include #include -void __check_kvm_seq(struct mm_struct *mm); - #if __LINUX_ARM_ARCH__ >= 6 /* @@ -47,21 +45,13 @@ static inline void check_context(struct mm_struct *mm) { if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) __new_context(mm); - - if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) - __check_kvm_seq(mm); } #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) #else -static inline void check_context(struct mm_struct *mm) -{ - if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) - __check_kvm_seq(mm); -} - +#define check_context(mm) do { } while (0) #define init_new_context(tsk,mm) 0 #endif @@ -92,7 +82,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { -#ifdef CONFIG_MMU unsigned int cpu = smp_processor_id(); if (prev != next) { @@ -102,7 +91,6 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, if (cache_is_vivt()) cpu_clear(cpu, prev->cpu_vm_mask); } -#endif } #define deactivate_mm(tsk,mm) do { } while (0) diff --git a/include/asm-arm/page-nommu.h b/include/asm-arm/page-nommu.h deleted file mode 100644 index a1bcad060..000000000 --- a/include/asm-arm/page-nommu.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * linux/include/asm-arm/page-nommu.h - * - * Copyright (C) 2004 Hyok S. Choi - * - * 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. - */ -#ifndef _ASMARM_PAGE_NOMMU_H -#define _ASMARM_PAGE_NOMMU_H - -#if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13 -#define KTHREAD_SIZE (8192) -#else -#define KTHREAD_SIZE PAGE_SIZE -#endif - -#define get_user_page(vaddr) __get_free_page(GFP_KERNEL) -#define free_user_page(page, addr) free_page(addr) - -#define clear_page(page) memset((page), 0, PAGE_SIZE) -#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) - -#define clear_user_page(page, vaddr, pg) clear_page(page) -#define copy_user_page(to, from, vaddr, pg) copy_page(to, from) - -/* - * These are used to make use of C type-checking.. - */ -typedef unsigned long pte_t; -typedef unsigned long pmd_t; -typedef unsigned long pgd_t[2]; -typedef unsigned long pgprot_t; - -#define pte_val(x) (x) -#define pmd_val(x) (x) -#define pgd_val(x) ((x)[0]) -#define pgprot_val(x) (x) - -#define __pte(x) (x) -#define __pmd(x) (x) -#define __pgprot(x) (x) - -/* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) - -extern unsigned long memory_start; -extern unsigned long memory_end; - -#endif diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index b779c2017..dfa947585 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h @@ -10,25 +10,20 @@ #ifndef _ASMARM_PAGE_H #define _ASMARM_PAGE_H - -#ifdef __KERNEL__ +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + /* to align the pointer to the (next) page boundary */ #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) #ifndef __ASSEMBLY__ -#ifndef CONFIG_MMU - -#include "page-nommu.h" - -#else - #include /* @@ -177,8 +172,6 @@ typedef unsigned long pgprot_t; /* the upper-most page table pointer */ extern pmd_t *top_pmd; -#endif /* CONFIG_MMU */ - #include #endif /* !__ASSEMBLY__ */ @@ -193,10 +186,10 @@ extern pmd_t *top_pmd; #define ARCH_SLAB_MINALIGN 8 #endif -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include + #endif diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index f21abd4dd..ead3ced38 100644 --- a/include/asm-arm/pci.h +++ b/include/asm-arm/pci.h @@ -2,6 +2,7 @@ #define ASMARM_PCI_H #ifdef __KERNEL__ +#include #include #include /* for PCIBIOS_MIN_* */ diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h index 4d4394552..c4ac2e677 100644 --- a/include/asm-arm/pgalloc.h +++ b/include/asm-arm/pgalloc.h @@ -16,10 +16,6 @@ #include #include -#define check_pgt_cache() do { } while (0) - -#ifdef CONFIG_MMU - #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) @@ -36,6 +32,8 @@ extern void free_pgd_slow(pgd_t *pgd); #define pgd_alloc(mm) get_pgd_slow(mm) #define pgd_free(pgd) free_pgd_slow(pgd) +#define check_pgt_cache() do { } while (0) + /* * Allocate one PTE table. * @@ -128,6 +126,4 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); } -#endif /* CONFIG_MMU */ - #endif diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h index f3b5120c9..1bc1f997b 100644 --- a/include/asm-arm/pgtable-hwdef.h +++ b/include/asm-arm/pgtable-hwdef.h @@ -28,7 +28,6 @@ */ #define PMD_SECT_BUFFERABLE (1 << 2) #define PMD_SECT_CACHEABLE (1 << 3) -#define PMD_SECT_XN (1 << 4) /* v6 */ #define PMD_SECT_AP_WRITE (1 << 10) #define PMD_SECT_AP_READ (1 << 11) #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h deleted file mode 100644 index c1b264dff..000000000 --- a/include/asm-arm/pgtable-nommu.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * linux/include/asm-arm/pgtable-nommu.h - * - * Copyright (C) 1995-2002 Russell King - * Copyright (C) 2004 Hyok S. Choi - * - * 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. - */ -#ifndef _ASMARM_PGTABLE_NOMMU_H -#define _ASMARM_PGTABLE_NOMMU_H - -#ifndef __ASSEMBLY__ - -#include -#include -#include -#include - -/* - * Trivial page table functions. - */ -#define pgd_present(pgd) (1) -#define pgd_none(pgd) (0) -#define pgd_bad(pgd) (0) -#define pgd_clear(pgdp) -#define kern_addr_valid(addr) (1) -#define pmd_offset(a, b) ((void *)0) -/* FIXME */ -/* - * PMD_SHIFT determines the size of the area a second-level page table can map - * PGDIR_SHIFT determines what a third-level page table entry can map - */ -#define PGDIR_SHIFT 21 - -#define PGDIR_SIZE (1UL << PGDIR_SHIFT) -#define PGDIR_MASK (~(PGDIR_SIZE-1)) -/* FIXME */ - -#define PAGE_NONE __pgprot(0) -#define PAGE_SHARED __pgprot(0) -#define PAGE_COPY __pgprot(0) -#define PAGE_READONLY __pgprot(0) -#define PAGE_KERNEL __pgprot(0) - -//extern void paging_init(struct meminfo *, struct machine_desc *); -#define swapper_pg_dir ((pgd_t *) 0) - -#define __swp_type(x) (0) -#define __swp_offset(x) (0) -#define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) - - -typedef pte_t *pte_addr_t; - -static inline int pte_file(pte_t pte) { return 0; } - -/* - * ZERO_PAGE is a global shared page that is always zero: used - * for zero-mapped memory areas etc.. - */ -#define ZERO_PAGE(vaddr) (virt_to_page(0)) - -/* - * Mark the prot value as uncacheable and unbufferable. - */ -#define pgprot_noncached(prot) __pgprot(0) -#define pgprot_writecombine(prot) __pgprot(0) - - -/* - * These would be in other places but having them here reduces the diffs. - */ -extern unsigned int kobjsize(const void *objp); -extern int is_in_rom(unsigned long); - -/* - * No page table caches to initialise. - */ -#define pgtable_cache_init() do { } while (0) -#define io_remap_page_range remap_page_range -#define io_remap_pfn_range remap_pfn_range - -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - - -/* - * All 32bit addresses are effectively valid for vmalloc... - * Sort of meaningless for non-VM targets. - */ -#define VMALLOC_START 0 -#define VMALLOC_END 0xffffffff - -#define FIRST_USER_ADDRESS (0) - -#else - -/* - * dummy tlb and user structures. - */ -#define v3_tlb_fns (0) -#define v4_tlb_fns (0) -#define v4wb_tlb_fns (0) -#define v4wbi_tlb_fns (0) -#define v6_tlb_fns (0) - -#define v3_user_fns (0) -#define v4_user_fns (0) -#define v4_mc_user_fns (0) -#define v4wb_user_fns (0) -#define v4wt_user_fns (0) -#define v6_user_fns (0) -#define xscale_mc_user_fns (0) - -#endif /*__ASSEMBLY__*/ - -#endif /* _ASMARM_PGTABLE_H */ diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 8d3919c64..e85c08d78 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h @@ -11,15 +11,9 @@ #define _ASMARM_PGTABLE_H #include -#include - -#ifndef CONFIG_MMU - -#include "pgtable-nommu.h" - -#else #include +#include #include /* @@ -384,6 +378,4 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; #endif /* !__ASSEMBLY__ */ -#endif /* CONFIG_MMU */ - #endif /* _ASMARM_PGTABLE_H */ diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index 1bde92cda..106045edb 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ +#include /* * Work out if we need multiple CPU support @@ -165,8 +166,6 @@ #include -#ifdef CONFIG_MMU - #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) #define cpu_get_pgd() \ @@ -178,8 +177,6 @@ (pgd_t *)phys_to_virt(pg); \ }) -#endif - #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* __ASM_PROCFNS_H */ diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h index 91a31adfa..842526055 100644 --- a/include/asm-arm/procinfo.h +++ b/include/asm-arm/procinfo.h @@ -29,8 +29,7 @@ struct processor; struct proc_info_list { unsigned int cpu_val; unsigned int cpu_mask; - unsigned long __cpu_mm_mmu_flags; /* used by head.S */ - unsigned long __cpu_io_mmu_flags; /* used by head.S */ + unsigned long __cpu_mmu_flags; /* used by head.S */ unsigned long __cpu_flush; /* used by head.S */ const char *arch_name; const char *elf_name; @@ -55,6 +54,5 @@ extern unsigned int elf_hwcap; #define HWCAP_VFP 64 #define HWCAP_EDSP 128 #define HWCAP_JAVA 256 -#define HWCAP_IWMMXT 512 #endif diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 5a8ef787d..77adb7fa1 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h @@ -10,6 +10,7 @@ #ifndef __ASM_ARM_PTRACE_H #define __ASM_ARM_PTRACE_H +#include #define PTRACE_GETREGS 12 #define PTRACE_SETREGS 13 @@ -25,11 +26,6 @@ #define PTRACE_SET_SYSCALL 23 -/* PTRACE_SYSCALL is 24 */ - -#define PTRACE_GETCRUNCHREGS 25 -#define PTRACE_SETCRUNCHREGS 26 - /* * PSR bits */ diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index d0fb487ab..ced691619 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h @@ -82,6 +82,7 @@ typedef unsigned long sigset_t; * is running in 26-bit. * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_NODEFER prevents the current signal from being masked in the handler. * SA_RESETHAND clears the handler when the signal is delivered. * @@ -100,6 +101,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ /* @@ -111,6 +113,10 @@ typedef unsigned long sigset_t; #define MINSIGSTKSZ 2048 #define SIGSTKSZ 8192 +#ifdef __KERNEL__ +#define SA_TIMER 0x40000000 +#endif + #include #ifdef __KERNEL__ diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index f67acce38..fe45f7f61 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h @@ -10,6 +10,7 @@ #ifndef __ASM_ARM_SMP_H #define __ASM_ARM_SMP_H +#include #include #include #include diff --git a/include/asm-arm/socket.h b/include/asm-arm/socket.h index 19f7df702..3c51da643 100644 --- a/include/asm-arm/socket.h +++ b/include/asm-arm/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 01b7c26a3..406ca97a8 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -199,21 +199,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) : "cc"); } -static inline int __raw_read_trylock(raw_rwlock_t *rw) -{ - unsigned long tmp, tmp2 = 1; - - __asm__ __volatile__( -"1: ldrex %0, [%2]\n" -" adds %0, %0, #1\n" -" strexpl %1, %0, [%2]\n" - : "=&r" (tmp), "+r" (tmp2) - : "r" (&rw->lock) - : "cc"); - - smp_mb(); - return tmp2 == 0; -} +#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) /* read_can_lock - would read_trylock() succeed? */ #define __raw_read_can_lock(x) ((x)->lock < 0x80000000) diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 0947cbf9b..7c9568d30 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #define CPU_ARCH_UNKNOWN 0 #define CPU_ARCH_ARMv3 1 @@ -107,9 +108,6 @@ extern void __show_regs(struct pt_regs *); extern int cpu_architecture(void); extern void cpu_init(void); -void arm_machine_restart(char mode); -extern void (*arm_pm_restart)(char str); - /* * Intel's XScale3 core supports some v6 features (supersections, L2) * but advertises itself as v5 as it does not support the v6 ISA. For @@ -176,6 +174,7 @@ extern unsigned int user_debug; #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); /* diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index f28b23613..cfbccb63c 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h @@ -59,7 +59,6 @@ struct thread_info { struct cpu_context_save cpu_context; /* cpu context */ __u8 used_cp[16]; /* thread used copro */ unsigned long tp_value; - struct crunch_state crunchstate; union fp_state fpstate __attribute__((aligned(8))); union vfp_state vfpstate; struct restart_block restart_block; @@ -102,22 +101,16 @@ extern void free_thread_info(struct thread_info *); #define thread_saved_fp(tsk) \ ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) -extern void crunch_task_disable(struct thread_info *); -extern void crunch_task_copy(struct thread_info *, void *); -extern void crunch_task_restore(struct thread_info *, void *); -extern void crunch_task_release(struct thread_info *); - extern void iwmmxt_task_disable(struct thread_info *); extern void iwmmxt_task_copy(struct thread_info *, void *); extern void iwmmxt_task_restore(struct thread_info *, void *); extern void iwmmxt_task_release(struct thread_info *); -extern void iwmmxt_task_switch(struct thread_info *); #endif /* * We use bit 30 of the preempt_count to indicate that kernel - * preemption is occurring. See include/asm-arm/hardirq.h. + * preemption is occuring. See include/asm-arm/hardirq.h. */ #define PREEMPT_ACTIVE 0x40000000 diff --git a/include/asm-arm/thread_notify.h b/include/asm-arm/thread_notify.h deleted file mode 100644 index 8866e5216..000000000 --- a/include/asm-arm/thread_notify.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * linux/include/asm-arm/thread_notify.h - * - * Copyright (C) 2006 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. - */ -#ifndef ASMARM_THREAD_NOTIFY_H -#define ASMARM_THREAD_NOTIFY_H - -#ifdef __KERNEL__ - -#ifndef __ASSEMBLY__ - -#include -#include - -static inline int thread_register_notifier(struct notifier_block *n) -{ - extern struct atomic_notifier_head thread_notify_head; - return atomic_notifier_chain_register(&thread_notify_head, n); -} - -static inline void thread_unregister_notifier(struct notifier_block *n) -{ - extern struct atomic_notifier_head thread_notify_head; - atomic_notifier_chain_unregister(&thread_notify_head, n); -} - -static inline void thread_notify(unsigned long rc, struct thread_info *thread) -{ - extern struct atomic_notifier_head thread_notify_head; - atomic_notifier_call_chain(&thread_notify_head, rc, thread); -} - -#endif - -/* - * These are the reason codes for the thread notifier. - */ -#define THREAD_NOTIFY_FLUSH 0 -#define THREAD_NOTIFY_RELEASE 1 -#define THREAD_NOTIFY_SWITCH 2 - -#endif -#endif diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index d97fc7618..728992451 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h @@ -10,6 +10,7 @@ #ifndef _ASMARM_TLBFLUSH_H #define _ASMARM_TLBFLUSH_H +#include #ifndef CONFIG_MMU diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 87aba57a6..064f0f5e8 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h @@ -40,25 +40,16 @@ struct exception_table_entry extern int fixup_exception(struct pt_regs *regs); -/* - * These two are intentionally not defined anywhere - if the kernel - * code generates any references to them, that's a bug. - */ -extern int __get_user_bad(void); -extern int __put_user_bad(void); - /* * Note that this is actually 0x1,0000,0000 */ #define KERNEL_DS 0x00000000 -#define get_ds() (KERNEL_DS) - -#ifdef CONFIG_MMU - #define USER_DS TASK_SIZE + +#define get_ds() (KERNEL_DS) #define get_fs() (current_thread_info()->addr_limit) -static inline void set_fs(mm_segment_t fs) +static inline void set_fs (mm_segment_t fs) { current_thread_info()->addr_limit = fs; modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); @@ -84,6 +75,8 @@ static inline void set_fs(mm_segment_t fs) : "cc"); \ flag; }) +#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) + /* * Single-value transfer routines. They automatically use the right * size if we just have the right pointer type. Note that the functions @@ -94,10 +87,20 @@ static inline void set_fs(mm_segment_t fs) * fixup code, but there are a few places where it intrudes on the * main code path. When we only write to user space, there is no * problem. + * + * The "__xxx" versions of the user access functions do not verify the + * address space - it must have been done previously with a separate + * "access_ok()" call. + * + * The "xxx_error" versions set the third argument to EFAULT if an + * error occurs, and leave it unchanged on success. Note that these + * versions are void (ie, don't return a value as such). */ + extern int __get_user_1(void *); extern int __get_user_2(void *); extern int __get_user_4(void *); +extern int __get_user_bad(void); #define __get_user_x(__r2,__p,__e,__s,__i...) \ __asm__ __volatile__ ( \ @@ -128,74 +131,6 @@ extern int __get_user_4(void *); __e; \ }) -extern int __put_user_1(void *, unsigned int); -extern int __put_user_2(void *, unsigned int); -extern int __put_user_4(void *, unsigned int); -extern int __put_user_8(void *, unsigned long long); - -#define __put_user_x(__r2,__p,__e,__s) \ - __asm__ __volatile__ ( \ - __asmeq("%0", "r0") __asmeq("%2", "r2") \ - "bl __put_user_" #__s \ - : "=&r" (__e) \ - : "0" (__p), "r" (__r2) \ - : "ip", "lr", "cc") - -#define put_user(x,p) \ - ({ \ - const register typeof(*(p)) __r2 asm("r2") = (x); \ - const register typeof(*(p)) __user *__p asm("r0") = (p);\ - register int __e asm("r0"); \ - switch (sizeof(*(__p))) { \ - case 1: \ - __put_user_x(__r2, __p, __e, 1); \ - break; \ - case 2: \ - __put_user_x(__r2, __p, __e, 2); \ - break; \ - case 4: \ - __put_user_x(__r2, __p, __e, 4); \ - break; \ - case 8: \ - __put_user_x(__r2, __p, __e, 8); \ - break; \ - default: __e = __put_user_bad(); break; \ - } \ - __e; \ - }) - -#else /* CONFIG_MMU */ - -/* - * uClinux has only one addr space, so has simplified address limits. - */ -#define USER_DS KERNEL_DS - -#define segment_eq(a,b) (1) -#define __addr_ok(addr) (1) -#define __range_ok(addr,size) (0) -#define get_fs() (KERNEL_DS) - -static inline void set_fs(mm_segment_t fs) -{ -} - -#define get_user(x,p) __get_user(x,p) -#define put_user(x,p) __put_user(x,p) - -#endif /* CONFIG_MMU */ - -#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) - -/* - * The "__xxx" versions of the user access functions do not verify the - * address space - it must have been done previously with a separate - * "access_ok()" call. - * - * The "xxx_error" versions set the third argument to EFAULT if an - * error occurs, and leave it unchanged on success. Note that these - * versions are void (ie, don't return a value as such). - */ #define __get_user(x,ptr) \ ({ \ long __gu_err = 0; \ @@ -277,6 +212,43 @@ do { \ : "r" (addr), "i" (-EFAULT) \ : "cc") +extern int __put_user_1(void *, unsigned int); +extern int __put_user_2(void *, unsigned int); +extern int __put_user_4(void *, unsigned int); +extern int __put_user_8(void *, unsigned long long); +extern int __put_user_bad(void); + +#define __put_user_x(__r2,__p,__e,__s) \ + __asm__ __volatile__ ( \ + __asmeq("%0", "r0") __asmeq("%2", "r2") \ + "bl __put_user_" #__s \ + : "=&r" (__e) \ + : "0" (__p), "r" (__r2) \ + : "ip", "lr", "cc") + +#define put_user(x,p) \ + ({ \ + const register typeof(*(p)) __r2 asm("r2") = (x); \ + const register typeof(*(p)) __user *__p asm("r0") = (p);\ + register int __e asm("r0"); \ + switch (sizeof(*(__p))) { \ + case 1: \ + __put_user_x(__r2, __p, __e, 1); \ + break; \ + case 2: \ + __put_user_x(__r2, __p, __e, 2); \ + break; \ + case 4: \ + __put_user_x(__r2, __p, __e, 4); \ + break; \ + case 8: \ + __put_user_x(__r2, __p, __e, 8); \ + break; \ + default: __e = __put_user_bad(); break; \ + } \ + __e; \ + }) + #define __put_user(x,ptr) \ ({ \ long __pu_err = 0; \ @@ -381,54 +353,66 @@ do { \ : "r" (x), "i" (-EFAULT) \ : "cc") - -#ifdef CONFIG_MMU -extern unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n); -extern unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n); -extern unsigned long __clear_user(void __user *addr, unsigned long n); -#else -#define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0) -#define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0) -#define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0) -#endif - -extern unsigned long __strncpy_from_user(char *to, const char __user *from, unsigned long count); -extern unsigned long __strnlen_user(const char __user *s, long n); +extern unsigned long __arch_copy_from_user(void *to, const void __user *from, unsigned long n); +extern unsigned long __arch_copy_to_user(void __user *to, const void *from, unsigned long n); +extern unsigned long __arch_clear_user(void __user *addr, unsigned long n); +extern unsigned long __arch_strncpy_from_user(char *to, const char __user *from, unsigned long count); +extern unsigned long __arch_strnlen_user(const char __user *s, long n); static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) { if (access_ok(VERIFY_READ, from, n)) - n = __copy_from_user(to, from, n); + n = __arch_copy_from_user(to, from, n); else /* security hole - plug it */ memzero(to, n); return n; } +static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) +{ + return __arch_copy_from_user(to, from, n); +} + static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) { if (access_ok(VERIFY_WRITE, to, n)) - n = __copy_to_user(to, from, n); + n = __arch_copy_to_user(to, from, n); return n; } +static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) +{ + return __arch_copy_to_user(to, from, n); +} + #define __copy_to_user_inatomic __copy_to_user #define __copy_from_user_inatomic __copy_from_user -static inline unsigned long clear_user(void __user *to, unsigned long n) +static inline unsigned long clear_user (void __user *to, unsigned long n) { if (access_ok(VERIFY_WRITE, to, n)) - n = __clear_user(to, n); + n = __arch_clear_user(to, n); return n; } -static inline long strncpy_from_user(char *dst, const char __user *src, long count) +static inline unsigned long __clear_user (void __user *to, unsigned long n) +{ + return __arch_clear_user(to, n); +} + +static inline long strncpy_from_user (char *dst, const char __user *src, long count) { long res = -EFAULT; if (access_ok(VERIFY_READ, src, 1)) - res = __strncpy_from_user(dst, src, count); + res = __arch_strncpy_from_user(dst, src, count); return res; } +static inline long __strncpy_from_user (char *dst, const char __user *src, long count) +{ + return __arch_strncpy_from_user(dst, src, count); +} + #define strlen_user(s) strnlen_user(s, ~0UL >> 1) static inline long strnlen_user(const char __user *s, long n) @@ -436,7 +420,7 @@ static inline long strnlen_user(const char __user *s, long n) unsigned long res = 0; if (__addr_ok(s)) - res = __strnlen_user(s, n); + res = __arch_strnlen_user(s, n); return res; } diff --git a/include/asm-arm/ucontext.h b/include/asm-arm/ucontext.h index bf65e9f45..f85313013 100644 --- a/include/asm-arm/ucontext.h +++ b/include/asm-arm/ucontext.h @@ -1,103 +1,12 @@ #ifndef _ASMARM_UCONTEXT_H #define _ASMARM_UCONTEXT_H -#include - -/* - * struct sigcontext only has room for the basic registers, but struct - * ucontext now has room for all registers which need to be saved and - * restored. Coprocessor registers are stored in uc_regspace. Each - * coprocessor's saved state should start with a documented 32-bit magic - * number, followed by a 32-bit word giving the coproccesor's saved size. - * uc_regspace may be expanded if necessary, although this takes some - * coordination with glibc. - */ - struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; - sigset_t uc_sigmask; - /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ - int __unused[32 - (sizeof (sigset_t) / sizeof (int))]; - /* Last for extensibility. Eight byte aligned because some - coprocessors require eight byte alignment. */ - unsigned long uc_regspace[128] __attribute__((__aligned__(8))); + sigset_t uc_sigmask; /* mask last for extensibility */ }; -#ifdef __KERNEL__ - -/* - * Coprocessor save state. The magic values and specific - * coprocessor's layouts are part of the userspace ABI. Each one of - * these should be a multiple of eight bytes and aligned to eight - * bytes, to prevent unpredictable padding in the signal frame. - */ - -#ifdef CONFIG_CRUNCH -#define CRUNCH_MAGIC 0x5065cf03 -#define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8) - -struct crunch_sigframe { - unsigned long magic; - unsigned long size; - struct crunch_state storage; -} __attribute__((__aligned__(8))); -#endif - -#ifdef CONFIG_IWMMXT -/* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ -#define IWMMXT_MAGIC 0x12ef842a -#define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) - -struct iwmmxt_sigframe { - unsigned long magic; - unsigned long size; - struct iwmmxt_struct storage; -} __attribute__((__aligned__(8))); -#endif /* CONFIG_IWMMXT */ - -#ifdef CONFIG_VFP -#if __LINUX_ARM_ARCH__ < 6 -/* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra - * word after the registers, and a word of padding at the end for - * alignment. */ -#define VFP_MAGIC 0x56465001 -#define VFP_STORAGE_SIZE 152 -#else -#define VFP_MAGIC 0x56465002 -#define VFP_STORAGE_SIZE 144 -#endif - -struct vfp_sigframe -{ - unsigned long magic; - unsigned long size; - union vfp_state storage; -}; -#endif /* CONFIG_VFP */ - -/* - * Auxiliary signal frame. This saves stuff like FP state. - * The layout of this structure is not part of the user ABI, - * because the config options aren't. uc_regspace is really - * one of these. - */ -struct aux_sigframe { -#ifdef CONFIG_CRUNCH - struct crunch_sigframe crunch; -#endif -#ifdef CONFIG_IWMMXT - struct iwmmxt_sigframe iwmmxt; -#endif -#if 0 && defined CONFIG_VFP /* Not yet saved. */ - struct vfp_sigframe vfp; -#endif - /* Something that isn't a valid magic number for any coprocessor. */ - unsigned long end_magic; -} __attribute__((__aligned__(8))); - -#endif - #endif /* !_ASMARM_UCONTEXT_H */ diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 188e24be7..cbf39a56d 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h @@ -13,6 +13,8 @@ #ifndef __ASM_ARM_UNISTD_H #define __ASM_ARM_UNISTD_H +#include + #define __NR_OABI_SYSCALL_BASE 0x900000 #if defined(__thumb__) || defined(__ARM_EABI__) @@ -347,19 +349,6 @@ #define __NR_mbind (__NR_SYSCALL_BASE+319) #define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) #define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) -#define __NR_openat (__NR_SYSCALL_BASE+322) -#define __NR_mkdirat (__NR_SYSCALL_BASE+323) -#define __NR_mknodat (__NR_SYSCALL_BASE+324) -#define __NR_fchownat (__NR_SYSCALL_BASE+325) -#define __NR_futimesat (__NR_SYSCALL_BASE+326) -#define __NR_fstatat64 (__NR_SYSCALL_BASE+327) -#define __NR_unlinkat (__NR_SYSCALL_BASE+328) -#define __NR_renameat (__NR_SYSCALL_BASE+329) -#define __NR_linkat (__NR_SYSCALL_BASE+330) -#define __NR_symlinkat (__NR_SYSCALL_BASE+331) -#define __NR_readlinkat (__NR_SYSCALL_BASE+332) -#define __NR_fchmodat (__NR_SYSCALL_BASE+333) -#define __NR_faccessat (__NR_SYSCALL_BASE+334) /* * The following SWIs are ARM private. @@ -389,9 +378,6 @@ #undef __NR_ipc #endif -#ifdef __KERNEL__ -#include - #define __sys2(x) #x #define __sys1(x) __sys2(x) @@ -540,6 +526,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_GETHOSTNAME @@ -560,6 +547,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_SOCKETCALL #endif +#endif #ifdef __KERNEL_SYSCALLS__ @@ -583,7 +571,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -593,5 +581,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* __ASM_ARM_UNISTD_H */ diff --git a/include/asm-arm/vga.h b/include/asm-arm/vga.h index 1e0b913c3..926e5ee12 100644 --- a/include/asm-arm/vga.h +++ b/include/asm-arm/vga.h @@ -4,7 +4,7 @@ #include #include -#define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x)) +#define VGA_MAP_MEM(x) (PCIMEM_BASE + (x)) #define vga_readb(x) (*((volatile unsigned char *)x)) #define vga_writeb(x,y) (*((volatile unsigned char *)y) = (x)) diff --git a/include/asm-arm26/atomic.h b/include/asm-arm26/atomic.h index 97e944fe1..1552c8653 100644 --- a/include/asm-arm26/atomic.h +++ b/include/asm-arm26/atomic.h @@ -20,6 +20,7 @@ #ifndef __ASM_ARM_ATOMIC_H #define __ASM_ARM_ATOMIC_H +#include #ifdef CONFIG_SMP #error SMP is NOT supported diff --git a/include/asm-arm26/bug.h b/include/asm-arm26/bug.h index 8545d58b0..7177c7399 100644 --- a/include/asm-arm26/bug.h +++ b/include/asm-arm26/bug.h @@ -1,6 +1,7 @@ #ifndef _ASMARM_BUG_H #define _ASMARM_BUG_H +#include #ifdef CONFIG_BUG #ifdef CONFIG_DEBUG_BUGVERBOSE diff --git a/include/asm-arm26/dma.h b/include/asm-arm26/dma.h index 4326ba85e..995e223e4 100644 --- a/include/asm-arm26/dma.h +++ b/include/asm-arm26/dma.h @@ -3,6 +3,7 @@ typedef unsigned int dmach_t; +#include #include #include #include diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h index efb732165..9e090ad7e 100644 --- a/include/asm-arm26/floppy.h +++ b/include/asm-arm26/floppy.h @@ -22,7 +22,7 @@ #define fd_inb(port) inb((port)) #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ - IRQF_DISABLED,"floppy",NULL) + SA_INTERRUPT|SA_SAMPLE_RANDOM,"floppy",NULL) #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h index e717742ff..87c19d2bb 100644 --- a/include/asm-arm26/hardirq.h +++ b/include/asm-arm26/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-arm26/hardware.h b/include/asm-arm26/hardware.h index 801df0bde..82fc55e2a 100644 --- a/include/asm-arm26/hardware.h +++ b/include/asm-arm26/hardware.h @@ -16,6 +16,7 @@ #ifndef __ASM_HARDWARE_H #define __ASM_HARDWARE_H +#include /* diff --git a/include/asm-arm26/io.h b/include/asm-arm26/io.h index 2aa033bd0..02f94d88a 100644 --- a/include/asm-arm26/io.h +++ b/include/asm-arm26/io.h @@ -22,6 +22,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h index 9aaac87ef..06bd5a543 100644 --- a/include/asm-arm26/irq.h +++ b/include/asm-arm26/irq.h @@ -44,5 +44,9 @@ extern void enable_irq(unsigned int); int set_irq_type(unsigned int irq, unsigned int type); +int setup_irq(unsigned int, struct irqaction *); +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif diff --git a/include/asm-arm26/leds.h b/include/asm-arm26/leds.h index 12290ea55..88ce4124f 100644 --- a/include/asm-arm26/leds.h +++ b/include/asm-arm26/leds.h @@ -13,6 +13,7 @@ #ifndef ASM_ARM_LEDS_H #define ASM_ARM_LEDS_H +#include typedef enum { led_idle_start, diff --git a/include/asm-arm26/mach-types.h b/include/asm-arm26/mach-types.h index 0aeaedcba..b34045b78 100644 --- a/include/asm-arm26/mach-types.h +++ b/include/asm-arm26/mach-types.h @@ -6,6 +6,7 @@ #ifndef __ASM_ARM_MACH_TYPE_H #define __ASM_ARM_MACH_TYPE_H +#include #ifndef __ASSEMBLY__ extern unsigned int __machine_arch_type; diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h index 41dacdda7..b0d9605c8 100644 --- a/include/asm-arm26/page.h +++ b/include/asm-arm26/page.h @@ -1,6 +1,7 @@ #ifndef _ASMARM_PAGE_H #define _ASMARM_PAGE_H +#include #ifdef __KERNEL__ #ifndef __ASSEMBLY__ diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 19ac9101a..a59025027 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h @@ -13,6 +13,7 @@ #include +#include #include /* diff --git a/include/asm-arm26/serial.h b/include/asm-arm26/serial.h index dd86a716c..5fc747d1b 100644 --- a/include/asm-arm26/serial.h +++ b/include/asm-arm26/serial.h @@ -14,6 +14,7 @@ #ifndef __ASM_SERIAL_H #define __ASM_SERIAL_H +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h index 967ba4947..37ad25355 100644 --- a/include/asm-arm26/signal.h +++ b/include/asm-arm26/signal.h @@ -82,6 +82,7 @@ typedef unsigned long sigset_t; * is running in 26-bit. * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_NODEFER prevents the current signal from being masked in the handler. * SA_RESETHAND clears the handler when the signal is delivered. * @@ -100,6 +101,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ /* diff --git a/include/asm-arm26/smp.h b/include/asm-arm26/smp.h index 38349ec8b..5ca771631 100644 --- a/include/asm-arm26/smp.h +++ b/include/asm-arm26/smp.h @@ -1,6 +1,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #ifdef CONFIG_SMP #error SMP not supported diff --git a/include/asm-arm26/socket.h b/include/asm-arm26/socket.h index 19f7df702..3c51da643 100644 --- a/include/asm-arm26/socket.h +++ b/include/asm-arm26/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-arm26/sysirq.h b/include/asm-arm26/sysirq.h index 81dca90d9..cad250c7b 100644 --- a/include/asm-arm26/sysirq.h +++ b/include/asm-arm26/sysirq.h @@ -11,6 +11,7 @@ * 04-04-1998 PJB Merged arc and a5k versions */ +#include #if defined(CONFIG_ARCH_A5K) #define IRQ_PRINTER 0 diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index 00ae32aa1..702884926 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include /* * This is used to ensure the compiler did actually allocate the register we @@ -90,6 +91,7 @@ extern unsigned int user_debug; #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* * We assume knowledge of how diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h index 3138cef69..d296fb507 100644 --- a/include/asm-arm26/unistd.h +++ b/include/asm-arm26/unistd.h @@ -14,6 +14,8 @@ #ifndef __ASM_ARM_UNISTD_H #define __ASM_ARM_UNISTD_H +#include + #define __NR_SYSCALL_BASE 0x900000 /* @@ -312,9 +314,6 @@ #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) #define __ARM_NR_usr26 (__ARM_NR_BASE+3) -#ifdef __KERNEL__ -#include - #define __sys2(x) #x #define __sys1(x) __sys2(x) @@ -446,6 +445,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_STAT64 @@ -464,6 +464,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -487,7 +488,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -497,5 +498,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* __ASM_ARM_UNISTD_H */ diff --git a/include/asm-cris/Kbuild b/include/asm-cris/Kbuild deleted file mode 100644 index 14498d5a2..000000000 --- a/include/asm-cris/Kbuild +++ /dev/null @@ -1,5 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += arch-v10/ arch-v32/ - -unifdef-y += rs485.h diff --git a/include/asm-cris/arch-v10/Kbuild b/include/asm-cris/arch-v10/Kbuild deleted file mode 100644 index d7f27dc09..000000000 --- a/include/asm-cris/arch-v10/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -header-y += ptrace.h -header-y += user.h diff --git a/include/asm-cris/arch-v10/io.h b/include/asm-cris/arch-v10/io.h index 11ef5b53d..dd39198ec 100644 --- a/include/asm-cris/arch-v10/io.h +++ b/include/asm-cris/arch-v10/io.h @@ -2,6 +2,7 @@ #define _ASM_ARCH_CRIS_IO_H #include +#include /* Etrax shadow registers - which live in arch/cris/kernel/shadows.c */ diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h index b1128a998..4fa8945b0 100644 --- a/include/asm-cris/arch-v10/irq.h +++ b/include/asm-cris/arch-v10/irq.h @@ -141,7 +141,7 @@ __asm__ ( \ * it here, we would not get the multiple_irq at all. * * The non-blocking here is based on the knowledge that the timer interrupt is - * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not + * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not * be an sti() before the timer irq handler is run to acknowledge the interrupt. */ diff --git a/include/asm-cris/arch-v10/page.h b/include/asm-cris/arch-v10/page.h index 7d8307aed..407e6e68f 100644 --- a/include/asm-cris/arch-v10/page.h +++ b/include/asm-cris/arch-v10/page.h @@ -1,6 +1,7 @@ #ifndef _CRIS_ARCH_PAGE_H #define _CRIS_ARCH_PAGE_H +#include #ifdef __KERNEL__ diff --git a/include/asm-cris/arch-v10/system.h b/include/asm-cris/arch-v10/system.h index 4a9cd36c9..1ac7b639b 100644 --- a/include/asm-cris/arch-v10/system.h +++ b/include/asm-cris/arch-v10/system.h @@ -1,6 +1,7 @@ #ifndef __ASM_CRIS_ARCH_SYSTEM_H #define __ASM_CRIS_ARCH_SYSTEM_H +#include /* read the CPU version register */ diff --git a/include/asm-cris/arch-v32/Kbuild b/include/asm-cris/arch-v32/Kbuild deleted file mode 100644 index d7f27dc09..000000000 --- a/include/asm-cris/arch-v32/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -header-y += ptrace.h -header-y += user.h diff --git a/include/asm-cris/arch-v32/arbiter.h b/include/asm-cris/arch-v32/arbiter.h index 081a911d7..dba3c285c 100644 --- a/include/asm-cris/arch-v32/arbiter.h +++ b/include/asm-cris/arch-v32/arbiter.h @@ -20,8 +20,8 @@ enum arbiter_all_accesses = 0xff }; -int crisv32_arbiter_allocate_bandwidth(int client, int region, - unsigned long bandwidth); +int crisv32_arbiter_allocate_bandwith(int client, int region, + unsigned long bandwidth); int crisv32_arbiter_watch(unsigned long start, unsigned long size, unsigned long clients, unsigned long accesses, watch_callback* cb); diff --git a/include/asm-cris/arch-v32/io.h b/include/asm-cris/arch-v32/io.h index 5efe4d949..043c9ce52 100644 --- a/include/asm-cris/arch-v32/io.h +++ b/include/asm-cris/arch-v32/io.h @@ -4,6 +4,7 @@ #include #include #include +#include enum crisv32_io_dir { diff --git a/include/asm-cris/arch-v32/irq.h b/include/asm-cris/arch-v32/irq.h index bac94ee6b..d35aa8174 100644 --- a/include/asm-cris/arch-v32/irq.h +++ b/include/asm-cris/arch-v32/irq.h @@ -1,6 +1,7 @@ #ifndef _ASM_ARCH_IRQ_H #define _ASM_ARCH_IRQ_H +#include #include "hwregs/intr_vect.h" /* Number of non-cpu interrupts. */ @@ -98,7 +99,7 @@ __asm__ ( \ * if we had BLOCK'edit here, we would not get the multiple_irq at all. * * The non-blocking here is based on the knowledge that the timer interrupt is - * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not + * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not * be an sti() before the timer irq handler is run to acknowledge the interrupt. */ #define BUILD_TIMER_IRQ(nr, mask) \ diff --git a/include/asm-cris/arch-v32/page.h b/include/asm-cris/arch-v32/page.h index fa454fe12..77827bc17 100644 --- a/include/asm-cris/arch-v32/page.h +++ b/include/asm-cris/arch-v32/page.h @@ -1,6 +1,7 @@ #ifndef _ASM_CRIS_ARCH_PAGE_H #define _ASM_CRIS_ARCH_PAGE_H +#include #ifdef __KERNEL__ diff --git a/include/asm-cris/arch-v32/processor.h b/include/asm-cris/arch-v32/processor.h index 5553b0cd0..32bf2e538 100644 --- a/include/asm-cris/arch-v32/processor.h +++ b/include/asm-cris/arch-v32/processor.h @@ -1,6 +1,7 @@ #ifndef _ASM_CRIS_ARCH_PROCESSOR_H #define _ASM_CRIS_ARCH_PROCESSOR_H +#include /* Return current instruction pointer. */ #define current_text_addr() \ diff --git a/include/asm-cris/arch-v32/system.h b/include/asm-cris/arch-v32/system.h index d20e2d6d6..a3d75d581 100644 --- a/include/asm-cris/arch-v32/system.h +++ b/include/asm-cris/arch-v32/system.h @@ -1,6 +1,7 @@ #ifndef _ASM_CRIS_ARCH_SYSTEM_H #define _ASM_CRIS_ARCH_SYSTEM_H +#include /* Read the CPU version register. */ static inline unsigned long rdvr(void) diff --git a/include/asm-cris/byteorder.h b/include/asm-cris/byteorder.h index 0cd9db1cc..a1a222ada 100644 --- a/include/asm-cris/byteorder.h +++ b/include/asm-cris/byteorder.h @@ -3,15 +3,14 @@ #ifdef __GNUC__ -#ifdef __KERNEL__ #include /* defines are necessary because the other files detect the presence * of a defined __arch_swab32, not an inline */ + #define __arch__swab32(x) ___arch__swab32(x) #define __arch__swab16(x) ___arch__swab16(x) -#endif /* __KERNEL__ */ #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) # define __BYTEORDER_HAS_U64__ diff --git a/include/asm-cris/elf.h b/include/asm-cris/elf.h index 96a40c1de..87a60bd8e 100644 --- a/include/asm-cris/elf.h +++ b/include/asm-cris/elf.h @@ -5,6 +5,7 @@ * ELF register definitions.. */ +#include #include #define R_CRIS_NONE 0 @@ -45,9 +46,6 @@ typedef unsigned long elf_fpregset_t; #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_CRIS -#ifdef __KERNEL__ -#include - /* The master for these definitions is {binutils}/include/elf/cris.h: */ /* User symbols in this file have a leading underscore. */ #define EF_CRIS_UNDERSCORE 0x00000001 @@ -89,8 +87,8 @@ typedef unsigned long elf_fpregset_t; #define ELF_PLATFORM (NULL) +#ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) - -#endif /* __KERNEL__ */ +#endif #endif diff --git a/include/asm-cris/eshlibld.h b/include/asm-cris/eshlibld.h index 10ce36cf7..2b577cde1 100644 --- a/include/asm-cris/eshlibld.h +++ b/include/asm-cris/eshlibld.h @@ -32,6 +32,7 @@ /* We have dependencies all over the place for the host system for xsim being a linux system, so let's not pretend anything else with #ifdef:s here until fixed. */ +#include #include /* Maybe do sanity checking if file input. */ diff --git a/include/asm-cris/etraxgpio.h b/include/asm-cris/etraxgpio.h index 5d0028dba..80ee10f70 100644 --- a/include/asm-cris/etraxgpio.h +++ b/include/asm-cris/etraxgpio.h @@ -25,6 +25,7 @@ #ifndef _ASM_ETRAXGPIO_H #define _ASM_ETRAXGPIO_H +#include /* etraxgpio _IOC_TYPE, bits 8 to 15 in ioctl cmd */ #ifdef CONFIG_ETRAX_ARCH_V10 #define ETRAXGPIO_IOCTYPE 43 diff --git a/include/asm-cris/fasttimer.h b/include/asm-cris/fasttimer.h index a3a77132c..69522028b 100644 --- a/include/asm-cris/fasttimer.h +++ b/include/asm-cris/fasttimer.h @@ -5,6 +5,7 @@ * This may be useful in other OS than Linux so use 2 space indentation... * Copyright (C) 2000, 2002 Axis Communications AB */ +#include #include /* struct timeval */ #include diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h index 298066020..341536a23 100644 --- a/include/asm-cris/hw_irq.h +++ b/include/asm-cris/hw_irq.h @@ -1,5 +1,7 @@ #ifndef _ASM_HW_IRQ_H #define _ASM_HW_IRQ_H +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} + #endif diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h index 998cce9f3..4b3387922 100644 --- a/include/asm-cris/irq.h +++ b/include/asm-cris/irq.h @@ -1,6 +1,11 @@ #ifndef _ASM_IRQ_H #define _ASM_IRQ_H +/* + * IRQ line status macro IRQ_PER_CPU is used + */ +#define ARCH_HAS_IRQ_PER_CPU + #include static inline int irq_canonicalize(int irq) diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index d50197df9..4053ad41a 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h @@ -1,8 +1,7 @@ #ifndef _CRIS_PAGE_H #define _CRIS_PAGE_H -#ifdef __KERNEL__ - +#include #include /* PAGE_SHIFT determines the page size */ @@ -14,6 +13,8 @@ #endif #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) @@ -73,12 +74,12 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include +#include + #endif /* _CRIS_PAGE_H */ diff --git a/include/asm-cris/pci.h b/include/asm-cris/pci.h index b2ac8a331..2064bc1de 100644 --- a/include/asm-cris/pci.h +++ b/include/asm-cris/pci.h @@ -1,6 +1,7 @@ #ifndef __ASM_CRIS_PCI_H #define __ASM_CRIS_PCI_H +#include #ifdef __KERNEL__ #include /* for struct page */ diff --git a/include/asm-cris/pgtable.h b/include/asm-cris/pgtable.h index 5d76c1c0d..70a832514 100644 --- a/include/asm-cris/pgtable.h +++ b/include/asm-cris/pgtable.h @@ -9,6 +9,7 @@ #include #ifndef __ASSEMBLY__ +#include #include #include #endif diff --git a/include/asm-cris/posix_types.h b/include/asm-cris/posix_types.h index 7b9ed22ab..6d26fee4a 100644 --- a/include/asm-cris/posix_types.h +++ b/include/asm-cris/posix_types.h @@ -6,6 +6,8 @@ #ifndef __ARCH_CRIS_POSIX_TYPES_H #define __ARCH_CRIS_POSIX_TYPES_H +#include + /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot @@ -51,8 +53,9 @@ typedef struct { #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ } __kernel_fsid_t; -#ifdef __KERNEL__ -#include +/* should this ifdef be here ? */ + +#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) #undef __FD_SET #define __FD_SET(fd,fdsetp) set_bit(fd, (void *)(fdsetp)) @@ -66,6 +69,6 @@ typedef struct { #undef __FD_ZERO #define __FD_ZERO(fdsetp) memset((void *)(fdsetp), 0, __FDSET_LONGS << 2) -#endif /* __KERNEL__ */ +#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ #endif /* __ARCH_CRIS_POSIX_TYPES_H */ diff --git a/include/asm-cris/processor.h b/include/asm-cris/processor.h index 568da1dec..961e2bcea 100644 --- a/include/asm-cris/processor.h +++ b/include/asm-cris/processor.h @@ -10,6 +10,7 @@ #ifndef __ASM_CRIS_PROCESSOR_H #define __ASM_CRIS_PROCESSOR_H +#include #include #include #include diff --git a/include/asm-cris/rtc.h b/include/asm-cris/rtc.h index cb4bf9217..97c130398 100644 --- a/include/asm-cris/rtc.h +++ b/include/asm-cris/rtc.h @@ -4,6 +4,7 @@ #define __RTC_H__ +#include #ifdef CONFIG_ETRAX_DS1302 /* Dallas DS1302 clock/calendar register numbers. */ diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h index 349ae682b..dfe039593 100644 --- a/include/asm-cris/signal.h +++ b/include/asm-cris/signal.h @@ -74,6 +74,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -94,6 +95,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-cris/socket.h b/include/asm-cris/socket.h index 01cfdf1d6..8b1da3e58 100644 --- a/include/asm-cris/socket.h +++ b/include/asm-cris/socket.h @@ -50,7 +50,6 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161..b1c593b6d 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h @@ -17,6 +17,7 @@ extern struct task_struct *resume(struct task_struct *prev, struct task_struct * #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-cris/tlbflush.h b/include/asm-cris/tlbflush.h index 056961247..c52238005 100644 --- a/include/asm-cris/tlbflush.h +++ b/include/asm-cris/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _CRIS_TLBFLUSH_H #define _CRIS_TLBFLUSH_H +#include #include #include #include diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index 7372efae0..bb2dfe480 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h @@ -1,6 +1,8 @@ #ifndef _ASM_CRIS_UNISTD_H_ #define _ASM_CRIS_UNISTD_H_ +#include + /* * This file contains the system call numbers, and stub macros for libc. */ @@ -293,12 +295,11 @@ #define __NR_request_key 287 #define __NR_keyctl 288 -#ifdef __KERNEL__ - #define NR_syscalls 289 -#include + +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -321,6 +322,7 @@ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -377,10 +379,12 @@ asmlinkage long sys_rt_sigaction(int sig, * complaints. We don't want to use -fno-builtin, so just use a * different name when in the kernel. */ +#ifdef __KERNEL__ #define _exit kernel_syscall_exit +#endif static inline _syscall1(int,_exit,int,exitcode) static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* @@ -391,5 +395,4 @@ static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_CRIS_UNISTD_H_ */ diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-frv/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 066386ac2..5d9f84bfd 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h @@ -14,6 +14,7 @@ #ifndef _ASM_ATOMIC_H #define _ASM_ATOMIC_H +#include #include #include @@ -227,7 +228,7 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig break; \ \ default: \ - __xg_orig = (__typeof__(__xg_orig))0; \ + __xg_orig = 0; \ asm volatile("break"); \ break; \ } \ @@ -247,7 +248,7 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); switch (sizeof(__xg_orig)) { \ case 4: __xg_orig = (__typeof__(*(ptr))) __xchg_32((uint32_t) x, __xg_ptr); break; \ default: \ - __xg_orig = (__typeof__(__xg_orig))0; \ + __xg_orig = 0; \ asm volatile("break"); \ break; \ } \ diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h index 980ae1b0c..6344d0639 100644 --- a/include/asm-frv/bitops.h +++ b/include/asm-frv/bitops.h @@ -14,6 +14,7 @@ #ifndef _ASM_BITOPS_H #define _ASM_BITOPS_H +#include #include #include #include diff --git a/include/asm-frv/bug.h b/include/asm-frv/bug.h index 6b1b44d71..451712cc3 100644 --- a/include/asm-frv/bug.h +++ b/include/asm-frv/bug.h @@ -11,6 +11,7 @@ #ifndef _ASM_BUG_H #define _ASM_BUG_H +#include #include #ifdef CONFIG_BUG diff --git a/include/asm-frv/cache.h b/include/asm-frv/cache.h index 2797163b8..cf69b6373 100644 --- a/include/asm-frv/cache.h +++ b/include/asm-frv/cache.h @@ -12,6 +12,7 @@ #ifndef __ASM_CACHE_H #define __ASM_CACHE_H +#include /* bytes per L1 cache line */ #define L1_CACHE_SHIFT (CONFIG_FRV_L1_CACHE_SHIFT) diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h index 42bf0db22..10236f680 100644 --- a/include/asm-frv/checksum.h +++ b/include/asm-frv/checksum.h @@ -43,7 +43,7 @@ unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ -extern unsigned int csum_partial_copy_from_user(const char __user *src, char *dst, +extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *csum_err); #define csum_partial_copy_nocheck(src, dst, len, sum) \ diff --git a/include/asm-frv/dma.h b/include/asm-frv/dma.h index 18d6bb8f8..d8f9a2f21 100644 --- a/include/asm-frv/dma.h +++ b/include/asm-frv/dma.h @@ -14,6 +14,7 @@ //#define DMA_DEBUG 1 +#include #include #undef MAX_DMA_CHANNELS /* don't use kernel/dma.c */ diff --git a/include/asm-frv/elf.h b/include/asm-frv/elf.h index 7df58a3e6..7d2098f04 100644 --- a/include/asm-frv/elf.h +++ b/include/asm-frv/elf.h @@ -12,6 +12,7 @@ #ifndef __ASM_ELF_H #define __ASM_ELF_H +#include #include #include @@ -64,7 +65,7 @@ typedef unsigned long elf_greg_t; #define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -typedef struct user_fpmedia_regs elf_fpregset_t; +typedef struct fpmedia_struct elf_fpregset_t; /* * This is used to ensure we don't load something for the wrong architecture. @@ -116,7 +117,6 @@ do { \ } while(0) #define USE_ELF_CORE_DUMP -#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC #define ELF_EXEC_PAGESIZE 16384 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical @@ -126,6 +126,9 @@ do { \ #define ELF_ET_DYN_BASE 0x08000000UL +#define ELF_CORE_COPY_REGS(pr_reg, regs) \ + memcpy(&pr_reg[0], ®s->sp, 31 * sizeof(uint32_t)); + /* This yields a mask that user programs can use to figure out what instruction set this cpu supports. */ diff --git a/include/asm-frv/fpu.h b/include/asm-frv/fpu.h index d73c60b56..b1178f8ca 100644 --- a/include/asm-frv/fpu.h +++ b/include/asm-frv/fpu.h @@ -1,6 +1,7 @@ #ifndef __ASM_FPU_H #define __ASM_FPU_H +#include /* * MAX floating point unit state size (FSAVE/FRESTORE) diff --git a/include/asm-frv/gdb-stub.h b/include/asm-frv/gdb-stub.h index 24f973867..c58479a4b 100644 --- a/include/asm-frv/gdb-stub.h +++ b/include/asm-frv/gdb-stub.h @@ -89,7 +89,6 @@ extern void gdbstub_do_rx(void); extern asmlinkage void __debug_stub_init_break(void); extern asmlinkage void __break_hijack_kernel_event(void); -extern asmlinkage void __break_hijack_kernel_event_breaks_here(void); extern asmlinkage void start_kernel(void); extern asmlinkage void gdbstub_rx_handler(void); @@ -115,26 +114,5 @@ extern void console_set_baud(unsigned baud); #define gdbstub_proto(FMT,...) ({ 0; }) #endif -/* - * we dedicate GR31 to keeping a pointer to the gdbstub exception frame - * - gr31 is destroyed on entry to the gdbstub if !MMU - * - gr31 is saved in scr3 on entry to the gdbstub if in !MMU - */ -register struct frv_frame0 *__debug_frame0 asm("gr31"); - -#define __debug_frame (&__debug_frame0->regs) -#define __debug_user_context (&__debug_frame0->uc) -#define __debug_regs (&__debug_frame0->debug) -#define __debug_reg(X) ((unsigned long *) ((unsigned long) &__debug_frame0 + (X))) - -struct frv_debug_status { - unsigned long bpsr; - unsigned long dcr; - unsigned long brr; - unsigned long nmar; -}; - -extern struct frv_debug_status __debug_status; - #endif /* _LANGUAGE_ASSEMBLY */ #endif /* __ASM_GDB_STUB_H */ diff --git a/include/asm-frv/hardirq.h b/include/asm-frv/hardirq.h index 7581b5a75..685123981 100644 --- a/include/asm-frv/hardirq.h +++ b/include/asm-frv/hardirq.h @@ -12,6 +12,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include diff --git a/include/asm-frv/highmem.h b/include/asm-frv/highmem.h index e2247c22a..295f74a57 100644 --- a/include/asm-frv/highmem.h +++ b/include/asm-frv/highmem.h @@ -17,6 +17,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -134,7 +135,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) default: BUG(); - return NULL; + return 0; } } diff --git a/include/asm-frv/ide.h b/include/asm-frv/ide.h index f0bd2cb25..ae031eaa3 100644 --- a/include/asm-frv/ide.h +++ b/include/asm-frv/ide.h @@ -14,6 +14,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h index 7765f5528..01247cb2b 100644 --- a/include/asm-frv/io.h +++ b/include/asm-frv/io.h @@ -17,6 +17,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -40,13 +41,13 @@ static inline unsigned long _swapl(unsigned long v) //#define __iormb() asm volatile("membar") //#define __iowmb() asm volatile("membar") -#define __raw_readb __builtin_read8 -#define __raw_readw __builtin_read16 -#define __raw_readl __builtin_read32 +#define __raw_readb(addr) __builtin_read8((void *) (addr)) +#define __raw_readw(addr) __builtin_read16((void *) (addr)) +#define __raw_readl(addr) __builtin_read32((void *) (addr)) -#define __raw_writeb(datum, addr) __builtin_write8(addr, datum) -#define __raw_writew(datum, addr) __builtin_write16(addr, datum) -#define __raw_writel(datum, addr) __builtin_write32(addr, datum) +#define __raw_writeb(datum, addr) __builtin_write8((void *) (addr), datum) +#define __raw_writew(datum, addr) __builtin_write16((void *) (addr), datum) +#define __raw_writel(datum, addr) __builtin_write32((void *) (addr), datum) static inline void io_outsb(unsigned int addr, const void *buf, int len) { @@ -116,7 +117,7 @@ static inline void memset_io(volatile void __iomem *addr, unsigned char val, int memset((void __force *) addr, val, count); } -static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) +static inline void memcpy_fromio(void *dst, volatile void __iomem *src, int count) { memcpy(dst, (void __force *) src, count); } @@ -128,12 +129,12 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int static inline uint8_t inb(unsigned long addr) { - return __builtin_read8((void __iomem *)addr); + return __builtin_read8((void *)addr); } static inline uint16_t inw(unsigned long addr) { - uint16_t ret = __builtin_read16((void __iomem *)addr); + uint16_t ret = __builtin_read16((void *)addr); if (__is_PCI_IO(addr)) ret = _swapw(ret); @@ -143,7 +144,7 @@ static inline uint16_t inw(unsigned long addr) static inline uint32_t inl(unsigned long addr) { - uint32_t ret = __builtin_read32((void __iomem *)addr); + uint32_t ret = __builtin_read32((void *)addr); if (__is_PCI_IO(addr)) ret = _swapl(ret); @@ -153,21 +154,21 @@ static inline uint32_t inl(unsigned long addr) static inline void outb(uint8_t datum, unsigned long addr) { - __builtin_write8((void __iomem *)addr, datum); + __builtin_write8((void *)addr, datum); } static inline void outw(uint16_t datum, unsigned long addr) { if (__is_PCI_IO(addr)) datum = _swapw(datum); - __builtin_write16((void __iomem *)addr, datum); + __builtin_write16((void *)addr, datum); } static inline void outl(uint32_t datum, unsigned long addr) { if (__is_PCI_IO(addr)) datum = _swapl(datum); - __builtin_write32((void __iomem *)addr, datum); + __builtin_write32((void *)addr, datum); } #define inb_p(addr) inb(addr) @@ -189,12 +190,12 @@ static inline void outl(uint32_t datum, unsigned long addr) static inline uint8_t readb(const volatile void __iomem *addr) { - return __builtin_read8((__force void volatile __iomem *) addr); + return __builtin_read8((volatile uint8_t __force *) addr); } static inline uint16_t readw(const volatile void __iomem *addr) { - uint16_t ret = __builtin_read16((__force void volatile __iomem *)addr); + uint16_t ret = __builtin_read16((volatile uint16_t __force *)addr); if (__is_PCI_MEM(addr)) ret = _swapw(ret); @@ -203,7 +204,7 @@ static inline uint16_t readw(const volatile void __iomem *addr) static inline uint32_t readl(const volatile void __iomem *addr) { - uint32_t ret = __builtin_read32((__force void volatile __iomem *)addr); + uint32_t ret = __builtin_read32((volatile uint32_t __force *)addr); if (__is_PCI_MEM(addr)) ret = _swapl(ret); @@ -217,7 +218,7 @@ static inline uint32_t readl(const volatile void __iomem *addr) static inline void writeb(uint8_t datum, volatile void __iomem *addr) { - __builtin_write8(addr, datum); + __builtin_write8((volatile uint8_t __force *) addr, datum); if (__is_PCI_MEM(addr)) __flush_PCI_writes(); } @@ -227,7 +228,7 @@ static inline void writew(uint16_t datum, volatile void __iomem *addr) if (__is_PCI_MEM(addr)) datum = _swapw(datum); - __builtin_write16(addr, datum); + __builtin_write16((volatile uint16_t __force *) addr, datum); if (__is_PCI_MEM(addr)) __flush_PCI_writes(); } @@ -237,7 +238,7 @@ static inline void writel(uint32_t datum, volatile void __iomem *addr) if (__is_PCI_MEM(addr)) datum = _swapl(datum); - __builtin_write32(addr, datum); + __builtin_write32((volatile uint32_t __force *) addr, datum); if (__is_PCI_MEM(addr)) __flush_PCI_writes(); } @@ -271,7 +272,7 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l return __ioremap(physaddr, size, IOMAP_FULL_CACHING); } -extern void iounmap(void volatile __iomem *addr); +extern void iounmap(void __iomem *addr); static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { diff --git a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h index ac3ab900a..686fb2b39 100644 --- a/include/asm-frv/irq-routing.h +++ b/include/asm-frv/irq-routing.h @@ -51,7 +51,7 @@ struct irq_source { struct irq_level { int usage; int disable_count; - unsigned long flags; /* current IRQF_DISABLED and IRQF_SHARED settings */ + unsigned long flags; /* current SA_INTERRUPT and SA_SHIRQ settings */ spinlock_t lock; struct irq_source *sources; }; diff --git a/include/asm-frv/irq.h b/include/asm-frv/irq.h index 58b619215..2c16d8dc0 100644 --- a/include/asm-frv/irq.h +++ b/include/asm-frv/irq.h @@ -12,6 +12,7 @@ #ifndef _ASM_IRQ_H_ #define _ASM_IRQ_H_ +#include /* * the system has an on-CPU PIC and another PIC on the FPGA and other PICs on other peripherals, diff --git a/include/asm-frv/mb-regs.h b/include/asm-frv/mb-regs.h index 219e5f926..93fa732fb 100644 --- a/include/asm-frv/mb-regs.h +++ b/include/asm-frv/mb-regs.h @@ -16,17 +16,6 @@ #include #include -#ifndef __ASSEMBLY__ -/* gcc builtins, annotated */ - -unsigned long __builtin_read8(volatile void __iomem *); -unsigned long __builtin_read16(volatile void __iomem *); -unsigned long __builtin_read32(volatile void __iomem *); -void __builtin_write8(volatile void __iomem *, unsigned char); -void __builtin_write16(volatile void __iomem *, unsigned short); -void __builtin_write32(volatile void __iomem *, unsigned long); -#endif - #define __region_IO KERNEL_IO_START /* the region from 0xe0000000 to 0xffffffff has suitable * protection laid over the top for use in memory-mapped * I/O @@ -70,7 +59,7 @@ void __builtin_write32(volatile void __iomem *, unsigned long); #define __region_PCI_MEM (__region_CS2 + 0x08000000UL) #define __flush_PCI_writes() \ do { \ - __builtin_write8((volatile void __iomem *) __region_PCI_MEM, 0); \ + __builtin_write8((volatile void *) __region_PCI_MEM, 0); \ } while(0) #define __is_PCI_IO(addr) \ @@ -94,15 +83,15 @@ extern int __nongprelbss mb93090_mb00_detected; #define __set_LEDS(X) \ do { \ if (mb93090_mb00_detected) \ - __builtin_write32((void __iomem *) __addr_LEDS(), ~(X)); \ + __builtin_write32((void *) __addr_LEDS(), ~(X)); \ } while (0) #else #define __set_LEDS(X) #endif #define __addr_LCD() (__region_CS2 + 0x01200008UL) -#define __get_LCD(B) __builtin_read32((volatile void __iomem *) (B)) -#define __set_LCD(B,X) __builtin_write32((volatile void __iomem *) (B), (X)) +#define __get_LCD(B) __builtin_read32((volatile void *) (B)) +#define __set_LCD(B,X) __builtin_write32((volatile void *) (B), (X)) #define LCD_D 0x000000ff /* LCD data bus */ #define LCD_RW 0x00000100 /* LCD R/W signal */ @@ -172,11 +161,11 @@ do { \ #define __get_CLKIN() 66000000UL #define __addr_LEDS() (__region_CS2 + 0x00000023UL) -#define __set_LEDS(X) __builtin_write8((volatile void __iomem *) __addr_LEDS(), (X)) +#define __set_LEDS(X) __builtin_write8((volatile void *) __addr_LEDS(), (X)) #define __addr_FPGATR() (__region_CS2 + 0x00000030UL) -#define __set_FPGATR(X) __builtin_write32((volatile void __iomem *) __addr_FPGATR(), (X)) -#define __get_FPGATR() __builtin_read32((volatile void __iomem *) __addr_FPGATR()) +#define __set_FPGATR(X) __builtin_write32((volatile void *) __addr_FPGATR(), (X)) +#define __get_FPGATR() __builtin_read32((volatile void *) __addr_FPGATR()) #define MB93093_FPGA_FPGATR_AUDIO_CLK 0x00000003 @@ -191,7 +180,7 @@ do { \ #define MB93093_FPGA_SWR_PUSHSWMASK (0x1F<<26) #define MB93093_FPGA_SWR_PUSHSW4 (1<<29) -#define __addr_FPGA_SWR ((volatile void __iomem *)(__region_CS2 + 0x28UL)) +#define __addr_FPGA_SWR ((volatile void *)(__region_CS2 + 0x28UL)) #define __get_FPGA_PUSHSW1_5() (__builtin_read32(__addr_FPGA_SWR) & MB93093_FPGA_SWR_PUSHSWMASK) diff --git a/include/asm-frv/mmu_context.h b/include/asm-frv/mmu_context.h index 72edcaacc..4fb9ea3c5 100644 --- a/include/asm-frv/mmu_context.h +++ b/include/asm-frv/mmu_context.h @@ -12,6 +12,7 @@ #ifndef _ASM_MMU_CONTEXT_H #define _ASM_MMU_CONTEXT_H +#include #include #include #include diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index 134cc0cdf..dc0f7e08a 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-frv/pci.h b/include/asm-frv/pci.h index f35a4511e..598b0c6b6 100644 --- a/include/asm-frv/pci.h +++ b/include/asm-frv/pci.h @@ -13,6 +13,7 @@ #ifndef ASM_PCI_H #define ASM_PCI_H +#include #include #include #include diff --git a/include/asm-frv/pgalloc.h b/include/asm-frv/pgalloc.h index ce982a6c6..1bd28f41b 100644 --- a/include/asm-frv/pgalloc.h +++ b/include/asm-frv/pgalloc.h @@ -15,6 +15,7 @@ #ifndef _ASM_PGALLOC_H #define _ASM_PGALLOC_H +#include #include #include diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 7af7485e8..d1c3b182c 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h @@ -16,6 +16,7 @@ #ifndef _ASM_PGTABLE_H #define _ASM_PGTABLE_H +#include #include #include #include diff --git a/include/asm-frv/processor.h b/include/asm-frv/processor.h index 3744f2e47..5228c18b7 100644 --- a/include/asm-frv/processor.h +++ b/include/asm-frv/processor.h @@ -12,6 +12,7 @@ #ifndef _ASM_PROCESSOR_H #define _ASM_PROCESSOR_H +#include #include #ifndef __ASSEMBLY__ @@ -21,7 +22,6 @@ */ #define current_text_addr() ({ __label__ _l; _l: &&_l;}) -#include #include #include #include @@ -140,7 +140,7 @@ unsigned long get_wchan(struct task_struct *p); extern struct task_struct *alloc_task_struct(void); extern void free_task_struct(struct task_struct *p); -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) /* data cache prefetch */ #define ARCH_HAS_PREFETCH diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h index 7ff525162..b2cce0718 100644 --- a/include/asm-frv/ptrace.h +++ b/include/asm-frv/ptrace.h @@ -62,10 +62,18 @@ #ifndef __ASSEMBLY__ /* - * we dedicate GR28 to keeping a pointer to the current exception frame - * - gr28 is destroyed on entry to the kernel from userspace + * dedicate GR28; to keeping the a pointer to the current exception frame */ register struct pt_regs *__frame asm("gr28"); +register struct pt_regs *__debug_frame asm("gr31"); + +#ifndef container_of +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + +#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs) #define user_mode(regs) (!((regs)->psr & PSR_S)) #define instruction_pointer(regs) ((regs)->pc) diff --git a/include/asm-frv/registers.h b/include/asm-frv/registers.h index 9666119fc..fccfd95cf 100644 --- a/include/asm-frv/registers.h +++ b/include/asm-frv/registers.h @@ -23,13 +23,7 @@ * * +0x2000 +---------------------- * | union { - * | struct frv_frame0 { - * | struct user_context { - * | struct user_int_regs - * | struct user_fpmedia_regs - * | } - * | struct frv_debug_regs - * | } + * | struct user_context * | struct pt_regs [user exception] * | } * +---------------------- <-- __kernel_frame0_ptr (maybe GR28) @@ -57,11 +51,11 @@ #define _ASM_REGISTERS_H #ifndef __ASSEMBLY__ -#define __OFFSET(X,N) ((X)+(N)*4) +#define __OFFSET(X) (X) #define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx #else -#define __OFFSET(X,N) ((X)+(N)*4) -#define __OFFSETC(X,N) ((X)+(N)) +#define __OFFSET(X) ((X)*4) +#define __OFFSETC(X,N) ((X)*4+(N)) #endif /*****************************************************************************/ @@ -123,13 +117,30 @@ struct pt_regs { #endif +#define REG_PSR __OFFSET( 0) /* Processor Status Register */ +#define REG_ISR __OFFSET( 1) /* Integer Status Register */ +#define REG_CCR __OFFSET( 2) /* Condition Code Register */ +#define REG_CCCR __OFFSET( 3) /* Condition Code for Conditional Insns Register */ +#define REG_LR __OFFSET( 4) /* Link Register */ +#define REG_LCR __OFFSET( 5) /* Loop Count Register */ +#define REG_PC __OFFSET( 6) /* Program Counter */ + +#define REG__STATUS __OFFSET( 7) /* exception status */ #define REG__STATUS_STEP 0x00000001 /* - reenable single stepping on return */ #define REG__STATUS_STEPPED 0x00000002 /* - single step caused exception */ #define REG__STATUS_BROKE 0x00000004 /* - BREAK insn caused exception */ #define REG__STATUS_SYSC_ENTRY 0x40000000 /* - T on syscall entry (ptrace.c only) */ #define REG__STATUS_SYSC_EXIT 0x80000000 /* - T on syscall exit (ptrace.c only) */ -#define REG_GR(R) __OFFSET(REG_GR0, (R)) +#define REG_SYSCALLNO __OFFSET( 8) /* syscall number or -1 */ +#define REG_ORIG_GR8 __OFFSET( 9) /* saved GR8 for signal handling */ +#define REG_GNER0 __OFFSET(10) +#define REG_GNER1 __OFFSET(11) +#define REG_IACC0 __OFFSET(12) + +#define REG_TBR __OFFSET(14) /* Trap Vector Register */ +#define REG_GR(R) __OFFSET((14+(R))) +#define REG__END REG_GR(32) #define REG_SP REG_GR(1) #define REG_FP REG_GR(2) @@ -138,21 +149,27 @@ struct pt_regs { /*****************************************************************************/ /* - * debugging registers + * extension tacked in front of the exception frame in debug mode */ #ifndef __ASSEMBLY__ -struct frv_debug_regs +struct pt_debug_regs { + unsigned long bpsr; unsigned long dcr; - unsigned long ibar[4] __attribute__((aligned(8))); - unsigned long dbar[4] __attribute__((aligned(8))); - unsigned long dbdr[4][4] __attribute__((aligned(8))); - unsigned long dbmr[4][4] __attribute__((aligned(8))); + unsigned long brr; + unsigned long nmar; + struct pt_regs normal_regs; } __attribute__((aligned(8))); #endif +#define REG_NMAR __OFFSET(-1) +#define REG_BRR __OFFSET(-2) +#define REG_DCR __OFFSET(-3) +#define REG_BPSR __OFFSET(-4) +#define REG__DEBUG_XTRA __OFFSET(4) + /*****************************************************************************/ /* * userspace registers @@ -206,27 +223,33 @@ struct user_context void *extension; } __attribute__((aligned(8))); -struct frv_frame0 { - union { - struct pt_regs regs; - struct user_context uc; - }; - - struct frv_debug_regs debug; - -} __attribute__((aligned(32))); - #endif -#define __INT_GR(R) __OFFSET(__INT_GR0, (R)) - -#define __FPMEDIA_FR(R) __OFFSET(__FPMEDIA_FR0, (R)) -#define __FPMEDIA_FNER(R) __OFFSET(__FPMEDIA_FNER0, (R)) -#define __FPMEDIA_MSR(R) __OFFSET(__FPMEDIA_MSR0, (R)) -#define __FPMEDIA_ACC(R) __OFFSET(__FPMEDIA_ACC0, (R)) -#define __FPMEDIA_ACCG(R) __OFFSETC(__FPMEDIA_ACCG0, (R)) -#define __FPMEDIA_FSR(R) __OFFSET(__FPMEDIA_FSR0, (R)) - -#define __THREAD_GR(R) __OFFSET(__THREAD_GR16, (R) - 16) +#define NR_USER_INT_REGS (14 + 64) +#define NR_USER_FPMEDIA_REGS (64 + 2 + 2 + 8 + 8/4 + 1) +#define NR_USER_CONTEXT (NR_USER_INT_REGS + NR_USER_FPMEDIA_REGS + 1) + +#define USER_CONTEXT_SIZE (((NR_USER_CONTEXT + 1) & ~1) * 4) + +#define __THREAD_FRAME __OFFSET(0) +#define __THREAD_CURR __OFFSET(1) +#define __THREAD_SP __OFFSET(2) +#define __THREAD_FP __OFFSET(3) +#define __THREAD_LR __OFFSET(4) +#define __THREAD_PC __OFFSET(5) +#define __THREAD_GR(R) __OFFSET(6 + (R) - 16) +#define __THREAD_FRAME0 __OFFSET(19) +#define __THREAD_USER __OFFSET(19) + +#define __USER_INT __OFFSET(0) +#define __INT_GR(R) __OFFSET(14 + (R)) + +#define __USER_FPMEDIA __OFFSET(NR_USER_INT_REGS) +#define __FPMEDIA_FR(R) __OFFSET(NR_USER_INT_REGS + (R)) +#define __FPMEDIA_FNER(R) __OFFSET(NR_USER_INT_REGS + 64 + (R)) +#define __FPMEDIA_MSR(R) __OFFSET(NR_USER_INT_REGS + 66 + (R)) +#define __FPMEDIA_ACC(R) __OFFSET(NR_USER_INT_REGS + 68 + (R)) +#define __FPMEDIA_ACCG(R) __OFFSETC(NR_USER_INT_REGS + 76, (R)) +#define __FPMEDIA_FSR(R) __OFFSET(NR_USER_INT_REGS + 78 + (R)) #endif /* _ASM_REGISTERS_H */ diff --git a/include/asm-frv/segment.h b/include/asm-frv/segment.h index e3616a6f9..61222f00d 100644 --- a/include/asm-frv/segment.h +++ b/include/asm-frv/segment.h @@ -12,6 +12,7 @@ #ifndef _ASM_SEGMENT_H #define _ASM_SEGMENT_H +#include #ifndef __ASSEMBLY__ diff --git a/include/asm-frv/serial.h b/include/asm-frv/serial.h index dbb825998..6917d556a 100644 --- a/include/asm-frv/serial.h +++ b/include/asm-frv/serial.h @@ -6,6 +6,7 @@ * * Based on linux/include/asm-i386/serial.h */ +#include #include /* diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h index 2079197d4..673668947 100644 --- a/include/asm-frv/signal.h +++ b/include/asm-frv/signal.h @@ -74,6 +74,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -93,6 +94,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 @@ -112,13 +114,13 @@ struct old_sigaction { __sighandler_t sa_handler; old_sigset_t sa_mask; unsigned long sa_flags; - __sigrestore_t sa_restorer; + void (*sa_restorer)(void); }; struct sigaction { __sighandler_t sa_handler; unsigned long sa_flags; - __sigrestore_t sa_restorer; + void (*sa_restorer)(void); sigset_t sa_mask; /* mask last for extensibility */ }; @@ -144,7 +146,7 @@ struct sigaction { #endif /* __KERNEL__ */ typedef struct sigaltstack { - void __user *ss_sp; + void *ss_sp; int ss_flags; size_t ss_size; } stack_t; diff --git a/include/asm-frv/smp.h b/include/asm-frv/smp.h index 38349ec8b..5ca771631 100644 --- a/include/asm-frv/smp.h +++ b/include/asm-frv/smp.h @@ -1,6 +1,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #ifdef CONFIG_SMP #error SMP not supported diff --git a/include/asm-frv/socket.h b/include/asm-frv/socket.h index 31db18fc8..7177f8b98 100644 --- a/include/asm-frv/socket.h +++ b/include/asm-frv/socket.h @@ -48,7 +48,6 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index 116689931..1734ed91b 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h @@ -12,6 +12,7 @@ #ifndef _ASM_SYSTEM_H #define _ASM_SYSTEM_H +#include /* get configuration macros */ #include #include @@ -179,6 +180,7 @@ do { \ #define rmb() asm volatile ("membar" : : :"memory") #define wmb() asm volatile ("membar" : : :"memory") #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define smp_mb() mb() #define smp_rmb() rmb() diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h index d66c48e6e..ea426abf0 100644 --- a/include/asm-frv/thread_info.h +++ b/include/asm-frv/thread_info.h @@ -19,8 +19,6 @@ #include #endif -#define THREAD_SIZE 8192 - /* * low level task data that entry.S needs immediate access to * - this struct should fit entirely inside of one cache line @@ -48,7 +46,15 @@ struct thread_info { #else /* !__ASSEMBLY__ */ -#include +/* offsets into the thread_info struct for assembly code access */ +#define TI_TASK 0x00000000 +#define TI_EXEC_DOMAIN 0x00000004 +#define TI_FLAGS 0x00000008 +#define TI_STATUS 0x0000000C +#define TI_CPU 0x00000010 +#define TI_PRE_COUNT 0x00000014 +#define TI_ADDR_LIMIT 0x00000018 +#define TI_RESTART_BLOCK 0x0000001C #endif @@ -77,6 +83,12 @@ struct thread_info { #define init_thread_info (init_thread_union.thread_info) #define init_stack (init_thread_union.stack) +#ifdef CONFIG_SMALL_TASKS +#define THREAD_SIZE 4096 +#else +#define THREAD_SIZE 8192 +#endif + /* how to get the thread information struct from C */ register struct thread_info *__current_thread_info asm("gr15"); @@ -99,7 +111,11 @@ register struct thread_info *__current_thread_info asm("gr15"); #define free_thread_info(info) kfree(info) -#endif /* __ASSEMBLY__ */ +#else /* !__ASSEMBLY__ */ + +#define THREAD_SIZE 8192 + +#endif /* * thread information flags diff --git a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h index da3a3179a..bc3462625 100644 --- a/include/asm-frv/tlbflush.h +++ b/include/asm-frv/tlbflush.h @@ -12,6 +12,7 @@ #ifndef _ASM_TLBFLUSH_H #define _ASM_TLBFLUSH_H +#include #include #include diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 1b6d1923b..2560f596a 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h @@ -46,6 +46,7 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ +#include typedef signed char s8; typedef unsigned char u8; diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index 3d90e1018..a1d140438 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h @@ -22,7 +22,7 @@ #define HAVE_ARCH_UNMAPPED_AREA /* we decide where to put mmaps */ -#define __ptr(x) ((unsigned long __force *)(x)) +#define __ptr(x) ((unsigned long *)(x)) #define VERIFY_READ 0 #define VERIFY_WRITE 1 @@ -64,7 +64,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size) #define __range_ok(addr,size) ___range_ok((unsigned long) (addr), (unsigned long) (size)) -#define access_ok(type,addr,size) (__range_ok((void __user *)(addr), (size)) == 0) +#define access_ok(type,addr,size) (__range_ok((addr), (size)) == 0) #define __access_ok(addr,size) (__range_ok((addr), (size)) == 0) /* @@ -97,7 +97,6 @@ extern unsigned long search_exception_table(unsigned long); int __pu_err = 0; \ \ typeof(*(ptr)) __pu_val = (x); \ - __chk_user_ptr(ptr); \ \ switch (sizeof (*(ptr))) { \ case 1: \ @@ -121,7 +120,7 @@ extern unsigned long search_exception_table(unsigned long); #define put_user(x, ptr) \ ({ \ - typeof(*(ptr)) __user *_p = (ptr); \ + typeof(&*ptr) _p = (ptr); \ int _e; \ \ _e = __range_ok(_p, sizeof(*_p)); \ @@ -176,44 +175,33 @@ do { \ */ #define __get_user(x, ptr) \ ({ \ + typeof(*(ptr)) __gu_val = 0; \ int __gu_err = 0; \ - __chk_user_ptr(ptr); \ \ switch (sizeof(*(ptr))) { \ - case 1: { \ - unsigned char __gu_val; \ - __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \ - (x) = *(__force __typeof__(*(ptr)) *) &__gu_val; \ + case 1: \ + __get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \ break; \ - } \ - case 2: { \ - unsigned short __gu_val; \ - __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \ - (x) = *(__force __typeof__(*(ptr)) *) &__gu_val; \ + case 2: \ + __get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \ break; \ - } \ - case 4: { \ - unsigned int __gu_val; \ - __get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \ - (x) = *(__force __typeof__(*(ptr)) *) &__gu_val; \ + case 4: \ + __get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \ break; \ - } \ - case 8: { \ - unsigned long long __gu_val; \ - __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \ - (x) = *(__force __typeof__(*(ptr)) *) &__gu_val; \ + case 8: \ + __get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \ break; \ - } \ default: \ __gu_err = __get_user_bad(); \ break; \ } \ + (x) = __gu_val; \ __gu_err; \ }) #define get_user(x, ptr) \ ({ \ - const typeof(*(ptr)) __user *_p = (ptr);\ + typeof(&*ptr) _p = (ptr); \ int _e; \ \ _e = __range_ok(_p, sizeof(*_p)); \ @@ -260,20 +248,19 @@ do { \ /* * */ -#define ____force(x) (__force void *)(void __user *)(x) #ifdef CONFIG_MMU extern long __memset_user(void *dst, unsigned long count); extern long __memcpy_user(void *dst, const void *src, unsigned long count); -#define clear_user(dst,count) __memset_user(____force(dst), (count)) -#define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), ____force(from), (n)) -#define __copy_to_user_inatomic(to, from, n) __memcpy_user(____force(to), (from), (n)) +#define clear_user(dst,count) __memset_user((dst), (count)) +#define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), (from), (n)) +#define __copy_to_user_inatomic(to, from, n) __memcpy_user((to), (from), (n)) #else -#define clear_user(dst,count) (memset(____force(dst), 0, (count)), 0) -#define __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), (n)), 0) -#define __copy_to_user_inatomic(to, from, n) (memcpy(____force(to), (from), (n)), 0) +#define clear_user(dst,count) (memset((dst), 0, (count)), 0) +#define __copy_from_user_inatomic(to, from, n) (memcpy((to), (from), (n)), 0) +#define __copy_to_user_inatomic(to, from, n) (memcpy((to), (from), (n)), 0) #endif @@ -291,7 +278,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n) return __copy_from_user_inatomic(to, from, n); } -static inline long copy_from_user(void *to, const void __user *from, unsigned long n) +static inline long copy_from_user(void *to, const void *from, unsigned long n) { unsigned long ret = n; @@ -304,13 +291,16 @@ static inline long copy_from_user(void *to, const void __user *from, unsigned lo return ret; } -static inline long copy_to_user(void __user *to, const void *from, unsigned long n) +static inline long copy_to_user(void *to, const void *from, unsigned long n) { return likely(__access_ok(to, n)) ? __copy_to_user(to, from, n) : n; } -extern long strncpy_from_user(char *dst, const char __user *src, long count); -extern long strnlen_user(const char __user *src, long count); +#define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) return retval; }) +#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n)) return retval; }) + +extern long strncpy_from_user(char *dst, const char *src, long count); +extern long strnlen_user(const char *src, long count); #define strlen_user(str) strnlen_user(str, 32767) diff --git a/include/asm-frv/unaligned.h b/include/asm-frv/unaligned.h index dc8e9c9bf..a0d199bf0 100644 --- a/include/asm-frv/unaligned.h +++ b/include/asm-frv/unaligned.h @@ -12,6 +12,7 @@ #ifndef _ASM_UNALIGNED_H #define _ASM_UNALIGNED_H +#include /* * Unaligned accesses on uClinux can't be performed in a fault handler - the diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index b80dbd839..2662a3e12 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h @@ -306,7 +306,7 @@ #define __NR_mknodat 297 #define __NR_fchownat 298 #define __NR_futimesat 299 -#define __NR_fstatat64 300 +#define __NR_newfstatat 300 #define __NR_unlinkat 301 #define __NR_renameat 302 #define __NR_linkat 303 @@ -317,8 +317,6 @@ #define __NR_pselect6 308 #define __NR_ppoll 309 -#ifdef __KERNEL__ - #define NR_syscalls 310 /* @@ -460,10 +458,28 @@ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg * some others too. */ #define __NR__exit __NR_exit +static inline _syscall0(int,pause) +static inline _syscall0(int,sync) +static inline _syscall0(pid_t,setsid) +static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) +static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) +static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) +static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) +static inline _syscall3(int,open,const char *,file,int,flag,int,mode) +static inline _syscall1(int,close,int,fd) +static inline _syscall1(int,_exit,int,exitcode) +static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) +static inline _syscall1(int,delete_module,const char *,name) -#endif /* __KERNEL_SYSCALLS__ */ +static inline pid_t wait(int * wait_stat) +{ + return waitpid(-1,wait_stat,0); +} +#endif + +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION /* #define __ARCH_WANT_OLD_READDIR */ #define __ARCH_WANT_OLD_STAT @@ -487,6 +503,7 @@ static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND +#endif /* * "Conditional" syscalls @@ -498,5 +515,4 @@ static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #endif -#endif /* __KERNEL__ */ #endif /* _ASM_UNISTD_H_ */ diff --git a/include/asm-frv/virtconvert.h b/include/asm-frv/virtconvert.h index 59788fa2a..a29a0aec2 100644 --- a/include/asm-frv/virtconvert.h +++ b/include/asm-frv/virtconvert.h @@ -17,6 +17,7 @@ #ifdef __KERNEL__ +#include #include #ifdef CONFIG_MMU diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild deleted file mode 100644 index 3c06be381..000000000 --- a/include/asm-generic/Kbuild +++ /dev/null @@ -1,12 +0,0 @@ -header-y += atomic.h -header-y += errno-base.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ipc.h -header-y += mman.h -header-y += signal.h -header-y += statfs.h - -unifdef-y += resource.h -unifdef-y += siginfo.h diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm deleted file mode 100644 index a84c3d88a..000000000 --- a/include/asm-generic/Kbuild.asm +++ /dev/null @@ -1,34 +0,0 @@ -unifdef-y += a.out.h -unifdef-y += auxvec.h -unifdef-y += byteorder.h -unifdef-y += errno.h -unifdef-y += fcntl.h -unifdef-y += ioctl.h -unifdef-y += ioctls.h -unifdef-y += ipcbuf.h -unifdef-y += mman.h -unifdef-y += msgbuf.h -unifdef-y += param.h -unifdef-y += poll.h -unifdef-y += posix_types.h -unifdef-y += ptrace.h -unifdef-y += resource.h -unifdef-y += sembuf.h -unifdef-y += shmbuf.h -unifdef-y += sigcontext.h -unifdef-y += siginfo.h -unifdef-y += signal.h -unifdef-y += socket.h -unifdef-y += sockios.h -unifdef-y += stat.h -unifdef-y += statfs.h -unifdef-y += termbits.h -unifdef-y += termios.h -unifdef-y += types.h -unifdef-y += unistd.h -unifdef-y += user.h - -# These probably shouldn't be exported -unifdef-y += shmparam.h -unifdef-y += elf.h -unifdef-y += page.h diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h deleted file mode 100644 index 50764550a..000000000 --- a/include/asm-generic/audit_change_attr.h +++ /dev/null @@ -1,22 +0,0 @@ -__NR_chmod, -__NR_fchmod, -#ifdef __NR_chown -__NR_chown, -__NR_fchown, -__NR_lchown, -#endif -__NR_setxattr, -__NR_lsetxattr, -__NR_fsetxattr, -__NR_removexattr, -__NR_lremovexattr, -__NR_fremovexattr, -#ifdef __NR_fchownat -__NR_fchownat, -__NR_fchmodat, -#endif -#ifdef __NR_chown32 -__NR_chown32, -__NR_fchown32, -__NR_lchown32, -#endif diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h deleted file mode 100644 index 6621bd82c..000000000 --- a/include/asm-generic/audit_dir_write.h +++ /dev/null @@ -1,18 +0,0 @@ -__NR_rename, -__NR_mkdir, -__NR_rmdir, -#ifdef __NR_creat -__NR_creat, -#endif -__NR_link, -__NR_unlink, -__NR_symlink, -__NR_mknod, -#ifdef __NR_mkdirat -__NR_mkdirat, -__NR_mknodat, -__NR_unlinkat, -__NR_renameat, -__NR_linkat, -__NR_symlinkat, -#endif diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h deleted file mode 100644 index 0e87464d9..000000000 --- a/include/asm-generic/audit_read.h +++ /dev/null @@ -1,8 +0,0 @@ -__NR_readlink, -__NR_quotactl, -__NR_listxattr, -__NR_llistxattr, -__NR_flistxattr, -__NR_getxattr, -__NR_lgetxattr, -__NR_fgetxattr, diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h deleted file mode 100644 index f10d367fb..000000000 --- a/include/asm-generic/audit_write.h +++ /dev/null @@ -1,11 +0,0 @@ -#include -__NR_acct, -__NR_swapon, -__NR_quotactl, -__NR_truncate, -#ifdef __NR_truncate64 -__NR_truncate64, -#endif -#ifdef __NR_bind -__NR_bind, /* bind can affect fs object only in one way... */ -#endif diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index cc45364c2..cce17f9ff 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -2,6 +2,7 @@ #define _ASM_GENERIC_BUG_H #include +#include #ifndef __ASSEMBLY__ extern const char *print_tainted(void); @@ -34,42 +35,12 @@ extern const char *print_tainted(void); #endif #ifndef HAVE_ARCH_BUG_ON -#define BUG_ON(condition) do { \ - if (unlikely((condition)!=0)) { \ - printk("BUGging on (%s)\n", #condition); \ - BUG(); \ - } \ -} while(0) +#define BUG_ON(condition) do { if (condition) ; } while(0) #endif #ifndef HAVE_ARCH_WARN_ON -#define WARN_ON(condition) do { \ - if (unlikely((condition)!=0)) { \ - printk("BUG: warning: (%s) at %s:%d/%s()\n", \ - #condition, __FILE__, __LINE__, __FUNCTION__); \ - dump_stack(); \ - } \ -} while (0) -#endif +#define WARN_ON(condition) do { if (condition) ; } while(0) #endif - -#define WARN_ON_ONCE(condition) \ -({ \ - static int __warn_once = 1; \ - int __ret = 0; \ - \ - if (unlikely((condition) && __warn_once)) { \ - __warn_once = 0; \ - WARN_ON(condition); \ - __ret = 1; \ - } \ - __ret; \ -}) - -#ifdef CONFIG_SMP -# define WARN_ON_SMP(x) WARN_ON(x) -#else -# define WARN_ON_SMP(x) do { } while (0) #endif #endif diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 09204e40d..6f178563e 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h @@ -24,9 +24,7 @@ typedef u64 cputime64_t; #define cputime64_zero (0ULL) #define cputime64_add(__a, __b) ((__a) + (__b)) -#define cputime64_sub(__a, __b) ((__a) - (__b)) #define cputime64_to_jiffies64(__ct) (__ct) -#define jiffies64_to_cputime64(__jif) (__jif) #define cputime_to_cputime64(__ct) ((u64) __ct) diff --git a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h index b541e48cc..1b3562077 100644 --- a/include/asm-generic/dma-mapping.h +++ b/include/asm-generic/dma-mapping.h @@ -7,6 +7,7 @@ #ifndef _ASM_GENERIC_DMA_MAPPING_H #define _ASM_GENERIC_DMA_MAPPING_H +#include #ifdef CONFIG_PCI diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index 5aa79cd3b..3c4909d14 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h @@ -1,6 +1,7 @@ #ifndef _ASM_GENERIC_FCNTL_H #define _ASM_GENERIC_FCNTL_H +#include #include /* open/fcntl - O_SYNC is only implemented on blocks devices and on files diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index ab4692972..9291c24f5 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h @@ -1,6 +1,7 @@ #ifndef _ASM_GENERIC_LOCAL_H #define _ASM_GENERIC_LOCAL_H +#include #include #include #include diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 8078cbd2c..0cfb086dd 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -23,23 +23,29 @@ #endif /* CONFIG_DISCONTIGMEM */ +#ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE +struct page; +/* this is useful when inlined pfn_to_page is too big */ +extern struct page *pfn_to_page(unsigned long pfn); +extern unsigned long page_to_pfn(struct page *page); +#else /* * supports 3 memory models. */ #if defined(CONFIG_FLATMEM) -#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) -#define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \ +#define pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET)) +#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + \ ARCH_PFN_OFFSET) #elif defined(CONFIG_DISCONTIGMEM) -#define __pfn_to_page(pfn) \ +#define pfn_to_page(pfn) \ ({ unsigned long __pfn = (pfn); \ unsigned long __nid = arch_pfn_to_nid(pfn); \ NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\ }) -#define __page_to_pfn(pg) \ +#define page_to_pfn(pg) \ ({ struct page *__pg = (pg); \ struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg)); \ (unsigned long)(__pg - __pgdat->node_mem_map) + \ @@ -51,27 +57,18 @@ * Note: section's mem_map is encorded to reflect its start_pfn. * section[i].section_mem_map == mem_map's address - start_pfn; */ -#define __page_to_pfn(pg) \ +#define page_to_pfn(pg) \ ({ struct page *__pg = (pg); \ int __sec = page_to_section(__pg); \ __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ }) -#define __pfn_to_page(pfn) \ +#define pfn_to_page(pfn) \ ({ unsigned long __pfn = (pfn); \ struct mem_section *__sec = __pfn_to_section(__pfn); \ __section_mem_map_addr(__sec) + __pfn; \ }) #endif /* CONFIG_FLATMEM/DISCONTIGMEM/SPARSEMEM */ - -#ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE -struct page; -/* this is useful when inlined pfn_to_page is too big */ -extern struct page *pfn_to_page(unsigned long pfn); -extern unsigned long page_to_pfn(struct page *page); -#else -#define page_to_pfn __page_to_pfn -#define pfn_to_page __pfn_to_page #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */ #endif /* __ASSEMBLY__ */ diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 3b41d2bb7..010ced7cf 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h @@ -39,4 +39,10 @@ #define MAP_ANON MAP_ANONYMOUS #define MAP_FILE 0 +#ifdef __KERNEL__ +#ifndef arch_mmap_check +#define arch_mmap_check(addr, len, flags) (0) +#endif +#endif + #endif diff --git a/include/asm-generic/mutex-null.h b/include/asm-generic/mutex-null.h index 254a126ed..5cf8b7ce0 100644 --- a/include/asm-generic/mutex-null.h +++ b/include/asm-generic/mutex-null.h @@ -10,10 +10,15 @@ #ifndef _ASM_GENERIC_MUTEX_NULL_H #define _ASM_GENERIC_MUTEX_NULL_H -#define __mutex_fastpath_lock(count, fail_fn) fail_fn(count) -#define __mutex_fastpath_lock_retval(count, fail_fn) fail_fn(count) -#define __mutex_fastpath_unlock(count, fail_fn) fail_fn(count) -#define __mutex_fastpath_trylock(count, fail_fn) fail_fn(count) -#define __mutex_slowpath_needs_to_unlock() 1 +/* extra parameter only needed for mutex debugging: */ +#ifndef __IP__ +# define __IP__ +#endif + +#define __mutex_fastpath_lock(count, fail_fn) fail_fn(count __RET_IP__) +#define __mutex_fastpath_lock_retval(count, fail_fn) fail_fn(count __RET_IP__) +#define __mutex_fastpath_unlock(count, fail_fn) fail_fn(count __RET_IP__) +#define __mutex_fastpath_trylock(count, fail_fn) fail_fn(count) +#define __mutex_slowpath_needs_to_unlock() 1 #endif diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index e160e0429..c0caf433a 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -7,8 +7,6 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; -#define per_cpu_offset(x) (__per_cpu_offset[x]) - /* Separate out the type, so (int[3], foo) works. */ #define DEFINE_PER_CPU(type, name) \ __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name @@ -16,7 +14,6 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) #define __get_cpu_var(var) per_cpu(var, smp_processor_id()) -#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id()) /* A macro to avoid #include hell... */ #define percpu_modcopy(pcpudst, src, size) \ @@ -33,7 +30,6 @@ do { \ #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var -#define __raw_get_cpu_var(var) per_cpu__##var #endif /* SMP */ diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index 4087037a4..cef08db34 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h @@ -114,7 +114,6 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) /* Set the current date and time in the real time clock. */ static inline int set_rtc_time(struct rtc_time *time) { - unsigned long flags; unsigned char mon, day, hrs, min, sec; unsigned char save_control, save_freq_select; unsigned int yrs; @@ -132,7 +131,7 @@ static inline int set_rtc_time(struct rtc_time *time) if (yrs > 255) /* They are unsigned */ return -EINVAL; - spin_lock_irqsave(&rtc_lock, flags); + spin_lock_irq(&rtc_lock); #ifdef CONFIG_MACH_DECSTATION real_yrs = yrs; leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || @@ -153,7 +152,7 @@ static inline int set_rtc_time(struct rtc_time *time) * whether the chip is in binary mode or not. */ if (yrs > 169) { - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock_irq(&rtc_lock); return -EINVAL; } @@ -188,7 +187,7 @@ static inline int set_rtc_time(struct rtc_time *time) CMOS_WRITE(save_control, RTC_CONTROL); CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); - spin_unlock_irqrestore(&rtc_lock, flags); + spin_unlock_irq(&rtc_lock); return 0; } diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 962cad7cf..0b49f9e07 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h @@ -14,6 +14,5 @@ extern char _end[]; extern char __per_cpu_start[], __per_cpu_end[]; extern char __kprobes_text_start[], __kprobes_text_end[]; extern char __initdata_begin[], __initdata_end[]; -extern char __start_rodata[], __end_rodata[]; #endif /* _ASM_GENERIC_SECTIONS_H_ */ diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h index dae1d8720..9418d6e9b 100644 --- a/include/asm-generic/signal.h +++ b/include/asm-generic/signal.h @@ -1,8 +1,3 @@ -#ifndef __ASM_GENERIC_SIGNAL_H -#define __ASM_GENERIC_SIGNAL_H - -#include - #ifndef SIG_BLOCK #define SIG_BLOCK 0 /* for blocking signals */ #endif @@ -24,5 +19,3 @@ typedef __restorefn_t __user *__sigrestore_t; #define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */ #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ #endif - -#endif /* __ASM_GENERIC_SIGNAL_H */ diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 867d9008f..8dbedfa92 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -13,7 +13,9 @@ #ifndef _ASM_GENERIC__TLB_H #define _ASM_GENERIC__TLB_H +#include #include +#include #include #include diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 253ae1328..9d11550b4 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -58,20 +58,6 @@ VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ } \ \ - /* Kernel symbol table: Normal unused symbols */ \ - __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \ - VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \ - *(__ksymtab_unused) \ - VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \ - } \ - \ - /* Kernel symbol table: GPL-only unused symbols */ \ - __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \ - VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \ - *(__ksymtab_unused_gpl) \ - VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \ - } \ - \ /* Kernel symbol table: GPL-future-only symbols */ \ __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ @@ -93,20 +79,6 @@ VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ } \ \ - /* Kernel symbol table: Normal unused symbols */ \ - __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \ - VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \ - *(__kcrctab_unused) \ - VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \ - } \ - \ - /* Kernel symbol table: GPL-only unused symbols */ \ - __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ - VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ - *(__kcrctab_unused_gpl) \ - VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \ - } \ - \ /* Kernel symbol table: GPL-future-only symbols */ \ __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ @@ -194,6 +166,3 @@ .stab.index 0 : { *(.stab.index) } \ .stab.indexstr 0 : { *(.stab.indexstr) } \ .comment 0 : { *(.comment) } - -#define NOTES \ - .notes : { *(.note.*) } :note diff --git a/include/asm-h8300/Kbuild b/include/asm-h8300/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-h8300/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h index d76299c98..574f57b6c 100644 --- a/include/asm-h8300/bitops.h +++ b/include/asm-h8300/bitops.h @@ -6,6 +6,7 @@ * Copyright 2002, Yoshinori Sato */ +#include #include #include diff --git a/include/asm-h8300/dma.h b/include/asm-h8300/dma.h index 3edbaaaed..3708681b7 100644 --- a/include/asm-h8300/dma.h +++ b/include/asm-h8300/dma.h @@ -1,6 +1,7 @@ #ifndef _H8300_DMA_H #define _H8300_DMA_H +#include /* * Set number of channels of DMA on ColdFire for different implementations. diff --git a/include/asm-h8300/elf.h b/include/asm-h8300/elf.h index 7ba6a0af4..f4af1553a 100644 --- a/include/asm-h8300/elf.h +++ b/include/asm-h8300/elf.h @@ -5,6 +5,7 @@ * ELF register definitions.. */ +#include #include #include diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h index 18fa7931e..e961bfe20 100644 --- a/include/asm-h8300/hardirq.h +++ b/include/asm-h8300/hardirq.h @@ -2,6 +2,7 @@ #define __H8300_HARDIRQ_H #include +#include #include #include #include diff --git a/include/asm-h8300/io.h b/include/asm-h8300/io.h index 91b7487cb..1773e373e 100644 --- a/include/asm-h8300/io.h +++ b/include/asm-h8300/io.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include #if defined(CONFIG_H83007) || defined(CONFIG_H83068) diff --git a/include/asm-h8300/irq.h b/include/asm-h8300/irq.h index 42a3ac424..73065f5bd 100644 --- a/include/asm-h8300/irq.h +++ b/include/asm-h8300/irq.h @@ -63,4 +63,8 @@ extern void enable_irq(unsigned int); extern void disable_irq(unsigned int); #define disable_irq_nosync(x) disable_irq(x) +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif /* _H8300_IRQ_H_ */ diff --git a/include/asm-h8300/keyboard.h b/include/asm-h8300/keyboard.h index fbad65e8a..b05d11387 100644 --- a/include/asm-h8300/keyboard.h +++ b/include/asm-h8300/keyboard.h @@ -7,6 +7,7 @@ #ifndef _H8300_KEYBOARD_H #define _H8300_KEYBOARD_H +#include /* dummy i.e. no real keyboard */ #define kbd_setkeycode(x...) (-ENOSYS) diff --git a/include/asm-h8300/mmu_context.h b/include/asm-h8300/mmu_context.h index 855721a5d..23b555b7b 100644 --- a/include/asm-h8300/mmu_context.h +++ b/include/asm-h8300/mmu_context.h @@ -1,6 +1,7 @@ #ifndef __H8300_MMU_CONTEXT_H #define __H8300_MMU_CONTEXT_H +#include #include #include #include diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index f3299755a..b9ff136c5 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h @@ -1,7 +1,7 @@ #ifndef _H8300_PAGE_H #define _H8300_PAGE_H -#ifdef __KERNEL__ +#include /* PAGE_SHIFT determines the page size */ @@ -9,6 +9,8 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #include #ifndef __ASSEMBLY__ @@ -65,6 +67,7 @@ extern unsigned long memory_end; #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT) #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) +#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) #define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) #define pfn_valid(page) (page < max_mapnr) @@ -75,11 +78,11 @@ extern unsigned long memory_end; #endif /* __ASSEMBLY__ */ -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include +#include + #endif /* _H8300_PAGE_H */ diff --git a/include/asm-h8300/page_offset.h b/include/asm-h8300/page_offset.h index f87064630..8cc6e1721 100644 --- a/include/asm-h8300/page_offset.h +++ b/include/asm-h8300/page_offset.h @@ -1,3 +1,4 @@ +#include #define PAGE_OFFSET_RAW 0x00000000 diff --git a/include/asm-h8300/param.h b/include/asm-h8300/param.h index c25806ed1..126dddf72 100644 --- a/include/asm-h8300/param.h +++ b/include/asm-h8300/param.h @@ -1,6 +1,7 @@ #ifndef _H8300_PARAM_H #define _H8300_PARAM_H +#include #ifndef HZ #define HZ 100 diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h index 8b7c68579..f6e296fc1 100644 --- a/include/asm-h8300/pgtable.h +++ b/include/asm-h8300/pgtable.h @@ -3,6 +3,7 @@ #include +#include #include #include #include diff --git a/include/asm-h8300/processor.h b/include/asm-h8300/processor.h index 99b664aa2..c6f0a7108 100644 --- a/include/asm-h8300/processor.h +++ b/include/asm-h8300/processor.h @@ -17,7 +17,7 @@ */ #define current_text_addr() ({ __label__ _l; _l: &&_l;}) -#include +#include #include #include #include @@ -130,6 +130,6 @@ unsigned long get_wchan(struct task_struct *p); eip; }) #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) #endif diff --git a/include/asm-h8300/semaphore-helper.h b/include/asm-h8300/semaphore-helper.h index 4fea36be5..29e0fbf1a 100644 --- a/include/asm-h8300/semaphore-helper.h +++ b/include/asm-h8300/semaphore-helper.h @@ -10,6 +10,7 @@ * m68k version by Andreas Schwab */ +#include #include /* diff --git a/include/asm-h8300/shm.h b/include/asm-h8300/shm.h index ed6623c05..bec758524 100644 --- a/include/asm-h8300/shm.h +++ b/include/asm-h8300/shm.h @@ -1,6 +1,7 @@ #ifndef _H8300_SHM_H #define _H8300_SHM_H +#include /* format of page table entries that correspond to shared memory pages currently out in swap space (see also mm/swap.c): diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h index 7bc15048a..8eccdc176 100644 --- a/include/asm-h8300/signal.h +++ b/include/asm-h8300/signal.h @@ -74,6 +74,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -93,6 +94,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-h8300/socket.h b/include/asm-h8300/socket.h index ebc830fee..d98cf85ba 100644 --- a/include/asm-h8300/socket.h +++ b/include/asm-h8300/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h index 5084a9d42..8e81cf665 100644 --- a/include/asm-h8300/system.h +++ b/include/asm-h8300/system.h @@ -1,6 +1,7 @@ #ifndef _H8300_SYSTEM_H #define _H8300_SYSTEM_H +#include /* get configuration macros */ #include /* @@ -84,6 +85,7 @@ asmlinkage void resume(void); #define wmb() asm volatile ("" : : :"memory") #define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h index ffb67f472..8a9396117 100644 --- a/include/asm-h8300/unaligned.h +++ b/include/asm-h8300/unaligned.h @@ -1,6 +1,7 @@ #ifndef __H8300_UNALIGNED_H #define __H8300_UNALIGNED_H +#include /* Use memmove here, so gcc does not insert a __builtin_memcpy. */ diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h index 226dd596c..adb051593 100644 --- a/include/asm-h8300/unistd.h +++ b/include/asm-h8300/unistd.h @@ -292,8 +292,6 @@ #define __NR_request_key 287 #define __NR_keyctl 288 -#ifdef __KERNEL__ - #define NR_syscalls 289 @@ -462,6 +460,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \ __syscall_return(type, __res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -484,6 +483,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -534,7 +534,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -543,5 +543,4 @@ asmlinkage long sys_rt_sigaction(int sig, asm (".weak\t_" #name "\n" \ ".set\t_" #name ",_sys_ni_syscall"); -#endif /* __KERNEL__ */ #endif /* _ASM_H8300_UNISTD_H_ */ diff --git a/include/asm-h8300/virtconvert.h b/include/asm-h8300/virtconvert.h index ee7d5ea10..3b344c1df 100644 --- a/include/asm-h8300/virtconvert.h +++ b/include/asm-h8300/virtconvert.h @@ -7,6 +7,7 @@ #ifdef __KERNEL__ +#include #include #include diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild deleted file mode 100644 index b75a348d0..000000000 --- a/include/asm-i386/Kbuild +++ /dev/null @@ -1,10 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += boot.h -header-y += debugreg.h -header-y += ldt.h -header-y += ucontext.h - -unifdef-y += mtrr.h -unifdef-y += setup.h -unifdef-y += vm86.h diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index b01a7ec40..d79e9ee10 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h @@ -5,8 +5,6 @@ #include -#include - struct alt_instr { u8 *instr; /* original instruction */ u8 *replacement; @@ -19,19 +17,11 @@ struct alt_instr { extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); struct module; -#ifdef CONFIG_SMP extern void alternatives_smp_module_add(struct module *mod, char *name, void *locks, void *locks_end, void *text, void *text_end); extern void alternatives_smp_module_del(struct module *mod); extern void alternatives_smp_switch(int smp); -#else -static inline void alternatives_smp_module_add(struct module *mod, char *name, - void *locks, void *locks_end, - void *text, void *text_end) {} -static inline void alternatives_smp_module_del(struct module *mod) {} -static inline void alternatives_smp_switch(int smp) {} -#endif #endif @@ -88,6 +78,9 @@ static inline void alternatives_smp_switch(int smp) {} /* * Alternative inline assembly for SMP. * + * alternative_smp() takes two versions (SMP first, UP second) and is + * for more complex stuff such as spinlocks. + * * The LOCK_PREFIX macro defined here replaces the LOCK and * LOCK_PREFIX macros used everywhere in the source tree. * @@ -107,6 +100,21 @@ static inline void alternatives_smp_switch(int smp) {} */ #ifdef CONFIG_SMP +#define alternative_smp(smpinstr, upinstr, args...) \ + asm volatile ("661:\n\t" smpinstr "\n662:\n" \ + ".section .smp_altinstructions,\"a\"\n" \ + " .align 4\n" \ + " .long 661b\n" /* label */ \ + " .long 663f\n" /* new instruction */ \ + " .byte 0x68\n" /* X86_FEATURE_UP */ \ + " .byte 662b-661b\n" /* sourcelen */ \ + " .byte 664f-663f\n" /* replacementlen */ \ + ".previous\n" \ + ".section .smp_altinstr_replacement,\"awx\"\n" \ + "663:\n\t" upinstr "\n" /* replacement */ \ + "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \ + ".previous" : args) + #define LOCK_PREFIX \ ".section .smp_locks,\"a\"\n" \ " .align 4\n" \ @@ -115,6 +123,8 @@ static inline void alternatives_smp_switch(int smp) {} "661:\n\tlock; " #else /* ! CONFIG_SMP */ +#define alternative_smp(smpinstr, upinstr, args...) \ + asm volatile (upinstr : args) #define LOCK_PREFIX "" #endif diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 906dc53d5..87476de38 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h @@ -1,6 +1,7 @@ #ifndef __ASM_APIC_H #define __ASM_APIC_H +#include #include #include #include @@ -111,12 +112,24 @@ extern void init_apic_mappings (void); extern void smp_local_timer_interrupt (struct pt_regs * regs); extern void setup_boot_APIC_clock (void); extern void setup_secondary_APIC_clock (void); +extern void setup_apic_nmi_watchdog (void); +extern int reserve_lapic_nmi(void); +extern void release_lapic_nmi(void); +extern void disable_timer_nmi_watchdog(void); +extern void enable_timer_nmi_watchdog(void); +extern void nmi_watchdog_tick (struct pt_regs * regs); extern int APIC_init_uniprocessor (void); extern void disable_APIC_timer(void); extern void enable_APIC_timer(void); extern void enable_NMI_through_LVT0 (void * dummy); +extern unsigned int nmi_watchdog; +#define NMI_NONE 0 +#define NMI_IO_APIC 1 +#define NMI_LOCAL_APIC 2 +#define NMI_INVALID 3 + extern int disable_timer_pin_1; #ifndef CONFIG_XEN @@ -128,6 +141,8 @@ void switch_ipi_to_APIC_timer(void *cpumask); extern int timer_over_8254; +extern int modern_apic(void); + #else /* !CONFIG_X86_LOCAL_APIC */ static inline void lapic_shutdown(void) { } diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index 9f6995341..5e4a35af2 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h @@ -121,6 +121,7 @@ */ #define u32 unsigned int +#define lapic ((volatile struct local_apic *)APIC_BASE) struct local_apic { diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index 51a166242..4ddce5296 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -1,6 +1,7 @@ #ifndef __ARCH_I386_ATOMIC__ #define __ARCH_I386_ATOMIC__ +#include #include #include @@ -46,8 +47,8 @@ static __inline__ void atomic_add(int i, atomic_t *v) { __asm__ __volatile__( LOCK_PREFIX "addl %1,%0" - :"+m" (v->counter) - :"ir" (i)); + :"=m" (v->counter) + :"ir" (i), "m" (v->counter)); } /** @@ -61,8 +62,8 @@ static __inline__ void atomic_sub(int i, atomic_t *v) { __asm__ __volatile__( LOCK_PREFIX "subl %1,%0" - :"+m" (v->counter) - :"ir" (i)); + :"=m" (v->counter) + :"ir" (i), "m" (v->counter)); } /** @@ -80,8 +81,8 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) __asm__ __volatile__( LOCK_PREFIX "subl %2,%0; sete %1" - :"+m" (v->counter), "=qm" (c) - :"ir" (i) : "memory"); + :"=m" (v->counter), "=qm" (c) + :"ir" (i), "m" (v->counter) : "memory"); return c; } @@ -95,7 +96,8 @@ static __inline__ void atomic_inc(atomic_t *v) { __asm__ __volatile__( LOCK_PREFIX "incl %0" - :"+m" (v->counter)); + :"=m" (v->counter) + :"m" (v->counter)); } /** @@ -108,7 +110,8 @@ static __inline__ void atomic_dec(atomic_t *v) { __asm__ __volatile__( LOCK_PREFIX "decl %0" - :"+m" (v->counter)); + :"=m" (v->counter) + :"m" (v->counter)); } /** @@ -125,8 +128,8 @@ static __inline__ int atomic_dec_and_test(atomic_t *v) __asm__ __volatile__( LOCK_PREFIX "decl %0; sete %1" - :"+m" (v->counter), "=qm" (c) - : : "memory"); + :"=m" (v->counter), "=qm" (c) + :"m" (v->counter) : "memory"); return c != 0; } @@ -144,8 +147,8 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) __asm__ __volatile__( LOCK_PREFIX "incl %0; sete %1" - :"+m" (v->counter), "=qm" (c) - : : "memory"); + :"=m" (v->counter), "=qm" (c) + :"m" (v->counter) : "memory"); return c != 0; } @@ -164,8 +167,8 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) __asm__ __volatile__( LOCK_PREFIX "addl %2,%0; sets %1" - :"+m" (v->counter), "=qm" (c) - :"ir" (i) : "memory"); + :"=m" (v->counter), "=qm" (c) + :"ir" (i), "m" (v->counter) : "memory"); return c; } diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 1c780fa1e..08deaeee6 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h @@ -5,6 +5,7 @@ * Copyright 1992, Linus Torvalds. */ +#include #include #include diff --git a/include/asm-i386/bug.h b/include/asm-i386/bug.h index 8062cdbf2..8f79de19e 100644 --- a/include/asm-i386/bug.h +++ b/include/asm-i386/bug.h @@ -1,6 +1,7 @@ #ifndef _I386_BUG_H #define _I386_BUG_H +#include /* * Tell the user there is some problem. diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h index 2a9e4ee59..50233e034 100644 --- a/include/asm-i386/bugs.h +++ b/include/asm-i386/bugs.h @@ -17,6 +17,7 @@ * void check_bugs(void); */ +#include #include #include #include diff --git a/include/asm-i386/byteorder.h b/include/asm-i386/byteorder.h index a45470a8b..a0d73f48d 100644 --- a/include/asm-i386/byteorder.h +++ b/include/asm-i386/byteorder.h @@ -8,6 +8,7 @@ /* For avoiding bswap on i386 */ #ifdef __KERNEL__ +#include #endif static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) diff --git a/include/asm-i386/cache.h b/include/asm-i386/cache.h index 57c62f414..ca15c9c66 100644 --- a/include/asm-i386/cache.h +++ b/include/asm-i386/cache.h @@ -4,6 +4,7 @@ #ifndef __ARCH_I386_CACHE_H #define __ARCH_I386_CACHE_H +#include /* L1 cache line size */ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) diff --git a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h index b1bc7b1b6..e7252c216 100644 --- a/include/asm-i386/cpu.h +++ b/include/asm-i386/cpu.h @@ -7,6 +7,8 @@ #include #include +#include + struct i386_cpu { struct cpu cpu; }; diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index d314ebb3d..b44bfc623 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h @@ -72,7 +72,6 @@ #define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */ #define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ -#define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ @@ -89,12 +88,6 @@ #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */ #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */ #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ -#define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */ -#define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */ -#define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */ -#define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */ -#define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */ -#define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */ /* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ #define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */ @@ -128,12 +121,6 @@ #define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) #define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) #define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) -#define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2) -#define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN) -#define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE) -#define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN) -#define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM) -#define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) #endif /* __ASM_I386_CPUFEATURE_H */ diff --git a/include/asm-i386/delay.h b/include/asm-i386/delay.h index b1c7650dc..456db8501 100644 --- a/include/asm-i386/delay.h +++ b/include/asm-i386/delay.h @@ -23,6 +23,4 @@ extern void __delay(unsigned long loops); ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ __ndelay(n)) -void use_tsc_delay(void); - #endif /* defined(_I386_DELAY_H) */ diff --git a/include/asm-i386/dma.h b/include/asm-i386/dma.h index d23aac8e1..f24b2bba2 100644 --- a/include/asm-i386/dma.h +++ b/include/asm-i386/dma.h @@ -8,6 +8,7 @@ #ifndef _ASM_DMA_H #define _ASM_DMA_H +#include #include /* And spinlocks */ #include /* need byte IO */ #include diff --git a/include/asm-i386/dwarf2.h b/include/asm-i386/dwarf2.h deleted file mode 100644 index 5d1a8db5a..000000000 --- a/include/asm-i386/dwarf2.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _DWARF2_H -#define _DWARF2_H - -#ifndef __ASSEMBLY__ -#warning "asm/dwarf2.h should be only included in pure assembly files" -#endif - -/* - Macros for dwarf2 CFI unwind table entries. - See "as.info" for details on these pseudo ops. Unfortunately - they are only supported in very new binutils, so define them - away for older version. - */ - -#ifdef CONFIG_UNWIND_INFO - -#define CFI_STARTPROC .cfi_startproc -#define CFI_ENDPROC .cfi_endproc -#define CFI_DEF_CFA .cfi_def_cfa -#define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register -#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset -#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset -#define CFI_OFFSET .cfi_offset -#define CFI_REL_OFFSET .cfi_rel_offset -#define CFI_REGISTER .cfi_register -#define CFI_RESTORE .cfi_restore -#define CFI_REMEMBER_STATE .cfi_remember_state -#define CFI_RESTORE_STATE .cfi_restore_state -#define CFI_UNDEFINED .cfi_undefined - -#else - -/* Due to the structure of pre-exisiting code, don't use assembler line - comment character # to ignore the arguments. Instead, use a dummy macro. */ -.macro ignore a=0, b=0, c=0, d=0 -.endm - -#define CFI_STARTPROC ignore -#define CFI_ENDPROC ignore -#define CFI_DEF_CFA ignore -#define CFI_DEF_CFA_REGISTER ignore -#define CFI_DEF_CFA_OFFSET ignore -#define CFI_ADJUST_CFA_OFFSET ignore -#define CFI_OFFSET ignore -#define CFI_REL_OFFSET ignore -#define CFI_REGISTER ignore -#define CFI_RESTORE ignore -#define CFI_REMEMBER_STATE ignore -#define CFI_RESTORE_STATE ignore -#define CFI_UNDEFINED ignore - -#endif - -#endif diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index f3de7f3b3..ffef1f337 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h @@ -7,7 +7,10 @@ #include #include +#include +#include /* for savesegment */ #include +#include #include @@ -45,12 +48,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t; #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_386 -#ifdef __KERNEL__ - -#include -#include /* for savesegment */ -#include - /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx contains a pointer to a function which might be registered using `atexit'. This provides a mean for the dynamic linker to call DT_FINI functions for @@ -114,6 +111,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t; #define ELF_PLATFORM (vx_new_uts(machine)) +#ifdef __KERNEL__ #define SET_PERSONALITY(ex, ibcs2) do { } while (0) /* @@ -132,44 +130,31 @@ extern int dump_task_extended_fpu (struct task_struct *, struct user_fxsr_struct #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) -#define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) -#define VDSO_BASE ((unsigned long)current->mm->context.vdso) - -#ifdef CONFIG_COMPAT_VDSO -# define VDSO_COMPAT_BASE VDSO_HIGH_BASE -# define VDSO_PRELINK VDSO_HIGH_BASE -#else -# define VDSO_COMPAT_BASE VDSO_BASE -# define VDSO_PRELINK 0 -#endif - -#define VDSO_COMPAT_SYM(x) \ - (VDSO_COMPAT_BASE + (unsigned long)(x) - VDSO_PRELINK) - -#define VDSO_SYM(x) \ - (VDSO_BASE + (unsigned long)(x) - VDSO_PRELINK) - -#define VDSO_HIGH_EHDR ((const struct elfhdr *) VDSO_HIGH_BASE) -#define VDSO_EHDR ((const struct elfhdr *) VDSO_COMPAT_BASE) - extern void __kernel_vsyscall; - -#define VDSO_ENTRY VDSO_SYM(&__kernel_vsyscall) +#define VSYSCALL_BASE ((unsigned long)current->mm->context.vdso) +#define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) +#define VSYSCALL_OFFSET ((unsigned long) &__kernel_vsyscall) +#define VSYSCALL_ENTRY (VSYSCALL_BASE + VSYSCALL_OFFSET) + +/* kernel-internal fixmap address: */ +#define __VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) +#define __VSYSCALL_EHDR ((const struct elfhdr *) __VSYSCALL_BASE) + +#define ARCH_DLINFO \ +do { \ + if (VSYSCALL_BASE) { \ + NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ + NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ + } \ +} while (0) #define ARCH_HAS_SETUP_ADDITIONAL_PAGES struct linux_binprm; extern int arch_setup_additional_pages(struct linux_binprm *bprm, - int executable_stack, unsigned long start_code, - unsigned long interp_map_address); - -extern unsigned int vdso_enabled; - -#define ARCH_DLINFO \ -do if (vdso_enabled) { \ - NEW_AUX_ENT(AT_SYSINFO, VDSO_ENTRY); \ - NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_COMPAT_BASE); \ -} while (0) + int executable_stack, unsigned long start_code, + unsigned long interp_map_address); +#if 0 /* Disabled for exec-shield, where a normal vma holds the vDSO. */ /* * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out * extra segments containing the vsyscall DSO contents. Dumping its @@ -178,15 +163,15 @@ do if (vdso_enabled) { \ * 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 (VDSO_HIGH_EHDR->e_phnum) +#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 *) (VDSO_HIGH_BASE \ - + VDSO_HIGH_EHDR->e_phoff); \ + (const struct elf_phdr *) (__VSYSCALL_BASE \ + + __VSYSCALL_EHDR->e_phoff); \ int i; \ Elf32_Off ofs = 0; \ - for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ + for (i = 0; i < __VSYSCALL_EHDR->e_phnum; ++i) { \ struct elf_phdr phdr = vsyscall_phdrs[i]; \ if (phdr.p_type == PT_LOAD) { \ BUG_ON(ofs != 0); \ @@ -204,19 +189,23 @@ do { \ #define ELF_CORE_WRITE_EXTRA_DATA \ do { \ const struct elf_phdr *const vsyscall_phdrs = \ - (const struct elf_phdr *) (VDSO_HIGH_BASE \ - + VDSO_HIGH_EHDR->e_phoff); \ + (const struct elf_phdr *) (__VSYSCALL_BASE \ + + __VSYSCALL_EHDR->e_phoff); \ int i; \ - for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++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, \ PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ } \ } while (0) +#endif #endif #define __HAVE_ARCH_RANDOMIZE_BRK extern void randomize_brk(unsigned long old_brk); +#define __HAVE_ARCH_VSYSCALL +extern void map_vsyscall(void); + #endif diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index 591c5536f..f11513aa9 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h @@ -13,14 +13,14 @@ #ifndef _ASM_FIXMAP_H #define _ASM_FIXMAP_H +#include /* used by vmalloc.c, vsyscall.lds.S. * * Leave one empty page between vmalloc'ed areas and * the start of the fixmap. */ - -#define __FIXADDR_TOP 0xfffff000 +extern unsigned long __FIXADDR_TOP; #ifndef __ASSEMBLY__ #include @@ -52,7 +52,7 @@ */ enum fixed_addresses { FIX_HOLE, - FIX_VDSO, + FIX_VSYSCALL, #ifdef CONFIG_X86_LOCAL_APIC FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ #endif @@ -95,6 +95,8 @@ enum fixed_addresses { extern void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags); +extern void set_fixaddr_top(unsigned long top); + #define set_fixmap(idx, phys) \ __set_fixmap(idx, phys, PAGE_KERNEL) /* @@ -116,6 +118,14 @@ extern void __set_fixmap (enum fixed_addresses idx, #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); /* diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index 359ead60b..03403045c 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h @@ -144,11 +144,12 @@ static int vdma_get_dma_residue(unsigned int dummy) static int fd_request_irq(void) { if(can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); else return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); } diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h index 946d97cfe..7b8ceefd0 100644 --- a/include/asm-i386/futex.h +++ b/include/asm-i386/futex.h @@ -20,8 +20,8 @@ .align 8\n\ .long 1b,3b\n\ .previous" \ - : "=r" (oldval), "=r" (ret), "+m" (*uaddr) \ - : "i" (-EFAULT), "0" (oparg), "1" (0)) + : "=r" (oldval), "=r" (ret), "=m" (*uaddr) \ + : "i" (-EFAULT), "m" (*uaddr), "0" (oparg), "1" (0)) #define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \ __asm__ __volatile ( \ @@ -38,9 +38,9 @@ .align 8\n\ .long 1b,4b,2b,4b\n\ .previous" \ - : "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \ + : "=&a" (oldval), "=&r" (ret), "=m" (*uaddr), \ "=&r" (tem) \ - : "r" (oparg), "i" (-EFAULT), "1" (0)) + : "r" (oparg), "i" (-EFAULT), "m" (*uaddr), "1" (0)) static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) @@ -123,7 +123,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) " .long 1b,3b \n" " .previous \n" - : "=a" (oldval), "+m" (*uaddr) + : "=a" (oldval), "=m" (*uaddr) : "i" (-EFAULT), "r" (newval), "0" (oldval) : "memory" ); diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h index 0e358dc40..ee754d359 100644 --- a/include/asm-i386/hardirq.h +++ b/include/asm-i386/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include diff --git a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h index e9a34ebc2..0fd331306 100644 --- a/include/asm-i386/highmem.h +++ b/include/asm-i386/highmem.h @@ -20,6 +20,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index af5d43551..7f1a8a6ee 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h @@ -27,6 +27,7 @@ #include #include +#include #include diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 87e5a351d..622815bf3 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h @@ -12,6 +12,7 @@ * */ +#include #include #include #include @@ -19,8 +20,6 @@ struct hw_interrupt_type; -#define NMI_VECTOR 0x02 - /* * Various low-level irq details needed by irq.c, process.c, * time.c, io_apic.c and smp.c @@ -69,4 +68,14 @@ extern atomic_t irq_mis_count; #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) +#if defined(CONFIG_X86_IO_APIC) +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{ + if (IO_APIC_IRQ(i)) + send_IPI_self(IO_APIC_VECTOR(i)); +} +#else +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} +#endif + #endif /* _ASM_HW_IRQ_H */ diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 73465d289..454440193 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ +#include #ifndef MAX_HWIFS # ifdef CONFIG_BLK_DEV_IDEPCI diff --git a/include/asm-i386/intel_arch_perfmon.h b/include/asm-i386/intel_arch_perfmon.h deleted file mode 100644 index 134ea9cc5..000000000 --- a/include/asm-i386/intel_arch_perfmon.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef X86_INTEL_ARCH_PERFMON_H -#define X86_INTEL_ARCH_PERFMON_H 1 - -#define MSR_ARCH_PERFMON_PERFCTR0 0xc1 -#define MSR_ARCH_PERFMON_PERFCTR1 0xc2 - -#define MSR_ARCH_PERFMON_EVENTSEL0 0x186 -#define MSR_ARCH_PERFMON_EVENTSEL1 0x187 - -#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22) -#define ARCH_PERFMON_EVENTSEL_INT (1 << 20) -#define ARCH_PERFMON_EVENTSEL_OS (1 << 17) -#define ARCH_PERFMON_EVENTSEL_USR (1 << 16) - -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c) -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT (1 << 0) - -#endif /* X86_INTEL_ARCH_PERFMON_H */ diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index b3724fe93..79670bb4b 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h @@ -1,6 +1,7 @@ #ifndef _ASM_IO_H #define _ASM_IO_H +#include #include #include diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 5092e819b..d92e253f7 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h @@ -1,6 +1,7 @@ #ifndef __ASM_IO_APIC_H #define __ASM_IO_APIC_H +#include #include #include diff --git a/include/asm-i386/irq.h b/include/asm-i386/irq.h index 331726b41..5169d7af4 100644 --- a/include/asm-i386/irq.h +++ b/include/asm-i386/irq.h @@ -10,6 +10,7 @@ * */ +#include #include /* include comes from machine specific directory */ #include "irq_vectors.h" diff --git a/include/asm-i386/irqflags.h b/include/asm-i386/irqflags.h deleted file mode 100644 index e1bdb97c0..000000000 --- a/include/asm-i386/irqflags.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * include/asm-i386/irqflags.h - * - * IRQ flags handling - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() functions from the lowlevel headers. - */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -#ifndef __ASSEMBLY__ - -static inline unsigned long __raw_local_save_flags(void) -{ - unsigned long flags; - - __asm__ __volatile__( - "pushfl ; popl %0" - : "=g" (flags) - : /* no input */ - ); - - return flags; -} - -#define raw_local_save_flags(flags) \ - do { (flags) = __raw_local_save_flags(); } while (0) - -static inline void raw_local_irq_restore(unsigned long flags) -{ - __asm__ __volatile__( - "pushl %0 ; popfl" - : /* no output */ - :"g" (flags) - :"memory", "cc" - ); -} - -static inline void raw_local_irq_disable(void) -{ - __asm__ __volatile__("cli" : : : "memory"); -} - -static inline void raw_local_irq_enable(void) -{ - __asm__ __volatile__("sti" : : : "memory"); -} - -/* - * Used in the idle loop; sti takes one instruction cycle - * to complete: - */ -static inline void raw_safe_halt(void) -{ - __asm__ __volatile__("sti; hlt" : : : "memory"); -} - -/* - * Used when interrupts are already enabled or to - * shutdown the processor: - */ -static inline void halt(void) -{ - __asm__ __volatile__("hlt": : :"memory"); -} - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return !(flags & (1 << 9)); -} - -static inline int raw_irqs_disabled(void) -{ - unsigned long flags = __raw_local_save_flags(); - - return raw_irqs_disabled_flags(flags); -} - -/* - * For spinlocks, etc: - */ -static inline unsigned long __raw_local_irq_save(void) -{ - unsigned long flags = __raw_local_save_flags(); - - raw_local_irq_disable(); - - return flags; -} - -#define raw_local_irq_save(flags) \ - do { (flags) = __raw_local_irq_save(); } while (0) - -#endif /* __ASSEMBLY__ */ - -/* - * Do the CPU's IRQ-state tracing from assembly code. We call a - * C function, so save all the C-clobbered registers: - */ -#ifdef CONFIG_TRACE_IRQFLAGS - -# define TRACE_IRQS_ON \ - pushl %eax; \ - pushl %ecx; \ - pushl %edx; \ - call trace_hardirqs_on; \ - popl %edx; \ - popl %ecx; \ - popl %eax; - -# define TRACE_IRQS_OFF \ - pushl %eax; \ - pushl %ecx; \ - pushl %edx; \ - call trace_hardirqs_off; \ - popl %edx; \ - popl %ecx; \ - popl %eax; - -#else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF -#endif - -#endif diff --git a/include/asm-i386/k8.h b/include/asm-i386/k8.h deleted file mode 100644 index dfd88a6e6..000000000 --- a/include/asm-i386/k8.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index d18cdb9fc..96d0828ce 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h @@ -19,8 +19,6 @@ struct die_args { extern int register_die_notifier(struct notifier_block *); extern int unregister_die_notifier(struct notifier_block *); -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); extern struct atomic_notifier_head i386die_chain; diff --git a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h index 806aae3c5..6886a0c3f 100644 --- a/include/asm-i386/kmap_types.h +++ b/include/asm-i386/kmap_types.h @@ -1,6 +1,7 @@ #ifndef _ASM_KMAP_TYPES_H #define _ASM_KMAP_TYPES_H +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 8774d0668..57d157c5c 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h @@ -44,8 +44,6 @@ typedef u8 kprobe_opcode_t; #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry #define ARCH_SUPPORTS_KRETPROBES -#define ARCH_INACTIVE_KPROBE_COUNT 0 -#define flush_insn_slot(p) do { } while (0) void arch_remove_kprobe(struct kprobe *p); void kretprobe_trampoline(void); diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h index 12060e22f..e67fa0826 100644 --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h @@ -17,30 +17,32 @@ static __inline__ void local_inc(local_t *v) { __asm__ __volatile__( "incl %0" - :"+m" (v->counter)); + :"=m" (v->counter) + :"m" (v->counter)); } static __inline__ void local_dec(local_t *v) { __asm__ __volatile__( "decl %0" - :"+m" (v->counter)); + :"=m" (v->counter) + :"m" (v->counter)); } static __inline__ void local_add(long i, local_t *v) { __asm__ __volatile__( "addl %1,%0" - :"+m" (v->counter) - :"ir" (i)); + :"=m" (v->counter) + :"ir" (i), "m" (v->counter)); } static __inline__ void local_sub(long i, local_t *v) { __asm__ __volatile__( "subl %1,%0" - :"+m" (v->counter) - :"ir" (i)); + :"=m" (v->counter) + :"ir" (i), "m" (v->counter)); } /* On x86, these are no better than the atomic variants. */ @@ -53,26 +55,12 @@ static __inline__ void local_sub(long i, local_t *v) * much more efficient than these naive implementations. Note they take * a variable, not an address. */ - -/* Need to disable preemption for the cpu local counters otherwise we could - still access a variable of a previous CPU in a non atomic way. */ -#define cpu_local_wrap_v(v) \ - ({ local_t res__; \ - preempt_disable(); \ - res__ = (v); \ - preempt_enable(); \ - res__; }) -#define cpu_local_wrap(v) \ - ({ preempt_disable(); \ - v; \ - preempt_enable(); }) \ - -#define cpu_local_read(v) cpu_local_wrap_v(local_read(&__get_cpu_var(v))) -#define cpu_local_set(v, i) cpu_local_wrap(local_set(&__get_cpu_var(v), (i))) -#define cpu_local_inc(v) cpu_local_wrap(local_inc(&__get_cpu_var(v))) -#define cpu_local_dec(v) cpu_local_wrap(local_dec(&__get_cpu_var(v))) -#define cpu_local_add(i, v) cpu_local_wrap(local_add((i), &__get_cpu_var(v))) -#define cpu_local_sub(i, v) cpu_local_wrap(local_sub((i), &__get_cpu_var(v))) +#define cpu_local_read(v) local_read(&__get_cpu_var(v)) +#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) +#define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) +#define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) +#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) +#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) #define __cpu_local_inc(v) cpu_local_inc(v) #define __cpu_local_dec(v) cpu_local_dec(v) diff --git a/include/asm-i386/mach-default/mach_ipi.h b/include/asm-i386/mach-default/mach_ipi.h index 0dba244c8..a1d0072e3 100644 --- a/include/asm-i386/mach-default/mach_ipi.h +++ b/include/asm-i386/mach-default/mach_ipi.h @@ -1,9 +1,6 @@ #ifndef __ASM_MACH_IPI_H #define __ASM_MACH_IPI_H -/* Avoid include hell */ -#define NMI_VECTOR 0x02 - void send_IPI_mask_bitmask(cpumask_t mask, int vector); void __send_IPI_shortcut(unsigned int shortcut, int vector); @@ -16,7 +13,7 @@ static inline void send_IPI_mask(cpumask_t mask, int vector) static inline void __local_send_IPI_allbutself(int vector) { - if (no_broadcast || vector == NMI_VECTOR) { + if (no_broadcast) { cpumask_t mask = cpu_online_map; cpu_clear(smp_processor_id(), mask); @@ -27,7 +24,7 @@ static inline void __local_send_IPI_allbutself(int vector) static inline void __local_send_IPI_all(int vector) { - if (no_broadcast || vector == NMI_VECTOR) + if (no_broadcast) send_IPI_mask(cpu_online_map, vector); else __send_IPI_shortcut(APIC_DEST_ALLINC, vector); diff --git a/include/asm-i386/mach-default/mach_mpspec.h b/include/asm-i386/mach-default/mach_mpspec.h index 51c9a9775..6b5dadcf1 100644 --- a/include/asm-i386/mach-default/mach_mpspec.h +++ b/include/asm-i386/mach-default/mach_mpspec.h @@ -3,10 +3,6 @@ #define MAX_IRQ_SOURCES 256 -#if CONFIG_BASE_SMALL == 0 -#define MAX_MP_BUSSES 256 -#else #define MAX_MP_BUSSES 32 -#endif #endif /* __ASM_MACH_MPSPEC_H */ diff --git a/include/asm-i386/mach-default/mach_timer.h b/include/asm-i386/mach-default/mach_timer.h index 807992fd4..4b9703bb0 100644 --- a/include/asm-i386/mach-default/mach_timer.h +++ b/include/asm-i386/mach-default/mach_timer.h @@ -15,9 +15,7 @@ #ifndef _MACH_TIMER_H #define _MACH_TIMER_H -#define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ -#define CALIBRATE_LATCH \ - ((CLOCK_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000) +#define CALIBRATE_LATCH (5 * LATCH) static inline void mach_prepare_counter(void) { diff --git a/include/asm-i386/mach-default/setup_arch_post.h b/include/asm-i386/mach-default/setup_arch_post.h new file mode 100644 index 000000000..2fc488872 --- /dev/null +++ b/include/asm-i386/mach-default/setup_arch_post.h @@ -0,0 +1,40 @@ +/** + * machine_specific_memory_setup - Hook for machine specific memory setup. + * + * Description: + * This is included late in kernel/setup.c so that it can make + * use of all of the static functions. + **/ + +static char * __init machine_specific_memory_setup(void) +{ + char *who; + + + who = "BIOS-e820"; + + /* + * Try to copy the BIOS-supplied E820-map. + * + * Otherwise fake a memory map; one section from 0k->640k, + * the next section from 1mb->appropriate_mem_k + */ + sanitize_e820_map(E820_MAP, &E820_MAP_NR); + if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { + unsigned long mem_size; + + /* compare results from other methods and take the greater */ + if (ALT_MEM_K < EXT_MEM_K) { + mem_size = EXT_MEM_K; + who = "BIOS-88"; + } else { + mem_size = ALT_MEM_K; + who = "BIOS-e801"; + } + + e820.nr_map = 0; + add_memory_region(0, LOWMEMSIZE(), E820_RAM); + add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); + } + return who; +} diff --git a/include/asm-i386/mach-default/setup_arch.h b/include/asm-i386/mach-default/setup_arch_pre.h similarity index 100% rename from include/asm-i386/mach-default/setup_arch.h rename to include/asm-i386/mach-default/setup_arch_pre.h diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index 9fd073286..3d6d12937 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h @@ -1,6 +1,7 @@ #ifndef __ASM_MACH_APIC_H #define __ASM_MACH_APIC_H +#include #include #define esr_disable (1) diff --git a/include/asm-i386/mach-summit/mach_mpparse.h b/include/asm-i386/mach-summit/mach_mpparse.h index 942683991..1cce2b924 100644 --- a/include/asm-i386/mach-summit/mach_mpparse.h +++ b/include/asm-i386/mach-summit/mach_mpparse.h @@ -2,7 +2,6 @@ #define __ASM_MACH_MPPARSE_H #include -#include extern int use_cyclone; @@ -30,7 +29,6 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, (!strncmp(productid, "VIGIL SMP", 9) || !strncmp(productid, "EXA", 3) || !strncmp(productid, "RUTHLESS SMP", 12))){ - mark_tsc_unstable(); use_cyclone = 1; /*enable cyclone-timer*/ setup_summit(); return 1; @@ -44,7 +42,6 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) if (!strncmp(oem_id, "IBM", 3) && (!strncmp(oem_table_id, "SERVIGIL", 8) || !strncmp(oem_table_id, "EXA", 3))){ - mark_tsc_unstable(); use_cyclone = 1; /*enable cyclone-timer*/ setup_summit(); return 1; diff --git a/include/asm-i386/mach-visws/setup_arch_post.h b/include/asm-i386/mach-visws/setup_arch_post.h new file mode 100644 index 000000000..cdbd895a5 --- /dev/null +++ b/include/asm-i386/mach-visws/setup_arch_post.h @@ -0,0 +1,49 @@ +/* Hook for machine specific memory setup. + * + * This is included late in kernel/setup.c so that it can make use of all of + * the static functions. */ + +#define MB (1024 * 1024) + +unsigned long sgivwfb_mem_phys; +unsigned long sgivwfb_mem_size; + +long long mem_size __initdata = 0; + +static char * __init machine_specific_memory_setup(void) +{ + long long gfx_mem_size = 8 * MB; + + mem_size = ALT_MEM_K; + + if (!mem_size) { + printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n"); + mem_size = 128 * MB; + } + + /* + * this hardcodes the graphics memory to 8 MB + * it really should be sized dynamically (or at least + * set as a boot param) + */ + if (!sgivwfb_mem_size) { + printk(KERN_WARNING "Defaulting to 8 MB framebuffer size\n"); + sgivwfb_mem_size = 8 * MB; + } + + /* + * Trim to nearest MB + */ + sgivwfb_mem_size &= ~((1 << 20) - 1); + sgivwfb_mem_phys = mem_size - gfx_mem_size; + + add_memory_region(0, LOWMEMSIZE(), E820_RAM); + add_memory_region(HIGH_MEMORY, mem_size - sgivwfb_mem_size - HIGH_MEMORY, E820_RAM); + add_memory_region(sgivwfb_mem_phys, sgivwfb_mem_size, E820_RESERVED); + + return "PROM"; + + /* Remove gcc warnings */ + (void) sanitize_e820_map(NULL, NULL); + (void) copy_e820_map(NULL, 0); +} diff --git a/include/asm-i386/mach-visws/setup_arch.h b/include/asm-i386/mach-visws/setup_arch_pre.h similarity index 54% rename from include/asm-i386/mach-visws/setup_arch.h rename to include/asm-i386/mach-visws/setup_arch_pre.h index 33f700ef6..b92d6d9a4 100644 --- a/include/asm-i386/mach-visws/setup_arch.h +++ b/include/asm-i386/mach-visws/setup_arch_pre.h @@ -1,8 +1,5 @@ /* Hook to call BIOS initialisation function */ -extern unsigned long sgivwfb_mem_phys; -extern unsigned long sgivwfb_mem_size; - /* no action for visws */ #define ARCH_SETUP diff --git a/include/asm-i386/mach-voyager/setup_arch_post.h b/include/asm-i386/mach-voyager/setup_arch_post.h new file mode 100644 index 000000000..f6f6c2cbc --- /dev/null +++ b/include/asm-i386/mach-voyager/setup_arch_post.h @@ -0,0 +1,73 @@ +/* Hook for machine specific memory setup. + * + * This is included late in kernel/setup.c so that it can make use of all of + * the static functions. */ + +static char * __init machine_specific_memory_setup(void) +{ + char *who; + + who = "NOT VOYAGER"; + + if(voyager_level == 5) { + __u32 addr, length; + int i; + + who = "Voyager-SUS"; + + e820.nr_map = 0; + for(i=0; voyager_memory_detect(i, &addr, &length); i++) { + add_memory_region(addr, length, E820_RAM); + } + return who; + } else if(voyager_level == 4) { + __u32 tom; + __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8; + /* select the DINO config space */ + outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT); + /* Read DINO top of memory register */ + tom = ((inb(catbase + 0x4) & 0xf0) << 16) + + ((inb(catbase + 0x5) & 0x7f) << 24); + + if(inb(catbase) != VOYAGER_DINO) { + printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); + tom = (EXT_MEM_K)<<10; + } + who = "Voyager-TOM"; + add_memory_region(0, 0x9f000, E820_RAM); + /* map from 1M to top of memory */ + add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM); + /* FIXME: Should check the ASICs to see if I need to + * take out the 8M window. Just do it at the moment + * */ + add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED); + return who; + } + + who = "BIOS-e820"; + + /* + * Try to copy the BIOS-supplied E820-map. + * + * Otherwise fake a memory map; one section from 0k->640k, + * the next section from 1mb->appropriate_mem_k + */ + sanitize_e820_map(E820_MAP, &E820_MAP_NR); + if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { + unsigned long mem_size; + + /* compare results from other methods and take the greater */ + if (ALT_MEM_K < EXT_MEM_K) { + mem_size = EXT_MEM_K; + who = "BIOS-88"; + } else { + mem_size = ALT_MEM_K; + who = "BIOS-e801"; + } + + e820.nr_map = 0; + add_memory_region(0, LOWMEMSIZE(), E820_RAM); + add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); + } + return who; +} diff --git a/include/asm-i386/mach-voyager/setup_arch.h b/include/asm-i386/mach-voyager/setup_arch_pre.h similarity index 97% rename from include/asm-i386/mach-voyager/setup_arch.h rename to include/asm-i386/mach-voyager/setup_arch_pre.h index 84d01ad33..48f7e6ff4 100644 --- a/include/asm-i386/mach-voyager/setup_arch.h +++ b/include/asm-i386/mach-voyager/setup_arch_pre.h @@ -3,7 +3,7 @@ /* Hook to call BIOS initialisation function */ -/* for voyager, pass the voyager BIOS/SUS info area to the detection +/* for voyager, pass the voyager BIOS/SUS info area to the detection * routines */ #define ARCH_SETUP voyager_detect(VOYAGER_BIOS_INFO); diff --git a/include/asm-i386/mach-xen/asm/irqflags.h b/include/asm-i386/mach-xen/asm/irqflags.h deleted file mode 100644 index dc7fd071a..000000000 --- a/include/asm-i386/mach-xen/asm/irqflags.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * include/asm-i386/irqflags.h - * - * IRQ flags handling - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() functions from the lowlevel headers. - */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -#ifndef __ASSEMBLY__ - -#define raw_local_save_flags(flags) \ - do { (flags) = __raw_local_save_flags(); } while (0) - -unsigned long __raw_local_save_flags(void); -void raw_local_irq_restore(unsigned long flags); -void raw_local_irq_disable(void); -void raw_local_irq_enable(void); - -/* - * Used in the idle loop; sti takes one instruction cycle - * to complete: - */ -void raw_safe_halt(void); - -/* - * Used when interrupts are already enabled or to - * shutdown the processor: - */ -void halt(void); - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return flags != 0; -} - -int raw_irqs_disabled(void); - -/* - * For spinlocks, etc: - */ -unsigned long __raw_local_irq_save(void); -#define raw_local_irq_save(flags) \ - do { (flags) = __raw_local_irq_save(); } while (0) - -#endif /* __ASSEMBLY__ */ - -/* - * Do the CPU's IRQ-state tracing from assembly code. We call a - * C function, so save all the C-clobbered registers: - */ -#ifdef CONFIG_TRACE_IRQFLAGS - -# define TRACE_IRQS_ON \ - pushl %eax; \ - pushl %ecx; \ - pushl %edx; \ - call trace_hardirqs_on; \ - popl %edx; \ - popl %ecx; \ - popl %eax; - -# define TRACE_IRQS_OFF \ - pushl %eax; \ - pushl %ecx; \ - pushl %edx; \ - call trace_hardirqs_off; \ - popl %edx; \ - popl %ecx; \ - popl %eax; - -#else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF -#endif - -#endif diff --git a/include/asm-i386/mach-xen/asm/maddr.h b/include/asm-i386/mach-xen/asm/maddr.h deleted file mode 100644 index b467320d5..000000000 --- a/include/asm-i386/mach-xen/asm/maddr.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef _I386_MADDR_H -#define _I386_MADDR_H - -#include -#include - -/**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/ -#define INVALID_P2M_ENTRY (~0UL) -#define FOREIGN_FRAME_BIT (1UL<<31) -#define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT) - -#ifdef CONFIG_XEN - -extern unsigned long *phys_to_machine_mapping; - -#undef machine_to_phys_mapping -extern unsigned long *machine_to_phys_mapping; -extern unsigned int machine_to_phys_order; - -static inline unsigned long pfn_to_mfn(unsigned long pfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) - return pfn; - return phys_to_machine_mapping[(unsigned int)(pfn)] & - ~FOREIGN_FRAME_BIT; -} - -static inline int phys_to_machine_mapping_valid(unsigned long pfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) - return 1; - return (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY); -} - -static inline unsigned long mfn_to_pfn(unsigned long mfn) -{ - extern unsigned long max_mapnr; - unsigned long pfn; - - if (xen_feature(XENFEAT_auto_translated_physmap)) - return mfn; - - if (unlikely((mfn >> machine_to_phys_order) != 0)) - return max_mapnr; - - /* The array access can fail (e.g., device space beyond end of RAM). */ - asm ( - "1: movl %1,%0\n" - "2:\n" - ".section .fixup,\"ax\"\n" - "3: movl %2,%0\n" - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b,3b\n" - ".previous" - : "=r" (pfn) - : "m" (machine_to_phys_mapping[mfn]), "m" (max_mapnr) ); - - return pfn; -} - -/* - * We detect special mappings in one of two ways: - * 1. If the MFN is an I/O page then Xen will set the m2p entry - * to be outside our maximum possible pseudophys range. - * 2. If the MFN belongs to a different domain then we will certainly - * not have MFN in our p2m table. Conversely, if the page is ours, - * then we'll have p2m(m2p(MFN))==MFN. - * If we detect a special mapping then it doesn't have a 'struct page'. - * We force !pfn_valid() by returning an out-of-range pointer. - * - * NB. These checks require that, for any MFN that is not in our reservation, - * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if - * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN. - * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety. - * - * NB2. When deliberately mapping foreign pages into the p2m table, you *must* - * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we - * require. In all the cases we care about, the FOREIGN_FRAME bit is - * masked (e.g., pfn_to_mfn()) so behaviour there is correct. - */ -static inline unsigned long mfn_to_local_pfn(unsigned long mfn) -{ - extern unsigned long max_mapnr; - unsigned long pfn = mfn_to_pfn(mfn); - if ((pfn < max_mapnr) - && !xen_feature(XENFEAT_auto_translated_physmap) - && (phys_to_machine_mapping[pfn] != mfn)) - return max_mapnr; /* force !pfn_valid() */ - return pfn; -} - -static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) { - BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); - return; - } - phys_to_machine_mapping[pfn] = mfn; -} - - -#else /* !CONFIG_XEN */ - -#define pfn_to_mfn(pfn) (pfn) -#define mfn_to_pfn(mfn) (mfn) -#define mfn_to_local_pfn(mfn) (mfn) -#define set_phys_to_machine(pfn, mfn) BUG_ON((pfn) != (mfn)) -#define phys_to_machine_mapping_valid(pfn) (1) - -#endif /* !CONFIG_XEN */ - -/* Definitions for machine and pseudophysical addresses. */ -#ifdef CONFIG_X86_PAE -typedef unsigned long long paddr_t; -typedef unsigned long long maddr_t; -#else -typedef unsigned long paddr_t; -typedef unsigned long maddr_t; -#endif - -static inline maddr_t phys_to_machine(paddr_t phys) -{ - maddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT); - machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK); - return machine; -} -static inline paddr_t machine_to_phys(maddr_t machine) -{ - paddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT); - phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK); - return phys; -} - -/* VIRT <-> MACHINE conversion */ -#define virt_to_machine(v) (phys_to_machine(__pa(v))) -#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) -#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) - -#ifdef CONFIG_X86_PAE -static inline pte_t pfn_pte_ma(unsigned long page_nr, pgprot_t pgprot) -{ - pte_t pte; - - pte.pte_high = (page_nr >> (32 - PAGE_SHIFT)) | \ - (pgprot_val(pgprot) >> 32); - pte.pte_high &= (__supported_pte_mask >> 32); - pte.pte_low = ((page_nr << PAGE_SHIFT) | pgprot_val(pgprot)) & \ - __supported_pte_mask; - return pte; -} -#else -#define pfn_pte_ma(pfn, prot) __pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) -#endif - -#define __pte_ma(x) ((pte_t) { (x) } ) - -#endif /* _I386_MADDR_H */ diff --git a/include/asm-i386/mach-xen/asm/stacktrace.h b/include/asm-i386/mach-xen/asm/stacktrace.h deleted file mode 100644 index 5eb9799be..000000000 --- a/include/asm-i386/mach-xen/asm/stacktrace.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _ASM_STACKTRACE_H -#define _ASM_STACKTRACE_H 1 - -/* Generic stack tracer with callbacks */ - -struct stacktrace_ops { - void (*warning)(void *data, char *msg); - /* msg must contain %s for the symbol */ - void (*warning_symbol)(void *data, char *msg, unsigned long symbol); - void (*address)(void *data, unsigned long address); - /* On negative return stop dumping */ - int (*stack)(void *data, char *name); -}; - -void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, - struct stacktrace_ops *ops, void *data); - -#endif diff --git a/include/asm-i386/mach-xen/asm/timer.h b/include/asm-i386/mach-xen/asm/timer.h deleted file mode 100644 index aed164374..000000000 --- a/include/asm-i386/mach-xen/asm/timer.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _ASMi386_TIMER_H -#define _ASMi386_TIMER_H -#include -#include - -/** - * struct timer_ops - used to define a timer source - * - * @name: name of the timer. - * @init: Probes and initializes the timer. Takes clock= override - * string as an argument. Returns 0 on success, anything else - * on failure. - * @mark_offset: called by the timer interrupt. - * @get_offset: called by gettimeofday(). Returns the number of microseconds - * since the last timer interupt. - * @monotonic_clock: returns the number of nanoseconds since the init of the - * timer. - * @delay: delays this many clock cycles. - */ -struct timer_opts { - char* name; - void (*mark_offset)(void); - unsigned long (*get_offset)(void); - unsigned long long (*monotonic_clock)(void); - void (*delay)(unsigned long); - unsigned long (*read_timer)(void); - int (*suspend)(pm_message_t state); - int (*resume)(void); -}; - -struct init_timer_opts { - int (*init)(char *override); - struct timer_opts *opts; -}; - -#define TICK_SIZE (tick_nsec / 1000) - -extern struct timer_opts* __init select_timer(void); -extern void clock_fallback(void); -void setup_pit_timer(void); - -/* Modifiers for buggy PIT handling */ - -extern int pit_latch_buggy; - -extern struct timer_opts *cur_timer; -extern int timer_ack; - -/* list of externed timers */ -extern struct timer_opts timer_none; -extern struct timer_opts timer_pit; -extern struct init_timer_opts timer_pit_init; -extern struct init_timer_opts timer_tsc_init; -#ifdef CONFIG_X86_CYCLONE_TIMER -extern struct init_timer_opts timer_cyclone_init; -#endif - -extern unsigned long calibrate_tsc(void); -extern unsigned long read_timer_tsc(void); -extern void init_cpu_khz(void); -extern int recalibrate_cpu_khz(void); -#ifdef CONFIG_HPET_TIMER -extern struct init_timer_opts timer_hpet_init; -extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); -#endif - -#ifdef CONFIG_X86_PM_TIMER -extern struct init_timer_opts timer_pmtmr_init; -#endif -#endif diff --git a/include/asm-i386/mach-xen/setup_arch_post.h b/include/asm-i386/mach-xen/setup_arch_post.h new file mode 100644 index 000000000..0f1caa060 --- /dev/null +++ b/include/asm-i386/mach-xen/setup_arch_post.h @@ -0,0 +1,101 @@ +/** + * machine_specific_memory_setup - Hook for machine specific memory setup. + * + * Description: + * This is included late in kernel/setup.c so that it can make + * use of all of the static functions. + **/ + +#include +#include + +static char * __init machine_specific_memory_setup(void) +{ + int rc; + struct xen_memory_map memmap; + /* + * This is rather large for a stack variable but this early in + * the boot process we know we have plenty slack space. + */ + struct e820entry map[E820MAX]; + + memmap.nr_entries = E820MAX; + set_xen_guest_handle(memmap.buffer, map); + + rc = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap); + if ( rc == -ENOSYS ) { + memmap.nr_entries = 1; + map[0].addr = 0ULL; + map[0].size = PFN_PHYS(xen_start_info->nr_pages); + /* 8MB slack (to balance backend allocations). */ + map[0].size += 8ULL << 20; + map[0].type = E820_RAM; + rc = 0; + } + BUG_ON(rc); + + sanitize_e820_map(map, (char *)&memmap.nr_entries); + + BUG_ON(copy_e820_map(map, (char)memmap.nr_entries) < 0); + + return "Xen"; +} + +extern void hypervisor_callback(void); +extern void failsafe_callback(void); +extern void nmi(void); + +unsigned long *machine_to_phys_mapping; +EXPORT_SYMBOL(machine_to_phys_mapping); +unsigned int machine_to_phys_order; +EXPORT_SYMBOL(machine_to_phys_order); + +static void __init machine_specific_arch_setup(void) +{ + int ret; + struct xen_machphys_mapping mapping; + unsigned long machine_to_phys_nr_ents; + struct xen_platform_parameters pp; + struct callback_register event = { + .type = CALLBACKTYPE_event, + .address = { __KERNEL_CS, (unsigned long)hypervisor_callback }, + }; + struct callback_register failsafe = { + .type = CALLBACKTYPE_failsafe, + .address = { __KERNEL_CS, (unsigned long)failsafe_callback }, + }; + struct callback_register nmi_cb = { + .type = CALLBACKTYPE_nmi, + .address = { __KERNEL_CS, (unsigned long)nmi }, + }; + + ret = HYPERVISOR_callback_op(CALLBACKOP_register, &event); + if (ret == 0) + ret = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe); + if (ret == -ENOSYS) + ret = HYPERVISOR_set_callbacks( + event.address.cs, event.address.eip, + failsafe.address.cs, failsafe.address.eip); + BUG_ON(ret); + + ret = HYPERVISOR_callback_op(CALLBACKOP_register, &nmi_cb); + if (ret == -ENOSYS) { + struct xennmi_callback cb; + + cb.handler_address = nmi_cb.address.eip; + HYPERVISOR_nmi_op(XENNMI_register_callback, &cb); + } + + if (HYPERVISOR_xen_version(XENVER_platform_parameters, + &pp) == 0) + set_fixaddr_top(pp.virt_start - PAGE_SIZE); + + machine_to_phys_mapping = (unsigned long *)MACH2PHYS_VIRT_START; + machine_to_phys_nr_ents = MACH2PHYS_NR_ENTRIES; + if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) { + machine_to_phys_mapping = (unsigned long *)mapping.v_start; + machine_to_phys_nr_ents = mapping.max_mfn + 1; + } + while ((1UL << machine_to_phys_order) < machine_to_phys_nr_ents ) + machine_to_phys_order++; +} diff --git a/include/asm-i386/mach-xen/setup_arch.h b/include/asm-i386/mach-xen/setup_arch_pre.h similarity index 64% rename from include/asm-i386/mach-xen/setup_arch.h rename to include/asm-i386/mach-xen/setup_arch_pre.h index ad1995778..b18df6896 100644 --- a/include/asm-i386/mach-xen/setup_arch.h +++ b/include/asm-i386/mach-xen/setup_arch_pre.h @@ -2,4 +2,4 @@ #define ARCH_SETUP machine_specific_arch_setup(); -void __init machine_specific_arch_setup(void); +static void __init machine_specific_arch_setup(void); diff --git a/include/asm-i386/mce.h b/include/asm-i386/mce.h deleted file mode 100644 index 7cc1a973b..000000000 --- a/include/asm-i386/mce.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef CONFIG_X86_MCE -extern void mcheck_init(struct cpuinfo_x86 *c); -#else -#define mcheck_init(c) do {} while(0) -#endif diff --git a/include/asm-i386/mmu.h b/include/asm-i386/mmu.h index 049f32e68..17c6b085b 100644 --- a/include/asm-i386/mmu.h +++ b/include/asm-i386/mmu.h @@ -7,6 +7,7 @@ * we put the segment information here. * * cpu_vm_mask is used to optimize ldt flushing. + * * exec_limit is used to track the range PROT_EXEC * mappings span. */ diff --git a/include/asm-i386/mmu_context.h b/include/asm-i386/mmu_context.h index 62b7bf184..bf0821835 100644 --- a/include/asm-i386/mmu_context.h +++ b/include/asm-i386/mmu_context.h @@ -1,6 +1,7 @@ #ifndef __I386_SCHED_H #define __I386_SCHED_H +#include #include #include #include diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 22cb07cc8..e33e9f9e4 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h @@ -14,7 +14,7 @@ extern struct pglist_data *node_data[]; #ifdef CONFIG_X86_NUMAQ #include -#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ +#else /* summit or generic arch */ #include #endif diff --git a/include/asm-i386/msi.h b/include/asm-i386/msi.h index b11c4b7df..f041d4495 100644 --- a/include/asm-i386/msi.h +++ b/include/asm-i386/msi.h @@ -9,15 +9,7 @@ #include #include -#define LAST_DEVICE_VECTOR (FIRST_SYSTEM_VECTOR - 1) +#define LAST_DEVICE_VECTOR 232 #define MSI_TARGET_CPU_SHIFT 12 -extern struct msi_ops msi_apic_ops; - -static inline int msi_arch_init(void) -{ - msi_register(&msi_apic_ops); - return 0; -} - #endif /* ASM_MSI_H */ diff --git a/include/asm-i386/mtrr.h b/include/asm-i386/mtrr.h index 07f063ae2..64cf937c7 100644 --- a/include/asm-i386/mtrr.h +++ b/include/asm-i386/mtrr.h @@ -23,6 +23,7 @@ #ifndef _LINUX_MTRR_H #define _LINUX_MTRR_H +#include #include #include @@ -76,8 +77,6 @@ extern int mtrr_add_page (unsigned long base, unsigned long size, extern int mtrr_del (int reg, unsigned long base, unsigned long size); extern int mtrr_del_page (int reg, unsigned long base, unsigned long size); extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); -extern void mtrr_ap_init(void); -extern void mtrr_bp_init(void); # else static __inline__ int mtrr_add (unsigned long base, unsigned long size, unsigned int type, char increment) @@ -102,8 +101,6 @@ static __inline__ int mtrr_del_page (int reg, unsigned long base, static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;} -#define mtrr_ap_init() do {} while (0) -#define mtrr_bp_init() do {} while (0) # endif #endif diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 67d994799..21f16638f 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h @@ -5,38 +5,24 @@ #define ASM_NMI_H #include - + struct pt_regs; - + typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); - -/** + +/** * set_nmi_callback * * Set a handler for an NMI. Only one handler may be * set. Return 1 if the NMI was handled. */ void set_nmi_callback(nmi_callback_t callback); - -/** + +/** * unset_nmi_callback * * Remove the handler previously set. */ void unset_nmi_callback(void); - -extern void setup_apic_nmi_watchdog (void); -extern int reserve_lapic_nmi(void); -extern void release_lapic_nmi(void); -extern void disable_timer_nmi_watchdog(void); -extern void enable_timer_nmi_watchdog(void); -extern void nmi_watchdog_tick (struct pt_regs * regs); - -extern unsigned int nmi_watchdog; -#define NMI_DEFAULT -1 -#define NMI_NONE 0 -#define NMI_IO_APIC 1 -#define NMI_LOCAL_APIC 2 -#define NMI_INVALID 3 - + #endif /* ASM_NMI_H */ diff --git a/include/asm-i386/node.h b/include/asm-i386/node.h new file mode 100644 index 000000000..e13c6ffa7 --- /dev/null +++ b/include/asm-i386/node.h @@ -0,0 +1,29 @@ +#ifndef _ASM_I386_NODE_H_ +#define _ASM_I386_NODE_H_ + +#include +#include +#include +#include +#include + +struct i386_node { + struct node node; +}; +extern struct i386_node node_devices[MAX_NUMNODES]; + +static inline int arch_register_node(int num){ + int p_node; + struct node *parent = NULL; + + if (!node_online(num)) + return 0; + p_node = parent_node(num); + + if (p_node != num) + parent = &node_devices[p_node].node; + + return register_node(&node_devices[num].node, num, parent); +} + +#endif /* _ASM_I386_NODE_H_ */ diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index e862cdc64..2b2683ea4 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h @@ -12,6 +12,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ +#include #ifdef CONFIG_X86_USE_3DNOW @@ -96,8 +97,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #ifndef __ASSEMBLY__ -struct vm_area_struct; - /* * This much address space is reserved for vmalloc() and iomap() * as well as fixmap mappings. @@ -129,7 +128,7 @@ extern int devmem_is_allowed(unsigned long pagenr); #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) -#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE) +#define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) @@ -145,10 +144,11 @@ extern int devmem_is_allowed(unsigned long pagenr); ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include -#define __HAVE_ARCH_GATE_AREA 1 + #endif /* __KERNEL__ */ +#include +#include + #endif /* _I386_PAGE_H */ diff --git a/include/asm-i386/param.h b/include/asm-i386/param.h index 745dc5bd0..095580f3a 100644 --- a/include/asm-i386/param.h +++ b/include/asm-i386/param.h @@ -2,6 +2,7 @@ #define _ASMi386_PARAM_H #ifdef __KERNEL__ +# include # define HZ CONFIG_HZ /* Internal kernel timer frequency */ # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index 64b6d0bae..78c85985a 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h @@ -1,6 +1,7 @@ #ifndef __i386_PCI_H #define __i386_PCI_H +#include #ifdef __KERNEL__ #include /* for struct page */ diff --git a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h index 90b246505..e893581bf 100644 --- a/include/asm-i386/pgalloc.h +++ b/include/asm-i386/pgalloc.h @@ -1,6 +1,7 @@ #ifndef _I386_PGALLOC_H #define _I386_PGALLOC_H +#include #include #include #include diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 09697fec3..672c3f76b 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -1,6 +1,7 @@ #ifndef _I386_PGTABLE_H #define _I386_PGTABLE_H +#include /* * The Linux memory management assumes a three-level page table setup. On diff --git a/include/asm-i386/posix_types.h b/include/asm-i386/posix_types.h index 133e31e7d..4e47ed059 100644 --- a/include/asm-i386/posix_types.h +++ b/include/asm-i386/posix_types.h @@ -51,12 +51,12 @@ typedef struct { #undef __FD_SET #define __FD_SET(fd,fdsetp) \ __asm__ __volatile__("btsl %1,%0": \ - "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) + "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) #undef __FD_CLR #define __FD_CLR(fd,fdsetp) \ __asm__ __volatile__("btrl %1,%0": \ - "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) + "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) #undef __FD_ISSET #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index cd1c7b6dd..e6712d64e 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -71,12 +72,8 @@ struct cpuinfo_x86 { cpumask_t llc_shared_map; /* cpus sharing the last level cache */ #endif unsigned char x86_max_cores; /* cpuid returned max cores value */ - unsigned char apicid; -#ifdef CONFIG_SMP unsigned char booted_cores; /* number of cores as seen by OS */ - __u8 phys_proc_id; /* Physical processor id. */ - __u8 cpu_core_id; /* Core id */ -#endif + unsigned char apicid; } __attribute__((__aligned__(SMP_CACHE_BYTES))); #define X86_VENDOR_INTEL 0 @@ -108,13 +105,14 @@ extern struct cpuinfo_x86 cpu_data[]; #define current_cpu_data boot_cpu_data #endif +extern int phys_proc_id[NR_CPUS]; +extern int cpu_core_id[NR_CPUS]; extern int cpu_llc_id[NR_CPUS]; extern char ignore_fpu_irq; extern void identify_cpu(struct cpuinfo_x86 *); extern void print_cpu_info(struct cpuinfo_x86 *); extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); -extern unsigned short num_cache_leaves; #ifdef CONFIG_X86_HT extern void detect_ht(struct cpuinfo_x86 *c); @@ -563,7 +561,7 @@ extern void prepare_to_copy(struct task_struct *tsk); extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern unsigned long thread_saved_pc(struct task_struct *tsk); -void show_trace(struct task_struct *task, struct pt_regs *regs, unsigned long *stack); +void show_trace(struct task_struct *task, unsigned long *stack); unsigned long get_wchan(struct task_struct *p); @@ -737,4 +735,18 @@ extern unsigned long boot_option_idle_override; extern void enable_sep_cpu(void); extern int sysenter_setup(void); +#ifdef CONFIG_MTRR +extern void mtrr_ap_init(void); +extern void mtrr_bp_init(void); +#else +#define mtrr_ap_init() do {} while (0) +#define mtrr_bp_init() do {} while (0) +#endif + +#ifdef CONFIG_X86_MCE +extern void mcheck_init(struct cpuinfo_x86 *c); +#else +#define mcheck_init(c) do {} while(0) +#endif + #endif /* __ASM_I386_PROCESSOR_H */ diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h index f40ccbd8c..94f00195d 100644 --- a/include/asm-i386/rwlock.h +++ b/include/asm-i386/rwlock.h @@ -20,18 +20,56 @@ #define RW_LOCK_BIAS 0x01000000 #define RW_LOCK_BIAS_STR "0x01000000" -#define __build_read_lock(rw, helper) \ - asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \ +#define __build_read_lock_ptr(rw, helper) \ + alternative_smp("lock; subl $1,(%0)\n\t" \ "jns 1f\n" \ "call " helper "\n\t" \ - "1:\n" \ - ::"a" (rw) : "memory") + "1:\n", \ + "subl $1,(%0)\n\t", \ + :"a" (rw) : "memory") -#define __build_write_lock(rw, helper) \ - asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ +#define __build_read_lock_const(rw, helper) \ + alternative_smp("lock; subl $1,%0\n\t" \ + "jns 1f\n" \ + "pushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "1:\n", \ + "subl $1,%0\n\t", \ + "=m" (*(volatile int *)rw) : : "memory") + +#define __build_read_lock(rw, helper) do { \ + if (__builtin_constant_p(rw)) \ + __build_read_lock_const(rw, helper); \ + else \ + __build_read_lock_ptr(rw, helper); \ + } while (0) + +#define __build_write_lock_ptr(rw, helper) \ + alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ "jz 1f\n" \ "call " helper "\n\t" \ - "1:\n" \ - ::"a" (rw) : "memory") + "1:\n", \ + "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t", \ + :"a" (rw) : "memory") + +#define __build_write_lock_const(rw, helper) \ + alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ + "jz 1f\n" \ + "pushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "1:\n", \ + "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \ + "=m" (*(volatile int *)rw) : : "memory") + +#define __build_write_lock(rw, helper) do { \ + if (__builtin_constant_p(rw)) \ + __build_write_lock_const(rw, helper); \ + else \ + __build_write_lock_ptr(rw, helper); \ + } while (0) #endif diff --git a/include/asm-i386/rwsem.h b/include/asm-i386/rwsem.h index 43113f560..be4ab8592 100644 --- a/include/asm-i386/rwsem.h +++ b/include/asm-i386/rwsem.h @@ -40,7 +40,6 @@ #include #include -#include struct rwsem_waiter; @@ -62,34 +61,36 @@ struct rw_semaphore { #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) spinlock_t wait_lock; struct list_head wait_list; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; +#if RWSEM_DEBUG + int debug; #endif }; -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } +/* + * initialisation + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 #else -# define __RWSEM_DEP_MAP_INIT(lockname) +#define __RWSEM_DEBUG_INIT /* */ #endif - #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ - __RWSEM_DEP_MAP_INIT(name) } + __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) -extern void __init_rwsem(struct rw_semaphore *sem, const char *name, - struct lock_class_key *key); - -#define init_rwsem(sem) \ -do { \ - static struct lock_class_key __key; \ - \ - __init_rwsem((sem), #sem, &__key); \ -} while (0) +static inline void init_rwsem(struct rw_semaphore *sem) +{ + sem->count = RWSEM_UNLOCKED_VALUE; + spin_lock_init(&sem->wait_lock); + INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif +} /* * lock for reading @@ -111,8 +112,8 @@ LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value " jmp 1b\n" LOCK_SECTION_END "# ending down_read\n\t" - : "+m" (sem->count) - : "a" (sem) + : "=m"(sem->count) + : "a"(sem), "m"(sem->count) : "memory", "cc"); } @@ -133,8 +134,8 @@ LOCK_PREFIX " cmpxchgl %2,%0\n\t" " jnz 1b\n\t" "2:\n\t" "# ending __down_read_trylock\n\t" - : "+m" (sem->count), "=&a" (result), "=&r" (tmp) - : "i" (RWSEM_ACTIVE_READ_BIAS) + : "+m"(sem->count), "=&a"(result), "=&r"(tmp) + : "i"(RWSEM_ACTIVE_READ_BIAS) : "memory", "cc"); return result>=0 ? 1 : 0; } @@ -142,7 +143,7 @@ LOCK_PREFIX " cmpxchgl %2,%0\n\t" /* * lock for writing */ -static inline void __down_write_nested(struct rw_semaphore *sem, int subclass) +static inline void __down_write(struct rw_semaphore *sem) { int tmp; @@ -161,16 +162,11 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the " jmp 1b\n" LOCK_SECTION_END "# ending down_write" - : "+m" (sem->count), "=d" (tmp) - : "a" (sem), "1" (tmp) + : "=m"(sem->count), "=d"(tmp) + : "a"(sem), "1"(tmp), "m"(sem->count) : "memory", "cc"); } -static inline void __down_write(struct rw_semaphore *sem) -{ - __down_write_nested(sem, 0); -} - /* * trylock for writing -- returns 1 if successful, 0 if contention */ @@ -205,8 +201,8 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old valu " jmp 1b\n" LOCK_SECTION_END "# ending __up_read\n" - : "+m" (sem->count), "=d" (tmp) - : "a" (sem), "1" (tmp) + : "=m"(sem->count), "=d"(tmp) + : "a"(sem), "1"(tmp), "m"(sem->count) : "memory", "cc"); } @@ -231,8 +227,8 @@ LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> " jmp 1b\n" LOCK_SECTION_END "# ending __up_write\n" - : "+m" (sem->count) - : "a" (sem), "i" (-RWSEM_ACTIVE_WRITE_BIAS) + : "=m"(sem->count) + : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count) : "memory", "cc", "edx"); } @@ -256,8 +252,8 @@ LOCK_PREFIX " addl %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001 " jmp 1b\n" LOCK_SECTION_END "# ending __downgrade_write\n" - : "+m" (sem->count) - : "a" (sem), "i" (-RWSEM_WAITING_BIAS) + : "=m"(sem->count) + : "a"(sem), "i"(-RWSEM_WAITING_BIAS), "m"(sem->count) : "memory", "cc"); } @@ -268,8 +264,8 @@ static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem) { __asm__ __volatile__( LOCK_PREFIX "addl %1,%0" - : "+m" (sem->count) - : "ir" (delta)); + : "=m"(sem->count) + : "ir"(delta), "m"(sem->count)); } /* @@ -280,9 +276,10 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) int tmp = delta; __asm__ __volatile__( -LOCK_PREFIX "xadd %0,%1" - : "+r" (tmp), "+m" (sem->count) - : : "memory"); +LOCK_PREFIX "xadd %0,(%2)" + : "+r"(tmp), "=m"(sem->count) + : "r"(sem), "m"(sem->count) + : "memory"); return tmp+delta; } diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h index d51e800ac..f7a0f310c 100644 --- a/include/asm-i386/semaphore.h +++ b/include/asm-i386/semaphore.h @@ -107,7 +107,7 @@ static inline void down(struct semaphore * sem) "call __down_failed\n\t" "jmp 1b\n" LOCK_SECTION_END - :"+m" (sem->count) + :"=m" (sem->count) : :"memory","ax"); } @@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem) "call __down_failed_interruptible\n\t" "jmp 1b\n" LOCK_SECTION_END - :"=a" (result), "+m" (sem->count) + :"=a" (result), "=m" (sem->count) : :"memory"); return result; @@ -157,7 +157,7 @@ static inline int down_trylock(struct semaphore * sem) "call __down_failed_trylock\n\t" "jmp 1b\n" LOCK_SECTION_END - :"=a" (result), "+m" (sem->count) + :"=a" (result), "=m" (sem->count) : :"memory"); return result; @@ -182,7 +182,7 @@ static inline void up(struct semaphore * sem) "jmp 1b\n" LOCK_SECTION_END ".subsection 0\n" - :"+m" (sem->count) + :"=m" (sem->count) : :"memory","ax"); } diff --git a/include/asm-i386/serial.h b/include/asm-i386/serial.h index bd67480ca..e1ecfccb7 100644 --- a/include/asm-i386/serial.h +++ b/include/asm-i386/serial.h @@ -2,6 +2,7 @@ * include/asm-i386/serial.h */ +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 2734909ef..ee941457b 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h @@ -6,7 +6,6 @@ #ifndef _i386_SETUP_H #define _i386_SETUP_H -#ifdef __KERNEL__ #include /* @@ -14,7 +13,6 @@ */ #define MAXMEM_PFN PFN_DOWN(MAXMEM) #define MAX_NONPAE_PFN (1 << 20) -#endif #define PARAM_SIZE 4096 #define COMMAND_LINE_SIZE 256 @@ -61,21 +59,6 @@ extern unsigned char boot_params[PARAM_SIZE]; #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) -/* - * Do NOT EVER look at the BIOS memory size location. - * It does not work on many machines. - */ -#define LOWMEMSIZE() (0x9f000) - -struct e820entry; - -char * __init machine_specific_memory_setup(void); - -int __init copy_e820_map(struct e820entry * biosmap, int nr_map); -int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map); -void __init add_memory_region(unsigned long long start, - unsigned long long size, int type); - #endif /* __ASSEMBLY__ */ #endif /* _i386_SETUP_H */ diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index c3e8adec5..026fd2314 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h @@ -2,6 +2,7 @@ #define _ASMi386_SIGNAL_H #include +#include #include #include @@ -9,9 +10,6 @@ struct siginfo; #ifdef __KERNEL__ - -#include - /* Most things should be clean enough to redefine this at will, if care is taken to make libc match. */ @@ -79,6 +77,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -98,6 +97,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 142d10e34..61d3ab9db 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -5,6 +5,7 @@ * We need the APIC definitions automatically as part of 'smp.h' */ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/include/asm-i386/socket.h b/include/asm-i386/socket.h index 5755d57c4..802ae7619 100644 --- a/include/asm-i386/socket.h +++ b/include/asm-i386/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index d1020363c..6d794a373 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h @@ -4,6 +4,7 @@ #include #include #include +#include #include /* @@ -22,7 +23,7 @@ #define __raw_spin_lock_string \ "\n1:\t" \ - LOCK_PREFIX " ; decb %0\n\t" \ + "lock ; decb %0\n\t" \ "jns 3f\n" \ "2:\t" \ "rep;nop\n\t" \ @@ -31,16 +32,11 @@ "jmp 1b\n" \ "3:\n\t" -/* - * NOTE: there's an irqs-on section here, which normally would have to be - * irq-traced, but on CONFIG_TRACE_IRQFLAGS we never use - * __raw_spin_lock_string_flags(). - */ #define __raw_spin_lock_string_flags \ "\n1:\t" \ - LOCK_PREFIX " ; decb %0\n\t" \ + "lock ; decb %0\n\t" \ "jns 5f\n" \ - "2:\t" \ + "2:\t" \ "testl $0x200, %1\n\t" \ "jz 4f\n\t" \ "sti\n" \ @@ -57,29 +53,31 @@ "jmp 4b\n" \ "5:\n\t" +#define __raw_spin_lock_string_up \ + "\n\tdecb %0" + static inline void __raw_spin_lock(raw_spinlock_t *lock) { - asm(__raw_spin_lock_string : "+m" (lock->slock) : : "memory"); + alternative_smp( + __raw_spin_lock_string, + __raw_spin_lock_string_up, + "=m" (lock->slock) : : "memory"); } -/* - * It is easier for the lock validator if interrupts are not re-enabled - * in the middle of a lock-acquire. This is a performance feature anyway - * so we turn it off: - */ -#ifndef CONFIG_PROVE_LOCKING static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) { - asm(__raw_spin_lock_string_flags : "+m" (lock->slock) : "r" (flags) : "memory"); + alternative_smp( + __raw_spin_lock_string_flags, + __raw_spin_lock_string_up, + "=m" (lock->slock) : "r" (flags) : "memory"); } -#endif static inline int __raw_spin_trylock(raw_spinlock_t *lock) { char oldval; __asm__ __volatile__( "xchgb %b0,%1" - :"=q" (oldval), "+m" (lock->slock) + :"=q" (oldval), "=m" (lock->slock) :"0" (0) : "memory"); return oldval > 0; } @@ -95,7 +93,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) #define __raw_spin_unlock_string \ "movb $1,%0" \ - :"+m" (lock->slock) : : "memory" + :"=m" (lock->slock) : : "memory" static inline void __raw_spin_unlock(raw_spinlock_t *lock) @@ -109,7 +107,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) #define __raw_spin_unlock_string \ "xchgb %b0, %1" \ - :"=q" (oldval), "+m" (lock->slock) \ + :"=q" (oldval), "=m" (lock->slock) \ :"0" (oldval) : "memory" static inline void __raw_spin_unlock(raw_spinlock_t *lock) @@ -190,13 +188,13 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock) static inline void __raw_read_unlock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory"); + asm volatile(LOCK_PREFIX "incl %0" :"=m" (rw->lock) : : "memory"); } static inline void __raw_write_unlock(raw_rwlock_t *rw) { asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" - : "+m" (rw->lock) : : "memory"); + : "=m" (rw->lock) : : "memory"); } #endif /* __ASM_SPINLOCK_H */ diff --git a/include/asm-i386/stacktrace.h b/include/asm-i386/stacktrace.h deleted file mode 100644 index 7d1f6a5cb..000000000 --- a/include/asm-i386/stacktrace.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index b92773619..bb5f88a27 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h @@ -2,6 +2,7 @@ #define _I386_STRING_H_ #ifdef __KERNEL__ +#include /* * On a 486 or Pentium, we are better off not using the * byte string operations. But on a 386 or a PPro the diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 098bcee94..19cc79c9a 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -1,6 +1,7 @@ #ifndef __ASM_SYSTEM_H #define __ASM_SYSTEM_H +#include #include #include #include @@ -11,14 +12,9 @@ struct task_struct; /* one of the stranger aspects of C forward declarations.. */ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next)); -/* - * Saving eflags is important. It switches not only IOPL between tasks, - * it also protects other tasks from NT leaking through sysenter etc. - */ #define switch_to(prev,next,last) do { \ unsigned long esi,edi; \ - asm volatile("pushfl\n\t" /* Save flags */ \ - "pushl %%ebp\n\t" \ + asm volatile("pushl %%ebp\n\t" \ "movl %%esp,%0\n\t" /* save ESP */ \ "movl %5,%%esp\n\t" /* restore ESP */ \ "movl $1f,%1\n\t" /* save EIP */ \ @@ -26,7 +22,6 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc "jmp __switch_to\n" \ "1:\t" \ "popl %%ebp\n\t" \ - "popfl" \ :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ "=a" (last),"=S" (esi),"=D" (edi) \ :"m" (next->thread.esp),"m" (next->thread.eip), \ @@ -88,6 +83,10 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ #define savesegment(seg, value) \ asm volatile("mov %%" #seg ",%0":"=rm" (value)) +/* + * Clear and set 'TS' bit respectively + */ +#define clts() __asm__ __volatile__ ("clts") #define read_cr0() ({ \ unsigned int __dummy; \ __asm__ __volatile__( \ @@ -96,7 +95,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ __dummy; \ }) #define write_cr0(x) \ - __asm__ __volatile__("movl %0,%%cr0": :"r" (x)) + __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); #define read_cr2() ({ \ unsigned int __dummy; \ @@ -106,7 +105,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ __dummy; \ }) #define write_cr2(x) \ - __asm__ __volatile__("movl %0,%%cr2": :"r" (x)) + __asm__ __volatile__("movl %0,%%cr2": :"r" (x)); #define read_cr3() ({ \ unsigned int __dummy; \ @@ -116,7 +115,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ __dummy; \ }) #define write_cr3(x) \ - __asm__ __volatile__("movl %0,%%cr3": :"r" (x)) + __asm__ __volatile__("movl %0,%%cr3": :"r" (x)); #define read_cr4() ({ \ unsigned int __dummy; \ @@ -125,6 +124,7 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ :"=r" (__dummy)); \ __dummy; \ }) + #define read_cr4_safe() ({ \ unsigned int __dummy; \ /* This could fault if %cr4 does not exist */ \ @@ -136,19 +136,15 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" \ : "=r" (__dummy): "0" (0)); \ __dummy; \ }) -#define write_cr4(x) \ - __asm__ __volatile__("movl %0,%%cr4": :"r" (x)) -/* - * Clear and set 'TS' bit respectively - */ -#define clts() __asm__ __volatile__ ("clts") +#define write_cr4(x) \ + __asm__ __volatile__("movl %0,%%cr4": :"r" (x)); #define stts() write_cr0(8 | read_cr0()) #endif /* __KERNEL__ */ #define wbinvd() \ - __asm__ __volatile__ ("wbinvd": : :"memory") + __asm__ __volatile__ ("wbinvd": : :"memory"); static inline unsigned long get_limit(unsigned long segment) { @@ -432,7 +428,7 @@ static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long l * does not enforce ordering, since there is no data dependency between * the read of "a" and the read of "b". Therefore, on some CPUs, such * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() - * in cases like this where there are no data dependencies. + * in cases like thiswhere there are no data dependencies. **/ #define read_barrier_depends() do { } while(0) @@ -459,7 +455,27 @@ static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long l #define set_mb(var, value) do { var = value; barrier(); } while (0) #endif -#include +#define set_wmb(var, value) do { var = value; wmb(); } while (0) + +/* interrupt control.. */ +#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0) +#define local_irq_restore(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc"); } while (0) +#define local_irq_disable() __asm__ __volatile__("cli": : :"memory") +#define local_irq_enable() __asm__ __volatile__("sti": : :"memory") +/* used in the idle loop; sti takes one instruction cycle to complete */ +#define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") +/* used when interrupts are already enabled or to shutdown the processor */ +#define halt() __asm__ __volatile__("hlt": : :"memory") + +#define irqs_disabled() \ +({ \ + unsigned long flags; \ + local_save_flags(flags); \ + !(flags & (1<<9)); \ +}) + +/* For spinlocks etc */ +#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") /* * disable hlt during certain critical i/o operations diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 54d6d7aea..f84290f43 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h @@ -9,6 +9,7 @@ #ifdef __KERNEL__ +#include #include #include @@ -84,15 +85,17 @@ struct thread_info { #define init_stack (init_thread_union.stack) -/* how to get the current stack pointer from C */ -register unsigned long current_stack_pointer asm("esp") __attribute_used__; - /* how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) { - return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1)); + struct thread_info *ti; + __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1))); + return ti; } +/* how to get the current stack pointer from C */ +register unsigned long current_stack_pointer asm("esp") __attribute_used__; + /* thread information allocation */ #ifdef CONFIG_DEBUG_STACK_USAGE #define alloc_thread_info(tsk) \ @@ -139,9 +142,8 @@ static inline struct thread_info *current_thread_info(void) #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SECCOMP 8 /* secure computing */ #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ -#define TIF_MEMDIE 16 -#define TIF_DEBUG 17 /* uses debug registers */ -#define TIF_IO_BITMAP 18 /* uses I/O bitmap */ +#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ +#define TIF_MEMDIE 17 #define _TIF_SYSCALL_TRACE (1<thread_info->status & TS_POLLING) #endif /* __KERNEL__ */ diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index d0ebd05f8..aed164374 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h @@ -3,11 +3,68 @@ #include #include +/** + * struct timer_ops - used to define a timer source + * + * @name: name of the timer. + * @init: Probes and initializes the timer. Takes clock= override + * string as an argument. Returns 0 on success, anything else + * on failure. + * @mark_offset: called by the timer interrupt. + * @get_offset: called by gettimeofday(). Returns the number of microseconds + * since the last timer interupt. + * @monotonic_clock: returns the number of nanoseconds since the init of the + * timer. + * @delay: delays this many clock cycles. + */ +struct timer_opts { + char* name; + void (*mark_offset)(void); + unsigned long (*get_offset)(void); + unsigned long long (*monotonic_clock)(void); + void (*delay)(unsigned long); + unsigned long (*read_timer)(void); + int (*suspend)(pm_message_t state); + int (*resume)(void); +}; + +struct init_timer_opts { + int (*init)(char *override); + struct timer_opts *opts; +}; + #define TICK_SIZE (tick_nsec / 1000) + +extern struct timer_opts* __init select_timer(void); +extern void clock_fallback(void); void setup_pit_timer(void); + /* Modifiers for buggy PIT handling */ + extern int pit_latch_buggy; + +extern struct timer_opts *cur_timer; extern int timer_ack; + +/* list of externed timers */ +extern struct timer_opts timer_none; +extern struct timer_opts timer_pit; +extern struct init_timer_opts timer_pit_init; +extern struct init_timer_opts timer_tsc_init; +#ifdef CONFIG_X86_CYCLONE_TIMER +extern struct init_timer_opts timer_cyclone_init; +#endif + +extern unsigned long calibrate_tsc(void); +extern unsigned long read_timer_tsc(void); +extern void init_cpu_khz(void); extern int recalibrate_cpu_khz(void); +#ifdef CONFIG_HPET_TIMER +extern struct init_timer_opts timer_hpet_init; +extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); +#endif +#ifdef CONFIG_X86_PM_TIMER +extern struct init_timer_opts timer_pmtmr_init; +#endif #endif diff --git a/include/asm-i386/timex.h b/include/asm-i386/timex.h index 366604440..292b5a68f 100644 --- a/include/asm-i386/timex.h +++ b/include/asm-i386/timex.h @@ -6,8 +6,8 @@ #ifndef _ASMi386_TIMEX_H #define _ASMi386_TIMEX_H +#include #include -#include #ifdef CONFIG_X86_ELAN # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ @@ -16,6 +16,39 @@ #endif +/* + * Standard way to access the cycle counter on i586+ CPUs. + * Currently only used on SMP. + * + * If you really have a SMP machine with i486 chips or older, + * compile for that, and this will just always return zero. + * That's ok, it just means that the nicer scheduling heuristics + * won't work for you. + * + * We only use the low 32 bits, and we'd simply better make sure + * that we reschedule before that wraps. Scheduling at least every + * four billion cycles just basically sounds like a good idea, + * regardless of how fast the machine is. + */ +typedef unsigned long long cycles_t; + +static inline cycles_t get_cycles (void) +{ + unsigned long long ret=0; + +#ifndef CONFIG_X86_TSC + if (!cpu_has_tsc) + return 0; +#endif + +#if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) + rdtscll(ret); +#endif + return ret; +} + +extern unsigned int cpu_khz; + extern int read_current_timer(unsigned long *timer_value); #define ARCH_HAS_READ_CURRENT_TIMER 1 diff --git a/include/asm-i386/tlbflush.h b/include/asm-i386/tlbflush.h index d57ca5c54..ab216e137 100644 --- a/include/asm-i386/tlbflush.h +++ b/include/asm-i386/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _I386_TLBFLUSH_H #define _I386_TLBFLUSH_H +#include #include #include diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index 6adbd9b1a..b94e5eeef 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h @@ -28,8 +28,10 @@ #define _ASM_I386_TOPOLOGY_H #ifdef CONFIG_X86_HT -#define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) -#define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) +#define topology_physical_package_id(cpu) \ + (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) +#define topology_core_id(cpu) \ + (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) #define topology_core_siblings(cpu) (cpu_core_map[cpu]) #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) #endif @@ -112,9 +114,4 @@ extern unsigned long node_remap_size[]; extern cpumask_t cpu_coregroup_map(int cpu); -#ifdef CONFIG_SMP -#define mc_capable() (boot_cpu_data.x86_max_cores > 1) -#define smt_capable() (smp_num_siblings > 1) -#endif - #endif /* _ASM_I386_TOPOLOGY_H */ diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h deleted file mode 100644 index c13933185..000000000 --- a/include/asm-i386/tsc.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * linux/include/asm-i386/tsc.h - * - * i386 TSC related functions - */ -#ifndef _ASM_i386_TSC_H -#define _ASM_i386_TSC_H - -#include - -/* - * Standard way to access the cycle counter on i586+ CPUs. - * Currently only used on SMP. - * - * If you really have a SMP machine with i486 chips or older, - * compile for that, and this will just always return zero. - * That's ok, it just means that the nicer scheduling heuristics - * won't work for you. - * - * We only use the low 32 bits, and we'd simply better make sure - * that we reschedule before that wraps. Scheduling at least every - * four billion cycles just basically sounds like a good idea, - * regardless of how fast the machine is. - */ -typedef unsigned long long cycles_t; - -extern unsigned int cpu_khz; -extern unsigned int tsc_khz; - -static inline cycles_t get_cycles(void) -{ - unsigned long long ret = 0; - -#ifndef CONFIG_X86_TSC - if (!cpu_has_tsc) - return 0; -#endif - -#if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) - rdtscll(ret); -#endif - return ret; -} - -extern void tsc_init(void); -extern void mark_tsc_unstable(void); - -#endif diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h index 4b4b295cc..e50a08bd7 100644 --- a/include/asm-i386/types.h +++ b/include/asm-i386/types.h @@ -35,6 +35,7 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ +#include typedef signed char s8; typedef unsigned char u8; diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 54d905ebc..371457b1c 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -4,6 +4,7 @@ /* * User space memory access functions */ +#include #include #include #include @@ -58,7 +59,7 @@ extern struct movsl_mask { __chk_user_ptr(addr); \ asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ :"=&r" (flag), "=r" (sum) \ - :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ + :"1" (addr),"g" ((int)(size)),"g" (current_thread_info()->addr_limit.seg)); \ flag; }) /** @@ -390,12 +391,6 @@ unsigned long __must_check __copy_to_user_ll(void __user *to, const void *from, unsigned long n); unsigned long __must_check __copy_from_user_ll(void *to, const void __user *from, unsigned long n); -unsigned long __must_check __copy_from_user_ll_nozero(void *to, - const void __user *from, unsigned long n); -unsigned long __must_check __copy_from_user_ll_nocache(void *to, - const void __user *from, unsigned long n); -unsigned long __must_check __copy_from_user_ll_nocache_nozero(void *to, - const void __user *from, unsigned long n); /* * Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a fault @@ -462,41 +457,10 @@ __copy_to_user(void __user *to, const void *from, unsigned long n) * * If some data could not be copied, this function will pad the copied * data to the requested size using zero bytes. - * - * An alternate version - __copy_from_user_inatomic() - may be called from - * atomic context and will fail rather than sleep. In this case the - * uncopied bytes will *NOT* be padded with zeros. See fs/filemap.h - * for explanation of why this is needed. */ static __always_inline unsigned long __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n) { - /* Avoid zeroing the tail if the copy fails.. - * If 'n' is constant and 1, 2, or 4, we do still zero on a failure, - * but as the zeroing behaviour is only significant when n is not - * constant, that shouldn't be a problem. - */ - if (__builtin_constant_p(n)) { - unsigned long ret; - - switch (n) { - case 1: - __get_user_size(*(u8 *)to, from, 1, ret, 1); - return ret; - case 2: - __get_user_size(*(u16 *)to, from, 2, ret, 2); - return ret; - case 4: - __get_user_size(*(u32 *)to, from, 4, ret, 4); - return ret; - } - } - return __copy_from_user_ll_nozero(to, from, n); -} -static __always_inline unsigned long -__copy_from_user(void *to, const void __user *from, unsigned long n) -{ - might_sleep(); if (__builtin_constant_p(n)) { unsigned long ret; @@ -515,36 +479,12 @@ __copy_from_user(void *to, const void __user *from, unsigned long n) return __copy_from_user_ll(to, from, n); } -#define ARCH_HAS_NOCACHE_UACCESS - -static __always_inline unsigned long __copy_from_user_nocache(void *to, - const void __user *from, unsigned long n) -{ - might_sleep(); - if (__builtin_constant_p(n)) { - unsigned long ret; - - switch (n) { - case 1: - __get_user_size(*(u8 *)to, from, 1, ret, 1); - return ret; - case 2: - __get_user_size(*(u16 *)to, from, 2, ret, 2); - return ret; - case 4: - __get_user_size(*(u32 *)to, from, 4, ret, 4); - return ret; - } - } - return __copy_from_user_ll_nocache(to, from, n); -} - static __always_inline unsigned long -__copy_from_user_inatomic_nocache(void *to, const void __user *from, unsigned long n) +__copy_from_user(void *to, const void __user *from, unsigned long n) { - return __copy_from_user_ll_nocache_nozero(to, from, n); + might_sleep(); + return __copy_from_user_inatomic(to, from, n); } - unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n); unsigned long __must_check copy_from_user(void *to, diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 8cd8a7607..94fff76ec 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -322,11 +322,8 @@ #define __NR_sync_file_range 314 #define __NR_tee 315 #define __NR_vmsplice 316 -#define __NR_move_pages 317 -#ifdef __KERNEL__ - -#define NR_syscalls 318 +#define NR_syscalls 317 #ifndef __KERNEL_SYSCALLS_NO_ERRNO__ /* @@ -430,6 +427,7 @@ __asm__ volatile ("push %%ebp ; push %%ebx ; movl 4(%2),%%ebp ; " \ __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -453,6 +451,7 @@ __syscall_return(type,__res); \ #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND +#endif #ifdef __KERNEL_SYSCALLS__ @@ -491,7 +490,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -503,5 +502,4 @@ asmlinkage long sys_rt_sigaction(int sig, #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #endif -#endif /* __KERNEL__ */ #endif /* _ASM_I386_UNISTD_H_ */ diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h deleted file mode 100644 index f0ac399ba..000000000 --- a/include/asm-i386/unwind.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef _ASM_I386_UNWIND_H -#define _ASM_I386_UNWIND_H - -/* - * Copyright (C) 2002-2006 Novell, Inc. - * Jan Beulich - * This code is released under version 2 of the GNU GPL. - */ - -#ifdef CONFIG_STACK_UNWIND - -#include -#include -#include -#include - -struct unwind_frame_info -{ - struct pt_regs regs; - struct task_struct *task; -}; - -#define UNW_PC(frame) (frame)->regs.eip -#define UNW_SP(frame) (frame)->regs.esp -#ifdef CONFIG_FRAME_POINTER -#define UNW_FP(frame) (frame)->regs.ebp -#define FRAME_RETADDR_OFFSET 4 -#define FRAME_LINK_OFFSET 0 -#define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.esp0) -#define STACK_TOP(tsk) ((tsk)->thread.esp0) -#else -#define UNW_FP(frame) ((void)(frame), 0) -#endif -#define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) - -#define UNW_REGISTER_INFO \ - PTREGS_INFO(eax), \ - PTREGS_INFO(ecx), \ - PTREGS_INFO(edx), \ - PTREGS_INFO(ebx), \ - PTREGS_INFO(esp), \ - PTREGS_INFO(ebp), \ - PTREGS_INFO(esi), \ - PTREGS_INFO(edi), \ - PTREGS_INFO(eip) - -static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, - /*const*/ struct pt_regs *regs) -{ - if (user_mode_vm(regs)) - info->regs = *regs; - else { - memcpy(&info->regs, regs, offsetof(struct pt_regs, esp)); - info->regs.esp = (unsigned long)®s->esp; - info->regs.xss = __KERNEL_DS; - } -} - -static inline void arch_unw_init_blocked(struct unwind_frame_info *info) -{ - memset(&info->regs, 0, sizeof(info->regs)); - info->regs.eip = info->task->thread.eip; - info->regs.xcs = __KERNEL_CS; - __get_user(info->regs.ebp, (long *)info->task->thread.esp); - info->regs.esp = info->task->thread.esp; - info->regs.xss = __KERNEL_DS; - info->regs.xds = __USER_DS; - info->regs.xes = __USER_DS; -} - -extern asmlinkage int arch_unwind_init_running(struct unwind_frame_info *, - asmlinkage int (*callback)(struct unwind_frame_info *, - void *arg), - void *arg); - -static inline int arch_unw_user_mode(const struct unwind_frame_info *info) -{ -#if 0 /* This can only work when selector register and EFLAGS saves/restores - are properly annotated (and tracked in UNW_REGISTER_INFO). */ - return user_mode_vm(&info->regs); -#else - return info->regs.eip < PAGE_OFFSET - || (info->regs.eip >= __fix_to_virt(FIX_VDSO) - && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) - || info->regs.esp < PAGE_OFFSET; -#endif -} - -#else - -#define UNW_PC(frame) ((void)(frame), 0) -#define UNW_SP(frame) ((void)(frame), 0) -#define UNW_FP(frame) ((void)(frame), 0) - -static inline int arch_unw_user_mode(const void *info) -{ - return 0; -} - -#endif - -#endif /* _ASM_I386_UNWIND_H */ diff --git a/include/asm-i386/vga.h b/include/asm-i386/vga.h index 0ecf68ac0..ef0c0e50c 100644 --- a/include/asm-i386/vga.h +++ b/include/asm-i386/vga.h @@ -12,7 +12,7 @@ * access the videoram directly without any black magic. */ -#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/asm-ia64/Kbuild b/include/asm-ia64/Kbuild deleted file mode 100644 index 15818a18b..000000000 --- a/include/asm-ia64/Kbuild +++ /dev/null @@ -1,17 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += break.h -header-y += fpu.h -header-y += fpswa.h -header-y += gcc_intrin.h -header-y += ia64regs.h -header-y += intel_intrin.h -header-y += intrinsics.h -header-y += perfmon_default_smpl.h -header-y += ptrace_offsets.h -header-y += rse.h -header-y += setup.h -header-y += ucontext.h - -unifdef-y += perfmon.h -unifdef-y += ustack.h diff --git a/include/asm-ia64/agp.h b/include/asm-ia64/agp.h index e0bf8a4ab..4e517f0e6 100644 --- a/include/asm-ia64/agp.h +++ b/include/asm-ia64/agp.h @@ -19,44 +19,13 @@ #define flush_agp_cache() mb() /* Convert a physical address to an address suitable for the GART. */ -#ifndef CONFIG_XEN #define phys_to_gart(x) (x) #define gart_to_phys(x) (x) -#else -#define phys_to_gart(x) phys_to_machine_for_dma(x) -#define gart_to_phys(x) machine_to_phys_for_dma(x) -#endif /* GATT allocation. Returns/accepts GATT kernel virtual address. */ -#ifndef CONFIG_XEN #define alloc_gatt_pages(order) \ ((char *)__get_free_pages(GFP_KERNEL, (order))) #define free_gatt_pages(table, order) \ free_pages((unsigned long)(table), (order)) -#else -#include -static inline char* -alloc_gatt_pages(unsigned int order) -{ - unsigned long error; - unsigned long ret = __get_free_pages(GFP_KERNEL, (order)); - if (ret == 0) { - goto out; - } - error = xen_create_contiguous_region(ret, order, 0); - if (error) { - free_pages(ret, order); - ret = 0; - } -out: - return (char*)ret; -} -static inline void -free_gatt_pages(void* table, unsigned int order) -{ - xen_destroy_contiguous_region((unsigned long)table, order); - free_pages((unsigned long)table, order); -} -#endif /* CONFIG_XEN */ #endif /* _ASM_IA64_AGP_H */ diff --git a/include/asm-ia64/asmmacro.h b/include/asm-ia64/asmmacro.h index c22b4658f..edf2cebb2 100644 --- a/include/asm-ia64/asmmacro.h +++ b/include/asm-ia64/asmmacro.h @@ -6,6 +6,7 @@ * David Mosberger-Tang */ +#include #define ENTRY(name) \ .align 32; \ diff --git a/include/asm-ia64/cache.h b/include/asm-ia64/cache.h index e7482bd62..f0a104db8 100644 --- a/include/asm-ia64/cache.h +++ b/include/asm-ia64/cache.h @@ -1,6 +1,7 @@ #ifndef _ASM_IA64_CACHE_H #define _ASM_IA64_CACHE_H +#include /* * Copyright (C) 1998-2000 Hewlett-Packard Co diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h index a30a62f23..bba702076 100644 --- a/include/asm-ia64/delay.h +++ b/include/asm-ia64/delay.h @@ -12,6 +12,7 @@ * Copyright (C) 1999 Don Dugger */ +#include #include #include #include diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h index abe230e4e..df67d4080 100644 --- a/include/asm-ia64/dma-mapping.h +++ b/include/asm-ia64/dma-mapping.h @@ -5,68 +5,22 @@ * Copyright (C) 2003-2004 Hewlett-Packard Co * David Mosberger-Tang */ +#include #include -#ifndef CONFIG_XEN -#define dma_alloc_coherent platform_dma_alloc_coherent -#define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */ -#define dma_free_coherent platform_dma_free_coherent -#define dma_free_noncoherent platform_dma_free_coherent -#define dma_map_single platform_dma_map_single -#define dma_map_sg platform_dma_map_sg -#define dma_unmap_single platform_dma_unmap_single -#define dma_unmap_sg platform_dma_unmap_sg -#define dma_sync_single_for_cpu platform_dma_sync_single_for_cpu -#define dma_sync_sg_for_cpu platform_dma_sync_sg_for_cpu +#define dma_alloc_coherent platform_dma_alloc_coherent +#define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */ +#define dma_free_coherent platform_dma_free_coherent +#define dma_free_noncoherent platform_dma_free_coherent +#define dma_map_single platform_dma_map_single +#define dma_map_sg platform_dma_map_sg +#define dma_unmap_single platform_dma_unmap_single +#define dma_unmap_sg platform_dma_unmap_sg +#define dma_sync_single_for_cpu platform_dma_sync_single_for_cpu +#define dma_sync_sg_for_cpu platform_dma_sync_sg_for_cpu #define dma_sync_single_for_device platform_dma_sync_single_for_device -#define dma_sync_sg_for_device platform_dma_sync_sg_for_device -#define dma_mapping_error platform_dma_mapping_error - -#else /* CONFIG_XEN */ -/* Needed for arch/i386/kernel/swiotlb.c and arch/i386/kernel/pci-dma-xen.c */ -#include -/* Needed for arch/i386/kernel/swiotlb.c */ -#include - -int dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, - enum dma_data_direction direction); -void dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, - enum dma_data_direction direction); -int dma_supported(struct device *dev, u64 mask); -void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t gfp); -void dma_free_coherent(struct device *dev, size_t size, void *vaddr, - dma_addr_t dma_handle); -dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, - enum dma_data_direction direction); -void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, - enum dma_data_direction direction); -void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, - size_t size, enum dma_data_direction direction); -void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, - size_t size, - enum dma_data_direction direction); -int dma_mapping_error(dma_addr_t dma_addr); - -#define flush_write_buffers() do { } while (0) -static inline void -dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, - enum dma_data_direction direction) -{ - if (swiotlb) - swiotlb_sync_sg_for_cpu(dev,sg,nelems,direction); - flush_write_buffers(); -} - -static inline void -dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, - enum dma_data_direction direction) -{ - if (swiotlb) - swiotlb_sync_sg_for_device(dev,sg,nelems,direction); - flush_write_buffers(); -} -#endif /* CONFIG_XEN */ +#define dma_sync_sg_for_device platform_dma_sync_sg_for_device +#define dma_mapping_error platform_dma_mapping_error #define dma_map_page(dev, pg, off, size, dir) \ dma_map_single(dev, page_address(pg) + (off), (size), (dir)) @@ -83,9 +37,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, #define dma_sync_single_range_for_device(dev, dma_handle, offset, size, dir) \ dma_sync_single_for_device(dev, dma_handle, size, dir) -#ifndef CONFIG_XEN #define dma_supported platform_dma_supported -#endif static inline int dma_set_mask (struct device *dev, u64 mask) @@ -110,29 +62,4 @@ dma_cache_sync (void *vaddr, size_t size, enum dma_data_direction dir) #define dma_is_consistent(dma_handle) (1) /* all we do is coherent memory... */ -#ifdef CONFIG_XEN -/* arch/i386/kernel/swiotlb.o requires */ -void contiguous_bitmap_init(unsigned long end_pfn); - -static inline int -address_needs_mapping(struct device *hwdev, dma_addr_t addr) -{ - dma_addr_t mask = DMA_64BIT_MASK; - /* If the device has a mask, use it, otherwise default to 64 bits */ - if (hwdev && hwdev->dma_mask) - mask = *hwdev->dma_mask; - return (addr & ~mask) != 0; -} -#else -#define contiguous_bitmap_init(end_pfn) ((void)end_pfn) -#endif - -static inline int -range_straddles_page_boundary(void *p, size_t size) -{ - extern unsigned long *contiguous_bitmap; - return (((((unsigned long)p & ~PAGE_MASK) + size) > PAGE_SIZE) && - !test_bit(__pa(p) >> PAGE_SHIFT, contiguous_bitmap)); -} - #endif /* _ASM_IA64_DMA_MAPPING_H */ diff --git a/include/asm-ia64/dma.h b/include/asm-ia64/dma.h index dad3a735d..3be1b4925 100644 --- a/include/asm-ia64/dma.h +++ b/include/asm-ia64/dma.h @@ -6,6 +6,7 @@ * David Mosberger-Tang */ +#include #include /* need byte IO */ diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h index 25f9835d5..446fce036 100644 --- a/include/asm-ia64/elf.h +++ b/include/asm-ia64/elf.h @@ -8,6 +8,7 @@ * David Mosberger-Tang */ +#include #include #include diff --git a/include/asm-ia64/fixmap.h b/include/asm-ia64/fixmap.h deleted file mode 100644 index 4b32a8298..000000000 --- a/include/asm-ia64/fixmap.h +++ /dev/null @@ -1,2 +0,0 @@ -#define clear_fixmap(x) do {} while (0) -#define set_fixmap(x,y) do {} while (0) diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h index b23a28029..4fb4e439b 100644 --- a/include/asm-ia64/gcc_intrin.h +++ b/include/asm-ia64/gcc_intrin.h @@ -26,7 +26,7 @@ extern void ia64_bad_param_for_getreg (void); register unsigned long ia64_r13 asm ("r13") __attribute_used__; -#define __ia64_setreg(regnum, val) \ +#define ia64_setreg(regnum, val) \ ({ \ switch (regnum) { \ case _IA64_REG_PSR_L: \ @@ -55,7 +55,7 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; } \ }) -#define __ia64_getreg(regnum) \ +#define ia64_getreg(regnum) \ ({ \ __u64 ia64_intri_res; \ \ @@ -92,7 +92,7 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define ia64_hint_pause 0 -#define __ia64_hint(mode) \ +#define ia64_hint(mode) \ ({ \ switch (mode) { \ case ia64_hint_pause: \ @@ -374,7 +374,7 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define ia64_invala() asm volatile ("invala" ::: "memory") -#define __ia64_thash(addr) \ +#define ia64_thash(addr) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("thash %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ @@ -394,18 +394,18 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define ia64_nop(x) asm volatile ("nop %0"::"i"(x)); -#define __ia64_itci(addr) asm volatile ("itc.i %0;;" :: "r"(addr) : "memory") +#define ia64_itci(addr) asm volatile ("itc.i %0;;" :: "r"(addr) : "memory") -#define __ia64_itcd(addr) asm volatile ("itc.d %0;;" :: "r"(addr) : "memory") +#define ia64_itcd(addr) asm volatile ("itc.d %0;;" :: "r"(addr) : "memory") -#define __ia64_itri(trnum, addr) asm volatile ("itr.i itr[%0]=%1" \ +#define ia64_itri(trnum, addr) asm volatile ("itr.i itr[%0]=%1" \ :: "r"(trnum), "r"(addr) : "memory") -#define __ia64_itrd(trnum, addr) asm volatile ("itr.d dtr[%0]=%1" \ +#define ia64_itrd(trnum, addr) asm volatile ("itr.d dtr[%0]=%1" \ :: "r"(trnum), "r"(addr) : "memory") -#define __ia64_tpa(addr) \ +#define ia64_tpa(addr) \ ({ \ __u64 ia64_pa; \ asm volatile ("tpa %0 = %1" : "=r"(ia64_pa) : "r"(addr) : "memory"); \ @@ -415,22 +415,22 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; #define __ia64_set_dbr(index, val) \ asm volatile ("mov dbr[%0]=%1" :: "r"(index), "r"(val) : "memory") -#define __ia64_set_ibr(index, val) \ +#define ia64_set_ibr(index, val) \ asm volatile ("mov ibr[%0]=%1" :: "r"(index), "r"(val) : "memory") -#define __ia64_set_pkr(index, val) \ +#define ia64_set_pkr(index, val) \ asm volatile ("mov pkr[%0]=%1" :: "r"(index), "r"(val) : "memory") -#define __ia64_set_pmc(index, val) \ +#define ia64_set_pmc(index, val) \ asm volatile ("mov pmc[%0]=%1" :: "r"(index), "r"(val) : "memory") -#define __ia64_set_pmd(index, val) \ +#define ia64_set_pmd(index, val) \ asm volatile ("mov pmd[%0]=%1" :: "r"(index), "r"(val) : "memory") -#define __ia64_set_rr(index, val) \ +#define ia64_set_rr(index, val) \ asm volatile ("mov rr[%0]=%1" :: "r"(index), "r"(val) : "memory"); -#define __ia64_get_cpuid(index) \ +#define ia64_get_cpuid(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=cpuid[%r1]" : "=r"(ia64_intri_res) : "rO"(index)); \ @@ -444,21 +444,21 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; ia64_intri_res; \ }) -#define __ia64_get_ibr(index) \ +#define ia64_get_ibr(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=ibr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) -#define __ia64_get_pkr(index) \ +#define ia64_get_pkr(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=pkr[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) -#define __ia64_get_pmc(index) \ +#define ia64_get_pmc(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=pmc[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ @@ -466,48 +466,48 @@ register unsigned long ia64_r13 asm ("r13") __attribute_used__; }) -#define __ia64_get_pmd(index) \ +#define ia64_get_pmd(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=pmd[%1]" : "=r"(ia64_intri_res) : "r"(index)); \ ia64_intri_res; \ }) -#define __ia64_get_rr(index) \ +#define ia64_get_rr(index) \ ({ \ __u64 ia64_intri_res; \ asm volatile ("mov %0=rr[%1]" : "=r"(ia64_intri_res) : "r" (index)); \ ia64_intri_res; \ }) -#define __ia64_fc(addr) asm volatile ("fc %0" :: "r"(addr) : "memory") +#define ia64_fc(addr) asm volatile ("fc %0" :: "r"(addr) : "memory") #define ia64_sync_i() asm volatile (";; sync.i" ::: "memory") -#define __ia64_ssm(mask) asm volatile ("ssm %0":: "i"((mask)) : "memory") -#define __ia64_rsm(mask) asm volatile ("rsm %0":: "i"((mask)) : "memory") +#define ia64_ssm(mask) asm volatile ("ssm %0":: "i"((mask)) : "memory") +#define ia64_rsm(mask) asm volatile ("rsm %0":: "i"((mask)) : "memory") #define ia64_sum(mask) asm volatile ("sum %0":: "i"((mask)) : "memory") #define ia64_rum(mask) asm volatile ("rum %0":: "i"((mask)) : "memory") -#define __ia64_ptce(addr) asm volatile ("ptc.e %0" :: "r"(addr)) +#define ia64_ptce(addr) asm volatile ("ptc.e %0" :: "r"(addr)) -#define __ia64_ptcga(addr, size) \ +#define ia64_ptcga(addr, size) \ do { \ asm volatile ("ptc.ga %0,%1" :: "r"(addr), "r"(size) : "memory"); \ ia64_dv_serialize_data(); \ } while (0) -#define __ia64_ptcl(addr, size) \ +#define ia64_ptcl(addr, size) \ do { \ asm volatile ("ptc.l %0,%1" :: "r"(addr), "r"(size) : "memory"); \ ia64_dv_serialize_data(); \ } while (0) -#define __ia64_ptri(addr, size) \ +#define ia64_ptri(addr, size) \ asm volatile ("ptr.i %0,%1" :: "r"(addr), "r"(size) : "memory") -#define __ia64_ptrd(addr, size) \ +#define ia64_ptrd(addr, size) \ asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") /* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */ @@ -589,7 +589,7 @@ do { \ } \ }) -#define __ia64_intrin_local_irq_restore(x) \ +#define ia64_intrin_local_irq_restore(x) \ do { \ asm volatile (";; cmp.ne p6,p7=%0,r0;;" \ "(p6) ssm psr.i;" \ @@ -598,6 +598,4 @@ do { \ :: "r"((x)) : "p6", "p7", "memory"); \ } while (0) -#define __ia64_get_psr_i() (__ia64_getreg(_IA64_REG_PSR) & 0x4000UL) - #endif /* _ASM_IA64_GCC_INTRIN_H */ diff --git a/include/asm-ia64/hardirq.h b/include/asm-ia64/hardirq.h index 140e495b8..33ef8f096 100644 --- a/include/asm-ia64/hardirq.h +++ b/include/asm-ia64/hardirq.h @@ -6,6 +6,7 @@ * David Mosberger-Tang */ +#include #include #include diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index d990e9e57..0cf119b42 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h @@ -15,11 +15,7 @@ #include #include -#ifndef CONFIG_XEN typedef u8 ia64_vector; -#else -typedef u16 ia64_vector; -#endif /* * 0 special @@ -51,19 +47,9 @@ typedef u16 ia64_vector; #define IA64_CMC_VECTOR 0x1f /* corrected machine-check interrupt vector */ /* * Vectors 0x20-0x2f are reserved for legacy ISA IRQs. - * Use vectors 0x30-0xe7 as the default device vector range for ia64. - * Platforms may choose to reduce this range in platform_irq_setup, but the - * platform range must fall within - * [IA64_DEF_FIRST_DEVICE_VECTOR..IA64_DEF_LAST_DEVICE_VECTOR] */ -extern int ia64_first_device_vector; -extern int ia64_last_device_vector; - -#define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 -#define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 -#define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector -#define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector -#define IA64_MAX_DEVICE_VECTORS (IA64_DEF_LAST_DEVICE_VECTOR - IA64_DEF_FIRST_DEVICE_VECTOR + 1) +#define IA64_FIRST_DEVICE_VECTOR 0x30 +#define IA64_LAST_DEVICE_VECTOR 0xe7 #define IA64_NUM_DEVICE_VECTORS (IA64_LAST_DEVICE_VECTOR - IA64_FIRST_DEVICE_VECTOR + 1) #define IA64_MCA_RENDEZ_VECTOR 0xe8 /* MCA rendez interrupt */ @@ -97,18 +83,12 @@ extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt extern int assign_irq_vector (int irq); /* allocate a free vector */ extern void free_irq_vector (int vector); -extern int reserve_irq_vector (int vector); extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); -static inline void ia64_resend_irq(unsigned int vector) +static inline void +hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) { -#ifdef CONFIG_XEN - extern void resend_irq_on_evtchn(unsigned int i); - if (is_running_on_xen()) - resend_irq_on_evtchn(vector); - else -#endif /* CONFIG_XEN */ platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); } diff --git a/include/asm-ia64/hypercall.h b/include/asm-ia64/hypercall.h deleted file mode 100644 index 837533694..000000000 --- a/include/asm-ia64/hypercall.h +++ /dev/null @@ -1,423 +0,0 @@ -/****************************************************************************** - * hypercall.h - * - * Linux-specific hypervisor handling. - * - * Copyright (c) 2002-2004, K A Fraser - * - * 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; or, when distributed - * separately from the Linux kernel or incorporated into other - * software packages, subject to the following license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef __HYPERCALL_H__ -#define __HYPERCALL_H__ - -#include /* memcpy() */ - -#ifndef __HYPERVISOR_H__ -# error "please don't include this file directly" -#endif - -/* - * Assembler stubs for hyper-calls. - */ - -#define _hypercall0(type, name) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name) \ - : "r2","r8", \ - "memory" ); \ - (type)__res; \ -}) - -#define _hypercall1(type, name, a1) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r14=%2\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name), \ - "rI" ((unsigned long)(a1)) \ - : "r14","r2","r8", \ - "memory" ); \ - (type)__res; \ -}) - -#define _hypercall2(type, name, a1, a2) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r14=%2\n" \ - "mov r15=%3\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name), \ - "rI" ((unsigned long)(a1)), \ - "rI" ((unsigned long)(a2)) \ - : "r14","r15","r2","r8", \ - "memory" ); \ - (type)__res; \ -}) - -#define _hypercall3(type, name, a1, a2, a3) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r14=%2\n" \ - "mov r15=%3\n" \ - "mov r16=%4\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name), \ - "rI" ((unsigned long)(a1)), \ - "rI" ((unsigned long)(a2)), \ - "rI" ((unsigned long)(a3)) \ - : "r14","r15","r16","r2","r8", \ - "memory" ); \ - (type)__res; \ -}) - -#define _hypercall4(type, name, a1, a2, a3, a4) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r14=%2\n" \ - "mov r15=%3\n" \ - "mov r16=%4\n" \ - "mov r17=%5\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name), \ - "rI" ((unsigned long)(a1)), \ - "rI" ((unsigned long)(a2)), \ - "rI" ((unsigned long)(a3)), \ - "rI" ((unsigned long)(a4)) \ - : "r14","r15","r16","r2","r8", \ - "r17","memory" ); \ - (type)__res; \ -}) - -#define _hypercall5(type, name, a1, a2, a3, a4, a5) \ -({ \ - long __res; \ - __asm__ __volatile__ (";;\n" \ - "mov r14=%2\n" \ - "mov r15=%3\n" \ - "mov r16=%4\n" \ - "mov r17=%5\n" \ - "mov r18=%6\n" \ - "mov r2=%1\n" \ - "break 0x1000 ;;\n" \ - "mov %0=r8 ;;\n" \ - : "=r" (__res) \ - : "J" (__HYPERVISOR_##name), \ - "rI" ((unsigned long)(a1)), \ - "rI" ((unsigned long)(a2)), \ - "rI" ((unsigned long)(a3)), \ - "rI" ((unsigned long)(a4)), \ - "rI" ((unsigned long)(a5)) \ - : "r14","r15","r16","r2","r8", \ - "r17","r18","memory" ); \ - (type)__res; \ -}) - -static inline int -HYPERVISOR_sched_op_compat( - int cmd, unsigned long arg) -{ - return _hypercall2(int, sched_op_compat, cmd, arg); -} - -static inline int -HYPERVISOR_sched_op( - int cmd, void *arg) -{ - return _hypercall2(int, sched_op, cmd, arg); -} - -static inline long -HYPERVISOR_set_timer_op( - u64 timeout) -{ - unsigned long timeout_hi = (unsigned long)(timeout>>32); - unsigned long timeout_lo = (unsigned long)timeout; - return _hypercall2(long, set_timer_op, timeout_lo, timeout_hi); -} - -static inline int -HYPERVISOR_dom0_op( - dom0_op_t *dom0_op) -{ - dom0_op->interface_version = DOM0_INTERFACE_VERSION; - return _hypercall1(int, dom0_op, dom0_op); -} - -static inline int -HYPERVISOR_multicall( - void *call_list, int nr_calls) -{ - return _hypercall2(int, multicall, call_list, nr_calls); -} - -//XXX xen/ia64 copy_from_guest() is broken. -// This is a temporal work around until it is fixed. -static inline int -____HYPERVISOR_memory_op( - unsigned int cmd, void *arg) -{ - return _hypercall2(int, memory_op, cmd, arg); -} - -#include -#ifdef CONFIG_VMX_GUEST -# define ia64_xenmem_reservation_op(op, xmr) (0) -#else -int ia64_xenmem_reservation_op(unsigned long op, - struct xen_memory_reservation* reservation__); -#endif -static inline int -HYPERVISOR_memory_op( - unsigned int cmd, void *arg) -{ - switch (cmd) { - case XENMEM_increase_reservation: - case XENMEM_decrease_reservation: - case XENMEM_populate_physmap: - return ia64_xenmem_reservation_op(cmd, - (struct xen_memory_reservation*)arg); - default: - return ____HYPERVISOR_memory_op(cmd, arg); - } - /* NOTREACHED */ -} - -static inline int -HYPERVISOR_event_channel_op( - int cmd, void *arg) -{ - int rc = _hypercall2(int, event_channel_op, cmd, arg); - if (unlikely(rc == -ENOSYS)) { - struct evtchn_op op; - op.cmd = cmd; - memcpy(&op.u, arg, sizeof(op.u)); - rc = _hypercall1(int, event_channel_op_compat, &op); - } - return rc; -} - -static inline int -HYPERVISOR_acm_op( - unsigned int cmd, void *arg) -{ - return _hypercall2(int, acm_op, cmd, arg); -} - -static inline int -HYPERVISOR_xen_version( - int cmd, void *arg) -{ - return _hypercall2(int, xen_version, cmd, arg); -} - -static inline int -HYPERVISOR_console_io( - int cmd, int count, char *str) -{ - return _hypercall3(int, console_io, cmd, count, str); -} - -static inline int -HYPERVISOR_physdev_op( - int cmd, void *arg) -{ - int rc = _hypercall2(int, physdev_op, cmd, arg); - if (unlikely(rc == -ENOSYS)) { - struct physdev_op op; - op.cmd = cmd; - memcpy(&op.u, arg, sizeof(op.u)); - rc = _hypercall1(int, physdev_op_compat, &op); - } - return rc; -} - -//XXX __HYPERVISOR_grant_table_op is used for this hypercall constant. -static inline int -____HYPERVISOR_grant_table_op( - unsigned int cmd, void *uop, unsigned int count, - unsigned long pa1, unsigned long pa2) -{ - return _hypercall5(int, grant_table_op, cmd, uop, count, pa1, pa2); -} - -int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count); - -static inline int -HYPERVISOR_vcpu_op( - int cmd, int vcpuid, void *extra_args) -{ - return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args); -} - -extern int HYPERVISOR_suspend(unsigned long srec); - -static inline unsigned long -HYPERVISOR_hvm_op( - int cmd, void *arg) -{ - return _hypercall2(unsigned long, hvm_op, cmd, arg); -} - -static inline int -HYPERVISOR_callback_op( - int cmd, void *arg) -{ - return _hypercall2(int, callback_op, cmd, arg); -} - -extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); -static inline void exit_idle(void) {} -#define do_IRQ(irq, regs) ({ \ - irq_enter(); \ - __do_IRQ((irq), (regs)); \ - irq_exit(); \ -}) - -#include -#ifdef CONFIG_XEN -#include -#endif /* CONFIG_XEN */ - -static inline unsigned long -__HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) -{ - return _hypercall3(unsigned long, ia64_dom0vp_op, - IA64_DOM0VP_ioremap, ioaddr, size); -} - -static inline unsigned long -HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) -{ - unsigned long ret = ioaddr; - if (is_running_on_xen()) { - ret = __HYPERVISOR_ioremap(ioaddr, size); - if (unlikely(ret == -ENOSYS)) - panic("hypercall %s failed with %ld. " - "Please check Xen and Linux config mismatch\n", - __func__, -ret); - else if (unlikely(IS_ERR_VALUE(ret))) - ret = ioaddr; - } - return ret; -} - -static inline unsigned long -__HYPERVISOR_phystomach(unsigned long gpfn) -{ - return _hypercall2(unsigned long, ia64_dom0vp_op, - IA64_DOM0VP_phystomach, gpfn); -} - -static inline unsigned long -HYPERVISOR_phystomach(unsigned long gpfn) -{ - unsigned long ret = gpfn; - if (is_running_on_xen()) { - ret = __HYPERVISOR_phystomach(gpfn); - } - return ret; -} - -static inline unsigned long -__HYPERVISOR_machtophys(unsigned long mfn) -{ - return _hypercall2(unsigned long, ia64_dom0vp_op, - IA64_DOM0VP_machtophys, mfn); -} - -static inline unsigned long -HYPERVISOR_machtophys(unsigned long mfn) -{ - unsigned long ret = mfn; - if (is_running_on_xen()) { - ret = __HYPERVISOR_machtophys(mfn); - } - return ret; -} - -static inline unsigned long -__HYPERVISOR_zap_physmap(unsigned long gpfn, unsigned int extent_order) -{ - return _hypercall3(unsigned long, ia64_dom0vp_op, - IA64_DOM0VP_zap_physmap, gpfn, extent_order); -} - -static inline unsigned long -HYPERVISOR_zap_physmap(unsigned long gpfn, unsigned int extent_order) -{ - unsigned long ret = 0; - if (is_running_on_xen()) { - ret = __HYPERVISOR_zap_physmap(gpfn, extent_order); - } - return ret; -} - -static inline unsigned long -__HYPERVISOR_add_physmap(unsigned long gpfn, unsigned long mfn, - unsigned long flags, domid_t domid) -{ - return _hypercall5(unsigned long, ia64_dom0vp_op, - IA64_DOM0VP_add_physmap, gpfn, mfn, flags, domid); -} - -static inline unsigned long -HYPERVISOR_add_physmap(unsigned long gpfn, unsigned long mfn, - unsigned long flags, domid_t domid) -{ - unsigned long ret = 0; - BUG_ON(!is_running_on_xen());//XXX - if (is_running_on_xen()) { - ret = __HYPERVISOR_add_physmap(gpfn, mfn, flags, domid); - } - return ret; -} - -// for balloon driver -#define HYPERVISOR_update_va_mapping(va, new_val, flags) (0) - -#endif /* __HYPERCALL_H__ */ diff --git a/include/asm-ia64/hypervisor.h b/include/asm-ia64/hypervisor.h deleted file mode 100644 index 3c190aea3..000000000 --- a/include/asm-ia64/hypervisor.h +++ /dev/null @@ -1,218 +0,0 @@ -/****************************************************************************** - * hypervisor.h - * - * Linux-specific hypervisor handling. - * - * Copyright (c) 2002-2004, K A Fraser - * - * 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; or, when distributed - * separately from the Linux kernel or incorporated into other - * software packages, subject to the following license: - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this source file (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, modify, - * merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef __HYPERVISOR_H__ -#define __HYPERVISOR_H__ - -#ifdef CONFIG_XEN -extern int running_on_xen; -#define is_running_on_xen() (running_on_xen) -#else /* CONFIG_XEN */ -# ifdef CONFIG_VMX_GUEST -# define is_running_on_xen() (1) -# else /* CONFIG_VMX_GUEST */ -# define is_running_on_xen() (0) -# define HYPERVISOR_ioremap(offset, size) (offset) -# endif /* CONFIG_VMX_GUEST */ -#endif /* CONFIG_XEN */ - -#if defined(CONFIG_XEN) || defined(CONFIG_VMX_GUEST) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern shared_info_t *HYPERVISOR_shared_info; -extern start_info_t *xen_start_info; - -void force_evtchn_callback(void); - -#ifndef CONFIG_VMX_GUEST -/* Turn jiffies into Xen system time. XXX Implement me. */ -#define jiffies_to_st(j) 0 - -static inline int -HYPERVISOR_yield( - void) -{ - int rc = HYPERVISOR_sched_op(SCHEDOP_yield, NULL); - - if (rc == -ENOSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); - - return rc; -} - -static inline int -HYPERVISOR_block( - void) -{ - int rc = HYPERVISOR_sched_op(SCHEDOP_block, NULL); - - if (rc == -ENOSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_block, 0); - - return rc; -} - -static inline int -HYPERVISOR_shutdown( - unsigned int reason) -{ - struct sched_shutdown sched_shutdown = { - .reason = reason - }; - - int rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown); - - if (rc == -ENOSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_shutdown, reason); - - return rc; -} - -static inline int -HYPERVISOR_poll( - evtchn_port_t *ports, unsigned int nr_ports, u64 timeout) -{ - struct sched_poll sched_poll = { - .nr_ports = nr_ports, - .timeout = jiffies_to_st(timeout) - }; - - int rc; - - set_xen_guest_handle(sched_poll.ports, ports); - rc = HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll); - if (rc == -ENOSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); - - return rc; -} - -#include - -// for drivers/xen/privcmd/privcmd.c -#define machine_to_phys_mapping 0 -struct vm_area_struct; -int direct_remap_pfn_range(struct vm_area_struct *vma, - unsigned long address, - unsigned long mfn, - unsigned long size, - pgprot_t prot, - domid_t domid); -struct file; -int privcmd_mmap(struct file * file, struct vm_area_struct * vma); -#define HAVE_ARCH_PRIVCMD_MMAP - -// for drivers/xen/balloon/balloon.c -#ifdef CONFIG_XEN_SCRUB_PAGES -#define scrub_pages(_p,_n) memset((void *)(_p), 0, (_n) << PAGE_SHIFT) -#else -#define scrub_pages(_p,_n) ((void)0) -#endif -#define pte_mfn(_x) pte_pfn(_x) -#define phys_to_machine_mapping_valid(_x) (1) - -#endif /* !CONFIG_VMX_GUEST */ - -#define __pte_ma(_x) ((pte_t) {(_x)}) /* unmodified use */ -#define pfn_pte_ma(_x,_y) __pte_ma(0) /* unmodified use */ - -#ifndef CONFIG_VMX_GUEST -int __xen_create_contiguous_region(unsigned long vstart, unsigned int order, unsigned int address_bits); -static inline int -xen_create_contiguous_region(unsigned long vstart, - unsigned int order, unsigned int address_bits) -{ - int ret = 0; - if (is_running_on_xen()) { - ret = __xen_create_contiguous_region(vstart, order, - address_bits); - } - return ret; -} - -void __xen_destroy_contiguous_region(unsigned long vstart, unsigned int order); -static inline void -xen_destroy_contiguous_region(unsigned long vstart, unsigned int order) -{ - if (is_running_on_xen()) - __xen_destroy_contiguous_region(vstart, order); -} - -#endif /* !CONFIG_VMX_GUEST */ - -// for netfront.c, netback.c -#define MULTI_UVMFLAGS_INDEX 0 //XXX any value - -static inline void -MULTI_update_va_mapping( - multicall_entry_t *mcl, unsigned long va, - pte_t new_val, unsigned long flags) -{ - mcl->op = __HYPERVISOR_update_va_mapping; - mcl->result = 0; -} - -static inline void -MULTI_grant_table_op(multicall_entry_t *mcl, unsigned int cmd, - void *uop, unsigned int count) -{ - mcl->op = __HYPERVISOR_grant_table_op; - mcl->args[0] = cmd; - mcl->args[1] = (unsigned long)uop; - mcl->args[2] = count; -} - -// for debug -asmlinkage int xprintk(const char *fmt, ...); -#define xprintd(fmt, ...) xprintk("%s:%d " fmt, __func__, __LINE__, \ - ##__VA_ARGS__) - -#endif /* CONFIG_XEN || CONFIG_VMX_GUEST */ - -#ifdef CONFIG_XEN_PRIVILEGED_GUEST -#define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) -#else -#define is_initial_xendomain() 0 -#endif - -#endif /* __HYPERVISOR_H__ */ diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index 5ff8d74c3..f8044a116 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h @@ -1,6 +1,7 @@ #ifndef _ASM_IA64_IA32_H #define _ASM_IA64_IA32_H +#include #include #include diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e928675de..93f45c5f1 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ +#include #include diff --git a/include/asm-ia64/intel_intrin.h b/include/asm-ia64/intel_intrin.h index abc660e58..d069b6acd 100644 --- a/include/asm-ia64/intel_intrin.h +++ b/include/asm-ia64/intel_intrin.h @@ -16,10 +16,8 @@ * intrinsic */ -#define __ia64_getreg __getReg -#define __ia64_setreg __setReg - -#define __ia64_hint(x) +#define ia64_getreg __getReg +#define ia64_setreg __setReg #define ia64_hint __hint #define ia64_hint_pause __hint_pause @@ -35,16 +33,16 @@ #define ia64_getf_exp __getf_exp #define ia64_shrp _m64_shrp -#define __ia64_tpa __tpa +#define ia64_tpa __tpa #define ia64_invala __invala #define ia64_invala_gr __invala_gr #define ia64_invala_fr __invala_fr #define ia64_nop __nop #define ia64_sum __sum -#define __ia64_ssm __ssm +#define ia64_ssm __ssm #define ia64_rum __rum -#define __ia64_rsm __rsm -#define __ia64_fc __fc +#define ia64_rsm __rsm +#define ia64_fc __fc #define ia64_ldfs __ldfs #define ia64_ldfd __ldfd @@ -82,24 +80,24 @@ #define __ia64_set_dbr(index, val) \ __setIndReg(_IA64_REG_INDR_DBR, index, val) -#define __ia64_set_ibr(index, val) \ +#define ia64_set_ibr(index, val) \ __setIndReg(_IA64_REG_INDR_IBR, index, val) -#define __ia64_set_pkr(index, val) \ +#define ia64_set_pkr(index, val) \ __setIndReg(_IA64_REG_INDR_PKR, index, val) -#define __ia64_set_pmc(index, val) \ +#define ia64_set_pmc(index, val) \ __setIndReg(_IA64_REG_INDR_PMC, index, val) -#define __ia64_set_pmd(index, val) \ +#define ia64_set_pmd(index, val) \ __setIndReg(_IA64_REG_INDR_PMD, index, val) -#define __ia64_set_rr(index, val) \ +#define ia64_set_rr(index, val) \ __setIndReg(_IA64_REG_INDR_RR, index, val) -#define __ia64_get_cpuid(index) __getIndReg(_IA64_REG_INDR_CPUID, index) +#define ia64_get_cpuid(index) __getIndReg(_IA64_REG_INDR_CPUID, index) #define __ia64_get_dbr(index) __getIndReg(_IA64_REG_INDR_DBR, index) -#define __ia64_get_ibr(index) __getIndReg(_IA64_REG_INDR_IBR, index) -#define __ia64_get_pkr(index) __getIndReg(_IA64_REG_INDR_PKR, index) -#define __ia64_get_pmc(index) __getIndReg(_IA64_REG_INDR_PMC, index) -#define __ia64_get_pmd(index) __getIndReg(_IA64_REG_INDR_PMD, index) -#define __ia64_get_rr(index) __getIndReg(_IA64_REG_INDR_RR, index) +#define ia64_get_ibr(index) __getIndReg(_IA64_REG_INDR_IBR, index) +#define ia64_get_pkr(index) __getIndReg(_IA64_REG_INDR_PKR, index) +#define ia64_get_pmc(index) __getIndReg(_IA64_REG_INDR_PMC, index) +#define ia64_get_pmd(index) __getIndReg(_IA64_REG_INDR_PMD, index) +#define ia64_get_rr(index) __getIndReg(_IA64_REG_INDR_RR, index) #define ia64_srlz_d __dsrlz #define ia64_srlz_i __isrlz @@ -118,18 +116,18 @@ #define ia64_ld8_acq __ld8_acq #define ia64_sync_i __synci -#define __ia64_thash __thash -#define __ia64_ttag __ttag -#define __ia64_itcd __itcd -#define __ia64_itci __itci -#define __ia64_itrd __itrd -#define __ia64_itri __itri -#define __ia64_ptce __ptce -#define __ia64_ptcl __ptcl -#define __ia64_ptcg __ptcg -#define __ia64_ptcga __ptcga -#define __ia64_ptri __ptri -#define __ia64_ptrd __ptrd +#define ia64_thash __thash +#define ia64_ttag __ttag +#define ia64_itcd __itcd +#define ia64_itci __itci +#define ia64_itrd __itrd +#define ia64_itri __itri +#define ia64_ptce __ptce +#define ia64_ptcl __ptcl +#define ia64_ptcg __ptcg +#define ia64_ptcga __ptcga +#define ia64_ptri __ptri +#define ia64_ptrd __ptrd #define ia64_dep_mi _m64_dep_mi /* Values for lfhint in __lfetch and __lfetch_fault */ @@ -144,18 +142,16 @@ #define ia64_lfetch_fault __lfetch_fault #define ia64_lfetch_fault_excl __lfetch_fault_excl -#define __ia64_intrin_local_irq_restore(x) \ +#define ia64_intrin_local_irq_restore(x) \ do { \ if ((x) != 0) { \ - __ia64_ssm(IA64_PSR_I); \ + ia64_ssm(IA64_PSR_I); \ ia64_srlz_d(); \ } else { \ - __ia64_rsm(IA64_PSR_I); \ + ia64_rsm(IA64_PSR_I); \ } \ } while (0) -#define __ia64_get_psr_i() (__ia64_getreg(_IA64_REG_PSR) & 0x4000UL) - #define __builtin_trap() __break(0); #endif /* _ASM_IA64_INTEL_INTRIN_H */ diff --git a/include/asm-ia64/intrinsics.h b/include/asm-ia64/intrinsics.h index 3a95aa432..8089f955e 100644 --- a/include/asm-ia64/intrinsics.h +++ b/include/asm-ia64/intrinsics.h @@ -9,6 +9,7 @@ */ #ifndef __ASSEMBLY__ +#include /* include compiler specific intrinsics */ #include diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 14ac58556..c2e374210 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h @@ -66,11 +66,9 @@ extern unsigned int num_io_spaces; #define PIO_RESERVED __IA64_UNCACHED_OFFSET #define HAVE_ARCH_PIO_SIZE -#include #include #include #include -#include #include #include @@ -90,49 +88,16 @@ phys_to_virt (unsigned long address) } #define ARCH_HAS_VALID_PHYS_ADDR_RANGE -extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size); extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */ -extern int valid_mmap_phys_addr_range (unsigned long pfn, size_t count); +extern int valid_mmap_phys_addr_range (unsigned long addr, size_t count); /* * The following two macros are deprecated and scheduled for removal. * Please use the PCI-DMA interface defined in instead. */ -#ifndef CONFIG_XEN #define bus_to_virt phys_to_virt #define virt_to_bus virt_to_phys #define page_to_bus page_to_phys -#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) -#define page_to_pseudophys(page) page_to_phys(page) -#else /* CONFIG_XEN */ -#define bus_to_virt(bus) \ - phys_to_virt(machine_to_phys_for_dma(bus)) -#define virt_to_bus(virt) \ - phys_to_machine_for_dma(virt_to_phys(virt)) -#define page_to_bus(page) \ - phys_to_machine_for_dma(page_to_pseudophys(page)) - -#define page_to_pseudophys(page) \ - ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) - -/* - * Drivers that use page_to_phys() for bus addresses are broken. - * This includes: - * drivers/ide/cris/ide-cris.c - * drivers/scsi/dec_esp.c - */ -#define page_to_phys(page) (page_to_pseudophys(page)) -#define bvec_to_bus(bv) (page_to_bus((bv)->bv_page) + \ - (unsigned long) (bv)->bv_offset) -#define bio_to_pseudophys(bio) (page_to_pseudophys(bio_page((bio))) + \ - (unsigned long) bio_offset((bio))) -#define bvec_to_pseudophys(bv) (page_to_pseudophys((bv)->bv_page) + \ - (unsigned long) (bv)->bv_offset) -#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ - (((bvec_to_bus((vec1)) + (vec1)->bv_len) == bvec_to_bus((vec2))) && \ - ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == \ - bvec_to_pseudophys((vec2)))) -#endif /* CONFIG_XEN */ # endif /* KERNEL */ diff --git a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h index 87de4873f..20f98f175 100644 --- a/include/asm-ia64/iosapic.h +++ b/include/asm-ia64/iosapic.h @@ -53,7 +53,6 @@ #define NR_IOSAPICS 256 -#ifndef CONFIG_XEN static inline unsigned int iosapic_read(char __iomem *iosapic, unsigned int reg) { writel(reg, iosapic + IOSAPIC_REG_SELECT); @@ -65,7 +64,6 @@ static inline void iosapic_write(char __iomem *iosapic, unsigned int reg, u32 va writel(reg, iosapic + IOSAPIC_REG_SELECT); writel(val, iosapic + IOSAPIC_WINDOW); } -#endif static inline void iosapic_eoi(char __iomem *iosapic, u32 vector) { diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index 96f58d78b..dbe86c0bb 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h @@ -11,39 +11,13 @@ * 02/29/00 D.Mosberger moved most things into hw_irq.h */ -#ifndef CONFIG_XEN #define NR_IRQS 256 #define NR_IRQ_VECTORS NR_IRQS -#else + /* - * The flat IRQ space is divided into two regions: - * 1. A one-to-one mapping of real physical IRQs. This space is only used - * if we have physical device-access privilege. This region is at the - * start of the IRQ space so that existing device drivers do not need - * to be modified to translate physical IRQ numbers into our IRQ space. - * 3. A dynamic mapping of inter-domain and Xen-sourced virtual IRQs. These - * are bound using the provided bind/unbind functions. + * IRQ line status macro IRQ_PER_CPU is used */ - -#define PIRQ_BASE 0 -#define NR_PIRQS 256 - -#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS) -#define NR_DYNIRQS 256 - -#define NR_IRQS (NR_PIRQS + NR_DYNIRQS) -#define NR_IRQ_VECTORS NR_IRQS - -#define pirq_to_irq(_x) ((_x) + PIRQ_BASE) -#define irq_to_pirq(_x) ((_x) - PIRQ_BASE) - -#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE) -#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE) - -#define RESCHEDULE_VECTOR 0 -#define IPI_VECTOR 1 -#define NR_IPIS 2 -#endif /* CONFIG_XEN */ +#define ARCH_HAS_IRQ_PER_CPU static __inline__ int irq_canonicalize (int irq) diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index aed7142f9..c195a9ad1 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h @@ -40,8 +40,6 @@ struct die_args { extern int register_die_notifier(struct notifier_block *); extern int unregister_die_notifier(struct notifier_block *); -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); extern struct atomic_notifier_head ia64die_chain; enum die_val { diff --git a/include/asm-ia64/kmap_types.h b/include/asm-ia64/kmap_types.h index 5d1658aa2..bc777525f 100644 --- a/include/asm-ia64/kmap_types.h +++ b/include/asm-ia64/kmap_types.h @@ -1,6 +1,7 @@ #ifndef _ASM_IA64_KMAP_TYPES_H #define _ASM_IA64_KMAP_TYPES_H +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 938904910..8c0fc227f 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h @@ -82,7 +82,6 @@ struct kprobe_ctlblk { #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry #define ARCH_SUPPORTS_KRETPROBES -#define ARCH_INACTIVE_KPROBE_COUNT 1 #define SLOT0_OPCODE_SHIFT (37) #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) @@ -125,6 +124,5 @@ static inline void jprobe_return(void) } extern void invalidate_stacked_regs(void); extern void flush_register_stack(void); -extern void flush_insn_slot(struct kprobe *p); #endif /* _ASM_KPROBES_H */ diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 15b545a89..a9c995a86 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h @@ -10,6 +10,7 @@ #ifndef _ASM_IA64_MACHVEC_H #define _ASM_IA64_MACHVEC_H +#include #include /* forward declarations: */ @@ -75,7 +76,6 @@ typedef unsigned char ia64_mv_readb_relaxed_t (const volatile void __iomem *); typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *); typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *); typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *); -typedef int ia64_mv_msi_init_t (void); static inline void machvec_noop (void) @@ -154,7 +154,6 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); # define platform_readl_relaxed ia64_mv.readl_relaxed # define platform_readq_relaxed ia64_mv.readq_relaxed # define platform_migrate ia64_mv.migrate -# define platform_msi_init ia64_mv.msi_init # endif /* __attribute__((__aligned__(16))) is required to make size of the @@ -204,7 +203,6 @@ struct ia64_machine_vector { ia64_mv_readl_relaxed_t *readl_relaxed; ia64_mv_readq_relaxed_t *readq_relaxed; ia64_mv_migrate_t *migrate; - ia64_mv_msi_init_t *msi_init; } __attribute__((__aligned__(16))); /* align attrib? see above comment */ #define MACHVEC_INIT(name) \ @@ -250,7 +248,6 @@ struct ia64_machine_vector { platform_readl_relaxed, \ platform_readq_relaxed, \ platform_migrate, \ - platform_msi_init, \ } extern struct ia64_machine_vector ia64_mv; @@ -404,8 +401,5 @@ extern int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size #ifndef platform_migrate # define platform_migrate machvec_noop_task #endif -#ifndef platform_msi_init -# define platform_msi_init ((ia64_mv_msi_init_t*)NULL) -#endif #endif /* _ASM_IA64_MACHVEC_H */ diff --git a/include/asm-ia64/machvec_dig.h b/include/asm-ia64/machvec_dig.h index ccb777e37..8a0752f40 100644 --- a/include/asm-ia64/machvec_dig.h +++ b/include/asm-ia64/machvec_dig.h @@ -13,19 +13,4 @@ extern ia64_mv_setup_t dig_setup; #define platform_name "dig" #define platform_setup dig_setup -#ifdef CONFIG_XEN -# define platform_dma_map_sg dma_map_sg -# define platform_dma_unmap_sg dma_unmap_sg -# define platform_dma_mapping_error dma_mapping_error -# define platform_dma_supported dma_supported -# define platform_dma_alloc_coherent dma_alloc_coherent -# define platform_dma_free_coherent dma_free_coherent -# define platform_dma_map_single dma_map_single -# define platform_dma_unmap_single dma_unmap_single -# define platform_dma_sync_single_for_cpu \ - dma_sync_single_for_cpu -# define platform_dma_sync_single_for_device \ - dma_sync_single_for_device -#endif - #endif /* _ASM_IA64_MACHVEC_DIG_h */ diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index cf724dc79..da1d43755 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h @@ -67,8 +67,6 @@ extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; extern ia64_mv_dma_mapping_error sn_dma_mapping_error; extern ia64_mv_dma_supported sn_dma_supported; extern ia64_mv_migrate_t sn_migrate; -extern ia64_mv_msi_init_t sn_msi_init; - /* * This stuff has dual use! @@ -119,11 +117,6 @@ extern ia64_mv_msi_init_t sn_msi_init; #define platform_dma_mapping_error sn_dma_mapping_error #define platform_dma_supported sn_dma_supported #define platform_migrate sn_migrate -#ifdef CONFIG_PCI_MSI -#define platform_msi_init sn_msi_init -#else -#define platform_msi_init ((ia64_mv_msi_init_t*)NULL) -#endif #include diff --git a/include/asm-ia64/maddr.h b/include/asm-ia64/maddr.h deleted file mode 100644 index 55c6f94d1..000000000 --- a/include/asm-ia64/maddr.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef _ASM_IA64_MADDR_H -#define _ASM_IA64_MADDR_H - -#include -#include -#include -#include - -#ifdef CONFIG_XEN - -#define INVALID_P2M_ENTRY (~0UL) - -/* XXX xen page size != page size */ -static inline unsigned long -pfn_to_mfn_for_dma(unsigned long pfn) -{ - unsigned long mfn; - mfn = HYPERVISOR_phystomach(pfn); - BUG_ON(mfn == 0); // XXX - BUG_ON(mfn == INVALID_P2M_ENTRY); // XXX - BUG_ON(mfn == INVALID_MFN); - return mfn; -} - -static inline unsigned long -phys_to_machine_for_dma(unsigned long phys) -{ - unsigned long machine = - pfn_to_mfn_for_dma(phys >> PAGE_SHIFT) << PAGE_SHIFT; - machine |= (phys & ~PAGE_MASK); - return machine; -} - -static inline unsigned long -mfn_to_pfn_for_dma(unsigned long mfn) -{ - unsigned long pfn; - pfn = HYPERVISOR_machtophys(mfn); - BUG_ON(pfn == 0); - //BUG_ON(pfn == INVALID_M2P_ENTRY); - return pfn; -} - -static inline unsigned long -machine_to_phys_for_dma(unsigned long machine) -{ - unsigned long phys = - mfn_to_pfn_for_dma(machine >> PAGE_SHIFT) << PAGE_SHIFT; - phys |= (machine & ~PAGE_MASK); - return phys; -} - -static inline unsigned long -mfn_to_local_pfn(unsigned long mfn) -{ - extern unsigned long max_mapnr; - unsigned long pfn = mfn_to_pfn_for_dma(mfn); - if (!pfn_valid(pfn)) - return INVALID_P2M_ENTRY; - return pfn; -} - -#else /* !CONFIG_XEN */ - -#define pfn_to_mfn_for_dma(pfn) (pfn) -#define mfn_to_pfn_for_dma(mfn) (mfn) -#define phys_to_machine_for_dma(phys) (phys) -#define machine_to_phys_for_dma(machine) (machine) -#define mfn_to_local_pfn(mfn) (mfn) - -#endif /* !CONFIG_XEN */ - -/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ -#define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) - -#define mfn_to_pfn(mfn) (mfn) -#define pfn_to_mfn(pfn) (pfn) - -#define mfn_to_virt(mfn) (__va((mfn) << PAGE_SHIFT)) -#define virt_to_mfn(virt) (__pa(virt) >> PAGE_SHIFT) -#define virt_to_machine(virt) __pa(virt) // for tpmfront.c - -#define set_phys_to_machine(pfn, mfn) do { } while (0) -#ifdef CONFIG_VMX_GUEST -extern void xen_machphys_update(unsigned long mfn, unsigned long pfn); -#else /* CONFIG_VMX_GUEST */ -#define xen_machphys_update(mfn, pfn) do { } while (0) -#endif /* CONFIG_VMX_GUEST */ - -typedef unsigned long maddr_t; // to compile netback, netfront - -#endif /* _ASM_IA64_MADDR_H */ diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index ee97f7c2d..9c5389b7e 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h @@ -69,16 +69,14 @@ typedef struct ia64_mc_info_s { */ struct ia64_sal_os_state { - - /* SAL to OS */ + /* SAL to OS, must be at offset 0 */ u64 os_gp; /* GP of the os registered with the SAL, physical */ u64 pal_proc; /* PAL_PROC entry point, physical */ u64 sal_proc; /* SAL_PROC entry point, physical */ u64 rv_rc; /* MCA - Rendezvous state, INIT - reason code */ u64 proc_state_param; /* from R18 */ u64 monarch; /* 1 for a monarch event, 0 for a slave */ - - /* common */ + /* common, must follow SAL to OS */ u64 sal_ra; /* Return address in SAL, physical */ u64 sal_gp; /* GP of the SAL - physical */ pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ @@ -100,8 +98,7 @@ struct ia64_sal_os_state { u64 iipa; u64 iim; u64 iha; - - /* OS to SAL */ + /* OS to SAL, must follow common */ u64 os_status; /* OS status to SAL, enum below */ u64 context; /* 0 if return to same context 1 if return to new context */ diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h index 5cd4b89b5..46501b01a 100644 --- a/include/asm-ia64/meminit.h +++ b/include/asm-ia64/meminit.h @@ -7,6 +7,7 @@ * for more details. */ +#include /* * Entries defined so far: @@ -16,15 +17,10 @@ * - command line string * - kernel code & data * - Kernel memory map built from EFI memory map - * - xen start info * * More could be added if necessary */ -#ifndef CONFIG_XEN #define IA64_MAX_RSVD_REGIONS 6 -#else -#define IA64_MAX_RSVD_REGIONS 7 -#endif struct rsvd_region { unsigned long start; /* virtual address of beginning of element */ @@ -61,11 +57,6 @@ extern void efi_memmap_init(unsigned long *, unsigned long *); extern struct page *vmem_map; extern int find_largest_hole (u64 start, u64 end, void *arg); extern int create_mem_map_page_table (u64 start, u64 end, void *arg); - extern int vmemmap_find_next_valid_pfn(int, int); -#else -static inline int vmemmap_find_next_valid_pfn(int node, int i) -{ - return i + 1; -} #endif + #endif /* meminit_h */ diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index c73b87832..b242f9522 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h @@ -8,6 +8,14 @@ * David Mosberger-Tang , Hewlett-Packard Co */ +#ifdef __KERNEL__ +#ifndef __ASSEMBLY__ +#define arch_mmap_check ia64_map_check_rgn +int ia64_map_check_rgn(unsigned long addr, unsigned long len, + unsigned long flags); +#endif +#endif + #include #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ @@ -22,12 +30,4 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ -#define arch_mmap_check ia64_mmap_check -int ia64_mmap_check(unsigned long addr, unsigned long len, - unsigned long flags); -#endif -#endif - #endif /* _ASM_IA64_MMAN_H */ diff --git a/include/asm-ia64/msi.h b/include/asm-ia64/msi.h index bb92b0dbd..97890f776 100644 --- a/include/asm-ia64/msi.h +++ b/include/asm-ia64/msi.h @@ -14,16 +14,4 @@ static inline void set_intr_gate (int nr, void *func) {} #define ack_APIC_irq ia64_eoi #define MSI_TARGET_CPU_SHIFT 4 -extern struct msi_ops msi_apic_ops; - -static inline int msi_arch_init(void) -{ - if (platform_msi_init) - return platform_msi_init(); - - /* default ops for most ia64 platforms */ - msi_register(&msi_apic_ops); - return 0; -} - #endif /* ASM_MSI_H */ diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index 2fb337b0e..9978c7ce7 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h @@ -11,6 +11,7 @@ #ifndef _ASM_IA64_NODEDATA_H #define _ASM_IA64_NODEDATA_H +#include #include #include @@ -46,18 +47,6 @@ struct ia64_node_data { */ #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) -/* - * LOCAL_DATA_ADDR - This is to calculate the address of other node's - * "local_node_data" at hot-plug phase. The local_node_data - * is pointed by per_cpu_page. Kernel usually use it for - * just executing cpu. However, when new node is hot-added, - * the addresses of local data for other nodes are necessary - * to update all of them. - */ -#define LOCAL_DATA_ADDR(pgdat) \ - ((struct ia64_node_data *)((u64)(pgdat) + \ - L1_CACHE_ALIGN(sizeof(struct pglist_data)))) - #endif /* CONFIG_NUMA */ #endif /* _ASM_IA64_NODEDATA_H */ diff --git a/include/asm-ia64/numa.h b/include/asm-ia64/numa.h index 7d5e2ccc3..dae6aeb7b 100644 --- a/include/asm-ia64/numa.h +++ b/include/asm-ia64/numa.h @@ -11,6 +11,7 @@ #ifndef _ASM_IA64_NUMA_H #define _ASM_IA64_NUMA_H +#include #ifdef CONFIG_NUMA @@ -64,13 +65,7 @@ extern int paddr_to_nid(unsigned long paddr); #define local_nodeid (cpu_to_node_map[smp_processor_id()]) -extern void map_cpu_to_node(int cpu, int nid); -extern void unmap_cpu_from_node(int cpu, int nid); - - #else /* !CONFIG_NUMA */ -#define map_cpu_to_node(cpu, nid) do{}while(0) -#define unmap_cpu_from_node(cpu, nid) do{}while(0) #define paddr_to_nid(addr) 0 diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 1b6fde4eb..1dc2190f8 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h @@ -7,7 +7,7 @@ * David Mosberger-Tang */ -# ifdef __KERNEL__ +#include #include #include @@ -65,6 +65,7 @@ # define __pa(x) ((x) - PAGE_OFFSET) # define __va(x) ((x) + PAGE_OFFSET) #else /* !__ASSEMBLY */ +# ifdef __KERNEL__ # define STRICT_MM_TYPECHECKS extern void clear_page (void *page); @@ -126,9 +127,7 @@ extern unsigned long max_low_pfn; # define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) #endif -#ifndef CONFIG_XEN #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) -#endif #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) @@ -176,6 +175,7 @@ get_order (unsigned long size) return order; } +# endif /* __KERNEL__ */ #endif /* !__ASSEMBLY__ */ #ifdef STRICT_MM_TYPECHECKS @@ -229,54 +229,6 @@ get_order (unsigned long size) (((current->personality & READ_IMPLIES_EXEC) != 0) \ ? VM_EXEC : 0)) -#ifndef __ASSEMBLY__ -#ifdef CONFIG_XEN - -#include -#include -#include // to compile netback, netfront - -/* - * XXX hack! - * Linux/IA64 uses PG_arch_1. - * This hack will be removed once PG_foreign bit is taken. - * #include - */ -#ifdef __ASM_XEN_FOREIGN_PAGE_H__ -# error "don't include include/xen/foreign_page.h!" -#endif - -extern struct address_space xen_ia64_foreign_dummy_mapping; -#define PageForeign(page) \ - ((page)->mapping == &xen_ia64_foreign_dummy_mapping) - -#define SetPageForeign(page, dtor) do { \ - set_page_private((page), (unsigned long)(dtor)); \ - (page)->mapping = &xen_ia64_foreign_dummy_mapping; \ - smp_rmb(); \ -} while (0) - -#define ClearPageForeign(page) do { \ - (page)->mapping = NULL; \ - smp_rmb(); \ - set_page_private((page), 0); \ -} while (0) - -#define PageForeignDestructor(page) \ - ( (void (*) (struct page *)) page_private(page) ) - -#define arch_free_page(_page,_order) \ -({ int foreign = PageForeign(_page); \ - if (foreign) \ - (PageForeignDestructor(_page))(_page); \ - foreign; \ -}) -#define HAVE_ARCH_FREE_PAGE - -#include - -#endif /* CONFIG_XEN */ -#endif /* __ASSEMBLY__ */ #define devmem_is_allowed(x) 1 -#endif /* __KERNEL__ */ + #endif /* _ASM_IA64_PAGE_H */ diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 1b2fbc683..37e52a283 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h @@ -82,7 +82,6 @@ #ifndef __ASSEMBLY__ #include -#include #include /* @@ -1434,12 +1433,7 @@ typedef union pal_version_u { } pal_version_u_t; -/* - * Return PAL version information. While the documentation states that - * PAL_VERSION can be called in either physical or virtual mode, some - * implementations only allow physical calls. We don't call it very often, - * so the overhead isn't worth eliminating. - */ +/* Return PAL version information */ static inline s64 ia64_pal_version (pal_version_u_t *pal_min_version, pal_version_u_t *pal_cur_version) { diff --git a/include/asm-ia64/param.h b/include/asm-ia64/param.h index 49c62dd5e..5e1e0d2d7 100644 --- a/include/asm-ia64/param.h +++ b/include/asm-ia64/param.h @@ -19,6 +19,7 @@ #define MAXHOSTNAMELEN 64 /* max length of hostname */ #ifdef __KERNEL__ +# include /* mustn't include outside of #ifdef __KERNEL__ */ # ifdef CONFIG_IA64_HP_SIM /* * Yeah, simulating stuff is slow, so let us catch some breath between diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index fbe5cf3ab..2b14dee29 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h @@ -12,6 +12,7 @@ # define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ #else /* !__ASSEMBLY__ */ +#include #include @@ -36,14 +37,12 @@ #ifdef CONFIG_SMP extern unsigned long __per_cpu_offset[NR_CPUS]; -#define per_cpu_offset(x) (__per_cpu_offset(x)) /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */ DECLARE_PER_CPU(unsigned long, local_per_cpu_offset); #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size); extern void setup_per_cpu_areas (void); @@ -53,7 +52,6 @@ extern void *per_cpu_init(void); #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var -#define __raw_get_cpu_var(var) per_cpu__##var #define per_cpu_init() (__phys_per_cpu_start) #endif /* SMP */ diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h index 4e96d778e..d66b8ebea 100644 --- a/include/asm-ia64/pgalloc.h +++ b/include/asm-ia64/pgalloc.h @@ -17,6 +17,7 @@ * Copyright (C) 2000, Goutham Rao */ +#include #include #include @@ -129,11 +130,7 @@ static inline void pmd_free(pmd_t * pmd) static inline void pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, struct page *pte) { -#ifndef CONFIG_XEN pmd_val(*pmd_entry) = page_to_phys(pte); -#else - pmd_val(*pmd_entry) = page_to_pseudophys(pte); -#endif } static inline void diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 228981cad..c0f8144f2 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h @@ -12,6 +12,7 @@ * David Mosberger-Tang */ +#include #include #include @@ -316,19 +317,21 @@ ia64_phys_addr_valid (unsigned long addr) #define pte_mkhuge(pte) (__pte(pte_val(pte))) /* - * Make page protection values cacheable, uncacheable, or write- - * combining. Note that "protection" is really a misnomer here as the - * protection value contains the memory attribute bits, dirty bits, and - * various other bits as well. + * Macro to a page protection value as "uncacheable". Note that "protection" is really a + * misnomer here as the protection value contains the memory attribute bits, dirty bits, + * and various other bits as well. */ -#define pgprot_cacheable(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WB) #define pgprot_noncached(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_UC) -#define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) -struct file; -extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, - unsigned long size, pgprot_t vma_prot); -#define __HAVE_PHYS_MEM_ACCESS_PROT +/* + * Macro to make mark a page protection value as "write-combining". + * Note that "protection" is really a misnomer here as the protection + * value contains the memory attribute bits, dirty bits, and various + * other bits as well. Accesses through a write-combining translation + * works bypasses the caches, but does allow for consecutive writes to + * be combined into single (but larger) write transactions. + */ +#define pgprot_writecombine(prot) __pgprot((pgprot_val(prot) & ~_PAGE_MA_MASK) | _PAGE_MA_WC) static inline unsigned long pgd_index (unsigned long address) diff --git a/include/asm-ia64/privop.h b/include/asm-ia64/privop.h deleted file mode 100644 index 28c1e886c..000000000 --- a/include/asm-ia64/privop.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _ASM_IA64_PRIVOP_H -#define _ASM_IA64_PRIVOP_H - -/* - * Copyright (C) 2005 Hewlett-Packard Co - * Dan Magenheimer - * - */ - -#ifdef CONFIG_XEN -#include -#endif - -#ifndef __ASSEMBLY - -#ifndef IA64_PARAVIRTUALIZED - -#define ia64_getreg __ia64_getreg -#define ia64_setreg __ia64_setreg -#define ia64_hint __ia64_hint -#define ia64_thash __ia64_thash -#define ia64_itci __ia64_itci -#define ia64_itcd __ia64_itcd -#define ia64_itri __ia64_itri -#define ia64_itrd __ia64_itrd -#define ia64_tpa __ia64_tpa -#define ia64_set_ibr __ia64_set_ibr -#define ia64_set_pkr __ia64_set_pkr -#define ia64_set_pmc __ia64_set_pmc -#define ia64_set_pmd __ia64_set_pmd -#define ia64_set_rr __ia64_set_rr -#define ia64_get_cpuid __ia64_get_cpuid -#define ia64_get_ibr __ia64_get_ibr -#define ia64_get_pkr __ia64_get_pkr -#define ia64_get_pmc __ia64_get_pmc -#define ia64_get_pmd __ia64_get_pmd -#define ia64_get_rr __ia64_get_rr -#define ia64_fc __ia64_fc -#define ia64_ssm __ia64_ssm -#define ia64_rsm __ia64_rsm -#define ia64_ptce __ia64_ptce -#define ia64_ptcga __ia64_ptcga -#define ia64_ptcl __ia64_ptcl -#define ia64_ptri __ia64_ptri -#define ia64_ptrd __ia64_ptrd -#define ia64_get_psr_i __ia64_get_psr_i -#define ia64_intrin_local_irq_restore __ia64_intrin_local_irq_restore -#define ia64_pal_halt_light __ia64_pal_halt_light -#define ia64_leave_kernel __ia64_leave_kernel -#define ia64_leave_syscall __ia64_leave_syscall -#define ia64_trace_syscall __ia64_trace_syscall -#define ia64_switch_to __ia64_switch_to -#define ia64_pal_call_static __ia64_pal_call_static - -#endif /* !IA64_PARAVIRTUALIZED */ - -#endif /* !__ASSEMBLY */ - -#endif /* _ASM_IA64_PRIVOP_H */ diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 1837234c6..b3bd58e80 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h @@ -13,12 +13,12 @@ * 06/16/00 A. Mallick added csd/ssd/tssd for ia32 support */ +#include #include #include #include #include -#include #define IA64_NUM_DBG_REGS 8 /* diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 1414316ef..9471cdc3f 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h @@ -54,10 +54,9 @@ * This is because ar.ec is saved as part of ar.pfs. */ +#include #include - -#ifdef __KERNEL__ #ifndef ASM_OFFSETS_C #include #endif @@ -81,10 +80,11 @@ #define KERNEL_STACK_SIZE IA64_STK_OFFSET -#endif /* __KERNEL__ */ - #ifndef __ASSEMBLY__ +#include +#include + /* * This struct defines the way the registers are saved on system * calls. @@ -230,9 +230,6 @@ struct switch_stack { #ifdef __KERNEL__ -#include -#include - #define __ARCH_SYS_PTRACE 1 /* diff --git a/include/asm-ia64/rwsem.h b/include/asm-ia64/rwsem.h index 2d1640cc2..1327c91ea 100644 --- a/include/asm-ia64/rwsem.h +++ b/include/asm-ia64/rwsem.h @@ -33,6 +33,9 @@ struct rw_semaphore { signed long count; spinlock_t wait_lock; struct list_head wait_list; +#if RWSEM_DEBUG + int debug; +#endif }; #define RWSEM_UNLOCKED_VALUE __IA64_UL_CONST(0x0000000000000000) @@ -42,9 +45,19 @@ struct rw_semaphore { #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) +/* + * initialization + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 +#else +#define __RWSEM_DEBUG_INIT /* */ +#endif + #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ - LIST_HEAD_INIT((name).wait_list) } + LIST_HEAD_INIT((name).wait_list) \ + __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -60,6 +73,9 @@ init_rwsem (struct rw_semaphore *sem) sem->count = RWSEM_UNLOCKED_VALUE; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } /* diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 4f5ca5643..5e328ed5d 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h @@ -56,6 +56,7 @@ * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -75,6 +76,7 @@ #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 @@ -112,6 +114,8 @@ #define _NSIG_BPW 64 #define _NSIG_WORDS (_NSIG / _NSIG_BPW) +#define SA_PERCPU_IRQ 0x02000000 + #endif /* __KERNEL__ */ #include diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index 719ff309c..a3914352c 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h @@ -10,6 +10,7 @@ #ifndef _ASM_IA64_SMP_H #define _ASM_IA64_SMP_H +#include #include #include #include diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index 12b54ddb0..60a51a406 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.h @@ -10,7 +10,6 @@ #define _ASM_IA64_SN_INTR_H #include -#include #define SGI_UART_VECTOR 0xe9 @@ -41,7 +40,6 @@ struct sn_irq_info { int irq_cpuid; /* kernel logical cpuid */ int irq_irq; /* the IRQ number */ int irq_int_bit; /* Bridge interrupt pin */ - /* <0 means MSI */ u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */ int irq_bridge_type;/* pciio asic type (pciio.h) */ void *irq_bridge; /* bridge generating irq */ @@ -55,12 +53,6 @@ struct sn_irq_info { }; extern void sn_send_IPI_phys(int, long, int, int); -extern u64 sn_intr_alloc(nasid_t, int, - struct sn_irq_info *, - int, nasid_t, int); -extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); -extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); -extern struct list_head **sn_irq_lh; #define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index e3b0c3fe5..51260ab70 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.h @@ -55,7 +55,6 @@ #define PCI32_ATE_V (0x1 << 0) #define PCI32_ATE_CO (0x1 << 1) #define PCI32_ATE_PREC (0x1 << 2) -#define PCI32_ATE_MSI (0x1 << 2) #define PCI32_ATE_PREF (0x1 << 3) #define PCI32_ATE_BAR (0x1 << 4) #define PCI32_ATE_ADDR_SHFT 12 @@ -118,8 +117,8 @@ struct pcibus_info { extern int pcibr_init_provider(void); extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); -extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t, int type); -extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t, int type); +extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); +extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); /* diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h index 8f7c83d0f..ce3f6c328 100644 --- a/include/asm-ia64/sn/pcibus_provider_defs.h +++ b/include/asm-ia64/sn/pcibus_provider_defs.h @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. */ #ifndef _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H #define _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H @@ -45,24 +45,13 @@ struct pci_controller; */ struct sn_pcibus_provider { - dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t, int flags); - dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t, int flags); + dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); + dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); void (*force_interrupt)(struct sn_irq_info *); void (*target_interrupt)(struct sn_irq_info *); }; -/* - * Flags used by the map interfaces - * bits 3:0 specifies format of passed in address - * bit 4 specifies that address is to be used for MSI - */ - -#define SN_DMA_ADDRTYPE(x) ((x) & 0xf) -#define SN_DMA_ADDR_PHYS 1 /* address is an xio address. */ -#define SN_DMA_ADDR_XIO 2 /* address is phys memory */ -#define SN_DMA_MSI 0x10 /* Bus address is to be used for MSI */ - extern struct sn_pcibus_provider *sn_pci_provider[]; #endif /* _ASM_IA64_SN_PCI_PCIBUS_PROVIDER_H */ diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h index c3fd3eb25..16a48b5a0 100644 --- a/include/asm-ia64/sn/simulator.h +++ b/include/asm-ia64/sn/simulator.h @@ -8,6 +8,7 @@ #ifndef _ASM_IA64_SN_SIMULATOR_H #define _ASM_IA64_SN_SIMULATOR_H +#include #define SNMAGIC 0xaeeeeeee8badbeefL #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index a676dd9ac..749deb2ca 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h @@ -11,6 +11,7 @@ #ifndef _ASM_IA64_SN_SN_CPUID_H #define _ASM_IA64_SN_SN_CPUID_H +#include #include #include #include diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index ba826b3f7..51aca022c 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h @@ -12,6 +12,7 @@ */ +#include #include #include #include @@ -85,7 +86,6 @@ #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 #define SN_SAL_INJECT_ERROR 0x02000067 -#define SN_SAL_SET_CPU_NUMBER 0x02000068 /* * Service-specific constants @@ -346,7 +346,7 @@ ia64_sn_plat_set_error_handling_features(void) ret_stuff.v1 = 0; ret_stuff.v2 = 0; SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES, - SAL_ERR_FEAT_LOG_SBES, + (SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV | SAL_ERR_FEAT_LOG_SBES), 0, 0, 0, 0, 0, 0); return ret_stuff.status; @@ -706,9 +706,12 @@ static inline int sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) { struct ia64_sal_retval ret_stuff; + unsigned long irq_flags; + local_irq_save(irq_flags); ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, (u64)nasid_array, perms, 0, 0, 0); + local_irq_restore(irq_flags); return ret_stuff.status; } #define SN_MEMPROT_ACCESS_CLASS_0 0x14a080 @@ -1140,18 +1143,12 @@ static inline int sn_inject_error(u64 paddr, u64 *data, u64 *ecc) { struct ia64_sal_retval ret_stuff; + unsigned long irq_flags; + local_irq_save(irq_flags); ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_INJECT_ERROR, paddr, (u64)data, (u64)ecc, 0, 0, 0, 0); + local_irq_restore(irq_flags); return ret_stuff.status; } - -static inline int -ia64_sn_set_cpu_number(int cpu) -{ - struct ia64_sal_retval rv; - - SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); - return rv.status; -} #endif /* _ASM_IA64_SN_SN_SAL_H */ diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h index 65cdd73c2..ab7fe2463 100644 --- a/include/asm-ia64/sn/tioca_provider.h +++ b/include/asm-ia64/sn/tioca_provider.h @@ -27,7 +27,7 @@ #define PV908234 (1 << 1) /* CA:AGPDMA write request data mismatch with ABC1CL merge */ #define PV895469 (1 << 1) - /* TIO:CA TLB invalidate of written GART entries possibly not occurring in CA*/ + /* TIO:CA TLB invalidate of written GART entries possibly not occuring in CA*/ #define PV910244 (1 << 1) struct tioca_dmamap{ diff --git a/include/asm-ia64/sn/tiocp.h b/include/asm-ia64/sn/tiocp.h index e8ad0bb5b..f47c08ab4 100644 --- a/include/asm-ia64/sn/tiocp.h +++ b/include/asm-ia64/sn/tiocp.h @@ -3,14 +3,13 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 2003-2005 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2003-2004 Silicon Graphics, Inc. All rights reserved. */ #ifndef _ASM_IA64_SN_PCI_TIOCP_H #define _ASM_IA64_SN_PCI_TIOCP_H #define TIOCP_HOST_INTR_ADDR 0x003FFFFFFFFFFFFFUL #define TIOCP_PCI64_CMDTYPE_MEM (0x1ull << 60) -#define TIOCP_PCI64_CMDTYPE_MSI (0x3ull << 60) /***************************************************************************** diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 35e1386f3..b454ad4e2 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h @@ -15,6 +15,7 @@ #define _ASM_IA64_SN_XPC_H +#include #include #include #include @@ -1126,8 +1127,8 @@ xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag, #define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) #define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8)) -#define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x0f0f0f0f0f0f0f0f)) -#define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & __IA64_UL_CONST(0x1010101010101010)) +#define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) +#define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) static inline void diff --git a/include/asm-ia64/socket.h b/include/asm-ia64/socket.h index d638ef3d5..a255006fb 100644 --- a/include/asm-ia64/socket.h +++ b/include/asm-ia64/socket.h @@ -57,6 +57,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_IA64_SOCKET_H */ diff --git a/include/asm-ia64/string.h b/include/asm-ia64/string.h index 85fd65c52..43502d3b5 100644 --- a/include/asm-ia64/string.h +++ b/include/asm-ia64/string.h @@ -9,6 +9,7 @@ * David Mosberger-Tang */ +#include /* remove this once we remove the A-step workaround... */ #define __HAVE_ARCH_STRLEN 1 /* see arch/ia64/lib/strlen.S */ #define __HAVE_ARCH_MEMSET 1 /* see arch/ia64/lib/memset.S */ diff --git a/include/asm-ia64/synch_bitops.h b/include/asm-ia64/synch_bitops.h deleted file mode 100644 index 21b7f8cd1..000000000 --- a/include/asm-ia64/synch_bitops.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __XEN_SYNCH_BITOPS_H__ -#define __XEN_SYNCH_BITOPS_H__ - -/* - * Copyright 1992, Linus Torvalds. - * Heavily modified to provide guaranteed strong synchronisation - * when communicating with Xen or other guest OSes running on other CPUs. - */ - -#define ADDR (*(volatile long *) addr) - -static __inline__ void synch_set_bit(int nr, volatile void * addr) -{ - set_bit(nr, addr); -} - -static __inline__ void synch_clear_bit(int nr, volatile void * addr) -{ - clear_bit(nr, addr); -} - -static __inline__ void synch_change_bit(int nr, volatile void * addr) -{ - change_bit(nr, addr); -} - -static __inline__ int synch_test_and_set_bit(int nr, volatile void * addr) -{ - return test_and_set_bit(nr, addr); -} - -static __inline__ int synch_test_and_clear_bit(int nr, volatile void * addr) -{ - return test_and_clear_bit(nr, addr); -} - -static __inline__ int synch_test_and_change_bit(int nr, volatile void * addr) -{ - return test_and_change_bit(nr, addr); -} - -static __inline__ int synch_const_test_bit(int nr, const volatile void * addr) -{ - return test_bit(nr, addr); -} - -static __inline__ int synch_var_test_bit(int nr, volatile void * addr) -{ - return test_bit(nr, addr); -} - -#define synch_cmpxchg ia64_cmpxchg4_acq - -#define synch_test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - synch_const_test_bit((nr),(addr)) : \ - synch_var_test_bit((nr),(addr))) - -#define synch_cmpxchg_subword synch_cmpxchg - -#endif /* __XEN_SYNCH_BITOPS_H__ */ diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 8d948286f..2f3620593 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -12,6 +12,7 @@ * Copyright (C) 1999 Asit Mallick * Copyright (C) 1999 Don Dugger */ +#include #include #include @@ -24,7 +25,7 @@ * 0xa000000000000000+2*PERCPU_PAGE_SIZE * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page) */ -#define KERNEL_START (GATE_ADDR+__IA64_UL_CONST(0x100000000)) +#define KERNEL_START (GATE_ADDR+0x100000000) #define PERCPU_ADDR (-PERCPU_PAGE_SIZE) #ifndef __ASSEMBLY__ @@ -98,11 +99,12 @@ extern struct ia64_boot_param { #endif /* - * XXX check on this ---I suspect what Linus really wants here is + * XXX check on these---I suspect what Linus really wants here is * acquire vs release semantics but we can't discuss this stuff with * Linus just yet. Grrr... */ #define set_mb(var, value) do { (var) = (value); mb(); } while (0) +#define set_wmb(var, value) do { (var) = (value); mb(); } while (0) #define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ @@ -123,7 +125,7 @@ extern struct ia64_boot_param { #define __local_irq_save(x) \ do { \ ia64_stop(); \ - (x) = ia64_get_psr_i(); \ + (x) = ia64_getreg(_IA64_REG_PSR); \ ia64_stop(); \ ia64_rsm(IA64_PSR_I); \ } while (0) @@ -171,7 +173,7 @@ do { \ #endif /* !CONFIG_IA64_DEBUG_IRQ */ #define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) -#define local_save_flags(flags) ({ ia64_stop(); (flags) = ia64_get_psr_i(); }) +#define local_save_flags(flags) ({ ia64_stop(); (flags) = ia64_getreg(_IA64_REG_PSR); }) #define irqs_disabled() \ ({ \ diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 8adcde093..e5392c4d3 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h @@ -27,7 +27,6 @@ struct thread_info { __u32 flags; /* thread_info flags (see TIF_*) */ __u32 cpu; /* current CPU */ __u32 last_cpu; /* Last CPU thread ran on */ - __u32 status; /* Thread synchronous flags */ mm_segment_t addr_limit; /* user-level address space limit */ int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ struct restart_block restart_block; @@ -68,7 +67,7 @@ struct thread_info { #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR -#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) +#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) #endif /* !__ASSEMBLY */ @@ -104,8 +103,4 @@ struct thread_info { /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) -#define TS_POLLING 1 /* true if in idle loop and not sleeping */ - -#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) - #endif /* _ASM_IA64_THREAD_INFO_H */ diff --git a/include/asm-ia64/tlb.h b/include/asm-ia64/tlb.h index a544ab823..e2c6e18ad 100644 --- a/include/asm-ia64/tlb.h +++ b/include/asm-ia64/tlb.h @@ -37,6 +37,7 @@ * } * tlb_finish_mmu(tlb, start, end); // finish unmap for address space MM */ +#include #include #include #include diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h index cf9acb9bb..a35b323ba 100644 --- a/include/asm-ia64/tlbflush.h +++ b/include/asm-ia64/tlbflush.h @@ -6,6 +6,7 @@ * David Mosberger-Tang */ +#include #include diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 937c21257..616b5ed2a 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h @@ -112,7 +112,6 @@ void build_cpu_to_node_map(void); #define topology_core_id(cpu) (cpu_data(cpu)->core_id) #define topology_core_siblings(cpu) (cpu_core_map[cpu]) #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) -#define smt_capable() (smp_num_siblings > 1) #endif #include diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 11762ce64..93dbb82de 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -265,7 +265,7 @@ #define __NR_keyctl 1273 #define __NR_ioprio_set 1274 #define __NR_ioprio_get 1275 -#define __NR_move_pages 1276 +/* 1276 is available for reuse (was briefly sys_set_zone_reclaim) */ #define __NR_inotify_init 1277 #define __NR_inotify_add_watch 1278 #define __NR_inotify_rm_watch 1279 @@ -286,13 +286,15 @@ /* 1294, 1295 reserved for pselect/ppoll */ #define __NR_unshare 1296 #define __NR_splice 1297 -/* 1298, 1299 reserved for set_robust_list/get_robust_list */ +#define __NR_set_robust_list 1298 +#define __NR_get_robust_list 1299 #define __NR_sync_file_range 1300 #define __NR_tee 1301 #define __NR_vmsplice 1302 #ifdef __KERNEL__ +#include #define NR_syscalls 279 /* length of syscall table */ diff --git a/include/asm-ia64/ustack.h b/include/asm-ia64/ustack.h index a34946791..da55c9124 100644 --- a/include/asm-ia64/ustack.h +++ b/include/asm-ia64/ustack.h @@ -5,15 +5,12 @@ * Constants for the user stack size */ -#ifdef __KERNEL__ #include /* The absolute hard limit for stack size is 1/2 of the mappable space in the region */ #define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2) -#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) -#endif - -/* Make a default stack size of 2GiB */ +/* Make a default stack size of 2GB */ #define DEFAULT_USER_STACK_SIZE (1UL << 31) +#define STACK_TOP (0x6000000000000000UL + RGN_MAP_LIMIT) #endif /* _ASM_IA64_USTACK_H */ diff --git a/include/asm-ia64/vga.h b/include/asm-ia64/vga.h index 02184ecd8..091177cda 100644 --- a/include/asm-ia64/vga.h +++ b/include/asm-ia64/vga.h @@ -17,7 +17,7 @@ extern unsigned long vga_console_iobase; extern unsigned long vga_console_membase; -#define VGA_MAP_MEM(x,s) ((unsigned long) ioremap_nocache(vga_console_membase + (x), s)) +#define VGA_MAP_MEM(x) ((unsigned long) ioremap_nocache(vga_console_membase + (x), 0)) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/asm-ia64/xen/privop.h b/include/asm-ia64/xen/privop.h deleted file mode 100644 index 073b3a2a7..000000000 --- a/include/asm-ia64/xen/privop.h +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef _ASM_IA64_XEN_PRIVOP_H -#define _ASM_IA64_XEN_PRIVOP_H - -/* - * Copyright (C) 2005 Hewlett-Packard Co - * Dan Magenheimer - * - * Paravirtualizations of privileged operations for Xen/ia64 - * - */ - - -#include - -#define IA64_PARAVIRTUALIZED - -#if 0 -#undef XSI_BASE -/* At 1 MB, before per-cpu space but still addressable using addl instead - of movl. */ -#define XSI_BASE 0xfffffffffff00000 -#endif - -/* Address of mapped regs. */ -#define XMAPPEDREGS_BASE (XSI_BASE + XSI_SIZE) - -#ifdef __ASSEMBLY__ -#define XEN_HYPER_RFI break HYPERPRIVOP_RFI -#define XEN_HYPER_RSM_PSR_DT break HYPERPRIVOP_RSM_DT -#define XEN_HYPER_SSM_PSR_DT break HYPERPRIVOP_SSM_DT -#define XEN_HYPER_COVER break HYPERPRIVOP_COVER -#define XEN_HYPER_ITC_D break HYPERPRIVOP_ITC_D -#define XEN_HYPER_ITC_I break HYPERPRIVOP_ITC_I -#define XEN_HYPER_SSM_I break HYPERPRIVOP_SSM_I -#define XEN_HYPER_GET_IVR break HYPERPRIVOP_GET_IVR -#define XEN_HYPER_GET_TPR break HYPERPRIVOP_GET_TPR -#define XEN_HYPER_SET_TPR break HYPERPRIVOP_SET_TPR -#define XEN_HYPER_EOI break HYPERPRIVOP_EOI -#define XEN_HYPER_SET_ITM break HYPERPRIVOP_SET_ITM -#define XEN_HYPER_THASH break HYPERPRIVOP_THASH -#define XEN_HYPER_PTC_GA break HYPERPRIVOP_PTC_GA -#define XEN_HYPER_ITR_D break HYPERPRIVOP_ITR_D -#define XEN_HYPER_GET_RR break HYPERPRIVOP_GET_RR -#define XEN_HYPER_SET_RR break HYPERPRIVOP_SET_RR -#define XEN_HYPER_SET_KR break HYPERPRIVOP_SET_KR -#define XEN_HYPER_FC break HYPERPRIVOP_FC -#define XEN_HYPER_GET_CPUID break HYPERPRIVOP_GET_CPUID -#define XEN_HYPER_GET_PMD break HYPERPRIVOP_GET_PMD -#define XEN_HYPER_GET_EFLAG break HYPERPRIVOP_GET_EFLAG -#define XEN_HYPER_SET_EFLAG break HYPERPRIVOP_SET_EFLAG -#define XEN_HYPER_RSM_BE break HYPERPRIVOP_RSM_BE -#define XEN_HYPER_GET_PSR break HYPERPRIVOP_GET_PSR - -#define XSI_IFS (XSI_BASE + XSI_IFS_OFS) -#define XSI_PRECOVER_IFS (XSI_BASE + XSI_PRECOVER_IFS_OFS) -#define XSI_INCOMPL_REGFR (XSI_BASE + XSI_INCOMPL_REGFR_OFS) -#define XSI_IFA (XSI_BASE + XSI_IFA_OFS) -#define XSI_ISR (XSI_BASE + XSI_ISR_OFS) -#define XSI_IIM (XSI_BASE + XSI_IIM_OFS) -#define XSI_ITIR (XSI_BASE + XSI_ITIR_OFS) -#define XSI_PSR_I_ADDR (XSI_BASE + XSI_PSR_I_ADDR_OFS) -#define XSI_PSR_IC (XSI_BASE + XSI_PSR_IC_OFS) -#define XSI_IPSR (XSI_BASE + XSI_IPSR_OFS) -#define XSI_IIP (XSI_BASE + XSI_IIP_OFS) -#define XSI_BANK1_R16 (XSI_BASE + XSI_BANK1_R16_OFS) -#define XSI_BANKNUM (XSI_BASE + XSI_BANKNUM_OFS) -#define XSI_IHA (XSI_BASE + XSI_IHA_OFS) -#endif - -#ifndef __ASSEMBLY__ -#define XEN_HYPER_SSM_I asm("break %0" : : "i" (HYPERPRIVOP_SSM_I)) -#define XEN_HYPER_GET_IVR asm("break %0" : : "i" (HYPERPRIVOP_GET_IVR)) - -/************************************************/ -/* Instructions paravirtualized for correctness */ -/************************************************/ - -/* "fc" and "thash" are privilege-sensitive instructions, meaning they - * may have different semantics depending on whether they are executed - * at PL0 vs PL!=0. When paravirtualized, these instructions mustn't - * be allowed to execute directly, lest incorrect semantics result. */ -extern unsigned long xen_fc(unsigned long addr); -#define ia64_fc(addr) xen_fc((unsigned long)(addr)) -extern unsigned long xen_thash(unsigned long addr); -#define ia64_thash(addr) xen_thash((unsigned long)(addr)) -/* Note that "ttag" and "cover" are also privilege-sensitive; "ttag" - * is not currently used (though it may be in a long-format VHPT system!) - * and the semantics of cover only change if psr.ic is off which is very - * rare (and currently non-existent outside of assembly code */ - -/* There are also privilege-sensitive registers. These registers are - * readable at any privilege level but only writable at PL0. */ -extern unsigned long xen_get_cpuid(int index); -#define ia64_get_cpuid(i) xen_get_cpuid(i) -extern unsigned long xen_get_pmd(int index); -#define ia64_get_pmd(i) xen_get_pmd(i) -extern unsigned long xen_get_eflag(void); /* see xen_ia64_getreg */ -extern void xen_set_eflag(unsigned long); /* see xen_ia64_setreg */ - -/************************************************/ -/* Instructions paravirtualized for performance */ -/************************************************/ - -/* Xen uses memory-mapped virtual privileged registers for access to many - * performance-sensitive privileged registers. Some, like the processor - * status register (psr), are broken up into multiple memory locations. - * Others, like "pend", are abstractions based on privileged registers. - * "Pend" is guaranteed to be set if reading cr.ivr would return a - * (non-spurious) interrupt. */ -#define XEN_MAPPEDREGS ((struct mapped_regs *)XMAPPEDREGS_BASE) -#define XSI_PSR_I \ - (*XEN_MAPPEDREGS->interrupt_mask_addr) -#define xen_get_virtual_psr_i() \ - (!XSI_PSR_I) -#define xen_set_virtual_psr_i(_val) \ - ({ XSI_PSR_I = (uint8_t)(_val) ? 0 : 1; }) -#define xen_set_virtual_psr_ic(_val) \ - ({ XEN_MAPPEDREGS->interrupt_collection_enabled = _val ? 1 : 0; }) -#define xen_get_virtual_pend() (XEN_MAPPEDREGS->pending_interruption) - -/* Hyperprivops are "break" instructions with a well-defined API. - * In particular, the virtual psr.ic bit must be off; in this way - * it is guaranteed to never conflict with a linux break instruction. - * Normally, this is done in a xen stub but this one is frequent enough - * that we inline it */ -#define xen_hyper_ssm_i() \ -({ \ - xen_set_virtual_psr_i(0); \ - xen_set_virtual_psr_ic(0); \ - XEN_HYPER_SSM_I; \ -}) - -/* turning off interrupts can be paravirtualized simply by writing - * to a memory-mapped virtual psr.i bit (implemented as a 16-bit bool) */ -#define xen_rsm_i() xen_set_virtual_psr_i(0) - -/* turning on interrupts is a bit more complicated.. write to the - * memory-mapped virtual psr.i bit first (to avoid race condition), - * then if any interrupts were pending, we have to execute a hyperprivop - * to ensure the pending interrupt gets delivered; else we're done! */ -#define xen_ssm_i() \ -({ \ - int old = xen_get_virtual_psr_i(); \ - xen_set_virtual_psr_i(1); \ - if (!old && xen_get_virtual_pend()) xen_hyper_ssm_i(); \ -}) - -#define xen_ia64_intrin_local_irq_restore(x) \ -{ \ - if (is_running_on_xen()) { \ - if ((x) & IA64_PSR_I) { xen_ssm_i(); } \ - else { xen_rsm_i(); } \ - } \ - else __ia64_intrin_local_irq_restore((x)); \ -} - -#define xen_get_psr_i() \ -( \ - (is_running_on_xen()) ? \ - (xen_get_virtual_psr_i() ? IA64_PSR_I : 0) \ - : __ia64_get_psr_i() \ -) - -#define xen_ia64_ssm(mask) \ -{ \ - if ((mask)==IA64_PSR_I) { \ - if (is_running_on_xen()) { xen_ssm_i(); } \ - else { __ia64_ssm(mask); } \ - } \ - else { __ia64_ssm(mask); } \ -} - -#define xen_ia64_rsm(mask) \ -{ \ - if ((mask)==IA64_PSR_I) { \ - if (is_running_on_xen()) { xen_rsm_i(); } \ - else { __ia64_rsm(mask); } \ - } \ - else { __ia64_rsm(mask); } \ -} - - -/* Although all privileged operations can be left to trap and will - * be properly handled by Xen, some are frequent enough that we use - * hyperprivops for performance. */ - -extern unsigned long xen_get_ivr(void); -extern unsigned long xen_get_tpr(void); -extern void xen_set_itm(unsigned long); -extern void xen_set_tpr(unsigned long); -extern void xen_eoi(void); -extern void xen_set_rr(unsigned long index, unsigned long val); -extern unsigned long xen_get_rr(unsigned long index); -extern void xen_set_kr(unsigned long index, unsigned long val); -extern void xen_ptcga(unsigned long addr, unsigned long size); - -/* Note: It may look wrong to test for is_running_on_xen() in each case. - * However regnum is always a constant so, as written, the compiler - * eliminates the switch statement, whereas is_running_on_xen() must be - * tested dynamically. */ -#define xen_ia64_getreg(regnum) \ -({ \ - __u64 ia64_intri_res; \ - \ - switch(regnum) { \ - case _IA64_REG_CR_IVR: \ - ia64_intri_res = (is_running_on_xen()) ? \ - xen_get_ivr() : \ - __ia64_getreg(regnum); \ - break; \ - case _IA64_REG_CR_TPR: \ - ia64_intri_res = (is_running_on_xen()) ? \ - xen_get_tpr() : \ - __ia64_getreg(regnum); \ - break; \ - case _IA64_REG_AR_EFLAG: \ - ia64_intri_res = (is_running_on_xen()) ? \ - xen_get_eflag() : \ - __ia64_getreg(regnum); \ - break; \ - default: \ - ia64_intri_res = __ia64_getreg(regnum); \ - break; \ - } \ - ia64_intri_res; \ -}) - -#define xen_ia64_setreg(regnum,val) \ -({ \ - switch(regnum) { \ - case _IA64_REG_AR_KR0 ... _IA64_REG_AR_KR7: \ - (is_running_on_xen()) ? \ - xen_set_kr((regnum-_IA64_REG_AR_KR0), val) : \ - __ia64_setreg(regnum,val); \ - break; \ - case _IA64_REG_CR_ITM: \ - (is_running_on_xen()) ? \ - xen_set_itm(val) : \ - __ia64_setreg(regnum,val); \ - break; \ - case _IA64_REG_CR_TPR: \ - (is_running_on_xen()) ? \ - xen_set_tpr(val) : \ - __ia64_setreg(regnum,val); \ - break; \ - case _IA64_REG_CR_EOI: \ - (is_running_on_xen()) ? \ - xen_eoi() : \ - __ia64_setreg(regnum,val); \ - break; \ - case _IA64_REG_AR_EFLAG: \ - (is_running_on_xen()) ? \ - xen_set_eflag(val) : \ - __ia64_setreg(regnum,val); \ - break; \ - default: \ - __ia64_setreg(regnum,val); \ - break; \ - } \ -}) - -#define ia64_ssm xen_ia64_ssm -#define ia64_rsm xen_ia64_rsm -#define ia64_intrin_local_irq_restore xen_ia64_intrin_local_irq_restore -#define ia64_ptcga xen_ptcga -#define ia64_set_rr(index,val) xen_set_rr(index,val) -#define ia64_get_rr(index) xen_get_rr(index) -#define ia64_getreg xen_ia64_getreg -#define ia64_setreg xen_ia64_setreg -#define ia64_get_psr_i xen_get_psr_i - -/* the remainder of these are not performance-sensitive so its - * OK to not paravirtualize and just take a privop trap and emulate */ -#define ia64_hint __ia64_hint -#define ia64_set_pmd __ia64_set_pmd -#define ia64_itci __ia64_itci -#define ia64_itcd __ia64_itcd -#define ia64_itri __ia64_itri -#define ia64_itrd __ia64_itrd -#define ia64_tpa __ia64_tpa -#define ia64_set_ibr __ia64_set_ibr -#define ia64_set_pkr __ia64_set_pkr -#define ia64_set_pmc __ia64_set_pmc -#define ia64_get_ibr __ia64_get_ibr -#define ia64_get_pkr __ia64_get_pkr -#define ia64_get_pmc __ia64_get_pmc -#define ia64_ptce __ia64_ptce -#define ia64_ptcl __ia64_ptcl -#define ia64_ptri __ia64_ptri -#define ia64_ptrd __ia64_ptrd - -#endif /* !__ASSEMBLY__ */ - -/* these routines utilize privilege-sensitive or performance-sensitive - * privileged instructions so the code must be replaced with - * paravirtualized versions */ -#define ia64_pal_halt_light xen_pal_halt_light -#define ia64_leave_kernel xen_leave_kernel -#define ia64_leave_syscall xen_leave_syscall -#define ia64_trace_syscall xen_trace_syscall -#define ia64_switch_to xen_switch_to -#define ia64_pal_call_static xen_pal_call_static - -#endif /* _ASM_IA64_XEN_PRIVOP_H */ diff --git a/include/asm-m32r/Kbuild b/include/asm-m32r/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-m32r/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-m32r/assembler.h b/include/asm-m32r/assembler.h index 47041d19d..1a1aa17ed 100644 --- a/include/asm-m32r/assembler.h +++ b/include/asm-m32r/assembler.h @@ -9,6 +9,7 @@ * This file contains M32R architecture specific macro definitions. */ +#include #ifndef __STR #ifdef __ASSEMBLY__ diff --git a/include/asm-m32r/atomic.h b/include/asm-m32r/atomic.h index f5a7d7301..3122fe106 100644 --- a/include/asm-m32r/atomic.h +++ b/include/asm-m32r/atomic.h @@ -9,6 +9,7 @@ * Copyright (C) 2004 Hirokazu Takata */ +#include #include #include diff --git a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h index 66ab67216..902a36610 100644 --- a/include/asm-m32r/bitops.h +++ b/include/asm-m32r/bitops.h @@ -11,6 +11,7 @@ * Copyright (C) 2004 Hirokazu Takata */ +#include #include #include #include diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 8b261b491..e57427b6e 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h @@ -1,6 +1,7 @@ #ifndef _ASM_M32R_CACHEFLUSH_H #define _ASM_M32R_CACHEFLUSH_H +#include #include extern void _flush_cache_all(void); diff --git a/include/asm-m32r/hardirq.h b/include/asm-m32r/hardirq.h index cb8aa762f..5da830ec1 100644 --- a/include/asm-m32r/hardirq.h +++ b/include/asm-m32r/hardirq.h @@ -2,6 +2,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include diff --git a/include/asm-m32r/hw_irq.h b/include/asm-m32r/hw_irq.h index 7138537cd..8d7e9d0e0 100644 --- a/include/asm-m32r/hw_irq.h +++ b/include/asm-m32r/hw_irq.h @@ -1,4 +1,9 @@ #ifndef _ASM_M32R_HW_IRQ_H #define _ASM_M32R_HW_IRQ_H +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{ + /* Nothing to do */ +} + #endif /* _ASM_M32R_HW_IRQ_H */ diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 219a0f74e..f7aa96970 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -15,6 +15,7 @@ #ifdef __KERNEL__ +#include #ifndef MAX_HWIFS # ifdef CONFIG_BLK_DEV_IDEPCI diff --git a/include/asm-m32r/irq.h b/include/asm-m32r/irq.h index 2f93f4743..ca9439545 100644 --- a/include/asm-m32r/irq.h +++ b/include/asm-m32r/irq.h @@ -2,6 +2,7 @@ #ifndef _ASM_M32R_IRQ_H #define _ASM_M32R_IRQ_H +#include #if defined(CONFIG_PLAT_M32700UT_Alpha) || defined(CONFIG_PLAT_USRV) /* diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h index 0524d89ed..742959101 100644 --- a/include/asm-m32r/kmap_types.h +++ b/include/asm-m32r/kmap_types.h @@ -3,6 +3,7 @@ /* Dummy header just to define km_type. */ +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h index 6ba4ddf7d..a4eac2055 100644 --- a/include/asm-m32r/m32104ut/m32104ut_pld.h +++ b/include/asm-m32r/m32104ut/m32104ut_pld.h @@ -15,6 +15,7 @@ #ifndef _M32104UT_M32104UT_PLD_H #define _M32104UT_M32104UT_PLD_H +#include #if defined(CONFIG_PLAT_M32104UT) #define PLD_PLAT_BASE 0x02c00000 diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h index c050b19e8..50545ec9c 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lan.h +++ b/include/asm-m32r/m32700ut/m32700ut_lan.h @@ -15,6 +15,7 @@ #ifndef _M32700UT_M32700UT_LAN_H #define _M32700UT_M32700UT_LAN_H +#include #ifndef __ASSEMBLY__ /* diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h index 4da4e822e..ede6c77bd 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lcd.h +++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h @@ -15,6 +15,7 @@ #ifndef _M32700UT_M32700UT_LCD_H #define _M32700UT_M32700UT_LCD_H +#include #ifndef __ASSEMBLY__ /* diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h index f35f9159a..f5e479486 100644 --- a/include/asm-m32r/m32700ut/m32700ut_pld.h +++ b/include/asm-m32r/m32700ut/m32700ut_pld.h @@ -15,6 +15,7 @@ #ifndef _M32700UT_M32700UT_PLD_H #define _M32700UT_M32700UT_PLD_H +#include #if defined(CONFIG_PLAT_M32700UT_Alpha) #define PLD_PLAT_BASE 0x08c00000 diff --git a/include/asm-m32r/m32r.h b/include/asm-m32r/m32r.h index decfc5990..b133ca61a 100644 --- a/include/asm-m32r/m32r.h +++ b/include/asm-m32r/m32r.h @@ -7,6 +7,7 @@ * Copyright (C) 2003, 2004 Renesas Technology Corp. */ +#include /* Chip type */ #if defined(CONFIG_CHIP_XNUX_MP) || defined(CONFIG_CHIP_XNUX2_MP) diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index cf3f6d78a..9c00eb78e 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h @@ -1,6 +1,7 @@ #ifndef _ASM_M32R_MMU_H #define _ASM_M32R_MMU_H +#include #if !defined(CONFIG_MMU) typedef struct { diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index 542302eb6..3634c5361 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include @@ -14,6 +15,7 @@ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h index 61948296f..7a2a839ee 100644 --- a/include/asm-m32r/opsput/opsput_lan.h +++ b/include/asm-m32r/opsput/opsput_lan.h @@ -15,6 +15,7 @@ #ifndef _OPSPUT_OPSPUT_LAN_H #define _OPSPUT_OPSPUT_LAN_H +#include #ifndef __ASSEMBLY__ /* diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h index 44cfd7fe2..3a883e3d7 100644 --- a/include/asm-m32r/opsput/opsput_lcd.h +++ b/include/asm-m32r/opsput/opsput_lcd.h @@ -15,6 +15,7 @@ #ifndef _OPSPUT_OPSPUT_LCD_H #define _OPSPUT_OPSPUT_LCD_H +#include #ifndef __ASSEMBLY__ /* diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h index 46296fe1e..2018e6925 100644 --- a/include/asm-m32r/opsput/opsput_pld.h +++ b/include/asm-m32r/opsput/opsput_pld.h @@ -15,6 +15,7 @@ #ifndef _OPSPUT_OPSPUT_PLD_H #define _OPSPUT_OPSPUT_PLD_H +#include #define PLD_PLAT_BASE 0x1cc00000 diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 404a4c240..9ddbc087d 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h @@ -1,6 +1,7 @@ #ifndef _ASM_M32R_PAGE_H #define _ASM_M32R_PAGE_H +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 @@ -87,9 +88,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define devmem_is_allowed(x) 1 +#endif /* __KERNEL__ */ + #include #include -#endif /* __KERNEL__ */ #endif /* _ASM_M32R_PAGE_H */ diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e09a86c3c..6da309b6f 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h @@ -3,6 +3,7 @@ /* $Id$ */ +#include #include #include diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index be0f167e3..861727c20 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include /* * traditional M32R two-level paging structure: diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 1983b7f45..75740debc 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h @@ -20,6 +20,7 @@ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/include/asm-m32r/processor.h b/include/asm-m32r/processor.h index 32755bf13..09fd1813e 100644 --- a/include/asm-m32r/processor.h +++ b/include/asm-m32r/processor.h @@ -14,6 +14,7 @@ */ #include +#include #include #include /* pt_regs */ diff --git a/include/asm-m32r/ptrace.h b/include/asm-m32r/ptrace.h index 632b4ce42..53c792452 100644 --- a/include/asm-m32r/ptrace.h +++ b/include/asm-m32r/ptrace.h @@ -12,6 +12,9 @@ * Copyright (C) 2001-2002, 2004 Hirokazu Takata */ +#include +#include /* M32R_PSW_BSM, M32R_PSW_BPM */ + /* 0 - 13 are integer registers (general purpose registers). */ #define PT_R4 0 #define PT_R5 1 @@ -33,10 +36,21 @@ #define PT_R15 PT_SP /* processor status and miscellaneous context registers. */ +#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) #define PT_ACC0H 15 #define PT_ACC0L 16 -#define PT_ACC1H 17 /* ISA_DSP_LEVEL2 only */ -#define PT_ACC1L 18 /* ISA_DSP_LEVEL2 only */ +#define PT_ACC1H 17 +#define PT_ACC1L 18 +#define PT_ACCH PT_ACC0H +#define PT_ACCL PT_ACC0L +#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) +#define PT_ACCH 15 +#define PT_ACCL 16 +#define PT_DUMMY_ACC1H 17 +#define PT_DUMMY_ACC1L 18 +#else +#error unknown isa conifiguration +#endif #define PT_PSW 19 #define PT_BPC 20 #define PT_BBPSW 21 @@ -92,10 +106,19 @@ struct pt_regs { long syscall_nr; /* Saved main processor status and miscellaneous context registers. */ +#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) unsigned long acc0h; unsigned long acc0l; - unsigned long acc1h; /* ISA_DSP_LEVEL2 only */ - unsigned long acc1l; /* ISA_DSP_LEVEL2 only */ + unsigned long acc1h; + unsigned long acc1l; +#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) + unsigned long acch; + unsigned long accl; + unsigned long dummy_acc1h; + unsigned long dummy_acc1l; +#else +#error unknown isa configuration +#endif unsigned long psw; unsigned long bpc; /* saved PC for TRAP syscalls */ unsigned long bbpsw; @@ -118,8 +141,6 @@ struct pt_regs { #ifdef __KERNEL__ -#include /* M32R_PSW_BSM, M32R_PSW_BPM */ - #define __ARCH_SYS_PTRACE 1 #if defined(CONFIG_ISA_M32R2) || defined(CONFIG_CHIP_VDEC2) diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h index 6b2b837c5..ec3cdf666 100644 --- a/include/asm-m32r/rtc.h +++ b/include/asm-m32r/rtc.h @@ -4,6 +4,7 @@ #define __RTC_H__ +#include /* Dallas DS1302 clock/calendar register numbers. */ # define RTC_SECONDS 0 diff --git a/include/asm-m32r/semaphore.h b/include/asm-m32r/semaphore.h index 41e45d7b8..81750edc8 100644 --- a/include/asm-m32r/semaphore.h +++ b/include/asm-m32r/semaphore.h @@ -12,6 +12,7 @@ * Copyright (C) 2004, 2006 Hirokazu Takata */ +#include #include #include #include diff --git a/include/asm-m32r/serial.h b/include/asm-m32r/serial.h index 5ac244c72..1bf480f58 100644 --- a/include/asm-m32r/serial.h +++ b/include/asm-m32r/serial.h @@ -3,6 +3,7 @@ /* include/asm-m32r/serial.h */ +#include #define BASE_BAUD 115200 diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h index 62537dc4d..942b8a309 100644 --- a/include/asm-m32r/sigcontext.h +++ b/include/asm-m32r/sigcontext.h @@ -3,6 +3,7 @@ /* $Id$ */ +#include struct sigcontext { /* CPU registers */ @@ -23,10 +24,19 @@ struct sigcontext { unsigned long sc_r12; /* Saved main processor status and miscellaneous context registers. */ +#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2) unsigned long sc_acc0h; unsigned long sc_acc0l; - unsigned long sc_acc1h; /* ISA_DSP_LEVEL2 only */ - unsigned long sc_acc1l; /* ISA_DSP_LEVEL2 only */ + unsigned long sc_acc1h; + unsigned long sc_acc1l; +#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R) + unsigned long sc_acch; + unsigned long sc_accl; + unsigned long sc_dummy_acc1h; + unsigned long sc_dummy_acc1l; +#else +#error unknown isa configuration +#endif unsigned long sc_psw; unsigned long sc_bpc; /* saved PC for TRAP syscalls */ unsigned long sc_bbpsw; diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 65423bed3..95f69b191 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h @@ -6,6 +6,7 @@ /* orig : i386 2.4.18 */ #include +#include #include #include @@ -80,6 +81,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -99,6 +101,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 650d2558c..1184293e5 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h @@ -3,6 +3,7 @@ /* $Id$ */ +#include #ifdef CONFIG_SMP #ifndef __ASSEMBLY__ diff --git a/include/asm-m32r/socket.h b/include/asm-m32r/socket.h index acdf748fc..8b6680f22 100644 --- a/include/asm-m32r/socket.h +++ b/include/asm-m32r/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_M32R_SOCKET_H */ diff --git a/include/asm-m32r/spinlock.h b/include/asm-m32r/spinlock.h index f94c1a673..7de7def28 100644 --- a/include/asm-m32r/spinlock.h +++ b/include/asm-m32r/spinlock.h @@ -9,6 +9,7 @@ * Copyright (C) 2004 Hirokazu Takata */ +#include /* CONFIG_DEBUG_SPINLOCK, CONFIG_SMP */ #include #include #include diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 9e618afec..e55013f37 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -10,6 +10,7 @@ * Copyright (C) 2004, 2006 Hirokazu Takata */ +#include #include #ifdef __KERNEL__ @@ -18,7 +19,7 @@ * switch_to(prev, next) should switch from task `prev' to `next' * `prev' will never be the same as `next'. * - * `next' and `prev' should be struct task_struct, but it isn't always defined + * `next' and `prev' should be task_t, but it isn't always defined */ #define switch_to(prev, next, last) do { \ @@ -318,7 +319,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) * does not enforce ordering, since there is no data dependency between * the read of "a" and the read of "b". Therefore, on some CPUs, such * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() - * in cases like this where there are no data dependencies. + * in cases like thiswhere there are no data dependencies. **/ #define read_barrier_depends() do { } while (0) @@ -336,6 +337,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #endif #define set_mb(var, value) do { xchg(&var, value); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define arch_align_stack(x) (x) diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h index e89bfd17d..abf12e7ff 100644 --- a/include/asm-m32r/timex.h +++ b/include/asm-m32r/timex.h @@ -9,6 +9,7 @@ * m32r architecture timex specifications */ +#include #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h index ae4494960..bc7c407db 100644 --- a/include/asm-m32r/tlbflush.h +++ b/include/asm-m32r/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _ASM_M32R_TLBFLUSH_H #define _ASM_M32R_TLBFLUSH_H +#include #include /* diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e..819cc28a9 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h @@ -11,6 +11,7 @@ /* * User space memory access functions */ +#include #include #include #include diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 89f376e62..be0eb014c 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h @@ -3,6 +3,8 @@ /* $Id$ */ +#include /* SYSCALL_* */ + /* * This file contains the system call numbers. */ @@ -293,16 +295,12 @@ #define __NR_kexec_load 283 #define __NR_waitid 284 -#ifdef __KERNEL__ - #define NR_syscalls 285 /* user-visible error numbers are in the range -1 - -124: see * */ -#include /* SYSCALL_* */ - #define __syscall_return(type, res) \ do { \ if ((unsigned long)(res) >= (unsigned long)(-(124 + 1))) { \ @@ -407,6 +405,7 @@ __asm__ __volatile__ (\ __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_ALARM @@ -422,6 +421,7 @@ __syscall_return(type,__res); \ #define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/ #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -470,5 +470,4 @@ asmlinkage long sys_rt_sigaction(int sig, #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #endif -#endif /* __KERNEL__ */ #endif /* _ASM_M32R_UNISTD_H */ diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 1ad4ded84..2ffd0c65a 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h index 533163447..d0f4b6eed 100644 --- a/include/asm-m32r/vga.h +++ b/include/asm-m32r/vga.h @@ -14,7 +14,7 @@ * access the videoram directly without any black magic. */ -#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/asm-m68k/Kbuild b/include/asm-m68k/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-m68k/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-m68k/amigaints.h b/include/asm-m68k/amigaints.h index 7c8713468..aa968d014 100644 --- a/include/asm-m68k/amigaints.h +++ b/include/asm-m68k/amigaints.h @@ -13,8 +13,6 @@ #ifndef _ASMm68k_AMIGAINTS_H_ #define _ASMm68k_AMIGAINTS_H_ -#include - /* ** Amiga Interrupt sources. ** @@ -25,52 +23,72 @@ #define CIA_IRQS (5) #define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ -/* builtin serial port interrupts */ -#define IRQ_AMIGA_TBE (IRQ_USER+0) -#define IRQ_AMIGA_RBF (IRQ_USER+11) +/* vertical blanking interrupt */ +#define IRQ_AMIGA_VERTB 0 -/* floppy disk interrupts */ -#define IRQ_AMIGA_DSKBLK (IRQ_USER+1) -#define IRQ_AMIGA_DSKSYN (IRQ_USER+12) +/* copper interrupt */ +#define IRQ_AMIGA_COPPER 1 -/* software interrupts */ -#define IRQ_AMIGA_SOFT (IRQ_USER+2) +/* Audio interrupts */ +#define IRQ_AMIGA_AUD0 2 +#define IRQ_AMIGA_AUD1 3 +#define IRQ_AMIGA_AUD2 4 +#define IRQ_AMIGA_AUD3 5 -/* interrupts from external hardware */ -#define IRQ_AMIGA_PORTS IRQ_AUTO_2 -#define IRQ_AMIGA_EXTER IRQ_AUTO_6 +/* Blitter done interrupt */ +#define IRQ_AMIGA_BLIT 6 -/* copper interrupt */ -#define IRQ_AMIGA_COPPER (IRQ_USER+4) +/* floppy disk interrupts */ +#define IRQ_AMIGA_DSKSYN 7 +#define IRQ_AMIGA_DSKBLK 8 -/* vertical blanking interrupt */ -#define IRQ_AMIGA_VERTB (IRQ_USER+5) +/* builtin serial port interrupts */ +#define IRQ_AMIGA_RBF 9 +#define IRQ_AMIGA_TBE 10 -/* Blitter done interrupt */ -#define IRQ_AMIGA_BLIT (IRQ_USER+6) +/* software interrupts */ +#define IRQ_AMIGA_SOFT 11 -/* Audio interrupts */ -#define IRQ_AMIGA_AUD0 (IRQ_USER+7) -#define IRQ_AMIGA_AUD1 (IRQ_USER+8) -#define IRQ_AMIGA_AUD2 (IRQ_USER+9) -#define IRQ_AMIGA_AUD3 (IRQ_USER+10) +/* interrupts from external hardware */ +#define IRQ_AMIGA_PORTS 12 +#define IRQ_AMIGA_EXTER 13 /* CIA interrupt sources */ -#define IRQ_AMIGA_CIAA (IRQ_USER+14) -#define IRQ_AMIGA_CIAA_TA (IRQ_USER+14) -#define IRQ_AMIGA_CIAA_TB (IRQ_USER+15) -#define IRQ_AMIGA_CIAA_ALRM (IRQ_USER+16) -#define IRQ_AMIGA_CIAA_SP (IRQ_USER+17) -#define IRQ_AMIGA_CIAA_FLG (IRQ_USER+18) -#define IRQ_AMIGA_CIAB (IRQ_USER+19) -#define IRQ_AMIGA_CIAB_TA (IRQ_USER+19) -#define IRQ_AMIGA_CIAB_TB (IRQ_USER+20) -#define IRQ_AMIGA_CIAB_ALRM (IRQ_USER+21) -#define IRQ_AMIGA_CIAB_SP (IRQ_USER+22) -#define IRQ_AMIGA_CIAB_FLG (IRQ_USER+23) - +#define IRQ_AMIGA_CIAA 14 +#define IRQ_AMIGA_CIAA_TA 14 +#define IRQ_AMIGA_CIAA_TB 15 +#define IRQ_AMIGA_CIAA_ALRM 16 +#define IRQ_AMIGA_CIAA_SP 17 +#define IRQ_AMIGA_CIAA_FLG 18 +#define IRQ_AMIGA_CIAB 19 +#define IRQ_AMIGA_CIAB_TA 19 +#define IRQ_AMIGA_CIAB_TB 20 +#define IRQ_AMIGA_CIAB_ALRM 21 +#define IRQ_AMIGA_CIAB_SP 22 +#define IRQ_AMIGA_CIAB_FLG 23 + +/* auto-vector interrupts */ +#define IRQ_AMIGA_AUTO 24 +#define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */ +#define IRQ_AMIGA_AUTO_1 25 +#define IRQ_AMIGA_AUTO_2 26 +#define IRQ_AMIGA_AUTO_3 27 +#define IRQ_AMIGA_AUTO_4 28 +#define IRQ_AMIGA_AUTO_5 29 +#define IRQ_AMIGA_AUTO_6 30 +#define IRQ_AMIGA_AUTO_7 31 + +#define IRQ_FLOPPY IRQ_AMIGA_DSKBLK /* INTREQR masks */ +#define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */ +#define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */ +#define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */ +#define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */ +#define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */ +#define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */ +#define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */ + #define IF_SETCLR 0x8000 /* set/clr bit */ #define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ #define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ @@ -88,6 +106,9 @@ #define IF_DSKBLK 0x0002 /* diskblock DMA finished */ #define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ +extern void amiga_do_irq(int irq, struct pt_regs *fp); +extern void amiga_do_irq_list(int irq, struct pt_regs *fp); + /* CIA interrupt control register bits */ #define CIA_ICR_TA 0x01 @@ -104,7 +125,6 @@ extern struct ciabase ciaa_base, ciab_base; -extern void cia_init_IRQ(struct ciabase *base); extern unsigned char cia_set_irq(struct ciabase *base, unsigned char mask); extern unsigned char cia_able_irq(struct ciabase *base, unsigned char mask); diff --git a/include/asm-m68k/apollohw.h b/include/asm-m68k/apollohw.h index a1373b9aa..4304e1c33 100644 --- a/include/asm-m68k/apollohw.h +++ b/include/asm-m68k/apollohw.h @@ -3,8 +3,6 @@ #ifndef _ASMm68k_APOLLOHW_H_ #define _ASMm68k_APOLLOHW_H_ -#include - /* apollo models */ @@ -103,6 +101,4 @@ extern u_long timer_physaddr; #define isaIO2mem(x) (((((x) & 0x3f8) << 7) | (((x) & 0xfc00) >> 6) | ((x) & 0x7)) + 0x40000 + IO_BASE) -#define IRQ_APOLLO IRQ_USER - #endif diff --git a/include/asm-m68k/atari_stdma.h b/include/asm-m68k/atari_stdma.h index b4eadf852..64f92880c 100644 --- a/include/asm-m68k/atari_stdma.h +++ b/include/asm-m68k/atari_stdma.h @@ -3,7 +3,7 @@ #define _atari_stdma_h -#include +#include /***************************** Prototypes *****************************/ diff --git a/include/asm-m68k/atariints.h b/include/asm-m68k/atariints.h index 0ed454fc2..42952c890 100644 --- a/include/asm-m68k/atariints.h +++ b/include/asm-m68k/atariints.h @@ -45,6 +45,17 @@ #define IRQ_TYPE_FAST 1 #define IRQ_TYPE_PRIO 2 +#define IRQ_SPURIOUS (0) + +/* auto-vector interrupts */ +#define IRQ_AUTO_1 (1) +#define IRQ_AUTO_2 (2) +#define IRQ_AUTO_3 (3) +#define IRQ_AUTO_4 (4) +#define IRQ_AUTO_5 (5) +#define IRQ_AUTO_6 (6) +#define IRQ_AUTO_7 (7) + /* ST-MFP interrupts */ #define IRQ_MFP_BUSY (8) #define IRQ_MFP_DCD (9) diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index d5eed64cb..732d696d3 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h @@ -1,6 +1,7 @@ #ifndef __ARCH_M68K_ATOMIC__ #define __ARCH_M68K_ATOMIC__ +#include #include /* local_irq_XXX() */ diff --git a/include/asm-m68k/bug.h b/include/asm-m68k/bug.h index 7b60776cc..072ce274d 100644 --- a/include/asm-m68k/bug.h +++ b/include/asm-m68k/bug.h @@ -1,6 +1,7 @@ #ifndef _M68K_BUG_H #define _M68K_BUG_H +#include #ifdef CONFIG_BUG #ifdef CONFIG_DEBUG_BUGVERBOSE diff --git a/include/asm-m68k/bvme6000hw.h b/include/asm-m68k/bvme6000hw.h index f40d2f851..28a859b03 100644 --- a/include/asm-m68k/bvme6000hw.h +++ b/include/asm-m68k/bvme6000hw.h @@ -109,23 +109,23 @@ typedef struct { #define BVME_IRQ_TYPE_PRIO 0 -#define BVME_IRQ_PRN (IRQ_USER+20) -#define BVME_IRQ_TIMER (IRQ_USER+25) -#define BVME_IRQ_I596 IRQ_AUTO_2 -#define BVME_IRQ_SCSI IRQ_AUTO_3 -#define BVME_IRQ_RTC IRQ_AUTO_6 -#define BVME_IRQ_ABORT IRQ_AUTO_7 +#define BVME_IRQ_PRN 0x54 +#define BVME_IRQ_I596 0x1a +#define BVME_IRQ_SCSI 0x1b +#define BVME_IRQ_TIMER 0x59 +#define BVME_IRQ_RTC 0x1e +#define BVME_IRQ_ABORT 0x1f /* SCC interrupts */ -#define BVME_IRQ_SCC_BASE IRQ_USER -#define BVME_IRQ_SCCB_TX IRQ_USER -#define BVME_IRQ_SCCB_STAT (IRQ_USER+2) -#define BVME_IRQ_SCCB_RX (IRQ_USER+4) -#define BVME_IRQ_SCCB_SPCOND (IRQ_USER+6) -#define BVME_IRQ_SCCA_TX (IRQ_USER+8) -#define BVME_IRQ_SCCA_STAT (IRQ_USER+10) -#define BVME_IRQ_SCCA_RX (IRQ_USER+12) -#define BVME_IRQ_SCCA_SPCOND (IRQ_USER+14) +#define BVME_IRQ_SCC_BASE 0x40 +#define BVME_IRQ_SCCB_TX 0x40 +#define BVME_IRQ_SCCB_STAT 0x42 +#define BVME_IRQ_SCCB_RX 0x44 +#define BVME_IRQ_SCCB_SPCOND 0x46 +#define BVME_IRQ_SCCA_TX 0x48 +#define BVME_IRQ_SCCA_STAT 0x4a +#define BVME_IRQ_SCCA_RX 0x4c +#define BVME_IRQ_SCCA_SPCOND 0x4e /* Address control registers */ diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index 24d3ff449..8aba971b1 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h @@ -3,30 +3,26 @@ #include -/* cache code */ -#define FLUSH_I_AND_D (0x00000808) -#define FLUSH_I (0x00000008) - /* * Cache handling functions */ -static inline void flush_icache(void) -{ - if (CPU_IS_040_OR_060) - asm volatile ( "nop\n" - " .chip 68040\n" - " cpusha %bc\n" - " .chip 68k"); - else { - unsigned long tmp; - asm volatile ( "movec %%cacr,%0\n" - " or.w %1,%0\n" - " movec %0,%%cacr" - : "=&d" (tmp) - : "id" (FLUSH_I)); - } -} +#define flush_icache() \ +({ \ + if (CPU_IS_040_OR_060) \ + __asm__ __volatile__("nop\n\t" \ + ".chip 68040\n\t" \ + "cinva %%ic\n\t" \ + ".chip 68k" : ); \ + else { \ + unsigned long _tmp; \ + __asm__ __volatile__("movec %%cacr,%0\n\t" \ + "orw %1,%0\n\t" \ + "movec %0,%%cacr" \ + : "=&d" (_tmp) \ + : "id" (FLUSH_I)); \ + } \ +}) /* * invalidate the cache for the specified memory range. @@ -47,6 +43,10 @@ extern void cache_push(unsigned long paddr, int len); */ extern void cache_push_v(unsigned long vaddr, int len); +/* cache code */ +#define FLUSH_I_AND_D (0x00000808) +#define FLUSH_I (0x00000008) + /* This is needed whenever the virtual mapping of the current process changes. */ #define __flush_cache_all() \ diff --git a/include/asm-m68k/dma-mapping.h b/include/asm-m68k/dma-mapping.h index cebbb0337..b1920c703 100644 --- a/include/asm-m68k/dma-mapping.h +++ b/include/asm-m68k/dma-mapping.h @@ -1,91 +1,12 @@ #ifndef _M68K_DMA_MAPPING_H #define _M68K_DMA_MAPPING_H -#include +#include -struct scatterlist; - -static inline int dma_supported(struct device *dev, u64 mask) -{ - return 1; -} - -static inline int dma_set_mask(struct device *dev, u64 mask) -{ - return 0; -} - -static inline int dma_get_cache_alignment(void) -{ - return 1 << L1_CACHE_SHIFT; -} - -static inline int dma_is_consistent(dma_addr_t dma_addr) -{ - return 0; -} - -extern void *dma_alloc_coherent(struct device *, size_t, - dma_addr_t *, int); -extern void dma_free_coherent(struct device *, size_t, - void *, dma_addr_t); - -static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, - dma_addr_t *handle, int flag) -{ - return dma_alloc_coherent(dev, size, handle, flag); -} -static inline void dma_free_noncoherent(struct device *dev, size_t size, - void *addr, dma_addr_t handle) -{ - dma_free_coherent(dev, size, addr, handle); -} -static inline void dma_cache_sync(void *vaddr, size_t size, - enum dma_data_direction dir) -{ - /* we use coherent allocation, so not much to do here. */ -} - -extern dma_addr_t dma_map_single(struct device *, void *, size_t, - enum dma_data_direction); -static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, - size_t size, enum dma_data_direction dir) -{ -} - -extern dma_addr_t dma_map_page(struct device *, struct page *, - unsigned long, size_t size, - enum dma_data_direction); -static inline void dma_unmap_page(struct device *dev, dma_addr_t address, - size_t size, enum dma_data_direction dir) -{ -} - -extern int dma_map_sg(struct device *, struct scatterlist *, int, - enum dma_data_direction); -static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, - int nhwentries, enum dma_data_direction dir) -{ -} - -extern void dma_sync_single_for_device(struct device *, dma_addr_t, size_t, - enum dma_data_direction); -extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int, - enum dma_data_direction); - -static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, - size_t size, enum dma_data_direction dir) -{ -} - -static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, - int nents, enum dma_data_direction dir) -{ -} - -static inline int dma_mapping_error(dma_addr_t handle) -{ - return 0; -} +#ifdef CONFIG_PCI +#include +#else +#include +#endif #endif /* _M68K_DMA_MAPPING_H */ diff --git a/include/asm-m68k/dma.h b/include/asm-m68k/dma.h index d0c9e61e5..d5266a886 100644 --- a/include/asm-m68k/dma.h +++ b/include/asm-m68k/dma.h @@ -1,6 +1,7 @@ #ifndef _M68K_DMA_H #define _M68K_DMA_H 1 +#include /* it's useless on the m68k, but unfortunately needed by the new bootmem allocator (but this should do it for this) */ diff --git a/include/asm-m68k/dvma.h b/include/asm-m68k/dvma.h index e1112de5a..5978f87b0 100644 --- a/include/asm-m68k/dvma.h +++ b/include/asm-m68k/dvma.h @@ -9,6 +9,7 @@ #ifndef __M68K_DVMA_H #define __M68K_DVMA_H +#include #define DVMA_PAGE_SHIFT 13 #define DVMA_PAGE_SIZE (1UL << DVMA_PAGE_SHIFT) diff --git a/include/asm-m68k/elf.h b/include/asm-m68k/elf.h index eb63b85f9..38bf8347f 100644 --- a/include/asm-m68k/elf.h +++ b/include/asm-m68k/elf.h @@ -5,6 +5,7 @@ * ELF register definitions.. */ +#include #include #include diff --git a/include/asm-m68k/entry.h b/include/asm-m68k/entry.h index f8f6b185d..0396495cd 100644 --- a/include/asm-m68k/entry.h +++ b/include/asm-m68k/entry.h @@ -1,6 +1,7 @@ #ifndef __M68K_ENTRY_H #define __M68K_ENTRY_H +#include #include #include diff --git a/include/asm-m68k/floppy.h b/include/asm-m68k/floppy.h index 57f4fdda6..63a05ed95 100644 --- a/include/asm-m68k/floppy.h +++ b/include/asm-m68k/floppy.h @@ -88,8 +88,8 @@ static __inline__ void fd_outb(unsigned char value, int port) static int fd_request_irq(void) { if(MACH_IS_Q40) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", floppy_hardint); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", floppy_hardint); else if(MACH_IS_SUN3X) return sun3xflop_request_irq(); return -ENXIO; diff --git a/include/asm-m68k/fpu.h b/include/asm-m68k/fpu.h index 59701d7b4..3bcf85065 100644 --- a/include/asm-m68k/fpu.h +++ b/include/asm-m68k/fpu.h @@ -1,6 +1,7 @@ #ifndef __M68K_FPU_H #define __M68K_FPU_H +#include /* * MAX floating point unit state size (FSAVE/FRESTORE) diff --git a/include/asm-m68k/hardirq.h b/include/asm-m68k/hardirq.h index 394ee9460..5e1c5826c 100644 --- a/include/asm-m68k/hardirq.h +++ b/include/asm-m68k/hardirq.h @@ -1,6 +1,7 @@ #ifndef __M68K_HARDIRQ_H #define __M68K_HARDIRQ_H +#include #include #include diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index 365f76fb8..36118fd01 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h @@ -31,6 +31,7 @@ #ifdef __KERNEL__ +#include #include #include diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index 5e0fcf418..dcfaa352d 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h @@ -23,6 +23,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 3257f9881..9ac047c40 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h @@ -1,9 +1,14 @@ #ifndef _M68K_IRQ_H_ #define _M68K_IRQ_H_ -#include -#include -#include +#include +#include + +/* + * # of m68k interrupts + */ + +#define SYS_IRQS 8 /* * This should be the same as the max(NUM_X_SOURCES) for all the @@ -11,20 +16,10 @@ * Currently the Atari has 72 and the Amiga 24, but if both are * supported in the kernel it is better to make room for 72. */ -#if defined(CONFIG_VME) || defined(CONFIG_SUN3) || defined(CONFIG_SUN3X) -#define NR_IRQS 200 -#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) -#define NR_IRQS 72 -#elif defined(CONFIG_Q40) -#define NR_IRQS 43 -#elif defined(CONFIG_AMIGA) -#define NR_IRQS 32 -#elif defined(CONFIG_APOLLO) -#define NR_IRQS 24 -#elif defined(CONFIG_HP300) -#define NR_IRQS 8 +#if defined(CONFIG_ATARI) || defined(CONFIG_MAC) +#define NR_IRQS (72+SYS_IRQS) #else -#error unknown nr of irqs +#define NR_IRQS (24+SYS_IRQS) #endif /* @@ -46,29 +41,57 @@ * that routine requires service. */ -#define IRQ_SPURIOUS 0 +#define IRQ1 (1) /* level 1 interrupt */ +#define IRQ2 (2) /* level 2 interrupt */ +#define IRQ3 (3) /* level 3 interrupt */ +#define IRQ4 (4) /* level 4 interrupt */ +#define IRQ5 (5) /* level 5 interrupt */ +#define IRQ6 (6) /* level 6 interrupt */ +#define IRQ7 (7) /* level 7 interrupt (non-maskable) */ -#define IRQ_AUTO_1 1 /* level 1 interrupt */ -#define IRQ_AUTO_2 2 /* level 2 interrupt */ -#define IRQ_AUTO_3 3 /* level 3 interrupt */ -#define IRQ_AUTO_4 4 /* level 4 interrupt */ -#define IRQ_AUTO_5 5 /* level 5 interrupt */ -#define IRQ_AUTO_6 6 /* level 6 interrupt */ -#define IRQ_AUTO_7 7 /* level 7 interrupt (non-maskable) */ +/* + * "Generic" interrupt sources + */ + +#define IRQ_SCHED_TIMER (8) /* interrupt source for scheduling timer */ -#define IRQ_USER 8 +static __inline__ int irq_canonicalize(int irq) +{ + return irq; +} + +/* + * Machine specific interrupt sources. + * + * Adding an interrupt service routine for a source with this bit + * set indicates a special machine specific interrupt source. + * The machine specific files define these sources. + * + * The IRQ_MACHSPEC bit is now gone - the only thing it did was to + * introduce unnecessary overhead. + * + * All interrupt handling is actually machine specific so it is better + * to use function pointers, as used by the Sparc port, and select the + * interrupt handling functions when initializing the kernel. This way + * we save some unnecessary overhead at run-time. + * 01/11/97 - Jes + */ -extern unsigned int irq_canonicalize(unsigned int irq); -extern void enable_irq(unsigned int); -extern void disable_irq(unsigned int); +extern void (*enable_irq)(unsigned int); +extern void (*disable_irq)(unsigned int); #define disable_irq_nosync disable_irq struct pt_regs; +extern int cpu_request_irq(unsigned int, + irqreturn_t (*)(int, void *, struct pt_regs *), + unsigned long, const char *, void *); +extern void cpu_free_irq(unsigned int, void *); + /* * various flags for request_irq() - the Amiga now uses the standard - * mechanism like all other architectures - IRQF_DISABLED and - * IRQF_SHARED are your friends. + * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ + * are your friends. */ #ifndef MACH_AMIGA_ONLY #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ @@ -83,45 +106,33 @@ struct pt_regs; * interrupt source (if it supports chaining). */ typedef struct irq_node { - int (*handler)(int, void *, struct pt_regs *); - void *dev_id; - struct irq_node *next; + irqreturn_t (*handler)(int, void *, struct pt_regs *); unsigned long flags; + void *dev_id; const char *devname; + struct irq_node *next; } irq_node_t; /* * This structure has only 4 elements for speed reasons */ typedef struct irq_handler { - int (*handler)(int, void *, struct pt_regs *); + irqreturn_t (*handler)(int, void *, struct pt_regs *); unsigned long flags; void *dev_id; const char *devname; } irq_handler_t; -struct irq_controller { - const char *name; - spinlock_t lock; - int (*startup)(unsigned int irq); - void (*shutdown)(unsigned int irq); - void (*enable)(unsigned int irq); - void (*disable)(unsigned int irq); -}; - -extern int m68k_irq_startup(unsigned int); -extern void m68k_irq_shutdown(unsigned int); +/* count of spurious interrupts */ +extern volatile unsigned int num_spurious; /* * This function returns a new irq_node_t */ extern irq_node_t *new_irq_node(void); -extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)); -extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, - void (*handler)(unsigned int, struct pt_regs *)); -extern void m68k_setup_irq_controller(struct irq_controller *, unsigned int, unsigned int); - -asmlinkage void m68k_handle_int(unsigned int, struct pt_regs *); +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); #endif /* _M68K_IRQ_H_ */ diff --git a/include/asm-m68k/mac_oss.h b/include/asm-m68k/mac_oss.h index 7221f7251..7644a639c 100644 --- a/include/asm-m68k/mac_oss.h +++ b/include/asm-m68k/mac_oss.h @@ -69,12 +69,12 @@ #define OSS_IRQLEV_DISABLED 0 #define OSS_IRQLEV_IOPISM 1 /* ADB? */ -#define OSS_IRQLEV_SCSI IRQ_AUTO_2 -#define OSS_IRQLEV_NUBUS IRQ_AUTO_3 /* keep this on its own level */ -#define OSS_IRQLEV_IOPSCC IRQ_AUTO_4 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_SOUND IRQ_AUTO_5 /* matches VIA alternate mapping */ +#define OSS_IRQLEV_SCSI 2 +#define OSS_IRQLEV_NUBUS 3 /* keep this on its own level */ +#define OSS_IRQLEV_IOPSCC 4 /* matches VIA alternate mapping */ +#define OSS_IRQLEV_SOUND 5 /* matches VIA alternate mapping */ #define OSS_IRQLEV_60HZ 6 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_VIA1 IRQ_AUTO_6 /* matches VIA alternate mapping */ +#define OSS_IRQLEV_VIA1 6 /* matches VIA alternate mapping */ #define OSS_IRQLEV_PARITY 7 /* matches VIA alternate mapping */ #ifndef __ASSEMBLY__ diff --git a/include/asm-m68k/machdep.h b/include/asm-m68k/machdep.h index df898f27e..7d3fee342 100644 --- a/include/asm-m68k/machdep.h +++ b/include/asm-m68k/machdep.h @@ -13,8 +13,14 @@ struct buffer_head; extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); /* machine dependent irq functions */ extern void (*mach_init_IRQ) (void); +extern irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *); +extern int (*mach_request_irq) (unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id); +extern void (*mach_free_irq) (unsigned int irq, void *dev_id); extern void (*mach_get_model) (char *model); extern int (*mach_get_hardware_list) (char *buffer); +extern int (*mach_get_irq_list) (struct seq_file *p, void *v); +extern irqreturn_t (*mach_process_int) (int irq, struct pt_regs *fp); /* machine dependent timer functions */ extern unsigned long (*mach_gettimeoffset)(void); extern int (*mach_hwclk)(int, struct rtc_time*); diff --git a/include/asm-m68k/macintosh.h b/include/asm-m68k/macintosh.h index 27d11da2b..6fc3d1951 100644 --- a/include/asm-m68k/macintosh.h +++ b/include/asm-m68k/macintosh.h @@ -11,7 +11,17 @@ extern void mac_reset(void); extern void mac_poweroff(void); extern void mac_init_IRQ(void); +extern int mac_request_irq (unsigned int, irqreturn_t (*)(int, void *, + struct pt_regs *), + unsigned long, const char *, void *); +extern void mac_free_irq(unsigned int, void *); +extern void mac_enable_irq(unsigned int); +extern void mac_disable_irq(unsigned int); extern int mac_irq_pending(unsigned int); +extern int show_mac_interrupts(struct seq_file *, void *); +#if 0 +extern void mac_default_handler(int irq); +#endif extern void mac_identify(void); extern void mac_report_hardware(void); extern void mac_debugging_penguin(int); diff --git a/include/asm-m68k/macints.h b/include/asm-m68k/macints.h index 679c48ab4..fd8c3a9fe 100644 --- a/include/asm-m68k/macints.h +++ b/include/asm-m68k/macints.h @@ -59,6 +59,17 @@ #define IRQ_SRC(irq) (irq >> 3) #define IRQ_IDX(irq) (irq & 7) +#define IRQ_SPURIOUS (0) + +/* auto-vector interrupts */ +#define IRQ_AUTO_1 (1) +#define IRQ_AUTO_2 (2) +#define IRQ_AUTO_3 (3) +#define IRQ_AUTO_4 (4) +#define IRQ_AUTO_5 (5) +#define IRQ_AUTO_6 (6) +#define IRQ_AUTO_7 (7) + /* VIA1 interrupts */ #define IRQ_VIA1_0 (8) /* one second int. */ #define IRQ_VIA1_1 (9) /* VBlank int. */ @@ -152,4 +163,7 @@ #define INT_CLK 24576 /* CLK while int_clk =2.456MHz and divide = 100 */ #define INT_TICKS 246 /* to make sched_time = 99.902... HZ */ +extern irq_node_t *mac_irq_list[NUM_MAC_SOURCES]; +extern void mac_do_irq_list(int irq, struct pt_regs *); + #endif /* asm/macints.h */ diff --git a/include/asm-m68k/mc146818rtc.h b/include/asm-m68k/mc146818rtc.h index 11fe12ddb..11442095a 100644 --- a/include/asm-m68k/mc146818rtc.h +++ b/include/asm-m68k/mc146818rtc.h @@ -4,6 +4,7 @@ #ifndef _ASM_MC146818RTC_H #define _ASM_MC146818RTC_H +#include #ifdef CONFIG_ATARI /* RTC in Atari machines */ diff --git a/include/asm-m68k/mmu_context.h b/include/asm-m68k/mmu_context.h index 231d11bd8..661191d15 100644 --- a/include/asm-m68k/mmu_context.h +++ b/include/asm-m68k/mmu_context.h @@ -1,6 +1,7 @@ #ifndef __M68K_MMU_CONTEXT_H #define __M68K_MMU_CONTEXT_H +#include static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { diff --git a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h index 1ccc7338a..162872345 100644 --- a/include/asm-m68k/motorola_pgtable.h +++ b/include/asm-m68k/motorola_pgtable.h @@ -1,6 +1,7 @@ #ifndef _MOTOROLA_PGTABLE_H #define _MOTOROLA_PGTABLE_H +#include /* * Definitions for MMU descriptors diff --git a/include/asm-m68k/mvme147hw.h b/include/asm-m68k/mvme147hw.h index b81043108..f245139f3 100644 --- a/include/asm-m68k/mvme147hw.h +++ b/include/asm-m68k/mvme147hw.h @@ -1,8 +1,6 @@ #ifndef _MVME147HW_H_ #define _MVME147HW_H_ -#include - typedef struct { unsigned char ctrl, @@ -74,39 +72,39 @@ struct pcc_regs { #define PCC_LEVEL_SCSI_PORT 0x04 #define PCC_LEVEL_SCSI_DMA 0x04 -#define PCC_IRQ_AC_FAIL (IRQ_USER+0) -#define PCC_IRQ_BERR (IRQ_USER+1) -#define PCC_IRQ_ABORT (IRQ_USER+2) -/* #define PCC_IRQ_SERIAL (IRQ_USER+3) */ -#define PCC_IRQ_PRINTER (IRQ_USER+7) -#define PCC_IRQ_TIMER1 (IRQ_USER+8) -#define PCC_IRQ_TIMER2 (IRQ_USER+9) -#define PCC_IRQ_SOFTWARE1 (IRQ_USER+10) -#define PCC_IRQ_SOFTWARE2 (IRQ_USER+11) +#define PCC_IRQ_AC_FAIL 0x40 +#define PCC_IRQ_BERR 0x41 +#define PCC_IRQ_ABORT 0x42 +/* #define PCC_IRQ_SERIAL 0x43 */ +#define PCC_IRQ_PRINTER 0x47 +#define PCC_IRQ_TIMER1 0x48 +#define PCC_IRQ_TIMER2 0x49 +#define PCC_IRQ_SOFTWARE1 0x4a +#define PCC_IRQ_SOFTWARE2 0x4b #define M147_SCC_A_ADDR 0xfffe3002 #define M147_SCC_B_ADDR 0xfffe3000 #define M147_SCC_PCLK 5000000 -#define MVME147_IRQ_SCSI_PORT (IRQ_USER+0x45) -#define MVME147_IRQ_SCSI_DMA (IRQ_USER+0x46) +#define MVME147_IRQ_SCSI_PORT 0x45 +#define MVME147_IRQ_SCSI_DMA 0x46 /* SCC interrupts, for MVME147 */ #define MVME147_IRQ_TYPE_PRIO 0 -#define MVME147_IRQ_SCC_BASE (IRQ_USER+32) -#define MVME147_IRQ_SCCB_TX (IRQ_USER+32) -#define MVME147_IRQ_SCCB_STAT (IRQ_USER+34) -#define MVME147_IRQ_SCCB_RX (IRQ_USER+36) -#define MVME147_IRQ_SCCB_SPCOND (IRQ_USER+38) -#define MVME147_IRQ_SCCA_TX (IRQ_USER+40) -#define MVME147_IRQ_SCCA_STAT (IRQ_USER+42) -#define MVME147_IRQ_SCCA_RX (IRQ_USER+44) -#define MVME147_IRQ_SCCA_SPCOND (IRQ_USER+46) +#define MVME147_IRQ_SCC_BASE 0x60 +#define MVME147_IRQ_SCCB_TX 0x60 +#define MVME147_IRQ_SCCB_STAT 0x62 +#define MVME147_IRQ_SCCB_RX 0x64 +#define MVME147_IRQ_SCCB_SPCOND 0x66 +#define MVME147_IRQ_SCCA_TX 0x68 +#define MVME147_IRQ_SCCA_STAT 0x6a +#define MVME147_IRQ_SCCA_RX 0x6c +#define MVME147_IRQ_SCCA_SPCOND 0x6e #define MVME147_LANCE_BASE 0xfffe1800 -#define MVME147_LANCE_IRQ (IRQ_USER+4) +#define MVME147_LANCE_IRQ 0x44 #define ETHERNET_ADDRESS 0xfffe0778 diff --git a/include/asm-m68k/mvme16xhw.h b/include/asm-m68k/mvme16xhw.h index 6117f5665..5d07231d2 100644 --- a/include/asm-m68k/mvme16xhw.h +++ b/include/asm-m68k/mvme16xhw.h @@ -66,28 +66,28 @@ typedef struct { #define MVME162_IRQ_TYPE_PRIO 0 -#define MVME167_IRQ_PRN (IRQ_USER+20) -#define MVME16x_IRQ_I596 (IRQ_USER+23) -#define MVME16x_IRQ_SCSI (IRQ_USER+21) -#define MVME16x_IRQ_FLY (IRQ_USER+63) -#define MVME167_IRQ_SER_ERR (IRQ_USER+28) -#define MVME167_IRQ_SER_MODEM (IRQ_USER+29) -#define MVME167_IRQ_SER_TX (IRQ_USER+30) -#define MVME167_IRQ_SER_RX (IRQ_USER+31) -#define MVME16x_IRQ_TIMER (IRQ_USER+25) -#define MVME167_IRQ_ABORT (IRQ_USER+46) -#define MVME162_IRQ_ABORT (IRQ_USER+30) +#define MVME167_IRQ_PRN 0x54 +#define MVME16x_IRQ_I596 0x57 +#define MVME16x_IRQ_SCSI 0x55 +#define MVME16x_IRQ_FLY 0x7f +#define MVME167_IRQ_SER_ERR 0x5c +#define MVME167_IRQ_SER_MODEM 0x5d +#define MVME167_IRQ_SER_TX 0x5e +#define MVME167_IRQ_SER_RX 0x5f +#define MVME16x_IRQ_TIMER 0x59 +#define MVME167_IRQ_ABORT 0x6e +#define MVME162_IRQ_ABORT 0x5e /* SCC interrupts, for MVME162 */ -#define MVME162_IRQ_SCC_BASE (IRQ_USER+0) -#define MVME162_IRQ_SCCB_TX (IRQ_USER+0) -#define MVME162_IRQ_SCCB_STAT (IRQ_USER+2) -#define MVME162_IRQ_SCCB_RX (IRQ_USER+4) -#define MVME162_IRQ_SCCB_SPCOND (IRQ_USER+6) -#define MVME162_IRQ_SCCA_TX (IRQ_USER+8) -#define MVME162_IRQ_SCCA_STAT (IRQ_USER+10) -#define MVME162_IRQ_SCCA_RX (IRQ_USER+12) -#define MVME162_IRQ_SCCA_SPCOND (IRQ_USER+14) +#define MVME162_IRQ_SCC_BASE 0x40 +#define MVME162_IRQ_SCCB_TX 0x40 +#define MVME162_IRQ_SCCB_STAT 0x42 +#define MVME162_IRQ_SCCB_RX 0x44 +#define MVME162_IRQ_SCCB_SPCOND 0x46 +#define MVME162_IRQ_SCCA_TX 0x48 +#define MVME162_IRQ_SCCA_STAT 0x4a +#define MVME162_IRQ_SCCA_RX 0x4c +#define MVME162_IRQ_SCCA_SPCOND 0x4e /* MVME162 version register */ diff --git a/include/asm-m68k/openprom.h b/include/asm-m68k/openprom.h index 869ab9176..efbfb0bec 100644 --- a/include/asm-m68k/openprom.h +++ b/include/asm-m68k/openprom.h @@ -8,6 +8,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include /* Empirical constants... */ #ifdef CONFIG_SUN3 diff --git a/include/asm-m68k/oplib.h b/include/asm-m68k/oplib.h index 06caa2d08..c3594f473 100644 --- a/include/asm-m68k/oplib.h +++ b/include/asm-m68k/oplib.h @@ -244,6 +244,11 @@ extern void prom_getstring(int node, char *prop, char *buf, int bufsize); /* Does the passed node have the given "name"? YES=1 NO=0 */ extern int prom_nodematch(int thisnode, char *name); +/* Puts in buffer a prom name in the form name@x,y or name (x for which_io + * and y for first regs phys address + */ +extern int prom_getname(int node, char *buf, int buflen); + /* Search all siblings starting at the passed node for "name" matching * the given string. Returns the node on success, zero on failure. */ diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index f4c883b22..3725c9bd9 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h @@ -1,8 +1,7 @@ #ifndef _M68K_PAGE_H #define _M68K_PAGE_H - -#ifdef __KERNEL__ +#include /* PAGE_SHIFT determines the page size */ #ifndef CONFIG_SUN3 @@ -17,6 +16,8 @@ #endif #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #include #if PAGE_SHIFT < 13 @@ -175,10 +176,10 @@ static inline void *__va(unsigned long x) #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include + #endif /* _M68K_PAGE_H */ diff --git a/include/asm-m68k/page_offset.h b/include/asm-m68k/page_offset.h index 1cbdb7f30..86d3c2845 100644 --- a/include/asm-m68k/page_offset.h +++ b/include/asm-m68k/page_offset.h @@ -1,3 +1,4 @@ +#include /* This handles the memory map.. */ #ifndef CONFIG_SUN3 diff --git a/include/asm-m68k/pgalloc.h b/include/asm-m68k/pgalloc.h index a9cfb4b99..b468b7958 100644 --- a/include/asm-m68k/pgalloc.h +++ b/include/asm-m68k/pgalloc.h @@ -2,6 +2,7 @@ #ifndef M68K_PGALLOC_H #define M68K_PGALLOC_H +#include #include #include #include diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index f3aa05377..add129e93 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h @@ -3,6 +3,7 @@ #include +#include #include #ifndef __ASSEMBLY__ diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h index 8455f778b..7982285e8 100644 --- a/include/asm-m68k/processor.h +++ b/include/asm-m68k/processor.h @@ -13,6 +13,7 @@ */ #define current_text_addr() ({ __label__ _l; _l: &&_l;}) +#include #include #include #include @@ -71,10 +72,10 @@ struct thread_struct { }; #define INIT_THREAD { \ - .ksp = sizeof(init_stack) + (unsigned long) init_stack, \ - .sr = PS_S, \ - .fs = __KERNEL_DS, \ - .info = INIT_THREAD_INFO(init_task), \ + ksp: sizeof(init_stack) + (unsigned long) init_stack, \ + sr: PS_S, \ + fs: __KERNEL_DS, \ + info: INIT_THREAD_INFO(init_task) \ } /* diff --git a/include/asm-m68k/scatterlist.h b/include/asm-m68k/scatterlist.h index 8e612266d..d7c9b5c5e 100644 --- a/include/asm-m68k/scatterlist.h +++ b/include/asm-m68k/scatterlist.h @@ -2,17 +2,18 @@ #define _M68K_SCATTERLIST_H struct scatterlist { + /* These two are only valid if ADDRESS member of this + * struct is NULL. + */ struct page *page; unsigned int offset; + unsigned int length; - __u32 dma_address; /* A place to hang host-specific addresses at. */ + __u32 dvma_address; /* A place to hang host-specific addresses at. */ }; /* This is bogus and should go away. */ #define ISA_DMA_THRESHOLD (0x00ffffff) -#define sg_dma_address(sg) ((sg)->dma_address) -#define sg_dma_len(sg) ((sg)->length) - #endif /* !(_M68K_SCATTERLIST_H) */ diff --git a/include/asm-m68k/semaphore-helper.h b/include/asm-m68k/semaphore-helper.h index eef30ba0b..1516a642f 100644 --- a/include/asm-m68k/semaphore-helper.h +++ b/include/asm-m68k/semaphore-helper.h @@ -9,6 +9,7 @@ * m68k version by Andreas Schwab */ +#include #include /* diff --git a/include/asm-m68k/serial.h b/include/asm-m68k/serial.h index 2b90d6e69..3fe29f8b0 100644 --- a/include/asm-m68k/serial.h +++ b/include/asm-m68k/serial.h @@ -6,6 +6,7 @@ * */ +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-m68k/setup.h b/include/asm-m68k/setup.h index 7facc9a46..a89aa8407 100644 --- a/include/asm-m68k/setup.h +++ b/include/asm-m68k/setup.h @@ -23,6 +23,7 @@ #ifndef _M68K_SETUP_H #define _M68K_SETUP_H +#include /* diff --git a/include/asm-m68k/shm.h b/include/asm-m68k/shm.h index fa56ec84a..3fa2f368f 100644 --- a/include/asm-m68k/shm.h +++ b/include/asm-m68k/shm.h @@ -1,6 +1,7 @@ #ifndef _M68K_SHM_H #define _M68K_SHM_H +#include /* format of page table entries that correspond to shared memory pages currently out in swap space (see also mm/swap.c): diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index de1ba6ead..b7b7ea20c 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h @@ -74,6 +74,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -93,6 +94,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ /* * sigaltstack controls @@ -154,17 +156,13 @@ typedef struct sigaltstack { static inline void sigaddset(sigset_t *set, int _sig) { - asm ("bfset %0{%1,#1}" - : "+od" (*set) - : "id" ((_sig - 1) ^ 31) + __asm__("bfset %0{%1,#1}" : "=m" (*set) : "id" ((_sig - 1) ^ 31) : "cc"); } static inline void sigdelset(sigset_t *set, int _sig) { - asm ("bfclr %0{%1,#1}" - : "+od" (*set) - : "id" ((_sig - 1) ^ 31) + __asm__("bfclr %0{%1,#1}" : "=m"(*set) : "id"((_sig - 1) ^ 31) : "cc"); } @@ -177,10 +175,8 @@ static inline int __const_sigismember(sigset_t *set, int _sig) static inline int __gen_sigismember(sigset_t *set, int _sig) { int ret; - asm ("bfextu %1{%2,#1},%0" - : "=d" (ret) - : "od" (*set), "id" ((_sig-1) ^ 31) - : "cc"); + __asm__("bfextu %1{%2,#1},%0" + : "=d"(ret) : "m"(*set), "id"((_sig-1) ^ 31)); return ret; } @@ -191,10 +187,7 @@ static inline int __gen_sigismember(sigset_t *set, int _sig) static inline int sigfindinword(unsigned long word) { - asm ("bfffo %1{#0,#0},%0" - : "=d" (word) - : "d" (word & -word) - : "cc"); + __asm__("bfffo %1{#0,#0},%0" : "=d"(word) : "d"(word & -word) : "cc"); return word ^ 31; } diff --git a/include/asm-m68k/socket.h b/include/asm-m68k/socket.h index a5966ec00..f578ca4b7 100644 --- a/include/asm-m68k/socket.h +++ b/include/asm-m68k/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-m68k/sun3ints.h b/include/asm-m68k/sun3ints.h index de91fa071..bd038fccb 100644 --- a/include/asm-m68k/sun3ints.h +++ b/include/asm-m68k/sun3ints.h @@ -12,25 +12,37 @@ #define SUN3INTS_H #include +#include +#include +#include #include +#include +#include #include #include -#include #define SUN3_INT_VECS 192 void sun3_enable_irq(unsigned int irq); void sun3_disable_irq(unsigned int irq); +int sun3_request_irq(unsigned int irq, + irqreturn_t (*handler)(int, void *, struct pt_regs *), + unsigned long flags, const char *devname, void *dev_id + ); extern void sun3_init_IRQ (void); +extern irqreturn_t (*sun3_default_handler[]) (int, void *, struct pt_regs *); +extern void sun3_free_irq (unsigned int irq, void *dev_id); extern void sun3_enable_interrupts (void); extern void sun3_disable_interrupts (void); +extern int show_sun3_interrupts(struct seq_file *, void *); +extern irqreturn_t sun3_process_int(int, struct pt_regs *); extern volatile unsigned char* sun3_intreg; /* master list of VME vectors -- don't fuck with this */ -#define SUN3_VEC_FLOPPY (IRQ_USER+0) -#define SUN3_VEC_VMESCSI0 (IRQ_USER+0) -#define SUN3_VEC_VMESCSI1 (IRQ_USER+1) -#define SUN3_VEC_CG (IRQ_USER+104) +#define SUN3_VEC_FLOPPY 0x40 +#define SUN3_VEC_VMESCSI0 0x40 +#define SUN3_VEC_VMESCSI1 0x41 +#define SUN3_VEC_CG 0xA8 #endif /* SUN3INTS_H */ diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h index ca8cc4113..98a9f79da 100644 --- a/include/asm-m68k/sun3xflop.h +++ b/include/asm-m68k/sun3xflop.h @@ -208,8 +208,7 @@ static int sun3xflop_request_irq(void) if(!once) { once = 1; - error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, - IRQF_DISABLED, "floppy", NULL); + error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, SA_INTERRUPT, "floppy", NULL); return ((error == 0) ? 0 : -1); } else return 0; } diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 131a0cb0f..64d3481df 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -1,6 +1,7 @@ #ifndef _M68K_SYSTEM_H #define _M68K_SYSTEM_H +#include /* get configuration macros */ #include #include #include @@ -80,6 +81,7 @@ static inline int irqs_disabled(void) #define wmb() barrier() #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { xchg(&var, value); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define smp_mb() barrier() #define smp_rmb() barrier() diff --git a/include/asm-m68k/tlbflush.h b/include/asm-m68k/tlbflush.h index 31678831e..8e61ccffe 100644 --- a/include/asm-m68k/tlbflush.h +++ b/include/asm-m68k/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _M68K_TLBFLUSH_H #define _M68K_TLBFLUSH_H +#include #ifndef CONFIG_SUN3 diff --git a/include/asm-m68k/traps.h b/include/asm-m68k/traps.h index 8caef2562..475056191 100644 --- a/include/asm-m68k/traps.h +++ b/include/asm-m68k/traps.h @@ -13,15 +13,8 @@ #ifndef __ASSEMBLY__ -#include -#include - typedef void (*e_vector)(void); -asmlinkage void auto_inthandler(void); -asmlinkage void user_inthandler(void); -asmlinkage void bad_inthandler(void); - extern e_vector vectors[]; #endif diff --git a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h index 88b1f4740..2ffd87b0a 100644 --- a/include/asm-m68k/uaccess.h +++ b/include/asm-m68k/uaccess.h @@ -4,9 +4,8 @@ /* * User space memory access functions */ -#include #include -#include +#include #include #define VERIFY_READ 0 @@ -33,335 +32,858 @@ struct exception_table_entry unsigned long insn, fixup; }; -extern int __put_user_bad(void); -extern int __get_user_bad(void); - -#define __put_user_asm(res, x, ptr, bwl, reg, err) \ -asm volatile ("\n" \ - "1: moves."#bwl" %2,%1\n" \ - "2:\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "10: moveq.l %3,%0\n" \ - " jra 2b\n" \ - " .previous\n" \ - "\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,10b\n" \ - " .long 2b,10b\n" \ - " .previous" \ - : "+d" (res), "=m" (*(ptr)) \ - : #reg (x), "i" (err)) /* * These are the main single-value transfer routines. They automatically * use the right size if we just have the right pointer type. */ -#define __put_user(x, ptr) \ -({ \ - typeof(*(ptr)) __pu_val = (x); \ - int __pu_err = 0; \ - __chk_user_ptr(ptr); \ - switch (sizeof (*(ptr))) { \ - case 1: \ - __put_user_asm(__pu_err, __pu_val, ptr, b, d, -EFAULT); \ - break; \ - case 2: \ - __put_user_asm(__pu_err, __pu_val, ptr, w, d, -EFAULT); \ - break; \ - case 4: \ - __put_user_asm(__pu_err, __pu_val, ptr, l, r, -EFAULT); \ - break; \ - case 8: \ - { \ - const void *__pu_ptr = (ptr); \ - asm volatile ("\n" \ - "1: moves.l %2,(%1)+\n" \ - "2: moves.l %R2,(%1)\n" \ - "3:\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "10: movel %3,%0\n" \ - " jra 3b\n" \ - " .previous\n" \ - "\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,10b\n" \ - " .long 2b,10b\n" \ - " .long 3b,10b\n" \ - " .previous" \ - : "+d" (__pu_err), "+a" (__pu_ptr) \ - : "r" (__pu_val), "i" (-EFAULT) \ - : "memory"); \ - break; \ - } \ - default: \ - __pu_err = __put_user_bad(); \ - break; \ - } \ - __pu_err; \ +#define put_user(x, ptr) \ +({ \ + int __pu_err; \ + typeof(*(ptr)) __pu_val = (x); \ + __chk_user_ptr(ptr); \ + switch (sizeof (*(ptr))) { \ + case 1: \ + __put_user_asm(__pu_err, __pu_val, ptr, b); \ + break; \ + case 2: \ + __put_user_asm(__pu_err, __pu_val, ptr, w); \ + break; \ + case 4: \ + __put_user_asm(__pu_err, __pu_val, ptr, l); \ + break; \ + case 8: \ + __pu_err = __constant_copy_to_user(ptr, &__pu_val, 8); \ + break; \ + default: \ + __pu_err = __put_user_bad(); \ + break; \ + } \ + __pu_err; \ }) -#define put_user(x, ptr) __put_user(x, ptr) +#define __put_user(x, ptr) put_user(x, ptr) +extern int __put_user_bad(void); -#define __get_user_asm(res, x, ptr, type, bwl, reg, err) ({ \ - type __gu_val; \ - asm volatile ("\n" \ - "1: moves."#bwl" %2,%1\n" \ - "2:\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "10: move.l %3,%0\n" \ - " sub."#bwl" %1,%1\n" \ - " jra 2b\n" \ - " .previous\n" \ - "\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,10b\n" \ - " .previous" \ - : "+d" (res), "=&" #reg (__gu_val) \ - : "m" (*(ptr)), "i" (err)); \ - (x) = (typeof(*(ptr)))(long)__gu_val; \ -}) +/* + * Tell gcc we read from memory instead of writing: this is because + * we do not write to any memory gcc knows about, so there are no + * aliasing issues. + */ +#define __put_user_asm(err,x,ptr,bwl) \ +__asm__ __volatile__ \ + ("21:moves" #bwl " %2,%1\n" \ + "1:\n" \ + ".section .fixup,\"ax\"\n" \ + " .even\n" \ + "2: movel %3,%0\n" \ + " jra 1b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 21b,2b\n" \ + " .long 1b,2b\n" \ + ".previous" \ + : "=d"(err) \ + : "m"(*(ptr)), "r"(x), "i"(-EFAULT), "0"(0)) -#define __get_user(x, ptr) \ -({ \ - int __gu_err = 0; \ - __chk_user_ptr(ptr); \ - switch (sizeof(*(ptr))) { \ - case 1: \ - __get_user_asm(__gu_err, x, ptr, u8, b, d, -EFAULT); \ - break; \ - case 2: \ - __get_user_asm(__gu_err, x, ptr, u16, w, d, -EFAULT); \ - break; \ - case 4: \ - __get_user_asm(__gu_err, x, ptr, u32, l, r, -EFAULT); \ - break; \ -/* case 8: disabled because gcc-4.1 has a broken typeof \ - { \ - const void *__gu_ptr = (ptr); \ - u64 __gu_val; \ - asm volatile ("\n" \ - "1: moves.l (%2)+,%1\n" \ - "2: moves.l (%2),%R1\n" \ - "3:\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "10: move.l %3,%0\n" \ - " sub.l %1,%1\n" \ - " sub.l %R1,%R1\n" \ - " jra 3b\n" \ - " .previous\n" \ - "\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,10b\n" \ - " .long 2b,10b\n" \ - " .previous" \ - : "+d" (__gu_err), "=&r" (__gu_val), \ - "+a" (__gu_ptr) \ - : "i" (-EFAULT) \ - : "memory"); \ - (x) = (typeof(*(ptr)))__gu_val; \ - break; \ - } */ \ - default: \ - __gu_err = __get_user_bad(); \ - break; \ - } \ - __gu_err; \ +#define get_user(x, ptr) \ +({ \ + int __gu_err; \ + typeof(*(ptr)) __gu_val; \ + __chk_user_ptr(ptr); \ + switch (sizeof(*(ptr))) { \ + case 1: \ + __get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \ + break; \ + case 2: \ + __get_user_asm(__gu_err, __gu_val, ptr, w, "=r"); \ + break; \ + case 4: \ + __get_user_asm(__gu_err, __gu_val, ptr, l, "=r"); \ + break; \ + case 8: \ + __gu_err = __constant_copy_from_user(&__gu_val, ptr, 8); \ + break; \ + default: \ + __gu_val = (typeof(*(ptr)))0; \ + __gu_err = __get_user_bad(); \ + break; \ + } \ + (x) = __gu_val; \ + __gu_err; \ }) -#define get_user(x, ptr) __get_user(x, ptr) +#define __get_user(x, ptr) get_user(x, ptr) -unsigned long __generic_copy_from_user(void *to, const void __user *from, unsigned long n); -unsigned long __generic_copy_to_user(void __user *to, const void *from, unsigned long n); +extern int __get_user_bad(void); -#define __constant_copy_from_user_asm(res, to, from, tmp, n, s1, s2, s3)\ - asm volatile ("\n" \ - "1: moves."#s1" (%2)+,%3\n" \ - " move."#s1" %3,(%1)+\n" \ - "2: moves."#s2" (%2)+,%3\n" \ - " move."#s2" %3,(%1)+\n" \ - " .ifnc \""#s3"\",\"\"\n" \ - "3: moves."#s3" (%2)+,%3\n" \ - " move."#s3" %3,(%1)+\n" \ - " .endif\n" \ - "4:\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,10f\n" \ - " .long 2b,20f\n" \ - " .ifnc \""#s3"\",\"\"\n" \ - " .long 3b,30f\n" \ - " .endif\n" \ - " .previous\n" \ - "\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "10: clr."#s1" (%1)+\n" \ - "20: clr."#s2" (%1)+\n" \ - " .ifnc \""#s3"\",\"\"\n" \ - "30: clr."#s3" (%1)+\n" \ - " .endif\n" \ - " moveq.l #"#n",%0\n" \ - " jra 4b\n" \ - " .previous\n" \ - : "+d" (res), "+&a" (to), "+a" (from), "=&d" (tmp) \ - : : "memory") +#define __get_user_asm(err,x,ptr,bwl,reg) \ +__asm__ __volatile__ \ + ("1: moves" #bwl " %2,%1\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + " .even\n" \ + "3: movel %3,%0\n" \ + " sub" #bwl " %1,%1\n" \ + " jra 2b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 1b,3b\n" \ + ".previous" \ + : "=d"(err), reg(x) \ + : "m"(*(ptr)), "i" (-EFAULT), "0"(0)) -static __always_inline unsigned long -__constant_copy_from_user(void *to, const void __user *from, unsigned long n) +static inline unsigned long +__generic_copy_from_user(void *to, const void __user *from, unsigned long n) +{ + unsigned long tmp; + __asm__ __volatile__ + (" tstl %2\n" + " jeq 2f\n" + "1: movesl (%1)+,%3\n" + " movel %3,(%0)+\n" + " subql #1,%2\n" + " jne 1b\n" + "2: movel %4,%2\n" + " bclr #1,%2\n" + " jeq 4f\n" + "3: movesw (%1)+,%3\n" + " movew %3,(%0)+\n" + "4: bclr #0,%2\n" + " jeq 6f\n" + "5: movesb (%1)+,%3\n" + " moveb %3,(%0)+\n" + "6:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "7: movel %2,%%d0\n" + "71:clrl (%0)+\n" + " subql #1,%%d0\n" + " jne 71b\n" + " lsll #2,%2\n" + " addl %4,%2\n" + " btst #1,%4\n" + " jne 81f\n" + " btst #0,%4\n" + " jne 91f\n" + " jra 6b\n" + "8: addql #2,%2\n" + "81:clrw (%0)+\n" + " btst #0,%4\n" + " jne 91f\n" + " jra 6b\n" + "9: addql #1,%2\n" + "91:clrb (%0)+\n" + " jra 6b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,7b\n" + " .long 3b,8b\n" + " .long 5b,9b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n), "=&d"(tmp) + : "d"(n & 3), "0"(to), "1"(from), "2"(n/4) + : "d0", "memory"); + return n; +} + +static inline unsigned long +__generic_copy_to_user(void __user *to, const void *from, unsigned long n) { - unsigned long res = 0, tmp; + unsigned long tmp; + __asm__ __volatile__ + (" tstl %2\n" + " jeq 3f\n" + "1: movel (%1)+,%3\n" + "22:movesl %3,(%0)+\n" + "2: subql #1,%2\n" + " jne 1b\n" + "3: movel %4,%2\n" + " bclr #1,%2\n" + " jeq 4f\n" + " movew (%1)+,%3\n" + "24:movesw %3,(%0)+\n" + "4: bclr #0,%2\n" + " jeq 5f\n" + " moveb (%1)+,%3\n" + "25:movesb %3,(%0)+\n" + "5:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "60:addql #1,%2\n" + "6: lsll #2,%2\n" + " addl %4,%2\n" + " jra 5b\n" + "7: addql #2,%2\n" + " jra 5b\n" + "8: addql #1,%2\n" + " jra 5b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,60b\n" + " .long 22b,6b\n" + " .long 2b,6b\n" + " .long 24b,7b\n" + " .long 3b,60b\n" + " .long 4b,7b\n" + " .long 25b,8b\n" + " .long 5b,8b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n), "=&d"(tmp) + : "r"(n & 3), "0"(to), "1"(from), "2"(n / 4) + : "memory"); + return n; +} - switch (n) { +#define __copy_from_user_big(to, from, n, fixup, copy) \ + __asm__ __volatile__ \ + ("10: movesl (%1)+,%%d0\n" \ + " movel %%d0,(%0)+\n" \ + " subql #1,%2\n" \ + " jne 10b\n" \ + ".section .fixup,\"ax\"\n" \ + " .even\n" \ + "11: movel %2,%%d0\n" \ + "13: clrl (%0)+\n" \ + " subql #1,%%d0\n" \ + " jne 13b\n" \ + " lsll #2,%2\n" \ + fixup "\n" \ + " jra 12f\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 10b,11b\n" \ + ".previous\n" \ + copy "\n" \ + "12:" \ + : "=a"(to), "=a"(from), "=d"(n) \ + : "0"(to), "1"(from), "2"(n/4) \ + : "d0", "memory") + +static inline unsigned long +__constant_copy_from_user(void *to, const void __user *from, unsigned long n) +{ + switch (n) { + case 0: + break; + case 1: + __asm__ __volatile__ + ("1: movesb (%1)+,%%d0\n" + " moveb %%d0,(%0)+\n" + "2:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "3: addql #1,%2\n" + " clrb (%0)+\n" + " jra 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,3b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 2: + __asm__ __volatile__ + ("1: movesw (%1)+,%%d0\n" + " movew %%d0,(%0)+\n" + "2:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "3: addql #2,%2\n" + " clrw (%0)+\n" + " jra 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,3b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 3: + __asm__ __volatile__ + ("1: movesw (%1)+,%%d0\n" + " movew %%d0,(%0)+\n" + "2: movesb (%1)+,%%d0\n" + " moveb %%d0,(%0)+\n" + "3:" + ".section .fixup,\"ax\"\n" + " .even\n" + "4: addql #2,%2\n" + " clrw (%0)+\n" + "5: addql #1,%2\n" + " clrb (%0)+\n" + " jra 3b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,4b\n" + " .long 2b,5b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 4: + __asm__ __volatile__ + ("1: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "2:" + ".section .fixup,\"ax\"\n" + " .even\n" + "3: addql #4,%2\n" + " clrl (%0)+\n" + " jra 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,3b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 8: + __asm__ __volatile__ + ("1: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "2: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "3:" + ".section .fixup,\"ax\"\n" + " .even\n" + "4: addql #4,%2\n" + " clrl (%0)+\n" + "5: addql #4,%2\n" + " clrl (%0)+\n" + " jra 3b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,4b\n" + " .long 2b,5b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 12: + __asm__ __volatile__ + ("1: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "2: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "3: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "4:" + ".section .fixup,\"ax\"\n" + " .even\n" + "5: addql #4,%2\n" + " clrl (%0)+\n" + "6: addql #4,%2\n" + " clrl (%0)+\n" + "7: addql #4,%2\n" + " clrl (%0)+\n" + " jra 4b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,5b\n" + " .long 2b,6b\n" + " .long 3b,7b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 16: + __asm__ __volatile__ + ("1: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "2: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "3: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "4: movesl (%1)+,%%d0\n" + " movel %%d0,(%0)+\n" + "5:" + ".section .fixup,\"ax\"\n" + " .even\n" + "6: addql #4,%2\n" + " clrl (%0)+\n" + "7: addql #4,%2\n" + " clrl (%0)+\n" + "8: addql #4,%2\n" + " clrl (%0)+\n" + "9: addql #4,%2\n" + " clrl (%0)+\n" + " jra 5b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,6b\n" + " .long 2b,7b\n" + " .long 3b,8b\n" + " .long 4b,9b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + default: + switch (n & 3) { + case 0: + __copy_from_user_big(to, from, n, "", ""); + break; case 1: - __get_user_asm(res, *(u8 *)to, (u8 *)from, u8, b, d, 1); - break; + __copy_from_user_big(to, from, n, + /* fixup */ + "1: addql #1,%2\n" + " clrb (%0)+", + /* copy */ + "2: movesb (%1)+,%%d0\n" + " moveb %%d0,(%0)+\n" + ".section __ex_table,\"a\"\n" + " .long 2b,1b\n" + ".previous"); + break; case 2: - __get_user_asm(res, *(u16 *)to, (u16 *)from, u16, w, d, 2); - break; + __copy_from_user_big(to, from, n, + /* fixup */ + "1: addql #2,%2\n" + " clrw (%0)+", + /* copy */ + "2: movesw (%1)+,%%d0\n" + " movew %%d0,(%0)+\n" + ".section __ex_table,\"a\"\n" + " .long 2b,1b\n" + ".previous"); + break; case 3: - __constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,); - break; - case 4: - __get_user_asm(res, *(u32 *)to, (u32 *)from, u32, l, r, 4); - break; - case 5: - __constant_copy_from_user_asm(res, to, from, tmp, 5, l, b,); - break; - case 6: - __constant_copy_from_user_asm(res, to, from, tmp, 6, l, w,); - break; - case 7: - __constant_copy_from_user_asm(res, to, from, tmp, 7, l, w, b); - break; - case 8: - __constant_copy_from_user_asm(res, to, from, tmp, 8, l, l,); - break; - case 9: - __constant_copy_from_user_asm(res, to, from, tmp, 9, l, l, b); - break; - case 10: - __constant_copy_from_user_asm(res, to, from, tmp, 10, l, l, w); - break; - case 12: - __constant_copy_from_user_asm(res, to, from, tmp, 12, l, l, l); - break; - default: - /* we limit the inlined version to 3 moves */ - return __generic_copy_from_user(to, from, n); + __copy_from_user_big(to, from, n, + /* fixup */ + "1: addql #2,%2\n" + " clrw (%0)+\n" + "2: addql #1,%2\n" + " clrb (%0)+", + /* copy */ + "3: movesw (%1)+,%%d0\n" + " movew %%d0,(%0)+\n" + "4: movesb (%1)+,%%d0\n" + " moveb %%d0,(%0)+\n" + ".section __ex_table,\"a\"\n" + " .long 3b,1b\n" + " .long 4b,2b\n" + ".previous"); + break; } - - return res; + break; + } + return n; } -#define __constant_copy_to_user_asm(res, to, from, tmp, n, s1, s2, s3) \ - asm volatile ("\n" \ - " move."#s1" (%2)+,%3\n" \ - "11: moves."#s1" %3,(%1)+\n" \ - "12: move."#s2" (%2)+,%3\n" \ - "21: moves."#s2" %3,(%1)+\n" \ - "22:\n" \ - " .ifnc \""#s3"\",\"\"\n" \ - " move."#s3" (%2)+,%3\n" \ - "31: moves."#s3" %3,(%1)+\n" \ - "32:\n" \ - " .endif\n" \ - "4:\n" \ - "\n" \ - " .section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 11b,5f\n" \ - " .long 12b,5f\n" \ - " .long 21b,5f\n" \ - " .long 22b,5f\n" \ - " .ifnc \""#s3"\",\"\"\n" \ - " .long 31b,5f\n" \ - " .long 32b,5f\n" \ - " .endif\n" \ - " .previous\n" \ - "\n" \ - " .section .fixup,\"ax\"\n" \ - " .even\n" \ - "5: moveq.l #"#n",%0\n" \ - " jra 4b\n" \ - " .previous\n" \ - : "+d" (res), "+a" (to), "+a" (from), "=&d" (tmp) \ - : : "memory") +#define __copy_to_user_big(to, from, n, fixup, copy) \ + __asm__ __volatile__ \ + ("10: movel (%1)+,%%d0\n" \ + "31: movesl %%d0,(%0)+\n" \ + "11: subql #1,%2\n" \ + " jne 10b\n" \ + "41:\n" \ + ".section .fixup,\"ax\"\n" \ + " .even\n" \ + "22: addql #1,%2\n" \ + "12: lsll #2,%2\n" \ + fixup "\n" \ + " jra 13f\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 10b,22b\n" \ + " .long 31b,12b\n" \ + " .long 11b,12b\n" \ + " .long 41b,22b\n" \ + ".previous\n" \ + copy "\n" \ + "13:" \ + : "=a"(to), "=a"(from), "=d"(n) \ + : "0"(to), "1"(from), "2"(n/4) \ + : "d0", "memory") -static __always_inline unsigned long +#define __copy_to_user_inatomic __copy_to_user +#define __copy_from_user_inatomic __copy_from_user + +static inline unsigned long __constant_copy_to_user(void __user *to, const void *from, unsigned long n) { - unsigned long res = 0, tmp; - - switch (n) { + switch (n) { + case 0: + break; + case 1: + __asm__ __volatile__ + (" moveb (%1)+,%%d0\n" + "21:movesb %%d0,(%0)+\n" + "1:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "2: addql #1,%2\n" + " jra 1b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n " + " .long 21b,2b\n" + " .long 1b,2b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 2: + __asm__ __volatile__ + (" movew (%1)+,%%d0\n" + "21:movesw %%d0,(%0)+\n" + "1:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "2: addql #2,%2\n" + " jra 1b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,2b\n" + " .long 1b,2b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 3: + __asm__ __volatile__ + (" movew (%1)+,%%d0\n" + "21:movesw %%d0,(%0)+\n" + "1: moveb (%1)+,%%d0\n" + "22:movesb %%d0,(%0)+\n" + "2:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "3: addql #2,%2\n" + "4: addql #1,%2\n" + " jra 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,3b\n" + " .long 1b,3b\n" + " .long 22b,4b\n" + " .long 2b,4b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 4: + __asm__ __volatile__ + (" movel (%1)+,%%d0\n" + "21:movesl %%d0,(%0)+\n" + "1:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "2: addql #4,%2\n" + " jra 1b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,2b\n" + " .long 1b,2b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 8: + __asm__ __volatile__ + (" movel (%1)+,%%d0\n" + "21:movesl %%d0,(%0)+\n" + "1: movel (%1)+,%%d0\n" + "22:movesl %%d0,(%0)+\n" + "2:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "3: addql #4,%2\n" + "4: addql #4,%2\n" + " jra 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,3b\n" + " .long 1b,3b\n" + " .long 22b,4b\n" + " .long 2b,4b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 12: + __asm__ __volatile__ + (" movel (%1)+,%%d0\n" + "21:movesl %%d0,(%0)+\n" + "1: movel (%1)+,%%d0\n" + "22:movesl %%d0,(%0)+\n" + "2: movel (%1)+,%%d0\n" + "23:movesl %%d0,(%0)+\n" + "3:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "4: addql #4,%2\n" + "5: addql #4,%2\n" + "6: addql #4,%2\n" + " jra 3b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,4b\n" + " .long 1b,4b\n" + " .long 22b,5b\n" + " .long 2b,5b\n" + " .long 23b,6b\n" + " .long 3b,6b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + case 16: + __asm__ __volatile__ + (" movel (%1)+,%%d0\n" + "21:movesl %%d0,(%0)+\n" + "1: movel (%1)+,%%d0\n" + "22:movesl %%d0,(%0)+\n" + "2: movel (%1)+,%%d0\n" + "23:movesl %%d0,(%0)+\n" + "3: movel (%1)+,%%d0\n" + "24:movesl %%d0,(%0)+\n" + "4:" + ".section .fixup,\"ax\"\n" + " .even\n" + "5: addql #4,%2\n" + "6: addql #4,%2\n" + "7: addql #4,%2\n" + "8: addql #4,%2\n" + " jra 4b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 21b,5b\n" + " .long 1b,5b\n" + " .long 22b,6b\n" + " .long 2b,6b\n" + " .long 23b,7b\n" + " .long 3b,7b\n" + " .long 24b,8b\n" + " .long 4b,8b\n" + ".previous" + : "=a"(to), "=a"(from), "=d"(n) + : "0"(to), "1"(from), "2"(0) + : "d0", "memory"); + break; + default: + switch (n & 3) { + case 0: + __copy_to_user_big(to, from, n, "", ""); + break; case 1: - __put_user_asm(res, *(u8 *)from, (u8 *)to, b, d, 1); - break; + __copy_to_user_big(to, from, n, + /* fixup */ + "1: addql #1,%2", + /* copy */ + " moveb (%1)+,%%d0\n" + "22:movesb %%d0,(%0)+\n" + "2:" + ".section __ex_table,\"a\"\n" + " .long 22b,1b\n" + " .long 2b,1b\n" + ".previous"); + break; case 2: - __put_user_asm(res, *(u16 *)from, (u16 *)to, w, d, 2); - break; + __copy_to_user_big(to, from, n, + /* fixup */ + "1: addql #2,%2", + /* copy */ + " movew (%1)+,%%d0\n" + "22:movesw %%d0,(%0)+\n" + "2:" + ".section __ex_table,\"a\"\n" + " .long 22b,1b\n" + " .long 2b,1b\n" + ".previous"); + break; case 3: - __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); - break; - case 4: - __put_user_asm(res, *(u32 *)from, (u32 *)to, l, r, 4); - break; - case 5: - __constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,); - break; - case 6: - __constant_copy_to_user_asm(res, to, from, tmp, 6, l, w,); - break; - case 7: - __constant_copy_to_user_asm(res, to, from, tmp, 7, l, w, b); - break; - case 8: - __constant_copy_to_user_asm(res, to, from, tmp, 8, l, l,); - break; - case 9: - __constant_copy_to_user_asm(res, to, from, tmp, 9, l, l, b); - break; - case 10: - __constant_copy_to_user_asm(res, to, from, tmp, 10, l, l, w); - break; - case 12: - __constant_copy_to_user_asm(res, to, from, tmp, 12, l, l, l); - break; - default: - /* limit the inlined version to 3 moves */ - return __generic_copy_to_user(to, from, n); + __copy_to_user_big(to, from, n, + /* fixup */ + "1: addql #2,%2\n" + "2: addql #1,%2", + /* copy */ + " movew (%1)+,%%d0\n" + "23:movesw %%d0,(%0)+\n" + "3: moveb (%1)+,%%d0\n" + "24:movesb %%d0,(%0)+\n" + "4:" + ".section __ex_table,\"a\"\n" + " .long 23b,1b\n" + " .long 3b,1b\n" + " .long 24b,2b\n" + " .long 4b,2b\n" + ".previous"); + break; } - - return res; + break; + } + return n; } -#define __copy_from_user(to, from, n) \ +#define copy_from_user(to, from, n) \ (__builtin_constant_p(n) ? \ __constant_copy_from_user(to, from, n) : \ __generic_copy_from_user(to, from, n)) -#define __copy_to_user(to, from, n) \ +#define copy_to_user(to, from, n) \ (__builtin_constant_p(n) ? \ __constant_copy_to_user(to, from, n) : \ __generic_copy_to_user(to, from, n)) -#define __copy_to_user_inatomic __copy_to_user -#define __copy_from_user_inatomic __copy_from_user +#define __copy_from_user(to, from, n) copy_from_user(to, from, n) +#define __copy_to_user(to, from, n) copy_to_user(to, from, n) + +/* + * Copy a null terminated string from userspace. + */ + +static inline long +strncpy_from_user(char *dst, const char __user *src, long count) +{ + long res; + if (count == 0) return count; + __asm__ __volatile__ + ("1: movesb (%2)+,%%d0\n" + "12:moveb %%d0,(%1)+\n" + " jeq 2f\n" + " subql #1,%3\n" + " jne 1b\n" + "2: subl %3,%0\n" + "3:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "4: movel %4,%0\n" + " jra 3b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,4b\n" + " .long 12b,4b\n" + ".previous" + : "=d"(res), "=a"(dst), "=a"(src), "=d"(count) + : "i"(-EFAULT), "0"(count), "1"(dst), "2"(src), "3"(count) + : "d0", "memory"); + return res; +} -#define copy_from_user(to, from, n) __copy_from_user(to, from, n) -#define copy_to_user(to, from, n) __copy_to_user(to, from, n) +/* + * Return the size of a string (including the ending 0) + * + * Return 0 on exception, a value greater than N if too long + */ +static inline long strnlen_user(const char __user *src, long n) +{ + long res; -long strncpy_from_user(char *dst, const char __user *src, long count); -long strnlen_user(const char __user *src, long n); -unsigned long clear_user(void __user *to, unsigned long n); + res = -(unsigned long)src; + __asm__ __volatile__ + ("1:\n" + " tstl %2\n" + " jeq 3f\n" + "2: movesb (%1)+,%%d0\n" + "22:\n" + " subql #1,%2\n" + " tstb %%d0\n" + " jne 1b\n" + " jra 4f\n" + "3:\n" + " addql #1,%0\n" + "4:\n" + " addl %1,%0\n" + "5:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "6: moveq %3,%0\n" + " jra 5b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 2b,6b\n" + " .long 22b,6b\n" + ".previous" + : "=d"(res), "=a"(src), "=d"(n) + : "i"(0), "0"(res), "1"(src), "2"(n) + : "d0"); + return res; +} #define strlen_user(str) strnlen_user(str, 32767) +/* + * Zero Userspace + */ + +static inline unsigned long +clear_user(void __user *to, unsigned long n) +{ + __asm__ __volatile__ + (" tstl %1\n" + " jeq 3f\n" + "1: movesl %3,(%0)+\n" + "2: subql #1,%1\n" + " jne 1b\n" + "3: movel %2,%1\n" + " bclr #1,%1\n" + " jeq 4f\n" + "24:movesw %3,(%0)+\n" + "4: bclr #0,%1\n" + " jeq 5f\n" + "25:movesb %3,(%0)+\n" + "5:\n" + ".section .fixup,\"ax\"\n" + " .even\n" + "61:addql #1,%1\n" + "6: lsll #2,%1\n" + " addl %2,%1\n" + " jra 5b\n" + "7: addql #2,%1\n" + " jra 5b\n" + "8: addql #1,%1\n" + " jra 5b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 1b,61b\n" + " .long 2b,6b\n" + " .long 3b,61b\n" + " .long 24b,7b\n" + " .long 4b,7b\n" + " .long 25b,8b\n" + " .long 5b,8b\n" + ".previous" + : "=a"(to), "=d"(n) + : "r"(n & 3), "r"(0), "0"(to), "1"(n/4)); + return n; +} + #endif /* _M68K_UACCESS_H */ diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index 7c0b6296b..c2554bcd1 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h @@ -285,8 +285,6 @@ #define __NR_request_key 280 #define __NR_keyctl 281 -#ifdef __KERNEL__ - #define NR_syscalls 282 /* user-visible error numbers are in the range -1 - -124: see @@ -385,6 +383,7 @@ __asm__ __volatile__ ("trap #0" \ __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -407,12 +406,52 @@ __syscall_return(type,__res); \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ +#include +#include +#include + +/* + * we need this inline - forking from kernel space will result + * in NO COPY ON WRITE (!!!), until an execve is executed. This + * is no problem, but for the stack. This is handled by not letting + * main() use the stack at all after fork(). Thus, no function + * calls - which means inline code for fork too, as otherwise we + * would use the stack upon exit from 'fork()'. + * + * Actually only pause and fork are needed inline, so that there + * won't be any messing with the stack from main(), but we define + * some others too. + */ +#define __NR__exit __NR_exit +static inline _syscall0(pid_t,setsid) +static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) +static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) +static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) +static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) +static inline _syscall3(int,open,const char *,file,int,flag,int,mode) +static inline _syscall1(int,close,int,fd) +static inline _syscall1(int,_exit,int,exitcode) +static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) + +asmlinkage long sys_mmap2( + unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long pgoff); +asmlinkage int sys_execve(char *name, char **argv, char **envp); +asmlinkage int sys_pipe(unsigned long *fildes); +struct pt_regs; +struct sigaction; +asmlinkage long sys_rt_sigaction(int sig, + const struct sigaction __user *act, + struct sigaction __user *oact, + size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -422,5 +461,4 @@ static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_M68K_UNISTD_H_ */ diff --git a/include/asm-m68k/virtconvert.h b/include/asm-m68k/virtconvert.h index 83a87c9b1..8c4e8037b 100644 --- a/include/asm-m68k/virtconvert.h +++ b/include/asm-m68k/virtconvert.h @@ -7,6 +7,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-m68knommu/Kbuild b/include/asm-m68knommu/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-m68knommu/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h index d7fa7d9c0..0b68ccd32 100644 --- a/include/asm-m68knommu/bitops.h +++ b/include/asm-m68knommu/bitops.h @@ -5,6 +5,7 @@ * Copyright 1992, Linus Torvalds. */ +#include #include #include /* swab32 */ #include /* save_flags */ diff --git a/include/asm-m68knommu/bootstd.h b/include/asm-m68knommu/bootstd.h index bdc1a4ac4..3fdc79f06 100644 --- a/include/asm-m68knommu/bootstd.h +++ b/include/asm-m68knommu/bootstd.h @@ -52,7 +52,7 @@ type name(void) \ __asm__ __volatile__ ("trap #2" \ : "=g" (__res) \ : "0" (__res) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } @@ -64,7 +64,7 @@ type name(atype a) \ __asm__ __volatile__ ("trap #2" \ : "=g" (__res) \ : "0" (__res), "d" (__a) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } @@ -77,7 +77,7 @@ type name(atype a, btype b) \ __asm__ __volatile__ ("trap #2" \ : "=g" (__res) \ : "0" (__res), "d" (__a), "d" (__b) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } @@ -92,7 +92,7 @@ type name(atype a, btype b, ctype c) \ : "=g" (__res) \ : "0" (__res), "d" (__a), "d" (__b), \ "d" (__c) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } @@ -108,7 +108,7 @@ type name(atype a, btype b, ctype c, dtype d) \ : "=g" (__res) \ : "0" (__res), "d" (__a), "d" (__b), \ "d" (__c), "d" (__d) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } @@ -125,7 +125,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ : "=g" (__res) \ : "0" (__res), "d" (__a), "d" (__b), \ "d" (__c), "d" (__d), "d" (__e) \ - ); \ + : "%d0"); \ __bsc_return(type,__res); \ } diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index c3aadf3b0..49925e91e 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h @@ -57,13 +57,13 @@ static inline void __flush_cache_all(void) "nop\n\t" : : : "d0" ); #endif /* CONFIG_M527x || CONFIG_M528x */ -#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) +#ifdef CONFIG_M5272 __asm__ __volatile__ ( - "movel #0x81000100, %%d0\n\t" + "movel #0x01000000, %%d0\n\t" "movec %%d0, %%CACR\n\t" "nop\n\t" : : : "d0" ); -#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ +#endif /* CONFIG_M5272 */ #ifdef CONFIG_M5249 __asm__ __volatile__ ( "movel #0xa1000200, %%d0\n\t" @@ -71,13 +71,6 @@ static inline void __flush_cache_all(void) "nop\n\t" : : : "d0" ); #endif /* CONFIG_M5249 */ -#ifdef CONFIG_M532x - __asm__ __volatile__ ( - "movel #0x81000200, %%d0\n\t" - "movec %%d0, %%CACR\n\t" - "nop\n\t" - : : : "d0" ); -#endif /* CONFIG_M532x */ } #endif /* _M68KNOMMU_CACHEFLUSH_H */ diff --git a/include/asm-m68knommu/coldfire.h b/include/asm-m68knommu/coldfire.h index 83a9fa4e6..6190f77b1 100644 --- a/include/asm-m68knommu/coldfire.h +++ b/include/asm-m68knommu/coldfire.h @@ -3,7 +3,7 @@ /* * coldfire.h -- Motorola ColdFire CPU sepecific defines * - * (C) Copyright 1999-2006, Greg Ungerer (gerg@snapgear.com) + * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2000, Lineo (www.lineo.com) */ @@ -12,19 +12,7 @@ #define coldfire_h /****************************************************************************/ - -/* - * Define master clock frequency. This is essentially done at config - * time now. No point enumerating dozens of possible clock options - * here. Also the peripheral clock (bus clock) divide ratio is set - * at config time too. - */ -#ifdef CONFIG_CLOCK_SET -#define MCF_CLK CONFIG_CLOCK_FREQ -#define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV) -#else -#error "Don't know what your ColdFire CPU clock frequency is??" -#endif +#include /* * Define the processor support peripherals base address. @@ -42,9 +30,64 @@ defined(CONFIG_M520x) #undef MCF_MBAR #define MCF_MBAR MCF_IPSBAR -#elif defined(CONFIG_M532x) -#undef MCF_MBAR -#define MCF_MBAR 0x00000000 +#endif + +/* + * Define master clock frequency. + */ +#if defined(CONFIG_CLOCK_11MHz) +#define MCF_CLK 11289600 +#elif defined(CONFIG_CLOCK_16MHz) +#define MCF_CLK 16000000 +#elif defined(CONFIG_CLOCK_20MHz) +#define MCF_CLK 20000000 +#elif defined(CONFIG_CLOCK_24MHz) +#define MCF_CLK 24000000 +#elif defined(CONFIG_CLOCK_25MHz) +#define MCF_CLK 25000000 +#elif defined(CONFIG_CLOCK_33MHz) +#define MCF_CLK 33000000 +#elif defined(CONFIG_CLOCK_40MHz) +#define MCF_CLK 40000000 +#elif defined(CONFIG_CLOCK_45MHz) +#define MCF_CLK 45000000 +#elif defined(CONFIG_CLOCK_48MHz) +#define MCF_CLK 48000000 +#elif defined(CONFIG_CLOCK_50MHz) +#define MCF_CLK 50000000 +#elif defined(CONFIG_CLOCK_54MHz) +#define MCF_CLK 54000000 +#elif defined(CONFIG_CLOCK_60MHz) +#define MCF_CLK 60000000 +#elif defined(CONFIG_CLOCK_62_5MHz) +#define MCF_CLK 62500000 +#elif defined(CONFIG_CLOCK_64MHz) +#define MCF_CLK 64000000 +#elif defined(CONFIG_CLOCK_66MHz) +#define MCF_CLK 66000000 +#elif defined(CONFIG_CLOCK_70MHz) +#define MCF_CLK 70000000 +#elif defined(CONFIG_CLOCK_100MHz) +#define MCF_CLK 100000000 +#elif defined(CONFIG_CLOCK_140MHz) +#define MCF_CLK 140000000 +#elif defined(CONFIG_CLOCK_150MHz) +#define MCF_CLK 150000000 +#elif defined(CONFIG_CLOCK_166MHz) +#define MCF_CLK 166000000 +#else +#error "Don't know what your ColdFire CPU clock frequency is??" +#endif + +/* + * One some ColdFire family members the bus clock (used by internal + * peripherals) is not the same as the CPU clock. + */ +#if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x) || \ + defined(CONFIG_M520x) +#define MCF_BUSCLK (MCF_CLK / 2) +#else +#define MCF_BUSCLK MCF_CLK #endif /****************************************************************************/ diff --git a/include/asm-m68knommu/commproc.h b/include/asm-m68knommu/commproc.h index 0161ebb5d..e522ca819 100644 --- a/include/asm-m68knommu/commproc.h +++ b/include/asm-m68knommu/commproc.h @@ -17,6 +17,7 @@ #ifndef __CPM_360__ #define __CPM_360__ +#include /* CPM Command register masks: */ #define CPM_CR_RST ((ushort)0x8000) diff --git a/include/asm-m68knommu/dma-mapping.h b/include/asm-m68knommu/dma-mapping.h index 5622b855a..a6c42ba48 100644 --- a/include/asm-m68knommu/dma-mapping.h +++ b/include/asm-m68knommu/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _M68KNOMMU_DMA_MAPPING_H #define _M68KNOMMU_DMA_MAPPING_H +#include #ifdef CONFIG_PCI #include diff --git a/include/asm-m68knommu/dma.h b/include/asm-m68knommu/dma.h index 3338001ab..43e98c96a 100644 --- a/include/asm-m68knommu/dma.h +++ b/include/asm-m68knommu/dma.h @@ -3,6 +3,7 @@ //#define DMA_DEBUG 1 +#include #ifdef CONFIG_COLDFIRE /* diff --git a/include/asm-m68knommu/elf.h b/include/asm-m68knommu/elf.h index 40b1ed682..991948770 100644 --- a/include/asm-m68knommu/elf.h +++ b/include/asm-m68knommu/elf.h @@ -5,6 +5,7 @@ * ELF register definitions.. */ +#include #include #include diff --git a/include/asm-m68knommu/elia.h b/include/asm-m68knommu/elia.h index e037d4e2d..f18b8e9d8 100644 --- a/include/asm-m68knommu/elia.h +++ b/include/asm-m68knommu/elia.h @@ -12,6 +12,7 @@ #define elia_h /****************************************************************************/ +#include #include #ifdef CONFIG_eLIA diff --git a/include/asm-m68knommu/entry.h b/include/asm-m68knommu/entry.h index c2553d262..06f5aa70b 100644 --- a/include/asm-m68knommu/entry.h +++ b/include/asm-m68knommu/entry.h @@ -1,6 +1,7 @@ #ifndef __M68KNOMMU_ENTRY_H #define __M68KNOMMU_ENTRY_H +#include #include #include diff --git a/include/asm-m68knommu/fpu.h b/include/asm-m68knommu/fpu.h index b16b2e4fc..225082991 100644 --- a/include/asm-m68knommu/fpu.h +++ b/include/asm-m68knommu/fpu.h @@ -1,6 +1,7 @@ #ifndef __M68KNOMMU_FPU_H #define __M68KNOMMU_FPU_H +#include /* * MAX floating point unit state size (FSAVE/FRESTORE) diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h index 980075bab..476180f4c 100644 --- a/include/asm-m68knommu/hardirq.h +++ b/include/asm-m68knommu/hardirq.h @@ -1,6 +1,7 @@ #ifndef __M68K_HARDIRQ_H #define __M68K_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-m68knommu/io.h b/include/asm-m68knommu/io.h index 8df4cee2a..e08f2ee4b 100644 --- a/include/asm-m68knommu/io.h +++ b/include/asm-m68knommu/io.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include /* * These are for ISA/PCI shared memory _only_ and should never be used diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index 45e7a2fd1..20c48ec85 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h @@ -1,6 +1,7 @@ #ifndef _M68K_IRQ_H_ #define _M68K_IRQ_H_ +#include #include #ifdef CONFIG_COLDFIRE @@ -62,8 +63,8 @@ extern void (*mach_disable_irq)(unsigned int); /* * various flags for request_irq() - the Amiga now uses the standard - * mechanism like all other architectures - IRQF_DISABLED and - * IRQF_SHARED are your friends. + * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ + * are your friends. */ #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ @@ -83,8 +84,12 @@ extern void (*mach_disable_irq)(unsigned int); /* * Some drivers want these entry points */ -#define enable_irq(x) do { } while (0) +#define enable_irq(x) 0 #define disable_irq(x) do { } while (0) #define disable_irq_nosync(x) disable_irq(x) +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif /* _M68K_IRQ_H_ */ diff --git a/include/asm-m68knommu/m5206sim.h b/include/asm-m68knommu/m5206sim.h index 7e3594dea..d1e750902 100644 --- a/include/asm-m68knommu/m5206sim.h +++ b/include/asm-m68knommu/m5206sim.h @@ -12,6 +12,7 @@ #define m5206sim_h /****************************************************************************/ +#include /* * Define the 5206 SIM register set addresses. diff --git a/include/asm-m68knommu/m520xsim.h b/include/asm-m68knommu/m520xsim.h index 1dac22ea9..6dc62869e 100644 --- a/include/asm-m68knommu/m520xsim.h +++ b/include/asm-m68knommu/m520xsim.h @@ -11,6 +11,7 @@ #define m520xsim_h /****************************************************************************/ +#include /* * Define the 5282 SIM register set addresses. diff --git a/include/asm-m68knommu/m523xsim.h b/include/asm-m68knommu/m523xsim.h index bf397313e..926cfb805 100644 --- a/include/asm-m68knommu/m523xsim.h +++ b/include/asm-m68knommu/m523xsim.h @@ -11,6 +11,7 @@ #define m523xsim_h /****************************************************************************/ +#include /* * Define the 523x SIM register set addresses. diff --git a/include/asm-m68knommu/m5249sim.h b/include/asm-m68knommu/m5249sim.h index 399814f0b..9344f529b 100644 --- a/include/asm-m68knommu/m5249sim.h +++ b/include/asm-m68knommu/m5249sim.h @@ -157,7 +157,7 @@ movel %d0,0x180(%a1) /* set PLL register */ nop -#if CONFIG_CLOCK_FREQ == 140000000 +#ifdef CONFIG_CLOCK_140MHz /* * Set initial clock frequency. This assumes M5249C3 board * is fitted with 11.2896MHz crystal. It will program the diff --git a/include/asm-m68knommu/m5272sim.h b/include/asm-m68knommu/m5272sim.h index 6217edc21..b40875362 100644 --- a/include/asm-m68knommu/m5272sim.h +++ b/include/asm-m68knommu/m5272sim.h @@ -12,6 +12,7 @@ #define m5272sim_h /****************************************************************************/ +#include /* * Define the 5272 SIM register set addresses. diff --git a/include/asm-m68knommu/m527xsim.h b/include/asm-m68knommu/m527xsim.h index 1f63ab3fb..e7878d0f7 100644 --- a/include/asm-m68knommu/m527xsim.h +++ b/include/asm-m68knommu/m527xsim.h @@ -11,6 +11,7 @@ #define m527xsim_h /****************************************************************************/ +#include /* * Define the 5270/5271 SIM register set addresses. diff --git a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h index 1a3b1ae06..610774a17 100644 --- a/include/asm-m68knommu/m528xsim.h +++ b/include/asm-m68knommu/m528xsim.h @@ -11,6 +11,7 @@ #define m528xsim_h /****************************************************************************/ +#include /* * Define the 5280/5282 SIM register set addresses. diff --git a/include/asm-m68knommu/m532xsim.h b/include/asm-m68knommu/m532xsim.h deleted file mode 100644 index 1835fd20a..000000000 --- a/include/asm-m68knommu/m532xsim.h +++ /dev/null @@ -1,2238 +0,0 @@ -/****************************************************************************/ - -/* - * m532xsim.h -- ColdFire 5329 registers - */ - -/****************************************************************************/ -#ifndef m532xsim_h -#define m532xsim_h -/****************************************************************************/ - -#define MCF_REG32(x) (*(volatile unsigned long *)(x)) -#define MCF_REG16(x) (*(volatile unsigned short *)(x)) -#define MCF_REG08(x) (*(volatile unsigned char *)(x)) - -#define MCFINT_VECBASE 64 -#define MCFINT_UART0 26 /* Interrupt number for UART0 */ -#define MCFINT_UART1 27 /* Interrupt number for UART1 */ - -#define MCF_WTM_WCR MCF_REG16(0xFC098000) - -/* - * Define the 532x SIM register set addresses. - */ -#define MCFSIM_IPRL 0xFC048004 -#define MCFSIM_IPRH 0xFC048000 -#define MCFSIM_IPR MCFSIM_IPRL -#define MCFSIM_IMRL 0xFC04800C -#define MCFSIM_IMRH 0xFC048008 -#define MCFSIM_IMR MCFSIM_IMRL -#define MCFSIM_ICR0 0xFC048040 -#define MCFSIM_ICR1 0xFC048041 -#define MCFSIM_ICR2 0xFC048042 -#define MCFSIM_ICR3 0xFC048043 -#define MCFSIM_ICR4 0xFC048044 -#define MCFSIM_ICR5 0xFC048045 -#define MCFSIM_ICR6 0xFC048046 -#define MCFSIM_ICR7 0xFC048047 -#define MCFSIM_ICR8 0xFC048048 -#define MCFSIM_ICR9 0xFC048049 -#define MCFSIM_ICR10 0xFC04804A -#define MCFSIM_ICR11 0xFC04804B - -/* - * Some symbol defines for the above... - */ -#define MCFSIM_SWDICR MCFSIM_ICR0 /* Watchdog timer ICR */ -#define MCFSIM_TIMER1ICR MCFSIM_ICR1 /* Timer 1 ICR */ -#define MCFSIM_TIMER2ICR MCFSIM_ICR2 /* Timer 2 ICR */ -#define MCFSIM_UART1ICR MCFSIM_ICR4 /* UART 1 ICR */ -#define MCFSIM_UART2ICR MCFSIM_ICR5 /* UART 2 ICR */ -#define MCFSIM_DMA0ICR MCFSIM_ICR6 /* DMA 0 ICR */ -#define MCFSIM_DMA1ICR MCFSIM_ICR7 /* DMA 1 ICR */ -#define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */ -#define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ - - -#define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ - -#define MCFSIM_IMR_SIMR0 0xFC04801C -#define MCFSIM_IMR_SIMR1 0xFC04C01C -#define MCFSIM_IMR_CIMR0 0xFC04801D -#define MCFSIM_IMR_CIMR1 0xFC04C01D - -#define MCFSIM_ICR_TIMER1 (0xFC048040+32) -#define MCFSIM_ICR_TIMER2 (0xFC048040+33) - - -/* - * Macro to set IMR register. It is 32 bits on the 5307. - */ -#define mcf_getimr() \ - *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) - -#define mcf_setimr(imr) \ - *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr); - -#define mcf_getipr() \ - *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR)) - -#define mcf_getiprl() \ - *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRL)) - -#define mcf_getiprh() \ - *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRH)) - - -#define mcf_enable_irq0(irq) \ - *((volatile unsigned char*) (MCFSIM_IMR_CIMR0)) = (irq); - -#define mcf_enable_irq1(irq) \ - *((volatile unsigned char*) (MCFSIM_IMR_CIMR1)) = (irq); - -#define mcf_disable_irq0(irq) \ - *((volatile unsigned char*) (MCFSIM_IMR_SIMR0)) = (irq); - -#define mcf_disable_irq1(irq) \ - *((volatile unsigned char*) (MCFSIM_IMR_SIMR1)) = (irq); - -/* - * Define the Cache register flags. - */ -#define CACR_EC (1<<31) -#define CACR_ESB (1<<29) -#define CACR_DPI (1<<28) -#define CACR_HLCK (1<<27) -#define CACR_CINVA (1<<24) -#define CACR_DNFB (1<<10) -#define CACR_DCM_WTHRU (0<<8) -#define CACR_DCM_WBACK (1<<8) -#define CACR_DCM_OFF_PRE (2<<8) -#define CACR_DCM_OFF_IMP (3<<8) -#define CACR_DW (1<<5) - -#define ACR_BASE_POS 24 -#define ACR_MASK_POS 16 -#define ACR_ENABLE (1<<15) -#define ACR_USER (0<<13) -#define ACR_SUPER (1<<13) -#define ACR_ANY (2<<13) -#define ACR_CM_WTHRU (0<<5) -#define ACR_CM_WBACK (1<<5) -#define ACR_CM_OFF_PRE (2<<5) -#define ACR_CM_OFF_IMP (3<<5) -#define ACR_WPROTECT (1<<2) - -/********************************************************************* - * - * Inter-IC (I2C) Module - * - *********************************************************************/ - -/* Read/Write access macros for general use */ -#define MCF532x_I2C_I2ADR (volatile u8 *) (0xFC058000) // Address -#define MCF532x_I2C_I2FDR (volatile u8 *) (0xFC058004) // Freq Divider -#define MCF532x_I2C_I2CR (volatile u8 *) (0xFC058008) // Control -#define MCF532x_I2C_I2SR (volatile u8 *) (0xFC05800C) // Status -#define MCF532x_I2C_I2DR (volatile u8 *) (0xFC058010) // Data I/O - -/* Bit level definitions and macros */ -#define MCF532x_I2C_I2ADR_ADDR(x) (((x)&0x7F)<<0x01) - -#define MCF532x_I2C_I2FDR_IC(x) (((x)&0x3F)) - -#define MCF532x_I2C_I2CR_IEN (0x80) // I2C enable -#define MCF532x_I2C_I2CR_IIEN (0x40) // interrupt enable -#define MCF532x_I2C_I2CR_MSTA (0x20) // master/slave mode -#define MCF532x_I2C_I2CR_MTX (0x10) // transmit/receive mode -#define MCF532x_I2C_I2CR_TXAK (0x08) // transmit acknowledge enable -#define MCF532x_I2C_I2CR_RSTA (0x04) // repeat start - -#define MCF532x_I2C_I2SR_ICF (0x80) // data transfer bit -#define MCF532x_I2C_I2SR_IAAS (0x40) // I2C addressed as a slave -#define MCF532x_I2C_I2SR_IBB (0x20) // I2C bus busy -#define MCF532x_I2C_I2SR_IAL (0x10) // aribitration lost -#define MCF532x_I2C_I2SR_SRW (0x04) // slave read/write -#define MCF532x_I2C_I2SR_IIF (0x02) // I2C interrupt -#define MCF532x_I2C_I2SR_RXAK (0x01) // received acknowledge - -#define MCF532x_PAR_FECI2C (volatile u8 *) (0xFC0A4053) - - -/* - * The M5329EVB board needs a help getting its devices initialized - * at kernel start time if dBUG doesn't set it up (for example - * it is not used), so we need to do it manually. - */ -#ifdef __ASSEMBLER__ -.macro m5329EVB_setup - movel #0xFC098000, %a7 - movel #0x0, (%a7) -#define CORE_SRAM 0x80000000 -#define CORE_SRAM_SIZE 0x8000 - movel #CORE_SRAM, %d0 - addl #0x221, %d0 - movec %d0,%RAMBAR1 - movel #CORE_SRAM, %sp - addl #CORE_SRAM_SIZE, %sp - jsr sysinit -.endm -#define PLATFORM_SETUP m5329EVB_setup - -#endif /* __ASSEMBLER__ */ - -/********************************************************************* - * - * Chip Configuration Module (CCM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_CCM_CCR MCF_REG16(0xFC0A0004) -#define MCF_CCM_RCON MCF_REG16(0xFC0A0008) -#define MCF_CCM_CIR MCF_REG16(0xFC0A000A) -#define MCF_CCM_MISCCR MCF_REG16(0xFC0A0010) -#define MCF_CCM_CDR MCF_REG16(0xFC0A0012) -#define MCF_CCM_UHCSR MCF_REG16(0xFC0A0014) -#define MCF_CCM_UOCSR MCF_REG16(0xFC0A0016) - -/* Bit definitions and macros for MCF_CCM_CCR */ -#define MCF_CCM_CCR_RESERVED (0x0001) -#define MCF_CCM_CCR_PLL_MODE (0x0003) -#define MCF_CCM_CCR_OSC_MODE (0x0005) -#define MCF_CCM_CCR_BOOTPS(x) (((x)&0x0003)<<3|0x0001) -#define MCF_CCM_CCR_LOAD (0x0021) -#define MCF_CCM_CCR_LIMP (0x0041) -#define MCF_CCM_CCR_CSC(x) (((x)&0x0003)<<8|0x0001) - -/* Bit definitions and macros for MCF_CCM_RCON */ -#define MCF_CCM_RCON_RESERVED (0x0001) -#define MCF_CCM_RCON_PLL_MODE (0x0003) -#define MCF_CCM_RCON_OSC_MODE (0x0005) -#define MCF_CCM_RCON_BOOTPS(x) (((x)&0x0003)<<3|0x0001) -#define MCF_CCM_RCON_LOAD (0x0021) -#define MCF_CCM_RCON_LIMP (0x0041) -#define MCF_CCM_RCON_CSC(x) (((x)&0x0003)<<8|0x0001) - -/* Bit definitions and macros for MCF_CCM_CIR */ -#define MCF_CCM_CIR_PRN(x) (((x)&0x003F)<<0) -#define MCF_CCM_CIR_PIN(x) (((x)&0x03FF)<<6) - -/* Bit definitions and macros for MCF_CCM_MISCCR */ -#define MCF_CCM_MISCCR_USBSRC (0x0001) -#define MCF_CCM_MISCCR_USBDIV (0x0002) -#define MCF_CCM_MISCCR_SSI_SRC (0x0010) -#define MCF_CCM_MISCCR_TIM_DMA (0x0020) -#define MCF_CCM_MISCCR_SSI_PUS (0x0040) -#define MCF_CCM_MISCCR_SSI_PUE (0x0080) -#define MCF_CCM_MISCCR_LCD_CHEN (0x0100) -#define MCF_CCM_MISCCR_LIMP (0x1000) -#define MCF_CCM_MISCCR_PLL_LOCK (0x2000) - -/* Bit definitions and macros for MCF_CCM_CDR */ -#define MCF_CCM_CDR_SSIDIV(x) (((x)&0x000F)<<0) -#define MCF_CCM_CDR_LPDIV(x) (((x)&0x000F)<<8) - -/* Bit definitions and macros for MCF_CCM_UHCSR */ -#define MCF_CCM_UHCSR_XPDE (0x0001) -#define MCF_CCM_UHCSR_UHMIE (0x0002) -#define MCF_CCM_UHCSR_WKUP (0x0004) -#define MCF_CCM_UHCSR_PORTIND(x) (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_CCM_UOCSR */ -#define MCF_CCM_UOCSR_XPDE (0x0001) -#define MCF_CCM_UOCSR_UOMIE (0x0002) -#define MCF_CCM_UOCSR_WKUP (0x0004) -#define MCF_CCM_UOCSR_PWRFLT (0x0008) -#define MCF_CCM_UOCSR_SEND (0x0010) -#define MCF_CCM_UOCSR_VVLD (0x0020) -#define MCF_CCM_UOCSR_BVLD (0x0040) -#define MCF_CCM_UOCSR_AVLD (0x0080) -#define MCF_CCM_UOCSR_DPPU (0x0100) -#define MCF_CCM_UOCSR_DCR_VBUS (0x0200) -#define MCF_CCM_UOCSR_CRG_VBUS (0x0400) -#define MCF_CCM_UOCSR_DRV_VBUS (0x0800) -#define MCF_CCM_UOCSR_DMPD (0x1000) -#define MCF_CCM_UOCSR_DPPD (0x2000) -#define MCF_CCM_UOCSR_PORTIND(x) (((x)&0x0003)<<14) - -/********************************************************************* - * - * DMA Timers (DTIM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_DTIM0_DTMR MCF_REG16(0xFC070000) -#define MCF_DTIM0_DTXMR MCF_REG08(0xFC070002) -#define MCF_DTIM0_DTER MCF_REG08(0xFC070003) -#define MCF_DTIM0_DTRR MCF_REG32(0xFC070004) -#define MCF_DTIM0_DTCR MCF_REG32(0xFC070008) -#define MCF_DTIM0_DTCN MCF_REG32(0xFC07000C) -#define MCF_DTIM1_DTMR MCF_REG16(0xFC074000) -#define MCF_DTIM1_DTXMR MCF_REG08(0xFC074002) -#define MCF_DTIM1_DTER MCF_REG08(0xFC074003) -#define MCF_DTIM1_DTRR MCF_REG32(0xFC074004) -#define MCF_DTIM1_DTCR MCF_REG32(0xFC074008) -#define MCF_DTIM1_DTCN MCF_REG32(0xFC07400C) -#define MCF_DTIM2_DTMR MCF_REG16(0xFC078000) -#define MCF_DTIM2_DTXMR MCF_REG08(0xFC078002) -#define MCF_DTIM2_DTER MCF_REG08(0xFC078003) -#define MCF_DTIM2_DTRR MCF_REG32(0xFC078004) -#define MCF_DTIM2_DTCR MCF_REG32(0xFC078008) -#define MCF_DTIM2_DTCN MCF_REG32(0xFC07800C) -#define MCF_DTIM3_DTMR MCF_REG16(0xFC07C000) -#define MCF_DTIM3_DTXMR MCF_REG08(0xFC07C002) -#define MCF_DTIM3_DTER MCF_REG08(0xFC07C003) -#define MCF_DTIM3_DTRR MCF_REG32(0xFC07C004) -#define MCF_DTIM3_DTCR MCF_REG32(0xFC07C008) -#define MCF_DTIM3_DTCN MCF_REG32(0xFC07C00C) -#define MCF_DTIM_DTMR(x) MCF_REG16(0xFC070000+((x)*0x4000)) -#define MCF_DTIM_DTXMR(x) MCF_REG08(0xFC070002+((x)*0x4000)) -#define MCF_DTIM_DTER(x) MCF_REG08(0xFC070003+((x)*0x4000)) -#define MCF_DTIM_DTRR(x) MCF_REG32(0xFC070004+((x)*0x4000)) -#define MCF_DTIM_DTCR(x) MCF_REG32(0xFC070008+((x)*0x4000)) -#define MCF_DTIM_DTCN(x) MCF_REG32(0xFC07000C+((x)*0x4000)) - -/* Bit definitions and macros for MCF_DTIM_DTMR */ -#define MCF_DTIM_DTMR_RST (0x0001) -#define MCF_DTIM_DTMR_CLK(x) (((x)&0x0003)<<1) -#define MCF_DTIM_DTMR_FRR (0x0008) -#define MCF_DTIM_DTMR_ORRI (0x0010) -#define MCF_DTIM_DTMR_OM (0x0020) -#define MCF_DTIM_DTMR_CE(x) (((x)&0x0003)<<6) -#define MCF_DTIM_DTMR_PS(x) (((x)&0x00FF)<<8) -#define MCF_DTIM_DTMR_CE_ANY (0x00C0) -#define MCF_DTIM_DTMR_CE_FALL (0x0080) -#define MCF_DTIM_DTMR_CE_RISE (0x0040) -#define MCF_DTIM_DTMR_CE_NONE (0x0000) -#define MCF_DTIM_DTMR_CLK_DTIN (0x0006) -#define MCF_DTIM_DTMR_CLK_DIV16 (0x0004) -#define MCF_DTIM_DTMR_CLK_DIV1 (0x0002) -#define MCF_DTIM_DTMR_CLK_STOP (0x0000) - -/* Bit definitions and macros for MCF_DTIM_DTXMR */ -#define MCF_DTIM_DTXMR_MODE16 (0x01) -#define MCF_DTIM_DTXMR_DMAEN (0x80) - -/* Bit definitions and macros for MCF_DTIM_DTER */ -#define MCF_DTIM_DTER_CAP (0x01) -#define MCF_DTIM_DTER_REF (0x02) - -/* Bit definitions and macros for MCF_DTIM_DTRR */ -#define MCF_DTIM_DTRR_REF(x) (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_DTIM_DTCR */ -#define MCF_DTIM_DTCR_CAP(x) (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_DTIM_DTCN */ -#define MCF_DTIM_DTCN_CNT(x) (((x)&0xFFFFFFFF)<<0) - -/********************************************************************* - * - * FlexBus Chip Selects (FBCS) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_FBCS0_CSAR MCF_REG32(0xFC008000) -#define MCF_FBCS0_CSMR MCF_REG32(0xFC008004) -#define MCF_FBCS0_CSCR MCF_REG32(0xFC008008) -#define MCF_FBCS1_CSAR MCF_REG32(0xFC00800C) -#define MCF_FBCS1_CSMR MCF_REG32(0xFC008010) -#define MCF_FBCS1_CSCR MCF_REG32(0xFC008014) -#define MCF_FBCS2_CSAR MCF_REG32(0xFC008018) -#define MCF_FBCS2_CSMR MCF_REG32(0xFC00801C) -#define MCF_FBCS2_CSCR MCF_REG32(0xFC008020) -#define MCF_FBCS3_CSAR MCF_REG32(0xFC008024) -#define MCF_FBCS3_CSMR MCF_REG32(0xFC008028) -#define MCF_FBCS3_CSCR MCF_REG32(0xFC00802C) -#define MCF_FBCS4_CSAR MCF_REG32(0xFC008030) -#define MCF_FBCS4_CSMR MCF_REG32(0xFC008034) -#define MCF_FBCS4_CSCR MCF_REG32(0xFC008038) -#define MCF_FBCS5_CSAR MCF_REG32(0xFC00803C) -#define MCF_FBCS5_CSMR MCF_REG32(0xFC008040) -#define MCF_FBCS5_CSCR MCF_REG32(0xFC008044) -#define MCF_FBCS_CSAR(x) MCF_REG32(0xFC008000+((x)*0x00C)) -#define MCF_FBCS_CSMR(x) MCF_REG32(0xFC008004+((x)*0x00C)) -#define MCF_FBCS_CSCR(x) MCF_REG32(0xFC008008+((x)*0x00C)) - -/* Bit definitions and macros for MCF_FBCS_CSAR */ -#define MCF_FBCS_CSAR_BA(x) ((x)&0xFFFF0000) - -/* Bit definitions and macros for MCF_FBCS_CSMR */ -#define MCF_FBCS_CSMR_V (0x00000001) -#define MCF_FBCS_CSMR_WP (0x00000100) -#define MCF_FBCS_CSMR_BAM(x) (((x)&0x0000FFFF)<<16) -#define MCF_FBCS_CSMR_BAM_4G (0xFFFF0000) -#define MCF_FBCS_CSMR_BAM_2G (0x7FFF0000) -#define MCF_FBCS_CSMR_BAM_1G (0x3FFF0000) -#define MCF_FBCS_CSMR_BAM_1024M (0x3FFF0000) -#define MCF_FBCS_CSMR_BAM_512M (0x1FFF0000) -#define MCF_FBCS_CSMR_BAM_256M (0x0FFF0000) -#define MCF_FBCS_CSMR_BAM_128M (0x07FF0000) -#define MCF_FBCS_CSMR_BAM_64M (0x03FF0000) -#define MCF_FBCS_CSMR_BAM_32M (0x01FF0000) -#define MCF_FBCS_CSMR_BAM_16M (0x00FF0000) -#define MCF_FBCS_CSMR_BAM_8M (0x007F0000) -#define MCF_FBCS_CSMR_BAM_4M (0x003F0000) -#define MCF_FBCS_CSMR_BAM_2M (0x001F0000) -#define MCF_FBCS_CSMR_BAM_1M (0x000F0000) -#define MCF_FBCS_CSMR_BAM_1024K (0x000F0000) -#define MCF_FBCS_CSMR_BAM_512K (0x00070000) -#define MCF_FBCS_CSMR_BAM_256K (0x00030000) -#define MCF_FBCS_CSMR_BAM_128K (0x00010000) -#define MCF_FBCS_CSMR_BAM_64K (0x00000000) - -/* Bit definitions and macros for MCF_FBCS_CSCR */ -#define MCF_FBCS_CSCR_BSTW (0x00000008) -#define MCF_FBCS_CSCR_BSTR (0x00000010) -#define MCF_FBCS_CSCR_BEM (0x00000020) -#define MCF_FBCS_CSCR_PS(x) (((x)&0x00000003)<<6) -#define MCF_FBCS_CSCR_AA (0x00000100) -#define MCF_FBCS_CSCR_SBM (0x00000200) -#define MCF_FBCS_CSCR_WS(x) (((x)&0x0000003F)<<10) -#define MCF_FBCS_CSCR_WRAH(x) (((x)&0x00000003)<<16) -#define MCF_FBCS_CSCR_RDAH(x) (((x)&0x00000003)<<18) -#define MCF_FBCS_CSCR_ASET(x) (((x)&0x00000003)<<20) -#define MCF_FBCS_CSCR_SWSEN (0x00800000) -#define MCF_FBCS_CSCR_SWS(x) (((x)&0x0000003F)<<26) -#define MCF_FBCS_CSCR_PS_8 (0x0040) -#define MCF_FBCS_CSCR_PS_16 (0x0080) -#define MCF_FBCS_CSCR_PS_32 (0x0000) - -/********************************************************************* - * - * General Purpose I/O (GPIO) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_GPIO_PODR_FECH MCF_REG08(0xFC0A4000) -#define MCF_GPIO_PODR_FECL MCF_REG08(0xFC0A4001) -#define MCF_GPIO_PODR_SSI MCF_REG08(0xFC0A4002) -#define MCF_GPIO_PODR_BUSCTL MCF_REG08(0xFC0A4003) -#define MCF_GPIO_PODR_BE MCF_REG08(0xFC0A4004) -#define MCF_GPIO_PODR_CS MCF_REG08(0xFC0A4005) -#define MCF_GPIO_PODR_PWM MCF_REG08(0xFC0A4006) -#define MCF_GPIO_PODR_FECI2C MCF_REG08(0xFC0A4007) -#define MCF_GPIO_PODR_UART MCF_REG08(0xFC0A4009) -#define MCF_GPIO_PODR_QSPI MCF_REG08(0xFC0A400A) -#define MCF_GPIO_PODR_TIMER MCF_REG08(0xFC0A400B) -#define MCF_GPIO_PODR_LCDDATAH MCF_REG08(0xFC0A400D) -#define MCF_GPIO_PODR_LCDDATAM MCF_REG08(0xFC0A400E) -#define MCF_GPIO_PODR_LCDDATAL MCF_REG08(0xFC0A400F) -#define MCF_GPIO_PODR_LCDCTLH MCF_REG08(0xFC0A4010) -#define MCF_GPIO_PODR_LCDCTLL MCF_REG08(0xFC0A4011) -#define MCF_GPIO_PDDR_FECH MCF_REG08(0xFC0A4014) -#define MCF_GPIO_PDDR_FECL MCF_REG08(0xFC0A4015) -#define MCF_GPIO_PDDR_SSI MCF_REG08(0xFC0A4016) -#define MCF_GPIO_PDDR_BUSCTL MCF_REG08(0xFC0A4017) -#define MCF_GPIO_PDDR_BE MCF_REG08(0xFC0A4018) -#define MCF_GPIO_PDDR_CS MCF_REG08(0xFC0A4019) -#define MCF_GPIO_PDDR_PWM MCF_REG08(0xFC0A401A) -#define MCF_GPIO_PDDR_FECI2C MCF_REG08(0xFC0A401B) -#define MCF_GPIO_PDDR_UART MCF_REG08(0xFC0A401C) -#define MCF_GPIO_PDDR_QSPI MCF_REG08(0xFC0A401E) -#define MCF_GPIO_PDDR_TIMER MCF_REG08(0xFC0A401F) -#define MCF_GPIO_PDDR_LCDDATAH MCF_REG08(0xFC0A4021) -#define MCF_GPIO_PDDR_LCDDATAM MCF_REG08(0xFC0A4022) -#define MCF_GPIO_PDDR_LCDDATAL MCF_REG08(0xFC0A4023) -#define MCF_GPIO_PDDR_LCDCTLH MCF_REG08(0xFC0A4024) -#define MCF_GPIO_PDDR_LCDCTLL MCF_REG08(0xFC0A4025) -#define MCF_GPIO_PPDSDR_FECH MCF_REG08(0xFC0A4028) -#define MCF_GPIO_PPDSDR_FECL MCF_REG08(0xFC0A4029) -#define MCF_GPIO_PPDSDR_SSI MCF_REG08(0xFC0A402A) -#define MCF_GPIO_PPDSDR_BUSCTL MCF_REG08(0xFC0A402B) -#define MCF_GPIO_PPDSDR_BE MCF_REG08(0xFC0A402C) -#define MCF_GPIO_PPDSDR_CS MCF_REG08(0xFC0A402D) -#define MCF_GPIO_PPDSDR_PWM MCF_REG08(0xFC0A402E) -#define MCF_GPIO_PPDSDR_FECI2C MCF_REG08(0xFC0A402F) -#define MCF_GPIO_PPDSDR_UART MCF_REG08(0xFC0A4031) -#define MCF_GPIO_PPDSDR_QSPI MCF_REG08(0xFC0A4032) -#define MCF_GPIO_PPDSDR_TIMER MCF_REG08(0xFC0A4033) -#define MCF_GPIO_PPDSDR_LCDDATAH MCF_REG08(0xFC0A4035) -#define MCF_GPIO_PPDSDR_LCDDATAM MCF_REG08(0xFC0A4036) -#define MCF_GPIO_PPDSDR_LCDDATAL MCF_REG08(0xFC0A4037) -#define MCF_GPIO_PPDSDR_LCDCTLH MCF_REG08(0xFC0A4038) -#define MCF_GPIO_PPDSDR_LCDCTLL MCF_REG08(0xFC0A4039) -#define MCF_GPIO_PCLRR_FECH MCF_REG08(0xFC0A403C) -#define MCF_GPIO_PCLRR_FECL MCF_REG08(0xFC0A403D) -#define MCF_GPIO_PCLRR_SSI MCF_REG08(0xFC0A403E) -#define MCF_GPIO_PCLRR_BUSCTL MCF_REG08(0xFC0A403F) -#define MCF_GPIO_PCLRR_BE MCF_REG08(0xFC0A4040) -#define MCF_GPIO_PCLRR_CS MCF_REG08(0xFC0A4041) -#define MCF_GPIO_PCLRR_PWM MCF_REG08(0xFC0A4042) -#define MCF_GPIO_PCLRR_FECI2C MCF_REG08(0xFC0A4043) -#define MCF_GPIO_PCLRR_UART MCF_REG08(0xFC0A4045) -#define MCF_GPIO_PCLRR_QSPI MCF_REG08(0xFC0A4046) -#define MCF_GPIO_PCLRR_TIMER MCF_REG08(0xFC0A4047) -#define MCF_GPIO_PCLRR_LCDDATAH MCF_REG08(0xFC0A4049) -#define MCF_GPIO_PCLRR_LCDDATAM MCF_REG08(0xFC0A404A) -#define MCF_GPIO_PCLRR_LCDDATAL MCF_REG08(0xFC0A404B) -#define MCF_GPIO_PCLRR_LCDCTLH MCF_REG08(0xFC0A404C) -#define MCF_GPIO_PCLRR_LCDCTLL MCF_REG08(0xFC0A404D) -#define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) -#define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) -#define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) -#define MCF_GPIO_PAR_FECI2C MCF_REG08(0xFC0A4053) -#define MCF_GPIO_PAR_BE MCF_REG08(0xFC0A4054) -#define MCF_GPIO_PAR_CS MCF_REG08(0xFC0A4055) -#define MCF_GPIO_PAR_SSI MCF_REG16(0xFC0A4056) -#define MCF_GPIO_PAR_UART MCF_REG16(0xFC0A4058) -#define MCF_GPIO_PAR_QSPI MCF_REG16(0xFC0A405A) -#define MCF_GPIO_PAR_TIMER MCF_REG08(0xFC0A405C) -#define MCF_GPIO_PAR_LCDDATA MCF_REG08(0xFC0A405D) -#define MCF_GPIO_PAR_LCDCTL MCF_REG16(0xFC0A405E) -#define MCF_GPIO_PAR_IRQ MCF_REG16(0xFC0A4060) -#define MCF_GPIO_MSCR_FLEXBUS MCF_REG08(0xFC0A4064) -#define MCF_GPIO_MSCR_SDRAM MCF_REG08(0xFC0A4065) -#define MCF_GPIO_DSCR_I2C MCF_REG08(0xFC0A4068) -#define MCF_GPIO_DSCR_PWM MCF_REG08(0xFC0A4069) -#define MCF_GPIO_DSCR_FEC MCF_REG08(0xFC0A406A) -#define MCF_GPIO_DSCR_UART MCF_REG08(0xFC0A406B) -#define MCF_GPIO_DSCR_QSPI MCF_REG08(0xFC0A406C) -#define MCF_GPIO_DSCR_TIMER MCF_REG08(0xFC0A406D) -#define MCF_GPIO_DSCR_SSI MCF_REG08(0xFC0A406E) -#define MCF_GPIO_DSCR_LCD MCF_REG08(0xFC0A406F) -#define MCF_GPIO_DSCR_DEBUG MCF_REG08(0xFC0A4070) -#define MCF_GPIO_DSCR_CLKRST MCF_REG08(0xFC0A4071) -#define MCF_GPIO_DSCR_IRQ MCF_REG08(0xFC0A4072) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECH */ -#define MCF_GPIO_PODR_FECH_PODR_FECH0 (0x01) -#define MCF_GPIO_PODR_FECH_PODR_FECH1 (0x02) -#define MCF_GPIO_PODR_FECH_PODR_FECH2 (0x04) -#define MCF_GPIO_PODR_FECH_PODR_FECH3 (0x08) -#define MCF_GPIO_PODR_FECH_PODR_FECH4 (0x10) -#define MCF_GPIO_PODR_FECH_PODR_FECH5 (0x20) -#define MCF_GPIO_PODR_FECH_PODR_FECH6 (0x40) -#define MCF_GPIO_PODR_FECH_PODR_FECH7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECL */ -#define MCF_GPIO_PODR_FECL_PODR_FECL0 (0x01) -#define MCF_GPIO_PODR_FECL_PODR_FECL1 (0x02) -#define MCF_GPIO_PODR_FECL_PODR_FECL2 (0x04) -#define MCF_GPIO_PODR_FECL_PODR_FECL3 (0x08) -#define MCF_GPIO_PODR_FECL_PODR_FECL4 (0x10) -#define MCF_GPIO_PODR_FECL_PODR_FECL5 (0x20) -#define MCF_GPIO_PODR_FECL_PODR_FECL6 (0x40) -#define MCF_GPIO_PODR_FECL_PODR_FECL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_SSI */ -#define MCF_GPIO_PODR_SSI_PODR_SSI0 (0x01) -#define MCF_GPIO_PODR_SSI_PODR_SSI1 (0x02) -#define MCF_GPIO_PODR_SSI_PODR_SSI2 (0x04) -#define MCF_GPIO_PODR_SSI_PODR_SSI3 (0x08) -#define MCF_GPIO_PODR_SSI_PODR_SSI4 (0x10) - -/* Bit definitions and macros for MCF_GPIO_PODR_BUSCTL */ -#define MCF_GPIO_PODR_BUSCTL_POSDR_BUSCTL0 (0x01) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL1 (0x02) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL2 (0x04) -#define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_BE */ -#define MCF_GPIO_PODR_BE_PODR_BE0 (0x01) -#define MCF_GPIO_PODR_BE_PODR_BE1 (0x02) -#define MCF_GPIO_PODR_BE_PODR_BE2 (0x04) -#define MCF_GPIO_PODR_BE_PODR_BE3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_CS */ -#define MCF_GPIO_PODR_CS_PODR_CS1 (0x02) -#define MCF_GPIO_PODR_CS_PODR_CS2 (0x04) -#define MCF_GPIO_PODR_CS_PODR_CS3 (0x08) -#define MCF_GPIO_PODR_CS_PODR_CS4 (0x10) -#define MCF_GPIO_PODR_CS_PODR_CS5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_PWM */ -#define MCF_GPIO_PODR_PWM_PODR_PWM2 (0x04) -#define MCF_GPIO_PODR_PWM_PODR_PWM3 (0x08) -#define MCF_GPIO_PODR_PWM_PODR_PWM4 (0x10) -#define MCF_GPIO_PODR_PWM_PODR_PWM5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_FECI2C */ -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C0 (0x01) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C1 (0x02) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C2 (0x04) -#define MCF_GPIO_PODR_FECI2C_PODR_FECI2C3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_UART */ -#define MCF_GPIO_PODR_UART_PODR_UART0 (0x01) -#define MCF_GPIO_PODR_UART_PODR_UART1 (0x02) -#define MCF_GPIO_PODR_UART_PODR_UART2 (0x04) -#define MCF_GPIO_PODR_UART_PODR_UART3 (0x08) -#define MCF_GPIO_PODR_UART_PODR_UART4 (0x10) -#define MCF_GPIO_PODR_UART_PODR_UART5 (0x20) -#define MCF_GPIO_PODR_UART_PODR_UART6 (0x40) -#define MCF_GPIO_PODR_UART_PODR_UART7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_QSPI */ -#define MCF_GPIO_PODR_QSPI_PODR_QSPI0 (0x01) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI1 (0x02) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI2 (0x04) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI3 (0x08) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI4 (0x10) -#define MCF_GPIO_PODR_QSPI_PODR_QSPI5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PODR_TIMER */ -#define MCF_GPIO_PODR_TIMER_PODR_TIMER0 (0x01) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER1 (0x02) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER2 (0x04) -#define MCF_GPIO_PODR_TIMER_PODR_TIMER3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAH */ -#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH0 (0x01) -#define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH1 (0x02) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAM */ -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM0 (0x01) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM1 (0x02) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM2 (0x04) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM3 (0x08) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM4 (0x10) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM5 (0x20) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM6 (0x40) -#define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAL */ -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL0 (0x01) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL1 (0x02) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL2 (0x04) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL3 (0x08) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL4 (0x10) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL5 (0x20) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL6 (0x40) -#define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLH */ -#define MCF_GPIO_PODR_LCDCTLH_PODR_LCDCTLH0 (0x01) - -/* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLL */ -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL0 (0x01) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL1 (0x02) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL2 (0x04) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL3 (0x08) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL4 (0x10) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL5 (0x20) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL6 (0x40) -#define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECH */ -#define MCF_GPIO_PDDR_FECH_PDDR_FECH0 (0x01) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH1 (0x02) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH2 (0x04) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH3 (0x08) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH4 (0x10) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH5 (0x20) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH6 (0x40) -#define MCF_GPIO_PDDR_FECH_PDDR_FECH7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECL */ -#define MCF_GPIO_PDDR_FECL_PDDR_FECL0 (0x01) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL1 (0x02) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL2 (0x04) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL3 (0x08) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL4 (0x10) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL5 (0x20) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL6 (0x40) -#define MCF_GPIO_PDDR_FECL_PDDR_FECL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_SSI */ -#define MCF_GPIO_PDDR_SSI_PDDR_SSI0 (0x01) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI1 (0x02) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI2 (0x04) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI3 (0x08) -#define MCF_GPIO_PDDR_SSI_PDDR_SSI4 (0x10) - -/* Bit definitions and macros for MCF_GPIO_PDDR_BUSCTL */ -#define MCF_GPIO_PDDR_BUSCTL_POSDR_BUSCTL0 (0x01) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL1 (0x02) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL2 (0x04) -#define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_BE */ -#define MCF_GPIO_PDDR_BE_PDDR_BE0 (0x01) -#define MCF_GPIO_PDDR_BE_PDDR_BE1 (0x02) -#define MCF_GPIO_PDDR_BE_PDDR_BE2 (0x04) -#define MCF_GPIO_PDDR_BE_PDDR_BE3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_CS */ -#define MCF_GPIO_PDDR_CS_PDDR_CS1 (0x02) -#define MCF_GPIO_PDDR_CS_PDDR_CS2 (0x04) -#define MCF_GPIO_PDDR_CS_PDDR_CS3 (0x08) -#define MCF_GPIO_PDDR_CS_PDDR_CS4 (0x10) -#define MCF_GPIO_PDDR_CS_PDDR_CS5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_PWM */ -#define MCF_GPIO_PDDR_PWM_PDDR_PWM2 (0x04) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM3 (0x08) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM4 (0x10) -#define MCF_GPIO_PDDR_PWM_PDDR_PWM5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_FECI2C */ -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C0 (0x01) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C1 (0x02) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C2 (0x04) -#define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_UART */ -#define MCF_GPIO_PDDR_UART_PDDR_UART0 (0x01) -#define MCF_GPIO_PDDR_UART_PDDR_UART1 (0x02) -#define MCF_GPIO_PDDR_UART_PDDR_UART2 (0x04) -#define MCF_GPIO_PDDR_UART_PDDR_UART3 (0x08) -#define MCF_GPIO_PDDR_UART_PDDR_UART4 (0x10) -#define MCF_GPIO_PDDR_UART_PDDR_UART5 (0x20) -#define MCF_GPIO_PDDR_UART_PDDR_UART6 (0x40) -#define MCF_GPIO_PDDR_UART_PDDR_UART7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_QSPI */ -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI0 (0x01) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI1 (0x02) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI2 (0x04) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI3 (0x08) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI4 (0x10) -#define MCF_GPIO_PDDR_QSPI_PDDR_QSPI5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PDDR_TIMER */ -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER0 (0x01) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER1 (0x02) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER2 (0x04) -#define MCF_GPIO_PDDR_TIMER_PDDR_TIMER3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAH */ -#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH0 (0x01) -#define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH1 (0x02) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAM */ -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM0 (0x01) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM1 (0x02) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM2 (0x04) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM3 (0x08) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM4 (0x10) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM5 (0x20) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM6 (0x40) -#define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAL */ -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL0 (0x01) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL1 (0x02) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL2 (0x04) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL3 (0x08) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL4 (0x10) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL5 (0x20) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL6 (0x40) -#define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLH */ -#define MCF_GPIO_PDDR_LCDCTLH_PDDR_LCDCTLH0 (0x01) - -/* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLL */ -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL0 (0x01) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL1 (0x02) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL2 (0x04) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL3 (0x08) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL4 (0x10) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL5 (0x20) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL6 (0x40) -#define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECH */ -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH0 (0x01) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH1 (0x02) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH2 (0x04) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH3 (0x08) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH4 (0x10) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH5 (0x20) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH6 (0x40) -#define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECL */ -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL0 (0x01) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL1 (0x02) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL2 (0x04) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL3 (0x08) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL4 (0x10) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL5 (0x20) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL6 (0x40) -#define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_SSI */ -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI0 (0x01) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI1 (0x02) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI2 (0x04) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI3 (0x08) -#define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI4 (0x10) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_BUSCTL */ -#define MCF_GPIO_PPDSDR_BUSCTL_POSDR_BUSCTL0 (0x01) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL1 (0x02) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL2 (0x04) -#define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_BE */ -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE0 (0x01) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE1 (0x02) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE2 (0x04) -#define MCF_GPIO_PPDSDR_BE_PPDSDR_BE3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_CS */ -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS1 (0x02) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS2 (0x04) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS3 (0x08) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS4 (0x10) -#define MCF_GPIO_PPDSDR_CS_PPDSDR_CS5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_PWM */ -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM2 (0x04) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM3 (0x08) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM4 (0x10) -#define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_FECI2C */ -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C0 (0x01) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C1 (0x02) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C2 (0x04) -#define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_UART */ -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART0 (0x01) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART1 (0x02) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART2 (0x04) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART3 (0x08) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART4 (0x10) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART5 (0x20) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART6 (0x40) -#define MCF_GPIO_PPDSDR_UART_PPDSDR_UART7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_QSPI */ -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI0 (0x01) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI1 (0x02) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI2 (0x04) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI3 (0x08) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI4 (0x10) -#define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_TIMER */ -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER0 (0x01) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER1 (0x02) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER2 (0x04) -#define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAH */ -#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH0 (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH1 (0x02) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAM */ -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM0 (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM1 (0x02) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM2 (0x04) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM3 (0x08) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM4 (0x10) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM5 (0x20) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM6 (0x40) -#define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAL */ -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL0 (0x01) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL1 (0x02) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL2 (0x04) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL3 (0x08) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL4 (0x10) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL5 (0x20) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL6 (0x40) -#define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLH */ -#define MCF_GPIO_PPDSDR_LCDCTLH_PPDSDR_LCDCTLH0 (0x01) - -/* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLL */ -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL0 (0x01) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL1 (0x02) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL2 (0x04) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL3 (0x08) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL4 (0x10) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL5 (0x20) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL6 (0x40) -#define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECH */ -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH0 (0x01) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH1 (0x02) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH2 (0x04) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH3 (0x08) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH4 (0x10) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH5 (0x20) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH6 (0x40) -#define MCF_GPIO_PCLRR_FECH_PCLRR_FECH7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECL */ -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL0 (0x01) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL1 (0x02) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL2 (0x04) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL3 (0x08) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL4 (0x10) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL5 (0x20) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL6 (0x40) -#define MCF_GPIO_PCLRR_FECL_PCLRR_FECL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_SSI */ -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI0 (0x01) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI1 (0x02) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI2 (0x04) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI3 (0x08) -#define MCF_GPIO_PCLRR_SSI_PCLRR_SSI4 (0x10) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_BUSCTL */ -#define MCF_GPIO_PCLRR_BUSCTL_POSDR_BUSCTL0 (0x01) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL1 (0x02) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL2 (0x04) -#define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_BE */ -#define MCF_GPIO_PCLRR_BE_PCLRR_BE0 (0x01) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE1 (0x02) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE2 (0x04) -#define MCF_GPIO_PCLRR_BE_PCLRR_BE3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_CS */ -#define MCF_GPIO_PCLRR_CS_PCLRR_CS1 (0x02) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS2 (0x04) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS3 (0x08) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS4 (0x10) -#define MCF_GPIO_PCLRR_CS_PCLRR_CS5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_PWM */ -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM2 (0x04) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM3 (0x08) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM4 (0x10) -#define MCF_GPIO_PCLRR_PWM_PCLRR_PWM5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_FECI2C */ -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C0 (0x01) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C1 (0x02) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C2 (0x04) -#define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_UART */ -#define MCF_GPIO_PCLRR_UART_PCLRR_UART0 (0x01) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART1 (0x02) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART2 (0x04) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART3 (0x08) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART4 (0x10) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART5 (0x20) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART6 (0x40) -#define MCF_GPIO_PCLRR_UART_PCLRR_UART7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_QSPI */ -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI0 (0x01) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI1 (0x02) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI2 (0x04) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI3 (0x08) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI4 (0x10) -#define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI5 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_TIMER */ -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER0 (0x01) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER1 (0x02) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER2 (0x04) -#define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAH */ -#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH0 (0x01) -#define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH1 (0x02) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAM */ -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM0 (0x01) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM1 (0x02) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM2 (0x04) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM3 (0x08) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM4 (0x10) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM5 (0x20) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM6 (0x40) -#define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAL */ -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL0 (0x01) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL1 (0x02) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL2 (0x04) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL3 (0x08) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL4 (0x10) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL5 (0x20) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL6 (0x40) -#define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLH */ -#define MCF_GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0 (0x01) - -/* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLL */ -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL0 (0x01) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL1 (0x02) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL2 (0x04) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL3 (0x08) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL4 (0x10) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL5 (0x20) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL6 (0x40) -#define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL7 (0x80) - -/* Bit definitions and macros for MCF_GPIO_PAR_FEC */ -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII(x) (((x)&0x03)<<0) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W(x) (((x)&0x03)<<2) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_GPIO (0x00) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_URTS1 (0x04) -#define MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC (0x0C) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_GPIO (0x00) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_UART (0x01) -#define MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_PWM */ -#define MCF_GPIO_PAR_PWM_PAR_PWM1(x) (((x)&0x03)<<0) -#define MCF_GPIO_PAR_PWM_PAR_PWM3(x) (((x)&0x03)<<2) -#define MCF_GPIO_PAR_PWM_PAR_PWM5 (0x10) -#define MCF_GPIO_PAR_PWM_PAR_PWM7 (0x20) - -/* Bit definitions and macros for MCF_GPIO_PAR_BUSCTL */ -#define MCF_GPIO_PAR_BUSCTL_PAR_TS(x) (((x)&0x03)<<3) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB (0x20) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA (0x40) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE (0x80) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE_GPIO (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_OE_OE (0x80) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA_GPIO (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_TA_TA (0x40) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_GPIO (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_RWB_RWB (0x20) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_GPIO (0x00) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_DACK0 (0x10) -#define MCF_GPIO_PAR_BUSCTL_PAR_TS_TS (0x18) - -/* Bit definitions and macros for MCF_GPIO_PAR_FECI2C */ -#define MCF_GPIO_PAR_FECI2C_PAR_SDA(x) (((x)&0x03)<<0) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL(x) (((x)&0x03)<<2) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO(x) (((x)&0x03)<<4) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC(x) (((x)&0x03)<<6) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_GPIO (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_UTXD2 (0x40) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_SCL (0x80) -#define MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC (0xC0) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_GPIO (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_URXD2 (0x10) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_SDA (0x20) -#define MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO (0x30) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_GPIO (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) -#define MCF_GPIO_PAR_FECI2C_PAR_SCL_SCL (0x0C) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_GPIO (0x00) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) -#define MCF_GPIO_PAR_FECI2C_PAR_SDA_SDA (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_BE */ -#define MCF_GPIO_PAR_BE_PAR_BE0 (0x01) -#define MCF_GPIO_PAR_BE_PAR_BE1 (0x02) -#define MCF_GPIO_PAR_BE_PAR_BE2 (0x04) -#define MCF_GPIO_PAR_BE_PAR_BE3 (0x08) - -/* Bit definitions and macros for MCF_GPIO_PAR_CS */ -#define MCF_GPIO_PAR_CS_PAR_CS1 (0x02) -#define MCF_GPIO_PAR_CS_PAR_CS2 (0x04) -#define MCF_GPIO_PAR_CS_PAR_CS3 (0x08) -#define MCF_GPIO_PAR_CS_PAR_CS4 (0x10) -#define MCF_GPIO_PAR_CS_PAR_CS5 (0x20) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_GPIO (0x00) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_SDCS1 (0x01) -#define MCF_GPIO_PAR_CS_PAR_CS_CS1_CS1 (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_SSI */ -#define MCF_GPIO_PAR_SSI_PAR_MCLK (0x0080) -#define MCF_GPIO_PAR_SSI_PAR_TXD(x) (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_SSI_PAR_RXD(x) (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_SSI_PAR_FS(x) (((x)&0x0003)<<12) -#define MCF_GPIO_PAR_SSI_PAR_BCLK(x) (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_GPIO_PAR_UART */ -#define MCF_GPIO_PAR_UART_PAR_UTXD0 (0x0001) -#define MCF_GPIO_PAR_UART_PAR_URXD0 (0x0002) -#define MCF_GPIO_PAR_UART_PAR_URTS0 (0x0004) -#define MCF_GPIO_PAR_UART_PAR_UCTS0 (0x0008) -#define MCF_GPIO_PAR_UART_PAR_UTXD1(x) (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_UART_PAR_URXD1(x) (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_UART_PAR_URTS1(x) (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_UART_PAR_UCTS1(x) (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_GPIO (0x0000) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_SSI_BCLK (0x0800) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_ULPI_D7 (0x0400) -#define MCF_GPIO_PAR_UART_PAR_UCTS1_UCTS1 (0x0C00) -#define MCF_GPIO_PAR_UART_PAR_URTS1_GPIO (0x0000) -#define MCF_GPIO_PAR_UART_PAR_URTS1_SSI_FS (0x0200) -#define MCF_GPIO_PAR_UART_PAR_URTS1_ULPI_D6 (0x0100) -#define MCF_GPIO_PAR_UART_PAR_URTS1_URTS1 (0x0300) -#define MCF_GPIO_PAR_UART_PAR_URXD1_GPIO (0x0000) -#define MCF_GPIO_PAR_UART_PAR_URXD1_SSI_RXD (0x0080) -#define MCF_GPIO_PAR_UART_PAR_URXD1_ULPI_D5 (0x0040) -#define MCF_GPIO_PAR_UART_PAR_URXD1_URXD1 (0x00C0) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_GPIO (0x0000) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_SSI_TXD (0x0020) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_ULPI_D4 (0x0010) -#define MCF_GPIO_PAR_UART_PAR_UTXD1_UTXD1 (0x0030) - -/* Bit definitions and macros for MCF_GPIO_PAR_QSPI */ -#define MCF_GPIO_PAR_QSPI_PAR_SCK(x) (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_QSPI_PAR_DOUT(x) (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_QSPI_PAR_DIN(x) (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_QSPI_PAR_PCS0(x) (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_QSPI_PAR_PCS1(x) (((x)&0x0003)<<12) -#define MCF_GPIO_PAR_QSPI_PAR_PCS2(x) (((x)&0x0003)<<14) - -/* Bit definitions and macros for MCF_GPIO_PAR_TIMER */ -#define MCF_GPIO_PAR_TIMER_PAR_TIN0(x) (((x)&0x03)<<0) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1(x) (((x)&0x03)<<2) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2(x) (((x)&0x03)<<4) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3(x) (((x)&0x03)<<6) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_GPIO (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TOUT3 (0x80) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_URXD2 (0x40) -#define MCF_GPIO_PAR_TIMER_PAR_TIN3_TIN3 (0xC0) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_GPIO (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TOUT2 (0x20) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_UTXD2 (0x10) -#define MCF_GPIO_PAR_TIMER_PAR_TIN2_TIN2 (0x30) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_GPIO (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TOUT1 (0x08) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_DACK1 (0x04) -#define MCF_GPIO_PAR_TIMER_PAR_TIN1_TIN1 (0x0C) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_GPIO (0x00) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TOUT0 (0x02) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_DREQ0 (0x01) -#define MCF_GPIO_PAR_TIMER_PAR_TIN0_TIN0 (0x03) - -/* Bit definitions and macros for MCF_GPIO_PAR_LCDDATA */ -#define MCF_GPIO_PAR_LCDDATA_PAR_LD7_0(x) (((x)&0x03)<<0) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD15_8(x) (((x)&0x03)<<2) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD16(x) (((x)&0x03)<<4) -#define MCF_GPIO_PAR_LCDDATA_PAR_LD17(x) (((x)&0x03)<<6) - -/* Bit definitions and macros for MCF_GPIO_PAR_LCDCTL */ -#define MCF_GPIO_PAR_LCDCTL_PAR_CLS (0x0001) -#define MCF_GPIO_PAR_LCDCTL_PAR_PS (0x0002) -#define MCF_GPIO_PAR_LCDCTL_PAR_REV (0x0004) -#define MCF_GPIO_PAR_LCDCTL_PAR_SPL_SPR (0x0008) -#define MCF_GPIO_PAR_LCDCTL_PAR_CONTRAST (0x0010) -#define MCF_GPIO_PAR_LCDCTL_PAR_LSCLK (0x0020) -#define MCF_GPIO_PAR_LCDCTL_PAR_LP_HSYNC (0x0040) -#define MCF_GPIO_PAR_LCDCTL_PAR_FLM_VSYNC (0x0080) -#define MCF_GPIO_PAR_LCDCTL_PAR_ACD_OE (0x0100) - -/* Bit definitions and macros for MCF_GPIO_PAR_IRQ */ -#define MCF_GPIO_PAR_IRQ_PAR_IRQ1(x) (((x)&0x0003)<<4) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ2(x) (((x)&0x0003)<<6) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ4(x) (((x)&0x0003)<<8) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ5(x) (((x)&0x0003)<<10) -#define MCF_GPIO_PAR_IRQ_PAR_IRQ6(x) (((x)&0x0003)<<12) - -/* Bit definitions and macros for MCF_GPIO_MSCR_FLEXBUS */ -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_ADDRCTL(x) (((x)&0x03)<<0) -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DLOWER(x) (((x)&0x03)<<2) -#define MCF_GPIO_MSCR_FLEXBUS_MSCR_DUPPER(x) (((x)&0x03)<<4) - -/* Bit definitions and macros for MCF_GPIO_MSCR_SDRAM */ -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDRAM(x) (((x)&0x03)<<0) -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLK(x) (((x)&0x03)<<2) -#define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLKB(x) (((x)&0x03)<<4) - -/* Bit definitions and macros for MCF_GPIO_DSCR_I2C */ -#define MCF_GPIO_DSCR_I2C_I2C_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_PWM */ -#define MCF_GPIO_DSCR_PWM_PWM_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_FEC */ -#define MCF_GPIO_DSCR_FEC_FEC_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_UART */ -#define MCF_GPIO_DSCR_UART_UART0_DSE(x) (((x)&0x03)<<0) -#define MCF_GPIO_DSCR_UART_UART1_DSE(x) (((x)&0x03)<<2) - -/* Bit definitions and macros for MCF_GPIO_DSCR_QSPI */ -#define MCF_GPIO_DSCR_QSPI_QSPI_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_TIMER */ -#define MCF_GPIO_DSCR_TIMER_TIMER_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_SSI */ -#define MCF_GPIO_DSCR_SSI_SSI_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_LCD */ -#define MCF_GPIO_DSCR_LCD_LCD_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_DEBUG */ -#define MCF_GPIO_DSCR_DEBUG_DEBUG_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_CLKRST */ -#define MCF_GPIO_DSCR_CLKRST_CLKRST_DSE(x) (((x)&0x03)<<0) - -/* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ -#define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) - -/********************************************************************* - * - * Interrupt Controller (INTC) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_INTC0_IPRH MCF_REG32(0xFC048000) -#define MCF_INTC0_IPRL MCF_REG32(0xFC048004) -#define MCF_INTC0_IMRH MCF_REG32(0xFC048008) -#define MCF_INTC0_IMRL MCF_REG32(0xFC04800C) -#define MCF_INTC0_INTFRCH MCF_REG32(0xFC048010) -#define MCF_INTC0_INTFRCL MCF_REG32(0xFC048014) -#define MCF_INTC0_ICONFIG MCF_REG16(0xFC04801A) -#define MCF_INTC0_SIMR MCF_REG08(0xFC04801C) -#define MCF_INTC0_CIMR MCF_REG08(0xFC04801D) -#define MCF_INTC0_CLMASK MCF_REG08(0xFC04801E) -#define MCF_INTC0_SLMASK MCF_REG08(0xFC04801F) -#define MCF_INTC0_ICR0 MCF_REG08(0xFC048040) -#define MCF_INTC0_ICR1 MCF_REG08(0xFC048041) -#define MCF_INTC0_ICR2 MCF_REG08(0xFC048042) -#define MCF_INTC0_ICR3 MCF_REG08(0xFC048043) -#define MCF_INTC0_ICR4 MCF_REG08(0xFC048044) -#define MCF_INTC0_ICR5 MCF_REG08(0xFC048045) -#define MCF_INTC0_ICR6 MCF_REG08(0xFC048046) -#define MCF_INTC0_ICR7 MCF_REG08(0xFC048047) -#define MCF_INTC0_ICR8 MCF_REG08(0xFC048048) -#define MCF_INTC0_ICR9 MCF_REG08(0xFC048049) -#define MCF_INTC0_ICR10 MCF_REG08(0xFC04804A) -#define MCF_INTC0_ICR11 MCF_REG08(0xFC04804B) -#define MCF_INTC0_ICR12 MCF_REG08(0xFC04804C) -#define MCF_INTC0_ICR13 MCF_REG08(0xFC04804D) -#define MCF_INTC0_ICR14 MCF_REG08(0xFC04804E) -#define MCF_INTC0_ICR15 MCF_REG08(0xFC04804F) -#define MCF_INTC0_ICR16 MCF_REG08(0xFC048050) -#define MCF_INTC0_ICR17 MCF_REG08(0xFC048051) -#define MCF_INTC0_ICR18 MCF_REG08(0xFC048052) -#define MCF_INTC0_ICR19 MCF_REG08(0xFC048053) -#define MCF_INTC0_ICR20 MCF_REG08(0xFC048054) -#define MCF_INTC0_ICR21 MCF_REG08(0xFC048055) -#define MCF_INTC0_ICR22 MCF_REG08(0xFC048056) -#define MCF_INTC0_ICR23 MCF_REG08(0xFC048057) -#define MCF_INTC0_ICR24 MCF_REG08(0xFC048058) -#define MCF_INTC0_ICR25 MCF_REG08(0xFC048059) -#define MCF_INTC0_ICR26 MCF_REG08(0xFC04805A) -#define MCF_INTC0_ICR27 MCF_REG08(0xFC04805B) -#define MCF_INTC0_ICR28 MCF_REG08(0xFC04805C) -#define MCF_INTC0_ICR29 MCF_REG08(0xFC04805D) -#define MCF_INTC0_ICR30 MCF_REG08(0xFC04805E) -#define MCF_INTC0_ICR31 MCF_REG08(0xFC04805F) -#define MCF_INTC0_ICR32 MCF_REG08(0xFC048060) -#define MCF_INTC0_ICR33 MCF_REG08(0xFC048061) -#define MCF_INTC0_ICR34 MCF_REG08(0xFC048062) -#define MCF_INTC0_ICR35 MCF_REG08(0xFC048063) -#define MCF_INTC0_ICR36 MCF_REG08(0xFC048064) -#define MCF_INTC0_ICR37 MCF_REG08(0xFC048065) -#define MCF_INTC0_ICR38 MCF_REG08(0xFC048066) -#define MCF_INTC0_ICR39 MCF_REG08(0xFC048067) -#define MCF_INTC0_ICR40 MCF_REG08(0xFC048068) -#define MCF_INTC0_ICR41 MCF_REG08(0xFC048069) -#define MCF_INTC0_ICR42 MCF_REG08(0xFC04806A) -#define MCF_INTC0_ICR43 MCF_REG08(0xFC04806B) -#define MCF_INTC0_ICR44 MCF_REG08(0xFC04806C) -#define MCF_INTC0_ICR45 MCF_REG08(0xFC04806D) -#define MCF_INTC0_ICR46 MCF_REG08(0xFC04806E) -#define MCF_INTC0_ICR47 MCF_REG08(0xFC04806F) -#define MCF_INTC0_ICR48 MCF_REG08(0xFC048070) -#define MCF_INTC0_ICR49 MCF_REG08(0xFC048071) -#define MCF_INTC0_ICR50 MCF_REG08(0xFC048072) -#define MCF_INTC0_ICR51 MCF_REG08(0xFC048073) -#define MCF_INTC0_ICR52 MCF_REG08(0xFC048074) -#define MCF_INTC0_ICR53 MCF_REG08(0xFC048075) -#define MCF_INTC0_ICR54 MCF_REG08(0xFC048076) -#define MCF_INTC0_ICR55 MCF_REG08(0xFC048077) -#define MCF_INTC0_ICR56 MCF_REG08(0xFC048078) -#define MCF_INTC0_ICR57 MCF_REG08(0xFC048079) -#define MCF_INTC0_ICR58 MCF_REG08(0xFC04807A) -#define MCF_INTC0_ICR59 MCF_REG08(0xFC04807B) -#define MCF_INTC0_ICR60 MCF_REG08(0xFC04807C) -#define MCF_INTC0_ICR61 MCF_REG08(0xFC04807D) -#define MCF_INTC0_ICR62 MCF_REG08(0xFC04807E) -#define MCF_INTC0_ICR63 MCF_REG08(0xFC04807F) -#define MCF_INTC0_ICR(x) MCF_REG08(0xFC048040+((x)*0x001)) -#define MCF_INTC0_SWIACK MCF_REG08(0xFC0480E0) -#define MCF_INTC0_L1IACK MCF_REG08(0xFC0480E4) -#define MCF_INTC0_L2IACK MCF_REG08(0xFC0480E8) -#define MCF_INTC0_L3IACK MCF_REG08(0xFC0480EC) -#define MCF_INTC0_L4IACK MCF_REG08(0xFC0480F0) -#define MCF_INTC0_L5IACK MCF_REG08(0xFC0480F4) -#define MCF_INTC0_L6IACK MCF_REG08(0xFC0480F8) -#define MCF_INTC0_L7IACK MCF_REG08(0xFC0480FC) -#define MCF_INTC0_LIACK(x) MCF_REG08(0xFC0480E4+((x)*0x004)) -#define MCF_INTC1_IPRH MCF_REG32(0xFC04C000) -#define MCF_INTC1_IPRL MCF_REG32(0xFC04C004) -#define MCF_INTC1_IMRH MCF_REG32(0xFC04C008) -#define MCF_INTC1_IMRL MCF_REG32(0xFC04C00C) -#define MCF_INTC1_INTFRCH MCF_REG32(0xFC04C010) -#define MCF_INTC1_INTFRCL MCF_REG32(0xFC04C014) -#define MCF_INTC1_ICONFIG MCF_REG16(0xFC04C01A) -#define MCF_INTC1_SIMR MCF_REG08(0xFC04C01C) -#define MCF_INTC1_CIMR MCF_REG08(0xFC04C01D) -#define MCF_INTC1_CLMASK MCF_REG08(0xFC04C01E) -#define MCF_INTC1_SLMASK MCF_REG08(0xFC04C01F) -#define MCF_INTC1_ICR0 MCF_REG08(0xFC04C040) -#define MCF_INTC1_ICR1 MCF_REG08(0xFC04C041) -#define MCF_INTC1_ICR2 MCF_REG08(0xFC04C042) -#define MCF_INTC1_ICR3 MCF_REG08(0xFC04C043) -#define MCF_INTC1_ICR4 MCF_REG08(0xFC04C044) -#define MCF_INTC1_ICR5 MCF_REG08(0xFC04C045) -#define MCF_INTC1_ICR6 MCF_REG08(0xFC04C046) -#define MCF_INTC1_ICR7 MCF_REG08(0xFC04C047) -#define MCF_INTC1_ICR8 MCF_REG08(0xFC04C048) -#define MCF_INTC1_ICR9 MCF_REG08(0xFC04C049) -#define MCF_INTC1_ICR10 MCF_REG08(0xFC04C04A) -#define MCF_INTC1_ICR11 MCF_REG08(0xFC04C04B) -#define MCF_INTC1_ICR12 MCF_REG08(0xFC04C04C) -#define MCF_INTC1_ICR13 MCF_REG08(0xFC04C04D) -#define MCF_INTC1_ICR14 MCF_REG08(0xFC04C04E) -#define MCF_INTC1_ICR15 MCF_REG08(0xFC04C04F) -#define MCF_INTC1_ICR16 MCF_REG08(0xFC04C050) -#define MCF_INTC1_ICR17 MCF_REG08(0xFC04C051) -#define MCF_INTC1_ICR18 MCF_REG08(0xFC04C052) -#define MCF_INTC1_ICR19 MCF_REG08(0xFC04C053) -#define MCF_INTC1_ICR20 MCF_REG08(0xFC04C054) -#define MCF_INTC1_ICR21 MCF_REG08(0xFC04C055) -#define MCF_INTC1_ICR22 MCF_REG08(0xFC04C056) -#define MCF_INTC1_ICR23 MCF_REG08(0xFC04C057) -#define MCF_INTC1_ICR24 MCF_REG08(0xFC04C058) -#define MCF_INTC1_ICR25 MCF_REG08(0xFC04C059) -#define MCF_INTC1_ICR26 MCF_REG08(0xFC04C05A) -#define MCF_INTC1_ICR27 MCF_REG08(0xFC04C05B) -#define MCF_INTC1_ICR28 MCF_REG08(0xFC04C05C) -#define MCF_INTC1_ICR29 MCF_REG08(0xFC04C05D) -#define MCF_INTC1_ICR30 MCF_REG08(0xFC04C05E) -#define MCF_INTC1_ICR31 MCF_REG08(0xFC04C05F) -#define MCF_INTC1_ICR32 MCF_REG08(0xFC04C060) -#define MCF_INTC1_ICR33 MCF_REG08(0xFC04C061) -#define MCF_INTC1_ICR34 MCF_REG08(0xFC04C062) -#define MCF_INTC1_ICR35 MCF_REG08(0xFC04C063) -#define MCF_INTC1_ICR36 MCF_REG08(0xFC04C064) -#define MCF_INTC1_ICR37 MCF_REG08(0xFC04C065) -#define MCF_INTC1_ICR38 MCF_REG08(0xFC04C066) -#define MCF_INTC1_ICR39 MCF_REG08(0xFC04C067) -#define MCF_INTC1_ICR40 MCF_REG08(0xFC04C068) -#define MCF_INTC1_ICR41 MCF_REG08(0xFC04C069) -#define MCF_INTC1_ICR42 MCF_REG08(0xFC04C06A) -#define MCF_INTC1_ICR43 MCF_REG08(0xFC04C06B) -#define MCF_INTC1_ICR44 MCF_REG08(0xFC04C06C) -#define MCF_INTC1_ICR45 MCF_REG08(0xFC04C06D) -#define MCF_INTC1_ICR46 MCF_REG08(0xFC04C06E) -#define MCF_INTC1_ICR47 MCF_REG08(0xFC04C06F) -#define MCF_INTC1_ICR48 MCF_REG08(0xFC04C070) -#define MCF_INTC1_ICR49 MCF_REG08(0xFC04C071) -#define MCF_INTC1_ICR50 MCF_REG08(0xFC04C072) -#define MCF_INTC1_ICR51 MCF_REG08(0xFC04C073) -#define MCF_INTC1_ICR52 MCF_REG08(0xFC04C074) -#define MCF_INTC1_ICR53 MCF_REG08(0xFC04C075) -#define MCF_INTC1_ICR54 MCF_REG08(0xFC04C076) -#define MCF_INTC1_ICR55 MCF_REG08(0xFC04C077) -#define MCF_INTC1_ICR56 MCF_REG08(0xFC04C078) -#define MCF_INTC1_ICR57 MCF_REG08(0xFC04C079) -#define MCF_INTC1_ICR58 MCF_REG08(0xFC04C07A) -#define MCF_INTC1_ICR59 MCF_REG08(0xFC04C07B) -#define MCF_INTC1_ICR60 MCF_REG08(0xFC04C07C) -#define MCF_INTC1_ICR61 MCF_REG08(0xFC04C07D) -#define MCF_INTC1_ICR62 MCF_REG08(0xFC04C07E) -#define MCF_INTC1_ICR63 MCF_REG08(0xFC04C07F) -#define MCF_INTC1_ICR(x) MCF_REG08(0xFC04C040+((x)*0x001)) -#define MCF_INTC1_SWIACK MCF_REG08(0xFC04C0E0) -#define MCF_INTC1_L1IACK MCF_REG08(0xFC04C0E4) -#define MCF_INTC1_L2IACK MCF_REG08(0xFC04C0E8) -#define MCF_INTC1_L3IACK MCF_REG08(0xFC04C0EC) -#define MCF_INTC1_L4IACK MCF_REG08(0xFC04C0F0) -#define MCF_INTC1_L5IACK MCF_REG08(0xFC04C0F4) -#define MCF_INTC1_L6IACK MCF_REG08(0xFC04C0F8) -#define MCF_INTC1_L7IACK MCF_REG08(0xFC04C0FC) -#define MCF_INTC1_LIACK(x) MCF_REG08(0xFC04C0E4+((x)*0x004)) -#define MCF_INTC_IPRH(x) MCF_REG32(0xFC048000+((x)*0x4000)) -#define MCF_INTC_IPRL(x) MCF_REG32(0xFC048004+((x)*0x4000)) -#define MCF_INTC_IMRH(x) MCF_REG32(0xFC048008+((x)*0x4000)) -#define MCF_INTC_IMRL(x) MCF_REG32(0xFC04800C+((x)*0x4000)) -#define MCF_INTC_INTFRCH(x) MCF_REG32(0xFC048010+((x)*0x4000)) -#define MCF_INTC_INTFRCL(x) MCF_REG32(0xFC048014+((x)*0x4000)) -#define MCF_INTC_ICONFIG(x) MCF_REG16(0xFC04801A+((x)*0x4000)) -#define MCF_INTC_SIMR(x) MCF_REG08(0xFC04801C+((x)*0x4000)) -#define MCF_INTC_CIMR(x) MCF_REG08(0xFC04801D+((x)*0x4000)) -#define MCF_INTC_CLMASK(x) MCF_REG08(0xFC04801E+((x)*0x4000)) -#define MCF_INTC_SLMASK(x) MCF_REG08(0xFC04801F+((x)*0x4000)) -#define MCF_INTC_ICR0(x) MCF_REG08(0xFC048040+((x)*0x4000)) -#define MCF_INTC_ICR1(x) MCF_REG08(0xFC048041+((x)*0x4000)) -#define MCF_INTC_ICR2(x) MCF_REG08(0xFC048042+((x)*0x4000)) -#define MCF_INTC_ICR3(x) MCF_REG08(0xFC048043+((x)*0x4000)) -#define MCF_INTC_ICR4(x) MCF_REG08(0xFC048044+((x)*0x4000)) -#define MCF_INTC_ICR5(x) MCF_REG08(0xFC048045+((x)*0x4000)) -#define MCF_INTC_ICR6(x) MCF_REG08(0xFC048046+((x)*0x4000)) -#define MCF_INTC_ICR7(x) MCF_REG08(0xFC048047+((x)*0x4000)) -#define MCF_INTC_ICR8(x) MCF_REG08(0xFC048048+((x)*0x4000)) -#define MCF_INTC_ICR9(x) MCF_REG08(0xFC048049+((x)*0x4000)) -#define MCF_INTC_ICR10(x) MCF_REG08(0xFC04804A+((x)*0x4000)) -#define MCF_INTC_ICR11(x) MCF_REG08(0xFC04804B+((x)*0x4000)) -#define MCF_INTC_ICR12(x) MCF_REG08(0xFC04804C+((x)*0x4000)) -#define MCF_INTC_ICR13(x) MCF_REG08(0xFC04804D+((x)*0x4000)) -#define MCF_INTC_ICR14(x) MCF_REG08(0xFC04804E+((x)*0x4000)) -#define MCF_INTC_ICR15(x) MCF_REG08(0xFC04804F+((x)*0x4000)) -#define MCF_INTC_ICR16(x) MCF_REG08(0xFC048050+((x)*0x4000)) -#define MCF_INTC_ICR17(x) MCF_REG08(0xFC048051+((x)*0x4000)) -#define MCF_INTC_ICR18(x) MCF_REG08(0xFC048052+((x)*0x4000)) -#define MCF_INTC_ICR19(x) MCF_REG08(0xFC048053+((x)*0x4000)) -#define MCF_INTC_ICR20(x) MCF_REG08(0xFC048054+((x)*0x4000)) -#define MCF_INTC_ICR21(x) MCF_REG08(0xFC048055+((x)*0x4000)) -#define MCF_INTC_ICR22(x) MCF_REG08(0xFC048056+((x)*0x4000)) -#define MCF_INTC_ICR23(x) MCF_REG08(0xFC048057+((x)*0x4000)) -#define MCF_INTC_ICR24(x) MCF_REG08(0xFC048058+((x)*0x4000)) -#define MCF_INTC_ICR25(x) MCF_REG08(0xFC048059+((x)*0x4000)) -#define MCF_INTC_ICR26(x) MCF_REG08(0xFC04805A+((x)*0x4000)) -#define MCF_INTC_ICR27(x) MCF_REG08(0xFC04805B+((x)*0x4000)) -#define MCF_INTC_ICR28(x) MCF_REG08(0xFC04805C+((x)*0x4000)) -#define MCF_INTC_ICR29(x) MCF_REG08(0xFC04805D+((x)*0x4000)) -#define MCF_INTC_ICR30(x) MCF_REG08(0xFC04805E+((x)*0x4000)) -#define MCF_INTC_ICR31(x) MCF_REG08(0xFC04805F+((x)*0x4000)) -#define MCF_INTC_ICR32(x) MCF_REG08(0xFC048060+((x)*0x4000)) -#define MCF_INTC_ICR33(x) MCF_REG08(0xFC048061+((x)*0x4000)) -#define MCF_INTC_ICR34(x) MCF_REG08(0xFC048062+((x)*0x4000)) -#define MCF_INTC_ICR35(x) MCF_REG08(0xFC048063+((x)*0x4000)) -#define MCF_INTC_ICR36(x) MCF_REG08(0xFC048064+((x)*0x4000)) -#define MCF_INTC_ICR37(x) MCF_REG08(0xFC048065+((x)*0x4000)) -#define MCF_INTC_ICR38(x) MCF_REG08(0xFC048066+((x)*0x4000)) -#define MCF_INTC_ICR39(x) MCF_REG08(0xFC048067+((x)*0x4000)) -#define MCF_INTC_ICR40(x) MCF_REG08(0xFC048068+((x)*0x4000)) -#define MCF_INTC_ICR41(x) MCF_REG08(0xFC048069+((x)*0x4000)) -#define MCF_INTC_ICR42(x) MCF_REG08(0xFC04806A+((x)*0x4000)) -#define MCF_INTC_ICR43(x) MCF_REG08(0xFC04806B+((x)*0x4000)) -#define MCF_INTC_ICR44(x) MCF_REG08(0xFC04806C+((x)*0x4000)) -#define MCF_INTC_ICR45(x) MCF_REG08(0xFC04806D+((x)*0x4000)) -#define MCF_INTC_ICR46(x) MCF_REG08(0xFC04806E+((x)*0x4000)) -#define MCF_INTC_ICR47(x) MCF_REG08(0xFC04806F+((x)*0x4000)) -#define MCF_INTC_ICR48(x) MCF_REG08(0xFC048070+((x)*0x4000)) -#define MCF_INTC_ICR49(x) MCF_REG08(0xFC048071+((x)*0x4000)) -#define MCF_INTC_ICR50(x) MCF_REG08(0xFC048072+((x)*0x4000)) -#define MCF_INTC_ICR51(x) MCF_REG08(0xFC048073+((x)*0x4000)) -#define MCF_INTC_ICR52(x) MCF_REG08(0xFC048074+((x)*0x4000)) -#define MCF_INTC_ICR53(x) MCF_REG08(0xFC048075+((x)*0x4000)) -#define MCF_INTC_ICR54(x) MCF_REG08(0xFC048076+((x)*0x4000)) -#define MCF_INTC_ICR55(x) MCF_REG08(0xFC048077+((x)*0x4000)) -#define MCF_INTC_ICR56(x) MCF_REG08(0xFC048078+((x)*0x4000)) -#define MCF_INTC_ICR57(x) MCF_REG08(0xFC048079+((x)*0x4000)) -#define MCF_INTC_ICR58(x) MCF_REG08(0xFC04807A+((x)*0x4000)) -#define MCF_INTC_ICR59(x) MCF_REG08(0xFC04807B+((x)*0x4000)) -#define MCF_INTC_ICR60(x) MCF_REG08(0xFC04807C+((x)*0x4000)) -#define MCF_INTC_ICR61(x) MCF_REG08(0xFC04807D+((x)*0x4000)) -#define MCF_INTC_ICR62(x) MCF_REG08(0xFC04807E+((x)*0x4000)) -#define MCF_INTC_ICR63(x) MCF_REG08(0xFC04807F+((x)*0x4000)) -#define MCF_INTC_SWIACK(x) MCF_REG08(0xFC0480E0+((x)*0x4000)) -#define MCF_INTC_L1IACK(x) MCF_REG08(0xFC0480E4+((x)*0x4000)) -#define MCF_INTC_L2IACK(x) MCF_REG08(0xFC0480E8+((x)*0x4000)) -#define MCF_INTC_L3IACK(x) MCF_REG08(0xFC0480EC+((x)*0x4000)) -#define MCF_INTC_L4IACK(x) MCF_REG08(0xFC0480F0+((x)*0x4000)) -#define MCF_INTC_L5IACK(x) MCF_REG08(0xFC0480F4+((x)*0x4000)) -#define MCF_INTC_L6IACK(x) MCF_REG08(0xFC0480F8+((x)*0x4000)) -#define MCF_INTC_L7IACK(x) MCF_REG08(0xFC0480FC+((x)*0x4000)) - -/* Bit definitions and macros for MCF_INTC_IPRH */ -#define MCF_INTC_IPRH_INT32 (0x00000001) -#define MCF_INTC_IPRH_INT33 (0x00000002) -#define MCF_INTC_IPRH_INT34 (0x00000004) -#define MCF_INTC_IPRH_INT35 (0x00000008) -#define MCF_INTC_IPRH_INT36 (0x00000010) -#define MCF_INTC_IPRH_INT37 (0x00000020) -#define MCF_INTC_IPRH_INT38 (0x00000040) -#define MCF_INTC_IPRH_INT39 (0x00000080) -#define MCF_INTC_IPRH_INT40 (0x00000100) -#define MCF_INTC_IPRH_INT41 (0x00000200) -#define MCF_INTC_IPRH_INT42 (0x00000400) -#define MCF_INTC_IPRH_INT43 (0x00000800) -#define MCF_INTC_IPRH_INT44 (0x00001000) -#define MCF_INTC_IPRH_INT45 (0x00002000) -#define MCF_INTC_IPRH_INT46 (0x00004000) -#define MCF_INTC_IPRH_INT47 (0x00008000) -#define MCF_INTC_IPRH_INT48 (0x00010000) -#define MCF_INTC_IPRH_INT49 (0x00020000) -#define MCF_INTC_IPRH_INT50 (0x00040000) -#define MCF_INTC_IPRH_INT51 (0x00080000) -#define MCF_INTC_IPRH_INT52 (0x00100000) -#define MCF_INTC_IPRH_INT53 (0x00200000) -#define MCF_INTC_IPRH_INT54 (0x00400000) -#define MCF_INTC_IPRH_INT55 (0x00800000) -#define MCF_INTC_IPRH_INT56 (0x01000000) -#define MCF_INTC_IPRH_INT57 (0x02000000) -#define MCF_INTC_IPRH_INT58 (0x04000000) -#define MCF_INTC_IPRH_INT59 (0x08000000) -#define MCF_INTC_IPRH_INT60 (0x10000000) -#define MCF_INTC_IPRH_INT61 (0x20000000) -#define MCF_INTC_IPRH_INT62 (0x40000000) -#define MCF_INTC_IPRH_INT63 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IPRL */ -#define MCF_INTC_IPRL_INT0 (0x00000001) -#define MCF_INTC_IPRL_INT1 (0x00000002) -#define MCF_INTC_IPRL_INT2 (0x00000004) -#define MCF_INTC_IPRL_INT3 (0x00000008) -#define MCF_INTC_IPRL_INT4 (0x00000010) -#define MCF_INTC_IPRL_INT5 (0x00000020) -#define MCF_INTC_IPRL_INT6 (0x00000040) -#define MCF_INTC_IPRL_INT7 (0x00000080) -#define MCF_INTC_IPRL_INT8 (0x00000100) -#define MCF_INTC_IPRL_INT9 (0x00000200) -#define MCF_INTC_IPRL_INT10 (0x00000400) -#define MCF_INTC_IPRL_INT11 (0x00000800) -#define MCF_INTC_IPRL_INT12 (0x00001000) -#define MCF_INTC_IPRL_INT13 (0x00002000) -#define MCF_INTC_IPRL_INT14 (0x00004000) -#define MCF_INTC_IPRL_INT15 (0x00008000) -#define MCF_INTC_IPRL_INT16 (0x00010000) -#define MCF_INTC_IPRL_INT17 (0x00020000) -#define MCF_INTC_IPRL_INT18 (0x00040000) -#define MCF_INTC_IPRL_INT19 (0x00080000) -#define MCF_INTC_IPRL_INT20 (0x00100000) -#define MCF_INTC_IPRL_INT21 (0x00200000) -#define MCF_INTC_IPRL_INT22 (0x00400000) -#define MCF_INTC_IPRL_INT23 (0x00800000) -#define MCF_INTC_IPRL_INT24 (0x01000000) -#define MCF_INTC_IPRL_INT25 (0x02000000) -#define MCF_INTC_IPRL_INT26 (0x04000000) -#define MCF_INTC_IPRL_INT27 (0x08000000) -#define MCF_INTC_IPRL_INT28 (0x10000000) -#define MCF_INTC_IPRL_INT29 (0x20000000) -#define MCF_INTC_IPRL_INT30 (0x40000000) -#define MCF_INTC_IPRL_INT31 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IMRH */ -#define MCF_INTC_IMRH_INT_MASK32 (0x00000001) -#define MCF_INTC_IMRH_INT_MASK33 (0x00000002) -#define MCF_INTC_IMRH_INT_MASK34 (0x00000004) -#define MCF_INTC_IMRH_INT_MASK35 (0x00000008) -#define MCF_INTC_IMRH_INT_MASK36 (0x00000010) -#define MCF_INTC_IMRH_INT_MASK37 (0x00000020) -#define MCF_INTC_IMRH_INT_MASK38 (0x00000040) -#define MCF_INTC_IMRH_INT_MASK39 (0x00000080) -#define MCF_INTC_IMRH_INT_MASK40 (0x00000100) -#define MCF_INTC_IMRH_INT_MASK41 (0x00000200) -#define MCF_INTC_IMRH_INT_MASK42 (0x00000400) -#define MCF_INTC_IMRH_INT_MASK43 (0x00000800) -#define MCF_INTC_IMRH_INT_MASK44 (0x00001000) -#define MCF_INTC_IMRH_INT_MASK45 (0x00002000) -#define MCF_INTC_IMRH_INT_MASK46 (0x00004000) -#define MCF_INTC_IMRH_INT_MASK47 (0x00008000) -#define MCF_INTC_IMRH_INT_MASK48 (0x00010000) -#define MCF_INTC_IMRH_INT_MASK49 (0x00020000) -#define MCF_INTC_IMRH_INT_MASK50 (0x00040000) -#define MCF_INTC_IMRH_INT_MASK51 (0x00080000) -#define MCF_INTC_IMRH_INT_MASK52 (0x00100000) -#define MCF_INTC_IMRH_INT_MASK53 (0x00200000) -#define MCF_INTC_IMRH_INT_MASK54 (0x00400000) -#define MCF_INTC_IMRH_INT_MASK55 (0x00800000) -#define MCF_INTC_IMRH_INT_MASK56 (0x01000000) -#define MCF_INTC_IMRH_INT_MASK57 (0x02000000) -#define MCF_INTC_IMRH_INT_MASK58 (0x04000000) -#define MCF_INTC_IMRH_INT_MASK59 (0x08000000) -#define MCF_INTC_IMRH_INT_MASK60 (0x10000000) -#define MCF_INTC_IMRH_INT_MASK61 (0x20000000) -#define MCF_INTC_IMRH_INT_MASK62 (0x40000000) -#define MCF_INTC_IMRH_INT_MASK63 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_IMRL */ -#define MCF_INTC_IMRL_INT_MASK0 (0x00000001) -#define MCF_INTC_IMRL_INT_MASK1 (0x00000002) -#define MCF_INTC_IMRL_INT_MASK2 (0x00000004) -#define MCF_INTC_IMRL_INT_MASK3 (0x00000008) -#define MCF_INTC_IMRL_INT_MASK4 (0x00000010) -#define MCF_INTC_IMRL_INT_MASK5 (0x00000020) -#define MCF_INTC_IMRL_INT_MASK6 (0x00000040) -#define MCF_INTC_IMRL_INT_MASK7 (0x00000080) -#define MCF_INTC_IMRL_INT_MASK8 (0x00000100) -#define MCF_INTC_IMRL_INT_MASK9 (0x00000200) -#define MCF_INTC_IMRL_INT_MASK10 (0x00000400) -#define MCF_INTC_IMRL_INT_MASK11 (0x00000800) -#define MCF_INTC_IMRL_INT_MASK12 (0x00001000) -#define MCF_INTC_IMRL_INT_MASK13 (0x00002000) -#define MCF_INTC_IMRL_INT_MASK14 (0x00004000) -#define MCF_INTC_IMRL_INT_MASK15 (0x00008000) -#define MCF_INTC_IMRL_INT_MASK16 (0x00010000) -#define MCF_INTC_IMRL_INT_MASK17 (0x00020000) -#define MCF_INTC_IMRL_INT_MASK18 (0x00040000) -#define MCF_INTC_IMRL_INT_MASK19 (0x00080000) -#define MCF_INTC_IMRL_INT_MASK20 (0x00100000) -#define MCF_INTC_IMRL_INT_MASK21 (0x00200000) -#define MCF_INTC_IMRL_INT_MASK22 (0x00400000) -#define MCF_INTC_IMRL_INT_MASK23 (0x00800000) -#define MCF_INTC_IMRL_INT_MASK24 (0x01000000) -#define MCF_INTC_IMRL_INT_MASK25 (0x02000000) -#define MCF_INTC_IMRL_INT_MASK26 (0x04000000) -#define MCF_INTC_IMRL_INT_MASK27 (0x08000000) -#define MCF_INTC_IMRL_INT_MASK28 (0x10000000) -#define MCF_INTC_IMRL_INT_MASK29 (0x20000000) -#define MCF_INTC_IMRL_INT_MASK30 (0x40000000) -#define MCF_INTC_IMRL_INT_MASK31 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_INTFRCH */ -#define MCF_INTC_INTFRCH_INTFRC32 (0x00000001) -#define MCF_INTC_INTFRCH_INTFRC33 (0x00000002) -#define MCF_INTC_INTFRCH_INTFRC34 (0x00000004) -#define MCF_INTC_INTFRCH_INTFRC35 (0x00000008) -#define MCF_INTC_INTFRCH_INTFRC36 (0x00000010) -#define MCF_INTC_INTFRCH_INTFRC37 (0x00000020) -#define MCF_INTC_INTFRCH_INTFRC38 (0x00000040) -#define MCF_INTC_INTFRCH_INTFRC39 (0x00000080) -#define MCF_INTC_INTFRCH_INTFRC40 (0x00000100) -#define MCF_INTC_INTFRCH_INTFRC41 (0x00000200) -#define MCF_INTC_INTFRCH_INTFRC42 (0x00000400) -#define MCF_INTC_INTFRCH_INTFRC43 (0x00000800) -#define MCF_INTC_INTFRCH_INTFRC44 (0x00001000) -#define MCF_INTC_INTFRCH_INTFRC45 (0x00002000) -#define MCF_INTC_INTFRCH_INTFRC46 (0x00004000) -#define MCF_INTC_INTFRCH_INTFRC47 (0x00008000) -#define MCF_INTC_INTFRCH_INTFRC48 (0x00010000) -#define MCF_INTC_INTFRCH_INTFRC49 (0x00020000) -#define MCF_INTC_INTFRCH_INTFRC50 (0x00040000) -#define MCF_INTC_INTFRCH_INTFRC51 (0x00080000) -#define MCF_INTC_INTFRCH_INTFRC52 (0x00100000) -#define MCF_INTC_INTFRCH_INTFRC53 (0x00200000) -#define MCF_INTC_INTFRCH_INTFRC54 (0x00400000) -#define MCF_INTC_INTFRCH_INTFRC55 (0x00800000) -#define MCF_INTC_INTFRCH_INTFRC56 (0x01000000) -#define MCF_INTC_INTFRCH_INTFRC57 (0x02000000) -#define MCF_INTC_INTFRCH_INTFRC58 (0x04000000) -#define MCF_INTC_INTFRCH_INTFRC59 (0x08000000) -#define MCF_INTC_INTFRCH_INTFRC60 (0x10000000) -#define MCF_INTC_INTFRCH_INTFRC61 (0x20000000) -#define MCF_INTC_INTFRCH_INTFRC62 (0x40000000) -#define MCF_INTC_INTFRCH_INTFRC63 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_INTFRCL */ -#define MCF_INTC_INTFRCL_INTFRC0 (0x00000001) -#define MCF_INTC_INTFRCL_INTFRC1 (0x00000002) -#define MCF_INTC_INTFRCL_INTFRC2 (0x00000004) -#define MCF_INTC_INTFRCL_INTFRC3 (0x00000008) -#define MCF_INTC_INTFRCL_INTFRC4 (0x00000010) -#define MCF_INTC_INTFRCL_INTFRC5 (0x00000020) -#define MCF_INTC_INTFRCL_INTFRC6 (0x00000040) -#define MCF_INTC_INTFRCL_INTFRC7 (0x00000080) -#define MCF_INTC_INTFRCL_INTFRC8 (0x00000100) -#define MCF_INTC_INTFRCL_INTFRC9 (0x00000200) -#define MCF_INTC_INTFRCL_INTFRC10 (0x00000400) -#define MCF_INTC_INTFRCL_INTFRC11 (0x00000800) -#define MCF_INTC_INTFRCL_INTFRC12 (0x00001000) -#define MCF_INTC_INTFRCL_INTFRC13 (0x00002000) -#define MCF_INTC_INTFRCL_INTFRC14 (0x00004000) -#define MCF_INTC_INTFRCL_INTFRC15 (0x00008000) -#define MCF_INTC_INTFRCL_INTFRC16 (0x00010000) -#define MCF_INTC_INTFRCL_INTFRC17 (0x00020000) -#define MCF_INTC_INTFRCL_INTFRC18 (0x00040000) -#define MCF_INTC_INTFRCL_INTFRC19 (0x00080000) -#define MCF_INTC_INTFRCL_INTFRC20 (0x00100000) -#define MCF_INTC_INTFRCL_INTFRC21 (0x00200000) -#define MCF_INTC_INTFRCL_INTFRC22 (0x00400000) -#define MCF_INTC_INTFRCL_INTFRC23 (0x00800000) -#define MCF_INTC_INTFRCL_INTFRC24 (0x01000000) -#define MCF_INTC_INTFRCL_INTFRC25 (0x02000000) -#define MCF_INTC_INTFRCL_INTFRC26 (0x04000000) -#define MCF_INTC_INTFRCL_INTFRC27 (0x08000000) -#define MCF_INTC_INTFRCL_INTFRC28 (0x10000000) -#define MCF_INTC_INTFRCL_INTFRC29 (0x20000000) -#define MCF_INTC_INTFRCL_INTFRC30 (0x40000000) -#define MCF_INTC_INTFRCL_INTFRC31 (0x80000000) - -/* Bit definitions and macros for MCF_INTC_ICONFIG */ -#define MCF_INTC_ICONFIG_EMASK (0x0020) -#define MCF_INTC_ICONFIG_ELVLPRI1 (0x0200) -#define MCF_INTC_ICONFIG_ELVLPRI2 (0x0400) -#define MCF_INTC_ICONFIG_ELVLPRI3 (0x0800) -#define MCF_INTC_ICONFIG_ELVLPRI4 (0x1000) -#define MCF_INTC_ICONFIG_ELVLPRI5 (0x2000) -#define MCF_INTC_ICONFIG_ELVLPRI6 (0x4000) -#define MCF_INTC_ICONFIG_ELVLPRI7 (0x8000) - -/* Bit definitions and macros for MCF_INTC_SIMR */ -#define MCF_INTC_SIMR_SIMR(x) (((x)&0x7F)<<0) - -/* Bit definitions and macros for MCF_INTC_CIMR */ -#define MCF_INTC_CIMR_CIMR(x) (((x)&0x7F)<<0) - -/* Bit definitions and macros for MCF_INTC_CLMASK */ -#define MCF_INTC_CLMASK_CLMASK(x) (((x)&0x0F)<<0) - -/* Bit definitions and macros for MCF_INTC_SLMASK */ -#define MCF_INTC_SLMASK_SLMASK(x) (((x)&0x0F)<<0) - -/* Bit definitions and macros for MCF_INTC_ICR */ -#define MCF_INTC_ICR_IL(x) (((x)&0x07)<<0) - -/* Bit definitions and macros for MCF_INTC_SWIACK */ -#define MCF_INTC_SWIACK_VECTOR(x) (((x)&0xFF)<<0) - -/* Bit definitions and macros for MCF_INTC_LIACK */ -#define MCF_INTC_LIACK_VECTOR(x) (((x)&0xFF)<<0) - -/********************************************************************/ -/********************************************************************* -* -* LCD Controller (LCDC) -* -*********************************************************************/ - -/* Register read/write macros */ -#define MCF_LCDC_LSSAR MCF_REG32(0xFC0AC000) -#define MCF_LCDC_LSR MCF_REG32(0xFC0AC004) -#define MCF_LCDC_LVPWR MCF_REG32(0xFC0AC008) -#define MCF_LCDC_LCPR MCF_REG32(0xFC0AC00C) -#define MCF_LCDC_LCWHBR MCF_REG32(0xFC0AC010) -#define MCF_LCDC_LCCMR MCF_REG32(0xFC0AC014) -#define MCF_LCDC_LPCR MCF_REG32(0xFC0AC018) -#define MCF_LCDC_LHCR MCF_REG32(0xFC0AC01C) -#define MCF_LCDC_LVCR MCF_REG32(0xFC0AC020) -#define MCF_LCDC_LPOR MCF_REG32(0xFC0AC024) -#define MCF_LCDC_LSCR MCF_REG32(0xFC0AC028) -#define MCF_LCDC_LPCCR MCF_REG32(0xFC0AC02C) -#define MCF_LCDC_LDCR MCF_REG32(0xFC0AC030) -#define MCF_LCDC_LRMCR MCF_REG32(0xFC0AC034) -#define MCF_LCDC_LICR MCF_REG32(0xFC0AC038) -#define MCF_LCDC_LIER MCF_REG32(0xFC0AC03C) -#define MCF_LCDC_LISR MCF_REG32(0xFC0AC040) -#define MCF_LCDC_LGWSAR MCF_REG32(0xFC0AC050) -#define MCF_LCDC_LGWSR MCF_REG32(0xFC0AC054) -#define MCF_LCDC_LGWVPWR MCF_REG32(0xFC0AC058) -#define MCF_LCDC_LGWPOR MCF_REG32(0xFC0AC05C) -#define MCF_LCDC_LGWPR MCF_REG32(0xFC0AC060) -#define MCF_LCDC_LGWCR MCF_REG32(0xFC0AC064) -#define MCF_LCDC_LGWDCR MCF_REG32(0xFC0AC068) -#define MCF_LCDC_BPLUT_BASE MCF_REG32(0xFC0AC800) -#define MCF_LCDC_GWLUT_BASE MCF_REG32(0xFC0ACC00) - -/* Bit definitions and macros for MCF_LCDC_LSSAR */ -#define MCF_LCDC_LSSAR_SSA(x) (((x)&0x3FFFFFFF)<<2) - -/* Bit definitions and macros for MCF_LCDC_LSR */ -#define MCF_LCDC_LSR_YMAX(x) (((x)&0x000003FF)<<0) -#define MCF_LCDC_LSR_XMAX(x) (((x)&0x0000003F)<<20) - -/* Bit definitions and macros for MCF_LCDC_LVPWR */ -#define MCF_LCDC_LVPWR_VPW(x) (((x)&0x000003FF)<<0) - -/* Bit definitions and macros for MCF_LCDC_LCPR */ -#define MCF_LCDC_LCPR_CYP(x) (((x)&0x000003FF)<<0) -#define MCF_LCDC_LCPR_CXP(x) (((x)&0x000003FF)<<16) -#define MCF_LCDC_LCPR_OP (0x10000000) -#define MCF_LCDC_LCPR_CC(x) (((x)&0x00000003)<<30) -#define MCF_LCDC_LCPR_CC_TRANSPARENT (0x00000000) -#define MCF_LCDC_LCPR_CC_OR (0x40000000) -#define MCF_LCDC_LCPR_CC_XOR (0x80000000) -#define MCF_LCDC_LCPR_CC_AND (0xC0000000) -#define MCF_LCDC_LCPR_OP_ON (0x10000000) -#define MCF_LCDC_LCPR_OP_OFF (0x00000000) - -/* Bit definitions and macros for MCF_LCDC_LCWHBR */ -#define MCF_LCDC_LCWHBR_BD(x) (((x)&0x000000FF)<<0) -#define MCF_LCDC_LCWHBR_CH(x) (((x)&0x0000001F)<<16) -#define MCF_LCDC_LCWHBR_CW(x) (((x)&0x0000001F)<<24) -#define MCF_LCDC_LCWHBR_BK_EN (0x80000000) -#define MCF_LCDC_LCWHBR_BK_EN_ON (0x80000000) -#define MCF_LCDC_LCWHBR_BK_EN_OFF (0x00000000) - -/* Bit definitions and macros for MCF_LCDC_LCCMR */ -#define MCF_LCDC_LCCMR_CUR_COL_B(x) (((x)&0x0000003F)<<0) -#define MCF_LCDC_LCCMR_CUR_COL_G(x) (((x)&0x0000003F)<<6) -#define MCF_LCDC_LCCMR_CUR_COL_R(x) (((x)&0x0000003F)<<12) - -/* Bit definitions and macros for MCF_LCDC_LPCR */ -#define MCF_LCDC_LPCR_PCD(x) (((x)&0x0000003F)<<0) -#define MCF_LCDC_LPCR_SHARP (0x00000040) -#define MCF_LCDC_LPCR_SCLKSEL (0x00000080) -#define MCF_LCDC_LPCR_ACD(x) (((x)&0x0000007F)<<8) -#define MCF_LCDC_LPCR_ACDSEL (0x00008000) -#define MCF_LCDC_LPCR_REV_VS (0x00010000) -#define MCF_LCDC_LPCR_SWAP_SEL (0x00020000) -#define MCF_LCDC_LPCR_ENDSEL (0x00040000) -#define MCF_LCDC_LPCR_SCLKIDLE (0x00080000) -#define MCF_LCDC_LPCR_OEPOL (0x00100000) -#define MCF_LCDC_LPCR_CLKPOL (0x00200000) -#define MCF_LCDC_LPCR_LPPOL (0x00400000) -#define MCF_LCDC_LPCR_FLM (0x00800000) -#define MCF_LCDC_LPCR_PIXPOL (0x01000000) -#define MCF_LCDC_LPCR_BPIX(x) (((x)&0x00000007)<<25) -#define MCF_LCDC_LPCR_PBSIZ(x) (((x)&0x00000003)<<28) -#define MCF_LCDC_LPCR_COLOR (0x40000000) -#define MCF_LCDC_LPCR_TFT (0x80000000) -#define MCF_LCDC_LPCR_MODE_MONOCGROME (0x00000000) -#define MCF_LCDC_LPCR_MODE_CSTN (0x40000000) -#define MCF_LCDC_LPCR_MODE_TFT (0xC0000000) -#define MCF_LCDC_LPCR_PBSIZ_1 (0x00000000) -#define MCF_LCDC_LPCR_PBSIZ_2 (0x10000000) -#define MCF_LCDC_LPCR_PBSIZ_4 (0x20000000) -#define MCF_LCDC_LPCR_PBSIZ_8 (0x30000000) -#define MCF_LCDC_LPCR_BPIX_1bpp (0x00000000) -#define MCF_LCDC_LPCR_BPIX_2bpp (0x02000000) -#define MCF_LCDC_LPCR_BPIX_4bpp (0x04000000) -#define MCF_LCDC_LPCR_BPIX_8bpp (0x06000000) -#define MCF_LCDC_LPCR_BPIX_12bpp (0x08000000) -#define MCF_LCDC_LPCR_BPIX_16bpp (0x0A000000) -#define MCF_LCDC_LPCR_BPIX_18bpp (0x0C000000) - -#define MCF_LCDC_LPCR_PANEL_TYPE(x) (((x)&0x00000003)<<30) - -/* Bit definitions and macros for MCF_LCDC_LHCR */ -#define MCF_LCDC_LHCR_H_WAIT_2(x) (((x)&0x000000FF)<<0) -#define MCF_LCDC_LHCR_H_WAIT_1(x) (((x)&0x000000FF)<<8) -#define MCF_LCDC_LHCR_H_WIDTH(x) (((x)&0x0000003F)<<26) - -/* Bit definitions and macros for MCF_LCDC_LVCR */ -#define MCF_LCDC_LVCR_V_WAIT_2(x) (((x)&0x000000FF)<<0) -#define MCF_LCDC_LVCR_V_WAIT_1(x) (((x)&0x000000FF)<<8) -#define MCF_LCDC_LVCR_V_WIDTH(x) (((x)&0x0000003F)<<26) - -/* Bit definitions and macros for MCF_LCDC_LPOR */ -#define MCF_LCDC_LPOR_POS(x) (((x)&0x0000001F)<<0) - -/* Bit definitions and macros for MCF_LCDC_LPCCR */ -#define MCF_LCDC_LPCCR_PW(x) (((x)&0x000000FF)<<0) -#define MCF_LCDC_LPCCR_CC_EN (0x00000100) -#define MCF_LCDC_LPCCR_SCR(x) (((x)&0x00000003)<<9) -#define MCF_LCDC_LPCCR_LDMSK (0x00008000) -#define MCF_LCDC_LPCCR_CLS_HI_WIDTH(x) (((x)&0x000001FF)<<16) -#define MCF_LCDC_LPCCR_SCR_LINEPULSE (0x00000000) -#define MCF_LCDC_LPCCR_SCR_PIXELCLK (0x00002000) -#define MCF_LCDC_LPCCR_SCR_LCDCLOCK (0x00004000) - -/* Bit definitions and macros for MCF_LCDC_LDCR */ -#define MCF_LCDC_LDCR_TM(x) (((x)&0x0000001F)<<0) -#define MCF_LCDC_LDCR_HM(x) (((x)&0x0000001F)<<16) -#define MCF_LCDC_LDCR_BURST (0x80000000) - -/* Bit definitions and macros for MCF_LCDC_LRMCR */ -#define MCF_LCDC_LRMCR_SEL_REF (0x00000001) - -/* Bit definitions and macros for MCF_LCDC_LICR */ -#define MCF_LCDC_LICR_INTCON (0x00000001) -#define MCF_LCDC_LICR_INTSYN (0x00000004) -#define MCF_LCDC_LICR_GW_INT_CON (0x00000010) - -/* Bit definitions and macros for MCF_LCDC_LIER */ -#define MCF_LCDC_LIER_BOF_EN (0x00000001) -#define MCF_LCDC_LIER_EOF_EN (0x00000002) -#define MCF_LCDC_LIER_ERR_RES_EN (0x00000004) -#define MCF_LCDC_LIER_UDR_ERR_EN (0x00000008) -#define MCF_LCDC_LIER_GW_BOF_EN (0x00000010) -#define MCF_LCDC_LIER_GW_EOF_EN (0x00000020) -#define MCF_LCDC_LIER_GW_ERR_RES_EN (0x00000040) -#define MCF_LCDC_LIER_GW_UDR_ERR_EN (0x00000080) - -/* Bit definitions and macros for MCF_LCDC_LISR */ -#define MCF_LCDC_LISR_BOF (0x00000001) -#define MCF_LCDC_LISR_EOF (0x00000002) -#define MCF_LCDC_LISR_ERR_RES (0x00000004) -#define MCF_LCDC_LISR_UDR_ERR (0x00000008) -#define MCF_LCDC_LISR_GW_BOF (0x00000010) -#define MCF_LCDC_LISR_GW_EOF (0x00000020) -#define MCF_LCDC_LISR_GW_ERR_RES (0x00000040) -#define MCF_LCDC_LISR_GW_UDR_ERR (0x00000080) - -/* Bit definitions and macros for MCF_LCDC_LGWSAR */ -#define MCF_LCDC_LGWSAR_GWSA(x) (((x)&0x3FFFFFFF)<<2) - -/* Bit definitions and macros for MCF_LCDC_LGWSR */ -#define MCF_LCDC_LGWSR_GWH(x) (((x)&0x000003FF)<<0) -#define MCF_LCDC_LGWSR_GWW(x) (((x)&0x0000003F)<<20) - -/* Bit definitions and macros for MCF_LCDC_LGWVPWR */ -#define MCF_LCDC_LGWVPWR_GWVPW(x) (((x)&0x000003FF)<<0) - -/* Bit definitions and macros for MCF_LCDC_LGWPOR */ -#define MCF_LCDC_LGWPOR_GWPO(x) (((x)&0x0000001F)<<0) - -/* Bit definitions and macros for MCF_LCDC_LGWPR */ -#define MCF_LCDC_LGWPR_GWYP(x) (((x)&0x000003FF)<<0) -#define MCF_LCDC_LGWPR_GWXP(x) (((x)&0x000003FF)<<16) - -/* Bit definitions and macros for MCF_LCDC_LGWCR */ -#define MCF_LCDC_LGWCR_GWCKB(x) (((x)&0x0000003F)<<0) -#define MCF_LCDC_LGWCR_GWCKG(x) (((x)&0x0000003F)<<6) -#define MCF_LCDC_LGWCR_GWCKR(x) (((x)&0x0000003F)<<12) -#define MCF_LCDC_LGWCR_GW_RVS (0x00200000) -#define MCF_LCDC_LGWCR_GWE (0x00400000) -#define MCF_LCDC_LGWCR_GWCKE (0x00800000) -#define MCF_LCDC_LGWCR_GWAV(x) (((x)&0x000000FF)<<24) - -/* Bit definitions and macros for MCF_LCDC_LGWDCR */ -#define MCF_LCDC_LGWDCR_GWTM(x) (((x)&0x0000001F)<<0) -#define MCF_LCDC_LGWDCR_GWHM(x) (((x)&0x0000001F)<<16) -#define MCF_LCDC_LGWDCR_GWBT (0x80000000) - -/* Bit definitions and macros for MCF_LCDC_LSCR */ -#define MCF_LCDC_LSCR_PS_RISE_DELAY(x) (((x)&0x0000003F)<<26) -#define MCF_LCDC_LSCR_CLS_RISE_DELAY(x) (((x)&0x000000FF)<<16) -#define MCF_LCDC_LSCR_REV_TOGGLE_DELAY(x) (((x)&0x0000000F)<<8) -#define MCF_LCDC_LSCR_GRAY_2(x) (((x)&0x0000000F)<<4) -#define MCF_LCDC_LSCR_GRAY_1(x) (((x)&0x0000000F)<<0) - -/* Bit definitions and macros for MCF_LCDC_BPLUT_BASE */ -#define MCF_LCDC_BPLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0) - -/* Bit definitions and macros for MCF_LCDC_GWLUT_BASE */ -#define MCF_LCDC_GWLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0) - -/********************************************************************* - * - * Phase Locked Loop (PLL) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_PLL_PODR MCF_REG08(0xFC0C0000) -#define MCF_PLL_PLLCR MCF_REG08(0xFC0C0004) -#define MCF_PLL_PMDR MCF_REG08(0xFC0C0008) -#define MCF_PLL_PFDR MCF_REG08(0xFC0C000C) - -/* Bit definitions and macros for MCF_PLL_PODR */ -#define MCF_PLL_PODR_BUSDIV(x) (((x)&0x0F)<<0) -#define MCF_PLL_PODR_CPUDIV(x) (((x)&0x0F)<<4) - -/* Bit definitions and macros for MCF_PLL_PLLCR */ -#define MCF_PLL_PLLCR_DITHDEV(x) (((x)&0x07)<<0) -#define MCF_PLL_PLLCR_DITHEN (0x80) - -/* Bit definitions and macros for MCF_PLL_PMDR */ -#define MCF_PLL_PMDR_MODDIV(x) (((x)&0xFF)<<0) - -/* Bit definitions and macros for MCF_PLL_PFDR */ -#define MCF_PLL_PFDR_MFD(x) (((x)&0xFF)<<0) - -/********************************************************************* - * - * System Control Module Registers (SCM) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_SCM_MPR MCF_REG32(0xFC000000) -#define MCF_SCM_PACRA MCF_REG32(0xFC000020) -#define MCF_SCM_PACRB MCF_REG32(0xFC000024) -#define MCF_SCM_PACRC MCF_REG32(0xFC000028) -#define MCF_SCM_PACRD MCF_REG32(0xFC00002C) -#define MCF_SCM_PACRE MCF_REG32(0xFC000040) -#define MCF_SCM_PACRF MCF_REG32(0xFC000044) - -#define MCF_SCM_BCR MCF_REG32(0xFC040024) - -/********************************************************************* - * - * SDRAM Controller (SDRAMC) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_SDRAMC_SDMR MCF_REG32(0xFC0B8000) -#define MCF_SDRAMC_SDCR MCF_REG32(0xFC0B8004) -#define MCF_SDRAMC_SDCFG1 MCF_REG32(0xFC0B8008) -#define MCF_SDRAMC_SDCFG2 MCF_REG32(0xFC0B800C) -#define MCF_SDRAMC_LIMP_FIX MCF_REG32(0xFC0B8080) -#define MCF_SDRAMC_SDDS MCF_REG32(0xFC0B8100) -#define MCF_SDRAMC_SDCS0 MCF_REG32(0xFC0B8110) -#define MCF_SDRAMC_SDCS1 MCF_REG32(0xFC0B8114) -#define MCF_SDRAMC_SDCS2 MCF_REG32(0xFC0B8118) -#define MCF_SDRAMC_SDCS3 MCF_REG32(0xFC0B811C) -#define MCF_SDRAMC_SDCS(x) MCF_REG32(0xFC0B8110+((x)*0x004)) - -/* Bit definitions and macros for MCF_SDRAMC_SDMR */ -#define MCF_SDRAMC_SDMR_CMD (0x00010000) -#define MCF_SDRAMC_SDMR_AD(x) (((x)&0x00000FFF)<<18) -#define MCF_SDRAMC_SDMR_BNKAD(x) (((x)&0x00000003)<<30) -#define MCF_SDRAMC_SDMR_BNKAD_LMR (0x00000000) -#define MCF_SDRAMC_SDMR_BNKAD_LEMR (0x40000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDCR */ -#define MCF_SDRAMC_SDCR_IPALL (0x00000002) -#define MCF_SDRAMC_SDCR_IREF (0x00000004) -#define MCF_SDRAMC_SDCR_DQS_OE(x) (((x)&0x0000000F)<<8) -#define MCF_SDRAMC_SDCR_PS(x) (((x)&0x00000003)<<12) -#define MCF_SDRAMC_SDCR_RCNT(x) (((x)&0x0000003F)<<16) -#define MCF_SDRAMC_SDCR_OE_RULE (0x00400000) -#define MCF_SDRAMC_SDCR_MUX(x) (((x)&0x00000003)<<24) -#define MCF_SDRAMC_SDCR_REF (0x10000000) -#define MCF_SDRAMC_SDCR_DDR (0x20000000) -#define MCF_SDRAMC_SDCR_CKE (0x40000000) -#define MCF_SDRAMC_SDCR_MODE_EN (0x80000000) -#define MCF_SDRAMC_SDCR_PS_16 (0x00002000) -#define MCF_SDRAMC_SDCR_PS_32 (0x00000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDCFG1 */ -#define MCF_SDRAMC_SDCFG1_WTLAT(x) (((x)&0x00000007)<<4) -#define MCF_SDRAMC_SDCFG1_REF2ACT(x) (((x)&0x0000000F)<<8) -#define MCF_SDRAMC_SDCFG1_PRE2ACT(x) (((x)&0x00000007)<<12) -#define MCF_SDRAMC_SDCFG1_ACT2RW(x) (((x)&0x00000007)<<16) -#define MCF_SDRAMC_SDCFG1_RDLAT(x) (((x)&0x0000000F)<<20) -#define MCF_SDRAMC_SDCFG1_SWT2RD(x) (((x)&0x00000007)<<24) -#define MCF_SDRAMC_SDCFG1_SRD2RW(x) (((x)&0x0000000F)<<28) - -/* Bit definitions and macros for MCF_SDRAMC_SDCFG2 */ -#define MCF_SDRAMC_SDCFG2_BL(x) (((x)&0x0000000F)<<16) -#define MCF_SDRAMC_SDCFG2_BRD2WT(x) (((x)&0x0000000F)<<20) -#define MCF_SDRAMC_SDCFG2_BWT2RW(x) (((x)&0x0000000F)<<24) -#define MCF_SDRAMC_SDCFG2_BRD2PRE(x) (((x)&0x0000000F)<<28) - -/* Device Errata - LIMP mode work around */ -#define MCF_SDRAMC_REFRESH (0x40000000) - -/* Bit definitions and macros for MCF_SDRAMC_SDDS */ -#define MCF_SDRAMC_SDDS_SB_D(x) (((x)&0x00000003)<<0) -#define MCF_SDRAMC_SDDS_SB_S(x) (((x)&0x00000003)<<2) -#define MCF_SDRAMC_SDDS_SB_A(x) (((x)&0x00000003)<<4) -#define MCF_SDRAMC_SDDS_SB_C(x) (((x)&0x00000003)<<6) -#define MCF_SDRAMC_SDDS_SB_E(x) (((x)&0x00000003)<<8) - -/* Bit definitions and macros for MCF_SDRAMC_SDCS */ -#define MCF_SDRAMC_SDCS_CSSZ(x) (((x)&0x0000001F)<<0) -#define MCF_SDRAMC_SDCS_BASE(x) (((x)&0x00000FFF)<<20) -#define MCF_SDRAMC_SDCS_BA(x) ((x)&0xFFF00000) -#define MCF_SDRAMC_SDCS_CSSZ_DIABLE (0x00000000) -#define MCF_SDRAMC_SDCS_CSSZ_1MBYTE (0x00000013) -#define MCF_SDRAMC_SDCS_CSSZ_2MBYTE (0x00000014) -#define MCF_SDRAMC_SDCS_CSSZ_4MBYTE (0x00000015) -#define MCF_SDRAMC_SDCS_CSSZ_8MBYTE (0x00000016) -#define MCF_SDRAMC_SDCS_CSSZ_16MBYTE (0x00000017) -#define MCF_SDRAMC_SDCS_CSSZ_32MBYTE (0x00000018) -#define MCF_SDRAMC_SDCS_CSSZ_64MBYTE (0x00000019) -#define MCF_SDRAMC_SDCS_CSSZ_128MBYTE (0x0000001A) -#define MCF_SDRAMC_SDCS_CSSZ_256MBYTE (0x0000001B) -#define MCF_SDRAMC_SDCS_CSSZ_512MBYTE (0x0000001C) -#define MCF_SDRAMC_SDCS_CSSZ_1GBYTE (0x0000001D) -#define MCF_SDRAMC_SDCS_CSSZ_2GBYTE (0x0000001E) -#define MCF_SDRAMC_SDCS_CSSZ_4GBYTE (0x0000001F) - -/********************************************************************* - * - * FlexCAN module registers - * - *********************************************************************/ -#define MCF_FLEXCAN_BASEADDR(x) (0xFC020000+(x)*0x0800) -#define MCF_FLEXCAN_CANMCR(x) MCF_REG32(0xFC020000+(x)*0x0800+0x00) -#define MCF_FLEXCAN_CANCTRL(x) MCF_REG32(0xFC020000+(x)*0x0800+0x04) -#define MCF_FLEXCAN_TIMER(x) MCF_REG32(0xFC020000+(x)*0x0800+0x08) -#define MCF_FLEXCAN_RXGMASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x10) -#define MCF_FLEXCAN_RX14MASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x14) -#define MCF_FLEXCAN_RX15MASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x18) -#define MCF_FLEXCAN_ERRCNT(x) MCF_REG32(0xFC020000+(x)*0x0800+0x1C) -#define MCF_FLEXCAN_ERRSTAT(x) MCF_REG32(0xFC020000+(x)*0x0800+0x20) -#define MCF_FLEXCAN_IMASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x28) -#define MCF_FLEXCAN_IFLAG(x) MCF_REG32(0xFC020000+(x)*0x0800+0x30) - -#define MCF_FLEXCAN_MB_CNT(x,y) MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x0) -#define MCF_FLEXCAN_MB_ID(x,y) MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x4) -#define MCF_FLEXCAN_MB_DB(x,y,z) MCF_REG08(0xFC020080+(x)*0x0800+(y)*0x10+0x8+(z)*0x1) - -/* - * FlexCAN Module Configuration Register - */ -#define CANMCR_MDIS (0x80000000) -#define CANMCR_FRZ (0x40000000) -#define CANMCR_HALT (0x10000000) -#define CANMCR_SOFTRST (0x02000000) -#define CANMCR_FRZACK (0x01000000) -#define CANMCR_SUPV (0x00800000) -#define CANMCR_MAXMB(x) ((x)&0x0F) - -/* - * FlexCAN Control Register - */ -#define CANCTRL_PRESDIV(x) (((x)&0xFF)<<24) -#define CANCTRL_RJW(x) (((x)&0x03)<<22) -#define CANCTRL_PSEG1(x) (((x)&0x07)<<19) -#define CANCTRL_PSEG2(x) (((x)&0x07)<<16) -#define CANCTRL_BOFFMSK (0x00008000) -#define CANCTRL_ERRMSK (0x00004000) -#define CANCTRL_CLKSRC (0x00002000) -#define CANCTRL_LPB (0x00001000) -#define CANCTRL_SAMP (0x00000080) -#define CANCTRL_BOFFREC (0x00000040) -#define CANCTRL_TSYNC (0x00000020) -#define CANCTRL_LBUF (0x00000010) -#define CANCTRL_LOM (0x00000008) -#define CANCTRL_PROPSEG(x) ((x)&0x07) - -/* - * FlexCAN Error Counter Register - */ -#define ERRCNT_RXECTR(x) (((x)&0xFF)<<8) -#define ERRCNT_TXECTR(x) ((x)&0xFF) - -/* - * FlexCAN Error and Status Register - */ -#define ERRSTAT_BITERR(x) (((x)&0x03)<<14) -#define ERRSTAT_ACKERR (0x00002000) -#define ERRSTAT_CRCERR (0x00001000) -#define ERRSTAT_FRMERR (0x00000800) -#define ERRSTAT_STFERR (0x00000400) -#define ERRSTAT_TXWRN (0x00000200) -#define ERRSTAT_RXWRN (0x00000100) -#define ERRSTAT_IDLE (0x00000080) -#define ERRSTAT_TXRX (0x00000040) -#define ERRSTAT_FLTCONF(x) (((x)&0x03)<<4) -#define ERRSTAT_BOFFINT (0x00000004) -#define ERRSTAT_ERRINT (0x00000002) - -/* - * Interrupt Mask Register - */ -#define IMASK_BUF15M (0x8000) -#define IMASK_BUF14M (0x4000) -#define IMASK_BUF13M (0x2000) -#define IMASK_BUF12M (0x1000) -#define IMASK_BUF11M (0x0800) -#define IMASK_BUF10M (0x0400) -#define IMASK_BUF9M (0x0200) -#define IMASK_BUF8M (0x0100) -#define IMASK_BUF7M (0x0080) -#define IMASK_BUF6M (0x0040) -#define IMASK_BUF5M (0x0020) -#define IMASK_BUF4M (0x0010) -#define IMASK_BUF3M (0x0008) -#define IMASK_BUF2M (0x0004) -#define IMASK_BUF1M (0x0002) -#define IMASK_BUF0M (0x0001) -#define IMASK_BUFnM(x) (0x1<<(x)) -#define IMASK_BUFF_ENABLE_ALL (0x1111) -#define IMASK_BUFF_DISABLE_ALL (0x0000) - -/* - * Interrupt Flag Register - */ -#define IFLAG_BUF15M (0x8000) -#define IFLAG_BUF14M (0x4000) -#define IFLAG_BUF13M (0x2000) -#define IFLAG_BUF12M (0x1000) -#define IFLAG_BUF11M (0x0800) -#define IFLAG_BUF10M (0x0400) -#define IFLAG_BUF9M (0x0200) -#define IFLAG_BUF8M (0x0100) -#define IFLAG_BUF7M (0x0080) -#define IFLAG_BUF6M (0x0040) -#define IFLAG_BUF5M (0x0020) -#define IFLAG_BUF4M (0x0010) -#define IFLAG_BUF3M (0x0008) -#define IFLAG_BUF2M (0x0004) -#define IFLAG_BUF1M (0x0002) -#define IFLAG_BUF0M (0x0001) -#define IFLAG_BUFF_SET_ALL (0xFFFF) -#define IFLAG_BUFF_CLEAR_ALL (0x0000) -#define IFLAG_BUFnM(x) (0x1<<(x)) - -/* - * Message Buffers - */ -#define MB_CNT_CODE(x) (((x)&0x0F)<<24) -#define MB_CNT_SRR (0x00400000) -#define MB_CNT_IDE (0x00200000) -#define MB_CNT_RTR (0x00100000) -#define MB_CNT_LENGTH(x) (((x)&0x0F)<<16) -#define MB_CNT_TIMESTAMP(x) ((x)&0xFFFF) -#define MB_ID_STD(x) (((x)&0x07FF)<<18) -#define MB_ID_EXT(x) ((x)&0x3FFFF) - -/********************************************************************* - * - * Edge Port Module (EPORT) - * - *********************************************************************/ - -/* Register read/write macros */ -#define MCF_EPORT_EPPAR MCF_REG16(0xFC094000) -#define MCF_EPORT_EPDDR MCF_REG08(0xFC094002) -#define MCF_EPORT_EPIER MCF_REG08(0xFC094003) -#define MCF_EPORT_EPDR MCF_REG08(0xFC094004) -#define MCF_EPORT_EPPDR MCF_REG08(0xFC094005) -#define MCF_EPORT_EPFR MCF_REG08(0xFC094006) - -/* Bit definitions and macros for MCF_EPORT_EPPAR */ -#define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) -#define MCF_EPORT_EPPAR_EPPA2(x) (((x)&0x0003)<<4) -#define MCF_EPORT_EPPAR_EPPA3(x) (((x)&0x0003)<<6) -#define MCF_EPORT_EPPAR_EPPA4(x) (((x)&0x0003)<<8) -#define MCF_EPORT_EPPAR_EPPA5(x) (((x)&0x0003)<<10) -#define MCF_EPORT_EPPAR_EPPA6(x) (((x)&0x0003)<<12) -#define MCF_EPORT_EPPAR_EPPA7(x) (((x)&0x0003)<<14) -#define MCF_EPORT_EPPAR_LEVEL (0) -#define MCF_EPORT_EPPAR_RISING (1) -#define MCF_EPORT_EPPAR_FALLING (2) -#define MCF_EPORT_EPPAR_BOTH (3) -#define MCF_EPORT_EPPAR_EPPA7_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA7_RISING (0x4000) -#define MCF_EPORT_EPPAR_EPPA7_FALLING (0x8000) -#define MCF_EPORT_EPPAR_EPPA7_BOTH (0xC000) -#define MCF_EPORT_EPPAR_EPPA6_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA6_RISING (0x1000) -#define MCF_EPORT_EPPAR_EPPA6_FALLING (0x2000) -#define MCF_EPORT_EPPAR_EPPA6_BOTH (0x3000) -#define MCF_EPORT_EPPAR_EPPA5_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA5_RISING (0x0400) -#define MCF_EPORT_EPPAR_EPPA5_FALLING (0x0800) -#define MCF_EPORT_EPPAR_EPPA5_BOTH (0x0C00) -#define MCF_EPORT_EPPAR_EPPA4_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA4_RISING (0x0100) -#define MCF_EPORT_EPPAR_EPPA4_FALLING (0x0200) -#define MCF_EPORT_EPPAR_EPPA4_BOTH (0x0300) -#define MCF_EPORT_EPPAR_EPPA3_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA3_RISING (0x0040) -#define MCF_EPORT_EPPAR_EPPA3_FALLING (0x0080) -#define MCF_EPORT_EPPAR_EPPA3_BOTH (0x00C0) -#define MCF_EPORT_EPPAR_EPPA2_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA2_RISING (0x0010) -#define MCF_EPORT_EPPAR_EPPA2_FALLING (0x0020) -#define MCF_EPORT_EPPAR_EPPA2_BOTH (0x0030) -#define MCF_EPORT_EPPAR_EPPA1_LEVEL (0x0000) -#define MCF_EPORT_EPPAR_EPPA1_RISING (0x0004) -#define MCF_EPORT_EPPAR_EPPA1_FALLING (0x0008) -#define MCF_EPORT_EPPAR_EPPA1_BOTH (0x000C) - -/* Bit definitions and macros for MCF_EPORT_EPDDR */ -#define MCF_EPORT_EPDDR_EPDD1 (0x02) -#define MCF_EPORT_EPDDR_EPDD2 (0x04) -#define MCF_EPORT_EPDDR_EPDD3 (0x08) -#define MCF_EPORT_EPDDR_EPDD4 (0x10) -#define MCF_EPORT_EPDDR_EPDD5 (0x20) -#define MCF_EPORT_EPDDR_EPDD6 (0x40) -#define MCF_EPORT_EPDDR_EPDD7 (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPIER */ -#define MCF_EPORT_EPIER_EPIE1 (0x02) -#define MCF_EPORT_EPIER_EPIE2 (0x04) -#define MCF_EPORT_EPIER_EPIE3 (0x08) -#define MCF_EPORT_EPIER_EPIE4 (0x10) -#define MCF_EPORT_EPIER_EPIE5 (0x20) -#define MCF_EPORT_EPIER_EPIE6 (0x40) -#define MCF_EPORT_EPIER_EPIE7 (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPDR */ -#define MCF_EPORT_EPDR_EPD1 (0x02) -#define MCF_EPORT_EPDR_EPD2 (0x04) -#define MCF_EPORT_EPDR_EPD3 (0x08) -#define MCF_EPORT_EPDR_EPD4 (0x10) -#define MCF_EPORT_EPDR_EPD5 (0x20) -#define MCF_EPORT_EPDR_EPD6 (0x40) -#define MCF_EPORT_EPDR_EPD7 (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPPDR */ -#define MCF_EPORT_EPPDR_EPPD1 (0x02) -#define MCF_EPORT_EPPDR_EPPD2 (0x04) -#define MCF_EPORT_EPPDR_EPPD3 (0x08) -#define MCF_EPORT_EPPDR_EPPD4 (0x10) -#define MCF_EPORT_EPPDR_EPPD5 (0x20) -#define MCF_EPORT_EPPDR_EPPD6 (0x40) -#define MCF_EPORT_EPPDR_EPPD7 (0x80) - -/* Bit definitions and macros for MCF_EPORT_EPFR */ -#define MCF_EPORT_EPFR_EPF1 (0x02) -#define MCF_EPORT_EPFR_EPF2 (0x04) -#define MCF_EPORT_EPFR_EPF3 (0x08) -#define MCF_EPORT_EPFR_EPF4 (0x10) -#define MCF_EPORT_EPFR_EPF5 (0x20) -#define MCF_EPORT_EPFR_EPF6 (0x40) -#define MCF_EPORT_EPFR_EPF7 (0x80) - -/********************************************************************/ -#endif /* m532xsim_h */ diff --git a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h index 7b61a8a52..9cb401421 100644 --- a/include/asm-m68knommu/mcfcache.h +++ b/include/asm-m68knommu/mcfcache.h @@ -11,6 +11,7 @@ #define __M68KNOMMU_MCFCACHE_H /****************************************************************************/ +#include /* * The different ColdFire families have different cache arrangments. @@ -92,21 +93,6 @@ .endm #endif /* CONFIG_M5249 || CONFIG_M5307 */ -#if defined(CONFIG_M532x) -.macro CACHE_ENABLE - movel #0x01000000,%d0 /* invalidate cache cmd */ - movec %d0,%CACR /* do invalidate cache */ - nop - movel #0x4001C000,%d0 /* set SDRAM cached (write-thru) */ - movec %d0,%ACR0 - movel #0x00000000,%d0 /* no other regions cached */ - movec %d0,%ACR1 - movel #0x80000200,%d0 /* setup cache mask */ - movec %d0,%CACR /* enable cache */ - nop -.endm -#endif /* CONFIG_M532x */ - #if defined(CONFIG_M5407) /* * Version 4 cores have a true harvard style separate instruction diff --git a/include/asm-m68knommu/mcfdma.h b/include/asm-m68knommu/mcfdma.h index ea729e81a..b93f8ba8a 100644 --- a/include/asm-m68knommu/mcfdma.h +++ b/include/asm-m68knommu/mcfdma.h @@ -11,6 +11,7 @@ #define mcfdma_h /****************************************************************************/ +#include /* * Get address specific defines for this Coldfire member. diff --git a/include/asm-m68knommu/mcfmbus.h b/include/asm-m68knommu/mcfmbus.h index 13df9d41b..4762589e8 100644 --- a/include/asm-m68knommu/mcfmbus.h +++ b/include/asm-m68knommu/mcfmbus.h @@ -11,6 +11,7 @@ #ifndef mcfmbus_h #define mcfmbus_h +#include #define MCFMBUS_BASE 0x280 diff --git a/include/asm-m68knommu/mcfne.h b/include/asm-m68knommu/mcfne.h index c920ccdb6..a71b1c8cb 100644 --- a/include/asm-m68knommu/mcfne.h +++ b/include/asm-m68knommu/mcfne.h @@ -18,6 +18,7 @@ #define mcfne_h /****************************************************************************/ +#include /* * Support for NE2000 clones devices in ColdFire based boards. diff --git a/include/asm-m68knommu/mcfpci.h b/include/asm-m68knommu/mcfpci.h index f1507dd06..d6229047d 100644 --- a/include/asm-m68knommu/mcfpci.h +++ b/include/asm-m68knommu/mcfpci.h @@ -12,6 +12,7 @@ #define mcfpci_h /****************************************************************************/ +#include #ifdef CONFIG_PCI diff --git a/include/asm-m68knommu/mcfpit.h b/include/asm-m68knommu/mcfpit.h index f570cf64f..a685f1b45 100644 --- a/include/asm-m68knommu/mcfpit.h +++ b/include/asm-m68knommu/mcfpit.h @@ -11,6 +11,7 @@ #define mcfpit_h /****************************************************************************/ +#include /* * Get address specific defines for the 5270/5271, 5280/5282, and 5208. @@ -28,9 +29,11 @@ /* * Define the PIT timer register set addresses. */ -#define MCFPIT_PCSR 0x0 /* PIT control register */ -#define MCFPIT_PMR 0x2 /* PIT modulus register */ -#define MCFPIT_PCNTR 0x4 /* PIT count register */ +struct mcfpit { + unsigned short pcsr; /* PIT control and status */ + unsigned short pmr; /* PIT modulus register */ + unsigned short pcntr; /* PIT count register */ +} __attribute__((packed)); /* * Bit definitions for the PIT Control and Status register. diff --git a/include/asm-m68knommu/mcfsim.h b/include/asm-m68knommu/mcfsim.h index 1074ae717..81d74a31d 100644 --- a/include/asm-m68knommu/mcfsim.h +++ b/include/asm-m68knommu/mcfsim.h @@ -12,6 +12,7 @@ #define mcfsim_h /****************************************************************************/ +#include /* * Include 5204, 5206/e, 5235, 5249, 5270/5271, 5272, 5280/5282, @@ -35,8 +36,6 @@ #include #elif defined(CONFIG_M5307) #include -#elif defined(CONFIG_M532x) -#include #elif defined(CONFIG_M5407) #include #endif @@ -102,7 +101,6 @@ #define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */ #endif - /* * PIT interrupt settings, if not found in mXXXXsim.h file. */ diff --git a/include/asm-m68knommu/mcfsmc.h b/include/asm-m68knommu/mcfsmc.h index 2d7a4dbd9..2583900b9 100644 --- a/include/asm-m68knommu/mcfsmc.h +++ b/include/asm-m68knommu/mcfsmc.h @@ -17,6 +17,7 @@ * allow 8 bit accesses. So this code is 16bit access only. */ +#include #undef outb #undef inb diff --git a/include/asm-m68knommu/mcftimer.h b/include/asm-m68knommu/mcftimer.h index 6f4d796e0..0f47164c3 100644 --- a/include/asm-m68knommu/mcftimer.h +++ b/include/asm-m68knommu/mcftimer.h @@ -3,7 +3,7 @@ /* * mcftimer.h -- ColdFire internal TIMER support defines. * - * (C) Copyright 1999-2006, Greg Ungerer + * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2000, Lineo Inc. (www.lineo.com) */ @@ -12,6 +12,7 @@ #define mcftimer_h /****************************************************************************/ +#include /* * Get address specific defines for this ColdFire member. @@ -27,11 +28,6 @@ #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) #define MCFTIMER_BASE1 0x140 /* Base address of TIMER1 */ #define MCFTIMER_BASE2 0x180 /* Base address of TIMER2 */ -#elif defined(CONFIG_M532x) -#define MCFTIMER_BASE1 0xfc070000 /* Base address of TIMER1 */ -#define MCFTIMER_BASE2 0xfc074000 /* Base address of TIMER2 */ -#define MCFTIMER_BASE3 0xfc078000 /* Base address of TIMER3 */ -#define MCFTIMER_BASE4 0xfc07c000 /* Base address of TIMER4 */ #endif @@ -39,14 +35,23 @@ * Define the TIMER register set addresses. */ #define MCFTIMER_TMR 0x00 /* Timer Mode reg (r/w) */ -#define MCFTIMER_TRR 0x04 /* Timer Reference (r/w) */ -#define MCFTIMER_TCR 0x08 /* Timer Capture reg (r/w) */ -#define MCFTIMER_TCN 0x0C /* Timer Counter reg (r/w) */ -#if defined(CONFIG_M532x) -#define MCFTIMER_TER 0x03 /* Timer Event reg (r/w) */ -#else +#define MCFTIMER_TRR 0x02 /* Timer Reference (r/w) */ +#define MCFTIMER_TCR 0x04 /* Timer Capture reg (r/w) */ +#define MCFTIMER_TCN 0x06 /* Timer Counter reg (r/w) */ #define MCFTIMER_TER 0x11 /* Timer Event reg (r/w) */ -#endif + +struct mcftimer { + unsigned short tmr; /* Timer Mode reg (r/w) */ + unsigned short reserved1; + unsigned short trr; /* Timer Reference (r/w) */ + unsigned short reserved2; + unsigned short tcr; /* Timer Capture reg (r/w) */ + unsigned short reserved3; + unsigned short tcn; /* Timer Counter reg (r/w) */ + unsigned short reserved4; + unsigned char reserved5; + unsigned char ter; /* Timer Event reg (r/w) */ +} __attribute__((packed)); /* * Bit definitions for the Timer Mode Register (TMR). diff --git a/include/asm-m68knommu/mcfuart.h b/include/asm-m68knommu/mcfuart.h index dc0146c52..b016fad83 100644 --- a/include/asm-m68knommu/mcfuart.h +++ b/include/asm-m68knommu/mcfuart.h @@ -12,6 +12,7 @@ #define mcfuart_h /****************************************************************************/ +#include /* * Define the base address of the UARTS within the MBAR address @@ -44,10 +45,6 @@ #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ -#elif defined(CONFIG_M532x) -#define MCFUART_BASE1 0xfc060000 /* Base address of UART1 */ -#define MCFUART_BASE2 0xfc064000 /* Base address of UART2 */ -#define MCFUART_BASE3 0xfc068000 /* Base address of UART3 */ #endif diff --git a/include/asm-m68knommu/mcfwdebug.h b/include/asm-m68knommu/mcfwdebug.h index 27f70e45d..6ceae1035 100644 --- a/include/asm-m68knommu/mcfwdebug.h +++ b/include/asm-m68knommu/mcfwdebug.h @@ -10,6 +10,7 @@ #ifndef mcfdebug_h #define mcfdebug_h /****************************************************************************/ +#include /* Define the debug module registers */ #define MCFDEBUG_CSR 0x0 /* Configuration status */ diff --git a/include/asm-m68knommu/mmu_context.h b/include/asm-m68knommu/mmu_context.h index 6c077d3a2..1e080eca9 100644 --- a/include/asm-m68knommu/mmu_context.h +++ b/include/asm-m68knommu/mmu_context.h @@ -1,6 +1,7 @@ #ifndef __M68KNOMMU_MMU_CONTEXT_H #define __M68KNOMMU_MMU_CONTEXT_H +#include #include #include #include diff --git a/include/asm-m68knommu/nettel.h b/include/asm-m68knommu/nettel.h index 0299f6a2d..9bda307e6 100644 --- a/include/asm-m68knommu/nettel.h +++ b/include/asm-m68knommu/nettel.h @@ -13,6 +13,7 @@ #define nettel_h /****************************************************************************/ +#include /****************************************************************************/ #ifdef CONFIG_NETtel diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index 385a34701..4b74349ff 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h @@ -1,7 +1,7 @@ #ifndef _M68KNOMMU_PAGE_H #define _M68KNOMMU_PAGE_H -#ifdef __KERNEL__ +#include /* PAGE_SHIFT determines the page size */ @@ -9,6 +9,8 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #include #ifndef __ASSEMBLY__ @@ -75,10 +77,10 @@ extern unsigned long memory_end; #endif /* __ASSEMBLY__ */ -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include + #endif /* _M68KNOMMU_PAGE_H */ diff --git a/include/asm-m68knommu/page_offset.h b/include/asm-m68knommu/page_offset.h index d4e73e0ba..2b45645e9 100644 --- a/include/asm-m68knommu/page_offset.h +++ b/include/asm-m68knommu/page_offset.h @@ -1,5 +1,47 @@ +#include /* This handles the memory map.. */ -#define PAGE_OFFSET_RAW CONFIG_RAMBASE + +#ifdef CONFIG_COLDFIRE +#if defined(CONFIG_SMALL) +#define PAGE_OFFSET_RAW 0x30020000 +#elif defined(CONFIG_CFV240) +#define PAGE_OFFSET_RAW 0x02000000 +#else +#define PAGE_OFFSET_RAW 0x00000000 +#endif +#endif + +#ifdef CONFIG_M68360 +#define PAGE_OFFSET_RAW 0x00000000 +#endif + +#ifdef CONFIG_PILOT +#ifdef CONFIG_M68328 +#define PAGE_OFFSET_RAW 0x10000000 +#endif +#ifdef CONFIG_M68EZ328 +#define PAGE_OFFSET_RAW 0x00000000 +#endif +#endif +#ifdef CONFIG_UCSIMM +#define PAGE_OFFSET_RAW 0x00000000 +#endif + +#if defined(CONFIG_UCDIMM) || defined(CONFIG_DRAGEN2) +#ifdef CONFIG_M68VZ328 +#define PAGE_OFFSET_RAW 0x00000000 +#endif /* CONFIG_M68VZ328 */ +#endif /* CONFIG_UCDIMM */ + +#ifdef CONFIG_M68EZ328ADS +#define PAGE_OFFSET_RAW 0x00000000 +#endif +#ifdef CONFIG_ALMA_ANS +#define PAGE_OFFSET_RAW 0x00000000 +#endif +#ifdef CONFIG_M68EN302 +#define PAGE_OFFSET_RAW 0x00000000 +#endif diff --git a/include/asm-m68knommu/param.h b/include/asm-m68knommu/param.h index 4c9904d65..3f57d5db8 100644 --- a/include/asm-m68knommu/param.h +++ b/include/asm-m68knommu/param.h @@ -1,6 +1,7 @@ #ifndef _M68KNOMMU_PARAM_H #define _M68KNOMMU_PARAM_H +#include #if defined(CONFIG_CLEOPATRA) #define HZ 1000 diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index 549ad231e..00893055e 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h @@ -7,6 +7,7 @@ * (C) Copyright 2000-2002, Greg Ungerer */ +#include #include #include #include diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h index 9d3a1bf41..ba393b1a0 100644 --- a/include/asm-m68knommu/processor.h +++ b/include/asm-m68knommu/processor.h @@ -13,7 +13,7 @@ */ #define current_text_addr() ({ __label__ _l; _l: &&_l;}) -#include +#include #include #include #include @@ -78,32 +78,20 @@ struct thread_struct { {0, 0}, 0, {0,}, {0, 0, 0}, {0,}, \ } -/* - * Coldfire stacks need to be re-aligned on trap exit, conventional - * 68k can handle this case cleanly. - */ -#if defined(CONFIG_COLDFIRE) -#define reformat(_regs) do { (_regs)->format = 0x4; } while(0) -#else -#define reformat(_regs) do { } while (0) -#endif - /* * Do necessary setup to start up a newly executed thread. * * pass the data segment into user programs if it exists, * it can't hurt anything as far as I can tell */ -#define start_thread(_regs, _pc, _usp) \ -do { \ - set_fs(USER_DS); /* reads from user space */ \ - (_regs)->pc = (_pc); \ - ((struct switch_stack *)(_regs))[-1].a6 = 0; \ - reformat(_regs); \ - if (current->mm) \ - (_regs)->d5 = current->mm->start_data; \ - (_regs)->sr &= ~0x2000; \ - wrusp(_usp); \ +#define start_thread(_regs, _pc, _usp) \ +do { \ + set_fs(USER_DS); /* reads from user space */ \ + (_regs)->pc = (_pc); \ + if (current->mm) \ + (_regs)->d5 = current->mm->start_data; \ + (_regs)->sr &= ~0x2000; \ + wrusp(_usp); \ } while(0) /* Forward declaration, a strange C thing */ @@ -138,6 +126,6 @@ unsigned long get_wchan(struct task_struct *p); eip; }) #define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) #endif diff --git a/include/asm-m68knommu/ptrace.h b/include/asm-m68knommu/ptrace.h index 47258e86e..f65bd9074 100644 --- a/include/asm-m68knommu/ptrace.h +++ b/include/asm-m68knommu/ptrace.h @@ -46,9 +46,11 @@ struct pt_regs { #else unsigned short sr; unsigned long pc; +#ifndef NO_FORMAT_VEC unsigned format : 4; /* frame format specifier */ unsigned vector : 12; /* vector offset */ #endif +#endif }; /* @@ -68,7 +70,7 @@ struct switch_stack { /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ #define PTRACE_GETREGS 12 #define PTRACE_SETREGS 13 -#ifdef CONFIG_FPU +#ifdef COFNIG_FPU #define PTRACE_GETFPREGS 14 #define PTRACE_SETFPREGS 15 #endif diff --git a/include/asm-m68knommu/semaphore-helper.h b/include/asm-m68knommu/semaphore-helper.h index 43da7bc48..a6586417c 100644 --- a/include/asm-m68knommu/semaphore-helper.h +++ b/include/asm-m68knommu/semaphore-helper.h @@ -9,6 +9,7 @@ * m68k version by Andreas Schwab */ +#include /* * These two _must_ execute atomically wrt each other. diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h index 216c08be5..1d13187f6 100644 --- a/include/asm-m68knommu/signal.h +++ b/include/asm-m68knommu/signal.h @@ -74,6 +74,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -93,6 +94,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ /* * sigaltstack controls diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 2a8144986..6338afc85 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h @@ -1,6 +1,7 @@ #ifndef _M68KNOMMU_SYSTEM_H #define _M68KNOMMU_SYSTEM_H +#include /* get configuration macros */ #include #include #include @@ -106,6 +107,7 @@ asmlinkage void resume(void); #define wmb() asm volatile ("" : : :"memory") #define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h index 62b29b10b..05be9515a 100644 --- a/include/asm-m68knommu/uaccess.h +++ b/include/asm-m68knommu/uaccess.h @@ -93,7 +93,7 @@ extern int __put_user_bad(void); #define get_user(x, ptr) \ ({ \ int __gu_err = 0; \ - typeof(x) __gu_val = 0; \ + typeof(*(ptr)) __gu_val = 0; \ switch (sizeof(*(ptr))) { \ case 1: \ __get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \ @@ -105,23 +105,23 @@ extern int __put_user_bad(void); __get_user_asm(__gu_err, __gu_val, ptr, l, "=r"); \ break; \ case 8: \ - memcpy((void *) &__gu_val, ptr, sizeof (*(ptr))); \ + memcpy(&__gu_val, ptr, sizeof (*(ptr))); \ break; \ default: \ __gu_val = 0; \ __gu_err = __get_user_bad(); \ break; \ } \ - (x) = (typeof(*(ptr))) __gu_val; \ + (x) = __gu_val; \ __gu_err; \ }) #define __get_user(x, ptr) get_user(x, ptr) extern int __get_user_bad(void); -#define __get_user_asm(err,x,ptr,bwl,reg) \ - __asm__ ("move" #bwl " %1,%0" \ - : "=d" (x) \ +#define __get_user_asm(err,x,ptr,bwl,reg) \ + __asm__ ("move" #bwl " %1,%0" \ + : "=d" (x) \ : "m" (*__ptr(ptr))) #define copy_from_user(to, from, n) (memcpy(to, from, n), 0) diff --git a/include/asm-m68knommu/unaligned.h b/include/asm-m68knommu/unaligned.h index 869e9dd24..8876f034e 100644 --- a/include/asm-m68knommu/unaligned.h +++ b/include/asm-m68knommu/unaligned.h @@ -1,6 +1,7 @@ #ifndef __M68K_UNALIGNED_H #define __M68K_UNALIGNED_H +#include #ifdef CONFIG_COLDFIRE diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index 1b2abdf28..5373988a7 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h @@ -286,8 +286,6 @@ #define __NR_request_key 280 #define __NR_keyctl 281 -#ifdef __KERNEL__ - #define NR_syscalls 282 /* user-visible error numbers are in the range -1 - -122: see @@ -439,6 +437,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ return (type)__res; \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -461,6 +460,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -515,7 +515,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -525,5 +525,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_M68K_UNISTD_H_ */ diff --git a/include/asm-mips/Kbuild b/include/asm-mips/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-mips/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index ef33c3f13..2b3dc3bed 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h @@ -10,6 +10,7 @@ #ifdef __KERNEL__ +#include #endif diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h index 45c706e34..1386af1cb 100644 --- a/include/asm-mips/addrspace.h +++ b/include/asm-mips/addrspace.h @@ -10,6 +10,7 @@ #ifndef _ASM_ADDRSPACE_H #define _ASM_ADDRSPACE_H +#include #include /* @@ -132,22 +133,57 @@ || defined (CONFIG_CPU_NEVADA) \ || defined (CONFIG_CPU_TX49XX) \ || defined (CONFIG_CPU_MIPS64) +#define KUSIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define KUSIZE_64 _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K0SIZE _LLCONST_(0x0000001000000000) /* 2^^36 */ +#define K1SIZE _LLCONST_(0x0000001000000000) /* 2^^36 */ +#define K2SIZE _LLCONST_(0x000000ff80000000) +#define KSEGSIZE _LLCONST_(0x000000ff80000000) /* max syssegsz */ #define TO_PHYS_MASK _LLCONST_(0x0000000fffffffff) /* 2^^36 - 1 */ #endif #if defined (CONFIG_CPU_R8000) /* We keep KUSIZE consistent with R4000 for now (2^^40) instead of (2^^48) */ +#define KUSIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define KUSIZE_64 _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K0SIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K1SIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K2SIZE _LLCONST_(0x0001000000000000) +#define KSEGSIZE _LLCONST_(0x0000010000000000) /* max syssegsz */ #define TO_PHYS_MASK _LLCONST_(0x000000ffffffffff) /* 2^^40 - 1 */ #endif #if defined (CONFIG_CPU_R10000) +#define KUSIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define KUSIZE_64 _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K0SIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K1SIZE _LLCONST_(0x0000010000000000) /* 2^^40 */ +#define K2SIZE _LLCONST_(0x00000fff80000000) +#define KSEGSIZE _LLCONST_(0x00000fff80000000) /* max syssegsz */ #define TO_PHYS_MASK _LLCONST_(0x000000ffffffffff) /* 2^^40 - 1 */ #endif #if defined(CONFIG_CPU_SB1) || defined(CONFIG_CPU_SB1A) +#define KUSIZE _LLCONST_(0x0000100000000000) /* 2^^44 */ +#define KUSIZE_64 _LLCONST_(0x0000100000000000) /* 2^^44 */ +#define K0SIZE _LLCONST_(0x0000100000000000) /* 2^^44 */ +#define K1SIZE _LLCONST_(0x0000100000000000) /* 2^^44 */ +#define K2SIZE _LLCONST_(0x0000ffff80000000) +#define KSEGSIZE _LLCONST_(0x0000ffff80000000) /* max syssegsz */ #define TO_PHYS_MASK _LLCONST_(0x00000fffffffffff) /* 2^^44 - 1 */ #endif +/* + * Further names for SGI source compatibility. These are stolen from + * IRIX's . + */ +#define KUBASE _LLCONST_(0) +#define KUSIZE_32 _LLCONST_(0x0000000080000000) /* KUSIZE + for a 32 bit proc */ +#define K0BASE_EXL_WR _LLCONST_(0xa800000000000000) /* exclusive on write */ +#define K0BASE_NONCOH _LLCONST_(0x9800000000000000) /* noncoherent */ +#define K0BASE_EXL _LLCONST_(0xa000000000000000) /* exclusive */ + #ifndef CONFIG_CPU_R8000 /* diff --git a/include/asm-mips/apm.h b/include/asm-mips/apm.h deleted file mode 100644 index 4b99ffc11..000000000 --- a/include/asm-mips/apm.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- linux-c -*- - * - * (C) 2003 zecke@handhelds.org - * - * GPL version 2 - * - * based on arch/arm/kernel/apm.c - * factor out the information needed by architectures to provide - * apm status - * - * - */ -#ifndef MIPS_ASM_SA1100_APM_H -#define MIPS_ASM_SA1100_APM_H - -#include - -/* - * This structure gets filled in by the machine specific 'get_power_status' - * implementation. Any fields which are not set default to a safe value. - */ -struct apm_power_info { - unsigned char ac_line_status; -#define APM_AC_OFFLINE 0 -#define APM_AC_ONLINE 1 -#define APM_AC_BACKUP 2 -#define APM_AC_UNKNOWN 0xff - - unsigned char battery_status; -#define APM_BATTERY_STATUS_HIGH 0 -#define APM_BATTERY_STATUS_LOW 1 -#define APM_BATTERY_STATUS_CRITICAL 2 -#define APM_BATTERY_STATUS_CHARGING 3 -#define APM_BATTERY_STATUS_NOT_PRESENT 4 -#define APM_BATTERY_STATUS_UNKNOWN 0xff - - unsigned char battery_flag; -#define APM_BATTERY_FLAG_HIGH (1 << 0) -#define APM_BATTERY_FLAG_LOW (1 << 1) -#define APM_BATTERY_FLAG_CRITICAL (1 << 2) -#define APM_BATTERY_FLAG_CHARGING (1 << 3) -#define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) -#define APM_BATTERY_FLAG_UNKNOWN 0xff - - int battery_life; - int time; - int units; -#define APM_UNITS_MINS 0 -#define APM_UNITS_SECS 1 -#define APM_UNITS_UNKNOWN -1 - -}; - -/* - * This allows machines to provide their own "apm get power status" function. - */ -extern void (*apm_get_power_status)(struct apm_power_info *); - -/* - * Queue an event (APM_SYS_SUSPEND or APM_CRITICAL_SUSPEND) - */ -void apm_queue_event(apm_event_t event); - -#endif diff --git a/include/asm-mips/arc/types.h b/include/asm-mips/arc/types.h index b9adcd6f0..bbb725c36 100644 --- a/include/asm-mips/arc/types.h +++ b/include/asm-mips/arc/types.h @@ -9,6 +9,7 @@ #ifndef _ASM_ARC_TYPES_H #define _ASM_ARC_TYPES_H +#include #ifdef CONFIG_ARC32 diff --git a/include/asm-mips/asm.h b/include/asm-mips/asm.h index e3038a459..4b090f314 100644 --- a/include/asm-mips/asm.h +++ b/include/asm-mips/asm.h @@ -17,6 +17,7 @@ #ifndef __ASM_ASM_H #define __ASM_ASM_H +#include #include #ifndef CAT diff --git a/include/asm-mips/asmmacro-32.h b/include/asm-mips/asmmacro-32.h index 5de3963f5..11daf5ceb 100644 --- a/include/asm-mips/asmmacro-32.h +++ b/include/asm-mips/asmmacro-32.h @@ -12,7 +12,7 @@ #include #include - .macro fpu_save_double thread status tmp1=t0 + .macro fpu_save_double thread status tmp1=t0 tmp2 cfc1 \tmp1, fcr31 sdc1 $f0, THREAD_FPR0(\thread) sdc1 $f2, THREAD_FPR2(\thread) @@ -70,7 +70,7 @@ sw \tmp, THREAD_FCR31(\thread) .endm - .macro fpu_restore_double thread status tmp=t0 + .macro fpu_restore_double thread tmp=t0 lw \tmp, THREAD_FCR31(\thread) ldc1 $f0, THREAD_FPR0(\thread) ldc1 $f2, THREAD_FPR2(\thread) diff --git a/include/asm-mips/asmmacro-64.h b/include/asm-mips/asmmacro-64.h index 225feefcb..559c355b9 100644 --- a/include/asm-mips/asmmacro-64.h +++ b/include/asm-mips/asmmacro-64.h @@ -53,12 +53,12 @@ sdc1 $f31, THREAD_FPR31(\thread) .endm - .macro fpu_save_double thread status tmp - sll \tmp, \status, 5 - bgez \tmp, 2f + .macro fpu_save_double thread status tmp1 tmp2 + sll \tmp2, \tmp1, 5 + bgez \tmp2, 2f fpu_save_16odd \thread 2: - fpu_save_16even \thread \tmp + fpu_save_16even \thread \tmp1 # clobbers t1 .endm .macro fpu_restore_16even thread tmp=t0 @@ -101,12 +101,13 @@ ldc1 $f31, THREAD_FPR31(\thread) .endm - .macro fpu_restore_double thread status tmp - sll \tmp, \status, 5 - bgez \tmp, 1f # 16 register mode? + .macro fpu_restore_double thread tmp + mfc0 t0, CP0_STATUS + sll t1, t0, 5 + bgez t1, 1f # 16 register mode? - fpu_restore_16odd \thread -1: fpu_restore_16even \thread \tmp + fpu_restore_16odd a0 +1: fpu_restore_16even a0, t0 # clobbers t0 .endm .macro cpu_save_nonscratch thread diff --git a/include/asm-mips/asmmacro.h b/include/asm-mips/asmmacro.h index 92e62ef71..f54aa147e 100644 --- a/include/asm-mips/asmmacro.h +++ b/include/asm-mips/asmmacro.h @@ -8,6 +8,7 @@ #ifndef _ASM_ASMMACRO_H #define _ASM_ASMMACRO_H +#include #include #ifdef CONFIG_32BIT @@ -26,14 +27,14 @@ ori \reg, \reg, TCSTATUS_IXMT xori \reg, \reg, TCSTATUS_IXMT mtc0 \reg, CP0_TCSTATUS - _ehb + ehb .endm .macro local_irq_disable reg=t0 mfc0 \reg, CP0_TCSTATUS ori \reg, \reg, TCSTATUS_IXMT mtc0 \reg, CP0_TCSTATUS - _ehb + ehb .endm #else .macro local_irq_enable reg=t0 diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index e64abc0d8..2c8b85337 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h @@ -17,13 +17,14 @@ * we have to include outside the * main big wrapper ... */ +#include #include #ifndef _ASM_ATOMIC_H #define _ASM_ATOMIC_H -#include #include +#include #include typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-mips/bcache.h b/include/asm-mips/bcache.h index 3646a3f2e..446102b34 100644 --- a/include/asm-mips/bcache.h +++ b/include/asm-mips/bcache.h @@ -9,6 +9,7 @@ #ifndef _ASM_BCACHE_H #define _ASM_BCACHE_H +#include /* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent, chipset implemented caches. On machines with other CPUs the CPU does the diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 1bb89c5a1..d2f444537 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -9,6 +9,7 @@ #ifndef _ASM_BITOPS_H #define _ASM_BITOPS_H +#include #include #include #include @@ -31,7 +32,7 @@ #ifdef __KERNEL__ -#include +#include #include #include diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 3b745e76f..14fc88f27 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h @@ -217,13 +217,6 @@ */ #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ -#define MACH_TITAN_EXCITE 2 /* Basler eXcite */ - -/* - * Valid machtype for group NEC EMMA2RH - */ -#define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ -#define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ #define CL_SIZE COMMAND_LINE_SIZE @@ -265,10 +258,4 @@ extern char arcs_cmdline[CL_SIZE]; * Registers a0, a1, a3 and a4 as passed to the kenrel entry by firmware */ extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3; - -/* - * Platform memory detection hook called by setup_arch - */ -extern void plat_mem_setup(void); - #endif /* _ASM_BOOTINFO_H */ diff --git a/include/asm-mips/bug.h b/include/asm-mips/bug.h index 7b4739dc8..87d49a5bd 100644 --- a/include/asm-mips/bug.h +++ b/include/asm-mips/bug.h @@ -1,6 +1,7 @@ #ifndef __ASM_BUG_H #define __ASM_BUG_H +#include #ifdef CONFIG_BUG diff --git a/include/asm-mips/bugs.h b/include/asm-mips/bugs.h index 0d7f9c1f5..cb2ea7c15 100644 --- a/include/asm-mips/bugs.h +++ b/include/asm-mips/bugs.h @@ -7,6 +7,7 @@ #ifndef _ASM_BUGS_H #define _ASM_BUGS_H +#include #include #include #include diff --git a/include/asm-mips/byteorder.h b/include/asm-mips/byteorder.h index eee83cbdf..aefc02f16 100644 --- a/include/asm-mips/byteorder.h +++ b/include/asm-mips/byteorder.h @@ -8,6 +8,7 @@ #ifndef _ASM_BYTEORDER_H #define _ASM_BYTEORDER_H +#include #include #include diff --git a/include/asm-mips/cache.h b/include/asm-mips/cache.h index 37f175c42..55e19f2ff 100644 --- a/include/asm-mips/cache.h +++ b/include/asm-mips/cache.h @@ -9,6 +9,7 @@ #ifndef _ASM_CACHE_H #define _ASM_CACHE_H +#include #include #define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index a5e6050ec..b09f8971e 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -11,6 +11,7 @@ #ifndef _ASM_CHECKSUM_H #define _ASM_CHECKSUM_H +#include #include #include diff --git a/include/asm-mips/compat.h b/include/asm-mips/compat.h index 900f472fd..986511db5 100644 --- a/include/asm-mips/compat.h +++ b/include/asm-mips/compat.h @@ -145,5 +145,8 @@ static inline void __user *compat_alloc_user_space(long len) return (void __user *) (regs->regs[29] - len); } +#if defined (__MIPSEL__) +#define __COMPAT_ENDIAN_SWAP__ 1 +#endif #endif /* _ASM_COMPAT_H */ diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index eadca266f..254e11ed2 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h @@ -9,6 +9,7 @@ #ifndef __ASM_CPU_FEATURES_H #define __ASM_CPU_FEATURES_H +#include #include #include @@ -143,8 +144,12 @@ #define cpu_has_dsp (cpu_data[0].ases & MIPS_ASE_DSP) #endif +#ifdef CONFIG_MIPS_MT #ifndef cpu_has_mipsmt -#define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) +# define cpu_has_mipsmt (cpu_data[0].ases & MIPS_ASE_MIPSMT) +#endif +#else +# define cpu_has_mipsmt 0 #endif #ifdef CONFIG_32BIT @@ -183,20 +188,24 @@ # endif #endif -#if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint) -# define cpu_has_vint (cpu_data[0].options & MIPS_CPU_VINT) -#elif !defined(cpu_has_vint) +#ifdef CONFIG_CPU_MIPSR2 +# if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint) +# define cpu_has_vint (cpu_data[0].options & MIPS_CPU_VINT) +# else +# define cpu_has_vint 0 +# endif +# if defined(CONFIG_CPU_MIPSR2_IRQ_EI) && !defined(cpu_has_veic) +# define cpu_has_veic (cpu_data[0].options & MIPS_CPU_VEIC) +# else +# define cpu_has_veic 0 +# endif +#else # define cpu_has_vint 0 -#endif - -#if defined(CONFIG_CPU_MIPSR2_IRQ_EI) && !defined(cpu_has_veic) -# define cpu_has_veic (cpu_data[0].options & MIPS_CPU_VEIC) -#elif !defined(cpu_has_veic) # define cpu_has_veic 0 #endif -#ifndef cpu_has_inclusive_pcaches -#define cpu_has_inclusive_pcaches (cpu_data[0].options & MIPS_CPU_INCLUSIVE_CACHES) +#ifndef cpu_has_subset_pcaches +#define cpu_has_subset_pcaches (cpu_data[0].options & MIPS_CPU_SUBSET_CACHES) #endif #ifndef cpu_dcache_line_size diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index a2f0c8ea9..6572ac703 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h @@ -12,6 +12,7 @@ #ifndef __ASM_CPU_INFO_H #define __ASM_CPU_INFO_H +#include #include #ifdef CONFIG_SGI_IP27 diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index d38fdbf84..dff2a0a52 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h @@ -242,7 +242,7 @@ #define MIPS_CPU_EJTAG 0x00008000 /* EJTAG exception */ #define MIPS_CPU_NOFPUEX 0x00010000 /* no FPU exception */ #define MIPS_CPU_LLSC 0x00020000 /* CPU has ll/sc instructions */ -#define MIPS_CPU_INCLUSIVE_CACHES 0x00040000 /* P-cache subset enforced */ +#define MIPS_CPU_SUBSET_CACHES 0x00040000 /* P-cache subset enforced */ #define MIPS_CPU_PREFETCH 0x00080000 /* CPU has usable prefetch */ #define MIPS_CPU_VINT 0x00100000 /* CPU supports MIPSR2 vectored interrupts */ #define MIPS_CPU_VEIC 0x00200000 /* CPU supports MIPSR2 external interrupt controller mode */ diff --git a/include/asm-mips/ddb5074.h b/include/asm-mips/ddb5074.h new file mode 100644 index 000000000..0d09ac27f --- /dev/null +++ b/include/asm-mips/ddb5074.h @@ -0,0 +1,11 @@ +/* + * include/asm-mips/ddb5074.h -- NEC DDB Vrc-5074 definitions + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + */ + +extern void ddb5074_led_hex(int hex); +extern void ddb5074_led_d2(int on); +extern void ddb5074_led_d3(int on); + diff --git a/include/asm-mips/ddb5xxx/ddb5074.h b/include/asm-mips/ddb5xxx/ddb5074.h new file mode 100644 index 000000000..58d88306a --- /dev/null +++ b/include/asm-mips/ddb5xxx/ddb5074.h @@ -0,0 +1,38 @@ +/* + * include/asm-mips/ddb5074.h -- NEC DDB Vrc-5074 definitions + * + * Copyright (C) 2000 Geert Uytterhoeven + * Sony Software Development Center Europe (SDCE), Brussels + */ + +#ifndef _ASM_DDB5XXX_DDB5074_H +#define _ASM_DDB5XXX_DDB5074_H + +#include + +#define DDB_SDRAM_SIZE 0x04000000 /* 64MB */ + +#define DDB_PCI_IO_BASE 0x06000000 +#define DDB_PCI_IO_SIZE 0x02000000 /* 32 MB */ + +#define DDB_PCI_MEM_BASE 0x08000000 +#define DDB_PCI_MEM_SIZE 0x08000000 /* 128 MB */ + +#define DDB_PCI_CONFIG_BASE DDB_PCI_MEM_BASE +#define DDB_PCI_CONFIG_SIZE DDB_PCI_MEM_SIZE + +#define NILE4_PCI_IO_BASE 0xa6000000 +#define NILE4_PCI_MEM_BASE 0xa8000000 +#define NILE4_PCI_CFG_BASE NILE4_PCI_MEM_BASE +#define DDB_PCI_IACK_BASE NILE4_PCI_IO_BASE + +#define NILE4_IRQ_BASE NUM_I8259_INTERRUPTS +#define CPU_IRQ_BASE (NUM_NILE4_INTERRUPTS + NILE4_IRQ_BASE) +#define CPU_NILE4_CASCADE 2 + +extern void ddb5074_led_hex(int hex); +extern void ddb5074_led_d2(int on); +extern void ddb5074_led_d3(int on); + +extern void nile4_irq_setup(u32 base); +#endif diff --git a/include/asm-mips/ddb5xxx/ddb5476.h b/include/asm-mips/ddb5xxx/ddb5476.h new file mode 100644 index 000000000..4c23390d9 --- /dev/null +++ b/include/asm-mips/ddb5xxx/ddb5476.h @@ -0,0 +1,157 @@ +/* + * header file specific for ddb5476 + * + * Copyright (C) 2001 MontaVista Software Inc. + * Author: Jun Sun, jsun@mvista.com or jsun@junsun.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. + * + */ + +/* + * Memory map (physical address) + * + * Note most of the following address must be properly aligned by the + * corresponding size. For example, if PCI_IO_SIZE is 16MB, then + * PCI_IO_BASE must be aligned along 16MB boundary. + */ +#define DDB_SDRAM_BASE 0x00000000 +#define DDB_SDRAM_SIZE 0x04000000 /* 64MB */ + +#define DDB_DCS3_BASE 0x04000000 /* flash 1 */ +#define DDB_DCS3_SIZE 0x01000000 /* 16MB */ + +#define DDB_DCS2_BASE 0x05000000 /* flash 2 */ +#define DDB_DCS2_SIZE 0x01000000 /* 16MB */ + +#define DDB_PCI_IO_BASE 0x06000000 +#define DDB_PCI_IO_SIZE 0x02000000 /* 32 MB */ + +#define DDB_PCI_MEM_BASE 0x08000000 +#define DDB_PCI_MEM_SIZE 0x08000000 /* 128 MB */ + +#define DDB_DCS5_BASE 0x13000000 /* DDB status regs */ +#define DDB_DCS5_SIZE 0x00200000 /* 2MB, 8-bit */ + +#define DDB_DCS4_BASE 0x14000000 /* DDB control regs */ +#define DDB_DCS4_SIZE 0x00200000 /* 2MB, 8-bit */ + +#define DDB_INTCS_BASE 0x1fa00000 /* VRC5476 control regs */ +#define DDB_INTCS_SIZE 0x00200000 /* 2MB */ + +#define DDB_BOOTCS_BASE 0x1fc00000 /* Boot ROM / EPROM /Flash */ +#define DDB_BOOTCS_SIZE 0x00200000 /* 2 MB - doc says 4MB */ + + +/* aliases */ +#define DDB_PCI_CONFIG_BASE DDB_PCI_MEM_BASE +#define DDB_PCI_CONFIG_SIZE DDB_PCI_MEM_SIZE + +/* PCI intr ack share PCIW0 with PCI IO */ +#define DDB_PCI_IACK_BASE DDB_PCI_IO_BASE + +/* + * Interrupt mapping + * + * We have three interrupt controllers: + * + * . CPU itself - 8 sources + * . i8259 - 16 sources + * . vrc5476 - 16 sources + * + * They connected as follows: + * all vrc5476 interrupts are routed to cpu IP2 (by software setting) + * all i2869 are routed to INTC in vrc5476 (by hardware connection) + * + * All VRC5476 PCI interrupts are level-triggered (no ack needed). + * All PCI irq but INTC are active low. + */ + +/* + * irq number block assignment + */ + +#define NUM_CPU_IRQ 8 +#define NUM_I8259_IRQ 16 +#define NUM_VRC5476_IRQ 16 + +#define DDB_IRQ_BASE 0 + +#define I8259_IRQ_BASE DDB_IRQ_BASE +#define VRC5476_IRQ_BASE (I8259_IRQ_BASE + NUM_I8259_IRQ) +#define CPU_IRQ_BASE (VRC5476_IRQ_BASE + NUM_VRC5476_IRQ) + +/* + * vrc5476 irq defs, see page 52-64 of Vrc5074 system controller manual + */ + +#define VRC5476_IRQ_CPCE 0 /* cpu parity error */ +#define VRC5476_IRQ_CNTD 1 /* cpu no target */ +#define VRC5476_IRQ_MCE 2 /* memory check error */ +#define VRC5476_IRQ_DMA 3 /* DMA */ +#define VRC5476_IRQ_UART 4 /* vrc5476 builtin UART, not used */ +#define VRC5476_IRQ_WDOG 5 /* watchdog timer */ +#define VRC5476_IRQ_GPT 6 /* general purpose timer */ +#define VRC5476_IRQ_LBRT 7 /* local bus read timeout */ +#define VRC5476_IRQ_INTA 8 /* PCI INT #A */ +#define VRC5476_IRQ_INTB 9 /* PCI INT #B */ +#define VRC5476_IRQ_INTC 10 /* PCI INT #C */ +#define VRC5476_IRQ_INTD 11 /* PCI INT #D */ +#define VRC5476_IRQ_INTE 12 /* PCI INT #E */ +#define VRC5476_IRQ_RESERVED_13 13 /* reserved */ +#define VRC5476_IRQ_PCIS 14 /* PCI SERR # */ +#define VRC5476_IRQ_PCI 15 /* PCI internal error */ + +/* + * i2859 irq assignment + */ +#define I8259_IRQ_RESERVED_0 0 +#define I8259_IRQ_KEYBOARD 1 /* M1543 default */ +#define I8259_IRQ_CASCADE 2 +#define I8259_IRQ_UART_B 3 /* M1543 default, may conflict with RTC according to schematic diagram */ +#define I8259_IRQ_UART_A 4 /* M1543 default */ +#define I8259_IRQ_PARALLEL 5 /* M1543 default */ +#define I8259_IRQ_RESERVED_6 6 +#define I8259_IRQ_RESERVED_7 7 +#define I8259_IRQ_RTC 8 /* who set this? */ +#define I8259_IRQ_USB 9 /* ddb_setup */ +#define I8259_IRQ_PMU 10 /* ddb_setup */ +#define I8259_IRQ_RESERVED_11 11 +#define I8259_IRQ_RESERVED_12 12 /* m1543_irq_setup */ +#define I8259_IRQ_RESERVED_13 13 +#define I8259_IRQ_HDC1 14 /* default and ddb_setup */ +#define I8259_IRQ_HDC2 15 /* default */ + + +/* + * misc + */ +#define VRC5476_I8259_CASCADE VRC5476_IRQ_INTC +#define CPU_VRC5476_CASCADE 2 + +#define is_i8259_irq(irq) ((irq) < NUM_I8259_IRQ) +#define nile4_to_irq(n) ((n)+NUM_I8259_IRQ) +#define irq_to_nile4(n) ((n)-NUM_I8259_IRQ) + +/* + * low-level irq functions + */ +#ifndef __ASSEMBLY__ +extern void nile4_map_irq(int nile4_irq, int cpu_irq); +extern void nile4_map_irq_all(int cpu_irq); +extern void nile4_enable_irq(int nile4_irq); +extern void nile4_disable_irq(int nile4_irq); +extern void nile4_disable_irq_all(void); +extern u16 nile4_get_irq_stat(int cpu_irq); +extern void nile4_enable_irq_output(int cpu_irq); +extern void nile4_disable_irq_output(int cpu_irq); +extern void nile4_set_pci_irq_polarity(int pci_irq, int high); +extern void nile4_set_pci_irq_level_or_edge(int pci_irq, int level); +extern void nile4_clear_irq(int nile4_irq); +extern void nile4_clear_irq_mask(u32 mask); +extern u8 nile4_i8259_iack(void); +extern void nile4_dump_irq_status(void); /* Debug */ +#endif /* !__ASSEMBLY__ */ diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h index c5af4b73f..a438548e6 100644 --- a/include/asm-mips/ddb5xxx/ddb5477.h +++ b/include/asm-mips/ddb5xxx/ddb5477.h @@ -17,6 +17,7 @@ #ifndef __ASM_DDB5XXX_DDB5477_H #define __ASM_DDB5XXX_DDB5477_H +#include /* * This contains macros that are specific to DDB5477 or renamed from diff --git a/include/asm-mips/ddb5xxx/ddb5xxx.h b/include/asm-mips/ddb5xxx/ddb5xxx.h index e97fcc8d5..873c03f2c 100644 --- a/include/asm-mips/ddb5xxx/ddb5xxx.h +++ b/include/asm-mips/ddb5xxx/ddb5xxx.h @@ -18,6 +18,7 @@ #ifndef __ASM_DDB5XXX_DDB5XXX_H #define __ASM_DDB5XXX_DDB5XXX_H +#include #include /* @@ -173,8 +174,13 @@ static inline void ddb_sync(void) { +/* The DDB5074 doesn't seem to like these accesses. They kill the board on + * interrupt load + */ +#ifndef CONFIG_DDB5074 volatile u32 *p = (volatile u32 *)0xbfc00000; (void)(*p); +#endif } static inline void ddb_out32(u32 offset, u32 val) @@ -254,7 +260,11 @@ extern void ddb_pci_reset_bus(void); /* * include the board dependent part */ -#if defined(CONFIG_DDB5477) +#if defined(CONFIG_DDB5074) +#include +#elif defined(CONFIG_DDB5476) +#include +#elif defined(CONFIG_DDB5477) #include #else #error "Unknown DDB board!" diff --git a/include/asm-mips/debug.h b/include/asm-mips/debug.h index 1fd5a2b39..930f2b75e 100644 --- a/include/asm-mips/debug.h +++ b/include/asm-mips/debug.h @@ -15,6 +15,7 @@ #ifndef _ASM_DEBUG_H #define _ASM_DEBUG_H +#include /* * run-time macros for catching spurious errors. Eable CONFIG_RUNTIME_DEBUG in diff --git a/include/asm-mips/dec/prom.h b/include/asm-mips/dec/prom.h index b9c820368..1384dd096 100644 --- a/include/asm-mips/dec/prom.h +++ b/include/asm-mips/dec/prom.h @@ -15,6 +15,7 @@ #ifndef _ASM_DEC_PROM_H #define _ASM_DEC_PROM_H +#include #include #include diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index ea77050f8..928f30f8c 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h @@ -10,6 +10,7 @@ #ifndef _ASM_DELAY_H #define _ASM_DELAY_H +#include #include #include #include diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index e85849ac1..6aaf9939a 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h @@ -12,6 +12,7 @@ #ifndef _ASM_DMA_H #define _ASM_DMA_H +#include #include /* need byte IO */ #include /* And spinlocks */ #include diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index ebd6bfb19..bdc9de2df 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h @@ -8,6 +8,7 @@ #ifndef _ASM_ELF_H #define _ASM_ELF_H +#include /* ELF header e_flags defines. */ /* MIPS architecture level. */ diff --git a/include/asm-mips/emma2rh/emma2rh.h b/include/asm-mips/emma2rh/emma2rh.h deleted file mode 100644 index 4fb8df71c..000000000 --- a/include/asm-mips/emma2rh/emma2rh.h +++ /dev/null @@ -1,330 +0,0 @@ -/* - * include/asm-mips/emma2rh/emma2rh.h - * This file is EMMA2RH common header. - * - * Copyright (C) NEC Electronics Corporation 2005-2006 - * - * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h - * Copyright 2001 MontaVista Software 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 __ASM_EMMA2RH_EMMA2RH_H -#define __ASM_EMMA2RH_EMMA2RH_H - -/* - * EMMA2RH registers - */ -#define REGBASE 0x10000000 - -#define EMMA2RH_BHIF_STRAP_0 (0x000010+REGBASE) -#define EMMA2RH_BHIF_INT_ST_0 (0x000030+REGBASE) -#define EMMA2RH_BHIF_INT_ST_1 (0x000034+REGBASE) -#define EMMA2RH_BHIF_INT_ST_2 (0x000038+REGBASE) -#define EMMA2RH_BHIF_INT_EN_0 (0x000040+REGBASE) -#define EMMA2RH_BHIF_INT_EN_1 (0x000044+REGBASE) -#define EMMA2RH_BHIF_INT_EN_2 (0x000048+REGBASE) -#define EMMA2RH_BHIF_INT1_EN_0 (0x000050+REGBASE) -#define EMMA2RH_BHIF_INT1_EN_1 (0x000054+REGBASE) -#define EMMA2RH_BHIF_INT1_EN_2 (0x000058+REGBASE) -#define EMMA2RH_BHIF_SW_INT (0x000070+REGBASE) -#define EMMA2RH_BHIF_SW_INT_EN (0x000080+REGBASE) -#define EMMA2RH_BHIF_SW_INT_CLR (0x000090+REGBASE) -#define EMMA2RH_BHIF_MAIN_CTRL (0x0000b4+REGBASE) -#define EMMA2RH_BHIF_EXCEPT_VECT_BASE_ADDRESS (0x0000c0+REGBASE) -#define EMMA2RH_GPIO_DIR (0x110d20+REGBASE) -#define EMMA2RH_GPIO_INT_ST (0x110d30+REGBASE) -#define EMMA2RH_GPIO_INT_MASK (0x110d3c+REGBASE) -#define EMMA2RH_GPIO_INT_MODE (0x110d48+REGBASE) -#define EMMA2RH_GPIO_INT_CND_A (0x110d54+REGBASE) -#define EMMA2RH_GPIO_INT_CND_B (0x110d60+REGBASE) -#define EMMA2RH_PBRD_INT_EN (0x100010+REGBASE) -#define EMMA2RH_PBRD_CLKSEL (0x100028+REGBASE) -#define EMMA2RH_PFUR0_BASE (0x101000+REGBASE) -#define EMMA2RH_PFUR1_BASE (0x102000+REGBASE) -#define EMMA2RH_PFUR2_BASE (0x103000+REGBASE) -#define EMMA2RH_PIIC0_BASE (0x107000+REGBASE) -#define EMMA2RH_PIIC1_BASE (0x108000+REGBASE) -#define EMMA2RH_PIIC2_BASE (0x109000+REGBASE) -#define EMMA2RH_PCI_CONTROL (0x200000+REGBASE) -#define EMMA2RH_PCI_ARBIT_CTR (0x200004+REGBASE) -#define EMMA2RH_PCI_IWIN0_CTR (0x200010+REGBASE) -#define EMMA2RH_PCI_IWIN1_CTR (0x200014+REGBASE) -#define EMMA2RH_PCI_INIT_ESWP (0x200018+REGBASE) -#define EMMA2RH_PCI_INT (0x200020+REGBASE) -#define EMMA2RH_PCI_INT_EN (0x200024+REGBASE) -#define EMMA2RH_PCI_TWIN_CTR (0x200030+REGBASE) -#define EMMA2RH_PCI_TWIN_BADR (0x200034+REGBASE) -#define EMMA2RH_PCI_TWIN0_DADR (0x200038+REGBASE) -#define EMMA2RH_PCI_TWIN1_DADR (0x20003c+REGBASE) - -/* - * Memory map (physical address) - * - * Note most of the following address must be properly aligned by the - * corresponding size. For example, if PCI_IO_SIZE is 16MB, then - * PCI_IO_BASE must be aligned along 16MB boundary. - */ - -/* the actual ram size is detected at run-time */ -#define EMMA2RH_RAM_BASE 0x00000000 -#define EMMA2RH_RAM_SIZE 0x10000000 /* less than 256MB */ - -#define EMMA2RH_IO_BASE 0x10000000 -#define EMMA2RH_IO_SIZE 0x01000000 /* 16 MB */ - -#define EMMA2RH_GENERALIO_BASE 0x11000000 -#define EMMA2RH_GENERALIO_SIZE 0x01000000 /* 16 MB */ - -#define EMMA2RH_PCI_IO_BASE 0x12000000 -#define EMMA2RH_PCI_IO_SIZE 0x02000000 /* 32 MB */ - -#define EMMA2RH_PCI_MEM_BASE 0x14000000 -#define EMMA2RH_PCI_MEM_SIZE 0x08000000 /* 128 MB */ - -#define EMMA2RH_ROM_BASE 0x1c000000 -#define EMMA2RH_ROM_SIZE 0x04000000 /* 64 MB */ - -#define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE -#define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE - -#define NUM_CPU_IRQ 8 -#define NUM_EMMA2RH_IRQ 96 - -#define CPU_EMMA2RH_CASCADE 2 -#define EMMA2RH_IRQ_BASE 0 - -/* - * emma2rh irq defs - */ - -#define EMMA2RH_IRQ_INT0 (0 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT1 (1 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT2 (2 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT3 (3 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT4 (4 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT5 (5 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT6 (6 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT7 (7 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT8 (8 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT9 (9 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT10 (10 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT11 (11 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT12 (12 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT13 (13 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT14 (14 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT15 (15 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT16 (16 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT17 (17 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT18 (18 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT19 (19 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT20 (20 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT21 (21 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT22 (22 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT23 (23 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT24 (24 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT25 (25 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT26 (26 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT27 (27 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT28 (28 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT29 (29 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT30 (30 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT31 (31 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT32 (32 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT33 (33 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT34 (34 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT35 (35 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT36 (36 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT37 (37 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT38 (38 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT39 (39 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT40 (40 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT41 (41 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT42 (42 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT43 (43 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT44 (44 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT45 (45 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT46 (46 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT47 (47 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT48 (48 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT49 (49 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT50 (50 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT51 (51 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT52 (52 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT53 (53 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT54 (54 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT55 (55 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT56 (56 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT57 (57 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT58 (58 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT59 (59 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT60 (60 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT61 (61 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT62 (62 + EMMA2RH_IRQ_BASE) -#define EMMA2RH_IRQ_INT63 (63 + EMMA2RH_IRQ_BASE) - -#define EMMA2RH_IRQ_PFUR0 EMMA2RH_IRQ_INT49 -#define EMMA2RH_IRQ_PFUR1 EMMA2RH_IRQ_INT50 -#define EMMA2RH_IRQ_PFUR2 EMMA2RH_IRQ_INT51 -#define EMMA2RH_IRQ_PIIC0 EMMA2RH_IRQ_INT56 -#define EMMA2RH_IRQ_PIIC1 EMMA2RH_IRQ_INT57 -#define EMMA2RH_IRQ_PIIC2 EMMA2RH_IRQ_INT58 - -/* - * EMMA2RH Register Access - */ - -#define EMMA2RH_BASE (0xa0000000) - -static inline void emma2rh_sync(void) -{ - volatile u32 *p = (volatile u32 *)0xbfc00000; - (void)(*p); -} - -static inline void emma2rh_out32(u32 offset, u32 val) -{ - *(volatile u32 *)(EMMA2RH_BASE | offset) = val; - emma2rh_sync(); -} - -static inline u32 emma2rh_in32(u32 offset) -{ - u32 val = *(volatile u32 *)(EMMA2RH_BASE | offset); - emma2rh_sync(); - return val; -} - -static inline void emma2rh_out16(u32 offset, u16 val) -{ - *(volatile u16 *)(EMMA2RH_BASE | offset) = val; - emma2rh_sync(); -} - -static inline u16 emma2rh_in16(u32 offset) -{ - u16 val = *(volatile u16 *)(EMMA2RH_BASE | offset); - emma2rh_sync(); - return val; -} - -static inline void emma2rh_out8(u32 offset, u8 val) -{ - *(volatile u8 *)(EMMA2RH_BASE | offset) = val; - emma2rh_sync(); -} - -static inline u8 emma2rh_in8(u32 offset) -{ - u8 val = *(volatile u8 *)(EMMA2RH_BASE | offset); - emma2rh_sync(); - return val; -} - -/** - * IIC registers map - **/ - -/*---------------------------------------------------------------------------*/ -/* CNT - Control register (00H R/W) */ -/*---------------------------------------------------------------------------*/ -#define SPT 0x00000001 -#define STT 0x00000002 -#define ACKE 0x00000004 -#define WTIM 0x00000008 -#define SPIE 0x00000010 -#define WREL 0x00000020 -#define LREL 0x00000040 -#define IICE 0x00000080 -#define CNT_RESERVED 0x000000ff /* reserved bit 0 */ - -#define I2C_EMMA_START (IICE | STT) -#define I2C_EMMA_STOP (IICE | SPT) -#define I2C_EMMA_REPSTART I2C_EMMA_START - -/*---------------------------------------------------------------------------*/ -/* STA - Status register (10H Read) */ -/*---------------------------------------------------------------------------*/ -#define MSTS 0x00000080 -#define ALD 0x00000040 -#define EXC 0x00000020 -#define COI 0x00000010 -#define TRC 0x00000008 -#define ACKD 0x00000004 -#define STD 0x00000002 -#define SPD 0x00000001 - -/*---------------------------------------------------------------------------*/ -/* CSEL - Clock select register (20H R/W) */ -/*---------------------------------------------------------------------------*/ -#define FCL 0x00000080 -#define ND50 0x00000040 -#define CLD 0x00000020 -#define DAD 0x00000010 -#define SMC 0x00000008 -#define DFC 0x00000004 -#define CL 0x00000003 -#define CSEL_RESERVED 0x000000ff /* reserved bit 0 */ - -#define FAST397 0x0000008b -#define FAST297 0x0000008a -#define FAST347 0x0000000b -#define FAST260 0x0000000a -#define FAST130 0x00000008 -#define STANDARD108 0x00000083 -#define STANDARD83 0x00000082 -#define STANDARD95 0x00000003 -#define STANDARD73 0x00000002 -#define STANDARD36 0x00000001 -#define STANDARD71 0x00000000 - -/*---------------------------------------------------------------------------*/ -/* SVA - Slave address register (30H R/W) */ -/*---------------------------------------------------------------------------*/ -#define SVA 0x000000fe - -/*---------------------------------------------------------------------------*/ -/* SHR - Shift register (40H R/W) */ -/*---------------------------------------------------------------------------*/ -#define SR 0x000000ff - -/*---------------------------------------------------------------------------*/ -/* INT - Interrupt register (50H R/W) */ -/* INTM - Interrupt mask register (60H R/W) */ -/*---------------------------------------------------------------------------*/ -#define INTE0 0x00000001 - -/*********************************************************************** - * I2C registers - *********************************************************************** - */ -#define I2C_EMMA_CNT 0x00 -#define I2C_EMMA_STA 0x10 -#define I2C_EMMA_CSEL 0x20 -#define I2C_EMMA_SVA 0x30 -#define I2C_EMMA_SHR 0x40 -#define I2C_EMMA_INT 0x50 -#define I2C_EMMA_INTM 0x60 - -/* - * include the board dependent part - */ -#if defined(CONFIG_MARKEINS) -#include -#else -#error "Unknown EMMA2RH board!" -#endif - -#endif /* __ASM_EMMA2RH_EMMA2RH_H */ diff --git a/include/asm-mips/emma2rh/markeins.h b/include/asm-mips/emma2rh/markeins.h deleted file mode 100644 index 8fa766795..000000000 --- a/include/asm-mips/emma2rh/markeins.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * include/asm-mips/emma2rh/markeins.h - * This file is EMMA2RH board depended header. - * - * Copyright (C) NEC Electronics Corporation 2005-2006 - * - * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h - * Copyright 2001 MontaVista Software 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 MARKEINS_H -#define MARKEINS_H - -#define NUM_EMMA2RH_IRQ_SW 32 -#define NUM_EMMA2RH_IRQ_GPIO 32 - -#define EMMA2RH_SW_CASCADE (EMMA2RH_IRQ_INT7 - EMMA2RH_IRQ_INT0) -#define EMMA2RH_GPIO_CASCADE (EMMA2RH_IRQ_INT46 - EMMA2RH_IRQ_INT0) - -#define EMMA2RH_SW_IRQ_BASE (EMMA2RH_IRQ_BASE + NUM_EMMA2RH_IRQ) -#define EMMA2RH_GPIO_IRQ_BASE (EMMA2RH_SW_IRQ_BASE + NUM_EMMA2RH_IRQ_SW) -#define CPU_IRQ_BASE (EMMA2RH_GPIO_IRQ_BASE + NUM_EMMA2RH_IRQ_GPIO) - -#define EMMA2RH_SW_IRQ_INT0 (0+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT1 (1+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT2 (2+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT3 (3+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT4 (4+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT5 (5+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT6 (6+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT7 (7+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT8 (8+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT9 (9+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT10 (10+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT11 (11+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT12 (12+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT13 (13+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT14 (14+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT15 (15+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT16 (16+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT17 (17+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT18 (18+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT19 (19+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT20 (20+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT21 (21+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT22 (22+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT23 (23+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT24 (24+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT25 (25+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT26 (26+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT27 (27+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT28 (28+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT29 (29+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT30 (30+EMMA2RH_SW_IRQ_BASE) -#define EMMA2RH_SW_IRQ_INT31 (31+EMMA2RH_SW_IRQ_BASE) - -#define MARKEINS_PCI_IRQ_INTA EMMA2RH_GPIO_IRQ_BASE+15 -#define MARKEINS_PCI_IRQ_INTB EMMA2RH_GPIO_IRQ_BASE+16 -#define MARKEINS_PCI_IRQ_INTC EMMA2RH_GPIO_IRQ_BASE+17 -#define MARKEINS_PCI_IRQ_INTD EMMA2RH_GPIO_IRQ_BASE+18 - -#endif /* CONFIG_MARKEINS */ diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h index 787220e6c..43d047a9a 100644 --- a/include/asm-mips/fcntl.h +++ b/include/asm-mips/fcntl.h @@ -8,6 +8,7 @@ #ifndef _ASM_FCNTL_H #define _ASM_FCNTL_H +#include #define O_APPEND 0x0008 #define O_SYNC 0x0010 diff --git a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h index 6959bdb59..73a3028dd 100644 --- a/include/asm-mips/fixmap.h +++ b/include/asm-mips/fixmap.h @@ -13,6 +13,7 @@ #ifndef _ASM_FIXMAP_H #define _ASM_FIXMAP_H +#include #include #ifdef CONFIG_HIGHMEM #include @@ -69,11 +70,7 @@ extern void __set_fixmap (enum fixed_addresses idx, * the start of the fixmap, and leave one page empty * at the top of mem.. */ -#if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX) -#define FIXADDR_TOP (0xff000000UL - 0x2000) -#else #define FIXADDR_TOP (0xffffe000UL) -#endif #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 58c561a9e..b0f50015e 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h @@ -10,6 +10,7 @@ #ifndef _ASM_FPU_H #define _ASM_FPU_H +#include #include #include @@ -137,9 +138,10 @@ static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) if (cpu_has_fpu) { if ((tsk == current) && __is_fpu_owner()) _save_fp(current); + return tsk->thread.fpu.hard.fpr; } - return tsk->thread.fpu.fpr; + return tsk->thread.fpu.soft.fpr; } #endif /* _ASM_FPU_H */ diff --git a/include/asm-mips/fpu_emulator.h b/include/asm-mips/fpu_emulator.h index 2731c38bd..16cb4d11d 100644 --- a/include/asm-mips/fpu_emulator.h +++ b/include/asm-mips/fpu_emulator.h @@ -12,8 +12,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * - * Further private data for which no space exists in mips_fpu_struct. - * This should be subsumed into the mips_fpu_struct structure as + * Further private data for which no space exists in mips_fpu_soft_struct. + * This should be subsumed into the mips_fpu_soft_struct structure as * defined in processor.h as soon as the absurd wired absolute assembler * offsets become dynamic at compile time. * diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index ed023eae0..12d118f1b 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -21,53 +22,51 @@ " .set push \n" \ " .set noat \n" \ " .set mips3 \n" \ - "1: ll %1, %4 # __futex_atomic_op \n" \ + "1: ll %1, (%3) # __futex_atomic_op \n" \ " .set mips0 \n" \ " " insn " \n" \ " .set mips3 \n" \ - "2: sc $1, %2 \n" \ + "2: sc $1, (%3) \n" \ " beqzl $1, 1b \n" \ __FUTEX_SMP_SYNC \ "3: \n" \ " .set pop \n" \ " .set mips0 \n" \ " .section .fixup,\"ax\" \n" \ - "4: li %0, %6 \n" \ + "4: li %0, %5 \n" \ " j 2b \n" \ " .previous \n" \ " .section __ex_table,\"a\" \n" \ " "__UA_ADDR "\t1b, 4b \n" \ " "__UA_ADDR "\t2b, 4b \n" \ " .previous \n" \ - : "=r" (ret), "=&r" (oldval), "=R" (*uaddr) \ - : "0" (0), "R" (*uaddr), "Jr" (oparg), "i" (-EFAULT) \ - : "memory"); \ + : "=r" (ret), "=r" (oldval) \ + : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ } else if (cpu_has_llsc) { \ __asm__ __volatile__( \ " .set push \n" \ " .set noat \n" \ " .set mips3 \n" \ - "1: ll %1, %4 # __futex_atomic_op \n" \ + "1: ll %1, (%3) # __futex_atomic_op \n" \ " .set mips0 \n" \ " " insn " \n" \ " .set mips3 \n" \ - "2: sc $1, %2 \n" \ + "2: sc $1, (%3) \n" \ " beqz $1, 1b \n" \ __FUTEX_SMP_SYNC \ "3: \n" \ " .set pop \n" \ " .set mips0 \n" \ " .section .fixup,\"ax\" \n" \ - "4: li %0, %6 \n" \ + "4: li %0, %5 \n" \ " j 2b \n" \ " .previous \n" \ " .section __ex_table,\"a\" \n" \ " "__UA_ADDR "\t1b, 4b \n" \ " "__UA_ADDR "\t2b, 4b \n" \ " .previous \n" \ - : "=r" (ret), "=&r" (oldval), "=R" (*uaddr) \ - : "0" (0), "R" (*uaddr), "Jr" (oparg), "i" (-EFAULT) \ - : "memory"); \ + : "=r" (ret), "=r" (oldval) \ + : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ } else \ ret = -ENOSYS; \ } @@ -90,23 +89,23 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) switch (op) { case FUTEX_OP_SET: - __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); + __futex_atomic_op("move $1, %z4", ret, oldval, uaddr, oparg); break; case FUTEX_OP_ADD: - __futex_atomic_op("addu $1, %1, %z5", + __futex_atomic_op("addu $1, %1, %z4", ret, oldval, uaddr, oparg); break; case FUTEX_OP_OR: - __futex_atomic_op("or $1, %1, %z5", + __futex_atomic_op("or $1, %1, %z4", ret, oldval, uaddr, oparg); break; case FUTEX_OP_ANDN: - __futex_atomic_op("and $1, %1, %z5", + __futex_atomic_op("and $1, %1, %z4", ret, oldval, uaddr, ~oparg); break; case FUTEX_OP_XOR: - __futex_atomic_op("xor $1, %1, %z5", + __futex_atomic_op("xor $1, %1, %z4", ret, oldval, uaddr, oparg); break; default: diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 25f5e8a41..dadc05188 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h @@ -10,6 +10,7 @@ #ifndef _ASM_HAZARDS_H #define _ASM_HAZARDS_H +#include #ifdef __ASSEMBLY__ @@ -69,10 +70,10 @@ * Use a macro for ehb unless explicit support for MIPSR2 is enabled */ -#define irq_enable_hazard \ +#define irq_enable_hazard _ehb -#define irq_disable_hazard \ +#define irq_disable_hazard _ehb #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h index c976bfaab..8cf598402 100644 --- a/include/asm-mips/highmem.h +++ b/include/asm-mips/highmem.h @@ -19,6 +19,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h index 458d9fdc7..c854d017c 100644 --- a/include/asm-mips/hw_irq.h +++ b/include/asm-mips/hw_irq.h @@ -19,9 +19,9 @@ extern void init_8259A(int aeoi); extern atomic_t irq_err_count; -/* - * interrupt-retrigger: NOP for now. This may not be apropriate for all - * machines, we'll see ... - */ +/* This may not be apropriate for all machines, we'll see ... */ +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{ +} #endif /* __ASM_HW_IRQ_H */ diff --git a/include/asm-mips/inst.h b/include/asm-mips/inst.h index 6489f0073..1ed8d0f62 100644 --- a/include/asm-mips/inst.h +++ b/include/asm-mips/inst.h @@ -74,7 +74,7 @@ enum spec3_op { ins_op, dinsm_op, dinsu_op, dins_op, bshfl_op = 0x20, dbshfl_op = 0x24, - rdhwr_op = 0x3b + rdhwr_op = 0x3f }; /* diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/interrupt.h similarity index 80% rename from include/asm-mips/irqflags.h rename to include/asm-mips/interrupt.h index 43ca09a3a..4bb9c06f4 100644 --- a/include/asm-mips/irqflags.h +++ b/include/asm-mips/interrupt.h @@ -8,15 +8,14 @@ * Copyright (C) 1999 Silicon Graphics * Copyright (C) 2000 MIPS Technologies, Inc. */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -#ifndef __ASSEMBLY__ +#ifndef _ASM_INTERRUPT_H +#define _ASM_INTERRUPT_H +#include #include __asm__ ( - " .macro raw_local_irq_enable \n" + " .macro local_irq_enable \n" " .set push \n" " .set reorder \n" " .set noat \n" @@ -37,10 +36,10 @@ __asm__ ( " .set pop \n" " .endm"); -static inline void raw_local_irq_enable(void) +static inline void local_irq_enable(void) { __asm__ __volatile__( - "raw_local_irq_enable" + "local_irq_enable" : /* no outputs */ : /* no inputs */ : "memory"); @@ -65,7 +64,7 @@ static inline void raw_local_irq_enable(void) * Workaround: mask EXL bit of the result or place a nop before mfc0. */ __asm__ ( - " .macro raw_local_irq_disable\n" + " .macro local_irq_disable\n" " .set push \n" " .set noat \n" #ifdef CONFIG_MIPS_MT_SMTC @@ -86,17 +85,17 @@ __asm__ ( " .set pop \n" " .endm \n"); -static inline void raw_local_irq_disable(void) +static inline void local_irq_disable(void) { __asm__ __volatile__( - "raw_local_irq_disable" + "local_irq_disable" : /* no outputs */ : /* no inputs */ : "memory"); } __asm__ ( - " .macro raw_local_save_flags flags \n" + " .macro local_save_flags flags \n" " .set push \n" " .set reorder \n" #ifdef CONFIG_MIPS_MT_SMTC @@ -107,13 +106,13 @@ __asm__ ( " .set pop \n" " .endm \n"); -#define raw_local_save_flags(x) \ +#define local_save_flags(x) \ __asm__ __volatile__( \ - "raw_local_save_flags %0" \ + "local_save_flags %0" \ : "=r" (x)) __asm__ ( - " .macro raw_local_irq_save result \n" + " .macro local_irq_save result \n" " .set push \n" " .set reorder \n" " .set noat \n" @@ -137,15 +136,15 @@ __asm__ ( " .set pop \n" " .endm \n"); -#define raw_local_irq_save(x) \ +#define local_irq_save(x) \ __asm__ __volatile__( \ - "raw_local_irq_save\t%0" \ + "local_irq_save\t%0" \ : "=r" (x) \ : /* no inputs */ \ : "memory") __asm__ ( - " .macro raw_local_irq_restore flags \n" + " .macro local_irq_restore flags \n" " .set push \n" " .set noreorder \n" " .set noat \n" @@ -184,42 +183,40 @@ __asm__ ( " .set pop \n" " .endm \n"); -#define raw_local_irq_restore(flags) \ +#define local_irq_restore(flags) \ do { \ unsigned long __tmp1; \ \ __asm__ __volatile__( \ - "raw_local_irq_restore\t%0" \ + "local_irq_restore\t%0" \ : "=r" (__tmp1) \ : "0" (flags) \ : "memory"); \ } while(0) -static inline int raw_irqs_disabled_flags(unsigned long flags) +static inline int irqs_disabled(void) { #ifdef CONFIG_MIPS_MT_SMTC /* * SMTC model uses TCStatus.IXMT to disable interrupts for a thread/CPU */ - return flags & 0x400; -#else - return !(flags & 1); -#endif -} + unsigned long __result; -#endif + __asm__ __volatile__( + " .set noreorder \n" + " mfc0 %0, $2, 1 \n" + " andi %0, 0x400 \n" + " slt %0, $0, %0 \n" + " .set reorder \n" + : "=r" (__result)); -/* - * Do the CPU's IRQ-state tracing from assembly code. - */ -#ifdef CONFIG_TRACE_IRQFLAGS -# define TRACE_IRQS_ON \ - jal trace_hardirqs_on -# define TRACE_IRQS_OFF \ - jal trace_hardirqs_off + return __result; #else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF + unsigned long flags; + local_save_flags(flags); + + return !(flags & 1); #endif +} -#endif /* _ASM_IRQFLAGS_H */ +#endif /* _ASM_INTERRUPT_H */ diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index df624e1ee..6b17eb9d7 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h @@ -12,6 +12,7 @@ #ifndef _ASM_IO_H #define _ASM_IO_H +#include #include #include #include diff --git a/include/asm-mips/ip32/machine.h b/include/asm-mips/ip32/machine.h index 1b631b8da..e440fdf4b 100644 --- a/include/asm-mips/ip32/machine.h +++ b/include/asm-mips/ip32/machine.h @@ -10,6 +10,7 @@ #ifndef _ASM_IP32_MACHINE_H #define _ASM_IP32_MACHINE_H +#include #ifdef CONFIG_SGI_IP32 diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index c906f35aa..dde677f02 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h @@ -9,8 +9,8 @@ #ifndef _ASM_IRQ_H #define _ASM_IRQ_H +#include #include -#include #include @@ -77,8 +77,4 @@ extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, unsigned long hwmask); #endif /* CONFIG_MIPS_MT_SMTC */ -#ifdef CONFIG_SMP -#define ARCH_HAS_IRQ_PER_CPU -#endif - #endif /* _ASM_IRQ_H */ diff --git a/include/asm-mips/isadep.h b/include/asm-mips/isadep.h index 24c6cda79..7bb003511 100644 --- a/include/asm-mips/isadep.h +++ b/include/asm-mips/isadep.h @@ -5,6 +5,7 @@ * * Copyright (c) 1998 Harald Koerfgen */ +#include #ifndef __ASM_ISADEP_H #define __ASM_ISADEP_H diff --git a/include/asm-mips/jmr3927/irq.h b/include/asm-mips/jmr3927/irq.h index fe551f33a..b0c325a22 100644 --- a/include/asm-mips/jmr3927/irq.h +++ b/include/asm-mips/jmr3927/irq.h @@ -12,6 +12,7 @@ #ifndef __ASSEMBLY__ +#include #include struct tb_irq_space { diff --git a/include/asm-mips/kmap_types.h b/include/asm-mips/kmap_types.h index 806aae3c5..6886a0c3f 100644 --- a/include/asm-mips/kmap_types.h +++ b/include/asm-mips/kmap_types.h @@ -1,6 +1,7 @@ #ifndef _ASM_KMAP_TYPES_H #define _ASM_KMAP_TYPES_H +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h index 9e2d43bae..c38844f61 100644 --- a/include/asm-mips/local.h +++ b/include/asm-mips/local.h @@ -1,6 +1,7 @@ #ifndef _ASM_LOCAL_H #define _ASM_LOCAL_H +#include #include #include diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 582acd8ad..4686e17c2 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h @@ -35,6 +35,7 @@ #ifndef _AU1000_H_ #define _AU1000_H_ +#include #ifndef _LANGUAGE_ASSEMBLY diff --git a/include/asm-mips/mach-au1x00/au1xxx.h b/include/asm-mips/mach-au1x00/au1xxx.h index 947135941..b7b46dd9b 100644 --- a/include/asm-mips/mach-au1x00/au1xxx.h +++ b/include/asm-mips/mach-au1x00/au1xxx.h @@ -23,6 +23,7 @@ #ifndef _AU1XXX_H_ #define _AU1XXX_H_ +#include #include diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h index d5b38a247..b327bcd3f 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h +++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h @@ -34,6 +34,7 @@ #ifndef _AU1000_DBDMA_H_ #define _AU1000_DBDMA_H_ +#include #ifndef _LANGUAGE_ASSEMBLY diff --git a/include/asm-mips/mach-au1x00/au1xxx_ide.h b/include/asm-mips/mach-au1x00/au1xxx_ide.h index 301e71300..e867b4ef9 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_ide.h +++ b/include/asm-mips/mach-au1x00/au1xxx_ide.h @@ -29,6 +29,7 @@ * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE * Interface and Linux Device Driver" Application Note. */ +#include #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA #define DMA_WAIT_TIMEOUT 100 diff --git a/include/asm-mips/mach-au1x00/au1xxx_psc.h b/include/asm-mips/mach-au1x00/au1xxx_psc.h index 1bd4e27ca..8e5fb3c7d 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_psc.h +++ b/include/asm-mips/mach-au1x00/au1xxx_psc.h @@ -33,18 +33,14 @@ #ifndef _AU1000_PSC_H_ #define _AU1000_PSC_H_ +#include /* The PSC base addresses. */ #ifdef CONFIG_SOC_AU1550 #define PSC0_BASE_ADDR 0xb1a00000 #define PSC1_BASE_ADDR 0xb1b00000 #define PSC2_BASE_ADDR 0xb0a00000 -#define PSC3_BASE_ADDR 0xb0b00000 -#endif - -#ifdef CONFIG_SOC_AU1200 -#define PSC0_BASE_ADDR 0xb1a00000 -#define PSC1_BASE_ADDR 0xb1b00000 +#define PSC3_BASE_ADDR 0xb0d00000 #endif /* The PSC select and control registers are common to @@ -232,8 +228,6 @@ typedef struct psc_i2s { #define PSC_I2SCFG_DD_DISABLE (1 << 27) #define PSC_I2SCFG_DE_ENABLE (1 << 26) #define PSC_I2SCFG_SET_WS(x) (((((x) / 2) - 1) & 0x7f) << 16) -#define PSC_I2SCFG_WS(n) ((n & 0xFF) << 16) -#define PSC_I2SCFG_WS_MASK (PSC_I2SCFG_WS(0x3F)) #define PSC_I2SCFG_WI (1 << 15) #define PSC_I2SCFG_DIV_MASK (3 << 13) @@ -512,7 +506,7 @@ typedef struct psc_smb { /* Transmit register control. */ -#define PSC_SMBTXRX_RSR (1 << 28) +#define PSC_SMBTXRX_RSR (1 << 30) #define PSC_SMBTXRX_STP (1 << 29) #define PSC_SMBTXRX_DATAMASK (0xff) diff --git a/include/asm-mips/mach-au1x00/ioremap.h b/include/asm-mips/mach-au1x00/ioremap.h index 098fca428..d3ec62745 100644 --- a/include/asm-mips/mach-au1x00/ioremap.h +++ b/include/asm-mips/mach-au1x00/ioremap.h @@ -9,6 +9,7 @@ #ifndef __ASM_MACH_AU1X00_IOREMAP_H #define __ASM_MACH_AU1X00_IOREMAP_H +#include #include #ifdef CONFIG_64BIT_PHYS_ADDR diff --git a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h index c6dfa59d1..ace8c5ef9 100644 --- a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h +++ b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h @@ -8,6 +8,7 @@ #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H +#include #define cpu_has_tlb 1 #define cpu_has_4kex 1 @@ -27,7 +28,7 @@ #define cpu_has_mcheck 0 #define cpu_has_ejtag 0 -#define cpu_has_inclusive_pcaches 0 +#define cpu_has_subset_pcaches 0 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 #define cpu_scache_line_size() 0 diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h index 0f5f4c29f..7b28b23f9 100644 --- a/include/asm-mips/mach-db1x00/db1x00.h +++ b/include/asm-mips/mach-db1x00/db1x00.h @@ -28,22 +28,11 @@ #ifndef __ASM_DB1X00_H #define __ASM_DB1X00_H +#include #ifdef CONFIG_MIPS_DB1550 - -#define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX -#define DBDMA_AC97_RX_CHAN DSCR_CMD0_PSC1_RX -#define DBDMA_I2S_TX_CHAN DSCR_CMD0_PSC3_TX -#define DBDMA_I2S_RX_CHAN DSCR_CMD0_PSC3_RX - -#define SPI_PSC_BASE PSC0_BASE_ADDR -#define AC97_PSC_BASE PSC1_BASE_ADDR -#define SMBUS_PSC_BASE PSC2_BASE_ADDR -#define I2S_PSC_BASE PSC3_BASE_ADDR - #define BCSR_KSEG1_ADDR 0xAF000000 #define NAND_PHYS_ADDR 0x20000000 - #else #define BCSR_KSEG1_ADDR 0xAE000000 #endif diff --git a/include/asm-mips/mach-ddb5074/mc146818rtc.h b/include/asm-mips/mach-ddb5074/mc146818rtc.h new file mode 100644 index 000000000..2eb9acb10 --- /dev/null +++ b/include/asm-mips/mach-ddb5074/mc146818rtc.h @@ -0,0 +1,31 @@ +/* + * 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) 1998, 2001, 03 by Ralf Baechle + * + * RTC routines for PC style attached Dallas chip. + */ +#ifndef __ASM_MACH_DDB5074_MC146818RTC_H +#define __ASM_MACH_DDB5074_MC146818RTC_H + +#include +#include + +#define RTC_PORT(x) (0x70 + (x)) +#define RTC_IRQ 8 + +static inline unsigned char CMOS_READ(unsigned long addr) +{ + return *(volatile unsigned char *)(KSEG1ADDR(DDB_PCI_MEM_BASE)+addr); +} + +static inline void CMOS_WRITE(unsigned char data, unsigned long addr) +{ + *(volatile unsigned char *)(KSEG1ADDR(DDB_PCI_MEM_BASE)+addr) = data; +} + +#define RTC_ALWAYS_BCD 1 + +#endif /* __ASM_MACH_DDB5074_MC146818RTC_H */ diff --git a/include/asm-mips/mach-dec/mc146818rtc.h b/include/asm-mips/mach-dec/mc146818rtc.h index 6724e99e4..6d37a5675 100644 --- a/include/asm-mips/mach-dec/mc146818rtc.h +++ b/include/asm-mips/mach-dec/mc146818rtc.h @@ -19,8 +19,6 @@ extern volatile u8 *dec_rtc_base; -#define ARCH_RTC_LOCATION - #define RTC_PORT(x) CPHYSADDR((long)dec_rtc_base) #define RTC_IO_EXTENT dec_kn_slot_size #define RTC_IOMAPPED 0 diff --git a/include/asm-mips/mach-dec/param.h b/include/asm-mips/mach-dec/param.h new file mode 100644 index 000000000..3e4f0e390 --- /dev/null +++ b/include/asm-mips/mach-dec/param.h @@ -0,0 +1,18 @@ +/* + * 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 by Ralf Baechle + */ +#ifndef __ASM_MACH_DEC_PARAM_H +#define __ASM_MACH_DEC_PARAM_H + +/* + * log2(HZ), change this here if you want another HZ value. This is also + * used in dec_time_init. Minimum is 1, Maximum is 15. + */ +#define LOG_2_HZ 7 +#define HZ (1 << LOG_2_HZ) + +#endif /* __ASM_MACH_DEC_PARAM_H */ diff --git a/include/asm-mips/mach-excite/cpu-feature-overrides.h b/include/asm-mips/mach-excite/cpu-feature-overrides.h deleted file mode 100644 index 0d3185422..000000000 --- a/include/asm-mips/mach-excite/cpu-feature-overrides.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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) 2004 Thomas Koeller - */ -#ifndef __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H -#define __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H - -/* - * Basler eXcite has an RM9122 processor. - */ -#define cpu_has_watch 1 -#define cpu_has_mips16 0 -#define cpu_has_divec 0 -#define cpu_has_vce 0 -#define cpu_has_cache_cdex_p 0 -#define cpu_has_cache_cdex_s 0 -#define cpu_has_prefetch 1 -#define cpu_has_mcheck 0 -#define cpu_has_ejtag 0 - -#define cpu_has_llsc 1 -#define cpu_has_vtag_icache 0 -#define cpu_has_dc_aliases 0 -#define cpu_has_ic_fills_f_dc 0 -#define cpu_has_dsp 0 -#define cpu_icache_snoops_remote_store 0 - -#define cpu_has_nofpuex 0 -#define cpu_has_64bits 1 - -#define cpu_has_inclusive_pcaches 0 - -#define cpu_dcache_line_size() 32 -#define cpu_icache_line_size() 32 -#define cpu_scache_line_size() 32 - -#endif /* __ASM_MACH_EXCITE_CPU_FEATURE_OVERRIDES_H */ diff --git a/include/asm-mips/mach-excite/excite.h b/include/asm-mips/mach-excite/excite.h deleted file mode 100644 index 130bd4b8e..000000000 --- a/include/asm-mips/mach-excite/excite.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef __EXCITE_H__ -#define __EXCITE_H__ - -#include -#include -#include - -#define EXCITE_CPU_EXT_CLOCK 100000000 - -#if !defined(__ASSEMBLER__) -void __init excite_kgdb_init(void); -void excite_procfs_init(void); -extern unsigned long memsize; -extern char modetty[]; -extern u32 unit_id; -#endif - -/* Base name for XICAP devices */ -#define XICAP_NAME "xicap_gpi" - -/* OCD register offsets */ -#define LKB0 0x0038 -#define LKB5 0x0128 -#define LKM5 0x012C -#define LKB7 0x0138 -#define LKM7 0x013c -#define LKB8 0x0140 -#define LKM8 0x0144 -#define LKB9 0x0148 -#define LKM9 0x014c -#define LKB10 0x0150 -#define LKM10 0x0154 -#define LKB11 0x0158 -#define LKM11 0x015c -#define LKB12 0x0160 -#define LKM12 0x0164 -#define LKB13 0x0168 -#define LKM13 0x016c -#define LDP0 0x0200 -#define LDP1 0x0210 -#define LDP2 0x0220 -#define LDP3 0x0230 -#define INTPIN0 0x0A40 -#define INTPIN1 0x0A44 -#define INTPIN2 0x0A48 -#define INTPIN3 0x0A4C -#define INTPIN4 0x0A50 -#define INTPIN5 0x0A54 -#define INTPIN6 0x0A58 -#define INTPIN7 0x0A5C - - - - -/* TITAN register offsets */ -#define CPRR 0x0004 -#define CPDSR 0x0008 -#define CPTC0R 0x000c -#define CPTC1R 0x0010 -#define CPCFG0 0x0020 -#define CPCFG1 0x0024 -#define CPDST0A 0x0028 -#define CPDST0B 0x002c -#define CPDST1A 0x0030 -#define CPDST1B 0x0034 -#define CPXDSTA 0x0038 -#define CPXDSTB 0x003c -#define CPXCISRA 0x0048 -#define CPXCISRB 0x004c -#define CPGIG0ER 0x0050 -#define CPGIG1ER 0x0054 -#define CPGRWL 0x0068 -#define CPURSLMT 0x00f8 -#define UACFG 0x0200 -#define UAINTS 0x0204 -#define SDRXFCIE 0x4828 -#define SDTXFCIE 0x4928 -#define INTP0Status0 0x1B00 -#define INTP0Mask0 0x1B04 -#define INTP0Set0 0x1B08 -#define INTP0Clear0 0x1B0C -#define GXCFG 0x5000 -#define GXDMADRPFX 0x5018 -#define GXDMA_DESCADR 0x501c -#define GXCH0TDESSTRT 0x5054 - -/* IRQ definitions */ -#define NMICONFIG 0xac0 -#define TITAN_MSGINT 0xc4 -#define TITAN_IRQ ((TITAN_MSGINT / 0x20) + 2) -#define FPGA0_MSGINT 0x5a -#define FPGA0_IRQ ((FPGA0_MSGINT / 0x20) + 2) -#define FPGA1_MSGINT 0x7b -#define FPGA1_IRQ ((FPGA1_MSGINT / 0x20) + 2) -#define PHY_MSGINT 0x9c -#define PHY_IRQ ((PHY_MSGINT / 0x20) + 2) - -#if defined(CONFIG_BASLER_EXCITE_PROTOTYPE) -/* Pre-release units used interrupt pin #9 */ -#define USB_IRQ 11 -#else -/* Re-designed units use interrupt pin #1 */ -#define USB_MSGINT 0x39 -#define USB_IRQ ((USB_MSGINT / 0x20) + 2) -#endif -#define TIMER_IRQ 12 - - -/* Device address ranges */ -#define EXCITE_OFFS_OCD 0x1fffc000 -#define EXCITE_SIZE_OCD (16 * 1024) -#define EXCITE_PHYS_OCD CPHYSADDR(EXCITE_OFFS_OCD) -#define EXCITE_ADDR_OCD CKSEG1ADDR(EXCITE_OFFS_OCD) - -#define EXCITE_OFFS_SCRAM 0x1fffa000 -#define EXCITE_SIZE_SCRAM (8 << 10) -#define EXCITE_PHYS_SCRAM CPHYSADDR(EXCITE_OFFS_SCRAM) -#define EXCITE_ADDR_SCRAM CKSEG1ADDR(EXCITE_OFFS_SCRAM) - -#define EXCITE_OFFS_PCI_IO 0x1fff8000 -#define EXCITE_SIZE_PCI_IO (8 << 10) -#define EXCITE_PHYS_PCI_IO CPHYSADDR(EXCITE_OFFS_PCI_IO) -#define EXCITE_ADDR_PCI_IO CKSEG1ADDR(EXCITE_OFFS_PCI_IO) - -#define EXCITE_OFFS_TITAN 0x1fff0000 -#define EXCITE_SIZE_TITAN (32 << 10) -#define EXCITE_PHYS_TITAN CPHYSADDR(EXCITE_OFFS_TITAN) -#define EXCITE_ADDR_TITAN CKSEG1ADDR(EXCITE_OFFS_TITAN) - -#define EXCITE_OFFS_PCI_MEM 0x1ffe0000 -#define EXCITE_SIZE_PCI_MEM (64 << 10) -#define EXCITE_PHYS_PCI_MEM CPHYSADDR(EXCITE_OFFS_PCI_MEM) -#define EXCITE_ADDR_PCI_MEM CKSEG1ADDR(EXCITE_OFFS_PCI_MEM) - -#define EXCITE_OFFS_FPGA 0x1ffdc000 -#define EXCITE_SIZE_FPGA (16 << 10) -#define EXCITE_PHYS_FPGA CPHYSADDR(EXCITE_OFFS_FPGA) -#define EXCITE_ADDR_FPGA CKSEG1ADDR(EXCITE_OFFS_FPGA) - -#define EXCITE_OFFS_NAND 0x1ffd8000 -#define EXCITE_SIZE_NAND (16 << 10) -#define EXCITE_PHYS_NAND CPHYSADDR(EXCITE_OFFS_NAND) -#define EXCITE_ADDR_NAND CKSEG1ADDR(EXCITE_OFFS_NAND) - -#define EXCITE_OFFS_BOOTROM 0x1f000000 -#define EXCITE_SIZE_BOOTROM (8 << 20) -#define EXCITE_PHYS_BOOTROM CPHYSADDR(EXCITE_OFFS_BOOTROM) -#define EXCITE_ADDR_BOOTROM CKSEG1ADDR(EXCITE_OFFS_BOOTROM) - -/* FPGA address offsets */ -#define EXCITE_FPGA_DPR 0x0104 /* dual-ported ram */ -#define EXCITE_FPGA_SYSCTL 0x0200 /* system control register block */ - -#endif /* __EXCITE_H__ */ diff --git a/include/asm-mips/mach-excite/excite_nandflash.h b/include/asm-mips/mach-excite/excite_nandflash.h deleted file mode 100644 index c4cf61406..000000000 --- a/include/asm-mips/mach-excite/excite_nandflash.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __EXCITE_NANDFLASH_H__ -#define __EXCITE_NANDFLASH_H__ - -/* Resource names */ -#define EXCITE_NANDFLASH_RESOURCE_REGS "excite_nandflash_regs" - -#endif /* __EXCITE_NANDFLASH_H__ */ diff --git a/include/asm-mips/mach-excite/rm9k_eth.h b/include/asm-mips/mach-excite/rm9k_eth.h deleted file mode 100644 index 94705a46f..000000000 --- a/include/asm-mips/mach-excite/rm9k_eth.h +++ /dev/null @@ -1,23 +0,0 @@ -#if !defined(__RM9K_ETH_H__) -#define __RM9K_ETH_H__ - -#define RM9K_GE_NAME "rm9k_ge" - -/* Resource names */ -#define RM9K_GE_RESOURCE_MAC "rm9k_ge_mac" -#define RM9K_GE_RESOURCE_MSTAT "rm9k_ge_mstat" -#define RM9K_GE_RESOURCE_PKTPROC "rm9k_ge_pktproc" -#define RM9K_GE_RESOURCE_XDMA "rm9k_ge_xdma" -#define RM9K_GE_RESOURCE_FIFO_RX "rm9k_ge_fifo_rx" -#define RM9K_GE_RESOURCE_FIFO_TX "rm9k_ge_fifo_tx" -#define RM9K_GE_RESOURCE_FIFOMEM_RX "rm9k_ge_fifo_memory_rx" -#define RM9K_GE_RESOURCE_FIFOMEM_TX "rm9k_ge_fifo_memory_tx" -#define RM9K_GE_RESOURCE_PHY "rm9k_ge_phy" -#define RM9K_GE_RESOURCE_DMADESC_RX "rm9k_ge_dmadesc_rx" -#define RM9K_GE_RESOURCE_DMADESC_TX "rm9k_ge_dmadesc_tx" -#define RM9K_GE_RESOURCE_IRQ_MAIN "rm9k_ge_irq_main" -#define RM9K_GE_RESOURCE_IRQ_PHY "rm9k_ge_irq_phy" -#define RM9K_GE_RESOURCE_GPI_SLICE "rm9k_ge_gpi_slice" -#define RM9K_GE_RESOURCE_MDIO_CHANNEL "rm9k_ge_mdio_channel" - -#endif /* !defined(__RM9K_ETH_H__) */ diff --git a/include/asm-mips/mach-excite/rm9k_wdt.h b/include/asm-mips/mach-excite/rm9k_wdt.h deleted file mode 100644 index 3fa3c08d2..000000000 --- a/include/asm-mips/mach-excite/rm9k_wdt.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __RM9K_WDT_H__ -#define __RM9K_WDT_H__ - -/* Device name */ -#define WDT_NAME "wdt_gpi" - -/* Resource names */ -#define WDT_RESOURCE_REGS "excite_watchdog_regs" -#define WDT_RESOURCE_IRQ "excite_watchdog_irq" -#define WDT_RESOURCE_COUNTER "excite_watchdog_counter" - -#endif /* __RM9K_WDT_H__ */ diff --git a/include/asm-mips/mach-excite/rm9k_xicap.h b/include/asm-mips/mach-excite/rm9k_xicap.h deleted file mode 100644 index 009577734..000000000 --- a/include/asm-mips/mach-excite/rm9k_xicap.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __EXCITE_XICAP_H__ -#define __EXCITE_XICAP_H__ - - -/* Resource names */ -#define XICAP_RESOURCE_FIFO_RX "xicap_fifo_rx" -#define XICAP_RESOURCE_FIFO_TX "xicap_fifo_tx" -#define XICAP_RESOURCE_XDMA "xicap_xdma" -#define XICAP_RESOURCE_DMADESC "xicap_dmadesc" -#define XICAP_RESOURCE_PKTPROC "xicap_pktproc" -#define XICAP_RESOURCE_IRQ "xicap_irq" -#define XICAP_RESOURCE_GPI_SLICE "xicap_gpi_slice" -#define XICAP_RESOURCE_FIFO_BLK "xicap_fifo_blocks" -#define XICAP_RESOURCE_PKT_STREAM "xicap_pkt_stream" - -#endif /* __EXCITE_XICAP_H__ */ diff --git a/include/asm-mips/mach-generic/floppy.h b/include/asm-mips/mach-generic/floppy.h index 001a8ce17..682a5858f 100644 --- a/include/asm-mips/mach-generic/floppy.h +++ b/include/asm-mips/mach-generic/floppy.h @@ -98,7 +98,7 @@ static inline void fd_disable_irq(void) static inline int fd_request_irq(void) { return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); } static inline void fd_free_irq(void) diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h index 6eba2e576..e33153595 100644 --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h @@ -15,6 +15,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-mips/mach-generic/kmalloc.h b/include/asm-mips/mach-generic/kmalloc.h index 410ab5f6c..373d66dee 100644 --- a/include/asm-mips/mach-generic/kmalloc.h +++ b/include/asm-mips/mach-generic/kmalloc.h @@ -1,6 +1,7 @@ #ifndef __ASM_MACH_GENERIC_KMALLOC_H #define __ASM_MACH_GENERIC_KMALLOC_H +#include #ifndef CONFIG_DMA_COHERENT /* diff --git a/include/asm-mips/mach-generic/param.h b/include/asm-mips/mach-generic/param.h new file mode 100644 index 000000000..a0d12f964 --- /dev/null +++ b/include/asm-mips/mach-generic/param.h @@ -0,0 +1,13 @@ +/* + * 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 by Ralf Baechle + */ +#ifndef __ASM_MACH_GENERIC_PARAM_H +#define __ASM_MACH_GENERIC_PARAM_H + +#define HZ 1000 /* Internal kernel timer frequency */ + +#endif /* __ASM_MACH_GENERIC_PARAM_H */ diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h index 0ae9997bc..b849d8dd7 100644 --- a/include/asm-mips/mach-generic/spaces.h +++ b/include/asm-mips/mach-generic/spaces.h @@ -10,6 +10,7 @@ #ifndef _ASM_MACH_GENERIC_SPACES_H #define _ASM_MACH_GENERIC_SPACES_H +#include #ifdef CONFIG_32BIT diff --git a/include/asm-mips/mach-ip22/cpu-feature-overrides.h b/include/asm-mips/mach-ip22/cpu-feature-overrides.h index f7c5dc8a5..2a37bedb4 100644 --- a/include/asm-mips/mach-ip22/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip22/cpu-feature-overrides.h @@ -13,7 +13,7 @@ */ #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 #define cpu_has_fpu 1 #define cpu_has_32fpr 1 #define cpu_has_counter 1 diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h index ab20c026f..8385f7167 100644 --- a/include/asm-mips/mach-ip22/spaces.h +++ b/include/asm-mips/mach-ip22/spaces.h @@ -10,6 +10,7 @@ #ifndef _ASM_MACH_IP22_SPACES_H #define _ASM_MACH_IP22_SPACES_H +#include #ifdef CONFIG_32BIT diff --git a/include/asm-mips/mach-ip27/cpu-feature-overrides.h b/include/asm-mips/mach-ip27/cpu-feature-overrides.h index a071974b6..2d2f5b91e 100644 --- a/include/asm-mips/mach-ip27/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip27/cpu-feature-overrides.h @@ -31,10 +31,7 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 -#define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 - -#define cpu_has_inclusive_pcaches 1 +#define cpu_has_subset_pcaches 1 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 64 diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index 2a3de092b..36070b565 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h @@ -9,6 +9,7 @@ #ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H #define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H +#include /* * R5000 has an interesting "restriction": ll(d)/sc(d) @@ -37,8 +38,6 @@ #define cpu_has_vtag_icache 0 #define cpu_has_ic_fills_f_dc 0 #define cpu_has_dsp 0 -#define cpu_has_4k_cache 1 - #define cpu_has_mips32r1 0 #define cpu_has_mips32r2 0 diff --git a/include/asm-mips/mach-ip32/kmalloc.h b/include/asm-mips/mach-ip32/kmalloc.h index f6198a21f..9d2d4d9ac 100644 --- a/include/asm-mips/mach-ip32/kmalloc.h +++ b/include/asm-mips/mach-ip32/kmalloc.h @@ -1,6 +1,7 @@ #ifndef __ASM_MACH_IP32_KMALLOC_H #define __ASM_MACH_IP32_KMALLOC_H +#include #if defined(CONFIG_CPU_R5000) || defined (CONFIG_CPU_RM7000) #define ARCH_KMALLOC_MINALIGN 32 diff --git a/include/asm-mips/mach-ja/cpu-feature-overrides.h b/include/asm-mips/mach-ja/cpu-feature-overrides.h index 84b6dead0..90ff08708 100644 --- a/include/asm-mips/mach-ja/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ja/cpu-feature-overrides.h @@ -31,7 +31,7 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 -#define cpu_has_inclusive_pcaches 0 +#define cpu_has_subset_pcaches 0 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h index 56e9ca6ae..c9dad99b1 100644 --- a/include/asm-mips/mach-jazz/floppy.h +++ b/include/asm-mips/mach-jazz/floppy.h @@ -90,7 +90,7 @@ static inline void fd_disable_irq(void) static inline int fd_request_irq(void) { return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); } static inline void fd_free_irq(void) diff --git a/include/asm-mips/mach-jazz/param.h b/include/asm-mips/mach-jazz/param.h new file mode 100644 index 000000000..639763a51 --- /dev/null +++ b/include/asm-mips/mach-jazz/param.h @@ -0,0 +1,16 @@ +/* + * 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 by Ralf Baechle + */ +#ifndef __ASM_MACH_JAZZ_PARAM_H +#define __ASM_MACH_JAZZ_PARAM_H + +/* + * Jazz is currently using the internal 100Hz timer of the R4030 + */ +#define HZ 100 /* Internal kernel timer frequency */ + +#endif /* __ASM_MACH_JAZZ_PARAM_H */ diff --git a/include/asm-mips/mach-mips/cpu-feature-overrides.h b/include/asm-mips/mach-mips/cpu-feature-overrides.h index 7f3e3f9bd..e06af6c86 100644 --- a/include/asm-mips/mach-mips/cpu-feature-overrides.h +++ b/include/asm-mips/mach-mips/cpu-feature-overrides.h @@ -9,6 +9,7 @@ #ifndef __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H #define __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H +#include /* * CPU feature overrides for MIPS boards @@ -16,7 +17,7 @@ #ifdef CONFIG_CPU_MIPS32 #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 /* #define cpu_has_fpu ? */ /* #define cpu_has_32fpr ? */ #define cpu_has_counter 1 @@ -39,14 +40,14 @@ #define cpu_has_nofpuex 0 /* #define cpu_has_64bits ? */ /* #define cpu_has_64bit_zero_reg ? */ -/* #define cpu_has_inclusive_pcaches ? */ +/* #define cpu_has_subset_pcaches ? */ #define cpu_icache_snoops_remote_store 1 #endif #ifdef CONFIG_CPU_MIPS64 #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 /* #define cpu_has_fpu ? */ /* #define cpu_has_32fpr ? */ #define cpu_has_counter 1 @@ -65,7 +66,7 @@ #define cpu_has_nofpuex 0 /* #define cpu_has_64bits ? */ /* #define cpu_has_64bit_zero_reg ? */ -/* #define cpu_has_inclusive_pcaches ? */ +/* #define cpu_has_subset_pcaches ? */ #define cpu_icache_snoops_remote_store 1 #endif diff --git a/include/asm-mips/mach-mips/irq.h b/include/asm-mips/mach-mips/irq.h index e994b0c01..f8579696c 100644 --- a/include/asm-mips/mach-mips/irq.h +++ b/include/asm-mips/mach-mips/irq.h @@ -1,7 +1,14 @@ #ifndef __ASM_MACH_MIPS_IRQ_H #define __ASM_MACH_MIPS_IRQ_H +#include #define NR_IRQS 256 +#ifdef CONFIG_SMP + +#define ARCH_HAS_IRQ_PER_CPU + +#endif + #endif /* __ASM_MACH_MIPS_IRQ_H */ diff --git a/include/asm-mips/mach-emma2rh/irq.h b/include/asm-mips/mach-mips/param.h similarity index 58% rename from include/asm-mips/mach-emma2rh/irq.h rename to include/asm-mips/mach-mips/param.h index bce64244b..805ef6d27 100644 --- a/include/asm-mips/mach-emma2rh/irq.h +++ b/include/asm-mips/mach-mips/param.h @@ -5,9 +5,9 @@ * * Copyright (C) 2003 by Ralf Baechle */ -#ifndef __ASM_MACH_EMMA2RH_IRQ_H -#define __ASM_MACH_EMMA2RH_IRQ_H +#ifndef __ASM_MACH_MIPS_PARAM_H +#define __ASM_MACH_MIPS_PARAM_H -#define NR_IRQS 256 +#define HZ 100 /* Internal kernel timer frequency */ -#endif /* __ASM_MACH_EMMA2RH_IRQ_H */ +#endif /* __ASM_MACH_MIPS_PARAM_H */ diff --git a/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h b/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h index 57a12ded0..782b98624 100644 --- a/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ocelot3/cpu-feature-overrides.h @@ -34,7 +34,7 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 -#define cpu_has_inclusive_pcaches 0 +#define cpu_has_subset_pcaches 0 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 diff --git a/include/asm-mips/mach-pb1x00/pb1550.h b/include/asm-mips/mach-pb1x00/pb1550.h index 9a4955ce3..9578ead11 100644 --- a/include/asm-mips/mach-pb1x00/pb1550.h +++ b/include/asm-mips/mach-pb1x00/pb1550.h @@ -27,6 +27,7 @@ #ifndef __ASM_PB1550_H #define __ASM_PB1550_H +#include #include #define DBDMA_AC97_TX_CHAN DSCR_CMD0_PSC1_TX diff --git a/include/asm-mips/mach-qemu/param.h b/include/asm-mips/mach-qemu/param.h new file mode 100644 index 000000000..cb30ee490 --- /dev/null +++ b/include/asm-mips/mach-qemu/param.h @@ -0,0 +1,13 @@ +/* + * 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) 2005 by Ralf Baechle + */ +#ifndef __ASM_MACH_QEMU_PARAM_H +#define __ASM_MACH_QEMU_PARAM_H + +#define HZ 100 /* Internal kernel timer frequency */ + +#endif /* __ASM_MACH_QEMU_PARAM_H */ diff --git a/include/asm-mips/mach-rm200/cpu-feature-overrides.h b/include/asm-mips/mach-rm200/cpu-feature-overrides.h index 11410ae10..91e7cf5f2 100644 --- a/include/asm-mips/mach-rm200/cpu-feature-overrides.h +++ b/include/asm-mips/mach-rm200/cpu-feature-overrides.h @@ -14,7 +14,7 @@ #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 #define cpu_has_fpu 1 #define cpu_has_32fpr 1 #define cpu_has_counter 1 @@ -35,8 +35,10 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 +#define cpu_has_subset_pcaches 0 /* No S-cache on R5000 I think ... */ #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 +#define cpu_scache_line_size() 0 /* No S-cache on R5000 I think ... */ #define cpu_has_mips32r1 0 #define cpu_has_mips32r2 0 diff --git a/include/asm-mips/mach-sibyte/cpu-feature-overrides.h b/include/asm-mips/mach-sibyte/cpu-feature-overrides.h index a25968f27..193a666cd 100644 --- a/include/asm-mips/mach-sibyte/cpu-feature-overrides.h +++ b/include/asm-mips/mach-sibyte/cpu-feature-overrides.h @@ -31,7 +31,7 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 -#define cpu_has_inclusive_pcaches 0 +#define cpu_has_subset_pcaches 0 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 diff --git a/include/asm-mips/mach-sim/cpu-feature-overrides.h b/include/asm-mips/mach-sim/cpu-feature-overrides.h index 779b02205..cadbe8eda 100644 --- a/include/asm-mips/mach-sim/cpu-feature-overrides.h +++ b/include/asm-mips/mach-sim/cpu-feature-overrides.h @@ -8,6 +8,7 @@ #ifndef __ASM_MACH_SIM_CPU_FEATURE_OVERRIDES_H #define __ASM_MACH_SIM_CPU_FEATURE_OVERRIDES_H +#include /* * CPU feature overrides for MIPS boards @@ -15,7 +16,7 @@ #ifdef CONFIG_CPU_MIPS32 #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 #define cpu_has_fpu 0 /* #define cpu_has_32fpr ? */ #define cpu_has_counter 1 @@ -34,13 +35,13 @@ #define cpu_has_nofpuex 0 /* #define cpu_has_64bits ? */ /* #define cpu_has_64bit_zero_reg ? */ -/* #define cpu_has_inclusive_pcaches ? */ +/* #define cpu_has_subset_pcaches ? */ #endif #ifdef CONFIG_CPU_MIPS64 #define cpu_has_tlb 1 #define cpu_has_4kex 1 -#define cpu_has_4k_cache 1 +#define cpu_has_4kcache 1 /* #define cpu_has_fpu ? */ /* #define cpu_has_32fpr ? */ #define cpu_has_counter 1 @@ -59,7 +60,7 @@ #define cpu_has_nofpuex 0 /* #define cpu_has_64bits ? */ /* #define cpu_has_64bit_zero_reg ? */ -/* #define cpu_has_inclusive_pcaches ? */ +/* #define cpu_has_subset_pcaches ? */ #endif #endif /* __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H */ diff --git a/include/asm-mips/mach-wrppmc/mach-gt64120.h b/include/asm-mips/mach-wrppmc/mach-gt64120.h deleted file mode 100644 index ba9205a04..000000000 --- a/include/asm-mips/mach-wrppmc/mach-gt64120.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This is a direct copy of the ev96100.h file, with a global - * search and replace. The numbers are the same. - * - * The reason I'm duplicating this is so that the 64120/96100 - * defines won't be confusing in the source code. - */ -#ifndef __ASM_MIPS_GT64120_H -#define __ASM_MIPS_GT64120_H - -/* - * This is the CPU physical memory map of PPMC Board: - * - * 0x00000000-0x03FFFFFF - 64MB SDRAM (SCS[0]#) - * 0x1C000000-0x1C000000 - LED (CS0) - * 0x1C800000-0x1C800007 - UART 16550 port (CS1) - * 0x1F000000-0x1F000000 - MailBox (CS3) - * 0x1FC00000-0x20000000 - 4MB Flash (BOOT CS) - */ - -#define WRPPMC_SDRAM_SCS0_BASE 0x00000000 -#define WRPPMC_SDRAM_SCS0_SIZE 0x04000000 - -#define WRPPMC_UART16550_BASE 0x1C800000 -#define WRPPMC_UART16550_CLOCK 3686400 /* 3.68MHZ */ - -#define WRPPMC_LED_BASE 0x1C000000 -#define WRPPMC_MBOX_BASE 0x1F000000 - -#define WRPPMC_BOOTROM_BASE 0x1FC00000 -#define WRPPMC_BOOTROM_SIZE 0x00400000 /* 4M Flash */ - -#define WRPPMC_MIPS_TIMER_IRQ 7 /* MIPS compare/count timer interrupt */ -#define WRPPMC_UART16550_IRQ 6 -#define WRPPMC_PCI_INTA_IRQ 3 - -/* - * PCI Bus I/O and Memory resources allocation - * - * NOTE: We only have PCI_0 hose interface - */ -#define GT_PCI_MEM_BASE 0x13000000UL -#define GT_PCI_MEM_SIZE 0x02000000UL -#define GT_PCI_IO_BASE 0x11000000UL -#define GT_PCI_IO_SIZE 0x02000000UL -#define GT_ISA_IO_BASE PCI_IO_BASE - -/* - * PCI interrupts will come in on either the INTA or INTD interrups lines, - * which are mapped to the #2 and #5 interrupt pins of the MIPS. On our - * boards, they all either come in on IntD or they all come in on IntA, they - * aren't mixed. There can be numerous PCI interrupts, so we keep a list of the - * "requested" interrupt numbers and go through the list whenever we get an - * IntA/D. - * - * Interrupts < 8 are directly wired to the processor; PCI INTA is 8 and - * INTD is 11. - */ -#define GT_TIMER 4 -#define GT_INTA 2 -#define GT_INTD 5 - -#ifndef __ASSEMBLY__ - -/* - * GT64120 internal register space base address - */ -extern unsigned long gt64120_base; - -#define GT64120_BASE (gt64120_base) - -/* define WRPPMC_EARLY_DEBUG to enable early output something to UART */ -#undef WRPPMC_EARLY_DEBUG - -#ifdef WRPPMC_EARLY_DEBUG -extern void wrppmc_led_on(int mask); -extern void wrppmc_led_off(int mask); -extern void wrppmc_early_printk(const char *fmt, ...); -#else -#define wrppmc_early_printk(fmt, ...) do {} while (0) -#endif /* WRPPMC_EARLY_DEBUG */ - -#endif /* __ASSEMBLY__ */ -#endif /* __ASM_MIPS_GT64120_H */ diff --git a/include/asm-mips/mach-yosemite/cpu-feature-overrides.h b/include/asm-mips/mach-yosemite/cpu-feature-overrides.h index 42cebb7ce..3073542c9 100644 --- a/include/asm-mips/mach-yosemite/cpu-feature-overrides.h +++ b/include/asm-mips/mach-yosemite/cpu-feature-overrides.h @@ -31,7 +31,7 @@ #define cpu_has_nofpuex 0 #define cpu_has_64bits 1 -#define cpu_has_inclusive_pcaches 0 +#define cpu_has_subset_pcaches 0 #define cpu_dcache_line_size() 32 #define cpu_icache_line_size() 32 diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index b98f1658c..fa8b913cc 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h @@ -20,6 +20,7 @@ #ifndef __ASM_MIPS_BOARDS_GENERIC_H #define __ASM_MIPS_BOARDS_GENERIC_H +#include #include #include #include diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index 1f318d707..5af7517fc 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h @@ -13,6 +13,7 @@ #ifndef _ASM_MIPSREGS_H #define _ASM_MIPSREGS_H +#include #include #include @@ -470,8 +471,6 @@ /* Bits specific to the VR41xx. */ #define VR41_CONF_CS (_ULCAST_(1) << 12) -#define VR41_CONF_P4K (_ULCAST_(1) << 13) -#define VR41_CONF_BP (_ULCAST_(1) << 16) #define VR41_CONF_M16 (_ULCAST_(1) << 20) #define VR41_CONF_AD (_ULCAST_(1) << 23) @@ -1418,7 +1417,7 @@ change_c0_##name(unsigned int change, unsigned int new) \ #else /* SMTC versions that manage MT scheduling */ -#include +#include /* * This is a duplicate of dmt() in mipsmtregs.h to avoid problems with @@ -1452,17 +1451,18 @@ static inline void __emt(unsigned int previous) { if ((previous & __EMT_ENABLE)) __asm__ __volatile__( + " .set noreorder \n" " .set mips32r2 \n" " .word 0x41600be1 # emt \n" " ehb \n" - " .set mips0 \n"); + " .set mips0 \n" + " .set reorder \n"); } static inline void __ehb(void) { __asm__ __volatile__( - " .set mips32r2 \n" - " ehb \n" " .set mips0 \n"); + " ehb \n"); } /* diff --git a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h index 18b69de87..6e09f4c87 100644 --- a/include/asm-mips/mmu_context.h +++ b/include/asm-mips/mmu_context.h @@ -11,6 +11,7 @@ #ifndef _ASM_MMU_CONTEXT_H #define _ASM_MMU_CONTEXT_H +#include #include #include #include diff --git a/include/asm-mips/mmzone.h b/include/asm-mips/mmzone.h index f53ec54c9..7bde44320 100644 --- a/include/asm-mips/mmzone.h +++ b/include/asm-mips/mmzone.h @@ -5,13 +5,26 @@ #ifndef _ASM_MMZONE_H_ #define _ASM_MMZONE_H_ +#include #include #include #ifdef CONFIG_DISCONTIGMEM +#define kvaddr_to_nid(kvaddr) pa_to_nid(__pa(kvaddr)) #define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT) +#define pfn_valid(pfn) \ +({ \ + unsigned long __pfn = (pfn); \ + int __n = pfn_to_nid(__pfn); \ + ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ + NODE_DATA(__n)->node_spanned_pages) : 0);\ +}) + +/* XXX: FIXME -- wli */ +#define kern_addr_valid(addr) (0) + #endif /* CONFIG_DISCONTIGMEM */ #endif /* _ASM_MMZONE_H_ */ diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h index 694f97959..3e3ba057a 100644 --- a/include/asm-mips/module.h +++ b/include/asm-mips/module.h @@ -1,6 +1,7 @@ #ifndef _ASM_MODULE_H #define _ASM_MODULE_H +#include #include #include diff --git a/include/asm-mips/msgbuf.h b/include/asm-mips/msgbuf.h index 0d6c7f14d..a15339597 100644 --- a/include/asm-mips/msgbuf.h +++ b/include/asm-mips/msgbuf.h @@ -1,6 +1,7 @@ #ifndef _ASM_MSGBUF_H #define _ASM_MSGBUF_H +#include /* * The msqid64_ds structure for the MIPS architecture. diff --git a/include/asm-mips/paccess.h b/include/asm-mips/paccess.h index 147844ef1..46f2d23d2 100644 --- a/include/asm-mips/paccess.h +++ b/include/asm-mips/paccess.h @@ -13,6 +13,7 @@ #ifndef _ASM_PACCESS_H #define _ASM_PACCESS_H +#include #include #ifdef CONFIG_32BIT diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 43131ed89..7a18d1a66 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h @@ -9,11 +9,14 @@ #ifndef _ASM_PAGE_H #define _ASM_PAGE_H +#include #ifdef __KERNEL__ #include +#endif + /* * PAGE_SHIFT determines the page size */ @@ -32,6 +35,8 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) + +#ifdef __KERNEL__ #ifndef __ASSEMBLY__ extern void clear_page(void * page); @@ -134,25 +139,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) -#ifdef CONFIG_FLATMEM - +#ifndef CONFIG_SPARSEMEM +#ifndef CONFIG_NEED_MULTIPLE_NODES #define pfn_valid(pfn) ((pfn) < max_mapnr) - -#elif defined(CONFIG_SPARSEMEM) - -/* pfn_valid is defined in linux/mmzone.h */ - -#elif defined(CONFIG_NEED_MULTIPLE_NODES) - -#define pfn_valid(pfn) \ -({ \ - unsigned long __pfn = (pfn); \ - int __n = pfn_to_nid(__pfn); \ - ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ - NODE_DATA(__n)->node_spanned_pages) \ - : 0); \ -}) - +#endif #endif #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) @@ -164,6 +154,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) +#endif /* defined (__KERNEL__) */ + #ifdef CONFIG_LIMITED_DMA #define WANT_PAGE_VIRTUAL #endif @@ -171,8 +163,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #include #include -#endif /* defined (__KERNEL__) */ - #define devmem_is_allowed(x) 1 #endif /* _ASM_PAGE_H */ diff --git a/include/asm-mips/param.h b/include/asm-mips/param.h index 1d9bb8c5a..2bead8273 100644 --- a/include/asm-mips/param.h +++ b/include/asm-mips/param.h @@ -11,7 +11,7 @@ #ifdef __KERNEL__ -# define HZ CONFIG_HZ /* Internal kernel timer frequency */ +# include /* Internal kernel timer frequency */ # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ #endif diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index c4d68bebd..6c9ad8171 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h @@ -6,6 +6,7 @@ #ifndef _ASM_PCI_H #define _ASM_PCI_H +#include #include #ifdef __KERNEL__ diff --git a/include/asm-mips/pci/bridge.h b/include/asm-mips/pci/bridge.h index 0c45e7598..b4ee995c5 100644 --- a/include/asm-mips/pci/bridge.h +++ b/include/asm-mips/pci/bridge.h @@ -15,7 +15,6 @@ #include #include #include /* generic widget header */ -#include /* I/O page size */ @@ -849,6 +848,4 @@ struct bridge_controller { extern void register_bridge_irq(unsigned int irq); extern int request_bridge_irq(struct bridge_controller *bc); -extern struct pci_ops bridge_pci_ops; - #endif /* _ASM_PCI_BRIDGE_H */ diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index 582c1fe6c..fe1df5723 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h @@ -9,6 +9,7 @@ #ifndef _ASM_PGALLOC_H #define _ASM_PGALLOC_H +#include #include #include diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 4b26d8528..087c20769 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h @@ -9,6 +9,7 @@ #ifndef _ASM_PGTABLE_32_H #define _ASM_PGTABLE_32_H +#include #include #include diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index e3db93212..2faf5c9ff 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h @@ -9,6 +9,7 @@ #ifndef _ASM_PGTABLE_64_H #define _ASM_PGTABLE_64_H +#include #include #include diff --git a/include/asm-mips/pgtable-bits.h b/include/asm-mips/pgtable-bits.h index 7494ba911..01e76e932 100644 --- a/include/asm-mips/pgtable-bits.h +++ b/include/asm-mips/pgtable-bits.h @@ -10,6 +10,7 @@ #ifndef _ASM_PGTABLE_BITS_H #define _ASM_PGTABLE_BITS_H +#include /* * Note that we shift the lower 32bits of each EntryLo[01] entry diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index a36ca1be1..d0af2a3b0 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h @@ -8,6 +8,7 @@ #ifndef _ASM_PGTABLE_H #define _ASM_PGTABLE_H +#include #ifdef CONFIG_32BIT #include #endif @@ -378,7 +379,9 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, __update_cache(vma, address, pte); } +#ifndef CONFIG_NEED_MULTIPLE_NODES #define kern_addr_valid(addr) (1) +#endif #ifdef CONFIG_64BIT_PHYS_ADDR extern int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); diff --git a/include/asm-mips/prefetch.h b/include/asm-mips/prefetch.h index 17850834c..71293ec16 100644 --- a/include/asm-mips/prefetch.h +++ b/include/asm-mips/prefetch.h @@ -8,6 +8,7 @@ #ifndef __ASM_PREFETCH_H #define __ASM_PREFETCH_H +#include /* * R5000 and RM5200 implements pref and prefx instructions but they're nops, so diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 5f80ba71a..0fb75f076 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -11,6 +11,7 @@ #ifndef _ASM_PROCESSOR_H #define _ASM_PROCESSOR_H +#include #include #include @@ -70,6 +71,11 @@ extern unsigned int vced_count, vcei_count; typedef __u64 fpureg_t; +struct mips_fpu_hard_struct { + fpureg_t fpr[NUM_FPU_REGS]; + unsigned int fcr31; +}; + /* * It would be nice to add some more fields for emulator statistics, but there * are a number of fixed offsets in offset.h and elsewhere that would have to @@ -77,13 +83,18 @@ typedef __u64 fpureg_t; * the FPU emulator for now. See asm-mips/fpu_emulator.h. */ -struct mips_fpu_struct { +struct mips_fpu_soft_struct { fpureg_t fpr[NUM_FPU_REGS]; unsigned int fcr31; }; +union mips_fpu_union { + struct mips_fpu_hard_struct hard; + struct mips_fpu_soft_struct soft; +}; + #define INIT_FPU { \ - {0,} \ + {{0,},} \ } #define NUM_DSP_REGS 6 @@ -122,7 +133,7 @@ struct thread_struct { unsigned long cp0_status; /* Saved fpu/fpu emulator stuff. */ - struct mips_fpu_struct fpu; + union mips_fpu_union fpu; #ifdef CONFIG_MIPS_MT_FPAFF /* Emulated instruction count */ unsigned long emulated_fp; diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 4113316ee..fa9d8713c 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h @@ -9,6 +9,7 @@ #ifndef _ASM_PTRACE_H #define _ASM_PTRACE_H +#include #include diff --git a/include/asm-mips/qemu.h b/include/asm-mips/qemu.h index 531caf445..905c39585 100644 --- a/include/asm-mips/qemu.h +++ b/include/asm-mips/qemu.h @@ -21,10 +21,4 @@ */ #define QEMU_C0_COUNTER_CLOCK 100000000 -/* - * Magic qemu system control location. - */ -#define QEMU_RESTART_REG 0xBFBF0000 -#define QEMU_HALT_REG 0xBFBF0004 - #endif /* __ASM_QEMU_H */ diff --git a/include/asm-mips/reg.h b/include/asm-mips/reg.h index 634b55d7e..6173004cc 100644 --- a/include/asm-mips/reg.h +++ b/include/asm-mips/reg.h @@ -12,6 +12,7 @@ #ifndef __ASM_MIPS_REG_H #define __ASM_MIPS_REG_H +#include #if defined(CONFIG_32BIT) || defined(WANT_COMPAT_REG_H) diff --git a/include/asm-mips/resource.h b/include/asm-mips/resource.h index 87cb30852..1fba00c22 100644 --- a/include/asm-mips/resource.h +++ b/include/asm-mips/resource.h @@ -9,6 +9,7 @@ #ifndef _ASM_RESOURCE_H #define _ASM_RESOURCE_H +#include /* * These five resource limit IDs have a MIPS/Linux-specific ordering, diff --git a/include/asm-mips/rm9k-ocd.h b/include/asm-mips/rm9k-ocd.h deleted file mode 100644 index b0b80d9ec..000000000 --- a/include/asm-mips/rm9k-ocd.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2004 by Basler Vision Technologies AG - * Author: Thomas Koeller - * - * 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 - */ - -#if !defined(_ASM_RM9K_OCD_H) -#define _ASM_RM9K_OCD_H - -#include -#include -#include - -extern volatile void __iomem * const ocd_base; -extern volatile void __iomem * const titan_base; - -#define ocd_addr(__x__) (ocd_base + (__x__)) -#define titan_addr(__x__) (titan_base + (__x__)) -#define scram_addr(__x__) (scram_base + (__x__)) - -/* OCD register access */ -#define ocd_readl(__offs__) __raw_readl(ocd_addr(__offs__)) -#define ocd_readw(__offs__) __raw_readw(ocd_addr(__offs__)) -#define ocd_readb(__offs__) __raw_readb(ocd_addr(__offs__)) -#define ocd_writel(__val__, __offs__) \ - __raw_writel((__val__), ocd_addr(__offs__)) -#define ocd_writew(__val__, __offs__) \ - __raw_writew((__val__), ocd_addr(__offs__)) -#define ocd_writeb(__val__, __offs__) \ - __raw_writeb((__val__), ocd_addr(__offs__)) - -/* TITAN register access - 32 bit-wide only */ -#define titan_readl(__offs__) __raw_readl(titan_addr(__offs__)) -#define titan_writel(__val__, __offs__) \ - __raw_writel((__val__), titan_addr(__offs__)) - -/* Protect access to shared TITAN registers */ -extern spinlock_t titan_lock; -extern int titan_irqflags; -#define lock_titan_regs() spin_lock_irqsave(&titan_lock, titan_irqflags) -#define unlock_titan_regs() spin_unlock_irqrestore(&titan_lock, titan_irqflags) - -#endif /* !defined(_ASM_RM9K_OCD_H) */ diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h index 584bd9c0a..7196ceb0e 100644 --- a/include/asm-mips/serial.h +++ b/include/asm-mips/serial.h @@ -9,6 +9,7 @@ #ifndef _ASM_SERIAL_H #define _ASM_SERIAL_H +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h index ddb859d05..722b77a8c 100644 --- a/include/asm-mips/sgiarcs.h +++ b/include/asm-mips/sgiarcs.h @@ -12,6 +12,7 @@ #ifndef _ASM_SGIARCS_H #define _ASM_SGIARCS_H +#include #include #include diff --git a/include/asm-mips/sibyte/board.h b/include/asm-mips/sibyte/board.h index 3dfe29ed4..900edcbee 100644 --- a/include/asm-mips/sibyte/board.h +++ b/include/asm-mips/sibyte/board.h @@ -19,6 +19,7 @@ #ifndef _SIBYTE_BOARD_H #define _SIBYTE_BOARD_H +#include #if defined(CONFIG_SIBYTE_SWARM) || defined(CONFIG_SIBYTE_PTSWARM) || \ defined(CONFIG_SIBYTE_CRHONE) || defined(CONFIG_SIBYTE_CRHINE) || \ diff --git a/include/asm-mips/sibyte/carmel.h b/include/asm-mips/sibyte/carmel.h index 57c53e62a..b5e7dae19 100644 --- a/include/asm-mips/sibyte/carmel.h +++ b/include/asm-mips/sibyte/carmel.h @@ -18,6 +18,7 @@ #ifndef __ASM_SIBYTE_CARMEL_H #define __ASM_SIBYTE_CARMEL_H +#include #include #include diff --git a/include/asm-mips/sibyte/sentosa.h b/include/asm-mips/sibyte/sentosa.h index 64c47874f..824605847 100644 --- a/include/asm-mips/sibyte/sentosa.h +++ b/include/asm-mips/sibyte/sentosa.h @@ -18,6 +18,7 @@ #ifndef __ASM_SIBYTE_SENTOSA_H #define __ASM_SIBYTE_SENTOSA_H +#include #include #include diff --git a/include/asm-mips/sibyte/swarm.h b/include/asm-mips/sibyte/swarm.h index 86db37e5a..06e1d528e 100644 --- a/include/asm-mips/sibyte/swarm.h +++ b/include/asm-mips/sibyte/swarm.h @@ -18,6 +18,7 @@ #ifndef __ASM_SIBYTE_SWARM_H #define __ASM_SIBYTE_SWARM_H +#include #include #include diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index 2e32949bd..2ba313d94 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h @@ -9,6 +9,7 @@ #ifndef _ASM_SIGINFO_H #define _ASM_SIGINFO_H +#include #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h index 87a1dff95..d8349e4b5 100644 --- a/include/asm-mips/signal.h +++ b/include/asm-mips/signal.h @@ -9,6 +9,7 @@ #ifndef _ASM_SIGNAL_H #define _ASM_SIGNAL_H +#include #include #define _NSIG 128 @@ -64,6 +65,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -83,6 +85,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 /* Only for o32 */ @@ -97,6 +100,15 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ #ifdef __KERNEL__ +/* + * These values of sa_flags are used only by the kernel as part of the + * irq handling routines. + * + * SA_INTERRUPT is also used by the irq handling routines. + * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. + */ +#define SA_SAMPLE_RANDOM SA_RESTART + #ifdef CONFIG_TRAD_SIGNALS #define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) #else diff --git a/include/asm-mips/sim.h b/include/asm-mips/sim.h index 67c4fe52b..9c2af1b00 100644 --- a/include/asm-mips/sim.h +++ b/include/asm-mips/sim.h @@ -9,6 +9,7 @@ #ifndef _ASM_SIM_H #define _ASM_SIM_H +#include #include diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h index 1608fd71d..e14e4b69d 100644 --- a/include/asm-mips/smp.h +++ b/include/asm-mips/smp.h @@ -11,6 +11,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #ifdef CONFIG_SMP diff --git a/include/asm-mips/sn/addrs.h b/include/asm-mips/sn/addrs.h index 8fa0af6b6..2b5cef1ba 100644 --- a/include/asm-mips/sn/addrs.h +++ b/include/asm-mips/sn/addrs.h @@ -9,6 +9,7 @@ #ifndef _ASM_SN_ADDRS_H #define _ASM_SN_ADDRS_H +#include #ifndef __ASSEMBLY__ #include @@ -26,8 +27,13 @@ #ifndef __ASSEMBLY__ +#if defined(CONFIG_SGI_IO) /* FIXME */ +#define PS_UINT_CAST (__psunsigned_t) +#define UINT64_CAST (__uint64_t) +#else /* CONFIG_SGI_IO */ #define PS_UINT_CAST (unsigned long) #define UINT64_CAST (unsigned long) +#endif /* CONFIG_SGI_IO */ #define HUBREG_CAST (volatile hubreg_t *) @@ -247,6 +253,14 @@ * for _x. */ +#ifdef _STANDALONE + +/* DO NOT USE THESE DIRECTLY IN THE KERNEL. SEE BELOW. */ +#define LOCAL_HUB(_x) (HUBREG_CAST (IALIAS_BASE + (_x))) +#define REMOTE_HUB(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ + 0x800000 + (_x))) +#endif /* _STANDALONE */ + /* * WARNING: * When certain Hub chip workaround are defined, it's not sufficient @@ -313,6 +327,20 @@ PHYS_TO_K0(NODE_OFFSET(nasid) | ARCS_SPB_OFFSET) #define ARCS_SPB_SIZE 0x0400 +#ifdef _STANDALONE + +#define ARCS_TVECTOR_OFFSET 0x2800 +#define ARCS_PVECTOR_OFFSET 0x2c00 + +/* + * These addresses are used by the master CPU to install the transfer + * and private vectors. All others use the SPB to find them. + */ +#define TVADDR (NODE_CAC_BASE(get_nasid()) + ARCS_TVECTOR_OFFSET) +#define PVADDR (NODE_CAC_BASE(get_nasid()) + ARCS_PVECTOR_OFFSET) + +#endif /* _STANDALONE */ + #define KLDIR_OFFSET 0x2000 #define KLDIR_ADDR(nasid) \ TO_NODE_UNCAC((nasid), KLDIR_OFFSET) diff --git a/include/asm-mips/sn/agent.h b/include/asm-mips/sn/agent.h index ac4ea85c3..d6df13aae 100644 --- a/include/asm-mips/sn/agent.h +++ b/include/asm-mips/sn/agent.h @@ -11,6 +11,7 @@ #ifndef _ASM_SGI_SN_AGENT_H #define _ASM_SGI_SN_AGENT_H +#include #include #include #include diff --git a/include/asm-mips/sn/arch.h b/include/asm-mips/sn/arch.h index 51174af6a..d247a819d 100644 --- a/include/asm-mips/sn/arch.h +++ b/include/asm-mips/sn/arch.h @@ -11,6 +11,7 @@ #ifndef _ASM_SN_ARCH_H #define _ASM_SN_ARCH_H +#include #include #include #ifdef CONFIG_SGI_IP27 diff --git a/include/asm-mips/sn/io.h b/include/asm-mips/sn/io.h index ab2fa8cd2..13326453e 100644 --- a/include/asm-mips/sn/io.h +++ b/include/asm-mips/sn/io.h @@ -9,6 +9,7 @@ #ifndef _ASM_SN_IO_H #define _ASM_SN_IO_H +#include #if defined (CONFIG_SGI_IP27) #include #endif diff --git a/include/asm-mips/sn/ioc3.h b/include/asm-mips/sn/ioc3.h index 099677774..f7d530f30 100644 --- a/include/asm-mips/sn/ioc3.h +++ b/include/asm-mips/sn/ioc3.h @@ -5,8 +5,6 @@ #ifndef _IOC3_H #define _IOC3_H -#include - /* SUPERIO uart register map */ typedef volatile struct ioc3_uartregs { union { diff --git a/include/asm-mips/sn/klconfig.h b/include/asm-mips/sn/klconfig.h index b63cd0655..9709ff701 100644 --- a/include/asm-mips/sn/klconfig.h +++ b/include/asm-mips/sn/klconfig.h @@ -27,6 +27,7 @@ * that offsets of existing fields do not change. */ +#include #include #include @@ -36,7 +37,7 @@ //#include // XXX Stolen from : #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ -#include +#include //#include //#include @@ -53,21 +54,32 @@ #include #include #include -#if defined(CONFIG_SGI_IP35) +#if defined(CONFIG_SGI_IO) || defined(CONFIG_SGI_IP35) // The hack file has to be before vector and after sn0_fru.... #include #include #include -#endif /* CONFIG_SGI_IP35 */ +#endif /* CONFIG_SGI_IO || CONFIG_SGI_IP35 */ #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ #define KLCFGINFO_MAGIC 0xbeedbabe +#ifdef FRUTEST +typedef u64 klconf_off_t; +#else typedef s32 klconf_off_t; +#endif /* * Some IMPORTANT OFFSETS. These are the offsets on all NODES. */ +#if 0 +#define RAMBASE 0 +#define ARCSSPB_OFF 0x1000 /* shift it to sys/arcs/spb.h */ + +#define OFF_HWGRAPH 0 +#endif + #define MAX_MODULE_ID 255 #define SIZE_PAD 4096 /* 4k padding for structures */ /* @@ -122,9 +134,15 @@ typedef s32 klconf_off_t; typedef struct console_s { +#if defined(CONFIG_SGI_IO) /* FIXME */ + __psunsigned_t uart_base; + __psunsigned_t config_base; + __psunsigned_t memory_base; +#else unsigned long uart_base; unsigned long config_base; unsigned long memory_base; +#endif short baud; short flag; int type; @@ -156,6 +174,10 @@ typedef struct kl_config_hdr { #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) +#if 0 +#define KL_CONFIG_MALLOC_HDR(_nasid) \ + (KL_CONFIG_HDR(_nasid)->ch_malloc_hdr) +#endif #define KL_CONFIG_INFO_OFFSET(_nasid) \ (KL_CONFIG_HDR(_nasid)->ch_board_info) #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ @@ -175,13 +197,23 @@ typedef struct kl_config_hdr { /* --- New Macros for the changed kl_config_hdr_t structure --- */ +#if defined(CONFIG_SGI_IO) +#define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ + ((__psunsigned_t)_k + (_k->ch_malloc_hdr_off))) +#else #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ (unsigned long)_k + (_k->ch_malloc_hdr_off))) +#endif #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) +#if defined(CONFIG_SGI_IO) +#define PTR_CH_CONS_INFO(_k) ((console_t *)\ + ((__psunsigned_t)_k + (_k->ch_cons_off))) +#else #define PTR_CH_CONS_INFO(_k) ((console_t *)\ ((unsigned long)_k + (_k->ch_cons_off))) +#endif #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n)) @@ -458,6 +490,14 @@ typedef struct lboard_s { #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) +#ifdef FRUTEST + +#define KLCF_NEXT(_brd) ((_brd)->brd_next ? (lboard_t *)((_brd)->brd_next): NULL) +#define KLCF_COMP(_brd, _ndx) (klinfo_t *)((_brd)->brd_compts[(_ndx)]) +#define KLCF_COMP_ERROR(_brd, _comp) (_brd = _brd , (_comp)->errinfo) + +#else + #define KLCF_NEXT(_brd) \ ((_brd)->brd_next ? \ (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ @@ -469,6 +509,8 @@ typedef struct lboard_s { #define KLCF_COMP_ERROR(_brd, _comp) \ (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) +#endif + #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ @@ -589,6 +631,18 @@ typedef struct klport_s { klconf_off_t port_offset; } klport_t; +#if 0 +/* + * This is very similar to the klport_s but instead of having a componant + * offset it has a board offset. + */ +typedef struct klxbow_port_s { + nasid_t port_nasid; + unsigned char port_flag; + klconf_off_t board_offset; +} klxbow_port_t; +#endif + typedef struct klcpu_s { /* CPU */ klinfo_t cpu_info; unsigned short cpu_prid; /* Processor PRID value */ @@ -602,7 +656,7 @@ typedef struct klcpu_s { /* CPU */ typedef struct klhub_s { /* HUB */ klinfo_t hub_info; - unsigned int hub_flags; /* PCFG_HUB_xxx flags */ + uint hub_flags; /* PCFG_HUB_xxx flags */ klport_t hub_port; /* hub is connected to this */ nic_t hub_box_nic; /* nic of containing box */ klconf_off_t hub_mfg_nic; /* MFG NIC string */ @@ -611,7 +665,7 @@ typedef struct klhub_s { /* HUB */ typedef struct klhub_uart_s { /* HUB */ klinfo_t hubuart_info; - unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */ + uint hubuart_flags; /* PCFG_HUB_xxx flags */ nic_t hubuart_box_nic; /* nic of containing box */ } klhub_uart_t ; @@ -710,7 +764,7 @@ typedef struct klvmed_s { /* VME DEVICE - VME BOARD */ /* XXX - Don't we need the number of ports here?!? */ typedef struct klrou_s { /* ROUTER */ klinfo_t rou_info ; - unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */ + uint rou_flags ; /* PCFG_ROUTER_xxx flags */ nic_t rou_box_nic ; /* nic of the containing module */ klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ klconf_off_t rou_mfg_nic ; /* MFG NIC string */ @@ -733,8 +787,8 @@ typedef struct klgfx_s { /* GRAPHICS Device */ klinfo_t gfx_info; klconf_off_t old_gndevs; /* for compatibility with older proms */ klconf_off_t old_gdoff0; /* for compatibility with older proms */ - unsigned int cookie; /* for compatibility with older proms */ - unsigned int moduleslot; + uint cookie; /* for compatibility with older proms */ + uint moduleslot; struct klgfx_s *gfx_next_pipe; graphics_t gfx_specific; klconf_off_t pad0; /* for compatibility with older proms */ @@ -891,6 +945,36 @@ extern klcpu_t *nasid_slice_to_cpuinfo(nasid_t, int); extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); +#if defined(CONFIG_SGI_IO) +extern xwidgetnum_t nodevertex_widgetnum_get(vertex_hdl_t node_vtx); +extern vertex_hdl_t nodevertex_xbow_peer_get(vertex_hdl_t node_vtx); +extern lboard_t *find_gfxpipe(int pipenum); +extern void setup_gfxpipe_link(vertex_hdl_t vhdl,int pipenum); +extern lboard_t *find_lboard_module_class(lboard_t *start, moduleid_t mod, + unsigned char brd_class); +extern lboard_t *find_nic_lboard(lboard_t *, nic_t); +extern lboard_t *find_nic_type_lboard(nasid_t, unsigned char, nic_t); +extern lboard_t *find_lboard_modslot(lboard_t *start, moduleid_t mod, slotid_t slot); +extern lboard_t *find_lboard_module(lboard_t *start, moduleid_t mod); +extern lboard_t *get_board_name(nasid_t nasid, moduleid_t mod, slotid_t slot, char *name); +extern int config_find_nic_router(nasid_t, nic_t, lboard_t **, klrou_t**); +extern int config_find_nic_hub(nasid_t, nic_t, lboard_t **, klhub_t**); +extern int config_find_xbow(nasid_t, lboard_t **, klxbow_t**); +extern klcpu_t *get_cpuinfo(cpuid_t cpu); +extern int update_klcfg_cpuinfo(nasid_t, int); +extern void board_to_path(lboard_t *brd, char *path); +extern moduleid_t get_module_id(nasid_t nasid); +extern void nic_name_convert(char *old_name, char *new_name); +extern int module_brds(nasid_t nasid, lboard_t **module_brds, int n); +extern lboard_t *brd_from_key(ulong_t key); +extern void device_component_canonical_name_get(lboard_t *,klinfo_t *, + char *); +extern int board_serial_number_get(lboard_t *,char *); +extern int is_master_baseio(nasid_t,moduleid_t,slotid_t); +extern nasid_t get_actual_nasid(lboard_t *brd) ; +extern net_vec_t klcfg_discover_route(lboard_t *, lboard_t *, int); +#else /* CONFIG_SGI_IO */ extern klcpu_t *sn_get_cpuinfo(cpuid_t cpu); +#endif /* CONFIG_SGI_IO */ #endif /* _ASM_SN_KLCONFIG_H */ diff --git a/include/asm-mips/sn/kldir.h b/include/asm-mips/sn/kldir.h index 0573cbffc..f0efab167 100644 --- a/include/asm-mips/sn/kldir.h +++ b/include/asm-mips/sn/kldir.h @@ -11,6 +11,11 @@ #ifndef _ASM_SN_KLDIR_H #define _ASM_SN_KLDIR_H +#include + +#if defined(CONFIG_SGI_IO) +#include +#endif /* * The kldir memory area resides at a fixed place in each node's memory and @@ -131,6 +136,8 @@ #define KLDIR_OFF_STRIDE 0x28 #endif /* __ASSEMBLY__ */ +#if !defined(CONFIG_SGI_IO) + /* * This is defined here because IP27_SYMMON_STK_SIZE must be at least what * we define here. Since it's set up in the prom. We can't redefine it later @@ -140,7 +147,7 @@ */ #define SYMMON_STACK_SIZE 0x8000 -#if defined (PROM) +#if defined (PROM) || defined (SABLE) /* * These defines are prom version dependent. No code other than the IP27 @@ -177,7 +184,7 @@ #define IP27_FREEMEM_COUNT 1 #define IP27_FREEMEM_STRIDE 0 -#endif /* PROM */ +#endif /* PROM || SABLE*/ /* * There will be only one of these in a partition so the IO6 must set it up. */ @@ -200,11 +207,17 @@ #define KLDIR_ENT_SIZE 0x40 #define KLDIR_MAX_ENTRIES (0x400 / 0x40) +#endif /* !CONFIG_SGI_IO */ + #ifndef __ASSEMBLY__ typedef struct kldir_ent_s { u64 magic; /* Indicates validity of entry */ off_t offset; /* Offset from start of node space */ +#if defined(CONFIG_SGI_IO) /* FIXME */ + __psunsigned_t pointer; /* Pointer to area in some cases */ +#else unsigned long pointer; /* Pointer to area in some cases */ +#endif size_t size; /* Size in bytes */ u64 count; /* Repeat count if array, 1 if not */ size_t stride; /* Stride if array, 0 if not */ @@ -214,4 +227,22 @@ typedef struct kldir_ent_s { } kldir_ent_t; #endif /* !__ASSEMBLY__ */ +#if defined(CONFIG_SGI_IO) + +#define KLDIR_ENT_SIZE 0x40 +#define KLDIR_MAX_ENTRIES (0x400 / 0x40) + +/* + * The actual offsets of each memory area are machine-dependent + */ +#ifdef CONFIG_SGI_IP27 +// Not yet #include +#elif defined(CONFIG_SGI_IP35) +#include +#else +#error "kldir.h is currently defined for IP27 and IP35 platforms only" +#endif + +#endif /* CONFIG_SGI_IO */ + #endif /* _ASM_SN_KLDIR_H */ diff --git a/include/asm-mips/sn/launch.h b/include/asm-mips/sn/launch.h index b7c222631..b67699c0c 100644 --- a/include/asm-mips/sn/launch.h +++ b/include/asm-mips/sn/launch.h @@ -9,6 +9,7 @@ #ifndef _ASM_SN_LAUNCH_H #define _ASM_SN_LAUNCH_H +#include #include #include diff --git a/include/asm-mips/sn/mapped_kernel.h b/include/asm-mips/sn/mapped_kernel.h index c3dd5d0d5..59edb20f8 100644 --- a/include/asm-mips/sn/mapped_kernel.h +++ b/include/asm-mips/sn/mapped_kernel.h @@ -20,6 +20,7 @@ * code. So no jumps can be done before we have switched to using * cksseg addresses. */ +#include #include #define REP_BASE CAC_BASE diff --git a/include/asm-mips/sn/sn0/addrs.h b/include/asm-mips/sn/sn0/addrs.h index 9e8cc5291..398815639 100644 --- a/include/asm-mips/sn/sn0/addrs.h +++ b/include/asm-mips/sn/sn0/addrs.h @@ -11,6 +11,7 @@ #ifndef _ASM_SN_SN0_ADDRS_H #define _ASM_SN_SN0_ADDRS_H +#include /* * SN0 (on a T5) Address map @@ -48,7 +49,7 @@ * so for now we just use defines bracketed by an ifdef. */ -#ifdef CONFIG_SGI_SN_N_MODE +#ifdef CONFIG_SGI_SN0_N_MODE #define NODE_SIZE_BITS 31 #define BWIN_SIZE_BITS 28 @@ -62,7 +63,7 @@ #define BDDIR_UPPER_MASK (UINT64_CAST 0x7ffff << 10) #define BDECC_UPPER_MASK (UINT64_CAST 0x3ffffff << 3) -#else /* !defined(CONFIG_SGI_SN_N_MODE), assume that M-mode is desired */ +#else /* !defined(CONFIG_SGI_SN0_N_MODE), assume that M-mode is desired */ #define NODE_SIZE_BITS 32 #define BWIN_SIZE_BITS 29 @@ -76,7 +77,7 @@ #define BDDIR_UPPER_MASK (UINT64_CAST 0xfffff << 10) #define BDECC_UPPER_MASK (UINT64_CAST 0x7ffffff << 3) -#endif /* !defined(CONFIG_SGI_SN_N_MODE) */ +#endif /* !defined(CONFIG_SGI_SN0_N_MODE) */ #define NODE_ADDRSPACE_SIZE (UINT64_CAST 1 << NODE_SIZE_BITS) @@ -84,15 +85,15 @@ #define NASID_GET(_pa) (int) ((UINT64_CAST (_pa) >> \ NASID_SHFT) & NASID_BITMASK) -#if !defined(__ASSEMBLY__) +#if !defined(__ASSEMBLY__) && !defined(_STANDALONE) #define NODE_SWIN_BASE(nasid, widget) \ ((widget == 0) ? NODE_BWIN_BASE((nasid), SWIN0_BIGWIN) \ : RAW_NODE_SWIN_BASE(nasid, widget)) -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLY__ || _STANDALONE */ #define NODE_SWIN_BASE(nasid, widget) \ (NODE_IO_BASE(nasid) + (UINT64_CAST (widget) << SWIN_SIZE_BITS)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ || _STANDALONE */ /* * The following definitions pertain to the IO special address @@ -142,7 +143,12 @@ #define SN0_WIDGET_BASE(_nasid, _wid) (NODE_SWIN_BASE((_nasid), (_wid))) /* Turn on sable logging for the processors whose bits are set. */ +#ifdef SABLE +#define SABLE_LOG_TRIGGER(_map) \ + *((volatile hubreg_t *)(IO_BASE + 0x17ffff0)) = (_map) +#else #define SABLE_LOG_TRIGGER(_map) +#endif /* SABLE */ #ifndef __ASSEMBLY__ #define KERN_NMI_ADDR(nasid, slice) \ @@ -275,6 +281,76 @@ #define _ARCSPROM +#ifdef _STANDALONE + +/* + * The PROM needs to pass the device base address and the + * device pci cfg space address to the device drivers during + * install. The COMPONENT->Key field is used for this purpose. + * Macros needed by SN0 device drivers to convert the + * COMPONENT->Key field to the respective base address. + * Key field looks as follows: + * + * +----------------------------------------------------+ + * |devnasid | widget |pciid |hubwidid|hstnasid | adap | + * | 2 | 1 | 1 | 1 | 2 | 1 | + * +----------------------------------------------------+ + * | | | | | | | + * 64 48 40 32 24 8 0 + * + * These are used by standalone drivers till the io infrastructure + * is in place. + */ + +#ifndef __ASSEMBLY__ + +#define uchar unsigned char + +#define KEY_DEVNASID_SHFT 48 +#define KEY_WIDID_SHFT 40 +#define KEY_PCIID_SHFT 32 +#define KEY_HUBWID_SHFT 24 +#define KEY_HSTNASID_SHFT 8 + +#define MK_SN0_KEY(nasid, widid, pciid) \ + ((((__psunsigned_t)nasid)<< KEY_DEVNASID_SHFT |\ + ((__psunsigned_t)widid) << KEY_WIDID_SHFT) |\ + ((__psunsigned_t)pciid) << KEY_PCIID_SHFT) + +#define ADD_HUBWID_KEY(key,hubwid)\ + (key|=((__psunsigned_t)hubwid << KEY_HUBWID_SHFT)) + +#define ADD_HSTNASID_KEY(key,hstnasid)\ + (key|=((__psunsigned_t)hstnasid << KEY_HSTNASID_SHFT)) + +#define GET_DEVNASID_FROM_KEY(key) ((short)(key >> KEY_DEVNASID_SHFT)) +#define GET_WIDID_FROM_KEY(key) ((uchar)(key >> KEY_WIDID_SHFT)) +#define GET_PCIID_FROM_KEY(key) ((uchar)(key >> KEY_PCIID_SHFT)) +#define GET_HUBWID_FROM_KEY(key) ((uchar)(key >> KEY_HUBWID_SHFT)) +#define GET_HSTNASID_FROM_KEY(key) ((short)(key >> KEY_HSTNASID_SHFT)) + +#define PCI_64_TARGID_SHFT 60 + +#define GET_PCIBASE_FROM_KEY(key) (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\ + GET_WIDID_FROM_KEY(key))\ + | BRIDGE_DEVIO(GET_PCIID_FROM_KEY(key))) + +#define GET_PCICFGBASE_FROM_KEY(key) \ + (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\ + GET_WIDID_FROM_KEY(key))\ + | BRIDGE_TYPE0_CFG_DEV(GET_PCIID_FROM_KEY(key))) + +#define GET_WIDBASE_FROM_KEY(key) \ + (NODE_SWIN_BASE(GET_DEVNASID_FROM_KEY(key),\ + GET_WIDID_FROM_KEY(key))) + +#define PUT_INSTALL_STATUS(c,s) c->Revision = s +#define GET_INSTALL_STATUS(c) c->Revision + +#endif /* !__ASSEMBLY__ */ + +#endif /* _STANDALONE */ + #if defined (HUB_ERR_STS_WAR) #define ERR_STS_WAR_REGISTER IIO_IIBUSERR diff --git a/include/asm-mips/sn/sn0/arch.h b/include/asm-mips/sn/sn0/arch.h index f734f2007..fb78773a5 100644 --- a/include/asm-mips/sn/sn0/arch.h +++ b/include/asm-mips/sn/sn0/arch.h @@ -11,6 +11,9 @@ #ifndef _ASM_SN_SN0_ARCH_H #define _ASM_SN_SN0_ARCH_H +#include + +#ifndef SABLE #ifndef SN0XXL /* 128 cpu SMP max */ /* @@ -51,16 +54,25 @@ */ #define MAX_PARTITIONS MAX_REGIONS + +#else + +#define MAX_COMPACT_NODES 4 +#define MAX_NASIDS 4 +#define MAXCPUS 8 + +#endif + #define NASID_MASK_BYTES ((MAX_NASIDS + 7) / 8) /* * Slot constants for SN0 */ -#ifdef CONFIG_SGI_SN_N_MODE +#ifdef CONFIG_SGI_SN0_N_MODE #define MAX_MEM_SLOTS 16 /* max slots per node */ -#else /* !CONFIG_SGI_SN_N_MODE, assume CONFIG_SGI_SN_M_MODE */ +#else /* !CONFIG_SGI_SN0_N_MODE, assume M_MODE */ #define MAX_MEM_SLOTS 32 /* max slots per node */ -#endif /* CONFIG_SGI_SN_M_MODE */ +#endif /* defined(N_MODE) */ #define SLOT_SHIFT (27) #define SLOT_MIN_MEM_SIZE (32*1024*1024) diff --git a/include/asm-mips/sn/sn0/hub.h b/include/asm-mips/sn/sn0/hub.h index 3e228f8e7..f5dbba6f4 100644 --- a/include/asm-mips/sn/sn0/hub.h +++ b/include/asm-mips/sn/sn0/hub.h @@ -31,6 +31,10 @@ #include //#include +#ifdef SABLE +#define IP27_NO_HUBUART_INT 1 +#endif + /* Translation of uncached attributes */ #define UATTR_HSPEC 0 #define UATTR_IO 1 diff --git a/include/asm-mips/sn/sn0/hubio.h b/include/asm-mips/sn/sn0/hubio.h index ef91b3363..f314da21b 100644 --- a/include/asm-mips/sn/sn0/hubio.h +++ b/include/asm-mips/sn/sn0/hubio.h @@ -486,6 +486,22 @@ typedef union h1_icrba_u { #define ICRBN_A_CERR_SHFT 54 #define ICRBN_A_ERR_MASK 0x3ff +#if 0 /* Disabled, this causes namespace polution and break allmodconfig */ +/* + * Easy access macros. + */ +#define a_error icrba_fields_s.error +#define a_ecode icrba_fields_s.ecode +#define a_lnetuce icrba_fields_s.lnetuce +#define a_mark icrba_fields_s.mark +#define a_xerr icrba_fields_s.xerr +#define a_sidn icrba_fields_s.sidn +#define a_tnum icrba_fields_s.tnum +#define a_addr icrba_fields_s.addr +#define a_valid icrba_fields_s.valid +#define a_iow icrba_fields_s.iow +#endif + #endif /* !__ASSEMBLY__ */ #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ diff --git a/include/asm-mips/sn/sn0/hubmd.h b/include/asm-mips/sn/sn0/hubmd.h index 14c225d80..a66def4e0 100644 --- a/include/asm-mips/sn/sn0/hubmd.h +++ b/include/asm-mips/sn/sn0/hubmd.h @@ -11,6 +11,7 @@ #ifndef _ASM_SN_SN0_HUBMD_H #define _ASM_SN_SN0_HUBMD_H +#include /* * Hub Memory/Directory interface registers @@ -91,7 +92,7 @@ #define MD_UREG1_14 0x2200f0 /* uController/UART 1 register */ #define MD_UREG1_15 0x2200f8 /* uController/UART 1 register */ -#ifdef CONFIG_SGI_SN_N_MODE +#ifdef CONFIG_SGI_SN0_N_MODE #define MD_MEM_BANKS 4 /* 4 banks of memory max in N mode */ #else #define MD_MEM_BANKS 8 /* 8 banks of memory max in M mode */ diff --git a/include/asm-mips/sn/sn0/hubpi.h b/include/asm-mips/sn/sn0/hubpi.h index e39f5f9da..355bba855 100644 --- a/include/asm-mips/sn/sn0/hubpi.h +++ b/include/asm-mips/sn/sn0/hubpi.h @@ -398,6 +398,24 @@ typedef u64 rtc_time_t; /* PI_RT_FILTER_CTRL mask and shift definitions */ +#if 0 +/* + * XXX - This register's definition has changed, but it's only implemented + * in Hub 2. + */ +#define PRFC_DROP_COUNT_SHFT 27 +#define PRFC_DROP_COUNT_MASK (UINT64_CAST 0x3ff << 27) +#define PRFC_DROP_CTR_SHFT 18 +#define PRFC_DROP_CTR_MASK (UINT64_CAST 0x1ff << 18) +#define PRFC_MASK_ENABLE_SHFT 10 +#define PRFC_MASK_ENABLE_MASK (UINT64_CAST 0x7f << 10) +#define PRFC_MASK_CTR_SHFT 2 +#define PRFC_MASK_CTR_MASK (UINT64_CAST 0xff << 2) +#define PRFC_OFFSET_SHFT 0 +#define PRFC_OFFSET_MASK (UINT64_CAST 3) +#endif /* 0 */ + + /* * Bits for NACK_CNT_A/B and NACK_CMP */ diff --git a/include/asm-mips/sn/sn0/ip27.h b/include/asm-mips/sn/sn0/ip27.h index 3c97e0855..ade0e974d 100644 --- a/include/asm-mips/sn/sn0/ip27.h +++ b/include/asm-mips/sn/sn0/ip27.h @@ -6,7 +6,7 @@ * Derived from IRIX . * * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. - * Copyright (C) 1999, 2006 by Ralf Baechle + * Copyright (C) 1999 by Ralf Baechle */ #ifndef _ASM_SN_SN0_IP27_H #define _ASM_SN_SN0_IP27_H @@ -82,4 +82,11 @@ #define SEND_NMI(_nasid, _slice) \ REMOTE_HUB_S((_nasid), (PI_NMI_A + ((_slice) * PI_NMI_OFFSET)), 1) +/* Sanity hazzard ... Below all the Origin hacks are following. */ + +#define SN00_BRIDGE 0x9200000008000000 +#define SN00I_BRIDGE0 0x920000000b000000 +#define SN00I_BRIDGE1 0x920000000e000000 +#define SN00I_BRIDGE2 0x920000000f000000 + #endif /* _ASM_SN_SN0_IP27_H */ diff --git a/include/asm-mips/sn/fru.h b/include/asm-mips/sn/sn0/sn0_fru.h similarity index 90% rename from include/asm-mips/sn/fru.h rename to include/asm-mips/sn/sn0/sn0_fru.h index b3e360672..82c6377c2 100644 --- a/include/asm-mips/sn/fru.h +++ b/include/asm-mips/sn/sn0/sn0_fru.h @@ -6,10 +6,10 @@ * Derived from IRIX * * Copyright (C) 1992 - 1997, 1999 Silcon Graphics, Inc. - * Copyright (C) 1999, 2006 Ralf Baechle (ralf@linux-mips) + * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) */ -#ifndef __ASM_SN_FRU_H -#define __ASM_SN_FRU_H +#ifndef _ASM_SN_SN0_SN0_FRU_H +#define _ASM_SN_SN0_SN0_FRU_H #define MAX_DIMMS 8 /* max # of dimm banks */ #define MAX_PCIDEV 8 /* max # of pci devices on a pci bus */ @@ -41,4 +41,4 @@ typedef struct kf_pci_bus_s { /* confidence level that the pci dev is bad */ } kf_pci_bus_t; -#endif /* __ASM_SN_FRU_H */ +#endif /* _ASM_SN_SN0_SN0_FRU_H */ diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index b9ba54d0d..b3bc698df 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h @@ -15,6 +15,9 @@ /* * ASIC PCI registers for little endian configuration. */ +#ifndef __MIPSEL__ +#error "Fix me for big endian" +#endif #define PCIMT_UCONF 0xbfff0000 #define PCIMT_IOADTIMEOUT2 0xbfff0008 #define PCIMT_IOMEMCONF 0xbfff0010 @@ -48,9 +51,9 @@ #define PCIMT_PCI_CONF 0xbfff0100 /* - * Data port for the PCI bus in IO space + * Data port for the PCI bus. */ -#define PCIMT_CONFIG_DATA 0x0cfc +#define PCIMT_CONFIG_DATA 0xb4000cfc /* * Board specific registers diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h index 36ebe4e18..0bb31e5aa 100644 --- a/include/asm-mips/socket.h +++ b/include/asm-mips/socket.h @@ -69,7 +69,6 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ #define SO_PEERSEC 30 #define SO_SNDBUFFORCE 31 #define SO_RCVBUFFORCE 33 -#define SO_PASSSEC 34 #ifdef __KERNEL__ diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 158a4cd12..c4856a874 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h @@ -10,6 +10,7 @@ #ifndef _ASM_STACKFRAME_H #define _ASM_STACKFRAME_H +#include #include #include @@ -304,7 +305,7 @@ mfc0 v0, CP0_TCSTATUS ori v0, TCSTATUS_IXMT mtc0 v0, CP0_TCSTATUS - _ehb + ehb DMT 5 # dmt a1 jal mips_ihb #endif /* CONFIG_MIPS_MT_SMTC */ @@ -325,14 +326,14 @@ * restore TCStatus.IXMT. */ LONG_L v1, PT_TCSTATUS(sp) - _ehb + ehb mfc0 v0, CP0_TCSTATUS andi v1, TCSTATUS_IXMT /* We know that TCStatua.IXMT should be set from above */ xori v0, v0, TCSTATUS_IXMT or v0, v0, v1 mtc0 v0, CP0_TCSTATUS - _ehb + ehb andi a1, a1, VPECONTROL_TE beqz a1, 1f emt @@ -411,7 +412,7 @@ /* Clear TKSU, leave IXMT */ xori t0, 0x00001800 mtc0 t0, CP0_TCSTATUS - _ehb + ehb /* We need to leave the global IE bit set, but clear EXL...*/ mfc0 t0, CP0_STATUS ori t0, ST0_EXL | ST0_ERL @@ -438,7 +439,7 @@ * and enable interrupts only for the * current TC, using the TCStatus register. */ - _ehb + ehb mfc0 t0,CP0_TCSTATUS /* Fortunately CU 0 is in the same place in both registers */ /* Set TCU0, TKSU (for later inversion) and IXMT */ @@ -447,7 +448,7 @@ /* Clear TKSU *and* IXMT */ xori t0, 0x00001c00 mtc0 t0, CP0_TCSTATUS - _ehb + ehb /* We need to leave the global IE bit set, but clear EXL...*/ mfc0 t0, CP0_STATUS ori t0, ST0_EXL @@ -479,7 +480,7 @@ andi v1, v0, TCSTATUS_IXMT ori v0, TCSTATUS_IXMT mtc0 v0, CP0_TCSTATUS - _ehb + ehb DMT 2 # dmt v0 /* * We don't know a priori if ra is "live" @@ -495,7 +496,7 @@ xori t0, 0x1e mtc0 t0, CP0_STATUS #ifdef CONFIG_MIPS_MT_SMTC - _ehb + ehb andi v0, v0, VPECONTROL_TE beqz v0, 2f nop /* delay slot */ diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index 436e3ad35..907da600f 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h @@ -10,6 +10,7 @@ #ifndef _ASM_STRING_H #define _ASM_STRING_H +#include /* * Most of the inline functions are rather naive implementations so I just diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index dcb4701d5..261f71d16 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -12,14 +12,15 @@ #ifndef _ASM_SYSTEM_H #define _ASM_SYSTEM_H +#include #include -#include #include #include #include #include #include +#include /* * read_barrier_depends - Flush all pending reads that subsequents reads @@ -143,6 +144,9 @@ #define set_mb(var, value) \ do { var = value; mb(); } while (0) +#define set_wmb(var, value) \ +do { var = value; wmb(); } while (0) + /* * switch_to(n) should switch tasks to task nr n, first * checking that n isn't the current task, in which case it does nothing. diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index ae8ada5b4..f8d97dafd 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h @@ -9,6 +9,7 @@ #ifdef __KERNEL__ +#include #ifndef __ASSEMBLY__ diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index 2d5437356..d897c8bb5 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h @@ -83,11 +83,11 @@ extern asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs); /* * board specific routines required by time_init(). * board_time_init is defaulted to NULL and can remain so. - * plat_timer_setup must be setup properly in machine setup routine. + * board_timer_setup must be setup properly in machine setup routine. */ struct irqaction; extern void (*board_time_init)(void); -extern void plat_timer_setup(struct irqaction *irq); +extern void (*board_timer_setup)(struct irqaction *irq); /* * mips_hpt_frequency - must be set if you intend to use an R4k-compatible diff --git a/include/asm-mips/tlbflush.h b/include/asm-mips/tlbflush.h index 276be77c3..bb4ae3cdc 100644 --- a/include/asm-mips/tlbflush.h +++ b/include/asm-mips/tlbflush.h @@ -1,6 +1,7 @@ #ifndef __ASM_TLBFLUSH_H #define __ASM_TLBFLUSH_H +#include #include /* diff --git a/include/asm-mips/tx4927/toshiba_rbtx4927.h b/include/asm-mips/tx4927/toshiba_rbtx4927.h index 94bef03d9..6ce1e9475 100644 --- a/include/asm-mips/tx4927/toshiba_rbtx4927.h +++ b/include/asm-mips/tx4927/toshiba_rbtx4927.h @@ -27,6 +27,7 @@ #ifndef __ASM_TX4927_TOSHIBA_RBTX4927_H #define __ASM_TX4927_TOSHIBA_RBTX4927_H +#include #include #include #ifdef CONFIG_PCI diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index 2b52e180c..cd2813d8e 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h @@ -52,6 +52,7 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ +#include typedef __signed char s8; typedef unsigned char u8; diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 1cdd4eeb2..b96f3e0f3 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h @@ -9,6 +9,7 @@ #ifndef _ASM_UACCESS_H #define _ASM_UACCESS_H +#include #include #include #include diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 610ccb8a5..1068fe9a0 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -326,19 +326,16 @@ #define __NR_unshare (__NR_Linux + 303) #define __NR_splice (__NR_Linux + 304) #define __NR_sync_file_range (__NR_Linux + 305) -#define __NR_tee (__NR_Linux + 306) -#define __NR_vmsplice (__NR_Linux + 307) -#define __NR_move_pages (__NR_Linux + 308) /* * Offset of the last Linux o32 flavoured syscall */ -#define __NR_Linux_syscalls 308 +#define __NR_Linux_syscalls 305 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ #define __NR_O32_Linux 4000 -#define __NR_O32_Linux_syscalls 308 +#define __NR_O32_Linux_syscalls 305 #if _MIPS_SIM == _MIPS_SIM_ABI64 @@ -611,19 +608,16 @@ #define __NR_unshare (__NR_Linux + 262) #define __NR_splice (__NR_Linux + 263) #define __NR_sync_file_range (__NR_Linux + 264) -#define __NR_tee (__NR_Linux + 265) -#define __NR_vmsplice (__NR_Linux + 266) -#define __NR_move_pages (__NR_Linux + 267) /* * Offset of the last Linux 64-bit flavoured syscall */ -#define __NR_Linux_syscalls 267 +#define __NR_Linux_syscalls 264 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ #define __NR_64_Linux 5000 -#define __NR_64_Linux_syscalls 267 +#define __NR_64_Linux_syscalls 264 #if _MIPS_SIM == _MIPS_SIM_NABI32 @@ -900,21 +894,16 @@ #define __NR_unshare (__NR_Linux + 266) #define __NR_splice (__NR_Linux + 267) #define __NR_sync_file_range (__NR_Linux + 268) -#define __NR_tee (__NR_Linux + 269) -#define __NR_vmsplice (__NR_Linux + 270) -#define __NR_move_pages (__NR_Linux + 271) /* * Offset of the last N32 flavoured syscall */ -#define __NR_Linux_syscalls 271 +#define __NR_Linux_syscalls 268 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ #define __NR_N32_Linux 6000 -#define __NR_N32_Linux_syscalls 271 - -#ifdef __KERNEL__ +#define __NR_N32_Linux_syscalls 268 #ifndef __ASSEMBLY__ @@ -1179,6 +1168,9 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ #endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ +#ifdef __KERNEL__ + +#include #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR @@ -1205,6 +1197,7 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ # ifdef CONFIG_MIPS32_O32 # define __ARCH_WANT_COMPAT_SYS_TIME # endif +#endif #ifdef __KERNEL_SYSCALLS__ @@ -1255,5 +1248,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n" #x "\t=\tsys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_UNISTD_H */ diff --git a/include/asm-mips/vga.h b/include/asm-mips/vga.h index c1dd0b10b..34755c0a6 100644 --- a/include/asm-mips/vga.h +++ b/include/asm-mips/vga.h @@ -13,7 +13,7 @@ * access the videoram directly without any black magic. */ -#define VGA_MAP_MEM(x,s) (0xb0000000L + (unsigned long)(x)) +#define VGA_MAP_MEM(x) (0xb0000000L + (unsigned long)(x)) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/asm-mips/vr41xx/capcella.h b/include/asm-mips/vr41xx/capcella.h index e0ee05a3d..d10ffda50 100644 --- a/include/asm-mips/vr41xx/capcella.h +++ b/include/asm-mips/vr41xx/capcella.h @@ -20,7 +20,7 @@ #ifndef __ZAO_CAPCELLA_H #define __ZAO_CAPCELLA_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/cmbvr4133.h b/include/asm-mips/vr41xx/cmbvr4133.h index 9490ade58..42af38901 100644 --- a/include/asm-mips/vr41xx/cmbvr4133.h +++ b/include/asm-mips/vr41xx/cmbvr4133.h @@ -15,7 +15,8 @@ #ifndef __NEC_CMBVR4133_H #define __NEC_CMBVR4133_H -#include +#include +#include /* * General-Purpose I/O Pin Number @@ -54,4 +55,7 @@ #define IDE_SECONDARY_IRQ I8259_IRQ(15) #define I8259_IRQ_LAST IDE_SECONDARY_IRQ +#define RTC_PORT(x) (0xaf000100 + (x)) +#define RTC_IO_EXTENT 0x140 + #endif /* __NEC_CMBVR4133_H */ diff --git a/include/asm-mips/vr41xx/e55.h b/include/asm-mips/vr41xx/e55.h new file mode 100644 index 000000000..558f2269b --- /dev/null +++ b/include/asm-mips/vr41xx/e55.h @@ -0,0 +1,43 @@ +/* + * e55.h, Include file for CASIO CASSIOPEIA E-10/15/55/65. + * + * Copyright (C) 2002-2004 Yoichi Yuasa + * + * 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 __CASIO_E55_H +#define __CASIO_E55_H + +#include +#include + +/* + * Board specific address mapping + */ +#define VR41XX_ISA_MEM_BASE 0x10000000 +#define VR41XX_ISA_MEM_SIZE 0x04000000 + +/* VR41XX_ISA_IO_BASE includes offset from real base. */ +#define VR41XX_ISA_IO_BASE 0x1400c000 +#define VR41XX_ISA_IO_SIZE 0x03ff4000 + +#define ISA_BUS_IO_BASE 0 +#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE + +#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE) +#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE +#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1) + +#endif /* __CASIO_E55_H */ diff --git a/include/asm-mips/vr41xx/irq.h b/include/asm-mips/vr41xx/irq.h deleted file mode 100644 index d315dfbc0..000000000 --- a/include/asm-mips/vr41xx/irq.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * include/asm-mips/vr41xx/irq.h - * - * Interrupt numbers for NEC VR4100 series. - * - * Copyright (C) 1999 Michael Klar - * Copyright (C) 2001, 2002 Paul Mundt - * Copyright (C) 2002 MontaVista Software, Inc. - * Copyright (C) 2002 TimeSys Corp. - * Copyright (C) 2003-2006 Yoichi Yuasa - * - * 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 __NEC_VR41XX_IRQ_H -#define __NEC_VR41XX_IRQ_H - -/* - * CPU core Interrupt Numbers - */ -#define MIPS_CPU_IRQ_BASE 0 -#define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) -#define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) -#define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) -#define INT0_IRQ MIPS_CPU_IRQ(2) -#define INT1_IRQ MIPS_CPU_IRQ(3) -#define INT2_IRQ MIPS_CPU_IRQ(4) -#define INT3_IRQ MIPS_CPU_IRQ(5) -#define INT4_IRQ MIPS_CPU_IRQ(6) -#define TIMER_IRQ MIPS_CPU_IRQ(7) - -/* - * SYINT1 Interrupt Numbers - */ -#define SYSINT1_IRQ_BASE 8 -#define SYSINT1_IRQ(x) (SYSINT1_IRQ_BASE + (x)) -#define BATTRY_IRQ SYSINT1_IRQ(0) -#define POWER_IRQ SYSINT1_IRQ(1) -#define RTCLONG1_IRQ SYSINT1_IRQ(2) -#define ELAPSEDTIME_IRQ SYSINT1_IRQ(3) -/* RFU */ -#define PIU_IRQ SYSINT1_IRQ(5) -#define AIU_IRQ SYSINT1_IRQ(6) -#define KIU_IRQ SYSINT1_IRQ(7) -#define GIUINT_IRQ SYSINT1_IRQ(8) -#define SIU_IRQ SYSINT1_IRQ(9) -#define BUSERR_IRQ SYSINT1_IRQ(10) -#define SOFTINT_IRQ SYSINT1_IRQ(11) -#define CLKRUN_IRQ SYSINT1_IRQ(12) -#define DOZEPIU_IRQ SYSINT1_IRQ(13) -#define SYSINT1_IRQ_LAST DOZEPIU_IRQ - -/* - * SYSINT2 Interrupt Numbers - */ -#define SYSINT2_IRQ_BASE 24 -#define SYSINT2_IRQ(x) (SYSINT2_IRQ_BASE + (x)) -#define RTCLONG2_IRQ SYSINT2_IRQ(0) -#define LED_IRQ SYSINT2_IRQ(1) -#define HSP_IRQ SYSINT2_IRQ(2) -#define TCLOCK_IRQ SYSINT2_IRQ(3) -#define FIR_IRQ SYSINT2_IRQ(4) -#define CEU_IRQ SYSINT2_IRQ(4) /* same number as FIR_IRQ */ -#define DSIU_IRQ SYSINT2_IRQ(5) -#define PCI_IRQ SYSINT2_IRQ(6) -#define SCU_IRQ SYSINT2_IRQ(7) -#define CSI_IRQ SYSINT2_IRQ(8) -#define BCU_IRQ SYSINT2_IRQ(9) -#define ETHERNET_IRQ SYSINT2_IRQ(10) -#define SYSINT2_IRQ_LAST ETHERNET_IRQ - -/* - * GIU Interrupt Numbers - */ -#define GIU_IRQ_BASE 40 -#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */ -#define GIU_IRQ_LAST GIU_IRQ(31) - -/* - * VRC4173 Interrupt Numbers - */ -#define VRC4173_IRQ_BASE 72 -#define VRC4173_IRQ(x) (VRC4173_IRQ_BASE + (x)) -#define VRC4173_USB_IRQ VRC4173_IRQ(0) -#define VRC4173_PCMCIA2_IRQ VRC4173_IRQ(1) -#define VRC4173_PCMCIA1_IRQ VRC4173_IRQ(2) -#define VRC4173_PS2CH2_IRQ VRC4173_IRQ(3) -#define VRC4173_PS2CH1_IRQ VRC4173_IRQ(4) -#define VRC4173_PIU_IRQ VRC4173_IRQ(5) -#define VRC4173_AIU_IRQ VRC4173_IRQ(6) -#define VRC4173_KIU_IRQ VRC4173_IRQ(7) -#define VRC4173_GIU_IRQ VRC4173_IRQ(8) -#define VRC4173_AC97_IRQ VRC4173_IRQ(9) -#define VRC4173_AC97INT1_IRQ VRC4173_IRQ(10) -/* RFU */ -#define VRC4173_DOZEPIU_IRQ VRC4173_IRQ(13) -#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ - -#endif /* __NEC_VR41XX_IRQ_H */ diff --git a/include/asm-mips/vr41xx/mpc30x.h b/include/asm-mips/vr41xx/mpc30x.h index 1d67df843..a6cbe4da6 100644 --- a/include/asm-mips/vr41xx/mpc30x.h +++ b/include/asm-mips/vr41xx/mpc30x.h @@ -20,7 +20,7 @@ #ifndef __VICTOR_MPC30X_H #define __VICTOR_MPC30X_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0219.h b/include/asm-mips/vr41xx/tb0219.h index dc981b4be..b318b9612 100644 --- a/include/asm-mips/vr41xx/tb0219.h +++ b/include/asm-mips/vr41xx/tb0219.h @@ -23,7 +23,7 @@ #ifndef __TANBAC_TB0219_H #define __TANBAC_TB0219_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0226.h b/include/asm-mips/vr41xx/tb0226.h index de527dcfa..2513f450e 100644 --- a/include/asm-mips/vr41xx/tb0226.h +++ b/include/asm-mips/vr41xx/tb0226.h @@ -20,7 +20,7 @@ #ifndef __TANBAC_TB0226_H #define __TANBAC_TB0226_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0287.h b/include/asm-mips/vr41xx/tb0287.h index 61bead68a..dd9832313 100644 --- a/include/asm-mips/vr41xx/tb0287.h +++ b/include/asm-mips/vr41xx/tb0287.h @@ -22,7 +22,7 @@ #ifndef __TANBAC_TB0287_H #define __TANBAC_TB0287_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h index dd3eb3dc5..70828d5fa 100644 --- a/include/asm-mips/vr41xx/vr41xx.h +++ b/include/asm-mips/vr41xx/vr41xx.h @@ -74,6 +74,59 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); /* * Interrupt Control Unit */ +/* CPU core Interrupt Numbers */ +#define MIPS_CPU_IRQ_BASE 0 +#define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) +#define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) +#define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) +#define INT0_IRQ MIPS_CPU_IRQ(2) +#define INT1_IRQ MIPS_CPU_IRQ(3) +#define INT2_IRQ MIPS_CPU_IRQ(4) +#define INT3_IRQ MIPS_CPU_IRQ(5) +#define INT4_IRQ MIPS_CPU_IRQ(6) +#define TIMER_IRQ MIPS_CPU_IRQ(7) + +/* SYINT1 Interrupt Numbers */ +#define SYSINT1_IRQ_BASE 8 +#define SYSINT1_IRQ(x) (SYSINT1_IRQ_BASE + (x)) +#define BATTRY_IRQ SYSINT1_IRQ(0) +#define POWER_IRQ SYSINT1_IRQ(1) +#define RTCLONG1_IRQ SYSINT1_IRQ(2) +#define ELAPSEDTIME_IRQ SYSINT1_IRQ(3) +/* RFU */ +#define PIU_IRQ SYSINT1_IRQ(5) +#define AIU_IRQ SYSINT1_IRQ(6) +#define KIU_IRQ SYSINT1_IRQ(7) +#define GIUINT_IRQ SYSINT1_IRQ(8) +#define SIU_IRQ SYSINT1_IRQ(9) +#define BUSERR_IRQ SYSINT1_IRQ(10) +#define SOFTINT_IRQ SYSINT1_IRQ(11) +#define CLKRUN_IRQ SYSINT1_IRQ(12) +#define DOZEPIU_IRQ SYSINT1_IRQ(13) +#define SYSINT1_IRQ_LAST DOZEPIU_IRQ + +/* SYSINT2 Interrupt Numbers */ +#define SYSINT2_IRQ_BASE 24 +#define SYSINT2_IRQ(x) (SYSINT2_IRQ_BASE + (x)) +#define RTCLONG2_IRQ SYSINT2_IRQ(0) +#define LED_IRQ SYSINT2_IRQ(1) +#define HSP_IRQ SYSINT2_IRQ(2) +#define TCLOCK_IRQ SYSINT2_IRQ(3) +#define FIR_IRQ SYSINT2_IRQ(4) +#define CEU_IRQ SYSINT2_IRQ(4) /* same number as FIR_IRQ */ +#define DSIU_IRQ SYSINT2_IRQ(5) +#define PCI_IRQ SYSINT2_IRQ(6) +#define SCU_IRQ SYSINT2_IRQ(7) +#define CSI_IRQ SYSINT2_IRQ(8) +#define BCU_IRQ SYSINT2_IRQ(9) +#define ETHERNET_IRQ SYSINT2_IRQ(10) +#define SYSINT2_IRQ_LAST ETHERNET_IRQ + +/* GIU Interrupt Numbers */ +#define GIU_IRQ_BASE 40 +#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */ +#define GIU_IRQ_LAST GIU_IRQ(31) + extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); extern int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)); diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h new file mode 100644 index 000000000..4d41a9c09 --- /dev/null +++ b/include/asm-mips/vr41xx/vrc4173.h @@ -0,0 +1,222 @@ +/* + * vrc4173.h, Include file for NEC VRC4173. + * + * Copyright (C) 2000 Michael R. McDonald + * Copyright (C) 2001-2003 Montavista Software Inc. + * Author: Yoichi Yuasa + * Copyright (C) 2004 Yoichi Yuasa + * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __NEC_VRC4173_H +#define __NEC_VRC4173_H + +#include +#include + +/* + * Interrupt Number + */ +#define VRC4173_IRQ_BASE 72 +#define VRC4173_IRQ(x) (VRC4173_IRQ_BASE + (x)) +#define VRC4173_USB_IRQ VRC4173_IRQ(0) +#define VRC4173_PCMCIA2_IRQ VRC4173_IRQ(1) +#define VRC4173_PCMCIA1_IRQ VRC4173_IRQ(2) +#define VRC4173_PS2CH2_IRQ VRC4173_IRQ(3) +#define VRC4173_PS2CH1_IRQ VRC4173_IRQ(4) +#define VRC4173_PIU_IRQ VRC4173_IRQ(5) +#define VRC4173_AIU_IRQ VRC4173_IRQ(6) +#define VRC4173_KIU_IRQ VRC4173_IRQ(7) +#define VRC4173_GIU_IRQ VRC4173_IRQ(8) +#define VRC4173_AC97_IRQ VRC4173_IRQ(9) +#define VRC4173_AC97INT1_IRQ VRC4173_IRQ(10) +/* RFU */ +#define VRC4173_DOZEPIU_IRQ VRC4173_IRQ(13) +#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ + +/* + * PCI I/O accesses + */ +#ifdef CONFIG_VRC4173 + +extern unsigned long vrc4173_io_offset; + +#define set_vrc4173_io_offset(offset) do { vrc4173_io_offset = (offset); } while (0) + +#define vrc4173_outb(val,port) outb((val), vrc4173_io_offset+(port)) +#define vrc4173_outw(val,port) outw((val), vrc4173_io_offset+(port)) +#define vrc4173_outl(val,port) outl((val), vrc4173_io_offset+(port)) +#define vrc4173_outb_p(val,port) outb_p((val), vrc4173_io_offset+(port)) +#define vrc4173_outw_p(val,port) outw_p((val), vrc4173_io_offset+(port)) +#define vrc4173_outl_p(val,port) outl_p((val), vrc4173_io_offset+(port)) + +#define vrc4173_inb(port) inb(vrc4173_io_offset+(port)) +#define vrc4173_inw(port) inw(vrc4173_io_offset+(port)) +#define vrc4173_inl(port) inl(vrc4173_io_offset+(port)) +#define vrc4173_inb_p(port) inb_p(vrc4173_io_offset+(port)) +#define vrc4173_inw_p(port) inw_p(vrc4173_io_offset+(port)) +#define vrc4173_inl_p(port) inl_p(vrc4173_io_offset+(port)) + +#define vrc4173_outsb(port,addr,count) outsb(vrc4173_io_offset+(port),(addr),(count)) +#define vrc4173_outsw(port,addr,count) outsw(vrc4173_io_offset+(port),(addr),(count)) +#define vrc4173_outsl(port,addr,count) outsl(vrc4173_io_offset+(port),(addr),(count)) + +#define vrc4173_insb(port,addr,count) insb(vrc4173_io_offset+(port),(addr),(count)) +#define vrc4173_insw(port,addr,count) insw(vrc4173_io_offset+(port),(addr),(count)) +#define vrc4173_insl(port,addr,count) insl(vrc4173_io_offset+(port),(addr),(count)) + +#else + +#define set_vrc4173_io_offset(offset) do {} while (0) + +#define vrc4173_outb(val,port) do {} while (0) +#define vrc4173_outw(val,port) do {} while (0) +#define vrc4173_outl(val,port) do {} while (0) +#define vrc4173_outb_p(val,port) do {} while (0) +#define vrc4173_outw_p(val,port) do {} while (0) +#define vrc4173_outl_p(val,port) do {} while (0) + +#define vrc4173_inb(port) 0 +#define vrc4173_inw(port) 0 +#define vrc4173_inl(port) 0 +#define vrc4173_inb_p(port) 0 +#define vrc4173_inw_p(port) 0 +#define vrc4173_inl_p(port) 0 + +#define vrc4173_outsb(port,addr,count) do {} while (0) +#define vrc4173_outsw(port,addr,count) do {} while (0) +#define vrc4173_outsl(port,addr,count) do {} while (0) + +#define vrc4173_insb(port,addr,count) do {} while (0) +#define vrc4173_insw(port,addr,count) do {} while (0) +#define vrc4173_insl(port,addr,count) do {} while (0) + +#endif + +/* + * Clock Mask Unit + */ +typedef enum vrc4173_clock { + VRC4173_PIU_CLOCK, + VRC4173_KIU_CLOCK, + VRC4173_AIU_CLOCK, + VRC4173_PS2_CH1_CLOCK, + VRC4173_PS2_CH2_CLOCK, + VRC4173_USBU_PCI_CLOCK, + VRC4173_CARDU1_PCI_CLOCK, + VRC4173_CARDU2_PCI_CLOCK, + VRC4173_AC97U_PCI_CLOCK, + VRC4173_USBU_48MHz_CLOCK, + VRC4173_EXT_48MHz_CLOCK, + VRC4173_48MHz_CLOCK, +} vrc4173_clock_t; + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_supply_clock(vrc4173_clock_t clock); +extern void vrc4173_mask_clock(vrc4173_clock_t clock); + +#else + +static inline void vrc4173_supply_clock(vrc4173_clock_t clock) {} +static inline void vrc4173_mask_clock(vrc4173_clock_t clock) {} + +#endif + +/* + * Interupt Control Unit + */ + +#define VRC4173_PIUINT_COMMAND 0x0040 +#define VRC4173_PIUINT_DATA 0x0020 +#define VRC4173_PIUINT_PAGE1 0x0010 +#define VRC4173_PIUINT_PAGE0 0x0008 +#define VRC4173_PIUINT_DATALOST 0x0004 +#define VRC4173_PIUINT_STATUSCHANGE 0x0001 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_piuint(uint16_t mask); +extern void vrc4173_disable_piuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_piuint(uint16_t mask) {} +static inline void vrc4173_disable_piuint(uint16_t mask) {} + +#endif + +#define VRC4173_AIUINT_INPUT_DMAEND 0x0800 +#define VRC4173_AIUINT_INPUT_DMAHALT 0x0400 +#define VRC4173_AIUINT_INPUT_DATALOST 0x0200 +#define VRC4173_AIUINT_INPUT_DATA 0x0100 +#define VRC4173_AIUINT_OUTPUT_DMAEND 0x0008 +#define VRC4173_AIUINT_OUTPUT_DMAHALT 0x0004 +#define VRC4173_AIUINT_OUTPUT_NODATA 0x0002 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_aiuint(uint16_t mask); +extern void vrc4173_disable_aiuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_aiuint(uint16_t mask) {} +static inline void vrc4173_disable_aiuint(uint16_t mask) {} + +#endif + +#define VRC4173_KIUINT_DATALOST 0x0004 +#define VRC4173_KIUINT_DATAREADY 0x0002 +#define VRC4173_KIUINT_SCAN 0x0001 + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_enable_kiuint(uint16_t mask); +extern void vrc4173_disable_kiuint(uint16_t mask); + +#else + +static inline void vrc4173_enable_kiuint(uint16_t mask) {} +static inline void vrc4173_disable_kiuint(uint16_t mask) {} + +#endif + +/* + * General-Purpose I/O Unit + */ +typedef enum vrc4173_function { + PS2_CHANNEL1, + PS2_CHANNEL2, + TOUCHPANEL, + KEYBOARD_8SCANLINES, + KEYBOARD_10SCANLINES, + KEYBOARD_12SCANLINES, + GPIO_0_15PINS, + GPIO_16_20PINS, +} vrc4173_function_t; + +#ifdef CONFIG_VRC4173 + +extern void vrc4173_select_function(vrc4173_function_t function); + +#else + +static inline void vrc4173_select_function(vrc4173_function_t function) {} + +#endif + +#endif /* __NEC_VRC4173_H */ diff --git a/include/asm-mips/vr41xx/workpad.h b/include/asm-mips/vr41xx/workpad.h new file mode 100644 index 000000000..6bfa9c009 --- /dev/null +++ b/include/asm-mips/vr41xx/workpad.h @@ -0,0 +1,43 @@ +/* + * workpad.h, Include file for IBM WorkPad z50. + * + * Copyright (C) 2002-2004 Yoichi Yuasa + * + * 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 __IBM_WORKPAD_H +#define __IBM_WORKPAD_H + +#include +#include + +/* + * Board specific address mapping + */ +#define VR41XX_ISA_MEM_BASE 0x10000000 +#define VR41XX_ISA_MEM_SIZE 0x04000000 + +/* VR41XX_ISA_IO_BASE includes offset from real base. */ +#define VR41XX_ISA_IO_BASE 0x15000000 +#define VR41XX_ISA_IO_SIZE 0x03000000 + +#define ISA_BUS_IO_BASE 0 +#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE + +#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE) +#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE +#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1) + +#endif /* __IBM_WORKPAD_H */ diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index 3ac146c01..ad374bd3f 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h @@ -8,6 +8,7 @@ #ifndef _ASM_WAR_H #define _ASM_WAR_H +#include /* * Another R4600 erratum. Due to the lack of errata information the exact @@ -171,8 +172,7 @@ * On the RM9000 there is a problem which makes the CreateDirtyExclusive * cache operation unusable on SMP systems. */ -#if defined(CONFIG_MOMENCO_JAGUAR_ATX) || defined(CONFIG_PMC_YOSEMITE) || \ - defined(CONFIG_BASLER_EXCITE) +#if defined(CONFIG_MOMENCO_JAGUAR_ATX) || defined(CONFIG_PMC_YOSEMITE) #define RM9000_CDEX_SMP_WAR 1 #endif @@ -182,7 +182,7 @@ * being fetched may case spurious exceptions. */ #if defined(CONFIG_MOMENCO_JAGUAR_ATX) || defined(CONFIG_MOMENCO_OCELOT_3) || \ - defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_BASLER_EXCITE) + defined(CONFIG_PMC_YOSEMITE) #define ICACHE_REFILLS_WORKAROUND_WAR 1 #endif diff --git a/include/asm-mips/wbflush.h b/include/asm-mips/wbflush.h index eadc0ac47..c3bef50f3 100644 --- a/include/asm-mips/wbflush.h +++ b/include/asm-mips/wbflush.h @@ -11,6 +11,7 @@ #ifndef _ASM_WBFLUSH_H #define _ASM_WBFLUSH_H +#include #ifdef CONFIG_CPU_HAS_WB diff --git a/include/asm-parisc/Kbuild b/include/asm-parisc/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-parisc/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 1a7bfe699..3ce3440d1 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h @@ -48,7 +48,6 @@ #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) #ifdef CONFIG_PA20 -#define LDCW ldcw,co #define BL b,l # ifdef CONFIG_64BIT # define LEVEL 2.0w @@ -56,7 +55,6 @@ # define LEVEL 2.0 # endif #else -#define LDCW ldcw #define BL bl #define LEVEL 1.1 #endif diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 48bf9b8ab..403ea9731 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h @@ -5,6 +5,7 @@ #ifndef _ASM_PARISC_ATOMIC_H_ #define _ASM_PARISC_ATOMIC_H_ +#include #include #include diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index 7d22fa206..c83166547 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h @@ -5,6 +5,7 @@ #ifndef __ARCH_PARISC_CACHE_H #define __ARCH_PARISC_CACHE_H +#include /* * PA 2.0 processors have 64-byte cachelines; PA 1.1 processors have diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index 0b459cdfb..76b6b7d60 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h @@ -1,6 +1,7 @@ #ifndef _PARISC_CACHEFLUSH_H #define _PARISC_CACHEFLUSH_H +#include #include #include /* for flush_user_dcache_range_asm() proto */ diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 71b4eeea2..289624d8b 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h @@ -5,7 +5,6 @@ */ #include #include -#include #define COMPAT_USER_HZ 100 @@ -150,14 +149,4 @@ static __inline__ void __user *compat_alloc_user_space(long len) return (void __user *)regs->gr[30]; } -static inline int __is_compat_task(struct task_struct *t) -{ - return personality(t->personality) == PER_LINUX32; -} - -static inline int is_compat_task(void) -{ - return __is_compat_task(current); -} - #endif /* _ASM_PARISC_COMPAT_H */ diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h index 1e387e1da..74d4ac6f2 100644 --- a/include/asm-parisc/dma-mapping.h +++ b/include/asm-parisc/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _PARISC_DMA_MAPPING_H #define _PARISC_DMA_MAPPING_H +#include #include #include #include diff --git a/include/asm-parisc/dma.h b/include/asm-parisc/dma.h index 9979c3cb3..31fd10df4 100644 --- a/include/asm-parisc/dma.h +++ b/include/asm-parisc/dma.h @@ -9,6 +9,7 @@ #ifndef _ASM_DMA_H #define _ASM_DMA_H +#include #include /* need byte IO */ #include diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h index da2f9c157..ca3aed768 100644 --- a/include/asm-parisc/floppy.h +++ b/include/asm-parisc/floppy.h @@ -156,11 +156,13 @@ static int vdma_get_dma_residue(unsigned int dummy) static int fd_request_irq(void) { if(can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); else return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); + } static unsigned long dma_mem_alloc(unsigned long size) diff --git a/include/asm-parisc/hw_irq.h b/include/asm-parisc/hw_irq.h index 6707f7df3..151426e27 100644 --- a/include/asm-parisc/hw_irq.h +++ b/include/asm-parisc/hw_irq.h @@ -3,6 +3,15 @@ /* * linux/include/asm/hw_irq.h + * + * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar + * + * moved some of the old arch/i386/kernel/irq.h to here. VY + * + * IRQ/IPI changes taken from work by Thomas Radke + * */ +extern void hw_resend_irq(struct hw_interrupt_type *, unsigned int); + #endif diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index b9eb245b8..244f6b888 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h @@ -1,6 +1,7 @@ #ifndef _ASM_IO_H #define _ASM_IO_H +#include #include #include diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h index 5cae26061..b0a30e2c9 100644 --- a/include/asm-parisc/irq.h +++ b/include/asm-parisc/irq.h @@ -7,6 +7,7 @@ #ifndef _ASM_PARISC_IRQ_H #define _ASM_PARISC_IRQ_H +#include #include #include @@ -26,6 +27,11 @@ #define NR_IRQS (CPU_IRQ_MAX + 1) +/* + * IRQ line status macro IRQ_PER_CPU is used + */ +#define ARCH_HAS_IRQ_PER_CPU + static __inline__ int irq_canonicalize(int irq) { return (irq == 2) ? 9 : irq; diff --git a/include/asm-parisc/kmap_types.h b/include/asm-parisc/kmap_types.h index 806aae3c5..6886a0c3f 100644 --- a/include/asm-parisc/kmap_types.h +++ b/include/asm-parisc/kmap_types.h @@ -1,6 +1,7 @@ #ifndef _ASM_KMAP_TYPES_H #define _ASM_KMAP_TYPES_H +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-parisc/mmzone.h b/include/asm-parisc/mmzone.h index c87813662..ceb9b7319 100644 --- a/include/asm-parisc/mmzone.h +++ b/include/asm-parisc/mmzone.h @@ -14,6 +14,11 @@ extern struct node_map_data node_data[]; #define NODE_DATA(nid) (&node_data[nid].pg_data) +/* + * Given a kernel address, find the home node of the underlying memory. + */ +#define kvaddr_to_nid(kaddr) pfn_to_nid(__pa(kaddr) >> PAGE_SHIFT) + #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) #define node_end_pfn(nid) \ ({ \ diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index fcae97e6a..a3f24a6e9 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h @@ -1,14 +1,23 @@ #ifndef _PARISC_PAGE_H #define _PARISC_PAGE_H +#if !defined(__KERNEL__) +/* this is for userspace applications (4k page size) */ +# define PAGE_SHIFT 12 /* 4k */ +# define PAGE_SIZE (1UL << PAGE_SHIFT) +# define PAGE_MASK (~(PAGE_SIZE-1)) +#endif + + #ifdef __KERNEL__ +#include #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) -# define PAGE_SHIFT 12 +# define PAGE_SHIFT 12 /* 4k */ #elif defined(CONFIG_PARISC_PAGE_SIZE_16KB) -# define PAGE_SHIFT 14 +# define PAGE_SHIFT 14 /* 16k */ #elif defined(CONFIG_PARISC_PAGE_SIZE_64KB) -# define PAGE_SHIFT 16 +# define PAGE_SHIFT 16 /* 64k */ #else # error "unknown default kernel page size" #endif @@ -180,11 +189,11 @@ extern int npmem_ranges; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include +#include + #endif /* _PARISC_PAGE_H */ diff --git a/include/asm-parisc/param.h b/include/asm-parisc/param.h index 07cb9b93c..f4694d452 100644 --- a/include/asm-parisc/param.h +++ b/include/asm-parisc/param.h @@ -2,6 +2,7 @@ #define _ASMPARISC_PARAM_H #ifdef __KERNEL__ +#include # ifdef CONFIG_PA20 # define HZ 1000 /* Faster machines */ # else diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index 8b631f47e..77bbafb7f 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h @@ -1,6 +1,7 @@ #ifndef __ASM_PARISC_PCI_H #define __ASM_PARISC_PCI_H +#include #include diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index c9b2e3532..0a3face6c 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h @@ -1,6 +1,7 @@ #ifndef _PARISC_PDC_H #define _PARISC_PDC_H +#include /* * PDC return values ... @@ -278,11 +279,12 @@ typedef struct { /* constants for OS (NVM...) */ #define OS_ID_NONE 0 /* Undefined OS ID */ #define OS_ID_HPUX 1 /* HP-UX OS */ +#define OS_ID_LINUX OS_ID_HPUX /* just use the same value as hpux */ #define OS_ID_MPEXL 2 /* MPE XL OS */ #define OS_ID_OSF 3 /* OSF OS */ #define OS_ID_HPRT 4 /* HP-RT OS */ #define OS_ID_NOVEL 5 /* NOVELL OS */ -#define OS_ID_LINUX 6 /* Linux */ +#define OS_ID_NT 6 /* NT OS */ /* constants for PDC_CHASSIS */ @@ -351,8 +353,8 @@ struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */ cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */ cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */ - cc_pad1 : 10, /* reserved */ - cc_hv : 3; /* hversion dependent */ + cc_pad1 : 5, /* reserved */ + cc_assoc: 8; /* associativity of I/D-cache */ }; struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ @@ -718,7 +720,6 @@ void setup_pdc(void); /* in inventory.c */ int pdc_add_valid(unsigned long address); int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len); int pdc_chassis_disp(unsigned long disp); -int pdc_chassis_warn(unsigned long *warn); int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info); int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index, void *iodc_data, unsigned int iodc_data_size); @@ -732,7 +733,6 @@ int pdc_model_cpuid(unsigned long *cpu_id); int pdc_model_versions(unsigned long *versions, int id); int pdc_model_capabilities(unsigned long *capabilities); int pdc_cache_info(struct pdc_cache_info *cache); -int pdc_spaceid_bits(unsigned long *space_bits); #ifndef CONFIG_PA20 int pdc_btlb_info(struct pdc_btlb_info *btlb); int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path); @@ -776,18 +776,6 @@ int pdc_sti_call(unsigned long func, unsigned long flags, extern void pdc_init(void); -static inline char * os_id_to_string(u16 os_id) { - switch(os_id) { - case OS_ID_NONE: return "No OS"; - case OS_ID_HPUX: return "HP-UX"; - case OS_ID_MPEXL: return "MPE-iX"; - case OS_ID_OSF: return "OSF"; - case OS_ID_HPRT: return "HP-RT"; - case OS_ID_NOVEL: return "Novell Netware"; - case OS_ID_LINUX: return "Linux"; - default: return "Unknown"; - } -} #endif /* __ASSEMBLY__ */ #endif /* _PARISC_PDC_H */ diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 5066c54da..aec089eb8 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -3,6 +3,7 @@ #include +#include #include #ifndef __ASSEMBLY__ @@ -506,13 +507,13 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, /* TLB page size encoding - see table 3-1 in parisc20.pdf */ #define _PAGE_SIZE_ENCODING_4K 0 -#define _PAGE_SIZE_ENCODING_16K 1 -#define _PAGE_SIZE_ENCODING_64K 2 +#define _PAGE_SIZE_ENCODING_16K 1 +#define _PAGE_SIZE_ENCODING_64K 2 #define _PAGE_SIZE_ENCODING_256K 3 #define _PAGE_SIZE_ENCODING_1M 4 #define _PAGE_SIZE_ENCODING_4M 5 -#define _PAGE_SIZE_ENCODING_16M 6 -#define _PAGE_SIZE_ENCODING_64M 7 +#define _PAGE_SIZE_ENCODING_16M 6 +#define _PAGE_SIZE_ENCODING_64M 7 #if defined(CONFIG_PARISC_PAGE_SIZE_4KB) # define _PAGE_SIZE_ENCODING_DEFAULT _PAGE_SIZE_ENCODING_4K diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index b73626f04..89f2f1c16 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h @@ -9,6 +9,7 @@ #define __ASM_PARISC_PROCESSOR_H #ifndef __ASSEMBLY__ +#include #include #include @@ -26,12 +27,14 @@ * Default implementation of macro that returns current * instruction pointer ("program counter"). */ -#ifdef CONFIG_PA20 -#define current_ia(x) __asm__("mfia %0" : "=r"(x)) -#else /* mfia added in pa2.0 */ -#define current_ia(x) __asm__("blr 0,%0\n\tnop" : "=r"(x)) -#endif -#define current_text_addr() ({ void *pc; current_ia(pc); pc; }) + +/* We cannot use MFIA as it was added for PA2.0 - prumpf + + At one point there were no "0f/0b" type local symbols in gas for + PA-RISC. This is no longer true, but this still seems like the + nicest way to implement this. */ + +#define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; }) #define TASK_SIZE (current->thread.task_size) #define TASK_UNMAPPED_BASE (current->thread.map_base) diff --git a/include/asm-parisc/psw.h b/include/asm-parisc/psw.h index 5a3e23c9c..4334d6ca2 100644 --- a/include/asm-parisc/psw.h +++ b/include/asm-parisc/psw.h @@ -1,5 +1,6 @@ #ifndef _PARISC_PSW_H +#include #define PSW_I 0x00000001 #define PSW_D 0x00000002 diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index 98a82fa0c..25cb23ef7 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h @@ -48,6 +48,7 @@ * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -68,6 +69,7 @@ #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ diff --git a/include/asm-parisc/smp.h b/include/asm-parisc/smp.h index d4c0e26af..dbdbd2e9f 100644 --- a/include/asm-parisc/smp.h +++ b/include/asm-parisc/smp.h @@ -1,6 +1,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #if defined(CONFIG_SMP) diff --git a/include/asm-parisc/socket.h b/include/asm-parisc/socket.h index ce2eae170..1bf54dc53 100644 --- a/include/asm-parisc/socket.h +++ b/include/asm-parisc/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 0x401c #define SO_PEERSEC 0x401d -#define SO_PASSSEC 0x401e #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 74f037a39..a5a973c0c 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h @@ -1,6 +1,7 @@ #ifndef __PARISC_SYSTEM_H #define __PARISC_SYSTEM_H +#include #include /* The program status word as bitfields. */ @@ -143,6 +144,8 @@ static inline void set_eiem(unsigned long val) #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) + #ifndef CONFIG_PA20 /* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data, @@ -153,14 +156,13 @@ static inline void set_eiem(unsigned long val) type and dynamically select the 16-byte aligned int from the array for the semaphore. */ -#define __PA_LDCW_ALIGNMENT 16 -#define __ldcw_align(a) ({ \ - unsigned long __ret = (unsigned long) &(a)->lock[0]; \ - __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \ - & ~(__PA_LDCW_ALIGNMENT - 1); \ - (volatile unsigned int *) __ret; \ +#define __PA_LDCW_ALIGNMENT 16 +#define __ldcw_align(a) ({ \ + unsigned long __ret = (unsigned long) &(a)->lock[0]; \ + __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) & ~(__PA_LDCW_ALIGNMENT - 1); \ + (volatile unsigned int *) __ret; \ }) -#define __LDCW "ldcw" +#define LDCW "ldcw" #else /*CONFIG_PA20*/ /* From: "Jim Hull" @@ -170,18 +172,17 @@ static inline void set_eiem(unsigned long val) they only require "natural" alignment (4-byte for ldcw, 8-byte for ldcd). */ -#define __PA_LDCW_ALIGNMENT 4 +#define __PA_LDCW_ALIGNMENT 4 #define __ldcw_align(a) ((volatile unsigned int *)a) -#define __LDCW "ldcw,co" +#define LDCW "ldcw,co" #endif /*!CONFIG_PA20*/ /* LDCW, the only atomic read-write operation PA-RISC has. *sigh*. */ -#define __ldcw(a) ({ \ - unsigned __ret; \ - __asm__ __volatile__(__LDCW " 0(%1),%0" \ - : "=r" (__ret) : "r" (a)); \ - __ret; \ +#define __ldcw(a) ({ \ + unsigned __ret; \ + __asm__ __volatile__(LDCW " 0(%1),%0" : "=r" (__ret) : "r" (a)); \ + __ret; \ }) #ifdef CONFIG_SMP diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index f662e837d..825994a90 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h @@ -3,6 +3,7 @@ /* TLB flushing routines.... */ +#include #include #include diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index d973e8b34..f6c417c8c 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h @@ -172,11 +172,7 @@ struct exception_data { /* * The "__put_user/kernel_asm()" macros tell gcc they read from memory * instead of writing. This is because they do not write to any memory - * gcc knows about, so there are no aliasing issues. These macros must - * also be aware that "fixup_put_user_skip_[12]" are executed in the - * context of the fault, and any registers used there must be listed - * as clobbers. In this case only "r1" is used by the current routines. - * r8/r9 are already listed as err/val. + * gcc knows about, so there are no aliasing issues. */ #ifdef __LP64__ @@ -187,8 +183,7 @@ struct exception_data { "\t.dword\t1b,fixup_put_user_skip_1\n" \ "\t.previous" \ : "=r"(__pu_err) \ - : "r"(ptr), "r"(x), "0"(__pu_err) \ - : "r1") + : "r"(ptr), "r"(x), "0"(__pu_err)) #define __put_user_asm(stx,x,ptr) \ __asm__ __volatile__ ( \ diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 27bcfad1c..0e1a30be2 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h @@ -792,11 +792,15 @@ #define HPUX_GATEWAY_ADDR 0xC0000004 #define LINUX_GATEWAY_ADDR 0x100 -#ifdef __KERNEL__ #ifndef __ASSEMBLY__ #define SYS_ify(syscall_name) __NR_##syscall_name +/* Assume all syscalls are done from PIC code just to be + * safe. The worst case scenario is that you lose a register + * and save/restore r19 across the syscall. */ +#define PIC + #ifndef ASM_LINE_SEP # define ASM_LINE_SEP ; #endif @@ -930,6 +934,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ return K_INLINE_SYSCALL(name, 5, arg1, arg2, arg3, arg4, arg5); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_ALARM @@ -951,6 +956,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif /* mmap & mmap2 take 6 arguments */ #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \ @@ -1050,5 +1056,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_PARISC_UNISTD_H_ */ diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild deleted file mode 100644 index 982784995..000000000 --- a/include/asm-powerpc/Kbuild +++ /dev/null @@ -1,41 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += auxvec.h -header-y += ioctls.h -header-y += mman.h -header-y += sembuf.h -header-y += siginfo.h -header-y += stat.h -header-y += errno.h -header-y += ipcbuf.h -header-y += msgbuf.h -header-y += shmbuf.h -header-y += socket.h -header-y += termbits.h -header-y += fcntl.h -header-y += ipc.h -header-y += poll.h -header-y += shmparam.h -header-y += sockios.h -header-y += ucontext.h -header-y += ioctl.h -header-y += linkage.h -header-y += resource.h -header-y += sigcontext.h -header-y += statfs.h - -unifdef-y += a.out.h -unifdef-y += asm-compat.h -unifdef-y += bootx.h -unifdef-y += byteorder.h -unifdef-y += cputable.h -unifdef-y += elf.h -unifdef-y += nvram.h -unifdef-y += param.h -unifdef-y += posix_types.h -unifdef-y += ptrace.h -unifdef-y += seccomp.h -unifdef-y += signal.h -unifdef-y += termios.h -unifdef-y += types.h -unifdef-y += unistd.h diff --git a/include/asm-powerpc/abs_addr.h b/include/asm-powerpc/abs_addr.h index 4aa220718..c5c3259e0 100644 --- a/include/asm-powerpc/abs_addr.h +++ b/include/asm-powerpc/abs_addr.h @@ -2,6 +2,7 @@ #define _ASM_POWERPC_ABS_ADDR_H #ifdef __KERNEL__ +#include /* * c 2001 PPC 64 Team, IBM Corp diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index 53283e254..bb3c0ab7e 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h @@ -27,8 +27,8 @@ static __inline__ void atomic_add(int a, atomic_t *v) PPC405_ERR77(0,%3) " stwcx. %0,0,%3 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (a), "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -63,8 +63,8 @@ static __inline__ void atomic_sub(int a, atomic_t *v) PPC405_ERR77(0,%3) " stwcx. %0,0,%3 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (a), "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -97,8 +97,8 @@ static __inline__ void atomic_inc(atomic_t *v) PPC405_ERR77(0,%2) " stwcx. %0,0,%2 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -141,8 +141,8 @@ static __inline__ void atomic_dec(atomic_t *v) PPC405_ERR77(0,%2)\ " stwcx. %0,0,%2\n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -253,8 +253,8 @@ static __inline__ void atomic64_add(long a, atomic64_t *v) add %0,%2,%0\n\ stdcx. %0,0,%3 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (a), "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -287,8 +287,8 @@ static __inline__ void atomic64_sub(long a, atomic64_t *v) subf %0,%2,%0\n\ stdcx. %0,0,%3 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (a), "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -319,8 +319,8 @@ static __inline__ void atomic64_inc(atomic64_t *v) addic %0,%0,1\n\ stdcx. %0,0,%2 \n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (&v->counter), "m" (v->counter) : "cc"); } @@ -361,8 +361,8 @@ static __inline__ void atomic64_dec(atomic64_t *v) addic %0,%0,-1\n\ stdcx. %0,0,%2\n\ bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) + : "=&r" (t), "=m" (v->counter) + : "r" (&v->counter), "m" (v->counter) : "cc"); } diff --git a/include/asm-powerpc/backlight.h b/include/asm-powerpc/backlight.h index 8cf5c37c3..1ba1f27a0 100644 --- a/include/asm-powerpc/backlight.h +++ b/include/asm-powerpc/backlight.h @@ -2,40 +2,30 @@ * Routines for handling backlight control on PowerBooks * * For now, implementation resides in - * arch/powerpc/platforms/powermac/backlight.c + * arch/powerpc/platforms/powermac/pmac_support.c * */ #ifndef __ASM_POWERPC_BACKLIGHT_H #define __ASM_POWERPC_BACKLIGHT_H #ifdef __KERNEL__ -#include -#include +/* Abstract values */ +#define BACKLIGHT_OFF 0 +#define BACKLIGHT_MIN 1 +#define BACKLIGHT_MAX 0xf -/* For locking instructions, see the implementation file */ -extern struct backlight_device *pmac_backlight; -extern struct mutex pmac_backlight_mutex; +struct backlight_controller { + int (*set_enable)(int enable, int level, void *data); + int (*set_level)(int level, void *data); +}; -extern int pmac_backlight_curve_lookup(struct fb_info *info, int value); +extern void register_backlight_controller(struct backlight_controller *ctrler, void *data, char *type); +extern void unregister_backlight_controller(struct backlight_controller *ctrler, void *data); -extern int pmac_has_backlight_type(const char *type); - -extern void pmac_backlight_key(int direction); -static inline void pmac_backlight_key_up(void) -{ - pmac_backlight_key(0); -} -static inline void pmac_backlight_key_down(void) -{ - pmac_backlight_key(1); -} - -extern void pmac_backlight_set_legacy_brightness_pmu(int brightness); -extern int pmac_backlight_set_legacy_brightness(int brightness); -extern int pmac_backlight_get_legacy_brightness(void); - -extern void pmac_backlight_enable(void); -extern void pmac_backlight_disable(void); +extern int set_backlight_enable(int enable); +extern int get_backlight_enable(void); +extern int set_backlight_level(int level); +extern int get_backlight_level(void); #endif /* __KERNEL__ */ #endif diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h index c341063d0..d1c2a4405 100644 --- a/include/asm-powerpc/bitops.h +++ b/include/asm-powerpc/bitops.h @@ -65,8 +65,8 @@ static __inline__ void set_bit(int nr, volatile unsigned long *addr) PPC405_ERR77(0,%3) PPC_STLCX "%0,0,%3\n" "bne- 1b" - : "=&r" (old), "+m" (*p) - : "r" (mask), "r" (p) + : "=&r"(old), "=m"(*p) + : "r"(mask), "r"(p), "m"(*p) : "cc" ); } @@ -82,8 +82,8 @@ static __inline__ void clear_bit(int nr, volatile unsigned long *addr) PPC405_ERR77(0,%3) PPC_STLCX "%0,0,%3\n" "bne- 1b" - : "=&r" (old), "+m" (*p) - : "r" (mask), "r" (p) + : "=&r"(old), "=m"(*p) + : "r"(mask), "r"(p), "m"(*p) : "cc" ); } @@ -99,8 +99,8 @@ static __inline__ void change_bit(int nr, volatile unsigned long *addr) PPC405_ERR77(0,%3) PPC_STLCX "%0,0,%3\n" "bne- 1b" - : "=&r" (old), "+m" (*p) - : "r" (mask), "r" (p) + : "=&r"(old), "=m"(*p) + : "r"(mask), "r"(p), "m"(*p) : "cc" ); } @@ -179,8 +179,8 @@ static __inline__ void set_bits(unsigned long mask, unsigned long *addr) "or %0,%0,%2\n" PPC_STLCX "%0,0,%3\n" "bne- 1b" - : "=&r" (old), "+m" (*addr) - : "r" (mask), "r" (addr) + : "=&r" (old), "=m" (*addr) + : "r" (mask), "r" (addr), "m" (*addr) : "cc"); } @@ -288,8 +288,8 @@ static __inline__ int test_le_bit(unsigned long nr, #define __test_and_clear_le_bit(nr, addr) \ __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) -#define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0) -unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, +#define find_first_zero_le_bit(addr, size) find_next_zero_le_bit((addr), (size), 0) +unsigned long find_next_zero_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset); /* Bitmap functions for the ext2 filesystem */ @@ -309,7 +309,7 @@ unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, #define ext2_find_first_zero_bit(addr, size) \ find_first_zero_le_bit((unsigned long*)addr, size) #define ext2_find_next_zero_bit(addr, size, off) \ - generic_find_next_zero_le_bit((unsigned long*)addr, size, off) + find_next_zero_le_bit((unsigned long*)addr, size, off) /* Bitmap functions for the minix filesystem. */ diff --git a/include/asm-powerpc/cache.h b/include/asm-powerpc/cache.h index 642be62cf..6379c2df5 100644 --- a/include/asm-powerpc/cache.h +++ b/include/asm-powerpc/cache.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include /* bytes per L1 cache line */ #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 1ba3c9983..f6265c2a0 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h @@ -24,9 +24,6 @@ #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 #define PPC_FEATURE_ARCH_2_05 0x00001000 -#define PPC_FEATURE_TRUE_LE 0x00000002 -#define PPC_FEATURE_PPC_LE 0x00000001 - #ifdef __KERNEL__ #ifndef __ASSEMBLY__ @@ -72,13 +69,6 @@ struct cpu_spec { /* Processor specific oprofile operations */ enum powerpc_oprofile_type oprofile_type; - /* Bit locations inside the mmcra change */ - unsigned long oprofile_mmcra_sihv; - unsigned long oprofile_mmcra_sipr; - - /* Bits to clear during an oprofile exception */ - unsigned long oprofile_mmcra_clear; - /* Name of processor class, for the ELF AT_PLATFORM entry */ char *platform; }; @@ -114,33 +104,41 @@ extern void do_cpu_ftr_fixups(unsigned long offset); #define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000) #define CPU_FTR_BIG_PHYS ASM_CONST(0x0000000000080000) #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000) -#define CPU_FTR_PPC_LE ASM_CONST(0x0000000000200000) -#define CPU_FTR_REAL_LE ASM_CONST(0x0000000000400000) -/* - * Add the 64-bit processor unique features in the top half of the word; - * on 32-bit, make the names available but defined to be 0. - */ #ifdef __powerpc64__ -#define LONG_ASM_CONST(x) ASM_CONST(x) +/* Add the 64b processor unique features in the top half of the word */ +#define CPU_FTR_SLB ASM_CONST(0x0000000100000000) +#define CPU_FTR_16M_PAGE ASM_CONST(0x0000000200000000) +#define CPU_FTR_TLBIEL ASM_CONST(0x0000000400000000) +#define CPU_FTR_NOEXECUTE ASM_CONST(0x0000000800000000) +#define CPU_FTR_IABR ASM_CONST(0x0000002000000000) +#define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000) +#define CPU_FTR_CTRL ASM_CONST(0x0000008000000000) +#define CPU_FTR_SMT ASM_CONST(0x0000010000000000) +#define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) +#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) +#define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0000080000000000) +#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0000100000000000) +#define CPU_FTR_PAUSE_ZERO ASM_CONST(0x0000200000000000) +#define CPU_FTR_PURR ASM_CONST(0x0000400000000000) #else -#define LONG_ASM_CONST(x) 0 +/* ensure on 32b processors the flags are available for compiling but + * don't do anything */ +#define CPU_FTR_SLB ASM_CONST(0x0) +#define CPU_FTR_16M_PAGE ASM_CONST(0x0) +#define CPU_FTR_TLBIEL ASM_CONST(0x0) +#define CPU_FTR_NOEXECUTE ASM_CONST(0x0) +#define CPU_FTR_IABR ASM_CONST(0x0) +#define CPU_FTR_MMCRA ASM_CONST(0x0) +#define CPU_FTR_CTRL ASM_CONST(0x0) +#define CPU_FTR_SMT ASM_CONST(0x0) +#define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0) +#define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0) +#define CPU_FTR_MMCRA_SIHV ASM_CONST(0x0) +#define CPU_FTR_CI_LARGE_PAGE ASM_CONST(0x0) +#define CPU_FTR_PURR ASM_CONST(0x0) #endif -#define CPU_FTR_SLB LONG_ASM_CONST(0x0000000100000000) -#define CPU_FTR_16M_PAGE LONG_ASM_CONST(0x0000000200000000) -#define CPU_FTR_TLBIEL LONG_ASM_CONST(0x0000000400000000) -#define CPU_FTR_NOEXECUTE LONG_ASM_CONST(0x0000000800000000) -#define CPU_FTR_IABR LONG_ASM_CONST(0x0000002000000000) -#define CPU_FTR_MMCRA LONG_ASM_CONST(0x0000004000000000) -#define CPU_FTR_CTRL LONG_ASM_CONST(0x0000008000000000) -#define CPU_FTR_SMT LONG_ASM_CONST(0x0000010000000000) -#define CPU_FTR_COHERENT_ICACHE LONG_ASM_CONST(0x0000020000000000) -#define CPU_FTR_LOCKLESS_TLBIE LONG_ASM_CONST(0x0000040000000000) -#define CPU_FTR_CI_LARGE_PAGE LONG_ASM_CONST(0x0000100000000000) -#define CPU_FTR_PAUSE_ZERO LONG_ASM_CONST(0x0000200000000000) -#define CPU_FTR_PURR LONG_ASM_CONST(0x0000400000000000) - #ifndef __ASSEMBLY__ #define CPU_FTR_PPCAS_ARCH_V2_BASE (CPU_FTR_SLB | \ @@ -194,95 +192,92 @@ extern void do_cpu_ftr_fixups(unsigned long offset); #define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE) #define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ - CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) + CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ - CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE | \ - CPU_FTR_PPC_LE) + CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE) #define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ - CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) + CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_740 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ - CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_PPC_LE) + CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_750 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ - CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_PPC_LE) + CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_750FX1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM | CPU_FTR_PPC_LE) + CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM) #define CPU_FTRS_750FX2 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_NO_DPM | CPU_FTR_PPC_LE) + CPU_FTR_NO_DPM) #define CPU_FTRS_750FX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) + CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS) #define CPU_FTRS_750GX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | \ CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | \ - CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) + CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS) #define CPU_FTRS_7400_NOTAU (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ - CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) + CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_7400 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | \ CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | \ - CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) + CPU_FTR_MAYBE_CAN_NAP) #define CPU_FTRS_7450_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7450_21 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7450_23 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ - CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7455_1 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | \ CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7455_20 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS) #define CPU_FTRS_7455 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7447_10 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC) #define CPU_FTRS_7447 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_7447A (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | \ CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | \ - CPU_FTR_NEED_COHERENT | CPU_FTR_PPC_LE) + CPU_FTR_NEED_COHERENT) #define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB) #define CPU_FTRS_G2_LE (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | \ @@ -292,6 +287,13 @@ extern void do_cpu_ftr_fixups(unsigned long offset); CPU_FTR_COMMON) #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) +#define CPU_FTRS_POWER3_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ + CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) +#define CPU_FTRS_POWER4_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ + CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_NODSISRALIGN) +#define CPU_FTRS_970_32 (CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | \ + CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | CPU_FTR_ALTIVEC_COMP | \ + CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN) #define CPU_FTRS_8XX (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB) #define CPU_FTRS_40X (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_NODSISRALIGN) @@ -305,7 +307,7 @@ extern void do_cpu_ftr_fixups(unsigned long offset); #define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) #ifdef __powerpc64__ #define CPU_FTRS_POWER3 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ - CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | CPU_FTR_PPC_LE) + CPU_FTR_HPTE_TABLE | CPU_FTR_IABR) #define CPU_FTRS_RS64 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_HPTE_TABLE | CPU_FTR_IABR | \ CPU_FTR_MMCRA | CPU_FTR_CTRL) @@ -318,12 +320,12 @@ extern void do_cpu_ftr_fixups(unsigned long offset); CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ - CPU_FTR_PURR) + CPU_FTR_MMCRA_SIHV | CPU_FTR_PURR) #define CPU_FTRS_POWER6 (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ CPU_FTR_MMCRA | CPU_FTR_SMT | \ CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \ - CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE | CPU_FTR_REAL_LE) + CPU_FTR_PURR | CPU_FTR_CI_LARGE_PAGE) #define CPU_FTRS_CELL (CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | \ CPU_FTR_HPTE_TABLE | CPU_FTR_PPCAS_ARCH_V2 | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ @@ -352,6 +354,12 @@ enum { #else CPU_FTRS_GENERIC_32 | #endif +#ifdef CONFIG_PPC64BRIDGE + CPU_FTRS_POWER3_32 | +#endif +#ifdef CONFIG_POWER4 + CPU_FTRS_POWER4_32 | CPU_FTRS_970_32 | +#endif #ifdef CONFIG_8xx CPU_FTRS_8XX | #endif @@ -391,6 +399,12 @@ enum { #else CPU_FTRS_GENERIC_32 & #endif +#ifdef CONFIG_PPC64BRIDGE + CPU_FTRS_POWER3_32 & +#endif +#ifdef CONFIG_POWER4 + CPU_FTRS_POWER4_32 & CPU_FTRS_970_32 & +#endif #ifdef CONFIG_8xx CPU_FTRS_8XX & #endif diff --git a/include/asm-powerpc/cputime.h b/include/asm-powerpc/cputime.h index 310804485..a21185d47 100644 --- a/include/asm-powerpc/cputime.h +++ b/include/asm-powerpc/cputime.h @@ -43,7 +43,6 @@ typedef u64 cputime64_t; #define cputime64_zero ((cputime64_t)0) #define cputime64_add(__a, __b) ((__a) + (__b)) -#define cputime64_sub(__a, __b) ((__a) - (__b)) #define cputime_to_cputime64(__ct) (__ct) #ifdef __KERNEL__ @@ -75,23 +74,6 @@ static inline cputime_t jiffies_to_cputime(const unsigned long jif) return ct; } -static inline cputime64_t jiffies64_to_cputime64(const u64 jif) -{ - cputime_t ct; - u64 sec; - - /* have to be a little careful about overflow */ - ct = jif % HZ; - sec = jif / HZ; - if (ct) { - ct *= tb_ticks_per_sec; - do_div(ct, HZ); - } - if (sec) - ct += (cputime_t) sec * tb_ticks_per_sec; - return ct; -} - static inline u64 cputime64_to_jiffies64(const cputime_t ct) { return mulhdu(ct, __cputime_jiffies_factor); diff --git a/include/asm-powerpc/delay.h b/include/asm-powerpc/delay.h index f9200a65c..057a60955 100644 --- a/include/asm-powerpc/delay.h +++ b/include/asm-powerpc/delay.h @@ -17,18 +17,5 @@ extern void __delay(unsigned long loops); extern void udelay(unsigned long usecs); -/* - * On shared processor machines the generic implementation of mdelay can - * result in large errors. While each iteration of the loop inside mdelay - * is supposed to take 1ms, the hypervisor could sleep our partition for - * longer (eg 10ms). With the right timing these errors can add up. - * - * Since there is no 32bit overflow issue on 64bit kernels, just call - * udelay directly. - */ -#ifdef CONFIG_PPC64 -#define mdelay(n) udelay((n) * 1000) -#endif - #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_DELAY_H */ diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 2ab9baf78..2ac63f569 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h @@ -8,6 +8,7 @@ #define _ASM_DMA_MAPPING_H #ifdef __KERNEL__ +#include #include #include /* need struct page definitions */ diff --git a/include/asm-powerpc/dma.h b/include/asm-powerpc/dma.h index 7a4374bdb..4bb57fe37 100644 --- a/include/asm-powerpc/dma.h +++ b/include/asm-powerpc/dma.h @@ -22,6 +22,7 @@ * with a grain of salt. */ +#include #include #include #include diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 6a7843966..868c7139d 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h @@ -21,6 +21,7 @@ #define _PPC64_EEH_H #ifdef __KERNEL__ +#include #include #include #include @@ -205,7 +206,6 @@ static inline void eeh_memset_io(volatile void __iomem *addr, int c, lc |= lc << 8; lc |= lc << 16; - __asm__ __volatile__ ("sync" : : : "memory"); while(n && !EEH_CHECK_ALIGN(p, 4)) { *((volatile u8 *)p) = c; p++; @@ -230,7 +230,6 @@ static inline void eeh_memcpy_fromio(void *dest, const volatile void __iomem *sr void *destsave = dest; unsigned long nsave = n; - __asm__ __volatile__ ("sync" : : : "memory"); while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) { *((u8 *)dest) = *((volatile u8 *)vsrc); __asm__ __volatile__ ("eieio" : : : "memory"); @@ -268,7 +267,6 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, { void *vdest = (void __force *) dest; - __asm__ __volatile__ ("sync" : : : "memory"); while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) { *((volatile u8 *)vdest) = *((u8 *)src); src++; @@ -295,6 +293,8 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, static inline u8 eeh_inb(unsigned long port) { u8 val; + if (!_IO_IS_VALID(port)) + return ~0; val = in_8((u8 __iomem *)(port+pci_io_base)); if (EEH_POSSIBLE_ERROR(val, u8)) return eeh_check_failure((void __iomem *)(port), val); @@ -303,12 +303,15 @@ static inline u8 eeh_inb(unsigned long port) static inline void eeh_outb(u8 val, unsigned long port) { - out_8((u8 __iomem *)(port+pci_io_base), val); + if (_IO_IS_VALID(port)) + out_8((u8 __iomem *)(port+pci_io_base), val); } static inline u16 eeh_inw(unsigned long port) { u16 val; + if (!_IO_IS_VALID(port)) + return ~0; val = in_le16((u16 __iomem *)(port+pci_io_base)); if (EEH_POSSIBLE_ERROR(val, u16)) return eeh_check_failure((void __iomem *)(port), val); @@ -317,12 +320,15 @@ static inline u16 eeh_inw(unsigned long port) static inline void eeh_outw(u16 val, unsigned long port) { - out_le16((u16 __iomem *)(port+pci_io_base), val); + if (_IO_IS_VALID(port)) + out_le16((u16 __iomem *)(port+pci_io_base), val); } static inline u32 eeh_inl(unsigned long port) { u32 val; + if (!_IO_IS_VALID(port)) + return ~0; val = in_le32((u32 __iomem *)(port+pci_io_base)); if (EEH_POSSIBLE_ERROR(val, u32)) return eeh_check_failure((void __iomem *)(port), val); @@ -331,7 +337,8 @@ static inline u32 eeh_inl(unsigned long port) static inline void eeh_outl(u32 val, unsigned long port) { - out_le32((u32 __iomem *)(port+pci_io_base), val); + if (_IO_IS_VALID(port)) + out_le32((u32 __iomem *)(port+pci_io_base), val); } /* in-string eeh macros */ diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h index dc6bf0ffb..93d55a2be 100644 --- a/include/asm-powerpc/eeh_event.h +++ b/include/asm-powerpc/eeh_event.h @@ -18,8 +18,8 @@ * Copyright (c) 2005 Linas Vepstas */ -#ifndef ASM_POWERPC_EEH_EVENT_H -#define ASM_POWERPC_EEH_EVENT_H +#ifndef ASM_PPC64_EEH_EVENT_H +#define ASM_PPC64_EEH_EVENT_H #ifdef __KERNEL__ /** EEH event -- structure holding pci controller data that describes @@ -39,7 +39,7 @@ struct eeh_event { * @dev pci device * * This routine builds a PCI error event which will be delivered - * to all listeners on the eeh_notifier_chain. + * to all listeners on the peh_notifier_chain. * * This routine can be called within an interrupt context; * the actual event will be delivered in a normal context @@ -51,7 +51,7 @@ int eeh_send_failure_event (struct device_node *dn, int time_unavail); /* Main recovery function */ -struct pci_dn * handle_eeh_events (struct eeh_event *); +void handle_eeh_events (struct eeh_event *); #endif /* __KERNEL__ */ -#endif /* ASM_POWERPC_EEH_EVENT_H */ +#endif /* ASM_PPC64_EEH_EVENT_H */ diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h index 2aba27e87..cfa0e243c 100644 --- a/include/asm-powerpc/elf.h +++ b/include/asm-powerpc/elf.h @@ -3,14 +3,14 @@ #ifdef __KERNEL__ #include /* for task_struct */ -#include -#include #endif #include #include #include #include +#include +#include /* PowerPC relocations defined by the ABIs */ #define R_PPC_NONE 0 @@ -129,7 +129,7 @@ typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ typedef elf_greg_t32 elf_greg_t; typedef elf_gregset_t32 elf_gregset_t; -# define elf_addr_t __u32 +# define elf_addr_t u32 #endif /* ELF_ARCH */ /* Floating point registers */ @@ -161,7 +161,6 @@ typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; #endif -#ifdef __KERNEL__ /* * This is used to ensure we don't load something for the wrong architecture. */ @@ -177,6 +176,8 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; #define ELF_ET_DYN_BASE (0x08000000) +#ifdef __KERNEL__ + /* Common routine for both 32-bit and 64-bit processes */ static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, struct pt_regs *regs) @@ -294,7 +295,7 @@ do { \ NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ - VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base) \ + VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->thread.vdso_base) \ } while (0) /* PowerPC64 relocations defined by the ABIs */ diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a223..608164c39 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h @@ -11,6 +11,7 @@ #define __ASM_POWERPC_FLOPPY_H #ifdef __KERNEL__ +#include #include #define fd_inb(port) inb_p(port) @@ -27,7 +28,8 @@ #define fd_disable_irq() disable_irq(FLOPPY_IRQ) #define fd_cacheflush(addr,size) /* nothing */ #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ - IRQF_DISABLED, "floppy", NULL) + SA_INTERRUPT|SA_SAMPLE_RANDOM, \ + "floppy", NULL) #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); #ifdef CONFIG_PCI diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index 936422e54..f1b3c00bc 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h @@ -84,33 +84,7 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) { - int prev; - - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) - return -EFAULT; - - __asm__ __volatile__ ( - LWSYNC_ON_SMP -"1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\ - cmpw 0,%0,%3\n\ - bne- 3f\n" - PPC405_ERR77(0,%2) -"2: stwcx. %4,0,%2\n\ - bne- 1b\n" - ISYNC_ON_SMP -"3: .section .fixup,\"ax\"\n\ -4: li %0,%5\n\ - b 3b\n\ - .previous\n\ - .section __ex_table,\"a\"\n\ - .align 3\n\ - " PPC_LONG "1b,4b,2b,4b\n\ - .previous" \ - : "=&r" (prev), "+m" (*uaddr) - : "r" (uaddr), "r" (oldval), "r" (newval), "i" (-EFAULT) - : "cc", "memory"); - - return prev; + return -ENOSYS; } #endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index 0d3c4e857..6cc7e1fb7 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h @@ -102,15 +102,6 @@ #define H_PP1 (1UL<<(63-62)) #define H_PP2 (1UL<<(63-63)) -/* VASI States */ -#define H_VASI_INVALID 0 -#define H_VASI_ENABLED 1 -#define H_VASI_ABORTED 2 -#define H_VASI_SUSPENDING 3 -#define H_VASI_SUSPENDED 4 -#define H_VASI_RESUMED 5 -#define H_VASI_COMPLETED 6 - /* DABRX flags */ #define H_DABRX_HYPERVISOR (1UL<<(63-61)) #define H_DABRX_KERNEL (1UL<<(63-62)) @@ -199,7 +190,6 @@ #define H_QUERY_INT_STATE 0x1E4 #define H_POLL_PENDING 0x1D8 #define H_JOIN 0x298 -#define H_VASI_STATE 0x2A4 #define H_ENABLE_CRQ 0x2B0 #ifndef __ASSEMBLY__ diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index d40359204..26b89d859 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h @@ -6,6 +6,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -86,27 +87,27 @@ static inline void local_irq_save_ptr(unsigned long *flags) #define mask_irq(irq) \ ({ \ irq_desc_t *desc = get_irq_desc(irq); \ - if (desc->chip && desc->chip->disable) \ - desc->chip->disable(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->chip && desc->chip->enable) \ - desc->chip->enable(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->chip && desc->chip->ack) \ - desc->chip->ack(irq); \ + if (desc->handler && desc->handler->ack) \ + desc->handler->ack(irq); \ }) -/* - * interrupt-retrigger: should we handle this via lost interrupts and IPIs - * or should we not care like we do now ? --BenH. +/* Should we handle this via lost interrupts and IPIs or should we don't care like + * we do now ? --BenH. */ struct hw_interrupt_type; +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_HW_IRQ_H */ diff --git a/include/asm-powerpc/i8259.h b/include/asm-powerpc/i8259.h index c80e11305..0392159e1 100644 --- a/include/asm-powerpc/i8259.h +++ b/include/asm-powerpc/i8259.h @@ -4,13 +4,11 @@ #include -#ifdef CONFIG_PPC_MERGE -extern void i8259_init(struct device_node *node, unsigned long intack_addr); -extern unsigned int i8259_irq(struct pt_regs *regs); -#else +extern struct hw_interrupt_type i8259_pic; + extern void i8259_init(unsigned long intack_addr, int offset); extern int i8259_irq(struct pt_regs *regs); -#endif +extern int i8259_irq_cascade(struct pt_regs *regs, void *unused); #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_I8259_H */ diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index b09b42af6..da5f64048 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h @@ -22,6 +22,7 @@ #endif #ifndef __powerpc64__ +#include #include #include #include diff --git a/include/asm-powerpc/immap_86xx.h b/include/asm-powerpc/immap_86xx.h deleted file mode 100644 index d905b6622..000000000 --- a/include/asm-powerpc/immap_86xx.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * MPC86xx Internal Memory Map - * - * Author: Jeff Brown - * - * Copyright 2004 Freescale Semiconductor, 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. - * - */ - -#ifndef __ASM_POWERPC_IMMAP_86XX_H__ -#define __ASM_POWERPC_IMMAP_86XX_H__ -#ifdef __KERNEL__ - -/* Eventually this should define all the IO block registers in 86xx */ - -/* PCI Registers */ -typedef struct ccsr_pci { - uint cfg_addr; /* 0x.000 - PCI Configuration Address Register */ - uint cfg_data; /* 0x.004 - PCI Configuration Data Register */ - uint int_ack; /* 0x.008 - PCI Interrupt Acknowledge Register */ - char res1[3060]; - uint potar0; /* 0x.c00 - PCI Outbound Transaction Address Register 0 */ - uint potear0; /* 0x.c04 - PCI Outbound Translation Extended Address Register 0 */ - uint powbar0; /* 0x.c08 - PCI Outbound Window Base Address Register 0 */ - char res2[4]; - uint powar0; /* 0x.c10 - PCI Outbound Window Attributes Register 0 */ - char res3[12]; - uint potar1; /* 0x.c20 - PCI Outbound Transaction Address Register 1 */ - uint potear1; /* 0x.c24 - PCI Outbound Translation Extended Address Register 1 */ - uint powbar1; /* 0x.c28 - PCI Outbound Window Base Address Register 1 */ - char res4[4]; - uint powar1; /* 0x.c30 - PCI Outbound Window Attributes Register 1 */ - char res5[12]; - uint potar2; /* 0x.c40 - PCI Outbound Transaction Address Register 2 */ - uint potear2; /* 0x.c44 - PCI Outbound Translation Extended Address Register 2 */ - uint powbar2; /* 0x.c48 - PCI Outbound Window Base Address Register 2 */ - char res6[4]; - uint powar2; /* 0x.c50 - PCI Outbound Window Attributes Register 2 */ - char res7[12]; - uint potar3; /* 0x.c60 - PCI Outbound Transaction Address Register 3 */ - uint potear3; /* 0x.c64 - PCI Outbound Translation Extended Address Register 3 */ - uint powbar3; /* 0x.c68 - PCI Outbound Window Base Address Register 3 */ - char res8[4]; - uint powar3; /* 0x.c70 - PCI Outbound Window Attributes Register 3 */ - char res9[12]; - uint potar4; /* 0x.c80 - PCI Outbound Transaction Address Register 4 */ - uint potear4; /* 0x.c84 - PCI Outbound Translation Extended Address Register 4 */ - uint powbar4; /* 0x.c88 - PCI Outbound Window Base Address Register 4 */ - char res10[4]; - uint powar4; /* 0x.c90 - PCI Outbound Window Attributes Register 4 */ - char res11[268]; - uint pitar3; /* 0x.da0 - PCI Inbound Translation Address Register 3 */ - char res12[4]; - uint piwbar3; /* 0x.da8 - PCI Inbound Window Base Address Register 3 */ - uint piwbear3; /* 0x.dac - PCI Inbound Window Base Extended Address Register 3 */ - uint piwar3; /* 0x.db0 - PCI Inbound Window Attributes Register 3 */ - char res13[12]; - uint pitar2; /* 0x.dc0 - PCI Inbound Translation Address Register 2 */ - char res14[4]; - uint piwbar2; /* 0x.dc8 - PCI Inbound Window Base Address Register 2 */ - uint piwbear2; /* 0x.dcc - PCI Inbound Window Base Extended Address Register 2 */ - uint piwar2; /* 0x.dd0 - PCI Inbound Window Attributes Register 2 */ - char res15[12]; - uint pitar1; /* 0x.de0 - PCI Inbound Translation Address Register 1 */ - char res16[4]; - uint piwbar1; /* 0x.de8 - PCI Inbound Window Base Address Register 1 */ - char res17[4]; - uint piwar1; /* 0x.df0 - PCI Inbound Window Attributes Register 1 */ - char res18[12]; - uint err_dr; /* 0x.e00 - PCI Error Detect Register */ - uint err_cap_dr; /* 0x.e04 - PCI Error Capture Disable Register */ - uint err_en; /* 0x.e08 - PCI Error Enable Register */ - uint err_attrib; /* 0x.e0c - PCI Error Attributes Capture Register */ - uint err_addr; /* 0x.e10 - PCI Error Address Capture Register */ - uint err_ext_addr; /* 0x.e14 - PCI Error Extended Address Capture Register */ - uint err_dl; /* 0x.e18 - PCI Error Data Low Capture Register */ - uint err_dh; /* 0x.e1c - PCI Error Data High Capture Register */ - uint gas_timr; /* 0x.e20 - PCI Gasket Timer Register */ - uint pci_timr; /* 0x.e24 - PCI Timer Register */ - char res19[472]; -} ccsr_pci_t; - -/* PCI Express Registers */ -typedef struct ccsr_pex { - uint pex_config_addr; /* 0x.000 - PCI Express Configuration Address Register */ - uint pex_config_data; /* 0x.004 - PCI Express Configuration Data Register */ - char res1[4]; - uint pex_otb_cpl_tor; /* 0x.00c - PCI Express Outbound completion timeout register */ - uint pex_conf_tor; /* 0x.010 - PCI Express configuration timeout register */ - char res2[12]; - uint pex_pme_mes_dr; /* 0x.020 - PCI Express PME and message detect register */ - uint pex_pme_mes_disr; /* 0x.024 - PCI Express PME and message disable register */ - uint pex_pme_mes_ier; /* 0x.028 - PCI Express PME and message interrupt enable register */ - uint pex_pmcr; /* 0x.02c - PCI Express power management command register */ - char res3[3024]; - uint pexotar0; /* 0x.c00 - PCI Express outbound translation address register 0 */ - uint pexotear0; /* 0x.c04 - PCI Express outbound translation extended address register 0*/ - char res4[8]; - uint pexowar0; /* 0x.c10 - PCI Express outbound window attributes register 0*/ - char res5[12]; - uint pexotar1; /* 0x.c20 - PCI Express outbound translation address register 1 */ - uint pexotear1; /* 0x.c24 - PCI Express outbound translation extended address register 1*/ - uint pexowbar1; /* 0x.c28 - PCI Express outbound window base address register 1*/ - char res6[4]; - uint pexowar1; /* 0x.c30 - PCI Express outbound window attributes register 1*/ - char res7[12]; - uint pexotar2; /* 0x.c40 - PCI Express outbound translation address register 2 */ - uint pexotear2; /* 0x.c44 - PCI Express outbound translation extended address register 2*/ - uint pexowbar2; /* 0x.c48 - PCI Express outbound window base address register 2*/ - char res8[4]; - uint pexowar2; /* 0x.c50 - PCI Express outbound window attributes register 2*/ - char res9[12]; - uint pexotar3; /* 0x.c60 - PCI Express outbound translation address register 3 */ - uint pexotear3; /* 0x.c64 - PCI Express outbound translation extended address register 3*/ - uint pexowbar3; /* 0x.c68 - PCI Express outbound window base address register 3*/ - char res10[4]; - uint pexowar3; /* 0x.c70 - PCI Express outbound window attributes register 3*/ - char res11[12]; - uint pexotar4; /* 0x.c80 - PCI Express outbound translation address register 4 */ - uint pexotear4; /* 0x.c84 - PCI Express outbound translation extended address register 4*/ - uint pexowbar4; /* 0x.c88 - PCI Express outbound window base address register 4*/ - char res12[4]; - uint pexowar4; /* 0x.c90 - PCI Express outbound window attributes register 4*/ - char res13[12]; - char res14[256]; - uint pexitar3; /* 0x.da0 - PCI Express inbound translation address register 3 */ - char res15[4]; - uint pexiwbar3; /* 0x.da8 - PCI Express inbound window base address register 3 */ - uint pexiwbear3; /* 0x.dac - PCI Express inbound window base extended address register 3 */ - uint pexiwar3; /* 0x.db0 - PCI Express inbound window attributes register 3 */ - char res16[12]; - uint pexitar2; /* 0x.dc0 - PCI Express inbound translation address register 2 */ - char res17[4]; - uint pexiwbar2; /* 0x.dc8 - PCI Express inbound window base address register 2 */ - uint pexiwbear2; /* 0x.dcc - PCI Express inbound window base extended address register 2 */ - uint pexiwar2; /* 0x.dd0 - PCI Express inbound window attributes register 2 */ - char res18[12]; - uint pexitar1; /* 0x.de0 - PCI Express inbound translation address register 2 */ - char res19[4]; - uint pexiwbar1; /* 0x.de8 - PCI Express inbound window base address register 2 */ - uint pexiwbear1; /* 0x.dec - PCI Express inbound window base extended address register 2 */ - uint pexiwar1; /* 0x.df0 - PCI Express inbound window attributes register 2 */ - char res20[12]; - uint pex_err_dr; /* 0x.e00 - PCI Express error detect register */ - char res21[4]; - uint pex_err_en; /* 0x.e08 - PCI Express error interrupt enable register */ - char res22[4]; - uint pex_err_disr; /* 0x.e10 - PCI Express error disable register */ - char res23[12]; - uint pex_err_cap_stat; /* 0x.e20 - PCI Express error capture status register */ - char res24[4]; - uint pex_err_cap_r0; /* 0x.e28 - PCI Express error capture register 0 */ - uint pex_err_cap_r1; /* 0x.e2c - PCI Express error capture register 0 */ - uint pex_err_cap_r2; /* 0x.e30 - PCI Express error capture register 0 */ - uint pex_err_cap_r3; /* 0x.e34 - PCI Express error capture register 0 */ -} ccsr_pex_t; - -/* Global Utility Registers */ -typedef struct ccsr_guts { - uint porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ - uint porbmsr; /* 0x.0004 - POR Boot Mode Status Register */ - uint porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */ - uint pordevsr; /* 0x.000c - POR I/O Device Status Register */ - uint pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */ - char res1[12]; - uint gpporcr; /* 0x.0020 - General-Purpose POR Configuration Register */ - char res2[12]; - uint gpiocr; /* 0x.0030 - GPIO Control Register */ - char res3[12]; - uint gpoutdr; /* 0x.0040 - General-Purpose Output Data Register */ - char res4[12]; - uint gpindr; /* 0x.0050 - General-Purpose Input Data Register */ - char res5[12]; - uint pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */ - char res6[12]; - uint devdisr; /* 0x.0070 - Device Disable Control */ - char res7[12]; - uint powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */ - char res8[12]; - uint mcpsumr; /* 0x.0090 - Machine Check Summary Register */ - char res9[12]; - uint pvr; /* 0x.00a0 - Processor Version Register */ - uint svr; /* 0x.00a4 - System Version Register */ - char res10[3416]; - uint clkocr; /* 0x.0e00 - Clock Out Select Register */ - char res11[12]; - uint ddrdllcr; /* 0x.0e10 - DDR DLL Control Register */ - char res12[12]; - uint lbcdllcr; /* 0x.0e20 - LBC DLL Control Register */ - char res13[61916]; -} ccsr_guts_t; - -#endif /* __ASM_POWERPC_IMMAP_86XX_H__ */ -#endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 212428db0..f1c2469b8 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h @@ -19,7 +19,6 @@ extern int check_legacy_ioport(unsigned long base_port); #include #include #include -#include #ifdef CONFIG_PPC_ISERIES #include #endif @@ -41,6 +40,12 @@ extern int check_legacy_ioport(unsigned long base_port); extern unsigned long isa_io_base; extern unsigned long pci_io_base; +extern unsigned long io_page_mask; + +#define MAX_ISA_PORT 0x10000 + +#define _IO_IS_VALID(port) ((port) >= MAX_ISA_PORT || (1 << (port>>PAGE_SHIFT)) \ + & io_page_mask) #ifdef CONFIG_PPC_ISERIES /* __raw_* accessors aren't supported on iSeries */ @@ -73,9 +78,6 @@ extern unsigned long pci_io_base; * Neither do the standard versions now, these are just here * for older code. */ -#define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) -#define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) -#define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl)) #define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) #define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) #else @@ -141,12 +143,12 @@ static inline void __raw_writeq(unsigned long v, volatile void __iomem *addr) #define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns)) #define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl)) -#endif - #define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns)) #define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns)) #define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl)) +#endif + #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) @@ -163,11 +165,7 @@ extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns); extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); -static inline void mmiowb(void) -{ - __asm__ __volatile__ ("sync" : : : "memory"); - get_paca()->io_sync = 0; -} +#define mmiowb() /* * output pause versions need a delay at least for the @@ -283,23 +281,22 @@ static inline int in_8(const volatile unsigned char __iomem *addr) { int ret; - __asm__ __volatile__("sync; lbz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("lbz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_8(volatile unsigned char __iomem *addr, int val) { - __asm__ __volatile__("sync; stb%U0%X0 %1,%0" + __asm__ __volatile__("stb%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); - get_paca()->io_sync = 1; } static inline int in_le16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("sync; lhbrx %0,0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" : "=r" (ret) : "r" (addr), "m" (*addr)); return ret; } @@ -308,30 +305,28 @@ static inline int in_be16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("sync; lhz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_le16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sync; sthbrx %1,0,%2" + __asm__ __volatile__("sthbrx %1,0,%2; sync" : "=m" (*addr) : "r" (val), "r" (addr)); - get_paca()->io_sync = 1; } static inline void out_be16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sync; sth%U0%X0 %1,%0" + __asm__ __volatile__("sth%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); - get_paca()->io_sync = 1; } static inline unsigned in_le32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("sync; lwbrx %0,0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("lwbrx %0,0,%1; twi 0,%0,0; isync" : "=r" (ret) : "r" (addr), "m" (*addr)); return ret; } @@ -340,23 +335,21 @@ static inline unsigned in_be32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("sync; lwz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("lwz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_le32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) + __asm__ __volatile__("stwbrx %1,0,%2; sync" : "=m" (*addr) : "r" (val), "r" (addr)); - get_paca()->io_sync = 1; } static inline void out_be32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("sync; stw%U0%X0 %1,%0" + __asm__ __volatile__("stw%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); - get_paca()->io_sync = 1; } static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) @@ -364,7 +357,6 @@ static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) unsigned long tmp, ret; __asm__ __volatile__( - "sync\n" "ld %1,0(%2)\n" "twi 0,%1,0\n" "isync\n" @@ -383,7 +375,7 @@ static inline unsigned long in_be64(const volatile unsigned long __iomem *addr) { unsigned long ret; - __asm__ __volatile__("sync; ld%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("ld%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } @@ -400,16 +392,14 @@ static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long "rldicl %1,%1,32,0\n" "rlwimi %0,%1,8,8,31\n" "rlwimi %0,%1,24,16,23\n" - "sync\n" - "std %0,0(%3)" + "std %0,0(%3)\n" + "sync" : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr)); - get_paca()->io_sync = 1; } static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) { - __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); - get_paca()->io_sync = 1; + __asm__ __volatile__("std%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); } #ifndef CONFIG_PPC_ISERIES diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index a5e98641a..18ca29e91 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h @@ -22,6 +22,7 @@ #define _ASM_IOMMU_H #ifdef __KERNEL__ +#include #include #include #include @@ -66,8 +67,7 @@ extern void iommu_free_table(struct device_node *dn); /* Initializes an iommu_table based in values set in the passed-in * structure */ -extern struct iommu_table *iommu_init_table(struct iommu_table * tbl, - int nid); +extern struct iommu_table *iommu_init_table(struct iommu_table * tbl); extern int iommu_map_sg(struct device *dev, struct iommu_table *tbl, struct scatterlist *sglist, int nelems, unsigned long mask, @@ -76,8 +76,7 @@ extern void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist, int nelems, enum dma_data_direction direction); extern void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, - dma_addr_t *dma_handle, unsigned long mask, - gfp_t flag, int node); + dma_addr_t *dma_handle, unsigned long mask, gfp_t flag); extern void iommu_free_coherent(struct iommu_table *tbl, size_t size, void *vaddr, dma_addr_t dma_handle); extern dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, diff --git a/include/asm-powerpc/ipic.h b/include/asm-powerpc/ipic.h index 53079ec3a..0fe396a2b 100644 --- a/include/asm-powerpc/ipic.h +++ b/include/asm-powerpc/ipic.h @@ -69,6 +69,9 @@ enum ipic_mcp_irq { IPIC_MCP_MU = 7, }; +extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, + unsigned int irq_offset, + unsigned char *senses, unsigned int senses_count); extern int ipic_set_priority(unsigned int irq, unsigned int priority); extern void ipic_set_highest_priority(unsigned int irq); extern void ipic_set_default_priority(void); @@ -76,16 +79,7 @@ extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq); extern void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq); extern u32 ipic_get_mcp_status(void); extern void ipic_clear_mcp_status(u32 mask); - -#ifdef CONFIG_PPC_MERGE -extern void ipic_init(struct device_node *node, unsigned int flags); -extern unsigned int ipic_get_irq(struct pt_regs *regs); -#else -extern void ipic_init(phys_addr_t phys_addr, unsigned int flags, - unsigned int irq_offset, - unsigned char *senses, unsigned int senses_count); extern int ipic_get_irq(struct pt_regs *regs); -#endif #endif /* __ASM_IPIC_H__ */ #endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index 571490073..7bc6d73b2 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h @@ -9,327 +9,83 @@ * 2 of the License, or (at your option) any later version. */ +#include #include -#include -#include #include #include +/* this number is used when no interrupt has been assigned */ +#define NO_IRQ (-1) -#define get_irq_desc(irq) (&irq_desc[(irq)]) - -/* Define a way to iterate across irqs. */ -#define for_each_irq(i) \ - for ((i) = 0; (i) < NR_IRQS; ++(i)) - -extern atomic_t ppc_n_lost_interrupts; - -#ifdef CONFIG_PPC_MERGE - -/* This number is used when no interrupt has been assigned */ -#define NO_IRQ (0) - -/* This is a special irq number to return from get_irq() to tell that - * no interrupt happened _and_ ignore it (don't count it as bad). Some - * platforms like iSeries rely on that. - */ -#define NO_IRQ_IGNORE ((unsigned int)-1) - -/* Total number of virq in the platform (make it a CONFIG_* option ? */ -#define NR_IRQS 512 - -/* Number of irqs reserved for the legacy controller */ -#define NUM_ISA_INTERRUPTS 16 - -/* This type is the placeholder for a hardware interrupt number. It has to - * be big enough to enclose whatever representation is used by a given - * platform. - */ -typedef unsigned long irq_hw_number_t; - -/* Interrupt controller "host" data structure. This could be defined as a - * irq domain controller. That is, it handles the mapping between hardware - * and virtual interrupt numbers for a given interrupt domain. The host - * structure is generally created by the PIC code for a given PIC instance - * (though a host can cover more than one PIC if they have a flat number - * model). It's the host callbacks that are responsible for setting the - * irq_chip on a given irq_desc after it's been mapped. - * - * The host code and data structures are fairly agnostic to the fact that - * we use an open firmware device-tree. We do have references to struct - * device_node in two places: in irq_find_host() to find the host matching - * a given interrupt controller node, and of course as an argument to its - * counterpart host->ops->match() callback. However, those are treated as - * generic pointers by the core and the fact that it's actually a device-node - * pointer is purely a convention between callers and implementation. This - * code could thus be used on other architectures by replacing those two - * by some sort of arch-specific void * "token" used to identify interrupt - * controllers. - */ -struct irq_host; -struct radix_tree_root; - -/* Functions below are provided by the host and called whenever a new mapping - * is created or an old mapping is disposed. The host can then proceed to - * whatever internal data structures management is required. It also needs - * to setup the irq_desc when returning from map(). - */ -struct irq_host_ops { - /* Match an interrupt controller device node to a host, returns - * 1 on a match - */ - int (*match)(struct irq_host *h, struct device_node *node); - - /* Create or update a mapping between a virtual irq number and a hw - * irq number. This is called only once for a given mapping. - */ - int (*map)(struct irq_host *h, unsigned int virq, irq_hw_number_t hw); - - /* Dispose of such a mapping */ - void (*unmap)(struct irq_host *h, unsigned int virq); - - /* Translate device-tree interrupt specifier from raw format coming - * from the firmware to a irq_hw_number_t (interrupt line number) and - * type (sense) that can be passed to set_irq_type(). In the absence - * of this callback, irq_create_of_mapping() and irq_of_parse_and_map() - * will return the hw number in the first cell and IRQ_TYPE_NONE for - * the type (which amount to keeping whatever default value the - * interrupt controller has for that line) - */ - int (*xlate)(struct irq_host *h, struct device_node *ctrler, - u32 *intspec, unsigned int intsize, - irq_hw_number_t *out_hwirq, unsigned int *out_type); -}; - -struct irq_host { - struct list_head link; - - /* type of reverse mapping technique */ - unsigned int revmap_type; -#define IRQ_HOST_MAP_LEGACY 0 /* legacy 8259, gets irqs 1..15 */ -#define IRQ_HOST_MAP_NOMAP 1 /* no fast reverse mapping */ -#define IRQ_HOST_MAP_LINEAR 2 /* linear map of interrupts */ -#define IRQ_HOST_MAP_TREE 3 /* radix tree */ - union { - struct { - unsigned int size; - unsigned int *revmap; - } linear; - struct radix_tree_root tree; - } revmap_data; - struct irq_host_ops *ops; - void *host_data; - irq_hw_number_t inval_irq; -}; - -/* The main irq map itself is an array of NR_IRQ entries containing the - * associate host and irq number. An entry with a host of NULL is free. - * An entry can be allocated if it's free, the allocator always then sets - * hwirq first to the host's invalid irq number and then fills ops. - */ -struct irq_map_entry { - irq_hw_number_t hwirq; - struct irq_host *host; -}; - -extern struct irq_map_entry irq_map[NR_IRQS]; - - -/*** - * irq_alloc_host - Allocate a new irq_host data structure - * @node: device-tree node of the interrupt controller - * @revmap_type: type of reverse mapping to use - * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map - * @ops: map/unmap host callbacks - * @inval_irq: provide a hw number in that host space that is always invalid - * - * Allocates and initialize and irq_host structure. Note that in the case of - * IRQ_HOST_MAP_LEGACY, the map() callback will be called before this returns - * for all legacy interrupts except 0 (which is always the invalid irq for - * a legacy controller). For a IRQ_HOST_MAP_LINEAR, the map is allocated by - * this call as well. For a IRQ_HOST_MAP_TREE, the radix tree will be allocated - * later during boot automatically (the reverse mapping will use the slow path - * until that happens). - */ -extern struct irq_host *irq_alloc_host(unsigned int revmap_type, - unsigned int revmap_arg, - struct irq_host_ops *ops, - irq_hw_number_t inval_irq); - - -/*** - * irq_find_host - Locates a host for a given device node - * @node: device-tree node of the interrupt controller - */ -extern struct irq_host *irq_find_host(struct device_node *node); - - -/*** - * irq_set_default_host - Set a "default" host - * @host: default host pointer - * - * For convenience, it's possible to set a "default" host that will be used - * whenever NULL is passed to irq_create_mapping(). It makes life easier for - * platforms that want to manipulate a few hard coded interrupt numbers that - * aren't properly represented in the device-tree. - */ -extern void irq_set_default_host(struct irq_host *host); - - -/*** - * irq_set_virq_count - Set the maximum number of virt irqs - * @count: number of linux virtual irqs, capped with NR_IRQS - * - * This is mainly for use by platforms like iSeries who want to program - * the virtual irq number in the controller to avoid the reverse mapping - */ -extern void irq_set_virq_count(unsigned int count); - - -/*** - * irq_create_mapping - Map a hardware interrupt into linux virq space - * @host: host owning this hardware interrupt or NULL for default host - * @hwirq: hardware irq number in that host space - * - * Only one mapping per hardware interrupt is permitted. Returns a linux - * virq number. - * If the sense/trigger is to be specified, set_irq_type() should be called - * on the number returned from that call. - */ -extern unsigned int irq_create_mapping(struct irq_host *host, - irq_hw_number_t hwirq); - - -/*** - * irq_dispose_mapping - Unmap an interrupt - * @virq: linux virq number of the interrupt to unmap - */ -extern void irq_dispose_mapping(unsigned int virq); - -/*** - * irq_find_mapping - Find a linux virq from an hw irq number. - * @host: host owning this hardware interrupt - * @hwirq: hardware irq number in that host space - * - * This is a slow path, for use by generic code. It's expected that an - * irq controller implementation directly calls the appropriate low level - * mapping function. +/* + * These constants are used for passing information about interrupt + * signal polarity and level/edge sensing to the low-level PIC chip + * drivers. */ -extern unsigned int irq_find_mapping(struct irq_host *host, - irq_hw_number_t hwirq); - +#define IRQ_SENSE_MASK 0x1 +#define IRQ_SENSE_LEVEL 0x1 /* interrupt on active level */ +#define IRQ_SENSE_EDGE 0x0 /* interrupt triggered by edge */ -/*** - * irq_radix_revmap - Find a linux virq from a hw irq number. - * @host: host owning this hardware interrupt - * @hwirq: hardware irq number in that host space - * - * This is a fast path, for use by irq controller code that uses radix tree - * revmaps - */ -extern unsigned int irq_radix_revmap(struct irq_host *host, - irq_hw_number_t hwirq); +#define IRQ_POLARITY_MASK 0x2 +#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ +#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ -/*** - * irq_linear_revmap - Find a linux virq from a hw irq number. - * @host: host owning this hardware interrupt - * @hwirq: hardware irq number in that host space - * - * This is a fast path, for use by irq controller code that uses linear - * revmaps. It does fallback to the slow path if the revmap doesn't exist - * yet and will create the revmap entry with appropriate locking +/* + * IRQ line status macro IRQ_PER_CPU is used */ +#define ARCH_HAS_IRQ_PER_CPU -extern unsigned int irq_linear_revmap(struct irq_host *host, - irq_hw_number_t hwirq); +#define get_irq_desc(irq) (&irq_desc[(irq)]) +/* Define a way to iterate across irqs. */ +#define for_each_irq(i) \ + for ((i) = 0; (i) < NR_IRQS; ++(i)) +#ifdef CONFIG_PPC64 -/*** - * irq_alloc_virt - Allocate virtual irq numbers - * @host: host owning these new virtual irqs - * @count: number of consecutive numbers to allocate - * @hint: pass a hint number, the allocator will try to use a 1:1 mapping - * - * This is a low level function that is used internally by irq_create_mapping() - * and that can be used by some irq controllers implementations for things - * like allocating ranges of numbers for MSIs. The revmaps are left untouched. - */ -extern unsigned int irq_alloc_virt(struct irq_host *host, - unsigned int count, - unsigned int hint); - -/*** - * irq_free_virt - Free virtual irq numbers - * @virq: virtual irq number of the first interrupt to free - * @count: number of interrupts to free - * - * This function is the opposite of irq_alloc_virt. It will not clear reverse - * maps, this should be done previously by unmap'ing the interrupt. In fact, - * all interrupts covered by the range being freed should have been unmapped - * prior to calling this. +/* + * Maximum number of interrupt sources that we can handle. */ -extern void irq_free_virt(unsigned int virq, unsigned int count); - - -/* -- OF helpers -- */ +#define NR_IRQS 512 -/* irq_create_of_mapping - Map a hardware interrupt into linux virq space - * @controller: Device node of the interrupt controller - * @inspec: Interrupt specifier from the device-tree - * @intsize: Size of the interrupt specifier from the device-tree - * - * This function is identical to irq_create_mapping except that it takes - * as input informations straight from the device-tree (typically the results - * of the of_irq_map_*() functions. +/* Interrupt numbers are virtual in case they are sparsely + * distributed by the hardware. */ -extern unsigned int irq_create_of_mapping(struct device_node *controller, - u32 *intspec, unsigned int intsize); +extern unsigned int virt_irq_to_real_map[NR_IRQS]; - -/* irq_of_parse_and_map - Parse nad Map an interrupt into linux virq space - * @device: Device node of the device whose interrupt is to be mapped - * @index: Index of the interrupt to map - * - * This function is a wrapper that chains of_irq_map_one() and - * irq_create_of_mapping() to make things easier to callers +/* The maximum virtual IRQ number that we support. This + * can be set by the platform and will be reduced by the + * value of __irq_offset_value. It defaults to and is + * capped by (NR_IRQS - 1). */ -extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index); - -/* -- End OF helpers -- */ +extern unsigned int virt_irq_max; -/*** - * irq_early_init - Init irq remapping subsystem +/* Create a mapping for a real_irq if it doesn't already exist. + * Return the virtual irq as a convenience. */ -extern void irq_early_init(void); +int virt_irq_create_mapping(unsigned int real_irq); +void virt_irq_init(void); -static __inline__ int irq_canonicalize(int irq) +static inline unsigned int virt_irq_to_real(unsigned int virt_irq) { - return irq; + return virt_irq_to_real_map[virt_irq]; } - -#else /* CONFIG_PPC_MERGE */ - -/* This number is used when no interrupt has been assigned */ -#define NO_IRQ (-1) -#define NO_IRQ_IGNORE (-2) - +extern unsigned int real_irq_to_virt_slowpath(unsigned int real_irq); /* - * These constants are used for passing information about interrupt - * signal polarity and level/edge sensing to the low-level PIC chip - * drivers. + * List of interrupt controllers. */ -#define IRQ_SENSE_MASK 0x1 -#define IRQ_SENSE_LEVEL 0x1 /* interrupt on active level */ -#define IRQ_SENSE_EDGE 0x0 /* interrupt triggered by edge */ +#define IC_INVALID 0 +#define IC_OPEN_PIC 1 +#define IC_PPC_XIC 2 +#define IC_CELL_PIC 3 +#define IC_ISERIES 4 -#define IRQ_POLARITY_MASK 0x2 -#define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ -#define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ +extern u64 ppc64_interrupt_controller; +#else /* 32-bit */ #if defined(CONFIG_40x) #include @@ -592,92 +348,6 @@ static __inline__ int irq_canonicalize(int irq) #define SIU_INT_PC1 ((uint)0x3e+CPM_IRQ_OFFSET) #define SIU_INT_PC0 ((uint)0x3f+CPM_IRQ_OFFSET) -#elif defined(CONFIG_PPC_86xx) -#include - -#define NR_EPIC_INTS 48 -#ifndef NR_8259_INTS -#define NR_8259_INTS 16 /*ULI 1575 can route 12 interrupts */ -#endif -#define NUM_8259_INTERRUPTS NR_8259_INTS - -#ifndef I8259_OFFSET -#define I8259_OFFSET 0 -#endif - -#define NR_IRQS 256 - -/* Internal IRQs on MPC86xx OpenPIC */ - -#ifndef MPC86xx_OPENPIC_IRQ_OFFSET -#define MPC86xx_OPENPIC_IRQ_OFFSET NR_8259_INTS -#endif - -/* The 48 internal sources */ -#define MPC86xx_IRQ_NULL ( 0 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_MCM ( 1 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DDR ( 2 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_LBC ( 3 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA0 ( 4 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA1 ( 5 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA2 ( 6 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_DMA3 ( 7 + MPC86xx_OPENPIC_IRQ_OFFSET) - -/* no 10,11 */ -#define MPC86xx_IRQ_UART2 (12 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_TX (13 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_RX (14 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_TX (15 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_RX (16 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC3_ERROR (17 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC1_ERROR (18 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_TX (19 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_RX (20 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_TX (21 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_RX (22 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC4_ERROR (23 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_TSEC2_ERROR (24 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 25 */ -#define MPC86xx_IRQ_UART1 (26 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_IIC (27 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_PERFMON (28 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 29,30,31 */ -#define MPC86xx_IRQ_SRIO_ERROR (32 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_OUT_BELL (33 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_BELL (34 + MPC86xx_OPENPIC_IRQ_OFFSET) -/* no 35,36 */ -#define MPC86xx_IRQ_SRIO_OUT_MSG1 (37 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_MSG1 (38 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_OUT_MSG2 (39 + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_SRIO_IN_MSG2 (40 + MPC86xx_OPENPIC_IRQ_OFFSET) - -/* The 12 external interrupt lines */ -#define MPC86xx_IRQ_EXT_BASE 48 -#define MPC86xx_IRQ_EXT0 (0 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT1 (1 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT2 (2 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT3 (3 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT4 (4 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT5 (5 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT6 (6 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT7 (7 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT8 (8 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT9 (9 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT10 (10 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) -#define MPC86xx_IRQ_EXT11 (11 + MPC86xx_IRQ_EXT_BASE \ - + MPC86xx_OPENPIC_IRQ_OFFSET) - #else /* CONFIG_40x + CONFIG_8xx */ /* * this is the # irq's for all ppc arch's (pmac/chrp/prep) @@ -762,11 +432,16 @@ static __inline__ int irq_canonicalize(int irq) #endif /* CONFIG_8260 */ -#endif /* Whatever way too big #ifdef */ +#endif #define NR_MASK_WORDS ((NR_IRQS + 31) / 32) /* pedantic: these are long because they are used with set_bit --RR */ extern unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; +extern atomic_t ppc_n_lost_interrupts; + +#define virt_irq_create_mapping(x) (x) + +#endif /* * Because many systems have two overlapping names spaces for @@ -805,7 +480,6 @@ static __inline__ int irq_canonicalize(int irq) irq = 9; return irq; } -#endif /* CONFIG_PPC_MERGE */ extern int distribute_irqs; @@ -825,8 +499,9 @@ extern struct thread_info *softirq_ctx[NR_CPUS]; extern void irq_ctx_init(void); extern void call_do_softirq(struct thread_info *tp); -extern int call_handle_irq(int irq, void *p1, void *p2, - struct thread_info *tp, void *func); +extern int call___do_IRQ(int irq, struct pt_regs *regs, + struct thread_info *tp); + #else #define irq_ctx_init() diff --git a/include/asm-powerpc/irqflags.h b/include/asm-powerpc/irqflags.h deleted file mode 100644 index 7970cbaea..000000000 --- a/include/asm-powerpc/irqflags.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * include/asm-powerpc/irqflags.h - * - * IRQ flags handling - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() macros from the lowlevel headers. - */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -/* - * Get definitions for raw_local_save_flags(x), etc. - */ -#include - -/* - * Do the CPU's IRQ-state tracing from assembly code. We call a - * C function, so save all the C-clobbered registers: - */ -#ifdef CONFIG_TRACE_IRQFLAGS - -#error No support on PowerPC yet for CONFIG_TRACE_IRQFLAGS - -#else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF -#endif - -#endif diff --git a/include/asm-powerpc/iseries/iseries_io.h b/include/asm-powerpc/iseries/iseries_io.h index f29009bd6..496aa852b 100644 --- a/include/asm-powerpc/iseries/iseries_io.h +++ b/include/asm-powerpc/iseries/iseries_io.h @@ -1,6 +1,7 @@ #ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H #define _ASM_POWERPC_ISERIES_ISERIES_IO_H +#include #ifdef CONFIG_PPC_ISERIES #include diff --git a/include/asm-powerpc/iseries/it_lp_queue.h b/include/asm-powerpc/iseries/it_lp_queue.h index 284c5a7db..b7c6fc12c 100644 --- a/include/asm-powerpc/iseries/it_lp_queue.h +++ b/include/asm-powerpc/iseries/it_lp_queue.h @@ -29,20 +29,20 @@ struct HvLpEvent; -#define IT_LP_MAX_QUEUES 8 +#define ITMaxLpQueues 8 -#define IT_LP_NOT_USED 0 /* Queue will not be used by PLIC */ -#define IT_LP_DEDICATED_IO 1 /* Queue dedicated to IO processor specified */ -#define IT_LP_DEDICATED_LP 2 /* Queue dedicated to LP specified */ -#define IT_LP_SHARED 3 /* Queue shared for both IO and LP */ +#define NotUsed 0 // Queue will not be used by PLIC +#define DedicatedIo 1 // Queue dedicated to IO processor specified +#define DedicatedLp 2 // Queue dedicated to LP specified +#define Shared 3 // Queue shared for both IO and LP -#define IT_LP_EVENT_STACK_SIZE 4096 -#define IT_LP_EVENT_MAX_SIZE 256 -#define IT_LP_EVENT_ALIGN 64 +#define LpEventStackSize 4096 +#define LpEventMaxSize 256 +#define LpEventAlign 64 struct hvlpevent_queue { /* - * The hq_current_event is the pointer to the next event stack entry + * The xSlicCurEventPtr is the pointer to the next event stack entry * that will become valid. The OS must peek at this entry to determine * if it is valid. PLIC will set the valid indicator as the very last * store into that entry. @@ -52,23 +52,23 @@ struct hvlpevent_queue { * location again. * * If the event stack fills and there are overflow events, then PLIC - * will set the hq_overflow_pending flag in which case the OS will + * will set the xPlicOverflowIntPending flag in which case the OS will * have to fetch the additional LP events once they have drained the * event stack. * * The first 16-bytes are known by both the OS and PLIC. The remainder * of the cache line is for use by the OS. */ - u8 hq_overflow_pending; /* 0x00 Overflow events are pending */ - u8 hq_status; /* 0x01 DedicatedIo or DedicatedLp or NotUsed */ - u16 hq_proc_index; /* 0x02 Logical Proc Index for correlation */ - u8 hq_reserved1[12]; /* 0x04 */ - char *hq_current_event; /* 0x10 */ - char *hq_last_event; /* 0x18 */ - char *hq_event_stack; /* 0x20 */ - u8 hq_index; /* 0x28 unique sequential index. */ - u8 hq_reserved2[3]; /* 0x29-2b */ - spinlock_t hq_lock; + u8 xPlicOverflowIntPending;// 0x00 Overflow events are pending + u8 xPlicStatus; // 0x01 DedicatedIo or DedicatedLp or NotUsed + u16 xSlicLogicalProcIndex; // 0x02 Logical Proc Index for correlation + u8 xPlicRsvd[12]; // 0x04 + char *xSlicCurEventPtr; // 0x10 + char *xSlicLastValidEventPtr; // 0x18 + char *xSlicEventStackPtr; // 0x20 + u8 xIndex; // 0x28 unique sequential index. + u8 xSlicRsvd[3]; // 0x29-2b + spinlock_t lock; }; extern struct hvlpevent_queue hvlpevent_queue; diff --git a/include/asm-powerpc/kdebug.h b/include/asm-powerpc/kdebug.h index 532bfee93..c01786ab5 100644 --- a/include/asm-powerpc/kdebug.h +++ b/include/asm-powerpc/kdebug.h @@ -18,8 +18,6 @@ struct die_args { extern int register_die_notifier(struct notifier_block *); extern int unregister_die_notifier(struct notifier_block *); -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); extern struct atomic_notifier_head powerpc_die_chain; /* Grossly misnamed. */ diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h index 10e8eb1e6..a87aed00d 100644 --- a/include/asm-powerpc/kdump.h +++ b/include/asm-powerpc/kdump.h @@ -1,40 +1,13 @@ #ifndef _PPC64_KDUMP_H #define _PPC64_KDUMP_H -/* Kdump kernel runs at 32 MB, change at your peril. */ -#define KDUMP_KERNELBASE 0x2000000 - /* How many bytes to reserve at zero for kdump. The reserve limit should - * be greater or equal to the trampoline's end address. - * Reserve to the end of the FWNMI area, see head_64.S */ -#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */ - -#ifdef CONFIG_CRASH_DUMP + * be greater or equal to the trampoline's end address. */ +#define KDUMP_RESERVE_LIMIT 0x8000 -#define PHYSICAL_START KDUMP_KERNELBASE #define KDUMP_TRAMPOLINE_START 0x0100 #define KDUMP_TRAMPOLINE_END 0x3000 -#define KDUMP_MIN_TCE_ENTRIES 2048 - -#else /* !CONFIG_CRASH_DUMP */ - -#define PHYSICAL_START 0x0 - -#endif /* CONFIG_CRASH_DUMP */ - -#ifndef __ASSEMBLY__ -#ifdef CONFIG_CRASH_DUMP - -extern void reserve_kdump_trampoline(void); -extern void setup_kdump_trampoline(void); - -#else /* !CONFIG_CRASH_DUMP */ - -static inline void reserve_kdump_trampoline(void) { ; } -static inline void setup_kdump_trampoline(void) { ; } - -#endif /* CONFIG_CRASH_DUMP */ -#endif /* __ASSEMBLY__ */ +extern void kdump_setup(void); #endif /* __PPC64_KDUMP_H */ diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 11cbdf81f..6a2af2f68 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h @@ -31,11 +31,9 @@ #define KEXEC_ARCH KEXEC_ARCH_PPC #endif -#ifndef __ASSEMBLY__ -#include - #ifdef CONFIG_KEXEC +#ifndef __ASSEMBLY__ #ifdef __powerpc64__ /* * This function is responsible for capturing register states if coming @@ -110,15 +108,13 @@ static inline void crash_setup_regs(struct pt_regs *newregs, #define MAX_NOTE_BYTES 1024 +#ifdef __powerpc64__ extern void kexec_smp_wait(void); /* get and clear naca physid, wait for master to copy new code to 0 */ +extern void __init kexec_setup(void); extern int crashing_cpu; extern void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)); -extern cpumask_t cpus_in_sr; -static inline int kexec_sr_activated(int cpu) -{ - return cpu_isset(cpu,cpus_in_sr); -} +#endif /* __powerpc64 __ */ struct kimage; struct pt_regs; @@ -127,22 +123,8 @@ extern int default_machine_kexec_prepare(struct kimage *image); extern void default_machine_crash_shutdown(struct pt_regs *regs); extern void machine_kexec_simple(struct kimage *image); -extern void crash_kexec_secondary(struct pt_regs *regs); -extern int overlaps_crashkernel(unsigned long start, unsigned long size); -extern void reserve_crashkernel(void); - -#else /* !CONFIG_KEXEC */ -static inline int kexec_sr_activated(int cpu) { return 0; } -static inline void crash_kexec_secondary(struct pt_regs *regs) { } -static inline int overlaps_crashkernel(unsigned long start, unsigned long size) -{ - return 0; -} - -static inline void reserve_crashkernel(void) { ; } - -#endif /* CONFIG_KEXEC */ #endif /* ! __ASSEMBLY__ */ +#endif /* CONFIG_KEXEC */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_KEXEC_H */ diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 34e1f89a5..f466bc804 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h @@ -50,9 +50,6 @@ typedef unsigned int kprobe_opcode_t; IS_TWI(instr) || IS_TDI(instr)) #define ARCH_SUPPORTS_KRETPROBES -#define ARCH_INACTIVE_KPROBE_COUNT 1 -#define flush_insn_slot(p) do { } while (0) - void kretprobe_trampoline(void); extern void arch_remove_kprobe(struct kprobe *p); diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index c17c13742..0f9254c18 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -81,8 +82,6 @@ struct machdep_calls { void (*tce_free)(struct iommu_table *tbl, long index, long npages); - unsigned long (*tce_get)(struct iommu_table *tbl, - long index); void (*tce_flush)(struct iommu_table *tbl); void (*iommu_dev_setup)(struct pci_dev *dev); void (*iommu_bus_setup)(struct pci_bus *bus); @@ -97,7 +96,7 @@ struct machdep_calls { void (*show_percpuinfo)(struct seq_file *m, int i); void (*init_IRQ)(void); - unsigned int (*get_irq)(struct pt_regs *); + int (*get_irq)(struct pt_regs *); #ifdef CONFIG_KEXEC void (*kexec_cpu_down)(int crash_shutdown, int secondary); #endif @@ -239,11 +238,6 @@ struct machdep_calls { */ void (*machine_kexec)(struct kimage *image); #endif /* CONFIG_KEXEC */ - -#ifdef CONFIG_PCI_MSI - int (*enable_msi)(struct pci_dev *pdev); - void (*disable_msi)(struct pci_dev *pdev); -#endif /* CONFIG_PCI_MSI */ }; extern void power4_idle(void); diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index c3fc7a28e..31f721994 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h @@ -96,8 +96,6 @@ extern char initial_stab[]; #define HPTE_R_FLAGS ASM_CONST(0x00000000000003ff) #define HPTE_R_PP ASM_CONST(0x0000000000000003) #define HPTE_R_N ASM_CONST(0x0000000000000004) -#define HPTE_R_C ASM_CONST(0x0000000000000080) -#define HPTE_R_R ASM_CONST(0x0000000000000100) /* Values for PP (assumes Ks=0, Kp=1) */ /* pp0 will always be 0 for linux */ @@ -165,16 +163,6 @@ struct mmu_psize_def extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; extern int mmu_linear_psize; extern int mmu_virtual_psize; -extern int mmu_vmalloc_psize; -extern int mmu_io_psize; - -/* - * If the processor supports 64k normal pages but not 64k cache - * inhibited pages, we have to be prepared to switch processes - * to use 4k pages when they create cache-inhibited mappings. - * If this is the case, mmu_ci_restrictions will be set to 1. - */ -extern int mmu_ci_restrictions; #ifdef CONFIG_HUGETLB_PAGE /* @@ -238,6 +226,7 @@ extern int hash_huge_page(struct mm_struct *mm, unsigned long access, unsigned long ea, unsigned long vsid, int local, unsigned long trap); +extern void htab_finish_init(void); extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, unsigned long pstart, unsigned long mode, int psize); @@ -265,7 +254,6 @@ extern long iSeries_hpte_insert(unsigned long hpte_group, extern void stabs_alloc(void); extern void slb_initialize(void); -extern void slb_flush_and_rebolt(void); extern void stab_initialize(unsigned long stab); #endif /* __ASSEMBLY__ */ @@ -369,12 +357,9 @@ typedef unsigned long mm_context_id_t; typedef struct { mm_context_id_t id; - u16 user_psize; /* page size index */ - u16 sllp; /* SLB entry page size encoding */ #ifdef CONFIG_HUGETLB_PAGE u16 low_htlb_areas, high_htlb_areas; #endif - unsigned long vdso_base; } mm_context_t; diff --git a/include/asm-powerpc/mmu_context.h b/include/asm-powerpc/mmu_context.h index 083ac917b..1b8a25fd4 100644 --- a/include/asm-powerpc/mmu_context.h +++ b/include/asm-powerpc/mmu_context.h @@ -20,18 +20,20 @@ * 2 of the License, or (at your option) any later version. */ +/* + * Getting into a kernel thread, there is no valid user segment, mark + * paca->pgdir NULL so that SLB miss on user addresses will fault + */ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { +#ifdef CONFIG_PPC_64K_PAGES + get_paca()->pgdir = NULL; +#endif /* CONFIG_PPC_64K_PAGES */ } -/* - * The proto-VSID space has 2^35 - 1 segments available for user mappings. - * Each segment contains 2^28 bytes. Each context maps 2^44 bytes, - * so we can support 2^19-1 contexts (19 == 35 + 28 - 44). - */ #define NO_CONTEXT 0 -#define MAX_CONTEXT ((1UL << 19) - 1) +#define MAX_CONTEXT (0x100000-1) extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); extern void destroy_context(struct mm_struct *mm); @@ -50,8 +52,13 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, cpu_set(smp_processor_id(), next->cpu_vm_mask); /* No need to flush userspace segments if the mm doesnt change */ +#ifdef CONFIG_PPC_64K_PAGES + if (prev == next && get_paca()->pgdir == next->pgd) + return; +#else if (prev == next) return; +#endif /* CONFIG_PPC_64K_PAGES */ #ifdef CONFIG_ALTIVEC if (cpu_has_feature(CPU_FTR_ALTIVEC)) diff --git a/include/asm-powerpc/mmzone.h b/include/asm-powerpc/mmzone.h index d484ca94c..88d70bae7 100644 --- a/include/asm-powerpc/mmzone.h +++ b/include/asm-powerpc/mmzone.h @@ -8,6 +8,7 @@ #define _ASM_MMZONE_H_ #ifdef __KERNEL__ +#include /* * generic non-linear memory support: diff --git a/include/asm-powerpc/mpc86xx.h b/include/asm-powerpc/mpc86xx.h deleted file mode 100644 index b85df45b1..000000000 --- a/include/asm-powerpc/mpc86xx.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MPC86xx definitions - * - * Author: Jeff Brown - * - * Copyright 2004 Freescale Semiconductor, 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. - */ - -#ifdef __KERNEL__ -#ifndef __ASM_POWERPC_MPC86xx_H__ -#define __ASM_POWERPC_MPC86xx_H__ - -#include - -#ifdef CONFIG_PPC_86xx - -#define _IO_BASE isa_io_base -#define _ISA_MEM_BASE isa_mem_base -#ifdef CONFIG_PCI -#define PCI_DRAM_OFFSET pci_dram_offset -#endif - -#define CPU0_BOOT_RELEASE 0x01000000 -#define CPU1_BOOT_RELEASE 0x02000000 -#define CPU_ALL_RELEASED (CPU0_BOOT_RELEASE | CPU1_BOOT_RELEASE) -#define MCM_PORT_CONFIG_OFFSET 0x1010 - -/* Offset from CCSRBAR */ -#define MPC86xx_MCM_OFFSET (0x00000) -#define MPC86xx_MCM_SIZE (0x02000) - -#endif /* CONFIG_PPC_86xx */ -#endif /* __ASM_POWERPC_MPC86xx_H__ */ -#endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index a9f9604b9..6b9e78142 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h @@ -22,10 +22,6 @@ #define MPIC_GREG_GCONF_8259_PTHROU_DIS 0x20000000 #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff #define MPIC_GREG_GLOBAL_CONF_1 0x00030 -#define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000 -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000 -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r) \ - (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) #define MPIC_GREG_VENDOR_0 0x00040 #define MPIC_GREG_VENDOR_1 0x00050 #define MPIC_GREG_VENDOR_2 0x00060 @@ -41,7 +37,6 @@ #define MPIC_GREG_IPI_VECTOR_PRI_1 0x000b0 #define MPIC_GREG_IPI_VECTOR_PRI_2 0x000c0 #define MPIC_GREG_IPI_VECTOR_PRI_3 0x000d0 -#define MPIC_GREG_IPI_STRIDE 0x10 #define MPIC_GREG_SPURIOUS 0x000e0 #define MPIC_GREG_TIMER_FREQ 0x000f0 @@ -69,7 +64,6 @@ #define MPIC_CPU_IPI_DISPATCH_1 0x00050 #define MPIC_CPU_IPI_DISPATCH_2 0x00060 #define MPIC_CPU_IPI_DISPATCH_3 0x00070 -#define MPIC_CPU_IPI_DISPATCH_STRIDE 0x00010 #define MPIC_CPU_CURRENT_TASK_PRI 0x00080 #define MPIC_CPU_TASKPRI_MASK 0x0000000f #define MPIC_CPU_WHOAMI 0x00090 @@ -116,102 +110,8 @@ #define MPIC_VEC_TIMER_1 248 #define MPIC_VEC_TIMER_0 247 -/* - * Tsi108 implementation of MPIC has many differences from the original one - */ - -/* - * Global registers - */ - -#define TSI108_GREG_BASE 0x00000 -#define TSI108_GREG_FEATURE_0 0x00000 -#define TSI108_GREG_GLOBAL_CONF_0 0x00004 -#define TSI108_GREG_VENDOR_ID 0x0000c -#define TSI108_GREG_IPI_VECTOR_PRI_0 0x00204 /* Doorbell 0 */ -#define TSI108_GREG_IPI_STRIDE 0x0c -#define TSI108_GREG_SPURIOUS 0x00010 -#define TSI108_GREG_TIMER_FREQ 0x00014 - -/* - * Timer registers - */ -#define TSI108_TIMER_BASE 0x0030 -#define TSI108_TIMER_STRIDE 0x10 -#define TSI108_TIMER_CURRENT_CNT 0x00000 -#define TSI108_TIMER_BASE_CNT 0x00004 -#define TSI108_TIMER_VECTOR_PRI 0x00008 -#define TSI108_TIMER_DESTINATION 0x0000c - -/* - * Per-Processor registers - */ -#define TSI108_CPU_BASE 0x00300 -#define TSI108_CPU_STRIDE 0x00040 -#define TSI108_CPU_IPI_DISPATCH_0 0x00200 -#define TSI108_CPU_IPI_DISPATCH_STRIDE 0x00000 -#define TSI108_CPU_CURRENT_TASK_PRI 0x00000 -#define TSI108_CPU_WHOAMI 0xffffffff -#define TSI108_CPU_INTACK 0x00004 -#define TSI108_CPU_EOI 0x00008 - -/* - * Per-source registers - */ -#define TSI108_IRQ_BASE 0x00100 -#define TSI108_IRQ_STRIDE 0x00008 -#define TSI108_IRQ_VECTOR_PRI 0x00000 -#define TSI108_VECPRI_VECTOR_MASK 0x000000ff -#define TSI108_VECPRI_POLARITY_POSITIVE 0x01000000 -#define TSI108_VECPRI_POLARITY_NEGATIVE 0x00000000 -#define TSI108_VECPRI_SENSE_LEVEL 0x02000000 -#define TSI108_VECPRI_SENSE_EDGE 0x00000000 -#define TSI108_VECPRI_POLARITY_MASK 0x01000000 -#define TSI108_VECPRI_SENSE_MASK 0x02000000 -#define TSI108_IRQ_DESTINATION 0x00004 - -/* weird mpic register indices and mask bits in the HW info array */ -enum { - MPIC_IDX_GREG_BASE = 0, - MPIC_IDX_GREG_FEATURE_0, - MPIC_IDX_GREG_GLOBAL_CONF_0, - MPIC_IDX_GREG_VENDOR_ID, - MPIC_IDX_GREG_IPI_VECTOR_PRI_0, - MPIC_IDX_GREG_IPI_STRIDE, - MPIC_IDX_GREG_SPURIOUS, - MPIC_IDX_GREG_TIMER_FREQ, - - MPIC_IDX_TIMER_BASE, - MPIC_IDX_TIMER_STRIDE, - MPIC_IDX_TIMER_CURRENT_CNT, - MPIC_IDX_TIMER_BASE_CNT, - MPIC_IDX_TIMER_VECTOR_PRI, - MPIC_IDX_TIMER_DESTINATION, - - MPIC_IDX_CPU_BASE, - MPIC_IDX_CPU_STRIDE, - MPIC_IDX_CPU_IPI_DISPATCH_0, - MPIC_IDX_CPU_IPI_DISPATCH_STRIDE, - MPIC_IDX_CPU_CURRENT_TASK_PRI, - MPIC_IDX_CPU_WHOAMI, - MPIC_IDX_CPU_INTACK, - MPIC_IDX_CPU_EOI, - - MPIC_IDX_IRQ_BASE, - MPIC_IDX_IRQ_STRIDE, - MPIC_IDX_IRQ_VECTOR_PRI, - - MPIC_IDX_VECPRI_VECTOR_MASK, - MPIC_IDX_VECPRI_POLARITY_POSITIVE, - MPIC_IDX_VECPRI_POLARITY_NEGATIVE, - MPIC_IDX_VECPRI_SENSE_LEVEL, - MPIC_IDX_VECPRI_SENSE_EDGE, - MPIC_IDX_VECPRI_POLARITY_MASK, - MPIC_IDX_VECPRI_SENSE_MASK, - MPIC_IDX_IRQ_DESTINATION, - MPIC_IDX_END -}; - +/* Type definition of the cascade handler */ +typedef int (*mpic_cascade_t)(struct pt_regs *regs, void *data); #ifdef CONFIG_MPIC_BROKEN_U3 /* Fixup table entry */ @@ -228,19 +128,10 @@ struct mpic_irq_fixup /* The instance data of a given MPIC */ struct mpic { - /* The device node of the interrupt controller */ - struct device_node *of_node; - - /* The remapper for this MPIC */ - struct irq_host *irqhost; - /* The "linux" controller struct */ - struct irq_chip hc_irq; -#ifdef CONFIG_MPIC_BROKEN_U3 - struct irq_chip hc_ht_irq; -#endif + hw_irq_controller hc_irq; #ifdef CONFIG_SMP - struct irq_chip hc_ipi; + hw_irq_controller hc_ipi; #endif const char *name; /* Flags */ @@ -249,12 +140,20 @@ struct mpic unsigned int isu_size; unsigned int isu_shift; unsigned int isu_mask; + /* Offset of irq vector numbers */ + unsigned int irq_offset; unsigned int irq_count; + /* Offset of ipi vector numbers */ + unsigned int ipi_offset; /* Number of sources */ unsigned int num_sources; /* Number of CPUs */ unsigned int num_cpus; - /* default senses array */ + /* cascade handler */ + mpic_cascade_t cascade; + void *cascade_data; + unsigned int cascade_vec; + /* senses array */ unsigned char *senses; unsigned int senses_count; @@ -270,29 +169,15 @@ struct mpic volatile u32 __iomem *cpuregs[MPIC_MAX_CPUS]; volatile u32 __iomem *isus[MPIC_MAX_ISU]; -#ifdef CONFIG_MPIC_WEIRD - /* Pointer to HW info array */ - u32 *hw_set; -#endif - /* link */ struct mpic *next; }; -/* - * MPIC flags (passed to mpic_alloc) - * - * The top 4 bits contain an MPIC bhw id that is used to index the - * register offsets and some masks when CONFIG_MPIC_WEIRD is set. - * Note setting any ID (leaving those bits to 0) means standard MPIC - */ - /* This is the primary controller, only that one has IPIs and * has afinity control. A non-primary MPIC always uses CPU0 * registers only */ #define MPIC_PRIMARY 0x00000001 - /* Set this for a big-endian MPIC */ #define MPIC_BIG_ENDIAN 0x00000002 /* Broken U3 MPIC */ @@ -301,18 +186,6 @@ struct mpic #define MPIC_BROKEN_IPI 0x00000008 /* MPIC wants a reset */ #define MPIC_WANTS_RESET 0x00000010 -/* Spurious vector requires EOI */ -#define MPIC_SPV_EOI 0x00000020 -/* No passthrough disable */ -#define MPIC_NO_PTHROU_DIS 0x00000040 - -/* MPIC HW modification ID */ -#define MPIC_REGSET_MASK 0xf0000000 -#define MPIC_REGSET(val) (((val) & 0xf ) << 28) -#define MPIC_GET_REGSET(flags) (((flags) >> 28) & 0xf) - -#define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */ -#define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ /* Allocate the controller structure and setup the linux irq descs * for the range if interrupts passed in. No HW initialization is @@ -336,11 +209,14 @@ struct mpic * The values in the array start at the first source of the MPIC, * that is senses[0] correspond to linux irq "irq_offset". */ -extern struct mpic *mpic_alloc(struct device_node *node, - unsigned long phys_addr, +extern struct mpic *mpic_alloc(unsigned long phys_addr, unsigned int flags, unsigned int isu_size, + unsigned int irq_offset, unsigned int irq_count, + unsigned int ipi_offset, + unsigned char *senses, + unsigned int senses_num, const char *name); /* Assign ISUs, to call before mpic_init() @@ -352,27 +228,22 @@ extern struct mpic *mpic_alloc(struct device_node *node, extern void mpic_assign_isu(struct mpic *mpic, unsigned int isu_num, unsigned long phys_addr); -/* Set default sense codes - * - * @mpic: controller - * @senses: array of sense codes - * @count: size of above array - * - * Optionally provide an array (indexed on hardware interrupt numbers - * for this MPIC) of default sense codes for the chip. Those are linux - * sense codes IRQ_TYPE_* - * - * The driver gets ownership of the pointer, don't dispose of it or - * anything like that. __init only. - */ -extern void mpic_set_default_senses(struct mpic *mpic, u8 *senses, int count); - - /* Initialize the controller. After this has been called, none of the above * should be called again for this mpic */ extern void mpic_init(struct mpic *mpic); +/* Setup a cascade. Currently, only one cascade is supported this + * way, though you can always do a normal request_irq() and add + * other cascades this way. You should call this _after_ having + * added all the ISUs + * + * @irq_no: "linux" irq number of the cascade (that is offset'ed vector) + * @handler: cascade handler function + */ +extern void mpic_setup_cascade(unsigned int irq_no, mpic_cascade_t hanlder, + void *data); + /* * All of the following functions must only be used after the * ISUs have been assigned and the controller fully initialized @@ -409,15 +280,12 @@ extern void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask); void smp_mpic_message_pass(int target, int msg); /* Fetch interrupt from a given mpic */ -extern unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); +extern int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs); /* This one gets to the primary mpic */ -extern unsigned int mpic_get_irq(struct pt_regs *regs); - -/* Set the EPIC clock ratio */ -void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio); +extern int mpic_get_irq(struct pt_regs *regs); -/* Enable/Disable EPIC serial interrupt mode */ -void mpic_set_serial_int(struct mpic *mpic, int enable); +/* global mpic for pSeries */ +extern struct mpic *pSeries_mpic; #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_MPIC_H */ diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h index c5c0b0b3c..6249a7c39 100644 --- a/include/asm-powerpc/of_device.h +++ b/include/asm-powerpc/of_device.h @@ -9,7 +9,7 @@ /* * The of_platform_bus_type is a bus type used by drivers that do not * attach to a macio or similar bus but still use OF probing - * mechanism + * mecanism */ extern struct bus_type of_platform_bus_type; diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 3d5d590bc..706325f99 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h @@ -16,6 +16,7 @@ #define _ASM_POWERPC_PACA_H #ifdef __KERNEL__ +#include #include #include #include @@ -78,9 +79,11 @@ struct paca_struct { u64 exmc[10]; /* used for machine checks */ u64 exslb[10]; /* used for SLB/segment table misses * on the linear mapping */ +#ifdef CONFIG_PPC_64K_PAGES + pgd_t *pgdir; +#endif /* CONFIG_PPC_64K_PAGES */ mm_context_t context; - u16 vmalloc_sllp; u16 slb_cache[SLB_CACHE_ENTRIES]; u16 slb_cache_ptr; @@ -93,7 +96,6 @@ struct paca_struct { u64 saved_r1; /* r1 save for RTAS calls */ u64 saved_msr; /* MSR saved here by enter_rtas */ u8 proc_enabled; /* irq soft-enable flag */ - u8 io_sync; /* writel() needs spin_unlock sync */ /* Stuff for accurate time accounting */ u64 user_time; /* accumulated usermode TB ticks */ diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index 42d17acf0..eaf081279 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h @@ -11,8 +11,8 @@ */ #ifdef __KERNEL__ +#include #include -#include /* * On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software @@ -52,6 +52,13 @@ * If you want to test if something's a kernel address, use is_kernel_addr(). */ +#ifdef CONFIG_CRASH_DUMP +/* Kdump kernel runs at 32 MB, change at your peril. */ +#define PHYSICAL_START 0x2000000 +#else +#define PHYSICAL_START 0x0 +#endif + #define PAGE_OFFSET ASM_CONST(CONFIG_KERNEL_START) #define KERNELBASE (PAGE_OFFSET + PHYSICAL_START) @@ -191,9 +198,6 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, struct page *p); extern int page_is_ram(unsigned long pfn); -struct vm_area_struct; -extern const char *arch_vma_name(struct vm_area_struct *vma); - #include #endif /* __ASSEMBLY__ */ diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 86ee46b09..38de92d41 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h @@ -22,7 +22,6 @@ struct pci_controller { struct pci_bus *bus; char is_dynamic; - int node; void *arch_data; struct list_head list_node; @@ -79,6 +78,12 @@ struct pci_dn { struct iommu_table *iommu_table; /* for phb's or bridges */ struct pci_dev *pcidev; /* back-pointer to the pci device */ struct device_node *node; /* back-pointer to the device_node */ +#ifdef CONFIG_PPC_ISERIES + struct list_head Device_List; + int Irq; /* Assigned IRQ */ + int Flags; /* Possible flags(disable/bist)*/ + u8 LogicalSlot; /* Hv Slot Index for Tces */ +#endif u32 config_space[16]; /* saved PCI config space */ }; @@ -166,12 +171,6 @@ static inline unsigned long pci_address_to_pio(phys_addr_t address) #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ -#ifdef CONFIG_NUMA -#define PHB_SET_NODE(PHB, NODE) ((PHB)->node = (NODE)) -#else -#define PHB_SET_NODE(PHB, NODE) ((PHB)->node = -1) -#endif - #endif /* CONFIG_PPC64 */ #endif /* __KERNEL__ */ #endif diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 46afd29b9..5d2c9e6c4 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h @@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, #define HAVE_ARCH_PCI_RESOURCE_TO_USER extern void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - resource_size_t *start, resource_size_t *end); + u64 *start, u64 *end); #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ #endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index 2f2e3024f..184a7a4d2 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h @@ -14,7 +14,6 @@ #define __per_cpu_offset(cpu) (paca[cpu].data_offset) #define __my_cpu_offset() get_paca()->data_offset -#define per_cpu_offset(x) (__per_cpu_offset(x)) /* Separate out the type, so (int[3], foo) works. */ #define DEFINE_PER_CPU(type, name) \ @@ -23,7 +22,6 @@ /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) /* A macro to avoid #include hell... */ #define percpu_modcopy(pcpudst, src, size) \ @@ -43,7 +41,6 @@ extern void setup_per_cpu_areas(void); #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var -#define __raw_get_cpu_var(var) per_cpu__##var #endif /* SMP */ diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index 881c14f33..af90f7a6b 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h @@ -122,7 +122,7 @@ static inline void pte_free(struct page *ptepage) pte_free_kernel(page_address(ptepage)); } -#define PGF_CACHENUM_MASK 0x3 +#define PGF_CACHENUM_MASK 0xf typedef struct pgtable_free { unsigned long val; diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index e70361556..b2e186299 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h @@ -78,8 +78,6 @@ #define pte_iterate_hashed_end() } while(0) -#define pte_pagesize_index(pte) MMU_PAGE_4K - /* * 4-level page tables related bits */ diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h index 4b7126c53..653915014 100644 --- a/include/asm-powerpc/pgtable-64k.h +++ b/include/asm-powerpc/pgtable-64k.h @@ -90,8 +90,6 @@ #define pte_iterate_hashed_end() } while(0); } } while(0) -#define pte_pagesize_index(pte) \ - (((pte) & _PAGE_COMBO)? MMU_PAGE_4K: MMU_PAGE_64K) #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index 8dbf5ad81..e9f1f4627 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h @@ -12,6 +12,7 @@ */ #ifndef __ASSEMBLY__ +#include #include #include /* For TASK_SIZE */ #include @@ -46,8 +47,8 @@ struct mm_struct; /* * Define the address range of the vmalloc VM area. */ -#define VMALLOC_START ASM_CONST(0xD000000000000000) -#define VMALLOC_SIZE ASM_CONST(0x80000000000) +#define VMALLOC_START (0xD000000000000000ul) +#define VMALLOC_SIZE (0x80000000000UL) #define VMALLOC_END (VMALLOC_START + VMALLOC_SIZE) /* @@ -412,6 +413,12 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, flush_tlb_pending(); } pte = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); + +#ifdef CONFIG_PPC_64K_PAGES + if (mmu_virtual_psize != MMU_PAGE_64K) + pte = __pte(pte_val(pte) | _PAGE_COMBO); +#endif /* CONFIG_PPC_64K_PAGES */ + *ptep = pte; } diff --git a/include/asm-powerpc/pmac_pfunc.h b/include/asm-powerpc/pmac_pfunc.h index 1330d6a58..cef61304f 100644 --- a/include/asm-powerpc/pmac_pfunc.h +++ b/include/asm-powerpc/pmac_pfunc.h @@ -205,7 +205,7 @@ extern void pmf_do_irq(struct pmf_function *func); * * The args array contains as many arguments as is required by the function, * this is dependent on the function you are calling, unfortunately Apple - * mechanism provides no way to encode that so you have to get it right at + * mecanism provides no way to encode that so you have to get it right at * the call site. Some functions require no args, in which case, you can * pass NULL. * diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index a940cfe04..dd1c0a913 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h @@ -5,6 +5,7 @@ #define _ASM_POWERPC_PPC_ASM_H #include +#include #include #ifndef __ASSEMBLY__ diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index ee810c659..2b3935ac6 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h @@ -149,11 +149,11 @@ struct thread_struct { unsigned int val; /* Floating point status */ } fpscr; int fpexc_mode; /* floating-point exception mode */ - unsigned int align_ctl; /* alignment handling control */ #ifdef CONFIG_PPC64 unsigned long start_tb; /* Start purr when proc switched in */ unsigned long accum_tb; /* Total accumilated purr for process */ #endif + unsigned long vdso_base; /* base of the vDSO library */ unsigned long dabr; /* Data address breakpoint register */ #ifdef CONFIG_ALTIVEC /* Complete AltiVec register set */ @@ -190,7 +190,7 @@ struct thread_struct { .fs = KERNEL_DS, \ .fpr = {0}, \ .fpscr = { .val = 0, }, \ - .fpexc_mode = 0, \ + .fpexc_mode = MSR_FE0|MSR_FE1, \ } #endif @@ -212,18 +212,6 @@ unsigned long get_wchan(struct task_struct *p); extern int get_fpexc_mode(struct task_struct *tsk, unsigned long adr); extern int set_fpexc_mode(struct task_struct *tsk, unsigned int val); -#define GET_ENDIAN(tsk, adr) get_endian((tsk), (adr)) -#define SET_ENDIAN(tsk, val) set_endian((tsk), (val)) - -extern int get_endian(struct task_struct *tsk, unsigned long adr); -extern int set_endian(struct task_struct *tsk, unsigned int val); - -#define GET_UNALIGN_CTL(tsk, adr) get_unalign_ctl((tsk), (adr)) -#define SET_UNALIGN_CTL(tsk, val) set_unalign_ctl((tsk), (val)) - -extern int get_unalign_ctl(struct task_struct *tsk, unsigned long adr); -extern int set_unalign_ctl(struct task_struct *tsk, unsigned int val); - static inline unsigned int __unpack_fe01(unsigned long msr_bits) { return ((msr_bits & MSR_FE0) >> 10) | ((msr_bits & MSR_FE1) >> 8); diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index d0fa1b9ae..97ef1cd71 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h @@ -15,6 +15,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -64,6 +65,11 @@ struct boot_param_header typedef u32 phandle; typedef u32 ihandle; +struct interrupt_info { + int line; + int sense; /* +ve/-ve logic, edge or level, etc. */ +}; + struct property { char *name; int length; @@ -76,6 +82,8 @@ struct device_node { char *type; phandle node; phandle linux_phandle; + int n_intrs; + struct interrupt_info *intrs; char *full_name; struct property *properties; @@ -160,8 +168,8 @@ extern void unflatten_device_tree(void); extern void early_init_devtree(void *); extern int device_is_compatible(struct device_node *device, const char *); extern int machine_is_compatible(const char *compat); -extern void *get_property(struct device_node *node, const char *name, - int *lenp); +extern unsigned char *get_property(struct device_node *node, const char *name, + int *lenp); extern void print_properties(struct device_node *node); extern int prom_n_addr_cells(struct device_node* np); extern int prom_n_size_cells(struct device_node* np); @@ -197,15 +205,6 @@ extern int release_OF_resource(struct device_node* node, int index); */ -/* Helper to read a big number */ -static inline u64 of_read_number(u32 *cell, int size) -{ - u64 r = 0; - while (size--) - r = (r << 32) | *(cell++); - return r; -} - /* Translate an OF address block into a CPU physical address */ #define OF_BAD_ADDR ((u64)-1) @@ -231,96 +230,7 @@ extern int of_address_to_resource(struct device_node *dev, int index, extern int of_pci_address_to_resource(struct device_node *dev, int bar, struct resource *r); -/* Parse the ibm,dma-window property of an OF node into the busno, phys and - * size parameters. - */ -void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop, - unsigned long *busno, unsigned long *phys, unsigned long *size); - extern void kdump_move_device_tree(void); -/* CPU OF node matching */ -struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); - - -/* - * OF interrupt mapping - */ - -/* This structure is returned when an interrupt is mapped. The controller - * field needs to be put() after use - */ - -#define OF_MAX_IRQ_SPEC 4 /* We handle specifiers of at most 4 cells */ - -struct of_irq { - struct device_node *controller; /* Interrupt controller node */ - u32 size; /* Specifier size */ - u32 specifier[OF_MAX_IRQ_SPEC]; /* Specifier copy */ -}; - -/*** - * of_irq_map_init - Initialize the irq remapper - * @flags: flags defining workarounds to enable - * - * Some machines have bugs in the device-tree which require certain workarounds - * to be applied. Call this before any interrupt mapping attempts to enable - * those workarounds. - */ -#define OF_IMAP_OLDWORLD_MAC 0x00000001 -#define OF_IMAP_NO_PHANDLE 0x00000002 - -extern void of_irq_map_init(unsigned int flags); - -/*** - * of_irq_map_raw - Low level interrupt tree parsing - * @parent: the device interrupt parent - * @intspec: interrupt specifier ("interrupts" property of the device) - * @ointsize: size of the passed in interrupt specifier - * @addr: address specifier (start of "reg" property of the device) - * @out_irq: structure of_irq filled by this function - * - * Returns 0 on success and a negative number on error - * - * This function is a low-level interrupt tree walking function. It - * can be used to do a partial walk with synthetized reg and interrupts - * properties, for example when resolving PCI interrupts when no device - * node exist for the parent. - * - */ - -extern int of_irq_map_raw(struct device_node *parent, u32 *intspec, - u32 ointsize, u32 *addr, - struct of_irq *out_irq); - - -/*** - * of_irq_map_one - Resolve an interrupt for a device - * @device: the device whose interrupt is to be resolved - * @index: index of the interrupt to resolve - * @out_irq: structure of_irq filled by this function - * - * This function resolves an interrupt, walking the tree, for a given - * device-tree node. It's the high level pendant to of_irq_map_raw(). - * It also implements the workarounds for OldWolrd Macs. - */ -extern int of_irq_map_one(struct device_node *device, int index, - struct of_irq *out_irq); - -/*** - * of_irq_map_pci - Resolve the interrupt for a PCI device - * @pdev: the device whose interrupt is to be resolved - * @out_irq: structure of_irq filled by this function - * - * This function resolves the PCI interrupt for a given PCI device. If a - * device-node exists for a given pci_dev, it will use normal OF tree - * walking. If not, it will implement standard swizzling and walk up the - * PCI tree until an device-node is found, at which point it will finish - * resolving using the OF tree walking. - */ -struct pci_dev; -extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq); - - #endif /* __KERNEL__ */ #endif /* _POWERPC_PROM_H */ diff --git a/include/asm-powerpc/ptrace.h b/include/asm-powerpc/ptrace.h index 4435efe85..9c550b314 100644 --- a/include/asm-powerpc/ptrace.h +++ b/include/asm-powerpc/ptrace.h @@ -215,10 +215,12 @@ do { \ #define PTRACE_GETVRREGS 18 #define PTRACE_SETVRREGS 19 +#ifndef __powerpc64__ /* Get/set all the upper 32-bits of the SPE registers, accumulator, and * spefscr, in one go */ #define PTRACE_GETEVRREGS 20 #define PTRACE_SETEVRREGS 21 +#endif /* __powerpc64__ */ /* * Get or set a debug register. The first 16 are DABR registers and the @@ -227,6 +229,7 @@ do { \ #define PTRACE_GET_DEBUGREG 25 #define PTRACE_SET_DEBUGREG 26 +#ifdef __powerpc64__ /* Additional PTRACE requests implemented on PowerPC. */ #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ @@ -240,5 +243,6 @@ do { \ #define PPC_PTRACE_POKEDATA_3264 0x92 #define PPC_PTRACE_PEEKUSR_3264 0x91 #define PPC_PTRACE_POKEUSR_3264 0x90 +#endif /* __powerpc64__ */ #endif /* _ASM_POWERPC_PTRACE_H */ diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index cf73475a0..bd467bf5c 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h @@ -93,8 +93,8 @@ #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ #ifdef CONFIG_PPC64 -#define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV -#define MSR_KERNEL MSR_ | MSR_SF +#define MSR_ MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF +#define MSR_KERNEL MSR_ | MSR_SF | MSR_HV #define MSR_USER32 MSR_ | MSR_PR | MSR_EE #define MSR_USER64 MSR_USER32 | MSR_SF @@ -153,7 +153,7 @@ #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ #define DABR_TRANSLATION (1UL << 2) #define SPRN_DAR 0x013 /* Data Address Register */ -#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ +#define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ #define DSISR_NOHPTE 0x40000000 /* no translation found */ #define DSISR_PROTFAULT 0x08000000 /* protection fault */ #define DSISR_ISSTORE 0x02000000 /* access was a store */ @@ -258,16 +258,16 @@ #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ #define SPRN_HID4 0x3F4 /* 970 HID4 */ #define SPRN_HID5 0x3F6 /* 970 HID5 */ -#define SPRN_HID6 0x3F9 /* BE HID 6 */ -#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ -#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ -#define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */ -#define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */ -#define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */ -#define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */ -#define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */ -#define SPRN_TSC 0x3FD /* Thread switch control on others */ -#define SPRN_TST 0x3FC /* Thread switch timeout on others */ +#define SPRN_HID6 0x3F9 /* BE HID 6 */ +#define HID6_LB (0x0F<<12) /* Concurrent Large Page Modes */ +#define HID6_DLP (1<<20) /* Disable all large page modes (4K only) */ +#define SPRN_TSC_CELL 0x399 /* Thread switch control on Cell */ +#define TSC_CELL_DEC_ENABLE_0 0x400000 /* Decrementer Interrupt */ +#define TSC_CELL_DEC_ENABLE_1 0x200000 /* Decrementer Interrupt */ +#define TSC_CELL_EE_ENABLE 0x100000 /* External Interrupt */ +#define TSC_CELL_EE_BOOST 0x080000 /* External Interrupt Boost */ +#define SPRN_TSC 0x3FD /* Thread switch control on others */ +#define SPRN_TST 0x3FC /* Thread switch timeout on others */ #if !defined(SPRN_IAC1) && !defined(SPRN_IAC2) #define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */ #define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */ @@ -362,7 +362,7 @@ #endif #define SPRN_PTEHI 0x3D5 /* 981 7450 PTE HI word (S/W TLB load) */ #define SPRN_PTELO 0x3D6 /* 982 7450 PTE LO word (S/W TLB load) */ -#define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */ +#define SPRN_PURR 0x135 /* Processor Utilization of Resources Reg */ #define SPRN_PVR 0x11F /* Processor Version Register */ #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ @@ -386,8 +386,6 @@ #define SRR1_WAKEMT 0x00280000 /* mtctrl */ #define SRR1_WAKEDEC 0x00180000 /* Decrementer interrupt */ #define SRR1_WAKETHERM 0x00100000 /* Thermal management interrupt */ -#define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ -#define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ #ifndef SPRN_SVR #define SPRN_SVR 0x11E /* System Version Register */ @@ -445,10 +443,6 @@ #define MMCRA_SIHV 0x10000000UL /* state of MSR HV when SIAR set */ #define MMCRA_SIPR 0x08000000UL /* state of MSR PR when SIAR set */ #define MMCRA_SAMPLE_ENABLE 0x00000001UL /* enable sampling */ -#define POWER6_MMCRA_SIHV 0x0000040000000000ULL -#define POWER6_MMCRA_SIPR 0x0000020000000000ULL -#define POWER6_MMCRA_THRM 0x00000020UL -#define POWER6_MMCRA_OTHER 0x0000000EUL #define SPRN_PMC1 787 #define SPRN_PMC2 788 #define SPRN_PMC3 789 @@ -501,19 +495,6 @@ #define MMCR0_PMC2_LOADMISSTIME 0x5 #endif -/* - * An mtfsf instruction with the L bit set. On CPUs that support this a - * full 64bits of FPSCR is restored and on other CPUs it is ignored. - * - * Until binutils gets the new form of mtfsf, hardwire the instruction. - */ -#ifdef CONFIG_PPC64 -#define MTFSF_L(REG) \ - .long (0xfc00058e | ((0xff) << 17) | ((REG) << 11) | (1 << 25)) -#else -#define MTFSF_L(REG) mtfsf 0xff, (REG) -#endif - /* Processor Version Register (PVR) field extraction */ #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ @@ -578,20 +559,20 @@ /* 64-bit processors */ /* XXX the prefix should be PVR_, we'll do a global sweep to fix it one day */ -#define PV_NORTHSTAR 0x0033 -#define PV_PULSAR 0x0034 -#define PV_POWER4 0x0035 -#define PV_ICESTAR 0x0036 -#define PV_SSTAR 0x0037 -#define PV_POWER4p 0x0038 +#define PV_NORTHSTAR 0x0033 +#define PV_PULSAR 0x0034 +#define PV_POWER4 0x0035 +#define PV_ICESTAR 0x0036 +#define PV_SSTAR 0x0037 +#define PV_POWER4p 0x0038 #define PV_970 0x0039 -#define PV_POWER5 0x003A +#define PV_POWER5 0x003A #define PV_POWER5p 0x003B #define PV_970FX 0x003C -#define PV_630 0x0040 -#define PV_630p 0x0041 -#define PV_970MP 0x0044 -#define PV_BE 0x0070 +#define PV_630 0x0040 +#define PV_630p 0x0041 +#define PV_970MP 0x0044 +#define PV_BE 0x0070 /* * Number of entries in the SLB. If this ever changes we should handle diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 82a27e9a0..f43c6835e 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h @@ -24,7 +24,6 @@ #define RTAS_RMOBUF_MAX (64 * 1024) /* RTAS return status codes */ -#define RTAS_NOT_SUSPENDABLE -9004 #define RTAS_BUSY -2 /* RTAS Busy */ #define RTAS_EXTENDED_DELAY_MIN 9900 #define RTAS_EXTENDED_DELAY_MAX 9905 @@ -170,7 +169,6 @@ 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_power_level(int powerdomain, int level, int *setlevel); extern int rtas_set_indicator(int indicator, int index, int new_value); -extern int rtas_set_indicator_fast(int indicator, int index, int new_value); extern void rtas_progress(char *s, unsigned short hex); extern void rtas_initialize(void); @@ -179,11 +177,12 @@ extern unsigned long rtas_get_boot_time(void); extern void rtas_get_rtc_time(struct rtc_time *rtc_time); extern int rtas_set_rtc_time(struct rtc_time *rtc_time); -extern unsigned int rtas_busy_delay_time(int status); -extern unsigned int rtas_busy_delay(int status); - -extern int early_init_dt_scan_rtas(unsigned long node, - const char *uname, int depth, void *data); +/* Given an RTAS status code of 9900..9905 compute the hinted delay */ +unsigned int rtas_extended_busy_delay_time(int status); +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); diff --git a/include/asm-powerpc/rwsem.h b/include/asm-powerpc/rwsem.h index e929145e1..2c2fe9647 100644 --- a/include/asm-powerpc/rwsem.h +++ b/include/asm-powerpc/rwsem.h @@ -28,11 +28,24 @@ struct rw_semaphore { #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) spinlock_t wait_lock; struct list_head wait_list; +#if RWSEM_DEBUG + int debug; +#endif }; +/* + * initialisation + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 +#else +#define __RWSEM_DEBUG_INIT /* */ +#endif + #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ - LIST_HEAD_INIT((name).wait_list) } + LIST_HEAD_INIT((name).wait_list) \ + __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -47,6 +60,9 @@ static inline void init_rwsem(struct rw_semaphore *sem) sem->count = RWSEM_UNLOCKED_VALUE; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } /* diff --git a/include/asm-powerpc/signal.h b/include/asm-powerpc/signal.h index a8c7babf4..a4d8f8648 100644 --- a/include/asm-powerpc/signal.h +++ b/include/asm-powerpc/signal.h @@ -63,6 +63,7 @@ typedef struct { * SA_FLAGS values: * * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -82,6 +83,7 @@ typedef struct { #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000u /* dummy -- ignored */ #define SA_RESTORER 0x04000000U diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h index 068f119aa..4a716f707 100644 --- a/include/asm-powerpc/smp.h +++ b/include/asm-powerpc/smp.h @@ -17,6 +17,7 @@ #define _ASM_POWERPC_SMP_H #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-powerpc/smu.h b/include/asm-powerpc/smu.h index 51e65fc46..2dc93632f 100644 --- a/include/asm-powerpc/smu.h +++ b/include/asm-powerpc/smu.h @@ -5,6 +5,7 @@ * Definitions for talking to the SMU chip in newer G5 PowerMacs */ #ifdef __KERNEL__ +#include #include #endif #include diff --git a/include/asm-powerpc/socket.h b/include/asm-powerpc/socket.h index c8b1da50e..e4b8177d4 100644 --- a/include/asm-powerpc/socket.h +++ b/include/asm-powerpc/socket.h @@ -55,6 +55,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_POWERPC_SOCKET_H */ diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h index c31e4382a..895cb6d3a 100644 --- a/include/asm-powerpc/spinlock.h +++ b/include/asm-powerpc/spinlock.h @@ -36,19 +36,6 @@ #define LOCK_TOKEN 1 #endif -#if defined(CONFIG_PPC64) && defined(CONFIG_SMP) -#define CLEAR_IO_SYNC (get_paca()->io_sync = 0) -#define SYNC_IO do { \ - if (unlikely(get_paca()->io_sync)) { \ - mb(); \ - get_paca()->io_sync = 0; \ - } \ - } while (0) -#else -#define CLEAR_IO_SYNC -#define SYNC_IO -#endif - /* * This returns the old value in the lock, so we succeeded * in getting the lock if the return value is 0. @@ -74,7 +61,6 @@ static __inline__ unsigned long __spin_trylock(raw_spinlock_t *lock) static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) { - CLEAR_IO_SYNC; return __spin_trylock(lock) == 0; } @@ -105,7 +91,6 @@ extern void __rw_yield(raw_rwlock_t *lock); static void __inline__ __raw_spin_lock(raw_spinlock_t *lock) { - CLEAR_IO_SYNC; while (1) { if (likely(__spin_trylock(lock) == 0)) break; @@ -122,7 +107,6 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long { unsigned long flags_dis; - CLEAR_IO_SYNC; while (1) { if (likely(__spin_trylock(lock) == 0)) break; @@ -140,7 +124,6 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) { - SYNC_IO; __asm__ __volatile__("# __raw_spin_unlock\n\t" LWSYNC_ON_SMP: : :"memory"); lock->slock = 0; diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index c02d105d8..7cfcff3ef 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -24,8 +24,9 @@ #define _SPU_H #ifdef __KERNEL__ +#include +#include #include -#include #define LS_SIZE (256 * 1024) #define LS_ADDR_MASK (LS_SIZE - 1) @@ -117,12 +118,12 @@ struct spu { struct list_head sched_list; int number; int nid; - unsigned int irqs[3]; u32 isrc; u32 node; u64 flags; u64 dar; u64 dsisr; + struct kref kref; size_t ls_size; unsigned int slb_replace; struct mm_struct *mm; @@ -134,6 +135,7 @@ struct spu { int class_0_pending; spinlock_t register_lock; + u32 stop_code; void (* wbox_callback)(struct spu *spu); void (* ibox_callback)(struct spu *spu); void (* stop_callback)(struct spu *spu); @@ -142,8 +144,6 @@ struct spu { char irq_c0[8]; char irq_c1[8]; char irq_c2[8]; - - struct sys_device sysdev; }; struct spu *spu_alloc(void); @@ -182,6 +182,29 @@ static inline void unregister_spu_syscalls(struct spufs_calls *calls) #endif /* MODULE */ +/* access to priv1 registers */ +void spu_int_mask_and(struct spu *spu, int class, u64 mask); +void spu_int_mask_or(struct spu *spu, int class, u64 mask); +void spu_int_mask_set(struct spu *spu, int class, u64 mask); +u64 spu_int_mask_get(struct spu *spu, int class); +void spu_int_stat_clear(struct spu *spu, int class, u64 stat); +u64 spu_int_stat_get(struct spu *spu, int class); +void spu_int_route_set(struct spu *spu, u64 route); +u64 spu_mfc_dar_get(struct spu *spu); +u64 spu_mfc_dsisr_get(struct spu *spu); +void spu_mfc_dsisr_set(struct spu *spu, u64 dsisr); +void spu_mfc_sdr_set(struct spu *spu, u64 sdr); +void spu_mfc_sr1_set(struct spu *spu, u64 sr1); +u64 spu_mfc_sr1_get(struct spu *spu); +void spu_mfc_tclass_id_set(struct spu *spu, u64 tclass_id); +u64 spu_mfc_tclass_id_get(struct spu *spu); +void spu_tlb_invalidate(struct spu *spu); +void spu_resource_allocation_groupID_set(struct spu *spu, u64 id); +u64 spu_resource_allocation_groupID_get(struct spu *spu); +void spu_resource_allocation_enable_set(struct spu *spu, u64 enable); +u64 spu_resource_allocation_enable_get(struct spu *spu); + + /* * This defines the Local Store, Problem Area and Privlege Area of an SPU. */ diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index 964c2d38c..ba18d7d4d 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h @@ -86,18 +86,10 @@ struct spu_lscsa { struct spu_reg128 event_mask; struct spu_reg128 srr0; struct spu_reg128 stopped_status; - - /* - * 'ls' must be page-aligned on all configurations. - * Since we don't want to rely on having the spu-gcc - * installed to build the kernel and this structure - * is used in the SPU-side code, make it 64k-page - * aligned for now. - */ - unsigned char ls[LS_SIZE] __attribute__((aligned(65536))); + struct spu_reg128 pad[119]; /* 'ls' must be page-aligned. */ + unsigned char ls[LS_SIZE]; }; -#ifndef __SPU__ /* * struct spu_problem_collapsed - condensed problem state area, w/o pads. */ @@ -258,7 +250,6 @@ extern int spu_restore(struct spu_state *new, struct spu *spu); extern int spu_switch(struct spu_state *prev, struct spu_state *new, struct spu *spu); -#endif /* !__SPU__ */ #endif /* __KERNEL__ */ #endif /* !__ASSEMBLY__ */ #endif /* _SPU_CSA_H_ */ diff --git a/include/asm-powerpc/spu_priv1.h b/include/asm-powerpc/spu_priv1.h deleted file mode 100644 index 300c458b6..000000000 --- a/include/asm-powerpc/spu_priv1.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Defines an spu hypervisor abstraction layer. - * - * Copyright 2006 Sony Corp. - * - * 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; version 2 of the License. - * - * 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 - */ - -#if !defined(_SPU_PRIV1_H) -#define _SPU_PRIV1_H -#if defined(__KERNEL__) - -struct spu; - -/* access to priv1 registers */ - -struct spu_priv1_ops -{ - void (*int_mask_and) (struct spu *spu, int class, u64 mask); - void (*int_mask_or) (struct spu *spu, int class, u64 mask); - void (*int_mask_set) (struct spu *spu, int class, u64 mask); - u64 (*int_mask_get) (struct spu *spu, int class); - void (*int_stat_clear) (struct spu *spu, int class, u64 stat); - u64 (*int_stat_get) (struct spu *spu, int class); - void (*cpu_affinity_set) (struct spu *spu, int cpu); - u64 (*mfc_dar_get) (struct spu *spu); - u64 (*mfc_dsisr_get) (struct spu *spu); - void (*mfc_dsisr_set) (struct spu *spu, u64 dsisr); - void (*mfc_sdr_set) (struct spu *spu, u64 sdr); - void (*mfc_sr1_set) (struct spu *spu, u64 sr1); - u64 (*mfc_sr1_get) (struct spu *spu); - void (*mfc_tclass_id_set) (struct spu *spu, u64 tclass_id); - u64 (*mfc_tclass_id_get) (struct spu *spu); - void (*tlb_invalidate) (struct spu *spu); - void (*resource_allocation_groupID_set) (struct spu *spu, u64 id); - u64 (*resource_allocation_groupID_get) (struct spu *spu); - void (*resource_allocation_enable_set) (struct spu *spu, u64 enable); - u64 (*resource_allocation_enable_get) (struct spu *spu); -}; - -extern const struct spu_priv1_ops* spu_priv1_ops; - -static inline void -spu_int_mask_and (struct spu *spu, int class, u64 mask) -{ - spu_priv1_ops->int_mask_and(spu, class, mask); -} - -static inline void -spu_int_mask_or (struct spu *spu, int class, u64 mask) -{ - spu_priv1_ops->int_mask_or(spu, class, mask); -} - -static inline void -spu_int_mask_set (struct spu *spu, int class, u64 mask) -{ - spu_priv1_ops->int_mask_set(spu, class, mask); -} - -static inline u64 -spu_int_mask_get (struct spu *spu, int class) -{ - return spu_priv1_ops->int_mask_get(spu, class); -} - -static inline void -spu_int_stat_clear (struct spu *spu, int class, u64 stat) -{ - spu_priv1_ops->int_stat_clear(spu, class, stat); -} - -static inline u64 -spu_int_stat_get (struct spu *spu, int class) -{ - return spu_priv1_ops->int_stat_get (spu, class); -} - -static inline void -spu_cpu_affinity_set (struct spu *spu, int cpu) -{ - spu_priv1_ops->cpu_affinity_set(spu, cpu); -} - -static inline u64 -spu_mfc_dar_get (struct spu *spu) -{ - return spu_priv1_ops->mfc_dar_get(spu); -} - -static inline u64 -spu_mfc_dsisr_get (struct spu *spu) -{ - return spu_priv1_ops->mfc_dsisr_get(spu); -} - -static inline void -spu_mfc_dsisr_set (struct spu *spu, u64 dsisr) -{ - spu_priv1_ops->mfc_dsisr_set(spu, dsisr); -} - -static inline void -spu_mfc_sdr_set (struct spu *spu, u64 sdr) -{ - spu_priv1_ops->mfc_sdr_set(spu, sdr); -} - -static inline void -spu_mfc_sr1_set (struct spu *spu, u64 sr1) -{ - spu_priv1_ops->mfc_sr1_set(spu, sr1); -} - -static inline u64 -spu_mfc_sr1_get (struct spu *spu) -{ - return spu_priv1_ops->mfc_sr1_get(spu); -} - -static inline void -spu_mfc_tclass_id_set (struct spu *spu, u64 tclass_id) -{ - spu_priv1_ops->mfc_tclass_id_set(spu, tclass_id); -} - -static inline u64 -spu_mfc_tclass_id_get (struct spu *spu) -{ - return spu_priv1_ops->mfc_tclass_id_get(spu); -} - -static inline void -spu_tlb_invalidate (struct spu *spu) -{ - spu_priv1_ops->tlb_invalidate(spu); -} - -static inline void -spu_resource_allocation_groupID_set (struct spu *spu, u64 id) -{ - spu_priv1_ops->resource_allocation_groupID_set(spu, id); -} - -static inline u64 -spu_resource_allocation_groupID_get (struct spu *spu) -{ - return spu_priv1_ops->resource_allocation_groupID_get(spu); -} - -static inline void -spu_resource_allocation_enable_set (struct spu *spu, u64 enable) -{ - spu_priv1_ops->resource_allocation_enable_set(spu, enable); -} - -static inline u64 -spu_resource_allocation_enable_get (struct spu *spu) -{ - return spu_priv1_ops->resource_allocation_enable_get(spu); -} - -/* The declarations folowing are put here for convenience - * and only intended to be used by the platform setup code - * for initializing spu_priv1_ops. - */ - -extern const struct spu_priv1_ops spu_priv1_mmio_ops; - -#endif /* __KERNEL__ */ -#endif diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h deleted file mode 100644 index 607c1e0a6..000000000 --- a/include/asm-powerpc/systbl.h +++ /dev/null @@ -1,306 +0,0 @@ -/* - * List of powerpc syscalls. For the meaning of the _SPU suffix see - * arch/powerpc/platforms/cell/spu_callbacks.c - */ - -SYSCALL(restart_syscall) -SYSCALL(exit) -PPC_SYS(fork) -SYSCALL_SPU(read) -SYSCALL_SPU(write) -COMPAT_SYS_SPU(open) -SYSCALL_SPU(close) -COMPAT_SYS_SPU(waitpid) -COMPAT_SYS_SPU(creat) -SYSCALL_SPU(link) -SYSCALL_SPU(unlink) -COMPAT_SYS(execve) -SYSCALL_SPU(chdir) -COMPAT_SYS_SPU(time) -SYSCALL_SPU(mknod) -SYSCALL_SPU(chmod) -SYSCALL_SPU(lchown) -SYSCALL(ni_syscall) -OLDSYS(stat) -SYSX_SPU(sys_lseek,ppc32_lseek,sys_lseek) -SYSCALL_SPU(getpid) -COMPAT_SYS(mount) -SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount) -SYSCALL_SPU(setuid) -SYSCALL_SPU(getuid) -COMPAT_SYS_SPU(stime) -COMPAT_SYS(ptrace) -SYSCALL_SPU(alarm) -OLDSYS(fstat) -COMPAT_SYS(pause) -COMPAT_SYS(utime) -SYSCALL(ni_syscall) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(access) -COMPAT_SYS_SPU(nice) -SYSCALL(ni_syscall) -SYSCALL_SPU(sync) -COMPAT_SYS_SPU(kill) -SYSCALL_SPU(rename) -COMPAT_SYS_SPU(mkdir) -SYSCALL_SPU(rmdir) -SYSCALL_SPU(dup) -SYSCALL_SPU(pipe) -COMPAT_SYS_SPU(times) -SYSCALL(ni_syscall) -SYSCALL_SPU(brk) -SYSCALL_SPU(setgid) -SYSCALL_SPU(getgid) -SYSCALL(signal) -SYSCALL_SPU(geteuid) -SYSCALL_SPU(getegid) -SYSCALL(acct) -SYSCALL(umount) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(ioctl) -COMPAT_SYS_SPU(fcntl) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(setpgid) -SYSCALL(ni_syscall) -SYSX(sys_ni_syscall,sys_olduname, sys_olduname) -COMPAT_SYS_SPU(umask) -SYSCALL_SPU(chroot) -SYSCALL(ustat) -SYSCALL_SPU(dup2) -SYSCALL_SPU(getppid) -SYSCALL_SPU(getpgrp) -SYSCALL_SPU(setsid) -SYS32ONLY(sigaction) -SYSCALL_SPU(sgetmask) -COMPAT_SYS_SPU(ssetmask) -SYSCALL_SPU(setreuid) -SYSCALL_SPU(setregid) -SYS32ONLY(sigsuspend) -COMPAT_SYS(sigpending) -COMPAT_SYS_SPU(sethostname) -COMPAT_SYS_SPU(setrlimit) -COMPAT_SYS(old_getrlimit) -COMPAT_SYS_SPU(getrusage) -COMPAT_SYS_SPU(gettimeofday) -COMPAT_SYS_SPU(settimeofday) -COMPAT_SYS_SPU(getgroups) -COMPAT_SYS_SPU(setgroups) -SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select) -SYSCALL_SPU(symlink) -OLDSYS(lstat) -COMPAT_SYS_SPU(readlink) -SYSCALL(uselib) -SYSCALL(swapon) -SYSCALL(reboot) -SYSX(sys_ni_syscall,old32_readdir,old_readdir) -SYSCALL_SPU(mmap) -SYSCALL_SPU(munmap) -SYSCALL_SPU(truncate) -SYSCALL_SPU(ftruncate) -SYSCALL_SPU(fchmod) -SYSCALL_SPU(fchown) -COMPAT_SYS_SPU(getpriority) -COMPAT_SYS_SPU(setpriority) -SYSCALL(ni_syscall) -COMPAT_SYS(statfs) -COMPAT_SYS(fstatfs) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(socketcall) -COMPAT_SYS_SPU(syslog) -COMPAT_SYS_SPU(setitimer) -COMPAT_SYS_SPU(getitimer) -COMPAT_SYS_SPU(newstat) -COMPAT_SYS_SPU(newlstat) -COMPAT_SYS_SPU(newfstat) -SYSX(sys_ni_syscall,sys_uname,sys_uname) -SYSCALL(ni_syscall) -SYSCALL_SPU(vhangup) -SYSCALL(ni_syscall) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(wait4) -SYSCALL(swapoff) -COMPAT_SYS_SPU(sysinfo) -COMPAT_SYS(ipc) -SYSCALL_SPU(fsync) -SYS32ONLY(sigreturn) -PPC_SYS(clone) -COMPAT_SYS_SPU(setdomainname) -PPC_SYS_SPU(newuname) -SYSCALL(ni_syscall) -COMPAT_SYS_SPU(adjtimex) -SYSCALL_SPU(mprotect) -SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask) -SYSCALL(ni_syscall) -SYSCALL(init_module) -SYSCALL(delete_module) -SYSCALL(ni_syscall) -SYSCALL(quotactl) -COMPAT_SYS_SPU(getpgid) -SYSCALL_SPU(fchdir) -SYSCALL_SPU(bdflush) -COMPAT_SYS(sysfs) -SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality) -SYSCALL(ni_syscall) -SYSCALL_SPU(setfsuid) -SYSCALL_SPU(setfsgid) -SYSCALL_SPU(llseek) -COMPAT_SYS_SPU(getdents) -SYSX_SPU(sys_select,ppc32_select,ppc_select) -SYSCALL_SPU(flock) -SYSCALL_SPU(msync) -COMPAT_SYS_SPU(readv) -COMPAT_SYS_SPU(writev) -COMPAT_SYS_SPU(getsid) -SYSCALL_SPU(fdatasync) -COMPAT_SYS(sysctl) -SYSCALL_SPU(mlock) -SYSCALL_SPU(munlock) -SYSCALL_SPU(mlockall) -SYSCALL_SPU(munlockall) -COMPAT_SYS_SPU(sched_setparam) -COMPAT_SYS_SPU(sched_getparam) -COMPAT_SYS_SPU(sched_setscheduler) -COMPAT_SYS_SPU(sched_getscheduler) -SYSCALL_SPU(sched_yield) -COMPAT_SYS_SPU(sched_get_priority_max) -COMPAT_SYS_SPU(sched_get_priority_min) -COMPAT_SYS_SPU(sched_rr_get_interval) -COMPAT_SYS_SPU(nanosleep) -SYSCALL_SPU(mremap) -SYSCALL_SPU(setresuid) -SYSCALL_SPU(getresuid) -SYSCALL(ni_syscall) -SYSCALL_SPU(poll) -COMPAT_SYS(nfsservctl) -SYSCALL_SPU(setresgid) -SYSCALL_SPU(getresgid) -COMPAT_SYS_SPU(prctl) -COMPAT_SYS(rt_sigreturn) -COMPAT_SYS(rt_sigaction) -COMPAT_SYS(rt_sigprocmask) -COMPAT_SYS(rt_sigpending) -COMPAT_SYS(rt_sigtimedwait) -COMPAT_SYS(rt_sigqueueinfo) -COMPAT_SYS(rt_sigsuspend) -COMPAT_SYS_SPU(pread64) -COMPAT_SYS_SPU(pwrite64) -SYSCALL_SPU(chown) -SYSCALL_SPU(getcwd) -SYSCALL_SPU(capget) -SYSCALL_SPU(capset) -COMPAT_SYS(sigaltstack) -SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile) -SYSCALL(ni_syscall) -SYSCALL(ni_syscall) -PPC_SYS(vfork) -COMPAT_SYS_SPU(getrlimit) -COMPAT_SYS_SPU(readahead) -SYS32ONLY(mmap2) -SYS32ONLY(truncate64) -SYS32ONLY(ftruncate64) -SYSX(sys_ni_syscall,sys_stat64,sys_stat64) -SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64) -SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64) -SYSCALL(pciconfig_read) -SYSCALL(pciconfig_write) -SYSCALL(pciconfig_iobase) -SYSCALL(ni_syscall) -SYSCALL_SPU(getdents64) -SYSCALL_SPU(pivot_root) -SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64) -SYSCALL_SPU(madvise) -SYSCALL_SPU(mincore) -SYSCALL_SPU(gettid) -SYSCALL_SPU(tkill) -SYSCALL_SPU(setxattr) -SYSCALL_SPU(lsetxattr) -SYSCALL_SPU(fsetxattr) -SYSCALL_SPU(getxattr) -SYSCALL_SPU(lgetxattr) -SYSCALL_SPU(fgetxattr) -SYSCALL_SPU(listxattr) -SYSCALL_SPU(llistxattr) -SYSCALL_SPU(flistxattr) -SYSCALL_SPU(removexattr) -SYSCALL_SPU(lremovexattr) -SYSCALL_SPU(fremovexattr) -COMPAT_SYS_SPU(futex) -COMPAT_SYS_SPU(sched_setaffinity) -COMPAT_SYS_SPU(sched_getaffinity) -SYSCALL(ni_syscall) -SYSCALL(ni_syscall) -SYS32ONLY(sendfile64) -COMPAT_SYS_SPU(io_setup) -SYSCALL_SPU(io_destroy) -COMPAT_SYS_SPU(io_getevents) -COMPAT_SYS_SPU(io_submit) -SYSCALL_SPU(io_cancel) -SYSCALL(set_tid_address) -SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64) -SYSCALL(exit_group) -SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie) -SYSCALL_SPU(epoll_create) -SYSCALL_SPU(epoll_ctl) -SYSCALL_SPU(epoll_wait) -SYSCALL_SPU(remap_file_pages) -SYSX_SPU(sys_timer_create,compat_sys_timer_create,sys_timer_create) -COMPAT_SYS_SPU(timer_settime) -COMPAT_SYS_SPU(timer_gettime) -SYSCALL_SPU(timer_getoverrun) -SYSCALL_SPU(timer_delete) -COMPAT_SYS_SPU(clock_settime) -COMPAT_SYS_SPU(clock_gettime) -COMPAT_SYS_SPU(clock_getres) -COMPAT_SYS_SPU(clock_nanosleep) -SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext) -COMPAT_SYS_SPU(tgkill) -COMPAT_SYS_SPU(utimes) -COMPAT_SYS_SPU(statfs64) -COMPAT_SYS_SPU(fstatfs64) -SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64) -PPC_SYS_SPU(rtas) -OLDSYS(debug_setcontext) -SYSX(sys_vserver, sys32_vserver, sys_vserver) -SYSCALL(ni_syscall) -COMPAT_SYS(mbind) -COMPAT_SYS(get_mempolicy) -COMPAT_SYS(set_mempolicy) -COMPAT_SYS(mq_open) -SYSCALL(mq_unlink) -COMPAT_SYS(mq_timedsend) -COMPAT_SYS(mq_timedreceive) -COMPAT_SYS(mq_notify) -COMPAT_SYS(mq_getsetattr) -COMPAT_SYS(kexec_load) -COMPAT_SYS(add_key) -COMPAT_SYS(request_key) -COMPAT_SYS(keyctl) -COMPAT_SYS(waitid) -COMPAT_SYS(ioprio_set) -COMPAT_SYS(ioprio_get) -SYSCALL(inotify_init) -SYSCALL(inotify_add_watch) -SYSCALL(inotify_rm_watch) -SYSCALL(spu_run) -SYSCALL(spu_create) -COMPAT_SYS(pselect6) -COMPAT_SYS(ppoll) -SYSCALL_SPU(unshare) -SYSCALL_SPU(splice) -SYSCALL_SPU(tee) -SYSCALL_SPU(vmsplice) -COMPAT_SYS_SPU(openat) -SYSCALL_SPU(mkdirat) -SYSCALL_SPU(mknodat) -SYSCALL_SPU(fchownat) -COMPAT_SYS_SPU(futimesat) -SYSX_SPU(sys_newfstatat, sys_fstatat64, sys_fstatat64) -SYSCALL_SPU(unlinkat) -SYSCALL_SPU(renameat) -SYSCALL_SPU(linkat) -SYSCALL_SPU(symlinkat) -SYSCALL_SPU(readlinkat) -SYSCALL_SPU(fchmodat) -SYSCALL_SPU(faccessat) -COMPAT_SYS_SPU(get_robust_list) -COMPAT_SYS_SPU(set_robust_list) diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index 4c9f5229e..d075725bf 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h @@ -39,6 +39,7 @@ #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef __KERNEL__ #ifdef CONFIG_SMP @@ -53,15 +54,6 @@ #define smp_read_barrier_depends() do { } while(0) #endif /* CONFIG_SMP */ -/* - * This is a barrier which prevents following instructions from being - * started until the value of the argument x is known. For example, if - * x is a variable loaded from memory, this prevents following - * instructions from being executed until the load has been performed. - */ -#define data_barrier(x) \ - asm volatile("twi 0,%0,0; isync" : : "r" (x) : "memory"); - struct task_struct; struct pt_regs; @@ -228,8 +220,8 @@ __xchg_u32(volatile void *p, unsigned long val) " stwcx. %3,0,%2 \n\ bne- 1b" ISYNC_ON_SMP - : "=&r" (prev), "+m" (*(volatile unsigned int *)p) - : "r" (p), "r" (val) + : "=&r" (prev), "=m" (*(volatile unsigned int *)p) + : "r" (p), "r" (val), "m" (*(volatile unsigned int *)p) : "cc", "memory"); return prev; @@ -248,8 +240,8 @@ __xchg_u64(volatile void *p, unsigned long val) " stdcx. %3,0,%2 \n\ bne- 1b" ISYNC_ON_SMP - : "=&r" (prev), "+m" (*(volatile unsigned long *)p) - : "r" (p), "r" (val) + : "=&r" (prev), "=m" (*(volatile unsigned long *)p) + : "r" (p), "r" (val), "m" (*(volatile unsigned long *)p) : "cc", "memory"); return prev; @@ -307,8 +299,8 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) ISYNC_ON_SMP "\n\ 2:" - : "=&r" (prev), "+m" (*p) - : "r" (p), "r" (old), "r" (new) + : "=&r" (prev), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) : "cc", "memory"); return prev; @@ -330,8 +322,8 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) ISYNC_ON_SMP "\n\ 2:" - : "=&r" (prev), "+m" (*p) - : "r" (p), "r" (old), "r" (new) + : "=&r" (prev), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) : "cc", "memory"); return prev; diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h index c9483adbf..6fa200ad7 100644 --- a/include/asm-powerpc/tce.h +++ b/include/asm-powerpc/tce.h @@ -35,15 +35,32 @@ #define TCE_PAGE_SIZE (1 << TCE_SHIFT) #define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT) -#define TCE_ENTRY_SIZE 8 /* each TCE is 64 bits */ - -#define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */ -#define TCE_RPN_SHIFT 12 -#define TCE_VALID 0x800 /* TCE valid */ -#define TCE_ALLIO 0x400 /* TCE valid for all lpars */ -#define TCE_PCI_WRITE 0x2 /* write from PCI allowed */ -#define TCE_PCI_READ 0x1 /* read from PCI allowed */ -#define TCE_VB_WRITE 0x1 /* write from VB allowed */ + +/* tce_entry + * Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's + * abstracted so layout is irrelevant. + */ +union tce_entry { + unsigned long te_word; + struct { + unsigned int tb_cacheBits :6; /* Cache hash bits - not used */ + unsigned int tb_rsvd :6; + unsigned long tb_rpn :40; /* Real page number */ + unsigned int tb_valid :1; /* Tce is valid (vb only) */ + unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */ + unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */ + unsigned int tb_pciwr :1; /* Write allowed (pci only) */ + unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */ + } te_bits; +#define te_cacheBits te_bits.tb_cacheBits +#define te_rpn te_bits.tb_rpn +#define te_valid te_bits.tb_valid +#define te_allio te_bits.tb_allio +#define te_lpindex te_bits.tb_lpindex +#define te_pciwr te_bits.tb_pciwr +#define te_rdwr te_bits.tb_rdwr +}; + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_TCE_H */ diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index d339e2e88..88b553c6b 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h @@ -21,6 +21,7 @@ #define THREAD_SIZE (1 << THREAD_SHIFT) #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h index 5785ac473..912118db1 100644 --- a/include/asm-powerpc/time.h +++ b/include/asm-powerpc/time.h @@ -14,13 +14,13 @@ #define __POWERPC_TIME_H #ifdef __KERNEL__ +#include #include #include #include -#ifdef CONFIG_PPC_ISERIES +#ifdef CONFIG_PPC64 #include -#include #include #endif @@ -30,6 +30,10 @@ extern unsigned long tb_ticks_per_usec; extern unsigned long tb_ticks_per_sec; extern u64 tb_to_xs; extern unsigned tb_to_us; +extern unsigned long tb_last_stamp; +extern u64 tb_last_jiffy; + +DECLARE_PER_CPU(unsigned long, last_jiffy); struct rtc_time; extern void to_tm(int tim, struct rtc_time * tm); @@ -174,8 +178,7 @@ static inline void set_dec(int val) #ifdef CONFIG_PPC_ISERIES int cur_dec; - if (firmware_has_feature(FW_FEATURE_ISERIES) && - get_lppaca()->shared_proc) { + if (get_lppaca()->shared_proc) { get_lppaca()->virtual_decr = val; cur_dec = get_dec(); if (cur_dec > val) diff --git a/include/asm-powerpc/timex.h b/include/asm-powerpc/timex.h index 3b9a8e786..c02d15ace 100644 --- a/include/asm-powerpc/timex.h +++ b/include/asm-powerpc/timex.h @@ -7,6 +7,7 @@ * PowerPC architecture timex specifications */ +#include #include #define CLOCK_TICK_RATE 1024000 /* Underlying HZ */ diff --git a/include/asm-powerpc/tlb.h b/include/asm-powerpc/tlb.h index 4e2a83468..601a53cf9 100644 --- a/include/asm-powerpc/tlb.h +++ b/include/asm-powerpc/tlb.h @@ -13,6 +13,7 @@ #define _ASM_POWERPC_TLB_H #ifdef __KERNEL__ +#include #ifndef __powerpc64__ #include #endif diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h index 93c7d0c72..a2998eee3 100644 --- a/include/asm-powerpc/tlbflush.h +++ b/include/asm-powerpc/tlbflush.h @@ -17,6 +17,7 @@ */ #ifdef __KERNEL__ +#include struct mm_struct; diff --git a/include/asm-powerpc/todc.h b/include/asm-powerpc/todc.h deleted file mode 100644 index 60a8c39b8..000000000 --- a/include/asm-powerpc/todc.h +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Definitions for the M48Txx and mc146818 series of Time of day/Real Time - * Clock chips. - * - * Author: Mark A. Greer - * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -/* - * Support for the M48T37/M48T59/.../mc146818 Real Time Clock chips. - * Purpose is to make one generic file that handles all of these chips instead - * of every platform implementing the same code over & over again. - */ - -#ifndef __PPC_KERNEL_TODC_H -#define __PPC_KERNEL_TODC_H - -typedef struct { - uint rtc_type; /* your particular chip */ - - /* - * Following are the addresses of the AS0, AS1, and DATA registers - * of these chips. Note that these are board-specific. - */ - unsigned int nvram_as0; - unsigned int nvram_as1; - unsigned int nvram_data; - - /* - * Define bits to stop external set of regs from changing so - * the chip can be read/written reliably. - */ - unsigned char enable_read; - unsigned char enable_write; - - /* - * Following is the number of AS0 address bits. This is normally - * 8 but some bad hardware routes address lines incorrectly. - */ - int as0_bits; - - int nvram_size; /* Size of NVRAM on chip */ - int sw_flags; /* Software control flags */ - - /* Following are the register offsets for the particular chip */ - int year; - int month; - int day_of_month; - int day_of_week; - int hours; - int minutes; - int seconds; - int control_b; - int control_a; - int watchdog; - int interrupts; - int alarm_date; - int alarm_hour; - int alarm_minutes; - int alarm_seconds; - int century; - int flags; - - /* - * Some RTC chips have their NVRAM buried behind a addr/data pair of - * regs on the first level/clock registers. The following fields - * are the addresses for those addr/data regs. - */ - int nvram_addr_reg; - int nvram_data_reg; -} todc_info_t; - -/* - * Define the types of TODC/RTC variants that are supported in - * arch/ppc/kernel/todc_time.c - * Make a new one of these for any chip somehow differs from what's already - * defined. That way, if you ever need to put in code to touch those - * bits/registers in todc_time.c, you can put it inside an - * 'if (todc_info->rtc_type == TODC_TYPE_XXX)' so you won't break - * anyone else. - */ -#define TODC_TYPE_MK48T35 1 -#define TODC_TYPE_MK48T37 2 -#define TODC_TYPE_MK48T59 3 -#define TODC_TYPE_DS1693 4 /* Dallas DS1693 RTC */ -#define TODC_TYPE_DS1743 5 /* Dallas DS1743 RTC */ -#define TODC_TYPE_DS1746 6 /* Dallas DS1746 RTC */ -#define TODC_TYPE_DS1747 7 /* Dallas DS1747 RTC */ -#define TODC_TYPE_DS1501 8 /* Dallas DS1501 RTC */ -#define TODC_TYPE_DS1643 9 /* Dallas DS1643 RTC */ -#define TODC_TYPE_PC97307 10 /* PC97307 internal RTC */ -#define TODC_TYPE_DS1557 11 /* Dallas DS1557 RTC */ -#define TODC_TYPE_DS17285 12 /* Dallas DS17285 RTC */ -#define TODC_TYPE_DS1553 13 /* Dallas DS1553 RTC */ -#define TODC_TYPE_MC146818 100 /* Leave room for m48txx's */ - -/* - * Bit to clear/set to enable reads/writes to the chip - */ -#define TODC_MK48TXX_CNTL_A_R 0x40 -#define TODC_MK48TXX_CNTL_A_W 0x80 -#define TODC_MK48TXX_DAY_CB 0x80 - -#define TODC_DS1501_CNTL_B_TE 0x80 - -/* - * Define flag bits used by todc routines. - */ -#define TODC_FLAG_2_LEVEL_NVRAM 0x00000001 - -/* - * Define the values for the various RTC's that should to into the todc_info - * table. - * Note: The XXX_NVRAM_SIZE, XXX_NVRAM_ADDR_REG, and XXX_NVRAM_DATA_REG only - * matter if XXX_SW_FLAGS has TODC_FLAG_2_LEVEL_NVRAM set. - */ -#define TODC_TYPE_MK48T35_NVRAM_SIZE 0x7ff8 -#define TODC_TYPE_MK48T35_SW_FLAGS 0 -#define TODC_TYPE_MK48T35_YEAR 0x7fff -#define TODC_TYPE_MK48T35_MONTH 0x7ffe -#define TODC_TYPE_MK48T35_DOM 0x7ffd /* Day of Month */ -#define TODC_TYPE_MK48T35_DOW 0x7ffc /* Day of Week */ -#define TODC_TYPE_MK48T35_HOURS 0x7ffb -#define TODC_TYPE_MK48T35_MINUTES 0x7ffa -#define TODC_TYPE_MK48T35_SECONDS 0x7ff9 -#define TODC_TYPE_MK48T35_CNTL_B 0x7ff9 -#define TODC_TYPE_MK48T35_CNTL_A 0x7ff8 -#define TODC_TYPE_MK48T35_WATCHDOG 0x0000 -#define TODC_TYPE_MK48T35_INTERRUPTS 0x0000 -#define TODC_TYPE_MK48T35_ALARM_DATE 0x0000 -#define TODC_TYPE_MK48T35_ALARM_HOUR 0x0000 -#define TODC_TYPE_MK48T35_ALARM_MINUTES 0x0000 -#define TODC_TYPE_MK48T35_ALARM_SECONDS 0x0000 -#define TODC_TYPE_MK48T35_CENTURY 0x0000 -#define TODC_TYPE_MK48T35_FLAGS 0x0000 -#define TODC_TYPE_MK48T35_NVRAM_ADDR_REG 0 -#define TODC_TYPE_MK48T35_NVRAM_DATA_REG 0 - -#define TODC_TYPE_MK48T37_NVRAM_SIZE 0x7ff0 -#define TODC_TYPE_MK48T37_SW_FLAGS 0 -#define TODC_TYPE_MK48T37_YEAR 0x7fff -#define TODC_TYPE_MK48T37_MONTH 0x7ffe -#define TODC_TYPE_MK48T37_DOM 0x7ffd /* Day of Month */ -#define TODC_TYPE_MK48T37_DOW 0x7ffc /* Day of Week */ -#define TODC_TYPE_MK48T37_HOURS 0x7ffb -#define TODC_TYPE_MK48T37_MINUTES 0x7ffa -#define TODC_TYPE_MK48T37_SECONDS 0x7ff9 -#define TODC_TYPE_MK48T37_CNTL_B 0x7ff9 -#define TODC_TYPE_MK48T37_CNTL_A 0x7ff8 -#define TODC_TYPE_MK48T37_WATCHDOG 0x7ff7 -#define TODC_TYPE_MK48T37_INTERRUPTS 0x7ff6 -#define TODC_TYPE_MK48T37_ALARM_DATE 0x7ff5 -#define TODC_TYPE_MK48T37_ALARM_HOUR 0x7ff4 -#define TODC_TYPE_MK48T37_ALARM_MINUTES 0x7ff3 -#define TODC_TYPE_MK48T37_ALARM_SECONDS 0x7ff2 -#define TODC_TYPE_MK48T37_CENTURY 0x7ff1 -#define TODC_TYPE_MK48T37_FLAGS 0x7ff0 -#define TODC_TYPE_MK48T37_NVRAM_ADDR_REG 0 -#define TODC_TYPE_MK48T37_NVRAM_DATA_REG 0 - -#define TODC_TYPE_MK48T59_NVRAM_SIZE 0x1ff0 -#define TODC_TYPE_MK48T59_SW_FLAGS 0 -#define TODC_TYPE_MK48T59_YEAR 0x1fff -#define TODC_TYPE_MK48T59_MONTH 0x1ffe -#define TODC_TYPE_MK48T59_DOM 0x1ffd /* Day of Month */ -#define TODC_TYPE_MK48T59_DOW 0x1ffc /* Day of Week */ -#define TODC_TYPE_MK48T59_HOURS 0x1ffb -#define TODC_TYPE_MK48T59_MINUTES 0x1ffa -#define TODC_TYPE_MK48T59_SECONDS 0x1ff9 -#define TODC_TYPE_MK48T59_CNTL_B 0x1ff9 -#define TODC_TYPE_MK48T59_CNTL_A 0x1ff8 -#define TODC_TYPE_MK48T59_WATCHDOG 0x1fff -#define TODC_TYPE_MK48T59_INTERRUPTS 0x1fff -#define TODC_TYPE_MK48T59_ALARM_DATE 0x1fff -#define TODC_TYPE_MK48T59_ALARM_HOUR 0x1fff -#define TODC_TYPE_MK48T59_ALARM_MINUTES 0x1fff -#define TODC_TYPE_MK48T59_ALARM_SECONDS 0x1fff -#define TODC_TYPE_MK48T59_CENTURY 0x1fff -#define TODC_TYPE_MK48T59_FLAGS 0x1fff -#define TODC_TYPE_MK48T59_NVRAM_ADDR_REG 0 -#define TODC_TYPE_MK48T59_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1501_NVRAM_SIZE 0x100 -#define TODC_TYPE_DS1501_SW_FLAGS TODC_FLAG_2_LEVEL_NVRAM -#define TODC_TYPE_DS1501_YEAR (TODC_TYPE_DS1501_NVRAM_SIZE + 0x06) -#define TODC_TYPE_DS1501_MONTH (TODC_TYPE_DS1501_NVRAM_SIZE + 0x05) -#define TODC_TYPE_DS1501_DOM (TODC_TYPE_DS1501_NVRAM_SIZE + 0x04) -#define TODC_TYPE_DS1501_DOW (TODC_TYPE_DS1501_NVRAM_SIZE + 0x03) -#define TODC_TYPE_DS1501_HOURS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x02) -#define TODC_TYPE_DS1501_MINUTES (TODC_TYPE_DS1501_NVRAM_SIZE + 0x01) -#define TODC_TYPE_DS1501_SECONDS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x00) -#define TODC_TYPE_DS1501_CNTL_B (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0f) -#define TODC_TYPE_DS1501_CNTL_A (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0f) -#define TODC_TYPE_DS1501_WATCHDOG (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff) -#define TODC_TYPE_DS1501_INTERRUPTS (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff) -#define TODC_TYPE_DS1501_ALARM_DATE (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0b) -#define TODC_TYPE_DS1501_ALARM_HOUR (TODC_TYPE_DS1501_NVRAM_SIZE + 0x0a) -#define TODC_TYPE_DS1501_ALARM_MINUTES (TODC_TYPE_DS1501_NVRAM_SIZE + 0x09) -#define TODC_TYPE_DS1501_ALARM_SECONDS (TODC_TYPE_DS1501_NVRAM_SIZE + 0x08) -#define TODC_TYPE_DS1501_CENTURY (TODC_TYPE_DS1501_NVRAM_SIZE + 0x07) -#define TODC_TYPE_DS1501_FLAGS (TODC_TYPE_DS1501_NVRAM_SIZE + 0xff) -#define TODC_TYPE_DS1501_NVRAM_ADDR_REG 0x10 -#define TODC_TYPE_DS1501_NVRAM_DATA_REG 0x13 - -#define TODC_TYPE_DS1553_NVRAM_SIZE 0x1ff0 -#define TODC_TYPE_DS1553_SW_FLAGS 0 -#define TODC_TYPE_DS1553_YEAR 0x1fff -#define TODC_TYPE_DS1553_MONTH 0x1ffe -#define TODC_TYPE_DS1553_DOM 0x1ffd /* Day of Month */ -#define TODC_TYPE_DS1553_DOW 0x1ffc /* Day of Week */ -#define TODC_TYPE_DS1553_HOURS 0x1ffb -#define TODC_TYPE_DS1553_MINUTES 0x1ffa -#define TODC_TYPE_DS1553_SECONDS 0x1ff9 -#define TODC_TYPE_DS1553_CNTL_B 0x1ff9 -#define TODC_TYPE_DS1553_CNTL_A 0x1ff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1553_WATCHDOG 0x1ff7 -#define TODC_TYPE_DS1553_INTERRUPTS 0x1ff6 -#define TODC_TYPE_DS1553_ALARM_DATE 0x1ff5 -#define TODC_TYPE_DS1553_ALARM_HOUR 0x1ff4 -#define TODC_TYPE_DS1553_ALARM_MINUTES 0x1ff3 -#define TODC_TYPE_DS1553_ALARM_SECONDS 0x1ff2 -#define TODC_TYPE_DS1553_CENTURY 0x1ff8 -#define TODC_TYPE_DS1553_FLAGS 0x1ff0 -#define TODC_TYPE_DS1553_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1553_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1557_NVRAM_SIZE 0x7fff0 -#define TODC_TYPE_DS1557_SW_FLAGS 0 -#define TODC_TYPE_DS1557_YEAR 0x7ffff -#define TODC_TYPE_DS1557_MONTH 0x7fffe -#define TODC_TYPE_DS1557_DOM 0x7fffd /* Day of Month */ -#define TODC_TYPE_DS1557_DOW 0x7fffc /* Day of Week */ -#define TODC_TYPE_DS1557_HOURS 0x7fffb -#define TODC_TYPE_DS1557_MINUTES 0x7fffa -#define TODC_TYPE_DS1557_SECONDS 0x7fff9 -#define TODC_TYPE_DS1557_CNTL_B 0x7fff9 -#define TODC_TYPE_DS1557_CNTL_A 0x7fff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1557_WATCHDOG 0x7fff7 -#define TODC_TYPE_DS1557_INTERRUPTS 0x7fff6 -#define TODC_TYPE_DS1557_ALARM_DATE 0x7fff5 -#define TODC_TYPE_DS1557_ALARM_HOUR 0x7fff4 -#define TODC_TYPE_DS1557_ALARM_MINUTES 0x7fff3 -#define TODC_TYPE_DS1557_ALARM_SECONDS 0x7fff2 -#define TODC_TYPE_DS1557_CENTURY 0x7fff8 -#define TODC_TYPE_DS1557_FLAGS 0x7fff0 -#define TODC_TYPE_DS1557_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1557_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1643_NVRAM_SIZE 0x1ff8 -#define TODC_TYPE_DS1643_SW_FLAGS 0 -#define TODC_TYPE_DS1643_YEAR 0x1fff -#define TODC_TYPE_DS1643_MONTH 0x1ffe -#define TODC_TYPE_DS1643_DOM 0x1ffd /* Day of Month */ -#define TODC_TYPE_DS1643_DOW 0x1ffc /* Day of Week */ -#define TODC_TYPE_DS1643_HOURS 0x1ffb -#define TODC_TYPE_DS1643_MINUTES 0x1ffa -#define TODC_TYPE_DS1643_SECONDS 0x1ff9 -#define TODC_TYPE_DS1643_CNTL_B 0x1ff9 -#define TODC_TYPE_DS1643_CNTL_A 0x1ff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1643_WATCHDOG 0x1fff -#define TODC_TYPE_DS1643_INTERRUPTS 0x1fff -#define TODC_TYPE_DS1643_ALARM_DATE 0x1fff -#define TODC_TYPE_DS1643_ALARM_HOUR 0x1fff -#define TODC_TYPE_DS1643_ALARM_MINUTES 0x1fff -#define TODC_TYPE_DS1643_ALARM_SECONDS 0x1fff -#define TODC_TYPE_DS1643_CENTURY 0x1ff8 -#define TODC_TYPE_DS1643_FLAGS 0x1fff -#define TODC_TYPE_DS1643_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1643_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1693_NVRAM_SIZE 0 /* Not handled yet */ -#define TODC_TYPE_DS1693_SW_FLAGS 0 -#define TODC_TYPE_DS1693_YEAR 0x09 -#define TODC_TYPE_DS1693_MONTH 0x08 -#define TODC_TYPE_DS1693_DOM 0x07 /* Day of Month */ -#define TODC_TYPE_DS1693_DOW 0x06 /* Day of Week */ -#define TODC_TYPE_DS1693_HOURS 0x04 -#define TODC_TYPE_DS1693_MINUTES 0x02 -#define TODC_TYPE_DS1693_SECONDS 0x00 -#define TODC_TYPE_DS1693_CNTL_B 0x0b -#define TODC_TYPE_DS1693_CNTL_A 0x0a -#define TODC_TYPE_DS1693_WATCHDOG 0xff -#define TODC_TYPE_DS1693_INTERRUPTS 0xff -#define TODC_TYPE_DS1693_ALARM_DATE 0x49 -#define TODC_TYPE_DS1693_ALARM_HOUR 0x05 -#define TODC_TYPE_DS1693_ALARM_MINUTES 0x03 -#define TODC_TYPE_DS1693_ALARM_SECONDS 0x01 -#define TODC_TYPE_DS1693_CENTURY 0x48 -#define TODC_TYPE_DS1693_FLAGS 0xff -#define TODC_TYPE_DS1693_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1693_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1743_NVRAM_SIZE 0x1ff8 -#define TODC_TYPE_DS1743_SW_FLAGS 0 -#define TODC_TYPE_DS1743_YEAR 0x1fff -#define TODC_TYPE_DS1743_MONTH 0x1ffe -#define TODC_TYPE_DS1743_DOM 0x1ffd /* Day of Month */ -#define TODC_TYPE_DS1743_DOW 0x1ffc /* Day of Week */ -#define TODC_TYPE_DS1743_HOURS 0x1ffb -#define TODC_TYPE_DS1743_MINUTES 0x1ffa -#define TODC_TYPE_DS1743_SECONDS 0x1ff9 -#define TODC_TYPE_DS1743_CNTL_B 0x1ff9 -#define TODC_TYPE_DS1743_CNTL_A 0x1ff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1743_WATCHDOG 0x1fff -#define TODC_TYPE_DS1743_INTERRUPTS 0x1fff -#define TODC_TYPE_DS1743_ALARM_DATE 0x1fff -#define TODC_TYPE_DS1743_ALARM_HOUR 0x1fff -#define TODC_TYPE_DS1743_ALARM_MINUTES 0x1fff -#define TODC_TYPE_DS1743_ALARM_SECONDS 0x1fff -#define TODC_TYPE_DS1743_CENTURY 0x1ff8 -#define TODC_TYPE_DS1743_FLAGS 0x1fff -#define TODC_TYPE_DS1743_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1743_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1746_NVRAM_SIZE 0x1fff8 -#define TODC_TYPE_DS1746_SW_FLAGS 0 -#define TODC_TYPE_DS1746_YEAR 0x1ffff -#define TODC_TYPE_DS1746_MONTH 0x1fffe -#define TODC_TYPE_DS1746_DOM 0x1fffd /* Day of Month */ -#define TODC_TYPE_DS1746_DOW 0x1fffc /* Day of Week */ -#define TODC_TYPE_DS1746_HOURS 0x1fffb -#define TODC_TYPE_DS1746_MINUTES 0x1fffa -#define TODC_TYPE_DS1746_SECONDS 0x1fff9 -#define TODC_TYPE_DS1746_CNTL_B 0x1fff9 -#define TODC_TYPE_DS1746_CNTL_A 0x1fff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1746_WATCHDOG 0x00000 -#define TODC_TYPE_DS1746_INTERRUPTS 0x00000 -#define TODC_TYPE_DS1746_ALARM_DATE 0x00000 -#define TODC_TYPE_DS1746_ALARM_HOUR 0x00000 -#define TODC_TYPE_DS1746_ALARM_MINUTES 0x00000 -#define TODC_TYPE_DS1746_ALARM_SECONDS 0x00000 -#define TODC_TYPE_DS1746_CENTURY 0x00000 -#define TODC_TYPE_DS1746_FLAGS 0x00000 -#define TODC_TYPE_DS1746_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1746_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS1747_NVRAM_SIZE 0x7fff8 -#define TODC_TYPE_DS1747_SW_FLAGS 0 -#define TODC_TYPE_DS1747_YEAR 0x7ffff -#define TODC_TYPE_DS1747_MONTH 0x7fffe -#define TODC_TYPE_DS1747_DOM 0x7fffd /* Day of Month */ -#define TODC_TYPE_DS1747_DOW 0x7fffc /* Day of Week */ -#define TODC_TYPE_DS1747_HOURS 0x7fffb -#define TODC_TYPE_DS1747_MINUTES 0x7fffa -#define TODC_TYPE_DS1747_SECONDS 0x7fff9 -#define TODC_TYPE_DS1747_CNTL_B 0x7fff9 -#define TODC_TYPE_DS1747_CNTL_A 0x7fff8 /* control_a R/W regs */ -#define TODC_TYPE_DS1747_WATCHDOG 0x00000 -#define TODC_TYPE_DS1747_INTERRUPTS 0x00000 -#define TODC_TYPE_DS1747_ALARM_DATE 0x00000 -#define TODC_TYPE_DS1747_ALARM_HOUR 0x00000 -#define TODC_TYPE_DS1747_ALARM_MINUTES 0x00000 -#define TODC_TYPE_DS1747_ALARM_SECONDS 0x00000 -#define TODC_TYPE_DS1747_CENTURY 0x00000 -#define TODC_TYPE_DS1747_FLAGS 0x00000 -#define TODC_TYPE_DS1747_NVRAM_ADDR_REG 0 -#define TODC_TYPE_DS1747_NVRAM_DATA_REG 0 - -#define TODC_TYPE_DS17285_NVRAM_SIZE (0x1000-0x80) /* 4Kx8 NVRAM (minus RTC regs) */ -#define TODC_TYPE_DS17285_SW_FLAGS TODC_FLAG_2_LEVEL_NVRAM -#define TODC_TYPE_DS17285_SECONDS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x00) -#define TODC_TYPE_DS17285_ALARM_SECONDS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x01) -#define TODC_TYPE_DS17285_MINUTES (TODC_TYPE_DS17285_NVRAM_SIZE + 0x02) -#define TODC_TYPE_DS17285_ALARM_MINUTES (TODC_TYPE_DS17285_NVRAM_SIZE + 0x03) -#define TODC_TYPE_DS17285_HOURS (TODC_TYPE_DS17285_NVRAM_SIZE + 0x04) -#define TODC_TYPE_DS17285_ALARM_HOUR (TODC_TYPE_DS17285_NVRAM_SIZE + 0x05) -#define TODC_TYPE_DS17285_DOW (TODC_TYPE_DS17285_NVRAM_SIZE + 0x06) -#define TODC_TYPE_DS17285_DOM (TODC_TYPE_DS17285_NVRAM_SIZE + 0x07) -#define TODC_TYPE_DS17285_MONTH (TODC_TYPE_DS17285_NVRAM_SIZE + 0x08) -#define TODC_TYPE_DS17285_YEAR (TODC_TYPE_DS17285_NVRAM_SIZE + 0x09) -#define TODC_TYPE_DS17285_CNTL_A (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0A) -#define TODC_TYPE_DS17285_CNTL_B (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0B) -#define TODC_TYPE_DS17285_CNTL_C (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0C) -#define TODC_TYPE_DS17285_CNTL_D (TODC_TYPE_DS17285_NVRAM_SIZE + 0x0D) -#define TODC_TYPE_DS17285_WATCHDOG 0 -#define TODC_TYPE_DS17285_INTERRUPTS 0 -#define TODC_TYPE_DS17285_ALARM_DATE 0 -#define TODC_TYPE_DS17285_CENTURY 0 -#define TODC_TYPE_DS17285_FLAGS 0 -#define TODC_TYPE_DS17285_NVRAM_ADDR_REG 0x50 -#define TODC_TYPE_DS17285_NVRAM_DATA_REG 0x53 - -#define TODC_TYPE_MC146818_NVRAM_SIZE 0 /* XXXX */ -#define TODC_TYPE_MC146818_SW_FLAGS 0 -#define TODC_TYPE_MC146818_YEAR 0x09 -#define TODC_TYPE_MC146818_MONTH 0x08 -#define TODC_TYPE_MC146818_DOM 0x07 /* Day of Month */ -#define TODC_TYPE_MC146818_DOW 0x06 /* Day of Week */ -#define TODC_TYPE_MC146818_HOURS 0x04 -#define TODC_TYPE_MC146818_MINUTES 0x02 -#define TODC_TYPE_MC146818_SECONDS 0x00 -#define TODC_TYPE_MC146818_CNTL_B 0x0a -#define TODC_TYPE_MC146818_CNTL_A 0x0b /* control_a R/W regs */ -#define TODC_TYPE_MC146818_WATCHDOG 0 -#define TODC_TYPE_MC146818_INTERRUPTS 0x0c -#define TODC_TYPE_MC146818_ALARM_DATE 0xff -#define TODC_TYPE_MC146818_ALARM_HOUR 0x05 -#define TODC_TYPE_MC146818_ALARM_MINUTES 0x03 -#define TODC_TYPE_MC146818_ALARM_SECONDS 0x01 -#define TODC_TYPE_MC146818_CENTURY 0xff -#define TODC_TYPE_MC146818_FLAGS 0xff -#define TODC_TYPE_MC146818_NVRAM_ADDR_REG 0 -#define TODC_TYPE_MC146818_NVRAM_DATA_REG 0 - -#define TODC_TYPE_PC97307_NVRAM_SIZE 0 /* No NVRAM? */ -#define TODC_TYPE_PC97307_SW_FLAGS 0 -#define TODC_TYPE_PC97307_YEAR 0x09 -#define TODC_TYPE_PC97307_MONTH 0x08 -#define TODC_TYPE_PC97307_DOM 0x07 /* Day of Month */ -#define TODC_TYPE_PC97307_DOW 0x06 /* Day of Week */ -#define TODC_TYPE_PC97307_HOURS 0x04 -#define TODC_TYPE_PC97307_MINUTES 0x02 -#define TODC_TYPE_PC97307_SECONDS 0x00 -#define TODC_TYPE_PC97307_CNTL_B 0x0a -#define TODC_TYPE_PC97307_CNTL_A 0x0b /* control_a R/W regs */ -#define TODC_TYPE_PC97307_WATCHDOG 0x0c -#define TODC_TYPE_PC97307_INTERRUPTS 0x0d -#define TODC_TYPE_PC97307_ALARM_DATE 0xff -#define TODC_TYPE_PC97307_ALARM_HOUR 0x05 -#define TODC_TYPE_PC97307_ALARM_MINUTES 0x03 -#define TODC_TYPE_PC97307_ALARM_SECONDS 0x01 -#define TODC_TYPE_PC97307_CENTURY 0xff -#define TODC_TYPE_PC97307_FLAGS 0xff -#define TODC_TYPE_PC97307_NVRAM_ADDR_REG 0 -#define TODC_TYPE_PC97307_NVRAM_DATA_REG 0 - -/* - * Define macros to allocate and init the todc_info_t table that will - * be used by the todc_time.c routines. - */ -#define TODC_ALLOC() \ - static todc_info_t todc_info_alloc; \ - todc_info_t *todc_info = &todc_info_alloc; - -#define TODC_INIT(clock_type, as0, as1, data, bits) { \ - todc_info->rtc_type = clock_type; \ - \ - todc_info->nvram_as0 = (unsigned int)(as0); \ - todc_info->nvram_as1 = (unsigned int)(as1); \ - todc_info->nvram_data = (unsigned int)(data); \ - \ - todc_info->as0_bits = (bits); \ - \ - todc_info->nvram_size = clock_type ##_NVRAM_SIZE; \ - todc_info->sw_flags = clock_type ##_SW_FLAGS; \ - \ - todc_info->year = clock_type ##_YEAR; \ - todc_info->month = clock_type ##_MONTH; \ - todc_info->day_of_month = clock_type ##_DOM; \ - todc_info->day_of_week = clock_type ##_DOW; \ - todc_info->hours = clock_type ##_HOURS; \ - todc_info->minutes = clock_type ##_MINUTES; \ - todc_info->seconds = clock_type ##_SECONDS; \ - todc_info->control_b = clock_type ##_CNTL_B; \ - todc_info->control_a = clock_type ##_CNTL_A; \ - todc_info->watchdog = clock_type ##_WATCHDOG; \ - todc_info->interrupts = clock_type ##_INTERRUPTS; \ - todc_info->alarm_date = clock_type ##_ALARM_DATE; \ - todc_info->alarm_hour = clock_type ##_ALARM_HOUR; \ - todc_info->alarm_minutes = clock_type ##_ALARM_MINUTES; \ - todc_info->alarm_seconds = clock_type ##_ALARM_SECONDS; \ - todc_info->century = clock_type ##_CENTURY; \ - todc_info->flags = clock_type ##_FLAGS; \ - \ - todc_info->nvram_addr_reg = clock_type ##_NVRAM_ADDR_REG; \ - todc_info->nvram_data_reg = clock_type ##_NVRAM_DATA_REG; \ -} - -extern todc_info_t *todc_info; - -unsigned char todc_direct_read_val(int addr); -void todc_direct_write_val(int addr, unsigned char val); -unsigned char todc_m48txx_read_val(int addr); -void todc_m48txx_write_val(int addr, unsigned char val); -unsigned char todc_mc146818_read_val(int addr); -void todc_mc146818_write_val(int addr, unsigned char val); - -long todc_time_init(void); -void todc_get_rtc_time(struct rtc_time *); -int todc_set_rtc_time(struct rtc_time *); -void todc_calibrate_decr(void); - -#endif /* __PPC_KERNEL_TODC_H */ diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index bbc3844b0..87362a055 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h @@ -2,6 +2,7 @@ #define _ASM_POWERPC_TOPOLOGY_H #ifdef __KERNEL__ +#include struct sys_device; struct device_node; @@ -31,13 +32,8 @@ static inline int node_to_first_cpu(int node) int of_node_to_nid(struct device_node *device); -struct pci_bus; -extern int pcibus_to_node(struct pci_bus *bus); - -#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ - CPU_MASK_ALL : \ - node_to_cpumask(pcibus_to_node(bus)) \ - ) +#define pcibus_to_node(node) (-1) +#define pcibus_to_cpumask(bus) (cpu_online_map) /* sched_domains SD_NODE_INIT for PPC64 machines */ #define SD_NODE_INIT (struct sched_domain) { \ @@ -93,10 +89,5 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, #endif /* CONFIG_NUMA */ -#ifdef CONFIG_SMP -#include -#define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) -#endif - #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_TOPOLOGY_H */ diff --git a/include/asm-powerpc/tsi108.h b/include/asm-powerpc/tsi108.h deleted file mode 100644 index 2c702d35a..000000000 --- a/include/asm-powerpc/tsi108.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * common routine and memory layout for Tundra TSI108(Grendel) host bridge - * memory controller. - * - * Author: Jacob Pan (jacob.pan@freescale.com) - * Alex Bounine (alexandreb@tundra.com) - * - * Copyright 2004-2006 Freescale Semiconductor, 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. - */ - -#ifndef __PPC_KERNEL_TSI108_H -#define __PPC_KERNEL_TSI108_H - -#include - -/* Size of entire register space */ -#define TSI108_REG_SIZE (0x10000) - -/* Sizes of register spaces for individual blocks */ -#define TSI108_HLP_SIZE 0x1000 -#define TSI108_PCI_SIZE 0x1000 -#define TSI108_CLK_SIZE 0x1000 -#define TSI108_PB_SIZE 0x1000 -#define TSI108_SD_SIZE 0x1000 -#define TSI108_DMA_SIZE 0x1000 -#define TSI108_ETH_SIZE 0x1000 -#define TSI108_I2C_SIZE 0x400 -#define TSI108_MPIC_SIZE 0x400 -#define TSI108_UART0_SIZE 0x200 -#define TSI108_GPIO_SIZE 0x200 -#define TSI108_UART1_SIZE 0x200 - -/* Offsets within Tsi108(A) CSR space for individual blocks */ -#define TSI108_HLP_OFFSET 0x0000 -#define TSI108_PCI_OFFSET 0x1000 -#define TSI108_CLK_OFFSET 0x2000 -#define TSI108_PB_OFFSET 0x3000 -#define TSI108_SD_OFFSET 0x4000 -#define TSI108_DMA_OFFSET 0x5000 -#define TSI108_ETH_OFFSET 0x6000 -#define TSI108_I2C_OFFSET 0x7000 -#define TSI108_MPIC_OFFSET 0x7400 -#define TSI108_UART0_OFFSET 0x7800 -#define TSI108_GPIO_OFFSET 0x7A00 -#define TSI108_UART1_OFFSET 0x7C00 - -/* Tsi108 registers used by common code components */ -#define TSI108_PCI_CSR (0x004) -#define TSI108_PCI_IRP_CFG_CTL (0x180) -#define TSI108_PCI_IRP_STAT (0x184) -#define TSI108_PCI_IRP_ENABLE (0x188) -#define TSI108_PCI_IRP_INTAD (0x18C) - -#define TSI108_PCI_IRP_STAT_P_INT (0x00400000) -#define TSI108_PCI_IRP_ENABLE_P_INT (0x00400000) - -#define TSI108_CG_PWRUP_STATUS (0x234) - -#define TSI108_PB_ISR (0x00C) -#define TSI108_PB_ERRCS (0x404) -#define TSI108_PB_AERR (0x408) - -#define TSI108_PB_ERRCS_ES (1 << 1) -#define TSI108_PB_ISR_PBS_RD_ERR (1 << 8) - -#define TSI108_PCI_CFG_BASE_PHYS (0xfb000000) -#define TSI108_PCI_CFG_SIZE (0x01000000) -/* Global variables */ - -extern u32 tsi108_pci_cfg_base; -/* Exported functions */ - -extern int tsi108_bridge_init(struct pci_controller *hose, uint phys_csr_base); -extern unsigned long tsi108_get_mem_size(void); -extern unsigned long tsi108_get_cpu_clk(void); -extern unsigned long tsi108_get_sdc_clk(void); -extern int tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfn, - int offset, int len, u32 val); -extern int tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, - int offset, int len, u32 * val); -extern void tsi108_clear_pci_error(u32 pci_cfg_base); - -extern phys_addr_t get_csrbase(void); - -typedef struct { - u32 regs; /* hw registers base address */ - u32 phyregs; /* phy registers base address */ - u16 phy; /* phy address */ - u16 irq_num; /* irq number */ - u8 mac_addr[6]; /* phy mac address */ -} hw_info; - -extern u32 get_vir_csrbase(void); -extern u32 tsi108_csr_vir_base; - -extern inline u32 tsi108_read_reg(u32 reg_offset) -{ - return in_be32((volatile u32 *)(tsi108_csr_vir_base + reg_offset)); -} - -extern inline void tsi108_write_reg(u32 reg_offset, u32 val) -{ - out_be32((volatile u32 *)(tsi108_csr_vir_base + reg_offset), val); -} - -#endif /* __PPC_KERNEL_TSI108_H */ diff --git a/include/asm-powerpc/tsi108_irq.h b/include/asm-powerpc/tsi108_irq.h deleted file mode 100644 index 3e4d04eff..000000000 --- a/include/asm-powerpc/tsi108_irq.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * (C) Copyright 2005 Tundra Semiconductor Corp. - * Alex Bounine, typedef signed char s8; typedef unsigned char u8; diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 55e57844f..5c4236c34 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h @@ -23,8 +23,7 @@ extern int udbg_write(const char *s, int n); extern int udbg_read(char *buf, int buflen); extern void register_early_udbg_console(void); -extern void udbg_printf(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); +extern void udbg_printf(const char *fmt, ...); extern void udbg_progress(char *s, unsigned short hex); extern void udbg_init_uart(void __iomem *comport, unsigned int speed, @@ -42,8 +41,7 @@ extern void __init udbg_init_debug_lpar(void); extern void __init udbg_init_pmac_realmode(void); extern void __init udbg_init_maple_realmode(void); extern void __init udbg_init_iseries(void); -extern void __init udbg_init_rtas_panel(void); -extern void __init udbg_init_rtas_console(void); +extern void __init udbg_init_rtas(void); #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_UDBG_H */ diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index b8faee752..4b5f5e1cd 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h @@ -324,12 +324,12 @@ #define __NR_get_robust_list 299 #define __NR_set_robust_list 300 -#ifdef __KERNEL__ - #define __NR_syscalls 301 +#ifdef __KERNEL__ #define __NR__exit __NR_exit #define NR_syscalls __NR_syscalls +#endif #ifndef __ASSEMBLY__ @@ -441,7 +441,9 @@ 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__ +#include #include #include #include @@ -497,8 +499,8 @@ extern int execve(const char *file, char **argv, char **envp); #define cond_syscall(x) asm(".weak\t." #x "\n\t.set\t." #x ",.sys_ni_syscall") #endif +#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ #endif /* _ASM_PPC_UNISTD_H_ */ diff --git a/include/asm-powerpc/vga.h b/include/asm-powerpc/vga.h index a2eac409c..f8d350aab 100644 --- a/include/asm-powerpc/vga.h +++ b/include/asm-powerpc/vga.h @@ -12,6 +12,7 @@ #include +#include #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) @@ -41,9 +42,9 @@ static inline u16 scr_readw(volatile const u16 *addr) extern unsigned long vgacon_remap_base; #ifdef __powerpc64__ -#define VGA_MAP_MEM(x,s) ((unsigned long) ioremap((x), s)) +#define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0)) #else -#define VGA_MAP_MEM(x,s) (x + vgacon_remap_base) +#define VGA_MAP_MEM(x) (x + vgacon_remap_base) #endif #define vga_readb(x) (*(x)) diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index dc9bd101c..0544ece51 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h @@ -15,6 +15,7 @@ #define _ASM_POWERPC_VIO_H #ifdef __KERNEL__ +#include #include #include #include @@ -63,22 +64,32 @@ struct vio_driver { struct device_driver driver; }; +struct vio_bus_ops { + int (*match)(const struct vio_device_id *id, const struct vio_dev *dev); + void (*unregister_device)(struct vio_dev *); + void (*release_device)(struct device *); +}; + extern struct dma_mapping_ops vio_dma_ops; extern struct bus_type vio_bus_type; +extern struct vio_dev vio_bus_device; extern int vio_register_driver(struct vio_driver *drv); extern void vio_unregister_driver(struct vio_driver *drv); +extern struct vio_dev * __devinit vio_register_device(struct vio_dev *viodev); extern void __devinit vio_unregister_device(struct vio_dev *dev); +extern int vio_bus_init(struct vio_bus_ops *); + +#ifdef CONFIG_PPC_PSERIES struct device_node; extern struct vio_dev * __devinit vio_register_device_node( struct device_node *node_vdev); -extern const void *vio_get_attribute(struct vio_dev *vdev, char *which, - int *length); -#ifdef CONFIG_PPC_PSERIES extern struct vio_dev *vio_find_node(struct device_node *vnode); +extern const void *vio_get_attribute(struct vio_dev *vdev, void *which, + int *length); extern int vio_enable_interrupts(struct vio_dev *dev); extern int vio_disable_interrupts(struct vio_dev *dev); #endif diff --git a/include/asm-ppc/amigahw.h b/include/asm-ppc/amigahw.h index 90fd1274d..8c98945e7 100644 --- a/include/asm-ppc/amigahw.h +++ b/include/asm-ppc/amigahw.h @@ -2,6 +2,7 @@ #ifndef __ASMPPC_AMIGAHW_H #define __ASMPPC_AMIGAHW_H +#include #include #undef CHIP_PHYSADDR diff --git a/include/asm-ppc/bootinfo.h b/include/asm-ppc/bootinfo.h index 2ace4a74f..93d955c70 100644 --- a/include/asm-ppc/bootinfo.h +++ b/include/asm-ppc/bootinfo.h @@ -9,6 +9,7 @@ #ifndef _PPC_BOOTINFO_H #define _PPC_BOOTINFO_H +#include #include #if defined(CONFIG_APUS) && !defined(__BOOTER__) diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 3247bea5f..31f362966 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h @@ -17,6 +17,7 @@ #ifndef __CPM_8XX__ #define __CPM_8XX__ +#include #include #include diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index f6a7ff04f..c70344b91 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h @@ -1093,100 +1093,5 @@ typedef struct im_idma { #define FCC_PSMR_RMII ((uint)0x00020000) /* Use RMII interface */ -/* FCC iop & clock configuration. BSP code is responsible to define Fx_RXCLK & Fx_TXCLK - * in order to use clock-computing stuff below for the FCC x - */ - -/* Automatically generates register configurations */ -#define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ - -#define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ -#define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ -#define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ -#define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ -#define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ -#define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ - -#define PC_F1RXCLK PC_CLK(F1_RXCLK) -#define PC_F1TXCLK PC_CLK(F1_TXCLK) -#define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) -#define CMX1_CLK_MASK ((uint)0xff000000) - -#define PC_F2RXCLK PC_CLK(F2_RXCLK) -#define PC_F2TXCLK PC_CLK(F2_TXCLK) -#define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) -#define CMX2_CLK_MASK ((uint)0x00ff0000) - -#define PC_F3RXCLK PC_CLK(F3_RXCLK) -#define PC_F3TXCLK PC_CLK(F3_TXCLK) -#define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) -#define CMX3_CLK_MASK ((uint)0x0000ff00) - -#define CPMUX_CLK_MASK (CMX3_CLK_MASK | CMX2_CLK_MASK) -#define CPMUX_CLK_ROUTE (CMX3_CLK_ROUTE | CMX2_CLK_ROUTE) - -#define CLK_TRX (PC_F3TXCLK | PC_F3RXCLK | PC_F2TXCLK | PC_F2RXCLK) - -/* I/O Pin assignment for FCC1. I don't yet know the best way to do this, - * but there is little variation among the choices. - */ -#define PA1_COL 0x00000001U -#define PA1_CRS 0x00000002U -#define PA1_TXER 0x00000004U -#define PA1_TXEN 0x00000008U -#define PA1_RXDV 0x00000010U -#define PA1_RXER 0x00000020U -#define PA1_TXDAT 0x00003c00U -#define PA1_RXDAT 0x0003c000U -#define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) -#define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ - PA1_RXDV | PA1_RXER) -#define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) -#define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) - - -/* I/O Pin assignment for FCC2. I don't yet know the best way to do this, - * but there is little variation among the choices. - */ -#define PB2_TXER 0x00000001U -#define PB2_RXDV 0x00000002U -#define PB2_TXEN 0x00000004U -#define PB2_RXER 0x00000008U -#define PB2_COL 0x00000010U -#define PB2_CRS 0x00000020U -#define PB2_TXDAT 0x000003c0U -#define PB2_RXDAT 0x00003c00U -#define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ - PB2_RXER | PB2_RXDV | PB2_TXER) -#define PB2_PSORB1 (PB2_TXEN) -#define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) -#define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) - - -/* I/O Pin assignment for FCC3. I don't yet know the best way to do this, - * but there is little variation among the choices. - */ -#define PB3_RXDV 0x00004000U -#define PB3_RXER 0x00008000U -#define PB3_TXER 0x00010000U -#define PB3_TXEN 0x00020000U -#define PB3_COL 0x00040000U -#define PB3_CRS 0x00080000U -#define PB3_TXDAT 0x0f000000U -#define PC3_TXDAT 0x00000010U -#define PB3_RXDAT 0x00f00000U -#define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ - PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) -#define PB3_PSORB1 0 -#define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) -#define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) -#define PC3_DIRC1 (PC3_TXDAT) - -/* Handy macro to specify mem for FCCs*/ -#define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) -#define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) -#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) -#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(2) - #endif /* __CPM2__ */ #endif /* __KERNEL__ */ diff --git a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h index d3963ca79..8ccd4a276 100644 --- a/include/asm-ppc/floppy.h +++ b/include/asm-ppc/floppy.h @@ -96,11 +96,13 @@ static int vdma_get_dma_residue(unsigned int dummy) static int fd_request_irq(void) { if (can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); else return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); + } static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) diff --git a/include/asm-ppc/ibm403.h b/include/asm-ppc/ibm403.h index c9c5d539c..bf6efa041 100644 --- a/include/asm-ppc/ibm403.h +++ b/include/asm-ppc/ibm403.h @@ -12,6 +12,7 @@ #ifndef __ASM_IBM403_H__ #define __ASM_IBM403_H__ +#include #if defined(CONFIG_403GCX) diff --git a/include/asm-ppc/ibm44x.h b/include/asm-ppc/ibm44x.h index 7818b54b6..3acc382cc 100644 --- a/include/asm-ppc/ibm44x.h +++ b/include/asm-ppc/ibm44x.h @@ -17,6 +17,7 @@ #ifndef __ASM_IBM44x_H__ #define __ASM_IBM44x_H__ +#include #ifndef NR_BOARD_IRQS #define NR_BOARD_IRQS 0 diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index cf62b69cb..38f997107 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h @@ -14,6 +14,7 @@ #ifndef __ASM_IBM4XX_H__ #define __ASM_IBM4XX_H__ +#include #include #ifdef CONFIG_40x diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 680555be2..b919d8fb7 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -2,6 +2,7 @@ #ifndef _PPC_IO_H #define _PPC_IO_H +#include #include #include @@ -63,7 +64,7 @@ extern inline int in_8(const volatile unsigned char __iomem *addr) int ret; __asm__ __volatile__( - "sync; lbz%U1%X1 %0,%1;\n" + "lbz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -78,7 +79,7 @@ extern inline int in_le16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("sync; lhbrx %0,0,%1;\n" + __asm__ __volatile__("lhbrx %0,0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "r" (addr), "m" (*addr)); @@ -89,7 +90,7 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("sync; lhz%U1%X1 %0,%1;\n" + __asm__ __volatile__("lhz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -97,20 +98,20 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) extern inline void out_le16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) : + __asm__ __volatile__("sthbrx %1,0,%2; eieio" : "=m" (*addr) : "r" (val), "r" (addr)); } extern inline void out_be16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); } extern inline unsigned in_le32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("sync; lwbrx %0,0,%1;\n" + __asm__ __volatile__("lwbrx %0,0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "r" (addr), "m" (*addr)); @@ -121,7 +122,7 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n" + __asm__ __volatile__("lwz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -129,13 +130,13 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) extern inline void out_le32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) : + __asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) : "r" (val), "r" (addr)); } extern inline void out_be32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + __asm__ __volatile__("stw%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); } #if defined (CONFIG_8260_PCI9) #define readb(addr) in_8((volatile u8 *)(addr)) @@ -259,7 +260,6 @@ extern __inline__ unsigned int name(unsigned int port) \ { \ unsigned int x; \ __asm__ __volatile__( \ - "sync\n" \ "0:" op " %0,0,%1\n" \ "1: twi 0,%0,0\n" \ "2: isync\n" \ @@ -285,7 +285,6 @@ extern __inline__ unsigned int name(unsigned int port) \ extern __inline__ void name(unsigned int val, unsigned int port) \ { \ __asm__ __volatile__( \ - "sync\n" \ "0:" op " %0,0,%1\n" \ "1: sync\n" \ "2:\n" \ diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h index da7746738..e1a0a7b21 100644 --- a/include/asm-ppc/machdep.h +++ b/include/asm-ppc/machdep.h @@ -2,6 +2,7 @@ #ifndef _PPC_MACHDEP_H #define _PPC_MACHDEP_H +#include #include #include diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h index 14584e505..9205db404 100644 --- a/include/asm-ppc/mmu.h +++ b/include/asm-ppc/mmu.h @@ -6,6 +6,7 @@ #ifndef _PPC_MMU_H_ #define _PPC_MMU_H_ +#include #ifndef __ASSEMBLY__ @@ -23,18 +24,25 @@ extern phys_addr_t fixup_bigphys_addr(phys_addr_t, phys_addr_t); #define PHYS_FMT "%16Lx" #endif -typedef struct { - unsigned long id; - unsigned long vdso_base; -} mm_context_t; +/* Default "unsigned long" context */ +typedef unsigned long mm_context_t; /* Hardware Page Table Entry */ typedef struct _PTE { +#ifdef CONFIG_PPC64BRIDGE + unsigned long long vsid:52; + unsigned long api:5; + unsigned long :5; + unsigned long h:1; + unsigned long v:1; + unsigned long long rpn:52; +#else /* CONFIG_PPC64BRIDGE */ unsigned long v:1; /* Entry is valid */ unsigned long vsid:24; /* Virtual segment identifier */ unsigned long h:1; /* Hash algorithm indicator */ unsigned long api:6; /* Abbreviated page index */ unsigned long rpn:20; /* Real (physical) page number */ +#endif /* CONFIG_PPC64BRIDGE */ unsigned long :3; /* Unused */ unsigned long r:1; /* Referenced */ unsigned long c:1; /* Changed */ @@ -75,7 +83,11 @@ typedef struct _P601_BATU { /* Upper part of BAT for 601 processor */ } P601_BATU; typedef struct _BATU { /* Upper part of BAT (all except 601) */ +#ifdef CONFIG_PPC64BRIDGE + unsigned long long bepi:47; +#else /* CONFIG_PPC64BRIDGE */ unsigned long bepi:15; /* Effective page index (virtual address) */ +#endif /* CONFIG_PPC64BRIDGE */ unsigned long :4; /* Unused */ unsigned long bl:11; /* Block size mask */ unsigned long vs:1; /* Supervisor valid */ @@ -90,7 +102,11 @@ typedef struct _P601_BATL { /* Lower part of BAT for 601 processor */ } P601_BATL; typedef struct _BATL { /* Lower part of BAT (all except 601) */ +#ifdef CONFIG_PPC64BRIDGE + unsigned long long brpn:47; +#else /* CONFIG_PPC64BRIDGE */ unsigned long brpn:15; /* Real page index (physical address) */ +#endif /* CONFIG_PPC64BRIDGE */ unsigned long :10; /* Unused */ unsigned long w:1; /* Write-thru cache */ unsigned long i:1; /* Cache inhibit */ diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h index 2bc8589cc..4f152cca1 100644 --- a/include/asm-ppc/mmu_context.h +++ b/include/asm-ppc/mmu_context.h @@ -2,6 +2,7 @@ #ifndef __PPC_MMU_CONTEXT_H #define __PPC_MMU_CONTEXT_H +#include #include #include #include @@ -70,7 +71,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) #else /* PPC 6xx, 7xx CPUs */ -#define NO_CONTEXT ((unsigned long) -1) +#define NO_CONTEXT ((mm_context_t) -1) #define LAST_CONTEXT 32767 #define FIRST_CONTEXT 1 #endif @@ -85,7 +86,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) * can be used for debugging on all processors (if you happen to have * an Abatron). */ -extern void set_context(unsigned long contextid, pgd_t *pgd); +extern void set_context(mm_context_t context, pgd_t *pgd); /* * Bitmap of contexts in use. @@ -98,7 +99,7 @@ extern unsigned long context_map[]; * Its use is an optimization only, we can't rely on this context * number to be free, but it usually will be. */ -extern unsigned long next_mmu_context; +extern mm_context_t next_mmu_context; /* * If we don't have sufficient contexts to give one to every task @@ -117,9 +118,9 @@ extern void steal_context(void); */ static inline void get_mmu_context(struct mm_struct *mm) { - unsigned long ctx; + mm_context_t ctx; - if (mm->context.id != NO_CONTEXT) + if (mm->context != NO_CONTEXT) return; #ifdef FEW_CONTEXTS while (atomic_dec_if_positive(&nr_free_contexts) < 0) @@ -132,7 +133,7 @@ static inline void get_mmu_context(struct mm_struct *mm) ctx = 0; } next_mmu_context = (ctx + 1) & LAST_CONTEXT; - mm->context.id = ctx; + mm->context = ctx; #ifdef FEW_CONTEXTS context_mm[ctx] = mm; #endif @@ -141,12 +142,7 @@ static inline void get_mmu_context(struct mm_struct *mm) /* * Set up the context for a new address space. */ -static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) -{ - mm->context.id = NO_CONTEXT; - mm->context.vdso_base = 0; - return 0; -} +#define init_new_context(tsk,mm) (((mm)->context = NO_CONTEXT), 0) /* * We're finished using the context for an address space. @@ -154,9 +150,9 @@ static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) static inline void destroy_context(struct mm_struct *mm) { preempt_disable(); - if (mm->context.id != NO_CONTEXT) { - clear_bit(mm->context.id, context_map); - mm->context.id = NO_CONTEXT; + if (mm->context != NO_CONTEXT) { + clear_bit(mm->context, context_map); + mm->context = NO_CONTEXT; #ifdef FEW_CONTEXTS atomic_inc(&nr_free_contexts); #endif @@ -184,7 +180,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, /* Setup new userspace context */ get_mmu_context(next); - set_context(next->context.id, next->pgd); + set_context(next->context, next->pgd); } #define deactivate_mm(tsk,mm) do { } while (0) diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index 23579d4af..6ba69a86b 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h @@ -8,6 +8,7 @@ #ifndef __ASM_PPC_MPC8260_H__ #define __ASM_PPC_MPC8260_H__ +#include #ifdef CONFIG_8260 @@ -82,7 +83,6 @@ enum ppc_sys_devices { MPC82xx_CPM_SMC2, MPC82xx_CPM_USB, MPC82xx_SEC1, - MPC82xx_MDIO_BB, NUM_PPC_SYS_DEVS, }; diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h index 02ed2c325..3c23fc43b 100644 --- a/include/asm-ppc/mpc83xx.h +++ b/include/asm-ppc/mpc83xx.h @@ -17,6 +17,7 @@ #ifndef __ASM_MPC83xx_H__ #define __ASM_MPC83xx_H__ +#include #include #ifdef CONFIG_83xx diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h index 9b4851199..f47002a60 100644 --- a/include/asm-ppc/mpc85xx.h +++ b/include/asm-ppc/mpc85xx.h @@ -17,6 +17,7 @@ #ifndef __ASM_MPC85xx_H__ #define __ASM_MPC85xx_H__ +#include #include #ifdef CONFIG_85xx @@ -27,9 +28,6 @@ #if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS) #include #endif -#ifdef CONFIG_MPC85xx_CDS -#include -#endif #ifdef CONFIG_MPC8560_ADS #include #endif diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index d3a2f2fe2..3515a7fa6 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h @@ -8,6 +8,7 @@ #ifndef __CONFIG_8xx_DEFS #define __CONFIG_8xx_DEFS +#include #ifdef CONFIG_8xx @@ -110,7 +111,6 @@ enum ppc_sys_devices { MPC8xx_CPM_SMC1, MPC8xx_CPM_SMC2, MPC8xx_CPM_USB, - MPC8xx_MDIO_FEC, NUM_PPC_SYS_DEVS, }; diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index 663edbee3..4f2405b83 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h index 16dbc7d17..983116f59 100644 --- a/include/asm-ppc/ocp.h +++ b/include/asm-ppc/ocp.h @@ -26,6 +26,8 @@ #include #include +#include +#include #include #include diff --git a/include/asm-ppc/open_pic.h b/include/asm-ppc/open_pic.h index a4fe962d9..ec2f46629 100644 --- a/include/asm-ppc/open_pic.h +++ b/include/asm-ppc/open_pic.h @@ -12,6 +12,7 @@ #ifndef _PPC_KERNEL_OPEN_PIC_H #define _PPC_KERNEL_OPEN_PIC_H +#include #include #define OPENPIC_SIZE 0x40000 diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h index dc57e41c6..a3cf8f5da 100644 --- a/include/asm-ppc/page.h +++ b/include/asm-ppc/page.h @@ -1,6 +1,7 @@ #ifndef _PPC_PAGE_H #define _PPC_PAGE_H +#include #include /* PAGE_SHIFT determines the page size */ @@ -14,6 +15,7 @@ #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) #ifdef __KERNEL__ +#include /* This must match what is in arch/ppc/Makefile */ #define PAGE_OFFSET CONFIG_KERNEL_START @@ -170,7 +172,7 @@ extern __inline__ int get_order(unsigned long size) #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -/* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */ +/* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */ #define __HAVE_ARCH_GATE_AREA 1 #define devmem_is_allowed(x) 1 diff --git a/include/asm-ppc/pc_serial.h b/include/asm-ppc/pc_serial.h index 81a2d0fda..8f994f9f8 100644 --- a/include/asm-ppc/pc_serial.h +++ b/include/asm-ppc/pc_serial.h @@ -9,6 +9,7 @@ * anyone using any of those on a PPC platform. -- paulus */ +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 11ffaaa5d..61434edba 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h @@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, #define HAVE_ARCH_PCI_RESOURCE_TO_USER extern void pci_resource_to_user(const struct pci_dev *dev, int bar, const struct resource *rsrc, - resource_size_t *start, resource_size_t *end); + u64 *start, u64 *end); #endif /* __KERNEL__ */ diff --git a/include/asm-ppc/pgalloc.h b/include/asm-ppc/pgalloc.h index d880c2703..48ae247d9 100644 --- a/include/asm-ppc/pgalloc.h +++ b/include/asm-ppc/pgalloc.h @@ -2,6 +2,7 @@ #ifndef _PPC_PGALLOC_H #define _PPC_PGALLOC_H +#include #include extern void __bad_pte(pmd_t *pmd); diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 51fa7c662..570b35516 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h @@ -4,6 +4,7 @@ #include +#include #ifndef __ASSEMBLY__ #include @@ -662,7 +663,7 @@ static inline int __ptep_test_and_clear_young(unsigned int context, unsigned lon return (old & _PAGE_ACCESSED) != 0; } #define ptep_test_and_clear_young(__vma, __addr, __ptep) \ - __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep) + __ptep_test_and_clear_young((__vma)->vm_mm->context, __addr, __ptep) #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma, diff --git a/include/asm-ppc/ppc4xx_dma.h b/include/asm-ppc/ppc4xx_dma.h index 935d1e053..46a086fff 100644 --- a/include/asm-ppc/ppc4xx_dma.h +++ b/include/asm-ppc/ppc4xx_dma.h @@ -24,6 +24,7 @@ #ifndef __ASMPPC_PPC4xx_DMA_H #define __ASMPPC_PPC4xx_DMA_H +#include #include #include #include diff --git a/include/asm-ppc/ppc4xx_pic.h b/include/asm-ppc/ppc4xx_pic.h index e44261206..c16c7f81c 100644 --- a/include/asm-ppc/ppc4xx_pic.h +++ b/include/asm-ppc/ppc4xx_pic.h @@ -17,6 +17,7 @@ #ifndef __PPC4XX_PIC_H__ #define __PPC4XX_PIC_H__ +#include #include #include diff --git a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h index 8a59f8871..b74af5461 100644 --- a/include/asm-ppc/serial.h +++ b/include/asm-ppc/serial.h @@ -6,6 +6,7 @@ #ifndef __ASM_SERIAL_H__ #define __ASM_SERIAL_H__ +#include #if defined(CONFIG_EV64260) #include diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h index 0b7fa8958..30e9268a8 100644 --- a/include/asm-ppc/smp.h +++ b/include/asm-ppc/smp.h @@ -10,6 +10,7 @@ #ifndef _PPC_SMP_H #define _PPC_SMP_H +#include #include #include #include diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 738943584..fb49c0c49 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -33,6 +33,7 @@ #define read_barrier_depends() do { } while(0) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h index f7eadf6ac..c86112323 100644 --- a/include/asm-ppc/time.h +++ b/include/asm-ppc/time.h @@ -9,6 +9,7 @@ #ifndef __ASM_TIME_H__ #define __ASM_TIME_H__ +#include #include #include #include diff --git a/include/asm-s390/Kbuild b/include/asm-s390/Kbuild deleted file mode 100644 index 14158a4a9..000000000 --- a/include/asm-s390/Kbuild +++ /dev/null @@ -1,11 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += dasd.h -header-y += qeth.h -header-y += tape390.h -header-y += ucontext.h -header-y += vtoc.h -header-y += z90crypt.h - -unifdef-y += cmb.h -unifdef-y += debug.h diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 0ddcdba79..ca092ffb7 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h @@ -12,9 +12,7 @@ * Copyright (C) 1992, Linus Torvalds * */ - -#ifdef __KERNEL__ - +#include #include /* @@ -53,6 +51,19 @@ * with operation of the form "set_bit(bitnr, flags)". */ +/* set ALIGN_CS to 1 if the SMP safe bit operations should + * align the address to 4 byte boundary. It seems to work + * without the alignment. + */ +#ifdef __KERNEL__ +#define ALIGN_CS 0 +#else +#define ALIGN_CS 1 +#ifndef CONFIG_SMP +#error "bitops won't work without CONFIG_SMP" +#endif +#endif + /* bitmap tables from arch/S390/kernel/bitmap.S */ extern const char _oi_bitmap[]; extern const char _ni_bitmap[]; @@ -111,6 +122,10 @@ static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make OR mask */ @@ -127,6 +142,10 @@ static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make AND mask */ @@ -143,6 +162,10 @@ static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make XOR mask */ @@ -160,6 +183,10 @@ test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make OR/test mask */ @@ -179,6 +206,10 @@ test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make AND/test mask */ @@ -198,6 +229,10 @@ test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr) unsigned long addr, old, new, mask; addr = (unsigned long) ptr; +#if ALIGN_CS == 1 + nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ + addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ +#endif /* calculate address for CS */ addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; /* make XOR/test mask */ @@ -800,6 +835,8 @@ static inline int sched_find_first_bit(unsigned long *b) #include +#ifdef __KERNEL__ + /* * ATTENTION: intel byte ordering convention for ext2 and minix !! * bit 0 is the LSB of addr; bit 31 is the MSB of addr; diff --git a/include/asm-s390/bug.h b/include/asm-s390/bug.h index 876898363..7ddaa05b9 100644 --- a/include/asm-s390/bug.h +++ b/include/asm-s390/bug.h @@ -5,18 +5,9 @@ #ifdef CONFIG_BUG -static inline __attribute__((noreturn)) void __do_illegal_op(void) -{ -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) - __builtin_trap(); -#else - asm volatile(".long 0"); -#endif -} - #define BUG() do { \ printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ - __do_illegal_op(); \ + __builtin_trap(); \ } while (0) #define HAVE_ARCH_BUG diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 58c70acff..12456cb2f 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h @@ -63,7 +63,7 @@ ccw_device_id_match(const struct ccw_device_id *array, return id; } - return NULL; + return 0; } /* The struct ccw device is our replacement for the globally accessible diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 28fdd6e2b..089cf567c 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h @@ -276,10 +276,6 @@ extern void wait_cons_dev(void); extern void clear_all_subchannels(void); -extern void cio_reset_channel_paths(void); - -extern void css_schedule_reprobe(void); - #endif #endif diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h index 241756f80..dae1dd4fb 100644 --- a/include/asm-s390/cmb.h +++ b/include/asm-s390/cmb.h @@ -44,6 +44,10 @@ struct cmbdata { #define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32) /* enable channel measurement */ #define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33) +/* reset channel measurement block */ +#define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34) +/* read channel measurement data */ +#define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,u64) /* read channel measurement data */ #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index c042f9578..1630c26e8 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h @@ -68,12 +68,10 @@ typedef struct dasd_information2_t { * 0x00: default features * 0x01: readonly (ro) * 0x02: use diag discipline (diag) - * 0x04: set the device initially online (internal use only) */ -#define DASD_FEATURE_DEFAULT 0x00 -#define DASD_FEATURE_READONLY 0x01 -#define DASD_FEATURE_USEDIAG 0x02 -#define DASD_FEATURE_INITIAL_ONLINE 0x04 +#define DASD_FEATURE_DEFAULT 0 +#define DASD_FEATURE_READONLY 1 +#define DASD_FEATURE_USEDIAG 2 #define DASD_PARTN_BITS 2 diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index c00dd2b3d..23450ed4b 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h @@ -9,7 +9,9 @@ #ifndef DEBUG_H #define DEBUG_H +#include #include +#include /* Note: * struct __debug_entry must be defined outside of #ifdef __KERNEL__ @@ -34,7 +36,6 @@ struct __debug_entry{ #define __DEBUG_FEATURE_VERSION 2 /* version of debug feature */ #ifdef __KERNEL__ -#include #include #include #include diff --git a/include/asm-s390/div64.h b/include/asm-s390/div64.h index 6cd978cef..af098dc3c 100644 --- a/include/asm-s390/div64.h +++ b/include/asm-s390/div64.h @@ -1 +1,49 @@ +#ifndef __S390_DIV64 +#define __S390_DIV64 + +#ifndef __s390x__ + +/* for do_div "base" needs to be smaller than 2^31-1 */ +#define do_div(n, base) ({ \ + unsigned long long __n = (n); \ + unsigned long __r; \ + \ + asm (" slr 0,0\n" \ + " l 1,%1\n" \ + " srdl 0,1\n" \ + " dr 0,%2\n" \ + " alr 1,1\n" \ + " alr 0,0\n" \ + " lhi 2,1\n" \ + " n 2,%1\n" \ + " alr 0,2\n" \ + " clr 0,%2\n" \ + " jl 0f\n" \ + " slr 0,%2\n" \ + " ahi 1,1\n" \ + "0: st 1,%1\n" \ + " l 1,4+%1\n" \ + " srdl 0,1\n" \ + " dr 0,%2\n" \ + " alr 1,1\n" \ + " alr 0,0\n" \ + " lhi 2,1\n" \ + " n 2,4+%1\n" \ + " alr 0,2\n" \ + " clr 0,%2\n" \ + " jl 1f\n" \ + " slr 0,%2\n" \ + " ahi 1,1\n" \ + "1: st 1,4+%1\n" \ + " lr %0,0" \ + : "=d" (__r), "=m" (__n) \ + : "d" (base), "m" (__n) : "0", "1", "2", "cc" ); \ + (n) = (__n); \ + __r; \ +}) + +#else /* __s390x__ */ #include +#endif /* __s390x__ */ + +#endif diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h index c0d629d61..710646e64 100644 --- a/include/asm-s390/elf.h +++ b/include/asm-s390/elf.h @@ -92,30 +92,29 @@ /* Keep this the last entry. */ #define R_390_NUM 61 -/* - * These are used to set parameters in the core dumps. - */ -#ifndef __s390x__ -#define ELF_CLASS ELFCLASS32 -#else /* __s390x__ */ -#define ELF_CLASS ELFCLASS64 -#endif /* __s390x__ */ -#define ELF_DATA ELFDATA2MSB -#define ELF_ARCH EM_S390 - /* * ELF register definitions.. */ +#include /* for task_struct */ #include #include +#include /* for save_access_regs */ + typedef s390_fp_regs elf_fpregset_t; typedef s390_regs elf_gregset_t; -#ifdef __KERNEL__ -#include /* for task_struct */ -#include /* for save_access_regs */ +/* + * These are used to set parameters in the core dumps. + */ +#ifndef __s390x__ +#define ELF_CLASS ELFCLASS32 +#else /* __s390x__ */ +#define ELF_CLASS ELFCLASS64 +#endif /* __s390x__ */ +#define ELF_DATA ELFDATA2MSB +#define ELF_ARCH EM_S390 /* * This is used to ensure we don't load something for the wrong architecture. @@ -199,6 +198,7 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs) #define ELF_PLATFORM (NULL) +#ifdef __KERNEL__ #ifndef __s390x__ #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) #else /* __s390x__ */ diff --git a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h index e84b7ef54..6792c559a 100644 --- a/include/asm-s390/hardirq.h +++ b/include/asm-s390/hardirq.h @@ -12,6 +12,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-s390/idals.h b/include/asm-s390/idals.h index e82c10efe..8038858b8 100644 --- a/include/asm-s390/idals.h +++ b/include/asm-s390/idals.h @@ -13,6 +13,7 @@ #ifndef _S390_IDALS_H #define _S390_IDALS_H +#include #include #include #include diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index d4614b35f..b05825dd1 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h @@ -86,25 +86,20 @@ extern void iounmap(void *addr); #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) -#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) -#define readq_relaxed(addr) readq(addr) #define __raw_readb readb #define __raw_readw readw #define __raw_readl readl -#define __raw_readq readq #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) -#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel -#define __raw_writeq writeq #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) diff --git a/include/asm-s390/irq.h b/include/asm-s390/irq.h index bd1a721f7..916a1aa0b 100644 --- a/include/asm-s390/irq.h +++ b/include/asm-s390/irq.h @@ -21,6 +21,10 @@ enum interruption_class { #define touch_nmi_watchdog() do { } while(0) +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-s390/irqflags.h b/include/asm-s390/irqflags.h deleted file mode 100644 index 3b566a5b3..000000000 --- a/include/asm-s390/irqflags.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * include/asm-s390/irqflags.h - * - * Copyright (C) IBM Corp. 2006 - * Author(s): Heiko Carstens - */ - -#ifndef __ASM_IRQFLAGS_H -#define __ASM_IRQFLAGS_H - -#ifdef __KERNEL__ - -/* interrupt control.. */ -#define raw_local_irq_enable() ({ \ - unsigned long __dummy; \ - __asm__ __volatile__ ( \ - "stosm 0(%1),0x03" \ - : "=m" (__dummy) : "a" (&__dummy) : "memory" ); \ - }) - -#define raw_local_irq_disable() ({ \ - unsigned long __flags; \ - __asm__ __volatile__ ( \ - "stnsm 0(%1),0xfc" : "=m" (__flags) : "a" (&__flags) ); \ - __flags; \ - }) - -#define raw_local_save_flags(x) \ -do { \ - typecheck(unsigned long, x); \ - __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ); \ -} while (0) - -#define raw_local_irq_restore(x) \ -do { \ - typecheck(unsigned long, x); \ - __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory"); \ -} while (0) - -#define raw_irqs_disabled() \ -({ \ - unsigned long flags; \ - raw_local_save_flags(flags); \ - !((flags >> __FLAG_SHIFT) & 3); \ -}) - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return !((flags >> __FLAG_SHIFT) & 3); -} - -/* For spinlocks etc */ -#define raw_local_irq_save(x) ((x) = raw_local_irq_disable()) - -#endif /* __KERNEL__ */ -#endif /* __ASM_IRQFLAGS_H */ diff --git a/include/asm-s390/local.h b/include/asm-s390/local.h index 86745a1b2..cf8189009 100644 --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h @@ -1,6 +1,7 @@ #ifndef _ASM_LOCAL_H #define _ASM_LOCAL_H +#include #include #include diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index 596c8b172..bea727904 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h @@ -124,6 +124,7 @@ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index b59fea4e2..3ecd741a6 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h @@ -9,6 +9,7 @@ #ifndef _S390_PAGE_H #define _S390_PAGE_H +#include #include /* PAGE_SHIFT determines the page size */ @@ -19,7 +20,6 @@ #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) #ifdef __KERNEL__ -#include #ifndef __ASSEMBLY__ #ifndef __s390x__ @@ -189,11 +189,11 @@ page_get_storage_key(unsigned long addr) #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include +#include + #endif /* _S390_PAGE_H */ diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 28b3517e7..436d21660 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h @@ -40,9 +40,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; __typeof__(type) per_cpu__##name #define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) -#define __raw_get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) #define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu]) -#define per_cpu_offset(x) (__per_cpu_offset[x]) /* A macro to avoid #include hell... */ #define percpu_modcopy(pcpudst, src, size) \ @@ -59,7 +57,6 @@ do { \ __typeof__(type) per_cpu__##name #define __get_cpu_var(var) __reloc_hide(var,0) -#define __raw_get_cpu_var(var) __reloc_hide(var,0) #define per_cpu(var,cpu) __reloc_hide(var,0) #endif /* SMP */ diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 808c15e6d..0259469cc 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h @@ -13,6 +13,7 @@ #ifndef _S390_PGALLOC_H #define _S390_PGALLOC_H +#include #include #include #include @@ -146,7 +147,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long vmaddr) pte_t *pte = pte_alloc_one_kernel(mm, vmaddr); if (pte) return virt_to_page(pte); - return NULL; + return 0; } static inline void pte_free_kernel(pte_t *pte) diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 24312387f..859b5e969 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -657,6 +657,13 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) __pte; \ }) +#define SetPageUptodate(_page) \ + do { \ + struct page *__page = (_page); \ + if (!test_and_set_bit(PG_uptodate, &__page->flags)) \ + page_test_and_clear_dirty(_page); \ + } while (0) + #ifdef __s390x__ #define pfn_pmd(pfn, pgprot) \ diff --git a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h index b94c98856..61788de3c 100644 --- a/include/asm-s390/posix_types.h +++ b/include/asm-s390/posix_types.h @@ -76,36 +76,24 @@ typedef struct { } __kernel_fsid_t; -#ifdef __KERNEL__ - -#undef __FD_SET -static inline void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - fdsetp->fds_bits[_tmp] |= (1UL<<_rem); -} - -#undef __FD_CLR -static inline void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); -} - -#undef __FD_ISSET -static inline int __FD_ISSET(unsigned long fd, const __kernel_fd_set *fdsetp) -{ - unsigned long _tmp = fd / __NFDBITS; - unsigned long _rem = fd % __NFDBITS; - return (fdsetp->fds_bits[_tmp] & (1UL<<_rem)) != 0; -} +#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) + +#ifndef _S390_BITOPS_H +#include +#endif + +#undef __FD_SET +#define __FD_SET(fd,fdsetp) set_bit((fd),(fdsetp)->fds_bits) + +#undef __FD_CLR +#define __FD_CLR(fd,fdsetp) clear_bit((fd),(fdsetp)->fds_bits) + +#undef __FD_ISSET +#define __FD_ISSET(fd,fdsetp) test_bit((fd),(fdsetp)->fds_bits) #undef __FD_ZERO -#define __FD_ZERO(fdsetp) \ - ((void) memset ((__ptr_t) (fdsetp), 0, sizeof (__kernel_fd_set))) +#define __FD_ZERO(fdsetp) (memset ((fdsetp), 0, sizeof(*(fd_set *)(fdsetp)))) -#endif /* __KERNEL__ */ +#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)*/ #endif diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 5b71d3731..c5cbc4bd8 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h @@ -199,13 +199,15 @@ unsigned long get_wchan(struct task_struct *p); /* * Give up the time slice of the virtual PU. */ -static inline void cpu_relax(void) -{ - if (MACHINE_HAS_DIAG44) - asm volatile ("diag 0,0,68" : : : "memory"); - else - barrier(); -} +#ifndef __s390x__ +# define cpu_relax() asm volatile ("diag 0,0,68" : : : "memory") +#else /* __s390x__ */ +# define cpu_relax() \ + do { \ + if (MACHINE_HAS_DIAG44) \ + asm volatile ("diag 0,0,68" : : : "memory"); \ + } while (0) +#endif /* __s390x__ */ /* * Set PSW to specified value. diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index 4d75d77b0..a949cc077 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h @@ -181,8 +181,11 @@ #define PTRACE_OLDSETOPTIONS 21 #ifndef __ASSEMBLY__ +#include #include #include +#include +#include typedef union { @@ -298,9 +301,6 @@ typedef struct } s390_regs; #ifdef __KERNEL__ -#include -#include - /* * The pt_regs struct defines the way the registers are stored on * the stack during a system call. diff --git a/include/asm-s390/rwsem.h b/include/asm-s390/rwsem.h index 13ec16965..0422a085d 100644 --- a/include/asm-s390/rwsem.h +++ b/include/asm-s390/rwsem.h @@ -61,9 +61,6 @@ struct rw_semaphore { signed long count; spinlock_t wait_lock; struct list_head wait_list; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif }; #ifndef __s390x__ @@ -83,16 +80,8 @@ struct rw_semaphore { /* * initialisation */ - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } -#else -# define __RWSEM_DEP_MAP_INIT(lockname) -#endif - #define __RWSEM_INITIALIZER(name) \ -{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ - __RWSEM_DEP_MAP_INIT(name) } +{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -104,17 +93,6 @@ static inline void init_rwsem(struct rw_semaphore *sem) INIT_LIST_HEAD(&sem->wait_list); } -extern void __init_rwsem(struct rw_semaphore *sem, const char *name, - struct lock_class_key *key); - -#define init_rwsem(sem) \ -do { \ - static struct lock_class_key __key; \ - \ - __init_rwsem((sem), #sem, &__key); \ -} while (0) - - /* * lock for reading */ @@ -177,7 +155,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem) /* * lock for writing */ -static inline void __down_write_nested(struct rw_semaphore *sem, int subclass) +static inline void __down_write(struct rw_semaphore *sem) { signed long old, new, tmp; @@ -203,11 +181,6 @@ static inline void __down_write_nested(struct rw_semaphore *sem, int subclass) rwsem_down_write_failed(sem); } -static inline void __down_write(struct rw_semaphore *sem) -{ - __down_write_nested(sem, 0); -} - /* * trylock for writing -- returns 1 if successful, 0 if contention */ diff --git a/include/asm-s390/semaphore.h b/include/asm-s390/semaphore.h index 32cdc69f3..702cf4366 100644 --- a/include/asm-s390/semaphore.h +++ b/include/asm-s390/semaphore.h @@ -37,8 +37,7 @@ struct semaphore { static inline void sema_init (struct semaphore *sem, int val) { - atomic_set(&sem->count, val); - init_waitqueue_head(&sem->wait); + *sem = (struct semaphore) __SEMAPHORE_INITIALIZER((*sem),val); } static inline void init_MUTEX (struct semaphore *sem) diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 19e319793..da3fd4a7b 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h @@ -40,16 +40,15 @@ extern unsigned long machine_flags; #define MACHINE_IS_VM (machine_flags & 1) #define MACHINE_IS_P390 (machine_flags & 4) #define MACHINE_HAS_MVPG (machine_flags & 16) +#define MACHINE_HAS_DIAG44 (machine_flags & 32) #define MACHINE_HAS_IDTE (machine_flags & 128) #ifndef __s390x__ #define MACHINE_HAS_IEEE (machine_flags & 2) #define MACHINE_HAS_CSP (machine_flags & 8) -#define MACHINE_HAS_DIAG44 (1) #else /* __s390x__ */ #define MACHINE_HAS_IEEE (1) #define MACHINE_HAS_CSP (1) -#define MACHINE_HAS_DIAG44 (machine_flags & 32) #endif /* __s390x__ */ diff --git a/include/asm-s390/sfp-machine.h b/include/asm-s390/sfp-machine.h index de69dfa46..3c79b5384 100644 --- a/include/asm-s390/sfp-machine.h +++ b/include/asm-s390/sfp-machine.h @@ -25,6 +25,7 @@ #ifndef _SFP_MACHINE_H #define _SFP_MACHINE_H +#include #define _FP_W_TYPE_SIZE 32 #define _FP_W_TYPE unsigned long diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index f6cfddb27..7084626de 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h @@ -84,6 +84,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -103,6 +104,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 657646054..444dae591 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h @@ -10,6 +10,7 @@ #ifndef __ASM_SMP_H #define __ASM_SMP_H +#include #include #include #include diff --git a/include/asm-s390/socket.h b/include/asm-s390/socket.h index 1778a49a7..15a5298c8 100644 --- a/include/asm-s390/socket.h +++ b/include/asm-s390/socket.h @@ -56,6 +56,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index 16040048c..6a89dbb03 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h @@ -11,6 +11,7 @@ #ifndef __ASM_SYSTEM_H #define __ASM_SYSTEM_H +#include #include #include #include @@ -128,13 +129,8 @@ extern void account_system_vtime(struct task_struct *); #define nop() __asm__ __volatile__ ("nop") -#define xchg(ptr,x) \ -({ \ - __typeof__(*(ptr)) __ret; \ - __ret = (__typeof__(*(ptr))) \ - __xchg((unsigned long)(x), (void *)(ptr),sizeof(*(ptr))); \ - __ret; \ -}) +#define xchg(ptr,x) \ + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(void *)(ptr),sizeof(*(ptr)))) static inline unsigned long __xchg(unsigned long x, void * ptr, int size) { @@ -304,6 +300,35 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) + +/* interrupt control.. */ +#define local_irq_enable() ({ \ + unsigned long __dummy; \ + __asm__ __volatile__ ( \ + "stosm 0(%1),0x03" \ + : "=m" (__dummy) : "a" (&__dummy) : "memory" ); \ + }) + +#define local_irq_disable() ({ \ + unsigned long __flags; \ + __asm__ __volatile__ ( \ + "stnsm 0(%1),0xfc" : "=m" (__flags) : "a" (&__flags) ); \ + __flags; \ + }) + +#define local_save_flags(x) \ + __asm__ __volatile__("stosm 0(%1),0" : "=m" (x) : "a" (&x), "m" (x) ) + +#define local_irq_restore(x) \ + __asm__ __volatile__("ssm 0(%0)" : : "a" (&x), "m" (x) : "memory") + +#define irqs_disabled() \ +({ \ + unsigned long flags; \ + local_save_flags(flags); \ + !((flags >> __FLAG_SHIFT) & 3); \ +}) #ifdef __s390x__ @@ -418,7 +443,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) }) #endif /* __s390x__ */ -#include +/* For spinlocks etc */ +#define local_irq_save(x) ((x) = local_irq_disable()) /* * Use to set psw mask except for the first byte which @@ -457,3 +483,4 @@ extern void (*_machine_power_off)(void); #endif /* __KERNEL__ */ #endif + diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h index 0a518915b..8e0c7ed73 100644 --- a/include/asm-s390/thread_info.h +++ b/include/asm-s390/thread_info.h @@ -63,7 +63,6 @@ struct thread_info { .exec_domain = &default_exec_domain, \ .flags = 0, \ .cpu = 0, \ - .preempt_count = 1, \ .restart_block = { \ .fn = do_no_restart_syscall, \ }, \ diff --git a/include/asm-s390/timex.h b/include/asm-s390/timex.h index 5d0332a4c..4848057da 100644 --- a/include/asm-s390/timex.h +++ b/include/asm-s390/timex.h @@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void) { cycles_t cycles; - __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); + __asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); return cycles >> 2; } @@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void) { unsigned long long clk; - __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); + __asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); return clk; } diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index 73cd85beb..1bb73b0e6 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _S390_TLBFLUSH_H #define _S390_TLBFLUSH_H +#include #include #include diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index ae2951cc8..5738ad635 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h @@ -58,6 +58,7 @@ typedef __signed__ long saddr_t; #ifndef __ASSEMBLY__ +#include typedef signed char s8; typedef unsigned char u8; diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index e15cf988e..78e34a8eb 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h @@ -392,11 +392,11 @@ #endif -#ifdef __KERNEL__ +/* user-visible error numbers are in the range -1 - -122: see */ #define __syscall_return(type, res) \ do { \ - if ((unsigned long)(res) >= (unsigned long)(-4095)) {\ + if ((unsigned long)(res) >= (unsigned long)(-125)) { \ errno = -(res); \ res = -1; \ } \ @@ -546,6 +546,7 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ __syscall_return(type,__res); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_ALARM @@ -572,9 +573,11 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ # define __ARCH_WANT_COMPAT_SYS_TIME # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND # endif +#endif #ifdef __KERNEL_SYSCALLS__ +#include #include #include #include @@ -622,7 +625,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -632,5 +635,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _ASM_S390_UNISTD_H_ */ diff --git a/include/asm-s390/vtoc.h b/include/asm-s390/vtoc.h index 3a5267d90..d1de5b7eb 100644 --- a/include/asm-s390/vtoc.h +++ b/include/asm-s390/vtoc.h @@ -177,27 +177,27 @@ struct vtoc_format7_label } __attribute__ ((packed)); struct vtoc_cms_label { - __u8 label_id[4]; /* Label identifier */ - __u8 vol_id[6]; /* Volid */ - __u16 version_id; /* Version identifier */ - __u32 block_size; /* Disk block size */ - __u32 origin_ptr; /* Disk origin pointer */ - __u32 usable_count; /* Number of usable cylinders/blocks */ - __u32 formatted_count; /* Maximum number of formatted cylinders/ + u8 label_id[4]; /* Label identifier */ + u8 vol_id[6]; /* Volid */ + u16 version_id; /* Version identifier */ + u32 block_size; /* Disk block size */ + u32 origin_ptr; /* Disk origin pointer */ + u32 usable_count; /* Number of usable cylinders/blocks */ + u32 formatted_count; /* Maximum number of formatted cylinders/ * blocks */ - __u32 block_count; /* Disk size in CMS blocks */ - __u32 used_count; /* Number of CMS blocks in use */ - __u32 fst_size; /* File Status Table (FST) size */ - __u32 fst_count; /* Number of FSTs per CMS block */ - __u8 format_date[6]; /* Disk FORMAT date */ - __u8 reserved1[2]; - __u32 disk_offset; /* Disk offset when reserved*/ - __u32 map_block; /* Allocation Map Block with next hole */ - __u32 hblk_disp; /* Displacement into HBLK data of next hole */ - __u32 user_disp; /* Displacement into user part of Allocation + u32 block_count; /* Disk size in CMS blocks */ + u32 used_count; /* Number of CMS blocks in use */ + u32 fst_size; /* File Status Table (FST) size */ + u32 fst_count; /* Number of FSTs per CMS block */ + u8 format_date[6]; /* Disk FORMAT date */ + u8 reserved1[2]; + u32 disk_offset; /* Disk offset when reserved*/ + u32 map_block; /* Allocation Map Block with next hole */ + u32 hblk_disp; /* Displacement into HBLK data of next hole */ + u32 user_disp; /* Displacement into user part of Allocation * map */ - __u8 reserved2[4]; - __u8 segment_name[8]; /* Name of shared segment */ + u8 reserved2[4]; + u8 segment_name[8]; /* Name of shared segment */ } __attribute__ ((packed)); #endif /* _ASM_S390_VTOC_H */ diff --git a/include/asm-s390/z90crypt.h b/include/asm-s390/z90crypt.h deleted file mode 100644 index 31a2439b0..000000000 --- a/include/asm-s390/z90crypt.h +++ /dev/null @@ -1,212 +0,0 @@ -/* - * include/asm-s390/z90crypt.h - * - * z90crypt 1.3.3 (user-visible header) - * - * Copyright (C) 2001, 2005 IBM Corporation - * Author(s): Robert Burroughs - * Eric Rossman (edrossma@us.ibm.com) - * - * Hotplug & misc device support: Jochen Roehrig (roehrig@de.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, 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 __ASM_S390_Z90CRYPT_H -#define __ASM_S390_Z90CRYPT_H -#include - -#define z90crypt_VERSION 1 -#define z90crypt_RELEASE 3 // 2 = PCIXCC, 3 = rewrite for coding standards -#define z90crypt_VARIANT 3 // 3 = CEX2A support - -/** - * struct ica_rsa_modexpo - * - * Requirements: - * - outputdatalength is at least as large as inputdatalength. - * - All key parts are right justified in their fields, padded on - * the left with zeroes. - * - length(b_key) = inputdatalength - * - length(n_modulus) = inputdatalength - */ -struct ica_rsa_modexpo { - char __user * inputdata; - unsigned int inputdatalength; - char __user * outputdata; - unsigned int outputdatalength; - char __user * b_key; - char __user * n_modulus; -}; - -/** - * struct ica_rsa_modexpo_crt - * - * Requirements: - * - inputdatalength is even. - * - outputdatalength is at least as large as inputdatalength. - * - All key parts are right justified in their fields, padded on - * the left with zeroes. - * - length(bp_key) = inputdatalength/2 + 8 - * - length(bq_key) = inputdatalength/2 - * - length(np_key) = inputdatalength/2 + 8 - * - length(nq_key) = inputdatalength/2 - * - length(u_mult_inv) = inputdatalength/2 + 8 - */ -struct ica_rsa_modexpo_crt { - char __user * inputdata; - unsigned int inputdatalength; - char __user * outputdata; - unsigned int outputdatalength; - char __user * bp_key; - char __user * bq_key; - char __user * np_prime; - char __user * nq_prime; - char __user * u_mult_inv; -}; - -#define Z90_IOCTL_MAGIC 'z' // NOTE: Need to allocate from linux folks - -/** - * Interface notes: - * - * The ioctl()s which are implemented (along with relevant details) - * are: - * - * ICARSAMODEXPO - * Perform an RSA operation using a Modulus-Exponent pair - * This takes an ica_rsa_modexpo struct as its arg. - * - * NOTE: please refer to the comments preceding this structure - * for the implementation details for the contents of the - * block - * - * ICARSACRT - * Perform an RSA operation using a Chinese-Remainder Theorem key - * This takes an ica_rsa_modexpo_crt struct as its arg. - * - * NOTE: please refer to the comments preceding this structure - * for the implementation details for the contents of the - * block - * - * Z90STAT_TOTALCOUNT - * Return an integer count of all device types together. - * - * Z90STAT_PCICACOUNT - * Return an integer count of all PCICAs. - * - * Z90STAT_PCICCCOUNT - * Return an integer count of all PCICCs. - * - * Z90STAT_PCIXCCMCL2COUNT - * Return an integer count of all MCL2 PCIXCCs. - * - * Z90STAT_PCIXCCMCL3COUNT - * Return an integer count of all MCL3 PCIXCCs. - * - * Z90STAT_CEX2CCOUNT - * Return an integer count of all CEX2Cs. - * - * Z90STAT_CEX2ACOUNT - * Return an integer count of all CEX2As. - * - * Z90STAT_REQUESTQ_COUNT - * Return an integer count of the number of entries waiting to be - * sent to a device. - * - * Z90STAT_PENDINGQ_COUNT - * Return an integer count of the number of entries sent to a - * device awaiting the reply. - * - * Z90STAT_TOTALOPEN_COUNT - * Return an integer count of the number of open file handles. - * - * Z90STAT_DOMAIN_INDEX - * Return the integer value of the Cryptographic Domain. - * - * Z90STAT_STATUS_MASK - * Return an 64 element array of unsigned chars for the status of - * all devices. - * 0x01: PCICA - * 0x02: PCICC - * 0x03: PCIXCC_MCL2 - * 0x04: PCIXCC_MCL3 - * 0x05: CEX2C - * 0x06: CEX2A - * 0x0d: device is disabled via the proc filesystem - * - * Z90STAT_QDEPTH_MASK - * Return an 64 element array of unsigned chars for the queue - * depth of all devices. - * - * Z90STAT_PERDEV_REQCNT - * Return an 64 element array of unsigned integers for the number - * of successfully completed requests per device since the device - * was detected and made available. - * - * ICAZ90STATUS (deprecated) - * Return some device driver status in a ica_z90_status struct - * This takes an ica_z90_status struct as its arg. - * - * NOTE: this ioctl() is deprecated, and has been replaced with - * single ioctl()s for each type of status being requested - * - * Z90STAT_PCIXCCCOUNT (deprecated) - * Return an integer count of all PCIXCCs (MCL2 + MCL3). - * This is DEPRECATED now that MCL3 PCIXCCs are treated differently from - * MCL2 PCIXCCs. - * - * Z90QUIESCE (not recommended) - * Quiesce the driver. This is intended to stop all new - * requests from being processed. Its use is NOT recommended, - * except in circumstances where there is no other way to stop - * callers from accessing the driver. Its original use was to - * allow the driver to be "drained" of work in preparation for - * a system shutdown. - * - * NOTE: once issued, this ban on new work cannot be undone - * except by unloading and reloading the driver. - */ - -/** - * Supported ioctl calls - */ -#define ICARSAMODEXPO _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x05, 0) -#define ICARSACRT _IOC(_IOC_READ|_IOC_WRITE, Z90_IOCTL_MAGIC, 0x06, 0) - -/* DEPRECATED status calls (bound for removal at some point) */ -#define ICAZ90STATUS _IOR(Z90_IOCTL_MAGIC, 0x10, struct ica_z90_status) -#define Z90STAT_PCIXCCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x43, int) - -/* unrelated to ICA callers */ -#define Z90QUIESCE _IO(Z90_IOCTL_MAGIC, 0x11) - -/* New status calls */ -#define Z90STAT_TOTALCOUNT _IOR(Z90_IOCTL_MAGIC, 0x40, int) -#define Z90STAT_PCICACOUNT _IOR(Z90_IOCTL_MAGIC, 0x41, int) -#define Z90STAT_PCICCCOUNT _IOR(Z90_IOCTL_MAGIC, 0x42, int) -#define Z90STAT_PCIXCCMCL2COUNT _IOR(Z90_IOCTL_MAGIC, 0x4b, int) -#define Z90STAT_PCIXCCMCL3COUNT _IOR(Z90_IOCTL_MAGIC, 0x4c, int) -#define Z90STAT_CEX2CCOUNT _IOR(Z90_IOCTL_MAGIC, 0x4d, int) -#define Z90STAT_CEX2ACOUNT _IOR(Z90_IOCTL_MAGIC, 0x4e, int) -#define Z90STAT_REQUESTQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x44, int) -#define Z90STAT_PENDINGQ_COUNT _IOR(Z90_IOCTL_MAGIC, 0x45, int) -#define Z90STAT_TOTALOPEN_COUNT _IOR(Z90_IOCTL_MAGIC, 0x46, int) -#define Z90STAT_DOMAIN_INDEX _IOR(Z90_IOCTL_MAGIC, 0x47, int) -#define Z90STAT_STATUS_MASK _IOR(Z90_IOCTL_MAGIC, 0x48, char[64]) -#define Z90STAT_QDEPTH_MASK _IOR(Z90_IOCTL_MAGIC, 0x49, char[64]) -#define Z90STAT_PERDEV_REQCNT _IOR(Z90_IOCTL_MAGIC, 0x4a, int[64]) - -#endif /* __ASM_S390_Z90CRYPT_H */ diff --git a/include/asm-sh/Kbuild b/include/asm-sh/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-sh/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index 1b4fc52a5..70508a360 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_BUG_H #define __ASM_SH_BUG_H +#include #ifdef CONFIG_BUG /* diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h index fa03b30c4..5ebd0f242 100644 --- a/include/asm-sh/checksum.h +++ b/include/asm-sh/checksum.h @@ -9,6 +9,7 @@ * Copyright (C) 1999 by Kaz Kojima & Niibe Yutaka */ +#include #include /* diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index 124968f98..48f1f42c5 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_DMA_MAPPING_H #define __ASM_SH_DMA_MAPPING_H +#include #include #include #include diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h index e62a6d0ed..a118a0d43 100644 --- a/include/asm-sh/dma.h +++ b/include/asm-sh/dma.h @@ -11,6 +11,7 @@ #define __ASM_SH_DMA_H #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-sh/fixmap.h b/include/asm-sh/fixmap.h index 412bccaa0..509224bdb 100644 --- a/include/asm-sh/fixmap.h +++ b/include/asm-sh/fixmap.h @@ -13,6 +13,7 @@ #ifndef _ASM_FIXMAP_H #define _ASM_FIXMAP_H +#include #include #include #ifdef CONFIG_HIGHMEM diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index dc1ad464f..38d7a2942 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h @@ -146,11 +146,13 @@ static int vdma_get_dma_residue(unsigned int dummy) static int fd_request_irq(void) { if(can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); else return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); + } static unsigned long dma_mem_alloc(unsigned long size) diff --git a/include/asm-sh/hardirq.h b/include/asm-sh/hardirq.h index 715ee237f..f2fdf0f76 100644 --- a/include/asm-sh/hardirq.h +++ b/include/asm-sh/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_HARDIRQ_H #define __ASM_SH_HARDIRQ_H +#include #include #include diff --git a/include/asm-sh/hd64461/hd64461.h b/include/asm-sh/hd64461/hd64461.h index 87f13d24c..c457ca277 100644 --- a/include/asm-sh/hd64461/hd64461.h +++ b/include/asm-sh/hd64461/hd64461.h @@ -5,6 +5,7 @@ * Copyright (C) 2000 YAEGASHI Takeshi * Hitachi HD64461 companion chip support */ +#include /* Constants for PCMCIA mappings */ #define HD64461_PCC_WINDOW 0x01000000 diff --git a/include/asm-sh/hd64465/hd64465.h b/include/asm-sh/hd64465/hd64465.h index cfd0e803d..c672032b7 100644 --- a/include/asm-sh/hd64465/hd64465.h +++ b/include/asm-sh/hd64465/hd64465.h @@ -11,6 +11,7 @@ * Derived from which bore the message: * Copyright (C) 2000 YAEGASHI Takeshi */ +#include #include #include diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h index fed266169..1d934fb2c 100644 --- a/include/asm-sh/hw_irq.h +++ b/include/asm-sh/hw_irq.h @@ -1,4 +1,9 @@ #ifndef __ASM_SH_HW_IRQ_H #define __ASM_SH_HW_IRQ_H +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{ + /* Nothing to do */ +} + #endif /* __ASM_SH_HW_IRQ_H */ diff --git a/include/asm-sh/ide.h b/include/asm-sh/ide.h index 9f8e9142d..711dad4cb 100644 --- a/include/asm-sh/ide.h +++ b/include/asm-sh/ide.h @@ -14,6 +14,7 @@ #ifdef __KERNEL__ +#include #define ide_default_io_ctl(base) (0) diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 894e64b2d..2c3afe713 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h @@ -23,6 +23,7 @@ * inb by default expands to _inb, but the machine specific code may * define it to __inb if it chooses. */ +#include #include #include #include diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 611e67cd0..42b8394c0 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h @@ -11,6 +11,7 @@ * */ +#include #include #include /* for pt_regs */ diff --git a/include/asm-sh/keyboard.h b/include/asm-sh/keyboard.h index 31dcc4fa5..1103df003 100644 --- a/include/asm-sh/keyboard.h +++ b/include/asm-sh/keyboard.h @@ -5,6 +5,7 @@ */ #include +#include #include #ifdef CONFIG_SH_MPC1211 diff --git a/include/asm-sh/kmap_types.h b/include/asm-sh/kmap_types.h index 84d565c69..2492ba071 100644 --- a/include/asm-sh/kmap_types.h +++ b/include/asm-sh/kmap_types.h @@ -3,6 +3,7 @@ /* Dummy header just to define km_type. */ +#include #ifdef CONFIG_DEBUG_HIGHMEM # define D(n) __KM_FENCE_##n , diff --git a/include/asm-sh/machvec.h b/include/asm-sh/machvec.h index 550501fa4..550c50a73 100644 --- a/include/asm-sh/machvec.h +++ b/include/asm-sh/machvec.h @@ -10,6 +10,7 @@ #ifndef _ASM_SH_MACHVEC_H #define _ASM_SH_MACHVEC_H 1 +#include #include #include diff --git a/include/asm-sh/machvec_init.h b/include/asm-sh/machvec_init.h index e397798eb..9e7de808f 100644 --- a/include/asm-sh/machvec_init.h +++ b/include/asm-sh/machvec_init.h @@ -12,6 +12,7 @@ #ifndef __SH_MACHVEC_INIT_H #define __SH_MACHVEC_INIT_H +#include /* * In a GENERIC kernel, we have lots of these vectors floating about, diff --git a/include/asm-sh/mpc1211/dma.h b/include/asm-sh/mpc1211/dma.h index e506d1aaa..0a2fdab3e 100644 --- a/include/asm-sh/mpc1211/dma.h +++ b/include/asm-sh/mpc1211/dma.h @@ -8,6 +8,7 @@ #ifndef _ASM_MPC1211_DMA_H #define _ASM_MPC1211_DMA_H +#include #include /* And spinlocks */ #include /* need byte IO */ #include diff --git a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h index 71ef4cf42..5f0b9088c 100644 --- a/include/asm-sh/mpc1211/keyboard.h +++ b/include/asm-sh/mpc1211/keyboard.h @@ -57,7 +57,7 @@ extern unsigned char pckbd_sysrq_xlate[128]; #define AUX_IRQ 12 #define aux_request_irq(hand, dev_id) \ - request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id) + request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) diff --git a/include/asm-sh/overdrive/overdrive.h b/include/asm-sh/overdrive/overdrive.h index fc746c244..aa62ae68c 100644 --- a/include/asm-sh/overdrive/overdrive.h +++ b/include/asm-sh/overdrive/overdrive.h @@ -6,6 +6,7 @@ * */ +#include #ifndef __OVERDRIVE_H__ #define __OVERDRIVE_H__ diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index cba9f7d2a..5eb8e6d9e 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -13,6 +13,7 @@ [ P4 control ] 0xE0000000 */ +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 @@ -104,7 +105,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; /* PFN start number, because of __MEMORY_START */ #define PFN_START (__MEMORY_START >> PAGE_SHIFT) -#define ARCH_PFN_OFFSET (PFN_START) +#define ARCH_PFN_OFFSET (FPN_START) #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) @@ -112,10 +113,11 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ + +#include +#include + #endif /* __ASM_SH_PAGE_H */ diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index dcd23a036..bb0efb31a 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -8,6 +8,7 @@ * Copyright (C) 2002, 2003, 2004 Paul Mundt */ +#include #include /* diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index eeb0f48bb..fa5bd2d88 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h @@ -9,7 +9,6 @@ #define __ASM_SH_PROCESSOR_H #ifdef __KERNEL__ -#include #include #include #include @@ -264,7 +263,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_ESP(tsk) ((tsk)->thread.sp) #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) #endif /* __KERNEL__ */ #endif /* __ASM_SH_PROCESSOR_H */ diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h index ed358a376..792fc35bd 100644 --- a/include/asm-sh/ptrace.h +++ b/include/asm-sh/ptrace.h @@ -1,6 +1,8 @@ #ifndef __ASM_SH_PTRACE_H #define __ASM_SH_PTRACE_H +#include + /* * Copyright (C) 1999, 2000 Niibe Yutaka * diff --git a/include/asm-sh/rwsem.h b/include/asm-sh/rwsem.h index 9d2aea5e8..0262d3d1e 100644 --- a/include/asm-sh/rwsem.h +++ b/include/asm-sh/rwsem.h @@ -25,11 +25,24 @@ struct rw_semaphore { #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) spinlock_t wait_lock; struct list_head wait_list; +#if RWSEM_DEBUG + int debug; +#endif }; +/* + * initialisation + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 +#else +#define __RWSEM_DEBUG_INIT /* */ +#endif + #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ - LIST_HEAD_INIT((name).wait_list) } + LIST_HEAD_INIT((name).wait_list) \ + __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -44,6 +57,9 @@ static inline void init_rwsem(struct rw_semaphore *sem) sem->count = RWSEM_UNLOCKED_VALUE; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } /* diff --git a/include/asm-sh/serial.h b/include/asm-sh/serial.h index 8734590d2..f51e232d5 100644 --- a/include/asm-sh/serial.h +++ b/include/asm-sh/serial.h @@ -7,6 +7,7 @@ #ifndef _ASM_SERIAL_H #define _ASM_SERIAL_H +#include #include #ifdef CONFIG_SH_EC3104 diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h index 5c5c1e852..d6e8eb0e6 100644 --- a/include/asm-sh/signal.h +++ b/include/asm-sh/signal.h @@ -75,6 +75,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -94,6 +95,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-sh/smp.h b/include/asm-sh/smp.h index f57c4fe96..f19a8b3b6 100644 --- a/include/asm-sh/smp.h +++ b/include/asm-sh/smp.h @@ -10,6 +10,7 @@ #ifndef __ASM_SH_SMP_H #define __ASM_SH_SMP_H +#include #include #include diff --git a/include/asm-sh/socket.h b/include/asm-sh/socket.h index ca70362eb..553904ff9 100644 --- a/include/asm-sh/socket.h +++ b/include/asm-sh/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* __ASM_SH_SOCKET_H */ diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index ad35ad495..bb0330499 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h @@ -6,13 +6,14 @@ * Copyright (C) 2002 Paul Mundt */ +#include /* * switch_to() should switch tasks to task nr n, first */ #define switch_to(prev, next, last) do { \ - struct task_struct *__last; \ + task_t *__last; \ register unsigned long *__ts1 __asm__ ("r1") = &prev->thread.sp; \ register unsigned long *__ts2 __asm__ ("r2") = &prev->thread.pc; \ register unsigned long *__ts4 __asm__ ("r4") = (unsigned long *)prev; \ @@ -101,6 +102,7 @@ extern void __xchg_called_with_bad_pointer(void); #endif #define set_mb(var, value) do { xchg(&var, value); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* Interrupt Control */ static __inline__ void local_irq_enable(void) diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index 3c09dd4ca..488552f43 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h @@ -35,6 +35,7 @@ typedef unsigned long long __u64; #ifndef __ASSEMBLY__ +#include typedef __signed__ char s8; typedef unsigned char u8; diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index 76b5430cb..05520cebd 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h @@ -304,8 +304,6 @@ #define NR_syscalls 293 -#ifdef __KERNEL__ - /* user-visible error numbers are in the range -1 - -124: see */ #define __syscall_return(type, res) \ @@ -422,6 +420,7 @@ __asm__ __volatile__ ("trapa #0x16" \ __syscall_return(type,__sc0); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -444,6 +443,7 @@ __syscall_return(type,__sc0); \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -513,7 +513,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -525,5 +525,4 @@ asmlinkage long sys_rt_sigaction(int sig, #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #endif -#endif /* __KERNEL__ */ #endif /* __ASM_SH_UNISTD_H */ diff --git a/include/asm-sh/watchdog.h b/include/asm-sh/watchdog.h index 09ca41972..f0cf4be21 100644 --- a/include/asm-sh/watchdog.h +++ b/include/asm-sh/watchdog.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ #include +#include #include #include diff --git a/include/asm-sh64/Kbuild b/include/asm-sh64/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-sh64/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index f3a9c9248..5d659ec28 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h @@ -1,7 +1,8 @@ #ifndef __ASM_SH64_BUG_H #define __ASM_SH64_BUG_H -#ifdef CONFIG_BUG +#include + /* * Tell the user there is some problem, then force a segfault (in process * context) or a panic (interrupt context). @@ -11,9 +12,17 @@ *(volatile int *)0 = 0; \ } while (0) -#define HAVE_ARCH_BUG -#endif +#define BUG_ON(condition) do { \ + if (unlikely((condition)!=0)) \ + BUG(); \ +} while(0) -#include +#define WARN_ON(condition) do { \ + if (unlikely((condition)!=0)) { \ + printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ + dump_stack(); \ + } \ +} while (0) #endif /* __ASM_SH64_BUG_H */ + diff --git a/include/asm-sh64/byteorder.h b/include/asm-sh64/byteorder.h index 7419d7882..f602ebe33 100644 --- a/include/asm-sh64/byteorder.h +++ b/include/asm-sh64/byteorder.h @@ -14,7 +14,7 @@ #include -static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) +static __inline__ __const__ __u32 ___arch__swab32(__u32 x) { __asm__("byterev %0, %0\n\t" "shari %0, 32, %0" @@ -23,7 +23,7 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) return x; } -static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) +static __inline__ __const__ __u16 ___arch__swab16(__u16 x) { __asm__("byterev %0, %0\n\t" "shari %0, 48, %0" diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index 68e27a8fc..cc9a2e86f 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH_DMA_MAPPING_H #define __ASM_SH_DMA_MAPPING_H +#include #include #include #include @@ -126,30 +127,22 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction dir) -{ - dma_sync_single(dev, dma_handle, size, dir); -} + __attribute__ ((alias("dma_sync_single"))); static inline void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction dir) -{ - dma_sync_single(dev, dma_handle, size, dir); -} + __attribute__ ((alias("dma_sync_single"))); static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir) -{ - dma_sync_sg(dev, sg, nelems, dir); -} + __attribute__ ((alias("dma_sync_sg"))); static inline void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir) -{ - dma_sync_sg(dev, sg, nelems, dir); -} + __attribute__ ((alias("dma_sync_sg"))); static inline int dma_get_cache_alignment(void) { diff --git a/include/asm-sh64/hardirq.h b/include/asm-sh64/hardirq.h index 555fd7a35..ad2330e41 100644 --- a/include/asm-sh64/hardirq.h +++ b/include/asm-sh64/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_SH64_HARDIRQ_H #define __ASM_SH64_HARDIRQ_H +#include #include #include diff --git a/include/asm-sh64/hw_irq.h b/include/asm-sh64/hw_irq.h index ebb39089b..ae718d1f2 100644 --- a/include/asm-sh64/hw_irq.h +++ b/include/asm-sh64/hw_irq.h @@ -11,5 +11,6 @@ * Copyright (C) 2000, 2001 Paolo Alberelli * */ +static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ } #endif /* __ASM_SH64_HW_IRQ_H */ diff --git a/include/asm-sh64/ide.h b/include/asm-sh64/ide.h index c9d84d5f7..852f50afe 100644 --- a/include/asm-sh64/ide.h +++ b/include/asm-sh64/ide.h @@ -15,6 +15,7 @@ #ifdef __KERNEL__ +#include /* Without this, the initialisation of PCI IDE cards end up calling * ide_init_hwif_ports, which won't work. */ diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index 252fedbb6..dee4f7792 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h @@ -123,13 +123,6 @@ void insw(unsigned long port, void *addr, unsigned long count); void outsl(unsigned long port, const void *addr, unsigned long count); void insl(unsigned long port, void *addr, unsigned long count); -#define __raw_readb readb -#define __raw_readw readw -#define __raw_readl readl -#define __raw_writeb writeb -#define __raw_writew writew -#define __raw_writel writel - void memcpy_toio(void __iomem *to, const void *from, long count); void memcpy_fromio(void *to, void __iomem *from, long count); diff --git a/include/asm-sh64/irq.h b/include/asm-sh64/irq.h index 1ca49e292..f815b43df 100644 --- a/include/asm-sh64/irq.h +++ b/include/asm-sh64/irq.h @@ -12,6 +12,7 @@ * */ +#include /* * Encoded IRQs are not considered worth to be supported. diff --git a/include/asm-sh64/keyboard.h b/include/asm-sh64/keyboard.h index 1fab96d79..733e2bbe7 100644 --- a/include/asm-sh64/keyboard.h +++ b/include/asm-sh64/keyboard.h @@ -65,7 +65,7 @@ extern unsigned char pckbd_sysrq_xlate[128]; #endif #define aux_request_irq(hand, dev_id) \ - request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id) + request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) diff --git a/include/asm-sh64/mmu_context.h b/include/asm-sh64/mmu_context.h index 8c860dab2..991cfda4c 100644 --- a/include/asm-sh64/mmu_context.h +++ b/include/asm-sh64/mmu_context.h @@ -26,6 +26,7 @@ */ extern unsigned long mmu_context_cache; +#include #include diff --git a/include/asm-sh64/page.h b/include/asm-sh64/page.h index de207a933..a428310ad 100644 --- a/include/asm-sh64/page.h +++ b/include/asm-sh64/page.h @@ -17,6 +17,7 @@ * */ +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 @@ -112,10 +113,11 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ + +#include +#include + #endif /* __ASM_SH64_PAGE_H */ diff --git a/include/asm-sh64/param.h b/include/asm-sh64/param.h index f409adb41..d18cc87c1 100644 --- a/include/asm-sh64/param.h +++ b/include/asm-sh64/param.h @@ -12,6 +12,7 @@ #ifndef __ASM_SH64_PARAM_H #define __ASM_SH64_PARAM_H +#include #ifdef __KERNEL__ # ifdef CONFIG_SH_WDT diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 54c782189..57af6b3eb 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h @@ -22,6 +22,7 @@ #include #include #include +#include struct vm_area_struct; diff --git a/include/asm-sh64/processor.h b/include/asm-sh64/processor.h index eb2bee4b4..1bf252dad 100644 --- a/include/asm-sh64/processor.h +++ b/include/asm-sh64/processor.h @@ -22,7 +22,6 @@ #include #include #include -#include /* * Default implementation of macro that returns current @@ -280,7 +279,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) ((tsk)->thread.pc) #define KSTK_ESP(tsk) ((tsk)->thread.sp) -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) #endif /* __ASSEMBLY__ */ #endif /* __ASM_SH64_PROCESSOR_H */ diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h index a6d4da519..56190f521 100644 --- a/include/asm-sh64/ptrace.h +++ b/include/asm-sh64/ptrace.h @@ -28,7 +28,7 @@ struct pt_regs { #ifdef __KERNEL__ #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define instruction_pointer(regs) ((regs)->pc) -#define profile_pc(regs) ((unsigned long)instruction_pointer(regs)) +#define profile_pc(regs) instruction_pointer(regs) extern void show_regs(struct pt_regs *); #endif diff --git a/include/asm-sh64/shmparam.h b/include/asm-sh64/shmparam.h index 1bb820c83..d3a99a4dc 100644 --- a/include/asm-sh64/shmparam.h +++ b/include/asm-sh64/shmparam.h @@ -2,11 +2,19 @@ #define __ASM_SH64_SHMPARAM_H /* - * Set this to a sensible safe default, we'll work out the specifics for the - * align mask from the cache descriptor at run-time. + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * include/asm-sh64/shmparam.h + * + * Copyright (C) 2000, 2001 Paolo Alberelli + * */ -#define SHMLBA 0x4000 -#define __ARCH_FORCE_SHMLBA +#include + +/* attach addr a multiple of this */ +#define SHMLBA (cpu_data->dcache.sets * L1_CACHE_BYTES) #endif /* __ASM_SH64_SHMPARAM_H */ diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h index 244e13473..2400dc688 100644 --- a/include/asm-sh64/signal.h +++ b/include/asm-sh64/signal.h @@ -13,6 +13,7 @@ */ #include +#include /* Avoid too many header ordering problems. */ struct siginfo; @@ -73,6 +74,7 @@ typedef struct { * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -92,6 +94,7 @@ typedef struct { #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index b1598c26f..3002e9881 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h @@ -14,6 +14,7 @@ * */ +#include #include #include @@ -64,8 +65,9 @@ extern void __xchg_called_with_bad_pointer(void); #define smp_read_barrier_depends() do { } while (0) #endif /* CONFIG_SMP */ -#define set_rmb(var, value) do { (void)xchg(&var, value); } while (0) +#define set_rmb(var, value) do { xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) /* Interrupt Control */ #ifndef HARD_CLI diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h index 644c67b65..f4936d8fa 100644 --- a/include/asm-sh64/uaccess.h +++ b/include/asm-sh64/uaccess.h @@ -128,20 +128,25 @@ do { \ #define __get_user_nocheck(x,ptr,size) \ ({ \ - long __gu_err, __gu_val; \ - __get_user_size((void *)&__gu_val, (long)(ptr), \ - (size), __gu_err); \ - (x) = (__typeof__(*(ptr)))__gu_val; \ + long __gu_addr = (long)(ptr); \ + long __gu_err; \ + __typeof(*(ptr)) __gu_val; \ + __asm__ ("":"=r" (__gu_val)); \ + __asm__ ("":"=r" (__gu_err)); \ + __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ + (x) = (__typeof__(*(ptr))) __gu_val; \ __gu_err; \ }) #define __get_user_check(x,ptr,size) \ ({ \ long __gu_addr = (long)(ptr); \ - long __gu_err = -EFAULT, __gu_val; \ + long __gu_err = -EFAULT; \ + __typeof(*(ptr)) __gu_val; \ + __asm__ ("":"=r" (__gu_val)); \ + __asm__ ("":"=r" (__gu_err)); \ if (__access_ok(__gu_addr, (size))) \ - __get_user_size((void *)&__gu_val, __gu_addr, \ - (size), __gu_err); \ + __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ (x) = (__typeof__(*(ptr))) __gu_val; \ __gu_err; \ }) diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h index 9a1590fff..1f8f394ae 100644 --- a/include/asm-sh64/unistd.h +++ b/include/asm-sh64/unistd.h @@ -344,8 +344,6 @@ #define __NR_inotify_add_watch 319 #define __NR_inotify_rm_watch 320 -#ifdef __KERNEL__ - #define NR_syscalls 321 /* user-visible error numbers are in the range -1 - -125: see */ @@ -488,6 +486,7 @@ __asm__ __volatile__ ("!dummy %0 %1 %2 %3 %4 %5 %6" \ __syscall_return(type,__sc0); \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT @@ -510,6 +509,7 @@ __syscall_return(type,__sc0); \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -550,7 +550,7 @@ static inline pid_t wait(int * wait_stat) { return waitpid(-1,wait_stat,0); } -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -562,5 +562,4 @@ static inline pid_t wait(int * wait_stat) #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") #endif -#endif /* __KERNEL__ */ #endif /* __ASM_SH64_UNISTD_H */ diff --git a/include/asm-sh64/user.h b/include/asm-sh64/user.h index eb3b33edd..8f32f39a8 100644 --- a/include/asm-sh64/user.h +++ b/include/asm-sh64/user.h @@ -13,6 +13,7 @@ */ #include +#include #include #include diff --git a/include/asm-sparc/Kbuild b/include/asm-sparc/Kbuild deleted file mode 100644 index c6a55cf0d..000000000 --- a/include/asm-sparc/Kbuild +++ /dev/null @@ -1,15 +0,0 @@ -include include/asm-generic/Kbuild.asm - -header-y += apc.h -header-y += asi.h -header-y += bpp.h -header-y += jsflash.h -header-y += openpromio.h -header-y += pconf.h -header-y += reg.h -header-y += traps.h -header-y += vfc_ioctls.h - -unifdef-y += fbio.h -unifdef-y += perfctr.h -unifdef-y += psr.h diff --git a/include/asm-sparc/asmmacro.h b/include/asm-sparc/asmmacro.h index a619a4d97..0d4b65bd2 100644 --- a/include/asm-sparc/asmmacro.h +++ b/include/asm-sparc/asmmacro.h @@ -6,6 +6,7 @@ #ifndef _SPARC_ASMMACRO_H #define _SPARC_ASMMACRO_H +#include #include #include diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h index 731fa56e0..e1033170b 100644 --- a/include/asm-sparc/atomic.h +++ b/include/asm-sparc/atomic.h @@ -10,6 +10,7 @@ #ifndef __ARCH_SPARC_ATOMIC__ #define __ARCH_SPARC_ATOMIC__ +#include typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-sparc/bugs.h b/include/asm-sparc/bugs.h index a0f939bee..e652f89e0 100644 --- a/include/asm-sparc/bugs.h +++ b/include/asm-sparc/bugs.h @@ -5,6 +5,7 @@ */ #include +#include extern unsigned long loops_per_jiffy; diff --git a/include/asm-sparc/cacheflush.h b/include/asm-sparc/cacheflush.h index fc632f811..490121700 100644 --- a/include/asm-sparc/cacheflush.h +++ b/include/asm-sparc/cacheflush.h @@ -1,6 +1,7 @@ #ifndef _SPARC_CACHEFLUSH_H #define _SPARC_CACHEFLUSH_H +#include #include /* Common for other includes */ // #include from pgalloc.h // #include from pgalloc.h diff --git a/include/asm-sparc/delay.h b/include/asm-sparc/delay.h index 48aa70eef..7ec8e9f7a 100644 --- a/include/asm-sparc/delay.h +++ b/include/asm-sparc/delay.h @@ -7,6 +7,7 @@ #ifndef __SPARC_DELAY_H #define __SPARC_DELAY_H +#include #include static inline void __delay(unsigned long loops) diff --git a/include/asm-sparc/dma-mapping.h b/include/asm-sparc/dma-mapping.h index 6db83dc93..d7c3b0f0a 100644 --- a/include/asm-sparc/dma-mapping.h +++ b/include/asm-sparc/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _ASM_SPARC_DMA_MAPPING_H #define _ASM_SPARC_DMA_MAPPING_H +#include #ifdef CONFIG_PCI #include diff --git a/include/asm-sparc/dma.h b/include/asm-sparc/dma.h index 407b36144..8ec206aa5 100644 --- a/include/asm-sparc/dma.h +++ b/include/asm-sparc/dma.h @@ -7,6 +7,7 @@ #ifndef _ASM_SPARC_DMA_H #define _ASM_SPARC_DMA_H +#include #include #include diff --git a/include/asm-sparc/ebus.h b/include/asm-sparc/ebus.h index 54652887c..2d6a997c5 100644 --- a/include/asm-sparc/ebus.h +++ b/include/asm-sparc/ebus.h @@ -13,14 +13,13 @@ #include #endif #include -#include -#include struct linux_ebus_child { struct linux_ebus_child *next; struct linux_ebus_device *parent; struct linux_ebus *bus; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct resource resource[PROMREG_MAX]; int num_addrs; unsigned int irqs[PROMINTR_MAX]; @@ -28,27 +27,27 @@ struct linux_ebus_child { }; struct linux_ebus_device { - struct of_device ofdev; struct linux_ebus_device *next; struct linux_ebus_child *children; struct linux_ebus *bus; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct resource resource[PROMREG_MAX]; int num_addrs; unsigned int irqs[PROMINTR_MAX]; int num_irqs; }; -#define to_ebus_device(d) container_of(d, struct linux_ebus_device, ofdev.dev) struct linux_ebus { - struct of_device ofdev; struct linux_ebus *next; struct linux_ebus_device *devices; struct linux_pbm_info *parent; struct pci_dev *self; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; + struct linux_prom_ebus_ranges ebus_ranges[PROMREG_MAX]; + int num_ebus_ranges; }; -#define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev) struct linux_ebus_dma { unsigned int dcsr; diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index 83a3dd15a..4a71d7c1e 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h @@ -6,6 +6,7 @@ * ELF register definitions.. */ +#include #include #ifdef __KERNEL__ diff --git a/include/asm-sparc/fixmap.h b/include/asm-sparc/fixmap.h index f18fc0755..9de52b4d2 100644 --- a/include/asm-sparc/fixmap.h +++ b/include/asm-sparc/fixmap.h @@ -13,6 +13,7 @@ #ifndef _ASM_FIXMAP_H #define _ASM_FIXMAP_H +#include #include #include #ifdef CONFIG_HIGHMEM diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index c53b332c8..7a941b800 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h @@ -271,8 +271,7 @@ static int sun_fd_request_irq(void) if(!once) { once = 1; - error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy"); + error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy"); return ((error == 0) ? 0 : -1); } else return 0; } diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h index 4f63ed8df..2a668c479 100644 --- a/include/asm-sparc/hardirq.h +++ b/include/asm-sparc/hardirq.h @@ -7,6 +7,7 @@ #ifndef __SPARC_HARDIRQ_H #define __SPARC_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index a6d735a13..64d810385 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h @@ -11,6 +11,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b851b..a42df208d 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h @@ -249,22 +249,6 @@ extern void __iomem *ioremap(unsigned long offset, unsigned long size); #define ioremap_nocache(X,Y) ioremap((X),(Y)) extern void iounmap(volatile void __iomem *addr); -#define ioread8(X) readb(X) -#define ioread16(X) readw(X) -#define ioread32(X) readl(X) -#define iowrite8(val,X) writeb(val,X) -#define iowrite16(val,X) writew(val,X) -#define iowrite32(val,X) writel(val,X) - -/* Create a virtual mapping cookie for an IO port range */ -extern void __iomem *ioport_map(unsigned long port, unsigned int nr); -extern void ioport_unmap(void __iomem *); - -/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ -struct pci_dev; -extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); -extern void pci_iounmap(struct pci_dev *dev, void __iomem *); - /* * Bus number may be in res->flags... somewhere. */ diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index 3141ddfea..cee356b0d 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h @@ -7,6 +7,7 @@ #ifndef _SPARC_IRQ_H #define _SPARC_IRQ_H +#include #include #include /* For NR_CPUS */ #include @@ -16,6 +17,8 @@ #define __irq_ino(irq) irq #define __irq_pil(irq) irq +BTFIXUPDEF_CALL(char *, __irq_itoa, unsigned int) +#define __irq_itoa(irq) BTFIXUP_CALL(__irq_itoa)(irq) #define NR_IRQS 16 @@ -181,4 +184,8 @@ extern struct sun4m_intregs *sun4m_interrupts; #define SUN4M_INT_SBUS(x) (1 << (x+7)) #define SUN4M_INT_VME(x) (1 << (x)) +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index b7dc40bc6..95ecab588 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h @@ -2,6 +2,12 @@ #ifndef __SPARC_MMAN_H__ #define __SPARC_MMAN_H__ +#ifdef __KERNEL__ +#define arch_mmap_check sparc_mmap_check +int sparc_mmap_check(unsigned long addr, unsigned long len, + unsigned long flags); +#endif + #include /* SunOS'ified... */ @@ -35,12 +41,4 @@ #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ -#define arch_mmap_check sparc_mmap_check -int sparc_mmap_check(unsigned long addr, unsigned long len, - unsigned long flags); -#endif -#endif - #endif /* __SPARC_MMAN_H__ */ diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h index bd92a78f4..59b86bc79 100644 --- a/include/asm-sparc/mostek.h +++ b/include/asm-sparc/mostek.h @@ -9,6 +9,7 @@ #ifndef _SPARC_MOSTEK_H #define _SPARC_MOSTEK_H +#include #include #include diff --git a/include/asm-sparc/of_device.h b/include/asm-sparc/of_device.h deleted file mode 100644 index 80ea31f6e..000000000 --- a/include/asm-sparc/of_device.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _ASM_SPARC_OF_DEVICE_H -#define _ASM_SPARC_OF_DEVICE_H -#ifdef __KERNEL__ - -#include -#include -#include -#include - -extern struct bus_type ebus_bus_type; -extern struct bus_type sbus_bus_type; -extern struct bus_type of_bus_type; - -/* - * The of_device is a kind of "base class" that is a superset of - * struct device for use by devices attached to an OF node and - * probed using OF properties. - */ -struct of_device -{ - struct device_node *node; - struct device dev; - struct resource resource[PROMREG_MAX]; - unsigned int irqs[PROMINTR_MAX]; - int num_irqs; - - void *sysdata; - - int slot; - int portid; - int clock_freq; -}; -#define to_of_device(d) container_of(d, struct of_device, dev) - -extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); -extern void of_iounmap(void __iomem *base, unsigned long size); - -extern struct of_device *of_find_device_by_node(struct device_node *); - -extern const struct of_device_id *of_match_device( - const struct of_device_id *matches, const struct of_device *dev); - -extern struct of_device *of_dev_get(struct of_device *dev); -extern void of_dev_put(struct of_device *dev); - -/* - * An of_platform_driver driver is attached to a basic of_device on - * the ISA, EBUS, and SBUS busses on sparc64. - */ -struct of_platform_driver -{ - char *name; - struct of_device_id *match_table; - struct module *owner; - - int (*probe)(struct of_device* dev, const struct of_device_id *match); - int (*remove)(struct of_device* dev); - - int (*suspend)(struct of_device* dev, pm_message_t state); - int (*resume)(struct of_device* dev); - int (*shutdown)(struct of_device* dev); - - struct device_driver driver; -}; -#define to_of_platform_driver(drv) container_of(drv,struct of_platform_driver, driver) - -extern int of_register_driver(struct of_platform_driver *drv, - struct bus_type *bus); -extern void of_unregister_driver(struct of_platform_driver *drv); -extern int of_device_register(struct of_device *ofdev); -extern void of_device_unregister(struct of_device *ofdev); -extern struct of_device *of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus); -extern void of_release_dev(struct device *dev); - -#endif /* __KERNEL__ */ -#endif /* _ASM_SPARC_OF_DEVICE_H */ diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 91691e52c..f283f8aaf 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h @@ -267,6 +267,11 @@ extern void prom_getstring(int node, char *prop, char *buf, int bufsize); /* Does the passed node have the given "name"? YES=1 NO=0 */ extern int prom_nodematch(int thisnode, char *name); +/* Puts in buffer a prom name in the form name@x,y or name (x for which_io + * and y for first regs phys address + */ +extern int prom_getname(int node, char *buf, int buflen); + /* Search all siblings starting at the passed node for "name" matching * the given string. Returns the node on success, zero on failure. */ diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index a7dafac06..b04914eae 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h @@ -8,8 +8,7 @@ #ifndef _SPARC_PAGE_H #define _SPARC_PAGE_H -#ifdef __KERNEL__ - +#include #ifdef CONFIG_SUN4 #define PAGE_SHIFT 13 #else @@ -23,6 +22,8 @@ #endif #define PAGE_MASK (~(PAGE_SIZE-1)) +#ifdef __KERNEL__ + #include #ifndef __ASSEMBLY__ @@ -160,11 +161,11 @@ extern unsigned long pfn_base; #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* __KERNEL__ */ +#include +#include + #endif /* _SPARC_PAGE_H */ diff --git a/include/asm-sparc/pbm.h b/include/asm-sparc/pbm.h index fedd9c6e8..0aba3a82c 100644 --- a/include/asm-sparc/pbm.h +++ b/include/asm-sparc/pbm.h @@ -22,7 +22,6 @@ #include #include -#include struct linux_pbm_info { int prom_node; @@ -41,7 +40,7 @@ struct linux_pbm_info { */ struct pcidev_cookie { struct linux_pbm_info *pbm; - struct device_node *prom_node; + int prom_node; }; #endif /* !(__SPARC_PBM_H) */ diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h index 288259527..8db566203 100644 --- a/include/asm-sparc/pgalloc.h +++ b/include/asm-sparc/pgalloc.h @@ -2,6 +2,7 @@ #ifndef _SPARC_PGALLOC_H #define _SPARC_PGALLOC_H +#include #include #include diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 226c6475c..9eea8f4d4 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h @@ -11,6 +11,7 @@ #include +#include #include #include #include diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h deleted file mode 100644 index 86c13dcce..000000000 --- a/include/asm-sparc/prom.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef _SPARC_PROM_H -#define _SPARC_PROM_H -#ifdef __KERNEL__ - - -/* - * Definitions for talking to the Open Firmware PROM on - * Power Macintosh computers. - * - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * Updates for SPARC32 by David S. Miller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include -#include -#include - -typedef u32 phandle; -typedef u32 ihandle; - -struct property { - char *name; - int length; - void *value; - struct property *next; - unsigned long _flags; - unsigned int unique_id; -}; - -struct device_node { - char *name; - char *type; - phandle node; - char *path_component_name; - char *full_name; - - struct property *properties; - struct property *deadprops; /* removed properties */ - struct device_node *parent; - struct device_node *child; - 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 kref kref; - unsigned long _flags; - void *data; - unsigned int unique_id; -}; - -/* flag descriptions */ -#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ - -#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) -#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) - -#define OF_BAD_ADDR ((u64)-1) - -static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) -{ - dn->pde = de; -} - -extern struct device_node *of_find_node_by_name(struct device_node *from, - const char *name); -#define for_each_node_by_name(dn, name) \ - for (dn = of_find_node_by_name(NULL, name); dn; \ - dn = of_find_node_by_name(dn, name)) -extern struct device_node *of_find_node_by_type(struct device_node *from, - const char *type); -#define for_each_node_by_type(dn, type) \ - for (dn = of_find_node_by_type(NULL, type); dn; \ - dn = of_find_node_by_type(dn, 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_node_by_phandle(phandle handle); -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 property *of_find_property(struct device_node *np, - const char *name, - int *lenp); -extern int of_device_is_compatible(struct device_node *device, const char *); -extern void *of_get_property(struct device_node *node, const char *name, - int *lenp); -extern int of_set_property(struct device_node *node, const char *name, void *val, int len); -extern int of_getintprop_default(struct device_node *np, - const char *name, - int def); -extern int of_n_addr_cells(struct device_node *np); -extern int of_n_size_cells(struct device_node *np); - -extern void prom_build_devicetree(void); - -#endif /* __KERNEL__ */ -#endif /* _SPARC_PROM_H */ diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index d036e4419..a13cddcec 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h @@ -11,8 +11,7 @@ #include #include -#include -#include +/* #include */ /* Unused since we use opaque iommu (|io-unit) */ #include /* We scan which devices are on the SBus using the PROM node device @@ -43,19 +42,18 @@ struct sbus_bus; /* Linux SBUS device tables */ struct sbus_dev { - struct of_device ofdev; - struct sbus_bus *bus; - struct sbus_dev *next; - struct sbus_dev *child; - struct sbus_dev *parent; - int prom_node; - char prom_name[64]; + struct sbus_bus *bus; /* Back ptr to sbus */ + struct sbus_dev *next; /* next device on this SBus or null */ + struct sbus_dev *child; /* For ledma and espdma on sun4m */ + struct sbus_dev *parent; /* Parent device if not toplevel */ + int prom_node; /* PROM device tree node for this device */ + char prom_name[64]; /* PROM device name */ int slot; struct resource resource[PROMREG_MAX]; struct linux_prom_registers reg_addrs[PROMREG_MAX]; - int num_registers; + int num_registers, ranges_applied; struct linux_prom_ranges device_ranges[PROMREG_MAX]; int num_device_ranges; @@ -63,11 +61,9 @@ struct sbus_dev { unsigned int irqs[4]; int num_irqs; }; -#define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev) /* This struct describes the SBus(s) found on this machine. */ struct sbus_bus { - struct of_device ofdev; void *iommu; /* Opaque IOMMU cookie */ struct sbus_dev *devices; /* Link to devices on this SBus */ struct sbus_bus *next; /* next SBus, if more than one SBus */ @@ -81,7 +77,6 @@ struct sbus_bus { int devid; int board; }; -#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev) extern struct sbus_bus *sbus_root; @@ -107,7 +102,6 @@ sbus_is_slave(struct sbus_dev *dev) #define sbus_can_dma_64bit(sdev) (0) /* actually, sparc_cpu_model==sun4d */ #define sbus_can_burst64(sdev) (0) /* actually, sparc_cpu_model==sun4d */ extern void sbus_set_sbus64(struct sbus_dev *, int); -extern void sbus_fill_device_irq(struct sbus_dev *); /* These yield IOMMU mappings in consistent mode. */ extern void *sbus_alloc_consistent(struct sbus_dev *, long, u32 *dma_addrp); @@ -145,10 +139,4 @@ extern void sbus_dma_sync_sg_for_device(struct sbus_dev *, struct scatterlist *, BTFIXUPDEF_CALL(unsigned int, sbint_to_irq, struct sbus_dev *sdev, unsigned int) #define sbint_to_irq(sdev, sbint) BTFIXUP_CALL(sbint_to_irq)(sdev, sbint) -extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *); -extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *); -extern void sbus_setup_arch_props(struct sbus_bus *, struct device_node *); -extern int sbus_arch_preinit(void); -extern void sbus_arch_postinit(void); - #endif /* !(_SPARC_SBUS_H) */ diff --git a/include/asm-sparc/sfp-machine.h b/include/asm-sparc/sfp-machine.h index ecfc86a4a..b4ca2d94b 100644 --- a/include/asm-sparc/sfp-machine.h +++ b/include/asm-sparc/sfp-machine.h @@ -25,6 +25,7 @@ #ifndef _SFP_MACHINE_H #define _SFP_MACHINE_H +#include #define _FP_W_TYPE_SIZE 32 #define _FP_W_TYPE unsigned long diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index d03a21c97..aa9960ad0 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h @@ -132,13 +132,16 @@ struct sigstack { * usage of signal stacks by using the (now obsolete) sa_restorer field in * the sigaction structure as a stack pointer. This is now possible due to * the changes in signal handling. LBT 010493. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. */ #define SA_NOCLDSTOP _SV_IGNCHILD #define SA_STACK _SV_SSTACK #define SA_ONSTACK _SV_SSTACK #define SA_RESTART _SV_INTR #define SA_ONESHOT _SV_RESET +#define SA_INTERRUPT 0x10u #define SA_NOMASK 0x20u #define SA_NOCLDWAIT 0x100u #define SA_SIGINFO 0x200u @@ -168,7 +171,7 @@ struct sigstack { * statically allocated data.. which is NOT GOOD. * */ -#define SA_STATIC_ALLOC 0x8000 +#define SA_STATIC_ALLOC 0x80 #endif #include diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h index b9da9a600..98c46e3fb 100644 --- a/include/asm-sparc/smp.h +++ b/include/asm-sparc/smp.h @@ -6,6 +6,7 @@ #ifndef _SPARC_SMP_H #define _SPARC_SMP_H +#include #include #include #include @@ -145,8 +146,6 @@ static inline int hard_smp_processor_id(void) #define prof_multiplier(__cpu) cpu_data(__cpu).multiplier #define prof_counter(__cpu) cpu_data(__cpu).counter -void smp_setup_cpu_possible_map(void); - #endif /* !(__ASSEMBLY__) */ /* Sparc specific messages. */ @@ -163,11 +162,7 @@ void smp_setup_cpu_possible_map(void); #define MBOX_IDLECPU2 0xFD #define MBOX_STOPCPU2 0xFE -#else /* SMP */ - -#define smp_setup_cpu_possible_map() do { } while (0) - -#endif /* !(SMP) */ +#endif /* SMP */ #define NO_PROC_ID 0xFF diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h index f6c4e5baf..4e0ce3a35 100644 --- a/include/asm-sparc/socket.h +++ b/include/asm-sparc/socket.h @@ -48,7 +48,6 @@ #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_PEERSEC 0x001e -#define SO_PASSSEC 0x001f /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 0x5001 diff --git a/include/asm-sparc/spinlock.h b/include/asm-sparc/spinlock.h index 1c75474ba..3350c90c7 100644 --- a/include/asm-sparc/spinlock.h +++ b/include/asm-sparc/spinlock.h @@ -154,9 +154,6 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) -#define __raw_read_can_lock(rw) (!((rw)->lock & 0xff)) -#define __raw_write_can_lock(rw) (!(rw)->lock) - #endif /* !(__ASSEMBLY__) */ #endif /* __SPARC_SPINLOCK_H */ diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h index 100c3eaf3..58dd16292 100644 --- a/include/asm-sparc/system.h +++ b/include/asm-sparc/system.h @@ -1,8 +1,10 @@ /* $Id: system.h,v 1.86 2001/10/30 04:57:10 davem Exp $ */ +#include #ifndef __SPARC_SYSTEM_H #define __SPARC_SYSTEM_H +#include #include #include /* NR_CPUS */ #include @@ -199,6 +201,7 @@ static inline unsigned long getipl(void) #define wmb() mb() #define read_barrier_depends() do { } while(0) #define set_mb(__var, __value) do { __var = __value; mb(); } while(0) +#define set_wmb(__var, __value) set_mb(__var, __value) #define smp_mb() __asm__ __volatile__("":::"memory") #define smp_rmb() __asm__ __volatile__("":::"memory") #define smp_wmb() __asm__ __volatile__("":::"memory") diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h index cb1fa1d1f..b16eb739d 100644 --- a/include/asm-sparc/timer.h +++ b/include/asm-sparc/timer.h @@ -4,6 +4,7 @@ * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) */ +#include #ifndef _SPARC_TIMER_H #define _SPARC_TIMER_H diff --git a/include/asm-sparc/tlbflush.h b/include/asm-sparc/tlbflush.h index 4a3b66618..5643ca31e 100644 --- a/include/asm-sparc/tlbflush.h +++ b/include/asm-sparc/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _SPARC_TLBFLUSH_H #define _SPARC_TLBFLUSH_H +#include #include // #include diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index a701504f9..b3ed04d08 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h @@ -319,9 +319,6 @@ #define __NR_set_robust_list 300 #define __NR_get_robust_list 301 -#define NR_SYSCALLS 302 - -#ifdef __KERNEL__ /* WARNING: You MAY NOT add syscall numbers larger than 301, since * all of the syscall tables in the Sparc kernel are * sized to have 301 entries (starting at zero). Therefore @@ -458,6 +455,7 @@ errno = -__res; \ return -1; \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_STAT64 @@ -479,6 +477,7 @@ return -1; \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGSUSPEND +#endif #ifdef __KERNEL_SYSCALLS__ @@ -535,5 +534,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _SPARC_UNISTD_H */ diff --git a/include/asm-sparc/vac-ops.h b/include/asm-sparc/vac-ops.h index ab6f53b91..9e0172323 100644 --- a/include/asm-sparc/vac-ops.h +++ b/include/asm-sparc/vac-ops.h @@ -8,6 +8,7 @@ * Copyright (C) 1994, David S. Miller (davem@caip.rutgers.edu) */ +#include #include #include #include diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h index 096f3d3d9..557257eef 100644 --- a/include/asm-sparc/winmacro.h +++ b/include/asm-sparc/winmacro.h @@ -7,6 +7,7 @@ #ifndef _SPARC_WINMACRO_H #define _SPARC_WINMACRO_H +#include #include /* Store the register window onto the 8-byte aligned area starting diff --git a/include/asm-sparc64/Kbuild b/include/asm-sparc64/Kbuild deleted file mode 100644 index a7f44408c..000000000 --- a/include/asm-sparc64/Kbuild +++ /dev/null @@ -1,26 +0,0 @@ -include include/asm-generic/Kbuild.asm - -ALTARCH := sparc -ARCHDEF := defined __sparc__ && defined __arch64__ -ALTARCHDEF := defined __sparc__ && !defined __arch64__ - -header-y += apb.h -header-y += asi.h -header-y += bbc.h -header-y += bpp.h -header-y += const.h -header-y += display7seg.h -header-y += envctrl.h -header-y += ipc.h -header-y += openprom.h -header-y += openpromio.h -header-y += pconf.h -header-y += psrcompat.h -header-y += pstate.h -header-y += reg.h -header-y += uctx.h -header-y += utrap.h -header-y += watchdog.h - -unifdef-y += fbio.h -unifdef-y += perfctr.h diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index 2f0bec26a..468eb48d8 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h @@ -8,6 +8,7 @@ #ifndef __ARCH_SPARC64_ATOMIC__ #define __ARCH_SPARC64_ATOMIC__ +#include #include typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h index 3d5e1af84..71944b0f0 100644 --- a/include/asm-sparc64/bitops.h +++ b/include/asm-sparc64/bitops.h @@ -7,6 +7,7 @@ #ifndef _SPARC64_BITOPS_H #define _SPARC64_BITOPS_H +#include #include #include diff --git a/include/asm-sparc64/bugs.h b/include/asm-sparc64/bugs.h index 120422fdb..360dd04ed 100644 --- a/include/asm-sparc64/bugs.h +++ b/include/asm-sparc64/bugs.h @@ -4,6 +4,7 @@ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) */ +#include extern unsigned long loops_per_jiffy; diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h index 745d1ab60..b3f61659b 100644 --- a/include/asm-sparc64/cacheflush.h +++ b/include/asm-sparc64/cacheflush.h @@ -1,6 +1,7 @@ #ifndef _SPARC64_CACHEFLUSH_H #define _SPARC64_CACHEFLUSH_H +#include #include #ifndef __ASSEMBLY__ diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index f2cc9411b..9d6a6dbaf 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h @@ -74,10 +74,8 @@ struct trap_per_cpu { unsigned long tsb_huge; unsigned long tsb_huge_temp; -/* Dcache line 8: IRQ work list, and keep trap_block a power-of-2 in size. */ - unsigned int irq_worklist; - unsigned int __pad1; - unsigned long __pad2[3]; +/* Dcache line 8: Unused, needed to keep trap_block a power-of-2 in size. */ + unsigned long __pad2[4]; } __attribute__((aligned(64))); extern struct trap_per_cpu trap_block[NR_CPUS]; extern void init_cur_cpu_trap(struct thread_info *); @@ -121,7 +119,6 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, #define TRAP_PER_CPU_CPU_LIST_PA 0xc8 #define TRAP_PER_CPU_TSB_HUGE 0xd0 #define TRAP_PER_CPU_TSB_HUGE_TEMP 0xd8 -#define TRAP_PER_CPU_IRQ_WORKLIST 0xe0 #define TRAP_BLOCK_SZ_SHIFT 8 @@ -174,8 +171,11 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, /* Clobbers TMP, loads local processor's IRQ work area into DEST. */ #define TRAP_LOAD_IRQ_WORK(DEST, TMP) \ - TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ - add DEST, TRAP_PER_CPU_IRQ_WORKLIST, DEST; + __GET_CPUID(TMP) \ + sethi %hi(__irq_work), DEST; \ + sllx TMP, 6, TMP; \ + or DEST, %lo(__irq_work), DEST; \ + add DEST, TMP, DEST; /* Clobbers TMP, loads DEST with current thread info pointer. */ #define TRAP_LOAD_THREAD_REG(DEST, TMP) \ @@ -211,10 +211,9 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ ldx [DEST + TRAP_PER_CPU_PGD_PADDR], DEST; -/* Clobbers TMP, loads local processor's IRQ work area into DEST. */ #define TRAP_LOAD_IRQ_WORK(DEST, TMP) \ - TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ - add DEST, TRAP_PER_CPU_IRQ_WORKLIST, DEST; + sethi %hi(__irq_work), DEST; \ + or DEST, %lo(__irq_work), DEST; #define TRAP_LOAD_THREAD_REG(DEST, TMP) \ TRAP_LOAD_TRAP_BLOCK(DEST, TMP) \ diff --git a/include/asm-sparc64/delay.h b/include/asm-sparc64/delay.h index a4aae6f80..2901ea0c3 100644 --- a/include/asm-sparc64/delay.h +++ b/include/asm-sparc64/delay.h @@ -11,6 +11,7 @@ #ifndef __SPARC64_DELAY_H #define __SPARC64_DELAY_H +#include #include #include diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 27c46fbee..a8d39f23d 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef _ASM_SPARC64_DMA_MAPPING_H #define _ASM_SPARC64_DMA_MAPPING_H +#include #ifdef CONFIG_PCI @@ -160,63 +161,6 @@ static inline void dma_free_coherent(struct device *dev, size_t size, BUG(); } -static inline void -dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, - enum dma_data_direction direction) -{ - BUG(); -} - -static inline void -dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, - enum dma_data_direction direction) -{ - BUG(); -} - #endif /* PCI */ - -/* Now for the API extensions over the pci_ one */ - -#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) -#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) -#define dma_is_consistent(d) (1) - -static inline int -dma_get_cache_alignment(void) -{ - /* no easy way to get cache size on all processors, so return - * the maximum possible, to be safe */ - return (1 << INTERNODE_CACHE_SHIFT); -} - -static inline void -dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, - unsigned long offset, size_t size, - enum dma_data_direction direction) -{ - /* just sync everything, that's all the pci API can do */ - dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); -} - -static inline void -dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, - unsigned long offset, size_t size, - enum dma_data_direction direction) -{ - /* just sync everything, that's all the pci API can do */ - dma_sync_single_for_device(dev, dma_handle, offset+size, direction); -} - -static inline void -dma_cache_sync(void *vaddr, size_t size, - enum dma_data_direction direction) -{ - /* could define this in terms of the dma_cache ... operations, - * but if you get this on a platform, you should convert the platform - * to using the generic device DMA API */ - BUG(); -} - #endif /* _ASM_SPARC64_DMA_MAPPING_H */ diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index 27f65972b..1aab3c8dc 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h @@ -7,6 +7,7 @@ #ifndef _ASM_SPARC64_DMA_H #define _ASM_SPARC64_DMA_H +#include #include #include #include diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index a4afe9d57..7a408a030 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h @@ -10,14 +10,13 @@ #include #include -#include -#include struct linux_ebus_child { struct linux_ebus_child *next; struct linux_ebus_device *parent; struct linux_ebus *bus; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct resource resource[PROMREG_MAX]; int num_addrs; unsigned int irqs[PROMINTR_MAX]; @@ -25,29 +24,32 @@ struct linux_ebus_child { }; struct linux_ebus_device { - struct of_device ofdev; struct linux_ebus_device *next; struct linux_ebus_child *children; struct linux_ebus *bus; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct resource resource[PROMREG_MAX]; int num_addrs; unsigned int irqs[PROMINTR_MAX]; int num_irqs; }; -#define to_ebus_device(d) container_of(d, struct linux_ebus_device, ofdev.dev) struct linux_ebus { - struct of_device ofdev; struct linux_ebus *next; struct linux_ebus_device *devices; struct pci_pbm_info *parent; struct pci_dev *self; int index; int is_rio; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; + struct linux_prom_ebus_ranges ebus_ranges[PROMREG_MAX]; + int num_ebus_ranges; + struct linux_prom_ebus_intmap ebus_intmap[PROMREG_MAX]; + int num_ebus_intmap; + struct linux_prom_ebus_intmask ebus_intmask; }; -#define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev) struct ebus_dma_info { spinlock_t lock; diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h index 9e7f1b0d7..f29eaa254 100644 --- a/include/asm-sparc64/fhc.h +++ b/include/asm-sparc64/fhc.h @@ -10,7 +10,6 @@ #include #include -#include #include struct linux_fhc; @@ -35,7 +34,8 @@ struct linux_central { unsigned long clkregs; unsigned long clkver; int slots; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct linux_prom_ranges central_ranges[PROMREG_MAX]; int num_central_ranges; @@ -112,7 +112,8 @@ struct linux_fhc { struct fhc_regs fhc_regs; int board; int jtag_master; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; struct linux_prom_ranges fhc_ranges[PROMREG_MAX]; int num_fhc_ranges; diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index abf150038..6a95d5d0c 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h @@ -10,6 +10,7 @@ #ifndef __ASM_SPARC64_FLOPPY_H #define __ASM_SPARC64_FLOPPY_H +#include #include #include @@ -208,55 +209,7 @@ static void sun_fd_enable_dma(void) pdma_areasize = pdma_size; } -irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs) -{ - if (likely(doing_pdma)) { - void __iomem *stat = (void __iomem *) fdc_status; - unsigned char *vaddr = pdma_vaddr; - unsigned long size = pdma_size; - u8 val; - - while (size) { - val = readb(stat); - if (unlikely(!(val & 0x80))) { - pdma_vaddr = vaddr; - pdma_size = size; - return IRQ_HANDLED; - } - if (unlikely(!(val & 0x20))) { - pdma_vaddr = vaddr; - pdma_size = size; - doing_pdma = 0; - goto main_interrupt; - } - if (val & 0x40) { - /* read */ - *vaddr++ = readb(stat + 1); - } else { - unsigned char data = *vaddr++; - - /* write */ - writeb(data, stat + 1); - } - size--; - } - - pdma_vaddr = vaddr; - pdma_size = size; - - /* Send Terminal Count pulse to floppy controller. */ - val = readb(auxio_register); - val |= AUXIO_AUX1_FTCNT; - writeb(val, auxio_register); - val &= ~AUXIO_AUX1_FTCNT; - writeb(val, auxio_register); - - doing_pdma = 0; - } - -main_interrupt: - return floppy_interrupt(irq, dev_cookie, regs); -} +extern irqreturn_t sparc_floppy_irq(int, void *, struct pt_regs *); static int sun_fd_request_irq(void) { @@ -267,7 +220,7 @@ static int sun_fd_request_irq(void) once = 1; error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT, "floppy", NULL); return ((error == 0) ? 0 : -1); } @@ -546,14 +499,15 @@ static int sun_pci_fd_test_drive(unsigned long port, int drive) #ifdef CONFIG_PCI static int __init ebus_fdthree_p(struct linux_ebus_device *edev) { - if (!strcmp(edev->prom_node->name, "fdthree")) + if (!strcmp(edev->prom_name, "fdthree")) return 1; - if (!strcmp(edev->prom_node->name, "floppy")) { - char *compat; - - compat = of_get_property(edev->prom_node, - "compatible", NULL); - if (compat && !strcmp(compat, "fdthree")) + if (!strcmp(edev->prom_name, "floppy")) { + char compat[16]; + prom_getstring(edev->prom_node, + "compatible", + compat, sizeof(compat)); + compat[15] = '\0'; + if (!strcmp(compat, "fdthree")) return 1; } return 0; @@ -571,12 +525,12 @@ static unsigned long __init isa_floppy_init(void) for_each_isa(isa_br) { for_each_isadev(isa_dev, isa_br) { - if (!strcmp(isa_dev->prom_node->name, "dma")) { + if (!strcmp(isa_dev->prom_name, "dma")) { struct sparc_isa_device *child = isa_dev->child; while (child) { - if (!strcmp(child->prom_node->name, + if (!strcmp(child->prom_name, "floppy")) { isa_dev = child; goto isa_done; @@ -661,7 +615,6 @@ static unsigned long __init sun_floppy_init(void) struct linux_ebus_device *edev = NULL; unsigned long config = 0; void __iomem *auxio_reg; - char *state_prop; for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { @@ -678,8 +631,9 @@ static unsigned long __init sun_floppy_init(void) #endif } - state_prop = of_get_property(edev->prom_node, "status", NULL); - if (state_prop && !strncmp(state_prop, "disabled", 8)) + prom_getproperty(edev->prom_node, "status", + state, sizeof(state)); + if (!strncmp(state, "disabled", 8)) return 0; FLOPPY_IRQ = edev->irqs[0]; @@ -750,7 +704,7 @@ static unsigned long __init sun_floppy_init(void) */ for_each_ebus(ebus) { for_each_ebusdev(edev, ebus) { - if (!strcmp(edev->prom_node->name, "ecpp")) { + if (!strcmp(edev->prom_name, "ecpp")) { config = edev->resource[1].start; goto config_done; } diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 7392fc4a9..dee40206b 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h @@ -87,22 +87,24 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) { __asm__ __volatile__( - "\n1: casa [%3] %%asi, %2, %0\n" - "2:\n" + "\n1: lduwa [%2] %%asi, %0\n" + "2: casa [%2] %%asi, %0, %1\n" + "3:\n" " .section .fixup,#alloc,#execinstr\n" " .align 4\n" - "3: ba 2b\n" - " mov %4, %0\n" + "4: ba 3b\n" + " mov %3, %0\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 4\n" - " .word 1b, 3b\n" + " .word 1b, 4b\n" + " .word 2b, 4b\n" " .previous\n" - : "=r" (newval) - : "0" (newval), "r" (oldval), "r" (uaddr), "i" (-EFAULT) + : "=&r" (oldval) + : "r" (newval), "r" (uaddr), "i" (-EFAULT) : "memory"); - return newval; + return oldval; } #endif /* !(_SPARC64_FUTEX_H) */ diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h index 7c29fd1a8..f0cf71376 100644 --- a/include/asm-sparc64/hardirq.h +++ b/include/asm-sparc64/hardirq.h @@ -12,8 +12,6 @@ #define local_softirq_pending() \ (local_cpu_data().__softirq_pending) -void ack_bad_irq(unsigned int irq); - #define HARDIRQ_BITS 8 #endif /* !(__SPARC64_HARDIRQ_H) */ diff --git a/include/asm-sparc64/hw_irq.h b/include/asm-sparc64/hw_irq.h index 599b3b073..153cae2dd 100644 --- a/include/asm-sparc64/hw_irq.h +++ b/include/asm-sparc64/hw_irq.h @@ -1,6 +1,6 @@ #ifndef __ASM_SPARC64_HW_IRQ_H #define __ASM_SPARC64_HW_IRQ_H -extern void hw_resend_irq(struct hw_interrupt_type *handler, unsigned int virt_irq); +/* Dummy include. */ #endif diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index 55149cf93..c393f815b 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h @@ -10,6 +10,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 905e59b4a..de33d6e1a 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h @@ -8,6 +8,7 @@ #ifndef _SPARC64_IRQ_H #define _SPARC64_IRQ_H +#include #include #include #include @@ -15,6 +16,58 @@ #include #include +struct ino_bucket; + +#define MAX_IRQ_DESC_ACTION 4 + +struct irq_desc { + void (*pre_handler)(struct ino_bucket *, void *, void *); + void *pre_handler_arg1; + void *pre_handler_arg2; + u32 action_active_mask; + struct irqaction action[MAX_IRQ_DESC_ACTION]; +}; + +/* You should not mess with this directly. That's the job of irq.c. + * + * If you make changes here, please update hand coded assembler of + * the vectored interrupt trap handler in entry.S -DaveM + * + * This is currently one DCACHE line, two buckets per L2 cache + * line. Keep this in mind please. + */ +struct ino_bucket { + /* Next handler in per-CPU PIL worklist. We know that + * bucket pointers have the high 32-bits clear, so to + * save space we only store the bits we need. + */ +/*0x00*/unsigned int irq_chain; + + /* PIL to schedule this IVEC at. */ +/*0x04*/unsigned char pil; + + /* If an IVEC arrives while irq_info is NULL, we + * set this to notify request_irq() about the event. + */ +/*0x05*/unsigned char pending; + + /* Miscellaneous flags. */ +/*0x06*/unsigned char flags; + + /* Currently unused. */ +/*0x07*/unsigned char __pad; + + /* Reference to IRQ descriptor for this bucket. */ +/*0x08*/struct irq_desc *irq_info; + + /* Sun5 Interrupt Clear Register. */ +/*0x10*/unsigned long iclr; + + /* Sun5 Interrupt Mapping Register. */ +/*0x18*/unsigned long imap; + +}; + /* IMAP/ICLR register defines */ #define IMAP_VALID 0x80000000 /* IRQ Enabled */ #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ @@ -32,20 +85,36 @@ #define ICLR_TRANSMIT 0x00000001 /* Transmit state */ #define ICLR_PENDING 0x00000003 /* Pending state */ -/* The largest number of unique interrupt sources we support. - * If this needs to ever be larger than 255, you need to change - * the type of ino_bucket->virt_irq as appropriate. - * - * ino_bucket->virt_irq allocation is made during {sun4v_,}build_irq(). - */ -#define NR_IRQS 255 +/* Only 8-bits are available, be careful. -DaveM */ +#define IBF_PCI 0x02 /* PSYCHO/SABRE/SCHIZO PCI interrupt. */ +#define IBF_ACTIVE 0x04 /* Interrupt is active and has a handler.*/ +#define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ + +#define NUM_IVECS (IMAP_INR + 1) +extern struct ino_bucket ivector_table[NUM_IVECS]; + +#define __irq_ino(irq) \ + (((struct ino_bucket *)(unsigned long)(irq)) - &ivector_table[0]) +#define __irq_pil(irq) ((struct ino_bucket *)(unsigned long)(irq))->pil +#define __bucket(irq) ((struct ino_bucket *)(unsigned long)(irq)) +#define __irq(bucket) ((unsigned int)(unsigned long)(bucket)) + +static __inline__ char *__irq_itoa(unsigned int irq) +{ + static char buff[16]; + + sprintf(buff, "%d,%x", __irq_pil(irq), (unsigned int)__irq_ino(irq)); + return buff; +} + +#define NR_IRQS 16 -extern void irq_install_pre_handler(int virt_irq, - void (*func)(unsigned int, void *, void *), - void *arg1, void *arg2); #define irq_canonicalize(irq) (irq) -extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); -extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); +extern void disable_irq(unsigned int); +#define disable_irq_nosync disable_irq +extern void enable_irq(unsigned int); +extern unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap); +extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino, int pil, unsigned char flags); extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); static __inline__ void set_softint(unsigned long bits) @@ -71,4 +140,8 @@ static __inline__ unsigned long get_softint(void) return retval; } +struct irqaction; +struct pt_regs; +int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif diff --git a/include/asm-sparc64/isa.h b/include/asm-sparc64/isa.h index d9728b903..4601bbfc3 100644 --- a/include/asm-sparc64/isa.h +++ b/include/asm-sparc64/isa.h @@ -9,32 +9,37 @@ #include #include -#include -#include struct sparc_isa_bridge; struct sparc_isa_device { - struct of_device ofdev; struct sparc_isa_device *next; struct sparc_isa_device *child; struct sparc_isa_bridge *bus; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; + char compatible[64]; struct resource resource; unsigned int irq; }; -#define to_isa_device(d) container_of(d, struct sparc_isa_device, ofdev.dev) struct sparc_isa_bridge { - struct of_device ofdev; struct sparc_isa_bridge *next; struct sparc_isa_device *devices; struct pci_pbm_info *parent; struct pci_dev *self; int index; - struct device_node *prom_node; + int prom_node; + char prom_name[64]; +#define linux_prom_isa_ranges linux_prom_ebus_ranges + struct linux_prom_isa_ranges isa_ranges[PROMREG_MAX]; + int num_isa_ranges; +#define linux_prom_isa_intmap linux_prom_ebus_intmap + struct linux_prom_isa_intmap isa_intmap[PROMREG_MAX]; + int num_isa_intmap; +#define linux_prom_isa_intmask linux_prom_ebus_intmask + struct linux_prom_isa_intmap isa_intmask; }; -#define to_isa_bridge(d) container_of(d, struct sparc_isa_bridge, ofdev.dev) extern struct sparc_isa_bridge *isa_chain; diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h index 11251bdd0..4040d127a 100644 --- a/include/asm-sparc64/kdebug.h +++ b/include/asm-sparc64/kdebug.h @@ -17,8 +17,6 @@ struct die_args { extern int register_die_notifier(struct notifier_block *); extern int unregister_die_notifier(struct notifier_block *); -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); extern struct atomic_notifier_head sparc64die_chain; extern void bad_trap(struct pt_regs *, long); diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index c9f5c34d3..e4efe652b 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h @@ -1,6 +1,7 @@ #ifndef _SPARC64_KPROBES_H #define _SPARC64_KPROBES_H +#include #include #include @@ -12,8 +13,6 @@ typedef u32 kprobe_opcode_t; #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry #define arch_remove_kprobe(p) do {} while (0) -#define ARCH_INACTIVE_KPROBE_COUNT 0 -#define flush_insn_slot(p) do { } while (0) /* Architecture specific copy of original instruction*/ struct arch_specific_insn { diff --git a/include/asm-sparc64/mc146818rtc.h b/include/asm-sparc64/mc146818rtc.h index e9c0fcc25..75bd572b3 100644 --- a/include/asm-sparc64/mc146818rtc.h +++ b/include/asm-sparc64/mc146818rtc.h @@ -4,6 +4,7 @@ #ifndef __ASM_SPARC64_MC146818RTC_H #define __ASM_SPARC64_MC146818RTC_H +#include #include #ifndef RTC_PORT diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index 8cc1860be..b3002763c 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h @@ -2,6 +2,12 @@ #ifndef __SPARC64_MMAN_H__ #define __SPARC64_MMAN_H__ +#ifdef __KERNEL__ +#define arch_mmap_check sparc64_mmap_check +int sparc64_mmap_check(unsigned long addr, unsigned long len, + unsigned long flags); +#endif + #include /* SunOS'ified... */ @@ -35,12 +41,4 @@ #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ -#define arch_mmap_check sparc64_mmap_check -int sparc64_mmap_check(unsigned long addr, unsigned long len, - unsigned long flags); -#endif -#endif - #endif /* __SPARC64_MMAN_H__ */ diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h index 70af4b6ce..2d4f2ea95 100644 --- a/include/asm-sparc64/mmu.h +++ b/include/asm-sparc64/mmu.h @@ -1,6 +1,7 @@ #ifndef __MMU_H #define __MMU_H +#include #include #include #include diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h deleted file mode 100644 index a62c7b997..000000000 --- a/include/asm-sparc64/of_device.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef _ASM_SPARC64_OF_DEVICE_H -#define _ASM_SPARC64_OF_DEVICE_H -#ifdef __KERNEL__ - -#include -#include -#include -#include - -extern struct bus_type isa_bus_type; -extern struct bus_type ebus_bus_type; -extern struct bus_type sbus_bus_type; -extern struct bus_type of_bus_type; - -/* - * The of_device is a kind of "base class" that is a superset of - * struct device for use by devices attached to an OF node and - * probed using OF properties. - */ -struct of_device -{ - struct device_node *node; - struct device dev; - struct resource resource[PROMREG_MAX]; - unsigned int irqs[PROMINTR_MAX]; - int num_irqs; - - void *sysdata; - - int slot; - int portid; - int clock_freq; -}; -#define to_of_device(d) container_of(d, struct of_device, dev) - -extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); -extern void of_iounmap(void __iomem *base, unsigned long size); - -extern struct of_device *of_find_device_by_node(struct device_node *); - -extern const struct of_device_id *of_match_device( - const struct of_device_id *matches, const struct of_device *dev); - -extern struct of_device *of_dev_get(struct of_device *dev); -extern void of_dev_put(struct of_device *dev); - -/* - * An of_platform_driver driver is attached to a basic of_device on - * the ISA, EBUS, and SBUS busses on sparc64. - */ -struct of_platform_driver -{ - char *name; - struct of_device_id *match_table; - struct module *owner; - - int (*probe)(struct of_device* dev, const struct of_device_id *match); - int (*remove)(struct of_device* dev); - - int (*suspend)(struct of_device* dev, pm_message_t state); - int (*resume)(struct of_device* dev); - int (*shutdown)(struct of_device* dev); - - struct device_driver driver; -}; -#define to_of_platform_driver(drv) container_of(drv,struct of_platform_driver, driver) - -extern int of_register_driver(struct of_platform_driver *drv, - struct bus_type *bus); -extern void of_unregister_driver(struct of_platform_driver *drv); -extern int of_device_register(struct of_device *ofdev); -extern void of_device_unregister(struct of_device *ofdev); -extern struct of_device *of_platform_device_create(struct device_node *np, - const char *bus_id, - struct device *parent, - struct bus_type *bus); -extern void of_release_dev(struct device *dev); - -#endif /* __KERNEL__ */ -#endif /* _ASM_SPARC64_OF_DEVICE_H */ diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h index e01b80559..b4959d2b0 100644 --- a/include/asm-sparc64/openprom.h +++ b/include/asm-sparc64/openprom.h @@ -175,7 +175,7 @@ struct linux_nodeops { }; /* More fun PROM structures for device probing. */ -#define PROMREG_MAX 24 +#define PROMREG_MAX 16 #define PROMVADDR_MAX 16 #define PROMINTR_MAX 15 diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index 6a0da3b16..c754676e1 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h @@ -9,6 +9,7 @@ #ifndef __SPARC64_OPLIB_H #define __SPARC64_OPLIB_H +#include #include /* OBP version string. */ @@ -287,6 +288,11 @@ extern void prom_getstring(int node, const char *prop, char *buf, int bufsize); /* Does the passed node have the given "name"? YES=1 NO=0 */ extern int prom_nodematch(int thisnode, const char *name); +/* Puts in buffer a prom name in the form name@x,y or name (x for which_io + * and y for first regs phys address + */ +extern int prom_getname(int node, char *buf, int buflen); + /* Search all siblings starting at the passed node for "name" matching * the given string. Returns the node on success, zero on failure. */ @@ -318,9 +324,8 @@ extern int prom_pathtoinode(const char *path); extern int prom_inst2pkg(int); /* CPU probing helpers. */ -struct device_node; -int cpu_find_by_instance(int instance, struct device_node **dev_node, int *mid); -int cpu_find_by_mid(int mid, struct device_node **prom_node); +int cpu_find_by_instance(int instance, int *prom_node, int *mid); +int cpu_find_by_mid(int mid, int *prom_node); /* Client interface level routines. */ extern void prom_set_trap_table(unsigned long tba); diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index 294ca9340..fea526017 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h @@ -3,8 +3,7 @@ #ifndef _SPARC64_PAGE_H #define _SPARC64_PAGE_H -#ifdef __KERNEL__ - +#include #include #if defined(CONFIG_SPARC64_PAGE_SIZE_8KB) @@ -29,6 +28,8 @@ #define DCACHE_ALIASING_POSSIBLE #endif +#ifdef __KERNEL__ + #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) #define HPAGE_SHIFT 22 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) @@ -143,7 +144,8 @@ typedef unsigned long pgprot_t; #define devmem_is_allowed(x) 1 +#endif /* !(__KERNEL__) */ + #include -#endif /* __KERNEL__ */ -#endif /* _SPARC64_PAGE_H */ +#endif /* !(_SPARC64_PAGE_H) */ diff --git a/include/asm-sparc64/param.h b/include/asm-sparc64/param.h index f0125cf5a..a1cd49746 100644 --- a/include/asm-sparc64/param.h +++ b/include/asm-sparc64/param.h @@ -1,6 +1,7 @@ #ifndef _ASMSPARC64_PARAM_H #define _ASMSPARC64_PARAM_H +#include #ifdef __KERNEL__ # define HZ CONFIG_HZ /* Internal kernel timer frequency */ diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index d3895873e..56b5197d7 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h @@ -67,17 +67,18 @@ static __inline__ unsigned int get_dma_residue(unsigned int dmanr) static int ebus_ecpp_p(struct linux_ebus_device *edev) { - if (!strcmp(edev->prom_node->name, "ecpp")) + if (!strcmp(edev->prom_name, "ecpp")) return 1; - if (!strcmp(edev->prom_node->name, "parallel")) { - char *compat; - - compat = of_get_property(edev->prom_node, - "compatible", NULL); - if (compat && - (!strcmp(compat, "ecpp") || - !strcmp(compat, "ns87317-ecpp") || - !strcmp(compat + 13, "ecpp"))) + if (!strcmp(edev->prom_name, "parallel")) { + char compat[19]; + prom_getstring(edev->prom_node, + "compatible", + compat, sizeof(compat)); + compat[18] = '\0'; + if (!strcmp(compat, "ecpp")) + return 1; + if (!strcmp(compat, "ns87317-ecpp") && + !strcmp(compat + 13, "ecpp")) return 1; } return 0; @@ -93,12 +94,12 @@ static int parport_isa_probe(int count) struct sparc_isa_device *child; unsigned long base; - if (strcmp(isa_dev->prom_node->name, "dma")) + if (strcmp(isa_dev->prom_name, "dma")) continue; child = isa_dev->child; while (child) { - if (!strcmp(child->prom_node->name, "parallel")) + if (!strcmp(child->prom_name, "parallel")) break; child = child->next; } diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index dcfa76293..1396f1109 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include /* The abstraction used here is that there are PCI controllers, @@ -155,15 +153,16 @@ struct pci_pbm_info { int chip_revision; /* Name used for top-level resources. */ - char *name; + char name[64]; /* OBP specific information. */ - struct device_node *prom_node; - struct linux_prom_pci_ranges *pbm_ranges; + int prom_node; + char prom_name[64]; + struct linux_prom_pci_ranges pbm_ranges[PROM_PCIRNG_MAX]; int num_pbm_ranges; - struct linux_prom_pci_intmap *pbm_intmap; + struct linux_prom_pci_intmap pbm_intmap[PROM_PCIIMAP_MAX]; int num_pbm_intmap; - struct linux_prom_pci_intmask *pbm_intmask; + struct linux_prom_pci_intmask pbm_intmask; u64 ino_bitmap; /* PBM I/O and Memory space resources. */ @@ -210,6 +209,7 @@ struct pci_controller_info { /* Operations which are controller specific. */ void (*scan_bus)(struct pci_controller_info *); + unsigned int (*irq_build)(struct pci_pbm_info *, struct pci_dev *, unsigned int); void (*base_address_update)(struct pci_dev *, int); void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); @@ -217,6 +217,8 @@ struct pci_controller_info { struct pci_ops *pci_ops; unsigned int pci_first_busno; unsigned int pci_last_busno; + + void *starfire_cookie; }; /* PCI devices which are not bridges have this placed in their pci_dev @@ -225,8 +227,8 @@ struct pci_controller_info { */ struct pcidev_cookie { struct pci_pbm_info *pbm; - struct device_node *prom_node; - struct of_device *op; + char prom_name[64]; + int prom_node; struct linux_prom_pci_registers prom_regs[PROMREG_MAX]; int num_prom_regs; struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index ced8cbde0..baef13b58 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h @@ -11,7 +11,6 @@ extern unsigned long __per_cpu_base; extern unsigned long __per_cpu_shift; #define __per_cpu_offset(__cpu) \ (__per_cpu_base + ((unsigned long)(__cpu) << __per_cpu_shift)) -#define per_cpu_offset(x) (__per_cpu_offset(x)) /* Separate out the type, so (int[3], foo) works. */ #define DEFINE_PER_CPU(type, name) \ @@ -22,7 +21,6 @@ register unsigned long __local_per_cpu_offset asm("g5"); /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) /* A macro to avoid #include hell... */ #define percpu_modcopy(pcpudst, src, size) \ @@ -39,7 +37,6 @@ do { \ #define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var -#define __raw_get_cpu_var(var) per_cpu__##var #endif /* SMP */ diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 9972623eb..6306271f6 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h @@ -2,6 +2,7 @@ #ifndef _SPARC64_PGALLOC_H #define _SPARC64_PGALLOC_H +#include #include #include #include diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index ebfe395cf..cd464f469 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -14,6 +14,7 @@ #include +#include #include #include #include @@ -234,7 +235,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot) sz_bits = 0UL; if (_PAGE_SZBITS_4U != 0UL || _PAGE_SZBITS_4V != 0UL) { __asm__ __volatile__( - "\n661: sethi %%uhi(%1), %0\n" + "\n661: sethi %uhi(%1), %0\n" " sllx %0, 32, %0\n" " .section .sun4v_2insn_patch, \"ax\"\n" " .word 661b\n" @@ -339,7 +340,7 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) " .section .sun4v_2insn_patch, \"ax\"\n" " .word 661b\n" " andn %0, %4, %0\n" - " or %0, %5, %0\n" + " or %0, %3, %0\n" " .previous\n" : "=r" (val) : "0" (val), "i" (_PAGE_CP_4U | _PAGE_CV_4U), "i" (_PAGE_E_4U), @@ -756,8 +757,6 @@ extern unsigned long *sparc64_valid_addr_bitmap; #define kern_addr_valid(addr) \ (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) -extern int page_in_phys_avail(unsigned long paddr); - extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h index 72927749a..79f827eb3 100644 --- a/include/asm-sparc64/pil.h +++ b/include/asm-sparc64/pil.h @@ -5,9 +5,9 @@ /* To avoid some locking problems, we hard allocate certain PILs * for SMP cross call messages that must do a etrap/rtrap. * - * A local_irq_disable() does not block the cross call delivery, so - * when SMP locking is an issue we reschedule the event into a PIL - * interrupt which is blocked by local_irq_disable(). + * A cli() does not block the cross call delivery, so when SMP + * locking is an issue we reschedule the event into a PIL interrupt + * which is blocked by cli(). * * In fact any XCALL which has to etrap/rtrap has a problem because * it is difficult to prevent rtrap from running BH's, and that would @@ -17,7 +17,6 @@ #define PIL_SMP_RECEIVE_SIGNAL 2 #define PIL_SMP_CAPTURE 3 #define PIL_SMP_CTX_NEW_VERSION 4 -#define PIL_DEVICE_IRQ 5 #ifndef __ASSEMBLY__ #define PIL_RESERVED(PIL) ((PIL) == PIL_SMP_CALL_FUNC || \ diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 66dd2fa0e..c6896b882 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h @@ -13,6 +13,7 @@ */ #define current_text_addr() ({ void *pc; __asm__("rd %%pc, %0" : "=r" (pc)); pc; }) +#include #include #include #include diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h deleted file mode 100644 index 99671ed66..000000000 --- a/include/asm-sparc64/prom.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef _SPARC64_PROM_H -#define _SPARC64_PROM_H -#ifdef __KERNEL__ - - -/* - * Definitions for talking to the Open Firmware PROM on - * Power Macintosh computers. - * - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * Updates for SPARC64 by David S. Miller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include -#include -#include - -typedef u32 phandle; -typedef u32 ihandle; - -struct property { - char *name; - int length; - void *value; - struct property *next; - unsigned long _flags; - unsigned int unique_id; -}; - -struct of_irq_controller; -struct device_node { - char *name; - char *type; - phandle node; - char *path_component_name; - char *full_name; - - struct property *properties; - struct property *deadprops; /* removed properties */ - struct device_node *parent; - struct device_node *child; - 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 kref kref; - unsigned long _flags; - void *data; - unsigned int unique_id; - - struct of_irq_controller *irq_trans; -}; - -struct of_irq_controller { - unsigned int (*irq_build)(struct device_node *, unsigned int, void *); - void *data; -}; - -/* flag descriptions */ -#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ - -#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) -#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) - -#define OF_BAD_ADDR ((u64)-1) - -static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) -{ - dn->pde = de; -} - -extern struct device_node *of_find_node_by_name(struct device_node *from, - const char *name); -#define for_each_node_by_name(dn, name) \ - for (dn = of_find_node_by_name(NULL, name); dn; \ - dn = of_find_node_by_name(dn, name)) -extern struct device_node *of_find_node_by_type(struct device_node *from, - const char *type); -#define for_each_node_by_type(dn, type) \ - for (dn = of_find_node_by_type(NULL, type); dn; \ - dn = of_find_node_by_type(dn, 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_node_by_phandle(phandle handle); -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 property *of_find_property(struct device_node *np, - const char *name, - int *lenp); -extern int of_device_is_compatible(struct device_node *device, const char *); -extern void *of_get_property(struct device_node *node, const char *name, - int *lenp); -extern int of_set_property(struct device_node *node, const char *name, void *val, int len); -extern int of_getintprop_default(struct device_node *np, - const char *name, - int def); -extern int of_n_addr_cells(struct device_node *np); -extern int of_n_size_cells(struct device_node *np); - -extern void prom_build_devicetree(void); - -#endif /* __KERNEL__ */ -#endif /* _SPARC64_PROM_H */ diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index 7efd49d31..48279e10f 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h @@ -11,8 +11,6 @@ #include #include -#include -#include #include #include @@ -44,19 +42,18 @@ struct sbus_bus; /* Linux SBUS device tables */ struct sbus_dev { - struct of_device ofdev; - struct sbus_bus *bus; - struct sbus_dev *next; - struct sbus_dev *child; - struct sbus_dev *parent; - int prom_node; - char prom_name[64]; - int slot; + struct sbus_bus *bus; /* Our toplevel parent SBUS */ + struct sbus_dev *next; /* Chain of siblings */ + struct sbus_dev *child; /* Chain of children */ + struct sbus_dev *parent;/* Parent device if not toplevel*/ + int prom_node; /* OBP node of this device */ + char prom_name[64]; /* OBP device name property */ + int slot; /* SBUS slot number */ struct resource resource[PROMREG_MAX]; struct linux_prom_registers reg_addrs[PROMREG_MAX]; - int num_registers; + int num_registers, ranges_applied; struct linux_prom_ranges device_ranges[PROMREG_MAX]; int num_device_ranges; @@ -64,11 +61,9 @@ struct sbus_dev { unsigned int irqs[4]; int num_irqs; }; -#define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev) /* This struct describes the SBus(s) found on this machine. */ struct sbus_bus { - struct of_device ofdev; void *iommu; /* Opaque IOMMU cookie */ struct sbus_dev *devices; /* Tree of SBUS devices */ struct sbus_bus *next; /* Next SBUS in system */ @@ -80,8 +75,8 @@ struct sbus_bus { int num_sbus_ranges; int portid; + void *starfire_cookie; }; -#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev) extern struct sbus_bus *sbus_root; @@ -100,7 +95,6 @@ extern struct sbus_bus *sbus_root; #define sbus_can_dma_64bit(sdev) (1) #define sbus_can_burst64(sdev) (1) extern void sbus_set_sbus64(struct sbus_dev *, int); -extern void sbus_fill_device_irq(struct sbus_dev *); /* These yield IOMMU mappings in consistent mode. */ extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp); @@ -125,10 +119,4 @@ extern void sbus_dma_sync_sg_for_cpu(struct sbus_dev *, struct scatterlist *, in #define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu extern void sbus_dma_sync_sg_for_device(struct sbus_dev *, struct scatterlist *, int, int); -extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *); -extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *); -extern void sbus_setup_arch_props(struct sbus_bus *, struct device_node *); -extern int sbus_arch_preinit(void); -extern void sbus_arch_postinit(void); - #endif /* !(_SPARC64_SBUS_H) */ diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h index 911d0427d..8c66fded8 100644 --- a/include/asm-sparc64/shmparam.h +++ b/include/asm-sparc64/shmparam.h @@ -1,7 +1,6 @@ /* $Id: shmparam.h,v 1.5 2001/09/24 21:17:57 kanoj Exp $ */ #ifndef _ASMSPARC64_SHMPARAM_H #define _ASMSPARC64_SHMPARAM_H -#ifdef __KERNEL__ #include @@ -9,5 +8,4 @@ /* attach addr a multiple of this */ #define SHMLBA ((PAGE_SIZE > L1DCACHE_SIZE) ? PAGE_SIZE : L1DCACHE_SIZE) -#endif /* __KERNEL__ */ #endif /* _ASMSPARC64_SHMPARAM_H */ diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h index c96e6c30f..df17e47ab 100644 --- a/include/asm-sparc64/siginfo.h +++ b/include/asm-sparc64/siginfo.h @@ -11,6 +11,7 @@ #ifdef __KERNEL__ +#include #include #ifdef CONFIG_COMPAT diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index 996887110..e3059bb4a 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h @@ -6,6 +6,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ +#include #include #include #include @@ -133,13 +134,16 @@ struct sigstack { * usage of signal stacks by using the (now obsolete) sa_restorer field in * the sigaction structure as a stack pointer. This is now possible due to * the changes in signal handling. LBT 010493. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. */ #define SA_NOCLDSTOP _SV_IGNCHILD #define SA_STACK _SV_SSTACK #define SA_ONSTACK _SV_SSTACK #define SA_RESTART _SV_INTR #define SA_ONESHOT _SV_RESET +#define SA_INTERRUPT 0x10u #define SA_NOMASK 0x20u #define SA_NOCLDWAIT 0x100u #define SA_SIGINFO 0x200u diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 388249b75..89d86ecaa 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h @@ -6,6 +6,7 @@ #ifndef _SPARC64_SMP_H #define _SPARC64_SMP_H +#include #include #include #include diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h index 754d46a50..59987dad3 100644 --- a/include/asm-sparc64/socket.h +++ b/include/asm-sparc64/socket.h @@ -48,7 +48,6 @@ #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_PEERSEC 0x001e -#define SO_PASSSEC 0x001f /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 0x5001 diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index bd5ffc76b..508c416e9 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h @@ -6,6 +6,7 @@ #ifndef __SPARC64_SPINLOCK_H #define __SPARC64_SPINLOCK_H +#include #include /* For NR_CPUS */ #ifndef __ASSEMBLY__ diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h index 48b50b5e3..b606cb2b3 100644 --- a/include/asm-sparc64/starfire.h +++ b/include/asm-sparc64/starfire.h @@ -14,7 +14,7 @@ extern int this_is_starfire; extern void check_if_starfire(void); extern void starfire_cpu_setup(void); extern int starfire_hard_smp_processor_id(void); -extern void starfire_hookup(int); +extern void *starfire_hookup(int); extern unsigned int starfire_translate(unsigned long imap, unsigned int upaid); #endif diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index a8b7432c9..a18ec87a5 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h @@ -2,6 +2,7 @@ #ifndef __SPARC64_SYSTEM_H #define __SPARC64_SYSTEM_H +#include #include #include #include @@ -123,6 +124,8 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \ #define read_barrier_depends() do { } while(0) #define set_mb(__var, __value) \ do { __var = __value; membar_storeload_storestore(); } while(0) +#define set_wmb(__var, __value) \ + do { __var = __value; wmb(); } while(0) #ifdef CONFIG_SMP #define smp_mb() mb() diff --git a/include/asm-sparc64/timer.h b/include/asm-sparc64/timer.h index d435594df..edc8e08c3 100644 --- a/include/asm-sparc64/timer.h +++ b/include/asm-sparc64/timer.h @@ -9,6 +9,7 @@ #include +#include struct sparc64_tick_ops { void (*init_tick)(unsigned long); diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 68546bf3a..41a5d1c70 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h @@ -1,6 +1,7 @@ #ifndef _SPARC64_TLB_H #define _SPARC64_TLB_H +#include #include #include #include diff --git a/include/asm-sparc64/tlbflush.h b/include/asm-sparc64/tlbflush.h index 348732857..e3a7c453b 100644 --- a/include/asm-sparc64/tlbflush.h +++ b/include/asm-sparc64/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _SPARC64_TLBFLUSH_H #define _SPARC64_TLBFLUSH_H +#include #include #include diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h index 98a6c6135..0e234e201 100644 --- a/include/asm-sparc64/topology.h +++ b/include/asm-sparc64/topology.h @@ -1,9 +1,6 @@ #ifndef _ASM_SPARC64_TOPOLOGY_H #define _ASM_SPARC64_TOPOLOGY_H -#include -#define smt_capable() (tlb_type == hypervisor) - #include #endif /* _ASM_SPARC64_TOPOLOGY_H */ diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index f2352606a..2d5e3c464 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h @@ -2,6 +2,7 @@ #ifndef _SPARC64_TTABLE_H #define _SPARC64_TTABLE_H +#include #include #ifdef __ASSEMBLY__ diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 7c980092d..5a3f7b1c1 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h @@ -321,9 +321,6 @@ #define __NR_set_robust_list 300 #define __NR_get_robust_list 301 -#define NR_SYSCALLS 302 - -#ifdef __KERNEL__ /* WARNING: You MAY NOT add syscall numbers larger than 301, since * all of the syscall tables in the Sparc kernel are * sized to have 301 entries (starting at zero). Therefore @@ -490,6 +487,7 @@ asmlinkage long sys_rt_sigaction(int sig, #endif /* __KERNEL_SYSCALLS__ */ +#ifdef __KERNEL__ /* sysconf options, for SunOS compatibility */ #define _SC_ARG_MAX 1 #define _SC_CHILD_MAX 2 @@ -523,6 +521,7 @@ asmlinkage long sys_rt_sigaction(int sig, #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND +#endif /* * "Conditional" syscalls @@ -532,5 +531,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __KERNEL__ */ #endif /* _SPARC64_UNISTD_H */ diff --git a/include/asm-sparc64/vdev.h b/include/asm-sparc64/vdev.h new file mode 100644 index 000000000..996e6be7b --- /dev/null +++ b/include/asm-sparc64/vdev.h @@ -0,0 +1,16 @@ +/* vdev.h: SUN4V virtual device interfaces and defines. + * + * Copyright (C) 2006 David S. Miller + */ + +#ifndef _SPARC64_VDEV_H +#define _SPARC64_VDEV_H + +#include + +extern u32 sun4v_vdev_devhandle; +extern int sun4v_vdev_root; + +extern unsigned int sun4v_vdev_device_interrupt(unsigned int); + +#endif /* !(_SPARC64_VDEV_H) */ diff --git a/include/asm-sparc64/vga.h b/include/asm-sparc64/vga.h index c69d5b2ba..9c57eb363 100644 --- a/include/asm-sparc64/vga.h +++ b/include/asm-sparc64/vga.h @@ -28,6 +28,6 @@ static inline u16 scr_readw(const u16 *addr) return *addr; } -#define VGA_MAP_MEM(x,s) (x) +#define VGA_MAP_MEM(x) (x) #endif diff --git a/include/asm-um/a.out.h b/include/asm-um/a.out.h index 50cee7b29..7c26265e1 100644 --- a/include/asm-um/a.out.h +++ b/include/asm-um/a.out.h @@ -1,6 +1,7 @@ #ifndef __UM_A_OUT_H #define __UM_A_OUT_H +#include "linux/config.h" #include "asm/arch/a.out.h" #include "choose-mode.h" diff --git a/include/asm-um/cache.h b/include/asm-um/cache.h index 19e1bdd67..3d0587075 100644 --- a/include/asm-um/cache.h +++ b/include/asm-um/cache.h @@ -1,6 +1,7 @@ #ifndef __UM_CACHE_H #define __UM_CACHE_H +#include #if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT) # define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h index 99711134e..2998cf925 100644 --- a/include/asm-um/elf-ppc.h +++ b/include/asm-um/elf-ppc.h @@ -1,6 +1,7 @@ #ifndef __UM_ELF_PPC_H #define __UM_ELF_PPC_H +#include "linux/config.h" extern long elf_aux_hwcap; #define ELF_HWCAP (elf_aux_hwcap) diff --git a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h index d352a35cf..ae0ca3932 100644 --- a/include/asm-um/fixmap.h +++ b/include/asm-um/fixmap.h @@ -1,6 +1,7 @@ #ifndef __UM_FIXMAP_H #define __UM_FIXMAP_H +#include #include #include #include diff --git a/include/asm-um/hardirq.h b/include/asm-um/hardirq.h index 313ebb8a2..1224b2690 100644 --- a/include/asm-um/hardirq.h +++ b/include/asm-um/hardirq.h @@ -3,6 +3,7 @@ #ifndef __ASM_UM_HARDIRQ_H #define __ASM_UM_HARDIRQ_H +#include #include #include diff --git a/include/asm-um/hw_irq.h b/include/asm-um/hw_irq.h index 1cf84cf5f..4ee38c0b6 100644 --- a/include/asm-um/hw_irq.h +++ b/include/asm-um/hw_irq.h @@ -4,4 +4,7 @@ #include "asm/irq.h" #include "asm/archparam.h" +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{} + #endif diff --git a/include/asm-um/io.h b/include/asm-um/io.h index 44e8b8c77..1934d9340 100644 --- a/include/asm-um/io.h +++ b/include/asm-um/io.h @@ -45,13 +45,8 @@ static inline void writel(unsigned int b, volatile void __iomem *addr) { *(volatile unsigned int __force *) addr = b; } -static inline void writeq(unsigned int b, volatile void __iomem *addr) -{ - *(volatile unsigned long long __force *) addr = b; -} #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel -#define __raw_writeq writeq #endif diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h index 6c03acdb4..0b22ad776 100644 --- a/include/asm-um/kmap_types.h +++ b/include/asm-um/kmap_types.h @@ -6,24 +6,6 @@ #ifndef __UM_KMAP_TYPES_H #define __UM_KMAP_TYPES_H -/* No more #include "asm/arch/kmap_types.h" ! */ - -enum km_type { - KM_BOUNCE_READ, - KM_SKB_SUNRPC_DATA, - KM_SKB_DATA_SOFTIRQ, - KM_USER0, - KM_USER1, - KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ - KM_BIO_SRC_IRQ, - KM_BIO_DST_IRQ, - KM_PTE0, - KM_PTE1, - KM_IRQ0, - KM_IRQ1, - KM_SOFTIRQ0, - KM_SOFTIRQ1, - KM_TYPE_NR -}; +#include "asm/arch/kmap_types.h" #endif diff --git a/include/asm-um/linkage.h b/include/asm-um/linkage.h index 78b862472..e3d62dcbd 100644 --- a/include/asm-um/linkage.h +++ b/include/asm-um/linkage.h @@ -3,6 +3,7 @@ #include "asm/arch/linkage.h" +#include /* will pick sane defaults */ #ifdef CONFIG_GPROF diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index f709c784b..9a0e48eb5 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h @@ -7,6 +7,7 @@ #define __UM_MMU_CONTEXT_H #include "linux/sched.h" +#include "linux/config.h" #include "choose-mode.h" #include "um_mmu.h" diff --git a/include/asm-um/page.h b/include/asm-um/page.h index b5b65d4a4..459311435 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h @@ -9,6 +9,7 @@ struct page; +#include #include /* PAGE_SHIFT determines the page size */ diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h index 937f9cf2a..45564e3c9 100644 --- a/include/asm-um/pgalloc.h +++ b/include/asm-um/pgalloc.h @@ -8,6 +8,7 @@ #ifndef __UM_PGALLOC_H #define __UM_PGALLOC_H +#include "linux/config.h" #include "linux/mm.h" #include "asm/fixmap.h" diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 824c28896..da07a69ce 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h @@ -10,6 +10,7 @@ struct pt_regs; struct task_struct; +#include "linux/config.h" #include "asm/ptrace.h" #include "choose-mode.h" #include "registers.h" diff --git a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h index a36f5371b..503484305 100644 --- a/include/asm-um/ptrace-generic.h +++ b/include/asm-um/ptrace-generic.h @@ -8,6 +8,7 @@ #ifndef __ASSEMBLY__ +#include "linux/config.h" #define pt_regs pt_regs_subarch #define show_regs show_regs_subarch diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h index ca552261e..aeda6657f 100644 --- a/include/asm-um/smp.h +++ b/include/asm-um/smp.h @@ -3,6 +3,7 @@ #ifdef CONFIG_SMP +#include "linux/config.h" #include "linux/bitops.h" #include "asm/current.h" #include "linux/cpumask.h" diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index 261e2f452..f166b9837 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h @@ -8,6 +8,7 @@ #ifndef __ASSEMBLY__ +#include #include #include diff --git a/include/asm-v850/Kbuild b/include/asm-v850/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-v850/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-v850/atomic.h b/include/asm-v850/atomic.h index e4e57de08..166df0045 100644 --- a/include/asm-v850/atomic.h +++ b/include/asm-v850/atomic.h @@ -14,6 +14,7 @@ #ifndef __V850_ATOMIC_H__ #define __V850_ATOMIC_H__ +#include #include diff --git a/include/asm-v850/bitops.h b/include/asm-v850/bitops.h index 1fa99baf4..1f6fd5ab4 100644 --- a/include/asm-v850/bitops.h +++ b/include/asm-v850/bitops.h @@ -14,6 +14,7 @@ #define __V850_BITOPS_H__ +#include #include /* unlikely */ #include /* swab32 */ #include /* interrupt enable/disable */ diff --git a/include/asm-v850/dma-mapping.h b/include/asm-v850/dma-mapping.h index 1cc42c603..c63fb50ec 100644 --- a/include/asm-v850/dma-mapping.h +++ b/include/asm-v850/dma-mapping.h @@ -1,6 +1,7 @@ #ifndef __V850_DMA_MAPPING_H__ #define __V850_DMA_MAPPING_H__ +#include #ifdef CONFIG_PCI #include diff --git a/include/asm-v850/hardirq.h b/include/asm-v850/hardirq.h index 04e20127c..d98488cd5 100644 --- a/include/asm-v850/hardirq.h +++ b/include/asm-v850/hardirq.h @@ -1,6 +1,7 @@ #ifndef __V850_HARDIRQ_H__ #define __V850_HARDIRQ_H__ +#include #include #include diff --git a/include/asm-v850/hw_irq.h b/include/asm-v850/hw_irq.h index 043e94bb6..a8aab4342 100644 --- a/include/asm-v850/hw_irq.h +++ b/include/asm-v850/hw_irq.h @@ -1,4 +1,8 @@ #ifndef __V850_HW_IRQ_H__ #define __V850_HW_IRQ_H__ +static inline void hw_resend_irq (struct hw_interrupt_type *h, unsigned int i) +{ +} + #endif /* __V850_HW_IRQ_H__ */ diff --git a/include/asm-v850/irq.h b/include/asm-v850/irq.h index 1bf096db8..44431152b 100644 --- a/include/asm-v850/irq.h +++ b/include/asm-v850/irq.h @@ -62,6 +62,8 @@ extern void disable_irq (unsigned int irq); /* Disable an irq without waiting. */ extern void disable_irq_nosync (unsigned int irq); +extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); + #endif /* !__ASSEMBLY__ */ #endif /* __V850_IRQ_H__ */ diff --git a/include/asm-v850/machdep.h b/include/asm-v850/machdep.h index f1e3b8b91..98d8bf639 100644 --- a/include/asm-v850/machdep.h +++ b/include/asm-v850/machdep.h @@ -14,6 +14,7 @@ #ifndef __V850_MACHDEP_H__ #define __V850_MACHDEP_H__ +#include /* chips */ #ifdef CONFIG_V850E_MA1 diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index 018f2675f..6ac5ba307 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h @@ -14,8 +14,6 @@ #ifndef __V850_PAGE_H__ #define __V850_PAGE_H__ -#ifdef __KERNEL__ - #include @@ -34,6 +32,7 @@ #endif +#ifdef __KERNEL__ #ifndef __ASSEMBLY__ #define STRICT_MM_TYPECHECKS @@ -123,11 +122,11 @@ typedef unsigned long pgprot_t; #define __va(x) ((void *)__phys_to_virt ((unsigned long)(x))) -#include -#include - #define devmem_is_allowed(x) 1 #endif /* KERNEL */ +#include +#include + #endif /* __V850_PAGE_H__ */ diff --git a/include/asm-v850/param.h b/include/asm-v850/param.h index 3c65bd573..8d796e4bf 100644 --- a/include/asm-v850/param.h +++ b/include/asm-v850/param.h @@ -14,6 +14,8 @@ #ifndef __V850_PARAM_H__ #define __V850_PARAM_H__ +#include /* For HZ */ + #define EXEC_PAGESIZE 4096 #ifndef NOGROUP @@ -23,8 +25,6 @@ #define MAXHOSTNAMELEN 64 /* max length of hostname */ #ifdef __KERNEL__ -#include /* For HZ */ - # define USER_HZ 100 # define CLOCKS_PER_SEC USER_HZ #endif diff --git a/include/asm-v850/pgtable.h b/include/asm-v850/pgtable.h index 1ea2a900f..3cf8775ce 100644 --- a/include/asm-v850/pgtable.h +++ b/include/asm-v850/pgtable.h @@ -3,6 +3,7 @@ #include +#include #include diff --git a/include/asm-v850/processor.h b/include/asm-v850/processor.h index 979e3467f..2d3130893 100644 --- a/include/asm-v850/processor.h +++ b/include/asm-v850/processor.h @@ -14,11 +14,11 @@ #ifndef __V850_PROCESSOR_H__ #define __V850_PROCESSOR_H__ +#include #ifndef __ASSEMBLY__ /* is not asm-safe. */ #include #endif -#include #include #include @@ -107,7 +107,7 @@ unsigned long get_wchan (struct task_struct *p); #define KSTK_ESP(task) task_sp (task) -#define cpu_relax() barrier() +#define cpu_relax() ((void)0) #else /* __ASSEMBLY__ */ diff --git a/include/asm-v850/serial.h b/include/asm-v850/serial.h index 36d8f4cbb..8c2a609ba 100644 --- a/include/asm-v850/serial.h +++ b/include/asm-v850/serial.h @@ -6,6 +6,7 @@ * Copyright (C) 1999 by Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. */ +#include #ifdef CONFIG_RTE_CB_ME2 diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h index a38df0834..cb52caa69 100644 --- a/include/asm-v850/signal.h +++ b/include/asm-v850/signal.h @@ -77,6 +77,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -96,6 +97,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-v850/socket.h b/include/asm-v850/socket.h index 0dfe55ac2..0240d366a 100644 --- a/include/asm-v850/socket.h +++ b/include/asm-v850/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* __V850_SOCKET_H__ */ diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h index da39916f1..7091af4b7 100644 --- a/include/asm-v850/system.h +++ b/include/asm-v850/system.h @@ -68,6 +68,7 @@ static inline int irqs_disabled (void) #define read_barrier_depends() ((void)0) #define set_rmb(var, value) do { xchg (&var, value); } while (0) #define set_mb(var, value) set_rmb (var, value) +#define set_wmb(var, value) do { var = value; wmb (); } while (0) #define smp_mb() mb () #define smp_rmb() rmb () diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h index bcb44bfe5..82460a7bb 100644 --- a/include/asm-v850/unistd.h +++ b/include/asm-v850/unistd.h @@ -14,6 +14,8 @@ #ifndef __V850_UNISTD_H__ #define __V850_UNISTD_H__ +#include + #define __NR_restart_syscall 0 #define __NR_exit 1 #define __NR_fork 2 @@ -235,9 +237,10 @@ except the syscall number (r12). */ #define SYSCALL_SHORT_CLOBBERS SYSCALL_CLOBBERS, "r13", "r14" -#ifdef __KERNEL__ -#include +/* User programs sometimes end up including this header file + (indirectly, via uClibc header files), so I'm a bit nervous just + including . */ #define __syscall_return(type, res) \ do { \ @@ -365,6 +368,7 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ } +#ifdef __KERNEL__ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_STAT64 @@ -385,6 +389,7 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION +#endif #ifdef __KERNEL_SYSCALLS__ @@ -435,7 +440,7 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* * "Conditional" syscalls @@ -450,5 +455,4 @@ asmlinkage long sys_rt_sigaction(int sig, void name (void) __attribute__ ((weak, alias ("sys_ni_syscall"))); #endif -#endif /* __KERNEL__ */ #endif /* __V850_UNISTD_H__ */ diff --git a/include/asm-v850/v850e_uart.h b/include/asm-v850/v850e_uart.h index 5182fb4cc..5930d5990 100644 --- a/include/asm-v850/v850e_uart.h +++ b/include/asm-v850/v850e_uart.h @@ -19,6 +19,7 @@ #ifndef __V850_V850E_UART_H__ #define __V850_V850E_UART_H__ +#include #include #include diff --git a/include/asm-x86_64/Kbuild b/include/asm-x86_64/Kbuild deleted file mode 100644 index 40f2f13fe..000000000 --- a/include/asm-x86_64/Kbuild +++ /dev/null @@ -1,21 +0,0 @@ -include include/asm-generic/Kbuild.asm - -ALTARCH := i386 -ARCHDEF := defined __x86_64__ -ALTARCHDEF := defined __i386__ - -header-y += boot.h -header-y += bootsetup.h -header-y += cpufeature.h -header-y += debugreg.h -header-y += ldt.h -header-y += msr.h -header-y += prctl.h -header-y += setup.h -header-y += sigcontext32.h -header-y += ucontext.h -header-y += vsyscall32.h - -unifdef-y += mce.h -unifdef-y += mtrr.h -unifdef-y += vsyscall.h diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index 2c95a319c..aa1c7b2e4 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h @@ -162,8 +162,6 @@ extern int acpi_pci_disabled; extern u8 x86_acpiid_to_apicid[]; -#define ARCH_HAS_POWER_INIT 1 - extern int acpi_skip_timer_override; #endif /*__KERNEL__*/ diff --git a/include/asm-x86_64/alternative-asm.i b/include/asm-x86_64/alternative-asm.i deleted file mode 100644 index 0b3f1a2bb..000000000 --- a/include/asm-x86_64/alternative-asm.i +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef CONFIG_SMP - .macro LOCK_PREFIX -1: lock - .section .smp_locks,"a" - .align 8 - .quad 1b - .previous - .endm -#else - .macro LOCK_PREFIX - .endm -#endif diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h deleted file mode 100644 index a584826cc..000000000 --- a/include/asm-x86_64/alternative.h +++ /dev/null @@ -1,136 +0,0 @@ -#ifndef _X86_64_ALTERNATIVE_H -#define _X86_64_ALTERNATIVE_H - -#ifdef __KERNEL__ - -#include -#include - -struct alt_instr { - u8 *instr; /* original instruction */ - u8 *replacement; - u8 cpuid; /* cpuid bit set for replacement */ - u8 instrlen; /* length of original instruction */ - u8 replacementlen; /* length of new instruction, <= instrlen */ - u8 pad[5]; -}; - -extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); - -struct module; - -#ifdef CONFIG_SMP -extern void alternatives_smp_module_add(struct module *mod, char *name, - void *locks, void *locks_end, - void *text, void *text_end); -extern void alternatives_smp_module_del(struct module *mod); -extern void alternatives_smp_switch(int smp); -#else -static inline void alternatives_smp_module_add(struct module *mod, char *name, - void *locks, void *locks_end, - void *text, void *text_end) {} -static inline void alternatives_smp_module_del(struct module *mod) {} -static inline void alternatives_smp_switch(int smp) {} -#endif - -#endif - -/* - * Alternative instructions for different CPU types or capabilities. - * - * This allows to use optimized instructions even on generic binary - * kernels. - * - * length of oldinstr must be longer or equal the length of newinstr - * It can be padded with nops as needed. - * - * For non barrier like inlines please define new variants - * without volatile and memory clobber. - */ -#define alternative(oldinstr, newinstr, feature) \ - asm volatile ("661:\n\t" oldinstr "\n662:\n" \ - ".section .altinstructions,\"a\"\n" \ - " .align 8\n" \ - " .quad 661b\n" /* label */ \ - " .quad 663f\n" /* new instruction */ \ - " .byte %c0\n" /* feature bit */ \ - " .byte 662b-661b\n" /* sourcelen */ \ - " .byte 664f-663f\n" /* replacementlen */ \ - ".previous\n" \ - ".section .altinstr_replacement,\"ax\"\n" \ - "663:\n\t" newinstr "\n664:\n" /* replacement */ \ - ".previous" :: "i" (feature) : "memory") - -/* - * Alternative inline assembly with input. - * - * Pecularities: - * No memory clobber here. - * Argument numbers start with 1. - * Best is to use constraints that are fixed size (like (%1) ... "r") - * If you use variable sized constraints like "m" or "g" in the - * replacement make sure to pad to the worst case length. - */ -#define alternative_input(oldinstr, newinstr, feature, input...) \ - asm volatile ("661:\n\t" oldinstr "\n662:\n" \ - ".section .altinstructions,\"a\"\n" \ - " .align 8\n" \ - " .quad 661b\n" /* label */ \ - " .quad 663f\n" /* new instruction */ \ - " .byte %c0\n" /* feature bit */ \ - " .byte 662b-661b\n" /* sourcelen */ \ - " .byte 664f-663f\n" /* replacementlen */ \ - ".previous\n" \ - ".section .altinstr_replacement,\"ax\"\n" \ - "663:\n\t" newinstr "\n664:\n" /* replacement */ \ - ".previous" :: "i" (feature), ##input) - -/* Like alternative_input, but with a single output argument */ -#define alternative_io(oldinstr, newinstr, feature, output, input...) \ - asm volatile ("661:\n\t" oldinstr "\n662:\n" \ - ".section .altinstructions,\"a\"\n" \ - " .align 8\n" \ - " .quad 661b\n" /* label */ \ - " .quad 663f\n" /* new instruction */ \ - " .byte %c[feat]\n" /* feature bit */ \ - " .byte 662b-661b\n" /* sourcelen */ \ - " .byte 664f-663f\n" /* replacementlen */ \ - ".previous\n" \ - ".section .altinstr_replacement,\"ax\"\n" \ - "663:\n\t" newinstr "\n664:\n" /* replacement */ \ - ".previous" : output : [feat] "i" (feature), ##input) - -/* - * Alternative inline assembly for SMP. - * - * The LOCK_PREFIX macro defined here replaces the LOCK and - * LOCK_PREFIX macros used everywhere in the source tree. - * - * SMP alternatives use the same data structures as the other - * alternatives and the X86_FEATURE_UP flag to indicate the case of a - * UP system running a SMP kernel. The existing apply_alternatives() - * works fine for patching a SMP kernel for UP. - * - * The SMP alternative tables can be kept after boot and contain both - * UP and SMP versions of the instructions to allow switching back to - * SMP at runtime, when hotplugging in a new CPU, which is especially - * useful in virtualized environments. - * - * The very common lock prefix is handled as special case in a - * separate table which is a pure address list without replacement ptr - * and size information. That keeps the table sizes small. - */ - -#ifdef CONFIG_SMP -#define LOCK_PREFIX \ - ".section .smp_locks,\"a\"\n" \ - " .align 8\n" \ - " .quad 661f\n" /* address */ \ - ".previous\n" \ - "661:\n\tlock; " - -#else /* ! CONFIG_SMP */ -#define LOCK_PREFIX "" -#endif - -#endif /* _X86_64_ALTERNATIVE_H */ diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 309cee961..79db75f17 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h @@ -1,6 +1,7 @@ #ifndef __ASM_APIC_H #define __ASM_APIC_H +#include #include #include #include @@ -49,8 +50,7 @@ static __inline unsigned int apic_read(unsigned long reg) static __inline__ void apic_wait_icr_idle(void) { - while (apic_read( APIC_ICR ) & APIC_ICR_BUSY) - cpu_relax(); + while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ); } static inline void ack_APIC_irq(void) @@ -80,23 +80,30 @@ extern void init_apic_mappings (void); extern void smp_local_timer_interrupt (struct pt_regs * regs); extern void setup_boot_APIC_clock (void); extern void setup_secondary_APIC_clock (void); +extern void setup_apic_nmi_watchdog (void); +extern int reserve_lapic_nmi(void); +extern void release_lapic_nmi(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 int APIC_init_uniprocessor (void); extern void disable_APIC_timer(void); extern void enable_APIC_timer(void); extern void clustered_apic_check(void); -extern void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector, - unsigned char msg_type, unsigned char mask); +extern void nmi_watchdog_default(void); +extern int setup_nmi_watchdog(char *); -#define K8_APIC_EXT_LVT_BASE 0x500 -#define K8_APIC_EXT_INT_MSG_FIX 0x0 -#define K8_APIC_EXT_INT_MSG_SMI 0x2 -#define K8_APIC_EXT_INT_MSG_NMI 0x4 -#define K8_APIC_EXT_INT_MSG_EXT 0x7 -#define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 +extern unsigned int nmi_watchdog; +#define NMI_DEFAULT -1 +#define NMI_NONE 0 +#define NMI_IO_APIC 1 +#define NMI_LOCAL_APIC 2 +#define NMI_INVALID 3 extern int disable_timer_pin_1; +extern void setup_threshold_lvt(unsigned long lvt_off); #ifndef CONFIG_XEN void smp_send_timer_broadcast_ipi(void); diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 1dd40067c..5a48e9bcf 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h @@ -137,6 +137,8 @@ */ #define u32 unsigned int +#define lapic ((volatile struct local_apic *)APIC_BASE) + struct local_apic { /*000*/ struct { u32 __reserved[4]; } __reserved_01; diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index 007e88d6d..cecbf7baa 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h @@ -1,7 +1,8 @@ #ifndef __ARCH_X86_64_ATOMIC__ #define __ARCH_X86_64_ATOMIC__ -#include +#include +#include /* atomic_t should be 32 bit signed type */ @@ -52,7 +53,7 @@ typedef struct { volatile int counter; } atomic_t; static __inline__ void atomic_add(int i, atomic_t *v) { __asm__ __volatile__( - LOCK_PREFIX "addl %1,%0" + LOCK "addl %1,%0" :"=m" (v->counter) :"ir" (i), "m" (v->counter)); } @@ -67,7 +68,7 @@ static __inline__ void atomic_add(int i, atomic_t *v) static __inline__ void atomic_sub(int i, atomic_t *v) { __asm__ __volatile__( - LOCK_PREFIX "subl %1,%0" + LOCK "subl %1,%0" :"=m" (v->counter) :"ir" (i), "m" (v->counter)); } @@ -86,7 +87,7 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "subl %2,%0; sete %1" + LOCK "subl %2,%0; sete %1" :"=m" (v->counter), "=qm" (c) :"ir" (i), "m" (v->counter) : "memory"); return c; @@ -101,7 +102,7 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) static __inline__ void atomic_inc(atomic_t *v) { __asm__ __volatile__( - LOCK_PREFIX "incl %0" + LOCK "incl %0" :"=m" (v->counter) :"m" (v->counter)); } @@ -115,7 +116,7 @@ static __inline__ void atomic_inc(atomic_t *v) static __inline__ void atomic_dec(atomic_t *v) { __asm__ __volatile__( - LOCK_PREFIX "decl %0" + LOCK "decl %0" :"=m" (v->counter) :"m" (v->counter)); } @@ -133,7 +134,7 @@ static __inline__ int atomic_dec_and_test(atomic_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "decl %0; sete %1" + LOCK "decl %0; sete %1" :"=m" (v->counter), "=qm" (c) :"m" (v->counter) : "memory"); return c != 0; @@ -152,7 +153,7 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "incl %0; sete %1" + LOCK "incl %0; sete %1" :"=m" (v->counter), "=qm" (c) :"m" (v->counter) : "memory"); return c != 0; @@ -172,7 +173,7 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "addl %2,%0; sets %1" + LOCK "addl %2,%0; sets %1" :"=m" (v->counter), "=qm" (c) :"ir" (i), "m" (v->counter) : "memory"); return c; @@ -189,7 +190,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) { int __i = i; __asm__ __volatile__( - LOCK_PREFIX "xaddl %0, %1;" + LOCK "xaddl %0, %1;" :"=r"(i) :"m"(v->counter), "0"(i)); return i + __i; @@ -237,7 +238,7 @@ typedef struct { volatile long counter; } atomic64_t; static __inline__ void atomic64_add(long i, atomic64_t *v) { __asm__ __volatile__( - LOCK_PREFIX "addq %1,%0" + LOCK "addq %1,%0" :"=m" (v->counter) :"ir" (i), "m" (v->counter)); } @@ -252,7 +253,7 @@ static __inline__ void atomic64_add(long i, atomic64_t *v) static __inline__ void atomic64_sub(long i, atomic64_t *v) { __asm__ __volatile__( - LOCK_PREFIX "subq %1,%0" + LOCK "subq %1,%0" :"=m" (v->counter) :"ir" (i), "m" (v->counter)); } @@ -271,7 +272,7 @@ static __inline__ int atomic64_sub_and_test(long i, atomic64_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "subq %2,%0; sete %1" + LOCK "subq %2,%0; sete %1" :"=m" (v->counter), "=qm" (c) :"ir" (i), "m" (v->counter) : "memory"); return c; @@ -286,7 +287,7 @@ static __inline__ int atomic64_sub_and_test(long i, atomic64_t *v) static __inline__ void atomic64_inc(atomic64_t *v) { __asm__ __volatile__( - LOCK_PREFIX "incq %0" + LOCK "incq %0" :"=m" (v->counter) :"m" (v->counter)); } @@ -300,7 +301,7 @@ static __inline__ void atomic64_inc(atomic64_t *v) static __inline__ void atomic64_dec(atomic64_t *v) { __asm__ __volatile__( - LOCK_PREFIX "decq %0" + LOCK "decq %0" :"=m" (v->counter) :"m" (v->counter)); } @@ -318,7 +319,7 @@ static __inline__ int atomic64_dec_and_test(atomic64_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "decq %0; sete %1" + LOCK "decq %0; sete %1" :"=m" (v->counter), "=qm" (c) :"m" (v->counter) : "memory"); return c != 0; @@ -337,7 +338,7 @@ static __inline__ int atomic64_inc_and_test(atomic64_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "incq %0; sete %1" + LOCK "incq %0; sete %1" :"=m" (v->counter), "=qm" (c) :"m" (v->counter) : "memory"); return c != 0; @@ -357,7 +358,7 @@ static __inline__ int atomic64_add_negative(long i, atomic64_t *v) unsigned char c; __asm__ __volatile__( - LOCK_PREFIX "addq %2,%0; sets %1" + LOCK "addq %2,%0; sets %1" :"=m" (v->counter), "=qm" (c) :"ir" (i), "m" (v->counter) : "memory"); return c; @@ -374,7 +375,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t *v) { long __i = i; __asm__ __volatile__( - LOCK_PREFIX "xaddq %0, %1;" + LOCK "xaddq %0, %1;" :"=r"(i) :"m"(v->counter), "0"(i)); return i + __i; @@ -418,11 +419,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t *v) /* These are x86-specific, used by some header files */ #define atomic_clear_mask(mask, addr) \ -__asm__ __volatile__(LOCK_PREFIX "andl %0,%1" \ +__asm__ __volatile__(LOCK "andl %0,%1" \ : : "r" (~(mask)),"m" (*addr) : "memory") #define atomic_set_mask(mask, addr) \ -__asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \ +__asm__ __volatile__(LOCK "orl %0,%1" \ : : "r" ((unsigned)mask),"m" (*(addr)) : "memory") /* Atomic operations are already serializing on x86 */ diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index f7ba57b1c..79212128d 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h @@ -5,7 +5,13 @@ * Copyright 1992, Linus Torvalds. */ -#include +#include + +#ifdef CONFIG_SMP +#define LOCK_PREFIX "lock ; " +#else +#define LOCK_PREFIX "" +#endif #define ADDR (*(volatile long *) addr) diff --git a/include/asm-x86_64/bugs.h b/include/asm-x86_64/bugs.h index d86c5dd68..59bc68925 100644 --- a/include/asm-x86_64/bugs.h +++ b/include/asm-x86_64/bugs.h @@ -10,6 +10,7 @@ * void check_bugs(void); */ +#include #include #include #include diff --git a/include/asm-x86_64/cache.h b/include/asm-x86_64/cache.h index ed8a9d252..f8dff1c67 100644 --- a/include/asm-x86_64/cache.h +++ b/include/asm-x86_64/cache.h @@ -4,6 +4,7 @@ #ifndef __ARCH_X8664_CACHE_H #define __ARCH_X8664_CACHE_H +#include /* L1 cache line size */ #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) diff --git a/include/asm-x86_64/calgary.h b/include/asm-x86_64/calgary.h deleted file mode 100644 index 82d8de726..000000000 --- a/include/asm-x86_64/calgary.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Derived from include/asm-powerpc/iommu.h - * - * Copyright (C) IBM Corporation, 2006 - * - * Author: Jon Mason - * Author: Muli Ben-Yehuda - * - * 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 _ASM_X86_64_CALGARY_H -#define _ASM_X86_64_CALGARY_H - -#include -#include -#include -#include - -struct iommu_table { - unsigned long it_base; /* mapped address of tce table */ - unsigned long it_hint; /* Hint for next alloc */ - unsigned long *it_map; /* A simple allocation bitmap for now */ - spinlock_t it_lock; /* Protects it_map */ - unsigned int it_size; /* Size of iommu table in entries */ - unsigned char it_busno; /* Bus number this table belongs to */ - void __iomem *bbar; - u64 tar_val; - struct timer_list watchdog_timer; -}; - -#define TCE_TABLE_SIZE_UNSPECIFIED ~0 -#define TCE_TABLE_SIZE_64K 0 -#define TCE_TABLE_SIZE_128K 1 -#define TCE_TABLE_SIZE_256K 2 -#define TCE_TABLE_SIZE_512K 3 -#define TCE_TABLE_SIZE_1M 4 -#define TCE_TABLE_SIZE_2M 5 -#define TCE_TABLE_SIZE_4M 6 -#define TCE_TABLE_SIZE_8M 7 - -#ifdef CONFIG_CALGARY_IOMMU -extern int calgary_iommu_init(void); -extern void detect_calgary(void); -#else -static inline int calgary_iommu_init(void) { return 1; } -static inline void detect_calgary(void) { return; } -#endif - -#endif /* _ASM_X86_64_CALGARY_H */ diff --git a/include/asm-x86_64/calling.h b/include/asm-x86_64/calling.h index 6f4f63af9..fc2c5a6c2 100644 --- a/include/asm-x86_64/calling.h +++ b/include/asm-x86_64/calling.h @@ -2,6 +2,7 @@ * Some macros to handle stack frames in assembly. */ +#include #define R15 0 #define R14 8 diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index ee792faac..662964b74 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h @@ -46,7 +46,6 @@ #define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ #define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSR optimizations */ -#define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */ #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ #define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ @@ -66,8 +65,6 @@ #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ #define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */ -#define X86_FEATURE_UP (3*32+8) /* SMP kernel running on UP */ -#define X86_FEATURE_ARCH_PERFMON (3*32+9) /* Intel Architectural PerfMon */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index b6da83dcc..49a81a665 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h @@ -6,6 +6,7 @@ * documentation. */ +#include #include #include @@ -55,13 +56,6 @@ extern dma_addr_t bad_dma_address; extern struct dma_mapping_ops* dma_ops; extern int iommu_merge; -static inline int valid_dma_direction(int dma_direction) -{ - return ((dma_direction == DMA_BIDIRECTIONAL) || - (dma_direction == DMA_TO_DEVICE) || - (dma_direction == DMA_FROM_DEVICE)); -} - static inline int dma_mapping_error(dma_addr_t dma_addr) { if (dma_ops->mapping_error) @@ -79,7 +73,6 @@ static inline dma_addr_t dma_map_single(struct device *hwdev, void *ptr, size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); return dma_ops->map_single(hwdev, ptr, size, direction); } @@ -87,7 +80,6 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); dma_ops->unmap_single(dev, addr, size, direction); } @@ -100,7 +92,6 @@ static inline void dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle, size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_single_for_cpu) dma_ops->sync_single_for_cpu(hwdev, dma_handle, size, direction); @@ -111,7 +102,6 @@ static inline void dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle, size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_single_for_device) dma_ops->sync_single_for_device(hwdev, dma_handle, size, direction); @@ -122,7 +112,6 @@ static inline void dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle, unsigned long offset, size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_single_range_for_cpu) { dma_ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, size, direction); } @@ -134,7 +123,6 @@ static inline void dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle, unsigned long offset, size_t size, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_single_range_for_device) dma_ops->sync_single_range_for_device(hwdev, dma_handle, offset, size, direction); @@ -146,7 +134,6 @@ static inline void dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, int nelems, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_sg_for_cpu) dma_ops->sync_sg_for_cpu(hwdev, sg, nelems, direction); flush_write_buffers(); @@ -156,7 +143,6 @@ static inline void dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, int nelems, int direction) { - BUG_ON(!valid_dma_direction(direction)); if (dma_ops->sync_sg_for_device) { dma_ops->sync_sg_for_device(hwdev, sg, nelems, direction); } @@ -167,7 +153,6 @@ dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, static inline int dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, int direction) { - BUG_ON(!valid_dma_direction(direction)); return dma_ops->map_sg(hwdev, sg, nents, direction); } @@ -175,7 +160,6 @@ static inline void dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, int direction) { - BUG_ON(!valid_dma_direction(direction)); dma_ops->unmap_sg(hwdev, sg, nents, direction); } diff --git a/include/asm-x86_64/dma.h b/include/asm-x86_64/dma.h index a37c16f06..6f2a817b6 100644 --- a/include/asm-x86_64/dma.h +++ b/include/asm-x86_64/dma.h @@ -1,4 +1,4 @@ -/* +/* $Id: dma.h,v 1.1.1.1 2001/04/19 20:00:38 ak Exp $ * linux/include/asm/dma.h: Defines for using and allocating dma channels. * Written by Hennus Bergman, 1992. * High DMA channel support & info by Hannu Savolainen @@ -8,6 +8,7 @@ #ifndef _ASM_DMA_H #define _ASM_DMA_H +#include #include /* And spinlocks */ #include /* need byte IO */ #include diff --git a/include/asm-x86_64/dwarf2.h b/include/asm-x86_64/dwarf2.h index 0744db777..07654bd15 100644 --- a/include/asm-x86_64/dwarf2.h +++ b/include/asm-x86_64/dwarf2.h @@ -1,6 +1,7 @@ #ifndef _DWARF2_H #define _DWARF2_H 1 +#include #ifndef __ASSEMBLY__ #warning "asm/dwarf2.h should be only included in pure assembly files" diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index f65674832..670a3388e 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h @@ -46,7 +46,6 @@ extern void setup_memory_region(void); extern void contig_e820_setup(void); extern unsigned long e820_end_of_ram(void); extern void e820_reserve_resources(void); -extern void e820_mark_nosave_regions(void); extern void e820_print_map(char *who); extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); diff --git a/include/asm-x86_64/elf.h b/include/asm-x86_64/elf.h index a406fcb1e..b4f8f4a41 100644 --- a/include/asm-x86_64/elf.h +++ b/include/asm-x86_64/elf.h @@ -7,6 +7,8 @@ #include #include +#include +#include /* x86-64 relocation types */ #define R_X86_64_NONE 0 /* No reloc */ @@ -36,23 +38,18 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; typedef struct user_i387_struct elf_fpregset_t; -/* - * These are used to set parameters in the core dumps. - */ -#define ELF_CLASS ELFCLASS64 -#define ELF_DATA ELFDATA2LSB -#define ELF_ARCH EM_X86_64 - -#ifdef __KERNEL__ -#include -#include - /* * This is used to ensure we don't load something for the wrong architecture. */ #define elf_check_arch(x) \ ((x)->e_machine == EM_X86_64) +/* + * These are used to set parameters in the core dumps. + */ +#define ELF_CLASS ELFCLASS64 +#define ELF_DATA ELFDATA2LSB +#define ELF_ARCH EM_X86_64 /* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx contains a pointer to a function which might be registered using `atexit'. @@ -144,6 +141,7 @@ typedef struct user_i387_struct elf_fpregset_t; /* I'm not sure if we can use '-' here */ #define ELF_PLATFORM ("x86_64") +#ifdef __KERNEL__ extern void set_personality_64bit(void); #define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() /* diff --git a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h index 0b4ffbd1a..7b286bd21 100644 --- a/include/asm-x86_64/fixmap.h +++ b/include/asm-x86_64/fixmap.h @@ -11,6 +11,7 @@ #ifndef _ASM_FIXMAP_H #define _ASM_FIXMAP_H +#include #include #include #include diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h index 32ff5d132..52825ce68 100644 --- a/include/asm-x86_64/floppy.h +++ b/include/asm-x86_64/floppy.h @@ -144,11 +144,13 @@ static int vdma_get_dma_residue(unsigned int dummy) static int fd_request_irq(void) { if(can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint, - IRQF_DISABLED, "floppy", NULL); + return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, + "floppy", NULL); else return request_irq(FLOPPY_IRQ, floppy_interrupt, - IRQF_DISABLED, "floppy", NULL); + SA_INTERRUPT|SA_SAMPLE_RANDOM, + "floppy", NULL); + } static unsigned long dma_mem_alloc(unsigned long size) diff --git a/include/asm-x86_64/gart-mapping.h b/include/asm-x86_64/gart-mapping.h new file mode 100644 index 000000000..ada497b0b --- /dev/null +++ b/include/asm-x86_64/gart-mapping.h @@ -0,0 +1,16 @@ +#ifndef _X8664_GART_MAPPING_H +#define _X8664_GART_MAPPING_H 1 + +#include +#include + +struct device; + +extern void* +gart_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, gfp_t gfp); + +extern int +gart_dma_supported(struct device *hwdev, u64 mask); + +#endif /* _X8664_GART_MAPPING_H */ diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 64a65ce2f..8689951e3 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h @@ -1,6 +1,7 @@ #ifndef __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H +#include #include #include #include diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index b39098408..18ff7ee9e 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h @@ -55,7 +55,7 @@ extern int is_hpet_enabled(void); extern int hpet_rtc_timer_init(void); -extern int apic_is_clustered_box(void); +extern int oem_force_hpet_timer(void); extern int hpet_use_timer; diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 48a4a5364..91f751ba0 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h @@ -12,9 +12,12 @@ * * * hacked by Andi Kleen for x86-64. + * + * $Id: hw_irq.h,v 1.24 2001/09/14 20:55:03 vojtech Exp $ */ #ifndef __ASSEMBLY__ +#include #include #include #include @@ -127,6 +130,15 @@ __asm__( \ "push $~(" #nr ") ; " \ "jmp common_interrupt"); +#if defined(CONFIG_X86_IO_APIC) +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { + if (IO_APIC_IRQ(i)) + send_IPI_self(IO_APIC_VECTOR(i)); +} +#else +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} +#endif + #define platform_legacy_irq(irq) ((irq) < 16) #endif diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h index 0190b7c4e..e6b7f2234 100644 --- a/include/asm-x86_64/ia32.h +++ b/include/asm-x86_64/ia32.h @@ -1,6 +1,7 @@ #ifndef _ASM_X86_64_IA32_H #define _ASM_X86_64_IA32_H +#include #ifdef CONFIG_IA32_EMULATION diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index 5b52ce507..b4f4b172b 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h @@ -4,15 +4,317 @@ /* * This file contains the system call numbers of the ia32 port, * this is for the kernel only. - * Only add syscalls here where some part of the kernel needs to know - * the number. This should be otherwise in sync with asm-i386/unistd.h. -AK */ #define __NR_ia32_restart_syscall 0 #define __NR_ia32_exit 1 +#define __NR_ia32_fork 2 #define __NR_ia32_read 3 #define __NR_ia32_write 4 -#define __NR_ia32_sigreturn 119 +#define __NR_ia32_open 5 +#define __NR_ia32_close 6 +#define __NR_ia32_waitpid 7 +#define __NR_ia32_creat 8 +#define __NR_ia32_link 9 +#define __NR_ia32_unlink 10 +#define __NR_ia32_execve 11 +#define __NR_ia32_chdir 12 +#define __NR_ia32_time 13 +#define __NR_ia32_mknod 14 +#define __NR_ia32_chmod 15 +#define __NR_ia32_lchown 16 +#define __NR_ia32_break 17 +#define __NR_ia32_oldstat 18 +#define __NR_ia32_lseek 19 +#define __NR_ia32_getpid 20 +#define __NR_ia32_mount 21 +#define __NR_ia32_umount 22 +#define __NR_ia32_setuid 23 +#define __NR_ia32_getuid 24 +#define __NR_ia32_stime 25 +#define __NR_ia32_ptrace 26 +#define __NR_ia32_alarm 27 +#define __NR_ia32_oldfstat 28 +#define __NR_ia32_pause 29 +#define __NR_ia32_utime 30 +#define __NR_ia32_stty 31 +#define __NR_ia32_gtty 32 +#define __NR_ia32_access 33 +#define __NR_ia32_nice 34 +#define __NR_ia32_ftime 35 +#define __NR_ia32_sync 36 +#define __NR_ia32_kill 37 +#define __NR_ia32_rename 38 +#define __NR_ia32_mkdir 39 +#define __NR_ia32_rmdir 40 +#define __NR_ia32_dup 41 +#define __NR_ia32_pipe 42 +#define __NR_ia32_times 43 +#define __NR_ia32_prof 44 +#define __NR_ia32_brk 45 +#define __NR_ia32_setgid 46 +#define __NR_ia32_getgid 47 +#define __NR_ia32_signal 48 +#define __NR_ia32_geteuid 49 +#define __NR_ia32_getegid 50 +#define __NR_ia32_acct 51 +#define __NR_ia32_umount2 52 +#define __NR_ia32_lock 53 +#define __NR_ia32_ioctl 54 +#define __NR_ia32_fcntl 55 +#define __NR_ia32_mpx 56 +#define __NR_ia32_setpgid 57 +#define __NR_ia32_ulimit 58 +#define __NR_ia32_oldolduname 59 +#define __NR_ia32_umask 60 +#define __NR_ia32_chroot 61 +#define __NR_ia32_ustat 62 +#define __NR_ia32_dup2 63 +#define __NR_ia32_getppid 64 +#define __NR_ia32_getpgrp 65 +#define __NR_ia32_setsid 66 +#define __NR_ia32_sigaction 67 +#define __NR_ia32_sgetmask 68 +#define __NR_ia32_ssetmask 69 +#define __NR_ia32_setreuid 70 +#define __NR_ia32_setregid 71 +#define __NR_ia32_sigsuspend 72 +#define __NR_ia32_sigpending 73 +#define __NR_ia32_sethostname 74 +#define __NR_ia32_setrlimit 75 +#define __NR_ia32_getrlimit 76 /* Back compatible 2Gig limited rlimit */ +#define __NR_ia32_getrusage 77 +#define __NR_ia32_gettimeofday 78 +#define __NR_ia32_settimeofday 79 +#define __NR_ia32_getgroups 80 +#define __NR_ia32_setgroups 81 +#define __NR_ia32_select 82 +#define __NR_ia32_symlink 83 +#define __NR_ia32_oldlstat 84 +#define __NR_ia32_readlink 85 +#define __NR_ia32_uselib 86 +#define __NR_ia32_swapon 87 +#define __NR_ia32_reboot 88 +#define __NR_ia32_readdir 89 +#define __NR_ia32_mmap 90 +#define __NR_ia32_munmap 91 +#define __NR_ia32_truncate 92 +#define __NR_ia32_ftruncate 93 +#define __NR_ia32_fchmod 94 +#define __NR_ia32_fchown 95 +#define __NR_ia32_getpriority 96 +#define __NR_ia32_setpriority 97 +#define __NR_ia32_profil 98 +#define __NR_ia32_statfs 99 +#define __NR_ia32_fstatfs 100 +#define __NR_ia32_ioperm 101 +#define __NR_ia32_socketcall 102 +#define __NR_ia32_syslog 103 +#define __NR_ia32_setitimer 104 +#define __NR_ia32_getitimer 105 +#define __NR_ia32_stat 106 +#define __NR_ia32_lstat 107 +#define __NR_ia32_fstat 108 +#define __NR_ia32_olduname 109 +#define __NR_ia32_iopl 110 +#define __NR_ia32_vhangup 111 +#define __NR_ia32_idle 112 +#define __NR_ia32_vm86old 113 +#define __NR_ia32_wait4 114 +#define __NR_ia32_swapoff 115 +#define __NR_ia32_sysinfo 116 +#define __NR_ia32_ipc 117 +#define __NR_ia32_fsync 118 +#define __NR_ia32_sigreturn 119 +#define __NR_ia32_clone 120 +#define __NR_ia32_setdomainname 121 +#define __NR_ia32_uname 122 +#define __NR_ia32_modify_ldt 123 +#define __NR_ia32_adjtimex 124 +#define __NR_ia32_mprotect 125 +#define __NR_ia32_sigprocmask 126 +#define __NR_ia32_create_module 127 +#define __NR_ia32_init_module 128 +#define __NR_ia32_delete_module 129 +#define __NR_ia32_get_kernel_syms 130 +#define __NR_ia32_quotactl 131 +#define __NR_ia32_getpgid 132 +#define __NR_ia32_fchdir 133 +#define __NR_ia32_bdflush 134 +#define __NR_ia32_sysfs 135 +#define __NR_ia32_personality 136 +#define __NR_ia32_afs_syscall 137 /* Syscall for Andrew File System */ +#define __NR_ia32_setfsuid 138 +#define __NR_ia32_setfsgid 139 +#define __NR_ia32__llseek 140 +#define __NR_ia32_getdents 141 +#define __NR_ia32__newselect 142 +#define __NR_ia32_flock 143 +#define __NR_ia32_msync 144 +#define __NR_ia32_readv 145 +#define __NR_ia32_writev 146 +#define __NR_ia32_getsid 147 +#define __NR_ia32_fdatasync 148 +#define __NR_ia32__sysctl 149 +#define __NR_ia32_mlock 150 +#define __NR_ia32_munlock 151 +#define __NR_ia32_mlockall 152 +#define __NR_ia32_munlockall 153 +#define __NR_ia32_sched_setparam 154 +#define __NR_ia32_sched_getparam 155 +#define __NR_ia32_sched_setscheduler 156 +#define __NR_ia32_sched_getscheduler 157 +#define __NR_ia32_sched_yield 158 +#define __NR_ia32_sched_get_priority_max 159 +#define __NR_ia32_sched_get_priority_min 160 +#define __NR_ia32_sched_rr_get_interval 161 +#define __NR_ia32_nanosleep 162 +#define __NR_ia32_mremap 163 +#define __NR_ia32_setresuid 164 +#define __NR_ia32_getresuid 165 +#define __NR_ia32_vm86 166 +#define __NR_ia32_query_module 167 +#define __NR_ia32_poll 168 +#define __NR_ia32_nfsservctl 169 +#define __NR_ia32_setresgid 170 +#define __NR_ia32_getresgid 171 +#define __NR_ia32_prctl 172 #define __NR_ia32_rt_sigreturn 173 +#define __NR_ia32_rt_sigaction 174 +#define __NR_ia32_rt_sigprocmask 175 +#define __NR_ia32_rt_sigpending 176 +#define __NR_ia32_rt_sigtimedwait 177 +#define __NR_ia32_rt_sigqueueinfo 178 +#define __NR_ia32_rt_sigsuspend 179 +#define __NR_ia32_pread 180 +#define __NR_ia32_pwrite 181 +#define __NR_ia32_chown 182 +#define __NR_ia32_getcwd 183 +#define __NR_ia32_capget 184 +#define __NR_ia32_capset 185 +#define __NR_ia32_sigaltstack 186 +#define __NR_ia32_sendfile 187 +#define __NR_ia32_getpmsg 188 /* some people actually want streams */ +#define __NR_ia32_putpmsg 189 /* some people actually want streams */ +#define __NR_ia32_vfork 190 +#define __NR_ia32_ugetrlimit 191 /* SuS compliant getrlimit */ +#define __NR_ia32_mmap2 192 +#define __NR_ia32_truncate64 193 +#define __NR_ia32_ftruncate64 194 +#define __NR_ia32_stat64 195 +#define __NR_ia32_lstat64 196 +#define __NR_ia32_fstat64 197 +#define __NR_ia32_lchown32 198 +#define __NR_ia32_getuid32 199 +#define __NR_ia32_getgid32 200 +#define __NR_ia32_geteuid32 201 +#define __NR_ia32_getegid32 202 +#define __NR_ia32_setreuid32 203 +#define __NR_ia32_setregid32 204 +#define __NR_ia32_getgroups32 205 +#define __NR_ia32_setgroups32 206 +#define __NR_ia32_fchown32 207 +#define __NR_ia32_setresuid32 208 +#define __NR_ia32_getresuid32 209 +#define __NR_ia32_setresgid32 210 +#define __NR_ia32_getresgid32 211 +#define __NR_ia32_chown32 212 +#define __NR_ia32_setuid32 213 +#define __NR_ia32_setgid32 214 +#define __NR_ia32_setfsuid32 215 +#define __NR_ia32_setfsgid32 216 +#define __NR_ia32_pivot_root 217 +#define __NR_ia32_mincore 218 +#define __NR_ia32_madvise 219 +#define __NR_ia32_madvise1 219 /* delete when C lib stub is removed */ +#define __NR_ia32_getdents64 220 +#define __NR_ia32_fcntl64 221 +#define __NR_ia32_tuxcall 222 +#define __NR_ia32_security 223 +#define __NR_ia32_gettid 224 +#define __NR_ia32_readahead 225 +#define __NR_ia32_setxattr 226 +#define __NR_ia32_lsetxattr 227 +#define __NR_ia32_fsetxattr 228 +#define __NR_ia32_getxattr 229 +#define __NR_ia32_lgetxattr 230 +#define __NR_ia32_fgetxattr 231 +#define __NR_ia32_listxattr 232 +#define __NR_ia32_llistxattr 233 +#define __NR_ia32_flistxattr 234 +#define __NR_ia32_removexattr 235 +#define __NR_ia32_lremovexattr 236 +#define __NR_ia32_fremovexattr 237 +#define __NR_ia32_tkill 238 +#define __NR_ia32_sendfile64 239 +#define __NR_ia32_futex 240 +#define __NR_ia32_sched_setaffinity 241 +#define __NR_ia32_sched_getaffinity 242 +#define __NR_ia32_set_thread_area 243 +#define __NR_ia32_get_thread_area 244 +#define __NR_ia32_io_setup 245 +#define __NR_ia32_io_destroy 246 +#define __NR_ia32_io_getevents 247 +#define __NR_ia32_io_submit 248 +#define __NR_ia32_io_cancel 249 +#define __NR_ia32_exit_group 252 +#define __NR_ia32_lookup_dcookie 253 +#define __NR_ia32_sys_epoll_create 254 +#define __NR_ia32_sys_epoll_ctl 255 +#define __NR_ia32_sys_epoll_wait 256 +#define __NR_ia32_remap_file_pages 257 +#define __NR_ia32_set_tid_address 258 +#define __NR_ia32_timer_create 259 +#define __NR_ia32_timer_settime (__NR_ia32_timer_create+1) +#define __NR_ia32_timer_gettime (__NR_ia32_timer_create+2) +#define __NR_ia32_timer_getoverrun (__NR_ia32_timer_create+3) +#define __NR_ia32_timer_delete (__NR_ia32_timer_create+4) +#define __NR_ia32_clock_settime (__NR_ia32_timer_create+5) +#define __NR_ia32_clock_gettime (__NR_ia32_timer_create+6) +#define __NR_ia32_clock_getres (__NR_ia32_timer_create+7) +#define __NR_ia32_clock_nanosleep (__NR_ia32_timer_create+8) +#define __NR_ia32_statfs64 268 +#define __NR_ia32_fstatfs64 269 +#define __NR_ia32_tgkill 270 +#define __NR_ia32_utimes 271 +#define __NR_ia32_fadvise64_64 272 +#define __NR_ia32_vserver 273 +#define __NR_ia32_mbind 274 +#define __NR_ia32_get_mempolicy 275 +#define __NR_ia32_set_mempolicy 276 +#define __NR_ia32_mq_open 277 +#define __NR_ia32_mq_unlink (__NR_ia32_mq_open+1) +#define __NR_ia32_mq_timedsend (__NR_ia32_mq_open+2) +#define __NR_ia32_mq_timedreceive (__NR_ia32_mq_open+3) +#define __NR_ia32_mq_notify (__NR_ia32_mq_open+4) +#define __NR_ia32_mq_getsetattr (__NR_ia32_mq_open+5) +#define __NR_ia32_kexec 283 +#define __NR_ia32_waitid 284 +/* #define __NR_sys_setaltroot 285 */ +#define __NR_ia32_add_key 286 +#define __NR_ia32_request_key 287 +#define __NR_ia32_keyctl 288 +#define __NR_ia32_ioprio_set 289 +#define __NR_ia32_ioprio_get 290 +#define __NR_ia32_inotify_init 291 +#define __NR_ia32_inotify_add_watch 292 +#define __NR_ia32_inotify_rm_watch 293 +#define __NR_ia32_migrate_pages 294 +#define __NR_ia32_openat 295 +#define __NR_ia32_mkdirat 296 +#define __NR_ia32_mknodat 297 +#define __NR_ia32_fchownat 298 +#define __NR_ia32_futimesat 299 +#define __NR_ia32_fstatat64 300 +#define __NR_ia32_unlinkat 301 +#define __NR_ia32_renameat 302 +#define __NR_ia32_linkat 303 +#define __NR_ia32_symlinkat 304 +#define __NR_ia32_readlinkat 305 +#define __NR_ia32_fchmodat 306 +#define __NR_ia32_faccessat 307 +#define __NR_ia32_pselect6 308 +#define __NR_ia32_ppoll 309 +#define __NR_ia32_unshare 310 #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ diff --git a/include/asm-x86_64/intel_arch_perfmon.h b/include/asm-x86_64/intel_arch_perfmon.h deleted file mode 100644 index 59c396431..000000000 --- a/include/asm-x86_64/intel_arch_perfmon.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef X86_64_INTEL_ARCH_PERFMON_H -#define X86_64_INTEL_ARCH_PERFMON_H 1 - -#define MSR_ARCH_PERFMON_PERFCTR0 0xc1 -#define MSR_ARCH_PERFMON_PERFCTR1 0xc2 - -#define MSR_ARCH_PERFMON_EVENTSEL0 0x186 -#define MSR_ARCH_PERFMON_EVENTSEL1 0x187 - -#define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22) -#define ARCH_PERFMON_EVENTSEL_INT (1 << 20) -#define ARCH_PERFMON_EVENTSEL_OS (1 << 17) -#define ARCH_PERFMON_EVENTSEL_USR (1 << 16) - -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c) -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) -#define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT (1 << 0) - -#endif /* X86_64_INTEL_ARCH_PERFMON_H */ diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 70e91fe76..a05da8a50 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h @@ -1,6 +1,7 @@ #ifndef _ASM_IO_H #define _ASM_IO_H +#include /* * This file contains the definitions for the x86 IO instructions diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index fb7a0909a..52484e82c 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h @@ -1,6 +1,7 @@ #ifndef __ASM_IO_APIC_H #define __ASM_IO_APIC_H +#include #include #include diff --git a/include/asm-x86_64/irqflags.h b/include/asm-x86_64/irqflags.h deleted file mode 100644 index cce6937e8..000000000 --- a/include/asm-x86_64/irqflags.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * include/asm-x86_64/irqflags.h - * - * IRQ flags handling - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() functions from the lowlevel headers. - */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -#ifndef __ASSEMBLY__ -/* - * Interrupt control: - */ - -static inline unsigned long __raw_local_save_flags(void) -{ - unsigned long flags; - - __asm__ __volatile__( - "# __raw_save_flags\n\t" - "pushfq ; popq %q0" - : "=g" (flags) - : /* no input */ - : "memory" - ); - - return flags; -} - -#define raw_local_save_flags(flags) \ - do { (flags) = __raw_local_save_flags(); } while (0) - -static inline void raw_local_irq_restore(unsigned long flags) -{ - __asm__ __volatile__( - "pushq %0 ; popfq" - : /* no output */ - :"g" (flags) - :"memory", "cc" - ); -} - -#ifdef CONFIG_X86_VSMP - -/* - * Interrupt control for the VSMP architecture: - */ - -static inline void raw_local_irq_disable(void) -{ - unsigned long flags = __raw_local_save_flags(); - - raw_local_irq_restore((flags & ~(1 << 9)) | (1 << 18)); -} - -static inline void raw_local_irq_enable(void) -{ - unsigned long flags = __raw_local_save_flags(); - - raw_local_irq_restore((flags | (1 << 9)) & ~(1 << 18)); -} - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return !(flags & (1<<9)) || (flags & (1 << 18)); -} - -#else /* CONFIG_X86_VSMP */ - -static inline void raw_local_irq_disable(void) -{ - __asm__ __volatile__("cli" : : : "memory"); -} - -static inline void raw_local_irq_enable(void) -{ - __asm__ __volatile__("sti" : : : "memory"); -} - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return !(flags & (1 << 9)); -} - -#endif - -/* - * For spinlocks, etc.: - */ - -static inline unsigned long __raw_local_irq_save(void) -{ - unsigned long flags = __raw_local_save_flags(); - - raw_local_irq_disable(); - - return flags; -} - -#define raw_local_irq_save(flags) \ - do { (flags) = __raw_local_irq_save(); } while (0) - -static inline int raw_irqs_disabled(void) -{ - unsigned long flags = __raw_local_save_flags(); - - return raw_irqs_disabled_flags(flags); -} - -/* - * Used in the idle loop; sti takes one instruction cycle - * to complete: - */ -static inline void raw_safe_halt(void) -{ - __asm__ __volatile__("sti; hlt" : : : "memory"); -} - -/* - * Used when interrupts are already enabled or to - * shutdown the processor: - */ -static inline void halt(void) -{ - __asm__ __volatile__("hlt": : :"memory"); -} - -#else /* __ASSEMBLY__: */ -# ifdef CONFIG_TRACE_IRQFLAGS -# define TRACE_IRQS_ON call trace_hardirqs_on_thunk -# define TRACE_IRQS_OFF call trace_hardirqs_off_thunk -# else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF -# endif -#endif - -#endif diff --git a/include/asm-x86_64/k8.h b/include/asm-x86_64/k8.h deleted file mode 100644 index 699dd6961..000000000 --- a/include/asm-x86_64/k8.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _ASM_K8_H -#define _ASM_K8_H 1 - -#include - -extern struct pci_device_id k8_nb_ids[]; - -extern int early_is_k8_nb(u32 value); -extern struct pci_dev **k8_northbridges; -extern int num_k8_northbridges; -extern int cache_k8_northbridges(void); -extern void k8_flush_garts(void); - -#endif diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index 2b0c088e2..cf795631d 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h @@ -15,8 +15,6 @@ struct die_args { extern int register_die_notifier(struct notifier_block *); extern int unregister_die_notifier(struct notifier_block *); -extern int register_page_fault_notifier(struct notifier_block *); -extern int unregister_page_fault_notifier(struct notifier_block *); extern struct atomic_notifier_head die_chain; /* Grossly misnamed. */ @@ -49,7 +47,7 @@ static inline int notify_die(enum die_val val, const char *str, return atomic_notifier_call_chain(&die_chain, val, &args); } -extern void printk_address(unsigned long address); +extern int printk_address(unsigned long address); extern void die(const char *,struct pt_regs *,long); extern void __die(const char *,struct pt_regs *,long); extern void show_registers(struct pt_regs *regs); diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index cf5317898..98a1e95dd 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h @@ -43,11 +43,9 @@ typedef u8 kprobe_opcode_t; #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry #define ARCH_SUPPORTS_KRETPROBES -#define ARCH_INACTIVE_KPROBE_COUNT 1 void kretprobe_trampoline(void); extern void arch_remove_kprobe(struct kprobe *p); -#define flush_insn_slot(p) do { } while (0) /* Architecture specific copy of original instruction*/ struct arch_specific_insn { diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index e769e6200..cd17945bf 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h @@ -59,26 +59,12 @@ static inline void local_sub(long i, local_t *v) * This could be done better if we moved the per cpu data directly * after GS. */ - -/* Need to disable preemption for the cpu local counters otherwise we could - still access a variable of a previous CPU in a non atomic way. */ -#define cpu_local_wrap_v(v) \ - ({ local_t res__; \ - preempt_disable(); \ - res__ = (v); \ - preempt_enable(); \ - res__; }) -#define cpu_local_wrap(v) \ - ({ preempt_disable(); \ - v; \ - preempt_enable(); }) \ - -#define cpu_local_read(v) cpu_local_wrap_v(local_read(&__get_cpu_var(v))) -#define cpu_local_set(v, i) cpu_local_wrap(local_set(&__get_cpu_var(v), (i))) -#define cpu_local_inc(v) cpu_local_wrap(local_inc(&__get_cpu_var(v))) -#define cpu_local_dec(v) cpu_local_wrap(local_dec(&__get_cpu_var(v))) -#define cpu_local_add(i, v) cpu_local_wrap(local_add((i), &__get_cpu_var(v))) -#define cpu_local_sub(i, v) cpu_local_wrap(local_sub((i), &__get_cpu_var(v))) +#define cpu_local_read(v) local_read(&__get_cpu_var(v)) +#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) +#define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) +#define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) +#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) +#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) #define __cpu_local_inc(v) cpu_local_inc(v) #define __cpu_local_dec(v) cpu_local_dec(v) diff --git a/include/asm-x86_64/mach-xen/asm/irqflags.h b/include/asm-x86_64/mach-xen/asm/irqflags.h deleted file mode 100644 index 7b03e7a73..000000000 --- a/include/asm-x86_64/mach-xen/asm/irqflags.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * include/asm-x86_64/irqflags.h - * - * IRQ flags handling - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() functions from the lowlevel headers. - */ -#ifndef _ASM_IRQFLAGS_H -#define _ASM_IRQFLAGS_H - -#ifndef __ASSEMBLY__ -/* - * Interrupt control: - */ - -unsigned long __raw_local_save_flags(void); -#define raw_local_save_flags(flags) \ - do { (flags) = __raw_local_save_flags(); } while (0) - -void raw_local_irq_restore(unsigned long flags); -void raw_local_irq_disable(void); -void raw_local_irq_enable(void); - -static inline int raw_irqs_disabled_flags(unsigned long flags) -{ - return flags != 0; -} - -/* - * For spinlocks, etc.: - */ - -unsigned long __raw_local_irq_save(void); - -#define raw_local_irq_save(flags) \ - do { (flags) = __raw_local_irq_save(); } while (0) - -int raw_irqs_disabled(void); - -/* - * Used in the idle loop; sti takes one instruction cycle - * to complete: - */ -void raw_safe_halt(void); - - -/* - * Used when interrupts are already enabled or to - * shutdown the processor: - */ -void halt(void); - -#else /* __ASSEMBLY__: */ -# ifdef CONFIG_TRACE_IRQFLAGS -# define TRACE_IRQS_ON call trace_hardirqs_on_thunk -# define TRACE_IRQS_OFF call trace_hardirqs_off_thunk -# else -# define TRACE_IRQS_ON -# define TRACE_IRQS_OFF -# endif -#endif - -#endif diff --git a/include/asm-x86_64/mach-xen/asm/maddr.h b/include/asm-x86_64/mach-xen/asm/maddr.h deleted file mode 100644 index 0104de808..000000000 --- a/include/asm-x86_64/mach-xen/asm/maddr.h +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef _X86_64_MADDR_H -#define _X86_64_MADDR_H - -#include -#include - -/**** MACHINE <-> PHYSICAL CONVERSION MACROS ****/ -#define INVALID_P2M_ENTRY (~0UL) -#define FOREIGN_FRAME_BIT (1UL<<63) -#define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT) - -#ifdef CONFIG_XEN - -extern unsigned long *phys_to_machine_mapping; - -#undef machine_to_phys_mapping -extern unsigned long *machine_to_phys_mapping; -extern unsigned int machine_to_phys_order; - -static inline unsigned long pfn_to_mfn(unsigned long pfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) - return pfn; - return phys_to_machine_mapping[(unsigned int)(pfn)] & - ~FOREIGN_FRAME_BIT; -} - -static inline int phys_to_machine_mapping_valid(unsigned long pfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) - return 1; - return (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY); -} - -static inline unsigned long mfn_to_pfn(unsigned long mfn) -{ - unsigned long pfn; - - if (xen_feature(XENFEAT_auto_translated_physmap)) - return mfn; - - if (unlikely((mfn >> machine_to_phys_order) != 0)) - return end_pfn; - - /* The array access can fail (e.g., device space beyond end of RAM). */ - asm ( - "1: movq %1,%0\n" - "2:\n" - ".section .fixup,\"ax\"\n" - "3: movq %2,%0\n" - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 8\n" - " .quad 1b,3b\n" - ".previous" - : "=r" (pfn) - : "m" (machine_to_phys_mapping[mfn]), "m" (end_pfn) ); - - return pfn; -} - -/* - * We detect special mappings in one of two ways: - * 1. If the MFN is an I/O page then Xen will set the m2p entry - * to be outside our maximum possible pseudophys range. - * 2. If the MFN belongs to a different domain then we will certainly - * not have MFN in our p2m table. Conversely, if the page is ours, - * then we'll have p2m(m2p(MFN))==MFN. - * If we detect a special mapping then it doesn't have a 'struct page'. - * We force !pfn_valid() by returning an out-of-range pointer. - * - * NB. These checks require that, for any MFN that is not in our reservation, - * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if - * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN. - * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety. - * - * NB2. When deliberately mapping foreign pages into the p2m table, you *must* - * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we - * require. In all the cases we care about, the FOREIGN_FRAME bit is - * masked (e.g., pfn_to_mfn()) so behaviour there is correct. - */ -static inline unsigned long mfn_to_local_pfn(unsigned long mfn) -{ - unsigned long pfn = mfn_to_pfn(mfn); - if ((pfn < end_pfn) - && !xen_feature(XENFEAT_auto_translated_physmap) - && (phys_to_machine_mapping[pfn] != mfn)) - return end_pfn; /* force !pfn_valid() */ - return pfn; -} - -static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) -{ - if (xen_feature(XENFEAT_auto_translated_physmap)) { - BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); - return; - } - phys_to_machine_mapping[pfn] = mfn; -} - -#else /* !CONFIG_XEN */ - -#define pfn_to_mfn(pfn) (pfn) -#define mfn_to_pfn(mfn) (mfn) -#define mfn_to_local_pfn(mfn) (mfn) -#define set_phys_to_machine(pfn, mfn) BUG_ON((pfn) != (mfn)) -#define phys_to_machine_mapping_valid(pfn) (1) - -#endif /* !CONFIG_XEN */ - -/* Definitions for machine and pseudophysical addresses. */ -typedef unsigned long paddr_t; -typedef unsigned long maddr_t; - -static inline maddr_t phys_to_machine(paddr_t phys) -{ - maddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT); - machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK); - return machine; -} - -static inline paddr_t machine_to_phys(maddr_t machine) -{ - paddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT); - phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK); - return phys; -} - -/* VIRT <-> MACHINE conversion */ -#define virt_to_machine(v) (phys_to_machine(__pa(v))) -#define virt_to_mfn(v) (pfn_to_mfn(__pa(v) >> PAGE_SHIFT)) -#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) - -#define __pte_ma(x) ((pte_t) { (x) } ) -#define pfn_pte_ma(pfn, prot) __pte_ma((((pfn) << PAGE_SHIFT) | pgprot_val(prot)) & __supported_pte_mask) - -#endif /* _X86_64_MADDR_H */ - diff --git a/include/asm-x86_64/mach-xen/asm/stacktrace.h b/include/asm-x86_64/mach-xen/asm/stacktrace.h deleted file mode 100644 index 5eb9799be..000000000 --- a/include/asm-x86_64/mach-xen/asm/stacktrace.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _ASM_STACKTRACE_H -#define _ASM_STACKTRACE_H 1 - -/* Generic stack tracer with callbacks */ - -struct stacktrace_ops { - void (*warning)(void *data, char *msg); - /* msg must contain %s for the symbol */ - void (*warning_symbol)(void *data, char *msg, unsigned long symbol); - void (*address)(void *data, unsigned long address); - /* On negative return stop dumping */ - int (*stack)(void *data, char *name); -}; - -void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, - struct stacktrace_ops *ops, void *data); - -#endif diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h index d13687dfd..722978509 100644 --- a/include/asm-x86_64/mce.h +++ b/include/asm-x86_64/mce.h @@ -67,22 +67,13 @@ struct mce_log { /* Software defined banks */ #define MCE_EXTENDED_BANK 128 #define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0 - -#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */ -#define K8_MCE_THRESHOLD_BANK_0 (MCE_THRESHOLD_BASE + 0 * 9) -#define K8_MCE_THRESHOLD_BANK_1 (MCE_THRESHOLD_BASE + 1 * 9) -#define K8_MCE_THRESHOLD_BANK_2 (MCE_THRESHOLD_BASE + 2 * 9) -#define K8_MCE_THRESHOLD_BANK_3 (MCE_THRESHOLD_BASE + 3 * 9) -#define K8_MCE_THRESHOLD_BANK_4 (MCE_THRESHOLD_BASE + 4 * 9) -#define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) -#define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) +#define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ +#define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 #ifdef __KERNEL__ #include void mce_log(struct mce *m); -DECLARE_PER_CPU(struct sys_device, device_mce); - #ifdef CONFIG_X86_MCE_INTEL void mce_intel_feature_init(struct cpuinfo_x86 *c); #else diff --git a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h index af03b9f85..19f0c83d0 100644 --- a/include/asm-x86_64/mmu_context.h +++ b/include/asm-x86_64/mmu_context.h @@ -1,6 +1,7 @@ #ifndef __X86_64_MMU_CONTEXT_H #define __X86_64_MMU_CONTEXT_H +#include #include #include #include diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index c38ebdf6f..6944e7122 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h @@ -4,6 +4,7 @@ #ifndef _ASM_X86_64_MMZONE_H #define _ASM_X86_64_MMZONE_H 1 +#include #ifdef CONFIG_NUMA @@ -42,6 +43,7 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) #ifdef CONFIG_DISCONTIGMEM #define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) +#define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr)) extern int pfn_valid(unsigned long pfn); #endif diff --git a/include/asm-x86_64/msi.h b/include/asm-x86_64/msi.h index 3ad234662..356e0e82f 100644 --- a/include/asm-x86_64/msi.h +++ b/include/asm-x86_64/msi.h @@ -10,15 +10,7 @@ #include #include -#define LAST_DEVICE_VECTOR (FIRST_SYSTEM_VECTOR - 1) +#define LAST_DEVICE_VECTOR 232 #define MSI_TARGET_CPU_SHIFT 12 -extern struct msi_ops msi_apic_ops; - -static inline int msi_arch_init(void) -{ - msi_register(&msi_apic_ops); - return 0; -} - #endif /* ASM_MSI_H */ diff --git a/include/asm-x86_64/mtrr.h b/include/asm-x86_64/mtrr.h index d6135b254..66ac1c0f2 100644 --- a/include/asm-x86_64/mtrr.h +++ b/include/asm-x86_64/mtrr.h @@ -23,7 +23,9 @@ #ifndef _LINUX_MTRR_H #define _LINUX_MTRR_H +#include #include +#include #define MTRR_IOCTL_BASE 'M' @@ -100,10 +102,11 @@ static __inline__ int mtrr_del_page (int reg, unsigned long base, return -ENODEV; } -#endif /* CONFIG_MTRR */ +# endif + +#endif #ifdef CONFIG_COMPAT -#include struct mtrr_sentry32 { @@ -135,6 +138,4 @@ struct mtrr_gentry32 #endif /* CONFIG_COMPAT */ -#endif /* __KERNEL__ */ - #endif /* _LINUX_MTRR_H */ diff --git a/include/asm-x86_64/mutex.h b/include/asm-x86_64/mutex.h index 06fab6de2..11fbee2bd 100644 --- a/include/asm-x86_64/mutex.h +++ b/include/asm-x86_64/mutex.h @@ -24,7 +24,7 @@ do { \ typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ \ __asm__ __volatile__( \ - LOCK_PREFIX " decl (%%rdi) \n" \ + LOCK " decl (%%rdi) \n" \ " js 2f \n" \ "1: \n" \ \ @@ -74,7 +74,7 @@ do { \ typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ \ __asm__ __volatile__( \ - LOCK_PREFIX " incl (%%rdi) \n" \ + LOCK " incl (%%rdi) \n" \ " jle 2f \n" \ "1: \n" \ \ diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index efb45c894..d3abfc6a8 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h @@ -5,27 +5,26 @@ #define ASM_NMI_H #include -#include struct pt_regs; - + typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); - -/** + +/** * set_nmi_callback * * Set a handler for an NMI. Only one handler may be * set. Return 1 if the NMI was handled. */ void set_nmi_callback(nmi_callback_t callback); - -/** + +/** * unset_nmi_callback * * Remove the handler previously set. */ void unset_nmi_callback(void); - + #ifdef CONFIG_PM /** Replace the PM callback routine for NMI. */ @@ -57,21 +56,4 @@ extern int unknown_nmi_panic; extern int check_nmi_watchdog(void); -extern void setup_apic_nmi_watchdog (void); -extern int reserve_lapic_nmi(void); -extern void release_lapic_nmi(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 void nmi_watchdog_default(void); -extern int setup_nmi_watchdog(char *); - -extern unsigned int nmi_watchdog; -#define NMI_DEFAULT -1 -#define NMI_NONE 0 -#define NMI_IO_APIC 1 -#define NMI_LOCAL_APIC 2 -#define NMI_INVALID 3 - #endif /* ASM_NMI_H */ diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index 933ff11ec..1cc92fe02 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h @@ -8,6 +8,7 @@ struct bootnode { }; extern int compute_hash_shift(struct bootnode *nodes, int numnodes); +extern int pxm_to_node(int nid); #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index ec836f7b7..ece50e0fd 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h @@ -1,6 +1,7 @@ #ifndef _X86_64_PAGE_H #define _X86_64_PAGE_H +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 12 @@ -19,7 +20,7 @@ #define EXCEPTION_STACK_ORDER 0 #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) -#define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1) +#define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) #define IRQSTACK_ORDER 2 @@ -135,13 +136,13 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define __HAVE_ARCH_GATE_AREA 1 -#include -#include - #ifndef __ASSEMBLY__ extern int devmem_is_allowed(unsigned long pagenr); #endif #endif /* __KERNEL__ */ +#include +#include + #endif /* _X86_64_PAGE_H */ diff --git a/include/asm-x86_64/param.h b/include/asm-x86_64/param.h index a728786c3..5956b23b5 100644 --- a/include/asm-x86_64/param.h +++ b/include/asm-x86_64/param.h @@ -2,6 +2,7 @@ #define _ASMx86_64_PARAM_H #ifdef __KERNEL__ +# include # define HZ CONFIG_HZ /* Internal kernel timer frequency */ # define USER_HZ 100 /* .. some user interfaces are in "ticks */ #define CLOCKS_PER_SEC (USER_HZ) /* like times() */ diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index 49c5e9280..8a05af264 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h @@ -1,6 +1,7 @@ #ifndef __x8664_PCI_H #define __x8664_PCI_H +#include #include #ifdef __KERNEL__ @@ -39,8 +40,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); #include #include #include +#include /* for have_iommu */ -extern void pci_iommu_alloc(void); extern int iommu_setup(char *opt); /* The PCI address space does equal the physical memory @@ -52,7 +53,7 @@ extern int iommu_setup(char *opt); */ #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) -#if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU) +#ifdef CONFIG_GART_IOMMU /* * x86-64 always supports DAC, but sometimes it is useful to force diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h index 08dd9f9dd..7f33aaf9f 100644 --- a/include/asm-x86_64/percpu.h +++ b/include/asm-x86_64/percpu.h @@ -14,8 +14,6 @@ #define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset) #define __my_cpu_offset() read_pda(data_offset) -#define per_cpu_offset(x) (__per_cpu_offset(x)) - /* Separate out the type, so (int[3], foo) works. */ #define DEFINE_PER_CPU(type, name) \ __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name @@ -23,7 +21,6 @@ /* var is in discarded region: offset to particular copy we want */ #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) -#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) /* A macro to avoid #include hell... */ #define percpu_modcopy(pcpudst, src, size) \ @@ -43,7 +40,6 @@ extern void setup_per_cpu_areas(void); #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) #define __get_cpu_var(var) per_cpu__##var -#define __raw_get_cpu_var(var) per_cpu__##var #endif /* SMP */ diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 40746e1ce..195952b2c 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h @@ -337,8 +337,14 @@ static inline int pmd_large(pmd_t pte) { /* to find an entry in a page-table-directory. */ #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) #define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address)) +#define pud_offset_k(pgd, addr) pud_offset(pgd, addr) #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) +static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address) +{ + return pud + pud_index(address); +} + /* PMD - Level 2 access */ #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK)) #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index de9c3147e..37a3ec433 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -69,11 +70,7 @@ struct cpuinfo_x86 { cpumask_t llc_shared_map; /* cpus sharing the last level cache */ #endif __u8 apicid; -#ifdef CONFIG_SMP __u8 booted_cores; /* number of cores as seen by OS */ - __u8 phys_proc_id; /* Physical Processor id. */ - __u8 cpu_core_id; /* Core id. */ -#endif } ____cacheline_aligned; #define X86_VENDOR_INTEL 0 @@ -100,7 +97,6 @@ extern char ignore_irq13; extern void identify_cpu(struct cpuinfo_x86 *); extern void print_cpu_info(struct cpuinfo_x86 *); extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); -extern unsigned short num_cache_leaves; /* * EFLAGS bits @@ -232,14 +228,8 @@ struct tss_struct { unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; } __attribute__((packed)) ____cacheline_aligned; - extern struct cpuinfo_x86 boot_cpu_data; DECLARE_PER_CPU(struct tss_struct,init_tss); -/* Save the original ist values for checking stack pointers during debugging */ -struct orig_ist { - unsigned long ist[7]; -}; -DECLARE_PER_CPU(struct orig_ist, orig_ist); #ifdef CONFIG_X86_VSMP #define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT) diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 038fe1f47..8abf2a43c 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h @@ -37,6 +37,7 @@ extern void ia32_sysenter_target(void); extern void config_acpi_tables(void); extern void ia32_syscall(void); +extern void iommu_hole_init(void); extern int pmtimer_mark_offset(void); extern void pmtimer_resume(void); @@ -74,7 +75,7 @@ extern void main_timer_handler(struct pt_regs *regs); extern unsigned long end_pfn_map; -extern void show_trace(struct task_struct *, struct pt_regs *, unsigned long * rsp); +extern void show_trace(unsigned long * rsp); extern void show_registers(struct pt_regs *regs); extern void exception_table_check(void); @@ -100,9 +101,13 @@ extern int unsynchronized_tsc(void); extern void select_idle_routine(const struct cpuinfo_x86 *c); +extern void gart_parse_options(char *); +extern void __init no_iommu_init(void); + extern unsigned long table_start, table_end; extern int exception_trace; +extern int force_iommu, no_iommu; extern int using_apic_timer; extern int disable_apic; extern unsigned cpu_khz; @@ -111,13 +116,7 @@ extern int skip_ioapic_setup; extern int acpi_ht; extern int acpi_disabled; -extern void no_iommu_init(void); -extern int force_iommu, no_iommu; -extern int iommu_detected; -#ifdef CONFIG_IOMMU -extern void gart_iommu_init(void); -extern void gart_parse_options(char *); -extern void iommu_hole_init(void); +#ifdef CONFIG_GART_IOMMU extern int fallback_aper_order; extern int fallback_aper_force; extern int iommu_aperture; diff --git a/include/asm-x86_64/rwlock.h b/include/asm-x86_64/rwlock.h index 28a080d23..9942cc393 100644 --- a/include/asm-x86_64/rwlock.h +++ b/include/asm-x86_64/rwlock.h @@ -18,21 +18,69 @@ #ifndef _ASM_X86_64_RWLOCK_H #define _ASM_X86_64_RWLOCK_H +#include + #define RW_LOCK_BIAS 0x01000000 -#define RW_LOCK_BIAS_STR "0x01000000" +#define RW_LOCK_BIAS_STR "0x01000000" + +#define __build_read_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $1,(%0)\n\t" \ + "js 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tcall " helper "\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + ::"a" (rw) : "memory") -#define __build_read_lock(rw) \ - asm volatile(LOCK_PREFIX "subl $1,(%0)\n\t" \ - "jns 1f\n" \ - "call __read_lock_failed\n" \ +#define __build_read_lock_const(rw, helper) \ + asm volatile(LOCK "subl $1,%0\n\t" \ + "js 2f\n" \ "1:\n" \ - ::"D" (rw), "i" (RW_LOCK_BIAS) : "memory") + LOCK_SECTION_START("") \ + "2:\tpushq %%rax\n\t" \ + "leaq %0,%%rax\n\t" \ + "call " helper "\n\t" \ + "popq %%rax\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + :"=m" (*((volatile int *)rw))::"memory") + +#define __build_read_lock(rw, helper) do { \ + if (__builtin_constant_p(rw)) \ + __build_read_lock_const(rw, helper); \ + else \ + __build_read_lock_ptr(rw, helper); \ + } while (0) -#define __build_write_lock(rw) \ - asm volatile(LOCK_PREFIX "subl %1,(%0)\n\t" \ - "jz 1f\n" \ - "\tcall __write_lock_failed\n\t" \ +#define __build_write_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ + "jnz 2f\n" \ "1:\n" \ - ::"D" (rw), "i" (RW_LOCK_BIAS) : "memory") + LOCK_SECTION_START("") \ + "2:\tcall " helper "\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + ::"a" (rw) : "memory") + +#define __build_write_lock_const(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ + "jnz 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tpushq %%rax\n\t" \ + "leaq %0,%%rax\n\t" \ + "call " helper "\n\t" \ + "popq %%rax\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + :"=m" (*((volatile long *)rw))::"memory") + +#define __build_write_lock(rw, helper) do { \ + if (__builtin_constant_p(rw)) \ + __build_write_lock_const(rw, helper); \ + else \ + __build_write_lock_ptr(rw, helper); \ + } while (0) #endif diff --git a/include/asm-x86_64/semaphore.h b/include/asm-x86_64/semaphore.h index 064df08b9..a389aa6fe 100644 --- a/include/asm-x86_64/semaphore.h +++ b/include/asm-x86_64/semaphore.h @@ -106,7 +106,7 @@ static inline void down(struct semaphore * sem) __asm__ __volatile__( "# atomic down operation\n\t" - LOCK_PREFIX "decl %0\n\t" /* --sem->count */ + LOCK "decl %0\n\t" /* --sem->count */ "js 2f\n" "1:\n" LOCK_SECTION_START("") @@ -130,7 +130,7 @@ static inline int down_interruptible(struct semaphore * sem) __asm__ __volatile__( "# atomic interruptible down operation\n\t" - LOCK_PREFIX "decl %1\n\t" /* --sem->count */ + LOCK "decl %1\n\t" /* --sem->count */ "js 2f\n\t" "xorl %0,%0\n" "1:\n" @@ -154,7 +154,7 @@ static inline int down_trylock(struct semaphore * sem) __asm__ __volatile__( "# atomic interruptible down operation\n\t" - LOCK_PREFIX "decl %1\n\t" /* --sem->count */ + LOCK "decl %1\n\t" /* --sem->count */ "js 2f\n\t" "xorl %0,%0\n" "1:\n" @@ -178,7 +178,7 @@ static inline void up(struct semaphore * sem) { __asm__ __volatile__( "# atomic up operation\n\t" - LOCK_PREFIX "incl %0\n\t" /* ++sem->count */ + LOCK "incl %0\n\t" /* ++sem->count */ "jle 2f\n" "1:\n" LOCK_SECTION_START("") diff --git a/include/asm-x86_64/serial.h b/include/asm-x86_64/serial.h index b0496e0d7..dc752eafa 100644 --- a/include/asm-x86_64/serial.h +++ b/include/asm-x86_64/serial.h @@ -2,6 +2,7 @@ * include/asm-x86_64/serial.h */ +#include /* * This assumes you have a 1.8432 MHz clock for your UART. diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index 4581f978b..f8d557985 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h @@ -3,13 +3,13 @@ #ifndef __ASSEMBLY__ #include +#include #include /* Avoid too many header ordering problems. */ struct siginfo; #ifdef __KERNEL__ -#include /* Most things should be clean enough to redefine this at will, if care is taken to make libc match. */ @@ -24,6 +24,10 @@ typedef struct { } sigset_t; +struct pt_regs; +asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); + + #else /* Here we must cater to libcs that poke about in kernel headers. */ @@ -79,6 +83,7 @@ typedef unsigned long sigset_t; * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -98,6 +103,7 @@ typedef unsigned long sigset_t; #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 6805e1feb..a4fdaeb5c 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h @@ -5,6 +5,7 @@ * We need the APIC definitions automatically as part of 'smp.h' */ #ifndef __ASSEMBLY__ +#include #include #include #include @@ -53,6 +54,8 @@ extern int smp_call_function_single(int cpuid, void (*func) (void *info), extern cpumask_t cpu_sibling_map[NR_CPUS]; extern cpumask_t cpu_core_map[NR_CPUS]; +extern u8 phys_proc_id[NR_CPUS]; +extern u8 cpu_core_id[NR_CPUS]; extern u8 cpu_llc_id[NR_CPUS]; #define SMP_TRAMPOLINE_BASE 0x6000 diff --git a/include/asm-x86_64/socket.h b/include/asm-x86_64/socket.h index b46702607..f2cdbeae5 100644 --- a/include/asm-x86_64/socket.h +++ b/include/asm-x86_64/socket.h @@ -48,6 +48,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _ASM_SOCKET_H */ diff --git a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h index a8e3d89f5..fe484a699 100644 --- a/include/asm-x86_64/spinlock.h +++ b/include/asm-x86_64/spinlock.h @@ -4,6 +4,7 @@ #include #include #include +#include /* * Your basic SMP spinlocks, allowing only a single CPU anywhere @@ -21,7 +22,7 @@ #define __raw_spin_lock_string \ "\n1:\t" \ - LOCK_PREFIX " ; decl %0\n\t" \ + "lock ; decl %0\n\t" \ "js 2f\n" \ LOCK_SECTION_START("") \ "2:\t" \ @@ -31,16 +32,15 @@ "jmp 1b\n" \ LOCK_SECTION_END -#define __raw_spin_lock_string_up \ - "\n\tdecl %0" - #define __raw_spin_unlock_string \ "movl $1,%0" \ :"=m" (lock->slock) : : "memory" static inline void __raw_spin_lock(raw_spinlock_t *lock) { - asm volatile(__raw_spin_lock_string : "=m" (lock->slock) : : "memory"); + __asm__ __volatile__( + __raw_spin_lock_string + :"=m" (lock->slock) : : "memory"); } #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) @@ -79,6 +79,13 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) * * On x86, we implement read-write locks as a 32-bit counter * with the high bit (sign) being the "contended" bit. + * + * The inline assembly is non-obvious. Think about it. + * + * Changed to use the same technique as rw semaphores. See + * semaphore.h for details. -ben + * + * the helpers are in arch/i386/kernel/semaphore.c */ #define __raw_read_can_lock(x) ((int)(x)->lock > 0) @@ -86,12 +93,12 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) static inline void __raw_read_lock(raw_rwlock_t *rw) { - __build_read_lock(rw); + __build_read_lock(rw, "__read_lock_failed"); } static inline void __raw_write_lock(raw_rwlock_t *rw) { - __build_write_lock(rw); + __build_write_lock(rw, "__write_lock_failed"); } static inline int __raw_read_trylock(raw_rwlock_t *lock) @@ -115,12 +122,12 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock) static inline void __raw_read_unlock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX " ; incl %0" :"=m" (rw->lock) : : "memory"); + asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory"); } static inline void __raw_write_unlock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX " ; addl $" RW_LOCK_BIAS_STR ",%0" + asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0" : "=m" (rw->lock) : : "memory"); } diff --git a/include/asm-x86_64/stacktrace.h b/include/asm-x86_64/stacktrace.h deleted file mode 100644 index 5eb9799be..000000000 --- a/include/asm-x86_64/stacktrace.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _ASM_STACKTRACE_H -#define _ASM_STACKTRACE_H 1 - -/* Generic stack tracer with callbacks */ - -struct stacktrace_ops { - void (*warning)(void *data, char *msg); - /* msg must contain %s for the symbol */ - void (*warning_symbol)(void *data, char *msg, unsigned long symbol); - void (*address)(void *data, unsigned long address); - /* On negative return stop dumping */ - int (*stack)(void *data, char *name); -}; - -void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack, - struct stacktrace_ops *ops, void *data); - -#endif diff --git a/include/asm-x86_64/string.h b/include/asm-x86_64/string.h index 9505d9f4b..ee6bf2753 100644 --- a/include/asm-x86_64/string.h +++ b/include/asm-x86_64/string.h @@ -6,8 +6,7 @@ /* Written 2002 by Andi Kleen */ /* Only used for special circumstances. Stolen from i386/string.h */ -static __always_inline void * -__inline_memcpy(void * to, const void * from, size_t n) +static inline void * __inline_memcpy(void * to, const void * from, size_t n) { unsigned long d0, d1, d2; __asm__ __volatile__( diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h index ba94ab3d2..60757efd1 100644 --- a/include/asm-x86_64/swiotlb.h +++ b/include/asm-x86_64/swiotlb.h @@ -1,6 +1,7 @@ #ifndef _ASM_SWIOTLB_H #define _ASM_SWTIOLB_H 1 +#include #include @@ -42,8 +43,6 @@ extern void swiotlb_free_coherent (struct device *hwdev, size_t size, extern int swiotlb_dma_supported(struct device *hwdev, u64 mask); extern void swiotlb_init(void); -extern int swiotlb_force; - #ifdef CONFIG_SWIOTLB extern int swiotlb; #else diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 6bf170bce..397598980 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h @@ -1,12 +1,18 @@ #ifndef __ASM_SYSTEM_H #define __ASM_SYSTEM_H +#include #include #include -#include #ifdef __KERNEL__ +#ifdef CONFIG_SMP +#define LOCK_PREFIX "lock ; " +#else +#define LOCK_PREFIX "" +#endif + #define __STR(x) #x #define STR(x) __STR(x) @@ -29,7 +35,7 @@ "thread_return:\n\t" \ "movq %%gs:%P[pda_pcurrent],%%rsi\n\t" \ "movq %P[thread_info](%%rsi),%%r8\n\t" \ - LOCK_PREFIX "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ + LOCK "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ "movq %%rax,%%rdi\n\t" \ "jc ret_from_fork\n\t" \ RESTORE_CONTEXT \ @@ -64,6 +70,82 @@ extern void load_gs_index(unsigned); ".previous" \ : :"r" (value), "r" (0)) +#ifdef __KERNEL__ +struct alt_instr { + __u8 *instr; /* original instruction */ + __u8 *replacement; + __u8 cpuid; /* cpuid bit set for replacement */ + __u8 instrlen; /* length of original instruction */ + __u8 replacementlen; /* length of new instruction, <= instrlen */ + __u8 pad[5]; +}; +#endif + +/* + * Alternative instructions for different CPU types or capabilities. + * + * This allows to use optimized instructions even on generic binary + * kernels. + * + * length of oldinstr must be longer or equal the length of newinstr + * It can be padded with nops as needed. + * + * For non barrier like inlines please define new variants + * without volatile and memory clobber. + */ +#define alternative(oldinstr, newinstr, feature) \ + asm volatile ("661:\n\t" oldinstr "\n662:\n" \ + ".section .altinstructions,\"a\"\n" \ + " .align 8\n" \ + " .quad 661b\n" /* label */ \ + " .quad 663f\n" /* new instruction */ \ + " .byte %c0\n" /* feature bit */ \ + " .byte 662b-661b\n" /* sourcelen */ \ + " .byte 664f-663f\n" /* replacementlen */ \ + ".previous\n" \ + ".section .altinstr_replacement,\"ax\"\n" \ + "663:\n\t" newinstr "\n664:\n" /* replacement */ \ + ".previous" :: "i" (feature) : "memory") + +/* + * Alternative inline assembly with input. + * + * Peculiarities: + * No memory clobber here. + * Argument numbers start with 1. + * Best is to use constraints that are fixed size (like (%1) ... "r") + * If you use variable sized constraints like "m" or "g" in the + * replacement make sure to pad to the worst case length. + */ +#define alternative_input(oldinstr, newinstr, feature, input...) \ + asm volatile ("661:\n\t" oldinstr "\n662:\n" \ + ".section .altinstructions,\"a\"\n" \ + " .align 8\n" \ + " .quad 661b\n" /* label */ \ + " .quad 663f\n" /* new instruction */ \ + " .byte %c0\n" /* feature bit */ \ + " .byte 662b-661b\n" /* sourcelen */ \ + " .byte 664f-663f\n" /* replacementlen */ \ + ".previous\n" \ + ".section .altinstr_replacement,\"ax\"\n" \ + "663:\n\t" newinstr "\n664:\n" /* replacement */ \ + ".previous" :: "i" (feature), ##input) + +/* Like alternative_input, but with a single output argument */ +#define alternative_io(oldinstr, newinstr, feature, output, input...) \ + asm volatile ("661:\n\t" oldinstr "\n662:\n" \ + ".section .altinstructions,\"a\"\n" \ + " .align 8\n" \ + " .quad 661b\n" /* label */ \ + " .quad 663f\n" /* new instruction */ \ + " .byte %c[feat]\n" /* feature bit */ \ + " .byte 662b-661b\n" /* sourcelen */ \ + " .byte 664f-663f\n" /* replacementlen */ \ + ".previous\n" \ + ".section .altinstr_replacement,\"ax\"\n" \ + "663:\n\t" newinstr "\n664:\n" /* replacement */ \ + ".previous" : output : [feat] "i" (feature), ##input) + /* * Clear and set 'TS' bit respectively */ @@ -240,14 +322,50 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, #endif #define read_barrier_depends() do {} while(0) #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) -#include +/* interrupt control.. */ +#define local_save_flags(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# save_flags \n\t pushfq ; popq %q0":"=g" (x): /* no input */ :"memory"); } while (0) +#define local_irq_restore(x) __asm__ __volatile__("# restore_flags \n\t pushq %0 ; popfq": /* no output */ :"g" (x):"memory", "cc") + +#ifdef CONFIG_X86_VSMP +/* Interrupt control for VSMP architecture */ +#define local_irq_disable() do { unsigned long flags; local_save_flags(flags); local_irq_restore((flags & ~(1 << 9)) | (1 << 18)); } while (0) +#define local_irq_enable() do { unsigned long flags; local_save_flags(flags); local_irq_restore((flags | (1 << 9)) & ~(1 << 18)); } while (0) + +#define irqs_disabled() \ +({ \ + unsigned long flags; \ + local_save_flags(flags); \ + (flags & (1<<18)) || !(flags & (1<<9)); \ +}) + +/* For spinlocks etc */ +#define local_irq_save(x) do { local_save_flags(x); local_irq_restore((x & ~(1 << 9)) | (1 << 18)); } while (0) +#else /* CONFIG_X86_VSMP */ +#define local_irq_disable() __asm__ __volatile__("cli": : :"memory") +#define local_irq_enable() __asm__ __volatile__("sti": : :"memory") + +#define irqs_disabled() \ +({ \ + unsigned long flags; \ + local_save_flags(flags); \ + !(flags & (1<<9)); \ +}) + +/* For spinlocks etc */ +#define local_irq_save(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# local_irq_save \n\t pushfq ; popq %0 ; cli":"=g" (x): /* no input */ :"memory"); } while (0) +#endif + +/* used in the idle loop; sti takes one instruction cycle to complete */ +#define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") +/* used when interrupts are already enabled or to shutdown the processor */ +#define halt() __asm__ __volatile__("hlt": : :"memory") void cpu_idle_wait(void); extern unsigned long arch_align_stack(unsigned long sp); -extern void free_init_pages(char *what, unsigned long begin, unsigned long end); #endif diff --git a/include/asm-x86_64/tce.h b/include/asm-x86_64/tce.h deleted file mode 100644 index 53e9a68b3..000000000 --- a/include/asm-x86_64/tce.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is derived from asm-powerpc/tce.h. - * - * Copyright (C) IBM Corporation, 2006 - * - * Author: Muli Ben-Yehuda - * Author: Jon Mason - * - * 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 _ASM_X86_64_TCE_H -#define _ASM_X86_64_TCE_H - -extern void* tce_table_kva[]; -extern unsigned int specified_table_size; -struct iommu_table; - -#define TCE_ENTRY_SIZE 8 /* in bytes */ - -#define TCE_READ_SHIFT 0 -#define TCE_WRITE_SHIFT 1 -#define TCE_HUBID_SHIFT 2 /* unused */ -#define TCE_RSVD_SHIFT 8 /* unused */ -#define TCE_RPN_SHIFT 12 -#define TCE_UNUSED_SHIFT 48 /* unused */ - -#define TCE_RPN_MASK 0x0000fffffffff000ULL - -extern void tce_build(struct iommu_table *tbl, unsigned long index, - unsigned int npages, unsigned long uaddr, int direction); -extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages); -extern void* alloc_tce_table(void); -extern void free_tce_table(void *tbl); -extern int build_tce_table(struct pci_dev *dev, void __iomem *bbar); - -#endif /* _ASM_X86_64_TCE_H */ diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h index 790c512a4..4ac0e0a36 100644 --- a/include/asm-x86_64/thread_info.h +++ b/include/asm-x86_64/thread_info.h @@ -73,21 +73,8 @@ static inline struct thread_info *stack_thread_info(void) } /* thread information allocation */ -#ifdef CONFIG_DEBUG_STACK_USAGE -#define alloc_thread_info(tsk) \ - ({ \ - struct thread_info *ret; \ - \ - ret = ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)); \ - if (ret) \ - memset(ret, 0, THREAD_SIZE); \ - ret; \ - }) -#else #define alloc_thread_info(tsk) \ ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)) -#endif - #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) #else /* !__ASSEMBLY__ */ @@ -114,8 +101,7 @@ static inline struct thread_info *stack_thread_info(void) #define TIF_IRET 5 /* force IRET */ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SECCOMP 8 /* secure computing */ -#define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ -/* 16 free */ +#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_IA32 17 /* 32bit process */ #define TIF_FORK 18 /* ret_from_fork */ #define TIF_ABI_PENDING 19 @@ -129,7 +115,7 @@ static inline struct thread_info *stack_thread_info(void) #define _TIF_IRET (1<thread_info->status & TS_POLLING) #endif /* __KERNEL__ */ diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h index d16d5b60f..4a9c20ea9 100644 --- a/include/asm-x86_64/tlbflush.h +++ b/include/asm-x86_64/tlbflush.h @@ -1,6 +1,7 @@ #ifndef _X8664_TLBFLUSH_H #define _X8664_TLBFLUSH_H +#include #include #include diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 6e7a2e976..9db54e9d1 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h @@ -1,12 +1,15 @@ #ifndef _ASM_X86_64_TOPOLOGY_H #define _ASM_X86_64_TOPOLOGY_H +#include #ifdef CONFIG_NUMA #include #include +/* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */ + extern cpumask_t cpu_online_map; extern unsigned char cpu_to_node[]; @@ -55,12 +58,12 @@ extern int __node_distance(int, int); #endif #ifdef CONFIG_SMP -#define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) -#define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) +#define topology_physical_package_id(cpu) \ + (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) +#define topology_core_id(cpu) \ + (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) #define topology_core_siblings(cpu) (cpu_core_map[cpu]) #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) -#define mc_capable() (boot_cpu_data.x86_max_cores > 1) -#define smt_capable() (smp_num_siblings > 1) #endif #include diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index 1e1fa003d..bddffcb59 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h @@ -4,6 +4,7 @@ /* * User space memory access functions */ +#include #include #include #include diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 43904f49b..caede3f70 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h @@ -608,9 +608,9 @@ __SYSCALL(__NR_fchmodat, sys_fchmodat) #define __NR_faccessat 269 __SYSCALL(__NR_faccessat, sys_faccessat) #define __NR_pselect6 270 -__SYSCALL(__NR_pselect6, sys_pselect6) +__SYSCALL(__NR_pselect6, sys_ni_syscall) /* for now */ #define __NR_ppoll 271 -__SYSCALL(__NR_ppoll, sys_ppoll) +__SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */ #define __NR_unshare 272 __SYSCALL(__NR_unshare, sys_unshare) #define __NR_set_robust_list 273 @@ -625,12 +625,8 @@ __SYSCALL(__NR_tee, sys_tee) __SYSCALL(__NR_sync_file_range, sys_sync_file_range) #define __NR_vmsplice 278 __SYSCALL(__NR_vmsplice, sys_vmsplice) -#define __NR_move_pages 279 -__SYSCALL(__NR_move_pages, sys_move_pages) -#ifdef __KERNEL__ - -#define __NR_syscall_max __NR_move_pages +#define __NR_syscall_max __NR_vmsplice #ifndef __NO_STUBS @@ -647,6 +643,7 @@ do { \ return (type) (res); \ } while (0) +#ifdef __KERNEL__ #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_OLD_STAT #define __ARCH_WANT_SYS_ALARM @@ -666,9 +663,9 @@ do { \ #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION -#define __ARCH_WANT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_TIME #define __ARCH_WANT_COMPAT_SYS_TIME +#endif #ifndef __KERNEL_SYSCALLS__ @@ -830,7 +827,9 @@ asmlinkage long sys_fork(struct pt_regs regs); asmlinkage long sys_vfork(struct pt_regs regs); asmlinkage long sys_pipe(int *fildes); -#ifndef __ASSEMBLY__ +#endif /* __KERNEL_SYSCALLS__ */ + +#if !defined(__ASSEMBLY__) && defined(__KERNEL__) #include #include @@ -845,9 +844,9 @@ asmlinkage long sys_rt_sigaction(int sig, struct sigaction __user *oact, size_t sigsetsize); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLY__ */ -#endif /* __KERNEL_SYSCALLS__ */ +#endif /* __NO_STUBS */ /* * "Conditional" syscalls @@ -857,8 +856,4 @@ asmlinkage long sys_rt_sigaction(int sig, */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") -#endif /* __NO_STUBS */ - -#endif /* __KERNEL__ */ - -#endif /* _ASM_X86_64_UNISTD_H_ */ +#endif diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h deleted file mode 100644 index 3b450601a..000000000 --- a/include/asm-x86_64/unwind.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef _ASM_X86_64_UNWIND_H -#define _ASM_X86_64_UNWIND_H - -/* - * Copyright (C) 2002-2006 Novell, Inc. - * Jan Beulich - * This code is released under version 2 of the GNU GPL. - */ - -#ifdef CONFIG_STACK_UNWIND - -#include -#include -#include -#include - -struct unwind_frame_info -{ - struct pt_regs regs; - struct task_struct *task; -}; - -#define UNW_PC(frame) (frame)->regs.rip -#define UNW_SP(frame) (frame)->regs.rsp -#ifdef CONFIG_FRAME_POINTER -#define UNW_FP(frame) (frame)->regs.rbp -#define FRAME_RETADDR_OFFSET 8 -#define FRAME_LINK_OFFSET 0 -#define STACK_BOTTOM(tsk) (((tsk)->thread.rsp0 - 1) & ~(THREAD_SIZE - 1)) -#define STACK_TOP(tsk) ((tsk)->thread.rsp0) -#endif -/* Might need to account for the special exception and interrupt handling - stacks here, since normally - EXCEPTION_STACK_ORDER < THREAD_ORDER < IRQSTACK_ORDER, - but the construct is needed only for getting across the stack switch to - the interrupt stack - thus considering the IRQ stack itself is unnecessary, - and the overhead of comparing against all exception handling stacks seems - not desirable. */ -#define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) - -#define UNW_REGISTER_INFO \ - PTREGS_INFO(rax), \ - PTREGS_INFO(rdx), \ - PTREGS_INFO(rcx), \ - PTREGS_INFO(rbx), \ - PTREGS_INFO(rsi), \ - PTREGS_INFO(rdi), \ - PTREGS_INFO(rbp), \ - PTREGS_INFO(rsp), \ - PTREGS_INFO(r8), \ - PTREGS_INFO(r9), \ - PTREGS_INFO(r10), \ - PTREGS_INFO(r11), \ - PTREGS_INFO(r12), \ - PTREGS_INFO(r13), \ - PTREGS_INFO(r14), \ - PTREGS_INFO(r15), \ - PTREGS_INFO(rip) - -static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, - /*const*/ struct pt_regs *regs) -{ - info->regs = *regs; -} - -static inline void arch_unw_init_blocked(struct unwind_frame_info *info) -{ - extern const char thread_return[]; - - memset(&info->regs, 0, sizeof(info->regs)); - info->regs.rip = (unsigned long)thread_return; - info->regs.cs = __KERNEL_CS; - __get_user(info->regs.rbp, (unsigned long *)info->task->thread.rsp); - info->regs.rsp = info->task->thread.rsp; - info->regs.ss = __KERNEL_DS; -} - -extern int arch_unwind_init_running(struct unwind_frame_info *, - int (*callback)(struct unwind_frame_info *, - void *arg), - void *arg); - -static inline int arch_unw_user_mode(const struct unwind_frame_info *info) -{ -#if 0 /* This can only work when selector register saves/restores - are properly annotated (and tracked in UNW_REGISTER_INFO). */ - return user_mode(&info->regs); -#else - return (long)info->regs.rip >= 0 - || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END) - || (long)info->regs.rsp >= 0; -#endif -} - -#else - -#define UNW_PC(frame) ((void)(frame), 0UL) -#define UNW_SP(frame) ((void)(frame), 0UL) - -static inline int arch_unw_user_mode(const void *info) -{ - return 0; -} - -#endif - -#endif /* _ASM_X86_64_UNWIND_H */ diff --git a/include/asm-x86_64/vga.h b/include/asm-x86_64/vga.h index 0ecf68ac0..ef0c0e50c 100644 --- a/include/asm-x86_64/vga.h +++ b/include/asm-x86_64/vga.h @@ -12,7 +12,7 @@ * access the videoram directly without any black magic. */ -#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 146b24402..a85e16f56 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h @@ -1,6 +1,8 @@ #ifndef _ASM_X86_64_VSYSCALL_H_ #define _ASM_X86_64_VSYSCALL_H_ +#include + enum vsyscall_num { __NR_vgettimeofday, __NR_vtime, @@ -12,7 +14,6 @@ enum vsyscall_num { #define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) #ifdef __KERNEL__ -#include #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) #define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16))) diff --git a/include/asm-xtensa/Kbuild b/include/asm-xtensa/Kbuild deleted file mode 100644 index c68e1680d..000000000 --- a/include/asm-xtensa/Kbuild +++ /dev/null @@ -1 +0,0 @@ -include include/asm-generic/Kbuild.asm diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index 5c2672021..fe105a123 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h @@ -13,6 +13,7 @@ #ifndef _XTENSA_ATOMIC_H #define _XTENSA_ATOMIC_H +#include #include typedef struct { volatile int counter; } atomic_t; diff --git a/include/asm-xtensa/checksum.h b/include/asm-xtensa/checksum.h index 03114f8d1..81a797ae3 100644 --- a/include/asm-xtensa/checksum.h +++ b/include/asm-xtensa/checksum.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_CHECKSUM_H #define _XTENSA_CHECKSUM_H +#include #include #include @@ -43,7 +44,8 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i * Note: when you get a NULL pointer exception here this means someone * passed in an incorrect kernel address to one of these functions. * - * If you use these functions directly please don't forget the access_ok(). + * If you use these functions directly please don't forget the + * verify_area(). */ static inline unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h index e1d8c9e01..1bc601ec3 100644 --- a/include/asm-xtensa/delay.h +++ b/include/asm-xtensa/delay.h @@ -12,6 +12,7 @@ #ifndef _XTENSA_DELAY_H #define _XTENSA_DELAY_H +#include #include #include diff --git a/include/asm-xtensa/dma.h b/include/asm-xtensa/dma.h index db2633f67..1c22b0234 100644 --- a/include/asm-xtensa/dma.h +++ b/include/asm-xtensa/dma.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_DMA_H #define _XTENSA_DMA_H +#include #include /* need byte IO */ #include diff --git a/include/asm-xtensa/hardirq.h b/include/asm-xtensa/hardirq.h index 87cb19d1b..aa9c1adf6 100644 --- a/include/asm-xtensa/hardirq.h +++ b/include/asm-xtensa/hardirq.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_HARDIRQ_H #define _XTENSA_HARDIRQ_H +#include #include #include diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h index 3ddbea759..ccf436249 100644 --- a/include/asm-xtensa/hw_irq.h +++ b/include/asm-xtensa/hw_irq.h @@ -11,4 +11,8 @@ #ifndef _XTENSA_HW_IRQ_H #define _XTENSA_HW_IRQ_H +static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) +{ +} + #endif diff --git a/include/asm-xtensa/ide.h b/include/asm-xtensa/ide.h index 6b912742a..b523cd4a4 100644 --- a/include/asm-xtensa/ide.h +++ b/include/asm-xtensa/ide.h @@ -14,6 +14,7 @@ #ifdef __KERNEL__ +#include #ifndef MAX_HWIFS # define MAX_HWIFS 1 diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 556e5eed3..c5c13985b 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h @@ -12,6 +12,7 @@ #define _XTENSA_IO_H #ifdef __KERNEL__ +#include #include #include diff --git a/include/asm-xtensa/irq.h b/include/asm-xtensa/irq.h index 049fde7e7..d984e9559 100644 --- a/include/asm-xtensa/irq.h +++ b/include/asm-xtensa/irq.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_IRQ_H #define _XTENSA_IRQ_H +#include #include #include diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h index af683a74a..364a7b057 100644 --- a/include/asm-xtensa/mmu_context.h +++ b/include/asm-xtensa/mmu_context.h @@ -13,6 +13,7 @@ #ifndef _XTENSA_MMU_CONTEXT_H #define _XTENSA_MMU_CONTEXT_H +#include #include #include diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index 40f4c6c3f..992bac5c1 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h @@ -14,6 +14,7 @@ #ifdef __KERNEL__ #include +#include /* * PAGE_SHIFT determines the page size diff --git a/include/asm-xtensa/pgalloc.h b/include/asm-xtensa/pgalloc.h index d56ddf205..734a8d060 100644 --- a/include/asm-xtensa/pgalloc.h +++ b/include/asm-xtensa/pgalloc.h @@ -13,6 +13,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/asm-xtensa/platform.h b/include/asm-xtensa/platform.h index 48135a971..36163894b 100644 --- a/include/asm-xtensa/platform.h +++ b/include/asm-xtensa/platform.h @@ -13,6 +13,7 @@ #ifndef _XTENSA_PLATFORM_H #define _XTENSA_PLATFORM_H +#include #include #include diff --git a/include/asm-xtensa/processor.h b/include/asm-xtensa/processor.h index 8b96e77c9..d1d72ad36 100644 --- a/include/asm-xtensa/processor.h +++ b/include/asm-xtensa/processor.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -192,7 +191,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->areg[1]) -#define cpu_relax() barrier() +#define cpu_relax() do { } while (0) /* Special register access. */ diff --git a/include/asm-xtensa/rwsem.h b/include/asm-xtensa/rwsem.h index 0aad3a587..3c02b0e03 100644 --- a/include/asm-xtensa/rwsem.h +++ b/include/asm-xtensa/rwsem.h @@ -31,11 +31,24 @@ struct rw_semaphore { #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) spinlock_t wait_lock; struct list_head wait_list; +#if RWSEM_DEBUG + int debug; +#endif }; +/* + * initialisation + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 +#else +#define __RWSEM_DEBUG_INIT /* */ +#endif + #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ - LIST_HEAD_INIT((name).wait_list) } + LIST_HEAD_INIT((name).wait_list) \ + __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) @@ -50,6 +63,9 @@ static inline void init_rwsem(struct rw_semaphore *sem) sem->count = RWSEM_UNLOCKED_VALUE; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } /* @@ -156,9 +172,4 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) return atomic_add_return(delta, (atomic_t *)(&sem->count)); } -static inline int rwsem_is_locked(struct rw_semaphore *sem) -{ - return (sem->count != 0); -} - -#endif /* _XTENSA_RWSEM_H */ +#endif /* _XTENSA_RWSEM_XADD_H */ diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h index 633ba73bc..a99c9aec6 100644 --- a/include/asm-xtensa/signal.h +++ b/include/asm-xtensa/signal.h @@ -75,6 +75,7 @@ typedef struct { * SA_FLAGS values: * * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the * SA_RESTART flag to get restarting signals (which were the default long ago) * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. * SA_RESETHAND clears the handler when the signal is delivered. @@ -94,6 +95,7 @@ typedef struct { #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ #define SA_RESTORER 0x04000000 @@ -107,6 +109,19 @@ typedef struct { #define SIGSTKSZ 8192 #ifndef __ASSEMBLY__ +#ifdef __KERNEL__ + +/* + * These values of sa_flags are used only by the kernel as part of the + * irq handling routines. + * + * SA_INTERRUPT is also used by the irq handling routines. + * SA_SHIRQ is for shared interrupt support on PCI and EISA. + */ +#define SA_SAMPLE_RANDOM SA_RESTART +#define SA_SHIRQ 0x04000000 +#define SA_PROBEIRQ 0x08000000 +#endif #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ diff --git a/include/asm-xtensa/socket.h b/include/asm-xtensa/socket.h index 971d231be..00f83f3a6 100644 --- a/include/asm-xtensa/socket.h +++ b/include/asm-xtensa/socket.h @@ -59,6 +59,5 @@ #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 -#define SO_PASSSEC 34 #endif /* _XTENSA_SOCKET_H */ diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index 932bda92a..b29f7ae6a 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h @@ -11,6 +11,7 @@ #ifndef _XTENSA_SYSTEM_H #define _XTENSA_SYSTEM_H +#include #include #include @@ -99,6 +100,7 @@ static inline void disable_coprocessor(int i) #endif #define set_mb(var, value) do { var = value; mb(); } while (0) +#define set_wmb(var, value) do { var = value; wmb(); } while (0) #if !defined (__ASSEMBLY__) diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index 88a64e114..06a22b83b 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h @@ -154,6 +154,35 @@ .Laccess_ok_\@: .endm +/* + * verify_area determines whether a memory access is allowed. It's + * mostly an unnecessary wrapper for access_ok, but we provide it as a + * duplicate of the verify_area() C inline function below. See the + * equivalent C version below for clarity. + * + * On error, verify_area branches to a label indicated by parameter + * . This implies that the macro falls through to the next + * instruction on success. + * + * Note that we assume success is the common case, and we optimize the + * branch fall-through case on success. + * + * On Entry: + * register containing memory address + * register containing memory size + * temp register + * label to branch to on error; implies fall-through + * macro on success + * On Exit: + * preserved + * preserved + * destroyed + */ + .macro verify_area aa, as, at, sp, error + access_ok \at, \aa, \as, \sp, \error + .endm + + #else /* __ASSEMBLY__ not defined */ #include @@ -182,6 +211,11 @@ #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) +static inline int verify_area(int type, const void * addr, unsigned long size) +{ + return access_ok(type,addr,size) ? 0 : -EFAULT; +} + /* * These are the main single-value transfer routines. They * automatically use the right size if we just have the right pointer diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 5e1b99dc4..6b39d6609 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h @@ -11,6 +11,8 @@ #ifndef _XTENSA_UNISTD_H #define _XTENSA_UNISTD_H +#include + #define __NR_spill 0 #define __NR_exit 1 #define __NR_read 3 @@ -219,9 +221,21 @@ #define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ #ifdef __KERNEL__ -#include - #define __syscall_return(type, res) return ((type)(res)) +#else +#define __syscall_return(type, res) \ +do { \ + if ((unsigned long)(res) >= (unsigned long)(-125)) { \ + /* Avoid using "res" which is declared to be in register r2; \ + * errno might expand to a function call and clobber it. */ \ + int __err = -(res); \ + errno = __err; \ + res = -1; \ + } \ + return (type) (res); \ +} while (0) +#endif + /* Tensilica's xt-xcc compiler is much more agressive at code * optimization than gcc. Multiple __asm__ statements are @@ -415,10 +429,11 @@ static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) */ #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); +#ifdef __KERNEL__ #define __ARCH_WANT_STAT64 #define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_RT_SIGACTION -#endif /* __KERNEL__ */ +#endif #endif /* _XTENSA_UNISTD_H */ diff --git a/include/asm-xtensa/vga.h b/include/asm-xtensa/vga.h index 1fd8cab3a..23d82f6ac 100644 --- a/include/asm-xtensa/vga.h +++ b/include/asm-xtensa/vga.h @@ -11,7 +11,7 @@ #ifndef _XTENSA_VGA_H #define _XTENSA_VGA_H -#define VGA_MAP_MEM(x,s) (unsigned long)phys_to_virt(x) +#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) #define vga_readb(x) (*(x)) #define vga_writeb(x,y) (*(y) = (x)) diff --git a/include/keys/user-type.h b/include/keys/user-type.h index c37c34275..a3dae1803 100644 --- a/include/keys/user-type.h +++ b/include/keys/user-type.h @@ -37,7 +37,6 @@ extern struct key_type key_type_user; extern int user_instantiate(struct key *key, const void *data, size_t datalen); extern int user_update(struct key *key, const void *data, size_t datalen); extern int user_match(const struct key *key, const void *criterion); -extern void user_revoke(struct key *key); extern void user_destroy(struct key *key); extern void user_describe(const struct key *user, struct seq_file *m); extern long user_read(const struct key *key, diff --git a/include/linux/Kbuild b/include/linux/Kbuild deleted file mode 100644 index 10d2ca075..000000000 --- a/include/linux/Kbuild +++ /dev/null @@ -1,343 +0,0 @@ -header-y += byteorder/ -header-y += dvb/ -header-y += hdlc/ -header-y += isdn/ -header-y += nfsd/ -header-y += raid/ -header-y += sunrpc/ -header-y += tc_act/ -header-y += netfilter/ -header-y += netfilter_arp/ -header-y += netfilter_bridge/ -header-y += netfilter_ipv4/ -header-y += netfilter_ipv6/ - -header-y += affs_fs.h -header-y += affs_hardblocks.h -header-y += aio_abi.h -header-y += a.out.h -header-y += arcfb.h -header-y += atmapi.h -header-y += atmbr2684.h -header-y += atmclip.h -header-y += atm_eni.h -header-y += atm_he.h -header-y += atm_idt77105.h -header-y += atmioc.h -header-y += atmlec.h -header-y += atmmpc.h -header-y += atm_nicstar.h -header-y += atmppp.h -header-y += atmsap.h -header-y += atmsvc.h -header-y += atm_zatm.h -header-y += auto_fs4.h -header-y += auxvec.h -header-y += awe_voice.h -header-y += ax25.h -header-y += b1lli.h -header-y += baycom.h -header-y += bfs_fs.h -header-y += blkpg.h -header-y += bpqether.h -header-y += cdk.h -header-y += chio.h -header-y += coda_psdev.h -header-y += coff.h -header-y += comstats.h -header-y += consolemap.h -header-y += cycx_cfm.h -header-y += dm-ioctl.h -header-y += dn.h -header-y += dqblk_v1.h -header-y += dqblk_v2.h -header-y += dqblk_xfs.h -header-y += efs_fs_sb.h -header-y += elf-fdpic.h -header-y += elf.h -header-y += elf-em.h -header-y += fadvise.h -header-y += fd.h -header-y += fdreg.h -header-y += ftape-header-segment.h -header-y += ftape-vendors.h -header-y += fuse.h -header-y += futex.h -header-y += genetlink.h -header-y += gen_stats.h -header-y += gigaset_dev.h -header-y += hdsmart.h -header-y += hpfs_fs.h -header-y += hysdn_if.h -header-y += i2c-dev.h -header-y += i8k.h -header-y += icmp.h -header-y += if_arcnet.h -header-y += if_arp.h -header-y += if_bonding.h -header-y += if_cablemodem.h -header-y += if_fc.h -header-y += if_fddi.h -header-y += if.h -header-y += if_hippi.h -header-y += if_infiniband.h -header-y += if_packet.h -header-y += if_plip.h -header-y += if_ppp.h -header-y += if_slip.h -header-y += if_strip.h -header-y += if_tunnel.h -header-y += in6.h -header-y += in_route.h -header-y += ioctl.h -header-y += ip.h -header-y += ipmi_msgdefs.h -header-y += ip_mp_alg.h -header-y += ipsec.h -header-y += ipx.h -header-y += irda.h -header-y += isdn_divertif.h -header-y += iso_fs.h -header-y += ite_gpio.h -header-y += ixjuser.h -header-y += jffs2.h -header-y += keyctl.h -header-y += limits.h -header-y += major.h -header-y += matroxfb.h -header-y += meye.h -header-y += minix_fs.h -header-y += mmtimer.h -header-y += mqueue.h -header-y += mtio.h -header-y += ncp_no.h -header-y += netfilter_arp.h -header-y += netrom.h -header-y += nfs2.h -header-y += nfs4_mount.h -header-y += nfs_mount.h -header-y += openprom_fs.h -header-y += param.h -header-y += pci_ids.h -header-y += pci_regs.h -header-y += personality.h -header-y += pfkeyv2.h -header-y += pg.h -header-y += pkt_cls.h -header-y += pkt_sched.h -header-y += posix_types.h -header-y += ppdev.h -header-y += prctl.h -header-y += ps2esdi.h -header-y += qic117.h -header-y += qnxtypes.h -header-y += quotaio_v1.h -header-y += quotaio_v2.h -header-y += radeonfb.h -header-y += raw.h -header-y += resource.h -header-y += rose.h -header-y += sctp.h -header-y += smbno.h -header-y += snmp.h -header-y += sockios.h -header-y += som.h -header-y += sound.h -header-y += synclink.h -header-y += telephony.h -header-y += termios.h -header-y += ticable.h -header-y += times.h -header-y += tiocl.h -header-y += tipc.h -header-y += toshiba.h -header-y += ultrasound.h -header-y += un.h -header-y += utime.h -header-y += utsname.h -header-y += video_decoder.h -header-y += video_encoder.h -header-y += videotext.h -header-y += vt.h -header-y += wavefront.h -header-y += wireless.h -header-y += xattr.h -header-y += x25.h -header-y += zorro_ids.h - -unifdef-y += acct.h -unifdef-y += adb.h -unifdef-y += adfs_fs.h -unifdef-y += agpgart.h -unifdef-y += apm_bios.h -unifdef-y += atalk.h -unifdef-y += atmarp.h -unifdef-y += atmdev.h -unifdef-y += atm.h -unifdef-y += atm_tcp.h -unifdef-y += audit.h -unifdef-y += auto_fs.h -unifdef-y += binfmts.h -unifdef-y += capability.h -unifdef-y += capi.h -unifdef-y += cciss_ioctl.h -unifdef-y += cdrom.h -unifdef-y += cm4000_cs.h -unifdef-y += cn_proc.h -unifdef-y += coda.h -unifdef-y += connector.h -unifdef-y += cramfs_fs.h -unifdef-y += cuda.h -unifdef-y += cyclades.h -unifdef-y += dccp.h -unifdef-y += dirent.h -unifdef-y += divert.h -unifdef-y += elfcore.h -unifdef-y += errno.h -unifdef-y += errqueue.h -unifdef-y += ethtool.h -unifdef-y += eventpoll.h -unifdef-y += ext2_fs.h -unifdef-y += ext3_fs.h -unifdef-y += fb.h -unifdef-y += fcntl.h -unifdef-y += filter.h -unifdef-y += flat.h -unifdef-y += fs.h -unifdef-y += ftape.h -unifdef-y += gameport.h -unifdef-y += generic_serial.h -unifdef-y += genhd.h -unifdef-y += hayesesp.h -unifdef-y += hdlcdrv.h -unifdef-y += hdlc.h -unifdef-y += hdreg.h -unifdef-y += hiddev.h -unifdef-y += hpet.h -unifdef-y += i2c.h -unifdef-y += i2o-dev.h -unifdef-y += icmpv6.h -unifdef-y += if_bridge.h -unifdef-y += if_ec.h -unifdef-y += if_eql.h -unifdef-y += if_ether.h -unifdef-y += if_frad.h -unifdef-y += if_ltalk.h -unifdef-y += if_pppox.h -unifdef-y += if_shaper.h -unifdef-y += if_tr.h -unifdef-y += if_tun.h -unifdef-y += if_vlan.h -unifdef-y += if_wanpipe.h -unifdef-y += igmp.h -unifdef-y += inet_diag.h -unifdef-y += in.h -unifdef-y += inotify.h -unifdef-y += input.h -unifdef-y += ipc.h -unifdef-y += ipmi.h -unifdef-y += ipv6.h -unifdef-y += ipv6_route.h -unifdef-y += isdn.h -unifdef-y += isdnif.h -unifdef-y += isdn_ppp.h -unifdef-y += isicom.h -unifdef-y += jbd.h -unifdef-y += joystick.h -unifdef-y += kdev_t.h -unifdef-y += kd.h -unifdef-y += kernelcapi.h -unifdef-y += kernel.h -unifdef-y += keyboard.h -unifdef-y += llc.h -unifdef-y += loop.h -unifdef-y += lp.h -unifdef-y += mempolicy.h -unifdef-y += mii.h -unifdef-y += mman.h -unifdef-y += mroute.h -unifdef-y += msdos_fs.h -unifdef-y += msg.h -unifdef-y += nbd.h -unifdef-y += ncp_fs.h -unifdef-y += ncp.h -unifdef-y += ncp_mount.h -unifdef-y += netdevice.h -unifdef-y += netfilter_bridge.h -unifdef-y += netfilter_decnet.h -unifdef-y += netfilter.h -unifdef-y += netfilter_ipv4.h -unifdef-y += netfilter_ipv6.h -unifdef-y += netfilter_logging.h -unifdef-y += net.h -unifdef-y += netlink.h -unifdef-y += nfs3.h -unifdef-y += nfs4.h -unifdef-y += nfsacl.h -unifdef-y += nfs_fs.h -unifdef-y += nfs.h -unifdef-y += nfs_idmap.h -unifdef-y += n_r3964.h -unifdef-y += nubus.h -unifdef-y += nvram.h -unifdef-y += parport.h -unifdef-y += patchkey.h -unifdef-y += pci.h -unifdef-y += pktcdvd.h -unifdef-y += pmu.h -unifdef-y += poll.h -unifdef-y += ppp_defs.h -unifdef-y += ppp-comp.h -unifdef-y += ptrace.h -unifdef-y += qnx4_fs.h -unifdef-y += quota.h -unifdef-y += random.h -unifdef-y += reboot.h -unifdef-y += reiserfs_fs.h -unifdef-y += reiserfs_xattr.h -unifdef-y += romfs_fs.h -unifdef-y += route.h -unifdef-y += rtc.h -unifdef-y += rtnetlink.h -unifdef-y += scc.h -unifdef-y += sched.h -unifdef-y += sdla.h -unifdef-y += selinux_netlink.h -unifdef-y += sem.h -unifdef-y += serial_core.h -unifdef-y += serial.h -unifdef-y += serio.h -unifdef-y += shm.h -unifdef-y += signal.h -unifdef-y += smb_fs.h -unifdef-y += smb.h -unifdef-y += smb_mount.h -unifdef-y += socket.h -unifdef-y += sonet.h -unifdef-y += sonypi.h -unifdef-y += soundcard.h -unifdef-y += stat.h -unifdef-y += stddef.h -unifdef-y += sysctl.h -unifdef-y += tcp.h -unifdef-y += time.h -unifdef-y += timex.h -unifdef-y += tty.h -unifdef-y += types.h -unifdef-y += udf_fs_i.h -unifdef-y += udp.h -unifdef-y += uinput.h -unifdef-y += uio.h -unifdef-y += unistd.h -unifdef-y += usb_ch9.h -unifdef-y += usbdevice_fs.h -unifdef-y += user.h -unifdef-y += videodev2.h -unifdef-y += videodev.h -unifdef-y += wait.h -unifdef-y += wanrouter.h -unifdef-y += watchdog.h -unifdef-y += xfrm.h -unifdef-y += zftape.h - -objhdr-y += version.h diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h index 2ed2fd855..c35833824 100644 --- a/include/linux/ac97_codec.h +++ b/include/linux/ac97_codec.h @@ -259,7 +259,7 @@ struct ac97_codec { int type; u32 model; - unsigned int modem:1; + int modem:1; struct ac97_ops *codec_ops; diff --git a/include/linux/acct.h b/include/linux/acct.h index e86bae732..9a6640107 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h @@ -16,6 +16,7 @@ #define _LINUX_ACCT_H #include +#include #include #include @@ -115,23 +116,20 @@ struct acct_v3 #ifdef __KERNEL__ +#include #ifdef CONFIG_BSD_PROCESS_ACCT struct vfsmount; struct super_block; extern void acct_auto_close_mnt(struct vfsmount *m); extern void acct_auto_close(struct super_block *sb); -extern void acct_init_pacct(struct pacct_struct *pacct); -extern void acct_collect(long exitcode, int group_dead); -extern void acct_process(void); +extern void acct_process(long exitcode); extern void acct_update_integrals(struct task_struct *tsk); extern void acct_clear_integrals(struct task_struct *tsk); #else #define acct_auto_close_mnt(x) do { } while (0) #define acct_auto_close(x) do { } while (0) -#define acct_init_pacct(x) do { } while (0) -#define acct_collect(x,y) do { } while (0) -#define acct_process() do { } while (0) +#define acct_process(x) do { } while (0) #define acct_update_integrals(x) do { } while (0) #define acct_clear_integrals(task) do { } while (0) #endif @@ -167,7 +165,6 @@ typedef struct acct acct_t; #endif /* __KERNEL */ #ifdef __KERNEL__ -#include /* * Yet another set of HZ to *HZ helper functions. * See for the original. diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 88b5dfd8e..d3bc25e6d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -25,6 +25,7 @@ #ifndef _LINUX_ACPI_H #define _LINUX_ACPI_H +#include #ifdef CONFIG_ACPI @@ -37,7 +38,6 @@ #include #include #include -#include #include @@ -408,18 +408,10 @@ void acpi_table_print_madt_entry (acpi_table_entry_header *madt); void acpi_table_print_srat_entry (acpi_table_entry_header *srat); /* the following four functions are architecture-dependent */ -#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT -#define NR_NODE_MEMBLKS MAX_NUMNODES -#define acpi_numa_slit_init(slit) do {} while (0) -#define acpi_numa_processor_affinity_init(pa) do {} while (0) -#define acpi_numa_memory_affinity_init(ma) do {} while (0) -#define acpi_numa_arch_fixup() do {} while (0) -#else void acpi_numa_slit_init (struct acpi_table_slit *slit); void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); void acpi_numa_arch_fixup(void); -#endif #ifdef CONFIG_ACPI_HOTPLUG_CPU /* Arch dependent functions for cpu hotplug support */ @@ -528,18 +520,12 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } #ifdef CONFIG_ACPI_NUMA int acpi_get_pxm(acpi_handle handle); -int acpi_get_node(acpi_handle *handle); #else static inline int acpi_get_pxm(acpi_handle handle) { return 0; } -static inline int acpi_get_node(acpi_handle *handle) -{ - return 0; -} #endif -extern int acpi_paddr_to_node(u64 start_addr, u64 size); extern int pnpacpi_disabled; diff --git a/include/linux/affs_hardblocks.h b/include/linux/affs_hardblocks.h index f1b948c1f..3fb869939 100644 --- a/include/linux/affs_hardblocks.h +++ b/include/linux/affs_hardblocks.h @@ -1,47 +1,45 @@ #ifndef AFFS_HARDBLOCKS_H #define AFFS_HARDBLOCKS_H -#include - /* Just the needed definitions for the RDB of an Amiga HD. */ struct RigidDiskBlock { - __u32 rdb_ID; + u32 rdb_ID; __be32 rdb_SummedLongs; - __s32 rdb_ChkSum; - __u32 rdb_HostID; + s32 rdb_ChkSum; + u32 rdb_HostID; __be32 rdb_BlockBytes; - __u32 rdb_Flags; - __u32 rdb_BadBlockList; + u32 rdb_Flags; + u32 rdb_BadBlockList; __be32 rdb_PartitionList; - __u32 rdb_FileSysHeaderList; - __u32 rdb_DriveInit; - __u32 rdb_Reserved1[6]; - __u32 rdb_Cylinders; - __u32 rdb_Sectors; - __u32 rdb_Heads; - __u32 rdb_Interleave; - __u32 rdb_Park; - __u32 rdb_Reserved2[3]; - __u32 rdb_WritePreComp; - __u32 rdb_ReducedWrite; - __u32 rdb_StepRate; - __u32 rdb_Reserved3[5]; - __u32 rdb_RDBBlocksLo; - __u32 rdb_RDBBlocksHi; - __u32 rdb_LoCylinder; - __u32 rdb_HiCylinder; - __u32 rdb_CylBlocks; - __u32 rdb_AutoParkSeconds; - __u32 rdb_HighRDSKBlock; - __u32 rdb_Reserved4; + u32 rdb_FileSysHeaderList; + u32 rdb_DriveInit; + u32 rdb_Reserved1[6]; + u32 rdb_Cylinders; + u32 rdb_Sectors; + u32 rdb_Heads; + u32 rdb_Interleave; + u32 rdb_Park; + u32 rdb_Reserved2[3]; + u32 rdb_WritePreComp; + u32 rdb_ReducedWrite; + u32 rdb_StepRate; + u32 rdb_Reserved3[5]; + u32 rdb_RDBBlocksLo; + u32 rdb_RDBBlocksHi; + u32 rdb_LoCylinder; + u32 rdb_HiCylinder; + u32 rdb_CylBlocks; + u32 rdb_AutoParkSeconds; + u32 rdb_HighRDSKBlock; + u32 rdb_Reserved4; char rdb_DiskVendor[8]; char rdb_DiskProduct[16]; char rdb_DiskRevision[4]; char rdb_ControllerVendor[8]; char rdb_ControllerProduct[16]; char rdb_ControllerRevision[4]; - __u32 rdb_Reserved5[10]; + u32 rdb_Reserved5[10]; }; #define IDNAME_RIGIDDISK 0x5244534B /* "RDSK" */ @@ -49,16 +47,16 @@ struct RigidDiskBlock { struct PartitionBlock { __be32 pb_ID; __be32 pb_SummedLongs; - __s32 pb_ChkSum; - __u32 pb_HostID; + s32 pb_ChkSum; + u32 pb_HostID; __be32 pb_Next; - __u32 pb_Flags; - __u32 pb_Reserved1[2]; - __u32 pb_DevFlags; - __u8 pb_DriveName[32]; - __u32 pb_Reserved2[15]; + u32 pb_Flags; + u32 pb_Reserved1[2]; + u32 pb_DevFlags; + u8 pb_DriveName[32]; + u32 pb_Reserved2[15]; __be32 pb_Environment[17]; - __u32 pb_EReserved[15]; + u32 pb_EReserved[15]; }; #define IDNAME_PARTITION 0x50415254 /* "PART" */ diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index bfb8ec791..6d59c8efe 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h @@ -27,6 +27,8 @@ #ifndef _AGP_H #define _AGP_H 1 +#include + #define AGPIOC_BASE 'A' #define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, struct agp_info*) #define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1) @@ -110,7 +112,6 @@ typedef struct _agp_unbind { #else /* __KERNEL__ */ #include -#include #define AGPGART_MINOR 175 diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c044826..9cf64b1b6 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h @@ -9,6 +9,7 @@ * License. See the file COPYING in the main directory of this archive * for more details. */ +#include #include /* diff --git a/include/linux/ata.h b/include/linux/ata.h index 3671af869..312a2c0c6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -97,9 +97,6 @@ enum { ATA_DRQ = (1 << 3), /* data request i/o */ ATA_ERR = (1 << 0), /* have an error */ ATA_SRST = (1 << 2), /* software reset */ - ATA_ICRC = (1 << 7), /* interface CRC error */ - ATA_UNC = (1 << 6), /* uncorrectable media error */ - ATA_IDNF = (1 << 4), /* ID not found */ ATA_ABORTED = (1 << 2), /* command aborted */ /* ATA command block registers */ @@ -133,8 +130,6 @@ enum { ATA_CMD_WRITE = 0xCA, ATA_CMD_WRITE_EXT = 0x35, ATA_CMD_WRITE_FUA_EXT = 0x3D, - ATA_CMD_FPDMA_READ = 0x60, - ATA_CMD_FPDMA_WRITE = 0x61, ATA_CMD_PIO_READ = 0x20, ATA_CMD_PIO_READ_EXT = 0x24, ATA_CMD_PIO_WRITE = 0x30, @@ -153,10 +148,6 @@ enum { ATA_CMD_INIT_DEV_PARAMS = 0x91, ATA_CMD_READ_NATIVE_MAX = 0xF8, ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, - ATA_CMD_READ_LOG_EXT = 0x2f, - - /* READ_LOG_EXT pages */ - ATA_LOG_SATA_NCQ = 0x10, /* SETFEATURES stuff */ SETFEATURES_XFER = 0x03, @@ -181,9 +172,6 @@ enum { XFER_PIO_0 = 0x08, XFER_PIO_SLOW = 0x00, - SETFEATURES_WC_ON = 0x02, /* Enable write cache */ - SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ - /* ATAPI stuff */ ATAPI_PKT_DMA = (1 << 0), ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: @@ -204,16 +192,6 @@ enum { SCR_ACTIVE = 3, SCR_NOTIFICATION = 4, - /* SError bits */ - SERR_DATA_RECOVERED = (1 << 0), /* recovered data error */ - SERR_COMM_RECOVERED = (1 << 1), /* recovered comm failure */ - SERR_DATA = (1 << 8), /* unrecovered data error */ - SERR_PERSISTENT = (1 << 9), /* persistent data/comm error */ - SERR_PROTOCOL = (1 << 10), /* protocol violation */ - SERR_INTERNAL = (1 << 11), /* host internal error */ - SERR_PHYRDY_CHG = (1 << 16), /* PHY RDY changed */ - SERR_DEV_XCHG = (1 << 26), /* device exchanged */ - /* struct ata_taskfile flags */ ATA_TFLAG_LBA48 = (1 << 0), /* enable 48-bit LBA and "HOB" */ ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */ @@ -221,7 +199,6 @@ enum { ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */ ATA_TFLAG_LBA = (1 << 4), /* enable LBA */ ATA_TFLAG_FUA = (1 << 5), /* enable FUA */ - ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */ }; enum ata_tf_protocols { @@ -230,7 +207,6 @@ enum ata_tf_protocols { ATA_PROT_NODATA, /* no data */ ATA_PROT_PIO, /* PIO single sector */ ATA_PROT_DMA, /* DMA */ - ATA_PROT_NCQ, /* NCQ */ ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ ATA_PROT_ATAPI_NODATA, /* packet command, no data */ ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */ @@ -286,8 +262,6 @@ struct ata_taskfile { #define ata_id_has_pm(id) ((id)[82] & (1 << 3)) #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) -#define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) -#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) #define ata_id_removeable(id) ((id)[0] & (1 << 7)) #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) #define ata_id_u32(id,n) \ @@ -298,8 +272,6 @@ struct ata_taskfile { ((u64) (id)[(n) + 1] << 16) | \ ((u64) (id)[(n) + 0]) ) -#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) - static inline unsigned int ata_id_major_version(const u16 *id) { unsigned int mver; @@ -339,15 +311,6 @@ static inline int is_atapi_taskfile(const struct ata_taskfile *tf) (tf->protocol == ATA_PROT_ATAPI_DMA); } -static inline int is_multi_taskfile(struct ata_taskfile *tf) -{ - return (tf->command == ATA_CMD_READ_MULTI) || - (tf->command == ATA_CMD_WRITE_MULTI) || - (tf->command == ATA_CMD_READ_MULTI_EXT) || - (tf->command == ATA_CMD_WRITE_MULTI_EXT) || - (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT); -} - static inline int ata_ok(u8 status) { return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 2096e5c72..b203ea82a 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -209,7 +209,7 @@ struct atm_cirange { #ifdef __KERNEL__ -#include +#include #include /* wait_queue_head_t */ #include /* struct timeval */ #include @@ -359,7 +359,6 @@ struct atm_dev { struct proc_dir_entry *proc_entry; /* proc entry */ char *proc_name; /* proc entry name */ #endif - struct class_device class_dev; /* sysfs class device */ struct list_head dev_list; /* linkage */ }; @@ -461,7 +460,7 @@ static inline void atm_dev_put(struct atm_dev *dev) BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags)); if (dev->ops->dev_close) dev->ops->dev_close(dev); - class_device_put(&dev->class_dev); + kfree(dev); } } diff --git a/include/linux/audit.h b/include/linux/audit.h index 40a6c2629..b74c148f1 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -24,7 +24,8 @@ #ifndef _LINUX_AUDIT_H_ #define _LINUX_AUDIT_H_ -#include +#include +#include /* The netlink messages for the audit system is divided into blocks: * 1000 - 1099 are for commanding the audit system @@ -82,12 +83,7 @@ #define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */ #define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */ #define AUDIT_CWD 1307 /* Current working directory */ -#define AUDIT_EXECVE 1309 /* execve arguments */ #define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */ -#define AUDIT_MQ_OPEN 1312 /* POSIX MQ open record type */ -#define AUDIT_MQ_SENDRECV 1313 /* POSIX MQ send/receive record type */ -#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ -#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ @@ -122,21 +118,10 @@ /* Rule structure sizes -- if these change, different AUDIT_ADD and * AUDIT_LIST commands must be implemented. */ #define AUDIT_MAX_FIELDS 64 -#define AUDIT_MAX_KEY_LEN 32 #define AUDIT_BITMASK_SIZE 64 #define AUDIT_WORD(nr) ((__u32)((nr)/32)) #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) -#define AUDIT_SYSCALL_CLASSES 16 -#define AUDIT_CLASS_DIR_WRITE 0 -#define AUDIT_CLASS_DIR_WRITE_32 1 -#define AUDIT_CLASS_CHATTR 2 -#define AUDIT_CLASS_CHATTR_32 3 -#define AUDIT_CLASS_READ 4 -#define AUDIT_CLASS_READ_32 5 -#define AUDIT_CLASS_WRITE 6 -#define AUDIT_CLASS_WRITE_32 7 - /* This bitmask is used to validate user input. It represents all bits that * are currently used in an audit field constant understood by the kernel. * If you are adding a new #define AUDIT_, please ensure that @@ -161,17 +146,11 @@ #define AUDIT_PERS 10 #define AUDIT_ARCH 11 #define AUDIT_MSGTYPE 12 -#define AUDIT_SUBJ_USER 13 /* security label user */ -#define AUDIT_SUBJ_ROLE 14 /* security label role */ -#define AUDIT_SUBJ_TYPE 15 /* security label type */ -#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */ -#define AUDIT_SUBJ_CLR 17 /* security label clearance label */ -#define AUDIT_PPID 18 -#define AUDIT_OBJ_USER 19 -#define AUDIT_OBJ_ROLE 20 -#define AUDIT_OBJ_TYPE 21 -#define AUDIT_OBJ_LEV_LOW 22 -#define AUDIT_OBJ_LEV_HIGH 23 +#define AUDIT_SE_USER 13 /* security label user */ +#define AUDIT_SE_ROLE 14 /* security label role */ +#define AUDIT_SE_TYPE 15 /* security label type */ +#define AUDIT_SE_SEN 16 /* security label sensitivity label */ +#define AUDIT_SE_CLR 17 /* security label clearance label */ /* These are ONLY useful when checking * at syscall exit time (AUDIT_AT_EXIT). */ @@ -180,16 +159,12 @@ #define AUDIT_INODE 102 #define AUDIT_EXIT 103 #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ -#define AUDIT_WATCH 105 -#define AUDIT_PERM 106 #define AUDIT_ARG0 200 #define AUDIT_ARG1 (AUDIT_ARG0+1) #define AUDIT_ARG2 (AUDIT_ARG0+2) #define AUDIT_ARG3 (AUDIT_ARG0+3) -#define AUDIT_FILTERKEY 210 - #define AUDIT_NEGATE 0x80000000 /* These are the supported operators. @@ -257,11 +232,6 @@ #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) -#define AUDIT_PERM_EXEC 1 -#define AUDIT_PERM_WRITE 2 -#define AUDIT_PERM_READ 4 -#define AUDIT_PERM_ATTR 8 - struct audit_status { __u32 mask; /* Bit mask for valid entries */ __u32 enabled; /* 1 = enabled, 0 = disabled */ @@ -303,28 +273,21 @@ struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */ }; #ifdef __KERNEL__ -#include struct audit_sig_info { uid_t uid; pid_t pid; - char ctx[0]; }; struct audit_buffer; struct audit_context; struct inode; struct netlink_skb_parms; -struct linux_binprm; -struct mq_attr; -struct mqstat; #define AUDITSC_INVALID 0 #define AUDITSC_SUCCESS 1 #define AUDITSC_FAILURE 2 #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) -extern int __init audit_register_class(int class, unsigned *list); -extern int audit_classify_syscall(int abi, unsigned syscall); #ifdef CONFIG_AUDITSYSCALL /* These are defined in auditsc.c */ /* Public API */ @@ -334,35 +297,21 @@ extern void audit_syscall_entry(int arch, int major, unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3); extern void audit_syscall_exit(int failed, long return_code); -extern void __audit_getname(const char *name); +extern void audit_getname(const char *name); extern void audit_putname(const char *name); -extern void __audit_inode(const char *name, const struct inode *inode); +extern void __audit_inode(const char *name, const struct inode *inode, unsigned flags); extern void __audit_inode_child(const char *dname, const struct inode *inode, - const struct inode *parent); -extern void __audit_inode_update(const struct inode *inode); -static inline int audit_dummy_context(void) -{ - void *p = current->audit_context; - return !p || *(int *)p; -} -static inline void audit_getname(const char *name) -{ - if (unlikely(!audit_dummy_context())) - __audit_getname(name); -} -static inline void audit_inode(const char *name, const struct inode *inode) { - if (unlikely(!audit_dummy_context())) - __audit_inode(name, inode); + unsigned long pino); +static inline void audit_inode(const char *name, const struct inode *inode, + unsigned flags) { + if (unlikely(current->audit_context)) + __audit_inode(name, inode, flags); } static inline void audit_inode_child(const char *dname, - const struct inode *inode, - const struct inode *parent) { - if (unlikely(!audit_dummy_context())) - __audit_inode_child(dname, inode, parent); -} -static inline void audit_inode_update(const struct inode *inode) { - if (unlikely(!audit_dummy_context())) - __audit_inode_update(inode); + const struct inode *inode, + unsigned long pino) { + if (unlikely(current->audit_context)) + __audit_inode_child(dname, inode, pino); } /* Private API (for audit.c only) */ @@ -371,91 +320,33 @@ extern void auditsc_get_stamp(struct audit_context *ctx, struct timespec *t, unsigned int *serial); extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); extern uid_t audit_get_loginuid(struct audit_context *ctx); -extern int __audit_ipc_obj(struct kern_ipc_perm *ipcp); -extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); -extern int audit_bprm(struct linux_binprm *bprm); +extern int audit_ipc_obj(struct kern_ipc_perm *ipcp); +extern int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp); extern int audit_socketcall(int nargs, unsigned long *args); extern int audit_sockaddr(int len, void *addr); extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); +extern void audit_signal_info(int sig, struct task_struct *t); extern int audit_set_macxattr(const char *name); -extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); -extern int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout); -extern int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout); -extern int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification); -extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat); - -static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) -{ - if (unlikely(!audit_dummy_context())) - return __audit_ipc_obj(ipcp); - return 0; -} -static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) -{ - if (unlikely(!audit_dummy_context())) - return __audit_ipc_set_perm(qbytes, uid, gid, mode); - return 0; -} -static inline int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_open(oflag, mode, u_attr); - return 0; -} -static inline int audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec __user *u_abs_timeout) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); - return 0; -} -static inline int audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, unsigned int __user *u_msg_prio, const struct timespec __user *u_abs_timeout) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); - return 0; -} -static inline int audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_notify(mqdes, u_notification); - return 0; -} -static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) -{ - if (unlikely(!audit_dummy_context())) - return __audit_mq_getsetattr(mqdes, mqstat); - return 0; -} -extern int audit_n_rules; #else #define audit_alloc(t) ({ 0; }) #define audit_free(t) do { ; } while (0) #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0) #define audit_syscall_exit(f,r) do { ; } while (0) -#define audit_dummy_context() 1 #define audit_getname(n) do { ; } while (0) #define audit_putname(n) do { ; } while (0) -#define __audit_inode(n,i) do { ; } while (0) +#define __audit_inode(n,i,f) do { ; } while (0) #define __audit_inode_child(d,i,p) do { ; } while (0) -#define __audit_inode_update(i) do { ; } while (0) -#define audit_inode(n,i) do { ; } while (0) +#define audit_inode(n,i,f) do { ; } while (0) #define audit_inode_child(d,i,p) do { ; } while (0) -#define audit_inode_update(i) do { ; } while (0) #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) #define audit_get_loginuid(c) ({ -1; }) #define audit_ipc_obj(i) ({ 0; }) -#define audit_ipc_set_perm(q,u,g,m) ({ 0; }) -#define audit_bprm(p) ({ 0; }) +#define audit_ipc_set_perm(q,u,g,m,i) ({ 0; }) #define audit_socketcall(n,a) ({ 0; }) #define audit_sockaddr(len, addr) ({ 0; }) #define audit_avc_path(dentry, mnt) ({ 0; }) +#define audit_signal_info(s,t) do { ; } while (0) #define audit_set_macxattr(n) do { ; } while (0) -#define audit_mq_open(o,m,a) ({ 0; }) -#define audit_mq_timedsend(d,l,p,t) ({ 0; }) -#define audit_mq_timedreceive(d,l,p,t) ({ 0; }) -#define audit_mq_notify(d,n) ({ 0; }) -#define audit_mq_getsetattr(d,s) ({ 0; }) -#define audit_n_rules 0 #endif #ifdef CONFIG_AUDIT @@ -473,11 +364,8 @@ extern void audit_log_end(struct audit_buffer *ab); extern void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, size_t len); -extern const char * audit_log_untrustedstring(struct audit_buffer *ab, +extern void audit_log_untrustedstring(struct audit_buffer *ab, const char *string); -extern const char * audit_log_n_untrustedstring(struct audit_buffer *ab, - size_t n, - const char *string); extern void audit_log_d_path(struct audit_buffer *ab, const char *prefix, struct dentry *dentry, @@ -495,8 +383,8 @@ extern int audit_receive_filter(int type, int pid, int uid, int seq, #define audit_log_end(b) do { ; } while (0) #define audit_log_hex(a,b,l) do { ; } while (0) #define audit_log_untrustedstring(a,s) do { ; } while (0) -#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) #define audit_log_d_path(b,p,d,v) do { ; } while (0) +#define audit_panic(m) do { ; } while (0) #endif #endif #endif diff --git a/include/linux/bio.h b/include/linux/bio.h index 76bdaeab6..b60ffe32c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -47,7 +47,7 @@ #define BIO_BUG_ON #endif -#define BIO_MAX_PAGES 256 +#define BIO_MAX_PAGES (256) #define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT) #define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9) diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index a1460b5fc..cff80436f 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -24,9 +24,6 @@ * The available bitmap operations and their rough meaning in the * case that the bitmap is a single unsigned long are thus: * - * Note that nbits should be always a compile time evaluable constant. - * Otherwise many inlines will generate horrible code. - * * bitmap_zero(dst, nbits) *dst = 0UL * bitmap_fill(dst, nbits) *dst = ~0UL * bitmap_copy(dst, src, nbits) *dst = *src @@ -247,8 +244,6 @@ static inline int __must_check bitmap_full(const unsigned long *src, int nbits) static inline int __must_check bitmap_weight(const unsigned long *src, int nbits) { - if (nbits <= BITS_PER_LONG) - return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); return __bitmap_weight(src, nbits); } diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index aafe82788..59e1259b1 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1,6 +1,7 @@ #ifndef _LINUX_BLKDEV_H #define _LINUX_BLKDEV_H +#include #include #include #include @@ -151,9 +152,11 @@ struct request { void *elevator_private; void *completion_data; + unsigned short ioprio; + int rq_status; /* should split this into a few status bits */ - int errors; struct gendisk *rq_disk; + int errors; unsigned long start_time; /* Number of scatter-gather DMA addr+len pairs after @@ -168,9 +171,8 @@ struct request { */ unsigned short nr_hw_segments; - unsigned short ioprio; - int tag; + char *buffer; int ref_count; request_queue_t *q; @@ -178,7 +180,6 @@ struct request { struct completion *waiting; void *special; - char *buffer; /* * when request is used as a packet command carrier @@ -187,13 +188,19 @@ struct request { unsigned char cmd[BLK_MAX_CDB]; unsigned int data_len; - unsigned int sense_len; void *data; + + unsigned int sense_len; void *sense; unsigned int timeout; int retries; + /* + * For Power Management requests + */ + struct request_pm_state *pm; + /* * completion callback. end_io_data should be folded in with waiting */ @@ -235,7 +242,6 @@ enum rq_flag_bits { __REQ_PM_RESUME, /* resume request */ __REQ_PM_SHUTDOWN, /* shutdown request */ __REQ_ORDERED_COLOR, /* is before or after barrier */ - __REQ_RW_SYNC, /* request is sync (O_DIRECT) */ __REQ_NR_BITS, /* stops here */ }; @@ -265,7 +271,6 @@ enum rq_flag_bits { #define REQ_PM_RESUME (1 << __REQ_PM_RESUME) #define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN) #define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR) -#define REQ_RW_SYNC (1 << __REQ_RW_SYNC) /* * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME @@ -434,6 +439,9 @@ struct request_queue #define RQ_INACTIVE (-1) #define RQ_ACTIVE 1 +#define RQ_SCSI_BUSY 0xffff +#define RQ_SCSI_DONE 0xfffe +#define RQ_SCSI_DISCONNECTING 0xffe0 #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ diff --git a/include/linux/blkpg.h b/include/linux/blkpg.h index faf8a45af..be5d0f4ad 100644 --- a/include/linux/blkpg.h +++ b/include/linux/blkpg.h @@ -24,7 +24,6 @@ * * For today, only the partition stuff - aeb, 990515 */ -#include #include #define BLKPG _IO(0x12,105) diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 7520cc1ff..b34d3e73d 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h @@ -1,6 +1,7 @@ #ifndef BLKTRACE_H #define BLKTRACE_H +#include #include #include @@ -11,7 +12,7 @@ enum blktrace_cat { BLK_TC_READ = 1 << 0, /* reads */ BLK_TC_WRITE = 1 << 1, /* writes */ BLK_TC_BARRIER = 1 << 2, /* barrier */ - BLK_TC_SYNC = 1 << 3, /* sync IO */ + BLK_TC_SYNC = 1 << 3, /* barrier */ BLK_TC_QUEUE = 1 << 4, /* queueing/merging */ BLK_TC_REQUEUE = 1 << 5, /* requeueing */ BLK_TC_ISSUE = 1 << 6, /* issue */ @@ -19,7 +20,6 @@ enum blktrace_cat { BLK_TC_FS = 1 << 8, /* fs requests */ BLK_TC_PC = 1 << 9, /* pc requests */ BLK_TC_NOTIFY = 1 << 10, /* special message */ - BLK_TC_AHEAD = 1 << 11, /* readahead */ BLK_TC_END = 1 << 15, /* only 16-bits, reminder */ }; @@ -91,9 +91,9 @@ struct blk_io_trace { * The remap event */ struct blk_io_trace_remap { - __be32 device; + u32 device; u32 __pad; - __be64 sector; + u64 sector; }; enum { @@ -148,7 +148,7 @@ static inline void blk_add_trace_rq(struct request_queue *q, struct request *rq, u32 what) { struct blk_trace *bt = q->blk_trace; - int rw = rq->flags & 0x03; + int rw = rq->flags & 0x07; if (likely(!bt)) return; @@ -225,7 +225,7 @@ static inline void blk_add_trace_pdu_int(struct request_queue *q, u32 what, struct bio *bio, unsigned int pdu) { struct blk_trace *bt = q->blk_trace; - __be64 rpdu = cpu_to_be64(pdu); + u64 rpdu = cpu_to_be64(pdu); if (likely(!bt)) return; diff --git a/include/linux/blockgroup_lock.h b/include/linux/blockgroup_lock.h index 860731298..0137ee5dd 100644 --- a/include/linux/blockgroup_lock.h +++ b/include/linux/blockgroup_lock.h @@ -6,6 +6,7 @@ * Simple hashed spinlocking. */ +#include #include #include diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 1021f508d..da2d107fe 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -91,8 +91,8 @@ static inline void *alloc_remap(int nid, unsigned long size) } #endif -extern unsigned long __meminitdata nr_kernel_pages; -extern unsigned long nr_all_pages; +extern unsigned long __initdata nr_kernel_pages; +extern unsigned long __initdata nr_all_pages; extern void *__init alloc_large_system_hash(const char *tablename, unsigned long bucketsize, diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 2c4bbb811..08033f3ac 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -149,6 +149,7 @@ void create_empty_buffers(struct page *, unsigned long, unsigned long b_state); void end_buffer_read_sync(struct buffer_head *bh, int uptodate); void end_buffer_write_sync(struct buffer_head *bh, int uptodate); +void end_buffer_async_write(struct buffer_head *bh, int uptodate); /* Things to do with buffers at mapping->private_list */ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); @@ -214,7 +215,6 @@ int nobh_truncate_page(struct address_space *, loff_t); int nobh_writepage(struct page *page, get_block_t *get_block, struct writeback_control *wbc); -void buffer_init(void); /* * inline definitions diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild deleted file mode 100644 index 56499ab9e..000000000 --- a/include/linux/byteorder/Kbuild +++ /dev/null @@ -1,7 +0,0 @@ -header-y += big_endian.h -header-y += little_endian.h -header-y += pdp_endian.h - -unifdef-y += generic.h -unifdef-y += swabb.h -unifdef-y += swab.h diff --git a/include/linux/cache.h b/include/linux/cache.h index 4552504c0..cc4b3aafa 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -2,6 +2,7 @@ #define __LINUX_CACHE_H #include +#include #include #ifndef L1_CACHE_ALIGN diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h deleted file mode 100644 index d852024ed..000000000 --- a/include/linux/clocksource.h +++ /dev/null @@ -1,185 +0,0 @@ -/* linux/include/linux/clocksource.h - * - * This file contains the structure definitions for clocksources. - * - * If you are not a clocksource, or timekeeping code, you should - * not be including this file! - */ -#ifndef _LINUX_CLOCKSOURCE_H -#define _LINUX_CLOCKSOURCE_H - -#include -#include -#include -#include -#include -#include - -/* clocksource cycle base type */ -typedef u64 cycle_t; - -/** - * struct clocksource - hardware abstraction for a free running counter - * Provides mostly state-free accessors to the underlying hardware. - * - * @name: ptr to clocksource name - * @list: list head for registration - * @rating: rating value for selection (higher is better) - * To avoid rating inflation the following - * list should give you a guide as to how - * to assign your clocksource a rating - * 1-99: Unfit for real use - * Only available for bootup and testing purposes. - * 100-199: Base level usability. - * Functional for real use, but not desired. - * 200-299: Good. - * A correct and usable clocksource. - * 300-399: Desired. - * A reasonably fast and accurate clocksource. - * 400-499: Perfect - * The ideal clocksource. A must-use where - * available. - * @read: returns a cycle value - * @mask: bitmask for two's complement - * subtraction of non 64 bit counters - * @mult: cycle to nanosecond multiplier - * @shift: cycle to nanosecond divisor (power of two) - * @update_callback: called when safe to alter clocksource values - * @is_continuous: defines if clocksource is free-running. - * @cycle_interval: Used internally by timekeeping core, please ignore. - * @xtime_interval: Used internally by timekeeping core, please ignore. - */ -struct clocksource { - char *name; - struct list_head list; - int rating; - cycle_t (*read)(void); - cycle_t mask; - u32 mult; - u32 shift; - int (*update_callback)(void); - int is_continuous; - - /* timekeeping specific data, ignore */ - cycle_t cycle_last, cycle_interval; - u64 xtime_nsec, xtime_interval; - s64 error; -}; - -/* simplify initialization of mask field */ -#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<read(); -} - -/** - * cyc2ns - converts clocksource cycles to nanoseconds - * @cs: Pointer to clocksource - * @cycles: Cycles - * - * Uses the clocksource and ntp ajdustment to convert cycle_ts to nanoseconds. - * - * XXX - This could use some mult_lxl_ll() asm optimization - */ -static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles) -{ - u64 ret = (u64)cycles; - ret = (ret * cs->mult) >> cs->shift; - return ret; -} - -/** - * clocksource_calculate_interval - Calculates a clocksource interval struct - * - * @c: Pointer to clocksource. - * @length_nsec: Desired interval length in nanoseconds. - * - * Calculates a fixed cycle/nsec interval for a given clocksource/adjustment - * pair and interval request. - * - * Unless you're the timekeeping code, you should not be using this! - */ -static inline void clocksource_calculate_interval(struct clocksource *c, - unsigned long length_nsec) -{ - u64 tmp; - - /* XXX - All of this could use a whole lot of optimization */ - tmp = length_nsec; - tmp <<= c->shift; - tmp += c->mult/2; - do_div(tmp, c->mult); - - c->cycle_interval = (cycle_t)tmp; - if (c->cycle_interval == 0) - c->cycle_interval = 1; - - c->xtime_interval = (u64)c->cycle_interval * c->mult; -} - - -/* used to install a new clocksource */ -int clocksource_register(struct clocksource*); -void clocksource_reselect(void); -struct clocksource* clocksource_get_next(void); - -#endif /* _LINUX_CLOCKSOURCE_H */ diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index 1c86d65bc..1417de935 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h @@ -3,22 +3,31 @@ * * Copyright (C) Matt Helsley, IBM Corp. 2005 * Based on cn_fork.h by Nguyen Anh Quynh and Guillaume Thouvenin + * Original copyright notice follows: * Copyright (C) 2005 Nguyen Anh Quynh * Copyright (C) 2005 Guillaume Thouvenin * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License - * as published by the Free Software Foundation. + * 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 would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * 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 CN_PROC_H #define CN_PROC_H #include +#include +#include /* * Userspace sends this enum to register with the kernel that it is listening @@ -57,8 +66,7 @@ struct proc_event { PROC_EVENT_EXIT = 0x80000000 } what; __u32 cpu; - __u64 __attribute__((aligned(8))) timestamp_ns; - /* Number of nano seconds since system boot */ + struct timespec timestamp; union { /* must be last field of proc_event struct */ struct { __u32 err; diff --git a/include/linux/coda.h b/include/linux/coda.h index b5cf0780c..bbc5afcd7 100644 --- a/include/linux/coda.h +++ b/include/linux/coda.h @@ -59,6 +59,7 @@ Mellon the rights to redistribute these changes without encumbrance. #ifndef _CODA_HEADER_ #define _CODA_HEADER_ +#include /* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */ #if defined(__NetBSD__) || \ diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index be512cc98..b3ecf8f71 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h @@ -27,8 +27,8 @@ extern struct inode_operations coda_dir_inode_operations; extern struct inode_operations coda_file_inode_operations; extern struct inode_operations coda_ioctl_inode_operations; -extern const struct address_space_operations coda_file_aops; -extern const struct address_space_operations coda_symlink_aops; +extern struct address_space_operations coda_file_aops; +extern struct address_space_operations coda_symlink_aops; extern const struct file_operations coda_dir_operations; extern const struct file_operations coda_file_operations; @@ -36,7 +36,7 @@ extern const struct file_operations coda_ioctl_operations; /* operations shared over more than one file */ int coda_open(struct inode *i, struct file *f); -int coda_flush(struct file *f, fl_owner_t id); +int coda_flush(struct file *f); int coda_release(struct inode *i, struct file *f); int coda_permission(struct inode *inode, int mask, struct nameidata *nd); int coda_revalidate_inode(struct dentry *); diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index 98f6c52c1..d539262a8 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h @@ -70,7 +70,7 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, unsigned int cmd, struct PioctlData *data); int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb); int venus_fsync(struct super_block *sb, struct CodaFid *fid); -int venus_statfs(struct dentry *dentry, struct kstatfs *sfs); +int venus_statfs(struct super_block *sb, struct kstatfs *sfs); /* messages between coda filesystem in kernel and Venus */ diff --git a/include/linux/compat.h b/include/linux/compat.h index 9760753e6..6d3a654be 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -4,6 +4,7 @@ * These are the type definitions for the architecture specific * syscall compatibility layer. */ +#include #ifdef CONFIG_COMPAT @@ -226,7 +227,5 @@ static inline int compat_timespec_compare(struct compat_timespec *lhs, asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); -extern int compat_printk(const char *fmt, ...); - #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index bea025519..89ab677cb 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -216,7 +216,6 @@ COMPATIBLE_IOCTL(VT_RESIZE) COMPATIBLE_IOCTL(VT_RESIZEX) COMPATIBLE_IOCTL(VT_LOCKSWITCH) COMPATIBLE_IOCTL(VT_UNLOCKSWITCH) -COMPATIBLE_IOCTL(VT_GETHIFONTMASK) /* Little p (/dev/rtc, /dev/envctrl, etc.) */ COMPATIBLE_IOCTL(RTC_AIE_ON) COMPATIBLE_IOCTL(RTC_AIE_OFF) @@ -568,6 +567,11 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) +/* DEVFS */ +COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV) +COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK) +COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE) +COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK) /* Raw devices */ COMPATIBLE_IOCTL(RAW_SETBIND) COMPATIBLE_IOCTL(RAW_GETBIND) @@ -669,11 +673,6 @@ COMPATIBLE_IOCTL(CAPI_SET_FLAGS) COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) -/* Siemens Gigaset */ -COMPATIBLE_IOCTL(GIGASET_REDIR) -COMPATIBLE_IOCTL(GIGASET_CONFIG) -COMPATIBLE_IOCTL(GIGASET_BRKCHARS) -COMPATIBLE_IOCTL(GIGASET_VERSION) /* Misc. */ COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 9b4f11094..f23d3c6fc 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -78,7 +78,6 @@ extern void __chk_io_ptr(void __iomem *); #endif /* __ASSEMBLY__ */ -#ifdef __KERNEL__ /* * Allow us to mark functions as 'deprecated' and have gcc emit a nice * warning for each use, in hopes of speeding the functions removal. @@ -128,16 +127,6 @@ extern void __chk_io_ptr(void __iomem *); # define __attribute_pure__ /* unimplemented */ #endif -#ifndef noinline -#define noinline -#endif - -#ifndef __always_inline -#define __always_inline inline -#endif - -#endif /* __KERNEL__ */ - /* * From the GCC manual: * @@ -156,4 +145,12 @@ extern void __chk_io_ptr(void __iomem *); # define __attribute_const__ /* unimplemented */ #endif +#ifndef noinline +#define noinline +#endif + +#ifndef __always_inline +#define __always_inline inline +#endif + #endif /* __LINUX_COMPILER_H */ diff --git a/include/linux/completion.h b/include/linux/completion.h index 268c5a4a2..90663ad21 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -18,24 +18,9 @@ struct completion { #define COMPLETION_INITIALIZER(work) \ { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } -#define COMPLETION_INITIALIZER_ONSTACK(work) \ - ({ init_completion(&work); work; }) - #define DECLARE_COMPLETION(work) \ struct completion work = COMPLETION_INITIALIZER(work) -/* - * Lockdep needs to run a non-constant initializer for on-stack - * completions - so we use the _ONSTACK() variant for those that - * are on the kernel stack: - */ -#ifdef CONFIG_LOCKDEP -# define DECLARE_COMPLETION_ONSTACK(work) \ - struct completion work = COMPLETION_INITIALIZER_ONSTACK(work) -#else -# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) -#endif - static inline void init_completion(struct completion *x) { x->done = 0; diff --git a/include/linux/config.h b/include/linux/config.h index db6e5cae6..4337c2f43 100644 --- a/include/linux/config.h +++ b/include/linux/config.h @@ -3,7 +3,6 @@ /* This file is no longer in use and kept only for backward compatibility. * autoconf.h is now included via -imacros on the commandline */ -#warning Including config.h is deprecated. #include #if !defined (__KERNEL__) && !defined(__KERNGLUE__) #error including kernel header in userspace; use the glibc headers instead! diff --git a/include/linux/connector.h b/include/linux/connector.h index 4c02119c6..ad1a22c1c 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h @@ -34,11 +34,8 @@ #define CN_VAL_PROC 0x1 #define CN_IDX_CIFS 0x2 #define CN_VAL_CIFS 0x1 -#define CN_W1_IDX 0x3 /* w1 communication */ -#define CN_W1_VAL 0x1 - -#define CN_NETLINK_USERS 4 +#define CN_NETLINK_USERS 1 /* * Maximum connector's message size. diff --git a/include/linux/console.h b/include/linux/console.h index 3bdf2155e..721371382 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -63,11 +63,9 @@ extern const struct consw vga_con; /* VGA text console */ extern const struct consw newport_con; /* SGI Newport console */ extern const struct consw prom_con; /* SPARC PROM console */ -int con_is_bound(const struct consw *csw); -int register_con_driver(const struct consw *csw, int first, int last); -int unregister_con_driver(const struct consw *csw); int take_over_console(const struct consw *sw, int first, int last, int deflt); void give_up_console(const struct consw *sw); + /* scroll */ #define SM_UP (1) #define SM_DOWN (2) @@ -89,7 +87,6 @@ void give_up_console(const struct consw *sw); #define CON_CONSDEV (2) /* Last on the command line */ #define CON_ENABLED (4) #define CON_BOOT (8) -#define CON_ANYTIME (16) /* Safe to call when cpu is offline */ struct console { @@ -120,10 +117,6 @@ extern void console_stop(struct console *); extern void console_start(struct console *); extern int is_console_locked(void); -/* Suspend and resume console messages over PM events */ -extern void suspend_console(void); -extern void resume_console(void); - /* Some debug stub to catch some of the obvious races in the VT code */ #if 1 #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index 25423f79b..f8e5587a0 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -9,7 +9,6 @@ * to achieve effects such as fast scrolling by changing the origin. */ -#include #include struct vt_struct; diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 3fef7d67a..08d50c53a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -31,23 +31,18 @@ struct cpu { struct sys_device sysdev; }; -extern int register_cpu(struct cpu *cpu, int num); +extern int register_cpu(struct cpu *, int, struct node *); extern struct sys_device *get_cpu_sysdev(unsigned cpu); #ifdef CONFIG_HOTPLUG_CPU -extern void unregister_cpu(struct cpu *cpu); +extern void unregister_cpu(struct cpu *, struct node *); #endif struct notifier_block; #ifdef CONFIG_SMP /* Need to know about CPUs going up/down? */ extern int register_cpu_notifier(struct notifier_block *nb); -#ifdef CONFIG_HOTPLUG_CPU extern void unregister_cpu_notifier(struct notifier_block *nb); -#else -static inline void unregister_cpu_notifier(struct notifier_block *nb) -{ -} -#endif +extern int current_in_cpu_hotplug(void); int cpu_up(unsigned int cpu); @@ -60,6 +55,10 @@ static inline int register_cpu_notifier(struct notifier_block *nb) static inline void unregister_cpu_notifier(struct notifier_block *nb) { } +static inline int current_in_cpu_hotplug(void) +{ + return 0; +} #endif /* CONFIG_SMP */ extern struct sysdev_class cpu_sysdev_class; @@ -68,33 +67,22 @@ extern struct sysdev_class cpu_sysdev_class; /* Stop CPUs going up and down. */ extern void lock_cpu_hotplug(void); extern void unlock_cpu_hotplug(void); +extern int lock_cpu_hotplug_interruptible(void); #define hotcpu_notifier(fn, pri) { \ static struct notifier_block fn##_nb = \ { .notifier_call = fn, .priority = pri }; \ register_cpu_notifier(&fn##_nb); \ } -#define register_hotcpu_notifier(nb) register_cpu_notifier(nb) -#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) int cpu_down(unsigned int cpu); #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) #else #define lock_cpu_hotplug() do { } while (0) #define unlock_cpu_hotplug() do { } while (0) #define lock_cpu_hotplug_interruptible() 0 -#define hotcpu_notifier(fn, pri) do { } while (0) -#define register_hotcpu_notifier(nb) do { } while (0) -#define unregister_hotcpu_notifier(nb) do { } while (0) +#define hotcpu_notifier(fn, pri) /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ static inline int cpu_is_offline(int cpu) { return 0; } #endif -#ifdef CONFIG_SUSPEND_SMP -extern int disable_nonboot_cpus(void); -extern void enable_nonboot_cpus(void); -#else -static inline int disable_nonboot_cpus(void) { return 0; } -static inline void enable_nonboot_cpus(void) {} -#endif - #endif /* _LINUX_CPU_H_ */ diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4ea39fee9..17866d7e2 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -15,6 +15,7 @@ #define _LINUX_CPUFREQ_H #include +#include #include #include #include @@ -72,8 +73,6 @@ struct cpufreq_real_policy { struct cpufreq_policy { cpumask_t cpus; /* affected CPUs */ - unsigned int shared_type; /* ANY or ALL affected CPUs - should set cpufreq */ unsigned int cpu; /* cpu nr of registered CPU */ struct cpufreq_cpuinfo cpuinfo;/* see above */ @@ -100,10 +99,6 @@ struct cpufreq_policy { #define CPUFREQ_INCOMPATIBLE (1) #define CPUFREQ_NOTIFY (2) -#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ -#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ -#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ -#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ /******************** cpufreq transition notifiers *******************/ @@ -172,6 +167,9 @@ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int relation); +/* pass an event to the cpufreq governor */ +int cpufreq_governor(unsigned int cpu, unsigned int event); + int cpufreq_register_governor(struct cpufreq_governor *governor); void cpufreq_unregister_governor(struct cpufreq_governor *governor); diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b268a3c0c..9cbb781d6 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -317,8 +317,7 @@ static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, (cpu) < NR_CPUS; \ (cpu) = next_cpu((cpu), (mask))) #else /* NR_CPUS == 1 */ -#define for_each_cpu_mask(cpu, mask) \ - for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) +#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++) #endif /* NR_CPUS */ /* @@ -406,6 +405,7 @@ int __any_online_cpu(const cpumask_t *mask); #define any_online_cpu(mask) 0 #endif +#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) #define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) diff --git a/include/linux/cramfs_fs.h b/include/linux/cramfs_fs.h index a41f38428..a8948f34b 100644 --- a/include/linux/cramfs_fs.h +++ b/include/linux/cramfs_fs.h @@ -1,7 +1,13 @@ #ifndef __CRAMFS_H #define __CRAMFS_H -#include +#ifndef __KERNEL__ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +#endif #define CRAMFS_MAGIC 0x28cd3d45 /* some random number */ #define CRAMFS_SIGNATURE "Compressed ROMFS" @@ -27,9 +33,9 @@ * Reasonably terse representation of the inode data. */ struct cramfs_inode { - __u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; + u32 mode:CRAMFS_MODE_WIDTH, uid:CRAMFS_UID_WIDTH; /* SIZE for device files is i_rdev */ - __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; + u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; /* NAMELEN is the length of the file name, divided by 4 and rounded up. (cramfs doesn't support hard links.) */ /* OFFSET: For symlinks and non-empty regular files, this @@ -38,27 +44,27 @@ struct cramfs_inode { see README). For non-empty directories it is the offset (divided by 4) of the inode of the first file in that directory. For anything else, offset is zero. */ - __u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; + u32 namelen:CRAMFS_NAMELEN_WIDTH, offset:CRAMFS_OFFSET_WIDTH; }; struct cramfs_info { - __u32 crc; - __u32 edition; - __u32 blocks; - __u32 files; + u32 crc; + u32 edition; + u32 blocks; + u32 files; }; /* * Superblock information at the beginning of the FS. */ struct cramfs_super { - __u32 magic; /* 0x28cd3d45 - random number */ - __u32 size; /* length in bytes */ - __u32 flags; /* feature flags */ - __u32 future; /* reserved for future use */ - __u8 signature[16]; /* "Compressed ROMFS" */ + u32 magic; /* 0x28cd3d45 - random number */ + u32 size; /* length in bytes */ + u32 flags; /* feature flags */ + u32 future; /* reserved for future use */ + u8 signature[16]; /* "Compressed ROMFS" */ struct cramfs_info fsid; /* unique filesystem info */ - __u8 name[16]; /* user-defined name */ + u8 name[16]; /* user-defined name */ struct cramfs_inode root; /* root inode data */ }; diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 3abe2ac2b..4484f5e08 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -17,6 +17,7 @@ #ifndef _LINUX_CRYPTO_H #define _LINUX_CRYPTO_H +#include #include #include #include @@ -66,7 +67,7 @@ struct crypto_tfm; struct cipher_desc { struct crypto_tfm *tfm; - void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + void (*crfn)(void *ctx, u8 *dst, const u8 *src); unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, const u8 *src, unsigned int nbytes); void *info; @@ -79,10 +80,10 @@ struct cipher_desc { struct cipher_alg { unsigned int cia_min_keysize; unsigned int cia_max_keysize; - int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, + int (*cia_setkey)(void *ctx, const u8 *key, unsigned int keylen, u32 *flags); - void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); - void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); + void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, u8 *dst, const u8 *src, @@ -100,19 +101,20 @@ struct cipher_alg { struct digest_alg { unsigned int dia_digestsize; - void (*dia_init)(struct crypto_tfm *tfm); - void (*dia_update)(struct crypto_tfm *tfm, const u8 *data, - unsigned int len); - void (*dia_final)(struct crypto_tfm *tfm, u8 *out); - int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key, + void (*dia_init)(void *ctx); + void (*dia_update)(void *ctx, const u8 *data, unsigned int len); + void (*dia_final)(void *ctx, u8 *out); + int (*dia_setkey)(void *ctx, const u8 *key, unsigned int keylen, u32 *flags); }; struct compress_alg { - int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, - unsigned int slen, u8 *dst, unsigned int *dlen); - int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src, - unsigned int slen, u8 *dst, unsigned int *dlen); + int (*coa_init)(void *ctx); + void (*coa_exit)(void *ctx); + int (*coa_compress)(void *ctx, const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen); + int (*coa_decompress)(void *ctx, const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen); }; #define cra_cipher cra_u.cipher @@ -128,17 +130,14 @@ struct crypto_alg { int cra_priority; - char cra_name[CRYPTO_MAX_ALG_NAME]; - char cra_driver_name[CRYPTO_MAX_ALG_NAME]; + const char cra_name[CRYPTO_MAX_ALG_NAME]; + const char cra_driver_name[CRYPTO_MAX_ALG_NAME]; union { struct cipher_alg cipher; struct digest_alg digest; struct compress_alg compress; } cra_u; - - int (*cra_init)(struct crypto_tfm *tfm); - void (*cra_exit)(struct crypto_tfm *tfm); struct module *cra_module; }; diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h index b88f7f428..300d704bd 100644 --- a/include/linux/cyclomx.h +++ b/include/linux/cyclomx.h @@ -24,6 +24,7 @@ * 1998/08/08 acme Version 0.0.1 */ +#include #include #include diff --git a/include/linux/dcache.h b/include/linux/dcache.h index ea8510fe0..4607ee97e 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -115,18 +115,6 @@ struct dentry { unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ }; -/* - * dentry->d_lock spinlock nesting subclasses: - * - * 0: normal - * 1: nested - */ -enum dentry_d_lock_class -{ - DENTRY_D_LOCK_NORMAL, /* implicitly used by plain spin_lock() APIs. */ - DENTRY_D_LOCK_NESTED -}; - struct dentry_operations { int (*d_revalidate)(struct dentry *, struct nameidata *); int (*d_hash) (struct dentry *, struct qstr *); @@ -222,7 +210,6 @@ static inline int dname_external(struct dentry *dentry) */ extern void d_instantiate(struct dentry *, struct inode *); extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); -extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); extern void d_delete(struct dentry *); /* allocate/de-allocate */ @@ -231,7 +218,7 @@ extern struct dentry * d_alloc_anon(struct inode *); extern struct dentry * d_splice_alias(struct inode *, struct dentry *); extern void shrink_dcache_sb(struct super_block *); extern void shrink_dcache_parent(struct dentry *); -extern void shrink_dcache_for_umount(struct super_block *); +extern void shrink_dcache_anon(struct hlist_head *); extern int d_invalidate(struct dentry *); extern void flush_dentry_attributes(void); diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index 0fe7cdf32..1d68428c9 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h @@ -9,6 +9,7 @@ #ifndef DCOOKIES_H #define DCOOKIES_H +#include #ifdef CONFIG_PROFILING diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h deleted file mode 100644 index 88dafa246..000000000 --- a/include/linux/debug_locks.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __LINUX_DEBUG_LOCKING_H -#define __LINUX_DEBUG_LOCKING_H - -struct task_struct; - -extern int debug_locks; -extern int debug_locks_silent; - -/* - * Generic 'turn off all lock debugging' function: - */ -extern int debug_locks_off(void); - -/* - * In the debug case we carry the caller's instruction pointer into - * other functions, but we dont want the function argument overhead - * in the nondebug case - hence these macros: - */ -#define _RET_IP_ (unsigned long)__builtin_return_address(0) -#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) - -#define DEBUG_LOCKS_WARN_ON(c) \ -({ \ - int __ret = 0; \ - \ - if (unlikely(c)) { \ - if (debug_locks_off()) \ - WARN_ON(1); \ - __ret = 1; \ - } \ - __ret; \ -}) - -#ifdef CONFIG_SMP -# define SMP_DEBUG_LOCKS_WARN_ON(c) DEBUG_LOCKS_WARN_ON(c) -#else -# define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_LOCKING_API_SELFTESTS - extern void locking_selftest(void); -#else -# define locking_selftest() do { } while (0) -#endif - -#ifdef CONFIG_LOCKDEP -extern void debug_show_all_locks(void); -extern void debug_show_held_locks(struct task_struct *task); -extern void debug_check_no_locks_freed(const void *from, unsigned long len); -extern void debug_check_no_locks_held(struct task_struct *task); -#else -static inline void debug_show_all_locks(void) -{ -} - -static inline void debug_show_held_locks(struct task_struct *task) -{ -} - -static inline void -debug_check_no_locks_freed(const void *from, unsigned long len) -{ -} - -static inline void -debug_check_no_locks_held(struct task_struct *task) -{ -} -#endif - -#endif diff --git a/include/linux/delay.h b/include/linux/delay.h index 5443e1fbe..868456a62 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -25,15 +25,13 @@ extern unsigned long loops_per_jiffy; #define MAX_UDELAY_MS 5 #endif -#ifndef mdelay -#define mdelay(n) ( \ -{ \ - static int warned=0; \ - unsigned long __ms=(n); \ - WARN_ON(in_irq() && !(warned++)); \ - while (__ms--) udelay(1000); \ -}) -#endif +#define mdelay(n) ( \ + { \ + static int warned=0; \ + unsigned long __ms=(n); \ + WARN_ON(in_irq() && !(warned++)); \ + while (__ms--) udelay(1000); \ + }) #ifndef ndelay #define ndelay(x) udelay(((x)+999)/1000) diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h deleted file mode 100644 index 561e2a778..000000000 --- a/include/linux/delayacct.h +++ /dev/null @@ -1,121 +0,0 @@ -/* delayacct.h - per-task delay accounting - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2006 - * - * 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. - * - */ - -#ifndef _LINUX_DELAYACCT_H -#define _LINUX_DELAYACCT_H - -#include -#include - -/* - * Per-task flags relevant to delay accounting - * maintained privately to avoid exhausting similar flags in sched.h:PF_* - * Used to set current->delays->flags - */ -#define DELAYACCT_PF_SWAPIN 0x00000001 /* I am doing a swapin */ - -#ifdef CONFIG_TASK_DELAY_ACCT - -extern int delayacct_on; /* Delay accounting turned on/off */ -extern kmem_cache_t *delayacct_cache; -extern void delayacct_init(void); -extern void __delayacct_tsk_init(struct task_struct *); -extern void __delayacct_tsk_exit(struct task_struct *); -extern void __delayacct_blkio_start(void); -extern void __delayacct_blkio_end(void); -extern int __delayacct_add_tsk(struct taskstats *, struct task_struct *); -extern __u64 __delayacct_blkio_ticks(struct task_struct *); - -static inline void delayacct_set_flag(int flag) -{ - if (current->delays) - current->delays->flags |= flag; -} - -static inline void delayacct_clear_flag(int flag) -{ - if (current->delays) - current->delays->flags &= ~flag; -} - -static inline void delayacct_tsk_init(struct task_struct *tsk) -{ - /* reinitialize in case parent's non-null pointer was dup'ed*/ - tsk->delays = NULL; - if (delayacct_on) - __delayacct_tsk_init(tsk); -} - -/* Free tsk->delays. Called from bad fork and __put_task_struct - * where there's no risk of tsk->delays being accessed elsewhere - */ -static inline void delayacct_tsk_free(struct task_struct *tsk) -{ - if (tsk->delays) - kmem_cache_free(delayacct_cache, tsk->delays); - tsk->delays = NULL; -} - -static inline void delayacct_blkio_start(void) -{ - if (current->delays) - __delayacct_blkio_start(); -} - -static inline void delayacct_blkio_end(void) -{ - if (current->delays) - __delayacct_blkio_end(); -} - -static inline int delayacct_add_tsk(struct taskstats *d, - struct task_struct *tsk) -{ - if (!delayacct_on || !tsk->delays) - return 0; - return __delayacct_add_tsk(d, tsk); -} - -static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) -{ - if (tsk->delays) - return __delayacct_blkio_ticks(tsk); - return 0; -} - -#else -static inline void delayacct_set_flag(int flag) -{} -static inline void delayacct_clear_flag(int flag) -{} -static inline void delayacct_init(void) -{} -static inline void delayacct_tsk_init(struct task_struct *tsk) -{} -static inline void delayacct_tsk_free(struct task_struct *tsk) -{} -static inline void delayacct_blkio_start(void) -{} -static inline void delayacct_blkio_end(void) -{} -static inline int delayacct_add_tsk(struct taskstats *d, - struct task_struct *tsk) -{ return 0; } -static inline __u64 delayacct_blkio_ticks(struct task_struct *tsk) -{ return 0; } -#endif /* CONFIG_TASK_DELAY_ACCT */ - -#endif diff --git a/include/linux/devfs_fs.h b/include/linux/devfs_fs.h new file mode 100644 index 000000000..de236f431 --- /dev/null +++ b/include/linux/devfs_fs.h @@ -0,0 +1,41 @@ +#ifndef _LINUX_DEVFS_FS_H +#define _LINUX_DEVFS_FS_H + +#include + +#define DEVFSD_PROTOCOL_REVISION_KERNEL 5 + +#define DEVFSD_IOCTL_BASE 'd' + +/* These are the various ioctls */ +#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int) +#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int) +#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int) +#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int) + +#define DEVFSD_NOTIFY_REGISTERED 0 +#define DEVFSD_NOTIFY_UNREGISTERED 1 +#define DEVFSD_NOTIFY_ASYNC_OPEN 2 +#define DEVFSD_NOTIFY_CLOSE 3 +#define DEVFSD_NOTIFY_LOOKUP 4 +#define DEVFSD_NOTIFY_CHANGE 5 +#define DEVFSD_NOTIFY_CREATE 6 +#define DEVFSD_NOTIFY_DELETE 7 + +#define DEVFS_PATHLEN 1024 /* Never change this otherwise the + binary interface will change */ + +struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */ + unsigned int type; /* DEVFSD_NOTIFY_* value */ + unsigned int mode; /* Mode of the inode or device entry */ + unsigned int major; /* Major number of device entry */ + unsigned int minor; /* Minor number of device entry */ + unsigned int uid; /* Uid of process, inode or device entry */ + unsigned int gid; /* Gid of process, inode or device entry */ + unsigned int overrun_count; /* Number of lost events */ + unsigned int namelen; /* Number of characters not including '\0' */ + /* The device name MUST come last */ + char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */ +}; + +#endif /* _LINUX_DEVFS_FS_H */ diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h new file mode 100644 index 000000000..89810e73d --- /dev/null +++ b/include/linux/devfs_fs_kernel.h @@ -0,0 +1,58 @@ +#ifndef _LINUX_DEVFS_FS_KERNEL_H +#define _LINUX_DEVFS_FS_KERNEL_H + +#include +#include +#include +#include + +#include + +#define DEVFS_SUPER_MAGIC 0x1373 + +#ifdef CONFIG_DEVFS_FS +extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) + __attribute__ ((format(printf, 3, 4))); +extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) + __attribute__ ((format(printf, 3, 4))); +extern int devfs_mk_symlink(const char *name, const char *link); +extern int devfs_mk_dir(const char *fmt, ...) + __attribute__ ((format(printf, 1, 2))); +extern void devfs_remove(const char *fmt, ...) + __attribute__ ((format(printf, 1, 2))); +extern int devfs_register_tape(const char *name); +extern void devfs_unregister_tape(int num); +extern void mount_devfs_fs(void); +#else /* CONFIG_DEVFS_FS */ +static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) +{ + return 0; +} +static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) +{ + return 0; +} +static inline int devfs_mk_symlink(const char *name, const char *link) +{ + return 0; +} +static inline int devfs_mk_dir(const char *fmt, ...) +{ + return 0; +} +static inline void devfs_remove(const char *fmt, ...) +{ +} +static inline int devfs_register_tape(const char *name) +{ + return -1; +} +static inline void devfs_unregister_tape(int num) +{ +} +static inline void mount_devfs_fs(void) +{ + return; +} +#endif /* CONFIG_DEVFS_FS */ +#endif /* _LINUX_DEVFS_FS_KERNEL_H */ diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index e3d1c33d1..aee10b2ea 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -8,12 +8,9 @@ #ifndef _LINUX_DEVICE_MAPPER_H #define _LINUX_DEVICE_MAPPER_H -#ifdef __KERNEL__ - struct dm_target; struct dm_table; struct dm_dev; -struct mapped_device; typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; @@ -81,7 +78,7 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d); struct target_type { const char *name; struct module *module; - unsigned version[3]; + unsigned version[3]; dm_ctr_fn ctr; dm_dtr_fn dtr; dm_map_fn map; @@ -131,108 +128,4 @@ struct dm_target { int dm_register_target(struct target_type *t); int dm_unregister_target(struct target_type *t); - -/*----------------------------------------------------------------- - * Functions for creating and manipulating mapped devices. - * Drop the reference with dm_put when you finish with the object. - *---------------------------------------------------------------*/ - -/* - * DM_ANY_MINOR chooses the next available minor number. - */ -#define DM_ANY_MINOR (-1) -int dm_create(int minor, struct mapped_device **md); - -/* - * Reference counting for md. - */ -struct mapped_device *dm_get_md(dev_t dev); -void dm_get(struct mapped_device *md); -void dm_put(struct mapped_device *md); - -/* - * An arbitrary pointer may be stored alongside a mapped device. - */ -void dm_set_mdptr(struct mapped_device *md, void *ptr); -void *dm_get_mdptr(struct mapped_device *md); - -/* - * A device can still be used while suspended, but I/O is deferred. - */ -int dm_suspend(struct mapped_device *md, int with_lockfs); -int dm_resume(struct mapped_device *md); - -/* - * Event functions. - */ -uint32_t dm_get_event_nr(struct mapped_device *md); -int dm_wait_event(struct mapped_device *md, int event_nr); - -/* - * Info functions. - */ -const char *dm_device_name(struct mapped_device *md); -struct gendisk *dm_disk(struct mapped_device *md); -int dm_suspended(struct mapped_device *md); - -/* - * Geometry functions. - */ -int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); -int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); - - -/*----------------------------------------------------------------- - * Functions for manipulating device-mapper tables. - *---------------------------------------------------------------*/ - -/* - * First create an empty table. - */ -int dm_table_create(struct dm_table **result, int mode, - unsigned num_targets, struct mapped_device *md); - -/* - * Then call this once for each target. - */ -int dm_table_add_target(struct dm_table *t, const char *type, - sector_t start, sector_t len, char *params); - -/* - * Finally call this to make the table ready for use. - */ -int dm_table_complete(struct dm_table *t); - -/* - * Table reference counting. - */ -struct dm_table *dm_get_table(struct mapped_device *md); -void dm_table_get(struct dm_table *t); -void dm_table_put(struct dm_table *t); - -/* - * Queries - */ -sector_t dm_table_get_size(struct dm_table *t); -unsigned int dm_table_get_num_targets(struct dm_table *t); -int dm_table_get_mode(struct dm_table *t); -struct mapped_device *dm_table_get_md(struct dm_table *t); - -/* - * Trigger an event. - */ -void dm_table_event(struct dm_table *t); - -/* - * The device must be suspended before calling this method. - */ -int dm_swap_table(struct mapped_device *md, struct dm_table *t); - -/* - * Prepare a table for a device that will error all I/O. - * To make it active, call dm_suspend(), dm_swap_table() then dm_resume(). - */ -int dm_create_error_table(struct dm_table **result, struct mapped_device *md); - -#endif /* __KERNEL__ */ -#endif /* _LINUX_DEVICE_MAPPER_H */ +#endif /* _LINUX_DEVICE_MAPPER_H */ diff --git a/include/linux/device.h b/include/linux/device.h index 1e5f30da9..e8e53b9ac 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -11,6 +11,7 @@ #ifndef _DEVICE_H_ #define _DEVICE_H_ +#include #include #include #include @@ -60,6 +61,11 @@ extern void bus_unregister(struct bus_type * bus); extern void bus_rescan_devices(struct bus_type * bus); +extern struct bus_type * get_bus(struct bus_type * bus); +extern void put_bus(struct bus_type * bus); + +extern struct bus_type * find_bus(char * name); + /* iterator helpers for buses */ int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, @@ -142,7 +148,6 @@ struct class { struct subsystem subsys; struct list_head children; - struct list_head devices; struct list_head interfaces; struct semaphore sem; /* locks both the children and interfaces lists */ @@ -159,6 +164,9 @@ struct class { extern int class_register(struct class *); extern void class_unregister(struct class *); +extern struct class * class_get(struct class *); +extern void class_put(struct class *); + struct class_attribute { struct attribute attr; @@ -306,7 +314,6 @@ struct device { struct kobject kobj; char bus_id[BUS_ID_SIZE]; /* position on parent bus */ struct device_attribute uevent_attr; - struct device_attribute *devt_attr; struct semaphore sem; /* semaphore to synchronize calls to * its driver. @@ -334,11 +341,6 @@ struct device { struct dma_coherent_mem *dma_mem; /* internal for coherent mem override */ - /* class_device migration path */ - struct list_head node; - struct class *class; /* optional*/ - dev_t devt; /* dev_t, creates the sysfs "dev" */ - void (*release)(struct device * dev); }; @@ -380,13 +382,6 @@ extern int device_attach(struct device * dev); extern void driver_attach(struct device_driver * drv); extern void device_reprobe(struct device *dev); -/* - * Easy functions for dynamically creating devices on the fly - */ -extern struct device *device_create(struct class *cls, struct device *parent, - dev_t devt, char *fmt, ...) - __attribute__((format(printf,4,5))); -extern void device_destroy(struct class *cls, dev_t devt); /* * Platform "fixup" functions - allow the platform to have their say @@ -416,9 +411,8 @@ extern int firmware_register(struct subsystem *); extern void firmware_unregister(struct subsystem *); /* debugging and troubleshooting/diagnostic helpers. */ -extern const char *dev_driver_string(struct device *dev); #define dev_printk(level, dev, format, arg...) \ - printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg) + printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg) #ifdef DEBUG #define dev_dbg(dev, format, arg...) \ diff --git a/include/linux/divert.h b/include/linux/divert.h index 8fb4e9de6..6919b0913 100644 --- a/include/linux/divert.h +++ b/include/linux/divert.h @@ -27,10 +27,10 @@ struct divert_blk { int divert; /* are we active */ unsigned int protos; /* protocols */ - __u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ - __u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ - __u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ - __u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ + u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */ + u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */ + u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */ + u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */ }; /* @@ -40,12 +40,12 @@ struct divert_blk typedef union _divert_cf_arg { - __s16 int16; - __u16 uint16; - __s32 int32; - __u32 uint32; - __s64 int64; - __u64 uint64; + s16 int16; + u16 uint16; + s32 int32; + u32 uint32; + s64 int64; + u64 uint64; void __user *ptr; } divert_cf_arg; diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 9623bb625..c67c67866 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h @@ -285,9 +285,9 @@ typedef char ioctl_struct[308]; #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 7 +#define DM_VERSION_MINOR 6 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2006-06-24)" +#define DM_VERSION_EXTRA "-ioctl (2006-02-17)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ @@ -314,7 +314,7 @@ typedef char ioctl_struct[308]; #define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */ /* - * This flag is now ignored. + * Set this to improve performance when you aren't going to use open_count. */ #define DM_SKIP_BDGET_FLAG (1 << 9) /* In */ diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h deleted file mode 100644 index c94d8f1d6..000000000 --- a/include/linux/dmaengine.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef DMAENGINE_H -#define DMAENGINE_H - -#ifdef CONFIG_DMA_ENGINE - -#include -#include -#include -#include -#include - -/** - * enum dma_event - resource PNP/power managment events - * @DMA_RESOURCE_SUSPEND: DMA device going into low power state - * @DMA_RESOURCE_RESUME: DMA device returning to full power - * @DMA_RESOURCE_ADDED: DMA device added to the system - * @DMA_RESOURCE_REMOVED: DMA device removed from the system - */ -enum dma_event { - DMA_RESOURCE_SUSPEND, - DMA_RESOURCE_RESUME, - DMA_RESOURCE_ADDED, - DMA_RESOURCE_REMOVED, -}; - -/** - * typedef dma_cookie_t - an opaque DMA cookie - * - * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code - */ -typedef s32 dma_cookie_t; - -#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) - -/** - * enum dma_status - DMA transaction status - * @DMA_SUCCESS: transaction completed successfully - * @DMA_IN_PROGRESS: transaction not yet processed - * @DMA_ERROR: transaction failed - */ -enum dma_status { - DMA_SUCCESS, - DMA_IN_PROGRESS, - DMA_ERROR, -}; - -/** - * struct dma_chan_percpu - the per-CPU part of struct dma_chan - * @refcount: local_t used for open-coded "bigref" counting - * @memcpy_count: transaction counter - * @bytes_transferred: byte counter - */ - -struct dma_chan_percpu { - local_t refcount; - /* stats */ - unsigned long memcpy_count; - unsigned long bytes_transferred; -}; - -/** - * struct dma_chan - devices supply DMA channels, clients use them - * @client: ptr to the client user of this chan, will be %NULL when unused - * @device: ptr to the dma device who supplies this channel, always !%NULL - * @cookie: last cookie value returned to client - * @chan_id: channel ID for sysfs - * @class_dev: class device for sysfs - * @refcount: kref, used in "bigref" slow-mode - * @slow_ref: indicates that the DMA channel is free - * @rcu: the DMA channel's RCU head - * @client_node: used to add this to the client chan list - * @device_node: used to add this to the device chan list - * @local: per-cpu pointer to a struct dma_chan_percpu - */ -struct dma_chan { - struct dma_client *client; - struct dma_device *device; - dma_cookie_t cookie; - - /* sysfs */ - int chan_id; - struct class_device class_dev; - - struct kref refcount; - int slow_ref; - struct rcu_head rcu; - - struct list_head client_node; - struct list_head device_node; - struct dma_chan_percpu *local; -}; - -void dma_chan_cleanup(struct kref *kref); - -static inline void dma_chan_get(struct dma_chan *chan) -{ - if (unlikely(chan->slow_ref)) - kref_get(&chan->refcount); - else { - local_inc(&(per_cpu_ptr(chan->local, get_cpu())->refcount)); - put_cpu(); - } -} - -static inline void dma_chan_put(struct dma_chan *chan) -{ - if (unlikely(chan->slow_ref)) - kref_put(&chan->refcount, dma_chan_cleanup); - else { - local_dec(&(per_cpu_ptr(chan->local, get_cpu())->refcount)); - put_cpu(); - } -} - -/* - * typedef dma_event_callback - function pointer to a DMA event callback - */ -typedef void (*dma_event_callback) (struct dma_client *client, - struct dma_chan *chan, enum dma_event event); - -/** - * struct dma_client - info on the entity making use of DMA services - * @event_callback: func ptr to call when something happens - * @chan_count: number of chans allocated - * @chans_desired: number of chans requested. Can be +/- chan_count - * @lock: protects access to the channels list - * @channels: the list of DMA channels allocated - * @global_node: list_head for global dma_client_list - */ -struct dma_client { - dma_event_callback event_callback; - unsigned int chan_count; - unsigned int chans_desired; - - spinlock_t lock; - struct list_head channels; - struct list_head global_node; -}; - -/** - * struct dma_device - info on the entity supplying DMA services - * @chancnt: how many DMA channels are supported - * @channels: the list of struct dma_chan - * @global_node: list_head for global dma_device_list - * @refcount: reference count - * @done: IO completion struct - * @dev_id: unique device ID - * @device_alloc_chan_resources: allocate resources and return the - * number of allocated descriptors - * @device_free_chan_resources: release DMA channel's resources - * @device_memcpy_buf_to_buf: memcpy buf pointer to buf pointer - * @device_memcpy_buf_to_pg: memcpy buf pointer to struct page - * @device_memcpy_pg_to_pg: memcpy struct page/offset to struct page/offset - * @device_memcpy_complete: poll the status of an IOAT DMA transaction - * @device_memcpy_issue_pending: push appended descriptors to hardware - */ -struct dma_device { - - unsigned int chancnt; - struct list_head channels; - struct list_head global_node; - - struct kref refcount; - struct completion done; - - int dev_id; - - int (*device_alloc_chan_resources)(struct dma_chan *chan); - void (*device_free_chan_resources)(struct dma_chan *chan); - dma_cookie_t (*device_memcpy_buf_to_buf)(struct dma_chan *chan, - void *dest, void *src, size_t len); - dma_cookie_t (*device_memcpy_buf_to_pg)(struct dma_chan *chan, - struct page *page, unsigned int offset, void *kdata, - size_t len); - dma_cookie_t (*device_memcpy_pg_to_pg)(struct dma_chan *chan, - struct page *dest_pg, unsigned int dest_off, - struct page *src_pg, unsigned int src_off, size_t len); - enum dma_status (*device_memcpy_complete)(struct dma_chan *chan, - dma_cookie_t cookie, dma_cookie_t *last, - dma_cookie_t *used); - void (*device_memcpy_issue_pending)(struct dma_chan *chan); -}; - -/* --- public DMA engine API --- */ - -struct dma_client *dma_async_client_register(dma_event_callback event_callback); -void dma_async_client_unregister(struct dma_client *client); -void dma_async_client_chan_request(struct dma_client *client, - unsigned int number); - -/** - * dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses - * @chan: DMA channel to offload copy to - * @dest: destination address (virtual) - * @src: source address (virtual) - * @len: length - * - * Both @dest and @src must be mappable to a bus address according to the - * DMA mapping API rules for streaming mappings. - * Both @dest and @src must stay memory resident (kernel memory or locked - * user space pages). - */ -static inline dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, - void *dest, void *src, size_t len) -{ - int cpu = get_cpu(); - per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; - per_cpu_ptr(chan->local, cpu)->memcpy_count++; - put_cpu(); - - return chan->device->device_memcpy_buf_to_buf(chan, dest, src, len); -} - -/** - * dma_async_memcpy_buf_to_pg - offloaded copy from address to page - * @chan: DMA channel to offload copy to - * @page: destination page - * @offset: offset in page to copy to - * @kdata: source address (virtual) - * @len: length - * - * Both @page/@offset and @kdata must be mappable to a bus address according - * to the DMA mapping API rules for streaming mappings. - * Both @page/@offset and @kdata must stay memory resident (kernel memory or - * locked user space pages) - */ -static inline dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, - struct page *page, unsigned int offset, void *kdata, size_t len) -{ - int cpu = get_cpu(); - per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; - per_cpu_ptr(chan->local, cpu)->memcpy_count++; - put_cpu(); - - return chan->device->device_memcpy_buf_to_pg(chan, page, offset, - kdata, len); -} - -/** - * dma_async_memcpy_pg_to_pg - offloaded copy from page to page - * @chan: DMA channel to offload copy to - * @dest_pg: destination page - * @dest_off: offset in page to copy to - * @src_pg: source page - * @src_off: offset in page to copy from - * @len: length - * - * Both @dest_page/@dest_off and @src_page/@src_off must be mappable to a bus - * address according to the DMA mapping API rules for streaming mappings. - * Both @dest_page/@dest_off and @src_page/@src_off must stay memory resident - * (kernel memory or locked user space pages). - */ -static inline dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, - struct page *dest_pg, unsigned int dest_off, struct page *src_pg, - unsigned int src_off, size_t len) -{ - int cpu = get_cpu(); - per_cpu_ptr(chan->local, cpu)->bytes_transferred += len; - per_cpu_ptr(chan->local, cpu)->memcpy_count++; - put_cpu(); - - return chan->device->device_memcpy_pg_to_pg(chan, dest_pg, dest_off, - src_pg, src_off, len); -} - -/** - * dma_async_memcpy_issue_pending - flush pending copies to HW - * @chan: target DMA channel - * - * This allows drivers to push copies to HW in batches, - * reducing MMIO writes where possible. - */ -static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan) -{ - return chan->device->device_memcpy_issue_pending(chan); -} - -/** - * dma_async_memcpy_complete - poll for transaction completion - * @chan: DMA channel - * @cookie: transaction identifier to check status of - * @last: returns last completed cookie, can be NULL - * @used: returns last issued cookie, can be NULL - * - * If @last and @used are passed in, upon return they reflect the driver - * internal state and can be used with dma_async_is_complete() to check - * the status of multiple cookies without re-checking hardware state. - */ -static inline enum dma_status dma_async_memcpy_complete(struct dma_chan *chan, - dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used) -{ - return chan->device->device_memcpy_complete(chan, cookie, last, used); -} - -/** - * dma_async_is_complete - test a cookie against chan state - * @cookie: transaction identifier to test status of - * @last_complete: last know completed transaction - * @last_used: last cookie value handed out - * - * dma_async_is_complete() is used in dma_async_memcpy_complete() - * the test logic is seperated for lightweight testing of multiple cookies - */ -static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie, - dma_cookie_t last_complete, dma_cookie_t last_used) -{ - if (last_complete <= last_used) { - if ((cookie <= last_complete) || (cookie > last_used)) - return DMA_SUCCESS; - } else { - if ((cookie <= last_complete) && (cookie > last_used)) - return DMA_SUCCESS; - } - return DMA_IN_PROGRESS; -} - - -/* --- DMA device --- */ - -int dma_async_device_register(struct dma_device *device); -void dma_async_device_unregister(struct dma_device *device); - -/* --- Helper iov-locking functions --- */ - -struct dma_page_list { - char *base_address; - int nr_pages; - struct page **pages; -}; - -struct dma_pinned_list { - int nr_iovecs; - struct dma_page_list page_list[0]; -}; - -struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len); -void dma_unpin_iovec_pages(struct dma_pinned_list* pinned_list); - -dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov, - struct dma_pinned_list *pinned_list, unsigned char *kdata, size_t len); -dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov, - struct dma_pinned_list *pinned_list, struct page *page, - unsigned int offset, size_t len); - -#endif /* CONFIG_DMA_ENGINE */ -#endif /* DMAENGINE_H */ diff --git a/include/linux/dmi.h b/include/linux/dmi.h index b2cd2071d..64fd6c366 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h @@ -2,6 +2,7 @@ #define __DMI_H__ #include +#include enum dmi_field { DMI_NONE, diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h index 102a902b4..f134a0197 100644 --- a/include/linux/dnotify.h +++ b/include/linux/dnotify.h @@ -18,6 +18,7 @@ struct dnotify_struct { #ifdef __KERNEL__ +#include #ifdef CONFIG_DNOTIFY diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h index 527504c11..2fda1b2aa 100644 --- a/include/linux/dqblk_xfs.h +++ b/include/linux/dqblk_xfs.h @@ -125,14 +125,14 @@ typedef struct fs_disk_quota { /* * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. - * Provides a centralized way to get meta information about the quota subsystem. + * Provides a centralized way to get meta infomation about the quota subsystem. * eg. space taken up for user and group quotas, number of dquots currently * incore. */ #define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */ /* - * Some basic information about 'quota files'. + * Some basic infomation about 'quota files'. */ typedef struct fs_qfilestat { __u64 qfs_ino; /* inode number */ diff --git a/include/linux/dvb/Kbuild b/include/linux/dvb/Kbuild deleted file mode 100644 index d97b3a51e..000000000 --- a/include/linux/dvb/Kbuild +++ /dev/null @@ -1,9 +0,0 @@ -header-y += ca.h -header-y += frontend.h -header-y += net.h -header-y += osd.h -header-y += version.h - -unifdef-y += audio.h -unifdef-y += dmx.h -unifdef-y += video.h diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index c6a2353c4..2787b8a22 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h @@ -88,6 +88,20 @@ typedef enum #define DMX_PES_PCR DMX_PES_PCR0 +typedef enum +{ + DMX_SCRAMBLING_EV, + DMX_FRONTEND_EV +} dmx_event_t; + + +typedef enum +{ + DMX_SCRAMBLING_OFF, + DMX_SCRAMBLING_ON +} dmx_scrambling_status_t; + + typedef struct dmx_filter { __u8 filter[DMX_FILTER_SIZE]; @@ -118,6 +132,17 @@ struct dmx_pes_filter_params __u32 flags; }; + +struct dmx_event +{ + dmx_event_t event; + time_t timeStamp; + union + { + dmx_scrambling_status_t scrambling; + } u; +}; + typedef struct dmx_caps { __u32 caps; int num_decoders; @@ -146,6 +171,7 @@ struct dmx_stc { #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) #define DMX_SET_BUFFER_SIZE _IO('o', 45) +#define DMX_GET_EVENT _IOR('o', 46, struct dmx_event) #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) diff --git a/include/linux/efi.h b/include/linux/efi.h index 66d621dbc..e203613d3 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -294,7 +294,6 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos 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 u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size, u64 attr); extern int __init efi_uart_console_only (void); diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 278ef4495..fbfa6b52e 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h @@ -38,7 +38,7 @@ struct statfs; extern struct inode_operations efs_dir_inode_operations; extern const struct file_operations efs_dir_operations; -extern const struct address_space_operations efs_symlink_aops; +extern struct address_space_operations efs_symlink_aops; extern void efs_read_inode(struct inode *); extern efs_block_t efs_map_block(struct inode *, efs_block_t); diff --git a/include/linux/elf-em.h b/include/linux/elf-em.h deleted file mode 100644 index 6a5796c81..000000000 --- a/include/linux/elf-em.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _LINUX_ELF_EM_H -#define _LINUX_ELF_EM_H - -/* These constants define the various ELF target machines */ -#define EM_NONE 0 -#define EM_M32 1 -#define EM_SPARC 2 -#define EM_386 3 -#define EM_68K 4 -#define EM_88K 5 -#define EM_486 6 /* Perhaps disused */ -#define EM_860 7 -#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ - /* Next two are historical and binaries and - modules of these types will be rejected by - Linux. */ -#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ - -#define EM_PARISC 15 /* HPPA */ -#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ -#define EM_PPC 20 /* PowerPC */ -#define EM_PPC64 21 /* PowerPC64 */ -#define EM_SH 42 /* SuperH */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit */ -#define EM_IA_64 50 /* HP/Intel IA-64 */ -#define EM_X86_64 62 /* AMD x86-64 */ -#define EM_S390 22 /* IBM S/390 */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ -#define EM_V850 87 /* NEC v850 */ -#define EM_M32R 88 /* Renesas M32R */ -#define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ -#define EM_FRV 0x5441 /* Fujitsu FR-V */ - -/* - * This is an interim value that we will use until the committee comes - * up with a final number. - */ -#define EM_ALPHA 0x9026 - -/* Bogus old v850 magic number, used by old tools. */ -#define EM_CYGNUS_V850 0x9080 -/* Bogus old m32r magic number, used by old tools. */ -#define EM_CYGNUS_M32R 0x9041 -/* This is the old interim value for S/390 architecture */ -#define EM_S390_OLD 0xA390 - - -#endif /* _LINUX_ELF_EM_H */ diff --git a/include/linux/elf.h b/include/linux/elf.h index b70d1d2c8..d3bfacb24 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -3,7 +3,6 @@ #include #include -#include #include #ifndef elf_read_implies_exec @@ -56,6 +55,64 @@ typedef __s64 Elf64_Sxword; #define ET_LOPROC 0xff00 #define ET_HIPROC 0xffff +/* These constants define the various ELF target machines */ +#define EM_NONE 0 +#define EM_M32 1 +#define EM_SPARC 2 +#define EM_386 3 +#define EM_68K 4 +#define EM_88K 5 +#define EM_486 6 /* Perhaps disused */ +#define EM_860 7 + +#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ + +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ + +#define EM_PARISC 15 /* HPPA */ + +#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ + +#define EM_PPC 20 /* PowerPC */ +#define EM_PPC64 21 /* PowerPC64 */ + +#define EM_SH 42 /* SuperH */ + +#define EM_SPARCV9 43 /* SPARC v9 64-bit */ + +#define EM_IA_64 50 /* HP/Intel IA-64 */ + +#define EM_X86_64 62 /* AMD x86-64 */ + +#define EM_S390 22 /* IBM S/390 */ + +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ + +#define EM_V850 87 /* NEC v850 */ + +#define EM_M32R 88 /* Renesas M32R */ + +#define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ + +/* + * This is an interim value that we will use until the committee comes + * up with a final number. + */ +#define EM_ALPHA 0x9026 + +/* Bogus old v850 magic number, used by old tools. */ +#define EM_CYGNUS_V850 0x9080 + +/* Bogus old m32r magic number, used by old tools. */ +#define EM_CYGNUS_M32R 0x9041 + +/* + * This is the old interim value for S/390 architecture + */ +#define EM_S390_OLD 0xA390 + +#define EM_FRV 0x5441 /* Fujitsu FR-V */ + /* This is the info that is needed to parse the dynamic section of the file */ #define DT_NULL 0 #define DT_NEEDED 1 diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 9631dddae..0cf0bea01 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h @@ -60,16 +60,6 @@ struct elf_prstatus long pr_instr; /* Current instruction */ #endif elf_gregset_t pr_reg; /* GP registers */ -#ifdef CONFIG_BINFMT_ELF_FDPIC - /* When using FDPIC, the loadmap addresses need to be communicated - * to GDB in order for GDB to do the necessary relocations. The - * fields (below) used to communicate this information are placed - * immediately after ``pr_reg'', so that the loadmap addresses may - * be viewed as part of the register set if so desired. - */ - unsigned long pr_exec_fdpic_loadmap; - unsigned long pr_interp_fdpic_loadmap; -#endif int pr_fpvalid; /* True if math co-processor being used. */ }; diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h deleted file mode 100644 index 67396db14..000000000 --- a/include/linux/elfnote.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef _LINUX_ELFNOTE_H -#define _LINUX_ELFNOTE_H -/* - * Helper macros to generate ELF Note structures, which are put into a - * PT_NOTE segment of the final vmlinux image. These are useful for - * including name-value pairs of metadata into the kernel binary (or - * modules?) for use by external programs. - * - * Each note has three parts: a name, a type and a desc. The name is - * intended to distinguish the note's originator, so it would be a - * company, project, subsystem, etc; it must be in a suitable form for - * use in a section name. The type is an integer which is used to tag - * the data, and is considered to be within the "name" namespace (so - * "FooCo"'s type 42 is distinct from "BarProj"'s type 42). The - * "desc" field is the actual data. There are no constraints on the - * desc field's contents, though typically they're fairly small. - * - * All notes from a given NAME are put into a section named - * .note.NAME. When the kernel image is finally linked, all the notes - * are packed into a single .notes section, which is mapped into the - * PT_NOTE segment. Because notes for a given name are grouped into - * the same section, they'll all be adjacent the output file. - * - * This file defines macros for both C and assembler use. Their - * syntax is slightly different, but they're semantically similar. - * - * See the ELF specification for more detail about ELF notes. - */ - -#ifdef __ASSEMBLER__ -/* - * Generate a structure with the same shape as Elf{32,64}_Nhdr (which - * turn out to be the same size and shape), followed by the name and - * desc data with appropriate padding. The 'desctype' argument is the - * assembler pseudo op defining the type of the data e.g. .asciz while - * 'descdata' is the data itself e.g. "hello, world". - * - * e.g. ELFNOTE(XYZCo, 42, .asciz, "forty-two") - * ELFNOTE(XYZCo, 12, .long, 0xdeadbeef) - */ -#define ELFNOTE(name, type, desctype, descdata) \ -.pushsection .note.name ; \ - .align 4 ; \ - .long 2f - 1f /* namesz */ ; \ - .long 4f - 3f /* descsz */ ; \ - .long type ; \ -1:.asciz "name" ; \ -2:.align 4 ; \ -3:desctype descdata ; \ -4:.align 4 ; \ -.popsection ; -#else /* !__ASSEMBLER__ */ -#include -/* - * Use an anonymous structure which matches the shape of - * Elf{32,64}_Nhdr, but includes the name and desc data. The size and - * type of name and desc depend on the macro arguments. "name" must - * be a literal string, and "desc" must be passed by value. You may - * only define one note per line, since __LINE__ is used to generate - * unique symbols. - */ -#define _ELFNOTE_PASTE(a,b) a##b -#define _ELFNOTE(size, name, unique, type, desc) \ - static const struct { \ - struct elf##size##_note _nhdr; \ - unsigned char _name[sizeof(name)] \ - __attribute__((aligned(sizeof(Elf##size##_Word)))); \ - typeof(desc) _desc \ - __attribute__((aligned(sizeof(Elf##size##_Word)))); \ - } _ELFNOTE_PASTE(_note_, unique) \ - __attribute_used__ \ - __attribute__((section(".note." name), \ - aligned(sizeof(Elf##size##_Word)), \ - unused)) = { \ - { \ - sizeof(name), \ - sizeof(desc), \ - type, \ - }, \ - name, \ - desc \ - } -#define ELFNOTE(size, name, type, desc) \ - _ELFNOTE(size, name, __LINE__, type, desc) - -#define ELFNOTE32(name, type, desc) ELFNOTE(32, name, type, desc) -#define ELFNOTE64(name, type, desc) ELFNOTE(64, name, type, desc) -#endif /* __ASSEMBLER__ */ - -#endif /* _LINUX_ELFNOTE_H */ diff --git a/include/linux/err.h b/include/linux/err.h index cd3b367f7..ff71d2af5 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -13,9 +13,7 @@ * This should be a per-architecture thing, to allow different * error and pointer decisions. */ -#define MAX_ERRNO 4095 - -#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) static inline void *ERR_PTR(long error) { diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 408118a07..174582fed 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h @@ -21,6 +21,7 @@ struct sock_extended_err #ifdef __KERNEL__ +#include #include #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #include diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 745c98835..e4b09d2a2 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -92,9 +92,8 @@ static inline int is_broadcast_ether_addr(const u8 *addr) */ static inline int is_valid_ether_addr(const u8 *addr) { - /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to - * explicitly check for it here. */ - return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); + return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr) && + !is_broadcast_ether_addr(addr); } /** diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c6310aef5..9269df738 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -15,24 +15,24 @@ /* This should work for both 32 and 64 bit userland. */ struct ethtool_cmd { - __u32 cmd; - __u32 supported; /* Features this interface supports */ - __u32 advertising; /* Features this interface advertises */ - __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ - __u8 duplex; /* Duplex, half or full */ - __u8 port; /* Which connector port */ - __u8 phy_address; - __u8 transceiver; /* Which transceiver to use */ - __u8 autoneg; /* Enable or disable autonegotiation */ - __u32 maxtxpkt; /* Tx pkts before generating tx int */ - __u32 maxrxpkt; /* Rx pkts before generating rx int */ - __u32 reserved[4]; + u32 cmd; + u32 supported; /* Features this interface supports */ + u32 advertising; /* Features this interface advertises */ + u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ + u8 duplex; /* Duplex, half or full */ + u8 port; /* Which connector port */ + u8 phy_address; + u8 transceiver; /* Which transceiver to use */ + u8 autoneg; /* Enable or disable autonegotiation */ + u32 maxtxpkt; /* Tx pkts before generating tx int */ + u32 maxrxpkt; /* Rx pkts before generating rx int */ + u32 reserved[4]; }; #define ETHTOOL_BUSINFO_LEN 32 /* these strings are set to whatever the driver author decides... */ struct ethtool_drvinfo { - __u32 cmd; + u32 cmd; char driver[32]; /* driver short name, "tulip", "eepro100" */ char version[32]; /* driver version string */ char fw_version[32]; /* firmware version string, if applicable */ @@ -40,53 +40,53 @@ struct ethtool_drvinfo { /* For PCI devices, use pci_name(pci_dev). */ char reserved1[32]; char reserved2[16]; - __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ - __u32 testinfo_len; - __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ - __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ + u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ + u32 testinfo_len; + u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ + u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ }; #define SOPASS_MAX 6 /* wake-on-lan settings */ struct ethtool_wolinfo { - __u32 cmd; - __u32 supported; - __u32 wolopts; - __u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */ + u32 cmd; + u32 supported; + u32 wolopts; + u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */ }; /* for passing single values */ struct ethtool_value { - __u32 cmd; - __u32 data; + u32 cmd; + u32 data; }; /* for passing big chunks of data */ struct ethtool_regs { - __u32 cmd; - __u32 version; /* driver-specific, indicates different chips/revs */ - __u32 len; /* bytes */ - __u8 data[0]; + u32 cmd; + u32 version; /* driver-specific, indicates different chips/revs */ + u32 len; /* bytes */ + u8 data[0]; }; /* for passing EEPROM chunks */ struct ethtool_eeprom { - __u32 cmd; - __u32 magic; - __u32 offset; /* in bytes */ - __u32 len; /* in bytes */ - __u8 data[0]; + u32 cmd; + u32 magic; + u32 offset; /* in bytes */ + u32 len; /* in bytes */ + u8 data[0]; }; /* for configuring coalescing parameters of chip */ struct ethtool_coalesce { - __u32 cmd; /* ETHTOOL_{G,S}COALESCE */ + u32 cmd; /* ETHTOOL_{G,S}COALESCE */ /* How many usecs to delay an RX interrupt after * a packet arrives. If 0, only rx_max_coalesced_frames * is used. */ - __u32 rx_coalesce_usecs; + u32 rx_coalesce_usecs; /* How many packets to delay an RX interrupt after * a packet arrives. If 0, only rx_coalesce_usecs is @@ -94,21 +94,21 @@ struct ethtool_coalesce { * to zero as this would cause RX interrupts to never be * generated. */ - __u32 rx_max_coalesced_frames; + u32 rx_max_coalesced_frames; /* Same as above two parameters, except that these values * apply while an IRQ is being serviced by the host. Not * all cards support this feature and the values are ignored * in that case. */ - __u32 rx_coalesce_usecs_irq; - __u32 rx_max_coalesced_frames_irq; + u32 rx_coalesce_usecs_irq; + u32 rx_max_coalesced_frames_irq; /* How many usecs to delay a TX interrupt after * a packet is sent. If 0, only tx_max_coalesced_frames * is used. */ - __u32 tx_coalesce_usecs; + u32 tx_coalesce_usecs; /* How many packets to delay a TX interrupt after * a packet is sent. If 0, only tx_coalesce_usecs is @@ -116,22 +116,22 @@ struct ethtool_coalesce { * to zero as this would cause TX interrupts to never be * generated. */ - __u32 tx_max_coalesced_frames; + u32 tx_max_coalesced_frames; /* Same as above two parameters, except that these values * apply while an IRQ is being serviced by the host. Not * all cards support this feature and the values are ignored * in that case. */ - __u32 tx_coalesce_usecs_irq; - __u32 tx_max_coalesced_frames_irq; + u32 tx_coalesce_usecs_irq; + u32 tx_max_coalesced_frames_irq; /* How many usecs to delay in-memory statistics * block updates. Some drivers do not have an in-memory * statistic block, and in such cases this value is ignored. * This value must not be zero. */ - __u32 stats_block_coalesce_usecs; + u32 stats_block_coalesce_usecs; /* Adaptive RX/TX coalescing is an algorithm implemented by * some drivers to improve latency under low packet rates and @@ -140,18 +140,18 @@ struct ethtool_coalesce { * not implemented by the driver causes these values to be * silently ignored. */ - __u32 use_adaptive_rx_coalesce; - __u32 use_adaptive_tx_coalesce; + u32 use_adaptive_rx_coalesce; + u32 use_adaptive_tx_coalesce; /* When the packet rate (measured in packets per second) * is below pkt_rate_low, the {rx,tx}_*_low parameters are * used. */ - __u32 pkt_rate_low; - __u32 rx_coalesce_usecs_low; - __u32 rx_max_coalesced_frames_low; - __u32 tx_coalesce_usecs_low; - __u32 tx_max_coalesced_frames_low; + u32 pkt_rate_low; + u32 rx_coalesce_usecs_low; + u32 rx_max_coalesced_frames_low; + u32 tx_coalesce_usecs_low; + u32 tx_max_coalesced_frames_low; /* When the packet rate is below pkt_rate_high but above * pkt_rate_low (both measured in packets per second) the @@ -162,43 +162,43 @@ struct ethtool_coalesce { * is above pkt_rate_high, the {rx,tx}_*_high parameters are * used. */ - __u32 pkt_rate_high; - __u32 rx_coalesce_usecs_high; - __u32 rx_max_coalesced_frames_high; - __u32 tx_coalesce_usecs_high; - __u32 tx_max_coalesced_frames_high; + u32 pkt_rate_high; + u32 rx_coalesce_usecs_high; + u32 rx_max_coalesced_frames_high; + u32 tx_coalesce_usecs_high; + u32 tx_max_coalesced_frames_high; /* How often to do adaptive coalescing packet rate sampling, * measured in seconds. Must not be zero. */ - __u32 rate_sample_interval; + u32 rate_sample_interval; }; /* for configuring RX/TX ring parameters */ struct ethtool_ringparam { - __u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */ + u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */ /* Read only attributes. These indicate the maximum number * of pending RX/TX ring entries the driver will allow the * user to set. */ - __u32 rx_max_pending; - __u32 rx_mini_max_pending; - __u32 rx_jumbo_max_pending; - __u32 tx_max_pending; + u32 rx_max_pending; + u32 rx_mini_max_pending; + u32 rx_jumbo_max_pending; + u32 tx_max_pending; /* Values changeable by the user. The valid values are * in the range 1 to the "*_max_pending" counterpart above. */ - __u32 rx_pending; - __u32 rx_mini_pending; - __u32 rx_jumbo_pending; - __u32 tx_pending; + u32 rx_pending; + u32 rx_mini_pending; + u32 rx_jumbo_pending; + u32 tx_pending; }; /* for configuring link flow control parameters */ struct ethtool_pauseparam { - __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ + u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ /* If the link is being auto-negotiated (via ethtool_cmd.autoneg * being true) the user may set 'autonet' here non-zero to have the @@ -210,9 +210,9 @@ struct ethtool_pauseparam { * then {rx,tx}_pause force the driver to use/not-use pause * flow control. */ - __u32 autoneg; - __u32 rx_pause; - __u32 tx_pause; + u32 autoneg; + u32 rx_pause; + u32 tx_pause; }; #define ETH_GSTRING_LEN 32 @@ -223,10 +223,10 @@ enum ethtool_stringset { /* for passing string sets for data tagging */ struct ethtool_gstrings { - __u32 cmd; /* ETHTOOL_GSTRINGS */ - __u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ - __u32 len; /* number of strings in the string set */ - __u8 data[0]; + u32 cmd; /* ETHTOOL_GSTRINGS */ + u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ + u32 len; /* number of strings in the string set */ + u8 data[0]; }; enum ethtool_test_flags { @@ -236,28 +236,26 @@ enum ethtool_test_flags { /* for requesting NIC test and getting results*/ struct ethtool_test { - __u32 cmd; /* ETHTOOL_TEST */ - __u32 flags; /* ETH_TEST_FL_xxx */ - __u32 reserved; - __u32 len; /* result length, in number of u64 elements */ - __u64 data[0]; + u32 cmd; /* ETHTOOL_TEST */ + u32 flags; /* ETH_TEST_FL_xxx */ + u32 reserved; + u32 len; /* result length, in number of u64 elements */ + u64 data[0]; }; /* for dumping NIC-specific statistics */ struct ethtool_stats { - __u32 cmd; /* ETHTOOL_GSTATS */ - __u32 n_stats; /* number of u64's being returned */ - __u64 data[0]; + u32 cmd; /* ETHTOOL_GSTATS */ + u32 n_stats; /* number of u64's being returned */ + u64 data[0]; }; struct ethtool_perm_addr { - __u32 cmd; /* ETHTOOL_GPERMADDR */ - __u32 size; - __u8 data[0]; + u32 cmd; /* ETHTOOL_GPERMADDR */ + u32 size; + u8 data[0]; }; -#ifdef __KERNEL__ - struct net_device; /* Some generic methods drivers may use in their ethtool_ops */ @@ -373,7 +371,6 @@ struct ethtool_ops { u32 (*get_ufo)(struct net_device *); int (*set_ufo)(struct net_device *, u32); }; -#endif /* __KERNEL__ */ /* CMDs currently supported */ #define ETHTOOL_GSET 0x00000001 /* Get settings. */ diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index 84cfa8bbd..1e4bdfcf8 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h @@ -1,6 +1,6 @@ /* * include/linux/eventpoll.h ( Efficent event polling implementation ) - * Copyright (C) 2001,...,2006 Davide Libenzi + * Copyright (C) 2001,...,2003 Davide Libenzi * * 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 diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index ad46c3e6d..065e0317d 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -17,6 +17,7 @@ #define _LINUX_EXT2_FS_H #include +#include /* * The second extended filesystem constants/structures @@ -69,7 +70,6 @@ #define EXT2_SUPER_MAGIC 0xEF53 #ifdef __KERNEL__ -#include static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb) { return sb->s_fs_info; diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 4c39437b0..33bc72c36 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -17,6 +17,11 @@ #define _LINUX_EXT3_FS_H #include +#include +#include + + +struct statfs; /* * The second extended filesystem constants/structures @@ -495,8 +500,6 @@ struct ext3_super_block { }; #ifdef __KERNEL__ -#include -#include static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb) { return sb->s_fs_info; @@ -683,8 +686,6 @@ struct ext3_dir_entry_2 { #define DX_HASH_HALF_MD4 1 #define DX_HASH_TEA 2 -#ifdef __KERNEL__ - /* hash info structure used by the directory hash */ struct dx_hash_info { @@ -696,6 +697,7 @@ struct dx_hash_info #define EXT3_HTREE_EOF 0x7fffffff +#ifdef __KERNEL__ /* * Control parameters used by ext3_htree_next_block */ @@ -732,14 +734,6 @@ struct dir_private_info { __u32 next_hash; }; -/* calculate the first block number of the group */ -static inline ext3_fsblk_t -ext3_group_first_block_no(struct super_block *sb, unsigned long group_no) -{ - return group_no * (ext3_fsblk_t)EXT3_BLOCKS_PER_GROUP(sb) + - le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block); -} - /* * Special error return code only used by dx_probe() and its callers. */ @@ -760,16 +754,14 @@ ext3_group_first_block_no(struct super_block *sb, unsigned long group_no) /* balloc.c */ extern int ext3_bg_has_super(struct super_block *sb, int group); extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group); -extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, int *errp); -extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode, - ext3_fsblk_t goal, unsigned long *count, int *errp); -extern void ext3_free_blocks (handle_t *handle, struct inode *inode, - ext3_fsblk_t block, unsigned long count); -extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb, - ext3_fsblk_t block, unsigned long count, - unsigned long *pdquot_freed_blocks); -extern ext3_fsblk_t ext3_count_free_blocks (struct super_block *); +extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *); +extern int ext3_new_blocks (handle_t *, struct inode *, unsigned long, + unsigned long *, int *); +extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long, + unsigned long); +extern void ext3_free_blocks_sb (handle_t *, struct super_block *, + unsigned long, unsigned long, int *); +extern unsigned long ext3_count_free_blocks (struct super_block *); extern void ext3_check_blocks_bitmap (struct super_block *); extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb, unsigned int block_group, @@ -805,8 +797,7 @@ extern unsigned long ext3_count_free (struct buffer_head *, unsigned); /* inode.c */ -int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode, - struct buffer_head *bh, ext3_fsblk_t blocknr); +int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, @@ -842,7 +833,7 @@ extern int ext3_group_add(struct super_block *sb, struct ext3_new_group_data *input); extern int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es, - ext3_fsblk_t n_blocks_count); + unsigned long n_blocks_count); /* super.c */ extern void ext3_error (struct super_block *, const char *, const char *, ...) diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 2f18b9511..7abf90147 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -21,17 +21,9 @@ #include #include -/* data type for block offset of block group */ -typedef int ext3_grpblk_t; - -/* data type for filesystem-wide blocks number */ -typedef unsigned long ext3_fsblk_t; - -#define E3FSBLK "%lu" - struct ext3_reserve_window { - ext3_fsblk_t _rsv_start; /* First byte reserved */ - ext3_fsblk_t _rsv_end; /* Last byte reserved or 0 */ + __u32 _rsv_start; /* First byte reserved */ + __u32 _rsv_end; /* Last byte reserved or 0 */ }; struct ext3_reserve_window_node { @@ -58,7 +50,7 @@ struct ext3_block_alloc_info { * allocated to this file. This give us the goal (target) for the next * allocation when we detect linearly ascending requests. */ - ext3_fsblk_t last_alloc_physical_block; + __u32 last_alloc_physical_block; }; #define rsv_start rsv_window._rsv_start @@ -75,7 +67,7 @@ struct ext3_inode_info { __u8 i_frag_no; __u8 i_frag_size; #endif - ext3_fsblk_t i_file_acl; + __u32 i_file_acl; __u32 i_dir_acl; __u32 i_dtime; diff --git a/include/linux/fb.h b/include/linux/fb.h index 2f335e966..315d89740 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -366,21 +366,16 @@ struct fb_cursor { struct fb_image image; /* Cursor image */ }; -#ifdef CONFIG_FB_BACKLIGHT -/* Settings for the generic backlight code */ -#define FB_BACKLIGHT_LEVELS 128 -#define FB_BACKLIGHT_MAX 0xFF -#endif - #ifdef __KERNEL__ #include #include +#include #include #include +#include #include #include -#include #include struct vm_area_struct; @@ -502,19 +497,23 @@ struct fb_cursor_user { #define FB_EVENT_MODE_DELETE 0x04 /* A driver registered itself */ #define FB_EVENT_FB_REGISTERED 0x05 -/* A driver unregistered itself */ -#define FB_EVENT_FB_UNREGISTERED 0x06 /* CONSOLE-SPECIFIC: get console to framebuffer mapping */ -#define FB_EVENT_GET_CONSOLE_MAP 0x07 +#define FB_EVENT_GET_CONSOLE_MAP 0x06 /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ -#define FB_EVENT_SET_CONSOLE_MAP 0x08 +#define FB_EVENT_SET_CONSOLE_MAP 0x07 /* A display blank is requested */ -#define FB_EVENT_BLANK 0x09 +#define FB_EVENT_BLANK 0x08 /* Private modelist is to be replaced */ -#define FB_EVENT_NEW_MODELIST 0x0A +#define FB_EVENT_NEW_MODELIST 0x09 /* The resolution of the passed in fb_info about to change and all vc's should be changed */ -#define FB_EVENT_MODE_CHANGE_ALL 0x0B +#define FB_EVENT_MODE_CHANGE_ALL 0x0A +/* CONSOLE-SPECIFIC: set console rotation */ +#define FB_EVENT_SET_CON_ROTATE 0x0B +/* CONSOLE-SPECIFIC: get console rotation */ +#define FB_EVENT_GET_CON_ROTATE 0x0C +/* CONSOLE-SPECIFIC: rotate all consoles */ +#define FB_EVENT_SET_CON_ROTATE_ALL 0x0D struct fb_event { struct fb_info *info; @@ -524,7 +523,7 @@ struct fb_event { extern int fb_register_client(struct notifier_block *nb); extern int fb_unregister_client(struct notifier_block *nb); -extern int fb_notifier_call_chain(unsigned long val, void *v); + /* * Pixmap structure definition * @@ -556,7 +555,7 @@ struct fb_pixmap { * Frame buffer operations * * LOCKING NOTE: those functions must _ALL_ be called with the console - * semaphore held, this is the only suitable locking mechanism we have + * semaphore held, this is the only suitable locking mecanism we have * in 2.6. Some may be called at interrupt time at this point though. */ @@ -757,21 +756,6 @@ struct fb_info { struct fb_cmap cmap; /* Current cmap */ struct list_head modelist; /* mode list */ struct fb_videomode *mode; /* current mode */ - -#ifdef CONFIG_FB_BACKLIGHT - /* Lock ordering: - * bl_mutex (protects bl_dev and bl_curve) - * bl_dev->sem (backlight class) - */ - struct mutex bl_mutex; - - /* assigned backlight device */ - struct backlight_device *bl_dev; - - /* Backlight level curve */ - u8 bl_curve[FB_BACKLIGHT_LEVELS]; -#endif - struct fb_ops *fbops; struct device *device; struct class_device *class_device; /* sysfs per device attrs */ @@ -886,6 +870,7 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); extern int fb_get_options(char *name, char **option); extern int fb_new_modelist(struct fb_info *info); +extern int fb_con_duit(struct fb_info *info, int event, void *data); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -910,7 +895,6 @@ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); extern void framebuffer_release(struct fb_info *info); extern int fb_init_class_device(struct fb_info *fb_info); extern void fb_cleanup_class_device(struct fb_info *head); -extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); /* drivers/video/fbmon.c */ #define FB_MAXTIMINGS 0 diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 996f5611c..c52a63755 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -29,7 +29,6 @@ #define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ #define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ -#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ #ifdef __KERNEL__ diff --git a/include/linux/fs.h b/include/linux/fs.h index ee7f02a54..dfe92fd08 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -6,6 +6,7 @@ * structures etc. */ +#include #include #include @@ -27,10 +28,6 @@ #define BLOCK_SIZE_BITS 10 #define BLOCK_SIZE (1<i_mutex nesting subclasses for the lock validator: - * - * 0: the object of the current VFS operation - * 1: parent - * 2: child/target - * 3: quota file - * - * The locking order between these classes is - * parent -> child -> normal -> xattr -> quota - */ -enum inode_i_mutex_lock_class -{ - I_MUTEX_NORMAL, - I_MUTEX_PARENT, - I_MUTEX_CHILD, - I_MUTEX_XATTR, - I_MUTEX_QUOTA -}; - /* * NOTE: in a 32bit arch with a preemptable kernel and * an UP compile the i_size_read/write must be atomic @@ -719,9 +697,7 @@ extern spinlock_t files_lock; #define FL_POSIX 1 #define FL_FLOCK 2 #define FL_ACCESS 8 /* not trying to lock, just looking */ -#define FL_EXISTS 16 /* when unlocking, test for existence */ #define FL_LEASE 32 /* lease held on this file */ -#define FL_CLOSE 64 /* unlock on close */ #define FL_SLEEP 128 /* A blocking lock */ /* @@ -815,6 +791,7 @@ extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_l extern int posix_lock_file(struct file *, struct file_lock *); extern int posix_lock_file_wait(struct file *, struct file_lock *); extern int posix_unblock_lock(struct file *, struct file_lock *); +extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); extern int __break_lease(struct inode *inode, unsigned int flags); extern void lease_get_mtime(struct inode *, struct timespec *time); @@ -822,6 +799,7 @@ extern int setlease(struct file *, long, struct file_lock **); extern int lease_modify(struct file_lock **, int); 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; @@ -1003,7 +981,7 @@ int generic_osync_inode(struct inode *, struct address_space *, int); * This allows the kernel to read directories into kernel space or * to have different dirent layouts depending on the binary type. */ -typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); +typedef int (*filldir_t)(void *, const char *, int, loff_t, ino_t, unsigned); struct block_device_operations { int (*open) (struct inode *, struct file *); @@ -1064,7 +1042,7 @@ struct file_operations { long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); - int (*flush) (struct file *, fl_owner_t id); + int (*flush) (struct file *); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, struct dentry *, int datasync); int (*aio_fsync) (struct kiocb *, int datasync); @@ -1137,10 +1115,10 @@ struct super_operations { int (*sync_fs)(struct super_block *sb, int wait); void (*write_super_lockfs) (struct super_block *); void (*unlockfs) (struct super_block *); - int (*statfs) (struct dentry *, struct kstatfs *); + int (*statfs) (struct super_block *, struct kstatfs *); int (*remount_fs) (struct super_block *, int *, char *); void (*clear_inode) (struct inode *); - void (*umount_begin) (struct vfsmount *, int); + void (*umount_begin) (struct super_block *); int (*show_options)(struct seq_file *, struct vfsmount *); int (*show_stats)(struct seq_file *, struct vfsmount *); @@ -1310,28 +1288,23 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent, struct file_system_type { const char *name; int fs_flags; - int (*get_sb) (struct file_system_type *, int, - const char *, void *, struct vfsmount *); + struct super_block *(*get_sb) (struct file_system_type *, int, + const char *, void *); void (*kill_sb) (struct super_block *); struct module *owner; struct file_system_type * next; struct list_head fs_supers; - struct lock_class_key s_lock_key; - struct lock_class_key s_umount_key; }; -extern int get_sb_bdev(struct file_system_type *fs_type, +struct super_block *get_sb_bdev(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); -extern int get_sb_single(struct file_system_type *fs_type, + int (*fill_super)(struct super_block *, void *, int)); +struct super_block *get_sb_single(struct file_system_type *fs_type, int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); -extern int get_sb_nodev(struct file_system_type *fs_type, + int (*fill_super)(struct super_block *, void *, int)); +struct super_block *get_sb_nodev(struct file_system_type *fs_type, int flags, void *data, - int (*fill_super)(struct super_block *, void *, int), - struct vfsmount *mnt); + int (*fill_super)(struct super_block *, void *, int)); void generic_shutdown_super(struct super_block *sb); void kill_block_super(struct super_block *sb); void kill_anon_super(struct super_block *sb); @@ -1342,10 +1315,8 @@ struct super_block *sget(struct file_system_type *type, int (*test)(struct super_block *,void *), int (*set)(struct super_block *,void *), void *data); -extern int get_sb_pseudo(struct file_system_type *, char *, - struct super_operations *ops, unsigned long, - struct vfsmount *mnt); -extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); +struct super_block *get_sb_pseudo(struct file_system_type *, char *, + struct super_operations *ops, unsigned long); int __put_super(struct super_block *sb); int __put_super_and_need_restart(struct super_block *sb); void unnamed_dev_init(void); @@ -1368,7 +1339,7 @@ extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, struct vfsmount *); -extern int vfs_statfs(struct dentry *, struct kstatfs *); +extern int vfs_statfs(struct super_block *, struct kstatfs *); /* /sys/fs */ extern struct subsystem fs_subsys; @@ -1447,7 +1418,7 @@ extern void bd_forget(struct inode *inode); extern void bdput(struct block_device *); extern struct block_device *open_by_devnum(dev_t, unsigned); extern const struct file_operations def_blk_fops; -extern const struct address_space_operations def_blk_aops; +extern struct address_space_operations def_blk_aops; extern const struct file_operations def_chr_fops; extern const struct file_operations bad_sock_fops; extern const struct file_operations def_fifo_fops; @@ -1650,8 +1621,6 @@ extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, unsigned long *, loff_t, loff_t *, size_t, size_t); extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, unsigned long, loff_t, loff_t *, size_t, ssize_t); -extern int generic_file_buffered_write_one_kernel_page(struct address_space *, - pgoff_t, struct page *); extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov, @@ -1793,7 +1762,7 @@ extern loff_t dcache_dir_lseek(struct file *, loff_t, int); extern int dcache_readdir(struct file *, void *, filldir_t); extern int dcache_readdir_filter(struct file *, void *, filldir_t, int (*)(struct dentry *)); extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); -extern int simple_statfs(struct dentry *, struct kstatfs *); +extern int simple_statfs(struct super_block *, struct kstatfs *); extern int simple_link(struct dentry *, struct inode *, struct dentry *); extern int simple_unlink(struct inode *, struct dentry *); extern int simple_rmdir(struct inode *, struct dentry *); @@ -1813,14 +1782,13 @@ extern struct inode_operations simple_dir_inode_operations; struct tree_descr { char *name; const struct file_operations *ops; int mode; }; struct dentry *d_alloc_name(struct dentry *, const char *); extern int simple_fill_super(struct super_block *, int, struct tree_descr *); -extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); +extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); extern void simple_release_fs(struct vfsmount **mount, int *count); extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); #ifdef CONFIG_MIGRATION -extern int buffer_migrate_page(struct address_space *, - struct page *, struct page *); +extern int buffer_migrate_page(struct page *, struct page *); #else #define buffer_migrate_page NULL #endif diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 74ed35a00..783c476b8 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h @@ -69,21 +69,34 @@ enum fs_ioport { fsiop_porte, }; -struct fs_mii_bit { - u32 offset; - u8 bit; - u8 polarity; -}; -struct fs_mii_bb_platform_info { - struct fs_mii_bit mdio_dir; - struct fs_mii_bit mdio_dat; - struct fs_mii_bit mdc_dat; - int mdio_port; /* port & bit for MDIO */ - int mdio_bit; - int mdc_port; /* port & bit for MDC */ - int mdc_bit; - int delay; /* delay in us */ - int irq[32]; /* irqs per phy's */ +struct fs_mii_bus_info { + int method; /* mii method */ + int id; /* the id of the mii_bus */ + int disable_aneg; /* if the controller needs to negothiate speed & duplex */ + int lpa; /* the default board-specific vallues will be applied otherwise */ + + union { + struct { + int duplex; + int speed; + } fixed; + + struct { + /* nothing */ + } fec; + + struct { + /* nothing */ + } scc; + + struct { + int mdio_port; /* port & bit for MDIO */ + int mdio_bit; + int mdc_port; /* port & bit for MDC */ + int mdc_bit; + int delay; /* delay in us */ + } bitbang; + } i; }; struct fs_platform_info { @@ -106,7 +119,6 @@ struct fs_platform_info { u32 device_flags; int phy_addr; /* the phy address (-1 no phy) */ - const char* bus_id; int phy_irq; /* the phy irq (if it exists) */ const struct fs_mii_bus_info *bus_info; @@ -118,10 +130,6 @@ struct fs_platform_info { int napi_weight; /* NAPI weight */ int use_rmii; /* use RMII mode */ - int has_phy; /* if the network is phy container as well...*/ -}; -struct fs_mii_fec_platform_info { - u32 irq[32]; - u32 mii_speed; }; + #endif diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h deleted file mode 100644 index e229fed00..000000000 --- a/include/linux/fscache-cache.h +++ /dev/null @@ -1,243 +0,0 @@ -/* fscache-cache.h: general filesystem caching backing cache interface - * - * Copyright (C) 2004-6 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - * - * NOTE!!! See: - * - * Documentation/filesystems/caching/backend-api.txt - * - * for a description of the cache backend interface declared here. - */ - -#ifndef _LINUX_FSCACHE_CACHE_H -#define _LINUX_FSCACHE_CACHE_H - -#include - -#define NR_MAXCACHES BITS_PER_LONG - -struct fscache_cache; -struct fscache_cache_ops; -struct fscache_object; - -/* - * cache tag definition - */ -struct fscache_cache_tag { - struct list_head link; - struct fscache_cache *cache; /* cache referred to by this tag */ - atomic_t usage; - char name[0]; /* tag name */ -}; - -/* - * cache definition - */ -struct fscache_cache { - struct fscache_cache_ops *ops; - struct fscache_cache_tag *tag; /* tag representing this cache */ - struct list_head link; /* link in list of caches */ - struct rw_semaphore withdrawal_sem; /* withdrawal control sem */ - size_t max_index_size; /* maximum size of index data */ - char identifier[32]; /* cache label */ - - /* node management */ - struct list_head object_list; /* list of data/index objects */ - spinlock_t object_list_lock; - struct fscache_object *fsdef; /* object for the fsdef index */ - unsigned long flags; -#define FSCACHE_IOERROR 0 /* cache stopped on I/O error */ -}; - -extern void fscache_init_cache(struct fscache_cache *cache, - struct fscache_cache_ops *ops, - const char *idfmt, - ...) __attribute__ ((format (printf,3,4))); - -extern int fscache_add_cache(struct fscache_cache *cache, - struct fscache_object *fsdef, - const char *tagname); -extern void fscache_withdraw_cache(struct fscache_cache *cache); - -extern void fscache_io_error(struct fscache_cache *cache); - -/*****************************************************************************/ -/* - * cache operations - */ -struct fscache_cache_ops { - /* name of cache provider */ - const char *name; - - /* look up the object for a cookie, creating it on disc if necessary */ - struct fscache_object *(*lookup_object)(struct fscache_cache *cache, - struct fscache_object *parent, - struct fscache_cookie *cookie); - - /* increment the usage count on this object (may fail if unmounting) */ - struct fscache_object *(*grab_object)(struct fscache_object *object); - - /* lock a semaphore on an object */ - void (*lock_object)(struct fscache_object *object); - - /* unlock a semaphore on an object */ - void (*unlock_object)(struct fscache_object *object); - - /* pin an object in the cache */ - int (*pin_object)(struct fscache_object *object); - - /* unpin an object in the cache */ - void (*unpin_object)(struct fscache_object *object); - - /* store the updated auxilliary data on an object */ - void (*update_object)(struct fscache_object *object); - - /* dispose of a reference to an object */ - void (*put_object)(struct fscache_object *object); - - /* sync a cache */ - void (*sync_cache)(struct fscache_cache *cache); - - /* set the data size of an object */ - int (*set_i_size)(struct fscache_object *object, loff_t i_size); - - /* reserve space for an object's data and associated metadata */ - int (*reserve_space)(struct fscache_object *object, loff_t i_size); - - /* request a backing block for a page be read or allocated in the - * cache */ - int (*read_or_alloc_page)(struct fscache_object *object, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - unsigned long gfp); - - /* request backing blocks for a list of pages be read or allocated in - * the cache */ - int (*read_or_alloc_pages)(struct fscache_object *object, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages, - fscache_rw_complete_t end_io_func, - void *context, - unsigned long gfp); - - /* request a backing block for a page be allocated in the cache so that - * it can be written directly */ - int (*allocate_page)(struct fscache_object *object, - struct page *page, - unsigned long gfp); - - /* write a page to its backing block in the cache */ - int (*write_page)(struct fscache_object *object, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - unsigned long gfp); - - /* write several pages to their backing blocks in the cache */ - int (*write_pages)(struct fscache_object *object, - struct pagevec *pagevec, - fscache_rw_complete_t end_io_func, - void *context, - unsigned long gfp); - - /* detach backing block from a bunch of pages */ - void (*uncache_pages)(struct fscache_object *object, - struct pagevec *pagevec); - - /* dissociate a cache from all the pages it was backing */ - void (*dissociate_pages)(struct fscache_cache *cache); -}; - -/*****************************************************************************/ -/* - * data file or index object cookie - * - a file will only appear in one cache - * - a request to cache a file may or may not be honoured, subject to - * constraints such as disc space - * - indexes files are created on disc just-in-time - */ -struct fscache_cookie { - atomic_t usage; /* number of users of this cookie */ - atomic_t children; /* number of children of this cookie */ - struct rw_semaphore sem; /* list creation vs scan lock */ - struct hlist_head backing_objects; /* object(s) backing this file/index */ - struct fscache_cookie_def *def; /* definition */ - struct fscache_cookie *parent; /* parent of this entry */ - struct fscache_netfs *netfs; /* owner network fs definition */ - void *netfs_data; /* back pointer to netfs */ -}; - -extern struct fscache_cookie fscache_fsdef_index; - -/*****************************************************************************/ -/* - * on-disc cache file or index handle - */ -struct fscache_object { - unsigned long flags; -#define FSCACHE_OBJECT_RELEASING 0 /* T if object is being released */ -#define FSCACHE_OBJECT_RECYCLING 1 /* T if object is being retired */ -#define FSCACHE_OBJECT_WITHDRAWN 2 /* T if object has been withdrawn */ - - struct list_head cache_link; /* link in cache->object_list */ - struct hlist_node cookie_link; /* link in cookie->backing_objects */ - struct fscache_cache *cache; /* cache that supplied this object */ - struct fscache_cookie *cookie; /* netfs's file/index object */ -}; - -static inline -void fscache_object_init(struct fscache_object *object) -{ - object->flags = 0; - INIT_LIST_HEAD(&object->cache_link); - INIT_HLIST_NODE(&object->cookie_link); - object->cache = NULL; - object->cookie = NULL; -} - -/* find the parent index object for a object */ -static inline -struct fscache_object *fscache_find_parent_object(struct fscache_object *object) -{ - struct fscache_object *parent; - struct fscache_cookie *cookie = object->cookie; - struct fscache_cache *cache = object->cache; - struct hlist_node *_p; - - hlist_for_each_entry(parent, _p, - &cookie->parent->backing_objects, - cookie_link - ) { - if (parent->cache == cache) - return parent; - } - - return NULL; -} - -/* get an extra reference to a context */ -static inline -void *fscache_get_context(struct fscache_cookie *cookie, void *context) -{ - if (cookie->def->get_context) - cookie->def->get_context(cookie->netfs_data, context); - return context; -} - -/* release an extra reference to a context */ -static inline -void fscache_put_context(struct fscache_cookie *cookie, void *context) -{ - if (cookie->def->put_context) - cookie->def->put_context(cookie->netfs_data, context); -} - -#endif /* _LINUX_FSCACHE_CACHE_H */ diff --git a/include/linux/fscache.h b/include/linux/fscache.h deleted file mode 100644 index 867ab9e9d..000000000 --- a/include/linux/fscache.h +++ /dev/null @@ -1,495 +0,0 @@ -/* fscache.h: general filesystem caching interface - * - * Copyright (C) 2004-5 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@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. - * - * NOTE!!! See: - * - * Documentation/filesystems/caching/netfs-api.txt - * - * for a description of the network filesystem interface declared here. - */ - -#ifndef _LINUX_FSCACHE_H -#define _LINUX_FSCACHE_H - -#include -#include -#include -#include - -struct pagevec; -struct fscache_cache_tag; -struct fscache_cookie; -struct fscache_netfs; -struct fscache_netfs_operations; - -typedef void (*fscache_rw_complete_t)(struct page *page, - void *context, - int error); - -/* result of index entry consultation */ -typedef enum { - FSCACHE_CHECKAUX_OKAY, /* entry okay as is */ - FSCACHE_CHECKAUX_NEEDS_UPDATE, /* entry requires update */ - FSCACHE_CHECKAUX_OBSOLETE, /* entry requires deletion */ -} fscache_checkaux_t; - -/*****************************************************************************/ -/* - * fscache cookie definition - */ -struct fscache_cookie_def -{ - /* name of cookie type */ - char name[16]; - - /* cookie type */ - uint8_t type; -#define FSCACHE_COOKIE_TYPE_INDEX 0 -#define FSCACHE_COOKIE_TYPE_DATAFILE 1 - - /* select the cache into which to insert an entry in this index - * - optional - * - should return a cache identifier or NULL to cause the cache to be - * inherited from the parent if possible or the first cache picked - * for a non-index file if not - */ - struct fscache_cache_tag *(*select_cache)(const void *parent_netfs_data, - const void *cookie_netfs_data); - - /* get an index key - * - should store the key data in the buffer - * - should return the amount of amount stored - * - not permitted to return an error - * - the netfs data from the cookie being used as the source is - * presented - */ - uint16_t (*get_key)(const void *cookie_netfs_data, - void *buffer, - uint16_t bufmax); - - /* get certain file attributes from the netfs data - * - this function can be absent for an index - * - not permitted to return an error - * - the netfs data from the cookie being used as the source is - * presented - */ - void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); - - /* get the auxilliary data from netfs data - * - this function can be absent if the index carries no state data - * - should store the auxilliary data in the buffer - * - should return the amount of amount stored - * - not permitted to return an error - * - the netfs data from the cookie being used as the source is - * presented - */ - uint16_t (*get_aux)(const void *cookie_netfs_data, - void *buffer, - uint16_t bufmax); - - /* consult the netfs about the state of an object - * - this function can be absent if the index carries no state data - * - the netfs data from the cookie being used as the target is - * presented, as is the auxilliary data - */ - fscache_checkaux_t (*check_aux)(void *cookie_netfs_data, - const void *data, - uint16_t datalen); - - /* get an extra reference on a read context - * - this function can be absent if the completion function doesn't - * require a context - */ - void (*get_context)(void *cookie_netfs_data, void *context); - - /* release an extra reference on a read context - * - this function can be absent if the completion function doesn't - * require a context - */ - void (*put_context)(void *cookie_netfs_data, void *context); - - /* indicate pages that now have cache metadata retained - * - this function should mark the specified pages as now being cached - */ - void (*mark_pages_cached)(void *cookie_netfs_data, - struct address_space *mapping, - struct pagevec *cached_pvec); - - /* indicate the cookie is no longer cached - * - this function is called when the backing store currently caching - * a cookie is removed - * - the netfs should use this to clean up any markers indicating - * cached pages - * - this is mandatory for any object that may have data - */ - void (*now_uncached)(void *cookie_netfs_data); -}; - -/* pattern used to fill dead space in an index entry */ -#define FSCACHE_INDEX_DEADFILL_PATTERN 0x79 - -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern struct fscache_cookie *__fscache_acquire_cookie(struct fscache_cookie *parent, - struct fscache_cookie_def *def, - void *netfs_data); - -extern void __fscache_relinquish_cookie(struct fscache_cookie *cookie, - int retire); - -extern void __fscache_update_cookie(struct fscache_cookie *cookie); -#endif - -static inline -struct fscache_cookie *fscache_acquire_cookie(struct fscache_cookie *parent, - struct fscache_cookie_def *def, - void *netfs_data) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (parent) - return __fscache_acquire_cookie(parent, def, netfs_data); -#endif - return NULL; -} - -static inline -void fscache_relinquish_cookie(struct fscache_cookie *cookie, - int retire) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - __fscache_relinquish_cookie(cookie, retire); -#endif -} - -static inline -void fscache_update_cookie(struct fscache_cookie *cookie) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - __fscache_update_cookie(cookie); -#endif -} - -/*****************************************************************************/ -/* - * pin or unpin a cookie in a cache - * - only available for data cookies - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_pin_cookie(struct fscache_cookie *cookie); -extern void __fscache_unpin_cookie(struct fscache_cookie *cookie); -#endif - -static inline -int fscache_pin_cookie(struct fscache_cookie *cookie) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_pin_cookie(cookie); -#endif - return -ENOBUFS; -} - -static inline -void fscache_unpin_cookie(struct fscache_cookie *cookie) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - __fscache_unpin_cookie(cookie); -#endif -} - -/*****************************************************************************/ -/* - * fscache cached network filesystem type - * - name, version and ops must be filled in before registration - * - all other fields will be set during registration - */ -struct fscache_netfs -{ - uint32_t version; /* indexing version */ - const char *name; /* filesystem name */ - struct fscache_cookie *primary_index; - struct fscache_netfs_operations *ops; - struct list_head link; /* internal link */ -}; - -struct fscache_netfs_operations -{ -}; - -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_register_netfs(struct fscache_netfs *netfs); -extern void __fscache_unregister_netfs(struct fscache_netfs *netfs); -#endif - -static inline -int fscache_register_netfs(struct fscache_netfs *netfs) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - return __fscache_register_netfs(netfs); -#else - return 0; -#endif -} - -static inline -void fscache_unregister_netfs(struct fscache_netfs *netfs) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - __fscache_unregister_netfs(netfs); -#endif -} - -/*****************************************************************************/ -/* - * look up a cache tag - * - cache tags are used to select specific caches in which to cache indexes - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern struct fscache_cache_tag *__fscache_lookup_cache_tag(const char *name); -extern void __fscache_release_cache_tag(struct fscache_cache_tag *tag); -#endif - -static inline -struct fscache_cache_tag *fscache_lookup_cache_tag(const char *name) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - return __fscache_lookup_cache_tag(name); -#else - return NULL; -#endif -} - -static inline -void fscache_release_cache_tag(struct fscache_cache_tag *tag) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - __fscache_release_cache_tag(tag); -#endif -} - -/*****************************************************************************/ -/* - * set the data size on a cached object - * - no pages beyond the end of the object will be accessible - * - returns -ENOBUFS if the file is not backed - * - returns -ENOSPC if a pinned file of that size can't be stored - * - returns 0 if okay - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_set_i_size(struct fscache_cookie *cookie, loff_t i_size); -#endif - -static inline -int fscache_set_i_size(struct fscache_cookie *cookie, loff_t i_size) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_set_i_size(cookie, i_size); -#endif - return -ENOBUFS; -} - -/*****************************************************************************/ -/* - * reserve data space for a cached object - * - returns -ENOBUFS if the file is not backed - * - returns -ENOSPC if there isn't enough space to honour the reservation - * - returns 0 if okay - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_reserve_space(struct fscache_cookie *cookie, loff_t size); -#endif - -static inline -int fscache_reserve_space(struct fscache_cookie *cookie, loff_t size) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_reserve_space(cookie, size); -#endif - return -ENOBUFS; -} - -/*****************************************************************************/ -/* - * read a page from the cache or allocate a block in which to store it - * - if the page is not backed by a file: - * - -ENOBUFS will be returned and nothing more will be done - * - else if the page is backed by a block in the cache: - * - a read will be started which will call end_io_func on completion - * - else if the page is unbacked: - * - a block will be allocated - * - -ENODATA will be returned - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_read_or_alloc_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); -#endif - -static inline -int fscache_read_or_alloc_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_read_or_alloc_page(cookie, page, end_io_func, - context, gfp); -#endif - return -ENOBUFS; -} - -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_read_or_alloc_pages(struct fscache_cookie *cookie, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); -#endif - -static inline -int fscache_read_or_alloc_pages(struct fscache_cookie *cookie, - struct address_space *mapping, - struct list_head *pages, - unsigned *nr_pages, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_read_or_alloc_pages(cookie, mapping, pages, - nr_pages, end_io_func, - context, gfp); -#endif - return -ENOBUFS; -} - -/* - * allocate a block in which to store a page - * - if the page is not backed by a file: - * - -ENOBUFS will be returned and nothing more will be done - * - else - * - a block will be allocated if there isn't one - * - 0 will be returned - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_alloc_page(struct fscache_cookie *cookie, - struct page *page, - gfp_t gfp); -#endif - -static inline -int fscache_alloc_page(struct fscache_cookie *cookie, - struct page *page, - gfp_t gfp) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_alloc_page(cookie, page, gfp); -#endif - return -ENOBUFS; -} - -/* - * request a page be stored in the cache - * - this request may be ignored if no cache block is currently allocated, in - * which case it: - * - returns -ENOBUFS - * - if a cache block was already allocated: - * - a BIO will be dispatched to write the page (end_io_func will be called - * from the completion function) - * - returns 0 - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern int __fscache_write_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); - -extern int __fscache_write_pages(struct fscache_cookie *cookie, - struct pagevec *pagevec, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp); -#endif - -static inline -int fscache_write_page(struct fscache_cookie *cookie, - struct page *page, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_write_page(cookie, page, end_io_func, - context, gfp); -#endif - return -ENOBUFS; -} - -static inline -int fscache_write_pages(struct fscache_cookie *cookie, - struct pagevec *pagevec, - fscache_rw_complete_t end_io_func, - void *context, - gfp_t gfp) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - return __fscache_write_pages(cookie, pagevec, end_io_func, - context, gfp); -#endif - return -ENOBUFS; -} - -/* - * indicate that caching is no longer required on a page - * - note: cannot cancel any outstanding BIOs between this page and the cache - */ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) -extern void __fscache_uncache_page(struct fscache_cookie *cookie, - struct page *page); -extern void __fscache_uncache_pages(struct fscache_cookie *cookie, - struct pagevec *pagevec); -#endif - -static inline -void fscache_uncache_page(struct fscache_cookie *cookie, - struct page *page) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - __fscache_uncache_page(cookie, page); -#endif -} - -static inline -void fscache_uncache_pagevec(struct fscache_cookie *cookie, - struct pagevec *pagevec) -{ -#if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE) - if (cookie) - __fscache_uncache_pages(cookie, pagevec); -#endif -} - -#endif /* _LINUX_FSCACHE_H */ diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index d4f219ffa..11438eff4 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -54,20 +54,19 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, if (isdir) isdir = IN_ISDIR; - inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name, - source); - inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name, - source); + inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); + inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); if (target) { - inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL); + inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); inotify_inode_is_dead(target); } if (source) { - inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); + inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL); } - audit_inode_child(new_name, source, new_dir); + audit_inode_child(old_name, source, old_dir->i_ino); + audit_inode_child(new_name, target, new_dir->i_ino); } /* @@ -86,7 +85,7 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) */ static inline void fsnotify_inoderemove(struct inode *inode) { - inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL, NULL); + inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); inotify_inode_is_dead(inode); } @@ -96,9 +95,8 @@ static inline void fsnotify_inoderemove(struct inode *inode) static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) { inode_dir_notify(inode, DN_CREATE); - inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, - dentry->d_inode); - audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); + inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name); + audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); } /* @@ -108,8 +106,8 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) { inode_dir_notify(inode, DN_CREATE); inotify_inode_queue_event(inode, IN_CREATE | IN_ISDIR, 0, - dentry->d_name.name, dentry->d_inode); - audit_inode_child(dentry->d_name.name, dentry->d_inode, inode); + dentry->d_name.name); + audit_inode_child(dentry->d_name.name, dentry->d_inode, inode->i_ino); } /* @@ -125,7 +123,7 @@ static inline void fsnotify_access(struct dentry *dentry) dnotify_parent(dentry, DN_ACCESS); inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); - inotify_inode_queue_event(inode, mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, mask, 0, NULL); } /* @@ -141,7 +139,7 @@ static inline void fsnotify_modify(struct dentry *dentry) dnotify_parent(dentry, DN_MODIFY); inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); - inotify_inode_queue_event(inode, mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, mask, 0, NULL); } /* @@ -156,7 +154,7 @@ static inline void fsnotify_open(struct dentry *dentry) mask |= IN_ISDIR; inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); - inotify_inode_queue_event(inode, mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, mask, 0, NULL); } /* @@ -174,7 +172,7 @@ static inline void fsnotify_close(struct file *file) mask |= IN_ISDIR; inotify_dentry_parent_queue_event(dentry, mask, 0, name); - inotify_inode_queue_event(inode, mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, mask, 0, NULL); } /* @@ -189,7 +187,7 @@ static inline void fsnotify_xattr(struct dentry *dentry) mask |= IN_ISDIR; inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); - inotify_inode_queue_event(inode, mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, mask, 0, NULL); } /* @@ -236,7 +234,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) if (in_mask) { if (S_ISDIR(inode->i_mode)) in_mask |= IN_ISDIR; - inotify_inode_queue_event(inode, in_mask, 0, NULL, NULL); + inotify_inode_queue_event(inode, in_mask, 0, NULL); inotify_dentry_parent_queue_event(dentry, in_mask, 0, dentry->d_name.name); } diff --git a/include/linux/ftape.h b/include/linux/ftape.h index 7e7038cba..72faeec9f 100644 --- a/include/linux/ftape.h +++ b/include/linux/ftape.h @@ -35,6 +35,7 @@ #include #endif #include +#include #include #define FT_SECTOR(x) (x+1) /* sector offset into real sector */ diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 9fc48a674..5425b6002 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -1,6 +1,6 @@ /* FUSE: Filesystem in Userspace - Copyright (C) 2001-2006 Miklos Szeredi + Copyright (C) 2001-2005 Miklos Szeredi This program can be distributed under the terms of the GNU GPL. See the file COPYING. @@ -9,19 +9,18 @@ /* This file defines the kernel interface of FUSE */ #include -#include /** Version number of this interface */ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 7 +#define FUSE_KERNEL_MINOR_VERSION 6 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 /** The major number of the fuse character device */ -#define FUSE_MAJOR MISC_MAJOR +#define FUSE_MAJOR 10 /** The minor number of the fuse character device */ #define FUSE_MINOR 229 @@ -59,13 +58,6 @@ struct fuse_kstatfs { __u32 spare[6]; }; -struct fuse_file_lock { - __u64 start; - __u64 end; - __u32 type; - __u32 pid; /* tgid */ -}; - /** * Bitmasks for fuse_setattr_in.valid */ @@ -90,7 +82,6 @@ struct fuse_file_lock { * INIT request/reply flags */ #define FUSE_ASYNC_READ (1 << 0) -#define FUSE_POSIX_LOCKS (1 << 1) enum fuse_opcode { FUSE_LOOKUP = 1, @@ -121,12 +112,8 @@ enum fuse_opcode { FUSE_READDIR = 28, FUSE_RELEASEDIR = 29, FUSE_FSYNCDIR = 30, - FUSE_GETLK = 31, - FUSE_SETLK = 32, - FUSE_SETLKW = 33, FUSE_ACCESS = 34, - FUSE_CREATE = 35, - FUSE_INTERRUPT = 36, + FUSE_CREATE = 35 }; /* The read buffer is required to be at least 8k, but may be much larger */ @@ -212,7 +199,6 @@ struct fuse_flush_in { __u64 fh; __u32 flush_flags; __u32 padding; - __u64 lock_owner; }; struct fuse_read_in { @@ -261,16 +247,6 @@ struct fuse_getxattr_out { __u32 padding; }; -struct fuse_lk_in { - __u64 fh; - __u64 owner; - struct fuse_file_lock lk; -}; - -struct fuse_lk_out { - struct fuse_file_lock lk; -}; - struct fuse_access_in { __u32 mask; __u32 padding; @@ -292,10 +268,6 @@ struct fuse_init_out { __u32 max_write; }; -struct fuse_interrupt_in { - __u64 unique; -}; - struct fuse_in_header { __u32 len; __u32 opcode; diff --git a/include/linux/futex.h b/include/linux/futex.h index d097b5b72..966a5b3da 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h @@ -12,9 +12,6 @@ #define FUTEX_REQUEUE 3 #define FUTEX_CMP_REQUEUE 4 #define FUTEX_WAKE_OP 5 -#define FUTEX_LOCK_PI 6 -#define FUTEX_UNLOCK_PI 7 -#define FUTEX_TRYLOCK_PI 8 /* * Support for robust futexes: the kernel cleans up held futexes at @@ -93,22 +90,18 @@ struct robust_list_head { */ #define ROBUST_LIST_LIMIT 2048 -long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, - u32 __user *uaddr2, u32 val2, u32 val3); +long do_futex(unsigned long uaddr, int op, int val, + unsigned long timeout, unsigned long uaddr2, int val2, + int val3); -extern int -handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); +extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); #ifdef CONFIG_FUTEX extern void exit_robust_list(struct task_struct *curr); -extern void exit_pi_state_list(struct task_struct *curr); #else static inline void exit_robust_list(struct task_struct *curr) { } -static inline void exit_pi_state_list(struct task_struct *curr) -{ -} #endif #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 2cdba0c23..71e7b2847 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -9,7 +9,6 @@ * the Free Software Foundation. */ -#ifdef __KERNEL__ #include #include #include @@ -155,8 +154,6 @@ static inline void gameport_register_driver(struct gameport_driver *drv) void gameport_unregister_driver(struct gameport_driver *drv); -#endif /* __KERNEL__ */ - #define GAMEPORT_MODE_DISABLED 0 #define GAMEPORT_MODE_RAW 1 #define GAMEPORT_MODE_COOKED 2 @@ -172,8 +169,6 @@ void gameport_unregister_driver(struct gameport_driver *drv); #define GAMEPORT_ID_VENDOR_GRAVIS 0x0009 #define GAMEPORT_ID_VENDOR_GUILLEMOT 0x000a -#ifdef __KERNEL__ - static inline void gameport_trigger(struct gameport *gameport) { if (gameport->trigger) @@ -224,5 +219,4 @@ static inline void gameport_set_poll_interval(struct gameport *gameport, unsigne void gameport_start_polling(struct gameport *gameport); void gameport_stop_polling(struct gameport *gameport); -#endif /* __KERNEL__ */ #endif diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index 690c42803..7fd0576a4 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h @@ -4,32 +4,37 @@ * Uses for this includes on-device special memory, uncached memory * etc. * + * This code is based on the buddy allocator found in the sym53c8xx_2 + * driver, adapted for general purpose use. + * * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. */ +#include +#define ALLOC_MIN_SHIFT 5 /* 32 bytes minimum */ /* - * General purpose special memory pool descriptor. + * Link between free memory chunks of a given size. */ -struct gen_pool { - rwlock_t lock; - struct list_head chunks; /* list of chunks in this pool */ - int min_alloc_order; /* minimum allocation order */ +struct gen_pool_link { + struct gen_pool_link *next; }; /* - * General purpose special memory pool chunk descriptor. + * Memory pool descriptor. */ -struct gen_pool_chunk { +struct gen_pool { spinlock_t lock; - struct list_head next_chunk; /* next chunk in pool */ - unsigned long start_addr; /* starting address of memory chunk */ - unsigned long end_addr; /* ending address of memory chunk */ - unsigned long bits[0]; /* bitmap for allocating memory chunk */ + unsigned long (*get_new_chunk)(struct gen_pool *); + struct gen_pool *next; + struct gen_pool_link *h; + unsigned long private; + int max_chunk_shift; }; -extern struct gen_pool *gen_pool_create(int, int); -extern int gen_pool_add(struct gen_pool *, unsigned long, size_t, int); -extern unsigned long gen_pool_alloc(struct gen_pool *, size_t); -extern void gen_pool_free(struct gen_pool *, unsigned long, size_t); +unsigned long gen_pool_alloc(struct gen_pool *poolp, int size); +void gen_pool_free(struct gen_pool *mp, unsigned long ptr, int size); +struct gen_pool *gen_pool_create(int nr_chunks, int max_chunk_shift, + unsigned long (*fp)(struct gen_pool *), + unsigned long data); diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index e25384561..652611a4b 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h @@ -12,7 +12,6 @@ #ifndef GENERIC_SERIAL_H #define GENERIC_SERIAL_H -#ifdef __KERNEL__ #include struct real_driver { @@ -55,7 +54,6 @@ struct gs_port { spinlock_t driver_lock; }; -#endif /* __KERNEL__ */ /* Flags */ /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" @@ -77,7 +75,7 @@ struct gs_port { #define GS_DEBUG_FLOW 0x00000020 #define GS_DEBUG_WRITE 0x00000040 -#ifdef __KERNEL__ + void gs_put_char(struct tty_struct *tty, unsigned char ch); int gs_write(struct tty_struct *tty, const unsigned char *buf, int count); @@ -96,5 +94,5 @@ int gs_init_port(struct gs_port *port); int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); void gs_got_break(struct gs_port *port); -#endif /* __KERNEL__ */ + #endif diff --git a/include/linux/genhd.h b/include/linux/genhd.h index e4af57e87..2ef845b35 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -9,7 +9,13 @@ * */ +#include #include +#include +#include +#include +#include +#include enum { /* These three have identical behaviour; use the second one if DOS FDISK gets @@ -55,12 +61,6 @@ struct partition { #endif #ifdef __KERNEL__ -#include -#include -#include -#include -#include - struct partition { unsigned char boot_ind; /* 0x80 - active */ unsigned char head; /* starting head */ @@ -112,6 +112,8 @@ struct gendisk { sector_t capacity; int flags; + char devfs_name[64]; /* devfs crap */ + int number; /* more of the same */ struct device *driverfs_dev; struct kobject kobj; struct kobject *holder_dir; diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 92383d0d4..83ece62bc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -4,6 +4,7 @@ #include #include #include +#include struct vm_area_struct; diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 50d8b5744..eab537091 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -1,9 +1,9 @@ #ifndef LINUX_HARDIRQ_H #define LINUX_HARDIRQ_H +#include #include #include -#include #include #include @@ -87,6 +87,9 @@ extern void synchronize_irq(unsigned int irq); # define synchronize_irq(irq) barrier() #endif +#define nmi_enter() irq_enter() +#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET) + struct task_struct; #ifndef CONFIG_VIRT_CPU_ACCOUNTING @@ -95,35 +98,12 @@ static inline void account_system_vtime(struct task_struct *tsk) } #endif -/* - * It is safe to do non-atomic ops on ->hardirq_context, - * because NMI handlers may not preempt and the ops are - * always balanced, so the interrupted value of ->hardirq_context - * will always be restored. - */ #define irq_enter() \ do { \ account_system_vtime(current); \ add_preempt_count(HARDIRQ_OFFSET); \ - trace_hardirq_enter(); \ - } while (0) - -/* - * Exit irq context without processing softirqs: - */ -#define __irq_exit() \ - do { \ - trace_hardirq_exit(); \ - account_system_vtime(current); \ - sub_preempt_count(HARDIRQ_OFFSET); \ } while (0) -/* - * Exit irq context and process softirqs if needed: - */ extern void irq_exit(void); -#define nmi_enter() do { lockdep_off(); irq_enter(); } while (0) -#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) - #endif /* LINUX_HARDIRQ_H */ diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index d5ebbb29a..df695e9ae 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h @@ -188,7 +188,7 @@ int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr); int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); /* Must be used by hardware driver on module startup/exit */ -#define register_hdlc_device(dev) register_netdev(dev) +int register_hdlc_device(struct net_device *dev); void unregister_hdlc_device(struct net_device *dev); struct net_device *alloc_hdlcdev(void *priv); @@ -224,6 +224,8 @@ static __inline__ void debug_frame(const struct sk_buff *skb) int hdlc_open(struct net_device *dev); /* Must be called by hardware driver when HDLC device is being closed */ void hdlc_close(struct net_device *dev); +/* Called by hardware driver when DCD line level changes */ +void hdlc_set_carrier(int on, struct net_device *dev); /* May be used by hardware driver to gain control over HDLC device */ static __inline__ void hdlc_proto_detach(hdlc_device *hdlc) diff --git a/include/linux/hdlc/Kbuild b/include/linux/hdlc/Kbuild deleted file mode 100644 index 1fb26448f..000000000 --- a/include/linux/hdlc/Kbuild +++ /dev/null @@ -1 +0,0 @@ -header-y += ioctl.h diff --git a/include/linux/highmem.h b/include/linux/highmem.h index a7a0d2a45..8f2bcfb85 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -1,6 +1,7 @@ #ifndef _LINUX_HIGHMEM_H #define _LINUX_HIGHMEM_H +#include #include #include diff --git a/include/linux/highuid.h b/include/linux/highuid.h index 434e56246..53ecac390 100644 --- a/include/linux/highuid.h +++ b/include/linux/highuid.h @@ -1,6 +1,7 @@ #ifndef _LINUX_HIGHUID_H #define _LINUX_HIGHUID_H +#include #include /* diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 4fc379de6..306acf1dc 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -40,6 +40,7 @@ struct hrtimer_base; /** * struct hrtimer - the basic hrtimer structure + * * @node: red black tree node for time ordered insertion * @expires: the absolute expiry time in the hrtimers internal * representation. The time is related to the clock on @@ -58,6 +59,7 @@ struct hrtimer { /** * struct hrtimer_sleeper - simple sleeper structure + * * @timer: embedded timer structure * @task: task to wake up * @@ -70,6 +72,7 @@ struct hrtimer_sleeper { /** * struct hrtimer_base - the timer base for a specific clock + * * @index: clock type index for per_cpu support when moving a timer * to a base on another cpu. * @lock: lock protecting the base and associated timers @@ -80,7 +83,6 @@ struct hrtimer_sleeper { * @get_softirq_time: function to retrieve the current time from the softirq * @curr_timer: the timer which is executing a callback right now * @softirq_time: the time when running the hrtimer queue in the softirq - * @lock_key: the lock_class_key for use with lockdep */ struct hrtimer_base { clockid_t index; @@ -92,7 +94,6 @@ struct hrtimer_base { ktime_t (*get_softirq_time)(void); struct hrtimer *curr_timer; ktime_t softirq_time; - struct lock_class_key lock_key; }; /* @@ -126,7 +127,7 @@ extern ktime_t hrtimer_get_next_event(void); static inline int hrtimer_active(const struct hrtimer *timer) { - return rb_parent(&timer->node) != &timer->node; + return timer->node.rb_parent != HRTIMER_INACTIVE; } /* Forward a hrtimer so it expires after now: */ diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index c25a38d8f..4c5e610fe 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -23,8 +23,6 @@ int hugetlb_report_node_meminfo(int, char *); unsigned long hugetlb_total_pages(void); int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access); -int hugetlb_reserve_pages(struct inode *inode, long from, long to); -void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); extern unsigned long max_huge_pages; extern const unsigned long hugetlb_zero, hugetlb_infinity; @@ -141,6 +139,8 @@ struct hugetlbfs_sb_info { struct hugetlbfs_inode_info { struct shared_policy policy; + /* Protected by the (global) hugetlb_lock */ + unsigned long prereserved_hpages; struct inode vfs_inode; }; @@ -157,6 +157,10 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) extern const struct file_operations hugetlbfs_file_operations; extern struct vm_operations_struct hugetlb_vm_ops; struct file *hugetlb_zero_setup(size_t); +int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info, + unsigned long atleast_hpages); +void hugetlb_truncate_reservation(struct hugetlbfs_inode_info *info, + unsigned long atmost_hpages); int hugetlb_get_quota(struct address_space *mapping); void hugetlb_put_quota(struct address_space *mapping); diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h deleted file mode 100644 index 21ea7610e..000000000 --- a/include/linux/hw_random.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Hardware Random Number Generator - - Please read Documentation/hw_random.txt for details on use. - - ---------------------------------------------------------- - This software may be used and distributed according to the terms - of the GNU General Public License, incorporated herein by reference. - - */ - -#ifndef LINUX_HWRANDOM_H_ -#define LINUX_HWRANDOM_H_ -#ifdef __KERNEL__ - -#include -#include - -/** - * struct hwrng - Hardware Random Number Generator driver - * @name: Unique RNG name. - * @init: Initialization callback (can be NULL). - * @cleanup: Cleanup callback (can be NULL). - * @data_present: Callback to determine if data is available - * on the RNG. If NULL, it is assumed that - * there is always data available. - * @data_read: Read data from the RNG device. - * Returns the number of lower random bytes in "data". - * Must not be NULL. - * @priv: Private data, for use by the RNG driver. - */ -struct hwrng { - const char *name; - int (*init)(struct hwrng *rng); - void (*cleanup)(struct hwrng *rng); - int (*data_present)(struct hwrng *rng); - int (*data_read)(struct hwrng *rng, u32 *data); - unsigned long priv; - - /* internal. */ - struct list_head list; -}; - -/** Register a new Hardware Random Number Generator driver. */ -extern int hwrng_register(struct hwrng *rng); -/** Unregister a Hardware Random Number Generator driver. */ -extern void hwrng_unregister(struct hwrng *rng); - -#endif /* __KERNEL__ */ -#endif /* LINUX_HWRANDOM_H_ */ diff --git a/include/linux/i2c-algo-ite.h b/include/linux/i2c-algo-ite.h index 0073fe96c..26a8b8985 100644 --- a/include/linux/i2c-algo-ite.h +++ b/include/linux/i2c-algo-ite.h @@ -29,7 +29,7 @@ #ifndef I2C_ALGO_ITE_H #define I2C_ALGO_ITE_H 1 -#include +#include /* Example of a sequential read request: struct i2c_iic_msg s_msg; @@ -49,9 +49,6 @@ struct i2c_iic_msg { char *buf; /* pointer to msg data */ }; -#ifdef __KERNEL__ -struct i2c_adapter; - struct i2c_algo_iic_data { void *data; /* private data for lolevel routines */ void (*setiic) (void *data, int ctl, int val); @@ -68,5 +65,5 @@ struct i2c_algo_iic_data { int i2c_iic_add_bus(struct i2c_adapter *); int i2c_iic_del_bus(struct i2c_adapter *); -#endif /* __KERNEL__ */ + #endif /* I2C_ALGO_ITE_H */ diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 9418519a5..c8b81f419 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -112,10 +112,6 @@ #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ -#define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ -#define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ -#define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ -#define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ #define I2C_DRIVERID_I2CDEV 900 #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ diff --git a/include/linux/i2c-ocores.h b/include/linux/i2c-ocores.h deleted file mode 100644 index 8ed591b08..000000000 --- a/include/linux/i2c-ocores.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * i2c-ocores.h - definitions for the i2c-ocores interface - * - * Peter Korsgaard - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - -#ifndef _LINUX_I2C_OCORES_H -#define _LINUX_I2C_OCORES_H - -struct ocores_i2c_platform_data { - u32 regstep; /* distance between registers */ - u32 clock_khz; /* input clock in kHz */ -}; - -#endif /* _LINUX_I2C_OCORES_H */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index eb0628a7e..1635ee259 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -20,15 +20,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -/* With some changes from Kyösti Mälkki and +/* With some changes from Kyösti Mälkki and Frodo Looijaard */ #ifndef _LINUX_I2C_H #define _LINUX_I2C_H -#include -#ifdef __KERNEL__ #include +#include #include #include #include /* for struct device */ @@ -97,13 +96,13 @@ extern s32 i2c_smbus_write_word_data(struct i2c_client * client, u8 command, u16 value); extern s32 i2c_smbus_write_block_data(struct i2c_client * client, u8 command, u8 length, - const u8 *values); + u8 *values); /* Returns the number of read bytes */ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, u8 command, u8 *values); extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, u8 command, u8 length, - const u8 *values); + u8 *values); /* * A driver is capable of handling one or more physical devices present on @@ -193,8 +192,6 @@ struct i2c_algorithm { to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ - /* master_xfer should return the number of messages successfully - processed, or a negative value on error */ int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, @@ -357,7 +354,6 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) { return adap->nr; } -#endif /* __KERNEL__ */ /* * I2C Message - used for pure i2c transaction, also from /dev interface @@ -473,7 +469,6 @@ union i2c_smbus_data { #define I2C_SMBUS 0x0720 /* SMBus-level access */ /* ----- I2C-DEV: char device interface stuff ------------------------- */ -#ifdef __KERNEL__ #define I2C_MAJOR 89 /* Device major number */ @@ -651,5 +646,5 @@ static unsigned short *forces[] = { force, force_##chip1, \ force_##chip6, force_##chip7, \ force_##chip8, NULL }; \ I2C_CLIENT_INSMOD_COMMON -#endif /* __KERNEL__ */ + #endif /* _LINUX_I2C_H */ diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h index c2519df1b..36fd18cda 100644 --- a/include/linux/i2o-dev.h +++ b/include/linux/i2o-dev.h @@ -13,7 +13,7 @@ * This header file defines the I2O APIs that are available to both * the kernel and user level applications. Kernel specific structures * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which - * automatically includes this file. + * automatically includs this file. * */ @@ -23,7 +23,14 @@ /* How many controllers are we allowing */ #define MAX_I2O_CONTROLLERS 32 -#include +//#include +#ifndef __KERNEL__ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +#endif /* __KERNEL__ */ /* * I2O Control IOCTLs and structures @@ -46,7 +53,7 @@ struct i2o_cmd_passthru32 { unsigned int iop; /* IOP unit number */ - __u32 msg; /* message */ + u32 msg; /* message */ }; struct i2o_cmd_passthru { @@ -131,53 +138,53 @@ typedef struct i2o_sg_io_hdr { #define I2O_BUS_UNKNOWN 0x80 typedef struct _i2o_pci_bus { - __u8 PciFunctionNumber; - __u8 PciDeviceNumber; - __u8 PciBusNumber; - __u8 reserved; - __u16 PciVendorID; - __u16 PciDeviceID; + u8 PciFunctionNumber; + u8 PciDeviceNumber; + u8 PciBusNumber; + u8 reserved; + u16 PciVendorID; + u16 PciDeviceID; } i2o_pci_bus; typedef struct _i2o_local_bus { - __u16 LbBaseIOPort; - __u16 reserved; - __u32 LbBaseMemoryAddress; + u16 LbBaseIOPort; + u16 reserved; + u32 LbBaseMemoryAddress; } i2o_local_bus; typedef struct _i2o_isa_bus { - __u16 IsaBaseIOPort; - __u8 CSN; - __u8 reserved; - __u32 IsaBaseMemoryAddress; + u16 IsaBaseIOPort; + u8 CSN; + u8 reserved; + u32 IsaBaseMemoryAddress; } i2o_isa_bus; typedef struct _i2o_eisa_bus_info { - __u16 EisaBaseIOPort; - __u8 reserved; - __u8 EisaSlotNumber; - __u32 EisaBaseMemoryAddress; + u16 EisaBaseIOPort; + u8 reserved; + u8 EisaSlotNumber; + u32 EisaBaseMemoryAddress; } i2o_eisa_bus; typedef struct _i2o_mca_bus { - __u16 McaBaseIOPort; - __u8 reserved; - __u8 McaSlotNumber; - __u32 McaBaseMemoryAddress; + u16 McaBaseIOPort; + u8 reserved; + u8 McaSlotNumber; + u32 McaBaseMemoryAddress; } i2o_mca_bus; typedef struct _i2o_other_bus { - __u16 BaseIOPort; - __u16 reserved; - __u32 BaseMemoryAddress; + u16 BaseIOPort; + u16 reserved; + u32 BaseMemoryAddress; } i2o_other_bus; typedef struct _i2o_hrt_entry { - __u32 adapter_id; - __u32 parent_tid:12; - __u32 state:4; - __u32 bus_num:8; - __u32 bus_type:8; + u32 adapter_id; + u32 parent_tid:12; + u32 state:4; + u32 bus_num:8; + u32 bus_type:8; union { i2o_pci_bus pci_bus; i2o_local_bus local_bus; @@ -189,66 +196,66 @@ typedef struct _i2o_hrt_entry { } i2o_hrt_entry; typedef struct _i2o_hrt { - __u16 num_entries; - __u8 entry_len; - __u8 hrt_version; - __u32 change_ind; + u16 num_entries; + u8 entry_len; + u8 hrt_version; + u32 change_ind; i2o_hrt_entry hrt_entry[1]; } i2o_hrt; typedef struct _i2o_lct_entry { - __u32 entry_size:16; - __u32 tid:12; - __u32 reserved:4; - __u32 change_ind; - __u32 device_flags; - __u32 class_id:12; - __u32 version:4; - __u32 vendor_id:16; - __u32 sub_class; - __u32 user_tid:12; - __u32 parent_tid:12; - __u32 bios_info:8; - __u8 identity_tag[8]; - __u32 event_capabilities; + u32 entry_size:16; + u32 tid:12; + u32 reserved:4; + u32 change_ind; + u32 device_flags; + u32 class_id:12; + u32 version:4; + u32 vendor_id:16; + u32 sub_class; + u32 user_tid:12; + u32 parent_tid:12; + u32 bios_info:8; + u8 identity_tag[8]; + u32 event_capabilities; } i2o_lct_entry; typedef struct _i2o_lct { - __u32 table_size:16; - __u32 boot_tid:12; - __u32 lct_ver:4; - __u32 iop_flags; - __u32 change_ind; + u32 table_size:16; + u32 boot_tid:12; + u32 lct_ver:4; + u32 iop_flags; + u32 change_ind; i2o_lct_entry lct_entry[1]; } i2o_lct; typedef struct _i2o_status_block { - __u16 org_id; - __u16 reserved; - __u16 iop_id:12; - __u16 reserved1:4; - __u16 host_unit_id; - __u16 segment_number:12; - __u16 i2o_version:4; - __u8 iop_state; - __u8 msg_type; - __u16 inbound_frame_size; - __u8 init_code; - __u8 reserved2; - __u32 max_inbound_frames; - __u32 cur_inbound_frames; - __u32 max_outbound_frames; + u16 org_id; + u16 reserved; + u16 iop_id:12; + u16 reserved1:4; + u16 host_unit_id; + u16 segment_number:12; + u16 i2o_version:4; + u8 iop_state; + u8 msg_type; + u16 inbound_frame_size; + u8 init_code; + u8 reserved2; + u32 max_inbound_frames; + u32 cur_inbound_frames; + u32 max_outbound_frames; char product_id[24]; - __u32 expected_lct_size; - __u32 iop_capabilities; - __u32 desired_mem_size; - __u32 current_mem_size; - __u32 current_mem_base; - __u32 desired_io_size; - __u32 current_io_size; - __u32 current_io_base; - __u32 reserved3:24; - __u32 cmd_status:8; + u32 expected_lct_size; + u32 iop_capabilities; + u32 desired_mem_size; + u32 current_mem_size; + u32 current_mem_base; + u32 desired_io_size; + u32 current_io_size; + u32 current_io_base; + u32 reserved3:24; + u32 cmd_status:8; } i2o_status_block; /* Event indicator mask flags */ diff --git a/include/linux/ide.h b/include/linux/ide.h index 99620451d..a8bef1d13 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -6,6 +6,7 @@ * Copyright (C) 1994-2002 Linus Torvalds & authors */ +#include #include #include #include @@ -552,6 +553,7 @@ typedef struct ide_drive_s { struct hd_driveid *id; /* drive model identification info */ struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ struct ide_settings_s *settings;/* /proc/ide/ drive settings */ + char devfs_name[64]; /* devfs crap */ struct hwif_s *hwif; /* actually (ide_hwif_t *) */ @@ -571,7 +573,6 @@ typedef struct ide_drive_s { u8 waiting_for_dma; /* dma currently in progress */ u8 unmask; /* okay to unmask other irqs */ u8 bswap; /* byte swap data */ - u8 noflush; /* don't attempt flushes */ u8 dsc_overlap; /* DSC overlap */ u8 nice1; /* give potential excess bandwidth */ @@ -630,7 +631,6 @@ typedef struct ide_drive_s { unsigned int usage; /* current "open()" count for drive */ unsigned int failures; /* current failure count */ unsigned int max_failures; /* maximum allowed failure count */ - u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ u64 capacity64; /* total number of sectors */ @@ -793,7 +793,6 @@ typedef struct hwif_s { unsigned auto_poll : 1; /* supports nop auto-poll */ unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ - unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ struct device gendev; struct completion gendev_rel_comp; /* To deal with device release() */ @@ -1007,8 +1006,6 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ extern int noautodma; extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); -int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, - int uptodate, int nr_sectors); /* * This is used on exit from the driver to designate the next irq handler @@ -1360,7 +1357,7 @@ extern struct semaphore ide_cfg_sem; * ide_drive_t->hwif: constant, no locking */ -#define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0) +#define local_irq_set(flags) do { local_save_flags((flags)); local_irq_enable(); } while (0) extern struct bus_type ide_bus_type; diff --git a/include/linux/idr.h b/include/linux/idr.h index 826803449..f559a719d 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h @@ -66,7 +66,7 @@ struct idr { .id_free = NULL, \ .layers = 0, \ .id_free_cnt = 0, \ - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ + .lock = SPIN_LOCK_UNLOCKED, \ } #define DEFINE_IDR(name) struct idr name = IDR_INIT(name) diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index e0a150046..1288a161b 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h @@ -102,7 +102,6 @@ struct fddihdr } hdr; } __attribute__ ((packed)); -#ifdef __KERNEL__ /* Define FDDI statistics structure */ struct fddi_statistics { @@ -194,6 +193,5 @@ struct fddi_statistics { __u32 port_ler_flag[2]; __u32 port_hardware_present[2]; }; -#endif /* __KERNEL__ */ #endif /* _LINUX_IF_FDDI_H */ diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index f272a80ca..395f0aad9 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h @@ -24,6 +24,7 @@ #ifndef _FRAD_H_ #define _FRAD_H_ +#include #include #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE) diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 2f94cf2c7..5502f597c 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h @@ -43,6 +43,7 @@ struct trh_hdr { }; #ifdef __KERNEL__ +#include #include static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index ab2740832..eef0876d8 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -23,8 +23,8 @@ struct vlan_collection; struct vlan_dev_info; struct hlist_node; +#include /* for proc_dir_entry */ #include -#include #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) * that VLAN requires. @@ -155,11 +155,6 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, { struct net_device_stats *stats; - if (skb_bond_should_drop(skb)) { - dev_kfree_skb_any(skb); - return NET_RX_DROP; - } - skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; if (skb->dev == NULL) { dev_kfree_skb_any(skb); @@ -190,8 +185,7 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (!compare_ether_addr(eth_hdr(skb)->h_dest, - skb->dev->dev_addr)) + if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) skb->pkt_type = PACKET_HOST; break; }; diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 899c3d477..28f4f3b36 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h @@ -169,7 +169,7 @@ struct ip_sf_list struct ip_mc_list { struct in_device *interface; - __be32 multiaddr; + unsigned long multiaddr; struct ip_sf_list *sources; struct ip_sf_list *tomb; unsigned int sfmode; diff --git a/include/linux/init.h b/include/linux/init.h index 6667785dd..93dcbe1ab 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -1,6 +1,7 @@ #ifndef _LINUX_INIT_H #define _LINUX_INIT_H +#include #include /* These macros are used to mark some functions or diff --git a/include/linux/init_task.h b/include/linux/init_task.h index ac9909bc5..e8864e6c0 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -3,8 +3,6 @@ #include #include -#include -#include #define INIT_FDTABLE \ { \ @@ -23,7 +21,7 @@ .count = ATOMIC_INIT(1), \ .fdt = &init_files.fdtab, \ .fdtab = INIT_FDTABLE, \ - .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \ + .file_lock = SPIN_LOCK_UNLOCKED, \ .next_fd = 0, \ .close_on_exec_init = { { 0, } }, \ .open_fds_init = { { 0, } }, \ @@ -38,7 +36,7 @@ .user_id = 0, \ .next = NULL, \ .wait = __WAIT_QUEUE_HEAD_INITIALIZER(name.wait), \ - .ctx_lock = __SPIN_LOCK_UNLOCKED(name.ctx_lock), \ + .ctx_lock = SPIN_LOCK_UNLOCKED, \ .reqs_active = 0U, \ .max_reqs = ~0U, \ } @@ -50,7 +48,7 @@ .mm_users = ATOMIC_INIT(2), \ .mm_count = ATOMIC_INIT(1), \ .mmap_sem = __RWSEM_INITIALIZER(name.mmap_sem), \ - .page_table_lock = __SPIN_LOCK_UNLOCKED(name.page_table_lock), \ + .page_table_lock = SPIN_LOCK_UNLOCKED, \ .mmlist = LIST_HEAD_INIT(name.mmlist), \ .cpu_vm_mask = CPU_MASK_ALL, \ } @@ -71,7 +69,7 @@ #define INIT_SIGHAND(sighand) { \ .count = ATOMIC_INIT(1), \ .action = { { { .sa_handler = NULL, } }, }, \ - .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ + .siglock = SPIN_LOCK_UNLOCKED, \ } extern struct group_info init_groups; @@ -89,7 +87,6 @@ extern struct group_info init_groups; .lock_depth = -1, \ .prio = MAX_PRIO-20, \ .static_prio = MAX_PRIO-20, \ - .normal_prio = MAX_PRIO-20, \ .policy = SCHED_NORMAL, \ .cpus_allowed = CPU_MASK_ALL, \ .mm = NULL, \ @@ -121,13 +118,11 @@ extern struct group_info init_groups; .list = LIST_HEAD_INIT(tsk.pending.list), \ .signal = {{0}}}, \ .blocked = {{0}}, \ - .alloc_lock = __SPIN_LOCK_UNLOCKED(tsk.alloc_lock), \ + .alloc_lock = SPIN_LOCK_UNLOCKED, \ + .proc_lock = SPIN_LOCK_UNLOCKED, \ .journal_info = NULL, \ .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .fs_excl = ATOMIC_INIT(0), \ - .pi_lock = SPIN_LOCK_UNLOCKED, \ - INIT_TRACE_IRQFLAGS \ - INIT_LOCKDEP \ .xid = 0, \ .vx_info = NULL, \ .nid = 0, \ diff --git a/include/linux/inotify.h b/include/linux/inotify.h index d4f48c640..09e00433c 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h @@ -67,66 +67,20 @@ struct inotify_event { #include #include - -/* - * struct inotify_watch - represents a watch request on a specific inode - * - * h_list is protected by ih->mutex of the associated inotify_handle. - * i_list, mask are protected by inode->inotify_mutex of the associated inode. - * ih, inode, and wd are never written to once the watch is created. - * - * Callers must use the established inotify interfaces to access inotify_watch - * contents. The content of this structure is private to the inotify - * implementation. - */ -struct inotify_watch { - struct list_head h_list; /* entry in inotify_handle's list */ - struct list_head i_list; /* entry in inode's list */ - atomic_t count; /* reference count */ - struct inotify_handle *ih; /* associated inotify handle */ - struct inode *inode; /* associated inode */ - __s32 wd; /* watch descriptor */ - __u32 mask; /* event mask for this watch */ -}; - -struct inotify_operations { - void (*handle_event)(struct inotify_watch *, u32, u32, u32, - const char *, struct inode *); - void (*destroy_watch)(struct inotify_watch *); -}; +#include #ifdef CONFIG_INOTIFY -/* Kernel API for producing events */ - extern void inotify_d_instantiate(struct dentry *, struct inode *); extern void inotify_d_move(struct dentry *); extern void inotify_inode_queue_event(struct inode *, __u32, __u32, - const char *, struct inode *); + const char *); extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32, const char *); extern void inotify_unmount_inodes(struct list_head *); extern void inotify_inode_is_dead(struct inode *); extern u32 inotify_get_cookie(void); -/* Kernel Consumer API */ - -extern struct inotify_handle *inotify_init(const struct inotify_operations *); -extern void inotify_init_watch(struct inotify_watch *); -extern void inotify_destroy(struct inotify_handle *); -extern __s32 inotify_find_watch(struct inotify_handle *, struct inode *, - struct inotify_watch **); -extern __s32 inotify_find_update_watch(struct inotify_handle *, struct inode *, - u32); -extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *, - struct inode *, __u32); -extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *); -extern int inotify_rm_wd(struct inotify_handle *, __u32); -extern void inotify_remove_watch_locked(struct inotify_handle *, - struct inotify_watch *); -extern void get_inotify_watch(struct inotify_watch *); -extern void put_inotify_watch(struct inotify_watch *); - #else static inline void inotify_d_instantiate(struct dentry *dentry, @@ -140,8 +94,7 @@ static inline void inotify_d_move(struct dentry *dentry) static inline void inotify_inode_queue_event(struct inode *inode, __u32 mask, __u32 cookie, - const char *filename, - struct inode *n_inode) + const char *filename) { } @@ -164,62 +117,6 @@ static inline u32 inotify_get_cookie(void) return 0; } -static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops) -{ - return ERR_PTR(-EOPNOTSUPP); -} - -static inline void inotify_init_watch(struct inotify_watch *watch) -{ -} - -static inline void inotify_destroy(struct inotify_handle *ih) -{ -} - -static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode, - struct inotify_watch **watchp) -{ - return -EOPNOTSUPP; -} - -static inline __s32 inotify_find_update_watch(struct inotify_handle *ih, - struct inode *inode, u32 mask) -{ - return -EOPNOTSUPP; -} - -static inline __s32 inotify_add_watch(struct inotify_handle *ih, - struct inotify_watch *watch, - struct inode *inode, __u32 mask) -{ - return -EOPNOTSUPP; -} - -static inline int inotify_rm_watch(struct inotify_handle *ih, - struct inotify_watch *watch) -{ - return -EOPNOTSUPP; -} - -static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd) -{ - return -EOPNOTSUPP; -} - -static inline void inotify_remove_watch_locked(struct inotify_handle *ih, - struct inotify_watch *watch) -{ -} - -static inline void get_inotify_watch(struct inotify_watch *watch) -{ -} - -static inline void put_inotify_watch(struct inotify_watch *watch) -{ -} - #endif /* CONFIG_INOTIFY */ #endif /* __KERNEL __ */ diff --git a/include/linux/input.h b/include/linux/input.h index b3253ab72..ce1a756c4 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -15,7 +15,6 @@ #else #include #include -#include #include #endif @@ -232,8 +231,7 @@ struct input_absinfo { #define KEY_PAUSE 119 #define KEY_KPCOMMA 121 -#define KEY_HANGEUL 122 -#define KEY_HANGUEL KEY_HANGEUL +#define KEY_HANGUEL 122 #define KEY_HANJA 123 #define KEY_YEN 124 #define KEY_LEFTMETA 125 @@ -893,6 +891,7 @@ struct input_dev { int (*open)(struct input_dev *dev); void (*close)(struct input_dev *dev); + int (*accept)(struct input_dev *dev, struct file *file); int (*flush)(struct input_dev *dev, struct file *file); int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); @@ -960,26 +959,6 @@ struct input_dev { struct input_handle; -/** - * struct input_handler - implements one of interfaces for input devices - * @private: driver-specific data - * @event: event handler - * @connect: called when attaching a handler to an input device - * @disconnect: disconnects a handler from input device - * @start: starts handler for given handle. This function is called by - * input core right after connect() method and also when a process - * that "grabbed" a device releases it - * @fops: file operations this driver implements - * @minor: beginning of range of 32 minors for devices this driver - * can provide - * @name: name of the handler, to be shown in /proc/bus/input/handlers - * @id_table: pointer to a table of input_device_ids this driver can - * handle - * @blacklist: prointer to a table of input_device_ids this driver should - * ignore even if they match @id_table - * @h_list: list of input handles associated with the handler - * @node: for placing the driver onto input_handler_list - */ struct input_handler { void *private; @@ -987,7 +966,6 @@ struct input_handler { void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); void (*disconnect)(struct input_handle *handle); - void (*start)(struct input_handle *handle); const struct file_operations *fops; int minor; @@ -1026,7 +1004,6 @@ static inline void init_input_dev(struct input_dev *dev) } struct input_dev *input_allocate_device(void); -void input_free_device(struct input_dev *dev); static inline struct input_dev *input_get_device(struct input_dev *dev) { @@ -1038,6 +1015,12 @@ static inline void input_put_device(struct input_dev *dev) class_device_put(&dev->cdev); } +static inline void input_free_device(struct input_dev *dev) +{ + if (dev) + input_put_device(dev); +} + int input_register_device(struct input_dev *); void input_unregister_device(struct input_dev *); @@ -1050,10 +1033,10 @@ void input_release_device(struct input_handle *); int input_open_device(struct input_handle *); void input_close_device(struct input_handle *); +int input_accept_process(struct input_handle *handle, struct file *file); int input_flush_device(struct input_handle* handle, struct file* file); void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); -void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value); static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) { diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 1463c0927..d55ff51ff 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -2,67 +2,37 @@ #ifndef _LINUX_INTERRUPT_H #define _LINUX_INTERRUPT_H +#include #include #include #include #include #include -#include #include #include -#include #include #include #include /* - * These correspond to the IORESOURCE_IRQ_* defines in - * linux/ioport.h to select the interrupt line behaviour. When - * requesting an interrupt without specifying a IRQF_TRIGGER, the - * setting should be assumed to be "as already configured", which - * may be as per machine or firmware initialisation. - */ -#define IRQF_TRIGGER_NONE 0x00000000 -#define IRQF_TRIGGER_RISING 0x00000001 -#define IRQF_TRIGGER_FALLING 0x00000002 -#define IRQF_TRIGGER_HIGH 0x00000004 -#define IRQF_TRIGGER_LOW 0x00000008 -#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \ - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING) -#define IRQF_TRIGGER_PROBE 0x00000010 - -/* - * These flags used only by the kernel as part of the - * irq handling routines. + * For 2.4.x compatibility, 2.4.x can use * - * IRQF_DISABLED - keep irqs disabled when calling the action handler - * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator - * IRQF_SHARED - allow sharing the irq among several devices - * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur - * IRQF_TIMER - Flag to mark this interrupt as timer interrupt + * typedef void irqreturn_t; + * #define IRQ_NONE + * #define IRQ_HANDLED + * #define IRQ_RETVAL(x) + * + * To mix old-style and new-style irq handler returns. + * + * IRQ_NONE means we didn't handle it. + * IRQ_HANDLED means that we did have a valid interrupt and handled it. + * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) */ -#define IRQF_DISABLED 0x00000020 -#define IRQF_SAMPLE_RANDOM 0x00000040 -#define IRQF_SHARED 0x00000080 -#define IRQF_PROBE_SHARED 0x00000100 -#define IRQF_TIMER 0x00000200 -#define IRQF_PERCPU 0x00000400 +typedef int irqreturn_t; -/* - * Migration helpers. Scheduled for removal in 1/2007 - * Do not use for new code ! - */ -#define SA_INTERRUPT IRQF_DISABLED -#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM -#define SA_SHIRQ IRQF_SHARED -#define SA_PROBEIRQ IRQF_PROBE_SHARED -#define SA_PERCPU IRQF_PERCPU - -#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW -#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH -#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING -#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING -#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK +#define IRQ_NONE (0) +#define IRQ_HANDLED (1) +#define IRQ_RETVAL(x) ((x) != 0) struct irqaction { irqreturn_t (*handler)(int, void *, struct pt_regs *); @@ -81,90 +51,12 @@ extern int request_irq(unsigned int, unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); -/* - * On lockdep we dont want to enable hardirqs in hardirq - * context. Use local_irq_enable_in_hardirq() to annotate - * kernel code that has to do this nevertheless (pretty much - * the only valid case is for old/broken hardware that is - * insanely slow). - * - * NOTE: in theory this might break fragile code that relies - * on hardirq delivery - in practice we dont seem to have such - * places left. So the only effect should be slightly increased - * irqs-off latencies. - */ -#ifdef CONFIG_LOCKDEP -# define local_irq_enable_in_hardirq() do { } while (0) -#else -# define local_irq_enable_in_hardirq() local_irq_enable() -#endif #ifdef CONFIG_GENERIC_HARDIRQS extern void disable_irq_nosync(unsigned int irq); extern void disable_irq(unsigned int irq); extern void enable_irq(unsigned int irq); - -/* - * Special lockdep variants of irq disabling/enabling. - * These should be used for locking constructs that - * know that a particular irq context which is disabled, - * and which is the only irq-context user of a lock, - * that it's safe to take the lock in the irq-disabled - * section without disabling hardirqs. - * - * On !CONFIG_LOCKDEP they are equivalent to the normal - * irq disable/enable methods. - */ -static inline void disable_irq_nosync_lockdep(unsigned int irq) -{ - disable_irq_nosync(irq); -#ifdef CONFIG_LOCKDEP - local_irq_disable(); #endif -} - -static inline void disable_irq_lockdep(unsigned int irq) -{ - disable_irq(irq); -#ifdef CONFIG_LOCKDEP - local_irq_disable(); -#endif -} - -static inline void enable_irq_lockdep(unsigned int irq) -{ -#ifdef CONFIG_LOCKDEP - local_irq_enable(); -#endif - enable_irq(irq); -} - -/* IRQ wakeup (PM) control: */ -extern int set_irq_wake(unsigned int irq, unsigned int on); - -static inline int enable_irq_wake(unsigned int irq) -{ - return set_irq_wake(irq, 1); -} - -static inline int disable_irq_wake(unsigned int irq) -{ - return set_irq_wake(irq, 0); -} - -#else /* !CONFIG_GENERIC_HARDIRQS */ -/* - * NOTE: non-genirq architectures, if they want to support the lock - * validator need to define the methods below in their asm/irq.h - * files, under an #ifdef CONFIG_LOCKDEP section. - */ -# ifndef CONFIG_LOCKDEP -# define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq) -# define disable_irq_lockdep(irq) disable_irq(irq) -# define enable_irq_lockdep(irq) enable_irq(irq) -# endif - -#endif /* CONFIG_GENERIC_HARDIRQS */ #ifdef CONFIG_HAVE_IRQ_IGNORE_UNHANDLED int irq_ignore_unhandled(unsigned int irq); @@ -206,11 +98,13 @@ static inline void __deprecated save_and_cli(unsigned long *x) #define save_and_cli(x) save_and_cli(&x) #endif /* CONFIG_SMP */ -extern void local_bh_disable(void); -extern void __local_bh_enable(void); -extern void _local_bh_enable(void); +/* SoftIRQ primitives. */ +#define local_bh_disable() \ + do { add_preempt_count(SOFTIRQ_OFFSET); barrier(); } while (0) +#define __local_bh_enable() \ + do { barrier(); sub_preempt_count(SOFTIRQ_OFFSET); } while (0) + extern void local_bh_enable(void); -extern void local_bh_enable_ip(unsigned long ip); /* PLEASE, avoid to allocate new softirqs, if you need not _really_ high frequency threaded job scheduling. For almost all the purposes diff --git a/include/linux/io.h b/include/linux/io.h index 420e2fdf2..85533ec5a 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -21,6 +21,5 @@ #include void __iowrite32_copy(void __iomem *to, const void *from, size_t count); -void __iowrite64_copy(void __iomem *to, const void *from, size_t count); #endif /* _LINUX_IO_H */ diff --git a/include/linux/ioc4.h b/include/linux/ioc4.h index de73a3289..3dd18b785 100644 --- a/include/linux/ioc4.h +++ b/include/linux/ioc4.h @@ -147,10 +147,6 @@ struct ioc4_misc_regs { #define IOC4_GPCR_EDGE_6 0x40 #define IOC4_GPCR_EDGE_7 0x80 -#define IOC4_VARIANT_IO9 0x0900 -#define IOC4_VARIANT_PCI_RT 0x0901 -#define IOC4_VARIANT_IO10 0x1000 - /* One of these per IOC4 */ struct ioc4_driver_data { struct list_head idd_list; @@ -160,7 +156,6 @@ struct ioc4_driver_data { struct __iomem ioc4_misc_regs *idd_misc_regs; unsigned long count_period; void *idd_serial_data; - unsigned int idd_variant; }; /* One per submodule */ diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d42c83399..cd6bd001b 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -9,15 +9,13 @@ #define _LINUX_IOPORT_H #include -#include /* * Resources are tree-like, allowing * nesting etc.. */ struct resource { - resource_size_t start; - resource_size_t end; const char *name; + unsigned long start, end; unsigned long flags; struct resource *parent, *sibling, *child; }; @@ -55,7 +53,6 @@ struct resource_list { #define IORESOURCE_IRQ_LOWEDGE (1<<1) #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) #define IORESOURCE_IRQ_LOWLEVEL (1<<3) -#define IORESOURCE_IRQ_SHAREABLE (1<<4) /* ISA PnP DMA specific bits (IORESOURCE_BITS) */ #define IORESOURCE_DMA_TYPE_MASK (3<<0) @@ -97,39 +94,33 @@ extern struct resource iomem_resource; extern int request_resource(struct resource *root, struct resource *new); extern struct resource * ____request_resource(struct resource *root, struct resource *new); extern int release_resource(struct resource *new); -extern int insert_resource(struct resource *parent, struct resource *new); +extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); extern int allocate_resource(struct resource *root, struct resource *new, - resource_size_t size, resource_size_t min, - resource_size_t max, resource_size_t align, + unsigned long size, + unsigned long min, unsigned long max, + unsigned long align, void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), + unsigned long, unsigned long), void *alignf_data); -int adjust_resource(struct resource *res, resource_size_t start, - resource_size_t size); - -/* get registered SYSTEM_RAM resources in specified area */ -extern int find_next_system_ram(struct resource *res); +int adjust_resource(struct resource *res, unsigned long start, + unsigned long size); /* Convenience shorthand with allocation */ #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) #define rename_region(region, newname) do { (region)->name = (newname); } while (0) -extern struct resource * __request_region(struct resource *, - resource_size_t start, - resource_size_t n, const char *name); +extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); /* Compatibility cruft */ #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) -extern int __check_region(struct resource *, resource_size_t, resource_size_t); -extern void __release_region(struct resource *, resource_size_t, - resource_size_t); +extern int __check_region(struct resource *, unsigned long, unsigned long); +extern void __release_region(struct resource *, unsigned long, unsigned long); -static inline int __deprecated check_region(resource_size_t s, - resource_size_t n) +static inline int __deprecated check_region(unsigned long s, unsigned long n) { return __check_region(&ioport_resource, s, n); } diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8e2042b9d..88d5961f7 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -59,6 +59,27 @@ static inline int task_nice_ioprio(struct task_struct *task) /* * For inheritance, return the highest of the two given priorities */ -extern int ioprio_best(unsigned short aprio, unsigned short bprio); +static inline int ioprio_best(unsigned short aprio, unsigned short bprio) +{ + unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); + unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); + + if (!ioprio_valid(aprio)) + return bprio; + if (!ioprio_valid(bprio)) + return aprio; + + if (aclass == IOPRIO_CLASS_NONE) + aclass = IOPRIO_CLASS_BE; + if (bclass == IOPRIO_CLASS_NONE) + bclass = IOPRIO_CLASS_BE; + + if (aclass == bclass) + return min(aprio, bprio); + if (aclass > bclass) + return bprio; + else + return aprio; +} #endif diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index d09fbeabf..0a84b5693 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h @@ -36,6 +36,7 @@ #include #include +#include /* * This file describes an interface to an IPMI driver. You have to @@ -209,8 +210,11 @@ struct kernel_ipmi_msg */ #include #include -#include + +#ifdef CONFIG_PROC_FS #include +extern struct proc_dir_entry *proc_ipmi_root; +#endif /* CONFIG_PROC_FS */ /* Opaque type for a IPMI message user. One of these is needed to send and receive messages. */ diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 297853c84..1263d8cb3 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -1,6 +1,7 @@ #ifndef _IPV6_H #define _IPV6_H +#include #include #include diff --git a/include/linux/irq.h b/include/linux/irq.h index fbf6d901e..ee2a82a57 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_IRQ_H -#define _LINUX_IRQ_H +#ifndef __irq_h +#define __irq_h /* * Please do not include this file in generic code. There is currently @@ -9,190 +9,99 @@ * Thanks. --rmk */ +#include #include -#ifndef CONFIG_S390 +#if !defined(CONFIG_S390) #include #include #include #include -#include #include #include /* * IRQ line status. - * - * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h - * - * IRQ types */ -#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ -#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ -#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ -#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) -#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ -#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ -#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ -#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ - -/* Internal flags */ -#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */ -#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */ -#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */ -#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */ -#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */ -#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ -#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ -#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ -#define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ -#ifdef CONFIG_IRQ_PER_CPU +#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ +#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ +#define IRQ_PENDING 4 /* IRQ pending - replay on enable */ +#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ +#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ +#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ +#define IRQ_LEVEL 64 /* IRQ level triggered */ +#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ +#if defined(ARCH_HAS_IRQ_PER_CPU) +# define IRQ_PER_CPU 256 /* IRQ is per CPU */ # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) #else # define CHECK_IRQ_PER_CPU(var) 0 #endif -#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */ -#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ -#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ -#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ -#define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */ - -struct proc_dir_entry; - -/** - * struct irq_chip - hardware interrupt chip descriptor - * - * @name: name for /proc/interrupts - * @startup: start up the interrupt (defaults to ->enable if NULL) - * @shutdown: shut down the interrupt (defaults to ->disable if NULL) - * @enable: enable the interrupt (defaults to chip->unmask if NULL) - * @disable: disable the interrupt (defaults to chip->mask if NULL) - * @ack: start of a new interrupt - * @mask: mask an interrupt source - * @mask_ack: ack and mask an interrupt source - * @unmask: unmask an interrupt source - * @eoi: end of interrupt - chip level - * @end: end of interrupt - flow level - * @set_affinity: set the CPU affinity on SMP machines - * @retrigger: resend an IRQ to the CPU - * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ - * @set_wake: enable/disable power-management wake-on of an IRQ - * - * @release: release function solely used by UML - * @typename: obsoleted by name, kept as migration helper +/* + * Interrupt controller descriptor. This is all we need + * to describe about the low-level hardware. */ -struct irq_chip { - const char *name; - unsigned int (*startup)(unsigned int irq); - void (*shutdown)(unsigned int irq); - void (*enable)(unsigned int irq); - void (*disable)(unsigned int irq); - - void (*ack)(unsigned int irq); - void (*mask)(unsigned int irq); - void (*mask_ack)(unsigned int irq); - void (*unmask)(unsigned int irq); - void (*eoi)(unsigned int irq); - - void (*end)(unsigned int irq); - void (*set_affinity)(unsigned int irq, cpumask_t dest); - int (*retrigger)(unsigned int irq); - int (*set_type)(unsigned int irq, unsigned int flow_type); - int (*set_wake)(unsigned int irq, unsigned int on); - +struct hw_interrupt_type { + const char * typename; + unsigned int (*startup)(unsigned int irq); + void (*shutdown)(unsigned int irq); + void (*enable)(unsigned int irq); + void (*disable)(unsigned int irq); + void (*ack)(unsigned int irq); + void (*end)(unsigned int irq); + void (*set_affinity)(unsigned int irq, cpumask_t dest); /* Currently used only by UML, might disappear one day.*/ #ifdef CONFIG_IRQ_RELEASE_METHOD - void (*release)(unsigned int irq, void *dev_id); + void (*release)(unsigned int irq, void *dev_id); #endif - /* - * For compatibility, ->typename is copied into ->name. - * Will disappear. - */ - const char *typename; }; -/** - * struct irq_desc - interrupt descriptor - * - * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] - * @chip: low level interrupt hardware access - * @handler_data: per-IRQ data for the irq_chip methods - * @chip_data: platform-specific per-chip private data for the chip - * methods, to allow shared chip implementations - * @action: the irq action chain - * @status: status information - * @depth: disable-depth, for nested irq_disable() calls - * @wake_depth: enable depth, for multiple set_irq_wake() callers - * @irq_count: stats field to detect stalled irqs - * @irqs_unhandled: stats field for spurious unhandled interrupts - * @lock: locking for SMP - * @affinity: IRQ affinity on SMP - * @cpu: cpu index useful for balancing - * @pending_mask: pending rebalanced interrupts - * @move_irq: need to re-target IRQ destination - * @dir: /proc/irq/ procfs entry - * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP +typedef struct hw_interrupt_type hw_irq_controller; + +/* + * This is the "IRQ descriptor", which contains various information + * about the irq, including what kind of hardware handling it has, + * whether it is disabled etc etc. * * Pad this out to 32 bytes for cache and indexing reasons. */ -struct irq_desc { - void fastcall (*handle_irq)(unsigned int irq, - struct irq_desc *desc, - struct pt_regs *regs); - struct irq_chip *chip; - void *handler_data; - void *chip_data; - struct irqaction *action; /* IRQ action list */ - unsigned int status; /* IRQ status */ - - unsigned int depth; /* nested irq disables */ - unsigned int wake_depth; /* nested wake enables */ - unsigned int irq_count; /* For detecting broken IRQs */ - unsigned int irqs_unhandled; - spinlock_t lock; -#ifdef CONFIG_SMP - cpumask_t affinity; - unsigned int cpu; -#endif -#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) - cpumask_t pending_mask; - unsigned int move_irq; /* need to re-target IRQ dest */ -#endif -#ifdef CONFIG_PROC_FS - struct proc_dir_entry *dir; +typedef struct irq_desc { + hw_irq_controller *handler; + void *handler_data; + struct irqaction *action; /* IRQ action list */ + unsigned int status; /* IRQ status */ + unsigned int depth; /* nested irq disables */ + unsigned int irq_count; /* For detecting broken interrupts */ + unsigned int irqs_unhandled; + spinlock_t lock; +#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) + unsigned int move_irq; /* Flag need to re-target intr dest*/ #endif -} ____cacheline_aligned; +} ____cacheline_aligned irq_desc_t; -extern struct irq_desc irq_desc[NR_IRQS]; +extern irq_desc_t irq_desc [NR_IRQS]; -/* - * Migration helpers for obsolete names, they will go away: - */ -#define hw_interrupt_type irq_chip -typedef struct irq_chip hw_irq_controller; -#define no_irq_type no_irq_chip -typedef struct irq_desc irq_desc_t; +/* Return a pointer to the irq descriptor for IRQ. */ +static inline irq_desc_t * +irq_descp (int irq) +{ + return irq_desc + irq; +} -/* - * Pick up the arch-dependent methods: - */ -#include +#include /* the arch dependent stuff */ -extern int setup_irq(unsigned int irq, struct irqaction *new); +extern int setup_irq(unsigned int irq, struct irqaction * new); #ifdef CONFIG_GENERIC_HARDIRQS - -#ifndef handle_dynamic_tick -# define handle_dynamic_tick(a) do { } while (0) -#endif +extern cpumask_t irq_affinity[NR_IRQS]; #ifdef CONFIG_SMP static inline void set_native_irq_info(int irq, cpumask_t mask) { - irq_desc[irq].affinity = mask; + irq_affinity[irq] = mask; } #else static inline void set_native_irq_info(int irq, cpumask_t mask) @@ -202,7 +111,8 @@ static inline void set_native_irq_info(int irq, cpumask_t mask) #ifdef CONFIG_SMP -#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) +#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) +extern cpumask_t pending_irq_cpumask[NR_IRQS]; void set_pending_irq(unsigned int irq, cpumask_t mask); void move_native_irq(int irq); @@ -223,7 +133,7 @@ static inline void set_irq_info(int irq, cpumask_t mask) { } -#else /* CONFIG_PCI_MSI */ +#else // CONFIG_PCI_MSI static inline void move_irq(int irq) { @@ -234,178 +144,53 @@ static inline void set_irq_info(int irq, cpumask_t mask) { set_native_irq_info(irq, mask); } +#endif // CONFIG_PCI_MSI -#endif /* CONFIG_PCI_MSI */ - -#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */ - -static inline void move_irq(int irq) -{ -} - -static inline void move_native_irq(int irq) -{ -} - -static inline void set_pending_irq(unsigned int irq, cpumask_t mask) -{ -} +#else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE +#define move_irq(x) +#define move_native_irq(x) +#define set_pending_irq(x,y) static inline void set_irq_info(int irq, cpumask_t mask) { set_native_irq_info(irq, mask); } -#endif /* CONFIG_GENERIC_PENDING_IRQ */ +#endif // CONFIG_GENERIC_PENDING_IRQ -#else /* CONFIG_SMP */ +#else // CONFIG_SMP #define move_irq(x) #define move_native_irq(x) -#endif /* CONFIG_SMP */ - -#ifdef CONFIG_IRQBALANCE -extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); -#else -static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) -{ -} -#endif - -#ifdef CONFIG_AUTO_IRQ_AFFINITY -extern int select_smp_affinity(unsigned int irq); -#else -static inline int select_smp_affinity(unsigned int irq) -{ - return 1; -} -#endif +#endif // CONFIG_SMP extern int no_irq_affinity; - -/* Handle irq action chains: */ -extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, - struct irqaction *action); - -/* - * Built-in IRQ handlers for various IRQ types, - * callable via desc->chip->handle_irq() - */ -extern void fastcall -handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); -extern void fastcall -handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs); -extern void fastcall -handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); -extern void fastcall -handle_simple_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs); -extern void fastcall -handle_percpu_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs); -extern void fastcall -handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); - -/* - * Get a descriptive string for the highlevel handler, for - * /proc/interrupts output: - */ -extern const char * -handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)); - -/* - * Monolithic do_IRQ implementation. - * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) - */ -extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); - -/* - * Architectures call this to let the generic IRQ layer - * handle an interrupt. If the descriptor is attached to an - * irqchip-style controller then we call the ->handle_irq() handler, - * and it calls __do_IRQ() if it's attached to an irqtype-style controller. - */ -static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) -{ - struct irq_desc *desc = irq_desc + irq; - - if (likely(desc->handle_irq)) - desc->handle_irq(irq, desc, regs); - else - __do_IRQ(irq, regs); -} - -/* Handling of unhandled and spurious interrupts: */ -extern void note_interrupt(unsigned int irq, struct irq_desc *desc, - int action_ret, struct pt_regs *regs); - -/* Resending of interrupts :*/ -void check_irq_resend(struct irq_desc *desc, unsigned int irq); - -/* Initialize /proc/irq/ */ -extern void init_irq_proc(void); - -/* Enable/disable irq debugging output: */ extern int noirqdebug_setup(char *str); -/* Checks whether the interrupt can be requested by request_irq(): */ +extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, + struct irqaction *action); +extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); +extern void note_interrupt(unsigned int irq, irq_desc_t *desc, + int action_ret, struct pt_regs *regs); extern int can_request_irq(unsigned int irq, unsigned long irqflags); -/* Dummy irq-chip implementations: */ -extern struct irq_chip no_irq_chip; -extern struct irq_chip dummy_irq_chip; - -extern void -set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, - void fastcall (*handle)(unsigned int, - struct irq_desc *, - struct pt_regs *)); -extern void -__set_irq_handler(unsigned int irq, - void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *), - int is_chained); - -/* - * Set a highlevel flow handler for a given IRQ: - */ -static inline void -set_irq_handler(unsigned int irq, - void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)) -{ - __set_irq_handler(irq, handle, 0); -} +extern void init_irq_proc(void); -/* - * Set a highlevel chained flow handler for a given IRQ. - * (a chained handler is automatically enabled and set to - * IRQ_NOREQUEST and IRQ_NOPROBE) - */ -static inline void -set_irq_chained_handler(unsigned int irq, - void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)) +#ifdef CONFIG_AUTO_IRQ_AFFINITY +extern int select_smp_affinity(unsigned int irq); +#else +static inline int +select_smp_affinity(unsigned int irq) { - __set_irq_handler(irq, handle, 1); + return 1; } +#endif -/* Set/get chip/data for an IRQ: */ - -extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); -extern int set_irq_data(unsigned int irq, void *data); -extern int set_irq_chip_data(unsigned int irq, void *data); -extern int set_irq_type(unsigned int irq, unsigned int type); - -#define get_irq_chip(irq) (irq_desc[irq].chip) -#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) -#define get_irq_data(irq) (irq_desc[irq].handler_data) +#endif -#endif /* CONFIG_GENERIC_HARDIRQS */ +extern hw_irq_controller no_irq_type; /* needed in every arch ? */ -#endif /* !CONFIG_S390 */ +#endif -#endif /* _LINUX_IRQ_H */ +#endif /* __irq_h */ diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h index 77e4bac29..af93505ec 100644 --- a/include/linux/irq_cpustat.h +++ b/include/linux/irq_cpustat.h @@ -9,6 +9,7 @@ * Keith Owens July 2000. */ +#include /* * Simple wrappers reducing source bloat. Define all irq_stat fields diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h deleted file mode 100644 index 412e025bc..000000000 --- a/include/linux/irqflags.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * include/linux/irqflags.h - * - * IRQ flags tracing: follow the state of the hardirq and softirq flags and - * provide callbacks for transitions between ON and OFF states. - * - * This file gets included from lowlevel asm headers too, to provide - * wrapped versions of the local_irq_*() APIs, based on the - * raw_local_irq_*() macros from the lowlevel headers. - */ -#ifndef _LINUX_TRACE_IRQFLAGS_H -#define _LINUX_TRACE_IRQFLAGS_H - -#ifdef CONFIG_TRACE_IRQFLAGS - extern void trace_hardirqs_on(void); - extern void trace_hardirqs_off(void); - extern void trace_softirqs_on(unsigned long ip); - extern void trace_softirqs_off(unsigned long ip); -# define trace_hardirq_context(p) ((p)->hardirq_context) -# define trace_softirq_context(p) ((p)->softirq_context) -# define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled) -# define trace_softirqs_enabled(p) ((p)->softirqs_enabled) -# define trace_hardirq_enter() do { current->hardirq_context++; } while (0) -# define trace_hardirq_exit() do { current->hardirq_context--; } while (0) -# define trace_softirq_enter() do { current->softirq_context++; } while (0) -# define trace_softirq_exit() do { current->softirq_context--; } while (0) -# define INIT_TRACE_IRQFLAGS .softirqs_enabled = 1, -#else -# define trace_hardirqs_on() do { } while (0) -# define trace_hardirqs_off() do { } while (0) -# define trace_softirqs_on(ip) do { } while (0) -# define trace_softirqs_off(ip) do { } while (0) -# define trace_hardirq_context(p) 0 -# define trace_softirq_context(p) 0 -# define trace_hardirqs_enabled(p) 0 -# define trace_softirqs_enabled(p) 0 -# define trace_hardirq_enter() do { } while (0) -# define trace_hardirq_exit() do { } while (0) -# define trace_softirq_enter() do { } while (0) -# define trace_softirq_exit() do { } while (0) -# define INIT_TRACE_IRQFLAGS -#endif - -#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT - -#include - -#define local_irq_enable() \ - do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0) -#define local_irq_disable() \ - do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) -#define local_irq_save(flags) \ - do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0) - -#define local_irq_restore(flags) \ - do { \ - if (raw_irqs_disabled_flags(flags)) { \ - raw_local_irq_restore(flags); \ - trace_hardirqs_off(); \ - } else { \ - trace_hardirqs_on(); \ - raw_local_irq_restore(flags); \ - } \ - } while (0) -#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */ -/* - * The local_irq_*() APIs are equal to the raw_local_irq*() - * if !TRACE_IRQFLAGS. - */ -# define raw_local_irq_disable() local_irq_disable() -# define raw_local_irq_enable() local_irq_enable() -# define raw_local_irq_save(flags) local_irq_save(flags) -# define raw_local_irq_restore(flags) local_irq_restore(flags) -#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ - -#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT -#define safe_halt() \ - do { \ - trace_hardirqs_on(); \ - raw_safe_halt(); \ - } while (0) - -#define local_save_flags(flags) raw_local_save_flags(flags) - -#define irqs_disabled() \ -({ \ - unsigned long flags; \ - \ - raw_local_save_flags(flags); \ - raw_irqs_disabled_flags(flags); \ -}) - -#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) -#endif /* CONFIG_X86 */ - -#endif diff --git a/include/linux/irqreturn.h b/include/linux/irqreturn.h deleted file mode 100644 index 881883c20..000000000 --- a/include/linux/irqreturn.h +++ /dev/null @@ -1,25 +0,0 @@ -/* irqreturn.h */ -#ifndef _LINUX_IRQRETURN_H -#define _LINUX_IRQRETURN_H - -/* - * For 2.4.x compatibility, 2.4.x can use - * - * typedef void irqreturn_t; - * #define IRQ_NONE - * #define IRQ_HANDLED - * #define IRQ_RETVAL(x) - * - * To mix old-style and new-style irq handler returns. - * - * IRQ_NONE means we didn't handle it. - * IRQ_HANDLED means that we did have a valid interrupt and handled it. - * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled) - */ -typedef int irqreturn_t; - -#define IRQ_NONE (0) -#define IRQ_HANDLED (1) -#define IRQ_RETVAL(x) ((x) != 0) - -#endif diff --git a/include/linux/isa.h b/include/linux/isa.h deleted file mode 100644 index 1b855335c..000000000 --- a/include/linux/isa.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ISA bus. - */ - -#ifndef __LINUX_ISA_H -#define __LINUX_ISA_H - -#include -#include - -struct isa_driver { - int (*match)(struct device *, unsigned int); - int (*probe)(struct device *, unsigned int); - int (*remove)(struct device *, unsigned int); - void (*shutdown)(struct device *, unsigned int); - int (*suspend)(struct device *, unsigned int, pm_message_t); - int (*resume)(struct device *, unsigned int); - - struct device_driver driver; - struct device *devices; -}; - -#define to_isa_driver(x) container_of((x), struct isa_driver, driver) - -int isa_register_driver(struct isa_driver *, unsigned int); -void isa_unregister_driver(struct isa_driver *); - -#endif /* __LINUX_ISA_H */ diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 1e8728a9e..26c64c286 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -22,6 +22,7 @@ #ifndef LINUX_ISAPNP_H #define LINUX_ISAPNP_H +#include #include #include diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 62991148d..53eaee960 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -146,6 +146,7 @@ typedef struct { #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/linux/isdn/Kbuild b/include/linux/isdn/Kbuild deleted file mode 100644 index 991cdb29a..000000000 --- a/include/linux/isdn/Kbuild +++ /dev/null @@ -1 +0,0 @@ -header-y += capicmd.h diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h new file mode 100644 index 000000000..9f65bea49 --- /dev/null +++ b/include/linux/isdn/tpam.h @@ -0,0 +1,56 @@ +/* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $ + * + * Turbo PAM ISDN driver for Linux. (Kernel Driver) + * + * Copyright 2001 Stelian Pop , Alcôve + * + * For all support questions please contact: + * + * 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, 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 _TPAM_H_ +#define _TPAM_H_ + +#include +#include + +/* IOCTL commands */ +#define TPAM_CMD_DSPLOAD 0x0001 +#define TPAM_CMD_DSPSAVE 0x0002 +#define TPAM_CMD_DSPRUN 0x0003 +#define TPAM_CMD_LOOPMODEON 0x0004 +#define TPAM_CMD_LOOPMODEOFF 0x0005 + +/* addresses of debug information zones on board */ +#define TPAM_TRAPAUDIT_REGISTER 0x005493e4 +#define TPAM_NCOAUDIT_REGISTER 0x00500000 +#define TPAM_MSGAUDIT_REGISTER 0x008E30F0 + +/* length of debug information zones on board */ +#define TPAM_TRAPAUDIT_LENGTH 10000 +#define TPAM_NCOAUDIT_LENGTH 300000 +#define TPAM_NCOAUDIT_COUNT 30 +#define TPAM_MSGAUDIT_LENGTH 60000 + +/* IOCTL load/save parameter */ +typedef struct tpam_dsp_ioctl { + __u32 address; /* address to load/save data */ + __u32 data_len; /* size of data to be loaded/saved */ + __u8 data[0]; /* data */ +} tpam_dsp_ioctl; + +#endif /* _TPAM_H_ */ diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 8687a7dc0..26b00a76e 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h @@ -67,6 +67,7 @@ struct isdn_ppp_comp_data { #ifdef __KERNEL__ +#include #ifdef CONFIG_IPPP_FILTER #include diff --git a/include/linux/isdnif.h b/include/linux/isdnif.h index b9b5a684e..04e10f9f1 100644 --- a/include/linux/isdnif.h +++ b/include/linux/isdnif.h @@ -54,6 +54,7 @@ #ifdef __KERNEL__ +#include #include /***************************************************************************/ diff --git a/include/linux/jbd.h b/include/linux/jbd.h index a04c154c5..6a425e370 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -72,9 +72,6 @@ extern int journal_enable_debug; #endif extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry); -extern void * jbd_slab_alloc(size_t size, gfp_t flags); -extern void jbd_slab_free(void *ptr, size_t size); - #define jbd_kmalloc(size, flags) \ __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry) #define jbd_rep_kmalloc(size, flags) \ @@ -503,12 +500,6 @@ struct transaction_s */ struct journal_head *t_checkpoint_list; - /* - * Doubly-linked circular list of all buffers submitted for IO while - * checkpointing. [j_list_lock] - */ - struct journal_head *t_checkpoint_io_list; - /* * Doubly-linked circular list of temporary buffers currently undergoing * IO in the log [j_list_lock] @@ -858,7 +849,7 @@ extern void journal_commit_transaction(journal_t *); /* Checkpoint list management */ int __journal_clean_checkpoint_list(journal_t *journal); -int __journal_remove_checkpoint(struct journal_head *); +void __journal_remove_checkpoint(struct journal_head *); void __journal_insert_checkpoint(struct journal_head *, transaction_t *); /* Buffer IO */ diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index c9c760700..cf792bb3c 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h @@ -65,18 +65,6 @@ #define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) -#define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8) -#define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9) - -/* XATTR Related */ -#define JFFS2_XPREFIX_USER 1 /* for "user." */ -#define JFFS2_XPREFIX_SECURITY 2 /* for "security." */ -#define JFFS2_XPREFIX_ACL_ACCESS 3 /* for "system.posix_acl_access" */ -#define JFFS2_XPREFIX_ACL_DEFAULT 4 /* for "system.posix_acl_default" */ -#define JFFS2_XPREFIX_TRUSTED 5 /* for "trusted.*" */ - -#define JFFS2_ACL_VERSION 0x0001 - // Maybe later... //#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) @@ -94,11 +82,11 @@ typedef struct { uint32_t v32; -} __attribute__((packed)) jint32_t; +} __attribute__((packed)) jint32_t; typedef struct { uint32_t m; -} __attribute__((packed)) jmode_t; +} __attribute__((packed)) jmode_t; typedef struct { uint16_t v16; @@ -111,7 +99,7 @@ struct jffs2_unknown_node jint16_t nodetype; jint32_t totlen; /* So we can skip over nodes we don't grok */ jint32_t hdr_crc; -}; +} __attribute__((packed)); struct jffs2_raw_dirent { @@ -129,7 +117,7 @@ struct jffs2_raw_dirent jint32_t node_crc; jint32_t name_crc; uint8_t name[0]; -}; +} __attribute__((packed)); /* The JFFS2 raw inode structure: Used for storage on physical media. */ /* The uid, gid, atime, mtime and ctime members could be longer, but @@ -161,33 +149,6 @@ struct jffs2_raw_inode jint32_t data_crc; /* CRC for the (compressed) data. */ jint32_t node_crc; /* CRC for the raw inode (excluding data) */ uint8_t data[0]; -}; - -struct jffs2_raw_xattr { - jint16_t magic; - jint16_t nodetype; /* = JFFS2_NODETYPE_XATTR */ - jint32_t totlen; - jint32_t hdr_crc; - jint32_t xid; /* XATTR identifier number */ - jint32_t version; - uint8_t xprefix; - uint8_t name_len; - jint16_t value_len; - jint32_t data_crc; - jint32_t node_crc; - uint8_t data[0]; -} __attribute__((packed)); - -struct jffs2_raw_xref -{ - jint16_t magic; - jint16_t nodetype; /* = JFFS2_NODETYPE_XREF */ - jint32_t totlen; - jint32_t hdr_crc; - jint32_t ino; /* inode number */ - jint32_t xid; /* XATTR identifier number */ - jint32_t xseqno; /* xref sequencial number */ - jint32_t node_crc; } __attribute__((packed)); struct jffs2_raw_summary @@ -202,22 +163,14 @@ struct jffs2_raw_summary jint32_t sum_crc; /* summary information crc */ jint32_t node_crc; /* node crc */ jint32_t sum[0]; /* inode summary info */ -}; +} __attribute__((packed)); union jffs2_node_union { struct jffs2_raw_inode i; struct jffs2_raw_dirent d; - struct jffs2_raw_xattr x; - struct jffs2_raw_xref r; struct jffs2_raw_summary s; struct jffs2_unknown_node u; }; -/* Data payload for device nodes. */ -union jffs2_device_node { - jint16_t old; - jint32_t new; -}; - #endif /* __LINUX_JFFS2_H__ */ diff --git a/fs/jffs2/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h similarity index 91% rename from fs/jffs2/jffs2_fs_i.h rename to include/linux/jffs2_fs_i.h index 2e0cc8e00..ad565bf9d 100644 --- a/fs/jffs2/jffs2_fs_i.h +++ b/include/linux/jffs2_fs_i.h @@ -5,7 +5,6 @@ #include #include -#include #include struct jffs2_inode_info { @@ -46,10 +45,6 @@ struct jffs2_inode_info { struct inode vfs_inode; #endif #endif -#ifdef CONFIG_JFFS2_FS_POSIX_ACL - struct posix_acl *i_acl_access; - struct posix_acl *i_acl_default; -#endif }; #endif /* _JFFS2_FS_I */ diff --git a/fs/jffs2/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h similarity index 90% rename from fs/jffs2/jffs2_fs_sb.h rename to include/linux/jffs2_fs_sb.h index b98594992..4bcfb5570 100644 --- a/fs/jffs2/jffs2_fs_sb.h +++ b/include/linux/jffs2_fs_sb.h @@ -100,7 +100,6 @@ struct jffs2_sb_info { #ifdef CONFIG_JFFS2_FS_WRITEBUFFER /* Write-behind buffer for NAND flash */ unsigned char *wbuf; - unsigned char *oobbuf; uint32_t wbuf_ofs; uint32_t wbuf_len; struct jffs2_inodirty *wbuf_inodes; @@ -108,7 +107,7 @@ struct jffs2_sb_info { struct rw_semaphore wbuf_sem; /* Protects the write buffer */ /* Information about out-of-band area usage... */ - struct nand_ecclayout *ecclayout; + struct nand_oobinfo *oobinfo; uint32_t badblock_pos; uint32_t fsdata_pos; uint32_t fsdata_len; @@ -116,19 +115,6 @@ struct jffs2_sb_info { struct jffs2_summary *summary; /* Summary information */ -#ifdef CONFIG_JFFS2_FS_XATTR -#define XATTRINDEX_HASHSIZE (57) - uint32_t highest_xid; - uint32_t highest_xseqno; - struct list_head xattrindex[XATTRINDEX_HASHSIZE]; - struct list_head xattr_unchecked; - struct list_head xattr_dead_list; - struct jffs2_xattr_ref *xref_dead_list; - struct jffs2_xattr_ref *xref_temp; - struct rw_semaphore xattr_sem; - uint32_t xdatum_mem_usage; - uint32_t xdatum_mem_threshold; -#endif /* OS-private pointer for getting back to master superblock info */ void *os_priv; }; diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 329ebcffa..043376920 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -47,8 +47,8 @@ * - (NOM / DEN) fits in (32 - LSH) bits. * - (NOM % DEN) fits in (32 - LSH) bits. */ -#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ - + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) +#define SH_DIV(NOM,DEN,LSH) ( ((NOM / DEN) << LSH) \ + + (((NOM % DEN) << LSH) + DEN / 2) / DEN) /* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */ #define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8)) diff --git a/include/linux/joystick.h b/include/linux/joystick.h index e2d3a18af..5fd20ddd7 100644 --- a/include/linux/joystick.h +++ b/include/linux/joystick.h @@ -111,25 +111,25 @@ struct js_corr { #define JS_SET_ALL 8 struct JS_DATA_TYPE { - __s32 buttons; - __s32 x; - __s32 y; + int32_t buttons; + int32_t x; + int32_t y; }; struct JS_DATA_SAVE_TYPE_32 { - __s32 JS_TIMEOUT; - __s32 BUSY; - __s32 JS_EXPIRETIME; - __s32 JS_TIMELIMIT; + int32_t JS_TIMEOUT; + int32_t BUSY; + int32_t JS_EXPIRETIME; + int32_t JS_TIMELIMIT; struct JS_DATA_TYPE JS_SAVE; struct JS_DATA_TYPE JS_CORR; }; struct JS_DATA_SAVE_TYPE_64 { - __s32 JS_TIMEOUT; - __s32 BUSY; - __s64 JS_EXPIRETIME; - __s64 JS_TIMELIMIT; + int32_t JS_TIMEOUT; + int32_t BUSY; + int64_t JS_EXPIRETIME; + int64_t JS_TIMELIMIT; struct JS_DATA_TYPE JS_SAVE; struct JS_DATA_TYPE JS_CORR; }; diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 849043ce4..9bbd04092 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -5,6 +5,7 @@ #ifndef _LINUX_KALLSYMS_H #define _LINUX_KALLSYMS_H +#include #define KSYM_NAME_LEN 127 @@ -57,25 +58,10 @@ do { \ #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) #endif -static inline void print_symbol(const char *fmt, unsigned long addr) -{ - __check_printsym_format(fmt, ""); - __print_symbol(fmt, (unsigned long) - __builtin_extract_return_addr((void *)addr)); -} - -#ifndef CONFIG_64BIT -#define print_ip_sym(ip) \ -do { \ - printk("[<%08lx>]", ip); \ - print_symbol(" %s\n", ip); \ -} while(0) -#else -#define print_ip_sym(ip) \ -do { \ - printk("[<%016lx>]", ip); \ - print_symbol(" %s\n", ip); \ +#define print_symbol(fmt, addr) \ +do { \ + __check_printsym_format(fmt, ""); \ + __print_symbol(fmt, addr); \ } while(0) -#endif #endif /*_LINUX_KALLSYMS_H*/ diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index efe0ee4cc..4eb851ece 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h @@ -155,8 +155,10 @@ static inline void con_schedule_flip(struct tty_struct *t) { unsigned long flags; spin_lock_irqsave(&t->buf.lock, flags); - if (t->buf.tail != NULL) + if (t->buf.tail != NULL) { + t->buf.tail->active = 0; t->buf.tail->commit = t->buf.tail->used; + } spin_unlock_irqrestore(&t->buf.lock, flags); schedule_work(&t->buf.work); } diff --git a/include/linux/kernel.h b/include/linux/kernel.h index b4562bfce..f6dc34a85 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -25,16 +25,11 @@ extern const char vx_linux_banner[]; #define LONG_MAX ((long)(~0UL>>1)) #define LONG_MIN (-LONG_MAX - 1) #define ULONG_MAX (~0UL) -#define LLONG_MAX ((long long)(~0ULL>>1)) -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (~0ULL) #define STACK_MAGIC 0xdeadbeef #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) -#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) -#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ @@ -81,7 +76,7 @@ extern int cond_resched(void); # define might_sleep() do { might_resched(); } while (0) #endif -#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) +#define might_sleep_if(cond) do { if (unlikely(cond)) might_sleep(); } while (0) #define abs(x) ({ \ int __x = (x); \ @@ -120,8 +115,6 @@ extern int scnprintf(char * buf, size_t size, const char * fmt, ...) __attribute__ ((format (printf, 3, 4))); extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) __attribute__ ((format (printf, 3, 0))); -extern char *kasprintf(gfp_t gfp, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))); extern int sscanf(const char *, const char *, ...) __attribute__ ((format (scanf, 2, 3))); @@ -211,7 +204,6 @@ extern enum system_states { extern void dump_stack(void); #ifdef DEBUG -/* If you are writing a driver, please use dev_dbg instead */ #define pr_debug(fmt,arg...) \ printk(KERN_DEBUG fmt,##arg) #else @@ -340,12 +332,6 @@ struct sysinfo { /* Force a compilation error if condition is true */ #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) -/* Force a compilation error if condition is true, but also produce a - result (of value 0 and type size_t), so the expression can be used - e.g. in a structure initializer (or where-ever else comma expressions - aren't permitted). */ -#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) - /* Trap pasters of __FUNCTION__ at compile-time */ #define __FUNCTION__ (__func__) diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 43e895f1c..b46249082 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -1,6 +1,7 @@ #ifndef _LINUX_KERNEL_STAT_H #define _LINUX_KERNEL_STAT_H +#include #include #include #include diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 6427949dd..cfb3410e3 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -106,7 +106,6 @@ extern struct page *kimage_alloc_control_pages(struct kimage *image, extern void crash_kexec(struct pt_regs *); int kexec_should_crash(struct task_struct *); extern struct kimage *kexec_image; -extern struct kimage *kexec_crash_image; #define KEXEC_ON_CRASH 0x00000001 #define KEXEC_ARCH_MASK 0xffff0000 diff --git a/include/linux/key.h b/include/linux/key.h index 169f05e48..cbf464ad9 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -177,8 +177,7 @@ struct key { /* * kernel managed key type definition */ -typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, - const char *op, void *aux); +typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); struct key_type { /* name of the type */ @@ -206,11 +205,6 @@ struct key_type { /* match a key against a description */ int (*match)(const struct key *key, const void *desc); - /* clear some of the data from a key on revokation (optional) - * - the key's semaphore will be write-locked by the caller - */ - void (*revoke)(struct key *key); - /* clear the data from a key (optional) */ void (*destroy)(struct key *key); @@ -247,16 +241,8 @@ extern void unregister_key_type(struct key_type *ktype); extern struct key *key_alloc(struct key_type *type, const char *desc, - uid_t uid, gid_t gid, - struct task_struct *ctx, - key_perm_t perm, - unsigned long flags); - - -#define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ -#define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ -#define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ - + uid_t uid, gid_t gid, key_perm_t perm, + int not_in_quota); extern int key_payload_reserve(struct key *key, size_t datalen); extern int key_instantiate_and_link(struct key *key, const void *data, @@ -286,11 +272,6 @@ extern struct key *request_key(struct key_type *type, const char *description, const char *callout_info); -extern struct key *request_key_with_auxdata(struct key_type *type, - const char *description, - const char *callout_info, - void *aux); - extern int key_validate(struct key *key); extern key_ref_t key_create_or_update(key_ref_t keyring, @@ -298,7 +279,7 @@ extern key_ref_t key_create_or_update(key_ref_t keyring, const char *description, const void *payload, size_t plen, - unsigned long flags); + int not_in_quota); extern int key_update(key_ref_t key, const void *payload, @@ -311,9 +292,7 @@ extern int key_unlink(struct key *keyring, struct key *key); extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, - struct task_struct *ctx, - unsigned long flags, - struct key *dest); + int not_in_quota, struct key *dest); extern int keyring_clear(struct key *keyring); @@ -334,8 +313,7 @@ extern void keyring_replace_payload(struct key *key, void *replacement); * the userspace interface */ extern struct key root_user_keyring, root_session_keyring; -extern int alloc_uid_keyring(struct user_struct *user, - struct task_struct *ctx); +extern int alloc_uid_keyring(struct user_struct *user); extern void switch_uid_keyring(struct user_struct *new_user); extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk); extern int copy_thread_group_keys(struct task_struct *tsk); @@ -364,7 +342,7 @@ extern void key_init(void); #define make_key_ref(k) ({ NULL; }) #define key_ref_to_ptr(k) ({ NULL; }) #define is_key_possessed(k) 0 -#define alloc_uid_keyring(u,c) 0 +#define alloc_uid_keyring(u) 0 #define switch_uid_keyring(u) do { } while(0) #define __install_session_keyring(t, k) ({ NULL; }) #define copy_keys(f,t) 0 @@ -377,10 +355,6 @@ extern void key_init(void); #define key_fsgid_changed(t) do { } while(0) #define key_init() do { } while(0) -/* Initial keyrings */ -extern struct key root_user_keyring; -extern struct key root_session_keyring; - #endif /* CONFIG_KEYS */ #endif /* __KERNEL__ */ #endif /* _LINUX_KEY_H */ diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 009c16122..27501f4de 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -20,6 +20,7 @@ */ #include +#include #include #include diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2d2293279..c187c53ce 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -190,8 +190,6 @@ struct subsystem _varname##_subsys = { \ /* The global /sys/kernel/ subsystem for people to chain off of */ extern struct subsystem kernel_subsys; -/* The global /sys/hypervisor/ subsystem */ -extern struct subsystem hypervisor_subsys; /** * Helpers for setting the kset of registered objects. diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 8bf6702da..778adc0fa 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -29,6 +29,7 @@ * and Prasanna S Panchamukhi * added function-return probes. */ +#include #include #include #include diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 1c65e7a9f..ebdd41fd1 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h @@ -4,19 +4,37 @@ #include #include +/** + * kthread_create: create a kthread. + * @threadfn: the function to run until signal_pending(current). + * @data: data ptr for @threadfn. + * @namefmt: printf-style name for the thread. + * + * Description: This helper function creates and names a kernel + * thread. The thread will be stopped: use wake_up_process() to start + * it. See also kthread_run(), kthread_create_on_cpu(). + * + * When woken, the thread will run @threadfn() with @data as its + * argument. @threadfn can either call do_exit() directly if it is a + * standalone thread for which noone will call kthread_stop(), or + * return when 'kthread_should_stop()' is true (which means + * kthread_stop() has been called). The return value should be zero + * or a negative error number: it will be passed to kthread_stop(). + * + * Returns a task_struct or ERR_PTR(-ENOMEM). + */ struct task_struct *kthread_create(int (*threadfn)(void *data), void *data, const char namefmt[], ...); /** - * kthread_run - create and wake a thread. + * kthread_run: create and wake a thread. * @threadfn: the function to run until signal_pending(current). * @data: data ptr for @threadfn. * @namefmt: printf-style name for the thread. * * Description: Convenient wrapper for kthread_create() followed by - * wake_up_process(). Returns the kthread or ERR_PTR(-ENOMEM). - */ + * wake_up_process(). Returns the kthread, or ERR_PTR(-ENOMEM). */ #define kthread_run(threadfn, data, namefmt, ...) \ ({ \ struct task_struct *__k \ @@ -26,8 +44,50 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), __k; \ }) +/** + * kthread_bind: bind a just-created kthread to a cpu. + * @k: thread created by kthread_create(). + * @cpu: cpu (might not be online, must be possible) for @k to run on. + * + * Description: This function is equivalent to set_cpus_allowed(), + * except that @cpu doesn't need to be online, and the thread must be + * stopped (ie. just returned from kthread_create(). + */ void kthread_bind(struct task_struct *k, unsigned int cpu); + +/** + * kthread_stop: stop a thread created by kthread_create(). + * @k: thread created by kthread_create(). + * + * Sets kthread_should_stop() for @k to return true, wakes it, and + * waits for it to exit. Your threadfn() must not call do_exit() + * itself if you use this function! This can also be called after + * kthread_create() instead of calling wake_up_process(): the thread + * will exit without calling threadfn(). + * + * Returns the result of threadfn(), or -EINTR if wake_up_process() + * was never called. */ int kthread_stop(struct task_struct *k); + +/** + * kthread_stop_sem: stop a thread created by kthread_create(). + * @k: thread created by kthread_create(). + * @s: semaphore that @k waits on while idle. + * + * Does essentially the same thing as kthread_stop() above, but wakes + * @k by calling up(@s). + * + * Returns the result of threadfn(), or -EINTR if wake_up_process() + * was never called. */ +int kthread_stop_sem(struct task_struct *k, struct semaphore *s); + +/** + * kthread_should_stop: should this kthread return now? + * + * When someone calls kthread_stop on your kthread, it will be woken + * and this will return true. You should then return, and your return + * value will be passed through to kthread_stop(). + */ int kthread_should_stop(void); #endif /* _LINUX_KTHREAD_H */ diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 84eeecd60..62bc57580 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -56,8 +56,7 @@ typedef union { #endif } ktime_t; -#define KTIME_MAX ((s64)~((u64)1 << 63)) -#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) +#define KTIME_MAX (~((u64)1 << 63)) /* * ktime_t definitions when using the 64-bit scalar representation: @@ -67,6 +66,7 @@ typedef union { /** * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value + * * @secs: seconds to set * @nsecs: nanoseconds to set * @@ -74,10 +74,6 @@ typedef union { */ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) { -#if (BITS_PER_LONG == 64) - if (unlikely(secs >= KTIME_SEC_MAX)) - return (ktime_t){ .tv64 = KTIME_MAX }; -#endif return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; } @@ -142,6 +138,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) /** * ktime_sub - subtract two ktime_t variables + * * @lhs: minuend * @rhs: subtrahend * @@ -160,6 +157,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) /** * ktime_add - add two ktime_t variables + * * @add1: addend1 * @add2: addend2 * @@ -186,6 +184,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) /** * ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable + * * @kt: addend * @nsec: the scalar nsec value to add * @@ -195,6 +194,7 @@ extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); /** * timespec_to_ktime - convert a timespec to ktime_t format + * * @ts: the timespec variable to convert * * Returns a ktime_t variable with the converted timespec value @@ -207,6 +207,7 @@ static inline ktime_t timespec_to_ktime(const struct timespec ts) /** * timeval_to_ktime - convert a timeval to ktime_t format + * * @tv: the timeval variable to convert * * Returns a ktime_t variable with the converted timeval value @@ -219,6 +220,7 @@ static inline ktime_t timeval_to_ktime(const struct timeval tv) /** * ktime_to_timespec - convert a ktime_t variable to timespec format + * * @kt: the ktime_t variable to convert * * Returns the timespec representation of the ktime value @@ -231,6 +233,7 @@ static inline struct timespec ktime_to_timespec(const ktime_t kt) /** * ktime_to_timeval - convert a ktime_t variable to timeval format + * * @kt: the ktime_t variable to convert * * Returns the timeval representation of the ktime value diff --git a/include/linux/libata.h b/include/linux/libata.h index e35df8c8a..630678514 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -30,11 +30,9 @@ #include #include #include -#include #include #include #include -#include /* * compile-time options: to be removed as soon as all the drivers are @@ -46,6 +44,7 @@ #undef ATA_NDEBUG /* define to disable quick runtime checks */ #undef ATA_ENABLE_PATA /* define to enable PATA support in some * low-level drivers */ +#undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ /* note: prints function name for you */ @@ -109,11 +108,8 @@ enum { LIBATA_MAX_PRD = ATA_MAX_PRD / 2, ATA_MAX_PORTS = 8, ATA_DEF_QUEUE = 1, - /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ - ATA_MAX_QUEUE = 32, - ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, + ATA_MAX_QUEUE = 1, ATA_MAX_SECTORS = 200, /* FIXME */ - ATA_MAX_SECTORS_LBA48 = 65535, ATA_MAX_BUS = 2, ATA_DEF_BUSY_WAIT = 10000, ATA_SHORT_PAUSE = (HZ >> 6) + 1, @@ -126,16 +122,10 @@ enum { /* struct ata_device stuff */ ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ - ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ - ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ + ATA_DFLAG_CFG_MASK = (1 << 8) - 1, ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ - ATA_DFLAG_SUSPENDED = (1 << 9), /* device suspended */ - ATA_DFLAG_INIT_MASK = (1 << 16) - 1, - - ATA_DFLAG_DETACH = (1 << 16), - ATA_DFLAG_DETACHED = (1 << 17), ATA_DEV_UNKNOWN = 0, /* unknown device */ ATA_DEV_ATA = 1, /* ATA device */ @@ -145,63 +135,43 @@ enum { ATA_DEV_NONE = 5, /* no device */ /* struct ata_port flags */ - ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ + ATA_FLAG_SLAVE_POSS = (1 << 1), /* host supports slave dev */ /* (doesn't imply presence) */ - ATA_FLAG_SATA = (1 << 1), - ATA_FLAG_NO_LEGACY = (1 << 2), /* no legacy mode check */ - ATA_FLAG_MMIO = (1 << 3), /* use MMIO, not PIO */ - ATA_FLAG_SRST = (1 << 4), /* (obsolete) use ATA SRST, not E.D.D. */ - ATA_FLAG_SATA_RESET = (1 << 5), /* (obsolete) use COMRESET */ - ATA_FLAG_NO_ATAPI = (1 << 6), /* No ATAPI support */ - ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */ - ATA_FLAG_PIO_LBA48 = (1 << 8), /* Host DMA engine is LBA28 only */ - ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD - * doesn't handle PIO interrupts */ - ATA_FLAG_NCQ = (1 << 10), /* host supports NCQ */ - ATA_FLAG_HRST_TO_RESUME = (1 << 11), /* hardreset to resume phy */ - ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H - * Register FIS clearing BSY */ - ATA_FLAG_DEBUGMSG = (1 << 13), - - /* The following flag belongs to ap->pflags but is kept in - * ap->flags because it's referenced in many LLDs and will be - * removed in not-too-distant future. - */ - ATA_FLAG_DISABLED = (1 << 23), /* port is disabled, ignore it */ - - /* bits 24:31 of ap->flags are reserved for LLD specific flags */ - - /* struct ata_port pflags */ - ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */ - ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */ - ATA_PFLAG_FROZEN = (1 << 2), /* port is frozen */ - ATA_PFLAG_RECOVERED = (1 << 3), /* recovery action performed */ - ATA_PFLAG_LOADING = (1 << 4), /* boot/loading probe */ - ATA_PFLAG_UNLOADING = (1 << 5), /* module is unloading */ - ATA_PFLAG_SCSI_HOTPLUG = (1 << 6), /* SCSI hotplug scheduled */ - - ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ - ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ - ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ - - /* struct ata_queued_cmd flags */ - ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ - ATA_QCFLAG_SG = (1 << 1), /* have s/g table? */ - ATA_QCFLAG_SINGLE = (1 << 2), /* no s/g, just a single buffer */ + ATA_FLAG_PORT_DISABLED = (1 << 2), /* port is disabled, ignore it */ + ATA_FLAG_SATA = (1 << 3), + ATA_FLAG_NO_LEGACY = (1 << 4), /* no legacy mode check */ + ATA_FLAG_SRST = (1 << 5), /* (obsolete) use ATA SRST, not E.D.D. */ + ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */ + ATA_FLAG_SATA_RESET = (1 << 7), /* (obsolete) use COMRESET */ + ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ + ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once + * proper HSM is in place. */ + ATA_FLAG_DEBUGMSG = (1 << 10), + ATA_FLAG_NO_ATAPI = (1 << 11), /* No ATAPI support */ + + ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */ + + ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */ + ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */ + + ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* Flush port task */ + ATA_FLAG_IN_EH = (1 << 16), /* EH in progress */ + + ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ + ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ + ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, - ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ - ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ - - ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */ - ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */ - ATA_QCFLAG_EH_SCHEDULED = (1 << 18), /* EH scheduled (obsolete) */ + ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */ /* host set flags */ ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ /* various lengths of time */ + ATA_TMOUT_PIO = 30 * HZ, ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ + ATA_TMOUT_CDB = 30 * HZ, + ATA_TMOUT_CDB_QUICK = 5 * HZ, ATA_TMOUT_INTERNAL = 30 * HZ, ATA_TMOUT_INTERNAL_QUICK = 5 * HZ, @@ -240,65 +210,21 @@ enum { /* size of buffer to pad xfers ending on unaligned boundaries */ ATA_DMA_PAD_SZ = 4, ATA_DMA_PAD_BUF_SZ = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE, - - /* masks for port functions */ + + /* Masks for port functions */ ATA_PORT_PRIMARY = (1 << 0), ATA_PORT_SECONDARY = (1 << 1), - - /* ering size */ - ATA_ERING_SIZE = 32, - - /* desc_len for ata_eh_info and context */ - ATA_EH_DESC_LEN = 80, - - /* reset / recovery action types */ - ATA_EH_REVALIDATE = (1 << 0), - ATA_EH_SOFTRESET = (1 << 1), - ATA_EH_HARDRESET = (1 << 2), - ATA_EH_SUSPEND = (1 << 3), - ATA_EH_RESUME = (1 << 4), - ATA_EH_PM_FREEZE = (1 << 5), - - ATA_EH_RESET_MASK = ATA_EH_SOFTRESET | ATA_EH_HARDRESET, - ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE | ATA_EH_SUSPEND | - ATA_EH_RESUME | ATA_EH_PM_FREEZE, - - /* ata_eh_info->flags */ - ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ - ATA_EHI_RESUME_LINK = (1 << 1), /* resume link (reset modifier) */ - ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ - ATA_EHI_QUIET = (1 << 3), /* be quiet */ - - ATA_EHI_DID_RESET = (1 << 16), /* already reset this port */ - - ATA_EHI_RESET_MODIFIER_MASK = ATA_EHI_RESUME_LINK, - - /* max repeat if error condition is still set after ->error_handler */ - ATA_EH_MAX_REPEAT = 5, - - /* how hard are we gonna try to probe/recover devices */ - ATA_PROBE_MAX_TRIES = 3, - ATA_EH_RESET_TRIES = 3, - ATA_EH_DEV_TRIES = 3, - - /* Drive spinup time (time from power-on to the first D2H FIS) - * in msecs - 8s currently. Failing to get ready in this time - * isn't critical. It will result in reset failure for - * controllers which can't wait for the first D2H FIS. libata - * will retry, so it just has to be long enough to spin up - * most devices. - */ - ATA_SPINUP_WAIT = 8000, }; enum hsm_task_states { - HSM_ST_UNKNOWN, /* state unknown */ - HSM_ST_IDLE, /* no command on going */ - HSM_ST, /* (waiting the device to) transfer data */ - HSM_ST_LAST, /* (waiting the device to) complete command */ - HSM_ST_ERR, /* error */ - HSM_ST_FIRST, /* (waiting the device to) - write CDB or first data block */ + HSM_ST_UNKNOWN, + HSM_ST_IDLE, + HSM_ST_POLL, + HSM_ST_TMOUT, + HSM_ST, + HSM_ST_LAST, + HSM_ST_LAST_POLL, + HSM_ST_ERR, }; enum ata_completion_errors { @@ -321,9 +247,9 @@ struct ata_queued_cmd; /* typedefs */ typedef void (*ata_qc_cb_t) (struct ata_queued_cmd *qc); -typedef int (*ata_prereset_fn_t)(struct ata_port *ap); -typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes); -typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); +typedef void (*ata_probeinit_fn_t)(struct ata_port *); +typedef int (*ata_reset_fn_t)(struct ata_port *, int, unsigned int *); +typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *); struct ata_ioports { unsigned long cmd_addr; @@ -375,8 +301,7 @@ struct ata_host_set { unsigned long flags; int simplex_claimed; /* Keep seperate in case we ever need to do this locked */ - struct ata_host_set *next; /* for legacy mode */ - struct ata_port *ports[0]; + struct ata_port * ports[0]; }; struct ata_queued_cmd { @@ -415,7 +340,7 @@ struct ata_queued_cmd { struct scatterlist *__sg; unsigned int err_mask; - struct ata_taskfile result_tf; + ata_qc_cb_t complete_fn; void *private_data; @@ -427,26 +352,12 @@ struct ata_host_stats { unsigned long rw_reqbuf; }; -struct ata_ering_entry { - int is_io; - unsigned int err_mask; - u64 timestamp; -}; - -struct ata_ering { - int cursor; - struct ata_ering_entry ring[ATA_ERING_SIZE]; -}; - struct ata_device { - struct ata_port *ap; - unsigned int devno; /* 0 or 1 */ - unsigned long flags; /* ATA_DFLAG_xxx */ - struct scsi_device *sdev; /* attached SCSI device */ - /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ u64 n_sectors; /* size of device, if ATA */ + unsigned long flags; /* ATA_DFLAG_xxx */ unsigned int class; /* ATA_DEV_xxx */ - u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ + unsigned int devno; /* 0 or 1 */ + u16 *id; /* IDENTIFY xxx DEVICE data */ u8 pio_mode; u8 dma_mode; u8 xfer_mode; @@ -466,44 +377,12 @@ struct ata_device { u16 cylinders; /* Number of cylinders */ u16 heads; /* Number of heads */ u16 sectors; /* Number of sectors per track */ - - /* error history */ - struct ata_ering ering; -}; - -/* Offset into struct ata_device. Fields above it are maintained - * acress device init. Fields below are zeroed. - */ -#define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) - -struct ata_eh_info { - struct ata_device *dev; /* offending device */ - u32 serror; /* SError from LLDD */ - unsigned int err_mask; /* port-wide err_mask */ - unsigned int action; /* ATA_EH_* action mask */ - unsigned int dev_action[ATA_MAX_DEVICES]; /* dev EH action */ - unsigned int flags; /* ATA_EHI_* flags */ - - unsigned long hotplug_timestamp; - unsigned int probe_mask; - - char desc[ATA_EH_DESC_LEN]; - int desc_len; -}; - -struct ata_eh_context { - struct ata_eh_info i; - int tries[ATA_MAX_DEVICES]; - unsigned int classes[ATA_MAX_DEVICES]; - unsigned int did_probe_mask; }; struct ata_port { struct Scsi_Host *host; /* our co-allocated scsi host */ const struct ata_port_operations *ops; - spinlock_t *lock; unsigned long flags; /* ATA_FLAG_xxx */ - unsigned int pflags; /* ATA_PFLAG_xxx */ unsigned int id; /* unique id req'd by scsi midlyr */ unsigned int port_no; /* unique port #; from zero */ unsigned int hard_port_no; /* hardware port #; from zero */ @@ -522,43 +401,26 @@ struct ata_port { unsigned int mwdma_mask; unsigned int udma_mask; unsigned int cbl; /* cable type; ATA_CBL_xxx */ - unsigned int hw_sata_spd_limit; - unsigned int sata_spd_limit; /* SATA PHY speed limit */ - - /* record runtime error info, protected by host_set lock */ - struct ata_eh_info eh_info; - /* EH context owned by EH */ - struct ata_eh_context eh_context; struct ata_device device[ATA_MAX_DEVICES]; struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; - unsigned long qc_allocated; - unsigned int qc_active; - + unsigned long qactive; unsigned int active_tag; - u32 sactive; struct ata_host_stats stats; struct ata_host_set *host_set; struct device *dev; struct work_struct port_task; - struct work_struct hotplug_task; - struct work_struct scsi_rescan_task; unsigned int hsm_task_state; + unsigned long pio_task_timeout; u32 msg_enable; struct list_head eh_done_q; - wait_queue_head_t eh_wait_q; - - pm_message_t pm_mesg; - int *pm_result; void *private_data; - - u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ }; struct ata_port_operations { @@ -580,6 +442,7 @@ struct ata_port_operations { void (*phy_reset) (struct ata_port *ap); /* obsolete */ void (*set_mode) (struct ata_port *ap); + int (*probe_reset) (struct ata_port *ap, unsigned int *classes); void (*post_set_mode) (struct ata_port *ap); @@ -588,20 +451,10 @@ struct ata_port_operations { void (*bmdma_setup) (struct ata_queued_cmd *qc); void (*bmdma_start) (struct ata_queued_cmd *qc); - void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); - void (*qc_prep) (struct ata_queued_cmd *qc); unsigned int (*qc_issue) (struct ata_queued_cmd *qc); - /* Error handlers. ->error_handler overrides ->eng_timeout and - * indicates that new-style EH is in place. - */ - void (*eng_timeout) (struct ata_port *ap); /* obsolete */ - - void (*freeze) (struct ata_port *ap); - void (*thaw) (struct ata_port *ap); - void (*error_handler) (struct ata_port *ap); - void (*post_internal_cmd) (struct ata_queued_cmd *qc); + void (*eng_timeout) (struct ata_port *ap); irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); void (*irq_clear) (struct ata_port *); @@ -610,9 +463,6 @@ struct ata_port_operations { void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, u32 val); - int (*port_suspend) (struct ata_port *ap, pm_message_t mesg); - int (*port_resume) (struct ata_port *ap); - int (*port_start) (struct ata_port *ap); void (*port_stop) (struct ata_port *ap); @@ -646,71 +496,51 @@ struct ata_timing { #define FIT(v,vmin,vmax) max_t(short,min_t(short,v,vmax),vmin) -extern const unsigned long sata_deb_timing_normal[]; -extern const unsigned long sata_deb_timing_hotplug[]; -extern const unsigned long sata_deb_timing_long[]; - -static inline const unsigned long * -sata_ehc_deb_timing(struct ata_eh_context *ehc) -{ - if (ehc->i.flags & ATA_EHI_HOTPLUGGED) - return sata_deb_timing_hotplug; - else - return sata_deb_timing_normal; -} - extern void ata_port_probe(struct ata_port *); extern void __sata_phy_reset(struct ata_port *ap); extern void sata_phy_reset(struct ata_port *ap); extern void ata_bus_reset(struct ata_port *ap); -extern int sata_set_spd(struct ata_port *ap); -extern int sata_phy_debounce(struct ata_port *ap, const unsigned long *param); -extern int sata_phy_resume(struct ata_port *ap, const unsigned long *param); -extern int ata_std_prereset(struct ata_port *ap); -extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes); -extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class); +extern int ata_drive_probe_reset(struct ata_port *ap, + ata_probeinit_fn_t probeinit, + ata_reset_fn_t softreset, ata_reset_fn_t hardreset, + ata_postreset_fn_t postreset, unsigned int *classes); +extern void ata_std_probeinit(struct ata_port *ap); +extern int ata_std_softreset(struct ata_port *ap, int verbose, + unsigned int *classes); +extern int sata_std_hardreset(struct ata_port *ap, int verbose, + unsigned int *class); extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes); -extern int ata_dev_revalidate(struct ata_device *dev, int post_reset); +extern int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev, + int post_reset); extern void ata_port_disable(struct ata_port *); extern void ata_std_ports(struct ata_ioports *ioaddr); #ifdef CONFIG_PCI extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, unsigned int n_ports); extern void ata_pci_remove_one (struct pci_dev *pdev); -extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); -extern void ata_pci_device_do_resume(struct pci_dev *pdev); extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); extern int ata_pci_device_resume(struct pci_dev *pdev); extern int ata_pci_clear_simplex(struct pci_dev *pdev); #endif /* CONFIG_PCI */ extern int ata_device_add(const struct ata_probe_ent *ent); -extern void ata_port_detach(struct ata_port *ap); extern void ata_host_set_remove(struct ata_host_set *host_set); extern int ata_scsi_detect(struct scsi_host_template *sht); extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); +extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); +extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); extern int ata_scsi_release(struct Scsi_Host *host); extern unsigned int ata_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc); -extern int sata_scr_valid(struct ata_port *ap); -extern int sata_scr_read(struct ata_port *ap, int reg, u32 *val); -extern int sata_scr_write(struct ata_port *ap, int reg, u32 val); -extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val); -extern int ata_port_online(struct ata_port *ap); -extern int ata_port_offline(struct ata_port *ap); extern int ata_scsi_device_resume(struct scsi_device *); extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); -extern int ata_host_set_suspend(struct ata_host_set *host_set, - pm_message_t mesg); -extern void ata_host_set_resume(struct ata_host_set *host_set); +extern int ata_device_resume(struct ata_port *, struct ata_device *); +extern int ata_device_suspend(struct ata_port *, struct ata_device *, pm_message_t state); extern int ata_ratelimit(void); extern unsigned int ata_busy_sleep(struct ata_port *ap, unsigned long timeout_pat, unsigned long timeout); extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), void *data, unsigned long delay); -extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, - unsigned long interval_msec, - unsigned long timeout_msec); /* * Default driver ops implementations @@ -724,16 +554,11 @@ extern void ata_std_dev_select (struct ata_port *ap, unsigned int device); extern u8 ata_check_status(struct ata_port *ap); extern u8 ata_altstatus(struct ata_port *ap); extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); +extern int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes); extern int ata_port_start (struct ata_port *ap); extern void ata_port_stop (struct ata_port *ap); extern void ata_host_stop (struct ata_host_set *host_set); extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); -extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data); -extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data); -extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf, - unsigned int buflen, int write_data); extern void ata_qc_prep(struct ata_queued_cmd *qc); extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); @@ -751,29 +576,17 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc); extern void ata_bmdma_stop(struct ata_queued_cmd *qc); extern u8 ata_bmdma_status(struct ata_port *ap); extern void ata_bmdma_irq_clear(struct ata_port *ap); -extern void ata_bmdma_freeze(struct ata_port *ap); -extern void ata_bmdma_thaw(struct ata_port *ap); -extern void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset, - ata_reset_fn_t softreset, - ata_reset_fn_t hardreset, - ata_postreset_fn_t postreset); -extern void ata_bmdma_error_handler(struct ata_port *ap); -extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); -extern int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, - u8 status, int in_wq); -extern void ata_qc_complete(struct ata_queued_cmd *qc); -extern int ata_qc_complete_multiple(struct ata_port *ap, u32 qc_active, - void (*finish_qc)(struct ata_queued_cmd *)); -extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, +extern void __ata_qc_complete(struct ata_queued_cmd *qc); +extern void ata_eng_timeout(struct ata_port *ap); +extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, + struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); extern int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]); extern int ata_scsi_slave_config(struct scsi_device *sdev); -extern void ata_scsi_slave_destroy(struct scsi_device *sdev); -extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, - int queue_depth); -extern struct ata_device *ata_dev_pair(struct ata_device *adev); +extern struct ata_device *ata_dev_pair(struct ata_port *ap, + struct ata_device *adev); /* * Timing helpers @@ -819,69 +632,7 @@ extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bit extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long); #endif /* CONFIG_PCI */ -/* - * EH - */ -extern void ata_eng_timeout(struct ata_port *ap); - -extern void ata_port_schedule_eh(struct ata_port *ap); -extern int ata_port_abort(struct ata_port *ap); -extern int ata_port_freeze(struct ata_port *ap); - -extern void ata_eh_freeze_port(struct ata_port *ap); -extern void ata_eh_thaw_port(struct ata_port *ap); - -extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); -extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); - -extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, - ata_reset_fn_t softreset, ata_reset_fn_t hardreset, - ata_postreset_fn_t postreset); - -/* - * printk helpers - */ -#define ata_port_printk(ap, lv, fmt, args...) \ - printk(lv"ata%u: "fmt, (ap)->id , ##args) - -#define ata_dev_printk(dev, lv, fmt, args...) \ - printk(lv"ata%u.%02u: "fmt, (dev)->ap->id, (dev)->devno , ##args) - -/* - * ata_eh_info helpers - */ -#define ata_ehi_push_desc(ehi, fmt, args...) do { \ - (ehi)->desc_len += scnprintf((ehi)->desc + (ehi)->desc_len, \ - ATA_EH_DESC_LEN - (ehi)->desc_len, \ - fmt , ##args); \ -} while (0) - -#define ata_ehi_clear_desc(ehi) do { \ - (ehi)->desc[0] = '\0'; \ - (ehi)->desc_len = 0; \ -} while (0) - -static inline void __ata_ehi_hotplugged(struct ata_eh_info *ehi) -{ - if (ehi->flags & ATA_EHI_HOTPLUGGED) - return; - - ehi->flags |= ATA_EHI_HOTPLUGGED | ATA_EHI_RESUME_LINK; - ehi->hotplug_timestamp = jiffies; - - ehi->action |= ATA_EH_SOFTRESET; - ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1; -} - -static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi) -{ - __ata_ehi_hotplugged(ehi); - ehi->err_mask |= AC_ERR_ATA_BUS; -} -/* - * qc helpers - */ static inline int ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) { @@ -924,60 +675,16 @@ static inline unsigned int ata_tag_valid(unsigned int tag) return (tag < ATA_MAX_QUEUE) ? 1 : 0; } -static inline unsigned int ata_tag_internal(unsigned int tag) -{ - return tag == ATA_MAX_QUEUE - 1; -} - -/* - * device helpers - */ -static inline unsigned int ata_class_enabled(unsigned int class) +static inline unsigned int ata_class_present(unsigned int class) { return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; } -static inline unsigned int ata_class_disabled(unsigned int class) -{ - return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP; -} - -static inline unsigned int ata_class_absent(unsigned int class) -{ - return !ata_class_enabled(class) && !ata_class_disabled(class); -} - -static inline unsigned int ata_dev_enabled(const struct ata_device *dev) -{ - return ata_class_enabled(dev->class); -} - -static inline unsigned int ata_dev_disabled(const struct ata_device *dev) -{ - return ata_class_disabled(dev->class); -} - -static inline unsigned int ata_dev_absent(const struct ata_device *dev) -{ - return ata_class_absent(dev->class); -} - -static inline unsigned int ata_dev_ready(const struct ata_device *dev) -{ - return ata_dev_enabled(dev) && !(dev->flags & ATA_DFLAG_SUSPENDED); -} - -/* - * port helpers - */ -static inline int ata_port_max_devices(const struct ata_port *ap) +static inline unsigned int ata_dev_present(const struct ata_device *dev) { - if (ap->flags & ATA_FLAG_SLAVE_POSS) - return 2; - return 1; + return ata_class_present(dev->class); } - static inline u8 ata_chk_status(struct ata_port *ap) { return ap->ops->check_status(ap); @@ -1056,35 +763,20 @@ static inline void ata_qc_set_polling(struct ata_queued_cmd *qc) qc->tf.ctl |= ATA_NIEN; } -static inline struct ata_queued_cmd *__ata_qc_from_tag(struct ata_port *ap, - unsigned int tag) +static inline struct ata_queued_cmd *ata_qc_from_tag (struct ata_port *ap, + unsigned int tag) { if (likely(ata_tag_valid(tag))) return &ap->qcmd[tag]; return NULL; } -static inline struct ata_queued_cmd *ata_qc_from_tag(struct ata_port *ap, - unsigned int tag) -{ - struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag); - - if (unlikely(!qc) || !ap->ops->error_handler) - return qc; - - if ((qc->flags & (ATA_QCFLAG_ACTIVE | - ATA_QCFLAG_FAILED)) == ATA_QCFLAG_ACTIVE) - return qc; - - return NULL; -} - -static inline void ata_tf_init(struct ata_device *dev, struct ata_taskfile *tf) +static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, unsigned int device) { memset(tf, 0, sizeof(*tf)); - tf->ctl = dev->ap->ctl; - if (dev->devno == 0) + tf->ctl = ap->ctl; + if (device == 0) tf->device = ATA_DEVICE_OBS; else tf->device = ATA_DEVICE_OBS | ATA_DEV1; @@ -1099,11 +791,26 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) qc->nbytes = qc->curbytes = 0; qc->err_mask = 0; - ata_tf_init(qc->dev, &qc->tf); + ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); +} + +/** + * ata_qc_complete - Complete an active ATA command + * @qc: Command to complete + * @err_mask: ATA Status register contents + * + * Indicate to the mid and upper layers that an ATA + * command has completed, with either an ok or not-ok status. + * + * LOCKING: + * spin_lock_irqsave(host_set lock) + */ +static inline void ata_qc_complete(struct ata_queued_cmd *qc) +{ + if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED)) + return; - /* init result_tf such that it indicates normal completion */ - qc->result_tf.command = ATA_DRDY; - qc->result_tf.feature = 0; + __ata_qc_complete(qc); } /** @@ -1182,6 +889,28 @@ static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) return status; } +static inline u32 scr_read(struct ata_port *ap, unsigned int reg) +{ + return ap->ops->scr_read(ap, reg); +} + +static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val) +{ + ap->ops->scr_write(ap, reg, val); +} + +static inline void scr_write_flush(struct ata_port *ap, unsigned int reg, + u32 val) +{ + ap->ops->scr_write(ap, reg, val); + (void) ap->ops->scr_read(ap, reg); +} + +static inline unsigned int sata_dev_present(struct ata_port *ap) +{ + return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; +} + static inline int ata_try_flush_cache(const struct ata_device *dev) { return ata_id_wcache_enabled(dev->id) || @@ -1191,7 +920,7 @@ static inline int ata_try_flush_cache(const struct ata_device *dev) static inline unsigned int ac_err_mask(u8 status) { - if (status & (ATA_BUSY | ATA_DRQ)) + if (status & ATA_BUSY) return AC_ERR_HSM; if (status & (ATA_ERR | ATA_DF)) return AC_ERR_DEV; @@ -1219,9 +948,4 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev) dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); } -static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) -{ - return (struct ata_port *) &host->hostdata[0]; -} - #endif /* __LINUX_LIBATA_H__ */ diff --git a/include/linux/license.h b/include/linux/license.h deleted file mode 100644 index decdbf43c..000000000 --- a/include/linux/license.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __LICENSE_H -#define __LICENSE_H - -static inline int license_is_gpl_compatible(const char *license) -{ - return (strcmp(license, "GPL") == 0 - || strcmp(license, "GPL v2") == 0 - || strcmp(license, "GPL and additional rights") == 0 - || strcmp(license, "Dual BSD/GPL") == 0 - || strcmp(license, "Dual MIT/GPL") == 0 - || strcmp(license, "Dual MPL/GPL") == 0); -} - -#endif diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 932021f87..c08c9983e 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -1,6 +1,7 @@ #ifndef _LINUX_LINKAGE_H #define _LINUX_LINKAGE_H +#include #include #ifdef __cplusplus diff --git a/include/linux/list.h b/include/linux/list.h index a9c90287c..e43989c12 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -4,9 +4,18 @@ #ifdef __KERNEL__ #include -#include #include +#include #include +#include + +/* + * These are non-NULL pointers that will result in page faults + * under normal circumstances, used to verify that nobody uses + * non-initialized list entries. + */ +#define LIST_POISON1 ((void *) 0x00100100) +#define LIST_POISON2 ((void *) 0x00200200) /* * Simple doubly linked list implementation. @@ -39,21 +48,25 @@ static inline void INIT_LIST_HEAD(struct list_head *list) * This is only for internal list manipulation where we know * the prev/next entries already! */ -#ifndef CONFIG_DEBUG_LIST static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) { + if (next->prev != prev) { + printk("List corruption. next->prev should be %p, but was %p\n", + prev, next->prev); + BUG(); + } + if (prev->next != next) { + printk("List corruption. prev->next should be %p, but was %p\n", + next, prev->next); + BUG(); + } next->prev = new; new->next = next; new->prev = prev; prev->next = new; } -#else -extern void __list_add(struct list_head *new, - struct list_head *prev, - struct list_head *next); -#endif /** * list_add - add a new entry @@ -63,15 +76,10 @@ extern void __list_add(struct list_head *new, * Insert a new entry after the specified head. * This is good for implementing stacks. */ -#ifndef CONFIG_DEBUG_LIST static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } -#else -extern void list_add(struct list_head *new, struct list_head *head); -#endif - /** * list_add_tail - add a new entry @@ -164,16 +172,22 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) * Note: list_empty on entry does not return true after this, the entry is * in an undefined state. */ -#ifndef CONFIG_DEBUG_LIST static inline void list_del(struct list_head *entry) { + if (entry->prev->next != entry) { + printk("List corruption. prev->next should be %p, but was %p\n", + entry, entry->prev->next); + BUG(); + } + if (entry->next->prev != entry) { + printk("List corruption. next->prev should be %p, but was %p\n", + entry, entry->next->prev); + BUG(); + } __list_del(entry->prev, entry->next); entry->next = LIST_POISON1; entry->prev = LIST_POISON2; } -#else -extern void list_del(struct list_head *entry); -#endif /** * list_del_rcu - deletes entry from list without re-initialization @@ -205,35 +219,12 @@ static inline void list_del_rcu(struct list_head *entry) entry->prev = LIST_POISON2; } -/** - * list_replace - replace old entry by new one - * @old : the element to be replaced - * @new : the new element to insert - * Note: if 'old' was empty, it will be overwritten. - */ -static inline void list_replace(struct list_head *old, - struct list_head *new) -{ - new->next = old->next; - new->next->prev = new; - new->prev = old->prev; - new->prev->next = new; -} - -static inline void list_replace_init(struct list_head *old, - struct list_head *new) -{ - list_replace(old, new); - INIT_LIST_HEAD(old); -} - /* * list_replace_rcu - replace old entry by new one * @old : the element to be replaced * @new : the new element to insert * * The old entry will be replaced with the new entry atomically. - * Note: 'old' should not be empty. */ static inline void list_replace_rcu(struct list_head *old, struct list_head *new) @@ -279,17 +270,6 @@ static inline void list_move_tail(struct list_head *list, list_add_tail(list, head); } -/** - * list_is_last - tests whether @list is the last entry in list @head - * @list: the entry to test - * @head: the head of the list - */ -static inline int list_is_last(const struct list_head *list, - const struct list_head *head) -{ - return list->next == head; -} - /** * list_empty - tests whether a list is empty * @head: the list to test. @@ -300,17 +280,16 @@ static inline int list_empty(const struct list_head *head) } /** - * list_empty_careful - tests whether a list is empty and not being modified - * @head: the list to test - * - * Description: - * tests whether a list is empty _and_ checks that no other CPU might be - * in the process of modifying either member (next or prev) + * 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) { @@ -370,7 +349,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop cursor. + * @pos: the &struct list_head to use as a loop counter. * @head: the head for your list. */ #define list_for_each(pos, head) \ @@ -379,7 +358,7 @@ static inline void list_splice_init(struct list_head *list, /** * __list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop cursor. + * @pos: the &struct list_head to use as a loop counter. * @head: the head for your list. * * This variant differs from list_for_each() in that it's the @@ -392,7 +371,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_prev - iterate over a list backwards - * @pos: the &struct list_head to use as a loop cursor. + * @pos: the &struct list_head to use as a loop counter. * @head: the head for your list. */ #define list_for_each_prev(pos, head) \ @@ -400,8 +379,8 @@ static inline void list_splice_init(struct list_head *list, pos = pos->prev) /** - * list_for_each_safe - iterate over a list safe against removal of list entry - * @pos: the &struct list_head to use as a loop cursor. + * list_for_each_safe - iterate over a list safe against removal of list entry + * @pos: the &struct list_head to use as a loop counter. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. */ @@ -411,7 +390,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_entry - iterate over list of given type - * @pos: the type * to use as a loop cursor. + * @pos: the type * to use as a loop counter. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ @@ -422,7 +401,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_entry_reverse - iterate backwards over list of given type. - * @pos: the type * to use as a loop cursor. + * @pos: the type * to use as a loop counter. * @head: the head for your list. * @member: the name of the list_struct within the struct. */ @@ -432,24 +411,21 @@ static inline void list_splice_init(struct list_head *list, pos = list_entry(pos->member.prev, typeof(*pos), member)) /** - * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue + * list_prepare_entry - prepare a pos entry for use as a start point in + * list_for_each_entry_continue * @pos: the type * to use as a start point * @head: the head of the list * @member: the name of the list_struct within the struct. - * - * Prepares a pos entry for use as a start point in list_for_each_entry_continue. */ #define list_prepare_entry(pos, head, member) \ ((pos) ? : list_entry(head, typeof(*pos), member)) /** - * list_for_each_entry_continue - continue iteration over list of given type - * @pos: the type * to use as a loop cursor. + * list_for_each_entry_continue - iterate over list of given type + * continuing after existing point + * @pos: the type * to use as a loop counter. * @head: the head for your list. * @member: the name of the list_struct within the struct. - * - * Continue to iterate over list of given type, continuing after - * the current position. */ #define list_for_each_entry_continue(pos, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member); \ @@ -457,12 +433,11 @@ static inline void list_splice_init(struct list_head *list, pos = list_entry(pos->member.next, typeof(*pos), member)) /** - * list_for_each_entry_from - iterate over list of given type from the current point - * @pos: the type * to use as a loop cursor. + * list_for_each_entry_from - iterate over list of given type + * continuing from existing point + * @pos: the type * to use as a loop counter. * @head: the head for your list. * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type, continuing from current position. */ #define list_for_each_entry_from(pos, head, member) \ for (; prefetch(pos->member.next), &pos->member != (head); \ @@ -470,7 +445,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry - * @pos: the type * to use as a loop cursor. + * @pos: the type * to use as a loop counter. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. @@ -482,14 +457,12 @@ static inline void list_splice_init(struct list_head *list, pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** - * list_for_each_entry_safe_continue - * @pos: the type * to use as a loop cursor. + * list_for_each_entry_safe_continue - iterate over list of given type + * continuing after existing point safe against removal of list entry + * @pos: the type * to use as a loop counter. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type, continuing after current point, - * safe against removal of list entry. */ #define list_for_each_entry_safe_continue(pos, n, head, member) \ for (pos = list_entry(pos->member.next, typeof(*pos), member), \ @@ -498,14 +471,12 @@ static inline void list_splice_init(struct list_head *list, pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** - * list_for_each_entry_safe_from - * @pos: the type * to use as a loop cursor. + * list_for_each_entry_safe_from - iterate over list of given type + * from existing point safe against removal of list entry + * @pos: the type * to use as a loop counter. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type from current point, safe against - * removal of list entry. */ #define list_for_each_entry_safe_from(pos, n, head, member) \ for (n = list_entry(pos->member.next, typeof(*pos), member); \ @@ -513,14 +484,12 @@ static inline void list_splice_init(struct list_head *list, pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** - * list_for_each_entry_safe_reverse - * @pos: the type * to use as a loop cursor. + * list_for_each_entry_safe_reverse - iterate backwards over list of given type safe against + * removal of list entry + * @pos: the type * to use as a loop counter. * @n: another type * to use as temporary storage * @head: the head for your list. * @member: the name of the list_struct within the struct. - * - * Iterate backwards over list of given type, safe against removal - * of list entry. */ #define list_for_each_entry_safe_reverse(pos, n, head, member) \ for (pos = list_entry((head)->prev, typeof(*pos), member), \ @@ -530,7 +499,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_rcu - iterate over an rcu-protected list - * @pos: the &struct list_head to use as a loop cursor. + * @pos: the &struct list_head to use as a loop counter. * @head: the head for your list. * * This list-traversal primitive may safely run concurrently with @@ -548,13 +517,12 @@ static inline void list_splice_init(struct list_head *list, pos = pos->next) /** - * list_for_each_safe_rcu - * @pos: the &struct list_head to use as a loop cursor. + * list_for_each_safe_rcu - iterate over an rcu-protected list safe + * against removal of list entry + * @pos: the &struct list_head to use as a loop counter. * @n: another &struct list_head to use as temporary storage * @head: the head for your list. * - * Iterate over an rcu-protected list, safe against removal of list entry. - * * This list-traversal primitive may safely run concurrently with * the _rcu list-mutation primitives such as list_add_rcu() * as long as the traversal is guarded by rcu_read_lock(). @@ -566,7 +534,7 @@ static inline void list_splice_init(struct list_head *list, /** * list_for_each_entry_rcu - iterate over rcu list of given type - * @pos: the type * to use as a loop cursor. + * @pos: the type * to use as a loop counter. * @head: the head for your list. * @member: the name of the list_struct within the struct. * @@ -582,12 +550,11 @@ static inline void list_splice_init(struct list_head *list, /** - * list_for_each_continue_rcu - * @pos: the &struct list_head to use as a loop cursor. + * list_for_each_continue_rcu - iterate over an rcu-protected list + * continuing after existing point. + * @pos: the &struct list_head to use as a loop counter. * @head: the head for your list. * - * Iterate over an rcu-protected list, continuing after current point. - * * This list-traversal primitive may safely run concurrently with * the _rcu list-mutation primitives such as list_add_rcu() * as long as the traversal is guarded by rcu_read_lock(). @@ -713,14 +680,11 @@ static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) /** - * hlist_add_head_rcu + * hlist_add_head_rcu - adds the specified element to the specified hlist, + * while permitting racing traversals. * @n: the element to add to the hash list. * @h: the list to add to. * - * Description: - * Adds the specified element to the specified hlist, - * while permitting racing traversals. - * * The caller must take whatever precautions are necessary * (such as holding appropriate locks) to avoid racing * with another list-mutation primitive, such as hlist_add_head_rcu() @@ -765,14 +729,11 @@ static inline void hlist_add_after(struct hlist_node *n, } /** - * hlist_add_before_rcu + * hlist_add_before_rcu - adds the specified element to the specified hlist + * before the specified node while permitting racing traversals. * @n: the new element to add to the hash list. * @next: the existing element to add the new element before. * - * Description: - * Adds the specified element to the specified hlist - * before the specified node while permitting racing traversals. - * * The caller must take whatever precautions are necessary * (such as holding appropriate locks) to avoid racing * with another list-mutation primitive, such as hlist_add_head_rcu() @@ -793,14 +754,11 @@ static inline void hlist_add_before_rcu(struct hlist_node *n, } /** - * hlist_add_after_rcu + * hlist_add_after_rcu - adds the specified element to the specified hlist + * after the specified node while permitting racing traversals. * @prev: the existing element to add the new element after. * @n: the new element to add to the hash list. * - * Description: - * Adds the specified element to the specified hlist - * after the specified node while permitting racing traversals. - * * The caller must take whatever precautions are necessary * (such as holding appropriate locks) to avoid racing * with another list-mutation primitive, such as hlist_add_head_rcu() @@ -833,8 +791,8 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, /** * hlist_for_each_entry - iterate over list of given type - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. + * @tpos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. * @head: the head for your list. * @member: the name of the hlist_node within the struct. */ @@ -845,9 +803,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, pos = pos->next) /** - * hlist_for_each_entry_continue - iterate over a hlist continuing after current point - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. + * hlist_for_each_entry_continue - iterate over a hlist continuing after existing point + * @tpos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. * @member: the name of the hlist_node within the struct. */ #define hlist_for_each_entry_continue(tpos, pos, member) \ @@ -857,9 +815,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, pos = pos->next) /** - * hlist_for_each_entry_from - iterate over a hlist continuing from current point - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. + * hlist_for_each_entry_from - iterate over a hlist continuing from existing point + * @tpos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. * @member: the name of the hlist_node within the struct. */ #define hlist_for_each_entry_from(tpos, pos, member) \ @@ -869,8 +827,8 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, /** * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. + * @tpos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. * @n: another &struct hlist_node to use as temporary storage * @head: the head for your list. * @member: the name of the hlist_node within the struct. @@ -883,8 +841,8 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, /** * hlist_for_each_entry_rcu - iterate over rcu list of given type - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. + * @tpos: the type * to use as a loop counter. + * @pos: the &struct hlist_node to use as a loop counter. * @head: the head for your list. * @member: the name of the hlist_node within the struct. * diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 0d92c468d..995f89dc8 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -11,6 +11,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -49,12 +50,11 @@ struct nlm_host { h_killed : 1, h_monitored : 1; wait_queue_head_t h_gracewait; /* wait while reclaiming */ - struct rw_semaphore h_rwsem; /* Reboot recovery lock */ u32 h_state; /* pseudo-state counter */ u32 h_nsmstate; /* true remote NSM state */ u32 h_pidcount; /* Pseudopids */ atomic_t h_count; /* reference count */ - struct mutex h_mutex; /* mutex for pmap binding */ + struct semaphore h_sema; /* mutex for pmap binding */ unsigned long h_nextrebind; /* next portmap call */ unsigned long h_expires; /* eligible for GC */ struct list_head h_lockowners; /* Lockowners for the client */ @@ -123,6 +123,7 @@ struct nlm_block { unsigned int b_id; /* block id */ unsigned char b_queued; /* re-queued */ unsigned char b_granted; /* VFS granted lock */ + unsigned char b_done; /* callback complete */ struct nlm_file * b_file; /* file in question */ }; @@ -219,7 +220,6 @@ static __inline__ int nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) { return fl1->fl_pid == fl2->fl_pid - && fl1->fl_owner == fl2->fl_owner && fl1->fl_start == fl2->fl_start && fl1->fl_end == fl2->fl_end &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); diff --git a/include/linux/lockd/nlm.h b/include/linux/lockd/nlm.h index d9d46e442..869b630cb 100644 --- a/include/linux/lockd/nlm.h +++ b/include/linux/lockd/nlm.h @@ -9,6 +9,7 @@ #ifndef LINUX_LOCKD_NLM_H #define LINUX_LOCKD_NLM_H +#include /* Maximum file offset in file_lock.fl_end */ # define NLM_OFFSET_MAX ((s32) 0x7fffffff) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h deleted file mode 100644 index 716787278..000000000 --- a/include/linux/lockdep.h +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Runtime locking correctness validator - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - * - * see Documentation/lockdep-design.txt for more details. - */ -#ifndef __LINUX_LOCKDEP_H -#define __LINUX_LOCKDEP_H - -#include -#include -#include -#include - -#ifdef CONFIG_LOCKDEP - -/* - * Lock-class usage-state bits: - */ -enum lock_usage_bit -{ - LOCK_USED = 0, - LOCK_USED_IN_HARDIRQ, - LOCK_USED_IN_SOFTIRQ, - LOCK_ENABLED_SOFTIRQS, - LOCK_ENABLED_HARDIRQS, - LOCK_USED_IN_HARDIRQ_READ, - LOCK_USED_IN_SOFTIRQ_READ, - LOCK_ENABLED_SOFTIRQS_READ, - LOCK_ENABLED_HARDIRQS_READ, - LOCK_USAGE_STATES -}; - -/* - * Usage-state bitmasks: - */ -#define LOCKF_USED (1 << LOCK_USED) -#define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ) -#define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ) -#define LOCKF_ENABLED_HARDIRQS (1 << LOCK_ENABLED_HARDIRQS) -#define LOCKF_ENABLED_SOFTIRQS (1 << LOCK_ENABLED_SOFTIRQS) - -#define LOCKF_ENABLED_IRQS (LOCKF_ENABLED_HARDIRQS | LOCKF_ENABLED_SOFTIRQS) -#define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) - -#define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ) -#define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_READ) -#define LOCKF_ENABLED_HARDIRQS_READ (1 << LOCK_ENABLED_HARDIRQS_READ) -#define LOCKF_ENABLED_SOFTIRQS_READ (1 << LOCK_ENABLED_SOFTIRQS_READ) - -#define LOCKF_ENABLED_IRQS_READ \ - (LOCKF_ENABLED_HARDIRQS_READ | LOCKF_ENABLED_SOFTIRQS_READ) -#define LOCKF_USED_IN_IRQ_READ \ - (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ) - -#define MAX_LOCKDEP_SUBCLASSES 8UL - -/* - * Lock-classes are keyed via unique addresses, by embedding the - * lockclass-key into the kernel (or module) .data section. (For - * static locks we use the lock address itself as the key.) - */ -struct lockdep_subclass_key { - char __one_byte; -} __attribute__ ((__packed__)); - -struct lock_class_key { - struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; -}; - -/* - * The lock-class itself: - */ -struct lock_class { - /* - * class-hash: - */ - struct list_head hash_entry; - - /* - * global list of all lock-classes: - */ - struct list_head lock_entry; - - struct lockdep_subclass_key *key; - unsigned int subclass; - - /* - * IRQ/softirq usage tracking bits: - */ - unsigned long usage_mask; - struct stack_trace usage_traces[LOCK_USAGE_STATES]; - - /* - * These fields represent a directed graph of lock dependencies, - * to every node we attach a list of "forward" and a list of - * "backward" graph nodes. - */ - struct list_head locks_after, locks_before; - - /* - * Generation counter, when doing certain classes of graph walking, - * to ensure that we check one node only once: - */ - unsigned int version; - - /* - * Statistics counter: - */ - unsigned long ops; - - const char *name; - int name_version; -}; - -/* - * Map the lock object (the lock instance) to the lock-class object. - * This is embedded into specific lock instances: - */ -struct lockdep_map { - struct lock_class_key *key; - struct lock_class *class_cache; - const char *name; -}; - -/* - * Every lock has a list of other locks that were taken after it. - * We only grow the list, never remove from it: - */ -struct lock_list { - struct list_head entry; - struct lock_class *class; - struct stack_trace trace; -}; - -/* - * We record lock dependency chains, so that we can cache them: - */ -struct lock_chain { - struct list_head entry; - u64 chain_key; -}; - -struct held_lock { - /* - * One-way hash of the dependency chain up to this point. We - * hash the hashes step by step as the dependency chain grows. - * - * We use it for dependency-caching and we skip detection - * passes and dependency-updates if there is a cache-hit, so - * it is absolutely critical for 100% coverage of the validator - * to have a unique key value for every unique dependency path - * that can occur in the system, to make a unique hash value - * as likely as possible - hence the 64-bit width. - * - * The task struct holds the current hash value (initialized - * with zero), here we store the previous hash value: - */ - u64 prev_chain_key; - struct lock_class *class; - unsigned long acquire_ip; - struct lockdep_map *instance; - - /* - * The lock-stack is unified in that the lock chains of interrupt - * contexts nest ontop of process context chains, but we 'separate' - * the hashes by starting with 0 if we cross into an interrupt - * context, and we also keep do not add cross-context lock - * dependencies - the lock usage graph walking covers that area - * anyway, and we'd just unnecessarily increase the number of - * dependencies otherwise. [Note: hardirq and softirq contexts - * are separated from each other too.] - * - * The following field is used to detect when we cross into an - * interrupt context: - */ - int irq_context; - int trylock; - int read; - int check; - int hardirqs_off; -}; - -/* - * Initialization, self-test and debugging-output methods: - */ -extern void lockdep_init(void); -extern void lockdep_info(void); -extern void lockdep_reset(void); -extern void lockdep_reset_lock(struct lockdep_map *lock); -extern void lockdep_free_key_range(void *start, unsigned long size); - -extern void lockdep_off(void); -extern void lockdep_on(void); -extern int lockdep_internal(void); - -/* - * These methods are used by specific locking variants (spinlocks, - * rwlocks, mutexes and rwsems) to pass init/acquire/release events - * to lockdep: - */ - -extern void lockdep_init_map(struct lockdep_map *lock, const char *name, - struct lock_class_key *key, int subclass); - -/* - * Reinitialize a lock key - for cases where there is special locking or - * special initialization of locks so that the validator gets the scope - * of dependencies wrong: they are either too broad (they need a class-split) - * or they are too narrow (they suffer from a false class-split): - */ -#define lockdep_set_class(lock, key) \ - lockdep_init_map(&(lock)->dep_map, #key, key, 0) -#define lockdep_set_class_and_name(lock, key, name) \ - lockdep_init_map(&(lock)->dep_map, name, key, 0) -#define lockdep_set_class_and_subclass(lock, key, sub) \ - lockdep_init_map(&(lock)->dep_map, #key, key, sub) - -/* - * Acquire a lock. - * - * Values for "read": - * - * 0: exclusive (write) acquire - * 1: read-acquire (no recursion allowed) - * 2: read-acquire with same-instance recursion allowed - * - * Values for check: - * - * 0: disabled - * 1: simple checks (freeing, held-at-exit-time, etc.) - * 2: full validation - */ -extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, unsigned long ip); - -extern void lock_release(struct lockdep_map *lock, int nested, - unsigned long ip); - -# define INIT_LOCKDEP .lockdep_recursion = 0, - -#else /* !LOCKDEP */ - -static inline void lockdep_off(void) -{ -} - -static inline void lockdep_on(void) -{ -} - -static inline int lockdep_internal(void) -{ - return 0; -} - -# define lock_acquire(l, s, t, r, c, i) do { } while (0) -# define lock_release(l, n, i) do { } while (0) -# define lockdep_init() do { } while (0) -# define lockdep_info() do { } while (0) -# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) -# define lockdep_set_class(lock, key) do { (void)(key); } while (0) -# define lockdep_set_class_and_name(lock, key, name) \ - do { (void)(key); } while (0) -#define lockdep_set_class_and_subclass(lock, key, sub) \ - do { (void)(key); } while (0) -# define INIT_LOCKDEP -# define lockdep_reset() do { debug_locks = 1; } while (0) -# define lockdep_free_key_range(start, size) do { } while (0) -/* - * The class key takes no space if lockdep is disabled: - */ -struct lock_class_key { }; -#endif /* !LOCKDEP */ - -#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS) -extern void early_init_irq_lock_class(void); -#else -# define early_init_irq_lock_class() do { } while (0) -#endif - -#ifdef CONFIG_TRACE_IRQFLAGS -extern void early_boot_irqs_off(void); -extern void early_boot_irqs_on(void); -#else -# define early_boot_irqs_off() do { } while (0) -# define early_boot_irqs_on() do { } while (0) -#endif - -/* - * For trivial one-depth nesting of a lock-class, the following - * global define can be used. (Subsystems with multiple levels - * of nesting should define their own lock-nesting subclasses.) - */ -#define SINGLE_DEPTH_NESTING 1 - -/* - * Map the dependency ops to NOP or to real lockdep ops, depending - * on the per lock-class debug mode: - */ - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# ifdef CONFIG_PROVE_LOCKING -# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) -# else -# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) -# endif -# define spin_release(l, n, i) lock_release(l, n, i) -#else -# define spin_acquire(l, s, t, i) do { } while (0) -# define spin_release(l, n, i) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# ifdef CONFIG_PROVE_LOCKING -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i) -# else -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i) -# endif -# define rwlock_release(l, n, i) lock_release(l, n, i) -#else -# define rwlock_acquire(l, s, t, i) do { } while (0) -# define rwlock_acquire_read(l, s, t, i) do { } while (0) -# define rwlock_release(l, n, i) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# ifdef CONFIG_PROVE_LOCKING -# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) -# else -# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) -# endif -# define mutex_release(l, n, i) lock_release(l, n, i) -#else -# define mutex_acquire(l, s, t, i) do { } while (0) -# define mutex_release(l, n, i) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# ifdef CONFIG_PROVE_LOCKING -# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) -# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i) -# else -# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) -# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i) -# endif -# define rwsem_release(l, n, i) lock_release(l, n, i) -#else -# define rwsem_acquire(l, s, t, i) do { } while (0) -# define rwsem_acquire_read(l, s, t, i) do { } while (0) -# define rwsem_release(l, n, i) do { } while (0) -#endif - -#endif /* __LINUX_LOCKDEP_H */ diff --git a/include/linux/m41t00.h b/include/linux/m41t00.h deleted file mode 100644 index b423360ca..000000000 --- a/include/linux/m41t00.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Definitions for the ST M41T00 family of i2c rtc chips. - * - * Author: Mark A. Greer - * - * 2005, 2006 (c) MontaVista Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ - -#ifndef _M41T00_H -#define _M41T00_H - -#define M41T00_DRV_NAME "m41t00" -#define M41T00_I2C_ADDR 0x68 - -#define M41T00_TYPE_M41T00 0 -#define M41T00_TYPE_M41T81 81 -#define M41T00_TYPE_M41T85 85 - -struct m41t00_platform_data { - u8 type; - u8 i2c_addr; - u8 sqw_freq; -}; - -/* SQW output disabled, this is default value by power on */ -#define M41T00_SQW_DISABLE (0) - -#define M41T00_SQW_32KHZ (1<<4) /* 32.768 KHz */ -#define M41T00_SQW_8KHZ (2<<4) /* 8.192 KHz */ -#define M41T00_SQW_4KHZ (3<<4) /* 4.096 KHz */ -#define M41T00_SQW_2KHZ (4<<4) /* 2.048 KHz */ -#define M41T00_SQW_1KHZ (5<<4) /* 1.024 KHz */ -#define M41T00_SQW_512HZ (6<<4) /* 512 Hz */ -#define M41T00_SQW_256HZ (7<<4) /* 256 Hz */ -#define M41T00_SQW_128HZ (8<<4) /* 128 Hz */ -#define M41T00_SQW_64HZ (9<<4) /* 64 Hz */ -#define M41T00_SQW_32HZ (10<<4) /* 32 Hz */ -#define M41T00_SQW_16HZ (11<<4) /* 16 Hz */ -#define M41T00_SQW_8HZ (12<<4) /* 8 Hz */ -#define M41T00_SQW_4HZ (13<<4) /* 4 Hz */ -#define M41T00_SQW_2HZ (14<<4) /* 2 Hz */ -#define M41T00_SQW_1HZ (15<<4) /* 1 Hz */ - -extern ulong m41t00_get_rtc_time(void); -extern int m41t00_set_rtc_time(ulong nowtime); - -#endif /* _M41T00_H */ diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa24..bbc93ae21 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -89,11 +89,4 @@ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ # define RTC_VRT 0x80 /* valid RAM and time */ /**********************************************************************/ -#ifndef ARCH_RTC_LOCATION /* Override by ? */ - -#define RTC_IO_EXTENT 0x8 -#define RTC_IOMAPPED 1 /* Default to I/O mapping. */ - -#endif /* ARCH_RTC_LOCATION */ - #endif /* _MC146818RTC_H */ diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 218501cfa..911206386 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -63,76 +63,6 @@ extern int online_pages(unsigned long, unsigned long); /* reasonably generic interface to expand the physical pages in a zone */ extern int __add_pages(struct zone *zone, unsigned long start_pfn, unsigned long nr_pages); - -#ifdef CONFIG_NUMA -extern int memory_add_physaddr_to_nid(u64 start); -#else -static inline int memory_add_physaddr_to_nid(u64 start) -{ - return 0; -} -#endif - -#ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION -/* - * For supporting node-hotadd, we have to allocate a new pgdat. - * - * If an arch has generic style NODE_DATA(), - * node_data[nid] = kzalloc() works well. But it depends on the architecture. - * - * In general, generic_alloc_nodedata() is used. - * Now, arch_free_nodedata() is just defined for error path of node_hot_add. - * - */ -extern pg_data_t *arch_alloc_nodedata(int nid); -extern void arch_free_nodedata(pg_data_t *pgdat); -extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat); - -#else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ - -#define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid) -#define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat) - -#ifdef CONFIG_NUMA -/* - * If ARCH_HAS_NODEDATA_EXTENSION=n, this func is used to allocate pgdat. - * XXX: kmalloc_node() can't work well to get new node's memory at this time. - * Because, pgdat for the new node is not allocated/initialized yet itself. - * To use new node's memory, more consideration will be necessary. - */ -#define generic_alloc_nodedata(nid) \ -({ \ - kzalloc(sizeof(pg_data_t), GFP_KERNEL); \ -}) -/* - * This definition is just for error path in node hotadd. - * For node hotremove, we have to replace this. - */ -#define generic_free_nodedata(pgdat) kfree(pgdat) - -extern pg_data_t *node_data[]; -static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) -{ - node_data[nid] = pgdat; -} - -#else /* !CONFIG_NUMA */ - -/* never called */ -static inline pg_data_t *generic_alloc_nodedata(int nid) -{ - BUG(); - return NULL; -} -static inline void generic_free_nodedata(pg_data_t *pgdat) -{ -} -static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) -{ -} -#endif /* CONFIG_NUMA */ -#endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ - #else /* ! CONFIG_MEMORY_HOTPLUG */ /* * Stub functions for when hotplug is off @@ -169,8 +99,7 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, return -ENOSYS; } -extern int add_memory(int nid, u64 start, u64 size); -extern int arch_add_memory(int nid, u64 start, u64 size); +extern int add_memory(u64 start, u64 size); extern int remove_memory(u64 start, u64 size); #endif /* __LINUX_MEMORY_HOTPLUG_H */ diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 72440f0a4..f5fdca1d6 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h @@ -28,6 +28,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 48148e0cd..ff0a64073 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -1,44 +1,36 @@ #ifndef _LINUX_MIGRATE_H #define _LINUX_MIGRATE_H +#include #include -typedef struct page *new_page_t(struct page *, unsigned long private, int **); - #ifdef CONFIG_MIGRATION extern int isolate_lru_page(struct page *p, struct list_head *pagelist); extern int putback_lru_pages(struct list_head *l); -extern int migrate_page(struct address_space *, - struct page *, struct page *); -extern int migrate_pages(struct list_head *l, new_page_t x, unsigned long); - -extern int fail_migrate_page(struct address_space *, - struct page *, struct page *); +extern int migrate_page(struct page *, struct page *); +extern void migrate_page_copy(struct page *, struct page *); +extern int migrate_page_remove_references(struct page *, struct page *, int); +extern int migrate_pages(struct list_head *l, struct list_head *t, + struct list_head *moved, struct list_head *failed); +extern int migrate_pages_to(struct list_head *pagelist, + struct vm_area_struct *vma, int dest); +extern int fail_migrate_page(struct page *, struct page *); extern int migrate_prep(void); -extern int migrate_vmas(struct mm_struct *mm, - const nodemask_t *from, const nodemask_t *to, - unsigned long flags); + #else static inline int isolate_lru_page(struct page *p, struct list_head *list) { return -ENOSYS; } static inline int putback_lru_pages(struct list_head *l) { return 0; } -static inline int migrate_pages(struct list_head *l, new_page_t x, - unsigned long private) { return -ENOSYS; } +static inline int migrate_pages(struct list_head *l, struct list_head *t, + struct list_head *moved, struct list_head *failed) { return -ENOSYS; } static inline int migrate_pages_to(struct list_head *pagelist, struct vm_area_struct *vma, int dest) { return 0; } static inline int migrate_prep(void) { return -ENOSYS; } -static inline int migrate_vmas(struct mm_struct *mm, - const nodemask_t *from, const nodemask_t *to, - unsigned long flags) -{ - return -ENOSYS; -} - /* Possible settings for the migrate_page() method in address_operations */ #define migrate_page NULL #define fail_migrate_page NULL diff --git a/include/linux/mii.h b/include/linux/mii.h index beddc6d3b..68f5a0f39 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h @@ -9,6 +9,7 @@ #define __LINUX_MII_H__ #include +#include /* Generic MII registers. */ @@ -135,20 +136,6 @@ #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ -/* This structure is used in all SIOCxMIIxxx ioctl calls */ -struct mii_ioctl_data { - __u16 phy_id; - __u16 reg_num; - __u16 val_in; - __u16 val_out; -}; - -#ifdef __KERNEL__ - -#include - -struct ethtool_cmd; - struct mii_if_info { int phy_id; int advertising; @@ -164,6 +151,9 @@ struct mii_if_info { void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val); }; +struct ethtool_cmd; +struct mii_ioctl_data; + extern int mii_link_ok (struct mii_if_info *mii); extern int mii_nway_restart (struct mii_if_info *mii); extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd); @@ -178,6 +168,16 @@ extern int generic_mii_ioctl(struct mii_if_info *mii_if, unsigned int *duplex_changed); + +/* This structure is used in all SIOCxMIIxxx ioctl calls */ +struct mii_ioctl_data { + u16 phy_id; + u16 reg_num; + u16 val_in; + u16 val_out; +}; + + static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) { return (struct mii_ioctl_data *) &rq->ifr_ifru; @@ -235,5 +235,5 @@ static inline unsigned int mii_duplex (unsigned int duplex_lock, return 0; } -#endif /* __KERNEL__ */ + #endif /* __LINUX_MII_H__ */ diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index b03cfb91e..5b584dafb 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -40,6 +40,7 @@ struct miscdevice { struct list_head list; struct device *dev; struct class_device *class; + char devfs_name[64]; }; extern int misc_register(struct miscdevice * misc); diff --git a/include/linux/mm.h b/include/linux/mm.h index 4efda963f..51eea5b38 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -7,6 +7,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -14,8 +15,6 @@ #include #include #include -#include -#include struct mempolicy; struct anon_vma; @@ -38,6 +37,7 @@ extern int sysctl_legacy_va_layout; #include #include #include +#include #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) @@ -146,6 +146,7 @@ extern unsigned int kobjsize(const void *objp); #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ #define VM_GROWSUP 0x00000200 +#define VM_SHM 0x00000000 /* Means nothing: delete it later */ #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ @@ -202,16 +203,10 @@ struct vm_operations_struct { void (*close)(struct vm_area_struct * area); 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); - - /* notification that a previously read-only page is about to become - * writable, if an error is returned it will cause a SIGBUS */ - int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); #ifdef CONFIG_NUMA int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new); struct mempolicy *(*get_policy)(struct vm_area_struct *vma, unsigned long addr); - int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from, - const nodemask_t *to, unsigned long flags); #endif }; @@ -340,7 +335,6 @@ static inline void init_page_count(struct page *page) } void put_page(struct page *page); -void put_pages_list(struct list_head *pages); void split_page(struct page *page, unsigned int order); @@ -475,13 +469,10 @@ static inline unsigned long page_zonenum(struct page *page) struct zone; extern struct zone *zone_table[]; -static inline int page_zone_id(struct page *page) -{ - return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK; -} static inline struct zone *page_zone(struct page *page) { - return zone_table[page_zone_id(page)]; + return zone_table[(page->flags >> ZONETABLE_PGSHIFT) & + ZONETABLE_MASK]; } static inline unsigned long page_to_nid(struct page *page) @@ -520,11 +511,6 @@ static inline void set_page_links(struct page *page, unsigned long zone, set_page_section(page, pfn_to_section_nr(pfn)); } -/* - * Some inline functions in vmstat.h depend on page_zone() - */ -#include - #ifndef CONFIG_DISCONTIGMEM /* The array of struct pages - for discontigmem use pgdat->lmem_map */ extern struct page *mem_map; @@ -806,39 +792,6 @@ struct shrinker; extern struct shrinker *set_shrinker(int, shrinker_t); extern void remove_shrinker(struct shrinker *shrinker); -/* - * Some shared mappigns will want the pages marked read-only - * to track write events. If so, we'll downgrade vm_page_prot - * to the private version (using protection_map[] without the - * VM_SHARED bit). - */ -static inline int vma_wants_writenotify(struct vm_area_struct *vma) -{ - unsigned int vm_flags = vma->vm_flags; - - /* If it was private or non-writable, the write bit is already clear */ - if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED))) - return 0; - - /* The backer wishes to know when pages are first written to? */ - if (vma->vm_ops && vma->vm_ops->page_mkwrite) - return 1; - - /* The open routine did something to the protections already? */ - if (pgprot_val(vma->vm_page_prot) != - pgprot_val(protection_map[vm_flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)])) - return 0; - - /* Specialty mapping? */ - if (vm_flags & (VM_PFNMAP|VM_INSERTPAGE)) - return 0; - - /* Can the mapping track the dirty pages? */ - return vma->vm_file && vma->vm_file->f_mapping && - mapping_cap_account_dirty(vma->vm_file->f_mapping); -} - extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); @@ -1062,7 +1015,6 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma) return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; } -pgprot_t vm_get_page_prot(unsigned long vm_flags); struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); struct page *vmalloc_to_page(void *addr); unsigned long vmalloc_to_pfn(void *addr); @@ -1098,8 +1050,8 @@ static inline void kernel_map_pages(struct page *page, int numpages, int enable) { if (!PageHighMem(page) && !enable) - debug_check_no_locks_freed(page_address(page), - numpages * PAGE_SIZE); + mutex_debug_check_no_locks_freed(page_address(page), + numpages * PAGE_SIZE); } #endif @@ -1128,7 +1080,5 @@ void drop_slab(void); extern int randomize_va_space; #endif -const char *arch_vma_name(struct vm_area_struct *vma); - #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ diff --git a/include/linux/mman.h b/include/linux/mman.h index 87920a085..18a5689ef 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -1,6 +1,10 @@ #ifndef _LINUX_MMAN_H #define _LINUX_MMAN_H +#include +#include + +#include #include #define MREMAP_MAYMOVE 1 @@ -9,12 +13,6 @@ #define OVERCOMMIT_GUESS 0 #define OVERCOMMIT_ALWAYS 1 #define OVERCOMMIT_NEVER 2 - -#ifdef __KERNEL__ -#include - -#include - extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; extern atomic_t vm_committed_space; @@ -65,5 +63,5 @@ calc_vm_flag_bits(unsigned long flags) _calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); } -#endif /* __KERNEL__ */ + #endif /* _LINUX_MMAN_H */ diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index ba095aebe..c1f021edd 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -77,7 +77,7 @@ struct mmc_host { struct device *dev; struct class_device class_dev; int index; - const struct mmc_host_ops *ops; + struct mmc_host_ops *ops; unsigned int f_min; unsigned int f_max; u32 ocr_avail; diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 627e2c08c..03a14a30c 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -105,8 +105,6 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, struct mmc_command *, int); -extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); - extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); static inline void mmc_claim_host(struct mmc_host *host) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 5dfe11189..2d8337150 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -4,6 +4,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ +#include #include #include #include @@ -46,27 +47,6 @@ struct zone_padding { #define ZONE_PADDING(name) #endif -enum zone_stat_item { - NR_ANON_PAGES, /* Mapped anonymous pages */ - NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. - only modified from process context */ - NR_FILE_PAGES, - NR_SLAB, /* Pages used by slab allocator */ - NR_PAGETABLE, /* used for pagetables */ - NR_FILE_DIRTY, - NR_WRITEBACK, - NR_UNSTABLE_NFS, /* NFS unstable pages */ - NR_BOUNCE, -#ifdef CONFIG_NUMA - NUMA_HIT, /* allocated in intended node */ - NUMA_MISS, /* allocated in non intended node */ - NUMA_FOREIGN, /* was intended here, hit elsewhere */ - NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */ - NUMA_LOCAL, /* allocation from local node */ - NUMA_OTHER, /* allocation from other node */ -#endif - NR_VM_ZONE_STAT_ITEMS }; - struct per_cpu_pages { int count; /* number of pages in the list */ int high; /* high watermark, emptying needed */ @@ -76,9 +56,13 @@ struct per_cpu_pages { struct per_cpu_pageset { struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ -#ifdef CONFIG_SMP - s8 stat_threshold; - s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; +#ifdef CONFIG_NUMA + unsigned long numa_hit; /* allocated in intended node */ + unsigned long numa_miss; /* allocated in non intended node */ + unsigned long numa_foreign; /* was intended here, hit elsewhere */ + unsigned long interleave_hit; /* interleaver prefered this zone */ + unsigned long local_node; /* allocation from local node */ + unsigned long other_node; /* allocation from other node */ #endif } ____cacheline_aligned_in_smp; @@ -151,11 +135,6 @@ struct zone { unsigned long lowmem_reserve[MAX_NR_ZONES]; #ifdef CONFIG_NUMA - /* - * zone reclaim becomes active if more unmapped pages exist. - */ - unsigned long min_unmapped_ratio; - unsigned long min_slab_pages; struct per_cpu_pageset *pageset[NR_CPUS]; #else struct per_cpu_pageset pageset[NR_CPUS]; @@ -187,8 +166,12 @@ struct zone { /* A count of how many reclaimers are scanning this zone */ atomic_t reclaim_in_progress; - /* Zone statistics */ - atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; + /* + * timestamp (in jiffies) of the last zone reclaim that did not + * result in freeing of pages. This is used to avoid repeated scans + * if all memory in the zone is in use. + */ + unsigned long last_unsuccessful_zone_reclaim; /* * prev_priority holds the scanning priority for this zone. It is @@ -200,9 +183,13 @@ struct zone { * under - it drives the swappiness decision: whether to unmap mapped * pages. * - * Access to both this field is quite racy even on uniprocessor. But + * temp_priority is used to remember the scanning priority at which + * this zone was successfully refilled to free_pages == pages_high. + * + * Access to both these fields is quite racy even on uniprocessor. But * it is expected to average out OK. */ + int temp_priority; int prev_priority; @@ -211,7 +198,7 @@ struct zone { /* * wait_table -- the array holding the hash table - * wait_table_hash_nr_entries -- the size of the hash table array + * wait_table_size -- the size of the hash table array * wait_table_bits -- wait_table_size == (1 << wait_table_bits) * * The purpose of all these is to keep track of the people @@ -234,7 +221,7 @@ struct zone { * free_area_init_core() performs the initialization of them. */ wait_queue_head_t * wait_table; - unsigned long wait_table_hash_nr_entries; + unsigned long wait_table_size; unsigned long wait_table_bits; /* @@ -347,9 +334,6 @@ void wakeup_kswapd(struct zone *zone, int order); int zone_watermark_ok(struct zone *z, int order, unsigned long mark, int classzone_idx, int alloc_flags); -extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, - unsigned long size); - #ifdef CONFIG_HAVE_MEMORY_PRESENT void memory_present(int nid, unsigned long start, unsigned long end); #else @@ -416,10 +400,6 @@ int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *, loff_t *); -int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, - struct file *, void __user *, size_t *, loff_t *); -int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, - struct file *, void __user *, size_t *, loff_t *); #include /* Returns the number of the current Node. */ @@ -527,10 +507,6 @@ struct mem_section { * pages. However, it is stored with some other magic. * (see sparse.c::sparse_init_one_section()) * - * Additionally during early boot we encode node id of - * the location of the section here to guide allocation. - * (see sparse.c::memory_present()) - * * Making it a UL at least makes someone do a cast * before using it wrong. */ @@ -570,7 +546,6 @@ extern int __section_nr(struct mem_section* ms); #define SECTION_HAS_MEM_MAP (1UL<<1) #define SECTION_MAP_LAST_BIT (1UL<<2) #define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1)) -#define SECTION_NID_SHIFT 2 static inline struct page *__section_mem_map_addr(struct mem_section *section) { @@ -628,12 +603,6 @@ void sparse_init(void); #define sparse_index_init(_sec, _nid) do {} while (0) #endif /* CONFIG_SPARSEMEM */ -#ifdef CONFIG_NODES_SPAN_OTHER_NODES -#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid)) -#else -#define early_pfn_in_nid(pfn, nid) (1) -#endif - #ifndef early_pfn_valid #define early_pfn_valid(pfn) (1) #endif diff --git a/include/linux/module.h b/include/linux/module.h index c4584187e..b9b98bb22 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -6,6 +6,7 @@ * Rewritten by Richard Henderson Dec 1996 * Rewritten again by Rusty Russell, 2002 */ +#include #include #include #include @@ -105,8 +106,6 @@ extern struct module __this_module; * "GPL and additional rights" [GNU Public License v2 rights and more] * "Dual BSD/GPL" [GNU Public License v2 * or BSD license choice] - * "Dual MIT/GPL" [GNU Public License v2 - * or MIT license choice] * "Dual MPL/GPL" [GNU Public License v2 * or Mozilla license choice] * @@ -203,15 +202,6 @@ void *__symbol_get_gpl(const char *symbol); #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ __EXPORT_SYMBOL(sym, "_gpl_future") - -#ifdef CONFIG_UNUSED_SYMBOLS -#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") -#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") -#else -#define EXPORT_UNUSED_SYMBOL(sym) -#define EXPORT_UNUSED_SYMBOL_GPL(sym) -#endif - #endif struct module_ref @@ -270,15 +260,6 @@ struct module unsigned int num_gpl_syms; const unsigned long *gpl_crcs; - /* unused exported symbols. */ - const struct kernel_symbol *unused_syms; - unsigned int num_unused_syms; - const unsigned long *unused_crcs; - /* GPL-only, unused exported symbols. */ - const struct kernel_symbol *unused_gpl_syms; - unsigned int num_unused_gpl_syms; - const unsigned long *unused_gpl_crcs; - /* symbols that will be GPL-only in the near future. */ const struct kernel_symbol *gpl_future_syms; unsigned int num_gpl_future_syms; @@ -303,9 +284,6 @@ struct module /* The size of the executable code in each section. */ unsigned long init_text_size, core_text_size; - /* The handle returned from unwind_add_table. */ - void *unwind_info; - /* Arch-specific module values */ struct mod_arch_specific arch; @@ -361,12 +339,13 @@ static inline int module_is_live(struct module *mod) /* Is this address in a module? (second is with no locks, for oops) */ struct module *module_text_address(unsigned long addr); struct module *__module_text_address(unsigned long addr); -int is_module_address(unsigned long addr); /* Returns module and fills in value, defined and namebuf, or NULL if symnum out of range. */ -struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, - char *type, char *name, size_t namelen); +struct module *module_get_kallsym(unsigned int symnum, + unsigned long *value, + char *type, + char namebuf[128]); /* Look for this name: can be of form module:name. */ unsigned long module_kallsyms_lookup_name(const char *name); @@ -476,8 +455,6 @@ void module_remove_driver(struct device_driver *); #define EXPORT_SYMBOL(sym) #define EXPORT_SYMBOL_GPL(sym) #define EXPORT_SYMBOL_GPL_FUTURE(sym) -#define EXPORT_UNUSED_SYMBOL(sym) -#define EXPORT_UNUSED_SYMBOL_GPL(sym) /* Given an address, look for it in the exception tables. */ static inline const struct exception_table_entry * @@ -498,11 +475,6 @@ static inline struct module *__module_text_address(unsigned long addr) return NULL; } -static inline int is_module_address(unsigned long addr) -{ - return 0; -} - /* Get/put a kernel symbol (calls should be symmetric) */ #define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); }) #define symbol_put(x) do { } while(0) @@ -536,8 +508,8 @@ static inline const char *module_address_lookup(unsigned long addr, static inline struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, - char *type, char *name, - size_t namelen) + char *type, + char namebuf[128]) { return NULL; } @@ -588,4 +560,13 @@ static inline void module_remove_driver(struct device_driver *driver) #define __MODULE_STRING(x) __stringify(x) +/* Use symbol_get and symbol_put instead. You'll thank me. */ +#define HAVE_INTER_MODULE +extern void __deprecated inter_module_register(const char *, + struct module *, const void *); +extern void __deprecated inter_module_unregister(const char *); +extern const void * __deprecated inter_module_get_request(const char *, + const char *); +extern void __deprecated inter_module_put(const char *); + #endif /* _LINUX_MODULE_H */ diff --git a/include/linux/mount.h b/include/linux/mount.h index 42d699ce0..a708e3674 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -17,11 +17,6 @@ #include #include -struct super_block; -struct vfsmount; -struct dentry; -struct namespace; - #define MNT_NOSUID 0x01 #define MNT_NODEV 0x02 #define MNT_NOEXEC 0x04 @@ -31,8 +26,6 @@ struct namespace; #define MNT_IS_RDONLY(m) ((m) && ((m)->mnt_flags & MNT_RDONLY)) -#define MNT_SHRINKABLE 0x100 - #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ #define MNT_PNODE_MASK 0x3000 /* propogation flag mask */ @@ -85,18 +78,12 @@ extern struct vfsmount *alloc_vfsmnt(const char *name); extern struct vfsmount *do_kern_mount(const char *fstype, int flags, const char *name, void *data); -struct file_system_type; -extern struct vfsmount *vfs_kern_mount(struct file_system_type *type, - int flags, const char *name, - void *data); - struct nameidata; extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, int mnt_flags, struct list_head *fslist); extern void mark_mounts_for_expiry(struct list_head *mounts); -extern void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts); extern spinlock_t vfsmount_lock; extern dev_t name_to_dev_t(char *name); diff --git a/include/linux/msg.h b/include/linux/msg.h index acc7c174f..903e0ab81 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -2,6 +2,7 @@ #define _LINUX_MSG_H #include +#include /* ipcs ctl commands */ #define MSG_STAT 11 @@ -62,7 +63,6 @@ struct msginfo { #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) #ifdef __KERNEL__ -#include /* one msg_msg structure for each message */ struct msg_msg { diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 1221b7c44..7a7fbe87f 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h @@ -19,21 +19,21 @@ /** * struct nand_bbt_descr - bad block table descriptor - * @options: options for this descriptor - * @pages: the page(s) where we find the bbt, used with + * @param options options for this descriptor + * @param pages the page(s) where we find the bbt, used with * option BBT_ABSPAGE when bbt is searched, * then we store the found bbts pages here. * Its an array and supports up to 8 chips now - * @offs: offset of the pattern in the oob area of the page - * @veroffs: offset of the bbt version counter in the oob area of the page - * @version: version read from the bbt page during scan - * @len: length of the pattern, if 0 no pattern check is performed - * @maxblocks: maximum number of blocks to search for a bbt. This - * number of blocks is reserved at the end of the device + * @param offs offset of the pattern in the oob area of the page + * @param veroffs offset of the bbt version counter in the oob are of the page + * @param version version read from the bbt page during scan + * @param len length of the pattern, if 0 no pattern check is performed + * @param maxblocks maximum number of blocks to search for a bbt. This number of + * blocks is reserved at the end of the device * where the tables are written. - * @reserved_block_code: if non-0, this pattern denotes a reserved + * @param reserved_block_code if non-0, this pattern denotes a reserved * (rather than bad) block in the stored bbt - * @pattern: pattern to identify bad block table or factory marked + * @param pattern pattern to identify bad block table or factory marked * good / bad blocks, can be NULL, if len = 0 * * Descriptor for the bad block table marker and the descriptor for the @@ -93,15 +93,12 @@ struct nand_bbt_descr { #define ONENAND_BADBLOCK_POS 0 /** - * struct bbm_info - [GENERIC] Bad Block Table data structure - * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry - * @badblockpos: [INTERN] position of the bad block marker in the oob area - * @options: options for this descriptor - * @bbt: [INTERN] bad block table pointer - * @isbad_bbt: function to determine if a block is bad - * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for - * initial bad block scan - * @priv: [OPTIONAL] pointer to private bbm date + * struct bbt_info - [GENERIC] Bad Block Table data structure + * @param bbt_erase_shift [INTERN] number of address bits in a bbt entry + * @param badblockpos [INTERN] position of the bad block marker in the oob area + * @param bbt [INTERN] bad block table pointer + * @param badblock_pattern [REPLACEABLE] bad block scan pattern used for initial bad block scan + * @param priv [OPTIONAL] pointer to private bbm date */ struct bbm_info { int bbt_erase_shift; diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 123948b14..23a568910 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h @@ -7,6 +7,7 @@ #ifndef __MTD_CFI_H__ #define __MTD_CFI_H__ +#include #include #include #include @@ -199,18 +200,6 @@ struct cfi_pri_amdstd { uint8_t TopBottom; } __attribute__((packed)); -/* Vendor-Specific PRI for Atmel chips (command set 0x0002) */ - -struct cfi_pri_atmel { - uint8_t pri[3]; - uint8_t MajorVersion; - uint8_t MinorVersion; - uint8_t Features; - uint8_t BottomBoot; - uint8_t BurstMode; - uint8_t PageMode; -} __attribute__((packed)); - struct cfi_pri_query { uint8_t NumFields; uint32_t ProtField[1]; /* Not host ordered */ @@ -476,7 +465,6 @@ struct cfi_fixup { #define CFI_ID_ANY 0xffff #define CFI_MFR_AMD 0x0001 -#define CFI_MFR_ATMEL 0x001F #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups); diff --git a/include/linux/mtd/inftl.h b/include/linux/mtd/inftl.h index 6977780e5..d7eaa40e5 100644 --- a/include/linux/mtd/inftl.h +++ b/include/linux/mtd/inftl.h @@ -46,7 +46,7 @@ struct INFTLrecord { unsigned int nb_blocks; /* number of physical blocks */ unsigned int nb_boot_blocks; /* number of blocks used by the bios */ struct erase_info instr; - struct nand_ecclayout oobinfo; + struct nand_oobinfo oobinfo; }; int INFTL_mount(struct INFTLrecord *s); diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 28d461d86..7dfd6e1fc 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -5,6 +5,7 @@ #ifndef __LINUX_MTD_MAP_H__ #define __LINUX_MTD_MAP_H__ +#include #include #include #include diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 94a443d45..b6f2fdae6 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -13,6 +13,7 @@ #error This is a kernel header. Perhaps include mtd-user.h instead? #endif +#include #include #include #include @@ -55,69 +56,18 @@ struct mtd_erase_region_info { u_int32_t numblocks; /* Number of blocks of erasesize in this region */ }; -/* - * oob operation modes - * - * MTD_OOB_PLACE: oob data are placed at the given offset - * MTD_OOB_AUTO: oob data are automatically placed at the free areas - * which are defined by the ecclayout - * MTD_OOB_RAW: mode to read raw data+oob in one chunk. The oob data - * is inserted into the data. Thats a raw image of the - * flash contents. - */ -typedef enum { - MTD_OOB_PLACE, - MTD_OOB_AUTO, - MTD_OOB_RAW, -} mtd_oob_mode_t; - -/** - * struct mtd_oob_ops - oob operation operands - * @mode: operation mode - * - * @len: number of bytes to write/read. When a data buffer is given - * (datbuf != NULL) this is the number of data bytes. When - * no data buffer is available this is the number of oob bytes. - * - * @retlen: number of bytes written/read. When a data buffer is given - * (datbuf != NULL) this is the number of data bytes. When - * no data buffer is available this is the number of oob bytes. - * - * @ooblen: number of oob bytes per page - * @ooboffs: offset of oob data in the oob area (only relevant when - * mode = MTD_OOB_PLACE) - * @datbuf: data buffer - if NULL only oob data are read/written - * @oobbuf: oob data buffer - */ -struct mtd_oob_ops { - mtd_oob_mode_t mode; - size_t len; - size_t retlen; - size_t ooblen; - uint32_t ooboffs; - uint8_t *datbuf; - uint8_t *oobbuf; -}; - struct mtd_info { u_char type; u_int32_t flags; u_int32_t size; // Total size of the MTD - /* "Major" erase size for the device. Naïve users may take this + /* "Major" erase size for the device. Naïve users may take this * to be the only erase size available, or may use the more detailed * information below if they desire */ u_int32_t erasesize; - /* Minimal writable flash unit size. In case of NOR flash it is 1 (even - * though individual bits can be cleared), in case of NAND flash it is - * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR - * it is of ECC block size, etc. It is illegal to have writesize = 0. - * Any driver registering a struct mtd_info must ensure a writesize of - * 1 or larger. - */ - u_int32_t writesize; + u_int32_t oobblock; // Size of OOB blocks (e.g. 512) u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) u_int32_t ecctype; u_int32_t eccsize; @@ -129,6 +79,7 @@ struct mtd_info { * MTD_PROGRAM_REGIONS flag is set. * (Maybe we should have an union for those?) */ +#define MTD_PROGREGION_SIZE(mtd) (mtd)->oobblock #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype @@ -136,8 +87,9 @@ struct mtd_info { char *name; int index; - /* ecc layout structure pointer - read only ! */ - struct nand_ecclayout *ecclayout; + // oobinfo is a nand_oobinfo structure, which can be set by iotcl (MEMSETOOBINFO) + struct nand_oobinfo oobinfo; + u_int32_t oobavail; // Number of bytes in OOB area available for fs /* Data for variable erase regions. If numeraseregions is zero, * it means that the whole device has erasesize as given above. @@ -160,10 +112,11 @@ struct mtd_info { int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); - int (*read_oob) (struct mtd_info *mtd, loff_t from, - struct mtd_oob_ops *ops); - int (*write_oob) (struct mtd_info *mtd, loff_t to, - struct mtd_oob_ops *ops); + int (*read_ecc) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); + int (*write_ecc) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel); + + int (*read_oob) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); + int (*write_oob) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); /* * Methods to access the protection register area, present in some @@ -177,11 +130,17 @@ struct mtd_info { int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len); - /* kvec-based read/write methods. + /* kvec-based read/write methods. We need these especially for NAND flash, + with its limited number of write cycles per erase. NB: The 'count' parameter is the number of _vectors_, each of which contains an (ofs, len) tuple. */ + int (*readv) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen); + int (*readv_ecc) (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, + size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel); int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen); + int (*writev_ecc) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, + size_t *retlen, u_char *eccbuf, struct nand_oobinfo *oobsel); /* Sync */ void (*sync) (struct mtd_info *mtd); @@ -200,9 +159,6 @@ struct mtd_info { struct notifier_block reboot_notifier; /* default mode before reboot */ - /* ECC status information */ - struct mtd_ecc_stats ecc_stats; - void *priv; struct module *owner; @@ -236,6 +192,20 @@ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen); +#define MTD_ERASE(mtd, args...) (*(mtd->erase))(mtd, args) +#define MTD_POINT(mtd, a,b,c,d) (*(mtd->point))(mtd, a,b,c, (u_char **)(d)) +#define MTD_UNPOINT(mtd, arg) (*(mtd->unpoint))(mtd, (u_char *)arg) +#define MTD_READ(mtd, args...) (*(mtd->read))(mtd, args) +#define MTD_WRITE(mtd, args...) (*(mtd->write))(mtd, args) +#define MTD_READV(mtd, args...) (*(mtd->readv))(mtd, args) +#define MTD_WRITEV(mtd, args...) (*(mtd->writev))(mtd, args) +#define MTD_READECC(mtd, args...) (*(mtd->read_ecc))(mtd, args) +#define MTD_WRITEECC(mtd, args...) (*(mtd->write_ecc))(mtd, args) +#define MTD_READOOB(mtd, args...) (*(mtd->read_oob))(mtd, args) +#define MTD_WRITEOOB(mtd, args...) (*(mtd->write_oob))(mtd, args) +#define MTD_SYNC(mtd) do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0) + + #ifdef CONFIG_MTD_PARTITIONS void mtd_erase_callback(struct erase_info *instr); #else @@ -256,7 +226,7 @@ static inline void mtd_erase_callback(struct erase_info *instr) #ifdef CONFIG_MTD_DEBUG #define DEBUG(n, args...) \ - do { \ + do { \ if (n <= CONFIG_MTD_DEBUG_VERBOSE) \ printk(KERN_INFO args); \ } while(0) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 0b4cd2fa6..da5e67b3f 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -11,15 +11,52 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Info: - * Contains standard defines and IDs for NAND flash devices + * Info: + * Contains standard defines and IDs for NAND flash devices * - * Changelog: - * See git changelog. + * Changelog: + * 01-31-2000 DMW Created + * 09-18-2000 SJH Moved structure out of the Disk-On-Chip drivers + * so it can be used by other NAND flash device + * drivers. I also changed the copyright since none + * of the original contents of this file are specific + * to DoC devices. David can whack me with a baseball + * bat later if I did something naughty. + * 10-11-2000 SJH Added private NAND flash structure for driver + * 10-24-2000 SJH Added prototype for 'nand_scan' function + * 10-29-2001 TG changed nand_chip structure to support + * hardwarespecific function for accessing control lines + * 02-21-2002 TG added support for different read/write adress and + * ready/busy line access function + * 02-26-2002 TG added chip_delay to nand_chip structure to optimize + * command delay times for different chips + * 04-28-2002 TG OOB config defines moved from nand.c to avoid duplicate + * defines in jffs2/wbuf.c + * 08-07-2002 TG forced bad block location to byte 5 of OOB, even if + * CONFIG_MTD_NAND_ECC_JFFS2 is not set + * 08-10-2002 TG extensions to nand_chip structure to support HW-ECC + * + * 08-29-2002 tglx nand_chip structure: data_poi for selecting + * internal / fs-driver buffer + * support for 6byte/512byte hardware ECC + * read_ecc, write_ecc extended for different oob-layout + * oob layout selections: NAND_NONE_OOB, NAND_JFFS2_OOB, + * NAND_YAFFS_OOB + * 11-25-2002 tglx Added Manufacturer code FUJITSU, NATIONAL + * Split manufacturer and device ID structures + * + * 02-08-2004 tglx added option field to nand structure for chip anomalities + * 05-25-2004 tglx added bad block table support, ST-MICRO manufacturer id + * update of nand_chip structure description + * 01-17-2005 dmarlin added extended commands for AG-AND device and added option + * for BBT_AUTO_REFRESH. + * 01-20-2005 dmarlin added optional pointer to hardware specific callback for + * extra error status checks. */ #ifndef __LINUX_MTD_NAND_H #define __LINUX_MTD_NAND_H +#include #include #include #include @@ -30,6 +67,10 @@ extern int nand_scan (struct mtd_info *mtd, int max_chips); /* Free resources held by the NAND device */ extern void nand_release (struct mtd_info *mtd); +/* Read raw data from the device without ECC */ +extern int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len, size_t ooblen); + + /* The maximum number of NAND chips in an array */ #define NAND_MAX_CHIPS 8 @@ -38,45 +79,44 @@ extern void nand_release (struct mtd_info *mtd); * adjust this accordingly. */ #define NAND_MAX_OOBSIZE 64 -#define NAND_MAX_PAGESIZE 2048 /* * Constants for hardware specific CLE/ALE/NCE function - * - * These are bits which can be or'ed to set/clear multiple - * bits in one go. - */ +*/ /* Select the chip by setting nCE to low */ -#define NAND_NCE 0x01 +#define NAND_CTL_SETNCE 1 +/* Deselect the chip by setting nCE to high */ +#define NAND_CTL_CLRNCE 2 /* Select the command latch by setting CLE to high */ -#define NAND_CLE 0x02 +#define NAND_CTL_SETCLE 3 +/* Deselect the command latch by setting CLE to low */ +#define NAND_CTL_CLRCLE 4 /* Select the address latch by setting ALE to high */ -#define NAND_ALE 0x04 - -#define NAND_CTRL_CLE (NAND_NCE | NAND_CLE) -#define NAND_CTRL_ALE (NAND_NCE | NAND_ALE) -#define NAND_CTRL_CHANGE 0x80 +#define NAND_CTL_SETALE 5 +/* Deselect the address latch by setting ALE to low */ +#define NAND_CTL_CLRALE 6 +/* Set write protection by setting WP to high. Not used! */ +#define NAND_CTL_SETWP 7 +/* Clear write protection by setting WP to low. Not used! */ +#define NAND_CTL_CLRWP 8 /* * Standard NAND flash commands */ #define NAND_CMD_READ0 0 #define NAND_CMD_READ1 1 -#define NAND_CMD_RNDOUT 5 #define NAND_CMD_PAGEPROG 0x10 #define NAND_CMD_READOOB 0x50 #define NAND_CMD_ERASE1 0x60 #define NAND_CMD_STATUS 0x70 #define NAND_CMD_STATUS_MULTI 0x71 #define NAND_CMD_SEQIN 0x80 -#define NAND_CMD_RNDIN 0x85 #define NAND_CMD_READID 0x90 #define NAND_CMD_ERASE2 0xd0 #define NAND_CMD_RESET 0xff /* Extended commands for large page devices */ #define NAND_CMD_READSTART 0x30 -#define NAND_CMD_RNDOUTSTART 0xE0 #define NAND_CMD_CACHEDPROG 0x15 /* Extended commands for AG-AND device */ @@ -98,8 +138,6 @@ extern void nand_release (struct mtd_info *mtd); #define NAND_CMD_STATUS_RESET 0x7f #define NAND_CMD_STATUS_CLEAR 0xff -#define NAND_CMD_NONE -1 - /* Status bits */ #define NAND_STATUS_FAIL 0x01 #define NAND_STATUS_FAIL_N1 0x02 @@ -110,12 +148,21 @@ extern void nand_release (struct mtd_info *mtd); /* * Constants for ECC_MODES */ -typedef enum { - NAND_ECC_NONE, - NAND_ECC_SOFT, - NAND_ECC_HW, - NAND_ECC_HW_SYNDROME, -} nand_ecc_modes_t; + +/* No ECC. Usage is not recommended ! */ +#define NAND_ECC_NONE 0 +/* Software ECC 3 byte ECC per 256 Byte data */ +#define NAND_ECC_SOFT 1 +/* Hardware ECC 3 byte ECC per 256 Byte data */ +#define NAND_ECC_HW3_256 2 +/* Hardware ECC 3 byte ECC per 512 Byte data */ +#define NAND_ECC_HW3_512 3 +/* Hardware ECC 3 byte ECC per 512 Byte data */ +#define NAND_ECC_HW6_512 4 +/* Hardware ECC 8 byte ECC per 512 Byte data */ +#define NAND_ECC_HW8_512 6 +/* Hardware ECC 12 byte ECC per 2048 Byte data */ +#define NAND_ECC_HW12_2048 7 /* * Constants for Hardware ECC @@ -154,10 +201,6 @@ typedef enum { * bits from adjacent blocks from 'leaking' in altering data. * This happens with the Renesas AG-AND chips, possibly others. */ #define BBT_AUTO_REFRESH 0x00000080 -/* Chip does not require ready check on read. True - * for all large page devices, as they do not support - * autoincrement.*/ -#define NAND_NO_READRDY 0x00000100 /* Options valid for Samsung large page devices */ #define NAND_SAMSUNG_LP_OPTIONS \ @@ -176,12 +219,18 @@ typedef enum { /* Use a flash based bad block table. This option is passed to the * default bad block table function. */ #define NAND_USE_FLASH_BBT 0x00010000 +/* The hw ecc generator provides a syndrome instead a ecc value on read + * This can only work if we have the ecc bytes directly behind the + * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */ +#define NAND_HWECC_SYNDROME 0x00020000 /* This option skips the bbt scan during initialization. */ -#define NAND_SKIP_BBTSCAN 0x00020000 +#define NAND_SKIP_BBTSCAN 0x00040000 /* Options set by nand scan */ -/* Nand scan has allocated controller struct */ -#define NAND_CONTROLLER_ALLOC 0x80000000 +/* Nand scan has allocated oob_buf */ +#define NAND_OOBBUF_ALLOC 0x40000000 +/* Nand scan has allocated data_buf */ +#define NAND_DATABUF_ALLOC 0x80000000 /* @@ -202,7 +251,7 @@ typedef enum { struct nand_chip; /** - * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices + * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independend devices * @lock: protection lock * @active: the mtd device which holds the controller currently * @wq: wait queue to sleep on if a NAND operation is in progress @@ -214,110 +263,46 @@ struct nand_hw_control { wait_queue_head_t wq; }; -/** - * struct nand_ecc_ctrl - Control structure for ecc - * @mode: ecc mode - * @steps: number of ecc steps per page - * @size: data bytes per ecc step - * @bytes: ecc bytes per step - * @total: total number of ecc bytes per page - * @prepad: padding information for syndrome based ecc generators - * @postpad: padding information for syndrome based ecc generators - * @layout: ECC layout control struct pointer - * @hwctl: function to control hardware ecc generator. Must only - * be provided if an hardware ECC is available - * @calculate: function for ecc calculation or readback from ecc hardware - * @correct: function for ecc correction, matching to ecc generator (sw/hw) - * @read_page: function to read a page according to the ecc generator requirements - * @write_page: function to write a page according to the ecc generator requirements - * @read_oob: function to read chip OOB data - * @write_oob: function to write chip OOB data - */ -struct nand_ecc_ctrl { - nand_ecc_modes_t mode; - int steps; - int size; - int bytes; - int total; - int prepad; - int postpad; - struct nand_ecclayout *layout; - void (*hwctl)(struct mtd_info *mtd, int mode); - int (*calculate)(struct mtd_info *mtd, - const uint8_t *dat, - uint8_t *ecc_code); - int (*correct)(struct mtd_info *mtd, uint8_t *dat, - uint8_t *read_ecc, - uint8_t *calc_ecc); - int (*read_page)(struct mtd_info *mtd, - struct nand_chip *chip, - uint8_t *buf); - void (*write_page)(struct mtd_info *mtd, - struct nand_chip *chip, - const uint8_t *buf); - int (*read_oob)(struct mtd_info *mtd, - struct nand_chip *chip, - int page, - int sndcmd); - int (*write_oob)(struct mtd_info *mtd, - struct nand_chip *chip, - int page); -}; - -/** - * struct nand_buffers - buffer structure for read/write - * @ecccalc: buffer for calculated ecc - * @ecccode: buffer for ecc read from flash - * @oobwbuf: buffer for write oob data - * @databuf: buffer for data - dynamically sized - * @oobrbuf: buffer to read oob data - * - * Do not change the order of buffers. databuf and oobrbuf must be in - * consecutive order. - */ -struct nand_buffers { - uint8_t ecccalc[NAND_MAX_OOBSIZE]; - uint8_t ecccode[NAND_MAX_OOBSIZE]; - uint8_t oobwbuf[NAND_MAX_OOBSIZE]; - uint8_t databuf[NAND_MAX_PAGESIZE]; - uint8_t oobrbuf[NAND_MAX_OOBSIZE]; -}; - /** * struct nand_chip - NAND Private Flash Chip Data * @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device * @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device * @read_byte: [REPLACEABLE] read one byte from the chip + * @write_byte: [REPLACEABLE] write one byte to the chip * @read_word: [REPLACEABLE] read one word from the chip + * @write_word: [REPLACEABLE] write one word to the chip * @write_buf: [REPLACEABLE] write data from the buffer to the chip * @read_buf: [REPLACEABLE] read data from the chip into the buffer * @verify_buf: [REPLACEABLE] verify buffer contents against the chip data * @select_chip: [REPLACEABLE] select chip nr * @block_bad: [REPLACEABLE] check, if the block is bad * @block_markbad: [REPLACEABLE] mark the block bad - * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling - * ALE/CLE/nCE. Also used to write command and address + * @hwcontrol: [BOARDSPECIFIC] hardwarespecific function for accesing control-lines * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line * If set to NULL no access to ready/busy is available and the ready/busy information * is read from the chip status register * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready - * @ecc: [BOARDSPECIFIC] ecc control ctructure - * @buffers: buffer structure for read/write - * @hwcontrol: platform-specific hardware control structure - * @ops: oob operation operands + * @calculate_ecc: [REPLACEABLE] function for ecc calculation or readback from ecc hardware + * @correct_data: [REPLACEABLE] function for ecc correction, matching to ecc generator (sw/hw) + * @enable_hwecc: [BOARDSPECIFIC] function to enable (reset) hardware ecc generator. Must only + * be provided if a hardware ECC is available * @erase_cmd: [INTERN] erase command write function, selectable due to AND support * @scan_bbt: [REPLACEABLE] function to scan bad block table + * @eccmode: [BOARDSPECIFIC] mode of ecc, see defines + * @eccsize: [INTERN] databytes used per ecc-calculation + * @eccbytes: [INTERN] number of ecc bytes per ecc-calculation step + * @eccsteps: [INTERN] number of ecc calculation steps per page * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) + * @chip_lock: [INTERN] spinlock used to protect access to this structure and the chip * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress - * @state: [INTERN] the current state of the NAND device - * @oob_poi: poison value buffer + * @state: [INTERN] the current state of the NAND device * @page_shift: [INTERN] number of address bits in a page (column address bits) * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry * @chip_shift: [INTERN] number of address bits in one chip - * @datbuf: [INTERN] internal buffer for one page + oob - * @oobbuf: [INTERN] oob buffer for one eraseblock + * @data_buf: [INTERN] internal buffer for one page + oob + * @oob_buf: [INTERN] oob buffer for one eraseblock * @oobdirty: [INTERN] indicates that oob_buf must be reinitialized * @data_poi: [INTERN] pointer to a data buffer * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about @@ -327,13 +312,12 @@ struct nand_buffers { * @chipsize: [INTERN] the size of one chip for multichip arrays * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf - * @ecclayout: [REPLACEABLE] the default ecc placement scheme + * @autooob: [REPLACEABLE] the default (auto)placement scheme * @bbt: [INTERN] bad block table pointer * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup * @bbt_md: [REPLACEABLE] bad block table mirror descriptor * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan - * @controller: [REPLACEABLE] a pointer to a hardware controller structure - * which is shared among multiple independend devices + * @controller: [OPTIONAL] a pointer to a hardware controller structure which is shared among multiple independend devices * @priv: [OPTIONAL] pointer to private chip date * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks * (determine if errors are correctable) @@ -341,57 +325,58 @@ struct nand_buffers { struct nand_chip { void __iomem *IO_ADDR_R; - void __iomem *IO_ADDR_W; + void __iomem *IO_ADDR_W; - uint8_t (*read_byte)(struct mtd_info *mtd); + u_char (*read_byte)(struct mtd_info *mtd); + void (*write_byte)(struct mtd_info *mtd, u_char byte); u16 (*read_word)(struct mtd_info *mtd); - void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); - void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); - int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); + void (*write_word)(struct mtd_info *mtd, u16 word); + + void (*write_buf)(struct mtd_info *mtd, const u_char *buf, int len); + void (*read_buf)(struct mtd_info *mtd, u_char *buf, int len); + int (*verify_buf)(struct mtd_info *mtd, const u_char *buf, int len); void (*select_chip)(struct mtd_info *mtd, int chip); int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip); int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); - void (*cmd_ctrl)(struct mtd_info *mtd, int dat, - unsigned int ctrl); - int (*dev_ready)(struct mtd_info *mtd); - void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr); - int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this); + void (*hwcontrol)(struct mtd_info *mtd, int cmd); + int (*dev_ready)(struct mtd_info *mtd); + void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr); + int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this, int state); + int (*calculate_ecc)(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code); + int (*correct_data)(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); + void (*enable_hwecc)(struct mtd_info *mtd, int mode); void (*erase_cmd)(struct mtd_info *mtd, int page); int (*scan_bbt)(struct mtd_info *mtd); - int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); - - int chip_delay; - unsigned int options; - - int page_shift; + int eccmode; + int eccsize; + int eccbytes; + int eccsteps; + int chip_delay; + spinlock_t chip_lock; + wait_queue_head_t wq; + nand_state_t state; + int page_shift; int phys_erase_shift; int bbt_erase_shift; int chip_shift; + u_char *data_buf; + u_char *oob_buf; + int oobdirty; + u_char *data_poi; + unsigned int options; + int badblockpos; int numchips; unsigned long chipsize; int pagemask; int pagebuf; - int badblockpos; - - nand_state_t state; - - uint8_t *oob_poi; - struct nand_hw_control *controller; - struct nand_ecclayout *ecclayout; - - struct nand_ecc_ctrl ecc; - struct nand_buffers buffers; - struct nand_hw_control hwcontrol; - - struct mtd_oob_ops ops; - + struct nand_oobinfo *autooob; uint8_t *bbt; struct nand_bbt_descr *bbt_td; struct nand_bbt_descr *bbt_md; - struct nand_bbt_descr *badblock_pattern; - + struct nand_hw_control *controller; void *priv; + int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); }; /* @@ -403,18 +388,19 @@ struct nand_chip { #define NAND_MFR_NATIONAL 0x8f #define NAND_MFR_RENESAS 0x07 #define NAND_MFR_STMICRO 0x20 -#define NAND_MFR_HYNIX 0xad +#define NAND_MFR_HYNIX 0xad /** * struct nand_flash_dev - NAND Flash Device ID Structure - * @name: Identify the device type - * @id: device ID code - * @pagesize: Pagesize in bytes. Either 256 or 512 or 0 + * + * @name: Identify the device type + * @id: device ID code + * @pagesize: Pagesize in bytes. Either 256 or 512 or 0 * If the pagesize is 0, then the real pagesize * and the eraseize are determined from the * extended id bytes in the chip - * @erasesize: Size of an erase block in the flash device. - * @chipsize: Total chipsize in Mega Bytes + * @erasesize: Size of an erase block in the flash device. + * @chipsize: Total chipsize in Mega Bytes * @options: Bitfield to store chip relevant options */ struct nand_flash_dev { @@ -429,7 +415,7 @@ struct nand_flash_dev { /** * struct nand_manufacturers - NAND Flash Manufacturer ID Structure * @name: Manufacturer name - * @id: manufacturer ID code of device. + * @id: manufacturer ID code of device. */ struct nand_manufacturers { int id; @@ -469,7 +455,7 @@ struct nand_bbt_descr { int veroffs; uint8_t version[NAND_MAX_CHIPS]; int len; - int maxblocks; + int maxblocks; int reserved_block_code; uint8_t *pattern; }; @@ -508,14 +494,14 @@ struct nand_bbt_descr { /* The maximum number of blocks to scan for a bbt */ #define NAND_BBT_SCAN_MAXBLOCKS 4 -extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd); -extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs); -extern int nand_default_bbt(struct mtd_info *mtd); -extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt); -extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, - int allowbbt); -extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, - size_t * retlen, uint8_t * buf); +extern int nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd); +extern int nand_update_bbt (struct mtd_info *mtd, loff_t offs); +extern int nand_default_bbt (struct mtd_info *mtd); +extern int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt); +extern int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbbt); +extern int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, + size_t * retlen, u_char * buf, u_char * oob_buf, + struct nand_oobinfo *oobsel, int flags); /* * Constants for oob configuration @@ -523,51 +509,4 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, #define NAND_SMALL_BADBLOCK_POS 5 #define NAND_LARGE_BADBLOCK_POS 0 -/** - * struct platform_nand_chip - chip level device structure - * @nr_chips: max. number of chips to scan for - * @chip_offset: chip number offset - * @nr_partitions: number of partitions pointed to by partitions (or zero) - * @partitions: mtd partition list - * @chip_delay: R/B delay value in us - * @options: Option flags, e.g. 16bit buswidth - * @ecclayout: ecc layout info structure - * @priv: hardware controller specific settings - */ -struct platform_nand_chip { - int nr_chips; - int chip_offset; - int nr_partitions; - struct mtd_partition *partitions; - struct nand_ecclayout *ecclayout; - int chip_delay; - unsigned int options; - void *priv; -}; - -/** - * struct platform_nand_ctrl - controller level device structure - * @hwcontrol: platform specific hardware control structure - * @dev_ready: platform specific function to read ready/busy pin - * @select_chip: platform specific chip select function - * @priv: private data to transport driver specific settings - * - * All fields are optional and depend on the hardware driver requirements - */ -struct platform_nand_ctrl { - void (*hwcontrol)(struct mtd_info *mtd, int cmd); - int (*dev_ready)(struct mtd_info *mtd); - void (*select_chip)(struct mtd_info *mtd, int chip); - void *priv; -}; - -/* Some helpers to access the data structures */ -static inline -struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd) -{ - struct nand_chip *chip = mtd->priv; - - return chip->priv; -} - #endif /* __LINUX_MTD_NAND_H */ diff --git a/include/linux/mtd/ndfc.h b/include/linux/mtd/ndfc.h deleted file mode 100644 index d0558a982..000000000 --- a/include/linux/mtd/ndfc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * linux/include/linux/mtd/ndfc.h - * - * Copyright (c) 2006 Thomas Gleixner - * - * 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. - * - * Info: - * Contains defines, datastructures for ndfc nand controller - * - */ -#ifndef __LINUX_MTD_NDFC_H -#define __LINUX_MTD_NDFC_H - -/* NDFC Register definitions */ -#define NDFC_CMD 0x00 -#define NDFC_ALE 0x04 -#define NDFC_DATA 0x08 -#define NDFC_ECC 0x10 -#define NDFC_BCFG0 0x30 -#define NDFC_BCFG1 0x34 -#define NDFC_BCFG2 0x38 -#define NDFC_BCFG3 0x3c -#define NDFC_CCR 0x40 -#define NDFC_STAT 0x44 -#define NDFC_HWCTL 0x48 -#define NDFC_REVID 0x50 - -#define NDFC_STAT_IS_READY 0x01000000 - -#define NDFC_CCR_RESET_CE 0x80000000 /* CE Reset */ -#define NDFC_CCR_RESET_ECC 0x40000000 /* ECC Reset */ -#define NDFC_CCR_RIE 0x20000000 /* Interrupt Enable on Device Rdy */ -#define NDFC_CCR_REN 0x10000000 /* Enable wait for Rdy in LinearR */ -#define NDFC_CCR_ROMEN 0x08000000 /* Enable ROM In LinearR */ -#define NDFC_CCR_ARE 0x04000000 /* Auto-Read Enable */ -#define NDFC_CCR_BS(x) (((x) & 0x3) << 24) /* Select Bank on CE[x] */ -#define NDFC_CCR_BS_MASK 0x03000000 /* Select Bank */ -#define NDFC_CCR_ARAC0 0x00000000 /* 3 Addr, 1 Col 2 Row 512b page */ -#define NDFC_CCR_ARAC1 0x00001000 /* 4 Addr, 1 Col 3 Row 512b page */ -#define NDFC_CCR_ARAC2 0x00002000 /* 4 Addr, 2 Col 2 Row 2K page */ -#define NDFC_CCR_ARAC3 0x00003000 /* 5 Addr, 2 Col 3 Row 2K page */ -#define NDFC_CCR_ARAC_MASK 0x00003000 /* Auto-Read mode Addr Cycles */ -#define NDFC_CCR_RPG 0x0000C000 /* Auto-Read Page */ -#define NDFC_CCR_EBCC 0x00000004 /* EBC Configuration Completed */ -#define NDFC_CCR_DHC 0x00000002 /* Direct Hardware Control Enable */ - -#define NDFC_BxCFG_EN 0x80000000 /* Bank Enable */ -#define NDFC_BxCFG_CED 0x40000000 /* nCE Style */ -#define NDFC_BxCFG_SZ_MASK 0x08000000 /* Bank Size */ -#define NDFC_BxCFG_SZ_8BIT 0x00000000 /* 8bit */ -#define NDFC_BxCFG_SZ_16BIT 0x08000000 /* 16bit */ - -#define NDFC_MAX_BANKS 4 - -struct ndfc_controller_settings { - uint32_t ccr_settings; - uint64_t ndfc_erpn; -}; - -struct ndfc_chip_settings { - uint32_t bank_settings; -}; - -#endif diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h index bcf2fb3fa..d35d2c21f 100644 --- a/include/linux/mtd/nftl.h +++ b/include/linux/mtd/nftl.h @@ -37,7 +37,7 @@ struct NFTLrecord { unsigned int nb_blocks; /* number of physical blocks */ unsigned int nb_boot_blocks; /* number of blocks used by the bios */ struct erase_info instr; - struct nand_ecclayout oobinfo; + struct nand_oobinfo oobinfo; }; int NFTL_mount(struct NFTLrecord *s); diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 1f4972155..7419b5fab 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h @@ -23,7 +23,7 @@ extern int onenand_scan(struct mtd_info *mtd, int max_chips); /* Free resources held by the OneNAND device */ extern void onenand_release(struct mtd_info *mtd); -/* +/** * onenand_state_t - chip states * Enumeration for OneNAND flash chip state */ @@ -35,16 +35,14 @@ typedef enum { FL_SYNCING, FL_UNLOCKING, FL_LOCKING, - FL_RESETING, - FL_OTPING, FL_PM_SUSPENDED, } onenand_state_t; /** * struct onenand_bufferram - OneNAND BufferRAM Data - * @block: block address in BufferRAM - * @page: page address in BufferRAM - * @valid: valid flag + * @param block block address in BufferRAM + * @param page page address in BufferRAM + * @param valid valid flag */ struct onenand_bufferram { int block; @@ -54,43 +52,32 @@ struct onenand_bufferram { /** * struct onenand_chip - OneNAND Private Flash Chip Data - * @base: [BOARDSPECIFIC] address to access OneNAND - * @chipsize: [INTERN] the size of one chip for multichip arrays - * @device_id: [INTERN] device ID - * @density_mask: chip density, used for DDP devices - * @verstion_id: [INTERN] version ID - * @options: [BOARDSPECIFIC] various chip options. They can - * partly be set to inform onenand_scan about - * @erase_shift: [INTERN] number of address bits in a block - * @page_shift: [INTERN] number of address bits in a page - * @ppb_shift: [INTERN] number of address bits in a pages per block - * @page_mask: [INTERN] a page per block mask - * @bufferram_index: [INTERN] BufferRAM index - * @bufferram: [INTERN] BufferRAM info - * @readw: [REPLACEABLE] hardware specific function for read short - * @writew: [REPLACEABLE] hardware specific function for write short - * @command: [REPLACEABLE] hardware specific function for writing - * commands to the chip - * @wait: [REPLACEABLE] hardware specific function for wait on ready - * @read_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area - * @write_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area - * @read_word: [REPLACEABLE] hardware specific function for read - * register of OneNAND - * @write_word: [REPLACEABLE] hardware specific function for write - * register of OneNAND - * @mmcontrol: sync burst read function - * @block_markbad: function to mark a block as bad - * @scan_bbt: [REPLACEALBE] hardware specific function for scanning - * Bad block Table - * @chip_lock: [INTERN] spinlock used to protect access to this - * structure and the chip - * @wq: [INTERN] wait queue to sleep on if a OneNAND - * operation is in progress - * @state: [INTERN] the current state of the OneNAND device - * @page_buf: data buffer - * @ecclayout: [REPLACEABLE] the default ecc placement scheme - * @bbm: [REPLACEABLE] pointer to Bad Block Management - * @priv: [OPTIONAL] pointer to private chip date + * @param base [BOARDSPECIFIC] address to access OneNAND + * @param chipsize [INTERN] the size of one chip for multichip arrays + * @param device_id [INTERN] device ID + * @param verstion_id [INTERN] version ID + * @param options [BOARDSPECIFIC] various chip options. They can partly be set to inform onenand_scan about + * @param erase_shift [INTERN] number of address bits in a block + * @param page_shift [INTERN] number of address bits in a page + * @param ppb_shift [INTERN] number of address bits in a pages per block + * @param page_mask [INTERN] a page per block mask + * @param bufferam_index [INTERN] BufferRAM index + * @param bufferam [INTERN] BufferRAM info + * @param readw [REPLACEABLE] hardware specific function for read short + * @param writew [REPLACEABLE] hardware specific function for write short + * @param command [REPLACEABLE] hardware specific function for writing commands to the chip + * @param wait [REPLACEABLE] hardware specific function for wait on ready + * @param read_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area + * @param write_bufferram [REPLACEABLE] hardware specific function for BufferRAM Area + * @param read_word [REPLACEABLE] hardware specific function for read register of OneNAND + * @param write_word [REPLACEABLE] hardware specific function for write register of OneNAND + * @param scan_bbt [REPLACEALBE] hardware specific function for scaning Bad block Table + * @param chip_lock [INTERN] spinlock used to protect access to this structure and the chip + * @param wq [INTERN] wait queue to sleep on if a OneNAND operation is in progress + * @param state [INTERN] the current state of the OneNAND device + * @param autooob [REPLACEABLE] the default (auto)placement scheme + * @param bbm [REPLACEABLE] pointer to Bad Block Management + * @param priv [OPTIONAL] pointer to private chip date */ struct onenand_chip { void __iomem *base; @@ -124,9 +111,9 @@ struct onenand_chip { onenand_state_t state; unsigned char *page_buf; - struct nand_ecclayout *ecclayout; + struct nand_oobinfo *autooob; - void *bbm; + void *bbm; void *priv; }; @@ -143,9 +130,6 @@ struct onenand_chip { #define ONENAND_SET_SYS_CFG1(v, this) \ (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) -/* Check byte access in OneNAND */ -#define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) - /* * Options bits */ @@ -158,9 +142,9 @@ struct onenand_chip { #define ONENAND_MFR_SAMSUNG 0xec /** - * struct onenand_manufacturers - NAND Flash Manufacturer ID Structure - * @name: Manufacturer name - * @id: manufacturer ID code of device. + * struct nand_manufacturers - NAND Flash Manufacturer ID Structure + * @param name: Manufacturer name + * @param id: manufacturer ID code of device. */ struct onenand_manufacturers { int id; diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index 4a72818d2..d7832ef8e 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h @@ -112,7 +112,6 @@ #define ONENAND_CMD_LOCK_TIGHT (0x2C) #define ONENAND_CMD_ERASE (0x94) #define ONENAND_CMD_RESET (0xF0) -#define ONENAND_CMD_OTP_ACCESS (0x65) #define ONENAND_CMD_READID (0x90) /* NOTE: Those are not *REAL* commands */ @@ -153,8 +152,6 @@ #define ONENAND_CTRL_ERASE (1 << 11) #define ONENAND_CTRL_ERROR (1 << 10) #define ONENAND_CTRL_RSTB (1 << 7) -#define ONENAND_CTRL_OTP_L (1 << 6) -#define ONENAND_CTRL_OTP_BL (1 << 5) /* * Interrupt Status Register F241h (R) @@ -180,9 +177,4 @@ #define ONENAND_ECC_2BIT (1 << 1) #define ONENAND_ECC_2BIT_ALL (0xAAAA) -/* - * One-Time Programmable (OTP) - */ -#define ONENAND_OTP_LOCK_OFFSET (14) - #endif /* __ONENAND_REG_H */ diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index da6b3d6f1..b03f512d5 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -41,7 +41,7 @@ struct mtd_partition { u_int32_t size; /* partition size */ u_int32_t offset; /* offset within the master MTD space */ u_int32_t mask_flags; /* master MTD flags to mask out for this partition */ - struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ + struct nand_oobinfo *oobsel; /* out of band layout for this partition (NAND only)*/ struct mtd_info **mtdp; /* pointer to store the MTD object */ }; diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index 86831e359..c7b8bcdef 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h @@ -15,26 +15,33 @@ */ #ifndef __LINUX_MTD_PHYSMAP__ -#define __LINUX_MTD_PHYSMAP__ + +#include + +#if defined(CONFIG_MTD_PHYSMAP) #include #include #include -struct physmap_flash_data { - unsigned int width; - void (*set_vpp)(struct map_info *, int); - unsigned int nr_parts; - struct mtd_partition *parts; -}; +/* + * The map_info for physmap. Board can override size, buswidth, phys, + * (*set_vpp)(), etc in their initial setup routine. + */ +extern struct map_info physmap_map; /* * Board needs to specify the exact mapping during their setup time. */ -void physmap_configure(unsigned long addr, unsigned long size, - int bankwidth, void (*set_vpp)(struct map_info *, int) ); +static inline void physmap_configure(unsigned long addr, unsigned long size, int bankwidth, void (*set_vpp)(struct map_info *, int) ) +{ + physmap_map.phys = addr; + physmap_map.size = size; + physmap_map.bankwidth = bankwidth; + physmap_map.set_vpp = set_vpp; +} -#ifdef CONFIG_MTD_PARTITIONS +#if defined(CONFIG_MTD_PARTITIONS) /* * Machines that wish to do flash partition may want to call this function in @@ -48,5 +55,7 @@ void physmap_configure(unsigned long addr, unsigned long size, void physmap_set_partitions(struct mtd_partition *parts, int num_parts); #endif /* defined(CONFIG_MTD_PARTITIONS) */ +#endif /* defined(CONFIG_MTD) */ #endif /* __LINUX_MTD_PHYSMAP__ */ + diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h index e9d40bdde..220d50bb7 100644 --- a/include/linux/mtd/xip.h +++ b/include/linux/mtd/xip.h @@ -18,6 +18,7 @@ #ifndef __LINUX_MTD_XIP_H__ #define __LINUX_MTD_XIP_H__ +#include #ifdef CONFIG_MTD_XIP diff --git a/include/linux/mutex-debug.h b/include/linux/mutex-debug.h index 2537285e1..8b5769f00 100644 --- a/include/linux/mutex-debug.h +++ b/include/linux/mutex-debug.h @@ -2,22 +2,22 @@ #define __LINUX_MUTEX_DEBUG_H #include -#include /* * Mutexes - debugging helpers: */ -#define __DEBUG_MUTEX_INITIALIZER(lockname) \ - , .magic = &lockname +#define __DEBUG_MUTEX_INITIALIZER(lockname) \ + , .held_list = LIST_HEAD_INIT(lockname.held_list), \ + .name = #lockname , .magic = &lockname -#define mutex_init(mutex) \ -do { \ - static struct lock_class_key __key; \ - \ - __mutex_init((mutex), #mutex, &__key); \ -} while (0) +#define mutex_init(sem) __mutex_init(sem, __FUNCTION__) extern void FASTCALL(mutex_destroy(struct mutex *lock)); +extern void mutex_debug_show_all_locks(void); +extern void mutex_debug_show_held_locks(struct task_struct *filter); +extern void mutex_debug_check_no_locks_held(struct task_struct *task); +extern void mutex_debug_check_no_locks_freed(const void *from, unsigned long len); + #endif diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 27c48daa3..f1ac507fa 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -13,7 +13,6 @@ #include #include #include -#include #include @@ -51,12 +50,11 @@ struct mutex { struct list_head wait_list; #ifdef CONFIG_DEBUG_MUTEXES struct thread_info *owner; + struct list_head held_list; + unsigned long acquire_ip; const char *name; void *magic; #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif }; /* @@ -76,34 +74,24 @@ struct mutex_waiter { # include #else # define __DEBUG_MUTEX_INITIALIZER(lockname) -# define mutex_init(mutex) \ -do { \ - static struct lock_class_key __key; \ - \ - __mutex_init((mutex), #mutex, &__key); \ -} while (0) +# define mutex_init(mutex) __mutex_init(mutex, NULL) # define mutex_destroy(mutex) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ - , .dep_map = { .name = #lockname } -#else -# define __DEP_MAP_MUTEX_INITIALIZER(lockname) +# define mutex_debug_show_all_locks() do { } while (0) +# define mutex_debug_show_held_locks(p) do { } while (0) +# define mutex_debug_check_no_locks_held(task) do { } while (0) +# define mutex_debug_check_no_locks_freed(from, len) do { } while (0) #endif #define __MUTEX_INITIALIZER(lockname) \ { .count = ATOMIC_INIT(1) \ , .wait_lock = SPIN_LOCK_UNLOCKED \ , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \ - __DEBUG_MUTEX_INITIALIZER(lockname) \ - __DEP_MAP_MUTEX_INITIALIZER(lockname) } + __DEBUG_MUTEX_INITIALIZER(lockname) } #define DEFINE_MUTEX(mutexname) \ struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) -extern void __mutex_init(struct mutex *lock, const char *name, - struct lock_class_key *key); +extern void fastcall __mutex_init(struct mutex *lock, const char *name); /*** * mutex_is_locked - is the mutex locked @@ -122,13 +110,6 @@ static inline int fastcall mutex_is_locked(struct mutex *lock) */ extern void fastcall mutex_lock(struct mutex *lock); extern int fastcall mutex_lock_interruptible(struct mutex *lock); - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); -#else -# define mutex_lock_nested(lock, subclass) mutex_lock(lock) -#endif - /* * NOTE: mutex_trylock() follows the spin_trylock() convention, * not the down_trylock() convention! diff --git a/include/linux/nbd.h b/include/linux/nbd.h index e712e7d47..a6ce409ec 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -77,11 +77,11 @@ struct nbd_device { * server. All data are in network byte order. */ struct nbd_request { - __be32 magic; - __be32 type; /* == READ || == WRITE */ + u32 magic; + u32 type; /* == READ || == WRITE */ char handle[8]; - __be64 from; - __be32 len; + u64 from; + u32 len; } #ifdef __GNUC__ __attribute__ ((packed)) @@ -93,8 +93,8 @@ struct nbd_request { * it has completed an I/O request (or an error occurs). */ struct nbd_reply { - __be32 magic; - __be32 error; /* 0 = ok, else error */ + u32 magic; + u32 error; /* 0 = ok, else error */ char handle[8]; /* handle you got from request */ }; #endif diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index b208f0cd5..96dc237b8 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h @@ -12,6 +12,8 @@ #include #include +#include +#include #include #include @@ -144,8 +146,7 @@ struct ncp_nls_ioctl #ifdef __KERNEL__ -#include -#include +#include /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */ #undef PRINTK diff --git a/include/linux/net.h b/include/linux/net.h index d421f7d4e..91ab7ba7d 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -18,7 +18,9 @@ #ifndef _LINUX_NET_H #define _LINUX_NET_H +#include #include +#include #include struct poll_table_struct; @@ -55,14 +57,12 @@ typedef enum { #define __SO_ACCEPTCON (1 << 16) /* performed a listen */ #ifdef __KERNEL__ -#include #define SOCK_ASYNC_NOSPACE 0 #define SOCK_ASYNC_WAITDATA 1 #define SOCK_NOSPACE 2 #define SOCK_PASSCRED 3 -#define SOCK_PASSSEC 4 -#define SOCK_USER_SOCKET 5 +#define SOCK_USER_SOCKET 4 #ifndef ARCH_HAS_SOCKET_TYPES /** diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 50a471951..c5b97cf59 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -34,9 +34,9 @@ #include #include +#include #include #include -#include struct divert_blk; struct vlan_group; @@ -313,15 +313,9 @@ struct net_device /* Segmentation offload features */ #define NETIF_F_GSO_SHIFT 16 -#define NETIF_F_GSO_MASK 0xffff0000 #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) -#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) +#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) -#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) -#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) - - /* List of features with software fallbacks. */ -#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) @@ -614,9 +608,6 @@ struct softnet_data struct sk_buff *completion_queue; struct net_device backlog_dev; /* Sorry. 8) */ -#ifdef CONFIG_NET_DMA - struct dma_chan *net_dma; -#endif }; DECLARE_PER_CPU(struct softnet_data,softnet_data); @@ -708,6 +699,7 @@ extern int dev_hard_start_xmit(struct sk_buff *skb, extern void dev_init(void); +extern int netdev_nit; extern int netdev_budget; /* Called by rtnetlink.c:rtnl_unlock() */ @@ -997,15 +989,10 @@ extern void dev_seq_stop(struct seq_file *seq, void *v); extern void linkwatch_run_queue(void); -static inline int net_gso_ok(int features, int gso_type) -{ - int feature = gso_type << NETIF_F_GSO_SHIFT; - return (features & feature) == feature; -} - static inline int skb_gso_ok(struct sk_buff *skb, int features) { - return net_gso_ok(features, skb_shinfo(skb)->gso_type); + int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT; + return (features & feature) == feature; } static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) @@ -1015,30 +1002,6 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) unlikely(skb->ip_summed != CHECKSUM_HW)); } -/* On bonding slaves other than the currently active slave, suppress - * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast. - */ -static inline int skb_bond_should_drop(struct sk_buff *skb) -{ - struct net_device *dev = skb->dev; - struct net_device *master = dev->master; - - if (master && - (dev->priv_flags & IFF_SLAVE_INACTIVE)) { - if (master->priv_flags & IFF_MASTER_ALB) { - if (skb->pkt_type != PACKET_BROADCAST && - skb->pkt_type != PACKET_MULTICAST) - return 0; - } - if (master->priv_flags & IFF_MASTER_8023AD && - skb->protocol == __constant_htons(ETH_P_SLOW)) - return 0; - - return 1; - } - return 0; -} - #endif /* __KERNEL__ */ #endif /* _LINUX_DEV_H */ diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 10168e26a..b31a9bca9 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -40,6 +40,7 @@ #endif #ifdef __KERNEL__ +#include #ifdef CONFIG_NETFILTER extern void netfilter_init(void); diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild deleted file mode 100644 index 9a285cecf..000000000 --- a/include/linux/netfilter/Kbuild +++ /dev/null @@ -1,38 +0,0 @@ -header-y += nf_conntrack_sctp.h -header-y += nf_conntrack_tuple_common.h -header-y += nfnetlink_conntrack.h -header-y += nfnetlink_log.h -header-y += nfnetlink_queue.h -header-y += xt_CLASSIFY.h -header-y += xt_comment.h -header-y += xt_connbytes.h -header-y += xt_connmark.h -header-y += xt_CONNMARK.h -header-y += xt_conntrack.h -header-y += xt_dccp.h -header-y += xt_esp.h -header-y += xt_helper.h -header-y += xt_length.h -header-y += xt_limit.h -header-y += xt_mac.h -header-y += xt_mark.h -header-y += xt_MARK.h -header-y += xt_multiport.h -header-y += xt_NFQUEUE.h -header-y += xt_pkttype.h -header-y += xt_policy.h -header-y += xt_realm.h -header-y += xt_sctp.h -header-y += xt_state.h -header-y += xt_string.h -header-y += xt_tcpmss.h -header-y += xt_tcpudp.h -header-y += xt_SECMARK.h -header-y += xt_CONNSECMARK.h - -unifdef-y += nf_conntrack_common.h -unifdef-y += nf_conntrack_ftp.h -unifdef-y += nf_conntrack_tcp.h -unifdef-y += nfnetlink.h -unifdef-y += x_tables.h -unifdef-y += xt_physdev.h diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index d2e4bd7a7..3ff88c878 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h @@ -69,10 +69,6 @@ enum ip_conntrack_status { /* Connection is dying (removed from lists), can not be unset. */ IPS_DYING_BIT = 9, IPS_DYING = (1 << IPS_DYING_BIT), - - /* Connection has fixed timeout. */ - IPS_FIXED_TIMEOUT_BIT = 10, - IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), }; /* Connection tracking event bits */ diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index b5883ccee..668ec946c 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h @@ -27,15 +27,13 @@ enum ctattr_type { CTA_STATUS, CTA_PROTOINFO, CTA_HELP, - CTA_NAT_SRC, -#define CTA_NAT CTA_NAT_SRC /* backwards compatibility */ + CTA_NAT, CTA_TIMEOUT, CTA_MARK, CTA_COUNTERS_ORIG, CTA_COUNTERS_REPLY, CTA_USE, CTA_ID, - CTA_NAT_DST, __CTA_MAX }; #define CTA_MAX (__CTA_MAX - 1) diff --git a/include/linux/netfilter/xt_CONNSECMARK.h b/include/linux/netfilter/xt_CONNSECMARK.h deleted file mode 100644 index c6bd75469..000000000 --- a/include/linux/netfilter/xt_CONNSECMARK.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _XT_CONNSECMARK_H_target -#define _XT_CONNSECMARK_H_target - -enum { - CONNSECMARK_SAVE = 1, - CONNSECMARK_RESTORE, -}; - -struct xt_connsecmark_target_info { - u_int8_t mode; -}; - -#endif /*_XT_CONNSECMARK_H_target */ diff --git a/include/linux/netfilter/xt_SECMARK.h b/include/linux/netfilter/xt_SECMARK.h deleted file mode 100644 index c53fbffa9..000000000 --- a/include/linux/netfilter/xt_SECMARK.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _XT_SECMARK_H_target -#define _XT_SECMARK_H_target - -/* - * This is intended for use by various security subsystems (but not - * at the same time). - * - * 'mode' refers to the specific security subsystem which the - * packets are being marked for. - */ -#define SECMARK_MODE_SEL 0x01 /* SELinux */ -#define SECMARK_SELCTX_MAX 256 - -struct xt_secmark_target_selinux_info { - u_int32_t selsid; - char selctx[SECMARK_SELCTX_MAX]; -}; - -struct xt_secmark_target_info { - u_int8_t mode; - union { - struct xt_secmark_target_selinux_info sel; - } u; -}; - -#endif /*_XT_SECMARK_H_target */ diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 4c2d9945c..34f63cf2e 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h @@ -42,7 +42,7 @@ struct ip_conntrack_old_tuple } u; /* The protocol. */ - __u16 protonum; + u16 protonum; } dst; }; diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h deleted file mode 100644 index acd7fd77b..000000000 --- a/include/linux/netfilter/xt_quota.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _XT_QUOTA_H -#define _XT_QUOTA_H - -enum xt_quota_flags { - XT_QUOTA_INVERT = 0x1, -}; -#define XT_QUOTA_MASK 0x1 - -struct xt_quota_info { - u_int32_t flags; - u_int32_t pad; - aligned_u64 quota; - struct xt_quota_info *master; -}; - -#endif /* _XT_QUOTA_H */ diff --git a/include/linux/netfilter/xt_statistic.h b/include/linux/netfilter/xt_statistic.h deleted file mode 100644 index c344e9916..000000000 --- a/include/linux/netfilter/xt_statistic.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _XT_STATISTIC_H -#define _XT_STATISTIC_H - -enum xt_statistic_mode { - XT_STATISTIC_MODE_RANDOM, - XT_STATISTIC_MODE_NTH, - __XT_STATISTIC_MODE_MAX -}; -#define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1) - -enum xt_statistic_flags { - XT_STATISTIC_INVERT = 0x1, -}; -#define XT_STATISTIC_MASK 0x1 - -struct xt_statistic_info { - u_int16_t mode; - u_int16_t flags; - union { - struct { - u_int32_t probability; - } random; - struct { - u_int32_t every; - u_int32_t packet; - u_int32_t count; - } nth; - } u; - struct xt_statistic_info *master __attribute__((aligned(8))); -}; - -#endif /* _XT_STATISTIC_H */ diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h index 92bc6ddcb..a3f8977f7 100644 --- a/include/linux/netfilter_arp.h +++ b/include/linux/netfilter_arp.h @@ -5,6 +5,7 @@ * (C)2002 Rusty Russell IBM -- This code is GPL. */ +#include #include /* There is no PF_ARP. */ diff --git a/include/linux/netfilter_arp/Kbuild b/include/linux/netfilter_arp/Kbuild deleted file mode 100644 index 4f13dfcb9..000000000 --- a/include/linux/netfilter_arp/Kbuild +++ /dev/null @@ -1,3 +0,0 @@ -header-y += arpt_mangle.h - -unifdef-y += arp_tables.h diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 427c67ff8..178a97e1a 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h @@ -4,8 +4,10 @@ /* bridge-specific defines for netfilter. */ +#include #include #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER) +#include #include #endif @@ -45,10 +47,8 @@ enum nf_br_hook_priorities { #define BRNF_BRIDGED 0x08 #define BRNF_NF_BRIDGE_PREROUTING 0x10 - /* Only used in br_forward.c */ -static inline -int nf_bridge_maybe_copy_header(struct sk_buff *skb) +static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) { int err; @@ -88,8 +88,6 @@ struct bridge_skb_cb { __u32 ipv4; } daddr; }; - -extern int brnf_deferred_hooks; #endif /* CONFIG_BRIDGE_NETFILTER */ #endif /* __KERNEL__ */ diff --git a/include/linux/netfilter_bridge/Kbuild b/include/linux/netfilter_bridge/Kbuild deleted file mode 100644 index 76ff4c47d..000000000 --- a/include/linux/netfilter_bridge/Kbuild +++ /dev/null @@ -1,17 +0,0 @@ -header-y += ebt_among.h -header-y += ebt_arp.h -header-y += ebt_arpreply.h -header-y += ebt_ip.h -header-y += ebt_limit.h -header-y += ebt_log.h -header-y += ebt_mark_m.h -header-y += ebt_mark_t.h -header-y += ebt_nat.h -header-y += ebt_pkttype.h -header-y += ebt_redirect.h -header-y += ebt_stp.h -header-y += ebt_ulog.h -header-y += ebt_vlan.h - -unifdef-y += ebtables.h -unifdef-y += ebt_802_3.h diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 5b63a231a..85301c5e8 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h @@ -5,6 +5,7 @@ * (C)1998 Rusty Russell -- This code is GPL. */ +#include #include /* only for userspace compatibility */ @@ -77,7 +78,7 @@ enum nf_ip_hook_priorities { #define SO_ORIGINAL_DST 80 #ifdef __KERNEL__ -extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); +extern int ip_route_me_harder(struct sk_buff **pskb); extern int ip_xfrm_me_harder(struct sk_buff **pskb); extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, u_int8_t protocol); diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild deleted file mode 100644 index 591c1a809..000000000 --- a/include/linux/netfilter_ipv4/Kbuild +++ /dev/null @@ -1,63 +0,0 @@ -header-y += ip_conntrack_helper.h -header-y += ip_conntrack_helper_h323_asn1.h -header-y += ip_conntrack_helper_h323_types.h -header-y += ip_conntrack_protocol.h -header-y += ip_conntrack_sctp.h -header-y += ip_conntrack_tcp.h -header-y += ip_conntrack_tftp.h -header-y += ip_nat_pptp.h -header-y += ipt_addrtype.h -header-y += ipt_ah.h -header-y += ipt_CLASSIFY.h -header-y += ipt_CLUSTERIP.h -header-y += ipt_comment.h -header-y += ipt_connbytes.h -header-y += ipt_connmark.h -header-y += ipt_CONNMARK.h -header-y += ipt_conntrack.h -header-y += ipt_dccp.h -header-y += ipt_dscp.h -header-y += ipt_DSCP.h -header-y += ipt_ecn.h -header-y += ipt_ECN.h -header-y += ipt_esp.h -header-y += ipt_hashlimit.h -header-y += ipt_helper.h -header-y += ipt_iprange.h -header-y += ipt_length.h -header-y += ipt_limit.h -header-y += ipt_LOG.h -header-y += ipt_mac.h -header-y += ipt_mark.h -header-y += ipt_MARK.h -header-y += ipt_multiport.h -header-y += ipt_NFQUEUE.h -header-y += ipt_owner.h -header-y += ipt_physdev.h -header-y += ipt_pkttype.h -header-y += ipt_policy.h -header-y += ipt_realm.h -header-y += ipt_recent.h -header-y += ipt_REJECT.h -header-y += ipt_SAME.h -header-y += ipt_sctp.h -header-y += ipt_state.h -header-y += ipt_string.h -header-y += ipt_tcpmss.h -header-y += ipt_TCPMSS.h -header-y += ipt_tos.h -header-y += ipt_TOS.h -header-y += ipt_ttl.h -header-y += ipt_TTL.h -header-y += ipt_ULOG.h - -unifdef-y += ip_conntrack.h -unifdef-y += ip_conntrack_h323.h -unifdef-y += ip_conntrack_irc.h -unifdef-y += ip_conntrack_pptp.h -unifdef-y += ip_conntrack_proto_gre.h -unifdef-y += ip_conntrack_tuple.h -unifdef-y += ip_nat.h -unifdef-y += ip_nat_rule.h -unifdef-y += ip_queue.h -unifdef-y += ip_tables.h diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index cfb454ae2..5a669629e 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h @@ -4,6 +4,7 @@ #include #ifdef __KERNEL__ +#include #include #include #include @@ -120,6 +121,7 @@ struct ip_conntrack u_int32_t mark; #endif + #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE) /* VServer context id */ xid_t xid[IP_CT_DIR_MAX]; @@ -129,10 +131,6 @@ struct ip_conntrack u_int32_t priority; #endif -#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK - u_int32_t secmark; -#endif - /* Traversed often, so hopefully in different cacheline to top */ /* These are my tuples; original and reply */ struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; @@ -166,7 +164,6 @@ struct ip_conntrack_expect unsigned int flags; #ifdef CONFIG_IP_NF_NAT_NEEDED - u_int32_t saved_ip; /* This is the original per-proto part, used to map the * expected connection the way the recipient expects. */ union ip_conntrack_manip_proto saved_proto; @@ -306,7 +303,6 @@ static inline int is_dying(struct ip_conntrack *ct) } extern unsigned int ip_conntrack_htable_size; -extern int ip_conntrack_checksum; #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 3cbff7379..eace86bd2 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h @@ -71,13 +71,6 @@ extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, unsigned char **data, int dataoff, TransportAddress * addr, u_int16_t port, struct ip_conntrack_expect * exp); -extern int (*nat_callforwarding_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr, - u_int16_t port, - struct ip_conntrack_expect * exp); extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, enum ip_conntrack_info ctinfo, unsigned char **data, TransportAddress * addr, diff --git a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h index 3d4a77379..cc98f7aa5 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h @@ -1,4 +1,4 @@ -/* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 +/* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006 * * Copyright (c) 2006 Jing Min Zhao * @@ -412,7 +412,6 @@ typedef struct Facility_UUIE { /* SEQUENCE */ eFacility_UUIE_destinationInfo = (1 << 14), eFacility_UUIE_h245SecurityMode = (1 << 13), } options; - TransportAddress alternativeAddress; FacilityReason reason; TransportAddress h245Address; Facility_UUIE_fastStart fastStart; diff --git a/include/linux/netfilter_ipv4/ip_conntrack_sip.h b/include/linux/netfilter_ipv4/ip_conntrack_sip.h deleted file mode 100644 index 913dad66c..000000000 --- a/include/linux/netfilter_ipv4/ip_conntrack_sip.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __IP_CONNTRACK_SIP_H__ -#define __IP_CONNTRACK_SIP_H__ -#ifdef __KERNEL__ - -#define SIP_PORT 5060 -#define SIP_TIMEOUT 3600 - -#define POS_VIA 0 -#define POS_CONTACT 1 -#define POS_CONTENT 2 -#define POS_MEDIA 3 -#define POS_OWNER 4 -#define POS_CONNECTION 5 -#define POS_REQ_HEADER 6 -#define POS_SDP_HEADER 7 - -struct sip_header_nfo { - const char *lname; - const char *sname; - const char *ln_str; - size_t lnlen; - size_t snlen; - size_t ln_strlen; - int (*match_len)(const char *, const char *, int *); -}; - -extern unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - const char **dptr); -extern unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack_expect *exp, - const char *dptr); - -extern int ct_sip_get_info(const char *dptr, size_t dlen, - unsigned int *matchoff, - unsigned int *matchlen, - struct sip_header_nfo *hnfo); -extern int ct_sip_lnlen(const char *line, const char *limit); -extern const char *ct_sip_search(const char *needle, const char *haystack, - size_t needle_len, size_t haystack_len); -#endif /* __KERNEL__ */ -#endif /* __IP_CONNTRACK_SIP_H__ */ diff --git a/include/linux/netfilter_ipv4/listhelp.h b/include/linux/netfilter_ipv4/listhelp.h index 5d92cf044..360429f48 100644 --- a/include/linux/netfilter_ipv4/listhelp.h +++ b/include/linux/netfilter_ipv4/listhelp.h @@ -1,5 +1,6 @@ #ifndef _LISTHELP_H #define _LISTHELP_H +#include #include /* Header to do more comprehensive job than linux/list.h; assume list diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild deleted file mode 100644 index 9dd978d14..000000000 --- a/include/linux/netfilter_ipv6/Kbuild +++ /dev/null @@ -1,21 +0,0 @@ -header-y += ip6t_HL.h -header-y += ip6t_LOG.h -header-y += ip6t_MARK.h -header-y += ip6t_REJECT.h -header-y += ip6t_ah.h -header-y += ip6t_esp.h -header-y += ip6t_frag.h -header-y += ip6t_hl.h -header-y += ip6t_ipv6header.h -header-y += ip6t_length.h -header-y += ip6t_limit.h -header-y += ip6t_mac.h -header-y += ip6t_mark.h -header-y += ip6t_multiport.h -header-y += ip6t_opts.h -header-y += ip6t_owner.h -header-y += ip6t_policy.h -header-y += ip6t_physdev.h -header-y += ip6t_rt.h - -unifdef-y += ip6_tables.h diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 855b44668..87b8a5703 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -5,7 +5,7 @@ #include #define NETLINK_ROUTE 0 /* Routing/device hook */ -#define NETLINK_UNUSED 1 /* Unused number */ +#define NETLINK_W1 1 /* 1-wire subsystem */ #define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ #define NETLINK_FIREWALL 3 /* Firewalling hook */ #define NETLINK_INET_DIAG 4 /* INET socket monitoring */ diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 1efe60c5c..ca5a87330 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -31,7 +31,6 @@ struct netpoll_info { int rx_flags; spinlock_t rx_lock; struct netpoll *rx_np; /* netpoll that registered an rx_hook */ - struct sk_buff_head arp_tx; /* list of arp requests to reply to */ }; void netpoll_poll(struct netpoll *np); diff --git a/include/linux/nfs.h b/include/linux/nfs.h index 54af92c1c..ca2ffa6ae 100644 --- a/include/linux/nfs.h +++ b/include/linux/nfs.h @@ -7,6 +7,9 @@ #ifndef _LINUX_NFS_H #define _LINUX_NFS_H +#include +#include + #define NFS_PROGRAM 100003 #define NFS_PORT 2049 #define NFS_MAXDATA 8192 @@ -126,10 +129,7 @@ enum nfs_ftype { NFFIFO = 8 }; -#ifdef __KERNEL__ -#include -#include - +#if defined(__KERNEL__) /* * This is the kernel NFS client file handle representation */ diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index db05182ca..0c1c306cd 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h @@ -14,6 +14,7 @@ #define _LINUX_NFS4_H #include +#include #define NFS4_VERIFIER_SIZE 8 #define NFS4_FHSIZE 128 @@ -96,9 +97,6 @@ enum nfs4_acl_whotype { NFS4_ACL_WHO_EVERYONE, }; -#ifdef __KERNEL__ -#include - struct nfs4_ace { uint32_t type; uint32_t flag; @@ -157,12 +155,6 @@ enum nfs_opnum4 { OP_ILLEGAL = 10044, }; -/*Defining first and last NFS4 operations implemented. -Needs to be updated if more operations are defined in future.*/ - -#define FIRST_NFS4_OP OP_ACCESS -#define LAST_NFS4_OP OP_RELEASE_LOCKOWNER - enum nfsstat4 { NFS4_OK = 0, NFS4ERR_PERM = 1, @@ -353,6 +345,8 @@ enum lock_type4 { #define NFS4_MINOR_VERSION 0 #define NFS4_DEBUG 1 +#ifdef __KERNEL__ + /* Index of predefined Linux client operations */ enum { @@ -390,7 +384,6 @@ enum { NFSPROC4_CLNT_DELEGRETURN, NFSPROC4_CLNT_GETACL, NFSPROC4_CLNT_SETACL, - NFSPROC4_CLNT_FS_LOCATIONS, }; #endif diff --git a/include/linux/nfs4_mount.h b/include/linux/nfs4_mount.h index 15199ccd7..26b4c83f8 100644 --- a/include/linux/nfs4_mount.h +++ b/include/linux/nfs4_mount.h @@ -65,7 +65,6 @@ struct nfs4_mount_data { #define NFS4_MOUNT_NOCTO 0x0010 /* 1 */ #define NFS4_MOUNT_NOAC 0x0020 /* 1 */ #define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */ -#define NFS4_MOUNT_FSCACHE 0x4000 /* 1 */ #define NFS4_MOUNT_FLAGMASK 0xFFFF #endif diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 821c628d0..c71227dd4 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -9,6 +9,27 @@ #ifndef _LINUX_NFS_FS_H #define _LINUX_NFS_FS_H +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + /* * Enable debugging support for nfs client. * Requires RPC_DEBUG. @@ -26,6 +47,11 @@ */ #define NFS_SUPER_MAGIC 0x6969 +/* + * These are the default flags for swap requests + */ +#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) + /* * When flushing a cluster of dirty pages, there can be different * strategies: @@ -35,37 +61,9 @@ #define FLUSH_LOWPRI 8 /* low priority background flush */ #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ -#define FLUSH_INVALIDATE 64 /* Invalidate the page cache */ #ifdef __KERNEL__ -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -/* - * These are the default flags for swap requests - */ -#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) - /* * NFSv3/v4 Access mode cache entry */ @@ -181,9 +179,6 @@ struct nfs_inode { int delegation_state; struct rw_semaphore rwsem; #endif /* CONFIG_NFS_V4*/ -#ifdef CONFIG_NFS_FSCACHE - struct fscache_cookie *fscache; -#endif struct inode vfs_inode; }; @@ -213,7 +208,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) #define NFS_FH(inode) (&NFS_I(inode)->fh) #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) -#define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops) +#define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops) #define NFS_ADDR(inode) (RPC_PEERADDR(NFS_CLIENT(inode))) #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) @@ -239,12 +234,8 @@ static inline int nfs_caches_unstable(struct inode *inode) static inline void nfs_mark_for_revalidate(struct inode *inode) { - struct nfs_inode *nfsi = NFS_I(inode); - spin_lock(&inode->i_lock); - nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS; - if (S_ISDIR(inode->i_mode)) - nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA; + NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; spin_unlock(&inode->i_lock); } @@ -306,7 +297,7 @@ extern int nfs_release(struct inode *, struct file *); extern int nfs_attribute_timeout(struct inode *inode); extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); -extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); +extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); extern int nfs_setattr(struct dentry *, struct iattr *); extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); extern void nfs_begin_attr_update(struct inode *); @@ -316,10 +307,6 @@ extern void nfs_end_data_update(struct inode *); extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); extern void put_nfs_open_context(struct nfs_open_context *ctx); extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); -extern struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, - const struct dentry *dentry, - struct nfs_fh *fh, - struct nfs_fattr *fattr); /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ extern u32 root_nfs_parse_addr(char *name); /*__init*/ @@ -338,7 +325,7 @@ extern struct inode_operations nfs_file_inode_operations; extern struct inode_operations nfs3_file_inode_operations; #endif /* CONFIG_NFS_V3 */ extern const struct file_operations nfs_file_operations; -extern const struct address_space_operations nfs_file_aops; +extern struct address_space_operations nfs_file_aops; static inline struct rpc_cred *nfs_file_cred(struct file *file) { @@ -405,15 +392,6 @@ extern void nfs_unregister_sysctl(void); #define nfs_unregister_sysctl() do { } while(0) #endif -/* - * linux/fs/nfs/namespace.c - */ -extern struct list_head nfs_automount_list; -extern struct inode_operations nfs_mountpoint_inode_operations; -extern struct inode_operations nfs_referral_inode_operations; -extern int nfs_mountpoint_expiry_timeout; -extern void nfs_release_automount_timer(void); - /* * linux/fs/nfs/unlink.c */ @@ -431,7 +409,7 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); extern void nfs_writedata_release(void *); #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) -struct nfs_write_data *nfs_commit_alloc(void); +struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount); void nfs_commit_free(struct nfs_write_data *p); #endif @@ -480,9 +458,10 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) } /* - * Allocate nfs_write_data structures + * Allocate and free nfs_write_data structures */ -extern struct nfs_write_data *nfs_writedata_alloc(size_t len); +extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); +extern void nfs_writedata_free(struct nfs_write_data *p); /* * linux/fs/nfs/read.c @@ -494,9 +473,10 @@ extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); extern void nfs_readdata_release(void *data); /* - * Allocate nfs_read_data structures + * Allocate and free nfs_read_data structures */ -extern struct nfs_read_data *nfs_readdata_alloc(size_t len); +extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); +extern void nfs_readdata_free(struct nfs_read_data *p); /* * linux/fs/nfs3proc.c @@ -541,6 +521,15 @@ nfs_size_to_loff_t(__u64 size) return (loff_t) size; } +static inline ino_t +nfs_fileid_to_ino_t(u64 fileid) +{ + ino_t ino = (ino_t) fileid; + if (sizeof(ino_t) < sizeof(u64)) + ino ^= fileid >> (sizeof(u64)-sizeof(ino_t)) * 8; + return ino; +} + /* NFS root */ extern void * nfs_root_data(void); @@ -574,8 +563,6 @@ extern void * nfs_root_data(void); #define NFSDBG_FILE 0x0040 #define NFSDBG_ROOT 0x0080 #define NFSDBG_CALLBACK 0x0100 -#define NFSDBG_CLIENT 0x0200 -#define NFSDBG_FSCACHE 0x0400 #define NFSDBG_ALL 0xFFFF #ifdef __KERNEL__ diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index c44be53c2..65dec21af 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -3,88 +3,17 @@ #include #include -#include struct nfs_iostats; -/* - * The nfs_client identifies our client state to the server. - */ -struct nfs_client { - atomic_t cl_count; - int cl_cons_state; /* current construction state (-ve: init error) */ -#define NFS_CS_READY 0 /* ready to be used */ -#define NFS_CS_INITING 1 /* busy initialising */ - int cl_nfsversion; /* NFS protocol version */ - unsigned long cl_res_state; /* NFS resources state */ -#define NFS_CS_RPCIOD 0 /* - rpciod started */ -#define NFS_CS_CALLBACK 1 /* - callback started */ -#define NFS_CS_IDMAP 2 /* - idmap started */ -#define NFS_CS_RENEWD 3 /* - renewd started */ - struct sockaddr_in cl_addr; /* server identifier */ - char * cl_hostname; /* hostname of server */ - struct list_head cl_share_link; /* link in global client list */ - struct list_head cl_superblocks; /* List of nfs_server structs */ - - struct rpc_clnt * cl_rpcclient; - const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ - unsigned long retrans_timeo; /* retransmit timeout */ - unsigned int retrans_count; /* number of retransmit tries */ - -#ifdef CONFIG_NFS_V4 - u64 cl_clientid; /* constant */ - nfs4_verifier cl_confirm; - unsigned long cl_state; - - u32 cl_lockowner_id; - - /* - * The following rwsem ensures exclusive access to the server - * while we recover the state following a lease expiration. - */ - struct rw_semaphore cl_sem; - - struct list_head cl_delegations; - struct list_head cl_state_owners; - struct list_head cl_unused; - int cl_nunused; - spinlock_t cl_lock; - - unsigned long cl_lease_time; - unsigned long cl_last_renewal; - struct work_struct cl_renewd; - - struct rpc_wait_queue cl_rpcwaitq; - - /* used for the setclientid verifier */ - struct timespec cl_boot_time; - - /* idmapper */ - struct idmap * cl_idmap; - - /* Our own IP address, as a null-terminated string. - * This is used to generate the clientid, and the callback address. - */ - char cl_ipaddr[16]; - unsigned char cl_id_uniquifier; -#endif - -#ifdef CONFIG_NFS_FSCACHE - struct fscache_cookie *fscache; /* client index cache cookie */ -#endif -}; - /* * NFS client parameters stored in the superblock. */ struct nfs_server { - struct nfs_client * nfs_client; /* shared client and NFS4 state */ - struct list_head client_link; /* List of other nfs_server structs - * that share the same client - */ - struct list_head master_link; /* link in master servers list */ struct rpc_clnt * client; /* RPC client handle */ + struct rpc_clnt * client_sys; /* 2nd handle for FSINFO */ struct rpc_clnt * client_acl; /* ACL RPC client handle */ + struct nfs_rpc_ops * rpc_ops; /* NFS protocol vector */ struct nfs_iostats * io_stats; /* I/O statistics */ struct backing_dev_info backing_dev_info; int flags; /* various flags */ @@ -100,14 +29,23 @@ struct nfs_server { unsigned int acregmax; unsigned int acdirmin; unsigned int acdirmax; + unsigned long retrans_timeo; /* retransmit timeout */ + unsigned int retrans_count; /* number of retransmit tries */ unsigned int namelen; - - struct nfs_fsid fsid; - __u64 maxfilesize; /* maximum file size */ + char * hostname; /* remote hostname */ + struct nfs_fh fh; + struct sockaddr_in addr; unsigned long mount_time; /* when this fs was mounted */ - dev_t s_dev; /* superblock dev numbers */ - #ifdef CONFIG_NFS_V4 + /* Our own IP address, as a null-terminated string. + * This is used to generate the clientid, and the callback address. + */ + char ip_addr[16]; + char * mnt_path; + struct nfs4_client * nfs4_state; /* all NFSv4 state starts here */ + struct list_head nfs4_siblings; /* List of other nfs_server structs + * that share the same clientid + */ u32 attr_bitmask[2];/* V4 bitmask representing the set of attributes supported on this filesystem */ @@ -115,7 +53,6 @@ struct nfs_server { that are supported on this filesystem */ #endif - void (*destroy)(struct nfs_server *); }; /* Server capabilities */ diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 15a9f3b72..102e56094 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h @@ -62,15 +62,15 @@ struct idmap_msg { #ifdef __KERNEL__ /* Forward declaration to make this header independent of others */ -struct nfs_client; +struct nfs4_client; -int nfs_idmap_new(struct nfs_client *); -void nfs_idmap_delete(struct nfs_client *); +void nfs_idmap_new(struct nfs4_client *); +void nfs_idmap_delete(struct nfs4_client *); -int nfs_map_name_to_uid(struct nfs_client *, const char *, size_t, __u32 *); -int nfs_map_group_to_gid(struct nfs_client *, const char *, size_t, __u32 *); -int nfs_map_uid_to_name(struct nfs_client *, __u32, char *); -int nfs_map_gid_to_group(struct nfs_client *, __u32, char *); +int nfs_map_name_to_uid(struct nfs4_client *, const char *, size_t, __u32 *); +int nfs_map_group_to_gid(struct nfs4_client *, const char *, size_t, __u32 *); +int nfs_map_uid_to_name(struct nfs4_client *, __u32, char *); +int nfs_map_gid_to_group(struct nfs4_client *, __u32, char *); extern unsigned int nfs_idmap_cache_timeout; #endif /* __KERNEL__ */ diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index 2b7233191..b1531a032 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h @@ -61,7 +61,6 @@ struct nfs_mount_data { #define NFS_MOUNT_NOACL 0x0800 /* 4 */ #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ -#define NFS_MOUNT_FSCACHE 0x4000 #define NFS_MOUNT_TAGXID 0x8000 /* tagxid */ #define NFS_MOUNT_FLAGMASK 0xFFFF diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 1f7bd287c..66e2ed658 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -62,8 +63,8 @@ extern void nfs_release_request(struct nfs_page *req); extern int nfs_scan_lock_dirty(struct nfs_inode *nfsi, struct list_head *dst, unsigned long idx_start, unsigned int npages); -extern int nfs_scan_list(struct nfs_inode *nfsi, struct list_head *head, struct list_head *dst, - unsigned long idx_start, unsigned int npages); +extern int nfs_scan_list(struct list_head *, struct list_head *, + unsigned long, unsigned int); extern int nfs_coalesce_requests(struct list_head *, struct list_head *, unsigned int); extern int nfs_wait_on_request(struct nfs_page *); diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2426b11b6..7fafc4c54 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -14,19 +14,11 @@ #define NFS_DEF_FILE_IO_SIZE (4096U) #define NFS_MIN_FILE_IO_SIZE (1024U) -struct nfs_fsid { - uint64_t major; - uint64_t minor; +struct nfs4_fsid { + __u64 major; + __u64 minor; }; -/* - * Helper for checking equality between 2 fsids. - */ -static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b) -{ - return a->major == b->major && a->minor == b->minor; -} - struct nfs_fattr { unsigned short valid; /* which fields are valid */ __u64 pre_size; /* pre_op_attr.size */ @@ -48,7 +40,10 @@ struct nfs_fattr { } nfs3; } du; dev_t rdev; - struct nfs_fsid fsid; + union { + __u64 nfs3; /* also nfs2 */ + struct nfs4_fsid nfs4; + } fsid_u; __u64 fileid; struct timespec atime; struct timespec mtime; @@ -62,8 +57,8 @@ struct nfs_fattr { #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ -#define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ -#define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */ +#define NFS_ATTR_FATTR_V4 0x0008 +#define NFS_ATTR_PRE_CHANGE 0x0010 /* * Info on the file system @@ -659,7 +654,7 @@ struct nfs4_rename_res { struct nfs4_setclientid { const nfs4_verifier * sc_verifier; /* request */ unsigned int sc_name_len; - char sc_name[48]; /* request */ + char sc_name[32]; /* request */ u32 sc_prog; /* request */ unsigned int sc_netid_len; char sc_netid[4]; /* request */ @@ -680,40 +675,6 @@ struct nfs4_server_caps_res { u32 has_symlinks; }; -struct nfs4_string { - unsigned int len; - char *data; -}; - -#define NFS4_PATHNAME_MAXCOMPONENTS 512 -struct nfs4_pathname { - unsigned int ncomponents; - struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS]; -}; - -#define NFS4_FS_LOCATION_MAXSERVERS 10 -struct nfs4_fs_location { - unsigned int nservers; - struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS]; - struct nfs4_pathname rootpath; -}; - -#define NFS4_FS_LOCATIONS_MAXENTRIES 10 -struct nfs4_fs_locations { - struct nfs_fattr fattr; - const struct nfs_server *server; - struct nfs4_pathname fs_path; - int nlocations; - struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES]; -}; - -struct nfs4_fs_locations_arg { - const struct nfs_fh *dir_fh; - const struct qstr *name; - struct page *page; - const u32 *bitmask; -}; - #endif /* CONFIG_NFS_V4 */ struct nfs_page; @@ -729,13 +690,12 @@ struct nfs_read_data { struct list_head pages; /* Coalesced read requests */ struct nfs_page *req; /* multi ops per nfs_page */ struct page **pagevec; - unsigned int npages; /* Max length of pagevec */ struct nfs_readargs args; struct nfs_readres res; #ifdef CONFIG_NFS_V4 unsigned long timestamp; /* For lease renewal */ #endif - struct page *page_array[NFS_PAGEVEC_SIZE]; + struct page *page_array[NFS_PAGEVEC_SIZE + 1]; }; struct nfs_write_data { @@ -748,13 +708,12 @@ struct nfs_write_data { struct list_head pages; /* Coalesced requests we wish to flush */ struct nfs_page *req; /* multi ops per nfs_page */ struct page **pagevec; - unsigned int npages; /* Max length of pagevec */ struct nfs_writeargs args; /* argument struct */ struct nfs_writeres res; /* result struct */ #ifdef CONFIG_NFS_V4 unsigned long timestamp; /* For lease renewal */ #endif - struct page *page_array[NFS_PAGEVEC_SIZE]; + struct page *page_array[NFS_PAGEVEC_SIZE + 1]; }; struct nfs_access_entry; @@ -770,9 +729,6 @@ struct nfs_rpc_ops { int (*getroot) (struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); - int (*lookupfh)(struct nfs_server *, struct nfs_fh *, - struct qstr *, struct nfs_fh *, - struct nfs_fattr *); int (*getattr) (struct nfs_server *, struct nfs_fh *, struct nfs_fattr *); int (*setattr) (struct dentry *, struct nfs_fattr *, @@ -809,7 +765,6 @@ struct nfs_rpc_ops { struct nfs_fsinfo *); int (*pathconf) (struct nfs_server *, struct nfs_fh *, struct nfs_pathconf *); - int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus); void (*read_setup) (struct nfs_read_data *); int (*read_done) (struct rpc_task *, struct nfs_read_data *); @@ -833,9 +788,9 @@ struct nfs_rpc_ops { /* * Function vectors etc. for the NFS client */ -extern const struct nfs_rpc_ops nfs_v2_clientops; -extern const struct nfs_rpc_ops nfs_v3_clientops; -extern const struct nfs_rpc_ops nfs_v4_clientops; +extern struct nfs_rpc_ops nfs_v2_clientops; +extern struct nfs_rpc_ops nfs_v3_clientops; +extern struct nfs_rpc_ops nfs_v4_clientops; extern struct rpc_version nfs_version2; extern struct rpc_version nfs_version3; extern struct rpc_version nfs_version4; diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild deleted file mode 100644 index d9c545580..000000000 --- a/include/linux/nfsd/Kbuild +++ /dev/null @@ -1,7 +0,0 @@ -unifdef-y += const.h -unifdef-y += export.h -unifdef-y += stats.h -unifdef-y += syscall.h -unifdef-y += nfsfh.h -unifdef-y += debug.h -unifdef-y += auth.h diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 2dcad295f..ec7c2e872 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h @@ -10,6 +10,7 @@ #ifndef LINUX_NFSD_NFSD_H #define LINUX_NFSD_NFSD_H +#include #include #include #include diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 069257ea9..0798b7781 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -16,6 +16,7 @@ #include #ifdef __KERNEL__ +# include # include # include # include @@ -269,8 +270,14 @@ fill_post_wcc(struct svc_fh *fhp) fhp->fh_post_uid = inode->i_uid; fhp->fh_post_gid = inode->i_gid; fhp->fh_post_size = inode->i_size; - fhp->fh_post_blksize = BLOCK_SIZE; - fhp->fh_post_blocks = inode->i_blocks; + if (inode->i_blksize) { + fhp->fh_post_blksize = inode->i_blksize; + fhp->fh_post_blocks = inode->i_blocks; + } else { + fhp->fh_post_blksize = BLOCK_SIZE; + /* how much do we care for accuracy with MinixFS? */ + fhp->fh_post_blocks = (inode->i_size+511) >> 9; + } fhp->fh_post_rdev[0] = htonl((u32)imajor(inode)); fhp->fh_post_rdev[1] = htonl((u32)iminor(inode)); fhp->fh_post_atime = inode->i_atime; @@ -290,9 +297,8 @@ fill_post_wcc(struct svc_fh *fhp) * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once * so, any changes here should be reflected there. */ - static inline void -fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) +fh_lock(struct svc_fh *fhp) { struct dentry *dentry = fhp->fh_dentry; struct inode *inode; @@ -311,17 +317,11 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) } inode = dentry->d_inode; - mutex_lock_nested(&inode->i_mutex, subclass); + mutex_lock(&inode->i_mutex); fill_pre_wcc(fhp); fhp->fh_locked = 1; } -static inline void -fh_lock(struct svc_fh *fhp) -{ - fh_lock_nested(fhp, I_MUTEX_NORMAL); -} - /* * Unlock a file handle/inode */ diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h index 28a82fdd9..b6f1e0cda 100644 --- a/include/linux/nfsd/stats.h +++ b/include/linux/nfsd/stats.h @@ -9,8 +9,6 @@ #ifndef LINUX_NFSD_STATS_H #define LINUX_NFSD_STATS_H -#include - struct nfsd_stats { unsigned int rchits; /* repcache hits */ unsigned int rcmisses; /* repcache hits */ @@ -29,10 +27,6 @@ struct nfsd_stats { unsigned int ra_size; /* size of ra cache */ unsigned int ra_depth[11]; /* number of times ra entry was found that deep * in the cache (10percentiles). [10] = not found */ -#ifdef CONFIG_NFSD_V4 - unsigned int nfs4_opcount[LAST_NFS4_OP + 1]; /* count of individual nfsv4 operations */ -#endif - }; /* thread usage wraps very million seconds (approx one fortnight) */ diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index fb1663d58..a37ad8678 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h @@ -11,6 +11,7 @@ #include #ifdef __KERNEL__ +# include # include # include #endif diff --git a/include/linux/node.h b/include/linux/node.h index bc001bc22..254dc3de6 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -26,33 +26,8 @@ struct node { struct sys_device sysdev; }; -extern struct node node_devices[]; - extern int register_node(struct node *, int, struct node *); extern void unregister_node(struct node *node); -#ifdef CONFIG_NUMA -extern int register_one_node(int nid); -extern void unregister_one_node(int nid); -extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); -extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); -#else -static inline int register_one_node(int nid) -{ - return 0; -} -static inline int unregister_one_node(int nid) -{ - return 0; -} -static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) -{ - return 0; -} -static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) -{ - return 0; -} -#endif #define to_node(sys_device) container_of(sys_device, struct node, sysdev) diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 7ff386a6a..51dbab971 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -65,7 +65,7 @@ struct raw_notifier_head { } while (0) #define ATOMIC_NOTIFIER_INIT(name) { \ - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ + .lock = SPIN_LOCK_UNLOCKED, \ .head = NULL } #define BLOCKING_NOTIFIER_INIT(name) { \ .rwsem = __RWSEM_INITIALIZER((name).rwsem), \ diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h deleted file mode 100644 index 7da0cf370..000000000 --- a/include/linux/nsc_gpio.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - nsc_gpio.c - - National Semiconductor GPIO common access methods. - - struct nsc_gpio_ops abstracts the low-level access - operations for the GPIO units on 2 NSC chip families; the GEODE - integrated CPU, and the PC-8736[03456] integrated PC-peripheral - chips. - - The GPIO units on these chips have the same pin architecture, but - the access methods differ. Thus, scx200_gpio and pc8736x_gpio - implement their own versions of these routines; and use the common - file-operations routines implemented in nsc_gpio module. - - Copyright (c) 2005 Jim Cromie - - NB: this work was tested on the Geode SC-1100 and PC-87366 chips. - NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond. -*/ - -struct nsc_gpio_ops { - struct module* owner; - u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); - void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); - int (*gpio_get) (unsigned iminor); - void (*gpio_set) (unsigned iminor, int state); - void (*gpio_change) (unsigned iminor); - int (*gpio_current) (unsigned iminor); - struct device* dev; /* for dev_dbg() support, set in init */ -}; - -extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos); - -extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, - size_t len, loff_t *ppos); - -extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); - diff --git a/include/linux/numa.h b/include/linux/numa.h index a31a7301b..e481feb1b 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h @@ -1,6 +1,7 @@ #ifndef _LINUX_NUMA_H #define _LINUX_NUMA_H +#include #ifdef CONFIG_NODES_SHIFT #define NODES_SHIFT CONFIG_NODES_SHIFT diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6e017b7e9..d276a4e2f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -5,7 +5,9 @@ #ifndef PAGE_FLAGS_H #define PAGE_FLAGS_H -#include +#include +#include +#include /* * Various page->flags bits: @@ -71,7 +73,7 @@ #define PG_active 6 #define PG_slab 7 /* slab debug (Suparna wants this) */ -#define PG_fs_misc 8 +#define PG_checked 8 /* kill me in 2.5.. */ #define PG_arch_1 9 #define PG_reserved 10 #define PG_private 11 /* Has something at ->private */ @@ -86,17 +88,135 @@ #define PG_nosave_free 18 /* Free, should not be written */ #define PG_buddy 19 /* Page is free, on buddy lists */ +#define PG_uncached 20 /* Page has been mapped as uncached */ -#if (BITS_PER_LONG > 32) /* - * 64-bit-only flags build down from bit 31 + * Global page accounting. One instance per CPU. Only unsigned longs are + * allowed. * - * 32 bit -------------------------------| FIELDS | FLAGS | - * 64 bit | FIELDS | ?????? FLAGS | - * 63 32 0 + * - Fields can be modified with xxx_page_state and xxx_page_state_zone at + * any time safely (which protects the instance from modification by + * interrupt. + * - The __xxx_page_state variants can be used safely when interrupts are + * disabled. + * - The __xxx_page_state variants can be used if the field is only + * modified from process context and protected from preemption, or only + * modified from interrupt context. In this case, the field should be + * commented here. */ -#define PG_uncached 31 /* Page has been mapped as uncached */ -#endif +struct page_state { + unsigned long nr_dirty; /* Dirty writeable pages */ + unsigned long nr_writeback; /* Pages under writeback */ + unsigned long nr_unstable; /* NFS unstable pages */ + unsigned long nr_page_table_pages;/* Pages used for pagetables */ + unsigned long nr_mapped; /* mapped into pagetables. + * only modified from process context */ + unsigned long nr_slab; /* In slab */ +#define GET_PAGE_STATE_LAST nr_slab + + /* + * The below are zeroed by get_page_state(). Use get_full_page_state() + * to add up all these. + */ + unsigned long pgpgin; /* Disk reads */ + unsigned long pgpgout; /* Disk writes */ + unsigned long pswpin; /* swap reads */ + unsigned long pswpout; /* swap writes */ + + unsigned long pgalloc_high; /* page allocations */ + unsigned long pgalloc_normal; + unsigned long pgalloc_dma32; + unsigned long pgalloc_dma; + + unsigned long pgfree; /* page freeings */ + unsigned long pgactivate; /* pages moved inactive->active */ + unsigned long pgdeactivate; /* pages moved active->inactive */ + + unsigned long pgfault; /* faults (major+minor) */ + unsigned long pgmajfault; /* faults (major only) */ + + unsigned long pgrefill_high; /* inspected in refill_inactive_zone */ + unsigned long pgrefill_normal; + unsigned long pgrefill_dma32; + unsigned long pgrefill_dma; + + unsigned long pgsteal_high; /* total highmem pages reclaimed */ + unsigned long pgsteal_normal; + unsigned long pgsteal_dma32; + unsigned long pgsteal_dma; + + unsigned long pgscan_kswapd_high;/* total highmem pages scanned */ + unsigned long pgscan_kswapd_normal; + unsigned long pgscan_kswapd_dma32; + unsigned long pgscan_kswapd_dma; + + unsigned long pgscan_direct_high;/* total highmem pages scanned */ + unsigned long pgscan_direct_normal; + unsigned long pgscan_direct_dma32; + unsigned long pgscan_direct_dma; + + unsigned long pginodesteal; /* pages reclaimed via inode freeing */ + unsigned long slabs_scanned; /* slab objects scanned */ + unsigned long kswapd_steal; /* pages reclaimed by kswapd */ + unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */ + unsigned long pageoutrun; /* kswapd's calls to page reclaim */ + unsigned long allocstall; /* direct reclaim calls */ + + unsigned long pgrotated; /* pages rotated to tail of the LRU */ + unsigned long nr_bounce; /* pages for bounce buffers */ +}; + +extern void get_page_state(struct page_state *ret); +extern void get_page_state_node(struct page_state *ret, int node); +extern void get_full_page_state(struct page_state *ret); +extern unsigned long read_page_state_offset(unsigned long offset); +extern void mod_page_state_offset(unsigned long offset, unsigned long delta); +extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); + +#define read_page_state(member) \ + read_page_state_offset(offsetof(struct page_state, member)) + +#define mod_page_state(member, delta) \ + mod_page_state_offset(offsetof(struct page_state, member), (delta)) + +#define __mod_page_state(member, delta) \ + __mod_page_state_offset(offsetof(struct page_state, member), (delta)) + +#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)) + +#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)) + +#define page_state(member) (*__page_state(offsetof(struct page_state, member))) + +#define state_zone_offset(zone, member) \ +({ \ + unsigned offset; \ + if (is_highmem(zone)) \ + offset = offsetof(struct page_state, member##_high); \ + else if (is_normal(zone)) \ + offset = offsetof(struct page_state, member##_normal); \ + else if (is_dma32(zone)) \ + offset = offsetof(struct page_state, member##_dma32); \ + else \ + offset = offsetof(struct page_state, member##_dma); \ + offset; \ +}) + +#define __mod_page_state_zone(zone, member, delta) \ + do { \ + __mod_page_state_offset(state_zone_offset(zone, member), (delta)); \ + } while (0) + +#define mod_page_state_zone(zone, member, delta) \ + do { \ + mod_page_state_offset(state_zone_offset(zone, member), (delta)); \ + } while (0) /* * Manipulation of page state flags @@ -122,14 +242,7 @@ #define TestClearPageReferenced(page) test_and_clear_bit(PG_referenced, &(page)->flags) #define PageUptodate(page) test_bit(PG_uptodate, &(page)->flags) -#ifdef CONFIG_S390 -#define SetPageUptodate(_page) \ - do { \ - struct page *__page = (_page); \ - if (!test_and_set_bit(PG_uptodate, &__page->flags)) \ - page_test_and_clear_dirty(_page); \ - } while (0) -#else +#ifndef SetPageUptodate #define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags) #endif #define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags) @@ -161,6 +274,10 @@ #define PageHighMem(page) 0 /* needed to optimize away at compile time */ #endif +#define PageChecked(page) test_bit(PG_checked, &(page)->flags) +#define SetPageChecked(page) set_bit(PG_checked, &(page)->flags) +#define ClearPageChecked(page) clear_bit(PG_checked, &(page)->flags) + #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) @@ -177,7 +294,7 @@ do { \ if (!test_and_set_bit(PG_writeback, \ &(page)->flags)) \ - inc_zone_page_state(page, NR_WRITEBACK); \ + inc_page_state(nr_writeback); \ } while (0) #define TestSetPageWriteback(page) \ ({ \ @@ -185,14 +302,14 @@ ret = test_and_set_bit(PG_writeback, \ &(page)->flags); \ if (!ret) \ - inc_zone_page_state(page, NR_WRITEBACK); \ + inc_page_state(nr_writeback); \ ret; \ }) #define ClearPageWriteback(page) \ do { \ if (test_and_clear_bit(PG_writeback, \ &(page)->flags)) \ - dec_zone_page_state(page, NR_WRITEBACK); \ + dec_page_state(nr_writeback); \ } while (0) #define TestClearPageWriteback(page) \ ({ \ @@ -200,7 +317,7 @@ ret = test_and_clear_bit(PG_writeback, \ &(page)->flags); \ if (ret) \ - dec_zone_page_state(page, NR_WRITEBACK); \ + dec_page_state(nr_writeback); \ ret; \ }) @@ -259,13 +376,4 @@ static inline void set_page_writeback(struct page *page) test_set_page_writeback(page); } -/* - * Filesystem-specific page bit testing - */ -#define PageFsMisc(page) test_bit(PG_fs_misc, &(page)->flags) -#define SetPageFsMisc(page) set_bit(PG_fs_misc, &(page)->flags) -#define TestSetPageFsMisc(page) test_and_set_bit(PG_fs_misc, &(page)->flags) -#define ClearPageFsMisc(page) clear_bit(PG_fs_misc, &(page)->flags) -#define TestClearPageFsMisc(page) test_and_clear_bit(PG_fs_misc, &(page)->flags) - #endif /* PAGE_FLAGS_H */ diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e77298b27..7a1af574d 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -99,13 +99,6 @@ extern struct page * read_cache_page(struct address_space *mapping, extern int read_cache_pages(struct address_space *mapping, struct list_head *pages, filler_t *filler, void *data); -static inline struct page *read_mapping_page(struct address_space *mapping, - unsigned long index, void *data) -{ - filler_t *filler = (filler_t *)mapping->a_ops->readpage; - return read_cache_page(mapping, index, filler, data); -} - int add_to_page_cache(struct page *page, struct address_space *mapping, unsigned long index, gfp_t gfp_mask); int add_to_page_cache_lru(struct page *page, struct address_space *mapping, @@ -113,6 +106,51 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping, extern void remove_from_page_cache(struct page *page); extern void __remove_from_page_cache(struct page *page); +extern atomic_t nr_pagecache; + +#ifdef CONFIG_SMP + +#define PAGECACHE_ACCT_THRESHOLD max(16, NR_CPUS * 2) +DECLARE_PER_CPU(long, nr_pagecache_local); + +/* + * pagecache_acct implements approximate accounting for pagecache. + * vm_enough_memory() do not need high accuracy. Writers will keep + * an offset in their per-cpu arena and will spill that into the + * global count whenever the absolute value of the local count + * exceeds the counter's threshold. + * + * MUST be protected from preemption. + * current protection is mapping->page_lock. + */ +static inline void pagecache_acct(int count) +{ + long *local; + + local = &__get_cpu_var(nr_pagecache_local); + *local += count; + if (*local > PAGECACHE_ACCT_THRESHOLD || *local < -PAGECACHE_ACCT_THRESHOLD) { + atomic_add(*local, &nr_pagecache); + *local = 0; + } +} + +#else + +static inline void pagecache_acct(int count) +{ + atomic_add(count, &nr_pagecache); +} +#endif + +static inline unsigned long get_page_cache_size(void) +{ + int ret = atomic_read(&nr_pagecache); + if (unlikely(ret < 0)) + ret = 0; + return ret; +} + /* * Return byte-offset into filesystem object for page. */ @@ -169,23 +207,6 @@ static inline void wait_on_page_writeback(struct page *page) extern void end_page_writeback(struct page *page); -/* - * permit installation of a state change monitor in the queue for a page - */ -extern void install_page_waitqueue_monitor(struct page *page, - wait_queue_t *monitor); - -/* - * Wait for filesystem-specific page synchronisation to complete - */ -static inline void wait_on_page_fs_misc(struct page *page) -{ - if (PageFsMisc(page)) - wait_on_page_bit(page, PG_fs_misc); -} - -extern void fastcall end_page_fs_misc(struct page *page); - /* * Fault a userspace page into pagetables. Return non-zero on a fault. * diff --git a/include/linux/parport.h b/include/linux/parport.h index 5bf321e82..008d736a6 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -96,6 +96,7 @@ typedef enum { /* The rest is for the kernel only */ #ifdef __KERNEL__ +#include #include #include #include @@ -127,10 +128,6 @@ struct amiga_parport_state { unsigned char statusdir;/* ciab.ddrb & 7 */ }; -struct ax88796_parport_state { - unsigned char cpr; -}; - struct ip32_parport_state { unsigned int dcr; unsigned int ecr; @@ -142,7 +139,6 @@ struct parport_state { /* ARC has no state. */ struct ax_parport_state ax; struct amiga_parport_state amiga; - struct ax88796_parport_state ax88796; /* Atari has not state. */ struct ip32_parport_state ip32; void *misc; diff --git a/include/linux/pci.h b/include/linux/pci.h index 8565b81d7..3a6a4e37a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -17,6 +17,8 @@ #ifndef LINUX_PCI_H #define LINUX_PCI_H +#include + /* Include the pci register defines */ #include @@ -44,9 +46,8 @@ #ifdef __KERNEL__ -#include - #include +#include #include #include #include @@ -161,11 +162,7 @@ struct pci_dev { unsigned int is_enabled:1; /* pci_enable_device has been called */ unsigned int is_busmaster:1; /* device is busmaster */ unsigned int no_msi:1; /* device may not use msi */ - unsigned int no_d1d2:1; /* only allow d0 or d3 */ unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ - unsigned int broken_parity_status:1; /* Device generates false positive parity */ - unsigned int msi_enabled:1; - unsigned int msix_enabled:1; u32 saved_config_space[16]; /* config space saved at suspend time */ struct hlist_head saved_cap_space; @@ -405,8 +402,8 @@ int pcibios_enable_device(struct pci_dev *, int mask); char *pcibios_setup (char *str); /* Used only when drivers/pci/setup.c is used */ -void pcibios_align_resource(void *, struct resource *, resource_size_t, - resource_size_t); +void pcibios_align_resource(void *, struct resource *, + unsigned long, unsigned long); void pcibios_update_irq(struct pci_dev *, int irq); /* Generic PCI functions used internally */ @@ -445,7 +442,6 @@ struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int devic struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); -int pci_find_ext_capability (struct pci_dev *dev, int cap); struct pci_bus * pci_find_next_bus(const struct pci_bus *from); struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); @@ -500,7 +496,6 @@ int pci_set_dma_mask(struct pci_dev *dev, u64 mask); int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); int pci_assign_resource(struct pci_dev *dev, int i); -int pci_assign_resource_fixed(struct pci_dev *dev, int i); void pci_restore_bars(struct pci_dev *dev); /* ROM control related routines */ @@ -533,10 +528,10 @@ void pci_release_region(struct pci_dev *, int); /* drivers/pci/bus.c */ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, - resource_size_t size, resource_size_t align, - resource_size_t min, unsigned int type_mask, + unsigned long size, unsigned long align, + unsigned long min, unsigned int type_mask, void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), + unsigned long, unsigned long), void *alignf_data); void pci_enable_bridges(struct pci_bus *bus); @@ -667,7 +662,6 @@ static inline int pci_register_driver(struct pci_driver *drv) { return 0;} static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } -static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } /* Power management related routines */ @@ -731,8 +725,7 @@ static inline char *pci_name(struct pci_dev *pdev) */ #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, - const struct resource *rsrc, resource_size_t *start, - resource_size_t *end) + const struct resource *rsrc, u64 *start, u64 *end) { *start = rsrc->start; *end = rsrc->end; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7a249155e..2bd4cbafc 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -352,11 +352,8 @@ #define PCI_DEVICE_ID_ATI_RS480 0x5950 /* ATI IXP Chipset */ #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 -#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 -#define PCI_DEVICE_ID_ATI_IXP300_SMBUS 0x4363 #define PCI_DEVICE_ID_ATI_IXP300_IDE 0x4369 #define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e -#define PCI_DEVICE_ID_ATI_IXP400_SMBUS 0x4372 #define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376 #define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379 #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a @@ -648,8 +645,6 @@ #define PCI_DEVICE_ID_SI_962 0x0962 #define PCI_DEVICE_ID_SI_963 0x0963 #define PCI_DEVICE_ID_SI_965 0x0965 -#define PCI_DEVICE_ID_SI_966 0x0966 -#define PCI_DEVICE_ID_SI_968 0x0968 #define PCI_DEVICE_ID_SI_5511 0x5511 #define PCI_DEVICE_ID_SI_5513 0x5513 #define PCI_DEVICE_ID_SI_5517 0x5517 @@ -730,9 +725,7 @@ #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 #define PCI_DEVICE_ID_TI_4450 0x8011 #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 -#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 #define PCI_DEVICE_ID_TI_X515 0x8036 -#define PCI_DEVICE_ID_TI_XX12 0x8039 #define PCI_DEVICE_ID_TI_1130 0xac12 #define PCI_DEVICE_ID_TI_1031 0xac13 #define PCI_DEVICE_ID_TI_1131 0xac15 @@ -855,12 +848,7 @@ #define PCI_VENDOR_ID_QLOGIC 0x1077 -#define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016 #define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 -#define PCI_DEVICE_ID_QLOGIC_ISP1080 0x1080 -#define PCI_DEVICE_ID_QLOGIC_ISP12160 0x1216 -#define PCI_DEVICE_ID_QLOGIC_ISP1240 0x1240 -#define PCI_DEVICE_ID_QLOGIC_ISP1280 0x1280 #define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 #define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 #define PCI_DEVICE_ID_QLOGIC_ISP2300 0x2300 @@ -947,7 +935,6 @@ #define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 #define PCI_DEVICE_ID_PLX_R753 0x1152 #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 -#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 #define PCI_DEVICE_ID_PLX_9050 0x9050 #define PCI_DEVICE_ID_PLX_9080 0x9080 #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 @@ -1000,6 +987,13 @@ #define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 #define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 +#define PCI_VENDOR_ID_ASP 0x10cd +#define PCI_DEVICE_ID_ASP_1200A 0x1100 +#define PCI_DEVICE_ID_ASP_ABP940 0x1200 +#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 +#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 +#define PCI_DEVICE_ID_38C0800_REV1 0x2500 +#define PCI_DEVICE_ID_38C1600_REV1 0x2700 #define PCI_VENDOR_ID_TCONRAD 0x10da #define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 @@ -1030,7 +1024,6 @@ #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 -#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 @@ -1140,11 +1133,9 @@ #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS 0x0264 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F @@ -1198,19 +1189,6 @@ #define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E #define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372 #define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 -#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5 -#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC -#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE -#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 -#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 -#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 -#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 -#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453 #define PCI_VENDOR_ID_IMS 0x10e0 #define PCI_DEVICE_ID_IMS_TT128 0x9128 @@ -1294,7 +1272,6 @@ #define PCI_DEVICE_ID_VIA_8367_0 0x3099 #define PCI_DEVICE_ID_VIA_8653_0 0x3101 #define PCI_DEVICE_ID_VIA_8622 0x3102 -#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109 #define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_XM266 0x3116 @@ -1446,7 +1423,6 @@ #define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 #define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 #define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 -#define PCI_DEVICE_ID_RICOH_R5C822 0x0822 #define PCI_VENDOR_ID_DLINK 0x1186 #define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00 @@ -1729,9 +1705,6 @@ #define PCI_VENDOR_ID_DOMEX 0x134a #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 -#define PCI_VENDOR_ID_INTASHIELD 0x135a -#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 - #define PCI_VENDOR_ID_QUATECH 0x135C #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 #define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 @@ -1864,7 +1837,6 @@ #define PCI_VENDOR_ID_SAMSUNG 0x144d -#define PCI_VENDOR_ID_MYRICOM 0x14c1 #define PCI_VENDOR_ID_TITAN 0x14D2 #define PCI_DEVICE_ID_TITAN_010L 0x8001 @@ -1925,7 +1897,6 @@ #define PCI_DEVICE_ID_TIGON3_5751F 0x167e #define PCI_DEVICE_ID_TIGON3_5787M 0x1693 #define PCI_DEVICE_ID_TIGON3_5782 0x1696 -#define PCI_DEVICE_ID_TIGON3_5786 0x169a #define PCI_DEVICE_ID_TIGON3_5787 0x169b #define PCI_DEVICE_ID_TIGON3_5788 0x169c #define PCI_DEVICE_ID_TIGON3_5789 0x169d @@ -1974,7 +1945,6 @@ #define PCI_VENDOR_ID_MELLANOX 0x15b3 #define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44 -#define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE 0x5a46 #define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278 #define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282 #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c @@ -1998,9 +1968,6 @@ #define PCI_VENDOR_ID_NETCELL 0x169c #define PCI_DEVICE_ID_REVOLUTION 0x0044 -#define PCI_VENDOR_ID_VITESSE 0x1725 -#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174 - #define PCI_VENDOR_ID_LINKSYS 0x1737 #define PCI_DEVICE_ID_LINKSYS_EG1064 0x1064 @@ -2025,13 +1992,6 @@ #define PCI_VENDOR_ID_TDI 0x192E #define PCI_DEVICE_ID_TDI_EHCI 0x0101 -#define PCI_VENDOR_ID_JMICRON 0x197B -#define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 -#define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 -#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363 -#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 -#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 -#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 #define PCI_VENDOR_ID_TEKRAM 0x1de1 #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 @@ -2093,7 +2053,6 @@ #define PCI_DEVICE_ID_INTEL_80960_RP 0x1960 #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 -#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 #define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 #define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 @@ -2148,7 +2107,6 @@ #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 #define PCI_DEVICE_ID_INTEL_82860_HB 0x2531 -#define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c #define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560 #define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562 #define PCI_DEVICE_ID_INTEL_82865_HB 0x2570 diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 96930cb59..d27a78b71 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h @@ -197,7 +197,6 @@ #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ #define PCI_CAP_ID_HT_IRQCONF 0x08 /* HyperTransport IRQ Configuration */ -#define PCI_CAP_ID_VNDR 0x09 /* Vendor specific capability */ #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ @@ -422,23 +421,7 @@ #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ -/* Correctable Err Reporting Enable */ -#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 -/* Non-fatal Err Reporting Enable */ -#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 -/* Fatal Err Reporting Enable */ -#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 #define PCI_ERR_ROOT_STATUS 48 -#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ -/* Multi ERR_COR Received */ -#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 -/* ERR_FATAL/NONFATAL Recevied */ -#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 -/* Multi ERR_FATAL/NONFATAL Recevied */ -#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 -#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */ -#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ -#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ #define PCI_ERR_ROOT_COR_SRC 52 #define PCI_ERR_ROOT_SRC 54 diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index f5aa593cc..682525511 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h @@ -6,18 +6,18 @@ * WARNING: these things are HUGE. 4 kbytes per counter on 32-way P4. */ +#include #include #include #include #include -#include #ifdef CONFIG_SMP struct percpu_counter { spinlock_t lock; - s64 count; - s32 *counters; + long count; + long *counters; }; #if NR_CPUS >= 16 @@ -26,11 +26,11 @@ struct percpu_counter { #define FBC_BATCH (NR_CPUS*4) #endif -static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount) +static inline void percpu_counter_init(struct percpu_counter *fbc) { spin_lock_init(&fbc->lock); - fbc->count = amount; - fbc->counters = alloc_percpu(s32); + fbc->count = 0; + fbc->counters = alloc_percpu(long); } static inline void percpu_counter_destroy(struct percpu_counter *fbc) @@ -38,10 +38,10 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc) free_percpu(fbc->counters); } -void percpu_counter_mod(struct percpu_counter *fbc, s32 amount); -s64 percpu_counter_sum(struct percpu_counter *fbc); +void percpu_counter_mod(struct percpu_counter *fbc, long amount); +long percpu_counter_sum(struct percpu_counter *fbc); -static inline s64 percpu_counter_read(struct percpu_counter *fbc) +static inline long percpu_counter_read(struct percpu_counter *fbc) { return fbc->count; } @@ -49,14 +49,13 @@ static inline s64 percpu_counter_read(struct percpu_counter *fbc) /* * It is possible for the percpu_counter_read() to return a small negative * number for some counter which should never be negative. - * */ -static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc) +static inline long percpu_counter_read_positive(struct percpu_counter *fbc) { - s64 ret = fbc->count; + long ret = fbc->count; barrier(); /* Prevent reloads of fbc->count */ - if (ret >= 0) + if (ret > 0) return ret; return 1; } @@ -64,12 +63,12 @@ static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc) #else struct percpu_counter { - s64 count; + long count; }; -static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount) +static inline void percpu_counter_init(struct percpu_counter *fbc) { - fbc->count = amount; + fbc->count = 0; } static inline void percpu_counter_destroy(struct percpu_counter *fbc) @@ -77,24 +76,24 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc) } static inline void -percpu_counter_mod(struct percpu_counter *fbc, s32 amount) +percpu_counter_mod(struct percpu_counter *fbc, long amount) { preempt_disable(); fbc->count += amount; preempt_enable(); } -static inline s64 percpu_counter_read(struct percpu_counter *fbc) +static inline long percpu_counter_read(struct percpu_counter *fbc) { return fbc->count; } -static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc) +static inline long percpu_counter_read_positive(struct percpu_counter *fbc) { return fbc->count; } -static inline s64 percpu_counter_sum(struct percpu_counter *fbc) +static inline long percpu_counter_sum(struct percpu_counter *fbc) { return percpu_counter_read_positive(fbc); } diff --git a/include/linux/pfn.h b/include/linux/pfn.h index d2aace0e2..ba2a86677 100644 --- a/include/linux/pfn.h +++ b/include/linux/pfn.h @@ -4,10 +4,6 @@ #define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK) #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) -#if defined(CONFIG_X86_XEN) && defined(CONFIG_X86_PAE) #define PFN_PHYS(x) ((unsigned long long)(x) << PAGE_SHIFT) -#else -#define PFN_PHYS(x) ((x) << PAGE_SHIFT) -#endif #endif diff --git a/include/linux/phy.h b/include/linux/phy.h index 9447a57ee..331521a10 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -378,7 +378,6 @@ int phy_mii_ioctl(struct phy_device *phydev, struct mii_ioctl_data *mii_data, int cmd); int phy_start_interrupts(struct phy_device *phydev); void phy_print_status(struct phy_device *phydev); -struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); extern struct bus_type mdio_bus_type; #endif /* __PHY_H */ diff --git a/include/linux/pid.h b/include/linux/pid.h index d4a9f83ac..29960b03b 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -8,8 +8,7 @@ enum pid_type PIDTYPE_PID, PIDTYPE_PGID, PIDTYPE_SID, - PIDTYPE_MAX, - PIDTYPE_REALPID + PIDTYPE_MAX }; /* diff --git a/include/linux/plist.h b/include/linux/plist.h deleted file mode 100644 index b95818a03..000000000 --- a/include/linux/plist.h +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Descending-priority-sorted double-linked list - * - * (C) 2002-2003 Intel Corp - * Inaky Perez-Gonzalez . - * - * 2001-2005 (c) MontaVista Software, Inc. - * Daniel Walker - * - * (C) 2005 Thomas Gleixner - * - * Simplifications of the original code by - * Oleg Nesterov - * - * Licensed under the FSF's GNU Public License v2 or later. - * - * Based on simple lists (include/linux/list.h). - * - * This is a priority-sorted list of nodes; each node has a - * priority from INT_MIN (highest) to INT_MAX (lowest). - * - * Addition is O(K), removal is O(1), change of priority of a node is - * O(K) and K is the number of RT priority levels used in the system. - * (1 <= K <= 99) - * - * This list is really a list of lists: - * - * - The tier 1 list is the prio_list, different priority nodes. - * - * - The tier 2 list is the node_list, serialized nodes. - * - * Simple ASCII art explanation: - * - * |HEAD | - * | | - * |prio_list.prev|<------------------------------------| - * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-| - * |10 | |10| |21| |21| |21| |40| (prio) - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| - * |node_list.prev|<------------------------------------| - * - * The nodes on the prio_list list are sorted by priority to simplify - * the insertion of new nodes. There are no nodes with duplicate - * priorites on the list. - * - * The nodes on the node_list is ordered by priority and can contain - * entries which have the same priority. Those entries are ordered - * FIFO - * - * Addition means: look for the prio_list node in the prio_list - * for the priority of the node and insert it before the node_list - * entry of the next prio_list node. If it is the first node of - * that priority, add it to the prio_list in the right position and - * insert it into the serialized node_list list - * - * Removal means remove it from the node_list and remove it from - * the prio_list if the node_list list_head is non empty. In case - * of removal from the prio_list it must be checked whether other - * entries of the same priority are on the list or not. If there - * is another entry of the same priority then this entry has to - * replace the removed entry on the prio_list. If the entry which - * is removed is the only entry of this priority then a simple - * remove from both list is sufficient. - * - * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX - * is lowest priority. - * - * No locking is done, up to the caller. - * - */ -#ifndef _LINUX_PLIST_H_ -#define _LINUX_PLIST_H_ - -#include -#include -#include - -struct plist_head { - struct list_head prio_list; - struct list_head node_list; -#ifdef CONFIG_DEBUG_PI_LIST - spinlock_t *lock; -#endif -}; - -struct plist_node { - int prio; - struct plist_head plist; -}; - -#ifdef CONFIG_DEBUG_PI_LIST -# define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock -#else -# define PLIST_HEAD_LOCK_INIT(_lock) -#endif - -/** - * #PLIST_HEAD_INIT - static struct plist_head initializer - * - * @head: struct plist_head variable name - */ -#define PLIST_HEAD_INIT(head, _lock) \ -{ \ - .prio_list = LIST_HEAD_INIT((head).prio_list), \ - .node_list = LIST_HEAD_INIT((head).node_list), \ - PLIST_HEAD_LOCK_INIT(&(_lock)) \ -} - -/** - * #PLIST_NODE_INIT - static struct plist_node initializer - * - * @node: struct plist_node variable name - * @__prio: initial node priority - */ -#define PLIST_NODE_INIT(node, __prio) \ -{ \ - .prio = (__prio), \ - .plist = PLIST_HEAD_INIT((node).plist, NULL), \ -} - -/** - * plist_head_init - dynamic struct plist_head initializer - * - * @head: &struct plist_head pointer - */ -static inline void -plist_head_init(struct plist_head *head, spinlock_t *lock) -{ - INIT_LIST_HEAD(&head->prio_list); - INIT_LIST_HEAD(&head->node_list); -#ifdef CONFIG_DEBUG_PI_LIST - head->lock = lock; -#endif -} - -/** - * plist_node_init - Dynamic struct plist_node initializer - * - * @node: &struct plist_node pointer - * @prio: initial node priority - */ -static inline void plist_node_init(struct plist_node *node, int prio) -{ - node->prio = prio; - plist_head_init(&node->plist, NULL); -} - -extern void plist_add(struct plist_node *node, struct plist_head *head); -extern void plist_del(struct plist_node *node, struct plist_head *head); - -/** - * plist_for_each - iterate over the plist - * - * @pos1: the type * to use as a loop counter. - * @head: the head for your list. - */ -#define plist_for_each(pos, head) \ - list_for_each_entry(pos, &(head)->node_list, plist.node_list) - -/** - * plist_for_each_entry_safe - iterate over a plist of given type safe - * against removal of list entry - * - * @pos1: the type * to use as a loop counter. - * @n1: another type * to use as temporary storage - * @head: the head for your list. - */ -#define plist_for_each_safe(pos, n, head) \ - list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) - -/** - * plist_for_each_entry - iterate over list of given type - * - * @pos: the type * to use as a loop counter. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define plist_for_each_entry(pos, head, mem) \ - list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) - -/** - * plist_for_each_entry_safe - iterate over list of given type safe against - * removal of list entry - * - * @pos: the type * to use as a loop counter. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @m: the name of the list_struct within the struct. - */ -#define plist_for_each_entry_safe(pos, n, head, m) \ - list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) - -/** - * plist_head_empty - return !0 if a plist_head is empty - * - * @head: &struct plist_head pointer - */ -static inline int plist_head_empty(const struct plist_head *head) -{ - return list_empty(&head->node_list); -} - -/** - * plist_node_empty - return !0 if plist_node is not on a list - * - * @node: &struct plist_node pointer - */ -static inline int plist_node_empty(const struct plist_node *node) -{ - return plist_head_empty(&node->plist); -} - -/* All functions below assume the plist_head is not empty. */ - -/** - * plist_first_entry - get the struct for the first entry - * - * @ptr: the &struct plist_head pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list_struct within the struct. - */ -#ifdef CONFIG_DEBUG_PI_LIST -# define plist_first_entry(head, type, member) \ -({ \ - WARN_ON(plist_head_empty(head)); \ - container_of(plist_first(head), type, member); \ -}) -#else -# define plist_first_entry(head, type, member) \ - container_of(plist_first(head), type, member) -#endif - -/** - * plist_first - return the first node (and thus, highest priority) - * - * @head: the &struct plist_head pointer - * - * Assumes the plist is _not_ empty. - */ -static inline struct plist_node* plist_first(const struct plist_head *head) -{ - return list_entry(head->node_list.next, - struct plist_node, plist.node_list); -} - -#endif diff --git a/include/linux/pm.h b/include/linux/pm.h index 658c1b93d..66be58902 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -23,6 +23,7 @@ #ifdef __KERNEL__ +#include #include #include diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 514729a44..008932d73 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h @@ -1,6 +1,7 @@ #ifndef __LINUX_PM_LEGACY_H__ #define __LINUX_PM_LEGACY_H__ +#include #ifdef CONFIG_PM_LEGACY @@ -14,6 +15,11 @@ extern int pm_active; struct pm_dev __deprecated * pm_register(pm_dev_t type, unsigned long id, pm_callback callback); +/* + * Unregister all devices with matching callback + */ +void __deprecated pm_unregister_all(pm_callback callback); + /* * Send a request to all devices */ @@ -30,6 +36,8 @@ static inline struct pm_dev *pm_register(pm_dev_t type, return NULL; } +static inline void pm_unregister_all(pm_callback callback) {} + static inline int pm_send_all(pm_request_t rqst, void *data) { return 0; diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 783177387..217d3daf7 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h @@ -6,6 +6,7 @@ * Copyright (C) 1998 Paul Mackerras. */ +#include #define PMU_DRIVER_VERSION 2 @@ -230,7 +231,4 @@ extern int pmu_battery_count; extern struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES]; extern unsigned int pmu_power_flags; -/* Backlight */ -extern void pmu_backlight_init(void); - #endif /* __KERNEL__ */ diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d..93b0959eb 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -389,8 +389,7 @@ int pnp_start_dev(struct pnp_dev *dev); int pnp_stop_dev(struct pnp_dev *dev); int pnp_activate_dev(struct pnp_dev *dev); int pnp_disable_dev(struct pnp_dev *dev); -void pnp_resource_change(struct resource *resource, resource_size_t start, - resource_size_t size); +void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); /* protocol helpers */ int pnp_is_active(struct pnp_dev * dev); @@ -435,9 +434,7 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } -static inline void pnp_resource_change(struct resource *resource, - resource_size_t start, - resource_size_t size) { } +static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } /* protocol helpers */ static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } diff --git a/include/linux/poison.h b/include/linux/poison.h deleted file mode 100644 index 3e628f990..000000000 --- a/include/linux/poison.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef _LINUX_POISON_H -#define _LINUX_POISON_H - -/********** include/linux/list.h **********/ -/* - * These are non-NULL pointers that will result in page faults - * under normal circumstances, used to verify that nobody uses - * non-initialized list entries. - */ -#define LIST_POISON1 ((void *) 0x00100100) -#define LIST_POISON2 ((void *) 0x00200200) - -/********** mm/slab.c **********/ -/* - * Magic nums for obj red zoning. - * Placed in the first word before and the first word after an obj. - */ -#define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ -#define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ - -/* ...and for poisoning */ -#define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ -#define POISON_FREE 0x6b /* for use-after-free poisoning */ -#define POISON_END 0xa5 /* end-byte of poisoning */ - -/********** arch/$ARCH/mm/init.c **********/ -#define POISON_FREE_INITMEM 0xcc - -/********** arch/x86_64/mm/init.c **********/ -#define POISON_FREE_INITDATA 0xba - -/********** arch/ia64/hp/common/sba_iommu.c **********/ -/* - * arch/ia64/hp/common/sba_iommu.c uses a 16-byte poison string with a - * value of "SBAIOMMU POISON\0" for spill-over poisoning. - */ - -/********** fs/jbd/journal.c **********/ -#define JBD_POISON_FREE 0x5b - -/********** drivers/base/dmapool.c **********/ -#define POOL_POISON_FREED 0xa7 /* !inuse */ -#define POOL_POISON_ALLOCATED 0xa9 /* !initted */ - -/********** drivers/atm/ **********/ -#define ATM_POISON_FREE 0x12 -#define ATM_POISON 0xdeadbeef - -/********** net/ **********/ -#define NEIGHBOR_DEAD 0xdeadbeef -#define NETFILTER_LINK_POISON 0xdead57ac - -/********** kernel/mutexes **********/ -#define MUTEX_DEBUG_INIT 0x11 -#define MUTEX_DEBUG_FREE 0x22 - -/********** security/ **********/ -#define KEY_DESTROY 0xbd - -/********** sound/oss/ **********/ -#define OSS_POISON_FREE 0xAB - -#endif diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h index c6b13ff85..402056cd0 100644 --- a/include/linux/ppp_defs.h +++ b/include/linux/ppp_defs.h @@ -42,6 +42,8 @@ #ifndef _PPP_DEFS_H_ #define _PPP_DEFS_H_ +#include + /* * The basic PPP frame. */ @@ -95,11 +97,7 @@ #define PPP_INITFCS 0xffff /* Initial FCS value */ #define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ - -#ifdef __KERNEL__ -#include #define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c) -#endif /* * Extended asyncmap - allows any character to be escaped. @@ -181,4 +179,12 @@ struct ppp_idle { time_t recv_idle; /* time since last NP packet received */ }; +#ifndef __P +#ifdef __STDC__ +#define __P(x) x +#else +#define __P(x) () +#endif +#endif + #endif /* _PPP_DEFS_H_ */ diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 52a9be412..bf022c43a 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h @@ -52,11 +52,4 @@ #define PR_SET_NAME 15 /* Set process name */ #define PR_GET_NAME 16 /* Get process name */ -/* Get/set process endian */ -#define PR_GET_ENDIAN 19 -#define PR_SET_ENDIAN 20 -# define PR_ENDIAN_BIG 0 -# define PR_ENDIAN_LITTLE 1 /* True little endian mode */ -# define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */ - #endif /* _LINUX_PRCTL_H */ diff --git a/include/linux/preempt.h b/include/linux/preempt.h index d0926d634..5769d14d1 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -6,6 +6,7 @@ * preempt_count (used for kernel preemption, interrupt count, etc.) */ +#include #include #include diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 0c4d76055..0713dc555 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -1,6 +1,7 @@ #ifndef _LINUX_PROC_FS_H #define _LINUX_PROC_FS_H +#include #include #include #include @@ -100,8 +101,9 @@ extern void proc_misc_init(void); struct mm_struct; -void proc_flush_task(struct task_struct *task); struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); +struct dentry *proc_pid_unhash(struct task_struct *p); +void proc_pid_flush(struct dentry *proc_dentry); int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); unsigned long task_vsize(struct mm_struct *); int task_statm(struct mm_struct *, int *, int *, int *, int *); @@ -211,7 +213,8 @@ static inline void proc_net_remove(const char *name) #define proc_net_create(name, mode, info) ({ (void)(mode), NULL; }) static inline void proc_net_remove(const char *name) {} -static inline void proc_flush_task(struct task_struct *task) { } +static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; } +static inline void proc_pid_flush(struct dentry *proc_dentry) { } static inline struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent) { return NULL; } @@ -247,9 +250,9 @@ extern void kclist_add(struct kcore_list *, void *, size_t); #endif struct proc_inode { - struct pid *pid; + struct task_struct *task; + int type; int vx_flags; - int fd; union { int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); int (*proc_read)(struct task_struct *task, char *page); @@ -269,10 +272,4 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode) return PROC_I(inode)->pde; } -struct proc_maps_private { - struct pid *pid; - struct task_struct *task; - struct vm_area_struct *tail_vma; -}; - #endif /* _LINUX_PROC_FS_H */ diff --git a/include/linux/profile.h b/include/linux/profile.h index e633004ae..1f2fea664 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h @@ -4,6 +4,7 @@ #ifdef __KERNEL__ #include +#include #include #include #include diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 8508b83ea..578c28e50 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -51,10 +51,6 @@ #ifdef __KERNEL__ /* * Ptrace flags - * - * The owner ship rules for task->ptrace which holds the ptrace - * flags is simple. When a task is running it owns it's task->ptrace - * flags. When the a task is stopped the ptracer owns task->ptrace. */ #define PT_PTRACED 0x00000001 @@ -88,6 +84,7 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); extern int ptrace_attach(struct task_struct *tsk); extern int ptrace_detach(struct task_struct *, unsigned int); +extern void __ptrace_detach(struct task_struct *, unsigned int); extern void ptrace_disable(struct task_struct *); extern int ptrace_check_attach(struct task_struct *task, int kill); extern int ptrace_request(struct task_struct *child, long request, long addr, long data); diff --git a/include/linux/quota.h b/include/linux/quota.h index b8fbf26eb..2dab71e1c 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -37,6 +37,8 @@ #include #include +#include +#include #define __DQUOT_VERSION__ "dquot_6.5.1" #define __DQUOT_NUM_VERSION__ 6*10000+5*100+1 @@ -131,8 +133,6 @@ struct if_dqinfo { }; #ifdef __KERNEL__ -#include -#include #include #include diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 5110201a4..21e5a9124 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h @@ -10,6 +10,7 @@ #ifndef _LINUX_QUOTAOPS_ #define _LINUX_QUOTAOPS_ +#include #include #include diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 9158a6814..dd83cca28 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -23,9 +23,6 @@ #include #include -#define RADIX_TREE_MAX_TAGS 2 - -/* root tags are stored in gfp_mask, shifted by __GFP_BITS_SHIFT */ struct radix_tree_root { unsigned int height; gfp_t gfp_mask; @@ -48,6 +45,8 @@ do { \ (root)->rnode = NULL; \ } while (0) +#define RADIX_TREE_MAX_TAGS 2 + int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); void *radix_tree_lookup(struct radix_tree_root *, unsigned long); void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long); diff --git a/include/linux/raid/Kbuild b/include/linux/raid/Kbuild deleted file mode 100644 index 2415a64c5..000000000 --- a/include/linux/raid/Kbuild +++ /dev/null @@ -1,2 +0,0 @@ -header-y += md_p.h -header-y += md_u.h diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 63df898fe..899437802 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h @@ -140,7 +140,6 @@ typedef __u16 bitmap_counter_t; enum bitmap_state { BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */ - BITMAP_WRITE_ERROR = 0x004, /* A write error has occurred */ BITMAP_HOSTENDIAN = 0x8000, }; @@ -245,9 +244,15 @@ struct bitmap { unsigned long daemon_lastrun; /* jiffies of last run */ unsigned long daemon_sleep; /* how many seconds between updates? */ - atomic_t pending_writes; /* pending writes to the bitmap file */ + /* + * bitmap_writeback_daemon waits for file-pages that have been written, + * as there is no way to get a call-back when a page write completes. + */ + mdk_thread_t *writeback_daemon; + spinlock_t write_lock; wait_queue_head_t write_wait; - + struct list_head complete_pages; + mempool_t *write_pool; }; /* the bitmap API */ diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h index ba15469da..7eaf290e1 100644 --- a/include/linux/raid/linear.h +++ b/include/linux/raid/linear.h @@ -13,10 +13,8 @@ typedef struct dev_info dev_info_t; struct linear_private_data { - struct linear_private_data *prev; /* earlier version */ dev_info_t **hash_table; sector_t hash_spacing; - sector_t array_size; int preshift; /* shift before dividing by hash_spacing */ dev_info_t disks[0]; }; diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index eb3e547c8..66b44e5e0 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -85,6 +85,8 @@ extern void md_done_sync(mddev_t *mddev, int blocks, int ok); extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); extern void md_unplug_mddev(mddev_t *mddev); +extern void md_print_devices (void); + extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, sector_t sector, int size, struct page *page); extern void md_super_wait(mddev_t *mddev); @@ -95,5 +97,7 @@ extern void md_new_event(mddev_t *mddev); extern void md_update_sb(mddev_t * mddev); +#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } + #endif diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index d28890295..e2df61f5b 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -40,8 +40,7 @@ typedef struct mdk_rdev_s mdk_rdev_t; * options passed in raidrun: */ -/* Currently this must fix in an 'int' */ -#define MAX_CHUNK_SIZE (1<<30) +#define MAX_CHUNK_SIZE (4096*1024) /* * MD's 'extended' device @@ -58,7 +57,6 @@ struct mdk_rdev_s struct page *sb_page; int sb_loaded; - __u64 sb_events; sector_t data_offset; /* start of data in array */ sector_t sb_offset; int sb_size; /* bytes in the superblock */ @@ -89,10 +87,6 @@ struct mdk_rdev_s * array and could again if we did a partial * resync from the bitmap */ - sector_t recovery_offset;/* If this device has been partially - * recovered, this is where we were - * up to. - */ atomic_t nr_pending; /* number of pending requests. * only maintained for arrays that @@ -148,10 +142,9 @@ struct mddev_s struct mdk_thread_s *thread; /* management thread */ struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ - sector_t curr_resync; /* last block scheduled */ + sector_t curr_resync; /* blocks scheduled */ unsigned long resync_mark; /* a recent timestamp */ sector_t resync_mark_cnt;/* blocks written at resync_mark */ - sector_t curr_mark_cnt; /* blocks scheduled now */ sector_t resync_max_sectors; /* may be set by personality */ @@ -189,8 +182,6 @@ struct mddev_s #define MD_RECOVERY_REQUESTED 6 #define MD_RECOVERY_CHECK 7 #define MD_RECOVERY_RESHAPE 8 -#define MD_RECOVERY_FROZEN 9 - unsigned long recovery; int in_sync; /* know to not need resync */ diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index b6ebc69ba..f1fbae7e3 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h @@ -265,12 +265,9 @@ struct mdp_superblock_1 { /* feature_map bits */ #define MD_FEATURE_BITMAP_OFFSET 1 -#define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and - * must be honoured - */ #define MD_FEATURE_RESHAPE_ACTIVE 4 -#define MD_FEATURE_ALL (1|2|4) +#define MD_FEATURE_ALL 5 #endif diff --git a/include/linux/raid/raid10.h b/include/linux/raid/raid10.h index c41e56a7c..b1103298a 100644 --- a/include/linux/raid/raid10.h +++ b/include/linux/raid/raid10.h @@ -24,16 +24,11 @@ struct r10_private_data_s { int far_copies; /* number of copies layed out * at large strides across drives */ - int far_offset; /* far_copies are offset by 1 stripe - * instead of many - */ int copies; /* near_copies * far_copies. * must be <= raid_disks */ sector_t stride; /* distance between far copies. - * This is size / far_copies unless - * far_offset, in which case it is - * 1 stripe. + * This is size / far_copies */ int chunk_shift; /* shift from chunks to sectors */ diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 20ed4c997..914af6670 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h @@ -212,7 +212,6 @@ struct raid5_private_data { mddev_t *mddev; struct disk_info *spare; int chunk_size, level, algorithm; - int max_degraded; int raid_disks, working_disks, failed_disks; int max_nr_stripes; diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 00b340ba6..78ecfa28b 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h @@ -2,8 +2,8 @@ #define _LINUX_RAMFS_H struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev); -extern int ramfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt); +struct super_block *ramfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data); #ifndef CONFIG_MMU extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 8d5382e62..4b7cc4fe3 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h @@ -99,43 +99,22 @@ static inline struct page * rb_insert_page_cache(struct inode * inode, struct rb_node { - unsigned long rb_parent_color; + struct rb_node *rb_parent; + int rb_color; #define RB_RED 0 #define RB_BLACK 1 struct rb_node *rb_right; struct rb_node *rb_left; -} __attribute__((aligned(sizeof(long)))); - /* The alignment might seem pointless, but allegedly CRIS needs it */ +}; struct rb_root { struct rb_node *rb_node; }; - -#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) -#define rb_color(r) ((r)->rb_parent_color & 1) -#define rb_is_red(r) (!rb_color(r)) -#define rb_is_black(r) rb_color(r) -#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) -#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) - -static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) -{ - rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; -} -static inline void rb_set_color(struct rb_node *rb, int color) -{ - rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; -} - #define RB_ROOT (struct rb_root) { NULL, } #define rb_entry(ptr, type, member) container_of(ptr, type, member) -#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) -#define RB_EMPTY_NODE(node) (rb_parent(node) != node) -#define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) - extern void rb_insert_color(struct rb_node *, struct rb_root *); extern void rb_erase(struct rb_node *, struct rb_root *); @@ -152,7 +131,8 @@ extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, struct rb_node ** rb_link) { - node->rb_parent_color = (unsigned long )parent; + node->rb_parent = parent; + node->rb_color = RB_RED; node->rb_left = node->rb_right = NULL; *rb_link = node; diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index b4ca73d65..970284f57 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -163,22 +163,14 @@ extern int rcu_needs_cpu(int cpu); * * It is illegal to block while in an RCU read-side critical section. */ -#define rcu_read_lock() \ - do { \ - preempt_disable(); \ - __acquire(RCU); \ - } while(0) +#define rcu_read_lock() preempt_disable() /** * rcu_read_unlock - marks the end of an RCU read-side critical section. * * See rcu_read_lock() for more information. */ -#define rcu_read_unlock() \ - do { \ - __release(RCU); \ - preempt_enable(); \ - } while(0) +#define rcu_read_unlock() preempt_enable() /* * So where is rcu_write_lock()? It does not exist, as there is no @@ -201,22 +193,14 @@ extern int rcu_needs_cpu(int cpu); * can use just rcu_read_lock(). * */ -#define rcu_read_lock_bh() \ - do { \ - local_bh_disable(); \ - __acquire(RCU_BH); \ - } while(0) +#define rcu_read_lock_bh() local_bh_disable() /* * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section * * See rcu_read_lock_bh() for more information. */ -#define rcu_read_unlock_bh() \ - do { \ - __release(RCU_BH); \ - local_bh_enable(); \ - } while(0) +#define rcu_read_unlock_bh() local_bh_enable() /** * rcu_dereference - fetch an RCU-protected pointer in an @@ -262,7 +246,7 @@ extern int rcu_needs_cpu(int cpu); * softirq handlers will have completed, since in some kernels, these * handlers can run in process context, and can block. * - * This primitive provides the guarantees made by the (now removed) + * This primitive provides the guarantees made by the (deprecated) * synchronize_kernel() API. In contrast, synchronize_rcu() only * guarantees that rcu_read_lock() sections will have completed. * In "classic RCU", these two guarantees happen to be one and @@ -274,13 +258,13 @@ extern void rcu_init(void); extern void rcu_check_callbacks(int cpu, int user); extern void rcu_restart_cpu(int cpu); extern long rcu_batches_completed(void); -extern long rcu_batches_completed_bh(void); /* Exported interfaces */ extern void FASTCALL(call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *head))); extern void FASTCALL(call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head))); +extern __deprecated_for_modules void synchronize_kernel(void); extern void synchronize_rcu(void); void synchronize_idle(void); extern void rcu_barrier(void); diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 1dd1c7073..015297ff7 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h @@ -59,13 +59,13 @@ extern void machine_crash_shutdown(struct pt_regs *); * Architecture independent implemenations of sys_reboot commands. */ +extern void kernel_restart_prepare(char *cmd); extern void kernel_shutdown_prepare(enum system_states state); extern void kernel_restart(char *cmd); extern void kernel_halt(void); extern void kernel_power_off(void); - -void ctrl_alt_del(void); +extern void kernel_kexec(void); /* * Emergency restart, callable from an interrupt handler. diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 93de35bbd..ca3f26985 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -1986,7 +1986,7 @@ void reiserfs_unmap_buffer(struct buffer_head *); /* file.c */ extern struct inode_operations reiserfs_file_inode_operations; extern const struct file_operations reiserfs_file_operations; -extern const struct address_space_operations reiserfs_address_space_operations; +extern struct address_space_operations reiserfs_address_space_operations; /* fix_nodes.c */ diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 5e961035c..5353afb11 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -2,6 +2,8 @@ File: linux/reiserfs_xattr.h */ +#include +#include #include /* Magic value in header */ @@ -13,7 +15,6 @@ struct reiserfs_xattr_header { }; #ifdef __KERNEL__ -#include struct reiserfs_xattr_handler { char *prefix; diff --git a/include/linux/relay.h b/include/linux/relay.h index 24accb483..4bcc1531d 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h @@ -10,6 +10,7 @@ #ifndef _LINUX_RELAY_H #define _LINUX_RELAY_H +#include #include #include #include diff --git a/include/linux/resource.h b/include/linux/resource.h index 14757afef..b3bc5fd18 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h @@ -3,8 +3,6 @@ #include -struct task_struct; - /* * Resource control/accounting header file for linux */ @@ -72,6 +70,4 @@ struct rlimit { */ #include -int getrusage(struct task_struct *p, int who, struct rusage __user *ru); - #endif diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h deleted file mode 100644 index a376bd4ad..000000000 --- a/include/linux/resume-trace.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef RESUME_TRACE_H -#define RESUME_TRACE_H - -#ifdef CONFIG_PM_TRACE - -struct device; -extern void set_trace_device(struct device *); -extern void generate_resume_trace(void *tracedata, unsigned int user); - -#define TRACE_DEVICE(dev) set_trace_device(dev) -#define TRACE_RESUME(user) do { \ - void *tracedata; \ - asm volatile("movl $1f,%0\n" \ - ".section .tracedata,\"a\"\n" \ - "1:\t.word %c1\n" \ - "\t.long %c2\n" \ - ".previous" \ - :"=r" (tracedata) \ - : "i" (__LINE__), "i" (__FILE__)); \ - generate_resume_trace(tracedata, user); \ -} while (0) - -#else - -#define TRACE_DEVICE(dev) do { } while (0) -#define TRACE_RESUME(dev) do { } while (0) - -#endif - -#endif diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056..c7e907faa 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h @@ -17,6 +17,7 @@ #ifdef __KERNEL__ #include +#include #include #include #include diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 7adb2a1aa..f54772d0e 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h @@ -16,6 +16,7 @@ #ifdef __KERNEL__ #include +#include #include #include #include diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 81c24e371..d6b9bcd13 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -4,6 +4,7 @@ * Declarations for Reverse Mapping functions in mm/rmap.c */ +#include #include #include #include @@ -72,7 +73,7 @@ void __anon_vma_link(struct vm_area_struct *); void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); void page_add_file_rmap(struct page *); -void page_remove_rmap(struct page *, struct vm_area_struct *); +void page_remove_rmap(struct page *); /** * page_dup_rmap - duplicate pte mapping to a page @@ -91,6 +92,7 @@ static inline void page_dup_rmap(struct page *page) */ int page_referenced(struct page *, int is_locked); int try_to_unmap(struct page *, int ignore_refs); +void remove_from_swap(struct page *page); /* * Called from mm/filemap_xip.c to unmap empty zero page @@ -103,14 +105,6 @@ pte_t *page_check_address(struct page *, struct mm_struct *, */ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); -/* - * Cleans the PTEs of shared mappings. - * (and since clean PTEs should also be readonly, write protects them too) - * - * returns the number of cleaned PTEs. - */ -int page_mkclean(struct page *); - #else /* !CONFIG_MMU */ #define anon_vma_init() do {} while (0) diff --git a/include/linux/root_dev.h b/include/linux/root_dev.h index 340d85de6..c7097d31e 100644 --- a/include/linux/root_dev.h +++ b/include/linux/root_dev.h @@ -2,8 +2,6 @@ #define _ROOT_DEV_H_ #include -#include -#include enum { Root_NFS = MKDEV(UNNAMED_MAJOR, 255), diff --git a/include/linux/rtc-v3020.h b/include/linux/rtc-v3020.h deleted file mode 100644 index bf74e63c9..000000000 --- a/include/linux/rtc-v3020.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * v3020.h - Registers definition and platform data structure for the v3020 RTC. - * - * 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) 2006, 8D Technologies inc. - */ -#ifndef __LINUX_V3020_H -#define __LINUX_V3020_H - -/* The v3020 has only one data pin but which one - * is used depends on the board. */ -struct v3020_platform_data { - int leftshift; /* (1<<(leftshift)) & readl() */ -}; - -#define V3020_STATUS_0 0x00 -#define V3020_STATUS_1 0x01 -#define V3020_SECONDS 0x02 -#define V3020_MINUTES 0x03 -#define V3020_HOURS 0x04 -#define V3020_MONTH_DAY 0x05 -#define V3020_MONTH 0x06 -#define V3020_YEAR 0x07 -#define V3020_WEEK_DAY 0x08 -#define V3020_WEEK 0x09 - -#define V3020_IS_COMMAND(val) ((val)>=0x0E) - -#define V3020_CMD_RAM2CLOCK 0x0E -#define V3020_CMD_CLOCK2RAM 0x0F - -#endif /* __LINUX_V3020_H */ diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 5371e4e74..ab61cd119 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -34,8 +34,8 @@ struct rtc_time { * alarm API. */ struct rtc_wkalrm { - unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */ - unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */ + unsigned char enabled; /* 0 = alarm disable, 1 = alarm disabled */ + unsigned char pending; /* 0 = alarm pending, 1 = alarm not pending */ struct rtc_time time; /* time the alarm is set to */ }; @@ -102,7 +102,6 @@ struct rtc_pll_info { #include extern int rtc_month_days(unsigned int month, unsigned int year); -extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year); extern int rtc_valid_tm(struct rtc_time *tm); extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); @@ -156,17 +155,6 @@ struct rtc_device struct rtc_task *irq_task; spinlock_t irq_task_lock; int irq_freq; - int max_user_freq; -#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL - struct work_struct uie_task; - struct timer_list uie_timer; - /* Those fields are protected by rtc->irq_lock */ - unsigned int oldsecs; - unsigned int irq_active:1; - unsigned int stop_uie_polling:1; - unsigned int uie_task_active:1; - unsigned int uie_timer_active:1; -#endif }; #define to_rtc_device(d) container_of(d, struct rtc_device, class_dev) diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h deleted file mode 100644 index 5d41dee82..000000000 --- a/include/linux/rtmutex.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * RT Mutexes: blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner: - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006, Timesys Corp., Thomas Gleixner - * - * This file contains the public data structure and API definitions. - */ - -#ifndef __LINUX_RT_MUTEX_H -#define __LINUX_RT_MUTEX_H - -#include -#include -#include - -/* - * The rt_mutex structure - * - * @wait_lock: spinlock to protect the structure - * @wait_list: pilist head to enqueue waiters in priority order - * @owner: the mutex owner - */ -struct rt_mutex { - spinlock_t wait_lock; - struct plist_head wait_list; - struct task_struct *owner; -#ifdef CONFIG_DEBUG_RT_MUTEXES - int save_state; - const char *name, *file; - int line; - void *magic; -#endif -}; - -struct rt_mutex_waiter; -struct hrtimer_sleeper; - -#ifdef CONFIG_DEBUG_RT_MUTEXES - extern int rt_mutex_debug_check_no_locks_freed(const void *from, - unsigned long len); - extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); -#else - static inline int rt_mutex_debug_check_no_locks_freed(const void *from, - unsigned long len) - { - return 0; - } -# define rt_mutex_debug_check_no_locks_held(task) do { } while (0) -#endif - -#ifdef CONFIG_DEBUG_RT_MUTEXES -# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ - , .name = #mutexname, .file = __FILE__, .line = __LINE__ -# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) - extern void rt_mutex_debug_task_free(struct task_struct *tsk); -#else -# define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) -# define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) -# define rt_mutex_debug_task_free(t) do { } while (0) -#endif - -#define __RT_MUTEX_INITIALIZER(mutexname) \ - { .wait_lock = SPIN_LOCK_UNLOCKED \ - , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) \ - , .owner = NULL \ - __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} - -#define DEFINE_RT_MUTEX(mutexname) \ - struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) - -/*** - * rt_mutex_is_locked - is the mutex locked - * @lock: the mutex to be queried - * - * Returns 1 if the mutex is locked, 0 if unlocked. - */ -static inline int rt_mutex_is_locked(struct rt_mutex *lock) -{ - return lock->owner != NULL; -} - -extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); -extern void rt_mutex_destroy(struct rt_mutex *lock); - -extern void rt_mutex_lock(struct rt_mutex *lock); -extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, - int detect_deadlock); -extern int rt_mutex_timed_lock(struct rt_mutex *lock, - struct hrtimer_sleeper *timeout, - int detect_deadlock); - -extern int rt_mutex_trylock(struct rt_mutex *lock); - -extern void rt_mutex_unlock(struct rt_mutex *lock); - -#ifdef CONFIG_RT_MUTEXES -# define INIT_RT_MUTEXES(tsk) \ - .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), \ - INIT_RT_MUTEX_DEBUG(tsk) -#else -# define INIT_RT_MUTEXES(tsk) -#endif - -#endif diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index facd9ee37..df0cdd410 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -909,6 +909,7 @@ struct tcamsg #ifdef __KERNEL__ +#include #include extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index ae1fcadd5..f30f80508 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h @@ -32,37 +32,30 @@ struct rw_semaphore { __s32 activity; spinlock_t wait_lock; struct list_head wait_list; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; +#if RWSEM_DEBUG + int debug; #endif }; -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define __RWSEM_DEP_MAP_INIT(lockname) , .dep_map = { .name = #lockname } +/* + * initialisation + */ +#if RWSEM_DEBUG +#define __RWSEM_DEBUG_INIT , 0 #else -# define __RWSEM_DEP_MAP_INIT(lockname) +#define __RWSEM_DEBUG_INIT /* */ #endif #define __RWSEM_INITIALIZER(name) \ -{ 0, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } +{ 0, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __RWSEM_DEBUG_INIT } #define DECLARE_RWSEM(name) \ struct rw_semaphore name = __RWSEM_INITIALIZER(name) -extern void __init_rwsem(struct rw_semaphore *sem, const char *name, - struct lock_class_key *key); - -#define init_rwsem(sem) \ -do { \ - static struct lock_class_key __key; \ - \ - __init_rwsem((sem), #sem, &__key); \ -} while (0) - +extern void FASTCALL(init_rwsem(struct rw_semaphore *sem)); extern void FASTCALL(__down_read(struct rw_semaphore *sem)); extern int FASTCALL(__down_read_trylock(struct rw_semaphore *sem)); extern void FASTCALL(__down_write(struct rw_semaphore *sem)); -extern void FASTCALL(__down_write_nested(struct rw_semaphore *sem, int subclass)); extern int FASTCALL(__down_write_trylock(struct rw_semaphore *sem)); extern void FASTCALL(__up_read(struct rw_semaphore *sem)); extern void FASTCALL(__up_write(struct rw_semaphore *sem)); diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 7b524b410..bfb988885 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -9,8 +9,11 @@ #include +#define RWSEM_DEBUG 0 + #ifdef __KERNEL__ +#include #include #include #include @@ -24,71 +27,89 @@ struct rw_semaphore; #include /* use an arch-specific implementation */ #endif +#ifndef rwsemtrace +#if RWSEM_DEBUG +extern void FASTCALL(rwsemtrace(struct rw_semaphore *sem, const char *str)); +#else +#define rwsemtrace(SEM,FMT) +#endif +#endif + /* * lock for reading */ -extern void down_read(struct rw_semaphore *sem); +static inline void down_read(struct rw_semaphore *sem) +{ + might_sleep(); + rwsemtrace(sem,"Entering down_read"); + __down_read(sem); + rwsemtrace(sem,"Leaving down_read"); +} /* * trylock for reading -- returns 1 if successful, 0 if contention */ -extern int down_read_trylock(struct rw_semaphore *sem); +static inline int down_read_trylock(struct rw_semaphore *sem) +{ + int ret; + rwsemtrace(sem,"Entering down_read_trylock"); + ret = __down_read_trylock(sem); + rwsemtrace(sem,"Leaving down_read_trylock"); + return ret; +} /* * lock for writing */ -extern void down_write(struct rw_semaphore *sem); +static inline void down_write(struct rw_semaphore *sem) +{ + might_sleep(); + rwsemtrace(sem,"Entering down_write"); + __down_write(sem); + rwsemtrace(sem,"Leaving down_write"); +} /* * trylock for writing -- returns 1 if successful, 0 if contention */ -extern int down_write_trylock(struct rw_semaphore *sem); +static inline int down_write_trylock(struct rw_semaphore *sem) +{ + int ret; + rwsemtrace(sem,"Entering down_write_trylock"); + ret = __down_write_trylock(sem); + rwsemtrace(sem,"Leaving down_write_trylock"); + return ret; +} /* * release a read lock */ -extern void up_read(struct rw_semaphore *sem); +static inline void up_read(struct rw_semaphore *sem) +{ + rwsemtrace(sem,"Entering up_read"); + __up_read(sem); + rwsemtrace(sem,"Leaving up_read"); +} /* * release a write lock */ -extern void up_write(struct rw_semaphore *sem); +static inline void up_write(struct rw_semaphore *sem) +{ + rwsemtrace(sem,"Entering up_write"); + __up_write(sem); + rwsemtrace(sem,"Leaving up_write"); +} /* * downgrade write lock to read lock */ -extern void downgrade_write(struct rw_semaphore *sem); - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -/* - * nested locking. NOTE: rwsems are not allowed to recurse - * (which occurs if the same task tries to acquire the same - * lock instance multiple times), but multiple locks of the - * same lock class might be taken, if the order of the locks - * is always the same. This ordering rule can be expressed - * to lockdep via the _nested() APIs, but enumerating the - * subclasses that are used. (If the nesting relationship is - * static then another method for expressing nested locking is - * the explicit definition of lock class keys and the use of - * lockdep_set_class() at lock initialization time. - * See Documentation/lockdep-design.txt for more details.) - */ -extern void down_read_nested(struct rw_semaphore *sem, int subclass); -extern void down_write_nested(struct rw_semaphore *sem, int subclass); -/* - * Take/release a lock when not the owner will release it. - * - * [ This API should be avoided as much as possible - the - * proper abstraction for this case is completions. ] - */ -extern void down_read_non_owner(struct rw_semaphore *sem); -extern void up_read_non_owner(struct rw_semaphore *sem); -#else -# define down_read_nested(sem, subclass) down_read(sem) -# define down_write_nested(sem, subclass) down_write(sem) -# define down_read_non_owner(sem) down_read(sem) -# define up_read_non_owner(sem) up_read(sem) -#endif +static inline void downgrade_write(struct rw_semaphore *sem) +{ + rwsemtrace(sem,"Entering downgrade_write"); + __downgrade_write(sem); + rwsemtrace(sem,"Leaving downgrade_write"); +} #endif /* __KERNEL__ */ #endif /* _LINUX_RWSEM_H */ diff --git a/include/linux/scc.h b/include/linux/scc.h index 3495bd953..885a4a02b 100644 --- a/include/linux/scc.h +++ b/include/linux/scc.h @@ -3,6 +3,7 @@ #ifndef _SCC_H #define _SCC_H +#include /* selection of hardware types */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 8ab1142c7..fda98fe81 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1,46 +1,9 @@ #ifndef _LINUX_SCHED_H #define _LINUX_SCHED_H -#include /* For AT_VECTOR_SIZE */ - -/* - * cloning flags: - */ -#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ -#define CLONE_VM 0x00000100 /* set if VM shared between processes */ -#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ -#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ -#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ -#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ -#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ -#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ -#define CLONE_THREAD 0x00010000 /* Same thread group? */ -#define CLONE_NEWNS 0x00020000 /* New namespace group? */ -#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ -#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ -#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ -#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ -#define CLONE_DETACHED 0x00400000 /* Unused, ignored */ -#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ -#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ -#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ - -/* - * Scheduling policies - */ -#define SCHED_NORMAL 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 -#define SCHED_BATCH 3 - -#ifdef __KERNEL__ - -struct sched_param { - int sched_priority; -}; - #include /* for HZ */ +#include #include #include #include @@ -52,6 +15,7 @@ struct sched_param { #include #include #include +#include #include #include @@ -73,21 +37,35 @@ struct sched_param { #include #include #include -#include -#include -#include -#include -#include -#include - -#include +#include /* For AT_VECTOR_SIZE */ struct exec_domain; -struct futex_pi_state; extern int exec_shield; extern int print_fatal_signals; +/* + * cloning flags: + */ +#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ +#define CLONE_VM 0x00000100 /* set if VM shared between processes */ +#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ +#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ +#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */ +#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */ +#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ +#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ +#define CLONE_THREAD 0x00010000 /* Same thread group? */ +#define CLONE_NEWNS 0x00020000 /* New namespace group? */ +#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */ +#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */ +#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */ +#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */ +#define CLONE_DETACHED 0x00400000 /* Unused, ignored */ +#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ +#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ +#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ + /* * List of flags we want to share for kernel threads, * if only because they are not used by them anyway. @@ -127,8 +105,14 @@ extern unsigned long nr_running(void); extern unsigned long nr_uninterruptible(void); extern unsigned long nr_active(void); extern unsigned long nr_iowait(void); -extern unsigned long weighted_cpuload(const int cpu); +#include +#include +#include +#include +#include + +#include /* * Task state bitmask. NOTE! These bits are also @@ -176,6 +160,20 @@ extern unsigned long weighted_cpuload(const int cpu); /* Task command name length */ #define TASK_COMM_LEN 16 +/* + * Scheduling policies + */ +#define SCHED_NORMAL 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 +#define SCHED_BATCH 3 + +struct sched_param { + int sched_priority; +}; + +#ifdef __KERNEL__ + #include /* @@ -187,11 +185,11 @@ extern unsigned long weighted_cpuload(const int cpu); extern rwlock_t tasklist_lock; extern spinlock_t mmlist_lock; -struct task_struct; +typedef struct task_struct task_t; extern void sched_init(void); extern void sched_init_smp(void); -extern void init_idle(struct task_struct *idle, int cpu); +extern void init_idle(task_t *idle, int cpu); extern cpumask_t nohz_cpu_mask; @@ -375,14 +373,6 @@ struct sighand_struct { spinlock_t siglock; }; -struct pacct_struct { - int ac_flag; - long ac_exitcode; - unsigned long ac_mem; - cputime_t ac_utime, ac_stime; - unsigned long ac_minflt, ac_majflt; -}; - /* * NOTE! "signal_struct" does not have it's own * locking, because a shared signal_struct always @@ -397,7 +387,7 @@ struct signal_struct { wait_queue_head_t wait_chldexit; /* for wait4() */ /* current thread group signal load-balancing target: */ - struct task_struct *curr_target; + task_t *curr_target; /* shared signal handling: */ struct sigpending shared_pending; @@ -474,13 +464,6 @@ struct signal_struct { struct key *session_keyring; /* keyring inherited over fork */ struct key *process_keyring; /* keyring private to this process */ #endif -#ifdef CONFIG_BSD_PROCESS_ACCT - struct pacct_struct pacct; /* per-process accounting information */ -#endif -#ifdef CONFIG_TASKSTATS - spinlock_t stats_lock; - struct taskstats *stats; -#endif }; /* Context switch must be unlocked if interrupts are to be enabled */ @@ -515,11 +498,8 @@ struct signal_struct { #define MAX_PRIO (MAX_RT_PRIO + 40) -#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) -#define rt_task(p) rt_prio((p)->prio) +#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) -#define has_rt_policy(p) \ - unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) /* * Some day this will be a full-fledged user tracking system.. @@ -529,7 +509,7 @@ struct user_struct { atomic_t processes; /* How many processes does this user have? */ atomic_t files; /* How many open files does this user have? */ atomic_t sigpending; /* How many pending signals does this user have? */ -#ifdef CONFIG_INOTIFY_USER +#ifdef CONFIG_INOTIFY atomic_t inotify_watches; /* How many inotify watches does this user have? */ atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ #endif @@ -553,10 +533,11 @@ extern struct user_struct *find_user(xid_t, uid_t); extern struct user_struct root_user; #define INIT_USER (&root_user) +typedef struct prio_array prio_array_t; struct backing_dev_info; struct reclaim_state; -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) +#ifdef CONFIG_SCHEDSTATS struct sched_info { /* cumulative counters */ unsigned long cpu_time, /* time spent on the cpu */ @@ -567,53 +548,9 @@ struct sched_info { unsigned long last_arrival, /* when we last ran on a cpu */ last_queued; /* when we were last queued to run */ }; -#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */ -#ifdef CONFIG_SCHEDSTATS extern struct file_operations proc_schedstat_operations; -#endif /* CONFIG_SCHEDSTATS */ - -#ifdef CONFIG_TASK_DELAY_ACCT -struct task_delay_info { - spinlock_t lock; - unsigned int flags; /* Private per-task flags */ - - /* For each stat XXX, add following, aligned appropriately - * - * struct timespec XXX_start, XXX_end; - * u64 XXX_delay; - * u32 XXX_count; - * - * Atomicity of updates to XXX_delay, XXX_count protected by - * single lock above (split into XXX_lock if contention is an issue). - */ - - /* - * XXX_count is incremented on every XXX operation, the delay - * associated with the operation is added to XXX_delay. - * XXX_delay contains the accumulated delay time in nanoseconds. - */ - struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */ - u64 blkio_delay; /* wait for sync block io completion */ - u64 swapin_delay; /* wait for swapin block io completion */ - u32 blkio_count; /* total count of the number of sync block */ - /* io operations performed */ - u32 swapin_count; /* total count of the number of swapin block */ - /* io operations performed */ -}; -#endif /* CONFIG_TASK_DELAY_ACCT */ - -static inline int sched_info_on(void) -{ -#ifdef CONFIG_SCHEDSTATS - return 1; -#elif defined(CONFIG_TASK_DELAY_ACCT) - extern int delayacct_on; - return delayacct_on; -#else - return 0; #endif -} enum idle_type { @@ -626,9 +563,9 @@ enum idle_type /* * sched-domains (multiprocessor balancing) declarations: */ +#ifdef CONFIG_SMP #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ -#ifdef CONFIG_SMP #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ #define SD_BALANCE_EXEC 4 /* Balance on exec */ @@ -637,11 +574,6 @@ enum idle_type #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ -#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ - -#define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \ - ? SD_POWERSAVINGS_BALANCE : 0) - struct sched_group { struct sched_group *next; /* Must be a circular list */ @@ -711,7 +643,7 @@ struct sched_domain { #endif }; -extern int partition_sched_domains(cpumask_t *partition1, +extern void partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2); /* @@ -761,7 +693,7 @@ extern int groups_search(struct group_info *group_info, gid_t grp); ((gi)->blocks[(i)/NGROUPS_PER_BLOCK][(i)%NGROUPS_PER_BLOCK]) #ifdef ARCH_HAS_PREFETCH_SWITCH_STACK -extern void prefetch_stack(struct task_struct *t); +extern void prefetch_stack(struct task_struct*); #else static inline void prefetch_stack(struct task_struct *t) { } #endif @@ -777,8 +709,6 @@ enum sleep_type { SLEEP_INTERRUPTED, }; -struct prio_array; - struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ struct thread_info *thread_info; @@ -788,15 +718,12 @@ struct task_struct { int lock_depth; /* BKL lock depth */ -#ifdef CONFIG_SMP -#ifdef __ARCH_WANT_UNLOCKED_CTXSW +#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) int oncpu; #endif -#endif - int load_weight; /* for niceness load balancing purposes */ - int prio, static_prio, normal_prio; + int prio, static_prio; struct list_head run_list; - struct prio_array *array; + prio_array_t *array; unsigned short ioprio; unsigned int btrace_seq; @@ -810,7 +737,7 @@ struct task_struct { cpumask_t cpus_allowed; unsigned int time_slice, first_time_slice; -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) +#ifdef CONFIG_SCHEDSTATS struct sched_info sched_info; #endif @@ -933,43 +860,13 @@ struct task_struct { u32 self_exec_id; /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ spinlock_t alloc_lock; - - /* Protection of the PI data structures: */ - spinlock_t pi_lock; - -#ifdef CONFIG_RT_MUTEXES - /* PI waiters blocked on a rt_mutex held by this task */ - struct plist_head pi_waiters; - /* Deadlock detection and priority inheritance handling */ - struct rt_mutex_waiter *pi_blocked_on; -#endif +/* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ + spinlock_t proc_lock; #ifdef CONFIG_DEBUG_MUTEXES /* mutex deadlock detection */ struct mutex_waiter *blocked_on; #endif -#ifdef CONFIG_TRACE_IRQFLAGS - unsigned int irq_events; - int hardirqs_enabled; - unsigned long hardirq_enable_ip; - unsigned int hardirq_enable_event; - unsigned long hardirq_disable_ip; - unsigned int hardirq_disable_event; - int softirqs_enabled; - unsigned long softirq_disable_ip; - unsigned int softirq_disable_event; - unsigned long softirq_enable_ip; - unsigned int softirq_enable_event; - int hardirq_context; - int softirq_context; -#endif -#ifdef CONFIG_LOCKDEP -# define MAX_LOCK_DEPTH 30UL - u64 curr_chain_key; - int lockdep_depth; - struct held_lock held_locks[MAX_LOCK_DEPTH]; - unsigned int lockdep_recursion; -#endif /* journalling filesystem info */ void *journal_info; @@ -977,6 +874,7 @@ struct task_struct { /* VM state */ struct reclaim_state *reclaim_state; + struct dentry *proc_dentry; struct backing_dev_info *backing_dev_info; struct io_context *io_context; @@ -1011,8 +909,6 @@ struct task_struct { #ifdef CONFIG_COMPAT struct compat_robust_list_head __user *compat_robust_list; #endif - struct list_head pi_state_list; - struct futex_pi_state *pi_state_cache; atomic_t fs_excl; /* holding fs exclusive resources */ struct rcu_head rcu; @@ -1021,9 +917,6 @@ struct task_struct { * cache last used pipe for splice */ struct pipe_inode_info *splice_pipe; -#ifdef CONFIG_TASK_DELAY_ACCT - struct task_delay_info *delays; -#endif }; static inline pid_t process_group(struct task_struct *tsk) @@ -1077,13 +970,13 @@ static inline void put_task_struct(struct task_struct *t) #define PF_KSWAPD 0x00040000 /* I am kswapd */ #define PF_SWAPOFF 0x00080000 /* I am in swapoff */ #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ -#define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */ -#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ -#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ -#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ -#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ +#define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */ +#define PF_BORROWED_MM 0x00400000 /* I am a kthread doing use_mm */ +#define PF_RANDOMIZE 0x00800000 /* randomize virtual address space */ +#define PF_SWAPWRITE 0x01000000 /* Allowed to write to swap */ +#define PF_SPREAD_PAGE 0x04000000 /* Spread page cache over cpuset */ +#define PF_SPREAD_SLAB 0x08000000 /* Spread some slab caches over cpuset */ #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ -#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ /* * Only the _current_ task can read/write to tsk->flags, but other @@ -1111,9 +1004,9 @@ static inline void put_task_struct(struct task_struct *t) #define used_math() tsk_used_math(current) #ifdef CONFIG_SMP -extern int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask); +extern int set_cpus_allowed(task_t *p, cpumask_t new_mask); #else -static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) +static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) { if (!cpu_isset(0, new_mask)) return -EINVAL; @@ -1122,8 +1015,7 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) #endif extern unsigned long long sched_clock(void); -extern unsigned long long -current_sched_time(const struct task_struct *current_task); +extern unsigned long long current_sched_time(const task_t *current_task); /* sched_exec is called by processes performing an exec */ #ifdef CONFIG_SMP @@ -1139,29 +1031,16 @@ static inline void idle_task_exit(void) {} #endif extern void sched_idle_next(void); - -#ifdef CONFIG_RT_MUTEXES -extern int rt_mutex_getprio(struct task_struct *p); -extern void rt_mutex_setprio(struct task_struct *p, int prio); -extern void rt_mutex_adjust_pi(struct task_struct *p); -#else -static inline int rt_mutex_getprio(struct task_struct *p) -{ - return p->normal_prio; -} -# define rt_mutex_adjust_pi(p) do { } while (0) -#endif - -extern void set_user_nice(struct task_struct *p, long nice); -extern int task_prio(const struct task_struct *p); -extern int task_nice(const struct task_struct *p); -extern int can_nice(const struct task_struct *p, const int nice); -extern int task_curr(const struct task_struct *p); +extern void set_user_nice(task_t *p, long nice); +extern int task_prio(const task_t *p); +extern int task_nice(const task_t *p); +extern int can_nice(const task_t *p, const int nice); +extern int task_curr(const task_t *p); extern int idle_cpu(int cpu); extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); -extern struct task_struct *idle_task(int cpu); -extern struct task_struct *curr_task(int cpu); -extern void set_curr_task(int cpu, struct task_struct *p); +extern task_t *idle_task(int cpu); +extern task_t *curr_task(int cpu); +extern void set_curr_task(int cpu, task_t *p); void yield(void); @@ -1192,9 +1071,10 @@ extern struct mm_struct init_mm; #define find_task_by_real_pid(nr) \ - find_task_by_pid_type(PIDTYPE_REALPID, nr) -#define find_task_by_pid(nr) \ find_task_by_pid_type(PIDTYPE_PID, nr) +#define find_task_by_pid(nr) \ + find_task_by_pid_type(PIDTYPE_PID, \ + vx_rmap_pid(nr)) extern struct task_struct *find_task_by_pid_type(int type, int pid); extern void set_special_pids(pid_t session, pid_t pgrp); @@ -1223,8 +1103,8 @@ extern void FASTCALL(wake_up_new_task(struct task_struct * tsk, #else static inline void kick_process(struct task_struct *tsk) { } #endif -extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags)); -extern void FASTCALL(sched_exit(struct task_struct * p)); +extern void FASTCALL(sched_fork(task_t * p, int clone_flags)); +extern void FASTCALL(sched_exit(task_t * p)); extern int in_group_p(gid_t); extern int in_egroup_p(gid_t); @@ -1257,7 +1137,7 @@ extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); extern int kill_pg_info(int, struct siginfo *, pid_t); extern int kill_proc_info(int, struct siginfo *, pid_t); -extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32); +extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t); extern void do_notify_parent(struct task_struct *, int); extern void force_sig(int, struct task_struct *); extern void force_sig_specific(int, struct task_struct *); @@ -1329,17 +1209,17 @@ extern NORET_TYPE void do_group_exit(int); extern void daemonize(const char *, ...); extern int allow_signal(int); extern int disallow_signal(int); -extern struct task_struct *child_reaper; +extern task_t *child_reaper; extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); -struct task_struct *fork_idle(int); +task_t *fork_idle(int); extern void set_task_comm(struct task_struct *tsk, char *from); extern void get_task_comm(char *to, struct task_struct *tsk); #ifdef CONFIG_SMP -extern void wait_task_inactive(struct task_struct * p); +extern void wait_task_inactive(task_t * p); #else #define wait_task_inactive(p) do { } while (0) #endif @@ -1365,13 +1245,13 @@ extern void wait_task_inactive(struct task_struct * p); /* de_thread depends on thread_group_leader not being a pid based check */ #define thread_group_leader(p) (p == p->group_leader) -static inline struct task_struct *next_thread(const struct task_struct *p) +static inline task_t *next_thread(const task_t *p) { return list_entry(rcu_dereference(p->thread_group.next), - struct task_struct, thread_group); + task_t, thread_group); } -static inline int thread_group_empty(struct task_struct *p) +static inline int thread_group_empty(task_t *p) { return list_empty(&p->thread_group); } @@ -1380,7 +1260,7 @@ static inline int thread_group_empty(struct task_struct *p) (thread_group_leader(p) && !thread_group_empty(p)) /* - * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring + * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm, keyring * subscriptions and synchronises with wait4(). Also used in procfs. Also * pins the final release of task.io_context. Also protects ->cpuset. * @@ -1556,11 +1436,6 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); extern long sched_getaffinity(pid_t pid, cpumask_t *mask); -#include -extern int sched_mc_power_savings, sched_smt_power_savings; -extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; -extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); - extern void normalize_rt_tasks(void); #ifdef CONFIG_PM @@ -1589,14 +1464,6 @@ static inline void freeze(struct task_struct *p) p->flags |= PF_FREEZE; } -/* - * Sometimes we may need to cancel the previous 'freeze' request - */ -static inline void do_not_freeze(struct task_struct *p) -{ - p->flags &= ~PF_FREEZE; -} - /* * Wake up a frozen process */ diff --git a/include/linux/scx200.h b/include/linux/scx200.h index de466e11e..a22f9e173 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h @@ -32,7 +32,7 @@ extern unsigned scx200_cb_base; /* High Resolution Timer */ #define SCx200_TIMER_OFFSET 0x08 -#define SCx200_TIMER_SIZE 0x06 +#define SCx200_TIMER_SIZE 0x05 /* Clock Generators */ #define SCx200_CLOCKGEN_OFFSET 0x10 @@ -49,3 +49,10 @@ extern unsigned scx200_cb_base; #define SCx200_REV 0x3d /* Revision Register */ #define SCx200_CBA 0x3e /* Configuration Base Address Register */ #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ + +/* + Local variables: + compile-command: "make -C ../.. bzImage modules" + c-basic-offset: 8 + End: +*/ diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 90dd069cc..30cdd648b 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h @@ -1,6 +1,6 @@ #include -u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); +u32 scx200_gpio_configure(int index, u32 set, u32 clear); extern unsigned scx200_gpio_base; extern long scx200_gpio_shadow[2]; @@ -17,7 +17,7 @@ extern long scx200_gpio_shadow[2]; /* returns the value of the GPIO pin */ -static inline int scx200_gpio_get(unsigned index) { +static inline int scx200_gpio_get(int index) { __SCx200_GPIO_BANK; __SCx200_GPIO_IOADDR + 0x04; __SCx200_GPIO_INDEX; @@ -29,7 +29,7 @@ static inline int scx200_gpio_get(unsigned index) { driven if the GPIO is configured as an output, it might not be the state of the GPIO right now if the GPIO is configured as an input) */ -static inline int scx200_gpio_current(unsigned index) { +static inline int scx200_gpio_current(int index) { __SCx200_GPIO_BANK; __SCx200_GPIO_INDEX; @@ -38,7 +38,7 @@ static inline int scx200_gpio_current(unsigned index) { /* drive the GPIO signal high */ -static inline void scx200_gpio_set_high(unsigned index) { +static inline void scx200_gpio_set_high(int index) { __SCx200_GPIO_BANK; __SCx200_GPIO_IOADDR; __SCx200_GPIO_SHADOW; @@ -49,7 +49,7 @@ static inline void scx200_gpio_set_high(unsigned index) { /* drive the GPIO signal low */ -static inline void scx200_gpio_set_low(unsigned index) { +static inline void scx200_gpio_set_low(int index) { __SCx200_GPIO_BANK; __SCx200_GPIO_IOADDR; __SCx200_GPIO_SHADOW; @@ -60,7 +60,7 @@ static inline void scx200_gpio_set_low(unsigned index) { /* drive the GPIO signal to state */ -static inline void scx200_gpio_set(unsigned index, int state) { +static inline void scx200_gpio_set(int index, int state) { __SCx200_GPIO_BANK; __SCx200_GPIO_IOADDR; __SCx200_GPIO_SHADOW; @@ -73,7 +73,7 @@ static inline void scx200_gpio_set(unsigned index, int state) { } /* toggle the GPIO signal */ -static inline void scx200_gpio_change(unsigned index) { +static inline void scx200_gpio_change(int index) { __SCx200_GPIO_BANK; __SCx200_GPIO_IOADDR; __SCx200_GPIO_SHADOW; @@ -87,3 +87,10 @@ static inline void scx200_gpio_change(unsigned index) { #undef __SCx200_GPIO_SHADOW #undef __SCx200_GPIO_INDEX #undef __SCx200_GPIO_OUT + +/* + Local variables: + compile-command: "make -C ../.. bzImage modules" + c-basic-offset: 8 + End: +*/ diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 3e8b1cf54..cd2773b29 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -1,6 +1,7 @@ #ifndef _LINUX_SECCOMP_H #define _LINUX_SECCOMP_H +#include #ifdef CONFIG_SECCOMP diff --git a/include/linux/security.h b/include/linux/security.h index 6bc2aad49..1bab48f6a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -67,7 +67,7 @@ struct xfrm_state; struct xfrm_user_sec_ctx; extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); -extern int cap_netlink_recv(struct sk_buff *skb, int cap); +extern int cap_netlink_recv(struct sk_buff *skb); /* * Values used in the task_security_ops calls @@ -171,9 +171,9 @@ struct swap_info_struct; * Deallocate and clear the sb->s_security field. * @sb contains the super_block structure to be modified. * @sb_statfs: - * Check permission before obtaining filesystem statistics for the @mnt - * mountpoint. - * @dentry is a handle on the superblock for the filesystem. + * Check permission before obtaining filesystem statistics for the @sb + * filesystem. + * @sb contains the super_block structure for the filesystem. * Return 0 if permission is granted. * @sb_mount: * Check permission before an object specified by @dev_name is mounted on @@ -567,9 +567,6 @@ struct swap_info_struct; * @p. * @p contains the task_struct for the process. * Return 0 if permission is granted. - * @task_getsecid: - * Retrieve the security identifier of the process @p. - * @p contains the task_struct for the process and place is into @secid. * @task_setgroups: * Check permission before setting the supplementary group set of the * current process. @@ -580,15 +577,6 @@ struct swap_info_struct; * @p contains the task_struct of process. * @nice contains the new nice value. * Return 0 if permission is granted. - * @task_setioprio - * Check permission before setting the ioprio value of @p to @ioprio. - * @p contains the task_struct of process. - * @ioprio contains the new ioprio value - * Return 0 if permission is granted. - * @task_getioprio - * Check permission before getting the ioprio value of @p. - * @p contains the task_struct of process. - * Return 0 if permission is granted. * @task_setrlimit: * Check permission before setting the resource limits of the current * process for @resource to @new_rlim. The old resource limit values can @@ -608,10 +596,6 @@ struct swap_info_struct; * @p. * @p contains the task_struct for process. * Return 0 if permission is granted. - * @task_movememory - * Check permission before moving memory owned by process @p. - * @p contains the task_struct for process. - * Return 0 if permission is granted. * @task_kill: * Check permission before sending signal @sig to @p. @info can be NULL, * the constant 1, or a pointer to a siginfo structure. If @info is 1 or @@ -622,7 +606,6 @@ struct swap_info_struct; * @p contains the task_struct for process. * @info contains the signal information. * @sig contains the signal value. - * @secid contains the sid of the process where the signal originated * Return 0 if permission is granted. * @task_wait: * Check permission before allowing a process to reap a child process @p @@ -664,7 +647,6 @@ struct swap_info_struct; * Check permission before processing the received netlink message in * @skb. * @skb contains the sk_buff structure for the netlink message. - * @cap indicates the capability required * Return 0 if permission is granted. * * Security hooks for Unix domain networking. @@ -823,37 +805,31 @@ struct swap_info_struct; * used by the XFRM system. * @sec_ctx contains the security context information being provided by * the user-level policy update program (e.g., setkey). - * Allocate a security structure to the xp->security field. + * Allocate a security structure to the xp->selector.security field. * The security field is initialized to NULL when the xfrm_policy is * allocated. * Return 0 if operation was successful (memory to allocate, legal context) * @xfrm_policy_clone_security: * @old contains an existing xfrm_policy in the SPD. * @new contains a new xfrm_policy being cloned from old. - * Allocate a security structure to the new->security field - * that contains the information from the old->security field. + * Allocate a security structure to the new->selector.security field + * that contains the information from the old->selector.security field. * Return 0 if operation was successful (memory to allocate). * @xfrm_policy_free_security: * @xp contains the xfrm_policy - * Deallocate xp->security. - * @xfrm_policy_delete_security: - * @xp contains the xfrm_policy. - * Authorize deletion of xp->security. + * Deallocate xp->selector.security. * @xfrm_state_alloc_security: * @x contains the xfrm_state being added to the Security Association * Database by the XFRM system. * @sec_ctx contains the security context information being provided by * the user-level SA generation program (e.g., setkey or racoon). - * Allocate a security structure to the x->security field. The + * Allocate a security structure to the x->sel.security field. The * security field is initialized to NULL when the xfrm_state is * allocated. * Return 0 if operation was successful (memory to allocate, legal context). * @xfrm_state_free_security: * @x contains the xfrm_state. - * Deallocate x->security. - * @xfrm_state_delete_security: - * @x contains the xfrm_state. - * Authorize deletion of x->security. + * Deallocate x>sel.security. * @xfrm_policy_lookup: * @xp contains the xfrm_policy for which the access control is being * checked. @@ -871,7 +847,6 @@ struct swap_info_struct; * Permit allocation of a key and assign security data. Note that key does * not have a serial number assigned at this point. * @key points to the key. - * @flags is the allocation flags * Return 0 if permission is granted, -ve error otherwise. * @key_free: * Notification of destruction; free security data. @@ -1109,16 +1084,6 @@ struct swap_info_struct; * @name contains the name of the security module being unstacked. * @ops contains a pointer to the struct security_operations of the module to unstack. * - * @secid_to_secctx: - * Convert secid to security context. - * @secid contains the security ID. - * @secdata contains the pointer that stores the converted security context. - * - * @release_secctx: - * Release the security context. - * @secdata contains the security context. - * @seclen contains the length of the security context. - * * This is the main security structure. */ struct security_operations { @@ -1156,7 +1121,7 @@ struct security_operations { int (*sb_copy_data)(struct file_system_type *type, void *orig, void *copy); int (*sb_kern_mount) (struct super_block *sb, void *data); - int (*sb_statfs) (struct dentry *dentry); + int (*sb_statfs) (struct super_block * sb); int (*sb_mount) (char *dev_name, struct nameidata * nd, char *type, unsigned long flags, void *data); int (*sb_check_sb) (struct vfsmount * mnt, struct nameidata * nd); @@ -1237,18 +1202,14 @@ struct security_operations { int (*task_setpgid) (struct task_struct * p, pid_t pgid); int (*task_getpgid) (struct task_struct * p); int (*task_getsid) (struct task_struct * p); - void (*task_getsecid) (struct task_struct * p, u32 * secid); int (*task_setgroups) (struct group_info *group_info); int (*task_setnice) (struct task_struct * p, int nice); - int (*task_setioprio) (struct task_struct * p, int ioprio); - int (*task_getioprio) (struct task_struct * p); int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim); int (*task_setscheduler) (struct task_struct * p, int policy, struct sched_param * lp); int (*task_getscheduler) (struct task_struct * p); - int (*task_movememory) (struct task_struct * p); int (*task_kill) (struct task_struct * p, - struct siginfo * info, int sig, u32 secid); + struct siginfo * info, int sig); int (*task_wait) (struct task_struct * p); int (*task_prctl) (int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, @@ -1287,7 +1248,7 @@ struct security_operations { struct sembuf * sops, unsigned nsops, int alter); int (*netlink_send) (struct sock * sk, struct sk_buff * skb); - int (*netlink_recv) (struct sk_buff * skb, int cap); + int (*netlink_recv) (struct sk_buff * skb); /* allow module stacking */ int (*register_security) (const char *name, @@ -1299,8 +1260,6 @@ struct security_operations { int (*getprocattr)(struct task_struct *p, char *name, void *value, size_t size); int (*setprocattr)(struct task_struct *p, char *name, void *value, size_t size); - int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen); - void (*release_secctx)(char *secdata, u32 seclen); #ifdef CONFIG_SECURITY_NETWORK int (*unix_stream_connect) (struct socket * sock, @@ -1329,7 +1288,7 @@ struct security_operations { int (*socket_shutdown) (struct socket * sock, int how); int (*socket_sock_rcv_skb) (struct sock * sk, struct sk_buff * skb); int (*socket_getpeersec_stream) (struct socket *sock, char __user *optval, int __user *optlen, unsigned len); - int (*socket_getpeersec_dgram) (struct socket *sock, struct sk_buff *skb, u32 *secid); + int (*socket_getpeersec_dgram) (struct sk_buff *skb, char **secdata, u32 *seclen); int (*sk_alloc_security) (struct sock *sk, int family, gfp_t priority); void (*sk_free_security) (struct sock *sk); unsigned int (*sk_getsid) (struct sock *sk, struct flowi *fl, u8 dir); @@ -1339,16 +1298,14 @@ struct security_operations { int (*xfrm_policy_alloc_security) (struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx); int (*xfrm_policy_clone_security) (struct xfrm_policy *old, struct xfrm_policy *new); void (*xfrm_policy_free_security) (struct xfrm_policy *xp); - int (*xfrm_policy_delete_security) (struct xfrm_policy *xp); int (*xfrm_state_alloc_security) (struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx); void (*xfrm_state_free_security) (struct xfrm_state *x); - int (*xfrm_state_delete_security) (struct xfrm_state *x); int (*xfrm_policy_lookup)(struct xfrm_policy *xp, u32 sk_sid, u8 dir); #endif /* CONFIG_SECURITY_NETWORK_XFRM */ /* key management security hooks */ #ifdef CONFIG_KEYS - int (*key_alloc)(struct key *key, struct task_struct *tsk, unsigned long flags); + int (*key_alloc)(struct key *key); void (*key_free)(struct key *key); int (*key_permission)(key_ref_t key_ref, struct task_struct *context, @@ -1485,9 +1442,9 @@ static inline int security_sb_kern_mount (struct super_block *sb, void *data) return security_ops->sb_kern_mount (sb, data); } -static inline int security_sb_statfs (struct dentry *dentry) +static inline int security_sb_statfs (struct super_block *sb) { - return security_ops->sb_statfs (dentry); + return security_ops->sb_statfs (sb); } static inline int security_sb_mount (char *dev_name, struct nameidata *nd, @@ -1861,11 +1818,6 @@ static inline int security_task_getsid (struct task_struct *p) return security_ops->task_getsid (p); } -static inline void security_task_getsecid (struct task_struct *p, u32 *secid) -{ - security_ops->task_getsecid (p, secid); -} - static inline int security_task_setgroups (struct group_info *group_info) { return security_ops->task_setgroups (group_info); @@ -1876,16 +1828,6 @@ static inline int security_task_setnice (struct task_struct *p, int nice) return security_ops->task_setnice (p, nice); } -static inline int security_task_setioprio (struct task_struct *p, int ioprio) -{ - return security_ops->task_setioprio (p, ioprio); -} - -static inline int security_task_getioprio (struct task_struct *p) -{ - return security_ops->task_getioprio (p); -} - static inline int security_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) { @@ -1904,16 +1846,10 @@ static inline int security_task_getscheduler (struct task_struct *p) return security_ops->task_getscheduler (p); } -static inline int security_task_movememory (struct task_struct *p) -{ - return security_ops->task_movememory (p); -} - static inline int security_task_kill (struct task_struct *p, - struct siginfo *info, int sig, - u32 secid) + struct siginfo *info, int sig) { - return security_ops->task_kill (p, info, sig, secid); + return security_ops->task_kill (p, info, sig); } static inline int security_task_wait (struct task_struct *p) @@ -2066,19 +2002,9 @@ static inline int security_netlink_send(struct sock *sk, struct sk_buff * skb) return security_ops->netlink_send(sk, skb); } -static inline int security_netlink_recv(struct sk_buff * skb, int cap) -{ - return security_ops->netlink_recv(skb, cap); -} - -static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) +static inline int security_netlink_recv(struct sk_buff * skb) { - return security_ops->secid_to_secctx(secid, secdata, seclen); -} - -static inline void security_release_secctx(char *secdata, u32 seclen) -{ - return security_ops->release_secctx(secdata, seclen); + return security_ops->netlink_recv(skb); } /* prototypes */ @@ -2228,7 +2154,7 @@ static inline int security_sb_kern_mount (struct super_block *sb, void *data) return 0; } -static inline int security_sb_statfs (struct dentry *dentry) +static inline int security_sb_statfs (struct super_block *sb) { return 0; } @@ -2534,9 +2460,6 @@ static inline int security_task_getsid (struct task_struct *p) return 0; } -static inline void security_task_getsecid (struct task_struct *p, u32 *secid) -{ } - static inline int security_task_setgroups (struct group_info *group_info) { return 0; @@ -2547,16 +2470,6 @@ static inline int security_task_setnice (struct task_struct *p, int nice) return 0; } -static inline int security_task_setioprio (struct task_struct *p, int ioprio) -{ - return 0; -} - -static inline int security_task_getioprio (struct task_struct *p) -{ - return 0; -} - static inline int security_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) { @@ -2575,14 +2488,8 @@ static inline int security_task_getscheduler (struct task_struct *p) return 0; } -static inline int security_task_movememory (struct task_struct *p) -{ - return 0; -} - static inline int security_task_kill (struct task_struct *p, - struct siginfo *info, int sig, - u32 secid) + struct siginfo *info, int sig) { return 0; } @@ -2723,9 +2630,9 @@ static inline int security_netlink_send (struct sock *sk, struct sk_buff *skb) return cap_netlink_send (sk, skb); } -static inline int security_netlink_recv (struct sk_buff *skb, int cap) +static inline int security_netlink_recv (struct sk_buff *skb) { - return cap_netlink_recv (skb, cap); + return cap_netlink_recv (skb); } static inline struct dentry *securityfs_create_dir(const char *name, @@ -2747,14 +2654,6 @@ static inline void securityfs_remove(struct dentry *dentry) { } -static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) -{ - return -EOPNOTSUPP; -} - -static inline void security_release_secctx(char *secdata, u32 seclen) -{ -} #endif /* CONFIG_SECURITY */ #ifdef CONFIG_SECURITY_NETWORK @@ -2870,9 +2769,10 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ return security_ops->socket_getpeersec_stream(sock, optval, optlen, len); } -static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) +static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, + u32 *seclen) { - return security_ops->socket_getpeersec_dgram(sock, skb, secid); + return security_ops->socket_getpeersec_dgram(skb, secdata, seclen); } static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) @@ -2997,7 +2897,8 @@ static inline int security_socket_getpeersec_stream(struct socket *sock, char __ return -ENOPROTOOPT; } -static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) +static inline int security_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, + u32 *seclen) { return -ENOPROTOOPT; } @@ -3033,21 +2934,11 @@ static inline void security_xfrm_policy_free(struct xfrm_policy *xp) security_ops->xfrm_policy_free_security(xp); } -static inline int security_xfrm_policy_delete(struct xfrm_policy *xp) -{ - return security_ops->xfrm_policy_delete_security(xp); -} - static inline int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) { return security_ops->xfrm_state_alloc_security(x, sec_ctx); } -static inline int security_xfrm_state_delete(struct xfrm_state *x) -{ - return security_ops->xfrm_state_delete_security(x); -} - static inline void security_xfrm_state_free(struct xfrm_state *x) { security_ops->xfrm_state_free_security(x); @@ -3072,11 +2963,6 @@ static inline void security_xfrm_policy_free(struct xfrm_policy *xp) { } -static inline int security_xfrm_policy_delete(struct xfrm_policy *xp) -{ - return 0; -} - static inline int security_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) { return 0; @@ -3086,11 +2972,6 @@ static inline void security_xfrm_state_free(struct xfrm_state *x) { } -static inline int security_xfrm_state_delete(struct xfrm_state *x) -{ - return 0; -} - static inline int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid, u8 dir) { return 0; @@ -3099,11 +2980,9 @@ static inline int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid #ifdef CONFIG_KEYS #ifdef CONFIG_SECURITY -static inline int security_key_alloc(struct key *key, - struct task_struct *tsk, - unsigned long flags) +static inline int security_key_alloc(struct key *key) { - return security_ops->key_alloc(key, tsk, flags); + return security_ops->key_alloc(key); } static inline void security_key_free(struct key *key) @@ -3120,9 +2999,7 @@ static inline int security_key_permission(key_ref_t key_ref, #else -static inline int security_key_alloc(struct key *key, - struct task_struct *tsk, - unsigned long flags) +static inline int security_key_alloc(struct key *key) { return 0; } diff --git a/include/linux/selinux.h b/include/linux/selinux.h index aad4e390d..4047bcde4 100644 --- a/include/linux/selinux.h +++ b/include/linux/selinux.h @@ -118,27 +118,6 @@ void selinux_get_ipc_sid(const struct kern_ipc_perm *ipcp, u32 *sid); */ void selinux_get_task_sid(struct task_struct *tsk, u32 *sid); -/** - * selinux_string_to_sid - map a security context string to a security ID - * @str: the security context string to be mapped - * @sid: ID value returned via this. - * - * Returns 0 if successful, with the SID stored in sid. A value - * of zero for sid indicates no SID could be determined (but no error - * occurred). - */ -int selinux_string_to_sid(char *str, u32 *sid); - -/** - * selinux_relabel_packet_permission - check permission to relabel a packet - * @sid: ID value to be applied to network packet (via SECMARK, most likely) - * - * Returns 0 if the current task is allowed to label packets with the - * supplied security ID. Note that it is implicit that the packet is always - * being relabeled from the default unlabled value, and that the access - * control decision is made in the AVC. - */ -int selinux_relabel_packet_permission(u32 sid); #else @@ -193,17 +172,6 @@ static inline void selinux_get_task_sid(struct task_struct *tsk, u32 *sid) *sid = 0; } -static inline int selinux_string_to_sid(const char *str, u32 *sid) -{ - *sid = 0; - return 0; -} - -static inline int selinux_relabel_packet_permission(u32 sid) -{ - return 0; -} - #endif /* CONFIG_SECURITY_SELINUX */ #endif /* _LINUX_SELINUX_H */ diff --git a/include/linux/sem.h b/include/linux/sem.h index 9aaffb0b1..3c1f1120f 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -2,6 +2,7 @@ #define _LINUX_SEM_H #include +#include /* semop flags */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ @@ -77,7 +78,6 @@ struct seminfo { #define SEMUSZ 20 /* sizeof struct sem_undo */ #ifdef __KERNEL__ -#include struct task_struct; diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 46000936f..5a0955728 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -26,6 +26,7 @@ * by Keith Owens and Andrea Arcangeli */ +#include #include #include @@ -38,17 +39,9 @@ typedef struct { * These macros triggered gcc-3.x compile-time problems. We think these are * OK now. Be cautious. */ -#define __SEQLOCK_UNLOCKED(lockname) \ - { 0, __SPIN_LOCK_UNLOCKED(lockname) } +#define SEQLOCK_UNLOCKED { 0, SPIN_LOCK_UNLOCKED } +#define seqlock_init(x) do { *(x) = (seqlock_t) SEQLOCK_UNLOCKED; } while (0) -#define SEQLOCK_UNLOCKED \ - __SEQLOCK_UNLOCKED(old_style_seqlock_init) - -#define seqlock_init(x) \ - do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0) - -#define DEFINE_SEQLOCK(x) \ - seqlock_t x = __SEQLOCK_UNLOCKED(x) /* Lock out other writers and update the count. * Acts like a normal spin_lock/unlock. diff --git a/include/linux/serialP.h b/include/linux/serialP.h index e811a615f..2b9e6b955 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h @@ -19,6 +19,7 @@ * For definitions of the flags field, see tty.h */ +#include #include #include #include diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f9fdf9750..bd1485812 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -67,8 +67,8 @@ /* Parisc type numbers. */ #define PORT_MUX 48 -/* Atmel AT91xxx SoC */ -#define PORT_AT91 49 +/* Atmel AT91RM9200 SoC */ +#define PORT_AT91RM9200 49 /* Macintosh Zilog type numbers */ #define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */ @@ -130,11 +130,9 @@ /* SUN4V Hypervisor Console */ #define PORT_SUNHV 72 -#define PORT_S3C2412 73 - - #ifdef __KERNEL__ +#include #include #include #include @@ -216,18 +214,16 @@ struct uart_port { unsigned char __iomem *membase; /* read/write[bwl] */ unsigned int irq; /* irq number */ unsigned int uartclk; /* base uart clock */ - unsigned int fifosize; /* tx fifo size */ + unsigned char fifosize; /* tx fifo size */ unsigned char x_char; /* xon/xoff char */ unsigned char regshift; /* reg offset shift */ unsigned char iotype; /* io access style */ - unsigned char unused1; #define UPIO_PORT (0) #define UPIO_HUB6 (1) #define UPIO_MEM (2) #define UPIO_MEM32 (3) #define UPIO_AU (4) /* Au1x00 type IO */ -#define UPIO_TSI (5) /* Tsi108/109 type IO */ unsigned int read_status_mask; /* driver specific */ unsigned int ignore_status_mask; /* driver specific */ @@ -319,7 +315,6 @@ struct uart_info { #define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) #define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) #define UIF_INITIALIZED ((__force uif_t) (1 << 31)) -#define UIF_SUSPENDED ((__force uif_t) (1 << 30)) int blocked_open; @@ -339,6 +334,7 @@ struct uart_driver { struct module *owner; const char *driver_name; const char *dev_name; + const char *devfs_name; int major; int minor; int nr; diff --git a/include/linux/serio.h b/include/linux/serio.h index 41bdd5ded..6348e8330 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -41,7 +41,6 @@ struct serio { void (*stop)(struct serio *); struct serio *parent, *child; - unsigned int depth; /* level of nesting in serio hierarchy */ struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ diff --git a/include/linux/signal.h b/include/linux/signal.h index 117135e33..70739f51a 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -1,12 +1,38 @@ #ifndef _LINUX_SIGNAL_H #define _LINUX_SIGNAL_H +#include +#include #include #include #ifdef __KERNEL__ -#include -#include + +/* + * These values of sa_flags are used only by the kernel as part of the + * irq handling routines. + * + * SA_INTERRUPT is also used by the irq handling routines. + * SA_SHIRQ is for shared interrupt support on PCI and EISA. + * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur + */ +#define SA_SAMPLE_RANDOM SA_RESTART +#define SA_SHIRQ 0x04000000 +#define SA_PROBEIRQ 0x08000000 + +/* + * As above, these correspond to the IORESOURCE_IRQ_* defines in + * linux/ioport.h to select the interrupt line behaviour. When + * requesting an interrupt without specifying a SA_TRIGGER, the + * setting should be assumed to be "as already configured", which + * may be as per machine or firmware initialisation. + */ +#define SA_TRIGGER_LOW 0x00000008 +#define SA_TRIGGER_HIGH 0x00000004 +#define SA_TRIGGER_FALLING 0x00000002 +#define SA_TRIGGER_RISING 0x00000001 +#define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\ + SA_TRIGGER_RISING|SA_TRIGGER_FALLING) /* * Real Time signals may be queued. diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 099dc5e88..68ed67092 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -14,6 +14,7 @@ #ifndef _LINUX_SKBUFF_H #define _LINUX_SKBUFF_H +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #define HAVE_ALLOC_SKB /* For the drivers to know */ #define HAVE_ALIGNABLE_SKB /* Ditto 8) */ @@ -171,15 +171,10 @@ enum { enum { SKB_GSO_TCPV4 = 1 << 0, - SKB_GSO_UDP = 1 << 1, + SKB_GSO_UDPV4 = 1 << 1, /* This indicates the skb is from an untrusted source. */ SKB_GSO_DODGY = 1 << 2, - - /* This indicates the tcp segment has CWR set. */ - SKB_GSO_TCP_ECN = 1 << 3, - - SKB_GSO_TCPV6 = 1 << 4, }; /** @@ -225,9 +220,6 @@ enum { * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c * @tc_index: Traffic control index * @tc_verd: traffic control verdict - * @dma_cookie: a cookie to one of several possible DMA operations - * done by skb DMA functions - * @secmark: security marking */ struct sk_buff { @@ -313,12 +305,6 @@ struct sk_buff { #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE) xid_t xid; /* VServer context ID */ #endif -#ifdef CONFIG_NET_DMA - dma_cookie_t dma_cookie; -#endif -#ifdef CONFIG_NETWORK_SECMARK - __u32 secmark; -#endif /* These elements must be at the end, see alloc_skb() for details. */ unsigned int truesize; @@ -372,7 +358,7 @@ extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, int newheadroom, int newtailroom, gfp_t priority); -extern int skb_pad(struct sk_buff *skb, int pad); +extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad); #define dev_kfree_skb(a) kfree_skb(a) extern void skb_over_panic(struct sk_buff *skb, int len, void *here); @@ -615,14 +601,6 @@ static inline __u32 skb_queue_len(const struct sk_buff_head *list_) return list_->qlen; } -/* - * This function creates a split out lock class for each invocation; - * this is needed for now since a whole lot of users of the skb-queue - * infrastructure in drivers have different locking usage (in hardirq) - * than the networking core (in softirq only). In the long run either the - * network layer or drivers should need annotation to consolidate the - * main types of usage into 3 classes. - */ static inline void skb_queue_head_init(struct sk_buff_head *list) { spin_lock_init(&list->lock); @@ -1099,7 +1077,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) #ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB /** - * __dev_alloc_skb - allocate an skbuff for receiving + * __dev_alloc_skb - allocate an skbuff for sending * @length: length to allocate * @gfp_mask: get_free_pages mask, passed to alloc_skb * @@ -1108,7 +1086,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list) * the headroom they think they need without accounting for the * built in space. The built in space is used for optimisations. * - * %NULL is returned if there is no free memory. + * %NULL is returned in there is no free memory. */ static inline struct sk_buff *__dev_alloc_skb(unsigned int length, gfp_t gfp_mask) @@ -1123,7 +1101,7 @@ extern struct sk_buff *__dev_alloc_skb(unsigned int length, gfp_t gfp_mask); #endif /** - * dev_alloc_skb - allocate an skbuff for receiving + * dev_alloc_skb - allocate an skbuff for sending * @length: length to allocate * * Allocate a new &sk_buff and assign it a usage count of one. The @@ -1131,7 +1109,7 @@ extern struct sk_buff *__dev_alloc_skb(unsigned int length, gfp_t gfp_mask); * the headroom they think they need without accounting for the * built in space. The built in space is used for optimisations. * - * %NULL is returned if there is no free memory. Although this function + * %NULL is returned in there is no free memory. Although this function * allocates memory it can be called from an interrupt. */ static inline struct sk_buff *dev_alloc_skb(unsigned int length) @@ -1139,28 +1117,6 @@ static inline struct sk_buff *dev_alloc_skb(unsigned int length) return __dev_alloc_skb(length, GFP_ATOMIC); } -extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, - unsigned int length, gfp_t gfp_mask); - -/** - * netdev_alloc_skb - allocate an skbuff for rx on a specific device - * @dev: network device to receive on - * @length: length to allocate - * - * Allocate a new &sk_buff and assign it a usage count of one. The - * buffer has unspecified headroom built in. Users should allocate - * the headroom they think they need without accounting for the - * built in space. The built in space is used for optimisations. - * - * %NULL is returned if there is no free memory. Although this function - * allocates memory it can be called from an interrupt. - */ -static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, - unsigned int length) -{ - return __netdev_alloc_skb(dev, length, GFP_ATOMIC); -} - /** * skb_cow - copy header of skb when it is required * @skb: buffer to cow @@ -1194,15 +1150,16 @@ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) * * Pads up a buffer to ensure the trailing bytes exist and are * blanked. If the buffer already contains sufficient data it - * is untouched. Otherwise it is extended. Returns zero on - * success. The skb is freed on error. + * is untouched. Returns the buffer, which may be a replacement + * for the original, or NULL for out of memory - in which case + * the original buffer is still freed. */ -static inline int skb_padto(struct sk_buff *skb, unsigned int len) +static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len) { unsigned int size = skb->len; if (likely(size >= len)) - return 0; + return skb; return skb_pad(skb, len-size); } @@ -1362,6 +1319,7 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); extern void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); +extern void skb_release_data(struct sk_buff *skb); extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, @@ -1492,24 +1450,6 @@ static inline void nf_reset(struct sk_buff *skb) static inline void nf_reset(struct sk_buff *skb) {} #endif /* CONFIG_NETFILTER */ -#ifdef CONFIG_NETWORK_SECMARK -static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) -{ - to->secmark = from->secmark; -} - -static inline void skb_init_secmark(struct sk_buff *skb) -{ - skb->secmark = 0; -} -#else -static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) -{ } - -static inline void skb_init_secmark(struct sk_buff *skb) -{ } -#endif - static inline int skb_is_gso(const struct sk_buff *skb) { return skb_shinfo(skb)->gso_size; diff --git a/include/linux/slab.h b/include/linux/slab.h index 45ad55b70..2d985d59c 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -11,6 +11,7 @@ typedef struct kmem_cache kmem_cache_t; +#include /* kmalloc_sizes.h needs CONFIG_ options */ #include #include #include @@ -86,51 +87,6 @@ extern void *__kmalloc_track_caller(size_t, gfp_t, void*); __kmalloc_track_caller(size, flags, __builtin_return_address(0)) #endif -/** - * kmalloc - allocate memory - * @size: how many bytes of memory are required. - * @flags: the type of memory to allocate. - * - * kmalloc is the normal method of allocating memory - * in the kernel. - * - * The @flags argument may be one of: - * - * %GFP_USER - Allocate memory on behalf of user. May sleep. - * - * %GFP_KERNEL - Allocate normal kernel ram. May sleep. - * - * %GFP_ATOMIC - Allocation will not sleep. - * For example, use this inside interrupt handlers. - * - * %GFP_HIGHUSER - Allocate pages from high memory. - * - * %GFP_NOIO - Do not do any I/O at all while trying to get memory. - * - * %GFP_NOFS - Do not make any fs calls while trying to get memory. - * - * Also it is possible to set different flags by OR'ing - * in one or more of the following additional @flags: - * - * %__GFP_COLD - Request cache-cold pages instead of - * trying to return cache-warm pages. - * - * %__GFP_DMA - Request memory from the DMA-capable zone. - * - * %__GFP_HIGH - This allocation has high priority and may use emergency pools. - * - * %__GFP_HIGHMEM - Allocated memory may be from highmem. - * - * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail - * (think twice before using). - * - * %__GFP_NORETRY - If memory is not immediately available, - * then give up at once. - * - * %__GFP_NOWARN - If allocation fails, don't issue any warnings. - * - * %__GFP_REPEAT - If allocation fails initially, try once more before failing. - */ static inline void *kmalloc(size_t size, gfp_t flags) { if (__builtin_constant_p(size)) { @@ -156,11 +112,6 @@ found: extern void *__kzalloc(size_t, gfp_t); -/** - * kzalloc - allocate memory. The memory is set to zero. - * @size: how many bytes of memory are required. - * @flags: the type of memory to allocate (see kmalloc). - */ static inline void *kzalloc(size_t size, gfp_t flags) { if (__builtin_constant_p(size)) { diff --git a/include/linux/smb.h b/include/linux/smb.h index ce10216ad..b0162208c 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h @@ -88,6 +88,7 @@ struct smb_fattr { struct timespec f_atime; struct timespec f_mtime; struct timespec f_ctime; + unsigned long f_blksize; unsigned long f_blocks; int f_unix; }; diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 367d6c3e8..621a3d366 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h @@ -10,6 +10,8 @@ #define _LINUX_SMB_FS_H #include +#include +#include /* * ioctl commands @@ -22,8 +24,6 @@ #ifdef __KERNEL__ -#include -#include #include #include diff --git a/include/linux/smp.h b/include/linux/smp.h index 837e8bce1..e2fa3ab4a 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -6,6 +6,7 @@ * Alan Cox. */ +#include extern void cpu_idle(void); @@ -125,6 +126,4 @@ static inline void smp_send_reschedule(int cpu) { } #define put_cpu() preempt_enable() #define put_cpu_no_resched() preempt_enable_no_resched() -void smp_setup_processor_id(void); - #endif /* __LINUX_SMP_H */ diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index cf715a40d..fa1ff3b16 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h @@ -1,6 +1,7 @@ #ifndef __LINUX_SMPLOCK_H #define __LINUX_SMPLOCK_H +#include #ifdef CONFIG_LOCK_KERNEL #include #include diff --git a/include/linux/socket.h b/include/linux/socket.h index 8e7a6840b..24f34248b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -18,6 +18,8 @@ struct __kernel_sockaddr_storage { #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) +#include /* for CONFIG_COMPAT */ +#include #include /* arch-dependent defines */ #include /* the SIOCxxx I/O controls */ #include /* iovec support */ diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index c8bb68099..e928c0dcc 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -642,14 +642,10 @@ struct spi_board_info { u16 bus_num; u16 chip_select; - /* mode becomes spi_device.mode, and is essential for chips - * where the default of SPI_CS_HIGH = 0 is wrong. - */ - u8 mode; - /* ... may need additional spi_device chip config data here. * avoid stuff protocol drivers can set; but include stuff * needed to behave without being bound to a driver: + * - chipselect polarity * - quirks like clock rate mattering when not selected */ }; diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 31473db92..799be6747 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -46,6 +46,7 @@ * linux/spinlock.h: builds the final spin_*() APIs. */ +#include #include #include #include @@ -82,40 +83,14 @@ extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock); /* * Pull the __raw*() functions/declarations (UP-nondebug doesnt need them): */ -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) # include #else # include #endif -#ifdef CONFIG_DEBUG_SPINLOCK - extern void __spin_lock_init(spinlock_t *lock, const char *name, - struct lock_class_key *key); -# define spin_lock_init(lock) \ -do { \ - static struct lock_class_key __key; \ - \ - __spin_lock_init((lock), #lock, &__key); \ -} while (0) - -#else -# define spin_lock_init(lock) \ - do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0) -#endif - -#ifdef CONFIG_DEBUG_SPINLOCK - extern void __rwlock_init(rwlock_t *lock, const char *name, - struct lock_class_key *key); -# define rwlock_init(lock) \ -do { \ - static struct lock_class_key __key; \ - \ - __rwlock_init((lock), #lock, &__key); \ -} while (0) -#else -# define rwlock_init(lock) \ - do { *(lock) = RW_LOCK_UNLOCKED; } while (0) -#endif +#define spin_lock_init(lock) do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0) +#define rwlock_init(lock) do { *(lock) = RW_LOCK_UNLOCKED; } while (0) #define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock) @@ -139,6 +114,7 @@ do { \ #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) extern int _raw_spin_trylock(spinlock_t *lock); extern void _raw_spin_unlock(spinlock_t *lock); + extern void _raw_read_lock(rwlock_t *lock); extern int _raw_read_trylock(rwlock_t *lock); extern void _raw_read_unlock(rwlock_t *lock); @@ -146,17 +122,17 @@ do { \ extern int _raw_write_trylock(rwlock_t *lock); extern void _raw_write_unlock(rwlock_t *lock); #else +# define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) +# define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) # define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock) # define _raw_spin_lock_flags(lock, flags) \ __raw_spin_lock_flags(&(lock)->raw_lock, *(flags)) -# define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) -# define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) # define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock) -# define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) -# define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) # define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock) -# define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) +# define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock) # define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock) +# define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock) +# define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock) #endif #define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock) @@ -172,13 +148,6 @@ do { \ #define write_trylock(lock) __cond_lock(_write_trylock(lock)) #define spin_lock(lock) _spin_lock(lock) - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) -#else -# define spin_lock_nested(lock, subclass) _spin_lock(lock) -#endif - #define write_lock(lock) _write_lock(lock) #define read_lock(lock) _read_lock(lock) @@ -204,18 +173,21 @@ do { \ /* * We inline the unlock functions in the nondebug case: */ -#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || \ - !defined(CONFIG_SMP) +#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) # define spin_unlock(lock) _spin_unlock(lock) # define read_unlock(lock) _read_unlock(lock) # define write_unlock(lock) _write_unlock(lock) -# define spin_unlock_irq(lock) _spin_unlock_irq(lock) -# define read_unlock_irq(lock) _read_unlock_irq(lock) -# define write_unlock_irq(lock) _write_unlock_irq(lock) #else # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) +#endif + +#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) +# define spin_unlock_irq(lock) _spin_unlock_irq(lock) +# define read_unlock_irq(lock) _read_unlock_irq(lock) +# define write_unlock_irq(lock) _write_unlock_irq(lock) +#else # define spin_unlock_irq(lock) \ do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) # define read_unlock_irq(lock) \ diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h index b2c4f8299..78e6989ff 100644 --- a/include/linux/spinlock_api_smp.h +++ b/include/linux/spinlock_api_smp.h @@ -20,8 +20,6 @@ int in_lock_functions(unsigned long addr); #define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t); -void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) - __acquires(spinlock_t); void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t); void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t); void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t); diff --git a/include/linux/spinlock_api_up.h b/include/linux/spinlock_api_up.h index 67faa044c..cd81cee56 100644 --- a/include/linux/spinlock_api_up.h +++ b/include/linux/spinlock_api_up.h @@ -49,7 +49,6 @@ do { local_irq_restore(flags); __UNLOCK(lock); } while (0) #define _spin_lock(lock) __LOCK(lock) -#define _spin_lock_nested(lock, subclass) __LOCK(lock) #define _read_lock(lock) __LOCK(lock) #define _write_lock(lock) __LOCK(lock) #define _spin_lock_bh(lock) __LOCK_BH(lock) diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h index dc5fb69e4..9cb51e070 100644 --- a/include/linux/spinlock_types.h +++ b/include/linux/spinlock_types.h @@ -9,8 +9,6 @@ * Released under the General Public License (GPL). */ -#include - #if defined(CONFIG_SMP) # include #else @@ -26,9 +24,6 @@ typedef struct { unsigned int magic, owner_cpu; void *owner; #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } spinlock_t; #define SPINLOCK_MAGIC 0xdead4ead @@ -42,53 +37,31 @@ typedef struct { unsigned int magic, owner_cpu; void *owner; #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } rwlock_t; #define RWLOCK_MAGIC 0xdeaf1eed #define SPINLOCK_OWNER_INIT ((void *)-1L) -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define SPIN_DEP_MAP_INIT(lockname) .dep_map = { .name = #lockname } -#else -# define SPIN_DEP_MAP_INIT(lockname) -#endif - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define RW_DEP_MAP_INIT(lockname) .dep_map = { .name = #lockname } -#else -# define RW_DEP_MAP_INIT(lockname) -#endif - #ifdef CONFIG_DEBUG_SPINLOCK -# define __SPIN_LOCK_UNLOCKED(lockname) \ +# define SPIN_LOCK_UNLOCKED \ (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, \ .magic = SPINLOCK_MAGIC, \ .owner = SPINLOCK_OWNER_INIT, \ - .owner_cpu = -1, \ - SPIN_DEP_MAP_INIT(lockname) } -#define __RW_LOCK_UNLOCKED(lockname) \ + .owner_cpu = -1 } +#define RW_LOCK_UNLOCKED \ (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, \ .magic = RWLOCK_MAGIC, \ .owner = SPINLOCK_OWNER_INIT, \ - .owner_cpu = -1, \ - RW_DEP_MAP_INIT(lockname) } + .owner_cpu = -1 } #else -# define __SPIN_LOCK_UNLOCKED(lockname) \ - (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, \ - SPIN_DEP_MAP_INIT(lockname) } -#define __RW_LOCK_UNLOCKED(lockname) \ - (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, \ - RW_DEP_MAP_INIT(lockname) } +# define SPIN_LOCK_UNLOCKED \ + (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED } +#define RW_LOCK_UNLOCKED \ + (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED } #endif -#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) -#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init) - -#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) -#define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x) +#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED +#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED #endif /* __LINUX_SPINLOCK_TYPES_H */ diff --git a/include/linux/spinlock_types_up.h b/include/linux/spinlock_types_up.h index 27644af20..04135b0e1 100644 --- a/include/linux/spinlock_types_up.h +++ b/include/linux/spinlock_types_up.h @@ -12,14 +12,10 @@ * Released under the General Public License (GPL). */ -#if defined(CONFIG_DEBUG_SPINLOCK) || \ - defined(CONFIG_DEBUG_LOCK_ALLOC) +#ifdef CONFIG_DEBUG_SPINLOCK typedef struct { volatile unsigned int slock; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } raw_spinlock_t; #define __RAW_SPIN_LOCK_UNLOCKED { 1 } @@ -34,9 +30,6 @@ typedef struct { } raw_spinlock_t; typedef struct { /* no debug version on UP */ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } raw_rwlock_t; #define __RAW_RW_LOCK_UNLOCKED { } diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index ea54c4c9a..31accf2f0 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h @@ -18,6 +18,7 @@ */ #ifdef CONFIG_DEBUG_SPINLOCK + #define __raw_spin_is_locked(x) ((x)->slock == 0) static inline void __raw_spin_lock(raw_spinlock_t *lock) diff --git a/include/linux/squashfs_fs.h b/include/linux/squashfs_fs.h index 47529be7e..54a6e5e6d 100644 --- a/include/linux/squashfs_fs.h +++ b/include/linux/squashfs_fs.h @@ -1,11 +1,9 @@ #ifndef SQUASHFS_FS #define SQUASHFS_FS - /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher + * Copyright (c) 2002, 2003, 2004, 2005 Phillip Lougher * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,10 +22,6 @@ * squashfs_fs.h */ -#ifndef CONFIG_SQUASHFS_2_0_COMPATIBILITY -#define CONFIG_SQUASHFS_2_0_COMPATIBILITY -#endif - #ifdef CONFIG_SQUASHFS_VMALLOC #define SQUASHFS_ALLOC(a) vmalloc(a) #define SQUASHFS_FREE(a) vfree(a) @@ -35,9 +29,9 @@ #define SQUASHFS_ALLOC(a) kmalloc(a, GFP_KERNEL) #define SQUASHFS_FREE(a) kfree(a) #endif -#define SQUASHFS_CACHED_FRAGMENTS 3 -#define SQUASHFS_MAJOR 3 -#define SQUASHFS_MINOR 0 +#define SQUASHFS_CACHED_FRAGMENTS CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE +#define SQUASHFS_MAJOR 2 +#define SQUASHFS_MINOR 1 #define SQUASHFS_MAGIC 0x73717368 #define SQUASHFS_MAGIC_SWAP 0x68737173 #define SQUASHFS_START 0 @@ -60,9 +54,8 @@ #define SQUASHFS_NAME_LEN 256 #define SQUASHFS_INVALID ((long long) 0xffffffffffff) -#define SQUASHFS_INVALID_FRAG ((unsigned int) 0xffffffff) -#define SQUASHFS_INVALID_BLK ((long long) -1) -#define SQUASHFS_USED_BLK ((long long) -2) +#define SQUASHFS_INVALID_BLK ((long long) 0xffffffff) +#define SQUASHFS_USED_BLK ((long long) 0xfffffffe) /* Filesystem flags */ #define SQUASHFS_NOI 0 @@ -72,38 +65,15 @@ #define SQUASHFS_NO_FRAG 4 #define SQUASHFS_ALWAYS_FRAG 5 #define SQUASHFS_DUPLICATE 6 -#define SQUASHFS_EXPORT 7 - #define SQUASHFS_BIT(flag, bit) ((flag >> bit) & 1) - -#define SQUASHFS_UNCOMPRESSED_INODES(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_NOI) - -#define SQUASHFS_UNCOMPRESSED_DATA(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_NOD) - -#define SQUASHFS_UNCOMPRESSED_FRAGMENTS(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_NOF) - -#define SQUASHFS_NO_FRAGMENTS(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_NO_FRAG) - -#define SQUASHFS_ALWAYS_FRAGMENTS(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_ALWAYS_FRAG) - -#define SQUASHFS_DUPLICATES(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_DUPLICATE) - -#define SQUASHFS_EXPORTABLE(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_EXPORT) - -#define SQUASHFS_CHECK_DATA(flags) SQUASHFS_BIT(flags, \ - SQUASHFS_CHECK) - -#define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, \ - duplicate_checking, exortable) (noi | (nod << 1) | (check_data << 2) \ - | (nof << 3) | (no_frag << 4) | (always_frag << 5) | \ - (duplicate_checking << 6) | (exportable << 7)) +#define SQUASHFS_UNCOMPRESSED_INODES(flags) SQUASHFS_BIT(flags, SQUASHFS_NOI) +#define SQUASHFS_UNCOMPRESSED_DATA(flags) SQUASHFS_BIT(flags, SQUASHFS_NOD) +#define SQUASHFS_UNCOMPRESSED_FRAGMENTS(flags) SQUASHFS_BIT(flags, SQUASHFS_NOF) +#define SQUASHFS_NO_FRAGMENTS(flags) SQUASHFS_BIT(flags, SQUASHFS_NO_FRAG) +#define SQUASHFS_ALWAYS_FRAGMENTS(flags) SQUASHFS_BIT(flags, SQUASHFS_ALWAYS_FRAG) +#define SQUASHFS_DUPLICATES(flags) SQUASHFS_BIT(flags, SQUASHFS_DUPLICATE) +#define SQUASHFS_CHECK_DATA(flags) SQUASHFS_BIT(flags, SQUASHFS_CHECK) +#define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, duplicate_checking) (noi | (nod << 1) | (check_data << 2) | (nof << 3) | (no_frag << 4) | (always_frag << 5) | (duplicate_checking << 6)) /* Max number of types and file types */ #define SQUASHFS_DIR_TYPE 1 @@ -114,129 +84,73 @@ #define SQUASHFS_FIFO_TYPE 6 #define SQUASHFS_SOCKET_TYPE 7 #define SQUASHFS_LDIR_TYPE 8 -#define SQUASHFS_LREG_TYPE 9 /* 1.0 filesystem type definitions */ #define SQUASHFS_TYPES 5 #define SQUASHFS_IPC_TYPE 0 -/* Flag whether block is compressed or uncompressed, bit is set if block is - * uncompressed */ +/* Flag whether block is compressed or uncompressed, bit is set if block is uncompressed */ #define SQUASHFS_COMPRESSED_BIT (1 << 15) - #define SQUASHFS_COMPRESSED_SIZE(B) (((B) & ~SQUASHFS_COMPRESSED_BIT) ? \ - (B) & ~SQUASHFS_COMPRESSED_BIT : SQUASHFS_COMPRESSED_BIT) + (B) & ~SQUASHFS_COMPRESSED_BIT : SQUASHFS_COMPRESSED_BIT) #define SQUASHFS_COMPRESSED(B) (!((B) & SQUASHFS_COMPRESSED_BIT)) #define SQUASHFS_COMPRESSED_BIT_BLOCK (1 << 24) +#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B) (((B) & ~SQUASHFS_COMPRESSED_BIT_BLOCK) ? \ + (B) & ~SQUASHFS_COMPRESSED_BIT_BLOCK : SQUASHFS_COMPRESSED_BIT_BLOCK) -#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B) (((B) & \ - ~SQUASHFS_COMPRESSED_BIT_BLOCK) ? (B) & \ - ~SQUASHFS_COMPRESSED_BIT_BLOCK : SQUASHFS_COMPRESSED_BIT_BLOCK) - -#define SQUASHFS_COMPRESSED_BLOCK(B) (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK)) +#define SQUASHFS_COMPRESSED_BLOCK(B) (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK)) /* - * Inode number ops. Inodes consist of a compressed block number, and an - * uncompressed offset within that block + * Inode number ops. Inodes consist of a compressed block number, and an uncompressed + * offset within that block */ #define SQUASHFS_INODE_BLK(a) ((unsigned int) ((a) >> 16)) - #define SQUASHFS_INODE_OFFSET(a) ((unsigned int) ((a) & 0xffff)) - -#define SQUASHFS_MKINODE(A, B) ((squashfs_inode_t)(((squashfs_inode_t) (A)\ - << 16) + (B))) +#define SQUASHFS_MKINODE(A, B) ((squashfs_inode)(((squashfs_inode) (A) << 16)\ + + (B))) /* Compute 32 bit VFS inode number from squashfs inode number */ -#define SQUASHFS_MK_VFS_INODE(a, b) ((unsigned int) (((a) << 8) + \ - ((b) >> 2) + 1)) -/* XXX */ +#define SQUASHFS_MK_VFS_INODE(a, b) ((unsigned int) (((a) << 8) + ((b) >> 2) + 1)) /* Translate between VFS mode and squashfs mode */ #define SQUASHFS_MODE(a) ((a) & 0xfff) /* fragment and fragment table defines */ -#define SQUASHFS_FRAGMENT_BYTES(A) ((A) * sizeof(struct squashfs_fragment_entry)) - -#define SQUASHFS_FRAGMENT_INDEX(A) (SQUASHFS_FRAGMENT_BYTES(A) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEX_OFFSET(A) (SQUASHFS_FRAGMENT_BYTES(A) % \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEXES(A) ((SQUASHFS_FRAGMENT_BYTES(A) + \ - SQUASHFS_METADATA_SIZE - 1) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEX_BYTES(A) (SQUASHFS_FRAGMENT_INDEXES(A) *\ - sizeof(long long)) - -/* inode lookup table defines */ -#define SQUASHFS_LOOKUP_BYTES(A) ((A) * sizeof(squashfs_inode_t)) - -#define SQUASHFS_LOOKUP_BLOCK(A) (SQUASHFS_LOOKUP_BYTES(A) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCK_OFFSET(A) (SQUASHFS_LOOKUP_BYTES(A) % \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCKS(A) ((SQUASHFS_LOOKUP_BYTES(A) + \ - SQUASHFS_METADATA_SIZE - 1) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_LOOKUP_BLOCK_BYTES(A) (SQUASHFS_LOOKUP_BLOCKS(A) *\ - sizeof(long long)) +typedef unsigned int squashfs_fragment_index; +#define SQUASHFS_FRAGMENT_BYTES(A) (A * sizeof(squashfs_fragment_entry)) +#define SQUASHFS_FRAGMENT_INDEX(A) (SQUASHFS_FRAGMENT_BYTES(A) / SQUASHFS_METADATA_SIZE) +#define SQUASHFS_FRAGMENT_INDEX_OFFSET(A) (SQUASHFS_FRAGMENT_BYTES(A) % SQUASHFS_METADATA_SIZE) +#define SQUASHFS_FRAGMENT_INDEXES(A) ((SQUASHFS_FRAGMENT_BYTES(A) + SQUASHFS_METADATA_SIZE - 1) / SQUASHFS_METADATA_SIZE) +#define SQUASHFS_FRAGMENT_INDEX_BYTES(A) (SQUASHFS_FRAGMENT_INDEXES(A) * sizeof(squashfs_fragment_index)) /* cached data constants for filesystem */ #define SQUASHFS_CACHED_BLKS 8 -#define SQUASHFS_MAX_FILE_SIZE_LOG 64 - -#define SQUASHFS_MAX_FILE_SIZE ((long long) 1 << \ - (SQUASHFS_MAX_FILE_SIZE_LOG - 2)) +#define SQUASHFS_MAX_FILE_SIZE_LOG 32 +#define SQUASHFS_MAX_FILE_SIZE ((long long) 1 << (SQUASHFS_MAX_FILE_SIZE_LOG - 1)) #define SQUASHFS_MARKER_BYTE 0xff -/* meta index cache */ -#define SQUASHFS_META_INDEXES (SQUASHFS_METADATA_SIZE / sizeof(unsigned int)) -#define SQUASHFS_META_ENTRIES 31 -#define SQUASHFS_META_NUMBER 8 -#define SQUASHFS_SLOTS 4 - -struct meta_entry { - long long data_block; - unsigned int index_block; - unsigned short offset; - unsigned short pad; -}; - -struct meta_index { - unsigned int inode_number; - unsigned int offset; - unsigned short entries; - unsigned short skip; - unsigned short locked; - unsigned short pad; - struct meta_entry meta_entry[SQUASHFS_META_ENTRIES]; -}; - /* * definitions for structures on disk */ -typedef long long squashfs_block_t; -typedef long long squashfs_inode_t; +typedef unsigned int squashfs_block; +typedef long long squashfs_inode; + +typedef unsigned int squashfs_uid; -struct squashfs_super_block { +typedef struct squashfs_super_block { unsigned int s_magic; unsigned int inodes; - unsigned int bytes_used_2; - unsigned int uid_start_2; - unsigned int guid_start_2; - unsigned int inode_table_start_2; - unsigned int directory_table_start_2; + unsigned int bytes_used; + unsigned int uid_start; + unsigned int guid_start; + unsigned int inode_table_start; + unsigned int directory_table_start; unsigned int s_major:16; unsigned int s_minor:16; unsigned int block_size_1:16; @@ -245,125 +159,108 @@ struct squashfs_super_block { unsigned int no_uids:8; unsigned int no_guids:8; unsigned int mkfs_time /* time of filesystem creation */; - squashfs_inode_t root_inode; + squashfs_inode root_inode; unsigned int block_size; unsigned int fragments; - unsigned int fragment_table_start_2; - long long bytes_used; - long long uid_start; - long long guid_start; - long long inode_table_start; - long long directory_table_start; - long long fragment_table_start; - long long lookup_table_start; -} __attribute__ ((packed)); - -struct squashfs_dir_index { - unsigned int index; - unsigned int start_block; + unsigned int fragment_table_start; +} __attribute__ ((packed)) squashfs_super_block; + +typedef struct { + unsigned int index:27; + unsigned int start_block:29; unsigned char size; unsigned char name[0]; -} __attribute__ ((packed)); - -#define SQUASHFS_BASE_INODE_HEADER \ - unsigned int inode_type:4; \ - unsigned int mode:12; \ - unsigned int uid:8; \ - unsigned int guid:8; \ - unsigned int mtime; \ - unsigned int inode_number; - -struct squashfs_base_inode_header { - SQUASHFS_BASE_INODE_HEADER; -} __attribute__ ((packed)); - -struct squashfs_ipc_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; -} __attribute__ ((packed)); - -struct squashfs_dev_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; +} __attribute__ ((packed)) squashfs_dir_index; + +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ +} __attribute__ ((packed)) squashfs_base_inode_header; + +typedef squashfs_base_inode_header squashfs_ipc_inode_header; + +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ unsigned short rdev; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_dev_inode_header; -struct squashfs_symlink_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ unsigned short symlink_size; char symlink[0]; -} __attribute__ ((packed)); - -struct squashfs_reg_inode_header { - SQUASHFS_BASE_INODE_HEADER; - squashfs_block_t start_block; - unsigned int fragment; - unsigned int offset; - unsigned int file_size; - unsigned short block_list[0]; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_symlink_inode_header; -struct squashfs_lreg_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; - squashfs_block_t start_block; +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ + unsigned int mtime; + squashfs_block start_block; unsigned int fragment; unsigned int offset; - long long file_size; + unsigned int file_size:SQUASHFS_MAX_FILE_SIZE_LOG; unsigned short block_list[0]; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_reg_inode_header; -struct squashfs_dir_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ unsigned int file_size:19; unsigned int offset:13; - unsigned int start_block; - unsigned int parent_inode; -} __attribute__ ((packed)); + unsigned int mtime; + unsigned int start_block:24; +} __attribute__ ((packed)) squashfs_dir_inode_header; -struct squashfs_ldir_inode_header { - SQUASHFS_BASE_INODE_HEADER; - unsigned int nlink; +typedef struct { + unsigned int inode_type:4; + unsigned int mode:12; /* protection */ + unsigned int uid:8; /* index into uid table */ + unsigned int guid:8; /* index into guid table */ unsigned int file_size:27; unsigned int offset:13; - unsigned int start_block; + unsigned int mtime; + unsigned int start_block:24; unsigned int i_count:16; - unsigned int parent_inode; - struct squashfs_dir_index index[0]; -} __attribute__ ((packed)); - -union squashfs_inode_header { - struct squashfs_base_inode_header base; - struct squashfs_dev_inode_header dev; - struct squashfs_symlink_inode_header symlink; - struct squashfs_reg_inode_header reg; - struct squashfs_lreg_inode_header lreg; - struct squashfs_dir_inode_header dir; - struct squashfs_ldir_inode_header ldir; - struct squashfs_ipc_inode_header ipc; -}; + squashfs_dir_index index[0]; +} __attribute__ ((packed)) squashfs_ldir_inode_header; + +typedef union { + squashfs_base_inode_header base; + squashfs_dev_inode_header dev; + squashfs_symlink_inode_header symlink; + squashfs_reg_inode_header reg; + squashfs_dir_inode_header dir; + squashfs_ldir_inode_header ldir; + squashfs_ipc_inode_header ipc; +} squashfs_inode_header; -struct squashfs_dir_entry { +typedef struct { unsigned int offset:13; unsigned int type:3; unsigned int size:8; - int inode_number:16; char name[0]; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_dir_entry; -struct squashfs_dir_header { +typedef struct { unsigned int count:8; - unsigned int start_block; - unsigned int inode_number; -} __attribute__ ((packed)); + unsigned int start_block:24; +} __attribute__ ((packed)) squashfs_dir_header; -struct squashfs_fragment_entry { - long long start_block; +typedef struct { + unsigned int start_block; unsigned int size; - unsigned int pending; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_fragment_entry; extern int squashfs_uncompress_block(void *d, int dstlen, void *s, int srclen); extern int squashfs_uncompress_init(void); @@ -371,28 +268,20 @@ extern int squashfs_uncompress_exit(void); /* * macros to convert each packed bitfield structure from little endian to big - * endian and vice versa. These are needed when creating or using a filesystem - * on a machine with different byte ordering to the target architecture. + * endian and vice versa. These are needed when creating or using a filesystem on a + * machine with different byte ordering to the target architecture. * */ -#define SQUASHFS_SWAP_START \ - int bits;\ - int b_pos;\ - unsigned long long val;\ - unsigned char *s;\ - unsigned char *d; - #define SQUASHFS_SWAP_SUPER_BLOCK(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_super_block));\ + SQUASHFS_MEMSET(s, d, sizeof(squashfs_super_block));\ SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\ SQUASHFS_SWAP((s)->inodes, d, 32, 32);\ - SQUASHFS_SWAP((s)->bytes_used_2, d, 64, 32);\ - SQUASHFS_SWAP((s)->uid_start_2, d, 96, 32);\ - SQUASHFS_SWAP((s)->guid_start_2, d, 128, 32);\ - SQUASHFS_SWAP((s)->inode_table_start_2, d, 160, 32);\ - SQUASHFS_SWAP((s)->directory_table_start_2, d, 192, 32);\ + SQUASHFS_SWAP((s)->bytes_used, d, 64, 32);\ + SQUASHFS_SWAP((s)->uid_start, d, 96, 32);\ + SQUASHFS_SWAP((s)->guid_start, d, 128, 32);\ + SQUASHFS_SWAP((s)->inode_table_start, d, 160, 32);\ + SQUASHFS_SWAP((s)->directory_table_start, d, 192, 32);\ SQUASHFS_SWAP((s)->s_major, d, 224, 16);\ SQUASHFS_SWAP((s)->s_minor, d, 240, 16);\ SQUASHFS_SWAP((s)->block_size_1, d, 256, 16);\ @@ -404,221 +293,153 @@ extern int squashfs_uncompress_exit(void); SQUASHFS_SWAP((s)->root_inode, d, 344, 64);\ SQUASHFS_SWAP((s)->block_size, d, 408, 32);\ SQUASHFS_SWAP((s)->fragments, d, 440, 32);\ - SQUASHFS_SWAP((s)->fragment_table_start_2, d, 472, 32);\ - SQUASHFS_SWAP((s)->bytes_used, d, 504, 64);\ - SQUASHFS_SWAP((s)->uid_start, d, 568, 64);\ - SQUASHFS_SWAP((s)->guid_start, d, 632, 64);\ - SQUASHFS_SWAP((s)->inode_table_start, d, 696, 64);\ - SQUASHFS_SWAP((s)->directory_table_start, d, 760, 64);\ - SQUASHFS_SWAP((s)->fragment_table_start, d, 824, 64);\ - SQUASHFS_SWAP((s)->lookup_table_start, d, 888, 64);\ + SQUASHFS_SWAP((s)->fragment_table_start, d, 472, 32);\ } -#define SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\ +#define SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, n) {\ SQUASHFS_MEMSET(s, d, n);\ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\ SQUASHFS_SWAP((s)->mode, d, 4, 12);\ SQUASHFS_SWAP((s)->uid, d, 16, 8);\ SQUASHFS_SWAP((s)->guid, d, 24, 8);\ - SQUASHFS_SWAP((s)->mtime, d, 32, 32);\ - SQUASHFS_SWAP((s)->inode_number, d, 64, 32); - -#define SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, n) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\ } -#define SQUASHFS_SWAP_IPC_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_ipc_inode_header))\ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ -} +#define SQUASHFS_SWAP_IPC_INODE_HEADER(s, d) SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_ipc_inode_header)) #define SQUASHFS_SWAP_DEV_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_dev_inode_header)); \ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ - SQUASHFS_SWAP((s)->rdev, d, 128, 16);\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dev_inode_header));\ + SQUASHFS_SWAP((s)->rdev, d, 32, 16);\ } #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_symlink_inode_header));\ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ - SQUASHFS_SWAP((s)->symlink_size, d, 128, 16);\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_symlink_inode_header));\ + SQUASHFS_SWAP((s)->symlink_size, d, 32, 16);\ } #define SQUASHFS_SWAP_REG_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_reg_inode_header));\ - SQUASHFS_SWAP((s)->start_block, d, 96, 64);\ - SQUASHFS_SWAP((s)->fragment, d, 160, 32);\ - SQUASHFS_SWAP((s)->offset, d, 192, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 224, 32);\ -} - -#define SQUASHFS_SWAP_LREG_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_lreg_inode_header));\ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ - SQUASHFS_SWAP((s)->start_block, d, 128, 64);\ - SQUASHFS_SWAP((s)->fragment, d, 192, 32);\ - SQUASHFS_SWAP((s)->offset, d, 224, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 256, 64);\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_reg_inode_header));\ + SQUASHFS_SWAP((s)->mtime, d, 32, 32);\ + SQUASHFS_SWAP((s)->start_block, d, 64, 32);\ + SQUASHFS_SWAP((s)->fragment, d, 96, 32);\ + SQUASHFS_SWAP((s)->offset, d, 128, 32);\ + SQUASHFS_SWAP((s)->file_size, d, 160, SQUASHFS_MAX_FILE_SIZE_LOG);\ } #define SQUASHFS_SWAP_DIR_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_dir_inode_header));\ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 128, 19);\ - SQUASHFS_SWAP((s)->offset, d, 147, 13);\ - SQUASHFS_SWAP((s)->start_block, d, 160, 32);\ - SQUASHFS_SWAP((s)->parent_inode, d, 192, 32);\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dir_inode_header));\ + SQUASHFS_SWAP((s)->file_size, d, 32, 19);\ + SQUASHFS_SWAP((s)->offset, d, 51, 13);\ + SQUASHFS_SWAP((s)->mtime, d, 64, 32);\ + SQUASHFS_SWAP((s)->start_block, d, 96, 24);\ } #define SQUASHFS_SWAP_LDIR_INODE_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \ - sizeof(struct squashfs_ldir_inode_header));\ - SQUASHFS_SWAP((s)->nlink, d, 96, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 128, 27);\ - SQUASHFS_SWAP((s)->offset, d, 155, 13);\ - SQUASHFS_SWAP((s)->start_block, d, 168, 32);\ - SQUASHFS_SWAP((s)->i_count, d, 200, 16);\ - SQUASHFS_SWAP((s)->parent_inode, d, 216, 32);\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_ldir_inode_header));\ + SQUASHFS_SWAP((s)->file_size, d, 32, 27);\ + SQUASHFS_SWAP((s)->offset, d, 59, 13);\ + SQUASHFS_SWAP((s)->mtime, d, 72, 32);\ + SQUASHFS_SWAP((s)->start_block, d, 104, 24);\ + SQUASHFS_SWAP((s)->i_count, d, 128, 16);\ } #define SQUASHFS_SWAP_DIR_INDEX(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index));\ - SQUASHFS_SWAP((s)->index, d, 0, 32);\ - SQUASHFS_SWAP((s)->start_block, d, 32, 32);\ - SQUASHFS_SWAP((s)->size, d, 64, 8);\ + SQUASHFS_MEMSET(s, d, sizeof(squashfs_dir_index));\ + SQUASHFS_SWAP((s)->index, d, 0, 27);\ + SQUASHFS_SWAP((s)->start_block, d, 27, 29);\ + SQUASHFS_SWAP((s)->size, d, 56, 8);\ } #define SQUASHFS_SWAP_DIR_HEADER(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header));\ + SQUASHFS_MEMSET(s, d, sizeof(squashfs_dir_header));\ SQUASHFS_SWAP((s)->count, d, 0, 8);\ - SQUASHFS_SWAP((s)->start_block, d, 8, 32);\ - SQUASHFS_SWAP((s)->inode_number, d, 40, 32);\ + SQUASHFS_SWAP((s)->start_block, d, 8, 24);\ } #define SQUASHFS_SWAP_DIR_ENTRY(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry));\ + SQUASHFS_MEMSET(s, d, sizeof(squashfs_dir_entry));\ SQUASHFS_SWAP((s)->offset, d, 0, 13);\ SQUASHFS_SWAP((s)->type, d, 13, 3);\ SQUASHFS_SWAP((s)->size, d, 16, 8);\ - SQUASHFS_SWAP((s)->inode_number, d, 24, 16);\ } #define SQUASHFS_SWAP_FRAGMENT_ENTRY(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry));\ - SQUASHFS_SWAP((s)->start_block, d, 0, 64);\ - SQUASHFS_SWAP((s)->size, d, 64, 32);\ + SQUASHFS_MEMSET(s, d, sizeof(squashfs_fragment_entry));\ + SQUASHFS_SWAP((s)->start_block, d, 0, 32);\ + SQUASHFS_SWAP((s)->size, d, 32, 32);\ } -#define SQUASHFS_SWAP_INODE_T(s, d) SQUASHFS_SWAP_LONG_LONGS(s, d, 1) - #define SQUASHFS_SWAP_SHORTS(s, d, n) {\ int entry;\ int bit_position;\ - SQUASHFS_SWAP_START\ SQUASHFS_MEMSET(s, d, n * 2);\ - for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \ - 16)\ + for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += 16)\ SQUASHFS_SWAP(s[entry], d, bit_position, 16);\ } #define SQUASHFS_SWAP_INTS(s, d, n) {\ int entry;\ int bit_position;\ - SQUASHFS_SWAP_START\ SQUASHFS_MEMSET(s, d, n * 4);\ - for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \ - 32)\ + for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += 32)\ SQUASHFS_SWAP(s[entry], d, bit_position, 32);\ } -#define SQUASHFS_SWAP_LONG_LONGS(s, d, n) {\ - int entry;\ - int bit_position;\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, n * 8);\ - for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \ - 64)\ - SQUASHFS_SWAP(s[entry], d, bit_position, 64);\ -} - #define SQUASHFS_SWAP_DATA(s, d, n, bits) {\ int entry;\ int bit_position;\ - SQUASHFS_SWAP_START\ SQUASHFS_MEMSET(s, d, n * bits / 8);\ - for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \ - bits)\ + for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += bits)\ SQUASHFS_SWAP(s[entry], d, bit_position, bits);\ } -#define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n) -#define SQUASHFS_SWAP_LOOKUP_BLOCKS(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n) - -#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY +#define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_INTS(s, d, n) -struct squashfs_base_inode_header_1 { +#ifdef SQUASHFS_1_0_COMPATIBILITY +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ unsigned int guid:4; /* index into guid table */ -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_base_inode_header_1; -struct squashfs_ipc_inode_header_1 { +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ unsigned int guid:4; /* index into guid table */ unsigned int type:4; unsigned int offset:4; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_ipc_inode_header_1; -struct squashfs_dev_inode_header_1 { +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ unsigned int guid:4; /* index into guid table */ unsigned short rdev; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_dev_inode_header_1; -struct squashfs_symlink_inode_header_1 { +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ unsigned int guid:4; /* index into guid table */ unsigned short symlink_size; char symlink[0]; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_symlink_inode_header_1; -struct squashfs_reg_inode_header_1 { +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ unsigned int guid:4; /* index into guid table */ unsigned int mtime; - unsigned int start_block; - unsigned int file_size:32; + squashfs_block start_block; + unsigned int file_size:SQUASHFS_MAX_FILE_SIZE_LOG; unsigned short block_list[0]; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_reg_inode_header_1; -struct squashfs_dir_inode_header_1 { +typedef struct { unsigned int inode_type:4; unsigned int mode:12; /* protection */ unsigned int uid:4; /* index into uid table */ @@ -627,308 +448,72 @@ struct squashfs_dir_inode_header_1 { unsigned int offset:13; unsigned int mtime; unsigned int start_block:24; -} __attribute__ ((packed)); +} __attribute__ ((packed)) squashfs_dir_inode_header_1; -#define SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n) \ +#define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\ SQUASHFS_MEMSET(s, d, n);\ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\ SQUASHFS_SWAP((s)->mode, d, 4, 12);\ SQUASHFS_SWAP((s)->uid, d, 16, 4);\ - SQUASHFS_SWAP((s)->guid, d, 20, 4); - -#define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n)\ + SQUASHFS_SWAP((s)->guid, d, 20, 4);\ } #define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \ - sizeof(struct squashfs_ipc_inode_header_1));\ + SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, sizeof(squashfs_ipc_inode_header_1));\ SQUASHFS_SWAP((s)->type, d, 24, 4);\ SQUASHFS_SWAP((s)->offset, d, 28, 4);\ } #define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \ - sizeof(struct squashfs_dev_inode_header_1));\ + SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, sizeof(squashfs_dev_inode_header_1));\ SQUASHFS_SWAP((s)->rdev, d, 24, 16);\ } #define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \ - sizeof(struct squashfs_symlink_inode_header_1));\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_symlink_inode_header_1));\ SQUASHFS_SWAP((s)->symlink_size, d, 24, 16);\ } #define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \ - sizeof(struct squashfs_reg_inode_header_1));\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_reg_inode_header_1));\ SQUASHFS_SWAP((s)->mtime, d, 24, 32);\ SQUASHFS_SWAP((s)->start_block, d, 56, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 88, 32);\ + SQUASHFS_SWAP((s)->file_size, d, 88, SQUASHFS_MAX_FILE_SIZE_LOG);\ } #define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \ - sizeof(struct squashfs_dir_inode_header_1));\ + SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, sizeof(squashfs_dir_inode_header_1));\ SQUASHFS_SWAP((s)->file_size, d, 24, 19);\ SQUASHFS_SWAP((s)->offset, d, 43, 13);\ SQUASHFS_SWAP((s)->mtime, d, 56, 32);\ SQUASHFS_SWAP((s)->start_block, d, 88, 24);\ } - -#endif - -#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY - -struct squashfs_dir_index_2 { - unsigned int index:27; - unsigned int start_block:29; - unsigned char size; - unsigned char name[0]; -} __attribute__ ((packed)); - -struct squashfs_base_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ -} __attribute__ ((packed)); - -struct squashfs_ipc_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ -} __attribute__ ((packed)); - -struct squashfs_dev_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ - unsigned short rdev; -} __attribute__ ((packed)); - -struct squashfs_symlink_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ - unsigned short symlink_size; - char symlink[0]; -} __attribute__ ((packed)); - -struct squashfs_reg_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ - unsigned int mtime; - unsigned int start_block; - unsigned int fragment; - unsigned int offset; - unsigned int file_size:32; - unsigned short block_list[0]; -} __attribute__ ((packed)); - -struct squashfs_dir_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ - unsigned int file_size:19; - unsigned int offset:13; - unsigned int mtime; - unsigned int start_block:24; -} __attribute__ ((packed)); - -struct squashfs_ldir_inode_header_2 { - unsigned int inode_type:4; - unsigned int mode:12; /* protection */ - unsigned int uid:8; /* index into uid table */ - unsigned int guid:8; /* index into guid table */ - unsigned int file_size:27; - unsigned int offset:13; - unsigned int mtime; - unsigned int start_block:24; - unsigned int i_count:16; - struct squashfs_dir_index_2 index[0]; -} __attribute__ ((packed)); - -union squashfs_inode_header_2 { - struct squashfs_base_inode_header_2 base; - struct squashfs_dev_inode_header_2 dev; - struct squashfs_symlink_inode_header_2 symlink; - struct squashfs_reg_inode_header_2 reg; - struct squashfs_dir_inode_header_2 dir; - struct squashfs_ldir_inode_header_2 ldir; - struct squashfs_ipc_inode_header_2 ipc; -}; - -struct squashfs_dir_header_2 { - unsigned int count:8; - unsigned int start_block:24; -} __attribute__ ((packed)); - -struct squashfs_dir_entry_2 { - unsigned int offset:13; - unsigned int type:3; - unsigned int size:8; - char name[0]; -} __attribute__ ((packed)); - -struct squashfs_fragment_entry_2 { - unsigned int start_block; - unsigned int size; -} __attribute__ ((packed)); - -#define SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\ - SQUASHFS_MEMSET(s, d, n);\ - SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\ - SQUASHFS_SWAP((s)->mode, d, 4, 12);\ - SQUASHFS_SWAP((s)->uid, d, 16, 8);\ - SQUASHFS_SWAP((s)->guid, d, 24, 8);\ - -#define SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, n) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\ -} - -#define SQUASHFS_SWAP_IPC_INODE_HEADER_2(s, d) \ - SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, sizeof(struct squashfs_ipc_inode_header_2)) - -#define SQUASHFS_SWAP_DEV_INODE_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \ - sizeof(struct squashfs_dev_inode_header_2)); \ - SQUASHFS_SWAP((s)->rdev, d, 32, 16);\ -} - -#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \ - sizeof(struct squashfs_symlink_inode_header_2));\ - SQUASHFS_SWAP((s)->symlink_size, d, 32, 16);\ -} - -#define SQUASHFS_SWAP_REG_INODE_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \ - sizeof(struct squashfs_reg_inode_header_2));\ - SQUASHFS_SWAP((s)->mtime, d, 32, 32);\ - SQUASHFS_SWAP((s)->start_block, d, 64, 32);\ - SQUASHFS_SWAP((s)->fragment, d, 96, 32);\ - SQUASHFS_SWAP((s)->offset, d, 128, 32);\ - SQUASHFS_SWAP((s)->file_size, d, 160, 32);\ -} - -#define SQUASHFS_SWAP_DIR_INODE_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \ - sizeof(struct squashfs_dir_inode_header_2));\ - SQUASHFS_SWAP((s)->file_size, d, 32, 19);\ - SQUASHFS_SWAP((s)->offset, d, 51, 13);\ - SQUASHFS_SWAP((s)->mtime, d, 64, 32);\ - SQUASHFS_SWAP((s)->start_block, d, 96, 24);\ -} - -#define SQUASHFS_SWAP_LDIR_INODE_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \ - sizeof(struct squashfs_ldir_inode_header_2));\ - SQUASHFS_SWAP((s)->file_size, d, 32, 27);\ - SQUASHFS_SWAP((s)->offset, d, 59, 13);\ - SQUASHFS_SWAP((s)->mtime, d, 72, 32);\ - SQUASHFS_SWAP((s)->start_block, d, 104, 24);\ - SQUASHFS_SWAP((s)->i_count, d, 128, 16);\ -} - -#define SQUASHFS_SWAP_DIR_INDEX_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_2));\ - SQUASHFS_SWAP((s)->index, d, 0, 27);\ - SQUASHFS_SWAP((s)->start_block, d, 27, 29);\ - SQUASHFS_SWAP((s)->size, d, 56, 8);\ -} -#define SQUASHFS_SWAP_DIR_HEADER_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_2));\ - SQUASHFS_SWAP((s)->count, d, 0, 8);\ - SQUASHFS_SWAP((s)->start_block, d, 8, 24);\ -} - -#define SQUASHFS_SWAP_DIR_ENTRY_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_2));\ - SQUASHFS_SWAP((s)->offset, d, 0, 13);\ - SQUASHFS_SWAP((s)->type, d, 13, 3);\ - SQUASHFS_SWAP((s)->size, d, 16, 8);\ -} - -#define SQUASHFS_SWAP_FRAGMENT_ENTRY_2(s, d) {\ - SQUASHFS_SWAP_START\ - SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_2));\ - SQUASHFS_SWAP((s)->start_block, d, 0, 32);\ - SQUASHFS_SWAP((s)->size, d, 32, 32);\ -} - -#define SQUASHFS_SWAP_FRAGMENT_INDEXES_2(s, d, n) SQUASHFS_SWAP_INTS(s, d, n) - -/* fragment and fragment table defines */ -#define SQUASHFS_FRAGMENT_BYTES_2(A) (A * sizeof(struct squashfs_fragment_entry_2)) - -#define SQUASHFS_FRAGMENT_INDEX_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEX_OFFSET_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) % \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEXES_2(A) ((SQUASHFS_FRAGMENT_BYTES_2(A) + \ - SQUASHFS_METADATA_SIZE - 1) / \ - SQUASHFS_METADATA_SIZE) - -#define SQUASHFS_FRAGMENT_INDEX_BYTES_2(A) (SQUASHFS_FRAGMENT_INDEXES_2(A) *\ - sizeof(int)) - #endif #ifdef __KERNEL__ - /* * macros used to swap each structure entry, taking into account - * bitfields and different bitfield placing conventions on differing - * architectures + * bitfields and different bitfield placing conventions on differing architectures */ - #include - #ifdef __BIG_ENDIAN /* convert from little endian to big endian */ -#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \ - tbits, b_pos) +#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, b_pos) #else /* convert from big endian to little endian */ -#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \ - tbits, 64 - tbits - b_pos) +#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, 64 - tbits - b_pos) #endif #define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\ - b_pos = pos % 8;\ - val = 0;\ - s = (unsigned char *)p + (pos / 8);\ - d = ((unsigned char *) &val) + 7;\ + int bits;\ + int b_pos = pos % 8;\ + unsigned long long val = 0;\ + unsigned char *s = (unsigned char *)p + (pos / 8);\ + unsigned char *d = ((unsigned char *) &val) + 7;\ for(bits = 0; bits < (tbits + b_pos); bits += 8) \ *d-- = *s++;\ value = (val >> (SHIFT))/* & ((1 << tbits) - 1)*/;\ } - #define SQUASHFS_MEMSET(s, d, n) memset(s, 0, n); - #endif #endif diff --git a/include/linux/squashfs_fs_i.h b/include/linux/squashfs_fs_i.h index d0cf810a8..0d6a8795a 100644 --- a/include/linux/squashfs_fs_i.h +++ b/include/linux/squashfs_fs_i.h @@ -3,8 +3,7 @@ /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher + * Copyright (c) 2002, 2003, 2004, 2005 Phillip Lougher * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,23 +22,22 @@ * squashfs_fs_i.h */ -struct squashfs_inode_info { - long long start_block; +typedef struct squashfs_inode_info { + unsigned int start_block; + unsigned int block_list_start; unsigned int offset; union { struct { - long long fragment_start_block; + unsigned int fragment_start_block; unsigned int fragment_size; unsigned int fragment_offset; - long long block_list_start; } s1; struct { - long long directory_index_start; + unsigned int directory_index_start; unsigned int directory_index_offset; unsigned int directory_index_count; - unsigned int parent_inode; } s2; } u; struct inode vfs_inode; -}; + } squashfs_inode_info; #endif diff --git a/include/linux/squashfs_fs_sb.h b/include/linux/squashfs_fs_sb.h index 4e61e98ec..615a8cee2 100644 --- a/include/linux/squashfs_fs_sb.h +++ b/include/linux/squashfs_fs_sb.h @@ -3,8 +3,7 @@ /* * Squashfs * - * Copyright (c) 2002, 2003, 2004, 2005, 2006 - * Phillip Lougher + * Copyright (c) 2002, 2003, 2004, 2005 Phillip Lougher * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,52 +24,42 @@ #include -struct squashfs_cache { - long long block; +typedef struct { + unsigned int block; int length; - long long next_index; + unsigned int next_index; char *data; -}; + } squashfs_cache; struct squashfs_fragment_cache { - long long block; + unsigned int block; int length; unsigned int locked; char *data; -}; + }; -struct squashfs_sb_info { - struct squashfs_super_block sblk; +typedef struct squashfs_sb_info { + squashfs_super_block sBlk; int devblksize; int devblksize_log2; int swap; - struct squashfs_cache *block_cache; + squashfs_cache *block_cache; struct squashfs_fragment_cache *fragment; int next_cache; int next_fragment; - int next_meta_index; - unsigned int *uid; - unsigned int *guid; - long long *fragment_index; - unsigned int *fragment_index_2; + squashfs_uid *uid; + squashfs_uid *guid; + squashfs_fragment_index *fragment_index; unsigned int read_size; char *read_data; char *read_page; - struct semaphore read_data_mutex; struct semaphore read_page_mutex; struct semaphore block_cache_mutex; struct semaphore fragment_mutex; - struct semaphore meta_index_mutex; wait_queue_head_t waitq; wait_queue_head_t fragment_wait_queue; - struct meta_index *meta_index; - z_stream stream; - long long *inode_lookup_table; - int (*read_inode)(struct inode *i, squashfs_inode_t \ - inode); - long long (*read_blocklist)(struct inode *inode, int \ - index, int readahead_blks, char *block_list, \ - unsigned short **block_p, unsigned int *bsize); - int (*read_fragment_index_table)(struct super_block *s); -}; + struct inode *(*iget)(struct super_block *s, squashfs_inode inode); + unsigned int (*read_blocklist)(struct inode *inode, int index, int readahead_blks, + char *block_list, unsigned short **block_p, unsigned int *bsize); + } squashfs_sb_info; #endif diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h deleted file mode 100644 index 50e2b01e5..000000000 --- a/include/linux/stacktrace.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __LINUX_STACKTRACE_H -#define __LINUX_STACKTRACE_H - -#ifdef CONFIG_STACKTRACE -struct stack_trace { - unsigned int nr_entries, max_entries; - unsigned long *entries; - int skip; /* input argument: How many entries to skip */ - int all_contexts; /* input argument: if true do than one stack */ -}; - -extern void save_stack_trace(struct stack_trace *trace, - struct task_struct *task); - -extern void print_stack_trace(struct stack_trace *trace, int spaces); -#else -# define save_stack_trace(trace, task) do { } while (0) -# define print_stack_trace(trace) do { } while (0) -#endif - -#endif diff --git a/include/linux/stat.h b/include/linux/stat.h index b2d3bc720..512df9852 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h @@ -57,7 +57,7 @@ #include struct kstat { - u64 ino; + unsigned long ino; dev_t dev; umode_t mode; unsigned int nlink; diff --git a/include/linux/stddef.h b/include/linux/stddef.h index ea65dfb60..b3a2cadf9 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h @@ -10,13 +10,11 @@ #define NULL ((void *)0) #endif -#ifdef __KERNEL__ #undef offsetof #ifdef __compiler_offsetof #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) #else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif -#endif /* __KERNEL__ */ #endif diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 5bfc553bd..151a803ed 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h @@ -4,6 +4,7 @@ very heavy lock, which is equivalent to grabbing every spinlock (and more). So the "read" side to such a lock is anything which diables preeempt. */ +#include #include #include diff --git a/include/linux/string.h b/include/linux/string.h index e4c755860..c61306da8 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -56,7 +56,6 @@ extern char * strnchr(const char *, size_t, int); #ifndef __HAVE_ARCH_STRRCHR extern char * strrchr(const char *,int); #endif -extern char * strstrip(char *); #ifndef __HAVE_ARCH_STRSTR extern char * strstr(const char *,const char *); #endif diff --git a/include/linux/sunrpc/Kbuild b/include/linux/sunrpc/Kbuild deleted file mode 100644 index fb438f158..000000000 --- a/include/linux/sunrpc/Kbuild +++ /dev/null @@ -1 +0,0 @@ -unifdef-y += debug.h diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index bb6b93b6c..b27c818da 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -11,6 +11,7 @@ #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index e4729aa67..1a42d902b 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -9,6 +9,19 @@ #ifndef _LINUX_SUNRPC_DEBUG_H_ #define _LINUX_SUNRPC_DEBUG_H_ +#include + +#include +#include + +/* + * Enable RPC debugging/profiling. + */ +#ifdef CONFIG_SYSCTL +#define RPC_DEBUG +#endif +/* #define RPC_PROFILE */ + /* * RPC debug facilities */ @@ -28,17 +41,6 @@ #ifdef __KERNEL__ -#include -#include - -/* - * Enable RPC debugging/profiling. - */ -#ifdef CONFIG_SYSCTL -#define RPC_DEBUG -#endif -/* #define RPC_PROFILE */ - /* * Debugging macros etc */ diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 6e112cc5c..9b8bcf125 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h @@ -126,7 +126,7 @@ struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); /* Just increments the mechanism's reference count and returns its input: */ struct gss_api_mech * gss_mech_get(struct gss_api_mech *); -/* For every successful gss_mech_get or gss_mech_get_by_* call there must be a +/* For every succesful gss_mech_get or gss_mech_get_by_* call there must be a * corresponding call to gss_mech_put. */ void gss_mech_put(struct gss_api_mech *); diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index a481472c9..2c2189cb3 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h @@ -42,9 +42,9 @@ RPC_I(struct inode *inode) extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); -extern int rpc_rmdir(struct dentry *); +extern int rpc_rmdir(char *); extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags); -extern int rpc_unlink(struct dentry *); +extern int rpc_unlink(char *); extern struct vfsmount *rpc_get_mount(void); extern void rpc_put_mount(void); diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 5fa0f2084..d93c24b47 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h @@ -9,6 +9,7 @@ #ifndef _LINUX_SUNRPC_STATS_H #define _LINUX_SUNRPC_STATS_H +#include #include struct rpc_stat { diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 7b27c09b5..503564384 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -159,9 +159,7 @@ struct svc_rqst { * determine what device number * to report (real or virtual) */ - int rq_sendfile_ok; /* turned off in gss privacy - * to prevent encrypting page - * cache pages */ + wait_queue_head_t rq_wait; /* synchronization */ }; diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index e6d3d3495..84c35d42d 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -194,7 +194,6 @@ extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); -extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); #endif /* __KERNEL__ */ diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3a0cca255..e8bbe8118 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -37,7 +37,7 @@ extern unsigned int xprt_max_resvport; #define RPC_MIN_RESVPORT (1U) #define RPC_MAX_RESVPORT (65535U) -#define RPC_DEF_MIN_RESVPORT (665U) +#define RPC_DEF_MIN_RESVPORT (650U) #define RPC_DEF_MAX_RESVPORT (1023U) /* @@ -229,7 +229,7 @@ int xprt_reserve_xprt(struct rpc_task *task); int xprt_reserve_xprt_cong(struct rpc_task *task); int xprt_prepare_transmit(struct rpc_task *task); void xprt_transmit(struct rpc_task *task); -void xprt_end_transmit(struct rpc_task *task); +void xprt_abort_transmit(struct rpc_task *task); int xprt_adjust_timeout(struct rpc_rqst *req); void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 6e8a06c95..37c1c76fd 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -6,6 +6,7 @@ #endif #include #include +#include #include #include @@ -57,6 +58,14 @@ static inline int software_suspend(void) } #endif /* CONFIG_PM */ +#ifdef CONFIG_SUSPEND_SMP +extern void disable_nonboot_cpus(void); +extern void enable_nonboot_cpus(void); +#else +static inline void disable_nonboot_cpus(void) {} +static inline void enable_nonboot_cpus(void) {} +#endif + void save_processor_state(void); void restore_processor_state(void); struct saved_context; diff --git a/include/linux/swap.h b/include/linux/swap.h index f433a87e3..f03c24719 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -1,6 +1,7 @@ #ifndef _LINUX_SWAP_H #define _LINUX_SWAP_H +#include #include #include #include @@ -10,8 +11,6 @@ #include #include -struct bio; - #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ #define SWAP_FLAG_PRIO_MASK 0x7fff #define SWAP_FLAG_PRIO_SHIFT 0 @@ -30,14 +29,7 @@ static inline int current_is_kswapd(void) * the type/offset into the pte as 5/27 as well. */ #define MAX_SWAPFILES_SHIFT 5 -#ifndef CONFIG_MIGRATION #define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT) -#else -/* Use last two entries for page migration swap entries */ -#define MAX_SWAPFILES ((1 << MAX_SWAPFILES_SHIFT)-2) -#define SWP_MIGRATION_READ MAX_SWAPFILES -#define SWP_MIGRATION_WRITE (MAX_SWAPFILES + 1) -#endif /* * Magic header for a swap area. The first part of the union is @@ -57,14 +49,12 @@ union swap_header { char magic[10]; /* SWAP-SPACE or SWAPSPACE2 */ } magic; struct { - char bootbits[1024]; /* Space for disklabel etc. */ - __u32 version; - __u32 last_page; - __u32 nr_badpages; - unsigned char sws_uuid[16]; - unsigned char sws_volume[16]; - __u32 padding[117]; - __u32 badpages[1]; + char bootbits[1024]; /* Space for disklabel etc. */ + unsigned int version; + unsigned int last_page; + unsigned int nr_badpages; + unsigned int padding[125]; + unsigned int badpages[1]; } info; }; @@ -187,12 +177,24 @@ extern unsigned long try_to_free_pages(struct zone **, gfp_t); extern unsigned long shrink_all_memory(unsigned long nr_pages); extern int vm_swappiness; extern int remove_mapping(struct address_space *mapping, struct page *page); -extern long vm_total_pages; + +/* possible outcome of pageout() */ +typedef enum { + /* failed to write page out, page is locked */ + PAGE_KEEP, + /* move page to the active list, page is locked */ + PAGE_ACTIVATE, + /* page has been sent to the disk successfully, page is unlocked */ + PAGE_SUCCESS, + /* page is clean and locked */ + PAGE_CLEAN, +} pageout_t; + +extern pageout_t pageout(struct page *page, struct address_space *mapping); #ifdef CONFIG_NUMA extern int zone_reclaim_mode; -extern int sysctl_min_unmapped_ratio; -extern int sysctl_min_slab_ratio; +extern int zone_reclaim_interval; extern int zone_reclaim(struct zone *, gfp_t, unsigned int); #else #define zone_reclaim_mode 0 @@ -202,8 +204,6 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) } #endif -extern int kswapd_run(int nid); - #ifdef CONFIG_MMU /* linux/mm/shmem.c */ extern int shmem_unuse(swp_entry_t entry, struct page *page); @@ -215,9 +215,7 @@ extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); /* linux/mm/page_io.c */ extern int swap_readpage(struct file *, struct page *); extern int swap_writepage(struct page *page, struct writeback_control *wbc); -extern int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page, - struct bio **bio_chain); -extern int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err); +extern int rw_swap_page_sync(int, swp_entry_t, struct page *); /* linux/mm/swap_state.c */ extern struct address_space swapper_space; @@ -253,6 +251,7 @@ extern int remove_exclusive_swap_page(struct page *); struct backing_dev_info; extern spinlock_t swap_lock; +extern int remove_vma_swap(struct vm_area_struct *vma, struct page *page); /* linux/mm/thrash.c */ extern struct mm_struct * swap_token_mm; @@ -290,60 +289,18 @@ static inline void disable_swap_token(void) #define free_pages_and_swap_cache(pages, nr) \ release_pages((pages), (nr), 0); -static inline void show_swap_cache_info(void) -{ -} - -static inline void free_swap_and_cache(swp_entry_t swp) -{ -} - -static inline int swap_duplicate(swp_entry_t swp) -{ - return 0; -} - -static inline void swap_free(swp_entry_t swp) -{ -} - -static inline struct page *read_swap_cache_async(swp_entry_t swp, - struct vm_area_struct *vma, unsigned long addr) -{ - return NULL; -} - -static inline struct page *lookup_swap_cache(swp_entry_t swp) -{ - return NULL; -} - -static inline int valid_swaphandles(swp_entry_t entry, unsigned long *offset) -{ - return 0; -} - +#define show_swap_cache_info() /*NOTHING*/ +#define free_swap_and_cache(swp) /*NOTHING*/ +#define swap_duplicate(swp) /*NOTHING*/ +#define swap_free(swp) /*NOTHING*/ +#define read_swap_cache_async(swp,vma,addr) NULL +#define lookup_swap_cache(swp) NULL +#define valid_swaphandles(swp, off) 0 #define can_share_swap_page(p) (page_mapcount(p) == 1) - -static inline int move_to_swap_cache(struct page *page, swp_entry_t entry) -{ - return 1; -} - -static inline int move_from_swap_cache(struct page *page, unsigned long index, - struct address_space *mapping) -{ - return 1; -} - -static inline void __delete_from_swap_cache(struct page *page) -{ -} - -static inline void delete_from_swap_cache(struct page *page) -{ -} - +#define move_to_swap_cache(p, swp) 1 +#define move_from_swap_cache(p, i, m) 1 +#define __delete_from_swap_cache(p) /*NOTHING*/ +#define delete_from_swap_cache(p) /*NOTHING*/ #define swap_token_default_timeout 0 static inline int remove_exclusive_swap_page(struct page *p) diff --git a/include/linux/swapops.h b/include/linux/swapops.h index ec639aa3a..87b9d14c7 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -67,56 +67,3 @@ static inline pte_t swp_entry_to_pte(swp_entry_t entry) BUG_ON(pte_file(__swp_entry_to_pte(arch_entry))); return __swp_entry_to_pte(arch_entry); } - -#ifdef CONFIG_MIGRATION -static inline swp_entry_t make_migration_entry(struct page *page, int write) -{ - BUG_ON(!PageLocked(page)); - return swp_entry(write ? SWP_MIGRATION_WRITE : SWP_MIGRATION_READ, - page_to_pfn(page)); -} - -static inline int is_migration_entry(swp_entry_t entry) -{ - return unlikely(swp_type(entry) == SWP_MIGRATION_READ || - swp_type(entry) == SWP_MIGRATION_WRITE); -} - -static inline int is_write_migration_entry(swp_entry_t entry) -{ - return unlikely(swp_type(entry) == SWP_MIGRATION_WRITE); -} - -static inline struct page *migration_entry_to_page(swp_entry_t entry) -{ - struct page *p = pfn_to_page(swp_offset(entry)); - /* - * Any use of migration entries may only occur while the - * corresponding page is locked - */ - BUG_ON(!PageLocked(p)); - return p; -} - -static inline void make_migration_entry_read(swp_entry_t *entry) -{ - *entry = swp_entry(SWP_MIGRATION_READ, swp_offset(*entry)); -} - -extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, - unsigned long address); -#else - -#define make_migration_entry(page, write) swp_entry(0, 0) -#define is_migration_entry(swp) 0 -#define migration_entry_to_page(swp) NULL -static inline void make_migration_entry_read(swp_entry_t *entryp) { } -static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, - unsigned long address) { } -static inline int is_write_migration_entry(swp_entry_t entry) -{ - return 0; -} - -#endif - diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 0577f5284..2993302f7 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h @@ -1,7 +1,7 @@ /* * SyncLink Multiprotocol Serial Adapter Driver * - * $Id: synclink.h,v 3.13 2006/05/23 18:25:06 paulkf Exp $ + * $Id: synclink.h,v 3.11 2006/02/06 21:20:29 paulkf Exp $ * * Copyright (C) 1998-2000 by Microgate Corporation * @@ -97,8 +97,6 @@ #define HDLC_TXIDLE_ALT_MARK_SPACE 4 #define HDLC_TXIDLE_SPACE 5 #define HDLC_TXIDLE_MARK 6 -#define HDLC_TXIDLE_CUSTOM_8 0x10000000 -#define HDLC_TXIDLE_CUSTOM_16 0x20000000 #define HDLC_ENCODING_NRZ 0 #define HDLC_ENCODING_NRZB 1 @@ -172,7 +170,6 @@ typedef struct _MGSL_PARAMS #define SYNCLINK_GT_DEVICE_ID 0x0070 #define SYNCLINK_GT4_DEVICE_ID 0x0080 #define SYNCLINK_AC_DEVICE_ID 0x0090 -#define SYNCLINK_GT2_DEVICE_ID 0x00A0 #define MGSL_MAX_SERIAL_NUMBER 30 /* diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 008f04c56..60d49e545 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -54,6 +54,7 @@ struct compat_stat; struct compat_timeval; struct robust_list_head; +#include #include #include #include @@ -174,9 +175,9 @@ asmlinkage long sys_waitid(int which, pid_t pid, int options, struct rusage __user *ru); asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); asmlinkage long sys_set_tid_address(int __user *tidptr); -asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, +asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, struct timespec __user *utime, u32 __user *uaddr2, - u32 val3); + int val3); asmlinkage long sys_init_module(void __user *umod, unsigned long len, const char __user *uargs); @@ -516,16 +517,6 @@ asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, const unsigned long __user *from, const unsigned long __user *to); -asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, - const void __user * __user *pages, - const int __user *nodes, - int __user *status, - int flags); -asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, - __u32 __user *pages, - const int __user *nodes, - int __user *status, - int flags); asmlinkage long sys_mbind(unsigned long start, unsigned long len, unsigned long mode, unsigned long __user *nmask, diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index bd28e8ae0..5d5fc2d30 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -55,7 +55,7 @@ enum CTL_KERN=1, /* General kernel info and control */ CTL_VM=2, /* VM management */ CTL_NET=3, /* Networking */ - /* was CTL_PROC */ + CTL_PROC=4, /* Process info */ CTL_FS=5, /* Filesystems */ CTL_DEBUG=6, /* Debugging */ CTL_DEV=7, /* Devices */ @@ -152,12 +152,9 @@ enum KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ - KERN_COMPAT_LOG=73, /* int: print compat layer messages */ - KERN_MAX_LOCK_DEPTH=74, }; - /* CTL_VM names: */ enum { @@ -192,10 +189,7 @@ enum VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ - VM_MIN_UNMAPPED=32, /* Set min percent of unmapped pages */ - VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ - VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ - VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ + VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ }; @@ -324,7 +318,6 @@ enum NET_NF_CONNTRACK_FRAG6_TIMEOUT=29, NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30, NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31, - NET_NF_CONNTRACK_CHECKSUM=32, }; /* /proc/sys/net/ipv4 */ @@ -415,8 +408,6 @@ enum NET_TCP_MTU_PROBING=113, NET_TCP_BASE_MSS=114, NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115, - NET_TCP_DMA_COPYBREAK=116, - NET_TCP_SLOW_START_AFTER_IDLE=117, #ifdef CONFIG_ICMP_IPOD NET_IPV4_ICMP_IPOD_VERSION, NET_IPV4_ICMP_IPOD_ENABLED, @@ -512,7 +503,6 @@ enum NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25, NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26, NET_IPV4_NF_CONNTRACK_COUNT=27, - NET_IPV4_NF_CONNTRACK_CHECKSUM=28, }; /* /proc/sys/net/ipv6 */ @@ -833,6 +823,8 @@ enum { NET_TUX_IGNORE_QUERY = 45, }; +/* CTL_PROC names: */ + /* CTL_FS names: */ enum { diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 166a2e58c..2a4b432e1 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h @@ -37,27 +37,11 @@ struct sysdev_class { struct kset kset; }; -struct sysdev_class_attribute { - struct attribute attr; - ssize_t (*show)(struct sysdev_class *, char *); - ssize_t (*store)(struct sysdev_class *, const char *, size_t); -}; - -#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ -struct sysdev_class_attribute attr_##_name = { \ - .attr = {.name = __stringify(_name), .mode = _mode }, \ - .show = _show, \ - .store = _store, \ -}; - extern int sysdev_class_register(struct sysdev_class *); extern void sysdev_class_unregister(struct sysdev_class *); -extern int sysdev_class_create_file(struct sysdev_class *, - struct sysdev_class_attribute *); -extern void sysdev_class_remove_file(struct sysdev_class *, - struct sysdev_class_attribute *); + /** * Auxillary system device drivers. */ diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4812ff605..ea819b89c 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h @@ -11,6 +11,7 @@ * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ +#include struct pt_regs; struct tty_struct; diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h deleted file mode 100644 index f1cb6cddd..000000000 --- a/include/linux/taskstats.h +++ /dev/null @@ -1,137 +0,0 @@ -/* taskstats.h - exporting per-task statistics - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2006 - * (C) Balbir Singh, IBM Corp. 2006 - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser 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. - */ - -#ifndef _LINUX_TASKSTATS_H -#define _LINUX_TASKSTATS_H - -/* Format for per-task data returned to userland when - * - a task exits - * - listener requests stats for a task - * - * The struct is versioned. Newer versions should only add fields to - * the bottom of the struct to maintain backward compatibility. - * - * - * To add new fields - * a) bump up TASKSTATS_VERSION - * b) add comment indicating new version number at end of struct - * c) add new fields after version comment; maintain 64-bit alignment - */ - -#define TASKSTATS_VERSION 1 - -struct taskstats { - - /* Version 1 */ - __u16 version; - __u16 padding[3]; /* Userspace should not interpret the padding - * field which can be replaced by useful - * fields if struct taskstats is extended. - */ - - /* Delay accounting fields start - * - * All values, until comment "Delay accounting fields end" are - * available only if delay accounting is enabled, even though the last - * few fields are not delays - * - * xxx_count is the number of delay values recorded - * xxx_delay_total is the corresponding cumulative delay in nanoseconds - * - * xxx_delay_total wraps around to zero on overflow - * xxx_count incremented regardless of overflow - */ - - /* Delay waiting for cpu, while runnable - * count, delay_total NOT updated atomically - */ - __u64 cpu_count; - __u64 cpu_delay_total; - - /* Following four fields atomically updated using task->delays->lock */ - - /* Delay waiting for synchronous block I/O to complete - * does not account for delays in I/O submission - */ - __u64 blkio_count; - __u64 blkio_delay_total; - - /* Delay waiting for page fault I/O (swap in only) */ - __u64 swapin_count; - __u64 swapin_delay_total; - - /* cpu "wall-clock" running time - * On some architectures, value will adjust for cpu time stolen - * from the kernel in involuntary waits due to virtualization. - * Value is cumulative, in nanoseconds, without a corresponding count - * and wraps around to zero silently on overflow - */ - __u64 cpu_run_real_total; - - /* cpu "virtual" running time - * Uses time intervals seen by the kernel i.e. no adjustment - * for kernel's involuntary waits due to virtualization. - * Value is cumulative, in nanoseconds, without a corresponding count - * and wraps around to zero silently on overflow - */ - __u64 cpu_run_virtual_total; - /* Delay accounting fields end */ - /* version 1 ends here */ -}; - - -/* - * Commands sent from userspace - * Not versioned. New commands should only be inserted at the enum's end - * prior to __TASKSTATS_CMD_MAX - */ - -enum { - TASKSTATS_CMD_UNSPEC = 0, /* Reserved */ - TASKSTATS_CMD_GET, /* user->kernel request/get-response */ - TASKSTATS_CMD_NEW, /* kernel->user event */ - __TASKSTATS_CMD_MAX, -}; - -#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1) - -enum { - TASKSTATS_TYPE_UNSPEC = 0, /* Reserved */ - TASKSTATS_TYPE_PID, /* Process id */ - TASKSTATS_TYPE_TGID, /* Thread group id */ - TASKSTATS_TYPE_STATS, /* taskstats structure */ - TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */ - TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */ - __TASKSTATS_TYPE_MAX, -}; - -#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1) - -enum { - TASKSTATS_CMD_ATTR_UNSPEC = 0, - TASKSTATS_CMD_ATTR_PID, - TASKSTATS_CMD_ATTR_TGID, - TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, - TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, - __TASKSTATS_CMD_ATTR_MAX, -}; - -#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1) - -/* NETLINK_GENERIC related info */ - -#define TASKSTATS_GENL_NAME "TASKSTATS" -#define TASKSTATS_GENL_VERSION 0x1 - -#endif /* _LINUX_TASKSTATS_H */ diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h deleted file mode 100644 index 16894b7ed..000000000 --- a/include/linux/taskstats_kern.h +++ /dev/null @@ -1,89 +0,0 @@ -/* taskstats_kern.h - kernel header for per-task statistics interface - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2006 - * (C) Balbir Singh, IBM Corp. 2006 - */ - -#ifndef _LINUX_TASKSTATS_KERN_H -#define _LINUX_TASKSTATS_KERN_H - -#include -#include -#include - -#ifdef CONFIG_TASKSTATS -extern kmem_cache_t *taskstats_cache; -extern struct mutex taskstats_exit_mutex; - -static inline void taskstats_exit_free(struct taskstats *tidstats) -{ - if (tidstats) - kmem_cache_free(taskstats_cache, tidstats); -} - -static inline void taskstats_tgid_init(struct signal_struct *sig) -{ - spin_lock_init(&sig->stats_lock); - sig->stats = NULL; -} - -static inline void taskstats_tgid_alloc(struct signal_struct *sig) -{ - struct taskstats *stats; - unsigned long flags; - - stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); - if (!stats) - return; - - spin_lock_irqsave(&sig->stats_lock, flags); - if (!sig->stats) { - sig->stats = stats; - stats = NULL; - } - spin_unlock_irqrestore(&sig->stats_lock, flags); - - if (stats) - kmem_cache_free(taskstats_cache, stats); -} - -static inline void taskstats_tgid_free(struct signal_struct *sig) -{ - struct taskstats *stats = NULL; - unsigned long flags; - - spin_lock_irqsave(&sig->stats_lock, flags); - if (sig->stats) { - stats = sig->stats; - sig->stats = NULL; - } - spin_unlock_irqrestore(&sig->stats_lock, flags); - if (stats) - kmem_cache_free(taskstats_cache, stats); -} - -extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); -extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int); -extern void taskstats_init_early(void); -extern void taskstats_tgid_alloc(struct signal_struct *); -#else -static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu) -{} -static inline void taskstats_exit_free(struct taskstats *ptidstats) -{} -static inline void taskstats_exit_send(struct task_struct *tsk, - struct taskstats *tidstats, - int group_dead, unsigned int cpu) -{} -static inline void taskstats_tgid_init(struct signal_struct *sig) -{} -static inline void taskstats_tgid_alloc(struct signal_struct *sig) -{} -static inline void taskstats_tgid_free(struct signal_struct *sig) -{} -static inline void taskstats_init_early(void) -{} -#endif /* CONFIG_TASKSTATS */ - -#endif - diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild deleted file mode 100644 index 78dfbac36..000000000 --- a/include/linux/tc_act/Kbuild +++ /dev/null @@ -1,4 +0,0 @@ -header-y += tc_gact.h -header-y += tc_ipt.h -header-y += tc_mirred.h -header-y += tc_pedit.h diff --git a/include/linux/tc_ematch/Kbuild b/include/linux/tc_ematch/Kbuild deleted file mode 100644 index 4a58a1c32..000000000 --- a/include/linux/tc_ematch/Kbuild +++ /dev/null @@ -1,4 +0,0 @@ -header-y += tc_em_cmp.h -header-y += tc_em_meta.h -header-y += tc_em_nbyte.h -header-y += tc_em_text.h diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 8ebf49790..542d39596 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -159,8 +159,8 @@ struct tcp_info #ifdef __KERNEL__ +#include #include -#include #include #include #include @@ -233,13 +233,6 @@ struct tcp_sock { struct iovec *iov; int memory; int len; -#ifdef CONFIG_NET_DMA - /* members for async copy */ - struct dma_chan *dma_chan; - int wakeup; - struct dma_pinned_list *pinned_list; - dma_cookie_t dma_cookie; -#endif } ucopy; __u32 snd_wl1; /* Sequence for window update */ diff --git a/include/linux/threads.h b/include/linux/threads.h index 38d1a5d65..e646bcdf2 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h @@ -1,6 +1,7 @@ #ifndef _LINUX_THREADS_H #define _LINUX_THREADS_H +#include /* * The default limit for the nr of threads is now in diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967..0cd696cee 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -28,13 +28,10 @@ struct timezone { #ifdef __KERNEL__ /* Parameters used to convert the timespec values: */ -#define MSEC_PER_SEC 1000L -#define USEC_PER_MSEC 1000L -#define NSEC_PER_USEC 1000L -#define NSEC_PER_MSEC 1000000L -#define USEC_PER_SEC 1000000L -#define NSEC_PER_SEC 1000000000L -#define FSEC_PER_SEC 1000000000000000L +#define MSEC_PER_SEC 1000L +#define USEC_PER_SEC 1000000L +#define NSEC_PER_SEC 1000000000L +#define NSEC_PER_USEC 1000L static inline int timespec_equal(struct timespec *a, struct timespec *b) { @@ -70,18 +67,6 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon, extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); -/* - * sub = lhs - rhs, in normalized form - */ -static inline struct timespec timespec_sub(struct timespec lhs, - struct timespec rhs) -{ - struct timespec ts_delta; - set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, - lhs.tv_nsec - rhs.tv_nsec); - return ts_delta; -} - /* * Returns true if the timespec is norm, false if denorm: */ @@ -92,8 +77,6 @@ extern struct timespec xtime; extern struct timespec wall_to_monotonic; extern seqlock_t xtime_lock; -void timekeeping_init(void); - static inline unsigned long get_seconds(void) { return xtime.tv_sec; @@ -117,7 +100,6 @@ extern int do_getitimer(int which, struct itimerval *value); extern void getnstimeofday(struct timespec *tv); extern struct timespec timespec_trunc(struct timespec t, unsigned gran); -extern int timekeeping_is_continuous(void); /** * timespec_to_ns - Convert timespec to nanoseconds @@ -160,20 +142,6 @@ extern struct timespec ns_to_timespec(const s64 nsec); */ extern struct timeval ns_to_timeval(const s64 nsec); -/** - * timespec_add_ns - Adds nanoseconds to a timespec - * @a: pointer to timespec to be incremented - * @ns: unsigned nanoseconds value to be added - */ -static inline void timespec_add_ns(struct timespec *a, u64 ns) -{ - ns += a->tv_nsec; - while(unlikely(ns >= NSEC_PER_SEC)) { - ns -= NSEC_PER_SEC; - a->tv_sec++; - } - a->tv_nsec = ns; -} #endif /* __KERNEL__ */ #define NFDBITS __NFDBITS diff --git a/include/linux/timer.h b/include/linux/timer.h index c982304db..0a485beba 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -1,6 +1,7 @@ #ifndef _LINUX_TIMER_H #define _LINUX_TIMER_H +#include #include #include #include diff --git a/include/linux/timex.h b/include/linux/timex.h index d543d3871..03914b7e4 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -53,10 +53,12 @@ #ifndef _LINUX_TIMEX_H #define _LINUX_TIMEX_H +#include #include #include #include +#include /* * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen @@ -190,8 +192,6 @@ struct timex { #define TIME_BAD TIME_ERROR /* bw compat */ #ifdef __KERNEL__ -#include - /* * kernel variables * Note: maximum error = NTP synch distance = dispersion + delay / 2; @@ -304,8 +304,6 @@ time_interpolator_reset(void) #endif /* !CONFIG_TIME_INTERPOLATION */ -#define TICK_LENGTH_SHIFT 32 - /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ extern u64 current_tick_length(void); diff --git a/include/linux/topology.h b/include/linux/topology.h index ec1eca852..a305ae2e4 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -134,8 +134,7 @@ .flags = SD_LOAD_BALANCE \ | SD_BALANCE_NEWIDLE \ | SD_BALANCE_EXEC \ - | SD_WAKE_AFFINE \ - | BALANCE_FOR_POWER, \ + | SD_WAKE_AFFINE, \ .last_balance = jiffies, \ .balance_interval = 1, \ .nr_balance_failed = 0, \ diff --git a/include/linux/tty.h b/include/linux/tty.h index 35858836f..f13f49afe 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -5,13 +5,25 @@ * 'tty.h' defines some structures used by tty_io.c and some defines. */ +/* + * These constants are also useful for user-level apps (e.g., VC + * resizing). + */ +#define MIN_NR_CONSOLES 1 /* must be at least 1 */ +#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ +#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ + /* Note: the ioctl VT_GETSTATE does not work for + consoles 16 and higher (since it returns a short) */ + #ifdef __KERNEL__ +#include #include #include #include #include #include #include +#include #include #include @@ -46,6 +58,7 @@ struct tty_buffer { unsigned char *flag_buf_ptr; int used; int size; + int active; int commit; int read; /* Data points here */ @@ -59,7 +72,6 @@ struct tty_bufhead { struct tty_buffer *head; /* Queue head */ struct tty_buffer *tail; /* Active buffer */ struct tty_buffer *free; /* Free queue head */ - int memory_used; /* Buffer space used excluding free queue */ }; /* * The pty uses char_buf and flag_buf as a contiguous buffer @@ -174,7 +186,7 @@ struct tty_struct { struct tty_driver *driver; int index; struct tty_ldisc ldisc; - struct mutex termios_mutex; + struct semaphore termios_sem; struct termios *termios, *termios_locked; char name[64]; int pgrp; @@ -190,6 +202,7 @@ struct tty_struct { struct tty_struct *link; struct fasync_struct *fasync; struct tty_bufhead buf; + int max_flip_cnt; int alt_speed; /* For magic substitution of 38400 bps */ wait_queue_head_t write_wait; wait_queue_head_t read_wait; @@ -247,6 +260,7 @@ struct tty_struct { #define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ #define TTY_PUSH 6 /* n_tty private */ #define TTY_CLOSING 7 /* ->close() in progress */ +#define TTY_DONT_FLIP 8 /* Defer buffer flip */ #define TTY_LDISC 9 /* Line discipline attached */ #define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ #define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ @@ -259,6 +273,7 @@ struct tty_struct { extern void tty_write_flush(struct tty_struct *); extern struct termios tty_std_termios; +extern int fg_console, last_console, want_console; extern int kmsg_redirect; @@ -276,9 +291,7 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); extern int tty_unregister_ldisc(int disc); extern int tty_register_driver(struct tty_driver *driver); extern int tty_unregister_driver(struct tty_driver *driver); -extern struct class_device *tty_register_device(struct tty_driver *driver, - unsigned index, - struct device *dev); +extern void tty_register_device(struct tty_driver *driver, unsigned index, struct device *dev); extern void tty_unregister_device(struct tty_driver *driver, unsigned index); extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen); @@ -338,45 +351,5 @@ static inline dev_t tty_devnum(struct tty_struct *tty) return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index; } -static inline void proc_clear_tty(struct task_struct *p) -{ - spin_lock_irq(&p->sighand->siglock); - p->signal->tty = NULL; - spin_unlock_irq(&p->sighand->siglock); -} - -static inline -void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) -{ - if (tty) { - tty->session = tsk->signal->session; - tty->pgrp = process_group(tsk); - } - tsk->signal->tty = tty; - tsk->signal->tty_old_pgrp = 0; -} - -static inline -void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) -{ - spin_lock_irq(&tsk->sighand->siglock); - __proc_set_tty(tsk, tty); - spin_unlock_irq(&tsk->sighand->siglock); -} - -static inline struct tty_struct *get_current_tty(void) -{ - struct tty_struct *tty; - WARN_ON_ONCE(!mutex_is_locked(&tty_mutex)); - tty = current->signal->tty; - /* - * session->tty can be changed/cleared from under us, make sure we - * issue the load. The obtained pointer, when not NULL, is valid as - * long as we hold tty_mutex. - */ - barrier(); - return tty; -} - #endif /* __KERNEL__ */ #endif diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 58c961c9e..b368b296d 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -157,6 +157,7 @@ struct tty_driver { struct cdev cdev; struct module *owner; const char *driver_name; + const char *devfs_name; const char *name; int name_base; /* offset of printed name */ int major; /* major device number */ @@ -241,15 +242,8 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); * is also a promise, if the above case is true, not to signal * overruns, either.) * - * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need - * to be registered with a call to tty_register_driver() when the - * device is found in the system and unregistered with a call to - * tty_unregister_device() so the devices will be show up - * properly in sysfs. If not set, driver->num entries will be - * created by the tty core in sysfs when tty_register_driver() is - * called. This is to be used by drivers that have tty devices - * that can appear and disappear while the main tty driver is - * registered with the tty core. + * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This + * is only used by tty_register_driver(). * * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead * use dynamic memory keyed through the devpts filesystem. This @@ -258,7 +252,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); #define TTY_DRIVER_INSTALLED 0x0001 #define TTY_DRIVER_RESET_TERMIOS 0x0002 #define TTY_DRIVER_REAL_RAW 0x0004 -#define TTY_DRIVER_DYNAMIC_DEV 0x0008 +#define TTY_DRIVER_NO_DEVFS 0x0008 #define TTY_DRIVER_DEVPTS_MEM 0x0010 /* tty driver types */ diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index eb677cf56..31548303e 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -12,7 +12,7 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, unsigned char ch, char flag) { struct tty_buffer *tb = tty->buf.tail; - if (tb && tb->used < tb->size) { + if (tb && tb->active && tb->used < tb->size) { tb->flag_buf_ptr[tb->used] = flag; tb->char_buf_ptr[tb->used++] = ch; return 1; diff --git a/include/linux/types.h b/include/linux/types.h index 775ea6a11..b6d865e8b 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -2,6 +2,7 @@ #define _LINUX_TYPES_H #ifdef __KERNEL__ +#include #define BITS_TO_LONGS(bits) \ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) @@ -179,15 +180,8 @@ typedef __u64 __bitwise __be64; #ifdef __KERNEL__ typedef unsigned __bitwise__ gfp_t; - -#ifdef CONFIG_RESOURCES_64BIT -typedef u64 resource_size_t; -#else -typedef u32 resource_size_t; #endif -#endif /* __KERNEL__ */ - struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h deleted file mode 100644 index 391e7ed1e..000000000 --- a/include/linux/uaccess.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __LINUX_UACCESS_H__ -#define __LINUX_UACCESS_H__ - -#include - -#ifndef ARCH_HAS_NOCACHE_UACCESS - -static inline unsigned long __copy_from_user_inatomic_nocache(void *to, - const void __user *from, unsigned long n) -{ - return __copy_from_user_inatomic(to, from, n); -} - -static inline unsigned long __copy_from_user_nocache(void *to, - const void __user *from, unsigned long n) -{ - return __copy_from_user(to, from, n); -} - -#endif /* ARCH_HAS_NOCACHE_UACCESS */ - -#endif /* __LINUX_UACCESS_H__ */ diff --git a/include/linux/udp.h b/include/linux/udp.h index 90223f057..85a556588 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -35,6 +35,7 @@ struct udphdr { #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ #ifdef __KERNEL__ +#include #include #include @@ -46,7 +47,7 @@ struct udp_sock { unsigned int corkflag; /* Cork is required */ __u16 encap_type; /* Is this an Encapsulation socket? */ /* - * Following member retains the information to create a UDP header + * Following member retains the infomation to create a UDP header * when the socket is uncorked. */ __u16 len; /* total length of pending frames */ diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index aa6832b23..843aeaaa7 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -220,19 +221,6 @@ typedef __u16 __bitwise __fs16; */ #define UFS_MINFREE 5 #define UFS_DEFAULTOPT UFS_OPTTIME - -/* - * Debug code - */ -#ifdef CONFIG_UFS_DEBUG -# define UFSD(f, a...) { \ - printk ("UFSD (%s, %d): %s:", \ - __FILE__, __LINE__, __FUNCTION__); \ - printk (f, ## a); \ - } -#else -# define UFSD(f, a...) /**/ -#endif /* * Turn file system block numbers into disk block addresses. @@ -351,23 +339,8 @@ struct ufs2_csum_total { __fs64 cs_spare[3]; /* future expansion */ }; -/* - * File system flags - */ -#define UFS_UNCLEAN 0x01 /* file system not clean at mount (unused) */ -#define UFS_DOSOFTDEP 0x02 /* file system using soft dependencies */ -#define UFS_NEEDSFSCK 0x04 /* needs sync fsck (FreeBSD compat, unused) */ -#define UFS_INDEXDIRS 0x08 /* kernel supports indexed directories */ -#define UFS_ACLS 0x10 /* file system has ACLs enabled */ -#define UFS_MULTILABEL 0x20 /* file system is MAC multi-label */ -#define UFS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */ - -#if 0 /* * This is the actual superblock, as it is laid out on the disk. - * Do NOT use this structure, because of sizeof(ufs_super_block) > 512 and - * it may occupy several blocks, use - * struct ufs_super_block_(first,second,third) instead. */ struct ufs_super_block { __fs32 fs_link; /* UNUSED */ @@ -444,7 +417,7 @@ struct ufs_super_block { __s8 fs_fmod; /* super block modified flag */ __s8 fs_clean; /* file system is clean flag */ __s8 fs_ronly; /* mounted read-only flag */ - __s8 fs_flags; + __s8 fs_flags; /* currently unused flag */ union { struct { __s8 fs_fsmnt[UFS_MAXMNTLEN];/* name mounted on */ @@ -513,7 +486,6 @@ struct ufs_super_block { __fs32 fs_magic; /* magic number */ __u8 fs_space[1]; /* list of blocks for each rotation */ }; -#endif/*struct ufs_super_block*/ /* * Preference for optimization. @@ -695,7 +667,7 @@ struct ufs_buffer_head { }; struct ufs_cg_private_info { - struct ufs_buffer_head c_ubh; + struct ufs_cylinder_group ucg; __u32 c_cgx; /* number of cylidner group */ __u16 c_ncyl; /* number of cyl's this cg */ __u16 c_niblk; /* number of inode blocks this cg */ @@ -715,7 +687,6 @@ struct ufs_cg_private_info { struct ufs_sb_private_info { struct ufs_buffer_head s_ubh; /* buffer containing super block */ - struct ufs2_csum_total cs_total; __u32 s_sblkno; /* offset of super-blocks in filesys */ __u32 s_cblkno; /* offset of cg-block in filesys */ __u32 s_iblkno; /* offset of inode-blocks in filesys */ @@ -854,54 +825,16 @@ struct ufs_super_block_first { }; struct ufs_super_block_second { - union { - struct { - __s8 fs_fsmnt[212]; - __fs32 fs_cgrotor; - __fs32 fs_csp[UFS_MAXCSBUFS]; - __fs32 fs_maxcluster; - __fs32 fs_cpc; - __fs16 fs_opostbl[82]; - } fs_u1; - struct { - __s8 fs_fsmnt[UFS2_MAXMNTLEN - UFS_MAXMNTLEN + 212]; - __u8 fs_volname[UFS2_MAXVOLLEN]; - __fs64 fs_swuid; - __fs32 fs_pad; - __fs32 fs_cgrotor; - __fs32 fs_ocsp[UFS2_NOCSPTRS]; - __fs32 fs_contigdirs; - __fs32 fs_csp; - __fs32 fs_maxcluster; - __fs32 fs_active; - __fs32 fs_old_cpc; - __fs32 fs_maxbsize; - __fs64 fs_sparecon64[17]; - __fs64 fs_sblockloc; - __fs64 cs_ndir; - __fs64 cs_nbfree; - } fs_u2; - } fs_un; -}; + __s8 fs_fsmnt[212]; + __fs32 fs_cgrotor; + __fs32 fs_csp[UFS_MAXCSBUFS]; + __fs32 fs_maxcluster; + __fs32 fs_cpc; + __fs16 fs_opostbl[82]; +}; struct ufs_super_block_third { - union { - struct { - __fs16 fs_opostbl[46]; - } fs_u1; - struct { - __fs64 cs_nifree; /* number of free inodes */ - __fs64 cs_nffree; /* number of free frags */ - __fs64 cs_numclusters; /* number of free clusters */ - __fs64 cs_spare[3]; /* future expansion */ - struct ufs_timeval fs_time; /* last time written */ - __fs64 fs_size; /* number of blocks in fs */ - __fs64 fs_dsize; /* number of data blocks in fs */ - __fs64 fs_csaddr; /* blk addr of cyl grp summary area */ - __fs64 fs_pendingblocks;/* blocks in process of being freed */ - __fs32 fs_pendinginodes;/*inodes in process of being freed */ - } __attribute__ ((packed)) fs_u2; - } fs_un1; + __fs16 fs_opostbl[46]; union { struct { __fs32 fs_sparecon[53];/* reserved for future constants */ @@ -929,7 +862,7 @@ struct ufs_super_block_third { __fs32 fs_qfmask[2]; /* ~usb_fmask */ __fs32 fs_state; /* file system state time stamp */ } fs_44; - } fs_un2; + } fs_u2; __fs32 fs_postblformat; __fs32 fs_nrpos; __fs32 fs_postbloff; @@ -943,8 +876,7 @@ struct ufs_super_block_third { /* balloc.c */ extern void ufs_free_fragments (struct inode *, unsigned, unsigned); extern void ufs_free_blocks (struct inode *, unsigned, unsigned); -extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, - unsigned, int *, struct page *); +extern unsigned ufs_new_fragments (struct inode *, __fs32 *, unsigned, unsigned, unsigned, int *); /* cylinder.c */ extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); @@ -955,29 +887,30 @@ extern struct inode_operations ufs_dir_inode_operations; extern int ufs_add_link (struct dentry *, struct inode *); extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); extern int ufs_make_empty(struct inode *, struct inode *); -extern struct ufs_dir_entry *ufs_find_entry(struct inode *, struct dentry *, struct page **); -extern int ufs_delete_entry(struct inode *, struct ufs_dir_entry *, struct page *); +extern struct ufs_dir_entry * ufs_find_entry (struct dentry *, struct buffer_head **); +extern int ufs_delete_entry (struct inode *, struct ufs_dir_entry *, struct buffer_head *); extern int ufs_empty_dir (struct inode *); -extern struct ufs_dir_entry *ufs_dotdot(struct inode *, struct page **); -extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, - struct page *page, struct inode *inode); +extern struct ufs_dir_entry * ufs_dotdot (struct inode *, struct buffer_head **); +extern void ufs_set_link(struct inode *, struct ufs_dir_entry *, struct buffer_head *, struct inode *); /* file.c */ extern struct inode_operations ufs_file_inode_operations; extern const struct file_operations ufs_file_operations; -extern const struct address_space_operations ufs_aops; +extern struct address_space_operations ufs_aops; /* ialloc.c */ extern void ufs_free_inode (struct inode *inode); extern struct inode * ufs_new_inode (struct inode *, int); /* inode.c */ +extern u64 ufs_frag_map (struct inode *, sector_t); extern void ufs_read_inode (struct inode *); extern void ufs_put_inode (struct inode *); extern int ufs_write_inode (struct inode *, int); extern int ufs_sync_inode (struct inode *); extern void ufs_delete_inode (struct inode *); +extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); @@ -993,7 +926,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __ extern struct inode_operations ufs_fast_symlink_inode_operations; /* truncate.c */ -extern int ufs_truncate (struct inode *, loff_t); +extern void ufs_truncate (struct inode *); static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) { diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h index f50ce3b0c..21665a953 100644 --- a/include/linux/ufs_fs_i.h +++ b/include/linux/ufs_fs_i.h @@ -27,7 +27,6 @@ struct ufs_inode_info { __u32 i_oeftflag; __u16 i_osync; __u32 i_lastfrag; - __u32 i_dir_start_lookup; struct inode vfs_inode; }; diff --git a/include/linux/unistd.h b/include/linux/unistd.h index c18c60f32..10ed9834b 100644 --- a/include/linux/unistd.h +++ b/include/linux/unistd.h @@ -1,9 +1,7 @@ #ifndef _LINUX_UNISTD_H_ #define _LINUX_UNISTD_H_ -#ifdef __KERNEL__ extern int errno; -#endif /* * Include machine specific syscallX macros diff --git a/include/linux/unwind.h b/include/linux/unwind.h deleted file mode 100644 index 73e1751d0..000000000 --- a/include/linux/unwind.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef _LINUX_UNWIND_H -#define _LINUX_UNWIND_H - -/* - * Copyright (C) 2002-2006 Novell, Inc. - * Jan Beulich - * This code is released under version 2 of the GNU GPL. - * - * A simple API for unwinding kernel stacks. This is used for - * debugging and error reporting purposes. The kernel doesn't need - * full-blown stack unwinding with all the bells and whistles, so there - * is not much point in implementing the full Dwarf2 unwind API. - */ - -struct module; - -#ifdef CONFIG_STACK_UNWIND - -#include - -#ifndef ARCH_UNWIND_SECTION_NAME -#define ARCH_UNWIND_SECTION_NAME ".eh_frame" -#endif - -/* - * Initialize unwind support. - */ -extern void unwind_init(void); - -#ifdef CONFIG_MODULES - -extern void *unwind_add_table(struct module *, - const void *table_start, - unsigned long table_size); - -extern void unwind_remove_table(void *handle, int init_only); - -#endif - -extern int unwind_init_frame_info(struct unwind_frame_info *, - struct task_struct *, - /*const*/ struct pt_regs *); - -/* - * Prepare to unwind a blocked task. - */ -extern int unwind_init_blocked(struct unwind_frame_info *, - struct task_struct *); - -/* - * Prepare to unwind the currently running thread. - */ -extern int unwind_init_running(struct unwind_frame_info *, - asmlinkage int (*callback)(struct unwind_frame_info *, - void *arg), - void *arg); - -/* - * Unwind to previous to frame. Returns 0 if successful, negative - * number in case of an error. - */ -extern int unwind(struct unwind_frame_info *); - -/* - * Unwind until the return pointer is in user-land (or until an error - * occurs). Returns 0 if successful, negative number in case of - * error. - */ -extern int unwind_to_user(struct unwind_frame_info *); - -#else - -struct unwind_frame_info {}; - -static inline void unwind_init(void) {} - -#ifdef CONFIG_MODULES - -static inline void *unwind_add_table(struct module *mod, - const void *table_start, - unsigned long table_size) -{ - return NULL; -} - -#endif - -static inline void unwind_remove_table(void *handle, int init_only) -{ -} - -static inline int unwind_init_frame_info(struct unwind_frame_info *info, - struct task_struct *tsk, - const struct pt_regs *regs) -{ - return -ENOSYS; -} - -static inline int unwind_init_blocked(struct unwind_frame_info *info, - struct task_struct *tsk) -{ - return -ENOSYS; -} - -static inline int unwind_init_running(struct unwind_frame_info *info, - asmlinkage int (*cb)(struct unwind_frame_info *, - void *arg), - void *arg) -{ - return -ENOSYS; -} - -static inline int unwind(struct unwind_frame_info *info) -{ - return -ENOSYS; -} - -static inline int unwind_to_user(struct unwind_frame_info *info) -{ - return -ENOSYS; -} - -#endif - -#endif /* _LINUX_UNWIND_H */ diff --git a/include/linux/usb.h b/include/linux/usb.h index d2bd0c8e0..e34e5e3dc 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -10,6 +10,7 @@ #ifdef __KERNEL__ +#include #include /* for -ENODEV */ #include /* for mdelay() */ #include /* for in_interrupt() */ @@ -40,15 +41,13 @@ struct usb_driver; * Devices may also have class-specific or vendor-specific descriptors. */ -struct ep_device; - /** * struct usb_host_endpoint - host-side endpoint descriptor and queue * @desc: descriptor for this endpoint, wMaxPacketSize in native byteorder * @urb_list: urbs queued to this endpoint; maintained by usbcore * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) * with one or more transfer descriptors (TDs) per urb - * @ep_dev: ep_device for sysfs info + * @kobj: kobject for sysfs info * @extra: descriptors following this endpoint in the configuration * @extralen: how many bytes of "extra" are valid * @@ -59,7 +58,7 @@ struct usb_host_endpoint { struct usb_endpoint_descriptor desc; struct list_head urb_list; void *hcpriv; - struct ep_device *ep_dev; /* For sysfs info */ + struct kobject *kobj; /* For sysfs info */ unsigned char *extra; /* Extra descriptors */ int extralen; @@ -388,8 +387,6 @@ extern int usb_lock_device_for_reset(struct usb_device *udev, /* USB port reset for device reinitialization */ extern int usb_reset_device(struct usb_device *dev); -extern int usb_reset_composite_device(struct usb_device *dev, - struct usb_interface *iface); extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); @@ -558,10 +555,6 @@ struct usb_dynids { * do (or don't) show up otherwise in the filesystem. * @suspend: Called when the device is going to be suspended by the system. * @resume: Called when the device is being resumed by the system. - * @pre_reset: Called by usb_reset_composite_device() when the device - * is about to be reset. - * @post_reset: Called by usb_reset_composite_device() after the device - * has been reset. * @id_table: USB drivers use ID table to support hotplugging. * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set * or your driver's probe function will never get called. @@ -600,9 +593,6 @@ struct usb_driver { int (*suspend) (struct usb_interface *intf, pm_message_t message); int (*resume) (struct usb_interface *intf); - void (*pre_reset) (struct usb_interface *intf); - void (*post_reset) (struct usb_interface *intf); - const struct usb_device_id *id_table; struct usb_dynids dynids; @@ -1019,8 +1009,6 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout); -extern int usb_interrupt_msg(struct usb_device *usb_dev, unsigned int pipe, - void *data, int len, int *actual_length, int timeout); extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout); diff --git a/include/linux/usb/cdc.h b/include/linux/usb_cdc.h similarity index 100% rename from include/linux/usb/cdc.h rename to include/linux/usb_cdc.h diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index c720d107f..a2aacfc7a 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h @@ -51,9 +51,6 @@ #define USB_RECIP_INTERFACE 0x01 #define USB_RECIP_ENDPOINT 0x02 #define USB_RECIP_OTHER 0x03 -/* From Wireless USB 1.0 */ -#define USB_RECIP_PORT 0x04 -#define USB_RECIP_RPIPE 0x05 /* * Standard requests, for the bRequest field of a SETUP packet. @@ -76,9 +73,7 @@ #define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */ #define USB_REQ_GET_ENCRYPTION 0x0E -#define USB_REQ_RPIPE_ABORT 0x0E #define USB_REQ_SET_HANDSHAKE 0x0F -#define USB_REQ_RPIPE_RESET 0x0F #define USB_REQ_GET_HANDSHAKE 0x10 #define USB_REQ_SET_CONNECTION 0x11 #define USB_REQ_SET_SECURITY_DATA 0x12 @@ -164,8 +159,6 @@ struct usb_ctrlrequest { #define USB_DT_BOS 0x0f #define USB_DT_DEVICE_CAPABILITY 0x10 #define USB_DT_WIRELESS_ENDPOINT_COMP 0x11 -#define USB_DT_WIRE_ADAPTER 0x21 -#define USB_DT_RPIPE 0x22 /* conventional codes for class-specific descriptors */ #define USB_DT_CS_DEVICE 0x21 diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index e17186dbc..1d78870ed 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h @@ -872,9 +872,9 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config, /* utility wrapping a simple endpoint selection policy */ extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *, - struct usb_endpoint_descriptor *) __devinit; + struct usb_endpoint_descriptor *) __init; -extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit; +extern void usb_ep_autoconfig_reset (struct usb_gadget *) __init; #endif /* __KERNEL__ */ diff --git a/include/linux/usb/input.h b/include/linux/usb_input.h similarity index 100% rename from include/linux/usb/input.h rename to include/linux/usb_input.h diff --git a/include/linux/usb/isp116x.h b/include/linux/usb_isp116x.h similarity index 100% rename from include/linux/usb/isp116x.h rename to include/linux/usb_isp116x.h diff --git a/include/linux/usb/sl811.h b/include/linux/usb_sl811.h similarity index 71% rename from include/linux/usb/sl811.h rename to include/linux/usb_sl811.h index 397ee3b3d..4f2d012d7 100644 --- a/include/linux/usb/sl811.h +++ b/include/linux/usb_sl811.h @@ -14,13 +14,13 @@ struct sl811_platform_data { u8 power; /* sl811 relies on an external source of VBUS current */ - void (*port_power)(struct device *dev, int is_on); + void (*port_power)(struct device *dev, int is_on); /* pulse sl811 nRST (probably with a GPIO) */ - void (*reset)(struct device *dev); + void (*reset)(struct device *dev); // some boards need something like these: - // int (*check_overcurrent)(struct device *dev); - // void (*clock_enable)(struct device *dev, int is_on); + // int (*check_overcurrent)(struct device *dev); + // void (*clock_enable)(struct device *dev, int is_on); }; diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index e7fc5fed5..b2d08984a 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h @@ -9,6 +9,7 @@ #ifndef __LINUX_USB_USUAL_H #define __LINUX_USB_USUAL_H +#include /* We should do this for cleanliness... But other usb_foo.h do not do this. */ /* #include */ @@ -43,10 +44,6 @@ /* Need delay after Command phase */ \ US_FLAG(NO_WP_DETECT, 0x00000200) \ /* Don't check for write-protect */ \ - US_FLAG(MAX_SECTORS_64, 0x00000400) \ - /* Sets max_sectors to 64 */ \ - US_FLAG(IGNORE_DEVICE, 0x00000800) \ - /* Don't claim device */ #define US_FLAG(name, value) US_FL_##name = value , enum { US_DO_ALL_FLAGS }; diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 7b7aadb69..8859f0b41 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h @@ -123,7 +123,6 @@ struct usbdevfs_hub_portinfo { char port [127]; /* e.g. port 3 connects to device 27 */ }; -#ifdef __KERNEL__ #ifdef CONFIG_COMPAT #include struct usbdevfs_urb32 { @@ -148,7 +147,6 @@ struct usbdevfs_ioctl32 { compat_caddr_t data; }; #endif -#endif /* __KERNEL__ */ #define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer) #define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer) diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index 46919f9f5..dc7c621e4 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h @@ -1,4 +1,4 @@ -#include +#include #include /* Simply sanity version stamp for modules. */ diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 8dba97a29..91140091c 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -1,20 +1,48 @@ -/* - * Video for Linux version 1 - OBSOLETE - * - * Header file for v4l1 drivers and applications, for - * Linux kernels 2.2.x or 2.4.x. - * - * Provides header for legacy drivers and applications - * - * See http://linuxtv.org for more info - * - */ #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H +#include + +#define HAVE_V4L1 1 + #include -#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) +#ifdef __KERNEL__ + +#include + +extern struct video_device* video_devdata(struct file*); + +#define to_video_device(cd) container_of(cd, struct video_device, class_dev) +static inline void +video_device_create_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + class_device_create_file(&vfd->class_dev, attr); +} +static inline void +video_device_remove_file(struct video_device *vfd, + struct class_device_attribute *attr) +{ + class_device_remove_file(&vfd->class_dev, attr); +} + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ +/* helper functions to access driver private data. */ +static inline void *video_get_drvdata(struct video_device *dev) +{ + return dev->priv; +} + +static inline void video_set_drvdata(struct video_device *dev, void *data) +{ + dev->priv = data; +} +#endif + +extern int video_exclusive_open(struct inode *inode, struct file *file); +extern int video_exclusive_release(struct inode *inode, struct file *file); +#endif /* __KERNEL__ */ struct video_capability { @@ -335,9 +363,6 @@ struct video_code #define VID_HARDWARE_SAA7114H 37 #define VID_HARDWARE_SN9C102 38 #define VID_HARDWARE_ARV 39 - -#endif /* CONFIG_VIDEO_V4L1_COMPAT */ - #endif /* __LINUX_VIDEODEV_H */ /* diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index e3715d774..ad7fa9c86 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1,31 +1,35 @@ +#ifndef __LINUX_VIDEODEV2_H +#define __LINUX_VIDEODEV2_H /* * Video for Linux Two * - * Header file for v4l or V4L2 drivers and applications - * with public API. - * All kernel-specific stuff were moved to media/v4l2-dev.h, so - * no #if __KERNEL tests are allowed here + * Header file for v4l or V4L2 drivers and applications, for + * Linux kernels 2.2.x or 2.4.x. * - * See http://linuxtv.org for more info + * See http://bytesex.org/v4l/ for API specs and other + * v4l2 documentation. * * Author: Bill Dirks * Justin Schoeman * et al. */ -#ifndef __LINUX_VIDEODEV2_H -#define __LINUX_VIDEODEV2_H #ifdef __KERNEL__ -#include /* need struct timeval */ -#include /* need __user */ -#else -#define __user +#include /* need struct timeval */ +#include +#include +#include #endif -#include +#include /* need __user */ + + +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ +#define HAVE_V4L2 1 /* * Common stuff for both V4L1 and V4L2 * Moved from videodev.h */ + #define VIDEO_MAX_FRAME 32 #define VID_TYPE_CAPTURE 1 /* Can capture */ @@ -43,6 +47,71 @@ #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ +#ifdef __KERNEL__ + +/* Minor device allocation */ +#define MINOR_VFL_TYPE_GRABBER_MIN 0 +#define MINOR_VFL_TYPE_GRABBER_MAX 63 +#define MINOR_VFL_TYPE_RADIO_MIN 64 +#define MINOR_VFL_TYPE_RADIO_MAX 127 +#define MINOR_VFL_TYPE_VTX_MIN 192 +#define MINOR_VFL_TYPE_VTX_MAX 223 +#define MINOR_VFL_TYPE_VBI_MIN 224 +#define MINOR_VFL_TYPE_VBI_MAX 255 + +#define VFL_TYPE_GRABBER 0 +#define VFL_TYPE_VBI 1 +#define VFL_TYPE_RADIO 2 +#define VFL_TYPE_VTX 3 + +struct video_device +{ + /* device info */ + struct device *dev; + char name[32]; + int type; /* v4l1 */ + int type2; /* v4l2 */ + int hardware; + int minor; + + /* device ops + callbacks */ + const struct file_operations *fops; + void (*release)(struct video_device *vfd); + + +#if OBSOLETE_OWNER /* to be removed in 2.6.15 */ + /* obsolete -- fops->owner is used instead */ + struct module *owner; + /* dev->driver_data will be used instead some day. + * Use the video_{get|set}_drvdata() helper functions, + * so the switch over will be transparent for you. + * Or use {pci|usb}_{get|set}_drvdata() directly. */ + void *priv; +#endif + + /* for videodev.c intenal usage -- please don't touch */ + int users; /* video_exclusive_{open|close} ... */ + struct mutex lock; /* ... helper function uses these */ + char devfs_name[64]; /* devfs */ + struct class_device class_dev; /* sysfs */ +}; + +#define VIDEO_MAJOR 81 + +extern int video_register_device(struct video_device *, int type, int nr); +extern void video_unregister_device(struct video_device *); +extern int video_usercopy(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg, + int (*func)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg)); + +/* helper functions to alloc / release struct video_device, the + later can be used for video_device->release() */ +struct video_device *video_device_alloc(void); +void video_device_release(struct video_device *vfd); + +#endif + /* * M I S C E L L A N E O U S */ @@ -103,8 +172,6 @@ enum v4l2_ctrl_type { V4L2_CTRL_TYPE_BOOLEAN = 2, V4L2_CTRL_TYPE_MENU = 3, V4L2_CTRL_TYPE_BUTTON = 4, - V4L2_CTRL_TYPE_INTEGER64 = 5, - V4L2_CTRL_TYPE_CTRL_CLASS = 6, }; enum v4l2_tuner_type { @@ -203,6 +270,7 @@ struct v4l2_capability /* * V I D E O I M A G E F O R M A T */ + struct v4l2_pix_format { __u32 width; @@ -215,7 +283,7 @@ struct v4l2_pix_format __u32 priv; /* private data, depends on pixelformat */ }; -/* Pixel format FOURCC depth Description */ +/* Pixel format FOURCC depth Description */ #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ @@ -243,7 +311,6 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ -#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:1:1 16x16 macroblocks */ /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ @@ -252,7 +319,7 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ -#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4 */ +#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ @@ -276,6 +343,7 @@ struct v4l2_fmtdesc #define V4L2_FMT_FLAG_COMPRESSED 0x0001 + /* * T I M E C O D E */ @@ -305,15 +373,16 @@ struct v4l2_timecode #define V4L2_TC_USERBITS_8BITCHARS 0x0008 /* The above is based on SMPTE timecodes */ -#ifdef __KERNEL__ + /* * M P E G C O M P R E S S I O N P A R A M E T E R S * - * ### WARNING: This experimental MPEG compression API is obsolete. - * ### It is replaced by the MPEG controls API. - * ### This old API will disappear in the near future! + * ### WARNING: this is still work-in-progress right now, most likely + * ### there will be some incompatible changes. * */ + + enum v4l2_bitrate_mode { V4L2_BITRATE_NONE = 0, /* not specified */ V4L2_BITRATE_CBR, /* constant bitrate */ @@ -391,7 +460,6 @@ struct v4l2_mpeg_compression { /* I don't expect the above being perfect yet ;) */ __u32 reserved_5[8]; }; -#endif struct v4l2_jpegcompression { @@ -423,6 +491,7 @@ struct v4l2_jpegcompression * allways use APP0 */ }; + /* * M E M O R Y - M A P P I N G B U F F E R S */ @@ -504,6 +573,7 @@ struct v4l2_window void __user *bitmap; }; + /* * C A P T U R E P A R A M E T E R S */ @@ -516,7 +586,6 @@ struct v4l2_captureparm __u32 readbuffers; /* # of buffers for read */ __u32 reserved[4]; }; - /* Flags for 'capability' and 'capturemode' fields */ #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ @@ -534,6 +603,7 @@ struct v4l2_outputparm /* * I N P U T I M A G E C R O P P I N G */ + struct v4l2_cropcap { enum v4l2_buf_type type; struct v4l2_rect bounds; @@ -640,6 +710,7 @@ struct v4l2_standard __u32 reserved[4]; }; + /* * V I D E O I N P U T S */ @@ -654,7 +725,6 @@ struct v4l2_input __u32 status; __u32 reserved[4]; }; - /* Values for the 'type' field */ #define V4L2_INPUT_TYPE_TUNER 1 #define V4L2_INPUT_TYPE_CAMERA 2 @@ -705,34 +775,6 @@ struct v4l2_control __s32 value; }; -struct v4l2_ext_control -{ - __u32 id; - __u32 reserved2[2]; - union { - __s32 value; - __s64 value64; - void *reserved; - }; -} __attribute__ ((packed)); - -struct v4l2_ext_controls -{ - __u32 ctrl_class; - __u32 count; - __u32 error_idx; - __u32 reserved[2]; - struct v4l2_ext_control *controls; -}; - -/* Values for ctrl_class field */ -#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ -#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ - -#define V4L2_CTRL_ID_MASK (0x0fffffff) -#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) -#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) - /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ struct v4l2_queryctrl { @@ -759,21 +801,12 @@ struct v4l2_querymenu /* Control flags */ #define V4L2_CTRL_FLAG_DISABLED 0x0001 #define V4L2_CTRL_FLAG_GRABBED 0x0002 -#define V4L2_CTRL_FLAG_READ_ONLY 0x0004 -#define V4L2_CTRL_FLAG_UPDATE 0x0008 -#define V4L2_CTRL_FLAG_INACTIVE 0x0010 -#define V4L2_CTRL_FLAG_SLIDER 0x0020 - -/* Query flag, to be ORed with the control ID */ -#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 -/* User-class control IDs defined by V4L2 */ -#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) -#define V4L2_CID_USER_BASE V4L2_CID_BASE +/* Control IDs defined by V4L2 */ +#define V4L2_CID_BASE 0x00980900 /* IDs reserved for driver specific controls */ #define V4L2_CID_PRIVATE_BASE 0x08000000 -#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) @@ -800,188 +833,6 @@ struct v4l2_querymenu #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ -/* MPEG-class control IDs defined by V4L2 */ -#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) -#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) - -/* MPEG streams */ -#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) -enum v4l2_mpeg_stream_type { - V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ - V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */ - V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */ - V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ - V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ - V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ -}; -#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) -#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) -#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3) -#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) -#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) -#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) -#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7) -enum v4l2_mpeg_stream_vbi_fmt { - V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ - V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ -}; - -/* MPEG audio */ -#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) -enum v4l2_mpeg_audio_sampling_freq { - V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, - V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, -}; -#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101) -enum v4l2_mpeg_audio_encoding { - V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, - V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, - V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, -}; -#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) -enum v4l2_mpeg_audio_l1_bitrate { - V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, - V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, - V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, - V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, - V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, - V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, - V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, - V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, - V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, - V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, - V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, - V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, - V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, -}; -#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103) -enum v4l2_mpeg_audio_l2_bitrate { - V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, - V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, - V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, - V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, - V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, - V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, - V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, - V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, - V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, - V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, - V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, - V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, - V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, -}; -#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104) -enum v4l2_mpeg_audio_l3_bitrate { - V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, - V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, - V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, - V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, - V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, - V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, - V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, - V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, - V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, - V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, - V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, - V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, - V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, - V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, -}; -#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105) -enum v4l2_mpeg_audio_mode { - V4L2_MPEG_AUDIO_MODE_STEREO = 0, - V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, - V4L2_MPEG_AUDIO_MODE_DUAL = 2, - V4L2_MPEG_AUDIO_MODE_MONO = 3, -}; -#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106) -enum v4l2_mpeg_audio_mode_extension { - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, - V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, -}; -#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107) -enum v4l2_mpeg_audio_emphasis { - V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, - V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, - V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, -}; -#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108) -enum v4l2_mpeg_audio_crc { - V4L2_MPEG_AUDIO_CRC_NONE = 0, - V4L2_MPEG_AUDIO_CRC_CRC16 = 1, -}; - -/* MPEG video */ -#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) -enum v4l2_mpeg_video_encoding { - V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, - V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, -}; -#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) -enum v4l2_mpeg_video_aspect { - V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, - V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, - V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, - V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, -}; -#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202) -#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203) -#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204) -#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205) -#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206) -enum v4l2_mpeg_video_bitrate_mode { - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, - V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, -}; -#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) -#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) -#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) - -/* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ -#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) -#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) -enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, - V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, -}; -#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2) -enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, - V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, -}; -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3) -enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, -}; -#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4) -enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, - V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, -}; -#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5) -#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6) -enum v4l2_mpeg_cx2341x_video_median_filter_type { - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, - V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, -}; -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7) -#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) -#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) - /* * T U N I N G */ @@ -1053,7 +904,6 @@ struct v4l2_audio __u32 mode; __u32 reserved[2]; }; - /* Flags for the 'capability' field */ #define V4L2_AUDCAP_STEREO 0x00001 #define V4L2_AUDCAP_AVL 0x00002 @@ -1077,6 +927,7 @@ struct v4l2_audioout */ /* Raw VBI */ + struct v4l2_vbi_format { __u32 sampling_rate; /* in 1 Hz */ @@ -1183,6 +1034,8 @@ struct v4l2_streamparm } parm; }; + + /* * I O C T L C O D E S F O R V I D E O D E V I C E S * @@ -1192,10 +1045,8 @@ struct v4l2_streamparm #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) -#ifdef __KERNEL__ #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) -#endif #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) @@ -1245,11 +1096,7 @@ struct v4l2_streamparm #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) #endif #define VIDIOC_LOG_STATUS _IO ('V', 70) -#define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) -#define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) -#define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls) -#ifdef __OLD_VIDIOC_ /* for compatibility, will go away some day */ #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) @@ -1257,10 +1104,57 @@ struct v4l2_streamparm #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) -#endif #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ + +#ifdef __KERNEL__ +/* + * + * V 4 L 2 D R I V E R H E L P E R A P I + * + * Some commonly needed functions for drivers (v4l2-common.o module) + */ +#include + +/* Video standard functions */ +extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); +extern int v4l2_video_std_construct(struct v4l2_standard *vs, + int id, char *name); + +/* prority handling */ +struct v4l2_prio_state { + atomic_t prios[4]; +}; +int v4l2_prio_init(struct v4l2_prio_state *global); +int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, + enum v4l2_priority new); +int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); +int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); +enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); +int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); + +/* names for fancy debug output */ +extern char *v4l2_field_names[]; +extern char *v4l2_type_names[]; + +/* Compatibility layer interface -- v4l1-compat module */ +typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, + unsigned int cmd, void *arg); + +#ifdef CONFIG_VIDEO_V4L1_COMPAT +int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, + int cmd, void *arg, v4l2_kioctl driver_ioctl); +#else +#define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL +#endif + +/* 32 Bits compatibility layer for 64 bits processors */ +extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, + unsigned long arg); + + +#endif /* __KERNEL__ */ #endif /* __LINUX_VIDEODEV2_H */ /* diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 71b6363ca..1d5577b2b 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -4,14 +4,10 @@ #include #include /* pgprot_t */ -struct vm_area_struct; - /* bits in vm_struct->flags */ #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ #define VM_ALLOC 0x00000002 /* vmalloc() */ #define VM_MAP 0x00000004 /* vmap()ed pages */ -#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ -#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ /* bits [20..32] reserved for arch specific ioremap internals */ /* @@ -36,11 +32,9 @@ struct vm_struct { * Highlevel APIs for driver use */ extern void *vmalloc(unsigned long size); -extern void *vmalloc_user(unsigned long size); extern void *vmalloc_node(unsigned long size, int node); extern void *vmalloc_exec(unsigned long size); extern void *vmalloc_32(unsigned long size); -extern void *vmalloc_32_user(unsigned long size); extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot); @@ -51,9 +45,6 @@ extern void vfree(void *addr); extern void *vmap(struct page **pages, unsigned int count, unsigned long flags, pgprot_t prot); extern void vunmap(void *addr); - -extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, - unsigned long pgoff); /* * Lowlevel-APIs (not for driver use!) diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h deleted file mode 100644 index 198372624..000000000 --- a/include/linux/vmstat.h +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef _LINUX_VMSTAT_H -#define _LINUX_VMSTAT_H - -#include -#include -#include -#include - -#ifdef CONFIG_VM_EVENT_COUNTERS -/* - * Light weight per cpu counter implementation. - * - * Counters should only be incremented and no critical kernel component - * should rely on the counter values. - * - * Counters are handled completely inline. On many platforms the code - * generated will simply be the increment of a global address. - */ - -#define FOR_ALL_ZONES(x) x##_DMA, x##_DMA32, x##_NORMAL, x##_HIGH - -enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, - FOR_ALL_ZONES(PGALLOC), - PGFREE, PGACTIVATE, PGDEACTIVATE, - PGFAULT, PGMAJFAULT, - FOR_ALL_ZONES(PGREFILL), - FOR_ALL_ZONES(PGSTEAL), - FOR_ALL_ZONES(PGSCAN_KSWAPD), - FOR_ALL_ZONES(PGSCAN_DIRECT), - PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, - PAGEOUTRUN, ALLOCSTALL, PGROTATED, - NR_VM_EVENT_ITEMS -}; - -struct vm_event_state { - unsigned long event[NR_VM_EVENT_ITEMS]; -}; - -DECLARE_PER_CPU(struct vm_event_state, vm_event_states); - -static inline void __count_vm_event(enum vm_event_item item) -{ - __get_cpu_var(vm_event_states).event[item]++; -} - -static inline void count_vm_event(enum vm_event_item item) -{ - get_cpu_var(vm_event_states).event[item]++; - put_cpu(); -} - -static inline void __count_vm_events(enum vm_event_item item, long delta) -{ - __get_cpu_var(vm_event_states).event[item] += delta; -} - -static inline void count_vm_events(enum vm_event_item item, long delta) -{ - get_cpu_var(vm_event_states).event[item] += delta; - put_cpu(); -} - -extern void all_vm_events(unsigned long *); -extern void vm_events_fold_cpu(int cpu); - -#else - -/* Disable counters */ -#define get_cpu_vm_events(e) 0L -#define count_vm_event(e) do { } while (0) -#define count_vm_events(e,d) do { } while (0) -#define __count_vm_event(e) do { } while (0) -#define __count_vm_events(e,d) do { } while (0) -#define vm_events_fold_cpu(x) do { } while (0) - -#endif /* CONFIG_VM_EVENT_COUNTERS */ - -#define __count_zone_vm_events(item, zone, delta) \ - __count_vm_events(item##_DMA + zone_idx(zone), delta) - -/* - * Zone based page accounting with per cpu differentials. - */ -extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; - -static inline void zone_page_state_add(long x, struct zone *zone, - enum zone_stat_item item) -{ - atomic_long_add(x, &zone->vm_stat[item]); - atomic_long_add(x, &vm_stat[item]); -} - -static inline unsigned long global_page_state(enum zone_stat_item item) -{ - long x = atomic_long_read(&vm_stat[item]); -#ifdef CONFIG_SMP - if (x < 0) - x = 0; -#endif - return x; -} - -static inline unsigned long zone_page_state(struct zone *zone, - enum zone_stat_item item) -{ - long x = atomic_long_read(&zone->vm_stat[item]); -#ifdef CONFIG_SMP - if (x < 0) - x = 0; -#endif - return x; -} - -#ifdef CONFIG_NUMA -/* - * Determine the per node value of a stat item. This function - * is called frequently in a NUMA machine, so try to be as - * frugal as possible. - */ -static inline unsigned long node_page_state(int node, - enum zone_stat_item item) -{ - struct zone *zones = NODE_DATA(node)->node_zones; - - return -#ifndef CONFIG_DMA_IS_NORMAL -#if !defined(CONFIG_DMA_IS_DMA32) && BITS_PER_LONG >= 64 - zone_page_state(&zones[ZONE_DMA32], item) + -#endif - zone_page_state(&zones[ZONE_NORMAL], item) + -#endif -#ifdef CONFIG_HIGHMEM - zone_page_state(&zones[ZONE_HIGHMEM], item) + -#endif - zone_page_state(&zones[ZONE_DMA], item); -} - -extern void zone_statistics(struct zonelist *, struct zone *); - -#else - -#define node_page_state(node, item) global_page_state(item) -#define zone_statistics(_zl,_z) do { } while (0) - -#endif /* CONFIG_NUMA */ - -#define __add_zone_page_state(__z, __i, __d) \ - __mod_zone_page_state(__z, __i, __d) -#define __sub_zone_page_state(__z, __i, __d) \ - __mod_zone_page_state(__z, __i,-(__d)) - -#define add_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, __d) -#define sub_zone_page_state(__z, __i, __d) mod_zone_page_state(__z, __i, -(__d)) - -static inline void zap_zone_vm_stats(struct zone *zone) -{ - memset(zone->vm_stat, 0, sizeof(zone->vm_stat)); -} - -extern void inc_zone_state(struct zone *, enum zone_stat_item); - -#ifdef CONFIG_SMP -void __mod_zone_page_state(struct zone *, enum zone_stat_item item, int); -void __inc_zone_page_state(struct page *, enum zone_stat_item); -void __dec_zone_page_state(struct page *, enum zone_stat_item); - -void mod_zone_page_state(struct zone *, enum zone_stat_item, int); -void inc_zone_page_state(struct page *, enum zone_stat_item); -void dec_zone_page_state(struct page *, enum zone_stat_item); - -extern void inc_zone_state(struct zone *, enum zone_stat_item); - -void refresh_cpu_vm_stats(int); -void refresh_vm_stats(void); - -#else /* CONFIG_SMP */ - -/* - * We do not maintain differentials in a single processor configuration. - * The functions directly modify the zone and global counters. - */ -static inline void __mod_zone_page_state(struct zone *zone, - enum zone_stat_item item, int delta) -{ - zone_page_state_add(delta, zone, item); -} - -static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item) -{ - atomic_long_inc(&zone->vm_stat[item]); - atomic_long_inc(&vm_stat[item]); -} - -static inline void __inc_zone_page_state(struct page *page, - enum zone_stat_item item) -{ - __inc_zone_state(page_zone(page), item); -} - -static inline void __dec_zone_page_state(struct page *page, - enum zone_stat_item item) -{ - atomic_long_dec(&page_zone(page)->vm_stat[item]); - atomic_long_dec(&vm_stat[item]); -} - -/* - * We only use atomic operations to update counters. So there is no need to - * disable interrupts. - */ -#define inc_zone_page_state __inc_zone_page_state -#define dec_zone_page_state __dec_zone_page_state -#define mod_zone_page_state __mod_zone_page_state - -static inline void refresh_cpu_vm_stats(int cpu) { } -static inline void refresh_vm_stats(void) { } -#endif - -#endif /* _LINUX_VMSTAT_H */ diff --git a/include/linux/vs_base.h b/include/linux/vs_base.h index 0022fe45f..b732600c4 100644 --- a/include/linux/vs_base.h +++ b/include/linux/vs_base.h @@ -3,19 +3,11 @@ #include "vserver/context.h" -#define VX_IRQ 0x4000 -#define VX_IRQ_MASK 0xF000 -#if 1 -#include -#endif - #define vx_task_xid(t) ((t)->xid) #define vx_current_xid() vx_task_xid(current) -#define current_vx_info() (current->vx_info) - -#define vx_check(c,m) __vx_check(vx_current_xid(),c,m|VX_IRQ) +#define vx_check(c,m) __vx_check(vx_current_xid(),c,m) #define vx_weak_check(c,m) ((m) ? vx_check(c,m) : 1) @@ -40,10 +32,6 @@ static inline int __vx_check(xid_t cid, xid_t id, unsigned int mode) (id > 1) && (id < MIN_D_CONTEXT)) return 1; } -#if 1 - if ((mode & VX_IRQ) && (unlikely(in_interrupt()))) - return 1; -#endif return (((mode & VX_ADMIN) && (cid == 0)) || ((mode & VX_WATCH) && (cid == 1)) || diff --git a/include/linux/vs_context.h b/include/linux/vs_context.h index fd8e966c9..8cdeb8d3a 100644 --- a/include/linux/vs_context.h +++ b/include/linux/vs_context.h @@ -170,50 +170,7 @@ static inline void __wakeup_vx_info(struct vx_info *vxi) wake_up_interruptible(&vxi->vx_wait); } - -#define enter_vx_info(v,s) __enter_vx_info(v,s,__FILE__,__LINE__) - -static inline void __enter_vx_info(struct vx_info *vxi, - struct vx_info_save *vxis, const char *_file, int _line) -{ - vxlprintk(VXD_CBIT(xid, 5), "enter_vx_info(%p[#%d],%p) %p[#%d,%p]", - vxi, vxi ? vxi->vx_id : 0, vxis, current, - current->xid, current->vx_info, _file, _line); - vxis->vxi = xchg(¤t->vx_info, vxi); - vxis->xid = current->xid; - current->xid = vxi ? vxi->vx_id : 0; -} - -#define leave_vx_info(s) __leave_vx_info(s,__FILE__,__LINE__) - -static inline void __leave_vx_info(struct vx_info_save *vxis, - const char *_file, int _line) -{ - vxlprintk(VXD_CBIT(xid, 5), "leave_vx_info(%p[#%d,%p]) %p[#%d,%p]", - vxis, vxis->xid, vxis->vxi, current, - current->xid, current->vx_info, _file, _line); - (void)xchg(¤t->vx_info, vxis->vxi); - current->xid = vxis->xid; -} - - -static inline void __enter_vx_admin(struct vx_info_save *vxis) -{ - return; - vxis->vxi = xchg(¤t->vx_info, NULL); - vxis->xid = xchg(¤t->xid, (xid_t)0); -} - -static inline void __leave_vx_admin(struct vx_info_save *vxis) -{ - return; - (void)xchg(¤t->xid, vxis->xid); - (void)xchg(¤t->vx_info, vxis->vxi); -} - extern void exit_vx_info(struct task_struct *, int); -extern void exit_vx_info_early(struct task_struct *, int); - static inline struct task_struct *vx_child_reaper(struct task_struct *p) @@ -232,9 +189,6 @@ struct task_struct *vx_child_reaper(struct task_struct *p) reaper = vxi->vx_reaper; out: - vxdprintk(VXD_CBIT(xid, 3), - "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]\n", - p, p->xid, p->pid, reaper, reaper->xid, reaper->pid); return reaper; } diff --git a/include/linux/vs_cvirt.h b/include/linux/vs_cvirt.h index 143fbebd2..0901e7360 100644 --- a/include/linux/vs_cvirt.h +++ b/include/linux/vs_cvirt.h @@ -103,55 +103,6 @@ static inline void vx_uninterruptible_dec(struct task_struct *p) } -struct inode; - -#define VXF_FAKE_INIT (VXF_INFO_INIT|VXF_STATE_INIT) - -static inline -int vx_proc_pid_visible(struct task_struct *task, int pid) -{ - if ((pid == 1) && - !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT)) - /* show a blend through init */ - goto visible; - if (vx_check(vx_task_xid(task), VX_WATCH|VX_IDENT)) - goto visible; - return 0; -visible: - return 1; -} - -static inline -struct task_struct *vx_find_proc_task_by_pid(int pid) -{ - struct task_struct *task = find_task_by_pid(pid); - - if (task && !vx_proc_pid_visible(task, pid)) { - vxdprintk(VXD_CBIT(misc, 6), - "dropping task %p[#%u,%u] for %p[#%u,%u]", - task, task->xid, task->pid, - current, current->xid, current->pid); - task = NULL; - } - return task; -} - -static inline -struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid) -{ - struct task_struct *task = get_pid_task(pid, PIDTYPE_PID); - - if (task && !vx_proc_pid_visible(task, pid->nr)) { - vxdprintk(VXD_CBIT(misc, 6), - "dropping task %p[#%u,%u] for %p[#%u,%u]", - task, task->xid, task->pid, - current, current->xid, current->pid); - put_task_struct(task); - task = NULL; - } - return task; -} - #else #warning duplicate inclusion #endif diff --git a/include/linux/vs_dlimit.h b/include/linux/vs_dlimit.h index b39a32a8a..674262d97 100644 --- a/include/linux/vs_dlimit.h +++ b/include/linux/vs_dlimit.h @@ -144,7 +144,7 @@ out: } static inline void __dl_adjust_block(struct super_block *sb, xid_t xid, - unsigned long *free_blocks, unsigned long *root_blocks, + unsigned int *free_blocks, unsigned int *root_blocks, const char *_file, int _line) { struct dl_info *dli; @@ -163,7 +163,7 @@ static inline void __dl_adjust_block(struct super_block *sb, xid_t xid, spin_unlock(&dli->dl_lock); vxlprintk(VXD_CBIT(dlim, 2), - "ADJUST: %lld,%lld on %ld,%ld [mult=%d]", + "ADJUST: %lld,%lld on %d,%d [mult=%d]", (long long)bfree, (long long)broot, *free_blocks, *root_blocks, dli->dl_nrlmult, _file, _line); diff --git a/include/linux/vs_network.h b/include/linux/vs_network.h index 777481ecd..28fa78166 100644 --- a/include/linux/vs_network.h +++ b/include/linux/vs_network.h @@ -154,9 +154,6 @@ static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p, #define nx_current_nid() nx_task_nid(current) -#define current_nx_info() (current->nx_info) - - #define nx_check(c,m) __nx_check(nx_current_nid(),c,m) #define nx_weak_check(c,m) ((m) ? nx_check(c,m) : 1) @@ -199,8 +196,6 @@ static inline int addr_in_nx_info(struct nx_info *nxi, uint32_t addr) return 1; n = nxi->nbipv4; - if (n && (nxi->ipv4[0] == 0)) - return 1; for (i=0; iipv4[i] == addr) return 1; diff --git a/include/linux/vs_socket.h b/include/linux/vs_socket.h index c9c624442..9173bfe26 100644 --- a/include/linux/vs_socket.h +++ b/include/linux/vs_socket.h @@ -7,24 +7,16 @@ /* socket accounting */ #include -#include static inline int vx_sock_type(int family) { - switch (family) { - case PF_UNSPEC: - return VXA_SOCK_UNSPEC; - case PF_UNIX: - return VXA_SOCK_UNIX; - case PF_INET: - return VXA_SOCK_INET; - case PF_INET6: - return VXA_SOCK_INET6; - case PF_PACKET: - return VXA_SOCK_PACKET; - default: - return VXA_SOCK_OTHER; - } + int type = 4; + + if (family > 0 && family < 3) + type = family; + else if (family == PF_INET6) + type = 3; + return type; } #define vx_acc_sock(v,f,p,s) \ diff --git a/include/linux/vserver/cacct.h b/include/linux/vserver/cacct.h deleted file mode 100644 index aa202ccdc..000000000 --- a/include/linux/vserver/cacct.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _VX_CACCT_H -#define _VX_CACCT_H - - -enum sock_acc_field { - VXA_SOCK_UNSPEC = 0, - VXA_SOCK_UNIX, - VXA_SOCK_INET, - VXA_SOCK_INET6, - VXA_SOCK_PACKET, - VXA_SOCK_OTHER, - VXA_SOCK_SIZE /* array size */ -}; - -#endif /* _VX_CACCT_H */ diff --git a/include/linux/vserver/context.h b/include/linux/vserver/context.h index f29af2356..4053ced81 100644 --- a/include/linux/vserver/context.h +++ b/include/linux/vserver/context.h @@ -11,6 +11,7 @@ /* context flags */ +#define VXF_INFO_LOCK 0x00000001 #define VXF_INFO_SCHED 0x00000002 #define VXF_INFO_NPROC 0x00000004 #define VXF_INFO_PRIVATE 0x00000008 @@ -123,12 +124,6 @@ struct vx_info { }; -struct vx_info_save { - struct vx_info *vxi; - xid_t xid; -}; - - /* status flags */ #define VXS_HASHED 0x0001 diff --git a/include/linux/vserver/cvirt_def.h b/include/linux/vserver/cvirt_def.h index c368c2e59..23aa246f5 100644 --- a/include/linux/vserver/cvirt_def.h +++ b/include/linux/vserver/cvirt_def.h @@ -8,8 +8,6 @@ #include #include -#include "cacct.h" - struct _vx_usage_stat { uint64_t user; @@ -58,6 +56,8 @@ struct _vx_cvirt { atomic_t total_forks; /* number of forks so far */ + struct _vx_usage_stat cpustat[NR_CPUS]; + struct _vx_syslog syslog; }; @@ -71,7 +71,7 @@ struct _vx_sock_acc { struct _vx_cacct { unsigned long total_forks; - struct _vx_sock_acc sock[VXA_SOCK_SIZE][3]; + struct _vx_sock_acc sock[5][3]; }; #endif /* _VX_CVIRT_DEF_H */ diff --git a/include/linux/vserver/dlimit_cmd.h b/include/linux/vserver/dlimit_cmd.h index b91a9462a..35f7a6834 100644 --- a/include/linux/vserver/dlimit_cmd.h +++ b/include/linux/vserver/dlimit_cmd.h @@ -1,6 +1,7 @@ #ifndef _VX_DLIMIT_CMD_H #define _VX_DLIMIT_CMD_H + /* dlimit vserver commands */ #define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0) diff --git a/include/linux/vserver/inode_cmd.h b/include/linux/vserver/inode_cmd.h index 2b6afeac4..df5e966e7 100644 --- a/include/linux/vserver/inode_cmd.h +++ b/include/linux/vserver/inode_cmd.h @@ -1,6 +1,7 @@ #ifndef _VX_INODE_CMD_H #define _VX_INODE_CMD_H + /* inode vserver commands */ #define VCMD_get_iattr_v0 VC_CMD(INODE, 1, 0) @@ -27,6 +28,18 @@ struct vcmd_ctx_iattr_v1 { #ifdef __KERNEL__ + +#ifdef CONFIG_COMPAT + +struct vcmd_ctx_iattr_v1_x32 { + compat_uptr_t name_ptr; + uint32_t xid; + uint32_t flags; + uint32_t mask; +}; + +#endif /* CONFIG_COMPAT */ + #include extern int vc_get_iattr_v0(uint32_t, void __user *); @@ -35,5 +48,12 @@ extern int vc_set_iattr_v0(uint32_t, void __user *); extern int vc_get_iattr(uint32_t, void __user *); extern int vc_set_iattr(uint32_t, void __user *); +#ifdef CONFIG_COMPAT + +extern int vc_get_iattr_x32(uint32_t, void __user *); +extern int vc_set_iattr_x32(uint32_t, void __user *); + +#endif /* CONFIG_COMPAT */ + #endif /* __KERNEL__ */ #endif /* _VX_INODE_CMD_H */ diff --git a/include/linux/vserver/network.h b/include/linux/vserver/network.h index 6dfbb38e9..0e0253b83 100644 --- a/include/linux/vserver/network.h +++ b/include/linux/vserver/network.h @@ -13,8 +13,6 @@ /* network flags */ -#define NXF_INFO_PRIVATE 0x00000008 - #define NXF_STATE_SETUP (1ULL<<32) #define NXF_SC_HELPER (1ULL<<36) diff --git a/include/linux/vserver/xid.h b/include/linux/vserver/xid.h index 1498de4ba..2e4349eb2 100644 --- a/include/linux/vserver/xid.h +++ b/include/linux/vserver/xid.h @@ -1,6 +1,8 @@ #ifndef _VX_XID_H #define _VX_XID_H +#include + #define XID_TAG(in) (IS_TAGXID(in)) diff --git a/include/linux/vt.h b/include/linux/vt.h index ba806e871..9f95b0bea 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h @@ -1,16 +1,6 @@ #ifndef _LINUX_VT_H #define _LINUX_VT_H -/* - * These constants are also useful for user-level apps (e.g., VC - * resizing). - */ -#define MIN_NR_CONSOLES 1 /* must be at least 1 */ -#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ -#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ - /* Note: the ioctl VT_GETSTATE does not work for - consoles 16 and higher (since it returns a short) */ - /* 0x56 is 'V', to avoid collision with termios and kd */ #define VT_OPENQRY 0x5600 /* find available vt */ @@ -60,6 +50,5 @@ struct vt_consize { #define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */ #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ -#define VT_GETHIFONTMASK 0x560D /* return hi font mask */ #endif /* _LINUX_VT_H */ diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h index 057db7d2f..1f7ba3629 100644 --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h @@ -13,6 +13,7 @@ #ifndef _LINUX_VT_BUFFER_H_ #define _LINUX_VT_BUFFER_H_ +#include #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) #include diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 1009d3fe1..fab5aed8c 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h @@ -6,6 +6,7 @@ * with information needed by the vt package */ +#include #include #include #include @@ -26,15 +27,13 @@ extern void kd_mksound(unsigned int hz, unsigned int ticks); extern int kbd_rate(struct kbd_repeat *rep); -extern int fg_console, last_console, want_console; /* console.c */ int vc_allocate(unsigned int console); int vc_cons_allocated(unsigned int console); int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); -int vc_lock_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); -void vc_deallocate(unsigned int console); +void vc_disallocate(unsigned int console); void reset_palette(struct vc_data *vc); void do_blank_screen(int entering_gfx); void do_unblank_screen(int leaving_gfx); diff --git a/include/linux/wait.h b/include/linux/wait.h index 868dc31e8..34f41e790 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -19,6 +19,7 @@ #ifdef __KERNEL__ +#include #include #include #include @@ -68,7 +69,7 @@ struct task_struct; wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk) #define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \ - .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ + .lock = SPIN_LOCK_UNLOCKED, \ .task_list = { &(name).task_list, &(name).task_list } } #define DECLARE_WAIT_QUEUE_HEAD(name) \ @@ -77,7 +78,11 @@ struct task_struct; #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ { .flags = word, .bit_nr = bit, } -extern void init_waitqueue_head(wait_queue_head_t *q); +static inline void init_waitqueue_head(wait_queue_head_t *q) +{ + spin_lock_init(&q->lock); + INIT_LIST_HEAD(&q->task_list); +} static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) { @@ -110,7 +115,7 @@ static inline int waitqueue_active(wait_queue_head_t *q) extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait)); -extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); +extern int FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)); static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) { diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 2cd05013e..1b6b76a4e 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h @@ -44,6 +44,8 @@ * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). *****************************************************************************/ +#include /* Support for SMP Locking */ + #ifndef _ROUTER_H #define _ROUTER_H @@ -455,8 +457,6 @@ typedef struct wanif_conf #include /* support for device drivers */ #include /* proc filesystem pragmatics */ #include /* support for network drivers */ -#include /* Support for SMP Locking */ - /*---------------------------------------------------------------------------- * WAN device data space. */ diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 011bcfeb9..1192ed8f4 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h @@ -28,9 +28,6 @@ struct watchdog_info { #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) -#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int) -#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int) -#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int) #define WDIOF_UNKNOWN -1 /* Unknown flag error */ #define WDIOS_UNKNOWN -1 /* Unknown status error */ @@ -41,10 +38,9 @@ struct watchdog_info { #define WDIOF_EXTERN2 0x0008 /* External relay 2 */ #define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ #define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ -#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ -#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ -#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ -#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */ +#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ +#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ +#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 9bca3539a..957c21c16 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -63,8 +63,6 @@ extern void destroy_workqueue(struct workqueue_struct *wq); extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay)); -extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, - struct work_struct *work, unsigned long delay); extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); extern int FASTCALL(schedule_work(struct work_struct *work)); diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 05843b8b8..56f92fcbe 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -50,15 +50,14 @@ struct writeback_control { * a hint that the filesystem need only write out the pages inside that * byterange. The byte at `end' is included in the writeout request. */ - loff_t range_start; - loff_t range_end; + loff_t start; + loff_t end; unsigned nonblocking:1; /* Don't get stuck on request queues */ unsigned encountered_congestion:1; /* An output: a queue is full */ unsigned for_kupdate:1; /* A kupdate writeback */ unsigned for_reclaim:1; /* Invoked from the page allocator */ unsigned for_writepages:1; /* This is a writepages() call */ - unsigned range_cyclic:1; /* range_start is cyclic */ }; /* @@ -115,7 +114,6 @@ int sync_page_range(struct inode *inode, struct address_space *mapping, loff_t pos, loff_t count); int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, loff_t pos, loff_t count); -void set_page_dirty_balance(struct page *page); /* pdflush.c */ extern int nr_pdflush_threads; /* Global so it can be exported to sysctl diff --git a/include/linux/xenfb.h b/include/linux/xenfb.h deleted file mode 100644 index 3653c57f6..000000000 --- a/include/linux/xenfb.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * linux/include/linux/xenfb.h -- Xen virtual frame buffer device - * - * Copyright (C) 2005 - * - * Anthony Liguori - * - * 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. - */ - -#ifndef _LINUX_XENFB_H -#define _LINUX_XENFB_H - -#include - -/* out events */ - -#define XENFB_OUT_EVENT_SIZE 40 - -#define XENFB_TYPE_MOTION 1 -#define XENFB_TYPE_UPDATE 2 - -struct xenfb_motion /* currently unused */ -{ - __u8 type; /* XENFB_TYPE_MOTION */ - __u16 x; /* The new x coordinate */ - __u16 y; /* The new y coordinate */ -}; - -struct xenfb_update -{ - __u8 type; /* XENFB_TYPE_UPDATE */ - __u16 x; /* source x */ - __u16 y; /* source y */ - __u16 width; /* rect width */ - __u16 height; /* rect height */ -}; - -union xenfb_out_event -{ - __u8 type; - struct xenfb_motion motion; - struct xenfb_update update; - char _[XENFB_OUT_EVENT_SIZE]; -}; - -/* in events */ - -#define XENFB_IN_EVENT_SIZE 40 - -#define XENFB_TYPE_SET_EVENTS 1 - -#define XENFB_FLAG_MOTION 1 -#define XENFB_FLAG_UPDATE 2 -#define XENFB_FLAG_COPY 4 -#define XENFB_FLAG_FILL 8 - -struct xenfb_set_events -{ - __u8 type; /* XENFB_TYPE_SET_EVENTS */ - __u32 flags; /* combination of XENFB_FLAG_* */ -}; - -union xenfb_in_event -{ - __u8 type; - struct xenfb_set_events set_events; - char _[XENFB_OUT_EVENT_SIZE]; -}; - -/* shared page */ - -#define XENFB_IN_RING_SIZE 1024 -#define XENFB_IN_RING_LEN (XENFB_IN_RING_SIZE / XENFB_IN_EVENT_SIZE) -#define XENFB_IN_RING_OFFS 1024 -#define XENFB_IN_RING(page) \ - ((union xenfb_in_event *)((char *)(page) + XENFB_IN_RING_OFFS)) -#define XENFB_IN_RING_REF(page, idx) \ - (XENFB_IN_RING((page))[(idx) % XENFB_IN_RING_LEN]) - -#define XENFB_OUT_RING_SIZE 2048 -#define XENFB_OUT_RING_LEN (XENFB_OUT_RING_SIZE / XENFB_OUT_EVENT_SIZE) -#define XENFB_OUT_RING_OFFS (XENFB_IN_RING_OFFS + XENFB_IN_RING_SIZE) -#define XENFB_OUT_RING(page) \ - ((union xenfb_out_event *)((char *)(page) + XENFB_OUT_RING_OFFS)) -#define XENFB_OUT_RING_REF(page, idx) \ - (XENFB_OUT_RING((page))[(idx) % XENFB_OUT_RING_LEN]) - -struct xenfb_page -{ - __u16 width; /* the width of the framebuffer (in pixels) */ - __u16 height; /* the height of the framebuffer (in pixels) */ - __u32 line_length; /* the length of a row of pixels (in bytes) */ - __u32 mem_length; /* the length of the framebuffer (in bytes) */ - __u8 depth; /* the depth of a pixel (in bits) */ - - unsigned long pd[2]; /* FIXME rename to pgdir? */ - /* FIXME pd[1] unused at this time, shrink? */ - - __u32 in_cons, in_prod; - __u32 out_cons, out_prod; -}; - -void xenfb_resume(void); - -#endif diff --git a/include/linux/xenkbd.h b/include/linux/xenkbd.h deleted file mode 100644 index c023c123d..000000000 --- a/include/linux/xenkbd.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * linux/include/linux/xenkbd.h -- Xen virtual keyboard/mouse - * - * Copyright (C) 2005 - * - * Anthony Liguori - * - * 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. - */ - -#ifndef _LINUX_XENKBD_H -#define _LINUX_XENKBD_H - -#include - -/* in events */ - -#define XENKBD_IN_EVENT_SIZE 40 - -#define XENKBD_TYPE_MOTION 1 /* mouse movement event */ -#define XENKBD_TYPE_BUTTON 2 /* mouse button event */ -#define XENKBD_TYPE_KEY 3 /* keyboard event */ - -struct xenkbd_motion -{ - __u8 type; /* XENKBD_TYPE_MOTION */ - __s16 rel_x; /* relative X motion */ - __s16 rel_y; /* relative Y motion */ -}; - -struct xenkbd_button -{ - __u8 type; /* XENKBD_TYPE_BUTTON */ - __u8 pressed; /* 1 if pressed; 0 otherwise */ - __u8 button; /* the button (0, 1, 2 is right, middle, left) */ -}; - -struct xenkbd_key -{ - __u8 type; /* XENKBD_TYPE_KEY */ - __u8 pressed; /* 1 if pressed; 0 otherwise */ - __u16 keycode; /* KEY_* from linux/input.h */ -}; - -union xenkbd_in_event -{ - __u8 type; - struct xenkbd_motion motion; - struct xenkbd_button button; - struct xenkbd_key key; - char _[XENKBD_IN_EVENT_SIZE]; -}; - -/* out events */ - -#define XENKBD_OUT_EVENT_SIZE 40 - -union xenkbd_out_event -{ - __u8 type; - char _[XENKBD_OUT_EVENT_SIZE]; -}; - -/* shared page */ - -#define XENKBD_IN_RING_SIZE 2048 -#define XENKBD_IN_RING_LEN (XENKBD_IN_RING_SIZE / XENKBD_IN_EVENT_SIZE) -#define XENKBD_IN_RING_OFFS 1024 -#define XENKBD_IN_RING(page) \ - ((union xenkbd_in_event *)((char *)(page) + XENKBD_IN_RING_OFFS)) -#define XENKBD_IN_RING_REF(page, idx) \ - (XENKBD_IN_RING((page))[(idx) % XENKBD_IN_RING_LEN]) - -#define XENKBD_OUT_RING_SIZE 1024 -#define XENKBD_OUT_RING_LEN (XENKBD_OUT_RING_SIZE / XENKBD_OUT_EVENT_SIZE) -#define XENKBD_OUT_RING_OFFS (XENKBD_IN_RING_OFFS + XENKBD_IN_RING_SIZE) -#define XENKBD_OUT_RING(page) \ - ((union xenkbd_out_event *)((char *)(page) + XENKBD_OUT_RING_OFFS)) -#define XENKBD_OUT_RING_REF(page, idx) \ - (XENKBD_OUT_RING((page))[(idx) % XENKBD_OUT_RING_LEN]) - -struct xenkbd_info -{ - __u32 in_cons, in_prod; - __u32 out_cons, out_prod; -}; - -void xenkbd_resume(void); - -#endif diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 46a15c7a1..6b42cc474 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h @@ -118,10 +118,6 @@ enum XFRM_SHARE_UNIQUE /* Use once */ }; -#define XFRM_MODE_TRANSPORT 0 -#define XFRM_MODE_TUNNEL 1 -#define XFRM_MODE_MAX 2 - /* Netlink configuration messages. */ enum { XFRM_MSG_BASE = 0x10, diff --git a/include/linux/zconf.h b/include/linux/zconf.h index 0beb75e38..f1cfd66b9 100644 --- a/include/linux/zconf.h +++ b/include/linux/zconf.h @@ -33,18 +33,6 @@ */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* default windowBits for decompression. MAX_WBITS is for compression only */ -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif - -/* default memLevel */ -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif /* Type declarations */ diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 9e3192a7d..4fa32f0d4 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h @@ -1,6 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.3, July 9th, 1998 - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -23,7 +24,7 @@ The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt + Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). */ @@ -32,22 +33,7 @@ #include -/* zlib deflate based on ZLIB_VERSION "1.1.3" */ -/* zlib inflate based on ZLIB_VERSION "1.2.3" */ - -/* - This is a modified version of zlib for use inside the Linux kernel. - The main changes are to perform all memory allocation in advance. - - Inflation Changes: - * Z_PACKET_FLUSH is added and used by ppp_deflate. Before returning - this checks there is no more input data available and the next data - is a STORED block. It also resets the mode to be read for the next - data, all as per PPP requirements. - * Addition of zlib_inflateIncomp which copies incompressible data into - the history window and adjusts the accoutning without calling - zlib_inflate itself to inflate the data. -*/ +#define ZLIB_VERSION "1.1.3" /* The 'zlib' compression library provides in-memory compression and @@ -62,18 +48,9 @@ application must provide more input and/or consume the output (providing more output space) before each call. - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio. - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. @@ -142,8 +119,7 @@ typedef z_stream *z_streamp; #define Z_SYNC_FLUSH 3 #define Z_FULL_FLUSH 4 #define Z_FINISH 5 -#define Z_BLOCK 6 /* Only for inflate at present */ -/* Allowed flush values; see deflate() and inflate() below for details */ +/* Allowed flush values; see deflate() below for details */ #define Z_OK 0 #define Z_STREAM_END 1 @@ -179,6 +155,13 @@ typedef z_stream *z_streamp; /* basic functions */ +extern const char * zlib_zlibVersion (void); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + */ + extern int zlib_deflate_workspacesize (void); /* Returns the number of bytes that needs to be allocated for a per- @@ -332,9 +315,9 @@ extern int zlib_inflateInit (z_streamp strm); extern int zlib_inflate (z_streamp strm, int flush); /* inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. + buffer becomes empty or the output buffer becomes full. It may some + introduce some output latency (reading input without producing any output) + except when forced to flush. The detailed semantics are as follows. inflate performs one or both of the following actions: @@ -358,26 +341,11 @@ extern int zlib_inflate (z_streamp strm, int flush); must be called again after making room in the output buffer because there might be more output pending. - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. + If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much + output as possible to the output buffer. The flushing behavior of inflate is + not specified for values of the flush parameter other than Z_SYNC_FLUSH + and Z_FINISH, but the current implementation actually flushes as much output + as possible anyway. inflate() should normally be called until it returns Z_STREAM_END or an error. However if all decompression is to be performed in a single step @@ -387,44 +355,29 @@ extern int zlib_inflate (z_streamp strm, int flush); uncompressed data. (The size of the uncompressed data may have been saved by the compressor for this purpose.) The next operation on this stream must be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach + is never required, but can be used to inform inflate that a faster routine may be used for the single inflate() call. - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation - is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the adler32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the adler32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. + If a preset dictionary is needed at this point (see inflateSetDictionary + below), inflate sets strm-adler to the adler32 checksum of the + dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise + it sets strm->adler to the adler32 checksum of all output produced + so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or + an error code as described below. At the end of the stream, inflate() + checks that its computed adler32 checksum is equal to that saved by the + compressor and returns Z_STREAM_END only if the checksum is correct. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_NEED_DICT if a preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. + corrupted (input stream not conforming to the zlib format or incorrect + adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent + (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if no progress is possible or if there was not + enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR + case, the application may then call inflateSync to look for a good + compression block. */ @@ -594,36 +547,16 @@ extern int inflateInit2 (z_streamp strm, int windowBits); The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) + instead. If a compressed stream with a larger window size is given as + input, inflate() will return with the error code Z_DATA_ERROR instead of + trying to allocate a larger window. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative + memLevel). msg is set to null if there is no error message. inflateInit2 + does not perform any decompression apart from reading the zlib header if + present: this will be done by inflate(). (So next_in and avail_in may be + modified, but next_out and avail_out are unchanged.) */ extern int zlib_inflateSetDictionary (z_streamp strm, @@ -631,19 +564,16 @@ extern int zlib_inflateSetDictionary (z_streamp strm, uInt dictLength); /* Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called - immediately after inflateInit2() or inflateReset() and before any call of - inflate() to set the dictionary. The application must insure that the - dictionary that was used for compression is provided. + sequence. This function must be called immediately after a call of inflate + if this call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler32 value returned by this call of + inflate. The compressor and decompressor must use exactly the same + dictionary (see deflateSetDictionary). inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a parameter is invalid (such as NULL dictionary) or the stream state is inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not + expected one (incorrect Adler32 value). inflateSetDictionary does not perform any decompression: this will be done by subsequent calls of inflate(). */ @@ -684,19 +614,40 @@ extern int zlib_inflateIncomp (z_stream *strm); containing the data at next_in (except that the data is not output). */ + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +extern int zlib_deflateInit_ (z_streamp strm, int level, + const char *version, int stream_size); +extern int zlib_inflateInit_ (z_streamp strm, + const char *version, int stream_size); +extern int zlib_deflateInit2_ (z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +extern int zlib_inflateInit2_ (z_streamp strm, int windowBits, + const char *version, int stream_size); #define zlib_deflateInit(strm, level) \ - zlib_deflateInit2((strm), (level), Z_DEFLATED, MAX_WBITS, \ - DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY) + zlib_deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) #define zlib_inflateInit(strm) \ - zlib_inflateInit2((strm), DEF_WBITS) + zlib_inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +#define zlib_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + zlib_deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +#define zlib_inflateInit2(strm, windowBits) \ + zlib_inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) -extern int zlib_deflateInit2(z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy); -extern int zlib_inflateInit2(z_streamp strm, int windowBits); #if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL) struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif +extern const char * zlib_zError (int err); +#if 0 +extern int zlib_inflateSyncPoint (z_streamp z); +#endif +extern const uLong * zlib_get_crc_table (void); + #endif /* _ZLIB_H */ diff --git a/include/linux/zorro.h b/include/linux/zorro.h index 913bfc226..2f135cf6e 100644 --- a/include/linux/zorro.h +++ b/include/linux/zorro.h @@ -11,6 +11,8 @@ #ifndef _LINUX_ZORRO_H #define _LINUX_ZORRO_H +#ifndef __ASSEMBLY__ + #include @@ -110,6 +112,45 @@ struct ConfigDev { __u32 cd_Unused[4]; /* for whatever the driver wants */ } __attribute__ ((packed)); +#else /* __ASSEMBLY__ */ + +LN_Succ = 0 +LN_Pred = LN_Succ+4 +LN_Type = LN_Pred+4 +LN_Pri = LN_Type+1 +LN_Name = LN_Pri+1 +LN_sizeof = LN_Name+4 + +ER_Type = 0 +ER_Product = ER_Type+1 +ER_Flags = ER_Product+1 +ER_Reserved03 = ER_Flags+1 +ER_Manufacturer = ER_Reserved03+1 +ER_SerialNumber = ER_Manufacturer+2 +ER_InitDiagVec = ER_SerialNumber+4 +ER_Reserved0c = ER_InitDiagVec+2 +ER_Reserved0d = ER_Reserved0c+1 +ER_Reserved0e = ER_Reserved0d+1 +ER_Reserved0f = ER_Reserved0e+1 +ER_sizeof = ER_Reserved0f+1 + +CD_Node = 0 +CD_Flags = CD_Node+LN_sizeof +CD_Pad = CD_Flags+1 +CD_Rom = CD_Pad+1 +CD_BoardAddr = CD_Rom+ER_sizeof +CD_BoardSize = CD_BoardAddr+4 +CD_SlotAddr = CD_BoardSize+4 +CD_SlotSize = CD_SlotAddr+2 +CD_Driver = CD_SlotSize+2 +CD_NextCD = CD_Driver+4 +CD_Unused = CD_NextCD+4 +CD_sizeof = CD_Unused+(4*4) + +#endif /* __ASSEMBLY__ */ + +#ifndef __ASSEMBLY__ + #define ZORRO_NUM_AUTO 16 #ifdef __KERNEL__ @@ -249,6 +290,7 @@ extern DECLARE_BITMAP(zorro_unused_z2ram, 128); #define Z2RAM_CHUNKSHIFT (16) +#endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _LINUX_ZORRO_H */ diff --git a/include/linux/zutil.h b/include/linux/zutil.h index 6adfa9a6f..ee0c59cf2 100644 --- a/include/linux/zutil.h +++ b/include/linux/zutil.h @@ -23,6 +23,18 @@ typedef unsigned long ulg; /* common constants */ +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + #define STORED_BLOCK 0 #define STATIC_TREES 1 #define DYN_TREES 2 diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h deleted file mode 100644 index d91d88f93..000000000 --- a/include/media/cx2341x.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - cx23415/6 header containing common defines. - - 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 CX2341X_H -#define CX2341X_H - -enum cx2341x_port { - CX2341X_PORT_MEMORY = 0, - CX2341X_PORT_STREAMING = 1, - CX2341X_PORT_SERIAL = 2 -}; - -enum cx2341x_cap { - CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, -}; - -struct cx2341x_mpeg_params { - /* misc */ - u32 capabilities; - enum cx2341x_port port; - u16 width; - u16 height; - u16 is_50hz; - - /* stream */ - enum v4l2_mpeg_stream_type stream_type; - enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; - - /* audio */ - enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; - enum v4l2_mpeg_audio_encoding audio_encoding; - enum v4l2_mpeg_audio_l2_bitrate audio_l2_bitrate; - enum v4l2_mpeg_audio_mode audio_mode; - enum v4l2_mpeg_audio_mode_extension audio_mode_extension; - enum v4l2_mpeg_audio_emphasis audio_emphasis; - enum v4l2_mpeg_audio_crc audio_crc; - u8 audio_properties; - - /* video */ - enum v4l2_mpeg_video_encoding video_encoding; - enum v4l2_mpeg_video_aspect video_aspect; - u16 video_b_frames; - u16 video_gop_size; - u16 video_gop_closure; - u16 video_pulldown; - enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; - u32 video_bitrate; - u32 video_bitrate_peak; - u16 video_temporal_decimation; - - /* encoding filters */ - enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; - u16 video_spatial_filter; - enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type video_luma_spatial_filter_type; - enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type video_chroma_spatial_filter_type; - enum v4l2_mpeg_cx2341x_video_temporal_filter_mode video_temporal_filter_mode; - u16 video_temporal_filter; - enum v4l2_mpeg_cx2341x_video_median_filter_type video_median_filter_type; - u16 video_luma_median_filter_top; - u16 video_luma_median_filter_bottom; - u16 video_chroma_median_filter_top; - u16 video_chroma_median_filter_bottom; -}; - -#define CX2341X_MBOX_MAX_DATA 16 - -extern const u32 cx2341x_mpeg_ctrls[]; -typedef int (*cx2341x_mbox_func)(void *priv, int cmd, int in, int out, - u32 data[CX2341X_MBOX_MAX_DATA]); -int cx2341x_update(void *priv, cx2341x_mbox_func func, - const struct cx2341x_mpeg_params *old, - const struct cx2341x_mpeg_params *new); -int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, - struct v4l2_queryctrl *qctrl); -const char **cx2341x_ctrl_get_menu(u32 id); -int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, - struct v4l2_ext_controls *ctrls, unsigned int cmd); -void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); -void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); - -/* Firmware names */ -#define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" -/* Decoder firmware for the cx23415 only */ -#define CX2341X_FIRM_DEC_FILENAME "v4l-cx2341x-dec.fw" - -/* Firmware API commands */ - -/* MPEG decoder API, specific to the cx23415 */ -#define CX2341X_DEC_PING_FW 0x00 -#define CX2341X_DEC_START_PLAYBACK 0x01 -#define CX2341X_DEC_STOP_PLAYBACK 0x02 -#define CX2341X_DEC_SET_PLAYBACK_SPEED 0x03 -#define CX2341X_DEC_STEP_VIDEO 0x05 -#define CX2341X_DEC_SET_DMA_BLOCK_SIZE 0x08 -#define CX2341X_DEC_GET_XFER_INFO 0x09 -#define CX2341X_DEC_GET_DMA_STATUS 0x0a -#define CX2341X_DEC_SCHED_DMA_FROM_HOST 0x0b -#define CX2341X_DEC_PAUSE_PLAYBACK 0x0d -#define CX2341X_DEC_HALT_FW 0x0e -#define CX2341X_DEC_SET_STANDARD 0x10 -#define CX2341X_DEC_GET_VERSION 0x11 -#define CX2341X_DEC_SET_STREAM_INPUT 0x14 -#define CX2341X_DEC_GET_TIMING_INFO 0x15 -#define CX2341X_DEC_SET_AUDIO_MODE 0x16 -#define CX2341X_DEC_SET_EVENT_NOTIFICATION 0x17 -#define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 -#define CX2341X_DEC_EXTRACT_VBI 0x19 -#define CX2341X_DEC_SET_DECODER_SOURCE 0x1a -#define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b -#define CX2341X_DEC_SET_AV_DELAY 0x1c -#define CX2341X_DEC_SET_PREBUFFERING 0x1e - -/* MPEG encoder API */ -#define CX2341X_ENC_PING_FW 0x80 -#define CX2341X_ENC_START_CAPTURE 0x81 -#define CX2341X_ENC_STOP_CAPTURE 0x82 -#define CX2341X_ENC_SET_AUDIO_ID 0x89 -#define CX2341X_ENC_SET_VIDEO_ID 0x8b -#define CX2341X_ENC_SET_PCR_ID 0x8d -#define CX2341X_ENC_SET_FRAME_RATE 0x8f -#define CX2341X_ENC_SET_FRAME_SIZE 0x91 -#define CX2341X_ENC_SET_BIT_RATE 0x95 -#define CX2341X_ENC_SET_GOP_PROPERTIES 0x97 -#define CX2341X_ENC_SET_ASPECT_RATIO 0x99 -#define CX2341X_ENC_SET_DNR_FILTER_MODE 0x9b -#define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d -#define CX2341X_ENC_SET_CORING_LEVELS 0x9f -#define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 -#define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1 -#define CX2341X_ENC_SET_VBI_LINE 0xb7 -#define CX2341X_ENC_SET_STREAM_TYPE 0xb9 -#define CX2341X_ENC_SET_OUTPUT_PORT 0xbb -#define CX2341X_ENC_SET_AUDIO_PROPERTIES 0xbd -#define CX2341X_ENC_HALT_FW 0xc3 -#define CX2341X_ENC_GET_VERSION 0xc4 -#define CX2341X_ENC_SET_GOP_CLOSURE 0xc5 -#define CX2341X_ENC_GET_SEQ_END 0xc6 -#define CX2341X_ENC_SET_PGM_INDEX_INFO 0xc7 -#define CX2341X_ENC_SET_VBI_CONFIG 0xc8 -#define CX2341X_ENC_SET_DMA_BLOCK_SIZE 0xc9 -#define CX2341X_ENC_GET_PREV_DMA_INFO_MB_10 0xca -#define CX2341X_ENC_GET_PREV_DMA_INFO_MB_9 0xcb -#define CX2341X_ENC_SCHED_DMA_TO_HOST 0xcc -#define CX2341X_ENC_INITIALIZE_INPUT 0xcd -#define CX2341X_ENC_SET_FRAME_DROP_RATE 0xd0 -#define CX2341X_ENC_PAUSE_ENCODER 0xd2 -#define CX2341X_ENC_REFRESH_INPUT 0xd3 -#define CX2341X_ENC_SET_COPYRIGHT 0xd4 -#define CX2341X_ENC_SET_EVENT_NOTIFICATION 0xd5 -#define CX2341X_ENC_SET_NUM_VSYNC_LINES 0xd6 -#define CX2341X_ENC_SET_PLACEHOLDER 0xd7 -#define CX2341X_ENC_MUTE_VIDEO 0xd9 -#define CX2341X_ENC_MUTE_AUDIO 0xda -#define CX2341X_ENC_UNKNOWN 0xdb -#define CX2341X_ENC_MISC 0xdc - -/* OSD API, specific to the cx23415 */ -#define CX2341X_OSD_GET_FRAMEBUFFER 0x41 -#define CX2341X_OSD_GET_PIXEL_FORMAT 0x42 -#define CX2341X_OSD_SET_PIXEL_FORMAT 0x43 -#define CX2341X_OSD_GET_STATE 0x44 -#define CX2341X_OSD_SET_STATE 0x45 -#define CX2341X_OSD_GET_OSD_COORDS 0x46 -#define CX2341X_OSD_SET_OSD_COORDS 0x47 -#define CX2341X_OSD_GET_SCREEN_COORDS 0x48 -#define CX2341X_OSD_SET_SCREEN_COORDS 0x49 -#define CX2341X_OSD_GET_GLOBAL_ALPHA 0x4a -#define CX2341X_OSD_SET_GLOBAL_ALPHA 0x4b -#define CX2341X_OSD_SET_BLEND_COORDS 0x4c -#define CX2341X_OSD_GET_FLICKER_STATE 0x4f -#define CX2341X_OSD_SET_FLICKER_STATE 0x50 -#define CX2341X_OSD_BLT_COPY 0x52 -#define CX2341X_OSD_BLT_FILL 0x53 -#define CX2341X_OSD_BLT_TEXT 0x54 -#define CX2341X_OSD_SET_FRAMEBUFFER_WINDOW 0x56 -#define CX2341X_OSD_SET_CHROMA_KEY 0x60 -#define CX2341X_OSD_GET_ALPHA_CONTENT_INDEX 0x61 -#define CX2341X_OSD_SET_ALPHA_CONTENT_INDEX 0x62 - -#endif /* CX2341X_H */ diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 7bab09b0e..302d5b394 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h @@ -73,7 +73,7 @@ extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; @@ -87,9 +87,8 @@ extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; -extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; #endif diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index a455f7ce5..730f21ed9 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h @@ -20,6 +20,5 @@ struct IR_i2c { int (*get_key)(struct IR_i2c*, u32*, u32*); }; -int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); -int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); +int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); #endif diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h index 0f43451f8..8138983ad 100644 --- a/include/media/ovcamchip.h +++ b/include/media/ovcamchip.h @@ -15,7 +15,6 @@ #define __LINUX_OVCAMCHIP_H #include -#include #include /* --------------------------------- */ diff --git a/include/media/pwc-ioctl.h b/include/media/pwc-ioctl.h deleted file mode 100644 index adc1254e8..000000000 --- a/include/media/pwc-ioctl.h +++ /dev/null @@ -1,325 +0,0 @@ -#ifndef PWC_IOCTL_H -#define PWC_IOCTL_H - -/* (C) 2001-2004 Nemosoft Unv. - (C) 2004-2006 Luc Saillard (luc@saillard.org) - - NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx - driver and thus may have bugs that are not present in the original version. - Please send bug reports and support requests to . - The decompression routines have been implemented by reverse-engineering the - Nemosoft binary pwcx module. Caveat emptor. - - 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 is pwc-ioctl.h belonging to PWC 10.0.10 - It contains structures and defines to communicate from user space - directly to the driver. - */ - -/* - Changes - 2001/08/03 Alvarado Added ioctl constants to access methods for - changing white balance and red/blue gains - 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE - 2003/12/13 Nemosft Unv. Some modifications to make interfacing to - PWCX easier - 2006/01/01 Luc Saillard Add raw format definition - */ - -/* These are private ioctl() commands, specific for the Philips webcams. - They contain functions not found in other webcams, and settings not - specified in the Video4Linux API. - - The #define names are built up like follows: - VIDIOC VIDeo IOCtl prefix - PWC Philps WebCam - G optional: Get - S optional: Set - ... the function - */ - -#include -#include - - - /* Enumeration of image sizes */ -#define PSZ_SQCIF 0x00 -#define PSZ_QSIF 0x01 -#define PSZ_QCIF 0x02 -#define PSZ_SIF 0x03 -#define PSZ_CIF 0x04 -#define PSZ_VGA 0x05 -#define PSZ_MAX 6 - - -/* The frame rate is encoded in the video_window.flags parameter using - the upper 16 bits, since some flags are defined nowadays. The following - defines provide a mask and shift to filter out this value. - This value can also be passing using the private flag when using v4l2 and - VIDIOC_S_FMT ioctl. - - In 'Snapshot' mode the camera freezes its automatic exposure and colour - balance controls. - */ -#define PWC_FPS_SHIFT 16 -#define PWC_FPS_MASK 0x00FF0000 -#define PWC_FPS_FRMASK 0x003F0000 -#define PWC_FPS_SNAPSHOT 0x00400000 -#define PWC_QLT_MASK 0x03000000 -#define PWC_QLT_SHIFT 24 - - -/* structure for transferring x & y coordinates */ -struct pwc_coord -{ - int x, y; /* guess what */ - int size; /* size, or offset */ -}; - - -/* Used with VIDIOCPWCPROBE */ -struct pwc_probe -{ - char name[32]; - int type; -}; - -struct pwc_serial -{ - char serial[30]; /* String with serial number. Contains terminating 0 */ -}; - -/* pwc_whitebalance.mode values */ -#define PWC_WB_INDOOR 0 -#define PWC_WB_OUTDOOR 1 -#define PWC_WB_FL 2 -#define PWC_WB_MANUAL 3 -#define PWC_WB_AUTO 4 - -/* Used with VIDIOCPWC[SG]AWB (Auto White Balance). - Set mode to one of the PWC_WB_* values above. - *red and *blue are the respective gains of these colour components inside - the camera; range 0..65535 - When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; - otherwise undefined. - 'read_red' and 'read_blue' are read-only. -*/ -struct pwc_whitebalance -{ - int mode; - int manual_red, manual_blue; /* R/W */ - int read_red, read_blue; /* R/O */ -}; - -/* - 'control_speed' and 'control_delay' are used in automatic whitebalance mode, - and tell the camera how fast it should react to changes in lighting, and - with how much delay. Valid values are 0..65535. -*/ -struct pwc_wb_speed -{ - int control_speed; - int control_delay; - -}; - -/* Used with VIDIOCPWC[SG]LED */ -struct pwc_leds -{ - int led_on; /* Led on-time; range = 0..25000 */ - int led_off; /* Led off-time; range = 0..25000 */ -}; - -/* Image size (used with GREALSIZE) */ -struct pwc_imagesize -{ - int width; - int height; -}; - -/* Defines and structures for Motorized Pan & Tilt */ -#define PWC_MPT_PAN 0x01 -#define PWC_MPT_TILT 0x02 -#define PWC_MPT_TIMEOUT 0x04 /* for status */ - -/* Set angles; when absolute != 0, the angle is absolute and the - driver calculates the relative offset for you. This can only - be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns - absolute angles. - */ -struct pwc_mpt_angles -{ - int absolute; /* write-only */ - int pan; /* degrees * 100 */ - int tilt; /* degress * 100 */ -}; - -/* Range of angles of the camera, both horizontally and vertically. - */ -struct pwc_mpt_range -{ - int pan_min, pan_max; /* degrees * 100 */ - int tilt_min, tilt_max; -}; - -struct pwc_mpt_status -{ - int status; - int time_pan; - int time_tilt; -}; - - -/* This is used for out-of-kernel decompression. With it, you can get - all the necessary information to initialize and use the decompressor - routines in standalone applications. - */ -struct pwc_video_command -{ - int type; /* camera type (645, 675, 730, etc.) */ - int release; /* release number */ - - int size; /* one of PSZ_* */ - int alternate; - int command_len; /* length of USB video command */ - unsigned char command_buf[13]; /* Actual USB video command */ - int bandlength; /* >0 = compressed */ - int frame_size; /* Size of one (un)compressed frame */ -}; - -/* Flags for PWCX subroutines. Not all modules honour all flags. */ -#define PWCX_FLAG_PLANAR 0x0001 -#define PWCX_FLAG_BAYER 0x0008 - - -/* IOCTL definitions */ - - /* Restore user settings */ -#define VIDIOCPWCRUSER _IO('v', 192) - /* Save user settings */ -#define VIDIOCPWCSUSER _IO('v', 193) - /* Restore factory settings */ -#define VIDIOCPWCFACTORY _IO('v', 194) - - /* You can manipulate the compression factor. A compression preference of 0 - means use uncompressed modes when available; 1 is low compression, 2 is - medium and 3 is high compression preferred. Of course, the higher the - compression, the lower the bandwidth used but more chance of artefacts - in the image. The driver automatically chooses a higher compression when - the preferred mode is not available. - */ - /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ -#define VIDIOCPWCSCQUAL _IOW('v', 195, int) - /* Get preferred compression quality */ -#define VIDIOCPWCGCQUAL _IOR('v', 195, int) - - -/* Retrieve serial number of camera */ -#define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) - - /* This is a probe function; since so many devices are supported, it - becomes difficult to include all the names in programs that want to - check for the enhanced Philips stuff. So in stead, try this PROBE; - it returns a structure with the original name, and the corresponding - Philips type. - To use, fill the structure with zeroes, call PROBE and if that succeeds, - compare the name with that returned from VIDIOCGCAP; they should be the - same. If so, you can be assured it is a Philips (OEM) cam and the type - is valid. - */ -#define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) - - /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ -#define VIDIOCPWCSAGC _IOW('v', 200, int) - /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCGAGC _IOR('v', 200, int) - /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ -#define VIDIOCPWCSSHUTTER _IOW('v', 201, int) - - /* Color compensation (Auto White Balance) */ -#define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) -#define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) - - /* Auto WB speed */ -#define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) -#define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) - - /* LEDs on/off/blink; int range 0..65535 */ -#define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) -#define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) - - /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ -#define VIDIOCPWCSCONTOUR _IOW('v', 206, int) -#define VIDIOCPWCGCONTOUR _IOR('v', 206, int) - - /* Backlight compensation; 0 = off, otherwise on */ -#define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) -#define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) - - /* Flickerless mode; = 0 off, otherwise on */ -#define VIDIOCPWCSFLICKER _IOW('v', 208, int) -#define VIDIOCPWCGFLICKER _IOR('v', 208, int) - - /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ -#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) -#define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) - - /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ -#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) - - /* Motorized pan & tilt functions */ -#define VIDIOCPWCMPTRESET _IOW('v', 211, int) -#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) -#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) -#define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) - - /* Get the USB set-video command; needed for initializing libpwcx */ -#define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) -struct pwc_table_init_buffer { - int len; - char *buffer; - -}; -#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) - -/* - * This is private command used when communicating with v4l2. - * In the future all private ioctl will be remove/replace to - * use interface offer by v4l2. - */ - -#define V4L2_CID_PRIVATE_SAVE_USER (V4L2_CID_PRIVATE_BASE + 0) -#define V4L2_CID_PRIVATE_RESTORE_USER (V4L2_CID_PRIVATE_BASE + 1) -#define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2) -#define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3) -#define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4) -#define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5) -#define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6) -#define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7) -#define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8) - -struct pwc_raw_frame { - __le16 type; /* type of the webcam */ - __le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */ - __u8 cmd[4]; /* the four byte of the command (in case of nala, - only the first 3 bytes is filled) */ - __u8 rawframe[0]; /* frame_size = H/4*vbandlength */ -} __attribute__ ((packed)); - - -#endif diff --git a/include/media/saa7115.h b/include/media/saa7115.h index 9f0e2285a..6b4836f3f 100644 --- a/include/media/saa7115.h +++ b/include/media/saa7115.h @@ -1,5 +1,5 @@ /* - saa7115.h - definition for saa7113/4/5 inputs and frequency flags + saa7115.h - definition for saa7113/4/5 inputs Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) @@ -33,14 +33,5 @@ #define SAA7115_SVIDEO2 8 #define SAA7115_SVIDEO3 9 -/* SAA7115 v4l2_crystal_freq frequency values */ -#define SAA7115_FREQ_32_11_MHZ 32110000 /* 32.11 MHz crystal, SAA7114/5 only */ -#define SAA7115_FREQ_24_576_MHZ 24576000 /* 24.576 MHz crystal */ - -/* SAA7115 v4l2_crystal_freq audio clock control flags */ -#define SAA7115_FREQ_FL_UCGC (1 << 0) /* SA 3A[7], UCGC, SAA7115 only */ -#define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ -#define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ - #endif diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 83fe2e3d1..4507cb61a 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h @@ -2,7 +2,7 @@ #define __SAA7146_VV__ #include -#include + #include #include diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index 3c43b95f4..ad9c171bf 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h @@ -20,7 +20,6 @@ struct tuner_range { struct tuner_params { enum param_type type; - /* Many Philips based tuners have a comment like this in their * datasheet: * @@ -40,60 +39,6 @@ struct tuner_params { * static unless the control byte was sent first. */ unsigned int cb_first_if_lower_freq:1; - /* Set to 1 if this tuner uses a tda9887 */ - unsigned int has_tda9887:1; - /* Many Philips tuners use tda9887 PORT1 to select the FM radio - sensitivity. If this setting is 1, then set PORT1 to 1 to - get proper FM reception. */ - unsigned int port1_fm_high_sensitivity:1; - /* Some Philips tuners use tda9887 PORT2 to select the FM radio - sensitivity. If this setting is 1, then set PORT2 to 1 to - get proper FM reception. */ - unsigned int port2_fm_high_sensitivity:1; - /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners - use Intercarrier mode. If this setting is 1, then the tuner - needs to be set to intercarrier mode. */ - unsigned int intercarrier_mode:1; - /* This setting sets the default value for PORT1. - 0 means inactive, 1 means active. Note: the actual bit - value written to the tda9887 is inverted. So a 0 here - means a 1 in the B6 bit. */ - unsigned int port1_active:1; - /* This setting sets the default value for PORT2. - 0 means inactive, 1 means active. Note: the actual bit - value written to the tda9887 is inverted. So a 0 here - means a 1 in the B7 bit. */ - unsigned int port2_active:1; - /* Sometimes PORT1 is inverted when the SECAM-L' standard is selected. - Set this bit to 1 if this is needed. */ - unsigned int port1_invert_for_secam_lc:1; - /* Sometimes PORT2 is inverted when the SECAM-L' standard is selected. - Set this bit to 1 if this is needed. */ - unsigned int port2_invert_for_secam_lc:1; - /* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */ - unsigned int port1_set_for_fm_mono:1; - /* Default tda9887 TOP value in dB for the low band. Default is 0. - Range: -16:+15 */ - signed int default_top_low:5; - /* Default tda9887 TOP value in dB for the mid band. Default is 0. - Range: -16:+15 */ - signed int default_top_mid:5; - /* Default tda9887 TOP value in dB for the high band. Default is 0. - Range: -16:+15 */ - signed int default_top_high:5; - /* Default tda9887 TOP value in dB for SECAM-L/L' for the low band. - Default is 0. Several tuners require a different TOP value for - the SECAM-L/L' standards. Range: -16:+15 */ - signed int default_top_secam_low:5; - /* Default tda9887 TOP value in dB for SECAM-L/L' for the mid band. - Default is 0. Several tuners require a different TOP value for - the SECAM-L/L' standards. Range: -16:+15 */ - signed int default_top_secam_mid:5; - /* Default tda9887 TOP value in dB for SECAM-L/L' for the high band. - Default is 0. Several tuners require a different TOP value for - the SECAM-L/L' standards. Range: -16:+15 */ - signed int default_top_secam_high:5; - unsigned int count; struct tuner_range *ranges; diff --git a/include/media/tuner.h b/include/media/tuner.h index 2f7b00b08..017fed7d5 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -25,8 +25,6 @@ #include #include -extern int tuner_debug; - #define ADDR_UNSET (255) #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ @@ -110,7 +108,7 @@ extern int tuner_debug; #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ #define TUNER_PHILIPS_FMD1216ME_MK3 63 -#define TUNER_LG_TDVS_H06XF 64 /* TDVS H061F, H062F, H064F */ +#define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ #define TUNER_LG_TALN 66 #define TUNER_PHILIPS_TD1316 67 @@ -121,8 +119,6 @@ extern int tuner_debug; #define TUNER_XCEIVE_XC3028 71 #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ -#define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ -#define TUNER_TDA9887 74 /* This tuner should be used only internally */ /* tv card specific */ #define TDA9887_PRESENT (1<<0) @@ -194,10 +190,6 @@ struct tuner { int using_v4l2; - /* used by tda9887 */ - unsigned int tda9887_config; - unsigned char tda9887_data[4]; - /* used by MT2032 */ unsigned int xogc; unsigned int radio_if2; @@ -214,8 +206,6 @@ struct tuner { void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); int (*has_signal)(struct i2c_client *c); int (*is_stereo)(struct i2c_client *c); - int (*get_afc)(struct i2c_client *c); - void (*tuner_status)(struct i2c_client *c); void (*standby)(struct i2c_client *c); }; @@ -228,7 +218,6 @@ extern int tda8290_probe(struct i2c_client *c); extern int tea5767_tuner_init(struct i2c_client *c); extern int default_tuner_init(struct i2c_client *c); extern int tea5767_autodetection(struct i2c_client *c); -extern int tda9887_tuner_init(struct i2c_client *c); #define tuner_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ diff --git a/include/media/tvp5150.h b/include/media/tvp5150.h deleted file mode 100644 index 72bd2a2b8..000000000 --- a/include/media/tvp5150.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - tvp5150.h - definition for tvp5150 inputs - - Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) - - 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 _TVP5150_H_ -#define _TVP5150_H_ - -/* TVP5150 HW inputs */ -#define TVP5150_COMPOSITE0 0 -#define TVP5150_COMPOSITE1 1 -#define TVP5150_SVIDEO 2 - -/* TVP5150 HW outputs */ -#define TVP5150_NORMAL 0 -#define TVP5150_BLACK_SCREEN 1 - -#endif - diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 5564db13c..642520acd 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -26,14 +26,8 @@ #ifndef V4L2_COMMON_H_ #define V4L2_COMMON_H_ -#include - /* v4l debugging and diagnostics */ -/* Debug bitmask flags to be used on V4L2 */ -#define V4L2_DEBUG_IOCTL 0x01 -#define V4L2_DEBUG_IOCTL_ARG 0x02 - /* Common printk constucts for v4l-i2c drivers. These macros create a unique prefix consisting of the driver name, the adapter number and the i2c address. */ @@ -84,19 +78,6 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); /* ------------------------------------------------------------------------- */ -/* Control helper functions */ - -int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, - const char **menu_items); -const char **v4l2_ctrl_get_menu(u32 id); -int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); -int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); -int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, - struct v4l2_queryctrl *qctrl, const char **menu_items); -u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); - -/* ------------------------------------------------------------------------- */ - /* Internal ioctls */ /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ @@ -131,8 +112,6 @@ enum v4l2_chip_ident { V4L2_IDENT_SAA7129 = 159, /* module cx25840: reserved range 200-249 */ - V4L2_IDENT_CX25836 = 236, - V4L2_IDENT_CX25837 = 237, V4L2_IDENT_CX25840 = 240, V4L2_IDENT_CX25841 = 241, V4L2_IDENT_CX25842 = 242, @@ -232,15 +211,4 @@ struct v4l2_routing { #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) #define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) -struct v4l2_crystal_freq { - u32 freq; /* frequency in Hz of the crystal */ - u32 flags; /* device specific flags */ -}; - -/* Sets the frequency of the crystal used to generate the clocks. - An extra flags field allows device specific configuration regarding - clock frequency dividers, etc. If not used, then set flags to 0. - If the frequency is not supported, then -EINVAL is returned. */ -#define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq) - #endif /* V4L2_COMMON_H_ */ diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h deleted file mode 100644 index 810462f8a..000000000 --- a/include/media/v4l2-dev.h +++ /dev/null @@ -1,378 +0,0 @@ -/* - * - * V 4 L 2 D R I V E R H E L P E R A P I - * - * Moved from videodev2.h - * - * Some commonly needed functions for drivers (v4l2-common.o module) - */ -#ifndef _V4L2_DEV_H -#define _V4L2_DEV_H - -#define OBSOLETE_OWNER 1 /* to be removed soon */ - -#include -#include -#include -#include -#include /* need __user */ -#ifdef CONFIG_VIDEO_V4L1_COMPAT -#include -#else -#include -#endif - -#include - -#define VIDEO_MAJOR 81 -/* Minor device allocation */ -#define MINOR_VFL_TYPE_GRABBER_MIN 0 -#define MINOR_VFL_TYPE_GRABBER_MAX 63 -#define MINOR_VFL_TYPE_RADIO_MIN 64 -#define MINOR_VFL_TYPE_RADIO_MAX 127 -#define MINOR_VFL_TYPE_VTX_MIN 192 -#define MINOR_VFL_TYPE_VTX_MAX 223 -#define MINOR_VFL_TYPE_VBI_MIN 224 -#define MINOR_VFL_TYPE_VBI_MAX 255 - -#define VFL_TYPE_GRABBER 0 -#define VFL_TYPE_VBI 1 -#define VFL_TYPE_RADIO 2 -#define VFL_TYPE_VTX 3 - -/* Video standard functions */ -extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); -extern int v4l2_video_std_construct(struct v4l2_standard *vs, - int id, char *name); - -/* prority handling */ -struct v4l2_prio_state { - atomic_t prios[4]; -}; -int v4l2_prio_init(struct v4l2_prio_state *global); -int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, - enum v4l2_priority new); -int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); -int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); -enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); -int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); - -/* names for fancy debug output */ -extern char *v4l2_field_names[]; -extern char *v4l2_type_names[]; - -/* Compatibility layer interface -- v4l1-compat module */ -typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg); -#ifdef CONFIG_VIDEO_V4L1_COMPAT -int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, - int cmd, void *arg, v4l2_kioctl driver_ioctl); -#else -#define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL -#endif - -/* 32 Bits compatibility layer for 64 bits processors */ -extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, - unsigned long arg); - -/* - * Newer version of video_device, handled by videodev2.c - * This version moves redundant code from video device code to - * the common handler - */ -struct v4l2_tvnorm { - char *name; - v4l2_std_id id; - - void *priv_data; -}; - -struct video_device -{ - /* device ops */ - const struct file_operations *fops; - - /* device info */ - struct device *dev; - char name[32]; - int type; /* v4l1 */ - int type2; /* v4l2 */ - int hardware; - int minor; - - int debug; /* Activates debug level*/ - - /* Video standard vars */ - int tvnormsize; /* Size of tvnorm array */ - v4l2_std_id current_norm; /* Current tvnorm */ - struct v4l2_tvnorm *tvnorms; - - /* callbacks */ - void (*release)(struct video_device *vfd); - - /* ioctl callbacks */ - - /* VIDIOC_QUERYCAP handler */ - int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); - - /* Priority handling */ - int (*vidioc_g_priority) (struct file *file, void *fh, - enum v4l2_priority *p); - int (*vidioc_s_priority) (struct file *file, void *fh, - enum v4l2_priority p); - - /* VIDIOC_ENUM_FMT handlers */ - int (*vidioc_enum_fmt_cap) (struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_overlay) (struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_vbi) (struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_vbi_capture) (struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, - struct v4l2_fmtdesc *f); - int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, - struct v4l2_fmtdesc *f); - - /* VIDIOC_G_FMT handlers */ - int (*vidioc_g_fmt_cap) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_overlay) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_vbi) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, - struct v4l2_format *f); - - /* VIDIOC_S_FMT handlers */ - int (*vidioc_s_fmt_cap) (struct file *file, void *fh, - struct v4l2_format *f); - - int (*vidioc_s_fmt_overlay) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_s_fmt_vbi) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, - struct v4l2_format *f); - - /* VIDIOC_TRY_FMT handlers */ - int (*vidioc_try_fmt_cap) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_overlay) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_vbi) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, - struct v4l2_format *f); - int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, - struct v4l2_format *f); - - /* Buffer handlers */ - int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b); - int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b); - int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b); - int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b); - - - int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); -#ifdef CONFIG_VIDEO_V4L1_COMPAT - /* buffer type is struct vidio_mbuf * */ - int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); -#endif - int (*vidioc_g_fbuf) (struct file *file, void *fh, - struct v4l2_framebuffer *a); - int (*vidioc_s_fbuf) (struct file *file, void *fh, - struct v4l2_framebuffer *a); - - /* Stream on/off */ - int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i); - int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); - - /* Standard handling - G_STD and ENUMSTD are handled by videodev.c - */ - int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); - int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); - - /* Input handling */ - int (*vidioc_enum_input)(struct file *file, void *fh, - struct v4l2_input *inp); - int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i); - int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); - - /* Output handling */ - int (*vidioc_enumoutput) (struct file *file, void *fh, - struct v4l2_output *a); - int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); - int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); - - /* Control handling */ - int (*vidioc_queryctrl) (struct file *file, void *fh, - struct v4l2_queryctrl *a); - int (*vidioc_g_ctrl) (struct file *file, void *fh, - struct v4l2_control *a); - int (*vidioc_s_ctrl) (struct file *file, void *fh, - struct v4l2_control *a); - int (*vidioc_g_ext_ctrls) (struct file *file, void *fh, - struct v4l2_ext_controls *a); - int (*vidioc_s_ext_ctrls) (struct file *file, void *fh, - struct v4l2_ext_controls *a); - int (*vidioc_try_ext_ctrls) (struct file *file, void *fh, - struct v4l2_ext_controls *a); - int (*vidioc_querymenu) (struct file *file, void *fh, - struct v4l2_querymenu *a); - - /* Audio ioctls */ - int (*vidioc_enumaudio) (struct file *file, void *fh, - struct v4l2_audio *a); - int (*vidioc_g_audio) (struct file *file, void *fh, - struct v4l2_audio *a); - int (*vidioc_s_audio) (struct file *file, void *fh, - struct v4l2_audio *a); - - /* Audio out ioctls */ - int (*vidioc_enumaudout) (struct file *file, void *fh, - struct v4l2_audioout *a); - int (*vidioc_g_audout) (struct file *file, void *fh, - struct v4l2_audioout *a); - int (*vidioc_s_audout) (struct file *file, void *fh, - struct v4l2_audioout *a); - int (*vidioc_g_modulator) (struct file *file, void *fh, - struct v4l2_modulator *a); - int (*vidioc_s_modulator) (struct file *file, void *fh, - struct v4l2_modulator *a); - /* Crop ioctls */ - int (*vidioc_cropcap) (struct file *file, void *fh, - struct v4l2_cropcap *a); - int (*vidioc_g_crop) (struct file *file, void *fh, - struct v4l2_crop *a); - int (*vidioc_s_crop) (struct file *file, void *fh, - struct v4l2_crop *a); - /* Compression ioctls */ - int (*vidioc_g_mpegcomp) (struct file *file, void *fh, - struct v4l2_mpeg_compression *a); - int (*vidioc_s_mpegcomp) (struct file *file, void *fh, - struct v4l2_mpeg_compression *a); - int (*vidioc_g_jpegcomp) (struct file *file, void *fh, - struct v4l2_jpegcompression *a); - int (*vidioc_s_jpegcomp) (struct file *file, void *fh, - struct v4l2_jpegcompression *a); - - /* Stream type-dependent parameter ioctls */ - int (*vidioc_g_parm) (struct file *file, void *fh, - struct v4l2_streamparm *a); - int (*vidioc_s_parm) (struct file *file, void *fh, - struct v4l2_streamparm *a); - - /* Tuner ioctls */ - int (*vidioc_g_tuner) (struct file *file, void *fh, - struct v4l2_tuner *a); - int (*vidioc_s_tuner) (struct file *file, void *fh, - struct v4l2_tuner *a); - int (*vidioc_g_frequency) (struct file *file, void *fh, - struct v4l2_frequency *a); - int (*vidioc_s_frequency) (struct file *file, void *fh, - struct v4l2_frequency *a); - - /* Sliced VBI cap */ - int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, - struct v4l2_sliced_vbi_cap *a); - - /* Log status ioctl */ - int (*vidioc_log_status) (struct file *file, void *fh); - - -#ifdef OBSOLETE_OWNER /* to be removed soon */ -/* obsolete -- fops->owner is used instead */ -struct module *owner; -/* dev->driver_data will be used instead some day. - * Use the video_{get|set}_drvdata() helper functions, - * so the switch over will be transparent for you. - * Or use {pci|usb}_{get|set}_drvdata() directly. */ -void *priv; -#endif - - /* for videodev.c intenal usage -- please don't touch */ - int users; /* video_exclusive_{open|close} ... */ - struct mutex lock; /* ... helper function uses these */ - struct class_device class_dev; /* sysfs */ -}; - -/* Version 2 functions */ -extern int video_register_device(struct video_device *vfd, int type, int nr); -void video_unregister_device(struct video_device *); -extern int video_ioctl2(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg); - -/* helper functions to alloc / release struct video_device, the - later can be used for video_device->release() */ -struct video_device *video_device_alloc(void); -void video_device_release(struct video_device *vfd); - -/* Include support for obsoleted stuff */ -extern int video_usercopy(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg, - int (*func)(struct inode *inode, struct file *file, - unsigned int cmd, void *arg)); - - -#ifdef CONFIG_VIDEO_V4L1_COMPAT -#include - -extern struct video_device* video_devdata(struct file*); - -#define to_video_device(cd) container_of(cd, struct video_device, class_dev) -static inline int -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - int ret = class_device_create_file(&vfd->class_dev, attr); - if (ret < 0) - printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); - return ret; -} -static inline void -video_device_remove_file(struct video_device *vfd, - struct class_device_attribute *attr) -{ - class_device_remove_file(&vfd->class_dev, attr); -} - -#endif /* CONFIG_VIDEO_V4L1_COMPAT */ - -#ifdef OBSOLETE_OWNER /* to be removed soon */ -/* helper functions to access driver private data. */ -static inline void *video_get_drvdata(struct video_device *dev) -{ - return dev->priv; -} - -static inline void video_set_drvdata(struct video_device *dev, void *data) -{ - dev->priv = data; -} -#endif - -extern int video_exclusive_open(struct inode *inode, struct file *file); -extern int video_exclusive_release(struct inode *inode, struct file *file); - -#endif /* _V4L2_DEV_H */ diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index 8233cafde..b78d90fe6 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h @@ -26,8 +26,7 @@ struct videobuf_dvb { int videobuf_dvb_register(struct videobuf_dvb *dvb, struct module *module, - void *adapter_priv, - struct device *device); + void *adapter_priv); void videobuf_dvb_unregister(struct videobuf_dvb *dvb); /* diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 1115a2569..fff3fd0fb 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h @@ -23,7 +23,6 @@ */ #include -#include #define UNSET (-1U) diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild deleted file mode 100644 index 13e7a3c6d..000000000 --- a/include/mtd/Kbuild +++ /dev/null @@ -1,6 +0,0 @@ -header-y += inftl-user.h -header-y += jffs2-user.h -header-y += mtd-user.h -header-y += nftl-user.h - -unifdef-y += mtd-abi.h diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index 1da3f7fa7..b5994ea56 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h @@ -7,9 +7,8 @@ #ifndef __MTD_ABI_H__ #define __MTD_ABI_H__ -#ifndef __KERNEL__ -/* Urgh. The whole point of splitting this out into - separate files was to avoid #ifdef __KERNEL__ */ +#ifndef __KERNEL__ /* Urgh. The whole point of splitting this out into + separate files was to avoid #ifdef __KERNEL__ */ #define __user #endif @@ -29,17 +28,28 @@ struct mtd_oob_buf { #define MTD_ROM 2 #define MTD_NORFLASH 3 #define MTD_NANDFLASH 4 +#define MTD_PEROM 5 #define MTD_DATAFLASH 6 - -#define MTD_WRITEABLE 0x400 /* Device is writeable */ -#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ -#define MTD_NO_ERASE 0x1000 /* No erase necessary */ +#define MTD_OTHER 14 +#define MTD_UNKNOWN 15 + +#define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) +#define MTD_SET_BITS 2 // Bits can be set +#define MTD_ERASEABLE 4 // Has an erase function +#define MTD_WRITEB_WRITEABLE 8 // Direct IO is possible +#define MTD_VOLATILE 16 // Set for RAMs +#define MTD_XIP 32 // eXecute-In-Place possible +#define MTD_OOB 64 // Out-of-band data (NAND flash) +#define MTD_ECC 128 // Device capable of automatic ECC +#define MTD_NO_VIRTBLOCKS 256 // Virtual blocks not allowed +#define MTD_PROGRAM_REGIONS 512 // Configurable Programming Regions // Some common devices / combinations of capabilities #define MTD_CAP_ROM 0 -#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) -#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) -#define MTD_CAP_NANDFLASH (MTD_WRITEABLE) +#define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEB_WRITEABLE) +#define MTD_CAP_NORFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE) +#define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE|MTD_OOB) +#define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) // Types of automatic ECC/Checksum available @@ -64,7 +74,7 @@ struct mtd_info_user { uint32_t flags; uint32_t size; // Total size of the MTD uint32_t erasesize; - uint32_t writesize; + uint32_t oobblock; // Size of OOB blocks (e.g. 512) uint32_t oobsize; // Amount of OOB data per block (e.g. 16) uint32_t ecctype; uint32_t eccsize; @@ -84,12 +94,12 @@ struct otp_info { uint32_t locked; }; -#define MEMGETINFO _IOR('M', 1, struct mtd_info_user) -#define MEMERASE _IOW('M', 2, struct erase_info_user) -#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf) -#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) -#define MEMLOCK _IOW('M', 5, struct erase_info_user) -#define MEMUNLOCK _IOW('M', 6, struct erase_info_user) +#define MEMGETINFO _IOR('M', 1, struct mtd_info_user) +#define MEMERASE _IOW('M', 2, struct erase_info_user) +#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf) +#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf) +#define MEMLOCK _IOW('M', 5, struct erase_info_user) +#define MEMUNLOCK _IOW('M', 6, struct erase_info_user) #define MEMGETREGIONCOUNT _IOR('M', 7, int) #define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user) #define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo) @@ -99,15 +109,8 @@ struct otp_info { #define OTPSELECT _IOR('M', 13, int) #define OTPGETREGIONCOUNT _IOW('M', 14, int) #define OTPGETREGIONINFO _IOW('M', 15, struct otp_info) -#define OTPLOCK _IOR('M', 16, struct otp_info) -#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout) -#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) -#define MTDFILEMODE _IO('M', 19) +#define OTPLOCK _IOR('M', 16, struct otp_info) -/* - * Obsolete legacy interface. Keep it in order not to break userspace - * interfaces - */ struct nand_oobinfo { uint32_t useecc; uint32_t eccbytes; @@ -115,46 +118,4 @@ struct nand_oobinfo { uint32_t eccpos[32]; }; -struct nand_oobfree { - uint32_t offset; - uint32_t length; -}; - -#define MTD_MAX_OOBFREE_ENTRIES 8 -/* - * ECC layout control structure. Exported to userspace for - * diagnosis and to allow creation of raw images - */ -struct nand_ecclayout { - uint32_t eccbytes; - uint32_t eccpos[64]; - uint32_t oobavail; - struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES]; -}; - -/** - * struct mtd_ecc_stats - error correction stats - * - * @corrected: number of corrected bits - * @failed: number of uncorrectable errors - * @badblocks: number of bad blocks in this partition - * @bbtblocks: number of blocks reserved for bad block tables - */ -struct mtd_ecc_stats { - uint32_t corrected; - uint32_t failed; - uint32_t badblocks; - uint32_t bbtblocks; -}; - -/* - * Read/write file modes for access to MTD - */ -enum mtd_file_modes { - MTD_MODE_NORMAL = MTD_OTP_OFF, - MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY, - MTD_MODE_OTP_USER = MTD_OTP_USER, - MTD_MODE_RAW, -}; - #endif /* __MTD_ABI_H__ */ diff --git a/include/mtd/mtd-user.h b/include/mtd/mtd-user.h index 713f34d3e..1c13fc716 100644 --- a/include/mtd/mtd-user.h +++ b/include/mtd/mtd-user.h @@ -16,6 +16,5 @@ typedef struct mtd_info_user mtd_info_t; typedef struct erase_info_user erase_info_t; typedef struct region_info_user region_info_t; typedef struct nand_oobinfo nand_oobinfo_t; -typedef struct nand_ecclayout nand_ecclayout_t; #endif /* __MTD_USER_H__ */ diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 3d71251b3..750e2508d 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -45,6 +45,7 @@ struct prefix_info { #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 2412bb6e9..f69dbf815 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h @@ -1,6 +1,7 @@ #ifndef __LINUX_NET_AFUNIX_H #define __LINUX_NET_AFUNIX_H +#include #include #include #include @@ -57,21 +58,14 @@ struct unix_address { struct unix_skb_parms { struct ucred creds; /* Skb credentials */ struct scm_fp_list *fp; /* Passed files */ -#ifdef CONFIG_SECURITY_NETWORK - u32 secid; /* Security ID */ -#endif }; #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) -#define UNIXSID(skb) (&UNIXCB((skb)).secid) #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) #define unix_state_wlock(s) spin_lock(&unix_sk(s)->lock) -#define unix_state_wlock_nested(s) \ - spin_lock_nested(&unix_sk(s)->lock, \ - SINGLE_DEPTH_NESTING) #define unix_state_wunlock(s) spin_unlock(&unix_sk(s)->lock) #ifdef __KERNEL__ diff --git a/include/net/ax25.h b/include/net/ax25.h index 69374cd1a..5bd997487 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h @@ -6,6 +6,7 @@ #ifndef _AX25_H #define _AX25_H +#include #include #include #include @@ -182,26 +183,14 @@ typedef struct { typedef struct ax25_route { struct ax25_route *next; - atomic_t refcount; + atomic_t ref; ax25_address callsign; struct net_device *dev; ax25_digi *digipeat; char ip_mode; + struct timer_list timer; } ax25_route; -static inline void ax25_hold_route(ax25_route *ax25_rt) -{ - atomic_inc(&ax25_rt->refcount); -} - -extern void __ax25_put_route(ax25_route *ax25_rt); - -static inline void ax25_put_route(ax25_route *ax25_rt) -{ - if (atomic_dec_and_test(&ax25_rt->refcount)) - __ax25_put_route(ax25_rt); -} - typedef struct { char slave; /* slave_mode? */ struct timer_list slave_timer; /* timeout timer */ @@ -360,11 +349,17 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); extern void ax25_rt_device_down(struct net_device *); extern int ax25_rt_ioctl(unsigned int, void __user *); extern struct file_operations ax25_route_fops; -extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); extern int ax25_rt_autobind(ax25_cb *, ax25_address *); +extern ax25_route *ax25_rt_find_route(ax25_route *, ax25_address *, + struct net_device *); extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); extern void ax25_rt_free(void); +static inline void ax25_put_route(ax25_route *ax25_rt) +{ + atomic_dec(&ax25_rt->ref); +} + /* ax25_std_in.c */ extern int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 771d17783..911ceb5cd 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -175,6 +175,6 @@ extern int hci_sock_cleanup(void); extern int bt_sysfs_init(void); extern void bt_sysfs_cleanup(void); -extern struct class *bt_class; +extern struct class bt_class; #endif /* __BLUETOOTH_H */ diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index b2bdb1aa0..b06a2d2f6 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -54,8 +54,7 @@ /* HCI device quirks */ enum { HCI_QUIRK_RESET_ON_INIT, - HCI_QUIRK_RAW_DEVICE, - HCI_QUIRK_FIXUP_BUFFER_SIZE + HCI_QUIRK_RAW_DEVICE }; /* HCI device flags */ @@ -101,10 +100,9 @@ enum { #define HCIINQUIRY _IOR('H', 240, int) /* HCI timeouts */ -#define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ -#define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ -#define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ -#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ +#define HCI_CONN_TIMEOUT (HZ * 40) +#define HCI_DISCONN_TIMEOUT (HZ * 2) +#define HCI_CONN_IDLE_TIMEOUT (HZ * 60) /* HCI Packet types */ #define HCI_COMMAND_PKT 0x01 @@ -146,7 +144,7 @@ enum { #define LMP_TACCURACY 0x10 #define LMP_RSWITCH 0x20 #define LMP_HOLD 0x40 -#define LMP_SNIFF 0x80 +#define LMP_SNIF 0x80 #define LMP_PARK 0x01 #define LMP_RSSI 0x02 @@ -161,21 +159,13 @@ enum { #define LMP_PSCHEME 0x02 #define LMP_PCONTROL 0x04 -#define LMP_SNIFF_SUBR 0x02 - -/* Connection modes */ -#define HCI_CM_ACTIVE 0x0000 -#define HCI_CM_HOLD 0x0001 -#define HCI_CM_SNIFF 0x0002 -#define HCI_CM_PARK 0x0003 - /* Link policies */ #define HCI_LP_RSWITCH 0x0001 #define HCI_LP_HOLD 0x0002 #define HCI_LP_SNIFF 0x0004 #define HCI_LP_PARK 0x0008 -/* Link modes */ +/* Link mode */ #define HCI_LM_ACCEPT 0x8000 #define HCI_LM_MASTER 0x0001 #define HCI_LM_AUTH 0x0002 @@ -201,7 +191,7 @@ struct hci_rp_read_loc_version { } __attribute__ ((packed)); #define OCF_READ_LOCAL_FEATURES 0x0003 -struct hci_rp_read_local_features { +struct hci_rp_read_loc_features { __u8 status; __u8 features[8]; } __attribute__ ((packed)); @@ -385,32 +375,17 @@ struct hci_cp_change_conn_link_key { } __attribute__ ((packed)); #define OCF_READ_REMOTE_FEATURES 0x001B -struct hci_cp_read_remote_features { +struct hci_cp_read_rmt_features { __le16 handle; } __attribute__ ((packed)); #define OCF_READ_REMOTE_VERSION 0x001D -struct hci_cp_read_remote_version { +struct hci_cp_read_rmt_version { __le16 handle; } __attribute__ ((packed)); /* Link Policy */ -#define OGF_LINK_POLICY 0x02 - -#define OCF_SNIFF_MODE 0x0003 -struct hci_cp_sniff_mode { - __le16 handle; - __le16 max_interval; - __le16 min_interval; - __le16 attempt; - __le16 timeout; -} __attribute__ ((packed)); - -#define OCF_EXIT_SNIFF_MODE 0x0004 -struct hci_cp_exit_sniff_mode { - __le16 handle; -} __attribute__ ((packed)); - +#define OGF_LINK_POLICY 0x02 #define OCF_ROLE_DISCOVERY 0x0009 struct hci_cp_role_discovery { __le16 handle; @@ -431,7 +406,7 @@ struct hci_rp_read_link_policy { __le16 policy; } __attribute__ ((packed)); -#define OCF_SWITCH_ROLE 0x000B +#define OCF_SWITCH_ROLE 0x000B struct hci_cp_switch_role { bdaddr_t bdaddr; __u8 role; @@ -447,14 +422,6 @@ struct hci_rp_write_link_policy { __le16 handle; } __attribute__ ((packed)); -#define OCF_SNIFF_SUBRATE 0x0011 -struct hci_cp_sniff_subrate { - __le16 handle; - __le16 max_latency; - __le16 min_remote_timeout; - __le16 min_local_timeout; -} __attribute__ ((packed)); - /* Status params */ #define OGF_STATUS_PARAM 0x05 @@ -614,15 +581,15 @@ struct hci_ev_link_key_notify { __u8 key_type; } __attribute__ ((packed)); -#define HCI_EV_REMOTE_FEATURES 0x0B -struct hci_ev_remote_features { +#define HCI_EV_RMT_FEATURES 0x0B +struct hci_ev_rmt_features { __u8 status; __le16 handle; __u8 features[8]; } __attribute__ ((packed)); -#define HCI_EV_REMOTE_VERSION 0x0C -struct hci_ev_remote_version { +#define HCI_EV_RMT_VERSION 0x0C +struct hci_ev_rmt_version { __u8 status; __le16 handle; __u8 lmp_ver; @@ -643,16 +610,6 @@ struct hci_ev_pscan_rep_mode { __u8 pscan_rep_mode; } __attribute__ ((packed)); -#define HCI_EV_SNIFF_SUBRATE 0x2E -struct hci_ev_sniff_subrate { - __u8 status; - __le16 handle; - __le16 max_tx_latency; - __le16 max_rx_latency; - __le16 max_remote_timeout; - __le16 max_local_timeout; -} __attribute__ ((packed)); - /* Internal events generated by Bluetooth stack */ #define HCI_EV_STACK_INTERNAL 0xFD struct hci_ev_stack_internal { diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index d84855fe7..bb9f81dc8 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -31,7 +31,10 @@ #define HCI_PROTO_L2CAP 0 #define HCI_PROTO_SCO 1 +#define HCI_INIT_TIMEOUT (HZ * 10) + /* HCI Core structures */ + struct inquiry_data { bdaddr_t bdaddr; __u8 pscan_rep_mode; @@ -78,10 +81,6 @@ struct hci_dev { __u16 link_policy; __u16 link_mode; - __u32 idle_timeout; - __u16 sniff_min_interval; - __u16 sniff_max_interval; - unsigned long quirks; atomic_t cmd_cnt; @@ -124,8 +123,7 @@ struct hci_dev { atomic_t promisc; - struct device *parent; - struct device dev; + struct class_device class_dev; struct module *owner; @@ -147,24 +145,18 @@ struct hci_conn { bdaddr_t dst; __u16 handle; __u16 state; - __u8 mode; __u8 type; __u8 out; __u8 dev_class[3]; - __u8 features[8]; - __u16 interval; - __u16 link_policy; __u32 link_mode; - __u8 power_save; unsigned long pend; - + unsigned int sent; - + struct sk_buff_head data_q; - struct timer_list disc_timer; - struct timer_list idle_timer; - + struct timer_list timer; + struct hci_dev *hdev; void *l2cap_data; void *sco_data; @@ -219,8 +211,7 @@ void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data); enum { HCI_CONN_AUTH_PEND, HCI_CONN_ENCRYPT_PEND, - HCI_CONN_RSWITCH_PEND, - HCI_CONN_MODE_CHANGE_PEND, + HCI_CONN_RSWITCH_PEND }; static inline void hci_conn_hash_init(struct hci_dev *hdev) @@ -295,27 +286,31 @@ int hci_conn_encrypt(struct hci_conn *conn); int hci_conn_change_link_key(struct hci_conn *conn); int hci_conn_switch_role(struct hci_conn *conn, uint8_t role); -void hci_conn_enter_active_mode(struct hci_conn *conn); -void hci_conn_enter_sniff_mode(struct hci_conn *conn); +static inline void hci_conn_set_timer(struct hci_conn *conn, unsigned long timeout) +{ + mod_timer(&conn->timer, jiffies + timeout); +} + +static inline void hci_conn_del_timer(struct hci_conn *conn) +{ + del_timer(&conn->timer); +} static inline void hci_conn_hold(struct hci_conn *conn) { atomic_inc(&conn->refcnt); - del_timer(&conn->disc_timer); + hci_conn_del_timer(conn); } static inline void hci_conn_put(struct hci_conn *conn) { if (atomic_dec_and_test(&conn->refcnt)) { - unsigned long timeo; if (conn->type == ACL_LINK) { - timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); - if (!conn->out) - timeo *= 2; - del_timer(&conn->idle_timer); + unsigned long timeo = (conn->out) ? + HCI_DISCONN_TIMEOUT : HCI_DISCONN_TIMEOUT * 2; + hci_conn_set_timer(conn, timeo); } else - timeo = msecs_to_jiffies(10); - mod_timer(&conn->disc_timer, jiffies + timeo); + hci_conn_set_timer(conn, HZ / 100); } } @@ -413,13 +408,11 @@ static inline int hci_recv_frame(struct sk_buff *skb) int hci_register_sysfs(struct hci_dev *hdev); void hci_unregister_sysfs(struct hci_dev *hdev); -#define SET_HCIDEV_DEV(hdev, pdev) ((hdev)->parent = (pdev)) +#define SET_HCIDEV_DEV(hdev, pdev) ((hdev)->class_dev.dev = (pdev)) /* ----- LMP capabilities ----- */ -#define lmp_rswitch_capable(dev) ((dev)->features[0] & LMP_RSWITCH) -#define lmp_encrypt_capable(dev) ((dev)->features[0] & LMP_ENCRYPT) -#define lmp_sniff_capable(dev) ((dev)->features[0] & LMP_SNIFF) -#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR) +#define lmp_rswitch_capable(dev) (dev->features[0] & LMP_RSWITCH) +#define lmp_encrypt_capable(dev) (dev->features[0] & LMP_ENCRYPT) /* ----- HCI protocols ----- */ struct hci_proto { diff --git a/include/net/compat.h b/include/net/compat.h index 9859b6028..e65cbedb6 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -1,6 +1,7 @@ #ifndef NET_COMPAT_H #define NET_COMPAT_H +#include struct sock; diff --git a/include/net/dst.h b/include/net/dst.h index 36d54fc24..5161e8901 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -8,6 +8,7 @@ #ifndef _NET_DST_H #define _NET_DST_H +#include #include #include #include diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 8c2287264..805de50df 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -150,24 +150,4 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) return nlmsg_unicast(genl_sock, skb, pid); } -/** - * gennlmsg_data - head of message payload - * @gnlh: genetlink messsage header - */ -static inline void *genlmsg_data(const struct genlmsghdr *gnlh) -{ - return ((unsigned char *) gnlh + GENL_HDRLEN); -} - -/** - * genlmsg_len - length of message payload - * @gnlh: genetlink message header - */ -static inline int genlmsg_len(const struct genlmsghdr *gnlh) -{ - struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - - NLMSG_HDRLEN); - return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN); -} - #endif /* __NET_GENERIC_NETLINK_H */ diff --git a/include/net/icmp.h b/include/net/icmp.h index afde98fd9..7ea37ea94 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -18,6 +18,7 @@ #ifndef _ICMP_H #define _ICMP_H +#include #include #include diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index ecc42864b..d5926bfb1 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h @@ -29,7 +29,7 @@ #include /* ARRAY_SIZE */ #include -#define IEEE80211_VERSION "git-1.1.13" +#define IEEE80211_VERSION "git-1.1.7" #define IEEE80211_DATA_LEN 2304 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section @@ -104,9 +104,6 @@ #define IEEE80211_SCTL_FRAG 0x000F #define IEEE80211_SCTL_SEQ 0xFFF0 -/* QOS control */ -#define IEEE80211_QCTL_TID 0x000F - /* debug macros */ #ifdef CONFIG_IEEE80211_DEBUG @@ -968,7 +965,6 @@ enum ieee80211_state { enum { IEEE80211_CH_PASSIVE_ONLY = (1 << 0), - IEEE80211_CH_80211H_RULES = (1 << 1), IEEE80211_CH_B_ONLY = (1 << 2), IEEE80211_CH_NO_IBSS = (1 << 3), IEEE80211_CH_UNIFORM_SPREADING = (1 << 4), @@ -977,10 +973,10 @@ enum { }; struct ieee80211_channel { - u32 freq; /* in MHz */ + u32 freq; u8 channel; u8 flags; - u8 max_power; /* in dBm */ + u8 max_power; }; struct ieee80211_geo { @@ -1079,7 +1075,6 @@ struct ieee80211_device { int (*handle_management) (struct net_device * dev, struct ieee80211_network * network, u16 type); - int (*is_qos_active) (struct net_device *dev, struct sk_buff *skb); /* Typical STA methods */ int (*handle_auth) (struct net_device * dev, @@ -1248,8 +1243,7 @@ extern int ieee80211_set_encryption(struct ieee80211_device *ieee); extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); extern void ieee80211_txb_free(struct ieee80211_txb *); extern int ieee80211_tx_frame(struct ieee80211_device *ieee, - struct ieee80211_hdr *frame, int hdr_len, - int total_len, int encrypt_mpdu); + struct ieee80211_hdr *frame, int len); /* ieee80211_rx.c */ extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index 00ad810eb..052ed596a 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h @@ -86,9 +86,6 @@ struct ieee80211softmac_assoc_info { /* BSSID we're trying to associate to */ char bssid[ETH_ALEN]; - - /* Rates supported by the network */ - struct ieee80211softmac_ratesinfo supported_rates; /* some flags. * static_essid is valid if the essid is constant, @@ -104,7 +101,6 @@ struct ieee80211softmac_assoc_info { */ u8 static_essid:1, associating:1, - assoc_wait:1, bssvalid:1, bssfixed:1; @@ -136,26 +132,23 @@ enum { struct ieee80211softmac_txrates { /* The Bit-Rate to be used for multicast frames. */ u8 mcast_rate; - - /* The Bit-Rate to be used for multicast management frames. */ - u8 mgt_mcast_rate; - + /* The Bit-Rate to be used for multicast fallback + * (If the device supports fallback and hardware-retry) + */ + u8 mcast_fallback; /* The Bit-Rate to be used for any other (normal) data packet. */ u8 default_rate; /* The Bit-Rate to be used for default fallback * (If the device supports fallback and hardware-retry) */ u8 default_fallback; - - /* This is the rate that the user asked for */ - u8 user_rate; }; /* Bits for txrates_change callback. */ #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT (1 << 0) /* default_rate */ #define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK (1 << 1) /* default_fallback */ #define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */ -#define IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST (1 << 3) /* mgt_mcast_rate */ +#define IEEE80211SOFTMAC_TXRATECHG_MCAST_FBACK (1 << 3) /* mcast_fallback */ struct ieee80211softmac_device { /* 802.11 structure for data stuff */ @@ -257,28 +250,6 @@ extern void ieee80211softmac_fragment_lost(struct net_device *dev, * Note that the rates need to be sorted. */ extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates); -/* Helper function which advises you the rate at which a frame should be - * transmitted at. */ -static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device *mac, - int is_multicast, - int is_mgt) -{ - struct ieee80211softmac_txrates *txrates = &mac->txrates; - - if (!mac->associated) - return txrates->mgt_mcast_rate; - - /* We are associated, sending unicast frame */ - if (!is_multicast) - return txrates->default_rate; - - /* We are associated, sending multicast frame */ - if (is_mgt) - return txrates->mgt_mcast_rate; - else - return txrates->mcast_rate; -} - /* Start the SoftMAC. Call this after you initialized the device * and it is ready to run. */ @@ -311,7 +282,7 @@ extern void ieee80211softmac_stop(struct net_device *dev); * - context set to the context data you want passed * The return value is 0, or an error. */ -typedef void (*notify_function_ptr)(struct net_device *dev, int event_type, void *context); +typedef void (*notify_function_ptr)(struct net_device *dev, void *context); #define ieee80211softmac_notify(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_KERNEL); #define ieee80211softmac_notify_atomic(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_ATOMIC); diff --git a/include/net/ieee80211softmac_wx.h b/include/net/ieee80211softmac_wx.h index 4ee3ad572..3e0be453e 100644 --- a/include/net/ieee80211softmac_wx.h +++ b/include/net/ieee80211softmac_wx.h @@ -91,9 +91,4 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra); -extern int -ieee80211softmac_wx_set_mlme(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, - char *extra); #endif /* _IEEE80211SOFTMAC_WX */ diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h index bc6a71dce..59f0c83d5 100644 --- a/include/net/inet6_hashtables.h +++ b/include/net/inet6_hashtables.h @@ -14,6 +14,7 @@ #ifndef _INET6_HASHTABLES_H #define _INET6_HASHTABLES_H +#include #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #include diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 6f3a6fa7b..1a80498a9 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -14,6 +14,7 @@ #ifndef _INET_HASHTABLES_H #define _INET_HASHTABLES_H +#include #include #include diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 55644aa2b..482425447 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -16,6 +16,7 @@ #ifndef _INET_SOCK_H #define _INET_SOCK_H +#include #include #include diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 456616bf8..0e8a6ad6f 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -15,6 +15,7 @@ #ifndef _INET_TIMEWAIT_SOCK_ #define _INET_TIMEWAIT_SOCK_ +#include #include #include diff --git a/include/net/ip.h b/include/net/ip.h index 98f908400..3d2e5ca62 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -22,6 +22,7 @@ #ifndef _IP_H #define _IP_H +#include #include #include #include @@ -146,6 +147,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar struct ipv4_config { int log_martians; + int autoconfig; int no_pmtu_disc; }; diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 96b0e6640..a398ae5e3 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -139,22 +139,16 @@ extern rwlock_t rt6_lock; /* * Store a destination cache entry in a socket */ -static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, - struct in6_addr *daddr) +static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, + struct in6_addr *daddr) { struct ipv6_pinfo *np = inet6_sk(sk); struct rt6_info *rt = (struct rt6_info *) dst; - sk_setup_caps(sk, dst); + write_lock(&sk->sk_dst_lock); + __sk_dst_set(sk, dst); np->daddr_cache = daddr; np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; -} - -static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, - struct in6_addr *daddr) -{ - write_lock(&sk->sk_dst_lock); - __ip6_dst_store(sk, dst, daddr); write_unlock(&sk->sk_dst_lock); } diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index a095d1dec..e000fa2cd 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -16,6 +16,7 @@ #ifndef _NET_IP_FIB_H #define _NET_IP_FIB_H +#include #include #include diff --git a/include/net/ip_mp_alg.h b/include/net/ip_mp_alg.h index ac747b647..77225735c 100644 --- a/include/net/ip_mp_alg.h +++ b/include/net/ip_mp_alg.h @@ -7,6 +7,7 @@ #ifndef _NET_IP_MP_ALG_H #define _NET_IP_MP_ALG_H +#include #include #include #include diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 3b57b159b..7d2674fde 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -248,6 +248,7 @@ struct ip_vs_daemon_user { #ifdef __KERNEL__ +#include #include /* for struct list_head */ #include /* for struct rwlock_t */ #include /* for struct atomic_t */ diff --git a/include/net/ipv6.h b/include/net/ipv6.h index ece7e8a84..4abedb8ea 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -104,6 +104,7 @@ struct frag_hdr { #ifdef __KERNEL__ +#include #include /* sysctls */ @@ -468,9 +469,6 @@ extern void ip6_flush_pending_frames(struct sock *sk); extern int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl); -extern int ip6_sk_dst_lookup(struct sock *sk, - struct dst_entry **dst, - struct flowi *fl); /* * skb processing functions diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 1cb0607fc..1880e46ec 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h @@ -26,6 +26,7 @@ #ifndef NET_IRDA_H #define NET_IRDA_H +#include #include /* struct sk_buff */ #include #include /* sa_family_t in */ diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h index bca19ca7b..92c828029 100644 --- a/include/net/irda/irda_device.h +++ b/include/net/irda/irda_device.h @@ -39,6 +39,7 @@ #ifndef IRDA_DEVICE_H #define IRDA_DEVICE_H +#include #include #include #include @@ -160,7 +161,7 @@ typedef struct { int irq, irq2; /* Interrupts used */ int dma, dma2; /* DMA channel(s) used */ int fifo_size; /* FIFO size */ - int irqflags; /* interrupt flags (ie, IRQF_SHARED|IRQF_DISABLED) */ + int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */ int direction; /* Link direction, used by some FIR drivers */ int enabled; /* Powered on? */ int suspended; /* Suspended by APM */ diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index e77eb88d9..2127cae1e 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h @@ -27,6 +27,7 @@ #ifndef IRLAP_H #define IRLAP_H +#include #include #include #include diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index 11ecfa58a..c0c895d37 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h @@ -29,6 +29,7 @@ #include /* for HZ */ +#include #include #include diff --git a/include/net/irda/irlmp_frame.h b/include/net/irda/irlmp_frame.h index c463f8bca..eb3ad158c 100644 --- a/include/net/irda/irlmp_frame.h +++ b/include/net/irda/irlmp_frame.h @@ -26,6 +26,7 @@ #ifndef IRMLP_FRAME_H #define IRMLP_FRAME_H +#include #include #include diff --git a/include/net/irda/qos.h b/include/net/irda/qos.h index cc577dc0a..9ae3d6bc2 100644 --- a/include/net/irda/qos.h +++ b/include/net/irda/qos.h @@ -31,6 +31,7 @@ #ifndef IRDA_QOS_H #define IRDA_QOS_H +#include #include #include diff --git a/include/net/llc_if.h b/include/net/llc_if.h index c608812a8..090eaa0d7 100644 --- a/include/net/llc_if.h +++ b/include/net/llc_if.h @@ -16,7 +16,6 @@ #include #include #include -#include #include #define LLC_DATAUNIT_PRIM 1 @@ -62,6 +61,8 @@ #define LLC_STATUS_CONFLICT 7 /* disconnect conn */ #define LLC_STATUS_RESET_DONE 8 /* */ +extern u8 llc_mac_null_var[IFHWADDRLEN]; + /** * llc_mac_null - determines if a address is a null mac address * @mac: Mac address to test if null. @@ -69,20 +70,16 @@ * Determines if a given address is a null mac address. Returns 0 if the * address is not a null mac, 1 if the address is a null mac. */ -static inline int llc_mac_null(const u8 *mac) +static __inline__ int llc_mac_null(u8 *mac) { - return is_zero_ether_addr(mac); + return !memcmp(mac, llc_mac_null_var, IFHWADDRLEN); } -static inline int llc_addrany(const struct llc_addr *addr) +static __inline__ int llc_addrany(struct llc_addr *addr) { return llc_mac_null(addr->mac) && !addr->lsap; } -static inline int llc_mac_multicast(const u8 *mac) -{ - return is_multicast_ether_addr(mac); -} /** * llc_mac_match - determines if two mac addresses are the same * @mac1: First mac address to compare. @@ -92,9 +89,9 @@ static inline int llc_mac_multicast(const u8 *mac) * is not a complete match up to len, 1 if a complete match up to len is * found. */ -static inline int llc_mac_match(const u8 *mac1, const u8 *mac2) +static __inline__ int llc_mac_match(u8 *mac1, u8 *mac2) { - return !compare_ether_addr(mac1, mac2); + return !memcmp(mac1, mac2, IFHWADDRLEN); } extern int llc_establish_connection(struct sock *sk, u8 *lmac, diff --git a/include/net/ndisc.h b/include/net/ndisc.h index d3915dabe..91fa271a0 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -37,6 +37,7 @@ enum { #ifdef __KERNEL__ +#include #include #include #include diff --git a/include/net/netdma.h b/include/net/netdma.h deleted file mode 100644 index f28c6e064..000000000 --- a/include/net/netdma.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. 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. 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ -#ifndef NETDMA_H -#define NETDMA_H -#ifdef CONFIG_NET_DMA -#include -#include - -static inline struct dma_chan *get_softnet_dma(void) -{ - struct dma_chan *chan; - rcu_read_lock(); - chan = rcu_dereference(__get_cpu_var(softnet_data).net_dma); - if (chan) - dma_chan_get(chan); - rcu_read_unlock(); - return chan; -} - -int dma_skb_copy_datagram_iovec(struct dma_chan* chan, - struct sk_buff *skb, int offset, struct iovec *to, - size_t len, struct dma_pinned_list *pinned_list); - -#endif /* CONFIG_NET_DMA */ -#endif /* NETDMA_H */ diff --git a/include/net/netevent.h b/include/net/netevent.h deleted file mode 100644 index e5d216241..000000000 --- a/include/net/netevent.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _NET_EVENT_H -#define _NET_EVENT_H - -/* - * Generic netevent notifiers - * - * Authors: - * Tom Tucker - * Steve Wise - * - * Changes: - */ -#ifdef __KERNEL__ - -#include - -struct netevent_redirect { - struct dst_entry *old; - struct dst_entry *new; -}; - -enum netevent_notif_type { - NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */ - NETEVENT_PMTU_UPDATE, /* arg is struct dst_entry ptr */ - NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */ -}; - -extern int register_netevent_notifier(struct notifier_block *nb); -extern int unregister_netevent_notifier(struct notifier_block *nb); -extern int call_netevent_notifiers(unsigned long val, void *v); - -#endif -#endif diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 1fbd8193d..916013ca4 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -15,6 +15,7 @@ #include #ifdef __KERNEL__ +#include #include #include #include @@ -113,10 +114,6 @@ struct nf_conn u_int32_t mark; #endif -#ifdef CONFIG_NF_CONNTRACK_SECMARK - u_int32_t secmark; -#endif - /* Storage reserved for other modules: */ union nf_conntrack_proto proto; @@ -288,7 +285,6 @@ static inline int nf_ct_is_dying(struct nf_conn *ct) } extern unsigned int nf_conntrack_htable_size; -extern int nf_conntrack_checksum; #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) diff --git a/include/net/netfilter/nf_conntrack_compat.h b/include/net/netfilter/nf_conntrack_compat.h index f1b1482d7..3cac19fb3 100644 --- a/include/net/netfilter/nf_conntrack_compat.h +++ b/include/net/netfilter/nf_conntrack_compat.h @@ -20,19 +20,6 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, } #endif /* CONFIG_IP_NF_CONNTRACK_MARK */ -#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK -static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb, - u_int32_t *ctinfo) -{ - struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo); - - if (ct) - return &ct->secmark; - else - return NULL; -} -#endif /* CONFIG_IP_NF_CONNTRACK_SECMARK */ - #ifdef CONFIG_IP_NF_CT_ACCT static inline struct ip_conntrack_counter * nf_ct_get_counters(const struct sk_buff *skb) @@ -83,19 +70,6 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, } #endif /* CONFIG_NF_CONNTRACK_MARK */ -#ifdef CONFIG_NF_CONNTRACK_SECMARK -static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb, - u_int32_t *ctinfo) -{ - struct nf_conn *ct = nf_ct_get(skb, ctinfo); - - if (ct) - return &ct->secmark; - else - return NULL; -} -#endif /* CONFIG_NF_CONNTRACK_MARK */ - #ifdef CONFIG_NF_CT_ACCT static inline struct ip_conntrack_counter * nf_ct_get_counters(const struct sk_buff *skb) diff --git a/include/net/pkt_act.h b/include/net/pkt_act.h index cf5e4d2e4..b225d8472 100644 --- a/include/net/pkt_act.h +++ b/include/net/pkt_act.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index f6afee732..75b5b9333 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -171,14 +171,14 @@ psched_tod_diff(int delta_sec, int bound) ({ \ int __delta = (tv).tv_usec + (delta); \ (tv_res).tv_sec = (tv).tv_sec; \ - while (__delta >= USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ + if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ (tv_res).tv_usec = __delta; \ }) #define PSCHED_TADD(tv, delta) \ ({ \ (tv).tv_usec += (delta); \ - while ((tv).tv_usec >= USEC_PER_SEC) { (tv).tv_sec++; \ + if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \ (tv).tv_usec -= USEC_PER_SEC; } \ }) diff --git a/include/net/protocol.h b/include/net/protocol.h index c643bce64..d516c58ce 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -24,6 +24,7 @@ #ifndef _PROTOCOL_H #define _PROTOCOL_H +#include #include #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #include @@ -51,18 +52,11 @@ struct inet6_protocol struct inet6_skb_parm *opt, int type, int code, int offset, __u32 info); - - int (*gso_send_check)(struct sk_buff *skb); - struct sk_buff *(*gso_segment)(struct sk_buff *skb, - int features); - unsigned int flags; /* INET6_PROTO_xxx */ }; #define INET6_PROTO_NOPOLICY 0x1 #define INET6_PROTO_FINAL 0x2 -/* This should be set for any extension header which is compatible with GSO. */ -#define INET6_PROTO_GSO_EXTHDR 0x4 #endif /* This is used to register socket interfaces for IP protocols. */ diff --git a/include/net/raw.h b/include/net/raw.h index e4af59781..e67b28a02 100644 --- a/include/net/raw.h +++ b/include/net/raw.h @@ -17,6 +17,7 @@ #ifndef _RAW_H #define _RAW_H +#include #include @@ -35,7 +36,7 @@ extern rwlock_t raw_v4_lock; extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num, - __be32 raddr, __be32 laddr, + unsigned long raddr, unsigned long laddr, int dif); extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash); diff --git a/include/net/red.h b/include/net/red.h index a4eb37946..2ed4358e3 100644 --- a/include/net/red.h +++ b/include/net/red.h @@ -1,6 +1,7 @@ #ifndef __NET_SCHED_RED_H #define __NET_SCHED_RED_H +#include #include #include #include @@ -212,7 +213,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p) * Seems, it is the best solution to * problem of too coarse exponent tabulation. */ - us_idle = (p->qavg * (u64)us_idle) >> p->Scell_log; + us_idle = (p->qavg * us_idle) >> p->Scell_log; if (us_idle < (p->qavg >> 1)) return p->qavg - us_idle; diff --git a/include/net/route.h b/include/net/route.h index 3caecb555..d479875b7 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -24,6 +24,7 @@ #ifndef _ROUTE_H #define _ROUTE_H +#include #include #include #include diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b0e9108a4..7b6ec9986 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -1,6 +1,7 @@ #ifndef __NET_SCHED_GENERIC_H #define __NET_SCHED_GENERIC_H +#include #include #include #include diff --git a/include/net/scm.h b/include/net/scm.h index 5637d5e22..540619cb7 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -3,7 +3,6 @@ #include #include -#include /* Well, we should have at least one descriptor open * to accept passed FDs 8) @@ -20,9 +19,6 @@ struct scm_cookie { struct ucred creds; /* Skb credentials */ struct scm_fp_list *fp; /* Passed files */ -#ifdef CONFIG_SECURITY_NETWORK - u32 secid; /* Passed security ID */ -#endif unsigned long seq; /* Connection seqno */ }; @@ -32,16 +28,6 @@ extern int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie extern void __scm_destroy(struct scm_cookie *scm); extern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl); -#ifdef CONFIG_SECURITY_NETWORK -static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) -{ - security_socket_getpeersec_dgram(sock, NULL, &scm->secid); -} -#else -static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) -{ } -#endif /* CONFIG_SECURITY_NETWORK */ - static __inline__ void scm_destroy(struct scm_cookie *scm) { if (scm && scm->fp) @@ -57,33 +43,11 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, scm->creds.pid = p->tgid; scm->fp = NULL; scm->seq = 0; - unix_get_peersec_dgram(sock, scm); if (msg->msg_controllen <= 0) return 0; return __scm_send(sock, msg, scm); } -#ifdef CONFIG_SECURITY_NETWORK -static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) -{ - char *secdata; - u32 seclen; - int err; - - if (test_bit(SOCK_PASSSEC, &sock->flags)) { - err = security_secid_to_secctx(scm->secid, &secdata, &seclen); - - if (!err) { - put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, seclen, secdata); - security_release_secctx(secdata, seclen); - } - } -} -#else -static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) -{ } -#endif /* CONFIG_SECURITY_NETWORK */ - static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm, int flags) { @@ -98,8 +62,6 @@ static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, if (test_bit(SOCK_PASSCRED, &sock->flags)) put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds); - scm_passec(sock, msg, scm); - if (!scm->fp) return; diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index 92eae0e0f..225dcea94 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h @@ -63,6 +63,7 @@ */ +#include #ifdef TEST_FRAME #undef CONFIG_PROC_FS diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index e5aa7ff1f..5f69158c1 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -445,7 +445,6 @@ typedef struct sctp_sender_hb_info { struct sctp_paramhdr param_hdr; union sctp_addr daddr; unsigned long sent_at; - __u64 hb_nonce; } __attribute__((packed)) sctp_sender_hb_info_t; /* @@ -731,10 +730,13 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *, const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); /* This is a structure for holding either an IPv6 or an IPv4 address. */ +/* sin_family -- AF_INET or AF_INET6 + * sin_port -- ordinary port number + * sin_addr -- cast to either (struct in_addr) or (struct in6_addr) + */ struct sctp_sockaddr_entry { struct list_head list; union sctp_addr a; - __u8 use_as_src; }; typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); @@ -982,9 +984,6 @@ struct sctp_transport { */ char cacc_saw_newack; } cacc; - - /* 64-bit random number sent with heartbeat. */ - __u64 hb_nonce; }; struct sctp_transport *sctp_transport_new(const union sctp_addr *, @@ -1139,7 +1138,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, sctp_scope_t scope, gfp_t gfp, int flags); int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, - __u8 use_as_src, gfp_t gfp); + gfp_t gfp); int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, struct sctp_sock *); diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 1b7aae6cd..8a6bef6f9 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h @@ -560,18 +560,9 @@ struct sctp_paddrinfo { } __attribute__((packed, aligned(4))); /* Peer addresses's state. */ -/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x] - * calls. - * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters. - * Not yet confirmed by a heartbeat and not available for data - * transfers. - * ACTIVE : Peer address confirmed, active and available for data transfers. - * INACTIVE: Peer address inactive and not available for data transfers. - */ enum sctp_spinfo_state { SCTP_INACTIVE, SCTP_ACTIVE, - SCTP_UNCONFIRMED, SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ }; diff --git a/include/net/sock.h b/include/net/sock.h index cc7534d8a..f937108a4 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -40,11 +40,11 @@ #ifndef _SOCK_H #define _SOCK_H +#include #include #include #include #include -#include #include #include /* struct sk_buff */ #include @@ -79,17 +79,14 @@ typedef struct { spinlock_t slock; struct sock_iocb *owner; wait_queue_head_t wq; - /* - * We express the mutex-alike socket_lock semantics - * to the lock validator by explicitly managing - * the slock as a lock variant (in addition to - * the slock itself): - */ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif } socket_lock_t; +#define sock_lock_init(__sk) \ +do { spin_lock_init(&((__sk)->sk_lock.slock)); \ + (__sk)->sk_lock.owner = NULL; \ + init_waitqueue_head(&((__sk)->sk_lock.wq)); \ +} while(0) + struct sock; struct proto; @@ -139,7 +136,6 @@ struct sock_common { * @sk_receive_queue: incoming packets * @sk_wmem_alloc: transmit queue bytes committed * @sk_write_queue: Packet sending queue - * @sk_async_wait_queue: DMA copied packets * @sk_omem_alloc: "o" is "option" or "other" * @sk_wmem_queued: persistent queue size * @sk_forward_alloc: space allocated forward @@ -148,7 +144,6 @@ struct sock_common { * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) - * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) * @sk_lingertime: %SO_LINGER l_linger setting * @sk_backlog: always used with the per-socket spinlock held * @sk_callback_lock: used with the callbacks in the end of this struct @@ -219,13 +214,11 @@ struct sock { atomic_t sk_omem_alloc; struct sk_buff_head sk_receive_queue; struct sk_buff_head sk_write_queue; - struct sk_buff_head sk_async_wait_queue; int sk_wmem_queued; int sk_forward_alloc; gfp_t sk_allocation; int sk_sndbuf; int sk_route_caps; - int sk_gso_type; int sk_rcvlowat; unsigned long sk_flags; unsigned long sk_lingertime; @@ -399,6 +392,7 @@ enum sock_flags { SOCK_USE_WRITE_QUEUE, /* whether to call sk->sk_write_space in sock_wfree */ SOCK_DBG, /* %SO_DEBUG setting */ SOCK_RCVTSTAMP, /* %SO_TIMESTAMP setting */ + SOCK_NO_LARGESEND, /* whether to sent large segments or not */ SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */ SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ }; @@ -756,33 +750,11 @@ static inline int sk_stream_wmem_schedule(struct sock *sk, int size) */ #define sock_owned_by_user(sk) ((sk)->sk_lock.owner) -/* - * Macro so as to not evaluate some arguments when - * lockdep is not enabled. - * - * Mark both the sk_lock and the sk_lock.slock as a - * per-address-family lock class. - */ -#define sock_lock_init_class_and_name(sk, sname, skey, name, key) \ -do { \ - sk->sk_lock.owner = NULL; \ - init_waitqueue_head(&sk->sk_lock.wq); \ - spin_lock_init(&(sk)->sk_lock.slock); \ - debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ - sizeof((sk)->sk_lock)); \ - lockdep_set_class_and_name(&(sk)->sk_lock.slock, \ - (skey), (sname)); \ - lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ -} while (0) - extern void FASTCALL(lock_sock(struct sock *sk)); extern void FASTCALL(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)) -#define bh_lock_sock_nested(__sk) \ - spin_lock_nested(&((__sk)->sk_lock.slock), \ - SINGLE_DEPTH_NESTING) #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) extern struct sock *sk_alloc(int family, @@ -909,7 +881,10 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock) if (filter) { unsigned int pkt_len = sk_run_filter(skb, filter->insns, filter->len); - err = pkt_len ? pskb_trim(skb, pkt_len) : -EPERM; + if (!pkt_len) + err = -EPERM; + else + skb_trim(skb, pkt_len); } if (needlock) @@ -1054,30 +1029,24 @@ __sk_dst_reset(struct sock *sk) static inline void sk_dst_reset(struct sock *sk) { - unsigned long flags; - write_lock_irqsave(&sk->sk_dst_lock, flags); + write_lock(&sk->sk_dst_lock); __sk_dst_reset(sk); - write_unlock_irqrestore(&sk->sk_dst_lock, flags); + write_unlock(&sk->sk_dst_lock); } extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie); extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie); -static inline int sk_can_gso(const struct sock *sk) -{ - return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type); -} - static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst) { __sk_dst_set(sk, dst); sk->sk_route_caps = dst->dev->features; if (sk->sk_route_caps & NETIF_F_GSO) - sk->sk_route_caps |= NETIF_F_GSO_MASK; - if (sk_can_gso(sk)) { - if (dst->header_len) - sk->sk_route_caps &= ~NETIF_F_GSO_MASK; + sk->sk_route_caps |= NETIF_F_TSO; + if (sk->sk_route_caps & NETIF_F_TSO) { + if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len) + sk->sk_route_caps &= ~NETIF_F_TSO; else sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } @@ -1314,27 +1283,15 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb) * sk_eat_skb - Release a skb if it is no longer needed * @sk: socket to eat this skb from * @skb: socket buffer to eat - * @copied_early: flag indicating whether DMA operations copied this data early * * This routine must be called with interrupts disabled or with the socket * locked so that the sk_buff queue operation is ok. */ -#ifdef CONFIG_NET_DMA -static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) -{ - __skb_unlink(skb, &sk->sk_receive_queue); - if (!copied_early) - __kfree_skb(skb); - else - __skb_queue_tail(&sk->sk_async_wait_queue, skb); -} -#else -static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early) +static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) { __skb_unlink(skb, &sk->sk_receive_queue); __kfree_skb(skb); } -#endif extern void sock_enable_timestamp(struct sock *sk); extern int sock_get_timestamp(struct sock *, struct timeval __user *); diff --git a/include/net/tcp.h b/include/net/tcp.h index 781156845..8fa246247 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -21,13 +21,13 @@ #define TCP_DEBUG 1 #define FASTRETRANS_DEBUG 1 +#include #include #include #include #include #include #include -#include #include #include @@ -218,7 +218,6 @@ extern int sysctl_tcp_adv_win_scale; extern int sysctl_tcp_tw_reuse; extern int sysctl_tcp_frto; extern int sysctl_tcp_low_latency; -extern int sysctl_tcp_dma_copybreak; extern int sysctl_tcp_nometrics_save; extern int sysctl_tcp_moderate_rcvbuf; extern int sysctl_tcp_tso_win_divisor; @@ -226,7 +225,6 @@ extern int sysctl_tcp_abc; extern int sysctl_tcp_mtu_probing; extern int sysctl_tcp_base_mss; extern int sysctl_tcp_workaround_signed_windows; -extern int sysctl_tcp_slow_start_after_idle; extern atomic_t tcp_memory_allocated; extern atomic_t tcp_sockets_allocated; @@ -297,8 +295,6 @@ extern int tcp_rcv_established(struct sock *sk, extern void tcp_rcv_space_adjust(struct sock *sk); -extern void tcp_cleanup_rbuf(struct sock *sk, int copied); - extern int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp); @@ -437,7 +433,7 @@ extern int tcp_send_synack(struct sock *); extern void tcp_push_one(struct sock *, unsigned int mss_now); extern void tcp_send_ack(struct sock *sk); extern void tcp_send_delayed_ack(struct sock *sk); -extern void tcp_cleanup_rbuf(struct sock *sk, int copied); +extern void cleanup_rbuf(struct sock *sk, int copied); /* tcp_input.c */ extern void tcp_cwnd_application_limited(struct sock *sk); @@ -635,7 +631,7 @@ struct tcp_congestion_ops { /* return slow start threshold (required) */ u32 (*ssthresh)(struct sock *sk); /* lower bound for congestion window (optional) */ - u32 (*min_cwnd)(const struct sock *sk); + u32 (*min_cwnd)(struct sock *sk); /* do new cwnd calculation (required) */ void (*cong_avoid)(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, int good_ack); @@ -670,7 +666,7 @@ extern struct tcp_congestion_ops tcp_init_congestion_ops; extern u32 tcp_reno_ssthresh(struct sock *sk); extern void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, int flag); -extern u32 tcp_reno_min_cwnd(const struct sock *sk); +extern u32 tcp_reno_min_cwnd(struct sock *sk); extern struct tcp_congestion_ops tcp_reno; static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state) @@ -754,7 +750,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) if (in_flight >= tp->snd_cwnd) return 1; - if (!sk_can_gso(sk)) + if (!(sk->sk_route_caps & NETIF_F_TSO)) return 0; left = tp->snd_cwnd - in_flight; @@ -824,12 +820,6 @@ static inline void tcp_prequeue_init(struct tcp_sock *tp) tp->ucopy.len = 0; tp->ucopy.memory = 0; skb_queue_head_init(&tp->ucopy.prequeue); -#ifdef CONFIG_NET_DMA - tp->ucopy.dma_chan = NULL; - tp->ucopy.wakeup = 0; - tp->ucopy.pinned_list = NULL; - tp->ucopy.dma_cookie = 0; -#endif } /* Packet is added to VJ-style prequeue for processing in process @@ -917,9 +907,6 @@ static inline void tcp_set_state(struct sock *sk, int state) static inline void tcp_done(struct sock *sk) { - if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) - TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); - tcp_set_state(sk, TCP_CLOSE); tcp_clear_xmit_timers(sk); diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h index 4629d7717..c6b843974 100644 --- a/include/net/tcp_ecn.h +++ b/include/net/tcp_ecn.h @@ -31,9 +31,10 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp, struct sk_buff *skb) { tp->ecn_flags = 0; - if (sysctl_tcp_ecn) { + if (sysctl_tcp_ecn && !(sk->sk_route_caps & NETIF_F_TSO)) { TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR; tp->ecn_flags = TCP_ECN_OK; + sock_set_flag(sk, SOCK_NO_LARGESEND); } } @@ -55,7 +56,6 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp, if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) { tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; skb->h.th->cwr = 1; - skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; } } else { /* ACK or retransmitted segment: clear ECT|CE */ diff --git a/include/net/tipc/tipc_bearer.h b/include/net/tipc/tipc_bearer.h index e07136d74..098607cd4 100644 --- a/include/net/tipc/tipc_bearer.h +++ b/include/net/tipc/tipc_bearer.h @@ -49,18 +49,10 @@ #define TIPC_MEDIA_TYPE_ETH 1 -/* - * Destination address structure used by TIPC bearers when sending messages - * - * IMPORTANT: The fields of this structure MUST be stored using the specified - * byte order indicated below, as the structure is exchanged between nodes - * as part of a link setup process. - */ - struct tipc_media_addr { - __u32 type; /* bearer type (network byte order) */ + __u32 type; union { - __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */ + __u8 eth_addr[6]; /* Ethernet bearer */ #if 0 /* Prototypes for other possible bearer types */ diff --git a/include/net/tux.h b/include/net/tux.h index c22898d8f..9b40bc5e2 100644 --- a/include/net/tux.h +++ b/include/net/tux.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 9c5ee9f20..afa508d92 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -20,8 +20,6 @@ #include #define XFRM_ALIGN8(len) (((len) + 7) & ~7) -#define MODULE_ALIAS_XFRM_MODE(family, encap) \ - MODULE_ALIAS("xfrm-mode-" __stringify(family) "-" __stringify(encap)) extern struct sock *xfrm_nl; extern u32 sysctl_xfrm_aevent_etime; @@ -166,7 +164,6 @@ struct xfrm_state /* Reference to data common to all the instances of this * transformer. */ struct xfrm_type *type; - struct xfrm_mode *mode; /* Security context */ struct xfrm_sec_ctx *security; @@ -207,8 +204,8 @@ struct xfrm_type; struct xfrm_dst; struct xfrm_policy_afinfo { unsigned short family; - struct xfrm_type *type_map[IPPROTO_MAX]; - struct xfrm_mode *mode_map[XFRM_MODE_MAX]; + rwlock_t lock; + struct xfrm_type_map *type_map; struct dst_ops *dst_ops; void (*garbage_collect)(void); int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl); @@ -235,6 +232,7 @@ extern int __xfrm_state_delete(struct xfrm_state *x); struct xfrm_state_afinfo { unsigned short family; + rwlock_t lock; struct list_head *state_bydst; struct list_head *state_byspi; int (*init_flags)(struct xfrm_state *x); @@ -266,24 +264,16 @@ struct xfrm_type u32 (*get_max_size)(struct xfrm_state *, int size); }; +struct xfrm_type_map { + rwlock_t lock; + struct xfrm_type *map[256]; +}; + extern int xfrm_register_type(struct xfrm_type *type, unsigned short family); extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family); extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family); extern void xfrm_put_type(struct xfrm_type *type); -struct xfrm_mode { - int (*input)(struct xfrm_state *x, struct sk_buff *skb); - int (*output)(struct sk_buff *skb); - - struct module *owner; - unsigned int encap; -}; - -extern int xfrm_register_mode(struct xfrm_mode *mode, int family); -extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family); -extern struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family); -extern void xfrm_put_mode(struct xfrm_mode *mode); - struct xfrm_tmpl { /* id in template is interpreted as: diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index ede639812..5e0a01ab2 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h @@ -15,6 +15,7 @@ #ifndef _LINUX_SS_H #define _LINUX_SS_H +#include #include #include /* task_struct, completion */ #include diff --git a/include/rdma/Kbuild b/include/rdma/Kbuild deleted file mode 100644 index e7c043216..000000000 --- a/include/rdma/Kbuild +++ /dev/null @@ -1 +0,0 @@ -header-y += ib_user_mad.h diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h deleted file mode 100644 index 0ff673989..000000000 --- a/include/rdma/ib_addr.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2005 Voltaire Inc. All rights reserved. - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This Software is licensed under one of the following licenses: - * - * 1) under the terms of the "Common Public License 1.0" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/cpl.php. - * - * 2) under the terms of the "The BSD License" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/bsd-license.php. - * - * 3) under the terms of the "GNU General Public License (GPL) Version 2" a - * copy of which is available from the Open Source Initiative, see - * http://www.opensource.org/licenses/gpl-license.php. - * - * Licensee has the right to choose one of the above licenses. - * - * Redistributions of source code must retain the above copyright - * notice and one of the license notices. - * - * Redistributions in binary form must reproduce both the above copyright - * notice, one of the license notices in the documentation - * and/or other materials provided with the distribution. - * - */ - -#if !defined(IB_ADDR_H) -#define IB_ADDR_H - -#include -#include -#include -#include -#include - -struct rdma_dev_addr { - unsigned char src_dev_addr[MAX_ADDR_LEN]; - unsigned char dst_dev_addr[MAX_ADDR_LEN]; - unsigned char broadcast[MAX_ADDR_LEN]; - enum ib_node_type dev_type; -}; - -/** - * rdma_translate_ip - Translate a local IP address to an RDMA hardware - * address. - */ -int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr); - -/** - * rdma_resolve_ip - Resolve source and destination IP addresses to - * RDMA hardware addresses. - * @src_addr: An optional source address to use in the resolution. If a - * source address is not provided, a usable address will be returned via - * the callback. - * @dst_addr: The destination address to resolve. - * @addr: A reference to a data location that will receive the resolved - * addresses. The data location must remain valid until the callback has - * been invoked. - * @timeout_ms: Amount of time to wait for the address resolution to complete. - * @callback: Call invoked once address resolution has completed, timed out, - * or been canceled. A status of 0 indicates success. - * @context: User-specified context associated with the call. - */ -int rdma_resolve_ip(struct sockaddr *src_addr, struct sockaddr *dst_addr, - struct rdma_dev_addr *addr, int timeout_ms, - void (*callback)(int status, struct sockaddr *src_addr, - struct rdma_dev_addr *addr, void *context), - void *context); - -void rdma_addr_cancel(struct rdma_dev_addr *addr); - -static inline int ip_addr_size(struct sockaddr *addr) -{ - return addr->sa_family == AF_INET6 ? - sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); -} - -static inline u16 ib_addr_get_pkey(struct rdma_dev_addr *dev_addr) -{ - return ((u16)dev_addr->broadcast[8] << 8) | (u16)dev_addr->broadcast[9]; -} - -static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey) -{ - dev_addr->broadcast[8] = pkey >> 8; - dev_addr->broadcast[9] = (unsigned char) pkey; -} - -static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr, - union ib_gid *gid) -{ - memcpy(gid, dev_addr->src_dev_addr + 4, sizeof *gid); -} - -static inline void ib_addr_set_sgid(struct rdma_dev_addr *dev_addr, - union ib_gid *gid) -{ - memcpy(dev_addr->src_dev_addr + 4, gid, sizeof *gid); -} - -static inline void ib_addr_get_dgid(struct rdma_dev_addr *dev_addr, - union ib_gid *gid) -{ - memcpy(gid, dev_addr->dst_dev_addr + 4, sizeof *gid); -} - -static inline void ib_addr_set_dgid(struct rdma_dev_addr *dev_addr, - union ib_gid *gid) -{ - memcpy(dev_addr->dst_dev_addr + 4, gid, sizeof *gid); -} - -#endif /* IB_ADDR_H */ diff --git a/include/rdma/ib_cache.h b/include/rdma/ib_cache.h index f179d233f..5bf9834f7 100644 --- a/include/rdma/ib_cache.h +++ b/include/rdma/ib_cache.h @@ -102,17 +102,4 @@ int ib_find_cached_pkey(struct ib_device *device, u16 pkey, u16 *index); -/** - * ib_get_cached_lmc - Returns a cached lmc table entry - * @device: The device to query. - * @port_num: The port number of the device to query. - * @lmc: The lmc value for the specified port for that device. - * - * ib_get_cached_lmc() fetches the specified lmc table entry stored in - * the local software cache. - */ -int ib_get_cached_lmc(struct ib_device *device, - u8 port_num, - u8 *lmc); - #endif /* _IB_CACHE_H */ diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h index c9b4738be..0a9fcd59e 100644 --- a/include/rdma/ib_cm.h +++ b/include/rdma/ib_cm.h @@ -32,7 +32,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * - * $Id: ib_cm.h 4311 2005-12-05 18:42:01Z sean.hefty $ + * $Id: ib_cm.h 2730 2005-06-28 16:43:03Z sean.hefty $ */ #if !defined(IB_CM_H) #define IB_CM_H @@ -102,8 +102,7 @@ enum ib_cm_data_size { IB_CM_APR_INFO_LENGTH = 72, IB_CM_SIDR_REQ_PRIVATE_DATA_SIZE = 216, IB_CM_SIDR_REP_PRIVATE_DATA_SIZE = 136, - IB_CM_SIDR_REP_INFO_LENGTH = 72, - IB_CM_COMPARE_SIZE = 64 + IB_CM_SIDR_REP_INFO_LENGTH = 72 }; struct ib_cm_id; @@ -239,6 +238,7 @@ struct ib_cm_sidr_rep_event_param { u32 qpn; void *info; u8 info_len; + }; struct ib_cm_event { @@ -317,15 +317,6 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id); #define IB_SERVICE_ID_AGN_MASK __constant_cpu_to_be64(0xFF00000000000000ULL) #define IB_CM_ASSIGN_SERVICE_ID __constant_cpu_to_be64(0x0200000000000000ULL) -#define IB_CMA_SERVICE_ID __constant_cpu_to_be64(0x0000000001000000ULL) -#define IB_CMA_SERVICE_ID_MASK __constant_cpu_to_be64(0xFFFFFFFFFF000000ULL) -#define IB_SDP_SERVICE_ID __constant_cpu_to_be64(0x0000000000010000ULL) -#define IB_SDP_SERVICE_ID_MASK __constant_cpu_to_be64(0xFFFFFFFFFFFF0000ULL) - -struct ib_cm_compare_data { - u8 data[IB_CM_COMPARE_SIZE]; - u8 mask[IB_CM_COMPARE_SIZE]; -}; /** * ib_cm_listen - Initiates listening on the specified service ID for @@ -339,12 +330,10 @@ struct ib_cm_compare_data { * range of service IDs. If set to 0, the service ID is matched * exactly. This parameter is ignored if %service_id is set to * IB_CM_ASSIGN_SERVICE_ID. - * @compare_data: This parameter is optional. It specifies data that must - * appear in the private data of a connection request for the specified - * listen request. */ -int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask, - struct ib_cm_compare_data *compare_data); +int ib_cm_listen(struct ib_cm_id *cm_id, + __be64 service_id, + __be64 service_mask); struct ib_cm_req_param { struct ib_sa_path_rec *primary_path; @@ -546,6 +535,7 @@ struct ib_cm_sidr_req_param { const void *private_data; u8 private_data_len; u8 max_cm_retries; + u16 pkey; }; /** @@ -569,7 +559,7 @@ struct ib_cm_sidr_rep_param { }; /** - * ib_send_cm_sidr_rep - Sends a service ID resolution reply to the + * ib_send_cm_sidr_rep - Sends a service ID resolution request to the * remote node. * @cm_id: Communication identifier associated with the received service ID * resolution request. diff --git a/include/rdma/ib_fmr_pool.h b/include/rdma/ib_fmr_pool.h index 00dadbf94..4ace54cd0 100644 --- a/include/rdma/ib_fmr_pool.h +++ b/include/rdma/ib_fmr_pool.h @@ -88,7 +88,7 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool); struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, u64 *page_list, int list_len, - u64 io_virtual_address); + u64 *io_virtual_address); int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr); diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 585d28e96..5ff775580 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h @@ -75,7 +75,6 @@ #define IB_MGMT_METHOD_TRAP_REPRESS 0x07 #define IB_MGMT_METHOD_RESP 0x80 -#define IB_BM_ATTR_MOD_RESP cpu_to_be32(1) #define IB_MGMT_MAX_METHODS 128 @@ -247,12 +246,6 @@ struct ib_mad_send_buf { int retries; }; -/** - * ib_response_mad - Returns if the specified MAD has been generated in - * response to a sent request or trap. - */ -int ib_response_mad(struct ib_mad *mad); - /** * ib_get_rmpp_resptime - Returns the RMPP response time. * @rmpp_hdr: An RMPP header. diff --git a/include/rdma/ib_marshall.h b/include/rdma/ib_marshall.h deleted file mode 100644 index 66bf4d7d0..000000000 --- a/include/rdma/ib_marshall.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined(IB_USER_MARSHALL_H) -#define IB_USER_MARSHALL_H - -#include -#include -#include -#include - -void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst, - struct ib_qp_attr *src); - -void ib_copy_path_rec_to_user(struct ib_user_path_rec *dst, - struct ib_sa_path_rec *src); - -void ib_copy_path_rec_from_user(struct ib_sa_path_rec *dst, - struct ib_user_path_rec *src); - -#endif /* IB_USER_MARSHALL_H */ diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h index c99e4420f..ad63c215e 100644 --- a/include/rdma/ib_sa.h +++ b/include/rdma/ib_sa.h @@ -370,12 +370,5 @@ ib_sa_mcmember_rec_delete(struct ib_device *device, u8 port_num, context, query); } -/** - * ib_init_ah_from_path - Initialize address handle attributes based on an SA - * path record. - */ -int ib_init_ah_from_path(struct ib_device *device, u8 port_num, - struct ib_sa_path_rec *rec, - struct ib_ah_attr *ah_attr); #endif /* IB_SA_H */ diff --git a/include/rdma/ib_smi.h b/include/rdma/ib_smi.h index f29af135b..87f60737f 100644 --- a/include/rdma/ib_smi.h +++ b/include/rdma/ib_smi.h @@ -85,42 +85,6 @@ struct ib_smp { #define IB_SMP_ATTR_LED_INFO __constant_htons(0x0031) #define IB_SMP_ATTR_VENDOR_MASK __constant_htons(0xFF00) -struct ib_port_info { - __be64 mkey; - __be64 gid_prefix; - __be16 lid; - __be16 sm_lid; - __be32 cap_mask; - __be16 diag_code; - __be16 mkey_lease_period; - u8 local_port_num; - u8 link_width_enabled; - u8 link_width_supported; - u8 link_width_active; - u8 linkspeed_portstate; /* 4 bits, 4 bits */ - u8 portphysstate_linkdown; /* 4 bits, 4 bits */ - u8 mkeyprot_resv_lmc; /* 2 bits, 3, 3 */ - u8 linkspeedactive_enabled; /* 4 bits, 4 bits */ - u8 neighbormtu_mastersmsl; /* 4 bits, 4 bits */ - u8 vlcap_inittype; /* 4 bits, 4 bits */ - u8 vl_high_limit; - u8 vl_arb_high_cap; - u8 vl_arb_low_cap; - u8 inittypereply_mtucap; /* 4 bits, 4 bits */ - u8 vlstallcnt_hoqlife; /* 3 bits, 5 bits */ - u8 operationalvl_pei_peo_fpi_fpo; /* 4 bits, 1, 1, 1, 1 */ - __be16 mkey_violations; - __be16 pkey_violations; - __be16 qkey_violations; - u8 guid_cap; - u8 clientrereg_resv_subnetto; /* 1 bit, 2 bits, 5 */ - u8 resv_resptimevalue; /* 3 bits, 5 bits */ - u8 localphyerrors_overrunerrors; /* 4 bits, 4 bits */ - __be16 max_credit_hint; - u8 resv; - u8 link_roundtrip_latency[3]; -}; - static inline u8 ib_get_smp_direction(struct ib_smp *smp) { diff --git a/include/rdma/ib_user_cm.h b/include/rdma/ib_user_cm.h index 066c20b7c..19be11604 100644 --- a/include/rdma/ib_user_cm.h +++ b/include/rdma/ib_user_cm.h @@ -30,13 +30,13 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * - * $Id: ib_user_cm.h 4019 2005-11-11 00:33:09Z sean.hefty $ + * $Id: ib_user_cm.h 2576 2005-06-09 17:00:30Z libor $ */ #ifndef IB_USER_CM_H #define IB_USER_CM_H -#include +#include #define IB_USER_CM_ABI_VERSION 4 @@ -110,6 +110,58 @@ struct ib_ucm_init_qp_attr { __u32 qp_state; }; +struct ib_ucm_ah_attr { + __u8 grh_dgid[16]; + __u32 grh_flow_label; + __u16 dlid; + __u16 reserved; + __u8 grh_sgid_index; + __u8 grh_hop_limit; + __u8 grh_traffic_class; + __u8 sl; + __u8 src_path_bits; + __u8 static_rate; + __u8 is_global; + __u8 port_num; +}; + +struct ib_ucm_init_qp_attr_resp { + __u32 qp_attr_mask; + __u32 qp_state; + __u32 cur_qp_state; + __u32 path_mtu; + __u32 path_mig_state; + __u32 qkey; + __u32 rq_psn; + __u32 sq_psn; + __u32 dest_qp_num; + __u32 qp_access_flags; + + struct ib_ucm_ah_attr ah_attr; + struct ib_ucm_ah_attr alt_ah_attr; + + /* ib_qp_cap */ + __u32 max_send_wr; + __u32 max_recv_wr; + __u32 max_send_sge; + __u32 max_recv_sge; + __u32 max_inline_data; + + __u16 pkey_index; + __u16 alt_pkey_index; + __u8 en_sqd_async_notify; + __u8 sq_draining; + __u8 max_rd_atomic; + __u8 max_dest_rd_atomic; + __u8 min_rnr_timer; + __u8 port_num; + __u8 timeout; + __u8 retry_cnt; + __u8 rnr_retry; + __u8 alt_port_num; + __u8 alt_timeout; +}; + struct ib_ucm_listen { __be64 service_id; __be64 service_mask; @@ -128,6 +180,28 @@ struct ib_ucm_private_data { __u8 reserved[3]; }; +struct ib_ucm_path_rec { + __u8 dgid[16]; + __u8 sgid[16]; + __be16 dlid; + __be16 slid; + __u32 raw_traffic; + __be32 flow_label; + __u32 reversible; + __u32 mtu; + __be16 pkey; + __u8 hop_limit; + __u8 traffic_class; + __u8 numb_path; + __u8 sl; + __u8 mtu_selector; + __u8 rate_selector; + __u8 rate; + __u8 packet_life_time_selector; + __u8 packet_life_time; + __u8 preference; +}; + struct ib_ucm_req { __u32 id; __u32 qpn; @@ -200,7 +274,7 @@ struct ib_ucm_sidr_req { __be64 sid; __u64 data; __u64 path; - __u16 reserved_pkey; + __u16 pkey; __u8 len; __u8 max_cm_retries; __u8 reserved[4]; @@ -230,8 +304,8 @@ struct ib_ucm_event_get { }; struct ib_ucm_req_event_resp { - struct ib_user_path_rec primary_path; - struct ib_user_path_rec alternate_path; + struct ib_ucm_path_rec primary_path; + struct ib_ucm_path_rec alternate_path; __be64 remote_ca_guid; __u32 remote_qkey; __u32 remote_qpn; @@ -275,7 +349,7 @@ struct ib_ucm_mra_event_resp { }; struct ib_ucm_lap_event_resp { - struct ib_user_path_rec path; + struct ib_ucm_path_rec path; }; struct ib_ucm_apr_event_resp { diff --git a/include/rdma/ib_user_sa.h b/include/rdma/ib_user_sa.h deleted file mode 100644 index 659120157..000000000 --- a/include/rdma/ib_user_sa.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef IB_USER_SA_H -#define IB_USER_SA_H - -#include - -struct ib_user_path_rec { - __u8 dgid[16]; - __u8 sgid[16]; - __be16 dlid; - __be16 slid; - __u32 raw_traffic; - __be32 flow_label; - __u32 reversible; - __u32 mtu; - __be16 pkey; - __u8 hop_limit; - __u8 traffic_class; - __u8 numb_path; - __u8 sl; - __u8 mtu_selector; - __u8 rate_selector; - __u8 rate; - __u8 packet_life_time_selector; - __u8 packet_life_time; - __u8 preference; -}; - -#endif /* IB_USER_SA_H */ diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h index 7b5372010..338ed4333 100644 --- a/include/rdma/ib_user_verbs.h +++ b/include/rdma/ib_user_verbs.h @@ -32,7 +32,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * - * $Id: ib_user_verbs.h 4019 2005-11-11 00:33:09Z sean.hefty $ + * $Id: ib_user_verbs.h 2708 2005-06-24 17:27:21Z roland $ */ #ifndef IB_USER_VERBS_H @@ -323,64 +323,6 @@ struct ib_uverbs_destroy_cq_resp { __u32 async_events_reported; }; -struct ib_uverbs_global_route { - __u8 dgid[16]; - __u32 flow_label; - __u8 sgid_index; - __u8 hop_limit; - __u8 traffic_class; - __u8 reserved; -}; - -struct ib_uverbs_ah_attr { - struct ib_uverbs_global_route grh; - __u16 dlid; - __u8 sl; - __u8 src_path_bits; - __u8 static_rate; - __u8 is_global; - __u8 port_num; - __u8 reserved; -}; - -struct ib_uverbs_qp_attr { - __u32 qp_attr_mask; - __u32 qp_state; - __u32 cur_qp_state; - __u32 path_mtu; - __u32 path_mig_state; - __u32 qkey; - __u32 rq_psn; - __u32 sq_psn; - __u32 dest_qp_num; - __u32 qp_access_flags; - - struct ib_uverbs_ah_attr ah_attr; - struct ib_uverbs_ah_attr alt_ah_attr; - - /* ib_qp_cap */ - __u32 max_send_wr; - __u32 max_recv_wr; - __u32 max_send_sge; - __u32 max_recv_sge; - __u32 max_inline_data; - - __u16 pkey_index; - __u16 alt_pkey_index; - __u8 en_sqd_async_notify; - __u8 sq_draining; - __u8 max_rd_atomic; - __u8 max_dest_rd_atomic; - __u8 min_rnr_timer; - __u8 port_num; - __u8 timeout; - __u8 retry_cnt; - __u8 rnr_retry; - __u8 alt_port_num; - __u8 alt_timeout; - __u8 reserved[5]; -}; - struct ib_uverbs_create_qp { __u64 response; __u64 user_handle; @@ -599,6 +541,26 @@ struct ib_uverbs_post_srq_recv_resp { __u32 bad_wr; }; +struct ib_uverbs_global_route { + __u8 dgid[16]; + __u32 flow_label; + __u8 sgid_index; + __u8 hop_limit; + __u8 traffic_class; + __u8 reserved; +}; + +struct ib_uverbs_ah_attr { + struct ib_uverbs_global_route grh; + __u16 dlid; + __u8 sl; + __u8 src_path_bits; + __u8 static_rate; + __u8 is_global; + __u8 port_num; + __u8 reserved; +}; + struct ib_uverbs_create_ah { __u64 response; __u64 user_handle; diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index ee1f3a355..6bbf1b364 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -260,8 +260,7 @@ enum ib_event_type { IB_EVENT_SM_CHANGE, IB_EVENT_SRQ_ERR, IB_EVENT_SRQ_LIMIT_REACHED, - IB_EVENT_QP_LAST_WQE_REACHED, - IB_EVENT_CLIENT_REREGISTER + IB_EVENT_QP_LAST_WQE_REACHED }; struct ib_event { @@ -697,12 +696,8 @@ struct ib_ucontext { struct ib_uobject { u64 user_handle; /* handle given to us by userspace */ struct ib_ucontext *context; /* associated user context */ - void *object; /* containing object */ struct list_head list; /* link to context's list */ u32 id; /* index into kernel idr */ - struct kref ref; - struct rw_semaphore mutex; /* protects .live */ - int live; }; struct ib_umem { @@ -832,7 +827,6 @@ struct ib_cache { struct ib_event_handler event_handler; struct ib_pkey_cache **pkey_cache; struct ib_gid_cache **gid_cache; - u8 *lmc_cache; }; struct ib_device { @@ -1091,20 +1085,6 @@ int ib_dealloc_pd(struct ib_pd *pd); */ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr); -/** - * ib_init_ah_from_wc - Initializes address handle attributes from a - * work completion. - * @device: Device on which the received message arrived. - * @port_num: Port on which the received message arrived. - * @wc: Work completion associated with the received message. - * @grh: References the received global route header. This parameter is - * ignored unless the work completion indicates that the GRH is valid. - * @ah_attr: Returned attributes that can be used when creating an address - * handle for replying to the message. - */ -int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc *wc, - struct ib_grh *grh, struct ib_ah_attr *ah_attr); - /** * ib_create_ah_from_wc - Creates an address handle associated with the * sender of the specified work completion. diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h deleted file mode 100644 index 402c63d72..000000000 --- a/include/rdma/rdma_cm.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Copyright (c) 2005 Voltaire Inc. All rights reserved. - * Copyright (c) 2005 Intel Corporation. All rights reserved. - * - * This Software is licensed under one of the following licenses: - * - * 1) under the terms of the "Common Public License 1.0" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/cpl.php. - * - * 2) under the terms of the "The BSD License" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/bsd-license.php. - * - * 3) under the terms of the "GNU General Public License (GPL) Version 2" a - * copy of which is available from the Open Source Initiative, see - * http://www.opensource.org/licenses/gpl-license.php. - * - * Licensee has the right to choose one of the above licenses. - * - * Redistributions of source code must retain the above copyright - * notice and one of the license notices. - * - * Redistributions in binary form must reproduce both the above copyright - * notice, one of the license notices in the documentation - * and/or other materials provided with the distribution. - * - */ - -#if !defined(RDMA_CM_H) -#define RDMA_CM_H - -#include -#include -#include -#include - -/* - * Upon receiving a device removal event, users must destroy the associated - * RDMA identifier and release all resources allocated with the device. - */ -enum rdma_cm_event_type { - RDMA_CM_EVENT_ADDR_RESOLVED, - RDMA_CM_EVENT_ADDR_ERROR, - RDMA_CM_EVENT_ROUTE_RESOLVED, - RDMA_CM_EVENT_ROUTE_ERROR, - RDMA_CM_EVENT_CONNECT_REQUEST, - RDMA_CM_EVENT_CONNECT_RESPONSE, - RDMA_CM_EVENT_CONNECT_ERROR, - RDMA_CM_EVENT_UNREACHABLE, - RDMA_CM_EVENT_REJECTED, - RDMA_CM_EVENT_ESTABLISHED, - RDMA_CM_EVENT_DISCONNECTED, - RDMA_CM_EVENT_DEVICE_REMOVAL, -}; - -enum rdma_port_space { - RDMA_PS_SDP = 0x0001, - RDMA_PS_TCP = 0x0106, - RDMA_PS_UDP = 0x0111, - RDMA_PS_SCTP = 0x0183 -}; - -struct rdma_addr { - struct sockaddr src_addr; - u8 src_pad[sizeof(struct sockaddr_in6) - - sizeof(struct sockaddr)]; - struct sockaddr dst_addr; - u8 dst_pad[sizeof(struct sockaddr_in6) - - sizeof(struct sockaddr)]; - struct rdma_dev_addr dev_addr; -}; - -struct rdma_route { - struct rdma_addr addr; - struct ib_sa_path_rec *path_rec; - int num_paths; -}; - -struct rdma_cm_event { - enum rdma_cm_event_type event; - int status; - void *private_data; - u8 private_data_len; -}; - -struct rdma_cm_id; - -/** - * rdma_cm_event_handler - Callback used to report user events. - * - * Notes: Users may not call rdma_destroy_id from this callback to destroy - * the passed in id, or a corresponding listen id. Returning a - * non-zero value from the callback will destroy the passed in id. - */ -typedef int (*rdma_cm_event_handler)(struct rdma_cm_id *id, - struct rdma_cm_event *event); - -struct rdma_cm_id { - struct ib_device *device; - void *context; - struct ib_qp *qp; - rdma_cm_event_handler event_handler; - struct rdma_route route; - enum rdma_port_space ps; - u8 port_num; -}; - -/** - * rdma_create_id - Create an RDMA identifier. - * - * @event_handler: User callback invoked to report events associated with the - * returned rdma_id. - * @context: User specified context associated with the id. - * @ps: RDMA port space. - */ -struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler, - void *context, enum rdma_port_space ps); - -void rdma_destroy_id(struct rdma_cm_id *id); - -/** - * rdma_bind_addr - Bind an RDMA identifier to a source address and - * associated RDMA device, if needed. - * - * @id: RDMA identifier. - * @addr: Local address information. Wildcard values are permitted. - * - * This associates a source address with the RDMA identifier before calling - * rdma_listen. If a specific local address is given, the RDMA identifier will - * be bound to a local RDMA device. - */ -int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr); - -/** - * rdma_resolve_addr - Resolve destination and optional source addresses - * from IP addresses to an RDMA address. If successful, the specified - * rdma_cm_id will be bound to a local device. - * - * @id: RDMA identifier. - * @src_addr: Source address information. This parameter may be NULL. - * @dst_addr: Destination address information. - * @timeout_ms: Time to wait for resolution to complete. - */ -int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr, - struct sockaddr *dst_addr, int timeout_ms); - -/** - * rdma_resolve_route - Resolve the RDMA address bound to the RDMA identifier - * into route information needed to establish a connection. - * - * This is called on the client side of a connection. - * Users must have first called rdma_resolve_addr to resolve a dst_addr - * into an RDMA address before calling this routine. - */ -int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms); - -/** - * rdma_create_qp - Allocate a QP and associate it with the specified RDMA - * identifier. - * - * QPs allocated to an rdma_cm_id will automatically be transitioned by the CMA - * through their states. - */ -int rdma_create_qp(struct rdma_cm_id *id, struct ib_pd *pd, - struct ib_qp_init_attr *qp_init_attr); - -/** - * rdma_destroy_qp - Deallocate the QP associated with the specified RDMA - * identifier. - * - * Users must destroy any QP associated with an RDMA identifier before - * destroying the RDMA ID. - */ -void rdma_destroy_qp(struct rdma_cm_id *id); - -/** - * rdma_init_qp_attr - Initializes the QP attributes for use in transitioning - * to a specified QP state. - * @id: Communication identifier associated with the QP attributes to - * initialize. - * @qp_attr: On input, specifies the desired QP state. On output, the - * mandatory and desired optional attributes will be set in order to - * modify the QP to the specified state. - * @qp_attr_mask: The QP attribute mask that may be used to transition the - * QP to the specified state. - * - * Users must set the @qp_attr->qp_state to the desired QP state. This call - * will set all required attributes for the given transition, along with - * known optional attributes. Users may override the attributes returned from - * this call before calling ib_modify_qp. - * - * Users that wish to have their QP automatically transitioned through its - * states can associate a QP with the rdma_cm_id by calling rdma_create_qp(). - */ -int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr, - int *qp_attr_mask); - -struct rdma_conn_param { - const void *private_data; - u8 private_data_len; - u8 responder_resources; - u8 initiator_depth; - u8 flow_control; - u8 retry_count; /* ignored when accepting */ - u8 rnr_retry_count; - /* Fields below ignored if a QP is created on the rdma_cm_id. */ - u8 srq; - u32 qp_num; - enum ib_qp_type qp_type; -}; - -/** - * rdma_connect - Initiate an active connection request. - * - * Users must have resolved a route for the rdma_cm_id to connect with - * by having called rdma_resolve_route before calling this routine. - */ -int rdma_connect(struct rdma_cm_id *id, struct rdma_conn_param *conn_param); - -/** - * rdma_listen - This function is called by the passive side to - * listen for incoming connection requests. - * - * Users must have bound the rdma_cm_id to a local address by calling - * rdma_bind_addr before calling this routine. - */ -int rdma_listen(struct rdma_cm_id *id, int backlog); - -/** - * rdma_accept - Called to accept a connection request or response. - * @id: Connection identifier associated with the request. - * @conn_param: Information needed to establish the connection. This must be - * provided if accepting a connection request. If accepting a connection - * response, this parameter must be NULL. - * - * Typically, this routine is only called by the listener to accept a connection - * request. It must also be called on the active side of a connection if the - * user is performing their own QP transitions. - */ -int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param); - -/** - * rdma_reject - Called to reject a connection request or response. - */ -int rdma_reject(struct rdma_cm_id *id, const void *private_data, - u8 private_data_len); - -/** - * rdma_disconnect - This function disconnects the associated QP and - * transitions it into the error state. - */ -int rdma_disconnect(struct rdma_cm_id *id); - -#endif /* RDMA_CM_H */ - diff --git a/include/rdma/rdma_cm_ib.h b/include/rdma/rdma_cm_ib.h deleted file mode 100644 index e8c3af180..000000000 --- a/include/rdma/rdma_cm_ib.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2006 Intel Corporation. All rights reserved. - * - * This Software is licensed under one of the following licenses: - * - * 1) under the terms of the "Common Public License 1.0" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/cpl.php. - * - * 2) under the terms of the "The BSD License" a copy of which is - * available from the Open Source Initiative, see - * http://www.opensource.org/licenses/bsd-license.php. - * - * 3) under the terms of the "GNU General Public License (GPL) Version 2" a - * copy of which is available from the Open Source Initiative, see - * http://www.opensource.org/licenses/gpl-license.php. - * - * Licensee has the right to choose one of the above licenses. - * - * Redistributions of source code must retain the above copyright - * notice and one of the license notices. - * - * Redistributions in binary form must reproduce both the above copyright - * notice, one of the license notices in the documentation - * and/or other materials provided with the distribution. - * - */ - -#if !defined(RDMA_CM_IB_H) -#define RDMA_CM_IB_H - -#include - -/** - * rdma_set_ib_paths - Manually sets the path records used to establish a - * connection. - * @id: Connection identifier associated with the request. - * @path_rec: Reference to the path record - * - * This call permits a user to specify routing information for rdma_cm_id's - * bound to Infiniband devices. It is called on the client side of a - * connection and replaces the call to rdma_resolve_route. - */ -int rdma_set_ib_paths(struct rdma_cm_id *id, - struct ib_sa_path_rec *path_rec, int num_paths); - -#endif /* RDMA_CM_IB_H */ diff --git a/include/scsi/Kbuild b/include/scsi/Kbuild deleted file mode 100644 index 744f85011..000000000 --- a/include/scsi/Kbuild +++ /dev/null @@ -1,4 +0,0 @@ -header-y += scsi.h - -unifdef-y += scsi_ioctl.h -unifdef-y += sg.h diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 55ebf035e..e5618b909 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h @@ -43,23 +43,10 @@ enum iscsi_uevent_e { ISCSI_UEVENT_GET_STATS = UEVENT_BASE + 10, ISCSI_UEVENT_GET_PARAM = UEVENT_BASE + 11, - ISCSI_UEVENT_TRANSPORT_EP_CONNECT = UEVENT_BASE + 12, - ISCSI_UEVENT_TRANSPORT_EP_POLL = UEVENT_BASE + 13, - ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT = UEVENT_BASE + 14, - - ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, - /* up events */ ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, ISCSI_KEVENT_CONN_ERROR = KEVENT_BASE + 2, ISCSI_KEVENT_IF_ERROR = KEVENT_BASE + 3, - ISCSI_KEVENT_DESTROY_SESSION = KEVENT_BASE + 4, -}; - -enum iscsi_tgt_dscvr { - ISCSI_TGT_DSCVR_SEND_TARGETS = 1, - ISCSI_TGT_DSCVR_ISNS = 2, - ISCSI_TGT_DSCVR_SLP = 3, }; struct iscsi_uevent { @@ -73,98 +60,61 @@ struct iscsi_uevent { uint32_t initial_cmdsn; } c_session; struct msg_destroy_session { + uint64_t session_handle; uint32_t sid; } d_session; struct msg_create_conn { - uint32_t sid; + uint64_t session_handle; uint32_t cid; + uint32_t sid; } c_conn; struct msg_bind_conn { - uint32_t sid; - uint32_t cid; - uint64_t transport_eph; + uint64_t session_handle; + uint64_t conn_handle; + uint32_t transport_fd; uint32_t is_leading; } b_conn; struct msg_destroy_conn { - uint32_t sid; + uint64_t conn_handle; uint32_t cid; } d_conn; struct msg_send_pdu { - uint32_t sid; - uint32_t cid; uint32_t hdr_size; uint32_t data_size; + uint64_t conn_handle; } send_pdu; struct msg_set_param { - uint32_t sid; - uint32_t cid; + uint64_t conn_handle; uint32_t param; /* enum iscsi_param */ - uint32_t len; + uint32_t value; } set_param; struct msg_start_conn { - uint32_t sid; - uint32_t cid; + uint64_t conn_handle; } start_conn; struct msg_stop_conn { - uint32_t sid; - uint32_t cid; uint64_t conn_handle; uint32_t flag; } stop_conn; struct msg_get_stats { - uint32_t sid; - uint32_t cid; + uint64_t conn_handle; } get_stats; - struct msg_transport_connect { - uint32_t non_blocking; - } ep_connect; - struct msg_transport_poll { - uint64_t ep_handle; - uint32_t timeout_ms; - } ep_poll; - struct msg_transport_disconnect { - uint64_t ep_handle; - } ep_disconnect; - struct msg_tgt_dscvr { - enum iscsi_tgt_dscvr type; - uint32_t host_no; - /* - * enable = 1 to establish a new connection - * with the server. enable = 0 to disconnect - * from the server. Used primarily to switch - * from one iSNS server to another. - */ - uint32_t enable; - } tgt_dscvr; } u; union { /* messages k -> u */ + uint64_t handle; int retcode; struct msg_create_session_ret { + uint64_t session_handle; uint32_t sid; - uint32_t host_no; } c_session_ret; - struct msg_create_conn_ret { - uint32_t sid; - uint32_t cid; - } c_conn_ret; struct msg_recv_req { - uint32_t sid; - uint32_t cid; uint64_t recv_handle; + uint64_t conn_handle; } recv_req; struct msg_conn_error { - uint32_t sid; - uint32_t cid; + uint64_t conn_handle; uint32_t error; /* enum iscsi_err */ } connerror; - struct msg_session_destroyed { - uint32_t host_no; - uint32_t sid; - } d_session; - struct msg_transport_connect_ret { - uint64_t handle; - } ep_connect_ret; } r; } __attribute__ ((aligned (sizeof(uint64_t)))); @@ -189,66 +139,29 @@ enum iscsi_err { ISCSI_ERR_SESSION_FAILED = ISCSI_ERR_BASE + 13, ISCSI_ERR_HDR_DGST = ISCSI_ERR_BASE + 14, ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15, - ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16, - ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17, + ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16 }; /* * iSCSI Parameters (RFC3720) */ enum iscsi_param { - /* passed in using netlink set param */ - ISCSI_PARAM_MAX_RECV_DLENGTH, - ISCSI_PARAM_MAX_XMIT_DLENGTH, - ISCSI_PARAM_HDRDGST_EN, - ISCSI_PARAM_DATADGST_EN, - ISCSI_PARAM_INITIAL_R2T_EN, - ISCSI_PARAM_MAX_R2T, - ISCSI_PARAM_IMM_DATA_EN, - ISCSI_PARAM_FIRST_BURST, - ISCSI_PARAM_MAX_BURST, - ISCSI_PARAM_PDU_INORDER_EN, - ISCSI_PARAM_DATASEQ_INORDER_EN, - ISCSI_PARAM_ERL, - ISCSI_PARAM_IFMARKER_EN, - ISCSI_PARAM_OFMARKER_EN, - ISCSI_PARAM_EXP_STATSN, - ISCSI_PARAM_TARGET_NAME, - ISCSI_PARAM_TPGT, - ISCSI_PARAM_PERSISTENT_ADDRESS, - ISCSI_PARAM_PERSISTENT_PORT, - ISCSI_PARAM_SESS_RECOVERY_TMO, - - /* pased in through bind conn using transport_fd */ - ISCSI_PARAM_CONN_PORT, - ISCSI_PARAM_CONN_ADDRESS, - - /* must always be last */ - ISCSI_PARAM_MAX, + ISCSI_PARAM_MAX_RECV_DLENGTH = 0, + ISCSI_PARAM_MAX_XMIT_DLENGTH = 1, + ISCSI_PARAM_HDRDGST_EN = 2, + ISCSI_PARAM_DATADGST_EN = 3, + ISCSI_PARAM_INITIAL_R2T_EN = 4, + ISCSI_PARAM_MAX_R2T = 5, + ISCSI_PARAM_IMM_DATA_EN = 6, + ISCSI_PARAM_FIRST_BURST = 7, + ISCSI_PARAM_MAX_BURST = 8, + ISCSI_PARAM_PDU_INORDER_EN = 9, + ISCSI_PARAM_DATASEQ_INORDER_EN = 10, + ISCSI_PARAM_ERL = 11, + ISCSI_PARAM_IFMARKER_EN = 12, + ISCSI_PARAM_OFMARKER_EN = 13, }; - -#define ISCSI_MAX_RECV_DLENGTH (1 << ISCSI_PARAM_MAX_RECV_DLENGTH) -#define ISCSI_MAX_XMIT_DLENGTH (1 << ISCSI_PARAM_MAX_XMIT_DLENGTH) -#define ISCSI_HDRDGST_EN (1 << ISCSI_PARAM_HDRDGST_EN) -#define ISCSI_DATADGST_EN (1 << ISCSI_PARAM_DATADGST_EN) -#define ISCSI_INITIAL_R2T_EN (1 << ISCSI_PARAM_INITIAL_R2T_EN) -#define ISCSI_MAX_R2T (1 << ISCSI_PARAM_MAX_R2T) -#define ISCSI_IMM_DATA_EN (1 << ISCSI_PARAM_IMM_DATA_EN) -#define ISCSI_FIRST_BURST (1 << ISCSI_PARAM_FIRST_BURST) -#define ISCSI_MAX_BURST (1 << ISCSI_PARAM_MAX_BURST) -#define ISCSI_PDU_INORDER_EN (1 << ISCSI_PARAM_PDU_INORDER_EN) -#define ISCSI_DATASEQ_INORDER_EN (1 << ISCSI_PARAM_DATASEQ_INORDER_EN) -#define ISCSI_ERL (1 << ISCSI_PARAM_ERL) -#define ISCSI_IFMARKER_EN (1 << ISCSI_PARAM_IFMARKER_EN) -#define ISCSI_OFMARKER_EN (1 << ISCSI_PARAM_OFMARKER_EN) -#define ISCSI_EXP_STATSN (1 << ISCSI_PARAM_EXP_STATSN) -#define ISCSI_TARGET_NAME (1 << ISCSI_PARAM_TARGET_NAME) -#define ISCSI_TPGT (1 << ISCSI_PARAM_TPGT) -#define ISCSI_PERSISTENT_ADDRESS (1 << ISCSI_PARAM_PERSISTENT_ADDRESS) -#define ISCSI_PERSISTENT_PORT (1 << ISCSI_PARAM_PERSISTENT_PORT) -#define ISCSI_SESS_RECOVERY_TMO (1 << ISCSI_PARAM_SESS_RECOVERY_TMO) -#define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) -#define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) +#define ISCSI_PARAM_MAX 14 #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h index 02f6e4b9e..4feda05fd 100644 --- a/include/scsi/iscsi_proto.h +++ b/include/scsi/iscsi_proto.h @@ -21,6 +21,8 @@ #ifndef ISCSI_PROTO_H #define ISCSI_PROTO_H +#define ISCSI_VERSION_STR "0.3" +#define ISCSI_DATE_STR "22-Apr-2005" #define ISCSI_DRAFT20_VERSION 0x00 /* default iSCSI listen port for incoming connections */ diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h deleted file mode 100644 index 41904f611..000000000 --- a/include/scsi/libiscsi.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * iSCSI lib definitions - * - * Copyright (C) 2006 Red Hat, Inc. All rights reserved. - * Copyright (C) 2004 - 2006 Mike Christie - * Copyright (C) 2004 - 2005 Dmitry Yusupov - * Copyright (C) 2004 - 2005 Alex Aizman - * - * 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 LIBISCSI_H -#define LIBISCSI_H - -#include -#include -#include -#include - -struct scsi_transport_template; -struct scsi_device; -struct Scsi_Host; -struct scsi_cmnd; -struct socket; -struct iscsi_transport; -struct iscsi_cls_session; -struct iscsi_cls_conn; -struct iscsi_session; -struct iscsi_nopin; - -/* #define DEBUG_SCSI */ -#ifdef DEBUG_SCSI -#define debug_scsi(fmt...) printk(KERN_INFO "iscsi: " fmt) -#else -#define debug_scsi(fmt...) -#endif - -#define ISCSI_XMIT_CMDS_MAX 128 /* must be power of 2 */ -#define ISCSI_MGMT_CMDS_MAX 32 /* must be power of 2 */ -#define ISCSI_CONN_MAX 1 - -#define ISCSI_MGMT_ITT_OFFSET 0xa00 - -#define ISCSI_DEF_CMD_PER_LUN 32 -#define ISCSI_MAX_CMD_PER_LUN 128 - -/* Task Mgmt states */ -#define TMABORT_INITIAL 0x0 -#define TMABORT_SUCCESS 0x1 -#define TMABORT_FAILED 0x2 -#define TMABORT_TIMEDOUT 0x3 -#define TMABORT_NOT_FOUND 0x4 - -/* Connection suspend "bit" */ -#define ISCSI_SUSPEND_BIT 1 - -#define ISCSI_ITT_MASK (0xfff) -#define ISCSI_CID_SHIFT 12 -#define ISCSI_CID_MASK (0xffff << ISCSI_CID_SHIFT) -#define ISCSI_AGE_SHIFT 28 -#define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT) - -struct iscsi_mgmt_task { - /* - * Becuae LLDs allocate their hdr differently, this is a pointer to - * that storage. It must be setup at session creation time. - */ - struct iscsi_hdr *hdr; - char *data; /* mgmt payload */ - int data_count; /* counts data to be sent */ - uint32_t itt; /* this ITT */ - void *dd_data; /* driver/transport data */ - struct list_head running; -}; - -enum { - ISCSI_TASK_COMPLETED, - ISCSI_TASK_PENDING, - ISCSI_TASK_RUNNING, -}; - -struct iscsi_cmd_task { - /* - * Becuae LLDs allocate their hdr differently, this is a pointer to - * that storage. It must be setup at session creation time. - */ - struct iscsi_cmd *hdr; - int itt; /* this ITT */ - int datasn; /* DataSN */ - - uint32_t unsol_datasn; - int imm_count; /* imm-data (bytes) */ - int unsol_count; /* unsolicited (bytes)*/ - int data_count; /* remaining Data-Out */ - struct scsi_cmnd *sc; /* associated SCSI cmd*/ - int total_length; - struct iscsi_conn *conn; /* used connection */ - struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ - - /* state set/tested under session->lock */ - int state; - struct list_head running; /* running cmd list */ - void *dd_data; /* driver/transport data */ -}; - -struct iscsi_conn { - struct iscsi_cls_conn *cls_conn; /* ptr to class connection */ - void *dd_data; /* iscsi_transport data */ - struct iscsi_session *session; /* parent session */ - /* - * LLDs should set this lock. It protects the transport recv - * code - */ - rwlock_t *recv_lock; - /* - * conn_stop() flag: stop to recover, stop to terminate - */ - int stop_stage; - - /* iSCSI connection-wide sequencing */ - uint32_t exp_statsn; - - /* control data */ - int id; /* CID */ - struct list_head item; /* maintains list of conns */ - int c_stage; /* connection state */ - /* - * Preallocated buffer for pdus that have data but do not - * originate from scsi-ml. We never have two pdus using the - * buffer at the same time. It is only allocated to - * the default max recv size because the pdus we support - * should always fit in this buffer - */ - char *data; - struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ - struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ - struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ - - /* xmit */ - struct kfifo *immqueue; /* immediate xmit queue */ - struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ - struct list_head mgmt_run_list; /* list of control tasks */ - struct list_head xmitqueue; /* data-path cmd queue */ - struct list_head run_list; /* list of cmds in progress */ - struct work_struct xmitwork; /* per-conn. xmit workqueue */ - /* - * serializes connection xmit, access to kfifos: - * xmitqueue, immqueue, mgmtqueue - */ - struct mutex xmitmutex; - - unsigned long suspend_tx; /* suspend Tx */ - unsigned long suspend_rx; /* suspend Rx */ - - /* abort */ - wait_queue_head_t ehwait; /* used in eh_abort() */ - struct iscsi_tm tmhdr; - struct timer_list tmabort_timer; - int tmabort_state; /* see TMABORT_INITIAL, etc.*/ - - /* negotiated params */ - int max_recv_dlength; /* initiator_max_recv_dsl*/ - int max_xmit_dlength; /* target_max_recv_dsl */ - int hdrdgst_en; - int datadgst_en; - int ifmarker_en; - int ofmarker_en; - /* values userspace uses to id a conn */ - int persistent_port; - char *persistent_address; - - /* MIB-statistics */ - uint64_t txdata_octets; - uint64_t rxdata_octets; - uint32_t scsicmd_pdus_cnt; - uint32_t dataout_pdus_cnt; - uint32_t scsirsp_pdus_cnt; - uint32_t datain_pdus_cnt; - uint32_t r2t_pdus_cnt; - uint32_t tmfcmd_pdus_cnt; - int32_t tmfrsp_pdus_cnt; - - /* custom statistics */ - uint32_t eh_abort_cnt; -}; - -struct iscsi_queue { - struct kfifo *queue; /* FIFO Queue */ - void **pool; /* Pool of elements */ - int max; /* Max number of elements */ -}; - -struct iscsi_session { - /* iSCSI session-wide sequencing */ - uint32_t cmdsn; - uint32_t exp_cmdsn; - uint32_t max_cmdsn; - - /* configuration */ - int initial_r2t_en; - int max_r2t; - int imm_data_en; - int first_burst; - int max_burst; - int time2wait; - int time2retain; - int pdu_inorder_en; - int dataseq_inorder_en; - int erl; - int tpgt; - char *targetname; - - /* control data */ - struct iscsi_transport *tt; - struct Scsi_Host *host; - struct iscsi_conn *leadconn; /* leading connection */ - spinlock_t lock; /* protects session state, * - * sequence numbers, * - * session resources: * - * - cmdpool, * - * - mgmtpool, * - * - r2tpool */ - int state; /* session state */ - struct list_head item; - int age; /* counts session re-opens */ - - struct list_head connections; /* list of connections */ - int cmds_max; /* size of cmds array */ - struct iscsi_cmd_task **cmds; /* Original Cmds arr */ - struct iscsi_queue cmdpool; /* PDU's pool */ - int mgmtpool_max; /* size of mgmt array */ - struct iscsi_mgmt_task **mgmt_cmds; /* Original mgmt arr */ - struct iscsi_queue mgmtpool; /* Mgmt PDU's pool */ -}; - -/* - * scsi host template - */ -extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); -extern int iscsi_eh_abort(struct scsi_cmnd *sc); -extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); -extern int iscsi_queuecommand(struct scsi_cmnd *sc, - void (*done)(struct scsi_cmnd *)); - -/* - * session management - */ -extern struct iscsi_cls_session * -iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, - int, int, uint32_t, uint32_t *); -extern void iscsi_session_teardown(struct iscsi_cls_session *); -extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); -extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); -extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf, int buflen); -extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session, - enum iscsi_param param, char *buf); - -#define session_to_cls(_sess) \ - hostdata_session(_sess->host->hostdata) - -/* - * connection management - */ -extern struct iscsi_cls_conn *iscsi_conn_setup(struct iscsi_cls_session *, - uint32_t); -extern void iscsi_conn_teardown(struct iscsi_cls_conn *); -extern int iscsi_conn_start(struct iscsi_cls_conn *); -extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); -extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, - int); -extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); -extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, - enum iscsi_param param, char *buf); - -/* - * pdu and task processing - */ -extern int iscsi_check_assign_cmdsn(struct iscsi_session *, - struct iscsi_nopin *); -extern void iscsi_prep_unsolicit_data_pdu(struct iscsi_cmd_task *, - struct iscsi_data *hdr, - int transport_data_cnt); -extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, struct iscsi_hdr *, - char *, uint32_t); -extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, - char *, int); -extern int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, - char *, int); -extern int iscsi_verify_itt(struct iscsi_conn *, struct iscsi_hdr *, - uint32_t *); - -/* - * generic helpers - */ -extern void iscsi_pool_free(struct iscsi_queue *, void **); -extern int iscsi_pool_init(struct iscsi_queue *, int, void ***, int); - -#endif diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 58e6444ee..1ace1b9fe 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -9,6 +9,7 @@ struct request; struct scatterlist; struct scsi_device; +struct scsi_request; /* embedded in scsi_cmnd */ @@ -28,8 +29,13 @@ struct scsi_pointer { }; struct scsi_cmnd { + int sc_magic; + struct scsi_device *device; + struct scsi_request *sc_request; + struct list_head list; /* scsi_cmnd participates in queue lists */ + struct list_head eh_entry; /* entry for the host eh_cmd_q */ int eh_eflags; /* Used by error handlr */ void (*done) (struct scsi_cmnd *); /* Mid-level done function */ @@ -58,7 +64,9 @@ struct scsi_cmnd { int timeout_per_command; unsigned char cmd_len; + unsigned char old_cmd_len; enum dma_data_direction sc_data_direction; + enum dma_data_direction sc_old_data_direction; /* These elements define the operation we are about to perform */ #define MAX_COMMAND_SIZE 16 @@ -69,11 +77,18 @@ struct scsi_cmnd { void *request_buffer; /* Actual requested buffer */ /* These elements define the operation we ultimately want to perform */ + unsigned char data_cmnd[MAX_COMMAND_SIZE]; + unsigned short old_use_sg; /* We save use_sg here when requesting + * sense info */ unsigned short use_sg; /* Number of pieces of scatter-gather */ unsigned short sglist_len; /* size of malloc'd scatter-gather list */ + unsigned bufflen; /* Size of data buffer */ + void *buffer; /* Data buffer */ unsigned underflow; /* Return error if less than this amount is transferred */ + unsigned old_underflow; /* save underflow here when reusing the + * command for error handling */ unsigned transfersize; /* How much we are guaranteed to transfer with each SCSI transfer @@ -134,12 +149,7 @@ struct scsi_cmnd { extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern void scsi_put_command(struct scsi_cmnd *); -extern void scsi_io_completion(struct scsi_cmnd *, unsigned int); +extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_finish_command(struct scsi_cmnd *cmd); -extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd); - -extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, - size_t *offset, size_t *len); -extern void scsi_kunmap_atomic_sg(void *virt); #endif /* _SCSI_SCSI_CMND_H */ diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index 3bbbfbe8c..4d69dee66 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h @@ -2,12 +2,14 @@ #define _SCSI_SCSI_DBG_H struct scsi_cmnd; +struct scsi_request; struct scsi_sense_hdr; extern void scsi_print_command(struct scsi_cmnd *); extern void scsi_print_sense_hdr(const char *, struct scsi_sense_hdr *); extern void __scsi_print_command(unsigned char *); extern void scsi_print_sense(const char *, struct scsi_cmnd *); +extern void scsi_print_req_sense(const char *, struct scsi_request *); extern void __scsi_print_sense(const char *name, const unsigned char *sense_buffer, int sense_len); diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index b4ddd3b18..d31b16d25 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -29,5 +29,4 @@ #define BLIST_SELECT_NO_ATN 0x200000 /* select without ATN */ #define BLIST_RETRY_HWERROR 0x400000 /* retry HARDWARE_ERROR */ #define BLIST_MAX_512 0x800000 /* maximum 512 sector cdb length */ -#define BLIST_ATTACH_PQ3 0x1000000 /* Scan: Attach to PQ3 devices */ #endif diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index c5c0f6762..d160880b2 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -3,6 +3,7 @@ struct scsi_cmnd; struct scsi_device; +struct scsi_request; struct Scsi_Host; /* @@ -42,6 +43,8 @@ extern void scsi_report_device_reset(struct Scsi_Host *, int, int); extern int scsi_block_when_processing_errors(struct scsi_device *); extern int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, struct scsi_sense_hdr *sshdr); +extern int scsi_request_normalize_sense(struct scsi_request *sreq, + struct scsi_sense_hdr *sshdr); extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd, struct scsi_sense_hdr *sshdr); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index b3dd90f3e..de6ce541a 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -472,7 +472,6 @@ struct Scsi_Host { */ unsigned int host_busy; /* commands actually active on low-level */ unsigned int host_failed; /* commands that failed. */ - unsigned int host_eh_scheduled; /* EH scheduled without command */ unsigned short host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al. */ int resetting; /* if set, it means that last_reset is a valid value */ @@ -542,9 +541,6 @@ struct Scsi_Host { */ unsigned ordered_tag:1; - /* task mgmt function in progress */ - unsigned tmf_in_progress:1; - /* * Optional work queue to be utilized by the transport */ @@ -622,8 +618,7 @@ static inline int scsi_host_in_recovery(struct Scsi_Host *shost) { return shost->shost_state == SHOST_RECOVERY || shost->shost_state == SHOST_CANCEL_RECOVERY || - shost->shost_state == SHOST_DEL_RECOVERY || - shost->tmf_in_progress; + shost->shost_state == SHOST_DEL_RECOVERY; } extern int scsi_queue_work(struct Scsi_Host *, struct work_struct *); diff --git a/include/scsi/scsi_request.h b/include/scsi/scsi_request.h new file mode 100644 index 000000000..98d69fdb8 --- /dev/null +++ b/include/scsi/scsi_request.h @@ -0,0 +1,54 @@ +#ifndef _SCSI_SCSI_REQUEST_H +#define _SCSI_SCSI_REQUEST_H + +#include + +struct request; +struct scsi_cmnd; +struct scsi_device; +struct Scsi_Host; + + +/* + * This is essentially a slimmed down version of Scsi_Cmnd. The point of + * having this is that requests that are injected into the queue as result + * of things like ioctls and character devices shouldn't be using a + * Scsi_Cmnd until such a time that the command is actually at the head + * of the queue and being sent to the driver. + */ +struct scsi_request { + int sr_magic; + int sr_result; /* Status code from lower level driver */ + unsigned char sr_sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE + * when CHECK CONDITION is + * received on original command + * (auto-sense) */ + + struct Scsi_Host *sr_host; + struct scsi_device *sr_device; + struct scsi_cmnd *sr_command; + struct request *sr_request; /* A copy of the command we are + working on */ + unsigned sr_bufflen; /* Size of data buffer */ + void *sr_buffer; /* Data buffer */ + int sr_allowed; + enum dma_data_direction sr_data_direction; + unsigned char sr_cmd_len; + unsigned char sr_cmnd[MAX_COMMAND_SIZE]; + void (*sr_done) (struct scsi_cmnd *); /* Mid-level done function */ + int sr_timeout_per_command; + unsigned short sr_use_sg; /* Number of pieces of scatter-gather */ + unsigned short sr_sglist_len; /* size of malloc'd scatter-gather list */ + unsigned sr_underflow; /* Return error if less than + this amount is transferred */ + void *upper_private_data; /* reserved for owner (usually upper + level driver) of this request */ +}; + +extern struct scsi_request *scsi_allocate_request(struct scsi_device *, gfp_t); +extern void scsi_release_request(struct scsi_request *); +extern void scsi_do_req(struct scsi_request *, const void *cmnd, + void *buffer, unsigned bufflen, + void (*done) (struct scsi_cmnd *), + int timeout, int retries); +#endif /* _SCSI_SCSI_REQUEST_H */ diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 6d28b0317..5626225bd 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -27,6 +27,7 @@ #ifndef SCSI_TRANSPORT_FC_H #define SCSI_TRANSPORT_FC_H +#include #include #include diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 39e833260..b41cf077e 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h @@ -2,7 +2,7 @@ * iSCSI transport class definitions * * Copyright (C) IBM Corporation, 2004 - * Copyright (C) Mike Christie, 2004 - 2006 + * Copyright (C) Mike Christie, 2004 - 2005 * Copyright (C) Dmitry Yusupov, 2004 - 2005 * Copyright (C) Alex Aizman, 2004 - 2005 * @@ -27,14 +27,9 @@ #include struct scsi_transport_template; -struct iscsi_transport; struct Scsi_Host; struct mempool_zone; struct iscsi_cls_conn; -struct iscsi_conn; -struct iscsi_cmd_task; -struct iscsi_mgmt_task; -struct sockaddr; /** * struct iscsi_transport - iSCSI Transport template @@ -47,31 +42,10 @@ struct sockaddr; * @bind_conn: associate this connection with existing iSCSI session * and specified transport descriptor * @destroy_conn: destroy inactive iSCSI connection - * @set_param: set iSCSI parameter. Return 0 on success, -ENODATA - * when param is not supported, and a -Exx value on other - * error. - * @get_param get iSCSI parameter. Must return number of bytes - * copied to buffer on success, -ENODATA when param - * is not supported, and a -Exx value on other error + * @set_param: set iSCSI Data-Path operational parameter * @start_conn: set connection to be operational * @stop_conn: suspend/recover/terminate connection * @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text. - * @session_recovery_timedout: notify LLD a block during recovery timed out - * @init_cmd_task: Initialize a iscsi_cmd_task and any internal structs. - * Called from queuecommand with session lock held. - * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. - * Called from iscsi_conn_send_generic with xmitmutex. - * @xmit_cmd_task: Requests LLD to transfer cmd task. Returns 0 or the - * the number of bytes transferred on success, and -Exyz - * value on error. - * @xmit_mgmt_task: Requests LLD to transfer mgmt task. Returns 0 or the - * the number of bytes transferred on success, and -Exyz - * value on error. - * @cleanup_cmd_task: requests LLD to fail cmd task. Called with xmitmutex - * and session->lock after the connection has been - * suspended and terminated during recovery. If called - * from abort task then connection is not suspended - * or terminated but sk_callback_lock is held * * Template API provided by iSCSI Transport */ @@ -79,54 +53,38 @@ struct iscsi_transport { struct module *owner; char *name; unsigned int caps; - /* LLD sets this to indicate what values it can export to sysfs */ - unsigned int param_mask; struct scsi_host_template *host_template; + /* LLD session/scsi_host data size */ + int hostdata_size; + /* LLD iscsi_host data size */ + int ihostdata_size; /* LLD connection data size */ int conndata_size; - /* LLD session data size */ - int sessiondata_size; int max_lun; unsigned int max_conn; unsigned int max_cmd_len; - struct iscsi_cls_session *(*create_session) (struct iscsi_transport *it, - struct scsi_transport_template *t, uint32_t sn, uint32_t *hn); + struct iscsi_cls_session *(*create_session) + (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid); void (*destroy_session) (struct iscsi_cls_session *session); struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, uint32_t cid); int (*bind_conn) (struct iscsi_cls_session *session, struct iscsi_cls_conn *cls_conn, - uint64_t transport_eph, int is_leading); + uint32_t transport_fd, int is_leading); int (*start_conn) (struct iscsi_cls_conn *conn); void (*stop_conn) (struct iscsi_cls_conn *conn, int flag); void (*destroy_conn) (struct iscsi_cls_conn *conn); int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param, - char *buf, int buflen); + uint32_t value); int (*get_conn_param) (struct iscsi_cls_conn *conn, - enum iscsi_param param, char *buf); + enum iscsi_param param, + uint32_t *value); int (*get_session_param) (struct iscsi_cls_session *session, - enum iscsi_param param, char *buf); + enum iscsi_param param, uint32_t *value); int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, char *data, uint32_t data_size); void (*get_stats) (struct iscsi_cls_conn *conn, struct iscsi_stats *stats); - void (*init_cmd_task) (struct iscsi_cmd_task *ctask); - void (*init_mgmt_task) (struct iscsi_conn *conn, - struct iscsi_mgmt_task *mtask, - char *data, uint32_t data_size); - int (*xmit_cmd_task) (struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask); - void (*cleanup_cmd_task) (struct iscsi_conn *conn, - struct iscsi_cmd_task *ctask); - int (*xmit_mgmt_task) (struct iscsi_conn *conn, - struct iscsi_mgmt_task *mtask); - void (*session_recovery_timedout) (struct iscsi_cls_session *session); - int (*ep_connect) (struct sockaddr *dst_addr, int non_blocking, - uint64_t *ep_handle); - int (*ep_poll) (uint64_t ep_handle, int timeout_ms); - void (*ep_disconnect) (uint64_t ep_handle); - int (*tgt_dscvr) (enum iscsi_tgt_dscvr type, uint32_t host_no, - uint32_t enable, struct sockaddr *dst_addr); }; /* @@ -142,19 +100,10 @@ extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, char *data, uint32_t data_size); - -/* Connection's states */ -#define ISCSI_CONN_INITIAL_STAGE 0 -#define ISCSI_CONN_STARTED 1 -#define ISCSI_CONN_STOPPED 2 -#define ISCSI_CONN_CLEANUP_WAIT 3 - struct iscsi_cls_conn { struct list_head conn_list; /* item in connlist */ void *dd_data; /* LLD private data */ struct iscsi_transport *transport; - uint32_t cid; /* connection id */ - int active; /* must be accessed with the connlock */ struct device dev; /* sysfs transport/container device */ struct mempool_zone *z_error; @@ -165,27 +114,9 @@ struct iscsi_cls_conn { #define iscsi_dev_to_conn(_dev) \ container_of(_dev, struct iscsi_cls_conn, dev) -/* Session's states */ -#define ISCSI_STATE_FREE 1 -#define ISCSI_STATE_LOGGED_IN 2 -#define ISCSI_STATE_FAILED 3 -#define ISCSI_STATE_TERMINATE 4 -#define ISCSI_STATE_IN_RECOVERY 5 -#define ISCSI_STATE_RECOVERY_FAILED 6 - struct iscsi_cls_session { struct list_head sess_list; /* item in session_list */ - struct list_head host_list; struct iscsi_transport *transport; - - /* recovery fields */ - int recovery_tmo; - struct work_struct recovery_work; - - int target_id; - - int sid; /* session id */ - void *dd_data; /* LLD private data */ struct device dev; /* sysfs transport/container device */ }; @@ -195,34 +126,22 @@ struct iscsi_cls_session { #define iscsi_session_to_shost(_session) \ dev_to_shost(_session->dev.parent) -#define starget_to_session(_stgt) \ - iscsi_dev_to_session(_stgt->dev.parent) - -struct iscsi_host { - struct list_head sessions; - struct mutex mutex; -}; - /* * session and connection functions that can be used by HW iSCSI LLDs */ -extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, - struct iscsi_transport *transport); -extern int iscsi_add_session(struct iscsi_cls_session *session, - unsigned int target_id); -extern int iscsi_if_create_session_done(struct iscsi_cls_conn *conn); -extern int iscsi_if_destroy_session_done(struct iscsi_cls_conn *conn); extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, - struct iscsi_transport *t, - unsigned int target_id); -extern void iscsi_remove_session(struct iscsi_cls_session *session); -extern void iscsi_free_session(struct iscsi_cls_session *session); + struct iscsi_transport *t); extern int iscsi_destroy_session(struct iscsi_cls_session *session); extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, uint32_t cid); extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); -extern void iscsi_unblock_session(struct iscsi_cls_session *session); -extern void iscsi_block_session(struct iscsi_cls_session *session); +/* + * session functions used by software iscsi + */ +extern struct Scsi_Host * +iscsi_transport_create_session(struct scsi_transport_template *scsit, + struct iscsi_transport *transport); +extern int iscsi_transport_destroy_session(struct Scsi_Host *shost); #endif diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 6cc231409..93cfb4bf4 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -3,7 +3,6 @@ #include #include -#include struct scsi_transport_template; struct sas_rphy; @@ -56,6 +55,7 @@ struct sas_phy { enum sas_linkrate minimum_linkrate; enum sas_linkrate maximum_linkrate_hw; enum sas_linkrate maximum_linkrate; + u8 port_identifier; /* internal state */ unsigned int local_attached : 1; @@ -66,8 +66,8 @@ struct sas_phy { u32 loss_of_dword_sync_count; u32 phy_reset_problem_count; - /* for the list of phys belonging to a port */ - struct list_head port_siblings; + /* the other end of the link */ + struct sas_rphy *rphy; }; #define dev_to_phy(d) \ @@ -106,7 +106,6 @@ struct sas_end_device { struct sas_expander_device { int level; - int next_port_id; #define SAS_EXPANDER_VENDOR_ID_LEN 8 char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; @@ -125,26 +124,6 @@ struct sas_expander_device { #define rphy_to_expander_device(r) \ container_of((r), struct sas_expander_device, rphy) -struct sas_port { - struct device dev; - - int port_identifier; - int num_phys; - /* port flags */ - unsigned int is_backlink:1; - - /* the other end of the link */ - struct sas_rphy *rphy; - - struct mutex phy_list_mutex; - struct list_head phy_list; -}; - -#define dev_to_sas_port(d) \ - container_of((d), struct sas_port, dev) -#define transport_class_to_sas_port(cdev) \ - dev_to_sas_port((cdev)->dev) - /* The functions by which the transport class and the driver communicate */ struct sas_function_template { int (*get_linkerrors)(struct sas_phy *); @@ -154,7 +133,6 @@ struct sas_function_template { }; -void sas_remove_children(struct device *); extern void sas_remove_host(struct Scsi_Host *); extern struct sas_phy *sas_phy_alloc(struct device *, int); @@ -163,23 +141,13 @@ extern int sas_phy_add(struct sas_phy *); extern void sas_phy_delete(struct sas_phy *); extern int scsi_is_sas_phy(const struct device *); -extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); -extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); +extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); +extern struct sas_rphy *sas_expander_alloc(struct sas_phy *, enum sas_device_type); void sas_rphy_free(struct sas_rphy *); extern int sas_rphy_add(struct sas_rphy *); extern void sas_rphy_delete(struct sas_rphy *); extern int scsi_is_sas_rphy(const struct device *); -struct sas_port *sas_port_alloc(struct device *, int); -struct sas_port *sas_port_alloc_num(struct device *); -int sas_port_add(struct sas_port *); -void sas_port_free(struct sas_port *); -void sas_port_delete(struct sas_port *); -void sas_port_add_phy(struct sas_port *, struct sas_phy *); -void sas_port_delete_phy(struct sas_port *, struct sas_phy *); -void sas_port_mark_backlink(struct sas_port *); -int scsi_is_sas_port(const struct device *); - extern struct scsi_transport_template * sas_attach_transport(struct sas_function_template *); extern void sas_release_transport(struct scsi_transport_template *); diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 302680c0c..5e1d61913 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h @@ -20,6 +20,7 @@ #ifndef SCSI_TRANSPORT_SPI_H #define SCSI_TRANSPORT_SPI_H +#include #include #include diff --git a/include/scsi/sg_request.h b/include/scsi/sg_request.h new file mode 100644 index 000000000..57ff525bd --- /dev/null +++ b/include/scsi/sg_request.h @@ -0,0 +1,26 @@ +typedef struct scsi_request Scsi_Request; + +static Scsi_Request *dummy_cmdp; /* only used for sizeof */ + +typedef struct sg_scatter_hold { /* holding area for scsi scatter gather info */ + unsigned short k_use_sg; /* Count of kernel scatter-gather pieces */ + unsigned short sglist_len; /* size of malloc'd scatter-gather list ++ */ + unsigned bufflen; /* Size of (aggregate) data buffer */ + unsigned b_malloc_len; /* actual len malloc'ed in buffer */ + void *buffer; /* Data buffer or scatter list (k_use_sg>0) */ + char dio_in_use; /* 0->indirect IO (or mmap), 1->dio */ + unsigned char cmd_opcode; /* first byte of command */ +} Sg_scatter_hold; + +typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */ + Scsi_Request *my_cmdp; /* != 0 when request with lower levels */ + struct sg_request *nextrp; /* NULL -> tail request (slist) */ + struct sg_fd *parentfp; /* NULL -> not in use */ + Sg_scatter_hold data; /* hold buffer, perhaps scatter list */ + sg_io_hdr_t header; /* scsi command+info, see */ + unsigned char sense_b[sizeof (dummy_cmdp->sr_sense_buffer)]; + char res_used; /* 1 -> using reserve buffer, 0 -> not ... */ + char orphan; /* 1 -> drop on sight, 0 -> normal */ + char sg_io_owned; /* 1 -> packet belongs to SG_IO */ + volatile char done; /* 0->before bh, 1->before read, 2->read */ +} Sg_request; diff --git a/include/scsi/srp.h b/include/scsi/srp.h index ad178fa78..637f77ecc 100644 --- a/include/scsi/srp.h +++ b/include/scsi/srp.h @@ -87,11 +87,6 @@ enum srp_login_rej_reason { SRP_LOGIN_REJ_CHANNEL_LIMIT_REACHED = 0x00010006 }; -enum { - SRP_REV10_IB_IO_CLASS = 0xff00, - SRP_REV16A_IB_IO_CLASS = 0x0100 -}; - struct srp_direct_buf { __be64 va; __be32 key; diff --git a/include/sound/Kbuild b/include/sound/Kbuild deleted file mode 100644 index fd054a344..000000000 --- a/include/sound/Kbuild +++ /dev/null @@ -1,10 +0,0 @@ -header-y += asound_fm.h -header-y += hdsp.h -header-y += hdspm.h -header-y += sfnt_info.h -header-y += sscape_ioctl.h - -unifdef-y += asequencer.h -unifdef-y += asound.h -unifdef-y += emu10k1.h -unifdef-y += sb16_csp.h diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 758f8bf13..b45a73712 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h @@ -265,7 +265,6 @@ /* specific - Analog Devices */ #define AC97_AD_TEST 0x5a /* test register */ -#define AC97_AD_TEST2 0x5c /* undocumented test register 2 */ #define AC97_AD_CODEC_CFG 0x70 /* codec configuration */ #define AC97_AD_JACK_SPDIF 0x72 /* Jack Sense & S/PDIF */ #define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */ @@ -379,7 +378,6 @@ #define AC97_HAS_NO_MIC (1<<15) /* no MIC volume */ #define AC97_HAS_NO_TONE (1<<16) /* no Tone volume */ #define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */ -#define AC97_HAS_NO_AUX (1<<18) /* no standard AC97 AUX volume and mute */ /* rates indexes */ #define AC97_RATES_FRONT_DAC 0 diff --git a/include/sound/ak4xxx-adda.h b/include/sound/ak4xxx-adda.h index 3d9888492..3bf5911fe 100644 --- a/include/sound/ak4xxx-adda.h +++ b/include/sound/ak4xxx-adda.h @@ -32,8 +32,8 @@ struct snd_akm4xxx; struct snd_ak4xxx_ops { void (*lock)(struct snd_akm4xxx *ak, int chip); void (*unlock)(struct snd_akm4xxx *ak, int chip); - void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, - unsigned char val); + void (*write)(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); + // unsigned char (*read)(struct snd_akm4xxx *ak, int chip, unsigned char reg); void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate); }; @@ -41,40 +41,29 @@ struct snd_ak4xxx_ops { struct snd_akm4xxx { struct snd_card *card; - unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ - unsigned int num_dacs; /* AK4524 or AK4528 DACs */ - unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ - unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image - * for IPGA (AK4528) - */ + unsigned int num_adcs; /* AK4524 or AK4528 ADCs */ + unsigned int num_dacs; /* AK4524 or AK4528 DACs */ + unsigned char images[AK4XXX_IMAGE_SIZE]; /* saved register image */ + unsigned char ipga_gain[AK4XXX_MAX_CHIPS][2]; /* saved register image for IPGA (AK4528) */ unsigned long private_value[AK4XXX_MAX_CHIPS]; /* helper for driver */ void *private_data[AK4XXX_MAX_CHIPS]; /* helper for driver */ /* template should fill the following fields */ - unsigned int idx_offset; /* control index offset */ + unsigned int idx_offset; /* control index offset */ enum { SND_AK4524, SND_AK4528, SND_AK4529, SND_AK4355, SND_AK4358, SND_AK4381 } type; - unsigned int *num_stereo; /* array of combined counts - * for the mixer - */ - char **channel_names; /* array of mixer channel names */ struct snd_ak4xxx_ops ops; }; -void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, - unsigned char val); +void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val); void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state); void snd_akm4xxx_init(struct snd_akm4xxx *ak); int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak); -#define snd_akm4xxx_get(ak,chip,reg) \ - (ak)->images[(chip) * 16 + (reg)] -#define snd_akm4xxx_set(ak,chip,reg,val) \ - ((ak)->images[(chip) * 16 + (reg)] = (val)) -#define snd_akm4xxx_get_ipga(ak,chip,reg) \ - (ak)->ipga_gain[chip][(reg)-4] -#define snd_akm4xxx_set_ipga(ak,chip,reg,val) \ - ((ak)->ipga_gain[chip][(reg)-4] = (val)) +#define snd_akm4xxx_get(ak,chip,reg) (ak)->images[(chip) * 16 + (reg)] +#define snd_akm4xxx_set(ak,chip,reg,val) ((ak)->images[(chip) * 16 + (reg)] = (val)) +#define snd_akm4xxx_get_ipga(ak,chip,reg) (ak)->ipga_gain[chip][(reg)-4] +#define snd_akm4xxx_set_ipga(ak,chip,reg,val) ((ak)->ipga_gain[chip][(reg)-4] = (val)) #endif /* __SOUND_AK4XXX_ADDA_H */ diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h index 3f2f4042a..6691e4aa4 100644 --- a/include/sound/asequencer.h +++ b/include/sound/asequencer.h @@ -605,10 +605,6 @@ struct snd_seq_remove_events { #define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ #define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ /*...*/ -#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */ -#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */ -#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */ -#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */ #define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ /* misc. conditioning flags */ diff --git a/include/sound/asound.h b/include/sound/asound.h index 41885f48a..9cc021c7e 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -137,7 +137,7 @@ enum { * * *****************************************************************************/ -#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8) +#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) typedef unsigned long snd_pcm_uframes_t; typedef signed long snd_pcm_sframes_t; diff --git a/include/sound/core.h b/include/sound/core.h index bab3ff457..5135147f2 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -188,6 +188,8 @@ struct snd_minor { int device; /* device number */ const struct file_operations *f_ops; /* file operations */ void *private_data; /* private data for f_ops->open */ + char name[0]; /* device name (keep at the end of + structure) */ }; /* sound.c */ @@ -231,8 +233,9 @@ int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size /* init.c */ +extern unsigned int snd_cards_lock; extern struct snd_card *snd_cards[SNDRV_CARDS]; -int snd_card_locked(int card); +extern rwlock_t snd_card_rwlock; #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) #define SND_MIXER_OSS_NOTIFY_REGISTER 0 #define SND_MIXER_OSS_NOTIFY_DISCONNECT 1 diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h index 685928e6f..80b2979c0 100644 --- a/include/sound/cs46xx.h +++ b/include/sound/cs46xx.h @@ -1704,7 +1704,6 @@ struct snd_cs46xx { int acpi_port; struct snd_kcontrol *eapd_switch; /* for amplifier hack */ int accept_valid; /* accept mmap valid (for OSS) */ - int in_suspend; struct gameport *gameport; diff --git a/include/sound/driver.h b/include/sound/driver.h index 3c522e59a..89c6a73f3 100644 --- a/include/sound/driver.h +++ b/include/sound/driver.h @@ -26,6 +26,7 @@ #include "config.h" #endif +#include /* number of supported soundcards */ #ifdef CONFIG_SND_DYNAMIC_MINORS diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 884bbf54c..186e00ad9 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -245,7 +245,6 @@ #define A_IOCFG_GPOUT0 0x0044 /* analog/digital */ #define A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 (chiprev=4) */ #define A_IOCFG_ENABLE_DIGITAL 0x0004 -#define A_IOCFG_ENABLE_DIGITAL_AUDIGY4 0x0080 #define A_IOCFG_UNKNOWN_20 0x0020 #define A_IOCFG_DISABLE_AC97_FRONT 0x0080 /* turn off ac97 front -> front (10k2.1) */ #define A_IOCFG_GPOUT1 0x0002 /* IR? drive's internal bypass (?) */ @@ -1066,7 +1065,6 @@ struct snd_emu_chip_details { unsigned char emu1212m; /* EMU 1212m card */ unsigned char spi_dac; /* SPI interface for DAC */ unsigned char i2c_adc; /* I2C interface for ADC */ - unsigned char adc_1361t; /* Use Philips 1361T ADC */ const char *driver; const char *name; const char *id; /* for backward compatibility - can be NULL if not needed */ diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h index dec6b1dc3..25e1951a9 100644 --- a/include/sound/hdsp.h +++ b/include/sound/hdsp.h @@ -30,13 +30,13 @@ enum HDSP_IO_Type { }; struct hdsp_peak_rms { - __u32 input_peaks[26]; - __u32 playback_peaks[26]; - __u32 output_peaks[28]; - __u64 input_rms[26]; - __u64 playback_rms[26]; + u32 input_peaks[26]; + u32 playback_peaks[26]; + u32 output_peaks[28]; + u64 input_rms[26]; + u64 playback_rms[26]; /* These are only used for H96xx cards */ - __u64 output_rms[26]; + u64 output_rms[26]; }; #define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) diff --git a/include/sound/info.h b/include/sound/info.h index 74f699676..f23d8381c 100644 --- a/include/sound/info.h +++ b/include/sound/info.h @@ -27,9 +27,9 @@ /* buffer for information */ struct snd_info_buffer { char *buffer; /* pointer to begin of buffer */ - unsigned int curr; /* current position in buffer */ - unsigned int size; /* current size */ - unsigned int len; /* total length of buffer */ + char *curr; /* current position in buffer */ + unsigned long size; /* current size */ + unsigned long len; /* total length of buffer */ int stop; /* stop flag */ int error; /* error code */ }; @@ -40,6 +40,8 @@ struct snd_info_buffer { struct snd_info_entry; struct snd_info_entry_text { + unsigned long read_size; + unsigned long write_size; void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); }; @@ -130,9 +132,11 @@ int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_e static inline void snd_info_set_text_ops(struct snd_info_entry *entry, void *private_data, + long read_size, void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) { entry->private_data = private_data; + entry->c.text.read_size = read_size; entry->c.text.read = read; } @@ -163,6 +167,7 @@ static inline int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp) { return -EINVAL; } static inline void snd_info_set_text_ops(struct snd_info_entry *entry __attribute__((unused)), void *private_data, + long read_size, void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) {} static inline int snd_info_check_reserved_words(const char *str) { return 1; } diff --git a/include/sound/initval.h b/include/sound/initval.h index 2ae76efc6..d45170b9e 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h @@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table) { while (*irq_table != -1) { if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, - IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ", + SA_INTERRUPT | SA_PROBEIRQ, "ALSA Test IRQ", (void *) irq_table)) { free_irq(*irq_table, (void *) irq_table); return *irq_table; diff --git a/include/sound/mpu401.h b/include/sound/mpu401.h index ac504321e..8e97ace78 100644 --- a/include/sound/mpu401.h +++ b/include/sound/mpu401.h @@ -45,12 +45,6 @@ #define MPU401_HW_PC98II 18 /* Roland PC98II */ #define MPU401_HW_AUREAL 19 /* Aureal Vortex */ -#define MPU401_INFO_INPUT (1 << 0) /* input stream */ -#define MPU401_INFO_OUTPUT (1 << 1) /* output stream */ -#define MPU401_INFO_INTEGRATED (1 << 2) /* integrated h/w port */ -#define MPU401_INFO_MMIO (1 << 3) /* MMIO access */ -#define MPU401_INFO_TX_IRQ (1 << 4) /* independent TX irq */ - #define MPU401_MODE_BIT_INPUT 0 #define MPU401_MODE_BIT_OUTPUT 1 #define MPU401_MODE_BIT_INPUT_TRIGGER 2 @@ -68,7 +62,6 @@ struct snd_mpu401 { struct snd_rawmidi *rmidi; unsigned short hardware; /* MPU401_HW_XXXX */ - unsigned int info_flags; /* MPU401_INFO_XXX */ unsigned long port; /* base port of MPU-401 chip */ unsigned long cport; /* port + 1 (usually) */ struct resource *res; /* port resource */ @@ -106,16 +99,13 @@ struct snd_mpu401 { */ -irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, - struct pt_regs *regs); -irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id, - struct pt_regs *regs); +irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs); int snd_mpu401_uart_new(struct snd_card *card, int device, unsigned short hardware, unsigned long port, - unsigned int info_flags, + int integrated, int irq, int irq_flags, struct snd_rawmidi ** rrawmidi); diff --git a/include/sound/pcm.h b/include/sound/pcm.h index f84d84993..373425895 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -300,6 +300,7 @@ struct snd_pcm_runtime { /* -- mmap -- */ volatile struct snd_pcm_mmap_status *status; volatile struct snd_pcm_mmap_control *control; + atomic_t mmap_count; /* -- locking / scheduling -- */ wait_queue_head_t sleep; @@ -367,9 +368,7 @@ struct snd_pcm_substream { struct snd_pcm_group *group; /* pointer to current group */ /* -- assigned files -- */ void *file; - int ref_count; - atomic_t mmap_count; - unsigned int f_flags; + struct file *ffile; void (*pcm_release)(struct snd_pcm_substream *); #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) /* -- OSS things -- */ @@ -388,7 +387,7 @@ struct snd_pcm_substream { unsigned int hw_opened: 1; }; -#define SUBSTREAM_BUSY(substream) ((substream)->ref_count > 0) +#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL) struct snd_pcm_str { @@ -826,6 +825,14 @@ int snd_interval_ratnum(struct snd_interval *i, void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params); void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var); +int snd_pcm_hw_param_near(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, + unsigned int val, int *dir); +int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, + struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, + unsigned int val, int dir); int snd_pcm_hw_params_choose(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params); int snd_pcm_hw_refine(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params); @@ -972,13 +979,13 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigne static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) { struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; - atomic_inc(&substream->mmap_count); + atomic_inc(&substream->runtime->mmap_count); } static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area) { struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; - atomic_dec(&substream->mmap_count); + atomic_dec(&substream->runtime->mmap_count); } /* mmap for io-memory area */ diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 85cf1cf4f..fb18aef77 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h @@ -22,21 +22,29 @@ * */ -int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir); -int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir); -int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir); +extern int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, const struct snd_mask *val); +extern unsigned int snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir); +extern unsigned int snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir); +extern int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, int dir); +extern int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var); +extern int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, int dir); + +/* To share the same code we have alsa-lib */ +#define INLINE static inline +#define assert(a) (void)(a) #define SNDRV_MASK_BITS 64 /* we use so far 64bits only */ #define SNDRV_MASK_SIZE (SNDRV_MASK_BITS / 32) #define MASK_OFS(i) ((i) >> 5) #define MASK_BIT(i) (1U << ((i) & 31)) -static inline unsigned int ld2(u_int32_t v) +INLINE unsigned int ld2(u_int32_t v) { unsigned r = 0; @@ -61,22 +69,22 @@ static inline unsigned int ld2(u_int32_t v) return r; } -static inline size_t snd_mask_sizeof(void) +INLINE size_t snd_mask_sizeof(void) { return sizeof(struct snd_mask); } -static inline void snd_mask_none(struct snd_mask *mask) +INLINE void snd_mask_none(struct snd_mask *mask) { memset(mask, 0, sizeof(*mask)); } -static inline void snd_mask_any(struct snd_mask *mask) +INLINE void snd_mask_any(struct snd_mask *mask) { memset(mask, 0xff, SNDRV_MASK_SIZE * sizeof(u_int32_t)); } -static inline int snd_mask_empty(const struct snd_mask *mask) +INLINE int snd_mask_empty(const struct snd_mask *mask) { int i; for (i = 0; i < SNDRV_MASK_SIZE; i++) @@ -85,9 +93,10 @@ static inline int snd_mask_empty(const struct snd_mask *mask) return 1; } -static inline unsigned int snd_mask_min(const struct snd_mask *mask) +INLINE unsigned int snd_mask_min(const struct snd_mask *mask) { int i; + assert(!snd_mask_empty(mask)); for (i = 0; i < SNDRV_MASK_SIZE; i++) { if (mask->bits[i]) return ffs(mask->bits[i]) - 1 + (i << 5); @@ -95,9 +104,10 @@ static inline unsigned int snd_mask_min(const struct snd_mask *mask) return 0; } -static inline unsigned int snd_mask_max(const struct snd_mask *mask) +INLINE unsigned int snd_mask_max(const struct snd_mask *mask) { int i; + assert(!snd_mask_empty(mask)); for (i = SNDRV_MASK_SIZE - 1; i >= 0; i--) { if (mask->bits[i]) return ld2(mask->bits[i]) + (i << 5); @@ -105,68 +115,70 @@ static inline unsigned int snd_mask_max(const struct snd_mask *mask) return 0; } -static inline void snd_mask_set(struct snd_mask *mask, unsigned int val) +INLINE void snd_mask_set(struct snd_mask *mask, unsigned int val) { + assert(val <= SNDRV_MASK_BITS); mask->bits[MASK_OFS(val)] |= MASK_BIT(val); } -static inline void snd_mask_reset(struct snd_mask *mask, unsigned int val) +INLINE void snd_mask_reset(struct snd_mask *mask, unsigned int val) { + assert(val <= SNDRV_MASK_BITS); mask->bits[MASK_OFS(val)] &= ~MASK_BIT(val); } -static inline void snd_mask_set_range(struct snd_mask *mask, - unsigned int from, unsigned int to) +INLINE void snd_mask_set_range(struct snd_mask *mask, unsigned int from, unsigned int to) { unsigned int i; + assert(to <= SNDRV_MASK_BITS && from <= to); for (i = from; i <= to; i++) mask->bits[MASK_OFS(i)] |= MASK_BIT(i); } -static inline void snd_mask_reset_range(struct snd_mask *mask, - unsigned int from, unsigned int to) +INLINE void snd_mask_reset_range(struct snd_mask *mask, unsigned int from, unsigned int to) { unsigned int i; + assert(to <= SNDRV_MASK_BITS && from <= to); for (i = from; i <= to; i++) mask->bits[MASK_OFS(i)] &= ~MASK_BIT(i); } -static inline void snd_mask_leave(struct snd_mask *mask, unsigned int val) +INLINE void snd_mask_leave(struct snd_mask *mask, unsigned int val) { unsigned int v; + assert(val <= SNDRV_MASK_BITS); v = mask->bits[MASK_OFS(val)] & MASK_BIT(val); snd_mask_none(mask); mask->bits[MASK_OFS(val)] = v; } -static inline void snd_mask_intersect(struct snd_mask *mask, - const struct snd_mask *v) +INLINE void snd_mask_intersect(struct snd_mask *mask, const struct snd_mask *v) { int i; for (i = 0; i < SNDRV_MASK_SIZE; i++) mask->bits[i] &= v->bits[i]; } -static inline int snd_mask_eq(const struct snd_mask *mask, - const struct snd_mask *v) +INLINE int snd_mask_eq(const struct snd_mask *mask, const struct snd_mask *v) { return ! memcmp(mask, v, SNDRV_MASK_SIZE * sizeof(u_int32_t)); } -static inline void snd_mask_copy(struct snd_mask *mask, - const struct snd_mask *v) +INLINE void snd_mask_copy(struct snd_mask *mask, const struct snd_mask *v) { *mask = *v; } -static inline int snd_mask_test(const struct snd_mask *mask, unsigned int val) +INLINE int snd_mask_test(const struct snd_mask *mask, unsigned int val) { + assert(val <= SNDRV_MASK_BITS); return mask->bits[MASK_OFS(val)] & MASK_BIT(val); } -static inline int snd_mask_single(const struct snd_mask *mask) +INLINE int snd_mask_single(const struct snd_mask *mask) { int i, c = 0; + assert(!snd_mask_empty(mask)); for (i = 0; i < SNDRV_MASK_SIZE; i++) { if (! mask->bits[i]) continue; @@ -179,10 +191,10 @@ static inline int snd_mask_single(const struct snd_mask *mask) return 1; } -static inline int snd_mask_refine(struct snd_mask *mask, - const struct snd_mask *v) +INLINE int snd_mask_refine(struct snd_mask *mask, const struct snd_mask *v) { struct snd_mask old; + assert(!snd_mask_empty(mask)); snd_mask_copy(&old, mask); snd_mask_intersect(mask, v); if (snd_mask_empty(mask)) @@ -190,24 +202,27 @@ static inline int snd_mask_refine(struct snd_mask *mask, return !snd_mask_eq(mask, &old); } -static inline int snd_mask_refine_first(struct snd_mask *mask) +INLINE int snd_mask_refine_first(struct snd_mask *mask) { + assert(!snd_mask_empty(mask)); if (snd_mask_single(mask)) return 0; snd_mask_leave(mask, snd_mask_min(mask)); return 1; } -static inline int snd_mask_refine_last(struct snd_mask *mask) +INLINE int snd_mask_refine_last(struct snd_mask *mask) { + assert(!snd_mask_empty(mask)); if (snd_mask_single(mask)) return 0; snd_mask_leave(mask, snd_mask_max(mask)); return 1; } -static inline int snd_mask_refine_min(struct snd_mask *mask, unsigned int val) +INLINE int snd_mask_refine_min(struct snd_mask *mask, unsigned int val) { + assert(!snd_mask_empty(mask)); if (snd_mask_min(mask) >= val) return 0; snd_mask_reset_range(mask, 0, val - 1); @@ -216,8 +231,9 @@ static inline int snd_mask_refine_min(struct snd_mask *mask, unsigned int val) return 1; } -static inline int snd_mask_refine_max(struct snd_mask *mask, unsigned int val) +INLINE int snd_mask_refine_max(struct snd_mask *mask, unsigned int val) { + assert(!snd_mask_empty(mask)); if (snd_mask_max(mask) <= val) return 0; snd_mask_reset_range(mask, val + 1, SNDRV_MASK_BITS); @@ -226,9 +242,10 @@ static inline int snd_mask_refine_max(struct snd_mask *mask, unsigned int val) return 1; } -static inline int snd_mask_refine_set(struct snd_mask *mask, unsigned int val) +INLINE int snd_mask_refine_set(struct snd_mask *mask, unsigned int val) { int changed; + assert(!snd_mask_empty(mask)); changed = !snd_mask_single(mask); snd_mask_leave(mask, val); if (snd_mask_empty(mask)) @@ -236,12 +253,13 @@ static inline int snd_mask_refine_set(struct snd_mask *mask, unsigned int val) return changed; } -static inline int snd_mask_value(const struct snd_mask *mask) +INLINE int snd_mask_value(const struct snd_mask *mask) { + assert(!snd_mask_empty(mask)); return snd_mask_min(mask); } -static inline void snd_interval_any(struct snd_interval *i) +INLINE void snd_interval_any(struct snd_interval *i) { i->min = 0; i->openmin = 0; @@ -251,59 +269,63 @@ static inline void snd_interval_any(struct snd_interval *i) i->empty = 0; } -static inline void snd_interval_none(struct snd_interval *i) +INLINE void snd_interval_none(struct snd_interval *i) { i->empty = 1; } -static inline int snd_interval_checkempty(const struct snd_interval *i) +INLINE int snd_interval_checkempty(const struct snd_interval *i) { return (i->min > i->max || (i->min == i->max && (i->openmin || i->openmax))); } -static inline int snd_interval_empty(const struct snd_interval *i) +INLINE int snd_interval_empty(const struct snd_interval *i) { return i->empty; } -static inline int snd_interval_single(const struct snd_interval *i) +INLINE int snd_interval_single(const struct snd_interval *i) { + assert(!snd_interval_empty(i)); return (i->min == i->max || (i->min + 1 == i->max && i->openmax)); } -static inline int snd_interval_value(const struct snd_interval *i) +INLINE int snd_interval_value(const struct snd_interval *i) { + assert(snd_interval_single(i)); return i->min; } -static inline int snd_interval_min(const struct snd_interval *i) +INLINE int snd_interval_min(const struct snd_interval *i) { + assert(!snd_interval_empty(i)); return i->min; } -static inline int snd_interval_max(const struct snd_interval *i) +INLINE int snd_interval_max(const struct snd_interval *i) { unsigned int v; + assert(!snd_interval_empty(i)); v = i->max; if (i->openmax) v--; return v; } -static inline int snd_interval_test(const struct snd_interval *i, unsigned int val) +INLINE int snd_interval_test(const struct snd_interval *i, unsigned int val) { return !((i->min > val || (i->min == val && i->openmin) || i->max < val || (i->max == val && i->openmax))); } -static inline void snd_interval_copy(struct snd_interval *d, const struct snd_interval *s) +INLINE void snd_interval_copy(struct snd_interval *d, const struct snd_interval *s) { *d = *s; } -static inline int snd_interval_setinteger(struct snd_interval *i) +INLINE int snd_interval_setinteger(struct snd_interval *i) { if (i->integer) return 0; @@ -313,7 +335,7 @@ static inline int snd_interval_setinteger(struct snd_interval *i) return 1; } -static inline int snd_interval_eq(const struct snd_interval *i1, const struct snd_interval *i2) +INLINE int snd_interval_eq(const struct snd_interval *i1, const struct snd_interval *i2) { if (i1->empty) return i2->empty; @@ -337,5 +359,8 @@ static inline unsigned int sub(unsigned int a, unsigned int b) return 0; } +#undef INLINE +#undef assert + #endif /* __SOUND_PCM_PARAMS_H */ diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index 7dbcd10fa..584e73dd4 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h @@ -46,7 +46,6 @@ struct snd_rawmidi; struct snd_rawmidi_substream; -struct snd_seq_port_info; struct snd_rawmidi_ops { int (*open) (struct snd_rawmidi_substream * substream); @@ -58,8 +57,6 @@ struct snd_rawmidi_ops { struct snd_rawmidi_global_ops { int (*dev_register) (struct snd_rawmidi * rmidi); int (*dev_unregister) (struct snd_rawmidi * rmidi); - void (*get_port_info)(struct snd_rawmidi *rmidi, int number, - struct snd_seq_port_info *info); }; struct snd_rawmidi_runtime { diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index b5067d3c2..a4f554520 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -20,10 +20,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - */ + */ #include -#include struct snd_tea575x; diff --git a/include/sound/version.h b/include/sound/version.h index 2ee849d0e..4f0e65808 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated by configure. */ -#define CONFIG_SND_VERSION "1.0.12rc1" -#define CONFIG_SND_DATE " (Thu Jun 22 13:55:50 2006 UTC)" +#define CONFIG_SND_VERSION "1.0.11rc4" +#define CONFIG_SND_DATE " (Wed Mar 22 10:27:24 2006 UTC)" diff --git a/include/video/Kbuild b/include/video/Kbuild deleted file mode 100644 index a14f9c045..000000000 --- a/include/video/Kbuild +++ /dev/null @@ -1 +0,0 @@ -unifdef-y += sisfb.h diff --git a/include/video/edid.h b/include/video/edid.h index f6a42d6c2..b913f1961 100644 --- a/include/video/edid.h +++ b/include/video/edid.h @@ -3,6 +3,7 @@ #ifdef __KERNEL__ +#include #ifdef CONFIG_X86 struct edid_info { diff --git a/include/video/mbxfb.h b/include/video/mbxfb.h deleted file mode 100644 index 3bde0f5cd..000000000 --- a/include/video/mbxfb.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef __MBX_FB_H -#define __MBX_FB_H - -struct mbxfb_val { - unsigned int defval; - unsigned int min; - unsigned int max; -}; - -struct fb_info; - -struct mbxfb_platform_data { - /* Screen info */ - struct mbxfb_val xres; - struct mbxfb_val yres; - struct mbxfb_val bpp; - - /* Memory info */ - unsigned long memsize; /* if 0 use ODFB? */ - unsigned long timings1; - unsigned long timings2; - unsigned long timings3; - - int (*probe)(struct fb_info *fb); - int (*remove)(struct fb_info *fb); -}; - -#endif /* __MBX_FB_H */ diff --git a/include/video/vga.h b/include/video/vga.h index b49a5120c..700d6c8eb 100644 --- a/include/video/vga.h +++ b/include/video/vga.h @@ -17,6 +17,7 @@ #ifndef __linux_video_vga_h__ #define __linux_video_vga_h__ +#include #include #include #ifndef CONFIG_AMIGA diff --git a/include/xen/hvm.h b/include/xen/hvm.h deleted file mode 100644 index 97bb68a32..000000000 --- a/include/xen/hvm.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Simple wrappers around HVM functions */ -#ifndef XEN_HVM_H__ -#define XEN_HVM_H__ - -#include -#include - -static inline unsigned long hvm_get_parameter(int idx) -{ - struct xen_hvm_param xhv; - int r; - - xhv.domid = DOMID_SELF; - xhv.index = idx; - r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); - if (r < 0) { - printk(KERN_ERR "cannot get hvm parameter %d: %d.\n", - idx, r); - return 0; - } - return xhv.value; -} - -#endif /* XEN_HVM_H__ */ diff --git a/include/xen/interface/arch-ia64.h b/include/xen/interface/arch-ia64.h deleted file mode 100644 index 98bda1d24..000000000 --- a/include/xen/interface/arch-ia64.h +++ /dev/null @@ -1,448 +0,0 @@ -/****************************************************************************** - * arch-ia64/hypervisor-if.h - * - * Guest OS interface to IA64 Xen. - */ - -#ifndef __HYPERVISOR_IF_IA64_H__ -#define __HYPERVISOR_IF_IA64_H__ - -/* Structural guest handles introduced in 0x00030201. */ -#if __XEN_INTERFACE_VERSION__ >= 0x00030201 -#define __DEFINE_XEN_GUEST_HANDLE(name, type) \ - typedef struct { type *p; } __guest_handle_ ## name -#else -#define __DEFINE_XEN_GUEST_HANDLE(name, type) \ - typedef type * __guest_handle_ ## name -#endif - -#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) -#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name -#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0) -#ifdef __XEN_TOOLS__ -#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0) -#endif - -#ifndef __ASSEMBLY__ -/* Guest handles for primitive C types. */ -__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); -__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long); -DEFINE_XEN_GUEST_HANDLE(char); -DEFINE_XEN_GUEST_HANDLE(int); -DEFINE_XEN_GUEST_HANDLE(long); -DEFINE_XEN_GUEST_HANDLE(void); - -typedef unsigned long xen_pfn_t; -DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); -#endif - -/* Arch specific VIRQs definition */ -#define VIRQ_ITC VIRQ_ARCH_0 /* V. Virtual itc timer */ - -/* Maximum number of virtual CPUs in multi-processor guests. */ -/* WARNING: before changing this, check that shared_info fits on a page */ -#define MAX_VIRT_CPUS 64 - -#ifndef __ASSEMBLY__ - -typedef unsigned long xen_ulong_t; - -#define GPFN_MEM (0UL << 56) /* Guest pfn is normal mem */ -#define GPFN_FRAME_BUFFER (1UL << 56) /* VGA framebuffer */ -#define GPFN_LOW_MMIO (2UL << 56) /* Low MMIO range */ -#define GPFN_PIB (3UL << 56) /* PIB base */ -#define GPFN_IOSAPIC (4UL << 56) /* IOSAPIC base */ -#define GPFN_LEGACY_IO (5UL << 56) /* Legacy I/O base */ -#define GPFN_GFW (6UL << 56) /* Guest Firmware */ -#define GPFN_HIGH_MMIO (7UL << 56) /* High MMIO range */ - -#define GPFN_IO_MASK (7UL << 56) /* Guest pfn is I/O type */ -#define GPFN_INV_MASK (31UL << 59) /* Guest pfn is invalid */ - -#define INVALID_MFN (~0UL) - -#define MEM_G (1UL << 30) -#define MEM_M (1UL << 20) - -#define MMIO_START (3 * MEM_G) -#define MMIO_SIZE (512 * MEM_M) - -#define VGA_IO_START 0xA0000UL -#define VGA_IO_SIZE 0x20000 - -#define LEGACY_IO_START (MMIO_START + MMIO_SIZE) -#define LEGACY_IO_SIZE (64*MEM_M) - -#define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE) -#define IO_PAGE_SIZE PAGE_SIZE - -#define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE) -#define STORE_PAGE_SIZE PAGE_SIZE - -#define IO_SAPIC_START 0xfec00000UL -#define IO_SAPIC_SIZE 0x100000 - -#define PIB_START 0xfee00000UL -#define PIB_SIZE 0x200000 - -#define GFW_START (4*MEM_G -16*MEM_M) -#define GFW_SIZE (16*MEM_M) - -struct pt_fpreg { - union { - unsigned long bits[2]; - long double __dummy; /* force 16-byte alignment */ - } u; -}; - -struct cpu_user_regs { - /* The following registers are saved by SAVE_MIN: */ - unsigned long b6; /* scratch */ - unsigned long b7; /* scratch */ - - unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */ - unsigned long ar_ssd; /* reserved for future use (scratch) */ - - unsigned long r8; /* scratch (return value register 0) */ - unsigned long r9; /* scratch (return value register 1) */ - unsigned long r10; /* scratch (return value register 2) */ - unsigned long r11; /* scratch (return value register 3) */ - - unsigned long cr_ipsr; /* interrupted task's psr */ - unsigned long cr_iip; /* interrupted task's instruction pointer */ - unsigned long cr_ifs; /* interrupted task's function state */ - - unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ - unsigned long ar_pfs; /* prev function state */ - unsigned long ar_rsc; /* RSE configuration */ - /* The following two are valid only if cr_ipsr.cpl > 0: */ - unsigned long ar_rnat; /* RSE NaT */ - unsigned long ar_bspstore; /* RSE bspstore */ - - unsigned long pr; /* 64 predicate registers (1 bit each) */ - unsigned long b0; /* return pointer (bp) */ - unsigned long loadrs; /* size of dirty partition << 16 */ - - unsigned long r1; /* the gp pointer */ - unsigned long r12; /* interrupted task's memory stack pointer */ - unsigned long r13; /* thread pointer */ - - unsigned long ar_fpsr; /* floating point status (preserved) */ - unsigned long r15; /* scratch */ - - /* The remaining registers are NOT saved for system calls. */ - - unsigned long r14; /* scratch */ - unsigned long r2; /* scratch */ - unsigned long r3; /* scratch */ - unsigned long r16; /* scratch */ - unsigned long r17; /* scratch */ - unsigned long r18; /* scratch */ - unsigned long r19; /* scratch */ - unsigned long r20; /* scratch */ - unsigned long r21; /* scratch */ - unsigned long r22; /* scratch */ - unsigned long r23; /* scratch */ - unsigned long r24; /* scratch */ - unsigned long r25; /* scratch */ - unsigned long r26; /* scratch */ - unsigned long r27; /* scratch */ - unsigned long r28; /* scratch */ - unsigned long r29; /* scratch */ - unsigned long r30; /* scratch */ - unsigned long r31; /* scratch */ - unsigned long ar_ccv; /* compare/exchange value (scratch) */ - - /* - * Floating point registers that the kernel considers scratch: - */ - struct pt_fpreg f6; /* scratch */ - struct pt_fpreg f7; /* scratch */ - struct pt_fpreg f8; /* scratch */ - struct pt_fpreg f9; /* scratch */ - struct pt_fpreg f10; /* scratch */ - struct pt_fpreg f11; /* scratch */ - unsigned long r4; /* preserved */ - unsigned long r5; /* preserved */ - unsigned long r6; /* preserved */ - unsigned long r7; /* preserved */ - unsigned long eml_unat; /* used for emulating instruction */ - unsigned long pad0; /* alignment pad */ - -}; -typedef struct cpu_user_regs cpu_user_regs_t; - -union vac { - unsigned long value; - struct { - int a_int:1; - int a_from_int_cr:1; - int a_to_int_cr:1; - int a_from_psr:1; - int a_from_cpuid:1; - int a_cover:1; - int a_bsw:1; - long reserved:57; - }; -}; -typedef union vac vac_t; - -union vdc { - unsigned long value; - struct { - int d_vmsw:1; - int d_extint:1; - int d_ibr_dbr:1; - int d_pmc:1; - int d_to_pmd:1; - int d_itm:1; - long reserved:58; - }; -}; -typedef union vdc vdc_t; - -struct mapped_regs { - union vac vac; - union vdc vdc; - unsigned long virt_env_vaddr; - unsigned long reserved1[29]; - unsigned long vhpi; - unsigned long reserved2[95]; - union { - unsigned long vgr[16]; - unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active - }; - union { - unsigned long vbgr[16]; - unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active - }; - unsigned long vnat; - unsigned long vbnat; - unsigned long vcpuid[5]; - unsigned long reserved3[11]; - unsigned long vpsr; - unsigned long vpr; - unsigned long reserved4[76]; - union { - unsigned long vcr[128]; - struct { - unsigned long dcr; // CR0 - unsigned long itm; - unsigned long iva; - unsigned long rsv1[5]; - unsigned long pta; // CR8 - unsigned long rsv2[7]; - unsigned long ipsr; // CR16 - unsigned long isr; - unsigned long rsv3; - unsigned long iip; - unsigned long ifa; - unsigned long itir; - unsigned long iipa; - unsigned long ifs; - unsigned long iim; // CR24 - unsigned long iha; - unsigned long rsv4[38]; - unsigned long lid; // CR64 - unsigned long ivr; - unsigned long tpr; - unsigned long eoi; - unsigned long irr[4]; - unsigned long itv; // CR72 - unsigned long pmv; - unsigned long cmcv; - unsigned long rsv5[5]; - unsigned long lrr0; // CR80 - unsigned long lrr1; - unsigned long rsv6[46]; - }; - }; - union { - unsigned long reserved5[128]; - struct { - unsigned long precover_ifs; - unsigned long unat; // not sure if this is needed until NaT arch is done - int interrupt_collection_enabled; // virtual psr.ic - /* virtual interrupt deliverable flag is evtchn_upcall_mask in - * shared info area now. interrupt_mask_addr is the address - * of evtchn_upcall_mask for current vcpu - */ - unsigned char *interrupt_mask_addr; - int pending_interruption; - int incomplete_regframe; // see SDM vol2 6.8 - unsigned char vpsr_pp; - unsigned char reserved5_2[7]; - unsigned long reserved5_1[3]; - int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual - int banknum; // 0 or 1, which virtual register bank is active - unsigned long rrs[8]; // region registers - unsigned long krs[8]; // kernel registers - unsigned long pkrs[8]; // protection key registers - unsigned long tmp[8]; // temp registers (e.g. for hyperprivops) - }; - }; -}; -typedef struct mapped_regs mapped_regs_t; - -struct vpd { - struct mapped_regs vpd_low; - unsigned long reserved6[3456]; - unsigned long vmm_avail[128]; - unsigned long reserved7[4096]; -}; -typedef struct vpd vpd_t; - -struct arch_vcpu_info { -}; -typedef struct arch_vcpu_info arch_vcpu_info_t; - -struct arch_shared_info { - /* PFN of the start_info page. */ - unsigned long start_info_pfn; - - /* Interrupt vector for event channel. */ - int evtchn_vector; - - uint64_t pad[32]; -}; -typedef struct arch_shared_info arch_shared_info_t; - -typedef unsigned long xen_callback_t; - -struct ia64_tr_entry { - unsigned long pte; - unsigned long itir; - unsigned long vadr; - unsigned long rid; -}; - -struct vcpu_extra_regs { - struct ia64_tr_entry itrs[8]; - struct ia64_tr_entry dtrs[8]; - unsigned long iva; - unsigned long dcr; - unsigned long event_callback_ip; -}; - -struct vcpu_guest_context { -#define VGCF_EXTRA_REGS (1<<1) /* Get/Set extra regs. */ - unsigned long flags; /* VGCF_* flags */ - - struct cpu_user_regs user_regs; - struct vcpu_extra_regs extra_regs; - unsigned long privregs_pfn; -}; -typedef struct vcpu_guest_context vcpu_guest_context_t; -DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); - -// dom0 vp op -#define __HYPERVISOR_ia64_dom0vp_op __HYPERVISOR_arch_0 -#define IA64_DOM0VP_ioremap 0 // map io space in machine - // address to dom0 physical - // address space. - // currently physical - // assignedg address equals to - // machine address -#define IA64_DOM0VP_phystomach 1 // convert a pseudo physical - // page frame number - // to the corresponding - // machine page frame number. - // if no page is assigned, - // INVALID_MFN or GPFN_INV_MASK - // is returned depending on - // domain's non-vti/vti mode. -#define IA64_DOM0VP_machtophys 3 // convert a machine page - // frame number - // to the corresponding - // pseudo physical page frame - // number of the caller domain -#define IA64_DOM0VP_zap_physmap 17 // unmap and free pages - // contained in the specified - // pseudo physical region -#define IA64_DOM0VP_add_physmap 18 // assigne machine page frane - // to dom0's pseudo physical - // address space. -// flags for page assignement to pseudo physical address space -#define _ASSIGN_readonly 0 -#define ASSIGN_readonly (1UL << _ASSIGN_readonly) -#define ASSIGN_writable (0UL << _ASSIGN_readonly) // dummy flag -/* Internal only: memory attribute must be WC/UC/UCE. */ -#define _ASSIGN_nocache 1 -#define ASSIGN_nocache (1UL << _ASSIGN_nocache) - -/* This structure has the same layout of struct ia64_boot_param, defined in - . It is redefined here to ease use. */ -struct xen_ia64_boot_param { - unsigned long command_line; /* physical address of cmd line args */ - unsigned long efi_systab; /* physical address of EFI system table */ - unsigned long efi_memmap; /* physical address of EFI memory map */ - unsigned long efi_memmap_size; /* size of EFI memory map */ - unsigned long efi_memdesc_size; /* size of an EFI memory map descriptor */ - unsigned int efi_memdesc_version; /* memory descriptor version */ - struct { - unsigned short num_cols; /* number of columns on console. */ - unsigned short num_rows; /* number of rows on console. */ - unsigned short orig_x; /* cursor's x position */ - unsigned short orig_y; /* cursor's y position */ - } console_info; - unsigned long fpswa; /* physical address of the fpswa interface */ - unsigned long initrd_start; - unsigned long initrd_size; - unsigned long domain_start; /* va where the boot time domain begins */ - unsigned long domain_size; /* how big is the boot domain */ -}; - -#endif /* !__ASSEMBLY__ */ - -/* Address of shared_info in domain virtual space. - This is the default address, for compatibility only. */ -#define XSI_BASE 0xf100000000000000 - -/* Size of the shared_info area (this is not related to page size). */ -#define XSI_SHIFT 14 -#define XSI_SIZE (1 << XSI_SHIFT) -/* Log size of mapped_regs area (64 KB - only 4KB is used). */ -#define XMAPPEDREGS_SHIFT 12 -/* Offset of XASI (Xen arch shared info) wrt XSI_BASE. */ -#define XMAPPEDREGS_OFS XSI_SIZE - -/* Hyperprivops. */ -#define HYPERPRIVOP_RFI 0x1 -#define HYPERPRIVOP_RSM_DT 0x2 -#define HYPERPRIVOP_SSM_DT 0x3 -#define HYPERPRIVOP_COVER 0x4 -#define HYPERPRIVOP_ITC_D 0x5 -#define HYPERPRIVOP_ITC_I 0x6 -#define HYPERPRIVOP_SSM_I 0x7 -#define HYPERPRIVOP_GET_IVR 0x8 -#define HYPERPRIVOP_GET_TPR 0x9 -#define HYPERPRIVOP_SET_TPR 0xa -#define HYPERPRIVOP_EOI 0xb -#define HYPERPRIVOP_SET_ITM 0xc -#define HYPERPRIVOP_THASH 0xd -#define HYPERPRIVOP_PTC_GA 0xe -#define HYPERPRIVOP_ITR_D 0xf -#define HYPERPRIVOP_GET_RR 0x10 -#define HYPERPRIVOP_SET_RR 0x11 -#define HYPERPRIVOP_SET_KR 0x12 -#define HYPERPRIVOP_FC 0x13 -#define HYPERPRIVOP_GET_CPUID 0x14 -#define HYPERPRIVOP_GET_PMD 0x15 -#define HYPERPRIVOP_GET_EFLAG 0x16 -#define HYPERPRIVOP_SET_EFLAG 0x17 -#define HYPERPRIVOP_RSM_BE 0x18 -#define HYPERPRIVOP_GET_PSR 0x19 -#define HYPERPRIVOP_MAX 0x19 - -#endif /* __HYPERVISOR_IF_IA64_H__ */ - -/* - * Local variables: - * mode: C - * c-set-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/include/xen/interface/domctl.h b/include/xen/interface/domctl.h deleted file mode 100644 index 6ad891875..000000000 --- a/include/xen/interface/domctl.h +++ /dev/null @@ -1,392 +0,0 @@ -/****************************************************************************** - * domctl.h - * - * Domain management operations. For use by node control stack. - * - * Copyright (c) 2002-2003, B Dragovic - * Copyright (c) 2002-2006, K Fraser - */ - -#ifndef __XEN_PUBLIC_DOMCTL_H__ -#define __XEN_PUBLIC_DOMCTL_H__ - -#if !defined(__XEN__) && !defined(__XEN_TOOLS__) -#error "domctl operations are intended for use by node control tools only" -#endif - -#include "xen.h" - -#define XEN_DOMCTL_INTERFACE_VERSION 0x00000003 - -struct xenctl_cpumap { - XEN_GUEST_HANDLE(uint8_t) bitmap; - uint32_t nr_cpus; -}; - -/* - * NB. xen_domctl.domain is an IN/OUT parameter for this operation. - * If it is specified as zero, an id is auto-allocated and returned. - */ -#define XEN_DOMCTL_createdomain 1 -struct xen_domctl_createdomain { - /* IN parameters */ - uint32_t ssidref; - xen_domain_handle_t handle; -}; -typedef struct xen_domctl_createdomain xen_domctl_createdomain_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t); - -#define XEN_DOMCTL_destroydomain 2 -#define XEN_DOMCTL_pausedomain 3 -#define XEN_DOMCTL_unpausedomain 4 - -#define XEN_DOMCTL_getdomaininfo 5 -struct xen_domctl_getdomaininfo { - /* OUT variables. */ - domid_t domain; /* Also echoed in domctl.domain */ -#define DOMFLAGS_DYING (1<<0) /* Domain is scheduled to die. */ -#define DOMFLAGS_SHUTDOWN (1<<2) /* The guest OS has shut down. */ -#define DOMFLAGS_PAUSED (1<<3) /* Currently paused by control software. */ -#define DOMFLAGS_BLOCKED (1<<4) /* Currently blocked pending an event. */ -#define DOMFLAGS_RUNNING (1<<5) /* Domain is currently running. */ -#define DOMFLAGS_CPUMASK 255 /* CPU to which this domain is bound. */ -#define DOMFLAGS_CPUSHIFT 8 -#define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code. */ -#define DOMFLAGS_SHUTDOWNSHIFT 16 - uint32_t flags; - uint64_t tot_pages; - uint64_t max_pages; - uint64_t shared_info_frame; /* MFN of shared_info struct */ - uint64_t cpu_time; - uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */ - uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */ - uint32_t ssidref; - xen_domain_handle_t handle; -}; -typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t); - - -#define XEN_DOMCTL_getmemlist 6 -struct xen_domctl_getmemlist { - /* IN variables. */ - /* Max entries to write to output buffer. */ - uint64_t max_pfns; - /* Start index in guest's page list. */ - uint64_t start_pfn; - XEN_GUEST_HANDLE(xen_pfn_t) buffer; - /* OUT variables. */ - uint64_t num_pfns; -}; -typedef struct xen_domctl_getmemlist xen_domctl_getmemlist_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_getmemlist_t); - - -#define XEN_DOMCTL_getpageframeinfo 7 - -#define XEN_DOMCTL_PFINFO_LTAB_SHIFT 28 -#define XEN_DOMCTL_PFINFO_NOTAB (0x0<<28) -#define XEN_DOMCTL_PFINFO_L1TAB (0x1<<28) -#define XEN_DOMCTL_PFINFO_L2TAB (0x2<<28) -#define XEN_DOMCTL_PFINFO_L3TAB (0x3<<28) -#define XEN_DOMCTL_PFINFO_L4TAB (0x4<<28) -#define XEN_DOMCTL_PFINFO_LTABTYPE_MASK (0x7<<28) -#define XEN_DOMCTL_PFINFO_LPINTAB (0x1<<31) -#define XEN_DOMCTL_PFINFO_XTAB (0xf<<28) /* invalid page */ -#define XEN_DOMCTL_PFINFO_LTAB_MASK (0xf<<28) - -struct xen_domctl_getpageframeinfo { - /* IN variables. */ - uint64_t gmfn; /* GMFN to query */ - /* OUT variables. */ - /* Is the page PINNED to a type? */ - uint32_t type; /* see above type defs */ -}; -typedef struct xen_domctl_getpageframeinfo xen_domctl_getpageframeinfo_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo_t); - - -#define XEN_DOMCTL_getpageframeinfo2 8 -struct xen_domctl_getpageframeinfo2 { - /* IN variables. */ - uint64_t num; - /* IN/OUT variables. */ - XEN_GUEST_HANDLE(ulong) array; -}; -typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t); - - -/* - * Control shadow pagetables operation - */ -#define XEN_DOMCTL_shadow_op 10 - -/* Disable shadow mode. */ -#define XEN_DOMCTL_SHADOW_OP_OFF 0 - -/* Enable shadow mode (mode contains ORed XEN_DOMCTL_SHADOW_ENABLE_* flags). */ -#define XEN_DOMCTL_SHADOW_OP_ENABLE 32 - -/* Log-dirty bitmap operations. */ - /* Return the bitmap and clean internal copy for next round. */ -#define XEN_DOMCTL_SHADOW_OP_CLEAN 11 - /* Return the bitmap but do not modify internal copy. */ -#define XEN_DOMCTL_SHADOW_OP_PEEK 12 - -/* Memory allocation accessors. */ -#define XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION 30 -#define XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION 31 - -/* Legacy enable operations. */ - /* Equiv. to ENABLE with no mode flags. */ -#define XEN_DOMCTL_SHADOW_OP_ENABLE_TEST 1 - /* Equiv. to ENABLE with mode flag ENABLE_LOG_DIRTY. */ -#define XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY 2 - /* Equiv. to ENABLE with mode flags ENABLE_REFCOUNT and ENABLE_TRANSLATE. */ -#define XEN_DOMCTL_SHADOW_OP_ENABLE_TRANSLATE 3 - -/* Mode flags for XEN_DOMCTL_SHADOW_OP_ENABLE. */ - /* - * Shadow pagetables are refcounted: guest does not use explicit mmu - * operations nor write-protect its pagetables. - */ -#define XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT (1 << 1) - /* - * Log pages in a bitmap as they are dirtied. - * Used for live relocation to determine which pages must be re-sent. - */ -#define XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY (1 << 2) - /* - * Automatically translate GPFNs into MFNs. - */ -#define XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE (1 << 3) - /* - * Xen does not steal virtual address space from the guest. - * Requires HVM support. - */ -#define XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL (1 << 4) - -struct xen_domctl_shadow_op_stats { - uint32_t fault_count; - uint32_t dirty_count; -}; -typedef struct xen_domctl_shadow_op_stats xen_domctl_shadow_op_stats_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_stats_t); - -struct xen_domctl_shadow_op { - /* IN variables. */ - uint32_t op; /* XEN_DOMCTL_SHADOW_OP_* */ - - /* OP_ENABLE */ - uint32_t mode; /* XEN_DOMCTL_SHADOW_ENABLE_* */ - - /* OP_GET_ALLOCATION / OP_SET_ALLOCATION */ - uint32_t mb; /* Shadow memory allocation in MB */ - - /* OP_PEEK / OP_CLEAN */ - XEN_GUEST_HANDLE(ulong) dirty_bitmap; - uint64_t pages; /* Size of buffer. Updated with actual size. */ - struct xen_domctl_shadow_op_stats stats; -}; -typedef struct xen_domctl_shadow_op xen_domctl_shadow_op_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_t); - - -#define XEN_DOMCTL_max_mem 11 -struct xen_domctl_max_mem { - /* IN variables. */ - uint64_t max_memkb; -}; -typedef struct xen_domctl_max_mem xen_domctl_max_mem_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_mem_t); - - -#define XEN_DOMCTL_setvcpucontext 12 -#define XEN_DOMCTL_getvcpucontext 13 -struct xen_domctl_vcpucontext { - uint32_t vcpu; /* IN */ - XEN_GUEST_HANDLE(vcpu_guest_context_t) ctxt; /* IN/OUT */ -}; -typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t); - - -#define XEN_DOMCTL_getvcpuinfo 14 -struct xen_domctl_getvcpuinfo { - /* IN variables. */ - uint32_t vcpu; - /* OUT variables. */ - uint8_t online; /* currently online (not hotplugged)? */ - uint8_t blocked; /* blocked waiting for an event? */ - uint8_t running; /* currently scheduled on its CPU? */ - uint64_t cpu_time; /* total cpu time consumed (ns) */ - uint32_t cpu; /* current mapping */ -}; -typedef struct xen_domctl_getvcpuinfo xen_domctl_getvcpuinfo_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_getvcpuinfo_t); - - -/* Get/set which physical cpus a vcpu can execute on. */ -#define XEN_DOMCTL_setvcpuaffinity 9 -#define XEN_DOMCTL_getvcpuaffinity 25 -struct xen_domctl_vcpuaffinity { - uint32_t vcpu; /* IN */ - struct xenctl_cpumap cpumap; /* IN/OUT */ -}; -typedef struct xen_domctl_vcpuaffinity xen_domctl_vcpuaffinity_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuaffinity_t); - - -#define XEN_DOMCTL_max_vcpus 15 -struct xen_domctl_max_vcpus { - uint32_t max; /* maximum number of vcpus */ -}; -typedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t); - - -#define XEN_DOMCTL_scheduler_op 16 -/* Scheduler types. */ -#define XEN_SCHEDULER_SEDF 4 -#define XEN_SCHEDULER_CREDIT 5 -/* Set or get info? */ -#define XEN_DOMCTL_SCHEDOP_putinfo 0 -#define XEN_DOMCTL_SCHEDOP_getinfo 1 -struct xen_domctl_scheduler_op { - uint32_t sched_id; /* XEN_SCHEDULER_* */ - uint32_t cmd; /* XEN_DOMCTL_SCHEDOP_* */ - union { - struct xen_domctl_sched_sedf { - uint64_t period; - uint64_t slice; - uint64_t latency; - uint32_t extratime; - uint32_t weight; - } sedf; - struct xen_domctl_sched_credit { - uint16_t weight; - uint16_t cap; - } credit; - } u; -}; -typedef struct xen_domctl_scheduler_op xen_domctl_scheduler_op_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_scheduler_op_t); - - -#define XEN_DOMCTL_setdomainhandle 17 -struct xen_domctl_setdomainhandle { - xen_domain_handle_t handle; -}; -typedef struct xen_domctl_setdomainhandle xen_domctl_setdomainhandle_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdomainhandle_t); - - -#define XEN_DOMCTL_setdebugging 18 -struct xen_domctl_setdebugging { - uint8_t enable; -}; -typedef struct xen_domctl_setdebugging xen_domctl_setdebugging_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdebugging_t); - - -#define XEN_DOMCTL_irq_permission 19 -struct xen_domctl_irq_permission { - uint8_t pirq; - uint8_t allow_access; /* flag to specify enable/disable of IRQ access */ -}; -typedef struct xen_domctl_irq_permission xen_domctl_irq_permission_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_irq_permission_t); - - -#define XEN_DOMCTL_iomem_permission 20 -struct xen_domctl_iomem_permission { - uint64_t first_mfn; /* first page (physical page number) in range */ - uint64_t nr_mfns; /* number of pages in range (>0) */ - uint8_t allow_access; /* allow (!0) or deny (0) access to range? */ -}; -typedef struct xen_domctl_iomem_permission xen_domctl_iomem_permission_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_iomem_permission_t); - - -#define XEN_DOMCTL_ioport_permission 21 -struct xen_domctl_ioport_permission { - uint32_t first_port; /* first port int range */ - uint32_t nr_ports; /* size of port range */ - uint8_t allow_access; /* allow or deny access to range? */ -}; -typedef struct xen_domctl_ioport_permission xen_domctl_ioport_permission_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_permission_t); - -#define XEN_DOMCTL_hypercall_init 22 -struct xen_domctl_hypercall_init { - uint64_t gmfn; /* GMFN to be initialised */ -}; -typedef struct xen_domctl_hypercall_init xen_domctl_hypercall_init_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_hypercall_init_t); - -#define XEN_DOMCTL_arch_setup 23 -#define _XEN_DOMAINSETUP_hvm_guest 0 -#define XEN_DOMAINSETUP_hvm_guest (1UL<<_XEN_DOMAINSETUP_hvm_guest) -#define _XEN_DOMAINSETUP_query 1 /* Get parameters (for save) */ -#define XEN_DOMAINSETUP_query (1UL<<_XEN_DOMAINSETUP_query) -typedef struct xen_domctl_arch_setup { - uint64_t flags; /* XEN_DOMAINSETUP_* */ -#ifdef __ia64__ - uint64_t bp; /* mpaddr of boot param area */ - uint64_t maxmem; /* Highest memory address for MDT. */ - uint64_t xsi_va; /* Xen shared_info area virtual address. */ - uint32_t hypercall_imm; /* Break imm for Xen hypercalls. */ -#endif -} xen_domctl_arch_setup_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t); - -#define XEN_DOMCTL_settimeoffset 24 -struct xen_domctl_settimeoffset { - int32_t time_offset_seconds; /* applied to domain wallclock time */ -}; -typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t); - -struct xen_domctl { - uint32_t cmd; - uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */ - domid_t domain; - union { - struct xen_domctl_createdomain createdomain; - struct xen_domctl_getdomaininfo getdomaininfo; - struct xen_domctl_getmemlist getmemlist; - struct xen_domctl_getpageframeinfo getpageframeinfo; - struct xen_domctl_getpageframeinfo2 getpageframeinfo2; - struct xen_domctl_vcpuaffinity vcpuaffinity; - struct xen_domctl_shadow_op shadow_op; - struct xen_domctl_max_mem max_mem; - struct xen_domctl_vcpucontext vcpucontext; - struct xen_domctl_getvcpuinfo getvcpuinfo; - struct xen_domctl_max_vcpus max_vcpus; - struct xen_domctl_scheduler_op scheduler_op; - struct xen_domctl_setdomainhandle setdomainhandle; - struct xen_domctl_setdebugging setdebugging; - struct xen_domctl_irq_permission irq_permission; - struct xen_domctl_iomem_permission iomem_permission; - struct xen_domctl_ioport_permission ioport_permission; - struct xen_domctl_hypercall_init hypercall_init; - struct xen_domctl_arch_setup arch_setup; - struct xen_domctl_settimeoffset settimeoffset; - uint8_t pad[128]; - } u; -}; -typedef struct xen_domctl xen_domctl_t; -DEFINE_XEN_GUEST_HANDLE(xen_domctl_t); - -#endif /* __XEN_PUBLIC_DOMCTL_H__ */ - -/* - * Local variables: - * mode: C - * c-set-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h deleted file mode 100644 index a64d3df5b..000000000 --- a/include/xen/interface/elfnote.h +++ /dev/null @@ -1,133 +0,0 @@ -/****************************************************************************** - * elfnote.h - * - * Definitions used for the Xen ELF notes. - * - * Copyright (c) 2006, Ian Campbell, XenSource Ltd. - */ - -#ifndef __XEN_PUBLIC_ELFNOTE_H__ -#define __XEN_PUBLIC_ELFNOTE_H__ - -/* - * The notes should live in a SHT_NOTE segment and have "Xen" in the - * name field. - * - * Numeric types are either 4 or 8 bytes depending on the content of - * the desc field. - * - * LEGACY indicated the fields in the legacy __xen_guest string which - * this a note type replaces. - */ - -/* - * NAME=VALUE pair (string). - * - * LEGACY: FEATURES and PAE - */ -#define XEN_ELFNOTE_INFO 0 - -/* - * The virtual address of the entry point (numeric). - * - * LEGACY: VIRT_ENTRY - */ -#define XEN_ELFNOTE_ENTRY 1 - -/* The virtual address of the hypercall transfer page (numeric). - * - * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page - * number not a virtual address) - */ -#define XEN_ELFNOTE_HYPERCALL_PAGE 2 - -/* The virtual address where the kernel image should be mapped (numeric). - * - * Defaults to 0. - * - * LEGACY: VIRT_BASE - */ -#define XEN_ELFNOTE_VIRT_BASE 3 - -/* - * The offset of the ELF paddr field from the acutal required - * psuedo-physical address (numeric). - * - * This is used to maintain backwards compatibility with older kernels - * which wrote __PAGE_OFFSET into that field. This field defaults to 0 - * if not present. - * - * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE) - */ -#define XEN_ELFNOTE_PADDR_OFFSET 4 - -/* - * The version of Xen that we work with (string). - * - * LEGACY: XEN_VER - */ -#define XEN_ELFNOTE_XEN_VERSION 5 - -/* - * The name of the guest operating system (string). - * - * LEGACY: GUEST_OS - */ -#define XEN_ELFNOTE_GUEST_OS 6 - -/* - * The version of the guest operating system (string). - * - * LEGACY: GUEST_VER - */ -#define XEN_ELFNOTE_GUEST_VERSION 7 - -/* - * The loader type (string). - * - * LEGACY: LOADER - */ -#define XEN_ELFNOTE_LOADER 8 - -/* - * The kernel supports PAE (x86/32 only, string = "yes" or "no"). - * - * LEGACY: PAE (n.b. The legacy interface included a provision to - * indicate 'extended-cr3' support allowing L3 page tables to be - * placed above 4G. It is assumed that any kernel new enough to use - * these ELF notes will include this and therefore "yes" here is - * equivalent to "yes[entended-cr3]" in the __xen_guest interface. - */ -#define XEN_ELFNOTE_PAE_MODE 9 - -/* - * The features supported/required by this kernel (string). - * - * The string must consist of a list of feature names (as given in - * features.h, without the "XENFEAT_" prefix) separated by '|' - * characters. If a feature is required for the kernel to function - * then the feature name must be preceded by a '!' character. - * - * LEGACY: FEATURES - */ -#define XEN_ELFNOTE_FEATURES 10 - -/* - * The kernel requires the symbol table to be loaded (string = "yes" or "no") - * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence - * of this string as a boolean flag rather than requiring "yes" or - * "no". - */ -#define XEN_ELFNOTE_BSD_SYMTAB 11 - -#endif /* __XEN_PUBLIC_ELFNOTE_H__ */ - -/* - * Local variables: - * mode: C - * c-set-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/include/xen/interface/hvm/e820.h b/include/xen/interface/hvm/e820.h deleted file mode 100644 index 8190c767d..000000000 --- a/include/xen/interface/hvm/e820.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __XEN_PUBLIC_HVM_E820_H__ -#define __XEN_PUBLIC_HVM_E820_H__ - -/* PC BIOS standard E820 types. */ -#define E820_RAM 1 -#define E820_RESERVED 2 -#define E820_ACPI 3 -#define E820_NVS 4 - -/* Xen HVM extended E820 types. */ -#define E820_IO 16 -#define E820_SHARED_PAGE 17 -#define E820_XENSTORE 18 -#define E820_BUFFERED_IO 19 - -/* E820 location in HVM virtual address space. */ -#define E820_MAP_PAGE 0x00090000 -#define E820_MAP_NR_OFFSET 0x000001E8 -#define E820_MAP_OFFSET 0x000002D0 - -struct e820entry { - uint64_t addr; - uint64_t size; - uint32_t type; -} __attribute__((packed)); - -#define HVM_BELOW_4G_RAM_END 0xF0000000 - -#define HVM_BELOW_4G_MMIO_START HVM_BELOW_4G_RAM_END -#define HVM_BELOW_4G_MMIO_LENGTH ((1ULL << 32) - HVM_BELOW_4G_MMIO_START) - -#endif /* __XEN_PUBLIC_HVM_E820_H__ */ diff --git a/include/xen/interface/platform.h b/include/xen/interface/platform.h deleted file mode 100644 index 46e916091..000000000 --- a/include/xen/interface/platform.h +++ /dev/null @@ -1,125 +0,0 @@ -/****************************************************************************** - * platform.h - * - * Hardware platform operations. Intended for use by domain-0 kernel. - * - * Copyright (c) 2002-2006, K Fraser - */ - -#ifndef __XEN_PUBLIC_PLATFORM_H__ -#define __XEN_PUBLIC_PLATFORM_H__ - -#include "xen.h" - -#define XENPF_INTERFACE_VERSION 0x03000001 - -/* - * Set clock such that it would read after 00:00:00 UTC, - * 1 January, 1970 if the current system time was . - */ -#define XENPF_settime 17 -struct xenpf_settime { - /* IN variables. */ - uint32_t secs; - uint32_t nsecs; - uint64_t system_time; -}; -typedef struct xenpf_settime xenpf_settime_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_settime_t); - -/* - * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type. - * On x86, @type is an architecture-defined MTRR memory type. - * On success, returns the MTRR that was used (@reg) and a handle that can - * be passed to XENPF_DEL_MEMTYPE to accurately tear down the new setting. - * (x86-specific). - */ -#define XENPF_add_memtype 31 -struct xenpf_add_memtype { - /* IN variables. */ - xen_pfn_t mfn; - uint64_t nr_mfns; - uint32_t type; - /* OUT variables. */ - uint32_t handle; - uint32_t reg; -}; -typedef struct xenpf_add_memtype xenpf_add_memtype_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_add_memtype_t); - -/* - * Tear down an existing memory-range type. If @handle is remembered then it - * should be passed in to accurately tear down the correct setting (in case - * of overlapping memory regions with differing types). If it is not known - * then @handle should be set to zero. In all cases @reg must be set. - * (x86-specific). - */ -#define XENPF_del_memtype 32 -struct xenpf_del_memtype { - /* IN variables. */ - uint32_t handle; - uint32_t reg; -}; -typedef struct xenpf_del_memtype xenpf_del_memtype_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_del_memtype_t); - -/* Read current type of an MTRR (x86-specific). */ -#define XENPF_read_memtype 33 -struct xenpf_read_memtype { - /* IN variables. */ - uint32_t reg; - /* OUT variables. */ - xen_pfn_t mfn; - uint64_t nr_mfns; - uint32_t type; -}; -typedef struct xenpf_read_memtype xenpf_read_memtype_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_read_memtype_t); - -#define XENPF_microcode_update 35 -struct xenpf_microcode_update { - /* IN variables. */ - XEN_GUEST_HANDLE(void) data; /* Pointer to microcode data */ - uint32_t length; /* Length of microcode data. */ -}; -typedef struct xenpf_microcode_update xenpf_microcode_update_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_microcode_update_t); - -#define XENPF_platform_quirk 39 -#define QUIRK_NOIRQBALANCING 1 /* Do not restrict IO-APIC RTE targets */ -#define QUIRK_IOAPIC_BAD_REGSEL 2 /* IO-APIC REGSEL forgets its value */ -#define QUIRK_IOAPIC_GOOD_REGSEL 3 /* IO-APIC REGSEL behaves properly */ -struct xenpf_platform_quirk { - /* IN variables. */ - uint32_t quirk_id; -}; -typedef struct xenpf_platform_quirk xenpf_platform_quirk_t; -DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t); - -struct xen_platform_op { - uint32_t cmd; - uint32_t interface_version; /* XENPF_INTERFACE_VERSION */ - union { - struct xenpf_settime settime; - struct xenpf_add_memtype add_memtype; - struct xenpf_del_memtype del_memtype; - struct xenpf_read_memtype read_memtype; - struct xenpf_microcode_update microcode; - struct xenpf_platform_quirk platform_quirk; - uint8_t pad[128]; - } u; -}; -typedef struct xen_platform_op xen_platform_op_t; -DEFINE_XEN_GUEST_HANDLE(xen_platform_op_t); - -#endif /* __XEN_PUBLIC_PLATFORM_H__ */ - -/* - * Local variables: - * mode: C - * c-set-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/include/xen/interface/sched_ctl.h b/include/xen/interface/sched_ctl.h new file mode 100644 index 000000000..95e50e3c5 --- /dev/null +++ b/include/xen/interface/sched_ctl.h @@ -0,0 +1,69 @@ +/****************************************************************************** + * Generic scheduler control interface. + * + * Mark Williamson, (C) 2004 Intel Research Cambridge + */ + +#ifndef __XEN_PUBLIC_SCHED_CTL_H__ +#define __XEN_PUBLIC_SCHED_CTL_H__ + +/* Scheduler types. */ +#define SCHED_BVT 0 +#define SCHED_SEDF 4 +#define SCHED_CREDIT 5 + +/* Set or get info? */ +#define SCHED_INFO_PUT 0 +#define SCHED_INFO_GET 1 + +/* + * Generic scheduler control command - used to adjust system-wide scheduler + * parameters + */ +struct sched_ctl_cmd { + uint32_t sched_id; + uint32_t direction; + union { + struct bvt_ctl { + uint32_t ctx_allow; + } bvt; + } u; +}; + +struct sched_adjdom_cmd { + uint32_t sched_id; + uint32_t direction; + domid_t domain; + union { + struct bvt_adjdom { + uint32_t mcu_adv; /* mcu advance: inverse of weight */ + uint32_t warpback; /* warp? */ + int32_t warpvalue; /* warp value */ + int64_t warpl; /* warp limit */ + int64_t warpu; /* unwarp time requirement */ + } bvt; + struct sedf_adjdom { + uint64_t period; + uint64_t slice; + uint64_t latency; + uint32_t extratime; + uint32_t weight; + } sedf; + struct sched_credit_adjdom { + uint16_t weight; + uint16_t cap; + } credit; + } u; +}; + +#endif /* __XEN_PUBLIC_SCHED_CTL_H__ */ + +/* + * Local variables: + * mode: C + * c-set-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/include/xen/interface/sysctl.h b/include/xen/interface/sysctl.h deleted file mode 100644 index d556270a0..000000000 --- a/include/xen/interface/sysctl.h +++ /dev/null @@ -1,151 +0,0 @@ -/****************************************************************************** - * sysctl.h - * - * System management operations. For use by node control stack. - * - * Copyright (c) 2002-2006, K Fraser - */ - -#ifndef __XEN_PUBLIC_SYSCTL_H__ -#define __XEN_PUBLIC_SYSCTL_H__ - -#if !defined(__XEN__) && !defined(__XEN_TOOLS__) -#error "sysctl operations are intended for use by node control tools only" -#endif - -#include "xen.h" -#include "domctl.h" - -#define XEN_SYSCTL_INTERFACE_VERSION 0x00000002 - -/* - * Read console content from Xen buffer ring. - */ -#define XEN_SYSCTL_readconsole 1 -struct xen_sysctl_readconsole { - /* IN variables. */ - uint32_t clear; /* Non-zero -> clear after reading. */ - XEN_GUEST_HANDLE(char) buffer; /* Buffer start */ - /* IN/OUT variables. */ - uint32_t count; /* In: Buffer size; Out: Used buffer size */ -}; -typedef struct xen_sysctl_readconsole xen_sysctl_readconsole_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_readconsole_t); - -/* Get trace buffers machine base address */ -#define XEN_SYSCTL_tbuf_op 2 -struct xen_sysctl_tbuf_op { - /* IN variables */ -#define XEN_SYSCTL_TBUFOP_get_info 0 -#define XEN_SYSCTL_TBUFOP_set_cpu_mask 1 -#define XEN_SYSCTL_TBUFOP_set_evt_mask 2 -#define XEN_SYSCTL_TBUFOP_set_size 3 -#define XEN_SYSCTL_TBUFOP_enable 4 -#define XEN_SYSCTL_TBUFOP_disable 5 - uint32_t cmd; - /* IN/OUT variables */ - struct xenctl_cpumap cpu_mask; - uint32_t evt_mask; - /* OUT variables */ - uint64_t buffer_mfn; - uint32_t size; -}; -typedef struct xen_sysctl_tbuf_op xen_sysctl_tbuf_op_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_tbuf_op_t); - -/* - * Get physical information about the host machine - */ -#define XEN_SYSCTL_physinfo 3 -struct xen_sysctl_physinfo { - uint32_t threads_per_core; - uint32_t cores_per_socket; - uint32_t sockets_per_node; - uint32_t nr_nodes; - uint32_t cpu_khz; - uint64_t total_pages; - uint64_t free_pages; - uint64_t scrub_pages; - uint32_t hw_cap[8]; -}; -typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_physinfo_t); - -/* - * Get the ID of the current scheduler. - */ -#define XEN_SYSCTL_sched_id 4 -struct xen_sysctl_sched_id { - /* OUT variable */ - uint32_t sched_id; -}; -typedef struct xen_sysctl_sched_id xen_sysctl_sched_id_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_sched_id_t); - -/* Interface for controlling Xen software performance counters. */ -#define XEN_SYSCTL_perfc_op 5 -/* Sub-operations: */ -#define XEN_SYSCTL_PERFCOP_reset 1 /* Reset all counters to zero. */ -#define XEN_SYSCTL_PERFCOP_query 2 /* Get perfctr information. */ -struct xen_sysctl_perfc_desc { - char name[80]; /* name of perf counter */ - uint32_t nr_vals; /* number of values for this counter */ -}; -typedef struct xen_sysctl_perfc_desc xen_sysctl_perfc_desc_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t); -typedef uint32_t xen_sysctl_perfc_val_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t); - -struct xen_sysctl_perfc_op { - /* IN variables. */ - uint32_t cmd; /* XEN_SYSCTL_PERFCOP_??? */ - /* OUT variables. */ - uint32_t nr_counters; /* number of counters description */ - uint32_t nr_vals; /* number of values */ - /* counter information (or NULL) */ - XEN_GUEST_HANDLE(xen_sysctl_perfc_desc_t) desc; - /* counter values (or NULL) */ - XEN_GUEST_HANDLE(xen_sysctl_perfc_val_t) val; -}; -typedef struct xen_sysctl_perfc_op xen_sysctl_perfc_op_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_perfc_op_t); - -#define XEN_SYSCTL_getdomaininfolist 6 -struct xen_sysctl_getdomaininfolist { - /* IN variables. */ - domid_t first_domain; - uint32_t max_domains; - XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t) buffer; - /* OUT variables. */ - uint32_t num_domains; -}; -typedef struct xen_sysctl_getdomaininfolist xen_sysctl_getdomaininfolist_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_getdomaininfolist_t); - -struct xen_sysctl { - uint32_t cmd; - uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */ - union { - struct xen_sysctl_readconsole readconsole; - struct xen_sysctl_tbuf_op tbuf_op; - struct xen_sysctl_physinfo physinfo; - struct xen_sysctl_sched_id sched_id; - struct xen_sysctl_perfc_op perfc_op; - struct xen_sysctl_getdomaininfolist getdomaininfolist; - uint8_t pad[128]; - } u; -}; -typedef struct xen_sysctl xen_sysctl_t; -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_t); - -#endif /* __XEN_PUBLIC_SYSCTL_H__ */ - -/* - * Local variables: - * mode: C - * c-set-style: "BSD" - * c-basic-offset: 4 - * tab-width: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/init/Kconfig b/init/Kconfig index 3a8962316..7af407949 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1,12 +1,3 @@ -config DEFCONFIG_LIST - string - depends on !UML - option defconfig_list - default "/lib/modules/$UNAME_RELEASE/.config" - default "/etc/kernel-config" - default "/boot/config-$UNAME_RELEASE" - default "arch/$ARCH/defconfig" - menu "Code maturity level options" config EXPERIMENTAL @@ -55,8 +46,8 @@ config LOCK_KERNEL config INIT_ENV_ARG_LIMIT int - default 32 if !UML - default 128 if UML + default 32 if !USERMODE + default 128 if USERMODE help Maximum of each of the number of arguments and environment variables passed to init from the kernel command line. @@ -159,29 +150,21 @@ config BSD_PROCESS_ACCT_V3 for processing it. A preliminary version of these tools is available at . -config TASKSTATS - bool "Export task/process statistics through netlink (EXPERIMENTAL)" - depends on NET - default n - help - Export selected statistics for tasks/processes through the - generic netlink interface. Unlike BSD process accounting, the - statistics are available during the lifetime of tasks/processes as - responses to commands. Like BSD accounting, they are sent to user - space on task exit. - - Say N if unsure. - -config TASK_DELAY_ACCT - bool "Enable per-task delay accounting (EXPERIMENTAL)" - depends on TASKSTATS - help - Collect information on time spent by a task waiting for system - resources like cpu, synchronous block I/O completion and swapping - in pages. Such statistics can help in setting a task's priorities - relative to other tasks for cpu, io, rss limits etc. +config SYSCTL + bool "Sysctl support" + ---help--- + The sysctl interface provides a means of dynamically changing + certain kernel parameters and variables on the fly without requiring + a recompile of the kernel or reboot of the system. The primary + interface consists of a system call, but if you say Y to "/proc + file system support", a tree of modifiable sysctl entries will be + generated beneath the /proc/sys directory. They are explained in the + files in . Note that enabling this + option will enlarge the kernel by at least 8 KB. - Say N if unsure. + As it is generally a good thing, you should say Y here unless + building a kernel for install/rescue disks or your system is very + limited in memory. config AUDIT bool "Auditing support" @@ -199,8 +182,7 @@ config AUDITSYSCALL help Enable low-overhead system-call auditing infrastructure that can be used independently or with another kernel subsystem, - such as SELinux. To use audit's filesystem watch feature, please - ensure that INOTIFY is configured. + such as SELinux. config IKCONFIG bool "Kernel .config support" @@ -262,6 +244,23 @@ config RELAY source "usr/Kconfig" +config UID16 + bool "Enable 16-bit UID system calls" if EMBEDDED + depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION) + default y + help + This enables the legacy 16-bit UID syscall wrappers. + +config VM86 + depends X86 + default y + bool "Enable VM86 support" if EMBEDDED + help + This option is required by programs like DOSEMU to run 16-bit legacy + code on X86 processors. It also may be needed by software like + XFree86 to initialize some video cards via BIOS. Disabling this + option saves about 6k. + config CC_OPTIMIZE_FOR_SIZE bool "Optimize for size (Look out for broken compilers!)" default y @@ -283,30 +282,6 @@ menuconfig EMBEDDED environments which can tolerate a "non-standard" kernel. Only use this if you really know what you are doing. -config UID16 - bool "Enable 16-bit UID system calls" if EMBEDDED - depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION) - default y - help - This enables the legacy 16-bit UID syscall wrappers. - -config SYSCTL - bool "Sysctl support" if EMBEDDED - default y - ---help--- - The sysctl interface provides a means of dynamically changing - certain kernel parameters and variables on the fly without requiring - a recompile of the kernel or reboot of the system. The primary - interface consists of a system call, but if you say Y to "/proc - file system support", a tree of modifiable sysctl entries will be - generated beneath the /proc/sys directory. They are explained in the - files in . Note that enabling this - option will enlarge the kernel by at least 8 KB. - - As it is generally a good thing, you should say Y here unless - building a kernel for install/rescue disks or your system is very - limited in memory. - config KALLSYMS bool "Load all symbols for debugging/kksymoops" if EMBEDDED default y @@ -384,7 +359,6 @@ config BASE_FULL config FUTEX bool "Enable futex support" if EMBEDDED default y - select RT_MUTEXES help Disabling this option will cause the kernel to be built without support for "fast userspace mutexes". The resulting kernel may not @@ -417,21 +391,8 @@ config SLAB SLOB is more space efficient but does not scale well and is more susceptible to fragmentation. -config VM_EVENT_COUNTERS - default y - bool "Enable VM event counters for /proc/vmstat" if EMBEDDED - help - VM event counters are only needed to for event counts to be - shown. They have no function for the kernel itself. This - option allows the disabling of the VM event counters. - /proc/vmstat will only show page counts. - endmenu # General setup -config RT_MUTEXES - boolean - select PLIST - config TINY_SHMEM default !SHMEM bool @@ -445,6 +406,9 @@ config SLOB default !SLAB bool +config OBSOLETE_INTERMODULE + tristate + menu "Loadable module support" config MODULES diff --git a/init/Makefile b/init/Makefile index 633a268d2..a2300078f 100644 --- a/init/Makefile +++ b/init/Makefile @@ -6,6 +6,7 @@ obj-y := main.o version.o mounts.o initramfs.o obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o mounts-y := do_mounts.o +mounts-$(CONFIG_DEVFS_FS) += do_mounts_devfs.o mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o diff --git a/init/do_mounts.c b/init/do_mounts.c index 94aeec7aa..f4b7b9d27 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -325,7 +325,7 @@ static int __init mount_nfs_root(void) { void *data = nfs_root_data(); - create_dev("/dev/root", ROOT_DEV); + create_dev("/dev/root", ROOT_DEV, NULL); if (data && do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0) return 1; @@ -386,7 +386,7 @@ void __init mount_root(void) change_floppy("root floppy"); } #endif - create_dev("/dev/root", ROOT_DEV); + create_dev("/dev/root", ROOT_DEV, root_device_name); mount_block_root("/dev/root", root_mountflags); } @@ -397,6 +397,8 @@ void __init prepare_namespace(void) { int is_floppy; + mount_devfs(); + if (root_delay) { printk(KERN_INFO "Waiting %dsec before mounting root device...\n", root_delay); @@ -407,10 +409,6 @@ void __init prepare_namespace(void) if (saved_root_name[0]) { root_device_name = saved_root_name; - if (!strncmp(root_device_name, "mtd", 3)) { - mount_block_root(root_device_name, root_mountflags); - goto out; - } ROOT_DEV = name_to_dev_t(root_device_name); if (strncmp(root_device_name, "/dev/", 5) == 0) root_device_name += 5; @@ -426,8 +424,10 @@ void __init prepare_namespace(void) mount_root(); out: + umount_devfs("/dev"); sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_chroot("."); security_sb_post_mountroot(); + mount_devfs_fs (); } diff --git a/init/do_mounts.h b/init/do_mounts.h index 735705d13..e0a7ac964 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -1,4 +1,6 @@ +#include #include +#include #include #include #include @@ -13,12 +15,25 @@ void mount_root(void); extern int root_mountflags; extern char *root_device_name; -static inline int create_dev(char *name, dev_t dev) +#ifdef CONFIG_DEVFS_FS + +void mount_devfs(void); +void umount_devfs(char *path); +int create_dev(char *name, dev_t dev, char *devfs_name); + +#else + +static inline void mount_devfs(void) {} +static inline void umount_devfs(const char *path) {} + +static inline int create_dev(char *name, dev_t dev, char *devfs_name) { sys_unlink(name); return sys_mknod(name, S_IFBLK|0600, new_encode_dev(dev)); } +#endif + #if BITS_PER_LONG == 32 static inline u32 bstat(char *name) { diff --git a/init/do_mounts_devfs.c b/init/do_mounts_devfs.c new file mode 100644 index 000000000..cc5264746 --- /dev/null +++ b/init/do_mounts_devfs.c @@ -0,0 +1,137 @@ + +#include +#include +#include + +#include "do_mounts.h" + +void __init mount_devfs(void) +{ + sys_mount("devfs", "/dev", "devfs", 0, NULL); +} + +void __init umount_devfs(char *path) +{ + sys_umount(path, 0); +} + +/* + * If the dir will fit in *buf, return its length. If it won't fit, return + * zero. Return -ve on error. + */ +static int __init do_read_dir(int fd, void *buf, int len) +{ + long bytes, n; + char *p = buf; + sys_lseek(fd, 0, 0); + + for (bytes = 0; bytes < len; bytes += n) { + n = sys_getdents64(fd, (struct linux_dirent64 *)(p + bytes), + len - bytes); + if (n < 0) + return n; + if (n == 0) + return bytes; + } + return 0; +} + +/* + * Try to read all of a directory. Returns the contents at *p, which + * is kmalloced memory. Returns the number of bytes read at *len. Returns + * NULL on error. + */ +static void * __init read_dir(char *path, int *len) +{ + int size; + int fd = sys_open(path, 0, 0); + + *len = 0; + if (fd < 0) + return NULL; + + for (size = 1 << 9; size <= (PAGE_SIZE << MAX_ORDER); size <<= 1) { + void *p = kmalloc(size, GFP_KERNEL); + int n; + if (!p) + break; + n = do_read_dir(fd, p, size); + if (n > 0) { + sys_close(fd); + *len = n; + return p; + } + kfree(p); + if (n == -EINVAL) + continue; /* Try a larger buffer */ + if (n < 0) + break; + } + sys_close(fd); + return NULL; +} + +/* + * recursively scan , looking for a device node of type + */ +static int __init find_in_devfs(char *path, unsigned dev) +{ + char *end = path + strlen(path); + int rest = path + 64 - end; + int size; + char *p = read_dir(path, &size); + char *s; + + if (!p) + return -1; + for (s = p; s < p + size; s += ((struct linux_dirent64 *)s)->d_reclen) { + struct linux_dirent64 *d = (struct linux_dirent64 *)s; + if (strlen(d->d_name) + 2 > rest) + continue; + switch (d->d_type) { + case DT_BLK: + sprintf(end, "/%s", d->d_name); + if (bstat(path) != dev) + break; + kfree(p); + return 0; + case DT_DIR: + if (strcmp(d->d_name, ".") == 0) + break; + if (strcmp(d->d_name, "..") == 0) + break; + sprintf(end, "/%s", d->d_name); + if (find_in_devfs(path, dev) < 0) + break; + kfree(p); + return 0; + } + } + kfree(p); + return -1; +} + +/* + * create a device node called which points to + * if possible, otherwise find a device node + * which matches and make a symlink pointing to it. + */ +int __init create_dev(char *name, dev_t dev, char *devfs_name) +{ + char path[64]; + + sys_unlink(name); + if (devfs_name && devfs_name[0]) { + if (strncmp(devfs_name, "/dev/", 5) == 0) + devfs_name += 5; + sprintf(path, "/dev/%s", devfs_name); + if (sys_access(path, 0) == 0) + return sys_symlink(devfs_name, name); + } + if (!dev) + return -1; + strcpy(path, "/dev"); + if (find_in_devfs(path, new_encode_dev(dev)) < 0) + return -1; + return sys_symlink(path + 5, name); +} diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index a06f037fa..405f9031a 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -44,7 +44,7 @@ static void __init handle_initrd(void) int pid; real_root_dev = new_encode_dev(ROOT_DEV); - create_dev("/dev/root.old", Root_RAM0); + create_dev("/dev/root.old", Root_RAM0, NULL); /* mount initrd on rootfs' /root */ mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); sys_mkdir("/old", 0700); @@ -54,6 +54,7 @@ static void __init handle_initrd(void) sys_chdir("/root"); sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_chroot("."); + mount_devfs_fs (); current->flags |= PF_NOFREEZE; pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); @@ -70,6 +71,7 @@ static void __init handle_initrd(void) sys_chroot("."); sys_close(old_fd); sys_close(root_fd); + umount_devfs("/old/dev"); if (new_decode_dev(real_root_dev) == Root_RAM0) { sys_chdir("/old"); @@ -105,7 +107,7 @@ static void __init handle_initrd(void) int __init initrd_load(void) { if (mount_initrd) { - create_dev("/dev/ram", Root_RAM0); + create_dev("/dev/ram", Root_RAM0, NULL); /* * Load the initrd data into /dev/ram0. Execute it as initrd * unless /dev/ram0 is supposed to be our actual root device, diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 2429e1bf8..f6f36806f 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c @@ -125,18 +125,19 @@ static void __init md_setup_drive(void) int err = 0; char *devname; mdu_disk_info_t dinfo; - char name[16]; + char name[16], devfs_name[16]; minor = md_setup_args[ent].minor; partitioned = md_setup_args[ent].partitioned; devname = md_setup_args[ent].device_names; sprintf(name, "/dev/md%s%d", partitioned?"_d":"", minor); + sprintf(devfs_name, "/dev/md/%s%d", partitioned?"d":"", minor); if (partitioned) dev = MKDEV(mdp_major, minor << MdpMinorShift); else dev = MKDEV(MD_MAJOR, minor); - create_dev(name, dev); + create_dev(name, dev, devfs_name); for (i = 0; i < MD_SB_DISKS && devname != 0; i++) { char *p; char comp_name[64]; @@ -271,7 +272,7 @@ __setup("md=", md_setup); void __init md_run_setup(void) { - create_dev("/dev/md0", MKDEV(MD_MAJOR, 0)); + create_dev("/dev/md0", MKDEV(MD_MAJOR, 0), "md/0"); if (raid_noautodetect) printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); else { diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index ed652f40f..c2683fcd7 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -262,8 +262,8 @@ int __init rd_load_disk(int n) { if (rd_prompt) change_floppy("root floppy disk to be loaded into RAM disk"); - create_dev("/dev/root", ROOT_DEV); - create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n)); + create_dev("/dev/root", ROOT_DEV, root_device_name); + create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n), NULL); return rd_load_image("/dev/root"); } diff --git a/init/initramfs.c b/init/initramfs.c index d28c1094d..d936912d5 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -30,7 +30,6 @@ static void __init free(void *where) static __initdata struct hash { int ino, minor, major; - mode_t mode; struct hash *next; char name[N_ALIGN(PATH_MAX)]; } *head[32]; @@ -42,8 +41,7 @@ static inline int hash(int major, int minor, int ino) return tmp & 31; } -static char __init *find_link(int major, int minor, int ino, - mode_t mode, char *name) +static char __init *find_link(int major, int minor, int ino, char *name) { struct hash **p, *q; for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { @@ -53,17 +51,14 @@ static char __init *find_link(int major, int minor, int ino, continue; if ((*p)->major != major) continue; - if (((*p)->mode ^ mode) & S_IFMT) - continue; return (*p)->name; } q = (struct hash *)malloc(sizeof(struct hash)); if (!q) panic("can't allocate link hash entry"); - q->major = major; - q->minor = minor; q->ino = ino; - q->mode = mode; + q->minor = minor; + q->major = major; strcpy(q->name, name); q->next = NULL; *p = q; @@ -234,25 +229,13 @@ static int __init do_reset(void) static int __init maybe_link(void) { if (nlink >= 2) { - char *old = find_link(major, minor, ino, mode, collected); + char *old = find_link(major, minor, ino, collected); if (old) return (sys_link(old, collected) < 0) ? -1 : 1; } return 0; } -static void __init clean_path(char *path, mode_t mode) -{ - struct stat st; - - if (!sys_newlstat(path, &st) && (st.st_mode^mode) & S_IFMT) { - if (S_ISDIR(st.st_mode)) - sys_rmdir(path); - else - sys_unlink(path); - } -} - static __initdata int wfd; static int __init do_name(void) @@ -265,15 +248,10 @@ static int __init do_name(void) } if (dry_run) return 0; - clean_path(collected, mode); if (S_ISREG(mode)) { - int ml = maybe_link(); - if (ml >= 0) { - int openflags = O_WRONLY|O_CREAT; - if (ml != 1) - openflags |= O_TRUNC; - wfd = sys_open(collected, openflags, mode); - + sys_unlink(collected); + if (maybe_link() >= 0) { + wfd = sys_open(collected, O_WRONLY|O_CREAT, mode); if (wfd >= 0) { sys_fchown(wfd, uid, gid); sys_fchmod(wfd, mode); @@ -286,6 +264,7 @@ static int __init do_name(void) sys_chmod(collected, mode); } else if (S_ISBLK(mode) || S_ISCHR(mode) || S_ISFIFO(mode) || S_ISSOCK(mode)) { + sys_unlink(collected); if (maybe_link() == 0) { sys_mknod(collected, mode, rdev); sys_chown(collected, uid, gid); @@ -314,7 +293,7 @@ static int __init do_copy(void) static int __init do_symlink(void) { collected[N_ALIGN(name_len) + body_len] = '\0'; - clean_path(collected, 0); + sys_unlink(collected); sys_symlink(collected + N_ALIGN(name_len), collected); sys_lchown(collected, uid, gid); state = SkipIt; diff --git a/init/main.c b/init/main.c index 9b807dd46..495a5bc2f 100644 --- a/init/main.c +++ b/init/main.c @@ -11,9 +11,11 @@ #define __KERNEL_SYSCALLS__ +#include #include #include #include +#include #include #include #include @@ -41,16 +43,10 @@ #include #include #include -#include -#include #include #include #include #include -#include -#include -#include -#include #include #include @@ -83,6 +79,7 @@ extern void mca_init(void); extern void sbus_init(void); extern void sysctl_init(void); extern void signals_init(void); +extern void buffer_init(void); extern void pidhash_init(void); extern void pidmap_init(void); extern void prio_tree_init(void); @@ -352,10 +349,6 @@ static void __init setup_per_cpu_areas(void) } #endif /* !__GENERIC_PER_CPU */ -#include -#include -#include - /* Called by boot processor to activate the rest. */ static void __init smp_init(void) { @@ -377,15 +370,6 @@ static void __init smp_init(void) smp_commence(); #endif - - printk(KERN_DEBUG "sizeof(vma)=%u bytes\n", (unsigned int) sizeof(struct vm_area_struct)); - printk(KERN_DEBUG "sizeof(page)=%u bytes\n", (unsigned int) sizeof(struct page)); - printk(KERN_DEBUG "sizeof(inode)=%u bytes\n", (unsigned int) sizeof(struct inode)); - printk(KERN_DEBUG "sizeof(dentry)=%u bytes\n", (unsigned int) sizeof(struct dentry)); - printk(KERN_DEBUG "sizeof(ext3inode)=%u bytes\n", (unsigned int) sizeof(struct ext3_inode_info)); - printk(KERN_DEBUG "sizeof(buffer_head)=%u bytes\n", (unsigned int) sizeof(struct buffer_head)); - printk(KERN_DEBUG "sizeof(skbuff)=%u bytes\n", (unsigned int) sizeof(struct sk_buff)); - printk(KERN_DEBUG "sizeof(task_struct)=%u bytes\n", (unsigned int) sizeof(struct task_struct)); } #endif @@ -462,28 +446,10 @@ static void __init boot_cpu_init(void) cpu_set(cpu, cpu_possible_map); } -void __init __attribute__((weak)) smp_setup_processor_id(void) -{ -} - asmlinkage void __init start_kernel(void) { char * command_line; extern struct kernel_param __start___param[], __stop___param[]; - - smp_setup_processor_id(); - - /* - * Need to run as early as possible, to initialize the - * lockdep hash: - */ - unwind_init(); - lockdep_init(); - - local_irq_disable(); - early_boot_irqs_off(); - early_init_irq_lock_class(); - /* * Interrupts are still disabled. Do necessary setups, then * enable them @@ -523,13 +489,7 @@ asmlinkage void __init start_kernel(void) init_timers(); hrtimers_init(); softirq_init(); - timekeeping_init(); time_init(); - profile_init(); - if (!irqs_disabled()) - printk("start_kernel(): bug: interrupts were enabled early\n"); - early_boot_irqs_on(); - local_irq_enable(); /* * HACK ALERT! This is early. We're enabling the console before @@ -539,16 +499,8 @@ asmlinkage void __init start_kernel(void) console_init(); if (panic_later) panic(panic_later, panic_param); - - lockdep_info(); - - /* - * Need to run this when irqs are enabled, because it wants - * to self-test [hard/soft]-irqs on/off lock inversion bugs - * too: - */ - locking_selftest(); - + profile_init(); + local_irq_enable(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && initrd_start < min_low_pfn << PAGE_SHIFT) { @@ -589,8 +541,6 @@ asmlinkage void __init start_kernel(void) proc_root_init(); #endif cpuset_init(); - taskstats_init_early(); - delayacct_init(); check_bugs(); diff --git a/init/version.c b/init/version.c index 6b5a72e4a..b92ca0801 100644 --- a/init/version.c +++ b/init/version.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #define version(a) Version_ ## a diff --git a/ipc/compat.c b/ipc/compat.c index 4d20cfd38..a544dfbb0 100644 --- a/ipc/compat.c +++ b/ipc/compat.c @@ -21,6 +21,7 @@ * */ #include +#include #include #include #include diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 247d3a19d..71394ed08 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -8,8 +8,6 @@ * Lockless receive & send, fd based notify: * Manfred Spraul (manfred@colorfullife.com) * - * Audit: George Wilson (ltcgcw@us.ibm.com) - * * This file is released under the GPL. */ @@ -26,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -118,6 +115,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, int mode, inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mtime = inode->i_ctime = inode->i_atime = CURRENT_TIME; @@ -210,11 +208,11 @@ static int mqueue_fill_super(struct super_block *sb, void *data, int silent) return 0; } -static int mqueue_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *mqueue_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_single(fs_type, flags, data, mqueue_fill_super, mnt); + return get_sb_single(fs_type, flags, data, mqueue_fill_super); } static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) @@ -368,7 +366,7 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data, return count; } -static int mqueue_flush_file(struct file *filp, fl_owner_t id) +static int mqueue_flush_file(struct file *filp) { struct mqueue_inode_info *info = MQUEUE_I(filp->f_dentry->d_inode); @@ -669,10 +667,6 @@ asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode, char *name; int fd, error; - error = audit_mq_open(oflag, mode, u_attr); - if (error != 0) - return error; - if (IS_ERR(name = getname(u_name))) return PTR_ERR(name); @@ -830,10 +824,6 @@ asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr, long timeout; int ret; - ret = audit_mq_timedsend(mqdes, msg_len, msg_prio, u_abs_timeout); - if (ret != 0) - return ret; - if (unlikely(msg_prio >= (unsigned long) MQ_PRIO_MAX)) return -EINVAL; @@ -916,10 +906,6 @@ asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, struct mqueue_inode_info *info; struct ext_wait_queue wait; - ret = audit_mq_timedreceive(mqdes, msg_len, u_msg_prio, u_abs_timeout); - if (ret != 0) - return ret; - timeout = prepare_timeout(u_abs_timeout); ret = -EBADF; @@ -999,10 +985,6 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, struct mqueue_inode_info *info; struct sk_buff *nc; - ret = audit_mq_notify(mqdes, u_notification); - if (ret != 0) - return ret; - nc = NULL; sock = NULL; if (u_notification != NULL) { @@ -1143,9 +1125,6 @@ asmlinkage long sys_mq_getsetattr(mqd_t mqdes, omqstat = info->attr; omqstat.mq_flags = filp->f_flags & O_NONBLOCK; if (u_mqstat) { - ret = audit_mq_getsetattr(mqdes, &mqstat); - if (ret != 0) - goto out; if (mqstat.mq_flags & O_NONBLOCK) filp->f_flags |= O_NONBLOCK; else diff --git a/ipc/msg.c b/ipc/msg.c index 46942e7b4..b8f49397b 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -1,6 +1,6 @@ /* * linux/ipc/msg.c - * Copyright (C) 1992 Krishna Balasubramanian + * Copyright (C) 1992 Krishna Balasubramanian * * Removed all the remaining kerneld mess * Catch the -EFAULT stuff properly @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -42,24 +43,22 @@ int msg_ctlmax = MSGMAX; int msg_ctlmnb = MSGMNB; int msg_ctlmni = MSGMNI; -/* - * one msg_receiver structure for each sleeping receiver: - */ +/* one msg_receiver structure for each sleeping receiver */ struct msg_receiver { - struct list_head r_list; - struct task_struct *r_tsk; + struct list_head r_list; + struct task_struct* r_tsk; - int r_mode; - long r_msgtype; - long r_maxsize; + int r_mode; + long r_msgtype; + long r_maxsize; - volatile struct msg_msg *r_msg; + struct msg_msg* volatile r_msg; }; /* one msg_sender for each sleeping sender */ struct msg_sender { - struct list_head list; - struct task_struct *tsk; + struct list_head list; + struct task_struct* tsk; }; #define SEARCH_ANY 1 @@ -67,42 +66,45 @@ struct msg_sender { #define SEARCH_NOTEQUAL 3 #define SEARCH_LESSEQUAL 4 -static atomic_t msg_bytes = ATOMIC_INIT(0); -static atomic_t msg_hdrs = ATOMIC_INIT(0); +static atomic_t msg_bytes = ATOMIC_INIT(0); +static atomic_t msg_hdrs = ATOMIC_INIT(0); static struct ipc_ids msg_ids; -#define msg_lock(id) ((struct msg_queue *)ipc_lock(&msg_ids, id)) -#define msg_unlock(msq) ipc_unlock(&(msq)->q_perm) -#define msg_rmid(id) ((struct msg_queue *)ipc_rmid(&msg_ids, id)) -#define msg_checkid(msq, msgid) ipc_checkid(&msg_ids, &msq->q_perm, msgid) -#define msg_buildid(id, seq) ipc_buildid(&msg_ids, id, seq) +#define msg_lock(id) ((struct msg_queue*)ipc_lock(&msg_ids,id)) +#define msg_unlock(msq) ipc_unlock(&(msq)->q_perm) +#define msg_rmid(id) ((struct msg_queue*)ipc_rmid(&msg_ids,id)) +#define msg_checkid(msq, msgid) \ + ipc_checkid(&msg_ids,&msq->q_perm,msgid) +#define msg_buildid(id, seq) \ + ipc_buildid(&msg_ids, id, seq) -static void freeque(struct msg_queue *msq, int id); -static int newque(key_t key, int msgflg); +static void freeque (struct msg_queue *msq, int id); +static int newque (key_t key, int msgflg); #ifdef CONFIG_PROC_FS static int sysvipc_msg_proc_show(struct seq_file *s, void *it); #endif -void __init msg_init(void) +void __init msg_init (void) { - ipc_init_ids(&msg_ids, msg_ctlmni); + ipc_init_ids(&msg_ids,msg_ctlmni); ipc_init_proc_interface("sysvipc/msg", " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n", &msg_ids, sysvipc_msg_proc_show); } -static int newque(key_t key, int msgflg) +static int newque (key_t key, int msgflg) { + int id; + int retval; struct msg_queue *msq; - int id, retval; - msq = ipc_rcu_alloc(sizeof(*msq)); - if (!msq) + msq = ipc_rcu_alloc(sizeof(*msq)); + if (!msq) return -ENOMEM; - msq->q_perm.mode = msgflg & S_IRWXUGO; + msq->q_perm.mode = (msgflg & S_IRWXUGO); msq->q_perm.key = key; msq->q_perm.xid = vx_current_xid(); @@ -114,13 +116,13 @@ static int newque(key_t key, int msgflg) } id = ipc_addid(&msg_ids, &msq->q_perm, msg_ctlmni); - if (id == -1) { + if(id == -1) { security_msg_queue_free(msq); ipc_rcu_putref(msq); return -ENOSPC; } - msq->q_id = msg_buildid(id, msq->q_perm.seq); + msq->q_id = msg_buildid(id,msq->q_perm.seq); msq->q_stime = msq->q_rtime = 0; msq->q_ctime = get_seconds(); msq->q_cbytes = msq->q_qnum = 0; @@ -134,44 +136,44 @@ static int newque(key_t key, int msgflg) return msq->q_id; } -static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss) +static inline void ss_add(struct msg_queue* msq, struct msg_sender* mss) { - mss->tsk = current; - current->state = TASK_INTERRUPTIBLE; - list_add_tail(&mss->list, &msq->q_senders); + mss->tsk=current; + current->state=TASK_INTERRUPTIBLE; + list_add_tail(&mss->list,&msq->q_senders); } -static inline void ss_del(struct msg_sender *mss) +static inline void ss_del(struct msg_sender* mss) { - if (mss->list.next != NULL) + if(mss->list.next != NULL) list_del(&mss->list); } -static void ss_wakeup(struct list_head *h, int kill) +static void ss_wakeup(struct list_head* h, int kill) { struct list_head *tmp; tmp = h->next; while (tmp != h) { - struct msg_sender *mss; - - mss = list_entry(tmp, struct msg_sender, list); + struct msg_sender* mss; + + mss = list_entry(tmp,struct msg_sender,list); tmp = tmp->next; - if (kill) - mss->list.next = NULL; + if(kill) + mss->list.next=NULL; wake_up_process(mss->tsk); } } -static void expunge_all(struct msg_queue *msq, int res) +static void expunge_all(struct msg_queue* msq, int res) { struct list_head *tmp; tmp = msq->q_receivers.next; while (tmp != &msq->q_receivers) { - struct msg_receiver *msr; - - msr = list_entry(tmp, struct msg_receiver, r_list); + struct msg_receiver* msr; + + msr = list_entry(tmp,struct msg_receiver,r_list); tmp = tmp->next; msr->r_msg = NULL; wake_up_process(msr->r_tsk); @@ -179,28 +181,26 @@ static void expunge_all(struct msg_queue *msq, int res) msr->r_msg = ERR_PTR(res); } } - -/* - * freeque() wakes up waiters on the sender and receiver waiting queue, - * removes the message queue from message queue ID +/* + * freeque() wakes up waiters on the sender and receiver waiting queue, + * removes the message queue from message queue ID * array, and cleans up all the messages associated with this queue. * * msg_ids.mutex and the spinlock for this message queue is hold * before freeque() is called. msg_ids.mutex remains locked on exit. */ -static void freeque(struct msg_queue *msq, int id) +static void freeque (struct msg_queue *msq, int id) { struct list_head *tmp; - expunge_all(msq, -EIDRM); - ss_wakeup(&msq->q_senders, 1); + expunge_all(msq,-EIDRM); + ss_wakeup(&msq->q_senders,1); msq = msg_rmid(id); msg_unlock(msq); - + tmp = msq->q_messages.next; - while (tmp != &msq->q_messages) { - struct msg_msg *msg = list_entry(tmp, struct msg_msg, m_list); - + while(tmp != &msq->q_messages) { + struct msg_msg* msg = list_entry(tmp,struct msg_msg,m_list); tmp = tmp->next; atomic_dec(&msg_hdrs); free_msg(msg); @@ -210,10 +210,10 @@ static void freeque(struct msg_queue *msq, int id) ipc_rcu_putref(msq); } -asmlinkage long sys_msgget(key_t key, int msgflg) +asmlinkage long sys_msgget (key_t key, int msgflg) { - struct msg_queue *msq; int id, ret = -EPERM; + struct msg_queue *msq; mutex_lock(&msg_ids.mutex); if (key == IPC_PRIVATE) @@ -227,34 +227,31 @@ asmlinkage long sys_msgget(key_t key, int msgflg) ret = -EEXIST; } else { msq = msg_lock(id); - BUG_ON(msq == NULL); + BUG_ON(msq==NULL); if (ipcperms(&msq->q_perm, msgflg)) ret = -EACCES; else { int qid = msg_buildid(id, msq->q_perm.seq); - - ret = security_msg_queue_associate(msq, msgflg); + ret = security_msg_queue_associate(msq, msgflg); if (!ret) ret = qid; } msg_unlock(msq); } mutex_unlock(&msg_ids.mutex); - return ret; } -static inline unsigned long -copy_msqid_to_user(void __user *buf, struct msqid64_ds *in, int version) +static inline unsigned long copy_msqid_to_user(void __user *buf, struct msqid64_ds *in, int version) { switch(version) { case IPC_64: - return copy_to_user(buf, in, sizeof(*in)); + return copy_to_user (buf, in, sizeof(*in)); case IPC_OLD: - { + { struct msqid_ds out; - memset(&out, 0, sizeof(out)); + memset(&out,0,sizeof(out)); ipc64_perm_to_ipc_perm(&in->msg_perm, &out.msg_perm); @@ -262,18 +259,18 @@ copy_msqid_to_user(void __user *buf, struct msqid64_ds *in, int version) out.msg_rtime = in->msg_rtime; out.msg_ctime = in->msg_ctime; - if (in->msg_cbytes > USHRT_MAX) + if(in->msg_cbytes > USHRT_MAX) out.msg_cbytes = USHRT_MAX; else out.msg_cbytes = in->msg_cbytes; out.msg_lcbytes = in->msg_cbytes; - if (in->msg_qnum > USHRT_MAX) + if(in->msg_qnum > USHRT_MAX) out.msg_qnum = USHRT_MAX; else out.msg_qnum = in->msg_qnum; - if (in->msg_qbytes > USHRT_MAX) + if(in->msg_qbytes > USHRT_MAX) out.msg_qbytes = USHRT_MAX; else out.msg_qbytes = in->msg_qbytes; @@ -282,8 +279,8 @@ copy_msqid_to_user(void __user *buf, struct msqid64_ds *in, int version) out.msg_lspid = in->msg_lspid; out.msg_lrpid = in->msg_lrpid; - return copy_to_user(buf, &out, sizeof(out)); - } + return copy_to_user (buf, &out, sizeof(out)); + } default: return -EINVAL; } @@ -296,15 +293,14 @@ struct msq_setbuf { mode_t mode; }; -static inline unsigned long -copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version) +static inline unsigned long copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version) { switch(version) { case IPC_64: - { + { struct msqid64_ds tbuf; - if (copy_from_user(&tbuf, buf, sizeof(tbuf))) + if (copy_from_user (&tbuf, buf, sizeof (tbuf))) return -EFAULT; out->qbytes = tbuf.msg_qbytes; @@ -313,61 +309,60 @@ copy_msqid_from_user(struct msq_setbuf *out, void __user *buf, int version) out->mode = tbuf.msg_perm.mode; return 0; - } + } case IPC_OLD: - { + { struct msqid_ds tbuf_old; - if (copy_from_user(&tbuf_old, buf, sizeof(tbuf_old))) + if (copy_from_user (&tbuf_old, buf, sizeof (tbuf_old))) return -EFAULT; out->uid = tbuf_old.msg_perm.uid; out->gid = tbuf_old.msg_perm.gid; out->mode = tbuf_old.msg_perm.mode; - if (tbuf_old.msg_qbytes == 0) + if(tbuf_old.msg_qbytes == 0) out->qbytes = tbuf_old.msg_lqbytes; else out->qbytes = tbuf_old.msg_qbytes; return 0; - } + } default: return -EINVAL; } } -asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) +asmlinkage long sys_msgctl (int msqid, int cmd, struct msqid_ds __user *buf) { - struct kern_ipc_perm *ipcp; - struct msq_setbuf setbuf; - struct msg_queue *msq; int err, version; - + struct msg_queue *msq; + struct msq_setbuf setbuf; + struct kern_ipc_perm *ipcp; + if (msqid < 0 || cmd < 0) return -EINVAL; version = ipc_parse_version(&cmd); switch (cmd) { - case IPC_INFO: - case MSG_INFO: - { + case IPC_INFO: + case MSG_INFO: + { struct msginfo msginfo; int max_id; - if (!buf) return -EFAULT; - /* - * We must not return kernel stack data. + /* We must not return kernel stack data. * due to padding, it's not enough * to set all member fields. */ + err = security_msg_queue_msgctl(NULL, cmd); if (err) return err; - memset(&msginfo, 0, sizeof(msginfo)); + memset(&msginfo,0,sizeof(msginfo)); msginfo.msgmni = msg_ctlmni; msginfo.msgmax = msg_ctlmax; msginfo.msgmnb = msg_ctlmnb; @@ -385,37 +380,36 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) } max_id = msg_ids.max_id; mutex_unlock(&msg_ids.mutex); - if (copy_to_user(buf, &msginfo, sizeof(struct msginfo))) + if (copy_to_user (buf, &msginfo, sizeof(struct msginfo))) return -EFAULT; - return (max_id < 0) ? 0 : max_id; + return (max_id < 0) ? 0: max_id; } case MSG_STAT: case IPC_STAT: { struct msqid64_ds tbuf; int success_return; - if (!buf) return -EFAULT; - if (cmd == MSG_STAT && msqid >= msg_ids.entries->size) + if(cmd == MSG_STAT && msqid >= msg_ids.entries->size) return -EINVAL; - memset(&tbuf, 0, sizeof(tbuf)); + memset(&tbuf,0,sizeof(tbuf)); msq = msg_lock(msqid); if (msq == NULL) return -EINVAL; - if (cmd == MSG_STAT) { + if(cmd == MSG_STAT) { success_return = msg_buildid(msqid, msq->q_perm.seq); } else { err = -EIDRM; - if (msg_checkid(msq, msqid)) + if (msg_checkid(msq,msqid)) goto out_unlock; success_return = 0; } err = -EACCES; - if (ipcperms(&msq->q_perm, S_IRUGO)) + if (ipcperms (&msq->q_perm, S_IRUGO)) goto out_unlock; err = security_msg_queue_msgctl(msq, cmd); @@ -439,7 +433,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) case IPC_SET: if (!buf) return -EFAULT; - if (copy_msqid_from_user(&setbuf, buf, version)) + if (copy_msqid_from_user (&setbuf, buf, version)) return -EFAULT; break; case IPC_RMID: @@ -450,29 +444,23 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) mutex_lock(&msg_ids.mutex); msq = msg_lock(msqid); - err = -EINVAL; + err=-EINVAL; if (msq == NULL) goto out_up; err = -EIDRM; - if (msg_checkid(msq, msqid)) + if (msg_checkid(msq,msqid)) goto out_unlock_up; ipcp = &msq->q_perm; err = audit_ipc_obj(ipcp); if (err) goto out_unlock_up; - if (cmd==IPC_SET) { - err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid, - setbuf.mode); - if (err) - goto out_unlock_up; - } err = -EPERM; - if (current->euid != ipcp->cuid && + if (current->euid != ipcp->cuid && current->euid != ipcp->uid && !capable(CAP_SYS_ADMIN)) - /* We _could_ check for CAP_CHOWN above, but we don't */ + /* We _could_ check for CAP_CHOWN above, but we don't */ goto out_unlock_up; err = security_msg_queue_msgctl(msq, cmd); @@ -482,6 +470,10 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) switch (cmd) { case IPC_SET: { + err = audit_ipc_set_perm(setbuf.qbytes, setbuf.uid, setbuf.gid, setbuf.mode, ipcp); + if (err) + goto out_unlock_up; + err = -EPERM; if (setbuf.qbytes > msg_ctlmnb && !capable(CAP_SYS_RESOURCE)) goto out_unlock_up; @@ -490,22 +482,22 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) ipcp->uid = setbuf.uid; ipcp->gid = setbuf.gid; - ipcp->mode = (ipcp->mode & ~S_IRWXUGO) | - (S_IRWXUGO & setbuf.mode); + ipcp->mode = (ipcp->mode & ~S_IRWXUGO) | + (S_IRWXUGO & setbuf.mode); msq->q_ctime = get_seconds(); /* sleeping receivers might be excluded by * stricter permissions. */ - expunge_all(msq, -EAGAIN); + expunge_all(msq,-EAGAIN); /* sleeping senders might be able to send * due to a larger queue size. */ - ss_wakeup(&msq->q_senders, 0); + ss_wakeup(&msq->q_senders,0); msg_unlock(msq); break; } case IPC_RMID: - freeque(msq, msqid); + freeque (msq, msqid); break; } err = 0; @@ -520,44 +512,41 @@ out_unlock: return err; } -static int testmsg(struct msg_msg *msg, long type, int mode) +static int testmsg(struct msg_msg* msg,long type,int mode) { switch(mode) { case SEARCH_ANY: return 1; case SEARCH_LESSEQUAL: - if (msg->m_type <=type) + if(msg->m_type <=type) return 1; break; case SEARCH_EQUAL: - if (msg->m_type == type) + if(msg->m_type == type) return 1; break; case SEARCH_NOTEQUAL: - if (msg->m_type != type) + if(msg->m_type != type) return 1; break; } return 0; } -static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) +static inline int pipelined_send(struct msg_queue* msq, struct msg_msg* msg) { - struct list_head *tmp; + struct list_head* tmp; tmp = msq->q_receivers.next; while (tmp != &msq->q_receivers) { - struct msg_receiver *msr; - - msr = list_entry(tmp, struct msg_receiver, r_list); + struct msg_receiver* msr; + msr = list_entry(tmp,struct msg_receiver,r_list); tmp = tmp->next; - if (testmsg(msg, msr->r_msgtype, msr->r_mode) && - !security_msg_queue_msgrcv(msq, msg, msr->r_tsk, - msr->r_msgtype, msr->r_mode)) { - + if(testmsg(msg,msr->r_msgtype,msr->r_mode) && + !security_msg_queue_msgrcv(msq, msg, msr->r_tsk, msr->r_msgtype, msr->r_mode)) { list_del(&msr->r_list); - if (msr->r_maxsize < msg->m_ts) { + if(msr->r_maxsize < msg->m_ts) { msr->r_msg = NULL; wake_up_process(msr->r_tsk); smp_mb(); @@ -569,7 +558,6 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) wake_up_process(msr->r_tsk); smp_mb(); msr->r_msg = msg; - return 1; } } @@ -577,41 +565,40 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) return 0; } -asmlinkage long -sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) +asmlinkage long sys_msgsnd (int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) { struct msg_queue *msq; struct msg_msg *msg; long mtype; int err; - + if (msgsz > msg_ctlmax || (long) msgsz < 0 || msqid < 0) return -EINVAL; if (get_user(mtype, &msgp->mtype)) - return -EFAULT; + return -EFAULT; if (mtype < 1) return -EINVAL; msg = load_msg(msgp->mtext, msgsz); - if (IS_ERR(msg)) + if(IS_ERR(msg)) return PTR_ERR(msg); msg->m_type = mtype; msg->m_ts = msgsz; msq = msg_lock(msqid); - err = -EINVAL; - if (msq == NULL) + err=-EINVAL; + if(msq==NULL) goto out_free; err= -EIDRM; - if (msg_checkid(msq, msqid)) + if (msg_checkid(msq,msqid)) goto out_unlock_free; for (;;) { struct msg_sender s; - err = -EACCES; + err=-EACCES; if (ipcperms(&msq->q_perm, S_IWUGO)) goto out_unlock_free; @@ -619,14 +606,14 @@ sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) if (err) goto out_unlock_free; - if (msgsz + msq->q_cbytes <= msq->q_qbytes && + if(msgsz + msq->q_cbytes <= msq->q_qbytes && 1 + msq->q_qnum <= msq->q_qbytes) { break; } /* queue full, wait: */ - if (msgflg & IPC_NOWAIT) { - err = -EAGAIN; + if(msgflg&IPC_NOWAIT) { + err=-EAGAIN; goto out_unlock_free; } ss_add(msq, &s); @@ -641,9 +628,9 @@ sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) goto out_unlock_free; } ss_del(&s); - + if (signal_pending(current)) { - err = -ERESTARTNOHAND; + err=-ERESTARTNOHAND; goto out_unlock_free; } } @@ -651,47 +638,47 @@ sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) msq->q_lspid = current->tgid; msq->q_stime = get_seconds(); - if (!pipelined_send(msq, msg)) { + if(!pipelined_send(msq,msg)) { /* noone is waiting for this message, enqueue it */ - list_add_tail(&msg->m_list, &msq->q_messages); + list_add_tail(&msg->m_list,&msq->q_messages); msq->q_cbytes += msgsz; msq->q_qnum++; - atomic_add(msgsz, &msg_bytes); + atomic_add(msgsz,&msg_bytes); atomic_inc(&msg_hdrs); } - + err = 0; msg = NULL; out_unlock_free: msg_unlock(msq); out_free: - if (msg != NULL) + if(msg!=NULL) free_msg(msg); return err; } -static inline int convert_mode(long *msgtyp, int msgflg) +static inline int convert_mode(long* msgtyp, int msgflg) { - /* + /* * find message of correct type. * msgtyp = 0 => get first. * msgtyp > 0 => get first message of matching type. - * msgtyp < 0 => get message with least type must be < abs(msgtype). + * msgtyp < 0 => get message with least type must be < abs(msgtype). */ - if (*msgtyp == 0) + if(*msgtyp==0) return SEARCH_ANY; - if (*msgtyp < 0) { - *msgtyp = -*msgtyp; + if(*msgtyp<0) { + *msgtyp=-(*msgtyp); return SEARCH_LESSEQUAL; } - if (msgflg & MSG_EXCEPT) + if(msgflg & MSG_EXCEPT) return SEARCH_NOTEQUAL; return SEARCH_EQUAL; } -asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, - long msgtyp, int msgflg) +asmlinkage long sys_msgrcv (int msqid, struct msgbuf __user *msgp, size_t msgsz, + long msgtyp, int msgflg) { struct msg_queue *msq; struct msg_msg *msg; @@ -699,51 +686,44 @@ asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, if (msqid < 0 || (long) msgsz < 0) return -EINVAL; - mode = convert_mode(&msgtyp, msgflg); + mode = convert_mode(&msgtyp,msgflg); msq = msg_lock(msqid); - if (msq == NULL) + if(msq==NULL) return -EINVAL; msg = ERR_PTR(-EIDRM); - if (msg_checkid(msq, msqid)) + if (msg_checkid(msq,msqid)) goto out_unlock; for (;;) { struct msg_receiver msr_d; - struct list_head *tmp; + struct list_head* tmp; msg = ERR_PTR(-EACCES); - if (ipcperms(&msq->q_perm, S_IRUGO)) + if (ipcperms (&msq->q_perm, S_IRUGO)) goto out_unlock; msg = ERR_PTR(-EAGAIN); tmp = msq->q_messages.next; while (tmp != &msq->q_messages) { struct msg_msg *walk_msg; - - walk_msg = list_entry(tmp, struct msg_msg, m_list); - if (testmsg(walk_msg, msgtyp, mode) && - !security_msg_queue_msgrcv(msq, walk_msg, current, - msgtyp, mode)) { - + walk_msg = list_entry(tmp,struct msg_msg,m_list); + if(testmsg(walk_msg,msgtyp,mode) && + !security_msg_queue_msgrcv(msq, walk_msg, current, msgtyp, mode)) { msg = walk_msg; - if (mode == SEARCH_LESSEQUAL && - walk_msg->m_type != 1) { - msg = walk_msg; - msgtyp = walk_msg->m_type - 1; + if(mode == SEARCH_LESSEQUAL && walk_msg->m_type != 1) { + msg=walk_msg; + msgtyp=walk_msg->m_type-1; } else { - msg = walk_msg; + msg=walk_msg; break; } } tmp = tmp->next; } - if (!IS_ERR(msg)) { - /* - * Found a suitable message. - * Unlink it from the queue. - */ + if(!IS_ERR(msg)) { + /* Found a suitable message. Unlink it from the queue. */ if ((msgsz < msg->m_ts) && !(msgflg & MSG_NOERROR)) { msg = ERR_PTR(-E2BIG); goto out_unlock; @@ -753,9 +733,9 @@ asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, msq->q_rtime = get_seconds(); msq->q_lrpid = current->tgid; msq->q_cbytes -= msg->m_ts; - atomic_sub(msg->m_ts, &msg_bytes); + atomic_sub(msg->m_ts,&msg_bytes); atomic_dec(&msg_hdrs); - ss_wakeup(&msq->q_senders, 0); + ss_wakeup(&msq->q_senders,0); msg_unlock(msq); break; } @@ -764,13 +744,13 @@ asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, msg = ERR_PTR(-ENOMSG); goto out_unlock; } - list_add_tail(&msr_d.r_list, &msq->q_receivers); + list_add_tail(&msr_d.r_list,&msq->q_receivers); msr_d.r_tsk = current; msr_d.r_msgtype = msgtyp; msr_d.r_mode = mode; - if (msgflg & MSG_NOERROR) + if(msgflg & MSG_NOERROR) msr_d.r_maxsize = INT_MAX; - else + else msr_d.r_maxsize = msgsz; msr_d.r_msg = ERR_PTR(-EAGAIN); current->state = TASK_INTERRUPTIBLE; @@ -795,17 +775,17 @@ asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, * wake_up_process(). There is a race with exit(), see * ipc/mqueue.c for the details. */ - msg = (struct msg_msg*)msr_d.r_msg; + msg = (struct msg_msg*) msr_d.r_msg; while (msg == NULL) { cpu_relax(); - msg = (struct msg_msg *)msr_d.r_msg; + msg = (struct msg_msg*) msr_d.r_msg; } /* Lockless receive, part 3: * If there is a message or an error then accept it without * locking. */ - if (msg != ERR_PTR(-EAGAIN)) { + if(msg != ERR_PTR(-EAGAIN)) { rcu_read_unlock(); break; } @@ -820,7 +800,7 @@ asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, * Repeat test after acquiring the spinlock. */ msg = (struct msg_msg*)msr_d.r_msg; - if (msg != ERR_PTR(-EAGAIN)) + if(msg != ERR_PTR(-EAGAIN)) goto out_unlock; list_del(&msr_d.r_list); @@ -832,15 +812,14 @@ out_unlock: } } if (IS_ERR(msg)) - return PTR_ERR(msg); + return PTR_ERR(msg); msgsz = (msgsz > msg->m_ts) ? msg->m_ts : msgsz; if (put_user (msg->m_type, &msgp->mtype) || store_msg(msgp->mtext, msg, msgsz)) { - msgsz = -EFAULT; + msgsz = -EFAULT; } free_msg(msg); - return msgsz; } @@ -853,20 +832,20 @@ static int sysvipc_msg_proc_show(struct seq_file *s, void *it) return 0; return seq_printf(s, - "%10d %10d %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lu %10lu %10lu\n", - msq->q_perm.key, - msq->q_id, - msq->q_perm.mode, - msq->q_cbytes, - msq->q_qnum, - msq->q_lspid, - msq->q_lrpid, - msq->q_perm.uid, - msq->q_perm.gid, - msq->q_perm.cuid, - msq->q_perm.cgid, - msq->q_stime, - msq->q_rtime, - msq->q_ctime); + "%10d %10d %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lu %10lu %10lu\n", + msq->q_perm.key, + msq->q_id, + msq->q_perm.mode, + msq->q_cbytes, + msq->q_qnum, + msq->q_lspid, + msq->q_lrpid, + msq->q_perm.uid, + msq->q_perm.gid, + msq->q_perm.cuid, + msq->q_perm.cgid, + msq->q_stime, + msq->q_rtime, + msq->q_ctime); } #endif diff --git a/ipc/sem.c b/ipc/sem.c index 193b78dec..71f652c30 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -66,6 +66,7 @@ * Dustin Kirkland */ +#include #include #include #include @@ -829,11 +830,6 @@ static int semctl_down(int semid, int semnum, int cmd, int version, union semun if (err) goto out_unlock; - if (cmd == IPC_SET) { - err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode); - if (err) - goto out_unlock; - } if (current->euid != ipcp->cuid && current->euid != ipcp->uid && !capable(CAP_SYS_ADMIN)) { err=-EPERM; @@ -850,6 +846,9 @@ static int semctl_down(int semid, int semnum, int cmd, int version, union semun err = 0; break; case IPC_SET: + err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode, ipcp); + if (err) + goto out_unlock; ipcp->uid = setbuf.uid; ipcp->gid = setbuf.gid; ipcp->mode = (ipcp->mode & ~S_IRWXUGO) diff --git a/ipc/shm.c b/ipc/shm.c index 13b6b8c1f..6e83b5f71 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -17,6 +17,7 @@ * Dustin Kirkland */ +#include #include #include #include @@ -655,7 +656,7 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds __user *buf) err = audit_ipc_obj(&(shp->shm_perm)); if (err) goto out_unlock_up; - err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode); + err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode, &(shp->shm_perm)); if (err) goto out_unlock_up; err=-EPERM; @@ -710,6 +711,7 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) int err; unsigned long flags; unsigned long prot; + unsigned long o_flags; int acc_mode; void *user_addr; @@ -736,9 +738,11 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) if (shmflg & SHM_RDONLY) { prot = PROT_READ; + o_flags = O_RDONLY; acc_mode = S_IRUGO; } else { prot = PROT_READ | PROT_WRITE; + o_flags = O_RDWR; acc_mode = S_IRUGO | S_IWUGO; } if (shmflg & SHM_EXEC) { diff --git a/ipc/util.c b/ipc/util.c index 01ed75c23..5e30fdc44 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -14,6 +14,7 @@ * Dustin Kirkland */ +#include #include #include #include diff --git a/kernel/Makefile b/kernel/Makefile index cc9166e3f..e112d5754 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -8,33 +8,23 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \ signal.o sys.o kmod.o workqueue.o pid.o \ rcupdate.o extable.o params.o posix-timers.o \ kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ - hrtimer.o rwsem.o + hrtimer.o obj-y += vserver/ -obj-$(CONFIG_STACKTRACE) += stacktrace.o -obj-y += time/ obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o -obj-$(CONFIG_LOCKDEP) += lockdep.o -ifeq ($(CONFIG_PROC_FS),y) -obj-$(CONFIG_LOCKDEP) += lockdep_proc.o -endif obj-$(CONFIG_FUTEX) += futex.o ifeq ($(CONFIG_COMPAT),y) obj-$(CONFIG_FUTEX) += futex_compat.o endif -obj-$(CONFIG_RT_MUTEXES) += rtmutex.o -obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o -obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_SMP) += cpu.o spinlock.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o -obj-$(CONFIG_PROVE_LOCKING) += spinlock.o obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += module.o module-verify.o obj-$(CONFIG_MODULE_SIG) += module-verify-sig.o +obj-$(CONFIG_OBSOLETE_INTERMODULE) += intermodule.o obj-$(CONFIG_KALLSYMS) += kallsyms.o -obj-$(CONFIG_STACK_UNWIND) += unwind.o obj-$(CONFIG_PM) += power/ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o obj-$(CONFIG_KEXEC) += kexec.o @@ -51,8 +41,6 @@ obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ obj-$(CONFIG_SECCOMP) += seccomp.o obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o obj-$(CONFIG_RELAY) += relay.o -obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o -obj-$(CONFIG_TASKSTATS) += taskstats.o ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y) # According to Alan Modra , the -fno-omit-frame-pointer is diff --git a/kernel/acct.c b/kernel/acct.c index fa54eeb87..b327f4d20 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -43,6 +43,7 @@ * a struct file opened for write. Fixed. 2/6/2000, AV. */ +#include #include #include #include @@ -74,7 +75,7 @@ int acct_parm[3] = {4, 2, 30}; /* * External references and all of the globals. */ -static void do_acct_process(struct file *); +static void do_acct_process(long, struct file *); /* * This structure is used so that all the data protected by lock @@ -117,7 +118,7 @@ static int check_free_space(struct file *file) spin_unlock(&acct_globals.lock); /* May block */ - if (vfs_statfs(file->f_dentry, &sbuf)) + if (vfs_statfs(file->f_dentry->d_inode->i_sb, &sbuf)) return res; suspend = sbuf.f_blocks * SUSPEND; resume = sbuf.f_blocks * RESUME; @@ -195,7 +196,7 @@ static void acct_file_reopen(struct file *file) if (old_acct) { mnt_unpin(old_acct->f_vfsmnt); spin_unlock(&acct_globals.lock); - do_acct_process(old_acct); + do_acct_process(0, old_acct); filp_close(old_acct, NULL); spin_lock(&acct_globals.lock); } @@ -418,16 +419,16 @@ static u32 encode_float(u64 value) /* * do_acct_process does all actual work. Caller holds the reference to file. */ -static void do_acct_process(struct file *file) +static void do_acct_process(long exitcode, struct file *file) { - struct pacct_struct *pacct = ¤t->signal->pacct; acct_t ac; mm_segment_t fs; + unsigned long vsize; unsigned long flim; u64 elapsed; u64 run_time; struct timespec uptime; - struct tty_struct *tty; + unsigned long jiffies; /* * First check to see if there is enough free_space to continue @@ -468,6 +469,12 @@ static void do_acct_process(struct file *file) #endif do_div(elapsed, AHZ); ac.ac_btime = xtime.tv_sec - elapsed; + jiffies = cputime_to_jiffies(cputime_add(current->utime, + current->signal->utime)); + ac.ac_utime = encode_comp_t(jiffies_to_AHZ(jiffies)); + jiffies = cputime_to_jiffies(cputime_add(current->stime, + current->signal->stime)); + ac.ac_stime = encode_comp_t(jiffies_to_AHZ(jiffies)); /* we really need to bite the bullet and change layout */ ac.ac_uid = current->uid; ac.ac_gid = current->gid; @@ -484,23 +491,42 @@ static void do_acct_process(struct file *file) ac.ac_ppid = current->parent->tgid; #endif - mutex_lock(&tty_mutex); - tty = get_current_tty(); - ac.ac_tty = tty ? old_encode_dev(tty_devnum(tty)) : 0; - mutex_unlock(&tty_mutex); - - spin_lock_irq(¤t->sighand->siglock); - ac.ac_utime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_utime))); - ac.ac_stime = encode_comp_t(jiffies_to_AHZ(cputime_to_jiffies(pacct->ac_stime))); - ac.ac_flag = pacct->ac_flag; - ac.ac_mem = encode_comp_t(pacct->ac_mem); - ac.ac_minflt = encode_comp_t(pacct->ac_minflt); - ac.ac_majflt = encode_comp_t(pacct->ac_majflt); - ac.ac_exitcode = pacct->ac_exitcode; - spin_unlock_irq(¤t->sighand->siglock); + read_lock(&tasklist_lock); /* pin current->signal */ + ac.ac_tty = current->signal->tty ? + old_encode_dev(tty_devnum(current->signal->tty)) : 0; + read_unlock(&tasklist_lock); + + ac.ac_flag = 0; + if (current->flags & PF_FORKNOEXEC) + ac.ac_flag |= AFORK; + if (current->flags & PF_SUPERPRIV) + ac.ac_flag |= ASU; + if (current->flags & PF_DUMPCORE) + ac.ac_flag |= ACORE; + if (current->flags & PF_SIGNALED) + ac.ac_flag |= AXSIG; + + vsize = 0; + if (current->mm) { + struct vm_area_struct *vma; + down_read(¤t->mm->mmap_sem); + vma = current->mm->mmap; + while (vma) { + vsize += vma->vm_end - vma->vm_start; + vma = vma->vm_next; + } + up_read(¤t->mm->mmap_sem); + } + vsize = vsize / 1024; + ac.ac_mem = encode_comp_t(vsize); ac.ac_io = encode_comp_t(0 /* current->io_usage */); /* %% */ ac.ac_rw = encode_comp_t(ac.ac_io / 1024); + ac.ac_minflt = encode_comp_t(current->signal->min_flt + + current->min_flt); + ac.ac_majflt = encode_comp_t(current->signal->maj_flt + + current->maj_flt); ac.ac_swaps = encode_comp_t(0); + ac.ac_exitcode = exitcode; /* * Kernel segment override to datasegment and write it @@ -519,65 +545,13 @@ static void do_acct_process(struct file *file) set_fs(fs); } -/** - * acct_init_pacct - initialize a new pacct_struct - * @pacct: per-process accounting info struct to initialize - */ -void acct_init_pacct(struct pacct_struct *pacct) -{ - memset(pacct, 0, sizeof(struct pacct_struct)); - pacct->ac_utime = pacct->ac_stime = cputime_zero; -} - -/** - * acct_collect - collect accounting information into pacct_struct - * @exitcode: task exit code - * @group_dead: not 0, if this thread is the last one in the process. - */ -void acct_collect(long exitcode, int group_dead) -{ - struct pacct_struct *pacct = ¤t->signal->pacct; - unsigned long vsize = 0; - - if (group_dead && current->mm) { - struct vm_area_struct *vma; - down_read(¤t->mm->mmap_sem); - vma = current->mm->mmap; - while (vma) { - vsize += vma->vm_end - vma->vm_start; - vma = vma->vm_next; - } - up_read(¤t->mm->mmap_sem); - } - - spin_lock_irq(¤t->sighand->siglock); - if (group_dead) - pacct->ac_mem = vsize / 1024; - if (thread_group_leader(current)) { - pacct->ac_exitcode = exitcode; - if (current->flags & PF_FORKNOEXEC) - pacct->ac_flag |= AFORK; - } - if (current->flags & PF_SUPERPRIV) - pacct->ac_flag |= ASU; - if (current->flags & PF_DUMPCORE) - pacct->ac_flag |= ACORE; - if (current->flags & PF_SIGNALED) - pacct->ac_flag |= AXSIG; - pacct->ac_utime = cputime_add(pacct->ac_utime, current->utime); - pacct->ac_stime = cputime_add(pacct->ac_stime, current->stime); - pacct->ac_minflt += current->min_flt; - pacct->ac_majflt += current->maj_flt; - spin_unlock_irq(¤t->sighand->siglock); -} - /** * acct_process - now just a wrapper around do_acct_process * @exitcode: task exit code * * handles process accounting for an exiting task */ -void acct_process(void) +void acct_process(long exitcode) { struct file *file = NULL; @@ -596,7 +570,7 @@ void acct_process(void) get_file(file); spin_unlock(&acct_globals.lock); - do_acct_process(file); + do_acct_process(exitcode, file); fput(file); } @@ -625,7 +599,9 @@ void acct_update_integrals(struct task_struct *tsk) */ void acct_clear_integrals(struct task_struct *tsk) { - tsk->acct_stimexpd = 0; - tsk->acct_rss_mem1 = 0; - tsk->acct_vm_mem1 = 0; + if (tsk) { + tsk->acct_stimexpd = 0; + tsk->acct_rss_mem1 = 0; + tsk->acct_vm_mem1 = 0; + } } diff --git a/kernel/audit.c b/kernel/audit.c index 963fd15c9..df57b493e 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -56,7 +56,6 @@ #include #include #include -#include #include "audit.h" @@ -90,7 +89,6 @@ static int audit_backlog_wait_overflow = 0; /* The identity of the user shutting down the audit system. */ uid_t audit_sig_uid = -1; pid_t audit_sig_pid = -1; -u32 audit_sig_sid = 0; /* Records can be lost in several ways: 0) [suppressed in audit_alloc] @@ -104,12 +102,6 @@ static atomic_t audit_lost = ATOMIC_INIT(0); /* The netlink socket. */ static struct sock *audit_sock; -/* Inotify handle. */ -struct inotify_handle *audit_ih; - -/* Hash for inode-based rules */ -struct list_head audit_inode_hash[AUDIT_INODE_BUCKETS]; - /* The audit_freelist is a list of pre-allocated audit buffers (if more * than AUDIT_MAXFREE are in use, the audit buffer is freed instead of * being placed on the freelist). */ @@ -122,8 +114,10 @@ static struct task_struct *kauditd_task; static DECLARE_WAIT_QUEUE_HEAD(kauditd_wait); static DECLARE_WAIT_QUEUE_HEAD(audit_backlog_wait); -/* Serialize requests from userspace. */ -static DEFINE_MUTEX(audit_cmd_mutex); +/* The netlink socket is only to be read by 1 CPU, which lets us assume + * that list additions and deletions never happen simultaneously in + * auditsc.c */ +DEFINE_MUTEX(audit_netlink_mutex); /* AUDIT_BUFSIZ is the size of the temporary buffer used for formatting * audit records. Since printk uses a 1024 byte buffer, this buffer @@ -256,7 +250,7 @@ static int audit_set_rate_limit(int limit, uid_t loginuid, u32 sid) "audit_rate_limit=%d old=%d by auid=%u", limit, old, loginuid); audit_rate_limit = limit; - return 0; + return old; } static int audit_set_backlog_limit(int limit, uid_t loginuid, u32 sid) @@ -279,7 +273,7 @@ static int audit_set_backlog_limit(int limit, uid_t loginuid, u32 sid) "audit_backlog_limit=%d old=%d by auid=%u", limit, old, loginuid); audit_backlog_limit = limit; - return 0; + return old; } static int audit_set_enabled(int state, uid_t loginuid, u32 sid) @@ -305,7 +299,7 @@ static int audit_set_enabled(int state, uid_t loginuid, u32 sid) "audit_enabled=%d old=%d by auid=%u", state, old, loginuid); audit_enabled = state; - return 0; + return old; } static int audit_set_failure(int state, uid_t loginuid, u32 sid) @@ -333,7 +327,7 @@ static int audit_set_failure(int state, uid_t loginuid, u32 sid) "audit_failure=%d old=%d by auid=%u", state, old, loginuid); audit_failure = state; - return 0; + return old; } static int kauditd_thread(void *dummy) @@ -369,52 +363,9 @@ static int kauditd_thread(void *dummy) remove_wait_queue(&kauditd_wait, &wait); } } -} - -int audit_send_list(void *_dest) -{ - struct audit_netlink_list *dest = _dest; - int pid = dest->pid; - struct sk_buff *skb; - - /* wait for parent to finish and send an ACK */ - mutex_lock(&audit_cmd_mutex); - mutex_unlock(&audit_cmd_mutex); - - while ((skb = __skb_dequeue(&dest->q)) != NULL) - netlink_unicast(audit_sock, skb, pid, 0); - - kfree(dest); - return 0; } -struct sk_buff *audit_make_reply(int pid, int seq, int type, int done, - int multi, void *payload, int size) -{ - struct sk_buff *skb; - struct nlmsghdr *nlh; - int len = NLMSG_SPACE(size); - void *data; - int flags = multi ? NLM_F_MULTI : 0; - int t = done ? NLMSG_DONE : type; - - skb = alloc_skb(len, GFP_KERNEL); - if (!skb) - return NULL; - - nlh = NLMSG_PUT(skb, pid, seq, t, size); - nlh->nlmsg_flags = flags; - data = NLMSG_DATA(nlh); - memcpy(data, payload, size); - return skb; - -nlmsg_failure: /* Used by NLMSG_PUT */ - if (skb) - kfree_skb(skb); - return NULL; -} - /** * audit_send_reply - send an audit reply message via netlink * @pid: process id to send reply to @@ -432,20 +383,36 @@ void audit_send_reply(int pid, int seq, int type, int done, int multi, void *payload, int size) { struct sk_buff *skb; - skb = audit_make_reply(pid, seq, type, done, multi, payload, size); + struct nlmsghdr *nlh; + int len = NLMSG_SPACE(size); + void *data; + int flags = multi ? NLM_F_MULTI : 0; + int t = done ? NLMSG_DONE : type; + + skb = alloc_skb(len, GFP_KERNEL); if (!skb) return; + + nlh = NLMSG_PUT(skb, pid, seq, t, size); + nlh->nlmsg_flags = flags; + data = NLMSG_DATA(nlh); + memcpy(data, payload, size); + /* Ignore failure. It'll only happen if the sender goes away, because our timeout is set to infinite. */ netlink_unicast(audit_sock, skb, pid, 0); return; + +nlmsg_failure: /* Used by NLMSG_PUT */ + if (skb) + kfree_skb(skb); } /* * Check for appropriate CAP_AUDIT_ capabilities on incoming audit * control messages. */ -static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type) +static int audit_netlink_ok(kernel_cap_t eff_cap, u16 msg_type) { int err = 0; @@ -459,13 +426,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type) case AUDIT_DEL: case AUDIT_DEL_RULE: case AUDIT_SIGNAL_INFO: - if (security_netlink_recv(skb, CAP_AUDIT_CONTROL)) + if (!cap_raised(eff_cap, CAP_AUDIT_CONTROL)) err = -EPERM; break; case AUDIT_USER: case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG: case AUDIT_FIRST_USER_MSG2...AUDIT_LAST_USER_MSG2: - if (security_netlink_recv(skb, CAP_AUDIT_WRITE)) + if (!cap_raised(eff_cap, CAP_AUDIT_WRITE)) err = -EPERM; break; default: /* bad msg */ @@ -484,11 +451,9 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) struct audit_buffer *ab; u16 msg_type = nlh->nlmsg_type; uid_t loginuid; /* loginuid of sender */ - struct audit_sig_info *sig_data; - char *ctx; - u32 len; + struct audit_sig_info sig_data; - err = audit_netlink_ok(skb, msg_type); + err = audit_netlink_ok(NETLINK_CB(skb).eff_cap, msg_type); if (err) return err; @@ -538,9 +503,12 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) if (status_get->mask & AUDIT_STATUS_PID) { int old = audit_pid; if (sid) { - if ((err = selinux_ctxid_to_string( + char *ctx = NULL; + u32 len; + int rc; + if ((rc = selinux_ctxid_to_string( sid, &ctx, &len))) - return err; + return rc; else audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, @@ -555,10 +523,10 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) audit_pid = status_get->pid; } if (status_get->mask & AUDIT_STATUS_RATE_LIMIT) - err = audit_set_rate_limit(status_get->rate_limit, + audit_set_rate_limit(status_get->rate_limit, loginuid, sid); if (status_get->mask & AUDIT_STATUS_BACKLOG_LIMIT) - err = audit_set_backlog_limit(status_get->backlog_limit, + audit_set_backlog_limit(status_get->backlog_limit, loginuid, sid); break; case AUDIT_USER: @@ -576,6 +544,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) "user pid=%d uid=%u auid=%u", pid, uid, loginuid); if (sid) { + char *ctx = NULL; + u32 len; if (selinux_ctxid_to_string( sid, &ctx, &len)) { audit_log_format(ab, @@ -614,21 +584,10 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) loginuid, sid); break; case AUDIT_SIGNAL_INFO: - err = selinux_ctxid_to_string(audit_sig_sid, &ctx, &len); - if (err) - return err; - sig_data = kmalloc(sizeof(*sig_data) + len, GFP_KERNEL); - if (!sig_data) { - kfree(ctx); - return -ENOMEM; - } - sig_data->uid = audit_sig_uid; - sig_data->pid = audit_sig_pid; - memcpy(sig_data->ctx, ctx, len); - kfree(ctx); + sig_data.uid = audit_sig_uid; + sig_data.pid = audit_sig_pid; audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_SIGNAL_INFO, - 0, 0, sig_data, sizeof(*sig_data) + len); - kfree(sig_data); + 0, 0, &sig_data, sizeof(sig_data)); break; default: err = -EINVAL; @@ -670,28 +629,20 @@ static void audit_receive(struct sock *sk, int length) struct sk_buff *skb; unsigned int qlen; - mutex_lock(&audit_cmd_mutex); + mutex_lock(&audit_netlink_mutex); for (qlen = skb_queue_len(&sk->sk_receive_queue); qlen; qlen--) { skb = skb_dequeue(&sk->sk_receive_queue); audit_receive_skb(skb); kfree_skb(skb); } - mutex_unlock(&audit_cmd_mutex); + mutex_unlock(&audit_netlink_mutex); } -#ifdef CONFIG_AUDITSYSCALL -static const struct inotify_operations audit_inotify_ops = { - .handle_event = audit_handle_ievent, - .destroy_watch = audit_free_parent, -}; -#endif /* Initialize audit support at boot time. */ static int __init audit_init(void) { - int i; - printk(KERN_INFO "audit: initializing netlink socket (%s)\n", audit_default ? "enabled" : "disabled"); audit_sock = netlink_kernel_create(NETLINK_AUDIT, 0, audit_receive, @@ -710,16 +661,6 @@ static int __init audit_init(void) selinux_audit_set_callback(&selinux_audit_rule_update); audit_log(NULL, GFP_KERNEL, AUDIT_KERNEL, "initialized"); - -#ifdef CONFIG_AUDITSYSCALL - audit_ih = inotify_init(&audit_inotify_ops); - if (IS_ERR(audit_ih)) - audit_panic("cannot initialize inotify handle"); -#endif - - for (i = 0; i < AUDIT_INODE_BUCKETS; i++) - INIT_LIST_HEAD(&audit_inode_hash[i]); - return 0; } __initcall(audit_init); @@ -749,12 +690,10 @@ static void audit_buffer_free(struct audit_buffer *ab) kfree_skb(ab->skb); spin_lock_irqsave(&audit_freelist_lock, flags); - if (audit_freelist_count > AUDIT_MAXFREE) + if (++audit_freelist_count > AUDIT_MAXFREE) kfree(ab); - else { - audit_freelist_count++; + else list_add(&ab->list, &audit_freelist); - } spin_unlock_irqrestore(&audit_freelist_lock, flags); } @@ -816,7 +755,7 @@ err: */ unsigned int audit_serial(void) { - static DEFINE_SPINLOCK(serial_lock); + static spinlock_t serial_lock = SPIN_LOCK_UNLOCKED; static unsigned int serial = 0; unsigned long flags; @@ -1028,9 +967,6 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, struct sk_buff *skb; static const unsigned char *hex = "0123456789ABCDEF"; - if (!ab) - return; - BUG_ON(!ab->skb); skb = ab->skb; avail = skb_tailroom(skb); @@ -1052,79 +988,28 @@ void audit_log_hex(struct audit_buffer *ab, const unsigned char *buf, skb_put(skb, len << 1); /* new string is twice the old string */ } -/* - * Format a string of no more than slen characters into the audit buffer, - * enclosed in quote marks. - */ -static void audit_log_n_string(struct audit_buffer *ab, size_t slen, - const char *string) -{ - int avail, new_len; - unsigned char *ptr; - struct sk_buff *skb; - - if (!ab) - return; - - BUG_ON(!ab->skb); - skb = ab->skb; - avail = skb_tailroom(skb); - new_len = slen + 3; /* enclosing quotes + null terminator */ - if (new_len > avail) { - avail = audit_expand(ab, new_len); - if (!avail) - return; - } - ptr = skb->tail; - *ptr++ = '"'; - memcpy(ptr, string, slen); - ptr += slen; - *ptr++ = '"'; - *ptr = 0; - skb_put(skb, slen + 2); /* don't include null terminator */ -} - /** - * audit_log_n_unstrustedstring - log a string that may contain random characters + * audit_log_unstrustedstring - log a string that may contain random characters * @ab: audit_buffer - * @len: lenth of string (not including trailing null) * @string: string to be logged * * This code will escape a string that is passed to it if the string * contains a control character, unprintable character, double quote mark, * or a space. Unescaped strings will start and end with a double quote mark. * Strings that are escaped are printed in hex (2 digits per char). - * - * The caller specifies the number of characters in the string to log, which may - * or may not be the entire string. */ -const char *audit_log_n_untrustedstring(struct audit_buffer *ab, size_t len, - const char *string) +void audit_log_untrustedstring(struct audit_buffer *ab, const char *string) { const unsigned char *p = string; while (*p) { if (*p == '"' || *p < 0x21 || *p > 0x7f) { - audit_log_hex(ab, string, len); - return string + len + 1; + audit_log_hex(ab, string, strlen(string)); + return; } p++; } - audit_log_n_string(ab, len, string); - return p + 1; -} - -/** - * audit_log_unstrustedstring - log a string that may contain random characters - * @ab: audit_buffer - * @string: string to be logged - * - * Same as audit_log_n_unstrustedstring(), except that strlen is used to - * determine string length. - */ -const char *audit_log_untrustedstring(struct audit_buffer *ab, const char *string) -{ - return audit_log_n_untrustedstring(ab, strlen(string), string); + audit_log_format(ab, "\"%s\"", string); } /* This is a helper-function to print the escaped d_path */ diff --git a/kernel/audit.h b/kernel/audit.h index a3370232a..6f733920f 100644 --- a/kernel/audit.h +++ b/kernel/audit.h @@ -19,9 +19,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include -#include /* 0 = no checking 1 = put_count checking @@ -53,18 +53,6 @@ enum audit_state { }; /* Rule lists */ -struct audit_parent; - -struct audit_watch { - atomic_t count; /* reference count */ - char *path; /* insertion path */ - dev_t dev; /* associated superblock device */ - unsigned long ino; /* associated inode number */ - struct audit_parent *parent; /* associated parent */ - struct list_head wlist; /* entry in parent->watches list */ - struct list_head rules; /* associated rules */ -}; - struct audit_field { u32 type; u32 val; @@ -81,11 +69,7 @@ struct audit_krule { u32 mask[AUDIT_BITMASK_SIZE]; u32 buflen; /* for data alloc on list rules */ u32 field_count; - char *filterkey; /* ties events to rules */ struct audit_field *fields; - struct audit_field *inode_f; /* quick access to an inode field */ - struct audit_watch *watch; /* associated watch */ - struct list_head rlist; /* entry in audit_watch.rules list */ }; struct audit_entry { @@ -94,54 +78,15 @@ struct audit_entry { struct audit_krule rule; }; -extern int audit_pid; -#define AUDIT_INODE_BUCKETS 32 -extern struct list_head audit_inode_hash[AUDIT_INODE_BUCKETS]; - -static inline int audit_hash_ino(u32 ino) -{ - return (ino & (AUDIT_INODE_BUCKETS-1)); -} - -extern int audit_match_class(int class, unsigned syscall); +extern int audit_pid; extern int audit_comparator(const u32 left, const u32 op, const u32 right); -extern int audit_compare_dname_path(const char *dname, const char *path, - int *dirlen); -extern struct sk_buff * audit_make_reply(int pid, int seq, int type, - int done, int multi, - void *payload, int size); + extern void audit_send_reply(int pid, int seq, int type, int done, int multi, void *payload, int size); extern void audit_log_lost(const char *message); extern void audit_panic(const char *message); +extern struct mutex audit_netlink_mutex; -struct audit_netlink_list { - int pid; - struct sk_buff_head q; -}; - -int audit_send_list(void *); - -struct inotify_watch; -extern void audit_free_parent(struct inotify_watch *); -extern void audit_handle_ievent(struct inotify_watch *, u32, u32, u32, - const char *, struct inode *); extern int selinux_audit_rule_update(void); - -#ifdef CONFIG_AUDITSYSCALL -extern void __audit_signal_info(int sig, struct task_struct *t); -static inline void audit_signal_info(int sig, struct task_struct *t) -{ - if (unlikely(audit_pid && t->tgid == audit_pid)) - __audit_signal_info(sig, t); -} -extern enum audit_state audit_filter_inodes(struct task_struct *, - struct audit_context *); -extern void audit_set_auditable(struct audit_context *); -#else -#define audit_signal_info(s,t) -#define audit_filter_inodes(t,c) AUDIT_DISABLED -#define audit_set_auditable(c) -#endif diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index a44879b0c..7c134906d 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -22,59 +22,13 @@ #include #include #include -#include -#include -#include #include -#include -#include #include #include "audit.h" -/* - * Locking model: - * - * audit_filter_mutex: - * Synchronizes writes and blocking reads of audit's filterlist - * data. Rcu is used to traverse the filterlist and access - * contents of structs audit_entry, audit_watch and opaque - * selinux rules during filtering. If modified, these structures - * must be copied and replace their counterparts in the filterlist. - * An audit_parent struct is not accessed during filtering, so may - * be written directly provided audit_filter_mutex is held. - */ - -/* - * Reference counting: - * - * audit_parent: lifetime is from audit_init_parent() to receipt of an IN_IGNORED - * event. Each audit_watch holds a reference to its associated parent. - * - * audit_watch: if added to lists, lifetime is from audit_init_watch() to - * audit_remove_watch(). Additionally, an audit_watch may exist - * temporarily to assist in searching existing filter data. Each - * audit_krule holds a reference to its associated watch. - */ - -struct audit_parent { - struct list_head ilist; /* entry in inotify registration list */ - struct list_head watches; /* associated watches */ - struct inotify_watch wdata; /* inotify watch data */ - unsigned flags; /* status flags */ -}; - -/* - * audit_parent status flags: - * - * AUDIT_PARENT_INVALID - set anytime rules/watches are auto-removed due to - * a filesystem event to ensure we're adding audit watches to a valid parent. - * Technically not needed for IN_DELETE_SELF or IN_UNMOUNT events, as we cannot - * receive them while we have nameidata, but must be used for IN_MOVE_SELF which - * we can receive while holding nameidata. - */ -#define AUDIT_PARENT_INVALID 0x001 - -/* Audit filter lists, defined in */ +/* There are three lists of rules -- one to search at task creation + * time, one to search at syscall entry time, and another to search at + * syscall exit time. */ struct list_head audit_filter_list[AUDIT_NR_FILTERS] = { LIST_HEAD_INIT(audit_filter_list[0]), LIST_HEAD_INIT(audit_filter_list[1]), @@ -87,53 +41,9 @@ struct list_head audit_filter_list[AUDIT_NR_FILTERS] = { #endif }; -static DEFINE_MUTEX(audit_filter_mutex); - -/* Inotify handle */ -extern struct inotify_handle *audit_ih; - -/* Inotify events we care about. */ -#define AUDIT_IN_WATCH IN_MOVE|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF - -void audit_free_parent(struct inotify_watch *i_watch) -{ - struct audit_parent *parent; - - parent = container_of(i_watch, struct audit_parent, wdata); - WARN_ON(!list_empty(&parent->watches)); - kfree(parent); -} - -static inline void audit_get_watch(struct audit_watch *watch) -{ - atomic_inc(&watch->count); -} - -static void audit_put_watch(struct audit_watch *watch) -{ - if (atomic_dec_and_test(&watch->count)) { - WARN_ON(watch->parent); - WARN_ON(!list_empty(&watch->rules)); - kfree(watch->path); - kfree(watch); - } -} - -static void audit_remove_watch(struct audit_watch *watch) -{ - list_del(&watch->wlist); - put_inotify_watch(&watch->parent->wdata); - watch->parent = NULL; - audit_put_watch(watch); /* match initial get */ -} - static inline void audit_free_rule(struct audit_entry *e) { int i; - - /* some rules don't have associated watches */ - if (e->rule.watch) - audit_put_watch(e->rule.watch); if (e->rule.fields) for (i = 0; i < e->rule.field_count; i++) { struct audit_field *f = &e->rule.fields[i]; @@ -141,7 +51,6 @@ static inline void audit_free_rule(struct audit_entry *e) selinux_audit_rule_free(f->se_rule); } kfree(e->rule.fields); - kfree(e->rule.filterkey); kfree(e); } @@ -151,50 +60,6 @@ static inline void audit_free_rule_rcu(struct rcu_head *head) audit_free_rule(e); } -/* Initialize a parent watch entry. */ -static struct audit_parent *audit_init_parent(struct nameidata *ndp) -{ - struct audit_parent *parent; - s32 wd; - - parent = kzalloc(sizeof(*parent), GFP_KERNEL); - if (unlikely(!parent)) - return ERR_PTR(-ENOMEM); - - INIT_LIST_HEAD(&parent->watches); - parent->flags = 0; - - inotify_init_watch(&parent->wdata); - /* grab a ref so inotify watch hangs around until we take audit_filter_mutex */ - get_inotify_watch(&parent->wdata); - wd = inotify_add_watch(audit_ih, &parent->wdata, ndp->dentry->d_inode, - AUDIT_IN_WATCH); - if (wd < 0) { - audit_free_parent(&parent->wdata); - return ERR_PTR(wd); - } - - return parent; -} - -/* Initialize a watch entry. */ -static struct audit_watch *audit_init_watch(char *path) -{ - struct audit_watch *watch; - - watch = kzalloc(sizeof(*watch), GFP_KERNEL); - if (unlikely(!watch)) - return ERR_PTR(-ENOMEM); - - INIT_LIST_HEAD(&watch->rules); - atomic_set(&watch->count, 1); - watch->path = path; - watch->dev = (dev_t)-1; - watch->ino = (unsigned long)-1; - - return watch; -} - /* Initialize an audit filterlist entry. */ static inline struct audit_entry *audit_init_entry(u32 field_count) { @@ -242,75 +107,6 @@ static char *audit_unpack_string(void **bufp, size_t *remain, size_t len) return str; } -/* Translate an inode field to kernel respresentation. */ -static inline int audit_to_inode(struct audit_krule *krule, - struct audit_field *f) -{ - if (krule->listnr != AUDIT_FILTER_EXIT || - krule->watch || krule->inode_f) - return -EINVAL; - - krule->inode_f = f; - return 0; -} - -/* Translate a watch string to kernel respresentation. */ -static int audit_to_watch(struct audit_krule *krule, char *path, int len, - u32 op) -{ - struct audit_watch *watch; - - if (!audit_ih) - return -EOPNOTSUPP; - - if (path[0] != '/' || path[len-1] == '/' || - krule->listnr != AUDIT_FILTER_EXIT || - op & ~AUDIT_EQUAL || - krule->inode_f || krule->watch) /* 1 inode # per rule, for hash */ - return -EINVAL; - - watch = audit_init_watch(path); - if (unlikely(IS_ERR(watch))) - return PTR_ERR(watch); - - audit_get_watch(watch); - krule->watch = watch; - - return 0; -} - -static __u32 *classes[AUDIT_SYSCALL_CLASSES]; - -int __init audit_register_class(int class, unsigned *list) -{ - __u32 *p = kzalloc(AUDIT_BITMASK_SIZE * sizeof(__u32), GFP_KERNEL); - if (!p) - return -ENOMEM; - while (*list != ~0U) { - unsigned n = *list++; - if (n >= AUDIT_BITMASK_SIZE * 32 - AUDIT_SYSCALL_CLASSES) { - kfree(p); - return -EINVAL; - } - p[AUDIT_WORD(n)] |= AUDIT_BIT(n); - } - if (class >= AUDIT_SYSCALL_CLASSES || classes[class]) { - kfree(p); - return -EINVAL; - } - classes[class] = p; - return 0; -} - -int audit_match_class(int class, unsigned syscall) -{ - if (unlikely(syscall >= AUDIT_BITMASK_SIZE * sizeof(__u32))) - return 0; - if (unlikely(class >= AUDIT_SYSCALL_CLASSES || !classes[class])) - return 0; - return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall); -} - /* Common user-space to kernel rule translation. */ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) { @@ -332,11 +128,8 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) #endif ; } - if (unlikely(rule->action == AUDIT_POSSIBLE)) { - printk(KERN_ERR "AUDIT_POSSIBLE is deprecated\n"); - goto exit_err; - } - if (rule->action != AUDIT_NEVER && rule->action != AUDIT_ALWAYS) + if (rule->action != AUDIT_NEVER && rule->action != AUDIT_POSSIBLE && + rule->action != AUDIT_ALWAYS) goto exit_err; if (rule->field_count > AUDIT_MAX_FIELDS) goto exit_err; @@ -354,22 +147,6 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) for (i = 0; i < AUDIT_BITMASK_SIZE; i++) entry->rule.mask[i] = rule->mask[i]; - for (i = 0; i < AUDIT_SYSCALL_CLASSES; i++) { - int bit = AUDIT_BITMASK_SIZE * 32 - i - 1; - __u32 *p = &entry->rule.mask[AUDIT_WORD(bit)]; - __u32 *class; - - if (!(*p & AUDIT_BIT(bit))) - continue; - *p &= ~AUDIT_BIT(bit); - class = classes[i]; - if (class) { - int j; - for (j = 0; j < AUDIT_BITMASK_SIZE; j++) - entry->rule.mask[j] |= class[j]; - } - } - return entry; exit_err: @@ -381,7 +158,6 @@ exit_err: static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) { struct audit_entry *entry; - struct audit_field *f; int err = 0; int i; @@ -396,42 +172,14 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) f->type = rule->fields[i] & ~(AUDIT_NEGATE|AUDIT_OPERATORS); f->val = rule->values[i]; - err = -EINVAL; - switch(f->type) { - default: + if (f->type & AUDIT_UNUSED_BITS || + f->type == AUDIT_SE_USER || + f->type == AUDIT_SE_ROLE || + f->type == AUDIT_SE_TYPE || + f->type == AUDIT_SE_SEN || + f->type == AUDIT_SE_CLR) { + err = -EINVAL; goto exit_free; - case AUDIT_PID: - case AUDIT_UID: - case AUDIT_EUID: - case AUDIT_SUID: - case AUDIT_FSUID: - case AUDIT_GID: - case AUDIT_EGID: - case AUDIT_SGID: - case AUDIT_FSGID: - case AUDIT_LOGINUID: - case AUDIT_PERS: - case AUDIT_ARCH: - case AUDIT_MSGTYPE: - case AUDIT_PPID: - case AUDIT_DEVMAJOR: - case AUDIT_DEVMINOR: - case AUDIT_EXIT: - case AUDIT_SUCCESS: - case AUDIT_ARG0: - case AUDIT_ARG1: - case AUDIT_ARG2: - case AUDIT_ARG3: - break; - case AUDIT_PERM: - if (f->val & ~15) - goto exit_free; - break; - case AUDIT_INODE: - err = audit_to_inode(&entry->rule, f); - if (err) - goto exit_free; - break; } entry->rule.vers_ops = (f->op & AUDIT_OPERATORS) ? 2 : 1; @@ -448,19 +196,6 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) } } - f = entry->rule.inode_f; - if (f) { - switch(f->op) { - case AUDIT_NOT_EQUAL: - entry->rule.inode_f = NULL; - case AUDIT_EQUAL: - break; - default: - err = -EINVAL; - goto exit_free; - } - } - exit_nofree: return entry; @@ -475,7 +210,6 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, { int err = 0; struct audit_entry *entry; - struct audit_field *f; void *bufp; size_t remain = datasz - sizeof(struct audit_rule_data); int i; @@ -501,39 +235,11 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, f->se_str = NULL; f->se_rule = NULL; switch(f->type) { - case AUDIT_PID: - case AUDIT_UID: - case AUDIT_EUID: - case AUDIT_SUID: - case AUDIT_FSUID: - case AUDIT_GID: - case AUDIT_EGID: - case AUDIT_SGID: - case AUDIT_FSGID: - case AUDIT_LOGINUID: - case AUDIT_PERS: - case AUDIT_ARCH: - case AUDIT_MSGTYPE: - case AUDIT_PPID: - case AUDIT_DEVMAJOR: - case AUDIT_DEVMINOR: - case AUDIT_EXIT: - case AUDIT_SUCCESS: - case AUDIT_ARG0: - case AUDIT_ARG1: - case AUDIT_ARG2: - case AUDIT_ARG3: - break; - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: str = audit_unpack_string(&bufp, &remain, f->val); if (IS_ERR(str)) goto exit_free; @@ -554,52 +260,6 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, } else f->se_str = str; break; - case AUDIT_WATCH: - str = audit_unpack_string(&bufp, &remain, f->val); - if (IS_ERR(str)) - goto exit_free; - entry->rule.buflen += f->val; - - err = audit_to_watch(&entry->rule, str, f->val, f->op); - if (err) { - kfree(str); - goto exit_free; - } - break; - case AUDIT_INODE: - err = audit_to_inode(&entry->rule, f); - if (err) - goto exit_free; - break; - case AUDIT_FILTERKEY: - err = -EINVAL; - if (entry->rule.filterkey || f->val > AUDIT_MAX_KEY_LEN) - goto exit_free; - str = audit_unpack_string(&bufp, &remain, f->val); - if (IS_ERR(str)) - goto exit_free; - entry->rule.buflen += f->val; - entry->rule.filterkey = str; - break; - case AUDIT_PERM: - if (f->val & ~15) - goto exit_free; - break; - default: - goto exit_free; - } - } - - f = entry->rule.inode_f; - if (f) { - switch(f->op) { - case AUDIT_NOT_EQUAL: - entry->rule.inode_f = NULL; - case AUDIT_EQUAL: - break; - default: - err = -EINVAL; - goto exit_free; } } @@ -631,7 +291,7 @@ static struct audit_rule *audit_krule_to_rule(struct audit_krule *krule) rule = kmalloc(sizeof(*rule), GFP_KERNEL); if (unlikely(!rule)) - return NULL; + return ERR_PTR(-ENOMEM); memset(rule, 0, sizeof(*rule)); rule->flags = krule->flags | krule->listnr; @@ -662,7 +322,7 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) data = kmalloc(sizeof(*data) + krule->buflen, GFP_KERNEL); if (unlikely(!data)) - return NULL; + return ERR_PTR(-ENOMEM); memset(data, 0, sizeof(*data)); data->flags = krule->flags | krule->listnr; @@ -675,27 +335,14 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) data->fields[i] = f->type; data->fieldflags[i] = f->op; switch(f->type) { - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: data->buflen += data->values[i] = audit_pack_string(&bufp, f->se_str); break; - case AUDIT_WATCH: - data->buflen += data->values[i] = - audit_pack_string(&bufp, krule->watch->path); - break; - case AUDIT_FILTERKEY: - data->buflen += data->values[i] = - audit_pack_string(&bufp, krule->filterkey); - break; default: data->values[i] = f->val; } @@ -723,28 +370,14 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) return 1; switch(a->fields[i].type) { - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: if (strcmp(a->fields[i].se_str, b->fields[i].se_str)) return 1; break; - case AUDIT_WATCH: - if (strcmp(a->watch->path, b->watch->path)) - return 1; - break; - case AUDIT_FILTERKEY: - /* both filterkeys exist based on above type compare */ - if (strcmp(a->filterkey, b->filterkey)) - return 1; - break; default: if (a->fields[i].val != b->fields[i].val) return 1; @@ -758,32 +391,6 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) return 0; } -/* Duplicate the given audit watch. The new watch's rules list is initialized - * to an empty list and wlist is undefined. */ -static struct audit_watch *audit_dupe_watch(struct audit_watch *old) -{ - char *path; - struct audit_watch *new; - - path = kstrdup(old->path, GFP_KERNEL); - if (unlikely(!path)) - return ERR_PTR(-ENOMEM); - - new = audit_init_watch(path); - if (unlikely(IS_ERR(new))) { - kfree(path); - goto out; - } - - new->dev = old->dev; - new->ino = old->ino; - get_inotify_watch(&old->parent->wdata); - new->parent = old->parent; - -out: - return new; -} - /* Duplicate selinux field information. The se_rule is opaque, so must be * re-initialized. */ static inline int audit_dupe_selinux_field(struct audit_field *df, @@ -815,16 +422,12 @@ static inline int audit_dupe_selinux_field(struct audit_field *df, /* Duplicate an audit rule. This will be a deep copy with the exception * of the watch - that pointer is carried over. The selinux specific fields * will be updated in the copy. The point is to be able to replace the old - * rule with the new rule in the filterlist, then free the old rule. - * The rlist element is undefined; list manipulations are handled apart from - * the initial copy. */ -static struct audit_entry *audit_dupe_rule(struct audit_krule *old, - struct audit_watch *watch) + * rule with the new rule in the filterlist, then free the old rule. */ +static struct audit_entry *audit_dupe_rule(struct audit_krule *old) { u32 fcount = old->field_count; struct audit_entry *entry; struct audit_krule *new; - char *fk; int i, err = 0; entry = audit_init_entry(fcount); @@ -839,8 +442,6 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old, for (i = 0; i < AUDIT_BITMASK_SIZE; i++) new->mask[i] = old->mask[i]; new->buflen = old->buflen; - new->inode_f = old->inode_f; - new->watch = NULL; new->field_count = old->field_count; memcpy(new->fields, old->fields, sizeof(struct audit_field) * fcount); @@ -848,25 +449,13 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old, * the originals will all be freed when the old rule is freed. */ for (i = 0; i < fcount; i++) { switch (new->fields[i].type) { - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: err = audit_dupe_selinux_field(&new->fields[i], &old->fields[i]); - break; - case AUDIT_FILTERKEY: - fk = kstrdup(old->filterkey, GFP_KERNEL); - if (unlikely(!fk)) - err = -ENOMEM; - else - new->filterkey = fk; } if (err) { audit_free_rule(entry); @@ -874,442 +463,68 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old, } } - if (watch) { - audit_get_watch(watch); - new->watch = watch; - } - return entry; } -/* Update inode info in audit rules based on filesystem event. */ -static void audit_update_watch(struct audit_parent *parent, - const char *dname, dev_t dev, - unsigned long ino, unsigned invalidating) -{ - struct audit_watch *owatch, *nwatch, *nextw; - struct audit_krule *r, *nextr; - struct audit_entry *oentry, *nentry; - struct audit_buffer *ab; - - mutex_lock(&audit_filter_mutex); - list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { - if (audit_compare_dname_path(dname, owatch->path, NULL)) - continue; - - /* If the update involves invalidating rules, do the inode-based - * filtering now, so we don't omit records. */ - if (invalidating && - audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT) - audit_set_auditable(current->audit_context); - - nwatch = audit_dupe_watch(owatch); - if (unlikely(IS_ERR(nwatch))) { - mutex_unlock(&audit_filter_mutex); - audit_panic("error updating watch, skipping"); - return; - } - nwatch->dev = dev; - nwatch->ino = ino; - - list_for_each_entry_safe(r, nextr, &owatch->rules, rlist) { - - oentry = container_of(r, struct audit_entry, rule); - list_del(&oentry->rule.rlist); - list_del_rcu(&oentry->list); - - nentry = audit_dupe_rule(&oentry->rule, nwatch); - if (unlikely(IS_ERR(nentry))) - audit_panic("error updating watch, removing"); - else { - int h = audit_hash_ino((u32)ino); - list_add(&nentry->rule.rlist, &nwatch->rules); - list_add_rcu(&nentry->list, &audit_inode_hash[h]); - } - - call_rcu(&oentry->rcu, audit_free_rule_rcu); - } - - ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); - audit_log_format(ab, "audit updated rules specifying path="); - audit_log_untrustedstring(ab, owatch->path); - audit_log_format(ab, " with dev=%u ino=%lu\n", dev, ino); - audit_log_end(ab); - - audit_remove_watch(owatch); - goto add_watch_to_parent; /* event applies to a single watch */ - } - mutex_unlock(&audit_filter_mutex); - return; - -add_watch_to_parent: - list_add(&nwatch->wlist, &parent->watches); - mutex_unlock(&audit_filter_mutex); - return; -} - -/* Remove all watches & rules associated with a parent that is going away. */ -static void audit_remove_parent_watches(struct audit_parent *parent) -{ - struct audit_watch *w, *nextw; - struct audit_krule *r, *nextr; - struct audit_entry *e; - struct audit_buffer *ab; - - mutex_lock(&audit_filter_mutex); - parent->flags |= AUDIT_PARENT_INVALID; - list_for_each_entry_safe(w, nextw, &parent->watches, wlist) { - list_for_each_entry_safe(r, nextr, &w->rules, rlist) { - e = container_of(r, struct audit_entry, rule); - - ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); - audit_log_format(ab, "audit implicitly removed rule path="); - audit_log_untrustedstring(ab, w->path); - if (r->filterkey) { - audit_log_format(ab, " key="); - audit_log_untrustedstring(ab, r->filterkey); - } else - audit_log_format(ab, " key=(null)"); - audit_log_format(ab, " list=%d", r->listnr); - audit_log_end(ab); - - list_del(&r->rlist); - list_del_rcu(&e->list); - call_rcu(&e->rcu, audit_free_rule_rcu); - } - audit_remove_watch(w); - } - mutex_unlock(&audit_filter_mutex); -} - -/* Unregister inotify watches for parents on in_list. - * Generates an IN_IGNORED event. */ -static void audit_inotify_unregister(struct list_head *in_list) -{ - struct audit_parent *p, *n; - - list_for_each_entry_safe(p, n, in_list, ilist) { - list_del(&p->ilist); - inotify_rm_watch(audit_ih, &p->wdata); - /* the put matching the get in audit_do_del_rule() */ - put_inotify_watch(&p->wdata); - } -} - -/* Find an existing audit rule. - * Caller must hold audit_filter_mutex to prevent stale rule data. */ -static struct audit_entry *audit_find_rule(struct audit_entry *entry, - struct list_head *list) -{ - struct audit_entry *e, *found = NULL; - int h; - - if (entry->rule.watch) { - /* we don't know the inode number, so must walk entire hash */ - for (h = 0; h < AUDIT_INODE_BUCKETS; h++) { - list = &audit_inode_hash[h]; - list_for_each_entry(e, list, list) - if (!audit_compare_rule(&entry->rule, &e->rule)) { - found = e; - goto out; - } - } - goto out; - } - - list_for_each_entry(e, list, list) - if (!audit_compare_rule(&entry->rule, &e->rule)) { - found = e; - goto out; - } - -out: - return found; -} - -/* Get path information necessary for adding watches. */ -static int audit_get_nd(char *path, struct nameidata **ndp, - struct nameidata **ndw) -{ - struct nameidata *ndparent, *ndwatch; - int err; - - ndparent = kmalloc(sizeof(*ndparent), GFP_KERNEL); - if (unlikely(!ndparent)) - return -ENOMEM; - - ndwatch = kmalloc(sizeof(*ndwatch), GFP_KERNEL); - if (unlikely(!ndwatch)) { - kfree(ndparent); - return -ENOMEM; - } - - err = path_lookup(path, LOOKUP_PARENT, ndparent); - if (err) { - kfree(ndparent); - kfree(ndwatch); - return err; - } - - err = path_lookup(path, 0, ndwatch); - if (err) { - kfree(ndwatch); - ndwatch = NULL; - } - - *ndp = ndparent; - *ndw = ndwatch; - - return 0; -} - -/* Release resources used for watch path information. */ -static void audit_put_nd(struct nameidata *ndp, struct nameidata *ndw) -{ - if (ndp) { - path_release(ndp); - kfree(ndp); - } - if (ndw) { - path_release(ndw); - kfree(ndw); - } -} - -/* Associate the given rule with an existing parent inotify_watch. - * Caller must hold audit_filter_mutex. */ -static void audit_add_to_parent(struct audit_krule *krule, - struct audit_parent *parent) -{ - struct audit_watch *w, *watch = krule->watch; - int watch_found = 0; - - list_for_each_entry(w, &parent->watches, wlist) { - if (strcmp(watch->path, w->path)) - continue; - - watch_found = 1; - - /* put krule's and initial refs to temporary watch */ - audit_put_watch(watch); - audit_put_watch(watch); - - audit_get_watch(w); - krule->watch = watch = w; - break; - } - - if (!watch_found) { - get_inotify_watch(&parent->wdata); - watch->parent = parent; - - list_add(&watch->wlist, &parent->watches); - } - list_add(&krule->rlist, &watch->rules); -} - -/* Find a matching watch entry, or add this one. - * Caller must hold audit_filter_mutex. */ -static int audit_add_watch(struct audit_krule *krule, struct nameidata *ndp, - struct nameidata *ndw) -{ - struct audit_watch *watch = krule->watch; - struct inotify_watch *i_watch; - struct audit_parent *parent; - int ret = 0; - - /* update watch filter fields */ - if (ndw) { - watch->dev = ndw->dentry->d_inode->i_sb->s_dev; - watch->ino = ndw->dentry->d_inode->i_ino; - } - - /* The audit_filter_mutex must not be held during inotify calls because - * we hold it during inotify event callback processing. If an existing - * inotify watch is found, inotify_find_watch() grabs a reference before - * returning. - */ - mutex_unlock(&audit_filter_mutex); - - if (inotify_find_watch(audit_ih, ndp->dentry->d_inode, &i_watch) < 0) { - parent = audit_init_parent(ndp); - if (IS_ERR(parent)) { - /* caller expects mutex locked */ - mutex_lock(&audit_filter_mutex); - return PTR_ERR(parent); - } - } else - parent = container_of(i_watch, struct audit_parent, wdata); - - mutex_lock(&audit_filter_mutex); - - /* parent was moved before we took audit_filter_mutex */ - if (parent->flags & AUDIT_PARENT_INVALID) - ret = -ENOENT; - else - audit_add_to_parent(krule, parent); - - /* match get in audit_init_parent or inotify_find_watch */ - put_inotify_watch(&parent->wdata); - return ret; -} - -/* Add rule to given filterlist if not a duplicate. */ +/* Add rule to given filterlist if not a duplicate. Protected by + * audit_netlink_mutex. */ static inline int audit_add_rule(struct audit_entry *entry, - struct list_head *list) + struct list_head *list) { struct audit_entry *e; - struct audit_field *inode_f = entry->rule.inode_f; - struct audit_watch *watch = entry->rule.watch; - struct nameidata *ndp, *ndw; - int h, err, putnd_needed = 0; -#ifdef CONFIG_AUDITSYSCALL - int dont_count = 0; - - /* If either of these, don't count towards total */ - if (entry->rule.listnr == AUDIT_FILTER_USER || - entry->rule.listnr == AUDIT_FILTER_TYPE) - dont_count = 1; -#endif - - if (inode_f) { - h = audit_hash_ino(inode_f->val); - list = &audit_inode_hash[h]; - } - - mutex_lock(&audit_filter_mutex); - e = audit_find_rule(entry, list); - mutex_unlock(&audit_filter_mutex); - if (e) { - err = -EEXIST; - goto error; - } - /* Avoid calling path_lookup under audit_filter_mutex. */ - if (watch) { - err = audit_get_nd(watch->path, &ndp, &ndw); - if (err) - goto error; - putnd_needed = 1; - } - - mutex_lock(&audit_filter_mutex); - if (watch) { - /* audit_filter_mutex is dropped and re-taken during this call */ - err = audit_add_watch(&entry->rule, ndp, ndw); - if (err) { - mutex_unlock(&audit_filter_mutex); - goto error; - } - h = audit_hash_ino((u32)watch->ino); - list = &audit_inode_hash[h]; + /* Do not use the _rcu iterator here, since this is the only + * addition routine. */ + list_for_each_entry(e, list, list) { + if (!audit_compare_rule(&entry->rule, &e->rule)) + return -EEXIST; } if (entry->rule.flags & AUDIT_FILTER_PREPEND) { list_add_rcu(&entry->list, list); - entry->rule.flags &= ~AUDIT_FILTER_PREPEND; } else { list_add_tail_rcu(&entry->list, list); } -#ifdef CONFIG_AUDITSYSCALL - if (!dont_count) - audit_n_rules++; -#endif - mutex_unlock(&audit_filter_mutex); - - if (putnd_needed) - audit_put_nd(ndp, ndw); - - return 0; -error: - if (putnd_needed) - audit_put_nd(ndp, ndw); - if (watch) - audit_put_watch(watch); /* tmp watch, matches initial get */ - return err; + return 0; } -/* Remove an existing rule from filterlist. */ +/* Remove an existing rule from filterlist. Protected by + * audit_netlink_mutex. */ static inline int audit_del_rule(struct audit_entry *entry, struct list_head *list) { struct audit_entry *e; - struct audit_field *inode_f = entry->rule.inode_f; - struct audit_watch *watch, *tmp_watch = entry->rule.watch; - LIST_HEAD(inotify_list); - int h, ret = 0; -#ifdef CONFIG_AUDITSYSCALL - int dont_count = 0; - - /* If either of these, don't count towards total */ - if (entry->rule.listnr == AUDIT_FILTER_USER || - entry->rule.listnr == AUDIT_FILTER_TYPE) - dont_count = 1; -#endif - - if (inode_f) { - h = audit_hash_ino(inode_f->val); - list = &audit_inode_hash[h]; - } - - mutex_lock(&audit_filter_mutex); - e = audit_find_rule(entry, list); - if (!e) { - mutex_unlock(&audit_filter_mutex); - ret = -ENOENT; - goto out; - } - - watch = e->rule.watch; - if (watch) { - struct audit_parent *parent = watch->parent; - - list_del(&e->rule.rlist); - - if (list_empty(&watch->rules)) { - audit_remove_watch(watch); - if (list_empty(&parent->watches)) { - /* Put parent on the inotify un-registration - * list. Grab a reference before releasing - * audit_filter_mutex, to be released in - * audit_inotify_unregister(). */ - list_add(&parent->ilist, &inotify_list); - get_inotify_watch(&parent->wdata); - } + /* Do not use the _rcu iterator here, since this is the only + * deletion routine. */ + list_for_each_entry(e, list, list) { + if (!audit_compare_rule(&entry->rule, &e->rule)) { + list_del_rcu(&e->list); + call_rcu(&e->rcu, audit_free_rule_rcu); + return 0; } } - - list_del_rcu(&e->list); - call_rcu(&e->rcu, audit_free_rule_rcu); - -#ifdef CONFIG_AUDITSYSCALL - if (!dont_count) - audit_n_rules--; -#endif - mutex_unlock(&audit_filter_mutex); - - if (!list_empty(&inotify_list)) - audit_inotify_unregister(&inotify_list); - -out: - if (tmp_watch) - audit_put_watch(tmp_watch); /* match initial get */ - - return ret; + return -ENOENT; /* No matching rule */ } /* List rules using struct audit_rule. Exists for backward * compatibility with userspace. */ -static void audit_list(int pid, int seq, struct sk_buff_head *q) +static int audit_list(void *_dest) { - struct sk_buff *skb; + int pid, seq; + int *dest = _dest; struct audit_entry *entry; int i; - /* This is a blocking read, so use audit_filter_mutex instead of rcu - * iterator to sync with list writers. */ + pid = dest[0]; + seq = dest[1]; + kfree(dest); + + mutex_lock(&audit_netlink_mutex); + + /* The *_rcu iterators not needed here because we are + always called with audit_netlink_mutex held. */ for (i=0; irule); if (unlikely(!rule)) break; - skb = audit_make_reply(pid, seq, AUDIT_LIST, 0, 1, + audit_send_reply(pid, seq, AUDIT_LIST, 0, 1, rule, sizeof(*rule)); - if (skb) - skb_queue_tail(q, skb); kfree(rule); } } - for (i = 0; i < AUDIT_INODE_BUCKETS; i++) { - list_for_each_entry(entry, &audit_inode_hash[i], list) { - struct audit_rule *rule; - - rule = audit_krule_to_rule(&entry->rule); - if (unlikely(!rule)) - break; - skb = audit_make_reply(pid, seq, AUDIT_LIST, 0, 1, - rule, sizeof(*rule)); - if (skb) - skb_queue_tail(q, skb); - kfree(rule); - } - } - skb = audit_make_reply(pid, seq, AUDIT_LIST, 1, 1, NULL, 0); - if (skb) - skb_queue_tail(q, skb); + audit_send_reply(pid, seq, AUDIT_LIST, 1, 1, NULL, 0); + + mutex_unlock(&audit_netlink_mutex); + return 0; } /* List rules using struct audit_rule_data. */ -static void audit_list_rules(int pid, int seq, struct sk_buff_head *q) +static int audit_list_rules(void *_dest) { - struct sk_buff *skb; + int pid, seq; + int *dest = _dest; struct audit_entry *e; int i; - /* This is a blocking read, so use audit_filter_mutex instead of rcu - * iterator to sync with list writers. */ + pid = dest[0]; + seq = dest[1]; + kfree(dest); + + mutex_lock(&audit_netlink_mutex); + + /* The *_rcu iterators not needed here because we are + always called with audit_netlink_mutex held. */ for (i=0; irule); if (unlikely(!data)) break; - skb = audit_make_reply(pid, seq, AUDIT_LIST_RULES, 0, 1, - data, sizeof(*data) + data->buflen); - if (skb) - skb_queue_tail(q, skb); - kfree(data); - } - } - for (i=0; i< AUDIT_INODE_BUCKETS; i++) { - list_for_each_entry(e, &audit_inode_hash[i], list) { - struct audit_rule_data *data; - - data = audit_krule_to_data(&e->rule); - if (unlikely(!data)) - break; - skb = audit_make_reply(pid, seq, AUDIT_LIST_RULES, 0, 1, - data, sizeof(*data) + data->buflen); - if (skb) - skb_queue_tail(q, skb); + audit_send_reply(pid, seq, AUDIT_LIST_RULES, 0, 1, + data, sizeof(*data)); kfree(data); } } - skb = audit_make_reply(pid, seq, AUDIT_LIST_RULES, 1, 1, NULL, 0); - if (skb) - skb_queue_tail(q, skb); -} + audit_send_reply(pid, seq, AUDIT_LIST_RULES, 1, 1, NULL, 0); -/* Log rule additions and removals */ -static void audit_log_rule_change(uid_t loginuid, u32 sid, char *action, - struct audit_krule *rule, int res) -{ - struct audit_buffer *ab; - - ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); - if (!ab) - return; - audit_log_format(ab, "auid=%u", loginuid); - if (sid) { - char *ctx = NULL; - u32 len; - if (selinux_ctxid_to_string(sid, &ctx, &len)) - audit_log_format(ab, " ssid=%u", sid); - else - audit_log_format(ab, " subj=%s", ctx); - kfree(ctx); - } - audit_log_format(ab, " %s rule key=", action); - if (rule->filterkey) - audit_log_untrustedstring(ab, rule->filterkey); - else - audit_log_format(ab, "(null)"); - audit_log_format(ab, " list=%d res=%d", rule->listnr, res); - audit_log_end(ab); + mutex_unlock(&audit_netlink_mutex); + return 0; } /** @@ -1428,7 +592,7 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, size_t datasz, uid_t loginuid, u32 sid) { struct task_struct *tsk; - struct audit_netlink_list *dest; + int *dest; int err = 0; struct audit_entry *entry; @@ -1441,22 +605,18 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, * happen if we're actually running in the context of auditctl * trying to _send_ the stuff */ - dest = kmalloc(sizeof(struct audit_netlink_list), GFP_KERNEL); + dest = kmalloc(2 * sizeof(int), GFP_KERNEL); if (!dest) return -ENOMEM; - dest->pid = pid; - skb_queue_head_init(&dest->q); + dest[0] = pid; + dest[1] = seq; - mutex_lock(&audit_filter_mutex); if (type == AUDIT_LIST) - audit_list(pid, seq, &dest->q); + tsk = kthread_run(audit_list, dest, "audit_list"); else - audit_list_rules(pid, seq, &dest->q); - mutex_unlock(&audit_filter_mutex); - - tsk = kthread_run(audit_send_list, dest, "audit_send_list"); + tsk = kthread_run(audit_list_rules, dest, + "audit_list_rules"); if (IS_ERR(tsk)) { - skb_queue_purge(&dest->q); kfree(dest); err = PTR_ERR(tsk); } @@ -1472,7 +632,23 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, err = audit_add_rule(entry, &audit_filter_list[entry->rule.listnr]); - audit_log_rule_change(loginuid, sid, "add", &entry->rule, !err); + if (sid) { + char *ctx = NULL; + u32 len; + if (selinux_ctxid_to_string(sid, &ctx, &len)) { + /* Maybe call audit_panic? */ + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u ssid=%u add rule to list=%d res=%d", + loginuid, sid, entry->rule.listnr, !err); + } else + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u subj=%s add rule to list=%d res=%d", + loginuid, ctx, entry->rule.listnr, !err); + kfree(ctx); + } else + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u add rule to list=%d res=%d", + loginuid, entry->rule.listnr, !err); if (err) audit_free_rule(entry); @@ -1488,8 +664,24 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, err = audit_del_rule(entry, &audit_filter_list[entry->rule.listnr]); - audit_log_rule_change(loginuid, sid, "remove", &entry->rule, - !err); + + if (sid) { + char *ctx = NULL; + u32 len; + if (selinux_ctxid_to_string(sid, &ctx, &len)) { + /* Maybe call audit_panic? */ + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u ssid=%u remove rule from list=%d res=%d", + loginuid, sid, entry->rule.listnr, !err); + } else + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u subj=%s remove rule from list=%d res=%d", + loginuid, ctx, entry->rule.listnr, !err); + kfree(ctx); + } else + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u remove rule from list=%d res=%d", + loginuid, entry->rule.listnr, !err); audit_free_rule(entry); break; @@ -1520,43 +712,7 @@ int audit_comparator(const u32 left, const u32 op, const u32 right) return 0; } -/* Compare given dentry name with last component in given path, - * return of 0 indicates a match. */ -int audit_compare_dname_path(const char *dname, const char *path, - int *dirlen) -{ - int dlen, plen; - const char *p; - - if (!dname || !path) - return 1; - - dlen = strlen(dname); - plen = strlen(path); - if (plen < dlen) - return 1; - - /* disregard trailing slashes */ - p = path + plen - 1; - while ((*p == '/') && (p > path)) - p--; - - /* find last path component */ - p = p - dlen + 1; - if (p < path) - return 1; - else if (p > path) { - if (*--p != '/') - return 1; - else - p++; - } - /* return length of path's directory component */ - if (dirlen) - *dirlen = p - path; - return strncmp(p, dname, dlen); -} static int audit_filter_user_rules(struct netlink_skb_parms *cb, struct audit_krule *rule, @@ -1588,6 +744,7 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb, } switch (rule->action) { case AUDIT_NEVER: *state = AUDIT_DISABLED; break; + case AUDIT_POSSIBLE: *state = AUDIT_BUILD_CONTEXT; break; case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; } return 1; @@ -1649,16 +806,11 @@ static inline int audit_rule_has_selinux(struct audit_krule *rule) for (i = 0; i < rule->field_count; i++) { struct audit_field *f = &rule->fields[i]; switch (f->type) { - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: return 1; } } @@ -1674,65 +826,32 @@ static inline int audit_rule_has_selinux(struct audit_krule *rule) int selinux_audit_rule_update(void) { struct audit_entry *entry, *n, *nentry; - struct audit_watch *watch; int i, err = 0; - /* audit_filter_mutex synchronizes the writers */ - mutex_lock(&audit_filter_mutex); + /* audit_netlink_mutex synchronizes the writers */ + mutex_lock(&audit_netlink_mutex); for (i = 0; i < AUDIT_NR_FILTERS; i++) { list_for_each_entry_safe(entry, n, &audit_filter_list[i], list) { if (!audit_rule_has_selinux(&entry->rule)) continue; - watch = entry->rule.watch; - nentry = audit_dupe_rule(&entry->rule, watch); + nentry = audit_dupe_rule(&entry->rule); if (unlikely(IS_ERR(nentry))) { /* save the first error encountered for the * return value */ if (!err) err = PTR_ERR(nentry); audit_panic("error updating selinux filters"); - if (watch) - list_del(&entry->rule.rlist); list_del_rcu(&entry->list); } else { - if (watch) { - list_add(&nentry->rule.rlist, - &watch->rules); - list_del(&entry->rule.rlist); - } list_replace_rcu(&entry->list, &nentry->list); } call_rcu(&entry->rcu, audit_free_rule_rcu); } } - mutex_unlock(&audit_filter_mutex); + mutex_unlock(&audit_netlink_mutex); return err; } - -/* Update watch data in audit rules based on inotify events. */ -void audit_handle_ievent(struct inotify_watch *i_watch, u32 wd, u32 mask, - u32 cookie, const char *dname, struct inode *inode) -{ - struct audit_parent *parent; - - parent = container_of(i_watch, struct audit_parent, wdata); - - if (mask & (IN_CREATE|IN_MOVED_TO) && inode) - audit_update_watch(parent, dname, inode->i_sb->s_dev, - inode->i_ino, 0); - else if (mask & (IN_DELETE|IN_MOVED_FROM)) - audit_update_watch(parent, dname, (dev_t)-1, (unsigned long)-1, 1); - /* inotify automatically removes the watch and sends IN_IGNORED */ - else if (mask & (IN_DELETE_SELF|IN_UNMOUNT)) - audit_remove_parent_watches(parent); - /* inotify does not remove the watch, so remove it manually */ - else if(mask & IN_MOVE_SELF) { - audit_remove_parent_watches(parent); - inotify_remove_watch_locked(audit_ih, i_watch); - } else if (mask & IN_IGNORED) - put_inotify_watch(i_watch); -} diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 8fab061df..1c03a4ed1 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -3,7 +3,7 @@ * * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. * Copyright 2005 Hewlett-Packard Development Company, L.P. - * Copyright (C) 2005, 2006 IBM Corporation + * Copyright (C) 2005 IBM Corporation * All Rights Reserved. * * This program is free software; you can redistribute it and/or modify @@ -29,9 +29,6 @@ * this file -- see entry.S) is based on a GPL'd patch written by * okir@suse.de and Copyright 2003 SuSE Linux AG. * - * POSIX message queue support added by George Wilson , - * 2006. - * * The support of additional filter rules compares (>, <, >=, <=) was * added by Dustin Kirkland , 2005. * @@ -52,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -63,8 +59,6 @@ #include #include #include -#include -#include #include "audit.h" @@ -82,12 +76,6 @@ extern int audit_enabled; * path_lookup. */ #define AUDIT_NAMES_RESERVED 7 -/* Indicates that audit should log the full pathname. */ -#define AUDIT_NAME_FULL -1 - -/* number of audit rules */ -int audit_n_rules; - /* When fs/namei.c:getname() is called, we store the pointer in name and * we don't let putname() free it (instead we free all of the saved * pointers at syscall exit time). @@ -95,9 +83,8 @@ int audit_n_rules; * Further, in fs/namei.c:path_lookup() we store the inode and device. */ struct audit_names { const char *name; - int name_len; /* number of name's characters to log */ - unsigned name_put; /* call __putname() for this name */ unsigned long ino; + unsigned long pino; dev_t dev; umode_t mode; uid_t uid; @@ -113,33 +100,6 @@ struct audit_aux_data { #define AUDIT_AUX_IPCPERM 0 -struct audit_aux_data_mq_open { - struct audit_aux_data d; - int oflag; - mode_t mode; - struct mq_attr attr; -}; - -struct audit_aux_data_mq_sendrecv { - struct audit_aux_data d; - mqd_t mqdes; - size_t msg_len; - unsigned int msg_prio; - struct timespec abs_timeout; -}; - -struct audit_aux_data_mq_notify { - struct audit_aux_data d; - mqd_t mqdes; - struct sigevent notification; -}; - -struct audit_aux_data_mq_getsetattr { - struct audit_aux_data d; - mqd_t mqdes; - struct mq_attr mqstat; -}; - struct audit_aux_data_ipcctl { struct audit_aux_data d; struct ipc_perm p; @@ -150,13 +110,6 @@ struct audit_aux_data_ipcctl { u32 osid; }; -struct audit_aux_data_execve { - struct audit_aux_data d; - int argc; - int envc; - char mem[0]; -}; - struct audit_aux_data_socketcall { struct audit_aux_data d; int nargs; @@ -177,7 +130,6 @@ struct audit_aux_data_path { /* The per-task audit context. */ struct audit_context { - int dummy; /* must be the first element */ int in_syscall; /* 1 if task is in a syscall */ enum audit_state state; unsigned int serial; /* serial number for record */ @@ -190,14 +142,13 @@ struct audit_context { int auditable; /* 1 if record should be written */ int name_count; struct audit_names names[AUDIT_NAMES]; - char * filterkey; /* key for rule that triggered record */ struct dentry * pwd; struct vfsmount * pwdmnt; struct audit_context *previous; /* For nested syscalls */ struct audit_aux_data *aux; /* Save things to print about task_struct */ - pid_t pid, ppid; + pid_t pid; uid_t uid, euid, suid, fsuid; gid_t gid, egid, sgid, fsgid; unsigned long personality; @@ -209,61 +160,12 @@ struct audit_context { #endif }; -#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) -static inline int open_arg(int flags, int mask) -{ - int n = ACC_MODE(flags); - if (flags & (O_TRUNC | O_CREAT)) - n |= AUDIT_PERM_WRITE; - return n & mask; -} - -static int audit_match_perm(struct audit_context *ctx, int mask) -{ - unsigned n = ctx->major; - switch (audit_classify_syscall(ctx->arch, n)) { - case 0: /* native */ - if ((mask & AUDIT_PERM_WRITE) && - audit_match_class(AUDIT_CLASS_WRITE, n)) - return 1; - if ((mask & AUDIT_PERM_READ) && - audit_match_class(AUDIT_CLASS_READ, n)) - return 1; - if ((mask & AUDIT_PERM_ATTR) && - audit_match_class(AUDIT_CLASS_CHATTR, n)) - return 1; - return 0; - case 1: /* 32bit on biarch */ - if ((mask & AUDIT_PERM_WRITE) && - audit_match_class(AUDIT_CLASS_WRITE_32, n)) - return 1; - if ((mask & AUDIT_PERM_READ) && - audit_match_class(AUDIT_CLASS_READ_32, n)) - return 1; - if ((mask & AUDIT_PERM_ATTR) && - audit_match_class(AUDIT_CLASS_CHATTR_32, n)) - return 1; - return 0; - case 2: /* open */ - return mask & ACC_MODE(ctx->argv[1]); - case 3: /* openat */ - return mask & ACC_MODE(ctx->argv[2]); - case 4: /* socketcall */ - return ((mask & AUDIT_PERM_WRITE) && ctx->argv[0] == SYS_BIND); - case 5: /* execve */ - return mask & AUDIT_PERM_EXEC; - default: - return 0; - } -} -/* Determine if any context name data matches a rule's watch data */ /* Compare a task_struct with an audit_rule. Return 1 on match, 0 * otherwise. */ static int audit_filter_rules(struct task_struct *tsk, struct audit_krule *rule, struct audit_context *ctx, - struct audit_names *name, enum audit_state *state) { int i, j, need_sid = 1; @@ -277,10 +179,6 @@ static int audit_filter_rules(struct task_struct *tsk, case AUDIT_PID: result = audit_comparator(tsk->pid, f->op, f->val); break; - case AUDIT_PPID: - if (ctx) - result = audit_comparator(ctx->ppid, f->op, f->val); - break; case AUDIT_UID: result = audit_comparator(tsk->uid, f->op, f->val); break; @@ -326,10 +224,7 @@ static int audit_filter_rules(struct task_struct *tsk, } break; case AUDIT_DEVMAJOR: - if (name) - result = audit_comparator(MAJOR(name->dev), - f->op, f->val); - else if (ctx) { + if (ctx) { for (j = 0; j < ctx->name_count; j++) { if (audit_comparator(MAJOR(ctx->names[j].dev), f->op, f->val)) { ++result; @@ -339,10 +234,7 @@ static int audit_filter_rules(struct task_struct *tsk, } break; case AUDIT_DEVMINOR: - if (name) - result = audit_comparator(MINOR(name->dev), - f->op, f->val); - else if (ctx) { + if (ctx) { for (j = 0; j < ctx->name_count; j++) { if (audit_comparator(MINOR(ctx->names[j].dev), f->op, f->val)) { ++result; @@ -352,32 +244,26 @@ static int audit_filter_rules(struct task_struct *tsk, } break; case AUDIT_INODE: - if (name) - result = (name->ino == f->val); - else if (ctx) { + if (ctx) { for (j = 0; j < ctx->name_count; j++) { - if (audit_comparator(ctx->names[j].ino, f->op, f->val)) { + if (audit_comparator(ctx->names[j].ino, f->op, f->val) || + audit_comparator(ctx->names[j].pino, f->op, f->val)) { ++result; break; } } } break; - case AUDIT_WATCH: - if (name && rule->watch->ino != (unsigned long)-1) - result = (name->dev == rule->watch->dev && - name->ino == rule->watch->ino); - break; case AUDIT_LOGINUID: result = 0; if (ctx) result = audit_comparator(ctx->loginuid, f->op, f->val); break; - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: /* NOTE: this may return negative values indicating a temporary error. We simply treat this as a match for now to avoid losing information that @@ -394,46 +280,6 @@ static int audit_filter_rules(struct task_struct *tsk, ctx); } break; - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: - /* The above note for AUDIT_SUBJ_USER...AUDIT_SUBJ_CLR - also applies here */ - if (f->se_rule) { - /* Find files that match */ - if (name) { - result = selinux_audit_rule_match( - name->osid, f->type, f->op, - f->se_rule, ctx); - } else if (ctx) { - for (j = 0; j < ctx->name_count; j++) { - if (selinux_audit_rule_match( - ctx->names[j].osid, - f->type, f->op, - f->se_rule, ctx)) { - ++result; - break; - } - } - } - /* Find ipc objects that match */ - if (ctx) { - struct audit_aux_data *aux; - for (aux = ctx->aux; aux; - aux = aux->next) { - if (aux->type == AUDIT_IPC) { - struct audit_aux_data_ipcctl *axi = (void *)aux; - if (selinux_audit_rule_match(axi->osid, f->type, f->op, f->se_rule, ctx)) { - ++result; - break; - } - } - } - } - } - break; case AUDIT_ARG0: case AUDIT_ARG1: case AUDIT_ARG2: @@ -441,22 +287,14 @@ static int audit_filter_rules(struct task_struct *tsk, if (ctx) result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); break; - case AUDIT_FILTERKEY: - /* ignore this field for filtering */ - result = 1; - break; - case AUDIT_PERM: - result = audit_match_perm(ctx, f->val); - break; } if (!result) return 0; } - if (rule->filterkey) - ctx->filterkey = kstrdup(rule->filterkey, GFP_ATOMIC); switch (rule->action) { case AUDIT_NEVER: *state = AUDIT_DISABLED; break; + case AUDIT_POSSIBLE: *state = AUDIT_BUILD_CONTEXT; break; case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; } return 1; @@ -473,7 +311,7 @@ static enum audit_state audit_filter_task(struct task_struct *tsk) rcu_read_lock(); list_for_each_entry_rcu(e, &audit_filter_list[AUDIT_FILTER_TASK], list) { - if (audit_filter_rules(tsk, &e->rule, NULL, NULL, &state)) { + if (audit_filter_rules(tsk, &e->rule, NULL, &state)) { rcu_read_unlock(); return state; } @@ -503,9 +341,8 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, int bit = AUDIT_BIT(ctx->major); list_for_each_entry_rcu(e, list, list) { - if ((e->rule.mask[word] & bit) == bit && - audit_filter_rules(tsk, &e->rule, ctx, NULL, - &state)) { + if ((e->rule.mask[word] & bit) == bit + && audit_filter_rules(tsk, &e->rule, ctx, &state)) { rcu_read_unlock(); return state; } @@ -515,49 +352,6 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, return AUDIT_BUILD_CONTEXT; } -/* At syscall exit time, this filter is called if any audit_names[] have been - * collected during syscall processing. We only check rules in sublists at hash - * buckets applicable to the inode numbers in audit_names[]. - * Regarding audit_state, same rules apply as for audit_filter_syscall(). - */ -enum audit_state audit_filter_inodes(struct task_struct *tsk, - struct audit_context *ctx) -{ - int i; - struct audit_entry *e; - enum audit_state state; - - if (audit_pid && tsk->tgid == audit_pid) - return AUDIT_DISABLED; - - rcu_read_lock(); - for (i = 0; i < ctx->name_count; i++) { - int word = AUDIT_WORD(ctx->major); - int bit = AUDIT_BIT(ctx->major); - struct audit_names *n = &ctx->names[i]; - int h = audit_hash_ino((u32)n->ino); - struct list_head *list = &audit_inode_hash[h]; - - if (list_empty(list)) - continue; - - list_for_each_entry_rcu(e, list, list) { - if ((e->rule.mask[word] & bit) == bit && - audit_filter_rules(tsk, &e->rule, ctx, n, &state)) { - rcu_read_unlock(); - return state; - } - } - } - rcu_read_unlock(); - return AUDIT_BUILD_CONTEXT; -} - -void audit_set_auditable(struct audit_context *ctx) -{ - ctx->auditable = 1; -} - static inline struct audit_context *audit_get_context(struct task_struct *tsk, int return_valid, int return_code) @@ -569,23 +363,23 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk, context->return_valid = return_valid; context->return_code = return_code; - if (context->in_syscall && !context->dummy && !context->auditable) { + if (context->in_syscall && !context->auditable) { enum audit_state state; - state = audit_filter_syscall(tsk, context, &audit_filter_list[AUDIT_FILTER_EXIT]); - if (state == AUDIT_RECORD_CONTEXT) { - context->auditable = 1; - goto get_context; - } - - state = audit_filter_inodes(tsk, context); if (state == AUDIT_RECORD_CONTEXT) context->auditable = 1; - } -get_context: - + context->pid = tsk->pid; + context->uid = tsk->uid; + context->gid = tsk->gid; + context->euid = tsk->euid; + context->suid = tsk->suid; + context->fsuid = tsk->fsuid; + context->egid = tsk->egid; + context->sgid = tsk->sgid; + context->fsgid = tsk->fsgid; + context->personality = tsk->personality; tsk->audit_context = NULL; return context; } @@ -619,7 +413,7 @@ static inline void audit_free_names(struct audit_context *context) #endif for (i = 0; i < context->name_count; i++) { - if (context->names[i].name && context->names[i].name_put) + if (context->names[i].name) __putname(context->names[i].name); } context->name_count = 0; @@ -719,7 +513,6 @@ static inline void audit_free_context(struct audit_context *context) } audit_free_names(context); audit_free_aux(context); - kfree(context->filterkey); kfree(context); context = previous; } while (context); @@ -751,7 +544,8 @@ static void audit_log_task_context(struct audit_buffer *ab) return; error_path: - kfree(ctx); + if (ctx) + kfree(ctx); audit_panic("error in audit_log_task_context"); return; } @@ -794,17 +588,6 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts const char *tty; /* tsk == current */ - context->pid = tsk->pid; - context->ppid = sys_getppid(); /* sic. tsk == current in all cases */ - context->uid = tsk->uid; - context->gid = tsk->gid; - context->euid = tsk->euid; - context->suid = tsk->suid; - context->fsuid = tsk->fsuid; - context->egid = tsk->egid; - context->sgid = tsk->sgid; - context->fsgid = tsk->fsgid; - context->personality = tsk->personality; ab = audit_log_start(context, GFP_KERNEL, AUDIT_SYSCALL); if (!ab) @@ -817,17 +600,13 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts audit_log_format(ab, " success=%s exit=%ld", (context->return_valid==AUDITSC_SUCCESS)?"yes":"no", context->return_code); - - mutex_lock(&tty_mutex); - read_lock(&tasklist_lock); if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name) tty = tsk->signal->tty->name; else tty = "(none)"; - read_unlock(&tasklist_lock); audit_log_format(ab, " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" - " ppid=%d pid=%d auid=%u uid=%u gid=%u" + " pid=%d auid=%u uid=%u gid=%u" " euid=%u suid=%u fsuid=%u" " egid=%u sgid=%u fsgid=%u tty=%s", context->argv[0], @@ -835,22 +614,13 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts context->argv[2], context->argv[3], context->name_count, - context->ppid, context->pid, context->loginuid, context->uid, context->gid, context->euid, context->suid, context->fsuid, context->egid, context->sgid, context->fsgid, tty); - - mutex_unlock(&tty_mutex); - audit_log_task_info(ab, tsk); - if (context->filterkey) { - audit_log_format(ab, " key="); - audit_log_untrustedstring(ab, context->filterkey); - } else - audit_log_format(ab, " key=(null)"); audit_log_end(ab); for (aux = context->aux; aux; aux = aux->next) { @@ -860,48 +630,11 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts continue; /* audit_panic has been called */ switch (aux->type) { - case AUDIT_MQ_OPEN: { - struct audit_aux_data_mq_open *axi = (void *)aux; - audit_log_format(ab, - "oflag=0x%x mode=%#o mq_flags=0x%lx mq_maxmsg=%ld " - "mq_msgsize=%ld mq_curmsgs=%ld", - axi->oflag, axi->mode, axi->attr.mq_flags, - axi->attr.mq_maxmsg, axi->attr.mq_msgsize, - axi->attr.mq_curmsgs); - break; } - - case AUDIT_MQ_SENDRECV: { - struct audit_aux_data_mq_sendrecv *axi = (void *)aux; - audit_log_format(ab, - "mqdes=%d msg_len=%zd msg_prio=%u " - "abs_timeout_sec=%ld abs_timeout_nsec=%ld", - axi->mqdes, axi->msg_len, axi->msg_prio, - axi->abs_timeout.tv_sec, axi->abs_timeout.tv_nsec); - break; } - - case AUDIT_MQ_NOTIFY: { - struct audit_aux_data_mq_notify *axi = (void *)aux; - audit_log_format(ab, - "mqdes=%d sigev_signo=%d", - axi->mqdes, - axi->notification.sigev_signo); - break; } - - case AUDIT_MQ_GETSETATTR: { - struct audit_aux_data_mq_getsetattr *axi = (void *)aux; - audit_log_format(ab, - "mqdes=%d mq_flags=0x%lx mq_maxmsg=%ld mq_msgsize=%ld " - "mq_curmsgs=%ld ", - axi->mqdes, - axi->mqstat.mq_flags, axi->mqstat.mq_maxmsg, - axi->mqstat.mq_msgsize, axi->mqstat.mq_curmsgs); - break; } - case AUDIT_IPC: { struct audit_aux_data_ipcctl *axi = (void *)aux; audit_log_format(ab, - "ouid=%u ogid=%u mode=%x", - axi->uid, axi->gid, axi->mode); + " qbytes=%lx iuid=%u igid=%u mode=%x", + axi->qbytes, axi->uid, axi->gid, axi->mode); if (axi->osid != 0) { char *ctx = NULL; u32 len; @@ -919,18 +652,19 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts case AUDIT_IPC_SET_PERM: { struct audit_aux_data_ipcctl *axi = (void *)aux; audit_log_format(ab, - "qbytes=%lx ouid=%u ogid=%u mode=%x", + " new qbytes=%lx new iuid=%u new igid=%u new mode=%x", axi->qbytes, axi->uid, axi->gid, axi->mode); - break; } - - case AUDIT_EXECVE: { - struct audit_aux_data_execve *axi = (void *)aux; - int i; - const char *p; - for (i = 0, p = axi->mem; i < axi->argc; i++) { - audit_log_format(ab, "a%d=", i); - p = audit_log_untrustedstring(ab, p); - audit_log_format(ab, "\n"); + if (axi->osid != 0) { + char *ctx = NULL; + u32 len; + if (selinux_ctxid_to_string( + axi->osid, &ctx, &len)) { + audit_log_format(ab, " osid=%u", + axi->osid); + call_panic = 1; + } else + audit_log_format(ab, " obj=%s", ctx); + kfree(ctx); } break; } @@ -966,7 +700,8 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts } } for (i = 0; i < context->name_count; i++) { - struct audit_names *n = &context->names[i]; + unsigned long ino = context->names[i].ino; + unsigned long pino = context->names[i].pino; ab = audit_log_start(context, GFP_KERNEL, AUDIT_PATH); if (!ab) @@ -974,47 +709,33 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts audit_log_format(ab, "item=%d", i); - if (n->name) { - switch(n->name_len) { - case AUDIT_NAME_FULL: - /* log the full path */ - audit_log_format(ab, " name="); - audit_log_untrustedstring(ab, n->name); - break; - case 0: - /* name was specified as a relative path and the - * directory component is the cwd */ - audit_log_d_path(ab, " name=", context->pwd, - context->pwdmnt); - break; - default: - /* log the name's directory component */ - audit_log_format(ab, " name="); - audit_log_n_untrustedstring(ab, n->name_len, - n->name); - } - } else - audit_log_format(ab, " name=(null)"); - - if (n->ino != (unsigned long)-1) { - audit_log_format(ab, " inode=%lu" - " dev=%02x:%02x mode=%#o" - " ouid=%u ogid=%u rdev=%02x:%02x", - n->ino, - MAJOR(n->dev), - MINOR(n->dev), - n->mode, - n->uid, - n->gid, - MAJOR(n->rdev), - MINOR(n->rdev)); - } - if (n->osid != 0) { + audit_log_format(ab, " name="); + if (context->names[i].name) + audit_log_untrustedstring(ab, context->names[i].name); + else + audit_log_format(ab, "(null)"); + + if (pino != (unsigned long)-1) + audit_log_format(ab, " parent=%lu", pino); + if (ino != (unsigned long)-1) + audit_log_format(ab, " inode=%lu", ino); + if ((pino != (unsigned long)-1) || (ino != (unsigned long)-1)) + audit_log_format(ab, " dev=%02x:%02x mode=%#o" + " ouid=%u ogid=%u rdev=%02x:%02x", + MAJOR(context->names[i].dev), + MINOR(context->names[i].dev), + context->names[i].mode, + context->names[i].uid, + context->names[i].gid, + MAJOR(context->names[i].rdev), + MINOR(context->names[i].rdev)); + if (context->names[i].osid != 0) { char *ctx = NULL; u32 len; if (selinux_ctxid_to_string( - n->osid, &ctx, &len)) { - audit_log_format(ab, " osid=%u", n->osid); + context->names[i].osid, &ctx, &len)) { + audit_log_format(ab, " osid=%u", + context->names[i].osid); call_panic = 2; } else audit_log_format(ab, " obj=%s", ctx); @@ -1129,8 +850,7 @@ void audit_syscall_entry(int arch, int major, context->argv[3] = a4; state = context->state; - context->dummy = !audit_n_rules; - if (!context->dummy && (state == AUDIT_SETUP_CONTEXT || state == AUDIT_BUILD_CONTEXT)) + if (state == AUDIT_SETUP_CONTEXT || state == AUDIT_BUILD_CONTEXT) state = audit_filter_syscall(tsk, context, &audit_filter_list[AUDIT_FILTER_ENTRY]); if (likely(state == AUDIT_DISABLED)) return; @@ -1177,8 +897,6 @@ void audit_syscall_exit(int valid, long return_code) } else { audit_free_names(context); audit_free_aux(context); - kfree(context->filterkey); - context->filterkey = NULL; tsk->audit_context = context; } } @@ -1190,11 +908,11 @@ void audit_syscall_exit(int valid, long return_code) * Add a name to the list of audit names for this context. * Called from fs/namei.c:getname(). */ -void __audit_getname(const char *name) +void audit_getname(const char *name) { struct audit_context *context = current->audit_context; - if (IS_ERR(name) || !name) + if (!context || IS_ERR(name) || !name) return; if (!context->in_syscall) { @@ -1207,8 +925,6 @@ void __audit_getname(const char *name) } BUG_ON(context->name_count >= AUDIT_NAMES); context->names[context->name_count].name = name; - context->names[context->name_count].name_len = AUDIT_NAME_FULL; - context->names[context->name_count].name_put = 1; context->names[context->name_count].ino = (unsigned long)-1; ++context->name_count; if (!context->pwd) { @@ -1263,26 +979,23 @@ void audit_putname(const char *name) #endif } -/* Copy inode data into an audit_names. */ -static void audit_copy_inode(struct audit_names *name, const struct inode *inode) +static void audit_inode_context(int idx, const struct inode *inode) { - name->ino = inode->i_ino; - name->dev = inode->i_sb->s_dev; - name->mode = inode->i_mode; - name->uid = inode->i_uid; - name->gid = inode->i_gid; - name->rdev = inode->i_rdev; - selinux_get_inode_sid(inode, &name->osid); + struct audit_context *context = current->audit_context; + + selinux_get_inode_sid(inode, &context->names[idx].osid); } + /** * audit_inode - store the inode and device from a lookup * @name: name being audited * @inode: inode being audited + * @flags: lookup flags (as used in path_lookup()) * * Called from fs/namei.c:path_lookup(). */ -void __audit_inode(const char *name, const struct inode *inode) +void __audit_inode(const char *name, const struct inode *inode, unsigned flags) { int idx; struct audit_context *context = current->audit_context; @@ -1302,28 +1015,33 @@ void __audit_inode(const char *name, const struct inode *inode) * associated name? */ if (context->name_count >= AUDIT_NAMES - AUDIT_NAMES_RESERVED) return; - idx = context->name_count; - if (context->name_count == (AUDIT_NAMES - 1)) { - printk(KERN_DEBUG - "name_count maxed and losing entry [%d]=%s\n", - context->name_count, - context->names[context->name_count].name ?: - "(null)"); - } else - context->name_count++; + idx = context->name_count++; context->names[idx].name = NULL; #if AUDIT_DEBUG ++context->ino_count; #endif } - audit_copy_inode(&context->names[idx], inode); + context->names[idx].dev = inode->i_sb->s_dev; + context->names[idx].mode = inode->i_mode; + context->names[idx].uid = inode->i_uid; + context->names[idx].gid = inode->i_gid; + context->names[idx].rdev = inode->i_rdev; + audit_inode_context(idx, inode); + if ((flags & LOOKUP_PARENT) && (strcmp(name, "/") != 0) && + (strcmp(name, ".") != 0)) { + context->names[idx].ino = (unsigned long)-1; + context->names[idx].pino = inode->i_ino; + } else { + context->names[idx].ino = inode->i_ino; + context->names[idx].pino = (unsigned long)-1; + } } /** * audit_inode_child - collect inode info for created/removed objects * @dname: inode's dentry name * @inode: inode being audited - * @parent: inode of dentry parent + * @pino: inode number of dentry parent * * For syscalls that create or remove filesystem objects, audit_inode * can only collect information for the filesystem object's parent. @@ -1334,103 +1052,66 @@ void __audit_inode(const char *name, const struct inode *inode) * unsuccessful attempts. */ void __audit_inode_child(const char *dname, const struct inode *inode, - const struct inode *parent) + unsigned long pino) { int idx; struct audit_context *context = current->audit_context; - const char *found_name = NULL; - int dirlen = 0; if (!context->in_syscall) return; /* determine matching parent */ - if (!dname) - goto update_context; - for (idx = 0; idx < context->name_count; idx++) - if (context->names[idx].ino == parent->i_ino) { - const char *name = context->names[idx].name; - - if (!name) - continue; - - if (audit_compare_dname_path(dname, name, &dirlen) == 0) { - context->names[idx].name_len = dirlen; - found_name = name; - break; + if (dname) + for (idx = 0; idx < context->name_count; idx++) + if (context->names[idx].pino == pino) { + const char *n; + const char *name = context->names[idx].name; + int dlen = strlen(dname); + int nlen = name ? strlen(name) : 0; + + if (nlen < dlen) + continue; + + /* disregard trailing slashes */ + n = name + nlen - 1; + while ((*n == '/') && (n > name)) + n--; + + /* find last path component */ + n = n - dlen + 1; + if (n < name) + continue; + else if (n > name) { + if (*--n != '/') + continue; + else + n++; + } + + if (strncmp(n, dname, dlen) == 0) + goto update_context; } - } -update_context: - idx = context->name_count; - if (context->name_count == (AUDIT_NAMES - 1)) { - printk(KERN_DEBUG "name_count maxed and losing entry [%d]=%s\n", - context->name_count, - context->names[context->name_count].name ?: "(null)"); - } else - context->name_count++; + /* catch-all in case match not found */ + idx = context->name_count++; + context->names[idx].name = NULL; + context->names[idx].pino = pino; #if AUDIT_DEBUG context->ino_count++; #endif - /* Re-use the name belonging to the slot for a matching parent directory. - * All names for this context are relinquished in audit_free_names() */ - context->names[idx].name = found_name; - context->names[idx].name_len = AUDIT_NAME_FULL; - context->names[idx].name_put = 0; /* don't call __putname() */ - - if (!inode) - context->names[idx].ino = (unsigned long)-1; - else - audit_copy_inode(&context->names[idx], inode); - - /* A parent was not found in audit_names, so copy the inode data for the - * provided parent. */ - if (!found_name) { - idx = context->name_count; - if (context->name_count == (AUDIT_NAMES - 1)) { - printk(KERN_DEBUG - "name_count maxed and losing entry [%d]=%s\n", - context->name_count, - context->names[context->name_count].name ?: - "(null)"); - } else - context->name_count++; -#if AUDIT_DEBUG - context->ino_count++; -#endif - audit_copy_inode(&context->names[idx], parent); - } -} -/** - * audit_inode_update - update inode info for last collected name - * @inode: inode being audited - * - * When open() is called on an existing object with the O_CREAT flag, the inode - * data audit initially collects is incorrect. This additional hook ensures - * audit has the inode data for the actual object to be opened. - */ -void __audit_inode_update(const struct inode *inode) -{ - struct audit_context *context = current->audit_context; - int idx; - - if (!context->in_syscall || !inode) - return; - - if (context->name_count == 0) { - context->name_count++; -#if AUDIT_DEBUG - context->ino_count++; -#endif +update_context: + if (inode) { + context->names[idx].ino = inode->i_ino; + context->names[idx].dev = inode->i_sb->s_dev; + context->names[idx].mode = inode->i_mode; + context->names[idx].uid = inode->i_uid; + context->names[idx].gid = inode->i_gid; + context->names[idx].rdev = inode->i_rdev; + audit_inode_context(idx, inode); } - idx = context->name_count - 1; - - audit_copy_inode(&context->names[idx], inode); } -EXPORT_SYMBOL_GPL(__audit_inode_child); - /** * auditsc_get_stamp - get local copies of audit_context values * @ctx: audit_context for the task @@ -1461,23 +1142,18 @@ void auditsc_get_stamp(struct audit_context *ctx, */ int audit_set_loginuid(struct task_struct *task, uid_t loginuid) { - struct audit_context *context = task->audit_context; - - if (context) { - /* Only log if audit is enabled */ - if (context->in_syscall) { - struct audit_buffer *ab; - - ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN); - if (ab) { - audit_log_format(ab, "login pid=%d uid=%u " - "old auid=%u new auid=%u", - task->pid, task->uid, - context->loginuid, loginuid); - audit_log_end(ab); - } + if (task->audit_context) { + struct audit_buffer *ab; + + ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN); + if (ab) { + audit_log_format(ab, "login pid=%d uid=%u " + "old auid=%u new auid=%u", + task->pid, task->uid, + task->audit_context->loginuid, loginuid); + audit_log_end(ab); } - context->loginuid = loginuid; + task->audit_context->loginuid = loginuid; } return 0; } @@ -1493,221 +1169,20 @@ uid_t audit_get_loginuid(struct audit_context *ctx) return ctx ? ctx->loginuid : -1; } -/** - * __audit_mq_open - record audit data for a POSIX MQ open - * @oflag: open flag - * @mode: mode bits - * @u_attr: queue attributes - * - * Returns 0 for success or NULL context or < 0 on error. - */ -int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr) -{ - struct audit_aux_data_mq_open *ax; - struct audit_context *context = current->audit_context; - - if (!audit_enabled) - return 0; - - if (likely(!context)) - return 0; - - ax = kmalloc(sizeof(*ax), GFP_ATOMIC); - if (!ax) - return -ENOMEM; - - if (u_attr != NULL) { - if (copy_from_user(&ax->attr, u_attr, sizeof(ax->attr))) { - kfree(ax); - return -EFAULT; - } - } else - memset(&ax->attr, 0, sizeof(ax->attr)); - - ax->oflag = oflag; - ax->mode = mode; - - ax->d.type = AUDIT_MQ_OPEN; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - -/** - * __audit_mq_timedsend - record audit data for a POSIX MQ timed send - * @mqdes: MQ descriptor - * @msg_len: Message length - * @msg_prio: Message priority - * @u_abs_timeout: Message timeout in absolute time - * - * Returns 0 for success or NULL context or < 0 on error. - */ -int __audit_mq_timedsend(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, - const struct timespec __user *u_abs_timeout) -{ - struct audit_aux_data_mq_sendrecv *ax; - struct audit_context *context = current->audit_context; - - if (!audit_enabled) - return 0; - - if (likely(!context)) - return 0; - - ax = kmalloc(sizeof(*ax), GFP_ATOMIC); - if (!ax) - return -ENOMEM; - - if (u_abs_timeout != NULL) { - if (copy_from_user(&ax->abs_timeout, u_abs_timeout, sizeof(ax->abs_timeout))) { - kfree(ax); - return -EFAULT; - } - } else - memset(&ax->abs_timeout, 0, sizeof(ax->abs_timeout)); - - ax->mqdes = mqdes; - ax->msg_len = msg_len; - ax->msg_prio = msg_prio; - - ax->d.type = AUDIT_MQ_SENDRECV; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - -/** - * __audit_mq_timedreceive - record audit data for a POSIX MQ timed receive - * @mqdes: MQ descriptor - * @msg_len: Message length - * @u_msg_prio: Message priority - * @u_abs_timeout: Message timeout in absolute time - * - * Returns 0 for success or NULL context or < 0 on error. - */ -int __audit_mq_timedreceive(mqd_t mqdes, size_t msg_len, - unsigned int __user *u_msg_prio, - const struct timespec __user *u_abs_timeout) -{ - struct audit_aux_data_mq_sendrecv *ax; - struct audit_context *context = current->audit_context; - - if (!audit_enabled) - return 0; - - if (likely(!context)) - return 0; - - ax = kmalloc(sizeof(*ax), GFP_ATOMIC); - if (!ax) - return -ENOMEM; - - if (u_msg_prio != NULL) { - if (get_user(ax->msg_prio, u_msg_prio)) { - kfree(ax); - return -EFAULT; - } - } else - ax->msg_prio = 0; - - if (u_abs_timeout != NULL) { - if (copy_from_user(&ax->abs_timeout, u_abs_timeout, sizeof(ax->abs_timeout))) { - kfree(ax); - return -EFAULT; - } - } else - memset(&ax->abs_timeout, 0, sizeof(ax->abs_timeout)); - - ax->mqdes = mqdes; - ax->msg_len = msg_len; - - ax->d.type = AUDIT_MQ_SENDRECV; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - -/** - * __audit_mq_notify - record audit data for a POSIX MQ notify - * @mqdes: MQ descriptor - * @u_notification: Notification event - * - * Returns 0 for success or NULL context or < 0 on error. - */ - -int __audit_mq_notify(mqd_t mqdes, const struct sigevent __user *u_notification) -{ - struct audit_aux_data_mq_notify *ax; - struct audit_context *context = current->audit_context; - - if (!audit_enabled) - return 0; - - if (likely(!context)) - return 0; - - ax = kmalloc(sizeof(*ax), GFP_ATOMIC); - if (!ax) - return -ENOMEM; - - if (u_notification != NULL) { - if (copy_from_user(&ax->notification, u_notification, sizeof(ax->notification))) { - kfree(ax); - return -EFAULT; - } - } else - memset(&ax->notification, 0, sizeof(ax->notification)); - - ax->mqdes = mqdes; - - ax->d.type = AUDIT_MQ_NOTIFY; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - -/** - * __audit_mq_getsetattr - record audit data for a POSIX MQ get/set attribute - * @mqdes: MQ descriptor - * @mqstat: MQ flags - * - * Returns 0 for success or NULL context or < 0 on error. - */ -int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat) -{ - struct audit_aux_data_mq_getsetattr *ax; - struct audit_context *context = current->audit_context; - - if (!audit_enabled) - return 0; - - if (likely(!context)) - return 0; - - ax = kmalloc(sizeof(*ax), GFP_ATOMIC); - if (!ax) - return -ENOMEM; - - ax->mqdes = mqdes; - ax->mqstat = *mqstat; - - ax->d.type = AUDIT_MQ_GETSETATTR; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - /** * audit_ipc_obj - record audit data for ipc object * @ipcp: ipc permissions * * Returns 0 for success or NULL context or < 0 on error. */ -int __audit_ipc_obj(struct kern_ipc_perm *ipcp) +int audit_ipc_obj(struct kern_ipc_perm *ipcp) { struct audit_aux_data_ipcctl *ax; struct audit_context *context = current->audit_context; + if (likely(!context)) + return 0; + ax = kmalloc(sizeof(*ax), GFP_ATOMIC); if (!ax) return -ENOMEM; @@ -1732,11 +1207,14 @@ int __audit_ipc_obj(struct kern_ipc_perm *ipcp) * * Returns 0 for success or NULL context or < 0 on error. */ -int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) +int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode, struct kern_ipc_perm *ipcp) { struct audit_aux_data_ipcctl *ax; struct audit_context *context = current->audit_context; + if (likely(!context)) + return 0; + ax = kmalloc(sizeof(*ax), GFP_ATOMIC); if (!ax) return -ENOMEM; @@ -1745,6 +1223,7 @@ int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode ax->uid = uid; ax->gid = gid; ax->mode = mode; + selinux_get_ipc_sid(ipcp, &ax->osid); ax->d.type = AUDIT_IPC_SET_PERM; ax->d.next = context->aux; @@ -1752,39 +1231,6 @@ int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode return 0; } -int audit_bprm(struct linux_binprm *bprm) -{ - struct audit_aux_data_execve *ax; - struct audit_context *context = current->audit_context; - unsigned long p, next; - void *to; - - if (likely(!audit_enabled || !context || context->dummy)) - return 0; - - ax = kmalloc(sizeof(*ax) + PAGE_SIZE * MAX_ARG_PAGES - bprm->p, - GFP_KERNEL); - if (!ax) - return -ENOMEM; - - ax->argc = bprm->argc; - ax->envc = bprm->envc; - for (p = bprm->p, to = ax->mem; p < MAX_ARG_PAGES*PAGE_SIZE; p = next) { - struct page *page = bprm->page[p / PAGE_SIZE]; - void *kaddr = kmap(page); - next = (p + PAGE_SIZE) & ~(PAGE_SIZE - 1); - memcpy(to, kaddr + (p & (PAGE_SIZE - 1)), next - p); - to += next - p; - kunmap(page); - } - - ax->d.type = AUDIT_EXECVE; - ax->d.next = context->aux; - context->aux = (void *)ax; - return 0; -} - - /** * audit_socketcall - record audit data for sys_socketcall * @nargs: number of args @@ -1797,7 +1243,7 @@ int audit_socketcall(int nargs, unsigned long *args) struct audit_aux_data_socketcall *ax; struct audit_context *context = current->audit_context; - if (likely(!context || context->dummy)) + if (likely(!context)) return 0; ax = kmalloc(sizeof(*ax) + nargs * sizeof(unsigned long), GFP_KERNEL); @@ -1825,7 +1271,7 @@ int audit_sockaddr(int len, void *a) struct audit_aux_data_sockaddr *ax; struct audit_context *context = current->audit_context; - if (likely(!context || context->dummy)) + if (likely(!context)) return 0; ax = kmalloc(sizeof(*ax) + len, GFP_KERNEL); @@ -1879,20 +1325,19 @@ int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt) * If the audit subsystem is being terminated, record the task (pid) * and uid that is doing that. */ -void __audit_signal_info(int sig, struct task_struct *t) +void audit_signal_info(int sig, struct task_struct *t) { extern pid_t audit_sig_pid; extern uid_t audit_sig_uid; - extern u32 audit_sig_sid; - - if (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1) { - struct task_struct *tsk = current; - struct audit_context *ctx = tsk->audit_context; - audit_sig_pid = tsk->pid; - if (ctx) - audit_sig_uid = ctx->loginuid; - else - audit_sig_uid = tsk->uid; - selinux_get_task_sid(tsk, &audit_sig_sid); + + if (unlikely(audit_pid && t->tgid == audit_pid)) { + if (sig == SIGTERM || sig == SIGHUP) { + struct audit_context *ctx = current->audit_context; + audit_sig_pid = current->pid; + if (ctx) + audit_sig_uid = ctx->loginuid; + else + audit_sig_uid = current->uid; + } } } diff --git a/kernel/capability.c b/kernel/capability.c index 31978a5ea..13f9a8985 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) int ret = 0; pid_t pid; __u32 version; - struct task_struct *target; + task_t *target; struct __user_cap_data_struct data; if (get_user(version, &header->version)) @@ -97,7 +98,7 @@ static inline int cap_set_pg(int pgrp, kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted) { - struct task_struct *g, *target; + task_t *g, *target; int ret = -EPERM; int found = 0; @@ -129,7 +130,7 @@ static inline int cap_set_all(kernel_cap_t *effective, kernel_cap_t *inheritable, kernel_cap_t *permitted) { - struct task_struct *g, *target; + task_t *g, *target; int ret = -EPERM; int found = 0; @@ -173,7 +174,7 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) { kernel_cap_t inheritable, permitted, effective; __u32 version; - struct task_struct *target; + task_t *target; int ret; pid_t pid; diff --git a/kernel/compat.c b/kernel/compat.c index 126dee953..c1601a84f 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -21,7 +21,6 @@ #include #include #include -#include #include @@ -730,10 +729,17 @@ void sigset_from_compat (sigset_t *set, compat_sigset_t *compat) { switch (_NSIG_WORDS) { +#if defined (__COMPAT_ENDIAN_SWAP__) + case 4: set->sig[3] = compat->sig[7] | (((long)compat->sig[6]) << 32 ); + case 3: set->sig[2] = compat->sig[5] | (((long)compat->sig[4]) << 32 ); + case 2: set->sig[1] = compat->sig[3] | (((long)compat->sig[2]) << 32 ); + case 1: set->sig[0] = compat->sig[1] | (((long)compat->sig[0]) << 32 ); +#else 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 ); +#endif } } @@ -928,25 +934,3 @@ asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp) return ret; } - -#ifdef CONFIG_NUMA -asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_pages, - compat_uptr_t __user *pages32, - const int __user *nodes, - int __user *status, - int flags) -{ - const void __user * __user *pages; - int i; - - pages = compat_alloc_user_space(nr_pages * sizeof(void *)); - for (i = 0; i < nr_pages; i++) { - compat_uptr_t p; - - if (get_user(p, pages32 + i) || - put_user(compat_ptr(p), pages + i)) - return -EFAULT; - } - return sys_move_pages(pid, nr_pages, pages, nodes, status, flags); -} -#endif diff --git a/kernel/configs.c b/kernel/configs.c index f9e31974f..009e1ebdc 100644 --- a/kernel/configs.c +++ b/kernel/configs.c @@ -23,6 +23,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff --git a/kernel/cpu.c b/kernel/cpu.c index 32c966284..fe2b8d0bf 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -13,66 +13,66 @@ #include #include #include -#include +#include /* This protects CPUs going up and down... */ -static DEFINE_MUTEX(cpu_add_remove_lock); -static DEFINE_MUTEX(cpu_bitmask_lock); +static DECLARE_MUTEX(cpucontrol); -static __cpuinitdata BLOCKING_NOTIFIER_HEAD(cpu_chain); - -/* If set, cpu_up and cpu_down will return -EBUSY and do nothing. - * Should always be manipulated under cpu_add_remove_lock - */ -static int cpu_hotplug_disabled; +static BLOCKING_NOTIFIER_HEAD(cpu_chain); #ifdef CONFIG_HOTPLUG_CPU +static struct task_struct *lock_cpu_hotplug_owner; +static int lock_cpu_hotplug_depth; -/* Crappy recursive lock-takers in cpufreq! Complain loudly about idiots */ -static struct task_struct *recursive; -static int recursive_depth; +static int __lock_cpu_hotplug(int interruptible) +{ + int ret = 0; + + if (lock_cpu_hotplug_owner != current) { + if (interruptible) + ret = down_interruptible(&cpucontrol); + else + down(&cpucontrol); + } + + /* + * Set only if we succeed in locking + */ + if (!ret) { + lock_cpu_hotplug_depth++; + lock_cpu_hotplug_owner = current; + } + + return ret; +} void lock_cpu_hotplug(void) { - struct task_struct *tsk = current; - - if (tsk == recursive) { - static int warnings = 10; - if (warnings) { - printk(KERN_ERR "Lukewarm IQ detected in hotplug locking\n"); - WARN_ON(1); - warnings--; - } - recursive_depth++; - return; - } - mutex_lock(&cpu_bitmask_lock); - recursive = tsk; + __lock_cpu_hotplug(0); } EXPORT_SYMBOL_GPL(lock_cpu_hotplug); void unlock_cpu_hotplug(void) { - WARN_ON(recursive != current); - if (recursive_depth) { - recursive_depth--; - return; + if (--lock_cpu_hotplug_depth == 0) { + lock_cpu_hotplug_owner = NULL; + up(&cpucontrol); } - mutex_unlock(&cpu_bitmask_lock); - recursive = NULL; } EXPORT_SYMBOL_GPL(unlock_cpu_hotplug); +int lock_cpu_hotplug_interruptible(void) +{ + return __lock_cpu_hotplug(1); +} +EXPORT_SYMBOL_GPL(lock_cpu_hotplug_interruptible); #endif /* CONFIG_HOTPLUG_CPU */ /* Need to know about CPUs going up/down? */ -int __cpuinit register_cpu_notifier(struct notifier_block *nb) +int register_cpu_notifier(struct notifier_block *nb) { return blocking_notifier_chain_register(&cpu_chain, nb); } - -#ifdef CONFIG_HOTPLUG_CPU - EXPORT_SYMBOL(register_cpu_notifier); void unregister_cpu_notifier(struct notifier_block *nb) @@ -81,6 +81,7 @@ void unregister_cpu_notifier(struct notifier_block *nb) } EXPORT_SYMBOL(unregister_cpu_notifier); +#ifdef CONFIG_HOTPLUG_CPU static inline void check_for_tasks(int cpu) { struct task_struct *p; @@ -113,25 +114,32 @@ static int take_cpu_down(void *unused) return 0; } -/* Requires cpu_add_remove_lock to be held */ -static int _cpu_down(unsigned int cpu) +int cpu_down(unsigned int cpu) { int err; struct task_struct *p; cpumask_t old_allowed, tmp; - if (num_online_cpus() == 1) - return -EBUSY; + if ((err = lock_cpu_hotplug_interruptible()) != 0) + return err; - if (!cpu_online(cpu)) - return -EINVAL; + if (num_online_cpus() == 1) { + err = -EBUSY; + goto out; + } + + if (!cpu_online(cpu)) { + err = -EINVAL; + goto out; + } err = blocking_notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE, (void *)(long)cpu); if (err == NOTIFY_BAD) { printk("%s: attempt to take down CPU %u failed\n", __FUNCTION__, cpu); - return -EINVAL; + err = -EINVAL; + goto out; } /* Ensure that we are not runnable on dying cpu */ @@ -140,10 +148,7 @@ static int _cpu_down(unsigned int cpu) cpu_clear(cpu, tmp); set_cpus_allowed(current, tmp); - mutex_lock(&cpu_bitmask_lock); p = __stop_machine_run(take_cpu_down, NULL, cpu); - mutex_unlock(&cpu_bitmask_lock); - if (IS_ERR(p)) { /* CPU didn't die: tell everyone. Can't complain. */ if (blocking_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED, @@ -179,32 +184,24 @@ out_thread: err = kthread_stop(p); out_allowed: set_cpus_allowed(current, old_allowed); - return err; -} - -int cpu_down(unsigned int cpu) -{ - int err = 0; - - mutex_lock(&cpu_add_remove_lock); - if (cpu_hotplug_disabled) - err = -EBUSY; - else - err = _cpu_down(cpu); - - mutex_unlock(&cpu_add_remove_lock); +out: + unlock_cpu_hotplug(); return err; } #endif /*CONFIG_HOTPLUG_CPU*/ -/* Requires cpu_add_remove_lock to be held */ -static int __devinit _cpu_up(unsigned int cpu) +int __devinit cpu_up(unsigned int cpu) { int ret; void *hcpu = (void *)(long)cpu; - if (cpu_online(cpu) || !cpu_present(cpu)) - return -EINVAL; + if ((ret = lock_cpu_hotplug_interruptible()) != 0) + return ret; + + if (cpu_online(cpu) || !cpu_present(cpu)) { + ret = -EINVAL; + goto out; + } ret = blocking_notifier_call_chain(&cpu_chain, CPU_UP_PREPARE, hcpu); if (ret == NOTIFY_BAD) { @@ -215,9 +212,7 @@ static int __devinit _cpu_up(unsigned int cpu) } /* Arch-specific enabling code. */ - mutex_lock(&cpu_bitmask_lock); ret = __cpu_up(cpu); - mutex_unlock(&cpu_bitmask_lock); if (ret != 0) goto out_notify; BUG_ON(!cpu_online(cpu)); @@ -229,95 +224,7 @@ out_notify: if (ret != 0) blocking_notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu); - - return ret; -} - -int __devinit cpu_up(unsigned int cpu) -{ - int err = 0; - - mutex_lock(&cpu_add_remove_lock); - if (cpu_hotplug_disabled) - err = -EBUSY; - else - err = _cpu_up(cpu); - - mutex_unlock(&cpu_add_remove_lock); - return err; -} - -#ifdef CONFIG_SUSPEND_SMP -static cpumask_t frozen_cpus; - -int disable_nonboot_cpus(void) -{ - int cpu, first_cpu, error; - - mutex_lock(&cpu_add_remove_lock); - first_cpu = first_cpu(cpu_present_map); - if (!cpu_online(first_cpu)) { - error = _cpu_up(first_cpu); - if (error) { - printk(KERN_ERR "Could not bring CPU%d up.\n", - first_cpu); - goto out; - } - } - error = set_cpus_allowed(current, cpumask_of_cpu(first_cpu)); - if (error) { - printk(KERN_ERR "Could not run on CPU%d\n", first_cpu); - goto out; - } - /* We take down all of the non-boot CPUs in one shot to avoid races - * with the userspace trying to use the CPU hotplug at the same time - */ - cpus_clear(frozen_cpus); - printk("Disabling non-boot CPUs ...\n"); - for_each_online_cpu(cpu) { - if (cpu == first_cpu) - continue; - error = _cpu_down(cpu); - if (!error) { - cpu_set(cpu, frozen_cpus); - printk("CPU%d is down\n", cpu); - } else { - printk(KERN_ERR "Error taking CPU%d down: %d\n", - cpu, error); - break; - } - } - if (!error) { - BUG_ON(num_online_cpus() > 1); - /* Make sure the CPUs won't be enabled by someone else */ - cpu_hotplug_disabled = 1; - } else { - printk(KERN_ERR "Non-boot CPUs are not disabled"); - } out: - mutex_unlock(&cpu_add_remove_lock); - return error; -} - -void enable_nonboot_cpus(void) -{ - int cpu, error; - - /* Allow everyone to use the CPU hotplug again */ - mutex_lock(&cpu_add_remove_lock); - cpu_hotplug_disabled = 0; - mutex_unlock(&cpu_add_remove_lock); - - printk("Enabling non-boot CPUs ...\n"); - for_each_cpu_mask(cpu, frozen_cpus) { - error = cpu_up(cpu); - if (!error) { - printk("CPU%d is up\n", cpu); - continue; - } - printk(KERN_WARNING "Error taking CPU%d up: %d\n", - cpu, error); - } - cpus_clear(frozen_cpus); + unlock_cpu_hotplug(); + return ret; } -#endif diff --git a/kernel/cpuset.c b/kernel/cpuset.c index cdc92f972..cc0383a96 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -18,6 +18,7 @@ * distribution for more details. */ +#include #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -289,6 +290,7 @@ static struct inode *cpuset_new_inode(mode_t mode) inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_mapping->backing_dev_info = &cpuset_backing_dev_info; @@ -391,11 +393,11 @@ static int cpuset_fill_super(struct super_block *sb, void *unused_data, return 0; } -static int cpuset_get_sb(struct file_system_type *fs_type, - int flags, const char *unused_dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *cpuset_get_sb(struct file_system_type *fs_type, + int flags, const char *unused_dev_name, + void *data) { - return get_sb_single(fs_type, flags, data, cpuset_fill_super, mnt); + return get_sb_single(fs_type, flags, data, cpuset_fill_super); } static struct file_system_type cpuset_fs_type = { @@ -761,8 +763,6 @@ static int validate_change(const struct cpuset *cur, const struct cpuset *trial) * * Call with manage_mutex held. May nest a call to the * lock_cpu_hotplug()/unlock_cpu_hotplug() pair. - * Must not be called holding callback_mutex, because we must - * not call lock_cpu_hotplug() while holding callback_mutex. */ static void update_cpu_domains(struct cpuset *cur) @@ -782,7 +782,7 @@ static void update_cpu_domains(struct cpuset *cur) if (is_cpu_exclusive(c)) cpus_andnot(pspan, pspan, c->cpus_allowed); } - if (!is_cpu_exclusive(cur)) { + if (is_removed(cur) || !is_cpu_exclusive(cur)) { cpus_or(pspan, pspan, cur->cpus_allowed); if (cpus_equal(pspan, cur->cpus_allowed)) return; @@ -815,10 +815,6 @@ static int update_cpumask(struct cpuset *cs, char *buf) struct cpuset trialcs; int retval, cpus_unchanged; - /* top_cpuset.cpus_allowed tracks cpu_online_map; it's read-only */ - if (cs == &top_cpuset) - return -EACCES; - trialcs = *cs; retval = cpulist_parse(buf, trialcs.cpus_allowed); if (retval < 0) @@ -1068,7 +1064,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, char *buf) } /* - * Frequency meter - How fast is some event occurring? + * Frequency meter - How fast is some event occuring? * * These routines manage a digitally filtered, constant time based, * event frequency meter. There are four routines: @@ -1182,7 +1178,6 @@ static int attach_task(struct cpuset *cs, char *pidbuf, char **ppathbuf) cpumask_t cpus; nodemask_t from, to; struct mm_struct *mm; - int retval; if (sscanf(pidbuf, "%d", &pid) != 1) return -EIO; @@ -1211,12 +1206,6 @@ static int attach_task(struct cpuset *cs, char *pidbuf, char **ppathbuf) get_task_struct(tsk); } - retval = security_task_setscheduler(tsk, 0, NULL); - if (retval) { - put_task_struct(tsk); - return retval; - } - mutex_lock(&callback_mutex); task_lock(tsk); @@ -1922,17 +1911,6 @@ static int cpuset_mkdir(struct inode *dir, struct dentry *dentry, int mode) return cpuset_create(c_parent, dentry->d_name.name, mode | S_IFDIR); } -/* - * Locking note on the strange update_flag() call below: - * - * If the cpuset being removed is marked cpu_exclusive, then simulate - * turning cpu_exclusive off, which will call update_cpu_domains(). - * The lock_cpu_hotplug() call in update_cpu_domains() must not be - * made while holding callback_mutex. Elsewhere the kernel nests - * callback_mutex inside lock_cpu_hotplug() calls. So the reverse - * nesting would risk an ABBA deadlock. - */ - static int cpuset_rmdir(struct inode *unused_dir, struct dentry *dentry) { struct cpuset *cs = dentry->d_fsdata; @@ -1952,16 +1930,11 @@ static int cpuset_rmdir(struct inode *unused_dir, struct dentry *dentry) mutex_unlock(&manage_mutex); return -EBUSY; } - if (is_cpu_exclusive(cs)) { - int retval = update_flag(CS_CPU_EXCLUSIVE, cs, "0"); - if (retval < 0) { - mutex_unlock(&manage_mutex); - return retval; - } - } parent = cs->parent; mutex_lock(&callback_mutex); set_bit(CS_REMOVED, &cs->flags); + if (is_cpu_exclusive(cs)) + update_cpu_domains(cs); list_del(&cs->sibling); /* delete my sibling from parent->children */ spin_lock(&cs->dentry->d_lock); d = dget(cs->dentry); @@ -2036,33 +2009,6 @@ out: return err; } -/* - * The top_cpuset tracks what CPUs and Memory Nodes are online, - * period. This is necessary in order to make cpusets transparent - * (of no affect) on systems that are actively using CPU hotplug - * but making no active use of cpusets. - * - * This handles CPU hotplug (cpuhp) events. If someday Memory - * Nodes can be hotplugged (dynamically changing node_online_map) - * then we should handle that too, perhaps in a similar way. - */ - -#ifdef CONFIG_HOTPLUG_CPU -static int cpuset_handle_cpuhp(struct notifier_block *nb, - unsigned long phase, void *cpu) -{ - mutex_lock(&manage_mutex); - mutex_lock(&callback_mutex); - - top_cpuset.cpus_allowed = cpu_online_map; - - mutex_unlock(&callback_mutex); - mutex_unlock(&manage_mutex); - - return 0; -} -#endif - /** * cpuset_init_smp - initialize cpus_allowed * @@ -2073,8 +2019,6 @@ void __init cpuset_init_smp(void) { top_cpuset.cpus_allowed = cpu_online_map; top_cpuset.mems_allowed = node_online_map; - - hotcpu_notifier(cpuset_handle_cpuhp, 0); } /** @@ -2419,7 +2363,7 @@ EXPORT_SYMBOL_GPL(cpuset_mem_spread_node); int cpuset_excl_nodes_overlap(const struct task_struct *p) { const struct cpuset *cs1, *cs2; /* my and p's cpuset ancestors */ - int overlap = 1; /* do cpusets overlap? */ + int overlap = 0; /* do cpusets overlap? */ task_lock(current); if (current->flags & PF_EXITING) { @@ -2491,43 +2435,31 @@ void __cpuset_memory_pressure_bump(void) */ static int proc_cpuset_show(struct seq_file *m, void *v) { - struct pid *pid; struct task_struct *tsk; char *buf; - int retval; + int retval = 0; - retval = -ENOMEM; buf = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!buf) - goto out; - - retval = -ESRCH; - pid = m->private; - tsk = get_pid_task(pid, PIDTYPE_PID); - if (!tsk) - goto out_free; + return -ENOMEM; - retval = -EINVAL; + tsk = m->private; mutex_lock(&manage_mutex); - retval = cpuset_path(tsk->cpuset, buf, PAGE_SIZE); if (retval < 0) - goto out_unlock; + goto out; seq_puts(m, buf); seq_putc(m, '\n'); -out_unlock: +out: mutex_unlock(&manage_mutex); - put_task_struct(tsk); -out_free: kfree(buf); -out: return retval; } static int cpuset_open(struct inode *inode, struct file *file) { - struct pid *pid = PROC_I(inode)->pid; - return single_open(file, proc_cpuset_show, pid); + struct task_struct *tsk = PROC_I(inode)->task; + return single_open(file, proc_cpuset_show, tsk); } struct file_operations proc_cpuset_operations = { diff --git a/kernel/delayacct.c b/kernel/delayacct.c deleted file mode 100644 index 36752f124..000000000 --- a/kernel/delayacct.c +++ /dev/null @@ -1,162 +0,0 @@ -/* delayacct.c - per-task delay accounting - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2006 - * - * 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 would 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. - */ - -#include -#include -#include -#include -#include - -int delayacct_on __read_mostly = 1; /* Delay accounting turned on/off */ -kmem_cache_t *delayacct_cache; - -static int __init delayacct_setup_disable(char *str) -{ - delayacct_on = 0; - return 1; -} -__setup("nodelayacct", delayacct_setup_disable); - -void delayacct_init(void) -{ - delayacct_cache = kmem_cache_create("delayacct_cache", - sizeof(struct task_delay_info), - 0, - SLAB_PANIC, - NULL, NULL); - delayacct_tsk_init(&init_task); -} - -void __delayacct_tsk_init(struct task_struct *tsk) -{ - tsk->delays = kmem_cache_zalloc(delayacct_cache, SLAB_KERNEL); - if (tsk->delays) - spin_lock_init(&tsk->delays->lock); -} - -/* - * Start accounting for a delay statistic using - * its starting timestamp (@start) - */ - -static inline void delayacct_start(struct timespec *start) -{ - do_posix_clock_monotonic_gettime(start); -} - -/* - * Finish delay accounting for a statistic using - * its timestamps (@start, @end), accumalator (@total) and @count - */ - -static void delayacct_end(struct timespec *start, struct timespec *end, - u64 *total, u32 *count) -{ - struct timespec ts; - s64 ns; - - do_posix_clock_monotonic_gettime(end); - ts = timespec_sub(*end, *start); - ns = timespec_to_ns(&ts); - if (ns < 0) - return; - - spin_lock(¤t->delays->lock); - *total += ns; - (*count)++; - spin_unlock(¤t->delays->lock); -} - -void __delayacct_blkio_start(void) -{ - delayacct_start(¤t->delays->blkio_start); -} - -void __delayacct_blkio_end(void) -{ - if (current->delays->flags & DELAYACCT_PF_SWAPIN) - /* Swapin block I/O */ - delayacct_end(¤t->delays->blkio_start, - ¤t->delays->blkio_end, - ¤t->delays->swapin_delay, - ¤t->delays->swapin_count); - else /* Other block I/O */ - delayacct_end(¤t->delays->blkio_start, - ¤t->delays->blkio_end, - ¤t->delays->blkio_delay, - ¤t->delays->blkio_count); -} - -int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) -{ - s64 tmp; - struct timespec ts; - unsigned long t1,t2,t3; - - /* Though tsk->delays accessed later, early exit avoids - * unnecessary returning of other data - */ - if (!tsk->delays) - goto done; - - tmp = (s64)d->cpu_run_real_total; - cputime_to_timespec(tsk->utime + tsk->stime, &ts); - tmp += timespec_to_ns(&ts); - d->cpu_run_real_total = (tmp < (s64)d->cpu_run_real_total) ? 0 : tmp; - - /* - * No locking available for sched_info (and too expensive to add one) - * Mitigate by taking snapshot of values - */ - t1 = tsk->sched_info.pcnt; - t2 = tsk->sched_info.run_delay; - t3 = tsk->sched_info.cpu_time; - - d->cpu_count += t1; - - jiffies_to_timespec(t2, &ts); - tmp = (s64)d->cpu_delay_total + timespec_to_ns(&ts); - d->cpu_delay_total = (tmp < (s64)d->cpu_delay_total) ? 0 : tmp; - - tmp = (s64)d->cpu_run_virtual_total + (s64)jiffies_to_usecs(t3) * 1000; - d->cpu_run_virtual_total = - (tmp < (s64)d->cpu_run_virtual_total) ? 0 : tmp; - - /* zero XXX_total, non-zero XXX_count implies XXX stat overflowed */ - - spin_lock(&tsk->delays->lock); - tmp = d->blkio_delay_total + tsk->delays->blkio_delay; - d->blkio_delay_total = (tmp < d->blkio_delay_total) ? 0 : tmp; - tmp = d->swapin_delay_total + tsk->delays->swapin_delay; - d->swapin_delay_total = (tmp < d->swapin_delay_total) ? 0 : tmp; - d->blkio_count += tsk->delays->blkio_count; - d->swapin_count += tsk->delays->swapin_count; - spin_unlock(&tsk->delays->lock); - -done: - return 0; -} - -__u64 __delayacct_blkio_ticks(struct task_struct *tsk) -{ - __u64 ret; - - spin_lock(&tsk->delays->lock); - ret = nsec_to_clock_t(tsk->delays->blkio_delay + - tsk->delays->swapin_delay); - spin_unlock(&tsk->delays->lock); - return ret; -} - diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 3c2eaea66..c01cead2c 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c @@ -7,6 +7,7 @@ * 2001-05-06 Complete rewrite, Christoph Hellwig (hch@infradead.org) */ +#include #include #include #include diff --git a/kernel/exit.c b/kernel/exit.c index ce16af120..08eee6d20 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -4,6 +4,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include #include #include #include @@ -25,8 +26,6 @@ #include #include #include -#include -#include #include #include #include @@ -37,11 +36,10 @@ #include #include #include /* for audit_free() */ -#include -#include +#include #include #include -#include +#include #include #include @@ -51,6 +49,8 @@ extern void sem_exit (void); extern struct task_struct *child_reaper; +int getrusage(struct task_struct *, int, struct rusage __user *); + static void exit_mm(struct task_struct * tsk); static void __unhash_process(struct task_struct *p) @@ -140,10 +140,14 @@ static void delayed_put_task_struct(struct rcu_head *rhp) void release_task(struct task_struct * p) { - struct task_struct *leader; int zap_leader; + task_t *leader; + struct dentry *proc_dentry; + repeat: atomic_dec(&p->user->processes); + spin_lock(&p->proc_lock); + proc_dentry = proc_pid_unhash(p); write_lock_irq(&tasklist_lock); ptrace_unlink(p); BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children)); @@ -172,7 +176,8 @@ repeat: sched_exit(p); write_unlock_irq(&tasklist_lock); - proc_flush_task(p); + spin_unlock(&p->proc_lock); + proc_pid_flush(proc_dentry); release_thread(p); call_rcu(&p->rcu, delayed_put_task_struct); @@ -215,7 +220,7 @@ out: * * "I ask you, have you ever known what it is to be an orphan?" */ -static int will_become_orphaned_pgrp(int pgrp, struct task_struct *ignored_task) +static int will_become_orphaned_pgrp(int pgrp, task_t *ignored_task) { struct task_struct *p; int ret = 1; @@ -397,7 +402,9 @@ void daemonize(const char *name, ...) exit_mm(current); set_special_pids(1, 1); - proc_clear_tty(current); + mutex_lock(&tty_mutex); + current->signal->tty = NULL; + mutex_unlock(&tty_mutex); /* Block and flush all signals */ sigfillset(&blocked); @@ -578,7 +585,7 @@ static void exit_mm(struct task_struct * tsk) down_read(&mm->mmap_sem); } atomic_inc(&mm->mm_count); - BUG_ON(mm != tsk->active_mm); + if (mm != tsk->active_mm) BUG(); /* more a memory barrier than a real lock */ task_lock(tsk); tsk->mm = NULL; @@ -588,8 +595,7 @@ static void exit_mm(struct task_struct * tsk) mmput(mm); } -static inline void -choose_new_parent(struct task_struct *p, struct task_struct *reaper) +static inline void choose_new_parent(task_t *p, task_t *reaper) { /* check for reaper context */ vxwprintk((p->xid != reaper->xid) && (reaper != child_reaper), @@ -604,8 +610,7 @@ choose_new_parent(struct task_struct *p, struct task_struct *reaper) p->real_parent = reaper; } -static void -reparent_thread(struct task_struct *p, struct task_struct *father, int traced) +static void reparent_thread(task_t *p, task_t *father, int traced) { /* We don't want people slaying init. */ if (p->exit_signal != -1) @@ -669,8 +674,8 @@ reparent_thread(struct task_struct *p, struct task_struct *father, int traced) * group, and if no such member exists, give it to * the global child reaper process (ie "init") */ -static void -forget_original_parent(struct task_struct *father, struct list_head *to_release) +static void forget_original_parent(struct task_struct * father, + struct list_head *to_release) { struct task_struct *p, *reaper = father; struct list_head *_p, *_n; @@ -693,7 +698,7 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release) */ list_for_each_safe(_p, _n, &father->children) { int ptrace; - p = list_entry(_p, struct task_struct, sibling); + p = list_entry(_p,struct task_struct,sibling); ptrace = p->ptrace; @@ -722,7 +727,7 @@ forget_original_parent(struct task_struct *father, struct list_head *to_release) list_add(&p->ptrace_list, to_release); } list_for_each_safe(_p, _n, &father->ptrace_children) { - p = list_entry(_p, struct task_struct, ptrace_list); + p = list_entry(_p,struct task_struct,ptrace_list); choose_new_parent(p, reaper); reparent_thread(p, father, 1); } @@ -842,7 +847,7 @@ static void exit_notify(struct task_struct *tsk) list_for_each_safe(_p, _n, &ptrace_dead) { list_del_init(_p); - t = list_entry(_p, struct task_struct, ptrace_list); + t = list_entry(_p,struct task_struct,ptrace_list); release_task(t); } @@ -854,9 +859,7 @@ static void exit_notify(struct task_struct *tsk) fastcall NORET_TYPE void do_exit(long code) { struct task_struct *tsk = current; - struct taskstats *tidstats; int group_dead; - unsigned int mycpu; profile_task_exit(tsk); @@ -894,8 +897,6 @@ fastcall NORET_TYPE void do_exit(long code) current->comm, current->pid, preempt_count()); - taskstats_exit_alloc(&tidstats, &mycpu); - acct_update_integrals(tsk); if (tsk->mm) { update_hiwater_rss(tsk->mm); @@ -905,17 +906,15 @@ fastcall NORET_TYPE void do_exit(long code) if (group_dead) { hrtimer_cancel(&tsk->signal->real_timer); exit_itimers(tsk->signal); - } - - if (current->tux_info) { + acct_process(code); + if (current->tux_info) { #ifdef CONFIG_TUX_DEBUG - printk("Possibly unexpected TUX-thread exit(%ld) at %p?\n", - code, __builtin_return_address(0)); + printk("Possibly unexpected TUX-thread exit(%ld) at %p?\n", + code, __builtin_return_address(0)); #endif - current->tux_exit(); + current->tux_exit(); + } } - - acct_collect(code, group_dead); if (unlikely(tsk->robust_list)) exit_robust_list(tsk); #if defined(CONFIG_FUTEX) && defined(CONFIG_COMPAT) @@ -924,17 +923,14 @@ fastcall NORET_TYPE void do_exit(long code) #endif if (unlikely(tsk->audit_context)) audit_free(tsk); - taskstats_exit_send(tsk, tidstats, group_dead, mycpu); - taskstats_exit_free(tidstats); - exit_mm(tsk); - if (group_dead) - acct_process(); exit_sem(tsk); __exit_files(tsk); __exit_fs(tsk); exit_namespace(tsk); + exit_vx_info(tsk, code); + exit_nx_info(tsk); exit_thread(); cpuset_exit(tsk); exit_keys(tsk); @@ -948,25 +944,15 @@ fastcall NORET_TYPE void do_exit(long code) tsk->exit_code = code; proc_exit_connector(tsk); - /* needs to stay before exit_notify() */ - exit_vx_info_early(tsk, code); exit_notify(tsk); #ifdef CONFIG_NUMA mpol_free(tsk->mempolicy); tsk->mempolicy = NULL; #endif /* - * This must happen late, after the PID is not - * hashed anymore: - */ - if (unlikely(!list_empty(&tsk->pi_state_list))) - exit_pi_state_list(tsk); - if (unlikely(current->pi_state_cache)) - kfree(current->pi_state_cache); - /* - * Make sure we are holding no locks: + * If DEBUG_MUTEXES is on, make sure we are holding no locks: */ - debug_check_no_locks_held(tsk); + mutex_debug_check_no_locks_held(tsk); if (tsk->io_context) exit_io_context(); @@ -974,10 +960,6 @@ fastcall NORET_TYPE void do_exit(long code) if (tsk->splice_pipe) __free_pipe_info(tsk->splice_pipe); - /* needs to stay after exit_notify() */ - exit_vx_info(tsk, code); - exit_nx_info(tsk); - /* PF_DEAD causes final put_task_struct after we schedule. */ preempt_disable(); BUG_ON(tsk->flags & PF_DEAD); @@ -1045,7 +1027,7 @@ asmlinkage void sys_exit_group(int error_code) do_group_exit((error_code & 0xff) << 8); } -static int eligible_child(pid_t pid, int options, struct task_struct *p) +static int eligible_child(pid_t pid, int options, task_t *p) { if (pid > 0) { if (p->pid != pid) @@ -1077,7 +1059,7 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p) * Do not consider thread group leaders that are * in a non-empty thread group: */ - if (delay_group_leader(p)) + if (current->tgid != p->tgid && delay_group_leader(p)) return 2; if (security_task_wait(p)) @@ -1086,13 +1068,12 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p) return 1; } -static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid, +static int wait_noreap_copyout(task_t *p, pid_t pid, uid_t uid, int why, int status, struct siginfo __user *infop, struct rusage __user *rusagep) { int retval = rusagep ? getrusage(p, RUSAGE_BOTH, rusagep) : 0; - put_task_struct(p); if (!retval) retval = put_user(SIGCHLD, &infop->si_signo); @@ -1117,7 +1098,7 @@ static int wait_noreap_copyout(struct task_struct *p, pid_t pid, uid_t uid, * the lock and this task is uninteresting. If we return nonzero, we have * released the lock and the system call should return. */ -static int wait_task_zombie(struct task_struct *p, int noreap, +static int wait_task_zombie(task_t *p, int noreap, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) { @@ -1279,8 +1260,8 @@ static int wait_task_zombie(struct task_struct *p, int noreap, * the lock and this task is uninteresting. If we return nonzero, we have * released the lock and the system call should return. */ -static int wait_task_stopped(struct task_struct *p, int delayed_group_leader, - int noreap, struct siginfo __user *infop, +static int wait_task_stopped(task_t *p, int delayed_group_leader, int noreap, + struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) { int retval, exit_code; @@ -1394,7 +1375,7 @@ bail_ref: * the lock and this task is uninteresting. If we return nonzero, we have * released the lock and the system call should return. */ -static int wait_task_continued(struct task_struct *p, int noreap, +static int wait_task_continued(task_t *p, int noreap, struct siginfo __user *infop, int __user *stat_addr, struct rusage __user *ru) { @@ -1480,7 +1461,7 @@ repeat: int ret; list_for_each(_p,&tsk->children) { - p = list_entry(_p, struct task_struct, sibling); + p = list_entry(_p,struct task_struct,sibling); ret = eligible_child(pid, options, p); if (!ret) @@ -1569,7 +1550,8 @@ check_continued: if (options & __WNOTHREAD) break; tsk = next_thread(tsk); - BUG_ON(tsk->signal != current->signal); + if (tsk->signal != current->signal) + BUG(); } while (tsk != current); read_unlock(&tasklist_lock); diff --git a/kernel/fork.c b/kernel/fork.c index 323fdd1fe..471d19f71 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -11,6 +11,7 @@ * management can be a bitch. See 'mm/memory.c': 'copy_page_range()' */ +#include #include #include #include @@ -43,9 +44,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -68,7 +66,9 @@ int max_threads; /* tunable limit on nr_threads */ DEFINE_PER_CPU(unsigned long, process_counts) = 0; -__cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */ + __cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */ + +EXPORT_SYMBOL(tasklist_lock); int nr_processes(void) { @@ -108,7 +108,6 @@ static kmem_cache_t *mm_cachep; void free_task(struct task_struct *tsk) { free_thread_info(tsk->thread_info); - rt_mutex_debug_task_free(tsk); clr_vx_info(&tsk->vx_info); clr_nx_info(&tsk->nx_info); free_task_struct(tsk); @@ -124,7 +123,6 @@ void __put_task_struct(struct task_struct *tsk) security_task_free(tsk); free_uid(tsk->user); put_group_info(tsk->group_info); - delayacct_tsk_free(tsk); if (!profile_handoff_task(tsk)) free_task(tsk); @@ -201,10 +199,7 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) down_write(&oldmm->mmap_sem); flush_cache_mm(oldmm); - /* - * Not linked in yet - no deadlock potential: - */ - down_write_nested(&mm->mmap_sem, SINGLE_DEPTH_NESTING); + down_write(&mm->mmap_sem); mm->locked_vm = 0; mm->mmap = NULL; @@ -384,8 +379,6 @@ void fastcall __mmdrop(struct mm_struct *mm) */ void mmput(struct mm_struct *mm) { - might_sleep(); - if (atomic_dec_and_test(&mm->mm_users)) { exit_aio(mm); exit_mmap(mm); @@ -643,7 +636,6 @@ out: /* * Allocate a new files structure and copy contents from the * passed in files structure. - * errorp will be valid only when the returned files_struct is NULL. */ static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp) { @@ -652,7 +644,6 @@ static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp) int open_files, size, i, expand; struct fdtable *old_fdt, *new_fdt; - *errorp = -ENOMEM; newf = alloc_files(); if (!newf) goto out; @@ -768,6 +759,7 @@ static int copy_files(unsigned long clone_flags, struct task_struct * tsk) * break this. */ tsk->files = NULL; + error = -ENOMEM; newf = dup_fd(oldf, &error); if (!newf) goto out; @@ -837,7 +829,6 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts if (clone_flags & CLONE_THREAD) { atomic_inc(¤t->signal->count); atomic_inc(¤t->signal->live); - taskstats_tgid_alloc(current->signal); return 0; } sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL); @@ -882,7 +873,6 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts INIT_LIST_HEAD(&sig->cpu_timers[0]); INIT_LIST_HEAD(&sig->cpu_timers[1]); INIT_LIST_HEAD(&sig->cpu_timers[2]); - taskstats_tgid_init(sig); task_lock(current->group_leader); memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); @@ -896,7 +886,6 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts tsk->it_prof_expires = secs_to_cputime(sig->rlim[RLIMIT_CPU].rlim_cur); } - acct_init_pacct(&sig->pacct); return 0; } @@ -904,7 +893,6 @@ static inline int copy_signal(unsigned long clone_flags, struct task_struct * ts void __cleanup_signal(struct signal_struct *sig) { exit_thread_group_keys(sig); - taskstats_tgid_free(sig); kmem_cache_free(signal_cachep, sig); } @@ -936,15 +924,6 @@ asmlinkage long sys_set_tid_address(int __user *tidptr) return current->pid; } -static inline void rt_mutex_init_task(struct task_struct *p) -{ -#ifdef CONFIG_RT_MUTEXES - spin_lock_init(&p->pi_lock); - plist_head_init(&p->pi_waiters, &p->pi_lock); - p->pi_blocked_on = NULL; -#endif -} - /* * This creates a new process as a copy of the old one, * but does not actually start it yet. @@ -953,13 +932,13 @@ static inline void rt_mutex_init_task(struct task_struct *p) * parts of the process environment (as per the clone * flags). The actual kick-off is left to the caller. */ -static struct task_struct *copy_process(unsigned long clone_flags, - unsigned long stack_start, - struct pt_regs *regs, - unsigned long stack_size, - int __user *parent_tidptr, - int __user *child_tidptr, - int pid) +static task_t *copy_process(unsigned long clone_flags, + unsigned long stack_start, + struct pt_regs *regs, + unsigned long stack_size, + int __user *parent_tidptr, + int __user *child_tidptr, + int pid) { int retval; struct task_struct *p = NULL; @@ -992,15 +971,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, p = dup_task_struct(current); if (!p) goto fork_out; - - rt_mutex_init_task(p); - p->tux_info = NULL; -#ifdef CONFIG_TRACE_IRQFLAGS - DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled); - DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled); -#endif init_vx_info(&p->vx_info, current->vx_info); init_nx_info(&p->nx_info, current->nx_info); @@ -1046,18 +1018,20 @@ static struct task_struct *copy_process(unsigned long clone_flags, goto bad_fork_cleanup_put_domain; p->did_exec = 0; - delayacct_tsk_init(p); /* Must remain after dup_task_struct() */ copy_flags(clone_flags, p); p->pid = pid; retval = -EFAULT; if (clone_flags & CLONE_PARENT_SETTID) if (put_user(p->pid, parent_tidptr)) - goto bad_fork_cleanup_delays_binfmt; + goto bad_fork_cleanup; + + p->proc_dentry = NULL; INIT_LIST_HEAD(&p->children); INIT_LIST_HEAD(&p->sibling); p->vfork_done = NULL; spin_lock_init(&p->alloc_lock); + spin_lock_init(&p->proc_lock); clear_tsk_thread_flag(p, TIF_SIGPENDING); init_sigpending(&p->pending); @@ -1094,26 +1068,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, } mpol_fix_fork_child_flag(p); #endif -#ifdef CONFIG_TRACE_IRQFLAGS - p->irq_events = 0; - p->hardirqs_enabled = 0; - p->hardirq_enable_ip = 0; - p->hardirq_enable_event = 0; - p->hardirq_disable_ip = _THIS_IP_; - p->hardirq_disable_event = 0; - p->softirqs_enabled = 1; - p->softirq_enable_ip = _THIS_IP_; - p->softirq_enable_event = 0; - p->softirq_disable_ip = 0; - p->softirq_disable_event = 0; - p->hardirq_context = 0; - p->softirq_context = 0; -#endif -#ifdef CONFIG_LOCKDEP - p->lockdep_depth = 0; /* no locks held yet */ - p->curr_chain_key = 0; - p->lockdep_recursion = 0; -#endif #ifdef CONFIG_DEBUG_MUTEXES p->blocked_on = NULL; /* not blocked yet */ @@ -1157,9 +1111,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, #ifdef CONFIG_COMPAT p->compat_robust_list = NULL; #endif - INIT_LIST_HEAD(&p->pi_state_list); - p->pi_state_cache = NULL; - /* * sigaltstack should be cleared when sharing the same VM */ @@ -1240,6 +1191,18 @@ static struct task_struct *copy_process(unsigned long clone_flags, } if (clone_flags & CLONE_THREAD) { + /* + * Important: if an exit-all has been started then + * do not create this new thread - the whole thread + * group is supposed to exit anyway. + */ + if (current->signal->flags & SIGNAL_GROUP_EXIT) { + spin_unlock(¤t->sighand->siglock); + write_unlock_irq(&tasklist_lock); + retval = -EAGAIN; + goto bad_fork_cleanup_namespace; + } + p->group_leader = current->group_leader; list_add_tail_rcu(&p->thread_group, &p->group_leader->thread_group); @@ -1328,8 +1291,7 @@ bad_fork_cleanup_policy: bad_fork_cleanup_cpuset: #endif cpuset_exit(p); -bad_fork_cleanup_delays_binfmt: - delayacct_tsk_free(p); +bad_fork_cleanup: if (p->binfmt) module_put(p->binfmt->module); bad_fork_cleanup_put_domain: @@ -1353,9 +1315,9 @@ struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs) return regs; } -struct task_struct * __devinit fork_idle(int cpu) +task_t * __devinit fork_idle(int cpu) { - struct task_struct *task; + task_t *task; struct pt_regs regs; task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); @@ -1442,10 +1404,8 @@ long do_fork(unsigned long clone_flags, if (clone_flags & CLONE_VFORK) { wait_for_completion(&vfork); - if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) { - current->ptrace_message = nr; + if (unlikely (current->ptrace & PT_TRACE_VFORK_DONE)) ptrace_notify ((PTRACE_EVENT_VFORK_DONE << 8) | SIGTRAP); - } } } else { free_pid(pid); diff --git a/kernel/futex.c b/kernel/futex.c index 9d260e838..c27bb560b 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -12,10 +12,6 @@ * (C) Copyright 2006 Red Hat Inc, All Rights Reserved * Thanks to Thomas Gleixner for suggestions, analysis and fixes. * - * PI-futex support started by Ingo Molnar and Thomas Gleixner - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006 Timesys Corp., Thomas Gleixner - * * Thanks to Ben LaHaise for yelling "hashed waitqueues" loudly * enough at me, Linus for the original (flawed) idea, Matthew * Kirkwood for proof-of-concept implementation. @@ -48,10 +44,9 @@ #include #include #include +#include #include -#include "rtmutex_common.h" - #define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8) /* @@ -69,7 +64,7 @@ union futex_key { int offset; } shared; struct { - unsigned long address; + unsigned long uaddr; struct mm_struct *mm; int offset; } private; @@ -80,27 +75,6 @@ union futex_key { } both; }; -/* - * Priority Inheritance state: - */ -struct futex_pi_state { - /* - * list of 'owned' pi_state instances - these have to be - * cleaned up in do_exit() if the task exits prematurely: - */ - struct list_head list; - - /* - * The PI object: - */ - struct rt_mutex pi_mutex; - - struct task_struct *owner; - atomic_t refcount; - - union futex_key key; -}; - /* * We use this hashed waitqueue instead of a normal wait_queue_t, so * we can wake only the relevant ones (hashed queues may be shared). @@ -114,19 +88,15 @@ struct futex_q { struct list_head list; wait_queue_head_t waiters; - /* Which hash list lock to use: */ + /* Which hash list lock to use. */ spinlock_t *lock_ptr; - /* Key which the futex is hashed on: */ + /* Key which the futex is hashed on. */ union futex_key key; - /* For fd, sigio sent using these: */ + /* For fd, sigio sent using these. */ int fd; struct file *filp; - - /* Optional priority inheritance state: */ - struct futex_pi_state *pi_state; - struct task_struct *task; }; /* @@ -175,9 +145,8 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2) * * Should be called with ¤t->mm->mmap_sem but NOT any spinlocks. */ -static int get_futex_key(u32 __user *uaddr, union futex_key *key) +static int get_futex_key(unsigned long uaddr, union futex_key *key) { - unsigned long address = (unsigned long)uaddr; struct mm_struct *mm = current->mm; struct vm_area_struct *vma; struct page *page; @@ -186,16 +155,16 @@ static int get_futex_key(u32 __user *uaddr, union futex_key *key) /* * The futex address must be "naturally" aligned. */ - key->both.offset = address % PAGE_SIZE; + key->both.offset = uaddr % PAGE_SIZE; if (unlikely((key->both.offset % sizeof(u32)) != 0)) return -EINVAL; - address -= key->both.offset; + uaddr -= key->both.offset; /* * The futex is hashed differently depending on whether * it's in a shared or private mapping. So check vma first. */ - vma = find_extend_vma(mm, address); + vma = find_extend_vma(mm, uaddr); if (unlikely(!vma)) return -EFAULT; @@ -216,7 +185,7 @@ static int get_futex_key(u32 __user *uaddr, union futex_key *key) */ if (likely(!(vma->vm_flags & VM_MAYSHARE))) { key->private.mm = mm; - key->private.address = address; + key->private.uaddr = uaddr; return 0; } @@ -226,7 +195,7 @@ static int get_futex_key(u32 __user *uaddr, union futex_key *key) key->shared.inode = vma->vm_file->f_dentry->d_inode; key->both.offset++; /* Bit 0 of offset indicates inode-based key. */ if (likely(!(vma->vm_flags & VM_NONLINEAR))) { - key->shared.pgoff = (((address - vma->vm_start) >> PAGE_SHIFT) + key->shared.pgoff = (((uaddr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff); return 0; } @@ -237,7 +206,7 @@ static int get_futex_key(u32 __user *uaddr, union futex_key *key) * from swap. But that's a lot of code to duplicate here * for a rare case, so we simply fetch the page. */ - err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL); + err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL); if (err >= 0) { key->shared.pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); @@ -278,258 +247,17 @@ static void drop_key_refs(union futex_key *key) } } -static inline int get_futex_value_locked(u32 *dest, u32 __user *from) +static inline int get_futex_value_locked(int *dest, int __user *from) { int ret; inc_preempt_count(); - ret = __copy_from_user_inatomic(dest, from, sizeof(u32)); + ret = __copy_from_user_inatomic(dest, from, sizeof(int)); dec_preempt_count(); return ret ? -EFAULT : 0; } -/* - * Fault handling. Called with current->mm->mmap_sem held. - */ -static int futex_handle_fault(unsigned long address, int attempt) -{ - struct vm_area_struct * vma; - struct mm_struct *mm = current->mm; - - if (attempt > 2 || !(vma = find_vma(mm, address)) || - vma->vm_start > address || !(vma->vm_flags & VM_WRITE)) - return -EFAULT; - - switch (handle_mm_fault(mm, vma, address, 1)) { - case VM_FAULT_MINOR: - current->min_flt++; - break; - case VM_FAULT_MAJOR: - current->maj_flt++; - break; - default: - return -EFAULT; - } - return 0; -} - -/* - * PI code: - */ -static int refill_pi_state_cache(void) -{ - struct futex_pi_state *pi_state; - - if (likely(current->pi_state_cache)) - return 0; - - pi_state = kmalloc(sizeof(*pi_state), GFP_KERNEL); - - if (!pi_state) - return -ENOMEM; - - memset(pi_state, 0, sizeof(*pi_state)); - INIT_LIST_HEAD(&pi_state->list); - /* pi_mutex gets initialized later */ - pi_state->owner = NULL; - atomic_set(&pi_state->refcount, 1); - - current->pi_state_cache = pi_state; - - return 0; -} - -static struct futex_pi_state * alloc_pi_state(void) -{ - struct futex_pi_state *pi_state = current->pi_state_cache; - - WARN_ON(!pi_state); - current->pi_state_cache = NULL; - - return pi_state; -} - -static void free_pi_state(struct futex_pi_state *pi_state) -{ - if (!atomic_dec_and_test(&pi_state->refcount)) - return; - - /* - * If pi_state->owner is NULL, the owner is most probably dying - * and has cleaned up the pi_state already - */ - if (pi_state->owner) { - spin_lock_irq(&pi_state->owner->pi_lock); - list_del_init(&pi_state->list); - spin_unlock_irq(&pi_state->owner->pi_lock); - - rt_mutex_proxy_unlock(&pi_state->pi_mutex, pi_state->owner); - } - - if (current->pi_state_cache) - kfree(pi_state); - else { - /* - * pi_state->list is already empty. - * clear pi_state->owner. - * refcount is at 0 - put it back to 1. - */ - pi_state->owner = NULL; - atomic_set(&pi_state->refcount, 1); - current->pi_state_cache = pi_state; - } -} - -/* - * Look up the task based on what TID userspace gave us. - * We dont trust it. - */ -static struct task_struct * futex_find_get_task(pid_t pid) -{ - struct task_struct *p; - - read_lock(&tasklist_lock); - p = find_task_by_pid(pid); - if (!p) - goto out_unlock; - if ((current->euid != p->euid) && (current->euid != p->uid)) { - p = NULL; - goto out_unlock; - } - if (p->exit_state != 0) { - p = NULL; - goto out_unlock; - } - get_task_struct(p); -out_unlock: - read_unlock(&tasklist_lock); - - return p; -} - -/* - * This task is holding PI mutexes at exit time => bad. - * Kernel cleans up PI-state, but userspace is likely hosed. - * (Robust-futex cleanup is separate and might save the day for userspace.) - */ -void exit_pi_state_list(struct task_struct *curr) -{ - struct list_head *next, *head = &curr->pi_state_list; - struct futex_pi_state *pi_state; - struct futex_hash_bucket *hb; - union futex_key key; - - /* - * We are a ZOMBIE and nobody can enqueue itself on - * pi_state_list anymore, but we have to be careful - * versus waiters unqueueing themselves: - */ - spin_lock_irq(&curr->pi_lock); - while (!list_empty(head)) { - - next = head->next; - pi_state = list_entry(next, struct futex_pi_state, list); - key = pi_state->key; - hb = hash_futex(&key); - spin_unlock_irq(&curr->pi_lock); - - spin_lock(&hb->lock); - - spin_lock_irq(&curr->pi_lock); - /* - * We dropped the pi-lock, so re-check whether this - * task still owns the PI-state: - */ - if (head->next != next) { - spin_unlock(&hb->lock); - continue; - } - - WARN_ON(pi_state->owner != curr); - WARN_ON(list_empty(&pi_state->list)); - list_del_init(&pi_state->list); - pi_state->owner = NULL; - spin_unlock_irq(&curr->pi_lock); - - rt_mutex_unlock(&pi_state->pi_mutex); - - spin_unlock(&hb->lock); - - spin_lock_irq(&curr->pi_lock); - } - spin_unlock_irq(&curr->pi_lock); -} - -static int -lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, struct futex_q *me) -{ - struct futex_pi_state *pi_state = NULL; - struct futex_q *this, *next; - struct list_head *head; - struct task_struct *p; - pid_t pid; - - head = &hb->chain; - - list_for_each_entry_safe(this, next, head, list) { - if (match_futex(&this->key, &me->key)) { - /* - * Another waiter already exists - bump up - * the refcount and return its pi_state: - */ - pi_state = this->pi_state; - /* - * Userspace might have messed up non PI and PI futexes - */ - if (unlikely(!pi_state)) - return -EINVAL; - - WARN_ON(!atomic_read(&pi_state->refcount)); - - atomic_inc(&pi_state->refcount); - me->pi_state = pi_state; - - return 0; - } - } - - /* - * We are the first waiter - try to look up the real owner and attach - * the new pi_state to it, but bail out when the owner died bit is set - * and TID = 0: - */ - pid = uval & FUTEX_TID_MASK; - if (!pid && (uval & FUTEX_OWNER_DIED)) - return -ESRCH; - p = futex_find_get_task(pid); - if (!p) - return -ESRCH; - - pi_state = alloc_pi_state(); - - /* - * Initialize the pi_mutex in locked state and make 'p' - * the owner of it: - */ - rt_mutex_init_proxy_locked(&pi_state->pi_mutex, p); - - /* Store the key for possible exit cleanups: */ - pi_state->key = me->key; - - spin_lock_irq(&p->pi_lock); - WARN_ON(!list_empty(&pi_state->list)); - list_add(&pi_state->list, &p->pi_state_list); - pi_state->owner = p; - spin_unlock_irq(&p->pi_lock); - - put_task_struct(p); - - me->pi_state = pi_state; - - return 0; -} - /* * The hash bucket lock must be held when this is called. * Afterwards, the futex_q must not be accessed. @@ -557,105 +285,16 @@ static void wake_futex(struct futex_q *q) q->lock_ptr = NULL; } -static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) -{ - struct task_struct *new_owner; - struct futex_pi_state *pi_state = this->pi_state; - u32 curval, newval; - - if (!pi_state) - return -EINVAL; - - new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); - - /* - * This happens when we have stolen the lock and the original - * pending owner did not enqueue itself back on the rt_mutex. - * Thats not a tragedy. We know that way, that a lock waiter - * is on the fly. We make the futex_q waiter the pending owner. - */ - if (!new_owner) - new_owner = this->task; - - /* - * We pass it to the next owner. (The WAITERS bit is always - * kept enabled while there is PI state around. We must also - * preserve the owner died bit.) - */ - if (!(uval & FUTEX_OWNER_DIED)) { - newval = FUTEX_WAITERS | new_owner->pid; - - inc_preempt_count(); - curval = futex_atomic_cmpxchg_inatomic(uaddr, uval, newval); - dec_preempt_count(); - if (curval == -EFAULT) - return -EFAULT; - if (curval != uval) - return -EINVAL; - } - - spin_lock_irq(&pi_state->owner->pi_lock); - WARN_ON(list_empty(&pi_state->list)); - list_del_init(&pi_state->list); - spin_unlock_irq(&pi_state->owner->pi_lock); - - spin_lock_irq(&new_owner->pi_lock); - WARN_ON(!list_empty(&pi_state->list)); - list_add(&pi_state->list, &new_owner->pi_state_list); - pi_state->owner = new_owner; - spin_unlock_irq(&new_owner->pi_lock); - - rt_mutex_unlock(&pi_state->pi_mutex); - - return 0; -} - -static int unlock_futex_pi(u32 __user *uaddr, u32 uval) -{ - u32 oldval; - - /* - * There is no waiter, so we unlock the futex. The owner died - * bit has not to be preserved here. We are the owner: - */ - inc_preempt_count(); - oldval = futex_atomic_cmpxchg_inatomic(uaddr, uval, 0); - dec_preempt_count(); - - if (oldval == -EFAULT) - return oldval; - if (oldval != uval) - return -EAGAIN; - - return 0; -} - -/* - * Express the locking dependencies for lockdep: - */ -static inline void -double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) -{ - if (hb1 <= hb2) { - spin_lock(&hb1->lock); - if (hb1 < hb2) - spin_lock_nested(&hb2->lock, SINGLE_DEPTH_NESTING); - } else { /* hb1 > hb2 */ - spin_lock(&hb2->lock); - spin_lock_nested(&hb1->lock, SINGLE_DEPTH_NESTING); - } -} - /* * Wake up all waiters hashed on the physical page that is mapped * to this virtual address: */ -static int futex_wake(u32 __user *uaddr, int nr_wake) +static int futex_wake(unsigned long uaddr, int nr_wake) { - struct futex_hash_bucket *hb; - struct futex_q *this, *next; - struct list_head *head; union futex_key key; + struct futex_hash_bucket *bh; + struct list_head *head; + struct futex_q *this, *next; int ret; down_read(¤t->mm->mmap_sem); @@ -664,23 +303,19 @@ static int futex_wake(u32 __user *uaddr, int nr_wake) if (unlikely(ret != 0)) goto out; - hb = hash_futex(&key); - spin_lock(&hb->lock); - head = &hb->chain; + bh = hash_futex(&key); + spin_lock(&bh->lock); + head = &bh->chain; list_for_each_entry_safe(this, next, head, list) { if (match_futex (&this->key, &key)) { - if (this->pi_state) { - ret = -EINVAL; - break; - } wake_futex(this); if (++ret >= nr_wake) break; } } - spin_unlock(&hb->lock); + spin_unlock(&bh->lock); out: up_read(¤t->mm->mmap_sem); return ret; @@ -690,12 +325,10 @@ out: * Wake up all waiters hashed on the physical page that is mapped * to this virtual address: */ -static int -futex_wake_op(u32 __user *uaddr1, u32 __user *uaddr2, - int nr_wake, int nr_wake2, int op) +static int futex_wake_op(unsigned long uaddr1, unsigned long uaddr2, int nr_wake, int nr_wake2, int op) { union futex_key key1, key2; - struct futex_hash_bucket *hb1, *hb2; + struct futex_hash_bucket *bh1, *bh2; struct list_head *head; struct futex_q *this, *next; int ret, op_ret, attempt = 0; @@ -710,25 +343,27 @@ retryfull: if (unlikely(ret != 0)) goto out; - hb1 = hash_futex(&key1); - hb2 = hash_futex(&key2); + bh1 = hash_futex(&key1); + bh2 = hash_futex(&key2); retry: - double_lock_hb(hb1, hb2); + if (bh1 < bh2) + spin_lock(&bh1->lock); + spin_lock(&bh2->lock); + if (bh1 > bh2) + spin_lock(&bh1->lock); - op_ret = futex_atomic_op_inuser(op, uaddr2); + op_ret = futex_atomic_op_inuser(op, (int __user *)uaddr2); if (unlikely(op_ret < 0)) { - u32 dummy; + int dummy; - spin_unlock(&hb1->lock); - if (hb1 != hb2) - spin_unlock(&hb2->lock); + spin_unlock(&bh1->lock); + if (bh1 != bh2) + spin_unlock(&bh2->lock); #ifndef CONFIG_MMU - /* - * we don't get EFAULT from MMU faults if we don't have an MMU, - * but we might get them from range checking - */ + /* we don't get EFAULT from MMU faults if we don't have an MMU, + * but we might get them from range checking */ ret = op_ret; goto out; #endif @@ -738,36 +373,47 @@ retry: goto out; } - /* - * futex_atomic_op_inuser needs to both read and write + /* futex_atomic_op_inuser needs to both read and write * *(int __user *)uaddr2, but we can't modify it * non-atomically. Therefore, if get_user below is not * enough, we need to handle the fault ourselves, while - * still holding the mmap_sem. - */ + * still holding the mmap_sem. */ if (attempt++) { - if (futex_handle_fault((unsigned long)uaddr2, - attempt)) { - ret = -EFAULT; + struct vm_area_struct * vma; + struct mm_struct *mm = current->mm; + + ret = -EFAULT; + if (attempt >= 2 || + !(vma = find_vma(mm, uaddr2)) || + vma->vm_start > uaddr2 || + !(vma->vm_flags & VM_WRITE)) + goto out; + + switch (handle_mm_fault(mm, vma, uaddr2, 1)) { + case VM_FAULT_MINOR: + current->min_flt++; + break; + case VM_FAULT_MAJOR: + current->maj_flt++; + break; + default: goto out; } goto retry; } - /* - * If we would have faulted, release mmap_sem, - * fault it in and start all over again. - */ + /* If we would have faulted, release mmap_sem, + * fault it in and start all over again. */ up_read(¤t->mm->mmap_sem); - ret = get_user(dummy, uaddr2); + ret = get_user(dummy, (int __user *)uaddr2); if (ret) return ret; goto retryfull; } - head = &hb1->chain; + head = &bh1->chain; list_for_each_entry_safe(this, next, head, list) { if (match_futex (&this->key, &key1)) { @@ -778,7 +424,7 @@ retry: } if (op_ret > 0) { - head = &hb2->chain; + head = &bh2->chain; op_ret = 0; list_for_each_entry_safe(this, next, head, list) { @@ -791,9 +437,9 @@ retry: ret += op_ret; } - spin_unlock(&hb1->lock); - if (hb1 != hb2) - spin_unlock(&hb2->lock); + spin_unlock(&bh1->lock); + if (bh1 != bh2) + spin_unlock(&bh2->lock); out: up_read(¤t->mm->mmap_sem); return ret; @@ -803,11 +449,11 @@ out: * Requeue all waiters hashed on one physical page to another * physical page. */ -static int futex_requeue(u32 __user *uaddr1, u32 __user *uaddr2, - int nr_wake, int nr_requeue, u32 *cmpval) +static int futex_requeue(unsigned long uaddr1, unsigned long uaddr2, + int nr_wake, int nr_requeue, int *valp) { union futex_key key1, key2; - struct futex_hash_bucket *hb1, *hb2; + struct futex_hash_bucket *bh1, *bh2; struct list_head *head1; struct futex_q *this, *next; int ret, drop_count = 0; @@ -822,68 +468,68 @@ static int futex_requeue(u32 __user *uaddr1, u32 __user *uaddr2, if (unlikely(ret != 0)) goto out; - hb1 = hash_futex(&key1); - hb2 = hash_futex(&key2); + bh1 = hash_futex(&key1); + bh2 = hash_futex(&key2); - double_lock_hb(hb1, hb2); + if (bh1 < bh2) + spin_lock(&bh1->lock); + spin_lock(&bh2->lock); + if (bh1 > bh2) + spin_lock(&bh1->lock); - if (likely(cmpval != NULL)) { - u32 curval; + if (likely(valp != NULL)) { + int curval; - ret = get_futex_value_locked(&curval, uaddr1); + ret = get_futex_value_locked(&curval, (int __user *)uaddr1); if (unlikely(ret)) { - spin_unlock(&hb1->lock); - if (hb1 != hb2) - spin_unlock(&hb2->lock); + spin_unlock(&bh1->lock); + if (bh1 != bh2) + spin_unlock(&bh2->lock); - /* - * If we would have faulted, release mmap_sem, fault + /* If we would have faulted, release mmap_sem, fault * it in and start all over again. */ up_read(¤t->mm->mmap_sem); - ret = get_user(curval, uaddr1); + ret = get_user(curval, (int __user *)uaddr1); if (!ret) goto retry; return ret; } - if (curval != *cmpval) { + if (curval != *valp) { ret = -EAGAIN; goto out_unlock; } } - head1 = &hb1->chain; + head1 = &bh1->chain; list_for_each_entry_safe(this, next, head1, list) { if (!match_futex (&this->key, &key1)) continue; if (++ret <= nr_wake) { wake_futex(this); } else { - /* - * If key1 and key2 hash to the same bucket, no need to - * requeue. - */ - if (likely(head1 != &hb2->chain)) { - list_move_tail(&this->list, &hb2->chain); - this->lock_ptr = &hb2->lock; - } + list_move_tail(&this->list, &bh2->chain); + this->lock_ptr = &bh2->lock; this->key = key2; get_key_refs(&key2); drop_count++; if (ret - nr_wake >= nr_requeue) break; + /* Make sure to stop if key1 == key2 */ + if (head1 == &bh2->chain && head1 != &next->list) + head1 = &this->list; } } out_unlock: - spin_unlock(&hb1->lock); - if (hb1 != hb2) - spin_unlock(&hb2->lock); + spin_unlock(&bh1->lock); + if (bh1 != bh2) + spin_unlock(&bh2->lock); /* drop_key_refs() must be called outside the spinlocks. */ while (--drop_count >= 0) @@ -898,7 +544,7 @@ out: static inline struct futex_hash_bucket * queue_lock(struct futex_q *q, int fd, struct file *filp) { - struct futex_hash_bucket *hb; + struct futex_hash_bucket *bh; q->fd = fd; q->filp = filp; @@ -906,24 +552,23 @@ queue_lock(struct futex_q *q, int fd, struct file *filp) init_waitqueue_head(&q->waiters); get_key_refs(&q->key); - hb = hash_futex(&q->key); - q->lock_ptr = &hb->lock; + bh = hash_futex(&q->key); + q->lock_ptr = &bh->lock; - spin_lock(&hb->lock); - return hb; + spin_lock(&bh->lock); + return bh; } -static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *hb) +static inline void __queue_me(struct futex_q *q, struct futex_hash_bucket *bh) { - list_add_tail(&q->list, &hb->chain); - q->task = current; - spin_unlock(&hb->lock); + list_add_tail(&q->list, &bh->chain); + spin_unlock(&bh->lock); } static inline void -queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb) +queue_unlock(struct futex_q *q, struct futex_hash_bucket *bh) { - spin_unlock(&hb->lock); + spin_unlock(&bh->lock); drop_key_refs(&q->key); } @@ -935,17 +580,16 @@ queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb) /* The key must be already stored in q->key. */ static void queue_me(struct futex_q *q, int fd, struct file *filp) { - struct futex_hash_bucket *hb; - - hb = queue_lock(q, fd, filp); - __queue_me(q, hb); + struct futex_hash_bucket *bh; + bh = queue_lock(q, fd, filp); + __queue_me(q, bh); } /* Return 1 if we were still queued (ie. 0 means we were woken) */ static int unqueue_me(struct futex_q *q) { - spinlock_t *lock_ptr; int ret = 0; + spinlock_t *lock_ptr; /* In the common case we don't take the spinlock, which is nice. */ retry: @@ -972,9 +616,6 @@ static int unqueue_me(struct futex_q *q) } WARN_ON(list_empty(&q->list)); list_del(&q->list); - - BUG_ON(q->pi_state); - spin_unlock(lock_ptr); ret = 1; } @@ -983,42 +624,21 @@ static int unqueue_me(struct futex_q *q) return ret; } -/* - * PI futexes can not be requeued and must remove themself from the - * hash bucket. The hash bucket lock is held on entry and dropped here. - */ -static void unqueue_me_pi(struct futex_q *q, struct futex_hash_bucket *hb) -{ - WARN_ON(list_empty(&q->list)); - list_del(&q->list); - - BUG_ON(!q->pi_state); - free_pi_state(q->pi_state); - q->pi_state = NULL; - - spin_unlock(&hb->lock); - - drop_key_refs(&q->key); -} - -static int futex_wait(u32 __user *uaddr, u32 val, unsigned long time) +static int futex_wait(unsigned long uaddr, int val, unsigned long time) { - struct task_struct *curr = current; - DECLARE_WAITQUEUE(wait, curr); - struct futex_hash_bucket *hb; + DECLARE_WAITQUEUE(wait, current); + int ret, curval; struct futex_q q; - u32 uval; - int ret; + struct futex_hash_bucket *bh; - q.pi_state = NULL; retry: - down_read(&curr->mm->mmap_sem); + down_read(¤t->mm->mmap_sem); ret = get_futex_key(uaddr, &q.key); if (unlikely(ret != 0)) goto out_release_sem; - hb = queue_lock(&q, -1, NULL); + bh = queue_lock(&q, -1, NULL); /* * Access the page AFTER the futex is queued. @@ -1040,35 +660,37 @@ static int futex_wait(u32 __user *uaddr, u32 val, unsigned long time) * We hold the mmap semaphore, so the mapping cannot have changed * since we looked it up in get_futex_key. */ - ret = get_futex_value_locked(&uval, uaddr); + + ret = get_futex_value_locked(&curval, (int __user *)uaddr); if (unlikely(ret)) { - queue_unlock(&q, hb); + queue_unlock(&q, bh); - /* - * If we would have faulted, release mmap_sem, fault it in and + /* If we would have faulted, release mmap_sem, fault it in and * start all over again. */ - up_read(&curr->mm->mmap_sem); + up_read(¤t->mm->mmap_sem); - ret = get_user(uval, uaddr); + ret = get_user(curval, (int __user *)uaddr); if (!ret) goto retry; return ret; } - ret = -EWOULDBLOCK; - if (uval != val) - goto out_unlock_release_sem; + if (curval != val) { + ret = -EWOULDBLOCK; + queue_unlock(&q, bh); + goto out_release_sem; + } /* Only actually queue if *uaddr contained val. */ - __queue_me(&q, hb); + __queue_me(&q, bh); /* * Now the futex is queued and we have checked the data, we * don't want to hold mmap_sem while we sleep. - */ - up_read(&curr->mm->mmap_sem); + */ + up_read(¤t->mm->mmap_sem); /* * There might have been scheduling since the queue_me(), as we @@ -1100,367 +722,12 @@ static int futex_wait(u32 __user *uaddr, u32 val, unsigned long time) return 0; if (time == 0) return -ETIMEDOUT; - /* - * We expect signal_pending(current), but another thread may - * have handled it for us already. - */ + /* We expect signal_pending(current), but another thread may + * have handled it for us already. */ return -EINTR; - out_unlock_release_sem: - queue_unlock(&q, hb); - - out_release_sem: - up_read(&curr->mm->mmap_sem); - return ret; -} - -/* - * Userspace tried a 0 -> TID atomic transition of the futex value - * and failed. The kernel side here does the whole locking operation: - * if there are waiters then it will block, it does PI, etc. (Due to - * races the kernel might see a 0 value of the futex too.) - */ -static int futex_lock_pi(u32 __user *uaddr, int detect, unsigned long sec, - long nsec, int trylock) -{ - struct hrtimer_sleeper timeout, *to = NULL; - struct task_struct *curr = current; - struct futex_hash_bucket *hb; - u32 uval, newval, curval; - struct futex_q q; - int ret, attempt = 0; - - if (refill_pi_state_cache()) - return -ENOMEM; - - if (sec != MAX_SCHEDULE_TIMEOUT) { - to = &timeout; - hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_ABS); - hrtimer_init_sleeper(to, current); - to->timer.expires = ktime_set(sec, nsec); - } - - q.pi_state = NULL; - retry: - down_read(&curr->mm->mmap_sem); - - ret = get_futex_key(uaddr, &q.key); - if (unlikely(ret != 0)) - goto out_release_sem; - - hb = queue_lock(&q, -1, NULL); - - retry_locked: - /* - * To avoid races, we attempt to take the lock here again - * (by doing a 0 -> TID atomic cmpxchg), while holding all - * the locks. It will most likely not succeed. - */ - newval = current->pid; - - inc_preempt_count(); - curval = futex_atomic_cmpxchg_inatomic(uaddr, 0, newval); - dec_preempt_count(); - - if (unlikely(curval == -EFAULT)) - goto uaddr_faulted; - - /* We own the lock already */ - if (unlikely((curval & FUTEX_TID_MASK) == current->pid)) { - if (!detect && 0) - force_sig(SIGKILL, current); - ret = -EDEADLK; - goto out_unlock_release_sem; - } - - /* - * Surprise - we got the lock. Just return - * to userspace: - */ - if (unlikely(!curval)) - goto out_unlock_release_sem; - - uval = curval; - newval = uval | FUTEX_WAITERS; - - inc_preempt_count(); - curval = futex_atomic_cmpxchg_inatomic(uaddr, uval, newval); - dec_preempt_count(); - - if (unlikely(curval == -EFAULT)) - goto uaddr_faulted; - if (unlikely(curval != uval)) - goto retry_locked; - - /* - * We dont have the lock. Look up the PI state (or create it if - * we are the first waiter): - */ - ret = lookup_pi_state(uval, hb, &q); - - if (unlikely(ret)) { - /* - * There were no waiters and the owner task lookup - * failed. When the OWNER_DIED bit is set, then we - * know that this is a robust futex and we actually - * take the lock. This is safe as we are protected by - * the hash bucket lock. We also set the waiters bit - * unconditionally here, to simplify glibc handling of - * multiple tasks racing to acquire the lock and - * cleanup the problems which were left by the dead - * owner. - */ - if (curval & FUTEX_OWNER_DIED) { - uval = newval; - newval = current->pid | - FUTEX_OWNER_DIED | FUTEX_WAITERS; - - inc_preempt_count(); - curval = futex_atomic_cmpxchg_inatomic(uaddr, - uval, newval); - dec_preempt_count(); - - if (unlikely(curval == -EFAULT)) - goto uaddr_faulted; - if (unlikely(curval != uval)) - goto retry_locked; - ret = 0; - } - goto out_unlock_release_sem; - } - - /* - * Only actually queue now that the atomic ops are done: - */ - __queue_me(&q, hb); - - /* - * Now the futex is queued and we have checked the data, we - * don't want to hold mmap_sem while we sleep. - */ - up_read(&curr->mm->mmap_sem); - - WARN_ON(!q.pi_state); - /* - * Block on the PI mutex: - */ - if (!trylock) - ret = rt_mutex_timed_lock(&q.pi_state->pi_mutex, to, 1); - else { - ret = rt_mutex_trylock(&q.pi_state->pi_mutex); - /* Fixup the trylock return value: */ - ret = ret ? 0 : -EWOULDBLOCK; - } - - down_read(&curr->mm->mmap_sem); - spin_lock(q.lock_ptr); - - /* - * Got the lock. We might not be the anticipated owner if we - * did a lock-steal - fix up the PI-state in that case. - */ - if (!ret && q.pi_state->owner != curr) { - u32 newtid = current->pid | FUTEX_WAITERS; - - /* Owner died? */ - if (q.pi_state->owner != NULL) { - spin_lock_irq(&q.pi_state->owner->pi_lock); - WARN_ON(list_empty(&q.pi_state->list)); - list_del_init(&q.pi_state->list); - spin_unlock_irq(&q.pi_state->owner->pi_lock); - } else - newtid |= FUTEX_OWNER_DIED; - - q.pi_state->owner = current; - - spin_lock_irq(¤t->pi_lock); - WARN_ON(!list_empty(&q.pi_state->list)); - list_add(&q.pi_state->list, ¤t->pi_state_list); - spin_unlock_irq(¤t->pi_lock); - - /* Unqueue and drop the lock */ - unqueue_me_pi(&q, hb); - up_read(&curr->mm->mmap_sem); - /* - * We own it, so we have to replace the pending owner - * TID. This must be atomic as we have preserve the - * owner died bit here. - */ - ret = get_user(uval, uaddr); - while (!ret) { - newval = (uval & FUTEX_OWNER_DIED) | newtid; - curval = futex_atomic_cmpxchg_inatomic(uaddr, - uval, newval); - if (curval == -EFAULT) - ret = -EFAULT; - if (curval == uval) - break; - uval = curval; - } - } else { - /* - * Catch the rare case, where the lock was released - * when we were on the way back before we locked - * the hash bucket. - */ - if (ret && q.pi_state->owner == curr) { - if (rt_mutex_trylock(&q.pi_state->pi_mutex)) - ret = 0; - } - /* Unqueue and drop the lock */ - unqueue_me_pi(&q, hb); - up_read(&curr->mm->mmap_sem); - } - - if (!detect && ret == -EDEADLK && 0) - force_sig(SIGKILL, current); - - return ret != -EINTR ? ret : -ERESTARTNOINTR; - - out_unlock_release_sem: - queue_unlock(&q, hb); - out_release_sem: - up_read(&curr->mm->mmap_sem); - return ret; - - uaddr_faulted: - /* - * We have to r/w *(int __user *)uaddr, but we can't modify it - * non-atomically. Therefore, if get_user below is not - * enough, we need to handle the fault ourselves, while - * still holding the mmap_sem. - */ - if (attempt++) { - if (futex_handle_fault((unsigned long)uaddr, attempt)) { - ret = -EFAULT; - goto out_unlock_release_sem; - } - goto retry_locked; - } - - queue_unlock(&q, hb); - up_read(&curr->mm->mmap_sem); - - ret = get_user(uval, uaddr); - if (!ret && (uval != -EFAULT)) - goto retry; - - return ret; -} - -/* - * Userspace attempted a TID -> 0 atomic transition, and failed. - * This is the in-kernel slowpath: we look up the PI state (if any), - * and do the rt-mutex unlock. - */ -static int futex_unlock_pi(u32 __user *uaddr) -{ - struct futex_hash_bucket *hb; - struct futex_q *this, *next; - u32 uval; - struct list_head *head; - union futex_key key; - int ret, attempt = 0; - -retry: - if (get_user(uval, uaddr)) - return -EFAULT; - /* - * We release only a lock we actually own: - */ - if ((uval & FUTEX_TID_MASK) != current->pid) - return -EPERM; - /* - * First take all the futex related locks: - */ - down_read(¤t->mm->mmap_sem); - - ret = get_futex_key(uaddr, &key); - if (unlikely(ret != 0)) - goto out; - - hb = hash_futex(&key); - spin_lock(&hb->lock); - -retry_locked: - /* - * To avoid races, try to do the TID -> 0 atomic transition - * again. If it succeeds then we can return without waking - * anyone else up: - */ - if (!(uval & FUTEX_OWNER_DIED)) { - inc_preempt_count(); - uval = futex_atomic_cmpxchg_inatomic(uaddr, current->pid, 0); - dec_preempt_count(); - } - - if (unlikely(uval == -EFAULT)) - goto pi_faulted; - /* - * Rare case: we managed to release the lock atomically, - * no need to wake anyone else up: - */ - if (unlikely(uval == current->pid)) - goto out_unlock; - - /* - * Ok, other tasks may need to be woken up - check waiters - * and do the wakeup if necessary: - */ - head = &hb->chain; - - list_for_each_entry_safe(this, next, head, list) { - if (!match_futex (&this->key, &key)) - continue; - ret = wake_futex_pi(uaddr, uval, this); - /* - * The atomic access to the futex value - * generated a pagefault, so retry the - * user-access and the wakeup: - */ - if (ret == -EFAULT) - goto pi_faulted; - goto out_unlock; - } - /* - * No waiters - kernel unlocks the futex: - */ - if (!(uval & FUTEX_OWNER_DIED)) { - ret = unlock_futex_pi(uaddr, uval); - if (ret == -EFAULT) - goto pi_faulted; - } - -out_unlock: - spin_unlock(&hb->lock); -out: up_read(¤t->mm->mmap_sem); - - return ret; - -pi_faulted: - /* - * We have to r/w *(int __user *)uaddr, but we can't modify it - * non-atomically. Therefore, if get_user below is not - * enough, we need to handle the fault ourselves, while - * still holding the mmap_sem. - */ - if (attempt++) { - if (futex_handle_fault((unsigned long)uaddr, attempt)) { - ret = -EFAULT; - goto out_unlock; - } - goto retry_locked; - } - - spin_unlock(&hb->lock); - up_read(¤t->mm->mmap_sem); - - ret = get_user(uval, uaddr); - if (!ret && (uval != -EFAULT)) - goto retry; - return ret; } @@ -1470,7 +737,6 @@ static int futex_close(struct inode *inode, struct file *filp) unqueue_me(q); kfree(q); - return 0; } @@ -1502,7 +768,7 @@ static struct file_operations futex_fops = { * Signal allows caller to avoid the race which would occur if they * set the sigio stuff up afterwards. */ -static int futex_fd(u32 __user *uaddr, int signal) +static int futex_fd(unsigned long uaddr, int signal) { struct futex_q *q; struct file *filp; @@ -1539,7 +805,6 @@ static int futex_fd(u32 __user *uaddr, int signal) err = -ENOMEM; goto error; } - q->pi_state = NULL; down_read(¤t->mm->mmap_sem); err = get_futex_key(uaddr, &q->key); @@ -1577,7 +842,7 @@ error: * Implementation: user-space maintains a per-thread list of locks it * is holding. Upon do_exit(), the kernel carefully walks this list, * and marks all locks that are owned by this thread with the - * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is + * FUTEX_OWNER_DEAD bit, and wakes up a waiter (if any). The list is * always manipulated with the lock held, so the list is private and * per-thread. Userspace also maintains a per-thread 'list_op_pending' * field, to allow the kernel to clean up if the thread dies after @@ -1650,9 +915,9 @@ err_unlock: * Process a futex-list entry, check whether it's owned by the * dying task, and do notification if so: */ -int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) +int handle_futex_death(u32 __user *uaddr, struct task_struct *curr) { - u32 uval, nval, mval; + u32 uval; retry: if (get_user(uval, uaddr)) @@ -1669,44 +934,16 @@ retry: * thread-death.) The rest of the cleanup is done in * userspace. */ - mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED; - nval = futex_atomic_cmpxchg_inatomic(uaddr, uval, mval); - - if (nval == -EFAULT) - return -1; - - if (nval != uval) + if (futex_atomic_cmpxchg_inatomic(uaddr, uval, + uval | FUTEX_OWNER_DIED) != uval) goto retry; - /* - * Wake robust non-PI futexes here. The wakeup of - * PI futexes happens in exit_pi_state(): - */ - if (!pi) { - if (uval & FUTEX_WAITERS) - futex_wake(uaddr, 1); - } + if (uval & FUTEX_WAITERS) + futex_wake((unsigned long)uaddr, 1); } return 0; } -/* - * Fetch a robust-list pointer. Bit 0 signals PI futexes: - */ -static inline int fetch_robust_entry(struct robust_list __user **entry, - struct robust_list __user **head, int *pi) -{ - unsigned long uentry; - - if (get_user(uentry, (unsigned long *)head)) - return -EFAULT; - - *entry = (void *)(uentry & ~1UL); - *pi = uentry & 1; - - return 0; -} - /* * Walk curr->robust_list (very carefully, it's a userspace list!) * and mark any locks found there dead, and notify any waiters. @@ -1717,14 +954,14 @@ void exit_robust_list(struct task_struct *curr) { struct robust_list_head __user *head = curr->robust_list; struct robust_list __user *entry, *pending; - unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; + unsigned int limit = ROBUST_LIST_LIMIT; unsigned long futex_offset; /* * Fetch the list head (which was registered earlier, via * sys_set_robust_list()): */ - if (fetch_robust_entry(&entry, &head->list.next, &pi)) + if (get_user(entry, &head->list.next)) return; /* * Fetch the relative futex offset: @@ -1735,25 +972,24 @@ void exit_robust_list(struct task_struct *curr) * Fetch any possibly pending lock-add first, and handle it * if it exists: */ - if (fetch_robust_entry(&pending, &head->list_op_pending, &pip)) + if (get_user(pending, &head->list_op_pending)) return; - if (pending) - handle_futex_death((void *)pending + futex_offset, curr, pip); + handle_futex_death((void *)pending + futex_offset, curr); while (entry != &head->list) { /* * A pending lock might already be on the list, so - * don't process it twice: + * dont process it twice: */ if (entry != pending) if (handle_futex_death((void *)entry + futex_offset, - curr, pi)) + curr)) return; /* * Fetch the next entry in the list: */ - if (fetch_robust_entry(&entry, &entry->next, &pi)) + if (get_user(entry, &entry->next)) return; /* * Avoid excessively long or circular lists: @@ -1765,8 +1001,8 @@ void exit_robust_list(struct task_struct *curr) } } -long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, - u32 __user *uaddr2, u32 val2, u32 val3) +long do_futex(unsigned long uaddr, int op, int val, unsigned long timeout, + unsigned long uaddr2, int val2, int val3) { int ret; @@ -1790,15 +1026,6 @@ long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, case FUTEX_WAKE_OP: ret = futex_wake_op(uaddr, uaddr2, val, val2, val3); break; - case FUTEX_LOCK_PI: - ret = futex_lock_pi(uaddr, val, timeout, val2, 0); - break; - case FUTEX_UNLOCK_PI: - ret = futex_unlock_pi(uaddr); - break; - case FUTEX_TRYLOCK_PI: - ret = futex_lock_pi(uaddr, 0, timeout, val2, 1); - break; default: ret = -ENOSYS; } @@ -1806,40 +1033,36 @@ long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, } -asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, +asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, struct timespec __user *utime, u32 __user *uaddr2, - u32 val3) + int val3) { struct timespec t; unsigned long timeout = MAX_SCHEDULE_TIMEOUT; - u32 val2 = 0; + int val2 = 0; - if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) { + if (utime && (op == FUTEX_WAIT)) { if (copy_from_user(&t, utime, sizeof(t)) != 0) return -EFAULT; if (!timespec_valid(&t)) return -EINVAL; - if (op == FUTEX_WAIT) - timeout = timespec_to_jiffies(&t) + 1; - else { - timeout = t.tv_sec; - val2 = t.tv_nsec; - } + timeout = timespec_to_jiffies(&t) + 1; } /* * requeue parameter in 'utime' if op == FUTEX_REQUEUE. */ - if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE) - val2 = (u32) (unsigned long) utime; + if (op >= FUTEX_REQUEUE) + val2 = (int) (unsigned long) utime; - return do_futex(uaddr, op, val, timeout, uaddr2, val2, val3); + return do_futex((unsigned long)uaddr, op, val, timeout, + (unsigned long)uaddr2, val2, val3); } -static int futexfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block * +futexfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_pseudo(fs_type, "futex", NULL, 0xBAD1DEA, mnt); + return get_sb_pseudo(fs_type, "futex", NULL, 0xBAD1DEA); } static struct file_system_type futex_fs_type = { diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index c5cca3f65..7694027f5 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c @@ -9,26 +9,10 @@ #include #include #include +#include #include - -/* - * Fetch a robust-list pointer. Bit 0 signals PI futexes: - */ -static inline int -fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry, - compat_uptr_t *head, int *pi) -{ - if (get_user(*uentry, head)) - return -EFAULT; - - *entry = compat_ptr((*uentry) & ~1); - *pi = (unsigned int)(*uentry) & 1; - - return 0; -} - /* * Walk curr->robust_list (very carefully, it's a userspace list!) * and mark any locks found there dead, and notify any waiters. @@ -39,16 +23,17 @@ void compat_exit_robust_list(struct task_struct *curr) { struct compat_robust_list_head __user *head = curr->compat_robust_list; struct robust_list __user *entry, *pending; - unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; compat_uptr_t uentry, upending; + unsigned int limit = ROBUST_LIST_LIMIT; compat_long_t futex_offset; /* * Fetch the list head (which was registered earlier, via * sys_set_robust_list()): */ - if (fetch_robust_entry(&uentry, &entry, &head->list.next, &pi)) + if (get_user(uentry, &head->list.next)) return; + entry = compat_ptr(uentry); /* * Fetch the relative futex offset: */ @@ -58,11 +43,11 @@ void compat_exit_robust_list(struct task_struct *curr) * Fetch any possibly pending lock-add first, and handle it * if it exists: */ - if (fetch_robust_entry(&upending, &pending, - &head->list_op_pending, &pip)) + if (get_user(upending, &head->list_op_pending)) return; + pending = compat_ptr(upending); if (upending) - handle_futex_death((void *)pending + futex_offset, curr, pip); + handle_futex_death((void *)pending + futex_offset, curr); while (compat_ptr(uentry) != &head->list) { /* @@ -71,15 +56,15 @@ void compat_exit_robust_list(struct task_struct *curr) */ if (entry != pending) if (handle_futex_death((void *)entry + futex_offset, - curr, pi)) + curr)) return; /* * Fetch the next entry in the list: */ - if (fetch_robust_entry(&uentry, &entry, - (compat_uptr_t *)&entry->next, &pi)) + if (get_user(uentry, (compat_uptr_t *)&entry->next)) return; + entry = compat_ptr(uentry); /* * Avoid excessively long or circular lists: */ @@ -145,20 +130,16 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout = MAX_SCHEDULE_TIMEOUT; int val2 = 0; - if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) { + if (utime && (op == FUTEX_WAIT)) { if (get_compat_timespec(&t, utime)) return -EFAULT; if (!timespec_valid(&t)) return -EINVAL; - if (op == FUTEX_WAIT) - timeout = timespec_to_jiffies(&t) + 1; - else { - timeout = t.tv_sec; - val2 = t.tv_nsec; - } + timeout = timespec_to_jiffies(&t) + 1; } - if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE) + if (op >= FUTEX_REQUEUE) val2 = (int) (unsigned long) utime; - return do_futex(uaddr, op, val, timeout, uaddr2, val2, val3); + return do_futex((unsigned long)uaddr, op, val, timeout, + (unsigned long)uaddr2, val2, val3); } diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 21c38a7e6..01fa2ae98 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -98,6 +98,7 @@ static DEFINE_PER_CPU(struct hrtimer_base, hrtimer_bases[MAX_HRTIMER_BASES]) = /** * ktime_get_ts - get the monotonic clock in timespec format + * * @ts: pointer to timespec variable * * The function calculates the monotonic clock from the realtime @@ -187,7 +188,7 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_base *base) { struct hrtimer_base *new_base; - new_base = &__get_cpu_var(hrtimer_bases)[base->index]; + new_base = &__get_cpu_var(hrtimer_bases[base->index]); if (base != new_base) { /* @@ -237,6 +238,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) # ifndef CONFIG_KTIME_SCALAR /** * ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable + * * @kt: addend * @nsec: the scalar nsec value to add * @@ -297,6 +299,7 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) /** * hrtimer_forward - forward the timer expiry + * * @timer: hrtimer to forward * @now: forward past this time * @interval: the interval to forward @@ -390,7 +393,7 @@ static void __remove_hrtimer(struct hrtimer *timer, struct hrtimer_base *base) if (base->first == &timer->node) base->first = rb_next(&timer->node); rb_erase(&timer->node, &base->active); - rb_set_parent(&timer->node, &timer->node); + timer->node.rb_parent = HRTIMER_INACTIVE; } /* @@ -408,6 +411,7 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_base *base) /** * hrtimer_start - (re)start an relative timer on the current CPU + * * @timer: the timer to be added * @tim: expiry time * @mode: expiry mode: absolute (HRTIMER_ABS) or relative (HRTIMER_REL) @@ -456,13 +460,14 @@ EXPORT_SYMBOL_GPL(hrtimer_start); /** * hrtimer_try_to_cancel - try to deactivate a timer + * * @timer: hrtimer to stop * * Returns: * 0 when the timer was not active * 1 when the timer was active * -1 when the timer is currently excuting the callback function and - * cannot be stopped + * can not be stopped */ int hrtimer_try_to_cancel(struct hrtimer *timer) { @@ -484,6 +489,7 @@ EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel); /** * hrtimer_cancel - cancel a timer and wait for the handler to finish. + * * @timer: the timer to be cancelled * * Returns: @@ -504,6 +510,7 @@ EXPORT_SYMBOL_GPL(hrtimer_cancel); /** * hrtimer_get_remaining - get remaining time for the timer + * * @timer: the timer to read */ ktime_t hrtimer_get_remaining(const struct hrtimer *timer) @@ -557,6 +564,7 @@ ktime_t hrtimer_get_next_event(void) /** * hrtimer_init - initialize a timer to the given clock + * * @timer: the timer to be initialized * @clock_id: the clock to be used * @mode: timer mode abs/rel @@ -568,18 +576,19 @@ void hrtimer_init(struct hrtimer *timer, clockid_t clock_id, memset(timer, 0, sizeof(struct hrtimer)); - bases = __raw_get_cpu_var(hrtimer_bases); + bases = per_cpu(hrtimer_bases, raw_smp_processor_id()); if (clock_id == CLOCK_REALTIME && mode != HRTIMER_ABS) clock_id = CLOCK_MONOTONIC; timer->base = &bases[clock_id]; - rb_set_parent(&timer->node, &timer->node); + timer->node.rb_parent = HRTIMER_INACTIVE; } EXPORT_SYMBOL_GPL(hrtimer_init); /** * hrtimer_get_res - get the timer resolution for a clock + * * @which_clock: which clock to query * @tp: pointer to timespec variable to store the resolution * @@ -590,7 +599,7 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) { struct hrtimer_base *bases; - bases = __raw_get_cpu_var(hrtimer_bases); + bases = per_cpu(hrtimer_bases, raw_smp_processor_id()); *tp = ktime_to_timespec(bases[which_clock].resolution); return 0; @@ -669,7 +678,7 @@ static int hrtimer_wakeup(struct hrtimer *timer) return HRTIMER_NORESTART; } -void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task) +void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, task_t *task) { sl->timer.function = hrtimer_wakeup; sl->task = task; @@ -782,10 +791,8 @@ static void __devinit init_hrtimers_cpu(int cpu) struct hrtimer_base *base = per_cpu(hrtimer_bases, cpu); int i; - for (i = 0; i < MAX_HRTIMER_BASES; i++, base++) { + for (i = 0; i < MAX_HRTIMER_BASES; i++, base++) spin_lock_init(&base->lock); - lockdep_set_class(&base->lock, &base->lock_key); - } } #ifdef CONFIG_HOTPLUG_CPU @@ -835,7 +842,7 @@ static void migrate_hrtimers(int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self, +static int hrtimer_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { long cpu = (long)hcpu; @@ -859,7 +866,7 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata hrtimers_nb = { +static struct notifier_block hrtimers_nb = { .notifier_call = hrtimer_cpu_notify, }; diff --git a/kernel/intermodule.c b/kernel/intermodule.c new file mode 100644 index 000000000..55b1e5b85 --- /dev/null +++ b/kernel/intermodule.c @@ -0,0 +1,184 @@ +/* Deprecated, do not use. Moved from module.c to here. --RR */ + +/* Written by Keith Owens Oct 2000 */ +#include +#include +#include +#include +#include + +/* inter_module functions are always available, even when the kernel is + * compiled without modules. Consumers of inter_module_xxx routines + * will always work, even when both are built into the kernel, this + * approach removes lots of #ifdefs in mainline code. + */ + +static struct list_head ime_list = LIST_HEAD_INIT(ime_list); +static DEFINE_SPINLOCK(ime_lock); +static int kmalloc_failed; + +struct inter_module_entry { + struct list_head list; + const char *im_name; + struct module *owner; + const void *userdata; +}; + +/** + * inter_module_register - register a new set of inter module data. + * @im_name: an arbitrary string to identify the data, must be unique + * @owner: module that is registering the data, always use THIS_MODULE + * @userdata: pointer to arbitrary userdata to be registered + * + * Description: Check that the im_name has not already been registered, + * complain if it has. For new data, add it to the inter_module_entry + * list. + */ +void inter_module_register(const char *im_name, struct module *owner, const void *userdata) +{ + struct list_head *tmp; + struct inter_module_entry *ime, *ime_new; + + if (!(ime_new = kzalloc(sizeof(*ime), GFP_KERNEL))) { + /* Overloaded kernel, not fatal */ + printk(KERN_ERR + "Aiee, inter_module_register: cannot kmalloc entry for '%s'\n", + im_name); + kmalloc_failed = 1; + return; + } + ime_new->im_name = im_name; + ime_new->owner = owner; + ime_new->userdata = userdata; + + spin_lock(&ime_lock); + list_for_each(tmp, &ime_list) { + ime = list_entry(tmp, struct inter_module_entry, list); + if (strcmp(ime->im_name, im_name) == 0) { + spin_unlock(&ime_lock); + kfree(ime_new); + /* Program logic error, fatal */ + printk(KERN_ERR "inter_module_register: duplicate im_name '%s'", im_name); + BUG(); + } + } + list_add(&(ime_new->list), &ime_list); + spin_unlock(&ime_lock); +} + +/** + * inter_module_unregister - unregister a set of inter module data. + * @im_name: an arbitrary string to identify the data, must be unique + * + * Description: Check that the im_name has been registered, complain if + * it has not. For existing data, remove it from the + * inter_module_entry list. + */ +void inter_module_unregister(const char *im_name) +{ + struct list_head *tmp; + struct inter_module_entry *ime; + + spin_lock(&ime_lock); + list_for_each(tmp, &ime_list) { + ime = list_entry(tmp, struct inter_module_entry, list); + if (strcmp(ime->im_name, im_name) == 0) { + list_del(&(ime->list)); + spin_unlock(&ime_lock); + kfree(ime); + return; + } + } + spin_unlock(&ime_lock); + if (kmalloc_failed) { + printk(KERN_ERR + "inter_module_unregister: no entry for '%s', " + "probably caused by previous kmalloc failure\n", + im_name); + return; + } + else { + /* Program logic error, fatal */ + printk(KERN_ERR "inter_module_unregister: no entry for '%s'", im_name); + BUG(); + } +} + +/** + * inter_module_get - return arbitrary userdata from another module. + * @im_name: an arbitrary string to identify the data, must be unique + * + * Description: If the im_name has not been registered, return NULL. + * Try to increment the use count on the owning module, if that fails + * then return NULL. Otherwise return the userdata. + */ +static const void *inter_module_get(const char *im_name) +{ + struct list_head *tmp; + struct inter_module_entry *ime; + const void *result = NULL; + + spin_lock(&ime_lock); + list_for_each(tmp, &ime_list) { + ime = list_entry(tmp, struct inter_module_entry, list); + if (strcmp(ime->im_name, im_name) == 0) { + if (try_module_get(ime->owner)) + result = ime->userdata; + break; + } + } + spin_unlock(&ime_lock); + return(result); +} + +/** + * inter_module_get_request - im get with automatic request_module. + * @im_name: an arbitrary string to identify the data, must be unique + * @modname: module that is expected to register im_name + * + * Description: If inter_module_get fails, do request_module then retry. + */ +const void *inter_module_get_request(const char *im_name, const char *modname) +{ + const void *result = inter_module_get(im_name); + if (!result) { + request_module("%s", modname); + result = inter_module_get(im_name); + } + return(result); +} + +/** + * inter_module_put - release use of data from another module. + * @im_name: an arbitrary string to identify the data, must be unique + * + * Description: If the im_name has not been registered, complain, + * otherwise decrement the use count on the owning module. + */ +void inter_module_put(const char *im_name) +{ + struct list_head *tmp; + struct inter_module_entry *ime; + + spin_lock(&ime_lock); + list_for_each(tmp, &ime_list) { + ime = list_entry(tmp, struct inter_module_entry, list); + if (strcmp(ime->im_name, im_name) == 0) { + if (ime->owner) + module_put(ime->owner); + spin_unlock(&ime_lock); + return; + } + } + spin_unlock(&ime_lock); + printk(KERN_ERR "inter_module_put: no entry for '%s'", im_name); + BUG(); +} + +EXPORT_SYMBOL(inter_module_register); +EXPORT_SYMBOL(inter_module_unregister); +EXPORT_SYMBOL(inter_module_get_request); +EXPORT_SYMBOL(inter_module_put); + +MODULE_LICENSE("GPL"); + diff --git a/kernel/irq/Makefile b/kernel/irq/Makefile index 1dab0ac3f..9f77f50d8 100644 --- a/kernel/irq/Makefile +++ b/kernel/irq/Makefile @@ -1,5 +1,5 @@ -obj-y := handle.o manage.o spurious.o resend.o chip.o +obj-y := handle.o manage.o spurious.o obj-$(CONFIG_GENERIC_IRQ_PROBE) += autoprobe.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_GENERIC_PENDING_IRQ) += migration.o diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index 533068cfb..3467097ca 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c @@ -11,14 +11,12 @@ #include #include -#include "internals.h" - /* * Autodetection depends on the fact that any interrupt that * comes in on to an unassigned handler will get stuck with * "IRQ_WAITING" cleared and the interrupt disabled. */ -static DEFINE_MUTEX(probing_active); +static DECLARE_MUTEX(probe_sem); /** * probe_irq_on - begin an interrupt autodetect @@ -29,11 +27,11 @@ static DEFINE_MUTEX(probing_active); */ unsigned long probe_irq_on(void) { - struct irq_desc *desc; - unsigned long mask; + unsigned long val; + irq_desc_t *desc; unsigned int i; - mutex_lock(&probing_active); + down(&probe_sem); /* * something may have generated an irq long ago and we want to * flush such a longstanding irq before considering it as spurious. @@ -42,21 +40,8 @@ unsigned long probe_irq_on(void) desc = irq_desc + i; spin_lock_irq(&desc->lock); - if (!desc->action && !(desc->status & IRQ_NOPROBE)) { - /* - * An old-style architecture might still have - * the handle_bad_irq handler there: - */ - compat_irq_chip_set_default_handler(desc); - - /* - * Some chips need to know about probing in - * progress: - */ - if (desc->chip->set_type) - desc->chip->set_type(i, IRQ_TYPE_PROBE); - desc->chip->startup(i); - } + if (!irq_desc[i].action) + irq_desc[i].handler->startup(i); spin_unlock_irq(&desc->lock); } @@ -72,9 +57,9 @@ unsigned long probe_irq_on(void) desc = irq_desc + i; spin_lock_irq(&desc->lock); - if (!desc->action && !(desc->status & IRQ_NOPROBE)) { + if (!desc->action) { desc->status |= IRQ_AUTODETECT | IRQ_WAITING; - if (desc->chip->startup(i)) + if (desc->handler->startup(i)) desc->status |= IRQ_PENDING; } spin_unlock_irq(&desc->lock); @@ -88,11 +73,11 @@ unsigned long probe_irq_on(void) /* * Now filter out any obviously spurious interrupts */ - mask = 0; + val = 0; for (i = 0; i < NR_IRQS; i++) { + irq_desc_t *desc = irq_desc + i; unsigned int status; - desc = irq_desc + i; spin_lock_irq(&desc->lock); status = desc->status; @@ -100,16 +85,17 @@ unsigned long probe_irq_on(void) /* It triggered already - consider it spurious. */ if (!(status & IRQ_WAITING)) { desc->status = status & ~IRQ_AUTODETECT; - desc->chip->shutdown(i); + desc->handler->shutdown(i); } else if (i < 32) - mask |= 1 << i; + val |= 1 << i; } spin_unlock_irq(&desc->lock); } - return mask; + return val; } + EXPORT_SYMBOL(probe_irq_on); /** @@ -131,7 +117,7 @@ unsigned int probe_irq_mask(unsigned long val) mask = 0; for (i = 0; i < NR_IRQS; i++) { - struct irq_desc *desc = irq_desc + i; + irq_desc_t *desc = irq_desc + i; unsigned int status; spin_lock_irq(&desc->lock); @@ -142,11 +128,11 @@ unsigned int probe_irq_mask(unsigned long val) mask |= 1 << i; desc->status = status & ~IRQ_AUTODETECT; - desc->chip->shutdown(i); + desc->handler->shutdown(i); } spin_unlock_irq(&desc->lock); } - mutex_unlock(&probing_active); + up(&probe_sem); return mask & val; } @@ -174,7 +160,7 @@ int probe_irq_off(unsigned long val) int i, irq_found = 0, nr_irqs = 0; for (i = 0; i < NR_IRQS; i++) { - struct irq_desc *desc = irq_desc + i; + irq_desc_t *desc = irq_desc + i; unsigned int status; spin_lock_irq(&desc->lock); @@ -187,16 +173,16 @@ int probe_irq_off(unsigned long val) nr_irqs++; } desc->status = status & ~IRQ_AUTODETECT; - desc->chip->shutdown(i); + desc->handler->shutdown(i); } spin_unlock_irq(&desc->lock); } - mutex_unlock(&probing_active); + up(&probe_sem); if (nr_irqs > 1) irq_found = -irq_found; - return irq_found; } + EXPORT_SYMBOL(probe_irq_off); diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c deleted file mode 100644 index ac1f850d4..000000000 --- a/kernel/irq/chip.c +++ /dev/null @@ -1,537 +0,0 @@ -/* - * linux/kernel/irq/chip.c - * - * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar - * Copyright (C) 2005-2006, Thomas Gleixner, Russell King - * - * This file contains the core interrupt handling code, for irq-chip - * based architectures. - * - * Detailed information is available in Documentation/DocBook/genericirq - */ - -#include -#include -#include -#include - -#include "internals.h" - -/** - * set_irq_chip - set the irq chip for an irq - * @irq: irq number - * @chip: pointer to irq chip description structure - */ -int set_irq_chip(unsigned int irq, struct irq_chip *chip) -{ - struct irq_desc *desc; - unsigned long flags; - - if (irq >= NR_IRQS) { - printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq); - WARN_ON(1); - return -EINVAL; - } - - if (!chip) - chip = &no_irq_chip; - - desc = irq_desc + irq; - spin_lock_irqsave(&desc->lock, flags); - irq_chip_set_defaults(chip); - desc->chip = chip; - /* - * For compatibility only: - */ - desc->chip = chip; - spin_unlock_irqrestore(&desc->lock, flags); - - return 0; -} -EXPORT_SYMBOL(set_irq_chip); - -/** - * set_irq_type - set the irq type for an irq - * @irq: irq number - * @type: interrupt type - see include/linux/interrupt.h - */ -int set_irq_type(unsigned int irq, unsigned int type) -{ - struct irq_desc *desc; - unsigned long flags; - int ret = -ENXIO; - - if (irq >= NR_IRQS) { - printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); - return -ENODEV; - } - - desc = irq_desc + irq; - if (desc->chip->set_type) { - spin_lock_irqsave(&desc->lock, flags); - ret = desc->chip->set_type(irq, type); - spin_unlock_irqrestore(&desc->lock, flags); - } - return ret; -} -EXPORT_SYMBOL(set_irq_type); - -/** - * set_irq_data - set irq type data for an irq - * @irq: Interrupt number - * @data: Pointer to interrupt specific data - * - * Set the hardware irq controller data for an irq - */ -int set_irq_data(unsigned int irq, void *data) -{ - struct irq_desc *desc; - unsigned long flags; - - if (irq >= NR_IRQS) { - printk(KERN_ERR - "Trying to install controller data for IRQ%d\n", irq); - return -EINVAL; - } - - desc = irq_desc + irq; - spin_lock_irqsave(&desc->lock, flags); - desc->handler_data = data; - spin_unlock_irqrestore(&desc->lock, flags); - return 0; -} -EXPORT_SYMBOL(set_irq_data); - -/** - * set_irq_chip_data - set irq chip data for an irq - * @irq: Interrupt number - * @data: Pointer to chip specific data - * - * Set the hardware irq chip data for an irq - */ -int set_irq_chip_data(unsigned int irq, void *data) -{ - struct irq_desc *desc = irq_desc + irq; - unsigned long flags; - - if (irq >= NR_IRQS || !desc->chip) { - printk(KERN_ERR "BUG: bad set_irq_chip_data(IRQ#%d)\n", irq); - return -EINVAL; - } - - spin_lock_irqsave(&desc->lock, flags); - desc->chip_data = data; - spin_unlock_irqrestore(&desc->lock, flags); - - return 0; -} -EXPORT_SYMBOL(set_irq_chip_data); - -/* - * default enable function - */ -static void default_enable(unsigned int irq) -{ - struct irq_desc *desc = irq_desc + irq; - - desc->chip->unmask(irq); - desc->status &= ~IRQ_MASKED; -} - -/* - * default disable function - */ -static void default_disable(unsigned int irq) -{ - struct irq_desc *desc = irq_desc + irq; - - if (!(desc->status & IRQ_DELAYED_DISABLE)) - irq_desc[irq].chip->mask(irq); -} - -/* - * default startup function - */ -static unsigned int default_startup(unsigned int irq) -{ - irq_desc[irq].chip->enable(irq); - - return 0; -} - -/* - * Fixup enable/disable function pointers - */ -void irq_chip_set_defaults(struct irq_chip *chip) -{ - if (!chip->enable) - chip->enable = default_enable; - if (!chip->disable) - chip->disable = default_disable; - if (!chip->startup) - chip->startup = default_startup; - if (!chip->shutdown) - chip->shutdown = chip->disable; - if (!chip->name) - chip->name = chip->typename; -} - -static inline void mask_ack_irq(struct irq_desc *desc, int irq) -{ - if (desc->chip->mask_ack) - desc->chip->mask_ack(irq); - else { - desc->chip->mask(irq); - desc->chip->ack(irq); - } -} - -/** - * handle_simple_irq - Simple and software-decoded IRQs. - * @irq: the interrupt number - * @desc: the interrupt description structure for this irq - * @regs: pointer to a register structure - * - * Simple interrupts are either sent from a demultiplexing interrupt - * handler or come from hardware, where no interrupt hardware control - * is necessary. - * - * Note: The caller is expected to handle the ack, clear, mask and - * unmask issues if necessary. - */ -void fastcall -handle_simple_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) -{ - struct irqaction *action; - irqreturn_t action_ret; - const unsigned int cpu = smp_processor_id(); - - spin_lock(&desc->lock); - - if (unlikely(desc->status & IRQ_INPROGRESS)) - goto out_unlock; - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); - kstat_cpu(cpu).irqs[irq]++; - - action = desc->action; - if (unlikely(!action || (desc->status & IRQ_DISABLED))) - goto out_unlock; - - desc->status |= IRQ_INPROGRESS; - spin_unlock(&desc->lock); - - action_ret = handle_IRQ_event(irq, regs, action); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret, regs); - - spin_lock(&desc->lock); - desc->status &= ~IRQ_INPROGRESS; -out_unlock: - spin_unlock(&desc->lock); -} - -/** - * handle_level_irq - Level type irq handler - * @irq: the interrupt number - * @desc: the interrupt description structure for this irq - * @regs: pointer to a register structure - * - * Level type interrupts are active as long as the hardware line has - * the active level. This may require to mask the interrupt and unmask - * it after the associated handler has acknowledged the device, so the - * interrupt line is back to inactive. - */ -void fastcall -handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) -{ - unsigned int cpu = smp_processor_id(); - struct irqaction *action; - irqreturn_t action_ret; - - spin_lock(&desc->lock); - mask_ack_irq(desc, irq); - - if (unlikely(desc->status & IRQ_INPROGRESS)) - goto out_unlock; - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); - kstat_cpu(cpu).irqs[irq]++; - - /* - * If its disabled or no action available - * keep it masked and get out of here - */ - action = desc->action; - if (unlikely(!action || (desc->status & IRQ_DISABLED))) { - desc->status |= IRQ_PENDING; - goto out_unlock; - } - - desc->status |= IRQ_INPROGRESS; - desc->status &= ~IRQ_PENDING; - spin_unlock(&desc->lock); - - action_ret = handle_IRQ_event(irq, regs, action); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret, regs); - - spin_lock(&desc->lock); - desc->status &= ~IRQ_INPROGRESS; - if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) - desc->chip->unmask(irq); -out_unlock: - spin_unlock(&desc->lock); -} - -/** - * handle_fasteoi_irq - irq handler for transparent controllers - * @irq: the interrupt number - * @desc: the interrupt description structure for this irq - * @regs: pointer to a register structure - * - * Only a single callback will be issued to the chip: an ->eoi() - * call when the interrupt has been serviced. This enables support - * for modern forms of interrupt handlers, which handle the flow - * details in hardware, transparently. - */ -void fastcall -handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, - struct pt_regs *regs) -{ - unsigned int cpu = smp_processor_id(); - struct irqaction *action; - irqreturn_t action_ret; - - spin_lock(&desc->lock); - - if (unlikely(desc->status & IRQ_INPROGRESS)) - goto out; - - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); - kstat_cpu(cpu).irqs[irq]++; - - /* - * If its disabled or no action available - * keep it masked and get out of here - */ - action = desc->action; - if (unlikely(!action || (desc->status & IRQ_DISABLED))) { - desc->status |= IRQ_PENDING; - goto out; - } - - desc->status |= IRQ_INPROGRESS; - desc->status &= ~IRQ_PENDING; - spin_unlock(&desc->lock); - - action_ret = handle_IRQ_event(irq, regs, action); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret, regs); - - spin_lock(&desc->lock); - desc->status &= ~IRQ_INPROGRESS; -out: - desc->chip->eoi(irq); - - spin_unlock(&desc->lock); -} - -/** - * handle_edge_irq - edge type IRQ handler - * @irq: the interrupt number - * @desc: the interrupt description structure for this irq - * @regs: pointer to a register structure - * - * Interrupt occures on the falling and/or rising edge of a hardware - * signal. The occurence is latched into the irq controller hardware - * and must be acked in order to be reenabled. After the ack another - * interrupt can happen on the same source even before the first one - * is handled by the assosiacted event handler. If this happens it - * might be necessary to disable (mask) the interrupt depending on the - * controller hardware. This requires to reenable the interrupt inside - * of the loop which handles the interrupts which have arrived while - * the handler was running. If all pending interrupts are handled, the - * loop is left. - */ -void fastcall -handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) -{ - const unsigned int cpu = smp_processor_id(); - - spin_lock(&desc->lock); - - desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); - - /* - * If we're currently running this IRQ, or its disabled, - * we shouldn't process the IRQ. Mark it pending, handle - * the necessary masking and go out - */ - if (unlikely((desc->status & (IRQ_INPROGRESS | IRQ_DISABLED)) || - !desc->action)) { - desc->status |= (IRQ_PENDING | IRQ_MASKED); - mask_ack_irq(desc, irq); - goto out_unlock; - } - - kstat_cpu(cpu).irqs[irq]++; - - /* Start handling the irq */ - desc->chip->ack(irq); - - /* Mark the IRQ currently in progress.*/ - desc->status |= IRQ_INPROGRESS; - - do { - struct irqaction *action = desc->action; - irqreturn_t action_ret; - - if (unlikely(!action)) { - desc->chip->mask(irq); - goto out_unlock; - } - - /* - * When another irq arrived while we were handling - * one, we could have masked the irq. - * Renable it, if it was not disabled in meantime. - */ - if (unlikely((desc->status & - (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == - (IRQ_PENDING | IRQ_MASKED))) { - desc->chip->unmask(irq); - desc->status &= ~IRQ_MASKED; - } - - desc->status &= ~IRQ_PENDING; - spin_unlock(&desc->lock); - action_ret = handle_IRQ_event(irq, regs, action); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret, regs); - spin_lock(&desc->lock); - - } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); - - desc->status &= ~IRQ_INPROGRESS; -out_unlock: - spin_unlock(&desc->lock); -} - -#ifdef CONFIG_SMP -/** - * handle_percpu_IRQ - Per CPU local irq handler - * @irq: the interrupt number - * @desc: the interrupt description structure for this irq - * @regs: pointer to a register structure - * - * Per CPU interrupts on SMP machines without locking requirements - */ -void fastcall -handle_percpu_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) -{ - irqreturn_t action_ret; - - kstat_this_cpu.irqs[irq]++; - - if (desc->chip->ack) - desc->chip->ack(irq); - - action_ret = handle_IRQ_event(irq, regs, desc->action); - if (!noirqdebug) - note_interrupt(irq, desc, action_ret, regs); - - if (desc->chip->eoi) - desc->chip->eoi(irq); -} - -#endif /* CONFIG_SMP */ - -void -__set_irq_handler(unsigned int irq, - void fastcall (*handle)(unsigned int, irq_desc_t *, - struct pt_regs *), - int is_chained) -{ - struct irq_desc *desc; - unsigned long flags; - - if (irq >= NR_IRQS) { - printk(KERN_ERR - "Trying to install type control for IRQ%d\n", irq); - return; - } - - desc = irq_desc + irq; - - if (!handle) - handle = handle_bad_irq; - - if (desc->chip == &no_irq_chip) { - printk(KERN_WARNING "Trying to install %sinterrupt handler " - "for IRQ%d\n", is_chained ? "chained " : " ", irq); - /* - * Some ARM implementations install a handler for really dumb - * interrupt hardware without setting an irq_chip. This worked - * with the ARM no_irq_chip but the check in setup_irq would - * prevent us to setup the interrupt at all. Switch it to - * dummy_irq_chip for easy transition. - */ - desc->chip = &dummy_irq_chip; - } - - spin_lock_irqsave(&desc->lock, flags); - - /* Uninstall? */ - if (handle == handle_bad_irq) { - if (desc->chip != &no_irq_chip) { - desc->chip->mask(irq); - desc->chip->ack(irq); - } - desc->status |= IRQ_DISABLED; - desc->depth = 1; - } - desc->handle_irq = handle; - - if (handle != handle_bad_irq && is_chained) { - desc->status &= ~IRQ_DISABLED; - desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; - desc->depth = 0; - desc->chip->unmask(irq); - } - spin_unlock_irqrestore(&desc->lock, flags); -} - -void -set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, - void fastcall (*handle)(unsigned int, - struct irq_desc *, - struct pt_regs *)) -{ - set_irq_chip(irq, chip); - __set_irq_handler(irq, handle, 0); -} - -/* - * Get a descriptive string for the highlevel handler, for - * /proc/interrupts output: - */ -const char * -handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, - struct pt_regs *)) -{ - if (handle == handle_level_irq) - return "level "; - if (handle == handle_fasteoi_irq) - return "fasteoi"; - if (handle == handle_edge_irq) - return "edge "; - if (handle == handle_simple_irq) - return "simple "; -#ifdef CONFIG_SMP - if (handle == handle_percpu_irq) - return "percpu "; -#endif - if (handle == handle_bad_irq) - return "bad "; - - return NULL; -} diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index a4c8f4d6f..f3344781a 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c @@ -1,13 +1,9 @@ /* * linux/kernel/irq/handle.c * - * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar - * Copyright (C) 2005-2006, Thomas Gleixner, Russell King + * Copyright (C) 1992, 1998-2004 Linus Torvalds, Ingo Molnar * * This file contains the core interrupt handling code. - * - * Detailed information is available in Documentation/DocBook/genericirq - * */ #include @@ -20,27 +16,11 @@ #include "internals.h" -/** - * handle_bad_irq - handle spurious and unhandled irqs - * @irq: the interrupt number - * @desc: description of the interrupt - * @regs: pointer to a register structure - * - * Handles spurious and unhandled IRQ's. It also prints a debugmessage. - */ -void fastcall -handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) -{ - print_irq_desc(irq, desc); - kstat_this_cpu.irqs[irq]++; - ack_bad_irq(irq); -} - /* * Linux has a controller-independent interrupt architecture. * Every controller has a 'controller-template', that is used * by the main code to do the right thing. Each driver-visible - * interrupt source is transparently wired to the appropriate + * interrupt source is transparently wired to the apropriate * controller. Thus drivers need not be aware of the * interrupt-controller. * @@ -50,68 +30,41 @@ handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs) * * Controller mappings for all interrupt sources: */ -struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = { +irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { [0 ... NR_IRQS-1] = { .status = IRQ_DISABLED, - .chip = &no_irq_chip, - .handle_irq = handle_bad_irq, - .depth = 1, - .lock = SPIN_LOCK_UNLOCKED, -#ifdef CONFIG_SMP - .affinity = CPU_MASK_ALL -#endif + .handler = &no_irq_type, + .lock = SPIN_LOCK_UNLOCKED } }; /* - * What should we do if we get a hw irq event on an illegal vector? - * Each architecture has to answer this themself. - */ -static void ack_bad(unsigned int irq) -{ - print_irq_desc(irq, irq_desc + irq); - ack_bad_irq(irq); -} - -/* - * NOP functions + * Generic 'no controller' code */ -static void noop(unsigned int irq) -{ -} +static void end_none(unsigned int irq) { } +static void enable_none(unsigned int irq) { } +static void disable_none(unsigned int irq) { } +static void shutdown_none(unsigned int irq) { } +static unsigned int startup_none(unsigned int irq) { return 0; } -static unsigned int noop_ret(unsigned int irq) +static void ack_none(unsigned int irq) { - return 0; + /* + * 'what should we do if we get a hw irq event on an illegal vector'. + * each architecture has to answer this themself. + */ + ack_bad_irq(irq); } -/* - * Generic no controller implementation - */ -struct irq_chip no_irq_chip = { - .name = "none", - .startup = noop_ret, - .shutdown = noop, - .enable = noop, - .disable = noop, - .ack = ack_bad, - .end = noop, -}; - -/* - * Generic dummy implementation which can be used for - * real dumb interrupt sources - */ -struct irq_chip dummy_irq_chip = { - .name = "dummy", - .startup = noop_ret, - .shutdown = noop, - .enable = noop, - .disable = noop, - .ack = noop, - .mask = noop, - .unmask = noop, - .end = noop, +struct hw_interrupt_type no_irq_type = { + .typename = "none", + .startup = startup_none, + .shutdown = shutdown_none, + .enable = enable_none, + .disable = disable_none, + .ack = ack_none, + .end = end_none, + .set_affinity = NULL }; /* @@ -122,24 +75,16 @@ irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) return IRQ_NONE; } -/** - * handle_IRQ_event - irq action chain handler - * @irq: the interrupt number - * @regs: pointer to a register structure - * @action: the interrupt action chain for this irq - * - * Handles the action chain of an irq event +/* + * Have got an event to handle: */ -irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, - struct irqaction *action) +fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, + struct irqaction *action) { - irqreturn_t ret, retval = IRQ_NONE; - unsigned int status = 0; + int ret, retval = 0, status = 0; - handle_dynamic_tick(action); - - if (!(action->flags & IRQF_DISABLED)) - local_irq_enable_in_hardirq(); + if (!(action->flags & SA_INTERRUPT)) + local_irq_enable(); do { ret = action->handler(irq, action->dev_id, regs); @@ -149,29 +94,22 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, action = action->next; } while (action); - if (status & IRQF_SAMPLE_RANDOM) + if (status & SA_SAMPLE_RANDOM) add_interrupt_randomness(irq); local_irq_disable(); return retval; } -/** - * __do_IRQ - original all in one highlevel IRQ handler - * @irq: the interrupt number - * @regs: pointer to a register structure - * - * __do_IRQ handles all normal device IRQ's (the special +/* + * do_IRQ handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific * handlers). - * - * This is the original x86 implementation which is used for every - * interrupt type. */ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs) { - struct irq_desc *desc = irq_desc + irq; - struct irqaction *action; + irq_desc_t *desc = irq_desc + irq; + struct irqaction * action; unsigned int status; kstat_this_cpu.irqs[irq]++; @@ -181,16 +119,16 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs) /* * No locking required for CPU-local interrupts: */ - if (desc->chip->ack) - desc->chip->ack(irq); + if (desc->handler->ack) + desc->handler->ack(irq); action_ret = handle_IRQ_event(irq, regs, desc->action); - desc->chip->end(irq); + desc->handler->end(irq); return 1; } spin_lock(&desc->lock); - if (desc->chip->ack) - desc->chip->ack(irq); + if (desc->handler->ack) + desc->handler->ack(irq); /* * REPLAY is when Linux resends an IRQ that was dropped earlier * WAITING is used by probe to mark irqs that are being tested @@ -250,25 +188,9 @@ out: * The ->end() handler has to deal with interrupts which got * disabled while the handler was running. */ - desc->chip->end(irq); + desc->handler->end(irq); spin_unlock(&desc->lock); return 1; } -#ifdef CONFIG_TRACE_IRQFLAGS - -/* - * lockdep: we want to handle all irq_desc locks as a single lock-class: - */ -static struct lock_class_key irq_desc_lock_class; - -void early_init_irq_lock_class(void) -{ - int i; - - for (i = 0; i < NR_IRQS; i++) - lockdep_set_class(&irq_desc[i].lock, &irq_desc_lock_class); -} - -#endif diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index 08a849a22..46feba630 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -4,12 +4,6 @@ extern int noirqdebug; -/* Set default functions for irq_chip structures: */ -extern void irq_chip_set_defaults(struct irq_chip *chip); - -/* Set default handler: */ -extern void compat_irq_chip_set_default_handler(struct irq_desc *desc); - #ifdef CONFIG_PROC_FS extern void register_irq_proc(unsigned int irq); extern void register_handler_proc(unsigned int irq, struct irqaction *action); @@ -22,43 +16,3 @@ static inline void unregister_handler_proc(unsigned int irq, struct irqaction *action) { } #endif -/* - * Debugging printout: - */ - -#include - -#define P(f) if (desc->status & f) printk("%14s set\n", #f) - -static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) -{ - printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n", - irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled); - printk("->handle_irq(): %p, ", desc->handle_irq); - print_symbol("%s\n", (unsigned long)desc->handle_irq); - printk("->chip(): %p, ", desc->chip); - print_symbol("%s\n", (unsigned long)desc->chip); - printk("->action(): %p\n", desc->action); - if (desc->action) { - printk("->action->handler(): %p, ", desc->action->handler); - print_symbol("%s\n", (unsigned long)desc->action->handler); - } - - P(IRQ_INPROGRESS); - P(IRQ_DISABLED); - P(IRQ_PENDING); - P(IRQ_REPLAY); - P(IRQ_AUTODETECT); - P(IRQ_WAITING); - P(IRQ_LEVEL); - P(IRQ_MASKED); -#ifdef CONFIG_IRQ_PER_CPU - P(IRQ_PER_CPU); -#endif - P(IRQ_NOPROBE); - P(IRQ_NOREQUEST); - P(IRQ_NOAUTOEN); -} - -#undef P - diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c2f92f124..97d555999 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1,12 +1,12 @@ /* * linux/kernel/irq/manage.c * - * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar - * Copyright (C) 2005-2006 Thomas Gleixner + * Copyright (C) 1992, 1998-2004 Linus Torvalds, Ingo Molnar * * This file contains driver APIs to the irq subsystem. */ +#include #include #include #include @@ -16,6 +16,12 @@ #ifdef CONFIG_SMP +cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL }; + +#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) +cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS]; +#endif + /** * synchronize_irq - wait for pending IRQ handlers (on other CPUs) * @irq: interrupt number to wait for @@ -36,6 +42,7 @@ void synchronize_irq(unsigned int irq) while (desc->status & IRQ_INPROGRESS) cpu_relax(); } + EXPORT_SYMBOL(synchronize_irq); #endif @@ -53,7 +60,7 @@ EXPORT_SYMBOL(synchronize_irq); */ void disable_irq_nosync(unsigned int irq) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; if (irq >= NR_IRQS) @@ -62,10 +69,11 @@ void disable_irq_nosync(unsigned int irq) spin_lock_irqsave(&desc->lock, flags); if (!desc->depth++) { desc->status |= IRQ_DISABLED; - desc->chip->disable(irq); + desc->handler->disable(irq); } spin_unlock_irqrestore(&desc->lock, flags); } + EXPORT_SYMBOL(disable_irq_nosync); /** @@ -82,7 +90,7 @@ EXPORT_SYMBOL(disable_irq_nosync); */ void disable_irq(unsigned int irq) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; if (irq >= NR_IRQS) return; @@ -91,6 +99,7 @@ void disable_irq(unsigned int irq) if (desc->action) synchronize_irq(irq); } + EXPORT_SYMBOL(disable_irq); /** @@ -105,7 +114,7 @@ EXPORT_SYMBOL(disable_irq); */ void enable_irq(unsigned int irq) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; if (irq >= NR_IRQS) @@ -114,15 +123,17 @@ void enable_irq(unsigned int irq) spin_lock_irqsave(&desc->lock, flags); switch (desc->depth) { case 0: - printk(KERN_WARNING "Unbalanced enable for IRQ %d\n", irq); WARN_ON(1); break; case 1: { unsigned int status = desc->status & ~IRQ_DISABLED; - /* Prevent probing on this irq: */ - desc->status = status | IRQ_NOPROBE; - check_irq_resend(desc, irq); + desc->status = status; + if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { + desc->status = status | IRQ_REPLAY; + hw_resend_irq(desc->handler,irq); + } + desc->handler->enable(irq); /* fall-through */ } default: @@ -130,52 +141,8 @@ void enable_irq(unsigned int irq) } spin_unlock_irqrestore(&desc->lock, flags); } -EXPORT_SYMBOL(enable_irq); -/** - * set_irq_wake - control irq power management wakeup - * @irq: interrupt to control - * @on: enable/disable power management wakeup - * - * Enable/disable power management wakeup mode, which is - * disabled by default. Enables and disables must match, - * just as they match for non-wakeup mode support. - * - * Wakeup mode lets this IRQ wake the system from sleep - * states like "suspend to RAM". - */ -int set_irq_wake(unsigned int irq, unsigned int on) -{ - struct irq_desc *desc = irq_desc + irq; - unsigned long flags; - int ret = -ENXIO; - int (*set_wake)(unsigned, unsigned) = desc->chip->set_wake; - - /* wakeup-capable irqs can be shared between drivers that - * don't need to have the same sleep mode behaviors. - */ - spin_lock_irqsave(&desc->lock, flags); - if (on) { - if (desc->wake_depth++ == 0) - desc->status |= IRQ_WAKEUP; - else - set_wake = NULL; - } else { - if (desc->wake_depth == 0) { - printk(KERN_WARNING "Unbalanced IRQ %d " - "wake disable\n", irq); - WARN_ON(1); - } else if (--desc->wake_depth == 0) - desc->status &= ~IRQ_WAKEUP; - else - set_wake = NULL; - } - if (set_wake) - ret = desc->chip->set_wake(irq, on); - spin_unlock_irqrestore(&desc->lock, flags); - return ret; -} -EXPORT_SYMBOL(set_irq_wake); +EXPORT_SYMBOL(enable_irq); /* * Internal function that tells the architecture code whether a @@ -186,33 +153,22 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) { struct irqaction *action; - if (irq >= NR_IRQS || irq_desc[irq].status & IRQ_NOREQUEST) + if (irq >= NR_IRQS) return 0; action = irq_desc[irq].action; if (action) - if (irqflags & action->flags & IRQF_SHARED) + if (irqflags & action->flags & SA_SHIRQ) action = NULL; return !action; } -void compat_irq_chip_set_default_handler(struct irq_desc *desc) -{ - /* - * If the architecture still has not overriden - * the flow handler then zap the default. This - * should catch incorrect flow-type setting. - */ - if (desc->handle_irq == &handle_bad_irq) - desc->handle_irq = NULL; -} - /* * Internal function to register an irqaction - typically used to * allocate special interrupts that are part of the architecture. */ -int setup_irq(unsigned int irq, struct irqaction *new) +int setup_irq(unsigned int irq, struct irqaction * new) { struct irq_desc *desc = irq_desc + irq; struct irqaction *old, **p; @@ -222,14 +178,14 @@ int setup_irq(unsigned int irq, struct irqaction *new) if (irq >= NR_IRQS) return -EINVAL; - if (desc->chip == &no_irq_chip) + if (desc->handler == &no_irq_type) return -ENOSYS; /* * Some drivers like serial.c use request_irq() heavily, * so we have to be careful not to interfere with a * running system. */ - if (new->flags & IRQF_SAMPLE_RANDOM) { + if (new->flags & SA_SAMPLE_RANDOM) { /* * This function might sleep, we want to call it first, * outside of the atomic block. @@ -244,26 +200,14 @@ int setup_irq(unsigned int irq, struct irqaction *new) /* * The following block of code has to be executed atomically */ - spin_lock_irqsave(&desc->lock, flags); + spin_lock_irqsave(&desc->lock,flags); p = &desc->action; - old = *p; - if (old) { - /* - * Can't share interrupts unless both agree to and are - * the same type (level, edge, polarity). So both flag - * fields must have IRQF_SHARED set and the bits which - * set the trigger type must match. - */ - if (!((old->flags & new->flags) & IRQF_SHARED) || - ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) - goto mismatch; - -#if defined(CONFIG_IRQ_PER_CPU) - /* All handlers must agree on per-cpuness */ - if ((old->flags & IRQF_PERCPU) != - (new->flags & IRQF_PERCPU)) - goto mismatch; -#endif + if ((old = *p) != NULL) { + /* Can't share interrupts unless both agree to */ + if (!(old->flags & new->flags & SA_SHIRQ)) { + spin_unlock_irqrestore(&desc->lock,flags); + return -EBUSY; + } /* add new interrupt at end of irq queue */ do { @@ -274,45 +218,17 @@ int setup_irq(unsigned int irq, struct irqaction *new) } *p = new; -#if defined(CONFIG_IRQ_PER_CPU) - if (new->flags & IRQF_PERCPU) - desc->status |= IRQ_PER_CPU; -#endif + if (!shared) { - irq_chip_set_defaults(desc->chip); - - /* Setup the type (level, edge polarity) if configured: */ - if (new->flags & IRQF_TRIGGER_MASK) { - if (desc->chip && desc->chip->set_type) - desc->chip->set_type(irq, - new->flags & IRQF_TRIGGER_MASK); - else - /* - * IRQF_TRIGGER_* but the PIC does not support - * multiple flow-types? - */ - printk(KERN_WARNING "No IRQF_TRIGGER set_type " - "function for IRQ %d (%s)\n", irq, - desc->chip ? desc->chip->name : - "unknown"); - } else - compat_irq_chip_set_default_handler(desc); - - desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING | - IRQ_INPROGRESS); - - if (!(desc->status & IRQ_NOAUTOEN)) { - desc->depth = 0; - desc->status &= ~IRQ_DISABLED; - if (desc->chip->startup) - desc->chip->startup(irq); - else - desc->chip->enable(irq); - } else - /* Undo nested disables: */ - desc->depth = 1; + desc->depth = 0; + desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | + IRQ_WAITING | IRQ_INPROGRESS); + if (desc->handler->startup) + desc->handler->startup(irq); + else + desc->handler->enable(irq); } - spin_unlock_irqrestore(&desc->lock, flags); + spin_unlock_irqrestore(&desc->lock,flags); new->irq = irq; register_irq_proc(irq); @@ -320,14 +236,6 @@ int setup_irq(unsigned int irq, struct irqaction *new) register_handler_proc(irq, new); return 0; - -mismatch: - spin_unlock_irqrestore(&desc->lock, flags); - if (!(new->flags & IRQF_PROBE_SHARED)) { - printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); - dump_stack(); - } - return -EBUSY; } /** @@ -354,10 +262,10 @@ void free_irq(unsigned int irq, void *dev_id) return; desc = irq_desc + irq; - spin_lock_irqsave(&desc->lock, flags); + spin_lock_irqsave(&desc->lock,flags); p = &desc->action; for (;;) { - struct irqaction *action = *p; + struct irqaction * action = *p; if (action) { struct irqaction **pp = p; @@ -371,18 +279,18 @@ void free_irq(unsigned int irq, void *dev_id) /* Currently used only by UML, might disappear one day.*/ #ifdef CONFIG_IRQ_RELEASE_METHOD - if (desc->chip->release) - desc->chip->release(irq, dev_id); + if (desc->handler->release) + desc->handler->release(irq, dev_id); #endif if (!desc->action) { desc->status |= IRQ_DISABLED; - if (desc->chip->shutdown) - desc->chip->shutdown(irq); + if (desc->handler->shutdown) + desc->handler->shutdown(irq); else - desc->chip->disable(irq); + desc->handler->disable(irq); } - spin_unlock_irqrestore(&desc->lock, flags); + spin_unlock_irqrestore(&desc->lock,flags); unregister_handler_proc(irq, action); /* Make sure it's not being used on another CPU */ @@ -390,11 +298,12 @@ void free_irq(unsigned int irq, void *dev_id) kfree(action); return; } - printk(KERN_ERR "Trying to free already-free IRQ %d\n", irq); - spin_unlock_irqrestore(&desc->lock, flags); + printk(KERN_ERR "Trying to free free IRQ%d\n",irq); + spin_unlock_irqrestore(&desc->lock,flags); return; } } + EXPORT_SYMBOL(free_irq); /** @@ -421,36 +330,28 @@ EXPORT_SYMBOL(free_irq); * * Flags: * - * IRQF_SHARED Interrupt is shared - * IRQF_DISABLED Disable local interrupts while processing - * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy + * SA_SHIRQ Interrupt is shared + * SA_INTERRUPT Disable local interrupts while processing + * SA_SAMPLE_RANDOM The interrupt can be used for entropy * */ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), - unsigned long irqflags, const char *devname, void *dev_id) + unsigned long irqflags, const char * devname, void *dev_id) { - struct irqaction *action; + struct irqaction * action; int retval; -#ifdef CONFIG_LOCKDEP - /* - * Lockdep wants atomic interrupt handlers: - */ - irqflags |= SA_INTERRUPT; -#endif /* * Sanity-check: shared interrupts must pass in a real dev-ID, * otherwise we'll have trouble later trying to figure out * which interrupt is which (messes up the interrupt freeing * logic etc). */ - if ((irqflags & IRQF_SHARED) && !dev_id) + if ((irqflags & SA_SHIRQ) && !dev_id) return -EINVAL; if (irq >= NR_IRQS) return -EINVAL; - if (irq_desc[irq].status & IRQ_NOREQUEST) - return -EINVAL; if (!handler) return -EINVAL; @@ -473,5 +374,6 @@ int request_irq(unsigned int irq, return retval; } + EXPORT_SYMBOL(request_irq); diff --git a/kernel/irq/migration.c b/kernel/irq/migration.c index a57ebe9fa..134f9f2e0 100644 --- a/kernel/irq/migration.c +++ b/kernel/irq/migration.c @@ -3,19 +3,19 @@ void set_pending_irq(unsigned int irq, cpumask_t mask) { - struct irq_desc *desc = irq_desc + irq; + irq_desc_t *desc = irq_desc + irq; unsigned long flags; spin_lock_irqsave(&desc->lock, flags); desc->move_irq = 1; - irq_desc[irq].pending_mask = mask; + pending_irq_cpumask[irq] = mask; spin_unlock_irqrestore(&desc->lock, flags); } void move_native_irq(int irq) { - struct irq_desc *desc = irq_desc + irq; cpumask_t tmp; + irq_desc_t *desc = irq_descp(irq); if (likely(!desc->move_irq)) return; @@ -30,15 +30,15 @@ void move_native_irq(int irq) desc->move_irq = 0; - if (unlikely(cpus_empty(irq_desc[irq].pending_mask))) + if (likely(cpus_empty(pending_irq_cpumask[irq]))) return; - if (!desc->chip->set_affinity) + if (!desc->handler->set_affinity) return; assert_spin_locked(&desc->lock); - cpus_and(tmp, irq_desc[irq].pending_mask, cpu_online_map); + cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map); /* * If there was a valid mask to work with, please @@ -49,14 +49,14 @@ void move_native_irq(int irq) * cause some ioapics to mal-function. * Being paranoid i guess! */ - if (likely(!cpus_empty(tmp))) { + if (unlikely(!cpus_empty(tmp))) { if (likely(!(desc->status & IRQ_DISABLED))) - desc->chip->disable(irq); + desc->handler->disable(irq); - desc->chip->set_affinity(irq,tmp); + desc->handler->set_affinity(irq,tmp); if (likely(!(desc->status & IRQ_DISABLED))) - desc->chip->enable(irq); + desc->handler->enable(irq); } - cpus_clear(irq_desc[irq].pending_mask); + cpus_clear(pending_irq_cpumask[irq]); } diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 607c7809a..d03b5eef8 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -12,15 +12,18 @@ #include "internals.h" -static struct proc_dir_entry *root_irq_dir; +static struct proc_dir_entry *root_irq_dir, *irq_dir[NR_IRQS]; #ifdef CONFIG_SMP +/* + * The /proc/irq//smp_affinity values: + */ +static struct proc_dir_entry *smp_affinity_entry[NR_IRQS]; + #ifdef CONFIG_GENERIC_PENDING_IRQ void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) { - set_balance_irq_affinity(irq, mask_val); - /* * Save these away for later use. Re-progam when the * interrupt is pending @@ -30,16 +33,15 @@ void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) #else void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) { - set_balance_irq_affinity(irq, mask_val); - irq_desc[irq].affinity = mask_val; - irq_desc[irq].chip->set_affinity(irq, mask_val); + irq_affinity[irq] = mask_val; + irq_desc[irq].handler->set_affinity(irq, mask_val); } #endif static int irq_affinity_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { - int len = cpumask_scnprintf(page, count, irq_desc[(long)data].affinity); + int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]); if (count - len < 2) return -EINVAL; @@ -54,7 +56,7 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer, unsigned int irq = (int)(long)data, full_count = count, err; cpumask_t new_value, tmp; - if (!irq_desc[irq].chip->set_affinity || no_irq_affinity) + if (!irq_desc[irq].handler->set_affinity || no_irq_affinity) return -EIO; err = cpumask_parse(buffer, count, new_value); @@ -97,7 +99,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) { char name [MAX_NAMELEN]; - if (!irq_desc[irq].dir || action->dir || !action->name || + if (!irq_dir[irq] || action->dir || !action->name || !name_unique(irq, action)) return; @@ -105,7 +107,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) snprintf(name, MAX_NAMELEN, "%s", action->name); /* create /proc/irq/1234/handler/ */ - action->dir = proc_mkdir(name, irq_desc[irq].dir); + action->dir = proc_mkdir(name, irq_dir[irq]); } #undef MAX_NAMELEN @@ -117,22 +119,22 @@ void register_irq_proc(unsigned int irq) char name [MAX_NAMELEN]; if (!root_irq_dir || - (irq_desc[irq].chip == &no_irq_chip) || - irq_desc[irq].dir) + (irq_desc[irq].handler == &no_irq_type) || + irq_dir[irq]) return; memset(name, 0, MAX_NAMELEN); sprintf(name, "%d", irq); /* create /proc/irq/1234 */ - irq_desc[irq].dir = proc_mkdir(name, root_irq_dir); + irq_dir[irq] = proc_mkdir(name, root_irq_dir); #ifdef CONFIG_SMP { struct proc_dir_entry *entry; /* create /proc/irq//smp_affinity */ - entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); + entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]); if (entry) { entry->nlink = 1; @@ -140,6 +142,7 @@ void register_irq_proc(unsigned int irq) entry->read_proc = irq_affinity_read_proc; entry->write_proc = irq_affinity_write_proc; } + smp_affinity_entry[irq] = entry; } #endif } @@ -149,7 +152,7 @@ void register_irq_proc(unsigned int irq) void unregister_handler_proc(unsigned int irq, struct irqaction *action) { if (action->dir) - remove_proc_entry(action->dir->name, irq_desc[irq].dir); + remove_proc_entry(action->dir->name, irq_dir[irq]); } void init_irq_proc(void) diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c deleted file mode 100644 index 35f10f7ff..000000000 --- a/kernel/irq/resend.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * linux/kernel/irq/resend.c - * - * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar - * Copyright (C) 2005-2006, Thomas Gleixner - * - * This file contains the IRQ-resend code - * - * If the interrupt is waiting to be processed, we try to re-run it. - * We can't directly run it from here since the caller might be in an - * interrupt-protected region. Not all irq controller chips can - * retrigger interrupts at the hardware level, so in those cases - * we allow the resending of IRQs via a tasklet. - */ - -#include -#include -#include -#include - -#include "internals.h" - -#ifdef CONFIG_HARDIRQS_SW_RESEND - -/* Bitmap to handle software resend of interrupts: */ -static DECLARE_BITMAP(irqs_resend, NR_IRQS); - -/* - * Run software resends of IRQ's - */ -static void resend_irqs(unsigned long arg) -{ - struct irq_desc *desc; - int irq; - - while (!bitmap_empty(irqs_resend, NR_IRQS)) { - irq = find_first_bit(irqs_resend, NR_IRQS); - clear_bit(irq, irqs_resend); - desc = irq_desc + irq; - local_irq_disable(); - desc->handle_irq(irq, desc, NULL); - local_irq_enable(); - } -} - -/* Tasklet to handle resend: */ -static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0); - -#endif - -/* - * IRQ resend - * - * Is called with interrupts disabled and desc->lock held. - */ -void check_irq_resend(struct irq_desc *desc, unsigned int irq) -{ - unsigned int status = desc->status; - - /* - * Make sure the interrupt is enabled, before resending it: - */ - desc->chip->enable(irq); - - if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) { - desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY; - - if (!desc->chip || !desc->chip->retrigger || - !desc->chip->retrigger(irq)) { -#ifdef CONFIG_HARDIRQS_SW_RESEND - /* Set it pending and activate the softirq: */ - set_bit(irq, irqs_resend); - tasklet_schedule(&resend_tasklet); -#endif - } - } -} diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 417e98092..f9353e960 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -11,44 +11,44 @@ #include #include -static int irqfixup __read_mostly; +static int irqfixup; /* * Recovery handler for misrouted interrupts. */ + static int misrouted_irq(int irq, struct pt_regs *regs) { int i; + irq_desc_t *desc; int ok = 0; int work = 0; /* Did we do work for a real IRQ */ - for (i = 1; i < NR_IRQS; i++) { - struct irq_desc *desc = irq_desc + i; + for(i = 1; i < NR_IRQS; i++) { struct irqaction *action; if (i == irq) /* Already tried */ continue; - + desc = &irq_desc[i]; spin_lock(&desc->lock); + action = desc->action; /* Already running on another processor */ if (desc->status & IRQ_INPROGRESS) { /* * Already running: If it is shared get the other * CPU to go looking for our mystery interrupt too */ - if (desc->action && (desc->action->flags & IRQF_SHARED)) + if (desc->action && (desc->action->flags & SA_SHIRQ)) desc->status |= IRQ_PENDING; spin_unlock(&desc->lock); continue; } /* Honour the normal IRQ locking */ desc->status |= IRQ_INPROGRESS; - action = desc->action; spin_unlock(&desc->lock); - while (action) { /* Only shared IRQ handlers are safe to call */ - if (action->flags & IRQF_SHARED) { + if (action->flags & SA_SHIRQ) { if (action->handler(i, action->dev_id, regs) == IRQ_HANDLED) ok = 1; @@ -62,8 +62,9 @@ static int misrouted_irq(int irq, struct pt_regs *regs) /* * While we were looking for a fixup someone queued a real - * IRQ clashing with our walk: + * IRQ clashing with our walk */ + while ((desc->status & IRQ_PENDING) && action) { /* * Perform real IRQ processing for the IRQ we deferred @@ -79,8 +80,8 @@ static int misrouted_irq(int irq, struct pt_regs *regs) * If we did actual work for the real IRQ line we must let the * IRQ controller clean up too */ - if (work && desc->chip && desc->chip->end) - desc->chip->end(i); + if(work) + desc->handler->end(i); spin_unlock(&desc->lock); } /* So the caller can adjust the irq error counts */ @@ -99,8 +100,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs) */ static void -__report_bad_irq(unsigned int irq, struct irq_desc *desc, - irqreturn_t action_ret) +__report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) { struct irqaction *action; @@ -113,7 +113,6 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc, } dump_stack(); printk(KERN_ERR "handlers:\n"); - action = desc->action; while (action) { printk(KERN_ERR "[<%p>]", action->handler); @@ -124,8 +123,7 @@ __report_bad_irq(unsigned int irq, struct irq_desc *desc, } } -static void -report_bad_irq(unsigned int irq, struct irq_desc *desc, irqreturn_t action_ret) +static void report_bad_irq(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret) { static int count = 100; @@ -135,12 +133,13 @@ report_bad_irq(unsigned int irq, struct irq_desc *desc, irqreturn_t action_ret) } } -void note_interrupt(unsigned int irq, struct irq_desc *desc, - irqreturn_t action_ret, struct pt_regs *regs) +void note_interrupt(unsigned int irq, irq_desc_t *desc, irqreturn_t action_ret, + struct pt_regs *regs) { - if (unlikely(action_ret != IRQ_HANDLED)) { - desc->irqs_unhandled++; - if (unlikely(action_ret != IRQ_NONE)) + if (action_ret != IRQ_HANDLED) { + if (!irq_ignore_unhandled(irq)) + desc->irqs_unhandled++; + if (action_ret != IRQ_NONE) report_bad_irq(irq, desc, action_ret); } @@ -154,11 +153,11 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, } desc->irq_count++; - if (likely(desc->irq_count < 100000)) + if (desc->irq_count < 100000) return; desc->irq_count = 0; - if (unlikely(desc->irqs_unhandled > 99900)) { + if (desc->irqs_unhandled > 99900) { /* * The interrupt is stuck */ @@ -168,19 +167,17 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, */ printk(KERN_EMERG "Disabling IRQ #%d\n", irq); desc->status |= IRQ_DISABLED; - desc->depth = 1; - desc->chip->disable(irq); + desc->handler->disable(irq); } desc->irqs_unhandled = 0; } -int noirqdebug __read_mostly; +int noirqdebug; int __init noirqdebug_setup(char *str) { noirqdebug = 1; printk(KERN_INFO "IRQ lockup detection disabled\n"); - return 1; } @@ -191,7 +188,6 @@ static int __init irqfixup_setup(char *str) irqfixup = 1; printk(KERN_WARNING "Misrouted IRQ fixup support enabled.\n"); printk(KERN_WARNING "This may impact system performance.\n"); - return 1; } diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index ab16a5a4c..39277dd6b 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -275,8 +275,8 @@ static void upcase_if_global(struct kallsym_iter *iter) static int get_ksymbol_mod(struct kallsym_iter *iter) { iter->owner = module_get_kallsym(iter->pos - kallsyms_num_syms, - &iter->value, &iter->type, - iter->name, sizeof(iter->name)); + &iter->value, + &iter->type, iter->name); if (iter->owner == NULL) return 0; diff --git a/kernel/kexec.c b/kernel/kexec.c index 50087ecf3..bf39d28e4 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -902,14 +902,14 @@ static int kimage_load_segment(struct kimage *image, * kexec does not sync, or unmount filesystems so if you need * that to happen you need to do that yourself. */ -struct kimage *kexec_image; -struct kimage *kexec_crash_image; +struct kimage *kexec_image = NULL; +static struct kimage *kexec_crash_image = NULL; /* * A home grown binary mutex. * Nothing can wait so this mutex is safe to use * in interrupt context :) */ -static int kexec_lock; +static int kexec_lock = 0; asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, struct kexec_segment __user *segments, @@ -1042,6 +1042,7 @@ asmlinkage long compat_sys_kexec_load(unsigned long entry, void crash_kexec(struct pt_regs *regs) { + struct kimage *image; int locked; @@ -1055,11 +1056,12 @@ void crash_kexec(struct pt_regs *regs) */ locked = xchg(&kexec_lock, 1); if (!locked) { - if (kexec_crash_image) { + image = xchg(&kexec_crash_image, NULL); + if (image) { struct pt_regs fixed_regs; crash_setup_regs(&fixed_regs, regs); machine_crash_shutdown(&fixed_regs); - machine_kexec(kexec_crash_image); + machine_kexec(image); } xchg(&kexec_lock, 0); } diff --git a/kernel/kmod.c b/kernel/kmod.c index 1e79dfcbe..d9b28584f 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -20,6 +20,7 @@ */ #define __KERNEL_SYSCALLS__ +#include #include #include #include @@ -213,12 +214,11 @@ static void __call_usermodehelper(void *data) { struct subprocess_info *sub_info = data; pid_t pid; - int wait = sub_info->wait; /* CLONE_VFORK: wait until the usermode helper has execve'd * successfully We need the data structures to stay around * until that is done. */ - if (wait) + if (sub_info->wait) pid = kernel_thread(wait_for_helper, sub_info, CLONE_FS | CLONE_FILES | SIGCHLD); else @@ -228,7 +228,7 @@ static void __call_usermodehelper(void *data) if (pid < 0) { sub_info->retval = pid; complete(sub_info->complete); - } else if (!wait) + } else if (!sub_info->wait) complete(sub_info->complete); } @@ -250,7 +250,7 @@ static void __call_usermodehelper(void *data) int call_usermodehelper_keys(char *path, char **argv, char **envp, struct key *session_keyring, int wait) { - DECLARE_COMPLETION_ONSTACK(done); + DECLARE_COMPLETION(done); struct subprocess_info sub_info = { .complete = &done, .path = path, diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 3f57dfdc8..1fbf466a2 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -47,17 +47,11 @@ static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE]; static struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE]; -static atomic_t kprobe_count; DEFINE_MUTEX(kprobe_mutex); /* Protects kprobe_table */ DEFINE_SPINLOCK(kretprobe_lock); /* Protects kretprobe_inst_table */ static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL; -static struct notifier_block kprobe_page_fault_nb = { - .notifier_call = kprobe_exceptions_notify, - .priority = 0x7fffffff /* we need to notified first */ -}; - #ifdef __ARCH_WANT_KPROBES_INSN_SLOT /* * kprobe->ainsn.insn points to the copy of the instruction to be @@ -374,15 +368,16 @@ static inline void copy_kprobe(struct kprobe *old_p, struct kprobe *p) */ static int __kprobes add_new_kprobe(struct kprobe *old_p, struct kprobe *p) { + struct kprobe *kp; + if (p->break_handler) { - if (old_p->break_handler) - return -EEXIST; + list_for_each_entry_rcu(kp, &old_p->list, list) { + if (kp->break_handler) + return -EEXIST; + } list_add_tail_rcu(&p->list, &old_p->list); - old_p->break_handler = aggr_break_handler; } else list_add_rcu(&p->list, &old_p->list); - if (p->post_handler && !old_p->post_handler) - old_p->post_handler = aggr_post_handler; return 0; } @@ -393,14 +388,11 @@ static int __kprobes add_new_kprobe(struct kprobe *old_p, struct kprobe *p) static inline void add_aggr_kprobe(struct kprobe *ap, struct kprobe *p) { copy_kprobe(p, ap); - flush_insn_slot(ap); ap->addr = p->addr; ap->pre_handler = aggr_pre_handler; + ap->post_handler = aggr_post_handler; ap->fault_handler = aggr_fault_handler; - if (p->post_handler) - ap->post_handler = aggr_post_handler; - if (p->break_handler) - ap->break_handler = aggr_break_handler; + ap->break_handler = aggr_break_handler; INIT_LIST_HEAD(&ap->list); list_add_rcu(&p->list, &ap->list); @@ -472,8 +464,6 @@ static int __kprobes __register_kprobe(struct kprobe *p, old_p = get_kprobe(p->addr); if (old_p) { ret = register_aggr_kprobe(old_p, p); - if (!ret) - atomic_inc(&kprobe_count); goto out; } @@ -484,10 +474,6 @@ static int __kprobes __register_kprobe(struct kprobe *p, hlist_add_head_rcu(&p->hlist, &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]); - if (atomic_add_return(1, &kprobe_count) == \ - (ARCH_INACTIVE_KPROBE_COUNT + 1)) - register_page_fault_notifier(&kprobe_page_fault_nb); - arch_arm_kprobe(p); out: @@ -550,40 +536,14 @@ valid_p: kfree(old_p); } arch_remove_kprobe(p); - } else { - mutex_lock(&kprobe_mutex); - if (p->break_handler) - old_p->break_handler = NULL; - if (p->post_handler){ - list_for_each_entry_rcu(list_p, &old_p->list, list){ - if (list_p->post_handler){ - cleanup_p = 2; - break; - } - } - if (cleanup_p == 0) - old_p->post_handler = NULL; - } - mutex_unlock(&kprobe_mutex); } - - /* Call unregister_page_fault_notifier() - * if no probes are active - */ - mutex_lock(&kprobe_mutex); - if (atomic_add_return(-1, &kprobe_count) == \ - ARCH_INACTIVE_KPROBE_COUNT) - unregister_page_fault_notifier(&kprobe_page_fault_nb); - mutex_unlock(&kprobe_mutex); - return; } static struct notifier_block kprobe_exceptions_nb = { .notifier_call = kprobe_exceptions_notify, - .priority = 0x7fffffff /* we need to be notified first */ + .priority = 0x7fffffff /* we need to notified first */ }; - int __kprobes register_jprobe(struct jprobe *jp) { /* Todo: Verify probepoint is a function entry point */ @@ -692,7 +652,6 @@ static int __init init_kprobes(void) INIT_HLIST_HEAD(&kprobe_table[i]); INIT_HLIST_HEAD(&kretprobe_inst_table[i]); } - atomic_set(&kprobe_count, 0); err = arch_init_kprobes(); if (!err) diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index e0ffe4ab0..f119e098e 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c @@ -8,12 +8,12 @@ * */ +#include #include #include #include #include #include -#include #define KERNEL_ATTR_RO(_name) \ static struct subsys_attribute _name##_attr = __ATTR_RO(_name) @@ -48,20 +48,6 @@ static ssize_t uevent_helper_store(struct subsystem *subsys, const char *page, s KERNEL_ATTR_RW(uevent_helper); #endif -#ifdef CONFIG_KEXEC -static ssize_t kexec_loaded_show(struct subsystem *subsys, char *page) -{ - return sprintf(page, "%d\n", !!kexec_image); -} -KERNEL_ATTR_RO(kexec_loaded); - -static ssize_t kexec_crash_loaded_show(struct subsystem *subsys, char *page) -{ - return sprintf(page, "%d\n", !!kexec_crash_image); -} -KERNEL_ATTR_RO(kexec_crash_loaded); -#endif /* CONFIG_KEXEC */ - decl_subsys(kernel, NULL, NULL); EXPORT_SYMBOL_GPL(kernel_subsys); @@ -69,10 +55,6 @@ static struct attribute * kernel_attrs[] = { #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) &uevent_seqnum_attr.attr, &uevent_helper_attr.attr, -#endif -#ifdef CONFIG_KEXEC - &kexec_loaded_attr.attr, - &kexec_crash_loaded_attr.attr, #endif NULL }; diff --git a/kernel/kthread.c b/kernel/kthread.c index 47cfe7230..c18d7c731 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -45,13 +45,6 @@ struct kthread_stop_info static DEFINE_MUTEX(kthread_stop_lock); static struct kthread_stop_info kthread_stop_info; -/** - * kthread_should_stop - should this kthread return now? - * - * When someone calls kthread_stop on your kthread, it will be woken - * and this will return true. You should then return, and your return - * value will be passed through to kthread_stop(). - */ int kthread_should_stop(void) { return (kthread_stop_info.k == current); @@ -129,25 +122,6 @@ static void keventd_create_kthread(void *_create) complete(&create->done); } -/** - * kthread_create - create a kthread. - * @threadfn: the function to run until signal_pending(current). - * @data: data ptr for @threadfn. - * @namefmt: printf-style name for the thread. - * - * Description: This helper function creates and names a kernel - * thread. The thread will be stopped: use wake_up_process() to start - * it. See also kthread_run(), kthread_create_on_cpu(). - * - * When woken, the thread will run @threadfn() with @data as its - * argument. @threadfn can either call do_exit() directly if it is a - * standalone thread for which noone will call kthread_stop(), or - * return when 'kthread_should_stop()' is true (which means - * kthread_stop() has been called). The return value should be zero - * or a negative error number; it will be passed to kthread_stop(). - * - * Returns a task_struct or ERR_PTR(-ENOMEM). - */ struct task_struct *kthread_create(int (*threadfn)(void *data), void *data, const char namefmt[], @@ -182,15 +156,6 @@ struct task_struct *kthread_create(int (*threadfn)(void *data), } EXPORT_SYMBOL(kthread_create); -/** - * kthread_bind - bind a just-created kthread to a cpu. - * @k: thread created by kthread_create(). - * @cpu: cpu (might not be online, must be possible) for @k to run on. - * - * Description: This function is equivalent to set_cpus_allowed(), - * except that @cpu doesn't need to be online, and the thread must be - * stopped (i.e., just returned from kthread_create(). - */ void kthread_bind(struct task_struct *k, unsigned int cpu) { BUG_ON(k->state != TASK_INTERRUPTIBLE); @@ -201,20 +166,13 @@ void kthread_bind(struct task_struct *k, unsigned int cpu) } EXPORT_SYMBOL(kthread_bind); -/** - * kthread_stop - stop a thread created by kthread_create(). - * @k: thread created by kthread_create(). - * - * Sets kthread_should_stop() for @k to return true, wakes it, and - * waits for it to exit. Your threadfn() must not call do_exit() - * itself if you use this function! This can also be called after - * kthread_create() instead of calling wake_up_process(): the thread - * will exit without calling threadfn(). - * - * Returns the result of threadfn(), or %-EINTR if wake_up_process() - * was never called. - */ int kthread_stop(struct task_struct *k) +{ + return kthread_stop_sem(k, NULL); +} +EXPORT_SYMBOL(kthread_stop); + +int kthread_stop_sem(struct task_struct *k, struct semaphore *s) { int ret; @@ -229,7 +187,10 @@ int kthread_stop(struct task_struct *k) /* Now set kthread_should_stop() to true, and wake it up. */ kthread_stop_info.k = k; - wake_up_process(k); + if (s) + up(s); + else + wake_up_process(k); put_task_struct(k); /* Once it dies, reset stop ptr, gather result and we're done. */ @@ -240,7 +201,7 @@ int kthread_stop(struct task_struct *k) return ret; } -EXPORT_SYMBOL(kthread_stop); +EXPORT_SYMBOL(kthread_stop_sem); static __init int helper_init(void) { @@ -249,5 +210,5 @@ static __init int helper_init(void) return 0; } - core_initcall(helper_init); + diff --git a/kernel/lockdep.c b/kernel/lockdep.c deleted file mode 100644 index 3a0c44c60..000000000 --- a/kernel/lockdep.c +++ /dev/null @@ -1,2727 +0,0 @@ -/* - * kernel/lockdep.c - * - * Runtime locking correctness validator - * - * Started by Ingo Molnar: - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - * - * this code maps all the lock dependencies as they occur in a live kernel - * and will warn about the following classes of locking bugs: - * - * - lock inversion scenarios - * - circular lock dependencies - * - hardirq/softirq safe/unsafe locking bugs - * - * Bugs are reported even if the current locking scenario does not cause - * any deadlock at this point. - * - * I.e. if anytime in the past two locks were taken in a different order, - * even if it happened for another task, even if those were different - * locks (but of the same class as this lock), this code will detect it. - * - * Thanks to Arjan van de Ven for coming up with the initial idea of - * mapping lock dependencies runtime. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "lockdep_internals.h" - -/* - * hash_lock: protects the lockdep hashes and class/list/hash allocators. - * - * This is one of the rare exceptions where it's justified - * to use a raw spinlock - we really dont want the spinlock - * code to recurse back into the lockdep code. - */ -static raw_spinlock_t hash_lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; - -static int lockdep_initialized; - -unsigned long nr_list_entries; -static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES]; - -/* - * Allocate a lockdep entry. (assumes hash_lock held, returns - * with NULL on failure) - */ -static struct lock_list *alloc_list_entry(void) -{ - if (nr_list_entries >= MAX_LOCKDEP_ENTRIES) { - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); - printk("turning off the locking correctness validator.\n"); - return NULL; - } - return list_entries + nr_list_entries++; -} - -/* - * All data structures here are protected by the global debug_lock. - * - * Mutex key structs only get allocated, once during bootup, and never - * get freed - this significantly simplifies the debugging code. - */ -unsigned long nr_lock_classes; -static struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; - -/* - * We keep a global list of all lock classes. The list only grows, - * never shrinks. The list is only accessed with the lockdep - * spinlock lock held. - */ -LIST_HEAD(all_lock_classes); - -/* - * The lockdep classes are in a hash-table as well, for fast lookup: - */ -#define CLASSHASH_BITS (MAX_LOCKDEP_KEYS_BITS - 1) -#define CLASSHASH_SIZE (1UL << CLASSHASH_BITS) -#define CLASSHASH_MASK (CLASSHASH_SIZE - 1) -#define __classhashfn(key) ((((unsigned long)key >> CLASSHASH_BITS) + (unsigned long)key) & CLASSHASH_MASK) -#define classhashentry(key) (classhash_table + __classhashfn((key))) - -static struct list_head classhash_table[CLASSHASH_SIZE]; - -unsigned long nr_lock_chains; -static struct lock_chain lock_chains[MAX_LOCKDEP_CHAINS]; - -/* - * We put the lock dependency chains into a hash-table as well, to cache - * their existence: - */ -#define CHAINHASH_BITS (MAX_LOCKDEP_CHAINS_BITS-1) -#define CHAINHASH_SIZE (1UL << CHAINHASH_BITS) -#define CHAINHASH_MASK (CHAINHASH_SIZE - 1) -#define __chainhashfn(chain) \ - (((chain >> CHAINHASH_BITS) + chain) & CHAINHASH_MASK) -#define chainhashentry(chain) (chainhash_table + __chainhashfn((chain))) - -static struct list_head chainhash_table[CHAINHASH_SIZE]; - -/* - * The hash key of the lock dependency chains is a hash itself too: - * it's a hash of all locks taken up to that lock, including that lock. - * It's a 64-bit hash, because it's important for the keys to be - * unique. - */ -#define iterate_chain_key(key1, key2) \ - (((key1) << MAX_LOCKDEP_KEYS_BITS/2) ^ \ - ((key1) >> (64-MAX_LOCKDEP_KEYS_BITS/2)) ^ \ - (key2)) - -void lockdep_off(void) -{ - current->lockdep_recursion++; -} - -EXPORT_SYMBOL(lockdep_off); - -void lockdep_on(void) -{ - current->lockdep_recursion--; -} - -EXPORT_SYMBOL(lockdep_on); - -int lockdep_internal(void) -{ - return current->lockdep_recursion != 0; -} - -EXPORT_SYMBOL(lockdep_internal); - -/* - * Debugging switches: - */ - -#define VERBOSE 0 -#ifdef VERBOSE -# define VERY_VERBOSE 0 -#endif - -#if VERBOSE -# define HARDIRQ_VERBOSE 1 -# define SOFTIRQ_VERBOSE 1 -#else -# define HARDIRQ_VERBOSE 0 -# define SOFTIRQ_VERBOSE 0 -#endif - -#if VERBOSE || HARDIRQ_VERBOSE || SOFTIRQ_VERBOSE -/* - * Quick filtering for interesting events: - */ -static int class_filter(struct lock_class *class) -{ -#if 0 - /* Example */ - if (class->name_version == 1 && - !strcmp(class->name, "lockname")) - return 1; - if (class->name_version == 1 && - !strcmp(class->name, "&struct->lockfield")) - return 1; -#endif - /* Allow everything else. 0 would be filter everything else */ - return 1; -} -#endif - -static int verbose(struct lock_class *class) -{ -#if VERBOSE - return class_filter(class); -#endif - return 0; -} - -#ifdef CONFIG_TRACE_IRQFLAGS - -static int hardirq_verbose(struct lock_class *class) -{ -#if HARDIRQ_VERBOSE - return class_filter(class); -#endif - return 0; -} - -static int softirq_verbose(struct lock_class *class) -{ -#if SOFTIRQ_VERBOSE - return class_filter(class); -#endif - return 0; -} - -#endif - -/* - * Stack-trace: tightly packed array of stack backtrace - * addresses. Protected by the hash_lock. - */ -unsigned long nr_stack_trace_entries; -static unsigned long stack_trace[MAX_STACK_TRACE_ENTRIES]; - -static int save_trace(struct stack_trace *trace) -{ - trace->nr_entries = 0; - trace->max_entries = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries; - trace->entries = stack_trace + nr_stack_trace_entries; - - trace->skip = 3; - trace->all_contexts = 0; - - /* Make sure to not recurse in case the the unwinder needs to tak -e locks. */ - lockdep_off(); - save_stack_trace(trace, NULL); - lockdep_on(); - - trace->max_entries = trace->nr_entries; - - nr_stack_trace_entries += trace->nr_entries; - if (DEBUG_LOCKS_WARN_ON(nr_stack_trace_entries > MAX_STACK_TRACE_ENTRIES)) - return 0; - - if (nr_stack_trace_entries == MAX_STACK_TRACE_ENTRIES) { - __raw_spin_unlock(&hash_lock); - if (debug_locks_off()) { - printk("BUG: MAX_STACK_TRACE_ENTRIES too low!\n"); - printk("turning off the locking correctness validator.\n"); - dump_stack(); - } - return 0; - } - - return 1; -} - -unsigned int nr_hardirq_chains; -unsigned int nr_softirq_chains; -unsigned int nr_process_chains; -unsigned int max_lockdep_depth; -unsigned int max_recursion_depth; - -#ifdef CONFIG_DEBUG_LOCKDEP -/* - * We cannot printk in early bootup code. Not even early_printk() - * might work. So we mark any initialization errors and printk - * about it later on, in lockdep_info(). - */ -static int lockdep_init_error; - -/* - * Various lockdep statistics: - */ -atomic_t chain_lookup_hits; -atomic_t chain_lookup_misses; -atomic_t hardirqs_on_events; -atomic_t hardirqs_off_events; -atomic_t redundant_hardirqs_on; -atomic_t redundant_hardirqs_off; -atomic_t softirqs_on_events; -atomic_t softirqs_off_events; -atomic_t redundant_softirqs_on; -atomic_t redundant_softirqs_off; -atomic_t nr_unused_locks; -atomic_t nr_cyclic_checks; -atomic_t nr_cyclic_check_recursions; -atomic_t nr_find_usage_forwards_checks; -atomic_t nr_find_usage_forwards_recursions; -atomic_t nr_find_usage_backwards_checks; -atomic_t nr_find_usage_backwards_recursions; -# define debug_atomic_inc(ptr) atomic_inc(ptr) -# define debug_atomic_dec(ptr) atomic_dec(ptr) -# define debug_atomic_read(ptr) atomic_read(ptr) -#else -# define debug_atomic_inc(ptr) do { } while (0) -# define debug_atomic_dec(ptr) do { } while (0) -# define debug_atomic_read(ptr) 0 -#endif - -/* - * Locking printouts: - */ - -static const char *usage_str[] = -{ - [LOCK_USED] = "initial-use ", - [LOCK_USED_IN_HARDIRQ] = "in-hardirq-W", - [LOCK_USED_IN_SOFTIRQ] = "in-softirq-W", - [LOCK_ENABLED_SOFTIRQS] = "softirq-on-W", - [LOCK_ENABLED_HARDIRQS] = "hardirq-on-W", - [LOCK_USED_IN_HARDIRQ_READ] = "in-hardirq-R", - [LOCK_USED_IN_SOFTIRQ_READ] = "in-softirq-R", - [LOCK_ENABLED_SOFTIRQS_READ] = "softirq-on-R", - [LOCK_ENABLED_HARDIRQS_READ] = "hardirq-on-R", -}; - -const char * __get_key_name(struct lockdep_subclass_key *key, char *str) -{ - unsigned long offs, size; - char *modname; - - return kallsyms_lookup((unsigned long)key, &size, &offs, &modname, str); -} - -void -get_usage_chars(struct lock_class *class, char *c1, char *c2, char *c3, char *c4) -{ - *c1 = '.', *c2 = '.', *c3 = '.', *c4 = '.'; - - if (class->usage_mask & LOCKF_USED_IN_HARDIRQ) - *c1 = '+'; - else - if (class->usage_mask & LOCKF_ENABLED_HARDIRQS) - *c1 = '-'; - - if (class->usage_mask & LOCKF_USED_IN_SOFTIRQ) - *c2 = '+'; - else - if (class->usage_mask & LOCKF_ENABLED_SOFTIRQS) - *c2 = '-'; - - if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ) - *c3 = '-'; - if (class->usage_mask & LOCKF_USED_IN_HARDIRQ_READ) { - *c3 = '+'; - if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ) - *c3 = '?'; - } - - if (class->usage_mask & LOCKF_ENABLED_SOFTIRQS_READ) - *c4 = '-'; - if (class->usage_mask & LOCKF_USED_IN_SOFTIRQ_READ) { - *c4 = '+'; - if (class->usage_mask & LOCKF_ENABLED_SOFTIRQS_READ) - *c4 = '?'; - } -} - -static void print_lock_name(struct lock_class *class) -{ - char str[128], c1, c2, c3, c4; - const char *name; - - get_usage_chars(class, &c1, &c2, &c3, &c4); - - name = class->name; - if (!name) { - name = __get_key_name(class->key, str); - printk(" (%s", name); - } else { - printk(" (%s", name); - if (class->name_version > 1) - printk("#%d", class->name_version); - if (class->subclass) - printk("/%d", class->subclass); - } - printk("){%c%c%c%c}", c1, c2, c3, c4); -} - -static void print_lockdep_cache(struct lockdep_map *lock) -{ - const char *name; - char str[128]; - - name = lock->name; - if (!name) - name = __get_key_name(lock->key->subkeys, str); - - printk("%s", name); -} - -static void print_lock(struct held_lock *hlock) -{ - print_lock_name(hlock->class); - printk(", at: "); - print_ip_sym(hlock->acquire_ip); -} - -static void lockdep_print_held_locks(struct task_struct *curr) -{ - int i, depth = curr->lockdep_depth; - - if (!depth) { - printk("no locks held by %s/%d.\n", curr->comm, curr->pid); - return; - } - printk("%d lock%s held by %s/%d:\n", - depth, depth > 1 ? "s" : "", curr->comm, curr->pid); - - for (i = 0; i < depth; i++) { - printk(" #%d: ", i); - print_lock(curr->held_locks + i); - } -} - -static void print_lock_class_header(struct lock_class *class, int depth) -{ - int bit; - - printk("%*s->", depth, ""); - print_lock_name(class); - printk(" ops: %lu", class->ops); - printk(" {\n"); - - for (bit = 0; bit < LOCK_USAGE_STATES; bit++) { - if (class->usage_mask & (1 << bit)) { - int len = depth; - - len += printk("%*s %s", depth, "", usage_str[bit]); - len += printk(" at:\n"); - print_stack_trace(class->usage_traces + bit, len); - } - } - printk("%*s }\n", depth, ""); - - printk("%*s ... key at: ",depth,""); - print_ip_sym((unsigned long)class->key); -} - -/* - * printk all lock dependencies starting at : - */ -static void print_lock_dependencies(struct lock_class *class, int depth) -{ - struct lock_list *entry; - - if (DEBUG_LOCKS_WARN_ON(depth >= 20)) - return; - - print_lock_class_header(class, depth); - - list_for_each_entry(entry, &class->locks_after, entry) { - DEBUG_LOCKS_WARN_ON(!entry->class); - print_lock_dependencies(entry->class, depth + 1); - - printk("%*s ... acquired at:\n",depth,""); - print_stack_trace(&entry->trace, 2); - printk("\n"); - } -} - -/* - * Add a new dependency to the head of the list: - */ -static int add_lock_to_list(struct lock_class *class, struct lock_class *this, - struct list_head *head, unsigned long ip) -{ - struct lock_list *entry; - /* - * Lock not present yet - get a new dependency struct and - * add it to the list: - */ - entry = alloc_list_entry(); - if (!entry) - return 0; - - entry->class = this; - save_trace(&entry->trace); - - /* - * Since we never remove from the dependency list, the list can - * be walked lockless by other CPUs, it's only allocation - * that must be protected by the spinlock. But this also means - * we must make new entries visible only once writes to the - * entry become visible - hence the RCU op: - */ - list_add_tail_rcu(&entry->entry, head); - - return 1; -} - -/* - * Recursive, forwards-direction lock-dependency checking, used for - * both noncyclic checking and for hardirq-unsafe/softirq-unsafe - * checking. - * - * (to keep the stackframe of the recursive functions small we - * use these global variables, and we also mark various helper - * functions as noinline.) - */ -static struct held_lock *check_source, *check_target; - -/* - * Print a dependency chain entry (this is only done when a deadlock - * has been detected): - */ -static noinline int -print_circular_bug_entry(struct lock_list *target, unsigned int depth) -{ - if (debug_locks_silent) - return 0; - printk("\n-> #%u", depth); - print_lock_name(target->class); - printk(":\n"); - print_stack_trace(&target->trace, 6); - - return 0; -} - -static void print_kernel_version(void) -{ - printk("%s %.*s\n", system_utsname.release, - (int)strcspn(system_utsname.version, " "), - system_utsname.version); -} - -/* - * When a circular dependency is detected, print the - * header first: - */ -static noinline int -print_circular_bug_header(struct lock_list *entry, unsigned int depth) -{ - struct task_struct *curr = current; - - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - if (debug_locks_silent) - return 0; - - printk("\n=======================================================\n"); - printk( "[ INFO: possible circular locking dependency detected ]\n"); - print_kernel_version(); - printk( "-------------------------------------------------------\n"); - printk("%s/%d is trying to acquire lock:\n", - curr->comm, curr->pid); - print_lock(check_source); - printk("\nbut task is already holding lock:\n"); - print_lock(check_target); - printk("\nwhich lock already depends on the new lock.\n\n"); - printk("\nthe existing dependency chain (in reverse order) is:\n"); - - print_circular_bug_entry(entry, depth); - - return 0; -} - -static noinline int print_circular_bug_tail(void) -{ - struct task_struct *curr = current; - struct lock_list this; - - if (debug_locks_silent) - return 0; - - this.class = check_source->class; - save_trace(&this.trace); - print_circular_bug_entry(&this, 0); - - printk("\nother info that might help us debug this:\n\n"); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -static int noinline print_infinite_recursion_bug(void) -{ - __raw_spin_unlock(&hash_lock); - DEBUG_LOCKS_WARN_ON(1); - - return 0; -} - -/* - * Prove that the dependency graph starting at can not - * lead to . Print an error and return 0 if it does. - */ -static noinline int -check_noncircular(struct lock_class *source, unsigned int depth) -{ - struct lock_list *entry; - - debug_atomic_inc(&nr_cyclic_check_recursions); - if (depth > max_recursion_depth) - max_recursion_depth = depth; - if (depth >= 20) - return print_infinite_recursion_bug(); - /* - * Check this lock's dependency list: - */ - list_for_each_entry(entry, &source->locks_after, entry) { - if (entry->class == check_target->class) - return print_circular_bug_header(entry, depth+1); - debug_atomic_inc(&nr_cyclic_checks); - if (!check_noncircular(entry->class, depth+1)) - return print_circular_bug_entry(entry, depth+1); - } - return 1; -} - -static int very_verbose(struct lock_class *class) -{ -#if VERY_VERBOSE - return class_filter(class); -#endif - return 0; -} -#ifdef CONFIG_TRACE_IRQFLAGS - -/* - * Forwards and backwards subgraph searching, for the purposes of - * proving that two subgraphs can be connected by a new dependency - * without creating any illegal irq-safe -> irq-unsafe lock dependency. - */ -static enum lock_usage_bit find_usage_bit; -static struct lock_class *forwards_match, *backwards_match; - -/* - * Find a node in the forwards-direction dependency sub-graph starting - * at that matches . - * - * Return 2 if such a node exists in the subgraph, and put that node - * into . - * - * Return 1 otherwise and keep unchanged. - * Return 0 on error. - */ -static noinline int -find_usage_forwards(struct lock_class *source, unsigned int depth) -{ - struct lock_list *entry; - int ret; - - if (depth > max_recursion_depth) - max_recursion_depth = depth; - if (depth >= 20) - return print_infinite_recursion_bug(); - - debug_atomic_inc(&nr_find_usage_forwards_checks); - if (source->usage_mask & (1 << find_usage_bit)) { - forwards_match = source; - return 2; - } - - /* - * Check this lock's dependency list: - */ - list_for_each_entry(entry, &source->locks_after, entry) { - debug_atomic_inc(&nr_find_usage_forwards_recursions); - ret = find_usage_forwards(entry->class, depth+1); - if (ret == 2 || ret == 0) - return ret; - } - return 1; -} - -/* - * Find a node in the backwards-direction dependency sub-graph starting - * at that matches . - * - * Return 2 if such a node exists in the subgraph, and put that node - * into . - * - * Return 1 otherwise and keep unchanged. - * Return 0 on error. - */ -static noinline int -find_usage_backwards(struct lock_class *source, unsigned int depth) -{ - struct lock_list *entry; - int ret; - - if (depth > max_recursion_depth) - max_recursion_depth = depth; - if (depth >= 20) - return print_infinite_recursion_bug(); - - debug_atomic_inc(&nr_find_usage_backwards_checks); - if (source->usage_mask & (1 << find_usage_bit)) { - backwards_match = source; - return 2; - } - - /* - * Check this lock's dependency list: - */ - list_for_each_entry(entry, &source->locks_before, entry) { - debug_atomic_inc(&nr_find_usage_backwards_recursions); - ret = find_usage_backwards(entry->class, depth+1); - if (ret == 2 || ret == 0) - return ret; - } - return 1; -} - -static int -print_bad_irq_dependency(struct task_struct *curr, - struct held_lock *prev, - struct held_lock *next, - enum lock_usage_bit bit1, - enum lock_usage_bit bit2, - const char *irqclass) -{ - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - if (debug_locks_silent) - return 0; - - printk("\n======================================================\n"); - printk( "[ INFO: %s-safe -> %s-unsafe lock order detected ]\n", - irqclass, irqclass); - print_kernel_version(); - printk( "------------------------------------------------------\n"); - printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] is trying to acquire:\n", - curr->comm, curr->pid, - curr->hardirq_context, hardirq_count() >> HARDIRQ_SHIFT, - curr->softirq_context, softirq_count() >> SOFTIRQ_SHIFT, - curr->hardirqs_enabled, - curr->softirqs_enabled); - print_lock(next); - - printk("\nand this task is already holding:\n"); - print_lock(prev); - printk("which would create a new lock dependency:\n"); - print_lock_name(prev->class); - printk(" ->"); - print_lock_name(next->class); - printk("\n"); - - printk("\nbut this new dependency connects a %s-irq-safe lock:\n", - irqclass); - print_lock_name(backwards_match); - printk("\n... which became %s-irq-safe at:\n", irqclass); - - print_stack_trace(backwards_match->usage_traces + bit1, 1); - - printk("\nto a %s-irq-unsafe lock:\n", irqclass); - print_lock_name(forwards_match); - printk("\n... which became %s-irq-unsafe at:\n", irqclass); - printk("..."); - - print_stack_trace(forwards_match->usage_traces + bit2, 1); - - printk("\nother info that might help us debug this:\n\n"); - lockdep_print_held_locks(curr); - - printk("\nthe %s-irq-safe lock's dependencies:\n", irqclass); - print_lock_dependencies(backwards_match, 0); - - printk("\nthe %s-irq-unsafe lock's dependencies:\n", irqclass); - print_lock_dependencies(forwards_match, 0); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -static int -check_usage(struct task_struct *curr, struct held_lock *prev, - struct held_lock *next, enum lock_usage_bit bit_backwards, - enum lock_usage_bit bit_forwards, const char *irqclass) -{ - int ret; - - find_usage_bit = bit_backwards; - /* fills in */ - ret = find_usage_backwards(prev->class, 0); - if (!ret || ret == 1) - return ret; - - find_usage_bit = bit_forwards; - ret = find_usage_forwards(next->class, 0); - if (!ret || ret == 1) - return ret; - /* ret == 2 */ - return print_bad_irq_dependency(curr, prev, next, - bit_backwards, bit_forwards, irqclass); -} - -#endif - -static int -print_deadlock_bug(struct task_struct *curr, struct held_lock *prev, - struct held_lock *next) -{ - debug_locks_off(); - __raw_spin_unlock(&hash_lock); - if (debug_locks_silent) - return 0; - - printk("\n=============================================\n"); - printk( "[ INFO: possible recursive locking detected ]\n"); - print_kernel_version(); - printk( "---------------------------------------------\n"); - printk("%s/%d is trying to acquire lock:\n", - curr->comm, curr->pid); - print_lock(next); - printk("\nbut task is already holding lock:\n"); - print_lock(prev); - - printk("\nother info that might help us debug this:\n"); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -/* - * Check whether we are holding such a class already. - * - * (Note that this has to be done separately, because the graph cannot - * detect such classes of deadlocks.) - * - * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read - */ -static int -check_deadlock(struct task_struct *curr, struct held_lock *next, - struct lockdep_map *next_instance, int read) -{ - struct held_lock *prev; - int i; - - for (i = 0; i < curr->lockdep_depth; i++) { - prev = curr->held_locks + i; - if (prev->class != next->class) - continue; - /* - * Allow read-after-read recursion of the same - * lock class (i.e. read_lock(lock)+read_lock(lock)): - */ - if ((read == 2) && prev->read) - return 2; - return print_deadlock_bug(curr, prev, next); - } - return 1; -} - -/* - * There was a chain-cache miss, and we are about to add a new dependency - * to a previous lock. We recursively validate the following rules: - * - * - would the adding of the -> dependency create a - * circular dependency in the graph? [== circular deadlock] - * - * - does the new prev->next dependency connect any hardirq-safe lock - * (in the full backwards-subgraph starting at ) with any - * hardirq-unsafe lock (in the full forwards-subgraph starting at - * )? [== illegal lock inversion with hardirq contexts] - * - * - does the new prev->next dependency connect any softirq-safe lock - * (in the full backwards-subgraph starting at ) with any - * softirq-unsafe lock (in the full forwards-subgraph starting at - * )? [== illegal lock inversion with softirq contexts] - * - * any of these scenarios could lead to a deadlock. - * - * Then if all the validations pass, we add the forwards and backwards - * dependency. - */ -static int -check_prev_add(struct task_struct *curr, struct held_lock *prev, - struct held_lock *next) -{ - struct lock_list *entry; - int ret; - - /* - * Prove that the new -> dependency would not - * create a circular dependency in the graph. (We do this by - * forward-recursing into the graph starting at , and - * checking whether we can reach .) - * - * We are using global variables to control the recursion, to - * keep the stackframe size of the recursive functions low: - */ - check_source = next; - check_target = prev; - if (!(check_noncircular(next->class, 0))) - return print_circular_bug_tail(); - -#ifdef CONFIG_TRACE_IRQFLAGS - /* - * Prove that the new dependency does not connect a hardirq-safe - * lock with a hardirq-unsafe lock - to achieve this we search - * the backwards-subgraph starting at , and the - * forwards-subgraph starting at : - */ - if (!check_usage(curr, prev, next, LOCK_USED_IN_HARDIRQ, - LOCK_ENABLED_HARDIRQS, "hard")) - return 0; - - /* - * Prove that the new dependency does not connect a hardirq-safe-read - * lock with a hardirq-unsafe lock - to achieve this we search - * the backwards-subgraph starting at , and the - * forwards-subgraph starting at : - */ - if (!check_usage(curr, prev, next, LOCK_USED_IN_HARDIRQ_READ, - LOCK_ENABLED_HARDIRQS, "hard-read")) - return 0; - - /* - * Prove that the new dependency does not connect a softirq-safe - * lock with a softirq-unsafe lock - to achieve this we search - * the backwards-subgraph starting at , and the - * forwards-subgraph starting at : - */ - if (!check_usage(curr, prev, next, LOCK_USED_IN_SOFTIRQ, - LOCK_ENABLED_SOFTIRQS, "soft")) - return 0; - /* - * Prove that the new dependency does not connect a softirq-safe-read - * lock with a softirq-unsafe lock - to achieve this we search - * the backwards-subgraph starting at , and the - * forwards-subgraph starting at : - */ - if (!check_usage(curr, prev, next, LOCK_USED_IN_SOFTIRQ_READ, - LOCK_ENABLED_SOFTIRQS, "soft")) - return 0; -#endif - /* - * For recursive read-locks we do all the dependency checks, - * but we dont store read-triggered dependencies (only - * write-triggered dependencies). This ensures that only the - * write-side dependencies matter, and that if for example a - * write-lock never takes any other locks, then the reads are - * equivalent to a NOP. - */ - if (next->read == 2 || prev->read == 2) - return 1; - /* - * Is the -> dependency already present? - * - * (this may occur even though this is a new chain: consider - * e.g. the L1 -> L2 -> L3 -> L4 and the L5 -> L1 -> L2 -> L3 - * chains - the second one will be new, but L1 already has - * L2 added to its dependency list, due to the first chain.) - */ - list_for_each_entry(entry, &prev->class->locks_after, entry) { - if (entry->class == next->class) - return 2; - } - - /* - * Ok, all validations passed, add the new lock - * to the previous lock's dependency list: - */ - ret = add_lock_to_list(prev->class, next->class, - &prev->class->locks_after, next->acquire_ip); - if (!ret) - return 0; - /* - * Return value of 2 signals 'dependency already added', - * in that case we dont have to add the backlink either. - */ - if (ret == 2) - return 2; - ret = add_lock_to_list(next->class, prev->class, - &next->class->locks_before, next->acquire_ip); - - /* - * Debugging printouts: - */ - if (verbose(prev->class) || verbose(next->class)) { - __raw_spin_unlock(&hash_lock); - printk("\n new dependency: "); - print_lock_name(prev->class); - printk(" => "); - print_lock_name(next->class); - printk("\n"); - dump_stack(); - __raw_spin_lock(&hash_lock); - } - return 1; -} - -/* - * Add the dependency to all directly-previous locks that are 'relevant'. - * The ones that are relevant are (in increasing distance from curr): - * all consecutive trylock entries and the final non-trylock entry - or - * the end of this context's lock-chain - whichever comes first. - */ -static int -check_prevs_add(struct task_struct *curr, struct held_lock *next) -{ - int depth = curr->lockdep_depth; - struct held_lock *hlock; - - /* - * Debugging checks. - * - * Depth must not be zero for a non-head lock: - */ - if (!depth) - goto out_bug; - /* - * At least two relevant locks must exist for this - * to be a head: - */ - if (curr->held_locks[depth].irq_context != - curr->held_locks[depth-1].irq_context) - goto out_bug; - - for (;;) { - hlock = curr->held_locks + depth-1; - /* - * Only non-recursive-read entries get new dependencies - * added: - */ - if (hlock->read != 2) { - check_prev_add(curr, hlock, next); - /* - * Stop after the first non-trylock entry, - * as non-trylock entries have added their - * own direct dependencies already, so this - * lock is connected to them indirectly: - */ - if (!hlock->trylock) - break; - } - depth--; - /* - * End of lock-stack? - */ - if (!depth) - break; - /* - * Stop the search if we cross into another context: - */ - if (curr->held_locks[depth].irq_context != - curr->held_locks[depth-1].irq_context) - break; - } - return 1; -out_bug: - __raw_spin_unlock(&hash_lock); - DEBUG_LOCKS_WARN_ON(1); - - return 0; -} - - -/* - * Is this the address of a static object: - */ -static int static_obj(void *obj) -{ - unsigned long start = (unsigned long) &_stext, - end = (unsigned long) &_end, - addr = (unsigned long) obj; -#ifdef CONFIG_SMP - int i; -#endif - - /* - * static variable? - */ - if ((addr >= start) && (addr < end)) - return 1; - -#ifdef CONFIG_SMP - /* - * percpu var? - */ - for_each_possible_cpu(i) { - start = (unsigned long) &__per_cpu_start + per_cpu_offset(i); - end = (unsigned long) &__per_cpu_end + per_cpu_offset(i); - - if ((addr >= start) && (addr < end)) - return 1; - } -#endif - - /* - * module var? - */ - return is_module_address(addr); -} - -/* - * To make lock name printouts unique, we calculate a unique - * class->name_version generation counter: - */ -static int count_matching_names(struct lock_class *new_class) -{ - struct lock_class *class; - int count = 0; - - if (!new_class->name) - return 0; - - list_for_each_entry(class, &all_lock_classes, lock_entry) { - if (new_class->key - new_class->subclass == class->key) - return class->name_version; - if (class->name && !strcmp(class->name, new_class->name)) - count = max(count, class->name_version); - } - - return count + 1; -} - -extern void __error_too_big_MAX_LOCKDEP_SUBCLASSES(void); - -/* - * Register a lock's class in the hash-table, if the class is not present - * yet. Otherwise we look it up. We cache the result in the lock object - * itself, so actual lookup of the hash should be once per lock object. - */ -static inline struct lock_class * -look_up_lock_class(struct lockdep_map *lock, unsigned int subclass) -{ - struct lockdep_subclass_key *key; - struct list_head *hash_head; - struct lock_class *class; - -#ifdef CONFIG_DEBUG_LOCKDEP - /* - * If the architecture calls into lockdep before initializing - * the hashes then we'll warn about it later. (we cannot printk - * right now) - */ - if (unlikely(!lockdep_initialized)) { - lockdep_init(); - lockdep_init_error = 1; - } -#endif - - /* - * Static locks do not have their class-keys yet - for them the key - * is the lock object itself: - */ - if (unlikely(!lock->key)) - lock->key = (void *)lock; - - /* - * NOTE: the class-key must be unique. For dynamic locks, a static - * lock_class_key variable is passed in through the mutex_init() - * (or spin_lock_init()) call - which acts as the key. For static - * locks we use the lock object itself as the key. - */ - if (sizeof(struct lock_class_key) > sizeof(struct lock_class)) - __error_too_big_MAX_LOCKDEP_SUBCLASSES(); - - key = lock->key->subkeys + subclass; - - hash_head = classhashentry(key); - - /* - * We can walk the hash lockfree, because the hash only - * grows, and we are careful when adding entries to the end: - */ - list_for_each_entry(class, hash_head, hash_entry) - if (class->key == key) - return class; - - return NULL; -} - -/* - * Register a lock's class in the hash-table, if the class is not present - * yet. Otherwise we look it up. We cache the result in the lock object - * itself, so actual lookup of the hash should be once per lock object. - */ -static inline struct lock_class * -register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) -{ - struct lockdep_subclass_key *key; - struct list_head *hash_head; - struct lock_class *class; - - class = look_up_lock_class(lock, subclass); - if (likely(class)) - return class; - - /* - * Debug-check: all keys must be persistent! - */ - if (!static_obj(lock->key)) { - debug_locks_off(); - printk("INFO: trying to register non-static key.\n"); - printk("the code is fine but needs lockdep annotation.\n"); - printk("turning off the locking correctness validator.\n"); - dump_stack(); - - return NULL; - } - - key = lock->key->subkeys + subclass; - hash_head = classhashentry(key); - - __raw_spin_lock(&hash_lock); - /* - * We have to do the hash-walk again, to avoid races - * with another CPU: - */ - list_for_each_entry(class, hash_head, hash_entry) - if (class->key == key) - goto out_unlock_set; - /* - * Allocate a new key from the static array, and add it to - * the hash: - */ - if (nr_lock_classes >= MAX_LOCKDEP_KEYS) { - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); - printk("turning off the locking correctness validator.\n"); - return NULL; - } - class = lock_classes + nr_lock_classes++; - debug_atomic_inc(&nr_unused_locks); - class->key = key; - class->name = lock->name; - class->subclass = subclass; - INIT_LIST_HEAD(&class->lock_entry); - INIT_LIST_HEAD(&class->locks_before); - INIT_LIST_HEAD(&class->locks_after); - class->name_version = count_matching_names(class); - /* - * We use RCU's safe list-add method to make - * parallel walking of the hash-list safe: - */ - list_add_tail_rcu(&class->hash_entry, hash_head); - - if (verbose(class)) { - __raw_spin_unlock(&hash_lock); - printk("\nnew class %p: %s", class->key, class->name); - if (class->name_version > 1) - printk("#%d", class->name_version); - printk("\n"); - dump_stack(); - __raw_spin_lock(&hash_lock); - } -out_unlock_set: - __raw_spin_unlock(&hash_lock); - - if (!subclass || force) - lock->class_cache = class; - - DEBUG_LOCKS_WARN_ON(class->subclass != subclass); - - return class; -} - -/* - * Look up a dependency chain. If the key is not present yet then - * add it and return 0 - in this case the new dependency chain is - * validated. If the key is already hashed, return 1. - */ -static inline int lookup_chain_cache(u64 chain_key) -{ - struct list_head *hash_head = chainhashentry(chain_key); - struct lock_chain *chain; - - DEBUG_LOCKS_WARN_ON(!irqs_disabled()); - /* - * We can walk it lock-free, because entries only get added - * to the hash: - */ - list_for_each_entry(chain, hash_head, entry) { - if (chain->chain_key == chain_key) { -cache_hit: - debug_atomic_inc(&chain_lookup_hits); - /* - * In the debugging case, force redundant checking - * by returning 1: - */ -#ifdef CONFIG_DEBUG_LOCKDEP - __raw_spin_lock(&hash_lock); - return 1; -#endif - return 0; - } - } - /* - * Allocate a new chain entry from the static array, and add - * it to the hash: - */ - __raw_spin_lock(&hash_lock); - /* - * We have to walk the chain again locked - to avoid duplicates: - */ - list_for_each_entry(chain, hash_head, entry) { - if (chain->chain_key == chain_key) { - __raw_spin_unlock(&hash_lock); - goto cache_hit; - } - } - if (unlikely(nr_lock_chains >= MAX_LOCKDEP_CHAINS)) { - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); - printk("turning off the locking correctness validator.\n"); - return 0; - } - chain = lock_chains + nr_lock_chains++; - chain->chain_key = chain_key; - list_add_tail_rcu(&chain->entry, hash_head); - debug_atomic_inc(&chain_lookup_misses); -#ifdef CONFIG_TRACE_IRQFLAGS - if (current->hardirq_context) - nr_hardirq_chains++; - else { - if (current->softirq_context) - nr_softirq_chains++; - else - nr_process_chains++; - } -#else - nr_process_chains++; -#endif - - return 1; -} - -/* - * We are building curr_chain_key incrementally, so double-check - * it from scratch, to make sure that it's done correctly: - */ -static void check_chain_key(struct task_struct *curr) -{ -#ifdef CONFIG_DEBUG_LOCKDEP - struct held_lock *hlock, *prev_hlock = NULL; - unsigned int i, id; - u64 chain_key = 0; - - for (i = 0; i < curr->lockdep_depth; i++) { - hlock = curr->held_locks + i; - if (chain_key != hlock->prev_chain_key) { - debug_locks_off(); - printk("hm#1, depth: %u [%u], %016Lx != %016Lx\n", - curr->lockdep_depth, i, - (unsigned long long)chain_key, - (unsigned long long)hlock->prev_chain_key); - WARN_ON(1); - return; - } - id = hlock->class - lock_classes; - DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS); - if (prev_hlock && (prev_hlock->irq_context != - hlock->irq_context)) - chain_key = 0; - chain_key = iterate_chain_key(chain_key, id); - prev_hlock = hlock; - } - if (chain_key != curr->curr_chain_key) { - debug_locks_off(); - printk("hm#2, depth: %u [%u], %016Lx != %016Lx\n", - curr->lockdep_depth, i, - (unsigned long long)chain_key, - (unsigned long long)curr->curr_chain_key); - WARN_ON(1); - } -#endif -} - -#ifdef CONFIG_TRACE_IRQFLAGS - -/* - * print irq inversion bug: - */ -static int -print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other, - struct held_lock *this, int forwards, - const char *irqclass) -{ - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - if (debug_locks_silent) - return 0; - - printk("\n=========================================================\n"); - printk( "[ INFO: possible irq lock inversion dependency detected ]\n"); - print_kernel_version(); - printk( "---------------------------------------------------------\n"); - printk("%s/%d just changed the state of lock:\n", - curr->comm, curr->pid); - print_lock(this); - if (forwards) - printk("but this lock took another, %s-irq-unsafe lock in the past:\n", irqclass); - else - printk("but this lock was taken by another, %s-irq-safe lock in the past:\n", irqclass); - print_lock_name(other); - printk("\n\nand interrupts could create inverse lock ordering between them.\n\n"); - - printk("\nother info that might help us debug this:\n"); - lockdep_print_held_locks(curr); - - printk("\nthe first lock's dependencies:\n"); - print_lock_dependencies(this->class, 0); - - printk("\nthe second lock's dependencies:\n"); - print_lock_dependencies(other, 0); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -/* - * Prove that in the forwards-direction subgraph starting at - * there is no lock matching : - */ -static int -check_usage_forwards(struct task_struct *curr, struct held_lock *this, - enum lock_usage_bit bit, const char *irqclass) -{ - int ret; - - find_usage_bit = bit; - /* fills in */ - ret = find_usage_forwards(this->class, 0); - if (!ret || ret == 1) - return ret; - - return print_irq_inversion_bug(curr, forwards_match, this, 1, irqclass); -} - -/* - * Prove that in the backwards-direction subgraph starting at - * there is no lock matching : - */ -static int -check_usage_backwards(struct task_struct *curr, struct held_lock *this, - enum lock_usage_bit bit, const char *irqclass) -{ - int ret; - - find_usage_bit = bit; - /* fills in */ - ret = find_usage_backwards(this->class, 0); - if (!ret || ret == 1) - return ret; - - return print_irq_inversion_bug(curr, backwards_match, this, 0, irqclass); -} - -static inline void print_irqtrace_events(struct task_struct *curr) -{ - printk("irq event stamp: %u\n", curr->irq_events); - printk("hardirqs last enabled at (%u): ", curr->hardirq_enable_event); - print_ip_sym(curr->hardirq_enable_ip); - printk("hardirqs last disabled at (%u): ", curr->hardirq_disable_event); - print_ip_sym(curr->hardirq_disable_ip); - printk("softirqs last enabled at (%u): ", curr->softirq_enable_event); - print_ip_sym(curr->softirq_enable_ip); - printk("softirqs last disabled at (%u): ", curr->softirq_disable_event); - print_ip_sym(curr->softirq_disable_ip); -} - -#else -static inline void print_irqtrace_events(struct task_struct *curr) -{ -} -#endif - -static int -print_usage_bug(struct task_struct *curr, struct held_lock *this, - enum lock_usage_bit prev_bit, enum lock_usage_bit new_bit) -{ - __raw_spin_unlock(&hash_lock); - debug_locks_off(); - if (debug_locks_silent) - return 0; - - printk("\n=================================\n"); - printk( "[ INFO: inconsistent lock state ]\n"); - print_kernel_version(); - printk( "---------------------------------\n"); - - printk("inconsistent {%s} -> {%s} usage.\n", - usage_str[prev_bit], usage_str[new_bit]); - - printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] takes:\n", - curr->comm, curr->pid, - trace_hardirq_context(curr), hardirq_count() >> HARDIRQ_SHIFT, - trace_softirq_context(curr), softirq_count() >> SOFTIRQ_SHIFT, - trace_hardirqs_enabled(curr), - trace_softirqs_enabled(curr)); - print_lock(this); - - printk("{%s} state was registered at:\n", usage_str[prev_bit]); - print_stack_trace(this->class->usage_traces + prev_bit, 1); - - print_irqtrace_events(curr); - printk("\nother info that might help us debug this:\n"); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -/* - * Print out an error if an invalid bit is set: - */ -static inline int -valid_state(struct task_struct *curr, struct held_lock *this, - enum lock_usage_bit new_bit, enum lock_usage_bit bad_bit) -{ - if (unlikely(this->class->usage_mask & (1 << bad_bit))) - return print_usage_bug(curr, this, bad_bit, new_bit); - return 1; -} - -#define STRICT_READ_CHECKS 1 - -/* - * Mark a lock with a usage bit, and validate the state transition: - */ -static int mark_lock(struct task_struct *curr, struct held_lock *this, - enum lock_usage_bit new_bit, unsigned long ip) -{ - unsigned int new_mask = 1 << new_bit, ret = 1; - - /* - * If already set then do not dirty the cacheline, - * nor do any checks: - */ - if (likely(this->class->usage_mask & new_mask)) - return 1; - - __raw_spin_lock(&hash_lock); - /* - * Make sure we didnt race: - */ - if (unlikely(this->class->usage_mask & new_mask)) { - __raw_spin_unlock(&hash_lock); - return 1; - } - - this->class->usage_mask |= new_mask; - -#ifdef CONFIG_TRACE_IRQFLAGS - if (new_bit == LOCK_ENABLED_HARDIRQS || - new_bit == LOCK_ENABLED_HARDIRQS_READ) - ip = curr->hardirq_enable_ip; - else if (new_bit == LOCK_ENABLED_SOFTIRQS || - new_bit == LOCK_ENABLED_SOFTIRQS_READ) - ip = curr->softirq_enable_ip; -#endif - if (!save_trace(this->class->usage_traces + new_bit)) - return 0; - - switch (new_bit) { -#ifdef CONFIG_TRACE_IRQFLAGS - case LOCK_USED_IN_HARDIRQ: - if (!valid_state(curr, this, new_bit, LOCK_ENABLED_HARDIRQS)) - return 0; - if (!valid_state(curr, this, new_bit, - LOCK_ENABLED_HARDIRQS_READ)) - return 0; - /* - * just marked it hardirq-safe, check that this lock - * took no hardirq-unsafe lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_HARDIRQS, "hard")) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it hardirq-safe, check that this lock - * took no hardirq-unsafe-read lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_HARDIRQS_READ, "hard-read")) - return 0; -#endif - if (hardirq_verbose(this->class)) - ret = 2; - break; - case LOCK_USED_IN_SOFTIRQ: - if (!valid_state(curr, this, new_bit, LOCK_ENABLED_SOFTIRQS)) - return 0; - if (!valid_state(curr, this, new_bit, - LOCK_ENABLED_SOFTIRQS_READ)) - return 0; - /* - * just marked it softirq-safe, check that this lock - * took no softirq-unsafe lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_SOFTIRQS, "soft")) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it softirq-safe, check that this lock - * took no softirq-unsafe-read lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_SOFTIRQS_READ, "soft-read")) - return 0; -#endif - if (softirq_verbose(this->class)) - ret = 2; - break; - case LOCK_USED_IN_HARDIRQ_READ: - if (!valid_state(curr, this, new_bit, LOCK_ENABLED_HARDIRQS)) - return 0; - /* - * just marked it hardirq-read-safe, check that this lock - * took no hardirq-unsafe lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_HARDIRQS, "hard")) - return 0; - if (hardirq_verbose(this->class)) - ret = 2; - break; - case LOCK_USED_IN_SOFTIRQ_READ: - if (!valid_state(curr, this, new_bit, LOCK_ENABLED_SOFTIRQS)) - return 0; - /* - * just marked it softirq-read-safe, check that this lock - * took no softirq-unsafe lock in the past: - */ - if (!check_usage_forwards(curr, this, - LOCK_ENABLED_SOFTIRQS, "soft")) - return 0; - if (softirq_verbose(this->class)) - ret = 2; - break; - case LOCK_ENABLED_HARDIRQS: - if (!valid_state(curr, this, new_bit, LOCK_USED_IN_HARDIRQ)) - return 0; - if (!valid_state(curr, this, new_bit, - LOCK_USED_IN_HARDIRQ_READ)) - return 0; - /* - * just marked it hardirq-unsafe, check that no hardirq-safe - * lock in the system ever took it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_HARDIRQ, "hard")) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it hardirq-unsafe, check that no - * hardirq-safe-read lock in the system ever took - * it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_HARDIRQ_READ, "hard-read")) - return 0; -#endif - if (hardirq_verbose(this->class)) - ret = 2; - break; - case LOCK_ENABLED_SOFTIRQS: - if (!valid_state(curr, this, new_bit, LOCK_USED_IN_SOFTIRQ)) - return 0; - if (!valid_state(curr, this, new_bit, - LOCK_USED_IN_SOFTIRQ_READ)) - return 0; - /* - * just marked it softirq-unsafe, check that no softirq-safe - * lock in the system ever took it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_SOFTIRQ, "soft")) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it softirq-unsafe, check that no - * softirq-safe-read lock in the system ever took - * it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_SOFTIRQ_READ, "soft-read")) - return 0; -#endif - if (softirq_verbose(this->class)) - ret = 2; - break; - case LOCK_ENABLED_HARDIRQS_READ: - if (!valid_state(curr, this, new_bit, LOCK_USED_IN_HARDIRQ)) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it hardirq-read-unsafe, check that no - * hardirq-safe lock in the system ever took it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_HARDIRQ, "hard")) - return 0; -#endif - if (hardirq_verbose(this->class)) - ret = 2; - break; - case LOCK_ENABLED_SOFTIRQS_READ: - if (!valid_state(curr, this, new_bit, LOCK_USED_IN_SOFTIRQ)) - return 0; -#if STRICT_READ_CHECKS - /* - * just marked it softirq-read-unsafe, check that no - * softirq-safe lock in the system ever took it in the past: - */ - if (!check_usage_backwards(curr, this, - LOCK_USED_IN_SOFTIRQ, "soft")) - return 0; -#endif - if (softirq_verbose(this->class)) - ret = 2; - break; -#endif - case LOCK_USED: - /* - * Add it to the global list of classes: - */ - list_add_tail_rcu(&this->class->lock_entry, &all_lock_classes); - debug_atomic_dec(&nr_unused_locks); - break; - default: - debug_locks_off(); - WARN_ON(1); - return 0; - } - - __raw_spin_unlock(&hash_lock); - - /* - * We must printk outside of the hash_lock: - */ - if (ret == 2) { - printk("\nmarked lock as {%s}:\n", usage_str[new_bit]); - print_lock(this); - print_irqtrace_events(curr); - dump_stack(); - } - - return ret; -} - -#ifdef CONFIG_TRACE_IRQFLAGS -/* - * Mark all held locks with a usage bit: - */ -static int -mark_held_locks(struct task_struct *curr, int hardirq, unsigned long ip) -{ - enum lock_usage_bit usage_bit; - struct held_lock *hlock; - int i; - - for (i = 0; i < curr->lockdep_depth; i++) { - hlock = curr->held_locks + i; - - if (hardirq) { - if (hlock->read) - usage_bit = LOCK_ENABLED_HARDIRQS_READ; - else - usage_bit = LOCK_ENABLED_HARDIRQS; - } else { - if (hlock->read) - usage_bit = LOCK_ENABLED_SOFTIRQS_READ; - else - usage_bit = LOCK_ENABLED_SOFTIRQS; - } - if (!mark_lock(curr, hlock, usage_bit, ip)) - return 0; - } - - return 1; -} - -/* - * Debugging helper: via this flag we know that we are in - * 'early bootup code', and will warn about any invalid irqs-on event: - */ -static int early_boot_irqs_enabled; - -void early_boot_irqs_off(void) -{ - early_boot_irqs_enabled = 0; -} - -void early_boot_irqs_on(void) -{ - early_boot_irqs_enabled = 1; -} - -/* - * Hardirqs will be enabled: - */ -void trace_hardirqs_on(void) -{ - struct task_struct *curr = current; - unsigned long ip; - - if (unlikely(!debug_locks || current->lockdep_recursion)) - return; - - if (DEBUG_LOCKS_WARN_ON(unlikely(!early_boot_irqs_enabled))) - return; - - if (unlikely(curr->hardirqs_enabled)) { - debug_atomic_inc(&redundant_hardirqs_on); - return; - } - /* we'll do an OFF -> ON transition: */ - curr->hardirqs_enabled = 1; - ip = (unsigned long) __builtin_return_address(0); - - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return; - if (DEBUG_LOCKS_WARN_ON(current->hardirq_context)) - return; - /* - * We are going to turn hardirqs on, so set the - * usage bit for all held locks: - */ - if (!mark_held_locks(curr, 1, ip)) - return; - /* - * If we have softirqs enabled, then set the usage - * bit for all held locks. (disabled hardirqs prevented - * this bit from being set before) - */ - if (curr->softirqs_enabled) - if (!mark_held_locks(curr, 0, ip)) - return; - - curr->hardirq_enable_ip = ip; - curr->hardirq_enable_event = ++curr->irq_events; - debug_atomic_inc(&hardirqs_on_events); -} - -EXPORT_SYMBOL(trace_hardirqs_on); - -/* - * Hardirqs were disabled: - */ -void trace_hardirqs_off(void) -{ - struct task_struct *curr = current; - - if (unlikely(!debug_locks || current->lockdep_recursion)) - return; - - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return; - - if (curr->hardirqs_enabled) { - /* - * We have done an ON -> OFF transition: - */ - curr->hardirqs_enabled = 0; - curr->hardirq_disable_ip = _RET_IP_; - curr->hardirq_disable_event = ++curr->irq_events; - debug_atomic_inc(&hardirqs_off_events); - } else - debug_atomic_inc(&redundant_hardirqs_off); -} - -EXPORT_SYMBOL(trace_hardirqs_off); - -/* - * Softirqs will be enabled: - */ -void trace_softirqs_on(unsigned long ip) -{ - struct task_struct *curr = current; - - if (unlikely(!debug_locks)) - return; - - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return; - - if (curr->softirqs_enabled) { - debug_atomic_inc(&redundant_softirqs_on); - return; - } - - /* - * We'll do an OFF -> ON transition: - */ - curr->softirqs_enabled = 1; - curr->softirq_enable_ip = ip; - curr->softirq_enable_event = ++curr->irq_events; - debug_atomic_inc(&softirqs_on_events); - /* - * We are going to turn softirqs on, so set the - * usage bit for all held locks, if hardirqs are - * enabled too: - */ - if (curr->hardirqs_enabled) - mark_held_locks(curr, 0, ip); -} - -/* - * Softirqs were disabled: - */ -void trace_softirqs_off(unsigned long ip) -{ - struct task_struct *curr = current; - - if (unlikely(!debug_locks)) - return; - - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return; - - if (curr->softirqs_enabled) { - /* - * We have done an ON -> OFF transition: - */ - curr->softirqs_enabled = 0; - curr->softirq_disable_ip = ip; - curr->softirq_disable_event = ++curr->irq_events; - debug_atomic_inc(&softirqs_off_events); - DEBUG_LOCKS_WARN_ON(!softirq_count()); - } else - debug_atomic_inc(&redundant_softirqs_off); -} - -#endif - -/* - * Initialize a lock instance's lock-class mapping info: - */ -void lockdep_init_map(struct lockdep_map *lock, const char *name, - struct lock_class_key *key, int subclass) -{ - if (unlikely(!debug_locks)) - return; - - if (DEBUG_LOCKS_WARN_ON(!key)) - return; - if (DEBUG_LOCKS_WARN_ON(!name)) - return; - /* - * Sanity check, the lock-class key must be persistent: - */ - if (!static_obj(key)) { - printk("BUG: key %p not in .data!\n", key); - DEBUG_LOCKS_WARN_ON(1); - return; - } - lock->name = name; - lock->key = key; - lock->class_cache = NULL; - if (subclass) - register_lock_class(lock, subclass, 1); -} - -EXPORT_SYMBOL_GPL(lockdep_init_map); - -/* - * This gets called for every mutex_lock*()/spin_lock*() operation. - * We maintain the dependency maps and validate the locking attempt: - */ -static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, int hardirqs_off, - unsigned long ip) -{ - struct task_struct *curr = current; - struct lock_class *class = NULL; - struct held_lock *hlock; - unsigned int depth, id; - int chain_head = 0; - u64 chain_key; - - if (unlikely(!debug_locks)) - return 0; - - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return 0; - - if (unlikely(subclass >= MAX_LOCKDEP_SUBCLASSES)) { - debug_locks_off(); - printk("BUG: MAX_LOCKDEP_SUBCLASSES too low!\n"); - printk("turning off the locking correctness validator.\n"); - return 0; - } - - if (!subclass) - class = lock->class_cache; - /* - * Not cached yet or subclass? - */ - if (unlikely(!class)) { - class = register_lock_class(lock, subclass, 0); - if (!class) - return 0; - } - debug_atomic_inc((atomic_t *)&class->ops); - if (very_verbose(class)) { - printk("\nacquire class [%p] %s", class->key, class->name); - if (class->name_version > 1) - printk("#%d", class->name_version); - printk("\n"); - dump_stack(); - } - - /* - * Add the lock to the list of currently held locks. - * (we dont increase the depth just yet, up until the - * dependency checks are done) - */ - depth = curr->lockdep_depth; - if (DEBUG_LOCKS_WARN_ON(depth >= MAX_LOCK_DEPTH)) - return 0; - - hlock = curr->held_locks + depth; - - hlock->class = class; - hlock->acquire_ip = ip; - hlock->instance = lock; - hlock->trylock = trylock; - hlock->read = read; - hlock->check = check; - hlock->hardirqs_off = hardirqs_off; - - if (check != 2) - goto out_calc_hash; -#ifdef CONFIG_TRACE_IRQFLAGS - /* - * If non-trylock use in a hardirq or softirq context, then - * mark the lock as used in these contexts: - */ - if (!trylock) { - if (read) { - if (curr->hardirq_context) - if (!mark_lock(curr, hlock, - LOCK_USED_IN_HARDIRQ_READ, ip)) - return 0; - if (curr->softirq_context) - if (!mark_lock(curr, hlock, - LOCK_USED_IN_SOFTIRQ_READ, ip)) - return 0; - } else { - if (curr->hardirq_context) - if (!mark_lock(curr, hlock, LOCK_USED_IN_HARDIRQ, ip)) - return 0; - if (curr->softirq_context) - if (!mark_lock(curr, hlock, LOCK_USED_IN_SOFTIRQ, ip)) - return 0; - } - } - if (!hardirqs_off) { - if (read) { - if (!mark_lock(curr, hlock, - LOCK_ENABLED_HARDIRQS_READ, ip)) - return 0; - if (curr->softirqs_enabled) - if (!mark_lock(curr, hlock, - LOCK_ENABLED_SOFTIRQS_READ, ip)) - return 0; - } else { - if (!mark_lock(curr, hlock, - LOCK_ENABLED_HARDIRQS, ip)) - return 0; - if (curr->softirqs_enabled) - if (!mark_lock(curr, hlock, - LOCK_ENABLED_SOFTIRQS, ip)) - return 0; - } - } -#endif - /* mark it as used: */ - if (!mark_lock(curr, hlock, LOCK_USED, ip)) - return 0; -out_calc_hash: - /* - * Calculate the chain hash: it's the combined has of all the - * lock keys along the dependency chain. We save the hash value - * at every step so that we can get the current hash easily - * after unlock. The chain hash is then used to cache dependency - * results. - * - * The 'key ID' is what is the most compact key value to drive - * the hash, not class->key. - */ - id = class - lock_classes; - if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)) - return 0; - - chain_key = curr->curr_chain_key; - if (!depth) { - if (DEBUG_LOCKS_WARN_ON(chain_key != 0)) - return 0; - chain_head = 1; - } - - hlock->prev_chain_key = chain_key; - -#ifdef CONFIG_TRACE_IRQFLAGS - /* - * Keep track of points where we cross into an interrupt context: - */ - hlock->irq_context = 2*(curr->hardirq_context ? 1 : 0) + - curr->softirq_context; - if (depth) { - struct held_lock *prev_hlock; - - prev_hlock = curr->held_locks + depth-1; - /* - * If we cross into another context, reset the - * hash key (this also prevents the checking and the - * adding of the dependency to 'prev'): - */ - if (prev_hlock->irq_context != hlock->irq_context) { - chain_key = 0; - chain_head = 1; - } - } -#endif - chain_key = iterate_chain_key(chain_key, id); - curr->curr_chain_key = chain_key; - - /* - * Trylock needs to maintain the stack of held locks, but it - * does not add new dependencies, because trylock can be done - * in any order. - * - * We look up the chain_key and do the O(N^2) check and update of - * the dependencies only if this is a new dependency chain. - * (If lookup_chain_cache() returns with 1 it acquires - * hash_lock for us) - */ - if (!trylock && (check == 2) && lookup_chain_cache(chain_key)) { - /* - * Check whether last held lock: - * - * - is irq-safe, if this lock is irq-unsafe - * - is softirq-safe, if this lock is hardirq-unsafe - * - * And check whether the new lock's dependency graph - * could lead back to the previous lock. - * - * any of these scenarios could lead to a deadlock. If - * All validations - */ - int ret = check_deadlock(curr, hlock, lock, read); - - if (!ret) - return 0; - /* - * Mark recursive read, as we jump over it when - * building dependencies (just like we jump over - * trylock entries): - */ - if (ret == 2) - hlock->read = 2; - /* - * Add dependency only if this lock is not the head - * of the chain, and if it's not a secondary read-lock: - */ - if (!chain_head && ret != 2) - if (!check_prevs_add(curr, hlock)) - return 0; - __raw_spin_unlock(&hash_lock); - } - curr->lockdep_depth++; - check_chain_key(curr); - if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { - debug_locks_off(); - printk("BUG: MAX_LOCK_DEPTH too low!\n"); - printk("turning off the locking correctness validator.\n"); - return 0; - } - if (unlikely(curr->lockdep_depth > max_lockdep_depth)) - max_lockdep_depth = curr->lockdep_depth; - - return 1; -} - -static int -print_unlock_inbalance_bug(struct task_struct *curr, struct lockdep_map *lock, - unsigned long ip) -{ - if (!debug_locks_off()) - return 0; - if (debug_locks_silent) - return 0; - - printk("\n=====================================\n"); - printk( "[ BUG: bad unlock balance detected! ]\n"); - printk( "-------------------------------------\n"); - printk("%s/%d is trying to release lock (", - curr->comm, curr->pid); - print_lockdep_cache(lock); - printk(") at:\n"); - print_ip_sym(ip); - printk("but there are no more locks to release!\n"); - printk("\nother info that might help us debug this:\n"); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); - - return 0; -} - -/* - * Common debugging checks for both nested and non-nested unlock: - */ -static int check_unlock(struct task_struct *curr, struct lockdep_map *lock, - unsigned long ip) -{ - if (unlikely(!debug_locks)) - return 0; - if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) - return 0; - - if (curr->lockdep_depth <= 0) - return print_unlock_inbalance_bug(curr, lock, ip); - - return 1; -} - -/* - * Remove the lock to the list of currently held locks in a - * potentially non-nested (out of order) manner. This is a - * relatively rare operation, as all the unlock APIs default - * to nested mode (which uses lock_release()): - */ -static int -lock_release_non_nested(struct task_struct *curr, - struct lockdep_map *lock, unsigned long ip) -{ - struct held_lock *hlock, *prev_hlock; - unsigned int depth; - int i; - - /* - * Check whether the lock exists in the current stack - * of held locks: - */ - depth = curr->lockdep_depth; - if (DEBUG_LOCKS_WARN_ON(!depth)) - return 0; - - prev_hlock = NULL; - for (i = depth-1; i >= 0; i--) { - hlock = curr->held_locks + i; - /* - * We must not cross into another context: - */ - if (prev_hlock && prev_hlock->irq_context != hlock->irq_context) - break; - if (hlock->instance == lock) - goto found_it; - prev_hlock = hlock; - } - return print_unlock_inbalance_bug(curr, lock, ip); - -found_it: - /* - * We have the right lock to unlock, 'hlock' points to it. - * Now we remove it from the stack, and add back the other - * entries (if any), recalculating the hash along the way: - */ - curr->lockdep_depth = i; - curr->curr_chain_key = hlock->prev_chain_key; - - for (i++; i < depth; i++) { - hlock = curr->held_locks + i; - if (!__lock_acquire(hlock->instance, - hlock->class->subclass, hlock->trylock, - hlock->read, hlock->check, hlock->hardirqs_off, - hlock->acquire_ip)) - return 0; - } - - if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth - 1)) - return 0; - return 1; -} - -/* - * Remove the lock to the list of currently held locks - this gets - * called on mutex_unlock()/spin_unlock*() (or on a failed - * mutex_lock_interruptible()). This is done for unlocks that nest - * perfectly. (i.e. the current top of the lock-stack is unlocked) - */ -static int lock_release_nested(struct task_struct *curr, - struct lockdep_map *lock, unsigned long ip) -{ - struct held_lock *hlock; - unsigned int depth; - - /* - * Pop off the top of the lock stack: - */ - depth = curr->lockdep_depth - 1; - hlock = curr->held_locks + depth; - - /* - * Is the unlock non-nested: - */ - if (hlock->instance != lock) - return lock_release_non_nested(curr, lock, ip); - curr->lockdep_depth--; - - if (DEBUG_LOCKS_WARN_ON(!depth && (hlock->prev_chain_key != 0))) - return 0; - - curr->curr_chain_key = hlock->prev_chain_key; - -#ifdef CONFIG_DEBUG_LOCKDEP - hlock->prev_chain_key = 0; - hlock->class = NULL; - hlock->acquire_ip = 0; - hlock->irq_context = 0; -#endif - return 1; -} - -/* - * Remove the lock to the list of currently held locks - this gets - * called on mutex_unlock()/spin_unlock*() (or on a failed - * mutex_lock_interruptible()). This is done for unlocks that nest - * perfectly. (i.e. the current top of the lock-stack is unlocked) - */ -static void -__lock_release(struct lockdep_map *lock, int nested, unsigned long ip) -{ - struct task_struct *curr = current; - - if (!check_unlock(curr, lock, ip)) - return; - - if (nested) { - if (!lock_release_nested(curr, lock, ip)) - return; - } else { - if (!lock_release_non_nested(curr, lock, ip)) - return; - } - - check_chain_key(curr); -} - -/* - * Check whether we follow the irq-flags state precisely: - */ -static void check_flags(unsigned long flags) -{ -#if defined(CONFIG_DEBUG_LOCKDEP) && defined(CONFIG_TRACE_IRQFLAGS) - if (!debug_locks) - return; - - if (irqs_disabled_flags(flags)) - DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled); - else - DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled); - - /* - * We dont accurately track softirq state in e.g. - * hardirq contexts (such as on 4KSTACKS), so only - * check if not in hardirq contexts: - */ - if (!hardirq_count()) { - if (softirq_count()) - DEBUG_LOCKS_WARN_ON(current->softirqs_enabled); - else - DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); - } - - if (!debug_locks) - print_irqtrace_events(current); -#endif -} - -/* - * We are not always called with irqs disabled - do that here, - * and also avoid lockdep recursion: - */ -void lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, unsigned long ip) -{ - unsigned long flags; - - if (unlikely(current->lockdep_recursion)) - return; - - raw_local_irq_save(flags); - check_flags(flags); - - current->lockdep_recursion = 1; - __lock_acquire(lock, subclass, trylock, read, check, - irqs_disabled_flags(flags), ip); - current->lockdep_recursion = 0; - raw_local_irq_restore(flags); -} - -EXPORT_SYMBOL_GPL(lock_acquire); - -void lock_release(struct lockdep_map *lock, int nested, unsigned long ip) -{ - unsigned long flags; - - if (unlikely(current->lockdep_recursion)) - return; - - raw_local_irq_save(flags); - check_flags(flags); - current->lockdep_recursion = 1; - __lock_release(lock, nested, ip); - current->lockdep_recursion = 0; - raw_local_irq_restore(flags); -} - -EXPORT_SYMBOL_GPL(lock_release); - -/* - * Used by the testsuite, sanitize the validator state - * after a simulated failure: - */ - -void lockdep_reset(void) -{ - unsigned long flags; - - raw_local_irq_save(flags); - current->curr_chain_key = 0; - current->lockdep_depth = 0; - current->lockdep_recursion = 0; - memset(current->held_locks, 0, MAX_LOCK_DEPTH*sizeof(struct held_lock)); - nr_hardirq_chains = 0; - nr_softirq_chains = 0; - nr_process_chains = 0; - debug_locks = 1; - raw_local_irq_restore(flags); -} - -static void zap_class(struct lock_class *class) -{ - int i; - - /* - * Remove all dependencies this lock is - * involved in: - */ - for (i = 0; i < nr_list_entries; i++) { - if (list_entries[i].class == class) - list_del_rcu(&list_entries[i].entry); - } - /* - * Unhash the class and remove it from the all_lock_classes list: - */ - list_del_rcu(&class->hash_entry); - list_del_rcu(&class->lock_entry); - -} - -static inline int within(void *addr, void *start, unsigned long size) -{ - return addr >= start && addr < start + size; -} - -void lockdep_free_key_range(void *start, unsigned long size) -{ - struct lock_class *class, *next; - struct list_head *head; - unsigned long flags; - int i; - - raw_local_irq_save(flags); - __raw_spin_lock(&hash_lock); - - /* - * Unhash all classes that were created by this module: - */ - for (i = 0; i < CLASSHASH_SIZE; i++) { - head = classhash_table + i; - if (list_empty(head)) - continue; - list_for_each_entry_safe(class, next, head, hash_entry) - if (within(class->key, start, size)) - zap_class(class); - } - - __raw_spin_unlock(&hash_lock); - raw_local_irq_restore(flags); -} - -void lockdep_reset_lock(struct lockdep_map *lock) -{ - struct lock_class *class, *next; - struct list_head *head; - unsigned long flags; - int i, j; - - raw_local_irq_save(flags); - - /* - * Remove all classes this lock might have: - */ - for (j = 0; j < MAX_LOCKDEP_SUBCLASSES; j++) { - /* - * If the class exists we look it up and zap it: - */ - class = look_up_lock_class(lock, j); - if (class) - zap_class(class); - } - /* - * Debug check: in the end all mapped classes should - * be gone. - */ - __raw_spin_lock(&hash_lock); - for (i = 0; i < CLASSHASH_SIZE; i++) { - head = classhash_table + i; - if (list_empty(head)) - continue; - list_for_each_entry_safe(class, next, head, hash_entry) { - if (unlikely(class == lock->class_cache)) { - __raw_spin_unlock(&hash_lock); - DEBUG_LOCKS_WARN_ON(1); - goto out_restore; - } - } - } - __raw_spin_unlock(&hash_lock); - -out_restore: - raw_local_irq_restore(flags); -} - -void __init lockdep_init(void) -{ - int i; - - /* - * Some architectures have their own start_kernel() - * code which calls lockdep_init(), while we also - * call lockdep_init() from the start_kernel() itself, - * and we want to initialize the hashes only once: - */ - if (lockdep_initialized) - return; - - for (i = 0; i < CLASSHASH_SIZE; i++) - INIT_LIST_HEAD(classhash_table + i); - - for (i = 0; i < CHAINHASH_SIZE; i++) - INIT_LIST_HEAD(chainhash_table + i); - - lockdep_initialized = 1; -} - -void __init lockdep_info(void) -{ - printk("Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar\n"); - - printk("... MAX_LOCKDEP_SUBCLASSES: %lu\n", MAX_LOCKDEP_SUBCLASSES); - printk("... MAX_LOCK_DEPTH: %lu\n", MAX_LOCK_DEPTH); - printk("... MAX_LOCKDEP_KEYS: %lu\n", MAX_LOCKDEP_KEYS); - printk("... CLASSHASH_SIZE: %lu\n", CLASSHASH_SIZE); - printk("... MAX_LOCKDEP_ENTRIES: %lu\n", MAX_LOCKDEP_ENTRIES); - printk("... MAX_LOCKDEP_CHAINS: %lu\n", MAX_LOCKDEP_CHAINS); - printk("... CHAINHASH_SIZE: %lu\n", CHAINHASH_SIZE); - - printk(" memory used by lock dependency info: %lu kB\n", - (sizeof(struct lock_class) * MAX_LOCKDEP_KEYS + - sizeof(struct list_head) * CLASSHASH_SIZE + - sizeof(struct lock_list) * MAX_LOCKDEP_ENTRIES + - sizeof(struct lock_chain) * MAX_LOCKDEP_CHAINS + - sizeof(struct list_head) * CHAINHASH_SIZE) / 1024); - - printk(" per task-struct memory footprint: %lu bytes\n", - sizeof(struct held_lock) * MAX_LOCK_DEPTH); - -#ifdef CONFIG_DEBUG_LOCKDEP - if (lockdep_init_error) - printk("WARNING: lockdep init error! Arch code didnt call lockdep_init() early enough?\n"); -#endif -} - -static inline int in_range(const void *start, const void *addr, const void *end) -{ - return addr >= start && addr <= end; -} - -static void -print_freed_lock_bug(struct task_struct *curr, const void *mem_from, - const void *mem_to, struct held_lock *hlock) -{ - if (!debug_locks_off()) - return; - if (debug_locks_silent) - return; - - printk("\n=========================\n"); - printk( "[ BUG: held lock freed! ]\n"); - printk( "-------------------------\n"); - printk("%s/%d is freeing memory %p-%p, with a lock still held there!\n", - curr->comm, curr->pid, mem_from, mem_to-1); - print_lock(hlock); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); -} - -/* - * Called when kernel memory is freed (or unmapped), or if a lock - * is destroyed or reinitialized - this code checks whether there is - * any held lock in the memory range of to : - */ -void debug_check_no_locks_freed(const void *mem_from, unsigned long mem_len) -{ - const void *mem_to = mem_from + mem_len, *lock_from, *lock_to; - struct task_struct *curr = current; - struct held_lock *hlock; - unsigned long flags; - int i; - - if (unlikely(!debug_locks)) - return; - - local_irq_save(flags); - for (i = 0; i < curr->lockdep_depth; i++) { - hlock = curr->held_locks + i; - - lock_from = (void *)hlock->instance; - lock_to = (void *)(hlock->instance + 1); - - if (!in_range(mem_from, lock_from, mem_to) && - !in_range(mem_from, lock_to, mem_to)) - continue; - - print_freed_lock_bug(curr, mem_from, mem_to, hlock); - break; - } - local_irq_restore(flags); -} -EXPORT_SYMBOL_GPL(debug_check_no_locks_freed); - -static void print_held_locks_bug(struct task_struct *curr) -{ - if (!debug_locks_off()) - return; - if (debug_locks_silent) - return; - - printk("\n=====================================\n"); - printk( "[ BUG: lock held at task exit time! ]\n"); - printk( "-------------------------------------\n"); - printk("%s/%d is exiting with locks still held!\n", - curr->comm, curr->pid); - lockdep_print_held_locks(curr); - - printk("\nstack backtrace:\n"); - dump_stack(); -} - -void debug_check_no_locks_held(struct task_struct *task) -{ - if (unlikely(task->lockdep_depth > 0)) - print_held_locks_bug(task); -} - -void debug_show_all_locks(void) -{ - struct task_struct *g, *p; - int count = 10; - int unlock = 1; - - printk("\nShowing all locks held in the system:\n"); - - /* - * Here we try to get the tasklist_lock as hard as possible, - * if not successful after 2 seconds we ignore it (but keep - * trying). This is to enable a debug printout even if a - * tasklist_lock-holding task deadlocks or crashes. - */ -retry: - if (!read_trylock(&tasklist_lock)) { - if (count == 10) - printk("hm, tasklist_lock locked, retrying... "); - if (count) { - count--; - printk(" #%d", 10-count); - mdelay(200); - goto retry; - } - printk(" ignoring it.\n"); - unlock = 0; - } - if (count != 10) - printk(" locked it.\n"); - - do_each_thread(g, p) { - if (p->lockdep_depth) - lockdep_print_held_locks(p); - if (!unlock) - if (read_trylock(&tasklist_lock)) - unlock = 1; - } while_each_thread(g, p); - - printk("\n"); - printk("=============================================\n\n"); - - if (unlock) - read_unlock(&tasklist_lock); -} - -EXPORT_SYMBOL_GPL(debug_show_all_locks); - -void debug_show_held_locks(struct task_struct *task) -{ - lockdep_print_held_locks(task); -} - -EXPORT_SYMBOL_GPL(debug_show_held_locks); - diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h deleted file mode 100644 index eab043c83..000000000 --- a/kernel/lockdep_internals.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * kernel/lockdep_internals.h - * - * Runtime locking correctness validator - * - * lockdep subsystem internal functions and variables. - */ - -/* - * MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies - * we track. - * - * We use the per-lock dependency maps in two ways: we grow it by adding - * every to-be-taken lock to all currently held lock's own dependency - * table (if it's not there yet), and we check it for lock order - * conflicts and deadlocks. - */ -#define MAX_LOCKDEP_ENTRIES 8192UL - -#define MAX_LOCKDEP_KEYS_BITS 11 -#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) - -#define MAX_LOCKDEP_CHAINS_BITS 13 -#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS) - -/* - * Stack-trace: tightly packed array of stack backtrace - * addresses. Protected by the hash_lock. - */ -#define MAX_STACK_TRACE_ENTRIES 262144UL - -extern struct list_head all_lock_classes; - -extern void -get_usage_chars(struct lock_class *class, char *c1, char *c2, char *c3, char *c4); - -extern const char * __get_key_name(struct lockdep_subclass_key *key, char *str); - -extern unsigned long nr_lock_classes; -extern unsigned long nr_list_entries; -extern unsigned long nr_lock_chains; -extern unsigned long nr_stack_trace_entries; - -extern unsigned int nr_hardirq_chains; -extern unsigned int nr_softirq_chains; -extern unsigned int nr_process_chains; -extern unsigned int max_lockdep_depth; -extern unsigned int max_recursion_depth; - -#ifdef CONFIG_DEBUG_LOCKDEP -/* - * Various lockdep statistics: - */ -extern atomic_t chain_lookup_hits; -extern atomic_t chain_lookup_misses; -extern atomic_t hardirqs_on_events; -extern atomic_t hardirqs_off_events; -extern atomic_t redundant_hardirqs_on; -extern atomic_t redundant_hardirqs_off; -extern atomic_t softirqs_on_events; -extern atomic_t softirqs_off_events; -extern atomic_t redundant_softirqs_on; -extern atomic_t redundant_softirqs_off; -extern atomic_t nr_unused_locks; -extern atomic_t nr_cyclic_checks; -extern atomic_t nr_cyclic_check_recursions; -extern atomic_t nr_find_usage_forwards_checks; -extern atomic_t nr_find_usage_forwards_recursions; -extern atomic_t nr_find_usage_backwards_checks; -extern atomic_t nr_find_usage_backwards_recursions; -# define debug_atomic_inc(ptr) atomic_inc(ptr) -# define debug_atomic_dec(ptr) atomic_dec(ptr) -# define debug_atomic_read(ptr) atomic_read(ptr) -#else -# define debug_atomic_inc(ptr) do { } while (0) -# define debug_atomic_dec(ptr) do { } while (0) -# define debug_atomic_read(ptr) 0 -#endif diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c deleted file mode 100644 index f6e72eaab..000000000 --- a/kernel/lockdep_proc.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * kernel/lockdep_proc.c - * - * Runtime locking correctness validator - * - * Started by Ingo Molnar: - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - * - * Code for /proc/lockdep and /proc/lockdep_stats: - * - */ -#include -#include -#include -#include -#include -#include - -#include "lockdep_internals.h" - -static void *l_next(struct seq_file *m, void *v, loff_t *pos) -{ - struct lock_class *class = v; - - (*pos)++; - - if (class->lock_entry.next != &all_lock_classes) - class = list_entry(class->lock_entry.next, struct lock_class, - lock_entry); - else - class = NULL; - m->private = class; - - return class; -} - -static void *l_start(struct seq_file *m, loff_t *pos) -{ - struct lock_class *class = m->private; - - if (&class->lock_entry == all_lock_classes.next) - seq_printf(m, "all lock classes:\n"); - - return class; -} - -static void l_stop(struct seq_file *m, void *v) -{ -} - -static unsigned long count_forward_deps(struct lock_class *class) -{ - struct lock_list *entry; - unsigned long ret = 1; - - /* - * Recurse this class's dependency list: - */ - list_for_each_entry(entry, &class->locks_after, entry) - ret += count_forward_deps(entry->class); - - return ret; -} - -static unsigned long count_backward_deps(struct lock_class *class) -{ - struct lock_list *entry; - unsigned long ret = 1; - - /* - * Recurse this class's dependency list: - */ - list_for_each_entry(entry, &class->locks_before, entry) - ret += count_backward_deps(entry->class); - - return ret; -} - -static int l_show(struct seq_file *m, void *v) -{ - unsigned long nr_forward_deps, nr_backward_deps; - struct lock_class *class = m->private; - char str[128], c1, c2, c3, c4; - const char *name; - - seq_printf(m, "%p", class->key); -#ifdef CONFIG_DEBUG_LOCKDEP - seq_printf(m, " OPS:%8ld", class->ops); -#endif - nr_forward_deps = count_forward_deps(class); - seq_printf(m, " FD:%5ld", nr_forward_deps); - - nr_backward_deps = count_backward_deps(class); - seq_printf(m, " BD:%5ld", nr_backward_deps); - - get_usage_chars(class, &c1, &c2, &c3, &c4); - seq_printf(m, " %c%c%c%c", c1, c2, c3, c4); - - name = class->name; - if (!name) { - name = __get_key_name(class->key, str); - seq_printf(m, ": %s", name); - } else{ - seq_printf(m, ": %s", name); - if (class->name_version > 1) - seq_printf(m, "#%d", class->name_version); - if (class->subclass) - seq_printf(m, "/%d", class->subclass); - } - seq_puts(m, "\n"); - - return 0; -} - -static struct seq_operations lockdep_ops = { - .start = l_start, - .next = l_next, - .stop = l_stop, - .show = l_show, -}; - -static int lockdep_open(struct inode *inode, struct file *file) -{ - int res = seq_open(file, &lockdep_ops); - if (!res) { - struct seq_file *m = file->private_data; - - if (!list_empty(&all_lock_classes)) - m->private = list_entry(all_lock_classes.next, - struct lock_class, lock_entry); - else - m->private = NULL; - } - return res; -} - -static struct file_operations proc_lockdep_operations = { - .open = lockdep_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - -static void lockdep_stats_debug_show(struct seq_file *m) -{ -#ifdef CONFIG_DEBUG_LOCKDEP - unsigned int hi1 = debug_atomic_read(&hardirqs_on_events), - hi2 = debug_atomic_read(&hardirqs_off_events), - hr1 = debug_atomic_read(&redundant_hardirqs_on), - hr2 = debug_atomic_read(&redundant_hardirqs_off), - si1 = debug_atomic_read(&softirqs_on_events), - si2 = debug_atomic_read(&softirqs_off_events), - sr1 = debug_atomic_read(&redundant_softirqs_on), - sr2 = debug_atomic_read(&redundant_softirqs_off); - - seq_printf(m, " chain lookup misses: %11u\n", - debug_atomic_read(&chain_lookup_misses)); - seq_printf(m, " chain lookup hits: %11u\n", - debug_atomic_read(&chain_lookup_hits)); - seq_printf(m, " cyclic checks: %11u\n", - debug_atomic_read(&nr_cyclic_checks)); - seq_printf(m, " cyclic-check recursions: %11u\n", - debug_atomic_read(&nr_cyclic_check_recursions)); - seq_printf(m, " find-mask forwards checks: %11u\n", - debug_atomic_read(&nr_find_usage_forwards_checks)); - seq_printf(m, " find-mask forwards recursions: %11u\n", - debug_atomic_read(&nr_find_usage_forwards_recursions)); - seq_printf(m, " find-mask backwards checks: %11u\n", - debug_atomic_read(&nr_find_usage_backwards_checks)); - seq_printf(m, " find-mask backwards recursions:%11u\n", - debug_atomic_read(&nr_find_usage_backwards_recursions)); - - seq_printf(m, " hardirq on events: %11u\n", hi1); - seq_printf(m, " hardirq off events: %11u\n", hi2); - seq_printf(m, " redundant hardirq ons: %11u\n", hr1); - seq_printf(m, " redundant hardirq offs: %11u\n", hr2); - seq_printf(m, " softirq on events: %11u\n", si1); - seq_printf(m, " softirq off events: %11u\n", si2); - seq_printf(m, " redundant softirq ons: %11u\n", sr1); - seq_printf(m, " redundant softirq offs: %11u\n", sr2); -#endif -} - -static int lockdep_stats_show(struct seq_file *m, void *v) -{ - struct lock_class *class; - unsigned long nr_unused = 0, nr_uncategorized = 0, - nr_irq_safe = 0, nr_irq_unsafe = 0, - nr_softirq_safe = 0, nr_softirq_unsafe = 0, - nr_hardirq_safe = 0, nr_hardirq_unsafe = 0, - nr_irq_read_safe = 0, nr_irq_read_unsafe = 0, - nr_softirq_read_safe = 0, nr_softirq_read_unsafe = 0, - nr_hardirq_read_safe = 0, nr_hardirq_read_unsafe = 0, - sum_forward_deps = 0, factor = 0; - - list_for_each_entry(class, &all_lock_classes, lock_entry) { - - if (class->usage_mask == 0) - nr_unused++; - if (class->usage_mask == LOCKF_USED) - nr_uncategorized++; - if (class->usage_mask & LOCKF_USED_IN_IRQ) - nr_irq_safe++; - if (class->usage_mask & LOCKF_ENABLED_IRQS) - nr_irq_unsafe++; - if (class->usage_mask & LOCKF_USED_IN_SOFTIRQ) - nr_softirq_safe++; - if (class->usage_mask & LOCKF_ENABLED_SOFTIRQS) - nr_softirq_unsafe++; - if (class->usage_mask & LOCKF_USED_IN_HARDIRQ) - nr_hardirq_safe++; - if (class->usage_mask & LOCKF_ENABLED_HARDIRQS) - nr_hardirq_unsafe++; - if (class->usage_mask & LOCKF_USED_IN_IRQ_READ) - nr_irq_read_safe++; - if (class->usage_mask & LOCKF_ENABLED_IRQS_READ) - nr_irq_read_unsafe++; - if (class->usage_mask & LOCKF_USED_IN_SOFTIRQ_READ) - nr_softirq_read_safe++; - if (class->usage_mask & LOCKF_ENABLED_SOFTIRQS_READ) - nr_softirq_read_unsafe++; - if (class->usage_mask & LOCKF_USED_IN_HARDIRQ_READ) - nr_hardirq_read_safe++; - if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ) - nr_hardirq_read_unsafe++; - - sum_forward_deps += count_forward_deps(class); - } -#ifdef CONFIG_LOCKDEP_DEBUG - DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused); -#endif - seq_printf(m, " lock-classes: %11lu [max: %lu]\n", - nr_lock_classes, MAX_LOCKDEP_KEYS); - seq_printf(m, " direct dependencies: %11lu [max: %lu]\n", - nr_list_entries, MAX_LOCKDEP_ENTRIES); - seq_printf(m, " indirect dependencies: %11lu\n", - sum_forward_deps); - - /* - * Total number of dependencies: - * - * All irq-safe locks may nest inside irq-unsafe locks, - * plus all the other known dependencies: - */ - seq_printf(m, " all direct dependencies: %11lu\n", - nr_irq_unsafe * nr_irq_safe + - nr_hardirq_unsafe * nr_hardirq_safe + - nr_list_entries); - - /* - * Estimated factor between direct and indirect - * dependencies: - */ - if (nr_list_entries) - factor = sum_forward_deps / nr_list_entries; - - seq_printf(m, " dependency chains: %11lu [max: %lu]\n", - nr_lock_chains, MAX_LOCKDEP_CHAINS); - -#ifdef CONFIG_TRACE_IRQFLAGS - seq_printf(m, " in-hardirq chains: %11u\n", - nr_hardirq_chains); - seq_printf(m, " in-softirq chains: %11u\n", - nr_softirq_chains); -#endif - seq_printf(m, " in-process chains: %11u\n", - nr_process_chains); - seq_printf(m, " stack-trace entries: %11lu [max: %lu]\n", - nr_stack_trace_entries, MAX_STACK_TRACE_ENTRIES); - seq_printf(m, " combined max dependencies: %11u\n", - (nr_hardirq_chains + 1) * - (nr_softirq_chains + 1) * - (nr_process_chains + 1) - ); - seq_printf(m, " hardirq-safe locks: %11lu\n", - nr_hardirq_safe); - seq_printf(m, " hardirq-unsafe locks: %11lu\n", - nr_hardirq_unsafe); - seq_printf(m, " softirq-safe locks: %11lu\n", - nr_softirq_safe); - seq_printf(m, " softirq-unsafe locks: %11lu\n", - nr_softirq_unsafe); - seq_printf(m, " irq-safe locks: %11lu\n", - nr_irq_safe); - seq_printf(m, " irq-unsafe locks: %11lu\n", - nr_irq_unsafe); - - seq_printf(m, " hardirq-read-safe locks: %11lu\n", - nr_hardirq_read_safe); - seq_printf(m, " hardirq-read-unsafe locks: %11lu\n", - nr_hardirq_read_unsafe); - seq_printf(m, " softirq-read-safe locks: %11lu\n", - nr_softirq_read_safe); - seq_printf(m, " softirq-read-unsafe locks: %11lu\n", - nr_softirq_read_unsafe); - seq_printf(m, " irq-read-safe locks: %11lu\n", - nr_irq_read_safe); - seq_printf(m, " irq-read-unsafe locks: %11lu\n", - nr_irq_read_unsafe); - - seq_printf(m, " uncategorized locks: %11lu\n", - nr_uncategorized); - seq_printf(m, " unused locks: %11lu\n", - nr_unused); - seq_printf(m, " max locking depth: %11u\n", - max_lockdep_depth); - seq_printf(m, " max recursion depth: %11u\n", - max_recursion_depth); - lockdep_stats_debug_show(m); - seq_printf(m, " debug_locks: %11u\n", - debug_locks); - - return 0; -} - -static int lockdep_stats_open(struct inode *inode, struct file *file) -{ - return single_open(file, lockdep_stats_show, NULL); -} - -static struct file_operations proc_lockdep_stats_operations = { - .open = lockdep_stats_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - -static int __init lockdep_proc_init(void) -{ - struct proc_dir_entry *entry; - - entry = create_proc_entry("lockdep", S_IRUSR, NULL); - if (entry) - entry->proc_fops = &proc_lockdep_operations; - - entry = create_proc_entry("lockdep_stats", S_IRUSR, NULL); - if (entry) - entry->proc_fops = &proc_lockdep_stats_operations; - - return 0; -} - -__initcall(lockdep_proc_init); - diff --git a/kernel/module-verify-sig.c b/kernel/module-verify-sig.c index 23fad538d..2a75a10a8 100644 --- a/kernel/module-verify-sig.c +++ b/kernel/module-verify-sig.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/kernel/module-verify.c b/kernel/module-verify.c index 0c6f8e41f..85a23bcfe 100644 --- a/kernel/module-verify.c +++ b/kernel/module-verify.c @@ -8,6 +8,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/kernel/module.c b/kernel/module.c index f9a59874e..893ec57b3 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1,4 +1,4 @@ -/* +/* Rewritten by Rusty Russell, on the backs of many others... Copyright (C) 2002 Richard Henderson Copyright (C) 2001 Rusty Russell, 2002 Rusty Russell IBM. @@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -39,11 +40,9 @@ #include #include #include -#include #include #include #include -#include #include "module-verify.h" #if 0 @@ -122,17 +121,9 @@ extern const struct kernel_symbol __start___ksymtab_gpl[]; extern const struct kernel_symbol __stop___ksymtab_gpl[]; extern const struct kernel_symbol __start___ksymtab_gpl_future[]; extern const struct kernel_symbol __stop___ksymtab_gpl_future[]; -extern const struct kernel_symbol __start___ksymtab_unused[]; -extern const struct kernel_symbol __stop___ksymtab_unused[]; -extern const struct kernel_symbol __start___ksymtab_unused_gpl[]; -extern const struct kernel_symbol __stop___ksymtab_unused_gpl[]; -extern const struct kernel_symbol __start___ksymtab_gpl_future[]; -extern const struct kernel_symbol __stop___ksymtab_gpl_future[]; extern const unsigned long __start___kcrctab[]; extern const unsigned long __start___kcrctab_gpl[]; extern const unsigned long __start___kcrctab_gpl_future[]; -extern const unsigned long __start___kcrctab_unused[]; -extern const unsigned long __start___kcrctab_unused_gpl[]; #ifndef CONFIG_MODVERSIONS #define symversion(base, idx) NULL @@ -152,17 +143,6 @@ static const struct kernel_symbol *lookup_symbol(const char *name, return NULL; } -static void printk_unused_warning(const char *name) -{ - printk(KERN_WARNING "Symbol %s is marked as UNUSED, " - "however this module is using it.\n", name); - printk(KERN_WARNING "This symbol will go away in the future.\n"); - printk(KERN_WARNING "Please evalute if this is the right api to use, " - "and if it really is, submit a report the linux kernel " - "mailinglist together with submitting your code for " - "inclusion.\n"); -} - /* Find a symbol, return value, crc and module which owns it */ static unsigned long __find_symbol(const char *name, struct module **owner, @@ -205,25 +185,6 @@ static unsigned long __find_symbol(const char *name, return ks->value; } - ks = lookup_symbol(name, __start___ksymtab_unused, - __stop___ksymtab_unused); - if (ks) { - printk_unused_warning(name); - *crc = symversion(__start___kcrctab_unused, - (ks - __start___ksymtab_unused)); - return ks->value; - } - - if (gplok) - ks = lookup_symbol(name, __start___ksymtab_unused_gpl, - __stop___ksymtab_unused_gpl); - if (ks) { - printk_unused_warning(name); - *crc = symversion(__start___kcrctab_unused_gpl, - (ks - __start___ksymtab_unused_gpl)); - return ks->value; - } - /* Now try modules. */ list_for_each_entry(mod, &modules, list) { *owner = mod; @@ -242,23 +203,6 @@ static unsigned long __find_symbol(const char *name, return ks->value; } } - ks = lookup_symbol(name, mod->unused_syms, mod->unused_syms + mod->num_unused_syms); - if (ks) { - printk_unused_warning(name); - *crc = symversion(mod->unused_crcs, (ks - mod->unused_syms)); - return ks->value; - } - - if (gplok) { - ks = lookup_symbol(name, mod->unused_gpl_syms, - mod->unused_gpl_syms + mod->num_unused_gpl_syms); - if (ks) { - printk_unused_warning(name); - *crc = symversion(mod->unused_gpl_crcs, - (ks - mod->unused_gpl_syms)); - return ks->value; - } - } ks = lookup_symbol(name, mod->gpl_future_syms, (mod->gpl_future_syms + mod->num_gpl_future_syms)); @@ -1055,12 +999,6 @@ static int mod_sysfs_setup(struct module *mod, { int err; - if (!module_subsys.kset.subsys) { - printk(KERN_ERR "%s: module_subsys not initialized\n", - mod->name); - err = -EINVAL; - goto out; - } memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name); if (err) @@ -1114,8 +1052,6 @@ static void free_module(struct module *mod) remove_sect_attrs(mod); mod_kobject_remove(mod); - unwind_remove_table(mod->unwind_info, 0); - /* Arch-specific cleanup. */ module_arch_cleanup(mod); @@ -1128,9 +1064,6 @@ static void free_module(struct module *mod) if (mod->percpu) percpu_modfree(mod->percpu); - /* Free lock-classes: */ - lockdep_free_key_range(mod->module_core, mod->core_size); - /* Finally, free the core (containing the module structure) */ module_free(mod, mod->module_core); } @@ -1316,6 +1249,16 @@ static void layout_sections(struct module *mod, } } +static inline int license_is_gpl_compatible(const char *license) +{ + return (strcmp(license, "GPL") == 0 + || strcmp(license, "GPL v2") == 0 + || strcmp(license, "GPL and additional rights") == 0 + || strcmp(license, "Dual BSD/GPL") == 0 + || strcmp(license, "Dual MIT/GPL") == 0 + || strcmp(license, "Dual MPL/GPL") == 0); +} + static void set_license(struct module *mod, const char *license) { if (!license) @@ -1384,7 +1327,7 @@ int is_exported(const char *name, const struct module *mod) if (!mod && lookup_symbol(name, __start___ksymtab, __stop___ksymtab)) return 1; else - if (mod && lookup_symbol(name, mod->syms, mod->syms + mod->num_syms)) + if (lookup_symbol(name, mod->syms, mod->syms + mod->num_syms)) return 1; else return 0; @@ -1467,27 +1410,10 @@ static struct module *load_module(void __user *umod, Elf_Ehdr *hdr; Elf_Shdr *sechdrs; char *secstrings, *args, *modmagic, *strtab = NULL; - unsigned int i; - unsigned int symindex = 0; - unsigned int strindex = 0; - unsigned int setupindex; - unsigned int exindex; - unsigned int exportindex; - unsigned int modindex; - unsigned int obsparmindex; - unsigned int infoindex; - unsigned int gplindex; - unsigned int crcindex; - unsigned int gplcrcindex; - unsigned int versindex; - unsigned int pcpuindex; - unsigned int gplfutureindex; - unsigned int gplfuturecrcindex; - unsigned int unwindex = 0; - unsigned int unusedindex; - unsigned int unusedcrcindex; - unsigned int unusedgplindex; - unsigned int unusedgplcrcindex; + unsigned int i, symindex = 0, strindex = 0, setupindex, exindex, + exportindex, modindex, obsparmindex, infoindex, gplindex, + crcindex, gplcrcindex, versindex, pcpuindex, gplfutureindex, + gplfuturecrcindex; struct module *mod; long err = 0; void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */ @@ -1575,22 +1501,15 @@ static struct module *load_module(void __user *umod, exportindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab"); gplindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_gpl"); gplfutureindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_gpl_future"); - unusedindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_unused"); - unusedgplindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_unused_gpl"); crcindex = find_sec(hdr, sechdrs, secstrings, "__kcrctab"); gplcrcindex = find_sec(hdr, sechdrs, secstrings, "__kcrctab_gpl"); gplfuturecrcindex = find_sec(hdr, sechdrs, secstrings, "__kcrctab_gpl_future"); - unusedcrcindex = find_sec(hdr, sechdrs, secstrings, "__kcrctab_unused"); - unusedgplcrcindex = find_sec(hdr, sechdrs, secstrings, "__kcrctab_unused_gpl"); setupindex = find_sec(hdr, sechdrs, secstrings, "__param"); exindex = find_sec(hdr, sechdrs, secstrings, "__ex_table"); obsparmindex = find_sec(hdr, sechdrs, secstrings, "__obsparm"); versindex = find_sec(hdr, sechdrs, secstrings, "__versions"); infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo"); pcpuindex = find_pcpusec(hdr, sechdrs, secstrings); -#ifdef ARCH_UNWIND_SECTION_NAME - unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME); -#endif /* Don't keep modinfo section */ sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC; @@ -1599,8 +1518,6 @@ static struct module *load_module(void __user *umod, sechdrs[symindex].sh_flags |= SHF_ALLOC; sechdrs[strindex].sh_flags |= SHF_ALLOC; #endif - if (unwindex) - sechdrs[unwindex].sh_flags |= SHF_ALLOC; /* Check module struct version now, before we try to use module. */ if (!check_modstruct_version(sechdrs, versindex, mod)) { @@ -1730,27 +1647,14 @@ static struct module *load_module(void __user *umod, mod->gpl_crcs = (void *)sechdrs[gplcrcindex].sh_addr; mod->num_gpl_future_syms = sechdrs[gplfutureindex].sh_size / sizeof(*mod->gpl_future_syms); - mod->num_unused_syms = sechdrs[unusedindex].sh_size / - sizeof(*mod->unused_syms); - mod->num_unused_gpl_syms = sechdrs[unusedgplindex].sh_size / - sizeof(*mod->unused_gpl_syms); mod->gpl_future_syms = (void *)sechdrs[gplfutureindex].sh_addr; if (gplfuturecrcindex) mod->gpl_future_crcs = (void *)sechdrs[gplfuturecrcindex].sh_addr; - mod->unused_syms = (void *)sechdrs[unusedindex].sh_addr; - if (unusedcrcindex) - mod->unused_crcs = (void *)sechdrs[unusedcrcindex].sh_addr; - mod->unused_gpl_syms = (void *)sechdrs[unusedgplindex].sh_addr; - if (unusedgplcrcindex) - mod->unused_crcs = (void *)sechdrs[unusedgplcrcindex].sh_addr; - #ifdef CONFIG_MODVERSIONS if ((mod->num_syms && !crcindex) || (mod->num_gpl_syms && !gplcrcindex) || - (mod->num_gpl_future_syms && !gplfuturecrcindex) || - (mod->num_unused_syms && !unusedcrcindex) || - (mod->num_unused_gpl_syms && !unusedgplcrcindex)) { + (mod->num_gpl_future_syms && !gplfuturecrcindex)) { printk(KERN_WARNING "%s: No versions for exported symbols." " Tainting kernel.\n", mod->name); add_taint(TAINT_FORCED_MODULE); @@ -1842,11 +1746,6 @@ static struct module *load_module(void __user *umod, goto arch_cleanup; add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); - /* Size of section 0 is 0, so this works well if no unwind info. */ - mod->unwind_info = unwind_add_table(mod, - (void *)sechdrs[unwindex].sh_addr, - sechdrs[unwindex].sh_size); - /* Get rid of temporary copy */ vfree(hdr); @@ -1945,7 +1844,6 @@ sys_init_module(void __user *umod, mod->state = MODULE_STATE_LIVE; /* Drop initial reference. */ module_put(mod); - unwind_remove_table(mod->unwind_info, 1); module_free(mod, mod->module_init); mod->module_init = NULL; mod->init_size = 0; @@ -2033,8 +1931,10 @@ const char *module_address_lookup(unsigned long addr, return NULL; } -struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, - char *type, char *name, size_t namelen) +struct module *module_get_kallsym(unsigned int symnum, + unsigned long *value, + char *type, + char namebuf[128]) { struct module *mod; @@ -2043,8 +1943,9 @@ struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, if (symnum < mod->num_symtab) { *value = mod->symtab[symnum].st_value; *type = mod->symtab[symnum].st_info; - strlcpy(name, mod->strtab + mod->symtab[symnum].st_name, - namelen); + strncpy(namebuf, + mod->strtab + mod->symtab[symnum].st_name, + 127); mutex_unlock(&module_mutex); return mod; } @@ -2173,29 +2074,6 @@ const struct exception_table_entry *search_module_extables(unsigned long addr) return e; } -/* - * Is this a valid module address? - */ -int is_module_address(unsigned long addr) -{ - unsigned long flags; - struct module *mod; - - spin_lock_irqsave(&modlist_lock, flags); - - list_for_each_entry(mod, &modules, list) { - if (within(addr, mod->module_core, mod->core_size)) { - spin_unlock_irqrestore(&modlist_lock, flags); - return 1; - } - } - - spin_unlock_irqrestore(&modlist_lock, flags); - - return 0; -} - - /* Is this a valid kernel address? We don't grab the lock: we are oopsing. */ struct module *__module_text_address(unsigned long addr) { diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c index 18651641a..f4913c376 100644 --- a/kernel/mutex-debug.c +++ b/kernel/mutex-debug.c @@ -16,48 +16,395 @@ #include #include #include -#include #include #include #include -#include #include "mutex-debug.h" +/* + * We need a global lock when we walk through the multi-process + * lock tree. Only used in the deadlock-debugging case. + */ +DEFINE_SPINLOCK(debug_mutex_lock); + +/* + * All locks held by all tasks, in a single global list: + */ +LIST_HEAD(debug_mutex_held_locks); + +/* + * In the debug case we carry the caller's instruction pointer into + * other functions, but we dont want the function argument overhead + * in the nondebug case - hence these macros: + */ +#define __IP_DECL__ , unsigned long ip +#define __IP__ , ip +#define __RET_IP__ , (unsigned long)__builtin_return_address(0) + +/* + * "mutex debugging enabled" flag. We turn it off when we detect + * the first problem because we dont want to recurse back + * into the tracing code when doing error printk or + * executing a BUG(): + */ +int debug_mutex_on = 1; + +static void printk_task(struct task_struct *p) +{ + if (p) + printk("%16s:%5d [%p, %3d]", p->comm, p->pid, p, p->prio); + else + printk(""); +} + +static void printk_ti(struct thread_info *ti) +{ + if (ti) + printk_task(ti->task); + else + printk(""); +} + +static void printk_task_short(struct task_struct *p) +{ + if (p) + printk("%s/%d [%p, %3d]", p->comm, p->pid, p, p->prio); + else + printk(""); +} + +static void printk_lock(struct mutex *lock, int print_owner) +{ + printk(" [%p] {%s}\n", lock, lock->name); + + if (print_owner && lock->owner) { + printk(".. held by: "); + printk_ti(lock->owner); + printk("\n"); + } + if (lock->owner) { + printk("... acquired at: "); + print_symbol("%s\n", lock->acquire_ip); + } +} + +/* + * printk locks held by a task: + */ +static void show_task_locks(struct task_struct *p) +{ + switch (p->state) { + case TASK_RUNNING: printk("R"); break; + case TASK_INTERRUPTIBLE: printk("S"); break; + case TASK_UNINTERRUPTIBLE: printk("D"); break; + case TASK_STOPPED: printk("T"); break; + case EXIT_ZOMBIE: printk("Z"); break; + case EXIT_DEAD: printk("X"); break; + default: printk("?"); break; + } + printk_task(p); + if (p->blocked_on) { + struct mutex *lock = p->blocked_on->lock; + + printk(" blocked on mutex:"); + printk_lock(lock, 1); + } else + printk(" (not blocked on mutex)\n"); +} + +/* + * printk all locks held in the system (if filter == NULL), + * or all locks belonging to a single task (if filter != NULL): + */ +void show_held_locks(struct task_struct *filter) +{ + struct list_head *curr, *cursor = NULL; + struct mutex *lock; + struct thread_info *t; + unsigned long flags; + int count = 0; + + if (filter) { + printk("------------------------------\n"); + printk("| showing all locks held by: | ("); + printk_task_short(filter); + printk("):\n"); + printk("------------------------------\n"); + } else { + printk("---------------------------\n"); + printk("| showing all locks held: |\n"); + printk("---------------------------\n"); + } + + /* + * Play safe and acquire the global trace lock. We + * cannot printk with that lock held so we iterate + * very carefully: + */ +next: + debug_spin_lock_save(&debug_mutex_lock, flags); + list_for_each(curr, &debug_mutex_held_locks) { + if (cursor && curr != cursor) + continue; + lock = list_entry(curr, struct mutex, held_list); + t = lock->owner; + if (filter && (t != filter->thread_info)) + continue; + count++; + cursor = curr->next; + debug_spin_lock_restore(&debug_mutex_lock, flags); + + printk("\n#%03d: ", count); + printk_lock(lock, filter ? 0 : 1); + goto next; + } + debug_spin_lock_restore(&debug_mutex_lock, flags); + printk("\n"); +} + +void mutex_debug_show_all_locks(void) +{ + struct task_struct *g, *p; + int count = 10; + int unlock = 1; + + printk("\nShowing all blocking locks in the system:\n"); + + /* + * Here we try to get the tasklist_lock as hard as possible, + * if not successful after 2 seconds we ignore it (but keep + * trying). This is to enable a debug printout even if a + * tasklist_lock-holding task deadlocks or crashes. + */ +retry: + if (!read_trylock(&tasklist_lock)) { + if (count == 10) + printk("hm, tasklist_lock locked, retrying... "); + if (count) { + count--; + printk(" #%d", 10-count); + mdelay(200); + goto retry; + } + printk(" ignoring it.\n"); + unlock = 0; + } + if (count != 10) + printk(" locked it.\n"); + + do_each_thread(g, p) { + show_task_locks(p); + if (!unlock) + if (read_trylock(&tasklist_lock)) + unlock = 1; + } while_each_thread(g, p); + + printk("\n"); + show_held_locks(NULL); + printk("=============================================\n\n"); + + if (unlock) + read_unlock(&tasklist_lock); +} + +static void report_deadlock(struct task_struct *task, struct mutex *lock, + struct mutex *lockblk, unsigned long ip) +{ + printk("\n%s/%d is trying to acquire this lock:\n", + current->comm, current->pid); + printk_lock(lock, 1); + printk("... trying at: "); + print_symbol("%s\n", ip); + show_held_locks(current); + + if (lockblk) { + printk("but %s/%d is deadlocking current task %s/%d!\n\n", + task->comm, task->pid, current->comm, current->pid); + printk("\n%s/%d is blocked on this lock:\n", + task->comm, task->pid); + printk_lock(lockblk, 1); + + show_held_locks(task); + + printk("\n%s/%d's [blocked] stackdump:\n\n", + task->comm, task->pid); + show_stack(task, NULL); + } + + printk("\n%s/%d's [current] stackdump:\n\n", + current->comm, current->pid); + dump_stack(); + mutex_debug_show_all_locks(); + printk("[ turning off deadlock detection. Please report this. ]\n\n"); + local_irq_disable(); +} + +/* + * Recursively check for mutex deadlocks: + */ +static int check_deadlock(struct mutex *lock, int depth, + struct thread_info *ti, unsigned long ip) +{ + struct mutex *lockblk; + struct task_struct *task; + + if (!debug_mutex_on) + return 0; + + ti = lock->owner; + if (!ti) + return 0; + + task = ti->task; + lockblk = NULL; + if (task->blocked_on) + lockblk = task->blocked_on->lock; + + /* Self-deadlock: */ + if (current == task) { + DEBUG_OFF(); + if (depth) + return 1; + printk("\n==========================================\n"); + printk( "[ BUG: lock recursion deadlock detected! |\n"); + printk( "------------------------------------------\n"); + report_deadlock(task, lock, NULL, ip); + return 0; + } + + /* Ugh, something corrupted the lock data structure? */ + if (depth > 20) { + DEBUG_OFF(); + printk("\n===========================================\n"); + printk( "[ BUG: infinite lock dependency detected!? |\n"); + printk( "-------------------------------------------\n"); + report_deadlock(task, lock, lockblk, ip); + return 0; + } + + /* Recursively check for dependencies: */ + if (lockblk && check_deadlock(lockblk, depth+1, ti, ip)) { + printk("\n============================================\n"); + printk( "[ BUG: circular locking deadlock detected! ]\n"); + printk( "--------------------------------------------\n"); + report_deadlock(task, lock, lockblk, ip); + return 0; + } + return 0; +} + +/* + * Called when a task exits, this function checks whether the + * task is holding any locks, and reports the first one if so: + */ +void mutex_debug_check_no_locks_held(struct task_struct *task) +{ + struct list_head *curr, *next; + struct thread_info *t; + unsigned long flags; + struct mutex *lock; + + if (!debug_mutex_on) + return; + + debug_spin_lock_save(&debug_mutex_lock, flags); + list_for_each_safe(curr, next, &debug_mutex_held_locks) { + lock = list_entry(curr, struct mutex, held_list); + t = lock->owner; + if (t != task->thread_info) + continue; + list_del_init(curr); + DEBUG_OFF(); + debug_spin_lock_restore(&debug_mutex_lock, flags); + + printk("BUG: %s/%d, lock held at task exit time!\n", + task->comm, task->pid); + printk_lock(lock, 1); + if (lock->owner != task->thread_info) + printk("exiting task is not even the owner??\n"); + return; + } + debug_spin_lock_restore(&debug_mutex_lock, flags); +} + +/* + * Called when kernel memory is freed (or unmapped), or if a mutex + * is destroyed or reinitialized - this code checks whether there is + * any held lock in the memory range of to : + */ +void mutex_debug_check_no_locks_freed(const void *from, unsigned long len) +{ + struct list_head *curr, *next; + const void *to = from + len; + unsigned long flags; + struct mutex *lock; + void *lock_addr; + + if (!debug_mutex_on) + return; + + debug_spin_lock_save(&debug_mutex_lock, flags); + list_for_each_safe(curr, next, &debug_mutex_held_locks) { + lock = list_entry(curr, struct mutex, held_list); + lock_addr = lock; + if (lock_addr < from || lock_addr >= to) + continue; + list_del_init(curr); + DEBUG_OFF(); + debug_spin_lock_restore(&debug_mutex_lock, flags); + + printk("BUG: %s/%d, active lock [%p(%p-%p)] freed!\n", + current->comm, current->pid, lock, from, to); + dump_stack(); + printk_lock(lock, 1); + if (lock->owner != current_thread_info()) + printk("freeing task is not even the owner??\n"); + return; + } + debug_spin_lock_restore(&debug_mutex_lock, flags); +} + /* * Must be called with lock->wait_lock held. */ -void debug_mutex_set_owner(struct mutex *lock, struct thread_info *new_owner) +void debug_mutex_set_owner(struct mutex *lock, + struct thread_info *new_owner __IP_DECL__) { lock->owner = new_owner; + DEBUG_WARN_ON(!list_empty(&lock->held_list)); + if (debug_mutex_on) { + list_add_tail(&lock->held_list, &debug_mutex_held_locks); + lock->acquire_ip = ip; + } } -void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) +void debug_mutex_init_waiter(struct mutex_waiter *waiter) { - memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); + memset(waiter, 0x11, sizeof(*waiter)); waiter->magic = waiter; INIT_LIST_HEAD(&waiter->list); } void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) { - SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock)); - DEBUG_LOCKS_WARN_ON(list_empty(&lock->wait_list)); - DEBUG_LOCKS_WARN_ON(waiter->magic != waiter); - DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); + SMP_DEBUG_WARN_ON(!spin_is_locked(&lock->wait_lock)); + DEBUG_WARN_ON(list_empty(&lock->wait_list)); + DEBUG_WARN_ON(waiter->magic != waiter); + DEBUG_WARN_ON(list_empty(&waiter->list)); } void debug_mutex_free_waiter(struct mutex_waiter *waiter) { - DEBUG_LOCKS_WARN_ON(!list_empty(&waiter->list)); - memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); + DEBUG_WARN_ON(!list_empty(&waiter->list)); + memset(waiter, 0x22, sizeof(*waiter)); } void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, - struct thread_info *ti) + struct thread_info *ti __IP_DECL__) { - SMP_DEBUG_LOCKS_WARN_ON(!spin_is_locked(&lock->wait_lock)); - + SMP_DEBUG_WARN_ON(!spin_is_locked(&lock->wait_lock)); + check_deadlock(lock, 0, ti, ip); /* Mark the current thread as blocked on the lock: */ ti->task->blocked_on = waiter; waiter->lock = lock; @@ -66,9 +413,9 @@ void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, struct thread_info *ti) { - DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); - DEBUG_LOCKS_WARN_ON(waiter->task != ti->task); - DEBUG_LOCKS_WARN_ON(ti->task->blocked_on != waiter); + DEBUG_WARN_ON(list_empty(&waiter->list)); + DEBUG_WARN_ON(waiter->task != ti->task); + DEBUG_WARN_ON(ti->task->blocked_on != waiter); ti->task->blocked_on = NULL; list_del_init(&waiter->list); @@ -77,23 +424,24 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, void debug_mutex_unlock(struct mutex *lock) { - DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info()); - DEBUG_LOCKS_WARN_ON(lock->magic != lock); - DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); - DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info()); + DEBUG_WARN_ON(lock->magic != lock); + DEBUG_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); + DEBUG_WARN_ON(lock->owner != current_thread_info()); + if (debug_mutex_on) { + DEBUG_WARN_ON(list_empty(&lock->held_list)); + list_del_init(&lock->held_list); + } } -void debug_mutex_init(struct mutex *lock, const char *name, - struct lock_class_key *key) +void debug_mutex_init(struct mutex *lock, const char *name) { -#ifdef CONFIG_DEBUG_LOCK_ALLOC /* * Make sure we are not reinitializing a held lock: */ - debug_check_no_locks_freed((void *)lock, sizeof(*lock)); - lockdep_init_map(&lock->dep_map, name, key, 0); -#endif + mutex_debug_check_no_locks_freed((void *)lock, sizeof(*lock)); lock->owner = NULL; + INIT_LIST_HEAD(&lock->held_list); + lock->name = name; lock->magic = lock; } @@ -107,7 +455,7 @@ void debug_mutex_init(struct mutex *lock, const char *name, */ void fastcall mutex_destroy(struct mutex *lock) { - DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)); + DEBUG_WARN_ON(mutex_is_locked(lock)); lock->magic = NULL; } diff --git a/kernel/mutex-debug.h b/kernel/mutex-debug.h index babfbdfc5..fd384050a 100644 --- a/kernel/mutex-debug.h +++ b/kernel/mutex-debug.h @@ -10,44 +10,125 @@ * More details are in kernel/mutex-debug.c. */ +extern spinlock_t debug_mutex_lock; +extern struct list_head debug_mutex_held_locks; +extern int debug_mutex_on; + +/* + * In the debug case we carry the caller's instruction pointer into + * other functions, but we dont want the function argument overhead + * in the nondebug case - hence these macros: + */ +#define __IP_DECL__ , unsigned long ip +#define __IP__ , ip +#define __RET_IP__ , (unsigned long)__builtin_return_address(0) + /* * This must be called with lock->wait_lock held. */ -extern void -debug_mutex_set_owner(struct mutex *lock, struct thread_info *new_owner); +extern void debug_mutex_set_owner(struct mutex *lock, + struct thread_info *new_owner __IP_DECL__); static inline void debug_mutex_clear_owner(struct mutex *lock) { lock->owner = NULL; } -extern void debug_mutex_lock_common(struct mutex *lock, - struct mutex_waiter *waiter); +extern void debug_mutex_init_waiter(struct mutex_waiter *waiter); extern void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter); extern void debug_mutex_free_waiter(struct mutex_waiter *waiter); extern void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, - struct thread_info *ti); + struct thread_info *ti __IP_DECL__); extern void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, struct thread_info *ti); extern void debug_mutex_unlock(struct mutex *lock); -extern void debug_mutex_init(struct mutex *lock, const char *name, - struct lock_class_key *key); +extern void debug_mutex_init(struct mutex *lock, const char *name); -#define spin_lock_mutex(lock, flags) \ +#define debug_spin_lock(lock) \ + do { \ + local_irq_disable(); \ + if (debug_mutex_on) \ + spin_lock(lock); \ + } while (0) + +#define debug_spin_unlock(lock) \ + do { \ + if (debug_mutex_on) \ + spin_unlock(lock); \ + local_irq_enable(); \ + preempt_check_resched(); \ + } while (0) + +#define debug_spin_lock_save(lock, flags) \ do { \ - struct mutex *l = container_of(lock, struct mutex, wait_lock); \ - \ - DEBUG_LOCKS_WARN_ON(in_interrupt()); \ local_irq_save(flags); \ - __raw_spin_lock(&(lock)->raw_lock); \ - DEBUG_LOCKS_WARN_ON(l->magic != l); \ + if (debug_mutex_on) \ + spin_lock(lock); \ } while (0) -#define spin_unlock_mutex(lock, flags) \ +#define debug_spin_lock_restore(lock, flags) \ do { \ - __raw_spin_unlock(&(lock)->raw_lock); \ + if (debug_mutex_on) \ + spin_unlock(lock); \ local_irq_restore(flags); \ preempt_check_resched(); \ } while (0) + +#define spin_lock_mutex(lock) \ + do { \ + struct mutex *l = container_of(lock, struct mutex, wait_lock); \ + \ + DEBUG_WARN_ON(in_interrupt()); \ + debug_spin_lock(&debug_mutex_lock); \ + spin_lock(lock); \ + DEBUG_WARN_ON(l->magic != l); \ + } while (0) + +#define spin_unlock_mutex(lock) \ + do { \ + spin_unlock(lock); \ + debug_spin_unlock(&debug_mutex_lock); \ + } while (0) + +#define DEBUG_OFF() \ +do { \ + if (debug_mutex_on) { \ + debug_mutex_on = 0; \ + console_verbose(); \ + if (spin_is_locked(&debug_mutex_lock)) \ + spin_unlock(&debug_mutex_lock); \ + } \ +} while (0) + +#define DEBUG_BUG() \ +do { \ + if (debug_mutex_on) { \ + DEBUG_OFF(); \ + BUG(); \ + } \ +} while (0) + +#define DEBUG_WARN_ON(c) \ +do { \ + if (unlikely(c && debug_mutex_on)) { \ + DEBUG_OFF(); \ + WARN_ON(1); \ + } \ +} while (0) + +# define DEBUG_BUG_ON(c) \ +do { \ + if (unlikely(c)) \ + DEBUG_BUG(); \ +} while (0) + +#ifdef CONFIG_SMP +# define SMP_DEBUG_WARN_ON(c) DEBUG_WARN_ON(c) +# define SMP_DEBUG_BUG_ON(c) DEBUG_BUG_ON(c) +#else +# define SMP_DEBUG_WARN_ON(c) do { } while (0) +# define SMP_DEBUG_BUG_ON(c) do { } while (0) +#endif + diff --git a/kernel/mutex.c b/kernel/mutex.c index 8c71cf72a..5449b210d 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c @@ -17,7 +17,6 @@ #include #include #include -#include /* * In the DEBUG case we are using the "NULL fastpath" for mutexes, @@ -39,14 +38,13 @@ * * It is not allowed to initialize an already locked mutex. */ -void -__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) +void fastcall __mutex_init(struct mutex *lock, const char *name) { atomic_set(&lock->count, 1); spin_lock_init(&lock->wait_lock); INIT_LIST_HEAD(&lock->wait_list); - debug_mutex_init(lock, name, key); + debug_mutex_init(lock, name); } EXPORT_SYMBOL(__mutex_init); @@ -58,7 +56,7 @@ EXPORT_SYMBOL(__mutex_init); * branch is predicted by the CPU as default-untaken. */ static void fastcall noinline __sched -__mutex_lock_slowpath(atomic_t *lock_count); +__mutex_lock_slowpath(atomic_t *lock_count __IP_DECL__); /*** * mutex_lock - acquire the mutex @@ -81,7 +79,7 @@ __mutex_lock_slowpath(atomic_t *lock_count); * * This function is similar to (but not equivalent to) down(). */ -void inline fastcall __sched mutex_lock(struct mutex *lock) +void fastcall __sched mutex_lock(struct mutex *lock) { might_sleep(); /* @@ -94,7 +92,7 @@ void inline fastcall __sched mutex_lock(struct mutex *lock) EXPORT_SYMBOL(mutex_lock); static void fastcall noinline __sched -__mutex_unlock_slowpath(atomic_t *lock_count); +__mutex_unlock_slowpath(atomic_t *lock_count __IP_DECL__); /*** * mutex_unlock - release the mutex @@ -122,18 +120,17 @@ EXPORT_SYMBOL(mutex_unlock); * Lock a mutex (possibly interruptible), slowpath: */ static inline int __sched -__mutex_lock_common(struct mutex *lock, long state, unsigned int subclass) +__mutex_lock_common(struct mutex *lock, long state __IP_DECL__) { struct task_struct *task = current; struct mutex_waiter waiter; unsigned int old_val; - unsigned long flags; - spin_lock_mutex(&lock->wait_lock, flags); + debug_mutex_init_waiter(&waiter); - debug_mutex_lock_common(lock, &waiter); - mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_); - debug_mutex_add_waiter(lock, &waiter, task->thread_info); + spin_lock_mutex(&lock->wait_lock); + + debug_mutex_add_waiter(lock, &waiter, task->thread_info, ip); /* add waiting tasks to the end of the waitqueue (FIFO): */ list_add_tail(&waiter.list, &lock->wait_list); @@ -160,8 +157,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass) if (unlikely(state == TASK_INTERRUPTIBLE && signal_pending(task))) { mutex_remove_waiter(lock, &waiter, task->thread_info); - mutex_release(&lock->dep_map, 1, _RET_IP_); - spin_unlock_mutex(&lock->wait_lock, flags); + spin_unlock_mutex(&lock->wait_lock); debug_mutex_free_waiter(&waiter); return -EINTR; @@ -169,57 +165,48 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass) __set_task_state(task, state); /* didnt get the lock, go to sleep: */ - spin_unlock_mutex(&lock->wait_lock, flags); + spin_unlock_mutex(&lock->wait_lock); schedule(); - spin_lock_mutex(&lock->wait_lock, flags); + spin_lock_mutex(&lock->wait_lock); } /* got the lock - rejoice! */ mutex_remove_waiter(lock, &waiter, task->thread_info); - debug_mutex_set_owner(lock, task->thread_info); + debug_mutex_set_owner(lock, task->thread_info __IP__); /* set it to 0 if there are no waiters left: */ if (likely(list_empty(&lock->wait_list))) atomic_set(&lock->count, 0); - spin_unlock_mutex(&lock->wait_lock, flags); + spin_unlock_mutex(&lock->wait_lock); debug_mutex_free_waiter(&waiter); + DEBUG_WARN_ON(list_empty(&lock->held_list)); + DEBUG_WARN_ON(lock->owner != task->thread_info); + return 0; } static void fastcall noinline __sched -__mutex_lock_slowpath(atomic_t *lock_count) +__mutex_lock_slowpath(atomic_t *lock_count __IP_DECL__) { struct mutex *lock = container_of(lock_count, struct mutex, count); - __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, 0); -} - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -void __sched -mutex_lock_nested(struct mutex *lock, unsigned int subclass) -{ - might_sleep(); - __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, subclass); + __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE __IP__); } -EXPORT_SYMBOL_GPL(mutex_lock_nested); -#endif - /* * Release the lock, slowpath: */ -static fastcall inline void -__mutex_unlock_common_slowpath(atomic_t *lock_count, int nested) +static fastcall noinline void +__mutex_unlock_slowpath(atomic_t *lock_count __IP_DECL__) { struct mutex *lock = container_of(lock_count, struct mutex, count); - unsigned long flags; - spin_lock_mutex(&lock->wait_lock, flags); - mutex_release(&lock->dep_map, nested, _RET_IP_); - debug_mutex_unlock(lock); + DEBUG_WARN_ON(lock->owner != current_thread_info()); + + spin_lock_mutex(&lock->wait_lock); /* * some architectures leave the lock unlocked in the fastpath failure @@ -229,6 +216,8 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested) if (__mutex_slowpath_needs_to_unlock()) atomic_set(&lock->count, 1); + debug_mutex_unlock(lock); + if (!list_empty(&lock->wait_list)) { /* get the first entry from the wait-list: */ struct mutex_waiter *waiter = @@ -242,16 +231,7 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested) debug_mutex_clear_owner(lock); - spin_unlock_mutex(&lock->wait_lock, flags); -} - -/* - * Release the lock, slowpath: - */ -static fastcall noinline void -__mutex_unlock_slowpath(atomic_t *lock_count) -{ - __mutex_unlock_common_slowpath(lock_count, 1); + spin_unlock_mutex(&lock->wait_lock); } /* @@ -259,7 +239,7 @@ __mutex_unlock_slowpath(atomic_t *lock_count) * mutex_lock_interruptible() and mutex_trylock(). */ static int fastcall noinline __sched -__mutex_lock_interruptible_slowpath(atomic_t *lock_count); +__mutex_lock_interruptible_slowpath(atomic_t *lock_count __IP_DECL__); /*** * mutex_lock_interruptible - acquire the mutex, interruptable @@ -282,11 +262,11 @@ int fastcall __sched mutex_lock_interruptible(struct mutex *lock) EXPORT_SYMBOL(mutex_lock_interruptible); static int fastcall noinline __sched -__mutex_lock_interruptible_slowpath(atomic_t *lock_count) +__mutex_lock_interruptible_slowpath(atomic_t *lock_count __IP_DECL__) { struct mutex *lock = container_of(lock_count, struct mutex, count); - return __mutex_lock_common(lock, TASK_INTERRUPTIBLE, 0); + return __mutex_lock_common(lock, TASK_INTERRUPTIBLE __IP__); } /* @@ -296,21 +276,18 @@ __mutex_lock_interruptible_slowpath(atomic_t *lock_count) static inline int __mutex_trylock_slowpath(atomic_t *lock_count) { struct mutex *lock = container_of(lock_count, struct mutex, count); - unsigned long flags; int prev; - spin_lock_mutex(&lock->wait_lock, flags); + spin_lock_mutex(&lock->wait_lock); prev = atomic_xchg(&lock->count, -1); - if (likely(prev == 1)) { - debug_mutex_set_owner(lock, current_thread_info()); - mutex_acquire(&lock->dep_map, 0, 1, _RET_IP_); - } + if (likely(prev == 1)) + debug_mutex_set_owner(lock, current_thread_info() __RET_IP__); /* Set it back to 0 if there are no waiters: */ if (likely(list_empty(&lock->wait_list))) atomic_set(&lock->count, 0); - spin_unlock_mutex(&lock->wait_lock, flags); + spin_unlock_mutex(&lock->wait_lock); return prev == 1; } @@ -329,7 +306,7 @@ static inline int __mutex_trylock_slowpath(atomic_t *lock_count) * This function must not be used in interrupt context. The * mutex must be released by the same task that acquired it. */ -int fastcall __sched mutex_trylock(struct mutex *lock) +int fastcall mutex_trylock(struct mutex *lock) { return __mutex_fastpath_trylock(&lock->count, __mutex_trylock_slowpath); diff --git a/kernel/mutex.h b/kernel/mutex.h index a075dafbb..00fe84e7b 100644 --- a/kernel/mutex.h +++ b/kernel/mutex.h @@ -9,22 +9,27 @@ * !CONFIG_DEBUG_MUTEXES case. Most of them are NOPs: */ -#define spin_lock_mutex(lock, flags) \ - do { spin_lock(lock); (void)(flags); } while (0) -#define spin_unlock_mutex(lock, flags) \ - do { spin_unlock(lock); (void)(flags); } while (0) +#define spin_lock_mutex(lock) spin_lock(lock) +#define spin_unlock_mutex(lock) spin_unlock(lock) #define mutex_remove_waiter(lock, waiter, ti) \ __list_del((waiter)->list.prev, (waiter)->list.next) +#define DEBUG_WARN_ON(c) do { } while (0) #define debug_mutex_set_owner(lock, new_owner) do { } while (0) #define debug_mutex_clear_owner(lock) do { } while (0) +#define debug_mutex_init_waiter(waiter) do { } while (0) #define debug_mutex_wake_waiter(lock, waiter) do { } while (0) #define debug_mutex_free_waiter(waiter) do { } while (0) -#define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) +#define debug_mutex_add_waiter(lock, waiter, ti, ip) do { } while (0) #define debug_mutex_unlock(lock) do { } while (0) -#define debug_mutex_init(lock, name, key) do { } while (0) +#define debug_mutex_init(lock, name) do { } while (0) + +/* + * Return-address parameters/declarations. They are very useful for + * debugging, but add overhead in the !DEBUG case - so we go the + * trouble of using this not too elegant but zero-cost solution: + */ +#define __IP_DECL__ +#define __IP__ +#define __RET_IP__ -static inline void -debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) -{ -} diff --git a/kernel/panic.c b/kernel/panic.c index c3fba6dbb..6a1bc03c7 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -8,6 +8,7 @@ * This function is used through-out the kernel (including mm and fs) * to indicate a major problem. */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include int panic_on_oops; int tainted; @@ -174,7 +174,6 @@ EXPORT_SYMBOL(print_tainted); void add_taint(unsigned flag) { - debug_locks = 0; /* can't trust the integrity of the kernel anymore */ tainted |= flag; } EXPORT_SYMBOL(add_taint); @@ -259,7 +258,6 @@ int oops_may_print(void) */ void oops_enter(void) { - debug_locks_off(); /* can't trust the integrity of the kernel anymore */ do_oops_enter_exit(); } diff --git a/kernel/params.c b/kernel/params.c index f676820c2..c67011b26 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include diff --git a/kernel/pid.c b/kernel/pid.c index c33fb1c93..eeb836b65 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -26,8 +26,6 @@ #include #include #include -#include -#include #define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift) static struct hlist_head *pid_hash; @@ -220,7 +218,7 @@ struct pid * fastcall find_pid(int nr) return NULL; } -int fastcall attach_pid(struct task_struct *task, enum pid_type type, int nr) +int fastcall attach_pid(task_t *task, enum pid_type type, int nr) { struct pid_link *link; struct pid *pid; @@ -235,7 +233,7 @@ int fastcall attach_pid(struct task_struct *task, enum pid_type type, int nr) return 0; } -void fastcall detach_pid(struct task_struct *task, enum pid_type type) +void fastcall detach_pid(task_t *task, enum pid_type type) { struct pid_link *link; struct pid *pid; @@ -262,14 +260,6 @@ struct task_struct * fastcall pid_task(struct pid *pid, enum pid_type type) first = rcu_dereference(pid->tasks[type].first); if (first) result = hlist_entry(first, struct task_struct, pids[(type)].node); - if (result && (pid->nr != 1) && - !vx_check(vx_task_xid(result), VX_WATCH|VX_ADMIN|VX_IDENT)) { - vxwprintk((type == PIDTYPE_PID) && (current->xid), - "pid_task(%d,%d): task %p[#%u,%u] did lookup %p[#%u,%u]", - pid->nr, type, current, vx_current_xid(), current->pid, - result, vx_task_xid(result), result->pid); - result = NULL; - } } return result; } @@ -277,12 +267,8 @@ struct task_struct * fastcall pid_task(struct pid *pid, enum pid_type type) /* * Must be called under rcu_read_lock() or with tasklist_lock read-held. */ -struct task_struct *find_task_by_pid_type(int type, int nr) +task_t *find_task_by_pid_type(int type, int nr) { - if (type == PIDTYPE_PID) - nr = vx_rmap_pid(nr); - else if (type == PIDTYPE_REALPID) - type = PIDTYPE_PID; return pid_task(find_pid(nr), type); } diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 0779b486f..13c0be232 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -6,6 +6,7 @@ #include #include #include +#include static int check_clock(const clockid_t which_clock) { @@ -87,19 +88,6 @@ static inline union cpu_time_count cpu_time_sub(const clockid_t which_clock, return a; } -/* - * Divide and limit the result to res >= 1 - * - * This is necessary to prevent signal delivery starvation, when the result of - * the division would be rounded down to 0. - */ -static inline cputime_t cputime_div_non_zero(cputime_t time, unsigned long div) -{ - cputime_t res = cputime_div(time, div); - - return max_t(cputime_t, res, 1); -} - /* * Update expiry time from increment, and increase overrun count, * given the current clock sample. @@ -496,8 +484,8 @@ static void process_timer_rebalance(struct task_struct *p, BUG(); break; case CPUCLOCK_PROF: - left = cputime_div_non_zero(cputime_sub(expires.cpu, val.cpu), - nthreads); + left = cputime_div(cputime_sub(expires.cpu, val.cpu), + nthreads); do { if (likely(!(t->flags & PF_EXITING))) { ticks = cputime_add(prof_ticks(t), left); @@ -511,8 +499,8 @@ static void process_timer_rebalance(struct task_struct *p, } while (t != p); break; case CPUCLOCK_VIRT: - left = cputime_div_non_zero(cputime_sub(expires.cpu, val.cpu), - nthreads); + left = cputime_div(cputime_sub(expires.cpu, val.cpu), + nthreads); do { if (likely(!(t->flags & PF_EXITING))) { ticks = cputime_add(virt_ticks(t), left); @@ -528,7 +516,6 @@ static void process_timer_rebalance(struct task_struct *p, case CPUCLOCK_SCHED: nsleft = expires.sched - val.sched; do_div(nsleft, nthreads); - nsleft = max_t(unsigned long long, nsleft, 1); do { if (likely(!(t->flags & PF_EXITING))) { ns = t->sched_time + nsleft; @@ -1173,13 +1160,12 @@ static void check_process_timers(struct task_struct *tsk, prof_left = cputime_sub(prof_expires, utime); prof_left = cputime_sub(prof_left, stime); - prof_left = cputime_div_non_zero(prof_left, nthreads); + prof_left = cputime_div(prof_left, nthreads); virt_left = cputime_sub(virt_expires, utime); - virt_left = cputime_div_non_zero(virt_left, nthreads); + virt_left = cputime_div(virt_left, nthreads); if (sched_expires) { sched_left = sched_expires - sched_time; do_div(sched_left, nthreads); - sched_left = max_t(unsigned long long, sched_left, 1); } else { sched_left = 0; } diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index aa525907e..e081fef36 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -48,8 +48,6 @@ #include #include #include -#include -#include /* * Management arrays for POSIX timers. Timers are kept in slab memory @@ -300,10 +298,6 @@ void do_schedule_next_timer(struct siginfo *info) int posix_timer_event(struct k_itimer *timr,int si_private) { - struct vx_info_save vxis; - int ret; - - enter_vx_info(task_get_vx_info(timr->it_process), &vxis); memset(&timr->sigq->info, 0, sizeof(siginfo_t)); timr->sigq->info.si_sys_private = si_private; /* Send signal to the process that owns this timer.*/ @@ -316,11 +310,11 @@ int posix_timer_event(struct k_itimer *timr,int si_private) if (timr->it_sigev_notify & SIGEV_THREAD_ID) { struct task_struct *leader; + int ret = send_sigqueue(timr->it_sigev_signo, timr->sigq, + timr->it_process); - ret = send_sigqueue(timr->it_sigev_signo, timr->sigq, - timr->it_process); if (likely(ret >= 0)) - goto out; + return ret; timr->it_sigev_notify = SIGEV_SIGNAL; leader = timr->it_process->group_leader; @@ -328,12 +322,8 @@ int posix_timer_event(struct k_itimer *timr,int si_private) timr->it_process = leader; } - ret = send_group_sigqueue(timr->it_sigev_signo, timr->sigq, - timr->it_process); -out: - leave_vx_info(&vxis); - put_vx_info(vxis.vxi); - return ret; + return send_group_sigqueue(timr->it_sigev_signo, timr->sigq, + timr->it_process); } EXPORT_SYMBOL_GPL(posix_timer_event); diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 619ecabf7..ce0dfb8f4 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig @@ -36,27 +36,9 @@ config PM_DEBUG code. This is helpful when debugging and reporting various PM bugs, like suspend support. -config PM_TRACE - bool "Suspend/resume event tracing" - depends on PM && PM_DEBUG && X86_32 && EXPERIMENTAL - default n - ---help--- - This enables some cheesy code to save the last PM event point in the - RTC across reboots, so that you can debug a machine that just hangs - during suspend (or more commonly, during resume). - - To use this debugging feature you should attempt to suspend the machine, - then reboot it, then run - - dmesg -s 1000000 | grep 'hash matches' - - CAUTION: this option will cause your machine's real-time clock to be - set to an invalid time after a resume. - - config SOFTWARE_SUSPEND bool "Software Suspend" - depends on PM && SWAP && ((X86 && (!SMP || SUSPEND_SMP) && !X86_PAE) || ((FRV || PPC32) && !SMP)) + depends on PM && SWAP && (X86 && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP) ---help--- Enable the possibility of suspending the machine. It doesn't need ACPI or APM. @@ -78,10 +60,6 @@ config SOFTWARE_SUSPEND For more information take a look at . - (For now, swsusp is incompatible with PAE aka HIGHMEM_64G on i386. - we need identity mapping for resume to work, and that is trivial - to get with 4MB pages, but less than trivial on PAE). - config PM_STD_PARTITION string "Default resume partition" depends on SOFTWARE_SUSPEND @@ -104,6 +82,18 @@ config PM_STD_PARTITION suspended image to. It will simply pick the first available swap device. +config SWSUSP_ENCRYPT + bool "Encrypt suspend image" + depends on SOFTWARE_SUSPEND && CRYPTO=y && (CRYPTO_AES=y || CRYPTO_AES_586=y || CRYPTO_AES_X86_64=y) + default "" + ---help--- + To prevent data gathering from swap after resume you can encrypt + the suspend image with a temporary key that is deleted on + resume. + + Note that the temporary key is stored unencrypted on disk while the + system is suspended. + config SUSPEND_SMP bool depends on HOTPLUG_CPU && X86 && PM diff --git a/kernel/power/Makefile b/kernel/power/Makefile index 38725f526..8d0af3d37 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile @@ -7,4 +7,6 @@ obj-y := main.o process.o console.o obj-$(CONFIG_PM_LEGACY) += pm.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o snapshot.o swap.o user.o +obj-$(CONFIG_SUSPEND_SMP) += smp.o + obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o diff --git a/kernel/power/console.c b/kernel/power/console.c index 623786d44..6e039ca13 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c @@ -9,42 +9,20 @@ #include #include "power.h" -#if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) -#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) - -static int orig_fgconsole, orig_kmsg; +extern int console_suspended; int pm_prepare_console(void) { acquire_console_sem(); - - orig_fgconsole = fg_console; - - if (vc_allocate(SUSPEND_CONSOLE)) { - /* we can't have a free VC for now. Too bad, - * we don't want to mess the screen for now. */ - release_console_sem(); - return 1; - } - - set_console(SUSPEND_CONSOLE); - release_console_sem(); - - if (vt_waitactive(SUSPEND_CONSOLE)) { - pr_debug("Suspend: Can't switch VCs."); - return 1; - } - orig_kmsg = kmsg_redirect; - kmsg_redirect = SUSPEND_CONSOLE; + console_suspended = 1; + system_state = SYSTEM_BOOTING; return 0; } void pm_restore_console(void) { - acquire_console_sem(); - set_console(orig_fgconsole); + console_suspended = 0; + system_state = SYSTEM_RUNNING; release_console_sem(); - kmsg_redirect = orig_kmsg; return; } -#endif diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 7c7b9b65e..81d4d982f 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "power.h" @@ -73,10 +72,7 @@ static int prepare_processes(void) int error; pm_prepare_console(); - - error = disable_nonboot_cpus(); - if (error) - goto enable_cpus; + disable_nonboot_cpus(); if (freeze_processes()) { error = -EBUSY; @@ -88,7 +84,6 @@ static int prepare_processes(void) return 0; thaw: thaw_processes(); -enable_cpus: enable_nonboot_cpus(); pm_restore_console(); return error; @@ -236,7 +231,7 @@ static int software_resume(void) late_initcall(software_resume); -static const char * const pm_disk_modes[] = { +static char * pm_disk_modes[] = { [PM_DISK_FIRMWARE] = "firmware", [PM_DISK_PLATFORM] = "platform", [PM_DISK_SHUTDOWN] = "shutdown", diff --git a/kernel/power/main.c b/kernel/power/main.c index 4d403323a..a6d9ef460 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -15,8 +15,7 @@ #include #include #include -#include -#include + #include "power.h" @@ -52,7 +51,7 @@ void pm_set_ops(struct pm_ops * ops) static int suspend_prepare(suspend_state_t state) { - int error; + int error = 0; unsigned int free_pages; if (!pm_ops || !pm_ops->enter) @@ -60,9 +59,12 @@ static int suspend_prepare(suspend_state_t state) pm_prepare_console(); - error = disable_nonboot_cpus(); - if (error) + disable_nonboot_cpus(); + + if (num_online_cpus() != 1) { + error = -EPERM; goto Enable_cpu; + } if (freeze_processes()) { error = -EAGAIN; @@ -84,7 +86,6 @@ static int suspend_prepare(suspend_state_t state) goto Thaw; } - suspend_console(); if ((error = device_suspend(PMSG_SUSPEND))) { printk(KERN_ERR "Some devices failed to suspend\n"); goto Finish; @@ -132,7 +133,6 @@ int suspend_enter(suspend_state_t state) static void suspend_finish(suspend_state_t state) { device_resume(); - resume_console(); thaw_processes(); enable_nonboot_cpus(); if (pm_ops && pm_ops->finish) @@ -143,7 +143,7 @@ static void suspend_finish(suspend_state_t state) -static const char * const pm_states[PM_SUSPEND_MAX] = { +static char *pm_states[PM_SUSPEND_MAX] = { [PM_SUSPEND_STANDBY] = "standby", [PM_SUSPEND_MEM] = "mem", #ifdef CONFIG_SOFTWARE_SUSPEND @@ -260,7 +260,7 @@ static ssize_t state_show(struct subsystem * subsys, char * buf) static ssize_t state_store(struct subsystem * subsys, const char * buf, size_t n) { suspend_state_t state = PM_SUSPEND_STANDBY; - const char * const *s; + char ** s; char *p; int error; int len; diff --git a/kernel/power/pm.c b/kernel/power/pm.c index c50d15266..84063ac8f 100644 --- a/kernel/power/pm.c +++ b/kernel/power/pm.c @@ -75,6 +75,42 @@ struct pm_dev *pm_register(pm_dev_t type, return dev; } +static void __pm_unregister(struct pm_dev *dev) +{ + if (dev) { + list_del(&dev->entry); + kfree(dev); + } +} + +/** + * pm_unregister_all - unregister all devices with matching callback + * @callback: callback function pointer + * + * Unregister every device that would call the callback passed. This + * is primarily meant as a helper function for loadable modules. It + * enables a module to give up all its managed devices without keeping + * its own private list. + */ + +void pm_unregister_all(pm_callback callback) +{ + struct list_head *entry; + + if (!callback) + return; + + mutex_lock(&pm_devs_lock); + entry = pm_devs.next; + while (entry != &pm_devs) { + struct pm_dev *dev = list_entry(entry, struct pm_dev, entry); + entry = entry->next; + if (dev->callback == callback) + __pm_unregister(dev); + } + mutex_unlock(&pm_devs_lock); +} + /** * pm_send - send request to a single device * @dev: device to send to @@ -203,6 +239,7 @@ int pm_send_all(pm_request_t rqst, void *data) } EXPORT_SYMBOL(pm_register); +EXPORT_SYMBOL(pm_unregister_all); EXPORT_SYMBOL(pm_send_all); EXPORT_SYMBOL(pm_active); diff --git a/kernel/power/power.h b/kernel/power/power.h index 1cefcf87a..f06f12f21 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -50,65 +50,16 @@ extern asmlinkage int swsusp_arch_resume(void); extern unsigned int count_data_pages(void); -/** - * Auxiliary structure used for reading the snapshot image data and - * metadata from and writing them to the list of page backup entries - * (PBEs) which is the main data structure of swsusp. - * - * Using struct snapshot_handle we can transfer the image, including its - * metadata, as a continuous sequence of bytes with the help of - * snapshot_read_next() and snapshot_write_next(). - * - * The code that writes the image to a storage or transfers it to - * the user land is required to use snapshot_read_next() for this - * purpose and it should not make any assumptions regarding the internal - * structure of the image. Similarly, the code that reads the image from - * a storage or transfers it from the user land is required to use - * snapshot_write_next(). - * - * This may allow us to change the internal structure of the image - * in the future with considerably less effort. - */ - struct snapshot_handle { - loff_t offset; /* number of the last byte ready for reading - * or writing in the sequence - */ - unsigned int cur; /* number of the block of PAGE_SIZE bytes the - * next operation will refer to (ie. current) - */ - unsigned int cur_offset; /* offset with respect to the current - * block (for the next operation) - */ - unsigned int prev; /* number of the block of PAGE_SIZE bytes that - * was the current one previously - */ - struct pbe *pbe; /* PBE that corresponds to 'buffer' */ - struct pbe *last_pbe; /* When the image is restored (eg. read - * from disk) we can store some image - * data directly in the page frames - * in which they were before suspend. - * In such a case the PBEs that - * correspond to them will be unused. - * This is the last PBE, so far, that - * does not correspond to such data. - */ - void *buffer; /* address of the block to read from - * or write to - */ - unsigned int buf_offset; /* location to read from or write to, - * given as a displacement from 'buffer' - */ - int sync_read; /* Set to one to notify the caller of - * snapshot_write_next() that it may - * need to call wait_on_bio_chain() - */ + loff_t offset; + unsigned int page; + unsigned int page_offset; + unsigned int prev; + struct pbe *pbe; + void *buffer; + unsigned int buf_offset; }; -/* This macro returns the address from/to which the caller of - * snapshot_read_next()/snapshot_write_next() is allowed to - * read/write data after the function returns - */ #define data_of(handle) ((handle).buffer + (handle).buf_offset) extern int snapshot_read_next(struct snapshot_handle *handle, size_t count); diff --git a/kernel/power/process.c b/kernel/power/process.c index 72e72d2c6..b2a5f671d 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -66,25 +66,13 @@ static inline void freeze_process(struct task_struct *p) } } -static void cancel_freezing(struct task_struct *p) -{ - unsigned long flags; - - if (freezing(p)) { - pr_debug(" clean up: %s\n", p->comm); - do_not_freeze(p); - spin_lock_irqsave(&p->sighand->siglock, flags); - recalc_sigpending_tsk(p); - spin_unlock_irqrestore(&p->sighand->siglock, flags); - } -} - /* 0 = success, else # of processes that we failed to stop */ int freeze_processes(void) { int todo, nr_user, user_frozen; unsigned long start_time; struct task_struct *g, *p; + unsigned long flags; printk( "Stopping tasks: " ); start_time = jiffies; @@ -97,10 +85,6 @@ int freeze_processes(void) continue; if (frozen(p)) continue; - if (p->state == TASK_TRACED && frozen(p->parent)) { - cancel_freezing(p); - continue; - } if (p->mm && !(p->flags & PF_BORROWED_MM)) { /* The task is a user-space one. * Freeze it unless there's a vfork completion @@ -142,7 +126,13 @@ int freeze_processes(void) do_each_thread(g, p) { if (freezeable(p) && !frozen(p)) printk(KERN_ERR " %s\n", p->comm); - cancel_freezing(p); + if (freezing(p)) { + pr_debug(" clean up: %s\n", p->comm); + p->flags &= ~PF_FREEZE; + spin_lock_irqsave(&p->sighand->siglock, flags); + recalc_sigpending_tsk(p); + spin_unlock_irqrestore(&p->sighand->siglock, flags); + } } while_each_thread(g, p); read_unlock(&tasklist_lock); return todo; diff --git a/kernel/power/smp.c b/kernel/power/smp.c new file mode 100644 index 000000000..5957312b2 --- /dev/null +++ b/kernel/power/smp.c @@ -0,0 +1,62 @@ +/* + * drivers/power/smp.c - Functions for stopping other CPUs. + * + * Copyright 2004 Pavel Machek + * Copyright (C) 2002-2003 Nigel Cunningham + * + * This file is released under the GPLv2. + */ + +#undef DEBUG + +#include +#include +#include +#include +#include +#include +#include + +/* This is protected by pm_sem semaphore */ +static cpumask_t frozen_cpus; + +void disable_nonboot_cpus(void) +{ + int cpu, error; + + error = 0; + cpus_clear(frozen_cpus); + printk("Freezing cpus ...\n"); + for_each_online_cpu(cpu) { + if (cpu == 0) + continue; + error = cpu_down(cpu); + if (!error) { + cpu_set(cpu, frozen_cpus); + printk("CPU%d is down\n", cpu); + continue; + } + printk("Error taking cpu %d down: %d\n", cpu, error); + } + BUG_ON(raw_smp_processor_id() != 0); + if (error) + panic("cpus not sleeping"); +} + +void enable_nonboot_cpus(void) +{ + int cpu, error; + + printk("Thawing cpus ...\n"); + for_each_cpu_mask(cpu, frozen_cpus) { + error = cpu_up(cpu); + if (!error) { + printk("CPU%d is up\n", cpu); + continue; + } + printk("Error taking cpu %d up: %d\n", cpu, error); + panic("Not enough cpus"); + } + cpus_clear(frozen_cpus); +} + diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 81fe8de9e..3eeedbb13 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -150,13 +150,9 @@ int restore_highmem(void) } return 0; } -#else -static inline unsigned int count_highmem_pages(void) {return 0;} -static inline int save_highmem(void) {return 0;} -static inline int restore_highmem(void) {return 0;} #endif -static inline int pfn_is_nosave(unsigned long pfn) +static int pfn_is_nosave(unsigned long pfn) { unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT; unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) >> PAGE_SHIFT; @@ -167,43 +163,43 @@ static inline int pfn_is_nosave(unsigned long pfn) * saveable - Determine whether a page should be cloned or not. * @pfn: The page * - * We save a page if it isn't Nosave, and is not in the range of pages - * statically defined as 'unsaveable', and it - * isn't a part of a free chunk of pages. + * We save a page if it's Reserved, and not in the range of pages + * statically defined as 'unsaveable', or if it isn't reserved, and + * isn't part of a free chunk of pages. */ -static struct page *saveable_page(unsigned long pfn) +static int saveable(struct zone *zone, unsigned long *zone_pfn) { + unsigned long pfn = *zone_pfn + zone->zone_start_pfn; struct page *page; if (!pfn_valid(pfn)) - return NULL; + return 0; page = pfn_to_page(pfn); - + BUG_ON(PageReserved(page) && PageNosave(page)); if (PageNosave(page)) - return NULL; + return 0; if (PageReserved(page) && pfn_is_nosave(pfn)) - return NULL; + return 0; if (PageNosaveFree(page)) - return NULL; + return 0; - return page; + return 1; } unsigned int count_data_pages(void) { struct zone *zone; - unsigned long pfn, max_zone_pfn; + unsigned long zone_pfn; unsigned int n = 0; for_each_zone (zone) { if (is_highmem(zone)) continue; mark_free_pages(zone); - max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - n += !!saveable_page(pfn); + for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) + n += saveable(zone, &zone_pfn); } return n; } @@ -211,7 +207,7 @@ unsigned int count_data_pages(void) static void copy_data_pages(struct pbe *pblist) { struct zone *zone; - unsigned long pfn, max_zone_pfn; + unsigned long zone_pfn; struct pbe *pbe, *p; pbe = pblist; @@ -224,21 +220,14 @@ static void copy_data_pages(struct pbe *pblist) SetPageNosaveFree(virt_to_page(p)); for_each_pbe (p, pblist) SetPageNosaveFree(virt_to_page(p->address)); - max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) { - struct page *page = saveable_page(pfn); - - if (page) { - long *src, *dst; - int n; - + for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) { + if (saveable(zone, &zone_pfn)) { + struct page *page; + page = pfn_to_page(zone_pfn + zone->zone_start_pfn); BUG_ON(!pbe); pbe->orig_address = (unsigned long)page_address(page); - /* copy_page and memcpy are not usable for copying task structs. */ - dst = (long *)pbe->address; - src = (long *)pbe->orig_address; - for (n = PAGE_SIZE / sizeof(long); n; n--) - *dst++ = *src++; + /* copy_page is not usable for copying task structs. */ + memcpy((void *)pbe->address, (void *)pbe->orig_address, PAGE_SIZE); pbe = pbe->next; } } @@ -304,29 +293,62 @@ static inline void create_pbe_list(struct pbe *pblist, unsigned int nr_pages) } } -static unsigned int unsafe_pages; +/** + * On resume it is necessary to trace and eventually free the unsafe + * pages that have been allocated, because they are needed for I/O + * (on x86-64 we likely will "eat" these pages once again while + * creating the temporary page translation tables) + */ + +struct eaten_page { + struct eaten_page *next; + char padding[PAGE_SIZE - sizeof(void *)]; +}; + +static struct eaten_page *eaten_pages = NULL; + +static void release_eaten_pages(void) +{ + struct eaten_page *p, *q; + + p = eaten_pages; + while (p) { + q = p->next; + /* We don't want swsusp_free() to free this page again */ + ClearPageNosave(virt_to_page(p)); + free_page((unsigned long)p); + p = q; + } + eaten_pages = NULL; +} /** * @safe_needed - on resume, for storing the PBE list and the image, * we can only use memory pages that do not conflict with the pages - * used before suspend. + * which had been used before suspend. * * The unsafe pages are marked with the PG_nosave_free flag - * and we count them using unsafe_pages + * + * Allocated but unusable (ie eaten) memory pages should be marked + * so that swsusp_free() can release them */ -static void *alloc_image_page(gfp_t gfp_mask, int safe_needed) +static inline void *alloc_image_page(gfp_t gfp_mask, int safe_needed) { void *res; - res = (void *)get_zeroed_page(gfp_mask); if (safe_needed) - while (res && PageNosaveFree(virt_to_page(res))) { - /* The page is unsafe, mark it for swsusp_free() */ - SetPageNosave(virt_to_page(res)); - unsafe_pages++; + do { res = (void *)get_zeroed_page(gfp_mask); - } + if (res && PageNosaveFree(virt_to_page(res))) { + /* This is for swsusp_free() */ + SetPageNosave(virt_to_page(res)); + ((struct eaten_page *)res)->next = eaten_pages; + eaten_pages = res; + } + } while (res && PageNosaveFree(virt_to_page(res))); + else + res = (void *)get_zeroed_page(gfp_mask); if (res) { SetPageNosave(virt_to_page(res)); SetPageNosaveFree(virt_to_page(res)); @@ -352,8 +374,7 @@ unsigned long get_safe_page(gfp_t gfp_mask) * On each page we set up a list of struct_pbe elements. */ -static struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, - int safe_needed) +struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, int safe_needed) { unsigned int num; struct pbe *pblist, *pbe; @@ -384,14 +405,13 @@ static struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, void swsusp_free(void) { struct zone *zone; - unsigned long pfn, max_zone_pfn; + unsigned long zone_pfn; for_each_zone(zone) { - max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (pfn_valid(pfn)) { - struct page *page = pfn_to_page(pfn); - + for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) + if (pfn_valid(zone_pfn + zone->zone_start_pfn)) { + struct page *page; + page = pfn_to_page(zone_pfn + zone->zone_start_pfn); if (PageNosave(page) && PageNosaveFree(page)) { ClearPageNosave(page); ClearPageNosaveFree(page); @@ -555,7 +575,7 @@ static inline struct pbe *pack_orig_addresses(unsigned long *buf, struct pbe *pb int snapshot_read_next(struct snapshot_handle *handle, size_t count) { - if (handle->cur > nr_meta_pages + nr_copy_pages) + if (handle->page > nr_meta_pages + nr_copy_pages) return 0; if (!buffer) { /* This makes the buffer be freed by swsusp_free() */ @@ -568,8 +588,8 @@ int snapshot_read_next(struct snapshot_handle *handle, size_t count) handle->buffer = buffer; handle->pbe = pagedir_nosave; } - if (handle->prev < handle->cur) { - if (handle->cur <= nr_meta_pages) { + if (handle->prev < handle->page) { + if (handle->page <= nr_meta_pages) { handle->pbe = pack_orig_addresses(buffer, handle->pbe); if (!handle->pbe) handle->pbe = pagedir_nosave; @@ -577,15 +597,15 @@ int snapshot_read_next(struct snapshot_handle *handle, size_t count) handle->buffer = (void *)handle->pbe->address; handle->pbe = handle->pbe->next; } - handle->prev = handle->cur; + handle->prev = handle->page; } - handle->buf_offset = handle->cur_offset; - if (handle->cur_offset + count >= PAGE_SIZE) { - count = PAGE_SIZE - handle->cur_offset; - handle->cur_offset = 0; - handle->cur++; + handle->buf_offset = handle->page_offset; + if (handle->page_offset + count >= PAGE_SIZE) { + count = PAGE_SIZE - handle->page_offset; + handle->page_offset = 0; + handle->page++; } else { - handle->cur_offset += count; + handle->page_offset += count; } handle->offset += count; return count; @@ -600,7 +620,7 @@ int snapshot_read_next(struct snapshot_handle *handle, size_t count) static int mark_unsafe_pages(struct pbe *pblist) { struct zone *zone; - unsigned long pfn, max_zone_pfn; + unsigned long zone_pfn; struct pbe *p; if (!pblist) /* a sanity check */ @@ -608,10 +628,10 @@ static int mark_unsafe_pages(struct pbe *pblist) /* Clear page flags */ for_each_zone (zone) { - max_zone_pfn = zone->zone_start_pfn + zone->spanned_pages; - for (pfn = zone->zone_start_pfn; pfn < max_zone_pfn; pfn++) - if (pfn_valid(pfn)) - ClearPageNosaveFree(pfn_to_page(pfn)); + for (zone_pfn = 0; zone_pfn < zone->spanned_pages; ++zone_pfn) + if (pfn_valid(zone_pfn + zone->zone_start_pfn)) + ClearPageNosaveFree(pfn_to_page(zone_pfn + + zone->zone_start_pfn)); } /* Mark orig addresses */ @@ -622,8 +642,6 @@ static int mark_unsafe_pages(struct pbe *pblist) return -EFAULT; } - unsafe_pages = 0; - return 0; } @@ -701,99 +719,42 @@ static inline struct pbe *unpack_orig_addresses(unsigned long *buf, } /** - * prepare_image - use metadata contained in the PBE list + * create_image - use metadata contained in the PBE list * pointed to by pagedir_nosave to mark the pages that will * be overwritten in the process of restoring the system - * memory state from the image ("unsafe" pages) and allocate - * memory for the image - * - * The idea is to allocate the PBE list first and then - * allocate as many pages as it's needed for the image data, - * but not to assign these pages to the PBEs initially. - * Instead, we just mark them as allocated and create a list - * of "safe" which will be used later + * memory state from the image and allocate memory for + * the image avoiding these pages */ -struct safe_page { - struct safe_page *next; - char padding[PAGE_SIZE - sizeof(void *)]; -}; - -static struct safe_page *safe_pages; - -static int prepare_image(struct snapshot_handle *handle) +static int create_image(struct snapshot_handle *handle) { int error = 0; - unsigned int nr_pages = nr_copy_pages; - struct pbe *p, *pblist = NULL; + struct pbe *p, *pblist; p = pagedir_nosave; error = mark_unsafe_pages(p); if (!error) { - pblist = alloc_pagedir(nr_pages, GFP_ATOMIC, 1); + pblist = alloc_pagedir(nr_copy_pages, GFP_ATOMIC, 1); if (pblist) copy_page_backup_list(pblist, p); free_pagedir(p, 0); if (!pblist) error = -ENOMEM; } - safe_pages = NULL; - if (!error && nr_pages > unsafe_pages) { - nr_pages -= unsafe_pages; - while (nr_pages--) { - struct safe_page *ptr; - - ptr = (struct safe_page *)get_zeroed_page(GFP_ATOMIC); - if (!ptr) { - error = -ENOMEM; - break; - } - if (!PageNosaveFree(virt_to_page(ptr))) { - /* The page is "safe", add it to the list */ - ptr->next = safe_pages; - safe_pages = ptr; - } - /* Mark the page as allocated */ - SetPageNosave(virt_to_page(ptr)); - SetPageNosaveFree(virt_to_page(ptr)); - } - } + if (!error) + error = alloc_data_pages(pblist, GFP_ATOMIC, 1); if (!error) { + release_eaten_pages(); pagedir_nosave = pblist; } else { + pagedir_nosave = NULL; handle->pbe = NULL; - swsusp_free(); + nr_copy_pages = 0; + nr_meta_pages = 0; } return error; } -static void *get_buffer(struct snapshot_handle *handle) -{ - struct pbe *pbe = handle->pbe, *last = handle->last_pbe; - struct page *page = virt_to_page(pbe->orig_address); - - if (PageNosave(page) && PageNosaveFree(page)) { - /* - * We have allocated the "original" page frame and we can - * use it directly to store the read page - */ - pbe->address = 0; - if (last && last->next) - last->next = NULL; - return (void *)pbe->orig_address; - } - /* - * The "original" page frame has not been allocated and we have to - * use a "safe" page frame to store the read page - */ - pbe->address = (unsigned long)safe_pages; - safe_pages = safe_pages->next; - if (last) - last->next = pbe; - handle->last_pbe = pbe; - return (void *)pbe->address; -} - /** * snapshot_write_next - used for writing the system memory snapshot. * @@ -820,7 +781,7 @@ int snapshot_write_next(struct snapshot_handle *handle, size_t count) { int error = 0; - if (handle->prev && handle->cur > nr_meta_pages + nr_copy_pages) + if (handle->prev && handle->page > nr_meta_pages + nr_copy_pages) return 0; if (!buffer) { /* This makes the buffer be freed by swsusp_free() */ @@ -830,39 +791,33 @@ int snapshot_write_next(struct snapshot_handle *handle, size_t count) } if (!handle->offset) handle->buffer = buffer; - handle->sync_read = 1; - if (handle->prev < handle->cur) { + if (handle->prev < handle->page) { if (!handle->prev) { - error = load_header(handle, - (struct swsusp_info *)buffer); + error = load_header(handle, (struct swsusp_info *)buffer); if (error) return error; } else if (handle->prev <= nr_meta_pages) { - handle->pbe = unpack_orig_addresses(buffer, - handle->pbe); + handle->pbe = unpack_orig_addresses(buffer, handle->pbe); if (!handle->pbe) { - error = prepare_image(handle); + error = create_image(handle); if (error) return error; handle->pbe = pagedir_nosave; - handle->last_pbe = NULL; - handle->buffer = get_buffer(handle); - handle->sync_read = 0; + handle->buffer = (void *)handle->pbe->address; } } else { handle->pbe = handle->pbe->next; - handle->buffer = get_buffer(handle); - handle->sync_read = 0; + handle->buffer = (void *)handle->pbe->address; } - handle->prev = handle->cur; + handle->prev = handle->page; } - handle->buf_offset = handle->cur_offset; - if (handle->cur_offset + count >= PAGE_SIZE) { - count = PAGE_SIZE - handle->cur_offset; - handle->cur_offset = 0; - handle->cur++; + handle->buf_offset = handle->page_offset; + if (handle->page_offset + count >= PAGE_SIZE) { + count = PAGE_SIZE - handle->page_offset; + handle->page_offset = 0; + handle->page++; } else { - handle->cur_offset += count; + handle->page_offset += count; } handle->offset += count; return count; @@ -871,5 +826,5 @@ int snapshot_write_next(struct snapshot_handle *handle, size_t count) int snapshot_image_loaded(struct snapshot_handle *handle) { return !(!handle->pbe || handle->pbe->next || !nr_copy_pages || - handle->cur <= nr_meta_pages + nr_copy_pages); + handle->page <= nr_meta_pages + nr_copy_pages); } diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 0917c5db5..044b8e0c1 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -50,16 +49,18 @@ static int mark_swapfiles(swp_entry_t start) { int error; - rw_swap_page_sync(READ, swp_entry(root_swap, 0), - virt_to_page((unsigned long)&swsusp_header), NULL); + rw_swap_page_sync(READ, + swp_entry(root_swap, 0), + virt_to_page((unsigned long)&swsusp_header)); if (!memcmp("SWAP-SPACE",swsusp_header.sig, 10) || !memcmp("SWAPSPACE2",swsusp_header.sig, 10)) { memcpy(swsusp_header.orig_sig,swsusp_header.sig, 10); memcpy(swsusp_header.sig,SWSUSP_SIG, 10); swsusp_header.image = start; - error = rw_swap_page_sync(WRITE, swp_entry(root_swap, 0), - virt_to_page((unsigned long)&swsusp_header), - NULL); + error = rw_swap_page_sync(WRITE, + swp_entry(root_swap, 0), + virt_to_page((unsigned long) + &swsusp_header)); } else { pr_debug("swsusp: Partition is not swap space.\n"); error = -ENODEV; @@ -87,37 +88,16 @@ static int swsusp_swap_check(void) /* This is called before saving image */ * write_page - Write one page to given swap location. * @buf: Address we're writing. * @offset: Offset of the swap page we're writing to. - * @bio_chain: Link the next write BIO here */ -static int write_page(void *buf, unsigned long offset, struct bio **bio_chain) +static int write_page(void *buf, unsigned long offset) { swp_entry_t entry; int error = -ENOSPC; if (offset) { - struct page *page = virt_to_page(buf); - - if (bio_chain) { - /* - * Whether or not we successfully allocated a copy page, - * we take a ref on the page here. It gets undone in - * wait_on_bio_chain(). - */ - struct page *page_copy; - page_copy = alloc_page(GFP_ATOMIC); - if (page_copy == NULL) { - WARN_ON_ONCE(1); - bio_chain = NULL; /* Go synchronous */ - get_page(page); - } else { - memcpy(page_address(page_copy), - page_address(page), PAGE_SIZE); - page = page_copy; - } - } entry = swp_entry(root_swap, offset); - error = rw_swap_page_sync(WRITE, entry, page, bio_chain); + error = rw_swap_page_sync(WRITE, entry, virt_to_page(buf)); } return error; } @@ -166,26 +146,6 @@ static void release_swap_writer(struct swap_map_handle *handle) handle->bitmap = NULL; } -static void show_speed(struct timeval *start, struct timeval *stop, - unsigned nr_pages, char *msg) -{ - s64 elapsed_centisecs64; - int centisecs; - int k; - int kps; - - elapsed_centisecs64 = timeval_to_ns(stop) - timeval_to_ns(start); - do_div(elapsed_centisecs64, NSEC_PER_SEC / 100); - centisecs = elapsed_centisecs64; - if (centisecs == 0) - centisecs = 1; /* avoid div-by-zero */ - k = nr_pages * (PAGE_SIZE / 1024); - kps = (k * 100) / centisecs; - printk("%s %d kbytes in %d.%02d seconds (%d.%02d MB/s)\n", msg, k, - centisecs / 100, centisecs % 100, - kps / 1000, (kps % 1000) / 10); -} - static int get_swap_writer(struct swap_map_handle *handle) { handle->cur = (struct swap_map_page *)get_zeroed_page(GFP_KERNEL); @@ -205,70 +165,37 @@ static int get_swap_writer(struct swap_map_handle *handle) return 0; } -static int wait_on_bio_chain(struct bio **bio_chain) +static int swap_write_page(struct swap_map_handle *handle, void *buf) { - struct bio *bio; - struct bio *next_bio; - int ret = 0; - - if (bio_chain == NULL) - return 0; - - bio = *bio_chain; - if (bio == NULL) - return 0; - while (bio) { - struct page *page; - - next_bio = bio->bi_private; - page = bio->bi_io_vec[0].bv_page; - wait_on_page_locked(page); - if (!PageUptodate(page) || PageError(page)) - ret = -EIO; - put_page(page); - bio_put(bio); - bio = next_bio; - } - *bio_chain = NULL; - return ret; -} - -static int swap_write_page(struct swap_map_handle *handle, void *buf, - struct bio **bio_chain) -{ - int error = 0; + int error; unsigned long offset; if (!handle->cur) return -EINVAL; offset = alloc_swap_page(root_swap, handle->bitmap); - error = write_page(buf, offset, bio_chain); + error = write_page(buf, offset); if (error) return error; handle->cur->entries[handle->k++] = offset; if (handle->k >= MAP_PAGE_ENTRIES) { - error = wait_on_bio_chain(bio_chain); - if (error) - goto out; offset = alloc_swap_page(root_swap, handle->bitmap); if (!offset) return -ENOSPC; handle->cur->next_swap = offset; - error = write_page(handle->cur, handle->cur_swap, NULL); + error = write_page(handle->cur, handle->cur_swap); if (error) - goto out; + return error; memset(handle->cur, 0, PAGE_SIZE); handle->cur_swap = offset; handle->k = 0; } -out: - return error; + return 0; } static int flush_swap_writer(struct swap_map_handle *handle) { if (handle->cur && handle->cur_swap) - return write_page(handle->cur, handle->cur_swap, NULL); + return write_page(handle->cur, handle->cur_swap); else return -EINVAL; } @@ -279,29 +206,21 @@ static int flush_swap_writer(struct swap_map_handle *handle) static int save_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, - unsigned int nr_to_write) + unsigned int nr_pages) { unsigned int m; int ret; int error = 0; - int nr_pages; - int err2; - struct bio *bio; - struct timeval start; - struct timeval stop; - printk("Saving image data pages (%u pages) ... ", nr_to_write); - m = nr_to_write / 100; + printk("Saving image data pages (%u pages) ... ", nr_pages); + m = nr_pages / 100; if (!m) m = 1; nr_pages = 0; - bio = NULL; - do_gettimeofday(&start); do { ret = snapshot_read_next(snapshot, PAGE_SIZE); if (ret > 0) { - error = swap_write_page(handle, data_of(*snapshot), - &bio); + error = swap_write_page(handle, data_of(*snapshot)); if (error) break; if (!(nr_pages % m)) @@ -309,13 +228,8 @@ static int save_image(struct swap_map_handle *handle, nr_pages++; } } while (ret > 0); - err2 = wait_on_bio_chain(&bio); - do_gettimeofday(&stop); - if (!error) - error = err2; if (!error) printk("\b\b\b\bdone\n"); - show_speed(&start, &stop, nr_to_write, "Wrote"); return error; } @@ -349,11 +263,11 @@ int swsusp_write(void) struct swap_map_handle handle; struct snapshot_handle snapshot; struct swsusp_info *header; + unsigned long start; int error; if ((error = swsusp_swap_check())) { - printk(KERN_ERR "swsusp: Cannot find swap device, try " - "swapon -a.\n"); + printk(KERN_ERR "swsusp: Cannot find swap device, try swapon -a.\n"); return error; } memset(&snapshot, 0, sizeof(struct snapshot_handle)); @@ -367,17 +281,16 @@ int swsusp_write(void) } error = get_swap_writer(&handle); if (!error) { - unsigned long start = handle.cur_swap; - error = swap_write_page(&handle, header, NULL); - if (!error) - error = save_image(&handle, &snapshot, - header->pages - 1); - if (!error) { - flush_swap_writer(&handle); - printk("S"); - error = mark_swapfiles(swp_entry(root_swap, start)); - printk("|\n"); - } + start = handle.cur_swap; + error = swap_write_page(&handle, header); + } + if (!error) + error = save_image(&handle, &snapshot, header->pages - 1); + if (!error) { + flush_swap_writer(&handle); + printk("S"); + error = mark_swapfiles(swp_entry(root_swap, start)); + printk("|\n"); } if (error) free_all_swap_pages(root_swap, handle.bitmap); @@ -385,6 +298,25 @@ int swsusp_write(void) return error; } +/* + * Using bio to read from swap. + * This code requires a bit more work than just using buffer heads + * but, it is the recommended way for 2.5/2.6. + * The following are to signal the beginning and end of I/O. Bios + * finish asynchronously, while we want them to happen synchronously. + * A simple atomic_t, and a wait loop take care of this problem. + */ + +static atomic_t io_done = ATOMIC_INIT(0); + +static int end_io(struct bio *bio, unsigned int num, int err) +{ + if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) + panic("I/O error reading memory image"); + atomic_set(&io_done, 0); + return 0; +} + static struct block_device *resume_bdev; /** @@ -392,15 +324,15 @@ static struct block_device *resume_bdev; * @rw: READ or WRITE. * @off physical offset of page. * @page: page we're reading or writing. - * @bio_chain: list of pending biod (for async reading) * * Straight from the textbook - allocate and initialize the bio. - * If we're reading, make sure the page is marked as dirty. - * Then submit it and, if @bio_chain == NULL, wait. + * If we're writing, make sure the page is marked as dirty. + * Then submit it and wait. */ -static int submit(int rw, pgoff_t page_off, struct page *page, - struct bio **bio_chain) + +static int submit(int rw, pgoff_t page_off, void *page) { + int error = 0; struct bio *bio; bio = bio_alloc(GFP_ATOMIC, 1); @@ -408,40 +340,33 @@ static int submit(int rw, pgoff_t page_off, struct page *page, return -ENOMEM; bio->bi_sector = page_off * (PAGE_SIZE >> 9); bio->bi_bdev = resume_bdev; - bio->bi_end_io = end_swap_bio_read; + bio->bi_end_io = end_io; - if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) { - printk("swsusp: ERROR: adding page to bio at %ld\n", page_off); - bio_put(bio); - return -EFAULT; + if (bio_add_page(bio, virt_to_page(page), PAGE_SIZE, 0) < PAGE_SIZE) { + printk("swsusp: ERROR: adding page to bio at %ld\n",page_off); + error = -EFAULT; + goto Done; } - lock_page(page); - bio_get(bio); - - if (bio_chain == NULL) { - submit_bio(rw | (1 << BIO_RW_SYNC), bio); - wait_on_page_locked(page); - if (rw == READ) - bio_set_pages_dirty(bio); - bio_put(bio); - } else { - get_page(page); - bio->bi_private = *bio_chain; - *bio_chain = bio; - submit_bio(rw, bio); - } - return 0; + atomic_set(&io_done, 1); + submit_bio(rw | (1 << BIO_RW_SYNC), bio); + while (atomic_read(&io_done)) + yield(); + if (rw == READ) + bio_set_pages_dirty(bio); + Done: + bio_put(bio); + return error; } -static int bio_read_page(pgoff_t page_off, void *addr, struct bio **bio_chain) +static int bio_read_page(pgoff_t page_off, void *page) { - return submit(READ, page_off, virt_to_page(addr), bio_chain); + return submit(READ, page_off, page); } -static int bio_write_page(pgoff_t page_off, void *addr) +static int bio_write_page(pgoff_t page_off, void *page) { - return submit(WRITE, page_off, virt_to_page(addr), NULL); + return submit(WRITE, page_off, page); } /** @@ -466,7 +391,7 @@ static int get_swap_reader(struct swap_map_handle *handle, handle->cur = (struct swap_map_page *)get_zeroed_page(GFP_ATOMIC); if (!handle->cur) return -ENOMEM; - error = bio_read_page(swp_offset(start), handle->cur, NULL); + error = bio_read_page(swp_offset(start), handle->cur); if (error) { release_swap_reader(handle); return error; @@ -475,8 +400,7 @@ static int get_swap_reader(struct swap_map_handle *handle, return 0; } -static int swap_read_page(struct swap_map_handle *handle, void *buf, - struct bio **bio_chain) +static int swap_read_page(struct swap_map_handle *handle, void *buf) { unsigned long offset; int error; @@ -486,17 +410,16 @@ static int swap_read_page(struct swap_map_handle *handle, void *buf, offset = handle->cur->entries[handle->k]; if (!offset) return -EFAULT; - error = bio_read_page(offset, buf, bio_chain); + error = bio_read_page(offset, buf); if (error) return error; if (++handle->k >= MAP_PAGE_ENTRIES) { - error = wait_on_bio_chain(bio_chain); handle->k = 0; offset = handle->cur->next_swap; if (!offset) release_swap_reader(handle); - else if (!error) - error = bio_read_page(offset, handle->cur, NULL); + else + error = bio_read_page(offset, handle->cur); } return error; } @@ -509,48 +432,33 @@ static int swap_read_page(struct swap_map_handle *handle, void *buf, static int load_image(struct swap_map_handle *handle, struct snapshot_handle *snapshot, - unsigned int nr_to_read) + unsigned int nr_pages) { unsigned int m; + int ret; int error = 0; - struct timeval start; - struct timeval stop; - struct bio *bio; - int err2; - unsigned nr_pages; - printk("Loading image data pages (%u pages) ... ", nr_to_read); - m = nr_to_read / 100; + printk("Loading image data pages (%u pages) ... ", nr_pages); + m = nr_pages / 100; if (!m) m = 1; nr_pages = 0; - bio = NULL; - do_gettimeofday(&start); - for ( ; ; ) { - error = snapshot_write_next(snapshot, PAGE_SIZE); - if (error <= 0) - break; - error = swap_read_page(handle, data_of(*snapshot), &bio); - if (error) - break; - if (snapshot->sync_read) - error = wait_on_bio_chain(&bio); - if (error) - break; - if (!(nr_pages % m)) - printk("\b\b\b\b%3d%%", nr_pages / m); - nr_pages++; - } - err2 = wait_on_bio_chain(&bio); - do_gettimeofday(&stop); - if (!error) - error = err2; + do { + ret = snapshot_write_next(snapshot, PAGE_SIZE); + if (ret > 0) { + error = swap_read_page(handle, data_of(*snapshot)); + if (error) + break; + if (!(nr_pages % m)) + printk("\b\b\b\b%3d%%", nr_pages / m); + nr_pages++; + } + } while (ret > 0); if (!error) { printk("\b\b\b\bdone\n"); if (!snapshot_image_loaded(snapshot)) error = -ENODATA; } - show_speed(&start, &stop, nr_to_read, "Read"); return error; } @@ -573,7 +481,7 @@ int swsusp_read(void) header = (struct swsusp_info *)data_of(snapshot); error = get_swap_reader(&handle, swsusp_header.image); if (!error) - error = swap_read_page(&handle, header, NULL); + error = swap_read_page(&handle, header); if (!error) error = load_image(&handle, &snapshot, header->pages - 1); release_swap_reader(&handle); @@ -599,7 +507,7 @@ int swsusp_check(void) if (!IS_ERR(resume_bdev)) { set_blocksize(resume_bdev, PAGE_SIZE); memset(&swsusp_header, 0, sizeof(swsusp_header)); - if ((error = bio_read_page(0, &swsusp_header, NULL))) + if ((error = bio_read_page(0, &swsusp_header))) return error; if (!memcmp(SWSUSP_SIG, swsusp_header.sig, 10)) { memcpy(swsusp_header.sig, swsusp_header.orig_sig, 10); diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 17f669c83..c4016cbbd 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -67,9 +67,9 @@ unsigned int count_highmem_pages(void); int save_highmem(void); int restore_highmem(void); #else -static inline int save_highmem(void) { return 0; } -static inline int restore_highmem(void) { return 0; } -static inline unsigned int count_highmem_pages(void) { return 0; } +static int save_highmem(void) { return 0; } +static int restore_highmem(void) { return 0; } +static unsigned int count_highmem_pages(void) { return 0; } #endif /** @@ -175,12 +175,6 @@ void free_all_swap_pages(int swap, struct bitmap_page *bitmap) */ #define SHRINK_BITE 10000 -static inline unsigned long __shrink_memory(long tmp) -{ - if (tmp > SHRINK_BITE) - tmp = SHRINK_BITE; - return shrink_all_memory(tmp); -} int swsusp_shrink_memory(void) { @@ -198,17 +192,15 @@ int swsusp_shrink_memory(void) PAGES_FOR_IO; tmp = size; for_each_zone (zone) - if (!is_highmem(zone) && populated_zone(zone)) { + if (!is_highmem(zone)) tmp -= zone->free_pages; - tmp += zone->lowmem_reserve[ZONE_NORMAL]; - } if (tmp > 0) { - tmp = __shrink_memory(tmp); + tmp = shrink_all_memory(SHRINK_BITE); if (!tmp) return -ENOMEM; pages += tmp; } else if (size > image_size / PAGE_SIZE) { - tmp = __shrink_memory(size - (image_size / PAGE_SIZE)); + tmp = shrink_all_memory(SHRINK_BITE); pages += tmp; } printk("\b%c", p[i++%4]); diff --git a/kernel/power/user.c b/kernel/power/user.c index 0ef5e4ba3..3f1539fbe 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -19,7 +19,6 @@ #include #include #include -#include #include @@ -140,15 +139,12 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, if (data->frozen) break; down(&pm_sem); - error = disable_nonboot_cpus(); - if (!error) { - error = freeze_processes(); - if (error) { - thaw_processes(); - error = -EBUSY; - } + disable_nonboot_cpus(); + if (freeze_processes()) { + thaw_processes(); + enable_nonboot_cpus(); + error = -EBUSY; } - enable_nonboot_cpus(); up(&pm_sem); if (!error) data->frozen = 1; diff --git a/kernel/printk.c b/kernel/printk.c index ddebdcc58..63eb290e2 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -26,8 +26,8 @@ #include #include #include -#include #include /* For in_interrupt() */ +#include #include #include #include @@ -56,7 +56,7 @@ int console_printk[4] = { DEFAULT_CONSOLE_LOGLEVEL, /* default_console_loglevel */ }; -EXPORT_UNUSED_SYMBOL(console_printk); /* June 2006 */ +EXPORT_SYMBOL(console_printk); /* * Low lever drivers may need that to know if they can schedule in @@ -81,7 +81,8 @@ struct console *console_drivers; * path in the console code where we end up in places I want * locked without the console sempahore held */ -static int console_locked, console_suspended; +static int console_locked; +int console_suspended; /* * logbuf_lock protects log_buf, log_start, log_end, con_start and logged_chars @@ -354,9 +355,7 @@ static void __call_console_drivers(unsigned long start, unsigned long end) struct console *con; for (con = console_drivers; con; con = con->next) { - if ((con->flags & CON_ENABLED) && con->write && - (cpu_online(smp_processor_id()) || - (con->flags & CON_ANYTIME))) + if ((con->flags & CON_ENABLED) && con->write) con->write(con, &LOG_BUF(start), end - start); } } @@ -466,7 +465,6 @@ static int printk_time = 1; #else static int printk_time = 0; #endif -module_param(printk_time, int, S_IRUGO | S_IWUSR); static int __init printk_time_setup(char *str) { @@ -483,18 +481,6 @@ __attribute__((weak)) unsigned long long printk_clock(void) return sched_clock(); } -/* Check if we have any console registered that can be called early in boot. */ -static int have_callable_console(void) -{ - struct console *con; - - for (con = console_drivers; con; con = con->next) - if (con->flags & CON_ANYTIME) - return 1; - - return 0; -} - /** * printk - print a kernel message * @fmt: format string @@ -550,9 +536,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) zap_locks(); /* This stops the holder of console_sem just where we want him */ - local_irq_save(flags); - lockdep_off(); - spin_lock(&logbuf_lock); + spin_lock_irqsave(&logbuf_lock, flags); printk_cpu = smp_processor_id(); /* Emit the output into the temporary buffer */ @@ -615,31 +599,27 @@ asmlinkage int vprintk(const char *fmt, va_list args) log_level_unknown = 1; } - if (!down_trylock(&console_sem)) { + if (!cpu_online(smp_processor_id())) { /* - * We own the drivers. We can drop the spinlock and - * let release_console_sem() print the text, maybe ... + * Some console drivers may assume that per-cpu resources have + * been allocated. So don't allow them to be called by this + * CPU until it is officially up. We shouldn't be calling into + * random console drivers on a CPU which doesn't exist yet.. */ - console_locked = 1; printk_cpu = UINT_MAX; - spin_unlock(&logbuf_lock); - + spin_unlock_irqrestore(&logbuf_lock, flags); + goto out; + } + if (!down_trylock(&console_sem)) { + console_locked = 1; /* - * Console drivers may assume that per-cpu resources have - * been allocated. So unless they're explicitly marked as - * being able to cope (CON_ANYTIME) don't call them until - * this CPU is officially up. + * We own the drivers. We can drop the spinlock and let + * release_console_sem() print the text */ - if (cpu_online(smp_processor_id()) || have_callable_console()) { - console_may_schedule = 0; - release_console_sem(); - } else { - /* Release by hand to avoid flushing the buffer. */ - console_locked = 0; - up(&console_sem); - } - lockdep_on(); - local_irq_restore(flags); + printk_cpu = UINT_MAX; + spin_unlock_irqrestore(&logbuf_lock, flags); + console_may_schedule = 0; + release_console_sem(); } else { /* * Someone else owns the drivers. We drop the spinlock, which @@ -647,11 +627,9 @@ asmlinkage int vprintk(const char *fmt, va_list args) * console drivers with the output which we just produced. */ printk_cpu = UINT_MAX; - spin_unlock(&logbuf_lock); - lockdep_on(); - local_irq_restore(flags); + spin_unlock_irqrestore(&logbuf_lock, flags); } - +out: preempt_enable(); return printed_len; } @@ -753,23 +731,6 @@ int __init add_preferred_console(char *name, int idx, char *options) return 0; } -/** - * suspend_console - suspend the console subsystem - * - * This disables printk() while we go into suspend states - */ -void suspend_console(void) -{ - acquire_console_sem(); - console_suspended = 1; -} - -void resume_console(void) -{ - console_suspended = 0; - release_console_sem(); -} - /** * acquire_console_sem - lock the console system for exclusive use. * @@ -780,11 +741,12 @@ void resume_console(void) */ void acquire_console_sem(void) { - BUG_ON(in_interrupt()); if (console_suspended) { down(&secondary_console_sem); return; } + + BUG_ON(in_interrupt()); down(&console_sem); console_locked = 1; console_may_schedule = 1; @@ -805,7 +767,7 @@ int is_console_locked(void) { return console_locked; } -EXPORT_UNUSED_SYMBOL(is_console_locked); /* June 2006 */ +EXPORT_SYMBOL(is_console_locked); /** * release_console_sem - unlock the console system @@ -832,8 +794,6 @@ void release_console_sem(void) return; } - console_may_schedule = 0; - for ( ; ; ) { spin_lock_irqsave(&logbuf_lock, flags); wake_klogd |= log_start - log_end; @@ -847,17 +807,11 @@ void release_console_sem(void) local_irq_restore(flags); } console_locked = 0; + console_may_schedule = 0; up(&console_sem); spin_unlock_irqrestore(&logbuf_lock, flags); - if (wake_klogd && !oops_in_progress && waitqueue_active(&log_wait)) { - /* - * If we printk from within the lock dependency code, - * from within the scheduler code, then do not lock - * up due to self-recursion: - */ - if (!lockdep_internal()) - wake_up_interruptible(&log_wait); - } + if (wake_klogd && !oops_in_progress && waitqueue_active(&log_wait)) + wake_up_interruptible(&log_wait); } EXPORT_SYMBOL(release_console_sem); diff --git a/kernel/profile.c b/kernel/profile.c index d5bd75e75..68afe121e 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -13,6 +13,7 @@ * to resolve timer interrupt livelocks, William Irwin, Oracle, 2004 */ +#include #include #include #include @@ -298,7 +299,7 @@ out: } #ifdef CONFIG_HOTPLUG_CPU -static int __devinit profile_cpu_callback(struct notifier_block *info, +static int profile_cpu_callback(struct notifier_block *info, unsigned long action, void *__cpu) { int node, cpu = (unsigned long)__cpu; diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 80e780e50..78119a7eb 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -29,7 +29,7 @@ * * Must be called with the tasklist lock write-held. */ -void __ptrace_link(struct task_struct *child, struct task_struct *new_parent) +void __ptrace_link(task_t *child, task_t *new_parent) { BUG_ON(!list_empty(&child->ptrace_list)); if (child->parent == new_parent) @@ -47,7 +47,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent) * TASK_TRACED, resume it now. * Requires that irqs be disabled. */ -void ptrace_untrace(struct task_struct *child) +void ptrace_untrace(task_t *child) { spin_lock(&child->sighand->siglock); if (child->state == TASK_TRACED) { @@ -66,7 +66,7 @@ void ptrace_untrace(struct task_struct *child) * * Must be called with the tasklist lock write-held. */ -void __ptrace_unlink(struct task_struct *child) +void __ptrace_unlink(task_t *child) { BUG_ON(!child->ptrace); @@ -117,18 +117,8 @@ int ptrace_check_attach(struct task_struct *child, int kill) int __ptrace_may_attach(struct task_struct *task) { - /* May we inspect the given task? - * This check is used both for attaching with ptrace - * and for allowing access to sensitive information in /proc. - * - * ptrace_attach denies several cases that /proc allows - * because setting up the necessary parent/child relationship - * or halting the specified task is impossible. - */ - int dumpable = 0; - /* Don't let security modules deny introspection */ - if (task == current) - return 0; + if (!task->mm) + return -EPERM; if (((current->uid != task->euid) || (current->uid != task->suid) || (current->uid != task->uid) || @@ -137,9 +127,7 @@ int __ptrace_may_attach(struct task_struct *task) (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) return -EPERM; smp_rmb(); - if (task->mm) - dumpable = task->mm->dumpable; - if (!dumpable && !capable(CAP_SYS_PTRACE)) + if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) return -EPERM; return security_ptrace(current, task); @@ -185,8 +173,6 @@ repeat: goto repeat; } - if (!task->mm) - goto bad; /* the same process cannot be attached many times */ if (task->ptrace & PT_PTRACED) goto bad; @@ -211,7 +197,7 @@ out: return retval; } -static inline void __ptrace_detach(struct task_struct *child, unsigned int data) +void __ptrace_detach(struct task_struct *child, unsigned int data) { child->exit_code = data; /* .. re-parent .. */ @@ -230,7 +216,6 @@ int ptrace_detach(struct task_struct *child, unsigned int data) ptrace_disable(child); write_lock_irq(&tasklist_lock); - /* protect against de_thread()->release_task() */ if (child->ptrace) __ptrace_detach(child, data); write_unlock_irq(&tasklist_lock); diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 523e46483..2058f88c7 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -53,13 +53,13 @@ static struct rcu_ctrlblk rcu_ctrlblk = { .cur = -300, .completed = -300, - .lock = __SPIN_LOCK_UNLOCKED(&rcu_ctrlblk.lock), + .lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE, }; static struct rcu_ctrlblk rcu_bh_ctrlblk = { .cur = -300, .completed = -300, - .lock = __SPIN_LOCK_UNLOCKED(&rcu_bh_ctrlblk.lock), + .lock = SPIN_LOCK_UNLOCKED, .cpumask = CPU_MASK_NONE, }; @@ -182,15 +182,6 @@ long rcu_batches_completed(void) return rcu_ctrlblk.completed; } -/* - * Return the number of RCU batches processed thus far. Useful - * for debug and statistics. - */ -long rcu_batches_completed_bh(void) -{ - return rcu_bh_ctrlblk.completed; -} - static void rcu_barrier_callback(struct rcu_head *notused) { if (atomic_dec_and_test(&rcu_barrier_cpu_count)) @@ -241,16 +232,12 @@ static void rcu_do_batch(struct rcu_data *rdp) next = rdp->donelist = list->next; list->func(list); list = next; + rdp->qlen--; if (++count >= rdp->blimit) break; } - - local_irq_disable(); - rdp->qlen -= count; - local_irq_enable(); if (rdp->blimit == INT_MAX && rdp->qlen <= qlowmark) rdp->blimit = blimit; - if (!rdp->donelist) rdp->donetail = &rdp->donelist; else @@ -552,7 +539,7 @@ static void __devinit rcu_online_cpu(int cpu) tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); } -static int __cpuinit rcu_cpu_notify(struct notifier_block *self, +static int rcu_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { long cpu = (long)hcpu; @@ -569,7 +556,7 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata rcu_nb = { +static struct notifier_block rcu_nb = { .notifier_call = rcu_cpu_notify, }; @@ -625,6 +612,14 @@ void synchronize_rcu(void) wait_for_completion(&rcu.completion); } +/* + * Deprecated, use synchronize_rcu() or synchronize_sched() instead. + */ +void synchronize_kernel(void) +{ + synchronize_rcu(); +} + module_param(blimit, int, 0); module_param(qhimark, int, 0); module_param(qlowmark, int, 0); @@ -632,7 +627,7 @@ module_param(qlowmark, int, 0); module_param(rsinterval, int, 0); #endif EXPORT_SYMBOL_GPL(rcu_batches_completed); -EXPORT_SYMBOL_GPL(rcu_batches_completed_bh); -EXPORT_SYMBOL_GPL(call_rcu); -EXPORT_SYMBOL_GPL(call_rcu_bh); +EXPORT_SYMBOL_GPL_FUTURE(call_rcu); /* WARNING: GPL-only in April 2006. */ +EXPORT_SYMBOL_GPL_FUTURE(call_rcu_bh); /* WARNING: GPL-only in April 2006. */ EXPORT_SYMBOL_GPL(synchronize_rcu); +EXPORT_SYMBOL_GPL_FUTURE(synchronize_kernel); /* WARNING: GPL-only in April 2006. */ diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 4d1c3d247..8154e7589 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -1,5 +1,5 @@ /* - * Read-Copy Update module-based torture test facility + * Read-Copy Update /proc-based torture test facility * * 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 @@ -53,7 +53,6 @@ static int stat_interval; /* Interval between stats, in seconds. */ static int verbose; /* Print more debug info. */ static int test_no_idle_hz; /* Test RCU's support for tickless idle CPUs. */ static int shuffle_interval = 5; /* Interval between shuffles (in sec)*/ -static char *torture_type = "rcu"; /* What to torture. */ module_param(nreaders, int, 0); MODULE_PARM_DESC(nreaders, "Number of RCU reader threads"); @@ -65,16 +64,13 @@ module_param(test_no_idle_hz, bool, 0); MODULE_PARM_DESC(test_no_idle_hz, "Test support for tickless idle CPUs"); module_param(shuffle_interval, int, 0); MODULE_PARM_DESC(shuffle_interval, "Number of seconds between shuffles"); -module_param(torture_type, charp, 0); -MODULE_PARM_DESC(torture_type, "Type of RCU to torture (rcu, rcu_bh)"); - -#define TORTURE_FLAG "-torture:" +#define TORTURE_FLAG "rcutorture: " #define PRINTK_STRING(s) \ - do { printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0) + do { printk(KERN_ALERT TORTURE_FLAG s "\n"); } while (0) #define VERBOSE_PRINTK_STRING(s) \ - do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0) + do { if (verbose) printk(KERN_ALERT TORTURE_FLAG s "\n"); } while (0) #define VERBOSE_PRINTK_ERRSTRING(s) \ - do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0) + do { if (verbose) printk(KERN_ALERT TORTURE_FLAG "!!! " s "\n"); } while (0) static char printk_buf[4096]; @@ -143,71 +139,6 @@ rcu_torture_free(struct rcu_torture *p) spin_unlock_bh(&rcu_torture_lock); } -struct rcu_random_state { - unsigned long rrs_state; - unsigned long rrs_count; -}; - -#define RCU_RANDOM_MULT 39916801 /* prime */ -#define RCU_RANDOM_ADD 479001701 /* prime */ -#define RCU_RANDOM_REFRESH 10000 - -#define DEFINE_RCU_RANDOM(name) struct rcu_random_state name = { 0, 0 } - -/* - * Crude but fast random-number generator. Uses a linear congruential - * generator, with occasional help from get_random_bytes(). - */ -static long -rcu_random(struct rcu_random_state *rrsp) -{ - long refresh; - - if (--rrsp->rrs_count < 0) { - get_random_bytes(&refresh, sizeof(refresh)); - rrsp->rrs_state += refresh; - rrsp->rrs_count = RCU_RANDOM_REFRESH; - } - rrsp->rrs_state = rrsp->rrs_state * RCU_RANDOM_MULT + RCU_RANDOM_ADD; - return swahw32(rrsp->rrs_state); -} - -/* - * Operations vector for selecting different types of tests. - */ - -struct rcu_torture_ops { - void (*init)(void); - void (*cleanup)(void); - int (*readlock)(void); - void (*readunlock)(int idx); - int (*completed)(void); - void (*deferredfree)(struct rcu_torture *p); - int (*stats)(char *page); - char *name; -}; -static struct rcu_torture_ops *cur_ops = NULL; - -/* - * Definitions for rcu torture testing. - */ - -static int rcu_torture_read_lock(void) -{ - rcu_read_lock(); - return 0; -} - -static void rcu_torture_read_unlock(int idx) -{ - rcu_read_unlock(); -} - -static int rcu_torture_completed(void) -{ - return rcu_batches_completed(); -} - static void rcu_torture_cb(struct rcu_head *p) { @@ -227,64 +158,38 @@ rcu_torture_cb(struct rcu_head *p) rp->rtort_mbtest = 0; rcu_torture_free(rp); } else - cur_ops->deferredfree(rp); -} - -static void rcu_torture_deferred_free(struct rcu_torture *p) -{ - call_rcu(&p->rtort_rcu, rcu_torture_cb); + call_rcu(p, rcu_torture_cb); } -static struct rcu_torture_ops rcu_ops = { - .init = NULL, - .cleanup = NULL, - .readlock = rcu_torture_read_lock, - .readunlock = rcu_torture_read_unlock, - .completed = rcu_torture_completed, - .deferredfree = rcu_torture_deferred_free, - .stats = NULL, - .name = "rcu" +struct rcu_random_state { + unsigned long rrs_state; + unsigned long rrs_count; }; -/* - * Definitions for rcu_bh torture testing. - */ - -static int rcu_bh_torture_read_lock(void) -{ - rcu_read_lock_bh(); - return 0; -} +#define RCU_RANDOM_MULT 39916801 /* prime */ +#define RCU_RANDOM_ADD 479001701 /* prime */ +#define RCU_RANDOM_REFRESH 10000 -static void rcu_bh_torture_read_unlock(int idx) -{ - rcu_read_unlock_bh(); -} +#define DEFINE_RCU_RANDOM(name) struct rcu_random_state name = { 0, 0 } -static int rcu_bh_torture_completed(void) +/* + * Crude but fast random-number generator. Uses a linear congruential + * generator, with occasional help from get_random_bytes(). + */ +static long +rcu_random(struct rcu_random_state *rrsp) { - return rcu_batches_completed_bh(); -} + long refresh; -static void rcu_bh_torture_deferred_free(struct rcu_torture *p) -{ - call_rcu_bh(&p->rtort_rcu, rcu_torture_cb); + if (--rrsp->rrs_count < 0) { + get_random_bytes(&refresh, sizeof(refresh)); + rrsp->rrs_state += refresh; + rrsp->rrs_count = RCU_RANDOM_REFRESH; + } + rrsp->rrs_state = rrsp->rrs_state * RCU_RANDOM_MULT + RCU_RANDOM_ADD; + return swahw32(rrsp->rrs_state); } -static struct rcu_torture_ops rcu_bh_ops = { - .init = NULL, - .cleanup = NULL, - .readlock = rcu_bh_torture_read_lock, - .readunlock = rcu_bh_torture_read_unlock, - .completed = rcu_bh_torture_completed, - .deferredfree = rcu_bh_torture_deferred_free, - .stats = NULL, - .name = "rcu_bh" -}; - -static struct rcu_torture_ops *torture_ops[] = - { &rcu_ops, &rcu_bh_ops, NULL }; - /* * RCU torture writer kthread. Repeatedly substitutes a new structure * for that pointed to by rcu_torture_current, freeing the old structure @@ -304,6 +209,8 @@ rcu_torture_writer(void *arg) do { schedule_timeout_uninterruptible(1); + if (rcu_batches_completed() == oldbatch) + continue; if ((rp = rcu_torture_alloc()) == NULL) continue; rp->rtort_pipe_count = 0; @@ -318,10 +225,10 @@ rcu_torture_writer(void *arg) i = RCU_TORTURE_PIPE_LEN; atomic_inc(&rcu_torture_wcount[i]); old_rp->rtort_pipe_count++; - cur_ops->deferredfree(old_rp); + call_rcu(&old_rp->rtort_rcu, rcu_torture_cb); } rcu_torture_current_version++; - oldbatch = cur_ops->completed(); + oldbatch = rcu_batches_completed(); } while (!kthread_should_stop() && !fullstop); VERBOSE_PRINTK_STRING("rcu_torture_writer task stopping"); while (!kthread_should_stop()) @@ -339,7 +246,6 @@ static int rcu_torture_reader(void *arg) { int completed; - int idx; DEFINE_RCU_RANDOM(rand); struct rcu_torture *p; int pipe_count; @@ -348,12 +254,12 @@ rcu_torture_reader(void *arg) set_user_nice(current, 19); do { - idx = cur_ops->readlock(); - completed = cur_ops->completed(); + rcu_read_lock(); + completed = rcu_batches_completed(); p = rcu_dereference(rcu_torture_current); if (p == NULL) { /* Wait for rcu_torture_writer to get underway */ - cur_ops->readunlock(idx); + rcu_read_unlock(); schedule_timeout_interruptible(HZ); continue; } @@ -367,14 +273,14 @@ rcu_torture_reader(void *arg) pipe_count = RCU_TORTURE_PIPE_LEN; } ++__get_cpu_var(rcu_torture_count)[pipe_count]; - completed = cur_ops->completed() - completed; + completed = rcu_batches_completed() - completed; if (completed > RCU_TORTURE_PIPE_LEN) { /* Should not happen, but... */ completed = RCU_TORTURE_PIPE_LEN; } ++__get_cpu_var(rcu_torture_batch)[completed]; preempt_enable(); - cur_ops->readunlock(idx); + rcu_read_unlock(); schedule(); } while (!kthread_should_stop() && !fullstop); VERBOSE_PRINTK_STRING("rcu_torture_reader task stopping"); @@ -405,7 +311,7 @@ rcu_torture_printk(char *page) if (pipesummary[i] != 0) break; } - cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG); + cnt += sprintf(&page[cnt], "rcutorture: "); cnt += sprintf(&page[cnt], "rtc: %p ver: %ld tfle: %d rta: %d rtaf: %d rtf: %d " "rtmbe: %d", @@ -418,7 +324,7 @@ rcu_torture_printk(char *page) atomic_read(&n_rcu_torture_mberror)); if (atomic_read(&n_rcu_torture_mberror) != 0) cnt += sprintf(&page[cnt], " !!!"); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); + cnt += sprintf(&page[cnt], "\nrcutorture: "); if (i > 1) { cnt += sprintf(&page[cnt], "!!! "); atomic_inc(&n_rcu_torture_error); @@ -426,19 +332,17 @@ rcu_torture_printk(char *page) cnt += sprintf(&page[cnt], "Reader Pipe: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) cnt += sprintf(&page[cnt], " %ld", pipesummary[i]); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); + cnt += sprintf(&page[cnt], "\nrcutorture: "); cnt += sprintf(&page[cnt], "Reader Batch: "); - for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) + for (i = 0; i < RCU_TORTURE_PIPE_LEN; i++) cnt += sprintf(&page[cnt], " %ld", batchsummary[i]); - cnt += sprintf(&page[cnt], "\n%s%s ", torture_type, TORTURE_FLAG); + cnt += sprintf(&page[cnt], "\nrcutorture: "); cnt += sprintf(&page[cnt], "Free-Block Circulation: "); for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { cnt += sprintf(&page[cnt], " %d", atomic_read(&rcu_torture_wcount[i])); } cnt += sprintf(&page[cnt], "\n"); - if (cur_ops->stats != NULL) - cnt += cur_ops->stats(&page[cnt]); return cnt; } @@ -540,11 +444,11 @@ rcu_torture_shuffle(void *arg) static inline void rcu_torture_print_module_parms(char *tag) { - printk(KERN_ALERT "%s" TORTURE_FLAG "--- %s: nreaders=%d " + printk(KERN_ALERT TORTURE_FLAG "--- %s: nreaders=%d " "stat_interval=%d verbose=%d test_no_idle_hz=%d " "shuffle_interval = %d\n", - torture_type, tag, nrealreaders, stat_interval, verbose, - test_no_idle_hz, shuffle_interval); + tag, nrealreaders, stat_interval, verbose, test_no_idle_hz, + shuffle_interval); } static void @@ -589,9 +493,6 @@ rcu_torture_cleanup(void) rcu_barrier(); rcu_torture_stats_print(); /* -After- the stats thread is stopped! */ - - if (cur_ops->cleanup != NULL) - cur_ops->cleanup(); if (atomic_read(&n_rcu_torture_error)) rcu_torture_print_module_parms("End of test: FAILURE"); else @@ -607,20 +508,6 @@ rcu_torture_init(void) /* Process args and tell the world that the torturer is on the job. */ - for (i = 0; cur_ops = torture_ops[i], cur_ops != NULL; i++) { - cur_ops = torture_ops[i]; - if (strcmp(torture_type, cur_ops->name) == 0) { - break; - } - } - if (cur_ops == NULL) { - printk(KERN_ALERT "rcutorture: invalid torture type: \"%s\"\n", - torture_type); - return (-EINVAL); - } - if (cur_ops->init != NULL) - cur_ops->init(); /* no "goto unwind" prior to this point!!! */ - if (nreaders >= 0) nrealreaders = nreaders; else diff --git a/kernel/relay.c b/kernel/relay.c index 85786ff2a..33345e734 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -669,7 +669,7 @@ EXPORT_SYMBOL_GPL(relay_flush); */ static int relay_file_open(struct inode *inode, struct file *filp) { - struct rchan_buf *buf = inode->i_private; + struct rchan_buf *buf = inode->u.generic_ip; kref_get(&buf->kref); filp->private_data = buf; diff --git a/kernel/resource.c b/kernel/resource.c index 46286434a..e3080fcc6 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -7,6 +7,7 @@ * Arbitrary resource management. */ +#include #include #include #include @@ -22,18 +23,20 @@ struct resource ioport_resource = { .name = "PCI IO", - .start = 0, + .start = 0x0000, .end = IO_SPACE_LIMIT, .flags = IORESOURCE_IO, }; + EXPORT_SYMBOL(ioport_resource); struct resource iomem_resource = { .name = "PCI mem", - .start = 0, - .end = -1, + .start = 0UL, + .end = ~0UL, .flags = IORESOURCE_MEM, }; + EXPORT_SYMBOL(iomem_resource); static DEFINE_RWLOCK(resource_lock); @@ -80,10 +83,10 @@ static int r_show(struct seq_file *m, void *v) for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent) if (p->parent == root) break; - seq_printf(m, "%*s%0*llx-%0*llx : %s\n", + seq_printf(m, "%*s%0*lx-%0*lx : %s\n", depth * 2, "", - width, (unsigned long long) r->start, - width, (unsigned long long) r->end, + width, r->start, + width, r->end, r->name ? r->name : ""); return 0; } @@ -148,8 +151,8 @@ __initcall(ioresources_init); /* Return the conflict entry if you can't request it */ static struct resource * __request_resource(struct resource *root, struct resource *new) { - resource_size_t start = new->start; - resource_size_t end = new->end; + unsigned long start = new->start; + unsigned long end = new->end; struct resource *tmp, **p; if (end < start) @@ -229,55 +232,15 @@ int release_resource(struct resource *old) EXPORT_SYMBOL(release_resource); -#ifdef CONFIG_MEMORY_HOTPLUG -/* - * Finds the lowest memory reosurce exists within [res->start.res->end) - * the caller must specify res->start, res->end, res->flags. - * If found, returns 0, res is overwritten, if not found, returns -1. - */ -int find_next_system_ram(struct resource *res) -{ - resource_size_t start, end; - struct resource *p; - - BUG_ON(!res); - - start = res->start; - end = res->end; - BUG_ON(start >= end); - - read_lock(&resource_lock); - for (p = iomem_resource.child; p ; p = p->sibling) { - /* system ram is just marked as IORESOURCE_MEM */ - if (p->flags != res->flags) - continue; - if (p->start > end) { - p = NULL; - break; - } - if ((p->end >= start) && (p->start < end)) - break; - } - read_unlock(&resource_lock); - if (!p) - return -1; - /* copy data */ - if (res->start < p->start) - res->start = p->start; - if (res->end > p->end) - res->end = p->end; - return 0; -} -#endif - /* * Find empty slot in the resource tree given range and alignment. */ static int find_resource(struct resource *root, struct resource *new, - resource_size_t size, resource_size_t min, - resource_size_t max, resource_size_t align, + unsigned long size, + unsigned long min, unsigned long max, + unsigned long align, void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), + unsigned long, unsigned long), void *alignf_data) { struct resource *this = root->child; @@ -319,10 +282,11 @@ static int find_resource(struct resource *root, struct resource *new, * Allocate empty slot in the resource tree given range and alignment. */ int allocate_resource(struct resource *root, struct resource *new, - resource_size_t size, resource_size_t min, - resource_size_t max, resource_size_t align, + unsigned long size, + unsigned long min, unsigned long max, + unsigned long align, void (*alignf)(void *, struct resource *, - resource_size_t, resource_size_t), + unsigned long, unsigned long), void *alignf_data) { int err; @@ -407,15 +371,17 @@ int insert_resource(struct resource *parent, struct resource *new) return result; } +EXPORT_SYMBOL(insert_resource); + /* * Given an existing resource, change its start and size to match the * arguments. Returns -EBUSY if it can't fit. Existing children of * the resource are assumed to be immutable. */ -int adjust_resource(struct resource *res, resource_size_t start, resource_size_t size) +int adjust_resource(struct resource *res, unsigned long start, unsigned long size) { struct resource *tmp, *parent = res->parent; - resource_size_t end = start + size - 1; + unsigned long end = start + size - 1; int result = -EBUSY; write_lock(&resource_lock); @@ -462,9 +428,7 @@ EXPORT_SYMBOL(adjust_resource); * * Release-region releases a matching busy region. */ -struct resource * __request_region(struct resource *parent, - resource_size_t start, resource_size_t n, - const char *name) +struct resource * __request_region(struct resource *parent, unsigned long start, unsigned long n, const char *name) { struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); @@ -500,8 +464,7 @@ struct resource * __request_region(struct resource *parent, EXPORT_SYMBOL(__request_region); -int __check_region(struct resource *parent, resource_size_t start, - resource_size_t n) +int __check_region(struct resource *parent, unsigned long start, unsigned long n) { struct resource * res; @@ -516,11 +479,10 @@ int __check_region(struct resource *parent, resource_size_t start, EXPORT_SYMBOL(__check_region); -void __release_region(struct resource *parent, resource_size_t start, - resource_size_t n) +void __release_region(struct resource *parent, unsigned long start, unsigned long n) { struct resource **p; - resource_size_t end; + unsigned long end; p = &parent->child; end = start + n - 1; @@ -549,9 +511,7 @@ void __release_region(struct resource *parent, resource_size_t start, write_unlock(&resource_lock); - printk(KERN_WARNING "Trying to free nonexistent resource " - "<%016llx-%016llx>\n", (unsigned long long)start, - (unsigned long long)end); + printk(KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n", start, end); } EXPORT_SYMBOL(__release_region); diff --git a/kernel/rtmutex-debug.c b/kernel/rtmutex-debug.c deleted file mode 100644 index da8d6bf46..000000000 --- a/kernel/rtmutex-debug.c +++ /dev/null @@ -1,241 +0,0 @@ -/* - * RT-Mutexes: blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner: - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006 Timesys Corp., Thomas Gleixner - * - * This code is based on the rt.c implementation in the preempt-rt tree. - * Portions of said code are - * - * Copyright (C) 2004 LynuxWorks, Inc., Igor Manyilov, Bill Huey - * Copyright (C) 2006 Esben Nielsen - * Copyright (C) 2006 Kihon Technologies Inc., - * Steven Rostedt - * - * See rt.c in preempt-rt for proper credits and further information - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "rtmutex_common.h" - -#ifdef CONFIG_DEBUG_RT_MUTEXES -# include "rtmutex-debug.h" -#else -# include "rtmutex.h" -#endif - -# define TRACE_WARN_ON(x) WARN_ON(x) -# define TRACE_BUG_ON(x) BUG_ON(x) - -# define TRACE_OFF() \ -do { \ - if (rt_trace_on) { \ - rt_trace_on = 0; \ - console_verbose(); \ - if (spin_is_locked(¤t->pi_lock)) \ - spin_unlock(¤t->pi_lock); \ - } \ -} while (0) - -# define TRACE_OFF_NOLOCK() \ -do { \ - if (rt_trace_on) { \ - rt_trace_on = 0; \ - console_verbose(); \ - } \ -} while (0) - -# define TRACE_BUG_LOCKED() \ -do { \ - TRACE_OFF(); \ - BUG(); \ -} while (0) - -# define TRACE_WARN_ON_LOCKED(c) \ -do { \ - if (unlikely(c)) { \ - TRACE_OFF(); \ - WARN_ON(1); \ - } \ -} while (0) - -# define TRACE_BUG_ON_LOCKED(c) \ -do { \ - if (unlikely(c)) \ - TRACE_BUG_LOCKED(); \ -} while (0) - -#ifdef CONFIG_SMP -# define SMP_TRACE_BUG_ON_LOCKED(c) TRACE_BUG_ON_LOCKED(c) -#else -# define SMP_TRACE_BUG_ON_LOCKED(c) do { } while (0) -#endif - -/* - * deadlock detection flag. We turn it off when we detect - * the first problem because we dont want to recurse back - * into the tracing code when doing error printk or - * executing a BUG(): - */ -int rt_trace_on = 1; - -void deadlock_trace_off(void) -{ - rt_trace_on = 0; -} - -static void printk_task(struct task_struct *p) -{ - if (p) - printk("%16s:%5d [%p, %3d]", p->comm, p->pid, p, p->prio); - else - printk(""); -} - -static void printk_lock(struct rt_mutex *lock, int print_owner) -{ - if (lock->name) - printk(" [%p] {%s}\n", - lock, lock->name); - else - printk(" [%p] {%s:%d}\n", - lock, lock->file, lock->line); - - if (print_owner && rt_mutex_owner(lock)) { - printk(".. ->owner: %p\n", lock->owner); - printk(".. held by: "); - printk_task(rt_mutex_owner(lock)); - printk("\n"); - } -} - -void rt_mutex_debug_task_free(struct task_struct *task) -{ - WARN_ON(!plist_head_empty(&task->pi_waiters)); - WARN_ON(task->pi_blocked_on); -} - -/* - * We fill out the fields in the waiter to store the information about - * the deadlock. We print when we return. act_waiter can be NULL in - * case of a remove waiter operation. - */ -void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *act_waiter, - struct rt_mutex *lock) -{ - struct task_struct *task; - - if (!rt_trace_on || detect || !act_waiter) - return; - - task = rt_mutex_owner(act_waiter->lock); - if (task && task != current) { - act_waiter->deadlock_task_pid = task->pid; - act_waiter->deadlock_lock = lock; - } -} - -void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter) -{ - struct task_struct *task; - - if (!waiter->deadlock_lock || !rt_trace_on) - return; - - task = find_task_by_pid(waiter->deadlock_task_pid); - if (!task) - return; - - TRACE_OFF_NOLOCK(); - - printk("\n============================================\n"); - printk( "[ BUG: circular locking deadlock detected! ]\n"); - printk( "--------------------------------------------\n"); - printk("%s/%d is deadlocking current task %s/%d\n\n", - task->comm, task->pid, current->comm, current->pid); - - printk("\n1) %s/%d is trying to acquire this lock:\n", - current->comm, current->pid); - printk_lock(waiter->lock, 1); - - printk("\n2) %s/%d is blocked on this lock:\n", task->comm, task->pid); - printk_lock(waiter->deadlock_lock, 1); - - debug_show_held_locks(current); - debug_show_held_locks(task); - - printk("\n%s/%d's [blocked] stackdump:\n\n", task->comm, task->pid); - show_stack(task, NULL); - printk("\n%s/%d's [current] stackdump:\n\n", - current->comm, current->pid); - dump_stack(); - debug_show_all_locks(); - - printk("[ turning off deadlock detection." - "Please report this trace. ]\n\n"); - local_irq_disable(); -} - -void debug_rt_mutex_lock(struct rt_mutex *lock) -{ -} - -void debug_rt_mutex_unlock(struct rt_mutex *lock) -{ - TRACE_WARN_ON_LOCKED(rt_mutex_owner(lock) != current); -} - -void -debug_rt_mutex_proxy_lock(struct rt_mutex *lock, struct task_struct *powner) -{ -} - -void debug_rt_mutex_proxy_unlock(struct rt_mutex *lock) -{ - TRACE_WARN_ON_LOCKED(!rt_mutex_owner(lock)); -} - -void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter) -{ - memset(waiter, 0x11, sizeof(*waiter)); - plist_node_init(&waiter->list_entry, MAX_PRIO); - plist_node_init(&waiter->pi_list_entry, MAX_PRIO); -} - -void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter) -{ - TRACE_WARN_ON(!plist_node_empty(&waiter->list_entry)); - TRACE_WARN_ON(!plist_node_empty(&waiter->pi_list_entry)); - TRACE_WARN_ON(waiter->task); - memset(waiter, 0x22, sizeof(*waiter)); -} - -void debug_rt_mutex_init(struct rt_mutex *lock, const char *name) -{ - /* - * Make sure we are not reinitializing a held lock: - */ - debug_check_no_locks_freed((void *)lock, sizeof(*lock)); - lock->name = name; -} - -void -rt_mutex_deadlock_account_lock(struct rt_mutex *lock, struct task_struct *task) -{ -} - -void rt_mutex_deadlock_account_unlock(struct task_struct *task) -{ -} - diff --git a/kernel/rtmutex-debug.h b/kernel/rtmutex-debug.h deleted file mode 100644 index 14193d596..000000000 --- a/kernel/rtmutex-debug.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * RT-Mutexes: blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner: - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006, Timesys Corp., Thomas Gleixner - * - * This file contains macros used solely by rtmutex.c. Debug version. - */ - -extern void -rt_mutex_deadlock_account_lock(struct rt_mutex *lock, struct task_struct *task); -extern void rt_mutex_deadlock_account_unlock(struct task_struct *task); -extern void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter); -extern void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter); -extern void debug_rt_mutex_init(struct rt_mutex *lock, const char *name); -extern void debug_rt_mutex_lock(struct rt_mutex *lock); -extern void debug_rt_mutex_unlock(struct rt_mutex *lock); -extern void debug_rt_mutex_proxy_lock(struct rt_mutex *lock, - struct task_struct *powner); -extern void debug_rt_mutex_proxy_unlock(struct rt_mutex *lock); -extern void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *waiter, - struct rt_mutex *lock); -extern void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter); -# define debug_rt_mutex_reset_waiter(w) \ - do { (w)->deadlock_lock = NULL; } while (0) - -static inline int debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *waiter, - int detect) -{ - return (waiter != NULL); -} diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c deleted file mode 100644 index 6dcea9dd8..000000000 --- a/kernel/rtmutex-tester.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - * RT-Mutex-tester: scriptable tester for rt mutexes - * - * started by Thomas Gleixner: - * - * Copyright (C) 2006, Timesys Corp., Thomas Gleixner - * - */ -#include -#include -#include -#include -#include -#include -#include - -#include "rtmutex.h" - -#define MAX_RT_TEST_THREADS 8 -#define MAX_RT_TEST_MUTEXES 8 - -static spinlock_t rttest_lock; -static atomic_t rttest_event; - -struct test_thread_data { - int opcode; - int opdata; - int mutexes[MAX_RT_TEST_MUTEXES]; - int bkl; - int event; - struct sys_device sysdev; -}; - -static struct test_thread_data thread_data[MAX_RT_TEST_THREADS]; -static struct task_struct *threads[MAX_RT_TEST_THREADS]; -static struct rt_mutex mutexes[MAX_RT_TEST_MUTEXES]; - -enum test_opcodes { - RTTEST_NOP = 0, - RTTEST_SCHEDOT, /* 1 Sched other, data = nice */ - RTTEST_SCHEDRT, /* 2 Sched fifo, data = prio */ - RTTEST_LOCK, /* 3 Lock uninterruptible, data = lockindex */ - RTTEST_LOCKNOWAIT, /* 4 Lock uninterruptible no wait in wakeup, data = lockindex */ - RTTEST_LOCKINT, /* 5 Lock interruptible, data = lockindex */ - RTTEST_LOCKINTNOWAIT, /* 6 Lock interruptible no wait in wakeup, data = lockindex */ - RTTEST_LOCKCONT, /* 7 Continue locking after the wakeup delay */ - RTTEST_UNLOCK, /* 8 Unlock, data = lockindex */ - RTTEST_LOCKBKL, /* 9 Lock BKL */ - RTTEST_UNLOCKBKL, /* 10 Unlock BKL */ - RTTEST_SIGNAL, /* 11 Signal other test thread, data = thread id */ - RTTEST_RESETEVENT = 98, /* 98 Reset event counter */ - RTTEST_RESET = 99, /* 99 Reset all pending operations */ -}; - -static int handle_op(struct test_thread_data *td, int lockwakeup) -{ - int i, id, ret = -EINVAL; - - switch(td->opcode) { - - case RTTEST_NOP: - return 0; - - case RTTEST_LOCKCONT: - td->mutexes[td->opdata] = 1; - td->event = atomic_add_return(1, &rttest_event); - return 0; - - case RTTEST_RESET: - for (i = 0; i < MAX_RT_TEST_MUTEXES; i++) { - if (td->mutexes[i] == 4) { - rt_mutex_unlock(&mutexes[i]); - td->mutexes[i] = 0; - } - } - - if (!lockwakeup && td->bkl == 4) { - unlock_kernel(); - td->bkl = 0; - } - return 0; - - case RTTEST_RESETEVENT: - atomic_set(&rttest_event, 0); - return 0; - - default: - if (lockwakeup) - return ret; - } - - switch(td->opcode) { - - case RTTEST_LOCK: - case RTTEST_LOCKNOWAIT: - id = td->opdata; - if (id < 0 || id >= MAX_RT_TEST_MUTEXES) - return ret; - - td->mutexes[id] = 1; - td->event = atomic_add_return(1, &rttest_event); - rt_mutex_lock(&mutexes[id]); - td->event = atomic_add_return(1, &rttest_event); - td->mutexes[id] = 4; - return 0; - - case RTTEST_LOCKINT: - case RTTEST_LOCKINTNOWAIT: - id = td->opdata; - if (id < 0 || id >= MAX_RT_TEST_MUTEXES) - return ret; - - td->mutexes[id] = 1; - td->event = atomic_add_return(1, &rttest_event); - ret = rt_mutex_lock_interruptible(&mutexes[id], 0); - td->event = atomic_add_return(1, &rttest_event); - td->mutexes[id] = ret ? 0 : 4; - return ret ? -EINTR : 0; - - case RTTEST_UNLOCK: - id = td->opdata; - if (id < 0 || id >= MAX_RT_TEST_MUTEXES || td->mutexes[id] != 4) - return ret; - - td->event = atomic_add_return(1, &rttest_event); - rt_mutex_unlock(&mutexes[id]); - td->event = atomic_add_return(1, &rttest_event); - td->mutexes[id] = 0; - return 0; - - case RTTEST_LOCKBKL: - if (td->bkl) - return 0; - td->bkl = 1; - lock_kernel(); - td->bkl = 4; - return 0; - - case RTTEST_UNLOCKBKL: - if (td->bkl != 4) - break; - unlock_kernel(); - td->bkl = 0; - return 0; - - default: - break; - } - return ret; -} - -/* - * Schedule replacement for rtsem_down(). Only called for threads with - * PF_MUTEX_TESTER set. - * - * This allows us to have finegrained control over the event flow. - * - */ -void schedule_rt_mutex_test(struct rt_mutex *mutex) -{ - int tid, op, dat; - struct test_thread_data *td; - - /* We have to lookup the task */ - for (tid = 0; tid < MAX_RT_TEST_THREADS; tid++) { - if (threads[tid] == current) - break; - } - - BUG_ON(tid == MAX_RT_TEST_THREADS); - - td = &thread_data[tid]; - - op = td->opcode; - dat = td->opdata; - - switch (op) { - case RTTEST_LOCK: - case RTTEST_LOCKINT: - case RTTEST_LOCKNOWAIT: - case RTTEST_LOCKINTNOWAIT: - if (mutex != &mutexes[dat]) - break; - - if (td->mutexes[dat] != 1) - break; - - td->mutexes[dat] = 2; - td->event = atomic_add_return(1, &rttest_event); - break; - - case RTTEST_LOCKBKL: - default: - break; - } - - schedule(); - - - switch (op) { - case RTTEST_LOCK: - case RTTEST_LOCKINT: - if (mutex != &mutexes[dat]) - return; - - if (td->mutexes[dat] != 2) - return; - - td->mutexes[dat] = 3; - td->event = atomic_add_return(1, &rttest_event); - break; - - case RTTEST_LOCKNOWAIT: - case RTTEST_LOCKINTNOWAIT: - if (mutex != &mutexes[dat]) - return; - - if (td->mutexes[dat] != 2) - return; - - td->mutexes[dat] = 1; - td->event = atomic_add_return(1, &rttest_event); - return; - - case RTTEST_LOCKBKL: - return; - default: - return; - } - - td->opcode = 0; - - for (;;) { - set_current_state(TASK_INTERRUPTIBLE); - - if (td->opcode > 0) { - int ret; - - set_current_state(TASK_RUNNING); - ret = handle_op(td, 1); - set_current_state(TASK_INTERRUPTIBLE); - if (td->opcode == RTTEST_LOCKCONT) - break; - td->opcode = ret; - } - - /* Wait for the next command to be executed */ - schedule(); - } - - /* Restore previous command and data */ - td->opcode = op; - td->opdata = dat; -} - -static int test_func(void *data) -{ - struct test_thread_data *td = data; - int ret; - - current->flags |= PF_MUTEX_TESTER; - allow_signal(SIGHUP); - - for(;;) { - - set_current_state(TASK_INTERRUPTIBLE); - - if (td->opcode > 0) { - set_current_state(TASK_RUNNING); - ret = handle_op(td, 0); - set_current_state(TASK_INTERRUPTIBLE); - td->opcode = ret; - } - - /* Wait for the next command to be executed */ - schedule(); - try_to_freeze(); - - if (signal_pending(current)) - flush_signals(current); - - if(kthread_should_stop()) - break; - } - return 0; -} - -/** - * sysfs_test_command - interface for test commands - * @dev: thread reference - * @buf: command for actual step - * @count: length of buffer - * - * command syntax: - * - * opcode:data - */ -static ssize_t sysfs_test_command(struct sys_device *dev, const char *buf, - size_t count) -{ - struct sched_param schedpar; - struct test_thread_data *td; - char cmdbuf[32]; - int op, dat, tid, ret; - - td = container_of(dev, struct test_thread_data, sysdev); - tid = td->sysdev.id; - - /* strings from sysfs write are not 0 terminated! */ - if (count >= sizeof(cmdbuf)) - return -EINVAL; - - /* strip of \n: */ - if (buf[count-1] == '\n') - count--; - if (count < 1) - return -EINVAL; - - memcpy(cmdbuf, buf, count); - cmdbuf[count] = 0; - - if (sscanf(cmdbuf, "%d:%d", &op, &dat) != 2) - return -EINVAL; - - switch (op) { - case RTTEST_SCHEDOT: - schedpar.sched_priority = 0; - ret = sched_setscheduler(threads[tid], SCHED_NORMAL, &schedpar); - if (ret) - return ret; - set_user_nice(current, 0); - break; - - case RTTEST_SCHEDRT: - schedpar.sched_priority = dat; - ret = sched_setscheduler(threads[tid], SCHED_FIFO, &schedpar); - if (ret) - return ret; - break; - - case RTTEST_SIGNAL: - send_sig(SIGHUP, threads[tid], 0); - break; - - default: - if (td->opcode > 0) - return -EBUSY; - td->opdata = dat; - td->opcode = op; - wake_up_process(threads[tid]); - } - - return count; -} - -/** - * sysfs_test_status - sysfs interface for rt tester - * @dev: thread to query - * @buf: char buffer to be filled with thread status info - */ -static ssize_t sysfs_test_status(struct sys_device *dev, char *buf) -{ - struct test_thread_data *td; - struct task_struct *tsk; - char *curr = buf; - int i; - - td = container_of(dev, struct test_thread_data, sysdev); - tsk = threads[td->sysdev.id]; - - spin_lock(&rttest_lock); - - curr += sprintf(curr, - "O: %4d, E:%8d, S: 0x%08lx, P: %4d, N: %4d, B: %p, K: %d, M:", - td->opcode, td->event, tsk->state, - (MAX_RT_PRIO - 1) - tsk->prio, - (MAX_RT_PRIO - 1) - tsk->normal_prio, - tsk->pi_blocked_on, td->bkl); - - for (i = MAX_RT_TEST_MUTEXES - 1; i >=0 ; i--) - curr += sprintf(curr, "%d", td->mutexes[i]); - - spin_unlock(&rttest_lock); - - curr += sprintf(curr, ", T: %p, R: %p\n", tsk, - mutexes[td->sysdev.id].owner); - - return curr - buf; -} - -static SYSDEV_ATTR(status, 0600, sysfs_test_status, NULL); -static SYSDEV_ATTR(command, 0600, NULL, sysfs_test_command); - -static struct sysdev_class rttest_sysclass = { - set_kset_name("rttest"), -}; - -static int init_test_thread(int id) -{ - thread_data[id].sysdev.cls = &rttest_sysclass; - thread_data[id].sysdev.id = id; - - threads[id] = kthread_run(test_func, &thread_data[id], "rt-test-%d", id); - if (IS_ERR(threads[id])) - return PTR_ERR(threads[id]); - - return sysdev_register(&thread_data[id].sysdev); -} - -static int init_rttest(void) -{ - int ret, i; - - spin_lock_init(&rttest_lock); - - for (i = 0; i < MAX_RT_TEST_MUTEXES; i++) - rt_mutex_init(&mutexes[i]); - - ret = sysdev_class_register(&rttest_sysclass); - if (ret) - return ret; - - for (i = 0; i < MAX_RT_TEST_THREADS; i++) { - ret = init_test_thread(i); - if (ret) - break; - ret = sysdev_create_file(&thread_data[i].sysdev, &attr_status); - if (ret) - break; - ret = sysdev_create_file(&thread_data[i].sysdev, &attr_command); - if (ret) - break; - } - - printk("Initializing RT-Tester: %s\n", ret ? "Failed" : "OK" ); - - return ret; -} - -device_initcall(init_rttest); diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c deleted file mode 100644 index 3e13a1e58..000000000 --- a/kernel/rtmutex.c +++ /dev/null @@ -1,991 +0,0 @@ -/* - * RT-Mutexes: simple blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner. - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2005-2006 Timesys Corp., Thomas Gleixner - * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt - * Copyright (C) 2006 Esben Nielsen - * - * See Documentation/rt-mutex-design.txt for details. - */ -#include -#include -#include -#include - -#include "rtmutex_common.h" - -#ifdef CONFIG_DEBUG_RT_MUTEXES -# include "rtmutex-debug.h" -#else -# include "rtmutex.h" -#endif - -/* - * lock->owner state tracking: - * - * lock->owner holds the task_struct pointer of the owner. Bit 0 and 1 - * are used to keep track of the "owner is pending" and "lock has - * waiters" state. - * - * owner bit1 bit0 - * NULL 0 0 lock is free (fast acquire possible) - * NULL 0 1 invalid state - * NULL 1 0 Transitional State* - * NULL 1 1 invalid state - * taskpointer 0 0 lock is held (fast release possible) - * taskpointer 0 1 task is pending owner - * taskpointer 1 0 lock is held and has waiters - * taskpointer 1 1 task is pending owner and lock has more waiters - * - * Pending ownership is assigned to the top (highest priority) - * waiter of the lock, when the lock is released. The thread is woken - * up and can now take the lock. Until the lock is taken (bit 0 - * cleared) a competing higher priority thread can steal the lock - * which puts the woken up thread back on the waiters list. - * - * The fast atomic compare exchange based acquire and release is only - * possible when bit 0 and 1 of lock->owner are 0. - * - * (*) There's a small time where the owner can be NULL and the - * "lock has waiters" bit is set. This can happen when grabbing the lock. - * To prevent a cmpxchg of the owner releasing the lock, we need to set this - * bit before looking at the lock, hence the reason this is a transitional - * state. - */ - -static void -rt_mutex_set_owner(struct rt_mutex *lock, struct task_struct *owner, - unsigned long mask) -{ - unsigned long val = (unsigned long)owner | mask; - - if (rt_mutex_has_waiters(lock)) - val |= RT_MUTEX_HAS_WAITERS; - - lock->owner = (struct task_struct *)val; -} - -static inline void clear_rt_mutex_waiters(struct rt_mutex *lock) -{ - lock->owner = (struct task_struct *) - ((unsigned long)lock->owner & ~RT_MUTEX_HAS_WAITERS); -} - -static void fixup_rt_mutex_waiters(struct rt_mutex *lock) -{ - if (!rt_mutex_has_waiters(lock)) - clear_rt_mutex_waiters(lock); -} - -/* - * We can speed up the acquire/release, if the architecture - * supports cmpxchg and if there's no debugging state to be set up - */ -#if defined(__HAVE_ARCH_CMPXCHG) && !defined(CONFIG_DEBUG_RT_MUTEXES) -# define rt_mutex_cmpxchg(l,c,n) (cmpxchg(&l->owner, c, n) == c) -static inline void mark_rt_mutex_waiters(struct rt_mutex *lock) -{ - unsigned long owner, *p = (unsigned long *) &lock->owner; - - do { - owner = *p; - } while (cmpxchg(p, owner, owner | RT_MUTEX_HAS_WAITERS) != owner); -} -#else -# define rt_mutex_cmpxchg(l,c,n) (0) -static inline void mark_rt_mutex_waiters(struct rt_mutex *lock) -{ - lock->owner = (struct task_struct *) - ((unsigned long)lock->owner | RT_MUTEX_HAS_WAITERS); -} -#endif - -/* - * Calculate task priority from the waiter list priority - * - * Return task->normal_prio when the waiter list is empty or when - * the waiter is not allowed to do priority boosting - */ -int rt_mutex_getprio(struct task_struct *task) -{ - if (likely(!task_has_pi_waiters(task))) - return task->normal_prio; - - return min(task_top_pi_waiter(task)->pi_list_entry.prio, - task->normal_prio); -} - -/* - * Adjust the priority of a task, after its pi_waiters got modified. - * - * This can be both boosting and unboosting. task->pi_lock must be held. - */ -static void __rt_mutex_adjust_prio(struct task_struct *task) -{ - int prio = rt_mutex_getprio(task); - - if (task->prio != prio) - rt_mutex_setprio(task, prio); -} - -/* - * Adjust task priority (undo boosting). Called from the exit path of - * rt_mutex_slowunlock() and rt_mutex_slowlock(). - * - * (Note: We do this outside of the protection of lock->wait_lock to - * allow the lock to be taken while or before we readjust the priority - * of task. We do not use the spin_xx_mutex() variants here as we are - * outside of the debug path.) - */ -static void rt_mutex_adjust_prio(struct task_struct *task) -{ - unsigned long flags; - - spin_lock_irqsave(&task->pi_lock, flags); - __rt_mutex_adjust_prio(task); - spin_unlock_irqrestore(&task->pi_lock, flags); -} - -/* - * Max number of times we'll walk the boosting chain: - */ -int max_lock_depth = 1024; - -/* - * Adjust the priority chain. Also used for deadlock detection. - * Decreases task's usage by one - may thus free the task. - * Returns 0 or -EDEADLK. - */ -static int rt_mutex_adjust_prio_chain(struct task_struct *task, - int deadlock_detect, - struct rt_mutex *orig_lock, - struct rt_mutex_waiter *orig_waiter, - struct task_struct *top_task) -{ - struct rt_mutex *lock; - struct rt_mutex_waiter *waiter, *top_waiter = orig_waiter; - int detect_deadlock, ret = 0, depth = 0; - unsigned long flags; - - detect_deadlock = debug_rt_mutex_detect_deadlock(orig_waiter, - deadlock_detect); - - /* - * The (de)boosting is a step by step approach with a lot of - * pitfalls. We want this to be preemptible and we want hold a - * maximum of two locks per step. So we have to check - * carefully whether things change under us. - */ - again: - if (++depth > max_lock_depth) { - static int prev_max; - - /* - * Print this only once. If the admin changes the limit, - * print a new message when reaching the limit again. - */ - if (prev_max != max_lock_depth) { - prev_max = max_lock_depth; - printk(KERN_WARNING "Maximum lock depth %d reached " - "task: %s (%d)\n", max_lock_depth, - top_task->comm, top_task->pid); - } - put_task_struct(task); - - return deadlock_detect ? -EDEADLK : 0; - } - retry: - /* - * Task can not go away as we did a get_task() before ! - */ - spin_lock_irqsave(&task->pi_lock, flags); - - waiter = task->pi_blocked_on; - /* - * Check whether the end of the boosting chain has been - * reached or the state of the chain has changed while we - * dropped the locks. - */ - if (!waiter || !waiter->task) - goto out_unlock_pi; - - if (top_waiter && (!task_has_pi_waiters(task) || - top_waiter != task_top_pi_waiter(task))) - goto out_unlock_pi; - - /* - * When deadlock detection is off then we check, if further - * priority adjustment is necessary. - */ - if (!detect_deadlock && waiter->list_entry.prio == task->prio) - goto out_unlock_pi; - - lock = waiter->lock; - if (!spin_trylock(&lock->wait_lock)) { - spin_unlock_irqrestore(&task->pi_lock, flags); - cpu_relax(); - goto retry; - } - - /* Deadlock detection */ - if (lock == orig_lock || rt_mutex_owner(lock) == top_task) { - debug_rt_mutex_deadlock(deadlock_detect, orig_waiter, lock); - spin_unlock(&lock->wait_lock); - ret = deadlock_detect ? -EDEADLK : 0; - goto out_unlock_pi; - } - - top_waiter = rt_mutex_top_waiter(lock); - - /* Requeue the waiter */ - plist_del(&waiter->list_entry, &lock->wait_list); - waiter->list_entry.prio = task->prio; - plist_add(&waiter->list_entry, &lock->wait_list); - - /* Release the task */ - spin_unlock_irqrestore(&task->pi_lock, flags); - put_task_struct(task); - - /* Grab the next task */ - task = rt_mutex_owner(lock); - spin_lock_irqsave(&task->pi_lock, flags); - - if (waiter == rt_mutex_top_waiter(lock)) { - /* Boost the owner */ - plist_del(&top_waiter->pi_list_entry, &task->pi_waiters); - waiter->pi_list_entry.prio = waiter->list_entry.prio; - plist_add(&waiter->pi_list_entry, &task->pi_waiters); - __rt_mutex_adjust_prio(task); - - } else if (top_waiter == waiter) { - /* Deboost the owner */ - plist_del(&waiter->pi_list_entry, &task->pi_waiters); - waiter = rt_mutex_top_waiter(lock); - waiter->pi_list_entry.prio = waiter->list_entry.prio; - plist_add(&waiter->pi_list_entry, &task->pi_waiters); - __rt_mutex_adjust_prio(task); - } - - get_task_struct(task); - spin_unlock_irqrestore(&task->pi_lock, flags); - - top_waiter = rt_mutex_top_waiter(lock); - spin_unlock(&lock->wait_lock); - - if (!detect_deadlock && waiter != top_waiter) - goto out_put_task; - - goto again; - - out_unlock_pi: - spin_unlock_irqrestore(&task->pi_lock, flags); - out_put_task: - put_task_struct(task); - - return ret; -} - -/* - * Optimization: check if we can steal the lock from the - * assigned pending owner [which might not have taken the - * lock yet]: - */ -static inline int try_to_steal_lock(struct rt_mutex *lock) -{ - struct task_struct *pendowner = rt_mutex_owner(lock); - struct rt_mutex_waiter *next; - unsigned long flags; - - if (!rt_mutex_owner_pending(lock)) - return 0; - - if (pendowner == current) - return 1; - - spin_lock_irqsave(&pendowner->pi_lock, flags); - if (current->prio >= pendowner->prio) { - spin_unlock_irqrestore(&pendowner->pi_lock, flags); - return 0; - } - - /* - * Check if a waiter is enqueued on the pending owners - * pi_waiters list. Remove it and readjust pending owners - * priority. - */ - if (likely(!rt_mutex_has_waiters(lock))) { - spin_unlock_irqrestore(&pendowner->pi_lock, flags); - return 1; - } - - /* No chain handling, pending owner is not blocked on anything: */ - next = rt_mutex_top_waiter(lock); - plist_del(&next->pi_list_entry, &pendowner->pi_waiters); - __rt_mutex_adjust_prio(pendowner); - spin_unlock_irqrestore(&pendowner->pi_lock, flags); - - /* - * We are going to steal the lock and a waiter was - * enqueued on the pending owners pi_waiters queue. So - * we have to enqueue this waiter into - * current->pi_waiters list. This covers the case, - * where current is boosted because it holds another - * lock and gets unboosted because the booster is - * interrupted, so we would delay a waiter with higher - * priority as current->normal_prio. - * - * Note: in the rare case of a SCHED_OTHER task changing - * its priority and thus stealing the lock, next->task - * might be current: - */ - if (likely(next->task != current)) { - spin_lock_irqsave(¤t->pi_lock, flags); - plist_add(&next->pi_list_entry, ¤t->pi_waiters); - __rt_mutex_adjust_prio(current); - spin_unlock_irqrestore(¤t->pi_lock, flags); - } - return 1; -} - -/* - * Try to take an rt-mutex - * - * This fails - * - when the lock has a real owner - * - when a different pending owner exists and has higher priority than current - * - * Must be called with lock->wait_lock held. - */ -static int try_to_take_rt_mutex(struct rt_mutex *lock) -{ - /* - * We have to be careful here if the atomic speedups are - * enabled, such that, when - * - no other waiter is on the lock - * - the lock has been released since we did the cmpxchg - * the lock can be released or taken while we are doing the - * checks and marking the lock with RT_MUTEX_HAS_WAITERS. - * - * The atomic acquire/release aware variant of - * mark_rt_mutex_waiters uses a cmpxchg loop. After setting - * the WAITERS bit, the atomic release / acquire can not - * happen anymore and lock->wait_lock protects us from the - * non-atomic case. - * - * Note, that this might set lock->owner = - * RT_MUTEX_HAS_WAITERS in the case the lock is not contended - * any more. This is fixed up when we take the ownership. - * This is the transitional state explained at the top of this file. - */ - mark_rt_mutex_waiters(lock); - - if (rt_mutex_owner(lock) && !try_to_steal_lock(lock)) - return 0; - - /* We got the lock. */ - debug_rt_mutex_lock(lock); - - rt_mutex_set_owner(lock, current, 0); - - rt_mutex_deadlock_account_lock(lock, current); - - return 1; -} - -/* - * Task blocks on lock. - * - * Prepare waiter and propagate pi chain - * - * This must be called with lock->wait_lock held. - */ -static int task_blocks_on_rt_mutex(struct rt_mutex *lock, - struct rt_mutex_waiter *waiter, - int detect_deadlock) -{ - struct task_struct *owner = rt_mutex_owner(lock); - struct rt_mutex_waiter *top_waiter = waiter; - unsigned long flags; - int boost = 0, res; - - spin_lock_irqsave(¤t->pi_lock, flags); - __rt_mutex_adjust_prio(current); - waiter->task = current; - waiter->lock = lock; - plist_node_init(&waiter->list_entry, current->prio); - plist_node_init(&waiter->pi_list_entry, current->prio); - - /* Get the top priority waiter on the lock */ - if (rt_mutex_has_waiters(lock)) - top_waiter = rt_mutex_top_waiter(lock); - plist_add(&waiter->list_entry, &lock->wait_list); - - current->pi_blocked_on = waiter; - - spin_unlock_irqrestore(¤t->pi_lock, flags); - - if (waiter == rt_mutex_top_waiter(lock)) { - spin_lock_irqsave(&owner->pi_lock, flags); - plist_del(&top_waiter->pi_list_entry, &owner->pi_waiters); - plist_add(&waiter->pi_list_entry, &owner->pi_waiters); - - __rt_mutex_adjust_prio(owner); - if (owner->pi_blocked_on) { - boost = 1; - /* gets dropped in rt_mutex_adjust_prio_chain()! */ - get_task_struct(owner); - } - spin_unlock_irqrestore(&owner->pi_lock, flags); - } - else if (debug_rt_mutex_detect_deadlock(waiter, detect_deadlock)) { - spin_lock_irqsave(&owner->pi_lock, flags); - if (owner->pi_blocked_on) { - boost = 1; - /* gets dropped in rt_mutex_adjust_prio_chain()! */ - get_task_struct(owner); - } - spin_unlock_irqrestore(&owner->pi_lock, flags); - } - if (!boost) - return 0; - - spin_unlock(&lock->wait_lock); - - res = rt_mutex_adjust_prio_chain(owner, detect_deadlock, lock, waiter, - current); - - spin_lock(&lock->wait_lock); - - return res; -} - -/* - * Wake up the next waiter on the lock. - * - * Remove the top waiter from the current tasks waiter list and from - * the lock waiter list. Set it as pending owner. Then wake it up. - * - * Called with lock->wait_lock held. - */ -static void wakeup_next_waiter(struct rt_mutex *lock) -{ - struct rt_mutex_waiter *waiter; - struct task_struct *pendowner; - unsigned long flags; - - spin_lock_irqsave(¤t->pi_lock, flags); - - waiter = rt_mutex_top_waiter(lock); - plist_del(&waiter->list_entry, &lock->wait_list); - - /* - * Remove it from current->pi_waiters. We do not adjust a - * possible priority boost right now. We execute wakeup in the - * boosted mode and go back to normal after releasing - * lock->wait_lock. - */ - plist_del(&waiter->pi_list_entry, ¤t->pi_waiters); - pendowner = waiter->task; - waiter->task = NULL; - - rt_mutex_set_owner(lock, pendowner, RT_MUTEX_OWNER_PENDING); - - spin_unlock_irqrestore(¤t->pi_lock, flags); - - /* - * Clear the pi_blocked_on variable and enqueue a possible - * waiter into the pi_waiters list of the pending owner. This - * prevents that in case the pending owner gets unboosted a - * waiter with higher priority than pending-owner->normal_prio - * is blocked on the unboosted (pending) owner. - */ - spin_lock_irqsave(&pendowner->pi_lock, flags); - - WARN_ON(!pendowner->pi_blocked_on); - WARN_ON(pendowner->pi_blocked_on != waiter); - WARN_ON(pendowner->pi_blocked_on->lock != lock); - - pendowner->pi_blocked_on = NULL; - - if (rt_mutex_has_waiters(lock)) { - struct rt_mutex_waiter *next; - - next = rt_mutex_top_waiter(lock); - plist_add(&next->pi_list_entry, &pendowner->pi_waiters); - } - spin_unlock_irqrestore(&pendowner->pi_lock, flags); - - wake_up_process(pendowner); -} - -/* - * Remove a waiter from a lock - * - * Must be called with lock->wait_lock held - */ -static void remove_waiter(struct rt_mutex *lock, - struct rt_mutex_waiter *waiter) -{ - int first = (waiter == rt_mutex_top_waiter(lock)); - struct task_struct *owner = rt_mutex_owner(lock); - unsigned long flags; - int boost = 0; - - spin_lock_irqsave(¤t->pi_lock, flags); - plist_del(&waiter->list_entry, &lock->wait_list); - waiter->task = NULL; - current->pi_blocked_on = NULL; - spin_unlock_irqrestore(¤t->pi_lock, flags); - - if (first && owner != current) { - - spin_lock_irqsave(&owner->pi_lock, flags); - - plist_del(&waiter->pi_list_entry, &owner->pi_waiters); - - if (rt_mutex_has_waiters(lock)) { - struct rt_mutex_waiter *next; - - next = rt_mutex_top_waiter(lock); - plist_add(&next->pi_list_entry, &owner->pi_waiters); - } - __rt_mutex_adjust_prio(owner); - - if (owner->pi_blocked_on) { - boost = 1; - /* gets dropped in rt_mutex_adjust_prio_chain()! */ - get_task_struct(owner); - } - spin_unlock_irqrestore(&owner->pi_lock, flags); - } - - WARN_ON(!plist_node_empty(&waiter->pi_list_entry)); - - if (!boost) - return; - - spin_unlock(&lock->wait_lock); - - rt_mutex_adjust_prio_chain(owner, 0, lock, NULL, current); - - spin_lock(&lock->wait_lock); -} - -/* - * Recheck the pi chain, in case we got a priority setting - * - * Called from sched_setscheduler - */ -void rt_mutex_adjust_pi(struct task_struct *task) -{ - struct rt_mutex_waiter *waiter; - unsigned long flags; - - spin_lock_irqsave(&task->pi_lock, flags); - - waiter = task->pi_blocked_on; - if (!waiter || waiter->list_entry.prio == task->prio) { - spin_unlock_irqrestore(&task->pi_lock, flags); - return; - } - - /* gets dropped in rt_mutex_adjust_prio_chain()! */ - get_task_struct(task); - spin_unlock_irqrestore(&task->pi_lock, flags); - - rt_mutex_adjust_prio_chain(task, 0, NULL, NULL, task); -} - -/* - * Slow path lock function: - */ -static int __sched -rt_mutex_slowlock(struct rt_mutex *lock, int state, - struct hrtimer_sleeper *timeout, - int detect_deadlock) -{ - struct rt_mutex_waiter waiter; - int ret = 0; - - debug_rt_mutex_init_waiter(&waiter); - waiter.task = NULL; - - spin_lock(&lock->wait_lock); - - /* Try to acquire the lock again: */ - if (try_to_take_rt_mutex(lock)) { - spin_unlock(&lock->wait_lock); - return 0; - } - - set_current_state(state); - - /* Setup the timer, when timeout != NULL */ - if (unlikely(timeout)) - hrtimer_start(&timeout->timer, timeout->timer.expires, - HRTIMER_ABS); - - for (;;) { - /* Try to acquire the lock: */ - if (try_to_take_rt_mutex(lock)) - break; - - /* - * TASK_INTERRUPTIBLE checks for signals and - * timeout. Ignored otherwise. - */ - if (unlikely(state == TASK_INTERRUPTIBLE)) { - /* Signal pending? */ - if (signal_pending(current)) - ret = -EINTR; - if (timeout && !timeout->task) - ret = -ETIMEDOUT; - if (ret) - break; - } - - /* - * waiter.task is NULL the first time we come here and - * when we have been woken up by the previous owner - * but the lock got stolen by a higher prio task. - */ - if (!waiter.task) { - ret = task_blocks_on_rt_mutex(lock, &waiter, - detect_deadlock); - /* - * If we got woken up by the owner then start loop - * all over without going into schedule to try - * to get the lock now: - */ - if (unlikely(!waiter.task)) - continue; - - if (unlikely(ret)) - break; - } - - spin_unlock(&lock->wait_lock); - - debug_rt_mutex_print_deadlock(&waiter); - - if (waiter.task) - schedule_rt_mutex(lock); - - spin_lock(&lock->wait_lock); - set_current_state(state); - } - - set_current_state(TASK_RUNNING); - - if (unlikely(waiter.task)) - remove_waiter(lock, &waiter); - - /* - * try_to_take_rt_mutex() sets the waiter bit - * unconditionally. We might have to fix that up. - */ - fixup_rt_mutex_waiters(lock); - - spin_unlock(&lock->wait_lock); - - /* Remove pending timer: */ - if (unlikely(timeout)) - hrtimer_cancel(&timeout->timer); - - /* - * Readjust priority, when we did not get the lock. We might - * have been the pending owner and boosted. Since we did not - * take the lock, the PI boost has to go. - */ - if (unlikely(ret)) - rt_mutex_adjust_prio(current); - - debug_rt_mutex_free_waiter(&waiter); - - return ret; -} - -/* - * Slow path try-lock function: - */ -static inline int -rt_mutex_slowtrylock(struct rt_mutex *lock) -{ - int ret = 0; - - spin_lock(&lock->wait_lock); - - if (likely(rt_mutex_owner(lock) != current)) { - - ret = try_to_take_rt_mutex(lock); - /* - * try_to_take_rt_mutex() sets the lock waiters - * bit unconditionally. Clean this up. - */ - fixup_rt_mutex_waiters(lock); - } - - spin_unlock(&lock->wait_lock); - - return ret; -} - -/* - * Slow path to release a rt-mutex: - */ -static void __sched -rt_mutex_slowunlock(struct rt_mutex *lock) -{ - spin_lock(&lock->wait_lock); - - debug_rt_mutex_unlock(lock); - - rt_mutex_deadlock_account_unlock(current); - - if (!rt_mutex_has_waiters(lock)) { - lock->owner = NULL; - spin_unlock(&lock->wait_lock); - return; - } - - wakeup_next_waiter(lock); - - spin_unlock(&lock->wait_lock); - - /* Undo pi boosting if necessary: */ - rt_mutex_adjust_prio(current); -} - -/* - * debug aware fast / slowpath lock,trylock,unlock - * - * The atomic acquire/release ops are compiled away, when either the - * architecture does not support cmpxchg or when debugging is enabled. - */ -static inline int -rt_mutex_fastlock(struct rt_mutex *lock, int state, - int detect_deadlock, - int (*slowfn)(struct rt_mutex *lock, int state, - struct hrtimer_sleeper *timeout, - int detect_deadlock)) -{ - if (!detect_deadlock && likely(rt_mutex_cmpxchg(lock, NULL, current))) { - rt_mutex_deadlock_account_lock(lock, current); - return 0; - } else - return slowfn(lock, state, NULL, detect_deadlock); -} - -static inline int -rt_mutex_timed_fastlock(struct rt_mutex *lock, int state, - struct hrtimer_sleeper *timeout, int detect_deadlock, - int (*slowfn)(struct rt_mutex *lock, int state, - struct hrtimer_sleeper *timeout, - int detect_deadlock)) -{ - if (!detect_deadlock && likely(rt_mutex_cmpxchg(lock, NULL, current))) { - rt_mutex_deadlock_account_lock(lock, current); - return 0; - } else - return slowfn(lock, state, timeout, detect_deadlock); -} - -static inline int -rt_mutex_fasttrylock(struct rt_mutex *lock, - int (*slowfn)(struct rt_mutex *lock)) -{ - if (likely(rt_mutex_cmpxchg(lock, NULL, current))) { - rt_mutex_deadlock_account_lock(lock, current); - return 1; - } - return slowfn(lock); -} - -static inline void -rt_mutex_fastunlock(struct rt_mutex *lock, - void (*slowfn)(struct rt_mutex *lock)) -{ - if (likely(rt_mutex_cmpxchg(lock, current, NULL))) - rt_mutex_deadlock_account_unlock(current); - else - slowfn(lock); -} - -/** - * rt_mutex_lock - lock a rt_mutex - * - * @lock: the rt_mutex to be locked - */ -void __sched rt_mutex_lock(struct rt_mutex *lock) -{ - might_sleep(); - - rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, 0, rt_mutex_slowlock); -} -EXPORT_SYMBOL_GPL(rt_mutex_lock); - -/** - * rt_mutex_lock_interruptible - lock a rt_mutex interruptible - * - * @lock: the rt_mutex to be locked - * @detect_deadlock: deadlock detection on/off - * - * Returns: - * 0 on success - * -EINTR when interrupted by a signal - * -EDEADLK when the lock would deadlock (when deadlock detection is on) - */ -int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock, - int detect_deadlock) -{ - might_sleep(); - - return rt_mutex_fastlock(lock, TASK_INTERRUPTIBLE, - detect_deadlock, rt_mutex_slowlock); -} -EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); - -/** - * rt_mutex_lock_interruptible_ktime - lock a rt_mutex interruptible - * the timeout structure is provided - * by the caller - * - * @lock: the rt_mutex to be locked - * @timeout: timeout structure or NULL (no timeout) - * @detect_deadlock: deadlock detection on/off - * - * Returns: - * 0 on success - * -EINTR when interrupted by a signal - * -ETIMEOUT when the timeout expired - * -EDEADLK when the lock would deadlock (when deadlock detection is on) - */ -int -rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout, - int detect_deadlock) -{ - might_sleep(); - - return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, - detect_deadlock, rt_mutex_slowlock); -} -EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); - -/** - * rt_mutex_trylock - try to lock a rt_mutex - * - * @lock: the rt_mutex to be locked - * - * Returns 1 on success and 0 on contention - */ -int __sched rt_mutex_trylock(struct rt_mutex *lock) -{ - return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); -} -EXPORT_SYMBOL_GPL(rt_mutex_trylock); - -/** - * rt_mutex_unlock - unlock a rt_mutex - * - * @lock: the rt_mutex to be unlocked - */ -void __sched rt_mutex_unlock(struct rt_mutex *lock) -{ - rt_mutex_fastunlock(lock, rt_mutex_slowunlock); -} -EXPORT_SYMBOL_GPL(rt_mutex_unlock); - -/*** - * rt_mutex_destroy - mark a mutex unusable - * @lock: the mutex to be destroyed - * - * This function marks the mutex uninitialized, and any subsequent - * use of the mutex is forbidden. The mutex must not be locked when - * this function is called. - */ -void rt_mutex_destroy(struct rt_mutex *lock) -{ - WARN_ON(rt_mutex_is_locked(lock)); -#ifdef CONFIG_DEBUG_RT_MUTEXES - lock->magic = NULL; -#endif -} - -EXPORT_SYMBOL_GPL(rt_mutex_destroy); - -/** - * __rt_mutex_init - initialize the rt lock - * - * @lock: the rt lock to be initialized - * - * Initialize the rt lock to unlocked state. - * - * Initializing of a locked rt lock is not allowed - */ -void __rt_mutex_init(struct rt_mutex *lock, const char *name) -{ - lock->owner = NULL; - spin_lock_init(&lock->wait_lock); - plist_head_init(&lock->wait_list, &lock->wait_lock); - - debug_rt_mutex_init(lock, name); -} -EXPORT_SYMBOL_GPL(__rt_mutex_init); - -/** - * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a - * proxy owner - * - * @lock: the rt_mutex to be locked - * @proxy_owner:the task to set as owner - * - * No locking. Caller has to do serializing itself - * Special API call for PI-futex support - */ -void rt_mutex_init_proxy_locked(struct rt_mutex *lock, - struct task_struct *proxy_owner) -{ - __rt_mutex_init(lock, NULL); - debug_rt_mutex_proxy_lock(lock, proxy_owner); - rt_mutex_set_owner(lock, proxy_owner, 0); - rt_mutex_deadlock_account_lock(lock, proxy_owner); -} - -/** - * rt_mutex_proxy_unlock - release a lock on behalf of owner - * - * @lock: the rt_mutex to be locked - * - * No locking. Caller has to do serializing itself - * Special API call for PI-futex support - */ -void rt_mutex_proxy_unlock(struct rt_mutex *lock, - struct task_struct *proxy_owner) -{ - debug_rt_mutex_proxy_unlock(lock); - rt_mutex_set_owner(lock, NULL, 0); - rt_mutex_deadlock_account_unlock(proxy_owner); -} - -/** - * rt_mutex_next_owner - return the next owner of the lock - * - * @lock: the rt lock query - * - * Returns the next owner of the lock or NULL - * - * Caller has to serialize against other accessors to the lock - * itself. - * - * Special API call for PI-futex support - */ -struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock) -{ - if (!rt_mutex_has_waiters(lock)) - return NULL; - - return rt_mutex_top_waiter(lock)->task; -} diff --git a/kernel/rtmutex.h b/kernel/rtmutex.h deleted file mode 100644 index a1a1dd064..000000000 --- a/kernel/rtmutex.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * RT-Mutexes: blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner: - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006, Timesys Corp., Thomas Gleixner - * - * This file contains macros used solely by rtmutex.c. - * Non-debug version. - */ - -#define rt_mutex_deadlock_check(l) (0) -#define rt_mutex_deadlock_account_lock(m, t) do { } while (0) -#define rt_mutex_deadlock_account_unlock(l) do { } while (0) -#define debug_rt_mutex_init_waiter(w) do { } while (0) -#define debug_rt_mutex_free_waiter(w) do { } while (0) -#define debug_rt_mutex_lock(l) do { } while (0) -#define debug_rt_mutex_proxy_lock(l,p) do { } while (0) -#define debug_rt_mutex_proxy_unlock(l) do { } while (0) -#define debug_rt_mutex_unlock(l) do { } while (0) -#define debug_rt_mutex_init(m, n) do { } while (0) -#define debug_rt_mutex_deadlock(d, a ,l) do { } while (0) -#define debug_rt_mutex_print_deadlock(w) do { } while (0) -#define debug_rt_mutex_detect_deadlock(w,d) (d) -#define debug_rt_mutex_reset_waiter(w) do { } while (0) diff --git a/kernel/rtmutex_common.h b/kernel/rtmutex_common.h deleted file mode 100644 index 9c75856e7..000000000 --- a/kernel/rtmutex_common.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * RT Mutexes: blocking mutual exclusion locks with PI support - * - * started by Ingo Molnar and Thomas Gleixner: - * - * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar - * Copyright (C) 2006, Timesys Corp., Thomas Gleixner - * - * This file contains the private data structure and API definitions. - */ - -#ifndef __KERNEL_RTMUTEX_COMMON_H -#define __KERNEL_RTMUTEX_COMMON_H - -#include - -/* - * The rtmutex in kernel tester is independent of rtmutex debugging. We - * call schedule_rt_mutex_test() instead of schedule() for the tasks which - * belong to the tester. That way we can delay the wakeup path of those - * threads to provoke lock stealing and testing of complex boosting scenarios. - */ -#ifdef CONFIG_RT_MUTEX_TESTER - -extern void schedule_rt_mutex_test(struct rt_mutex *lock); - -#define schedule_rt_mutex(_lock) \ - do { \ - if (!(current->flags & PF_MUTEX_TESTER)) \ - schedule(); \ - else \ - schedule_rt_mutex_test(_lock); \ - } while (0) - -#else -# define schedule_rt_mutex(_lock) schedule() -#endif - -/* - * This is the control structure for tasks blocked on a rt_mutex, - * which is allocated on the kernel stack on of the blocked task. - * - * @list_entry: pi node to enqueue into the mutex waiters list - * @pi_list_entry: pi node to enqueue into the mutex owner waiters list - * @task: task reference to the blocked task - */ -struct rt_mutex_waiter { - struct plist_node list_entry; - struct plist_node pi_list_entry; - struct task_struct *task; - struct rt_mutex *lock; -#ifdef CONFIG_DEBUG_RT_MUTEXES - unsigned long ip; - pid_t deadlock_task_pid; - struct rt_mutex *deadlock_lock; -#endif -}; - -/* - * Various helpers to access the waiters-plist: - */ -static inline int rt_mutex_has_waiters(struct rt_mutex *lock) -{ - return !plist_head_empty(&lock->wait_list); -} - -static inline struct rt_mutex_waiter * -rt_mutex_top_waiter(struct rt_mutex *lock) -{ - struct rt_mutex_waiter *w; - - w = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, - list_entry); - BUG_ON(w->lock != lock); - - return w; -} - -static inline int task_has_pi_waiters(struct task_struct *p) -{ - return !plist_head_empty(&p->pi_waiters); -} - -static inline struct rt_mutex_waiter * -task_top_pi_waiter(struct task_struct *p) -{ - return plist_first_entry(&p->pi_waiters, struct rt_mutex_waiter, - pi_list_entry); -} - -/* - * lock->owner state tracking: - */ -#define RT_MUTEX_OWNER_PENDING 1UL -#define RT_MUTEX_HAS_WAITERS 2UL -#define RT_MUTEX_OWNER_MASKALL 3UL - -static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) -{ - return (struct task_struct *) - ((unsigned long)lock->owner & ~RT_MUTEX_OWNER_MASKALL); -} - -static inline struct task_struct *rt_mutex_real_owner(struct rt_mutex *lock) -{ - return (struct task_struct *) - ((unsigned long)lock->owner & ~RT_MUTEX_HAS_WAITERS); -} - -static inline unsigned long rt_mutex_owner_pending(struct rt_mutex *lock) -{ - return (unsigned long)lock->owner & RT_MUTEX_OWNER_PENDING; -} - -/* - * PI-futex support (proxy locking functions, etc.): - */ -extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); -extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, - struct task_struct *proxy_owner); -extern void rt_mutex_proxy_unlock(struct rt_mutex *lock, - struct task_struct *proxy_owner); -#endif diff --git a/kernel/rwsem.c b/kernel/rwsem.c deleted file mode 100644 index 291ded556..000000000 --- a/kernel/rwsem.c +++ /dev/null @@ -1,147 +0,0 @@ -/* kernel/rwsem.c: R/W semaphores, public implementation - * - * Written by David Howells (dhowells@redhat.com). - * Derived from asm-i386/semaphore.h - */ - -#include -#include -#include -#include - -#include -#include - -/* - * lock for reading - */ -void down_read(struct rw_semaphore *sem) -{ - might_sleep(); - rwsem_acquire_read(&sem->dep_map, 0, 0, _RET_IP_); - - __down_read(sem); -} - -EXPORT_SYMBOL(down_read); - -/* - * trylock for reading -- returns 1 if successful, 0 if contention - */ -int down_read_trylock(struct rw_semaphore *sem) -{ - int ret = __down_read_trylock(sem); - - if (ret == 1) - rwsem_acquire_read(&sem->dep_map, 0, 1, _RET_IP_); - return ret; -} - -EXPORT_SYMBOL(down_read_trylock); - -/* - * lock for writing - */ -void down_write(struct rw_semaphore *sem) -{ - might_sleep(); - rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_); - - __down_write(sem); -} - -EXPORT_SYMBOL(down_write); - -/* - * trylock for writing -- returns 1 if successful, 0 if contention - */ -int down_write_trylock(struct rw_semaphore *sem) -{ - int ret = __down_write_trylock(sem); - - if (ret == 1) - rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_); - return ret; -} - -EXPORT_SYMBOL(down_write_trylock); - -/* - * release a read lock - */ -void up_read(struct rw_semaphore *sem) -{ - rwsem_release(&sem->dep_map, 1, _RET_IP_); - - __up_read(sem); -} - -EXPORT_SYMBOL(up_read); - -/* - * release a write lock - */ -void up_write(struct rw_semaphore *sem) -{ - rwsem_release(&sem->dep_map, 1, _RET_IP_); - - __up_write(sem); -} - -EXPORT_SYMBOL(up_write); - -/* - * downgrade write lock to read lock - */ -void downgrade_write(struct rw_semaphore *sem) -{ - /* - * lockdep: a downgraded write will live on as a write - * dependency. - */ - __downgrade_write(sem); -} - -EXPORT_SYMBOL(downgrade_write); - -#ifdef CONFIG_DEBUG_LOCK_ALLOC - -void down_read_nested(struct rw_semaphore *sem, int subclass) -{ - might_sleep(); - rwsem_acquire_read(&sem->dep_map, subclass, 0, _RET_IP_); - - __down_read(sem); -} - -EXPORT_SYMBOL(down_read_nested); - -void down_read_non_owner(struct rw_semaphore *sem) -{ - might_sleep(); - - __down_read(sem); -} - -EXPORT_SYMBOL(down_read_non_owner); - -void down_write_nested(struct rw_semaphore *sem, int subclass) -{ - might_sleep(); - rwsem_acquire(&sem->dep_map, subclass, 0, _RET_IP_); - - __down_write_nested(sem, subclass); -} - -EXPORT_SYMBOL(down_write_nested); - -void up_read_non_owner(struct rw_semaphore *sem) -{ - __up_read(sem); -} - -EXPORT_SYMBOL(up_read_non_owner); - -#endif - - diff --git a/kernel/sched.c b/kernel/sched.c index b7112807f..32b195fcc 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -51,16 +50,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include + /* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], @@ -175,28 +172,29 @@ */ #define SCALE_PRIO(x, prio) \ - max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO / 2), MIN_TIMESLICE) + max(x * (MAX_PRIO - prio) / (MAX_USER_PRIO/2), MIN_TIMESLICE) -static unsigned int static_prio_timeslice(int static_prio) +static unsigned int task_timeslice(task_t *p) { - if (static_prio < NICE_TO_PRIO(0)) - return SCALE_PRIO(DEF_TIMESLICE * 4, static_prio); + if (p->static_prio < NICE_TO_PRIO(0)) + return SCALE_PRIO(DEF_TIMESLICE*4, p->static_prio); else - return SCALE_PRIO(DEF_TIMESLICE, static_prio); -} - -static inline unsigned int task_timeslice(struct task_struct *p) -{ - return static_prio_timeslice(p->static_prio); + return SCALE_PRIO(DEF_TIMESLICE, p->static_prio); } +#define task_hot(p, now, sd) ((long long) ((now) - (p)->last_ran) \ + < (long long) (sd)->cache_hot_time) /* * These are the runqueue data structures: */ +#define BITMAP_SIZE ((((MAX_PRIO+1+7)/8)+sizeof(long)-1)/sizeof(long)) + +typedef struct runqueue runqueue_t; + struct prio_array { unsigned int nr_active; - DECLARE_BITMAP(bitmap, MAX_PRIO+1); /* include 1 bit for delimiter */ + unsigned long bitmap[BITMAP_SIZE]; struct list_head queue[MAX_PRIO]; }; @@ -207,7 +205,7 @@ struct prio_array { * (such as the load balancing or the thread migration code), lock * acquire operations must be ordered by ascending &runqueue. */ -struct rq { +struct runqueue { spinlock_t lock; /* @@ -215,7 +213,6 @@ struct rq { * remote CPUs use both these fields when doing load calculation. */ unsigned long nr_running; - unsigned long raw_weighted_load; #ifdef CONFIG_SMP unsigned long cpu_load[3]; #endif @@ -231,9 +228,9 @@ struct rq { unsigned long expired_timestamp; unsigned long long timestamp_last_tick; - struct task_struct *curr, *idle; + task_t *curr, *idle; struct mm_struct *prev_mm; - struct prio_array *active, *expired, arrays[2]; + prio_array_t *active, *expired, arrays[2]; int best_expired_prio; atomic_t nr_iowait; @@ -243,10 +240,10 @@ struct rq { /* For active balancing */ int active_balance; int push_cpu; - int cpu; /* cpu of this runqueue */ - struct task_struct *migration_thread; + task_t *migration_thread; struct list_head migration_queue; + int cpu; #endif #ifdef CONFIG_VSERVER_HARDCPU struct list_head hold_queue; @@ -272,19 +269,9 @@ struct rq { unsigned long ttwu_cnt; unsigned long ttwu_local; #endif - struct lock_class_key rq_lock_key; }; -static DEFINE_PER_CPU(struct rq, runqueues); - -static inline int cpu_of(struct rq *rq) -{ -#ifdef CONFIG_SMP - return rq->cpu; -#else - return 0; -#endif -} +static DEFINE_PER_CPU(struct runqueue, runqueues); /* * The domain tree (rq->sd) is protected by RCU's quiescent state transition. @@ -293,8 +280,8 @@ static inline int cpu_of(struct rq *rq) * The domain tree of any CPU may only be accessed from within * preempt-disabled sections. */ -#define for_each_domain(cpu, __sd) \ - for (__sd = rcu_dereference(cpu_rq(cpu)->sd); __sd; __sd = __sd->parent) +#define for_each_domain(cpu, domain) \ +for (domain = rcu_dereference(cpu_rq(cpu)->sd); domain; domain = domain->parent) #define cpu_rq(cpu) (&per_cpu(runqueues, (cpu))) #define this_rq() (&__get_cpu_var(runqueues)) @@ -309,33 +296,26 @@ static inline int cpu_of(struct rq *rq) #endif #ifndef __ARCH_WANT_UNLOCKED_CTXSW -static inline int task_running(struct rq *rq, struct task_struct *p) +static inline int task_running(runqueue_t *rq, task_t *p) { return rq->curr == p; } -static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next) +static inline void prepare_lock_switch(runqueue_t *rq, task_t *next) { } -static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev) +static inline void finish_lock_switch(runqueue_t *rq, task_t *prev) { #ifdef CONFIG_DEBUG_SPINLOCK /* this is a valid case when another task releases the spinlock */ rq->lock.owner = current; #endif - /* - * If we are tracking spinlock dependencies then we have to - * fix up the runqueue lock - which gets 'carried over' from - * prev into current: - */ - spin_acquire(&rq->lock.dep_map, 0, 0, _THIS_IP_); - spin_unlock_irq(&rq->lock); } #else /* __ARCH_WANT_UNLOCKED_CTXSW */ -static inline int task_running(struct rq *rq, struct task_struct *p) +static inline int task_running(runqueue_t *rq, task_t *p) { #ifdef CONFIG_SMP return p->oncpu; @@ -344,7 +324,7 @@ static inline int task_running(struct rq *rq, struct task_struct *p) #endif } -static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next) +static inline void prepare_lock_switch(runqueue_t *rq, task_t *next) { #ifdef CONFIG_SMP /* @@ -361,7 +341,7 @@ static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next) #endif } -static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev) +static inline void finish_lock_switch(runqueue_t *rq, task_t *prev) { #ifdef CONFIG_SMP /* @@ -378,34 +358,15 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev) } #endif /* __ARCH_WANT_UNLOCKED_CTXSW */ -/* - * __task_rq_lock - lock the runqueue a given task resides on. - * Must be called interrupts disabled. - */ -static inline struct rq *__task_rq_lock(struct task_struct *p) - __acquires(rq->lock) -{ - struct rq *rq; - -repeat_lock_task: - rq = task_rq(p); - spin_lock(&rq->lock); - if (unlikely(rq != task_rq(p))) { - spin_unlock(&rq->lock); - goto repeat_lock_task; - } - return rq; -} - /* * task_rq_lock - lock the runqueue a given task resides on and disable * interrupts. Note the ordering: we can safely lookup the task_rq without * explicitly disabling preemption. */ -static struct rq *task_rq_lock(struct task_struct *p, unsigned long *flags) +static inline runqueue_t *task_rq_lock(task_t *p, unsigned long *flags) __acquires(rq->lock) { - struct rq *rq; + struct runqueue *rq; repeat_lock_task: local_irq_save(*flags); @@ -418,13 +379,7 @@ repeat_lock_task: return rq; } -static inline void __task_rq_unlock(struct rq *rq) - __releases(rq->lock) -{ - spin_unlock(&rq->lock); -} - -static inline void task_rq_unlock(struct rq *rq, unsigned long *flags) +static inline void task_rq_unlock(runqueue_t *rq, unsigned long *flags) __releases(rq->lock) { spin_unlock_irqrestore(&rq->lock, *flags); @@ -444,7 +399,7 @@ static int show_schedstat(struct seq_file *seq, void *v) seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION); seq_printf(seq, "timestamp %lu\n", jiffies); for_each_online_cpu(cpu) { - struct rq *rq = cpu_rq(cpu); + runqueue_t *rq = cpu_rq(cpu); #ifdef CONFIG_SMP struct sched_domain *sd; int dcnt = 0; @@ -521,36 +476,9 @@ struct file_operations proc_schedstat_operations = { .release = single_release, }; -/* - * Expects runqueue lock to be held for atomicity of update - */ -static inline void -rq_sched_info_arrive(struct rq *rq, unsigned long delta_jiffies) -{ - if (rq) { - rq->rq_sched_info.run_delay += delta_jiffies; - rq->rq_sched_info.pcnt++; - } -} - -/* - * Expects runqueue lock to be held for atomicity of update - */ -static inline void -rq_sched_info_depart(struct rq *rq, unsigned long delta_jiffies) -{ - if (rq) - rq->rq_sched_info.cpu_time += delta_jiffies; -} # define schedstat_inc(rq, field) do { (rq)->field++; } while (0) # define schedstat_add(rq, field, amt) do { (rq)->field += (amt); } while (0) #else /* !CONFIG_SCHEDSTATS */ -static inline void -rq_sched_info_arrive(struct rq *rq, unsigned long delta_jiffies) -{} -static inline void -rq_sched_info_depart(struct rq *rq, unsigned long delta_jiffies) -{} # define schedstat_inc(rq, field) do { } while (0) # define schedstat_add(rq, field, amt) do { } while (0) #endif @@ -558,10 +486,10 @@ rq_sched_info_depart(struct rq *rq, unsigned long delta_jiffies) /* * rq_lock - lock a given runqueue and disable interrupts. */ -static inline struct rq *this_rq_lock(void) +static inline runqueue_t *this_rq_lock(void) __acquires(rq->lock) { - struct rq *rq; + runqueue_t *rq; local_irq_disable(); rq = this_rq(); @@ -570,7 +498,7 @@ static inline struct rq *this_rq_lock(void) return rq; } -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) +#ifdef CONFIG_SCHEDSTATS /* * Called when a process is dequeued from the active array and given * the cpu. We should note that with the exception of interactive @@ -586,7 +514,7 @@ static inline struct rq *this_rq_lock(void) * long it was from the *first* time it was queued to the time that it * finally hit a cpu. */ -static inline void sched_info_dequeued(struct task_struct *t) +static inline void sched_info_dequeued(task_t *t) { t->sched_info.last_queued = 0; } @@ -596,18 +524,23 @@ static inline void sched_info_dequeued(struct task_struct *t) * long it was waiting to run. We also note when it began so that we * can keep stats on how long its timeslice is. */ -static void sched_info_arrive(struct task_struct *t) +static void sched_info_arrive(task_t *t) { - unsigned long now = jiffies, delta_jiffies = 0; + unsigned long now = jiffies, diff = 0; + struct runqueue *rq = task_rq(t); if (t->sched_info.last_queued) - delta_jiffies = now - t->sched_info.last_queued; + diff = now - t->sched_info.last_queued; sched_info_dequeued(t); - t->sched_info.run_delay += delta_jiffies; + t->sched_info.run_delay += diff; t->sched_info.last_arrival = now; t->sched_info.pcnt++; - rq_sched_info_arrive(task_rq(t), delta_jiffies); + if (!rq) + return; + + rq->rq_sched_info.run_delay += diff; + rq->rq_sched_info.pcnt++; } /* @@ -625,23 +558,25 @@ static void sched_info_arrive(struct task_struct *t) * the timestamp if it is already not set. It's assumed that * sched_info_dequeued() will clear that stamp when appropriate. */ -static inline void sched_info_queued(struct task_struct *t) +static inline void sched_info_queued(task_t *t) { - if (unlikely(sched_info_on())) - if (!t->sched_info.last_queued) - t->sched_info.last_queued = jiffies; + if (!t->sched_info.last_queued) + t->sched_info.last_queued = jiffies; } /* * Called when a process ceases being the active-running process, either * voluntarily or involuntarily. Now we can calculate how long we ran. */ -static inline void sched_info_depart(struct task_struct *t) +static inline void sched_info_depart(task_t *t) { - unsigned long delta_jiffies = jiffies - t->sched_info.last_arrival; + struct runqueue *rq = task_rq(t); + unsigned long diff = jiffies - t->sched_info.last_arrival; + + t->sched_info.cpu_time += diff; - t->sched_info.cpu_time += delta_jiffies; - rq_sched_info_depart(task_rq(t), delta_jiffies); + if (rq) + rq->rq_sched_info.cpu_time += diff; } /* @@ -649,10 +584,9 @@ static inline void sched_info_depart(struct task_struct *t) * their time slice. (This may also be called when switching to or from * the idle task.) We are only called when prev != next. */ -static inline void -__sched_info_switch(struct task_struct *prev, struct task_struct *next) +static inline void sched_info_switch(task_t *prev, task_t *next) { - struct rq *rq = task_rq(prev); + struct runqueue *rq = task_rq(prev); /* * prev now departs the cpu. It's not interesting to record @@ -665,21 +599,15 @@ __sched_info_switch(struct task_struct *prev, struct task_struct *next) if (next != rq->idle) sched_info_arrive(next); } -static inline void -sched_info_switch(struct task_struct *prev, struct task_struct *next) -{ - if (unlikely(sched_info_on())) - __sched_info_switch(prev, next); -} #else #define sched_info_queued(t) do { } while (0) #define sched_info_switch(t, next) do { } while (0) -#endif /* CONFIG_SCHEDSTATS || CONFIG_TASK_DELAY_ACCT */ +#endif /* CONFIG_SCHEDSTATS */ /* * Adding/removing a task to/from a priority array: */ -static void dequeue_task(struct task_struct *p, struct prio_array *array) +static void dequeue_task(struct task_struct *p, prio_array_t *array) { BUG_ON(p->state & TASK_ONHOLD); array->nr_active--; @@ -688,7 +616,7 @@ static void dequeue_task(struct task_struct *p, struct prio_array *array) __clear_bit(p->prio, array->bitmap); } -static void enqueue_task(struct task_struct *p, struct prio_array *array) +static void enqueue_task(struct task_struct *p, prio_array_t *array) { BUG_ON(p->state & TASK_ONHOLD); sched_info_queued(p); @@ -702,14 +630,13 @@ static void enqueue_task(struct task_struct *p, struct prio_array *array) * Put task to the end of the run list without the overhead of dequeue * followed by enqueue. */ -static void requeue_task(struct task_struct *p, struct prio_array *array) +static void requeue_task(struct task_struct *p, prio_array_t *array) { BUG_ON(p->state & TASK_ONHOLD); list_move_tail(&p->run_list, array->queue + p->prio); } -static inline void -enqueue_task_head(struct task_struct *p, struct prio_array *array) +static inline void enqueue_task_head(struct task_struct *p, prio_array_t *array) { BUG_ON(p->state & TASK_ONHOLD); list_add(&p->run_list, array->queue + p->prio); @@ -719,7 +646,7 @@ enqueue_task_head(struct task_struct *p, struct prio_array *array) } /* - * __normal_prio - return the priority that is based on the static + * effective_prio - return the priority that is based on the static * priority but is modified by bonuses/penalties. * * We scale the actual sleep average [0 .... MAX_SLEEP_AVG] @@ -732,12 +659,14 @@ enqueue_task_head(struct task_struct *p, struct prio_array *array) * * Both properties are important to certain workloads. */ - -static inline int __normal_prio(struct task_struct *p) +static int effective_prio(task_t *p) { int bonus, prio; struct vx_info *vxi; + if (rt_task(p)) + return p->prio; + bonus = CURRENT_BONUS(p) - MAX_BONUS / 2; prio = p->static_prio - bonus; @@ -753,166 +682,58 @@ static inline int __normal_prio(struct task_struct *p) return prio; } -/* - * To aid in avoiding the subversion of "niceness" due to uneven distribution - * of tasks with abnormal "nice" values across CPUs the contribution that - * each task makes to its run queue's load is weighted according to its - * scheduling class and "nice" value. For SCHED_NORMAL tasks this is just a - * scaled version of the new time slice allocation that they receive on time - * slice expiry etc. - */ - -/* - * Assume: static_prio_timeslice(NICE_TO_PRIO(0)) == DEF_TIMESLICE - * If static_prio_timeslice() is ever changed to break this assumption then - * this code will need modification - */ -#define TIME_SLICE_NICE_ZERO DEF_TIMESLICE -#define LOAD_WEIGHT(lp) \ - (((lp) * SCHED_LOAD_SCALE) / TIME_SLICE_NICE_ZERO) -#define PRIO_TO_LOAD_WEIGHT(prio) \ - LOAD_WEIGHT(static_prio_timeslice(prio)) -#define RTPRIO_TO_LOAD_WEIGHT(rp) \ - (PRIO_TO_LOAD_WEIGHT(MAX_RT_PRIO) + LOAD_WEIGHT(rp)) - -static void set_load_weight(struct task_struct *p) -{ - if (has_rt_policy(p)) { -#ifdef CONFIG_SMP - if (p == task_rq(p)->migration_thread) - /* - * The migration thread does the actual balancing. - * Giving its load any weight will skew balancing - * adversely. - */ - p->load_weight = 0; - else -#endif - p->load_weight = RTPRIO_TO_LOAD_WEIGHT(p->rt_priority); - } else - p->load_weight = PRIO_TO_LOAD_WEIGHT(p->static_prio); -} - -static inline void -inc_raw_weighted_load(struct rq *rq, const struct task_struct *p) -{ - rq->raw_weighted_load += p->load_weight; -} - -static inline void -dec_raw_weighted_load(struct rq *rq, const struct task_struct *p) -{ - rq->raw_weighted_load -= p->load_weight; -} - -static inline void inc_nr_running(struct task_struct *p, struct rq *rq) -{ - rq->nr_running++; - inc_raw_weighted_load(rq, p); -} - -static inline void dec_nr_running(struct task_struct *p, struct rq *rq) -{ - rq->nr_running--; - dec_raw_weighted_load(rq, p); -} - -/* - * Calculate the expected normal priority: i.e. priority - * without taking RT-inheritance into account. Might be - * boosted by interactivity modifiers. Changes upon fork, - * setprio syscalls, and whenever the interactivity - * estimator recalculates. - */ -static inline int normal_prio(struct task_struct *p) -{ - int prio; - - if (has_rt_policy(p)) - prio = MAX_RT_PRIO-1 - p->rt_priority; - else - prio = __normal_prio(p); - return prio; -} - -/* - * Calculate the current priority, i.e. the priority - * taken into account by the scheduler. This value might - * be boosted by RT tasks, or might be boosted by - * interactivity modifiers. Will be RT if the task got - * RT-boosted. If not then it returns p->normal_prio. - */ -static int effective_prio(struct task_struct *p) -{ - p->normal_prio = normal_prio(p); - /* - * If we are RT tasks or we were boosted to RT priority, - * keep the priority unchanged. Otherwise, update priority - * to the normal priority: - */ - if (!rt_prio(p->prio)) - return p->normal_prio; - return p->prio; -} - /* * __activate_task - move a task to the runqueue. */ -static void __activate_task(struct task_struct *p, struct rq *rq) +static void __activate_task(task_t *p, runqueue_t *rq) { - struct prio_array *target = rq->active; + prio_array_t *target = rq->active; if (batch_task(p)) target = rq->expired; enqueue_task(p, target); - inc_nr_running(p, rq); + rq->nr_running++; } /* * __activate_idle_task - move idle task to the _front_ of runqueue. */ -static inline void __activate_idle_task(struct task_struct *p, struct rq *rq) +static inline void __activate_idle_task(task_t *p, runqueue_t *rq) { enqueue_task_head(p, rq->active); - inc_nr_running(p, rq); + rq->nr_running++; } -/* - * Recalculate p->normal_prio and p->prio after having slept, - * updating the sleep-average too: - */ -static int recalc_task_prio(struct task_struct *p, unsigned long long now) +static int recalc_task_prio(task_t *p, unsigned long long now) { /* Caller must always ensure 'now >= p->timestamp' */ - unsigned long sleep_time = now - p->timestamp; + unsigned long long __sleep_time = now - p->timestamp; + unsigned long sleep_time; if (batch_task(p)) sleep_time = 0; + else { + if (__sleep_time > NS_MAX_SLEEP_AVG) + sleep_time = NS_MAX_SLEEP_AVG; + else + sleep_time = (unsigned long)__sleep_time; + } if (likely(sleep_time > 0)) { /* - * This ceiling is set to the lowest priority that would allow - * a task to be reinserted into the active array on timeslice - * completion. + * User tasks that sleep a long time are categorised as + * idle. They will only have their sleep_avg increased to a + * level that makes them just interactive priority to stay + * active yet prevent them suddenly becoming cpu hogs and + * starving other processes. */ - unsigned long ceiling = INTERACTIVE_SLEEP(p); + if (p->mm && sleep_time > INTERACTIVE_SLEEP(p)) { + unsigned long ceiling; - if (p->mm && sleep_time > ceiling && p->sleep_avg < ceiling) { - /* - * Prevents user tasks from achieving best priority - * with one single large enough sleep. - */ - p->sleep_avg = ceiling; - /* - * Using INTERACTIVE_SLEEP() as a ceiling places a - * nice(0) task 1ms sleep away from promotion, and - * gives it 700ms to round-robin with no chance of - * being demoted. This is more than generous, so - * mark this sleep as non-interactive to prevent the - * on-runqueue bonus logic from intervening should - * this task not receive cpu immediately. - */ - p->sleep_type = SLEEP_NONINTERACTIVE; + ceiling = JIFFIES_TO_NS(MAX_SLEEP_AVG - + DEF_TIMESLICE); + if (p->sleep_avg < ceiling) + p->sleep_avg = ceiling; } else { /* * Tasks waking from uninterruptible sleep are @@ -920,12 +741,12 @@ static int recalc_task_prio(struct task_struct *p, unsigned long long now) * are likely to be waiting on I/O */ if (p->sleep_type == SLEEP_NONINTERACTIVE && p->mm) { - if (p->sleep_avg >= ceiling) + if (p->sleep_avg >= INTERACTIVE_SLEEP(p)) sleep_time = 0; else if (p->sleep_avg + sleep_time >= - ceiling) { - p->sleep_avg = ceiling; - sleep_time = 0; + INTERACTIVE_SLEEP(p)) { + p->sleep_avg = INTERACTIVE_SLEEP(p); + sleep_time = 0; } } @@ -939,9 +760,9 @@ static int recalc_task_prio(struct task_struct *p, unsigned long long now) */ p->sleep_avg += sleep_time; + if (p->sleep_avg > NS_MAX_SLEEP_AVG) + p->sleep_avg = NS_MAX_SLEEP_AVG; } - if (p->sleep_avg > NS_MAX_SLEEP_AVG) - p->sleep_avg = NS_MAX_SLEEP_AVG; } return effective_prio(p); @@ -953,7 +774,7 @@ static int recalc_task_prio(struct task_struct *p, unsigned long long now) * Update all the scheduling statistics stuff. (sleep average * calculation, priority modifiers, etc.) */ -static void activate_task(struct task_struct *p, struct rq *rq, int local) +static void activate_task(task_t *p, runqueue_t *rq, int local) { unsigned long long now; @@ -961,7 +782,7 @@ static void activate_task(struct task_struct *p, struct rq *rq, int local) #ifdef CONFIG_SMP if (!local) { /* Compensate for drifting sched_clock */ - struct rq *this_rq = this_rq(); + runqueue_t *this_rq = this_rq(); now = (now - this_rq->timestamp_last_tick) + rq->timestamp_last_tick; } @@ -1001,15 +822,15 @@ static void activate_task(struct task_struct *p, struct rq *rq, int local) /* * deactivate_task - remove a task from the runqueue. */ -static void __deactivate_task(struct task_struct *p, struct rq *rq) +static void __deactivate_task(struct task_struct *p, runqueue_t *rq) { - dec_nr_running(p, rq); + rq->nr_running--; dequeue_task(p, p->array); p->array = NULL; } static inline -void deactivate_task(struct task_struct *p, struct rq *rq) +void deactivate_task(struct task_struct *p, runqueue_t *rq) { vx_deactivate_task(p); __deactivate_task(p, rq); @@ -1022,7 +843,7 @@ void deactivate_task(struct task_struct *p, struct rq *rq) */ static inline void vx_hold_task(struct vx_info *vxi, - struct task_struct *p, struct rq *rq) + struct task_struct *p, runqueue_t *rq) { __deactivate_task(p, rq); p->state |= TASK_ONHOLD; @@ -1036,14 +857,14 @@ void vx_hold_task(struct vx_info *vxi, */ static inline void vx_unhold_task(struct vx_info *vxi, - struct task_struct *p, struct rq *rq) + struct task_struct *p, runqueue_t *rq) { list_del(&p->run_list); /* one less waiting */ vx_onhold_dec(vxi); p->state &= ~TASK_ONHOLD; enqueue_task(p, rq->expired); - inc_nr_running(p, rq); + rq->nr_running++; if (p->static_prio < rq->best_expired_prio) rq->best_expired_prio = p->static_prio; @@ -1051,14 +872,14 @@ void vx_unhold_task(struct vx_info *vxi, #else static inline void vx_hold_task(struct vx_info *vxi, - struct task_struct *p, struct rq *rq) + struct task_struct *p, runqueue_t *rq) { return; } static inline void vx_unhold_task(struct vx_info *vxi, - struct task_struct *p, struct rq *rq) + struct task_struct *p, runqueue_t *rq) { return; } @@ -1073,12 +894,7 @@ void vx_unhold_task(struct vx_info *vxi, * the target CPU. */ #ifdef CONFIG_SMP - -#ifndef tsk_is_polling -#define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) -#endif - -static void resched_task(struct task_struct *p) +static void resched_task(task_t *p) { int cpu; @@ -1093,13 +909,13 @@ static void resched_task(struct task_struct *p) if (cpu == smp_processor_id()) return; - /* NEED_RESCHED must be visible before we test polling */ + /* NEED_RESCHED must be visible before we test POLLING_NRFLAG */ smp_mb(); - if (!tsk_is_polling(p)) + if (!test_tsk_thread_flag(p, TIF_POLLING_NRFLAG)) smp_send_reschedule(cpu); } #else -static inline void resched_task(struct task_struct *p) +static inline void resched_task(task_t *p) { assert_spin_locked(&task_rq(p)->lock); set_tsk_need_resched(p); @@ -1110,35 +926,28 @@ static inline void resched_task(struct task_struct *p) * task_curr - is this task currently executing on a CPU? * @p: the task in question. */ -inline int task_curr(const struct task_struct *p) +inline int task_curr(const task_t *p) { return cpu_curr(task_cpu(p)) == p; } -/* Used instead of source_load when we know the type == 0 */ -unsigned long weighted_cpuload(const int cpu) -{ - return cpu_rq(cpu)->raw_weighted_load; -} - #ifdef CONFIG_SMP -struct migration_req { +typedef struct { struct list_head list; - struct task_struct *task; + task_t *task; int dest_cpu; struct completion done; -}; +} migration_req_t; /* * The task's runqueue lock must be held. * Returns true if you have to wait for migration thread. */ -static int -migrate_task(struct task_struct *p, int dest_cpu, struct migration_req *req) +static int migrate_task(task_t *p, int dest_cpu, migration_req_t *req) { - struct rq *rq = task_rq(p); + runqueue_t *rq = task_rq(p); /* * If the task is not on a runqueue (and not running), then @@ -1153,7 +962,6 @@ migrate_task(struct task_struct *p, int dest_cpu, struct migration_req *req) req->task = p; req->dest_cpu = dest_cpu; list_add(&req->list, &rq->migration_queue); - return 1; } @@ -1166,10 +974,10 @@ migrate_task(struct task_struct *p, int dest_cpu, struct migration_req *req) * smp_call_function() if an IPI is sent by the same process we are * waiting to become inactive. */ -void wait_task_inactive(struct task_struct *p) +void wait_task_inactive(task_t *p) { unsigned long flags; - struct rq *rq; + runqueue_t *rq; int preempted; repeat: @@ -1200,7 +1008,7 @@ repeat: * to another CPU then no harm is done and the purpose has been * achieved as well. */ -void kick_process(struct task_struct *p) +void kick_process(task_t *p) { int cpu; @@ -1212,45 +1020,32 @@ void kick_process(struct task_struct *p) } /* - * Return a low guess at the load of a migration-source cpu weighted - * according to the scheduling class and "nice" value. + * Return a low guess at the load of a migration-source cpu. * * We want to under-estimate the load of migration sources, to * balance conservatively. */ static inline unsigned long source_load(int cpu, int type) { - struct rq *rq = cpu_rq(cpu); - + runqueue_t *rq = cpu_rq(cpu); + unsigned long load_now = rq->nr_running * SCHED_LOAD_SCALE; if (type == 0) - return rq->raw_weighted_load; + return load_now; - return min(rq->cpu_load[type-1], rq->raw_weighted_load); + return min(rq->cpu_load[type-1], load_now); } /* - * Return a high guess at the load of a migration-target cpu weighted - * according to the scheduling class and "nice" value. + * Return a high guess at the load of a migration-target cpu */ static inline unsigned long target_load(int cpu, int type) { - struct rq *rq = cpu_rq(cpu); - + runqueue_t *rq = cpu_rq(cpu); + unsigned long load_now = rq->nr_running * SCHED_LOAD_SCALE; if (type == 0) - return rq->raw_weighted_load; - - return max(rq->cpu_load[type-1], rq->raw_weighted_load); -} - -/* - * Return the average load per task on the cpu's run queue - */ -static inline unsigned long cpu_avg_load_per_task(int cpu) -{ - struct rq *rq = cpu_rq(cpu); - unsigned long n = rq->nr_running; + return load_now; - return n ? rq->raw_weighted_load / n : SCHED_LOAD_SCALE; + return max(rq->cpu_load[type-1], load_now); } /* @@ -1323,7 +1118,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) cpus_and(tmp, group->cpumask, p->cpus_allowed); for_each_cpu_mask(i, tmp) { - load = weighted_cpuload(i); + load = source_load(i, 0); if (load < min_load || (load == min_load && i == this_cpu)) { min_load = load; @@ -1350,15 +1145,9 @@ static int sched_balance_self(int cpu, int flag) struct task_struct *t = current; struct sched_domain *tmp, *sd = NULL; - for_each_domain(cpu, tmp) { - /* - * If power savings logic is enabled for a domain, stop there. - */ - if (tmp->flags & SD_POWERSAVINGS_BALANCE) - break; + for_each_domain(cpu, tmp) if (tmp->flags & flag) sd = tmp; - } while (sd) { cpumask_t span; @@ -1403,7 +1192,7 @@ nextlevel: * Returns the CPU we should wake onto. */ #if defined(ARCH_HAS_SCHED_WAKE_IDLE) -static int wake_idle(int cpu, struct task_struct *p) +static int wake_idle(int cpu, task_t *p) { cpumask_t tmp; struct sched_domain *sd; @@ -1426,7 +1215,7 @@ static int wake_idle(int cpu, struct task_struct *p) return cpu; } #else -static inline int wake_idle(int cpu, struct task_struct *p) +static inline int wake_idle(int cpu, task_t *p) { return cpu; } @@ -1446,15 +1235,15 @@ static inline int wake_idle(int cpu, struct task_struct *p) * * returns failure only if the task is already active. */ -static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) +static int try_to_wake_up(task_t *p, unsigned int state, int sync) { int cpu, this_cpu, success = 0; unsigned long flags; long old_state; - struct rq *rq; + runqueue_t *rq; #ifdef CONFIG_SMP - struct sched_domain *sd, *this_sd = NULL; unsigned long load, this_load; + struct sched_domain *sd, *this_sd = NULL; int new_cpu; #endif @@ -1514,19 +1303,17 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) if (this_sd->flags & SD_WAKE_AFFINE) { unsigned long tl = this_load; - unsigned long tl_per_task = cpu_avg_load_per_task(this_cpu); - /* * If sync wakeup then subtract the (maximum possible) * effect of the currently running task from the load * of the current CPU: */ if (sync) - tl -= current->load_weight; + tl -= SCHED_LOAD_SCALE; if ((tl <= load && - tl + target_load(cpu, idx) <= tl_per_task) || - 100*(tl + p->load_weight) <= imbalance*load) { + tl + target_load(cpu, idx) <= SCHED_LOAD_SCALE) || + 100*(tl + SCHED_LOAD_SCALE) <= imbalance*load) { /* * This domain has SD_WAKE_AFFINE and * p is cache cold in this domain, and @@ -1611,14 +1398,15 @@ out: return success; } -int fastcall wake_up_process(struct task_struct *p) +int fastcall wake_up_process(task_t *p) { return try_to_wake_up(p, TASK_STOPPED | TASK_TRACED | TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0); } + EXPORT_SYMBOL(wake_up_process); -int fastcall wake_up_state(struct task_struct *p, unsigned int state) +int fastcall wake_up_state(task_t *p, unsigned int state) { return try_to_wake_up(p, state, 0); } @@ -1627,7 +1415,7 @@ int fastcall wake_up_state(struct task_struct *p, unsigned int state) * Perform scheduler related setup for a newly forked process p. * p is forked by current. */ -void fastcall sched_fork(struct task_struct *p, int clone_flags) +void fastcall sched_fork(task_t *p, int clone_flags) { int cpu = get_cpu(); @@ -1643,17 +1431,10 @@ void fastcall sched_fork(struct task_struct *p, int clone_flags) * event cannot wake it up and insert it on the runqueue either. */ p->state = TASK_RUNNING; - - /* - * Make sure we do not leak PI boosting priority to the child: - */ - p->prio = current->normal_prio; - INIT_LIST_HEAD(&p->run_list); p->array = NULL; -#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) - if (unlikely(sched_info_on())) - memset(&p->sched_info, 0, sizeof(p->sched_info)); +#ifdef CONFIG_SCHEDSTATS + memset(&p->sched_info, 0, sizeof(p->sched_info)); #endif #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) p->oncpu = 0; @@ -1696,11 +1477,11 @@ void fastcall sched_fork(struct task_struct *p, int clone_flags) * that must be done for every newly created context, then puts the task * on the runqueue and wakes it. */ -void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) +void fastcall wake_up_new_task(task_t *p, unsigned long clone_flags) { - struct rq *rq, *this_rq; unsigned long flags; int this_cpu, cpu; + runqueue_t *rq, *this_rq; rq = task_rq_lock(p, &flags); BUG_ON(p->state != TASK_RUNNING); @@ -1731,11 +1512,10 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) else { p->prio = current->prio; BUG_ON(p->state & TASK_ONHOLD); - p->normal_prio = current->normal_prio; list_add_tail(&p->run_list, ¤t->run_list); p->array = current->array; p->array->nr_active++; - inc_nr_running(p, rq); + rq->nr_running++; } set_need_resched(); } else @@ -1782,10 +1562,10 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags) * artificially, because any timeslice recovered here * was given away by the parent in the first place.) */ -void fastcall sched_exit(struct task_struct *p) +void fastcall sched_exit(task_t *p) { unsigned long flags; - struct rq *rq; + runqueue_t *rq; /* * If the child was a (relative-) CPU hog then decrease @@ -1816,7 +1596,7 @@ void fastcall sched_exit(struct task_struct *p) * prepare_task_switch sets up locking and calls architecture specific * hooks. */ -static inline void prepare_task_switch(struct rq *rq, struct task_struct *next) +static inline void prepare_task_switch(runqueue_t *rq, task_t *next) { prepare_lock_switch(rq, next); prepare_arch_switch(next); @@ -1837,7 +1617,7 @@ static inline void prepare_task_switch(struct rq *rq, struct task_struct *next) * with the lock held can cause deadlocks; see schedule() for * details.) */ -static inline void finish_task_switch(struct rq *rq, struct task_struct *prev) +static inline void finish_task_switch(runqueue_t *rq, task_t *prev) __releases(rq->lock) { struct mm_struct *mm = rq->prev_mm; @@ -1875,11 +1655,10 @@ static inline void finish_task_switch(struct rq *rq, struct task_struct *prev) * schedule_tail - first thing a freshly forked thread must call. * @prev: the thread we just switched away from. */ -asmlinkage void schedule_tail(struct task_struct *prev) +asmlinkage void schedule_tail(task_t *prev) __releases(rq->lock) { - struct rq *rq = this_rq(); - + runqueue_t *rq = this_rq(); finish_task_switch(rq, prev); #ifdef __ARCH_WANT_UNLOCKED_CTXSW /* In this case, finish_task_switch does not reenable preemption */ @@ -1893,9 +1672,8 @@ asmlinkage void schedule_tail(struct task_struct *prev) * context_switch - switch to the new MM and the new * thread's register state. */ -static inline struct task_struct * -context_switch(struct rq *rq, struct task_struct *prev, - struct task_struct *next) +static inline +task_t * context_switch(runqueue_t *rq, task_t *prev, task_t *next) { struct mm_struct *mm = next->mm; struct mm_struct *oldmm = prev->active_mm; @@ -1912,15 +1690,6 @@ context_switch(struct rq *rq, struct task_struct *prev, WARN_ON(rq->prev_mm); rq->prev_mm = oldmm; } - /* - * Since the runqueue lock will be released by the next - * task (which is an invalid locking op but in the case - * of the scheduler it's an obvious special-case), so we - * do an early lockdep release here: - */ -#ifndef __ARCH_WANT_UNLOCKED_CTXSW - spin_release(&rq->lock.dep_map, 1, _THIS_IP_); -#endif /* Here we just switch the register state and the stack. */ switch_to(prev, next, prev); @@ -1964,8 +1733,7 @@ unsigned long nr_uninterruptible(void) unsigned long long nr_context_switches(void) { - int i; - unsigned long long sum = 0; + unsigned long long i, sum = 0; for_each_possible_cpu(i) sum += cpu_rq(i)->nr_switches; @@ -2000,22 +1768,16 @@ unsigned long nr_active(void) #ifdef CONFIG_SMP -/* - * Is this task likely cache-hot: - */ -static inline int -task_hot(struct task_struct *p, unsigned long long now, struct sched_domain *sd) -{ - return (long long)(now - p->last_ran) < (long long)sd->cache_hot_time; -} - /* * double_rq_lock - safely lock two runqueues * + * We must take them in cpu order to match code in + * dependent_sleeper and wake_dependent_sleeper. + * * Note this does not disable interrupts like task_rq_lock, * you need to do so manually before calling. */ -static void double_rq_lock(struct rq *rq1, struct rq *rq2) +static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2) __acquires(rq1->lock) __acquires(rq2->lock) { @@ -2023,7 +1785,7 @@ static void double_rq_lock(struct rq *rq1, struct rq *rq2) spin_lock(&rq1->lock); __acquire(rq2->lock); /* Fake it out ;) */ } else { - if (rq1 < rq2) { + if (rq1->cpu < rq2->cpu) { spin_lock(&rq1->lock); spin_lock(&rq2->lock); } else { @@ -2039,7 +1801,7 @@ static void double_rq_lock(struct rq *rq1, struct rq *rq2) * Note this does not restore interrupts like task_rq_unlock, * you need to do so manually after calling. */ -static void double_rq_unlock(struct rq *rq1, struct rq *rq2) +static void double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2) __releases(rq1->lock) __releases(rq2->lock) { @@ -2053,13 +1815,13 @@ static void double_rq_unlock(struct rq *rq1, struct rq *rq2) /* * double_lock_balance - lock the busiest runqueue, this_rq is locked already. */ -static void double_lock_balance(struct rq *this_rq, struct rq *busiest) +static void double_lock_balance(runqueue_t *this_rq, runqueue_t *busiest) __releases(this_rq->lock) __acquires(busiest->lock) __acquires(this_rq->lock) { if (unlikely(!spin_trylock(&busiest->lock))) { - if (busiest < this_rq) { + if (busiest->cpu < this_rq->cpu) { spin_unlock(&this_rq->lock); spin_lock(&busiest->lock); spin_lock(&this_rq->lock); @@ -2074,11 +1836,11 @@ static void double_lock_balance(struct rq *this_rq, struct rq *busiest) * allow dest_cpu, which will force the cpu onto dest_cpu. Then * the cpu_allowed mask is restored. */ -static void sched_migrate_task(struct task_struct *p, int dest_cpu) +static void sched_migrate_task(task_t *p, int dest_cpu) { - struct migration_req req; + migration_req_t req; + runqueue_t *rq; unsigned long flags; - struct rq *rq; rq = task_rq_lock(p, &flags); if (!cpu_isset(dest_cpu, p->cpus_allowed) @@ -2089,13 +1851,11 @@ static void sched_migrate_task(struct task_struct *p, int dest_cpu) if (migrate_task(p, dest_cpu, &req)) { /* Need to wait for migration thread (might exit: take ref). */ struct task_struct *mt = rq->migration_thread; - get_task_struct(mt); task_rq_unlock(rq, &flags); wake_up_process(mt); put_task_struct(mt); wait_for_completion(&req.done); - return; } out: @@ -2119,14 +1879,14 @@ void sched_exec(void) * pull_task - move a task from a remote runqueue to the local runqueue. * Both runqueues must be locked. */ -static void pull_task(struct rq *src_rq, struct prio_array *src_array, - struct task_struct *p, struct rq *this_rq, - struct prio_array *this_array, int this_cpu) +static +void pull_task(runqueue_t *src_rq, prio_array_t *src_array, task_t *p, + runqueue_t *this_rq, prio_array_t *this_array, int this_cpu) { dequeue_task(p, src_array); - dec_nr_running(p, src_rq); + src_rq->nr_running--; set_task_cpu(p, this_cpu); - inc_nr_running(p, this_rq); + this_rq->nr_running++; enqueue_task(p, this_array); p->timestamp = (p->timestamp - src_rq->timestamp_last_tick) + this_rq->timestamp_last_tick; @@ -2142,7 +1902,7 @@ static void pull_task(struct rq *src_rq, struct prio_array *src_array, * can_migrate_task - may task p from runqueue rq be migrated to this_cpu? */ static -int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu, +int can_migrate_task(task_t *p, runqueue_t *rq, int this_cpu, struct sched_domain *sd, enum idle_type idle, int *all_pinned) { @@ -2173,42 +1933,26 @@ int can_migrate_task(struct task_struct *p, struct rq *rq, int this_cpu, return 1; } -#define rq_best_prio(rq) min((rq)->curr->prio, (rq)->best_expired_prio) - /* - * move_tasks tries to move up to max_nr_move tasks and max_load_move weighted - * load from busiest to this_rq, as part of a balancing operation within - * "domain". Returns the number of tasks moved. + * move_tasks tries to move up to max_nr_move tasks from busiest to this_rq, + * as part of a balancing operation within "domain". Returns the number of + * tasks moved. * * Called with both runqueues locked. */ -static int move_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest, - unsigned long max_nr_move, unsigned long max_load_move, - struct sched_domain *sd, enum idle_type idle, - int *all_pinned) +static int move_tasks(runqueue_t *this_rq, int this_cpu, runqueue_t *busiest, + unsigned long max_nr_move, struct sched_domain *sd, + enum idle_type idle, int *all_pinned) { - int idx, pulled = 0, pinned = 0, this_best_prio, best_prio, - best_prio_seen, skip_for_load; - struct prio_array *array, *dst_array; + prio_array_t *array, *dst_array; struct list_head *head, *curr; - struct task_struct *tmp; - long rem_load_move; + int idx, pulled = 0, pinned = 0; + task_t *tmp; - if (max_nr_move == 0 || max_load_move == 0) + if (max_nr_move == 0) goto out; - rem_load_move = max_load_move; pinned = 1; - this_best_prio = rq_best_prio(this_rq); - best_prio = rq_best_prio(busiest); - /* - * Enable handling of the case where there is more than one task - * with the best priority. If the current running task is one - * of those with prio==best_prio we know it won't be moved - * and therefore it's safe to override the skip (based on load) of - * any task we find with that prio. - */ - best_prio_seen = best_prio == busiest->curr->prio; /* * We first consider expired tasks. Those will likely not be @@ -2244,22 +1988,11 @@ skip_bitmap: head = array->queue + idx; curr = head->prev; skip_queue: - tmp = list_entry(curr, struct task_struct, run_list); + tmp = list_entry(curr, task_t, run_list); curr = curr->prev; - /* - * To help distribute high priority tasks accross CPUs we don't - * skip a task if it will be the highest priority task (i.e. smallest - * prio value) on its new queue regardless of its load weight - */ - skip_for_load = tmp->load_weight > rem_load_move; - if (skip_for_load && idx < this_best_prio) - skip_for_load = !best_prio_seen && idx == best_prio; - if (skip_for_load || - !can_migrate_task(tmp, busiest, this_cpu, sd, idle, &pinned)) { - - best_prio_seen |= idx == best_prio; + if (!can_migrate_task(tmp, busiest, this_cpu, sd, idle, &pinned)) { if (curr != head) goto skip_queue; idx++; @@ -2273,15 +2006,9 @@ skip_queue: pull_task(busiest, array, tmp, this_rq, dst_array, this_cpu); pulled++; - rem_load_move -= tmp->load_weight; - /* - * We only want to steal up to the prescribed number of tasks - * and the prescribed amount of weighted load. - */ - if (pulled < max_nr_move && rem_load_move > 0) { - if (idx < this_best_prio) - this_best_prio = idx; + /* We only want to steal up to the prescribed number of tasks. */ + if (pulled < max_nr_move) { if (curr != head) goto skip_queue; idx++; @@ -2302,30 +2029,19 @@ out: /* * find_busiest_group finds and returns the busiest CPU group within the - * domain. It calculates and returns the amount of weighted load which - * should be moved to restore balance via the imbalance parameter. + * domain. It calculates and returns the number of tasks which should be + * moved to restore balance via the imbalance parameter. */ static struct sched_group * find_busiest_group(struct sched_domain *sd, int this_cpu, - unsigned long *imbalance, enum idle_type idle, int *sd_idle, - cpumask_t *cpus) + unsigned long *imbalance, enum idle_type idle, int *sd_idle) { struct sched_group *busiest = NULL, *this = NULL, *group = sd->groups; unsigned long max_load, avg_load, total_load, this_load, total_pwr; unsigned long max_pull; - unsigned long busiest_load_per_task, busiest_nr_running; - unsigned long this_load_per_task, this_nr_running; int load_idx; -#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) - int power_savings_balance = 1; - unsigned long leader_nr_running = 0, min_load_per_task = 0; - unsigned long min_nr_running = ULONG_MAX; - struct sched_group *group_min = NULL, *group_leader = NULL; -#endif max_load = this_load = total_load = total_pwr = 0; - busiest_load_per_task = busiest_nr_running = 0; - this_load_per_task = this_nr_running = 0; if (idle == NOT_IDLE) load_idx = sd->busy_idx; else if (idle == NEWLY_IDLE) @@ -2334,24 +2050,16 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, load_idx = sd->idle_idx; do { - unsigned long load, group_capacity; + unsigned long load; int local_group; int i; - unsigned long sum_nr_running, sum_weighted_load; local_group = cpu_isset(this_cpu, group->cpumask); /* Tally up the load of all CPUs in the group */ - sum_weighted_load = sum_nr_running = avg_load = 0; + avg_load = 0; for_each_cpu_mask(i, group->cpumask) { - struct rq *rq; - - if (!cpu_isset(i, *cpus)) - continue; - - rq = cpu_rq(i); - if (*sd_idle && !idle_cpu(i)) *sd_idle = 0; @@ -2362,8 +2070,6 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, load = source_load(i, load_idx); avg_load += load; - sum_nr_running += rq->nr_running; - sum_weighted_load += rq->raw_weighted_load; } total_load += avg_load; @@ -2372,80 +2078,17 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, /* Adjust by relative CPU power of the group */ avg_load = (avg_load * SCHED_LOAD_SCALE) / group->cpu_power; - group_capacity = group->cpu_power / SCHED_LOAD_SCALE; - if (local_group) { this_load = avg_load; this = group; - this_nr_running = sum_nr_running; - this_load_per_task = sum_weighted_load; - } else if (avg_load > max_load && - sum_nr_running > group_capacity) { + } else if (avg_load > max_load) { max_load = avg_load; busiest = group; - busiest_nr_running = sum_nr_running; - busiest_load_per_task = sum_weighted_load; - } - -#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) - /* - * Busy processors will not participate in power savings - * balance. - */ - if (idle == NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE)) - goto group_next; - - /* - * If the local group is idle or completely loaded - * no need to do power savings balance at this domain - */ - if (local_group && (this_nr_running >= group_capacity || - !this_nr_running)) - power_savings_balance = 0; - - /* - * If a group is already running at full capacity or idle, - * don't include that group in power savings calculations - */ - if (!power_savings_balance || sum_nr_running >= group_capacity - || !sum_nr_running) - goto group_next; - - /* - * Calculate the group which has the least non-idle load. - * This is the group from where we need to pick up the load - * for saving power - */ - if ((sum_nr_running < min_nr_running) || - (sum_nr_running == min_nr_running && - first_cpu(group->cpumask) < - first_cpu(group_min->cpumask))) { - group_min = group; - min_nr_running = sum_nr_running; - min_load_per_task = sum_weighted_load / - sum_nr_running; - } - - /* - * Calculate the group which is almost near its - * capacity but still has some space to pick up some load - * from other group and save more power - */ - if (sum_nr_running <= group_capacity - 1) { - if (sum_nr_running > leader_nr_running || - (sum_nr_running == leader_nr_running && - first_cpu(group->cpumask) > - first_cpu(group_leader->cpumask))) { - group_leader = group; - leader_nr_running = sum_nr_running; - } } -group_next: -#endif group = group->next; } while (group != sd->groups); - if (!busiest || this_load >= max_load || busiest_nr_running == 0) + if (!busiest || this_load >= max_load || max_load <= SCHED_LOAD_SCALE) goto out_balanced; avg_load = (SCHED_LOAD_SCALE * total_load) / total_pwr; @@ -2454,7 +2097,6 @@ group_next: 100*max_load <= sd->imbalance_pct*this_load) goto out_balanced; - busiest_load_per_task /= busiest_nr_running; /* * We're trying to get all the cpus to the average_load, so we don't * want to push ourselves above the average load, nor do we wish to @@ -2466,49 +2108,21 @@ group_next: * by pulling tasks to us. Be careful of negative numbers as they'll * appear as very large values with unsigned longs. */ - if (max_load <= busiest_load_per_task) - goto out_balanced; - - /* - * In the presence of smp nice balancing, certain scenarios can have - * max load less than avg load(as we skip the groups at or below - * its cpu_power, while calculating max_load..) - */ - if (max_load < avg_load) { - *imbalance = 0; - goto small_imbalance; - } /* Don't want to pull so many tasks that a group would go idle */ - max_pull = min(max_load - avg_load, max_load - busiest_load_per_task); + max_pull = min(max_load - avg_load, max_load - SCHED_LOAD_SCALE); /* How much load to actually move to equalise the imbalance */ *imbalance = min(max_pull * busiest->cpu_power, (avg_load - this_load) * this->cpu_power) / SCHED_LOAD_SCALE; - /* - * if *imbalance is less than the average load per runnable task - * there is no gaurantee that any tasks will be moved so we'll have - * a think about bumping its value to force at least one task to be - * moved - */ - if (*imbalance < busiest_load_per_task) { - unsigned long tmp, pwr_now, pwr_move; - unsigned int imbn; - -small_imbalance: - pwr_move = pwr_now = 0; - imbn = 2; - if (this_nr_running) { - this_load_per_task /= this_nr_running; - if (busiest_load_per_task > this_load_per_task) - imbn = 1; - } else - this_load_per_task = SCHED_LOAD_SCALE; + if (*imbalance < SCHED_LOAD_SCALE) { + unsigned long pwr_now = 0, pwr_move = 0; + unsigned long tmp; - if (max_load - this_load >= busiest_load_per_task * imbn) { - *imbalance = busiest_load_per_task; + if (max_load - this_load >= SCHED_LOAD_SCALE*2) { + *imbalance = 1; return busiest; } @@ -2518,47 +2132,39 @@ small_imbalance: * moving them. */ - pwr_now += busiest->cpu_power * - min(busiest_load_per_task, max_load); - pwr_now += this->cpu_power * - min(this_load_per_task, this_load); + pwr_now += busiest->cpu_power*min(SCHED_LOAD_SCALE, max_load); + pwr_now += this->cpu_power*min(SCHED_LOAD_SCALE, this_load); pwr_now /= SCHED_LOAD_SCALE; /* Amount of load we'd subtract */ - tmp = busiest_load_per_task*SCHED_LOAD_SCALE/busiest->cpu_power; + tmp = SCHED_LOAD_SCALE*SCHED_LOAD_SCALE/busiest->cpu_power; if (max_load > tmp) - pwr_move += busiest->cpu_power * - min(busiest_load_per_task, max_load - tmp); + pwr_move += busiest->cpu_power*min(SCHED_LOAD_SCALE, + max_load - tmp); /* Amount of load we'd add */ if (max_load*busiest->cpu_power < - busiest_load_per_task*SCHED_LOAD_SCALE) + SCHED_LOAD_SCALE*SCHED_LOAD_SCALE) tmp = max_load*busiest->cpu_power/this->cpu_power; else - tmp = busiest_load_per_task*SCHED_LOAD_SCALE/this->cpu_power; - pwr_move += this->cpu_power*min(this_load_per_task, this_load + tmp); + tmp = SCHED_LOAD_SCALE*SCHED_LOAD_SCALE/this->cpu_power; + pwr_move += this->cpu_power*min(SCHED_LOAD_SCALE, this_load + tmp); pwr_move /= SCHED_LOAD_SCALE; /* Move if we gain throughput */ if (pwr_move <= pwr_now) goto out_balanced; - *imbalance = busiest_load_per_task; + *imbalance = 1; + return busiest; } + /* Get rid of the scaling factor, rounding down as we divide */ + *imbalance = *imbalance / SCHED_LOAD_SCALE; return busiest; out_balanced: -#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) - if (idle == NOT_IDLE || !(sd->flags & SD_POWERSAVINGS_BALANCE)) - goto ret; - if (this == group_leader && group_leader != group_min) { - *imbalance = min_load_per_task; - return group_min; - } -ret: -#endif *imbalance = 0; return NULL; } @@ -2566,27 +2172,19 @@ ret: /* * find_busiest_queue - find the busiest runqueue among the cpus in group. */ -static struct rq * -find_busiest_queue(struct sched_group *group, enum idle_type idle, - unsigned long imbalance, cpumask_t *cpus) +static runqueue_t *find_busiest_queue(struct sched_group *group, + enum idle_type idle) { - struct rq *busiest = NULL, *rq; - unsigned long max_load = 0; + unsigned long load, max_load = 0; + runqueue_t *busiest = NULL; int i; for_each_cpu_mask(i, group->cpumask) { + load = source_load(i, 0); - if (!cpu_isset(i, *cpus)) - continue; - - rq = cpu_rq(i); - - if (rq->nr_running == 1 && rq->raw_weighted_load > imbalance) - continue; - - if (rq->raw_weighted_load > max_load) { - max_load = rq->raw_weighted_load; - busiest = rq; + if (load > max_load) { + max_load = load; + busiest = cpu_rq(i); } } @@ -2599,41 +2197,34 @@ find_busiest_queue(struct sched_group *group, enum idle_type idle, */ #define MAX_PINNED_INTERVAL 512 -static inline unsigned long minus_1_or_zero(unsigned long n) -{ - return n > 0 ? n - 1 : 0; -} - /* * Check this_cpu to ensure it is balanced within domain. Attempt to move * tasks if there is an imbalance. * * Called with this_rq unlocked. */ -static int load_balance(int this_cpu, struct rq *this_rq, +static int load_balance(int this_cpu, runqueue_t *this_rq, struct sched_domain *sd, enum idle_type idle) { - int nr_moved, all_pinned = 0, active_balance = 0, sd_idle = 0; struct sched_group *group; + runqueue_t *busiest; unsigned long imbalance; - struct rq *busiest; - cpumask_t cpus = CPU_MASK_ALL; + int nr_moved, all_pinned = 0; + int active_balance = 0; + int sd_idle = 0; - if (idle != NOT_IDLE && sd->flags & SD_SHARE_CPUPOWER && - !sched_smt_power_savings) + if (idle != NOT_IDLE && sd->flags & SD_SHARE_CPUPOWER) sd_idle = 1; schedstat_inc(sd, lb_cnt[idle]); -redo: - group = find_busiest_group(sd, this_cpu, &imbalance, idle, &sd_idle, - &cpus); + group = find_busiest_group(sd, this_cpu, &imbalance, idle, &sd_idle); if (!group) { schedstat_inc(sd, lb_nobusyg[idle]); goto out_balanced; } - busiest = find_busiest_queue(group, idle, imbalance, &cpus); + busiest = find_busiest_queue(group, idle); if (!busiest) { schedstat_inc(sd, lb_nobusyq[idle]); goto out_balanced; @@ -2653,17 +2244,12 @@ redo: */ double_rq_lock(this_rq, busiest); nr_moved = move_tasks(this_rq, this_cpu, busiest, - minus_1_or_zero(busiest->nr_running), - imbalance, sd, idle, &all_pinned); + imbalance, sd, idle, &all_pinned); double_rq_unlock(this_rq, busiest); /* All tasks on this runqueue were pinned by CPU affinity */ - if (unlikely(all_pinned)) { - cpu_clear(cpu_of(busiest), cpus); - if (!cpus_empty(cpus)) - goto redo; + if (unlikely(all_pinned)) goto out_balanced; - } } if (!nr_moved) { @@ -2715,8 +2301,7 @@ redo: sd->balance_interval *= 2; } - if (!nr_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && - !sched_smt_power_savings) + if (!nr_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER) return -1; return nr_moved; @@ -2731,8 +2316,7 @@ out_one_pinned: (sd->balance_interval < sd->max_interval)) sd->balance_interval *= 2; - if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && - !sched_smt_power_savings) + if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER) return -1; return 0; } @@ -2744,30 +2328,26 @@ out_one_pinned: * Called from schedule when this_rq is about to become idle (NEWLY_IDLE). * this_rq is locked. */ -static int -load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd) +static int load_balance_newidle(int this_cpu, runqueue_t *this_rq, + struct sched_domain *sd) { struct sched_group *group; - struct rq *busiest = NULL; + runqueue_t *busiest = NULL; unsigned long imbalance; int nr_moved = 0; int sd_idle = 0; - cpumask_t cpus = CPU_MASK_ALL; - if (sd->flags & SD_SHARE_CPUPOWER && !sched_smt_power_savings) + if (sd->flags & SD_SHARE_CPUPOWER) sd_idle = 1; schedstat_inc(sd, lb_cnt[NEWLY_IDLE]); -redo: - group = find_busiest_group(sd, this_cpu, &imbalance, NEWLY_IDLE, - &sd_idle, &cpus); + group = find_busiest_group(sd, this_cpu, &imbalance, NEWLY_IDLE, &sd_idle); if (!group) { schedstat_inc(sd, lb_nobusyg[NEWLY_IDLE]); goto out_balanced; } - busiest = find_busiest_queue(group, NEWLY_IDLE, imbalance, - &cpus); + busiest = find_busiest_queue(group, NEWLY_IDLE); if (!busiest) { schedstat_inc(sd, lb_nobusyq[NEWLY_IDLE]); goto out_balanced; @@ -2782,15 +2362,8 @@ redo: /* Attempt to move tasks */ double_lock_balance(this_rq, busiest); nr_moved = move_tasks(this_rq, this_cpu, busiest, - minus_1_or_zero(busiest->nr_running), imbalance, sd, NEWLY_IDLE, NULL); spin_unlock(&busiest->lock); - - if (!nr_moved) { - cpu_clear(cpu_of(busiest), cpus); - if (!cpus_empty(cpus)) - goto redo; - } } if (!nr_moved) { @@ -2804,11 +2377,9 @@ redo: out_balanced: schedstat_inc(sd, lb_balanced[NEWLY_IDLE]); - if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && - !sched_smt_power_savings) + if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER) return -1; sd->nr_balance_failed = 0; - return 0; } @@ -2816,15 +2387,16 @@ out_balanced: * idle_balance is called by schedule() if this_cpu is about to become * idle. Attempts to pull tasks from other CPUs. */ -static void idle_balance(int this_cpu, struct rq *this_rq) +static void idle_balance(int this_cpu, runqueue_t *this_rq) { struct sched_domain *sd; for_each_domain(this_cpu, sd) { if (sd->flags & SD_BALANCE_NEWIDLE) { - /* If we've pulled tasks over stop searching: */ - if (load_balance_newidle(this_cpu, this_rq, sd)) + if (load_balance_newidle(this_cpu, this_rq, sd)) { + /* We've pulled tasks over so stop searching */ break; + } } } } @@ -2837,14 +2409,14 @@ static void idle_balance(int this_cpu, struct rq *this_rq) * * Called with busiest_rq locked. */ -static void active_load_balance(struct rq *busiest_rq, int busiest_cpu) +static void active_load_balance(runqueue_t *busiest_rq, int busiest_cpu) { - int target_cpu = busiest_rq->push_cpu; struct sched_domain *sd; - struct rq *target_rq; + runqueue_t *target_rq; + int target_cpu = busiest_rq->push_cpu; - /* Is there any task to move? */ if (busiest_rq->nr_running <= 1) + /* no task to move */ return; target_rq = cpu_rq(target_cpu); @@ -2860,22 +2432,21 @@ static void active_load_balance(struct rq *busiest_rq, int busiest_cpu) double_lock_balance(busiest_rq, target_rq); /* Search for an sd spanning us and the target CPU. */ - for_each_domain(target_cpu, sd) { + for_each_domain(target_cpu, sd) if ((sd->flags & SD_LOAD_BALANCE) && - cpu_isset(busiest_cpu, sd->span)) + cpu_isset(busiest_cpu, sd->span)) break; - } - if (likely(sd)) { - schedstat_inc(sd, alb_cnt); + if (unlikely(sd == NULL)) + goto out; + + schedstat_inc(sd, alb_cnt); - if (move_tasks(target_rq, target_cpu, busiest_rq, 1, - RTPRIO_TO_LOAD_WEIGHT(100), sd, SCHED_IDLE, - NULL)) - schedstat_inc(sd, alb_pushed); - else - schedstat_inc(sd, alb_failed); - } + if (move_tasks(target_rq, target_cpu, busiest_rq, 1, sd, SCHED_IDLE, NULL)) + schedstat_inc(sd, alb_pushed); + else + schedstat_inc(sd, alb_failed); +out: spin_unlock(&target_rq->lock); } @@ -2888,27 +2459,23 @@ static void active_load_balance(struct rq *busiest_rq, int busiest_cpu) * Balancing parameters are set up in arch_init_sched_domains. */ -/* Don't have all balancing operations going off at once: */ -static inline unsigned long cpu_offset(int cpu) -{ - return jiffies + cpu * HZ / NR_CPUS; -} +/* Don't have all balancing operations going off at once */ +#define CPU_OFFSET(cpu) (HZ * cpu / NR_CPUS) -static void -rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) +static void rebalance_tick(int this_cpu, runqueue_t *this_rq, + enum idle_type idle) { - unsigned long this_load, interval, j = cpu_offset(this_cpu); + unsigned long old_load, this_load; + unsigned long j = jiffies + CPU_OFFSET(this_cpu); struct sched_domain *sd; - int i, scale; - - this_load = this_rq->raw_weighted_load; - - /* Update our load: */ - for (i = 0, scale = 1; i < 3; i++, scale <<= 1) { - unsigned long old_load, new_load; + int i; + this_load = this_rq->nr_running * SCHED_LOAD_SCALE; + /* Update our load */ + for (i = 0; i < 3; i++) { + unsigned long new_load = this_load; + int scale = 1 << i; old_load = this_rq->cpu_load[i]; - new_load = this_load; /* * Round up the averaging division if load is increasing. This * prevents us from getting stuck on 9 if the load is 10, for @@ -2920,6 +2487,8 @@ rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) } for_each_domain(this_cpu, sd) { + unsigned long interval; + if (!(sd->flags & SD_LOAD_BALANCE)) continue; @@ -2949,18 +2518,17 @@ rebalance_tick(int this_cpu, struct rq *this_rq, enum idle_type idle) /* * on UP we do not need to balance between CPUs: */ -static inline void rebalance_tick(int cpu, struct rq *rq, enum idle_type idle) +static inline void rebalance_tick(int cpu, runqueue_t *rq, enum idle_type idle) { } -static inline void idle_balance(int cpu, struct rq *rq) +static inline void idle_balance(int cpu, runqueue_t *rq) { } #endif -static inline int wake_priority_sleeper(struct rq *rq) +static inline int wake_priority_sleeper(runqueue_t *rq) { int ret = 0; - #ifdef CONFIG_SCHED_SMT spin_lock(&rq->lock); /* @@ -2984,26 +2552,25 @@ EXPORT_PER_CPU_SYMBOL(kstat); * This is called on clock ticks and on context switches. * Bank in p->sched_time the ns elapsed since the last tick or switch. */ -static inline void -update_cpu_clock(struct task_struct *p, struct rq *rq, unsigned long long now) +static inline void update_cpu_clock(task_t *p, runqueue_t *rq, + unsigned long long now) { - p->sched_time += now - max(p->timestamp, rq->timestamp_last_tick); + unsigned long long last = max(p->timestamp, rq->timestamp_last_tick); + p->sched_time += now - last; } /* * Return current->sched_time plus any more ns on the sched_clock * that have not yet been banked. */ -unsigned long long current_sched_time(const struct task_struct *p) +unsigned long long current_sched_time(const task_t *tsk) { unsigned long long ns; unsigned long flags; - local_irq_save(flags); - ns = max(p->timestamp, task_rq(p)->timestamp_last_tick); - ns = p->sched_time + sched_clock() - ns; + ns = max(tsk->timestamp, task_rq(tsk)->timestamp_last_tick); + ns = tsk->sched_time + (sched_clock() - ns); local_irq_restore(flags); - return ns; } @@ -3017,16 +2584,11 @@ unsigned long long current_sched_time(const struct task_struct *p) * increasing number of running tasks. We also ignore the interactivity * if a better static_prio task has expired: */ -static inline int expired_starving(struct rq *rq) -{ - if (rq->curr->static_prio > rq->best_expired_prio) - return 1; - if (!STARVATION_LIMIT || !rq->expired_timestamp) - return 0; - if (jiffies - rq->expired_timestamp > STARVATION_LIMIT * rq->nr_running) - return 1; - return 0; -} +#define EXPIRED_STARVING(rq) \ + ((STARVATION_LIMIT && ((rq)->expired_timestamp && \ + (jiffies - (rq)->expired_timestamp >= \ + STARVATION_LIMIT * ((rq)->nr_running) + 1))) || \ + ((rq)->curr->static_prio > (rq)->best_expired_prio)) /* * Account user cpu time to a process. @@ -3063,7 +2625,7 @@ void account_system_time(struct task_struct *p, int hardirq_offset, { struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; struct vx_info *vxi = p->vx_info; /* p is _always_ current */ - struct rq *rq = this_rq(); + runqueue_t *rq = this_rq(); cputime64_t tmp; p->stime = cputime_add(p->stime, cputime); @@ -3094,7 +2656,7 @@ void account_steal_time(struct task_struct *p, cputime_t steal) { struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; cputime64_t tmp = cputime_to_cputime64(steal); - struct rq *rq = this_rq(); + runqueue_t *rq = this_rq(); if (p == rq->idle) { p->stime = cputime_add(p->stime, steal); @@ -3115,10 +2677,10 @@ void account_steal_time(struct task_struct *p, cputime_t steal) */ void scheduler_tick(void) { - unsigned long long now = sched_clock(); - struct task_struct *p = current; int cpu = smp_processor_id(); - struct rq *rq = cpu_rq(cpu); + runqueue_t *rq = this_rq(); + task_t *p = current; + unsigned long long now = sched_clock(); update_cpu_clock(p, rq, now); @@ -3176,7 +2738,7 @@ void scheduler_tick(void) if (!rq->expired_timestamp) rq->expired_timestamp = jiffies; - if (!TASK_INTERACTIVE(p) || expired_starving(rq)) { + if (!TASK_INTERACTIVE(p) || EXPIRED_STARVING(rq)) { enqueue_task(p, rq->expired); if (p->static_prio < rq->best_expired_prio) rq->best_expired_prio = p->static_prio; @@ -3215,42 +2777,55 @@ out: } #ifdef CONFIG_SCHED_SMT -static inline void wakeup_busy_runqueue(struct rq *rq) +static inline void wakeup_busy_runqueue(runqueue_t *rq) { /* If an SMT runqueue is sleeping due to priority reasons wake it up */ if (rq->curr == rq->idle && rq->nr_running) resched_task(rq->idle); } -/* - * Called with interrupt disabled and this_rq's runqueue locked. - */ -static void wake_sleeping_dependent(int this_cpu) +static void wake_sleeping_dependent(int this_cpu, runqueue_t *this_rq) { struct sched_domain *tmp, *sd = NULL; + cpumask_t sibling_map; int i; - for_each_domain(this_cpu, tmp) { - if (tmp->flags & SD_SHARE_CPUPOWER) { + for_each_domain(this_cpu, tmp) + if (tmp->flags & SD_SHARE_CPUPOWER) sd = tmp; - break; - } - } if (!sd) return; - for_each_cpu_mask(i, sd->span) { - struct rq *smt_rq = cpu_rq(i); - - if (i == this_cpu) - continue; - if (unlikely(!spin_trylock(&smt_rq->lock))) - continue; + /* + * Unlock the current runqueue because we have to lock in + * CPU order to avoid deadlocks. Caller knows that we might + * unlock. We keep IRQs disabled. + */ + spin_unlock(&this_rq->lock); + + sibling_map = sd->span; + + for_each_cpu_mask(i, sibling_map) + spin_lock(&cpu_rq(i)->lock); + /* + * We clear this CPU from the mask. This both simplifies the + * inner loop and keps this_rq locked when we exit: + */ + cpu_clear(this_cpu, sibling_map); + + for_each_cpu_mask(i, sibling_map) { + runqueue_t *smt_rq = cpu_rq(i); wakeup_busy_runqueue(smt_rq); - spin_unlock(&smt_rq->lock); } + + for_each_cpu_mask(i, sibling_map) + spin_unlock(&cpu_rq(i)->lock); + /* + * We exit with this_cpu's rq still held and IRQs + * still disabled: + */ } /* @@ -3258,53 +2833,57 @@ static void wake_sleeping_dependent(int this_cpu) * utilize, if another task runs on a sibling. This models the * slowdown effect of other tasks running on siblings: */ -static inline unsigned long -smt_slice(struct task_struct *p, struct sched_domain *sd) +static inline unsigned long smt_slice(task_t *p, struct sched_domain *sd) { return p->time_slice * (100 - sd->per_cpu_gain) / 100; } -/* - * To minimise lock contention and not have to drop this_rq's runlock we only - * trylock the sibling runqueues and bypass those runqueues if we fail to - * acquire their lock. As we only trylock the normal locking order does not - * need to be obeyed. - */ -static int -dependent_sleeper(int this_cpu, struct rq *this_rq, struct task_struct *p) +static int dependent_sleeper(int this_cpu, runqueue_t *this_rq) { struct sched_domain *tmp, *sd = NULL; + cpumask_t sibling_map; + prio_array_t *array; int ret = 0, i; + task_t *p; - /* kernel/rt threads do not participate in dependent sleeping */ - if (!p->mm || rt_task(p)) - return 0; - - for_each_domain(this_cpu, tmp) { - if (tmp->flags & SD_SHARE_CPUPOWER) { + for_each_domain(this_cpu, tmp) + if (tmp->flags & SD_SHARE_CPUPOWER) sd = tmp; - break; - } - } if (!sd) return 0; - for_each_cpu_mask(i, sd->span) { - struct task_struct *smt_curr; - struct rq *smt_rq; + /* + * The same locking rules and details apply as for + * wake_sleeping_dependent(): + */ + spin_unlock(&this_rq->lock); + sibling_map = sd->span; + for_each_cpu_mask(i, sibling_map) + spin_lock(&cpu_rq(i)->lock); + cpu_clear(this_cpu, sibling_map); - if (i == this_cpu) - continue; + /* + * Establish next task to be run - it might have gone away because + * we released the runqueue lock above: + */ + if (!this_rq->nr_running) + goto out_unlock; + array = this_rq->active; + if (!array->nr_active) + array = this_rq->expired; + BUG_ON(!array->nr_active); - smt_rq = cpu_rq(i); - if (unlikely(!spin_trylock(&smt_rq->lock))) - continue; + p = list_entry(array->queue[sched_find_first_bit(array->bitmap)].next, + task_t, run_list); - smt_curr = smt_rq->curr; + for_each_cpu_mask(i, sibling_map) { + runqueue_t *smt_rq = cpu_rq(i); + task_t *smt_curr = smt_rq->curr; - if (!smt_curr->mm) - goto unlock; + /* Kernel threads do not participate in dependent sleeping */ + if (!p->mm || !smt_curr->mm || rt_task(p)) + goto check_smt_task; /* * If a user task with lower static priority than the @@ -3322,23 +2901,49 @@ dependent_sleeper(int this_cpu, struct rq *this_rq, struct task_struct *p) if ((jiffies % DEF_TIMESLICE) > (sd->per_cpu_gain * DEF_TIMESLICE / 100)) ret = 1; - } else { + } else if (smt_curr->static_prio < p->static_prio && !TASK_PREEMPTS_CURR(p, smt_rq) && smt_slice(smt_curr, sd) > task_timeslice(p)) ret = 1; + +check_smt_task: + if ((!smt_curr->mm && smt_curr != smt_rq->idle) || + rt_task(smt_curr)) + continue; + if (!p->mm) { + wakeup_busy_runqueue(smt_rq); + continue; + } + + /* + * Reschedule a lower priority task on the SMT sibling for + * it to be put to sleep, or wake it up if it has been put to + * sleep for priority reasons to see if it should run now. + */ + if (rt_task(p)) { + if ((jiffies % DEF_TIMESLICE) > + (sd->per_cpu_gain * DEF_TIMESLICE / 100)) + resched_task(smt_curr); + } else { + if (TASK_PREEMPTS_CURR(p, smt_rq) && + smt_slice(p, sd) > task_timeslice(smt_curr)) + resched_task(smt_curr); + else + wakeup_busy_runqueue(smt_rq); } -unlock: - spin_unlock(&smt_rq->lock); } +out_unlock: + for_each_cpu_mask(i, sibling_map) + spin_unlock(&cpu_rq(i)->lock); return ret; } #else -static inline void wake_sleeping_dependent(int this_cpu) +static inline void wake_sleeping_dependent(int this_cpu, runqueue_t *this_rq) { } -static inline int -dependent_sleeper(int this_cpu, struct rq *this_rq, struct task_struct *p) + +static inline int dependent_sleeper(int this_cpu, runqueue_t *this_rq) { return 0; } @@ -3351,13 +2956,12 @@ void fastcall add_preempt_count(int val) /* * Underflow? */ - if (DEBUG_LOCKS_WARN_ON((preempt_count() < 0))) - return; + BUG_ON((preempt_count() < 0)); preempt_count() += val; /* * Spinlock count overflowing soon? */ - DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >= PREEMPT_MASK-10); + BUG_ON((preempt_count() & PREEMPT_MASK) >= PREEMPT_MASK-10); } EXPORT_SYMBOL(add_preempt_count); @@ -3366,15 +2970,11 @@ void fastcall sub_preempt_count(int val) /* * Underflow? */ - if (DEBUG_LOCKS_WARN_ON(val > preempt_count())) - return; + BUG_ON(val > preempt_count()); /* * Is the spinlock portion underflowing? */ - if (DEBUG_LOCKS_WARN_ON((val < PREEMPT_MASK) && - !(preempt_count() & PREEMPT_MASK))) - return; - + BUG_ON((val < PREEMPT_MASK) && !(preempt_count() & PREEMPT_MASK)); preempt_count() -= val; } EXPORT_SYMBOL(sub_preempt_count); @@ -3392,14 +2992,14 @@ static inline int interactive_sleep(enum sleep_type sleep_type) */ asmlinkage void __sched schedule(void) { - struct task_struct *prev, *next; - struct prio_array *array; + long *switch_count; + task_t *prev, *next; + runqueue_t *rq; + prio_array_t *array; struct list_head *queue; unsigned long long now; unsigned long run_time; int cpu, idx, new_prio; - long *switch_count; - struct rq *rq; struct vx_info *vxi; #ifdef CONFIG_VSERVER_HARDCPU int maxidle = -HZ; @@ -3487,7 +3087,7 @@ drain_hold_queue: vxi = NULL; list_for_each_safe(l, n, &rq->hold_queue) { - next = list_entry(l, struct task_struct, run_list); + next = list_entry(l, task_t, run_list); if (vxi == next->vx_info) continue; @@ -3520,13 +3120,32 @@ pick_next: cpu = smp_processor_id(); if (unlikely(!rq->nr_running)) { +go_idle: idle_balance(cpu, rq); if (!rq->nr_running) { next = rq->idle; rq->expired_timestamp = 0; - wake_sleeping_dependent(cpu); + wake_sleeping_dependent(cpu, rq); + /* + * wake_sleeping_dependent() might have released + * the runqueue, so break out if we got new + * tasks meanwhile: + */ + if (!rq->nr_running) + goto switch_tasks; + } + } else { + if (dependent_sleeper(cpu, rq)) { + next = rq->idle; goto switch_tasks; } + /* + * dependent_sleeper() releases and reacquires the runqueue + * lock, hence go into the idle loop if the rq went + * empty meanwhile: + */ + if (unlikely(!rq->nr_running)) + goto go_idle; } array = rq->active; @@ -3544,7 +3163,7 @@ pick_next: idx = sched_find_first_bit(array->bitmap); queue = array->queue + idx; - next = list_entry(queue->next, struct task_struct, run_list); + next = list_entry(queue->next, task_t, run_list); vxi = next->vx_info; #ifdef CONFIG_VSERVER_HARDCPU @@ -3591,8 +3210,6 @@ pick_next: } } next->sleep_type = SLEEP_NORMAL; - if (dependent_sleeper(cpu, rq, next)) - next = rq->idle; switch_tasks: #if defined(CONFIG_VSERVER_HARDCPU) && defined(CONFIG_VSERVER_ACB_SCHED) if (next == rq->idle && !list_empty(&rq->hold_queue)) { @@ -3646,11 +3263,12 @@ switch_tasks: if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) goto need_resched; } + EXPORT_SYMBOL(schedule); #ifdef CONFIG_PREEMPT /* - * this is the entry point to schedule() from in-kernel preemption + * this is is the entry point to schedule() from in-kernel preemption * off of preempt_enable. Kernel preemptions off return from interrupt * occur there and call schedule directly. */ @@ -3690,10 +3308,11 @@ need_resched: if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) goto need_resched; } + EXPORT_SYMBOL(preempt_schedule); /* - * this is the entry point to schedule() from kernel preemption + * this is is the entry point to schedule() from kernel preemption * off of irq context. * Note, that this is called and return with irqs disabled. This will * protect us against recursive calling from irq. @@ -3705,7 +3324,7 @@ asmlinkage void __sched preempt_schedule_irq(void) struct task_struct *task = current; int saved_lock_depth; #endif - /* Catch callers which need to be fixed */ + /* Catch callers which need to be fixed*/ BUG_ON(ti->preempt_count || !irqs_disabled()); need_resched: @@ -3738,8 +3357,10 @@ need_resched: int default_wake_function(wait_queue_t *curr, unsigned mode, int sync, void *key) { - return try_to_wake_up(curr->private, mode, sync); + task_t *p = curr->private; + return try_to_wake_up(p, mode, sync); } + EXPORT_SYMBOL(default_wake_function); /* @@ -3757,11 +3378,13 @@ static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, struct list_head *tmp, *next; list_for_each_safe(tmp, next, &q->task_list) { - wait_queue_t *curr = list_entry(tmp, wait_queue_t, task_list); - unsigned flags = curr->flags; - + wait_queue_t *curr; + unsigned flags; + curr = list_entry(tmp, wait_queue_t, task_list); + flags = curr->flags; if (curr->func(curr, mode, sync, key) && - (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) + (flags & WQ_FLAG_EXCLUSIVE) && + !--nr_exclusive) break; } } @@ -3782,6 +3405,7 @@ void fastcall __wake_up(wait_queue_head_t *q, unsigned int mode, __wake_up_common(q, mode, nr_exclusive, 0, key); spin_unlock_irqrestore(&q->lock, flags); } + EXPORT_SYMBOL(__wake_up); /* @@ -3850,7 +3474,6 @@ EXPORT_SYMBOL(complete_all); void fastcall __sched wait_for_completion(struct completion *x) { might_sleep(); - spin_lock_irq(&x->wait.lock); if (!x->done) { DECLARE_WAITQUEUE(wait, current); @@ -4006,6 +3629,7 @@ void fastcall __sched interruptible_sleep_on(wait_queue_head_t *q) schedule(); SLEEP_ON_TAIL } + EXPORT_SYMBOL(interruptible_sleep_on); long fastcall __sched @@ -4023,6 +3647,7 @@ interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout) return timeout; } + EXPORT_SYMBOL(interruptible_sleep_on_timeout); long fastcall __sched sleep_on_timeout(wait_queue_head_t *q, long timeout) @@ -4042,65 +3667,12 @@ long fastcall __sched sleep_on_timeout(wait_queue_head_t *q, long timeout) EXPORT_SYMBOL(sleep_on_timeout); -#ifdef CONFIG_RT_MUTEXES - -/* - * rt_mutex_setprio - set the current priority of a task - * @p: task - * @prio: prio value (kernel-internal form) - * - * This function changes the 'effective' priority of a task. It does - * not touch ->normal_prio like __setscheduler(). - * - * Used by the rt_mutex code to implement priority inheritance logic. - */ -void rt_mutex_setprio(struct task_struct *p, int prio) +void set_user_nice(task_t *p, long nice) { - struct prio_array *array; unsigned long flags; - struct rq *rq; - int oldprio; - - BUG_ON(prio < 0 || prio > MAX_PRIO); - - rq = task_rq_lock(p, &flags); - - oldprio = p->prio; - array = p->array; - if (array) - dequeue_task(p, array); - p->prio = prio; - - if (array) { - /* - * If changing to an RT priority then queue it - * in the active array! - */ - if (rt_task(p)) - array = rq->active; - enqueue_task(p, array); - /* - * Reschedule if we are currently running on this runqueue and - * our priority decreased, or if we are not currently running on - * this runqueue and our priority is higher than the current's - */ - if (task_running(rq, p)) { - if (p->prio > oldprio) - resched_task(rq->curr); - } else if (TASK_PREEMPTS_CURR(p, rq)) - resched_task(rq->curr); - } - task_rq_unlock(rq, &flags); -} - -#endif - -void set_user_nice(struct task_struct *p, long nice) -{ - struct prio_array *array; - int old_prio, delta; - unsigned long flags; - struct rq *rq; + prio_array_t *array; + runqueue_t *rq; + int old_prio, new_prio, delta; if (TASK_NICE(p) == nice || nice < -20 || nice > 19) return; @@ -4115,25 +3687,22 @@ void set_user_nice(struct task_struct *p, long nice) * it wont have any effect on scheduling until the task is * not SCHED_NORMAL/SCHED_BATCH: */ - if (has_rt_policy(p)) { + if (rt_task(p)) { p->static_prio = NICE_TO_PRIO(nice); goto out_unlock; } array = p->array; - if (array) { + if (array) dequeue_task(p, array); - dec_raw_weighted_load(rq, p); - } - p->static_prio = NICE_TO_PRIO(nice); - set_load_weight(p); old_prio = p->prio; - p->prio = effective_prio(p); - delta = p->prio - old_prio; + new_prio = NICE_TO_PRIO(nice); + delta = new_prio - old_prio; + p->static_prio = NICE_TO_PRIO(nice); + p->prio += delta; if (array) { enqueue_task(p, array); - inc_raw_weighted_load(rq, p); /* * If the task increased its priority or is running and * lowered its priority, then reschedule its CPU: @@ -4144,6 +3713,7 @@ void set_user_nice(struct task_struct *p, long nice) out_unlock: task_rq_unlock(rq, &flags); } + EXPORT_SYMBOL(set_user_nice); /* @@ -4151,11 +3721,10 @@ EXPORT_SYMBOL(set_user_nice); * @p: task * @nice: nice value */ -int can_nice(const struct task_struct *p, const int nice) +int can_nice(const task_t *p, const int nice) { /* convert nice value [19,-20] to rlimit style value [1,40] */ int nice_rlim = 20 - nice; - return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur || capable(CAP_SYS_NICE)); } @@ -4171,7 +3740,8 @@ int can_nice(const struct task_struct *p, const int nice) */ asmlinkage long sys_nice(int increment) { - long nice, retval; + int retval; + long nice; /* * Setpriority might change our priority at the same moment. @@ -4210,7 +3780,7 @@ asmlinkage long sys_nice(int increment) * RT tasks are offset by -200. Normal tasks are centered * around 0, value goes from -16 to +15. */ -int task_prio(const struct task_struct *p) +int task_prio(const task_t *p) { return p->prio - MAX_RT_PRIO; } @@ -4219,7 +3789,7 @@ int task_prio(const struct task_struct *p) * task_nice - return the nice value of a given task. * @p: the task in question. */ -int task_nice(const struct task_struct *p) +int task_nice(const task_t *p) { return TASK_NICE(p); } @@ -4238,7 +3808,7 @@ int idle_cpu(int cpu) * idle_task - return the idle task for a given cpu. * @cpu: the processor in question. */ -struct task_struct *idle_task(int cpu) +task_t *idle_task(int cpu) { return cpu_rq(cpu)->idle; } @@ -4247,7 +3817,7 @@ struct task_struct *idle_task(int cpu) * find_process_by_pid - find a process with a matching PID value. * @pid: the pid in question. */ -static inline struct task_struct *find_process_by_pid(pid_t pid) +static inline task_t *find_process_by_pid(pid_t pid) { return pid ? find_task_by_pid(pid) : current; } @@ -4256,18 +3826,18 @@ static inline struct task_struct *find_process_by_pid(pid_t pid) static void __setscheduler(struct task_struct *p, int policy, int prio) { BUG_ON(p->array); - p->policy = policy; p->rt_priority = prio; - p->normal_prio = normal_prio(p); - /* we are holding p->pi_lock already */ - p->prio = rt_mutex_getprio(p); - /* - * SCHED_BATCH tasks are treated as perpetual CPU hogs: - */ - if (policy == SCHED_BATCH) - p->sleep_avg = 0; - set_load_weight(p); + if (policy != SCHED_NORMAL && policy != SCHED_BATCH) { + p->prio = MAX_RT_PRIO-1 - p->rt_priority; + } else { + p->prio = p->static_prio; + /* + * SCHED_BATCH tasks are treated as perpetual CPU hogs: + */ + if (policy == SCHED_BATCH) + p->sleep_avg = 0; + } } /** @@ -4280,13 +3850,12 @@ static void __setscheduler(struct task_struct *p, int policy, int prio) int sched_setscheduler(struct task_struct *p, int policy, struct sched_param *param) { - int retval, oldprio, oldpolicy = -1; - struct prio_array *array; + int retval; + int oldprio, oldpolicy = -1; + prio_array_t *array; unsigned long flags; - struct rq *rq; + runqueue_t *rq; - /* may grab non-irq protected spin_locks */ - BUG_ON(in_interrupt()); recheck: /* double check policy once rq lock held */ if (policy < 0) @@ -4334,21 +3903,15 @@ recheck: retval = security_task_setscheduler(p, policy, param); if (retval) return retval; - /* - * make sure no PI-waiters arrive (or leave) while we are - * changing the priority of the task: - */ - spin_lock_irqsave(&p->pi_lock, flags); /* * To be able to change p->policy safely, the apropriate * runqueue lock must be held. */ - rq = __task_rq_lock(p); + rq = task_rq_lock(p, &flags); /* recheck policy now with rq lock held */ if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) { policy = oldpolicy = -1; - __task_rq_unlock(rq); - spin_unlock_irqrestore(&p->pi_lock, flags); + task_rq_unlock(rq, &flags); goto recheck; } array = p->array; @@ -4370,11 +3933,7 @@ recheck: } else if (TASK_PREEMPTS_CURR(p, rq)) resched_task(rq->curr); } - __task_rq_unlock(rq); - spin_unlock_irqrestore(&p->pi_lock, flags); - - rt_mutex_adjust_pi(p); - + task_rq_unlock(rq, &flags); return 0; } EXPORT_SYMBOL_GPL(sched_setscheduler); @@ -4382,9 +3941,9 @@ EXPORT_SYMBOL_GPL(sched_setscheduler); static int do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) { + int retval; struct sched_param lparam; struct task_struct *p; - int retval; if (!param || pid < 0) return -EINVAL; @@ -4398,7 +3957,6 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) } retval = sched_setscheduler(p, policy, &lparam); read_unlock_irq(&tasklist_lock); - return retval; } @@ -4434,8 +3992,8 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) */ asmlinkage long sys_sched_getscheduler(pid_t pid) { - struct task_struct *p; int retval = -EINVAL; + task_t *p; if (pid < 0) goto out_nounlock; @@ -4462,8 +4020,8 @@ out_nounlock: asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param __user *param) { struct sched_param lp; - struct task_struct *p; int retval = -EINVAL; + task_t *p; if (!param || pid < 0) goto out_nounlock; @@ -4496,9 +4054,9 @@ out_unlock: long sched_setaffinity(pid_t pid, cpumask_t new_mask) { - cpumask_t cpus_allowed; - struct task_struct *p; + task_t *p; int retval; + cpumask_t cpus_allowed; lock_cpu_hotplug(); read_lock(&tasklist_lock); @@ -4523,10 +4081,6 @@ long sched_setaffinity(pid_t pid, cpumask_t new_mask) !capable(CAP_SYS_NICE)) goto out_unlock; - retval = security_task_setscheduler(p, 0, NULL); - if (retval) - goto out_unlock; - cpus_allowed = cpuset_cpus_allowed(p); cpus_and(new_mask, new_mask, cpus_allowed); retval = set_cpus_allowed(p, new_mask); @@ -4584,8 +4138,8 @@ cpumask_t cpu_possible_map __read_mostly = CPU_MASK_ALL; long sched_getaffinity(pid_t pid, cpumask_t *mask) { - struct task_struct *p; int retval; + task_t *p; lock_cpu_hotplug(); read_lock(&tasklist_lock); @@ -4595,10 +4149,7 @@ long sched_getaffinity(pid_t pid, cpumask_t *mask) if (!p) goto out_unlock; - retval = security_task_getscheduler(p); - if (retval) - goto out_unlock; - + retval = 0; cpus_and(*mask, p->cpus_allowed, cpu_online_map); out_unlock: @@ -4644,8 +4195,9 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, */ asmlinkage long sys_sched_yield(void) { - struct rq *rq = this_rq_lock(); - struct prio_array *array = current->array, *target = rq->expired; + runqueue_t *rq = this_rq_lock(); + prio_array_t *array = current->array; + prio_array_t *target = rq->expired; schedstat_inc(rq, yld_cnt); /* @@ -4679,7 +4231,6 @@ asmlinkage long sys_sched_yield(void) * no need to preempt or enable interrupts: */ __release(rq->lock); - spin_release(&rq->lock.dep_map, 1, _THIS_IP_); _raw_spin_unlock(&rq->lock); preempt_enable_no_resched(); @@ -4699,9 +4250,6 @@ static inline int __resched_legal(int expected_preempt_count) static void __cond_resched(void) { -#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP - __might_sleep(__FILE__, __LINE__); -#endif /* * The BKS might be reacquired before we have dropped * PREEMPT_ACTIVE, which could trigger a second @@ -4743,7 +4291,6 @@ int cond_resched_lock(spinlock_t *lock) spin_lock(lock); } if (need_resched() && __resched_legal(1)) { - spin_release(&lock->dep_map, 1, _THIS_IP_); _raw_spin_unlock(lock); preempt_enable_no_resched(); __cond_resched(); @@ -4759,9 +4306,7 @@ int __sched cond_resched_softirq(void) BUG_ON(!in_softirq()); if (need_resched() && __resched_legal(0)) { - raw_local_irq_disable(); - _local_bh_enable(); - raw_local_irq_enable(); + __local_bh_enable(); __cond_resched(); local_bh_disable(); return 1; @@ -4781,6 +4326,7 @@ void __sched yield(void) set_current_state(TASK_RUNNING); sys_sched_yield(); } + EXPORT_SYMBOL(yield); /* @@ -4792,26 +4338,23 @@ EXPORT_SYMBOL(yield); */ void __sched io_schedule(void) { - struct rq *rq = &__raw_get_cpu_var(runqueues); + struct runqueue *rq = &per_cpu(runqueues, raw_smp_processor_id()); - delayacct_blkio_start(); atomic_inc(&rq->nr_iowait); schedule(); atomic_dec(&rq->nr_iowait); - delayacct_blkio_end(); } + EXPORT_SYMBOL(io_schedule); long __sched io_schedule_timeout(long timeout) { - struct rq *rq = &__raw_get_cpu_var(runqueues); + struct runqueue *rq = &per_cpu(runqueues, raw_smp_processor_id()); long ret; - delayacct_blkio_start(); atomic_inc(&rq->nr_iowait); ret = schedule_timeout(timeout); atomic_dec(&rq->nr_iowait); - delayacct_blkio_end(); return ret; } @@ -4873,9 +4416,9 @@ asmlinkage long sys_sched_get_priority_min(int policy) asmlinkage long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval) { - struct task_struct *p; int retval = -EINVAL; struct timespec t; + task_t *p; if (pid < 0) goto out_nounlock; @@ -4890,7 +4433,7 @@ long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval) if (retval) goto out_unlock; - jiffies_to_timespec(p->policy == SCHED_FIFO ? + jiffies_to_timespec(p->policy & SCHED_FIFO ? 0 : task_timeslice(p), &t); read_unlock(&tasklist_lock); retval = copy_to_user(interval, &t, sizeof(t)) ? -EFAULT : 0; @@ -4903,36 +4446,35 @@ out_unlock: static inline struct task_struct *eldest_child(struct task_struct *p) { - if (list_empty(&p->children)) - return NULL; + if (list_empty(&p->children)) return NULL; return list_entry(p->children.next,struct task_struct,sibling); } static inline struct task_struct *older_sibling(struct task_struct *p) { - if (p->sibling.prev==&p->parent->children) - return NULL; + if (p->sibling.prev==&p->parent->children) return NULL; return list_entry(p->sibling.prev,struct task_struct,sibling); } static inline struct task_struct *younger_sibling(struct task_struct *p) { - if (p->sibling.next==&p->parent->children) - return NULL; + if (p->sibling.next==&p->parent->children) return NULL; return list_entry(p->sibling.next,struct task_struct,sibling); } -static const char stat_nam[] = "RSDTtZX"; - -static void show_task(struct task_struct *p) +static void show_task(task_t *p) { - struct task_struct *relative; - unsigned long free = 0; + task_t *relative; unsigned state; + unsigned long free = 0; + static const char *stat_nam[] = { "R", "S", "D", "T", "t", "Z", "X" }; + printk("%-13.13s ", p->comm); state = p->state ? __ffs(p->state) + 1 : 0; - printk("%-13.13s %c", p->comm, - state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?'); + if (state < ARRAY_SIZE(stat_nam)) + printk(stat_nam[state]); + else + printk("?"); #if (BITS_PER_LONG == 32) if (state == TASK_RUNNING) printk(" running "); @@ -4976,7 +4518,7 @@ static void show_task(struct task_struct *p) void show_state(void) { - struct task_struct *g, *p; + task_t *g, *p; #if (BITS_PER_LONG == 32) printk("\n" @@ -4998,7 +4540,7 @@ void show_state(void) } while_each_thread(g, p); read_unlock(&tasklist_lock); - debug_show_all_locks(); + mutex_debug_show_all_locks(); } /** @@ -5009,15 +4551,15 @@ void show_state(void) * NOTE: this function does not set the idle thread's NEED_RESCHED * flag, to make booting more robust. */ -void __devinit init_idle(struct task_struct *idle, int cpu) +void __devinit init_idle(task_t *idle, int cpu) { - struct rq *rq = cpu_rq(cpu); + runqueue_t *rq = cpu_rq(cpu); unsigned long flags; idle->timestamp = sched_clock(); idle->sleep_avg = 0; idle->array = NULL; - idle->prio = idle->normal_prio = MAX_PRIO; + idle->prio = MAX_PRIO; idle->state = TASK_RUNNING; idle->cpus_allowed = cpumask_of_cpu(cpu); set_task_cpu(idle, cpu); @@ -5050,7 +4592,7 @@ cpumask_t nohz_cpu_mask = CPU_MASK_NONE; /* * This is how migration works: * - * 1) we queue a struct migration_req structure in the source CPU's + * 1) we queue a migration_req_t structure in the source CPU's * runqueue and wake up that CPU's migration thread. * 2) we down() the locked semaphore => thread blocks. * 3) migration thread wakes up (implicitly it forces the migrated @@ -5072,12 +4614,12 @@ cpumask_t nohz_cpu_mask = CPU_MASK_NONE; * task must not exit() & deallocate itself prematurely. The * call is not atomic; no spinlocks may be held. */ -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) +int set_cpus_allowed(task_t *p, cpumask_t new_mask) { - struct migration_req req; unsigned long flags; - struct rq *rq; int ret = 0; + migration_req_t req; + runqueue_t *rq; rq = task_rq_lock(p, &flags); if (!cpus_intersects(new_mask, cpu_online_map)) { @@ -5100,9 +4642,9 @@ int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) } out: task_rq_unlock(rq, &flags); - return ret; } + EXPORT_SYMBOL_GPL(set_cpus_allowed); /* @@ -5113,16 +4655,13 @@ EXPORT_SYMBOL_GPL(set_cpus_allowed); * * So we race with normal scheduler movements, but that's OK, as long * as the task is no longer on this CPU. - * - * Returns non-zero if task was successfully migrated. */ -static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) +static void __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) { - struct rq *rq_dest, *rq_src; - int ret = 0; + runqueue_t *rq_dest, *rq_src; if (unlikely(cpu_is_offline(dest_cpu))) - return ret; + return; rq_src = cpu_rq(src_cpu); rq_dest = cpu_rq(dest_cpu); @@ -5146,15 +4685,13 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu) p->timestamp = p->timestamp - rq_src->timestamp_last_tick + rq_dest->timestamp_last_tick; deactivate_task(p, rq_src); - vx_activate_task(p); - __activate_task(p, rq_dest); + activate_task(p, rq_dest, 0); if (TASK_PREEMPTS_CURR(p, rq_dest)) resched_task(rq_dest->curr); } - ret = 1; + out: double_rq_unlock(rq_src, rq_dest); - return ret; } /* @@ -5164,16 +4701,16 @@ out: */ static int migration_thread(void *data) { + runqueue_t *rq; int cpu = (long)data; - struct rq *rq; rq = cpu_rq(cpu); BUG_ON(rq->migration_thread != current); set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { - struct migration_req *req; struct list_head *head; + migration_req_t *req; try_to_freeze(); @@ -5197,7 +4734,7 @@ static int migration_thread(void *data) set_current_state(TASK_INTERRUPTIBLE); continue; } - req = list_entry(head->next, struct migration_req, list); + req = list_entry(head->next, migration_req_t, list); list_del_init(head->next); spin_unlock(&rq->lock); @@ -5222,42 +4759,36 @@ wait_to_die: #ifdef CONFIG_HOTPLUG_CPU /* Figure out where task on dead CPU should go, use force if neccessary. */ -static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p) +static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *tsk) { - unsigned long flags; - cpumask_t mask; - struct rq *rq; int dest_cpu; + cpumask_t mask; -restart: /* On same node? */ mask = node_to_cpumask(cpu_to_node(dead_cpu)); - cpus_and(mask, mask, p->cpus_allowed); + cpus_and(mask, mask, tsk->cpus_allowed); dest_cpu = any_online_cpu(mask); /* On any allowed CPU? */ if (dest_cpu == NR_CPUS) - dest_cpu = any_online_cpu(p->cpus_allowed); + dest_cpu = any_online_cpu(tsk->cpus_allowed); /* No more Mr. Nice Guy. */ if (dest_cpu == NR_CPUS) { - rq = task_rq_lock(p, &flags); - cpus_setall(p->cpus_allowed); - dest_cpu = any_online_cpu(p->cpus_allowed); - task_rq_unlock(rq, &flags); + cpus_setall(tsk->cpus_allowed); + dest_cpu = any_online_cpu(tsk->cpus_allowed); /* * Don't tell them about moving exiting tasks or * kernel threads (both mm NULL), since they never * leave kernel. */ - if (p->mm && printk_ratelimit()) + if (tsk->mm && printk_ratelimit()) printk(KERN_INFO "process %d (%s) no " "longer affine to cpu%d\n", - p->pid, p->comm, dead_cpu); + tsk->pid, tsk->comm, dead_cpu); } - if (!__migrate_task(p, dead_cpu, dest_cpu)) - goto restart; + __migrate_task(tsk, dead_cpu, dest_cpu); } /* @@ -5267,9 +4798,9 @@ restart: * their home CPUs. So we just add the counter to another CPU's counter, * to keep the global sum constant after CPU-down: */ -static void migrate_nr_uninterruptible(struct rq *rq_src) +static void migrate_nr_uninterruptible(runqueue_t *rq_src) { - struct rq *rq_dest = cpu_rq(any_online_cpu(CPU_MASK_ALL)); + runqueue_t *rq_dest = cpu_rq(any_online_cpu(CPU_MASK_ALL)); unsigned long flags; local_irq_save(flags); @@ -5283,51 +4814,48 @@ static void migrate_nr_uninterruptible(struct rq *rq_src) /* Run through task list and migrate tasks from the dead cpu. */ static void migrate_live_tasks(int src_cpu) { - struct task_struct *p, *t; + struct task_struct *tsk, *t; write_lock_irq(&tasklist_lock); - do_each_thread(t, p) { - if (p == current) + do_each_thread(t, tsk) { + if (tsk == current) continue; - if (task_cpu(p) == src_cpu) - move_task_off_dead_cpu(src_cpu, p); - } while_each_thread(t, p); + if (task_cpu(tsk) == src_cpu) + move_task_off_dead_cpu(src_cpu, tsk); + } while_each_thread(t, tsk); write_unlock_irq(&tasklist_lock); } /* Schedules idle task to be the next runnable task on current CPU. * It does so by boosting its priority to highest possible and adding it to - * the _front_ of the runqueue. Used by CPU offline code. + * the _front_ of runqueue. Used by CPU offline code. */ void sched_idle_next(void) { - int this_cpu = smp_processor_id(); - struct rq *rq = cpu_rq(this_cpu); + int cpu = smp_processor_id(); + runqueue_t *rq = this_rq(); struct task_struct *p = rq->idle; unsigned long flags; /* cpu has to be offline */ - BUG_ON(cpu_online(this_cpu)); + BUG_ON(cpu_online(cpu)); - /* - * Strictly not necessary since rest of the CPUs are stopped by now - * and interrupts disabled on the current cpu. + /* Strictly not necessary since rest of the CPUs are stopped by now + * and interrupts disabled on current cpu. */ spin_lock_irqsave(&rq->lock, flags); __setscheduler(p, SCHED_FIFO, MAX_RT_PRIO-1); - - /* Add idle task to the _front_ of its priority queue: */ + /* Add idle task to _front_ of it's priority queue */ __activate_idle_task(p, rq); spin_unlock_irqrestore(&rq->lock, flags); } -/* - * Ensures that the idle task is using init_mm right before its cpu goes +/* Ensures that the idle task is using init_mm right before its cpu goes * offline. */ void idle_task_exit(void) @@ -5341,17 +4869,17 @@ void idle_task_exit(void) mmdrop(mm); } -static void migrate_dead(unsigned int dead_cpu, struct task_struct *p) +static void migrate_dead(unsigned int dead_cpu, task_t *tsk) { - struct rq *rq = cpu_rq(dead_cpu); + struct runqueue *rq = cpu_rq(dead_cpu); /* Must be exiting, otherwise would be on tasklist. */ - BUG_ON(p->exit_state != EXIT_ZOMBIE && p->exit_state != EXIT_DEAD); + BUG_ON(tsk->exit_state != EXIT_ZOMBIE && tsk->exit_state != EXIT_DEAD); /* Cannot have done final schedule yet: would have vanished. */ - BUG_ON(p->flags & PF_DEAD); + BUG_ON(tsk->flags & PF_DEAD); - get_task_struct(p); + get_task_struct(tsk); /* * Drop lock around migration; if someone else moves it, @@ -5359,25 +4887,25 @@ static void migrate_dead(unsigned int dead_cpu, struct task_struct *p) * fine. */ spin_unlock_irq(&rq->lock); - move_task_off_dead_cpu(dead_cpu, p); + move_task_off_dead_cpu(dead_cpu, tsk); spin_lock_irq(&rq->lock); - put_task_struct(p); + put_task_struct(tsk); } /* release_task() removes task from tasklist, so we won't find dead tasks. */ static void migrate_dead_tasks(unsigned int dead_cpu) { - struct rq *rq = cpu_rq(dead_cpu); - unsigned int arr, i; + unsigned arr, i; + struct runqueue *rq = cpu_rq(dead_cpu); for (arr = 0; arr < 2; arr++) { for (i = 0; i < MAX_PRIO; i++) { struct list_head *list = &rq->arrays[arr].queue[i]; - while (!list_empty(list)) - migrate_dead(dead_cpu, list_entry(list->next, - struct task_struct, run_list)); + migrate_dead(dead_cpu, + list_entry(list->next, task_t, + run_list)); } } } @@ -5387,13 +4915,13 @@ static void migrate_dead_tasks(unsigned int dead_cpu) * migration_call - callback that gets triggered when a CPU is added. * Here we can start up the necessary migration thread for the new CPU. */ -static int __cpuinit -migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) +static int migration_call(struct notifier_block *nfb, unsigned long action, + void *hcpu) { - struct task_struct *p; int cpu = (long)hcpu; + struct task_struct *p; + struct runqueue *rq; unsigned long flags; - struct rq *rq; switch (action) { case CPU_UP_PREPARE: @@ -5408,23 +4936,18 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) task_rq_unlock(rq, &flags); cpu_rq(cpu)->migration_thread = p; break; - case CPU_ONLINE: /* Strictly unneccessary, as first user will wake it. */ wake_up_process(cpu_rq(cpu)->migration_thread); break; - #ifdef CONFIG_HOTPLUG_CPU case CPU_UP_CANCELED: - if (!cpu_rq(cpu)->migration_thread) - break; /* Unbind it from offline cpu so it can run. Fall thru. */ kthread_bind(cpu_rq(cpu)->migration_thread, any_online_cpu(cpu_online_map)); kthread_stop(cpu_rq(cpu)->migration_thread); cpu_rq(cpu)->migration_thread = NULL; break; - case CPU_DEAD: migrate_live_tasks(cpu); rq = cpu_rq(cpu); @@ -5445,10 +4968,9 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) * the requestors. */ spin_lock_irq(&rq->lock); while (!list_empty(&rq->migration_queue)) { - struct migration_req *req; - + migration_req_t *req; req = list_entry(rq->migration_queue.next, - struct migration_req, list); + migration_req_t, list); list_del_init(&req->list); complete(&req->done); } @@ -5462,7 +4984,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) /* Register at highest priority so that task migration (migrate_all_tasks) * happens before everything else. */ -static struct notifier_block __cpuinitdata migration_notifier = { +static struct notifier_block migration_notifier = { .notifier_call = migration_call, .priority = 10 }; @@ -5470,12 +4992,10 @@ static struct notifier_block __cpuinitdata migration_notifier = { int __init migration_init(void) { void *cpu = (void *)(long)smp_processor_id(); - - /* Start one for the boot CPU: */ + /* Start one for boot CPU. */ migration_call(&migration_notifier, CPU_UP_PREPARE, cpu); migration_call(&migration_notifier, CPU_ONLINE, cpu); register_cpu_notifier(&migration_notifier); - return 0; } #endif @@ -5571,7 +5091,7 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu) } while (sd); } #else -# define sched_domain_debug(sd, cpu) do { } while (0) +#define sched_domain_debug(sd, cpu) {} #endif static int sd_degenerate(struct sched_domain *sd) @@ -5597,8 +5117,8 @@ static int sd_degenerate(struct sched_domain *sd) return 1; } -static int -sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) +static int sd_parent_degenerate(struct sched_domain *sd, + struct sched_domain *parent) { unsigned long cflags = sd->flags, pflags = parent->flags; @@ -5631,7 +5151,7 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) */ static void cpu_attach_domain(struct sched_domain *sd, int cpu) { - struct rq *rq = cpu_rq(cpu); + runqueue_t *rq = cpu_rq(cpu); struct sched_domain *tmp; /* Remove the sched domains which do not contribute to scheduling. */ @@ -5893,8 +5413,8 @@ static void touch_cache(void *__cache, unsigned long __size) /* * Measure the cache-cost of one task migration. Returns in units of nsec. */ -static unsigned long long -measure_one(void *cache, unsigned long size, int source, int target) +static unsigned long long measure_one(void *cache, unsigned long size, + int source, int target) { cpumask_t mask, saved_mask; unsigned long long t0, t1, t2, t3, cost; @@ -6046,7 +5566,7 @@ static unsigned long long measure_migration_cost(int cpu1, int cpu2) cache = vmalloc(max_size); if (!cache) { printk("could not vmalloc %d bytes for cache!\n", 2*max_size); - return 1000000; /* return 1 msec on very small boxen */ + return 1000000; // return 1 msec on very small boxen } while (size <= max_size) { @@ -6246,9 +5766,9 @@ static int find_next_best_node(int node, unsigned long *used_nodes) */ static cpumask_t sched_domain_node_span(int node) { - DECLARE_BITMAP(used_nodes, MAX_NUMNODES); - cpumask_t span, nodemask; int i; + cpumask_t span, nodemask; + DECLARE_BITMAP(used_nodes, MAX_NUMNODES); cpus_clear(span); bitmap_zero(used_nodes, MAX_NUMNODES); @@ -6259,7 +5779,6 @@ static cpumask_t sched_domain_node_span(int node) for (i = 1; i < SD_NODES_PER_DOMAIN; i++) { int next_node = find_next_best_node(node, used_nodes); - nodemask = node_to_cpumask(next_node); cpus_or(span, span, nodemask); } @@ -6268,27 +5787,22 @@ static cpumask_t sched_domain_node_span(int node) } #endif -int sched_smt_power_savings = 0, sched_mc_power_savings = 0; - /* - * SMT sched-domains: + * At the moment, CONFIG_SCHED_SMT is never defined, but leave it in so we + * can switch it on easily if needed. */ #ifdef CONFIG_SCHED_SMT static DEFINE_PER_CPU(struct sched_domain, cpu_domains); static struct sched_group sched_group_cpus[NR_CPUS]; - static int cpu_to_cpu_group(int cpu) { return cpu; } #endif -/* - * multi-core sched-domains: - */ #ifdef CONFIG_SCHED_MC static DEFINE_PER_CPU(struct sched_domain, core_domains); -static struct sched_group *sched_group_core_bycpu[NR_CPUS]; +static struct sched_group sched_group_core[NR_CPUS]; #endif #if defined(CONFIG_SCHED_MC) && defined(CONFIG_SCHED_SMT) @@ -6304,11 +5818,10 @@ static int cpu_to_core_group(int cpu) #endif static DEFINE_PER_CPU(struct sched_domain, phys_domains); -static struct sched_group *sched_group_phys_bycpu[NR_CPUS]; - +static struct sched_group sched_group_phys[NR_CPUS]; static int cpu_to_phys_group(int cpu) { -#ifdef CONFIG_SCHED_MC +#if defined(CONFIG_SCHED_MC) cpumask_t mask = cpu_coregroup_map(cpu); return first_cpu(mask); #elif defined(CONFIG_SCHED_SMT) @@ -6362,74 +5875,13 @@ next_sg: } #endif -/* Free memory allocated for various sched_group structures */ -static void free_sched_groups(const cpumask_t *cpu_map) -{ - int cpu; -#ifdef CONFIG_NUMA - int i; - - for_each_cpu_mask(cpu, *cpu_map) { - struct sched_group *sched_group_allnodes - = sched_group_allnodes_bycpu[cpu]; - struct sched_group **sched_group_nodes - = sched_group_nodes_bycpu[cpu]; - - if (sched_group_allnodes) { - kfree(sched_group_allnodes); - sched_group_allnodes_bycpu[cpu] = NULL; - } - - if (!sched_group_nodes) - continue; - - for (i = 0; i < MAX_NUMNODES; i++) { - cpumask_t nodemask = node_to_cpumask(i); - struct sched_group *oldsg, *sg = sched_group_nodes[i]; - - cpus_and(nodemask, nodemask, *cpu_map); - if (cpus_empty(nodemask)) - continue; - - if (sg == NULL) - continue; - sg = sg->next; -next_sg: - oldsg = sg; - sg = sg->next; - kfree(oldsg); - if (oldsg != sched_group_nodes[i]) - goto next_sg; - } - kfree(sched_group_nodes); - sched_group_nodes_bycpu[cpu] = NULL; - } -#endif - for_each_cpu_mask(cpu, *cpu_map) { - if (sched_group_phys_bycpu[cpu]) { - kfree(sched_group_phys_bycpu[cpu]); - sched_group_phys_bycpu[cpu] = NULL; - } -#ifdef CONFIG_SCHED_MC - if (sched_group_core_bycpu[cpu]) { - kfree(sched_group_core_bycpu[cpu]); - sched_group_core_bycpu[cpu] = NULL; - } -#endif - } -} - /* * Build sched domains for a given set of cpus and attach the sched domains * to the individual cpus */ -static int build_sched_domains(const cpumask_t *cpu_map) +void build_sched_domains(const cpumask_t *cpu_map) { int i; - struct sched_group *sched_group_phys = NULL; -#ifdef CONFIG_SCHED_MC - struct sched_group *sched_group_core = NULL; -#endif #ifdef CONFIG_NUMA struct sched_group **sched_group_nodes = NULL; struct sched_group *sched_group_allnodes = NULL; @@ -6437,11 +5889,11 @@ static int build_sched_domains(const cpumask_t *cpu_map) /* * Allocate the per-node list of sched groups */ - sched_group_nodes = kzalloc(sizeof(struct sched_group*)*MAX_NUMNODES, - GFP_KERNEL); + sched_group_nodes = kmalloc(sizeof(struct sched_group*)*MAX_NUMNODES, + GFP_ATOMIC); if (!sched_group_nodes) { printk(KERN_WARNING "Can not alloc sched group node list\n"); - return -ENOMEM; + return; } sched_group_nodes_bycpu[first_cpu(*cpu_map)] = sched_group_nodes; #endif @@ -6467,7 +5919,7 @@ static int build_sched_domains(const cpumask_t *cpu_map) if (!sched_group_allnodes) { printk(KERN_WARNING "Can not alloc allnodes sched group\n"); - goto error; + break; } sched_group_allnodes_bycpu[i] = sched_group_allnodes; @@ -6488,18 +5940,6 @@ static int build_sched_domains(const cpumask_t *cpu_map) cpus_and(sd->span, sd->span, *cpu_map); #endif - if (!sched_group_phys) { - sched_group_phys - = kmalloc(sizeof(struct sched_group) * NR_CPUS, - GFP_KERNEL); - if (!sched_group_phys) { - printk (KERN_WARNING "Can not alloc phys sched" - "group\n"); - goto error; - } - sched_group_phys_bycpu[i] = sched_group_phys; - } - p = sd; sd = &per_cpu(phys_domains, i); group = cpu_to_phys_group(i); @@ -6509,18 +5949,6 @@ static int build_sched_domains(const cpumask_t *cpu_map) sd->groups = &sched_group_phys[group]; #ifdef CONFIG_SCHED_MC - if (!sched_group_core) { - sched_group_core - = kmalloc(sizeof(struct sched_group) * NR_CPUS, - GFP_KERNEL); - if (!sched_group_core) { - printk (KERN_WARNING "Can not alloc core sched" - "group\n"); - goto error; - } - sched_group_core_bycpu[i] = sched_group_core; - } - p = sd; sd = &per_cpu(core_domains, i); group = cpu_to_core_group(i); @@ -6604,21 +6032,24 @@ static int build_sched_domains(const cpumask_t *cpu_map) domainspan = sched_domain_node_span(i); cpus_and(domainspan, domainspan, *cpu_map); - sg = kmalloc_node(sizeof(struct sched_group), GFP_KERNEL, i); - if (!sg) { - printk(KERN_WARNING "Can not alloc domain group for " - "node %d\n", i); - goto error; - } + sg = kmalloc(sizeof(struct sched_group), GFP_KERNEL); sched_group_nodes[i] = sg; for_each_cpu_mask(j, nodemask) { struct sched_domain *sd; sd = &per_cpu(node_domains, j); sd->groups = sg; + if (sd->groups == NULL) { + /* Turn off balancing if we have no groups */ + sd->flags = 0; + } + } + if (!sg) { + printk(KERN_WARNING + "Can not alloc domain group for node %d\n", i); + continue; } sg->cpu_power = 0; sg->cpumask = nodemask; - sg->next = sg; cpus_or(covered, covered, nodemask); prev = sg; @@ -6637,90 +6068,54 @@ static int build_sched_domains(const cpumask_t *cpu_map) if (cpus_empty(tmp)) continue; - sg = kmalloc_node(sizeof(struct sched_group), - GFP_KERNEL, i); + sg = kmalloc(sizeof(struct sched_group), GFP_KERNEL); if (!sg) { printk(KERN_WARNING "Can not alloc domain group for node %d\n", j); - goto error; + break; } sg->cpu_power = 0; sg->cpumask = tmp; - sg->next = prev->next; cpus_or(covered, covered, tmp); prev->next = sg; prev = sg; } + prev->next = sched_group_nodes[i]; } #endif /* Calculate CPU power for physical packages and nodes */ -#ifdef CONFIG_SCHED_SMT for_each_cpu_mask(i, *cpu_map) { + int power; struct sched_domain *sd; +#ifdef CONFIG_SCHED_SMT sd = &per_cpu(cpu_domains, i); - sd->groups->cpu_power = SCHED_LOAD_SCALE; - } + power = SCHED_LOAD_SCALE; + sd->groups->cpu_power = power; #endif #ifdef CONFIG_SCHED_MC - for_each_cpu_mask(i, *cpu_map) { - int power; - struct sched_domain *sd; sd = &per_cpu(core_domains, i); - if (sched_smt_power_savings) - power = SCHED_LOAD_SCALE * cpus_weight(sd->groups->cpumask); - else - power = SCHED_LOAD_SCALE + (cpus_weight(sd->groups->cpumask)-1) + power = SCHED_LOAD_SCALE + (cpus_weight(sd->groups->cpumask)-1) * SCHED_LOAD_SCALE / 10; sd->groups->cpu_power = power; - } -#endif - for_each_cpu_mask(i, *cpu_map) { - struct sched_domain *sd; -#ifdef CONFIG_SCHED_MC sd = &per_cpu(phys_domains, i); - if (i != first_cpu(sd->groups->cpumask)) - continue; - sd->groups->cpu_power = 0; - if (sched_mc_power_savings || sched_smt_power_savings) { - int j; - - for_each_cpu_mask(j, sd->groups->cpumask) { - struct sched_domain *sd1; - sd1 = &per_cpu(core_domains, j); - /* - * for each core we will add once - * to the group in physical domain - */ - if (j != first_cpu(sd1->groups->cpumask)) - continue; - - if (sched_smt_power_savings) - sd->groups->cpu_power += sd1->groups->cpu_power; - else - sd->groups->cpu_power += SCHED_LOAD_SCALE; - } - } else - /* - * This has to be < 2 * SCHED_LOAD_SCALE - * Lets keep it SCHED_LOAD_SCALE, so that - * while calculating NUMA group's cpu_power - * we can simply do - * numa_group->cpu_power += phys_group->cpu_power; - * - * See "only add power once for each physical pkg" - * comment below - */ - sd->groups->cpu_power = SCHED_LOAD_SCALE; + /* + * This has to be < 2 * SCHED_LOAD_SCALE + * Lets keep it SCHED_LOAD_SCALE, so that + * while calculating NUMA group's cpu_power + * we can simply do + * numa_group->cpu_power += phys_group->cpu_power; + * + * See "only add power once for each physical pkg" + * comment below + */ + sd->groups->cpu_power = SCHED_LOAD_SCALE; #else - int power; sd = &per_cpu(phys_domains, i); - if (sched_smt_power_savings) - power = SCHED_LOAD_SCALE * cpus_weight(sd->groups->cpumask); - else - power = SCHED_LOAD_SCALE; + power = SCHED_LOAD_SCALE + SCHED_LOAD_SCALE * + (cpus_weight(sd->groups->cpumask)-1) / 10; sd->groups->cpu_power = power; #endif } @@ -6729,12 +6124,7 @@ static int build_sched_domains(const cpumask_t *cpu_map) for (i = 0; i < MAX_NUMNODES; i++) init_numa_sched_groups_power(sched_group_nodes[i]); - if (sched_group_allnodes) { - int group = cpu_to_allnodes_group(first_cpu(*cpu_map)); - struct sched_group *sg = &sched_group_allnodes[group]; - - init_numa_sched_groups_power(sg); - } + init_numa_sched_groups_power(sched_group_allnodes); #endif /* Attach the domains */ @@ -6753,20 +6143,13 @@ static int build_sched_domains(const cpumask_t *cpu_map) * Tune cache-hot values: */ calibrate_migration_costs(cpu_map); - - return 0; - -error: - free_sched_groups(cpu_map); - return -ENOMEM; } /* * Set up scheduler domains and groups. Callers must hold the hotplug lock. */ -static int arch_init_sched_domains(const cpumask_t *cpu_map) +static void arch_init_sched_domains(const cpumask_t *cpu_map) { cpumask_t cpu_default_map; - int err; /* * Setup mask for cpus without special case scheduling requirements. @@ -6775,14 +6158,51 @@ static int arch_init_sched_domains(const cpumask_t *cpu_map) */ cpus_andnot(cpu_default_map, *cpu_map, cpu_isolated_map); - err = build_sched_domains(&cpu_default_map); - - return err; + build_sched_domains(&cpu_default_map); } static void arch_destroy_sched_domains(const cpumask_t *cpu_map) { - free_sched_groups(cpu_map); +#ifdef CONFIG_NUMA + int i; + int cpu; + + for_each_cpu_mask(cpu, *cpu_map) { + struct sched_group *sched_group_allnodes + = sched_group_allnodes_bycpu[cpu]; + struct sched_group **sched_group_nodes + = sched_group_nodes_bycpu[cpu]; + + if (sched_group_allnodes) { + kfree(sched_group_allnodes); + sched_group_allnodes_bycpu[cpu] = NULL; + } + + if (!sched_group_nodes) + continue; + + for (i = 0; i < MAX_NUMNODES; i++) { + cpumask_t nodemask = node_to_cpumask(i); + struct sched_group *oldsg, *sg = sched_group_nodes[i]; + + cpus_and(nodemask, nodemask, *cpu_map); + if (cpus_empty(nodemask)) + continue; + + if (sg == NULL) + continue; + sg = sg->next; +next_sg: + oldsg = sg; + sg = sg->next; + kfree(oldsg); + if (oldsg != sched_group_nodes[i]) + goto next_sg; + } + kfree(sched_group_nodes); + sched_group_nodes_bycpu[cpu] = NULL; + } +#endif } /* @@ -6807,10 +6227,9 @@ static void detach_destroy_domains(const cpumask_t *cpu_map) * correct sched domains * Call with hotplug lock held */ -int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2) +void partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2) { cpumask_t change_map; - int err = 0; cpus_and(*partition1, *partition1, cpu_online_map); cpus_and(*partition2, *partition2, cpu_online_map); @@ -6819,89 +6238,10 @@ int partition_sched_domains(cpumask_t *partition1, cpumask_t *partition2) /* Detach sched domains from all of the affected cpus */ detach_destroy_domains(&change_map); if (!cpus_empty(*partition1)) - err = build_sched_domains(partition1); - if (!err && !cpus_empty(*partition2)) - err = build_sched_domains(partition2); - - return err; -} - -#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) -int arch_reinit_sched_domains(void) -{ - int err; - - lock_cpu_hotplug(); - detach_destroy_domains(&cpu_online_map); - err = arch_init_sched_domains(&cpu_online_map); - unlock_cpu_hotplug(); - - return err; -} - -static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) -{ - int ret; - - if (buf[0] != '0' && buf[0] != '1') - return -EINVAL; - - if (smt) - sched_smt_power_savings = (buf[0] == '1'); - else - sched_mc_power_savings = (buf[0] == '1'); - - ret = arch_reinit_sched_domains(); - - return ret ? ret : count; -} - -int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) -{ - int err = 0; - -#ifdef CONFIG_SCHED_SMT - if (smt_capable()) - err = sysfs_create_file(&cls->kset.kobj, - &attr_sched_smt_power_savings.attr); -#endif -#ifdef CONFIG_SCHED_MC - if (!err && mc_capable()) - err = sysfs_create_file(&cls->kset.kobj, - &attr_sched_mc_power_savings.attr); -#endif - return err; + build_sched_domains(partition1); + if (!cpus_empty(*partition2)) + build_sched_domains(partition2); } -#endif - -#ifdef CONFIG_SCHED_MC -static ssize_t sched_mc_power_savings_show(struct sys_device *dev, char *page) -{ - return sprintf(page, "%u\n", sched_mc_power_savings); -} -static ssize_t sched_mc_power_savings_store(struct sys_device *dev, - const char *buf, size_t count) -{ - return sched_power_savings_store(buf, count, 0); -} -SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, - sched_mc_power_savings_store); -#endif - -#ifdef CONFIG_SCHED_SMT -static ssize_t sched_smt_power_savings_show(struct sys_device *dev, char *page) -{ - return sprintf(page, "%u\n", sched_smt_power_savings); -} -static ssize_t sched_smt_power_savings_store(struct sys_device *dev, - const char *buf, size_t count) -{ - return sched_power_savings_store(buf, count, 1); -} -SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, - sched_smt_power_savings_store); -#endif - #ifdef CONFIG_HOTPLUG_CPU /* @@ -6956,7 +6296,6 @@ int in_sched_functions(unsigned long addr) { /* Linker adds these: start and end of __sched functions */ extern char __sched_text_start[], __sched_text_end[]; - return in_lock_functions(addr) || (addr >= (unsigned long)__sched_text_start && addr < (unsigned long)__sched_text_end); @@ -6964,15 +6303,14 @@ int in_sched_functions(unsigned long addr) void __init sched_init(void) { + runqueue_t *rq; int i, j, k; for_each_possible_cpu(i) { - struct prio_array *array; - struct rq *rq; + prio_array_t *array; rq = cpu_rq(i); spin_lock_init(&rq->lock); - lockdep_set_class(&rq->lock, &rq->rq_lock_key); rq->nr_running = 0; rq->active = rq->arrays; rq->expired = rq->arrays + 1; @@ -6984,9 +6322,9 @@ void __init sched_init(void) rq->cpu_load[j] = 0; rq->active_balance = 0; rq->push_cpu = 0; - rq->cpu = i; rq->migration_thread = NULL; INIT_LIST_HEAD(&rq->migration_queue); + rq->cpu = i; #endif atomic_set(&rq->nr_iowait, 0); #ifdef CONFIG_VSERVER_HARDCPU @@ -7004,12 +6342,6 @@ void __init sched_init(void) } } - set_load_weight(&init_task); - -#ifdef CONFIG_RT_MUTEXES - plist_head_init(&init_task.pi_waiters, &init_task.pi_lock); -#endif - /* * The boot idle thread does lazy MMU switching as well: */ @@ -7028,7 +6360,7 @@ void __init sched_init(void) #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line) { -#ifdef in_atomic +#if defined(in_atomic) static unsigned long prev_jiffy; /* ratelimiting */ if ((in_atomic() || irqs_disabled()) && @@ -7050,18 +6382,17 @@ EXPORT_SYMBOL(__might_sleep); #ifdef CONFIG_MAGIC_SYSRQ void normalize_rt_tasks(void) { - struct prio_array *array; struct task_struct *p; + prio_array_t *array; unsigned long flags; - struct rq *rq; + runqueue_t *rq; read_lock_irq(&tasklist_lock); - for_each_process(p) { + for_each_process (p) { if (!rt_task(p)) continue; - spin_lock_irqsave(&p->pi_lock, flags); - rq = __task_rq_lock(p); + rq = task_rq_lock(p, &flags); array = p->array; if (array) @@ -7073,8 +6404,7 @@ void normalize_rt_tasks(void) resched_task(rq->curr); } - __task_rq_unlock(rq); - spin_unlock_irqrestore(&p->pi_lock, flags); + task_rq_unlock(rq, &flags); } read_unlock_irq(&tasklist_lock); } @@ -7098,7 +6428,7 @@ void normalize_rt_tasks(void) * * ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED! */ -struct task_struct *curr_task(int cpu) +task_t *curr_task(int cpu) { return cpu_curr(cpu); } @@ -7118,7 +6448,7 @@ struct task_struct *curr_task(int cpu) * * ONLY VALID WHEN THE WHOLE SYSTEM IS STOPPED! */ -void set_curr_task(int cpu, struct task_struct *p) +void set_curr_task(int cpu, task_t *p) { cpu_curr(cpu) = p; } diff --git a/kernel/signal.c b/kernel/signal.c index 65c17372d..2d4bae2f8 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -10,6 +10,7 @@ * to allow signals to be sent reliably. */ +#include #include #include #include @@ -22,13 +23,13 @@ #include #include #include +#include #include +#include #include #include #include #include -#include "audit.h" /* audit_signal_info() */ -#include /* * SLAB caches for signal bits. @@ -594,7 +595,7 @@ static int check_kill_permission(int sig, struct siginfo *info, if (user && !vx_check(vx_task_xid(t), VX_ADMIN|VX_IDENT)) return error; - error = security_task_kill(t, info, sig, 0); + error = security_task_kill(t, info, sig); if (!error) audit_signal_info(sig, t); /* Let audit system see the signal */ return error; @@ -833,31 +834,22 @@ out: /* * Force a signal that the process can't ignore: if necessary * we unblock the signal and change any SIG_IGN to SIG_DFL. - * - * Note: If we unblock the signal, we always reset it to SIG_DFL, - * since we do not want to have a signal handler that was blocked - * be invoked when user space had explicitly blocked it. - * - * We don't want to have recursive SIGSEGV's etc, for example. */ + int force_sig_info(int sig, struct siginfo *info, struct task_struct *t) { unsigned long int flags; - int ret, blocked, ignored; - struct k_sigaction *action; + int ret; spin_lock_irqsave(&t->sighand->siglock, flags); - action = &t->sighand->action[sig-1]; - ignored = action->sa.sa_handler == SIG_IGN; - blocked = sigismember(&t->blocked, sig); - if (blocked || ignored) { - action->sa.sa_handler = SIG_DFL; - if (blocked) { - sigdelset(&t->blocked, sig); - recalc_sigpending_tsk(t); - } + if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) { + t->sighand->action[sig-1].sa.sa_handler = SIG_DFL; + } + if (sigismember(&t->blocked, sig)) { + sigdelset(&t->blocked, sig); } + recalc_sigpending_tsk(t); ret = specific_send_sig_info(sig, info, t); spin_unlock_irqrestore(&t->sighand->siglock, flags); @@ -1147,7 +1139,7 @@ kill_proc_info(int sig, struct siginfo *info, pid_t pid) } p = find_task_by_pid(pid); error = -ESRCH; - if (p && vx_check(vx_task_xid(p), VX_IDENT)) + if (p) error = group_send_sig_info(sig, info, p); if (unlikely(acquired_tasklist_lock)) read_unlock(&tasklist_lock); @@ -1157,7 +1149,7 @@ kill_proc_info(int sig, struct siginfo *info, pid_t pid) /* like kill_proc_info(), but doesn't use uid/euid of "current" */ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, - uid_t uid, uid_t euid, u32 secid) + uid_t uid, uid_t euid) { int ret = -EINVAL; struct task_struct *p; @@ -1177,9 +1169,6 @@ int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, ret = -EPERM; goto out_unlock; } - ret = security_task_kill(p, info, sig, secid); - if (ret) - goto out_unlock; if (sig && p->sighand) { unsigned long flags; spin_lock_irqsave(&p->sighand->siglock, flags); @@ -1209,8 +1198,7 @@ static int kill_something_info(int sig, struct siginfo *info, int pid) read_lock(&tasklist_lock); for_each_process(p) { - if (vx_check(vx_task_xid(p), VX_ADMIN|VX_IDENT) && - p->pid > 1 && p->tgid != current->tgid) { + if (p->pid > 1 && p->tgid != current->tgid) { int err = group_send_sig_info(sig, info, p); ++count; if (err != -EPERM) @@ -1585,35 +1573,6 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why) spin_unlock_irqrestore(&sighand->siglock, flags); } -static inline int may_ptrace_stop(void) -{ - if (!likely(current->ptrace & PT_PTRACED)) - return 0; - - if (unlikely(current->parent == current->real_parent && - (current->ptrace & PT_ATTACHED))) - return 0; - - if (unlikely(current->signal == current->parent->signal) && - unlikely(current->signal->flags & SIGNAL_GROUP_EXIT)) - return 0; - - /* - * Are we in the middle of do_coredump? - * If so and our tracer is also part of the coredump stopping - * is a deadlock situation, and pointless because our tracer - * is dead so don't allow us to stop. - * If SIGKILL was already sent before the caller unlocked - * ->siglock we must see ->core_waiters != 0. Otherwise it - * is safe to enter schedule(). - */ - if (unlikely(current->mm->core_waiters) && - unlikely(current->mm == current->parent->mm)) - return 0; - - return 1; -} - /* * This must be called with current->sighand->siglock held. * @@ -1642,7 +1601,11 @@ static void ptrace_stop(int exit_code, int nostop_code, siginfo_t *info) spin_unlock_irq(¤t->sighand->siglock); try_to_freeze(); read_lock(&tasklist_lock); - if (may_ptrace_stop()) { + if (likely(current->ptrace & PT_PTRACED) && + likely(current->parent != current->real_parent || + !(current->ptrace & PT_ATTACHED)) && + (likely(current->parent->signal != current->signal) || + !unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))) { do_notify_parent_cldstop(current, CLD_TRAPPED); read_unlock(&tasklist_lock); schedule(); @@ -1827,6 +1790,11 @@ relock: if (!signr) break; /* will return 0 */ + if ((signr == SIGSEGV) && print_fatal_signals) { + spin_unlock_irq(¤t->sighand->siglock); + print_fatal_signal(regs, signr); + spin_lock_irq(¤t->sighand->siglock); + } if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { ptrace_signal_deliver(regs, cookie); diff --git a/kernel/softirq.c b/kernel/softirq.c index aee8b98a4..336f92d64 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -61,137 +61,6 @@ static inline void wakeup_softirqd(void) wake_up_process(tsk); } -/* - * This one is for softirq.c-internal use, - * where hardirqs are disabled legitimately: - */ -#ifdef CONFIG_TRACE_IRQFLAGS -static void __local_bh_disable(unsigned long ip) -{ - unsigned long flags; - - WARN_ON_ONCE(in_irq()); - - raw_local_irq_save(flags); - add_preempt_count(SOFTIRQ_OFFSET); - /* - * Were softirqs turned off above: - */ - if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_off(ip); - raw_local_irq_restore(flags); -} -#else /* !CONFIG_TRACE_IRQFLAGS */ -static inline void __local_bh_disable(unsigned long ip) -{ - add_preempt_count(SOFTIRQ_OFFSET); - barrier(); -} -#endif /* CONFIG_TRACE_IRQFLAGS */ - -void local_bh_disable(void) -{ - __local_bh_disable((unsigned long)__builtin_return_address(0)); -} - -EXPORT_SYMBOL(local_bh_disable); - -void __local_bh_enable(void) -{ - WARN_ON_ONCE(in_irq()); - - /* - * softirqs should never be enabled by __local_bh_enable(), - * it always nests inside local_bh_enable() sections: - */ - WARN_ON_ONCE(softirq_count() == SOFTIRQ_OFFSET); - - sub_preempt_count(SOFTIRQ_OFFSET); -} -EXPORT_SYMBOL_GPL(__local_bh_enable); - -/* - * Special-case - softirqs can safely be enabled in - * cond_resched_softirq(), or by __do_softirq(), - * without processing still-pending softirqs: - */ -void _local_bh_enable(void) -{ - WARN_ON_ONCE(in_irq()); - WARN_ON_ONCE(!irqs_disabled()); - - if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_on((unsigned long)__builtin_return_address(0)); - sub_preempt_count(SOFTIRQ_OFFSET); -} - -EXPORT_SYMBOL(_local_bh_enable); - -void local_bh_enable(void) -{ -#ifdef CONFIG_TRACE_IRQFLAGS - unsigned long flags; - - WARN_ON_ONCE(in_irq()); -#endif - WARN_ON_ONCE(irqs_disabled()); - -#ifdef CONFIG_TRACE_IRQFLAGS - local_irq_save(flags); -#endif - /* - * Are softirqs going to be turned on now: - */ - if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_on((unsigned long)__builtin_return_address(0)); - /* - * Keep preemption disabled until we are done with - * softirq processing: - */ - sub_preempt_count(SOFTIRQ_OFFSET - 1); - - if (unlikely(!in_interrupt() && local_softirq_pending())) - do_softirq(); - - dec_preempt_count(); -#ifdef CONFIG_TRACE_IRQFLAGS - local_irq_restore(flags); -#endif - preempt_check_resched(); -} -EXPORT_SYMBOL(local_bh_enable); - -void local_bh_enable_ip(unsigned long ip) -{ -#ifdef CONFIG_TRACE_IRQFLAGS - unsigned long flags; - - WARN_ON_ONCE(in_irq()); - - local_irq_save(flags); -#endif - /* - * Are softirqs going to be turned on now: - */ - if (softirq_count() == SOFTIRQ_OFFSET) - trace_softirqs_on(ip); - /* - * Keep preemption disabled until we are done with - * softirq processing: - */ - sub_preempt_count(SOFTIRQ_OFFSET - 1); - - if (unlikely(!in_interrupt() && local_softirq_pending())) - do_softirq(); - - dec_preempt_count(); -#ifdef CONFIG_TRACE_IRQFLAGS - local_irq_restore(flags); -#endif - preempt_check_resched(); -} -EXPORT_SYMBOL(local_bh_enable_ip); - /* * We restart softirq processing MAX_SOFTIRQ_RESTART times, * and we fall back to softirqd after that. @@ -211,11 +80,8 @@ asmlinkage void __do_softirq(void) int cpu; pending = local_softirq_pending(); - account_system_vtime(current); - - __local_bh_disable((unsigned long)__builtin_return_address(0)); - trace_softirq_enter(); + local_bh_disable(); cpu = smp_processor_id(); restart: /* Reset the pending bitmask before enabling irqs */ @@ -243,10 +109,7 @@ restart: if (pending) wakeup_softirqd(); - trace_softirq_exit(); - - account_system_vtime(current); - _local_bh_enable(); + __local_bh_enable(); } #ifndef __ARCH_HAS_DO_SOFTIRQ @@ -273,6 +136,23 @@ EXPORT_SYMBOL(do_softirq); #endif +void local_bh_enable(void) +{ + WARN_ON(irqs_disabled()); + /* + * Keep preemption disabled until we are done with + * softirq processing: + */ + sub_preempt_count(SOFTIRQ_OFFSET - 1); + + if (unlikely(!in_interrupt() && local_softirq_pending())) + do_softirq(); + + dec_preempt_count(); + preempt_check_resched(); +} +EXPORT_SYMBOL(local_bh_enable); + #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED # define invoke_softirq() __do_softirq() #else @@ -285,7 +165,6 @@ EXPORT_SYMBOL(do_softirq); void irq_exit(void) { account_system_vtime(current); - trace_hardirq_exit(); sub_preempt_count(IRQ_EXIT_OFFSET); if (!in_interrupt() && local_softirq_pending()) invoke_softirq(); @@ -329,6 +208,8 @@ void open_softirq(int nr, void (*action)(struct softirq_action*), void *data) softirq_vec[nr].action = action; } +EXPORT_SYMBOL(open_softirq); + /* Tasklets */ struct tasklet_head { @@ -565,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -static int __cpuinit cpu_callback(struct notifier_block *nfb, +static int cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -574,6 +455,8 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_UP_PREPARE: + BUG_ON(per_cpu(tasklet_vec, hotcpu).list); + BUG_ON(per_cpu(tasklet_hi_vec, hotcpu).list); p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu); if (IS_ERR(p)) { printk("ksoftirqd for %i failed\n", hotcpu); @@ -587,8 +470,6 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, break; #ifdef CONFIG_HOTPLUG_CPU case CPU_UP_CANCELED: - if (!per_cpu(ksoftirqd, hotcpu)) - break; /* Unbind so it can run. Fall thru. */ kthread_bind(per_cpu(ksoftirqd, hotcpu), any_online_cpu(cpu_online_map)); @@ -603,7 +484,7 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cpu_nfb = { +static struct notifier_block cpu_nfb = { .notifier_call = cpu_callback }; diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 03e6a2b0b..14c7faf02 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -36,7 +36,7 @@ static struct notifier_block panic_block = { void touch_softlockup_watchdog(void) { - __raw_get_cpu_var(touch_timestamp) = jiffies; + per_cpu(touch_timestamp, raw_smp_processor_id()) = jiffies; } EXPORT_SYMBOL(touch_softlockup_watchdog); @@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu) /* * Create/destroy watchdog threads as CPUs come and go: */ -static int __cpuinit +static int cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { int hotcpu = (unsigned long)hcpu; @@ -127,8 +127,6 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) break; #ifdef CONFIG_HOTPLUG_CPU case CPU_UP_CANCELED: - if (!per_cpu(watchdog_task, hotcpu)) - break; /* Unbind so it can run. Fall thru. */ kthread_bind(per_cpu(watchdog_task, hotcpu), any_online_cpu(cpu_online_map)); @@ -142,7 +140,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) return NOTIFY_OK; } -static struct notifier_block __cpuinitdata cpu_nfb = { +static struct notifier_block cpu_nfb = { .notifier_call = cpu_callback }; diff --git a/kernel/spinlock.c b/kernel/spinlock.c index fb524b009..d1b810782 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c @@ -9,11 +9,11 @@ * SMP and the DEBUG_SPINLOCK cases. (UP-nondebug inlines them) */ +#include #include #include #include #include -#include #include /* @@ -30,10 +30,8 @@ EXPORT_SYMBOL(generic__raw_read_trylock); int __lockfunc _spin_trylock(spinlock_t *lock) { preempt_disable(); - if (_raw_spin_trylock(lock)) { - spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); + if (_raw_spin_trylock(lock)) return 1; - } preempt_enable(); return 0; @@ -43,10 +41,8 @@ EXPORT_SYMBOL(_spin_trylock); int __lockfunc _read_trylock(rwlock_t *lock) { preempt_disable(); - if (_raw_read_trylock(lock)) { - rwlock_acquire_read(&lock->dep_map, 0, 1, _RET_IP_); + if (_raw_read_trylock(lock)) return 1; - } preempt_enable(); return 0; @@ -56,28 +52,19 @@ EXPORT_SYMBOL(_read_trylock); int __lockfunc _write_trylock(rwlock_t *lock) { preempt_disable(); - if (_raw_write_trylock(lock)) { - rwlock_acquire(&lock->dep_map, 0, 1, _RET_IP_); + if (_raw_write_trylock(lock)) return 1; - } preempt_enable(); return 0; } EXPORT_SYMBOL(_write_trylock); -/* - * If lockdep is enabled then we use the non-preemption spin-ops - * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are - * not re-enabled during lock-acquire (which the preempt-spin-ops do): - */ -#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \ - defined(CONFIG_DEBUG_LOCK_ALLOC) +#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) void __lockfunc _read_lock(rwlock_t *lock) { preempt_disable(); - rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); _raw_read_lock(lock); } EXPORT_SYMBOL(_read_lock); @@ -88,17 +75,7 @@ unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) local_irq_save(flags); preempt_disable(); - spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); - /* - * On lockdep we dont want the hand-coded irq-enable of - * _raw_spin_lock_flags() code, because lockdep assumes - * that interrupts are not re-enabled during lock-acquire: - */ -#ifdef CONFIG_PROVE_LOCKING - _raw_spin_lock(lock); -#else _raw_spin_lock_flags(lock, &flags); -#endif return flags; } EXPORT_SYMBOL(_spin_lock_irqsave); @@ -107,7 +84,6 @@ void __lockfunc _spin_lock_irq(spinlock_t *lock) { local_irq_disable(); preempt_disable(); - spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_spin_lock(lock); } EXPORT_SYMBOL(_spin_lock_irq); @@ -116,7 +92,6 @@ void __lockfunc _spin_lock_bh(spinlock_t *lock) { local_bh_disable(); preempt_disable(); - spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_spin_lock(lock); } EXPORT_SYMBOL(_spin_lock_bh); @@ -127,7 +102,6 @@ unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) local_irq_save(flags); preempt_disable(); - rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); _raw_read_lock(lock); return flags; } @@ -137,7 +111,6 @@ void __lockfunc _read_lock_irq(rwlock_t *lock) { local_irq_disable(); preempt_disable(); - rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); _raw_read_lock(lock); } EXPORT_SYMBOL(_read_lock_irq); @@ -146,7 +119,6 @@ void __lockfunc _read_lock_bh(rwlock_t *lock) { local_bh_disable(); preempt_disable(); - rwlock_acquire_read(&lock->dep_map, 0, 0, _RET_IP_); _raw_read_lock(lock); } EXPORT_SYMBOL(_read_lock_bh); @@ -157,7 +129,6 @@ unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) local_irq_save(flags); preempt_disable(); - rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_write_lock(lock); return flags; } @@ -167,7 +138,6 @@ void __lockfunc _write_lock_irq(rwlock_t *lock) { local_irq_disable(); preempt_disable(); - rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_write_lock(lock); } EXPORT_SYMBOL(_write_lock_irq); @@ -176,7 +146,6 @@ void __lockfunc _write_lock_bh(rwlock_t *lock) { local_bh_disable(); preempt_disable(); - rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_write_lock(lock); } EXPORT_SYMBOL(_write_lock_bh); @@ -184,7 +153,6 @@ EXPORT_SYMBOL(_write_lock_bh); void __lockfunc _spin_lock(spinlock_t *lock) { preempt_disable(); - spin_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_spin_lock(lock); } @@ -193,7 +161,6 @@ EXPORT_SYMBOL(_spin_lock); void __lockfunc _write_lock(rwlock_t *lock) { preempt_disable(); - rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_); _raw_write_lock(lock); } @@ -289,22 +256,8 @@ BUILD_LOCK_OPS(write, rwlock); #endif /* CONFIG_PREEMPT */ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - -void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) -{ - preempt_disable(); - spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_); - _raw_spin_lock(lock); -} - -EXPORT_SYMBOL(_spin_lock_nested); - -#endif - void __lockfunc _spin_unlock(spinlock_t *lock) { - spin_release(&lock->dep_map, 1, _RET_IP_); _raw_spin_unlock(lock); preempt_enable(); } @@ -312,7 +265,6 @@ EXPORT_SYMBOL(_spin_unlock); void __lockfunc _write_unlock(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_write_unlock(lock); preempt_enable(); } @@ -320,7 +272,6 @@ EXPORT_SYMBOL(_write_unlock); void __lockfunc _read_unlock(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_read_unlock(lock); preempt_enable(); } @@ -328,7 +279,6 @@ EXPORT_SYMBOL(_read_unlock); void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) { - spin_release(&lock->dep_map, 1, _RET_IP_); _raw_spin_unlock(lock); local_irq_restore(flags); preempt_enable(); @@ -337,7 +287,6 @@ EXPORT_SYMBOL(_spin_unlock_irqrestore); void __lockfunc _spin_unlock_irq(spinlock_t *lock) { - spin_release(&lock->dep_map, 1, _RET_IP_); _raw_spin_unlock(lock); local_irq_enable(); preempt_enable(); @@ -346,16 +295,14 @@ EXPORT_SYMBOL(_spin_unlock_irq); void __lockfunc _spin_unlock_bh(spinlock_t *lock) { - spin_release(&lock->dep_map, 1, _RET_IP_); _raw_spin_unlock(lock); preempt_enable_no_resched(); - local_bh_enable_ip((unsigned long)__builtin_return_address(0)); + local_bh_enable(); } EXPORT_SYMBOL(_spin_unlock_bh); void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_read_unlock(lock); local_irq_restore(flags); preempt_enable(); @@ -364,7 +311,6 @@ EXPORT_SYMBOL(_read_unlock_irqrestore); void __lockfunc _read_unlock_irq(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_read_unlock(lock); local_irq_enable(); preempt_enable(); @@ -373,16 +319,14 @@ EXPORT_SYMBOL(_read_unlock_irq); void __lockfunc _read_unlock_bh(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_read_unlock(lock); preempt_enable_no_resched(); - local_bh_enable_ip((unsigned long)__builtin_return_address(0)); + local_bh_enable(); } EXPORT_SYMBOL(_read_unlock_bh); void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_write_unlock(lock); local_irq_restore(flags); preempt_enable(); @@ -391,7 +335,6 @@ EXPORT_SYMBOL(_write_unlock_irqrestore); void __lockfunc _write_unlock_irq(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_write_unlock(lock); local_irq_enable(); preempt_enable(); @@ -400,10 +343,9 @@ EXPORT_SYMBOL(_write_unlock_irq); void __lockfunc _write_unlock_bh(rwlock_t *lock) { - rwlock_release(&lock->dep_map, 1, _RET_IP_); _raw_write_unlock(lock); preempt_enable_no_resched(); - local_bh_enable_ip((unsigned long)__builtin_return_address(0)); + local_bh_enable(); } EXPORT_SYMBOL(_write_unlock_bh); @@ -411,13 +353,11 @@ int __lockfunc _spin_trylock_bh(spinlock_t *lock) { local_bh_disable(); preempt_disable(); - if (_raw_spin_trylock(lock)) { - spin_acquire(&lock->dep_map, 0, 1, _RET_IP_); + if (_raw_spin_trylock(lock)) return 1; - } preempt_enable_no_resched(); - local_bh_enable_ip((unsigned long)__builtin_return_address(0)); + local_bh_enable(); return 0; } EXPORT_SYMBOL(_spin_trylock_bh); diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c deleted file mode 100644 index b71816e47..000000000 --- a/kernel/stacktrace.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * kernel/stacktrace.c - * - * Stack trace management functions - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - */ -#include -#include -#include - -void print_stack_trace(struct stack_trace *trace, int spaces) -{ - int i, j; - - for (i = 0; i < trace->nr_entries; i++) { - unsigned long ip = trace->entries[i]; - - for (j = 0; j < spaces + 1; j++) - printk(" "); - print_ip_sym(ip); - } -} - diff --git a/kernel/sys.c b/kernel/sys.c index 8d53d8f7c..801276862 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -4,6 +4,7 @@ * Copyright (C) 1991, 1992 Linus Torvalds */ +#include #include #include #include @@ -13,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -58,12 +60,6 @@ #ifndef GET_FPEXC_CTL # define GET_FPEXC_CTL(a,b) (-EINVAL) #endif -#ifndef GET_ENDIAN -# define GET_ENDIAN(a,b) (-EINVAL) -#endif -#ifndef SET_ENDIAN -# define SET_ENDIAN(a,b) (-EINVAL) -#endif /* * this is where the system-wide overflow UID and GID are defined, for @@ -139,15 +135,14 @@ static int __kprobes notifier_call_chain(struct notifier_block **nl, unsigned long val, void *v) { int ret = NOTIFY_DONE; - struct notifier_block *nb, *next_nb; + struct notifier_block *nb; nb = rcu_dereference(*nl); while (nb) { - next_nb = rcu_dereference(nb->next); ret = nb->notifier_call(nb, val, v); if ((ret & NOTIFY_STOP_MASK) == NOTIFY_STOP_MASK) break; - nb = next_nb; + nb = rcu_dereference(nb->next); } return ret; } @@ -596,7 +591,7 @@ void emergency_restart(void) } EXPORT_SYMBOL_GPL(emergency_restart); -static void kernel_restart_prepare(char *cmd) +void kernel_restart_prepare(char *cmd) { blocking_notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd); system_state = SYSTEM_RESTART; @@ -630,7 +625,7 @@ EXPORT_SYMBOL_GPL(kernel_restart); * Move into place and start executing a preloaded standalone * executable. If nothing was preloaded return an error. */ -static void kernel_kexec(void) +void kernel_kexec(void) { #ifdef CONFIG_KEXEC struct kimage *image; @@ -644,6 +639,7 @@ static void kernel_kexec(void) machine_kexec(image); #endif } +EXPORT_SYMBOL_GPL(kernel_kexec); void kernel_shutdown_prepare(enum system_states state) { @@ -1396,6 +1392,7 @@ asmlinkage long sys_setsid(void) pid_t session; int err = -EPERM; + mutex_lock(&tty_mutex); write_lock_irq(&tasklist_lock); /* Fail if I am already a session leader */ @@ -1415,15 +1412,12 @@ asmlinkage long sys_setsid(void) group_leader->signal->leader = 1; __set_special_pids(session, session); - - spin_lock(&group_leader->sighand->siglock); group_leader->signal->tty = NULL; group_leader->signal->tty_old_pgrp = 0; - spin_unlock(&group_leader->sighand->siglock); - err = process_group(group_leader); out: write_unlock_irq(&tasklist_lock); + mutex_unlock(&tty_mutex); return err; } @@ -1889,20 +1883,23 @@ out: * fields when reaping, so a sample either gets all the additions of a * given child after it's reaped, or none so this sample is before reaping. * - * Locking: - * We need to take the siglock for CHILDEREN, SELF and BOTH - * for the cases current multithreaded, non-current single threaded - * non-current multithreaded. Thread traversal is now safe with - * the siglock held. - * Strictly speaking, we donot need to take the siglock if we are current and - * single threaded, as no one else can take our signal_struct away, no one - * else can reap the children to update signal->c* counters, and no one else - * can race with the signal-> fields. If we do not take any lock, the - * signal-> fields could be read out of order while another thread was just - * exiting. So we should place a read memory barrier when we avoid the lock. - * On the writer side, write memory barrier is implied in __exit_signal - * as __exit_signal releases the siglock spinlock after updating the signal-> - * fields. But we don't do this yet to keep things simple. + * tasklist_lock locking optimisation: + * If we are current and single threaded, we do not need to take the tasklist + * lock or the siglock. No one else can take our signal_struct away, + * no one else can reap the children to update signal->c* counters, and + * no one else can race with the signal-> fields. + * If we do not take the tasklist_lock, the signal-> fields could be read + * out of order while another thread was just exiting. So we place a + * read memory barrier when we avoid the lock. On the writer side, + * write memory barrier is implied in __exit_signal as __exit_signal releases + * the siglock spinlock after updating the signal-> fields. + * + * We don't really need the siglock when we access the non c* fields + * of the signal_struct (for RUSAGE_SELF) even in multithreaded + * case, since we take the tasklist lock for read and the non c* signal-> + * fields are updated only in __exit_signal, which is called with + * tasklist_lock taken for write, hence these two threads cannot execute + * concurrently. * */ @@ -1911,25 +1908,35 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) struct task_struct *t; unsigned long flags; cputime_t utime, stime; + int need_lock = 0; memset((char *) r, 0, sizeof *r); utime = stime = cputime_zero; - rcu_read_lock(); - if (!lock_task_sighand(p, &flags)) { - rcu_read_unlock(); - return; - } + if (p != current || !thread_group_empty(p)) + need_lock = 1; + + if (need_lock) { + read_lock(&tasklist_lock); + if (unlikely(!p->signal)) { + read_unlock(&tasklist_lock); + return; + } + } else + /* See locking comments above */ + smp_rmb(); switch (who) { case RUSAGE_BOTH: case RUSAGE_CHILDREN: + spin_lock_irqsave(&p->sighand->siglock, flags); utime = p->signal->cutime; stime = p->signal->cstime; r->ru_nvcsw = p->signal->cnvcsw; r->ru_nivcsw = p->signal->cnivcsw; r->ru_minflt = p->signal->cmin_flt; r->ru_majflt = p->signal->cmaj_flt; + spin_unlock_irqrestore(&p->sighand->siglock, flags); if (who == RUSAGE_CHILDREN) break; @@ -1957,9 +1964,8 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) BUG(); } - unlock_task_sighand(p, &flags); - rcu_read_unlock(); - + if (need_lock) + read_unlock(&tasklist_lock); cputime_to_timeval(utime, &r->ru_utime); cputime_to_timeval(stime, &r->ru_stime); } @@ -2074,13 +2080,6 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, return -EFAULT; return 0; } - case PR_GET_ENDIAN: - error = GET_ENDIAN(current, arg2); - break; - case PR_SET_ENDIAN: - error = SET_ENDIAN(current, arg2); - break; - default: error = -EINVAL; break; diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 6991bece6..543319504 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -87,7 +87,6 @@ cond_syscall(sys_inotify_init); cond_syscall(sys_inotify_add_watch); cond_syscall(sys_inotify_rm_watch); cond_syscall(sys_migrate_pages); -cond_syscall(sys_move_pages); cond_syscall(sys_chown16); cond_syscall(sys_fchown16); cond_syscall(sys_getegid16); @@ -133,4 +132,3 @@ cond_syscall(sys_mincore); cond_syscall(sys_madvise); cond_syscall(sys_mremap); cond_syscall(sys_remap_file_pages); -cond_syscall(compat_sys_move_pages); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 95a6d7f70..e357044a5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -18,6 +18,7 @@ * Removed it and replaced it with older style, 03/23/00, Bill Wendling */ +#include #include #include #include @@ -59,7 +60,6 @@ extern int proc_nr_files(ctl_table *table, int write, struct file *filp, extern int C_A_D; extern int sysctl_overcommit_memory; extern int sysctl_overcommit_ratio; -extern int sysctl_panic_on_oom; extern int max_threads; extern int sysrq_enabled; extern int core_uses_pid; @@ -73,7 +73,6 @@ extern int printk_ratelimit_burst; extern int pid_max_min, pid_max_max; extern int sysctl_drop_caches; extern int percpu_pagelist_fraction; -extern int compat_log; #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) int unknown_nmi_panic; @@ -83,15 +82,16 @@ extern int proc_unknown_nmi_panic(ctl_table *, int, struct file *, extern unsigned int vdso_enabled, vdso_populate; -int exec_shield = (1<<0); +int exec_shield = (1<<3) | (1<<0); /* exec_shield is a bitmask: 0: off; vdso at STACK_TOP, 1 page below TASK_SIZE (1<<0) 1: on [also on if !=0] - (1<<1) 2: force noexecstack regardless of PT_GNU_STACK - The old settings + (1<<1) 2: noexecstack by default (1<<2) 4: vdso just below .text of main (unless too low) (1<<3) 8: vdso just below .text of PT_INTERP (unless too low) - are ignored because the vdso is placed completely randomly +Yes, vdso placement is overloaded here; but exec_shield off +is a strong incentive to place vdso at STACK_TOP, so the bit +for vdso just below .text comes along for the ride. */ static int __init setup_exec_shield(char *str) @@ -156,10 +156,6 @@ extern int acct_parm[]; extern int no_unaligned_warning; #endif -#ifdef CONFIG_RT_MUTEXES -extern int max_lock_depth; -#endif - static int parse_table(int __user *, int, void __user *, size_t __user *, void __user *, size_t, ctl_table *, void **); static int proc_doutsstring(ctl_table *table, int write, struct file *filp, @@ -171,6 +167,7 @@ static struct ctl_table_header root_table_header = static ctl_table kern_table[]; static ctl_table vm_table[]; +static ctl_table proc_table[]; static ctl_table fs_table[]; static ctl_table debug_table[]; static ctl_table dev_table[]; @@ -178,7 +175,7 @@ extern ctl_table random_table[]; #ifdef CONFIG_UNIX98_PTYS extern ctl_table pty_table[]; #endif -#ifdef CONFIG_INOTIFY_USER +#ifdef CONFIG_INOTIFY extern ctl_table inotify_table[]; #endif @@ -229,6 +226,12 @@ static ctl_table root_table[] = { .child = net_table, }, #endif + { + .ctl_name = CTL_PROC, + .procname = "proc", + .mode = 0555, + .child = proc_table, + }, { .ctl_name = CTL_FS, .procname = "fs", @@ -459,7 +462,7 @@ static ctl_table kern_table[] = { .strategy = &sysctl_string, }, #endif -#if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET) +#ifdef CONFIG_HOTPLUG { .ctl_name = KERN_HOTPLUG, .procname = "hotplug", @@ -753,27 +756,6 @@ static ctl_table kern_table[] = { .proc_handler = &proc_dointvec, }, #endif -#ifdef CONFIG_COMPAT - { - .ctl_name = KERN_COMPAT_LOG, - .procname = "compat-log", - .data = &compat_log, - .maxlen = sizeof (int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, -#endif -#ifdef CONFIG_RT_MUTEXES - { - .ctl_name = KERN_MAX_LOCK_DEPTH, - .procname = "max_lock_depth", - .data = &max_lock_depth, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, -#endif - { .ctl_name = 0 } }; @@ -792,14 +774,6 @@ static ctl_table vm_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, - { - .ctl_name = VM_PANIC_ON_OOM, - .procname = "panic_on_oom", - .data = &sysctl_panic_on_oom, - .maxlen = sizeof(sysctl_panic_on_oom), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, { .ctl_name = VM_OVERCOMMIT_RATIO, .procname = "overcommit_ratio", @@ -1005,43 +979,22 @@ static ctl_table vm_table[] = { .extra1 = &zero, }, { - .ctl_name = VM_MIN_UNMAPPED, - .procname = "min_unmapped_ratio", - .data = &sysctl_min_unmapped_ratio, - .maxlen = sizeof(sysctl_min_unmapped_ratio), + .ctl_name = VM_ZONE_RECLAIM_INTERVAL, + .procname = "zone_reclaim_interval", + .data = &zone_reclaim_interval, + .maxlen = sizeof(zone_reclaim_interval), .mode = 0644, - .proc_handler = &sysctl_min_unmapped_ratio_sysctl_handler, - .strategy = &sysctl_intvec, - .extra1 = &zero, - .extra2 = &one_hundred, - }, - { - .ctl_name = VM_MIN_SLAB, - .procname = "min_slab_ratio", - .data = &sysctl_min_slab_ratio, - .maxlen = sizeof(sysctl_min_slab_ratio), - .mode = 0644, - .proc_handler = &sysctl_min_slab_ratio_sysctl_handler, - .strategy = &sysctl_intvec, - .extra1 = &zero, - .extra2 = &one_hundred, - }, -#endif -#ifdef CONFIG_X86_32 - { - .ctl_name = VM_VDSO_ENABLED, - .procname = "vdso_enabled", - .data = &vdso_enabled, - .maxlen = sizeof(vdso_enabled), - .mode = 0644, - .proc_handler = &proc_dointvec, - .strategy = &sysctl_intvec, - .extra1 = &zero, + .proc_handler = &proc_dointvec_jiffies, + .strategy = &sysctl_jiffies, }, #endif { .ctl_name = 0 } }; +static ctl_table proc_table[] = { + { .ctl_name = 0 } +}; + static ctl_table fs_table[] = { { .ctl_name = FS_NRINODE, @@ -1148,7 +1101,7 @@ static ctl_table fs_table[] = { .mode = 0644, .proc_handler = &proc_doulongvec_minmax, }, -#ifdef CONFIG_INOTIFY_USER +#ifdef CONFIG_INOTIFY { .ctl_name = FS_INOTIFY, .procname = "inotify", diff --git a/kernel/taskstats.c b/kernel/taskstats.c deleted file mode 100644 index b90b2a7ef..000000000 --- a/kernel/taskstats.c +++ /dev/null @@ -1,567 +0,0 @@ -/* - * taskstats.c - Export per-task statistics to userland - * - * Copyright (C) Shailabh Nagar, IBM Corp. 2006 - * (C) Balbir Singh, IBM Corp. 2006 - * - * 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. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -/* - * Maximum length of a cpumask that can be specified in - * the TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK attribute - */ -#define TASKSTATS_CPUMASK_MAXLEN (100+6*NR_CPUS) - -static DEFINE_PER_CPU(__u32, taskstats_seqnum) = { 0 }; -static int family_registered; -kmem_cache_t *taskstats_cache; - -static struct genl_family family = { - .id = GENL_ID_GENERATE, - .name = TASKSTATS_GENL_NAME, - .version = TASKSTATS_GENL_VERSION, - .maxattr = TASKSTATS_CMD_ATTR_MAX, -}; - -static struct nla_policy taskstats_cmd_get_policy[TASKSTATS_CMD_ATTR_MAX+1] -__read_mostly = { - [TASKSTATS_CMD_ATTR_PID] = { .type = NLA_U32 }, - [TASKSTATS_CMD_ATTR_TGID] = { .type = NLA_U32 }, - [TASKSTATS_CMD_ATTR_REGISTER_CPUMASK] = { .type = NLA_STRING }, - [TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK] = { .type = NLA_STRING },}; - -struct listener { - struct list_head list; - pid_t pid; - char valid; -}; - -struct listener_list { - struct rw_semaphore sem; - struct list_head list; -}; -static DEFINE_PER_CPU(struct listener_list, listener_array); - -enum actions { - REGISTER, - DEREGISTER, - CPU_DONT_CARE -}; - -static int prepare_reply(struct genl_info *info, u8 cmd, struct sk_buff **skbp, - void **replyp, size_t size) -{ - struct sk_buff *skb; - void *reply; - - /* - * If new attributes are added, please revisit this allocation - */ - skb = nlmsg_new(size); - if (!skb) - return -ENOMEM; - - if (!info) { - int seq = get_cpu_var(taskstats_seqnum)++; - put_cpu_var(taskstats_seqnum); - - reply = genlmsg_put(skb, 0, seq, - family.id, 0, 0, - cmd, family.version); - } else - reply = genlmsg_put(skb, info->snd_pid, info->snd_seq, - family.id, 0, 0, - cmd, family.version); - if (reply == NULL) { - nlmsg_free(skb); - return -EINVAL; - } - - *skbp = skb; - *replyp = reply; - return 0; -} - -/* - * Send taskstats data in @skb to listener with nl_pid @pid - */ -static int send_reply(struct sk_buff *skb, pid_t pid) -{ - struct genlmsghdr *genlhdr = nlmsg_data((struct nlmsghdr *)skb->data); - void *reply = genlmsg_data(genlhdr); - int rc; - - rc = genlmsg_end(skb, reply); - if (rc < 0) { - nlmsg_free(skb); - return rc; - } - - return genlmsg_unicast(skb, pid); -} - -/* - * Send taskstats data in @skb to listeners registered for @cpu's exit data - */ -static void send_cpu_listeners(struct sk_buff *skb, unsigned int cpu) -{ - struct genlmsghdr *genlhdr = nlmsg_data((struct nlmsghdr *)skb->data); - struct listener_list *listeners; - struct listener *s, *tmp; - struct sk_buff *skb_next, *skb_cur = skb; - void *reply = genlmsg_data(genlhdr); - int rc, delcount = 0; - - rc = genlmsg_end(skb, reply); - if (rc < 0) { - nlmsg_free(skb); - return; - } - - rc = 0; - listeners = &per_cpu(listener_array, cpu); - down_read(&listeners->sem); - list_for_each_entry(s, &listeners->list, list) { - skb_next = NULL; - if (!list_is_last(&s->list, &listeners->list)) { - skb_next = skb_clone(skb_cur, GFP_KERNEL); - if (!skb_next) - break; - } - rc = genlmsg_unicast(skb_cur, s->pid); - if (rc == -ECONNREFUSED) { - s->valid = 0; - delcount++; - } - skb_cur = skb_next; - } - up_read(&listeners->sem); - - if (skb_cur) - nlmsg_free(skb_cur); - - if (!delcount) - return; - - /* Delete invalidated entries */ - down_write(&listeners->sem); - list_for_each_entry_safe(s, tmp, &listeners->list, list) { - if (!s->valid) { - list_del(&s->list); - kfree(s); - } - } - up_write(&listeners->sem); -} - -static int fill_pid(pid_t pid, struct task_struct *pidtsk, - struct taskstats *stats) -{ - int rc = 0; - struct task_struct *tsk = pidtsk; - - if (!pidtsk) { - read_lock(&tasklist_lock); - tsk = find_task_by_pid(pid); - if (!tsk) { - read_unlock(&tasklist_lock); - return -ESRCH; - } - get_task_struct(tsk); - read_unlock(&tasklist_lock); - } else - get_task_struct(tsk); - - /* - * Each accounting subsystem adds calls to its functions to - * fill in relevant parts of struct taskstsats as follows - * - * per-task-foo(stats, tsk); - */ - - delayacct_add_tsk(stats, tsk); - stats->version = TASKSTATS_VERSION; - - /* Define err: label here if needed */ - put_task_struct(tsk); - return rc; - -} - -static int fill_tgid(pid_t tgid, struct task_struct *tgidtsk, - struct taskstats *stats) -{ - struct task_struct *tsk, *first; - unsigned long flags; - - /* - * Add additional stats from live tasks except zombie thread group - * leaders who are already counted with the dead tasks - */ - first = tgidtsk; - if (!first) { - read_lock(&tasklist_lock); - first = find_task_by_pid(tgid); - if (!first) { - read_unlock(&tasklist_lock); - return -ESRCH; - } - get_task_struct(first); - read_unlock(&tasklist_lock); - } else - get_task_struct(first); - - - tsk = first; - read_lock(&tasklist_lock); - /* Start with stats from dead tasks */ - if (first->signal) { - spin_lock_irqsave(&first->signal->stats_lock, flags); - if (first->signal->stats) - memcpy(stats, first->signal->stats, sizeof(*stats)); - spin_unlock_irqrestore(&first->signal->stats_lock, flags); - } - - do { - if (tsk->exit_state == EXIT_ZOMBIE && thread_group_leader(tsk)) - continue; - /* - * Accounting subsystem can call its functions here to - * fill in relevant parts of struct taskstsats as follows - * - * per-task-foo(stats, tsk); - */ - delayacct_add_tsk(stats, tsk); - - } while_each_thread(first, tsk); - read_unlock(&tasklist_lock); - stats->version = TASKSTATS_VERSION; - - /* - * Accounting subsytems can also add calls here to modify - * fields of taskstats. - */ - put_task_struct(first); - return 0; -} - - -static void fill_tgid_exit(struct task_struct *tsk) -{ - unsigned long flags; - - spin_lock_irqsave(&tsk->signal->stats_lock, flags); - if (!tsk->signal->stats) - goto ret; - - /* - * Each accounting subsystem calls its functions here to - * accumalate its per-task stats for tsk, into the per-tgid structure - * - * per-task-foo(tsk->signal->stats, tsk); - */ - delayacct_add_tsk(tsk->signal->stats, tsk); -ret: - spin_unlock_irqrestore(&tsk->signal->stats_lock, flags); - return; -} - -static int add_del_listener(pid_t pid, cpumask_t *maskp, int isadd) -{ - struct listener_list *listeners; - struct listener *s, *tmp; - unsigned int cpu; - cpumask_t mask = *maskp; - - if (!cpus_subset(mask, cpu_possible_map)) - return -EINVAL; - - if (isadd == REGISTER) { - for_each_cpu_mask(cpu, mask) { - s = kmalloc_node(sizeof(struct listener), GFP_KERNEL, - cpu_to_node(cpu)); - if (!s) - goto cleanup; - s->pid = pid; - INIT_LIST_HEAD(&s->list); - s->valid = 1; - - listeners = &per_cpu(listener_array, cpu); - down_write(&listeners->sem); - list_add(&s->list, &listeners->list); - up_write(&listeners->sem); - } - return 0; - } - - /* Deregister or cleanup */ -cleanup: - for_each_cpu_mask(cpu, mask) { - listeners = &per_cpu(listener_array, cpu); - down_write(&listeners->sem); - list_for_each_entry_safe(s, tmp, &listeners->list, list) { - if (s->pid == pid) { - list_del(&s->list); - kfree(s); - break; - } - } - up_write(&listeners->sem); - } - return 0; -} - -static int parse(struct nlattr *na, cpumask_t *mask) -{ - char *data; - int len; - int ret; - - if (na == NULL) - return 1; - len = nla_len(na); - if (len > TASKSTATS_CPUMASK_MAXLEN) - return -E2BIG; - if (len < 1) - return -EINVAL; - data = kmalloc(len, GFP_KERNEL); - if (!data) - return -ENOMEM; - nla_strlcpy(data, na, len); - ret = cpulist_parse(data, *mask); - kfree(data); - return ret; -} - -static int taskstats_user_cmd(struct sk_buff *skb, struct genl_info *info) -{ - int rc = 0; - struct sk_buff *rep_skb; - struct taskstats stats; - void *reply; - size_t size; - struct nlattr *na; - cpumask_t mask; - - rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], &mask); - if (rc < 0) - return rc; - if (rc == 0) - return add_del_listener(info->snd_pid, &mask, REGISTER); - - rc = parse(info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK], &mask); - if (rc < 0) - return rc; - if (rc == 0) - return add_del_listener(info->snd_pid, &mask, DEREGISTER); - - /* - * Size includes space for nested attributes - */ - size = nla_total_size(sizeof(u32)) + - nla_total_size(sizeof(struct taskstats)) + nla_total_size(0); - - memset(&stats, 0, sizeof(stats)); - rc = prepare_reply(info, TASKSTATS_CMD_NEW, &rep_skb, &reply, size); - if (rc < 0) - return rc; - - if (info->attrs[TASKSTATS_CMD_ATTR_PID]) { - u32 pid = nla_get_u32(info->attrs[TASKSTATS_CMD_ATTR_PID]); - rc = fill_pid(pid, NULL, &stats); - if (rc < 0) - goto err; - - na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_PID); - NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_PID, pid); - NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS, - stats); - } else if (info->attrs[TASKSTATS_CMD_ATTR_TGID]) { - u32 tgid = nla_get_u32(info->attrs[TASKSTATS_CMD_ATTR_TGID]); - rc = fill_tgid(tgid, NULL, &stats); - if (rc < 0) - goto err; - - na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_TGID); - NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_TGID, tgid); - NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS, - stats); - } else { - rc = -EINVAL; - goto err; - } - - nla_nest_end(rep_skb, na); - - return send_reply(rep_skb, info->snd_pid); - -nla_put_failure: - return genlmsg_cancel(rep_skb, reply); -err: - nlmsg_free(rep_skb); - return rc; -} - -void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu) -{ - struct listener_list *listeners; - struct taskstats *tmp; - /* - * This is the cpu on which the task is exiting currently and will - * be the one for which the exit event is sent, even if the cpu - * on which this function is running changes later. - */ - *mycpu = raw_smp_processor_id(); - - *ptidstats = NULL; - tmp = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL); - if (!tmp) - return; - - listeners = &per_cpu(listener_array, *mycpu); - down_read(&listeners->sem); - if (!list_empty(&listeners->list)) { - *ptidstats = tmp; - tmp = NULL; - } - up_read(&listeners->sem); - kfree(tmp); -} - -/* Send pid data out on exit */ -void taskstats_exit_send(struct task_struct *tsk, struct taskstats *tidstats, - int group_dead, unsigned int mycpu) -{ - int rc; - struct sk_buff *rep_skb; - void *reply; - size_t size; - int is_thread_group; - struct nlattr *na; - unsigned long flags; - - if (!family_registered || !tidstats) - return; - - spin_lock_irqsave(&tsk->signal->stats_lock, flags); - is_thread_group = tsk->signal->stats ? 1 : 0; - spin_unlock_irqrestore(&tsk->signal->stats_lock, flags); - - rc = 0; - /* - * Size includes space for nested attributes - */ - size = nla_total_size(sizeof(u32)) + - nla_total_size(sizeof(struct taskstats)) + nla_total_size(0); - - if (is_thread_group) - size = 2 * size; /* PID + STATS + TGID + STATS */ - - rc = prepare_reply(NULL, TASKSTATS_CMD_NEW, &rep_skb, &reply, size); - if (rc < 0) - goto ret; - - rc = fill_pid(tsk->pid, tsk, tidstats); - if (rc < 0) - goto err_skb; - - na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_PID); - NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_PID, (u32)tsk->pid); - NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS, - *tidstats); - nla_nest_end(rep_skb, na); - - if (!is_thread_group) - goto send; - - /* - * tsk has/had a thread group so fill the tsk->signal->stats structure - * Doesn't matter if tsk is the leader or the last group member leaving - */ - - fill_tgid_exit(tsk); - if (!group_dead) - goto send; - - na = nla_nest_start(rep_skb, TASKSTATS_TYPE_AGGR_TGID); - NLA_PUT_U32(rep_skb, TASKSTATS_TYPE_TGID, (u32)tsk->tgid); - /* No locking needed for tsk->signal->stats since group is dead */ - NLA_PUT_TYPE(rep_skb, struct taskstats, TASKSTATS_TYPE_STATS, - *tsk->signal->stats); - nla_nest_end(rep_skb, na); - -send: - send_cpu_listeners(rep_skb, mycpu); - return; - -nla_put_failure: - genlmsg_cancel(rep_skb, reply); - goto ret; -err_skb: - nlmsg_free(rep_skb); -ret: - return; -} - -static struct genl_ops taskstats_ops = { - .cmd = TASKSTATS_CMD_GET, - .doit = taskstats_user_cmd, - .policy = taskstats_cmd_get_policy, -}; - -/* Needed early in initialization */ -void __init taskstats_init_early(void) -{ - unsigned int i; - - taskstats_cache = kmem_cache_create("taskstats_cache", - sizeof(struct taskstats), - 0, SLAB_PANIC, NULL, NULL); - for_each_possible_cpu(i) { - INIT_LIST_HEAD(&(per_cpu(listener_array, i).list)); - init_rwsem(&(per_cpu(listener_array, i).sem)); - } -} - -static int __init taskstats_init(void) -{ - int rc; - - rc = genl_register_family(&family); - if (rc) - return rc; - - rc = genl_register_ops(&family, &taskstats_ops); - if (rc < 0) - goto err; - - family_registered = 1; - return 0; -err: - genl_unregister_family(&family); - return rc; -} - -/* - * late initcall ensures initialization of statistics collection - * mechanisms precedes initialization of the taskstats interface - */ -late_initcall(taskstats_init); diff --git a/kernel/time.c b/kernel/time.c index 1ea60b2d0..b00ddc71c 100644 --- a/kernel/time.c +++ b/kernel/time.c @@ -207,8 +207,6 @@ asmlinkage long sys_settimeofday(struct timeval __user *tv, */ void __attribute__ ((weak)) notify_arch_cmos_timer(void) { - /* Workaround http://gcc.gnu.org/PR27781 */ - asm volatile (""); return; } @@ -525,7 +523,6 @@ EXPORT_SYMBOL(do_gettimeofday); #else -#ifndef CONFIG_GENERIC_TIME /* * Simulate gettimeofday using do_gettimeofday which only allows a timeval * and therefore only yields usec accuracy @@ -540,7 +537,6 @@ void getnstimeofday(struct timespec *tv) } EXPORT_SYMBOL_GPL(getnstimeofday); #endif -#endif /* Converts Gregorian date to seconds since 1970-01-01 00:00:00. * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 diff --git a/kernel/time/Makefile b/kernel/time/Makefile deleted file mode 100644 index e1dfd8e86..000000000 --- a/kernel/time/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-y += clocksource.o jiffies.o diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c deleted file mode 100644 index 74eca5939..000000000 --- a/kernel/time/clocksource.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * linux/kernel/time/clocksource.c - * - * This file contains the functions which manage clocksource drivers. - * - * Copyright (C) 2004, 2005 IBM, John Stultz (johnstul@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., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * TODO WishList: - * o Allow clocksource drivers to be unregistered - * o get rid of clocksource_jiffies extern - */ - -#include -#include -#include -#include - -/* XXX - Would like a better way for initializing curr_clocksource */ -extern struct clocksource clocksource_jiffies; - -/*[Clocksource internal variables]--------- - * curr_clocksource: - * currently selected clocksource. Initialized to clocksource_jiffies. - * next_clocksource: - * pending next selected clocksource. - * clocksource_list: - * linked list with the registered clocksources - * clocksource_lock: - * protects manipulations to curr_clocksource and next_clocksource - * and the clocksource_list - * override_name: - * Name of the user-specified clocksource. - */ -static struct clocksource *curr_clocksource = &clocksource_jiffies; -static struct clocksource *next_clocksource; -static LIST_HEAD(clocksource_list); -static DEFINE_SPINLOCK(clocksource_lock); -static char override_name[32]; -static int finished_booting; - -/* clocksource_done_booting - Called near the end of bootup - * - * Hack to avoid lots of clocksource churn at boot time - */ -static int __init clocksource_done_booting(void) -{ - finished_booting = 1; - return 0; -} - -late_initcall(clocksource_done_booting); - -/** - * clocksource_get_next - Returns the selected clocksource - * - */ -struct clocksource *clocksource_get_next(void) -{ - unsigned long flags; - - spin_lock_irqsave(&clocksource_lock, flags); - if (next_clocksource && finished_booting) { - curr_clocksource = next_clocksource; - next_clocksource = NULL; - } - spin_unlock_irqrestore(&clocksource_lock, flags); - - return curr_clocksource; -} - -/** - * select_clocksource - Finds the best registered clocksource. - * - * Private function. Must hold clocksource_lock when called. - * - * Looks through the list of registered clocksources, returning - * the one with the highest rating value. If there is a clocksource - * name that matches the override string, it returns that clocksource. - */ -static struct clocksource *select_clocksource(void) -{ - struct clocksource *best = NULL; - struct list_head *tmp; - - list_for_each(tmp, &clocksource_list) { - struct clocksource *src; - - src = list_entry(tmp, struct clocksource, list); - if (!best) - best = src; - - /* check for override: */ - if (strlen(src->name) == strlen(override_name) && - !strcmp(src->name, override_name)) { - best = src; - break; - } - /* pick the highest rating: */ - if (src->rating > best->rating) - best = src; - } - - return best; -} - -/** - * is_registered_source - Checks if clocksource is registered - * @c: pointer to a clocksource - * - * Private helper function. Must hold clocksource_lock when called. - * - * Returns one if the clocksource is already registered, zero otherwise. - */ -static int is_registered_source(struct clocksource *c) -{ - int len = strlen(c->name); - struct list_head *tmp; - - list_for_each(tmp, &clocksource_list) { - struct clocksource *src; - - src = list_entry(tmp, struct clocksource, list); - if (strlen(src->name) == len && !strcmp(src->name, c->name)) - return 1; - } - - return 0; -} - -/** - * clocksource_register - Used to install new clocksources - * @t: clocksource to be registered - * - * Returns -EBUSY if registration fails, zero otherwise. - */ -int clocksource_register(struct clocksource *c) -{ - int ret = 0; - unsigned long flags; - - spin_lock_irqsave(&clocksource_lock, flags); - /* check if clocksource is already registered */ - if (is_registered_source(c)) { - printk("register_clocksource: Cannot register %s. " - "Already registered!", c->name); - ret = -EBUSY; - } else { - /* register it */ - list_add(&c->list, &clocksource_list); - /* scan the registered clocksources, and pick the best one */ - next_clocksource = select_clocksource(); - } - spin_unlock_irqrestore(&clocksource_lock, flags); - return ret; -} -EXPORT_SYMBOL(clocksource_register); - -/** - * clocksource_reselect - Rescan list for next clocksource - * - * A quick helper function to be used if a clocksource changes its - * rating. Forces the clocksource list to be re-scanned for the best - * clocksource. - */ -void clocksource_reselect(void) -{ - unsigned long flags; - - spin_lock_irqsave(&clocksource_lock, flags); - next_clocksource = select_clocksource(); - spin_unlock_irqrestore(&clocksource_lock, flags); -} -EXPORT_SYMBOL(clocksource_reselect); - -/** - * sysfs_show_current_clocksources - sysfs interface for current clocksource - * @dev: unused - * @buf: char buffer to be filled with clocksource list - * - * Provides sysfs interface for listing current clocksource. - */ -static ssize_t -sysfs_show_current_clocksources(struct sys_device *dev, char *buf) -{ - char *curr = buf; - - spin_lock_irq(&clocksource_lock); - curr += sprintf(curr, "%s ", curr_clocksource->name); - spin_unlock_irq(&clocksource_lock); - - curr += sprintf(curr, "\n"); - - return curr - buf; -} - -/** - * sysfs_override_clocksource - interface for manually overriding clocksource - * @dev: unused - * @buf: name of override clocksource - * @count: length of buffer - * - * Takes input from sysfs interface for manually overriding the default - * clocksource selction. - */ -static ssize_t sysfs_override_clocksource(struct sys_device *dev, - const char *buf, size_t count) -{ - size_t ret = count; - /* strings from sysfs write are not 0 terminated! */ - if (count >= sizeof(override_name)) - return -EINVAL; - - /* strip of \n: */ - if (buf[count-1] == '\n') - count--; - if (count < 1) - return -EINVAL; - - spin_lock_irq(&clocksource_lock); - - /* copy the name given: */ - memcpy(override_name, buf, count); - override_name[count] = 0; - - /* try to select it: */ - next_clocksource = select_clocksource(); - - spin_unlock_irq(&clocksource_lock); - - return ret; -} - -/** - * sysfs_show_available_clocksources - sysfs interface for listing clocksource - * @dev: unused - * @buf: char buffer to be filled with clocksource list - * - * Provides sysfs interface for listing registered clocksources - */ -static ssize_t -sysfs_show_available_clocksources(struct sys_device *dev, char *buf) -{ - struct list_head *tmp; - char *curr = buf; - - spin_lock_irq(&clocksource_lock); - list_for_each(tmp, &clocksource_list) { - struct clocksource *src; - - src = list_entry(tmp, struct clocksource, list); - curr += sprintf(curr, "%s ", src->name); - } - spin_unlock_irq(&clocksource_lock); - - curr += sprintf(curr, "\n"); - - return curr - buf; -} - -/* - * Sysfs setup bits: - */ -static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources, - sysfs_override_clocksource); - -static SYSDEV_ATTR(available_clocksource, 0600, - sysfs_show_available_clocksources, NULL); - -static struct sysdev_class clocksource_sysclass = { - set_kset_name("clocksource"), -}; - -static struct sys_device device_clocksource = { - .id = 0, - .cls = &clocksource_sysclass, -}; - -static int __init init_clocksource_sysfs(void) -{ - int error = sysdev_class_register(&clocksource_sysclass); - - if (!error) - error = sysdev_register(&device_clocksource); - if (!error) - error = sysdev_create_file( - &device_clocksource, - &attr_current_clocksource); - if (!error) - error = sysdev_create_file( - &device_clocksource, - &attr_available_clocksource); - return error; -} - -device_initcall(init_clocksource_sysfs); - -/** - * boot_override_clocksource - boot clock override - * @str: override name - * - * Takes a clocksource= boot argument and uses it - * as the clocksource override name. - */ -static int __init boot_override_clocksource(char* str) -{ - unsigned long flags; - spin_lock_irqsave(&clocksource_lock, flags); - if (str) - strlcpy(override_name, str, sizeof(override_name)); - spin_unlock_irqrestore(&clocksource_lock, flags); - return 1; -} - -__setup("clocksource=", boot_override_clocksource); - -/** - * boot_override_clock - Compatibility layer for deprecated boot option - * @str: override name - * - * DEPRECATED! Takes a clock= boot argument and uses it - * as the clocksource override name - */ -static int __init boot_override_clock(char* str) -{ - if (!strcmp(str, "pmtmr")) { - printk("Warning: clock=pmtmr is deprecated. " - "Use clocksource=acpi_pm.\n"); - return boot_override_clocksource("acpi_pm"); - } - printk("Warning! clock= boot option is deprecated. " - "Use clocksource=xyz\n"); - return boot_override_clocksource(str); -} - -__setup("clock=", boot_override_clock); diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c deleted file mode 100644 index 126bb30c4..000000000 --- a/kernel/time/jiffies.c +++ /dev/null @@ -1,73 +0,0 @@ -/*********************************************************************** -* linux/kernel/time/jiffies.c -* -* This file contains the jiffies based clocksource. -* -* Copyright (C) 2004, 2005 IBM, John Stultz (johnstul@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., 675 Mass Ave, Cambridge, MA 02139, USA. -* -************************************************************************/ -#include -#include -#include - -/* The Jiffies based clocksource is the lowest common - * denominator clock source which should function on - * all systems. It has the same coarse resolution as - * the timer interrupt frequency HZ and it suffers - * inaccuracies caused by missed or lost timer - * interrupts and the inability for the timer - * interrupt hardware to accuratly tick at the - * requested HZ value. It is also not reccomended - * for "tick-less" systems. - */ -#define NSEC_PER_JIFFY ((u32)((((u64)NSEC_PER_SEC)<<8)/ACTHZ)) - -/* Since jiffies uses a simple NSEC_PER_JIFFY multiplier - * conversion, the .shift value could be zero. However - * this would make NTP adjustments impossible as they are - * in units of 1/2^.shift. Thus we use JIFFIES_SHIFT to - * shift both the nominator and denominator the same - * amount, and give ntp adjustments in units of 1/2^8 - * - * The value 8 is somewhat carefully chosen, as anything - * larger can result in overflows. NSEC_PER_JIFFY grows as - * HZ shrinks, so values greater then 8 overflow 32bits when - * HZ=100. - */ -#define JIFFIES_SHIFT 8 - -static cycle_t jiffies_read(void) -{ - return (cycle_t) jiffies; -} - -struct clocksource clocksource_jiffies = { - .name = "jiffies", - .rating = 0, /* lowest rating*/ - .read = jiffies_read, - .mask = 0xffffffff, /*32bits*/ - .mult = NSEC_PER_JIFFY << JIFFIES_SHIFT, /* details above */ - .shift = JIFFIES_SHIFT, - .is_continuous = 0, /* tick based, not free running */ -}; - -static int __init init_jiffies_clocksource(void) -{ - return clocksource_register(&clocksource_jiffies); -} - -module_init(init_jiffies_clocksource); diff --git a/kernel/timer.c b/kernel/timer.c index ea6ec802d..1bbbceea9 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -87,7 +87,7 @@ typedef struct tvec_t_base_s tvec_base_t; tvec_base_t boot_tvec_bases; EXPORT_SYMBOL(boot_tvec_bases); -static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases; +static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = { &boot_tvec_bases }; static inline void set_running_timer(tvec_base_t *base, struct timer_list *timer) @@ -149,7 +149,7 @@ static void internal_add_timer(tvec_base_t *base, struct timer_list *timer) void fastcall init_timer(struct timer_list *timer) { timer->entry.next = NULL; - timer->base = __raw_get_cpu_var(tvec_bases); + timer->base = per_cpu(tvec_bases, raw_smp_processor_id()); } EXPORT_SYMBOL(init_timer); @@ -377,7 +377,6 @@ int del_timer_sync(struct timer_list *timer) int ret = try_to_del_timer_sync(timer); if (ret >= 0) return ret; - cpu_relax(); } } @@ -387,19 +386,23 @@ EXPORT_SYMBOL(del_timer_sync); static int cascade(tvec_base_t *base, tvec_t *tv, int index) { /* cascade all the timers from tv up one level */ - struct timer_list *timer, *tmp; - struct list_head tv_list; - - list_replace_init(tv->vec + index, &tv_list); + struct list_head *head, *curr; + head = tv->vec + index; + curr = head->next; /* - * We are removing _all_ timers from the list, so we - * don't have to detach them individually. + * We are removing _all_ timers from the list, so we don't have to + * detach them individually, just clear the list afterwards. */ - list_for_each_entry_safe(timer, tmp, &tv_list, entry) { - BUG_ON(timer->base != base); - internal_add_timer(base, timer); + while (curr != head) { + struct timer_list *tmp; + + tmp = list_entry(curr, struct timer_list, entry); + BUG_ON(tmp->base != base); + curr = curr->next; + internal_add_timer(base, tmp); } + INIT_LIST_HEAD(head); return index; } @@ -411,7 +414,7 @@ static int cascade(tvec_base_t *base, tvec_t *tv, int index) * This function cascades all vectors and executes all expired timer * vectors. */ -#define INDEX(N) ((base->timer_jiffies >> (TVR_BITS + (N) * TVN_BITS)) & TVN_MASK) +#define INDEX(N) (base->timer_jiffies >> (TVR_BITS + N * TVN_BITS)) & TVN_MASK static inline void __run_timers(tvec_base_t *base) { @@ -419,10 +422,10 @@ static inline void __run_timers(tvec_base_t *base) spin_lock_irq(&base->lock); while (time_after_eq(jiffies, base->timer_jiffies)) { - struct list_head work_list; + struct list_head work_list = LIST_HEAD_INIT(work_list); struct list_head *head = &work_list; int index = base->timer_jiffies & TVR_MASK; - + /* * Cascade timers: */ @@ -431,8 +434,8 @@ static inline void __run_timers(tvec_base_t *base) (!cascade(base, &base->tv3, INDEX(1))) && !cascade(base, &base->tv4, INDEX(2))) cascade(base, &base->tv5, INDEX(3)); - ++base->timer_jiffies; - list_replace_init(base->tv1.vec + index, &work_list); + ++base->timer_jiffies; + list_splice_init(base->tv1.vec + index, &work_list); while (!list_empty(head)) { void (*fn)(unsigned long); unsigned long data; @@ -541,6 +544,22 @@ found: } spin_unlock(&base->lock); + /* + * It can happen that other CPUs service timer IRQs and increment + * jiffies, but we have not yet got a local timer tick to process + * the timer wheels. In that case, the expiry time can be before + * jiffies, but since the high-resolution timer here is relative to + * jiffies, the default expression when high-resolution timers are + * not active, + * + * time_before(MAX_JIFFY_OFFSET + jiffies, expires) + * + * would falsely evaluate to true. If that is the case, just + * return jiffies so that we can immediately fire the local timer + */ + if (time_before(expires, jiffies)) + return jiffies; + /* * It can happen that other CPUs service timer IRQs and increment * jiffies, but we have not yet got a local timer tick to process @@ -601,6 +620,7 @@ long time_tolerance = MAXFREQ; /* frequency tolerance (ppm) */ long time_precision = 1; /* clock precision (us) */ long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */ long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */ +static long time_phase; /* phase offset (scaled us) */ long time_freq = (((NSEC_PER_SEC + HZ/2) % HZ - HZ/2) << SHIFT_USEC) / NSEC_PER_USEC; /* frequency offset (scaled ppm)*/ static long time_adj; /* tick adjust (scaled 1 / HZ) */ @@ -750,14 +770,27 @@ static long adjtime_adjustment(void) } /* in the NTP reference this is called "hardclock()" */ -static void update_ntp_one_tick(void) +static void update_wall_time_one_tick(void) { - long time_adjust_step; + long time_adjust_step, delta_nsec; time_adjust_step = adjtime_adjustment(); if (time_adjust_step) /* Reduce by this step the amount of time left */ time_adjust -= time_adjust_step; + delta_nsec = tick_nsec + time_adjust_step * 1000; + /* + * Advance the phase, once it gets to one microsecond, then + * advance the tick more. + */ + time_phase += time_adj; + if ((time_phase >= FINENSEC) || (time_phase <= -FINENSEC)) { + long ltemp = shift_right(time_phase, (SHIFT_SCALE - 10)); + time_phase -= ltemp << (SHIFT_SCALE - 10); + delta_nsec += ltemp; + } + xtime.tv_nsec += delta_nsec; + time_interpolator_update(delta_nsec); /* Changes by adjtime() do not take effect till next tick. */ if (time_next_adjust != 0) { @@ -770,404 +803,36 @@ static void update_ntp_one_tick(void) * Return how long ticks are at the moment, that is, how much time * update_wall_time_one_tick will add to xtime next time we call it * (assuming no calls to do_adjtimex in the meantime). - * The return value is in fixed-point nanoseconds shifted by the - * specified number of bits to the right of the binary point. + * The return value is in fixed-point nanoseconds with SHIFT_SCALE-10 + * bits to the right of the binary point. * This function has no side-effects. */ u64 current_tick_length(void) { long delta_nsec; - u64 ret; - /* calculate the finest interval NTP will allow. - * ie: nanosecond value shifted by (SHIFT_SCALE - 10) - */ delta_nsec = tick_nsec + adjtime_adjustment() * 1000; - ret = (u64)delta_nsec << TICK_LENGTH_SHIFT; - ret += (s64)time_adj << (TICK_LENGTH_SHIFT - (SHIFT_SCALE - 10)); - - return ret; -} - -/* XXX - all of this timekeeping code should be later moved to time.c */ -#include -static struct clocksource *clock; /* pointer to current clocksource */ - -#ifdef CONFIG_GENERIC_TIME -/** - * __get_nsec_offset - Returns nanoseconds since last call to periodic_hook - * - * private function, must hold xtime_lock lock when being - * called. Returns the number of nanoseconds since the - * last call to update_wall_time() (adjusted by NTP scaling) - */ -static inline s64 __get_nsec_offset(void) -{ - cycle_t cycle_now, cycle_delta; - s64 ns_offset; - - /* read clocksource: */ - cycle_now = clocksource_read(clock); - - /* calculate the delta since the last update_wall_time: */ - cycle_delta = (cycle_now - clock->cycle_last) & clock->mask; - - /* convert to nanoseconds: */ - ns_offset = cyc2ns(clock, cycle_delta); - - return ns_offset; -} - -/** - * __get_realtime_clock_ts - Returns the time of day in a timespec - * @ts: pointer to the timespec to be set - * - * Returns the time of day in a timespec. Used by - * do_gettimeofday() and get_realtime_clock_ts(). - */ -static inline void __get_realtime_clock_ts(struct timespec *ts) -{ - unsigned long seq; - s64 nsecs; - - do { - seq = read_seqbegin(&xtime_lock); - - *ts = xtime; - nsecs = __get_nsec_offset(); - - } while (read_seqretry(&xtime_lock, seq)); - - timespec_add_ns(ts, nsecs); -} - -/** - * getnstimeofday - Returns the time of day in a timespec - * @ts: pointer to the timespec to be set - * - * Returns the time of day in a timespec. - */ -void getnstimeofday(struct timespec *ts) -{ - __get_realtime_clock_ts(ts); -} - -EXPORT_SYMBOL(getnstimeofday); - -/** - * do_gettimeofday - Returns the time of day in a timeval - * @tv: pointer to the timeval to be set - * - * NOTE: Users should be converted to using get_realtime_clock_ts() - */ -void do_gettimeofday(struct timeval *tv) -{ - struct timespec now; - - __get_realtime_clock_ts(&now); - tv->tv_sec = now.tv_sec; - tv->tv_usec = now.tv_nsec/1000; -} - -EXPORT_SYMBOL(do_gettimeofday); -/** - * do_settimeofday - Sets the time of day - * @tv: pointer to the timespec variable containing the new time - * - * Sets the time of day to the new time and update NTP and notify hrtimers - */ -int do_settimeofday(struct timespec *tv) -{ - unsigned long flags; - time_t wtm_sec, sec = tv->tv_sec; - long wtm_nsec, nsec = tv->tv_nsec; - - if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) - return -EINVAL; - - write_seqlock_irqsave(&xtime_lock, flags); - - nsec -= __get_nsec_offset(); - - wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); - wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); - - set_normalized_timespec(&xtime, sec, nsec); - set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); - - clock->error = 0; - ntp_clear(); - - write_sequnlock_irqrestore(&xtime_lock, flags); - - /* signal hrtimers about time change */ - clock_was_set(); - - return 0; -} - -EXPORT_SYMBOL(do_settimeofday); - -/** - * change_clocksource - Swaps clocksources if a new one is available - * - * Accumulates current time interval and initializes new clocksource - */ -static int change_clocksource(void) -{ - struct clocksource *new; - cycle_t now; - u64 nsec; - new = clocksource_get_next(); - if (clock != new) { - now = clocksource_read(new); - nsec = __get_nsec_offset(); - timespec_add_ns(&xtime, nsec); - - clock = new; - clock->cycle_last = now; - printk(KERN_INFO "Time: %s clocksource has been installed.\n", - clock->name); - return 1; - } else if (clock->update_callback) { - return clock->update_callback(); - } - return 0; -} -#else -#define change_clocksource() (0) -#endif - -/** - * timeofday_is_continuous - check to see if timekeeping is free running - */ -int timekeeping_is_continuous(void) -{ - unsigned long seq; - int ret; - - do { - seq = read_seqbegin(&xtime_lock); - - ret = clock->is_continuous; - - } while (read_seqretry(&xtime_lock, seq)); - - return ret; -} - -/* - * timekeeping_init - Initializes the clocksource and common timekeeping values - */ -void __init timekeeping_init(void) -{ - unsigned long flags; - - write_seqlock_irqsave(&xtime_lock, flags); - clock = clocksource_get_next(); - clocksource_calculate_interval(clock, tick_nsec); - clock->cycle_last = clocksource_read(clock); - ntp_clear(); - write_sequnlock_irqrestore(&xtime_lock, flags); -} - - -static int timekeeping_suspended; -/* - * timekeeping_resume - Resumes the generic timekeeping subsystem. - * @dev: unused - * - * This is for the generic clocksource timekeeping. - * xtime/wall_to_monotonic/jiffies/wall_jiffies/etc are - * still managed by arch specific suspend/resume code. - */ -static int timekeeping_resume(struct sys_device *dev) -{ - unsigned long flags; - - write_seqlock_irqsave(&xtime_lock, flags); - /* restart the last cycle value */ - clock->cycle_last = clocksource_read(clock); - clock->error = 0; - timekeeping_suspended = 0; - write_sequnlock_irqrestore(&xtime_lock, flags); - return 0; -} - -static int timekeeping_suspend(struct sys_device *dev, pm_message_t state) -{ - unsigned long flags; - - write_seqlock_irqsave(&xtime_lock, flags); - timekeeping_suspended = 1; - write_sequnlock_irqrestore(&xtime_lock, flags); - return 0; -} - -/* sysfs resume/suspend bits for timekeeping */ -static struct sysdev_class timekeeping_sysclass = { - .resume = timekeeping_resume, - .suspend = timekeeping_suspend, - set_kset_name("timekeeping"), -}; - -static struct sys_device device_timer = { - .id = 0, - .cls = &timekeeping_sysclass, -}; - -static int __init timekeeping_init_device(void) -{ - int error = sysdev_class_register(&timekeeping_sysclass); - if (!error) - error = sysdev_register(&device_timer); - return error; -} - -device_initcall(timekeeping_init_device); - -/* - * If the error is already larger, we look ahead even further - * to compensate for late or lost adjustments. - */ -static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, s64 *offset) -{ - s64 tick_error, i; - u32 look_ahead, adj; - s32 error2, mult; - - /* - * Use the current error value to determine how much to look ahead. - * The larger the error the slower we adjust for it to avoid problems - * with losing too many ticks, otherwise we would overadjust and - * produce an even larger error. The smaller the adjustment the - * faster we try to adjust for it, as lost ticks can do less harm - * here. This is tuned so that an error of about 1 msec is adusted - * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks). - */ - error2 = clock->error >> (TICK_LENGTH_SHIFT + 22 - 2 * SHIFT_HZ); - error2 = abs(error2); - for (look_ahead = 0; error2 > 0; look_ahead++) - error2 >>= 2; - - /* - * Now calculate the error in (1 << look_ahead) ticks, but first - * remove the single look ahead already included in the error. - */ - tick_error = current_tick_length() >> (TICK_LENGTH_SHIFT - clock->shift + 1); - tick_error -= clock->xtime_interval >> 1; - error = ((error - tick_error) >> look_ahead) + tick_error; - - /* Finally calculate the adjustment shift value. */ - i = *interval; - mult = 1; - if (error < 0) { - error = -error; - *interval = -*interval; - *offset = -*offset; - mult = -1; - } - for (adj = 0; error > i; adj++) - error >>= 1; - - *interval <<= adj; - *offset <<= adj; - return mult << adj; + return ((u64) delta_nsec << (SHIFT_SCALE - 10)) + time_adj; } /* - * Adjust the multiplier to reduce the error value, - * this is optimized for the most common adjustments of -1,0,1, - * for other values we can do a bit more work. + * Using a loop looks inefficient, but "ticks" is + * usually just one (we shouldn't be losing ticks, + * we're doing this this way mainly for interrupt + * latency reasons, not because we think we'll + * have lots of lost timer ticks */ -static void clocksource_adjust(struct clocksource *clock, s64 offset) +static void update_wall_time(unsigned long ticks) { - s64 error, interval = clock->cycle_interval; - int adj; - - error = clock->error >> (TICK_LENGTH_SHIFT - clock->shift - 1); - if (error > interval) { - error >>= 2; - if (likely(error <= interval)) - adj = 1; - else - adj = clocksource_bigadjust(error, &interval, &offset); - } else if (error < -interval) { - error >>= 2; - if (likely(error >= -interval)) { - adj = -1; - interval = -interval; - offset = -offset; - } else - adj = clocksource_bigadjust(error, &interval, &offset); - } else - return; - - clock->mult += adj; - clock->xtime_interval += interval; - clock->xtime_nsec -= offset; - clock->error -= (interval - offset) << (TICK_LENGTH_SHIFT - clock->shift); -} - -/* - * update_wall_time - Uses the current clocksource to increment the wall time - * - * Called from the timer interrupt, must hold a write on xtime_lock. - */ -static void update_wall_time(void) -{ - cycle_t offset; - - /* Make sure we're fully resumed: */ - if (unlikely(timekeeping_suspended)) - return; - -#ifdef CONFIG_GENERIC_TIME - offset = (clocksource_read(clock) - clock->cycle_last) & clock->mask; -#else - offset = clock->cycle_interval; -#endif - clock->xtime_nsec += (s64)xtime.tv_nsec << clock->shift; - - /* normally this loop will run just once, however in the - * case of lost or late ticks, it will accumulate correctly. - */ - while (offset >= clock->cycle_interval) { - /* accumulate one interval */ - clock->xtime_nsec += clock->xtime_interval; - clock->cycle_last += clock->cycle_interval; - offset -= clock->cycle_interval; - - if (clock->xtime_nsec >= (u64)NSEC_PER_SEC << clock->shift) { - clock->xtime_nsec -= (u64)NSEC_PER_SEC << clock->shift; + do { + ticks--; + update_wall_time_one_tick(); + if (xtime.tv_nsec >= 1000000000) { + xtime.tv_nsec -= 1000000000; xtime.tv_sec++; second_overflow(); } - - /* interpolator bits */ - time_interpolator_update(clock->xtime_interval - >> clock->shift); - /* increment the NTP state machine */ - update_ntp_one_tick(); - - /* accumulate error between NTP and clock interval */ - clock->error += current_tick_length(); - clock->error -= clock->xtime_interval << (TICK_LENGTH_SHIFT - clock->shift); - } - - /* correct the clock when NTP error is too big */ - clocksource_adjust(clock, offset); - - /* store full nanoseconds into xtime */ - xtime.tv_nsec = (s64)clock->xtime_nsec >> clock->shift; - clock->xtime_nsec -= (s64)xtime.tv_nsec << clock->shift; - - /* check to see if there is a new clocksource to use */ - if (change_clocksource()) { - clock->error = 0; - clock->xtime_nsec = 0; - clocksource_calculate_interval(clock, tick_nsec); - } + } while (ticks); } /* @@ -1238,7 +903,7 @@ unsigned long wall_jiffies = INITIAL_JIFFIES; * playing with xtime and avenrun. */ #ifndef ARCH_HAVE_XTIME_LOCK -__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock); +seqlock_t xtime_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED; EXPORT_SYMBOL(xtime_lock); #endif @@ -1273,8 +938,10 @@ static inline void update_times(void) unsigned long ticks; ticks = jiffies - wall_jiffies; - wall_jiffies += ticks; - update_wall_time(); + if (ticks) { + wall_jiffies += ticks; + update_wall_time(ticks); + } calc_load(ticks); } @@ -1378,7 +1045,7 @@ asmlinkage long sys_getegid(void) static void process_timeout(unsigned long __data) { - wake_up_process((struct task_struct *)__data); + wake_up_process((task_t *)__data); } /** @@ -1571,13 +1238,6 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info) return 0; } -/* - * lockdep: we want to track each per-CPU base as a separate lock-class, - * but timer-bases are kmalloc()-ed, so we need to attach separate - * keys to them: - */ -static struct lock_class_key base_lock_keys[NR_CPUS]; - static int __devinit init_timers_cpu(int cpu) { int j; @@ -1613,8 +1273,6 @@ static int __devinit init_timers_cpu(int cpu) } spin_lock_init(&base->lock); - lockdep_set_class(&base->lock, base_lock_keys + cpu); - for (j = 0; j < TVN_SIZE; j++) { INIT_LIST_HEAD(base->tv5.vec + j); INIT_LIST_HEAD(base->tv4.vec + j); @@ -1673,7 +1331,7 @@ static void __devinit migrate_timers(int cpu) } #endif /* CONFIG_HOTPLUG_CPU */ -static int __cpuinit timer_cpu_notify(struct notifier_block *self, +static int timer_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { long cpu = (long)hcpu; @@ -1693,7 +1351,7 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata timers_nb = { +static struct notifier_block timers_nb = { .notifier_call = timer_cpu_notify, }; diff --git a/kernel/unwind.c b/kernel/unwind.c deleted file mode 100644 index 47281af3f..000000000 --- a/kernel/unwind.c +++ /dev/null @@ -1,920 +0,0 @@ -/* - * Copyright (C) 2002-2006 Novell, Inc. - * Jan Beulich - * This code is released under version 2 of the GNU GPL. - * - * A simple API for unwinding kernel stacks. This is used for - * debugging and error reporting purposes. The kernel doesn't need - * full-blown stack unwinding with all the bells and whistles, so there - * is not much point in implementing the full Dwarf2 unwind API. - */ - -#include -#include -#include -#include -#include -#include -#include - -extern char __start_unwind[], __end_unwind[]; - -#define MAX_STACK_DEPTH 8 - -#define EXTRA_INFO(f) { \ - BUILD_BUG_ON_ZERO(offsetof(struct unwind_frame_info, f) \ - % FIELD_SIZEOF(struct unwind_frame_info, f)) \ - + offsetof(struct unwind_frame_info, f) \ - / FIELD_SIZEOF(struct unwind_frame_info, f), \ - FIELD_SIZEOF(struct unwind_frame_info, f) \ - } -#define PTREGS_INFO(f) EXTRA_INFO(regs.f) - -static const struct { - unsigned offs:BITS_PER_LONG / 2; - unsigned width:BITS_PER_LONG / 2; -} reg_info[] = { - UNW_REGISTER_INFO -}; - -#undef PTREGS_INFO -#undef EXTRA_INFO - -#ifndef REG_INVALID -#define REG_INVALID(r) (reg_info[r].width == 0) -#endif - -#define DW_CFA_nop 0x00 -#define DW_CFA_set_loc 0x01 -#define DW_CFA_advance_loc1 0x02 -#define DW_CFA_advance_loc2 0x03 -#define DW_CFA_advance_loc4 0x04 -#define DW_CFA_offset_extended 0x05 -#define DW_CFA_restore_extended 0x06 -#define DW_CFA_undefined 0x07 -#define DW_CFA_same_value 0x08 -#define DW_CFA_register 0x09 -#define DW_CFA_remember_state 0x0a -#define DW_CFA_restore_state 0x0b -#define DW_CFA_def_cfa 0x0c -#define DW_CFA_def_cfa_register 0x0d -#define DW_CFA_def_cfa_offset 0x0e -#define DW_CFA_def_cfa_expression 0x0f -#define DW_CFA_expression 0x10 -#define DW_CFA_offset_extended_sf 0x11 -#define DW_CFA_def_cfa_sf 0x12 -#define DW_CFA_def_cfa_offset_sf 0x13 -#define DW_CFA_val_offset 0x14 -#define DW_CFA_val_offset_sf 0x15 -#define DW_CFA_val_expression 0x16 -#define DW_CFA_lo_user 0x1c -#define DW_CFA_GNU_window_save 0x2d -#define DW_CFA_GNU_args_size 0x2e -#define DW_CFA_GNU_negative_offset_extended 0x2f -#define DW_CFA_hi_user 0x3f - -#define DW_EH_PE_FORM 0x07 -#define DW_EH_PE_native 0x00 -#define DW_EH_PE_leb128 0x01 -#define DW_EH_PE_data2 0x02 -#define DW_EH_PE_data4 0x03 -#define DW_EH_PE_data8 0x04 -#define DW_EH_PE_signed 0x08 -#define DW_EH_PE_ADJUST 0x70 -#define DW_EH_PE_abs 0x00 -#define DW_EH_PE_pcrel 0x10 -#define DW_EH_PE_textrel 0x20 -#define DW_EH_PE_datarel 0x30 -#define DW_EH_PE_funcrel 0x40 -#define DW_EH_PE_aligned 0x50 -#define DW_EH_PE_indirect 0x80 -#define DW_EH_PE_omit 0xff - -typedef unsigned long uleb128_t; -typedef signed long sleb128_t; - -static struct unwind_table { - struct { - unsigned long pc; - unsigned long range; - } core, init; - const void *address; - unsigned long size; - struct unwind_table *link; - const char *name; -} root_table; - -struct unwind_item { - enum item_location { - Nowhere, - Memory, - Register, - Value - } where; - uleb128_t value; -}; - -struct unwind_state { - uleb128_t loc, org; - const u8 *cieStart, *cieEnd; - uleb128_t codeAlign; - sleb128_t dataAlign; - struct cfa { - uleb128_t reg, offs; - } cfa; - struct unwind_item regs[ARRAY_SIZE(reg_info)]; - unsigned stackDepth:8; - unsigned version:8; - const u8 *label; - const u8 *stack[MAX_STACK_DEPTH]; -}; - -static const struct cfa badCFA = { ARRAY_SIZE(reg_info), 1 }; - -static struct unwind_table *find_table(unsigned long pc) -{ - struct unwind_table *table; - - for (table = &root_table; table; table = table->link) - if ((pc >= table->core.pc - && pc < table->core.pc + table->core.range) - || (pc >= table->init.pc - && pc < table->init.pc + table->init.range)) - break; - - return table; -} - -static void init_unwind_table(struct unwind_table *table, - const char *name, - const void *core_start, - unsigned long core_size, - const void *init_start, - unsigned long init_size, - const void *table_start, - unsigned long table_size) -{ - table->core.pc = (unsigned long)core_start; - table->core.range = core_size; - table->init.pc = (unsigned long)init_start; - table->init.range = init_size; - table->address = table_start; - table->size = table_size; - table->link = NULL; - table->name = name; -} - -void __init unwind_init(void) -{ - init_unwind_table(&root_table, "kernel", - _text, _end - _text, - NULL, 0, - __start_unwind, __end_unwind - __start_unwind); -} - -#ifdef CONFIG_MODULES - -static struct unwind_table *last_table; - -/* Must be called with module_mutex held. */ -void *unwind_add_table(struct module *module, - const void *table_start, - unsigned long table_size) -{ - struct unwind_table *table; - - if (table_size <= 0) - return NULL; - - table = kmalloc(sizeof(*table), GFP_KERNEL); - if (!table) - return NULL; - - init_unwind_table(table, module->name, - module->module_core, module->core_size, - module->module_init, module->init_size, - table_start, table_size); - - if (last_table) - last_table->link = table; - else - root_table.link = table; - last_table = table; - - return table; -} - -struct unlink_table_info -{ - struct unwind_table *table; - int init_only; -}; - -static int unlink_table(void *arg) -{ - struct unlink_table_info *info = arg; - struct unwind_table *table = info->table, *prev; - - for (prev = &root_table; prev->link && prev->link != table; prev = prev->link) - ; - - if (prev->link) { - if (info->init_only) { - table->init.pc = 0; - table->init.range = 0; - info->table = NULL; - } else { - prev->link = table->link; - if (!prev->link) - last_table = prev; - } - } else - info->table = NULL; - - return 0; -} - -/* Must be called with module_mutex held. */ -void unwind_remove_table(void *handle, int init_only) -{ - struct unwind_table *table = handle; - struct unlink_table_info info; - - if (!table || table == &root_table) - return; - - if (init_only && table == last_table) { - table->init.pc = 0; - table->init.range = 0; - return; - } - - info.table = table; - info.init_only = init_only; - stop_machine_run(unlink_table, &info, NR_CPUS); - - if (info.table) - kfree(table); -} - -#endif /* CONFIG_MODULES */ - -static uleb128_t get_uleb128(const u8 **pcur, const u8 *end) -{ - const u8 *cur = *pcur; - uleb128_t value; - unsigned shift; - - for (shift = 0, value = 0; cur < end; shift += 7) { - if (shift + 7 > 8 * sizeof(value) - && (*cur & 0x7fU) >= (1U << (8 * sizeof(value) - shift))) { - cur = end + 1; - break; - } - value |= (uleb128_t)(*cur & 0x7f) << shift; - if (!(*cur++ & 0x80)) - break; - } - *pcur = cur; - - return value; -} - -static sleb128_t get_sleb128(const u8 **pcur, const u8 *end) -{ - const u8 *cur = *pcur; - sleb128_t value; - unsigned shift; - - for (shift = 0, value = 0; cur < end; shift += 7) { - if (shift + 7 > 8 * sizeof(value) - && (*cur & 0x7fU) >= (1U << (8 * sizeof(value) - shift))) { - cur = end + 1; - break; - } - value |= (sleb128_t)(*cur & 0x7f) << shift; - if (!(*cur & 0x80)) { - value |= -(*cur++ & 0x40) << shift; - break; - } - } - *pcur = cur; - - return value; -} - -static unsigned long read_pointer(const u8 **pLoc, - const void *end, - signed ptrType) -{ - unsigned long value = 0; - union { - const u8 *p8; - const u16 *p16u; - const s16 *p16s; - const u32 *p32u; - const s32 *p32s; - const unsigned long *pul; - } ptr; - - if (ptrType < 0 || ptrType == DW_EH_PE_omit) - return 0; - ptr.p8 = *pLoc; - switch(ptrType & DW_EH_PE_FORM) { - case DW_EH_PE_data2: - if (end < (const void *)(ptr.p16u + 1)) - return 0; - if(ptrType & DW_EH_PE_signed) - value = get_unaligned(ptr.p16s++); - else - value = get_unaligned(ptr.p16u++); - break; - case DW_EH_PE_data4: -#ifdef CONFIG_64BIT - if (end < (const void *)(ptr.p32u + 1)) - return 0; - if(ptrType & DW_EH_PE_signed) - value = get_unaligned(ptr.p32s++); - else - value = get_unaligned(ptr.p32u++); - break; - case DW_EH_PE_data8: - BUILD_BUG_ON(sizeof(u64) != sizeof(value)); -#else - BUILD_BUG_ON(sizeof(u32) != sizeof(value)); -#endif - case DW_EH_PE_native: - if (end < (const void *)(ptr.pul + 1)) - return 0; - value = get_unaligned(ptr.pul++); - break; - case DW_EH_PE_leb128: - BUILD_BUG_ON(sizeof(uleb128_t) > sizeof(value)); - value = ptrType & DW_EH_PE_signed - ? get_sleb128(&ptr.p8, end) - : get_uleb128(&ptr.p8, end); - if ((const void *)ptr.p8 > end) - return 0; - break; - default: - return 0; - } - switch(ptrType & DW_EH_PE_ADJUST) { - case DW_EH_PE_abs: - break; - case DW_EH_PE_pcrel: - value += (unsigned long)*pLoc; - break; - default: - return 0; - } - if ((ptrType & DW_EH_PE_indirect) - && __get_user(value, (unsigned long *)value)) - return 0; - *pLoc = ptr.p8; - - return value; -} - -static signed fde_pointer_type(const u32 *cie) -{ - const u8 *ptr = (const u8 *)(cie + 2); - unsigned version = *ptr; - - if (version != 1) - return -1; /* unsupported */ - if (*++ptr) { - const char *aug; - const u8 *end = (const u8 *)(cie + 1) + *cie; - uleb128_t len; - - /* check if augmentation size is first (and thus present) */ - if (*ptr != 'z') - return -1; - /* check if augmentation string is nul-terminated */ - if ((ptr = memchr(aug = (const void *)ptr, 0, end - ptr)) == NULL) - return -1; - ++ptr; /* skip terminator */ - get_uleb128(&ptr, end); /* skip code alignment */ - get_sleb128(&ptr, end); /* skip data alignment */ - /* skip return address column */ - version <= 1 ? (void)++ptr : (void)get_uleb128(&ptr, end); - len = get_uleb128(&ptr, end); /* augmentation length */ - if (ptr + len < ptr || ptr + len > end) - return -1; - end = ptr + len; - while (*++aug) { - if (ptr >= end) - return -1; - switch(*aug) { - case 'L': - ++ptr; - break; - case 'P': { - signed ptrType = *ptr++; - - if (!read_pointer(&ptr, end, ptrType) || ptr > end) - return -1; - } - break; - case 'R': - return *ptr; - default: - return -1; - } - } - } - return DW_EH_PE_native|DW_EH_PE_abs; -} - -static int advance_loc(unsigned long delta, struct unwind_state *state) -{ - state->loc += delta * state->codeAlign; - - return delta > 0; -} - -static void set_rule(uleb128_t reg, - enum item_location where, - uleb128_t value, - struct unwind_state *state) -{ - if (reg < ARRAY_SIZE(state->regs)) { - state->regs[reg].where = where; - state->regs[reg].value = value; - } -} - -static int processCFI(const u8 *start, - const u8 *end, - unsigned long targetLoc, - signed ptrType, - struct unwind_state *state) -{ - union { - const u8 *p8; - const u16 *p16; - const u32 *p32; - } ptr; - int result = 1; - - if (start != state->cieStart) { - state->loc = state->org; - result = processCFI(state->cieStart, state->cieEnd, 0, ptrType, state); - if (targetLoc == 0 && state->label == NULL) - return result; - } - for (ptr.p8 = start; result && ptr.p8 < end; ) { - switch(*ptr.p8 >> 6) { - uleb128_t value; - - case 0: - switch(*ptr.p8++) { - case DW_CFA_nop: - break; - case DW_CFA_set_loc: - if ((state->loc = read_pointer(&ptr.p8, end, ptrType)) == 0) - result = 0; - break; - case DW_CFA_advance_loc1: - result = ptr.p8 < end && advance_loc(*ptr.p8++, state); - break; - case DW_CFA_advance_loc2: - result = ptr.p8 <= end + 2 - && advance_loc(*ptr.p16++, state); - break; - case DW_CFA_advance_loc4: - result = ptr.p8 <= end + 4 - && advance_loc(*ptr.p32++, state); - break; - case DW_CFA_offset_extended: - value = get_uleb128(&ptr.p8, end); - set_rule(value, Memory, get_uleb128(&ptr.p8, end), state); - break; - case DW_CFA_val_offset: - value = get_uleb128(&ptr.p8, end); - set_rule(value, Value, get_uleb128(&ptr.p8, end), state); - break; - case DW_CFA_offset_extended_sf: - value = get_uleb128(&ptr.p8, end); - set_rule(value, Memory, get_sleb128(&ptr.p8, end), state); - break; - case DW_CFA_val_offset_sf: - value = get_uleb128(&ptr.p8, end); - set_rule(value, Value, get_sleb128(&ptr.p8, end), state); - break; - case DW_CFA_restore_extended: - case DW_CFA_undefined: - case DW_CFA_same_value: - set_rule(get_uleb128(&ptr.p8, end), Nowhere, 0, state); - break; - case DW_CFA_register: - value = get_uleb128(&ptr.p8, end); - set_rule(value, - Register, - get_uleb128(&ptr.p8, end), state); - break; - case DW_CFA_remember_state: - if (ptr.p8 == state->label) { - state->label = NULL; - return 1; - } - if (state->stackDepth >= MAX_STACK_DEPTH) - return 0; - state->stack[state->stackDepth++] = ptr.p8; - break; - case DW_CFA_restore_state: - if (state->stackDepth) { - const uleb128_t loc = state->loc; - const u8 *label = state->label; - - state->label = state->stack[state->stackDepth - 1]; - memcpy(&state->cfa, &badCFA, sizeof(state->cfa)); - memset(state->regs, 0, sizeof(state->regs)); - state->stackDepth = 0; - result = processCFI(start, end, 0, ptrType, state); - state->loc = loc; - state->label = label; - } else - return 0; - break; - case DW_CFA_def_cfa: - state->cfa.reg = get_uleb128(&ptr.p8, end); - /*nobreak*/ - case DW_CFA_def_cfa_offset: - state->cfa.offs = get_uleb128(&ptr.p8, end); - break; - case DW_CFA_def_cfa_sf: - state->cfa.reg = get_uleb128(&ptr.p8, end); - /*nobreak*/ - case DW_CFA_def_cfa_offset_sf: - state->cfa.offs = get_sleb128(&ptr.p8, end) - * state->dataAlign; - break; - case DW_CFA_def_cfa_register: - state->cfa.reg = get_uleb128(&ptr.p8, end); - break; - /*todo case DW_CFA_def_cfa_expression: */ - /*todo case DW_CFA_expression: */ - /*todo case DW_CFA_val_expression: */ - case DW_CFA_GNU_args_size: - get_uleb128(&ptr.p8, end); - break; - case DW_CFA_GNU_negative_offset_extended: - value = get_uleb128(&ptr.p8, end); - set_rule(value, - Memory, - (uleb128_t)0 - get_uleb128(&ptr.p8, end), state); - break; - case DW_CFA_GNU_window_save: - default: - result = 0; - break; - } - break; - case 1: - result = advance_loc(*ptr.p8++ & 0x3f, state); - break; - case 2: - value = *ptr.p8++ & 0x3f; - set_rule(value, Memory, get_uleb128(&ptr.p8, end), state); - break; - case 3: - set_rule(*ptr.p8++ & 0x3f, Nowhere, 0, state); - break; - } - if (ptr.p8 > end) - result = 0; - if (result && targetLoc != 0 && targetLoc < state->loc) - return 1; - } - - return result - && ptr.p8 == end - && (targetLoc == 0 - || (/*todo While in theory this should apply, gcc in practice omits - everything past the function prolog, and hence the location - never reaches the end of the function. - targetLoc < state->loc &&*/ state->label == NULL)); -} - -/* Unwind to previous to frame. Returns 0 if successful, negative - * number in case of an error. */ -int unwind(struct unwind_frame_info *frame) -{ -#define FRAME_REG(r, t) (((t *)frame)[reg_info[r].offs]) - const u32 *fde = NULL, *cie = NULL; - const u8 *ptr = NULL, *end = NULL; - unsigned long startLoc = 0, endLoc = 0, cfa; - unsigned i; - signed ptrType = -1; - uleb128_t retAddrReg = 0; - struct unwind_table *table; - struct unwind_state state; - - if (UNW_PC(frame) == 0) - return -EINVAL; - if ((table = find_table(UNW_PC(frame))) != NULL - && !(table->size & (sizeof(*fde) - 1))) { - unsigned long tableSize = table->size; - - for (fde = table->address; - tableSize > sizeof(*fde) && tableSize - sizeof(*fde) >= *fde; - tableSize -= sizeof(*fde) + *fde, - fde += 1 + *fde / sizeof(*fde)) { - if (!*fde || (*fde & (sizeof(*fde) - 1))) - break; - if (!fde[1]) - continue; /* this is a CIE */ - if ((fde[1] & (sizeof(*fde) - 1)) - || fde[1] > (unsigned long)(fde + 1) - - (unsigned long)table->address) - continue; /* this is not a valid FDE */ - cie = fde + 1 - fde[1] / sizeof(*fde); - if (*cie <= sizeof(*cie) + 4 - || *cie >= fde[1] - sizeof(*fde) - || (*cie & (sizeof(*cie) - 1)) - || cie[1] - || (ptrType = fde_pointer_type(cie)) < 0) { - cie = NULL; /* this is not a (valid) CIE */ - continue; - } - ptr = (const u8 *)(fde + 2); - startLoc = read_pointer(&ptr, - (const u8 *)(fde + 1) + *fde, - ptrType); - endLoc = startLoc - + read_pointer(&ptr, - (const u8 *)(fde + 1) + *fde, - ptrType & DW_EH_PE_indirect - ? ptrType - : ptrType & (DW_EH_PE_FORM|DW_EH_PE_signed)); - if (UNW_PC(frame) >= startLoc && UNW_PC(frame) < endLoc) - break; - cie = NULL; - } - } - if (cie != NULL) { - memset(&state, 0, sizeof(state)); - state.cieEnd = ptr; /* keep here temporarily */ - ptr = (const u8 *)(cie + 2); - end = (const u8 *)(cie + 1) + *cie; - if ((state.version = *ptr) != 1) - cie = NULL; /* unsupported version */ - else if (*++ptr) { - /* check if augmentation size is first (and thus present) */ - if (*ptr == 'z') { - /* check for ignorable (or already handled) - * nul-terminated augmentation string */ - while (++ptr < end && *ptr) - if (strchr("LPR", *ptr) == NULL) - break; - } - if (ptr >= end || *ptr) - cie = NULL; - } - ++ptr; - } - if (cie != NULL) { - /* get code aligment factor */ - state.codeAlign = get_uleb128(&ptr, end); - /* get data aligment factor */ - state.dataAlign = get_sleb128(&ptr, end); - if (state.codeAlign == 0 || state.dataAlign == 0 || ptr >= end) - cie = NULL; - else { - retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); - /* skip augmentation */ - if (((const char *)(cie + 2))[1] == 'z') - ptr += get_uleb128(&ptr, end); - if (ptr > end - || retAddrReg >= ARRAY_SIZE(reg_info) - || REG_INVALID(retAddrReg) - || reg_info[retAddrReg].width != sizeof(unsigned long)) - cie = NULL; - } - } - if (cie != NULL) { - state.cieStart = ptr; - ptr = state.cieEnd; - state.cieEnd = end; - end = (const u8 *)(fde + 1) + *fde; - /* skip augmentation */ - if (((const char *)(cie + 2))[1] == 'z') { - uleb128_t augSize = get_uleb128(&ptr, end); - - if ((ptr += augSize) > end) - fde = NULL; - } - } - if (cie == NULL || fde == NULL) { -#ifdef CONFIG_FRAME_POINTER - unsigned long top, bottom; -#endif - -#ifdef CONFIG_FRAME_POINTER - top = STACK_TOP(frame->task); - bottom = STACK_BOTTOM(frame->task); -# if FRAME_RETADDR_OFFSET < 0 - if (UNW_SP(frame) < top - && UNW_FP(frame) <= UNW_SP(frame) - && bottom < UNW_FP(frame) -# else - if (UNW_SP(frame) > top - && UNW_FP(frame) >= UNW_SP(frame) - && bottom > UNW_FP(frame) -# endif - && !((UNW_SP(frame) | UNW_FP(frame)) - & (sizeof(unsigned long) - 1))) { - unsigned long link; - - if (!__get_user(link, - (unsigned long *)(UNW_FP(frame) - + FRAME_LINK_OFFSET)) -# if FRAME_RETADDR_OFFSET < 0 - && link > bottom && link < UNW_FP(frame) -# else - && link > UNW_FP(frame) && link < bottom -# endif - && !(link & (sizeof(link) - 1)) - && !__get_user(UNW_PC(frame), - (unsigned long *)(UNW_FP(frame) - + FRAME_RETADDR_OFFSET))) { - UNW_SP(frame) = UNW_FP(frame) + FRAME_RETADDR_OFFSET -# if FRAME_RETADDR_OFFSET < 0 - - -# else - + -# endif - sizeof(UNW_PC(frame)); - UNW_FP(frame) = link; - return 0; - } - } -#endif - return -ENXIO; - } - state.org = startLoc; - memcpy(&state.cfa, &badCFA, sizeof(state.cfa)); - /* process instructions */ - if (!processCFI(ptr, end, UNW_PC(frame), ptrType, &state) - || state.loc > endLoc - || state.regs[retAddrReg].where == Nowhere - || state.cfa.reg >= ARRAY_SIZE(reg_info) - || reg_info[state.cfa.reg].width != sizeof(unsigned long) - || state.cfa.offs % sizeof(unsigned long)) - return -EIO; - /* update frame */ - cfa = FRAME_REG(state.cfa.reg, unsigned long) + state.cfa.offs; - startLoc = min((unsigned long)UNW_SP(frame), cfa); - endLoc = max((unsigned long)UNW_SP(frame), cfa); - if (STACK_LIMIT(startLoc) != STACK_LIMIT(endLoc)) { - startLoc = min(STACK_LIMIT(cfa), cfa); - endLoc = max(STACK_LIMIT(cfa), cfa); - } -#ifndef CONFIG_64BIT -# define CASES CASE(8); CASE(16); CASE(32) -#else -# define CASES CASE(8); CASE(16); CASE(32); CASE(64) -#endif - for (i = 0; i < ARRAY_SIZE(state.regs); ++i) { - if (REG_INVALID(i)) { - if (state.regs[i].where == Nowhere) - continue; - return -EIO; - } - switch(state.regs[i].where) { - default: - break; - case Register: - if (state.regs[i].value >= ARRAY_SIZE(reg_info) - || REG_INVALID(state.regs[i].value) - || reg_info[i].width > reg_info[state.regs[i].value].width) - return -EIO; - switch(reg_info[state.regs[i].value].width) { -#define CASE(n) \ - case sizeof(u##n): \ - state.regs[i].value = FRAME_REG(state.regs[i].value, \ - const u##n); \ - break - CASES; -#undef CASE - default: - return -EIO; - } - break; - } - } - for (i = 0; i < ARRAY_SIZE(state.regs); ++i) { - if (REG_INVALID(i)) - continue; - switch(state.regs[i].where) { - case Nowhere: - if (reg_info[i].width != sizeof(UNW_SP(frame)) - || &FRAME_REG(i, __typeof__(UNW_SP(frame))) - != &UNW_SP(frame)) - continue; - UNW_SP(frame) = cfa; - break; - case Register: - switch(reg_info[i].width) { -#define CASE(n) case sizeof(u##n): \ - FRAME_REG(i, u##n) = state.regs[i].value; \ - break - CASES; -#undef CASE - default: - return -EIO; - } - break; - case Value: - if (reg_info[i].width != sizeof(unsigned long)) - return -EIO; - FRAME_REG(i, unsigned long) = cfa + state.regs[i].value - * state.dataAlign; - break; - case Memory: { - unsigned long addr = cfa + state.regs[i].value - * state.dataAlign; - - if ((state.regs[i].value * state.dataAlign) - % sizeof(unsigned long) - || addr < startLoc - || addr + sizeof(unsigned long) < addr - || addr + sizeof(unsigned long) > endLoc) - return -EIO; - switch(reg_info[i].width) { -#define CASE(n) case sizeof(u##n): \ - __get_user(FRAME_REG(i, u##n), (u##n *)addr); \ - break - CASES; -#undef CASE - default: - return -EIO; - } - } - break; - } - } - - return 0; -#undef CASES -#undef FRAME_REG -} -EXPORT_SYMBOL(unwind); - -int unwind_init_frame_info(struct unwind_frame_info *info, - struct task_struct *tsk, - /*const*/ struct pt_regs *regs) -{ - info->task = tsk; - arch_unw_init_frame_info(info, regs); - - return 0; -} -EXPORT_SYMBOL(unwind_init_frame_info); - -/* - * Prepare to unwind a blocked task. - */ -int unwind_init_blocked(struct unwind_frame_info *info, - struct task_struct *tsk) -{ - info->task = tsk; - arch_unw_init_blocked(info); - - return 0; -} -EXPORT_SYMBOL(unwind_init_blocked); - -/* - * Prepare to unwind the currently running thread. - */ -int unwind_init_running(struct unwind_frame_info *info, - asmlinkage int (*callback)(struct unwind_frame_info *, - void *arg), - void *arg) -{ - info->task = current; - - return arch_unwind_init_running(info, callback, arg); -} -EXPORT_SYMBOL(unwind_init_running); - -/* - * Unwind until the return pointer is in user-land (or until an error - * occurs). Returns 0 if successful, negative number in case of - * error. - */ -int unwind_to_user(struct unwind_frame_info *info) -{ - while (!arch_unw_user_mode(info)) { - int err = unwind(info); - - if (err < 0) - return err; - } - - return 0; -} -EXPORT_SYMBOL(unwind_to_user); diff --git a/kernel/user.c b/kernel/user.c index 640ee48c8..bcbd0b363 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -141,7 +141,7 @@ struct user_struct * alloc_uid(xid_t xid, uid_t uid) atomic_set(&new->processes, 0); atomic_set(&new->files, 0); atomic_set(&new->sigpending, 0); -#ifdef CONFIG_INOTIFY_USER +#ifdef CONFIG_INOTIFY atomic_set(&new->inotify_watches, 0); atomic_set(&new->inotify_devs, 0); #endif @@ -149,7 +149,7 @@ struct user_struct * alloc_uid(xid_t xid, uid_t uid) new->mq_bytes = 0; new->locked_shm = 0; - if (alloc_uid_keyring(new, current) < 0) { + if (alloc_uid_keyring(new) < 0) { kmem_cache_free(uid_cachep, new); return NULL; } diff --git a/kernel/vserver/Kconfig b/kernel/vserver/Kconfig index 1959ab5c4..9fc27a3c3 100644 --- a/kernel/vserver/Kconfig +++ b/kernel/vserver/Kconfig @@ -38,14 +38,14 @@ config VSERVER_LEGACY_VERSION so better avoid it, unless you really, really need it for backwards compatibility. -config VSERVER_LEGACYNET - bool "Enable Legacy Networking Kernel API" - default y +config VSERVER_NGNET + bool "Disable Legacy Networking Kernel API" + depends on EXPERIMENTAL + default n help - This enables the legacy networking API which is required - by the chbind tool (for util-vserver versions prior to - 0.30.210). If you use an older version, don't disable - this option. + This disables the legacy networking API which is required + by the chbind tool. Do not disable it unless you exactly + know what you are doing. config VSERVER_REMAP_SADDR bool "Remap Source IP Address" @@ -198,8 +198,8 @@ config VSERVER_SECURITY default y select SECURITY_CAPABILITIES -config VSERVER_NGNET +config VSERVER_LEGACYNET bool - depends on EXPERIMENTAL && !VSERVER_LEGACYNET + depends on !VSERVER_NGNET default y diff --git a/kernel/vserver/context.c b/kernel/vserver/context.c index d24d0144b..c80df75e9 100644 --- a/kernel/vserver/context.c +++ b/kernel/vserver/context.c @@ -16,7 +16,6 @@ * V0.09 revert to non RCU for now * V0.10 and back to working RCU hash * V0.11 and back to locking again - * V0.12 have __create claim() the vxi * */ @@ -196,9 +195,9 @@ static inline void __hash_vx_info(struct vx_info *vxi) static inline void __unhash_vx_info(struct vx_info *vxi) { + vxd_assert_lock(&vx_info_hash_lock); vxdprintk(VXD_CBIT(xid, 4), "__unhash_vx_info: %p[#%d]", vxi, vxi->vx_id); - spin_lock(&vx_info_hash_lock); vxh_unhash_vx_info(vxi); /* context must be hashed */ @@ -206,7 +205,6 @@ static inline void __unhash_vx_info(struct vx_info *vxi) vxi->vx_state &= ~VXS_HASHED; hlist_del(&vxi->vx_hlist); - spin_unlock(&vx_info_hash_lock); } @@ -328,7 +326,7 @@ out_unlock: /* __create_vx_info() * create the requested context - * get(), claim() and hash it */ + * get() and hash it */ static struct vx_info * __create_vx_info(int id) { @@ -373,7 +371,6 @@ static struct vx_info * __create_vx_info(int id) /* new context */ vxdprintk(VXD_CBIT(xid, 0), "create_vx_info(%d) = %p (new)", id, new); - claim_vx_info(new, NULL); __hash_vx_info(get_vx_info(new)); vxi = new, new = NULL; @@ -392,7 +389,9 @@ out_unlock: void unhash_vx_info(struct vx_info *vxi) { __shutdown_vx_info(vxi); + spin_lock(&vx_info_hash_lock); __unhash_vx_info(vxi); + spin_unlock(&vx_info_hash_lock); __wakeup_vx_info(vxi); } @@ -637,7 +636,7 @@ void vx_set_persistent(struct vx_info *vxi) "vx_set_persistent(%p[#%d])", vxi, vxi->vx_id); get_vx_info(vxi); - claim_vx_info(vxi, NULL); + claim_vx_info(vxi, current); } void vx_clear_persistent(struct vx_info *vxi) @@ -645,7 +644,7 @@ void vx_clear_persistent(struct vx_info *vxi) vxdprintk(VXD_CBIT(xid, 6), "vx_clear_persistent(%p[#%d])", vxi, vxi->vx_id); - release_vx_info(vxi, NULL); + release_vx_info(vxi, current); put_vx_info(vxi); } @@ -669,19 +668,11 @@ void exit_vx_info(struct task_struct *p, int code) vx_nproc_dec(p); vxi->exit_code = code; - release_vx_info(vxi, p); - } -} - -void exit_vx_info_early(struct task_struct *p, int code) -{ - struct vx_info *vxi = p->vx_info; - - if (vxi) { if (vxi->vx_initpid == p->tgid) vx_exit_init(vxi, p, code); if (vxi->vx_reaper == p) vx_set_reaper(vxi, child_reaper); + release_vx_info(vxi, p); } } @@ -763,22 +754,26 @@ int vc_ctx_create(uint32_t xid, void __user *data) /* initial flags */ new_vxi->vx_flags = vc_data.flagword; + /* get a reference for persistent contexts */ + if ((vc_data.flagword & VXF_PERSISTENT)) + vx_set_persistent(new_vxi); + ret = -ENOEXEC; if (vs_state_change(new_vxi, VSC_STARTUP)) - goto out; - + goto out_unhash; ret = vx_migrate_task(current, new_vxi); - if (ret) + if (!ret) { + /* return context id on success */ + ret = new_vxi->vx_id; goto out; - - /* return context id on success */ - ret = new_vxi->vx_id; - - /* get a reference for persistent contexts */ + } +out_unhash: + /* prepare for context disposal */ + new_vxi->vx_state |= VXS_SHUTDOWN; if ((vc_data.flagword & VXF_PERSISTENT)) - vx_set_persistent(new_vxi); + vx_clear_persistent(new_vxi); + __unhash_vx_info(new_vxi); out: - release_vx_info(new_vxi, NULL); put_vx_info(new_vxi); return ret; } diff --git a/kernel/vserver/cvirt_init.h b/kernel/vserver/cvirt_init.h index 42f5f96d9..52bd4da28 100644 --- a/kernel/vserver/cvirt_init.h +++ b/kernel/vserver/cvirt_init.h @@ -1,5 +1,8 @@ +#include + + extern uint64_t vx_idle_jiffies(void); static inline void vx_info_init_cvirt(struct _vx_cvirt *cvirt) diff --git a/kernel/vserver/history.c b/kernel/vserver/history.c index 79610c092..6e7e8b532 100644 --- a/kernel/vserver/history.c +++ b/kernel/vserver/history.c @@ -11,7 +11,6 @@ * */ -#include #include #include #include diff --git a/kernel/vserver/legacy.c b/kernel/vserver/legacy.c index c1cd17e56..8d67731f3 100644 --- a/kernel/vserver/legacy.c +++ b/kernel/vserver/legacy.c @@ -60,7 +60,9 @@ int vc_new_s_context(uint32_t ctx, void __user *data) return ret; } - if (!vx_check(0, VX_ADMIN) || !capable(CAP_SYS_ADMIN)) + if (!vx_check(0, VX_ADMIN) || !capable(CAP_SYS_ADMIN) + /* might make sense in the future, or not ... */ + || vx_flags(VX_INFO_LOCK, 0)) return -EPERM; /* ugly hack for Spectator */ diff --git a/kernel/vserver/legacynet.c b/kernel/vserver/legacynet.c index f490f3399..0e66a434b 100644 --- a/kernel/vserver/legacynet.c +++ b/kernel/vserver/legacynet.c @@ -78,7 +78,6 @@ int vc_set_ipv4root(uint32_t nbip, void __user *data) printk("!!! switching nx_info %p->%p\n", nxi, new_nxi); nx_migrate_task(current, new_nxi); - release_nx_info(new_nxi, NULL); put_nx_info(new_nxi); return 0; } diff --git a/kernel/vserver/limit.c b/kernel/vserver/limit.c index c97d57f81..c47f54c78 100644 --- a/kernel/vserver/limit.c +++ b/kernel/vserver/limit.c @@ -3,10 +3,9 @@ * * Virtual Server: Context Limits * - * Copyright (C) 2004-2006 Herbert Pötzl + * Copyright (C) 2004-2005 Herbert Pötzl * * V0.01 broken out from vcontext V0.05 - * V0.02 sync to valid limit check from 2.1.1 * */ @@ -41,33 +40,25 @@ const char *vlimit_name[NUM_LIMITS] = { EXPORT_SYMBOL_GPL(vlimit_name); -#define MASK_ENTRY(x) (1 << (x)) - -const struct vcmd_ctx_rlimit_mask_v0 vlimit_mask = { - /* minimum */ - 0 - , /* softlimit */ - 0 - , /* maximum */ - MASK_ENTRY( RLIMIT_RSS ) | - MASK_ENTRY( RLIMIT_NPROC ) | - MASK_ENTRY( RLIMIT_NOFILE ) | - MASK_ENTRY( RLIMIT_MEMLOCK ) | - MASK_ENTRY( RLIMIT_AS ) | - MASK_ENTRY( RLIMIT_LOCKS ) | - MASK_ENTRY( RLIMIT_MSGQUEUE ) | - - MASK_ENTRY( VLIMIT_ANON ) | - MASK_ENTRY( VLIMIT_SHMEM ) | - 0 -}; - - -static int is_valid_vlimit(int id) +static int is_valid_rlimit(int id) { - uint32_t mask = vlimit_mask.minimum | - vlimit_mask.softlimit | vlimit_mask.maximum; - return mask & (1 << id); + int valid = 0; + + switch (id) { + case RLIMIT_RSS: + case RLIMIT_NPROC: + case RLIMIT_NOFILE: + case RLIMIT_MEMLOCK: + case RLIMIT_AS: + + case VLIMIT_NSOCK: + case VLIMIT_OPENFD: + case VLIMIT_ANON: + case VLIMIT_SHMEM: + valid = 1; + break; + } + return valid; } static inline uint64_t vc_get_rlim(struct vx_info *vxi, int id) @@ -85,7 +76,7 @@ static int do_get_rlimit(xid_t xid, uint32_t id, { struct vx_info *vxi; - if (!is_valid_vlimit(id)) + if (!is_valid_rlimit(id)) return -EINVAL; vxi = lookup_vx_info(xid); @@ -125,7 +116,7 @@ static int do_set_rlimit(xid_t xid, uint32_t id, { struct vx_info *vxi; - if (!is_valid_vlimit(id)) + if (!is_valid_rlimit(id)) return -EINVAL; vxi = lookup_vx_info(xid); @@ -190,7 +181,25 @@ int vc_get_rlimit_x32(uint32_t id, void __user *data) int vc_get_rlimit_mask(uint32_t id, void __user *data) { - if (copy_to_user(data, &vlimit_mask, sizeof(vlimit_mask))) + static struct vcmd_ctx_rlimit_mask_v0 mask = { + /* minimum */ + 0 + , /* softlimit */ + 0 + , /* maximum */ + (1 << RLIMIT_RSS) | + (1 << RLIMIT_NPROC) | + (1 << RLIMIT_NOFILE) | + (1 << RLIMIT_MEMLOCK) | + (1 << RLIMIT_LOCKS) | + (1 << RLIMIT_AS) | + (1 << VLIMIT_ANON) | + 0 + }; + + if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RESOURCE)) + return -EPERM; + if (copy_to_user(data, &mask, sizeof(mask))) return -EFAULT; return 0; } diff --git a/kernel/vserver/limit_init.h b/kernel/vserver/limit_init.h index 522dec54b..bee92ef02 100644 --- a/kernel/vserver/limit_init.h +++ b/kernel/vserver/limit_init.h @@ -1,5 +1,8 @@ +#include + + static inline void vx_info_init_limit(struct _vx_limit *limit) { int lim; diff --git a/kernel/vserver/network.c b/kernel/vserver/network.c index 6674c638c..3a8eae14e 100644 --- a/kernel/vserver/network.c +++ b/kernel/vserver/network.c @@ -3,14 +3,13 @@ * * Virtual Server: Network Support * - * Copyright (C) 2003-2006 Herbert Pötzl + * Copyright (C) 2003-2005 Herbert Pötzl * * V0.01 broken out from vcontext V0.05 * V0.02 cleaned up implementation * V0.03 added equiv nx commands * V0.04 switch to RCU based hash * V0.05 and back to locking again - * V0.06 have __create claim() the nxi * */ @@ -140,16 +139,15 @@ static inline void __hash_nx_info(struct nx_info *nxi) static inline void __unhash_nx_info(struct nx_info *nxi) { + vxd_assert_lock(&nx_info_hash_lock); vxdprintk(VXD_CBIT(nid, 4), "__unhash_nx_info: %p[#%d]", nxi, nxi->nx_id); - spin_lock(&nx_info_hash_lock); /* context must be hashed */ BUG_ON(!nx_info_state(nxi, NXS_HASHED)); nxi->nx_state &= ~NXS_HASHED; hlist_del(&nxi->nx_hlist); - spin_unlock(&nx_info_hash_lock); } @@ -206,7 +204,7 @@ static inline nid_t __nx_dynamic_id(void) /* __create_nx_info() * create the requested context - * get(), claim() and hash it */ + * get() and hash it */ static struct nx_info * __create_nx_info(int id) { @@ -251,7 +249,6 @@ static struct nx_info * __create_nx_info(int id) /* new context */ vxdprintk(VXD_CBIT(nid, 0), "create_nx_info(%d) = %p (new)", id, new); - claim_nx_info(new, NULL); __hash_nx_info(get_nx_info(new)); nxi = new, new = NULL; @@ -270,7 +267,9 @@ out_unlock: void unhash_nx_info(struct nx_info *nxi) { __shutdown_nx_info(nxi); + spin_lock(&nx_info_hash_lock); __unhash_nx_info(nxi); + spin_unlock(&nx_info_hash_lock); } #ifdef CONFIG_VSERVER_LEGACYNET @@ -387,7 +386,6 @@ int nx_migrate_task(struct task_struct *p, struct nx_info *nxi) if (old_nxi) release_nx_info(old_nxi, p); - ret = 0; out: put_nx_info(old_nxi); return ret; @@ -490,11 +488,8 @@ int nx_addr_conflict(struct nx_info *nxi, uint32_t addr, struct sock *sk) void nx_set_persistent(struct nx_info *nxi) { - vxdprintk(VXD_CBIT(nid, 6), - "nx_set_persistent(%p[#%d])", nxi, nxi->nx_id); - get_nx_info(nxi); - claim_nx_info(nxi, NULL); + claim_nx_info(nxi, current); } void nx_clear_persistent(struct nx_info *nxi) @@ -502,7 +497,7 @@ void nx_clear_persistent(struct nx_info *nxi) vxdprintk(VXD_CBIT(nid, 6), "nx_clear_persistent(%p[#%d])", nxi, nxi->nx_id); - release_nx_info(nxi, NULL); + release_nx_info(nxi, current); put_nx_info(nxi); } @@ -590,22 +585,26 @@ int vc_net_create(uint32_t nid, void __user *data) /* initial flags */ new_nxi->nx_flags = vc_data.flagword; + /* get a reference for persistent contexts */ + if ((vc_data.flagword & NXF_PERSISTENT)) + nx_set_persistent(new_nxi); + ret = -ENOEXEC; if (vs_net_change(new_nxi, VSC_NETUP)) - goto out; - + goto out_unhash; ret = nx_migrate_task(current, new_nxi); - if (ret) + if (!ret) { + /* return context id on success */ + ret = new_nxi->nx_id; goto out; - - /* return context id on success */ - ret = new_nxi->nx_id; - - /* get a reference for persistent contexts */ + } +out_unhash: + /* prepare for context disposal */ + new_nxi->nx_state |= NXS_SHUTDOWN; if ((vc_data.flagword & NXF_PERSISTENT)) - nx_set_persistent(new_nxi); + nx_clear_persistent(new_nxi); + __unhash_nx_info(new_nxi); out: - release_nx_info(new_nxi, NULL); put_nx_info(new_nxi); return ret; } diff --git a/kernel/vserver/proc.c b/kernel/vserver/proc.c index 19b2cc66a..3d27dd8a3 100644 --- a/kernel/vserver/proc.c +++ b/kernel/vserver/proc.c @@ -217,10 +217,8 @@ int proc_nid_status (int vid, char *buffer) length = sprintf(buffer, "UseCnt:\t%d\n" "Tasks:\t%d\n" - "Flags:\t%016llx\n" ,atomic_read(&nxi->nx_usecnt) ,atomic_read(&nxi->nx_tasks) - ,(unsigned long long)nxi->nx_flags ); put_nx_info(nxi); return length; diff --git a/kernel/vserver/sched.c b/kernel/vserver/sched.c index b76a72c91..da844d1dd 100644 --- a/kernel/vserver/sched.c +++ b/kernel/vserver/sched.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/kernel/vserver/sched_init.h b/kernel/vserver/sched_init.h index d9b292d36..6724c286f 100644 --- a/kernel/vserver/sched_init.h +++ b/kernel/vserver/sched_init.h @@ -1,7 +1,6 @@ static inline void vx_info_init_sched(struct _vx_sched *sched) { - static struct lock_class_key tokens_lock_key; int i; /* scheduling; hard code starting values as constants */ @@ -20,14 +19,12 @@ static inline void vx_info_init_sched(struct _vx_sched *sched) } #endif - lockdep_set_class(&sched->tokens_lock, &tokens_lock_key); - atomic_set(&sched->tokens, HZ >> 2); sched->cpus_allowed = CPU_MASK_ALL; sched->priority_bias = 0; sched->vavavoom = 0; - for_each_possible_cpu(i) { + for_each_cpu(i) { sched->cpu[i].user_ticks = 0; sched->cpu[i].sys_ticks = 0; sched->cpu[i].hold_ticks = 0; diff --git a/kernel/vserver/switch.c b/kernel/vserver/switch.c index 6bfcfca4d..4e02f0f3a 100644 --- a/kernel/vserver/switch.c +++ b/kernel/vserver/switch.c @@ -240,7 +240,7 @@ long do_vserver(uint32_t cmd, uint32_t id, void __user *data, int compat) return -ENOSYS; } -asmlinkage long +extern asmlinkage long sys_vserver(uint32_t cmd, uint32_t id, void __user *data) { long ret = do_vserver(cmd, id, data, 0); @@ -254,7 +254,7 @@ sys_vserver(uint32_t cmd, uint32_t id, void __user *data) #ifdef CONFIG_COMPAT -asmlinkage long +extern asmlinkage long sys32_vserver(uint32_t cmd, uint32_t id, void __user *data) { long ret = do_vserver(cmd, id, data, 1); diff --git a/kernel/wait.c b/kernel/wait.c index 59a82f632..5cdf169d7 100644 --- a/kernel/wait.c +++ b/kernel/wait.c @@ -3,6 +3,7 @@ * * (C) 2004 William Irwin, Oracle */ +#include #include #include #include @@ -10,14 +11,6 @@ #include #include -void init_waitqueue_head(wait_queue_head_t *q) -{ - spin_lock_init(&q->lock); - INIT_LIST_HEAD(&q->task_list); -} - -EXPORT_SYMBOL(init_waitqueue_head); - void fastcall add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) { unsigned long flags; @@ -40,13 +33,35 @@ void fastcall add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait) } EXPORT_SYMBOL(add_wait_queue_exclusive); -void fastcall remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) +int fastcall remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait) { unsigned long flags; + struct list_head *list; + int seen, retval; spin_lock_irqsave(&q->lock, flags); - __remove_wait_queue(q, wait); + list = &q->task_list; + seen = 0; + retval = -1; + + do { + struct list_head *next; + if (list == &wait->task_list) + seen++; + next = list->next; + if (next->prev != list) { + seen += 2; + break; + } + list = next; + } while (list != &q->task_list); + + if (seen == 1) { + __remove_wait_queue(q, wait); + retval = 0; + } spin_unlock_irqrestore(&q->lock, flags); + return retval; } EXPORT_SYMBOL(remove_wait_queue); diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 835fe28b8..880fb415a 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -51,7 +51,7 @@ struct cpu_workqueue_struct { wait_queue_head_t work_done; struct workqueue_struct *wq; - struct task_struct *thread; + task_t *thread; int run_depth; /* Detect run_workqueue() recursion depth */ } ____cacheline_aligned; @@ -68,7 +68,7 @@ struct workqueue_struct { /* All the per-cpu workqueues on the system, for hotplug cpu to add/remove threads to each one as cpus come/go. */ -static DEFINE_MUTEX(workqueue_mutex); +static DEFINE_SPINLOCK(workqueue_lock); static LIST_HEAD(workqueues); static int singlethread_cpu; @@ -93,12 +93,9 @@ static void __queue_work(struct cpu_workqueue_struct *cwq, spin_unlock_irqrestore(&cwq->lock, flags); } -/** - * queue_work - queue work on a workqueue - * @wq: workqueue to use - * @work: work to queue - * - * Returns non-zero if it was successfully added. +/* + * Queue work on a workqueue. Return non-zero if it was successfully + * added. * * We queue the work to the CPU it was submitted, but there is no * guarantee that it will be processed by that CPU. @@ -117,7 +114,6 @@ int fastcall queue_work(struct workqueue_struct *wq, struct work_struct *work) put_cpu(); return ret; } -EXPORT_SYMBOL_GPL(queue_work); static void delayed_work_timer_fn(unsigned long __data) { @@ -131,14 +127,6 @@ static void delayed_work_timer_fn(unsigned long __data) __queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work); } -/** - * queue_delayed_work - queue work on a workqueue after delay - * @wq: workqueue to use - * @work: work to queue - * @delay: number of jiffies to wait before queueing - * - * Returns non-zero if it was successfully added. - */ int fastcall queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay) { @@ -159,38 +147,6 @@ int fastcall queue_delayed_work(struct workqueue_struct *wq, } return ret; } -EXPORT_SYMBOL_GPL(queue_delayed_work); - -/** - * queue_delayed_work_on - queue work on specific CPU after delay - * @cpu: CPU number to execute work on - * @wq: workqueue to use - * @work: work to queue - * @delay: number of jiffies to wait before queueing - * - * Returns non-zero if it was successfully added. - */ -int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, - struct work_struct *work, unsigned long delay) -{ - int ret = 0; - struct timer_list *timer = &work->timer; - - if (!test_and_set_bit(0, &work->pending)) { - BUG_ON(timer_pending(timer)); - BUG_ON(!list_empty(&work->entry)); - - /* This stores wq for the moment, for the timer_fn */ - work->wq_data = wq; - timer->expires = jiffies + delay; - timer->data = (unsigned long)work; - timer->function = delayed_work_timer_fn; - add_timer_on(timer, cpu); - ret = 1; - } - return ret; -} -EXPORT_SYMBOL_GPL(queue_delayed_work_on); static void run_workqueue(struct cpu_workqueue_struct *cwq) { @@ -295,9 +251,8 @@ static void flush_cpu_workqueue(struct cpu_workqueue_struct *cwq) } } -/** +/* * flush_workqueue - ensure that any scheduled work has run to completion. - * @wq: workqueue to flush * * Forces execution of the workqueue and blocks until its completion. * This is typically used in driver shutdown handlers. @@ -320,13 +275,12 @@ void fastcall flush_workqueue(struct workqueue_struct *wq) } else { int cpu; - mutex_lock(&workqueue_mutex); + lock_cpu_hotplug(); for_each_online_cpu(cpu) flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu)); - mutex_unlock(&workqueue_mutex); + unlock_cpu_hotplug(); } } -EXPORT_SYMBOL_GPL(flush_workqueue); static struct task_struct *create_workqueue_thread(struct workqueue_struct *wq, int cpu) @@ -371,7 +325,8 @@ struct workqueue_struct *__create_workqueue(const char *name, } wq->name = name; - mutex_lock(&workqueue_mutex); + /* We don't need the distraction of CPUs appearing and vanishing. */ + lock_cpu_hotplug(); if (singlethread) { INIT_LIST_HEAD(&wq->list); p = create_workqueue_thread(wq, singlethread_cpu); @@ -380,7 +335,9 @@ struct workqueue_struct *__create_workqueue(const char *name, else wake_up_process(p); } else { + spin_lock(&workqueue_lock); list_add(&wq->list, &workqueues); + spin_unlock(&workqueue_lock); for_each_online_cpu(cpu) { p = create_workqueue_thread(wq, cpu); if (p) { @@ -390,7 +347,7 @@ struct workqueue_struct *__create_workqueue(const char *name, destroy = 1; } } - mutex_unlock(&workqueue_mutex); + unlock_cpu_hotplug(); /* * Was there any error during startup? If yes then clean up: @@ -401,7 +358,6 @@ struct workqueue_struct *__create_workqueue(const char *name, } return wq; } -EXPORT_SYMBOL_GPL(__create_workqueue); static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) { @@ -418,12 +374,6 @@ static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) kthread_stop(p); } -/** - * destroy_workqueue - safely terminate a workqueue - * @wq: target workqueue - * - * Safely destroy a workqueue. All work currently pending will be done first. - */ void destroy_workqueue(struct workqueue_struct *wq) { int cpu; @@ -431,94 +381,69 @@ void destroy_workqueue(struct workqueue_struct *wq) flush_workqueue(wq); /* We don't need the distraction of CPUs appearing and vanishing. */ - mutex_lock(&workqueue_mutex); + lock_cpu_hotplug(); if (is_single_threaded(wq)) cleanup_workqueue_thread(wq, singlethread_cpu); else { for_each_online_cpu(cpu) cleanup_workqueue_thread(wq, cpu); + spin_lock(&workqueue_lock); list_del(&wq->list); + spin_unlock(&workqueue_lock); } - mutex_unlock(&workqueue_mutex); + unlock_cpu_hotplug(); free_percpu(wq->cpu_wq); kfree(wq); } -EXPORT_SYMBOL_GPL(destroy_workqueue); static struct workqueue_struct *keventd_wq; -/** - * schedule_work - put work task in global workqueue - * @work: job to be done - * - * This puts a job in the kernel-global workqueue. - */ int fastcall schedule_work(struct work_struct *work) { return queue_work(keventd_wq, work); } -EXPORT_SYMBOL(schedule_work); -/** - * schedule_delayed_work - put work task in global workqueue after delay - * @work: job to be done - * @delay: number of jiffies to wait - * - * After waiting for a given time this puts a job in the kernel-global - * workqueue. - */ int fastcall schedule_delayed_work(struct work_struct *work, unsigned long delay) { return queue_delayed_work(keventd_wq, work, delay); } -EXPORT_SYMBOL(schedule_delayed_work); -/** - * schedule_delayed_work_on - queue work in global workqueue on CPU after delay - * @cpu: cpu to use - * @work: job to be done - * @delay: number of jiffies to wait - * - * After waiting for a given time this puts a job in the kernel-global - * workqueue on the specified CPU. - */ int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay) { - return queue_delayed_work_on(cpu, keventd_wq, work, delay); + int ret = 0; + struct timer_list *timer = &work->timer; + + if (!test_and_set_bit(0, &work->pending)) { + BUG_ON(timer_pending(timer)); + BUG_ON(!list_empty(&work->entry)); + /* This stores keventd_wq for the moment, for the timer_fn */ + work->wq_data = keventd_wq; + timer->expires = jiffies + delay; + timer->data = (unsigned long)work; + timer->function = delayed_work_timer_fn; + add_timer_on(timer, cpu); + ret = 1; + } + return ret; } -EXPORT_SYMBOL(schedule_delayed_work_on); -/** - * schedule_on_each_cpu - call a function on each online CPU from keventd - * @func: the function to call - * @info: a pointer to pass to func() - * - * Returns zero on success. - * Returns -ve errno on failure. - * - * Appears to be racy against CPU hotplug. - * - * schedule_on_each_cpu() is very slow. - */ -int schedule_on_each_cpu(void (*func)(void *info), void *info) +int schedule_on_each_cpu(void (*func) (void *info), void *info) { int cpu; - struct work_struct *works; + struct work_struct *work; - works = alloc_percpu(struct work_struct); - if (!works) - return -ENOMEM; + work = kmalloc(NR_CPUS * sizeof(struct work_struct), GFP_KERNEL); - mutex_lock(&workqueue_mutex); + if (!work) + return -ENOMEM; for_each_online_cpu(cpu) { - INIT_WORK(per_cpu_ptr(works, cpu), func, info); + INIT_WORK(work + cpu, func, info); __queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), - per_cpu_ptr(works, cpu)); + work + cpu); } - mutex_unlock(&workqueue_mutex); flush_workqueue(keventd_wq); - free_percpu(works); + kfree(work); return 0; } @@ -526,7 +451,6 @@ void flush_scheduled_work(void) { flush_workqueue(keventd_wq); } -EXPORT_SYMBOL(flush_scheduled_work); /** * cancel_rearming_delayed_workqueue - reliably kill off a delayed @@ -607,11 +531,11 @@ int current_is_keventd(void) static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) { struct cpu_workqueue_struct *cwq = per_cpu_ptr(wq->cpu_wq, cpu); - struct list_head list; + LIST_HEAD(list); struct work_struct *work; spin_lock_irq(&cwq->lock); - list_replace_init(&cwq->worklist, &list); + list_splice_init(&cwq->worklist, &list); while (!list_empty(&list)) { printk("Taking work for %s\n", wq->name); @@ -623,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) } /* We're holding the cpucontrol mutex here */ -static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, +static int workqueue_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -632,7 +556,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_UP_PREPARE: - mutex_lock(&workqueue_mutex); /* Create a new workqueue thread for it. */ list_for_each_entry(wq, &workqueues, list) { if (!create_workqueue_thread(wq, hotcpu)) { @@ -651,27 +574,15 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, kthread_bind(cwq->thread, hotcpu); wake_up_process(cwq->thread); } - mutex_unlock(&workqueue_mutex); break; case CPU_UP_CANCELED: list_for_each_entry(wq, &workqueues, list) { - if (!per_cpu_ptr(wq->cpu_wq, hotcpu)->thread) - continue; /* Unbind so it can run. */ kthread_bind(per_cpu_ptr(wq->cpu_wq, hotcpu)->thread, any_online_cpu(cpu_online_map)); cleanup_workqueue_thread(wq, hotcpu); } - mutex_unlock(&workqueue_mutex); - break; - - case CPU_DOWN_PREPARE: - mutex_lock(&workqueue_mutex); - break; - - case CPU_DOWN_FAILED: - mutex_unlock(&workqueue_mutex); break; case CPU_DEAD: @@ -679,7 +590,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, cleanup_workqueue_thread(wq, hotcpu); list_for_each_entry(wq, &workqueues, list) take_over_work(wq, hotcpu); - mutex_unlock(&workqueue_mutex); break; } @@ -695,3 +605,13 @@ void init_workqueues(void) BUG_ON(!keventd_wq); } +EXPORT_SYMBOL_GPL(__create_workqueue); +EXPORT_SYMBOL_GPL(queue_work); +EXPORT_SYMBOL_GPL(queue_delayed_work); +EXPORT_SYMBOL_GPL(flush_workqueue); +EXPORT_SYMBOL_GPL(destroy_workqueue); + +EXPORT_SYMBOL(schedule_work); +EXPORT_SYMBOL(schedule_delayed_work); +EXPORT_SYMBOL(schedule_delayed_work_on); +EXPORT_SYMBOL(flush_scheduled_work); diff --git a/lib/Kconfig b/lib/Kconfig index 734ce95a9..3de93357f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -38,11 +38,6 @@ config LIBCRC32C require M here. See Castagnoli93. Module will be libcrc32c. -config AUDIT_GENERIC - bool - depends on AUDIT && !AUDIT_ARCH - default y - # # compression support is select'ed if needed # @@ -91,10 +86,4 @@ config TEXTSEARCH_BM config TEXTSEARCH_FSM tristate -# -# plist support is select#ed if needed -# -config PLIST - boolean - endmenu diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 4dd46ac36..212560acf 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -23,22 +23,6 @@ config MAGIC_SYSRQ keys are documented in . Don't say Y unless you really know what this hack does. -config UNUSED_SYMBOLS - bool "Enable unused/obsolete exported symbols" - default y if X86 - help - Unused but exported symbols make the kernel needlessly bigger. For - that reason most of these unused exports will soon be removed. This - option is provided temporarily to provide a transition period in case - some external kernel module needs one of these symbols anyway. If you - encounter such a case in your module, consider if you are actually - using the right API. (rationale: since nobody in the kernel is using - this in a module, there is a pretty good chance it's actually the - wrong interface to use). If you really need the symbol, please send a - mail to the linux kernel mailing list mentioning the symbol and why - you really need it, and what the merge plan to the mainline kernel for - your module is. - config DEBUG_KERNEL bool "Kernel debugging" help @@ -48,7 +32,7 @@ config DEBUG_KERNEL config LOG_BUF_SHIFT int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL range 12 21 - default 17 if S390 || LOCKDEP + default 17 if S390 default 16 if X86_NUMAQ || IA64 default 15 if SMP default 14 @@ -107,7 +91,7 @@ config DEBUG_SLAB_LEAK config DEBUG_PREEMPT bool "Debug preemptible kernel" - depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT + depends on DEBUG_KERNEL && PREEMPT default y help If you say Y here then the kernel will use a debug variant of the @@ -115,26 +99,16 @@ config DEBUG_PREEMPT if kernel code uses it in a preemption-unsafe way. Also, the kernel will detect preemption count underflows. -config DEBUG_RT_MUTEXES - bool "RT Mutex debugging, deadlock detection" - depends on DEBUG_KERNEL && RT_MUTEXES - help - This allows rt mutex semantics violations and rt mutex related - deadlocks (lockups) to be detected and reported automatically. - -config DEBUG_PI_LIST - bool - default y - depends on DEBUG_RT_MUTEXES - -config RT_MUTEX_TESTER - bool "Built-in scriptable tester for rt-mutexes" - depends on DEBUG_KERNEL && RT_MUTEXES +config DEBUG_MUTEXES + bool "Mutex debugging, deadlock detection" + default n + depends on DEBUG_KERNEL help - This option enables a rt-mutex tester. + This allows mutex semantics violations and mutex related deadlocks + (lockups) to be detected and reported automatically. config DEBUG_SPINLOCK - bool "Spinlock and rw-lock debugging: basic checks" + bool "Spinlock debugging" depends on DEBUG_KERNEL help Say Y here and build SMP to catch missing spinlock initialization @@ -142,124 +116,13 @@ config DEBUG_SPINLOCK best used in conjunction with the NMI watchdog so that spinlock deadlocks are also debuggable. -config DEBUG_MUTEXES - bool "Mutex debugging: basic checks" - depends on DEBUG_KERNEL - help - This feature allows mutex semantics violations to be detected and - reported. - -config DEBUG_RWSEMS - bool "RW-sem debugging: basic checks" - depends on DEBUG_KERNEL - help - This feature allows read-write semaphore semantics violations to - be detected and reported. - -config DEBUG_LOCK_ALLOC - bool "Lock debugging: detect incorrect freeing of live locks" - depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT - select DEBUG_SPINLOCK - select DEBUG_MUTEXES - select DEBUG_RWSEMS - select LOCKDEP - help - This feature will check whether any held lock (spinlock, rwlock, - mutex or rwsem) is incorrectly freed by the kernel, via any of the - memory-freeing routines (kfree(), kmem_cache_free(), free_pages(), - vfree(), etc.), whether a live lock is incorrectly reinitialized via - spin_lock_init()/mutex_init()/etc., or whether there is any lock - held during task exit. - -config PROVE_LOCKING - bool "Lock debugging: prove locking correctness" - depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT - select LOCKDEP - select DEBUG_SPINLOCK - select DEBUG_MUTEXES - select DEBUG_RWSEMS - select DEBUG_LOCK_ALLOC - default n - help - This feature enables the kernel to prove that all locking - that occurs in the kernel runtime is mathematically - correct: that under no circumstance could an arbitrary (and - not yet triggered) combination of observed locking - sequences (on an arbitrary number of CPUs, running an - arbitrary number of tasks and interrupt contexts) cause a - deadlock. - - In short, this feature enables the kernel to report locking - related deadlocks before they actually occur. - - The proof does not depend on how hard and complex a - deadlock scenario would be to trigger: how many - participant CPUs, tasks and irq-contexts would be needed - for it to trigger. The proof also does not depend on - timing: if a race and a resulting deadlock is possible - theoretically (no matter how unlikely the race scenario - is), it will be proven so and will immediately be - reported by the kernel (once the event is observed that - makes the deadlock theoretically possible). - - If a deadlock is impossible (i.e. the locking rules, as - observed by the kernel, are mathematically correct), the - kernel reports nothing. - - NOTE: this feature can also be enabled for rwlocks, mutexes - and rwsems - in which case all dependencies between these - different locking variants are observed and mapped too, and - the proof of observed correctness is also maintained for an - arbitrary combination of these separate locking variants. - - For more details, see Documentation/lockdep-design.txt. - -config LOCKDEP - bool - depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT - select STACKTRACE - select FRAME_POINTER if !X86 - select KALLSYMS - select KALLSYMS_ALL - -config DEBUG_LOCKDEP - bool "Lock dependency engine debugging" - depends on DEBUG_KERNEL && LOCKDEP - help - If you say Y here, the lock dependency engine will do - additional runtime checks to debug itself, at the price - of more runtime overhead. - -config TRACE_IRQFLAGS - depends on DEBUG_KERNEL - bool - default y - depends on TRACE_IRQFLAGS_SUPPORT - depends on PROVE_LOCKING - config DEBUG_SPINLOCK_SLEEP - bool "Spinlock debugging: sleep-inside-spinlock checking" + bool "Sleep-inside-spinlock checking" depends on 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. -config DEBUG_LOCKING_API_SELFTESTS - bool "Locking API boot-time self-tests" - depends on DEBUG_KERNEL - help - Say Y here if you want the kernel to run a short self-test during - bootup. The self-test checks whether common types of locking bugs - are detected by debugging mechanisms or not. (if you disable - lock debugging then those bugs wont be detected of course.) - The following locking APIs are covered: spinlocks, rwlocks, - mutexes and rwsems. - -config STACKTRACE - bool - depends on DEBUG_KERNEL - depends on STACKTRACE_SUPPORT - config DEBUG_KOBJECT bool "kobject debugging" depends on DEBUG_KERNEL @@ -313,18 +176,9 @@ config DEBUG_VM If unsure, say N. -config DEBUG_LIST - bool "Debug linked list manipulation" - depends on DEBUG_KERNEL - help - Enable this to turn on extended checks in the linked-list - walking routines. - - If unsure, say N. - config FRAME_POINTER bool "Compile the kernel with frame pointers" - depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390) + depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML) default y if DEBUG_INFO && UML help If you say Y here the resulting kernel image will be slightly larger @@ -334,22 +188,14 @@ config FRAME_POINTER config UNWIND_INFO bool "Compile the kernel with frame unwind information" - depends on !IA64 && !PARISC && !X86_64_XEN - depends on !MODULES || !(MIPS || PPC || SUPERH || V850) + depends on !IA64 + depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || V850) help If you say Y here the resulting kernel image will be slightly larger but not slower, and it will give very useful debugging information. If you don't debug the kernel, you can say N, but we may not be able to solve problems without frame unwind information or frame pointers. -config STACK_UNWIND - bool "Stack unwind support" - depends on UNWIND_INFO - depends on X86 - help - This enables more precise stack traces, omitting all unrelated - occurrences of pointers into kernel code from the dump. - config FORCED_INLINING bool "Force gcc to inline functions marked 'inline'" depends on DEBUG_KERNEL diff --git a/lib/Makefile b/lib/Makefile index d5b8eb2cf..033ff7c67 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -11,14 +11,13 @@ lib-$(CONFIG_SMP) += cpumask.o lib-y += kobject.o kref.o kobject_uevent.o klist.o -obj-y += sort.o parser.o halfmd4.o iomap_copy.o debug_locks.o +obj-y += sort.o parser.o halfmd4.o iomap_copy.o ifeq ($(CONFIG_DEBUG_KOBJECT),y) CFLAGS_kobject.o += -DDEBUG CFLAGS_kobject_uevent.o += -DDEBUG endif -obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o @@ -26,9 +25,7 @@ lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o lib-$(CONFIG_GENERIC_HWEIGHT) += hweight.o obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o -obj-$(CONFIG_PLIST) += plist.o obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o -obj-$(CONFIG_DEBUG_LIST) += list_debug.o ifneq ($(CONFIG_HAVE_DEC_LOCK),y) lib-y += dec_and_lock.o @@ -49,8 +46,6 @@ obj-$(CONFIG_TEXTSEARCH) += textsearch.o obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o -obj-$(CONFIG_SMP) += percpu_counter.o -obj-$(CONFIG_AUDIT_GENERIC) += audit.o obj-$(CONFIG_SWIOTLB) += swiotlb.o ifneq ($(CONFIG_XEN_IA64_DOM0_NON_VP),y) diff --git a/lib/audit.c b/lib/audit.c deleted file mode 100644 index 3b1289fad..000000000 --- a/lib/audit.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include - -static unsigned dir_class[] = { -#include -~0U -}; - -static unsigned read_class[] = { -#include -~0U -}; - -static unsigned write_class[] = { -#include -~0U -}; - -static unsigned chattr_class[] = { -#include -~0U -}; - -int audit_classify_syscall(int abi, unsigned syscall) -{ - switch(syscall) { - case __NR_open: - return 2; -#ifdef __NR_openat - case __NR_openat: - return 3; -#endif -#ifdef __NR_socketcall - case __NR_socketcall: - return 4; -#endif - case __NR_execve: - return 5; - default: - return 0; - } -} - -static int __init audit_classes_init(void) -{ - audit_register_class(AUDIT_CLASS_WRITE, write_class); - audit_register_class(AUDIT_CLASS_READ, read_class); - audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); - audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); - return 0; -} - -__initcall(audit_classes_init); diff --git a/lib/bitmap.c b/lib/bitmap.c index d71e38c54..ed2ae3b0c 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -317,16 +317,16 @@ EXPORT_SYMBOL(bitmap_scnprintf); /** * bitmap_parse - convert an ASCII hex string into a bitmap. - * @ubuf: pointer to buffer in user space containing string. - * @ubuflen: buffer size in bytes. If string is smaller than this + * @buf: pointer to buffer in user space containing string. + * @buflen: buffer size in bytes. If string is smaller than this * then it must be terminated with a \0. * @maskp: pointer to bitmap array that will contain result. * @nmaskbits: size of bitmap, in bits. * * Commas group hex digits into chunks. Each chunk defines exactly 32 * bits of the resultant bitmask. No chunk may specify a value larger - * than 32 bits (%-EOVERFLOW), and if a chunk specifies a smaller value - * then leading 0-bits are prepended. %-EINVAL is returned for illegal + * than 32 bits (-EOVERFLOW), and if a chunk specifies a smaller value + * then leading 0-bits are prepended. -EINVAL is returned for illegal * characters and for grouping errors such as "1,,5", ",44", "," and "". * Leading and trailing whitespace accepted, but not embedded whitespace. */ @@ -452,8 +452,8 @@ EXPORT_SYMBOL(bitmap_scnlistprintf); /** * bitmap_parselist - convert list format ASCII string to bitmap - * @bp: read nul-terminated user string from this buffer - * @maskp: write resulting mask here + * @buf: read nul-terminated user string from this buffer + * @mask: write resulting mask here * @nmaskbits: number of bits in mask to be written * * Input format is a comma-separated list of decimal numbers and @@ -461,11 +461,10 @@ EXPORT_SYMBOL(bitmap_scnlistprintf); * decimal numbers, the smallest and largest bit numbers set in * the range. * - * Returns 0 on success, -errno on invalid input strings. - * Error values: - * %-EINVAL: second number in range smaller than first - * %-EINVAL: invalid character in string - * %-ERANGE: bit number specified too large for mask + * Returns 0 on success, -errno on invalid input strings: + * -EINVAL: second number in range smaller than first + * -EINVAL: invalid character in string + * -ERANGE: bit number specified too large for mask */ int bitmap_parselist(const char *bp, unsigned long *maskp, int nmaskbits) { @@ -626,10 +625,10 @@ EXPORT_SYMBOL(bitmap_remap); /** * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit - * @oldbit: bit position to be mapped - * @old: defines domain of map - * @new: defines range of map - * @bits: number of bits in each of these bitmaps + * @oldbit - bit position to be mapped + * @old: defines domain of map + * @new: defines range of map + * @bits: number of bits in each of these bitmaps * * Let @old and @new define a mapping of bit positions, such that * whatever position is held by the n-th set bit in @old is mapped @@ -791,7 +790,7 @@ EXPORT_SYMBOL(bitmap_release_region); * * Allocate (set bits in) a specified region of a bitmap. * - * Return 0 on success, or %-EBUSY if specified region wasn't + * Return 0 on success, or -EBUSY if specified region wasn't * free (not all bits were zero). */ int bitmap_allocate_region(unsigned long *bitmap, int pos, int order) diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c index a2055bc3e..6bb7319e0 100644 --- a/lib/bust_spinlocks.c +++ b/lib/bust_spinlocks.c @@ -7,6 +7,7 @@ * and panic() information from reaching the user. */ +#include #include #include #include diff --git a/lib/crc-ccitt.c b/lib/crc-ccitt.c index 7f6dd68d2..115d149af 100644 --- a/lib/crc-ccitt.c +++ b/lib/crc-ccitt.c @@ -53,9 +53,9 @@ EXPORT_SYMBOL(crc_ccitt_table); /** * crc_ccitt - recompute the CRC for the data buffer - * @crc: previous CRC value - * @buffer: data pointer - * @len: number of bytes in the buffer + * @crc - previous CRC value + * @buffer - data pointer + * @len - number of bytes in the buffer */ u16 crc_ccitt(u16 crc, u8 const *buffer, size_t len) { diff --git a/lib/crc16.c b/lib/crc16.c index 8737b084d..011fe573c 100644 --- a/lib/crc16.c +++ b/lib/crc16.c @@ -47,12 +47,12 @@ u16 const crc16_table[256] = { EXPORT_SYMBOL(crc16_table); /** - * crc16 - compute the CRC-16 for the data buffer - * @crc: previous CRC value - * @buffer: data pointer - * @len: number of bytes in the buffer + * Compute the CRC-16 for the data buffer * - * Returns the updated CRC value. + * @param crc previous CRC value + * @param buffer data pointer + * @param len number of bytes in the buffer + * @return the updated CRC value */ u16 crc16(u16 crc, u8 const *buffer, size_t len) { diff --git a/lib/crc32.c b/lib/crc32.c index 285fd9bc6..065198f98 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -42,21 +42,20 @@ MODULE_AUTHOR("Matt Domsch "); MODULE_DESCRIPTION("Ethernet CRC32 calculations"); MODULE_LICENSE("GPL"); -/** - * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 - * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for - * other uses, or the previous crc32 value if computing incrementally. - * @p: pointer to buffer over which CRC is run - * @len: length of buffer @p - */ -u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len); - #if CRC_LE_BITS == 1 /* * In fact, the table-based code will work in this case, but it can be * simplified by inlining the table in ?: form. */ +/** + * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for + * other uses, or the previous crc32 value if computing incrementally. + * @p - pointer to buffer over which CRC is run + * @len - length of buffer @p + * + */ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) { int i; @@ -69,6 +68,14 @@ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) } #else /* Table-based approach */ +/** + * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32 + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for + * other uses, or the previous crc32 value if computing incrementally. + * @p - pointer to buffer over which CRC is run + * @len - length of buffer @p + * + */ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) { # if CRC_LE_BITS == 8 @@ -138,21 +145,20 @@ u32 __attribute_pure__ crc32_le(u32 crc, unsigned char const *p, size_t len) } #endif -/** - * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32 - * @crc: seed value for computation. ~0 for Ethernet, sometimes 0 for - * other uses, or the previous crc32 value if computing incrementally. - * @p: pointer to buffer over which CRC is run - * @len: length of buffer @p - */ -u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len); - #if CRC_BE_BITS == 1 /* * In fact, the table-based code will work in this case, but it can be * simplified by inlining the table in ?: form. */ +/** + * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32 + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for + * other uses, or the previous crc32 value if computing incrementally. + * @p - pointer to buffer over which CRC is run + * @len - length of buffer @p + * + */ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) { int i; @@ -167,6 +173,14 @@ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) } #else /* Table-based approach */ +/** + * crc32_be() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32 + * @crc - seed value for computation. ~0 for Ethernet, sometimes 0 for + * other uses, or the previous crc32 value if computing incrementally. + * @p - pointer to buffer over which CRC is run + * @len - length of buffer @p + * + */ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) { # if CRC_BE_BITS == 8 @@ -235,10 +249,6 @@ u32 __attribute_pure__ crc32_be(u32 crc, unsigned char const *p, size_t len) } #endif -/** - * bitreverse - reverse the order of bits in a u32 value - * @x: value to be bit-reversed - */ u32 bitreverse(u32 x) { x = (x >> 16) | (x << 16); diff --git a/lib/debug_locks.c b/lib/debug_locks.c deleted file mode 100644 index 0ef01d147..000000000 --- a/lib/debug_locks.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * lib/debug_locks.c - * - * Generic place for common debugging facilities for various locks: - * spinlocks, rwlocks, mutexes and rwsems. - * - * Started by Ingo Molnar: - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - */ -#include -#include -#include -#include -#include - -/* - * We want to turn all lock-debugging facilities on/off at once, - * via a global flag. The reason is that once a single bug has been - * detected and reported, there might be cascade of followup bugs - * that would just muddy the log. So we report the first one and - * shut up after that. - */ -int debug_locks = 1; - -/* - * The locking-testsuite uses to get a - * 'silent failure': nothing is printed to the console when - * a locking bug is detected. - */ -int debug_locks_silent; - -/* - * Generic 'turn off all lock debugging' function: - */ -int debug_locks_off(void) -{ - if (xchg(&debug_locks, 0)) { - if (!debug_locks_silent) { - console_verbose(); - return 1; - } - } - return 0; -} diff --git a/lib/extable.c b/lib/extable.c index 463f4560f..01c08b583 100644 --- a/lib/extable.c +++ b/lib/extable.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/lib/genalloc.c b/lib/genalloc.c index 71338b48e..9ce0a6a3b 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -4,6 +4,10 @@ * Uses for this includes on-device special memory, uncached memory * etc. * + * This code is based on the buddy allocator found in the sym53c8xx_2 + * driver Copyright (C) 1999-2001 Gerard Roudier , + * and adapted for general purpose use. + * * Copyright 2005 (C) Jes Sorensen * * This source code is licensed under the GNU General Public License, @@ -11,155 +15,172 @@ */ #include +#include +#include +#include +#include +#include +#include +#include #include +#include -/* - * Create a new special memory pool. - * - * @min_alloc_order: log base 2 of number of bytes each bitmap bit represents - * @nid: node id of the node the pool structure should be allocated on, or -1 - */ -struct gen_pool *gen_pool_create(int min_alloc_order, int nid) -{ - struct gen_pool *pool; - pool = kmalloc_node(sizeof(struct gen_pool), GFP_KERNEL, nid); - if (pool != NULL) { - rwlock_init(&pool->lock); - INIT_LIST_HEAD(&pool->chunks); - pool->min_alloc_order = min_alloc_order; +struct gen_pool *gen_pool_create(int nr_chunks, int max_chunk_shift, + unsigned long (*fp)(struct gen_pool *), + unsigned long data) +{ + struct gen_pool *poolp; + unsigned long tmp; + int i; + + /* + * This is really an arbitrary limit, +10 is enough for + * IA64_GRANULE_SHIFT, aka 16MB. If anyone needs a large limit + * this can be increased without problems. + */ + if ((max_chunk_shift > (PAGE_SHIFT + 10)) || + ((max_chunk_shift < ALLOC_MIN_SHIFT) && max_chunk_shift)) + return NULL; + + if (!max_chunk_shift) + max_chunk_shift = PAGE_SHIFT; + + poolp = kmalloc(sizeof(struct gen_pool), GFP_KERNEL); + if (!poolp) + return NULL; + memset(poolp, 0, sizeof(struct gen_pool)); + poolp->h = kmalloc(sizeof(struct gen_pool_link) * + (max_chunk_shift - ALLOC_MIN_SHIFT + 1), + GFP_KERNEL); + if (!poolp->h) { + printk(KERN_WARNING "gen_pool_alloc() failed to allocate\n"); + kfree(poolp); + return NULL; + } + memset(poolp->h, 0, sizeof(struct gen_pool_link) * + (max_chunk_shift - ALLOC_MIN_SHIFT + 1)); + + spin_lock_init(&poolp->lock); + poolp->get_new_chunk = fp; + poolp->max_chunk_shift = max_chunk_shift; + poolp->private = data; + + for (i = 0; i < nr_chunks; i++) { + tmp = poolp->get_new_chunk(poolp); + printk(KERN_INFO "allocated %lx\n", tmp); + if (!tmp) + break; + gen_pool_free(poolp, tmp, (1 << poolp->max_chunk_shift)); } - return pool; + + return poolp; } EXPORT_SYMBOL(gen_pool_create); /* - * Add a new chunk of memory to the specified pool. - * - * @pool: pool to add new memory chunk to - * @addr: starting address of memory chunk to add to pool - * @size: size in bytes of the memory chunk to add to pool - * @nid: node id of the node the chunk structure and bitmap should be - * allocated on, or -1 + * Simple power of two buddy-like generic allocator. + * Provides naturally aligned memory chunks. */ -int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size, - int nid) +unsigned long gen_pool_alloc(struct gen_pool *poolp, int size) { - struct gen_pool_chunk *chunk; - int nbits = size >> pool->min_alloc_order; - int nbytes = sizeof(struct gen_pool_chunk) + - (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE; + int j, i, s, max_chunk_size; + unsigned long a, flags; + struct gen_pool_link *h = poolp->h; - chunk = kmalloc_node(nbytes, GFP_KERNEL, nid); - if (unlikely(chunk == NULL)) - return -1; + max_chunk_size = 1 << poolp->max_chunk_shift; - memset(chunk, 0, nbytes); - spin_lock_init(&chunk->lock); - chunk->start_addr = addr; - chunk->end_addr = addr + size; - - write_lock(&pool->lock); - list_add(&chunk->next_chunk, &pool->chunks); - write_unlock(&pool->lock); + if (size > max_chunk_size) + return 0; - return 0; + size = max(size, 1 << ALLOC_MIN_SHIFT); + i = fls(size - 1); + s = 1 << i; + j = i -= ALLOC_MIN_SHIFT; + + spin_lock_irqsave(&poolp->lock, flags); + while (!h[j].next) { + if (s == max_chunk_size) { + struct gen_pool_link *ptr; + spin_unlock_irqrestore(&poolp->lock, flags); + ptr = (struct gen_pool_link *)poolp->get_new_chunk(poolp); + spin_lock_irqsave(&poolp->lock, flags); + h[j].next = ptr; + if (h[j].next) + h[j].next->next = NULL; + break; + } + j++; + s <<= 1; + } + a = (unsigned long) h[j].next; + if (a) { + h[j].next = h[j].next->next; + /* + * This should be split into a seperate function doing + * the chunk split in order to support custom + * handling memory not physically accessible by host + */ + while (j > i) { + j -= 1; + s >>= 1; + h[j].next = (struct gen_pool_link *) (a + s); + h[j].next->next = NULL; + } + } + spin_unlock_irqrestore(&poolp->lock, flags); + return a; } -EXPORT_SYMBOL(gen_pool_add); +EXPORT_SYMBOL(gen_pool_alloc); /* - * Allocate the requested number of bytes from the specified pool. - * Uses a first-fit algorithm. - * - * @pool: pool to allocate from - * @size: number of bytes to allocate from the pool + * Counter-part of the generic allocator. */ -unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) +void gen_pool_free(struct gen_pool *poolp, unsigned long ptr, int size) { - struct list_head *_chunk; - struct gen_pool_chunk *chunk; - unsigned long addr, flags; - int order = pool->min_alloc_order; - int nbits, bit, start_bit, end_bit; + struct gen_pool_link *q; + struct gen_pool_link *h = poolp->h; + unsigned long a, b, flags; + int i, s, max_chunk_size; - if (size == 0) - return 0; + max_chunk_size = 1 << poolp->max_chunk_shift; - nbits = (size + (1UL << order) - 1) >> order; - - read_lock(&pool->lock); - list_for_each(_chunk, &pool->chunks) { - chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); - - end_bit = (chunk->end_addr - chunk->start_addr) >> order; - end_bit -= nbits + 1; - - spin_lock_irqsave(&chunk->lock, flags); - bit = -1; - while (bit + 1 < end_bit) { - bit = find_next_zero_bit(chunk->bits, end_bit, bit + 1); - if (bit >= end_bit) - break; - - start_bit = bit; - if (nbits > 1) { - bit = find_next_bit(chunk->bits, bit + nbits, - bit + 1); - if (bit - start_bit < nbits) - continue; - } - - addr = chunk->start_addr + - ((unsigned long)start_bit << order); - while (nbits--) - __set_bit(start_bit++, &chunk->bits); - spin_unlock_irqrestore(&chunk->lock, flags); - read_unlock(&pool->lock); - return addr; + if (size > max_chunk_size) + return; + + size = max(size, 1 << ALLOC_MIN_SHIFT); + i = fls(size - 1); + s = 1 << i; + i -= ALLOC_MIN_SHIFT; + + a = ptr; + + spin_lock_irqsave(&poolp->lock, flags); + while (1) { + if (s == max_chunk_size) { + ((struct gen_pool_link *)a)->next = h[i].next; + h[i].next = (struct gen_pool_link *)a; + break; } - spin_unlock_irqrestore(&chunk->lock, flags); - } - read_unlock(&pool->lock); - return 0; -} -EXPORT_SYMBOL(gen_pool_alloc); + b = a ^ s; + q = &h[i]; + while (q->next && q->next != (struct gen_pool_link *)b) + q = q->next; -/* - * Free the specified memory back to the specified pool. - * - * @pool: pool to free to - * @addr: starting address of memory to free back to pool - * @size: size in bytes of memory to free - */ -void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size) -{ - struct list_head *_chunk; - struct gen_pool_chunk *chunk; - unsigned long flags; - int order = pool->min_alloc_order; - int bit, nbits; - - nbits = (size + (1UL << order) - 1) >> order; - - read_lock(&pool->lock); - list_for_each(_chunk, &pool->chunks) { - chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); - - if (addr >= chunk->start_addr && addr < chunk->end_addr) { - BUG_ON(addr + size > chunk->end_addr); - spin_lock_irqsave(&chunk->lock, flags); - bit = (addr - chunk->start_addr) >> order; - while (nbits--) - __clear_bit(bit++, &chunk->bits); - spin_unlock_irqrestore(&chunk->lock, flags); + if (!q->next) { + ((struct gen_pool_link *)a)->next = h[i].next; + h[i].next = (struct gen_pool_link *)a; break; } + q->next = q->next->next; + a = a & b; + s <<= 1; + i++; } - BUG_ON(nbits > 0); - read_unlock(&pool->lock); + spin_unlock_irqrestore(&poolp->lock, flags); } EXPORT_SYMBOL(gen_pool_free); diff --git a/lib/idr.c b/lib/idr.c index 16d2143fe..4d0968195 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -38,15 +38,14 @@ static kmem_cache_t *idr_layer_cache; static struct idr_layer *alloc_layer(struct idr *idp) { struct idr_layer *p; - unsigned long flags; - spin_lock_irqsave(&idp->lock, flags); + spin_lock(&idp->lock); if ((p = idp->id_free)) { idp->id_free = p->ary[0]; idp->id_free_cnt--; p->ary[0] = NULL; } - spin_unlock_irqrestore(&idp->lock, flags); + spin_unlock(&idp->lock); return(p); } @@ -60,14 +59,12 @@ static void __free_layer(struct idr *idp, struct idr_layer *p) static void free_layer(struct idr *idp, struct idr_layer *p) { - unsigned long flags; - /* * Depends on the return element being zeroed. */ - spin_lock_irqsave(&idp->lock, flags); + spin_lock(&idp->lock); __free_layer(idp, p); - spin_unlock_irqrestore(&idp->lock, flags); + spin_unlock(&idp->lock); } /** @@ -171,7 +168,6 @@ static int idr_get_new_above_int(struct idr *idp, void *ptr, int starting_id) { struct idr_layer *p, *new; int layers, v, id; - unsigned long flags; id = starting_id; build_up: @@ -195,14 +191,14 @@ build_up: * The allocation failed. If we built part of * the structure tear it down. */ - spin_lock_irqsave(&idp->lock, flags); + spin_lock(&idp->lock); for (new = p; p && p != idp->top; new = p) { p = p->ary[0]; new->ary[0] = NULL; new->bitmap = new->count = 0; __free_layer(idp, new); } - spin_unlock_irqrestore(&idp->lock, flags); + spin_unlock(&idp->lock); return -1; } new->ary[0] = p; diff --git a/lib/iomap_copy.c b/lib/iomap_copy.c index 864fc5ea3..351045f4f 100644 --- a/lib/iomap_copy.c +++ b/lib/iomap_copy.c @@ -40,31 +40,3 @@ void __attribute__((weak)) __iowrite32_copy(void __iomem *to, __raw_writel(*src++, dst++); } EXPORT_SYMBOL_GPL(__iowrite32_copy); - -/** - * __iowrite64_copy - copy data to MMIO space, in 64-bit or 32-bit units - * @to: destination, in MMIO space (must be 64-bit aligned) - * @from: source (must be 64-bit aligned) - * @count: number of 64-bit quantities to copy - * - * Copy data from kernel space to MMIO space, in units of 32 or 64 bits at a - * time. Order of access is not guaranteed, nor is a memory barrier - * performed afterwards. - */ -void __attribute__((weak)) __iowrite64_copy(void __iomem *to, - const void *from, - size_t count) -{ -#ifdef CONFIG_64BIT - u64 __iomem *dst = to; - const u64 *src = from; - const u64 *end = src + count; - - while (src < end) - __raw_writeq(*src++, dst++); -#else - __iowrite32_copy(to, from, count * 2); -#endif -} - -EXPORT_SYMBOL_GPL(__iowrite64_copy); diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c index e0fdfddb4..cb5490ec0 100644 --- a/lib/kernel_lock.c +++ b/lib/kernel_lock.c @@ -14,7 +14,7 @@ * The 'big kernel semaphore' * * This mutex is taken and released recursively by lock_kernel() - * and unlock_kernel(). It is transparently dropped and reacquired + * and unlock_kernel(). It is transparently dropped and reaquired * over schedule(). It is used to protect legacy code that hasn't * been migrated to a proper locking design yet. * @@ -92,7 +92,7 @@ void __lockfunc unlock_kernel(void) * The 'big kernel lock' * * This spinlock is taken and released recursively by lock_kernel() - * and unlock_kernel(). It is transparently dropped and reacquired + * and unlock_kernel(). It is transparently dropped and reaquired * over schedule(). It is used to protect legacy code that hasn't * been migrated to a proper locking design yet. * @@ -177,12 +177,7 @@ static inline void __lock_kernel(void) static inline void __unlock_kernel(void) { - /* - * the BKL is not covered by lockdep, so we open-code the - * unlocking sequence (and thus avoid the dep-chain ops): - */ - _raw_spin_unlock(&kernel_flag); - preempt_enable(); + spin_unlock(&kernel_flag); } /* diff --git a/lib/kobject.c b/lib/kobject.c index 8e7c71993..687ab418d 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -198,14 +198,14 @@ int kobject_add(struct kobject * kobj) /* be noisy on error issues */ if (error == -EEXIST) - printk("kobject_add failed for %s with -EEXIST, " + pr_debug("kobject_add failed for %s with -EEXIST, " "don't try to register things with the " "same name in the same directory.\n", kobject_name(kobj)); else - printk("kobject_add failed for %s (%d)\n", + pr_debug("kobject_add failed for %s (%d)\n", kobject_name(kobj), error); - dump_stack(); + /* dump_stack(); */ } return error; diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c index 60f46803a..52b6dc144 100644 --- a/lib/libcrc32c.c +++ b/lib/libcrc32c.c @@ -88,7 +88,7 @@ crc32c_le(u32 crc, unsigned char const *p, size_t len) * reflect output bytes = true */ -static const u32 crc32c_table[256] = { +static u32 crc32c_table[256] = { 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, diff --git a/lib/list_debug.c b/lib/list_debug.c deleted file mode 100644 index 1aae85cef..000000000 --- a/lib/list_debug.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2006, Red Hat, Inc., Dave Jones - * Released under the General Public License (GPL). - * - * This file contains the linked list implementations for - * DEBUG_LIST. - */ - -#include -#include - -/* - * Insert a new entry between two known consecutive entries. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ - -void __list_add(struct list_head *new, - struct list_head *prev, - struct list_head *next) -{ - if (unlikely(next->prev != prev)) { - printk(KERN_ERR "list_add corruption. next->prev should be %p, but was %p\n", - prev, next->prev); - BUG(); - } - if (unlikely(prev->next != next)) { - printk(KERN_ERR "list_add corruption. prev->next should be %p, but was %p\n", - next, prev->next); - BUG(); - } - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; -} -EXPORT_SYMBOL(__list_add); - -/** - * list_add - add a new entry - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -void list_add(struct list_head *new, struct list_head *head) -{ - __list_add(new, head, head->next); -} -EXPORT_SYMBOL(list_add); - -/** - * list_del - deletes entry from list. - * @entry: the element to delete from the list. - * Note: list_empty on entry does not return true after this, the entry is - * in an undefined state. - */ -void list_del(struct list_head *entry) -{ - if (unlikely(entry->prev->next != entry)) { - printk(KERN_ERR "list_del corruption. prev->next should be %p, but was %p\n", - entry, entry->prev->next); - BUG(); - } - if (unlikely(entry->next->prev != entry)) { - printk(KERN_ERR "list_del corruption. next->prev should be %p, but was %p\n", - entry, entry->next->prev); - BUG(); - } - __list_del(entry->prev, entry->next); - entry->next = LIST_POISON1; - entry->prev = LIST_POISON2; -} -EXPORT_SYMBOL(list_del); - diff --git a/lib/locking-selftest-hardirq.h b/lib/locking-selftest-hardirq.h deleted file mode 100644 index 10d4a150b..000000000 --- a/lib/locking-selftest-hardirq.h +++ /dev/null @@ -1,9 +0,0 @@ -#undef IRQ_DISABLE -#undef IRQ_ENABLE -#undef IRQ_ENTER -#undef IRQ_EXIT - -#define IRQ_ENABLE HARDIRQ_ENABLE -#define IRQ_DISABLE HARDIRQ_DISABLE -#define IRQ_ENTER HARDIRQ_ENTER -#define IRQ_EXIT HARDIRQ_EXIT diff --git a/lib/locking-selftest-mutex.h b/lib/locking-selftest-mutex.h deleted file mode 100644 index 68601b6f5..000000000 --- a/lib/locking-selftest-mutex.h +++ /dev/null @@ -1,11 +0,0 @@ -#undef LOCK -#define LOCK ML - -#undef UNLOCK -#define UNLOCK MU - -#undef RLOCK -#undef WLOCK - -#undef INIT -#define INIT MI diff --git a/lib/locking-selftest-rlock-hardirq.h b/lib/locking-selftest-rlock-hardirq.h deleted file mode 100644 index 9f517ebcb..000000000 --- a/lib/locking-selftest-rlock-hardirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-rlock.h" -#include "locking-selftest-hardirq.h" diff --git a/lib/locking-selftest-rlock-softirq.h b/lib/locking-selftest-rlock-softirq.h deleted file mode 100644 index 981455db7..000000000 --- a/lib/locking-selftest-rlock-softirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-rlock.h" -#include "locking-selftest-softirq.h" diff --git a/lib/locking-selftest-rlock.h b/lib/locking-selftest-rlock.h deleted file mode 100644 index 6789044f4..000000000 --- a/lib/locking-selftest-rlock.h +++ /dev/null @@ -1,14 +0,0 @@ -#undef LOCK -#define LOCK RL - -#undef UNLOCK -#define UNLOCK RU - -#undef RLOCK -#define RLOCK RL - -#undef WLOCK -#define WLOCK WL - -#undef INIT -#define INIT RWI diff --git a/lib/locking-selftest-rsem.h b/lib/locking-selftest-rsem.h deleted file mode 100644 index 62da88668..000000000 --- a/lib/locking-selftest-rsem.h +++ /dev/null @@ -1,14 +0,0 @@ -#undef LOCK -#define LOCK RSL - -#undef UNLOCK -#define UNLOCK RSU - -#undef RLOCK -#define RLOCK RSL - -#undef WLOCK -#define WLOCK WSL - -#undef INIT -#define INIT RWSI diff --git a/lib/locking-selftest-softirq.h b/lib/locking-selftest-softirq.h deleted file mode 100644 index a83de2a04..000000000 --- a/lib/locking-selftest-softirq.h +++ /dev/null @@ -1,9 +0,0 @@ -#undef IRQ_DISABLE -#undef IRQ_ENABLE -#undef IRQ_ENTER -#undef IRQ_EXIT - -#define IRQ_DISABLE SOFTIRQ_DISABLE -#define IRQ_ENABLE SOFTIRQ_ENABLE -#define IRQ_ENTER SOFTIRQ_ENTER -#define IRQ_EXIT SOFTIRQ_EXIT diff --git a/lib/locking-selftest-spin-hardirq.h b/lib/locking-selftest-spin-hardirq.h deleted file mode 100644 index 693198dce..000000000 --- a/lib/locking-selftest-spin-hardirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-spin.h" -#include "locking-selftest-hardirq.h" diff --git a/lib/locking-selftest-spin-softirq.h b/lib/locking-selftest-spin-softirq.h deleted file mode 100644 index c472e2a87..000000000 --- a/lib/locking-selftest-spin-softirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-spin.h" -#include "locking-selftest-softirq.h" diff --git a/lib/locking-selftest-spin.h b/lib/locking-selftest-spin.h deleted file mode 100644 index ccd1b4b09..000000000 --- a/lib/locking-selftest-spin.h +++ /dev/null @@ -1,11 +0,0 @@ -#undef LOCK -#define LOCK L - -#undef UNLOCK -#define UNLOCK U - -#undef RLOCK -#undef WLOCK - -#undef INIT -#define INIT SI diff --git a/lib/locking-selftest-wlock-hardirq.h b/lib/locking-selftest-wlock-hardirq.h deleted file mode 100644 index 2dd2e5122..000000000 --- a/lib/locking-selftest-wlock-hardirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-wlock.h" -#include "locking-selftest-hardirq.h" diff --git a/lib/locking-selftest-wlock-softirq.h b/lib/locking-selftest-wlock-softirq.h deleted file mode 100644 index cb80d1cb9..000000000 --- a/lib/locking-selftest-wlock-softirq.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "locking-selftest-wlock.h" -#include "locking-selftest-softirq.h" diff --git a/lib/locking-selftest-wlock.h b/lib/locking-selftest-wlock.h deleted file mode 100644 index 0815322d9..000000000 --- a/lib/locking-selftest-wlock.h +++ /dev/null @@ -1,14 +0,0 @@ -#undef LOCK -#define LOCK WL - -#undef UNLOCK -#define UNLOCK WU - -#undef RLOCK -#define RLOCK RL - -#undef WLOCK -#define WLOCK WL - -#undef INIT -#define INIT RWI diff --git a/lib/locking-selftest-wsem.h b/lib/locking-selftest-wsem.h deleted file mode 100644 index b88c5f2dc..000000000 --- a/lib/locking-selftest-wsem.h +++ /dev/null @@ -1,14 +0,0 @@ -#undef LOCK -#define LOCK WSL - -#undef UNLOCK -#define UNLOCK WSU - -#undef RLOCK -#define RLOCK RSL - -#undef WLOCK -#define WLOCK WSL - -#undef INIT -#define INIT RWSI diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c deleted file mode 100644 index 7945787f4..000000000 --- a/lib/locking-selftest.c +++ /dev/null @@ -1,1216 +0,0 @@ -/* - * lib/locking-selftest.c - * - * Testsuite for various locking APIs: spinlocks, rwlocks, - * mutexes and rw-semaphores. - * - * It is checking both false positives and false negatives. - * - * Started by Ingo Molnar: - * - * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Change this to 1 if you want to see the failure printouts: - */ -static unsigned int debug_locks_verbose; - -static int __init setup_debug_locks_verbose(char *str) -{ - get_option(&str, &debug_locks_verbose); - - return 1; -} - -__setup("debug_locks_verbose=", setup_debug_locks_verbose); - -#define FAILURE 0 -#define SUCCESS 1 - -#define LOCKTYPE_SPIN 0x1 -#define LOCKTYPE_RWLOCK 0x2 -#define LOCKTYPE_MUTEX 0x4 -#define LOCKTYPE_RWSEM 0x8 - -/* - * Normal standalone locks, for the circular and irq-context - * dependency tests: - */ -static DEFINE_SPINLOCK(lock_A); -static DEFINE_SPINLOCK(lock_B); -static DEFINE_SPINLOCK(lock_C); -static DEFINE_SPINLOCK(lock_D); - -static DEFINE_RWLOCK(rwlock_A); -static DEFINE_RWLOCK(rwlock_B); -static DEFINE_RWLOCK(rwlock_C); -static DEFINE_RWLOCK(rwlock_D); - -static DEFINE_MUTEX(mutex_A); -static DEFINE_MUTEX(mutex_B); -static DEFINE_MUTEX(mutex_C); -static DEFINE_MUTEX(mutex_D); - -static DECLARE_RWSEM(rwsem_A); -static DECLARE_RWSEM(rwsem_B); -static DECLARE_RWSEM(rwsem_C); -static DECLARE_RWSEM(rwsem_D); - -/* - * Locks that we initialize dynamically as well so that - * e.g. X1 and X2 becomes two instances of the same class, - * but X* and Y* are different classes. We do this so that - * we do not trigger a real lockup: - */ -static DEFINE_SPINLOCK(lock_X1); -static DEFINE_SPINLOCK(lock_X2); -static DEFINE_SPINLOCK(lock_Y1); -static DEFINE_SPINLOCK(lock_Y2); -static DEFINE_SPINLOCK(lock_Z1); -static DEFINE_SPINLOCK(lock_Z2); - -static DEFINE_RWLOCK(rwlock_X1); -static DEFINE_RWLOCK(rwlock_X2); -static DEFINE_RWLOCK(rwlock_Y1); -static DEFINE_RWLOCK(rwlock_Y2); -static DEFINE_RWLOCK(rwlock_Z1); -static DEFINE_RWLOCK(rwlock_Z2); - -static DEFINE_MUTEX(mutex_X1); -static DEFINE_MUTEX(mutex_X2); -static DEFINE_MUTEX(mutex_Y1); -static DEFINE_MUTEX(mutex_Y2); -static DEFINE_MUTEX(mutex_Z1); -static DEFINE_MUTEX(mutex_Z2); - -static DECLARE_RWSEM(rwsem_X1); -static DECLARE_RWSEM(rwsem_X2); -static DECLARE_RWSEM(rwsem_Y1); -static DECLARE_RWSEM(rwsem_Y2); -static DECLARE_RWSEM(rwsem_Z1); -static DECLARE_RWSEM(rwsem_Z2); - -/* - * non-inlined runtime initializers, to let separate locks share - * the same lock-class: - */ -#define INIT_CLASS_FUNC(class) \ -static noinline void \ -init_class_##class(spinlock_t *lock, rwlock_t *rwlock, struct mutex *mutex, \ - struct rw_semaphore *rwsem) \ -{ \ - spin_lock_init(lock); \ - rwlock_init(rwlock); \ - mutex_init(mutex); \ - init_rwsem(rwsem); \ -} - -INIT_CLASS_FUNC(X) -INIT_CLASS_FUNC(Y) -INIT_CLASS_FUNC(Z) - -static void init_shared_classes(void) -{ - init_class_X(&lock_X1, &rwlock_X1, &mutex_X1, &rwsem_X1); - init_class_X(&lock_X2, &rwlock_X2, &mutex_X2, &rwsem_X2); - - init_class_Y(&lock_Y1, &rwlock_Y1, &mutex_Y1, &rwsem_Y1); - init_class_Y(&lock_Y2, &rwlock_Y2, &mutex_Y2, &rwsem_Y2); - - init_class_Z(&lock_Z1, &rwlock_Z1, &mutex_Z1, &rwsem_Z1); - init_class_Z(&lock_Z2, &rwlock_Z2, &mutex_Z2, &rwsem_Z2); -} - -/* - * For spinlocks and rwlocks we also do hardirq-safe / softirq-safe tests. - * The following functions use a lock from a simulated hardirq/softirq - * context, causing the locks to be marked as hardirq-safe/softirq-safe: - */ - -#define HARDIRQ_DISABLE local_irq_disable -#define HARDIRQ_ENABLE local_irq_enable - -#define HARDIRQ_ENTER() \ - local_irq_disable(); \ - irq_enter(); \ - WARN_ON(!in_irq()); - -#define HARDIRQ_EXIT() \ - __irq_exit(); \ - local_irq_enable(); - -#define SOFTIRQ_DISABLE local_bh_disable -#define SOFTIRQ_ENABLE local_bh_enable - -#define SOFTIRQ_ENTER() \ - local_bh_disable(); \ - local_irq_disable(); \ - trace_softirq_enter(); \ - WARN_ON(!in_softirq()); - -#define SOFTIRQ_EXIT() \ - trace_softirq_exit(); \ - local_irq_enable(); \ - local_bh_enable(); - -/* - * Shortcuts for lock/unlock API variants, to keep - * the testcases compact: - */ -#define L(x) spin_lock(&lock_##x) -#define U(x) spin_unlock(&lock_##x) -#define LU(x) L(x); U(x) -#define SI(x) spin_lock_init(&lock_##x) - -#define WL(x) write_lock(&rwlock_##x) -#define WU(x) write_unlock(&rwlock_##x) -#define WLU(x) WL(x); WU(x) - -#define RL(x) read_lock(&rwlock_##x) -#define RU(x) read_unlock(&rwlock_##x) -#define RLU(x) RL(x); RU(x) -#define RWI(x) rwlock_init(&rwlock_##x) - -#define ML(x) mutex_lock(&mutex_##x) -#define MU(x) mutex_unlock(&mutex_##x) -#define MI(x) mutex_init(&mutex_##x) - -#define WSL(x) down_write(&rwsem_##x) -#define WSU(x) up_write(&rwsem_##x) - -#define RSL(x) down_read(&rwsem_##x) -#define RSU(x) up_read(&rwsem_##x) -#define RWSI(x) init_rwsem(&rwsem_##x) - -#define LOCK_UNLOCK_2(x,y) LOCK(x); LOCK(y); UNLOCK(y); UNLOCK(x) - -/* - * Generate different permutations of the same testcase, using - * the same basic lock-dependency/state events: - */ - -#define GENERATE_TESTCASE(name) \ - \ -static void name(void) { E(); } - -#define GENERATE_PERMUTATIONS_2_EVENTS(name) \ - \ -static void name##_12(void) { E1(); E2(); } \ -static void name##_21(void) { E2(); E1(); } - -#define GENERATE_PERMUTATIONS_3_EVENTS(name) \ - \ -static void name##_123(void) { E1(); E2(); E3(); } \ -static void name##_132(void) { E1(); E3(); E2(); } \ -static void name##_213(void) { E2(); E1(); E3(); } \ -static void name##_231(void) { E2(); E3(); E1(); } \ -static void name##_312(void) { E3(); E1(); E2(); } \ -static void name##_321(void) { E3(); E2(); E1(); } - -/* - * AA deadlock: - */ - -#define E() \ - \ - LOCK(X1); \ - LOCK(X2); /* this one should fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(AA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(AA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(AA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(AA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(AA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(AA_rsem) - -#undef E - -/* - * Special-case for read-locking, they are - * allowed to recurse on the same lock class: - */ -static void rlock_AA1(void) -{ - RL(X1); - RL(X1); // this one should NOT fail -} - -static void rlock_AA1B(void) -{ - RL(X1); - RL(X2); // this one should NOT fail -} - -static void rsem_AA1(void) -{ - RSL(X1); - RSL(X1); // this one should fail -} - -static void rsem_AA1B(void) -{ - RSL(X1); - RSL(X2); // this one should fail -} -/* - * The mixing of read and write locks is not allowed: - */ -static void rlock_AA2(void) -{ - RL(X1); - WL(X2); // this one should fail -} - -static void rsem_AA2(void) -{ - RSL(X1); - WSL(X2); // this one should fail -} - -static void rlock_AA3(void) -{ - WL(X1); - RL(X2); // this one should fail -} - -static void rsem_AA3(void) -{ - WSL(X1); - RSL(X2); // this one should fail -} - -/* - * ABBA deadlock: - */ - -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(B, A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABBA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABBA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABBA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABBA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABBA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABBA_rsem) - -#undef E - -/* - * AB BC CA deadlock: - */ - -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(B, C); \ - LOCK_UNLOCK_2(C, A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABBCCA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABBCCA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABBCCA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABBCCA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABBCCA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABBCCA_rsem) - -#undef E - -/* - * AB CA BC deadlock: - */ - -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(C, A); \ - LOCK_UNLOCK_2(B, C); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABCABC_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABCABC_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABCABC_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABCABC_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABCABC_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABCABC_rsem) - -#undef E - -/* - * AB BC CD DA deadlock: - */ - -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(B, C); \ - LOCK_UNLOCK_2(C, D); \ - LOCK_UNLOCK_2(D, A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABBCCDDA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABBCCDDA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABBCCDDA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABBCCDDA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABBCCDDA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABBCCDDA_rsem) - -#undef E - -/* - * AB CD BD DA deadlock: - */ -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(C, D); \ - LOCK_UNLOCK_2(B, D); \ - LOCK_UNLOCK_2(D, A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABCDBDDA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABCDBDDA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABCDBDDA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABCDBDDA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABCDBDDA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABCDBDDA_rsem) - -#undef E - -/* - * AB CD BC DA deadlock: - */ -#define E() \ - \ - LOCK_UNLOCK_2(A, B); \ - LOCK_UNLOCK_2(C, D); \ - LOCK_UNLOCK_2(B, C); \ - LOCK_UNLOCK_2(D, A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(ABCDBCDA_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(ABCDBCDA_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(ABCDBCDA_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(ABCDBCDA_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(ABCDBCDA_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(ABCDBCDA_rsem) - -#undef E - -/* - * Double unlock: - */ -#define E() \ - \ - LOCK(A); \ - UNLOCK(A); \ - UNLOCK(A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(double_unlock_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(double_unlock_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(double_unlock_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(double_unlock_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(double_unlock_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(double_unlock_rsem) - -#undef E - -/* - * Bad unlock ordering: - */ -#define E() \ - \ - LOCK(A); \ - LOCK(B); \ - UNLOCK(A); /* fail */ \ - UNLOCK(B); - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(bad_unlock_order_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(bad_unlock_order_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(bad_unlock_order_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(bad_unlock_order_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(bad_unlock_order_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(bad_unlock_order_rsem) - -#undef E - -/* - * initializing a held lock: - */ -#define E() \ - \ - LOCK(A); \ - INIT(A); /* fail */ - -/* - * 6 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_TESTCASE(init_held_spin) -#include "locking-selftest-wlock.h" -GENERATE_TESTCASE(init_held_wlock) -#include "locking-selftest-rlock.h" -GENERATE_TESTCASE(init_held_rlock) -#include "locking-selftest-mutex.h" -GENERATE_TESTCASE(init_held_mutex) -#include "locking-selftest-wsem.h" -GENERATE_TESTCASE(init_held_wsem) -#include "locking-selftest-rsem.h" -GENERATE_TESTCASE(init_held_rsem) - -#undef E - -/* - * locking an irq-safe lock with irqs enabled: - */ -#define E1() \ - \ - IRQ_ENTER(); \ - LOCK(A); \ - UNLOCK(A); \ - IRQ_EXIT(); - -#define E2() \ - \ - LOCK(A); \ - UNLOCK(A); - -/* - * Generate 24 testcases: - */ -#include "locking-selftest-spin-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin) - -#include "locking-selftest-rlock-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock) - -#include "locking-selftest-wlock-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_wlock) - -#include "locking-selftest-spin-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_spin) - -#include "locking-selftest-rlock-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_rlock) - -#include "locking-selftest-wlock-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock) - -#undef E1 -#undef E2 - -/* - * Enabling hardirqs with a softirq-safe lock held: - */ -#define E1() \ - \ - SOFTIRQ_ENTER(); \ - LOCK(A); \ - UNLOCK(A); \ - SOFTIRQ_EXIT(); - -#define E2() \ - \ - HARDIRQ_DISABLE(); \ - LOCK(A); \ - HARDIRQ_ENABLE(); \ - UNLOCK(A); - -/* - * Generate 12 testcases: - */ -#include "locking-selftest-spin.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_spin) - -#include "locking-selftest-wlock.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_wlock) - -#include "locking-selftest-rlock.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_rlock) - -#undef E1 -#undef E2 - -/* - * Enabling irqs with an irq-safe lock held: - */ -#define E1() \ - \ - IRQ_ENTER(); \ - LOCK(A); \ - UNLOCK(A); \ - IRQ_EXIT(); - -#define E2() \ - \ - IRQ_DISABLE(); \ - LOCK(A); \ - IRQ_ENABLE(); \ - UNLOCK(A); - -/* - * Generate 24 testcases: - */ -#include "locking-selftest-spin-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin) - -#include "locking-selftest-rlock-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock) - -#include "locking-selftest-wlock-hardirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_wlock) - -#include "locking-selftest-spin-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_spin) - -#include "locking-selftest-rlock-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_rlock) - -#include "locking-selftest-wlock-softirq.h" -GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock) - -#undef E1 -#undef E2 - -/* - * Acquiring a irq-unsafe lock while holding an irq-safe-lock: - */ -#define E1() \ - \ - LOCK(A); \ - LOCK(B); \ - UNLOCK(B); \ - UNLOCK(A); \ - -#define E2() \ - \ - LOCK(B); \ - UNLOCK(B); - -#define E3() \ - \ - IRQ_ENTER(); \ - LOCK(A); \ - UNLOCK(A); \ - IRQ_EXIT(); - -/* - * Generate 36 testcases: - */ -#include "locking-selftest-spin-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin) - -#include "locking-selftest-rlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock) - -#include "locking-selftest-wlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_wlock) - -#include "locking-selftest-spin-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_spin) - -#include "locking-selftest-rlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_rlock) - -#include "locking-selftest-wlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock) - -#undef E1 -#undef E2 -#undef E3 - -/* - * If a lock turns into softirq-safe, but earlier it took - * a softirq-unsafe lock: - */ - -#define E1() \ - IRQ_DISABLE(); \ - LOCK(A); \ - LOCK(B); \ - UNLOCK(B); \ - UNLOCK(A); \ - IRQ_ENABLE(); - -#define E2() \ - LOCK(B); \ - UNLOCK(B); - -#define E3() \ - IRQ_ENTER(); \ - LOCK(A); \ - UNLOCK(A); \ - IRQ_EXIT(); - -/* - * Generate 36 testcases: - */ -#include "locking-selftest-spin-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin) - -#include "locking-selftest-rlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock) - -#include "locking-selftest-wlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_wlock) - -#include "locking-selftest-spin-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_spin) - -#include "locking-selftest-rlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_rlock) - -#include "locking-selftest-wlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock) - -#undef E1 -#undef E2 -#undef E3 - -/* - * read-lock / write-lock irq inversion. - * - * Deadlock scenario: - * - * CPU#1 is at #1, i.e. it has write-locked A, but has not - * taken B yet. - * - * CPU#2 is at #2, i.e. it has locked B. - * - * Hardirq hits CPU#2 at point #2 and is trying to read-lock A. - * - * The deadlock occurs because CPU#1 will spin on B, and CPU#2 - * will spin on A. - */ - -#define E1() \ - \ - IRQ_DISABLE(); \ - WL(A); \ - LOCK(B); \ - UNLOCK(B); \ - WU(A); \ - IRQ_ENABLE(); - -#define E2() \ - \ - LOCK(B); \ - UNLOCK(B); - -#define E3() \ - \ - IRQ_ENTER(); \ - RL(A); \ - RU(A); \ - IRQ_EXIT(); - -/* - * Generate 36 testcases: - */ -#include "locking-selftest-spin-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_spin) - -#include "locking-selftest-rlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_rlock) - -#include "locking-selftest-wlock-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_hard_wlock) - -#include "locking-selftest-spin-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_spin) - -#include "locking-selftest-rlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_rlock) - -#include "locking-selftest-wlock-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_wlock) - -#undef E1 -#undef E2 -#undef E3 - -/* - * read-lock / write-lock recursion that is actually safe. - */ - -#define E1() \ - \ - IRQ_DISABLE(); \ - WL(A); \ - WU(A); \ - IRQ_ENABLE(); - -#define E2() \ - \ - RL(A); \ - RU(A); \ - -#define E3() \ - \ - IRQ_ENTER(); \ - RL(A); \ - L(B); \ - U(B); \ - RU(A); \ - IRQ_EXIT(); - -/* - * Generate 12 testcases: - */ -#include "locking-selftest-hardirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_hard) - -#include "locking-selftest-softirq.h" -GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_soft) - -#undef E1 -#undef E2 -#undef E3 - -/* - * read-lock / write-lock recursion that is unsafe. - */ - -#define E1() \ - \ - IRQ_DISABLE(); \ - L(B); \ - WL(A); \ - WU(A); \ - U(B); \ - IRQ_ENABLE(); - -#define E2() \ - \ - RL(A); \ - RU(A); \ - -#define E3() \ - \ - IRQ_ENTER(); \ - L(B); \ - U(B); \ - IRQ_EXIT(); - -/* - * Generate 12 testcases: - */ -#include "locking-selftest-hardirq.h" -// GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_hard) - -#include "locking-selftest-softirq.h" -// GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion2_soft) - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# define I_SPINLOCK(x) lockdep_reset_lock(&lock_##x.dep_map) -# define I_RWLOCK(x) lockdep_reset_lock(&rwlock_##x.dep_map) -# define I_MUTEX(x) lockdep_reset_lock(&mutex_##x.dep_map) -# define I_RWSEM(x) lockdep_reset_lock(&rwsem_##x.dep_map) -#else -# define I_SPINLOCK(x) -# define I_RWLOCK(x) -# define I_MUTEX(x) -# define I_RWSEM(x) -#endif - -#define I1(x) \ - do { \ - I_SPINLOCK(x); \ - I_RWLOCK(x); \ - I_MUTEX(x); \ - I_RWSEM(x); \ - } while (0) - -#define I2(x) \ - do { \ - spin_lock_init(&lock_##x); \ - rwlock_init(&rwlock_##x); \ - mutex_init(&mutex_##x); \ - init_rwsem(&rwsem_##x); \ - } while (0) - -static void reset_locks(void) -{ - local_irq_disable(); - I1(A); I1(B); I1(C); I1(D); - I1(X1); I1(X2); I1(Y1); I1(Y2); I1(Z1); I1(Z2); - lockdep_reset(); - I2(A); I2(B); I2(C); I2(D); - init_shared_classes(); - local_irq_enable(); -} - -#undef I - -static int testcase_total; -static int testcase_successes; -static int expected_testcase_failures; -static int unexpected_testcase_failures; - -static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) -{ - unsigned long saved_preempt_count = preempt_count(); - int expected_failure = 0; - - WARN_ON(irqs_disabled()); - - testcase_fn(); - /* - * Filter out expected failures: - */ -#ifndef CONFIG_PROVE_LOCKING - if ((lockclass_mask & LOCKTYPE_SPIN) && debug_locks != expected) - expected_failure = 1; - if ((lockclass_mask & LOCKTYPE_RWLOCK) && debug_locks != expected) - expected_failure = 1; - if ((lockclass_mask & LOCKTYPE_MUTEX) && debug_locks != expected) - expected_failure = 1; - if ((lockclass_mask & LOCKTYPE_RWSEM) && debug_locks != expected) - expected_failure = 1; -#endif - if (debug_locks != expected) { - if (expected_failure) { - expected_testcase_failures++; - printk("failed|"); - } else { - unexpected_testcase_failures++; - printk("FAILED|"); - } - } else { - testcase_successes++; - printk(" ok |"); - } - testcase_total++; - - if (debug_locks_verbose) - printk(" lockclass mask: %x, debug_locks: %d, expected: %d\n", - lockclass_mask, debug_locks, expected); - /* - * Some tests (e.g. double-unlock) might corrupt the preemption - * count, so restore it: - */ - preempt_count() = saved_preempt_count; -#ifdef CONFIG_TRACE_IRQFLAGS - if (softirq_count()) - current->softirqs_enabled = 0; - else - current->softirqs_enabled = 1; -#endif - - reset_locks(); -} - -static inline void print_testname(const char *testname) -{ - printk("%33s:", testname); -} - -#define DO_TESTCASE_1(desc, name, nr) \ - print_testname(desc"/"#nr); \ - dotest(name##_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ - printk("\n"); - -#define DO_TESTCASE_1B(desc, name, nr) \ - print_testname(desc"/"#nr); \ - dotest(name##_##nr, FAILURE, LOCKTYPE_RWLOCK); \ - printk("\n"); - -#define DO_TESTCASE_3(desc, name, nr) \ - print_testname(desc"/"#nr); \ - dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN); \ - dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ - dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ - printk("\n"); - -#define DO_TESTCASE_3RW(desc, name, nr) \ - print_testname(desc"/"#nr); \ - dotest(name##_spin_##nr, FAILURE, LOCKTYPE_SPIN|LOCKTYPE_RWLOCK);\ - dotest(name##_wlock_##nr, FAILURE, LOCKTYPE_RWLOCK); \ - dotest(name##_rlock_##nr, SUCCESS, LOCKTYPE_RWLOCK); \ - printk("\n"); - -#define DO_TESTCASE_6(desc, name) \ - print_testname(desc); \ - dotest(name##_spin, FAILURE, LOCKTYPE_SPIN); \ - dotest(name##_wlock, FAILURE, LOCKTYPE_RWLOCK); \ - dotest(name##_rlock, FAILURE, LOCKTYPE_RWLOCK); \ - dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ - dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ - dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ - printk("\n"); - -#define DO_TESTCASE_6_SUCCESS(desc, name) \ - print_testname(desc); \ - dotest(name##_spin, SUCCESS, LOCKTYPE_SPIN); \ - dotest(name##_wlock, SUCCESS, LOCKTYPE_RWLOCK); \ - dotest(name##_rlock, SUCCESS, LOCKTYPE_RWLOCK); \ - dotest(name##_mutex, SUCCESS, LOCKTYPE_MUTEX); \ - dotest(name##_wsem, SUCCESS, LOCKTYPE_RWSEM); \ - dotest(name##_rsem, SUCCESS, LOCKTYPE_RWSEM); \ - printk("\n"); - -/* - * 'read' variant: rlocks must not trigger. - */ -#define DO_TESTCASE_6R(desc, name) \ - print_testname(desc); \ - dotest(name##_spin, FAILURE, LOCKTYPE_SPIN); \ - dotest(name##_wlock, FAILURE, LOCKTYPE_RWLOCK); \ - dotest(name##_rlock, SUCCESS, LOCKTYPE_RWLOCK); \ - dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX); \ - dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM); \ - dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM); \ - printk("\n"); - -#define DO_TESTCASE_2I(desc, name, nr) \ - DO_TESTCASE_1("hard-"desc, name##_hard, nr); \ - DO_TESTCASE_1("soft-"desc, name##_soft, nr); - -#define DO_TESTCASE_2IB(desc, name, nr) \ - DO_TESTCASE_1B("hard-"desc, name##_hard, nr); \ - DO_TESTCASE_1B("soft-"desc, name##_soft, nr); - -#define DO_TESTCASE_6I(desc, name, nr) \ - DO_TESTCASE_3("hard-"desc, name##_hard, nr); \ - DO_TESTCASE_3("soft-"desc, name##_soft, nr); - -#define DO_TESTCASE_6IRW(desc, name, nr) \ - DO_TESTCASE_3RW("hard-"desc, name##_hard, nr); \ - DO_TESTCASE_3RW("soft-"desc, name##_soft, nr); - -#define DO_TESTCASE_2x3(desc, name) \ - DO_TESTCASE_3(desc, name, 12); \ - DO_TESTCASE_3(desc, name, 21); - -#define DO_TESTCASE_2x6(desc, name) \ - DO_TESTCASE_6I(desc, name, 12); \ - DO_TESTCASE_6I(desc, name, 21); - -#define DO_TESTCASE_6x2(desc, name) \ - DO_TESTCASE_2I(desc, name, 123); \ - DO_TESTCASE_2I(desc, name, 132); \ - DO_TESTCASE_2I(desc, name, 213); \ - DO_TESTCASE_2I(desc, name, 231); \ - DO_TESTCASE_2I(desc, name, 312); \ - DO_TESTCASE_2I(desc, name, 321); - -#define DO_TESTCASE_6x2B(desc, name) \ - DO_TESTCASE_2IB(desc, name, 123); \ - DO_TESTCASE_2IB(desc, name, 132); \ - DO_TESTCASE_2IB(desc, name, 213); \ - DO_TESTCASE_2IB(desc, name, 231); \ - DO_TESTCASE_2IB(desc, name, 312); \ - DO_TESTCASE_2IB(desc, name, 321); - -#define DO_TESTCASE_6x6(desc, name) \ - DO_TESTCASE_6I(desc, name, 123); \ - DO_TESTCASE_6I(desc, name, 132); \ - DO_TESTCASE_6I(desc, name, 213); \ - DO_TESTCASE_6I(desc, name, 231); \ - DO_TESTCASE_6I(desc, name, 312); \ - DO_TESTCASE_6I(desc, name, 321); - -#define DO_TESTCASE_6x6RW(desc, name) \ - DO_TESTCASE_6IRW(desc, name, 123); \ - DO_TESTCASE_6IRW(desc, name, 132); \ - DO_TESTCASE_6IRW(desc, name, 213); \ - DO_TESTCASE_6IRW(desc, name, 231); \ - DO_TESTCASE_6IRW(desc, name, 312); \ - DO_TESTCASE_6IRW(desc, name, 321); - - -void locking_selftest(void) -{ - /* - * Got a locking failure before the selftest ran? - */ - if (!debug_locks) { - printk("----------------------------------\n"); - printk("| Locking API testsuite disabled |\n"); - printk("----------------------------------\n"); - return; - } - - /* - * Run the testsuite: - */ - printk("------------------------\n"); - printk("| Locking API testsuite:\n"); - printk("----------------------------------------------------------------------------\n"); - printk(" | spin |wlock |rlock |mutex | wsem | rsem |\n"); - printk(" --------------------------------------------------------------------------\n"); - - init_shared_classes(); - debug_locks_silent = !debug_locks_verbose; - - DO_TESTCASE_6R("A-A deadlock", AA); - DO_TESTCASE_6R("A-B-B-A deadlock", ABBA); - DO_TESTCASE_6R("A-B-B-C-C-A deadlock", ABBCCA); - DO_TESTCASE_6R("A-B-C-A-B-C deadlock", ABCABC); - DO_TESTCASE_6R("A-B-B-C-C-D-D-A deadlock", ABBCCDDA); - DO_TESTCASE_6R("A-B-C-D-B-D-D-A deadlock", ABCDBDDA); - DO_TESTCASE_6R("A-B-C-D-B-C-D-A deadlock", ABCDBCDA); - DO_TESTCASE_6("double unlock", double_unlock); - DO_TESTCASE_6("initialize held", init_held); - DO_TESTCASE_6_SUCCESS("bad unlock order", bad_unlock_order); - - printk(" --------------------------------------------------------------------------\n"); - print_testname("recursive read-lock"); - printk(" |"); - dotest(rlock_AA1, SUCCESS, LOCKTYPE_RWLOCK); - printk(" |"); - dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM); - printk("\n"); - - print_testname("recursive read-lock #2"); - printk(" |"); - dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK); - printk(" |"); - dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM); - printk("\n"); - - print_testname("mixed read-write-lock"); - printk(" |"); - dotest(rlock_AA2, FAILURE, LOCKTYPE_RWLOCK); - printk(" |"); - dotest(rsem_AA2, FAILURE, LOCKTYPE_RWSEM); - printk("\n"); - - print_testname("mixed write-read-lock"); - printk(" |"); - dotest(rlock_AA3, FAILURE, LOCKTYPE_RWLOCK); - printk(" |"); - dotest(rsem_AA3, FAILURE, LOCKTYPE_RWSEM); - printk("\n"); - - printk(" --------------------------------------------------------------------------\n"); - - /* - * irq-context testcases: - */ - DO_TESTCASE_2x6("irqs-on + irq-safe-A", irqsafe1); - DO_TESTCASE_2x3("sirq-safe-A => hirqs-on", irqsafe2A); - DO_TESTCASE_2x6("safe-A + irqs-on", irqsafe2B); - DO_TESTCASE_6x6("safe-A + unsafe-B #1", irqsafe3); - DO_TESTCASE_6x6("safe-A + unsafe-B #2", irqsafe4); - DO_TESTCASE_6x6RW("irq lock-inversion", irq_inversion); - - DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion); -// DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2); - - if (unexpected_testcase_failures) { - printk("-----------------------------------------------------------------\n"); - debug_locks = 0; - printk("BUG: %3d unexpected failures (out of %3d) - debugging disabled! |\n", - unexpected_testcase_failures, testcase_total); - printk("-----------------------------------------------------------------\n"); - } else if (expected_testcase_failures && testcase_successes) { - printk("--------------------------------------------------------\n"); - printk("%3d out of %3d testcases failed, as expected. |\n", - expected_testcase_failures, testcase_total); - printk("----------------------------------------------------\n"); - debug_locks = 1; - } else if (expected_testcase_failures && !testcase_successes) { - printk("--------------------------------------------------------\n"); - printk("All %3d testcases failed, as expected. |\n", - expected_testcase_failures); - printk("----------------------------------------\n"); - debug_locks = 1; - } else { - printk("-------------------------------------------------------\n"); - printk("Good, all %3d testcases passed! |\n", - testcase_successes); - printk("---------------------------------\n"); - debug_locks = 1; - } - debug_locks_silent = 0; -} diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c deleted file mode 100644 index 850449080..000000000 --- a/lib/percpu_counter.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Fast batching percpu counters. - */ - -#include -#include - -void percpu_counter_mod(struct percpu_counter *fbc, s32 amount) -{ - long count; - s32 *pcount; - int cpu = get_cpu(); - - pcount = per_cpu_ptr(fbc->counters, cpu); - count = *pcount + amount; - if (count >= FBC_BATCH || count <= -FBC_BATCH) { - spin_lock(&fbc->lock); - fbc->count += count; - *pcount = 0; - spin_unlock(&fbc->lock); - } else { - *pcount = count; - } - put_cpu(); -} -EXPORT_SYMBOL(percpu_counter_mod); - -/* - * Add up all the per-cpu counts, return the result. This is a more accurate - * but much slower version of percpu_counter_read_positive() - */ -s64 percpu_counter_sum(struct percpu_counter *fbc) -{ - s64 ret; - int cpu; - - spin_lock(&fbc->lock); - ret = fbc->count; - for_each_possible_cpu(cpu) { - s32 *pcount = per_cpu_ptr(fbc->counters, cpu); - ret += *pcount; - } - spin_unlock(&fbc->lock); - return ret < 0 ? 0 : ret; -} -EXPORT_SYMBOL(percpu_counter_sum); diff --git a/lib/plist.c b/lib/plist.c deleted file mode 100644 index 3074a0227..000000000 --- a/lib/plist.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * lib/plist.c - * - * Descending-priority-sorted double-linked list - * - * (C) 2002-2003 Intel Corp - * Inaky Perez-Gonzalez . - * - * 2001-2005 (c) MontaVista Software, Inc. - * Daniel Walker - * - * (C) 2005 Thomas Gleixner - * - * Simplifications of the original code by - * Oleg Nesterov - * - * Licensed under the FSF's GNU Public License v2 or later. - * - * Based on simple lists (include/linux/list.h). - * - * This file contains the add / del functions which are considered to - * be too large to inline. See include/linux/plist.h for further - * information. - */ - -#include -#include - -#ifdef CONFIG_DEBUG_PI_LIST - -static void plist_check_prev_next(struct list_head *t, struct list_head *p, - struct list_head *n) -{ - if (n->prev != p || p->next != n) { - printk("top: %p, n: %p, p: %p\n", t, t->next, t->prev); - printk("prev: %p, n: %p, p: %p\n", p, p->next, p->prev); - printk("next: %p, n: %p, p: %p\n", n, n->next, n->prev); - WARN_ON(1); - } -} - -static void plist_check_list(struct list_head *top) -{ - struct list_head *prev = top, *next = top->next; - - plist_check_prev_next(top, prev, next); - while (next != top) { - prev = next; - next = prev->next; - plist_check_prev_next(top, prev, next); - } -} - -static void plist_check_head(struct plist_head *head) -{ - WARN_ON(!head->lock); - if (head->lock) - WARN_ON_SMP(!spin_is_locked(head->lock)); - plist_check_list(&head->prio_list); - plist_check_list(&head->node_list); -} - -#else -# define plist_check_head(h) do { } while (0) -#endif - -/** - * plist_add - add @node to @head - * - * @node: &struct plist_node pointer - * @head: &struct plist_head pointer - */ -void plist_add(struct plist_node *node, struct plist_head *head) -{ - struct plist_node *iter; - - plist_check_head(head); - WARN_ON(!plist_node_empty(node)); - - list_for_each_entry(iter, &head->prio_list, plist.prio_list) { - if (node->prio < iter->prio) - goto lt_prio; - else if (node->prio == iter->prio) { - iter = list_entry(iter->plist.prio_list.next, - struct plist_node, plist.prio_list); - goto eq_prio; - } - } - -lt_prio: - list_add_tail(&node->plist.prio_list, &iter->plist.prio_list); -eq_prio: - list_add_tail(&node->plist.node_list, &iter->plist.node_list); - - plist_check_head(head); -} - -/** - * plist_del - Remove a @node from plist. - * - * @node: &struct plist_node pointer - entry to be removed - * @head: &struct plist_head pointer - list head - */ -void plist_del(struct plist_node *node, struct plist_head *head) -{ - plist_check_head(head); - - if (!list_empty(&node->plist.prio_list)) { - struct plist_node *next = plist_first(&node->plist); - - list_move_tail(&next->plist.prio_list, &node->plist.prio_list); - list_del_init(&node->plist.prio_list); - } - - list_del_init(&node->plist.node_list); - - plist_check_head(head); -} diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 637d55608..7097bb239 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -33,7 +33,7 @@ #ifdef __KERNEL__ -#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) +#define RADIX_TREE_MAP_SHIFT 6 #else #define RADIX_TREE_MAP_SHIFT 3 /* For more stressful testing */ #endif @@ -74,11 +74,6 @@ struct radix_tree_preload { }; DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, }; -static inline gfp_t root_gfp_mask(struct radix_tree_root *root) -{ - return root->gfp_mask & __GFP_BITS_MASK; -} - /* * This assumes that the caller has performed appropriate preallocation, and * that the caller has pinned this thread of control to the current CPU. @@ -87,10 +82,9 @@ static struct radix_tree_node * radix_tree_node_alloc(struct radix_tree_root *root) { struct radix_tree_node *ret; - gfp_t gfp_mask = root_gfp_mask(root); - ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); - if (ret == NULL && !(gfp_mask & __GFP_WAIT)) { + ret = kmem_cache_alloc(radix_tree_node_cachep, root->gfp_mask); + if (ret == NULL && !(root->gfp_mask & __GFP_WAIT)) { struct radix_tree_preload *rtp; rtp = &__get_cpu_var(radix_tree_preloads); @@ -158,27 +152,6 @@ static inline int tag_get(struct radix_tree_node *node, unsigned int tag, return test_bit(offset, node->tags[tag]); } -static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) -{ - root->gfp_mask |= (1 << (tag + __GFP_BITS_SHIFT)); -} - - -static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) -{ - root->gfp_mask &= ~(1 << (tag + __GFP_BITS_SHIFT)); -} - -static inline void root_tag_clear_all(struct radix_tree_root *root) -{ - root->gfp_mask &= __GFP_BITS_MASK; -} - -static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) -{ - return root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); -} - /* * Returns 1 if any slot in the node has this tag set. * Otherwise returns 0. @@ -209,6 +182,7 @@ static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) { struct radix_tree_node *node; unsigned int height; + char tags[RADIX_TREE_MAX_TAGS]; int tag; /* Figure out what the height should be. */ @@ -221,6 +195,16 @@ static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) goto out; } + /* + * Prepare the tag status of the top-level node for propagation + * into the newly-pushed top-level node(s) + */ + for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { + tags[tag] = 0; + if (any_tag_set(root->rnode, tag)) + tags[tag] = 1; + } + do { if (!(node = radix_tree_node_alloc(root))) return -ENOMEM; @@ -230,7 +214,7 @@ static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) /* Propagate the aggregated tag info into the new root */ for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { - if (root_tag_get(root, tag)) + if (tags[tag]) tag_set(node, tag, 0); } @@ -259,7 +243,8 @@ int radix_tree_insert(struct radix_tree_root *root, int error; /* Make sure the tree is high enough. */ - if (index > radix_tree_maxindex(root->height)) { + if ((!index && !root->rnode) || + index > radix_tree_maxindex(root->height)) { error = radix_tree_extend(root, index); if (error) return error; @@ -270,7 +255,7 @@ int radix_tree_insert(struct radix_tree_root *root, shift = (height-1) * RADIX_TREE_MAP_SHIFT; offset = 0; /* uninitialised var warning */ - while (height > 0) { + do { if (slot == NULL) { /* Have to add a child node. */ if (!(slot = radix_tree_node_alloc(root))) @@ -288,21 +273,16 @@ int radix_tree_insert(struct radix_tree_root *root, slot = node->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; height--; - } + } while (height > 0); if (slot != NULL) return -EEXIST; - if (node) { - node->count++; - node->slots[offset] = item; - BUG_ON(tag_get(node, 0, offset)); - BUG_ON(tag_get(node, 1, offset)); - } else { - root->rnode = item; - BUG_ON(root_tag_get(root, 0)); - BUG_ON(root_tag_get(root, 1)); - } + BUG_ON(!node); + node->count++; + node->slots[offset] = item; + BUG_ON(tag_get(node, 0, offset)); + BUG_ON(tag_get(node, 1, offset)); return 0; } @@ -315,13 +295,9 @@ static inline void **__lookup_slot(struct radix_tree_root *root, struct radix_tree_node **slot; height = root->height; - if (index > radix_tree_maxindex(height)) return NULL; - if (height == 0 && root->rnode) - return (void **)&root->rnode; - shift = (height-1) * RADIX_TREE_MAP_SHIFT; slot = &root->rnode; @@ -389,10 +365,11 @@ void *radix_tree_tag_set(struct radix_tree_root *root, struct radix_tree_node *slot; height = root->height; - BUG_ON(index > radix_tree_maxindex(height)); + if (index > radix_tree_maxindex(height)) + return NULL; - slot = root->rnode; shift = (height - 1) * RADIX_TREE_MAP_SHIFT; + slot = root->rnode; while (height > 0) { int offset; @@ -406,10 +383,6 @@ void *radix_tree_tag_set(struct radix_tree_root *root, height--; } - /* set the root's tag bit */ - if (slot && !root_tag_get(root, tag)) - root_tag_set(root, tag); - return slot; } EXPORT_SYMBOL(radix_tree_tag_set); @@ -432,8 +405,9 @@ void *radix_tree_tag_clear(struct radix_tree_root *root, unsigned long index, unsigned int tag) { struct radix_tree_path path[RADIX_TREE_MAX_PATH], *pathp = path; - struct radix_tree_node *slot = NULL; + struct radix_tree_node *slot; unsigned int height, shift; + void *ret = NULL; height = root->height; if (index > radix_tree_maxindex(height)) @@ -458,24 +432,20 @@ void *radix_tree_tag_clear(struct radix_tree_root *root, height--; } - if (slot == NULL) + ret = slot; + if (ret == NULL) goto out; - while (pathp->node) { + do { if (!tag_get(pathp->node, tag, pathp->offset)) goto out; tag_clear(pathp->node, tag, pathp->offset); if (any_tag_set(pathp->node, tag)) goto out; pathp--; - } - - /* clear the root's tag bit */ - if (root_tag_get(root, tag)) - root_tag_clear(root, tag); - + } while (pathp->node); out: - return slot; + return ret; } EXPORT_SYMBOL(radix_tree_tag_clear); @@ -488,8 +458,9 @@ EXPORT_SYMBOL(radix_tree_tag_clear); * * Return values: * - * 0: tag not present or not set - * 1: tag set + * 0: tag not present + * 1: tag present, set + * -1: tag present, unset */ int radix_tree_tag_get(struct radix_tree_root *root, unsigned long index, unsigned int tag) @@ -502,13 +473,6 @@ int radix_tree_tag_get(struct radix_tree_root *root, if (index > radix_tree_maxindex(height)) return 0; - /* check the root's tag bit */ - if (!root_tag_get(root, tag)) - return 0; - - if (height == 0) - return 1; - shift = (height - 1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; @@ -530,7 +494,7 @@ int radix_tree_tag_get(struct radix_tree_root *root, int ret = tag_get(slot, tag, offset); BUG_ON(ret && saw_unset_tag); - return !!ret; + return ret ? 1 : -1; } slot = slot->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; @@ -550,11 +514,8 @@ __lookup(struct radix_tree_root *root, void **results, unsigned long index, unsigned long i; height = root->height; - if (height == 0) { - if (root->rnode && index == 0) - results[nr_found++] = root->rnode; + if (height == 0) goto out; - } shift = (height-1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; @@ -642,16 +603,10 @@ __lookup_tag(struct radix_tree_root *root, void **results, unsigned long index, unsigned int height = root->height; struct radix_tree_node *slot; - if (height == 0) { - if (root->rnode && index == 0) - results[nr_found++] = root->rnode; - goto out; - } - shift = (height - 1) * RADIX_TREE_MAP_SHIFT; slot = root->rnode; - do { + while (height > 0) { unsigned long i = (index >> shift) & RADIX_TREE_MAP_MASK; for ( ; i < RADIX_TREE_MAP_SIZE; i++) { @@ -682,7 +637,7 @@ __lookup_tag(struct radix_tree_root *root, void **results, unsigned long index, } shift -= RADIX_TREE_MAP_SHIFT; slot = slot->slots[i]; - } while (height > 0); + } out: *next_index = index; return nr_found; @@ -710,10 +665,6 @@ radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, unsigned long cur_index = first_index; unsigned int ret = 0; - /* check the root's tag bit */ - if (!root_tag_get(root, tag)) - return 0; - while (ret < max_items) { unsigned int nr_found; unsigned long next_index; /* Index of next search */ @@ -738,7 +689,7 @@ EXPORT_SYMBOL(radix_tree_gang_lookup_tag); static inline void radix_tree_shrink(struct radix_tree_root *root) { /* try to shrink tree height */ - while (root->height > 0 && + while (root->height > 1 && root->rnode->count == 1 && root->rnode->slots[0]) { struct radix_tree_node *to_free = root->rnode; @@ -766,8 +717,12 @@ static inline void radix_tree_shrink(struct radix_tree_root *root) void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) { struct radix_tree_path path[RADIX_TREE_MAX_PATH], *pathp = path; - struct radix_tree_node *slot = NULL; + struct radix_tree_path *orig_pathp; + struct radix_tree_node *slot; unsigned int height, shift; + void *ret = NULL; + char tags[RADIX_TREE_MAX_TAGS]; + int nr_cleared_tags; int tag; int offset; @@ -775,17 +730,11 @@ void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) if (index > radix_tree_maxindex(height)) goto out; - slot = root->rnode; - if (height == 0 && root->rnode) { - root_tag_clear_all(root); - root->rnode = NULL; - goto out; - } - shift = (height - 1) * RADIX_TREE_MAP_SHIFT; pathp->node = NULL; + slot = root->rnode; - do { + for ( ; height > 0; height--) { if (slot == NULL) goto out; @@ -795,22 +744,44 @@ void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) pathp->node = slot; slot = slot->slots[offset]; shift -= RADIX_TREE_MAP_SHIFT; - height--; - } while (height > 0); + } - if (slot == NULL) + ret = slot; + if (ret == NULL) goto out; + orig_pathp = pathp; + /* * Clear all tags associated with the just-deleted item */ + nr_cleared_tags = 0; for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { - if (tag_get(pathp->node, tag, pathp->offset)) - radix_tree_tag_clear(root, index, tag); + tags[tag] = 1; + if (tag_get(pathp->node, tag, pathp->offset)) { + tag_clear(pathp->node, tag, pathp->offset); + if (!any_tag_set(pathp->node, tag)) { + tags[tag] = 0; + nr_cleared_tags++; + } + } + } + + for (pathp--; nr_cleared_tags && pathp->node; pathp--) { + for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { + if (tags[tag]) + continue; + + tag_clear(pathp->node, tag, pathp->offset); + if (any_tag_set(pathp->node, tag)) { + tags[tag] = 1; + nr_cleared_tags--; + } + } } /* Now free the nodes we do not need anymore */ - while (pathp->node) { + for (pathp = orig_pathp; pathp->node; pathp--) { pathp->node->slots[pathp->offset] = NULL; pathp->node->count--; @@ -822,15 +793,11 @@ void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) /* Node with zero slots in use so free it */ radix_tree_node_free(pathp->node); - - pathp--; } - root_tag_clear_all(root); - root->height = 0; root->rnode = NULL; - + root->height = 0; out: - return slot; + return ret; } EXPORT_SYMBOL(radix_tree_delete); @@ -841,7 +808,11 @@ EXPORT_SYMBOL(radix_tree_delete); */ int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag) { - return root_tag_get(root, tag); + struct radix_tree_node *rnode; + rnode = root->rnode; + if (!rnode) + return 0; + return any_tag_set(rnode, tag); } EXPORT_SYMBOL(radix_tree_tagged); diff --git a/lib/rbtree.c b/lib/rbtree.c index 1e55ba1c2..14b791ac5 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -26,66 +26,60 @@ static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) { struct rb_node *right = node->rb_right; - struct rb_node *parent = rb_parent(node); if ((node->rb_right = right->rb_left)) - rb_set_parent(right->rb_left, node); + right->rb_left->rb_parent = node; right->rb_left = node; - rb_set_parent(right, parent); - - if (parent) + if ((right->rb_parent = node->rb_parent)) { - if (node == parent->rb_left) - parent->rb_left = right; + if (node == node->rb_parent->rb_left) + node->rb_parent->rb_left = right; else - parent->rb_right = right; + node->rb_parent->rb_right = right; } else root->rb_node = right; - rb_set_parent(node, right); + node->rb_parent = right; } static void __rb_rotate_right(struct rb_node *node, struct rb_root *root) { struct rb_node *left = node->rb_left; - struct rb_node *parent = rb_parent(node); if ((node->rb_left = left->rb_right)) - rb_set_parent(left->rb_right, node); + left->rb_right->rb_parent = node; left->rb_right = node; - rb_set_parent(left, parent); - - if (parent) + if ((left->rb_parent = node->rb_parent)) { - if (node == parent->rb_right) - parent->rb_right = left; + if (node == node->rb_parent->rb_right) + node->rb_parent->rb_right = left; else - parent->rb_left = left; + node->rb_parent->rb_left = left; } else root->rb_node = left; - rb_set_parent(node, left); + node->rb_parent = left; } void rb_insert_color(struct rb_node *node, struct rb_root *root) { struct rb_node *parent, *gparent; - while ((parent = rb_parent(node)) && rb_is_red(parent)) + while ((parent = node->rb_parent) && parent->rb_color == RB_RED) { - gparent = rb_parent(parent); + gparent = parent->rb_parent; if (parent == gparent->rb_left) { { register struct rb_node *uncle = gparent->rb_right; - if (uncle && rb_is_red(uncle)) + if (uncle && uncle->rb_color == RB_RED) { - rb_set_black(uncle); - rb_set_black(parent); - rb_set_red(gparent); + uncle->rb_color = RB_BLACK; + parent->rb_color = RB_BLACK; + gparent->rb_color = RB_RED; node = gparent; continue; } @@ -100,17 +94,17 @@ void rb_insert_color(struct rb_node *node, struct rb_root *root) node = tmp; } - rb_set_black(parent); - rb_set_red(gparent); + parent->rb_color = RB_BLACK; + gparent->rb_color = RB_RED; __rb_rotate_right(gparent, root); } else { { register struct rb_node *uncle = gparent->rb_left; - if (uncle && rb_is_red(uncle)) + if (uncle && uncle->rb_color == RB_RED) { - rb_set_black(uncle); - rb_set_black(parent); - rb_set_red(gparent); + uncle->rb_color = RB_BLACK; + parent->rb_color = RB_BLACK; + gparent->rb_color = RB_RED; node = gparent; continue; } @@ -125,13 +119,13 @@ void rb_insert_color(struct rb_node *node, struct rb_root *root) node = tmp; } - rb_set_black(parent); - rb_set_red(gparent); + parent->rb_color = RB_BLACK; + gparent->rb_color = RB_RED; __rb_rotate_left(gparent, root); } } - rb_set_black(root->rb_node); + root->rb_node->rb_color = RB_BLACK; } EXPORT_SYMBOL(rb_insert_color); @@ -140,40 +134,43 @@ static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, { struct rb_node *other; - while ((!node || rb_is_black(node)) && node != root->rb_node) + while ((!node || node->rb_color == RB_BLACK) && node != root->rb_node) { if (parent->rb_left == node) { other = parent->rb_right; - if (rb_is_red(other)) + if (other->rb_color == RB_RED) { - rb_set_black(other); - rb_set_red(parent); + other->rb_color = RB_BLACK; + parent->rb_color = RB_RED; __rb_rotate_left(parent, root); other = parent->rb_right; } - if ((!other->rb_left || rb_is_black(other->rb_left)) && - (!other->rb_right || rb_is_black(other->rb_right))) + if ((!other->rb_left || + other->rb_left->rb_color == RB_BLACK) + && (!other->rb_right || + other->rb_right->rb_color == RB_BLACK)) { - rb_set_red(other); + other->rb_color = RB_RED; node = parent; - parent = rb_parent(node); + parent = node->rb_parent; } else { - if (!other->rb_right || rb_is_black(other->rb_right)) + if (!other->rb_right || + other->rb_right->rb_color == RB_BLACK) { - struct rb_node *o_left; + register struct rb_node *o_left; if ((o_left = other->rb_left)) - rb_set_black(o_left); - rb_set_red(other); + o_left->rb_color = RB_BLACK; + other->rb_color = RB_RED; __rb_rotate_right(other, root); other = parent->rb_right; } - rb_set_color(other, rb_color(parent)); - rb_set_black(parent); + other->rb_color = parent->rb_color; + parent->rb_color = RB_BLACK; if (other->rb_right) - rb_set_black(other->rb_right); + other->rb_right->rb_color = RB_BLACK; __rb_rotate_left(parent, root); node = root->rb_node; break; @@ -182,35 +179,38 @@ static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, else { other = parent->rb_left; - if (rb_is_red(other)) + if (other->rb_color == RB_RED) { - rb_set_black(other); - rb_set_red(parent); + other->rb_color = RB_BLACK; + parent->rb_color = RB_RED; __rb_rotate_right(parent, root); other = parent->rb_left; } - if ((!other->rb_left || rb_is_black(other->rb_left)) && - (!other->rb_right || rb_is_black(other->rb_right))) + if ((!other->rb_left || + other->rb_left->rb_color == RB_BLACK) + && (!other->rb_right || + other->rb_right->rb_color == RB_BLACK)) { - rb_set_red(other); + other->rb_color = RB_RED; node = parent; - parent = rb_parent(node); + parent = node->rb_parent; } else { - if (!other->rb_left || rb_is_black(other->rb_left)) + if (!other->rb_left || + other->rb_left->rb_color == RB_BLACK) { register struct rb_node *o_right; if ((o_right = other->rb_right)) - rb_set_black(o_right); - rb_set_red(other); + o_right->rb_color = RB_BLACK; + other->rb_color = RB_RED; __rb_rotate_left(other, root); other = parent->rb_left; } - rb_set_color(other, rb_color(parent)); - rb_set_black(parent); + other->rb_color = parent->rb_color; + parent->rb_color = RB_BLACK; if (other->rb_left) - rb_set_black(other->rb_left); + other->rb_left->rb_color = RB_BLACK; __rb_rotate_right(parent, root); node = root->rb_node; break; @@ -218,7 +218,7 @@ static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, } } if (node) - rb_set_black(node); + node->rb_color = RB_BLACK; } void rb_erase(struct rb_node *node, struct rb_root *root) @@ -238,41 +238,48 @@ void rb_erase(struct rb_node *node, struct rb_root *root) while ((left = node->rb_left) != NULL) node = left; child = node->rb_right; - parent = rb_parent(node); - color = rb_color(node); + parent = node->rb_parent; + color = node->rb_color; if (child) - rb_set_parent(child, parent); - if (parent == old) { - parent->rb_right = child; - parent = node; - } else - parent->rb_left = child; + child->rb_parent = parent; + if (parent) + { + if (parent->rb_left == node) + parent->rb_left = child; + else + parent->rb_right = child; + } + else + root->rb_node = child; - node->rb_parent_color = old->rb_parent_color; + if (node->rb_parent == old) + parent = node; + node->rb_parent = old->rb_parent; + node->rb_color = old->rb_color; node->rb_right = old->rb_right; node->rb_left = old->rb_left; - if (rb_parent(old)) + if (old->rb_parent) { - if (rb_parent(old)->rb_left == old) - rb_parent(old)->rb_left = node; + if (old->rb_parent->rb_left == old) + old->rb_parent->rb_left = node; else - rb_parent(old)->rb_right = node; + old->rb_parent->rb_right = node; } else root->rb_node = node; - rb_set_parent(old->rb_left, node); + old->rb_left->rb_parent = node; if (old->rb_right) - rb_set_parent(old->rb_right, node); + old->rb_right->rb_parent = node; goto color; } - parent = rb_parent(node); - color = rb_color(node); + parent = node->rb_parent; + color = node->rb_color; if (child) - rb_set_parent(child, parent); + child->rb_parent = parent; if (parent) { if (parent->rb_left == node) @@ -320,8 +327,6 @@ EXPORT_SYMBOL(rb_last); struct rb_node *rb_next(struct rb_node *node) { - struct rb_node *parent; - /* If we have a right-hand child, go down and then left as far as we can. */ if (node->rb_right) { @@ -337,17 +342,15 @@ struct rb_node *rb_next(struct rb_node *node) ancestor is a right-hand child of its parent, keep going up. First time it's a left-hand child of its parent, said parent is our 'next' node. */ - while ((parent = rb_parent(node)) && node == parent->rb_right) - node = parent; + while (node->rb_parent && node == node->rb_parent->rb_right) + node = node->rb_parent; - return parent; + return node->rb_parent; } EXPORT_SYMBOL(rb_next); struct rb_node *rb_prev(struct rb_node *node) { - struct rb_node *parent; - /* If we have a left-hand child, go down and then right as far as we can. */ if (node->rb_left) { @@ -359,17 +362,17 @@ struct rb_node *rb_prev(struct rb_node *node) /* No left-hand children. Go up till we find an ancestor which is a right-hand child of its parent */ - while ((parent = rb_parent(node)) && node == parent->rb_left) - node = parent; + while (node->rb_parent && node == node->rb_parent->rb_left) + node = node->rb_parent; - return parent; + return node->rb_parent; } EXPORT_SYMBOL(rb_prev); void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root) { - struct rb_node *parent = rb_parent(victim); + struct rb_node *parent = victim->rb_parent; /* Set the surrounding nodes to point to the replacement */ if (parent) { @@ -381,9 +384,9 @@ void rb_replace_node(struct rb_node *victim, struct rb_node *new, root->rb_node = new; } if (victim->rb_left) - rb_set_parent(victim->rb_left, new); + victim->rb_left->rb_parent = new; if (victim->rb_right) - rb_set_parent(victim->rb_right, new); + victim->rb_right->rb_parent = new; /* Copy the pointers/colour from the victim to the replacement */ *new = *victim; diff --git a/lib/reed_solomon/reed_solomon.c b/lib/reed_solomon/reed_solomon.c index 2cc11faa4..f8ac9fa95 100644 --- a/lib/reed_solomon/reed_solomon.c +++ b/lib/reed_solomon/reed_solomon.c @@ -54,6 +54,7 @@ static DEFINE_MUTEX(rslistlock); /** * rs_init - Initialize a Reed-Solomon codec + * * @symsize: symbol size, bits (1-8) * @gfpoly: Field generator polynomial coefficients * @fcr: first root of RS code generator polynomial, index form @@ -61,7 +62,7 @@ static DEFINE_MUTEX(rslistlock); * @nroots: RS code generator polynomial degree (number of roots) * * Allocate a control structure and the polynom arrays for faster - * en/decoding. Fill the arrays according to the given parameters. + * en/decoding. Fill the arrays according to the given parameters */ static struct rs_control *rs_init(int symsize, int gfpoly, int fcr, int prim, int nroots) @@ -154,7 +155,8 @@ errrs: /** - * free_rs - Free the rs control structure, if it is no longer used + * free_rs - Free the rs control structure, if its not longer used + * * @rs: the control structure which is not longer used by the * caller */ @@ -174,6 +176,7 @@ void free_rs(struct rs_control *rs) /** * init_rs - Find a matching or allocate a new rs control structure + * * @symsize: the symbol size (number of bits) * @gfpoly: the extended Galois field generator polynomial coefficients, * with the 0th coefficient in the low order bit. The polynomial @@ -233,6 +236,7 @@ out: #ifdef CONFIG_REED_SOLOMON_ENC8 /** * encode_rs8 - Calculate the parity for data values (8bit data width) + * * @rs: the rs control structure * @data: data field of a given type * @len: data length @@ -254,6 +258,7 @@ EXPORT_SYMBOL_GPL(encode_rs8); #ifdef CONFIG_REED_SOLOMON_DEC8 /** * decode_rs8 - Decode codeword (8bit data width) + * * @rs: the rs control structure * @data: data field of a given type * @par: received parity data field @@ -280,6 +285,7 @@ EXPORT_SYMBOL_GPL(decode_rs8); #ifdef CONFIG_REED_SOLOMON_ENC16 /** * encode_rs16 - Calculate the parity for data values (16bit data width) + * * @rs: the rs control structure * @data: data field of a given type * @len: data length @@ -299,6 +305,7 @@ EXPORT_SYMBOL_GPL(encode_rs16); #ifdef CONFIG_REED_SOLOMON_DEC16 /** * decode_rs16 - Decode codeword (16bit data width) + * * @rs: the rs control structure * @data: data field of a given type * @par: received parity data field diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c index c4cfd6c03..40ffde940 100644 --- a/lib/rwsem-spinlock.c +++ b/lib/rwsem-spinlock.c @@ -17,22 +17,27 @@ struct rwsem_waiter { #define RWSEM_WAITING_FOR_WRITE 0x00000002 }; +#if RWSEM_DEBUG +void rwsemtrace(struct rw_semaphore *sem, const char *str) +{ + if (sem->debug) + printk("[%d] %s({%d,%d})\n", + current->pid, str, sem->activity, + list_empty(&sem->wait_list) ? 0 : 1); +} +#endif + /* * initialise the semaphore */ -void __init_rwsem(struct rw_semaphore *sem, const char *name, - struct lock_class_key *key) +void fastcall init_rwsem(struct rw_semaphore *sem) { -#ifdef CONFIG_DEBUG_LOCK_ALLOC - /* - * Make sure we are not reinitializing a held semaphore: - */ - debug_check_no_locks_freed((void *)sem, sizeof(*sem)); - lockdep_init_map(&sem->dep_map, name, key, 0); -#endif sem->activity = 0; spin_lock_init(&sem->wait_lock); INIT_LIST_HEAD(&sem->wait_list); +#if RWSEM_DEBUG + sem->debug = 0; +#endif } /* @@ -51,6 +56,8 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) struct task_struct *tsk; int woken; + rwsemtrace(sem, "Entering __rwsem_do_wake"); + waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); if (!wakewrite) { @@ -97,6 +104,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) sem->activity += woken; out: + rwsemtrace(sem, "Leaving __rwsem_do_wake"); return sem; } @@ -130,6 +138,8 @@ void fastcall __sched __down_read(struct rw_semaphore *sem) struct rwsem_waiter waiter; struct task_struct *tsk; + rwsemtrace(sem, "Entering __down_read"); + spin_lock_irq(&sem->wait_lock); if (sem->activity >= 0 && list_empty(&sem->wait_list)) { @@ -161,8 +171,9 @@ void fastcall __sched __down_read(struct rw_semaphore *sem) } tsk->state = TASK_RUNNING; + out: - ; + rwsemtrace(sem, "Leaving __down_read"); } /* @@ -173,6 +184,7 @@ int fastcall __down_read_trylock(struct rw_semaphore *sem) unsigned long flags; int ret = 0; + rwsemtrace(sem, "Entering __down_read_trylock"); spin_lock_irqsave(&sem->wait_lock, flags); @@ -184,6 +196,7 @@ int fastcall __down_read_trylock(struct rw_semaphore *sem) spin_unlock_irqrestore(&sem->wait_lock, flags); + rwsemtrace(sem, "Leaving __down_read_trylock"); return ret; } @@ -191,11 +204,13 @@ int fastcall __down_read_trylock(struct rw_semaphore *sem) * get a write lock on the semaphore * - we increment the waiting count anyway to indicate an exclusive lock */ -void fastcall __sched __down_write_nested(struct rw_semaphore *sem, int subclass) +void fastcall __sched __down_write(struct rw_semaphore *sem) { struct rwsem_waiter waiter; struct task_struct *tsk; + rwsemtrace(sem, "Entering __down_write"); + spin_lock_irq(&sem->wait_lock); if (sem->activity == 0 && list_empty(&sem->wait_list)) { @@ -227,13 +242,9 @@ void fastcall __sched __down_write_nested(struct rw_semaphore *sem, int subclass } tsk->state = TASK_RUNNING; - out: - ; -} -void fastcall __sched __down_write(struct rw_semaphore *sem) -{ - __down_write_nested(sem, 0); + out: + rwsemtrace(sem, "Leaving __down_write"); } /* @@ -244,6 +255,8 @@ int fastcall __down_write_trylock(struct rw_semaphore *sem) unsigned long flags; int ret = 0; + rwsemtrace(sem, "Entering __down_write_trylock"); + spin_lock_irqsave(&sem->wait_lock, flags); if (sem->activity == 0 && list_empty(&sem->wait_list)) { @@ -254,6 +267,7 @@ int fastcall __down_write_trylock(struct rw_semaphore *sem) spin_unlock_irqrestore(&sem->wait_lock, flags); + rwsemtrace(sem, "Leaving __down_write_trylock"); return ret; } @@ -264,12 +278,16 @@ void fastcall __up_read(struct rw_semaphore *sem) { unsigned long flags; + rwsemtrace(sem, "Entering __up_read"); + spin_lock_irqsave(&sem->wait_lock, flags); if (--sem->activity == 0 && !list_empty(&sem->wait_list)) sem = __rwsem_wake_one_writer(sem); spin_unlock_irqrestore(&sem->wait_lock, flags); + + rwsemtrace(sem, "Leaving __up_read"); } /* @@ -279,6 +297,8 @@ void fastcall __up_write(struct rw_semaphore *sem) { unsigned long flags; + rwsemtrace(sem, "Entering __up_write"); + spin_lock_irqsave(&sem->wait_lock, flags); sem->activity = 0; @@ -286,6 +306,8 @@ void fastcall __up_write(struct rw_semaphore *sem) sem = __rwsem_do_wake(sem, 1); spin_unlock_irqrestore(&sem->wait_lock, flags); + + rwsemtrace(sem, "Leaving __up_write"); } /* @@ -296,6 +318,8 @@ void fastcall __downgrade_write(struct rw_semaphore *sem) { unsigned long flags; + rwsemtrace(sem, "Entering __downgrade_write"); + spin_lock_irqsave(&sem->wait_lock, flags); sem->activity = 1; @@ -303,14 +327,18 @@ void fastcall __downgrade_write(struct rw_semaphore *sem) sem = __rwsem_do_wake(sem, 0); spin_unlock_irqrestore(&sem->wait_lock, flags); + + rwsemtrace(sem, "Leaving __downgrade_write"); } -EXPORT_SYMBOL(__init_rwsem); +EXPORT_SYMBOL(init_rwsem); EXPORT_SYMBOL(__down_read); EXPORT_SYMBOL(__down_read_trylock); -EXPORT_SYMBOL(__down_write_nested); EXPORT_SYMBOL(__down_write); EXPORT_SYMBOL(__down_write_trylock); EXPORT_SYMBOL(__up_read); EXPORT_SYMBOL(__up_write); EXPORT_SYMBOL(__downgrade_write); +#if RWSEM_DEBUG +EXPORT_SYMBOL(rwsemtrace); +#endif diff --git a/lib/rwsem.c b/lib/rwsem.c index a2d725f94..62fa4eba9 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c @@ -8,26 +8,6 @@ #include #include -/* - * Initialize an rwsem: - */ -void __init_rwsem(struct rw_semaphore *sem, const char *name, - struct lock_class_key *key) -{ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - /* - * Make sure we are not reinitializing a held semaphore: - */ - debug_check_no_locks_freed((void *)sem, sizeof(*sem)); - lockdep_init_map(&sem->dep_map, name, key, 0); -#endif - sem->count = RWSEM_UNLOCKED_VALUE; - spin_lock_init(&sem->wait_lock); - INIT_LIST_HEAD(&sem->wait_list); -} - -EXPORT_SYMBOL(__init_rwsem); - struct rwsem_waiter { struct list_head list; struct task_struct *task; @@ -36,6 +16,17 @@ struct rwsem_waiter { #define RWSEM_WAITING_FOR_WRITE 0x00000002 }; +#if RWSEM_DEBUG +#undef rwsemtrace +void rwsemtrace(struct rw_semaphore *sem, const char *str) +{ + printk("sem=%p\n", sem); + printk("(sem)=%08lx\n", sem->count); + if (sem->debug) + printk("[%d] %s({%08lx})\n", current->pid, str, sem->count); +} +#endif + /* * handle the lock release when processes blocked on it that can now run * - if we come here from up_xxxx(), then: @@ -54,6 +45,8 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) struct list_head *next; signed long oldcount, woken, loop; + rwsemtrace(sem, "Entering __rwsem_do_wake"); + if (downgrading) goto dont_wake_writers; @@ -134,6 +127,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) next->prev = &sem->wait_list; out: + rwsemtrace(sem, "Leaving __rwsem_do_wake"); return sem; /* undo the change to count, but check for a transition 1->0 */ @@ -192,9 +186,13 @@ rwsem_down_read_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; + rwsemtrace(sem, "Entering rwsem_down_read_failed"); + waiter.flags = RWSEM_WAITING_FOR_READ; rwsem_down_failed_common(sem, &waiter, RWSEM_WAITING_BIAS - RWSEM_ACTIVE_BIAS); + + rwsemtrace(sem, "Leaving rwsem_down_read_failed"); return sem; } @@ -206,9 +204,12 @@ rwsem_down_write_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; + rwsemtrace(sem, "Entering rwsem_down_write_failed"); + waiter.flags = RWSEM_WAITING_FOR_WRITE; rwsem_down_failed_common(sem, &waiter, -RWSEM_ACTIVE_BIAS); + rwsemtrace(sem, "Leaving rwsem_down_write_failed"); return sem; } @@ -220,6 +221,8 @@ struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem) { unsigned long flags; + rwsemtrace(sem, "Entering rwsem_wake"); + spin_lock_irqsave(&sem->wait_lock, flags); /* do nothing if list empty */ @@ -228,6 +231,8 @@ struct rw_semaphore fastcall *rwsem_wake(struct rw_semaphore *sem) spin_unlock_irqrestore(&sem->wait_lock, flags); + rwsemtrace(sem, "Leaving rwsem_wake"); + return sem; } @@ -240,6 +245,8 @@ struct rw_semaphore fastcall *rwsem_downgrade_wake(struct rw_semaphore *sem) { unsigned long flags; + rwsemtrace(sem, "Entering rwsem_downgrade_wake"); + spin_lock_irqsave(&sem->wait_lock, flags); /* do nothing if list empty */ @@ -248,6 +255,7 @@ struct rw_semaphore fastcall *rwsem_downgrade_wake(struct rw_semaphore *sem) spin_unlock_irqrestore(&sem->wait_lock, flags); + rwsemtrace(sem, "Leaving rwsem_downgrade_wake"); return sem; } @@ -255,3 +263,6 @@ EXPORT_SYMBOL(rwsem_down_read_failed); EXPORT_SYMBOL(rwsem_down_write_failed); EXPORT_SYMBOL(rwsem_wake); EXPORT_SYMBOL(rwsem_downgrade_wake); +#if RWSEM_DEBUG +EXPORT_SYMBOL(rwsemtrace); +#endif diff --git a/lib/semaphore-sleepers.c b/lib/semaphore-sleepers.c index 128180523..4d5f18889 100644 --- a/lib/semaphore-sleepers.c +++ b/lib/semaphore-sleepers.c @@ -12,6 +12,7 @@ * * rw semaphores implemented November 1999 by Benjamin LaHaise */ +#include #include #include #include diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c index e249970b1..8ebd8ea08 100644 --- a/lib/spinlock_debug.c +++ b/lib/spinlock_debug.c @@ -6,73 +6,55 @@ * DEBUG_SPINLOCK. */ +#include #include #include -#include #include #include -void __spin_lock_init(spinlock_t *lock, const char *name, - struct lock_class_key *key) +int nopanic; +static int __init nopanic_setup(char *str) { -#ifdef CONFIG_DEBUG_LOCK_ALLOC - /* - * Make sure we are not reinitializing a held lock: - */ - debug_check_no_locks_freed((void *)lock, sizeof(*lock)); - lockdep_init_map(&lock->dep_map, name, key, 0); -#endif - lock->raw_lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; - lock->magic = SPINLOCK_MAGIC; - lock->owner = SPINLOCK_OWNER_INIT; - lock->owner_cpu = -1; + nopanic = 1; + return 1; } +EXPORT_SYMBOL_GPL(nopanic); +__setup("dontpanic", nopanic_setup); -EXPORT_SYMBOL(__spin_lock_init); - -void __rwlock_init(rwlock_t *lock, const char *name, - struct lock_class_key *key) -{ -#ifdef CONFIG_DEBUG_LOCK_ALLOC - /* - * Make sure we are not reinitializing a held lock: - */ - debug_check_no_locks_freed((void *)lock, sizeof(*lock)); - lockdep_init_map(&lock->dep_map, name, key, 0); -#endif - lock->raw_lock = (raw_rwlock_t) __RAW_RW_LOCK_UNLOCKED; - lock->magic = RWLOCK_MAGIC; - lock->owner = SPINLOCK_OWNER_INIT; - lock->owner_cpu = -1; -} - -EXPORT_SYMBOL(__rwlock_init); static void spin_bug(spinlock_t *lock, const char *msg) { + static long print_once = 1; struct task_struct *owner = NULL; - if (!debug_locks_off()) - return; - - if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) - owner = lock->owner; - printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d (%s)\n", - msg, raw_smp_processor_id(), - current->comm, current->pid, print_tainted()); - printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, " - ".owner_cpu: %d\n", - lock, lock->magic, - owner ? owner->comm : "", - owner ? owner->pid : -1, - lock->owner_cpu); - dump_stack(); + if (xchg(&print_once, 0)) { + if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT) + owner = lock->owner; + printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d (%s)\n", + msg, raw_smp_processor_id(), + current->comm, current->pid, print_tainted()); + printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, " + ".owner_cpu: %d\n", + lock, lock->magic, + owner ? owner->comm : "", + owner ? owner->pid : -1, + lock->owner_cpu); + dump_stack(); +#ifdef CONFIG_SMP + /* + * We cannot continue on SMP: + */ + if (nopanic) + printk("bad locking\n"); + else + panic("bad locking"); +#endif + } } #define SPIN_BUG_ON(cond, lock, msg) if (unlikely(cond)) spin_bug(lock, msg) -static inline void -debug_spin_lock_before(spinlock_t *lock) +static inline void debug_spin_lock_before(spinlock_t *lock) { SPIN_BUG_ON(lock->magic != SPINLOCK_MAGIC, lock, "bad magic"); SPIN_BUG_ON(lock->owner == current, lock, "recursion"); @@ -99,12 +81,11 @@ static inline void debug_spin_unlock(spinlock_t *lock) static void __spin_lock_debug(spinlock_t *lock) { - u64 i; - u64 loops = loops_per_jiffy * HZ; int print_once = 1; + u64 i; for (;;) { - for (i = 0; i < loops; i++) { + for (i = 0; i < loops_per_jiffy * HZ; i++) { if (__raw_spin_trylock(&lock->raw_lock)) return; } @@ -151,13 +132,20 @@ void _raw_spin_unlock(spinlock_t *lock) static void rwlock_bug(rwlock_t *lock, const char *msg) { - if (!debug_locks_off()) - return; - - printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n", - msg, raw_smp_processor_id(), current->comm, - current->pid, lock, print_tainted()); - dump_stack(); + static long print_once = 1; + + if (xchg(&print_once, 0)) { + printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p (%s)\n", + msg, raw_smp_processor_id(), current->comm, + current->pid, lock, print_tainted()); + dump_stack(); +#ifdef CONFIG_SMP + /* + * We cannot continue on SMP: + */ + panic("bad locking"); +#endif + } } #define RWLOCK_BUG_ON(cond, lock, msg) if (unlikely(cond)) rwlock_bug(lock, msg) @@ -165,12 +153,11 @@ static void rwlock_bug(rwlock_t *lock, const char *msg) #if 0 /* __write_lock_debug() can lock up - maybe this can too? */ static void __read_lock_debug(rwlock_t *lock) { - u64 i; - u64 loops = loops_per_jiffy * HZ; int print_once = 1; + u64 i; for (;;) { - for (i = 0; i < loops; i++) { + for (i = 0; i < loops_per_jiffy * HZ; i++) { if (__raw_read_trylock(&lock->raw_lock)) return; } @@ -239,12 +226,11 @@ static inline void debug_write_unlock(rwlock_t *lock) #if 0 /* This can cause lockups */ static void __write_lock_debug(rwlock_t *lock) { - u64 i; - u64 loops = loops_per_jiffy * HZ; int print_once = 1; + u64 i; for (;;) { - for (i = 0; i < loops; i++) { + for (i = 0; i < loops_per_jiffy * HZ; i++) { if (__raw_write_trylock(&lock->raw_lock)) return; } diff --git a/lib/string.c b/lib/string.c index 630772673..064f6315b 100644 --- a/lib/string.c +++ b/lib/string.c @@ -301,36 +301,6 @@ char *strnchr(const char *s, size_t count, int c) EXPORT_SYMBOL(strnchr); #endif -/** - * strstrip - Removes leading and trailing whitespace from @s. - * @s: The string to be stripped. - * - * Note that the first trailing whitespace is replaced with a %NUL-terminator - * in the given string @s. Returns a pointer to the first non-whitespace - * character in @s. - */ -char *strstrip(char *s) -{ - size_t size; - char *end; - - size = strlen(s); - - if (!size) - return s; - - end = s + size - 1; - while (end != s && isspace(*end)) - end--; - *(end + 1) = '\0'; - - while (*s && isspace(*s)) - s++; - - return s; -} -EXPORT_SYMBOL(strstrip); - #ifndef __HAVE_ARCH_STRLEN /** * strlen - Find the length of a string diff --git a/lib/textsearch.c b/lib/textsearch.c index 2cb4a4379..6f3093efb 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c @@ -93,6 +93,7 @@ * ========================================================================== */ +#include #include #include #include diff --git a/lib/ts_bm.c b/lib/ts_bm.c index d90822c37..791726579 100644 --- a/lib/ts_bm.c +++ b/lib/ts_bm.c @@ -35,6 +35,7 @@ * matchings spread over multiple fragments, then go BM. */ +#include #include #include #include diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c index 87847c2ae..ca3211206 100644 --- a/lib/ts_fsm.c +++ b/lib/ts_fsm.c @@ -26,6 +26,7 @@ * however while in strict mode the average runtime can be better. */ +#include #include #include #include diff --git a/lib/ts_kmp.c b/lib/ts_kmp.c index 3ced628ca..7fd45451b 100644 --- a/lib/ts_kmp.c +++ b/lib/ts_kmp.c @@ -30,6 +30,7 @@ * [2] See finite automation theory */ +#include #include #include #include diff --git a/lib/vsprintf.c b/lib/vsprintf.c index bed722937..b07db5ca3 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -187,49 +187,49 @@ static char * number(char * buf, char * end, unsigned long long num, int base, i size -= precision; if (!(type&(ZEROPAD+LEFT))) { while(size-->0) { - if (buf < end) + if (buf <= end) *buf = ' '; ++buf; } } if (sign) { - if (buf < end) + if (buf <= end) *buf = sign; ++buf; } if (type & SPECIAL) { if (base==8) { - if (buf < end) + if (buf <= end) *buf = '0'; ++buf; } else if (base==16) { - if (buf < end) + if (buf <= end) *buf = '0'; ++buf; - if (buf < end) + if (buf <= end) *buf = digits[33]; ++buf; } } if (!(type & LEFT)) { while (size-- > 0) { - if (buf < end) + if (buf <= end) *buf = c; ++buf; } } while (i < precision--) { - if (buf < end) + if (buf <= end) *buf = '0'; ++buf; } while (i-- > 0) { - if (buf < end) + if (buf <= end) *buf = tmp[i]; ++buf; } while (size-- > 0) { - if (buf < end) + if (buf <= end) *buf = ' '; ++buf; } @@ -272,8 +272,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) /* 'z' changed to 'Z' --davidm 1/25/99 */ /* 't' added for ptrdiff_t */ - /* Reject out-of-range values early. Large positive sizes are - used for unknown buffer sizes. */ + /* Reject out-of-range values early */ if (unlikely((int) size < 0)) { /* There can be only one.. */ static int warn = 1; @@ -283,17 +282,16 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) } str = buf; - end = buf + size; + end = buf + size - 1; - /* Make sure end is always >= buf */ - if (end < buf) { - end = ((void *)-1); - size = end - buf; + if (end < buf - 1) { + end = ((void *) -1); + size = end - buf + 1; } for (; *fmt ; ++fmt) { if (*fmt != '%') { - if (str < end) + if (str <= end) *str = *fmt; ++str; continue; @@ -359,17 +357,17 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) case 'c': if (!(flags & LEFT)) { while (--field_width > 0) { - if (str < end) + if (str <= end) *str = ' '; ++str; } } c = (unsigned char) va_arg(args, int); - if (str < end) + if (str <= end) *str = c; ++str; while (--field_width > 0) { - if (str < end) + if (str <= end) *str = ' '; ++str; } @@ -384,18 +382,18 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) if (!(flags & LEFT)) { while (len < field_width--) { - if (str < end) + if (str <= end) *str = ' '; ++str; } } for (i = 0; i < len; ++i) { - if (str < end) + if (str <= end) *str = *s; ++str; ++s; } while (len < field_width--) { - if (str < end) + if (str <= end) *str = ' '; ++str; } @@ -428,7 +426,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) continue; case '%': - if (str < end) + if (str <= end) *str = '%'; ++str; continue; @@ -451,11 +449,11 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) break; default: - if (str < end) + if (str <= end) *str = '%'; ++str; if (*fmt) { - if (str < end) + if (str <= end) *str = *fmt; ++str; } else { @@ -485,13 +483,14 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) str = number(str, end, num, base, field_width, precision, flags); } - if (size > 0) { - if (str < end) - *str = '\0'; - else - end[-1] = '\0'; - } - /* the trailing null byte doesn't count towards the total */ + if (str <= end) + *str = '\0'; + else if (size > 0) + /* don't write out a null byte if the buf size is zero */ + *end = '\0'; + /* the trailing null byte doesn't count towards the total + * ++str; + */ return str-buf; } @@ -849,26 +848,3 @@ int sscanf(const char * buf, const char * fmt, ...) } EXPORT_SYMBOL(sscanf); - - -/* Simplified asprintf. */ -char *kasprintf(gfp_t gfp, const char *fmt, ...) -{ - va_list ap; - unsigned int len; - char *p; - - va_start(ap, fmt); - len = vsnprintf(NULL, 0, fmt, ap); - va_end(ap); - - p = kmalloc(len+1, gfp); - if (!p) - return NULL; - va_start(ap, fmt); - vsnprintf(p, len+1, fmt, ap); - va_end(ap); - return p; -} - -EXPORT_SYMBOL(kasprintf); diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c index c3e4a2baf..1653dd9bb 100644 --- a/lib/zlib_deflate/deflate.c +++ b/lib/zlib_deflate/deflate.c @@ -164,17 +164,34 @@ static const config configuration_table[10] = { memset((char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head)); /* ========================================================================= */ -int zlib_deflateInit2( +int zlib_deflateInit_( + z_streamp strm, + int level, + const char *version, + int stream_size +) +{ + return zlib_deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, + DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int zlib_deflateInit2_( z_streamp strm, int level, int method, int windowBits, int memLevel, - int strategy + int strategy, + const char *version, + int stream_size ) { deflate_state *s; int noheader = 0; + static char* my_version = ZLIB_VERSION; deflate_workspace *mem; ush *overlay; @@ -182,6 +199,10 @@ int zlib_deflateInit2( * output size for (length,distance) codes is <= 24 bits. */ + if (version == NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } if (strm == NULL) return Z_STREAM_ERROR; strm->msg = NULL; diff --git a/lib/zlib_deflate/deflate_syms.c b/lib/zlib_deflate/deflate_syms.c index ccfe25f39..767b573d1 100644 --- a/lib/zlib_deflate/deflate_syms.c +++ b/lib/zlib_deflate/deflate_syms.c @@ -12,7 +12,8 @@ EXPORT_SYMBOL(zlib_deflate_workspacesize); EXPORT_SYMBOL(zlib_deflate); -EXPORT_SYMBOL(zlib_deflateInit2); +EXPORT_SYMBOL(zlib_deflateInit_); +EXPORT_SYMBOL(zlib_deflateInit2_); EXPORT_SYMBOL(zlib_deflateEnd); EXPORT_SYMBOL(zlib_deflateReset); MODULE_LICENSE("GPL"); diff --git a/lib/zlib_inflate/Makefile b/lib/zlib_inflate/Makefile index bf065482f..221c139e0 100644 --- a/lib/zlib_inflate/Makefile +++ b/lib/zlib_inflate/Makefile @@ -15,5 +15,5 @@ obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate.o -zlib_inflate-objs := inffast.o inflate.o \ - inftrees.o inflate_syms.o +zlib_inflate-objs := infblock.o infcodes.o inffast.o inflate.o \ + inflate_sync.o inftrees.o infutil.o inflate_syms.o diff --git a/lib/zlib_inflate/infblock.c b/lib/zlib_inflate/infblock.c new file mode 100644 index 000000000..c16cdeff5 --- /dev/null +++ b/lib/zlib_inflate/infblock.c @@ -0,0 +1,365 @@ +/* infblock.c -- interpret and process block types to last block + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state; + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* Table for deflate from PKZIP's appnote.txt. */ +static const uInt border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarily, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ + + +void zlib_inflate_blocks_reset( + inflate_blocks_statef *s, + z_streamp z, + uLong *c +) +{ + if (c != NULL) + *c = s->check; + if (s->mode == CODES) + zlib_inflate_codes_free(s->sub.decode.codes, z); + s->mode = TYPE; + s->bitk = 0; + s->bitb = 0; + s->read = s->write = s->window; + if (s->checkfn != NULL) + z->adler = s->check = (*s->checkfn)(0L, NULL, 0); +} + +inflate_blocks_statef *zlib_inflate_blocks_new( + z_streamp z, + check_func c, + uInt w +) +{ + inflate_blocks_statef *s; + + s = &WS(z)->working_blocks_state; + s->hufts = WS(z)->working_hufts; + s->window = WS(z)->working_window; + s->end = s->window + w; + s->checkfn = c; + s->mode = TYPE; + zlib_inflate_blocks_reset(s, z, NULL); + return s; +} + + +int zlib_inflate_blocks( + inflate_blocks_statef *s, + z_streamp z, + int r +) +{ + uInt t; /* temporary storage */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Byte *p; /* input data pointer */ + uInt n; /* bytes available there */ + Byte *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input based on current state */ + while (1) switch (s->mode) + { + case TYPE: + NEEDBITS(3) + t = (uInt)b & 7; + s->last = t & 1; + switch (t >> 1) + { + case 0: /* stored */ + DUMPBITS(3) + t = k & 7; /* go to byte boundary */ + DUMPBITS(t) + s->mode = LENS; /* get length of stored block */ + break; + case 1: /* fixed */ + { + uInt bl, bd; + inflate_huft *tl, *td; + + zlib_inflate_trees_fixed(&bl, &bd, &tl, &td, s->hufts, z); + s->sub.decode.codes = zlib_inflate_codes_new(bl, bd, tl, td, z); + if (s->sub.decode.codes == NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + } + DUMPBITS(3) + s->mode = CODES; + break; + case 2: /* dynamic */ + DUMPBITS(3) + s->mode = TABLE; + break; + case 3: /* illegal */ + DUMPBITS(3) + s->mode = B_BAD; + z->msg = (char*)"invalid block type"; + r = Z_DATA_ERROR; + LEAVE + } + break; + case LENS: + NEEDBITS(32) + if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) + { + s->mode = B_BAD; + z->msg = (char*)"invalid stored block lengths"; + r = Z_DATA_ERROR; + LEAVE + } + s->sub.left = (uInt)b & 0xffff; + b = k = 0; /* dump bits */ + s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE); + break; + case STORED: + if (n == 0) + LEAVE + NEEDOUT + t = s->sub.left; + if (t > n) t = n; + if (t > m) t = m; + memcpy(q, p, t); + p += t; n -= t; + q += t; m -= t; + if ((s->sub.left -= t) != 0) + break; + s->mode = s->last ? DRY : TYPE; + break; + case TABLE: + NEEDBITS(14) + s->sub.trees.table = t = (uInt)b & 0x3fff; +#ifndef PKZIP_BUG_WORKAROUND + if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) + { + s->mode = B_BAD; + z->msg = (char*)"too many length or distance symbols"; + r = Z_DATA_ERROR; + LEAVE + } +#endif + { + s->sub.trees.blens = WS(z)->working_blens; + } + DUMPBITS(14) + s->sub.trees.index = 0; + s->mode = BTREE; + case BTREE: + while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) + { + NEEDBITS(3) + s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; + DUMPBITS(3) + } + while (s->sub.trees.index < 19) + s->sub.trees.blens[border[s->sub.trees.index++]] = 0; + s->sub.trees.bb = 7; + t = zlib_inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, + &s->sub.trees.tb, s->hufts, z); + if (t != Z_OK) + { + r = t; + if (r == Z_DATA_ERROR) + s->mode = B_BAD; + LEAVE + } + s->sub.trees.index = 0; + s->mode = DTREE; + case DTREE: + while (t = s->sub.trees.table, + s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) + { + inflate_huft *h; + uInt i, j, c; + + t = s->sub.trees.bb; + NEEDBITS(t) + h = s->sub.trees.tb + ((uInt)b & zlib_inflate_mask[t]); + t = h->bits; + c = h->base; + if (c < 16) + { + DUMPBITS(t) + s->sub.trees.blens[s->sub.trees.index++] = c; + } + else /* c == 16..18 */ + { + i = c == 18 ? 7 : c - 14; + j = c == 18 ? 11 : 3; + NEEDBITS(t + i) + DUMPBITS(t) + j += (uInt)b & zlib_inflate_mask[i]; + DUMPBITS(i) + i = s->sub.trees.index; + t = s->sub.trees.table; + if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || + (c == 16 && i < 1)) + { + s->mode = B_BAD; + z->msg = (char*)"invalid bit length repeat"; + r = Z_DATA_ERROR; + LEAVE + } + c = c == 16 ? s->sub.trees.blens[i - 1] : 0; + do { + s->sub.trees.blens[i++] = c; + } while (--j); + s->sub.trees.index = i; + } + } + s->sub.trees.tb = NULL; + { + uInt bl, bd; + inflate_huft *tl, *td; + inflate_codes_statef *c; + + bl = 9; /* must be <= 9 for lookahead assumptions */ + bd = 6; /* must be <= 9 for lookahead assumptions */ + t = s->sub.trees.table; + t = zlib_inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), + s->sub.trees.blens, &bl, &bd, &tl, &td, + s->hufts, z); + if (t != Z_OK) + { + if (t == (uInt)Z_DATA_ERROR) + s->mode = B_BAD; + r = t; + LEAVE + } + if ((c = zlib_inflate_codes_new(bl, bd, tl, td, z)) == NULL) + { + r = Z_MEM_ERROR; + LEAVE + } + s->sub.decode.codes = c; + } + s->mode = CODES; + case CODES: + UPDATE + if ((r = zlib_inflate_codes(s, z, r)) != Z_STREAM_END) + return zlib_inflate_flush(s, z, r); + r = Z_OK; + zlib_inflate_codes_free(s->sub.decode.codes, z); + LOAD + if (!s->last) + { + s->mode = TYPE; + break; + } + s->mode = DRY; + case DRY: + FLUSH + if (s->read != s->write) + LEAVE + s->mode = B_DONE; + case B_DONE: + r = Z_STREAM_END; + LEAVE + case B_BAD: + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +} + + +int zlib_inflate_blocks_free( + inflate_blocks_statef *s, + z_streamp z +) +{ + zlib_inflate_blocks_reset(s, z, NULL); + return Z_OK; +} + + +#if 0 +void zlib_inflate_set_dictionary( + inflate_blocks_statef *s, + const Byte *d, + uInt n +) +{ + memcpy(s->window, d, n); + s->read = s->write = s->window + n; +} +#endif /* 0 */ + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. + * IN assertion: s != NULL + */ +#if 0 +int zlib_inflate_blocks_sync_point( + inflate_blocks_statef *s +) +{ + return s->mode == LENS; +} +#endif /* 0 */ diff --git a/lib/zlib_inflate/infblock.h b/lib/zlib_inflate/infblock.h new file mode 100644 index 000000000..ceee60b51 --- /dev/null +++ b/lib/zlib_inflate/infblock.h @@ -0,0 +1,48 @@ +/* infblock.h -- header to use infblock.c + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +#ifndef _INFBLOCK_H +#define _INFBLOCK_H + +struct inflate_blocks_state; +typedef struct inflate_blocks_state inflate_blocks_statef; + +extern inflate_blocks_statef * zlib_inflate_blocks_new ( + z_streamp z, + check_func c, /* check function */ + uInt w); /* window size */ + +extern int zlib_inflate_blocks ( + inflate_blocks_statef *, + z_streamp , + int); /* initial return code */ + +extern void zlib_inflate_blocks_reset ( + inflate_blocks_statef *, + z_streamp , + uLong *); /* check value on output */ + +extern int zlib_inflate_blocks_free ( + inflate_blocks_statef *, + z_streamp); + +#if 0 +extern void zlib_inflate_set_dictionary ( + inflate_blocks_statef *s, + const Byte *d, /* dictionary */ + uInt n); /* dictionary length */ +#endif /* 0 */ + +#if 0 +extern int zlib_inflate_blocks_sync_point ( + inflate_blocks_statef *s); +#endif /* 0 */ + +#endif /* _INFBLOCK_H */ diff --git a/lib/zlib_inflate/infcodes.c b/lib/zlib_inflate/infcodes.c new file mode 100644 index 000000000..07cd7591c --- /dev/null +++ b/lib/zlib_inflate/infcodes.c @@ -0,0 +1,202 @@ +/* infcodes.c -- process literals and length/distance pairs + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include +#include "inftrees.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" +#include "inffast.h" + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +inflate_codes_statef *zlib_inflate_codes_new( + uInt bl, + uInt bd, + inflate_huft *tl, + inflate_huft *td, /* need separate declaration for Borland C++ */ + z_streamp z +) +{ + inflate_codes_statef *c; + + c = &WS(z)->working_state; + { + c->mode = START; + c->lbits = (Byte)bl; + c->dbits = (Byte)bd; + c->ltree = tl; + c->dtree = td; + } + return c; +} + + +int zlib_inflate_codes( + inflate_blocks_statef *s, + z_streamp z, + int r +) +{ + uInt j; /* temporary storage */ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Byte *p; /* input data pointer */ + uInt n; /* bytes available there */ + Byte *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + Byte *f; /* pointer to copy strings from */ + inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ + + /* copy input/output information to locals (UPDATE macro restores) */ + LOAD + + /* process input and output based on current state */ + while (1) switch (c->mode) + { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + case START: /* x: set up for LEN */ +#ifndef SLOW + if (m >= 258 && n >= 10) + { + UPDATE + r = zlib_inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); + LOAD + if (r != Z_OK) + { + c->mode = r == Z_STREAM_END ? WASH : BADCODE; + break; + } + } +#endif /* !SLOW */ + c->sub.code.need = c->lbits; + c->sub.code.tree = c->ltree; + c->mode = LEN; + case LEN: /* i: get length/literal/eob next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & zlib_inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e == 0) /* literal */ + { + c->sub.lit = t->base; + c->mode = LIT; + break; + } + if (e & 16) /* length */ + { + c->sub.copy.get = e & 15; + c->len = t->base; + c->mode = LENEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + if (e & 32) /* end of block */ + { + c->mode = WASH; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid literal/length code"; + r = Z_DATA_ERROR; + LEAVE + case LENEXT: /* i: getting length extra (have base) */ + j = c->sub.copy.get; + NEEDBITS(j) + c->len += (uInt)b & zlib_inflate_mask[j]; + DUMPBITS(j) + c->sub.code.need = c->dbits; + c->sub.code.tree = c->dtree; + c->mode = DIST; + case DIST: /* i: get distance next */ + j = c->sub.code.need; + NEEDBITS(j) + t = c->sub.code.tree + ((uInt)b & zlib_inflate_mask[j]); + DUMPBITS(t->bits) + e = (uInt)(t->exop); + if (e & 16) /* distance */ + { + c->sub.copy.get = e & 15; + c->sub.copy.dist = t->base; + c->mode = DISTEXT; + break; + } + if ((e & 64) == 0) /* next table */ + { + c->sub.code.need = e; + c->sub.code.tree = t + t->base; + break; + } + c->mode = BADCODE; /* invalid code */ + z->msg = (char*)"invalid distance code"; + r = Z_DATA_ERROR; + LEAVE + case DISTEXT: /* i: getting distance extra */ + j = c->sub.copy.get; + NEEDBITS(j) + c->sub.copy.dist += (uInt)b & zlib_inflate_mask[j]; + DUMPBITS(j) + c->mode = COPY; + case COPY: /* o: copying bytes in window, waiting for space */ + f = q - c->sub.copy.dist; + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ + while (c->len) + { + NEEDOUT + OUTBYTE(*f++) + if (f == s->end) + f = s->window; + c->len--; + } + c->mode = START; + break; + case LIT: /* o: got literal, waiting for output space */ + NEEDOUT + OUTBYTE(c->sub.lit) + c->mode = START; + break; + case WASH: /* o: got eob, possibly more output */ + if (k > 7) /* return unused byte, if any */ + { + k -= 8; + n++; + p--; /* can always return one */ + } + FLUSH + if (s->read != s->write) + LEAVE + c->mode = END; + case END: + r = Z_STREAM_END; + LEAVE + case BADCODE: /* x: got error */ + r = Z_DATA_ERROR; + LEAVE + default: + r = Z_STREAM_ERROR; + LEAVE + } +#ifdef NEED_DUMMY_RETURN + return Z_STREAM_ERROR; /* Some dumb compilers complain without this */ +#endif +} + + +void zlib_inflate_codes_free( + inflate_codes_statef *c, + z_streamp z +) +{ +} diff --git a/lib/zlib_inflate/infcodes.h b/lib/zlib_inflate/infcodes.h new file mode 100644 index 000000000..5cff41752 --- /dev/null +++ b/lib/zlib_inflate/infcodes.h @@ -0,0 +1,33 @@ +/* infcodes.h -- header to use infcodes.c + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +#ifndef _INFCODES_H +#define _INFCODES_H + +#include "infblock.h" + +struct inflate_codes_state; +typedef struct inflate_codes_state inflate_codes_statef; + +extern inflate_codes_statef *zlib_inflate_codes_new ( + uInt, uInt, + inflate_huft *, inflate_huft *, + z_streamp ); + +extern int zlib_inflate_codes ( + inflate_blocks_statef *, + z_streamp , + int); + +extern void zlib_inflate_codes_free ( + inflate_codes_statef *, + z_streamp ); + +#endif /* _INFCODES_H */ diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c index d84560c07..0bd7623fc 100644 --- a/lib/zlib_inflate/inffast.c +++ b/lib/zlib_inflate/inffast.c @@ -1,312 +1,176 @@ -/* inffast.c -- fast decoding - * Copyright (C) 1995-2004 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h +/* inffast.c -- process literals and length/distance pairs fast + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h */ #include #include "inftrees.h" -#include "inflate.h" +#include "infblock.h" +#include "infcodes.h" +#include "infutil.h" #include "inffast.h" -#ifndef ASMINF - -/* Allow machine dependent optimization for post-increment or pre-increment. - Based on testing to date, - Pre-increment preferred for: - - PowerPC G3 (Adler) - - MIPS R5000 (Randers-Pehrson) - Post-increment preferred for: - - none - No measurable difference: - - Pentium III (Anderson) - - M68060 (Nikl) - */ -#ifdef POSTINC -# define OFF 0 -# define PUP(a) *(a)++ -#else -# define OFF 1 -# define PUP(a) *++(a) -#endif - -/* - Decode literal, length, and distance codes and write out the resulting - literal and match bytes until either not enough input or output is - available, an end-of-block is encountered, or a data error is encountered. - When large enough input and output buffers are supplied to inflate(), for - example, a 16K input buffer and a 64K output buffer, more than 95% of the - inflate execution time is spent in this routine. - - Entry assumptions: - - state->mode == LEN - strm->avail_in >= 6 - strm->avail_out >= 258 - start >= strm->avail_out - state->bits < 8 - - On return, state->mode is one of: - - LEN -- ran out of enough output space or enough available input - TYPE -- reached end of block code, inflate() to interpret next block - BAD -- error in block data - - Notes: - - - The maximum input bits used by a length/distance pair is 15 bits for the - length code, 5 bits for the length extra, 15 bits for the distance code, - and 13 bits for the distance extra. This totals 48 bits, or six bytes. - Therefore if strm->avail_in >= 6, then there is enough input to avoid - checking for available input while decoding. - - - The maximum bytes that a single length/distance pair can output is 258 - bytes, which is the maximum length that can be coded. inflate_fast() - requires strm->avail_out >= 258 for each loop to avoid checking for - output space. - - - @start: inflate()'s starting value for strm->avail_out - */ -void inflate_fast(z_streamp strm, unsigned start) +struct inflate_codes_state; + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + +/* macros for bit input with no checking and for returning unused bytes */ +#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} + +/* Called with number of bytes left to write in window at least 258 + (the maximum string length) and number of input bytes available + at least ten. The ten bytes are six bytes for the longest length/ + distance pair plus four bytes for overloading the bit buffer. */ + +int zlib_inflate_fast( + uInt bl, + uInt bd, + inflate_huft *tl, + inflate_huft *td, /* need separate declaration for Borland C++ */ + inflate_blocks_statef *s, + z_streamp z +) { - struct inflate_state *state; - unsigned char *in; /* local strm->next_in */ - unsigned char *last; /* while in < last, enough input available */ - unsigned char *out; /* local strm->next_out */ - unsigned char *beg; /* inflate()'s initial strm->next_out */ - unsigned char *end; /* while out < end, enough space available */ -#ifdef INFLATE_STRICT - unsigned dmax; /* maximum distance from zlib header */ -#endif - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ - unsigned char *window; /* allocated sliding window, if wsize != 0 */ - unsigned long hold; /* local strm->hold */ - unsigned bits; /* local strm->bits */ - code const *lcode; /* local strm->lencode */ - code const *dcode; /* local strm->distcode */ - unsigned lmask; /* mask for first level of length codes */ - unsigned dmask; /* mask for first level of distance codes */ - code this; /* retrieved table entry */ - unsigned op; /* code bits, operation, extra bits, or */ - /* window position, window bytes to copy */ - unsigned len; /* match length, unused bytes */ - unsigned dist; /* match distance */ - unsigned char *from; /* where to copy match from */ - - /* copy state to local variables */ - state = (struct inflate_state *)strm->state; - in = strm->next_in - OFF; - last = in + (strm->avail_in - 5); - out = strm->next_out - OFF; - beg = out - (start - strm->avail_out); - end = out + (strm->avail_out - 257); -#ifdef INFLATE_STRICT - dmax = state->dmax; -#endif - wsize = state->wsize; - whave = state->whave; - write = state->write; - window = state->window; - hold = state->hold; - bits = state->bits; - lcode = state->lencode; - dcode = state->distcode; - lmask = (1U << state->lenbits) - 1; - dmask = (1U << state->distbits) - 1; - - /* decode literals and length/distances until end-of-block or not enough - input data or output space */ + inflate_huft *t; /* temporary pointer */ + uInt e; /* extra bits or operation */ + uLong b; /* bit buffer */ + uInt k; /* bits in bit buffer */ + Byte *p; /* input data pointer */ + uInt n; /* bytes available there */ + Byte *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + uInt ml; /* mask for literal/length tree */ + uInt md; /* mask for distance tree */ + uInt c; /* bytes to copy */ + uInt d; /* distance back to copy from */ + Byte *r; /* copy source pointer */ + + /* load input, output, bit values */ + LOAD + + /* initialize masks */ + ml = zlib_inflate_mask[bl]; + md = zlib_inflate_mask[bd]; + + /* do until not enough input or output space for fast loop */ + do { /* assume called with m >= 258 && n >= 10 */ + /* get literal/length code */ + GRABBITS(20) /* max bits for literal/length code */ + if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) + { + DUMPBITS(t->bits) + *q++ = (Byte)t->base; + m--; + continue; + } do { - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - this = lcode[hold & lmask]; - dolen: - op = (unsigned)(this.bits); - hold >>= op; - bits -= op; - op = (unsigned)(this.op); - if (op == 0) { /* literal */ - PUP(out) = (unsigned char)(this.val); - } - else if (op & 16) { /* length base */ - len = (unsigned)(this.val); - op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - len += (unsigned)hold & ((1U << op) - 1); - hold >>= op; - bits -= op; - } - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - this = dcode[hold & dmask]; - dodist: - op = (unsigned)(this.bits); - hold >>= op; - bits -= op; - op = (unsigned)(this.op); - if (op & 16) { /* distance base */ - dist = (unsigned)(this.val); - op &= 15; /* number of extra bits */ - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; - bits += 8; - } - } - dist += (unsigned)hold & ((1U << op) - 1); -#ifdef INFLATE_STRICT - if (dist > dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - hold >>= op; - bits -= op; - op = (unsigned)(out - beg); /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } - from = window - OFF; - if (write == 0) { /* very common case */ - from += wsize - op; - if (op < len) { /* some from window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - else if (write < op) { /* wrap around window */ - from += wsize + write - op; - op -= write; - if (op < len) { /* some from end of window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = window - OFF; - if (write < len) { /* some from start of window */ - op = write; - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - } - else { /* contiguous in window */ - from += write - op; - if (op < len) { /* some from window */ - len -= op; - do { - PUP(out) = PUP(from); - } while (--op); - from = out - dist; /* rest from output */ - } - } - while (len > 2) { - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(from); - } - } - else { - from = out - dist; /* copy direct from output */ - do { /* minimum length is three */ - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); - len -= 3; - } while (len > 2); - if (len) { - PUP(out) = PUP(from); - if (len > 1) - PUP(out) = PUP(from); - } - } + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits for length */ + e &= 15; + c = t->base + ((uInt)b & zlib_inflate_mask[e]); + DUMPBITS(e) + + /* decode distance base of block to copy */ + GRABBITS(15); /* max bits for distance code */ + e = (t = td + ((uInt)b & md))->exop; + do { + DUMPBITS(t->bits) + if (e & 16) + { + /* get extra bits to add to distance base */ + e &= 15; + GRABBITS(e) /* get extra bits (up to 13) */ + d = t->base + ((uInt)b & zlib_inflate_mask[e]); + DUMPBITS(e) + + /* do the copy */ + m -= c; + r = q - d; + if (r < s->window) /* wrap if needed */ + { + do { + r += s->end - s->window; /* force pointer in window */ + } while (r < s->window); /* covers invalid distances */ + e = s->end - r; + if (c > e) + { + c -= e; /* wrapped copy */ + do { + *q++ = *r++; + } while (--e); + r = s->window; + do { + *q++ = *r++; + } while (--c); + } + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); + } } - else if ((op & 64) == 0) { /* 2nd level distance code */ - this = dcode[this.val + (hold & ((1U << op) - 1))]; - goto dodist; + else /* normal copy */ + { + *q++ = *r++; c--; + *q++ = *r++; c--; + do { + *q++ = *r++; + } while (--c); } - else { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - } - else if ((op & 64) == 0) { /* 2nd level length code */ - this = lcode[this.val + (hold & ((1U << op) - 1))]; - goto dolen; - } - else if (op & 32) { /* end-of-block */ - state->mode = TYPE; break; + } + else if ((e & 64) == 0) + { + t += t->base; + e = (t += ((uInt)b & zlib_inflate_mask[e]))->exop; + } + else + { + z->msg = (char*)"invalid distance code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + break; + } + if ((e & 64) == 0) + { + t += t->base; + if ((e = (t += ((uInt)b & zlib_inflate_mask[e]))->exop) == 0) + { + DUMPBITS(t->bits) + *q++ = (Byte)t->base; + m--; + break; } - else { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - } while (in < last && out < end); - - /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - in -= len; - bits -= len << 3; - hold &= (1U << bits) - 1; - - /* update state and return */ - strm->next_in = in + OFF; - strm->next_out = out + OFF; - strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); - strm->avail_out = (unsigned)(out < end ? - 257 + (end - out) : 257 - (out - end)); - state->hold = hold; - state->bits = bits; - return; + } + else if (e & 32) + { + UNGRAB + UPDATE + return Z_STREAM_END; + } + else + { + z->msg = (char*)"invalid literal/length code"; + UNGRAB + UPDATE + return Z_DATA_ERROR; + } + } while (1); + } while (m >= 258 && n >= 10); + + /* not enough input or output--restore pointers and return */ + UNGRAB + UPDATE + return Z_OK; } - -/* - inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): - - Using bit fields for code structure - - Different op definition to avoid & for extra bits (do & for table bits) - - Three separate decoding do-loops for direct, window, and write == 0 - - Special case for distance > 1 copies to do overlapped load and store copy - - Explicit branch predictions (based on measured branch probabilities) - - Deferring match copy and interspersed it with decoding subsequent codes - - Swapping literal/length else - - Swapping window/direct else - - Larger unrolled copy loops (three is about right) - - Moving len -= 3 statement into middle of loop - */ - -#endif /* !ASMINF */ diff --git a/lib/zlib_inflate/inffast.h b/lib/zlib_inflate/inffast.h index 40315d9fd..fc720f0fa 100644 --- a/lib/zlib_inflate/inffast.h +++ b/lib/zlib_inflate/inffast.h @@ -1,6 +1,6 @@ /* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is @@ -8,4 +8,10 @@ subject to change. Applications should only use zlib.h. */ -void inflate_fast (z_streamp strm, unsigned start); +extern int zlib_inflate_fast ( + uInt, + uInt, + inflate_huft *, + inflate_huft *, + inflate_blocks_statef *, + z_streamp ); diff --git a/lib/zlib_inflate/inffixed.h b/lib/zlib_inflate/inffixed.h deleted file mode 100644 index 75ed4b597..000000000 --- a/lib/zlib_inflate/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. It - is part of the implementation of the compression library and - is subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; diff --git a/lib/zlib_inflate/inflate.c b/lib/zlib_inflate/inflate.c index fceb97c3a..31b9e9054 100644 --- a/lib/zlib_inflate/inflate.c +++ b/lib/zlib_inflate/inflate.c @@ -1,148 +1,89 @@ -/* inflate.c -- zlib decompression - * Copyright (C) 1995-2005 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - * - * Based on zlib 1.2.3 but modified for the Linux Kernel by - * Richard Purdie - * - * Changes mainly for static instead of dynamic memory allocation - * +/* inflate.c -- zlib interface to inflate modules + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h */ #include -#include "inftrees.h" -#include "inflate.h" -#include "inffast.h" +#include "infblock.h" #include "infutil.h" int zlib_inflate_workspacesize(void) { - return sizeof(struct inflate_workspace); + return sizeof(struct inflate_workspace); } -int zlib_inflateReset(z_streamp strm) -{ - struct inflate_state *state; - - if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; - state = (struct inflate_state *)strm->state; - strm->total_in = strm->total_out = state->total = 0; - strm->msg = NULL; - strm->adler = 1; /* to support ill-conceived Java test suite */ - state->mode = HEAD; - state->last = 0; - state->havedict = 0; - state->dmax = 32768U; - state->hold = 0; - state->bits = 0; - state->lencode = state->distcode = state->next = state->codes; - /* Initialise Window */ - state->wsize = 1U << state->wbits; - state->write = 0; - state->whave = 0; - - return Z_OK; -} - -#if 0 -int zlib_inflatePrime(z_streamp strm, int bits, int value) +int zlib_inflateReset( + z_streamp z +) { - struct inflate_state *state; - - if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; - state = (struct inflate_state *)strm->state; - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; - return Z_OK; + if (z == NULL || z->state == NULL || z->workspace == NULL) + return Z_STREAM_ERROR; + z->total_in = z->total_out = 0; + z->msg = NULL; + z->state->mode = z->state->nowrap ? BLOCKS : METHOD; + zlib_inflate_blocks_reset(z->state->blocks, z, NULL); + return Z_OK; } -#endif - -int zlib_inflateInit2(z_streamp strm, int windowBits) -{ - struct inflate_state *state; - - if (strm == NULL) return Z_STREAM_ERROR; - strm->msg = NULL; /* in case we return an error */ - - state = &WS(strm)->inflate_state; - strm->state = (struct internal_state *)state; - - if (windowBits < 0) { - state->wrap = 0; - windowBits = -windowBits; - } - else { - state->wrap = (windowBits >> 4) + 1; - } - if (windowBits < 8 || windowBits > 15) { - return Z_STREAM_ERROR; - } - state->wbits = (unsigned)windowBits; - state->window = &WS(strm)->working_window[0]; - return zlib_inflateReset(strm); -} -/* - Return state with length and distance decoding tables and index sizes set to - fixed code decoding. This returns fixed tables from inffixed.h. - */ -static void zlib_fixedtables(struct inflate_state *state) +int zlib_inflateEnd( + z_streamp z +) { -# include "inffixed.h" - state->lencode = lenfix; - state->lenbits = 9; - state->distcode = distfix; - state->distbits = 5; + if (z == NULL || z->state == NULL || z->workspace == NULL) + return Z_STREAM_ERROR; + if (z->state->blocks != NULL) + zlib_inflate_blocks_free(z->state->blocks, z); + z->state = NULL; + return Z_OK; } -/* - Update the window with the last wsize (normally 32K) bytes written before - returning. This is only called when a window is already in use, or when - output has been written during this inflate call, but the end of the deflate - stream has not been reached yet. It is also called to window dictionary data - when a dictionary is loaded. - - Providing output buffers larger than 32K to inflate() should provide a speed - advantage, since only the last 32K of output is copied to the sliding window - upon return from inflate(), and since all distances after the first 32K of - output will fall in the output data, making match copies simpler and faster. - The advantage may be dependent on the size of the processor's data caches. - */ -static void zlib_updatewindow(z_streamp strm, unsigned out) +int zlib_inflateInit2_( + z_streamp z, + int w, + const char *version, + int stream_size +) { - struct inflate_state *state; - unsigned copy, dist; - - state = (struct inflate_state *)strm->state; - - /* copy state->wsize or less output bytes into the circular window */ - copy = out - strm->avail_out; - if (copy >= state->wsize) { - memcpy(state->window, strm->next_out - state->wsize, state->wsize); - state->write = 0; - state->whave = state->wsize; - } - else { - dist = state->wsize - state->write; - if (dist > copy) dist = copy; - memcpy(state->window + state->write, strm->next_out - copy, dist); - copy -= dist; - if (copy) { - memcpy(state->window, strm->next_out - copy, copy); - state->write = copy; - state->whave = state->wsize; - } - else { - state->write += dist; - if (state->write == state->wsize) state->write = 0; - if (state->whave < state->wsize) state->whave += dist; - } - } + if (version == NULL || version[0] != ZLIB_VERSION[0] || + stream_size != sizeof(z_stream) || z->workspace == NULL) + return Z_VERSION_ERROR; + + /* initialize state */ + z->msg = NULL; + z->state = &WS(z)->internal_state; + z->state->blocks = NULL; + + /* handle undocumented nowrap option (no zlib header or check) */ + z->state->nowrap = 0; + if (w < 0) + { + w = - w; + z->state->nowrap = 1; + } + + /* set window size */ + if (w < 8 || w > 15) + { + zlib_inflateEnd(z); + return Z_STREAM_ERROR; + } + z->state->wbits = (uInt)w; + + /* create inflate_blocks state */ + if ((z->state->blocks = + zlib_inflate_blocks_new(z, z->state->nowrap ? NULL : zlib_adler32, (uInt)1 << w)) + == NULL) + { + zlib_inflateEnd(z); + return Z_MEM_ERROR; + } + + /* reset state */ + zlib_inflateReset(z); + return Z_OK; } @@ -150,767 +91,157 @@ static void zlib_updatewindow(z_streamp strm, unsigned out) * At the end of a Deflate-compressed PPP packet, we expect to have seen * a `stored' block type value but not the (zero) length bytes. */ -/* - Returns true if inflate is currently at the end of a block generated by - Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - implementation to provide an additional safety check. PPP uses - Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored - block. When decompressing, PPP checks that at the end of input packet, - inflate is waiting for these length bytes. - */ -static int zlib_inflateSyncPacket(z_streamp strm) +static int zlib_inflate_packet_flush(inflate_blocks_statef *s) { - struct inflate_state *state; - - if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; - state = (struct inflate_state *)strm->state; - - if (state->mode == STORED && state->bits == 0) { - state->mode = TYPE; - return Z_OK; - } - return Z_DATA_ERROR; -} - -/* Macros for inflate(): */ - -/* check function to use adler32() for zlib or crc32() for gzip */ -#define UPDATE(check, buf, len) zlib_adler32(check, buf, len) - -/* Load registers with state in inflate() for speed */ -#define LOAD() \ - do { \ - put = strm->next_out; \ - left = strm->avail_out; \ - next = strm->next_in; \ - have = strm->avail_in; \ - hold = state->hold; \ - bits = state->bits; \ - } while (0) - -/* Restore state from registers in inflate() */ -#define RESTORE() \ - do { \ - strm->next_out = put; \ - strm->avail_out = left; \ - strm->next_in = next; \ - strm->avail_in = have; \ - state->hold = hold; \ - state->bits = bits; \ - } while (0) - -/* Clear the input bit accumulator */ -#define INITBITS() \ - do { \ - hold = 0; \ - bits = 0; \ - } while (0) - -/* Get a byte of input into the bit accumulator, or return from inflate() - if there is no input available. */ -#define PULLBYTE() \ - do { \ - if (have == 0) goto inf_leave; \ - have--; \ - hold += (unsigned long)(*next++) << bits; \ - bits += 8; \ - } while (0) - -/* Assure that there are at least n bits in the bit accumulator. If there is - not enough available input to do that, then return from inflate(). */ -#define NEEDBITS(n) \ - do { \ - while (bits < (unsigned)(n)) \ - PULLBYTE(); \ - } while (0) - -/* Return the low n bits of the bit accumulator (n < 16) */ -#define BITS(n) \ - ((unsigned)hold & ((1U << (n)) - 1)) - -/* Remove n bits from the bit accumulator */ -#define DROPBITS(n) \ - do { \ - hold >>= (n); \ - bits -= (unsigned)(n); \ - } while (0) - -/* Remove zero to seven bits as needed to go to a byte boundary */ -#define BYTEBITS() \ - do { \ - hold >>= bits & 7; \ - bits -= bits & 7; \ - } while (0) - -/* Reverse the bytes in a 32-bit value */ -#define REVERSE(q) \ - ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ - (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) - -/* - inflate() uses a state machine to process as much input data and generate as - much output data as possible before returning. The state machine is - structured roughly as follows: - - for (;;) switch (state) { - ... - case STATEn: - if (not enough input data or output space to make progress) - return; - ... make progress ... - state = STATEm; - break; - ... - } - - so when inflate() is called again, the same case is attempted again, and - if the appropriate resources are provided, the machine proceeds to the - next state. The NEEDBITS() macro is usually the way the state evaluates - whether it can proceed or should return. NEEDBITS() does the return if - the requested bits are not available. The typical use of the BITS macros - is: - - NEEDBITS(n); - ... do something with BITS(n) ... - DROPBITS(n); - - where NEEDBITS(n) either returns from inflate() if there isn't enough - input left to load n bits into the accumulator, or it continues. BITS(n) - gives the low n bits in the accumulator. When done, DROPBITS(n) drops - the low n bits off the accumulator. INITBITS() clears the accumulator - and sets the number of available bits to zero. BYTEBITS() discards just - enough bits to put the accumulator on a byte boundary. After BYTEBITS() - and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. - - NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return - if there is no input available. The decoding of variable length codes uses - PULLBYTE() directly in order to pull just enough bytes to decode the next - code, and no more. - - Some states loop until they get enough input, making sure that enough - state information is maintained to continue the loop where it left off - if NEEDBITS() returns in the loop. For example, want, need, and keep - would all have to actually be part of the saved state in case NEEDBITS() - returns: - - case STATEw: - while (want < need) { - NEEDBITS(n); - keep[want++] = BITS(n); - DROPBITS(n); - } - state = STATEx; - case STATEx: - - As shown above, if the next state is also the next case, then the break - is omitted. - - A state may also return if there is not enough output space available to - complete that state. Those states are copying stored data, writing a - literal byte, and copying a matching string. - - When returning, a "goto inf_leave" is used to update the total counters, - update the check value, and determine whether any progress has been made - during that inflate() call in order to return the proper return code. - Progress is defined as a change in either strm->avail_in or strm->avail_out. - When there is a window, goto inf_leave will update the window with the last - output written. If a goto inf_leave occurs in the middle of decompression - and there is no window currently, goto inf_leave will create one and copy - output to the window for the next call of inflate(). - - In this implementation, the flush parameter of inflate() only affects the - return code (per zlib.h). inflate() always writes as much as possible to - strm->next_out, given the space available and the provided input--the effect - documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers - the allocation of and copying into a sliding window until necessary, which - provides the effect documented in zlib.h for Z_FINISH when the entire input - stream available. So the only thing the flush parameter actually does is: - when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it - will return Z_BUF_ERROR if it has not reached the end of the stream. - */ - -int zlib_inflate(z_streamp strm, int flush) -{ - struct inflate_state *state; - unsigned char *next; /* next input */ - unsigned char *put; /* next output */ - unsigned have, left; /* available input and output */ - unsigned long hold; /* bit buffer */ - unsigned bits; /* bits in bit buffer */ - unsigned in, out; /* save starting available input and output */ - unsigned copy; /* number of stored or match bytes to copy */ - unsigned char *from; /* where to copy match bytes from */ - code this; /* current decoding table entry */ - code last; /* parent table entry */ - unsigned len; /* length to copy for repeats, bits to drop */ - int ret; /* return code */ - static const unsigned short order[19] = /* permutation of code lengths */ - {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - - /* Do not check for strm->next_out == NULL here as ppc zImage - inflates to strm->next_out = 0 */ - - if (strm == NULL || strm->state == NULL || - (strm->next_in == NULL && strm->avail_in != 0)) - return Z_STREAM_ERROR; - - state = (struct inflate_state *)strm->state; - - if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ - LOAD(); - in = have; - out = left; - ret = Z_OK; - for (;;) - switch (state->mode) { - case HEAD: - if (state->wrap == 0) { - state->mode = TYPEDO; - break; - } - NEEDBITS(16); - if ( - ((BITS(8) << 8) + (hold >> 8)) % 31) { - strm->msg = (char *)"incorrect header check"; - state->mode = BAD; - break; - } - if (BITS(4) != Z_DEFLATED) { - strm->msg = (char *)"unknown compression method"; - state->mode = BAD; - break; - } - DROPBITS(4); - len = BITS(4) + 8; - if (len > state->wbits) { - strm->msg = (char *)"invalid window size"; - state->mode = BAD; - break; - } - state->dmax = 1U << len; - strm->adler = state->check = zlib_adler32(0L, NULL, 0); - state->mode = hold & 0x200 ? DICTID : TYPE; - INITBITS(); - break; - case DICTID: - NEEDBITS(32); - strm->adler = state->check = REVERSE(hold); - INITBITS(); - state->mode = DICT; - case DICT: - if (state->havedict == 0) { - RESTORE(); - return Z_NEED_DICT; - } - strm->adler = state->check = zlib_adler32(0L, NULL, 0); - state->mode = TYPE; - case TYPE: - if (flush == Z_BLOCK) goto inf_leave; - case TYPEDO: - if (state->last) { - BYTEBITS(); - state->mode = CHECK; - break; - } - NEEDBITS(3); - state->last = BITS(1); - DROPBITS(1); - switch (BITS(2)) { - case 0: /* stored block */ - state->mode = STORED; - break; - case 1: /* fixed block */ - zlib_fixedtables(state); - state->mode = LEN; /* decode codes */ - break; - case 2: /* dynamic block */ - state->mode = TABLE; - break; - case 3: - strm->msg = (char *)"invalid block type"; - state->mode = BAD; - } - DROPBITS(2); - break; - case STORED: - BYTEBITS(); /* go to byte boundary */ - NEEDBITS(32); - if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { - strm->msg = (char *)"invalid stored block lengths"; - state->mode = BAD; - break; - } - state->length = (unsigned)hold & 0xffff; - INITBITS(); - state->mode = COPY; - case COPY: - copy = state->length; - if (copy) { - if (copy > have) copy = have; - if (copy > left) copy = left; - if (copy == 0) goto inf_leave; - memcpy(put, next, copy); - have -= copy; - next += copy; - left -= copy; - put += copy; - state->length -= copy; - break; - } - state->mode = TYPE; - break; - case TABLE: - NEEDBITS(14); - state->nlen = BITS(5) + 257; - DROPBITS(5); - state->ndist = BITS(5) + 1; - DROPBITS(5); - state->ncode = BITS(4) + 4; - DROPBITS(4); -#ifndef PKZIP_BUG_WORKAROUND - if (state->nlen > 286 || state->ndist > 30) { - strm->msg = (char *)"too many length or distance symbols"; - state->mode = BAD; - break; - } -#endif - state->have = 0; - state->mode = LENLENS; - case LENLENS: - while (state->have < state->ncode) { - NEEDBITS(3); - state->lens[order[state->have++]] = (unsigned short)BITS(3); - DROPBITS(3); - } - while (state->have < 19) - state->lens[order[state->have++]] = 0; - state->next = state->codes; - state->lencode = (code const *)(state->next); - state->lenbits = 7; - ret = zlib_inflate_table(CODES, state->lens, 19, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid code lengths set"; - state->mode = BAD; - break; - } - state->have = 0; - state->mode = CODELENS; - case CODELENS: - while (state->have < state->nlen + state->ndist) { - for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; - PULLBYTE(); - } - if (this.val < 16) { - NEEDBITS(this.bits); - DROPBITS(this.bits); - state->lens[state->have++] = this.val; - } - else { - if (this.val == 16) { - NEEDBITS(this.bits + 2); - DROPBITS(this.bits); - if (state->have == 0) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - len = state->lens[state->have - 1]; - copy = 3 + BITS(2); - DROPBITS(2); - } - else if (this.val == 17) { - NEEDBITS(this.bits + 3); - DROPBITS(this.bits); - len = 0; - copy = 3 + BITS(3); - DROPBITS(3); - } - else { - NEEDBITS(this.bits + 7); - DROPBITS(this.bits); - len = 0; - copy = 11 + BITS(7); - DROPBITS(7); - } - if (state->have + copy > state->nlen + state->ndist) { - strm->msg = (char *)"invalid bit length repeat"; - state->mode = BAD; - break; - } - while (copy--) - state->lens[state->have++] = (unsigned short)len; - } - } - - /* handle error breaks in while */ - if (state->mode == BAD) break; - - /* build code tables */ - state->next = state->codes; - state->lencode = (code const *)(state->next); - state->lenbits = 9; - ret = zlib_inflate_table(LENS, state->lens, state->nlen, &(state->next), - &(state->lenbits), state->work); - if (ret) { - strm->msg = (char *)"invalid literal/lengths set"; - state->mode = BAD; - break; - } - state->distcode = (code const *)(state->next); - state->distbits = 6; - ret = zlib_inflate_table(DISTS, state->lens + state->nlen, state->ndist, - &(state->next), &(state->distbits), state->work); - if (ret) { - strm->msg = (char *)"invalid distances set"; - state->mode = BAD; - break; - } - state->mode = LEN; - case LEN: - if (have >= 6 && left >= 258) { - RESTORE(); - inflate_fast(strm, out); - LOAD(); - break; - } - for (;;) { - this = state->lencode[BITS(state->lenbits)]; - if ((unsigned)(this.bits) <= bits) break; - PULLBYTE(); - } - if (this.op && (this.op & 0xf0) == 0) { - last = this; - for (;;) { - this = state->lencode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(this.bits); - state->length = (unsigned)this.val; - if ((int)(this.op) == 0) { - state->mode = LIT; - break; - } - if (this.op & 32) { - state->mode = TYPE; - break; - } - if (this.op & 64) { - strm->msg = (char *)"invalid literal/length code"; - state->mode = BAD; - break; - } - state->extra = (unsigned)(this.op) & 15; - state->mode = LENEXT; - case LENEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->length += BITS(state->extra); - DROPBITS(state->extra); - } - state->mode = DIST; - case DIST: - for (;;) { - this = state->distcode[BITS(state->distbits)]; - if ((unsigned)(this.bits) <= bits) break; - PULLBYTE(); - } - if ((this.op & 0xf0) == 0) { - last = this; - for (;;) { - this = state->distcode[last.val + - (BITS(last.bits + last.op) >> last.bits)]; - if ((unsigned)(last.bits + this.bits) <= bits) break; - PULLBYTE(); - } - DROPBITS(last.bits); - } - DROPBITS(this.bits); - if (this.op & 64) { - strm->msg = (char *)"invalid distance code"; - state->mode = BAD; - break; - } - state->offset = (unsigned)this.val; - state->extra = (unsigned)(this.op) & 15; - state->mode = DISTEXT; - case DISTEXT: - if (state->extra) { - NEEDBITS(state->extra); - state->offset += BITS(state->extra); - DROPBITS(state->extra); - } -#ifdef INFLATE_STRICT - if (state->offset > state->dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - if (state->offset > state->whave + out - left) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } - state->mode = MATCH; - case MATCH: - if (left == 0) goto inf_leave; - copy = out - left; - if (state->offset > copy) { /* copy from window */ - copy = state->offset - copy; - if (copy > state->write) { - copy -= state->write; - from = state->window + (state->wsize - copy); - } - else - from = state->window + (state->write - copy); - if (copy > state->length) copy = state->length; - } - else { /* copy from output */ - from = put - state->offset; - copy = state->length; - } - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = *from++; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; - case LIT: - if (left == 0) goto inf_leave; - *put++ = (unsigned char)(state->length); - left--; - state->mode = LEN; - break; - case CHECK: - if (state->wrap) { - NEEDBITS(32); - out -= left; - strm->total_out += out; - state->total += out; - if (out) - strm->adler = state->check = - UPDATE(state->check, put - out, out); - out = left; - if (( - REVERSE(hold)) != state->check) { - strm->msg = (char *)"incorrect data check"; - state->mode = BAD; - break; - } - INITBITS(); - } - state->mode = DONE; - case DONE: - ret = Z_STREAM_END; - goto inf_leave; - case BAD: - ret = Z_DATA_ERROR; - goto inf_leave; - case MEM: - return Z_MEM_ERROR; - case SYNC: - default: - return Z_STREAM_ERROR; - } - - /* - Return from inflate(), updating the total counts and the check value. - If there was no progress during the inflate() call, return a buffer - error. Call zlib_updatewindow() to create and/or update the window state. - */ - inf_leave: - RESTORE(); - if (state->wsize || (state->mode < CHECK && out != strm->avail_out)) - zlib_updatewindow(strm, out); - - in -= strm->avail_in; - out -= strm->avail_out; - strm->total_in += in; - strm->total_out += out; - state->total += out; - if (state->wrap && out) - strm->adler = state->check = - UPDATE(state->check, strm->next_out - out, out); - - strm->data_type = state->bits + (state->last ? 64 : 0) + - (state->mode == TYPE ? 128 : 0); - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) - ret = Z_BUF_ERROR; - - if (flush == Z_PACKET_FLUSH && ret == Z_OK && - (strm->avail_out != 0 || strm->avail_in == 0)) - return zlib_inflateSyncPacket(strm); - return ret; -} - -int zlib_inflateEnd(z_streamp strm) -{ - if (strm == NULL || strm->state == NULL) - return Z_STREAM_ERROR; + if (s->mode != LENS) + return Z_DATA_ERROR; + s->mode = TYPE; return Z_OK; } -#if 0 -int zlib_inflateSetDictionary(z_streamp strm, const Byte *dictionary, - uInt dictLength) -{ - struct inflate_state *state; - unsigned long id; - - /* check state */ - if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; - state = (struct inflate_state *)strm->state; - if (state->wrap != 0 && state->mode != DICT) - return Z_STREAM_ERROR; - - /* check for correct dictionary id */ - if (state->mode == DICT) { - id = zlib_adler32(0L, NULL, 0); - id = zlib_adler32(id, dictionary, dictLength); - if (id != state->check) - return Z_DATA_ERROR; - } - - /* copy dictionary to window */ - zlib_updatewindow(strm, strm->avail_out); - if (dictLength > state->wsize) { - memcpy(state->window, dictionary + dictLength - state->wsize, - state->wsize); - state->whave = state->wsize; - } - else { - memcpy(state->window + state->wsize - dictLength, dictionary, - dictLength); - state->whave = dictLength; - } - state->havedict = 1; - return Z_OK; -} -#endif - -#if 0 -/* - Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found - or when out of input. When called, *have is the number of pattern bytes - found in order so far, in 0..3. On return *have is updated to the new - state. If on return *have equals four, then the pattern was found and the - return value is how many bytes were read including the last byte of the - pattern. If *have is less than four, then the pattern has not been found - yet and the return value is len. In the latter case, zlib_syncsearch() can be - called again with more data and the *have state. *have is initialized to - zero for the first call. - */ -static unsigned zlib_syncsearch(unsigned *have, unsigned char *buf, - unsigned len) +int zlib_inflateInit_( + z_streamp z, + const char *version, + int stream_size +) { - unsigned got; - unsigned next; - - got = *have; - next = 0; - while (next < len && got < 4) { - if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) - got++; - else if (buf[next]) - got = 0; - else - got = 4 - got; - next++; - } - *have = got; - return next; + return zlib_inflateInit2_(z, DEF_WBITS, version, stream_size); } -#endif -#if 0 -int zlib_inflateSync(z_streamp strm) -{ - unsigned len; /* number of bytes to look at or looked at */ - unsigned long in, out; /* temporary to save total_in and total_out */ - unsigned char buf[4]; /* to restore bit buffer to byte string */ - struct inflate_state *state; - - /* check parameters */ - if (strm == NULL || strm->state == NULL) return Z_STREAM_ERROR; - state = (struct inflate_state *)strm->state; - if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; - - /* if first time, start search in bit buffer */ - if (state->mode != SYNC) { - state->mode = SYNC; - state->hold <<= state->bits & 7; - state->bits -= state->bits & 7; - len = 0; - while (state->bits >= 8) { - buf[len++] = (unsigned char)(state->hold); - state->hold >>= 8; - state->bits -= 8; - } - state->have = 0; - zlib_syncsearch(&(state->have), buf, len); - } - - /* search available input */ - len = zlib_syncsearch(&(state->have), strm->next_in, strm->avail_in); - strm->avail_in -= len; - strm->next_in += len; - strm->total_in += len; - - /* return no joy or set up to restart inflate() on a new block */ - if (state->have != 4) return Z_DATA_ERROR; - in = strm->total_in; out = strm->total_out; - zlib_inflateReset(strm); - strm->total_in = in; strm->total_out = out; - state->mode = TYPE; - return Z_OK; -} -#endif +#undef NEEDBYTE +#undef NEXTBYTE +#define NEEDBYTE {if(z->avail_in==0)goto empty;r=trv;} +#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) -/* - * This subroutine adds the data at next_in/avail_in to the output history - * without performing any output. The output buffer must be "caught up"; - * i.e. no pending output but this should always be the case. The state must - * be waiting on the start of a block (i.e. mode == TYPE or HEAD). On exit, - * the output will also be caught up, and the checksum will have been updated - * if need be. - */ -int zlib_inflateIncomp(z_stream *z) +int zlib_inflate( + z_streamp z, + int f +) { - struct inflate_state *state = (struct inflate_state *)z->state; - Byte *saved_no = z->next_out; - uInt saved_ao = z->avail_out; - - if (state->mode != TYPE && state->mode != HEAD) - return Z_DATA_ERROR; - - /* Setup some variables to allow misuse of updateWindow */ - z->avail_out = 0; - z->next_out = z->next_in + z->avail_in; - - zlib_updatewindow(z, z->avail_in); - - /* Restore saved variables */ - z->avail_out = saved_ao; - z->next_out = saved_no; - - z->adler = state->check = - UPDATE(state->check, z->next_in, z->avail_in); - - z->total_out += z->avail_in; - z->total_in += z->avail_in; - z->next_in += z->avail_in; - state->total += z->avail_in; - z->avail_in = 0; - - return Z_OK; + int r, trv; + uInt b; + + if (z == NULL || z->state == NULL || z->next_in == NULL) + return Z_STREAM_ERROR; + trv = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; + while (1) switch (z->state->mode) + { + case METHOD: + NEEDBYTE + if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED) + { + z->state->mode = I_BAD; + z->msg = (char*)"unknown compression method"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + if ((z->state->sub.method >> 4) + 8 > z->state->wbits) + { + z->state->mode = I_BAD; + z->msg = (char*)"invalid window size"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + z->state->mode = FLAG; + case FLAG: + NEEDBYTE + b = NEXTBYTE; + if (((z->state->sub.method << 8) + b) % 31) + { + z->state->mode = I_BAD; + z->msg = (char*)"incorrect header check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + if (!(b & PRESET_DICT)) + { + z->state->mode = BLOCKS; + break; + } + z->state->mode = DICT4; + case DICT4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = DICT3; + case DICT3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = DICT2; + case DICT2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = DICT1; + case DICT1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + z->adler = z->state->sub.check.need; + z->state->mode = DICT0; + return Z_NEED_DICT; + case DICT0: + z->state->mode = I_BAD; + z->msg = (char*)"need dictionary"; + z->state->sub.marker = 0; /* can try inflateSync */ + return Z_STREAM_ERROR; + case BLOCKS: + r = zlib_inflate_blocks(z->state->blocks, z, r); + if (f == Z_PACKET_FLUSH && z->avail_in == 0 && z->avail_out != 0) + r = zlib_inflate_packet_flush(z->state->blocks); + if (r == Z_DATA_ERROR) + { + z->state->mode = I_BAD; + z->state->sub.marker = 0; /* can try inflateSync */ + break; + } + if (r == Z_OK) + r = trv; + if (r != Z_STREAM_END) + return r; + r = trv; + zlib_inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); + if (z->state->nowrap) + { + z->state->mode = I_DONE; + break; + } + z->state->mode = CHECK4; + case CHECK4: + NEEDBYTE + z->state->sub.check.need = (uLong)NEXTBYTE << 24; + z->state->mode = CHECK3; + case CHECK3: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 16; + z->state->mode = CHECK2; + case CHECK2: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE << 8; + z->state->mode = CHECK1; + case CHECK1: + NEEDBYTE + z->state->sub.check.need += (uLong)NEXTBYTE; + + if (z->state->sub.check.was != z->state->sub.check.need) + { + z->state->mode = I_BAD; + z->msg = (char*)"incorrect data check"; + z->state->sub.marker = 5; /* can't try inflateSync */ + break; + } + z->state->mode = I_DONE; + case I_DONE: + return Z_STREAM_END; + case I_BAD: + return Z_DATA_ERROR; + default: + return Z_STREAM_ERROR; + } + empty: + if (f != Z_PACKET_FLUSH) + return r; + z->state->mode = I_BAD; + z->msg = (char *)"need more for packet flush"; + z->state->sub.marker = 0; /* can try inflateSync */ + return Z_DATA_ERROR; } diff --git a/lib/zlib_inflate/inflate.h b/lib/zlib_inflate/inflate.h deleted file mode 100644 index df8a6c920..000000000 --- a/lib/zlib_inflate/inflate.h +++ /dev/null @@ -1,107 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2004 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN, /* i: waiting for length/lit code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to the BAD or MEM mode -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME - NAME -> COMMENT -> HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - Read deflate blocks: - TYPE -> STORED or TABLE or LEN or CHECK - STORED -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN - Read deflate codes: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* state maintained between inflate() calls. Approximately 7K bytes. */ -struct inflate_state { - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags (0 if zlib) */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - /* gz_headerp head; */ /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ - unsigned char *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const *lencode; /* starting table for length/literal codes */ - code const *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ -}; diff --git a/lib/zlib_inflate/inflate_syms.c b/lib/zlib_inflate/inflate_syms.c index 2061d4f06..ef49738f5 100644 --- a/lib/zlib_inflate/inflate_syms.c +++ b/lib/zlib_inflate/inflate_syms.c @@ -12,7 +12,8 @@ EXPORT_SYMBOL(zlib_inflate_workspacesize); EXPORT_SYMBOL(zlib_inflate); -EXPORT_SYMBOL(zlib_inflateInit2); +EXPORT_SYMBOL(zlib_inflateInit_); +EXPORT_SYMBOL(zlib_inflateInit2_); EXPORT_SYMBOL(zlib_inflateEnd); EXPORT_SYMBOL(zlib_inflateReset); EXPORT_SYMBOL(zlib_inflateIncomp); diff --git a/lib/zlib_inflate/inflate_sync.c b/lib/zlib_inflate/inflate_sync.c new file mode 100644 index 000000000..61411ff89 --- /dev/null +++ b/lib/zlib_inflate/inflate_sync.c @@ -0,0 +1,152 @@ +/* inflate.c -- zlib interface to inflate modules + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include +#include "infblock.h" +#include "infutil.h" + +#if 0 +int zlib_inflateSync( + z_streamp z +) +{ + uInt n; /* number of bytes to look at */ + Byte *p; /* pointer to bytes */ + uInt m; /* number of marker bytes found in a row */ + uLong r, w; /* temporaries to save total_in and total_out */ + + /* set up */ + if (z == NULL || z->state == NULL) + return Z_STREAM_ERROR; + if (z->state->mode != I_BAD) + { + z->state->mode = I_BAD; + z->state->sub.marker = 0; + } + if ((n = z->avail_in) == 0) + return Z_BUF_ERROR; + p = z->next_in; + m = z->state->sub.marker; + + /* search */ + while (n && m < 4) + { + static const Byte mark[4] = {0, 0, 0xff, 0xff}; + if (*p == mark[m]) + m++; + else if (*p) + m = 0; + else + m = 4 - m; + p++, n--; + } + + /* restore */ + z->total_in += p - z->next_in; + z->next_in = p; + z->avail_in = n; + z->state->sub.marker = m; + + /* return no joy or set up to restart on a new block */ + if (m != 4) + return Z_DATA_ERROR; + r = z->total_in; w = z->total_out; + zlib_inflateReset(z); + z->total_in = r; z->total_out = w; + z->state->mode = BLOCKS; + return Z_OK; +} +#endif /* 0 */ + + +/* Returns true if inflate is currently at the end of a block generated + * by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + * implementation to provide an additional safety check. PPP uses Z_SYNC_FLUSH + * but removes the length bytes of the resulting empty stored block. When + * decompressing, PPP checks that at the end of input packet, inflate is + * waiting for these length bytes. + */ +#if 0 +int zlib_inflateSyncPoint( + z_streamp z +) +{ + if (z == NULL || z->state == NULL || z->state->blocks == NULL) + return Z_STREAM_ERROR; + return zlib_inflate_blocks_sync_point(z->state->blocks); +} +#endif /* 0 */ + +/* + * This subroutine adds the data at next_in/avail_in to the output history + * without performing any output. The output buffer must be "caught up"; + * i.e. no pending output (hence s->read equals s->write), and the state must + * be BLOCKS (i.e. we should be willing to see the start of a series of + * BLOCKS). On exit, the output will also be caught up, and the checksum + * will have been updated if need be. + */ +static int zlib_inflate_addhistory(inflate_blocks_statef *s, + z_stream *z) +{ + uLong b; /* bit buffer */ /* NOT USED HERE */ + uInt k; /* bits in bit buffer */ /* NOT USED HERE */ + uInt t; /* temporary storage */ + Byte *p; /* input data pointer */ + uInt n; /* bytes available there */ + Byte *q; /* output window write pointer */ + uInt m; /* bytes to end of window or read pointer */ + + if (s->read != s->write) + return Z_STREAM_ERROR; + if (s->mode != TYPE) + return Z_DATA_ERROR; + + /* we're ready to rock */ + LOAD + /* while there is input ready, copy to output buffer, moving + * pointers as needed. + */ + while (n) { + t = n; /* how many to do */ + /* is there room until end of buffer? */ + if (t > m) t = m; + /* update check information */ + if (s->checkfn != NULL) + s->check = (*s->checkfn)(s->check, q, t); + memcpy(q, p, t); + q += t; + p += t; + n -= t; + z->total_out += t; + s->read = q; /* drag read pointer forward */ +/* WWRAP */ /* expand WWRAP macro by hand to handle s->read */ + if (q == s->end) { + s->read = q = s->window; + m = WAVAIL; + } + } + UPDATE + return Z_OK; +} + + +/* + * This subroutine adds the data at next_in/avail_in to the output history + * without performing any output. The output buffer must be "caught up"; + * i.e. no pending output (hence s->read equals s->write), and the state must + * be BLOCKS (i.e. we should be willing to see the start of a series of + * BLOCKS). On exit, the output will also be caught up, and the checksum + * will have been updated if need be. + */ + +int zlib_inflateIncomp( + z_stream *z + +) +{ + if (z->state->mode != BLOCKS) + return Z_DATA_ERROR; + return zlib_inflate_addhistory(z->state->blocks, z); +} diff --git a/lib/zlib_inflate/inftrees.c b/lib/zlib_inflate/inftrees.c index 3fe6ce5b5..874950ec4 100644 --- a/lib/zlib_inflate/inftrees.c +++ b/lib/zlib_inflate/inftrees.c @@ -1,315 +1,412 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2005 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h */ #include #include "inftrees.h" +#include "infutil.h" -#define MAXBITS 15 - +static const char inflate_copyright[] __attribute_used__ = + " inflate 1.1.3 Copyright 1995-1998 Mark Adler "; /* - Build a set of tables to decode the provided canonical Huffman code. - The code lengths are lens[0..codes-1]. The result starts at *table, - whose indices are 0..2^bits-1. work is a writable array of at least - lens shorts, which is used as a work area. type is the type of code - to be generated, CODES, LENS, or DISTS. On return, zero is success, - -1 is an invalid code, and +1 means that ENOUGH isn't enough. table - on return points to the next available entry's address. bits is the - requested root table index bits, and on return it is the actual root - table index bits. It will differ if the request is greater than the - longest code or if it is less than the shortest code. + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. */ -int zlib_inflate_table(codetype type, unsigned short *lens, unsigned codes, - code **table, unsigned *bits, unsigned short *work) -{ - unsigned len; /* a code's length in bits */ - unsigned sym; /* index of code symbols */ - unsigned min, max; /* minimum and maximum code lengths */ - unsigned root; /* number of index bits for root table */ - unsigned curr; /* number of index bits for current table */ - unsigned drop; /* code bits to drop for sub-table */ - int left; /* number of prefix codes available */ - unsigned used; /* code entries in table used */ - unsigned huff; /* Huffman code */ - unsigned incr; /* for incrementing code, index */ - unsigned fill; /* index for replicating entries */ - unsigned low; /* low bits for current root entry */ - unsigned mask; /* mask for low root bits */ - code this; /* table entry for duplication */ - code *next; /* next available space in table */ - const unsigned short *base; /* base value table to use */ - const unsigned short *extra; /* extra bits table to use */ - int end; /* use base and extra for symbol > end */ - unsigned short count[MAXBITS+1]; /* number of codes of each length */ - unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ - static const unsigned short lbase[31] = { /* Length codes 257..285 base */ +struct internal_state; + +/* simplify the use of the inflate_huft type with some defines */ +#define exop word.what.Exop +#define bits word.what.Bits + + +static int huft_build ( + uInt *, /* code lengths in bits */ + uInt, /* number of codes */ + uInt, /* number of "simple" codes */ + const uInt *, /* list of base values for non-simple codes */ + const uInt *, /* list of extra bits for non-simple codes */ + inflate_huft **, /* result: starting table */ + uInt *, /* maximum lookup bits (returns actual) */ + inflate_huft *, /* space for trees */ + uInt *, /* hufts used in space */ + uInt * ); /* space for values */ + +/* Tables for deflate from PKZIP's appnote.txt. */ +static const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const unsigned short lext[31] = { /* Length codes 257..285 extra */ - 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196}; - static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ + /* see note #13 above about 258 */ +static const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ +static const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577, 0, 0}; - static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, - 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, - 28, 28, 29, 29, 64, 64}; - - /* - Process a set of code lengths to create a canonical Huffman code. The - code lengths are lens[0..codes-1]. Each length corresponds to the - symbols 0..codes-1. The Huffman code is generated by first sorting the - symbols by length from short to long, and retaining the symbol order - for codes with equal lengths. Then the code starts with all zero bits - for the first code of the shortest length, and the codes are integer - increments for the same length, and zeros are appended as the length - increases. For the deflate format, these bits are stored backwards - from their more natural integer increment ordering, and so when the - decoding tables are built in the large loop below, the integer codes - are incremented backwards. - - This routine assumes, but does not check, that all of the entries in - lens[] are in the range 0..MAXBITS. The caller must assure this. - 1..MAXBITS is interpreted as that code length. zero means that that - symbol does not occur in this code. - - The codes are sorted by computing a count of codes for each length, - creating from that a table of starting indices for each length in the - sorted table, and then entering the symbols in order in the sorted - table. The sorted table is work[], with that space being provided by - the caller. - - The length counts are used for other purposes as well, i.e. finding - the minimum and maximum length codes, determining if there are any - codes at all, checking for a valid set of lengths, and looking ahead - at length counts to determine sub-table sizes when building the - decoding tables. - */ - - /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ - for (len = 0; len <= MAXBITS; len++) - count[len] = 0; - for (sym = 0; sym < codes; sym++) - count[lens[sym]]++; - - /* bound code lengths, force root to be within code lengths */ - root = *bits; - for (max = MAXBITS; max >= 1; max--) - if (count[max] != 0) break; - if (root > max) root = max; - if (max == 0) { /* no symbols to code at all */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)1; - this.val = (unsigned short)0; - *(*table)++ = this; /* make a table to force an error */ - *(*table)++ = this; - *bits = 1; - return 0; /* no symbols, but wait for decoding to report error */ - } - for (min = 1; min <= MAXBITS; min++) - if (count[min] != 0) break; - if (root < min) root = min; - - /* check for an over-subscribed or incomplete set of lengths */ - left = 1; - for (len = 1; len <= MAXBITS; len++) { - left <<= 1; - left -= count[len]; - if (left < 0) return -1; /* over-subscribed */ - } - if (left > 0 && (type == CODES || max != 1)) - return -1; /* incomplete set */ - - /* generate offsets into symbol table for each length for sorting */ - offs[1] = 0; - for (len = 1; len < MAXBITS; len++) - offs[len + 1] = offs[len] + count[len]; - - /* sort symbols by length, by symbol order within each length */ - for (sym = 0; sym < codes; sym++) - if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; - - /* - Create and fill in decoding tables. In this loop, the table being - filled is at next and has curr index bits. The code being used is huff - with length len. That code is converted to an index by dropping drop - bits off of the bottom. For codes where len is less than drop + curr, - those top drop + curr - len bits are incremented through all values to - fill the table with replicated entries. - - root is the number of index bits for the root table. When len exceeds - root, sub-tables are created pointed to by the root entry with an index - of the low root bits of huff. This is saved in low to check for when a - new sub-table should be started. drop is zero when the root table is - being filled, and drop is root when sub-tables are being filled. - - When a new sub-table is needed, it is necessary to look ahead in the - code lengths to determine what size sub-table is needed. The length - counts are used for this, and so count[] is decremented as codes are - entered in the tables. - - used keeps track of how many table entries have been allocated from the - provided *table space. It is checked when a LENS table is being made - against the space in *table, ENOUGH, minus the maximum space needed by - the worst case distance code, MAXD. This should never happen, but the - sufficiency of ENOUGH has not been proven exhaustively, hence the check. - This assumes that when type == LENS, bits == 9. - - sym increments through all symbols, and the loop terminates when - all codes of length max, i.e. all codes, have been processed. This - routine permits incomplete codes, so another loop after this one fills - in the rest of the decoding tables with invalid code markers. - */ - - /* set up for code type */ - switch (type) { - case CODES: - base = extra = work; /* dummy value--not used */ - end = 19; - break; - case LENS: - base = lbase; - base -= 257; - extra = lext; - extra -= 257; - end = 256; - break; - default: /* DISTS */ - base = dbase; - extra = dext; - end = -1; - } + 8193, 12289, 16385, 24577}; +static const uInt cpdext[30] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; - /* initialize state for loop */ - huff = 0; /* starting code */ - sym = 0; /* starting code symbol */ - len = min; /* starting code length */ - next = *table; /* current table to fill in */ - curr = root; /* current table index bits */ - drop = 0; /* current bits to drop from code for index */ - low = (unsigned)(-1); /* trigger new sub-table when len > root */ - used = 1U << root; /* use root table entries */ - mask = used - 1; /* mask for comparing low */ - - /* check available table space */ - if (type == LENS && used >= ENOUGH - MAXD) - return 1; - - /* process all codes and make table entries */ - for (;;) { - /* create table entry */ - this.bits = (unsigned char)(len - drop); - if ((int)(work[sym]) < end) { - this.op = (unsigned char)0; - this.val = work[sym]; - } - else if ((int)(work[sym]) > end) { - this.op = (unsigned char)(extra[work[sym]]); - this.val = base[work[sym]]; - } - else { - this.op = (unsigned char)(32 + 64); /* end of block */ - this.val = 0; - } +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ - /* replicate for those indices with low len bits equal to huff */ - incr = 1U << (len - drop); - fill = 1U << curr; - min = fill; /* save offset to next table */ - do { - fill -= incr; - next[(huff >> drop) + fill] = this; - } while (fill != 0); - - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; - /* go to next symbol, update count, len */ - sym++; - if (--(count[len]) == 0) { - if (len == max) break; - len = lens[work[sym]]; - } +/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ +#define BMAX 15 /* maximum bit length of any code */ + +static int huft_build( + uInt *b, /* code lengths in bits (all assumed <= BMAX) */ + uInt n, /* number of codes (assumed <= 288) */ + uInt s, /* number of simple-valued codes (0..s-1) */ + const uInt *d, /* list of base values for non-simple codes */ + const uInt *e, /* list of extra bits for non-simple codes */ + inflate_huft **t, /* result: starting table */ + uInt *m, /* maximum lookup bits, returns actual */ + inflate_huft *hp, /* space for trees */ + uInt *hn, /* hufts used in space */ + uInt *v /* working area: values in order of bit length */ +) +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR + if the given code set is incomplete (the tables are still built in this + case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of + lengths), or Z_MEM_ERROR if not enough memory. */ +{ - /* create new sub-table if needed */ - if (len > root && (huff & mask) != low) { - /* if first time, transition to sub-tables */ - if (drop == 0) - drop = root; - - /* increment past last table */ - next += min; /* here min is 1 << curr */ - - /* determine length of next table */ - curr = len - drop; - left = (int)(1 << curr); - while (curr + drop < max) { - left -= count[curr + drop]; - if (left <= 0) break; - curr++; - left <<= 1; + uInt a; /* counter for codes of length k */ + uInt c[BMAX+1]; /* bit length count table */ + uInt f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register uInt i; /* counter, current code */ + register uInt j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ + register uInt *p; /* pointer into c[], b[], or v[] */ + inflate_huft *q; /* points to current table */ + struct inflate_huft_s r; /* table entry for structure assignment */ + inflate_huft *u[BMAX]; /* table stack */ + register int w; /* bits before this table == (l * h) */ + uInt x[BMAX+1]; /* bit offsets, then code stack */ + uInt *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + uInt z; /* number of entries in current table */ + + + /* Generate counts for each bit length */ + p = c; +#define C0 *p++ = 0; +#define C2 C0 C0 C0 C0 +#define C4 C2 C2 C2 C2 + C4 /* clear c[]--assume BMAX+1 is 16 */ + p = b; i = n; + do { + c[*p++]++; /* assume all entries <= BMAX */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = NULL; + *m = 0; + return Z_OK; + } + + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((uInt)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((uInt)l > i) + l = i; + *m = l; + + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) + return Z_DATA_ERROR; + if ((y -= c[i]) < 0) + return Z_DATA_ERROR; + c[i] += y; + + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = NULL; /* just to keep compilers happy */ + q = NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = c[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = g - w; + z = z > (uInt)l ? l : z; /* table size upper limit */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ } - - /* check for enough space */ - used += 1U << curr; - if (type == LENS && used >= ENOUGH - MAXD) - return 1; - - /* point entry in root table to sub-table */ - low = huff & mask; - (*table)[low].op = (unsigned char)curr; - (*table)[low].bits = (unsigned char)root; - (*table)[low].val = (unsigned short)(next - *table); } + z = 1 << j; /* table entries for j-bit table */ + + /* allocate new table */ + if (*hn + z > MANY) /* (note: doesn't matter for fixed) */ + return Z_DATA_ERROR; /* overflow of MANY */ + u[h] = q = hp + *hn; + *hn += z; + + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.bits = (Byte)l; /* bits to dump before this table */ + r.exop = (Byte)j; /* bits in this table */ + j = i >> (w - l); + r.base = (uInt)(q - u[h-1] - j); /* offset to this table */ + u[h-1][j] = r; /* connect to last table */ + } + else + *t = q; /* first table is returned result */ + } + + /* set up table entry in r */ + r.bits = (Byte)(k - w); + if (p >= v + n) + r.exop = 128 + 64; /* out of values--invalid code */ + else if (*p < s) + { + r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ + r.base = *p++; /* simple code is just the value */ + } + else + { + r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */ + r.base = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + mask = (1 << w) - 1; /* needed on HP, cc -O bug */ + while ((i & mask) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + mask = (1 << w) - 1; + } } + } - /* - Fill in rest of table for incomplete codes. This loop is similar to the - loop above in incrementing huff for table indices. It is assumed that - len is equal to curr + drop, so there is no loop needed to increment - through high index bits. When the current sub-table is filled, the loop - drops back to the root table to fill in any remaining entries there. - */ - this.op = (unsigned char)64; /* invalid code marker */ - this.bits = (unsigned char)(len - drop); - this.val = (unsigned short)0; - while (huff != 0) { - /* when done with sub-table, drop back to root table */ - if (drop != 0 && (huff & mask) != low) { - drop = 0; - len = root; - next = *table; - this.bits = (unsigned char)len; - } - /* put invalid code marker in table */ - next[huff >> drop] = this; + /* Return Z_BUF_ERROR if we were given an incomplete table */ + return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; +} - /* backwards increment the len-bit code huff */ - incr = 1U << (len - 1); - while (huff & incr) - incr >>= 1; - if (incr != 0) { - huff &= incr - 1; - huff += incr; - } - else - huff = 0; + +int zlib_inflate_trees_bits( + uInt *c, /* 19 code lengths */ + uInt *bb, /* bits tree desired/actual depth */ + inflate_huft **tb, /* bits tree result */ + inflate_huft *hp, /* space for trees */ + z_streamp z /* for messages */ +) +{ + int r; + uInt hn = 0; /* hufts used in space */ + uInt *v; /* work area for huft_build */ + + v = WS(z)->tree_work_area_1; + r = huft_build(c, 19, 19, NULL, NULL, tb, bb, hp, &hn, v); + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed dynamic bit lengths tree"; + else if (r == Z_BUF_ERROR || *bb == 0) + { + z->msg = (char*)"incomplete dynamic bit lengths tree"; + r = Z_DATA_ERROR; + } + return r; +} + +int zlib_inflate_trees_dynamic( + uInt nl, /* number of literal/length codes */ + uInt nd, /* number of distance codes */ + uInt *c, /* that many (total) code lengths */ + uInt *bl, /* literal desired/actual bit depth */ + uInt *bd, /* distance desired/actual bit depth */ + inflate_huft **tl, /* literal/length tree result */ + inflate_huft **td, /* distance tree result */ + inflate_huft *hp, /* space for trees */ + z_streamp z /* for messages */ +) +{ + int r; + uInt hn = 0; /* hufts used in space */ + uInt *v; /* work area for huft_build */ + + /* allocate work area */ + v = WS(z)->tree_work_area_2; + + /* build literal/length tree */ + r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); + if (r != Z_OK || *bl == 0) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed literal/length tree"; + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"incomplete literal/length tree"; + r = Z_DATA_ERROR; + } + return r; + } + + /* build distance tree */ + r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); + if (r != Z_OK || (*bd == 0 && nl > 257)) + { + if (r == Z_DATA_ERROR) + z->msg = (char*)"oversubscribed distance tree"; + else if (r == Z_BUF_ERROR) { +#ifdef PKZIP_BUG_WORKAROUND + r = Z_OK; + } +#else + z->msg = (char*)"incomplete distance tree"; + r = Z_DATA_ERROR; + } + else if (r != Z_MEM_ERROR) + { + z->msg = (char*)"empty distance tree with lengths"; + r = Z_DATA_ERROR; } + return r; +#endif + } - /* set return parameters */ - *table += used; - *bits = root; - return 0; + /* done */ + return Z_OK; +} + + +int zlib_inflate_trees_fixed( + uInt *bl, /* literal desired/actual bit depth */ + uInt *bd, /* distance desired/actual bit depth */ + inflate_huft **tl, /* literal/length tree result */ + inflate_huft **td, /* distance tree result */ + inflate_huft *hp, /* space for trees */ + z_streamp z /* for memory allocation */ +) +{ + int i; /* temporary variable */ + unsigned l[288]; /* length list for huft_build */ + uInt *v; /* work area for huft_build */ + + /* set up literal table */ + for (i = 0; i < 144; i++) + l[i] = 8; + for (; i < 256; i++) + l[i] = 9; + for (; i < 280; i++) + l[i] = 7; + for (; i < 288; i++) /* make a complete, but wrong code set */ + l[i] = 8; + *bl = 9; + v = WS(z)->tree_work_area_1; + if ((i = huft_build(l, 288, 257, cplens, cplext, tl, bl, hp, &i, v)) != 0) + return i; + + /* set up distance table */ + for (i = 0; i < 30; i++) /* make an incomplete code set */ + l[i] = 5; + *bd = 5; + if ((i = huft_build(l, 30, 0, cpdist, cpdext, td, bd, hp, &i, v)) > 1) + return i; + + return Z_OK; } diff --git a/lib/zlib_inflate/inftrees.h b/lib/zlib_inflate/inftrees.h index 5f5219b12..e37705adc 100644 --- a/lib/zlib_inflate/inftrees.h +++ b/lib/zlib_inflate/inftrees.h @@ -1,6 +1,6 @@ /* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is @@ -8,48 +8,57 @@ subject to change. Applications should only use zlib.h. */ -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). */ + +#ifndef _INFTREES_H +#define _INFTREES_H + +typedef struct inflate_huft_s inflate_huft; + +struct inflate_huft_s { + union { + struct { + Byte Exop; /* number of extra bits or operation */ + Byte Bits; /* number of bits in this code or subcode */ + } what; + uInt pad; /* pad structure to a power of 2 (4 bytes for */ + } word; /* 16-bit, 8 bytes for 32-bit int's) */ + uInt base; /* literal, length base, distance base, + or table offset */ +}; /* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1444 code structures (852 for length/literals - and 592 for distances, the latter actually the result of an - exhaustive search). The true maximum is not known, but the value - below is more than safe. */ -#define ENOUGH 2048 -#define MAXD 592 - -/* Type of code to build for inftable() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -extern int zlib_inflate_table (codetype type, unsigned short *lens, - unsigned codes, code **table, - unsigned *bits, unsigned short *work); + exhaustive search was 1004 huft structures (850 for length/literals + and 154 for distances, the latter actually the result of an + exhaustive search). The actual maximum is not known, but the + value below is more than safe. */ +#define MANY 1440 + +extern int zlib_inflate_trees_bits ( + uInt *, /* 19 code lengths */ + uInt *, /* bits tree desired/actual depth */ + inflate_huft **, /* bits tree result */ + inflate_huft *, /* space for trees */ + z_streamp); /* for messages */ + +extern int zlib_inflate_trees_dynamic ( + uInt, /* number of literal/length codes */ + uInt, /* number of distance codes */ + uInt *, /* that many (total) code lengths */ + uInt *, /* literal desired/actual bit depth */ + uInt *, /* distance desired/actual bit depth */ + inflate_huft **, /* literal/length tree result */ + inflate_huft **, /* distance tree result */ + inflate_huft *, /* space for trees */ + z_streamp); /* for messages */ + +extern int zlib_inflate_trees_fixed ( + uInt *, /* literal desired/actual bit depth */ + uInt *, /* distance desired/actual bit depth */ + inflate_huft **, /* literal/length tree result */ + inflate_huft **, /* distance tree result */ + inflate_huft *, /* space for trees */ + z_streamp); /* for memory allocation */ + +#endif /* _INFTREES_H */ diff --git a/lib/zlib_inflate/infutil.c b/lib/zlib_inflate/infutil.c new file mode 100644 index 000000000..00202b343 --- /dev/null +++ b/lib/zlib_inflate/infutil.c @@ -0,0 +1,88 @@ +/* inflate_util.c -- data and routines common to blocks and codes + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include +#include "infblock.h" +#include "inftrees.h" +#include "infcodes.h" +#include "infutil.h" + +struct inflate_codes_state; + +/* And'ing with mask[n] masks the lower n bits */ +uInt zlib_inflate_mask[17] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + + +/* copy as much as possible from the sliding window to the output area */ +int zlib_inflate_flush( + inflate_blocks_statef *s, + z_streamp z, + int r +) +{ + uInt n; + Byte *p; + Byte *q; + + /* local copies of source and destination pointers */ + p = z->next_out; + q = s->read; + + /* compute number of bytes to copy as far as end of window */ + n = (uInt)((q <= s->write ? s->write : s->end) - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy as far as end of window */ + memcpy(p, q, n); + p += n; + q += n; + + /* see if more to copy at beginning of window */ + if (q == s->end) + { + /* wrap pointers */ + q = s->window; + if (s->write == s->end) + s->write = s->window; + + /* compute bytes to copy */ + n = (uInt)(s->write - q); + if (n > z->avail_out) n = z->avail_out; + if (n && r == Z_BUF_ERROR) r = Z_OK; + + /* update counters */ + z->avail_out -= n; + z->total_out += n; + + /* update check information */ + if (s->checkfn != NULL) + z->adler = s->check = (*s->checkfn)(s->check, q, n); + + /* copy */ + memcpy(p, q, n); + p += n; + q += n; + } + + /* update pointers */ + z->next_out = p; + s->read = q; + + /* done */ + return r; +} diff --git a/lib/zlib_inflate/infutil.h b/lib/zlib_inflate/infutil.h index eb1a9007b..a15875fc5 100644 --- a/lib/zlib_inflate/infutil.h +++ b/lib/zlib_inflate/infutil.h @@ -11,12 +11,184 @@ #ifndef _INFUTIL_H #define _INFUTIL_H -#include +#include +#include "inftrees.h" +#include "infcodes.h" + +typedef enum { + TYPE, /* get type bits (3, including end bit) */ + LENS, /* get lengths for stored */ + STORED, /* processing stored block */ + TABLE, /* get table lengths */ + BTREE, /* get bit lengths tree for a dynamic block */ + DTREE, /* get length, distance trees for a dynamic block */ + CODES, /* processing fixed or dynamic block */ + DRY, /* output remaining window bytes */ + B_DONE, /* finished last block, done */ + B_BAD} /* got a data error--stuck here */ +inflate_block_mode; + +/* inflate blocks semi-private state */ +struct inflate_blocks_state { + + /* mode */ + inflate_block_mode mode; /* current inflate_block mode */ + + /* mode dependent information */ + union { + uInt left; /* if STORED, bytes left to copy */ + struct { + uInt table; /* table lengths (14 bits) */ + uInt index; /* index into blens (or border) */ + uInt *blens; /* bit lengths of codes */ + uInt bb; /* bit length tree depth */ + inflate_huft *tb; /* bit length decoding tree */ + } trees; /* if DTREE, decoding info for trees */ + struct { + inflate_codes_statef + *codes; + } decode; /* if CODES, current state */ + } sub; /* submode */ + uInt last; /* true if this block is the last block */ + + /* mode independent information */ + uInt bitk; /* bits in bit buffer */ + uLong bitb; /* bit buffer */ + inflate_huft *hufts; /* single malloc for tree space */ + Byte *window; /* sliding window */ + Byte *end; /* one byte after sliding window */ + Byte *read; /* window read pointer */ + Byte *write; /* window write pointer */ + check_func checkfn; /* check function */ + uLong check; /* check on output */ + +}; + + +/* defines for inflate input/output */ +/* update pointers and return */ +#define UPDBITS {s->bitb=b;s->bitk=k;} +#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} +#define UPDOUT {s->write=q;} +#define UPDATE {UPDBITS UPDIN UPDOUT} +#define LEAVE {UPDATE return zlib_inflate_flush(s,z,r);} +/* get bytes and bits */ +#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} +#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} +#define NEXTBYTE (n--,*p++) +#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} +/* output bytes */ +#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) +#define LOADOUT {q=s->write;m=(uInt)WAVAIL;} +#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} +#define FLUSH {UPDOUT r=zlib_inflate_flush(s,z,r); LOADOUT} +#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} +#define OUTBYTE(a) {*q++=(Byte)(a);m--;} +/* load local pointers */ +#define LOAD {LOADIN LOADOUT} + +/* masks for lower bits (size given to avoid silly warnings with Visual C++) */ +extern uInt zlib_inflate_mask[17]; + +/* copy as much as possible from the sliding window to the output area */ +extern int zlib_inflate_flush ( + inflate_blocks_statef *, + z_streamp , + int); + +/* inflate private state */ +typedef enum { + METHOD, /* waiting for method byte */ + FLAG, /* waiting for flag byte */ + DICT4, /* four dictionary check bytes to go */ + DICT3, /* three dictionary check bytes to go */ + DICT2, /* two dictionary check bytes to go */ + DICT1, /* one dictionary check byte to go */ + DICT0, /* waiting for inflateSetDictionary */ + BLOCKS, /* decompressing blocks */ + CHECK4, /* four check bytes to go */ + CHECK3, /* three check bytes to go */ + CHECK2, /* two check bytes to go */ + CHECK1, /* one check byte to go */ + I_DONE, /* finished check, done */ + I_BAD} /* got an error--stay here */ +inflate_mode; + +struct internal_state { + + /* mode */ + inflate_mode mode; /* current inflate mode */ + + /* mode dependent information */ + union { + uInt method; /* if FLAGS, method byte */ + struct { + uLong was; /* computed check value */ + uLong need; /* stream check value */ + } check; /* if CHECK, check values to compare */ + uInt marker; /* if BAD, inflateSync's marker bytes count */ + } sub; /* submode */ + + /* mode independent information */ + int nowrap; /* flag for no wrapper */ + uInt wbits; /* log2(window size) (8..15, defaults to 15) */ + inflate_blocks_statef + *blocks; /* current inflate_blocks state */ + +}; + +/* inflate codes private state */ +typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ + START, /* x: set up for LEN */ + LEN, /* i: get length/literal/eob next */ + LENEXT, /* i: getting length extra (have base) */ + DIST, /* i: get distance next */ + DISTEXT, /* i: getting distance extra */ + COPY, /* o: copying bytes in window, waiting for space */ + LIT, /* o: got literal, waiting for output space */ + WASH, /* o: got eob, possibly still output waiting */ + END, /* x: got eob and all data flushed */ + BADCODE} /* x: got error */ +inflate_codes_mode; + +struct inflate_codes_state { + + /* mode */ + inflate_codes_mode mode; /* current inflate_codes mode */ + + /* mode dependent information */ + uInt len; + union { + struct { + inflate_huft *tree; /* pointer into tree */ + uInt need; /* bits needed */ + } code; /* if LEN or DIST, where in tree */ + uInt lit; /* if LIT, literal */ + struct { + uInt get; /* bits to get for extra */ + uInt dist; /* distance back to copy from */ + } copy; /* if EXT or COPY, where and how much */ + } sub; /* submode */ + + /* mode independent information */ + Byte lbits; /* ltree bits decoded per branch */ + Byte dbits; /* dtree bits decoder per branch */ + inflate_huft *ltree; /* literal/length/eob tree */ + inflate_huft *dtree; /* distance tree */ + +}; /* memory allocation for inflation */ struct inflate_workspace { - struct inflate_state inflate_state; + inflate_codes_statef working_state; + struct inflate_blocks_state working_blocks_state; + struct internal_state internal_state; + unsigned int tree_work_area_1[19]; + unsigned int tree_work_area_2[288]; + unsigned working_blens[258 + 0x1f + 0x1f]; + inflate_huft working_hufts[MANY]; unsigned char working_window[1 << MAX_WBITS]; }; diff --git a/mm/Kconfig b/mm/Kconfig index 5511d6ccb..ab1007556 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -142,16 +142,10 @@ config SPLIT_PTLOCK_CPUS # config MIGRATION bool "Page migration" - def_bool y - depends on NUMA + def_bool y if NUMA + depends on SWAP && NUMA help Allows the migration of the physical location of pages of processes while the virtual addresses are not changed. This is useful for example on NUMA systems to put pages nearer to the processors accessing the page. - -config RESOURCES_64BIT - bool "64 bit Memory and IO resources (EXPERIMENTAL)" if (!64BIT && EXPERIMENTAL) - default 64BIT - help - This option allows memory and IO resources to be 64 bit. diff --git a/mm/Makefile b/mm/Makefile index 9dd824c11..0b8f73f2e 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -10,7 +10,7 @@ mmu-$(CONFIG_MMU) := fremap.o highmem.o madvise.o memory.o mincore.o \ obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \ page_alloc.o page-writeback.o pdflush.o \ readahead.o swap.o truncate.o vmscan.o \ - prio_tree.o util.o mmzone.o vmstat.o $(mmu-y) + prio_tree.o util.o mmzone.o $(mmu-y) obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o obj-$(CONFIG_HUGETLBFS) += hugetlb.o diff --git a/mm/bootmem.c b/mm/bootmem.c index 50353e0da..d213feded 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -29,7 +29,9 @@ unsigned long max_low_pfn; unsigned long min_low_pfn; unsigned long max_pfn; -EXPORT_UNUSED_SYMBOL(max_pfn); /* June 2006 */ +EXPORT_SYMBOL(max_pfn); /* This is exported so + * dma_get_required_mask(), which uses + * it, can be an inline function */ static LIST_HEAD(bdata_list); #ifdef CONFIG_CRASH_DUMP diff --git a/mm/fadvise.c b/mm/fadvise.c index 168c78a12..0a03357a1 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c @@ -23,6 +23,18 @@ /* * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could * deactivate the pages and clear PG_Referenced. + * + * LINUX_FADV_ASYNC_WRITE: start async writeout of any dirty pages between file + * offsets `offset' and `offset+len' inclusive. Any pages which are currently + * under writeout are skipped, whether or not they are dirty. + * + * LINUX_FADV_WRITE_WAIT: wait upon writeout of any dirty pages between file + * offsets `offset' and `offset+len'. + * + * By combining these two operations the application may do several things: + * + * LINUX_FADV_ASYNC_WRITE: push some or all of the dirty pages at the disk. + * */ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) { @@ -73,6 +85,7 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) file->f_ra.ra_pages = bdi->ra_pages * 2; break; case POSIX_FADV_WILLNEED: + case POSIX_FADV_NOREUSE: if (!mapping->a_ops->readpage) { ret = -EINVAL; break; @@ -93,8 +106,6 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) if (ret > 0) ret = 0; break; - case POSIX_FADV_NOREUSE: - break; case POSIX_FADV_DONTNEED: if (!bdi_write_congested(mapping->backing_dev_info)) filemap_flush(mapping); diff --git a/mm/filemap.c b/mm/filemap.c index a3aae8bec..96f354e18 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -9,11 +9,11 @@ * most "normal" filesystems (but you don't /have/ to use this: * the NFS filesystem used to do this differently, for example) */ +#include #include #include #include #include -#include #include #include #include @@ -38,6 +38,7 @@ */ #include /* for generic_osync_inode */ +#include #include static ssize_t @@ -119,7 +120,7 @@ void __remove_from_page_cache(struct page *page) radix_tree_delete(&mapping->page_tree, page->index); page->mapping = NULL; mapping->nrpages--; - __dec_zone_page_state(page, NR_FILE_PAGES); + pagecache_acct(-1); } void remove_from_page_cache(struct page *page) @@ -170,17 +171,15 @@ static int sync_page(void *word) } /** - * __filemap_fdatawrite_range - start writeback on mapping dirty pages in range + * filemap_fdatawrite_range - start writeback against all of a mapping's + * dirty pages that lie within the byte offsets * @mapping: address space structure to write * @start: offset in bytes where the range starts * @end: offset in bytes where the range ends (inclusive) * @sync_mode: enable synchronous operation * - * Start writeback against all of a mapping's dirty pages that lie - * within the byte offsets inclusive. - * * If sync_mode is WB_SYNC_ALL then this is a "data integrity" operation, as - * opposed to a regular memory cleansing writeback. The difference between + * opposed to a regular memory * cleansing writeback. The difference between * these two operations is that if a dirty page/buffer is encountered, it must * be waited upon, and not just skipped over. */ @@ -191,8 +190,8 @@ int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start, struct writeback_control wbc = { .sync_mode = sync_mode, .nr_to_write = mapping->nrpages * 2, - .range_start = start, - .range_end = end, + .start = start, + .end = end, }; if (!mapping_cap_writeback_dirty(mapping)) @@ -205,7 +204,7 @@ int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start, static inline int __filemap_fdatawrite(struct address_space *mapping, int sync_mode) { - return __filemap_fdatawrite_range(mapping, 0, LLONG_MAX, sync_mode); + return __filemap_fdatawrite_range(mapping, 0, 0, sync_mode); } int filemap_fdatawrite(struct address_space *mapping) @@ -220,10 +219,7 @@ static int filemap_fdatawrite_range(struct address_space *mapping, loff_t start, return __filemap_fdatawrite_range(mapping, start, end, WB_SYNC_ALL); } -/** - * filemap_flush - mostly a non-blocking flush - * @mapping: target address_space - * +/* * This is a mostly non-blocking flush. Not suitable for data-integrity * purposes - I/O may not be started against all dirty pages. */ @@ -233,12 +229,7 @@ int filemap_flush(struct address_space *mapping) } EXPORT_SYMBOL(filemap_flush); -/** - * wait_on_page_writeback_range - wait for writeback to complete - * @mapping: target address_space - * @start: beginning page index - * @end: ending page index - * +/* * Wait for writeback to complete against pages indexed by start->end * inclusive */ @@ -285,13 +276,7 @@ int wait_on_page_writeback_range(struct address_space *mapping, return ret; } -/** - * sync_page_range - write and wait on all pages in the passed range - * @inode: target inode - * @mapping: target address_space - * @pos: beginning offset in pages to write - * @count: number of bytes to write - * +/* * Write and wait upon all the pages in the passed range. This is a "data * integrity" operation. It waits upon in-flight writeout before starting and * waiting upon new writeout. If there was an IO error, return it. @@ -320,13 +305,7 @@ int sync_page_range(struct inode *inode, struct address_space *mapping, } EXPORT_SYMBOL(sync_page_range); -/** - * sync_page_range_nolock - * @inode: target inode - * @mapping: target address_space - * @pos: beginning offset in pages to write - * @count: number of bytes to write - * +/* * Note: Holding i_mutex across sync_page_range_nolock is not a good idea * as it forces O_SYNC writers to different parts of the same file * to be serialised right until io completion. @@ -350,11 +329,10 @@ int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, EXPORT_SYMBOL(sync_page_range_nolock); /** - * filemap_fdatawait - wait for all under-writeback pages to complete - * @mapping: address space structure to wait for + * filemap_fdatawait - walk the list of under-writeback pages of the given + * address space and wait for all of them. * - * Walk the list of under-writeback pages of the given address space - * and wait for all of them. + * @mapping: address space structure to wait for */ int filemap_fdatawait(struct address_space *mapping) { @@ -390,12 +368,7 @@ int filemap_write_and_wait(struct address_space *mapping) } EXPORT_SYMBOL(filemap_write_and_wait); -/** - * filemap_write_and_wait_range - write out & wait on a file range - * @mapping: the address_space for the pages - * @lstart: offset in bytes where the range starts - * @lend: offset in bytes where the range ends (inclusive) - * +/* * Write out and wait upon file offsets lstart->lend, inclusive. * * Note that `lend' is inclusive (describes the last byte to be written) so @@ -421,14 +394,8 @@ int filemap_write_and_wait_range(struct address_space *mapping, return err; } -/** - * add_to_page_cache - add newly allocated pagecache pages - * @page: page to add - * @mapping: the page's address_space - * @offset: page index - * @gfp_mask: page allocation mode - * - * This function is used to add newly allocated pagecache pages; +/* + * This function is used to add newly allocated pagecache pages: * the page is new, so we can just run SetPageLocked() against it. * The other page state flags were set by rmqueue(). * @@ -448,13 +415,14 @@ int add_to_page_cache(struct page *page, struct address_space *mapping, page->mapping = mapping; page->index = offset; mapping->nrpages++; - __inc_zone_page_state(page, NR_FILE_PAGES); + pagecache_acct(1); } write_unlock_irq(&mapping->tree_lock); radix_tree_preload_end(); } return error; } + EXPORT_SYMBOL(add_to_page_cache); int add_to_page_cache_lru(struct page *page, struct address_space *mapping, @@ -520,20 +488,9 @@ void fastcall wait_on_page_bit(struct page *page, int bit_nr) } EXPORT_SYMBOL(wait_on_page_bit); -void install_page_waitqueue_monitor(struct page *page, wait_queue_t *monitor) -{ - wait_queue_head_t *q = page_waitqueue(page); - unsigned long flags; - - spin_lock_irqsave(&q->lock, flags); - __add_wait_queue(q, monitor); - spin_unlock_irqrestore(&q->lock, flags); -} - -EXPORT_SYMBOL_GPL(install_page_waitqueue_monitor); - /** - * unlock_page - unlock a locked page + * unlock_page() - unlock a locked page + * * @page: the page * * Unlocks the page and wakes up sleepers in ___wait_on_page_locked(). @@ -556,9 +513,8 @@ void fastcall unlock_page(struct page *page) } EXPORT_SYMBOL(unlock_page); -/** - * end_page_writeback - end writeback against a page - * @page: the page +/* + * End writeback against a page. */ void end_page_writeback(struct page *page) { @@ -571,11 +527,10 @@ void end_page_writeback(struct page *page) } EXPORT_SYMBOL(end_page_writeback); -/** - * __lock_page - get a lock on the page, assuming we need to sleep to get it - * @page: the page to lock +/* + * Get a lock on the page, assuming we need to sleep to get it. * - * Ugly. Running sync_page() in state TASK_UNINTERRUPTIBLE is scary. If some + * Ugly: running sync_page() in state TASK_UNINTERRUPTIBLE is scary. If some * random driver's requestfn sets TASK_RUNNING, we could busywait. However * chances are that on the second loop, the block layer's plug list is empty, * so sync_page() will then return in state TASK_UNINTERRUPTIBLE. @@ -590,28 +545,7 @@ void fastcall __lock_page(struct page *page) EXPORT_SYMBOL(__lock_page); /* - * Note completion of filesystem specific page synchronisation - * - * This is used to allow a page to be written to a filesystem cache in the - * background without holding up the completion of readpage - */ -void fastcall end_page_fs_misc(struct page *page) -{ - smp_mb__before_clear_bit(); - if (!TestClearPageFsMisc(page)) - BUG(); - smp_mb__after_clear_bit(); - __wake_up_bit(page_waitqueue(page), &page->flags, PG_fs_misc); -} - -EXPORT_SYMBOL(end_page_fs_misc); - -/** - * find_get_page - find and get a page reference - * @mapping: the address_space to search - * @offset: the page index - * - * A rather lightweight function, finding and getting a reference to a + * a rather lightweight function, finding and getting a reference to a * hashed page atomically. */ struct page * find_get_page(struct address_space *mapping, unsigned long offset) @@ -625,14 +559,11 @@ struct page * find_get_page(struct address_space *mapping, unsigned long offset) read_unlock_irq(&mapping->tree_lock); return page; } + EXPORT_SYMBOL(find_get_page); -/** - * find_trylock_page - find and lock a page - * @mapping: the address_space to search - * @offset: the page index - * - * Same as find_get_page(), but trylock it instead of incrementing the count. +/* + * Same as above, but trylock it instead of incrementing the count. */ struct page *find_trylock_page(struct address_space *mapping, unsigned long offset) { @@ -645,10 +576,12 @@ struct page *find_trylock_page(struct address_space *mapping, unsigned long offs read_unlock_irq(&mapping->tree_lock); return page; } + EXPORT_SYMBOL(find_trylock_page); /** * find_lock_page - locate, pin and lock a pagecache page + * * @mapping: the address_space to search * @offset: the page index * @@ -684,10 +617,12 @@ repeat: read_unlock_irq(&mapping->tree_lock); return page; } + EXPORT_SYMBOL(find_lock_page); /** * find_or_create_page - locate or add a pagecache page + * * @mapping: the page's address_space * @index: the page's index into the mapping * @gfp_mask: page allocation mode @@ -728,6 +663,7 @@ repeat: page_cache_release(cached_page); return page; } + EXPORT_SYMBOL(find_or_create_page); /** @@ -793,16 +729,9 @@ unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t index, return i; } -/** - * find_get_pages_tag - find and return pages that match @tag - * @mapping: the address_space to search - * @index: the starting page index - * @tag: the tag index - * @nr_pages: the maximum number of pages - * @pages: where the resulting pages are placed - * +/* * Like find_get_pages, except we only return pages which are tagged with - * @tag. We update @index to index the next page for the traversal. + * `tag'. We update *index to index the next page for the traversal. */ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, int tag, unsigned int nr_pages, struct page **pages) @@ -821,11 +750,7 @@ unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index, return ret; } -/** - * grab_cache_page_nowait - returns locked page at given index in given cache - * @mapping: target address_space - * @index: the page index - * +/* * Same as grab_cache_page, but do not wait if the page is unavailable. * This is intended for speculative data generators, where the data can * be regenerated if the page couldn't be grabbed. This routine should @@ -854,49 +779,19 @@ grab_cache_page_nowait(struct address_space *mapping, unsigned long index) } return page; } + EXPORT_SYMBOL(grab_cache_page_nowait); /* - * CD/DVDs are error prone. When a medium error occurs, the driver may fail - * a _large_ part of the i/o request. Imagine the worst scenario: - * - * ---R__________________________________________B__________ - * ^ reading here ^ bad block(assume 4k) - * - * read(R) => miss => readahead(R...B) => media error => frustrating retries - * => failing the whole request => read(R) => read(R+1) => - * readahead(R+1...B+1) => bang => read(R+2) => read(R+3) => - * readahead(R+3...B+2) => bang => read(R+3) => read(R+4) => - * readahead(R+4...B+3) => bang => read(R+4) => read(R+5) => ...... - * - * It is going insane. Fix it by quickly scaling down the readahead size. - */ -static void shrink_readahead_size_eio(struct file *filp, - struct file_ra_state *ra) -{ - if (!ra->ra_pages) - return; - - ra->ra_pages /= 4; -} - -/** - * do_generic_mapping_read - generic file read routine - * @mapping: address_space to be read - * @_ra: file's readahead state - * @filp: the file to read - * @ppos: current file position - * @desc: read_descriptor - * @actor: read method - * * This is a generic file read routine, and uses the - * mapping->a_ops->readpage() function for the actual low-level stuff. + * mapping->a_ops->readpage() function for the actual low-level + * stuff. * * This is really ugly. But the goto's actually try to clarify some * of the logic when it comes to error handling etc. * - * Note the struct file* is only passed for the use of readpage. - * It may be NULL. + * Note the struct file* is only passed for the use of readpage. It may be + * NULL. */ void do_generic_mapping_read(struct address_space *mapping, struct file_ra_state *_ra, @@ -1048,7 +943,6 @@ readpage: } unlock_page(page); error = -EIO; - shrink_readahead_size_eio(filp, &ra); goto readpage_error; } unlock_page(page); @@ -1121,6 +1015,7 @@ out: if (filp) file_accessed(filp); } + EXPORT_SYMBOL(do_generic_mapping_read); int file_read_actor(read_descriptor_t *desc, struct page *page, @@ -1161,13 +1056,7 @@ success: return size; } -/** - * __generic_file_aio_read - generic filesystem read routine - * @iocb: kernel I/O control block - * @iov: io vector request - * @nr_segs: number of segments in the iovec - * @ppos: current file position - * +/* * This is the "read()" routine for all filesystems * that can use the page cache directly. */ @@ -1246,6 +1135,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, out: return retval; } + EXPORT_SYMBOL(__generic_file_aio_read); ssize_t @@ -1256,6 +1146,7 @@ generic_file_aio_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t BUG_ON(iocb->ki_pos != pos); return __generic_file_aio_read(iocb, &local_iov, 1, &iocb->ki_pos); } + EXPORT_SYMBOL(generic_file_aio_read); ssize_t @@ -1271,6 +1162,7 @@ generic_file_read(struct file *filp, char __user *buf, size_t count, loff_t *ppo ret = wait_on_sync_kiocb(&kiocb); return ret; } + EXPORT_SYMBOL(generic_file_read); int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size) @@ -1311,6 +1203,7 @@ ssize_t generic_file_sendfile(struct file *in_file, loff_t *ppos, return desc.written; return desc.error; } + EXPORT_SYMBOL(generic_file_sendfile); static ssize_t @@ -1346,15 +1239,11 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count) } #ifdef CONFIG_MMU -static int FASTCALL(page_cache_read(struct file * file, unsigned long offset)); -/** - * page_cache_read - adds requested page to the page cache if not already there - * @file: file to read - * @offset: page index - * +/* * This adds the requested page to the page cache if it isn't already there, * and schedules an I/O to read in its contents from disk. */ +static int FASTCALL(page_cache_read(struct file * file, unsigned long offset)); static int fastcall page_cache_read(struct file * file, unsigned long offset) { struct address_space *mapping = file->f_mapping; @@ -1381,12 +1270,7 @@ static int fastcall page_cache_read(struct file * file, unsigned long offset) #define MMAP_LOTSAMISS (100) -/** - * filemap_nopage - read in file data for page fault handling - * @area: the applicable vm_area - * @address: target address to read in - * @type: returned with VM_FAULT_{MINOR,MAJOR} if not %NULL - * +/* * filemap_nopage() is invoked via the vma operations vector for a * mapped memory region to read in file data during a page fault. * @@ -1453,7 +1337,7 @@ retry_find: */ if (!did_readaround) { majmin = VM_FAULT_MAJOR; - count_vm_event(PGMAJFAULT); + inc_page_state(pgmajfault); } did_readaround = 1; ra_pages = max_sane_readahead(file->f_ra.ra_pages); @@ -1524,7 +1408,7 @@ no_cached_page: page_not_uptodate: if (!did_readaround) { majmin = VM_FAULT_MAJOR; - count_vm_event(PGMAJFAULT); + inc_page_state(pgmajfault); } lock_page(page); @@ -1586,10 +1470,10 @@ page_not_uptodate: * Things didn't work out. Return zero to tell the * mm layer so, possibly freeing the page cache page first. */ - shrink_readahead_size_eio(file, ra); page_cache_release(page); return NULL; } + EXPORT_SYMBOL(filemap_nopage); static struct page * filemap_getpage(struct file *file, unsigned long pgoff, @@ -1843,13 +1727,7 @@ repeat: return page; } -/** - * read_cache_page - read into page cache, fill it if needed - * @mapping: the page's address_space - * @index: the page index - * @filler: function to perform the read - * @data: destination for read data - * +/* * Read into the page cache. If a page already exists, * and PageUptodate() is not set, try to fill the page. */ @@ -1887,6 +1765,7 @@ retry: out: return page; } + EXPORT_SYMBOL(read_cache_page); /* @@ -1957,7 +1836,7 @@ int remove_suid(struct dentry *dentry) EXPORT_SYMBOL(remove_suid); size_t -__filemap_copy_from_user_iovec_inatomic(char *vaddr, +__filemap_copy_from_user_iovec(char *vaddr, const struct iovec *iov, size_t base, size_t bytes) { size_t copied = 0, left = 0; @@ -1967,14 +1846,18 @@ __filemap_copy_from_user_iovec_inatomic(char *vaddr, int copy = min(bytes, iov->iov_len - base); base = 0; - left = __copy_from_user_inatomic_nocache(vaddr, buf, copy); + left = __copy_from_user_inatomic(vaddr, buf, copy); copied += copy; bytes -= copy; vaddr += copy; iov++; - if (unlikely(left)) + if (unlikely(left)) { + /* zero the rest of the target like __copy_from_user */ + if (bytes) + memset(vaddr, 0, bytes); break; + } } return copied - left; } @@ -1982,7 +1865,7 @@ __filemap_copy_from_user_iovec_inatomic(char *vaddr, /* * Performs necessary checks before doing a write * - * Can adjust writing position or amount of bytes to write. + * Can adjust writing position aor amount of bytes to write. * Returns appropriate error code that caller should return or * zero in case that write should be allowed. */ @@ -2106,7 +1989,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, { struct file *file = iocb->ki_filp; struct address_space * mapping = file->f_mapping; - const struct address_space_operations *a_ops = mapping->a_ops; + struct address_space_operations *a_ops = mapping->a_ops; struct inode *inode = mapping->host; long status = 0; struct page *page; @@ -2258,98 +2141,12 @@ zero_length_segment: } EXPORT_SYMBOL(generic_file_buffered_write); -/* - * This writes the data from the source page to the specified page offset in - * the nominated file - * - the source page does not need to have any association with the file or the - * page offset - */ -int -generic_file_buffered_write_one_kernel_page(struct address_space *mapping, - pgoff_t index, - struct page *src) -{ - const struct address_space_operations *a_ops = mapping->a_ops; - struct pagevec lru_pvec; - struct page *page, *cached_page = NULL; - long status = 0; - - pagevec_init(&lru_pvec, 0); - -#if 0 - if (mapping->tree_lock.magic != RWLOCK_MAGIC) - printk("RWLOCK magic incorrect: %x != %x\n", - mapping->tree_lock.magic, RWLOCK_MAGIC); -#endif - - page = __grab_cache_page(mapping, index, &cached_page, &lru_pvec); - if (!page) { - BUG_ON(cached_page); - return -ENOMEM; - } - - status = a_ops->prepare_write(NULL, page, 0, PAGE_CACHE_SIZE); - if (unlikely(status)) { - loff_t isize = i_size_read(mapping->host); - - if (status != AOP_TRUNCATED_PAGE) - unlock_page(page); - page_cache_release(page); - if (status == AOP_TRUNCATED_PAGE) - goto sync; - - /* prepare_write() may have instantiated a few blocks outside - * i_size. Trim these off again. - */ - if ((1ULL << (index + 1)) > isize) - vmtruncate(mapping->host, isize); - goto sync; - } - - copy_highpage(page, src); - flush_dcache_page(page); - - status = a_ops->commit_write(NULL, page, 0, PAGE_CACHE_SIZE); - if (status == AOP_TRUNCATED_PAGE) { - page_cache_release(page); - goto sync; - } - - if (status > 0) - status = 0; - - unlock_page(page); - mark_page_accessed(page); - page_cache_release(page); - if (status < 0) - return status; - - balance_dirty_pages_ratelimited(mapping); - cond_resched(); - -sync: - if (cached_page) - page_cache_release(cached_page); - - /* the caller must handle O_SYNC themselves, but we handle S_SYNC and - * MS_SYNCHRONOUS here */ - if (unlikely(IS_SYNC(mapping->host)) && !a_ops->writepage) - status = generic_osync_inode(mapping->host, mapping, - OSYNC_METADATA | OSYNC_DATA); - - /* the caller must handle O_DIRECT for themselves */ - - pagevec_lru_add(&lru_pvec); - return status; -} -EXPORT_SYMBOL(generic_file_buffered_write_one_kernel_page); - static ssize_t __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos) { struct file *file = iocb->ki_filp; - const struct address_space * mapping = file->f_mapping; + struct address_space * mapping = file->f_mapping; size_t ocount; /* original count */ size_t count; /* after file limit checks */ struct inode *inode = mapping->host; diff --git a/mm/filemap.h b/mm/filemap.h index c2bff04c8..efd01426b 100644 --- a/mm/filemap.h +++ b/mm/filemap.h @@ -12,26 +12,19 @@ #include #include #include -#include +#include +#include size_t -__filemap_copy_from_user_iovec_inatomic(char *vaddr, - const struct iovec *iov, - size_t base, - size_t bytes); +__filemap_copy_from_user_iovec(char *vaddr, + const struct iovec *iov, + size_t base, + size_t bytes); /* * Copy as much as we can into the page and return the number of bytes which * were sucessfully copied. If a fault is encountered then clear the page * out to (offset+bytes) and return the number of bytes which were copied. - * - * NOTE: For this to work reliably we really want copy_from_user_inatomic_nocache - * to *NOT* zero any tail of the buffer that it failed to copy. If it does, - * and if the following non-atomic copy succeeds, then there is a small window - * where the target page contains neither the data before the write, nor the - * data after the write (it contains zero). A read at this time will see - * data that is inconsistent with any ordering of the read and the write. - * (This has been detected in practice). */ static inline size_t filemap_copy_from_user(struct page *page, unsigned long offset, @@ -41,13 +34,13 @@ filemap_copy_from_user(struct page *page, unsigned long offset, int left; kaddr = kmap_atomic(page, KM_USER0); - left = __copy_from_user_inatomic_nocache(kaddr + offset, buf, bytes); + left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); kunmap_atomic(kaddr, KM_USER0); if (left != 0) { /* Do it the slow way */ kaddr = kmap(page); - left = __copy_from_user_nocache(kaddr + offset, buf, bytes); + left = __copy_from_user(kaddr + offset, buf, bytes); kunmap(page); } return bytes - left; @@ -67,15 +60,13 @@ filemap_copy_from_user_iovec(struct page *page, unsigned long offset, size_t copied; kaddr = kmap_atomic(page, KM_USER0); - copied = __filemap_copy_from_user_iovec_inatomic(kaddr + offset, iov, - base, bytes); + copied = __filemap_copy_from_user_iovec(kaddr + offset, iov, + base, bytes); kunmap_atomic(kaddr, KM_USER0); if (copied != bytes) { kaddr = kmap(page); - copied = __filemap_copy_from_user_iovec_inatomic(kaddr + offset, iov, - base, bytes); - if (bytes - copied) - memset(kaddr + offset + copied, 0, bytes - copied); + copied = __filemap_copy_from_user_iovec(kaddr + offset, iov, + base, bytes); kunmap(page); } return copied; diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index fb957bf11..acabd0bf4 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c @@ -191,7 +191,7 @@ __xip_unmap (struct address_space * mapping, /* Nuke the page table entry. */ flush_cache_page(vma, address, pte_pfn(*pte)); pteval = ptep_clear_flush(vma, address, pte); - page_remove_rmap(page, vma); + page_remove_rmap(page); dec_mm_counter(mm, file_rss); BUG_ON(pte_dirty(pteval)); pte_unmap_unlock(pte, ptl); @@ -275,7 +275,7 @@ __xip_file_write(struct file *filp, const char __user *buf, size_t count, loff_t pos, loff_t *ppos) { struct address_space * mapping = filp->f_mapping; - const struct address_space_operations *a_ops = mapping->a_ops; + struct address_space_operations *a_ops = mapping->a_ops; struct inode *inode = mapping->host; long status = 0; struct page *page; diff --git a/mm/fremap.c b/mm/fremap.c index 24e84dd91..c8e3f84fd 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -35,7 +35,7 @@ static int zap_pte(struct mm_struct *mm, struct vm_area_struct *vma, if (page) { if (pte_dirty(pte)) set_page_dirty(page); - page_remove_rmap(page, vma); + page_remove_rmap(page); page_cache_release(page); } } else { @@ -85,11 +85,10 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, inc_mm_counter(mm, file_rss); flush_icache_page(vma, page); - pte_val = mk_pte(page, prot); - set_pte_at(mm, addr, pte, pte_val); + set_pte_at(mm, addr, pte, mk_pte(page, prot)); page_add_file_rmap(page); + pte_val = *pte; update_mmu_cache(vma, addr, pte_val); - lazy_mmu_prot_update(pte_val); err = 0; unlock: pte_unmap_unlock(pte, ptl); @@ -121,13 +120,7 @@ int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, set_pte_at(mm, addr, pte, pgoff_to_pte(pgoff)); pte_val = *pte; - /* - * We don't need to run update_mmu_cache() here because the "file pte" - * being installed by install_file_pte() is not a real pte - it's a - * non-present entry (like a swap entry), noting what file offset should - * be mapped there when there's a fault (in a non-linear vma where - * that's not obvious). - */ + update_mmu_cache(vma, addr, pte_val); pte_unmap_unlock(pte, ptl); err = 0; out: diff --git a/mm/highmem.c b/mm/highmem.c index 821d4cd1f..a02c6dec9 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -326,8 +326,8 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool, int err) if (bvec->bv_page == org_vec->bv_page) continue; - dec_zone_page_state(bvec->bv_page, NR_BOUNCE); - mempool_free(bvec->bv_page, pool); + mempool_free(bvec->bv_page, pool); + dec_page_state(nr_bounce); } bio_endio(bio_orig, bio_orig->bi_size, err); @@ -408,7 +408,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, to->bv_page = mempool_alloc(pool, q->bounce_gfp); to->bv_len = from->bv_len; to->bv_offset = from->bv_offset; - inc_zone_page_state(to->bv_page, NR_BOUNCE); + inc_page_state(nr_bounce); if (rw == WRITE) { char *vto, *vfrom; diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b6f53b071..d532a36bc 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -24,7 +24,7 @@ #include "internal.h" const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; -static unsigned long nr_huge_pages, free_huge_pages, resv_huge_pages; +static unsigned long nr_huge_pages, free_huge_pages, reserved_huge_pages; unsigned long max_huge_pages; static struct list_head hugepage_freelists[MAX_NUMNODES]; static unsigned int nr_huge_pages_node[MAX_NUMNODES]; @@ -125,13 +125,39 @@ static int alloc_fresh_huge_page(void) static struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr) { + struct inode *inode = vma->vm_file->f_dentry->d_inode; struct page *page; + int use_reserve = 0; + unsigned long idx; spin_lock(&hugetlb_lock); - if (vma->vm_flags & VM_MAYSHARE) - resv_huge_pages--; - else if (free_huge_pages <= resv_huge_pages) - goto fail; + + if (vma->vm_flags & VM_MAYSHARE) { + + /* idx = radix tree index, i.e. offset into file in + * HPAGE_SIZE units */ + idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) + + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); + + /* The hugetlbfs specific inode info stores the number + * of "guaranteed available" (huge) pages. That is, + * the first 'prereserved_hpages' pages of the inode + * are either already instantiated, or have been + * pre-reserved (by hugetlb_reserve_for_inode()). Here + * we're in the process of instantiating the page, so + * we use this to determine whether to draw from the + * pre-reserved pool or the truly free pool. */ + if (idx < HUGETLBFS_I(inode)->prereserved_hpages) + use_reserve = 1; + } + + if (!use_reserve) { + if (free_huge_pages <= reserved_huge_pages) + goto fail; + } else { + BUG_ON(reserved_huge_pages == 0); + reserved_huge_pages--; + } page = dequeue_huge_page(vma, addr); if (!page) @@ -141,11 +167,96 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma, set_page_refcounted(page); return page; -fail: + fail: + WARN_ON(use_reserve); /* reserved allocations shouldn't fail */ spin_unlock(&hugetlb_lock); return NULL; } +/* hugetlb_extend_reservation() + * + * Ensure that at least 'atleast' hugepages are, and will remain, + * available to instantiate the first 'atleast' pages of the given + * inode. If the inode doesn't already have this many pages reserved + * or instantiated, set aside some hugepages in the reserved pool to + * satisfy later faults (or fail now if there aren't enough, rather + * than getting the SIGBUS later). + */ +int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info, + unsigned long atleast) +{ + struct inode *inode = &info->vfs_inode; + unsigned long change_in_reserve = 0; + int ret = 0; + + spin_lock(&hugetlb_lock); + read_lock_irq(&inode->i_mapping->tree_lock); + + if (info->prereserved_hpages >= atleast) + goto out; + + /* Because we always call this on shared mappings, none of the + * pages beyond info->prereserved_hpages can have been + * instantiated, so we need to reserve all of them now. */ + change_in_reserve = atleast - info->prereserved_hpages; + + if ((reserved_huge_pages + change_in_reserve) > free_huge_pages) { + ret = -ENOMEM; + goto out; + } + + reserved_huge_pages += change_in_reserve; + info->prereserved_hpages = atleast; + + out: + read_unlock_irq(&inode->i_mapping->tree_lock); + spin_unlock(&hugetlb_lock); + + return ret; +} + +/* hugetlb_truncate_reservation() + * + * This returns pages reserved for the given inode to the general free + * hugepage pool. If the inode has any pages prereserved, but not + * instantiated, beyond offset (atmost << HPAGE_SIZE), then release + * them. + */ +void hugetlb_truncate_reservation(struct hugetlbfs_inode_info *info, + unsigned long atmost) +{ + struct inode *inode = &info->vfs_inode; + struct address_space *mapping = inode->i_mapping; + unsigned long idx; + unsigned long change_in_reserve = 0; + struct page *page; + + spin_lock(&hugetlb_lock); + read_lock_irq(&inode->i_mapping->tree_lock); + + if (info->prereserved_hpages <= atmost) + goto out; + + /* Count pages which were reserved, but not instantiated, and + * which we can now release. */ + for (idx = atmost; idx < info->prereserved_hpages; idx++) { + page = radix_tree_lookup(&mapping->page_tree, idx); + if (!page) + /* Pages which are already instantiated can't + * be unreserved (and in fact have already + * been removed from the reserved pool) */ + change_in_reserve++; + } + + BUG_ON(reserved_huge_pages < change_in_reserve); + reserved_huge_pages -= change_in_reserve; + info->prereserved_hpages = atmost; + + out: + read_unlock_irq(&inode->i_mapping->tree_lock); + spin_unlock(&hugetlb_lock); +} + static int __init hugetlb_init(void) { unsigned long i; @@ -225,7 +336,7 @@ static unsigned long set_max_huge_pages(unsigned long count) return nr_huge_pages; spin_lock(&hugetlb_lock); - count = max(count, resv_huge_pages); + count = max(count, reserved_huge_pages); try_to_free_low(count); while (count < nr_huge_pages) { struct page *page = dequeue_huge_page(NULL, 0); @@ -252,11 +363,11 @@ int hugetlb_report_meminfo(char *buf) return sprintf(buf, "HugePages_Total: %5lu\n" "HugePages_Free: %5lu\n" - "HugePages_Rsvd: %5lu\n" + "HugePages_Rsvd: %5lu\n" "Hugepagesize: %5lu kB\n", nr_huge_pages, free_huge_pages, - resv_huge_pages, + reserved_huge_pages, HPAGE_SIZE/1024); } @@ -645,156 +756,3 @@ void hugetlb_change_protection(struct vm_area_struct *vma, flush_tlb_range(vma, start, end); } -struct file_region { - struct list_head link; - long from; - long to; -}; - -static long region_add(struct list_head *head, long f, long t) -{ - struct file_region *rg, *nrg, *trg; - - /* Locate the region we are either in or before. */ - list_for_each_entry(rg, head, link) - if (f <= rg->to) - break; - - /* Round our left edge to the current segment if it encloses us. */ - if (f > rg->from) - f = rg->from; - - /* Check for and consume any regions we now overlap with. */ - nrg = rg; - list_for_each_entry_safe(rg, trg, rg->link.prev, link) { - if (&rg->link == head) - break; - if (rg->from > t) - break; - - /* If this area reaches higher then extend our area to - * include it completely. If this is not the first area - * which we intend to reuse, free it. */ - if (rg->to > t) - t = rg->to; - if (rg != nrg) { - list_del(&rg->link); - kfree(rg); - } - } - nrg->from = f; - nrg->to = t; - return 0; -} - -static long region_chg(struct list_head *head, long f, long t) -{ - struct file_region *rg, *nrg; - long chg = 0; - - /* Locate the region we are before or in. */ - list_for_each_entry(rg, head, link) - if (f <= rg->to) - break; - - /* If we are below the current region then a new region is required. - * Subtle, allocate a new region at the position but make it zero - * size such that we can guarentee to record the reservation. */ - if (&rg->link == head || t < rg->from) { - nrg = kmalloc(sizeof(*nrg), GFP_KERNEL); - if (nrg == 0) - return -ENOMEM; - nrg->from = f; - nrg->to = f; - INIT_LIST_HEAD(&nrg->link); - list_add(&nrg->link, rg->link.prev); - - return t - f; - } - - /* Round our left edge to the current segment if it encloses us. */ - if (f > rg->from) - f = rg->from; - chg = t - f; - - /* Check for and consume any regions we now overlap with. */ - list_for_each_entry(rg, rg->link.prev, link) { - if (&rg->link == head) - break; - if (rg->from > t) - return chg; - - /* We overlap with this area, if it extends futher than - * us then we must extend ourselves. Account for its - * existing reservation. */ - if (rg->to > t) { - chg += rg->to - t; - t = rg->to; - } - chg -= rg->to - rg->from; - } - return chg; -} - -static long region_truncate(struct list_head *head, long end) -{ - struct file_region *rg, *trg; - long chg = 0; - - /* Locate the region we are either in or before. */ - list_for_each_entry(rg, head, link) - if (end <= rg->to) - break; - if (&rg->link == head) - return 0; - - /* If we are in the middle of a region then adjust it. */ - if (end > rg->from) { - chg = rg->to - end; - rg->to = end; - rg = list_entry(rg->link.next, typeof(*rg), link); - } - - /* Drop any remaining regions. */ - list_for_each_entry_safe(rg, trg, rg->link.prev, link) { - if (&rg->link == head) - break; - chg += rg->to - rg->from; - list_del(&rg->link); - kfree(rg); - } - return chg; -} - -static int hugetlb_acct_memory(long delta) -{ - int ret = -ENOMEM; - - spin_lock(&hugetlb_lock); - if ((delta + resv_huge_pages) <= free_huge_pages) { - resv_huge_pages += delta; - ret = 0; - } - spin_unlock(&hugetlb_lock); - return ret; -} - -int hugetlb_reserve_pages(struct inode *inode, long from, long to) -{ - long ret, chg; - - chg = region_chg(&inode->i_mapping->private_list, from, to); - if (chg < 0) - return chg; - ret = hugetlb_acct_memory(chg); - if (ret < 0) - return ret; - region_add(&inode->i_mapping->private_list, from, to); - return 0; -} - -void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed) -{ - long chg = region_truncate(&inode->i_mapping->private_list, offset); - hugetlb_acct_memory(freed - chg); -} diff --git a/mm/memory.c b/mm/memory.c index 90acc5579..9f75bb2ca 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -47,11 +47,7 @@ #include #include #include -#include #include -#include -#include -#include #include #include @@ -130,7 +126,7 @@ static void free_pte_range(struct mmu_gather *tlb, pmd_t *pmd) pmd_clear(pmd); pte_lock_deinit(page); pte_free_tlb(tlb, page); - dec_zone_page_state(page, NR_PAGETABLE); + dec_page_state(nr_page_table_pages); tlb->mm->nr_ptes--; } @@ -315,7 +311,7 @@ int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) pte_free(new); } else { mm->nr_ptes++; - inc_zone_page_state(new, NR_PAGETABLE); + inc_page_state(nr_page_table_pages); pmd_populate(mm, pmd, new); } spin_unlock(&mm->page_table_lock); @@ -439,9 +435,7 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, /* pte contains position in swap or file, so copy. */ if (unlikely(!pte_present(pte))) { if (!pte_file(pte)) { - swp_entry_t entry = pte_to_swp_entry(pte); - - swap_duplicate(entry); + swap_duplicate(pte_to_swp_entry(pte)); /* make sure dst_mm is on swapoff's mmlist. */ if (unlikely(list_empty(&dst_mm->mmlist))) { spin_lock(&mmlist_lock); @@ -450,16 +444,6 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, &src_mm->mmlist); spin_unlock(&mmlist_lock); } - if (is_write_migration_entry(entry) && - is_cow_mapping(vm_flags)) { - /* - * COW mappings require pages in both parent - * and child to be set to read. - */ - make_migration_entry_read(&entry); - pte = swp_entry_to_pte(entry); - set_pte_at(src_mm, addr, src_pte, pte); - } } goto out_set_pte; } @@ -508,7 +492,7 @@ again: return -ENOMEM; src_pte = pte_offset_map_nested(src_pmd, addr); src_ptl = pte_lockptr(src_mm, src_pmd); - spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); + spin_lock(src_ptl); do { /* @@ -681,7 +665,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, mark_page_accessed(page); file_rss--; } - page_remove_rmap(page, vma); + page_remove_rmap(page); tlb_remove_page(tlb, page); continue; } @@ -895,7 +879,6 @@ unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, tlb_finish_mmu(tlb, address, end); return end; } -EXPORT_SYMBOL(zap_page_range); /* * Do a quick page-table lookup for a single page. @@ -1579,71 +1562,25 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, { struct page *old_page, *new_page; pte_t entry; - int reuse = 0, ret = VM_FAULT_MINOR; - struct page *dirty_page = NULL; + int ret = VM_FAULT_MINOR; old_page = vm_normal_page(vma, address, orig_pte); if (!old_page) goto gotten; - /* - * Take out anonymous pages first, anonymous shared vmas are - * not dirty accountable. - */ - if (PageAnon(old_page)) { - if (!TestSetPageLocked(old_page)) { - reuse = can_share_swap_page(old_page); - unlock_page(old_page); - } - } else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) == - (VM_WRITE|VM_SHARED))) { - /* - * Only catch write-faults on shared writable pages, - * read-only shared pages can get COWed by - * get_user_pages(.write=1, .force=1). - */ - if (vma->vm_ops && vma->vm_ops->page_mkwrite) { - /* - * Notify the address space that the page is about to - * become writable so that it can prohibit this or wait - * for the page to get into an appropriate state. - * - * We do this without the lock held, so that it can - * sleep if it needs to. - */ - page_cache_get(old_page); - pte_unmap_unlock(page_table, ptl); - - if (vma->vm_ops->page_mkwrite(vma, old_page) < 0) - goto unwritable_page; - - page_cache_release(old_page); - - /* - * Since we dropped the lock we need to revalidate - * the PTE as someone else may have changed it. If - * they did, we just return, as we can count on the - * MMU to tell us if they didn't also make it writable. - */ - page_table = pte_offset_map_lock(mm, pmd, address, - &ptl); - if (!pte_same(*page_table, orig_pte)) - goto unlock; + if (PageAnon(old_page) && !TestSetPageLocked(old_page)) { + int reuse = can_share_swap_page(old_page); + unlock_page(old_page); + if (reuse) { + flush_cache_page(vma, address, pte_pfn(orig_pte)); + entry = pte_mkyoung(orig_pte); + entry = maybe_mkwrite(pte_mkdirty(entry), vma); + ptep_set_access_flags(vma, address, page_table, entry, 1); + update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); + ret |= VM_FAULT_WRITE; + goto unlock; } - dirty_page = old_page; - get_page(dirty_page); - reuse = 1; - } - - if (reuse) { - flush_cache_page(vma, address, pte_pfn(orig_pte)); - entry = pte_mkyoung(orig_pte); - entry = maybe_mkwrite(pte_mkdirty(entry), vma); - ptep_set_access_flags(vma, address, page_table, entry, 1); - update_mmu_cache(vma, address, entry); - lazy_mmu_prot_update(entry); - ret |= VM_FAULT_WRITE; - goto unlock; } /* @@ -1672,7 +1609,7 @@ gotten: page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (likely(pte_same(*page_table, orig_pte))) { if (old_page) { - page_remove_rmap(old_page, vma); + page_remove_rmap(old_page); if (!PageAnon(old_page)) { dec_mm_counter(mm, file_rss); inc_mm_counter(mm, anon_rss); @@ -1682,16 +1619,9 @@ gotten: flush_cache_page(vma, address, pte_pfn(orig_pte)); entry = mk_pte(new_page, vma->vm_page_prot); entry = maybe_mkwrite(pte_mkdirty(entry), vma); - lazy_mmu_prot_update(entry); - /* - * Clear the pte entry and flush it first, before updating the - * pte with the new entry. This will avoid a race condition - * seen in the presence of one thread doing SMC and another - * thread doing COW. - */ - ptep_clear_flush(vma, address, page_table); - set_pte_at(mm, address, page_table, entry); + ptep_establish(vma, address, page_table, entry); update_mmu_cache(vma, address, entry); + lazy_mmu_prot_update(entry); lru_cache_add_active(new_page); page_add_new_anon_rmap(new_page, vma, address); @@ -1705,19 +1635,11 @@ gotten: page_cache_release(old_page); unlock: pte_unmap_unlock(page_table, ptl); - if (dirty_page) { - set_page_dirty_balance(dirty_page); - put_page(dirty_page); - } return ret; oom: if (old_page) page_cache_release(old_page); return VM_FAULT_OOM; - -unwritable_page: - page_cache_release(old_page); - return VM_FAULT_SIGBUS; } /* @@ -1997,7 +1919,7 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end) return 0; } -EXPORT_UNUSED_SYMBOL(vmtruncate_range); /* June 2006 */ +EXPORT_SYMBOL(vmtruncate_range); /* * Primitive swap readahead code. We simply read an aligned block of @@ -2074,11 +1996,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, goto out; entry = pte_to_swp_entry(orig_pte); - if (is_migration_entry(entry)) { - migration_entry_wait(mm, pmd, address); - goto out; - } - delayacct_set_flag(DELAYACCT_PF_SWAPIN); +again: page = lookup_swap_cache(entry); if (!page) { swapin_readahead(entry, address, vma); @@ -2091,13 +2009,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (likely(pte_same(*page_table, orig_pte))) ret = VM_FAULT_OOM; - delayacct_clear_flag(DELAYACCT_PF_SWAPIN); goto unlock; } /* Had to read the page from swap area: Major fault */ ret = VM_FAULT_MAJOR; - count_vm_event(PGMAJFAULT); + inc_page_state(pgmajfault); grab_swap_token(); } @@ -2105,10 +2022,14 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, ret = VM_FAULT_OOM; goto out; } - - delayacct_clear_flag(DELAYACCT_PF_SWAPIN); mark_page_accessed(page); lock_page(page); + if (!PageSwapCache(page)) { + /* Page migration has occured */ + unlock_page(page); + page_cache_release(page); + goto again; + } /* * Back out if somebody else already faulted in this pte. @@ -2248,7 +2169,6 @@ static int do_no_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned int sequence = 0; int ret = VM_FAULT_MINOR; int anon = 0; - struct page *dirty_page = NULL; pte_unmap(page_table); BUG_ON(vma->vm_flags & VM_PFNMAP); @@ -2280,31 +2200,18 @@ retry: /* * Should we do an early C-O-W break? */ - if (write_access) { - if (!(vma->vm_flags & VM_SHARED)) { - struct page *page; + if (write_access && !(vma->vm_flags & VM_SHARED)) { + struct page *page; - if (unlikely(anon_vma_prepare(vma))) - goto oom; - page = alloc_page_vma(GFP_HIGHUSER, vma, address); - if (!page) - goto oom; - copy_user_highpage(page, new_page, address); - page_cache_release(new_page); - new_page = page; - anon = 1; - - } else { - /* if the page will be shareable, see if the backing - * address space wants to know that the page is about - * to become writable */ - if (vma->vm_ops->page_mkwrite && - vma->vm_ops->page_mkwrite(vma, new_page) < 0 - ) { - page_cache_release(new_page); - return VM_FAULT_SIGBUS; - } - } + if (unlikely(anon_vma_prepare(vma))) + goto oom; + page = alloc_page_vma(GFP_HIGHUSER, vma, address); + if (!page) + goto oom; + copy_user_highpage(page, new_page, address); + page_cache_release(new_page); + new_page = page; + anon = 1; } page_table = pte_offset_map_lock(mm, pmd, address, &ptl); @@ -2346,10 +2253,6 @@ retry: } else { inc_mm_counter(mm, file_rss); page_add_file_rmap(new_page); - if (write_access) { - dirty_page = new_page; - get_page(dirty_page); - } } } else { /* One of our sibling threads was faster, back out. */ @@ -2362,10 +2265,6 @@ retry: lazy_mmu_prot_update(entry); unlock: pte_unmap_unlock(page_table, ptl); - if (dirty_page) { - set_page_dirty_balance(dirty_page); - put_page(dirty_page); - } return ret; oom: page_cache_release(new_page); @@ -2490,7 +2389,7 @@ int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, __set_current_state(TASK_RUNNING); - count_vm_event(PGFAULT); + inc_page_state(pgfault); if (unlikely(is_vm_hugetlb_page(vma))) return hugetlb_fault(mm, vma, address, write_access); diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index c37319542..70df5c0d9 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -4,6 +4,7 @@ * Copyright (C) */ +#include #include #include #include @@ -20,13 +21,12 @@ #include #include #include -#include #include extern void zonetable_add(struct zone *zone, int nid, int zid, unsigned long pfn, unsigned long size); -static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) +static void __add_zone(struct zone *zone, unsigned long phys_start_pfn) { struct pglist_data *pgdat = zone->zone_pgdat; int nr_pages = PAGES_PER_SECTION; @@ -34,15 +34,8 @@ static int __add_zone(struct zone *zone, unsigned long phys_start_pfn) int zone_type; zone_type = zone - pgdat->node_zones; - if (!populated_zone(zone)) { - int ret = 0; - ret = init_currently_empty_zone(zone, phys_start_pfn, nr_pages); - if (ret < 0) - return ret; - } memmap_init_zone(nr_pages, nid, zone_type, phys_start_pfn); zonetable_add(zone, nid, zone_type, phys_start_pfn, nr_pages); - return 0; } extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, @@ -52,19 +45,12 @@ static int __add_section(struct zone *zone, unsigned long phys_start_pfn) int nr_pages = PAGES_PER_SECTION; int ret; - if (pfn_valid(phys_start_pfn)) - return -EEXIST; - ret = sparse_add_one_section(zone, phys_start_pfn, nr_pages); if (ret < 0) return ret; - ret = __add_zone(zone, phys_start_pfn); - - if (ret < 0) - return ret; - + __add_zone(zone, phys_start_pfn); return register_new_memory(__pfn_to_section(phys_start_pfn)); } @@ -79,22 +65,15 @@ int __add_pages(struct zone *zone, unsigned long phys_start_pfn, { unsigned long i; int err = 0; - int start_sec, end_sec; - /* during initialize mem_map, align hot-added range to section */ - start_sec = pfn_to_section_nr(phys_start_pfn); - end_sec = pfn_to_section_nr(phys_start_pfn + nr_pages - 1); - for (i = start_sec; i <= end_sec; i++) { - err = __add_section(zone, i << PFN_SECTION_SHIFT); + for (i = 0; i < nr_pages; i += PAGES_PER_SECTION) { + err = __add_section(zone, phys_start_pfn + i); - /* - * EEXIST is finally dealed with by ioresource collision - * check. see add_memory() => register_memory_resource() - * Warning will be printed if there is collision. + /* We want to keep adding the rest of the + * sections if the first ones already exist */ if (err && (err != -EEXIST)) break; - err = 0; } return err; @@ -136,11 +115,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) unsigned long i; unsigned long flags; unsigned long onlined_pages = 0; - struct resource res; - u64 section_end; - unsigned long start_pfn; struct zone *zone; - int need_zonelists_rebuild = 0; /* * This doesn't need a lock to do pfn_to_page(). @@ -153,154 +128,15 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) grow_pgdat_span(zone->zone_pgdat, pfn, pfn + nr_pages); pgdat_resize_unlock(zone->zone_pgdat, &flags); - /* - * If this zone is not populated, then it is not in zonelist. - * This means the page allocator ignores this zone. - * So, zonelist must be updated after online. - */ - if (!populated_zone(zone)) - need_zonelists_rebuild = 1; - - res.start = (u64)pfn << PAGE_SHIFT; - res.end = res.start + ((u64)nr_pages << PAGE_SHIFT) - 1; - res.flags = IORESOURCE_MEM; /* we just need system ram */ - section_end = res.end; - - while ((res.start < res.end) && (find_next_system_ram(&res) >= 0)) { - start_pfn = (unsigned long)(res.start >> PAGE_SHIFT); - nr_pages = (unsigned long) - ((res.end + 1 - res.start) >> PAGE_SHIFT); - - if (PageReserved(pfn_to_page(start_pfn))) { - /* this region's page is not onlined now */ - for (i = 0; i < nr_pages; i++) { - struct page *page = pfn_to_page(start_pfn + i); - online_page(page); - onlined_pages++; - } - } - - res.start = res.end + 1; - res.end = section_end; + for (i = 0; i < nr_pages; i++) { + struct page *page = pfn_to_page(pfn + i); + online_page(page); + onlined_pages++; } zone->present_pages += onlined_pages; zone->zone_pgdat->node_present_pages += onlined_pages; setup_per_zone_pages_min(); - if (need_zonelists_rebuild) - build_all_zonelists(); - vm_total_pages = nr_free_pagecache_pages(); return 0; } - -static pg_data_t *hotadd_new_pgdat(int nid, u64 start) -{ - struct pglist_data *pgdat; - unsigned long zones_size[MAX_NR_ZONES] = {0}; - unsigned long zholes_size[MAX_NR_ZONES] = {0}; - unsigned long start_pfn = start >> PAGE_SHIFT; - - pgdat = arch_alloc_nodedata(nid); - if (!pgdat) - return NULL; - - arch_refresh_nodedata(nid, pgdat); - - /* we can use NODE_DATA(nid) from here */ - - /* init node's zones as empty zones, we don't have any present pages.*/ - free_area_init_node(nid, pgdat, zones_size, start_pfn, zholes_size); - - return pgdat; -} - -static void rollback_node_hotadd(int nid, pg_data_t *pgdat) -{ - arch_refresh_nodedata(nid, NULL); - arch_free_nodedata(pgdat); - return; -} - -/* add this memory to iomem resource */ -static struct resource *register_memory_resource(u64 start, u64 size) -{ - struct resource *res; - res = kzalloc(sizeof(struct resource), GFP_KERNEL); - BUG_ON(!res); - - res->name = "System RAM"; - res->start = start; - res->end = start + size - 1; - res->flags = IORESOURCE_MEM; - if (request_resource(&iomem_resource, res) < 0) { - printk("System RAM resource %llx - %llx cannot be added\n", - (unsigned long long)res->start, (unsigned long long)res->end); - kfree(res); - res = NULL; - } - return res; -} - -static void release_memory_resource(struct resource *res) -{ - if (!res) - return; - release_resource(res); - kfree(res); - return; -} - - - -int add_memory(int nid, u64 start, u64 size) -{ - pg_data_t *pgdat = NULL; - int new_pgdat = 0; - struct resource *res; - int ret; - - res = register_memory_resource(start, size); - if (!res) - return -EEXIST; - - if (!node_online(nid)) { - pgdat = hotadd_new_pgdat(nid, start); - if (!pgdat) - return -ENOMEM; - new_pgdat = 1; - ret = kswapd_run(nid); - if (ret) - goto error; - } - - /* call arch's memory hotadd */ - ret = arch_add_memory(nid, start, size); - - if (ret < 0) - goto error; - - /* we online node here. we can't roll back from here. */ - node_set_online(nid); - - if (new_pgdat) { - ret = register_one_node(nid); - /* - * If sysfs file of new node can't create, cpu on the node - * can't be hot-added. There is no rollback way now. - * So, check by BUG_ON() to catch it reluctantly.. - */ - BUG_ON(ret); - } - - return ret; -error: - /* rollback pgdat allocation and others */ - if (new_pgdat) - rollback_node_hotadd(nid, pgdat); - if (res) - release_memory_resource(res); - - return ret; -} -EXPORT_SYMBOL_GPL(add_memory); diff --git a/mm/mempolicy.c b/mm/mempolicy.c index a9963cedd..e37584ce7 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -87,8 +87,7 @@ #include #include #include -#include -#include +#include #include #include @@ -589,11 +588,6 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist, isolate_lru_page(page, pagelist); } -static struct page *new_node_page(struct page *page, unsigned long node, int **x) -{ - return alloc_pages_node(node, GFP_HIGHUSER, 0); -} - /* * Migrate pages from one node to a target node. * Returns error or the number of pages not migrated. @@ -610,9 +604,11 @@ int migrate_to_node(struct mm_struct *mm, int source, int dest, int flags) check_range(mm, mm->mmap->vm_start, TASK_SIZE, &nmask, flags | MPOL_MF_DISCONTIG_OK, &pagelist); - if (!list_empty(&pagelist)) - err = migrate_pages(&pagelist, new_node_page, dest); - + if (!list_empty(&pagelist)) { + err = migrate_pages_to(&pagelist, NULL, dest); + if (!list_empty(&pagelist)) + putback_lru_pages(&pagelist); + } return err; } @@ -632,10 +628,6 @@ int do_migrate_pages(struct mm_struct *mm, down_read(&mm->mmap_sem); - err = migrate_vmas(mm, from_nodes, to_nodes, flags); - if (err) - goto out; - /* * Find a 'source' bit set in 'tmp' whose corresponding 'dest' * bit in 'to' is not also set in 'tmp'. Clear the found 'source' @@ -695,7 +687,7 @@ int do_migrate_pages(struct mm_struct *mm, if (err < 0) break; } -out: + up_read(&mm->mmap_sem); if (err < 0) return err; @@ -703,12 +695,6 @@ out: } -static struct page *new_vma_page(struct page *page, unsigned long private, int **x) -{ - struct vm_area_struct *vma = (struct vm_area_struct *)private; - - return alloc_page_vma(GFP_HIGHUSER, vma, page_address_in_vma(page, vma)); -} #else static void migrate_page_add(struct page *page, struct list_head *pagelist, @@ -721,11 +707,6 @@ int do_migrate_pages(struct mm_struct *mm, { return -ENOSYS; } - -static struct page *new_vma_page(struct page *page, unsigned long private) -{ - return NULL; -} #endif long do_mbind(unsigned long start, unsigned long len, @@ -787,13 +768,15 @@ long do_mbind(unsigned long start, unsigned long len, err = mbind_range(vma, start, end, new); if (!list_empty(&pagelist)) - nr_failed = migrate_pages(&pagelist, new_vma_page, - (unsigned long)vma); + nr_failed = migrate_pages_to(&pagelist, vma, -1); if (!err && nr_failed && (flags & MPOL_MF_STRICT)) err = -EIO; } + if (!list_empty(&pagelist)) + putback_lru_pages(&pagelist); + up_write(&mm->mmap_sem); mpol_free(new); return err; @@ -947,10 +930,6 @@ asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, goto out; } - err = security_task_movememory(task); - if (err) - goto out; - err = do_migrate_pages(mm, &old, &new, capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); out: @@ -1176,15 +1155,7 @@ static inline unsigned interleave_nid(struct mempolicy *pol, if (vma) { unsigned long off; - /* - * for small pages, there is no difference between - * shift and PAGE_SHIFT, so the bit-shift is safe. - * for huge pages, since vm_pgoff is in units of small - * pages, we need to shift off the always 0 bits to get - * a useful offset. - */ - BUG_ON(shift < PAGE_SHIFT); - off = vma->vm_pgoff >> (shift - PAGE_SHIFT); + off = vma->vm_pgoff; off += (addr - vma->vm_start) >> shift; return offset_il_node(pol, vma, off); } else @@ -1217,8 +1188,10 @@ static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, zl = NODE_DATA(nid)->node_zonelists + gfp_zone(gfp); page = __alloc_pages(gfp, order, zl); - if (page && page_zone(page) == zl->zones[0]) - inc_zone_page_state(page, NUMA_INTERLEAVE_HIT); + if (page && page_zone(page) == zl->zones[0]) { + zone_pcp(zl->zones[0],get_cpu())->interleave_hit++; + put_cpu(); + } return page; } @@ -1827,7 +1800,7 @@ static inline void check_huge_range(struct vm_area_struct *vma, int show_numa_map(struct seq_file *m, void *v) { - struct proc_maps_private *priv = m->private; + struct task_struct *task = m->private; struct vm_area_struct *vma = v; struct numa_maps *md; struct file *file = vma->vm_file; @@ -1843,7 +1816,7 @@ int show_numa_map(struct seq_file *m, void *v) return 0; mpol_to_str(buffer, sizeof(buffer), - get_vma_policy(priv->task, vma, vma->vm_start)); + get_vma_policy(task, vma, vma->vm_start)); seq_printf(m, "%08lx %s", vma->vm_start, buffer); @@ -1897,7 +1870,7 @@ out: kfree(md); if (m->count < m->size) - m->version = (vma != priv->tail_vma) ? vma->vm_start : 0; + m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0; return 0; } diff --git a/mm/mempool.c b/mm/mempool.c index ccd8cb8cd..fe6e05289 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -238,13 +238,8 @@ repeat_alloc: init_wait(&wait); prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); smp_mb(); - if (!pool->curr_nr) { - /* - * FIXME: this should be io_schedule(). The timeout is there - * as a workaround for some DM problems in 2.6.18. - */ - io_schedule_timeout(5*HZ); - } + if (!pool->curr_nr) + io_schedule(); finish_wait(&pool->wait, &wait); goto repeat_alloc; diff --git a/mm/migrate.c b/mm/migrate.c index e85c60a9c..1c2504069 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -24,13 +23,13 @@ #include #include #include -#include -#include -#include -#include +#include #include "internal.h" +/* The maximum number of pages to take off the LRU for migration */ +#define MIGRATE_CHUNK_SIZE 256 + #define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru)) /* @@ -65,11 +64,16 @@ int isolate_lru_page(struct page *page, struct list_head *pagelist) } /* - * migrate_prep() needs to be called before we start compiling a list of pages - * to be migrated using isolate_lru_page(). + * migrate_prep() needs to be called after we have compiled the list of pages + * to be migrated using isolate_lru_page() but before we begin a series of calls + * to migrate_pages(). */ int migrate_prep(void) { + /* Must have swap device for migration */ + if (nr_swap_pages <= 0) + return -ENODEV; + /* * Clear the LRU lists so pages can be isolated. * Note that pages may be moved off the LRU after we have @@ -83,6 +87,7 @@ int migrate_prep(void) static inline void move_to_lru(struct page *page) { + list_del(&page->lru); if (PageActive(page)) { /* * lru_cache_add_active checks that @@ -108,200 +113,113 @@ int putback_lru_pages(struct list_head *l) int count = 0; list_for_each_entry_safe(page, page2, l, lru) { - list_del(&page->lru); move_to_lru(page); count++; } return count; } -static inline int is_swap_pte(pte_t pte) -{ - return !pte_none(pte) && !pte_present(pte) && !pte_file(pte); -} - /* - * Restore a potential migration pte to a working pte entry + * Non migratable page */ -static void remove_migration_pte(struct vm_area_struct *vma, - struct page *old, struct page *new) +int fail_migrate_page(struct page *newpage, struct page *page) { - struct mm_struct *mm = vma->vm_mm; - swp_entry_t entry; - pgd_t *pgd; - pud_t *pud; - pmd_t *pmd; - pte_t *ptep, pte; - spinlock_t *ptl; - unsigned long addr = page_address_in_vma(new, vma); - - if (addr == -EFAULT) - return; - - pgd = pgd_offset(mm, addr); - if (!pgd_present(*pgd)) - return; - - pud = pud_offset(pgd, addr); - if (!pud_present(*pud)) - return; - - pmd = pmd_offset(pud, addr); - if (!pmd_present(*pmd)) - return; - - ptep = pte_offset_map(pmd, addr); - - if (!is_swap_pte(*ptep)) { - pte_unmap(ptep); - return; - } - - ptl = pte_lockptr(mm, pmd); - spin_lock(ptl); - pte = *ptep; - if (!is_swap_pte(pte)) - goto out; - - entry = pte_to_swp_entry(pte); - - if (!is_migration_entry(entry) || migration_entry_to_page(entry) != old) - goto out; - - get_page(new); - pte = pte_mkold(mk_pte(new, vma->vm_page_prot)); - if (is_write_migration_entry(entry)) - pte = pte_mkwrite(pte); - set_pte_at(mm, addr, ptep, pte); - - if (PageAnon(new)) - page_add_anon_rmap(new, vma, addr); - else - page_add_file_rmap(new); - - /* No need to invalidate - it was non-present before */ - update_mmu_cache(vma, addr, pte); - lazy_mmu_prot_update(pte); - -out: - pte_unmap_unlock(ptep, ptl); + return -EIO; } +EXPORT_SYMBOL(fail_migrate_page); /* - * Note that remove_file_migration_ptes will only work on regular mappings, - * Nonlinear mappings do not use migration entries. + * swapout a single page + * page is locked upon entry, unlocked on exit */ -static void remove_file_migration_ptes(struct page *old, struct page *new) +static int swap_page(struct page *page) { - struct vm_area_struct *vma; - struct address_space *mapping = page_mapping(new); - struct prio_tree_iter iter; - pgoff_t pgoff = new->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); - - if (!mapping) - return; + struct address_space *mapping = page_mapping(page); - spin_lock(&mapping->i_mmap_lock); + if (page_mapped(page) && mapping) + if (try_to_unmap(page, 1) != SWAP_SUCCESS) + goto unlock_retry; - vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) - remove_migration_pte(vma, old, new); - - spin_unlock(&mapping->i_mmap_lock); -} - -/* - * Must hold mmap_sem lock on at least one of the vmas containing - * the page so that the anon_vma cannot vanish. - */ -static void remove_anon_migration_ptes(struct page *old, struct page *new) -{ - struct anon_vma *anon_vma; - struct vm_area_struct *vma; - unsigned long mapping; + if (PageDirty(page)) { + /* Page is dirty, try to write it out here */ + switch(pageout(page, mapping)) { + case PAGE_KEEP: + case PAGE_ACTIVATE: + goto unlock_retry; - mapping = (unsigned long)new->mapping; + case PAGE_SUCCESS: + goto retry; - if (!mapping || (mapping & PAGE_MAPPING_ANON) == 0) - return; + case PAGE_CLEAN: + ; /* try to free the page below */ + } + } - /* - * We hold the mmap_sem lock. So no need to call page_lock_anon_vma. - */ - anon_vma = (struct anon_vma *) (mapping - PAGE_MAPPING_ANON); - spin_lock(&anon_vma->lock); + if (PagePrivate(page)) { + if (!try_to_release_page(page, GFP_KERNEL) || + (!mapping && page_count(page) == 1)) + goto unlock_retry; + } - list_for_each_entry(vma, &anon_vma->head, anon_vma_node) - remove_migration_pte(vma, old, new); + if (remove_mapping(mapping, page)) { + /* Success */ + unlock_page(page); + return 0; + } - spin_unlock(&anon_vma->lock); -} +unlock_retry: + unlock_page(page); -/* - * Get rid of all migration entries and replace them by - * references to the indicated page. - */ -static void remove_migration_ptes(struct page *old, struct page *new) -{ - if (PageAnon(new)) - remove_anon_migration_ptes(old, new); - else - remove_file_migration_ptes(old, new); +retry: + return -EAGAIN; } /* - * Something used the pte of a page under migration. We need to - * get to the page and wait until migration is finished. - * When we return from this function the fault will be retried. - * - * This function is called from do_swap_page(). + * Remove references for a page and establish the new page with the correct + * basic settings to be able to stop accesses to the page. */ -void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, - unsigned long address) +int migrate_page_remove_references(struct page *newpage, + struct page *page, int nr_refs) { - pte_t *ptep, pte; - spinlock_t *ptl; - swp_entry_t entry; - struct page *page; - - ptep = pte_offset_map_lock(mm, pmd, address, &ptl); - pte = *ptep; - if (!is_swap_pte(pte)) - goto out; - - entry = pte_to_swp_entry(pte); - if (!is_migration_entry(entry)) - goto out; - - page = migration_entry_to_page(entry); + struct address_space *mapping = page_mapping(page); + struct page **radix_pointer; - get_page(page); - pte_unmap_unlock(ptep, ptl); - wait_on_page_locked(page); - put_page(page); - return; -out: - pte_unmap_unlock(ptep, ptl); -} + /* + * Avoid doing any of the following work if the page count + * indicates that the page is in use or truncate has removed + * the page. + */ + if (!mapping || page_mapcount(page) + nr_refs != page_count(page)) + return -EAGAIN; -/* - * Replace the page in the mapping. - * - * The number of remaining references must be: - * 1 for anonymous pages without a mapping - * 2 for pages with a mapping - * 3 for pages with a mapping and PagePrivate set. - */ -static int migrate_page_move_mapping(struct address_space *mapping, - struct page *newpage, struct page *page) -{ - struct page **radix_pointer; + /* + * Establish swap ptes for anonymous pages or destroy pte + * maps for files. + * + * In order to reestablish file backed mappings the fault handlers + * will take the radix tree_lock which may then be used to stop + * processses from accessing this page until the new page is ready. + * + * A process accessing via a swap pte (an anonymous page) will take a + * page_lock on the old page which will block the process until the + * migration attempt is complete. At that time the PageSwapCache bit + * will be examined. If the page was migrated then the PageSwapCache + * bit will be clear and the operation to retrieve the page will be + * retried which will find the new page in the radix tree. Then a new + * direct mapping may be generated based on the radix tree contents. + * + * If the page was not migrated then the PageSwapCache bit + * is still set and the operation may continue. + */ + if (try_to_unmap(page, 1) == SWAP_FAIL) + /* A vma has VM_LOCKED set -> permanent failure */ + return -EPERM; - if (!mapping) { - /* Anonymous page */ - if (page_count(page) != 1) - return -EAGAIN; - return 0; - } + /* + * Give up if we were unable to remove all mappings. + */ + if (page_mapcount(page)) + return -EAGAIN; write_lock_irq(&mapping->tree_lock); @@ -309,7 +227,7 @@ static int migrate_page_move_mapping(struct address_space *mapping, &mapping->page_tree, page_index(page)); - if (page_count(page) != 2 + !!PagePrivate(page) || + if (!page_mapping(page) || page_count(page) != nr_refs || *radix_pointer != page) { write_unlock_irq(&mapping->tree_lock); return -EAGAIN; @@ -317,14 +235,19 @@ static int migrate_page_move_mapping(struct address_space *mapping, /* * Now we know that no one else is looking at the page. + * + * Certain minimal information about a page must be available + * in order for other subsystems to properly handle the page if they + * find it through the radix tree update before we are finished + * copying the page. */ get_page(newpage); -#ifdef CONFIG_SWAP + newpage->index = page->index; + newpage->mapping = page->mapping; if (PageSwapCache(page)) { SetPageSwapCache(newpage); set_page_private(newpage, page_private(page)); } -#endif *radix_pointer = newpage; __put_page(page); @@ -332,11 +255,12 @@ static int migrate_page_move_mapping(struct address_space *mapping, return 0; } +EXPORT_SYMBOL(migrate_page_remove_references); /* * Copy the page to its new location */ -static void migrate_page_copy(struct page *newpage, struct page *page) +void migrate_page_copy(struct page *newpage, struct page *page) { copy_highpage(newpage, page); @@ -348,8 +272,8 @@ static void migrate_page_copy(struct page *newpage, struct page *page) SetPageUptodate(newpage); if (PageActive(page)) SetPageActive(newpage); - if (PageFsMisc(page)) - SetPageFsMisc(newpage); + if (PageChecked(page)) + SetPageChecked(newpage); if (PageMappedToDisk(page)) SetPageMappedToDisk(newpage); @@ -358,9 +282,7 @@ static void migrate_page_copy(struct page *newpage, struct page *page) set_page_dirty(newpage); } -#ifdef CONFIG_SWAP ClearPageSwapCache(page); -#endif ClearPageActive(page); ClearPagePrivate(page); set_page_private(page, 0); @@ -373,18 +295,7 @@ static void migrate_page_copy(struct page *newpage, struct page *page) if (PageWriteback(newpage)) end_page_writeback(newpage); } - -/************************************************************ - * Migration functions - ***********************************************************/ - -/* Always fail migration. Used for mappings that are not movable */ -int fail_migrate_page(struct address_space *mapping, - struct page *newpage, struct page *page) -{ - return -EIO; -} -EXPORT_SYMBOL(fail_migrate_page); +EXPORT_SYMBOL(migrate_page_copy); /* * Common logic to directly migrate a single page suitable for @@ -392,284 +303,51 @@ EXPORT_SYMBOL(fail_migrate_page); * * Pages are locked upon entry and exit. */ -int migrate_page(struct address_space *mapping, - struct page *newpage, struct page *page) +int migrate_page(struct page *newpage, struct page *page) { int rc; BUG_ON(PageWriteback(page)); /* Writeback must be complete */ - rc = migrate_page_move_mapping(mapping, newpage, page); + rc = migrate_page_remove_references(newpage, page, 2); if (rc) return rc; migrate_page_copy(newpage, page); - return 0; -} -EXPORT_SYMBOL(migrate_page); - -/* - * Migration function for pages with buffers. This function can only be used - * if the underlying filesystem guarantees that no other references to "page" - * exist. - */ -int buffer_migrate_page(struct address_space *mapping, - struct page *newpage, struct page *page) -{ - struct buffer_head *bh, *head; - int rc; - - if (!page_has_buffers(page)) - return migrate_page(mapping, newpage, page); - - head = page_buffers(page); - - rc = migrate_page_move_mapping(mapping, newpage, page); - - if (rc) - return rc; - - bh = head; - do { - get_bh(bh); - lock_buffer(bh); - bh = bh->b_this_page; - - } while (bh != head); - - ClearPagePrivate(page); - set_page_private(newpage, page_private(page)); - set_page_private(page, 0); - put_page(page); - get_page(newpage); - - bh = head; - do { - set_bh_page(bh, newpage, bh_offset(bh)); - bh = bh->b_this_page; - - } while (bh != head); - - SetPagePrivate(newpage); - - migrate_page_copy(newpage, page); - - bh = head; - do { - unlock_buffer(bh); - put_bh(bh); - bh = bh->b_this_page; - - } while (bh != head); - - return 0; -} -EXPORT_SYMBOL(buffer_migrate_page); - -/* - * Writeback a page to clean the dirty state - */ -static int writeout(struct address_space *mapping, struct page *page) -{ - struct writeback_control wbc = { - .sync_mode = WB_SYNC_NONE, - .nr_to_write = 1, - .range_start = 0, - .range_end = LLONG_MAX, - .nonblocking = 1, - .for_reclaim = 1 - }; - int rc; - - if (!mapping->a_ops->writepage) - /* No write method for the address space */ - return -EINVAL; - - if (!clear_page_dirty_for_io(page)) - /* Someone else already triggered a write */ - return -EAGAIN; /* - * A dirty page may imply that the underlying filesystem has - * the page on some queue. So the page must be clean for - * migration. Writeout may mean we loose the lock and the - * page state is no longer what we checked for earlier. - * At this point we know that the migration attempt cannot - * be successful. + * Remove auxiliary swap entries and replace + * them with real ptes. + * + * Note that a real pte entry will allow processes that are not + * waiting on the page lock to use the new page via the page tables + * before the new page is unlocked. */ - remove_migration_ptes(page, page); - - rc = mapping->a_ops->writepage(page, &wbc); - if (rc < 0) - /* I/O Error writing */ - return -EIO; - - if (rc != AOP_WRITEPAGE_ACTIVATE) - /* unlocked. Relock */ - lock_page(page); - - return -EAGAIN; -} - -/* - * Default handling if a filesystem does not provide a migration function. - */ -static int fallback_migrate_page(struct address_space *mapping, - struct page *newpage, struct page *page) -{ - if (PageDirty(page)) - return writeout(mapping, page); - - /* - * Buffers may be managed in a filesystem specific way. - * We must have no buffers or drop them. - */ - if (page_has_buffers(page) && - !try_to_release_page(page, GFP_KERNEL)) - return -EAGAIN; - - return migrate_page(mapping, newpage, page); -} - -/* - * Move a page to a newly allocated page - * The page is locked and all ptes have been successfully removed. - * - * The new page will have replaced the old page if this function - * is successful. - */ -static int move_to_new_page(struct page *newpage, struct page *page) -{ - struct address_space *mapping; - int rc; - - /* - * Block others from accessing the page when we get around to - * establishing additional references. We are the only one - * holding a reference to the new page at this point. - */ - if (TestSetPageLocked(newpage)) - BUG(); - - /* Prepare mapping for the new page.*/ - newpage->index = page->index; - newpage->mapping = page->mapping; - - mapping = page_mapping(page); - if (!mapping) - rc = migrate_page(mapping, newpage, page); - else if (mapping->a_ops->migratepage) - /* - * Most pages have a mapping and most filesystems - * should provide a migration function. Anonymous - * pages are part of swap space which also has its - * own migration function. This is the most common - * path for page migration. - */ - rc = mapping->a_ops->migratepage(mapping, - newpage, page); - else - rc = fallback_migrate_page(mapping, newpage, page); - - if (!rc) - remove_migration_ptes(page, newpage); - else - newpage->mapping = NULL; - - unlock_page(newpage); - - return rc; -} - -/* - * Obtain the lock on page, remove all ptes and migrate the page - * to the newly allocated page in newpage. - */ -static int unmap_and_move(new_page_t get_new_page, unsigned long private, - struct page *page, int force) -{ - int rc = 0; - int *result = NULL; - struct page *newpage = get_new_page(page, private, &result); - - if (!newpage) - return -ENOMEM; - - if (page_count(page) == 1) - /* page was freed from under us. So we are done. */ - goto move_newpage; - - rc = -EAGAIN; - if (TestSetPageLocked(page)) { - if (!force) - goto move_newpage; - lock_page(page); - } - - if (PageWriteback(page)) { - if (!force) - goto unlock; - wait_on_page_writeback(page); - } - - /* - * Establish migration ptes or remove ptes - */ - try_to_unmap(page, 1); - if (!page_mapped(page)) - rc = move_to_new_page(newpage, page); - - if (rc) - remove_migration_ptes(page, page); - -unlock: - unlock_page(page); - - if (rc != -EAGAIN) { - /* - * A page that has been migrated has all references - * removed and will be freed. A page that has not been - * migrated will have kepts its references and be - * restored. - */ - list_del(&page->lru); - move_to_lru(page); - } - -move_newpage: - /* - * Move the new page to the LRU. If migration was not successful - * then this will free the page. - */ - move_to_lru(newpage); - if (result) { - if (rc) - *result = rc; - else - *result = page_to_nid(newpage); - } - return rc; + remove_from_swap(newpage); + return 0; } +EXPORT_SYMBOL(migrate_page); /* * migrate_pages * - * The function takes one list of pages to migrate and a function - * that determines from the page to be migrated and the private data - * the target of the move and allocates the page. + * Two lists are passed to this function. The first list + * contains the pages isolated from the LRU to be migrated. + * The second list contains new pages that the pages isolated + * can be moved to. If the second list is NULL then all + * pages are swapped out. * * The function returns after 10 attempts or if no pages * are movable anymore because to has become empty - * or no retryable pages exist anymore. All pages will be - * retruned to the LRU or freed. + * or no retryable pages exist anymore. * - * Return: Number of pages not migrated or error code. + * Return: Number of pages not migrated when "to" ran empty. */ -int migrate_pages(struct list_head *from, - new_page_t get_new_page, unsigned long private) +int migrate_pages(struct list_head *from, struct list_head *to, + struct list_head *moved, struct list_head *failed) { - int retry = 1; + int retry; int nr_failed = 0; int pass = 0; struct page *page; @@ -680,318 +358,305 @@ int migrate_pages(struct list_head *from, if (!swapwrite) current->flags |= PF_SWAPWRITE; - for(pass = 0; pass < 10 && retry; pass++) { - retry = 0; - - list_for_each_entry_safe(page, page2, from, lru) { - cond_resched(); - - rc = unmap_and_move(get_new_page, private, - page, pass > 2); - - switch(rc) { - case -ENOMEM: - goto out; - case -EAGAIN: - retry++; - break; - case 0: - break; - default: - /* Permanent failure */ - nr_failed++; - break; - } - } - } - rc = 0; -out: - if (!swapwrite) - current->flags &= ~PF_SWAPWRITE; - - putback_lru_pages(from); - - if (rc) - return rc; - - return nr_failed + retry; -} +redo: + retry = 0; -#ifdef CONFIG_NUMA -/* - * Move a list of individual pages - */ -struct page_to_node { - unsigned long addr; - struct page *page; - int node; - int status; -}; - -static struct page *new_page_node(struct page *p, unsigned long private, - int **result) -{ - struct page_to_node *pm = (struct page_to_node *)private; + list_for_each_entry_safe(page, page2, from, lru) { + struct page *newpage = NULL; + struct address_space *mapping; - while (pm->node != MAX_NUMNODES && pm->page != p) - pm++; + cond_resched(); - if (pm->node == MAX_NUMNODES) - return NULL; + rc = 0; + if (page_count(page) == 1) + /* page was freed from under us. So we are done. */ + goto next; - *result = &pm->status; - - return alloc_pages_node(pm->node, GFP_HIGHUSER, 0); -} + if (to && list_empty(to)) + break; -/* - * Move a set of pages as indicated in the pm array. The addr - * field must be set to the virtual address of the page to be moved - * and the node number must contain a valid target node. - */ -static int do_move_pages(struct mm_struct *mm, struct page_to_node *pm, - int migrate_all) -{ - int err; - struct page_to_node *pp; - LIST_HEAD(pagelist); - - down_read(&mm->mmap_sem); - - /* - * Build a list of pages to migrate - */ - migrate_prep(); - for (pp = pm; pp->node != MAX_NUMNODES; pp++) { - struct vm_area_struct *vma; - struct page *page; + /* + * Skip locked pages during the first two passes to give the + * functions holding the lock time to release the page. Later we + * use lock_page() to have a higher chance of acquiring the + * lock. + */ + rc = -EAGAIN; + if (pass > 2) + lock_page(page); + else + if (TestSetPageLocked(page)) + goto next; /* - * A valid page pointer that will not match any of the - * pages that will be moved. + * Only wait on writeback if we have already done a pass where + * we we may have triggered writeouts for lots of pages. */ - pp->page = ZERO_PAGE(0); + if (pass > 0) { + wait_on_page_writeback(page); + } else { + if (PageWriteback(page)) + goto unlock_page; + } - err = -EFAULT; - vma = find_vma(mm, pp->addr); - if (!vma) - goto set_status; + /* + * Anonymous pages must have swap cache references otherwise + * the information contained in the page maps cannot be + * preserved. + */ + if (PageAnon(page) && !PageSwapCache(page)) { + if (!add_to_swap(page, GFP_KERNEL)) { + rc = -ENOMEM; + goto unlock_page; + } + } - page = follow_page(vma, pp->addr, FOLL_GET); - err = -ENOENT; - if (!page) - goto set_status; + if (!to) { + rc = swap_page(page); + goto next; + } - if (PageReserved(page)) /* Check for zero page */ - goto put_and_set; + newpage = lru_to_page(to); + lock_page(newpage); - pp->page = page; - err = page_to_nid(page); + /* + * Pages are properly locked and writeback is complete. + * Try to migrate the page. + */ + mapping = page_mapping(page); + if (!mapping) + goto unlock_both; - if (err == pp->node) + if (mapping->a_ops->migratepage) { /* - * Node already in the right place + * Most pages have a mapping and most filesystems + * should provide a migration function. Anonymous + * pages are part of swap space which also has its + * own migration function. This is the most common + * path for page migration. */ - goto put_and_set; + rc = mapping->a_ops->migratepage(newpage, page); + goto unlock_both; + } + + /* Make sure the dirty bit is up to date */ + if (try_to_unmap(page, 1) == SWAP_FAIL) { + rc = -EPERM; + goto unlock_both; + } - err = -EACCES; - if (page_mapcount(page) > 1 && - !migrate_all) - goto put_and_set; + if (page_mapcount(page)) { + rc = -EAGAIN; + goto unlock_both; + } - err = isolate_lru_page(page, &pagelist); -put_and_set: /* - * Either remove the duplicate refcount from - * isolate_lru_page() or drop the page ref if it was - * not isolated. + * Default handling if a filesystem does not provide + * a migration function. We can only migrate clean + * pages so try to write out any dirty pages first. */ - put_page(page); -set_status: - pp->status = err; - } + if (PageDirty(page)) { + switch (pageout(page, mapping)) { + case PAGE_KEEP: + case PAGE_ACTIVATE: + goto unlock_both; + + case PAGE_SUCCESS: + unlock_page(newpage); + goto next; + + case PAGE_CLEAN: + ; /* try to migrate the page below */ + } + } - if (!list_empty(&pagelist)) - err = migrate_pages(&pagelist, new_page_node, - (unsigned long)pm); - else - err = -ENOENT; + /* + * Buffers are managed in a filesystem specific way. + * We must have no buffers or drop them. + */ + if (!page_has_buffers(page) || + try_to_release_page(page, GFP_KERNEL)) { + rc = migrate_page(newpage, page); + goto unlock_both; + } - up_read(&mm->mmap_sem); - return err; -} + /* + * On early passes with mapped pages simply + * retry. There may be a lock held for some + * buffers that may go away. Later + * swap them out. + */ + if (pass > 4) { + /* + * Persistently unable to drop buffers..... As a + * measure of last resort we fall back to + * swap_page(). + */ + unlock_page(newpage); + newpage = NULL; + rc = swap_page(page); + goto next; + } -/* - * Determine the nodes of a list of pages. The addr in the pm array - * must have been set to the virtual address of which we want to determine - * the node number. - */ -static int do_pages_stat(struct mm_struct *mm, struct page_to_node *pm) -{ - down_read(&mm->mmap_sem); - - for ( ; pm->node != MAX_NUMNODES; pm++) { - struct vm_area_struct *vma; - struct page *page; - int err; - - err = -EFAULT; - vma = find_vma(mm, pm->addr); - if (!vma) - goto set_status; - - page = follow_page(vma, pm->addr, 0); - err = -ENOENT; - /* Use PageReserved to check for zero page */ - if (!page || PageReserved(page)) - goto set_status; - - err = page_to_nid(page); -set_status: - pm->status = err; +unlock_both: + unlock_page(newpage); + +unlock_page: + unlock_page(page); + +next: + if (rc == -EAGAIN) { + retry++; + } else if (rc) { + /* Permanent failure */ + list_move(&page->lru, failed); + nr_failed++; + } else { + if (newpage) { + /* Successful migration. Return page to LRU */ + move_to_lru(newpage); + } + list_move(&page->lru, moved); + } } + if (retry && pass++ < 10) + goto redo; - up_read(&mm->mmap_sem); - return 0; + if (!swapwrite) + current->flags &= ~PF_SWAPWRITE; + + return nr_failed + retry; } /* - * Move a list of pages in the address space of the currently executing - * process. + * Migration function for pages with buffers. This function can only be used + * if the underlying filesystem guarantees that no other references to "page" + * exist. */ -asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, - const void __user * __user *pages, - const int __user *nodes, - int __user *status, int flags) +int buffer_migrate_page(struct page *newpage, struct page *page) { - int err = 0; - int i; - struct task_struct *task; - nodemask_t task_nodes; - struct mm_struct *mm; - struct page_to_node *pm = NULL; + struct address_space *mapping = page->mapping; + struct buffer_head *bh, *head; + int rc; - /* Check flags */ - if (flags & ~(MPOL_MF_MOVE|MPOL_MF_MOVE_ALL)) - return -EINVAL; + if (!mapping) + return -EAGAIN; - if ((flags & MPOL_MF_MOVE_ALL) && !capable(CAP_SYS_NICE)) - return -EPERM; + if (!page_has_buffers(page)) + return migrate_page(newpage, page); - /* Find the mm_struct */ - read_lock(&tasklist_lock); - task = pid ? find_task_by_pid(pid) : current; - if (!task) { - read_unlock(&tasklist_lock); - return -ESRCH; - } - mm = get_task_mm(task); - read_unlock(&tasklist_lock); + head = page_buffers(page); - if (!mm) - return -EINVAL; + rc = migrate_page_remove_references(newpage, page, 3); - /* - * Check if this process has the right to modify the specified - * process. The right exists if the process has administrative - * capabilities, superuser privileges or the same - * userid as the target process. - */ - if ((current->euid != task->suid) && (current->euid != task->uid) && - (current->uid != task->suid) && (current->uid != task->uid) && - !capable(CAP_SYS_NICE)) { - err = -EPERM; - goto out2; - } + if (rc) + return rc; - err = security_task_movememory(task); - if (err) - goto out2; + bh = head; + do { + get_bh(bh); + lock_buffer(bh); + bh = bh->b_this_page; + } while (bh != head); - task_nodes = cpuset_mems_allowed(task); + ClearPagePrivate(page); + set_page_private(newpage, page_private(page)); + set_page_private(page, 0); + put_page(page); + get_page(newpage); - /* Limit nr_pages so that the multiplication may not overflow */ - if (nr_pages >= ULONG_MAX / sizeof(struct page_to_node) - 1) { - err = -E2BIG; - goto out2; - } + bh = head; + do { + set_bh_page(bh, newpage, bh_offset(bh)); + bh = bh->b_this_page; - pm = vmalloc((nr_pages + 1) * sizeof(struct page_to_node)); - if (!pm) { - err = -ENOMEM; - goto out2; - } + } while (bh != head); - /* - * Get parameters from user space and initialize the pm - * array. Return various errors if the user did something wrong. - */ - for (i = 0; i < nr_pages; i++) { - const void *p; + SetPagePrivate(newpage); - err = -EFAULT; - if (get_user(p, pages + i)) - goto out; + migrate_page_copy(newpage, page); - pm[i].addr = (unsigned long)p; - if (nodes) { - int node; + bh = head; + do { + unlock_buffer(bh); + put_bh(bh); + bh = bh->b_this_page; - if (get_user(node, nodes + i)) - goto out; + } while (bh != head); - err = -ENODEV; - if (!node_online(node)) - goto out; + return 0; +} +EXPORT_SYMBOL(buffer_migrate_page); - err = -EACCES; - if (!node_isset(node, task_nodes)) - goto out; +/* + * Migrate the list 'pagelist' of pages to a certain destination. + * + * Specify destination with either non-NULL vma or dest_node >= 0 + * Return the number of pages not migrated or error code + */ +int migrate_pages_to(struct list_head *pagelist, + struct vm_area_struct *vma, int dest) +{ + LIST_HEAD(newlist); + LIST_HEAD(moved); + LIST_HEAD(failed); + int err = 0; + unsigned long offset = 0; + int nr_pages; + struct page *page; + struct list_head *p; - pm[i].node = node; - } else - pm[i].node = 0; /* anything to not match MAX_NUMNODES */ - } - /* End marker */ - pm[nr_pages].node = MAX_NUMNODES; +redo: + nr_pages = 0; + list_for_each(p, pagelist) { + if (vma) { + /* + * The address passed to alloc_page_vma is used to + * generate the proper interleave behavior. We fake + * the address here by an increasing offset in order + * to get the proper distribution of pages. + * + * No decision has been made as to which page + * a certain old page is moved to so we cannot + * specify the correct address. + */ + page = alloc_page_vma(GFP_HIGHUSER, vma, + offset + vma->vm_start); + offset += PAGE_SIZE; + } + else + page = alloc_pages_node(dest, GFP_HIGHUSER, 0); - if (nodes) - err = do_move_pages(mm, pm, flags & MPOL_MF_MOVE_ALL); - else - err = do_pages_stat(mm, pm); + if (!page) { + err = -ENOMEM; + goto out; + } + list_add_tail(&page->lru, &newlist); + nr_pages++; + if (nr_pages > MIGRATE_CHUNK_SIZE) + break; + } + err = migrate_pages(pagelist, &newlist, &moved, &failed); - if (err >= 0) - /* Return status information */ - for (i = 0; i < nr_pages; i++) - if (put_user(pm[i].status, status + i)) - err = -EFAULT; + putback_lru_pages(&moved); /* Call release pages instead ?? */ + if (err >= 0 && list_empty(&newlist) && !list_empty(pagelist)) + goto redo; out: - vfree(pm); -out2: - mmput(mm); - return err; -} -#endif - -/* - * Call migration functions in the vma_ops that may prepare - * memory in a vm for migration. migration functions may perform - * the migration for vmas that do not have an underlying page struct. - */ -int migrate_vmas(struct mm_struct *mm, const nodemask_t *to, - const nodemask_t *from, unsigned long flags) -{ - struct vm_area_struct *vma; - int err = 0; - - for(vma = mm->mmap; vma->vm_next && !err; vma = vma->vm_next) { - if (vma->vm_ops && vma->vm_ops->migrate) { - err = vma->vm_ops->migrate(vma, to, from, flags); - if (err) - break; - } - } - return err; + /* Return leftover allocated pages */ + while (!list_empty(&newlist)) { + page = list_entry(newlist.next, struct page, lru); + list_del(&page->lru); + __free_page(page); + } + list_splice(&failed, pagelist); + if (err < 0) + return err; + + /* Calculate number of leftover pages */ + nr_pages = 0; + list_for_each(p, pagelist) + nr_pages++; + return nr_pages; } diff --git a/mm/mmap.c b/mm/mmap.c index 3ea3ddcf6..56e76ac1c 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -33,10 +33,6 @@ #include #include -#ifndef arch_mmap_check -#define arch_mmap_check(addr, len, flags) (0) -#endif - static void unmap_region(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev, unsigned long start, unsigned long end); @@ -67,13 +63,6 @@ pgprot_t protection_map[16] = { __S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111 }; -pgprot_t vm_get_page_prot(unsigned long vm_flags) -{ - return protection_map[vm_flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; -} -EXPORT_SYMBOL(vm_get_page_prot); - int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ int sysctl_overcommit_ratio = 50; /* default is 50% */ int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; @@ -110,7 +99,7 @@ int __vm_enough_memory(long pages, int cap_sys_admin) if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { unsigned long n; - free = global_page_state(NR_FILE_PAGES); + free = get_page_cache_size(); free += nr_swap_pages; /* @@ -1089,8 +1078,7 @@ munmap_back: vma->vm_start = addr; vma->vm_end = addr + len; vma->vm_flags = vm_flags; - vma->vm_page_prot = protection_map[vm_flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; + vma->vm_page_prot = protection_map[vm_flags & 0x0f]; vma->vm_pgoff = pgoff; if (file) { @@ -1131,10 +1119,6 @@ munmap_back: pgoff = vma->vm_pgoff; vm_flags = vma->vm_flags; - if (vma_wants_writenotify(vma)) - vma->vm_page_prot = - protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC)]; - if (!file || !vma_merge(mm, prev, addr, vma->vm_end, vma->vm_flags, NULL, file, pgoff, vma_policy(vma))) { file = vma->vm_file; @@ -1410,7 +1394,7 @@ get_unmapped_area_prot(struct file *file, unsigned long addr, unsigned long len, EXPORT_SYMBOL(get_unmapped_area_prot); -#define SHLIB_BASE 0x00110000 +#define SHLIB_BASE 0x00111000 unsigned long arch_get_unmapped_exec_area(struct file *filp, unsigned long addr0, unsigned long len0, unsigned long pgoff, unsigned long flags) @@ -2039,8 +2023,7 @@ unsigned long do_brk(unsigned long addr, unsigned long len) vma->vm_end = addr + len; vma->vm_pgoff = pgoff; vma->vm_flags = flags; - vma->vm_page_prot = protection_map[flags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; + vma->vm_page_prot = protection_map[flags & 0x0f]; vma_link(mm, vma, prev, rb_link, rb_parent); out: vx_vmpages_add(mm, len >> PAGE_SHIFT); @@ -2257,7 +2240,7 @@ int install_special_mapping(struct mm_struct *mm, vma->vm_private_data = pages; insert_vm_struct(mm, vma); - vx_vmpages_add(mm, len >> PAGE_SHIFT); + mm->total_vm += len >> PAGE_SHIFT; if (!vdso_populate) return 0; diff --git a/mm/mmzone.c b/mm/mmzone.c index febea1c98..b022370e6 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c @@ -5,6 +5,7 @@ */ +#include #include #include #include @@ -14,7 +15,7 @@ struct pglist_data *first_online_pgdat(void) return NODE_DATA(first_online_node); } -EXPORT_UNUSED_SYMBOL(first_online_pgdat); /* June 2006 */ +EXPORT_SYMBOL(first_online_pgdat); struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) { @@ -24,7 +25,7 @@ struct pglist_data *next_online_pgdat(struct pglist_data *pgdat) return NULL; return NODE_DATA(nid); } -EXPORT_UNUSED_SYMBOL(next_online_pgdat); /* June 2006 */ +EXPORT_SYMBOL(next_online_pgdat); /* @@ -45,5 +46,5 @@ struct zone *next_zone(struct zone *zone) } return zone; } -EXPORT_UNUSED_SYMBOL(next_zone); /* June 2006 */ +EXPORT_SYMBOL(next_zone); diff --git a/mm/mprotect.c b/mm/mprotect.c index f23231f7e..05dc34246 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -19,8 +19,7 @@ #include #include #include -#include -#include + #include #include #include @@ -28,55 +27,30 @@ #include static void change_pte_range(struct mm_struct *mm, pmd_t *pmd, - unsigned long addr, unsigned long end, pgprot_t newprot, - int dirty_accountable) + unsigned long addr, unsigned long end, pgprot_t newprot) { - pte_t *pte, oldpte; + pte_t *pte; spinlock_t *ptl; pte = pte_offset_map_lock(mm, pmd, addr, &ptl); do { - oldpte = *pte; - if (pte_present(oldpte)) { + if (pte_present(*pte)) { pte_t ptent; /* Avoid an SMP race with hardware updated dirty/clean * bits by wiping the pte and then setting the new pte * into place. */ - ptent = ptep_get_and_clear(mm, addr, pte); - ptent = pte_modify(ptent, newprot); - /* - * Avoid taking write faults for pages we know to be - * dirty. - */ - if (dirty_accountable && pte_dirty(ptent)) - ptent = pte_mkwrite(ptent); + ptent = pte_modify(ptep_get_and_clear(mm, addr, pte), newprot); set_pte_at(mm, addr, pte, ptent); lazy_mmu_prot_update(ptent); -#ifdef CONFIG_MIGRATION - } else if (!pte_file(oldpte)) { - swp_entry_t entry = pte_to_swp_entry(oldpte); - - if (is_write_migration_entry(entry)) { - /* - * A protection check is difficult so - * just be safe and disable write - */ - make_migration_entry_read(&entry); - set_pte_at(mm, addr, pte, - swp_entry_to_pte(entry)); - } -#endif } - } while (pte++, addr += PAGE_SIZE, addr != end); pte_unmap_unlock(pte - 1, ptl); } static inline void change_pmd_range(struct mm_struct *mm, pud_t *pud, - unsigned long addr, unsigned long end, pgprot_t newprot, - int dirty_accountable) + unsigned long addr, unsigned long end, pgprot_t newprot) { pmd_t *pmd; unsigned long next; @@ -86,13 +60,12 @@ static inline void change_pmd_range(struct mm_struct *mm, pud_t *pud, next = pmd_addr_end(addr, end); if (pmd_none_or_clear_bad(pmd)) continue; - change_pte_range(mm, pmd, addr, next, newprot, dirty_accountable); + change_pte_range(mm, pmd, addr, next, newprot); } while (pmd++, addr = next, addr != end); } static inline void change_pud_range(struct mm_struct *mm, pgd_t *pgd, - unsigned long addr, unsigned long end, pgprot_t newprot, - int dirty_accountable) + unsigned long addr, unsigned long end, pgprot_t newprot) { pud_t *pud; unsigned long next; @@ -102,13 +75,12 @@ static inline void change_pud_range(struct mm_struct *mm, pgd_t *pgd, next = pud_addr_end(addr, end); if (pud_none_or_clear_bad(pud)) continue; - change_pmd_range(mm, pud, addr, next, newprot, dirty_accountable); + change_pmd_range(mm, pud, addr, next, newprot); } while (pud++, addr = next, addr != end); } static void change_protection(struct vm_area_struct *vma, - unsigned long addr, unsigned long end, pgprot_t newprot, - int dirty_accountable) + unsigned long addr, unsigned long end, pgprot_t newprot) { struct mm_struct *mm = vma->vm_mm; pgd_t *pgd; @@ -122,7 +94,7 @@ static void change_protection(struct vm_area_struct *vma, next = pgd_addr_end(addr, end); if (pgd_none_or_clear_bad(pgd)) continue; - change_pud_range(mm, pgd, addr, next, newprot, dirty_accountable); + change_pud_range(mm, pgd, addr, next, newprot); } while (pgd++, addr = next, addr != end); flush_tlb_range(vma, start, end); } @@ -135,9 +107,9 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, unsigned long oldflags = vma->vm_flags; long nrpages = (end - start) >> PAGE_SHIFT; unsigned long charged = 0, old_end = vma->vm_end; + pgprot_t newprot; pgoff_t pgoff; int error; - int dirty_accountable = 0; if (newflags == oldflags) { *pprev = vma; @@ -161,6 +133,8 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, } } + newprot = protection_map[newflags & 0xf]; + /* * First try to merge with previous and/or next vma. */ @@ -192,20 +166,13 @@ success: * held in write mode. */ vma->vm_flags = newflags; + vma->vm_page_prot = newprot; if (oldflags & VM_EXEC) arch_remove_exec_range(current->mm, old_end); - vma->vm_page_prot = protection_map[newflags & - (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]; - if (vma_wants_writenotify(vma)) { - vma->vm_page_prot = protection_map[newflags & - (VM_READ|VM_WRITE|VM_EXEC)]; - dirty_accountable = 1; - } - if (is_vm_hugetlb_page(vma)) - hugetlb_change_protection(vma, start, end, vma->vm_page_prot); + hugetlb_change_protection(vma, start, end, newprot); else - change_protection(vma, start, end, vma->vm_page_prot, dirty_accountable); + change_protection(vma, start, end, newprot); vm_stat_account(mm, oldflags, vma->vm_file, -nrpages); vm_stat_account(mm, newflags, vma->vm_file, nrpages); return 0; @@ -241,7 +208,8 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot) /* * Does the application expect PROT_READ to imply PROT_EXEC: */ - if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC)) + if (unlikely((prot & PROT_READ) && + (current->personality & READ_IMPLIES_EXEC))) prot |= PROT_EXEC; vm_flags = calc_vm_prot_bits(prot); diff --git a/mm/mremap.c b/mm/mremap.c index 9fe68aad2..be5afa7ec 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -100,7 +100,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, new_pte = pte_offset_map_nested(new_pmd, new_addr); new_ptl = pte_lockptr(mm, new_pmd); if (new_ptl != old_ptl) - spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING); + spin_lock(new_ptl); for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE, new_pte++, new_addr += PAGE_SIZE) { diff --git a/mm/msync.c b/mm/msync.c index 358d73cf7..bc6c95376 100644 --- a/mm/msync.c +++ b/mm/msync.c @@ -7,33 +7,149 @@ /* * The msync() system call. */ +#include +#include #include #include #include +#include +#include #include #include +#include +#include + +static unsigned long msync_pte_range(struct vm_area_struct *vma, pmd_t *pmd, + unsigned long addr, unsigned long end) +{ + pte_t *pte; + spinlock_t *ptl; + int progress = 0; + unsigned long ret = 0; + +again: + pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); + do { + struct page *page; + + if (progress >= 64) { + progress = 0; + if (need_resched() || need_lockbreak(ptl)) + break; + } + progress++; + if (!pte_present(*pte)) + continue; + if (!pte_maybe_dirty(*pte)) + continue; + page = vm_normal_page(vma, addr, *pte); + if (!page) + continue; + if (ptep_clear_flush_dirty(vma, addr, pte) || + page_test_and_clear_dirty(page)) + ret += set_page_dirty(page); + progress += 3; + } while (pte++, addr += PAGE_SIZE, addr != end); + pte_unmap_unlock(pte - 1, ptl); + cond_resched(); + if (addr != end) + goto again; + return ret; +} + +static inline unsigned long msync_pmd_range(struct vm_area_struct *vma, + pud_t *pud, unsigned long addr, unsigned long end) +{ + pmd_t *pmd; + unsigned long next; + unsigned long ret = 0; + + pmd = pmd_offset(pud, addr); + do { + next = pmd_addr_end(addr, end); + if (pmd_none_or_clear_bad(pmd)) + continue; + ret += msync_pte_range(vma, pmd, addr, next); + } while (pmd++, addr = next, addr != end); + return ret; +} + +static inline unsigned long msync_pud_range(struct vm_area_struct *vma, + pgd_t *pgd, unsigned long addr, unsigned long end) +{ + pud_t *pud; + unsigned long next; + unsigned long ret = 0; + + pud = pud_offset(pgd, addr); + do { + next = pud_addr_end(addr, end); + if (pud_none_or_clear_bad(pud)) + continue; + ret += msync_pmd_range(vma, pud, addr, next); + } while (pud++, addr = next, addr != end); + return ret; +} + +static unsigned long msync_page_range(struct vm_area_struct *vma, + unsigned long addr, unsigned long end) +{ + pgd_t *pgd; + unsigned long next; + unsigned long ret = 0; + + /* For hugepages we can't go walking the page table normally, + * but that's ok, hugetlbfs is memory based, so we don't need + * to do anything more on an msync(). + */ + if (vma->vm_flags & VM_HUGETLB) + return 0; + + BUG_ON(addr >= end); + pgd = pgd_offset(vma->vm_mm, addr); + flush_cache_range(vma, addr, end); + do { + next = pgd_addr_end(addr, end); + if (pgd_none_or_clear_bad(pgd)) + continue; + ret += msync_pud_range(vma, pgd, addr, next); + } while (pgd++, addr = next, addr != end); + return ret; +} + /* * MS_SYNC syncs the entire file - including mappings. * - * MS_ASYNC does not start I/O (it used to, up to 2.5.67). - * Nor does it marks the relevant pages dirty (it used to up to 2.6.17). - * Now it doesn't do anything, since dirty pages are properly tracked. - * - * The application may now run fsync() to + * MS_ASYNC does not start I/O (it used to, up to 2.5.67). Instead, it just + * marks the relevant pages dirty. The application may now run fsync() to * write out the dirty pages and wait on the writeout and check the result. * Or the application may run fadvise(FADV_DONTNEED) against the fd to start * async writeout immediately. * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to * applications. */ +static int msync_interval(struct vm_area_struct *vma, unsigned long addr, + unsigned long end, int flags, + unsigned long *nr_pages_dirtied) +{ + struct file *file = vma->vm_file; + + if ((flags & MS_INVALIDATE) && (vma->vm_flags & VM_LOCKED)) + return -EBUSY; + + if (file && (vma->vm_flags & VM_SHARED)) + *nr_pages_dirtied = msync_page_range(vma, addr, end); + return 0; +} + asmlinkage long sys_msync(unsigned long start, size_t len, int flags) { unsigned long end; - struct mm_struct *mm = current->mm; struct vm_area_struct *vma; int unmapped_error = 0; int error = -EINVAL; + int done = 0; if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC)) goto out; @@ -53,50 +169,67 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags) * If the interval [start,end) covers some unmapped address ranges, * just ignore them, but return -ENOMEM at the end. */ - down_read(&mm->mmap_sem); - vma = find_vma(mm, start); - for (;;) { + down_read(¤t->mm->mmap_sem); + if (flags & MS_SYNC) + current->flags |= PF_SYNCWRITE; + vma = find_vma(current->mm, start); + if (!vma) { + error = -ENOMEM; + goto out_unlock; + } + do { + unsigned long nr_pages_dirtied = 0; struct file *file; - /* Still start < end. */ - error = -ENOMEM; - if (!vma) - goto out_unlock; /* Here start < vma->vm_end. */ if (start < vma->vm_start) { - start = vma->vm_start; - if (start >= end) - goto out_unlock; unmapped_error = -ENOMEM; + start = vma->vm_start; } /* Here vma->vm_start <= start < vma->vm_end. */ - if ((flags & MS_INVALIDATE) && - (vma->vm_flags & VM_LOCKED)) { - error = -EBUSY; - goto out_unlock; + if (end <= vma->vm_end) { + if (start < end) { + error = msync_interval(vma, start, end, flags, + &nr_pages_dirtied); + if (error) + goto out_unlock; + } + error = unmapped_error; + done = 1; + } else { + /* Here vma->vm_start <= start < vma->vm_end < end. */ + error = msync_interval(vma, start, vma->vm_end, flags, + &nr_pages_dirtied); + if (error) + goto out_unlock; } file = vma->vm_file; start = vma->vm_end; - if ((flags & MS_SYNC) && file && + if ((flags & MS_ASYNC) && file && nr_pages_dirtied) { + get_file(file); + up_read(¤t->mm->mmap_sem); + balance_dirty_pages_ratelimited_nr(file->f_mapping, + nr_pages_dirtied); + fput(file); + down_read(¤t->mm->mmap_sem); + vma = find_vma(current->mm, start); + } else if ((flags & MS_SYNC) && file && (vma->vm_flags & VM_SHARED)) { get_file(file); - up_read(&mm->mmap_sem); + up_read(¤t->mm->mmap_sem); error = do_fsync(file, 0); fput(file); - if (error || start >= end) - goto out; - down_read(&mm->mmap_sem); - vma = find_vma(mm, start); - } else { - if (start >= end) { - error = 0; + down_read(¤t->mm->mmap_sem); + if (error) goto out_unlock; - } + vma = find_vma(current->mm, start); + } else { vma = vma->vm_next; } - } + } while (vma && !done); out_unlock: - up_read(&mm->mmap_sem); + current->flags &= ~PF_SYNCWRITE; + up_read(¤t->mm->mmap_sem); out: - return error ? : unmapped_error; + return error; } diff --git a/mm/nommu.c b/mm/nommu.c index d4d25f88c..60745e2a5 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1072,7 +1072,6 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, vma->vm_start = vma->vm_pgoff << PAGE_SHIFT; return 0; } -EXPORT_SYMBOL(remap_pfn_range); void swap_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) { @@ -1093,7 +1092,6 @@ void unmap_mapping_range(struct address_space *mapping, int even_cows) { } -EXPORT_SYMBOL(unmap_mapping_range); /* * Check that a process has enough memory to allocate a new virtual @@ -1126,7 +1124,7 @@ int __vm_enough_memory(long pages, int cap_sys_admin) if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { unsigned long n; - free = global_page_state(NR_FILE_PAGES); + free = get_page_cache_size(); free += nr_swap_pages; /* diff --git a/mm/oom_kill.c b/mm/oom_kill.c index ac1055f2b..a9cfca26d 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -15,6 +15,7 @@ * kernel subsystems and hints as to where to find out what things do. */ +#include #include #include #include @@ -22,11 +23,10 @@ #include #include -int sysctl_panic_on_oom; /* #define DEBUG */ /** - * badness - calculate a numeric value for how bad this task has been + * oom_badness - calculate a numeric value for how bad this task has been * @p: task struct of which task we should calculate * @uptime: current uptime in seconds * @@ -57,12 +57,6 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) return 0; } - /* - * swapoff can easily use up all memory, so kill those first. - */ - if (p->flags & PF_SWAPOFF) - return ULONG_MAX; - /* * The memory size of the process is the basis for the badness. */ @@ -134,14 +128,6 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) points /= 4; - /* - * If p's nodes don't overlap ours, it may still help to kill p - * because p may have allocated or otherwise mapped memory on - * this node before. However it will be less likely. - */ - if (!cpuset_excl_nodes_overlap(p)) - points /= 8; - /* * Adjust the score by oomkilladj. */ @@ -212,38 +198,25 @@ static struct task_struct *select_bad_process(unsigned long *ppoints) unsigned long points; int releasing; - /* skip kernel threads */ - if (!p->mm) - continue; - /* skip the init task with pid == 1 */ if (p->pid == 1) continue; + if (p->oomkilladj == OOM_DISABLE) + continue; + /* If p's nodes don't overlap ours, it won't help to kill p. */ + if (!cpuset_excl_nodes_overlap(p)) + continue; + /* - * This is in the process of releasing memory so wait for it + * This is in the process of releasing memory so for wait it * to finish before killing some other task by mistake. - * - * However, if p is the current task, we allow the 'kill' to - * go ahead if it is exiting: this will simply set TIF_MEMDIE, - * which will allow it to gain access to memory reserves in - * the process of exiting and releasing its resources. - * Otherwise we could get an OOM deadlock. */ releasing = test_tsk_thread_flag(p, TIF_MEMDIE) || p->flags & PF_EXITING; - if (releasing) { - /* PF_DEAD tasks have already released their mm */ - if (p->flags & PF_DEAD) - continue; - if (p->flags & PF_EXITING && p == current) { - chosen = p; - *ppoints = ULONG_MAX; - break; - } + if (releasing && !(p->flags & PF_DEAD)) return ERR_PTR(-1UL); - } - if (p->oomkilladj == OOM_DISABLE) - continue; + if (p->flags & PF_SWAPOFF) + return p; points = badness(p, uptime.tv_sec); if (points > *ppoints || !chosen) { @@ -259,7 +232,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints) * CAP_SYS_RAW_IO set, send SIGTERM instead (but it's unlikely that * we select a process with CAP_SYS_RAW_IO set). */ -static void __oom_kill_task(struct task_struct *p, const char *message) +static void __oom_kill_task(task_t *p, const char *message) { if (p->pid == 1) { WARN_ON(1); @@ -275,8 +248,7 @@ static void __oom_kill_task(struct task_struct *p, const char *message) return; } task_unlock(p); - if (message) - printk(KERN_ERR "%s: Killed process %d (%s).\n", + printk(KERN_ERR "%s: Killed process %d (%s).\n", message, p->pid, p->comm); /* @@ -290,10 +262,10 @@ static void __oom_kill_task(struct task_struct *p, const char *message) force_sig(SIGKILL, p); } -static int oom_kill_task(struct task_struct *p, const char *message) +static int oom_kill_task(task_t *p, const char *message) { struct mm_struct *mm; - struct task_struct *g, *q; + task_t * g, * q; mm = p->mm; @@ -328,15 +300,8 @@ static int oom_kill_process(struct task_struct *p, unsigned long points, struct task_struct *c; struct list_head *tsk; - /* - * If the task is already exiting, don't alarm the sysadmin or kill - * its children or threads, just set TIF_MEMDIE so it can die quickly - */ - if (p->flags & PF_EXITING) { - __oom_kill_task(p, NULL); - return 0; - } - + printk(KERN_ERR "Out of Memory: Kill process %d (%s) score %li and " + "children.\n", p->pid, p->comm, points); /* Try to kill a child first */ list_for_each(tsk, &p->children) { c = list_entry(tsk, struct task_struct, sibling); @@ -348,71 +313,8 @@ static int oom_kill_process(struct task_struct *p, unsigned long points, return oom_kill_task(p, message); } -int should_oom_kill(void) -{ - static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED; - static unsigned long first, last, count, lastkill; - unsigned long now, since; - int ret = 0; - - spin_lock(&oom_lock); - now = jiffies; - since = now - last; - last = now; - - /* - * If it's been a long time since last failure, - * we're not oom. - */ - if (since > 5*HZ) - goto reset; - - /* - * If we haven't tried for at least one second, - * we're not really oom. - */ - since = now - first; - if (since < HZ) - goto out_unlock; - - /* - * If we have gotten only a few failures, - * we're not really oom. - */ - if (++count < 10) - goto out_unlock; - - /* - * If we just killed a process, wait a while - * to give that task a chance to exit. This - * avoids killing multiple processes needlessly. - */ - since = now - lastkill; - if (since < HZ*5) - goto out_unlock; - - /* - * Ok, really out of memory. Kill something. - */ - lastkill = now; - ret = 1; - -reset: -/* - * We dropped the lock above, so check to be sure the variable - * first only ever increases to prevent false OOM's. - */ - if (time_after(now, first)) - first = now; - count = 0; - -out_unlock: - spin_unlock(&oom_lock); - return ret; -} - /** - * out_of_memory - kill the "best" process when we run out of memory + * oom_kill - kill the "best" process when we run out of memory * * If we run out of memory, we have the choice between either * killing a random task (bad), letting the system crash (worse) @@ -421,20 +323,16 @@ out_unlock: */ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) { - struct task_struct *p; + task_t *p; unsigned long points = 0; if (printk_ratelimit()) { - printk(KERN_WARNING "%s invoked oom-killer: " - "gfp_mask=0x%x, order=%d, oomkilladj=%d\n", - current->comm, gfp_mask, order, current->oomkilladj); + printk("oom-killer: gfp_mask=0x%x, order=%d\n", + gfp_mask, order); dump_stack(); show_mem(); } - if (!should_oom_kill()) - return; - cpuset_lock(); read_lock(&tasklist_lock); @@ -454,8 +352,6 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) break; case CONSTRAINT_NONE: - if (sysctl_panic_on_oom) - panic("out of memory. panic_on_oom is selected\n"); retry: /* * Rambo mode: Shoot down a process and hope it solves whatever diff --git a/mm/page-writeback.c b/mm/page-writeback.c index d42361aa0..75d7f48b7 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -29,7 +29,6 @@ #include #include #include -#include /* * The maximum number of pages to writeout in a single bdflush/kupdate @@ -100,6 +99,22 @@ EXPORT_SYMBOL(laptop_mode); static void background_writeout(unsigned long _min_pages); +struct writeback_state +{ + unsigned long nr_dirty; + unsigned long nr_unstable; + unsigned long nr_mapped; + unsigned long nr_writeback; +}; + +static void get_writeback_state(struct writeback_state *wbs) +{ + wbs->nr_dirty = read_page_state(nr_dirty); + wbs->nr_unstable = read_page_state(nr_unstable); + wbs->nr_mapped = read_page_state(nr_mapped); + wbs->nr_writeback = read_page_state(nr_writeback); +} + /* * Work out the current dirty-memory clamping and background writeout * thresholds. @@ -118,8 +133,8 @@ static void background_writeout(unsigned long _min_pages); * clamping level. */ static void -get_dirty_limits(long *pbackground, long *pdirty, - struct address_space *mapping) +get_dirty_limits(struct writeback_state *wbs, long *pbackground, long *pdirty, + struct address_space *mapping) { int background_ratio; /* Percentages */ int dirty_ratio; @@ -129,6 +144,8 @@ get_dirty_limits(long *pbackground, long *pdirty, unsigned long available_memory = total_pages; struct task_struct *tsk; + get_writeback_state(wbs); + #ifdef CONFIG_HIGHMEM /* * If this mapping can only allocate from low memory, @@ -139,9 +156,7 @@ get_dirty_limits(long *pbackground, long *pdirty, #endif - unmapped_ratio = 100 - ((global_page_state(NR_FILE_MAPPED) + - global_page_state(NR_ANON_PAGES)) * 100) / - total_pages; + unmapped_ratio = 100 - (wbs->nr_mapped * 100) / total_pages; dirty_ratio = vm_dirty_ratio; if (dirty_ratio > unmapped_ratio / 2) @@ -174,6 +189,7 @@ get_dirty_limits(long *pbackground, long *pdirty, */ static void balance_dirty_pages(struct address_space *mapping) { + struct writeback_state wbs; long nr_reclaimable; long background_thresh; long dirty_thresh; @@ -188,15 +204,13 @@ static void balance_dirty_pages(struct address_space *mapping) .sync_mode = WB_SYNC_NONE, .older_than_this = NULL, .nr_to_write = write_chunk, - .range_cyclic = 1, }; - get_dirty_limits(&background_thresh, &dirty_thresh, mapping); - nr_reclaimable = global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS); - if (nr_reclaimable + global_page_state(NR_WRITEBACK) <= - dirty_thresh) - break; + get_dirty_limits(&wbs, &background_thresh, + &dirty_thresh, mapping); + nr_reclaimable = wbs.nr_dirty + wbs.nr_unstable; + if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh) + break; if (!dirty_exceeded) dirty_exceeded = 1; @@ -209,14 +223,11 @@ static void balance_dirty_pages(struct address_space *mapping) */ if (nr_reclaimable) { writeback_inodes(&wbc); - get_dirty_limits(&background_thresh, - &dirty_thresh, mapping); - nr_reclaimable = global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS); - if (nr_reclaimable + - global_page_state(NR_WRITEBACK) - <= dirty_thresh) - break; + get_dirty_limits(&wbs, &background_thresh, + &dirty_thresh, mapping); + nr_reclaimable = wbs.nr_dirty + wbs.nr_unstable; + if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh) + break; pages_written += write_chunk - wbc.nr_to_write; if (pages_written >= write_chunk) break; /* We've done our duty */ @@ -224,9 +235,8 @@ static void balance_dirty_pages(struct address_space *mapping) blk_congestion_wait(WRITE, HZ/10); } - if (nr_reclaimable + global_page_state(NR_WRITEBACK) - <= dirty_thresh && dirty_exceeded) - dirty_exceeded = 0; + if (nr_reclaimable + wbs.nr_writeback <= dirty_thresh && dirty_exceeded) + dirty_exceeded = 0; if (writeback_in_progress(bdi)) return; /* pdflush is already working this queue */ @@ -244,16 +254,6 @@ static void balance_dirty_pages(struct address_space *mapping) pdflush_operation(background_writeout, 0); } -void set_page_dirty_balance(struct page *page) -{ - if (set_page_dirty(page)) { - struct address_space *mapping = page_mapping(page); - - if (mapping) - balance_dirty_pages_ratelimited(mapping); - } -} - /** * balance_dirty_pages_ratelimited_nr - balance dirty memory state * @mapping: address_space which was dirtied @@ -298,11 +298,12 @@ EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr); void throttle_vm_writeout(void) { + struct writeback_state wbs; long background_thresh; long dirty_thresh; for ( ; ; ) { - get_dirty_limits(&background_thresh, &dirty_thresh, NULL); + get_dirty_limits(&wbs, &background_thresh, &dirty_thresh, NULL); /* * Boost the allowable dirty threshold a bit for page @@ -310,9 +311,8 @@ void throttle_vm_writeout(void) */ dirty_thresh += dirty_thresh / 10; /* wheeee... */ - if (global_page_state(NR_UNSTABLE_NFS) + - global_page_state(NR_WRITEBACK) <= dirty_thresh) - break; + if (wbs.nr_unstable + wbs.nr_writeback <= dirty_thresh) + break; blk_congestion_wait(WRITE, HZ/10); } } @@ -331,16 +331,15 @@ static void background_writeout(unsigned long _min_pages) .older_than_this = NULL, .nr_to_write = 0, .nonblocking = 1, - .range_cyclic = 1, }; for ( ; ; ) { + struct writeback_state wbs; long background_thresh; long dirty_thresh; - get_dirty_limits(&background_thresh, &dirty_thresh, NULL); - if (global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS) < background_thresh + get_dirty_limits(&wbs, &background_thresh, &dirty_thresh, NULL); + if (wbs.nr_dirty + wbs.nr_unstable < background_thresh && min_pages <= 0) break; wbc.encountered_congestion = 0; @@ -364,9 +363,12 @@ static void background_writeout(unsigned long _min_pages) */ int wakeup_pdflush(long nr_pages) { - if (nr_pages == 0) - nr_pages = global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS); + if (nr_pages == 0) { + struct writeback_state wbs; + + get_writeback_state(&wbs); + nr_pages = wbs.nr_dirty + wbs.nr_unstable; + } return pdflush_operation(background_writeout, nr_pages); } @@ -397,6 +399,7 @@ static void wb_kupdate(unsigned long arg) unsigned long start_jif; unsigned long next_jif; long nr_to_write; + struct writeback_state wbs; struct writeback_control wbc = { .bdi = NULL, .sync_mode = WB_SYNC_NONE, @@ -404,16 +407,15 @@ static void wb_kupdate(unsigned long arg) .nr_to_write = 0, .nonblocking = 1, .for_kupdate = 1, - .range_cyclic = 1, }; sync_supers(); + get_writeback_state(&wbs); oldest_jif = jiffies - dirty_expire_interval; start_jif = jiffies; next_jif = start_jif + dirty_writeback_interval; - nr_to_write = global_page_state(NR_FILE_DIRTY) + - global_page_state(NR_UNSTABLE_NFS) + + nr_to_write = wbs.nr_dirty + wbs.nr_unstable + (inodes_stat.nr_inodes - inodes_stat.nr_unused); while (nr_to_write > 0) { wbc.encountered_congestion = 0; @@ -511,14 +513,14 @@ static void set_ratelimit(void) ratelimit_pages = (4096 * 1024) / PAGE_CACHE_SIZE; } -static int __cpuinit +static int ratelimit_handler(struct notifier_block *self, unsigned long u, void *v) { set_ratelimit(); return 0; } -static struct notifier_block __cpuinitdata ratelimit_nb = { +static struct notifier_block ratelimit_nb = { .notifier_call = ratelimit_handler, .next = NULL, }; @@ -561,7 +563,7 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc) return 0; wbc->for_writepages = 1; if (mapping->a_ops->writepages) - ret = mapping->a_ops->writepages(mapping, wbc); + ret = mapping->a_ops->writepages(mapping, wbc); else ret = generic_writepages(mapping, wbc); wbc->for_writepages = 0; @@ -635,8 +637,7 @@ int __set_page_dirty_nobuffers(struct page *page) if (mapping2) { /* Race with truncate? */ BUG_ON(mapping2 != mapping); if (mapping_cap_account_dirty(mapping)) - __inc_zone_page_state(page, - NR_FILE_DIRTY); + inc_page_state(nr_dirty); radix_tree_tag_set(&mapping->page_tree, page_index(page), PAGECACHE_TAG_DIRTY); } @@ -717,7 +718,6 @@ int test_clear_page_dirty(struct page *page) struct address_space *mapping = page_mapping(page); unsigned long flags; - WARN_ON_ONCE(!PageLocked(page)); if (mapping) { write_lock_irqsave(&mapping->tree_lock, flags); if (TestClearPageDirty(page)) { @@ -725,14 +725,8 @@ int test_clear_page_dirty(struct page *page) page_index(page), PAGECACHE_TAG_DIRTY); write_unlock_irqrestore(&mapping->tree_lock, flags); - /* - * We can continue to use `mapping' here because the - * page is locked, which pins the address_space - */ - if (mapping_cap_account_dirty(mapping)) { - page_mkclean(page); - dec_zone_page_state(page, NR_FILE_DIRTY); - } + if (mapping_cap_account_dirty(mapping)) + dec_page_state(nr_dirty); return 1; } write_unlock_irqrestore(&mapping->tree_lock, flags); @@ -760,13 +754,10 @@ int clear_page_dirty_for_io(struct page *page) { struct address_space *mapping = page_mapping(page); - WARN_ON_ONCE(!PageLocked(page)); if (mapping) { if (TestClearPageDirty(page)) { - if (mapping_cap_account_dirty(mapping)) { - page_mkclean(page); - dec_zone_page_state(page, NR_FILE_DIRTY); - } + if (mapping_cap_account_dirty(mapping)) + dec_page_state(nr_dirty); return 1; } return 0; diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7de09d07d..5581dd1a4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -14,6 +14,7 @@ * (lots of bits borrowed from Ingo Molnar & Andrew Morton) */ +#include #include #include #include @@ -36,8 +37,6 @@ #include #include #include -#include -#include #include #include @@ -85,8 +84,8 @@ EXPORT_SYMBOL(zone_table); static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem" }; int min_free_kbytes = 1024; -unsigned long __meminitdata nr_kernel_pages; -unsigned long __meminitdata nr_all_pages; +unsigned long __initdata nr_kernel_pages; +unsigned long __initdata nr_all_pages; #ifdef CONFIG_DEBUG_VM static int page_outside_zone_boundaries(struct zone *zone, struct page *page) @@ -267,7 +266,7 @@ static inline void rmv_page_order(struct page *page) * satisfies the following equation: * P = B & ~(1 << O) * - * Assumption: *_mem_map is contiguous at least up to MAX_ORDER + * Assumption: *_mem_map is contigious at least up to MAX_ORDER */ static inline struct page * __page_find_buddy(struct page *page, unsigned long page_idx, unsigned int order) @@ -288,27 +287,22 @@ __find_combined_index(unsigned long page_idx, unsigned int order) * we can do coalesce a page and its buddy if * (a) the buddy is not in a hole && * (b) the buddy is in the buddy system && - * (c) a page and its buddy have the same order && - * (d) a page and its buddy are in the same zone. + * (c) a page and its buddy have the same order. * * For recording whether a page is in the buddy system, we use PG_buddy. * Setting, clearing, and testing PG_buddy is serialized by zone->lock. * * For recording page's order, we use page_private(page). */ -static inline int page_is_buddy(struct page *page, struct page *buddy, - int order) +static inline int page_is_buddy(struct page *page, int order) { #ifdef CONFIG_HOLES_IN_ZONE - if (!pfn_valid(page_to_pfn(buddy))) + if (!pfn_valid(page_to_pfn(page))) return 0; #endif - if (page_zone_id(page) != page_zone_id(buddy)) - return 0; - - if (PageBuddy(buddy) && page_order(buddy) == order) { - BUG_ON(page_count(buddy) != 0); + if (PageBuddy(page) && page_order(page) == order) { + BUG_ON(page_count(page) != 0); return 1; } return 0; @@ -359,7 +353,7 @@ static inline void __free_one_page(struct page *page, struct page *buddy; buddy = __page_find_buddy(page, page_idx, order); - if (!page_is_buddy(page, buddy, order)) + if (!page_is_buddy(buddy, order)) break; /* Move the buddy up one level. */ list_del(&buddy->lru); @@ -448,8 +442,8 @@ static void __free_pages_ok(struct page *page, unsigned int order) if (arch_free_page(page, order)) return; if (!PageHighMem(page)) - debug_check_no_locks_freed(page_address(page), - PAGE_SIZE<flags &= ~(1 << PG_uptodate | 1 << PG_error | 1 << PG_referenced | 1 << PG_arch_1 | - 1 << PG_fs_misc | 1 << PG_mappedtodisk); + 1 << PG_checked | 1 << PG_mappedtodisk); set_page_private(page, 0); set_page_refcounted(page); kernel_map_pages(page, 1 << order, 1); @@ -711,6 +705,27 @@ void drain_local_pages(void) } #endif /* CONFIG_PM */ +static void zone_statistics(struct zonelist *zonelist, struct zone *z, int cpu) +{ +#ifdef CONFIG_NUMA + pg_data_t *pg = z->zone_pgdat; + pg_data_t *orig = zonelist->zones[0]->zone_pgdat; + struct per_cpu_pageset *p; + + p = zone_pcp(z, cpu); + if (pg == orig) { + p->numa_hit++; + } else { + p->numa_miss++; + zone_pcp(zonelist->zones[0], cpu)->numa_foreign++; + } + if (pg == NODE_DATA(numa_node_id())) + p->local_node++; + else + p->other_node++; +#endif +} + /* * Free a 0-order page */ @@ -732,7 +747,7 @@ static void fastcall free_hot_cold_page(struct page *page, int cold) pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; local_irq_save(flags); - __count_vm_event(PGFREE); + __inc_page_state(pgfree); list_add(&page->lru, &pcp->list); pcp->count++; if (pcp->count >= pcp->high) { @@ -808,8 +823,8 @@ again: goto failed; } - __count_zone_vm_events(PGALLOC, zone, 1 << order); - zone_statistics(zonelist, zone); + __mod_page_state_zone(zone, pgalloc, 1 << order); + zone_statistics(zonelist, zone, cpu); local_irq_restore(flags); put_cpu(); @@ -939,7 +954,8 @@ restart: goto got_pg; do { - wakeup_kswapd(*z, order); + if (cpuset_zone_allowed(*z, gfp_mask|__GFP_HARDWALL)) + wakeup_kswapd(*z, order); } while (*(++z)); /* @@ -1213,6 +1229,141 @@ static void show_node(struct zone *zone) #define show_node(zone) do { } while (0) #endif +/* + * Accumulate the page_state information across all CPUs. + * The result is unavoidably approximate - it can change + * during and after execution of this function. + */ +static DEFINE_PER_CPU(struct page_state, page_states) = {0}; + +atomic_t nr_pagecache = ATOMIC_INIT(0); +EXPORT_SYMBOL(nr_pagecache); +#ifdef CONFIG_SMP +DEFINE_PER_CPU(long, nr_pagecache_local) = 0; +#endif + +static void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) +{ + unsigned cpu; + + memset(ret, 0, nr * sizeof(unsigned long)); + cpus_and(*cpumask, *cpumask, cpu_online_map); + + for_each_cpu_mask(cpu, *cpumask) { + unsigned long *in; + unsigned long *out; + unsigned off; + unsigned next_cpu; + + in = (unsigned long *)&per_cpu(page_states, cpu); + + next_cpu = next_cpu(cpu, *cpumask); + if (likely(next_cpu < NR_CPUS)) + prefetch(&per_cpu(page_states, next_cpu)); + + out = (unsigned long *)ret; + for (off = 0; off < nr; off++) + *out++ += *in++; + } +} + +void get_page_state_node(struct page_state *ret, int node) +{ + int nr; + cpumask_t mask = node_to_cpumask(node); + + nr = offsetof(struct page_state, GET_PAGE_STATE_LAST); + nr /= sizeof(unsigned long); + + __get_page_state(ret, nr+1, &mask); +} + +void get_page_state(struct page_state *ret) +{ + int nr; + cpumask_t mask = CPU_MASK_ALL; + + nr = offsetof(struct page_state, GET_PAGE_STATE_LAST); + nr /= sizeof(unsigned long); + + __get_page_state(ret, nr + 1, &mask); +} + +void get_full_page_state(struct page_state *ret) +{ + cpumask_t mask = CPU_MASK_ALL; + + __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long), &mask); +} + +unsigned long read_page_state_offset(unsigned long offset) +{ + unsigned long ret = 0; + int cpu; + + for_each_online_cpu(cpu) { + unsigned long in; + + in = (unsigned long)&per_cpu(page_states, cpu) + offset; + ret += *((unsigned long *)in); + } + return ret; +} + +void __mod_page_state_offset(unsigned long offset, unsigned long delta) +{ + void *ptr; + + ptr = &__get_cpu_var(page_states); + *(unsigned long *)(ptr + offset) += delta; +} +EXPORT_SYMBOL(__mod_page_state_offset); + +void mod_page_state_offset(unsigned long offset, unsigned long delta) +{ + unsigned long flags; + void *ptr; + + local_irq_save(flags); + ptr = &__get_cpu_var(page_states); + *(unsigned long *)(ptr + offset) += delta; + local_irq_restore(flags); +} +EXPORT_SYMBOL(mod_page_state_offset); + +void __get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free, struct pglist_data *pgdat) +{ + struct zone *zones = pgdat->node_zones; + int i; + + *active = 0; + *inactive = 0; + *free = 0; + for (i = 0; i < MAX_NR_ZONES; i++) { + *active += zones[i].nr_active; + *inactive += zones[i].nr_inactive; + *free += zones[i].free_pages; + } +} + +void get_zone_counts(unsigned long *active, + unsigned long *inactive, unsigned long *free) +{ + struct pglist_data *pgdat; + + *active = 0; + *inactive = 0; + *free = 0; + for_each_online_pgdat(pgdat) { + unsigned long l, m, n; + __get_zone_counts(&l, &m, &n, pgdat); + *active += l; + *inactive += m; + *free += n; + } +} + void si_meminfo(struct sysinfo *val) { val->totalram = totalram_pages; @@ -1257,6 +1408,7 @@ void si_meminfo_node(struct sysinfo *val, int nid) */ void show_free_areas(void) { + struct page_state ps; int cpu, temperature; unsigned long active; unsigned long inactive; @@ -1288,6 +1440,7 @@ void show_free_areas(void) } } + get_page_state(&ps); get_zone_counts(&active, &inactive, &free); printk("Free pages: %11ukB (%ukB HighMem)\n", @@ -1298,13 +1451,13 @@ void show_free_areas(void) "unstable:%lu free:%u slab:%lu mapped:%lu pagetables:%lu\n", active, inactive, - global_page_state(NR_FILE_DIRTY), - global_page_state(NR_WRITEBACK), - global_page_state(NR_UNSTABLE_NFS), + ps.nr_dirty, + ps.nr_writeback, + ps.nr_unstable, nr_free_pages(), - global_page_state(NR_SLAB), - global_page_state(NR_FILE_MAPPED), - global_page_state(NR_PAGETABLE)); + ps.nr_slab, + ps.nr_mapped, + ps.nr_page_table_pages); for_each_zone(zone) { int i; @@ -1339,7 +1492,7 @@ void show_free_areas(void) } for_each_zone(zone) { - unsigned long nr[MAX_ORDER], flags, order, total = 0; + unsigned long nr, flags, order, total = 0; show_node(zone); printk("%s: ", zone->name); @@ -1350,12 +1503,11 @@ void show_free_areas(void) spin_lock_irqsave(&zone->lock, flags); for (order = 0; order < MAX_ORDER; order++) { - nr[order] = zone->free_area[order].nr_free; - total += nr[order] << order; + nr = zone->free_area[order].nr_free; + total += nr << order; + printk("%lu*%lukB ", nr, K(1UL) << order); } spin_unlock_irqrestore(&zone->lock, flags); - for (order = 0; order < MAX_ORDER; order++) - printk("%lu*%lukB ", nr[order], K(1UL) << order); printk("= %lukB\n", K(total)); } @@ -1367,7 +1519,7 @@ void show_free_areas(void) * * Add all populated zones of a node to the zonelist. */ -static int __meminit build_zonelists_node(pg_data_t *pgdat, +static int __init build_zonelists_node(pg_data_t *pgdat, struct zonelist *zonelist, int nr_zones, int zone_type) { struct zone *zone; @@ -1403,7 +1555,7 @@ static inline int highest_zone(int zone_bits) #ifdef CONFIG_NUMA #define MAX_NODE_LOAD (num_online_nodes()) -static int __meminitdata node_load[MAX_NUMNODES]; +static int __initdata node_load[MAX_NUMNODES]; /** * find_next_best_node - find the next node that should appear in a given node's fallback list * @node: node whose fallback list we're appending @@ -1418,7 +1570,7 @@ static int __meminitdata node_load[MAX_NUMNODES]; * on them otherwise. * It returns -1 if no node is found. */ -static int __meminit find_next_best_node(int node, nodemask_t *used_node_mask) +static int __init find_next_best_node(int node, nodemask_t *used_node_mask) { int n, val; int min_val = INT_MAX; @@ -1464,7 +1616,7 @@ static int __meminit find_next_best_node(int node, nodemask_t *used_node_mask) return best_node; } -static void __meminit build_zonelists(pg_data_t *pgdat) +static void __init build_zonelists(pg_data_t *pgdat) { int i, j, k, node, local_node; int prev_node, load; @@ -1516,7 +1668,7 @@ static void __meminit build_zonelists(pg_data_t *pgdat) #else /* CONFIG_NUMA */ -static void __meminit build_zonelists(pg_data_t *pgdat) +static void __init build_zonelists(pg_data_t *pgdat) { int i, j, k, node, local_node; @@ -1554,29 +1706,14 @@ static void __meminit build_zonelists(pg_data_t *pgdat) #endif /* CONFIG_NUMA */ -/* return values int ....just for stop_machine_run() */ -static int __meminit __build_all_zonelists(void *dummy) +void __init build_all_zonelists(void) { - int nid; - for_each_online_node(nid) - build_zonelists(NODE_DATA(nid)); - return 0; -} + int i; -void __meminit build_all_zonelists(void) -{ - if (system_state == SYSTEM_BOOTING) { - __build_all_zonelists(0); - cpuset_init_current_mems_allowed(); - } else { - /* we have to stop all cpus to guaranntee there is no user - of zonelist */ - stop_machine_run(__build_all_zonelists, NULL, NR_CPUS); - /* cpuset refresh routine should be here */ - } - vm_total_pages = nr_free_pagecache_pages(); - printk("Built %i zonelists. Total pages: %ld\n", - num_online_nodes(), vm_total_pages); + for_each_online_node(i) + build_zonelists(NODE_DATA(i)); + printk("Built %i zonelists\n", num_online_nodes()); + cpuset_init_current_mems_allowed(); } /* @@ -1592,8 +1729,7 @@ void __meminit build_all_zonelists(void) */ #define PAGES_PER_WAITQUEUE 256 -#ifndef CONFIG_MEMORY_HOTPLUG -static inline unsigned long wait_table_hash_nr_entries(unsigned long pages) +static inline unsigned long wait_table_size(unsigned long pages) { unsigned long size = 1; @@ -1611,29 +1747,6 @@ static inline unsigned long wait_table_hash_nr_entries(unsigned long pages) return max(size, 4UL); } -#else -/* - * A zone's size might be changed by hot-add, so it is not possible to determine - * a suitable size for its wait_table. So we use the maximum size now. - * - * The max wait table size = 4096 x sizeof(wait_queue_head_t). ie: - * - * i386 (preemption config) : 4096 x 16 = 64Kbyte. - * ia64, x86-64 (no preemption): 4096 x 20 = 80Kbyte. - * ia64, x86-64 (preemption) : 4096 x 24 = 96Kbyte. - * - * The maximum entries are prepared when a zone's memory is (512K + 256) pages - * or more by the traditional way. (See above). It equals: - * - * i386, x86-64, powerpc(4K page size) : = ( 2G + 1M)byte. - * ia64(16K page size) : = ( 8G + 4M)byte. - * powerpc (64K page size) : = (32G +16M)byte. - */ -static inline unsigned long wait_table_hash_nr_entries(unsigned long pages) -{ - return 4096UL; -} -#endif /* * This is an integer logarithm so that shifts can be used later @@ -1681,8 +1794,6 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, for (pfn = start_pfn; pfn < end_pfn; pfn++) { if (!early_pfn_valid(pfn)) continue; - if (!early_pfn_in_nid(pfn, nid)) - continue; page = pfn_to_page(pfn); set_page_links(page, zone, nid, pfn); init_page_count(page); @@ -1855,14 +1966,12 @@ static inline void free_zone_pagesets(int cpu) for_each_zone(zone) { struct per_cpu_pageset *pset = zone_pcp(zone, cpu); - /* Free per_cpu_pageset if it is slab allocated */ - if (pset != &boot_pageset[cpu]) - kfree(pset); zone_pcp(zone, cpu) = NULL; + kfree(pset); } } -static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb, +static int pageset_cpuup_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { @@ -1884,7 +1993,7 @@ static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb, return ret; } -static struct notifier_block __cpuinitdata pageset_notifier = +static struct notifier_block pageset_notifier = { &pageset_cpuup_callback, NULL, 0 }; void __init setup_per_cpu_pageset(void) @@ -1903,46 +2012,23 @@ void __init setup_per_cpu_pageset(void) #endif static __meminit -int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) +void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) { int i; struct pglist_data *pgdat = zone->zone_pgdat; - size_t alloc_size; /* * The per-page waitqueue mechanism uses hashed waitqueues * per zone. */ - zone->wait_table_hash_nr_entries = - wait_table_hash_nr_entries(zone_size_pages); - zone->wait_table_bits = - wait_table_bits(zone->wait_table_hash_nr_entries); - alloc_size = zone->wait_table_hash_nr_entries - * sizeof(wait_queue_head_t); - - if (system_state == SYSTEM_BOOTING) { - zone->wait_table = (wait_queue_head_t *) - alloc_bootmem_node(pgdat, alloc_size); - } else { - /* - * This case means that a zone whose size was 0 gets new memory - * via memory hot-add. - * But it may be the case that a new node was hot-added. In - * this case vmalloc() will not be able to use this new node's - * memory - this wait_table must be initialized to use this new - * node itself as well. - * To use this new node's memory, further consideration will be - * necessary. - */ - zone->wait_table = (wait_queue_head_t *)vmalloc(alloc_size); - } - if (!zone->wait_table) - return -ENOMEM; + zone->wait_table_size = wait_table_size(zone_size_pages); + zone->wait_table_bits = wait_table_bits(zone->wait_table_size); + zone->wait_table = (wait_queue_head_t *) + alloc_bootmem_node(pgdat, zone->wait_table_size + * sizeof(wait_queue_head_t)); - for(i = 0; i < zone->wait_table_hash_nr_entries; ++i) + for(i = 0; i < zone->wait_table_size; ++i) init_waitqueue_head(zone->wait_table + i); - - return 0; } static __meminit void zone_pcp_init(struct zone *zone) @@ -1964,15 +2050,12 @@ static __meminit void zone_pcp_init(struct zone *zone) zone->name, zone->present_pages, batch); } -__meminit int init_currently_empty_zone(struct zone *zone, - unsigned long zone_start_pfn, - unsigned long size) +static __meminit void init_currently_empty_zone(struct zone *zone, + unsigned long zone_start_pfn, unsigned long size) { struct pglist_data *pgdat = zone->zone_pgdat; - int ret; - ret = zone_wait_table_init(zone, size); - if (ret) - return ret; + + zone_wait_table_init(zone, size); pgdat->nr_zones = zone_idx(zone) + 1; zone->zone_start_pfn = zone_start_pfn; @@ -1980,8 +2063,6 @@ __meminit int init_currently_empty_zone(struct zone *zone, memmap_init(size, pgdat->node_id, zone_idx(zone), zone_start_pfn); zone_init_free_lists(pgdat, zone, zone->spanned_pages); - - return 0; } /* @@ -1990,13 +2071,12 @@ __meminit int init_currently_empty_zone(struct zone *zone, * - mark all memory queues empty * - clear the memory bitmaps */ -static void __meminit free_area_init_core(struct pglist_data *pgdat, +static void __init free_area_init_core(struct pglist_data *pgdat, unsigned long *zones_size, unsigned long *zholes_size) { unsigned long j; int nid = pgdat->node_id; unsigned long zone_start_pfn = pgdat->node_start_pfn; - int ret; pgdat_resize_init(pgdat); pgdat->nr_zones = 0; @@ -2017,11 +2097,6 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, zone->spanned_pages = size; zone->present_pages = realsize; -#ifdef CONFIG_NUMA - zone->min_unmapped_ratio = (realsize*sysctl_min_unmapped_ratio) - / 100; - zone->min_slab_pages = (realsize * sysctl_min_slab_ratio) / 100; -#endif zone->name = zone_names[j]; spin_lock_init(&zone->lock); spin_lock_init(&zone->lru_lock); @@ -2029,7 +2104,7 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, zone->zone_pgdat = pgdat; zone->free_pages = 0; - zone->prev_priority = DEF_PRIORITY; + zone->temp_priority = zone->prev_priority = DEF_PRIORITY; zone_pcp_init(zone); INIT_LIST_HEAD(&zone->active_list); @@ -2038,14 +2113,12 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, zone->nr_scan_inactive = 0; zone->nr_active = 0; zone->nr_inactive = 0; - zap_zone_vm_stats(zone); atomic_set(&zone->reclaim_in_progress, 0); if (!size) continue; zonetable_add(zone, nid, j, zone_start_pfn, size); - ret = init_currently_empty_zone(zone, zone_start_pfn, size); - BUG_ON(ret); + init_currently_empty_zone(zone, zone_start_pfn, size); zone_start_pfn += size; } } @@ -2086,7 +2159,7 @@ static void __init alloc_node_mem_map(struct pglist_data *pgdat) #endif /* CONFIG_FLAT_NODE_MEM_MAP */ } -void __meminit free_area_init_node(int nid, struct pglist_data *pgdat, +void __init free_area_init_node(int nid, struct pglist_data *pgdat, unsigned long *zones_size, unsigned long node_start_pfn, unsigned long *zholes_size) { @@ -2112,18 +2185,307 @@ void __init free_area_init(unsigned long *zones_size) __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL); } +#ifdef CONFIG_PROC_FS + +#include + +static void *frag_start(struct seq_file *m, loff_t *pos) +{ + pg_data_t *pgdat; + loff_t node = *pos; + for (pgdat = first_online_pgdat(); + pgdat && node; + pgdat = next_online_pgdat(pgdat)) + --node; + + return pgdat; +} + +static void *frag_next(struct seq_file *m, void *arg, loff_t *pos) +{ + pg_data_t *pgdat = (pg_data_t *)arg; + + (*pos)++; + return next_online_pgdat(pgdat); +} + +static void frag_stop(struct seq_file *m, void *arg) +{ +} + +/* + * This walks the free areas for each zone. + */ +static int frag_show(struct seq_file *m, void *arg) +{ + pg_data_t *pgdat = (pg_data_t *)arg; + struct zone *zone; + struct zone *node_zones = pgdat->node_zones; + unsigned long flags; + int order; + + for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) { + if (!populated_zone(zone)) + continue; + + spin_lock_irqsave(&zone->lock, flags); + seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name); + for (order = 0; order < MAX_ORDER; ++order) + seq_printf(m, "%6lu ", zone->free_area[order].nr_free); + spin_unlock_irqrestore(&zone->lock, flags); + seq_putc(m, '\n'); + } + return 0; +} + +struct seq_operations fragmentation_op = { + .start = frag_start, + .next = frag_next, + .stop = frag_stop, + .show = frag_show, +}; + +/* + * Output information about zones in @pgdat. + */ +static int zoneinfo_show(struct seq_file *m, void *arg) +{ + pg_data_t *pgdat = arg; + struct zone *zone; + struct zone *node_zones = pgdat->node_zones; + unsigned long flags; + + for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; zone++) { + int i; + + if (!populated_zone(zone)) + continue; + + spin_lock_irqsave(&zone->lock, flags); + seq_printf(m, "Node %d, zone %8s", pgdat->node_id, zone->name); + seq_printf(m, + "\n pages free %lu" + "\n min %lu" + "\n low %lu" + "\n high %lu" + "\n active %lu" + "\n inactive %lu" + "\n scanned %lu (a: %lu i: %lu)" + "\n spanned %lu" + "\n present %lu", + zone->free_pages, + zone->pages_min, + zone->pages_low, + zone->pages_high, + zone->nr_active, + zone->nr_inactive, + zone->pages_scanned, + zone->nr_scan_active, zone->nr_scan_inactive, + zone->spanned_pages, + zone->present_pages); + seq_printf(m, + "\n protection: (%lu", + zone->lowmem_reserve[0]); + for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++) + seq_printf(m, ", %lu", zone->lowmem_reserve[i]); + seq_printf(m, + ")" + "\n pagesets"); + for_each_online_cpu(i) { + struct per_cpu_pageset *pageset; + int j; + + pageset = zone_pcp(zone, i); + for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { + if (pageset->pcp[j].count) + break; + } + if (j == ARRAY_SIZE(pageset->pcp)) + continue; + for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { + seq_printf(m, + "\n cpu: %i pcp: %i" + "\n count: %i" + "\n high: %i" + "\n batch: %i", + i, j, + pageset->pcp[j].count, + pageset->pcp[j].high, + pageset->pcp[j].batch); + } +#ifdef CONFIG_NUMA + seq_printf(m, + "\n numa_hit: %lu" + "\n numa_miss: %lu" + "\n numa_foreign: %lu" + "\n interleave_hit: %lu" + "\n local_node: %lu" + "\n other_node: %lu", + pageset->numa_hit, + pageset->numa_miss, + pageset->numa_foreign, + pageset->interleave_hit, + pageset->local_node, + pageset->other_node); +#endif + } + seq_printf(m, + "\n all_unreclaimable: %u" + "\n prev_priority: %i" + "\n temp_priority: %i" + "\n start_pfn: %lu", + zone->all_unreclaimable, + zone->prev_priority, + zone->temp_priority, + zone->zone_start_pfn); + spin_unlock_irqrestore(&zone->lock, flags); + seq_putc(m, '\n'); + } + return 0; +} + +struct seq_operations zoneinfo_op = { + .start = frag_start, /* iterate over all zones. The same as in + * fragmentation. */ + .next = frag_next, + .stop = frag_stop, + .show = zoneinfo_show, +}; + +static char *vmstat_text[] = { + "nr_dirty", + "nr_writeback", + "nr_unstable", + "nr_page_table_pages", + "nr_mapped", + "nr_slab", + + "pgpgin", + "pgpgout", + "pswpin", + "pswpout", + + "pgalloc_high", + "pgalloc_normal", + "pgalloc_dma32", + "pgalloc_dma", + + "pgfree", + "pgactivate", + "pgdeactivate", + + "pgfault", + "pgmajfault", + + "pgrefill_high", + "pgrefill_normal", + "pgrefill_dma32", + "pgrefill_dma", + + "pgsteal_high", + "pgsteal_normal", + "pgsteal_dma32", + "pgsteal_dma", + + "pgscan_kswapd_high", + "pgscan_kswapd_normal", + "pgscan_kswapd_dma32", + "pgscan_kswapd_dma", + + "pgscan_direct_high", + "pgscan_direct_normal", + "pgscan_direct_dma32", + "pgscan_direct_dma", + + "pginodesteal", + "slabs_scanned", + "kswapd_steal", + "kswapd_inodesteal", + "pageoutrun", + "allocstall", + + "pgrotated", + "nr_bounce", +}; + +static void *vmstat_start(struct seq_file *m, loff_t *pos) +{ + struct page_state *ps; + + if (*pos >= ARRAY_SIZE(vmstat_text)) + return NULL; + + ps = kmalloc(sizeof(*ps), GFP_KERNEL); + m->private = ps; + if (!ps) + return ERR_PTR(-ENOMEM); + get_full_page_state(ps); + ps->pgpgin /= 2; /* sectors -> kbytes */ + ps->pgpgout /= 2; + return (unsigned long *)ps + *pos; +} + +static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos) +{ + (*pos)++; + if (*pos >= ARRAY_SIZE(vmstat_text)) + return NULL; + return (unsigned long *)m->private + *pos; +} + +static int vmstat_show(struct seq_file *m, void *arg) +{ + unsigned long *l = arg; + unsigned long off = l - (unsigned long *)m->private; + + seq_printf(m, "%s %lu\n", vmstat_text[off], *l); + return 0; +} + +static void vmstat_stop(struct seq_file *m, void *arg) +{ + kfree(m->private); + m->private = NULL; +} + +struct seq_operations vmstat_op = { + .start = vmstat_start, + .next = vmstat_next, + .stop = vmstat_stop, + .show = vmstat_show, +}; + +#endif /* CONFIG_PROC_FS */ + #ifdef CONFIG_HOTPLUG_CPU static int page_alloc_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { int cpu = (unsigned long)hcpu; + long *count; + unsigned long *src, *dest; if (action == CPU_DEAD) { + int i; + + /* Drain local pagecache count. */ + count = &per_cpu(nr_pagecache_local, cpu); + atomic_add(*count, &nr_pagecache); + *count = 0; local_irq_disable(); __drain_pages(cpu); - vm_events_fold_cpu(cpu); + + /* Add dead cpu's page_states to our own. */ + dest = (unsigned long *)&__get_cpu_var(page_states); + src = (unsigned long *)&per_cpu(page_states, cpu); + + for (i = 0; i < sizeof(struct page_state)/sizeof(unsigned long); + i++) { + dest[i] += src[i]; + src[i] = 0; + } + local_irq_enable(); - refresh_cpu_vm_stats(cpu); } return NOTIFY_OK; } @@ -2315,40 +2677,6 @@ int min_free_kbytes_sysctl_handler(ctl_table *table, int write, return 0; } -#ifdef CONFIG_NUMA -int sysctl_min_unmapped_ratio_sysctl_handler(ctl_table *table, int write, - struct file *file, void __user *buffer, size_t *length, loff_t *ppos) -{ - struct zone *zone; - int rc; - - rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); - if (rc) - return rc; - - for_each_zone(zone) - zone->min_unmapped_ratio = (zone->present_pages * - sysctl_min_unmapped_ratio) / 100; - return 0; -} - -int sysctl_min_slab_ratio_sysctl_handler(ctl_table *table, int write, - struct file *file, void __user *buffer, size_t *length, loff_t *ppos) -{ - struct zone *zone; - int rc; - - rc = proc_dointvec_minmax(table, write, file, buffer, length, ppos); - if (rc) - return rc; - - for_each_zone(zone) - zone->min_slab_pages = (zone->present_pages * - sysctl_min_slab_ratio) / 100; - return 0; -} -#endif - /* * lowmem_reserve_ratio_sysctl_handler - just a wrapper around * proc_dointvec() so that we can call setup_per_zone_lowmem_reserve() @@ -2483,14 +2811,42 @@ void *__init alloc_large_system_hash(const char *tablename, } #ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE +/* + * pfn <-> page translation. out-of-line version. + * (see asm-generic/memory_model.h) + */ +#if defined(CONFIG_FLATMEM) struct page *pfn_to_page(unsigned long pfn) { - return __pfn_to_page(pfn); + return mem_map + (pfn - ARCH_PFN_OFFSET); } unsigned long page_to_pfn(struct page *page) { - return __page_to_pfn(page); + return (page - mem_map) + ARCH_PFN_OFFSET; +} +#elif defined(CONFIG_DISCONTIGMEM) +struct page *pfn_to_page(unsigned long pfn) +{ + int nid = arch_pfn_to_nid(pfn); + return NODE_DATA(nid)->node_mem_map + arch_local_page_offset(pfn,nid); +} +unsigned long page_to_pfn(struct page *page) +{ + struct pglist_data *pgdat = NODE_DATA(page_to_nid(page)); + return (page - pgdat->node_mem_map) + pgdat->node_start_pfn; +} +#elif defined(CONFIG_SPARSEMEM) +struct page *pfn_to_page(unsigned long pfn) +{ + return __section_mem_map_addr(__pfn_to_section(pfn)) + pfn; +} + +unsigned long page_to_pfn(struct page *page) +{ + long section_id = page_to_section(page); + return page - __section_mem_map_addr(__nr_to_section(section_id)); } +#endif /* CONFIG_FLATMEM/DISCONTIGMME/SPARSEMEM */ EXPORT_SYMBOL(pfn_to_page); EXPORT_SYMBOL(page_to_pfn); #endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */ diff --git a/mm/page_io.c b/mm/page_io.c index a0ea98f25..bb2b0d538 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -59,7 +59,7 @@ static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err) return 0; } -int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err) +static int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err) { const int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); struct page *page = bio->bi_io_vec[0].bv_page; @@ -101,7 +101,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc) } if (wbc->sync_mode == WB_SYNC_ALL) rw |= (1 << BIO_RW_SYNC); - count_vm_event(PSWPOUT); + inc_page_state(pswpout); set_page_writeback(page); unlock_page(page); submit_bio(rw, bio); @@ -123,7 +123,7 @@ int swap_readpage(struct file *file, struct page *page) ret = -ENOMEM; goto out; } - count_vm_event(PSWPIN); + inc_page_state(pswpin); submit_bio(READ, bio); out: return ret; @@ -137,12 +137,10 @@ out: * We use end_swap_bio_read() even for writes, because it happens to do what * we want. */ -int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page, - struct bio **bio_chain) +int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page) { struct bio *bio; int ret = 0; - int bio_rw; lock_page(page); @@ -153,22 +151,11 @@ int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page, goto out; } - bio_rw = rw; - if (!bio_chain) - bio_rw |= (1 << BIO_RW_SYNC); - if (bio_chain) - bio_get(bio); - submit_bio(bio_rw, bio); - if (bio_chain == NULL) { - wait_on_page_locked(page); - - if (!PageUptodate(page) || PageError(page)) - ret = -EIO; - } - if (bio_chain) { - bio->bi_private = *bio_chain; - *bio_chain = bio; - } + submit_bio(rw | (1 << BIO_RW_SYNC), bio); + wait_on_page_locked(page); + + if (!PageUptodate(page) || PageError(page)) + ret = -EIO; out: return ret; } diff --git a/mm/pdflush.c b/mm/pdflush.c index b02102fee..4842716d1 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c @@ -201,7 +201,8 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0) unsigned long flags; int ret = 0; - BUG_ON(fn == NULL); /* Hard to diagnose if it's deferred */ + if (fn == NULL) + BUG(); /* Hard to diagnose if it's deferred */ spin_lock_irqsave(&pdflush_lock, flags); if (list_empty(&pdflush_list)) { diff --git a/mm/readahead.c b/mm/readahead.c index 54d339321..0f142a409 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -14,7 +14,6 @@ #include #include #include -#include void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) { @@ -118,28 +117,9 @@ static inline unsigned long get_next_ra_size(struct file_ra_state *ra) #define list_to_page(head) (list_entry((head)->prev, struct page, lru)) -/* - * see if a page needs releasing upon read_cache_pages() failure - * - the caller of read_cache_pages() may have set PG_private before calling, - * such as the NFS fs marking pages that are cached locally on disk, thus we - * need to give the fs a chance to clean up in the event of an error - */ -static void read_cache_pages_release_page(struct address_space *mapping, - struct page *page) -{ - if (PagePrivate(page)) { - if (TestSetPageLocked(page)) - BUG(); - page->mapping = mapping; - try_to_release_page(page, GFP_KERNEL); - page->mapping = NULL; - unlock_page(page); - } - page_cache_release(page); -} - /** - * read_cache_pages - populate an address space with some pages & start reads against them + * read_cache_pages - populate an address space with some pages, and + * start reads against them. * @mapping: the address_space * @pages: The address of a list_head which contains the target pages. These * pages have their ->index populated and are otherwise uninitialised. @@ -161,7 +141,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages, page = list_to_page(pages); list_del(&page->lru); if (add_to_page_cache(page, mapping, page->index, GFP_KERNEL)) { - read_cache_pages_release_page(mapping, page); + page_cache_release(page); continue; } ret = filler(data, page); @@ -173,7 +153,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages, victim = list_to_page(pages); list_del(&victim->lru); - read_cache_pages_release_page(mapping, victim); + page_cache_release(victim); } break; } @@ -202,11 +182,14 @@ static int read_pages(struct address_space *mapping, struct file *filp, list_del(&page->lru); if (!add_to_page_cache(page, mapping, page->index, GFP_KERNEL)) { - mapping->a_ops->readpage(filp, page); - if (!pagevec_add(&lru_pvec, page)) - __pagevec_lru_add(&lru_pvec); - } else - page_cache_release(page); + ret = mapping->a_ops->readpage(filp, page); + if (ret != AOP_TRUNCATED_PAGE) { + if (!pagevec_add(&lru_pvec, page)) + __pagevec_lru_add(&lru_pvec); + continue; + } /* else fall through to release */ + } + page_cache_release(page); } pagevec_lru_add(&lru_pvec); ret = 0; @@ -411,8 +394,8 @@ int do_page_cache_readahead(struct address_space *mapping, struct file *filp, * Read 'nr_to_read' pages starting at page 'offset'. If the flag 'block' * is set wait till the read completes. Otherwise attempt to read without * blocking. - * Returns 1 meaning 'success' if read is successful without switching off - * readahead mode. Otherwise return failure. + * Returns 1 meaning 'success' if read is succesfull without switching off + * readhaead mode. Otherwise return failure. */ static int blockable_page_cache_readahead(struct address_space *mapping, struct file *filp, diff --git a/mm/rmap.c b/mm/rmap.c index 5d507c324..a4658b4e4 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -53,8 +53,6 @@ #include #include #include -#include -#include #include #include @@ -106,7 +104,7 @@ int anon_vma_prepare(struct vm_area_struct *vma) spin_lock(&mm->page_table_lock); if (likely(!vma->anon_vma)) { vma->anon_vma = anon_vma; - list_add_tail(&vma->anon_vma_node, &anon_vma->head); + list_add(&vma->anon_vma_node, &anon_vma->head); allocated = NULL; } spin_unlock(&mm->page_table_lock); @@ -130,7 +128,7 @@ void __anon_vma_link(struct vm_area_struct *vma) struct anon_vma *anon_vma = vma->anon_vma; if (anon_vma) { - list_add_tail(&vma->anon_vma_node, &anon_vma->head); + list_add(&vma->anon_vma_node, &anon_vma->head); validate_anon_vma(vma); } } @@ -141,7 +139,7 @@ void anon_vma_link(struct vm_area_struct *vma) if (anon_vma) { spin_lock(&anon_vma->lock); - list_add_tail(&vma->anon_vma_node, &anon_vma->head); + list_add(&vma->anon_vma_node, &anon_vma->head); validate_anon_vma(vma); spin_unlock(&anon_vma->lock); } @@ -208,6 +206,44 @@ out: return anon_vma; } +#ifdef CONFIG_MIGRATION +/* + * Remove an anonymous page from swap replacing the swap pte's + * through real pte's pointing to valid pages and then releasing + * the page from the swap cache. + * + * Must hold page lock on page and mmap_sem of one vma that contains + * the page. + */ +void remove_from_swap(struct page *page) +{ + struct anon_vma *anon_vma; + struct vm_area_struct *vma; + unsigned long mapping; + + if (!PageSwapCache(page)) + return; + + mapping = (unsigned long)page->mapping; + + if (!mapping || (mapping & PAGE_MAPPING_ANON) == 0) + return; + + /* + * We hold the mmap_sem lock. So no need to call page_lock_anon_vma. + */ + anon_vma = (struct anon_vma *) (mapping - PAGE_MAPPING_ANON); + spin_lock(&anon_vma->lock); + + list_for_each_entry(vma, &anon_vma->head, anon_vma_node) + remove_vma_swap(vma, page); + + spin_unlock(&anon_vma->lock); + delete_from_swap_cache(page); +} +EXPORT_SYMBOL(remove_from_swap); +#endif + /* * At what user virtual address is page expected in vma? */ @@ -437,71 +473,6 @@ int page_referenced(struct page *page, int is_locked) return referenced; } -static int page_mkclean_one(struct page *page, struct vm_area_struct *vma) -{ - struct mm_struct *mm = vma->vm_mm; - unsigned long address; - pte_t *pte, entry; - spinlock_t *ptl; - int ret = 0; - - address = vma_address(page, vma); - if (address == -EFAULT) - goto out; - - pte = page_check_address(page, mm, address, &ptl); - if (!pte) - goto out; - - if (!pte_dirty(*pte) && !pte_write(*pte)) - goto unlock; - - entry = ptep_get_and_clear(mm, address, pte); - entry = pte_mkclean(entry); - entry = pte_wrprotect(entry); - ptep_establish(vma, address, pte, entry); - lazy_mmu_prot_update(entry); - ret = 1; - -unlock: - pte_unmap_unlock(pte, ptl); -out: - return ret; -} - -static int page_mkclean_file(struct address_space *mapping, struct page *page) -{ - pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); - struct vm_area_struct *vma; - struct prio_tree_iter iter; - int ret = 0; - - BUG_ON(PageAnon(page)); - - spin_lock(&mapping->i_mmap_lock); - vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { - if (vma->vm_flags & VM_SHARED) - ret += page_mkclean_one(page, vma); - } - spin_unlock(&mapping->i_mmap_lock); - return ret; -} - -int page_mkclean(struct page *page) -{ - int ret = 0; - - WARN_ON_ONCE(!PageLocked(page)); - - if (page_mapped(page)) { - struct address_space *mapping = page_mapping(page); - if (mapping) - ret = page_mkclean_file(mapping, page); - } - - return ret; -} - /** * page_set_anon_rmap - setup new anonymous rmap * @page: the page to add the mapping to @@ -523,7 +494,7 @@ static void __page_set_anon_rmap(struct page *page, * nr_mapped state can be updated without turning off * interrupts because it is not modified via interrupt. */ - __inc_zone_page_state(page, NR_ANON_PAGES); + __inc_page_state(nr_mapped); } /** @@ -567,7 +538,7 @@ void page_add_new_anon_rmap(struct page *page, void page_add_file_rmap(struct page *page) { if (atomic_inc_and_test(&page->_mapcount)) - __inc_zone_page_state(page, NR_FILE_MAPPED); + __inc_page_state(nr_mapped); } /** @@ -576,18 +547,18 @@ void page_add_file_rmap(struct page *page) * * The caller needs to hold the pte lock. */ -void page_remove_rmap(struct page *page, struct vm_area_struct *vma) +void page_remove_rmap(struct page *page) { if (atomic_add_negative(-1, &page->_mapcount)) { +#ifdef CONFIG_DEBUG_VM if (unlikely(page_mapcount(page) < 0)) { printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page)); printk (KERN_EMERG " page->flags = %lx\n", page->flags); printk (KERN_EMERG " page->count = %x\n", page_count(page)); printk (KERN_EMERG " page->mapping = %p\n", page->mapping); - if (vma->vm_ops) - print_symbol (KERN_EMERG " vma->vm_ops->nopage = %s\n", (unsigned long)vma->vm_ops->nopage); - BUG(); } +#endif + BUG_ON(page_mapcount(page) < 0); /* * It would be tidy to reset the PageAnon mapping here, * but that might overwrite a racing page_add_anon_rmap @@ -599,8 +570,7 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma) */ if (page_test_and_clear_dirty(page)) set_page_dirty(page); - __dec_zone_page_state(page, - PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED); + __dec_page_state(nr_mapped); } } @@ -609,7 +579,7 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma) * repeatedly from either try_to_unmap_anon or try_to_unmap_file. */ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, - int migration) + int ignore_refs) { struct mm_struct *mm = vma->vm_mm; unsigned long address; @@ -631,8 +601,9 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, * If it's recently referenced (perhaps page_referenced * skipped over this mm) then we should reactivate it. */ - if (!migration && ((vma->vm_flags & VM_LOCKED) || - (ptep_clear_flush_young(vma, address, pte)))) { + if ((vma->vm_flags & VM_LOCKED) || + (ptep_clear_flush_young(vma, address, pte) + && !ignore_refs)) { ret = SWAP_FAIL; goto out_unmap; } @@ -650,46 +621,25 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, if (PageAnon(page)) { swp_entry_t entry = { .val = page_private(page) }; - - if (PageSwapCache(page)) { - /* - * Store the swap location in the pte. - * See handle_pte_fault() ... - */ - swap_duplicate(entry); - if (list_empty(&mm->mmlist)) { - spin_lock(&mmlist_lock); - if (list_empty(&mm->mmlist)) - list_add(&mm->mmlist, &init_mm.mmlist); - spin_unlock(&mmlist_lock); - } - dec_mm_counter(mm, anon_rss); -#ifdef CONFIG_MIGRATION - } else { - /* - * Store the pfn of the page in a special migration - * pte. do_swap_page() will wait until the migration - * pte is removed and then restart fault handling. - */ - BUG_ON(!migration); - entry = make_migration_entry(page, pte_write(pteval)); -#endif + /* + * Store the swap location in the pte. + * See handle_pte_fault() ... + */ + BUG_ON(!PageSwapCache(page)); + swap_duplicate(entry); + if (list_empty(&mm->mmlist)) { + spin_lock(&mmlist_lock); + if (list_empty(&mm->mmlist)) + list_add(&mm->mmlist, &init_mm.mmlist); + spin_unlock(&mmlist_lock); } set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); BUG_ON(pte_file(*pte)); + dec_mm_counter(mm, anon_rss); } else -#ifdef CONFIG_MIGRATION - if (migration) { - /* Establish migration entry for a file page */ - swp_entry_t entry; - entry = make_migration_entry(page, pte_write(pteval)); - set_pte_at(mm, address, pte, swp_entry_to_pte(entry)); - } else -#endif dec_mm_counter(mm, file_rss); - - page_remove_rmap(page, vma); + page_remove_rmap(page); page_cache_release(page); out_unmap: @@ -779,7 +729,7 @@ static void try_to_unmap_cluster(unsigned long cursor, if (pte_dirty(pteval)) set_page_dirty(page); - page_remove_rmap(page, vma); + page_remove_rmap(page); page_cache_release(page); dec_mm_counter(mm, file_rss); (*mapcount)--; @@ -787,7 +737,7 @@ static void try_to_unmap_cluster(unsigned long cursor, pte_unmap_unlock(pte - 1, ptl); } -static int try_to_unmap_anon(struct page *page, int migration) +static int try_to_unmap_anon(struct page *page, int ignore_refs) { struct anon_vma *anon_vma; struct vm_area_struct *vma; @@ -798,7 +748,7 @@ static int try_to_unmap_anon(struct page *page, int migration) return ret; list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { - ret = try_to_unmap_one(page, vma, migration); + ret = try_to_unmap_one(page, vma, ignore_refs); if (ret == SWAP_FAIL || !page_mapped(page)) break; } @@ -815,7 +765,7 @@ static int try_to_unmap_anon(struct page *page, int migration) * * This function is only called from try_to_unmap for object-based pages. */ -static int try_to_unmap_file(struct page *page, int migration) +static int try_to_unmap_file(struct page *page, int ignore_refs) { struct address_space *mapping = page->mapping; pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); @@ -829,7 +779,7 @@ static int try_to_unmap_file(struct page *page, int migration) spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { - ret = try_to_unmap_one(page, vma, migration); + ret = try_to_unmap_one(page, vma, ignore_refs); if (ret == SWAP_FAIL || !page_mapped(page)) goto out; } @@ -839,7 +789,7 @@ static int try_to_unmap_file(struct page *page, int migration) list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list) { - if ((vma->vm_flags & VM_LOCKED) && !migration) + if (vma->vm_flags & VM_LOCKED) continue; cursor = (unsigned long) vma->vm_private_data; if (cursor > max_nl_cursor) @@ -873,7 +823,7 @@ static int try_to_unmap_file(struct page *page, int migration) do { list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list) { - if ((vma->vm_flags & VM_LOCKED) && !migration) + if (vma->vm_flags & VM_LOCKED) continue; cursor = (unsigned long) vma->vm_private_data; while ( cursor < max_nl_cursor && @@ -914,16 +864,16 @@ out: * SWAP_AGAIN - we missed a mapping, try again later * SWAP_FAIL - the page is unswappable */ -int try_to_unmap(struct page *page, int migration) +int try_to_unmap(struct page *page, int ignore_refs) { int ret; BUG_ON(!PageLocked(page)); if (PageAnon(page)) - ret = try_to_unmap_anon(page, migration); + ret = try_to_unmap_anon(page, ignore_refs); else - ret = try_to_unmap_file(page, migration); + ret = try_to_unmap_file(page, ignore_refs); if (!page_mapped(page)) ret = SWAP_SUCCESS; diff --git a/mm/shmem.c b/mm/shmem.c index 6704b3c9b..c066617be 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -23,8 +23,10 @@ * which makes it a completely usable filesystem. */ +#include #include #include +#include #include #include #include @@ -171,7 +173,7 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages) } static struct super_operations shmem_ops; -static const struct address_space_operations shmem_aops; +static struct address_space_operations shmem_aops; static struct file_operations shmem_file_operations; static struct inode_operations shmem_inode_operations; static struct inode_operations shmem_dir_inode_operations; @@ -1043,12 +1045,12 @@ repeat: swappage = lookup_swap_cache(swap); if (!swappage) { shmem_swp_unmap(entry); + spin_unlock(&info->lock); /* here we actually do the io */ if (type && *type == VM_FAULT_MINOR) { - __count_vm_event(PGMAJFAULT); + inc_page_state(pgmajfault); *type = VM_FAULT_MAJOR; } - spin_unlock(&info->lock); swappage = shmem_swapin(info, swap, idx); if (!swappage) { spin_lock(&info->lock); @@ -1078,6 +1080,14 @@ repeat: page_cache_release(swappage); goto repeat; } + if (!PageSwapCache(swappage)) { + /* Page migration has occured */ + shmem_swp_unmap(entry); + spin_unlock(&info->lock); + unlock_page(swappage); + page_cache_release(swappage); + goto repeat; + } if (PageWriteback(swappage)) { shmem_swp_unmap(entry); spin_unlock(&info->lock); @@ -1349,6 +1359,7 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev) inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_mapping->a_ops = &shmem_aops; inode->i_mapping->backing_dev_info = &shmem_backing_dev_info; @@ -1642,9 +1653,9 @@ static ssize_t shmem_file_sendfile(struct file *in_file, loff_t *ppos, return desc.error; } -static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf) +static int shmem_statfs(struct super_block *sb, struct kstatfs *buf) { - struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb); + struct shmem_sb_info *sbinfo = SHMEM_SB(sb); buf->f_type = TMPFS_SUPER_MAGIC; buf->f_bsize = PAGE_CACHE_SIZE; @@ -2158,7 +2169,7 @@ static void destroy_inodecache(void) printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n"); } -static const struct address_space_operations shmem_aops = { +static struct address_space_operations shmem_aops = { .writepage = shmem_writepage, .set_page_dirty = __set_page_dirty_nobuffers, #ifdef CONFIG_TMPFS @@ -2221,10 +2232,10 @@ static struct vm_operations_struct shmem_vm_ops = { }; -static int shmem_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *shmem_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_nodev(fs_type, flags, data, shmem_fill_super, mnt); + return get_sb_nodev(fs_type, flags, data, shmem_fill_super); } static struct file_system_type tmpfs_fs_type = { @@ -2248,8 +2259,10 @@ static int __init init_tmpfs(void) printk(KERN_ERR "Could not register tmpfs\n"); goto out2; } - - shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER, +#ifdef CONFIG_TMPFS + devfs_mk_dir("shm"); +#endif + shm_mnt = do_kern_mount(tmpfs_fs_type.name, MS_NOUSER, tmpfs_fs_type.name, NULL); if (IS_ERR(shm_mnt)) { error = PTR_ERR(shm_mnt); diff --git a/mm/slab.c b/mm/slab.c index 0d9cf0921..33ae564b8 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -86,9 +86,9 @@ * All object allocations for a node occur from node specific slab lists. */ +#include #include #include -#include #include #include #include @@ -106,7 +106,6 @@ #include #include #include -#include #include #include @@ -308,13 +307,6 @@ struct kmem_list3 __initdata initkmem_list3[NUM_INIT_LISTS]; #define SIZE_AC 1 #define SIZE_L3 (1 + MAX_NUMNODES) -static int drain_freelist(struct kmem_cache *cache, - struct kmem_list3 *l3, int tofree); -static void free_block(struct kmem_cache *cachep, void **objpp, int len, - int node); -static void enable_cpucache(struct kmem_cache *cachep); -static void cache_reap(void *unused); - /* * This function must be completely optimized away if a constant is passed to * it. Mostly the same as what is in linux/slab.h except it returns an index. @@ -339,8 +331,6 @@ static __always_inline int index_of(const size_t size) return 0; } -static int slab_early_init = 1; - #define INDEX_AC index_of(sizeof(struct arraycache_init)) #define INDEX_L3 index_of(sizeof(struct kmem_list3)) @@ -462,7 +452,7 @@ struct kmem_cache { #define STATS_DEC_ACTIVE(x) ((x)->num_active--) #define STATS_INC_ALLOCED(x) ((x)->num_allocations++) #define STATS_INC_GROWN(x) ((x)->grown++) -#define STATS_ADD_REAPED(x,y) ((x)->reaped += (y)) +#define STATS_INC_REAPED(x) ((x)->reaped++) #define STATS_SET_HIGH(x) \ do { \ if ((x)->num_active > (x)->high_mark) \ @@ -486,7 +476,7 @@ struct kmem_cache { #define STATS_DEC_ACTIVE(x) do { } while (0) #define STATS_INC_ALLOCED(x) do { } while (0) #define STATS_INC_GROWN(x) do { } while (0) -#define STATS_ADD_REAPED(x,y) do { } while (0) +#define STATS_INC_REAPED(x) do { } while (0) #define STATS_SET_HIGH(x) do { } while (0) #define STATS_INC_ERR(x) do { } while (0) #define STATS_INC_NODEALLOCS(x) do { } while (0) @@ -500,6 +490,17 @@ struct kmem_cache { #endif #if DEBUG +/* + * Magic nums for obj red zoning. + * Placed in the first word before and the first word after an obj. + */ +#define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ +#define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ + +/* ...and for poisoning */ +#define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ +#define POISON_FREE 0x6b /* for use-after-free poisoning */ +#define POISON_END 0xa5 /* end-byte of poisoning */ /* * memory layout of objects: @@ -591,7 +592,6 @@ static inline struct kmem_cache *page_get_cache(struct page *page) { if (unlikely(PageCompound(page))) page = (struct page *)page_private(page); - BUG_ON(!PageSlab(page)); return (struct kmem_cache *)page->lru.next; } @@ -604,7 +604,6 @@ static inline struct slab *page_get_slab(struct page *page) { if (unlikely(PageCompound(page))) page = (struct page *)page_private(page); - BUG_ON(!PageSlab(page)); return (struct slab *)page->lru.prev; } @@ -673,63 +672,6 @@ static struct kmem_cache cache_cache = { #endif }; -#define BAD_ALIEN_MAGIC 0x01020304ul - -#ifdef CONFIG_LOCKDEP - -/* - * Slab sometimes uses the kmalloc slabs to store the slab headers - * for other slabs "off slab". - * The locking for this is tricky in that it nests within the locks - * of all other slabs in a few places; to deal with this special - * locking we put on-slab caches into a separate lock-class. - * - * We set lock class for alien array caches which are up during init. - * The lock annotation will be lost if all cpus of a node goes down and - * then comes back up during hotplug - */ -static struct lock_class_key on_slab_l3_key; -static struct lock_class_key on_slab_alc_key; - -static inline void init_lock_keys(void) - -{ - int q; - struct cache_sizes *s = malloc_sizes; - - while (s->cs_size != ULONG_MAX) { - for_each_node(q) { - struct array_cache **alc; - int r; - struct kmem_list3 *l3 = s->cs_cachep->nodelists[q]; - if (!l3 || OFF_SLAB(s->cs_cachep)) - continue; - lockdep_set_class(&l3->list_lock, &on_slab_l3_key); - alc = l3->alien; - /* - * FIXME: This check for BAD_ALIEN_MAGIC - * should go away when common slab code is taught to - * work even without alien caches. - * Currently, non NUMA code returns BAD_ALIEN_MAGIC - * for alloc_alien_cache, - */ - if (!alc || (unsigned long)alc == BAD_ALIEN_MAGIC) - continue; - for_each_node(r) { - if (alc[r]) - lockdep_set_class(&alc[r]->lock, - &on_slab_alc_key); - } - } - s++; - } -} -#else -static inline void init_lock_keys(void) -{ -} -#endif - /* Guard access to the cache-chain. */ static DEFINE_MUTEX(cache_chain_mutex); static struct list_head cache_chain; @@ -763,6 +705,12 @@ int slab_is_available(void) static DEFINE_PER_CPU(struct work_struct, reap_work); +static void free_block(struct kmem_cache *cachep, void **objpp, int len, + int node); +static void enable_cpucache(struct kmem_cache *cachep); +static void cache_reap(void *unused); +static int __node_shrink(struct kmem_cache *cachep, int node); + static inline struct array_cache *cpu_cache_get(struct kmem_cache *cachep) { return cachep->array[smp_processor_id()]; @@ -892,7 +840,7 @@ static void init_reap_node(int cpu) if (node == MAX_NUMNODES) node = first_node(node_online_map); - per_cpu(reap_node, cpu) = node; + __get_cpu_var(reap_node) = node; } static void next_reap_node(void) @@ -1076,40 +1024,6 @@ static void drain_alien_cache(struct kmem_cache *cachep, } } } - -static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) -{ - struct slab *slabp = virt_to_slab(objp); - int nodeid = slabp->nodeid; - struct kmem_list3 *l3; - struct array_cache *alien = NULL; - - /* - * Make sure we are not freeing a object from another node to the array - * cache on this cpu. - */ - if (likely(slabp->nodeid == numa_node_id())) - return 0; - - l3 = cachep->nodelists[numa_node_id()]; - STATS_INC_NODEFREES(cachep); - if (l3->alien && l3->alien[nodeid]) { - alien = l3->alien[nodeid]; - spin_lock(&alien->lock); - if (unlikely(alien->avail == alien->limit)) { - STATS_INC_ACOVERFLOW(cachep); - __drain_alien_cache(cachep, alien, nodeid); - } - alien->entry[alien->avail++] = objp; - spin_unlock(&alien->lock); - } else { - spin_lock(&(cachep->nodelists[nodeid])->list_lock); - free_block(cachep, &objp, 1, nodeid); - spin_unlock(&(cachep->nodelists[nodeid])->list_lock); - } - return 1; -} - #else #define drain_alien_cache(cachep, alien) do { } while (0) @@ -1117,21 +1031,16 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) static inline struct array_cache **alloc_alien_cache(int node, int limit) { - return (struct array_cache **)BAD_ALIEN_MAGIC; + return (struct array_cache **) 0x01020304ul; } static inline void free_alien_cache(struct array_cache **ac_ptr) { } -static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) -{ - return 0; -} - #endif -static int __cpuinit cpuup_callback(struct notifier_block *nfb, +static int cpuup_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { long cpu = (long)hcpu; @@ -1298,7 +1207,10 @@ free_array_cache: l3 = cachep->nodelists[node]; if (!l3) continue; - drain_freelist(cachep, l3, l3->free_objects); + spin_lock_irq(&l3->list_lock); + /* free slabs belonging to this node */ + __node_shrink(cachep, node); + spin_unlock_irq(&l3->list_lock); } mutex_unlock(&cache_chain_mutex); break; @@ -1310,9 +1222,7 @@ bad: return NOTIFY_BAD; } -static struct notifier_block __cpuinitdata cpucache_notifier = { - &cpuup_callback, NULL, 0 -}; +static struct notifier_block cpucache_notifier = { &cpuup_callback, NULL, 0 }; /* * swap the static kmem_list3 with kmalloced memory @@ -1328,11 +1238,6 @@ static void init_list(struct kmem_cache *cachep, struct kmem_list3 *list, local_irq_disable(); memcpy(ptr, list, sizeof(struct kmem_list3)); - /* - * Do not assume that spinlocks can be initialized via memcpy: - */ - spin_lock_init(&ptr->list_lock); - MAKE_ALL_LISTS(cachep, ptr, nodeid); cachep->nodelists[nodeid] = ptr; local_irq_enable(); @@ -1430,8 +1335,6 @@ void __init kmem_cache_init(void) NULL, NULL); } - slab_early_init = 0; - while (sizes->cs_size != ULONG_MAX) { /* * For performance, all the general caches are L1 aligned. @@ -1459,7 +1362,7 @@ void __init kmem_cache_init(void) } /* 4) Replace the bootstrap head arrays */ { - struct array_cache *ptr; + void *ptr; ptr = kmalloc(sizeof(struct arraycache_init), GFP_KERNEL); @@ -1467,11 +1370,6 @@ void __init kmem_cache_init(void) BUG_ON(cpu_cache_get(&cache_cache) != &initarray_cache.cache); memcpy(ptr, cpu_cache_get(&cache_cache), sizeof(struct arraycache_init)); - /* - * Do not assume that spinlocks can be initialized via memcpy: - */ - spin_lock_init(&ptr->lock); - cache_cache.array[smp_processor_id()] = ptr; local_irq_enable(); @@ -1482,11 +1380,6 @@ void __init kmem_cache_init(void) != &initarray_generic.cache); memcpy(ptr, cpu_cache_get(malloc_sizes[INDEX_AC].cs_cachep), sizeof(struct arraycache_init)); - /* - * Do not assume that spinlocks can be initialized via memcpy: - */ - spin_lock_init(&ptr->lock); - malloc_sizes[INDEX_AC].cs_cachep->array[smp_processor_id()] = ptr; local_irq_enable(); @@ -1519,10 +1412,6 @@ void __init kmem_cache_init(void) mutex_unlock(&cache_chain_mutex); } - /* Annotate slab for lockdep -- annotate the malloc caches */ - init_lock_keys(); - - /* Done! */ g_cpucache_up = FULL; @@ -1561,29 +1450,31 @@ __initcall(cpucache_init); static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid) { struct page *page; - int nr_pages; + void *addr; int i; + flags |= cachep->gfpflags; #ifndef CONFIG_MMU - /* - * Nommu uses slab's for process anonymous memory allocations, and thus - * requires __GFP_COMP to properly refcount higher order allocations + /* nommu uses slab's for process anonymous memory allocations, so + * requires __GFP_COMP to properly refcount higher order allocations" */ - flags |= __GFP_COMP; -#endif - flags |= cachep->gfpflags; - + page = alloc_pages_node(nodeid, (flags | __GFP_COMP), cachep->gfporder); +#else page = alloc_pages_node(nodeid, flags, cachep->gfporder); +#endif if (!page) return NULL; + addr = page_address(page); - nr_pages = (1 << cachep->gfporder); + i = (1 << cachep->gfporder); if (cachep->flags & SLAB_RECLAIM_ACCOUNT) - atomic_add(nr_pages, &slab_reclaim_pages); - add_zone_page_state(page_zone(page), NR_SLAB, nr_pages); - for (i = 0; i < nr_pages; i++) - __SetPageSlab(page + i); - return page_address(page); + atomic_add(i, &slab_reclaim_pages); + add_page_state(nr_slab, i); + while (i--) { + __SetPageSlab(page); + page++; + } + return addr; } /* @@ -1595,12 +1486,12 @@ static void kmem_freepages(struct kmem_cache *cachep, void *addr) struct page *page = virt_to_page(addr); const unsigned long nr_freed = i; - sub_zone_page_state(page_zone(page), NR_SLAB, nr_freed); while (i--) { BUG_ON(!PageSlab(page)); __ClearPageSlab(page); page++; } + sub_page_state(nr_slab, nr_freed); if (current->reclaim_state) current->reclaim_state->reclaimed_slab += nr_freed; free_pages((unsigned long)addr, cachep->gfporder); @@ -1666,26 +1557,31 @@ static void poison_obj(struct kmem_cache *cachep, void *addr, unsigned char val) static void dump_line(char *data, int offset, int limit) { int i; - unsigned char total = 0, bad_count = 0, errors; + unsigned char total=0, bad_count=0; printk(KERN_ERR "%03x:", offset); for (i = 0; i < limit; i++) { - if (data[offset + i] != POISON_FREE) { - total += data[offset + i]; - bad_count++; + if (data[offset+i] != POISON_FREE) { + total += data[offset+i]; + ++bad_count; } printk(" %02x", (unsigned char)data[offset + i]); } printk("\n"); - if (bad_count == 1) { - errors = total ^ POISON_FREE; - if (errors && !(errors & (errors-1))) { - printk(KERN_ERR "Single bit error detected. Probably bad RAM.\n"); + switch (total) { + case POISON_FREE ^ 0x01: + case POISON_FREE ^ 0x02: + case POISON_FREE ^ 0x04: + case POISON_FREE ^ 0x08: + case POISON_FREE ^ 0x10: + case POISON_FREE ^ 0x20: + case POISON_FREE ^ 0x40: + case POISON_FREE ^ 0x80: + printk (KERN_ERR "Single bit error detected. Possibly bad RAM.\n"); #ifdef CONFIG_X86 - printk(KERN_ERR "Run memtest86+ or a similar memory test tool.\n"); -#else - printk(KERN_ERR "Run a memory test tool.\n"); + printk (KERN_ERR "Run memtest86 or other memory test tool.\n"); #endif + return; } } } @@ -2041,7 +1937,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, void (*dtor)(void*, struct kmem_cache *, unsigned long)) { size_t left_over, slab_size, ralign; - struct kmem_cache *cachep = NULL, *pc; + struct kmem_cache *cachep = NULL; + struct list_head *p; /* * Sanity checks... these are all serious usage bugs. @@ -2061,7 +1958,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, mutex_lock(&cache_chain_mutex); - list_for_each_entry(pc, &cache_chain, next) { + list_for_each(p, &cache_chain) { + struct kmem_cache *pc = list_entry(p, struct kmem_cache, next); mm_segment_t old_fs = get_fs(); char tmp; int res; @@ -2195,12 +2093,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, #endif #endif - /* - * Determine if the slab management is 'on' or 'off' slab. - * (bootstrapping cannot cope with offslab caches so don't do - * it too early on.) - */ - if ((size >= (PAGE_SIZE >> 3)) && !slab_early_init) + /* Determine if the slab management is 'on' or 'off' slab. */ + if (size >= (PAGE_SIZE >> 3)) /* * Size is large, assume best to place the slab management obj * off-slab (should allow better packing of objs). @@ -2340,45 +2234,32 @@ static void drain_cpu_caches(struct kmem_cache *cachep) } } -/* - * Remove slabs from the list of free slabs. - * Specify the number of slabs to drain in tofree. - * - * Returns the actual number of slabs released. - */ -static int drain_freelist(struct kmem_cache *cache, - struct kmem_list3 *l3, int tofree) +static int __node_shrink(struct kmem_cache *cachep, int node) { - struct list_head *p; - int nr_freed; struct slab *slabp; + struct kmem_list3 *l3 = cachep->nodelists[node]; + int ret; - nr_freed = 0; - while (nr_freed < tofree && !list_empty(&l3->slabs_free)) { + for (;;) { + struct list_head *p; - spin_lock_irq(&l3->list_lock); p = l3->slabs_free.prev; - if (p == &l3->slabs_free) { - spin_unlock_irq(&l3->list_lock); - goto out; - } + if (p == &l3->slabs_free) + break; - slabp = list_entry(p, struct slab, list); + slabp = list_entry(l3->slabs_free.prev, struct slab, list); #if DEBUG BUG_ON(slabp->inuse); #endif list_del(&slabp->list); - /* - * Safe to drop the lock. The slab is no longer linked - * to the cache. - */ - l3->free_objects -= cache->num; + + l3->free_objects -= cachep->num; spin_unlock_irq(&l3->list_lock); - slab_destroy(cache, slabp); - nr_freed++; + slab_destroy(cachep, slabp); + spin_lock_irq(&l3->list_lock); } -out: - return nr_freed; + ret = !list_empty(&l3->slabs_full) || !list_empty(&l3->slabs_partial); + return ret; } static int __cache_shrink(struct kmem_cache *cachep) @@ -2391,13 +2272,11 @@ static int __cache_shrink(struct kmem_cache *cachep) check_irq_on(); for_each_online_node(i) { l3 = cachep->nodelists[i]; - if (!l3) - continue; - - drain_freelist(cachep, l3, l3->free_objects); - - ret += !list_empty(&l3->slabs_full) || - !list_empty(&l3->slabs_partial); + if (l3) { + spin_lock_irq(&l3->list_lock); + ret += __node_shrink(cachep, i); + spin_unlock_irq(&l3->list_lock); + } } return (ret ? 1 : 0); } @@ -2605,28 +2484,23 @@ static void slab_put_obj(struct kmem_cache *cachep, struct slab *slabp, slabp->inuse--; } -/* - * Map pages beginning at addr to the given cache and slab. This is required - * for the slab allocator to be able to lookup the cache and slab of a - * virtual address for kfree, ksize, kmem_ptr_validate, and slab debugging. - */ -static void slab_map_pages(struct kmem_cache *cache, struct slab *slab, - void *addr) +static void set_slab_attr(struct kmem_cache *cachep, struct slab *slabp, + void *objp) { - int nr_pages; + int i; struct page *page; - page = virt_to_page(addr); + /* Nasty!!!!!! I hope this is OK. */ + page = virt_to_page(objp); - nr_pages = 1; + i = 1; if (likely(!PageCompound(page))) - nr_pages <<= cache->gfporder; - + i <<= cachep->gfporder; do { - page_set_cache(page, cache); - page_set_slab(page, slab); + page_set_cache(page, cachep); + page_set_slab(page, slabp); page++; - } while (--nr_pages); + } while (--i); } /* @@ -2698,7 +2572,7 @@ static int cache_grow(struct kmem_cache *cachep, gfp_t flags, int nodeid) goto opps1; slabp->nodeid = nodeid; - slab_map_pages(cachep, slabp, objp); + set_slab_attr(cachep, slabp, objp); cache_init_objs(cachep, slabp, ctor_flags); @@ -2746,28 +2620,6 @@ static void kfree_debugcheck(const void *objp) } } -static inline void verify_redzone_free(struct kmem_cache *cache, void *obj) -{ - unsigned long redzone1, redzone2; - - redzone1 = *dbg_redzone1(cache, obj); - redzone2 = *dbg_redzone2(cache, obj); - - /* - * Redzone is ok. - */ - if (redzone1 == RED_ACTIVE && redzone2 == RED_ACTIVE) - return; - - if (redzone1 == RED_INACTIVE && redzone2 == RED_INACTIVE) - slab_error(cache, "double free detected"); - else - slab_error(cache, "memory outside object was overwritten"); - - printk(KERN_ERR "%p: redzone 1:0x%lx, redzone 2:0x%lx.\n", - obj, redzone1, redzone2); -} - static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp, void *caller) { @@ -2779,10 +2631,27 @@ static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp, kfree_debugcheck(objp); page = virt_to_page(objp); + if (page_get_cache(page) != cachep) { + printk(KERN_ERR "mismatch in kmem_cache_free: expected " + "cache %p, got %p\n", + page_get_cache(page), cachep); + printk(KERN_ERR "%p is %s.\n", cachep, cachep->name); + printk(KERN_ERR "%p is %s.\n", page_get_cache(page), + page_get_cache(page)->name); + WARN_ON(1); + } slabp = page_get_slab(page); if (cachep->flags & SLAB_RED_ZONE) { - verify_redzone_free(cachep, objp); + if (*dbg_redzone1(cachep, objp) != RED_ACTIVE || + *dbg_redzone2(cachep, objp) != RED_ACTIVE) { + slab_error(cachep, "double free, or memory outside" + " object was overwritten"); + printk(KERN_ERR "%p: redzone 1:0x%lx, " + "redzone 2:0x%lx.\n", + objp, *dbg_redzone1(cachep, objp), + *dbg_redzone2(cachep, objp)); + } *dbg_redzone1(cachep, objp) = RED_INACTIVE; *dbg_redzone2(cachep, objp) = RED_INACTIVE; } @@ -3242,9 +3111,41 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp) check_irq_off(); objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0)); - if (cache_free_alien(cachep, objp)) - return; - + /* Make sure we are not freeing a object from another + * node to the array cache on this cpu. + */ +#ifdef CONFIG_NUMA + { + struct slab *slabp; + slabp = virt_to_slab(objp); + if (unlikely(slabp->nodeid != numa_node_id())) { + struct array_cache *alien = NULL; + int nodeid = slabp->nodeid; + struct kmem_list3 *l3; + + l3 = cachep->nodelists[numa_node_id()]; + STATS_INC_NODEFREES(cachep); + if (l3->alien && l3->alien[nodeid]) { + alien = l3->alien[nodeid]; + spin_lock(&alien->lock); + if (unlikely(alien->avail == alien->limit)) { + STATS_INC_ACOVERFLOW(cachep); + __drain_alien_cache(cachep, + alien, nodeid); + } + alien->entry[alien->avail++] = objp; + spin_unlock(&alien->lock); + } else { + spin_lock(&(cachep->nodelists[nodeid])-> + list_lock); + free_block(cachep, &objp, 1, nodeid); + spin_unlock(&(cachep->nodelists[nodeid])-> + list_lock); + } + return; + } + } +#endif if (likely(ac->avail < ac->limit)) { STATS_INC_FREEHIT(cachep); ac->entry[ac->avail++] = objp; @@ -3271,7 +3172,7 @@ void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) EXPORT_SYMBOL(kmem_cache_alloc); /** - * kmem_cache_zalloc - Allocate an object. The memory is set to zero. + * kmem_cache_alloc - Allocate an object. The memory is set to zero. * @cache: The cache to allocate from. * @flags: See kmalloc(). * @@ -3377,10 +3278,26 @@ EXPORT_SYMBOL(kmalloc_node); #endif /** - * __do_kmalloc - allocate memory + * kmalloc - allocate memory * @size: how many bytes of memory are required. - * @flags: the type of memory to allocate (see kmalloc). + * @flags: the type of memory to allocate. * @caller: function caller for debug tracking of the caller + * + * kmalloc is the normal method of allocating memory + * in the kernel. + * + * The @flags argument may be one of: + * + * %GFP_USER - Allocate memory on behalf of user. May sleep. + * + * %GFP_KERNEL - Allocate normal kernel ram. May sleep. + * + * %GFP_ATOMIC - Allocation will not sleep. Use inside interrupt handlers. + * + * Additionally, the %GFP_DMA flag may be set to indicate the memory + * must be suitable for DMA. This can mean different things on different + * platforms. For example, on i386, it means that the memory must come + * from the first 16MB. */ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags, void *caller) @@ -3478,8 +3395,6 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) { unsigned long flags; - BUG_ON(virt_to_cache(objp) != cachep); - local_irq_save(flags); __cache_free(cachep, objp); local_irq_restore(flags); @@ -3505,7 +3420,7 @@ void kfree(const void *objp) local_irq_save(flags); kfree_debugcheck(objp); c = virt_to_cache(objp); - debug_check_no_locks_freed(objp, obj_size(c)); + mutex_debug_check_no_locks_freed(objp, obj_size(c)); __cache_free(c, (void *)objp); local_irq_restore(flags); } @@ -3789,7 +3704,7 @@ void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, */ static void cache_reap(void *unused) { - struct kmem_cache *searchp; + struct list_head *walk; struct kmem_list3 *l3; int node = numa_node_id(); @@ -3800,7 +3715,13 @@ static void cache_reap(void *unused) return; } - list_for_each_entry(searchp, &cache_chain, next) { + list_for_each(walk, &cache_chain) { + struct kmem_cache *searchp; + struct list_head *p; + int tofree; + struct slab *slabp; + + searchp = list_entry(walk, struct kmem_cache, next); check_irq_on(); /* @@ -3825,22 +3746,47 @@ static void cache_reap(void *unused) drain_array(searchp, l3, l3->shared, 0, node); - if (l3->free_touched) + if (l3->free_touched) { l3->free_touched = 0; - else { - int freed; - - freed = drain_freelist(searchp, l3, (l3->free_limit + - 5 * searchp->num - 1) / (5 * searchp->num)); - STATS_ADD_REAPED(searchp, freed); + goto next; } + + tofree = (l3->free_limit + 5 * searchp->num - 1) / + (5 * searchp->num); + do { + /* + * Do not lock if there are no free blocks. + */ + if (list_empty(&l3->slabs_free)) + break; + + spin_lock_irq(&l3->list_lock); + p = l3->slabs_free.next; + if (p == &(l3->slabs_free)) { + spin_unlock_irq(&l3->list_lock); + break; + } + + slabp = list_entry(p, struct slab, list); + BUG_ON(slabp->inuse); + list_del(&slabp->list); + STATS_INC_REAPED(searchp); + + /* + * Safe to drop the lock. The slab is no longer linked + * to the cache. searchp cannot disappear, we hold + * cache_chain_lock + */ + l3->free_objects -= searchp->num; + spin_unlock_irq(&l3->list_lock); + slab_destroy(searchp, slabp); + } while (--tofree > 0); next: cond_resched(); } check_irq_on(); mutex_unlock(&cache_chain_mutex); next_reap_node(); - refresh_cpu_vm_stats(smp_processor_id()); /* Set up the next iteration */ schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC); } @@ -3903,6 +3849,7 @@ static void s_stop(struct seq_file *m, void *p) static int s_show(struct seq_file *m, void *p) { struct kmem_cache *cachep = p; + struct list_head *q; struct slab *slabp; unsigned long active_objs; unsigned long num_objs; @@ -3923,13 +3870,15 @@ static int s_show(struct seq_file *m, void *p) check_irq_on(); spin_lock_irq(&l3->list_lock); - list_for_each_entry(slabp, &l3->slabs_full, list) { + list_for_each(q, &l3->slabs_full) { + slabp = list_entry(q, struct slab, list); if (slabp->inuse != cachep->num && !error) error = "slabs_full accounting error"; active_objs += cachep->num; active_slabs++; } - list_for_each_entry(slabp, &l3->slabs_partial, list) { + list_for_each(q, &l3->slabs_partial) { + slabp = list_entry(q, struct slab, list); if (slabp->inuse == cachep->num && !error) error = "slabs_partial inuse accounting error"; if (!slabp->inuse && !error) @@ -3937,7 +3886,8 @@ static int s_show(struct seq_file *m, void *p) active_objs += slabp->inuse; active_slabs++; } - list_for_each_entry(slabp, &l3->slabs_free, list) { + list_for_each(q, &l3->slabs_free) { + slabp = list_entry(q, struct slab, list); if (slabp->inuse && !error) error = "slabs_free/inuse accounting error"; num_slabs++; @@ -4030,7 +3980,7 @@ ssize_t slabinfo_write(struct file *file, const char __user * buffer, { char kbuf[MAX_SLABINFO_WRITE + 1], *tmp; int limit, batchcount, shared, res; - struct kmem_cache *cachep; + struct list_head *p; if (count > MAX_SLABINFO_WRITE) return -EINVAL; @@ -4049,7 +3999,10 @@ ssize_t slabinfo_write(struct file *file, const char __user * buffer, /* Find the cache in the chain of caches. */ mutex_lock(&cache_chain_mutex); res = -EINVAL; - list_for_each_entry(cachep, &cache_chain, next) { + list_for_each(p, &cache_chain) { + struct kmem_cache *cachep; + + cachep = list_entry(p, struct kmem_cache, next); if (!strcmp(cachep->name, kbuf)) { if (limit < 1 || batchcount < 1 || batchcount > limit || shared < 0) { @@ -4151,6 +4104,7 @@ static void show_symbol(struct seq_file *m, unsigned long address) static int leaks_show(struct seq_file *m, void *p) { struct kmem_cache *cachep = p; + struct list_head *q; struct slab *slabp; struct kmem_list3 *l3; const char *name; @@ -4175,10 +4129,14 @@ static int leaks_show(struct seq_file *m, void *p) check_irq_on(); spin_lock_irq(&l3->list_lock); - list_for_each_entry(slabp, &l3->slabs_full, list) + list_for_each(q, &l3->slabs_full) { + slabp = list_entry(q, struct slab, list); handle_slab(n, cachep, slabp); - list_for_each_entry(slabp, &l3->slabs_partial, list) + } + list_for_each(q, &l3->slabs_partial) { + slabp = list_entry(q, struct slab, list); handle_slab(n, cachep, slabp); + } spin_unlock_irq(&l3->list_lock); } name = cachep->name; diff --git a/mm/slob.c b/mm/slob.c index 7b52b20b9..a68255ba4 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -29,6 +29,7 @@ * essentially no allocation space overhead. */ +#include #include #include #include diff --git a/mm/sparse.c b/mm/sparse.c index 86c52ab80..100040c0d 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -1,6 +1,7 @@ /* * sparse memory mappings. */ +#include #include #include #include @@ -44,7 +45,7 @@ static struct mem_section *sparse_index_alloc(int nid) static int sparse_index_init(unsigned long section_nr, int nid) { - static DEFINE_SPINLOCK(index_init_lock); + static spinlock_t index_init_lock = SPIN_LOCK_UNLOCKED; unsigned long root = SECTION_NR_TO_ROOT(section_nr); struct mem_section *section; int ret = 0; @@ -98,22 +99,6 @@ int __section_nr(struct mem_section* ms) return (root_nr * SECTIONS_PER_ROOT) + (ms - root); } -/* - * During early boot, before section_mem_map is used for an actual - * mem_map, we use section_mem_map to store the section's NUMA - * node. This keeps us from having to use another data structure. The - * node information is cleared just before we store the real mem_map. - */ -static inline unsigned long sparse_encode_early_nid(int nid) -{ - return (nid << SECTION_NID_SHIFT); -} - -static inline int sparse_early_nid(struct mem_section *section) -{ - return (section->section_mem_map >> SECTION_NID_SHIFT); -} - /* Record a memory area against a node. */ void memory_present(int nid, unsigned long start, unsigned long end) { @@ -128,8 +113,7 @@ void memory_present(int nid, unsigned long start, unsigned long end) ms = __nr_to_section(section); if (!ms->section_mem_map) - ms->section_mem_map = sparse_encode_early_nid(nid) | - SECTION_MARKED_PRESENT; + ms->section_mem_map = SECTION_MARKED_PRESENT; } } @@ -180,7 +164,6 @@ static int sparse_init_one_section(struct mem_section *ms, if (!valid_section(ms)) return -EINVAL; - ms->section_mem_map &= ~SECTION_MAP_MASK; ms->section_mem_map |= sparse_encode_mem_map(mem_map, pnum); return 1; @@ -189,8 +172,8 @@ static int sparse_init_one_section(struct mem_section *ms, static struct page *sparse_early_mem_map_alloc(unsigned long pnum) { struct page *map; + int nid = early_pfn_to_nid(section_nr_to_pfn(pnum)); struct mem_section *ms = __nr_to_section(pnum); - int nid = sparse_early_nid(ms); map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); if (map) diff --git a/mm/swap.c b/mm/swap.c index 687686a61..88895c249 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -54,26 +54,6 @@ void put_page(struct page *page) } EXPORT_SYMBOL(put_page); -/** - * put_pages_list(): release a list of pages - * - * Release a list of pages which are strung together on page.lru. Currently - * used by read_cache_pages() and related error recovery code. - * - * @pages: list of pages threaded on page->lru - */ -void put_pages_list(struct list_head *pages) -{ - while (!list_empty(pages)) { - struct page *victim; - - victim = list_entry(pages->prev, struct page, lru); - list_del(&victim->lru); - page_cache_release(victim); - } -} -EXPORT_SYMBOL(put_pages_list); - /* * Writeback is about to end against a page which has been marked for immediate * reclaim. If it still appears to be reclaimable, move it to the tail of the @@ -106,8 +86,9 @@ int rotate_reclaimable_page(struct page *page) zone = page_zone(page); spin_lock_irqsave(&zone->lru_lock, flags); if (PageLRU(page) && !PageActive(page)) { - list_move_tail(&page->lru, &zone->inactive_list); - __count_vm_event(PGROTATED); + list_del(&page->lru); + list_add_tail(&page->lru, &zone->inactive_list); + inc_page_state(pgrotated); } if (!test_clear_page_writeback(page)) BUG(); @@ -127,7 +108,7 @@ void fastcall activate_page(struct page *page) del_page_from_inactive_list(zone, page); SetPageActive(page); add_page_to_active_list(zone, page); - __count_vm_event(PGACTIVATE); + inc_page_state(pgactivate); } spin_unlock_irq(&zone->lru_lock); } @@ -499,6 +480,48 @@ static int cpu_swap_callback(struct notifier_block *nfb, #endif /* CONFIG_HOTPLUG_CPU */ #endif /* CONFIG_SMP */ +#ifdef CONFIG_SMP +void percpu_counter_mod(struct percpu_counter *fbc, long amount) +{ + long count; + long *pcount; + int cpu = get_cpu(); + + pcount = per_cpu_ptr(fbc->counters, cpu); + count = *pcount + amount; + if (count >= FBC_BATCH || count <= -FBC_BATCH) { + spin_lock(&fbc->lock); + fbc->count += count; + *pcount = 0; + spin_unlock(&fbc->lock); + } else { + *pcount = count; + } + put_cpu(); +} +EXPORT_SYMBOL(percpu_counter_mod); + +/* + * Add up all the per-cpu counts, return the result. This is a more accurate + * but much slower version of percpu_counter_read_positive() + */ +long percpu_counter_sum(struct percpu_counter *fbc) +{ + long ret; + int cpu; + + spin_lock(&fbc->lock); + ret = fbc->count; + for_each_possible_cpu(cpu) { + long *pcount = per_cpu_ptr(fbc->counters, cpu); + ret += *pcount; + } + spin_unlock(&fbc->lock); + return ret < 0 ? 0 : ret; +} +EXPORT_SYMBOL(percpu_counter_sum); +#endif + /* * Perform any setup for the swap system */ diff --git a/mm/swap_state.c b/mm/swap_state.c index 5f7cf2a4c..e0e1583f3 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -24,7 +24,7 @@ * vmscan's shrink_list, to make sync_page look nicer, and to allow * future use of radix_tree tags in the swap cache. */ -static const struct address_space_operations swap_aops = { +static struct address_space_operations swap_aops = { .writepage = swap_writepage, .sync_page = block_sync_page, .set_page_dirty = __set_page_dirty_nobuffers, @@ -38,7 +38,7 @@ static struct backing_dev_info swap_backing_dev_info = { struct address_space swapper_space = { .page_tree = RADIX_TREE_INIT(GFP_ATOMIC|__GFP_NOWARN), - .tree_lock = __RW_LOCK_UNLOCKED(swapper_space.tree_lock), + .tree_lock = RW_LOCK_UNLOCKED, .a_ops = &swap_aops, .i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear), .backing_dev_info = &swap_backing_dev_info, @@ -87,7 +87,7 @@ static int __add_to_swap_cache(struct page *page, swp_entry_t entry, SetPageSwapCache(page); set_page_private(page, entry.val); total_swapcache_pages++; - __inc_zone_page_state(page, NR_FILE_PAGES); + pagecache_acct(1); } write_unlock_irq(&swapper_space.tree_lock); radix_tree_preload_end(); @@ -132,7 +132,7 @@ void __delete_from_swap_cache(struct page *page) set_page_private(page, 0); ClearPageSwapCache(page); total_swapcache_pages--; - __dec_zone_page_state(page, NR_FILE_PAGES); + pagecache_acct(-1); INC_CACHE_INFO(del_total); } diff --git a/mm/swapfile.c b/mm/swapfile.c index c25ffae06..0cefbba42 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -5,6 +5,7 @@ * Swap reorganised 29.12.95, Stephen Tweedie */ +#include #include #include #include @@ -396,9 +397,6 @@ void free_swap_and_cache(swp_entry_t entry) struct swap_info_struct * p; struct page *page = NULL; - if (is_migration_entry(entry)) - return; - p = swap_info_get(entry); if (p) { if (swap_entry_free(p, swp_offset(entry)) == 1) { @@ -620,6 +618,15 @@ static int unuse_mm(struct mm_struct *mm, return 0; } +#ifdef CONFIG_MIGRATION +int remove_vma_swap(struct vm_area_struct *vma, struct page *page) +{ + swp_entry_t entry = { .val = page_private(page) }; + + return unuse_vma(vma, entry, page); +} +#endif + /* * Scan swap_map from current position to next entry still in use. * Recycle to start on reaching the end, returning 0 when empty. @@ -712,6 +719,7 @@ static int try_to_unuse(unsigned int type) */ swap_map = &si->swap_map[i]; entry = swp_entry(type, i); +again: page = read_swap_cache_async(entry, NULL, 0); if (!page) { /* @@ -746,6 +754,12 @@ static int try_to_unuse(unsigned int type) wait_on_page_locked(page); wait_on_page_writeback(page); lock_page(page); + if (!PageSwapCache(page)) { + /* Page migration has occured */ + unlock_page(page); + page_cache_release(page); + goto again; + } wait_on_page_writeback(page); /* @@ -774,8 +788,10 @@ static int try_to_unuse(unsigned int type) while (*swap_map > 1 && !retval && (p = p->next) != &start_mm->mmlist) { mm = list_entry(p, struct mm_struct, mmlist); - if (!atomic_inc_not_zero(&mm->mm_users)) + if (atomic_inc_return(&mm->mm_users) == 1) { + atomic_dec(&mm->mm_users); continue; + } spin_unlock(&mmlist_lock); mmput(prev_mm); prev_mm = mm; @@ -1394,7 +1410,19 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) if (!(p->flags & SWP_USED)) break; error = -EPERM; - if (type >= MAX_SWAPFILES) { + /* + * Test if adding another swap device is possible. There are + * two limiting factors: 1) the number of bits for the swap + * type swp_entry_t definition and 2) the number of bits for + * the swap type in the swap ptes as defined by the different + * architectures. To honor both limitations a swap entry + * with swap offset 0 and swap type ~0UL is created, encoded + * to a swap pte, decoded to a swp_entry_t again and finally + * the swap type part is extracted. This will mask all bits + * from the initial ~0UL that can't be encoded in either the + * swp_entry_t or the architecture definition of a swap pte. + */ + if (type > swp_type(pte_to_swp_entry(swp_entry_to_pte(swp_entry(~0UL,0))))) { spin_unlock(&swap_lock); goto out; } @@ -1479,7 +1507,8 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) error = -EINVAL; goto bad_swap; } - page = read_mapping_page(mapping, 0, swap_file); + page = read_cache_page(mapping, 0, + (filler_t *)mapping->a_ops->readpage, swap_file); if (IS_ERR(page)) { error = PTR_ERR(page); goto bad_swap; @@ -1685,9 +1714,6 @@ int swap_duplicate(swp_entry_t entry) unsigned long offset, type; int result = 0; - if (is_migration_entry(entry)) - return 1; - type = swp_type(entry); if (type >= nr_swapfiles) goto bad_file; diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index 5f2cbf0f1..f9d6a9cc9 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -32,6 +33,9 @@ static int __init init_tmpfs(void) { BUG_ON(register_filesystem(&tmpfs_fs_type) != 0); +#ifdef CONFIG_TMPFS + devfs_mk_dir("shm"); +#endif shm_mnt = kern_mount(&tmpfs_fs_type); BUG_ON(IS_ERR(shm_mnt)); diff --git a/mm/truncate.c b/mm/truncate.c index 6772c4172..993844fef 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -68,10 +68,10 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) return 0; write_lock_irq(&mapping->tree_lock); - if (PageDirty(page)) - goto failed; - if (page_count(page) != 2) /* caller's ref + pagecache ref */ - goto failed; + if (PageDirty(page)) { + write_unlock_irq(&mapping->tree_lock); + return 0; + } BUG_ON(PagePrivate(page)); __remove_from_page_cache(page); @@ -79,9 +79,6 @@ invalidate_complete_page(struct address_space *mapping, struct page *page) ClearPageUptodate(page); page_cache_release(page); /* pagecache ref */ return 1; -failed: - write_unlock_irq(&mapping->tree_lock); - return 0; } /** @@ -233,24 +230,14 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping, pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { for (i = 0; i < pagevec_count(&pvec); i++) { struct page *page = pvec.pages[i]; - pgoff_t index; - int lock_failed; - - lock_failed = TestSetPageLocked(page); - /* - * We really shouldn't be looking at the ->index of an - * unlocked page. But we're not allowed to lock these - * pages. So we rely upon nobody altering the ->index - * of this (pinned-by-us) page. - */ - index = page->index; - if (index > next) - next = index; - next++; - if (lock_failed) + if (TestSetPageLocked(page)) { + next++; continue; - + } + if (page->index > next) + next = page->index; + next++; if (PageDirty(page) || PageWriteback(page)) goto unlock; if (page_mapped(page)) @@ -272,38 +259,8 @@ unsigned long invalidate_inode_pages(struct address_space *mapping) { return invalidate_mapping_pages(mapping, 0, ~0UL); } -EXPORT_SYMBOL(invalidate_inode_pages); -/* - * This is like invalidate_complete_page(), except it ignores the page's - * refcount. We do this because invalidate_inode_pages2() needs stronger - * invalidation guarantees, and cannot afford to leave pages behind because - * shrink_list() has a temp ref on them, or because they're transiently sitting - * in the lru_cache_add() pagevecs. - */ -static int -invalidate_complete_page2(struct address_space *mapping, struct page *page) -{ - if (page->mapping != mapping) - return 0; - - if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL)) - return 0; - - write_lock_irq(&mapping->tree_lock); - if (PageDirty(page)) - goto failed; - - BUG_ON(PagePrivate(page)); - __remove_from_page_cache(page); - write_unlock_irq(&mapping->tree_lock); - ClearPageUptodate(page); - page_cache_release(page); /* pagecache ref */ - return 1; -failed: - write_unlock_irq(&mapping->tree_lock); - return 0; -} +EXPORT_SYMBOL(invalidate_inode_pages); /** * invalidate_inode_pages2_range - remove range of pages from an address_space @@ -371,7 +328,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping, } } was_dirty = test_clear_page_dirty(page); - if (!invalidate_complete_page2(mapping, page)) { + if (!invalidate_complete_page(mapping, page)) { if (was_dirty) set_page_dirty(page); ret = -EIO; diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 266162d2b..c0504f1e3 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -256,19 +256,6 @@ struct vm_struct *get_vm_area_node(unsigned long size, unsigned long flags, int return __get_vm_area_node(size, flags, VMALLOC_START, VMALLOC_END, node); } -/* Caller must hold vmlist_lock */ -static struct vm_struct *__find_vm_area(void *addr) -{ - struct vm_struct *tmp; - - for (tmp = vmlist; tmp != NULL; tmp = tmp->next) { - if (tmp->addr == addr) - break; - } - - return tmp; -} - /* Caller must hold vmlist_lock */ struct vm_struct *__remove_vm_area(void *addr) { @@ -330,8 +317,6 @@ void __vunmap(void *addr, int deallocate_pages) return; } - debug_check_no_locks_freed(addr, area->size); - if (deallocate_pages) { int i; @@ -340,7 +325,7 @@ void __vunmap(void *addr, int deallocate_pages) __free_page(area->pages[i]); } - if (area->flags & VM_VPAGES) + if (area->nr_pages > PAGE_SIZE/sizeof(struct page *)) vfree(area->pages); else kfree(area->pages); @@ -427,10 +412,9 @@ void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, area->nr_pages = nr_pages; /* Please note that the recursion is strictly bounded. */ - if (array_size > PAGE_SIZE) { + if (array_size > PAGE_SIZE) pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); - area->flags |= VM_VPAGES; - } else + else pages = kmalloc_node(array_size, (gfp_mask & ~__GFP_HIGHMEM), node); area->pages = pages; if (!area->pages) { @@ -514,32 +498,10 @@ EXPORT_SYMBOL(__vmalloc); */ void *vmalloc(unsigned long size) { - return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); + return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); } EXPORT_SYMBOL(vmalloc); -/** - * vmalloc_user - allocate virtually contiguous memory which has - * been zeroed so it can be mapped to userspace without - * leaking data. - * - * @size: allocation size - */ -void *vmalloc_user(unsigned long size) -{ - struct vm_struct *area; - void *ret; - - ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); - write_lock(&vmlist_lock); - area = __find_vm_area(ret); - area->flags |= VM_USERMAP; - write_unlock(&vmlist_lock); - - return ret; -} -EXPORT_SYMBOL(vmalloc_user); - /** * vmalloc_node - allocate memory on a specific node * @@ -554,7 +516,7 @@ EXPORT_SYMBOL(vmalloc_user); */ void *vmalloc_node(unsigned long size, int node) { - return __vmalloc_node(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL, node); + return __vmalloc_node(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL, node); } EXPORT_SYMBOL(vmalloc_node); @@ -594,28 +556,6 @@ void *vmalloc_32(unsigned long size) } EXPORT_SYMBOL(vmalloc_32); -/** - * vmalloc_32_user - allocate virtually contiguous memory (32bit - * addressable) which is zeroed so it can be - * mapped to userspace without leaking data. - * - * @size: allocation size - */ -void *vmalloc_32_user(unsigned long size) -{ - struct vm_struct *area; - void *ret; - - ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); - write_lock(&vmlist_lock); - area = __find_vm_area(ret); - area->flags |= VM_USERMAP; - write_unlock(&vmlist_lock); - - return ret; -} -EXPORT_SYMBOL(vmalloc_32_user); - long vread(char *buf, char *addr, unsigned long count) { struct vm_struct *tmp; @@ -690,64 +630,3 @@ finished: read_unlock(&vmlist_lock); return buf - buf_start; } - -/** - * remap_vmalloc_range - map vmalloc pages to userspace - * - * @vma: vma to cover (map full range of vma) - * @addr: vmalloc memory - * @pgoff: number of pages into addr before first page to map - * @returns: 0 for success, -Exxx on failure - * - * This function checks that addr is a valid vmalloc'ed area, and - * that it is big enough to cover the vma. Will return failure if - * that criteria isn't met. - * - * Similar to remap_pfn_range (see mm/memory.c) - */ -int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, - unsigned long pgoff) -{ - struct vm_struct *area; - unsigned long uaddr = vma->vm_start; - unsigned long usize = vma->vm_end - vma->vm_start; - int ret; - - if ((PAGE_SIZE-1) & (unsigned long)addr) - return -EINVAL; - - read_lock(&vmlist_lock); - area = __find_vm_area(addr); - if (!area) - goto out_einval_locked; - - if (!(area->flags & VM_USERMAP)) - goto out_einval_locked; - - if (usize + (pgoff << PAGE_SHIFT) > area->size - PAGE_SIZE) - goto out_einval_locked; - read_unlock(&vmlist_lock); - - addr += pgoff << PAGE_SHIFT; - do { - struct page *page = vmalloc_to_page(addr); - ret = vm_insert_page(vma, uaddr, page); - if (ret) - return ret; - - uaddr += PAGE_SIZE; - addr += PAGE_SIZE; - usize -= PAGE_SIZE; - } while (usize > 0); - - /* Prevent "things" like memory migration? VM_flags need a cleanup... */ - vma->vm_flags |= VM_RESERVED; - - return ret; - -out_einval_locked: - read_unlock(&vmlist_lock); - return -EINVAL; -} -EXPORT_SYMBOL(remap_vmalloc_range); - diff --git a/mm/vmscan.c b/mm/vmscan.c index 37951bacb..840092d46 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -47,6 +46,8 @@ struct scan_control { /* Incremented by the number of inactive pages that were scanned */ unsigned long nr_scanned; + unsigned long nr_mapped; /* From page_state */ + /* This context's GFP mask */ gfp_t gfp_mask; @@ -60,10 +61,6 @@ struct scan_control { * In this context, it doesn't matter that we scan the * whole list at once. */ int swap_cluster_max; - - int swappiness; - - int all_unreclaimable; }; /* @@ -111,7 +108,7 @@ struct shrinker { * From 0 .. 100. Higher means more swappy. */ int vm_swappiness = 60; -long vm_total_pages; /* The total number of pages which the VM controls */ +static long total_memory; static LIST_HEAD(shrinker_list); static DECLARE_RWSEM(shrinker_rwsem); @@ -217,7 +214,7 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, break; if (shrink_ret < nr_before) ret += nr_before - shrink_ret; - count_vm_events(SLABS_SCANNED, this_scan); + mod_page_state(slabs_scanned, this_scan); total_scan -= this_scan; cond_resched(); @@ -291,23 +288,11 @@ static void handle_write_error(struct address_space *mapping, unlock_page(page); } -/* possible outcome of pageout() */ -typedef enum { - /* failed to write page out, page is locked */ - PAGE_KEEP, - /* move page to the active list, page is locked */ - PAGE_ACTIVATE, - /* page has been sent to the disk successfully, page is unlocked */ - PAGE_SUCCESS, - /* page is clean and locked */ - PAGE_CLEAN, -} pageout_t; - /* * pageout is called by shrink_page_list() for each dirty page. * Calls ->writepage(). */ -static pageout_t pageout(struct page *page, struct address_space *mapping) +pageout_t pageout(struct page *page, struct address_space *mapping) { /* * If the page is dirty, only perform writeback if that write @@ -352,8 +337,6 @@ static pageout_t pageout(struct page *page, struct address_space *mapping) struct writeback_control wbc = { .sync_mode = WB_SYNC_NONE, .nr_to_write = SWAP_CLUSTER_MAX, - .range_start = 0, - .range_end = LLONG_MAX, .nonblocking = 1, .for_reclaim = 1, }; @@ -571,7 +554,7 @@ keep: list_splice(&ret_pages, page_list); if (pagevec_count(&freed_pvec)) __pagevec_release_nonlru(&freed_pvec); - count_vm_events(PGACTIVATE, pgactivate); + mod_page_state(pgactivate, pgactivate); return nr_reclaimed; } @@ -661,11 +644,11 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, nr_reclaimed += nr_freed; local_irq_disable(); if (current_is_kswapd()) { - __count_zone_vm_events(PGSCAN_KSWAPD, zone, nr_scan); - __count_vm_events(KSWAPD_STEAL, nr_freed); + __mod_page_state_zone(zone, pgscan_kswapd, nr_scan); + __mod_page_state(kswapd_steal, nr_freed); } else - __count_zone_vm_events(PGSCAN_DIRECT, zone, nr_scan); - __count_vm_events(PGACTIVATE, nr_freed); + __mod_page_state_zone(zone, pgscan_direct, nr_scan); + __mod_page_state_zone(zone, pgsteal, nr_freed); if (nr_taken == 0) goto done; @@ -697,25 +680,6 @@ done: return nr_reclaimed; } -/* - * We are about to scan this zone at a certain priority level. If that priority - * level is smaller (ie: more urgent) than the previous priority, then note - * that priority level within the zone. This is done so that when the next - * process comes in to scan this zone, it will immediately start out at this - * priority level rather than having to build up its own scanning priority. - * Here, this priority affects only the reclaim-mapped threshold. - */ -static inline void note_zone_scanning_priority(struct zone *zone, int priority) -{ - if (priority < zone->prev_priority) - zone->prev_priority = priority; -} - -static inline int zone_is_near_oom(struct zone *zone) -{ - return zone->pages_scanned >= (zone->nr_active + zone->nr_inactive)*3; -} - /* * This moves pages from the active list to the inactive list. * @@ -734,7 +698,7 @@ static inline int zone_is_near_oom(struct zone *zone) * But we had to alter page->flags anyway. */ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, - struct scan_control *sc, int priority) + struct scan_control *sc) { unsigned long pgmoved; int pgdeactivate = 0; @@ -751,14 +715,11 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, long distress; long swap_tendency; - if (zone_is_near_oom(zone)) - goto force_reclaim_mapped; - /* * `distress' is a measure of how much trouble we're having * reclaiming pages. 0 -> no problems. 100 -> great trouble. */ - distress = 100 >> min(zone->prev_priority, priority); + distress = 100 >> zone->prev_priority; /* * The point of this algorithm is to decide when to start @@ -766,9 +727,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, * how much memory * is mapped. */ - mapped_ratio = ((global_page_state(NR_FILE_MAPPED) + - global_page_state(NR_ANON_PAGES)) * 100) / - vm_total_pages; + mapped_ratio = (sc->nr_mapped * 100) / total_memory; /* * Now decide how much we really want to unmap some pages. The @@ -782,14 +741,13 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, * A 100% value of vm_swappiness overrides this algorithm * altogether. */ - swap_tendency = mapped_ratio / 2 + distress + sc->swappiness; + swap_tendency = mapped_ratio / 2 + distress + vm_swappiness; /* * Now use this metric to decide whether to start moving mapped * memory onto the inactive list. */ if (swap_tendency >= 100) -force_reclaim_mapped: reclaim_mapped = 1; } @@ -866,10 +824,11 @@ force_reclaim_mapped: } } zone->nr_active += pgmoved; + spin_unlock(&zone->lru_lock); - __count_zone_vm_events(PGREFILL, zone, pgscanned); - __count_vm_events(PGDEACTIVATE, pgdeactivate); - spin_unlock_irq(&zone->lru_lock); + __mod_page_state_zone(zone, pgrefill, pgscanned); + __mod_page_state(pgdeactivate, pgdeactivate); + local_irq_enable(); pagevec_release(&pvec); } @@ -910,7 +869,7 @@ static unsigned long shrink_zone(int priority, struct zone *zone, nr_to_scan = min(nr_active, (unsigned long)sc->swap_cluster_max); nr_active -= nr_to_scan; - shrink_active_list(nr_to_scan, zone, sc, priority); + shrink_active_list(nr_to_scan, zone, sc); } if (nr_inactive) { @@ -950,7 +909,6 @@ static unsigned long shrink_zones(int priority, struct zone **zones, unsigned long nr_reclaimed = 0; int i; - sc->all_unreclaimable = 1; for (i = 0; zones[i] != NULL; i++) { struct zone *zone = zones[i]; @@ -960,13 +918,13 @@ static unsigned long shrink_zones(int priority, struct zone **zones, if (!cpuset_zone_allowed(zone, __GFP_HARDWALL)) continue; - note_zone_scanning_priority(zone, priority); + zone->temp_priority = priority; + if (zone->prev_priority > priority) + zone->prev_priority = priority; if (zone->all_unreclaimable && priority != DEF_PRIORITY) continue; /* Let kswapd poll it */ - sc->all_unreclaimable = 0; - nr_reclaimed += shrink_zone(priority, zone, sc); } return nr_reclaimed; @@ -999,10 +957,9 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) .may_writepage = !laptop_mode, .swap_cluster_max = SWAP_CLUSTER_MAX, .may_swap = 1, - .swappiness = vm_swappiness, }; - count_vm_event(ALLOCSTALL); + inc_page_state(allocstall); for (i = 0; zones[i] != NULL; i++) { struct zone *zone = zones[i]; @@ -1010,10 +967,12 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) if (!cpuset_zone_allowed(zone, __GFP_HARDWALL)) continue; + zone->temp_priority = DEF_PRIORITY; lru_pages += zone->nr_active + zone->nr_inactive; } for (priority = DEF_PRIORITY; priority >= 0; priority--) { + sc.nr_mapped = read_page_state(nr_mapped); sc.nr_scanned = 0; if (!priority) disable_swap_token(); @@ -1046,27 +1005,14 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) if (sc.nr_scanned && priority < DEF_PRIORITY - 2) blk_congestion_wait(WRITE, HZ/10); } - /* top priority shrink_caches still had more to do? don't OOM, then */ - if (!sc.all_unreclaimable || nr_reclaimed) - ret = 1; - out: - /* - * Now that we've scanned all the zones at this priority level, note - * that level within the zone so that the next thread which performs - * scanning of this zone will immediately start out at this priority - * level. This affects only the decision whether or not to bring - * mapped pages onto the inactive list. - */ - if (priority < 0) - priority = 0; for (i = 0; zones[i] != 0; i++) { struct zone *zone = zones[i]; if (!cpuset_zone_allowed(zone, __GFP_HARDWALL)) continue; - zone->prev_priority = priority; + zone->prev_priority = zone->temp_priority; } return ret; } @@ -1075,6 +1021,10 @@ out: * For kswapd, balance_pgdat() will work across all this node's zones until * they are all at pages_high. * + * If `nr_pages' is non-zero then it is the number of pages which are to be + * reclaimed, regardless of the zone occupancies. This is a software suspend + * special. + * * Returns the number of pages which were actually freed. * * There is special handling here for zones which are full of pinned pages. @@ -1092,8 +1042,10 @@ out: * the page allocator fallback scheme to ensure that aging of pages is balanced * across the zones. */ -static unsigned long balance_pgdat(pg_data_t *pgdat, int order) +static unsigned long balance_pgdat(pg_data_t *pgdat, unsigned long nr_pages, + int order) { + unsigned long to_free = nr_pages; int all_zones_ok; int priority; int i; @@ -1103,23 +1055,22 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order) struct scan_control sc = { .gfp_mask = GFP_KERNEL, .may_swap = 1, - .swap_cluster_max = SWAP_CLUSTER_MAX, - .swappiness = vm_swappiness, + .swap_cluster_max = nr_pages ? nr_pages : SWAP_CLUSTER_MAX, }; - /* - * temp_priority is used to remember the scanning priority at which - * this zone was successfully refilled to free_pages == pages_high. - */ - int temp_priority[MAX_NR_ZONES]; loop_again: total_scanned = 0; nr_reclaimed = 0; sc.may_writepage = !laptop_mode; - count_vm_event(PAGEOUTRUN); + sc.nr_mapped = read_page_state(nr_mapped); - for (i = 0; i < pgdat->nr_zones; i++) - temp_priority[i] = DEF_PRIORITY; + inc_page_state(pageoutrun); + + for (i = 0; i < pgdat->nr_zones; i++) { + struct zone *zone = pgdat->node_zones + i; + + zone->temp_priority = DEF_PRIORITY; + } for (priority = DEF_PRIORITY; priority >= 0; priority--) { int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ @@ -1131,26 +1082,31 @@ loop_again: all_zones_ok = 1; - /* - * Scan in the highmem->dma direction for the highest - * zone which needs scanning - */ - for (i = pgdat->nr_zones - 1; i >= 0; i--) { - struct zone *zone = pgdat->node_zones + i; + if (nr_pages == 0) { + /* + * Scan in the highmem->dma direction for the highest + * zone which needs scanning + */ + for (i = pgdat->nr_zones - 1; i >= 0; i--) { + struct zone *zone = pgdat->node_zones + i; - if (!populated_zone(zone)) - continue; + if (!populated_zone(zone)) + continue; - if (zone->all_unreclaimable && priority != DEF_PRIORITY) - continue; + if (zone->all_unreclaimable && + priority != DEF_PRIORITY) + continue; - if (!zone_watermark_ok(zone, order, zone->pages_high, - 0, 0)) { - end_zone = i; - goto scan; + if (!zone_watermark_ok(zone, order, + zone->pages_high, 0, 0)) { + end_zone = i; + goto scan; + } } + goto out; + } else { + end_zone = pgdat->nr_zones - 1; } - goto out; scan: for (i = 0; i <= end_zone; i++) { struct zone *zone = pgdat->node_zones + i; @@ -1177,12 +1133,15 @@ scan: if (zone->all_unreclaimable && priority != DEF_PRIORITY) continue; - if (!zone_watermark_ok(zone, order, zone->pages_high, - end_zone, 0)) - all_zones_ok = 0; - temp_priority[i] = priority; + if (nr_pages == 0) { /* Not software suspend */ + if (!zone_watermark_ok(zone, order, + zone->pages_high, end_zone, 0)) + all_zones_ok = 0; + } + zone->temp_priority = priority; + if (zone->prev_priority > priority) + zone->prev_priority = priority; sc.nr_scanned = 0; - note_zone_scanning_priority(zone, priority); nr_reclaimed += shrink_zone(priority, zone, &sc); reclaim_state->reclaimed_slab = 0; nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL, @@ -1192,7 +1151,7 @@ scan: if (zone->all_unreclaimable) continue; if (nr_slab == 0 && zone->pages_scanned >= - (zone->nr_active + zone->nr_inactive) * 6) + (zone->nr_active + zone->nr_inactive) * 4) zone->all_unreclaimable = 1; /* * If we've done a decent amount of scanning and @@ -1203,6 +1162,8 @@ scan: total_scanned > nr_reclaimed + nr_reclaimed / 2) sc.may_writepage = 1; } + if (nr_pages && to_free > nr_reclaimed) + continue; /* swsusp: need to do more work */ if (all_zones_ok) break; /* kswapd: all done */ /* @@ -1218,19 +1179,14 @@ scan: * matches the direct reclaim path behaviour in terms of impact * on zone->*_priority. */ - if (nr_reclaimed >= SWAP_CLUSTER_MAX) + if ((nr_reclaimed >= SWAP_CLUSTER_MAX) && !nr_pages) break; } out: - /* - * Note within each zone the priority level at which this zone was - * brought into a happy state. So that the next thread which scans this - * zone will start out at that priority level. - */ for (i = 0; i < pgdat->nr_zones; i++) { struct zone *zone = pgdat->node_zones + i; - zone->prev_priority = temp_priority[i]; + zone->prev_priority = zone->temp_priority; } if (!all_zones_ok) { cond_resched(); @@ -1264,6 +1220,7 @@ static int kswapd(void *p) }; cpumask_t cpumask; + daemonize("kswapd%d", pgdat->node_id); cpumask = node_to_cpumask(pgdat->node_id); if (!cpus_empty(cpumask)) set_cpus_allowed(tsk, cpumask); @@ -1304,7 +1261,7 @@ static int kswapd(void *p) } finish_wait(&pgdat->kswapd_wait, &wait); - balance_pgdat(pgdat, order); + balance_pgdat(pgdat, 0, order); } return 0; } @@ -1333,152 +1290,35 @@ void wakeup_kswapd(struct zone *zone, int order) #ifdef CONFIG_PM /* - * Helper function for shrink_all_memory(). Tries to reclaim 'nr_pages' pages - * from LRU lists system-wide, for given pass and priority, and returns the - * number of reclaimed pages - * - * For pass > 3 we also try to shrink the LRU lists that contain a few pages - */ -static unsigned long shrink_all_zones(unsigned long nr_pages, int pass, - int prio, struct scan_control *sc) -{ - struct zone *zone; - unsigned long nr_to_scan, ret = 0; - - for_each_zone(zone) { - - if (!populated_zone(zone)) - continue; - - if (zone->all_unreclaimable && prio != DEF_PRIORITY) - continue; - - /* For pass = 0 we don't shrink the active list */ - if (pass > 0) { - zone->nr_scan_active += (zone->nr_active >> prio) + 1; - if (zone->nr_scan_active >= nr_pages || pass > 3) { - zone->nr_scan_active = 0; - nr_to_scan = min(nr_pages, zone->nr_active); - shrink_active_list(nr_to_scan, zone, sc, prio); - } - } - - zone->nr_scan_inactive += (zone->nr_inactive >> prio) + 1; - if (zone->nr_scan_inactive >= nr_pages || pass > 3) { - zone->nr_scan_inactive = 0; - nr_to_scan = min(nr_pages, zone->nr_inactive); - ret += shrink_inactive_list(nr_to_scan, zone, sc); - if (ret >= nr_pages) - return ret; - } - } - - return ret; -} - -/* - * Try to free `nr_pages' of memory, system-wide, and return the number of - * freed pages. - * - * Rather than trying to age LRUs the aim is to preserve the overall - * LRU order by reclaiming preferentially - * inactive > active > active referenced > active mapped + * Try to free `nr_pages' of memory, system-wide. Returns the number of freed + * pages. */ unsigned long shrink_all_memory(unsigned long nr_pages) { - unsigned long lru_pages, nr_slab; + pg_data_t *pgdat; + unsigned long nr_to_free = nr_pages; unsigned long ret = 0; - int pass; - struct reclaim_state reclaim_state; - struct zone *zone; - struct scan_control sc = { - .gfp_mask = GFP_KERNEL, - .may_swap = 0, - .swap_cluster_max = nr_pages, - .may_writepage = 1, - .swappiness = vm_swappiness, + unsigned retry = 2; + struct reclaim_state reclaim_state = { + .reclaimed_slab = 0, }; current->reclaim_state = &reclaim_state; - - lru_pages = 0; - for_each_zone(zone) - lru_pages += zone->nr_active + zone->nr_inactive; - - nr_slab = global_page_state(NR_SLAB); - /* If slab caches are huge, it's better to hit them first */ - while (nr_slab >= lru_pages) { - reclaim_state.reclaimed_slab = 0; - shrink_slab(nr_pages, sc.gfp_mask, lru_pages); - if (!reclaim_state.reclaimed_slab) +repeat: + for_each_online_pgdat(pgdat) { + unsigned long freed; + + freed = balance_pgdat(pgdat, nr_to_free, 0); + ret += freed; + nr_to_free -= freed; + if ((long)nr_to_free <= 0) break; - - ret += reclaim_state.reclaimed_slab; - if (ret >= nr_pages) - goto out; - - nr_slab -= reclaim_state.reclaimed_slab; } - - /* - * We try to shrink LRUs in 5 passes: - * 0 = Reclaim from inactive_list only - * 1 = Reclaim from active list but don't reclaim mapped - * 2 = 2nd pass of type 1 - * 3 = Reclaim mapped (normal reclaim) - * 4 = 2nd pass of type 3 - */ - for (pass = 0; pass < 5; pass++) { - int prio; - - /* Needed for shrinking slab caches later on */ - if (!lru_pages) - for_each_zone(zone) { - lru_pages += zone->nr_active; - lru_pages += zone->nr_inactive; - } - - /* Force reclaiming mapped pages in the passes #3 and #4 */ - if (pass > 2) { - sc.may_swap = 1; - sc.swappiness = 100; - } - - for (prio = DEF_PRIORITY; prio >= 0; prio--) { - unsigned long nr_to_scan = nr_pages - ret; - - sc.nr_scanned = 0; - ret += shrink_all_zones(nr_to_scan, prio, pass, &sc); - if (ret >= nr_pages) - goto out; - - reclaim_state.reclaimed_slab = 0; - shrink_slab(sc.nr_scanned, sc.gfp_mask, lru_pages); - ret += reclaim_state.reclaimed_slab; - if (ret >= nr_pages) - goto out; - - if (sc.nr_scanned && prio < DEF_PRIORITY - 2) - blk_congestion_wait(WRITE, HZ / 10); - } - - lru_pages = 0; + if (retry-- && ret < nr_pages) { + blk_congestion_wait(WRITE, HZ/5); + goto repeat; } - - /* - * If ret = 0, we could not shrink LRUs, but there may be something - * in slab caches - */ - if (!ret) - do { - reclaim_state.reclaimed_slab = 0; - shrink_slab(nr_pages, sc.gfp_mask, lru_pages); - ret += reclaim_state.reclaimed_slab; - } while (ret < nr_pages && reclaim_state.reclaimed_slab > 0); - -out: current->reclaim_state = NULL; - return ret; } #endif @@ -1488,7 +1328,7 @@ out: not required for correctness. So if the last cpu in a node goes away, we get changed to run anywhere: as the first one comes back, restore their cpu bindings. */ -static int __devinit cpu_callback(struct notifier_block *nfb, +static int cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { pg_data_t *pgdat; @@ -1506,35 +1346,21 @@ static int __devinit cpu_callback(struct notifier_block *nfb, } #endif /* CONFIG_HOTPLUG_CPU */ -/* - * This kswapd start function will be called by init and node-hot-add. - * On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added. - */ -int kswapd_run(int nid) -{ - pg_data_t *pgdat = NODE_DATA(nid); - int ret = 0; - - if (pgdat->kswapd) - return 0; - - pgdat->kswapd = kthread_run(kswapd, pgdat, "kswapd%d", nid); - if (IS_ERR(pgdat->kswapd)) { - /* failure at boot is fatal */ - BUG_ON(system_state == SYSTEM_BOOTING); - printk("Failed to start kswapd on node %d\n",nid); - ret = -1; - } - return ret; -} - static int __init kswapd_init(void) { - int nid; + pg_data_t *pgdat; swap_setup(); - for_each_online_node(nid) - kswapd_run(nid); + for_each_online_pgdat(pgdat) { + pid_t pid; + + pid = kernel_thread(kswapd, pgdat, CLONE_KERNEL); + BUG_ON(pid < 0); + read_lock(&tasklist_lock); + pgdat->kswapd = find_task_by_real_pid(pid); + read_unlock(&tasklist_lock); + } + total_memory = nr_free_pagecache_pages(); hotcpu_notifier(cpu_callback, 0); return 0; } @@ -1547,6 +1373,10 @@ module_init(kswapd_init) * * If non-zero call zone_reclaim when the number of free pages falls below * the watermarks. + * + * In the future we may add flags to the mode. However, the page allocator + * should only have to check that zone_reclaim_mode != 0 before calling + * zone_reclaim(). */ int zone_reclaim_mode __read_mostly; @@ -1554,6 +1384,12 @@ int zone_reclaim_mode __read_mostly; #define RECLAIM_ZONE (1<<0) /* Run shrink_cache on the zone */ #define RECLAIM_WRITE (1<<1) /* Writeout pages during reclaim */ #define RECLAIM_SWAP (1<<2) /* Swap pages out during reclaim */ +#define RECLAIM_SLAB (1<<3) /* Do a global slab shrink if the zone is out of memory */ + +/* + * Mininum time between zone reclaim scans + */ +int zone_reclaim_interval __read_mostly = 30*HZ; /* * Priority for ZONE_RECLAIM. This determines the fraction of pages @@ -1562,18 +1398,6 @@ int zone_reclaim_mode __read_mostly; */ #define ZONE_RECLAIM_PRIORITY 4 -/* - * Percentage of pages in a zone that must be unmapped for zone_reclaim to - * occur. - */ -int sysctl_min_unmapped_ratio = 1; - -/* - * If the number of slab pages in a zone grows beyond this percentage then - * slab reclaim needs to occur. - */ -int sysctl_min_slab_ratio = 5; - /* * Try to free up some pages from this zone through reclaim. */ @@ -1588,10 +1412,10 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) struct scan_control sc = { .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), .may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP), + .nr_mapped = read_page_state(nr_mapped), .swap_cluster_max = max_t(unsigned long, nr_pages, SWAP_CLUSTER_MAX), .gfp_mask = gfp_mask, - .swappiness = vm_swappiness, }; disable_swap_token(); @@ -1605,42 +1429,43 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) reclaim_state.reclaimed_slab = 0; p->reclaim_state = &reclaim_state; - if (zone_page_state(zone, NR_FILE_PAGES) - - zone_page_state(zone, NR_FILE_MAPPED) > - zone->min_unmapped_ratio) { - /* - * Free memory by calling shrink zone with increasing - * priorities until we have enough memory freed. - */ - priority = ZONE_RECLAIM_PRIORITY; - do { - note_zone_scanning_priority(zone, priority); - nr_reclaimed += shrink_zone(priority, zone, &sc); - priority--; - } while (priority >= 0 && nr_reclaimed < nr_pages); - } + /* + * Free memory by calling shrink zone with increasing priorities + * until we have enough memory freed. + */ + priority = ZONE_RECLAIM_PRIORITY; + do { + nr_reclaimed += shrink_zone(priority, zone, &sc); + priority--; + } while (priority >= 0 && nr_reclaimed < nr_pages); - if (zone_page_state(zone, NR_SLAB) > zone->min_slab_pages) { + if (nr_reclaimed < nr_pages && (zone_reclaim_mode & RECLAIM_SLAB)) { /* * shrink_slab() does not currently allow us to determine how - * many pages were freed in this zone. So we take the current - * number of slab pages and shake the slab until it is reduced - * by the same nr_pages that we used for reclaiming unmapped - * pages. + * many pages were freed in this zone. So we just shake the slab + * a bit and then go off node for this particular allocation + * despite possibly having freed enough memory to allocate in + * this zone. If we freed local memory then the next + * allocations will be local again. * - * Note that shrink_slab will free memory on all zones and may - * take a long time. + * shrink_slab will free memory on all zones and may take + * a long time. */ - unsigned long limit = zone_page_state(zone, - NR_SLAB) - nr_pages; - - while (shrink_slab(sc.nr_scanned, gfp_mask, order) && - zone_page_state(zone, NR_SLAB) > limit) - ; + shrink_slab(sc.nr_scanned, gfp_mask, order); } p->reclaim_state = NULL; current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE); + + if (nr_reclaimed == 0) { + /* + * We were unable to reclaim enough pages to stay on node. We + * now allow off node accesses for a certain time period before + * trying again to reclaim pages from the local zone. + */ + zone->last_unsuccessful_zone_reclaim = jiffies; + } + return nr_reclaimed >= nr_pages; } @@ -1650,20 +1475,14 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) int node_id; /* - * Zone reclaim reclaims unmapped file backed pages and - * slab pages if we are over the defined limits. - * - * A small portion of unmapped file backed pages is needed for - * file I/O otherwise pages read by file I/O will be immediately - * thrown out if the zone is overallocated. So we do not reclaim - * if less than a specified percentage of the zone is used by - * unmapped file backed pages. + * Do not reclaim if there was a recent unsuccessful attempt at zone + * reclaim. In that case we let allocations go off node for the + * zone_reclaim_interval. Otherwise we would scan for each off-node + * page allocation. */ - if (zone_page_state(zone, NR_FILE_PAGES) - - zone_page_state(zone, NR_FILE_MAPPED) <= zone->min_unmapped_ratio - && zone_page_state(zone, NR_SLAB) - <= zone->min_slab_pages) - return 0; + if (time_before(jiffies, + zone->last_unsuccessful_zone_reclaim + zone_reclaim_interval)) + return 0; /* * Avoid concurrent zone reclaims, do not reclaim in a zone that does diff --git a/mm/vmstat.c b/mm/vmstat.c deleted file mode 100644 index 321668aa6..000000000 --- a/mm/vmstat.c +++ /dev/null @@ -1,701 +0,0 @@ -/* - * linux/mm/vmstat.c - * - * Manages VM statistics - * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds - * - * zoned VM statistics - * Copyright (C) 2006 Silicon Graphics, Inc., - * Christoph Lameter - */ - -#include -#include -#include - -void __get_zone_counts(unsigned long *active, unsigned long *inactive, - unsigned long *free, struct pglist_data *pgdat) -{ - struct zone *zones = pgdat->node_zones; - int i; - - *active = 0; - *inactive = 0; - *free = 0; - for (i = 0; i < MAX_NR_ZONES; i++) { - *active += zones[i].nr_active; - *inactive += zones[i].nr_inactive; - *free += zones[i].free_pages; - } -} - -void get_zone_counts(unsigned long *active, - unsigned long *inactive, unsigned long *free) -{ - struct pglist_data *pgdat; - - *active = 0; - *inactive = 0; - *free = 0; - for_each_online_pgdat(pgdat) { - unsigned long l, m, n; - __get_zone_counts(&l, &m, &n, pgdat); - *active += l; - *inactive += m; - *free += n; - } -} - -#ifdef CONFIG_VM_EVENT_COUNTERS -DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}}; -EXPORT_PER_CPU_SYMBOL(vm_event_states); - -static void sum_vm_events(unsigned long *ret, cpumask_t *cpumask) -{ - int cpu = 0; - int i; - - memset(ret, 0, NR_VM_EVENT_ITEMS * sizeof(unsigned long)); - - cpu = first_cpu(*cpumask); - while (cpu < NR_CPUS) { - struct vm_event_state *this = &per_cpu(vm_event_states, cpu); - - cpu = next_cpu(cpu, *cpumask); - - if (cpu < NR_CPUS) - prefetch(&per_cpu(vm_event_states, cpu)); - - - for (i = 0; i < NR_VM_EVENT_ITEMS; i++) - ret[i] += this->event[i]; - } -} - -/* - * Accumulate the vm event counters across all CPUs. - * The result is unavoidably approximate - it can change - * during and after execution of this function. -*/ -void all_vm_events(unsigned long *ret) -{ - sum_vm_events(ret, &cpu_online_map); -} -EXPORT_SYMBOL_GPL(all_vm_events); - -#ifdef CONFIG_HOTPLUG -/* - * Fold the foreign cpu events into our own. - * - * This is adding to the events on one processor - * but keeps the global counts constant. - */ -void vm_events_fold_cpu(int cpu) -{ - struct vm_event_state *fold_state = &per_cpu(vm_event_states, cpu); - int i; - - for (i = 0; i < NR_VM_EVENT_ITEMS; i++) { - count_vm_events(i, fold_state->event[i]); - fold_state->event[i] = 0; - } -} -#endif /* CONFIG_HOTPLUG */ - -#endif /* CONFIG_VM_EVENT_COUNTERS */ - -/* - * Manage combined zone based / global counters - * - * vm_stat contains the global counters - */ -atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; -EXPORT_SYMBOL(vm_stat); - -#ifdef CONFIG_SMP - -static int calculate_threshold(struct zone *zone) -{ - int threshold; - int mem; /* memory in 128 MB units */ - - /* - * The threshold scales with the number of processors and the amount - * of memory per zone. More memory means that we can defer updates for - * longer, more processors could lead to more contention. - * fls() is used to have a cheap way of logarithmic scaling. - * - * Some sample thresholds: - * - * Threshold Processors (fls) Zonesize fls(mem+1) - * ------------------------------------------------------------------ - * 8 1 1 0.9-1 GB 4 - * 16 2 2 0.9-1 GB 4 - * 20 2 2 1-2 GB 5 - * 24 2 2 2-4 GB 6 - * 28 2 2 4-8 GB 7 - * 32 2 2 8-16 GB 8 - * 4 2 2 <128M 1 - * 30 4 3 2-4 GB 5 - * 48 4 3 8-16 GB 8 - * 32 8 4 1-2 GB 4 - * 32 8 4 0.9-1GB 4 - * 10 16 5 <128M 1 - * 40 16 5 900M 4 - * 70 64 7 2-4 GB 5 - * 84 64 7 4-8 GB 6 - * 108 512 9 4-8 GB 6 - * 125 1024 10 8-16 GB 8 - * 125 1024 10 16-32 GB 9 - */ - - mem = zone->present_pages >> (27 - PAGE_SHIFT); - - threshold = 2 * fls(num_online_cpus()) * (1 + fls(mem)); - - /* - * Maximum threshold is 125 - */ - threshold = min(125, threshold); - - return threshold; -} - -/* - * Refresh the thresholds for each zone. - */ -static void refresh_zone_stat_thresholds(void) -{ - struct zone *zone; - int cpu; - int threshold; - - for_each_zone(zone) { - - if (!zone->present_pages) - continue; - - threshold = calculate_threshold(zone); - - for_each_online_cpu(cpu) - zone_pcp(zone, cpu)->stat_threshold = threshold; - } -} - -/* - * For use when we know that interrupts are disabled. - */ -void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, - int delta) -{ - struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); - s8 *p = pcp->vm_stat_diff + item; - long x; - - x = delta + *p; - - if (unlikely(x > pcp->stat_threshold || x < -pcp->stat_threshold)) { - zone_page_state_add(x, zone, item); - x = 0; - } - *p = x; -} -EXPORT_SYMBOL(__mod_zone_page_state); - -/* - * For an unknown interrupt state - */ -void mod_zone_page_state(struct zone *zone, enum zone_stat_item item, - int delta) -{ - unsigned long flags; - - local_irq_save(flags); - __mod_zone_page_state(zone, item, delta); - local_irq_restore(flags); -} -EXPORT_SYMBOL(mod_zone_page_state); - -/* - * Optimized increment and decrement functions. - * - * These are only for a single page and therefore can take a struct page * - * argument instead of struct zone *. This allows the inclusion of the code - * generated for page_zone(page) into the optimized functions. - * - * No overflow check is necessary and therefore the differential can be - * incremented or decremented in place which may allow the compilers to - * generate better code. - * The increment or decrement is known and therefore one boundary check can - * be omitted. - * - * NOTE: These functions are very performance sensitive. Change only - * with care. - * - * Some processors have inc/dec instructions that are atomic vs an interrupt. - * However, the code must first determine the differential location in a zone - * based on the processor number and then inc/dec the counter. There is no - * guarantee without disabling preemption that the processor will not change - * in between and therefore the atomicity vs. interrupt cannot be exploited - * in a useful way here. - */ -static void __inc_zone_state(struct zone *zone, enum zone_stat_item item) -{ - struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); - s8 *p = pcp->vm_stat_diff + item; - - (*p)++; - - if (unlikely(*p > pcp->stat_threshold)) { - int overstep = pcp->stat_threshold / 2; - - zone_page_state_add(*p + overstep, zone, item); - *p = -overstep; - } -} - -void __inc_zone_page_state(struct page *page, enum zone_stat_item item) -{ - __inc_zone_state(page_zone(page), item); -} -EXPORT_SYMBOL(__inc_zone_page_state); - -void __dec_zone_page_state(struct page *page, enum zone_stat_item item) -{ - struct zone *zone = page_zone(page); - struct per_cpu_pageset *pcp = zone_pcp(zone, smp_processor_id()); - s8 *p = pcp->vm_stat_diff + item; - - (*p)--; - - if (unlikely(*p < - pcp->stat_threshold)) { - int overstep = pcp->stat_threshold / 2; - - zone_page_state_add(*p - overstep, zone, item); - *p = overstep; - } -} -EXPORT_SYMBOL(__dec_zone_page_state); - -void inc_zone_state(struct zone *zone, enum zone_stat_item item) -{ - unsigned long flags; - - local_irq_save(flags); - __inc_zone_state(zone, item); - local_irq_restore(flags); -} - -void inc_zone_page_state(struct page *page, enum zone_stat_item item) -{ - unsigned long flags; - struct zone *zone; - - zone = page_zone(page); - local_irq_save(flags); - __inc_zone_state(zone, item); - local_irq_restore(flags); -} -EXPORT_SYMBOL(inc_zone_page_state); - -void dec_zone_page_state(struct page *page, enum zone_stat_item item) -{ - unsigned long flags; - - local_irq_save(flags); - __dec_zone_page_state(page, item); - local_irq_restore(flags); -} -EXPORT_SYMBOL(dec_zone_page_state); - -/* - * Update the zone counters for one cpu. - */ -void refresh_cpu_vm_stats(int cpu) -{ - struct zone *zone; - int i; - unsigned long flags; - - for_each_zone(zone) { - struct per_cpu_pageset *pcp; - - pcp = zone_pcp(zone, cpu); - - for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) - if (pcp->vm_stat_diff[i]) { - local_irq_save(flags); - zone_page_state_add(pcp->vm_stat_diff[i], - zone, i); - pcp->vm_stat_diff[i] = 0; - local_irq_restore(flags); - } - } -} - -static void __refresh_cpu_vm_stats(void *dummy) -{ - refresh_cpu_vm_stats(smp_processor_id()); -} - -/* - * Consolidate all counters. - * - * Note that the result is less inaccurate but still inaccurate - * if concurrent processes are allowed to run. - */ -void refresh_vm_stats(void) -{ - on_each_cpu(__refresh_cpu_vm_stats, NULL, 0, 1); -} -EXPORT_SYMBOL(refresh_vm_stats); - -#endif - -#ifdef CONFIG_NUMA -/* - * zonelist = the list of zones passed to the allocator - * z = the zone from which the allocation occurred. - * - * Must be called with interrupts disabled. - */ -void zone_statistics(struct zonelist *zonelist, struct zone *z) -{ - if (z->zone_pgdat == zonelist->zones[0]->zone_pgdat) { - __inc_zone_state(z, NUMA_HIT); - } else { - __inc_zone_state(z, NUMA_MISS); - __inc_zone_state(zonelist->zones[0], NUMA_FOREIGN); - } - if (z->zone_pgdat == NODE_DATA(numa_node_id())) - __inc_zone_state(z, NUMA_LOCAL); - else - __inc_zone_state(z, NUMA_OTHER); -} -#endif - -#ifdef CONFIG_PROC_FS - -#include - -static void *frag_start(struct seq_file *m, loff_t *pos) -{ - pg_data_t *pgdat; - loff_t node = *pos; - for (pgdat = first_online_pgdat(); - pgdat && node; - pgdat = next_online_pgdat(pgdat)) - --node; - - return pgdat; -} - -static void *frag_next(struct seq_file *m, void *arg, loff_t *pos) -{ - pg_data_t *pgdat = (pg_data_t *)arg; - - (*pos)++; - return next_online_pgdat(pgdat); -} - -static void frag_stop(struct seq_file *m, void *arg) -{ -} - -/* - * This walks the free areas for each zone. - */ -static int frag_show(struct seq_file *m, void *arg) -{ - pg_data_t *pgdat = (pg_data_t *)arg; - struct zone *zone; - struct zone *node_zones = pgdat->node_zones; - unsigned long flags; - int order; - - for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) { - if (!populated_zone(zone)) - continue; - - spin_lock_irqsave(&zone->lock, flags); - seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name); - for (order = 0; order < MAX_ORDER; ++order) - seq_printf(m, "%6lu ", zone->free_area[order].nr_free); - spin_unlock_irqrestore(&zone->lock, flags); - seq_putc(m, '\n'); - } - return 0; -} - -struct seq_operations fragmentation_op = { - .start = frag_start, - .next = frag_next, - .stop = frag_stop, - .show = frag_show, -}; - -static char *vmstat_text[] = { - /* Zoned VM counters */ - "nr_anon_pages", - "nr_mapped", - "nr_file_pages", - "nr_slab", - "nr_page_table_pages", - "nr_dirty", - "nr_writeback", - "nr_unstable", - "nr_bounce", - -#ifdef CONFIG_NUMA - "numa_hit", - "numa_miss", - "numa_foreign", - "numa_interleave", - "numa_local", - "numa_other", -#endif - -#ifdef CONFIG_VM_EVENT_COUNTERS - "pgpgin", - "pgpgout", - "pswpin", - "pswpout", - - "pgalloc_dma", - "pgalloc_dma32", - "pgalloc_normal", - "pgalloc_high", - - "pgfree", - "pgactivate", - "pgdeactivate", - - "pgfault", - "pgmajfault", - - "pgrefill_dma", - "pgrefill_dma32", - "pgrefill_normal", - "pgrefill_high", - - "pgsteal_dma", - "pgsteal_dma32", - "pgsteal_normal", - "pgsteal_high", - - "pgscan_kswapd_dma", - "pgscan_kswapd_dma32", - "pgscan_kswapd_normal", - "pgscan_kswapd_high", - - "pgscan_direct_dma", - "pgscan_direct_dma32", - "pgscan_direct_normal", - "pgscan_direct_high", - - "pginodesteal", - "slabs_scanned", - "kswapd_steal", - "kswapd_inodesteal", - "pageoutrun", - "allocstall", - - "pgrotated", -#endif -}; - -/* - * Output information about zones in @pgdat. - */ -static int zoneinfo_show(struct seq_file *m, void *arg) -{ - pg_data_t *pgdat = arg; - struct zone *zone; - struct zone *node_zones = pgdat->node_zones; - unsigned long flags; - - for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; zone++) { - int i; - - if (!populated_zone(zone)) - continue; - - spin_lock_irqsave(&zone->lock, flags); - seq_printf(m, "Node %d, zone %8s", pgdat->node_id, zone->name); - seq_printf(m, - "\n pages free %lu" - "\n min %lu" - "\n low %lu" - "\n high %lu" - "\n active %lu" - "\n inactive %lu" - "\n scanned %lu (a: %lu i: %lu)" - "\n spanned %lu" - "\n present %lu", - zone->free_pages, - zone->pages_min, - zone->pages_low, - zone->pages_high, - zone->nr_active, - zone->nr_inactive, - zone->pages_scanned, - zone->nr_scan_active, zone->nr_scan_inactive, - zone->spanned_pages, - zone->present_pages); - - for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) - seq_printf(m, "\n %-12s %lu", vmstat_text[i], - zone_page_state(zone, i)); - - seq_printf(m, - "\n protection: (%lu", - zone->lowmem_reserve[0]); - for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++) - seq_printf(m, ", %lu", zone->lowmem_reserve[i]); - seq_printf(m, - ")" - "\n pagesets"); - for_each_online_cpu(i) { - struct per_cpu_pageset *pageset; - int j; - - pageset = zone_pcp(zone, i); - for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { - if (pageset->pcp[j].count) - break; - } - if (j == ARRAY_SIZE(pageset->pcp)) - continue; - for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { - seq_printf(m, - "\n cpu: %i pcp: %i" - "\n count: %i" - "\n high: %i" - "\n batch: %i", - i, j, - pageset->pcp[j].count, - pageset->pcp[j].high, - pageset->pcp[j].batch); - } -#ifdef CONFIG_SMP - seq_printf(m, "\n vm stats threshold: %d", - pageset->stat_threshold); -#endif - } - seq_printf(m, - "\n all_unreclaimable: %u" - "\n prev_priority: %i" - "\n start_pfn: %lu", - zone->all_unreclaimable, - zone->prev_priority, - zone->zone_start_pfn); - spin_unlock_irqrestore(&zone->lock, flags); - seq_putc(m, '\n'); - } - return 0; -} - -struct seq_operations zoneinfo_op = { - .start = frag_start, /* iterate over all zones. The same as in - * fragmentation. */ - .next = frag_next, - .stop = frag_stop, - .show = zoneinfo_show, -}; - -static void *vmstat_start(struct seq_file *m, loff_t *pos) -{ - unsigned long *v; -#ifdef CONFIG_VM_EVENT_COUNTERS - unsigned long *e; -#endif - int i; - - if (*pos >= ARRAY_SIZE(vmstat_text)) - return NULL; - -#ifdef CONFIG_VM_EVENT_COUNTERS - v = kmalloc(NR_VM_ZONE_STAT_ITEMS * sizeof(unsigned long) - + sizeof(struct vm_event_state), GFP_KERNEL); -#else - v = kmalloc(NR_VM_ZONE_STAT_ITEMS * sizeof(unsigned long), - GFP_KERNEL); -#endif - m->private = v; - if (!v) - return ERR_PTR(-ENOMEM); - for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) - v[i] = global_page_state(i); -#ifdef CONFIG_VM_EVENT_COUNTERS - e = v + NR_VM_ZONE_STAT_ITEMS; - all_vm_events(e); - e[PGPGIN] /= 2; /* sectors -> kbytes */ - e[PGPGOUT] /= 2; -#endif - return v + *pos; -} - -static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos) -{ - (*pos)++; - if (*pos >= ARRAY_SIZE(vmstat_text)) - return NULL; - return (unsigned long *)m->private + *pos; -} - -static int vmstat_show(struct seq_file *m, void *arg) -{ - unsigned long *l = arg; - unsigned long off = l - (unsigned long *)m->private; - - seq_printf(m, "%s %lu\n", vmstat_text[off], *l); - return 0; -} - -static void vmstat_stop(struct seq_file *m, void *arg) -{ - kfree(m->private); - m->private = NULL; -} - -struct seq_operations vmstat_op = { - .start = vmstat_start, - .next = vmstat_next, - .stop = vmstat_stop, - .show = vmstat_show, -}; - -#endif /* CONFIG_PROC_FS */ - -#ifdef CONFIG_SMP -/* - * Use the cpu notifier to insure that the thresholds are recalculated - * when necessary. - */ -static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb, - unsigned long action, - void *hcpu) -{ - switch (action) { - case CPU_UP_PREPARE: - case CPU_UP_CANCELED: - case CPU_DEAD: - refresh_zone_stat_thresholds(); - break; - default: - break; - } - return NOTIFY_OK; -} - -static struct notifier_block __cpuinitdata vmstat_notifier = - { &vmstat_cpuup_callback, NULL, 0 }; - -int __init setup_vmstat(void) -{ - refresh_zone_stat_thresholds(); - register_cpu_notifier(&vmstat_notifier); - return 0; -} -module_init(setup_vmstat) -#endif diff --git a/net/802/fc.c b/net/802/fc.c index 2a27e37bc..282c4ab1a 100644 --- a/net/802/fc.c +++ b/net/802/fc.c @@ -10,6 +10,7 @@ * v 1.0 03/22/99 */ +#include #include #include #include diff --git a/net/802/fddi.c b/net/802/fddi.c index 797c6d961..ac242a4bc 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c @@ -26,6 +26,7 @@ * Maciej W. Rozycki : IPv6 support */ +#include #include #include #include diff --git a/net/802/sysctl_net_802.c b/net/802/sysctl_net_802.c index ead560373..700129556 100644 --- a/net/802/sysctl_net_802.c +++ b/net/802/sysctl_net_802.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/802/tr.c b/net/802/tr.c index d7d8f40c4..e9dc803f2 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 18fcb9fa5..729abc439 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -360,14 +360,6 @@ static void vlan_transfer_operstate(const struct net_device *dev, struct net_dev } } -/* - * vlan network devices have devices nesting below it, and are a special - * "super class" of normal network devices; split their locks off into a - * separate class since they always nest. - */ -static struct lock_class_key vlan_netdev_xmit_lock_key; - - /* Attach a VLAN device to a mac address (ie Ethernet Card). * Returns the device that was created, or NULL if there was * an error of some kind. @@ -464,7 +456,6 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name, vlan_setup); - if (new_dev == NULL) goto out_unlock; @@ -477,7 +468,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, new_dev->state = (real_dev->state & ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))) | - (1<<__LINK_STATE_PRESENT); + (1<<__LINK_STATE_PRESENT); /* need 4 bytes for extra VLAN header info, * hope the underlying device can handle it. @@ -525,8 +516,6 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, if (register_netdevice(new_dev)) goto out_free_newdev; - lockdep_set_class(&new_dev->_xmit_lock, &vlan_netdev_xmit_lock_key); - new_dev->iflink = real_dev->ifindex; vlan_transfer_operstate(real_dev, new_dev); linkwatch_fire_event(new_dev); /* _MUST_ call rfc2863_policy() */ @@ -540,11 +529,12 @@ static struct net_device *register_vlan_device(const char *eth_IF_name, * so it cannot "appear" on us. */ if (!grp) { /* need to add a new group */ - grp = kzalloc(sizeof(struct vlan_group), GFP_KERNEL); + grp = kmalloc(sizeof(struct vlan_group), GFP_KERNEL); if (!grp) goto out_free_unregister; /* printk(KERN_ALERT "VLAN REGISTER: Allocated new group.\n"); */ + memset(grp, 0, sizeof(struct vlan_group)); grp->real_dev_ifindex = real_dev->ifindex; hlist_add_head_rcu(&grp->hlist, diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index a8fc0de1f..7b214cffc 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c @@ -17,6 +17,7 @@ * Jan 20, 1998 Ben Greear Initial Version *****************************************************************************/ +#include #include #include /* offsetof(), etc. */ #include /* return codes */ diff --git a/net/Kconfig b/net/Kconfig index 705e6793c..79328dda7 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -66,13 +66,6 @@ source "net/ipv6/Kconfig" endif # if INET -config NETWORK_SECMARK - bool "Security Marking" - help - This enables security marking of network packets, similar - to nfmark, but designated for security purposes. - If you are unsure how to answer this question, answer N. - menuconfig NETFILTER bool "Network packet filtering (replaces ipchains)" ---help--- @@ -192,7 +185,7 @@ source "net/lapb/Kconfig" config NET_DIVERT bool "Frame Diverter (EXPERIMENTAL)" - depends on EXPERIMENTAL && BROKEN + depends on EXPERIMENTAL ---help--- The Frame Diverter allows you to divert packets from the network, that are not aimed at the interface receiving it (in @@ -237,21 +230,6 @@ config NET_PKTGEN To compile this code as a module, choose M here: the module will be called pktgen. -config NET_TCPPROBE - tristate "TCP connection probing" - depends on INET && EXPERIMENTAL && PROC_FS && KPROBES - ---help--- - This module allows for capturing the changes to TCP connection - state in response to incoming packets. It is used for debugging - TCP congestion avoidance modules. If you don't understand - what was just said, you don't need it: say N. - - Documentation on how to use the packet generator can be found - at http://linux-net.osdl.org/index.php/TcpProbe - - To compile this code as a module, choose M here: the - module will be called tcp_probe. - endmenu endmenu diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index f3777ec5b..7076097de 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c @@ -29,6 +29,7 @@ * */ +#include #include #include #include diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c index 7ae4916cd..dc4048dd9 100644 --- a/net/appletalk/atalk_proc.c +++ b/net/appletalk/atalk_proc.c @@ -8,6 +8,7 @@ * Free Software Foundation, version 2. */ +#include #include #include #include diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 96dc6bb52..7b1eb9a4f 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -51,6 +51,7 @@ * */ +#include #include #include #include @@ -227,11 +228,12 @@ static void atif_drop_device(struct net_device *dev) static struct atalk_iface *atif_add_device(struct net_device *dev, struct atalk_addr *sa) { - struct atalk_iface *iface = kzalloc(sizeof(*iface), GFP_KERNEL); + struct atalk_iface *iface = kmalloc(sizeof(*iface), GFP_KERNEL); if (!iface) goto out; + memset(iface, 0, sizeof(*iface)); dev_hold(dev); iface->dev = dev; dev->atalk_ptr = iface; @@ -558,11 +560,12 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint) } if (!rt) { - rt = kzalloc(sizeof(*rt), GFP_ATOMIC); + rt = kmalloc(sizeof(*rt), GFP_ATOMIC); retval = -ENOBUFS; if (!rt) goto out_unlock; + memset(rt, 0, sizeof(*rt)); rt->next = atalk_routes; atalk_routes = rt; diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c index 40b0af743..af7f06043 100644 --- a/net/appletalk/sysctl_net_atalk.c +++ b/net/appletalk/sysctl_net_atalk.c @@ -6,6 +6,7 @@ * Dynamic registration, added aarp entries. (5/30/97 Chris Horn) */ +#include #include #include #include diff --git a/net/atm/Makefile b/net/atm/Makefile index 89656d6c0..d5818751f 100644 --- a/net/atm/Makefile +++ b/net/atm/Makefile @@ -2,7 +2,7 @@ # Makefile for the ATM Protocol Families. # -atm-y := addr.o pvc.o signaling.o svc.o ioctl.o common.o atm_misc.o raw.o resources.o atm_sysfs.o +atm-y := addr.o pvc.o signaling.o svc.o ioctl.o common.o atm_misc.o raw.o resources.o mpoa-objs := mpc.o mpoa_caches.o mpoa_proc.o obj-$(CONFIG_ATM) += atm.o diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c deleted file mode 100644 index c0a4ae28f..000000000 --- a/net/atm/atm_sysfs.c +++ /dev/null @@ -1,175 +0,0 @@ -/* ATM driver model support. */ - -#include -#include -#include -#include -#include "common.h" -#include "resources.h" - -#define to_atm_dev(cldev) container_of(cldev, struct atm_dev, class_dev) - -static ssize_t show_type(struct class_device *cdev, char *buf) -{ - struct atm_dev *adev = to_atm_dev(cdev); - return sprintf(buf, "%s\n", adev->type); -} - -static ssize_t show_address(struct class_device *cdev, char *buf) -{ - char *pos = buf; - struct atm_dev *adev = to_atm_dev(cdev); - int i; - - for (i = 0; i < (ESI_LEN - 1); i++) - pos += sprintf(pos, "%02x:", adev->esi[i]); - pos += sprintf(pos, "%02x\n", adev->esi[i]); - - return pos - buf; -} - -static ssize_t show_atmaddress(struct class_device *cdev, char *buf) -{ - unsigned long flags; - char *pos = buf; - struct atm_dev *adev = to_atm_dev(cdev); - struct atm_dev_addr *aaddr; - int bin[] = { 1, 2, 10, 6, 1 }, *fmt = bin; - int i, j; - - spin_lock_irqsave(&adev->lock, flags); - list_for_each_entry(aaddr, &adev->local, entry) { - for(i = 0, j = 0; i < ATM_ESA_LEN; ++i, ++j) { - if (j == *fmt) { - pos += sprintf(pos, "."); - ++fmt; - j = 0; - } - pos += sprintf(pos, "%02x", aaddr->addr.sas_addr.prv[i]); - } - pos += sprintf(pos, "\n"); - } - spin_unlock_irqrestore(&adev->lock, flags); - - return pos - buf; -} - -static ssize_t show_carrier(struct class_device *cdev, char *buf) -{ - char *pos = buf; - struct atm_dev *adev = to_atm_dev(cdev); - - pos += sprintf(pos, "%d\n", - adev->signal == ATM_PHY_SIG_LOST ? 0 : 1); - - return pos - buf; -} - -static ssize_t show_link_rate(struct class_device *cdev, char *buf) -{ - char *pos = buf; - struct atm_dev *adev = to_atm_dev(cdev); - int link_rate; - - /* show the link rate, not the data rate */ - switch (adev->link_rate) { - case ATM_OC3_PCR: - link_rate = 155520000; - break; - case ATM_OC12_PCR: - link_rate = 622080000; - break; - case ATM_25_PCR: - link_rate = 25600000; - break; - default: - link_rate = adev->link_rate * 8 * 53; - } - pos += sprintf(pos, "%d\n", link_rate); - - return pos - buf; -} - -static CLASS_DEVICE_ATTR(address, S_IRUGO, show_address, NULL); -static CLASS_DEVICE_ATTR(atmaddress, S_IRUGO, show_atmaddress, NULL); -static CLASS_DEVICE_ATTR(carrier, S_IRUGO, show_carrier, NULL); -static CLASS_DEVICE_ATTR(type, S_IRUGO, show_type, NULL); -static CLASS_DEVICE_ATTR(link_rate, S_IRUGO, show_link_rate, NULL); - -static struct class_device_attribute *atm_attrs[] = { - &class_device_attr_atmaddress, - &class_device_attr_address, - &class_device_attr_carrier, - &class_device_attr_type, - &class_device_attr_link_rate, - NULL -}; - -static int atm_uevent(struct class_device *cdev, char **envp, int num_envp, char *buf, int size) -{ - struct atm_dev *adev; - int i = 0, len = 0; - - if (!cdev) - return -ENODEV; - - adev = to_atm_dev(cdev); - if (!adev) - return -ENODEV; - - if (add_uevent_var(envp, num_envp, &i, buf, size, &len, - "NAME=%s%d", adev->type, adev->number)) - return -ENOMEM; - - envp[i] = NULL; - return 0; -} - -static void atm_release(struct class_device *cdev) -{ - struct atm_dev *adev = to_atm_dev(cdev); - - kfree(adev); -} - -static struct class atm_class = { - .name = "atm", - .release = atm_release, - .uevent = atm_uevent, -}; - -int atm_register_sysfs(struct atm_dev *adev) -{ - struct class_device *cdev = &adev->class_dev; - int i, err; - - cdev->class = &atm_class; - class_set_devdata(cdev, adev); - - snprintf(cdev->class_id, BUS_ID_SIZE, "%s%d", adev->type, adev->number); - err = class_device_register(cdev); - if (err < 0) - return err; - - for (i = 0; atm_attrs[i]; i++) - class_device_create_file(cdev, atm_attrs[i]); - - return 0; -} - -void atm_unregister_sysfs(struct atm_dev *adev) -{ - struct class_device *cdev = &adev->class_dev; - - class_device_del(cdev); -} - -int __init atm_sysfs_init(void) -{ - return class_register(&atm_class); -} - -void __exit atm_sysfs_exit(void) -{ - class_unregister(&atm_class); -} diff --git a/net/atm/br2684.c b/net/atm/br2684.c index d00cca97e..680ccb12a 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -5,6 +5,7 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary */ #include +#include #include #include #include @@ -508,9 +509,10 @@ Note: we do not have explicit unassign, but look at _push() if (copy_from_user(&be, arg, sizeof be)) return -EFAULT; - brvcc = kzalloc(sizeof(struct br2684_vcc), GFP_KERNEL); + brvcc = kmalloc(sizeof(struct br2684_vcc), GFP_KERNEL); if (!brvcc) return -ENOMEM; + memset(brvcc, 0, sizeof(struct br2684_vcc)); write_lock_irq(&devs_lock); net_dev = br2684_find_dev(&be.ifspec); if (net_dev == NULL) { diff --git a/net/atm/clip.c b/net/atm/clip.c index 7af2c411d..4f44e98f1 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c @@ -2,6 +2,7 @@ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ +#include #include #include #include /* for UINT_MAX */ @@ -23,7 +24,6 @@ #include /* for IFF_UP */ #include #include -#include #include #include #include @@ -120,8 +120,8 @@ static void unlink_clip_vcc(struct clip_vcc *clip_vcc) goto out; } printk(KERN_CRIT "ATMARP: unlink_clip_vcc failed (entry %p, vcc " - "0x%p)\n", entry, clip_vcc); - out: + "0x%p)\n",entry,clip_vcc); +out: netif_tx_unlock_bh(entry->neigh->dev); } @@ -267,7 +267,7 @@ static void clip_neigh_destroy(struct neighbour *neigh) DPRINTK("clip_neigh_destroy (neigh %p)\n", neigh); if (NEIGH2ENTRY(neigh)->vccs) printk(KERN_CRIT "clip_neigh_destroy: vccs != NULL !!!\n"); - NEIGH2ENTRY(neigh)->vccs = (void *) NEIGHBOR_DEAD; + NEIGH2ENTRY(neigh)->vccs = (void *) 0xdeadbeef; } static void clip_neigh_solicit(struct neighbour *neigh, struct sk_buff *skb) @@ -500,11 +500,9 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) } else { unsigned int len = skb->len; - skb_get(skb); clip_push(vcc, skb); PRIV(skb->dev)->stats.rx_packets--; PRIV(skb->dev)->stats.rx_bytes -= len; - kfree_skb(skb); } return 0; } @@ -931,11 +929,12 @@ static int arp_seq_open(struct inode *inode, struct file *file) struct seq_file *seq; int rc = -EAGAIN; - state = kzalloc(sizeof(*state), GFP_KERNEL); + state = kmalloc(sizeof(*state), GFP_KERNEL); if (!state) { rc = -ENOMEM; goto out_kfree; } + memset(state, 0, sizeof(*state)); state->ns.neigh_sub_iter = clip_seq_sub_iter; rc = seq_open(file, &arp_seq_ops); @@ -963,6 +962,7 @@ static struct file_operations arp_seq_fops = { static int __init atm_clip_init(void) { + struct proc_dir_entry *p; neigh_table_init_no_netlink(&clip_tbl); clip_tbl_hook = &clip_tbl; @@ -972,15 +972,9 @@ static int __init atm_clip_init(void) setup_timer(&idle_timer, idle_timer_check, 0); -#ifdef CONFIG_PROC_FS - { - struct proc_dir_entry *p; - - p = create_proc_entry("arp", S_IRUGO, atm_proc_root); - if (p) - p->proc_fops = &arp_seq_fops; - } -#endif + p = create_proc_entry("arp", S_IRUGO, atm_proc_root); + if (p) + p->proc_fops = &arp_seq_fops; return 0; } diff --git a/net/atm/common.c b/net/atm/common.c index fbabff494..ae002220f 100644 --- a/net/atm/common.c +++ b/net/atm/common.c @@ -3,6 +3,7 @@ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ +#include #include #include #include /* struct socket, struct proto_ops */ @@ -790,14 +791,8 @@ static int __init atm_init(void) printk(KERN_ERR "atm_proc_init() failed with %d\n",error); goto out_atmsvc_exit; } - if ((error = atm_sysfs_init()) < 0) { - printk(KERN_ERR "atm_sysfs_init() failed with %d\n",error); - goto out_atmproc_exit; - } out: return error; -out_atmproc_exit: - atm_proc_exit(); out_atmsvc_exit: atmsvc_exit(); out_atmpvc_exit: @@ -810,7 +805,6 @@ out_unregister_vcc_proto: static void __exit atm_exit(void) { atm_proc_exit(); - atm_sysfs_exit(); atmsvc_exit(); atmpvc_exit(); proto_unregister(&vcc_proto); diff --git a/net/atm/common.h b/net/atm/common.h index a422da778..4887c317c 100644 --- a/net/atm/common.h +++ b/net/atm/common.h @@ -28,8 +28,6 @@ int atmpvc_init(void); void atmpvc_exit(void); int atmsvc_init(void); void atmsvc_exit(void); -int atm_sysfs_init(void); -void atm_sysfs_exit(void); #ifdef CONFIG_PROC_FS int atm_proc_init(void); diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index 8c2022c3e..851cfa631 100644 --- a/net/atm/ioctl.c +++ b/net/atm/ioctl.c @@ -4,6 +4,7 @@ /* 2003 John Levon */ +#include #include #include #include /* struct socket, struct proto_ops */ diff --git a/net/atm/ipcommon.c b/net/atm/ipcommon.c index 1d3de42fa..4b1faca50 100644 --- a/net/atm/ipcommon.c +++ b/net/atm/ipcommon.c @@ -25,27 +25,22 @@ /* * skb_migrate appends the list at "from" to "to", emptying "from" in the * process. skb_migrate is atomic with respect to all other skb operations on - * "from" and "to". Note that it locks both lists at the same time, so to deal - * with the lock ordering, the locks are taken in address order. + * "from" and "to". Note that it locks both lists at the same time, so beware + * of potential deadlocks. * * This function should live in skbuff.c or skbuff.h. */ -void skb_migrate(struct sk_buff_head *from, struct sk_buff_head *to) +void skb_migrate(struct sk_buff_head *from,struct sk_buff_head *to) { unsigned long flags; struct sk_buff *skb_from = (struct sk_buff *) from; struct sk_buff *skb_to = (struct sk_buff *) to; struct sk_buff *prev; - if ((unsigned long) from < (unsigned long) to) { - spin_lock_irqsave(&from->lock, flags); - spin_lock_nested(&to->lock, SINGLE_DEPTH_NESTING); - } else { - spin_lock_irqsave(&to->lock, flags); - spin_lock_nested(&from->lock, SINGLE_DEPTH_NESTING); - } + spin_lock_irqsave(&from->lock,flags); + spin_lock(&to->lock); prev = from->prev; from->next->prev = to->prev; prev->next = skb_to; @@ -56,7 +51,7 @@ void skb_migrate(struct sk_buff_head *from, struct sk_buff_head *to) from->prev = skb_from; from->next = skb_from; from->qlen = 0; - spin_unlock_irqrestore(&from->lock, flags); + spin_unlock_irqrestore(&from->lock,flags); } diff --git a/net/atm/lec.c b/net/atm/lec.c index b4aa48984..c4fc722fe 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -4,6 +4,7 @@ * */ +#include #include #include #include @@ -1811,11 +1812,12 @@ make_entry(struct lec_priv *priv, unsigned char *mac_addr) { struct lec_arp_table *to_return; - to_return = kzalloc(sizeof(struct lec_arp_table), GFP_ATOMIC); + to_return = kmalloc(sizeof(struct lec_arp_table), GFP_ATOMIC); if (!to_return) { printk("LEC: Arp entry kmalloc failed\n"); return NULL; } + memset(to_return, 0, sizeof(struct lec_arp_table)); memcpy(to_return->mac_addr, mac_addr, ETH_ALEN); init_timer(&to_return->timer); to_return->timer.function = lec_arp_expire_arp; diff --git a/net/atm/lec.h b/net/atm/lec.h index c22a8bfa1..6606082b2 100644 --- a/net/atm/lec.h +++ b/net/atm/lec.h @@ -9,6 +9,7 @@ #ifndef _LEC_H_ #define _LEC_H_ +#include #include #include #include diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 00704661e..c304ef151 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -25,6 +25,7 @@ #include #include /* Modular too */ +#include #include #include "lec.h" @@ -228,15 +229,20 @@ int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry) /* this is buggered - we need locking for qos_head */ void atm_mpoa_disp_qos(struct seq_file *m) { + unsigned char *ip; + char ipaddr[16]; struct atm_mpoa_qos *qos; qos = qos_head; seq_printf(m, "QoS entries for shortcuts:\n"); seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); + ipaddr[sizeof(ipaddr)-1] = '\0'; while (qos != NULL) { + ip = (unsigned char *)&qos->ipaddr; + sprintf(ipaddr, "%u.%u.%u.%u", NIPQUAD(ip)); seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", - NIPQUAD(qos->ipaddr), + NIPQUAD(ipaddr), qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); qos = qos->next; @@ -258,9 +264,10 @@ static struct mpoa_client *alloc_mpc(void) { struct mpoa_client *mpc; - mpc = kzalloc(sizeof (struct mpoa_client), GFP_KERNEL); + mpc = kmalloc(sizeof (struct mpoa_client), GFP_KERNEL); if (mpc == NULL) return NULL; + memset(mpc, 0, sizeof(struct mpoa_client)); rwlock_init(&mpc->ingress_lock); rwlock_init(&mpc->egress_lock); mpc->next = mpcs; @@ -1076,6 +1083,7 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc) static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry) { uint32_t dst_ip = msg->content.in_info.in_dst_ip; + unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip; struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip); eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client); @@ -1089,7 +1097,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien entry->shortcut = eg_entry->shortcut; } if(entry->shortcut){ - dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); + dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(ip)); client->eg_ops->put(eg_entry); return; } @@ -1111,10 +1119,12 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc) { + unsigned char *ip; + uint32_t dst_ip = msg->content.in_info.in_dst_ip; in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); - - dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip)); + ip = (unsigned char *)&dst_ip; + dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(ip)); ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); if(entry == NULL){ printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index 781ed1b93..64ddebb64 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c @@ -223,6 +223,7 @@ static void in_cache_remove_entry(in_cache_entry *entry, but an easy one... */ static void clear_count_and_expired(struct mpoa_client *client) { + unsigned char *ip; in_cache_entry *entry, *next_entry; struct timeval now; @@ -235,7 +236,8 @@ static void clear_count_and_expired(struct mpoa_client *client) next_entry = entry->next; if((now.tv_sec - entry->tv.tv_sec) > entry->ctrl_info.holding_time){ - dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(entry->ctrl_info.in_dst_ip)); + ip = (unsigned char*)&entry->ctrl_info.in_dst_ip; + dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(ip)); client->in_ops->remove_entry(entry, client); } entry = next_entry; @@ -453,6 +455,7 @@ static void eg_cache_remove_entry(eg_cache_entry *entry, static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) { + unsigned char *ip; eg_cache_entry *entry = kmalloc(sizeof(eg_cache_entry), GFP_KERNEL); if (entry == NULL) { @@ -460,7 +463,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli return NULL; } - dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(msg->content.eg_info.eg_dst_ip)); + ip = (unsigned char *)&msg->content.eg_info.eg_dst_ip; + dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(ip)); memset(entry, 0, sizeof(eg_cache_entry)); atomic_set(&entry->use, 1); @@ -477,8 +481,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli do_gettimeofday(&(entry->tv)); entry->entry_state = EGRESS_RESOLVED; dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); - dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", - NIPQUAD(entry->ctrl_info.mps_ip)); + ip = (unsigned char *)&entry->ctrl_info.mps_ip; + dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", NIPQUAD(ip)); atomic_inc(&entry->use); write_unlock_irq(&client->egress_lock); diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c index d37b8911b..60834b5a1 100644 --- a/net/atm/mpoa_proc.c +++ b/net/atm/mpoa_proc.c @@ -1,3 +1,4 @@ +#include #ifdef CONFIG_PROC_FS #include diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index 19d5dfc07..1489067c1 100644 --- a/net/atm/pppoatm.c +++ b/net/atm/pppoatm.c @@ -34,6 +34,7 @@ */ #include +#include #include #include #include @@ -287,9 +288,10 @@ static int pppoatm_assign_vcc(struct atm_vcc *atmvcc, void __user *arg) if (be.encaps != PPPOATM_ENCAPS_AUTODETECT && be.encaps != PPPOATM_ENCAPS_VC && be.encaps != PPPOATM_ENCAPS_LLC) return -EINVAL; - pvcc = kzalloc(sizeof(*pvcc), GFP_KERNEL); + pvcc = kmalloc(sizeof(*pvcc), GFP_KERNEL); if (pvcc == NULL) return -ENOMEM; + memset(pvcc, 0, sizeof(*pvcc)); pvcc->atmvcc = atmvcc; pvcc->old_push = atmvcc->push; pvcc->old_pop = atmvcc->pop; diff --git a/net/atm/proc.c b/net/atm/proc.c index 91fe5f53f..4041054e5 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c @@ -8,6 +8,7 @@ * the reader. */ +#include #include /* for EXPORT_SYMBOL */ #include #include @@ -507,7 +508,7 @@ err_out: goto out; } -void atm_proc_exit(void) +void __exit atm_proc_exit(void) { atm_proc_dirs_remove(); } diff --git a/net/atm/pvc.c b/net/atm/pvc.c index b2148b43a..f2c541774 100644 --- a/net/atm/pvc.c +++ b/net/atm/pvc.c @@ -3,6 +3,7 @@ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ +#include #include /* struct socket, struct proto_ops */ #include /* ATM stuff */ #include /* ATM devices */ diff --git a/net/atm/resources.c b/net/atm/resources.c index 529f7e64a..18ac80698 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c @@ -8,6 +8,7 @@ * use the default destruct function initialized by sock_init_data */ +#include #include #include #include @@ -33,9 +34,10 @@ static struct atm_dev *__alloc_atm_dev(const char *type) { struct atm_dev *dev; - dev = kzalloc(sizeof(*dev), GFP_KERNEL); + dev = kmalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return NULL; + memset(dev, 0, sizeof(*dev)); dev->type = type; dev->signal = ATM_PHY_SIG_UNKNOWN; dev->link_rate = ATM_OC3_PCR; @@ -112,27 +114,14 @@ struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops, printk(KERN_ERR "atm_dev_register: " "atm_proc_dev_register failed for dev %s\n", type); - goto out_fail; - } - - if (atm_register_sysfs(dev) < 0) { - printk(KERN_ERR "atm_dev_register: " - "atm_register_sysfs failed for dev %s\n", - type); - atm_proc_dev_deregister(dev); - goto out_fail; + mutex_unlock(&atm_dev_mutex); + kfree(dev); + return NULL; } - list_add_tail(&dev->dev_list, &atm_devs); - -out: mutex_unlock(&atm_dev_mutex); - return dev; -out_fail: - kfree(dev); - dev = NULL; - goto out; + return dev; } @@ -151,7 +140,6 @@ void atm_dev_deregister(struct atm_dev *dev) mutex_unlock(&atm_dev_mutex); atm_dev_release_vccs(dev); - atm_unregister_sysfs(dev); atm_proc_dev_deregister(dev); atm_dev_put(dev); diff --git a/net/atm/resources.h b/net/atm/resources.h index 1d004aaae..ac7222fee 100644 --- a/net/atm/resources.h +++ b/net/atm/resources.h @@ -6,6 +6,7 @@ #ifndef NET_ATM_RESOURCES_H #define NET_ATM_RESOURCES_H +#include #include #include @@ -42,6 +43,4 @@ static inline void atm_proc_dev_deregister(struct atm_dev *dev) #endif /* CONFIG_PROC_FS */ -int atm_register_sysfs(struct atm_dev *adev); -void atm_unregister_sysfs(struct atm_dev *adev); #endif diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 000695c48..a2e0dd047 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -13,6 +13,7 @@ * Copyright (C) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl) * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) */ +#include #include #include #include @@ -145,7 +146,7 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, ax25_cb *s; struct hlist_node *node; - spin_lock(&ax25_list_lock); + spin_lock_bh(&ax25_list_lock); ax25_for_each(s, node, &ax25_list) { if ((s->iamdigi && !digi) || (!s->iamdigi && digi)) continue; @@ -154,12 +155,12 @@ struct sock *ax25_find_listener(ax25_address *addr, int digi, /* If device is null we match any device */ if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) { sock_hold(s->sk); - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); return s->sk; } } } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); return NULL; } @@ -174,7 +175,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, ax25_cb *s; struct hlist_node *node; - spin_lock(&ax25_list_lock); + spin_lock_bh(&ax25_list_lock); ax25_for_each(s, node, &ax25_list) { if (s->sk && !ax25cmp(&s->source_addr, my_addr) && !ax25cmp(&s->dest_addr, dest_addr) && @@ -185,7 +186,7 @@ struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, } } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); return sk; } @@ -235,7 +236,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) struct sk_buff *copy; struct hlist_node *node; - spin_lock(&ax25_list_lock); + 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 && @@ -248,7 +249,7 @@ void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) kfree_skb(copy); } } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); } /* @@ -486,9 +487,10 @@ ax25_cb *ax25_create_cb(void) { ax25_cb *ax25; - if ((ax25 = kzalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL) + if ((ax25 = kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL) return NULL; + memset(ax25, 0x00, sizeof(*ax25)); atomic_set(&ax25->refcount, 1); skb_queue_head_init(&ax25->write_queue); diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c index b78767822..dab77efe3 100644 --- a/net/ax25/ax25_dev.c +++ b/net/ax25/ax25_dev.c @@ -6,6 +6,7 @@ * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) */ +#include #include #include #include @@ -55,13 +56,15 @@ void ax25_dev_device_up(struct net_device *dev) { ax25_dev *ax25_dev; - if ((ax25_dev = kzalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { + if ((ax25_dev = kmalloc(sizeof(*ax25_dev), GFP_ATOMIC)) == NULL) { printk(KERN_ERR "AX.25: ax25_dev_device_up - out of memory\n"); return; } ax25_unregister_sysctl(); + memset(ax25_dev, 0x00, sizeof(*ax25_dev)); + dev->ax25_ptr = ax25_dev; ax25_dev->dev = dev; dev_hold(dev); diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c index 4d22d4430..1d4ab641f 100644 --- a/net/ax25/ax25_ds_subr.c +++ b/net/ax25/ax25_ds_subr.c @@ -80,7 +80,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25) ax25_start_t3timer(ax25); ax25_ds_set_timer(ax25->ax25_dev); - spin_lock(&ax25_list_lock); + spin_lock_bh(&ax25_list_lock); ax25_for_each(ax25o, node, &ax25_list) { if (ax25o == ax25) continue; @@ -106,7 +106,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25) if (ax25o->state != AX25_STATE_0) ax25_start_t3timer(ax25o); } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); } void ax25_ds_establish_data_link(ax25_cb *ax25) @@ -162,13 +162,13 @@ static int ax25_check_dama_slave(ax25_dev *ax25_dev) int res = 0; struct hlist_node *node; - spin_lock(&ax25_list_lock); + spin_lock_bh(&ax25_list_lock); ax25_for_each(ax25, node, &ax25_list) if (ax25->ax25_dev == ax25_dev && (ax25->condition & AX25_COND_DAMA_MODE) && ax25->state > AX25_STATE_1) { res = 1; break; } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); return res; } diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c index 4f4418595..596145993 100644 --- a/net/ax25/ax25_ds_timer.c +++ b/net/ax25/ax25_ds_timer.c @@ -85,7 +85,7 @@ static void ax25_ds_timeout(unsigned long arg) return; } - spin_lock(&ax25_list_lock); + spin_lock_bh(&ax25_list_lock); ax25_for_each(ax25, node, &ax25_list) { if (ax25->ax25_dev != ax25_dev || !(ax25->condition & AX25_COND_DAMA_MODE)) continue; @@ -93,7 +93,7 @@ static void ax25_ds_timeout(unsigned long arg) ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); ax25_disconnect(ax25, ETIMEDOUT); } - spin_unlock(&ax25_list_lock); + spin_unlock_bh(&ax25_list_lock); ax25_dev_dama_off(ax25_dev); } diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index 07ac0207e..3bb152710 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c @@ -6,6 +6,7 @@ * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) */ +#include #include #include #include @@ -66,10 +67,10 @@ int ax25_protocol_register(unsigned int pid, protocol->pid = pid; protocol->func = func; - write_lock_bh(&protocol_list_lock); + write_lock(&protocol_list_lock); protocol->next = protocol_list; protocol_list = protocol; - write_unlock_bh(&protocol_list_lock); + write_unlock(&protocol_list_lock); return 1; } @@ -80,16 +81,16 @@ void ax25_protocol_release(unsigned int pid) { struct protocol_struct *s, *protocol; - write_lock_bh(&protocol_list_lock); + write_lock(&protocol_list_lock); protocol = protocol_list; if (protocol == NULL) { - write_unlock_bh(&protocol_list_lock); + write_unlock(&protocol_list_lock); return; } if (protocol->pid == pid) { protocol_list = protocol->next; - write_unlock_bh(&protocol_list_lock); + write_unlock(&protocol_list_lock); kfree(protocol); return; } @@ -98,14 +99,14 @@ void ax25_protocol_release(unsigned int pid) if (protocol->next->pid == pid) { s = protocol->next; protocol->next = protocol->next->next; - write_unlock_bh(&protocol_list_lock); + write_unlock(&protocol_list_lock); kfree(s); return; } protocol = protocol->next; } - write_unlock_bh(&protocol_list_lock); + write_unlock(&protocol_list_lock); } EXPORT_SYMBOL(ax25_protocol_release); @@ -266,13 +267,13 @@ int ax25_protocol_is_registered(unsigned int pid) struct protocol_struct *protocol; int res = 0; - read_lock_bh(&protocol_list_lock); + read_lock(&protocol_list_lock); for (protocol = protocol_list; protocol != NULL; protocol = protocol->next) if (protocol->pid == pid) { res = 1; break; } - read_unlock_bh(&protocol_list_lock); + read_unlock(&protocol_list_lock); return res; } diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index e9d942915..4cf87540f 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c @@ -102,8 +102,8 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb) int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) { int (*func)(struct sk_buff *, ax25_cb *); + volatile int queued = 0; unsigned char pid; - int queued = 0; if (skb == NULL) return 0; diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index 136c3aefa..a0b534f80 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c @@ -6,6 +6,7 @@ * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) */ +#include #include #include #include @@ -103,13 +104,11 @@ int ax25_rebuild_header(struct sk_buff *skb) { struct sk_buff *ourskb; unsigned char *bp = skb->data; - ax25_route *route; - struct net_device *dev = NULL; + struct net_device *dev; ax25_address *src, *dst; - ax25_digi *digipeat = NULL; ax25_dev *ax25_dev; + ax25_route _route, *route = &_route; ax25_cb *ax25; - char ip_mode = ' '; dst = (ax25_address *)(bp + 1); src = (ax25_address *)(bp + 8); @@ -117,12 +116,8 @@ int ax25_rebuild_header(struct sk_buff *skb) if (arp_find(bp + 1, skb)) return 1; - route = ax25_get_route(dst, NULL); - if (route) { - digipeat = route->digipeat; - dev = route->dev; - ip_mode = route->ip_mode; - }; + route = ax25_rt_find_route(route, dst, NULL); + dev = route->dev; if (dev == NULL) dev = skb->dev; @@ -132,7 +127,7 @@ int ax25_rebuild_header(struct sk_buff *skb) } if (bp[16] == AX25_P_IP) { - if (ip_mode == 'V' || (ip_mode == ' ' && ax25_dev->values[AX25_VALUES_IPDEFMODE])) { + if (route->ip_mode == 'V' || (route->ip_mode == ' ' && ax25_dev->values[AX25_VALUES_IPDEFMODE])) { /* * We copy the buffer and release the original thereby * keeping it straight @@ -178,7 +173,7 @@ int ax25_rebuild_header(struct sk_buff *skb) ourskb, ax25_dev->values[AX25_VALUES_PACLEN], &src_c, - &dst_c, digipeat, dev); + &dst_c, route->digipeat, dev); if (ax25) { ax25_cb_put(ax25); } @@ -196,7 +191,7 @@ int ax25_rebuild_header(struct sk_buff *skb) skb_pull(skb, AX25_KISS_HEADER_LEN); - if (digipeat != NULL) { + if (route->digipeat != NULL) { if ((ourskb = ax25_rt_build_path(skb, src, dst, route->digipeat)) == NULL) { kfree_skb(skb); goto put; @@ -208,8 +203,7 @@ int ax25_rebuild_header(struct sk_buff *skb) ax25_queue_xmit(skb, dev); put: - if (route) - ax25_put_route(route); + ax25_put_route(route); return 1; } diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index d7736e585..5d99852b2 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c @@ -8,6 +8,7 @@ * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) */ +#include #include #include #include diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index 51b7bdaf2..5ac982507 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c @@ -41,6 +41,8 @@ static ax25_route *ax25_route_list; static DEFINE_RWLOCK(ax25_route_lock); +static ax25_route *ax25_get_route(ax25_address *, struct net_device *); + void ax25_rt_device_down(struct net_device *dev) { ax25_route *s, *t, *ax25_rt; @@ -113,7 +115,7 @@ static int ax25_rt_add(struct ax25_routes_struct *route) return -ENOMEM; } - atomic_set(&ax25_rt->refcount, 1); + atomic_set(&ax25_rt->ref, 0); ax25_rt->callsign = route->dest_addr; ax25_rt->dev = ax25_dev->dev; ax25_rt->digipeat = NULL; @@ -138,10 +140,23 @@ static int ax25_rt_add(struct ax25_routes_struct *route) return 0; } -void __ax25_put_route(ax25_route *ax25_rt) +static void ax25_rt_destroy(ax25_route *ax25_rt) { - kfree(ax25_rt->digipeat); - kfree(ax25_rt); + if (atomic_read(&ax25_rt->ref) == 0) { + kfree(ax25_rt->digipeat); + kfree(ax25_rt); + return; + } + + /* + * Uh... Route is still in use; we can't yet destroy it. Retry later. + */ + init_timer(&ax25_rt->timer); + ax25_rt->timer.data = (unsigned long) ax25_rt; + ax25_rt->timer.function = (void *) ax25_rt_destroy; + ax25_rt->timer.expires = jiffies + 5 * HZ; + + add_timer(&ax25_rt->timer); } static int ax25_rt_del(struct ax25_routes_struct *route) @@ -162,12 +177,12 @@ static int ax25_rt_del(struct ax25_routes_struct *route) ax25cmp(&route->dest_addr, &s->callsign) == 0) { if (ax25_route_list == s) { ax25_route_list = s->next; - ax25_put_route(s); + ax25_rt_destroy(s); } else { for (t = ax25_route_list; t != NULL; t = t->next) { if (t->next == s) { t->next = s->next; - ax25_put_route(s); + ax25_rt_destroy(s); break; } } @@ -347,7 +362,7 @@ struct file_operations ax25_route_fops = { * * Only routes with a reference count of zero can be destroyed. */ -ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev) +static ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev) { ax25_route *ax25_spe_rt = NULL; ax25_route *ax25_def_rt = NULL; @@ -377,7 +392,7 @@ ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev) ax25_rt = ax25_spe_rt; if (ax25_rt != NULL) - ax25_hold_route(ax25_rt); + atomic_inc(&ax25_rt->ref); read_unlock(&ax25_route_lock); @@ -452,6 +467,24 @@ put: return 0; } +ax25_route *ax25_rt_find_route(ax25_route * route, ax25_address *addr, + struct net_device *dev) +{ + ax25_route *ax25_rt; + + if ((ax25_rt = ax25_get_route(addr, dev))) + return ax25_rt; + + route->next = NULL; + atomic_set(&route->ref, 1); + route->callsign = *addr; + route->dev = dev; + route->digipeat = NULL; + route->ip_mode = ' '; + + return route; +} + struct sk_buff *ax25_rt_build_path(struct sk_buff *skb, ax25_address *src, ax25_address *dest, ax25_digi *digi) { diff --git a/net/ax25/ax25_timer.c b/net/ax25/ax25_timer.c index 72594867f..ec254057f 100644 --- a/net/ax25/ax25_timer.c +++ b/net/ax25/ax25_timer.c @@ -12,6 +12,7 @@ * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) */ +#include #include #include #include diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index 867d42537..bdb64c36d 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c @@ -6,6 +6,7 @@ * * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) */ +#include #include #include #include @@ -203,11 +204,13 @@ void ax25_register_sysctl(void) for (ax25_table_size = sizeof(ctl_table), ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) ax25_table_size += sizeof(ctl_table); - if ((ax25_table = kzalloc(ax25_table_size, GFP_ATOMIC)) == NULL) { + if ((ax25_table = kmalloc(ax25_table_size, GFP_ATOMIC)) == NULL) { spin_unlock_bh(&ax25_dev_lock); return; } + memset(ax25_table, 0x00, ax25_table_size); + for (n = 0, ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) { ctl_table *child = kmalloc(sizeof(ax25_param_table), GFP_ATOMIC); if (!child) { diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 788ea7a2b..469eda0f0 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c @@ -24,6 +24,7 @@ /* Bluetooth address family and sockets. */ +#include #include #include @@ -48,7 +49,7 @@ #define BT_DBG(D...) #endif -#define VERSION "2.10" +#define VERSION "2.8" /* Bluetooth sockets */ #define BT_MAX_PROTO 8 @@ -307,22 +308,14 @@ static struct net_proto_family bt_sock_family_ops = { static int __init bt_init(void) { - int err; - BT_INFO("Core ver %s", VERSION); - err = bt_sysfs_init(); - if (err < 0) - return err; - - err = sock_register(&bt_sock_family_ops); - if (err < 0) { - bt_sysfs_cleanup(); - return err; - } + sock_register(&bt_sock_family_ops); BT_INFO("HCI device and connection manager initialized"); + bt_sysfs_init(); + hci_sock_init(); return 0; @@ -332,9 +325,9 @@ static void __exit bt_exit(void) { hci_sock_cleanup(); - sock_unregister(PF_BLUETOOTH); - bt_sysfs_cleanup(); + + sock_unregister(PF_BLUETOOTH); } subsys_initcall(bt_init); diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index e620061fb..d908d49dc 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c @@ -29,6 +29,7 @@ * $Id: core.c,v 1.20 2002/08/04 21:23:58 maxk Exp $ */ +#include #include #include diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 7f7b27db6..921204f95 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c @@ -29,6 +29,7 @@ * $Id: netdev.c,v 1.8 2002/08/04 21:23:58 maxk Exp $ */ +#include #include #include diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c index 28c558354..2bfe796cf 100644 --- a/net/bluetooth/bnep/sock.c +++ b/net/bluetooth/bnep/sock.c @@ -28,6 +28,7 @@ * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $ */ +#include #include #include diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index ab166b48c..b2e7e3853 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include @@ -75,13 +76,15 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *session, __u16 appl) { - struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL); + struct cmtp_application *app = kmalloc(sizeof(*app), GFP_KERNEL); BT_DBG("session %p application %p appl %d", session, app, appl); if (!app) return NULL; + memset(app, 0, sizeof(*app)); + app->state = BT_OPEN; app->appl = appl; @@ -196,9 +199,6 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s switch (CAPIMSG_SUBCOMMAND(skb->data)) { case CAPI_CONF: - if (skb->len < CAPI_MSG_BASELEN + 10) - break; - func = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 5); info = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 8); @@ -229,9 +229,6 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s break; case CAPI_FUNCTION_GET_PROFILE: - if (skb->len < CAPI_MSG_BASELEN + 11 + sizeof(capi_profile)) - break; - controller = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 11); msgnum = CAPIMSG_MSGID(skb->data); @@ -252,26 +249,17 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s break; case CAPI_FUNCTION_GET_MANUFACTURER: - if (skb->len < CAPI_MSG_BASELEN + 15) - break; - controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 10); if (!info && ctrl) { - int len = min_t(uint, CAPI_MANUFACTURER_LEN, - skb->data[CAPI_MSG_BASELEN + 14]); - - memset(ctrl->manu, 0, CAPI_MANUFACTURER_LEN); strncpy(ctrl->manu, - skb->data + CAPI_MSG_BASELEN + 15, len); + skb->data + CAPI_MSG_BASELEN + 15, + skb->data[CAPI_MSG_BASELEN + 14]); } break; case CAPI_FUNCTION_GET_VERSION: - if (skb->len < CAPI_MSG_BASELEN + 32) - break; - controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 12); if (!info && ctrl) { @@ -284,18 +272,13 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s break; case CAPI_FUNCTION_GET_SERIAL_NUMBER: - if (skb->len < CAPI_MSG_BASELEN + 17) - break; - controller = CAPIMSG_U32(skb->data, CAPI_MSG_BASELEN + 12); if (!info && ctrl) { - int len = min_t(uint, CAPI_SERIAL_LEN, - skb->data[CAPI_MSG_BASELEN + 16]); - memset(ctrl->serial, 0, CAPI_SERIAL_LEN); strncpy(ctrl->serial, - skb->data + CAPI_MSG_BASELEN + 17, len); + skb->data + CAPI_MSG_BASELEN + 17, + skb->data[CAPI_MSG_BASELEN + 16]); } break; @@ -304,18 +287,14 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s break; case CAPI_IND: - if (skb->len < CAPI_MSG_BASELEN + 6) - break; - func = CAPIMSG_U16(skb->data, CAPI_MSG_BASELEN + 3); if (func == CAPI_FUNCTION_LOOPBACK) { - int len = min_t(uint, skb->len - CAPI_MSG_BASELEN - 6, - skb->data[CAPI_MSG_BASELEN + 5]); appl = CAPIMSG_APPID(skb->data); msgnum = CAPIMSG_MSGID(skb->data); cmtp_send_interopmsg(session, CAPI_RESP, appl, msgnum, func, - skb->data + CAPI_MSG_BASELEN + 6, len); + skb->data + CAPI_MSG_BASELEN + 6, + skb->data[CAPI_MSG_BASELEN + 5]); } break; @@ -333,9 +312,6 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb) BT_DBG("session %p skb %p len %d", session, skb, skb->len); - if (skb->len < CAPI_MSG_BASELEN) - return; - if (CAPIMSG_COMMAND(skb->data) == CAPI_INTEROPERABILITY) { cmtp_recv_interopmsg(session, skb); return; diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index b81a01c64..901eff7eb 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include @@ -335,9 +336,10 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) baswap(&src, &bt_sk(sock->sk)->src); baswap(&dst, &bt_sk(sock->sk)->dst); - session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL); + session = kmalloc(sizeof(struct cmtp_session), GFP_KERNEL); if (!session) return -ENOMEM; + memset(session, 0, sizeof(struct cmtp_session)); down_write(&cmtp_session_sem); diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c index 10ad7fd91..8f8fad23f 100644 --- a/net/bluetooth/cmtp/sock.c +++ b/net/bluetooth/cmtp/sock.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 420ed4d7e..f812ed129 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -24,6 +24,7 @@ /* Bluetooth HCI connection handling. */ +#include #include #include @@ -115,8 +116,8 @@ void hci_add_sco(struct hci_conn *conn, __u16 handle) static void hci_conn_timeout(unsigned long arg) { - struct hci_conn *conn = (void *) arg; - struct hci_dev *hdev = conn->hdev; + struct hci_conn *conn = (void *)arg; + struct hci_dev *hdev = conn->hdev; BT_DBG("conn %p state %d", conn, conn->state); @@ -132,13 +133,11 @@ static void hci_conn_timeout(unsigned long arg) return; } -static void hci_conn_idle(unsigned long arg) +static void hci_conn_init_timer(struct hci_conn *conn) { - struct hci_conn *conn = (void *) arg; - - BT_DBG("conn %p mode %d", conn, conn->mode); - - hci_conn_enter_sniff_mode(conn); + init_timer(&conn->timer); + conn->timer.function = hci_conn_timeout; + conn->timer.data = (unsigned long)conn; } struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) @@ -147,27 +146,17 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) BT_DBG("%s dst %s", hdev->name, batostr(dst)); - conn = kzalloc(sizeof(struct hci_conn), GFP_ATOMIC); - if (!conn) + if (!(conn = kmalloc(sizeof(struct hci_conn), GFP_ATOMIC))) return NULL; + memset(conn, 0, sizeof(struct hci_conn)); bacpy(&conn->dst, dst); - conn->hdev = hdev; conn->type = type; - conn->mode = HCI_CM_ACTIVE; + conn->hdev = hdev; conn->state = BT_OPEN; - conn->power_save = 1; - skb_queue_head_init(&conn->data_q); - - init_timer(&conn->disc_timer); - conn->disc_timer.function = hci_conn_timeout; - conn->disc_timer.data = (unsigned long) conn; - - init_timer(&conn->idle_timer); - conn->idle_timer.function = hci_conn_idle; - conn->idle_timer.data = (unsigned long) conn; + hci_conn_init_timer(conn); atomic_set(&conn->refcnt, 0); @@ -190,9 +179,7 @@ int hci_conn_del(struct hci_conn *conn) BT_DBG("%s conn %p handle %d", hdev->name, conn, conn->handle); - del_timer(&conn->idle_timer); - - del_timer(&conn->disc_timer); + hci_conn_del_timer(conn); if (conn->type == SCO_LINK) { struct hci_conn *acl = conn->link; @@ -378,70 +365,6 @@ int hci_conn_switch_role(struct hci_conn *conn, uint8_t role) } EXPORT_SYMBOL(hci_conn_switch_role); -/* Enter active mode */ -void hci_conn_enter_active_mode(struct hci_conn *conn) -{ - struct hci_dev *hdev = conn->hdev; - - BT_DBG("conn %p mode %d", conn, conn->mode); - - if (test_bit(HCI_RAW, &hdev->flags)) - return; - - if (conn->mode != HCI_CM_SNIFF || !conn->power_save) - goto timer; - - if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) { - struct hci_cp_exit_sniff_mode cp; - cp.handle = __cpu_to_le16(conn->handle); - hci_send_cmd(hdev, OGF_LINK_POLICY, - OCF_EXIT_SNIFF_MODE, sizeof(cp), &cp); - } - -timer: - if (hdev->idle_timeout > 0) - mod_timer(&conn->idle_timer, - jiffies + msecs_to_jiffies(hdev->idle_timeout)); -} - -/* Enter sniff mode */ -void hci_conn_enter_sniff_mode(struct hci_conn *conn) -{ - struct hci_dev *hdev = conn->hdev; - - BT_DBG("conn %p mode %d", conn, conn->mode); - - if (test_bit(HCI_RAW, &hdev->flags)) - return; - - if (!lmp_sniff_capable(hdev) || !lmp_sniff_capable(conn)) - return; - - if (conn->mode != HCI_CM_ACTIVE || !(conn->link_policy & HCI_LP_SNIFF)) - return; - - if (lmp_sniffsubr_capable(hdev) && lmp_sniffsubr_capable(conn)) { - struct hci_cp_sniff_subrate cp; - cp.handle = __cpu_to_le16(conn->handle); - cp.max_latency = __constant_cpu_to_le16(0); - cp.min_remote_timeout = __constant_cpu_to_le16(0); - cp.min_local_timeout = __constant_cpu_to_le16(0); - hci_send_cmd(hdev, OGF_LINK_POLICY, - OCF_SNIFF_SUBRATE, sizeof(cp), &cp); - } - - if (!test_and_set_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) { - struct hci_cp_sniff_mode cp; - cp.handle = __cpu_to_le16(conn->handle); - cp.max_interval = __cpu_to_le16(hdev->sniff_max_interval); - cp.min_interval = __cpu_to_le16(hdev->sniff_min_interval); - cp.attempt = __constant_cpu_to_le16(4); - cp.timeout = __constant_cpu_to_le16(1); - hci_send_cmd(hdev, OGF_LINK_POLICY, - OCF_SNIFF_MODE, sizeof(cp), &cp); - } -} - /* Drop all connection on the device */ void hci_conn_hash_flush(struct hci_dev *hdev) { diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 5ed474277..a49a69750 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -24,6 +24,7 @@ /* Bluetooth HCI core. */ +#include #include #include @@ -336,8 +337,9 @@ void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data) if (!(e = hci_inquiry_cache_lookup(hdev, &data->bdaddr))) { /* Entry not in the cache. Add new one. */ - if (!(e = kzalloc(sizeof(struct inquiry_entry), GFP_ATOMIC))) + if (!(e = kmalloc(sizeof(struct inquiry_entry), GFP_ATOMIC))) return; + memset(e, 0, sizeof(struct inquiry_entry)); e->next = cache->list; cache->list = e; } @@ -410,7 +412,7 @@ int hci_inquiry(void __user *arg) } hci_dev_unlock_bh(hdev); - timeo = ir.length * msecs_to_jiffies(2000); + timeo = ir.length * 2 * HZ; if (do_inquiry && (err = hci_request(hdev, hci_inq_req, (unsigned long)&ir, timeo)) < 0) goto done; @@ -478,8 +480,7 @@ int hci_dev_open(__u16 dev) set_bit(HCI_INIT, &hdev->flags); //__hci_request(hdev, hci_reset_req, 0, HZ); - ret = __hci_request(hdev, hci_init_req, 0, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + ret = __hci_request(hdev, hci_init_req, 0, HCI_INIT_TIMEOUT); clear_bit(HCI_INIT, &hdev->flags); } @@ -546,8 +547,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) atomic_set(&hdev->cmd_cnt, 1); if (!test_bit(HCI_RAW, &hdev->flags)) { set_bit(HCI_INIT, &hdev->flags); - __hci_request(hdev, hci_reset_req, 0, - msecs_to_jiffies(250)); + __hci_request(hdev, hci_reset_req, 0, HZ/4); clear_bit(HCI_INIT, &hdev->flags); } @@ -620,8 +620,7 @@ int hci_dev_reset(__u16 dev) hdev->acl_cnt = 0; hdev->sco_cnt = 0; if (!test_bit(HCI_RAW, &hdev->flags)) - ret = __hci_request(hdev, hci_reset_req, 0, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + ret = __hci_request(hdev, hci_reset_req, 0, HCI_INIT_TIMEOUT); done: tasklet_enable(&hdev->tx_task); @@ -659,8 +658,7 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg) switch (cmd) { case HCISETAUTH: - err = hci_request(hdev, hci_auth_req, dr.dev_opt, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + err = hci_request(hdev, hci_auth_req, dr.dev_opt, HCI_INIT_TIMEOUT); break; case HCISETENCRYPT: @@ -671,19 +669,18 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg) if (!test_bit(HCI_AUTH, &hdev->flags)) { /* Auth must be enabled first */ - err = hci_request(hdev, hci_auth_req, dr.dev_opt, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + err = hci_request(hdev, hci_auth_req, + dr.dev_opt, HCI_INIT_TIMEOUT); if (err) break; } - err = hci_request(hdev, hci_encrypt_req, dr.dev_opt, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + err = hci_request(hdev, hci_encrypt_req, + dr.dev_opt, HCI_INIT_TIMEOUT); break; case HCISETSCAN: - err = hci_request(hdev, hci_scan_req, dr.dev_opt, - msecs_to_jiffies(HCI_INIT_TIMEOUT)); + err = hci_request(hdev, hci_scan_req, dr.dev_opt, HCI_INIT_TIMEOUT); break; case HCISETPTYPE: @@ -799,10 +796,12 @@ struct hci_dev *hci_alloc_dev(void) { struct hci_dev *hdev; - hdev = kzalloc(sizeof(struct hci_dev), GFP_KERNEL); + hdev = kmalloc(sizeof(struct hci_dev), GFP_KERNEL); if (!hdev) return NULL; + memset(hdev, 0, sizeof(struct hci_dev)); + skb_queue_head_init(&hdev->driver_init); return hdev; @@ -814,8 +813,8 @@ void hci_free_dev(struct hci_dev *hdev) { skb_queue_purge(&hdev->driver_init); - /* will free via device release */ - put_device(&hdev->dev); + /* will free via class release */ + class_device_put(&hdev->class_dev); } EXPORT_SYMBOL(hci_free_dev); @@ -850,10 +849,6 @@ int hci_register_dev(struct hci_dev *hdev) hdev->pkt_type = (HCI_DM1 | HCI_DH1 | HCI_HV1); hdev->link_mode = (HCI_LM_ACCEPT); - hdev->idle_timeout = 0; - hdev->sniff_max_interval = 800; - hdev->sniff_min_interval = 80; - tasklet_init(&hdev->cmd_task, hci_cmd_task,(unsigned long) hdev); tasklet_init(&hdev->rx_task, hci_rx_task, (unsigned long) hdev); tasklet_init(&hdev->tx_task, hci_tx_task, (unsigned long) hdev); @@ -1226,9 +1221,6 @@ static inline void hci_sched_acl(struct hci_dev *hdev) while (hdev->acl_cnt && (conn = hci_low_sent(hdev, ACL_LINK, "e))) { while (quote-- && (skb = skb_dequeue(&conn->data_q))) { BT_DBG("skb %p len %d", skb, skb->len); - - hci_conn_enter_active_mode(conn); - hci_send_frame(skb); hdev->acl_last_tx = jiffies; @@ -1307,8 +1299,6 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) if (conn) { register struct hci_proto *hp; - hci_conn_enter_active_mode(conn); - /* Send to upper protocol */ if ((hp = hci_proto[HCI_PROTO_L2CAP]) && hp->recv_acldata) { hp->recv_acldata(conn, skb, flags); diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3896dabab..eb64555d1 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -24,6 +24,7 @@ /* Bluetooth HCI event handling. */ +#include #include #include @@ -83,8 +84,6 @@ static void hci_cc_link_policy(struct hci_dev *hdev, __u16 ocf, struct sk_buff * { struct hci_conn *conn; struct hci_rp_role_discovery *rd; - struct hci_rp_write_link_policy *lp; - void *sent; BT_DBG("%s ocf 0x%x", hdev->name, ocf); @@ -108,27 +107,6 @@ static void hci_cc_link_policy(struct hci_dev *hdev, __u16 ocf, struct sk_buff * hci_dev_unlock(hdev); break; - case OCF_WRITE_LINK_POLICY: - sent = hci_sent_cmd_data(hdev, OGF_LINK_POLICY, OCF_WRITE_LINK_POLICY); - if (!sent) - break; - - lp = (struct hci_rp_write_link_policy *) skb->data; - - if (lp->status) - break; - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(lp->handle)); - if (conn) { - __le16 policy = get_unaligned((__le16 *) (sent + 2)); - conn->link_policy = __le16_to_cpu(policy); - } - - hci_dev_unlock(hdev); - break; - default: BT_DBG("%s: Command complete: ogf LINK_POLICY ocf %x", hdev->name, ocf); @@ -297,7 +275,7 @@ static void hci_cc_host_ctl(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb /* Command Complete OGF INFO_PARAM */ static void hci_cc_info_param(struct hci_dev *hdev, __u16 ocf, struct sk_buff *skb) { - struct hci_rp_read_local_features *lf; + struct hci_rp_read_loc_features *lf; struct hci_rp_read_buffer_size *bs; struct hci_rp_read_bd_addr *ba; @@ -305,7 +283,7 @@ static void hci_cc_info_param(struct hci_dev *hdev, __u16 ocf, struct sk_buff *s switch (ocf) { case OCF_READ_LOCAL_FEATURES: - lf = (struct hci_rp_read_local_features *) skb->data; + lf = (struct hci_rp_read_loc_features *) skb->data; if (lf->status) { BT_DBG("%s READ_LOCAL_FEATURES failed %d", hdev->name, lf->status); @@ -342,17 +320,9 @@ static void hci_cc_info_param(struct hci_dev *hdev, __u16 ocf, struct sk_buff *s } hdev->acl_mtu = __le16_to_cpu(bs->acl_mtu); - hdev->sco_mtu = bs->sco_mtu; - hdev->acl_pkts = __le16_to_cpu(bs->acl_max_pkt); - hdev->sco_pkts = __le16_to_cpu(bs->sco_max_pkt); - - if (test_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks)) { - hdev->sco_mtu = 64; - hdev->sco_pkts = 8; - } - - hdev->acl_cnt = hdev->acl_pkts; - hdev->sco_cnt = hdev->sco_pkts; + hdev->sco_mtu = bs->sco_mtu ? bs->sco_mtu : 64; + hdev->acl_pkts = hdev->acl_cnt = __le16_to_cpu(bs->acl_max_pkt); + hdev->sco_pkts = hdev->sco_cnt = __le16_to_cpu(bs->sco_max_pkt); BT_DBG("%s mtu: acl %d, sco %d max_pkt: acl %d, sco %d", hdev->name, hdev->acl_mtu, hdev->sco_mtu, hdev->acl_pkts, hdev->sco_pkts); @@ -470,46 +440,8 @@ static void hci_cs_link_policy(struct hci_dev *hdev, __u16 ocf, __u8 status) BT_DBG("%s ocf 0x%x", hdev->name, ocf); switch (ocf) { - case OCF_SNIFF_MODE: - if (status) { - struct hci_conn *conn; - struct hci_cp_sniff_mode *cp = hci_sent_cmd_data(hdev, OGF_LINK_POLICY, OCF_SNIFF_MODE); - - if (!cp) - break; - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); - if (conn) { - clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend); - } - - hci_dev_unlock(hdev); - } - break; - - case OCF_EXIT_SNIFF_MODE: - if (status) { - struct hci_conn *conn; - struct hci_cp_exit_sniff_mode *cp = hci_sent_cmd_data(hdev, OGF_LINK_POLICY, OCF_EXIT_SNIFF_MODE); - - if (!cp) - break; - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); - if (conn) { - clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend); - } - - hci_dev_unlock(hdev); - } - break; - default: - BT_DBG("%s Command status: ogf LINK_POLICY ocf %x", hdev->name, ocf); + BT_DBG("%s Command status: ogf HOST_POLICY ocf %x", hdev->name, ocf); break; } } @@ -691,16 +623,14 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk else cp.role = 0x01; /* Remain slave */ - hci_send_cmd(hdev, OGF_LINK_CTL, - OCF_ACCEPT_CONN_REQ, sizeof(cp), &cp); + hci_send_cmd(hdev, OGF_LINK_CTL, OCF_ACCEPT_CONN_REQ, sizeof(cp), &cp); } else { /* Connection rejected */ struct hci_cp_reject_conn_req cp; bacpy(&cp.bdaddr, &ev->bdaddr); cp.reason = 0x0f; - hci_send_cmd(hdev, OGF_LINK_CTL, - OCF_REJECT_CONN_REQ, sizeof(cp), &cp); + hci_send_cmd(hdev, OGF_LINK_CTL, OCF_REJECT_CONN_REQ, sizeof(cp), &cp); } } @@ -708,7 +638,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; BT_DBG("%s", hdev->name); @@ -730,21 +660,12 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s if (test_bit(HCI_ENCRYPT, &hdev->flags)) conn->link_mode |= HCI_LM_ENCRYPT; - /* Get remote features */ - if (conn->type == ACL_LINK) { - struct hci_cp_read_remote_features cp; - cp.handle = ev->handle; - hci_send_cmd(hdev, OGF_LINK_CTL, - OCF_READ_REMOTE_FEATURES, sizeof(cp), &cp); - } - /* Set link policy */ if (conn->type == ACL_LINK && hdev->link_policy) { struct hci_cp_write_link_policy cp; cp.handle = ev->handle; cp.policy = __cpu_to_le16(hdev->link_policy); - hci_send_cmd(hdev, OGF_LINK_POLICY, - OCF_WRITE_LINK_POLICY, sizeof(cp), &cp); + hci_send_cmd(hdev, OGF_LINK_POLICY, OCF_WRITE_LINK_POLICY, sizeof(cp), &cp); } /* Set packet type for incoming connection */ @@ -755,8 +676,7 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s __cpu_to_le16(hdev->pkt_type & ACL_PTYPE_MASK): __cpu_to_le16(hdev->pkt_type & SCO_PTYPE_MASK); - hci_send_cmd(hdev, OGF_LINK_CTL, - OCF_CHANGE_CONN_PTYPE, sizeof(cp), &cp); + hci_send_cmd(hdev, OGF_LINK_CTL, OCF_CHANGE_CONN_PTYPE, sizeof(cp), &cp); } } else conn->state = BT_CLOSED; @@ -784,7 +704,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_disconn_complete *ev = (struct hci_ev_disconn_complete *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); BT_DBG("%s status %d", hdev->name, ev->status); @@ -793,7 +714,7 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff hci_dev_lock(hdev); - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); + conn = hci_conn_hash_lookup_handle(hdev, handle); if (conn) { conn->state = BT_CLOSED; hci_proto_disconn_ind(conn, ev->reason); @@ -850,7 +771,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s static inline void hci_role_change_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_role_change *ev = (struct hci_ev_role_change *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; BT_DBG("%s status %d", hdev->name, ev->status); @@ -873,43 +794,18 @@ static inline void hci_role_change_evt(struct hci_dev *hdev, struct sk_buff *skb hci_dev_unlock(hdev); } -/* Mode Change */ -static inline void hci_mode_change_evt(struct hci_dev *hdev, struct sk_buff *skb) -{ - struct hci_ev_mode_change *ev = (struct hci_ev_mode_change *) skb->data; - struct hci_conn *conn; - - BT_DBG("%s status %d", hdev->name, ev->status); - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); - if (conn) { - conn->mode = ev->mode; - conn->interval = __le16_to_cpu(ev->interval); - - if (!test_and_clear_bit(HCI_CONN_MODE_CHANGE_PEND, &conn->pend)) { - if (conn->mode == HCI_CM_ACTIVE) - conn->power_save = 1; - else - conn->power_save = 0; - } - } - - hci_dev_unlock(hdev); -} - /* Authentication Complete */ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_auth_complete *ev = (struct hci_ev_auth_complete *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); BT_DBG("%s status %d", hdev->name, ev->status); hci_dev_lock(hdev); - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); + conn = hci_conn_hash_lookup_handle(hdev, handle); if (conn) { if (!ev->status) conn->link_mode |= HCI_LM_AUTH; @@ -924,7 +820,8 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s cp.handle = __cpu_to_le16(conn->handle); cp.encrypt = 1; hci_send_cmd(conn->hdev, OGF_LINK_CTL, - OCF_SET_CONN_ENCRYPT, sizeof(cp), &cp); + OCF_SET_CONN_ENCRYPT, + sizeof(cp), &cp); } else { clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend); hci_encrypt_cfm(conn, ev->status, 0x00); @@ -939,13 +836,14 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s static inline void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_encrypt_change *ev = (struct hci_ev_encrypt_change *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); BT_DBG("%s status %d", hdev->name, ev->status); hci_dev_lock(hdev); - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); + conn = hci_conn_hash_lookup_handle(hdev, handle); if (conn) { if (!ev->status) { if (ev->encrypt) @@ -966,13 +864,14 @@ static inline void hci_encrypt_change_evt(struct hci_dev *hdev, struct sk_buff * static inline void hci_change_conn_link_key_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_change_conn_link_key_complete *ev = (struct hci_ev_change_conn_link_key_complete *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); BT_DBG("%s status %d", hdev->name, ev->status); hci_dev_lock(hdev); - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); + conn = hci_conn_hash_lookup_handle(hdev, handle); if (conn) { if (!ev->status) conn->link_mode |= HCI_LM_SECURE; @@ -1000,35 +899,18 @@ static inline void hci_link_key_notify_evt(struct hci_dev *hdev, struct sk_buff { } -/* Remote Features */ -static inline void hci_remote_features_evt(struct hci_dev *hdev, struct sk_buff *skb) -{ - struct hci_ev_remote_features *ev = (struct hci_ev_remote_features *) skb->data; - struct hci_conn *conn; - - BT_DBG("%s status %d", hdev->name, ev->status); - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); - if (conn && !ev->status) { - memcpy(conn->features, ev->features, sizeof(conn->features)); - } - - hci_dev_unlock(hdev); -} - /* Clock Offset */ static inline void hci_clock_offset_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_clock_offset *ev = (struct hci_ev_clock_offset *) skb->data; - struct hci_conn *conn; + struct hci_conn *conn = NULL; + __u16 handle = __le16_to_cpu(ev->handle); BT_DBG("%s status %d", hdev->name, ev->status); hci_dev_lock(hdev); - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); + conn = hci_conn_hash_lookup_handle(hdev, handle); if (conn && !ev->status) { struct inquiry_entry *ie; @@ -1059,23 +941,6 @@ static inline void hci_pscan_rep_mode_evt(struct hci_dev *hdev, struct sk_buff * hci_dev_unlock(hdev); } -/* Sniff Subrate */ -static inline void hci_sniff_subrate_evt(struct hci_dev *hdev, struct sk_buff *skb) -{ - struct hci_ev_sniff_subrate *ev = (struct hci_ev_sniff_subrate *) skb->data; - struct hci_conn *conn; - - BT_DBG("%s status %d", hdev->name, ev->status); - - hci_dev_lock(hdev); - - conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); - if (conn) { - } - - hci_dev_unlock(hdev); -} - void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_event_hdr *hdr = (struct hci_event_hdr *) skb->data; @@ -1124,10 +989,6 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) hci_role_change_evt(hdev, skb); break; - case HCI_EV_MODE_CHANGE: - hci_mode_change_evt(hdev, skb); - break; - case HCI_EV_AUTH_COMPLETE: hci_auth_complete_evt(hdev, skb); break; @@ -1152,10 +1013,6 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) hci_link_key_notify_evt(hdev, skb); break; - case HCI_EV_REMOTE_FEATURES: - hci_remote_features_evt(hdev, skb); - break; - case HCI_EV_CLOCK_OFFSET: hci_clock_offset_evt(hdev, skb); break; @@ -1164,10 +1021,6 @@ void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb) hci_pscan_rep_mode_evt(hdev, skb); break; - case HCI_EV_SNIFF_SUBRATE: - hci_sniff_subrate_evt(hdev, skb); - break; - case HCI_EV_CMD_STATUS: cs = (struct hci_ev_cmd_status *) skb->data; skb_pull(skb, sizeof(cs)); diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 316fa7a3e..97bdec73d 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -24,6 +24,7 @@ /* Bluetooth HCI sockets. */ +#include #include #include @@ -120,13 +121,10 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb) if (!hci_test_bit(evt, &flt->event_mask)) continue; - if (flt->opcode && - ((evt == HCI_EV_CMD_COMPLETE && - flt->opcode != - get_unaligned((__u16 *)(skb->data + 3))) || - (evt == HCI_EV_CMD_STATUS && - flt->opcode != - get_unaligned((__u16 *)(skb->data + 4))))) + if (flt->opcode && ((evt == HCI_EV_CMD_COMPLETE && + flt->opcode != *(__u16 *)(skb->data + 3)) || + (evt == HCI_EV_CMD_STATUS && + flt->opcode != *(__u16 *)(skb->data + 4)))) continue; } diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 3987d167f..0ed387403 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c @@ -1,10 +1,9 @@ /* Bluetooth HCI driver model support. */ +#include #include #include -#include - #include #include @@ -13,35 +12,35 @@ #define BT_DBG(D...) #endif -static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t show_name(struct class_device *cdev, char *buf) { - struct hci_dev *hdev = dev_get_drvdata(dev); + struct hci_dev *hdev = class_get_devdata(cdev); return sprintf(buf, "%s\n", hdev->name); } -static ssize_t show_type(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t show_type(struct class_device *cdev, char *buf) { - struct hci_dev *hdev = dev_get_drvdata(dev); + struct hci_dev *hdev = class_get_devdata(cdev); return sprintf(buf, "%d\n", hdev->type); } -static ssize_t show_address(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t show_address(struct class_device *cdev, char *buf) { - struct hci_dev *hdev = dev_get_drvdata(dev); + struct hci_dev *hdev = class_get_devdata(cdev); bdaddr_t bdaddr; baswap(&bdaddr, &hdev->bdaddr); return sprintf(buf, "%s\n", batostr(&bdaddr)); } -static ssize_t show_flags(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t show_flags(struct class_device *cdev, char *buf) { - struct hci_dev *hdev = dev_get_drvdata(dev); + struct hci_dev *hdev = class_get_devdata(cdev); return sprintf(buf, "0x%lx\n", hdev->flags); } -static ssize_t show_inquiry_cache(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t show_inquiry_cache(struct class_device *cdev, char *buf) { - struct hci_dev *hdev = dev_get_drvdata(dev); + struct hci_dev *hdev = class_get_devdata(cdev); struct inquiry_cache *cache = &hdev->inq_cache; struct inquiry_entry *e; int n = 0; @@ -63,193 +62,94 @@ static ssize_t show_inquiry_cache(struct device *dev, struct device_attribute *a return n; } -static ssize_t show_idle_timeout(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct hci_dev *hdev = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", hdev->idle_timeout); -} - -static ssize_t store_idle_timeout(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) -{ - struct hci_dev *hdev = dev_get_drvdata(dev); - char *ptr; - __u32 val; - - val = simple_strtoul(buf, &ptr, 10); - if (ptr == buf) - return -EINVAL; - - if (val != 0 && (val < 500 || val > 3600000)) - return -EINVAL; +static CLASS_DEVICE_ATTR(name, S_IRUGO, show_name, NULL); +static CLASS_DEVICE_ATTR(type, S_IRUGO, show_type, NULL); +static CLASS_DEVICE_ATTR(address, S_IRUGO, show_address, NULL); +static CLASS_DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL); +static CLASS_DEVICE_ATTR(inquiry_cache, S_IRUGO, show_inquiry_cache, NULL); - hdev->idle_timeout = val; - - return count; -} - -static ssize_t show_sniff_max_interval(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct hci_dev *hdev = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", hdev->sniff_max_interval); -} +static struct class_device_attribute *bt_attrs[] = { + &class_device_attr_name, + &class_device_attr_type, + &class_device_attr_address, + &class_device_attr_flags, + &class_device_attr_inquiry_cache, + NULL +}; -static ssize_t store_sniff_max_interval(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) +#ifdef CONFIG_HOTPLUG +static int bt_uevent(struct class_device *cdev, char **envp, int num_envp, char *buf, int size) { - struct hci_dev *hdev = dev_get_drvdata(dev); - char *ptr; - __u16 val; - - val = simple_strtoul(buf, &ptr, 10); - if (ptr == buf) - return -EINVAL; - - if (val < 0x0002 || val > 0xFFFE || val % 2) - return -EINVAL; + struct hci_dev *hdev = class_get_devdata(cdev); + int n, i = 0; - if (val < hdev->sniff_min_interval) - return -EINVAL; + envp[i++] = buf; + n = snprintf(buf, size, "INTERFACE=%s", hdev->name) + 1; + buf += n; + size -= n; - hdev->sniff_max_interval = val; + if ((size <= 0) || (i >= num_envp)) + return -ENOMEM; - return count; -} - -static ssize_t show_sniff_min_interval(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct hci_dev *hdev = dev_get_drvdata(dev); - return sprintf(buf, "%d\n", hdev->sniff_min_interval); + envp[i] = NULL; + return 0; } +#endif -static ssize_t store_sniff_min_interval(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) +static void bt_release(struct class_device *cdev) { - struct hci_dev *hdev = dev_get_drvdata(dev); - char *ptr; - __u16 val; - - val = simple_strtoul(buf, &ptr, 10); - if (ptr == buf) - return -EINVAL; - - if (val < 0x0002 || val > 0xFFFE || val % 2) - return -EINVAL; - - if (val > hdev->sniff_max_interval) - return -EINVAL; - - hdev->sniff_min_interval = val; + struct hci_dev *hdev = class_get_devdata(cdev); - return count; + kfree(hdev); } -static DEVICE_ATTR(name, S_IRUGO, show_name, NULL); -static DEVICE_ATTR(type, S_IRUGO, show_type, NULL); -static DEVICE_ATTR(address, S_IRUGO, show_address, NULL); -static DEVICE_ATTR(flags, S_IRUGO, show_flags, NULL); -static DEVICE_ATTR(inquiry_cache, S_IRUGO, show_inquiry_cache, NULL); - -static DEVICE_ATTR(idle_timeout, S_IRUGO | S_IWUSR, - show_idle_timeout, store_idle_timeout); -static DEVICE_ATTR(sniff_max_interval, S_IRUGO | S_IWUSR, - show_sniff_max_interval, store_sniff_max_interval); -static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR, - show_sniff_min_interval, store_sniff_min_interval); - -static struct device_attribute *bt_attrs[] = { - &dev_attr_name, - &dev_attr_type, - &dev_attr_address, - &dev_attr_flags, - &dev_attr_inquiry_cache, - &dev_attr_idle_timeout, - &dev_attr_sniff_max_interval, - &dev_attr_sniff_min_interval, - NULL +struct class bt_class = { + .name = "bluetooth", + .release = bt_release, +#ifdef CONFIG_HOTPLUG + .uevent = bt_uevent, +#endif }; -struct class *bt_class = NULL; EXPORT_SYMBOL_GPL(bt_class); -static struct bus_type bt_bus = { - .name = "bluetooth", -}; - -static struct platform_device *bt_platform; - -static void bt_release(struct device *dev) -{ - struct hci_dev *hdev = dev_get_drvdata(dev); - kfree(hdev); -} - int hci_register_sysfs(struct hci_dev *hdev) { - struct device *dev = &hdev->dev; + struct class_device *cdev = &hdev->class_dev; unsigned int i; int err; BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); - dev->class = bt_class; - - if (hdev->parent) - dev->parent = hdev->parent; - else - dev->parent = &bt_platform->dev; - - strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE); - - dev->release = bt_release; + cdev->class = &bt_class; + class_set_devdata(cdev, hdev); - dev_set_drvdata(dev, hdev); - - err = device_register(dev); + strlcpy(cdev->class_id, hdev->name, BUS_ID_SIZE); + err = class_device_register(cdev); if (err < 0) return err; for (i = 0; bt_attrs[i]; i++) - device_create_file(dev, bt_attrs[i]); + class_device_create_file(cdev, bt_attrs[i]); return 0; } void hci_unregister_sysfs(struct hci_dev *hdev) { - struct device *dev = &hdev->dev; + struct class_device * cdev = &hdev->class_dev; BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); - device_del(dev); + class_device_del(cdev); } int __init bt_sysfs_init(void) { - int err; - - bt_platform = platform_device_register_simple("bluetooth", -1, NULL, 0); - if (IS_ERR(bt_platform)) - return PTR_ERR(bt_platform); - - err = bus_register(&bt_bus); - if (err < 0) { - platform_device_unregister(bt_platform); - return err; - } - - bt_class = class_create(THIS_MODULE, "bluetooth"); - if (IS_ERR(bt_class)) { - bus_unregister(&bt_bus); - platform_device_unregister(bt_platform); - return PTR_ERR(bt_class); - } - - return 0; + return class_register(&bt_class); } void __exit bt_sysfs_cleanup(void) { - class_destroy(bt_class); - - bus_unregister(&bt_bus); - - platform_device_unregister(bt_platform); + class_unregister(&bt_class); } diff --git a/net/bluetooth/hidp/Kconfig b/net/bluetooth/hidp/Kconfig index c6abf2a5a..edfea772f 100644 --- a/net/bluetooth/hidp/Kconfig +++ b/net/bluetooth/hidp/Kconfig @@ -1,6 +1,7 @@ config BT_HIDP tristate "HIDP protocol support" - depends on BT && BT_L2CAP && INPUT + depends on BT && BT_L2CAP && (BROKEN || !S390) + select INPUT help HIDP (Human Interface Device Protocol) is a transport layer for HID reports. HIDP is required for the Bluetooth Human diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index c6e3a2c27..cdb9cfafd 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include @@ -582,9 +583,10 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst)) return -ENOTUNIQ; - session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL); + session = kmalloc(sizeof(struct hidp_session), GFP_KERNEL); if (!session) return -ENOMEM; + memset(session, 0, sizeof(struct hidp_session)); session->input = input_allocate_device(); if (!session->input) { diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c index 099646e4e..b8f67761b 100644 --- a/net/bluetooth/hidp/sock.c +++ b/net/bluetooth/hidp/sock.c @@ -20,6 +20,7 @@ SOFTWARE IS DISCLAIMED. */ +#include #include #include diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index d56f60b39..f6b4a8085 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -24,6 +24,7 @@ /* Bluetooth L2CAP core and sockets. */ +#include #include #include @@ -63,6 +64,11 @@ static struct bt_sock_list l2cap_sk_list = { .lock = RW_LOCK_UNLOCKED }; +static int l2cap_conn_del(struct hci_conn *conn, int err); + +static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent); +static void l2cap_chan_del(struct sock *sk, int err); + static void __l2cap_sock_close(struct sock *sk, int reason); static void l2cap_sock_close(struct sock *sk); static void l2cap_sock_kill(struct sock *sk); @@ -104,177 +110,24 @@ static void l2cap_sock_init_timer(struct sock *sk) sk->sk_timer.data = (unsigned long)sk; } -/* ---- L2CAP channels ---- */ -static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid) -{ - struct sock *s; - for (s = l->head; s; s = l2cap_pi(s)->next_c) { - if (l2cap_pi(s)->dcid == cid) - break; - } - return s; -} - -static struct sock *__l2cap_get_chan_by_scid(struct l2cap_chan_list *l, u16 cid) -{ - struct sock *s; - for (s = l->head; s; s = l2cap_pi(s)->next_c) { - if (l2cap_pi(s)->scid == cid) - break; - } - return s; -} - -/* Find channel with given SCID. - * Returns locked socket */ -static inline struct sock *l2cap_get_chan_by_scid(struct l2cap_chan_list *l, u16 cid) -{ - struct sock *s; - read_lock(&l->lock); - s = __l2cap_get_chan_by_scid(l, cid); - if (s) bh_lock_sock(s); - read_unlock(&l->lock); - return s; -} - -static struct sock *__l2cap_get_chan_by_ident(struct l2cap_chan_list *l, u8 ident) -{ - struct sock *s; - for (s = l->head; s; s = l2cap_pi(s)->next_c) { - if (l2cap_pi(s)->ident == ident) - break; - } - return s; -} - -static inline struct sock *l2cap_get_chan_by_ident(struct l2cap_chan_list *l, u8 ident) -{ - struct sock *s; - read_lock(&l->lock); - s = __l2cap_get_chan_by_ident(l, ident); - if (s) bh_lock_sock(s); - read_unlock(&l->lock); - return s; -} - -static u16 l2cap_alloc_cid(struct l2cap_chan_list *l) -{ - u16 cid = 0x0040; - - for (; cid < 0xffff; cid++) { - if(!__l2cap_get_chan_by_scid(l, cid)) - return cid; - } - - return 0; -} - -static inline void __l2cap_chan_link(struct l2cap_chan_list *l, struct sock *sk) -{ - sock_hold(sk); - - if (l->head) - l2cap_pi(l->head)->prev_c = sk; - - l2cap_pi(sk)->next_c = l->head; - l2cap_pi(sk)->prev_c = NULL; - l->head = sk; -} - -static inline void l2cap_chan_unlink(struct l2cap_chan_list *l, struct sock *sk) -{ - struct sock *next = l2cap_pi(sk)->next_c, *prev = l2cap_pi(sk)->prev_c; - - write_lock_bh(&l->lock); - if (sk == l->head) - l->head = next; - - if (next) - l2cap_pi(next)->prev_c = prev; - if (prev) - l2cap_pi(prev)->next_c = next; - write_unlock_bh(&l->lock); - - __sock_put(sk); -} - -static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent) -{ - struct l2cap_chan_list *l = &conn->chan_list; - - BT_DBG("conn %p, psm 0x%2.2x, dcid 0x%4.4x", conn, l2cap_pi(sk)->psm, l2cap_pi(sk)->dcid); - - l2cap_pi(sk)->conn = conn; - - if (sk->sk_type == SOCK_SEQPACKET) { - /* Alloc CID for connection-oriented socket */ - l2cap_pi(sk)->scid = l2cap_alloc_cid(l); - } else if (sk->sk_type == SOCK_DGRAM) { - /* Connectionless socket */ - l2cap_pi(sk)->scid = 0x0002; - l2cap_pi(sk)->dcid = 0x0002; - l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; - } else { - /* Raw socket can send/recv signalling messages only */ - l2cap_pi(sk)->scid = 0x0001; - l2cap_pi(sk)->dcid = 0x0001; - l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; - } - - __l2cap_chan_link(l, sk); - - if (parent) - bt_accept_enqueue(parent, sk); -} - -/* Delete channel. - * Must be called on the locked socket. */ -static void l2cap_chan_del(struct sock *sk, int err) -{ - struct l2cap_conn *conn = l2cap_pi(sk)->conn; - struct sock *parent = bt_sk(sk)->parent; - - l2cap_sock_clear_timer(sk); - - BT_DBG("sk %p, conn %p, err %d", sk, conn, err); - - if (conn) { - /* Unlink from channel list */ - l2cap_chan_unlink(&conn->chan_list, sk); - l2cap_pi(sk)->conn = NULL; - hci_conn_put(conn->hcon); - } - - sk->sk_state = BT_CLOSED; - sock_set_flag(sk, SOCK_ZAPPED); - - if (err) - sk->sk_err = err; - - if (parent) { - bt_accept_unlink(sk); - parent->sk_data_ready(parent, 0); - } else - sk->sk_state_change(sk); -} - /* ---- L2CAP connections ---- */ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) { - struct l2cap_conn *conn = hcon->l2cap_data; + struct l2cap_conn *conn; - if (conn || status) + if ((conn = hcon->l2cap_data)) return conn; - conn = kzalloc(sizeof(struct l2cap_conn), GFP_ATOMIC); - if (!conn) + if (status) + return conn; + + if (!(conn = kmalloc(sizeof(struct l2cap_conn), GFP_ATOMIC))) return NULL; + memset(conn, 0, sizeof(struct l2cap_conn)); hcon->l2cap_data = conn; conn->hcon = hcon; - BT_DBG("hcon %p conn %p", hcon, conn); - conn->mtu = hcon->hdev->acl_mtu; conn->src = &hcon->hdev->bdaddr; conn->dst = &hcon->dst; @@ -282,16 +135,17 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) spin_lock_init(&conn->lock); rwlock_init(&conn->chan_list.lock); + BT_DBG("hcon %p conn %p", hcon, conn); return conn; } -static void l2cap_conn_del(struct hci_conn *hcon, int err) +static int l2cap_conn_del(struct hci_conn *hcon, int err) { - struct l2cap_conn *conn = hcon->l2cap_data; + struct l2cap_conn *conn; struct sock *sk; - if (!conn) - return; + if (!(conn = hcon->l2cap_data)) + return 0; BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); @@ -308,14 +162,15 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) hcon->l2cap_data = NULL; kfree(conn); + return 0; } static inline void l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent) { struct l2cap_chan_list *l = &conn->chan_list; - write_lock_bh(&l->lock); + write_lock(&l->lock); __l2cap_chan_add(conn, sk, parent); - write_unlock_bh(&l->lock); + write_unlock(&l->lock); } static inline u8 l2cap_get_ident(struct l2cap_conn *conn) @@ -328,14 +183,14 @@ static inline u8 l2cap_get_ident(struct l2cap_conn *conn) * 200 - 254 are used by utilities like l2ping, etc. */ - spin_lock_bh(&conn->lock); + spin_lock(&conn->lock); if (++conn->tx_ident > 128) conn->tx_ident = 1; id = conn->tx_ident; - spin_unlock_bh(&conn->lock); + spin_unlock(&conn->lock); return id; } @@ -1071,6 +926,160 @@ static int l2cap_sock_release(struct socket *sock) return err; } +/* ---- L2CAP channels ---- */ +static struct sock *__l2cap_get_chan_by_dcid(struct l2cap_chan_list *l, u16 cid) +{ + struct sock *s; + for (s = l->head; s; s = l2cap_pi(s)->next_c) { + if (l2cap_pi(s)->dcid == cid) + break; + } + return s; +} + +static struct sock *__l2cap_get_chan_by_scid(struct l2cap_chan_list *l, u16 cid) +{ + struct sock *s; + for (s = l->head; s; s = l2cap_pi(s)->next_c) { + if (l2cap_pi(s)->scid == cid) + break; + } + return s; +} + +/* Find channel with given SCID. + * Returns locked socket */ +static inline struct sock *l2cap_get_chan_by_scid(struct l2cap_chan_list *l, u16 cid) +{ + struct sock *s; + read_lock(&l->lock); + s = __l2cap_get_chan_by_scid(l, cid); + if (s) bh_lock_sock(s); + read_unlock(&l->lock); + return s; +} + +static struct sock *__l2cap_get_chan_by_ident(struct l2cap_chan_list *l, u8 ident) +{ + struct sock *s; + for (s = l->head; s; s = l2cap_pi(s)->next_c) { + if (l2cap_pi(s)->ident == ident) + break; + } + return s; +} + +static inline struct sock *l2cap_get_chan_by_ident(struct l2cap_chan_list *l, u8 ident) +{ + struct sock *s; + read_lock(&l->lock); + s = __l2cap_get_chan_by_ident(l, ident); + if (s) bh_lock_sock(s); + read_unlock(&l->lock); + return s; +} + +static u16 l2cap_alloc_cid(struct l2cap_chan_list *l) +{ + u16 cid = 0x0040; + + for (; cid < 0xffff; cid++) { + if(!__l2cap_get_chan_by_scid(l, cid)) + return cid; + } + + return 0; +} + +static inline void __l2cap_chan_link(struct l2cap_chan_list *l, struct sock *sk) +{ + sock_hold(sk); + + if (l->head) + l2cap_pi(l->head)->prev_c = sk; + + l2cap_pi(sk)->next_c = l->head; + l2cap_pi(sk)->prev_c = NULL; + l->head = sk; +} + +static inline void l2cap_chan_unlink(struct l2cap_chan_list *l, struct sock *sk) +{ + struct sock *next = l2cap_pi(sk)->next_c, *prev = l2cap_pi(sk)->prev_c; + + write_lock(&l->lock); + if (sk == l->head) + l->head = next; + + if (next) + l2cap_pi(next)->prev_c = prev; + if (prev) + l2cap_pi(prev)->next_c = next; + write_unlock(&l->lock); + + __sock_put(sk); +} + +static void __l2cap_chan_add(struct l2cap_conn *conn, struct sock *sk, struct sock *parent) +{ + struct l2cap_chan_list *l = &conn->chan_list; + + BT_DBG("conn %p, psm 0x%2.2x, dcid 0x%4.4x", conn, l2cap_pi(sk)->psm, l2cap_pi(sk)->dcid); + + l2cap_pi(sk)->conn = conn; + + if (sk->sk_type == SOCK_SEQPACKET) { + /* Alloc CID for connection-oriented socket */ + l2cap_pi(sk)->scid = l2cap_alloc_cid(l); + } else if (sk->sk_type == SOCK_DGRAM) { + /* Connectionless socket */ + l2cap_pi(sk)->scid = 0x0002; + l2cap_pi(sk)->dcid = 0x0002; + l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; + } else { + /* Raw socket can send/recv signalling messages only */ + l2cap_pi(sk)->scid = 0x0001; + l2cap_pi(sk)->dcid = 0x0001; + l2cap_pi(sk)->omtu = L2CAP_DEFAULT_MTU; + } + + __l2cap_chan_link(l, sk); + + if (parent) + bt_accept_enqueue(parent, sk); +} + +/* Delete channel. + * Must be called on the locked socket. */ +static void l2cap_chan_del(struct sock *sk, int err) +{ + struct l2cap_conn *conn = l2cap_pi(sk)->conn; + struct sock *parent = bt_sk(sk)->parent; + + l2cap_sock_clear_timer(sk); + + BT_DBG("sk %p, conn %p, err %d", sk, conn, err); + + if (conn) { + /* Unlink from channel list */ + l2cap_chan_unlink(&conn->chan_list, sk); + l2cap_pi(sk)->conn = NULL; + hci_conn_put(conn->hcon); + } + + sk->sk_state = BT_CLOSED; + sock_set_flag(sk, SOCK_ZAPPED); + + if (err) + sk->sk_err = err; + + if (parent) { + bt_accept_unlink(sk); + parent->sk_data_ready(parent, 0); + } else + sk->sk_state_change(sk); +} + static void l2cap_conn_ready(struct l2cap_conn *conn) { struct l2cap_chan_list *l = &conn->chan_list; @@ -1416,11 +1425,11 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd if (!sk) goto response; - write_lock_bh(&list->lock); + write_lock(&list->lock); /* Check if we already have channel with that dcid */ if (__l2cap_get_chan_by_dcid(list, scid)) { - write_unlock_bh(&list->lock); + write_unlock(&list->lock); sock_set_flag(sk, SOCK_ZAPPED); l2cap_sock_kill(sk); goto response; @@ -1458,7 +1467,7 @@ static inline int l2cap_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hd result = status = 0; done: - write_unlock_bh(&list->lock); + write_unlock(&list->lock); response: bh_unlock_sock(parent); @@ -1826,9 +1835,7 @@ drop: kfree_skb(skb); done: - if (sk) - bh_unlock_sock(sk); - + if (sk) bh_unlock_sock(sk); return 0; } @@ -1919,18 +1926,18 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type) static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status) { - struct l2cap_conn *conn; - BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); if (hcon->type != ACL_LINK) return 0; if (!status) { + struct l2cap_conn *conn; + conn = l2cap_conn_add(hcon, status); if (conn) l2cap_conn_ready(conn); - } else + } else l2cap_conn_del(hcon, bt_err(status)); return 0; @@ -1944,21 +1951,19 @@ static int l2cap_disconn_ind(struct hci_conn *hcon, u8 reason) return 0; l2cap_conn_del(hcon, bt_err(reason)); - return 0; } static int l2cap_auth_cfm(struct hci_conn *hcon, u8 status) { struct l2cap_chan_list *l; - struct l2cap_conn *conn = conn = hcon->l2cap_data; + struct l2cap_conn *conn; struct l2cap_conn_rsp rsp; struct sock *sk; int result; - if (!conn) + if (!(conn = hcon->l2cap_data)) return 0; - l = &conn->chan_list; BT_DBG("conn %p", conn); @@ -2001,14 +2006,13 @@ static int l2cap_auth_cfm(struct hci_conn *hcon, u8 status) static int l2cap_encrypt_cfm(struct hci_conn *hcon, u8 status) { struct l2cap_chan_list *l; - struct l2cap_conn *conn = hcon->l2cap_data; + struct l2cap_conn *conn; struct l2cap_conn_rsp rsp; struct sock *sk; int result; - if (!conn) + if (!(conn = hcon->l2cap_data)) return 0; - l = &conn->chan_list; BT_DBG("conn %p", conn); @@ -2216,7 +2220,7 @@ static int __init l2cap_init(void) goto error; } - class_create_file(bt_class, &class_attr_l2cap); + class_create_file(&bt_class, &class_attr_l2cap); BT_INFO("L2CAP ver %s", VERSION); BT_INFO("L2CAP socket layer initialized"); @@ -2230,7 +2234,7 @@ error: static void __exit l2cap_exit(void) { - class_remove_file(bt_class, &class_attr_l2cap); + class_remove_file(&bt_class, &class_attr_l2cap); if (bt_sock_unregister(BTPROTO_L2CAP) < 0) BT_ERR("L2CAP socket unregistration failed"); diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index e5fd0cb70..ee6a66979 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c @@ -24,6 +24,7 @@ /* Bluetooth kernel library. */ +#include #include #include diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 332dd8f43..e99010ce8 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -27,6 +27,7 @@ * $Id: core.c,v 1.42 2002/10/01 23:26:25 maxk Exp $ */ +#include #include #include #include @@ -52,10 +53,8 @@ #define BT_DBG(D...) #endif -#define VERSION "1.8" +#define VERSION "1.7" -static int disable_cfc = 0; -static int channel_mtu = -1; static unsigned int l2cap_mtu = RFCOMM_MAX_L2CAP_MTU; static struct task_struct *rfcomm_thread; @@ -274,10 +273,10 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio) { - struct rfcomm_dlc *d = kzalloc(sizeof(*d), prio); - + struct rfcomm_dlc *d = kmalloc(sizeof(*d), prio); if (!d) return NULL; + memset(d, 0, sizeof(*d)); init_timer(&d->timer); d->timer.function = rfcomm_dlc_timeout; @@ -290,7 +289,6 @@ struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio) rfcomm_dlc_clear_state(d); BT_DBG("%p", d); - return d; } @@ -524,10 +522,10 @@ int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig) /* ---- RFCOMM sessions ---- */ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) { - struct rfcomm_session *s = kzalloc(sizeof(*s), GFP_KERNEL); - + struct rfcomm_session *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) return NULL; + memset(s, 0, sizeof(*s)); BT_DBG("session %p sock %p", s, sock); @@ -536,7 +534,7 @@ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) s->sock = sock; s->mtu = RFCOMM_DEFAULT_MTU; - s->cfc = disable_cfc ? RFCOMM_CFC_DISABLED : RFCOMM_CFC_UNKNOWN; + s->cfc = RFCOMM_CFC_UNKNOWN; /* Do not increment module usage count for listening sessions. * Otherwise we won't be able to unload the module. */ @@ -813,10 +811,7 @@ static int rfcomm_send_pn(struct rfcomm_session *s, int cr, struct rfcomm_dlc *d pn->credits = 0; } - if (cr && channel_mtu >= 0) - pn->mtu = htobs(channel_mtu); - else - pn->mtu = htobs(d->mtu); + pn->mtu = htobs(d->mtu); *ptr = __fcs(buf); ptr++; @@ -1155,8 +1150,6 @@ static inline int rfcomm_check_link_mode(struct rfcomm_dlc *d) static void rfcomm_dlc_accept(struct rfcomm_dlc *d) { - struct sock *sk = d->session->sock->sk; - BT_DBG("dlc %p", d); rfcomm_send_ua(d->session, d->dlci); @@ -1166,9 +1159,6 @@ static void rfcomm_dlc_accept(struct rfcomm_dlc *d) d->state_change(d, 0); rfcomm_dlc_unlock(d); - if (d->link_mode & RFCOMM_LM_MASTER) - hci_conn_switch_role(l2cap_pi(sk)->conn->hcon, 0x00); - rfcomm_send_msc(d->session, 1, d->dlci, d->v24_sig); } @@ -1233,24 +1223,17 @@ static int rfcomm_apply_pn(struct rfcomm_dlc *d, int cr, struct rfcomm_pn *pn) BT_DBG("dlc %p state %ld dlci %d mtu %d fc 0x%x credits %d", d, d->state, d->dlci, pn->mtu, pn->flow_ctrl, pn->credits); - if ((pn->flow_ctrl == 0xf0 && s->cfc != RFCOMM_CFC_DISABLED) || - pn->flow_ctrl == 0xe0) { - d->cfc = RFCOMM_CFC_ENABLED; + if (pn->flow_ctrl == 0xf0 || pn->flow_ctrl == 0xe0) { + d->cfc = s->cfc = RFCOMM_CFC_ENABLED; d->tx_credits = pn->credits; } else { - d->cfc = RFCOMM_CFC_DISABLED; + d->cfc = s->cfc = RFCOMM_CFC_DISABLED; set_bit(RFCOMM_TX_THROTTLED, &d->flags); } - if (s->cfc == RFCOMM_CFC_UNKNOWN) - s->cfc = d->cfc; - d->priority = pn->priority; - d->mtu = btohs(pn->mtu); - - if (cr && d->mtu > s->mtu) - d->mtu = s->mtu; + d->mtu = s->mtu = btohs(pn->mtu); return 0; } @@ -1777,11 +1760,6 @@ static inline void rfcomm_accept_connection(struct rfcomm_session *s) s = rfcomm_session_add(nsock, BT_OPEN); if (s) { rfcomm_session_hold(s); - - /* We should adjust MTU on incoming sessions. - * L2CAP MTU minus UIH header and FCS. */ - s->mtu = min(l2cap_pi(nsock->sk)->omtu, l2cap_pi(nsock->sk)->imtu) - 5; - rfcomm_schedule(RFCOMM_SCHED_RX); } else sock_release(nsock); @@ -2058,7 +2036,7 @@ static int __init rfcomm_init(void) kernel_thread(rfcomm_run, NULL, CLONE_KERNEL); - class_create_file(bt_class, &class_attr_rfcomm_dlc); + class_create_file(&bt_class, &class_attr_rfcomm_dlc); rfcomm_init_sockets(); @@ -2073,7 +2051,7 @@ static int __init rfcomm_init(void) static void __exit rfcomm_exit(void) { - class_remove_file(bt_class, &class_attr_rfcomm_dlc); + class_remove_file(&bt_class, &class_attr_rfcomm_dlc); hci_unregister_cb(&rfcomm_cb); @@ -2096,12 +2074,6 @@ static void __exit rfcomm_exit(void) module_init(rfcomm_init); module_exit(rfcomm_exit); -module_param(disable_cfc, bool, 0644); -MODULE_PARM_DESC(disable_cfc, "Disable credit based flow control"); - -module_param(channel_mtu, int, 0644); -MODULE_PARM_DESC(channel_mtu, "Default MTU for the RFCOMM channel"); - module_param(l2cap_mtu, uint, 0644); MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection"); diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 220fee04e..757d2dd3b 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c @@ -27,6 +27,7 @@ * $Id: sock.c,v 1.24 2002/10/03 01:00:34 maxk Exp $ */ +#include #include #include @@ -944,7 +945,7 @@ int __init rfcomm_init_sockets(void) if (err < 0) goto error; - class_create_file(bt_class, &class_attr_rfcomm); + class_create_file(&bt_class, &class_attr_rfcomm); BT_INFO("RFCOMM socket layer initialized"); @@ -958,7 +959,7 @@ error: void __exit rfcomm_cleanup_sockets(void) { - class_remove_file(bt_class, &class_attr_rfcomm); + class_remove_file(&bt_class, &class_attr_rfcomm); if (bt_sock_unregister(BTPROTO_RFCOMM) < 0) BT_ERR("RFCOMM socket layer unregistration failed"); diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 5d65cebda..74368f79e 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -27,6 +27,7 @@ * $Id: tty.c,v 1.24 2002/10/03 01:54:38 holtmann Exp $ */ +#include #include #include @@ -169,9 +170,10 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) BT_DBG("id %d channel %d", req->dev_id, req->channel); - dev = kzalloc(sizeof(struct rfcomm_dev), GFP_KERNEL); + dev = kmalloc(sizeof(struct rfcomm_dev), GFP_KERNEL); if (!dev) return -ENOMEM; + memset(dev, 0, sizeof(struct rfcomm_dev)); write_lock_bh(&rfcomm_dev_lock); @@ -478,8 +480,12 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb) BT_DBG("dlc %p tty %p len %d", dlc, tty, skb->len); - tty_insert_flip_string(tty, skb->data, skb->len); - tty_flip_buffer_push(tty); + if (test_bit(TTY_DONT_FLIP, &tty->flags)) { + tty_buffer_request_room(tty, skb->len); + tty_insert_flip_string(tty, skb->data, skb->len); + tty_flip_buffer_push(tty); + } else + tty->ldisc.receive_buf(tty, skb->data, NULL, skb->len); kfree_skb(skb); } @@ -748,9 +754,6 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct termios *old) BT_DBG("tty %p termios %p", tty, old); - if (!dev) - return; - /* Handle turning off CRTSCTS */ if ((old->c_cflag & CRTSCTS) && !(new->c_cflag & CRTSCTS)) BT_DBG("Turning off CRTSCTS unsupported"); @@ -1022,12 +1025,13 @@ int rfcomm_init_ttys(void) rfcomm_tty_driver->owner = THIS_MODULE; rfcomm_tty_driver->driver_name = "rfcomm"; + rfcomm_tty_driver->devfs_name = "bluetooth/rfcomm/"; rfcomm_tty_driver->name = "rfcomm"; rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR; rfcomm_tty_driver->minor_start = RFCOMM_TTY_MINOR; rfcomm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; rfcomm_tty_driver->subtype = SERIAL_TYPE_NORMAL; - rfcomm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; + rfcomm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; rfcomm_tty_driver->init_termios = tty_std_termios; rfcomm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; tty_set_operations(rfcomm_tty_driver, &rfcomm_ops); diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 7714a2ec3..0c2d13ad6 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c @@ -24,6 +24,7 @@ /* Bluetooth SCO sockets. */ +#include #include #include @@ -108,14 +109,17 @@ static void sco_sock_init_timer(struct sock *sk) static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) { struct hci_dev *hdev = hcon->hdev; - struct sco_conn *conn = hcon->sco_data; + struct sco_conn *conn; - if (conn || status) + if ((conn = hcon->sco_data)) return conn; - conn = kzalloc(sizeof(struct sco_conn), GFP_ATOMIC); - if (!conn) + if (status) + return conn; + + if (!(conn = kmalloc(sizeof(struct sco_conn), GFP_ATOMIC))) return NULL; + memset(conn, 0, sizeof(struct sco_conn)); spin_lock_init(&conn->lock); @@ -131,7 +135,6 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon, __u8 status) conn->mtu = 60; BT_DBG("hcon %p conn %p", hcon, conn); - return conn; } @@ -967,7 +970,7 @@ static int __init sco_init(void) goto error; } - class_create_file(bt_class, &class_attr_sco); + class_create_file(&bt_class, &class_attr_sco); BT_INFO("SCO (Voice Link) ver %s", VERSION); BT_INFO("SCO socket layer initialized"); @@ -981,7 +984,7 @@ error: static void __exit sco_exit(void) { - class_remove_file(bt_class, &class_attr_sco); + class_remove_file(&bt_class, &class_attr_sco); if (bt_sock_unregister(BTPROTO_SCO) < 0) BT_ERR("SCO socket unregistration failed"); diff --git a/net/bridge/Makefile b/net/bridge/Makefile index f444c12cd..59556e40e 100644 --- a/net/bridge/Makefile +++ b/net/bridge/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_BRIDGE) += bridge.o bridge-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \ br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o \ - br_stp_if.o br_stp_timer.o br_netlink.o + br_stp_if.o br_stp_timer.o bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.o diff --git a/net/bridge/br.c b/net/bridge/br.c index 299438799..12da21afb 100644 --- a/net/bridge/br.c +++ b/net/bridge/br.c @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -29,46 +30,36 @@ static struct llc_sap *br_stp_sap; static int __init br_init(void) { - int err; - br_stp_sap = llc_sap_open(LLC_SAP_BSPAN, br_stp_rcv); if (!br_stp_sap) { printk(KERN_ERR "bridge: can't register sap for STP\n"); - return -EADDRINUSE; + return -EBUSY; } br_fdb_init(); - err = br_netfilter_init(); - if (err) - goto err_out1; - - err = register_netdevice_notifier(&br_device_notifier); - if (err) - goto err_out2; - - br_netlink_init(); +#ifdef CONFIG_BRIDGE_NETFILTER + if (br_netfilter_init()) + return 1; +#endif brioctl_set(br_ioctl_deviceless_stub); br_handle_frame_hook = br_handle_frame; br_fdb_get_hook = br_fdb_get; br_fdb_put_hook = br_fdb_put; - return 0; + register_netdevice_notifier(&br_device_notifier); -err_out2: - br_netfilter_fini(); -err_out1: - llc_sap_put(br_stp_sap); - return err; + return 0; } static void __exit br_deinit(void) { rcu_assign_pointer(br_stp_sap->rcv_func, NULL); - br_netlink_fini(); +#ifdef CONFIG_BRIDGE_NETFILTER br_netfilter_fini(); +#endif unregister_netdevice_notifier(&br_device_notifier); brioctl_set(NULL); diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 864fbbc7b..056df7ceb 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c @@ -20,11 +20,14 @@ #include #include "br_private.h" -/* Don't forward packets to originating port or forwarding diasabled */ static inline int should_deliver(const struct net_bridge_port *p, const struct sk_buff *skb) { - return (skb->dev != p->dev && p->state == BR_STATE_FORWARDING); + if (skb->dev == p->dev || + p->state != BR_STATE_FORWARDING) + return 0; + + return 1; } static inline unsigned packet_length(const struct sk_buff *skb) @@ -34,8 +37,8 @@ static inline unsigned packet_length(const struct sk_buff *skb) int br_dev_queue_push_xmit(struct sk_buff *skb) { - /* drop mtu oversized packets except gso */ - if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb)) + /* drop mtu oversized packets except tso */ + if (skb->len > skb->dev->mtu && !skb_is_gso(skb)) kfree_skb(skb); else { #ifdef CONFIG_BRIDGE_NETFILTER @@ -56,9 +59,10 @@ int br_dev_queue_push_xmit(struct sk_buff *skb) int br_forward_finish(struct sk_buff *skb) { - return NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev, - br_dev_queue_push_xmit); + NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev, + br_dev_queue_push_xmit); + return 0; } static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index b1211d534..f55ef682e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -386,17 +386,12 @@ void br_features_recompute(struct net_bridge *br) checksum = 0; if (feature & NETIF_F_GSO) - feature |= NETIF_F_GSO_SOFTWARE; + feature |= NETIF_F_TSO; feature |= NETIF_F_GSO; features &= feature; } - if (!(checksum & NETIF_F_ALL_CSUM)) - features &= ~NETIF_F_SG; - if (!(features & NETIF_F_SG)) - features &= ~NETIF_F_GSO_MASK; - br->dev->features = features | checksum | NETIF_F_LLTX | NETIF_F_GSO_ROBUST; } diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 4c61a7e0a..159fb8409 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -58,13 +58,12 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, { int num; void *buf; - size_t size; + size_t size = maxnum * sizeof(struct __fdb_entry); - /* Clamp size to PAGE_SIZE, test maxnum to avoid overflow */ - if (maxnum > PAGE_SIZE/sizeof(struct __fdb_entry)) + if (size > PAGE_SIZE) { + size = PAGE_SIZE; maxnum = PAGE_SIZE/sizeof(struct __fdb_entry); - - size = maxnum * sizeof(struct __fdb_entry); + } buf = kmalloc(size, GFP_USER); if (!buf) @@ -163,10 +162,12 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) if (num > BR_MAX_PORTS) num = BR_MAX_PORTS; - indices = kcalloc(num, sizeof(int), GFP_KERNEL); + indices = kmalloc(num*sizeof(int), GFP_KERNEL); if (indices == NULL) return -ENOMEM; + memset(indices, 0, num*sizeof(int)); + get_port_ifindices(br, indices, num); if (copy_to_user((void __user *)args[1], indices, num*sizeof(int))) num = -EFAULT; @@ -326,10 +327,11 @@ static int old_deviceless(void __user *uarg) if (args[2] >= 2048) return -ENOMEM; - indices = kcalloc(args[2], sizeof(int), GFP_KERNEL); + indices = kmalloc(args[2]*sizeof(int), GFP_KERNEL); if (indices == NULL) return -ENOMEM; + memset(indices, 0, args[2]*sizeof(int)); args[2] = get_bridge_ifindices(indices, args[2]); ret = copy_to_user((void __user *)args[1], indices, args[2]*sizeof(int)) diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 05b3de888..a64272783 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -61,9 +61,6 @@ static int brnf_filter_vlan_tagged = 1; #define brnf_filter_vlan_tagged 1 #endif -int brnf_deferred_hooks; -EXPORT_SYMBOL_GPL(brnf_deferred_hooks); - static __be16 inline vlan_proto(const struct sk_buff *skb) { return vlan_eth_hdr(skb)->h_vlan_encapsulated_proto; @@ -410,8 +407,12 @@ static unsigned int br_nf_pre_routing_ipv6(unsigned int hook, if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { if (pkt_len + sizeof(struct ipv6hdr) > skb->len) goto inhdr_error; - if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) - goto inhdr_error; + if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { + if (__pskb_trim(skb, pkt_len + sizeof(struct ipv6hdr))) + goto inhdr_error; + if (skb->ip_summed == CHECKSUM_HW) + skb->ip_summed = CHECKSUM_NONE; + } } if (hdr->nexthdr == NEXTHDR_HOP && check_hbh_len(skb)) goto inhdr_error; @@ -494,7 +495,11 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb, if (skb->len < len || len < 4 * iph->ihl) goto inhdr_error; - pskb_trim_rcsum(skb, len); + if (skb->len > len) { + __pskb_trim(skb, len); + if (skb->ip_summed == CHECKSUM_HW) + skb->ip_summed = CHECKSUM_NONE; + } nf_bridge_put(skb->nf_bridge); if (!nf_bridge_alloc(skb)) @@ -872,8 +877,9 @@ static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb, struct sk_buff *skb = *pskb; if ((out->hard_start_xmit == br_dev_xmit && - okfn != br_nf_forward_finish && - okfn != br_nf_local_out_finish && okfn != br_nf_dev_queue_xmit) + okfn != br_nf_forward_finish && + okfn != br_nf_local_out_finish && + okfn != br_nf_dev_queue_xmit) #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) || ((out->priv_flags & IFF_802_1Q_VLAN) && VLAN_DEV_INFO(out)->real_dev->hard_start_xmit == br_dev_xmit) @@ -893,8 +899,6 @@ static unsigned int ip_sabotage_out(unsigned int hook, struct sk_buff **pskb, return NF_ACCEPT; else if (ip->version == 6 && !brnf_call_ip6tables) return NF_ACCEPT; - else if (!brnf_deferred_hooks) - return NF_ACCEPT; #endif if (hook == NF_IP_POST_ROUTING) return NF_ACCEPT; diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c deleted file mode 100644 index 53086fb75..000000000 --- a/net/bridge/br_netlink.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Bridge netlink control interface - * - * Authors: - * Stephen Hemminger - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include -#include -#include "br_private.h" - -/* - * Create one netlink message for one interface - * Contains port and master info as well as carrier and bridge state. - */ -static int br_fill_ifinfo(struct sk_buff *skb, const struct net_bridge_port *port, - u32 pid, u32 seq, int event, unsigned int flags) -{ - const struct net_bridge *br = port->br; - const struct net_device *dev = port->dev; - struct ifinfomsg *r; - struct nlmsghdr *nlh; - unsigned char *b = skb->tail; - u32 mtu = dev->mtu; - u8 operstate = netif_running(dev) ? dev->operstate : IF_OPER_DOWN; - u8 portstate = port->state; - - pr_debug("br_fill_info event %d port %s master %s\n", - event, dev->name, br->dev->name); - - nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags); - r = NLMSG_DATA(nlh); - r->ifi_family = AF_BRIDGE; - r->__ifi_pad = 0; - r->ifi_type = dev->type; - r->ifi_index = dev->ifindex; - r->ifi_flags = dev_get_flags(dev); - r->ifi_change = 0; - - RTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name); - - RTA_PUT(skb, IFLA_MASTER, sizeof(int), &br->dev->ifindex); - - if (dev->addr_len) - RTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr); - - RTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu); - if (dev->ifindex != dev->iflink) - RTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink); - - - RTA_PUT(skb, IFLA_OPERSTATE, sizeof(operstate), &operstate); - - if (event == RTM_NEWLINK) - RTA_PUT(skb, IFLA_PROTINFO, sizeof(portstate), &portstate); - - nlh->nlmsg_len = skb->tail - b; - - return skb->len; - -nlmsg_failure: -rtattr_failure: - - skb_trim(skb, b - skb->data); - return -EINVAL; -} - -/* - * Notify listeners of a change in port information - */ -void br_ifinfo_notify(int event, struct net_bridge_port *port) -{ - struct sk_buff *skb; - int err = -ENOMEM; - - pr_debug("bridge notify event=%d\n", event); - skb = alloc_skb(NLMSG_SPACE(sizeof(struct ifinfomsg) + 128), - GFP_ATOMIC); - if (!skb) - goto err_out; - - err = br_fill_ifinfo(skb, port, current->pid, 0, event, 0); - if (err < 0) - goto err_kfree; - - NETLINK_CB(skb).dst_group = RTNLGRP_LINK; - netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_ATOMIC); - return; - -err_kfree: - kfree_skb(skb); -err_out: - netlink_set_err(rtnl, 0, RTNLGRP_LINK, err); -} - -/* - * Dump information about all ports, in response to GETLINK - */ -static int br_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb) -{ - struct net_device *dev; - int idx; - int s_idx = cb->args[0]; - int err = 0; - - read_lock(&dev_base_lock); - for (dev = dev_base, idx = 0; dev; dev = dev->next) { - struct net_bridge_port *p = dev->br_port; - - /* not a bridge port */ - if (!p) - continue; - - if (idx < s_idx) - goto cont; - - err = br_fill_ifinfo(skb, p, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq, RTM_NEWLINK, NLM_F_MULTI); - if (err <= 0) - break; -cont: - ++idx; - } - read_unlock(&dev_base_lock); - - cb->args[0] = idx; - - return skb->len; -} - -/* - * Change state of port (ie from forwarding to blocking etc) - * Used by spanning tree in user space. - */ -static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) -{ - struct rtattr **rta = arg; - struct ifinfomsg *ifm = NLMSG_DATA(nlh); - struct net_device *dev; - struct net_bridge_port *p; - u8 new_state; - - if (ifm->ifi_family != AF_BRIDGE) - return -EPFNOSUPPORT; - - /* Must pass valid state as PROTINFO */ - if (rta[IFLA_PROTINFO-1]) { - u8 *pstate = RTA_DATA(rta[IFLA_PROTINFO-1]); - new_state = *pstate; - } else - return -EINVAL; - - if (new_state > BR_STATE_BLOCKING) - return -EINVAL; - - /* Find bridge port */ - dev = __dev_get_by_index(ifm->ifi_index); - if (!dev) - return -ENODEV; - - p = dev->br_port; - if (!p) - return -EINVAL; - - /* if kernel STP is running, don't allow changes */ - if (p->br->stp_enabled) - return -EBUSY; - - if (!netif_running(dev)) - return -ENETDOWN; - - if (!netif_carrier_ok(dev) && new_state != BR_STATE_DISABLED) - return -ENETDOWN; - - p->state = new_state; - br_log_state(p); - return 0; -} - - -static struct rtnetlink_link bridge_rtnetlink_table[RTM_NR_MSGTYPES] = { - [RTM_GETLINK - RTM_BASE] = { .dumpit = br_dump_ifinfo, }, - [RTM_SETLINK - RTM_BASE] = { .doit = br_rtm_setlink, }, -}; - -void __init br_netlink_init(void) -{ - rtnetlink_links[PF_BRIDGE] = bridge_rtnetlink_table; -} - -void __exit br_netlink_fini(void) -{ - rtnetlink_links[PF_BRIDGE] = NULL; -} - diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c index 20278494e..a43a9c1d5 100644 --- a/net/bridge/br_notify.c +++ b/net/bridge/br_notify.c @@ -14,7 +14,6 @@ */ #include -#include #include "br_private.h" @@ -50,7 +49,6 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v case NETDEV_CHANGEADDR: br_fdb_changeaddr(p, dev->dev_addr); - br_ifinfo_notify(RTM_NEWLINK, p); br_stp_recalculate_bridge_id(br); break; diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index c491fb2f2..86ecea7ed 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -29,7 +29,7 @@ #define BR_PORT_DEBOUNCE (HZ/10) -#define BR_VERSION "2.2" +#define BR_VERSION "2.1" typedef struct bridge_id bridge_id; typedef struct mac_addr mac_addr; @@ -192,13 +192,8 @@ extern int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); extern int br_ioctl_deviceless_stub(unsigned int cmd, void __user *arg); /* br_netfilter.c */ -#ifdef CONFIG_BRIDGE_NETFILTER extern int br_netfilter_init(void); extern void br_netfilter_fini(void); -#else -#define br_netfilter_init() (0) -#define br_netfilter_fini() do { } while(0) -#endif /* br_stp.c */ extern void br_log_state(const struct net_bridge_port *p); @@ -237,11 +232,6 @@ extern struct net_bridge_fdb_entry *(*br_fdb_get_hook)(struct net_bridge *br, extern void (*br_fdb_put_hook)(struct net_bridge_fdb_entry *ent); -/* br_netlink.c */ -extern void br_netlink_init(void); -extern void br_netlink_fini(void); -extern void br_ifinfo_notify(int event, struct net_bridge_port *port); - #ifdef CONFIG_SYSFS /* br_sysfs_if.c */ extern struct sysfs_ops brport_sysfs_ops; diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index 068d8afbf..a7ba0cce0 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c @@ -121,7 +121,7 @@ void br_send_tcn_bpdu(struct net_bridge_port *p) buf[1] = 0; buf[2] = 0; buf[3] = BPDU_TYPE_TCN; - br_send_bpdu(p, buf, 4); + br_send_bpdu(p, buf, 7); } /* diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 14cd02507..23dea1422 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "br_private.h" #include "br_private_stp.h" @@ -87,7 +86,6 @@ void br_stp_disable_bridge(struct net_bridge *br) void br_stp_enable_port(struct net_bridge_port *p) { br_init_port(p); - br_ifinfo_notify(RTM_NEWLINK, p); br_port_state_selection(p->br); } @@ -101,8 +99,6 @@ void br_stp_disable_port(struct net_bridge_port *p) printk(KERN_INFO "%s: port %i(%s) entering %s state\n", br->dev->name, p->port_no, p->dev->name, "disabled"); - br_ifinfo_notify(RTM_DELLINK, p); - wasroot = br_is_root_bridge(br); br_become_designated_port(p); p->state = BR_STATE_DISABLED; diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index 9f950db3b..1b37fa7ac 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c @@ -29,6 +29,7 @@ */ #include +#include #include #include #include @@ -81,6 +82,9 @@ static void ulog_send(unsigned int nlgroup) if (ub->qlen > 1) ub->lastnlh->nlmsg_type = NLMSG_DONE; + if (!ub->skb) + return; + NETLINK_CB(ub->skb).dst_group = nlgroup + 1; netlink_broadcast(ebtulognl, ub->skb, 0, nlgroup + 1, GFP_ATOMIC); diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 1969658a4..3a13ed643 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -360,11 +360,10 @@ ebt_check_match(struct ebt_entry_match *m, struct ebt_entry *e, const char *name, unsigned int hookmask, unsigned int *cnt) { struct ebt_match *match; - size_t left = ((char *)e + e->watchers_offset) - (char *)m; int ret; - if (left < sizeof(struct ebt_entry_match) || - left - sizeof(struct ebt_entry_match) < m->match_size) + if (((char *)m) + m->match_size + sizeof(struct ebt_entry_match) > + ((char *)e) + e->watchers_offset) return -EINVAL; match = find_match_lock(m->u.name, &ret, &ebt_mutex); if (!match) @@ -390,11 +389,10 @@ ebt_check_watcher(struct ebt_entry_watcher *w, struct ebt_entry *e, const char *name, unsigned int hookmask, unsigned int *cnt) { struct ebt_watcher *watcher; - size_t left = ((char *)e + e->target_offset) - (char *)w; int ret; - if (left < sizeof(struct ebt_entry_watcher) || - left - sizeof(struct ebt_entry_watcher) < w->watcher_size) + if (((char *)w) + w->watcher_size + sizeof(struct ebt_entry_watcher) > + ((char *)e) + e->target_offset) return -EINVAL; watcher = find_watcher_lock(w->u.name, &ret, &ebt_mutex); if (!watcher) @@ -425,23 +423,19 @@ ebt_check_entry_size_and_hooks(struct ebt_entry *e, struct ebt_entries **hook_entries, unsigned int *n, unsigned int *cnt, unsigned int *totalcnt, unsigned int *udc_cnt, unsigned int valid_hooks) { - unsigned int offset = (char *)e - newinfo->entries; - size_t left = (limit - base) - offset; int i; - if (left < sizeof(unsigned int)) - goto Esmall; - for (i = 0; i < NF_BR_NUMHOOKS; i++) { if ((valid_hooks & (1 << i)) == 0) continue; - if ((char *)hook_entries[i] == base + offset) + if ( (char *)hook_entries[i] - base == + (char *)e - newinfo->entries) break; } /* beginning of a new chain if i == NF_BR_NUMHOOKS it must be a user defined chain */ if (i != NF_BR_NUMHOOKS || !(e->bitmask & EBT_ENTRY_OR_ENTRIES)) { - if (e->bitmask != 0) { + if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) != 0) { /* we make userspace set this right, so there is no misunderstanding */ BUGPRINT("EBT_ENTRY_OR_ENTRIES shouldn't be set " @@ -456,8 +450,11 @@ ebt_check_entry_size_and_hooks(struct ebt_entry *e, return -EINVAL; } /* before we look at the struct, be sure it is not too big */ - if (left < sizeof(struct ebt_entries)) - goto Esmall; + if ((char *)hook_entries[i] + sizeof(struct ebt_entries) + > limit) { + BUGPRINT("entries_size too small\n"); + return -EINVAL; + } if (((struct ebt_entries *)e)->policy != EBT_DROP && ((struct ebt_entries *)e)->policy != EBT_ACCEPT) { /* only RETURN from udc */ @@ -480,8 +477,6 @@ ebt_check_entry_size_and_hooks(struct ebt_entry *e, return 0; } /* a plain old entry, heh */ - if (left < sizeof(struct ebt_entry)) - goto Esmall; if (sizeof(struct ebt_entry) > e->watchers_offset || e->watchers_offset > e->target_offset || e->target_offset >= e->next_offset) { @@ -493,16 +488,10 @@ ebt_check_entry_size_and_hooks(struct ebt_entry *e, BUGPRINT("target size too small\n"); return -EINVAL; } - if (left < e->next_offset) - goto Esmall; (*cnt)++; (*totalcnt)++; return 0; - -Esmall: - BUGPRINT("entries_size too small\n"); - return -EINVAL; } struct ebt_cl_stack @@ -524,7 +513,7 @@ ebt_get_udc_positions(struct ebt_entry *e, struct ebt_table_info *newinfo, int i; /* we're only interested in chain starts */ - if (e->bitmask) + if (e->bitmask & EBT_ENTRY_OR_ENTRIES) return 0; for (i = 0; i < NF_BR_NUMHOOKS; i++) { if ((valid_hooks & (1 << i)) == 0) @@ -574,7 +563,7 @@ ebt_cleanup_entry(struct ebt_entry *e, unsigned int *cnt) { struct ebt_entry_target *t; - if (e->bitmask == 0) + if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0) return 0; /* we're done */ if (cnt && (*cnt)-- == 0) @@ -597,11 +586,10 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, struct ebt_entry_target *t; struct ebt_target *target; unsigned int i, j, hook = 0, hookmask = 0; - size_t gap = e->next_offset - e->target_offset; int ret; /* don't mess with the struct ebt_entries */ - if (e->bitmask == 0) + if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0) return 0; if (e->bitmask & ~EBT_F_MASK) { @@ -659,7 +647,8 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, t->u.target = target; if (t->u.target == &ebt_standard_target) { - if (gap < sizeof(struct ebt_standard_target)) { + if (e->target_offset + sizeof(struct ebt_standard_target) > + e->next_offset) { BUGPRINT("Standard target size too big\n"); ret = -EFAULT; goto cleanup_watchers; @@ -670,7 +659,8 @@ ebt_check_entry(struct ebt_entry *e, struct ebt_table_info *newinfo, ret = -EFAULT; goto cleanup_watchers; } - } else if (t->target_size > gap - sizeof(struct ebt_entry_target) || + } else if ((e->target_offset + t->target_size + + sizeof(struct ebt_entry_target) > e->next_offset) || (t->u.target->check && t->u.target->check(name, hookmask, e, t->data, t->target_size) != 0)){ module_put(t->u.target->me); @@ -740,9 +730,7 @@ static int check_chainloops(struct ebt_entries *chain, struct ebt_cl_stack *cl_s BUGPRINT("loop\n"); return -1; } - if (cl_s[i].hookmask & (1 << hooknr)) - goto letscontinue; - /* this can't be 0, so the loop test is correct */ + /* this can't be 0, so the above test is correct */ cl_s[i].cs.n = pos + 1; pos = 0; cl_s[i].cs.e = ((void *)e + e->next_offset); @@ -1319,7 +1307,7 @@ static inline int ebt_make_names(struct ebt_entry *e, char *base, char *ubase) char *hlp; struct ebt_entry_target *t; - if (e->bitmask == 0) + if ((e->bitmask & EBT_ENTRY_OR_ENTRIES) == 0) return 0; hlp = ubase - base + (char *)e + e->target_offset; diff --git a/net/core/Makefile b/net/core/Makefile index 2645ba428..79fe12cce 100644 --- a/net/core/Makefile +++ b/net/core/Makefile @@ -7,7 +7,7 @@ obj-y := sock.o request_sock.o skbuff.o iovec.o datagram.o stream.o scm.o \ obj-$(CONFIG_SYSCTL) += sysctl_net_core.o -obj-y += dev.o ethtool.o dev_mcast.o dst.o netevent.o \ +obj-y += dev.o ethtool.o dev_mcast.o dst.o \ neighbour.o rtnetlink.o utils.o link_watch.o filter.o obj-$(CONFIG_XFRM) += flow.o @@ -16,4 +16,3 @@ obj-$(CONFIG_NET_DIVERT) += dv.o obj-$(CONFIG_NET_PKTGEN) += pktgen.o obj-$(CONFIG_WIRELESS_EXT) += wireless.o obj-$(CONFIG_NETPOLL) += netpoll.o -obj-$(CONFIG_NET_DMA) += user_dma.o diff --git a/net/core/dev.c b/net/core/dev.c index ea63c08b6..50eff3771 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -114,10 +115,7 @@ #include #include #include -#include #include -#include -#include #include #ifdef CONFIG_XEN @@ -158,12 +156,6 @@ static DEFINE_SPINLOCK(ptype_lock); static struct list_head ptype_base[16]; /* 16 way hashed list */ static struct list_head ptype_all; /* Taps */ -#ifdef CONFIG_NET_DMA -static struct dma_client *net_dma_client; -static unsigned int net_dma_count; -static spinlock_t net_dma_event_lock; -#endif - /* * The @dev_base list is protected by @dev_base_lock and the rtnl * semaphore. @@ -238,7 +230,7 @@ extern void netdev_unregister_sysfs(struct net_device *); * For efficiency */ -static int netdev_nit; +int netdev_nit; /* * Add a protocol ID to the list. Now that the input handler is @@ -641,22 +633,14 @@ struct net_device * dev_get_by_flags(unsigned short if_flags, unsigned short mas * @name: name string * * Network device names need to be valid file names to - * to allow sysfs to work. We also disallow any kind of - * whitespace. + * to allow sysfs to work */ int dev_valid_name(const char *name) { - if (*name == '\0') - return 0; - if (!strcmp(name, ".") || !strcmp(name, "..")) - return 0; - - while (*name) { - if (*name == '/' || isspace(*name)) - return 0; - name++; - } - return 1; + return !(*name == '\0' + || !strcmp(name, ".") + || !strcmp(name, "..") + || strchr(name, '/')); } /** @@ -1182,12 +1166,9 @@ int skb_checksum_help(struct sk_buff *skb, int inward) unsigned int csum; int ret = 0, offset = skb->h.raw - skb->data; - if (inward) - goto out_set_summed; - - if (unlikely(skb_shinfo(skb)->gso_size)) { - /* Let GSO fix up the checksum. */ - goto out_set_summed; + if (inward) { + skb->ip_summed = CHECKSUM_NONE; + goto out; } if (skb_cloned(skb)) { @@ -1204,8 +1185,6 @@ int skb_checksum_help(struct sk_buff *skb, int inward) BUG_ON(skb->csum + 2 > offset); *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum); - -out_set_summed: skb->ip_summed = CHECKSUM_NONE; out: return ret; @@ -1226,30 +1205,17 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features) struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); struct packet_type *ptype; int type = skb->protocol; - int err; BUG_ON(skb_shinfo(skb)->frag_list); + BUG_ON(skb->ip_summed != CHECKSUM_HW); skb->mac.raw = skb->data; skb->mac_len = skb->nh.raw - skb->data; __skb_pull(skb, skb->mac_len); - if (unlikely(skb->ip_summed != CHECKSUM_HW)) { - if (skb_header_cloned(skb) && - (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) - return ERR_PTR(err); - } - rcu_read_lock(); list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) { if (ptype->type == type && !ptype->dev && ptype->gso_segment) { - if (unlikely(skb->ip_summed != CHECKSUM_HW)) { - err = ptype->gso_send_check(skb); - segs = ERR_PTR(err); - if (err || skb_gso_ok(skb, features)) - break; - __skb_push(skb, skb->data - skb->nh.raw); - } segs = ptype->gso_segment(skb, features); break; } @@ -1276,6 +1242,7 @@ void netdev_rx_csum_fault(struct net_device *dev) EXPORT_SYMBOL(netdev_rx_csum_fault); #endif +#ifdef CONFIG_HIGHMEM /* Actually, we should eliminate this check as soon as we know, that: * 1. IOMMU is present and allows to map all the memory. * 2. No high memory really exists on this machine. @@ -1283,7 +1250,6 @@ EXPORT_SYMBOL(netdev_rx_csum_fault); static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb) { -#ifdef CONFIG_HIGHMEM int i; if (dev->features & NETIF_F_HIGHDMA) @@ -1293,9 +1259,11 @@ static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb) if (PageHighMem(skb_shinfo(skb)->frags[i].page)) return 1; -#endif return 0; } +#else +#define illegal_highdma(dev, skb) (0) +#endif struct dev_gso_cb { void (*destructor)(struct sk_buff *skb); @@ -1532,16 +1500,14 @@ gso: if (q->enqueue) { /* Grab device queue */ spin_lock(&dev->queue_lock); - q = dev->qdisc; - if (q->enqueue) { - rc = q->enqueue(skb, q); - qdisc_run(dev); - spin_unlock(&dev->queue_lock); - rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc; - goto out; - } + rc = q->enqueue(skb, q); + + qdisc_run(dev); + spin_unlock(&dev->queue_lock); + rc = rc == NET_XMIT_BYPASS ? NET_XMIT_SUCCESS : rc; + goto out; } /* The device has no queue. Common case for software devices: @@ -1684,10 +1650,26 @@ static inline struct net_device *skb_bond(struct sk_buff *skb) struct net_device *dev = skb->dev; if (dev->master) { - if (skb_bond_should_drop(skb)) { + /* + * On bonding slaves other than the currently active + * slave, suppress duplicates except for 802.3ad + * ETH_P_SLOW and alb non-mcast/bcast. + */ + if (dev->priv_flags & IFF_SLAVE_INACTIVE) { + if (dev->master->priv_flags & IFF_MASTER_ALB) { + if (skb->pkt_type != PACKET_BROADCAST && + skb->pkt_type != PACKET_MULTICAST) + goto keep; + } + + if (dev->master->priv_flags & IFF_MASTER_8023AD && + skb->protocol == __constant_htons(ETH_P_SLOW)) + goto keep; + kfree_skb(skb); return NULL; } +keep: skb->dev = dev->master; } @@ -1794,7 +1776,7 @@ static int ing_filter(struct sk_buff *skb) if (dev->qdisc_ingress) { __u32 ttl = (__u32) G_TC_RTTL(skb->tc_verd); if (MAX_RED_LOOP < ttl++) { - printk(KERN_WARNING "Redir loop detected Dropping packet (%s->%s)\n", + printk("Redir loop detected Dropping packet (%s->%s)\n", skb->input_dev->name, skb->dev->name); return TC_ACT_SHOT; } @@ -2005,19 +1987,6 @@ static void net_rx_action(struct softirq_action *h) } } out: -#ifdef CONFIG_NET_DMA - /* - * There may not be any more sk_buffs coming right now, so push - * any pending DMA copies to hardware - */ - if (net_dma_client) { - struct dma_chan *chan; - rcu_read_lock(); - list_for_each_entry_rcu(chan, &net_dma_client->channels, client_node) - dma_async_memcpy_issue_pending(chan); - rcu_read_unlock(); - } -#endif local_irq_enable(); return; @@ -3009,7 +2978,7 @@ int register_netdevice(struct net_device *dev) /* Fix illegal SG+CSUM combinations. */ if ((dev->features & NETIF_F_SG) && !(dev->features & NETIF_F_ALL_CSUM)) { - printk(KERN_NOTICE "%s: Dropping NETIF_F_SG since no checksum feature.\n", + printk("%s: Dropping NETIF_F_SG since no checksum feature.\n", dev->name); dev->features &= ~NETIF_F_SG; } @@ -3017,7 +2986,7 @@ int register_netdevice(struct net_device *dev) /* TSO requires that SG is present as well. */ if ((dev->features & NETIF_F_TSO) && !(dev->features & NETIF_F_SG)) { - printk(KERN_NOTICE "%s: Dropping NETIF_F_TSO since no SG feature.\n", + printk("%s: Dropping NETIF_F_TSO since no SG feature.\n", dev->name); dev->features &= ~NETIF_F_TSO; } @@ -3199,7 +3168,7 @@ static void netdev_wait_allrefs(struct net_device *dev) static DEFINE_MUTEX(net_todo_run_mutex); void netdev_run_todo(void) { - struct list_head list; + struct list_head list = LIST_HEAD_INIT(list); /* Need to guard against multiple cpu's getting out of order. */ mutex_lock(&net_todo_run_mutex); @@ -3214,9 +3183,9 @@ void netdev_run_todo(void) /* Snapshot list, allow later requests */ spin_lock(&net_todo_list_lock); - list_replace_init(&net_todo_list, &list); + list_splice_init(&net_todo_list, &list); spin_unlock(&net_todo_list_lock); - + while (!list_empty(&list)) { struct net_device *dev = list_entry(list.next, struct net_device, todo_list); @@ -3477,83 +3446,6 @@ static int dev_cpu_callback(struct notifier_block *nfb, } #endif /* CONFIG_HOTPLUG_CPU */ -#ifdef CONFIG_NET_DMA -/** - * net_dma_rebalance - - * This is called when the number of channels allocated to the net_dma_client - * changes. The net_dma_client tries to have one DMA channel per CPU. - */ -static void net_dma_rebalance(void) -{ - unsigned int cpu, i, n; - struct dma_chan *chan; - - if (net_dma_count == 0) { - for_each_online_cpu(cpu) - rcu_assign_pointer(per_cpu(softnet_data, cpu).net_dma, NULL); - return; - } - - i = 0; - cpu = first_cpu(cpu_online_map); - - rcu_read_lock(); - list_for_each_entry(chan, &net_dma_client->channels, client_node) { - n = ((num_online_cpus() / net_dma_count) - + (i < (num_online_cpus() % net_dma_count) ? 1 : 0)); - - while(n) { - per_cpu(softnet_data, cpu).net_dma = chan; - cpu = next_cpu(cpu, cpu_online_map); - n--; - } - i++; - } - rcu_read_unlock(); -} - -/** - * netdev_dma_event - event callback for the net_dma_client - * @client: should always be net_dma_client - * @chan: DMA channel for the event - * @event: event type - */ -static void netdev_dma_event(struct dma_client *client, struct dma_chan *chan, - enum dma_event event) -{ - spin_lock(&net_dma_event_lock); - switch (event) { - case DMA_RESOURCE_ADDED: - net_dma_count++; - net_dma_rebalance(); - break; - case DMA_RESOURCE_REMOVED: - net_dma_count--; - net_dma_rebalance(); - break; - default: - break; - } - spin_unlock(&net_dma_event_lock); -} - -/** - * netdev_dma_regiser - register the networking subsystem as a DMA client - */ -static int __init netdev_dma_register(void) -{ - spin_lock_init(&net_dma_event_lock); - net_dma_client = dma_async_client_register(netdev_dma_event); - if (net_dma_client == NULL) - return -ENOMEM; - - dma_async_client_chan_request(net_dma_client, num_online_cpus()); - return 0; -} - -#else -static int __init netdev_dma_register(void) { return -ENODEV; } -#endif /* CONFIG_NET_DMA */ /* * Initialize the DEV module. At boot time this walks the device list and @@ -3607,8 +3499,6 @@ static int __init net_dev_init(void) atomic_set(&queue->backlog_dev.refcnt, 1); } - netdev_dma_register(); - dev_boot_phase = 0; open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL); diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index eb674ea7d..c57d887da 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -21,6 +21,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 2797e2815..987cccaa0 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -559,7 +559,7 @@ static int ethtool_set_sg(struct net_device *dev, char __user *useraddr) static int ethtool_get_tso(struct net_device *dev, char __user *useraddr) { - struct ethtool_value edata = { ETHTOOL_GTSO }; + struct ethtool_value edata = { ETHTOOL_GUFO }; if (!dev->ethtool_ops->get_tso) return -EOPNOTSUPP; diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 4b3611474..646937cc2 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -11,6 +11,7 @@ * */ +#include #include #include #include @@ -90,10 +91,11 @@ static void rfc2863_policy(struct net_device *dev) /* Must be called with the rtnl semaphore held */ void linkwatch_run_queue(void) { - struct list_head head, *n, *next; + LIST_HEAD(head); + struct list_head *n, *next; spin_lock_irq(&lweventlist_lock); - list_replace_init(&lweventlist, &head); + list_splice_init(&lweventlist, &head); spin_unlock_irq(&lweventlist_lock); list_for_each_safe(n, next, &head) { diff --git a/net/core/neighbour.c b/net/core/neighbour.c index fe2113f54..50a8c73ca 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -15,6 +15,7 @@ * Harald Welte Add neighbour cache statistics like rtstat */ +#include #include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -755,7 +755,6 @@ static void neigh_timer_handler(unsigned long arg) neigh->nud_state = NUD_STALE; neigh->updated = jiffies; neigh_suspect(neigh); - notify = 1; } } else if (state & NUD_DELAY) { if (time_before_eq(now, @@ -764,7 +763,6 @@ static void neigh_timer_handler(unsigned long arg) neigh->nud_state = NUD_REACHABLE; neigh->updated = jiffies; neigh_connect(neigh); - notify = 1; next = neigh->confirmed + neigh->parms->reachable_time; } else { NEIGH_PRINTK2("neigh %p is probed.\n", neigh); @@ -822,8 +820,6 @@ static void neigh_timer_handler(unsigned long arg) out: write_unlock(&neigh->lock); } - if (notify) - call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); #ifdef CONFIG_ARPD if (notify && neigh->parms->app_probes) @@ -931,7 +927,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, { u8 old; int err; +#ifdef CONFIG_ARPD int notify = 0; +#endif struct net_device *dev; int update_isrouter = 0; @@ -951,7 +949,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, neigh_suspect(neigh); neigh->nud_state = new; err = 0; +#ifdef CONFIG_ARPD notify = old & NUD_VALID; +#endif goto out; } @@ -1023,7 +1023,9 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, if (!(new & NUD_CONNECTED)) neigh->confirmed = jiffies - (neigh->parms->base_reachable_time << 1); +#ifdef CONFIG_ARPD notify = 1; +#endif } if (new == old) goto out; @@ -1055,9 +1057,6 @@ out: (neigh->flags & ~NTF_ROUTER); } write_unlock_bh(&neigh->lock); - - if (notify) - call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); #ifdef CONFIG_ARPD if (notify && neigh->parms->app_probes) neigh_app_notify(neigh); @@ -1432,9 +1431,6 @@ int neigh_table_clear(struct neigh_table *tbl) kfree(tbl->phash_buckets); tbl->phash_buckets = NULL; - free_percpu(tbl->stats); - tbl->stats = NULL; - return 0; } diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 13472762b..47a6fceb6 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/net/core/netevent.c b/net/core/netevent.c deleted file mode 100644 index 35d02c385..000000000 --- a/net/core/netevent.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Network event notifiers - * - * Authors: - * Tom Tucker - * Steve Wise - * - * 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. - * - * Fixes: - */ - -#include -#include - -static ATOMIC_NOTIFIER_HEAD(netevent_notif_chain); - -/** - * register_netevent_notifier - register a netevent notifier block - * @nb: notifier - * - * Register a notifier to be called when a netevent occurs. - * The notifier passed is linked into the kernel structures and must - * not be reused until it has been unregistered. A negative errno code - * is returned on a failure. - */ -int register_netevent_notifier(struct notifier_block *nb) -{ - int err; - - err = atomic_notifier_chain_register(&netevent_notif_chain, nb); - return err; -} - -/** - * netevent_unregister_notifier - unregister a netevent notifier block - * @nb: notifier - * - * Unregister a notifier previously registered by - * register_neigh_notifier(). The notifier is unlinked into the - * kernel structures and may then be reused. A negative errno code - * is returned on a failure. - */ - -int unregister_netevent_notifier(struct notifier_block *nb) -{ - return atomic_notifier_chain_unregister(&netevent_notif_chain, nb); -} - -/** - * call_netevent_notifiers - call all netevent notifier blocks - * @val: value passed unmodified to notifier function - * @v: pointer passed unmodified to notifier function - * - * Call all neighbour notifier blocks. Parameters and return value - * are as for notifier_call_chain(). - */ - -int call_netevent_notifiers(unsigned long val, void *v) -{ - return atomic_notifier_call_chain(&netevent_notif_chain, val, v); -} - -EXPORT_SYMBOL_GPL(register_netevent_notifier); -EXPORT_SYMBOL_GPL(unregister_netevent_notifier); -EXPORT_SYMBOL_GPL(call_netevent_notifiers); diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 1799a7473..9cb781830 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -54,7 +54,6 @@ static atomic_t trapped; sizeof(struct iphdr) + sizeof(struct ethhdr)) static void zap_completion_queue(void); -static void arp_reply(struct sk_buff *skb); static void queue_process(void *p) { @@ -154,22 +153,6 @@ static void poll_napi(struct netpoll *np) } } -static void service_arp_queue(struct netpoll_info *npi) -{ - struct sk_buff *skb; - - if (unlikely(!npi)) - return; - - skb = skb_dequeue(&npi->arp_tx); - - while (skb != NULL) { - arp_reply(skb); - skb = skb_dequeue(&npi->arp_tx); - } - return; -} - void netpoll_poll(struct netpoll *np) { if(!np->dev || !netif_running(np->dev) || !np->dev->poll_controller) @@ -180,8 +163,6 @@ void netpoll_poll(struct netpoll *np) if (np->dev->poll) poll_napi(np); - service_arp_queue(np->dev->npinfo); - zap_completion_queue(); } @@ -273,8 +254,10 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) int status; struct netpoll_info *npinfo; - if (!np || !np->dev || !netif_running(np->dev)) - goto free_skb; + if (!np || !np->dev || !netif_running(np->dev)) { + __kfree_skb(skb); + return; + } npinfo = np->dev->npinfo; @@ -296,10 +279,14 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) * network drivers do not expect to be called if the queue is * stopped. */ - status = NETDEV_TX_BUSY; - if (!netif_queue_stopped(np->dev)) - status = np->dev->hard_start_xmit(skb, np->dev); + if (netif_queue_stopped(np->dev)) { + netif_tx_unlock(np->dev); + netpoll_poll(np); + udelay(50); + continue; + } + status = np->dev->hard_start_xmit(skb, np->dev); netif_tx_unlock(np->dev); /* success */ @@ -312,8 +299,6 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) netpoll_poll(np); udelay(50); } while (npinfo->tries > 0); -free_skb: - __kfree_skb(skb); } void netpoll_send_udp(struct netpoll *np, const char *msg, int len) @@ -335,13 +320,13 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len) memcpy(skb->data, msg, len); skb->len += len; - skb->h.uh = udph = (struct udphdr *) skb_push(skb, sizeof(*udph)); + udph = (struct udphdr *) skb_push(skb, sizeof(*udph)); udph->source = htons(np->local_port); udph->dest = htons(np->remote_port); udph->len = htons(udp_len); udph->check = 0; - skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); + iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); /* iph->version = 4; iph->ihl = 5; */ put_unaligned(0x45, (unsigned char *)iph); @@ -357,8 +342,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len) iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); - skb->mac.raw = skb->data; - skb->protocol = eth->h_proto = htons(ETH_P_IP); + + eth->h_proto = htons(ETH_P_IP); memcpy(eth->h_source, np->local_mac, 6); memcpy(eth->h_dest, np->remote_mac, 6); @@ -461,9 +446,7 @@ int __netpoll_rx(struct sk_buff *skb) int proto, len, ulen; struct iphdr *iph; struct udphdr *uh; - struct netpoll_info *npi = skb->dev->npinfo; - struct netpoll *np = npi->rx_np; - + struct netpoll *np = skb->dev->npinfo->rx_np; if (!np) goto out; @@ -473,7 +456,7 @@ int __netpoll_rx(struct sk_buff *skb) /* check if netpoll clients need ARP */ if (skb->protocol == __constant_htons(ETH_P_ARP) && atomic_read(&trapped)) { - skb_queue_tail(&npi->arp_tx, skb); + arp_reply(skb); return 1; } @@ -668,7 +651,6 @@ int netpoll_setup(struct netpoll *np) npinfo->poll_owner = -1; npinfo->tries = MAX_RETRIES; spin_lock_init(&npinfo->rx_lock); - skb_queue_head_init(&npinfo->arp_tx); } else npinfo = ndev->npinfo; diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 6a7320b39..4e7437a56 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2900,7 +2900,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev) pkt_dev->clone_count = 0; /* reset counter */ } } - + netif_tx_lock_bh(odev); if (!netif_queue_stopped(odev)) { @@ -2947,7 +2947,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev) } netif_tx_unlock_bh(odev); - + /* If pkt_dev->count is zero, then run forever */ if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) { if (atomic_read(&(pkt_dev->skb->users)) != 1) { diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 84ca035d8..375dd9061 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -16,6 +16,7 @@ * Vitaly E. Lavrov RTA_OK arithmetics was wrong. */ +#include #include #include #include @@ -681,7 +682,7 @@ rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) sz_idx = type>>2; kind = type&3; - if (kind != 2 && security_netlink_recv(skb, CAP_NET_ADMIN)) { + if (kind != 2 && security_netlink_recv(skb)) { *errp = -EPERM; return -1; } diff --git a/net/core/skbuff.c b/net/core/skbuff.c index e1ebdd8be..e7dec1aff 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -38,6 +38,7 @@ * The functions in this file will not compile correctly with gcc 2.4.x */ +#include #include #include #include @@ -216,6 +217,7 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, int fclone) { kmem_cache_t *cache; + struct skb_shared_info *shinfo; struct sk_buff *skb; u8 *data; @@ -239,13 +241,15 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, skb->data = data; skb->tail = data; skb->end = data + size; - - atomic_set(&(skb_shinfo(skb)->dataref), 1); - skb_shinfo(skb)->nr_frags = 0; - skb_shinfo(skb)->gso_size = 0; - skb_shinfo(skb)->gso_segs = 0; - skb_shinfo(skb)->gso_type = 0; - skb_shinfo(skb)->frag_list = NULL; + /* make sure we initialize shinfo sequentially */ + shinfo = skb_shinfo(skb); + atomic_set(&shinfo->dataref, 1); + shinfo->nr_frags = 0; + shinfo->gso_size = 0; + shinfo->gso_segs = 0; + shinfo->gso_type = 0; + shinfo->ip6_frag_id = 0; + shinfo->frag_list = NULL; if (fclone) { struct sk_buff *child = skb + 1; @@ -264,31 +268,6 @@ nodata: goto out; } -/** - * __netdev_alloc_skb - allocate an skbuff for rx on a specific device - * @dev: network device to receive on - * @length: length to allocate - * @gfp_mask: get_free_pages mask, passed to alloc_skb - * - * Allocate a new &sk_buff and assign it a usage count of one. The - * buffer has unspecified headroom built in. Users should allocate - * the headroom they think they need without accounting for the - * built in space. The built in space is used for optimisations. - * - * %NULL is returned if there is no free memory. - */ -struct sk_buff *__netdev_alloc_skb(struct net_device *dev, - unsigned int length, gfp_t gfp_mask) -{ - struct sk_buff *skb; - - skb = alloc_skb(length + NET_SKB_PAD, gfp_mask); - if (likely(skb)) { - skb_reserve(skb, NET_SKB_PAD); - skb->dev = dev; - } - return skb; -} static void skb_drop_list(struct sk_buff **listp) { @@ -316,7 +295,7 @@ static void skb_clone_fraglist(struct sk_buff *skb) skb_get(list); } -static void skb_release_data(struct sk_buff *skb) +void skb_release_data(struct sk_buff *skb) { if (!skb->cloned || !atomic_sub_return(skb->nohdr ? (1 << SKB_DATAREF_SHIFT) + 1 : 1, @@ -513,7 +492,10 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) n->tc_verd = CLR_TC_MUNGED(n->tc_verd); C(input_dev); #endif - skb_copy_secmark(n, skb); + +#endif +#if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE) + C(xid); #endif #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE) C(xid); @@ -581,7 +563,6 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) #if defined(CONFIG_VNET) || defined(CONFIG_VNET_MODULE) new->xid = old->xid; #endif - skb_copy_secmark(new, old); atomic_set(&new->users, 1); skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size; skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs; @@ -663,7 +644,6 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask) n->csum = skb->csum; n->ip_summed = skb->ip_summed; - n->truesize += skb->data_len; n->data_len = skb->data_len; n->len = skb->len; @@ -838,40 +818,24 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb, * filled. Used by network drivers which may DMA or transfer data * beyond the buffer end onto the wire. * - * May return error in out of memory cases. The skb is freed on error. + * May return NULL in out of memory cases. */ -int skb_pad(struct sk_buff *skb, int pad) +struct sk_buff *skb_pad(struct sk_buff *skb, int pad) { - int err; - int ntail; + struct sk_buff *nskb; /* If the skbuff is non linear tailroom is always zero.. */ - if (!skb_cloned(skb) && skb_tailroom(skb) >= pad) { + if (skb_tailroom(skb) >= pad) { memset(skb->data+skb->len, 0, pad); - return 0; + return skb; } - - ntail = skb->data_len + pad - (skb->end - skb->tail); - if (likely(skb_cloned(skb) || ntail > 0)) { - err = pskb_expand_head(skb, 0, ntail, GFP_ATOMIC); - if (unlikely(err)) - goto free_skb; - } - - /* FIXME: The use of this function with non-linear skb's really needs - * to be audited. - */ - err = skb_linearize(skb); - if (unlikely(err)) - goto free_skb; - - memset(skb->data + skb->len, 0, pad); - return 0; - -free_skb: + + nskb = skb_copy_expand(skb, skb_headroom(skb), skb_tailroom(skb) + pad, GFP_ATOMIC); kfree_skb(skb); - return err; + if (nskb) + memset(nskb->data+nskb->len, 0, pad); + return nskb; } /* Trims skb to length len. It can change skb pointers. @@ -1834,15 +1798,12 @@ unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, unsigned int to, struct ts_config *config, struct ts_state *state) { - unsigned int ret; - config->get_next_block = skb_ts_get_next_block; config->finish = skb_ts_finish; skb_prepare_seq_read(skb, from, to, TS_SKB_CB(state)); - ret = textsearch_find(config, state); - return (ret <= to - from ? ret : UINT_MAX); + return textsearch_find(config, state); } /** @@ -1971,7 +1932,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) do { struct sk_buff *nskb; skb_frag_t *frag; - int hsize; + int hsize, nsize; int k; int size; @@ -1982,10 +1943,11 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) hsize = skb_headlen(skb) - offset; if (hsize < 0) hsize = 0; - if (hsize > len || !sg) - hsize = len; + nsize = hsize + doffset; + if (nsize > len + doffset || !sg) + nsize = len + doffset; - nskb = alloc_skb(hsize + doffset + headroom, GFP_ATOMIC); + nskb = alloc_skb(nsize + headroom, GFP_ATOMIC); if (unlikely(!nskb)) goto err; @@ -2091,7 +2053,6 @@ EXPORT_SYMBOL(__kfree_skb); EXPORT_SYMBOL(kfree_skb); EXPORT_SYMBOL(__pskb_pull_tail); EXPORT_SYMBOL(__alloc_skb); -EXPORT_SYMBOL(__netdev_alloc_skb); EXPORT_SYMBOL(pskb_copy); EXPORT_SYMBOL(pskb_expand_head); EXPORT_SYMBOL(skb_checksum); diff --git a/net/core/sock.c b/net/core/sock.c index 527af207f..5ccf75ee3 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -92,6 +92,7 @@ */ #include +#include #include #include #include @@ -132,53 +133,6 @@ #include #endif -/* - * Each address family might have different locking rules, so we have - * one slock key per address family: - */ -static struct lock_class_key af_family_keys[AF_MAX]; -static struct lock_class_key af_family_slock_keys[AF_MAX]; - -#ifdef CONFIG_DEBUG_LOCK_ALLOC -/* - * Make lock validator output more readable. (we pre-construct these - * strings build-time, so that runtime initialization of socket - * locks is fast): - */ -static const char *af_family_key_strings[AF_MAX+1] = { - "sk_lock-AF_UNSPEC", "sk_lock-AF_UNIX" , "sk_lock-AF_INET" , - "sk_lock-AF_AX25" , "sk_lock-AF_IPX" , "sk_lock-AF_APPLETALK", - "sk_lock-AF_NETROM", "sk_lock-AF_BRIDGE" , "sk_lock-AF_ATMPVC" , - "sk_lock-AF_X25" , "sk_lock-AF_INET6" , "sk_lock-AF_ROSE" , - "sk_lock-AF_DECnet", "sk_lock-AF_NETBEUI" , "sk_lock-AF_SECURITY" , - "sk_lock-AF_KEY" , "sk_lock-AF_NETLINK" , "sk_lock-AF_PACKET" , - "sk_lock-AF_ASH" , "sk_lock-AF_ECONET" , "sk_lock-AF_ATMSVC" , - "sk_lock-21" , "sk_lock-AF_SNA" , "sk_lock-AF_IRDA" , - "sk_lock-AF_PPPOX" , "sk_lock-AF_WANPIPE" , "sk_lock-AF_LLC" , - "sk_lock-27" , "sk_lock-28" , "sk_lock-29" , - "sk_lock-AF_TIPC" , "sk_lock-AF_BLUETOOTH", "sk_lock-AF_MAX" -}; -static const char *af_family_slock_key_strings[AF_MAX+1] = { - "slock-AF_UNSPEC", "slock-AF_UNIX" , "slock-AF_INET" , - "slock-AF_AX25" , "slock-AF_IPX" , "slock-AF_APPLETALK", - "slock-AF_NETROM", "slock-AF_BRIDGE" , "slock-AF_ATMPVC" , - "slock-AF_X25" , "slock-AF_INET6" , "slock-AF_ROSE" , - "slock-AF_DECnet", "slock-AF_NETBEUI" , "slock-AF_SECURITY" , - "slock-AF_KEY" , "slock-AF_NETLINK" , "slock-AF_PACKET" , - "slock-AF_ASH" , "slock-AF_ECONET" , "slock-AF_ATMSVC" , - "slock-21" , "slock-AF_SNA" , "slock-AF_IRDA" , - "slock-AF_PPPOX" , "slock-AF_WANPIPE" , "slock-AF_LLC" , - "slock-27" , "slock-28" , "slock-29" , - "slock-AF_TIPC" , "slock-AF_BLUETOOTH", "slock-AF_MAX" -}; -#endif - -/* - * sk_callback_lock locking rules are per-address-family, - * so split the lock classes by using a per-AF key: - */ -static struct lock_class_key af_callback_keys[AF_MAX]; - /* Take into consideration the size of the struct sk_buff overhead in the * determination of these values, since that is non-constant across * platforms. This makes socket queueing behavior and performance @@ -299,16 +253,9 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb) skb->dev = NULL; bh_lock_sock(sk); - if (!sock_owned_by_user(sk)) { - /* - * trylock + unlock semantics: - */ - mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_); - + if (!sock_owned_by_user(sk)) rc = sk->sk_backlog_rcv(sk, skb); - - mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_); - } else + else sk_add_backlog(sk, skb); bh_unlock_sock(sk); out: @@ -647,13 +594,6 @@ set_rcvbuf: ret = -ENONET; break; - case SO_PASSSEC: - if (valbool) - set_bit(SOCK_PASSSEC, &sock->flags); - else - clear_bit(SOCK_PASSSEC, &sock->flags); - break; - /* We implement the SO_SNDLOWAT etc to not be settable (1003.1g 5.3) */ default: @@ -812,10 +752,6 @@ int sock_getsockopt(struct socket *sock, int level, int optname, v.val = sk->sk_state == TCP_LISTEN; break; - case SO_PASSSEC: - v.val = test_bit(SOCK_PASSSEC, &sock->flags) ? 1 : 0; - break; - case SO_PEERSEC: return security_socket_getpeersec_stream(sock, optval, optlen, len); @@ -832,20 +768,6 @@ lenout: return 0; } -/* - * Initialize an sk_lock. - * - * (We also register the sk_lock with the lock validator.) - */ -static void inline sock_lock_init(struct sock *sk) -{ - sock_lock_init_class_and_name(sk, - af_family_slock_key_strings[sk->sk_family], - af_family_slock_keys + sk->sk_family, - af_family_key_strings[sk->sk_family], - af_family_keys + sk->sk_family); -} - /** * sk_alloc - All socket objects are allocated here * @family: protocol family @@ -948,14 +870,9 @@ struct sock *sk_clone(struct sock *sk, const gfp_t priority) atomic_set(&newsk->sk_omem_alloc, 0); skb_queue_head_init(&newsk->sk_receive_queue); skb_queue_head_init(&newsk->sk_write_queue); -#ifdef CONFIG_NET_DMA - skb_queue_head_init(&newsk->sk_async_wait_queue); -#endif rwlock_init(&newsk->sk_dst_lock); rwlock_init(&newsk->sk_callback_lock); - lockdep_set_class(&newsk->sk_callback_lock, - af_callback_keys + newsk->sk_family); newsk->sk_dst_cache = NULL; newsk->sk_wmem_queued = 0; @@ -1198,7 +1115,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk, goto failure; if (atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { - skb = alloc_skb(header_len, gfp_mask); + skb = alloc_skb(header_len, sk->sk_allocation); if (skb) { int npages; int i; @@ -1513,9 +1430,6 @@ void sock_init_data(struct socket *sock, struct sock *sk) skb_queue_head_init(&sk->sk_receive_queue); skb_queue_head_init(&sk->sk_write_queue); skb_queue_head_init(&sk->sk_error_queue); -#ifdef CONFIG_NET_DMA - skb_queue_head_init(&sk->sk_async_wait_queue); -#endif sk->sk_send_head = NULL; @@ -1539,8 +1453,6 @@ void sock_init_data(struct socket *sock, struct sock *sk) rwlock_init(&sk->sk_dst_lock); rwlock_init(&sk->sk_callback_lock); - lockdep_set_class(&sk->sk_callback_lock, - af_callback_keys + sk->sk_family); sk->sk_state_change = sock_def_wakeup; sk->sk_data_ready = sock_def_readable; @@ -1573,34 +1485,24 @@ void sock_init_data(struct socket *sock, struct sock *sk) void fastcall lock_sock(struct sock *sk) { might_sleep(); - spin_lock_bh(&sk->sk_lock.slock); + spin_lock_bh(&(sk->sk_lock.slock)); if (sk->sk_lock.owner) __lock_sock(sk); sk->sk_lock.owner = (void *)1; - spin_unlock(&sk->sk_lock.slock); - /* - * The sk_lock has mutex_lock() semantics here: - */ - mutex_acquire(&sk->sk_lock.dep_map, 0, 0, _RET_IP_); - local_bh_enable(); + spin_unlock_bh(&(sk->sk_lock.slock)); } EXPORT_SYMBOL(lock_sock); void fastcall release_sock(struct sock *sk) { - /* - * The sk_lock has mutex_unlock() semantics: - */ - mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_); - - spin_lock_bh(&sk->sk_lock.slock); + 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); + if (waitqueue_active(&(sk->sk_lock.wq))) + wake_up(&(sk->sk_lock.wq)); + spin_unlock_bh(&(sk->sk_lock.slock)); } EXPORT_SYMBOL(release_sock); diff --git a/net/core/stream.c b/net/core/stream.c index d1d7decf7..e9489696f 100644 --- a/net/core/stream.c +++ b/net/core/stream.c @@ -196,13 +196,15 @@ EXPORT_SYMBOL(sk_stream_error); void __sk_stream_mem_reclaim(struct sock *sk) { - atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM, - sk->sk_prot->memory_allocated); - sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1; - if (*sk->sk_prot->memory_pressure && - (atomic_read(sk->sk_prot->memory_allocated) < - sk->sk_prot->sysctl_mem[0])) - *sk->sk_prot->memory_pressure = 0; + if (sk->sk_forward_alloc >= SK_STREAM_MEM_QUANTUM) { + atomic_sub(sk->sk_forward_alloc / SK_STREAM_MEM_QUANTUM, + sk->sk_prot->memory_allocated); + sk->sk_forward_alloc &= SK_STREAM_MEM_QUANTUM - 1; + if (*sk->sk_prot->memory_pressure && + (atomic_read(sk->sk_prot->memory_allocated) < + sk->sk_prot->sysctl_mem[0])) + *sk->sk_prot->memory_pressure = 0; + } } EXPORT_SYMBOL(__sk_stream_mem_reclaim); diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 02534131d..710453656 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/net/core/user_dma.c b/net/core/user_dma.c deleted file mode 100644 index 248a6b666..000000000 --- a/net/core/user_dma.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright(c) 2004 - 2006 Intel Corporation. All rights reserved. - * Portions based on net/core/datagram.c and copyrighted by their authors. - * - * 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. - * - * The full GNU General Public License is included in this distribution in the - * file called COPYING. - */ - -/* - * This code allows the net stack to make use of a DMA engine for - * skb to iovec copies. - */ - -#include -#include -#include /* for BUG_TRAP */ -#include -#include - -#define NET_DMA_DEFAULT_COPYBREAK 4096 - -int sysctl_tcp_dma_copybreak = NET_DMA_DEFAULT_COPYBREAK; - -/** - * dma_skb_copy_datagram_iovec - Copy a datagram to an iovec. - * @skb - buffer to copy - * @offset - offset in the buffer to start copying from - * @iovec - io vector to copy to - * @len - amount of data to copy from buffer to iovec - * @pinned_list - locked iovec buffer data - * - * Note: the iovec is modified during the copy. - */ -int dma_skb_copy_datagram_iovec(struct dma_chan *chan, - struct sk_buff *skb, int offset, struct iovec *to, - size_t len, struct dma_pinned_list *pinned_list) -{ - int start = skb_headlen(skb); - int i, copy = start - offset; - dma_cookie_t cookie = 0; - - /* Copy header. */ - if (copy > 0) { - if (copy > len) - copy = len; - cookie = dma_memcpy_to_iovec(chan, to, pinned_list, - skb->data + offset, copy); - if (cookie < 0) - goto fault; - len -= copy; - if (len == 0) - goto end; - offset += copy; - } - - /* Copy paged appendix. Hmm... why does this look so complicated? */ - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { - int end; - - BUG_TRAP(start <= offset + len); - - end = start + skb_shinfo(skb)->frags[i].size; - copy = end - offset; - if ((copy = end - offset) > 0) { - skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - struct page *page = frag->page; - - if (copy > len) - copy = len; - - cookie = dma_memcpy_pg_to_iovec(chan, to, pinned_list, page, - frag->page_offset + offset - start, copy); - if (cookie < 0) - goto fault; - len -= copy; - if (len == 0) - goto end; - offset += copy; - } - start = end; - } - - if (skb_shinfo(skb)->frag_list) { - struct sk_buff *list = skb_shinfo(skb)->frag_list; - - for (; list; list = list->next) { - int end; - - BUG_TRAP(start <= offset + len); - - end = start + list->len; - copy = end - offset; - if (copy > 0) { - if (copy > len) - copy = len; - cookie = dma_skb_copy_datagram_iovec(chan, list, - offset - start, to, copy, - pinned_list); - if (cookie < 0) - goto fault; - len -= copy; - if (len == 0) - goto end; - offset += copy; - } - start = end; - } - } - -end: - if (!len) { - skb->dma_cookie = cookie; - return cookie; - } - -fault: - return -EFAULT; -} diff --git a/net/core/utils.c b/net/core/utils.c index e31c90e05..4f96f3892 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -130,13 +130,12 @@ void __init net_random_init(void) static int net_random_reseed(void) { int i; - unsigned long seed; + unsigned long seed[NR_CPUS]; + get_random_bytes(seed, sizeof(seed)); for_each_possible_cpu(i) { struct nrnd_state *state = &per_cpu(net_rand_state,i); - - get_random_bytes(&seed, sizeof(seed)); - __net_srandom(state, seed); + __net_srandom(state, seed[i]); } return 0; } diff --git a/net/core/wireless.c b/net/core/wireless.c index 348b9da73..d2bc72d31 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c @@ -72,6 +72,7 @@ /***************************** INCLUDES *****************************/ +#include /* Not needed ??? */ #include #include /* off_t */ #include /* struct ifreq, dev_get_by_name() */ @@ -81,7 +82,6 @@ #include /* for __init */ #include /* ARPHRD_ETHER */ #include /* compare_ether_addr */ -#include #include /* Pretty obvious */ #include /* New driver API */ @@ -1842,18 +1842,6 @@ int wireless_rtnetlink_set(struct net_device * dev, */ #ifdef WE_EVENT_RTNETLINK -static struct sk_buff_head wireless_nlevent_queue; - -static void wireless_nlevent_process(unsigned long data) -{ - struct sk_buff *skb; - - while ((skb = skb_dequeue(&wireless_nlevent_queue))) - netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_ATOMIC); -} - -static DECLARE_TASKLET(wireless_nlevent_tasklet, wireless_nlevent_process, 0); - /* ---------------------------------------------------------------- */ /* * Fill a rtnetlink message with our event data. @@ -1916,17 +1904,8 @@ static inline void rtmsg_iwinfo(struct net_device * dev, return; } NETLINK_CB(skb).dst_group = RTNLGRP_LINK; - skb_queue_tail(&wireless_nlevent_queue, skb); - tasklet_schedule(&wireless_nlevent_tasklet); -} - -static int __init wireless_nlevent_init(void) -{ - skb_queue_head_init(&wireless_nlevent_queue); - return 0; + netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_ATOMIC); } - -subsys_initcall(wireless_nlevent_init); #endif /* WE_EVENT_RTNETLINK */ /* ---------------------------------------------------------------- */ diff --git a/net/dccp/Kconfig b/net/dccp/Kconfig index 859e3359f..7e096ba84 100644 --- a/net/dccp/Kconfig +++ b/net/dccp/Kconfig @@ -26,7 +26,7 @@ config INET_DCCP_DIAG config IP_DCCP_ACKVEC depends on IP_DCCP - bool + def_bool N source "net/dccp/ccids/Kconfig" diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h index 0adf4b56c..ec7a89bb7 100644 --- a/net/dccp/ackvec.h +++ b/net/dccp/ackvec.h @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index e9615627d..d4f9e2d33 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -30,6 +30,7 @@ * - jiffies wrapping */ +#include #include "../ccid.h" #include "../dccp.h" #include "ccid2.h" diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 090bc39e8..b4a51d035 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -2,7 +2,7 @@ * net/dccp/ccids/ccid3.c * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005-6 Ian McDonald + * Copyright (c) 2005-6 Ian McDonald * * An implementation of the DCCP protocol * @@ -34,6 +34,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include "../ccid.h" #include "../dccp.h" #include "lib/packet_history.h" @@ -342,8 +343,6 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, new_packet->dccphtx_ccval = DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count; - timeval_add_usecs(&hctx->ccid3hctx_t_nom, - hctx->ccid3hctx_t_ipi); } out: return rc; @@ -415,8 +414,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, int len) case TFRC_SSTATE_NO_FBACK: case TFRC_SSTATE_FBACK: if (len > 0) { - timeval_sub_usecs(&hctx->ccid3hctx_t_nom, - hctx->ccid3hctx_t_ipi); + hctx->ccid3hctx_t_nom = now; ccid3_calc_new_t_ipi(hctx); ccid3_calc_new_delta(hctx); timeval_add_usecs(&hctx->ccid3hctx_t_nom, @@ -760,7 +758,8 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) } hcrx->ccid3hcrx_tstamp_last_feedback = now; - hcrx->ccid3hcrx_ccval_last_counter = packet->dccphrx_ccval; + hcrx->ccid3hcrx_last_counter = packet->dccphrx_ccval; + hcrx->ccid3hcrx_seqno_last_counter = packet->dccphrx_seqno; hcrx->ccid3hcrx_bytes_recv = 0; /* Convert to multiples of 10us */ @@ -784,7 +783,7 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb) if (!(sk->sk_state == DCCP_OPEN || sk->sk_state == DCCP_PARTOPEN)) return 0; - DCCP_SKB_CB(skb)->dccpd_ccval = hcrx->ccid3hcrx_ccval_last_counter; + DCCP_SKB_CB(skb)->dccpd_ccval = hcrx->ccid3hcrx_last_counter; if (dccp_packet_without_ack(skb)) return 0; @@ -856,11 +855,6 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk) interval = 1; } found: - if (!tail) { - LIMIT_NETDEBUG(KERN_WARNING "%s: tail is null\n", - __FUNCTION__); - return ~0; - } rtt = timeval_delta(&tstamp, &tail->dccphrx_tstamp) * 4 / interval; ccid3_pr_debug("%s, sk=%p, approximated RTT to %uus\n", dccp_role(sk), sk, rtt); @@ -871,20 +865,9 @@ found: delta = timeval_delta(&tstamp, &hcrx->ccid3hcrx_tstamp_last_feedback); x_recv = usecs_div(hcrx->ccid3hcrx_bytes_recv, delta); - if (x_recv == 0) - x_recv = hcrx->ccid3hcrx_x_recv; - tmp1 = (u64)x_recv * (u64)rtt; do_div(tmp1,10000000); tmp2 = (u32)tmp1; - - if (!tmp2) { - LIMIT_NETDEBUG(KERN_WARNING "tmp2 = 0 " - "%s: x_recv = %u, rtt =%u\n", - __FUNCTION__, x_recv, rtt); - return ~0; - } - fval = (hcrx->ccid3hcrx_s * 100000) / tmp2; /* do not alter order above or you will get overflow on 32 bit */ p = tfrc_calc_x_reverse_lookup(fval); @@ -900,101 +883,31 @@ found: static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss) { struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); - struct dccp_li_hist_entry *next, *head; - u64 seq_temp; - if (list_empty(&hcrx->ccid3hcrx_li_hist)) { - if (!dccp_li_hist_interval_new(ccid3_li_hist, - &hcrx->ccid3hcrx_li_hist, seq_loss, win_loss)) - return; + if (seq_loss != DCCP_MAX_SEQNO + 1 && + list_empty(&hcrx->ccid3hcrx_li_hist)) { + struct dccp_li_hist_entry *li_tail; - next = (struct dccp_li_hist_entry *) - hcrx->ccid3hcrx_li_hist.next; - next->dccplih_interval = ccid3_hc_rx_calc_first_li(sk); - } else { - struct dccp_li_hist_entry *entry; - struct list_head *tail; - - head = (struct dccp_li_hist_entry *) - hcrx->ccid3hcrx_li_hist.next; - /* FIXME win count check removed as was wrong */ - /* should make this check with receive history */ - /* and compare there as per section 10.2 of RFC4342 */ - - /* new loss event detected */ - /* calculate last interval length */ - seq_temp = dccp_delta_seqno(head->dccplih_seqno, seq_loss); - entry = dccp_li_hist_entry_new(ccid3_li_hist, SLAB_ATOMIC); - - if (entry == NULL) { - printk(KERN_CRIT "%s: out of memory\n",__FUNCTION__); - dump_stack(); + li_tail = dccp_li_hist_interval_new(ccid3_li_hist, + &hcrx->ccid3hcrx_li_hist, + seq_loss, win_loss); + if (li_tail == NULL) return; - } - - list_add(&entry->dccplih_node, &hcrx->ccid3hcrx_li_hist); - - tail = hcrx->ccid3hcrx_li_hist.prev; - list_del(tail); - kmem_cache_free(ccid3_li_hist->dccplih_slab, tail); - - /* Create the newest interval */ - entry->dccplih_seqno = seq_loss; - entry->dccplih_interval = seq_temp; - entry->dccplih_win_count = win_loss; - } + li_tail->dccplih_interval = ccid3_hc_rx_calc_first_li(sk); + } else + LIMIT_NETDEBUG(KERN_WARNING "%s: FIXME: find end of " + "interval\n", __FUNCTION__); } -static int ccid3_hc_rx_detect_loss(struct sock *sk, - struct dccp_rx_hist_entry *packet) +static void ccid3_hc_rx_detect_loss(struct sock *sk) { struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk); - struct dccp_rx_hist_entry *rx_hist = dccp_rx_hist_head(&hcrx->ccid3hcrx_hist); - u64 seqno = packet->dccphrx_seqno; - u64 tmp_seqno; - int loss = 0; - u8 ccval; - - - tmp_seqno = hcrx->ccid3hcrx_seqno_nonloss; - - if (!rx_hist || - follows48(packet->dccphrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { - hcrx->ccid3hcrx_seqno_nonloss = seqno; - hcrx->ccid3hcrx_ccval_nonloss = packet->dccphrx_ccval; - goto detect_out; - } - + u8 win_loss; + const u64 seq_loss = dccp_rx_hist_detect_loss(&hcrx->ccid3hcrx_hist, + &hcrx->ccid3hcrx_li_hist, + &win_loss); - while (dccp_delta_seqno(hcrx->ccid3hcrx_seqno_nonloss, seqno) - > TFRC_RECV_NUM_LATE_LOSS) { - loss = 1; - ccid3_hc_rx_update_li(sk, hcrx->ccid3hcrx_seqno_nonloss, - hcrx->ccid3hcrx_ccval_nonloss); - tmp_seqno = hcrx->ccid3hcrx_seqno_nonloss; - dccp_inc_seqno(&tmp_seqno); - hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; - dccp_inc_seqno(&tmp_seqno); - while (dccp_rx_hist_find_entry(&hcrx->ccid3hcrx_hist, - tmp_seqno, &ccval)) { - hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno; - hcrx->ccid3hcrx_ccval_nonloss = ccval; - dccp_inc_seqno(&tmp_seqno); - } - } - - /* FIXME - this code could be simplified with above while */ - /* but works at moment */ - if (follows48(packet->dccphrx_seqno, hcrx->ccid3hcrx_seqno_nonloss)) { - hcrx->ccid3hcrx_seqno_nonloss = seqno; - hcrx->ccid3hcrx_ccval_nonloss = packet->dccphrx_ccval; - } - -detect_out: - dccp_rx_hist_add_packet(ccid3_rx_hist, &hcrx->ccid3hcrx_hist, - &hcrx->ccid3hcrx_li_hist, packet, - hcrx->ccid3hcrx_seqno_nonloss); - return loss; + ccid3_hc_rx_update_li(sk, seq_loss, win_loss); } static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) @@ -1004,8 +917,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) struct dccp_rx_hist_entry *packet; struct timeval now; u8 win_count; - u32 p_prev, rtt_prev, r_sample, t_elapsed; - int loss; + u32 p_prev, r_sample, t_elapsed; + int ins; BUG_ON(hcrx == NULL || !(hcrx->ccid3hcrx_state == TFRC_RSTATE_NO_DATA || @@ -1020,7 +933,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) case DCCP_PKT_DATAACK: if (opt_recv->dccpor_timestamp_echo == 0) break; - rtt_prev = hcrx->ccid3hcrx_rtt; + p_prev = hcrx->ccid3hcrx_rtt; dccp_timestamp(sk, &now); timeval_sub_usecs(&now, opt_recv->dccpor_timestamp_echo * 10); r_sample = timeval_usecs(&now); @@ -1039,8 +952,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) hcrx->ccid3hcrx_rtt = (hcrx->ccid3hcrx_rtt * 9) / 10 + r_sample / 10; - if (rtt_prev != hcrx->ccid3hcrx_rtt) - ccid3_pr_debug("%s, New RTT=%uus, elapsed time=%u\n", + if (p_prev != hcrx->ccid3hcrx_rtt) + ccid3_pr_debug("%s, New RTT=%luus, elapsed time=%u\n", dccp_role(sk), hcrx->ccid3hcrx_rtt, opt_recv->dccpor_elapsed_time); break; @@ -1061,7 +974,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) win_count = packet->dccphrx_ccval; - loss = ccid3_hc_rx_detect_loss(sk, packet); + ins = dccp_rx_hist_add_packet(ccid3_rx_hist, &hcrx->ccid3hcrx_hist, + &hcrx->ccid3hcrx_li_hist, packet); if (DCCP_SKB_CB(skb)->dccpd_type == DCCP_PKT_ACK) return; @@ -1078,7 +992,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) case TFRC_RSTATE_DATA: hcrx->ccid3hcrx_bytes_recv += skb->len - dccp_hdr(skb)->dccph_doff * 4; - if (loss) + if (ins != 0) break; dccp_timestamp(sk, &now); @@ -1099,6 +1013,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) ccid3_pr_debug("%s, sk=%p(%s), data loss! Reacting...\n", dccp_role(sk), sk, dccp_state_name(sk->sk_state)); + ccid3_hc_rx_detect_loss(sk); p_prev = hcrx->ccid3hcrx_p; /* Calculate loss event rate */ @@ -1108,9 +1023,6 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) /* Scaling up by 1000000 as fixed decimal */ if (i_mean != 0) hcrx->ccid3hcrx_p = 1000000 / i_mean; - } else { - printk(KERN_CRIT "%s: empty loss hist\n",__FUNCTION__); - dump_stack(); } if (hcrx->ccid3hcrx_p > p_prev) { @@ -1319,7 +1231,7 @@ static __exit void ccid3_module_exit(void) } module_exit(ccid3_module_exit); -MODULE_AUTHOR("Ian McDonald , " +MODULE_AUTHOR("Ian McDonald , " "Arnaldo Carvalho de Melo "); MODULE_DESCRIPTION("DCCP TFRC CCID3 CCID"); MODULE_LICENSE("GPL"); diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index 0a2cb7536..f18b96d4e 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h @@ -1,13 +1,13 @@ /* * net/dccp/ccids/ccid3.h * - * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. + * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. * * An implementation of the DCCP protocol * * This code has been developed by the University of Waikato WAND * research group. For further information please see http://www.wand.net.nz/ - * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz + * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz * * This code also uses code from Lulea University, rereleased as GPL by its * authors: @@ -36,6 +36,7 @@ #ifndef _DCCP_CCID3_H_ #define _DCCP_CCID3_H_ +#include #include #include #include @@ -120,10 +121,9 @@ struct ccid3_hc_rx_sock { #define ccid3hcrx_x_recv ccid3hcrx_tfrc.tfrcrx_x_recv #define ccid3hcrx_rtt ccid3hcrx_tfrc.tfrcrx_rtt #define ccid3hcrx_p ccid3hcrx_tfrc.tfrcrx_p - u64 ccid3hcrx_seqno_nonloss:48, - ccid3hcrx_ccval_nonloss:4, + u64 ccid3hcrx_seqno_last_counter:48, ccid3hcrx_state:8, - ccid3hcrx_ccval_last_counter:4; + ccid3hcrx_last_counter:4; u32 ccid3hcrx_bytes_recv; struct timeval ccid3hcrx_tstamp_last_feedback; struct timeval ccid3hcrx_tstamp_last_ack; diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 906c81ab9..4c01a5414 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c @@ -2,7 +2,7 @@ * net/dccp/ccids/lib/loss_interval.c * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005-6 Ian McDonald + * Copyright (c) 2005 Ian McDonald * Copyright (c) 2005 Arnaldo Carvalho de Melo * * This program is free software; you can redistribute it and/or modify @@ -11,8 +11,8 @@ * (at your option) any later version. */ +#include #include -#include #include "loss_interval.h" @@ -91,13 +91,13 @@ u32 dccp_li_hist_calc_i_mean(struct list_head *list) u32 w_tot = 0; list_for_each_entry_safe(li_entry, li_next, list, dccplih_node) { - if (li_entry->dccplih_interval != ~0) { + if (i < DCCP_LI_HIST_IVAL_F_LENGTH) { i_tot0 += li_entry->dccplih_interval * dccp_li_hist_w[i]; w_tot += dccp_li_hist_w[i]; - if (i != 0) - i_tot1 += li_entry->dccplih_interval * dccp_li_hist_w[i - 1]; } + if (i != 0) + i_tot1 += li_entry->dccplih_interval * dccp_li_hist_w[i - 1]; if (++i > DCCP_LI_HIST_IVAL_F_LENGTH) break; @@ -108,36 +108,37 @@ u32 dccp_li_hist_calc_i_mean(struct list_head *list) i_tot = max(i_tot0, i_tot1); - if (!w_tot) { - LIMIT_NETDEBUG(KERN_WARNING "%s: w_tot = 0\n", __FUNCTION__); - return 1; - } + /* FIXME: Why do we do this? -Ian McDonald */ + if (i_tot * 4 < w_tot) + i_tot = w_tot * 4; - return i_tot / w_tot; + return i_tot * 4 / w_tot; } EXPORT_SYMBOL_GPL(dccp_li_hist_calc_i_mean); -int dccp_li_hist_interval_new(struct dccp_li_hist *hist, - struct list_head *list, const u64 seq_loss, const u8 win_loss) +struct dccp_li_hist_entry *dccp_li_hist_interval_new(struct dccp_li_hist *hist, + struct list_head *list, + const u64 seq_loss, + const u8 win_loss) { - struct dccp_li_hist_entry *entry; + struct dccp_li_hist_entry *tail = NULL, *entry; int i; - for (i = 0; i < DCCP_LI_HIST_IVAL_F_LENGTH; i++) { + for (i = 0; i <= DCCP_LI_HIST_IVAL_F_LENGTH; ++i) { entry = dccp_li_hist_entry_new(hist, SLAB_ATOMIC); if (entry == NULL) { dccp_li_hist_purge(hist, list); - dump_stack(); - return 0; + return NULL; } - entry->dccplih_interval = ~0; + if (tail == NULL) + tail = entry; list_add(&entry->dccplih_node, list); } entry->dccplih_seqno = seq_loss; entry->dccplih_win_count = win_loss; - return 1; + return tail; } EXPORT_SYMBOL_GPL(dccp_li_hist_interval_new); diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h index 0ae85f034..417d9d82d 100644 --- a/net/dccp/ccids/lib/loss_interval.h +++ b/net/dccp/ccids/lib/loss_interval.h @@ -4,7 +4,7 @@ * net/dccp/ccids/lib/loss_interval.h * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005 Ian McDonald + * Copyright (c) 2005 Ian McDonald * Copyright (c) 2005 Arnaldo Carvalho de Melo * * This program is free software; you can redistribute it and/or modify it @@ -13,6 +13,7 @@ * any later version. */ +#include #include #include #include @@ -52,6 +53,9 @@ extern void dccp_li_hist_purge(struct dccp_li_hist *hist, extern u32 dccp_li_hist_calc_i_mean(struct list_head *list); -extern int dccp_li_hist_interval_new(struct dccp_li_hist *hist, - struct list_head *list, const u64 seq_loss, const u8 win_loss); +extern struct dccp_li_hist_entry * + dccp_li_hist_interval_new(struct dccp_li_hist *hist, + struct list_head *list, + const u64 seq_loss, + const u8 win_loss); #endif /* _DCCP_LI_HIST_ */ diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index b876c9c81..d3f9d2053 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c @@ -1,13 +1,13 @@ /* - * net/dccp/packet_history.c + * net/dccp/packet_history.h * - * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. + * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. * * An implementation of the DCCP protocol * * This code has been developed by the University of Waikato WAND * research group. For further information please see http://www.wand.net.nz/ - * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz + * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz * * This code also uses code from Lulea University, rereleased as GPL by its * authors: @@ -34,6 +34,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include @@ -112,27 +113,64 @@ struct dccp_rx_hist_entry * EXPORT_SYMBOL_GPL(dccp_rx_hist_find_data_packet); -void dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, +int dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, struct list_head *rx_list, struct list_head *li_list, - struct dccp_rx_hist_entry *packet, - u64 nonloss_seqno) + struct dccp_rx_hist_entry *packet) { - struct dccp_rx_hist_entry *entry, *next; + struct dccp_rx_hist_entry *entry, *next, *iter; u8 num_later = 0; - list_add(&packet->dccphrx_node, rx_list); + iter = dccp_rx_hist_head(rx_list); + if (iter == NULL) + dccp_rx_hist_add_entry(rx_list, packet); + else { + const u64 seqno = packet->dccphrx_seqno; + + if (after48(seqno, iter->dccphrx_seqno)) + dccp_rx_hist_add_entry(rx_list, packet); + else { + if (dccp_rx_hist_entry_data_packet(iter)) + num_later = 1; + + list_for_each_entry_continue(iter, rx_list, + dccphrx_node) { + if (after48(seqno, iter->dccphrx_seqno)) { + dccp_rx_hist_add_entry(&iter->dccphrx_node, + packet); + goto trim_history; + } + + if (dccp_rx_hist_entry_data_packet(iter)) + num_later++; + if (num_later == TFRC_RECV_NUM_LATE_LOSS) { + dccp_rx_hist_entry_delete(hist, packet); + return 1; + } + } + + if (num_later < TFRC_RECV_NUM_LATE_LOSS) + dccp_rx_hist_add_entry(rx_list, packet); + /* + * FIXME: else what? should we destroy the packet + * like above? + */ + } + } + +trim_history: + /* + * Trim history (remove all packets after the NUM_LATE_LOSS + 1 + * data packets) + */ num_later = TFRC_RECV_NUM_LATE_LOSS + 1; if (!list_empty(li_list)) { list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { if (num_later == 0) { - if (after48(nonloss_seqno, - entry->dccphrx_seqno)) { - list_del_init(&entry->dccphrx_node); - dccp_rx_hist_entry_delete(hist, entry); - } + list_del_init(&entry->dccphrx_node); + dccp_rx_hist_entry_delete(hist, entry); } else if (dccp_rx_hist_entry_data_packet(entry)) --num_later; } @@ -180,10 +218,94 @@ void dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, --num_later; } } + + return 0; } EXPORT_SYMBOL_GPL(dccp_rx_hist_add_packet); +u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, + struct list_head *li_list, u8 *win_loss) +{ + struct dccp_rx_hist_entry *entry, *next, *packet; + struct dccp_rx_hist_entry *a_loss = NULL; + struct dccp_rx_hist_entry *b_loss = NULL; + u64 seq_loss = DCCP_MAX_SEQNO + 1; + u8 num_later = TFRC_RECV_NUM_LATE_LOSS; + + list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { + if (num_later == 0) { + b_loss = entry; + break; + } else if (dccp_rx_hist_entry_data_packet(entry)) + --num_later; + } + + if (b_loss == NULL) + goto out; + + num_later = 1; + list_for_each_entry_safe_continue(entry, next, rx_list, dccphrx_node) { + if (num_later == 0) { + a_loss = entry; + break; + } else if (dccp_rx_hist_entry_data_packet(entry)) + --num_later; + } + + if (a_loss == NULL) { + if (list_empty(li_list)) { + /* no loss event have occured yet */ + LIMIT_NETDEBUG("%s: TODO: find a lost data packet by " + "comparing to initial seqno\n", + __FUNCTION__); + goto out; + } else { + LIMIT_NETDEBUG("%s: Less than 4 data pkts in history!", + __FUNCTION__); + goto out; + } + } + + /* Locate a lost data packet */ + entry = packet = b_loss; + list_for_each_entry_safe_continue(entry, next, rx_list, dccphrx_node) { + u64 delta = dccp_delta_seqno(entry->dccphrx_seqno, + packet->dccphrx_seqno); + + if (delta != 0) { + if (dccp_rx_hist_entry_data_packet(packet)) + --delta; + /* + * FIXME: check this, probably this % usage is because + * in earlier drafts the ndp count was just 8 bits + * long, but now it cam be up to 24 bits long. + */ +#if 0 + if (delta % DCCP_NDP_LIMIT != + (packet->dccphrx_ndp - + entry->dccphrx_ndp) % DCCP_NDP_LIMIT) +#endif + if (delta != packet->dccphrx_ndp - entry->dccphrx_ndp) { + seq_loss = entry->dccphrx_seqno; + dccp_inc_seqno(&seq_loss); + } + } + packet = entry; + if (packet == a_loss) + break; + } +out: + if (seq_loss != DCCP_MAX_SEQNO + 1) + *win_loss = a_loss->dccphrx_ccval; + else + *win_loss = 0; /* Paranoia */ + + return seq_loss; +} + +EXPORT_SYMBOL_GPL(dccp_rx_hist_detect_loss); + struct dccp_tx_hist *dccp_tx_hist_new(const char *name) { struct dccp_tx_hist *hist = kmalloc(sizeof(*hist), GFP_ATOMIC); @@ -244,25 +366,6 @@ struct dccp_tx_hist_entry * EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); -int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, - u8 *ccval) -{ - struct dccp_rx_hist_entry *packet = NULL, *entry; - - list_for_each_entry(entry, list, dccphrx_node) - if (entry->dccphrx_seqno == seq) { - packet = entry; - break; - } - - if (packet) - *ccval = packet->dccphrx_ccval; - - return packet != NULL; -} - -EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry); - void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, struct list_head *list, struct dccp_tx_hist_entry *packet) @@ -289,7 +392,7 @@ void dccp_tx_hist_purge(struct dccp_tx_hist *hist, struct list_head *list) EXPORT_SYMBOL_GPL(dccp_tx_hist_purge); -MODULE_AUTHOR("Ian McDonald , " +MODULE_AUTHOR("Ian McDonald , " "Arnaldo Carvalho de Melo "); MODULE_DESCRIPTION("DCCP TFRC library"); MODULE_LICENSE("GPL"); diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 067cf1c85..122e96737 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h @@ -1,13 +1,13 @@ /* * net/dccp/packet_history.h * - * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. + * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. * * An implementation of the DCCP protocol * * This code has been developed by the University of Waikato WAND * research group. For further information please see http://www.wand.net.nz/ - * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz + * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz * * This code also uses code from Lulea University, rereleased as GPL by its * authors: @@ -37,6 +37,7 @@ #ifndef _DCCP_PKT_HIST_ #define _DCCP_PKT_HIST_ +#include #include #include #include @@ -106,8 +107,6 @@ static inline void dccp_tx_hist_entry_delete(struct dccp_tx_hist *hist, extern struct dccp_tx_hist_entry * dccp_tx_hist_find_entry(const struct list_head *list, const u64 seq); -extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, - u8 *ccval); static inline void dccp_tx_hist_add_entry(struct list_head *list, struct dccp_tx_hist_entry *entry) @@ -166,6 +165,12 @@ static inline void dccp_rx_hist_entry_delete(struct dccp_rx_hist *hist, extern void dccp_rx_hist_purge(struct dccp_rx_hist *hist, struct list_head *list); +static inline void dccp_rx_hist_add_entry(struct list_head *list, + struct dccp_rx_hist_entry *entry) +{ + list_add(&entry->dccphrx_node, list); +} + static inline struct dccp_rx_hist_entry * dccp_rx_hist_head(struct list_head *list) { @@ -184,11 +189,10 @@ static inline int entry->dccphrx_type == DCCP_PKT_DATAACK; } -extern void dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, +extern int dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, struct list_head *rx_list, struct list_head *li_list, - struct dccp_rx_hist_entry *packet, - u64 nonloss_seqno); + struct dccp_rx_hist_entry *packet); extern u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, struct list_head *li_list, u8 *win_loss); diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index 45f30f59e..130c4c40c 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h @@ -4,7 +4,7 @@ * net/dccp/ccids/lib/tfrc.h * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005 Ian McDonald + * Copyright (c) 2005 Ian McDonald * Copyright (c) 2005 Arnaldo Carvalho de Melo * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon * diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c index 44076e0c6..add3cae65 100644 --- a/net/dccp/ccids/lib/tfrc_equation.c +++ b/net/dccp/ccids/lib/tfrc_equation.c @@ -2,7 +2,7 @@ * net/dccp/ccids/lib/tfrc_equation.c * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005 Ian McDonald + * Copyright (c) 2005 Ian McDonald * Copyright (c) 2005 Arnaldo Carvalho de Melo * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon * @@ -12,6 +12,7 @@ * (at your option) any later version. */ +#include #include #include diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index a5c547572..1fe509148 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -5,13 +5,14 @@ * * An implementation of the DCCP protocol * Copyright (c) 2005 Arnaldo Carvalho de Melo - * Copyright (c) 2005-6 Ian McDonald + * Copyright (c) 2005 Ian McDonald * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -81,14 +82,6 @@ static inline u64 max48(const u64 seq1, const u64 seq2) return after48(seq1, seq2) ? seq1 : seq2; } -/* is seq1 next seqno after seq2 */ -static inline int follows48(const u64 seq1, const u64 seq2) -{ - int diff = (seq1 & 0xFFFF) - (seq2 & 0xFFFF); - - return diff==1; -} - enum { DCCP_MIB_NUM = 0, DCCP_MIB_ACTIVEOPENS, /* ActiveOpens */ diff --git a/net/dccp/diag.c b/net/dccp/diag.c index 0f3745585..0f25dc395 100644 --- a/net/dccp/diag.c +++ b/net/dccp/diag.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/net/dccp/feat.c b/net/dccp/feat.c index a1b0682ee..b39e2a597 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include "dccp.h" diff --git a/net/dccp/feat.h b/net/dccp/feat.h index b44c45504..6048373c7 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h @@ -26,6 +26,4 @@ extern void dccp_feat_clean(struct dccp_minisock *dmsk); extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk); extern int dccp_feat_init(struct dccp_minisock *dmsk); -extern int dccp_feat_default_sequence_window; - #endif /* _DCCP_FEAT_H */ diff --git a/net/dccp/input.c b/net/dccp/input.c index 7f9dc6ac5..bfc536655 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7f56f7e8f..f2c011fd2 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -504,7 +505,8 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) ireq = inet_rsk(req); ireq->loc_addr = daddr; ireq->rmt_addr = saddr; - req->rcv_wnd = dccp_feat_default_sequence_window; + req->rcv_wnd = 100; /* Fake, option parsing will get the + right value */ ireq->opt = NULL; /* diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 3744c246c..65e2ab088 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -31,7 +32,6 @@ #include "dccp.h" #include "ipv6.h" -#include "feat.h" /* Socket used for sending RSTs and ACKs */ static struct socket *dccp_v6_ctl_socket; @@ -230,7 +230,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, ipv6_addr_copy(&np->saddr, saddr); inet->rcv_saddr = LOOPBACK4_IPV6; - __ip6_dst_store(sk, dst, NULL); + ip6_dst_store(sk, dst, NULL); icsk->icsk_ext_hdr_len = 0; if (np->opt != NULL) @@ -276,7 +276,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, __u64 seq; sk = inet6_lookup(&dccp_hashinfo, &hdr->daddr, dh->dccph_dport, - &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); + &hdr->saddr, dh->dccph_sport, skb->dev->ifindex); if (sk == NULL) { ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); @@ -708,7 +708,8 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) ireq = inet_rsk(req); ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); - req->rcv_wnd = dccp_feat_default_sequence_window; + req->rcv_wnd = 100; /* Fake, option parsing will get the + right value */ ireq6->pktopts = NULL; if (ipv6_opt_accepted(sk, skb) || @@ -863,7 +864,7 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, * comment in that function for the gory details. -acme */ - __ip6_dst_store(newsk, dst, NULL); + ip6_dst_store(newsk, dst, NULL); newsk->sk_route_caps = dst->dev->features & ~(NETIF_F_IP_CSUM | NETIF_F_TSO); newdp6 = (struct dccp6_sock *)newsk; diff --git a/net/dccp/ipv6.h b/net/dccp/ipv6.h index 6eef81fdb..e4d4e9309 100644 --- a/net/dccp/ipv6.h +++ b/net/dccp/ipv6.h @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ +#include #include #include diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 9045438d6..c0349e5b0 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/dccp/options.c b/net/dccp/options.c index 07a34696a..e9feb2a0c 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c @@ -4,13 +4,14 @@ * An implementation of the DCCP protocol * Copyright (c) 2005 Aristeu Sergio Rozanski Filho * Copyright (c) 2005 Arnaldo Carvalho de Melo - * Copyright (c) 2005 Ian McDonald + * Copyright (c) 2005 Ian McDonald * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -29,8 +30,6 @@ int dccp_feat_default_ack_ratio = DCCPF_INITIAL_ACK_RATIO; int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; -EXPORT_SYMBOL_GPL(dccp_feat_default_sequence_window); - void dccp_minisock_init(struct dccp_minisock *dmsk) { dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window; diff --git a/net/dccp/output.c b/net/dccp/output.c index 58669beee..7409e4a3a 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 6f14bb5a2..2e0ee8355 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -484,7 +485,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, err = -EINVAL; else err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L, - (struct dccp_so_feat __user *) + (struct dccp_so_feat *) optval); break; @@ -493,7 +494,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, err = -EINVAL; else err = dccp_setsockopt_change(sk, DCCPO_CHANGE_R, - (struct dccp_so_feat __user *) + (struct dccp_so_feat *) optval); break; @@ -718,7 +719,7 @@ int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } dccp_pr_debug("packet_type=%s\n", dccp_packet_name(dh->dccph_type)); - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb); verify_sock_status: if (sock_flag(sk, SOCK_DONE)) { len = 0; @@ -772,7 +773,7 @@ verify_sock_status: } found_fin_ok: if (!(flags & MSG_PEEK)) - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb); break; } while (1); out: diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index c1ba9451b..64c89e9c2 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c @@ -9,6 +9,7 @@ * as published by the Free Software Foundation. */ +#include #include #include diff --git a/net/dccp/timer.c b/net/dccp/timer.c index 8447742f5..5244415e5 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c @@ -10,6 +10,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 07d98695d..2b289ef20 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -99,6 +99,7 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat dn_bind fixes *******************************************************************************/ +#include #include #include #include @@ -1177,10 +1178,8 @@ static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len if (peer) { if ((sock->state != SS_CONNECTED && sock->state != SS_CONNECTING) && - scp->accept_mode == ACC_IMMED) { - release_sock(sk); + scp->accept_mode == ACC_IMMED) return -ENOTCONN; - } memcpy(sa, &scp->peer, sizeof(struct sockaddr_dn)); } else { diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 476455fbd..a26ff9f44 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -24,6 +24,7 @@ * devices. All mtu based now. */ +#include #include #include #include @@ -413,7 +414,11 @@ static struct dn_ifaddr *dn_dev_alloc_ifa(void) { struct dn_ifaddr *ifa; - ifa = kzalloc(sizeof(*ifa), GFP_KERNEL); + ifa = kmalloc(sizeof(*ifa), GFP_KERNEL); + + if (ifa) { + memset(ifa, 0, sizeof(*ifa)); + } return ifa; } @@ -1101,9 +1106,10 @@ struct dn_dev *dn_dev_create(struct net_device *dev, int *err) return NULL; *err = -ENOBUFS; - if ((dn_db = kzalloc(sizeof(struct dn_dev), GFP_ATOMIC)) == NULL) + if ((dn_db = kmalloc(sizeof(struct dn_dev), GFP_ATOMIC)) == NULL) return NULL; + memset(dn_db, 0, sizeof(struct dn_dev)); memcpy(&dn_db->parms, p, sizeof(struct dn_dev_parms)); smp_wmb(); dev->dn_ptr = dn_db; diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index fa20e2efc..bd4ce8681 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c @@ -17,6 +17,7 @@ * this code was copied from it. * */ +#include #include #include #include @@ -283,10 +284,11 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta goto err_inval; } - fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL); + fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL); err = -ENOBUFS; if (fi == NULL) goto failure; + memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct dn_fib_nh)); fi->fib_protocol = r->rtm_protocol; fi->fib_nhs = nhs; diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index ff0ebe991..66e230c3b 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c @@ -24,6 +24,7 @@ * */ +#include #include #include #include @@ -580,11 +581,12 @@ static int dn_neigh_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct neigh_seq_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct neigh_seq_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; + memset(s, 0, sizeof(*s)); rc = seq_open(file, &dn_neigh_seq_ops); if (rc) goto out_kfree; diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 86f7f3b28..a2ba9db1c 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c @@ -45,6 +45,7 @@ GNU General Public License for more details. *******************************************************************************/ +#include #include #include #include diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 743e9fcf7..5abf7057a 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c @@ -55,6 +55,7 @@ GNU General Public License for more details. *******************************************************************************/ +#include #include #include #include @@ -925,13 +926,8 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old for(dev_out = dev_base; dev_out; dev_out = dev_out->next) { if (!dev_out->dn_ptr) continue; - if (!dn_dev_islocal(dev_out, oldflp->fld_src)) - continue; - if ((dev_out->flags & IFF_LOOPBACK) && - oldflp->fld_dst && - !dn_dev_islocal(dev_out, oldflp->fld_dst)) - continue; - break; + if (dn_dev_islocal(dev_out, oldflp->fld_src)) + break; } read_unlock(&dev_base_lock); if (dev_out == NULL) diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 6986be754..2440d0504 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c @@ -13,6 +13,7 @@ * Changes: * */ +#include #include #include #include @@ -151,9 +152,10 @@ int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) } } - new_r = kzalloc(sizeof(*new_r), GFP_KERNEL); + new_r = kmalloc(sizeof(*new_r), GFP_KERNEL); if (!new_r) return -ENOMEM; + memset(new_r, 0, sizeof(*new_r)); if (rta[RTA_SRC-1]) memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 2); diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index e926c952e..0ebc46af1 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c @@ -12,6 +12,7 @@ * Changes: * */ +#include #include #include #include @@ -158,10 +159,12 @@ static void dn_rehash_zone(struct dn_zone *dz) break; } - ht = kcalloc(new_divisor, sizeof(struct dn_fib_node*), GFP_KERNEL); + ht = kmalloc(new_divisor*sizeof(struct dn_fib_node*), GFP_KERNEL); + if (ht == NULL) return; + memset(ht, 0, new_divisor*sizeof(struct dn_fib_node *)); write_lock_bh(&dn_fib_tables_lock); old_ht = dz->dz_hash; dz->dz_hash = ht; @@ -182,10 +185,11 @@ static void dn_free_node(struct dn_fib_node *f) static struct dn_zone *dn_new_zone(struct dn_hash *table, int z) { int i; - struct dn_zone *dz = kzalloc(sizeof(struct dn_zone), GFP_KERNEL); + struct dn_zone *dz = kmalloc(sizeof(struct dn_zone), GFP_KERNEL); if (!dz) return NULL; + memset(dz, 0, sizeof(struct dn_zone)); if (z) { dz->dz_divisor = 16; dz->dz_hashmask = 0x0F; @@ -194,12 +198,14 @@ static struct dn_zone *dn_new_zone(struct dn_hash *table, int z) dz->dz_hashmask = 0; } - dz->dz_hash = kcalloc(dz->dz_divisor, sizeof(struct dn_fib_node *), GFP_KERNEL); + dz->dz_hash = kmalloc(dz->dz_divisor*sizeof(struct dn_fib_node *), GFP_KERNEL); + if (!dz->dz_hash) { kfree(dz); return NULL; } + memset(dz->dz_hash, 0, dz->dz_divisor*sizeof(struct dn_fib_node*)); dz->dz_order = z; dz->dz_mask = dnet_make_mask(z); diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index 8b99bd335..74133ecd7 100644 --- a/net/decnet/netfilter/dn_rtmsg.c +++ b/net/decnet/netfilter/dn_rtmsg.c @@ -107,7 +107,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb) if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) return; - if (security_netlink_recv(skb, CAP_NET_ADMIN)) + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) RCV_SKB_FAIL(-EPERM); /* Eventually we might send routing messages too */ diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index e246f054f..bda592021 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c @@ -13,6 +13,7 @@ * Steve Whitehouse - Memory buffer settings, like the tcp ones * */ +#include #include #include #include diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 4d66aac13..868265619 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -9,6 +9,7 @@ * */ +#include #include #include @@ -673,11 +674,12 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg) edev = dev->ec_ptr; if (edev == NULL) { /* Magic up a new one. */ - edev = kzalloc(sizeof(struct ec_device), GFP_KERNEL); + edev = kmalloc(sizeof(struct ec_device), GFP_KERNEL); if (edev == NULL) { err = -ENOMEM; break; } + memset(edev, 0, sizeof(struct ec_device)); dev->ec_ptr = edev; } else net2dev_map[edev->net] = NULL; diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 387c71c58..c971f1471 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/net/ieee80211/ieee80211_crypt.c b/net/ieee80211/ieee80211_crypt.c index 5ed0a98b2..cb71d794a 100644 --- a/net/ieee80211/ieee80211_crypt.c +++ b/net/ieee80211/ieee80211_crypt.c @@ -110,10 +110,11 @@ int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops) unsigned long flags; struct ieee80211_crypto_alg *alg; - alg = kzalloc(sizeof(*alg), GFP_KERNEL); + alg = kmalloc(sizeof(*alg), GFP_KERNEL); if (alg == NULL) return -ENOMEM; + memset(alg, 0, sizeof(*alg)); alg->ops = ops; spin_lock_irqsave(&ieee80211_crypto_lock, flags); diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c index ed90a8af1..78b2d13e8 100644 --- a/net/ieee80211/ieee80211_crypt_ccmp.c +++ b/net/ieee80211/ieee80211_crypt_ccmp.c @@ -9,6 +9,7 @@ * more details. */ +#include #include #include #include @@ -76,9 +77,10 @@ static void *ieee80211_ccmp_init(int key_idx) { struct ieee80211_ccmp_data *priv; - priv = kzalloc(sizeof(*priv), GFP_ATOMIC); + priv = kmalloc(sizeof(*priv), GFP_ATOMIC); if (priv == NULL) goto fail; + memset(priv, 0, sizeof(*priv)); priv->key_idx = key_idx; priv->tfm = crypto_alloc_tfm("aes", 0); diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c index 34dba0ba5..93def94c1 100644 --- a/net/ieee80211/ieee80211_crypt_tkip.c +++ b/net/ieee80211/ieee80211_crypt_tkip.c @@ -9,6 +9,7 @@ * more details. */ +#include #include #include #include @@ -500,11 +501,8 @@ static int michael_mic(struct ieee80211_tkip_data *tkey, u8 * key, u8 * hdr, static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr) { struct ieee80211_hdr_4addr *hdr11; - u16 stype; hdr11 = (struct ieee80211_hdr_4addr *)skb->data; - stype = WLAN_FC_GET_STYPE(le16_to_cpu(hdr11->frame_ctl)); - switch (le16_to_cpu(hdr11->frame_ctl) & (IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) { case IEEE80211_FCTL_TODS: @@ -525,13 +523,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr) break; } - if (stype & IEEE80211_STYPE_QOS_DATA) { - const struct ieee80211_hdr_3addrqos *qoshdr = - (struct ieee80211_hdr_3addrqos *)skb->data; - hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID; - } else - hdr[12] = 0; /* priority */ - + hdr[12] = 0; /* priority */ hdr[13] = hdr[14] = hdr[15] = 0; /* reserved */ } diff --git a/net/ieee80211/ieee80211_crypt_wep.c b/net/ieee80211/ieee80211_crypt_wep.c index 0ebf235f6..649e581fa 100644 --- a/net/ieee80211/ieee80211_crypt_wep.c +++ b/net/ieee80211/ieee80211_crypt_wep.c @@ -9,6 +9,7 @@ * more details. */ +#include #include #include #include @@ -39,9 +40,10 @@ static void *prism2_wep_init(int keyidx) { struct prism2_wep_data *priv; - priv = kzalloc(sizeof(*priv), GFP_ATOMIC); + priv = kmalloc(sizeof(*priv), GFP_ATOMIC); if (priv == NULL) goto fail; + memset(priv, 0, sizeof(*priv)); priv->key_idx = keyidx; priv->tfm = crypto_alloc_tfm("arc4", 0); diff --git a/net/ieee80211/ieee80211_geo.c b/net/ieee80211/ieee80211_geo.c index 305a09de8..192243ab3 100644 --- a/net/ieee80211/ieee80211_geo.c +++ b/net/ieee80211/ieee80211_geo.c @@ -24,6 +24,7 @@ ******************************************************************************/ #include +#include #include #include #include diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c index 13b1e5fff..2cb84d84f 100644 --- a/net/ieee80211/ieee80211_module.c +++ b/net/ieee80211/ieee80211_module.c @@ -31,6 +31,7 @@ *******************************************************************************/ #include +#include #include #include #include diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 72d4d4e04..604b7b009 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -404,9 +405,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, #endif if (ieee->iw_mode == IW_MODE_MONITOR) { + ieee80211_monitor_rx(ieee, skb, rx_stats); stats->rx_packets++; stats->rx_bytes += skb->len; - ieee80211_monitor_rx(ieee, skb, rx_stats); return 1; } @@ -1691,8 +1692,8 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, WLAN_FC_GET_STYPE(le16_to_cpu (header->frame_ctl))); - IEEE80211_DEBUG_MGMT("%s: IEEE80211_REASSOC_REQ received\n", - ieee->dev->name); + IEEE80211_WARNING("%s: IEEE80211_REASSOC_REQ received\n", + ieee->dev->name); if (ieee->handle_reassoc_request != NULL) ieee->handle_reassoc_request(ieee->dev, (struct ieee80211_reassoc_request *) @@ -1704,8 +1705,8 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, WLAN_FC_GET_STYPE(le16_to_cpu (header->frame_ctl))); - IEEE80211_DEBUG_MGMT("%s: IEEE80211_ASSOC_REQ received\n", - ieee->dev->name); + IEEE80211_WARNING("%s: IEEE80211_ASSOC_REQ received\n", + ieee->dev->name); if (ieee->handle_assoc_request != NULL) ieee->handle_assoc_request(ieee->dev); break; @@ -1721,10 +1722,10 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee, IEEE80211_DEBUG_MGMT("received UNKNOWN (%d)\n", WLAN_FC_GET_STYPE(le16_to_cpu (header->frame_ctl))); - IEEE80211_DEBUG_MGMT("%s: Unknown management packet: %d\n", - ieee->dev->name, - WLAN_FC_GET_STYPE(le16_to_cpu - (header->frame_ctl))); + IEEE80211_WARNING("%s: Unknown management packet: %d\n", + ieee->dev->name, + WLAN_FC_GET_STYPE(le16_to_cpu + (header->frame_ctl))); break; } } diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index bf042139c..8b4332f53 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c @@ -24,6 +24,7 @@ ******************************************************************************/ #include +#include #include #include #include @@ -219,43 +220,13 @@ static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size, return txb; } -static int ieee80211_classify(struct sk_buff *skb) -{ - struct ethhdr *eth; - struct iphdr *ip; - - eth = (struct ethhdr *)skb->data; - if (eth->h_proto != __constant_htons(ETH_P_IP)) - return 0; - - ip = skb->nh.iph; - switch (ip->tos & 0xfc) { - case 0x20: - return 2; - case 0x40: - return 1; - case 0x60: - return 3; - case 0x80: - return 4; - case 0xa0: - return 5; - case 0xc0: - return 6; - case 0xe0: - return 7; - default: - return 0; - } -} - /* Incoming skb is converted to a txb which consists of * a block of 802.11 fragment packets (stored as skbs) */ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_device *ieee = netdev_priv(dev); struct ieee80211_txb *txb = NULL; - struct ieee80211_hdr_3addrqos *frag_hdr; + struct ieee80211_hdr_3addr *frag_hdr; int i, bytes_per_frag, nr_frags, bytes_last_frag, frag_size, rts_required; unsigned long flags; @@ -263,10 +234,9 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) int ether_type, encrypt, host_encrypt, host_encrypt_msdu, host_build_iv; int bytes, fc, hdr_len; struct sk_buff *skb_frag; - struct ieee80211_hdr_3addrqos header = {/* Ensure zero initialized */ + struct ieee80211_hdr_3addr header = { /* Ensure zero initialized */ .duration_id = 0, - .seq_ctl = 0, - .qos_ctl = 0 + .seq_ctl = 0 }; u8 dest[ETH_ALEN], src[ETH_ALEN]; struct ieee80211_crypt_data *crypt; @@ -312,6 +282,12 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) memcpy(dest, skb->data, ETH_ALEN); memcpy(src, skb->data + ETH_ALEN, ETH_ALEN); + /* Advance the SKB to the start of the payload */ + skb_pull(skb, sizeof(struct ethhdr)); + + /* Determine total amount of storage required for TXB packets */ + bytes = skb->len + SNAP_SIZE + sizeof(u16); + if (host_encrypt || host_build_iv) fc = IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA | IEEE80211_FCTL_PROTECTED; @@ -330,22 +306,8 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) memcpy(header.addr2, src, ETH_ALEN); memcpy(header.addr3, ieee->bssid, ETH_ALEN); } - hdr_len = IEEE80211_3ADDR_LEN; - - if (ieee->is_qos_active && ieee->is_qos_active(dev, skb)) { - fc |= IEEE80211_STYPE_QOS_DATA; - hdr_len += 2; - - skb->priority = ieee80211_classify(skb); - header.qos_ctl |= skb->priority & IEEE80211_QCTL_TID; - } header.frame_ctl = cpu_to_le16(fc); - - /* Advance the SKB to the start of the payload */ - skb_pull(skb, sizeof(struct ethhdr)); - - /* Determine total amount of storage required for TXB packets */ - bytes = skb->len + SNAP_SIZE + sizeof(u16); + hdr_len = IEEE80211_3ADDR_LEN; /* Encrypt msdu first on the whole data packet. */ if ((host_encrypt || host_encrypt_msdu) && @@ -440,7 +402,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) if (rts_required) { skb_frag = txb->fragments[0]; frag_hdr = - (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len); + (struct ieee80211_hdr_3addr *)skb_put(skb_frag, hdr_len); /* * Set header frame_ctl to the RTS. @@ -471,7 +433,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) crypt->ops->extra_mpdu_prefix_len); frag_hdr = - (struct ieee80211_hdr_3addrqos *)skb_put(skb_frag, hdr_len); + (struct ieee80211_hdr_3addr *)skb_put(skb_frag, hdr_len); memcpy(frag_hdr, &header, hdr_len); /* If this is not the last fragment, then add the MOREFRAGS @@ -554,23 +516,16 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) /* Incoming 802.11 strucure is converted to a TXB * a block of 802.11 fragment packets (stored as skbs) */ int ieee80211_tx_frame(struct ieee80211_device *ieee, - struct ieee80211_hdr *frame, int hdr_len, int total_len, - int encrypt_mpdu) + struct ieee80211_hdr *frame, int len) { struct ieee80211_txb *txb = NULL; unsigned long flags; struct net_device_stats *stats = &ieee->stats; struct sk_buff *skb_frag; int priority = -1; - int fraglen = total_len; - int headroom = ieee->tx_headroom; - struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx]; spin_lock_irqsave(&ieee->lock, flags); - if (encrypt_mpdu && (!ieee->sec.encrypt || !crypt)) - encrypt_mpdu = 0; - /* If there is no driver handler to take the TXB, dont' bother * creating it... */ if (!ieee->hard_start_xmit) { @@ -578,45 +533,32 @@ int ieee80211_tx_frame(struct ieee80211_device *ieee, goto success; } - if (unlikely(total_len < 24)) { + if (unlikely(len < 24)) { printk(KERN_WARNING "%s: skb too small (%d).\n", - ieee->dev->name, total_len); + ieee->dev->name, len); goto success; } - if (encrypt_mpdu) { - frame->frame_ctl |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); - fraglen += crypt->ops->extra_mpdu_prefix_len + - crypt->ops->extra_mpdu_postfix_len; - headroom += crypt->ops->extra_mpdu_prefix_len; - } - /* When we allocate the TXB we allocate enough space for the reserve * and full fragment bytes (bytes_per_frag doesn't include prefix, * postfix, header, FCS, etc.) */ - txb = ieee80211_alloc_txb(1, fraglen, headroom, GFP_ATOMIC); + txb = ieee80211_alloc_txb(1, len, ieee->tx_headroom, GFP_ATOMIC); if (unlikely(!txb)) { printk(KERN_WARNING "%s: Could not allocate TXB\n", ieee->dev->name); goto failed; } txb->encrypted = 0; - txb->payload_size = fraglen; + txb->payload_size = len; skb_frag = txb->fragments[0]; - memcpy(skb_put(skb_frag, total_len), frame, total_len); + memcpy(skb_put(skb_frag, len), frame, len); if (ieee->config & (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) skb_put(skb_frag, 4); - /* To avoid overcomplicating things, we do the corner-case frame - * encryption in software. The only real situation where encryption is - * needed here is during software-based shared key authentication. */ - if (encrypt_mpdu) - ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len); - success: spin_unlock_irqrestore(&ieee->lock, flags); diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index 5cb9cfd35..b885fd189 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c @@ -50,8 +50,7 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee, char *p; struct iw_event iwe; int i, j; - char *current_val; /* For rates */ - u8 rate; + u8 max_rate, rate; /* First entry *MUST* be the AP MAC address */ iwe.cmd = SIOCGIWAP; @@ -108,13 +107,9 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee, start = iwe_stream_add_point(start, stop, &iwe, network->ssid); /* Add basic and extended rates */ - /* Rate : stuffing multiple values in a single event require a bit - * more of magic - Jean II */ - current_val = start + IW_EV_LCP_LEN; - iwe.cmd = SIOCGIWRATE; - /* Those two flags are ignored... */ - iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; - + max_rate = 0; + p = custom; + p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): "); for (i = 0, j = 0; i < network->rates_len;) { if (j < network->rates_ex_len && ((network->rates_ex[j] & 0x7F) < @@ -122,21 +117,28 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee, rate = network->rates_ex[j++] & 0x7F; else rate = network->rates[i++] & 0x7F; - /* Bit rate given in 500 kb/s units (+ 0x80) */ - iwe.u.bitrate.value = ((rate & 0x7f) * 500000); - /* Add new value to event */ - current_val = iwe_stream_add_value(start, current_val, stop, &iwe, IW_EV_PARAM_LEN); + if (rate > max_rate) + max_rate = rate; + p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), + "%d%s ", rate >> 1, (rate & 1) ? ".5" : ""); } for (; j < network->rates_ex_len; j++) { rate = network->rates_ex[j] & 0x7F; - /* Bit rate given in 500 kb/s units (+ 0x80) */ - iwe.u.bitrate.value = ((rate & 0x7f) * 500000); - /* Add new value to event */ - current_val = iwe_stream_add_value(start, current_val, stop, &iwe, IW_EV_PARAM_LEN); + p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), + "%d%s ", rate >> 1, (rate & 1) ? ".5" : ""); + if (rate > max_rate) + max_rate = rate; } - /* Check if we added any rate */ - if((current_val - start) > IW_EV_LCP_LEN) - start = current_val; + + iwe.cmd = SIOCGIWRATE; + iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; + iwe.u.bitrate.value = max_rate * 500000; + start = iwe_stream_add_event(start, stop, &iwe, IW_EV_PARAM_LEN); + + iwe.cmd = IWEVCUSTOM; + iwe.u.data.length = p - custom; + if (iwe.u.data.length) + start = iwe_stream_add_point(start, stop, &iwe, custom); /* Add quality statistics */ iwe.cmd = IWEVQUAL; @@ -369,10 +371,11 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee, struct ieee80211_crypt_data *new_crypt; /* take WEP into use */ - new_crypt = kzalloc(sizeof(struct ieee80211_crypt_data), + new_crypt = kmalloc(sizeof(struct ieee80211_crypt_data), GFP_KERNEL); if (new_crypt == NULL) return -ENOMEM; + memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data)); new_crypt->ops = ieee80211_get_crypto_ops("WEP"); if (!new_crypt->ops) { request_module("ieee80211_crypt_wep"); @@ -502,7 +505,7 @@ int ieee80211_wx_get_encode(struct ieee80211_device *ieee, len = sec->key_sizes[key]; memcpy(keybuf, sec->keys[key], len); - erq->length = len; + erq->length = (len >= 0 ? len : 0); erq->flags |= IW_ENCODE_ENABLED; if (ieee->open_wep) @@ -615,11 +618,13 @@ int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee, ieee80211_crypt_delayed_deinit(ieee, crypt); - new_crypt = kzalloc(sizeof(*new_crypt), GFP_KERNEL); + new_crypt = (struct ieee80211_crypt_data *) + kmalloc(sizeof(*new_crypt), GFP_KERNEL); if (new_crypt == NULL) { ret = -ENOMEM; goto done; } + memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data)); new_crypt->ops = ops; if (new_crypt->ops && try_module_get(new_crypt->ops->owner)) new_crypt->priv = new_crypt->ops->init(idx); diff --git a/net/ieee80211/softmac/Kconfig b/net/ieee80211/softmac/Kconfig index 2811651cb..f2a27cc6e 100644 --- a/net/ieee80211/softmac/Kconfig +++ b/net/ieee80211/softmac/Kconfig @@ -2,7 +2,6 @@ config IEEE80211_SOFTMAC tristate "Software MAC add-on to the IEEE 802.11 networking stack" depends on IEEE80211 && EXPERIMENTAL select WIRELESS_EXT - select IEEE80211_CRYPT_WEP ---help--- This option enables the hardware independent software MAC addon for the IEEE 802.11 networking stack. diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c index 44215ce64..57ea9f6f4 100644 --- a/net/ieee80211/softmac/ieee80211softmac_assoc.c +++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c @@ -47,7 +47,9 @@ ieee80211softmac_assoc(struct ieee80211softmac_device *mac, struct ieee80211soft dprintk(KERN_INFO PFX "sent association request!\n"); + /* Change the state to associating */ spin_lock_irqsave(&mac->lock, flags); + mac->associnfo.associating = 1; mac->associated = 0; /* just to make sure */ /* Set a timer for timeout */ @@ -61,7 +63,6 @@ void ieee80211softmac_assoc_timeout(void *d) { struct ieee80211softmac_device *mac = (struct ieee80211softmac_device *)d; - struct ieee80211softmac_network *n; unsigned long flags; spin_lock_irqsave(&mac->lock, flags); @@ -74,60 +75,58 @@ ieee80211softmac_assoc_timeout(void *d) mac->associnfo.associating = 0; mac->associnfo.bssvalid = 0; mac->associated = 0; - - n = ieee80211softmac_get_network_by_bssid_locked(mac, mac->associnfo.bssid); spin_unlock_irqrestore(&mac->lock, flags); dprintk(KERN_INFO PFX "assoc request timed out!\n"); - ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_TIMEOUT, n); -} - -void -ieee80211softmac_disassoc(struct ieee80211softmac_device *mac) -{ - unsigned long flags; - - spin_lock_irqsave(&mac->lock, flags); - if (mac->associnfo.associating) - cancel_delayed_work(&mac->associnfo.timeout); - - netif_carrier_off(mac->dev); - - mac->associated = 0; - mac->associnfo.bssvalid = 0; - mac->associnfo.associating = 0; - ieee80211softmac_init_txrates(mac); - ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL); - spin_unlock_irqrestore(&mac->lock, flags); + /* FIXME: we need to know the network here. that requires a bit of restructuring */ + ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_TIMEOUT, NULL); } /* Sends out a disassociation request to the desired AP */ -void -ieee80211softmac_send_disassoc_req(struct ieee80211softmac_device *mac, u16 reason) +static void +ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason) { + unsigned long flags; struct ieee80211softmac_network *found; if (mac->associnfo.bssvalid && mac->associated) { found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid); if (found) ieee80211softmac_send_mgt_frame(mac, found, IEEE80211_STYPE_DISASSOC, reason); + } else if (mac->associnfo.associating) { + cancel_delayed_work(&mac->associnfo.timeout); } - ieee80211softmac_disassoc(mac); + /* Change our state */ + spin_lock_irqsave(&mac->lock, flags); + /* Do NOT clear bssvalid as that will break ieee80211softmac_assoc_work! */ + mac->associated = 0; + mac->associnfo.associating = 0; + ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL); + spin_unlock_irqrestore(&mac->lock, flags); } static inline int we_support_all_basic_rates(struct ieee80211softmac_device *mac, u8 *from, u8 from_len) { - int idx; - u8 rate; + int idx, search, found; + u8 rate, search_rate; for (idx = 0; idx < (from_len); idx++) { rate = (from)[idx]; if (!(rate & IEEE80211_BASIC_RATE_MASK)) continue; + found = 0; rate &= ~IEEE80211_BASIC_RATE_MASK; - if (!ieee80211softmac_ratesinfo_rate_supported(&mac->ratesinfo, rate)) + for (search = 0; search < mac->ratesinfo.count; search++) { + search_rate = mac->ratesinfo.rates[search]; + search_rate &= ~IEEE80211_BASIC_RATE_MASK; + if (rate == search_rate) { + found = 1; + break; + } + } + if (!found) return 0; } return 1; @@ -164,28 +163,12 @@ network_matches_request(struct ieee80211softmac_device *mac, struct ieee80211_ne } static void -ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context) +ieee80211softmac_assoc_notify(struct net_device *dev, void *context) { struct ieee80211softmac_device *mac = ieee80211_priv(dev); ieee80211softmac_assoc_work((void*)mac); } -static void -ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, void *context) -{ - struct ieee80211softmac_device *mac = ieee80211_priv(dev); - - switch (event_type) { - case IEEE80211SOFTMAC_EVENT_AUTHENTICATED: - ieee80211softmac_assoc_work((void*)mac); - break; - case IEEE80211SOFTMAC_EVENT_AUTH_FAILED: - case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT: - ieee80211softmac_disassoc(mac); - break; - } -} - /* This function is called to handle userspace requests (asynchronously) */ void ieee80211softmac_assoc_work(void *d) @@ -193,22 +176,14 @@ ieee80211softmac_assoc_work(void *d) struct ieee80211softmac_device *mac = (struct ieee80211softmac_device *)d; struct ieee80211softmac_network *found = NULL; struct ieee80211_network *net = NULL, *best = NULL; - int bssvalid; unsigned long flags; - - /* ieee80211_disassoc might clear this */ - bssvalid = mac->associnfo.bssvalid; - + /* meh */ if (mac->associated) - ieee80211softmac_send_disassoc_req(mac, WLAN_REASON_DISASSOC_STA_HAS_LEFT); - - spin_lock_irqsave(&mac->lock, flags); - mac->associnfo.associating = 1; - spin_unlock_irqrestore(&mac->lock, flags); + ieee80211softmac_disassoc(mac, WLAN_REASON_DISASSOC_STA_HAS_LEFT); /* try to find the requested network in our list, if we found one already */ - if (bssvalid || mac->associnfo.bssfixed) + if (mac->associnfo.bssvalid || mac->associnfo.bssfixed) found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid); /* Search the ieee80211 networks for this network if we didn't find it by bssid, @@ -269,7 +244,7 @@ ieee80211softmac_assoc_work(void *d) * Maybe we can hope to have more memory after scanning finishes ;) */ dprintk(KERN_INFO PFX "Associate: Scanning for networks first.\n"); - ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify_scan, NULL); + ieee80211softmac_notify(mac->dev, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, ieee80211softmac_assoc_notify, NULL); if (ieee80211softmac_start_scan(mac)) dprintk(KERN_INFO PFX "Associate: failed to initiate scan. Is device up?\n"); return; @@ -299,32 +274,19 @@ ieee80211softmac_assoc_work(void *d) memcpy(mac->associnfo.associate_essid.data, found->essid.data, IW_ESSID_MAX_SIZE + 1); /* we found a network! authenticate (if necessary) and associate to it. */ - if (found->authenticating) { - dprintk(KERN_INFO PFX "Already requested authentication, waiting...\n"); - if(!mac->associnfo.assoc_wait) { - mac->associnfo.assoc_wait = 1; - ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify_auth, NULL, GFP_KERNEL); - } - return; - } - if (!found->authenticated && !found->authenticating) { + if (!found->authenticated) { /* This relies on the fact that _auth_req only queues the work, * otherwise adding the notification would be racy. */ if (!ieee80211softmac_auth_req(mac, found)) { - if(!mac->associnfo.assoc_wait) { - dprintk(KERN_INFO PFX "Cannot associate without being authenticated, requested authentication\n"); - mac->associnfo.assoc_wait = 1; - ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify_auth, NULL, GFP_KERNEL); - } + dprintk(KERN_INFO PFX "cannot associate without being authenticated, requested authentication\n"); + ieee80211softmac_notify_internal(mac, IEEE80211SOFTMAC_EVENT_ANY, found, ieee80211softmac_assoc_notify, NULL, GFP_KERNEL); } else { printkl(KERN_WARNING PFX "Not authenticated, but requesting authentication failed. Giving up to associate\n"); - mac->associnfo.assoc_wait = 0; ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_FAILED, found); } return; } /* finally! now we can start associating */ - mac->associnfo.assoc_wait = 0; ieee80211softmac_assoc(mac, found); } @@ -335,9 +297,6 @@ ieee80211softmac_associated(struct ieee80211softmac_device *mac, struct ieee80211softmac_network *net) { mac->associnfo.associating = 0; - mac->associnfo.supported_rates = net->supported_rates; - ieee80211softmac_recalc_txrates(mac); - mac->associated = 1; if (mac->set_bssid_filter) mac->set_bssid_filter(mac->dev, net->bssid); @@ -421,6 +380,7 @@ ieee80211softmac_handle_disassoc(struct net_device * dev, struct ieee80211_disassoc *disassoc) { struct ieee80211softmac_device *mac = ieee80211_priv(dev); + unsigned long flags; if (unlikely(!mac->running)) return -ENODEV; @@ -432,11 +392,14 @@ ieee80211softmac_handle_disassoc(struct net_device * dev, return 0; dprintk(KERN_INFO PFX "got disassoc frame\n"); - ieee80211softmac_disassoc(mac); - - /* try to reassociate */ + netif_carrier_off(dev); + spin_lock_irqsave(&mac->lock, flags); + mac->associnfo.bssvalid = 0; + mac->associated = 0; + ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_DISASSOCIATED, NULL); schedule_work(&mac->associnfo.work); - + spin_unlock_irqrestore(&mac->lock, flags); + return 0; } diff --git a/net/ieee80211/softmac/ieee80211softmac_auth.c b/net/ieee80211/softmac/ieee80211softmac_auth.c index 4cef39e17..06e332624 100644 --- a/net/ieee80211/softmac/ieee80211softmac_auth.c +++ b/net/ieee80211/softmac/ieee80211softmac_auth.c @@ -36,9 +36,8 @@ ieee80211softmac_auth_req(struct ieee80211softmac_device *mac, struct ieee80211softmac_auth_queue_item *auth; unsigned long flags; - if (net->authenticating || net->authenticated) + if (net->authenticating) return 0; - net->authenticating = 1; /* Add the network if it's not already added */ ieee80211softmac_add_network(mac, net); @@ -93,6 +92,7 @@ ieee80211softmac_auth_queue(void *data) return; } net->authenticated = 0; + net->authenticating = 1; /* add a timeout call so we eventually give up waiting for an auth reply */ schedule_delayed_work(&auth->work, IEEE80211SOFTMAC_AUTH_TIMEOUT); auth->retry--; @@ -107,7 +107,6 @@ ieee80211softmac_auth_queue(void *data) printkl(KERN_WARNING PFX "Authentication timed out with "MAC_FMT"\n", MAC_ARG(net->bssid)); /* Remove this item from the queue */ spin_lock_irqsave(&mac->lock, flags); - net->authenticating = 0; ieee80211softmac_call_events_locked(mac, IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT, net); cancel_delayed_work(&auth->work); /* just to make sure... */ list_del(&auth->list); @@ -116,16 +115,6 @@ ieee80211softmac_auth_queue(void *data) kfree(auth); } -/* Sends a response to an auth challenge (for shared key auth). */ -static void -ieee80211softmac_auth_challenge_response(void *_aq) -{ - struct ieee80211softmac_auth_queue_item *aq = _aq; - - /* Send our response */ - ieee80211softmac_send_mgt_frame(aq->mac, aq->net, IEEE80211_STYPE_AUTH, aq->state); -} - /* Handle the auth response from the AP * This should be registered with ieee80211 as handle_auth */ @@ -207,35 +196,29 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth) case IEEE80211SOFTMAC_AUTH_SHARED_CHALLENGE: /* Check to make sure we have a challenge IE */ data = (u8 *)auth->info_element; - if (*data++ != MFIE_TYPE_CHALLENGE) { + if(*data++ != MFIE_TYPE_CHALLENGE){ printkl(KERN_NOTICE PFX "Shared Key Authentication failed due to a missing challenge.\n"); break; } /* Save the challenge */ spin_lock_irqsave(&mac->lock, flags); net->challenge_len = *data++; - if (net->challenge_len > WLAN_AUTH_CHALLENGE_LEN) + if(net->challenge_len > WLAN_AUTH_CHALLENGE_LEN) net->challenge_len = WLAN_AUTH_CHALLENGE_LEN; - if (net->challenge != NULL) + if(net->challenge != NULL) kfree(net->challenge); net->challenge = kmalloc(net->challenge_len, GFP_ATOMIC); memcpy(net->challenge, data, net->challenge_len); aq->state = IEEE80211SOFTMAC_AUTH_SHARED_RESPONSE; - - /* We reuse the work struct from the auth request here. - * It is safe to do so as each one is per-request, and - * at this point (dealing with authentication response) - * we have obviously already sent the initial auth - * request. */ - cancel_delayed_work(&aq->work); - INIT_WORK(&aq->work, &ieee80211softmac_auth_challenge_response, (void *)aq); - schedule_work(&aq->work); spin_unlock_irqrestore(&mac->lock, flags); - return 0; + + /* Switch to correct channel for this network */ + mac->set_channel(mac->dev, net->channel); + + /* Send our response (How to encrypt?) */ + ieee80211softmac_send_mgt_frame(mac, aq->net, IEEE80211_STYPE_AUTH, aq->state); + break; case IEEE80211SOFTMAC_AUTH_SHARED_PASS: - kfree(net->challenge); - net->challenge = NULL; - net->challenge_len = 0; /* Check the status code of the response */ switch(auth->status) { case WLAN_STATUS_SUCCESS: @@ -246,7 +229,6 @@ ieee80211softmac_auth_resp(struct net_device *dev, struct ieee80211_auth *auth) spin_unlock_irqrestore(&mac->lock, flags); printkl(KERN_NOTICE PFX "Shared Key Authentication completed with "MAC_FMT"\n", MAC_ARG(net->bssid)); - ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_AUTHENTICATED, net); break; default: printkl(KERN_NOTICE PFX "Shared Key Authentication with "MAC_FMT" failed, error code: %i\n", @@ -297,9 +279,6 @@ ieee80211softmac_deauth_from_net(struct ieee80211softmac_device *mac, struct list_head *list_ptr; unsigned long flags; - /* deauthentication implies disassociation */ - ieee80211softmac_disassoc(mac); - /* Lock and reset status flags */ spin_lock_irqsave(&mac->lock, flags); net->authenticating = 0; diff --git a/net/ieee80211/softmac/ieee80211softmac_event.c b/net/ieee80211/softmac/ieee80211softmac_event.c index f34fa2ef6..8cc8f3f0f 100644 --- a/net/ieee80211/softmac/ieee80211softmac_event.c +++ b/net/ieee80211/softmac/ieee80211softmac_event.c @@ -38,8 +38,7 @@ * The event context is private and can only be used from * within this module. Its meaning varies with the event * type: - * SCAN_FINISHED, - * DISASSOCIATED: NULL + * SCAN_FINISHED: no special meaning * ASSOCIATED, * ASSOCIATE_FAILED, * ASSOCIATE_TIMEOUT, @@ -60,15 +59,15 @@ */ static char *event_descriptions[IEEE80211SOFTMAC_EVENT_LAST+1] = { - NULL, /* scan finished */ - NULL, /* associated */ + "scan finished", + "associated", "associating failed", "associating timed out", "authenticated", "authenticating failed", "authenticating timed out", "associating failed because no suitable network was found", - NULL, /* disassociated */ + "disassociated", }; @@ -78,7 +77,7 @@ ieee80211softmac_notify_callback(void *d) struct ieee80211softmac_event event = *(struct ieee80211softmac_event*) d; kfree(d); - event.fun(event.mac->dev, event.event_type, event.context); + event.fun(event.mac->dev, event.context); } int @@ -137,24 +136,30 @@ ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, int eve int we_event; char *msg = NULL; - memset(&wrqu, '\0', sizeof (union iwreq_data)); - switch(event) { case IEEE80211SOFTMAC_EVENT_ASSOCIATED: network = (struct ieee80211softmac_network *)event_ctx; + wrqu.data.length = 0; + wrqu.data.flags = 0; memcpy(wrqu.ap_addr.sa_data, &network->bssid[0], ETH_ALEN); - /* fall through */ + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + we_event = SIOCGIWAP; + break; case IEEE80211SOFTMAC_EVENT_DISASSOCIATED: + wrqu.data.length = 0; + wrqu.data.flags = 0; + memset(&wrqu, '\0', sizeof (union iwreq_data)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; we_event = SIOCGIWAP; break; case IEEE80211SOFTMAC_EVENT_SCAN_FINISHED: + wrqu.data.length = 0; + wrqu.data.flags = 0; + memset(&wrqu, '\0', sizeof (union iwreq_data)); we_event = SIOCGIWSCAN; break; default: msg = event_descriptions[event]; - if (!msg) - msg = "SOFTMAC EVENT BUG"; wrqu.data.length = strlen(msg); we_event = IWEVCUSTOM; break; @@ -167,9 +172,6 @@ ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, int eve if ((eventptr->event_type == event || eventptr->event_type == -1) && (eventptr->event_context == NULL || eventptr->event_context == event_ctx)) { list_del(&eventptr->list); - /* User may have subscribed to ANY event, so - * we tell them which event triggered it. */ - eventptr->event_type = event; schedule_work(&eventptr->work); } } diff --git a/net/ieee80211/softmac/ieee80211softmac_io.c b/net/ieee80211/softmac/ieee80211softmac_io.c index 3b67d1976..cc6cd56c8 100644 --- a/net/ieee80211/softmac/ieee80211softmac_io.c +++ b/net/ieee80211/softmac/ieee80211softmac_io.c @@ -96,7 +96,8 @@ ieee80211softmac_alloc_mgt(u32 size) if(size > IEEE80211_DATA_LEN) return NULL; /* Allocate the frame */ - data = kzalloc(size, GFP_ATOMIC); + data = kmalloc(size, GFP_ATOMIC); + memset(data, 0, size); return data; } @@ -148,56 +149,6 @@ ieee80211softmac_hdr_3addr(struct ieee80211softmac_device *mac, * shouldn't the sequence number be in ieee80211? */ } -static u16 -ieee80211softmac_capabilities(struct ieee80211softmac_device *mac, - struct ieee80211softmac_network *net) -{ - u16 capability = 0; - - /* ESS and IBSS bits are set according to the current mode */ - switch (mac->ieee->iw_mode) { - case IW_MODE_INFRA: - capability = cpu_to_le16(WLAN_CAPABILITY_ESS); - break; - case IW_MODE_ADHOC: - capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); - break; - case IW_MODE_AUTO: - capability = net->capabilities & - (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS); - break; - default: - /* bleh. we don't ever go to these modes */ - printk(KERN_ERR PFX "invalid iw_mode!\n"); - break; - } - - /* CF Pollable / CF Poll Request */ - /* Needs to be implemented, for now, the 0's == not supported */ - - /* Privacy Bit */ - capability |= mac->ieee->sec.level ? - cpu_to_le16(WLAN_CAPABILITY_PRIVACY) : 0; - - /* Short Preamble */ - /* Always supported: we probably won't ever be powering devices which - * dont support this... */ - capability |= WLAN_CAPABILITY_SHORT_PREAMBLE; - - /* PBCC */ - /* Not widely used */ - - /* Channel Agility */ - /* Not widely used */ - - /* Short Slot */ - /* Will be implemented later */ - - /* DSSS-OFDM */ - /* Not widely used */ - - return capability; -} /***************************************************************************** * Create Management packets @@ -228,9 +179,27 @@ ieee80211softmac_assoc_req(struct ieee80211_assoc_request **pkt, return 0; ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_ASSOC_REQ, net->bssid, net->bssid); - /* Fill in the capabilities */ - (*pkt)->capability = ieee80211softmac_capabilities(mac, net); - + /* Fill in capability Info */ + switch (mac->ieee->iw_mode) { + case IW_MODE_INFRA: + (*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_ESS); + break; + case IW_MODE_ADHOC: + (*pkt)->capability = cpu_to_le16(WLAN_CAPABILITY_IBSS); + break; + case IW_MODE_AUTO: + (*pkt)->capability = net->capabilities & (WLAN_CAPABILITY_ESS|WLAN_CAPABILITY_IBSS); + break; + default: + /* bleh. we don't ever go to these modes */ + printk(KERN_ERR PFX "invalid iw_mode!\n"); + break; + } + /* Need to add this + (*pkt)->capability |= mac->ieee->short_slot ? + cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME) : 0; + */ + (*pkt)->capability |= mac->ieee->sec.level ? cpu_to_le16(WLAN_CAPABILITY_PRIVACY) : 0; /* Fill in Listen Interval (?) */ (*pkt)->listen_interval = cpu_to_le16(10); @@ -270,9 +239,17 @@ ieee80211softmac_reassoc_req(struct ieee80211_reassoc_request **pkt, return 0; ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_REASSOC_REQ, net->bssid, net->bssid); - /* Fill in the capabilities */ - (*pkt)->capability = ieee80211softmac_capabilities(mac, net); - + /* Fill in capability Info */ + (*pkt)->capability = mac->ieee->iw_mode == IW_MODE_MASTER ? + cpu_to_le16(WLAN_CAPABILITY_ESS) : + cpu_to_le16(WLAN_CAPABILITY_IBSS); + /* + (*pkt)->capability |= mac->ieee->short_slot ? + cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME) : 0; + */ + (*pkt)->capability |= mac->ieee->sec.level ? + cpu_to_le16(WLAN_CAPABILITY_PRIVACY) : 0; + /* Fill in Listen Interval (?) */ (*pkt)->listen_interval = cpu_to_le16(10); /* Fill in the current AP MAC */ @@ -291,27 +268,26 @@ ieee80211softmac_reassoc_req(struct ieee80211_reassoc_request **pkt, static u32 ieee80211softmac_auth(struct ieee80211_auth **pkt, struct ieee80211softmac_device *mac, struct ieee80211softmac_network *net, - u16 transaction, u16 status, int *encrypt_mpdu) + u16 transaction, u16 status) { u8 *data; - int auth_mode = mac->ieee->sec.auth_mode; - int is_shared_response = (auth_mode == WLAN_AUTH_SHARED_KEY - && transaction == IEEE80211SOFTMAC_AUTH_SHARED_RESPONSE); - /* Allocate Packet */ (*pkt) = (struct ieee80211_auth *)ieee80211softmac_alloc_mgt( 2 + /* Auth Algorithm */ 2 + /* Auth Transaction Seq */ 2 + /* Status Code */ /* Challenge Text IE */ - (is_shared_response ? 1 + 1 + net->challenge_len : 0) - ); + mac->ieee->open_wep ? 0 : + 1 + 1 + WLAN_AUTH_CHALLENGE_LEN + ); if (unlikely((*pkt) == NULL)) return 0; ieee80211softmac_hdr_3addr(mac, &((*pkt)->header), IEEE80211_STYPE_AUTH, net->bssid, net->bssid); /* Algorithm */ - (*pkt)->algorithm = cpu_to_le16(auth_mode); + (*pkt)->algorithm = mac->ieee->open_wep ? + cpu_to_le16(WLAN_AUTH_OPEN) : + cpu_to_le16(WLAN_AUTH_SHARED_KEY); /* Transaction */ (*pkt)->transaction = cpu_to_le16(transaction); /* Status */ @@ -319,20 +295,18 @@ ieee80211softmac_auth(struct ieee80211_auth **pkt, data = (u8 *)(*pkt)->info_element; /* Challenge Text */ - if (is_shared_response) { + if(!mac->ieee->open_wep){ *data = MFIE_TYPE_CHALLENGE; data++; /* Copy the challenge in */ - *data = net->challenge_len; - data++; - memcpy(data, net->challenge, net->challenge_len); - data += net->challenge_len; - - /* Make sure this frame gets encrypted with the shared key */ - *encrypt_mpdu = 1; - } else - *encrypt_mpdu = 0; + // *data = challenge length + // data += sizeof(u16); + // memcpy(data, challenge, challenge length); + // data += challenge length; + + /* Add the full size to the packet length */ + } /* Return the packet size */ return (data - (u8 *)(*pkt)); @@ -422,7 +396,6 @@ ieee80211softmac_send_mgt_frame(struct ieee80211softmac_device *mac, { void *pkt = NULL; u32 pkt_size = 0; - int encrypt_mpdu = 0; switch(type) { case IEEE80211_STYPE_ASSOC_REQ: @@ -432,7 +405,7 @@ ieee80211softmac_send_mgt_frame(struct ieee80211softmac_device *mac, pkt_size = ieee80211softmac_reassoc_req((struct ieee80211_reassoc_request **)(&pkt), mac, (struct ieee80211softmac_network *)ptrarg); break; case IEEE80211_STYPE_AUTH: - pkt_size = ieee80211softmac_auth((struct ieee80211_auth **)(&pkt), mac, (struct ieee80211softmac_network *)ptrarg, (u16)(arg & 0xFFFF), (u16) (arg >> 16), &encrypt_mpdu); + pkt_size = ieee80211softmac_auth((struct ieee80211_auth **)(&pkt), mac, (struct ieee80211softmac_network *)ptrarg, (u16)(arg & 0xFFFF), (u16) (arg >> 16)); break; case IEEE80211_STYPE_DISASSOC: case IEEE80211_STYPE_DEAUTH: @@ -461,8 +434,52 @@ ieee80211softmac_send_mgt_frame(struct ieee80211softmac_device *mac, * or get rid of it alltogether? * Does this work for you now? */ - ieee80211_tx_frame(mac->ieee, (struct ieee80211_hdr *)pkt, - IEEE80211_3ADDR_LEN, pkt_size, encrypt_mpdu); + ieee80211_tx_frame(mac->ieee, (struct ieee80211_hdr *)pkt, pkt_size); + + kfree(pkt); + return 0; +} + + +/* Create an rts/cts frame */ +static u32 +ieee80211softmac_rts_cts(struct ieee80211_hdr_2addr **pkt, + struct ieee80211softmac_device *mac, struct ieee80211softmac_network *net, + u32 type) +{ + /* Allocate Packet */ + (*pkt) = kmalloc(IEEE80211_2ADDR_LEN, GFP_ATOMIC); + memset(*pkt, 0, IEEE80211_2ADDR_LEN); + if((*pkt) == NULL) + return 0; + ieee80211softmac_hdr_2addr(mac, (*pkt), type, net->bssid); + return IEEE80211_2ADDR_LEN; +} + + +/* Sends a control packet */ +static int +ieee80211softmac_send_ctl_frame(struct ieee80211softmac_device *mac, + struct ieee80211softmac_network *net, u32 type, u32 arg) +{ + void *pkt = NULL; + u32 pkt_size = 0; + + switch(type) { + case IEEE80211_STYPE_RTS: + case IEEE80211_STYPE_CTS: + pkt_size = ieee80211softmac_rts_cts((struct ieee80211_hdr_2addr **)(&pkt), mac, net, type); + break; + default: + printkl(KERN_DEBUG PFX "Unsupported Control Frame type: %i\n", type); + return -EINVAL; + } + + if(pkt_size == 0) + return -ENOMEM; + + /* Send the packet to the ieee80211 layer for tx */ + ieee80211_tx_frame(mac->ieee, (struct ieee80211_hdr *) pkt, pkt_size); kfree(pkt); return 0; diff --git a/net/ieee80211/softmac/ieee80211softmac_module.c b/net/ieee80211/softmac/ieee80211softmac_module.c index 4b2e57d12..6252be2c0 100644 --- a/net/ieee80211/softmac/ieee80211softmac_module.c +++ b/net/ieee80211/softmac/ieee80211softmac_module.c @@ -26,7 +26,6 @@ #include "ieee80211softmac_priv.h" #include -#include struct net_device *alloc_ieee80211softmac(int sizeof_priv) { @@ -62,6 +61,14 @@ struct net_device *alloc_ieee80211softmac(int sizeof_priv) softmac->wait_for_scan = ieee80211softmac_wait_for_scan_implementation; softmac->stop_scan = ieee80211softmac_stop_scan_implementation; + //TODO: The mcast rate has to be assigned dynamically somewhere (in scanning, association. Not sure...) + // It has to be set to the highest rate all stations in the current network can handle. + softmac->txrates.mcast_rate = IEEE80211_CCK_RATE_1MB; + softmac->txrates.mcast_fallback = IEEE80211_CCK_RATE_1MB; + /* This is reassigned in ieee80211softmac_start to sane values. */ + softmac->txrates.default_rate = IEEE80211_CCK_RATE_1MB; + softmac->txrates.default_fallback = IEEE80211_CCK_RATE_1MB; + /* to start with, we can't send anything ... */ netif_carrier_off(dev); @@ -163,82 +170,15 @@ static void ieee80211softmac_start_check_rates(struct ieee80211softmac_device *m } } -int ieee80211softmac_ratesinfo_rate_supported(struct ieee80211softmac_ratesinfo *ri, u8 rate) -{ - int search; - u8 search_rate; - - for (search = 0; search < ri->count; search++) { - search_rate = ri->rates[search]; - search_rate &= ~IEEE80211_BASIC_RATE_MASK; - if (rate == search_rate) - return 1; - } - - return 0; -} - -/* Finds the highest rate which is: - * 1. Present in ri (optionally a basic rate) - * 2. Supported by the device - * 3. Less than or equal to the user-defined rate - */ -static u8 highest_supported_rate(struct ieee80211softmac_device *mac, - struct ieee80211softmac_ratesinfo *ri, int basic_only) -{ - u8 user_rate = mac->txrates.user_rate; - int i; - - if (ri->count == 0) { - dprintk(KERN_ERR PFX "empty ratesinfo?\n"); - return IEEE80211_CCK_RATE_1MB; - } - - for (i = ri->count - 1; i >= 0; i--) { - u8 rate = ri->rates[i]; - if (basic_only && !(rate & IEEE80211_BASIC_RATE_MASK)) - continue; - rate &= ~IEEE80211_BASIC_RATE_MASK; - if (rate > user_rate) - continue; - if (ieee80211softmac_ratesinfo_rate_supported(&mac->ratesinfo, rate)) - return rate; - } - - /* If we haven't found a suitable rate by now, just trust the user */ - return user_rate; -} - -void ieee80211softmac_recalc_txrates(struct ieee80211softmac_device *mac) -{ - struct ieee80211softmac_txrates *txrates = &mac->txrates; - struct ieee80211softmac_txrates oldrates; - u32 change = 0; - - if (mac->txrates_change) - oldrates = mac->txrates; - - change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; - txrates->default_rate = highest_supported_rate(mac, &mac->associnfo.supported_rates, 0); - - change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; - txrates->default_fallback = lower_rate(mac, txrates->default_rate); - - change |= IEEE80211SOFTMAC_TXRATECHG_MCAST; - txrates->mcast_rate = highest_supported_rate(mac, &mac->associnfo.supported_rates, 1); - - if (mac->txrates_change) - mac->txrates_change(mac->dev, change, &oldrates); - -} - -void ieee80211softmac_init_txrates(struct ieee80211softmac_device *mac) +void ieee80211softmac_start(struct net_device *dev) { + struct ieee80211softmac_device *mac = ieee80211_priv(dev); struct ieee80211_device *ieee = mac->ieee; u32 change = 0; - struct ieee80211softmac_txrates *txrates = &mac->txrates; struct ieee80211softmac_txrates oldrates; + ieee80211softmac_start_check_rates(mac); + /* TODO: We need some kind of state machine to lower the default rates * if we loose too many packets. */ @@ -253,37 +193,22 @@ void ieee80211softmac_init_txrates(struct ieee80211softmac_device *mac) more reliable. Note similar logic in ieee80211softmac_wx_set_rate() */ if (ieee->modulation & IEEE80211_CCK_MODULATION) { - txrates->user_rate = IEEE80211_CCK_RATE_11MB; + mac->txrates.default_rate = IEEE80211_CCK_RATE_11MB; + change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; + mac->txrates.default_fallback = IEEE80211_CCK_RATE_5MB; + change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; } else if (ieee->modulation & IEEE80211_OFDM_MODULATION) { - txrates->user_rate = IEEE80211_OFDM_RATE_54MB; + mac->txrates.default_rate = IEEE80211_OFDM_RATE_54MB; + change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; + mac->txrates.default_fallback = IEEE80211_OFDM_RATE_24MB; + change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; } else assert(0); - - txrates->default_rate = IEEE80211_CCK_RATE_1MB; - change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; - - txrates->default_fallback = IEEE80211_CCK_RATE_1MB; - change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; - - txrates->mcast_rate = IEEE80211_CCK_RATE_1MB; - change |= IEEE80211SOFTMAC_TXRATECHG_MCAST; - - txrates->mgt_mcast_rate = IEEE80211_CCK_RATE_1MB; - change |= IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST; - if (mac->txrates_change) - mac->txrates_change(mac->dev, change, &oldrates); + mac->txrates_change(dev, change, &oldrates); mac->running = 1; } - -void ieee80211softmac_start(struct net_device *dev) -{ - struct ieee80211softmac_device *mac = ieee80211_priv(dev); - - ieee80211softmac_start_check_rates(mac); - ieee80211softmac_init_txrates(mac); -} EXPORT_SYMBOL_GPL(ieee80211softmac_start); void ieee80211softmac_stop(struct net_device *dev) diff --git a/net/ieee80211/softmac/ieee80211softmac_priv.h b/net/ieee80211/softmac/ieee80211softmac_priv.h index fa1f8e3ac..65d9816c8 100644 --- a/net/ieee80211/softmac/ieee80211softmac_priv.h +++ b/net/ieee80211/softmac/ieee80211softmac_priv.h @@ -116,10 +116,7 @@ ieee80211softmac_get_network_by_essid(struct ieee80211softmac_device *mac, struct ieee80211softmac_essid *essid); /* Rates related */ -int ieee80211softmac_ratesinfo_rate_supported(struct ieee80211softmac_ratesinfo *ri, u8 rate); u8 ieee80211softmac_lower_rate_delta(struct ieee80211softmac_device *mac, u8 rate, int delta); -void ieee80211softmac_init_txrates(struct ieee80211softmac_device *mac); -void ieee80211softmac_recalc_txrates(struct ieee80211softmac_device *mac); static inline u8 lower_rate(struct ieee80211softmac_device *mac, u8 rate) { return ieee80211softmac_lower_rate_delta(mac, rate, 1); } @@ -153,8 +150,6 @@ int ieee80211softmac_handle_disassoc(struct net_device * dev, int ieee80211softmac_handle_reassoc_req(struct net_device * dev, struct ieee80211_reassoc_request * reassoc); void ieee80211softmac_assoc_timeout(void *d); -void ieee80211softmac_send_disassoc_req(struct ieee80211softmac_device *mac, u16 reason); -void ieee80211softmac_disassoc(struct ieee80211softmac_device *mac); /* some helper functions */ static inline int ieee80211softmac_scan_handlers_check_self(struct ieee80211softmac_device *sm) diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c index ad67368b5..d31cf7749 100644 --- a/net/ieee80211/softmac/ieee80211softmac_scan.c +++ b/net/ieee80211/softmac/ieee80211softmac_scan.c @@ -47,6 +47,7 @@ ieee80211softmac_start_scan(struct ieee80211softmac_device *sm) sm->scanning = 1; spin_unlock_irqrestore(&sm->lock, flags); + netif_tx_disable(sm->ieee->dev); ret = sm->start_scan(sm->dev); if (ret) { spin_lock_irqsave(&sm->lock, flags); @@ -247,6 +248,7 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm) if (net) sm->set_channel(sm->dev, net->channel); } + netif_wake_queue(sm->ieee->dev); ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL); } EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished); diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c index 75320b684..27edb2b55 100644 --- a/net/ieee80211/softmac/ieee80211softmac_wx.c +++ b/net/ieee80211/softmac/ieee80211softmac_wx.c @@ -70,44 +70,12 @@ ieee80211softmac_wx_set_essid(struct net_device *net_dev, char *extra) { struct ieee80211softmac_device *sm = ieee80211_priv(net_dev); - struct ieee80211softmac_network *n; - struct ieee80211softmac_auth_queue_item *authptr; int length = 0; unsigned long flags; - - /* Check if we're already associating to this or another network - * If it's another network, cancel and start over with our new network - * If it's our network, ignore the change, we're already doing it! - */ - if((sm->associnfo.associating || sm->associated) && - (data->essid.flags && data->essid.length && extra)) { - /* Get the associating network */ - n = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid); - if(n && n->essid.len == (data->essid.length - 1) && - !memcmp(n->essid.data, extra, n->essid.len)) { - dprintk(KERN_INFO PFX "Already associating or associated to "MAC_FMT"\n", - MAC_ARG(sm->associnfo.bssid)); - return 0; - } else { - dprintk(KERN_INFO PFX "Canceling existing associate request!\n"); - spin_lock_irqsave(&sm->lock,flags); - /* Cancel assoc work */ - cancel_delayed_work(&sm->associnfo.work); - /* We don't have to do this, but it's a little cleaner */ - list_for_each_entry(authptr, &sm->auth_queue, list) - cancel_delayed_work(&authptr->work); - sm->associnfo.bssvalid = 0; - sm->associnfo.bssfixed = 0; - spin_unlock_irqrestore(&sm->lock,flags); - flush_scheduled_work(); - } - } - - + spin_lock_irqsave(&sm->lock, flags); - + sm->associnfo.static_essid = 0; - sm->associnfo.assoc_wait = 0; if (data->essid.flags && data->essid.length && extra /*required?*/) { length = min(data->essid.length - 1, IW_ESSID_MAX_SIZE); @@ -243,8 +211,8 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev, if (is_ofdm && !(ieee->modulation & IEEE80211_OFDM_MODULATION)) goto out_unlock; - mac->txrates.user_rate = rate; - ieee80211softmac_recalc_txrates(mac); + mac->txrates.default_rate = rate; + mac->txrates.default_fallback = lower_rate(mac, rate); err = 0; out_unlock: @@ -420,7 +388,7 @@ ieee80211softmac_wx_set_genie(struct net_device *dev, memcpy(mac->wpa.IE, extra, wrqu->data.length); dprintk(KERN_INFO PFX "generic IE set to "); for (i=0;idata.length;i++) - dprintk("%.2x", (u8)mac->wpa.IE[i]); + dprintk("%.2x", mac->wpa.IE[i]); dprintk("\n"); mac->wpa.IElen = wrqu->data.length; } else { @@ -463,35 +431,3 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, } EXPORT_SYMBOL_GPL(ieee80211softmac_wx_get_genie); -int -ieee80211softmac_wx_set_mlme(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, - char *extra) -{ - struct ieee80211softmac_device *mac = ieee80211_priv(dev); - struct iw_mlme *mlme = (struct iw_mlme *)extra; - u16 reason = cpu_to_le16(mlme->reason_code); - struct ieee80211softmac_network *net; - - if (memcmp(mac->associnfo.bssid, mlme->addr.sa_data, ETH_ALEN)) { - printk(KERN_DEBUG PFX "wx_set_mlme: requested operation on net we don't use\n"); - return -EINVAL; - } - - switch (mlme->cmd) { - case IW_MLME_DEAUTH: - net = ieee80211softmac_get_network_by_bssid_locked(mac, mlme->addr.sa_data); - if (!net) { - printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n"); - return -EINVAL; - } - return ieee80211softmac_deauth_req(mac, net, reason); - case IW_MLME_DISASSOC: - ieee80211softmac_send_disassoc_req(mac, reason); - return 0; - default: - return -EOPNOTSUPP; - } -} -EXPORT_SYMBOL_GPL(ieee80211softmac_wx_set_mlme); diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index ff4872242..e2c848df6 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -414,24 +414,6 @@ config INET_TUNNEL tristate default n -config INET_XFRM_MODE_TRANSPORT - tristate "IP: IPsec transport mode" - default y - select XFRM - ---help--- - Support for IPsec transport mode. - - If unsure, say Y. - -config INET_XFRM_MODE_TUNNEL - tristate "IP: IPsec tunnel mode" - default y - select XFRM - ---help--- - Support for IPsec tunnel mode. - - If unsure, say Y. - config INET_DIAG tristate "INET: socket monitoring interface" default y @@ -550,28 +532,6 @@ config TCP_CONG_SCALABLE properties, though is known to have fairness issues. See http://www-lce.eng.cam.ac.uk/~ctk21/scalable/ -config TCP_CONG_LP - tristate "TCP Low Priority" - depends on EXPERIMENTAL - default n - ---help--- - TCP Low Priority (TCP-LP), a distributed algorithm whose goal is - to utiliza only the excess network bandwidth as compared to the - ``fair share`` of bandwidth as targeted by TCP. - See http://www-ece.rice.edu/networks/TCP-LP/ - -config TCP_CONG_VENO - tristate "TCP Veno" - depends on EXPERIMENTAL - default n - ---help--- - TCP Veno is a sender-side only enhancement of TCP to obtain better - throughput over wireless networks. TCP Veno makes use of state - distinguishing to circumvent the difficult judgment of the packet loss - type. TCP Veno cuts down less congestion window in response to random - loss packets. - See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf - endmenu config TCP_CONG_BIC diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index 4878fc5be..9ef50a0b9 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -24,8 +24,6 @@ obj-$(CONFIG_INET_ESP) += esp4.o obj-$(CONFIG_INET_IPCOMP) += ipcomp.o obj-$(CONFIG_INET_XFRM_TUNNEL) += xfrm4_tunnel.o obj-$(CONFIG_INET_TUNNEL) += tunnel4.o -obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o -obj-$(CONFIG_INET_XFRM_MODE_TUNNEL) += xfrm4_mode_tunnel.o obj-$(CONFIG_IP_PNP) += ipconfig.o obj-$(CONFIG_IP_ROUTE_MULTIPATH_RR) += multipath_rr.o obj-$(CONFIG_IP_ROUTE_MULTIPATH_RANDOM) += multipath_random.o @@ -36,7 +34,6 @@ obj-$(CONFIG_IP_VS) += ipvs/ obj-$(CONFIG_INET_DIAG) += inet_diag.o obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o obj-$(CONFIG_INET_TCP_DIAG) += tcp_diag.o -obj-$(CONFIG_NET_TCPPROBE) += tcp_probe.o obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o obj-$(CONFIG_TCP_CONG_CUBIC) += tcp_cubic.o obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o @@ -44,9 +41,7 @@ obj-$(CONFIG_TCP_CONG_HSTCP) += tcp_highspeed.o obj-$(CONFIG_TCP_CONG_HYBLA) += tcp_hybla.o obj-$(CONFIG_TCP_CONG_HTCP) += tcp_htcp.o obj-$(CONFIG_TCP_CONG_VEGAS) += tcp_vegas.o -obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o -obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ xfrm4_output.o diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 5537aebec..7351fa14d 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -67,6 +67,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -1200,15 +1201,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) int ihl; int id; - if (unlikely(skb_shinfo(skb)->gso_type & - ~(SKB_GSO_TCPV4 | - SKB_GSO_UDP | - SKB_GSO_DODGY | - SKB_GSO_TCP_ECN | - 0))) - goto out; - - if (unlikely(!pskb_may_pull(skb, sizeof(*iph)))) + if (!pskb_may_pull(skb, sizeof(*iph))) goto out; iph = skb->nh.iph; @@ -1216,7 +1209,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) if (ihl < sizeof(*iph)) goto out; - if (unlikely(!pskb_may_pull(skb, ihl))) + if (!pskb_may_pull(skb, ihl)) goto out; skb->h.raw = __skb_pull(skb, ihl); @@ -1227,7 +1220,7 @@ static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) rcu_read_lock(); ops = rcu_dereference(inet_protos[proto]); - if (likely(ops && ops->gso_segment)) + if (ops && ops->gso_segment) segs = ops->gso_segment(skb, features); rcu_read_unlock(); diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 1366bc6ce..e2e4771fa 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -118,7 +119,6 @@ error: static int ah_input(struct xfrm_state *x, struct sk_buff *skb) { int ah_hlen; - int ihl; struct iphdr *iph; struct ip_auth_hdr *ah; struct ah_data *ahp; @@ -149,14 +149,13 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) ah = (struct ip_auth_hdr*)skb->data; iph = skb->nh.iph; - ihl = skb->data - skb->nh.raw; - memcpy(work_buf, iph, ihl); + memcpy(work_buf, iph, iph->ihl*4); iph->ttl = 0; iph->tos = 0; iph->frag_off = 0; iph->check = 0; - if (ihl > sizeof(*iph)) { + if (iph->ihl != 5) { u32 dummy; if (ip_clear_mutable_options(iph, &dummy)) goto out; @@ -165,7 +164,7 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) u8 auth_data[MAX_AH_AUTH_LEN]; memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len); - skb_push(skb, ihl); + skb_push(skb, skb->data - skb->nh.raw); ahp->icv(ahp, skb, ah->auth_data); if (memcmp(ah->auth_data, auth_data, ahp->icv_trunc_len)) { x->stats.integrity_failed++; @@ -173,8 +172,11 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb) } } ((struct iphdr*)work_buf)->protocol = ah->nexthdr; - skb->h.raw = memcpy(skb->nh.raw += ah_hlen, work_buf, ihl); - __skb_pull(skb, ah_hlen + ihl); + skb->nh.raw = skb_pull(skb, ah_hlen); + memcpy(skb->nh.raw, work_buf, iph->ihl*4); + skb->nh.iph->tot_len = htons(skb->len); + skb_pull(skb, skb->nh.iph->ihl*4); + skb->h.raw = skb->data; return 0; @@ -215,10 +217,12 @@ static int ah_init_state(struct xfrm_state *x) if (x->encap) goto error; - ahp = kzalloc(sizeof(*ahp), GFP_KERNEL); + ahp = kmalloc(sizeof(*ahp), GFP_KERNEL); if (ahp == NULL) return -ENOMEM; + memset(ahp, 0, sizeof(*ahp)); + ahp->key = x->aalg->alg_key; ahp->key_len = (x->aalg->alg_key_len+7)/8; ahp->tfm = crypto_alloc_tfm(x->aalg->alg_name, 0); diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index c8a3723bc..4749d504c 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -1372,11 +1373,12 @@ static int arp_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct neigh_seq_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct neigh_seq_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; + memset(s, 0, sizeof(*s)); rc = seq_open(file, &arp_seq_ops); if (rc) goto out_kfree; diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c index ec5da4fbd..c1b42b525 100644 --- a/net/ipv4/datagram.c +++ b/net/ipv4/datagram.c @@ -11,6 +11,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index dc62b7816..f7b5ddd6e 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -27,6 +27,7 @@ * if no match found. */ +#include #include #include @@ -93,9 +94,10 @@ static void devinet_sysctl_unregister(struct ipv4_devconf *p); static struct in_ifaddr *inet_alloc_ifa(void) { - struct in_ifaddr *ifa = kzalloc(sizeof(*ifa), GFP_KERNEL); + struct in_ifaddr *ifa = kmalloc(sizeof(*ifa), GFP_KERNEL); if (ifa) { + memset(ifa, 0, sizeof(*ifa)); INIT_RCU_HEAD(&ifa->rcu_head); } @@ -139,9 +141,10 @@ struct in_device *inetdev_init(struct net_device *dev) ASSERT_RTNL(); - in_dev = kzalloc(sizeof(*in_dev), GFP_KERNEL); + in_dev = kmalloc(sizeof(*in_dev), GFP_KERNEL); if (!in_dev) goto out; + memset(in_dev, 0, sizeof(*in_dev)); INIT_RCU_HEAD(&in_dev->rcu_head); memcpy(&in_dev->cnf, &ipv4_devconf_dflt, sizeof(in_dev->cnf)); in_dev->cnf.sysctl = NULL; diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index fc2f8ce44..9d1881c07 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -142,9 +143,10 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) int alen = esp->auth.icv_trunc_len; int elen = skb->len - sizeof(struct ip_esp_hdr) - esp->conf.ivlen - alen; int nfrags; - int ihl; + int encap_len = 0; u8 nexthdr[2]; struct scatterlist *sg; + u8 workbuf[60]; int padlen; if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr))) @@ -175,6 +177,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) skb->ip_summed = CHECKSUM_NONE; esph = (struct ip_esp_hdr*)skb->data; + iph = skb->nh.iph; /* Get ivec. This can be wrong, check against another impls. */ if (esp->conf.ivlen) @@ -201,12 +204,12 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) /* ... check padding bits here. Silly. :-) */ - iph = skb->nh.iph; - ihl = iph->ihl * 4; - if (x->encap) { struct xfrm_encap_tmpl *encap = x->encap; - struct udphdr *uh = (void *)(skb->nh.raw + ihl); + struct udphdr *uh; + + uh = (struct udphdr *)(iph + 1); + encap_len = (void*)esph - (void*)uh; /* * 1) if the NAT-T peer's IP or port changed then @@ -243,7 +246,11 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) iph->protocol = nexthdr[1]; pskb_trim(skb, skb->len - alen - padlen - 2); - skb->h.raw = __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen) - ihl; + memcpy(workbuf, skb->nh.raw, iph->ihl*4); + 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); + skb->nh.iph->tot_len = htons(skb->len); return 0; @@ -316,10 +323,12 @@ static int esp_init_state(struct xfrm_state *x) if (x->ealg == NULL) goto error; - esp = kzalloc(sizeof(*esp), GFP_KERNEL); + esp = kmalloc(sizeof(*esp), GFP_KERNEL); if (esp == NULL) return -ENOMEM; + memset(esp, 0, sizeof(*esp)); + if (x->aalg) { struct xfrm_algo_desc *aalg_desc; diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index ba2a70745..cdde96390 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -665,4 +666,3 @@ void __init ip_fib_init(void) } EXPORT_SYMBOL(inet_addr_type); -EXPORT_SYMBOL(ip_dev_find); diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 6350e2974..c9b54bbea 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -204,10 +205,11 @@ static struct fn_zone * fn_new_zone(struct fn_hash *table, int z) { int i; - struct fn_zone *fz = kzalloc(sizeof(struct fn_zone), GFP_KERNEL); + struct fn_zone *fz = kmalloc(sizeof(struct fn_zone), GFP_KERNEL); if (!fz) return NULL; + memset(fz, 0, sizeof(struct fn_zone)); if (z) { fz->fz_divisor = 16; } else { @@ -1048,7 +1050,7 @@ static int fib_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct fib_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct fib_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -1059,6 +1061,7 @@ static int fib_seq_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index 79b04718b..a66c96a25 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c @@ -19,6 +19,7 @@ * Marc Boucher : routing by fwmark */ +#include #include #include #include @@ -196,9 +197,10 @@ int inet_rtm_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) } } - new_r = kzalloc(sizeof(*new_r), GFP_KERNEL); + new_r = kmalloc(sizeof(*new_r), GFP_KERNEL); if (!new_r) return -ENOMEM; + memset(new_r, 0, sizeof(*new_r)); if (rta[RTA_SRC-1]) memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 4); diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 51738000f..1de08c186 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -709,10 +710,11 @@ fib_create_info(const struct rtmsg *r, struct kern_rta *rta, goto failure; } - fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); + fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); if (fi == NULL) goto failure; fib_info_cnt++; + memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct fib_nh)); fi->fib_protocol = r->rtm_protocol; @@ -961,6 +963,10 @@ fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, rtm->rtm_protocol = fi->fib_protocol; if (fi->fib_priority) RTA_PUT(skb, RTA_PRIORITY, 4, &fi->fib_priority); +#ifdef CONFIG_NET_CLS_ROUTE + if (fi->fib_nh[0].nh_tclassid) + RTA_PUT(skb, RTA_FLOW, 4, &fi->fib_nh[0].nh_tclassid); +#endif if (rtnetlink_put_metrics(skb, fi->fib_metrics) < 0) goto rtattr_failure; if (fi->fib_prefsrc) @@ -970,10 +976,6 @@ fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, RTA_PUT(skb, RTA_GATEWAY, 4, &fi->fib_nh->nh_gw); if (fi->fib_nh->nh_oif) RTA_PUT(skb, RTA_OIF, sizeof(int), &fi->fib_nh->nh_oif); -#ifdef CONFIG_NET_CLS_ROUTE - if (fi->fib_nh[0].nh_tclassid) - RTA_PUT(skb, RTA_FLOW, 4, &fi->fib_nh[0].nh_tclassid); -#endif } #ifdef CONFIG_IP_ROUTE_MULTIPATH if (fi->fib_nhs > 1) { @@ -992,10 +994,6 @@ fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, nhp->rtnh_ifindex = nh->nh_oif; if (nh->nh_gw) RTA_PUT(skb, RTA_GATEWAY, 4, &nh->nh_gw); -#ifdef CONFIG_NET_CLS_ROUTE - if (nh->nh_tclassid) - RTA_PUT(skb, RTA_FLOW, 4, &nh->nh_tclassid); -#endif nhp->rtnh_len = skb->tail - (unsigned char*)nhp; } endfor_nexthops(fi); mp_head->rta_type = RTA_MULTIPATH; diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 01801c0f8..95a639f2e 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -52,6 +52,7 @@ #define VERSION "0.407" +#include #include #include #include @@ -1252,8 +1253,8 @@ fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta, */ if (!fa_head) { - err = 0; fa_head = fib_insert_node(t, &err, key, plen); + err = 0; if (err) goto out_free_new_fa; } @@ -1281,18 +1282,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l, struct fib_result *res) { int err, i; - __be32 mask; + t_key mask; struct leaf_info *li; struct hlist_head *hhead = &l->list; struct hlist_node *node; hlist_for_each_entry_rcu(li, node, hhead, hlist) { i = li->plen; - mask = inet_make_mask(i); - if (l->key != (key & ntohl(mask))) + mask = ntohl(inet_make_mask(i)); + if (l->key != (key & mask)) continue; - if ((err = fib_semantic_match(&li->falh, flp, res, htonl(l->key), mask, i)) <= 0) { + if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) { *plen = i; #ifdef CONFIG_IP_FIB_TRIE_STATS t->stats.semantic_match_passed++; diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 58ad168d5..26a140547 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -64,6 +64,7 @@ * */ +#include #include #include #include @@ -729,6 +730,7 @@ out_err: static void icmp_redirect(struct sk_buff *skb) { struct iphdr *iph; + unsigned long ip; if (skb->len < sizeof(struct iphdr)) goto out_err; @@ -740,6 +742,7 @@ static void icmp_redirect(struct sk_buff *skb) goto out; iph = (struct iphdr *)skb->data; + ip = iph->daddr; switch (skb->h.icmph->code & 7) { case ICMP_REDIR_NET: @@ -749,8 +752,7 @@ static void icmp_redirect(struct sk_buff *skb) */ case ICMP_REDIR_HOST: case ICMP_REDIR_HOSTTOS: - ip_rt_redirect(skb->nh.iph->saddr, iph->daddr, - skb->h.icmph->un.gateway, + ip_rt_redirect(skb->nh.iph->saddr, ip, skb->h.icmph->un.gateway, iph->saddr, skb->dev); break; } diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 8e8117c19..d512239a1 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -72,6 +72,7 @@ * Vinay Kulkarni */ +#include #include #include #include @@ -1028,9 +1029,10 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im) * for deleted items allows change reports to use common code with * non-deleted or query-response MCA's. */ - pmc = kzalloc(sizeof(*pmc), GFP_KERNEL); + pmc = kmalloc(sizeof(*pmc), GFP_KERNEL); if (!pmc) return; + memset(pmc, 0, sizeof(*pmc)); spin_lock_bh(&im->lock); pmc->interface = im->interface; in_dev_hold(in_dev); @@ -1528,9 +1530,10 @@ static int ip_mc_add1_src(struct ip_mc_list *pmc, int sfmode, psf_prev = psf; } if (!psf) { - psf = kzalloc(sizeof(*psf), GFP_ATOMIC); + psf = kmalloc(sizeof(*psf), GFP_ATOMIC); if (!psf) return -ENOBUFS; + memset(psf, 0, sizeof(*psf)); psf->sf_inaddr = *psfsrc; if (psf_prev) { psf_prev->sf_next = psf; @@ -1793,35 +1796,29 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr) struct in_device *in_dev; u32 group = imr->imr_multiaddr.s_addr; u32 ifindex; - int ret = -EADDRNOTAVAIL; rtnl_lock(); in_dev = ip_mc_find_dev(imr); + if (!in_dev) { + rtnl_unlock(); + return -ENODEV; + } ifindex = imr->imr_ifindex; for (imlp = &inet->mc_list; (iml = *imlp) != NULL; imlp = &iml->next) { - if (iml->multi.imr_multiaddr.s_addr != group) - continue; - if (ifindex) { - if (iml->multi.imr_ifindex != ifindex) - continue; - } else if (imr->imr_address.s_addr && imr->imr_address.s_addr != - iml->multi.imr_address.s_addr) - continue; - - (void) ip_mc_leave_src(sk, iml, in_dev); + if (iml->multi.imr_multiaddr.s_addr == group && + iml->multi.imr_ifindex == ifindex) { + (void) ip_mc_leave_src(sk, iml, in_dev); - *imlp = iml->next; + *imlp = iml->next; - if (in_dev) ip_mc_dec_group(in_dev, group); - rtnl_unlock(); - sock_kfree_s(sk, iml, sizeof(*iml)); - return 0; + rtnl_unlock(); + sock_kfree_s(sk, iml, sizeof(*iml)); + return 0; + } } - if (!in_dev) - ret = -ENODEV; rtnl_unlock(); - return ret; + return -EADDRNOTAVAIL; } int ip_mc_source(int add, int omode, struct sock *sk, struct @@ -2205,13 +2202,13 @@ void ip_mc_drop_socket(struct sock *sk) struct in_device *in_dev; inet->mc_list = iml->next; - in_dev = inetdev_by_index(iml->multi.imr_ifindex); - (void) ip_mc_leave_src(sk, iml, in_dev); - if (in_dev != NULL) { + if ((in_dev = inetdev_by_index(iml->multi.imr_ifindex)) != NULL) { + (void) ip_mc_leave_src(sk, iml, in_dev); ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr); in_dev_put(in_dev); } sock_kfree_s(sk, iml, sizeof(*iml)); + } rtnl_unlock(); } @@ -2364,7 +2361,7 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v) } seq_printf(seq, - "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n", + "\t\t\t\t%08lX %5d %d:%08lX\t\t%d\n", im->multiaddr, im->users, im->tm_running, im->tm_running ? jiffies_to_clock_t(im->timer.expires-jiffies) : 0, @@ -2384,7 +2381,7 @@ static int igmp_mc_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct igmp_mc_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct igmp_mc_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -2394,6 +2391,7 @@ static int igmp_mc_seq_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: @@ -2558,7 +2556,7 @@ static int igmp_mcf_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct igmp_mcf_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct igmp_mcf_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -2568,6 +2566,7 @@ static int igmp_mcf_seq_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 7a262aa5d..826f9744f 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -13,6 +13,7 @@ * 2 of the License, or(at your option) any later version. */ +#include #include #include diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 06df7806b..03cfe8fb4 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c @@ -11,6 +11,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -915,10 +916,11 @@ static int __init inet_diag_init(void) sizeof(struct inet_diag_handler *)); int err = -ENOMEM; - inet_diag_table = kzalloc(inet_diag_table_size, GFP_KERNEL); + inet_diag_table = kmalloc(inet_diag_table_size, GFP_KERNEL); if (!inet_diag_table) goto out; + memset(inet_diag_table, 0, inet_diag_table_size); idiagnl = netlink_kernel_create(NETLINK_INET_DIAG, 0, inet_diag_rcv, THIS_MODULE); if (idiagnl == NULL) diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 19829f508..1de39062d 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -13,6 +13,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index cdd805344..417f126c7 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -8,6 +8,7 @@ * From code orinally in TCP */ +#include #include #include diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 03ff62ebc..2160874ce 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c @@ -86,7 +86,7 @@ static struct inet_peer *peer_root = peer_avl_empty; static DEFINE_RWLOCK(peer_pool_lock); #define PEER_MAXDEPTH 40 /* sufficient for about 2^27 nodes */ -static int peer_total; +static volatile int peer_total; /* Exported for sysctl_net_ipv4. */ int inet_peer_threshold = 65536 + 128; /* start to throw entries more * aggressively at this stage */ diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index a22d11d29..9f0bb529a 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c @@ -21,6 +21,7 @@ * Mike McLagan : Routing by source */ +#include #include #include #include diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index b84b53a47..da734c439 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 0f9b3a319..ab99bebdc 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -617,6 +618,7 @@ static int ipgre_rcv(struct sk_buff *skb) skb->mac.raw = skb->nh.raw; skb->nh.raw = __pskb_pull(skb, offset); skb_postpull_rcsum(skb, skb->h.raw, offset); + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); skb->pkt_type = PACKET_HOST; #ifdef CONFIG_NET_IPGRE_BROADCAST if (MULTICAST(iph->daddr)) { diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index b0495c5b6..595d0bfde 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c @@ -121,6 +121,7 @@ #include #include #include +#include #include #include @@ -428,9 +429,6 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, goto drop; } - /* Remove any debris in the socket control block */ - memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); - return NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, dev, NULL, ip_rcv_finish); diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 406056edc..cbcae6544 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -256,6 +256,7 @@ int ip_options_compile(struct ip_options * opt, struct sk_buff * skb) if (!opt) { opt = &(IPCB(skb)->opt); + memset(opt, 0, sizeof(struct ip_options)); iph = skb->nh.raw; opt->optlen = ((struct iphdr *)iph)->ihl*4 - sizeof(struct iphdr); optptr = iph + sizeof(struct iphdr); diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index a2ede167e..20b17047c 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -408,7 +409,6 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) nf_bridge_get(to->nf_bridge); #endif #endif - skb_copy_secmark(to, from); } /* @@ -440,7 +440,6 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) iph = skb->nh.iph; if (unlikely((iph->frag_off & htons(IP_DF)) && !skb->local_df)) { - IP_INC_STATS(IPSTATS_MIB_FRAGFAILS); icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(dst_mtu(&rt->u.dst))); kfree_skb(skb); @@ -527,8 +526,6 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) err = output(skb); - if (!err) - IP_INC_STATS(IPSTATS_MIB_FRAGCREATES); if (err || !frag) break; @@ -652,6 +649,9 @@ slow_path: /* * Put this fragment into the sending queue. */ + + IP_INC_STATS(IPSTATS_MIB_FRAGCREATES); + iph->tot_len = htons(len + hlen); ip_send_check(iph); @@ -659,8 +659,6 @@ slow_path: err = output(skb2); if (err) goto fail; - - IP_INC_STATS(IPSTATS_MIB_FRAGCREATES); } kfree_skb(skb); IP_INC_STATS(IPSTATS_MIB_FRAGOKS); @@ -745,7 +743,7 @@ static inline int ip_ufo_append_data(struct sock *sk, if (!err) { /* specify the length of each IP datagram fragment*/ skb_shinfo(skb)->gso_size = mtu - fragheaderlen; - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; + skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; __skb_queue_tail(&sk->sk_write_queue, skb); return 0; @@ -1090,7 +1088,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, if ((sk->sk_protocol == IPPROTO_UDP) && (rt->u.dst.dev->features & NETIF_F_UFO)) { skb_shinfo(skb)->gso_size = mtu - fragheaderlen; - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; + skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; } diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 2d05c4133..12e0bf19f 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -17,6 +17,7 @@ * Mike McLagan : Routing by source */ +#include #include #include #include @@ -112,19 +113,14 @@ static void ip_cmsg_recv_retopts(struct msghdr *msg, struct sk_buff *skb) static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb) { char *secdata; - u32 seclen, secid; + u32 seclen; int err; - err = security_socket_getpeersec_dgram(NULL, skb, &secid); - if (err) - return; - - err = security_secid_to_secctx(secid, &secdata, &seclen); + err = security_socket_getpeersec_dgram(skb, &secdata, &seclen); if (err) return; put_cmsg(msg, SOL_IP, SCM_SECURITY, seclen, secdata); - security_release_secctx(secdata, seclen); } diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index a0c28b2b7..098d103ec 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c @@ -13,6 +13,7 @@ * - Compression stats. * - Adaptive compression. */ +#include #include #include #include @@ -44,6 +45,7 @@ static LIST_HEAD(ipcomp_tfms_list); static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb) { int err, plen, dlen; + struct iphdr *iph; struct ipcomp_data *ipcd = x->data; u8 *start, *scratch; struct crypto_tfm *tfm; @@ -70,9 +72,10 @@ static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb) if (err) goto out; - skb->truesize += dlen - plen; - __skb_put(skb, dlen - plen); + skb_put(skb, dlen - plen); memcpy(skb->data, scratch, dlen); + iph = skb->nh.iph; + iph->tot_len = htons(dlen + iph->ihl * 4); out: put_cpu(); return err; @@ -80,9 +83,14 @@ out: static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) { + u8 nexthdr; int err = -ENOMEM; struct iphdr *iph; - struct ip_comp_hdr *ipch; + union { + struct iphdr iph; + char buf[60]; + } tmp_iph; + if (skb_linearize_cow(skb)) goto out; @@ -91,10 +99,15 @@ static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) /* Remove ipcomp header and decompress original payload */ iph = skb->nh.iph; - ipch = (void *)skb->data; - iph->protocol = ipch->nexthdr; - skb->h.raw = skb->nh.raw + sizeof(*ipch); - __skb_pull(skb, sizeof(*ipch)); + memcpy(&tmp_iph, iph, iph->ihl * 4); + nexthdr = *(u8 *)skb->data; + skb_pull(skb, sizeof(struct ip_comp_hdr)); + skb->nh.raw += sizeof(struct ip_comp_hdr); + memcpy(skb->nh.raw, &tmp_iph, tmp_iph.iph.ihl * 4); + iph = skb->nh.iph; + iph->tot_len = htons(ntohs(iph->tot_len) - sizeof(struct ip_comp_hdr)); + iph->protocol = nexthdr; + skb->h.raw = skb->data; err = ipcomp_decompress(x, skb); out: @@ -410,10 +423,11 @@ static int ipcomp_init_state(struct xfrm_state *x) goto out; err = -ENOMEM; - ipcd = kzalloc(sizeof(*ipcd), GFP_KERNEL); + ipcd = kmalloc(sizeof(*ipcd), GFP_KERNEL); if (!ipcd) goto out; + memset(ipcd, 0, sizeof(*ipcd)); x->props.header_len = 0; if (x->props.mode) x->props.header_len += sizeof(struct iphdr); diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 1fbb38415..cb8a92f18 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -31,6 +31,7 @@ * -- Josef Siemes , Aug 2002 */ +#include #include #include #include diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 76ab50b0d..ea398ee43 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -94,6 +94,7 @@ #include +#include #include #include #include @@ -487,6 +488,7 @@ static int ipip_rcv(struct sk_buff *skb) skb->mac.raw = skb->nh.raw; skb->nh.raw = skb->data; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); skb->protocol = htons(ETH_P_IP); skb->pkt_type = PACKET_HOST; diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 85893eef6..717ab7d6d 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -28,6 +28,7 @@ * */ +#include #include #include #include @@ -1461,6 +1462,7 @@ int pim_rcv_v1(struct sk_buff * skb) skb_pull(skb, (u8*)encap - skb->data); skb->nh.iph = (struct iphdr *)skb->data; skb->dev = reg_dev; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); skb->protocol = htons(ETH_P_IP); skb->ip_summed = 0; skb->pkt_type = PACKET_HOST; @@ -1516,6 +1518,7 @@ static int pim_rcv(struct sk_buff * skb) skb_pull(skb, (u8*)encap - skb->data); skb->nh.iph = (struct iphdr *)skb->data; skb->dev = reg_dev; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); skb->protocol = htons(ETH_P_IP); skb->ip_summed = 0; skb->pkt_type = PACKET_HOST; @@ -1578,7 +1581,6 @@ int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait) cache = ipmr_cache_find(rt->rt_src, rt->rt_dst); if (cache==NULL) { - struct sk_buff *skb2; struct net_device *dev; int vif; @@ -1592,18 +1594,12 @@ int ipmr_get_route(struct sk_buff *skb, struct rtmsg *rtm, int nowait) read_unlock(&mrt_lock); return -ENODEV; } - skb2 = skb_clone(skb, GFP_ATOMIC); - if (!skb2) { - read_unlock(&mrt_lock); - return -ENOMEM; - } - - skb2->nh.raw = skb_push(skb2, sizeof(struct iphdr)); - skb2->nh.iph->ihl = sizeof(struct iphdr)>>2; - skb2->nh.iph->saddr = rt->rt_src; - skb2->nh.iph->daddr = rt->rt_dst; - skb2->nh.iph->version = 0; - err = ipmr_cache_unresolved(vif, skb2); + skb->nh.raw = skb_push(skb, sizeof(struct iphdr)); + skb->nh.iph->ihl = sizeof(struct iphdr)>>2; + skb->nh.iph->saddr = rt->rt_src; + skb->nh.iph->daddr = rt->rt_dst; + skb->nh.iph->version = 0; + err = ipmr_cache_unresolved(vif, skb); read_unlock(&mrt_lock); return err; } diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c index f5946352c..3f47ad8e1 100644 --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c @@ -813,16 +813,6 @@ ip_vs_out(unsigned int hooknum, struct sk_buff **pskb, skb->nh.iph->saddr = cp->vaddr; ip_send_check(skb->nh.iph); - /* For policy routing, packets originating from this - * machine itself may be routed differently to packets - * passing through. We want this packet to be routed as - * if it came from this machine itself. So re-compute - * the routing information. - */ - if (ip_route_me_harder(pskb, RTN_LOCAL) != 0) - goto drop; - skb = *pskb; - IP_VS_DBG_PKT(10, pp, skb, 0, "After SNAT"); ip_vs_out_stats(cp, skb); diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 6a28fafe9..f28ec6882 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c @@ -735,11 +735,12 @@ ip_vs_new_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest, if (atype != RTN_LOCAL && atype != RTN_UNICAST) return -EINVAL; - dest = kzalloc(sizeof(struct ip_vs_dest), GFP_ATOMIC); + dest = kmalloc(sizeof(struct ip_vs_dest), GFP_ATOMIC); if (dest == NULL) { IP_VS_ERR("ip_vs_new_dest: kmalloc failed.\n"); return -ENOMEM; } + memset(dest, 0, sizeof(struct ip_vs_dest)); dest->protocol = svc->protocol; dest->vaddr = svc->addr; @@ -1049,12 +1050,14 @@ ip_vs_add_service(struct ip_vs_service_user *u, struct ip_vs_service **svc_p) goto out_mod_dec; } - svc = kzalloc(sizeof(struct ip_vs_service), GFP_ATOMIC); + svc = (struct ip_vs_service *) + kmalloc(sizeof(struct ip_vs_service), GFP_ATOMIC); if (svc == NULL) { IP_VS_DBG(1, "ip_vs_add_service: kmalloc failed.\n"); ret = -ENOMEM; goto out_err; } + memset(svc, 0, sizeof(struct ip_vs_service)); /* I'm the first user of the service */ atomic_set(&svc->usecnt, 1); @@ -1794,7 +1797,7 @@ static int ip_vs_info_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct ip_vs_iter *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct ip_vs_iter *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -1805,6 +1808,7 @@ static int ip_vs_info_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: diff --git a/net/ipv4/ipvs/ip_vs_est.c b/net/ipv4/ipvs/ip_vs_est.c index 7d68b80c4..c453e1e57 100644 --- a/net/ipv4/ipvs/ip_vs_est.c +++ b/net/ipv4/ipvs/ip_vs_est.c @@ -13,6 +13,7 @@ * Changes: * */ +#include #include #include #include @@ -123,10 +124,11 @@ int ip_vs_new_estimator(struct ip_vs_stats *stats) { struct ip_vs_estimator *est; - est = kzalloc(sizeof(*est), GFP_KERNEL); + est = kmalloc(sizeof(*est), GFP_KERNEL); if (est == NULL) return -ENOMEM; + memset(est, 0, sizeof(*est)); est->stats = stats; est->last_conns = stats->conns; est->cps = stats->cps<<10; diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c index 37fafb1fb..a19a33ceb 100644 --- a/net/ipv4/ipvs/ip_vs_ftp.c +++ b/net/ipv4/ipvs/ip_vs_ftp.c @@ -46,7 +46,14 @@ */ static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; module_param_array(ports, int, NULL, 0); -MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands"); + +/* + * Debug level + */ +#ifdef CONFIG_IP_VS_DEBUG +static int debug=0; +module_param(debug, int, 0); +#endif /* Dummy variable */ @@ -170,7 +177,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, &start, &end) != 1) return 1; - IP_VS_DBG(7, "PASV response (%u.%u.%u.%u:%d) -> " + IP_VS_DBG(1-debug, "PASV response (%u.%u.%u.%u:%d) -> " "%u.%u.%u.%u:%d detected\n", NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); @@ -273,7 +280,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, while (data <= data_limit - 6) { if (strnicmp(data, "PASV\r\n", 6) == 0) { /* Passive mode on */ - IP_VS_DBG(7, "got PASV at %zd of %zd\n", + IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", data - data_start, data_limit - data_start); cp->app_data = &ip_vs_ftp_pasv; @@ -295,7 +302,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, &start, &end) != 1) return 1; - IP_VS_DBG(7, "PORT %u.%u.%u.%u:%d detected\n", + IP_VS_DBG(1-debug, "PORT %u.%u.%u.%u:%d detected\n", NIPQUAD(to), ntohs(port)); /* Passive mode off */ @@ -304,7 +311,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, /* * Now update or create a connection entry for it */ - IP_VS_DBG(7, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", + IP_VS_DBG(1-debug, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", ip_vs_proto_name(iph->protocol), NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); @@ -365,17 +372,11 @@ static int __init ip_vs_ftp_init(void) for (i=0; i 0xffff) { - IP_VS_WARNING("ip_vs_ftp: Ignoring invalid " - "configuration port[%d] = %d\n", - i, ports[i]); - continue; - } ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); if (ret) break; - IP_VS_INFO("%s: loaded support on port[%d] = %d\n", - app->name, i, ports[i]); + IP_VS_DBG(1-debug, "%s: loaded support on port[%d] = %d\n", + app->name, i, ports[i]); } if (ret) diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index b05034945..1bca714bd 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c @@ -836,7 +836,7 @@ static int fork_sync_thread(void *startup) int start_sync_thread(int state, char *mcast_ifn, __u8 syncid) { - DECLARE_COMPLETION_ONSTACK(startup); + DECLARE_COMPLETION(startup); pid_t pid; if ((state == IP_VS_STATE_MASTER && sync_master_pid) || diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c index 252e837b1..db67373f9 100644 --- a/net/ipv4/multipath_drr.c +++ b/net/ipv4/multipath_drr.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/multipath_random.c b/net/ipv4/multipath_random.c index b8c289f24..5249dbe7c 100644 --- a/net/ipv4/multipath_random.c +++ b/net/ipv4/multipath_random.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/multipath_rr.c b/net/ipv4/multipath_rr.c index bba5abe55..b6cd28704 100644 --- a/net/ipv4/multipath_rr.c +++ b/net/ipv4/multipath_rr.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c index d25ec4ae0..342d0b909 100644 --- a/net/ipv4/multipath_wrandom.c +++ b/net/ipv4/multipath_wrandom.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index 327ba3718..6a9e34b79 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c @@ -8,7 +8,7 @@ #include /* route_me_harder function, used by iptable_nat, iptable_mangle + ip_queue */ -int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type) +int ip_route_me_harder(struct sk_buff **pskb) { struct iphdr *iph = (*pskb)->nh.iph; struct rtable *rt; @@ -16,13 +16,10 @@ int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type) struct dst_entry *odst; unsigned int hh_len; - if (addr_type == RTN_UNSPEC) - addr_type = inet_addr_type(iph->saddr); - /* some non-standard hacks like ipt_REJECT.c:send_reset() can cause * packets with foreign saddr to appear on the NF_IP_LOCAL_OUT hook. */ - if (addr_type == RTN_LOCAL) { + if (inet_addr_type(iph->saddr) == RTN_LOCAL) { fl.nl_u.ip4_u.daddr = iph->daddr; fl.nl_u.ip4_u.saddr = iph->saddr; fl.nl_u.ip4_u.tos = RT_TOS(iph->tos); @@ -159,7 +156,7 @@ static int nf_ip_reroute(struct sk_buff **pskb, const struct nf_info *info) if (!(iph->tos == rt_info->tos && iph->daddr == rt_info->daddr && iph->saddr == rt_info->saddr)) - return ip_route_me_harder(pskb, RTN_UNSPEC); + return ip_route_me_harder(pskb); } return 0; } diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index a43ed1aee..5da114edf 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig @@ -55,18 +55,6 @@ config IP_NF_CONNTRACK_MARK of packets, but this mark value is kept in the conntrack session instead of the individual packets. -config IP_NF_CONNTRACK_SECMARK - bool 'Connection tracking security mark support' - depends on IP_NF_CONNTRACK && NETWORK_SECMARK - help - This option enables security markings to be applied to - connections. Typically they are copied to connections from - packets using the CONNSECMARK target and copied back from - connections to packets with the same target, with the packets - being originally labeled via SECMARK. - - If unsure, say 'N'. - config IP_NF_CONNTRACK_EVENTS bool "Connection tracking events (EXPERIMENTAL)" depends on EXPERIMENTAL && IP_NF_CONNTRACK @@ -154,8 +142,6 @@ config IP_NF_TFTP config IP_NF_AMANDA tristate "Amanda backup protocol support" depends on IP_NF_CONNTRACK - select TEXTSEARCH - select TEXTSEARCH_KMP help If you are running the Amanda backup package on this machine or machines that will be MASQUERADED through this @@ -195,26 +181,14 @@ config IP_NF_H323 With this module you can support H.323 on a connection tracking/NAT firewall. - This module supports RAS, Fast Start, H.245 Tunnelling, Call - Forwarding, RTP/RTCP and T.120 based audio, video, fax, chat, - whiteboard, file transfer, etc. For more information, please - visit http://nath323.sourceforge.net/. + This module supports RAS, Fast-start, H.245 tunnelling, RTP/RTCP + and T.120 based data and applications including audio, video, FAX, + chat, whiteboard, file transfer, etc. For more information, please + see http://nath323.sourceforge.net/. If you want to compile it as a module, say 'M' here and read Documentation/modules.txt. If unsure, say 'N'. -config IP_NF_SIP - tristate "SIP protocol support (EXPERIMENTAL)" - depends on IP_NF_CONNTRACK && EXPERIMENTAL - help - SIP is an application-layer control protocol that can establish, - modify, and terminate multimedia sessions (conferences) such as - Internet telephony calls. With the ip_conntrack_sip and - the ip_nat_sip modules you can support the protocol on a connection - tracking/NATing firewall. - - To compile it as a module, choose M here. If unsure, say Y. - config IP_NF_QUEUE tristate "IP Userspace queueing via NETLINK (OBSOLETE)" help @@ -332,7 +306,7 @@ config IP_NF_MATCH_HASHLIMIT help This option adds a new iptables `hashlimit' match. - As opposed to `limit', this match dynamically creates a hash table + As opposed to `limit', this match dynamically crates a hash table of limit buckets, based on your selection of source/destination ip addresses and/or ports. @@ -527,12 +501,6 @@ config IP_NF_NAT_H323 default IP_NF_NAT if IP_NF_H323=y default m if IP_NF_H323=m -config IP_NF_NAT_SIP - tristate - depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n - default IP_NF_NAT if IP_NF_SIP=y - default m if IP_NF_SIP=m - # mangle + specific targets config IP_NF_MANGLE tristate "Packet mangling" diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile index 943e54f12..751fe0ce2 100644 --- a/net/ipv4/netfilter/Makefile +++ b/net/ipv4/netfilter/Makefile @@ -31,7 +31,6 @@ obj-$(CONFIG_IP_NF_AMANDA) += ip_conntrack_amanda.o obj-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp.o obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o obj-$(CONFIG_IP_NF_IRC) += ip_conntrack_irc.o -obj-$(CONFIG_IP_NF_SIP) += ip_conntrack_sip.o obj-$(CONFIG_IP_NF_NETBIOS_NS) += ip_conntrack_netbios_ns.o # NAT helpers @@ -41,7 +40,6 @@ obj-$(CONFIG_IP_NF_NAT_AMANDA) += ip_nat_amanda.o obj-$(CONFIG_IP_NF_NAT_TFTP) += ip_nat_tftp.o obj-$(CONFIG_IP_NF_NAT_FTP) += ip_nat_ftp.o obj-$(CONFIG_IP_NF_NAT_IRC) += ip_nat_irc.o -obj-$(CONFIG_IP_NF_NAT_SIP) += ip_nat_sip.o # generic IP tables obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 8ba83e898..92adfebec 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -380,13 +381,6 @@ static int mark_source_chains(struct xt_table_info *newinfo, && unconditional(&e->arp)) { unsigned int oldpos, size; - if (t->verdict < -NF_MAX_VERDICT - 1) { - duprintf("mark_source_chains: bad " - "negative verdict (%i)\n", - t->verdict); - return 0; - } - /* Return: backtrack through the last * big jump. */ @@ -416,14 +410,6 @@ static int mark_source_chains(struct xt_table_info *newinfo, if (strcmp(t->target.u.user.name, ARPT_STANDARD_TARGET) == 0 && newpos >= 0) { - if (newpos > newinfo->size - - sizeof(struct arpt_entry)) { - duprintf("mark_source_chains: " - "bad verdict (%i)\n", - newpos); - return 0; - } - /* This a jump; chase it. */ duprintf("Jump rule %u -> %u\n", pos, newpos); @@ -446,6 +432,8 @@ static int mark_source_chains(struct xt_table_info *newinfo, static inline int standard_check(const struct arpt_entry_target *t, unsigned int max_offset) { + struct arpt_standard_target *targ = (void *)t; + /* Check standard info. */ if (t->u.target_size != ARPT_ALIGN(sizeof(struct arpt_standard_target))) { @@ -455,6 +443,18 @@ static inline int standard_check(const struct arpt_entry_target *t, return 0; } + if (targ->verdict >= 0 + && targ->verdict > max_offset - sizeof(struct arpt_entry)) { + duprintf("arpt_standard_check: bad verdict (%i)\n", + targ->verdict); + return 0; + } + + if (targ->verdict < -NF_MAX_VERDICT - 1) { + duprintf("arpt_standard_check: bad negative verdict (%i)\n", + targ->verdict); + return 0; + } return 1; } @@ -472,13 +472,7 @@ static inline int check_entry(struct arpt_entry *e, const char *name, unsigned i return -EINVAL; } - if (e->target_offset + sizeof(struct arpt_entry_target) > e->next_offset) - return -EINVAL; - t = arpt_get_target(e); - if (e->target_offset + t->u.target_size > e->next_offset) - return -EINVAL; - target = try_then_request_module(xt_find_target(NF_ARP, t->u.user.name, t->u.user.revision), "arpt_%s", t->u.user.name); @@ -648,7 +642,7 @@ static int translate_table(const char *name, if (ret != 0) { ARPT_ENTRY_ITERATE(entry0, newinfo->size, - cleanup_entry, &i); + cleanup_entry, &i); return ret; } @@ -1127,8 +1121,7 @@ int arpt_register_table(struct arpt_table *table, return ret; } - ret = xt_register_table(table, &bootstrap, newinfo); - if (ret != 0) { + if (xt_register_table(table, &bootstrap, newinfo) != 0) { xt_free_table_info(newinfo); return ret; } @@ -1178,41 +1171,26 @@ static int __init arp_tables_init(void) { int ret; - ret = xt_proto_init(NF_ARP); - if (ret < 0) - goto err1; + xt_proto_init(NF_ARP); /* Noone else will be downing sem now, so we won't sleep */ - ret = xt_register_target(&arpt_standard_target); - if (ret < 0) - goto err2; - ret = xt_register_target(&arpt_error_target); - if (ret < 0) - goto err3; + xt_register_target(&arpt_standard_target); + xt_register_target(&arpt_error_target); /* Register setsockopt */ ret = nf_register_sockopt(&arpt_sockopts); - if (ret < 0) - goto err4; + if (ret < 0) { + duprintf("Unable to register sockopts.\n"); + return ret; + } printk("arp_tables: (C) 2002 David S. Miller\n"); return 0; - -err4: - xt_unregister_target(&arpt_error_target); -err3: - xt_unregister_target(&arpt_standard_target); -err2: - xt_proto_fini(NF_ARP); -err1: - return ret; } static void __exit arp_tables_fini(void) { nf_unregister_sockopt(&arpt_sockopts); - xt_unregister_target(&arpt_error_target); - xt_unregister_target(&arpt_standard_target); xt_proto_fini(NF_ARP); } diff --git a/net/ipv4/netfilter/ip_conntrack_amanda.c b/net/ipv4/netfilter/ip_conntrack_amanda.c index 0a7bd7f04..a604b1ccf 100644 --- a/net/ipv4/netfilter/ip_conntrack_amanda.c +++ b/net/ipv4/netfilter/ip_conntrack_amanda.c @@ -17,29 +17,33 @@ * this value. * */ + +#include #include #include -#include -#include -#include -#include +#include #include +#include #include +#include +#include -#include #include #include static unsigned int master_timeout = 300; -static char *ts_algo = "kmp"; MODULE_AUTHOR("Brian J. Murrell "); MODULE_DESCRIPTION("Amanda connection tracking module"); MODULE_LICENSE("GPL"); module_param(master_timeout, uint, 0600); MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); -module_param(ts_algo, charp, 0400); -MODULE_PARM_DESC(ts_algo, "textsearch algorithm to use (default kmp)"); + +static const char *conns[] = { "DATA ", "MESG ", "INDEX " }; + +/* This is slow, but it's simple. --RR */ +static char *amanda_buffer; +static DEFINE_SPINLOCK(amanda_buffer_lock); unsigned int (*ip_nat_amanda_hook)(struct sk_buff **pskb, enum ip_conntrack_info ctinfo, @@ -48,48 +52,12 @@ unsigned int (*ip_nat_amanda_hook)(struct sk_buff **pskb, struct ip_conntrack_expect *exp); EXPORT_SYMBOL_GPL(ip_nat_amanda_hook); -enum amanda_strings { - SEARCH_CONNECT, - SEARCH_NEWLINE, - SEARCH_DATA, - SEARCH_MESG, - SEARCH_INDEX, -}; - -static struct { - char *string; - size_t len; - struct ts_config *ts; -} search[] = { - [SEARCH_CONNECT] = { - .string = "CONNECT ", - .len = 8, - }, - [SEARCH_NEWLINE] = { - .string = "\n", - .len = 1, - }, - [SEARCH_DATA] = { - .string = "DATA ", - .len = 5, - }, - [SEARCH_MESG] = { - .string = "MESG ", - .len = 5, - }, - [SEARCH_INDEX] = { - .string = "INDEX ", - .len = 6, - }, -}; - static int help(struct sk_buff **pskb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo) { - struct ts_state ts; struct ip_conntrack_expect *exp; - unsigned int dataoff, start, stop, off, i; - char pbuf[sizeof("65535")], *tmp; + char *data, *data_limit, *tmp; + unsigned int dataoff, i; u_int16_t port, len; int ret = NF_ACCEPT; @@ -109,34 +77,29 @@ static int help(struct sk_buff **pskb, return NF_ACCEPT; } - memset(&ts, 0, sizeof(ts)); - start = skb_find_text(*pskb, dataoff, (*pskb)->len, - search[SEARCH_CONNECT].ts, &ts); - if (start == UINT_MAX) - goto out; - start += dataoff + search[SEARCH_CONNECT].len; + spin_lock_bh(&amanda_buffer_lock); + skb_copy_bits(*pskb, dataoff, amanda_buffer, (*pskb)->len - dataoff); + data = amanda_buffer; + data_limit = amanda_buffer + (*pskb)->len - dataoff; + *data_limit = '\0'; - memset(&ts, 0, sizeof(ts)); - stop = skb_find_text(*pskb, start, (*pskb)->len, - search[SEARCH_NEWLINE].ts, &ts); - if (stop == UINT_MAX) + /* Search for the CONNECT string */ + data = strstr(data, "CONNECT "); + if (!data) goto out; - stop += start; - - for (i = SEARCH_DATA; i <= SEARCH_INDEX; i++) { - memset(&ts, 0, sizeof(ts)); - off = skb_find_text(*pskb, start, stop, search[i].ts, &ts); - if (off == UINT_MAX) - continue; - off += start + search[i].len; + data += strlen("CONNECT "); - len = min_t(unsigned int, sizeof(pbuf) - 1, stop - off); - if (skb_copy_bits(*pskb, off, pbuf, len)) - break; - pbuf[len] = '\0'; + /* Only search first line. */ + if ((tmp = strchr(data, '\n'))) + *tmp = '\0'; - port = simple_strtoul(pbuf, &tmp, 10); - len = tmp - pbuf; + for (i = 0; i < ARRAY_SIZE(conns); i++) { + char *match = strstr(data, conns[i]); + if (!match) + continue; + tmp = data = match + strlen(conns[i]); + port = simple_strtoul(data, &data, 10); + len = data - tmp; if (port == 0 || len > 5) break; @@ -162,7 +125,8 @@ static int help(struct sk_buff **pskb, exp->mask.dst.u.tcp.port = 0xFFFF; if (ip_nat_amanda_hook) - ret = ip_nat_amanda_hook(pskb, ctinfo, off - dataoff, + ret = ip_nat_amanda_hook(pskb, ctinfo, + tmp - amanda_buffer, len, exp); else if (ip_conntrack_expect_related(exp) != 0) ret = NF_DROP; @@ -170,11 +134,12 @@ static int help(struct sk_buff **pskb, } out: + spin_unlock_bh(&amanda_buffer_lock); return ret; } static struct ip_conntrack_helper amanda_helper = { - .max_expected = 3, + .max_expected = ARRAY_SIZE(conns), .timeout = 180, .me = THIS_MODULE, .help = help, @@ -190,36 +155,26 @@ static struct ip_conntrack_helper amanda_helper = { static void __exit ip_conntrack_amanda_fini(void) { - int i; - ip_conntrack_helper_unregister(&amanda_helper); - for (i = 0; i < ARRAY_SIZE(search); i++) - textsearch_destroy(search[i].ts); + kfree(amanda_buffer); } static int __init ip_conntrack_amanda_init(void) { - int ret, i; - - ret = -ENOMEM; - for (i = 0; i < ARRAY_SIZE(search); i++) { - search[i].ts = textsearch_prepare(ts_algo, search[i].string, - search[i].len, - GFP_KERNEL, TS_AUTOLOAD); - if (search[i].ts == NULL) - goto err; - } + int ret; + + amanda_buffer = kmalloc(65536, GFP_KERNEL); + if (!amanda_buffer) + return -ENOMEM; + ret = ip_conntrack_helper_register(&amanda_helper); - if (ret < 0) - goto err; + if (ret < 0) { + kfree(amanda_buffer); + return ret; + } return 0; -err: - for (; i >= 0; i--) { - if (search[i].ts) - textsearch_destroy(search[i].ts); - } - return ret; + } module_init(ip_conntrack_amanda_init); diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index c58783404..444d82571 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c @@ -17,6 +17,7 @@ * - export ip_conntrack[_expect]_{find_get,put} functions * */ +#include #include #include #include @@ -727,9 +728,6 @@ init_conntrack(struct ip_conntrack_tuple *tuple, defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) /* this is ugly, but there is no other place where to put it */ conntrack->nat.masq_index = exp->master->nat.masq_index; -#endif -#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK - conntrack->secmark = exp->master->secmark; #endif nf_conntrack_get(&conntrack->master->ct_general); CONNTRACK_STAT_INC(expect_new); @@ -1137,12 +1135,6 @@ void __ip_ct_refresh_acct(struct ip_conntrack *ct, write_lock_bh(&ip_conntrack_lock); - /* Only update if this is not a fixed timeout */ - if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { - write_unlock_bh(&ip_conntrack_lock); - return; - } - /* If not in hash table, timer will not be active yet */ if (!is_confirmed(ct)) { ct->timeout.expires = extra_jiffies; diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c index 1d18c863f..3e542bf28 100644 --- a/net/ipv4/netfilter/ip_conntrack_ftp.c +++ b/net/ipv4/netfilter/ip_conntrack_ftp.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -55,48 +56,37 @@ static int try_eprt(const char *, size_t, u_int32_t [], char); static int try_epsv_response(const char *, size_t, u_int32_t [], char); static const struct ftp_search { + enum ip_conntrack_dir dir; const char *pattern; size_t plen; char skip; char term; enum ip_ct_ftp_type ftptype; int (*getnum)(const char *, size_t, u_int32_t[], char); -} search[IP_CT_DIR_MAX][2] = { - [IP_CT_DIR_ORIGINAL] = { - { - .pattern = "PORT", - .plen = sizeof("PORT") - 1, - .skip = ' ', - .term = '\r', - .ftptype = IP_CT_FTP_PORT, - .getnum = try_rfc959, - }, - { - .pattern = "EPRT", - .plen = sizeof("EPRT") - 1, - .skip = ' ', - .term = '\r', - .ftptype = IP_CT_FTP_EPRT, - .getnum = try_eprt, - }, +} search[] = { + { + IP_CT_DIR_ORIGINAL, + "PORT", sizeof("PORT") - 1, ' ', '\r', + IP_CT_FTP_PORT, + try_rfc959, }, - [IP_CT_DIR_REPLY] = { - { - .pattern = "227 ", - .plen = sizeof("227 ") - 1, - .skip = '(', - .term = ')', - .ftptype = IP_CT_FTP_PASV, - .getnum = try_rfc959, - }, - { - .pattern = "229 ", - .plen = sizeof("229 ") - 1, - .skip = '(', - .term = ')', - .ftptype = IP_CT_FTP_EPSV, - .getnum = try_epsv_response, - }, + { + IP_CT_DIR_REPLY, + "227 ", sizeof("227 ") - 1, '(', ')', + IP_CT_FTP_PASV, + try_rfc959, + }, + { + IP_CT_DIR_ORIGINAL, + "EPRT", sizeof("EPRT") - 1, ' ', '\r', + IP_CT_FTP_EPRT, + try_eprt, + }, + { + IP_CT_DIR_REPLY, + "229 ", sizeof("229 ") - 1, '(', ')', + IP_CT_FTP_EPSV, + try_epsv_response, }, }; @@ -356,15 +346,17 @@ static int help(struct sk_buff **pskb, array[2] = (ntohl(ct->tuplehash[dir].tuple.src.ip) >> 8) & 0xFF; array[3] = ntohl(ct->tuplehash[dir].tuple.src.ip) & 0xFF; - for (i = 0; i < ARRAY_SIZE(search[dir]); i++) { + for (i = 0; i < ARRAY_SIZE(search); i++) { + if (search[i].dir != dir) continue; + found = find_pattern(fb_ptr, (*pskb)->len - dataoff, - search[dir][i].pattern, - search[dir][i].plen, - search[dir][i].skip, - search[dir][i].term, + search[i].pattern, + search[i].plen, + search[i].skip, + search[i].term, &matchoff, &matchlen, array, - search[dir][i].getnum); + search[i].getnum); if (found) break; } if (found == -1) { @@ -374,7 +366,7 @@ static int help(struct sk_buff **pskb, this case. */ if (net_ratelimit()) printk("conntrack_ftp: partial %s %u+%u\n", - search[dir][i].pattern, + search[i].pattern, ntohl(th->seq), datalen); ret = NF_DROP; goto out; @@ -434,7 +426,7 @@ static int help(struct sk_buff **pskb, /* Now, NAT might want to mangle the packet, and register the * (possibly changed) expectation itself. */ if (ip_nat_ftp_hook) - ret = ip_nat_ftp_hook(pskb, ctinfo, search[dir][i].ftptype, + ret = ip_nat_ftp_hook(pskb, ctinfo, search[i].ftptype, matchoff, matchlen, exp, &seq); else { /* Can't expect this? Best to drop packet now. */ diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index afe7039a4..853a3d512 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c @@ -11,6 +11,7 @@ * For more information, please see http://nath323.sourceforge.net/ */ +#include #include #include #include @@ -21,8 +22,6 @@ #include #include #include -#include -#include #if 0 #define DEBUGP printk @@ -39,12 +38,6 @@ static int gkrouted_only = 1; module_param(gkrouted_only, int, 0600); MODULE_PARM_DESC(gkrouted_only, "only accept calls from gatekeeper"); -static int callforward_filter = 1; -module_param(callforward_filter, bool, 0600); -MODULE_PARM_DESC(callforward_filter, "only create call forwarding expectations " - "if both endpoints are on different sides " - "(determined by routing information)"); - /* Hooks for NAT */ int (*set_h245_addr_hook) (struct sk_buff ** pskb, unsigned char **data, int dataoff, @@ -84,12 +77,6 @@ int (*nat_h245_hook) (struct sk_buff ** pskb, unsigned char **data, int dataoff, TransportAddress * addr, u_int16_t port, struct ip_conntrack_expect * exp); -int (*nat_callforwarding_hook) (struct sk_buff ** pskb, - struct ip_conntrack * ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr, u_int16_t port, - struct ip_conntrack_expect * exp); int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, enum ip_conntrack_info ctinfo, @@ -696,92 +683,6 @@ static int expect_h245(struct sk_buff **pskb, struct ip_conntrack *ct, return ret; } -/* Forwarding declaration */ -void ip_conntrack_q931_expect(struct ip_conntrack *new, - struct ip_conntrack_expect *this); - -/****************************************************************************/ -static int expect_callforwarding(struct sk_buff **pskb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr) -{ - int dir = CTINFO2DIR(ctinfo); - int ret = 0; - u_int32_t ip; - u_int16_t port; - struct ip_conntrack_expect *exp = NULL; - - /* Read alternativeAddress */ - if (!get_h225_addr(*data, addr, &ip, &port) || port == 0) - return 0; - - /* If the calling party is on the same side of the forward-to party, - * we don't need to track the second call */ - if (callforward_filter) { - struct rtable *rt1, *rt2; - struct flowi fl1 = { - .fl4_dst = ip, - }; - struct flowi fl2 = { - .fl4_dst = ct->tuplehash[!dir].tuple.src.ip, - }; - - if (ip_route_output_key(&rt1, &fl1) == 0) { - if (ip_route_output_key(&rt2, &fl2) == 0) { - if (rt1->rt_gateway == rt2->rt_gateway && - rt1->u.dst.dev == rt2->u.dst.dev) - ret = 1; - dst_release(&rt2->u.dst); - } - dst_release(&rt1->u.dst); - } - if (ret) { - DEBUGP("ip_ct_q931: Call Forwarding not tracked\n"); - return 0; - } - } - - /* Create expect for the second call leg */ - if ((exp = ip_conntrack_expect_alloc(ct)) == NULL) - return -1; - exp->tuple.src.ip = ct->tuplehash[!dir].tuple.src.ip; - exp->tuple.src.u.tcp.port = 0; - exp->tuple.dst.ip = ip; - exp->tuple.dst.u.tcp.port = htons(port); - exp->tuple.dst.protonum = IPPROTO_TCP; - exp->mask.src.ip = 0xFFFFFFFF; - exp->mask.src.u.tcp.port = 0; - exp->mask.dst.ip = 0xFFFFFFFF; - exp->mask.dst.u.tcp.port = 0xFFFF; - exp->mask.dst.protonum = 0xFF; - exp->flags = 0; - - if (ct->tuplehash[dir].tuple.src.ip != - ct->tuplehash[!dir].tuple.dst.ip && nat_callforwarding_hook) { - /* Need NAT */ - ret = nat_callforwarding_hook(pskb, ct, ctinfo, data, dataoff, - addr, port, exp); - } else { /* Conntrack only */ - exp->expectfn = ip_conntrack_q931_expect; - - if (ip_conntrack_expect_related(exp) == 0) { - DEBUGP("ip_ct_q931: expect Call Forwarding " - "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", - NIPQUAD(exp->tuple.src.ip), - ntohs(exp->tuple.src.u.tcp.port), - NIPQUAD(exp->tuple.dst.ip), - ntohs(exp->tuple.dst.u.tcp.port)); - } else - ret = -1; - } - - ip_conntrack_expect_put(exp); - - return ret; -} - /****************************************************************************/ static int process_setup(struct sk_buff **pskb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo, @@ -977,15 +878,6 @@ static int process_facility(struct sk_buff **pskb, struct ip_conntrack *ct, DEBUGP("ip_ct_q931: Facility\n"); - if (facility->reason.choice == eFacilityReason_callForwarded) { - if (facility->options & eFacility_UUIE_alternativeAddress) - return expect_callforwarding(pskb, ct, ctinfo, data, - dataoff, - &facility-> - alternativeAddress); - return 0; - } - if (facility->options & eFacility_UUIE_h245Address) { ret = expect_h245(pskb, ct, ctinfo, data, dataoff, &facility->h245Address); @@ -1417,7 +1309,7 @@ static int process_rcf(struct sk_buff **pskb, struct ip_conntrack *ct, DEBUGP ("ip_ct_ras: set RAS connection timeout to %u seconds\n", info->timeout); - ip_ct_refresh(ct, *pskb, info->timeout * HZ); + ip_ct_refresh_acct(ct, ctinfo, NULL, info->timeout * HZ); /* Set expect timeout */ read_lock_bh(&ip_conntrack_lock); @@ -1465,7 +1357,7 @@ static int process_urq(struct sk_buff **pskb, struct ip_conntrack *ct, info->sig_port[!dir] = 0; /* Give it 30 seconds for UCF or URJ */ - ip_ct_refresh(ct, *pskb, 30 * HZ); + ip_ct_refresh_acct(ct, ctinfo, NULL, 30 * HZ); return 0; } @@ -1785,6 +1677,7 @@ static int __init init(void) fini(); return ret; } + DEBUGP("ip_ct_h323: init success\n"); return 0; } @@ -1803,7 +1696,6 @@ EXPORT_SYMBOL_GPL(set_ras_addr_hook); EXPORT_SYMBOL_GPL(nat_rtp_rtcp_hook); EXPORT_SYMBOL_GPL(nat_t120_hook); EXPORT_SYMBOL_GPL(nat_h245_hook); -EXPORT_SYMBOL_GPL(nat_callforwarding_hook); EXPORT_SYMBOL_GPL(nat_q931_hook); MODULE_AUTHOR("Jing Min Zhao "); diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c index 4b359618b..022c47b9f 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323_types.c @@ -1,4 +1,4 @@ -/* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 +/* Generated by Jing Min Zhao's ASN.1 parser, Mar 15 2006 * * Copyright (c) 2006 Jing Min Zhao * @@ -1069,8 +1069,8 @@ static field_t _Facility_UUIE_fastStart[] = { /* SEQUENCE OF */ static field_t _Facility_UUIE[] = { /* SEQUENCE */ {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, - {FNAME("alternativeAddress") CHOICE, 3, 7, 7, DECODE | EXT | OPT, - offsetof(Facility_UUIE, alternativeAddress), _TransportAddress}, + {FNAME("alternativeAddress") CHOICE, 3, 7, 7, SKIP | EXT | OPT, 0, + _TransportAddress}, {FNAME("alternativeAliasAddress") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, _Facility_UUIE_alternativeAliasAddress}, {FNAME("conferenceID") OCTSTR, FIXD, 16, 0, SKIP | OPT, 0, NULL}, diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c index b020a33e6..8ccfe17bb 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c @@ -46,6 +46,7 @@ * */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c index 44889075f..a2ac5ce54 100644 --- a/net/ipv4/netfilter/ip_conntrack_irc.c +++ b/net/ipv4/netfilter/ip_conntrack_irc.c @@ -22,6 +22,7 @@ * */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 0d4cc9239..01bd7cab9 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c @@ -399,55 +399,42 @@ nfattr_failure: static int ctnetlink_done(struct netlink_callback *cb) { DEBUGP("entered %s\n", __FUNCTION__); - if (cb->args[1]) - ip_conntrack_put((struct ip_conntrack *)cb->args[1]); return 0; } static int ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb) { - struct ip_conntrack *ct, *last; + struct ip_conntrack *ct = NULL; struct ip_conntrack_tuple_hash *h; struct list_head *i; + u_int32_t *id = (u_int32_t *) &cb->args[1]; DEBUGP("entered %s, last bucket=%lu id=%u\n", __FUNCTION__, cb->args[0], *id); read_lock_bh(&ip_conntrack_lock); - last = (struct ip_conntrack *)cb->args[1]; - for (; cb->args[0] < ip_conntrack_htable_size; cb->args[0]++) { -restart: + for (; cb->args[0] < ip_conntrack_htable_size; cb->args[0]++, *id = 0) { list_for_each_prev(i, &ip_conntrack_hash[cb->args[0]]) { h = (struct ip_conntrack_tuple_hash *) i; if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) continue; ct = tuplehash_to_ctrack(h); - if (cb->args[1]) { - if (ct != last) - continue; - cb->args[1] = 0; - } + if (ct->id <= *id) + continue; if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, IPCTNL_MSG_CT_NEW, - 1, ct) < 0) { - nf_conntrack_get(&ct->ct_general); - cb->args[1] = (unsigned long)ct; + 1, ct) < 0) goto out; - } - } - if (cb->args[1]) { - cb->args[1] = 0; - goto restart; + *id = ct->id; } } -out: +out: read_unlock_bh(&ip_conntrack_lock); - if (last) - ip_conntrack_put(last); DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); + return skb->len; } @@ -642,7 +629,7 @@ static const size_t cta_min_nat[CTA_NAT_MAX] = { }; static inline int -ctnetlink_parse_nat(struct nfattr *nat, +ctnetlink_parse_nat(struct nfattr *cda[], const struct ip_conntrack *ct, struct ip_nat_range *range) { struct nfattr *tb[CTA_NAT_MAX]; @@ -652,7 +639,7 @@ ctnetlink_parse_nat(struct nfattr *nat, memset(range, 0, sizeof(*range)); - nfattr_parse_nested(tb, CTA_NAT_MAX, nat); + nfattr_parse_nested(tb, CTA_NAT_MAX, cda[CTA_NAT-1]); if (nfattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat)) return -EINVAL; @@ -867,30 +854,39 @@ ctnetlink_change_status(struct ip_conntrack *ct, struct nfattr *cda[]) /* ASSURED bit can only be set */ return -EINVAL; - if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) { + if (cda[CTA_NAT-1]) { #ifndef CONFIG_IP_NF_NAT_NEEDED return -EINVAL; #else + unsigned int hooknum; struct ip_nat_range range; - if (cda[CTA_NAT_DST-1]) { - if (ctnetlink_parse_nat(cda[CTA_NAT_DST-1], ct, - &range) < 0) - return -EINVAL; - if (ip_nat_initialized(ct, - HOOK2MANIP(NF_IP_PRE_ROUTING))) - return -EEXIST; - ip_nat_setup_info(ct, &range, NF_IP_PRE_ROUTING); - } - if (cda[CTA_NAT_SRC-1]) { - if (ctnetlink_parse_nat(cda[CTA_NAT_SRC-1], ct, - &range) < 0) - return -EINVAL; - if (ip_nat_initialized(ct, - HOOK2MANIP(NF_IP_POST_ROUTING))) - return -EEXIST; - ip_nat_setup_info(ct, &range, NF_IP_POST_ROUTING); - } + if (ctnetlink_parse_nat(cda, ct, &range) < 0) + return -EINVAL; + + DEBUGP("NAT: %u.%u.%u.%u-%u.%u.%u.%u:%u-%u\n", + NIPQUAD(range.min_ip), NIPQUAD(range.max_ip), + htons(range.min.all), htons(range.max.all)); + + /* This is tricky but it works. ip_nat_setup_info needs the + * hook number as parameter, so let's do the correct + * conversion and run away */ + if (status & IPS_SRC_NAT_DONE) + hooknum = NF_IP_POST_ROUTING; /* IP_NAT_MANIP_SRC */ + else if (status & IPS_DST_NAT_DONE) + hooknum = NF_IP_PRE_ROUTING; /* IP_NAT_MANIP_DST */ + else + return -EINVAL; /* Missing NAT flags */ + + DEBUGP("NAT status: %lu\n", + status & (IPS_NAT_MASK | IPS_NAT_DONE_MASK)); + + if (ip_nat_initialized(ct, HOOK2MANIP(hooknum))) + return -EEXIST; + ip_nat_setup_info(ct, &range, hooknum); + + DEBUGP("NAT status after setup_info: %lu\n", + ct->status & (IPS_NAT_MASK | IPS_NAT_DONE_MASK)); #endif } @@ -1110,7 +1106,7 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb, /* implicit 'else' */ /* we only allow nat config for new conntracks */ - if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) { + if (cda[CTA_NAT-1]) { err = -EINVAL; goto out_unlock; } diff --git a/net/ipv4/netfilter/ip_conntrack_proto_gre.c b/net/ipv4/netfilter/ip_conntrack_proto_gre.c index 4ee016c42..56794797d 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_gre.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_gre.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -76,10 +77,10 @@ static inline int gre_key_cmpfn(const struct ip_ct_gre_keymap *km, } /* look up the source key for a given tuple */ -static __be16 gre_keymap_lookup(struct ip_conntrack_tuple *t) +static u_int32_t gre_keymap_lookup(struct ip_conntrack_tuple *t) { struct ip_ct_gre_keymap *km; - __be16 key = 0; + u_int32_t key = 0; read_lock_bh(&ip_ct_gre_lock); km = LIST_FIND(&gre_keymap_list, gre_key_cmpfn, @@ -189,7 +190,7 @@ static int gre_pkt_to_tuple(const struct sk_buff *skb, struct ip_conntrack_tuple *tuple) { struct gre_hdr_pptp _pgrehdr, *pgrehdr; - __be16 srckey; + u_int32_t srckey; struct gre_hdr _grehdr, *grehdr; /* first only delinearize old RFC1701 GRE header */ diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c index 23f1c5045..d8b14a901 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c @@ -224,7 +224,7 @@ icmp_error(struct sk_buff *skb, enum ip_conntrack_info *ctinfo, } /* See ip_conntrack_proto_tcp.c */ - if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && + if (hooknum == NF_IP_PRE_ROUTING && nf_ip_checksum(skb, hooknum, skb->nh.iph->ihl * 4, 0)) { if (LOG_INVALID(IPPROTO_ICMP)) nf_log_packet(PF_INET, 0, skb, NULL, NULL, NULL, diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c index fb920e76e..062b252b5 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c @@ -19,6 +19,7 @@ * version 2.2 */ +#include #include #include #include @@ -869,7 +870,7 @@ static int tcp_error(struct sk_buff *skb, * and moreover root might send raw packets. */ /* FIXME: Source route IP option packets --RR */ - if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && + if (hooknum == NF_IP_PRE_ROUTING && nf_ip_checksum(skb, hooknum, iph->ihl * 4, IPPROTO_TCP)) { if (LOG_INVALID(IPPROTO_TCP)) nf_log_packet(PF_INET, 0, skb, NULL, NULL, NULL, diff --git a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c index 9b2c16b4d..708998687 100644 --- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c +++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c @@ -120,7 +120,7 @@ static int udp_error(struct sk_buff *skb, enum ip_conntrack_info *ctinfo, * because the semantic of CHECKSUM_HW is different there * and moreover root might send raw packets. * FIXME: Source route IP option packets --RR */ - if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && + if (hooknum == NF_IP_PRE_ROUTING && nf_ip_checksum(skb, hooknum, iph->ihl * 4, IPPROTO_UDP)) { if (LOG_INVALID(IPPROTO_UDP)) nf_log_packet(PF_INET, 0, skb, NULL, NULL, NULL, diff --git a/net/ipv4/netfilter/ip_conntrack_sip.c b/net/ipv4/netfilter/ip_conntrack_sip.c deleted file mode 100644 index 2893e9c74..000000000 --- a/net/ipv4/netfilter/ip_conntrack_sip.c +++ /dev/null @@ -1,470 +0,0 @@ -/* SIP extension for IP connection tracking. - * - * (C) 2005 by Christian Hentschel - * based on RR's ip_conntrack_ftp.c and other modules. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#if 0 -#define DEBUGP printk -#else -#define DEBUGP(format, args...) -#endif - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Christian Hentschel "); -MODULE_DESCRIPTION("SIP connection tracking helper"); - -#define MAX_PORTS 8 -static unsigned short ports[MAX_PORTS]; -static int ports_c; -module_param_array(ports, ushort, &ports_c, 0400); -MODULE_PARM_DESC(ports, "port numbers of sip servers"); - -static unsigned int sip_timeout = SIP_TIMEOUT; -module_param(sip_timeout, uint, 0600); -MODULE_PARM_DESC(sip_timeout, "timeout for the master SIP session"); - -unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - const char **dptr); -EXPORT_SYMBOL_GPL(ip_nat_sip_hook); - -unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack_expect *exp, - const char *dptr); -EXPORT_SYMBOL_GPL(ip_nat_sdp_hook); - -int ct_sip_get_info(const char *dptr, size_t dlen, - unsigned int *matchoff, - unsigned int *matchlen, - struct sip_header_nfo *hnfo); -EXPORT_SYMBOL_GPL(ct_sip_get_info); - - -static int digits_len(const char *dptr, const char *limit, int *shift); -static int epaddr_len(const char *dptr, const char *limit, int *shift); -static int skp_digits_len(const char *dptr, const char *limit, int *shift); -static int skp_epaddr_len(const char *dptr, const char *limit, int *shift); - -struct sip_header_nfo ct_sip_hdrs[] = { - { /* Via header */ - .lname = "Via:", - .lnlen = sizeof("Via:") - 1, - .sname = "\r\nv:", - .snlen = sizeof("\r\nv:") - 1, /* rfc3261 "\r\n" */ - .ln_str = "UDP ", - .ln_strlen = sizeof("UDP ") - 1, - .match_len = epaddr_len, - }, - { /* Contact header */ - .lname = "Contact:", - .lnlen = sizeof("Contact:") - 1, - .sname = "\r\nm:", - .snlen = sizeof("\r\nm:") - 1, - .ln_str = "sip:", - .ln_strlen = sizeof("sip:") - 1, - .match_len = skp_epaddr_len - }, - { /* Content length header */ - .lname = "Content-Length:", - .lnlen = sizeof("Content-Length:") - 1, - .sname = "\r\nl:", - .snlen = sizeof("\r\nl:") - 1, - .ln_str = ":", - .ln_strlen = sizeof(":") - 1, - .match_len = skp_digits_len - }, - { /* SDP media info */ - .lname = "\nm=", - .lnlen = sizeof("\nm=") - 1, - .sname = "\rm=", - .snlen = sizeof("\rm=") - 1, - .ln_str = "audio ", - .ln_strlen = sizeof("audio ") - 1, - .match_len = digits_len - }, - { /* SDP owner address*/ - .lname = "\no=", - .lnlen = sizeof("\no=") - 1, - .sname = "\ro=", - .snlen = sizeof("\ro=") - 1, - .ln_str = "IN IP4 ", - .ln_strlen = sizeof("IN IP4 ") - 1, - .match_len = epaddr_len - }, - { /* SDP connection info */ - .lname = "\nc=", - .lnlen = sizeof("\nc=") - 1, - .sname = "\rc=", - .snlen = sizeof("\rc=") - 1, - .ln_str = "IN IP4 ", - .ln_strlen = sizeof("IN IP4 ") - 1, - .match_len = epaddr_len - }, - { /* Requests headers */ - .lname = "sip:", - .lnlen = sizeof("sip:") - 1, - .sname = "sip:", - .snlen = sizeof("sip:") - 1, /* yes, i know.. ;) */ - .ln_str = "@", - .ln_strlen = sizeof("@") - 1, - .match_len = epaddr_len - }, - { /* SDP version header */ - .lname = "\nv=", - .lnlen = sizeof("\nv=") - 1, - .sname = "\rv=", - .snlen = sizeof("\rv=") - 1, - .ln_str = "=", - .ln_strlen = sizeof("=") - 1, - .match_len = digits_len - } -}; -EXPORT_SYMBOL_GPL(ct_sip_hdrs); - -/* get line lenght until first CR or LF seen. */ -int ct_sip_lnlen(const char *line, const char *limit) -{ - const char *k = line; - - while ((line <= limit) && (*line == '\r' || *line == '\n')) - line++; - - while (line <= limit) { - if (*line == '\r' || *line == '\n') - break; - line++; - } - return line - k; -} -EXPORT_SYMBOL_GPL(ct_sip_lnlen); - -/* Linear string search, case sensitive. */ -const char *ct_sip_search(const char *needle, const char *haystack, - size_t needle_len, size_t haystack_len) -{ - const char *limit = haystack + (haystack_len - needle_len); - - while (haystack <= limit) { - if (memcmp(haystack, needle, needle_len) == 0) - return haystack; - haystack++; - } - return NULL; -} -EXPORT_SYMBOL_GPL(ct_sip_search); - -static int digits_len(const char *dptr, const char *limit, int *shift) -{ - int len = 0; - while (dptr <= limit && isdigit(*dptr)) { - dptr++; - len++; - } - return len; -} - -/* get digits lenght, skiping blank spaces. */ -static int skp_digits_len(const char *dptr, const char *limit, int *shift) -{ - for (; dptr <= limit && *dptr == ' '; dptr++) - (*shift)++; - - return digits_len(dptr, limit, shift); -} - -/* Simple ipaddr parser.. */ -static int parse_ipaddr(const char *cp, const char **endp, - u_int32_t *ipaddr, const char *limit) -{ - unsigned long int val; - int i, digit = 0; - - for (i = 0, *ipaddr = 0; cp <= limit && i < 4; i++) { - digit = 0; - if (!isdigit(*cp)) - break; - - val = simple_strtoul(cp, (char **)&cp, 10); - if (val > 0xFF) - return -1; - - ((u_int8_t *)ipaddr)[i] = val; - digit = 1; - - if (*cp != '.') - break; - cp++; - } - if (!digit) - return -1; - - if (endp) - *endp = cp; - - return 0; -} - -/* skip ip address. returns it lenght. */ -static int epaddr_len(const char *dptr, const char *limit, int *shift) -{ - const char *aux = dptr; - u_int32_t ip; - - if (parse_ipaddr(dptr, &dptr, &ip, limit) < 0) { - DEBUGP("ip: %s parse failed.!\n", dptr); - return 0; - } - - /* Port number */ - if (*dptr == ':') { - dptr++; - dptr += digits_len(dptr, limit, shift); - } - return dptr - aux; -} - -/* get address length, skiping user info. */ -static int skp_epaddr_len(const char *dptr, const char *limit, int *shift) -{ - int s = *shift; - - for (; dptr <= limit && *dptr != '@'; dptr++) - (*shift)++; - - if (*dptr == '@') { - dptr++; - (*shift)++; - } else - *shift = s; - - return epaddr_len(dptr, limit, shift); -} - -/* Returns 0 if not found, -1 error parsing. */ -int ct_sip_get_info(const char *dptr, size_t dlen, - unsigned int *matchoff, - unsigned int *matchlen, - struct sip_header_nfo *hnfo) -{ - const char *limit, *aux, *k = dptr; - int shift = 0; - - limit = dptr + (dlen - hnfo->lnlen); - - while (dptr <= limit) { - if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && - (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { - dptr++; - continue; - } - aux = ct_sip_search(hnfo->ln_str, dptr, hnfo->ln_strlen, - ct_sip_lnlen(dptr, limit)); - if (!aux) { - DEBUGP("'%s' not found in '%s'.\n", hnfo->ln_str, - hnfo->lname); - return -1; - } - aux += hnfo->ln_strlen; - - *matchlen = hnfo->match_len(aux, limit, &shift); - if (!*matchlen) - return -1; - - *matchoff = (aux - k) + shift; - - DEBUGP("%s match succeeded! - len: %u\n", hnfo->lname, - *matchlen); - return 1; - } - DEBUGP("%s header not found.\n", hnfo->lname); - return 0; -} - -static int set_expected_rtp(struct sk_buff **pskb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - u_int32_t ipaddr, u_int16_t port, - const char *dptr) -{ - struct ip_conntrack_expect *exp; - enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); - int ret; - - exp = ip_conntrack_expect_alloc(ct); - if (exp == NULL) - return NF_DROP; - - exp->tuple.src.ip = ct->tuplehash[!dir].tuple.src.ip; - exp->tuple.src.u.udp.port = 0; - exp->tuple.dst.ip = ipaddr; - exp->tuple.dst.u.udp.port = htons(port); - exp->tuple.dst.protonum = IPPROTO_UDP; - - exp->mask.src.ip = 0xFFFFFFFF; - exp->mask.src.u.udp.port = 0; - exp->mask.dst.ip = 0xFFFFFFFF; - exp->mask.dst.u.udp.port = 0xFFFF; - exp->mask.dst.protonum = 0xFF; - - exp->expectfn = NULL; - exp->flags = 0; - - if (ip_nat_sdp_hook) - ret = ip_nat_sdp_hook(pskb, ctinfo, exp, dptr); - else { - if (ip_conntrack_expect_related(exp) != 0) - ret = NF_DROP; - else - ret = NF_ACCEPT; - } - ip_conntrack_expect_put(exp); - - return ret; -} - -static int sip_help(struct sk_buff **pskb, - struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo) -{ - unsigned int dataoff, datalen; - const char *dptr; - int ret = NF_ACCEPT; - int matchoff, matchlen; - u_int32_t ipaddr; - u_int16_t port; - - /* No Data ? */ - dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr); - if (dataoff >= (*pskb)->len) { - DEBUGP("skb->len = %u\n", (*pskb)->len); - return NF_ACCEPT; - } - - ip_ct_refresh(ct, *pskb, sip_timeout * HZ); - - if (!skb_is_nonlinear(*pskb)) - dptr = (*pskb)->data + dataoff; - else { - DEBUGP("Copy of skbuff not supported yet.\n"); - goto out; - } - - if (ip_nat_sip_hook) { - if (!ip_nat_sip_hook(pskb, ctinfo, ct, &dptr)) { - ret = NF_DROP; - goto out; - } - } - - /* After this point NAT, could have mangled skb, so - we need to recalculate payload lenght. */ - datalen = (*pskb)->len - dataoff; - - if (datalen < (sizeof("SIP/2.0 200") - 1)) - goto out; - - /* RTP info only in some SDP pkts */ - if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 && - memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) { - goto out; - } - /* Get ip and port address from SDP packet. */ - if (ct_sip_get_info(dptr, datalen, &matchoff, &matchlen, - &ct_sip_hdrs[POS_CONNECTION]) > 0) { - - /* We'll drop only if there are parse problems. */ - if (parse_ipaddr(dptr + matchoff, NULL, &ipaddr, - dptr + datalen) < 0) { - ret = NF_DROP; - goto out; - } - if (ct_sip_get_info(dptr, datalen, &matchoff, &matchlen, - &ct_sip_hdrs[POS_MEDIA]) > 0) { - - port = simple_strtoul(dptr + matchoff, NULL, 10); - if (port < 1024) { - ret = NF_DROP; - goto out; - } - ret = set_expected_rtp(pskb, ct, ctinfo, - ipaddr, port, dptr); - } - } -out: - return ret; -} - -static struct ip_conntrack_helper sip[MAX_PORTS]; -static char sip_names[MAX_PORTS][10]; - -static void fini(void) -{ - int i; - for (i = 0; i < ports_c; i++) { - DEBUGP("unregistering helper for port %d\n", ports[i]); - ip_conntrack_helper_unregister(&sip[i]); - } -} - -static int __init init(void) -{ - int i, ret; - char *tmpname; - - if (ports_c == 0) - ports[ports_c++] = SIP_PORT; - - for (i = 0; i < ports_c; i++) { - /* Create helper structure */ - memset(&sip[i], 0, sizeof(struct ip_conntrack_helper)); - - sip[i].tuple.dst.protonum = IPPROTO_UDP; - sip[i].tuple.src.u.udp.port = htons(ports[i]); - sip[i].mask.src.u.udp.port = 0xFFFF; - sip[i].mask.dst.protonum = 0xFF; - sip[i].max_expected = 2; - sip[i].timeout = 3 * 60; /* 3 minutes */ - sip[i].me = THIS_MODULE; - sip[i].help = sip_help; - - tmpname = &sip_names[i][0]; - if (ports[i] == SIP_PORT) - sprintf(tmpname, "sip"); - else - sprintf(tmpname, "sip-%d", i); - sip[i].name = tmpname; - - DEBUGP("port #%d: %d\n", i, ports[i]); - - ret = ip_conntrack_helper_register(&sip[i]); - if (ret) { - printk("ERROR registering helper for port %d\n", - ports[i]); - fini(); - return ret; - } - } - return 0; -} - -module_init(init); -module_exit(fini); diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index b2f38f190..57361408d 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -12,6 +12,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -198,11 +199,6 @@ static int ct_seq_show(struct seq_file *s, void *v) return -ENOSPC; #endif -#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK - if (seq_printf(s, "secmark=%u ", conntrack->secmark)) - return -ENOSPC; -#endif - if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use))) return -ENOSPC; @@ -431,7 +427,7 @@ static unsigned int ip_conntrack_help(unsigned int hooknum, /* This is where we call the helper: as the packet goes out. */ ct = ip_conntrack_get(*pskb, &ctinfo); - if (ct && ct->helper && ctinfo != IP_CT_RELATED + IP_CT_IS_REPLY) { + if (ct && ct->helper) { unsigned int ret; ret = ct->helper->help(pskb, ct, ctinfo); if (ret != NF_ACCEPT) @@ -544,8 +540,6 @@ static struct nf_hook_ops ip_conntrack_ops[] = { /* Sysctl support */ -int ip_conntrack_checksum = 1; - #ifdef CONFIG_SYSCTL /* From ip_conntrack_core.c */ @@ -607,14 +601,6 @@ static ctl_table ip_ct_sysctl_table[] = { .mode = 0444, .proc_handler = &proc_dointvec, }, - { - .ctl_name = NET_IPV4_NF_CONNTRACK_CHECKSUM, - .procname = "ip_conntrack_checksum", - .data = &ip_conntrack_checksum, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, { .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, .procname = "ip_conntrack_tcp_timeout_syn_sent", @@ -970,7 +956,6 @@ EXPORT_SYMBOL_GPL(__ip_conntrack_helper_find_byname); EXPORT_SYMBOL_GPL(ip_conntrack_proto_find_get); EXPORT_SYMBOL_GPL(ip_conntrack_proto_put); EXPORT_SYMBOL_GPL(__ip_conntrack_proto_find); -EXPORT_SYMBOL_GPL(ip_conntrack_checksum); #if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) EXPORT_SYMBOL_GPL(ip_ct_port_tuple_to_nfattr); diff --git a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c index cbcaa4537..5d506e056 100644 --- a/net/ipv4/netfilter/ip_nat_helper.c +++ b/net/ipv4/netfilter/ip_nat_helper.c @@ -15,6 +15,7 @@ * - make ip_nat_resize_packet more generic (TCP and UDP) * - add ip_nat_mangle_udp_packet */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ip_nat_helper_h323.c b/net/ipv4/netfilter/ip_nat_helper_h323.c index 419b878fb..d45663d13 100644 --- a/net/ipv4/netfilter/ip_nat_helper_h323.c +++ b/net/ipv4/netfilter/ip_nat_helper_h323.c @@ -486,80 +486,6 @@ static int nat_q931(struct sk_buff **pskb, struct ip_conntrack *ct, return 0; } -/****************************************************************************/ -static void ip_nat_callforwarding_expect(struct ip_conntrack *new, - struct ip_conntrack_expect *this) -{ - struct ip_nat_range range; - - /* This must be a fresh one. */ - BUG_ON(new->status & IPS_NAT_DONE_MASK); - - /* Change src to where master sends to */ - range.flags = IP_NAT_RANGE_MAP_IPS; - range.min_ip = range.max_ip = new->tuplehash[!this->dir].tuple.src.ip; - - /* hook doesn't matter, but it has to do source manip */ - ip_nat_setup_info(new, &range, NF_IP_POST_ROUTING); - - /* For DST manip, map port here to where it's expected. */ - range.flags = (IP_NAT_RANGE_MAP_IPS | IP_NAT_RANGE_PROTO_SPECIFIED); - range.min = range.max = this->saved_proto; - range.min_ip = range.max_ip = this->saved_ip; - - /* hook doesn't matter, but it has to do destination manip */ - ip_nat_setup_info(new, &range, NF_IP_PRE_ROUTING); - - ip_conntrack_q931_expect(new, this); -} - -/****************************************************************************/ -static int nat_callforwarding(struct sk_buff **pskb, struct ip_conntrack *ct, - enum ip_conntrack_info ctinfo, - unsigned char **data, int dataoff, - TransportAddress * addr, u_int16_t port, - struct ip_conntrack_expect *exp) -{ - int dir = CTINFO2DIR(ctinfo); - u_int16_t nated_port; - - /* Set expectations for NAT */ - exp->saved_ip = exp->tuple.dst.ip; - exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; - exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; - exp->expectfn = ip_nat_callforwarding_expect; - exp->dir = !dir; - - /* Try to get same port: if not, try to change it. */ - for (nated_port = port; nated_port != 0; nated_port++) { - exp->tuple.dst.u.tcp.port = htons(nated_port); - if (ip_conntrack_expect_related(exp) == 0) - break; - } - - if (nated_port == 0) { /* No port available */ - if (net_ratelimit()) - printk("ip_nat_q931: out of TCP ports\n"); - return 0; - } - - /* Modify signal */ - if (!set_h225_addr(pskb, data, dataoff, addr, - ct->tuplehash[!dir].tuple.dst.ip, - nated_port) == 0) { - ip_conntrack_unexpect_related(exp); - return -1; - } - - /* Success */ - DEBUGP("ip_nat_q931: expect Call Forwarding " - "%u.%u.%u.%u:%hu->%u.%u.%u.%u:%hu\n", - NIPQUAD(exp->tuple.src.ip), ntohs(exp->tuple.src.u.tcp.port), - NIPQUAD(exp->tuple.dst.ip), ntohs(exp->tuple.dst.u.tcp.port)); - - return 0; -} - /****************************************************************************/ static int __init init(void) { @@ -570,7 +496,6 @@ static int __init init(void) BUG_ON(nat_rtp_rtcp_hook != NULL); BUG_ON(nat_t120_hook != NULL); BUG_ON(nat_h245_hook != NULL); - BUG_ON(nat_callforwarding_hook != NULL); BUG_ON(nat_q931_hook != NULL); set_h245_addr_hook = set_h245_addr; @@ -580,7 +505,6 @@ static int __init init(void) nat_rtp_rtcp_hook = nat_rtp_rtcp; nat_t120_hook = nat_t120; nat_h245_hook = nat_h245; - nat_callforwarding_hook = nat_callforwarding; nat_q931_hook = nat_q931; DEBUGP("ip_nat_h323: init success\n"); @@ -597,7 +521,6 @@ static void __exit fini(void) nat_rtp_rtcp_hook = NULL; nat_t120_hook = NULL; nat_h245_hook = NULL; - nat_callforwarding_hook = NULL; nat_q931_hook = NULL; synchronize_net(); } diff --git a/net/ipv4/netfilter/ip_nat_helper_pptp.c b/net/ipv4/netfilter/ip_nat_helper_pptp.c index 1d149964d..f3977726f 100644 --- a/net/ipv4/netfilter/ip_nat_helper_pptp.c +++ b/net/ipv4/netfilter/ip_nat_helper_pptp.c @@ -35,6 +35,7 @@ * */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ip_nat_proto_gre.c b/net/ipv4/netfilter/ip_nat_proto_gre.c index 38acfdf54..96ceabaec 100644 --- a/net/ipv4/netfilter/ip_nat_proto_gre.c +++ b/net/ipv4/netfilter/ip_nat_proto_gre.c @@ -23,6 +23,7 @@ * */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ip_nat_proto_udp.c b/net/ipv4/netfilter/ip_nat_proto_udp.c index 802ceb70d..e8eaf6a37 100644 --- a/net/ipv4/netfilter/ip_nat_proto_udp.c +++ b/net/ipv4/netfilter/ip_nat_proto_udp.c @@ -113,7 +113,7 @@ udp_manip_pkt(struct sk_buff **pskb, newport = tuple->dst.u.udp.port; portptr = &hdr->dest; } - if (hdr->check) /* 0 is a special case meaning no checksum */ + if (hdr->check) { /* 0 is a special case meaning no checksum */ #ifdef CONFIG_XEN if ((*pskb)->proto_csum_blank) hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check); @@ -123,6 +123,7 @@ udp_manip_pkt(struct sk_buff **pskb, ip_nat_cheat_check(*portptr ^ 0xFFFF, newport, hdr->check)); + } *portptr = newport; return 1; } diff --git a/net/ipv4/netfilter/ip_nat_sip.c b/net/ipv4/netfilter/ip_nat_sip.c deleted file mode 100644 index 6ffba63ad..000000000 --- a/net/ipv4/netfilter/ip_nat_sip.c +++ /dev/null @@ -1,249 +0,0 @@ -/* SIP extension for UDP NAT alteration. - * - * (C) 2005 by Christian Hentschel - * based on RR's ip_nat_ftp.c and other modules. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Christian Hentschel "); -MODULE_DESCRIPTION("SIP NAT helper"); - -#if 0 -#define DEBUGP printk -#else -#define DEBUGP(format, args...) -#endif - -extern struct sip_header_nfo ct_sip_hdrs[]; - -static unsigned int mangle_sip_packet(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - const char **dptr, size_t dlen, - char *buffer, int bufflen, - struct sip_header_nfo *hnfo) -{ - unsigned int matchlen, matchoff; - - if (ct_sip_get_info(*dptr, dlen, &matchoff, &matchlen, hnfo) <= 0) - return 0; - - if (!ip_nat_mangle_udp_packet(pskb, ct, ctinfo, - matchoff, matchlen, buffer, bufflen)) - return 0; - - /* We need to reload this. Thanks Patrick. */ - *dptr = (*pskb)->data + (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr); - return 1; -} - -static unsigned int ip_nat_sip(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - const char **dptr) -{ - enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); - char buffer[sizeof("nnn.nnn.nnn.nnn:nnnnn")]; - unsigned int bufflen, dataoff; - u_int32_t ip; - u_int16_t port; - - dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr); - - ip = ct->tuplehash[!dir].tuple.dst.ip; - port = ct->tuplehash[!dir].tuple.dst.u.udp.port; - bufflen = sprintf(buffer, "%u.%u.%u.%u:%u", NIPQUAD(ip), ntohs(port)); - - /* short packet ? */ - if (((*pskb)->len - dataoff) < (sizeof("SIP/2.0") - 1)) - return 0; - - /* Basic rules: requests and responses. */ - if (memcmp(*dptr, "SIP/2.0", sizeof("SIP/2.0") - 1) == 0) { - const char *aux; - - if ((ctinfo) < IP_CT_IS_REPLY) { - mangle_sip_packet(pskb, ctinfo, ct, dptr, - (*pskb)->len - dataoff, - buffer, bufflen, - &ct_sip_hdrs[POS_CONTACT]); - return 1; - } - - if (!mangle_sip_packet(pskb, ctinfo, ct, dptr, - (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_VIA])) - return 0; - - /* This search should ignore case, but later.. */ - aux = ct_sip_search("CSeq:", *dptr, sizeof("CSeq:") - 1, - (*pskb)->len - dataoff); - if (!aux) - return 0; - - if (!ct_sip_search("REGISTER", aux, sizeof("REGISTER"), - ct_sip_lnlen(aux, *dptr + (*pskb)->len - dataoff))) - return 1; - - return mangle_sip_packet(pskb, ctinfo, ct, dptr, - (*pskb)->len - dataoff, - buffer, bufflen, - &ct_sip_hdrs[POS_CONTACT]); - } - if ((ctinfo) < IP_CT_IS_REPLY) { - if (!mangle_sip_packet(pskb, ctinfo, ct, dptr, - (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_VIA])) - return 0; - - /* Mangle Contact if exists only. - watch udp_nat_mangle()! */ - mangle_sip_packet(pskb, ctinfo, ct, dptr, (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_CONTACT]); - return 1; - } - /* This mangle requests headers. */ - return mangle_sip_packet(pskb, ctinfo, ct, dptr, - ct_sip_lnlen(*dptr, - *dptr + (*pskb)->len - dataoff), - buffer, bufflen, &ct_sip_hdrs[POS_REQ_HEADER]); -} - -static int mangle_content_len(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - const char *dptr) -{ - unsigned int dataoff, matchoff, matchlen; - char buffer[sizeof("65536")]; - int bufflen; - - dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr); - - /* Get actual SDP lenght */ - if (ct_sip_get_info(dptr, (*pskb)->len - dataoff, &matchoff, - &matchlen, &ct_sip_hdrs[POS_SDP_HEADER]) > 0) { - - /* since ct_sip_get_info() give us a pointer passing 'v=' - we need to add 2 bytes in this count. */ - int c_len = (*pskb)->len - dataoff - matchoff + 2; - - /* Now, update SDP lenght */ - if (ct_sip_get_info(dptr, (*pskb)->len - dataoff, &matchoff, - &matchlen, &ct_sip_hdrs[POS_CONTENT]) > 0) { - - bufflen = sprintf(buffer, "%u", c_len); - - return ip_nat_mangle_udp_packet(pskb, ct, ctinfo, - matchoff, matchlen, - buffer, bufflen); - } - } - return 0; -} - -static unsigned int mangle_sdp(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack *ct, - u_int32_t newip, u_int16_t port, - const char *dptr) -{ - char buffer[sizeof("nnn.nnn.nnn.nnn")]; - unsigned int dataoff, bufflen; - - dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr); - - /* Mangle owner and contact info. */ - bufflen = sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(newip)); - if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_OWNER])) - return 0; - - if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_CONNECTION])) - return 0; - - /* Mangle media port. */ - bufflen = sprintf(buffer, "%u", port); - if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff, - buffer, bufflen, &ct_sip_hdrs[POS_MEDIA])) - return 0; - - return mangle_content_len(pskb, ctinfo, ct, dptr); -} - -/* So, this packet has hit the connection tracking matching code. - Mangle it, and change the expectation to match the new version. */ -static unsigned int ip_nat_sdp(struct sk_buff **pskb, - enum ip_conntrack_info ctinfo, - struct ip_conntrack_expect *exp, - const char *dptr) -{ - struct ip_conntrack *ct = exp->master; - enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); - u_int32_t newip; - u_int16_t port; - - DEBUGP("ip_nat_sdp():\n"); - - /* Connection will come from reply */ - newip = ct->tuplehash[!dir].tuple.dst.ip; - - exp->tuple.dst.ip = newip; - exp->saved_proto.udp.port = exp->tuple.dst.u.udp.port; - exp->dir = !dir; - - /* When you see the packet, we need to NAT it the same as the - this one. */ - exp->expectfn = ip_nat_follow_master; - - /* Try to get same port: if not, try to change it. */ - for (port = ntohs(exp->saved_proto.udp.port); port != 0; port++) { - exp->tuple.dst.u.udp.port = htons(port); - if (ip_conntrack_expect_related(exp) == 0) - break; - } - - if (port == 0) - return NF_DROP; - - if (!mangle_sdp(pskb, ctinfo, ct, newip, port, dptr)) { - ip_conntrack_unexpect_related(exp); - return NF_DROP; - } - return NF_ACCEPT; -} - -static void __exit fini(void) -{ - ip_nat_sip_hook = NULL; - ip_nat_sdp_hook = NULL; - /* Make sure noone calls it, meanwhile. */ - synchronize_net(); -} - -static int __init init(void) -{ - BUG_ON(ip_nat_sip_hook); - BUG_ON(ip_nat_sdp_hook); - ip_nat_sip_hook = ip_nat_sip; - ip_nat_sdp_hook = ip_nat_sdp; - return 0; -} - -module_init(init); -module_exit(fini); diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c index 18b7fbdcc..c33244263 100644 --- a/net/ipv4/netfilter/ip_nat_snmp_basic.c +++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c @@ -43,6 +43,7 @@ * 2000-08-06: Convert to new helper API (Harald Welte). * */ +#include #include #include #include @@ -1255,9 +1256,9 @@ static int help(struct sk_buff **pskb, struct udphdr *udph = (struct udphdr *)((u_int32_t *)iph + iph->ihl); /* SNMP replies and originating SNMP traps get mangled */ - if (udph->source == htons(SNMP_PORT) && dir != IP_CT_DIR_REPLY) + if (udph->source == ntohs(SNMP_PORT) && dir != IP_CT_DIR_REPLY) return NF_ACCEPT; - if (udph->dest == htons(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL) + if (udph->dest == ntohs(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL) return NF_ACCEPT; /* No NAT? */ @@ -1347,4 +1348,4 @@ static void __exit ip_nat_snmp_basic_fini(void) module_init(ip_nat_snmp_basic_init); module_exit(ip_nat_snmp_basic_fini); -module_param(debug, int, 0600); +module_param(debug, bool, 0600); diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c index c508544d7..67e676783 100644 --- a/net/ipv4/netfilter/ip_nat_standalone.c +++ b/net/ipv4/netfilter/ip_nat_standalone.c @@ -18,6 +18,7 @@ * - now capable of multiple expectations for one master * */ +#include #include #include #include @@ -110,17 +111,12 @@ ip_nat_fn(unsigned int hooknum, IP_NF_ASSERT(!((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET))); - ct = ip_conntrack_get(*pskb, &ctinfo); - - /* Don't try to NAT if this packet is not conntracked */ - if (ct == &ip_conntrack_untracked) - return NF_ACCEPT; - /* If we had a hardware checksum before, it's now invalid */ if ((*pskb)->ip_summed == CHECKSUM_HW) if (skb_checksum_help(*pskb, (out == NULL))) return NF_DROP; + ct = ip_conntrack_get(*pskb, &ctinfo); /* Can't track? It's not due to stress, or conntrack would have dropped it. Hence it's the user's responsibilty to packet filter it out, or implement conntrack/NAT for that @@ -142,6 +138,10 @@ ip_nat_fn(unsigned int hooknum, return NF_ACCEPT; } + /* Don't try to NAT if this packet is not conntracked */ + if (ct == &ip_conntrack_untracked) + return NF_ACCEPT; + switch (ctinfo) { case IP_CT_RELATED: case IP_CT_RELATED+IP_CT_IS_REPLY: @@ -275,8 +275,7 @@ ip_nat_local_fn(unsigned int hooknum, ct->tuplehash[!dir].tuple.src.u.all #endif ) - if (ip_route_me_harder(pskb, RTN_UNSPEC)) - ret = NF_DROP; + return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP; } return ret; } diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 198ac36db..b93f04943 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c @@ -457,19 +457,11 @@ dev_cmp(struct ipq_queue_entry *entry, unsigned long ifindex) if (entry->info->indev) if (entry->info->indev->ifindex == ifindex) return 1; + if (entry->info->outdev) if (entry->info->outdev->ifindex == ifindex) return 1; -#ifdef CONFIG_BRIDGE_NETFILTER - if (entry->skb->nf_bridge) { - if (entry->skb->nf_bridge->physindev && - entry->skb->nf_bridge->physindev->ifindex == ifindex) - return 1; - if (entry->skb->nf_bridge->physoutdev && - entry->skb->nf_bridge->physoutdev->ifindex == ifindex) - return 1; - } -#endif + return 0; } @@ -515,7 +507,7 @@ ipq_rcv_skb(struct sk_buff *skb) if (type <= IPQM_BASE) return; - if (security_netlink_recv(skb, CAP_NET_ADMIN)) + if (security_netlink_recv(skb)) RCV_SKB_FAIL(-EPERM); write_lock_bh(&queue_lock); diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index a560c5537..71871c4f9 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -14,6 +14,7 @@ * 08 Oct 2005 Harald Welte * - Generalize into "x_tables" layer and "{ip,ip6,arp}_tables" */ +#include #include #include #include @@ -404,13 +405,6 @@ mark_source_chains(struct xt_table_info *newinfo, && unconditional(&e->ip)) { unsigned int oldpos, size; - if (t->verdict < -NF_MAX_VERDICT - 1) { - duprintf("mark_source_chains: bad " - "negative verdict (%i)\n", - t->verdict); - return 0; - } - /* Return: backtrack through the last big jump. */ do { @@ -448,13 +442,6 @@ mark_source_chains(struct xt_table_info *newinfo, if (strcmp(t->target.u.user.name, IPT_STANDARD_TARGET) == 0 && newpos >= 0) { - if (newpos > newinfo->size - - sizeof(struct ipt_entry)) { - duprintf("mark_source_chains: " - "bad verdict (%i)\n", - newpos); - return 0; - } /* This a jump; chase it. */ duprintf("Jump rule %u -> %u\n", pos, newpos); @@ -487,6 +474,27 @@ cleanup_match(struct ipt_entry_match *m, unsigned int *i) return 0; } +static inline int +standard_check(const struct ipt_entry_target *t, + unsigned int max_offset) +{ + struct ipt_standard_target *targ = (void *)t; + + /* Check standard info. */ + if (targ->verdict >= 0 + && targ->verdict > max_offset - sizeof(struct ipt_entry)) { + duprintf("ipt_standard_check: bad verdict (%i)\n", + targ->verdict); + return 0; + } + if (targ->verdict < -NF_MAX_VERDICT - 1) { + duprintf("ipt_standard_check: bad negative verdict (%i)\n", + targ->verdict); + return 0; + } + return 1; +} + static inline int check_match(struct ipt_entry_match *m, const char *name, @@ -545,18 +553,12 @@ check_entry(struct ipt_entry *e, const char *name, unsigned int size, return -EINVAL; } - if (e->target_offset + sizeof(struct ipt_entry_target) > e->next_offset) - return -EINVAL; - j = 0; ret = IPT_MATCH_ITERATE(e, check_match, name, &e->ip, e->comefrom, &j); if (ret != 0) goto cleanup_matches; t = ipt_get_target(e); - ret = -EINVAL; - if (e->target_offset + t->u.target_size > e->next_offset) - goto cleanup_matches; target = try_then_request_module(xt_find_target(AF_INET, t->u.user.name, t->u.user.revision), @@ -574,7 +576,12 @@ check_entry(struct ipt_entry *e, const char *name, unsigned int size, if (ret) goto err; - if (t->u.kernel.target->checkentry + if (t->u.kernel.target == &ipt_standard_target) { + if (!standard_check(t, size)) { + ret = -EINVAL; + goto cleanup_matches; + } + } else if (t->u.kernel.target->checkentry && !t->u.kernel.target->checkentry(name, e, target, t->data, t->u.target_size - sizeof(*t), @@ -724,7 +731,7 @@ translate_table(const char *name, if (ret != 0) { IPT_ENTRY_ITERATE(entry0, newinfo->size, - cleanup_entry, &i); + cleanup_entry, &i); return ret; } @@ -1525,22 +1532,15 @@ check_compat_entry_size_and_hooks(struct ipt_entry *e, return -EINVAL; } - if (e->target_offset + sizeof(struct compat_xt_entry_target) > - e->next_offset) - return -EINVAL; - off = 0; entry_offset = (void *)e - (void *)base; j = 0; ret = IPT_MATCH_ITERATE(e, compat_check_calc_match, name, &e->ip, e->comefrom, &off, &j); if (ret != 0) - goto cleanup_matches; + goto out; t = ipt_get_target(e); - ret = -EINVAL; - if (e->target_offset + t->u.target_size > e->next_offset) - goto cleanup_matches; target = try_then_request_module(xt_find_target(AF_INET, t->u.user.name, t->u.user.revision), @@ -1548,7 +1548,7 @@ check_compat_entry_size_and_hooks(struct ipt_entry *e, if (IS_ERR(target) || !target) { duprintf("check_entry: `%s' not found\n", t->u.user.name); ret = target ? PTR_ERR(target) : -ENOENT; - goto cleanup_matches; + goto out; } t->u.kernel.target = target; @@ -1575,10 +1575,7 @@ check_compat_entry_size_and_hooks(struct ipt_entry *e, (*i)++; return 0; - out: - module_put(t->u.kernel.target->me); -cleanup_matches: IPT_MATCH_ITERATE(e, cleanup_match, &j); return ret; } @@ -1601,16 +1598,18 @@ static inline int compat_copy_match_from_user(struct ipt_entry_match *m, ret = xt_check_match(match, AF_INET, dm->u.match_size - sizeof(*dm), name, hookmask, ip->proto, ip->invflags & IPT_INV_PROTO); + if (ret) + return ret; - if (!ret && m->u.kernel.match->checkentry + if (m->u.kernel.match->checkentry && !m->u.kernel.match->checkentry(name, ip, match, dm->data, dm->u.match_size - sizeof(*dm), hookmask)) { duprintf("ip_tables: check failed for `%s'.\n", m->u.kernel.match->name); - ret = -EINVAL; + return -EINVAL; } - return ret; + return 0; } static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr, @@ -1632,7 +1631,7 @@ static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr, ret = IPT_MATCH_ITERATE(e, compat_copy_match_from_user, dstptr, size, name, &de->ip, de->comefrom); if (ret) - goto err; + goto out; de->target_offset = e->target_offset - (origsize - *size); t = ipt_get_target(e); target = t->u.kernel.target; @@ -1655,18 +1654,22 @@ static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr, name, e->comefrom, e->ip.proto, e->ip.invflags & IPT_INV_PROTO); if (ret) - goto err; + goto out; - if (t->u.kernel.target->checkentry + ret = -EINVAL; + if (t->u.kernel.target == &ipt_standard_target) { + if (!standard_check(t, *size)) + goto out; + } else if (t->u.kernel.target->checkentry && !t->u.kernel.target->checkentry(name, de, target, t->data, t->u.target_size - sizeof(*t), de->comefrom)) { duprintf("ip_tables: compat: check failed for `%s'.\n", t->u.kernel.target->name); - ret = -EINVAL; - goto err; + goto out; } - err: + ret = 0; +out: return ret; } @@ -1680,7 +1683,7 @@ translate_compat_table(const char *name, unsigned int *hook_entries, unsigned int *underflows) { - unsigned int i, j; + unsigned int i; struct xt_table_info *newinfo, *info; void *pos, *entry0, *entry1; unsigned int size; @@ -1698,21 +1701,21 @@ translate_compat_table(const char *name, } duprintf("translate_compat_table: size %u\n", info->size); - j = 0; + i = 0; xt_compat_lock(AF_INET); /* Walk through entries, checking offsets. */ ret = IPT_ENTRY_ITERATE(entry0, total_size, check_compat_entry_size_and_hooks, info, &size, entry0, entry0 + total_size, - hook_entries, underflows, &j, name); + hook_entries, underflows, &i, name); if (ret != 0) goto out_unlock; ret = -EINVAL; - if (j != number) { + if (i != number) { duprintf("translate_compat_table: %u not %u entries\n", - j, number); + i, number); goto out_unlock; } @@ -1759,7 +1762,7 @@ translate_compat_table(const char *name, goto free_newinfo; /* And one copy for every other CPU */ - for_each_possible_cpu(i) + for_each_cpu(i) if (newinfo->entries[i] && newinfo->entries[i] != entry1) memcpy(newinfo->entries[i], entry1, newinfo->size); @@ -1771,10 +1774,8 @@ translate_compat_table(const char *name, free_newinfo: xt_free_table_info(newinfo); out: - IPT_ENTRY_ITERATE(entry0, total_size, cleanup_entry, &j); return ret; out_unlock: - compat_flush_offsets(); xt_compat_unlock(AF_INET); goto out; } @@ -1989,16 +1990,11 @@ compat_get_entries(struct compat_ipt_get_entries __user *uptr, int *len) return ret; } -static int do_ipt_get_ctl(struct sock *, int, void __user *, int *); - static int compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) { int ret; - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - switch (cmd) { case IPT_SO_GET_INFO: ret = get_info(user, len, 1); @@ -2007,7 +2003,8 @@ compat_do_ipt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) ret = compat_get_entries(user, len); break; default: - ret = do_ipt_get_ctl(sk, cmd, user, len); + duprintf("compat_do_ipt_get_ctl: unknown request %i\n", cmd); + ret = -EINVAL; } return ret; } @@ -2117,8 +2114,7 @@ int ipt_register_table(struct xt_table *table, const struct ipt_replace *repl) return ret; } - ret = xt_register_table(table, &bootstrap, newinfo); - if (ret != 0) { + if (xt_register_table(table, &bootstrap, newinfo) != 0) { xt_free_table_info(newinfo); return ret; } @@ -2244,39 +2240,22 @@ static int __init ip_tables_init(void) { int ret; - ret = xt_proto_init(AF_INET); - if (ret < 0) - goto err1; + xt_proto_init(AF_INET); /* Noone else will be downing sem now, so we won't sleep */ - ret = xt_register_target(&ipt_standard_target); - if (ret < 0) - goto err2; - ret = xt_register_target(&ipt_error_target); - if (ret < 0) - goto err3; - ret = xt_register_match(&icmp_matchstruct); - if (ret < 0) - goto err4; + xt_register_target(&ipt_standard_target); + xt_register_target(&ipt_error_target); + xt_register_match(&icmp_matchstruct); /* Register setsockopt */ ret = nf_register_sockopt(&ipt_sockopts); - if (ret < 0) - goto err5; + if (ret < 0) { + duprintf("Unable to register sockopts.\n"); + return ret; + } printk("ip_tables: (C) 2000-2006 Netfilter Core Team\n"); return 0; - -err5: - xt_unregister_match(&icmp_matchstruct); -err4: - xt_unregister_target(&ipt_error_target); -err3: - xt_unregister_target(&ipt_standard_target); -err2: - xt_proto_fini(AF_INET); -err1: - return ret; } static void __exit ip_tables_fini(void) diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index d994c5f57..aad9d28c8 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -10,6 +10,7 @@ * */ #include +#include #include #include #include @@ -172,10 +173,11 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, u_int32_t ip, struct clusterip_config *c; char buffer[16]; - c = kzalloc(sizeof(*c), GFP_ATOMIC); + c = kmalloc(sizeof(*c), GFP_ATOMIC); if (!c) return NULL; + memset(c, 0, sizeof(*c)); c->dev = dev; c->clusterip = ip; memcpy(&c->clustermac, &i->clustermac, ETH_ALEN); @@ -239,17 +241,25 @@ clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) struct iphdr *iph = skb->nh.iph; unsigned long hashval; u_int16_t sport, dport; - u_int16_t *ports; + struct tcphdr *th; + struct udphdr *uh; + struct icmphdr *ih; switch (iph->protocol) { case IPPROTO_TCP: + th = (void *)iph+iph->ihl*4; + sport = ntohs(th->source); + dport = ntohs(th->dest); + break; case IPPROTO_UDP: - case IPPROTO_SCTP: - case IPPROTO_DCCP: + uh = (void *)iph+iph->ihl*4; + sport = ntohs(uh->source); + dport = ntohs(uh->dest); + break; case IPPROTO_ICMP: - ports = (void *)iph+iph->ihl*4; - sport = ports[0]; - dport = ports[1]; + ih = (void *)iph+iph->ihl*4; + sport = ntohs(ih->un.echo.id); + dport = (ih->type<<8)|ih->code; break; default: if (net_ratelimit()) { diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index ebd94f2ab..8b3e7f99b 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c index 736c4b5a8..2fcf1075b 100644 --- a/net/ipv4/netfilter/ipt_NETMAP.c +++ b/net/ipv4/netfilter/ipt_NETMAP.c @@ -10,6 +10,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 269bc2067..0bba3c2bb 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c @@ -12,6 +12,7 @@ * published by the Free Software Foundation. */ +#include #include #include #include @@ -146,7 +147,6 @@ static void send_reset(struct sk_buff *oldskb, int hook) /* This packet will not be the same as the other: clear nf fields */ nf_reset(nskb); nskb->nfmark = 0; - skb_init_secmark(nskb); tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl); diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index d46fd677f..2a79b6137 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c @@ -47,6 +47,7 @@ */ #include +#include #include #include #include @@ -124,6 +125,11 @@ static void ulog_send(unsigned int nlgroupnum) if (ub->qlen > 1) ub->lastnlh->nlmsg_type = NLMSG_DONE; + if (!ub->skb) { + DEBUGP("ipt_ULOG: ulog_send: nothing to send\n"); + return; + } + NETLINK_CB(ub->skb).dst_group = nlgroupnum + 1; DEBUGP("ipt_ULOG: throwing %d packets to netlink group %u\n", ub->qlen, nlgroupnum + 1); diff --git a/net/ipv4/netfilter/ipt_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c index 3bd2368e1..7c6836c46 100644 --- a/net/ipv4/netfilter/ipt_hashlimit.c +++ b/net/ipv4/netfilter/ipt_hashlimit.c @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -80,7 +83,6 @@ struct ipt_hashlimit_htable { /* used internally */ spinlock_t lock; /* lock for list_head */ u_int32_t rnd; /* random seed for hash */ - int rnd_initialized; struct timer_list timer; /* timer for gc */ atomic_t count; /* number entries in table */ @@ -135,10 +137,8 @@ __dsthash_alloc_init(struct ipt_hashlimit_htable *ht, struct dsthash_dst *dst) /* initialize hash with random val at the time we allocate * the first hashtable entry */ - if (!ht->rnd_initialized) { + if (!ht->rnd) get_random_bytes(&ht->rnd, 4); - ht->rnd_initialized = 1; - } if (ht->cfg.max && atomic_read(&ht->count) >= ht->cfg.max) { @@ -217,7 +217,7 @@ static int htable_create(struct ipt_hashlimit_info *minfo) atomic_set(&hinfo->count, 0); atomic_set(&hinfo->use, 1); - hinfo->rnd_initialized = 0; + hinfo->rnd = 0; spin_lock_init(&hinfo->lock); hinfo->pde = create_proc_entry(minfo->name, 0, hashlimit_procdir); if (!hinfo->pde) { @@ -381,6 +381,49 @@ static inline void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now) dh->rateinfo.credit = dh->rateinfo.credit_cap; } +static inline int get_ports(const struct sk_buff *skb, int offset, + u16 ports[2]) +{ + union { + struct tcphdr th; + struct udphdr uh; + sctp_sctphdr_t sctph; + } hdr_u, *ptr_u; + + /* Must not be a fragment. */ + if (offset) + return 1; + + /* Must be big enough to read ports (both UDP and TCP have + them at the start). */ + ptr_u = skb_header_pointer(skb, skb->nh.iph->ihl*4, 8, &hdr_u); + if (!ptr_u) + return 1; + + switch (skb->nh.iph->protocol) { + case IPPROTO_TCP: + ports[0] = ptr_u->th.source; + ports[1] = ptr_u->th.dest; + break; + case IPPROTO_UDP: + ports[0] = ptr_u->uh.source; + ports[1] = ptr_u->uh.dest; + break; + case IPPROTO_SCTP: + ports[0] = ptr_u->sctph.source; + ports[1] = ptr_u->sctph.dest; + break; + default: + /* all other protocols don't supprot per-port hash + * buckets */ + ports[0] = ports[1] = 0; + break; + } + + return 0; +} + + static int hashlimit_match(const struct sk_buff *skb, const struct net_device *in, @@ -406,22 +449,8 @@ hashlimit_match(const struct sk_buff *skb, dst.src_ip = skb->nh.iph->saddr; if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_DPT ||hinfo->cfg.mode & IPT_HASHLIMIT_HASH_SPT) { - u_int16_t _ports[2], *ports; - - switch (skb->nh.iph->protocol) { - case IPPROTO_TCP: - case IPPROTO_UDP: - case IPPROTO_SCTP: - case IPPROTO_DCCP: - ports = skb_header_pointer(skb, skb->nh.iph->ihl*4, - sizeof(_ports), &_ports); - break; - default: - _ports[0] = _ports[1] = 0; - ports = _ports; - break; - } - if (!ports) { + u_int16_t ports[2]; + if (get_ports(skb, offset, ports)) { /* We've been asked to examine this packet, and we can't. Hence, no choice but to drop. */ *hotdrop = 1; @@ -454,12 +483,15 @@ hashlimit_match(const struct sk_buff *skb, dh->rateinfo.credit_cap = user2credits(hinfo->cfg.avg * hinfo->cfg.burst); dh->rateinfo.cost = user2credits(hinfo->cfg.avg); - } else { - /* update expiration timeout */ - dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); - rateinfo_recalc(dh, now); + + spin_unlock_bh(&hinfo->lock); + return 1; } + /* update expiration timeout */ + dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); + + rateinfo_recalc(dh, now); if (dh->rateinfo.credit >= dh->rateinfo.cost) { /* We're underlimit. */ dh->rateinfo.credit -= dh->rateinfo.cost; @@ -505,9 +537,6 @@ hashlimit_checkentry(const char *tablename, if (!r->cfg.expire) return 0; - if (r->name[sizeof(r->name) - 1] != '\0') - return 0; - /* This is the best we've got: We cannot release and re-grab lock, * since checkentry() is called before ip_tables.c grabs ipt_mutex. * We also cannot grab the hashtable spinlock, since htable_create will @@ -532,7 +561,7 @@ static void hashlimit_destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) { - struct ipt_hashlimit_info *r = matchinfo; + struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo; htable_put(r->hinfo); } diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 61a2139f9..b847ee409 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c @@ -1,499 +1,1007 @@ -/* - * Copyright (c) 2006 Patrick McHardy - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This is a replacement of the old ipt_recent module, which carried the - * following copyright notice: - * - * Author: Stephen Frost - * Copyright 2002-2003, Stephen Frost, 2.5.x port by laforge@netfilter.org - */ -#include -#include +/* Kernel module to check if the source address has been seen recently. */ +/* Copyright 2002-2003, Stephen Frost, 2.5.x port by laforge@netfilter.org */ +/* Author: Stephen Frost */ +/* Project Page: http://snowman.net/projects/ipt_recent/ */ +/* This software is distributed under the terms of the GPL, Version 2 */ +/* This copyright does not cover user programs that use kernel services + * by normal system calls. */ + +#include +#include #include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -MODULE_AUTHOR("Patrick McHardy "); -MODULE_DESCRIPTION("IP tables recently seen matching module"); -MODULE_LICENSE("GPL"); +#undef DEBUG +#define HASH_LOG 9 +/* Defaults, these can be overridden on the module command-line. */ static unsigned int ip_list_tot = 100; static unsigned int ip_pkt_list_tot = 20; static unsigned int ip_list_hash_size = 0; static unsigned int ip_list_perms = 0644; +#ifdef DEBUG +static int debug = 1; +#endif + +static char version[] = +KERN_INFO RECENT_NAME " " RECENT_VER ": Stephen Frost . http://snowman.net/projects/ipt_recent/\n"; + +MODULE_AUTHOR("Stephen Frost "); +MODULE_DESCRIPTION("IP tables recently seen matching module " RECENT_VER); +MODULE_LICENSE("GPL"); module_param(ip_list_tot, uint, 0400); module_param(ip_pkt_list_tot, uint, 0400); module_param(ip_list_hash_size, uint, 0400); module_param(ip_list_perms, uint, 0400); -MODULE_PARM_DESC(ip_list_tot, "number of IPs to remember per list"); -MODULE_PARM_DESC(ip_pkt_list_tot, "number of packets per IP to remember (max. 255)"); -MODULE_PARM_DESC(ip_list_hash_size, "size of hash table used to look up IPs"); -MODULE_PARM_DESC(ip_list_perms, "permissions on /proc/net/ipt_recent/* files"); - - -struct recent_entry { - struct list_head list; - struct list_head lru_list; - u_int32_t addr; - u_int8_t ttl; - u_int8_t index; - u_int16_t nstamps; - unsigned long stamps[0]; +#ifdef DEBUG +module_param(debug, bool, 0600); +MODULE_PARM_DESC(debug,"enable debugging output"); +#endif +MODULE_PARM_DESC(ip_list_tot,"number of IPs to remember per list"); +MODULE_PARM_DESC(ip_pkt_list_tot,"number of packets per IP to remember"); +MODULE_PARM_DESC(ip_list_hash_size,"size of hash table used to look up IPs"); +MODULE_PARM_DESC(ip_list_perms,"permissions on /proc/net/ipt_recent/* files"); + +/* Structure of our list of recently seen addresses. */ +struct recent_ip_list { + u_int32_t addr; + u_int8_t ttl; + unsigned long last_seen; + unsigned long *last_pkts; + u_int32_t oldest_pkt; + u_int32_t hash_entry; + u_int32_t time_pos; +}; + +struct time_info_list { + u_int32_t position; + u_int32_t time; }; -struct recent_table { - struct list_head list; - char name[IPT_RECENT_NAME_LEN]; +/* Structure of our linked list of tables of recent lists. */ +struct recent_ip_tables { + char name[IPT_RECENT_NAME_LEN]; + int count; + int time_pos; + struct recent_ip_list *table; + struct recent_ip_tables *next; + spinlock_t list_lock; + int *hash_table; + struct time_info_list *time_info; #ifdef CONFIG_PROC_FS - struct proc_dir_entry *proc; -#endif - unsigned int refcnt; - unsigned int entries; - struct list_head lru_list; - struct list_head iphash[0]; + struct proc_dir_entry *status_proc; +#endif /* CONFIG_PROC_FS */ }; -static LIST_HEAD(tables); +/* Our current list of addresses we have recently seen. + * Only added to on a --set, and only updated on --set || --update + */ +static struct recent_ip_tables *r_tables = NULL; + +/* We protect r_list with this spinlock so two processors are not modifying + * the list at the same time. + */ static DEFINE_SPINLOCK(recent_lock); -static DEFINE_MUTEX(recent_mutex); #ifdef CONFIG_PROC_FS -static struct proc_dir_entry *proc_dir; -static struct file_operations recent_fops; +/* Our /proc/net/ipt_recent entry */ +static struct proc_dir_entry *proc_net_ipt_recent = NULL; #endif -static u_int32_t hash_rnd; -static int hash_rnd_initted; - -static unsigned int recent_entry_hash(u_int32_t addr) +/* Function declaration for later. */ +static int +match(const struct sk_buff *skb, + const struct net_device *in, + const struct net_device *out, + const struct xt_match *match, + const void *matchinfo, + int offset, + unsigned int protoff, + int *hotdrop); + +/* Function to hash a given address into the hash table of table_size size */ +static int hash_func(unsigned int addr, int table_size) { - if (!hash_rnd_initted) { - get_random_bytes(&hash_rnd, 4); - hash_rnd_initted = 1; - } - return jhash_1word(addr, hash_rnd) & (ip_list_hash_size - 1); -} + int result = 0; + unsigned int value = addr; + do { result ^= value; } while((value >>= HASH_LOG)); + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": %d = hash_func(%u,%d)\n", + result & (table_size - 1), + addr, + table_size); +#endif -static struct recent_entry * -recent_entry_lookup(const struct recent_table *table, u_int32_t addr, u_int8_t ttl) -{ - struct recent_entry *e; - unsigned int h; - - h = recent_entry_hash(addr); - list_for_each_entry(e, &table->iphash[h], list) - if (e->addr == addr && (ttl == e->ttl || !ttl || !e->ttl)) - return e; - return NULL; + return(result & (table_size - 1)); } -static void recent_entry_remove(struct recent_table *t, struct recent_entry *e) +#ifdef CONFIG_PROC_FS +/* This is the function which produces the output for our /proc output + * interface which lists each IP address, the last seen time and the + * other recent times the address was seen. + */ + +static int ip_recent_get_info(char *buffer, char **start, off_t offset, int length, int *eof, void *data) { - list_del(&e->list); - list_del(&e->lru_list); - kfree(e); - t->entries--; + int len = 0, count, last_len = 0, pkt_count; + off_t pos = 0; + off_t begin = 0; + struct recent_ip_tables *curr_table; + + curr_table = (struct recent_ip_tables*) data; + + spin_lock_bh(&curr_table->list_lock); + for(count = 0; count < ip_list_tot; count++) { + if(!curr_table->table[count].addr) continue; + last_len = len; + len += sprintf(buffer+len,"src=%u.%u.%u.%u ",NIPQUAD(curr_table->table[count].addr)); + len += sprintf(buffer+len,"ttl: %u ",curr_table->table[count].ttl); + len += sprintf(buffer+len,"last_seen: %lu ",curr_table->table[count].last_seen); + len += sprintf(buffer+len,"oldest_pkt: %u ",curr_table->table[count].oldest_pkt); + len += sprintf(buffer+len,"last_pkts: %lu",curr_table->table[count].last_pkts[0]); + for(pkt_count = 1; pkt_count < ip_pkt_list_tot; pkt_count++) { + if(!curr_table->table[count].last_pkts[pkt_count]) break; + len += sprintf(buffer+len,", %lu",curr_table->table[count].last_pkts[pkt_count]); + } + len += sprintf(buffer+len,"\n"); + pos = begin + len; + if(pos < offset) { len = 0; begin = pos; } + if(pos > offset + length) { len = last_len; break; } + } + + *start = buffer + (offset - begin); + len -= (offset - begin); + if(len > length) len = length; + + spin_unlock_bh(&curr_table->list_lock); + return len; } -static struct recent_entry * -recent_entry_init(struct recent_table *t, u_int32_t addr, u_int8_t ttl) +/* ip_recent_ctrl provides an interface for users to modify the table + * directly. This allows adding entries, removing entries, and + * flushing the entire table. + * This is done by opening up the appropriate table for writing and + * sending one of: + * xx.xx.xx.xx -- Add entry to table with current time + * +xx.xx.xx.xx -- Add entry to table with current time + * -xx.xx.xx.xx -- Remove entry from table + * clear -- Flush table, remove all entries + */ + +static int ip_recent_ctrl(struct file *file, const char __user *input, unsigned long size, void *data) { - struct recent_entry *e; + static const u_int32_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff }; + u_int32_t val; + int base, used = 0; + char c, *cp; + union iaddr { + uint8_t bytes[4]; + uint32_t word; + } res; + uint8_t *pp = res.bytes; + int digit; + + char buffer[20]; + int len, check_set = 0, count; + u_int32_t addr = 0; + struct sk_buff *skb; + struct ipt_recent_info *info; + struct recent_ip_tables *curr_table; + + curr_table = (struct recent_ip_tables*) data; + + if(size > 20) len = 20; else len = size; + + if(copy_from_user(buffer,input,len)) return -EFAULT; + + if(len < 20) buffer[len] = '\0'; + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": ip_recent_ctrl len: %d, input: `%.20s'\n",len,buffer); +#endif + + cp = buffer; + while(isspace(*cp)) { cp++; used++; if(used >= len-5) return used; } - if (t->entries >= ip_list_tot) { - e = list_entry(t->lru_list.next, struct recent_entry, lru_list); - recent_entry_remove(t, e); + /* Check if we are asked to flush the entire table */ + if(!memcmp(cp,"clear",5)) { + used += 5; + spin_lock_bh(&curr_table->list_lock); + curr_table->time_pos = 0; + for(count = 0; count < ip_list_hash_size; count++) { + curr_table->hash_table[count] = -1; + } + for(count = 0; count < ip_list_tot; count++) { + curr_table->table[count].last_seen = 0; + curr_table->table[count].addr = 0; + curr_table->table[count].ttl = 0; + memset(curr_table->table[count].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long)); + curr_table->table[count].oldest_pkt = 0; + curr_table->table[count].time_pos = 0; + curr_table->time_info[count].position = count; + curr_table->time_info[count].time = 0; + } + spin_unlock_bh(&curr_table->list_lock); + return used; } - e = kmalloc(sizeof(*e) + sizeof(e->stamps[0]) * ip_pkt_list_tot, - GFP_ATOMIC); - if (e == NULL) - return NULL; - e->addr = addr; - e->ttl = ttl; - e->stamps[0] = jiffies; - e->nstamps = 1; - e->index = 1; - list_add_tail(&e->list, &t->iphash[recent_entry_hash(addr)]); - list_add_tail(&e->lru_list, &t->lru_list); - t->entries++; - return e; -} -static void recent_entry_update(struct recent_table *t, struct recent_entry *e) -{ - e->stamps[e->index++] = jiffies; - if (e->index > e->nstamps) - e->nstamps = e->index; - e->index %= ip_pkt_list_tot; - list_move_tail(&e->lru_list, &t->lru_list); -} + check_set = IPT_RECENT_SET; + switch(*cp) { + case '+': check_set = IPT_RECENT_SET; cp++; used++; break; + case '-': check_set = IPT_RECENT_REMOVE; cp++; used++; break; + default: if(!isdigit(*cp)) return (used+1); break; + } -static struct recent_table *recent_table_lookup(const char *name) -{ - struct recent_table *t; +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": ip_recent_ctrl cp: `%c', check_set: %d\n",*cp,check_set); +#endif + /* Get addr (effectively inet_aton()) */ + /* Shamelessly stolen from libc, a function in the kernel for doing + * this would, of course, be greatly preferred, but our options appear + * to be rather limited, so we will just do it ourselves here. + */ + res.word = 0; + + c = *cp; + for(;;) { + if(!isdigit(c)) return used; + val = 0; base = 10; digit = 0; + if(c == '0') { + c = *++cp; + if(c == 'x' || c == 'X') base = 16, c = *++cp; + else { base = 8; digit = 1; } + } + for(;;) { + if(isascii(c) && isdigit(c)) { + if(base == 8 && (c == '8' || c == '0')) return used; + val = (val * base) + (c - '0'); + c = *++cp; + digit = 1; + } else if(base == 16 && isascii(c) && isxdigit(c)) { + val = (val << 4) | (c + 10 - (islower(c) ? 'a' : 'A')); + c = *++cp; + digit = 1; + } else break; + } + if(c == '.') { + if(pp > res.bytes + 2 || val > 0xff) return used; + *pp++ = val; + c = *++cp; + } else break; + } + used = cp - buffer; + if(c != '\0' && (!isascii(c) || !isspace(c))) return used; + if(c == '\n') used++; + if(!digit) return used; - list_for_each_entry(t, &tables, list) - if (!strcmp(t->name, name)) - return t; - return NULL; -} + if(val > max[pp - res.bytes]) return used; + addr = res.word | htonl(val); -static void recent_table_flush(struct recent_table *t) -{ - struct recent_entry *e, *next; - unsigned int i; + if(!addr && check_set == IPT_RECENT_SET) return used; + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": ip_recent_ctrl c: %c, addr: %u used: %d\n",c,addr,used); +#endif - for (i = 0; i < ip_list_hash_size; i++) { - list_for_each_entry_safe(e, next, &t->iphash[i], list) - recent_entry_remove(t, e); + /* Set up and just call match */ + info = kmalloc(sizeof(struct ipt_recent_info),GFP_KERNEL); + if(!info) { return -ENOMEM; } + info->seconds = 0; + info->hit_count = 0; + info->check_set = check_set; + info->invert = 0; + info->side = IPT_RECENT_SOURCE; + strncpy(info->name,curr_table->name,IPT_RECENT_NAME_LEN); + info->name[IPT_RECENT_NAME_LEN-1] = '\0'; + + skb = kmalloc(sizeof(struct sk_buff),GFP_KERNEL); + if (!skb) { + used = -ENOMEM; + goto out_free_info; + } + skb->nh.iph = kmalloc(sizeof(struct iphdr),GFP_KERNEL); + if (!skb->nh.iph) { + used = -ENOMEM; + goto out_free_skb; } + + skb->nh.iph->saddr = addr; + skb->nh.iph->daddr = 0; + /* Clear ttl since we have no way of knowing it */ + skb->nh.iph->ttl = 0; + match(skb,NULL,NULL,NULL,info,0,0,NULL); + + kfree(skb->nh.iph); +out_free_skb: + kfree(skb); +out_free_info: + kfree(info); + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": Leaving ip_recent_ctrl addr: %u used: %d\n",addr,used); +#endif + return used; } +#endif /* CONFIG_PROC_FS */ + +/* 'match' is our primary function, called by the kernel whenever a rule is + * hit with our module as an option to it. + * What this function does depends on what was specifically asked of it by + * the user: + * --set -- Add or update last seen time of the source address of the packet + * -- matchinfo->check_set == IPT_RECENT_SET + * --rcheck -- Just check if the source address is in the list + * -- matchinfo->check_set == IPT_RECENT_CHECK + * --update -- If the source address is in the list, update last_seen + * -- matchinfo->check_set == IPT_RECENT_UPDATE + * --remove -- If the source address is in the list, remove it + * -- matchinfo->check_set == IPT_RECENT_REMOVE + * --seconds -- Option to --rcheck/--update, only match if last_seen within seconds + * -- matchinfo->seconds + * --hitcount -- Option to --rcheck/--update, only match if seen hitcount times + * -- matchinfo->hit_count + * --seconds and --hitcount can be combined + */ static int -ipt_recent_match(const struct sk_buff *skb, - const struct net_device *in, const struct net_device *out, - const struct xt_match *match, const void *matchinfo, - int offset, unsigned int protoff, int *hotdrop) +match(const struct sk_buff *skb, + const struct net_device *in, + const struct net_device *out, + const struct xt_match *match, + const void *matchinfo, + int offset, + unsigned int protoff, + int *hotdrop) { + int pkt_count, hits_found, ans; + unsigned long now; const struct ipt_recent_info *info = matchinfo; - struct recent_table *t; - struct recent_entry *e; - u_int32_t addr; - u_int8_t ttl; - int ret = info->invert; + u_int32_t addr = 0, time_temp; + u_int8_t ttl = skb->nh.iph->ttl; + int *hash_table; + int orig_hash_result, hash_result, temp, location = 0, time_loc, end_collision_chain = -1; + struct time_info_list *time_info; + struct recent_ip_tables *curr_table; + struct recent_ip_tables *last_table; + struct recent_ip_list *r_list; + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match() called\n"); +#endif - if (info->side == IPT_RECENT_DEST) - addr = skb->nh.iph->daddr; - else - addr = skb->nh.iph->saddr; + /* Default is false ^ info->invert */ + ans = info->invert; - ttl = skb->nh.iph->ttl; - /* use TTL as seen before forwarding */ - if (out && !skb->sk) - ttl++; +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): name = '%s'\n",info->name); +#endif + + /* if out != NULL then routing has been done and TTL changed. + * We change it back here internally for match what came in before routing. */ + if(out) ttl++; + /* Find the right table */ spin_lock_bh(&recent_lock); - t = recent_table_lookup(info->name); - e = recent_entry_lookup(t, addr, - info->check_set & IPT_RECENT_TTL ? ttl : 0); - if (e == NULL) { - if (!(info->check_set & IPT_RECENT_SET)) - goto out; - e = recent_entry_init(t, addr, ttl); - if (e == NULL) - *hotdrop = 1; - ret ^= 1; - goto out; + curr_table = r_tables; + while( (last_table = curr_table) && strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (curr_table = curr_table->next) ); + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): table found('%s')\n",info->name); +#endif + + spin_unlock_bh(&recent_lock); + + /* Table with this name not found, match impossible */ + if(!curr_table) { return ans; } + + /* Make sure no one is changing the list while we work with it */ + spin_lock_bh(&curr_table->list_lock); + + r_list = curr_table->table; + if(info->side == IPT_RECENT_DEST) addr = skb->nh.iph->daddr; else addr = skb->nh.iph->saddr; + + if(!addr) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match() address (%u) invalid, leaving.\n",addr); +#endif + spin_unlock_bh(&curr_table->list_lock); + return ans; } - if (info->check_set & IPT_RECENT_SET) - ret ^= 1; - else if (info->check_set & IPT_RECENT_REMOVE) { - recent_entry_remove(t, e); - ret ^= 1; - } else if (info->check_set & (IPT_RECENT_CHECK | IPT_RECENT_UPDATE)) { - unsigned long t = jiffies - info->seconds * HZ; - unsigned int i, hits = 0; - - for (i = 0; i < e->nstamps; i++) { - if (info->seconds && time_after(t, e->stamps[i])) - continue; - if (++hits >= info->hit_count) { - ret ^= 1; - break; - } +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): checking table, addr: %u, ttl: %u, orig_ttl: %u\n",addr,ttl,skb->nh.iph->ttl); +#endif + + /* Get jiffies now in case they changed while we were waiting for a lock */ + now = jiffies; + hash_table = curr_table->hash_table; + time_info = curr_table->time_info; + + orig_hash_result = hash_result = hash_func(addr,ip_list_hash_size); + /* Hash entry at this result used */ + /* Check for TTL match if requested. If TTL is zero then a match would never + * happen, so match regardless of existing TTL in that case. Zero means the + * entry was added via the /proc interface anyway, so we will just use the + * first TTL we get for that IP address. */ + if(info->check_set & IPT_RECENT_TTL) { + while(hash_table[hash_result] != -1 && !(r_list[hash_table[hash_result]].addr == addr && + (!r_list[hash_table[hash_result]].ttl || r_list[hash_table[hash_result]].ttl == ttl))) { + /* Collision in hash table */ + hash_result = (hash_result + 1) % ip_list_hash_size; + } + } else { + while(hash_table[hash_result] != -1 && r_list[hash_table[hash_result]].addr != addr) { + /* Collision in hash table */ + hash_result = (hash_result + 1) % ip_list_hash_size; } } - if (info->check_set & IPT_RECENT_SET || - (info->check_set & IPT_RECENT_UPDATE && ret)) { - recent_entry_update(t, e); - e->ttl = ttl; + if(hash_table[hash_result] == -1 && !(info->check_set & IPT_RECENT_SET)) { + /* IP not in list and not asked to SET */ + spin_unlock_bh(&curr_table->list_lock); + return ans; } -out: - spin_unlock_bh(&recent_lock); - return ret; -} -static int -ipt_recent_checkentry(const char *tablename, const void *ip, - const struct xt_match *match, void *matchinfo, - unsigned int matchsize, unsigned int hook_mask) -{ - const struct ipt_recent_info *info = matchinfo; - struct recent_table *t; - unsigned i; - int ret = 0; + /* Check if we need to handle the collision, do not need to on REMOVE */ + if(orig_hash_result != hash_result && !(info->check_set & IPT_RECENT_REMOVE)) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): Collision in hash table. (or: %d,hr: %d,oa: %u,ha: %u)\n", + orig_hash_result, + hash_result, + r_list[hash_table[orig_hash_result]].addr, + addr); +#endif + + /* We had a collision. + * orig_hash_result is where we started, hash_result is where we ended up. + * So, swap them because we are likely to see the same guy again sooner */ +#ifdef DEBUG + if(debug) { + printk(KERN_INFO RECENT_NAME ": match(): Collision; hash_table[orig_hash_result] = %d\n",hash_table[orig_hash_result]); + printk(KERN_INFO RECENT_NAME ": match(): Collision; r_list[hash_table[orig_hash_result]].hash_entry = %d\n", + r_list[hash_table[orig_hash_result]].hash_entry); + } +#endif + + r_list[hash_table[orig_hash_result]].hash_entry = hash_result; - if (hweight8(info->check_set & - (IPT_RECENT_SET | IPT_RECENT_REMOVE | - IPT_RECENT_CHECK | IPT_RECENT_UPDATE)) != 1) - return 0; - if ((info->check_set & (IPT_RECENT_SET | IPT_RECENT_REMOVE)) && - (info->seconds || info->hit_count)) - return 0; - if (info->name[0] == '\0' || - strnlen(info->name, IPT_RECENT_NAME_LEN) == IPT_RECENT_NAME_LEN) - return 0; - mutex_lock(&recent_mutex); - t = recent_table_lookup(info->name); - if (t != NULL) { - t->refcnt++; - ret = 1; - goto out; + temp = hash_table[orig_hash_result]; +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): Collision; hash_table[hash_result] = %d\n",hash_table[hash_result]); +#endif + hash_table[orig_hash_result] = hash_table[hash_result]; + hash_table[hash_result] = temp; + temp = hash_result; + hash_result = orig_hash_result; + orig_hash_result = temp; + time_info[r_list[hash_table[orig_hash_result]].time_pos].position = hash_table[orig_hash_result]; + if(hash_table[hash_result] != -1) { + r_list[hash_table[hash_result]].hash_entry = hash_result; + time_info[r_list[hash_table[hash_result]].time_pos].position = hash_table[hash_result]; + } + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): Collision handled.\n"); +#endif } - t = kzalloc(sizeof(*t) + sizeof(t->iphash[0]) * ip_list_hash_size, - GFP_KERNEL); - if (t == NULL) - goto out; - t->refcnt = 1; - strcpy(t->name, info->name); - INIT_LIST_HEAD(&t->lru_list); - for (i = 0; i < ip_list_hash_size; i++) - INIT_LIST_HEAD(&t->iphash[i]); -#ifdef CONFIG_PROC_FS - t->proc = create_proc_entry(t->name, ip_list_perms, proc_dir); - if (t->proc == NULL) { - kfree(t); - goto out; + if(hash_table[hash_result] == -1) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): New table entry. (hr: %d,ha: %u)\n", + hash_result, addr); +#endif + + /* New item found and IPT_RECENT_SET, so we need to add it */ + location = time_info[curr_table->time_pos].position; + hash_table[r_list[location].hash_entry] = -1; + hash_table[hash_result] = location; + memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long)); + r_list[location].time_pos = curr_table->time_pos; + r_list[location].addr = addr; + r_list[location].ttl = ttl; + r_list[location].last_seen = now; + r_list[location].oldest_pkt = 1; + r_list[location].last_pkts[0] = now; + r_list[location].hash_entry = hash_result; + time_info[curr_table->time_pos].time = r_list[location].last_seen; + curr_table->time_pos = (curr_table->time_pos + 1) % ip_list_tot; + + ans = !info->invert; + } else { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): Existing table entry. (hr: %d,ha: %u)\n", + hash_result, + addr); +#endif + + /* Existing item found */ + location = hash_table[hash_result]; + /* We have a match on address, now to make sure it meets all requirements for a + * full match. */ + if(info->check_set & IPT_RECENT_CHECK || info->check_set & IPT_RECENT_UPDATE) { + if(!info->seconds && !info->hit_count) ans = !info->invert; else ans = info->invert; + if(info->seconds && !info->hit_count) { + if(time_before_eq(now,r_list[location].last_seen+info->seconds*HZ)) ans = !info->invert; else ans = info->invert; + } + if(info->seconds && info->hit_count) { + for(pkt_count = 0, hits_found = 0; pkt_count < ip_pkt_list_tot; pkt_count++) { + if(r_list[location].last_pkts[pkt_count] == 0) break; + if(time_before_eq(now,r_list[location].last_pkts[pkt_count]+info->seconds*HZ)) hits_found++; + } + if(hits_found >= info->hit_count) ans = !info->invert; else ans = info->invert; + } + if(info->hit_count && !info->seconds) { + for(pkt_count = 0, hits_found = 0; pkt_count < ip_pkt_list_tot; pkt_count++) { + if(r_list[location].last_pkts[pkt_count] == 0) break; + hits_found++; + } + if(hits_found >= info->hit_count) ans = !info->invert; else ans = info->invert; + } + } +#ifdef DEBUG + if(debug) { + if(ans) + printk(KERN_INFO RECENT_NAME ": match(): match addr: %u\n",addr); + else + printk(KERN_INFO RECENT_NAME ": match(): no match addr: %u\n",addr); + } +#endif + + /* If and only if we have been asked to SET, or to UPDATE (on match) do we add the + * current timestamp to the last_seen. */ + if((info->check_set & IPT_RECENT_SET && (ans = !info->invert)) || (info->check_set & IPT_RECENT_UPDATE && ans)) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): SET or UPDATE; updating time info.\n"); +#endif + /* Have to update our time info */ + time_loc = r_list[location].time_pos; + time_info[time_loc].time = now; + time_info[time_loc].position = location; + while((time_info[(time_loc+1) % ip_list_tot].time < time_info[time_loc].time) && ((time_loc+1) % ip_list_tot) != curr_table->time_pos) { + time_temp = time_info[time_loc].time; + time_info[time_loc].time = time_info[(time_loc+1)%ip_list_tot].time; + time_info[(time_loc+1)%ip_list_tot].time = time_temp; + time_temp = time_info[time_loc].position; + time_info[time_loc].position = time_info[(time_loc+1)%ip_list_tot].position; + time_info[(time_loc+1)%ip_list_tot].position = time_temp; + r_list[time_info[time_loc].position].time_pos = time_loc; + r_list[time_info[(time_loc+1)%ip_list_tot].position].time_pos = (time_loc+1)%ip_list_tot; + time_loc = (time_loc+1) % ip_list_tot; + } + r_list[location].time_pos = time_loc; + r_list[location].ttl = ttl; + r_list[location].last_pkts[r_list[location].oldest_pkt] = now; + r_list[location].oldest_pkt = ++r_list[location].oldest_pkt % ip_pkt_list_tot; + r_list[location].last_seen = now; + } + /* If we have been asked to remove the entry from the list, just set it to 0 */ + if(info->check_set & IPT_RECENT_REMOVE) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): REMOVE; clearing entry (or: %d, hr: %d).\n",orig_hash_result,hash_result); +#endif + /* Check if this is part of a collision chain */ + while(hash_table[(orig_hash_result+1) % ip_list_hash_size] != -1) { + orig_hash_result++; + if(hash_func(r_list[hash_table[orig_hash_result]].addr,ip_list_hash_size) == hash_result) { + /* Found collision chain, how deep does this rabbit hole go? */ +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): REMOVE; found collision chain.\n"); +#endif + end_collision_chain = orig_hash_result; + } + } + if(end_collision_chain != -1) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match(): REMOVE; part of collision chain, moving to end.\n"); +#endif + /* Part of a collision chain, swap it with the end of the chain + * before removing. */ + r_list[hash_table[end_collision_chain]].hash_entry = hash_result; + temp = hash_table[end_collision_chain]; + hash_table[end_collision_chain] = hash_table[hash_result]; + hash_table[hash_result] = temp; + time_info[r_list[hash_table[hash_result]].time_pos].position = hash_table[hash_result]; + hash_result = end_collision_chain; + r_list[hash_table[hash_result]].hash_entry = hash_result; + time_info[r_list[hash_table[hash_result]].time_pos].position = hash_table[hash_result]; + } + location = hash_table[hash_result]; + hash_table[r_list[location].hash_entry] = -1; + time_loc = r_list[location].time_pos; + time_info[time_loc].time = 0; + time_info[time_loc].position = location; + while((time_info[(time_loc+1) % ip_list_tot].time < time_info[time_loc].time) && ((time_loc+1) % ip_list_tot) != curr_table->time_pos) { + time_temp = time_info[time_loc].time; + time_info[time_loc].time = time_info[(time_loc+1)%ip_list_tot].time; + time_info[(time_loc+1)%ip_list_tot].time = time_temp; + time_temp = time_info[time_loc].position; + time_info[time_loc].position = time_info[(time_loc+1)%ip_list_tot].position; + time_info[(time_loc+1)%ip_list_tot].position = time_temp; + r_list[time_info[time_loc].position].time_pos = time_loc; + r_list[time_info[(time_loc+1)%ip_list_tot].position].time_pos = (time_loc+1)%ip_list_tot; + time_loc = (time_loc+1) % ip_list_tot; + } + r_list[location].time_pos = time_loc; + r_list[location].last_seen = 0; + r_list[location].addr = 0; + r_list[location].ttl = 0; + memset(r_list[location].last_pkts,0,ip_pkt_list_tot*sizeof(unsigned long)); + r_list[location].oldest_pkt = 0; + ans = !info->invert; + } + spin_unlock_bh(&curr_table->list_lock); + return ans; } - t->proc->proc_fops = &recent_fops; - t->proc->data = t; + + spin_unlock_bh(&curr_table->list_lock); +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": match() left.\n"); #endif - spin_lock_bh(&recent_lock); - list_add_tail(&t->list, &tables); - spin_unlock_bh(&recent_lock); - ret = 1; -out: - mutex_unlock(&recent_mutex); - return ret; + return ans; } -static void -ipt_recent_destroy(const struct xt_match *match, void *matchinfo, - unsigned int matchsize) +/* This function is to verify that the rule given during the userspace iptables + * command is correct. + * If the command is valid then we check if the table name referred to by the + * rule exists, if not it is created. + */ +static int +checkentry(const char *tablename, + const void *ip, + const struct xt_match *match, + void *matchinfo, + unsigned int matchsize, + unsigned int hook_mask) { + int flag = 0, c; + unsigned long *hold; const struct ipt_recent_info *info = matchinfo; - struct recent_table *t; + struct recent_ip_tables *curr_table, *find_table, *last_table; - mutex_lock(&recent_mutex); - t = recent_table_lookup(info->name); - if (--t->refcnt == 0) { - spin_lock_bh(&recent_lock); - list_del(&t->list); +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() entered.\n"); +#endif + + /* seconds and hit_count only valid for CHECK/UPDATE */ + if(info->check_set & IPT_RECENT_SET) { flag++; if(info->seconds || info->hit_count) return 0; } + if(info->check_set & IPT_RECENT_REMOVE) { flag++; if(info->seconds || info->hit_count) return 0; } + if(info->check_set & IPT_RECENT_CHECK) flag++; + if(info->check_set & IPT_RECENT_UPDATE) flag++; + + /* One and only one of these should ever be set */ + if(flag != 1) return 0; + + /* Name must be set to something */ + if(!info->name || !info->name[0]) return 0; + + /* Things look good, create a list for this if it does not exist */ + /* Lock the linked list while we play with it */ + spin_lock_bh(&recent_lock); + + /* Look for an entry with this name already created */ + /* Finds the end of the list and the entry before the end if current name does not exist */ + find_table = r_tables; + while( (last_table = find_table) && strncmp(info->name,find_table->name,IPT_RECENT_NAME_LEN) && (find_table = find_table->next) ); + + /* If a table already exists just increment the count on that table and return */ + if(find_table) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: table found (%s), incrementing count.\n",info->name); +#endif + find_table->count++; spin_unlock_bh(&recent_lock); - recent_table_flush(t); -#ifdef CONFIG_PROC_FS - remove_proc_entry(t->name, proc_dir); + return 1; + } + + spin_unlock_bh(&recent_lock); + + /* Table with this name not found */ + /* Allocate memory for new linked list item */ + +#ifdef DEBUG + if(debug) { + printk(KERN_INFO RECENT_NAME ": checkentry: no table found (%s)\n",info->name); + printk(KERN_INFO RECENT_NAME ": checkentry: Allocationg %d for link-list entry.\n",sizeof(struct recent_ip_tables)); + } +#endif + + curr_table = vmalloc(sizeof(struct recent_ip_tables)); + if(curr_table == NULL) return 0; + + spin_lock_init(&curr_table->list_lock); + curr_table->next = NULL; + curr_table->count = 1; + curr_table->time_pos = 0; + strncpy(curr_table->name,info->name,IPT_RECENT_NAME_LEN); + curr_table->name[IPT_RECENT_NAME_LEN-1] = '\0'; + + /* Allocate memory for this table and the list of packets in each entry. */ +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for table (%s).\n", + sizeof(struct recent_ip_list)*ip_list_tot, + info->name); +#endif + + curr_table->table = vmalloc(sizeof(struct recent_ip_list)*ip_list_tot); + if(curr_table->table == NULL) { vfree(curr_table); return 0; } + memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot); +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for pkt_list.\n", + sizeof(unsigned long)*ip_pkt_list_tot*ip_list_tot); #endif - kfree(t); + + hold = vmalloc(sizeof(unsigned long)*ip_pkt_list_tot*ip_list_tot); +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: After pkt_list allocation.\n"); +#endif + if(hold == NULL) { + printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for pkt_list.\n"); + vfree(curr_table->table); + vfree(curr_table); + return 0; + } + for(c = 0; c < ip_list_tot; c++) { + curr_table->table[c].last_pkts = hold + c*ip_pkt_list_tot; } - mutex_unlock(&recent_mutex); -} -#ifdef CONFIG_PROC_FS -struct recent_iter_state { - struct recent_table *table; - unsigned int bucket; -}; + /* Allocate memory for the hash table */ +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for hash_table.\n", + sizeof(int)*ip_list_hash_size); +#endif -static void *recent_seq_start(struct seq_file *seq, loff_t *pos) -{ - struct recent_iter_state *st = seq->private; - struct recent_table *t = st->table; - struct recent_entry *e; - loff_t p = *pos; + curr_table->hash_table = vmalloc(sizeof(int)*ip_list_hash_size); + if(!curr_table->hash_table) { + printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for hash_table.\n"); + vfree(hold); + vfree(curr_table->table); + vfree(curr_table); + return 0; + } - spin_lock_bh(&recent_lock); + for(c = 0; c < ip_list_hash_size; c++) { + curr_table->hash_table[c] = -1; + } - for (st->bucket = 0; st->bucket < ip_list_hash_size; st->bucket++) { - list_for_each_entry(e, &t->iphash[st->bucket], list) { - if (p-- == 0) - return e; - } + /* Allocate memory for the time info */ +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for time_info.\n", + sizeof(struct time_info_list)*ip_list_tot); +#endif + + curr_table->time_info = vmalloc(sizeof(struct time_info_list)*ip_list_tot); + if(!curr_table->time_info) { + printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for time_info.\n"); + vfree(curr_table->hash_table); + vfree(hold); + vfree(curr_table->table); + vfree(curr_table); + return 0; + } + for(c = 0; c < ip_list_tot; c++) { + curr_table->time_info[c].position = c; + curr_table->time_info[c].time = 0; } - return NULL; -} -static void *recent_seq_next(struct seq_file *seq, void *v, loff_t *pos) -{ - struct recent_iter_state *st = seq->private; - struct recent_table *t = st->table; - struct recent_entry *e = v; - struct list_head *head = e->list.next; - - while (head == &t->iphash[st->bucket]) { - if (++st->bucket >= ip_list_hash_size) - return NULL; - head = t->iphash[st->bucket].next; + /* Put the new table in place */ + spin_lock_bh(&recent_lock); + find_table = r_tables; + while( (last_table = find_table) && strncmp(info->name,find_table->name,IPT_RECENT_NAME_LEN) && (find_table = find_table->next) ); + + /* If a table already exists just increment the count on that table and return */ + if(find_table) { + find_table->count++; + spin_unlock_bh(&recent_lock); +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: table found (%s), created by other process.\n",info->name); +#endif + vfree(curr_table->time_info); + vfree(curr_table->hash_table); + vfree(hold); + vfree(curr_table->table); + vfree(curr_table); + return 1; } - (*pos)++; - return list_entry(head, struct recent_entry, list); -} + if(!last_table) r_tables = curr_table; else last_table->next = curr_table; -static void recent_seq_stop(struct seq_file *s, void *v) -{ spin_unlock_bh(&recent_lock); -} -static int recent_seq_show(struct seq_file *seq, void *v) -{ - struct recent_entry *e = v; - unsigned int i; - - i = (e->index - 1) % ip_pkt_list_tot; - seq_printf(seq, "src=%u.%u.%u.%u ttl: %u last_seen: %lu oldest_pkt: %u", - NIPQUAD(e->addr), e->ttl, e->stamps[i], e->index); - for (i = 0; i < e->nstamps; i++) - seq_printf(seq, "%s %lu", i ? "," : "", e->stamps[i]); - seq_printf(seq, "\n"); - return 0; -} +#ifdef CONFIG_PROC_FS + /* Create our proc 'status' entry. */ + curr_table->status_proc = create_proc_entry(curr_table->name, ip_list_perms, proc_net_ipt_recent); + if (!curr_table->status_proc) { + vfree(hold); + printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for /proc entry.\n"); + /* Destroy the created table */ + spin_lock_bh(&recent_lock); + last_table = NULL; + curr_table = r_tables; + if(!curr_table) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, no tables.\n"); +#endif + spin_unlock_bh(&recent_lock); + return 0; + } + while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) ); + if(!curr_table) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, table already destroyed.\n"); +#endif + spin_unlock_bh(&recent_lock); + return 0; + } + if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next; + spin_unlock_bh(&recent_lock); + vfree(curr_table->time_info); + vfree(curr_table->hash_table); + vfree(curr_table->table); + vfree(curr_table); + return 0; + } + + curr_table->status_proc->owner = THIS_MODULE; + curr_table->status_proc->data = curr_table; + wmb(); + curr_table->status_proc->read_proc = ip_recent_get_info; + curr_table->status_proc->write_proc = ip_recent_ctrl; +#endif /* CONFIG_PROC_FS */ -static struct seq_operations recent_seq_ops = { - .start = recent_seq_start, - .next = recent_seq_next, - .stop = recent_seq_stop, - .show = recent_seq_show, -}; +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() left.\n"); +#endif -static int recent_seq_open(struct inode *inode, struct file *file) -{ - struct proc_dir_entry *pde = PDE(inode); - struct seq_file *seq; - struct recent_iter_state *st; - int ret; - - st = kzalloc(sizeof(*st), GFP_KERNEL); - if (st == NULL) - return -ENOMEM; - ret = seq_open(file, &recent_seq_ops); - if (ret) - kfree(st); - st->table = pde->data; - seq = file->private_data; - seq->private = st; - return ret; + return 1; } -static ssize_t recent_proc_write(struct file *file, const char __user *input, - size_t size, loff_t *loff) +/* This function is called in the event that a rule matching this module is + * removed. + * When this happens we need to check if there are no other rules matching + * the table given. If that is the case then we remove the table and clean + * up its memory. + */ +static void +destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) { - struct proc_dir_entry *pde = PDE(file->f_dentry->d_inode); - struct recent_table *t = pde->data; - struct recent_entry *e; - char buf[sizeof("+255.255.255.255")], *c = buf; - u_int32_t addr; - int add; - - if (size > sizeof(buf)) - size = sizeof(buf); - if (copy_from_user(buf, input, size)) - return -EFAULT; - while (isspace(*c)) - c++; - - if (size - (c - buf) < 5) - return c - buf; - if (!strncmp(c, "clear", 5)) { - c += 5; - spin_lock_bh(&recent_lock); - recent_table_flush(t); + const struct ipt_recent_info *info = matchinfo; + struct recent_ip_tables *curr_table, *last_table; + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() entered.\n"); +#endif + + if(matchsize != IPT_ALIGN(sizeof(struct ipt_recent_info))) return; + + /* Lock the linked list while we play with it */ + spin_lock_bh(&recent_lock); + + /* Look for an entry with this name already created */ + /* Finds the end of the list and the entry before the end if current name does not exist */ + last_table = NULL; + curr_table = r_tables; + if(!curr_table) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() No tables found, leaving.\n"); +#endif spin_unlock_bh(&recent_lock); - return c - buf; + return; } + while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) && (last_table = curr_table) && (curr_table = curr_table->next) ); - switch (*c) { - case '-': - add = 0; - c++; - break; - case '+': - c++; - default: - add = 1; - break; + /* If a table does not exist then do nothing and return */ + if(!curr_table) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table not found, leaving.\n"); +#endif + spin_unlock_bh(&recent_lock); + return; } - addr = in_aton(c); - spin_lock_bh(&recent_lock); - e = recent_entry_lookup(t, addr, 0); - if (e == NULL) { - if (add) - recent_entry_init(t, addr, 0); - } else { - if (add) - recent_entry_update(t, e); - else - recent_entry_remove(t, e); + curr_table->count--; + + /* If count is still non-zero then there are still rules referenceing it so we do nothing */ + if(curr_table->count) { +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table found, non-zero count, leaving.\n"); +#endif + spin_unlock_bh(&recent_lock); + return; } + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() table found, zero count, removing.\n"); +#endif + + /* Count must be zero so we remove this table from the list */ + if(last_table) last_table->next = curr_table->next; else r_tables = curr_table->next; + spin_unlock_bh(&recent_lock); - return size; -} -static struct file_operations recent_fops = { - .open = recent_seq_open, - .read = seq_read, - .write = recent_proc_write, - .release = seq_release_private, - .owner = THIS_MODULE, -}; + /* lock to make sure any late-runners still using this after we removed it from + * the list finish up then remove everything */ + spin_lock_bh(&curr_table->list_lock); + spin_unlock_bh(&curr_table->list_lock); + +#ifdef CONFIG_PROC_FS + if(curr_table->status_proc) remove_proc_entry(curr_table->name,proc_net_ipt_recent); #endif /* CONFIG_PROC_FS */ + vfree(curr_table->table[0].last_pkts); + vfree(curr_table->table); + vfree(curr_table->hash_table); + vfree(curr_table->time_info); + vfree(curr_table); + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": destroy() left.\n"); +#endif + return; +} + +/* This is the structure we pass to ipt_register to register our + * module with iptables. + */ static struct ipt_match recent_match = { .name = "recent", - .match = ipt_recent_match, + .match = match, .matchsize = sizeof(struct ipt_recent_info), - .checkentry = ipt_recent_checkentry, - .destroy = ipt_recent_destroy, - .me = THIS_MODULE, + .checkentry = checkentry, + .destroy = destroy, + .me = THIS_MODULE }; +/* Kernel module initialization. */ static int __init ipt_recent_init(void) { - int err; + int err, count; - if (!ip_list_tot || !ip_pkt_list_tot || ip_pkt_list_tot > 255) - return -EINVAL; - ip_list_hash_size = 1 << fls(ip_list_tot); - - err = ipt_register_match(&recent_match); + printk(version); #ifdef CONFIG_PROC_FS - if (err) - return err; - proc_dir = proc_mkdir("ipt_recent", proc_net); - if (proc_dir == NULL) { - ipt_unregister_match(&recent_match); - err = -ENOMEM; + 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"); + ip_list_hash_size = 0; + } + + if(!ip_list_hash_size) { + ip_list_hash_size = ip_list_tot*3; + count = 2*2; + while(ip_list_hash_size > count) count = count*2; + ip_list_hash_size = count; } + +#ifdef DEBUG + if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size); #endif + + err = ipt_register_match(&recent_match); + if (err) + remove_proc_entry("ipt_recent", proc_net); return err; } -static void __exit ipt_recent_exit(void) +/* Kernel module destruction. */ +static void __exit ipt_recent_fini(void) { - BUG_ON(!list_empty(&tables)); ipt_unregister_match(&recent_match); -#ifdef CONFIG_PROC_FS - remove_proc_entry("ipt_recent", proc_net); -#endif + + remove_proc_entry("ipt_recent",proc_net); } +/* Register our module with the kernel. */ module_init(ipt_recent_init); -module_exit(ipt_recent_exit); +module_exit(ipt_recent_fini); diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c index f7b8906c3..397b95cc0 100644 --- a/net/ipv4/netfilter/iptable_mangle.c +++ b/net/ipv4/netfilter/iptable_mangle.c @@ -10,6 +10,7 @@ * * Extended to all five netfilter hooks by Brad Chapman & Harald Welte */ +#include #include #include #include @@ -157,8 +158,7 @@ ipt_local_hook(unsigned int hook, || (*pskb)->nfmark != nfmark #endif || (*pskb)->nh.iph->tos != tos)) - if (ip_route_me_harder(pskb, RTN_UNSPEC)) - ret = NF_DROP; + return ip_route_me_harder(pskb) == 0 ? ret : NF_DROP; return ret; } diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 0af803df8..77d974443 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c @@ -14,6 +14,7 @@ * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c */ +#include #include #include #include @@ -144,7 +145,7 @@ static unsigned int ipv4_conntrack_help(unsigned int hooknum, /* This is where we call the helper: as the packet goes out. */ ct = nf_ct_get(*pskb, &ctinfo); - if (!ct || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY) + if (!ct) return NF_ACCEPT; help = nfct_help(ct); diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index 663a73ee3..4b0d361cc 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c @@ -235,7 +235,7 @@ icmp_error(struct sk_buff *skb, unsigned int dataoff, } /* See ip_conntrack_proto_tcp.c */ - if (nf_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && + if (hooknum == NF_IP_PRE_ROUTING && nf_ip_checksum(skb, hooknum, dataoff, 0)) { if (LOG_INVALID(IPPROTO_ICMP)) nf_log_packet(PF_INET, 0, skb, NULL, NULL, NULL, diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c index 05f511482..291831e79 100644 --- a/net/ipv4/protocol.c +++ b/net/ipv4/protocol.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index c9caff232..a4db06cb1 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -38,7 +38,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - + +#include #include #include #include @@ -123,7 +124,7 @@ static inline int raw_addr_match ( } struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num, - __be32 raddr, __be32 laddr, + unsigned long raddr, unsigned long laddr, int dif) { struct hlist_node *node; @@ -642,7 +643,6 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, if (sin) { sin->sin_family = AF_INET; sin->sin_addr.s_addr = skb->nh.iph->saddr; - sin->sin_port = 0; memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); } if (inet->cmsg_flags) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index c7a806b82..5fe2fcf99 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -64,6 +64,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -104,7 +105,6 @@ #include #include #include -#include #ifdef CONFIG_SYSCTL #include #endif @@ -206,27 +206,21 @@ __u8 ip_tos2prio[16] = { struct rt_hash_bucket { struct rtable *chain; }; -#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) || \ - defined(CONFIG_PROVE_LOCKING) +#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) /* * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks * The size of this table is a power of two and depends on the number of CPUS. - * (on lockdep we have a quite big spinlock_t, so keep the size down there) */ -#ifdef CONFIG_LOCKDEP -# define RT_HASH_LOCK_SZ 256 +#if NR_CPUS >= 32 +#define RT_HASH_LOCK_SZ 4096 +#elif NR_CPUS >= 16 +#define RT_HASH_LOCK_SZ 2048 +#elif NR_CPUS >= 8 +#define RT_HASH_LOCK_SZ 1024 +#elif NR_CPUS >= 4 +#define RT_HASH_LOCK_SZ 512 #else -# if NR_CPUS >= 32 -# define RT_HASH_LOCK_SZ 4096 -# elif NR_CPUS >= 16 -# define RT_HASH_LOCK_SZ 2048 -# elif NR_CPUS >= 8 -# define RT_HASH_LOCK_SZ 1024 -# elif NR_CPUS >= 4 -# define RT_HASH_LOCK_SZ 512 -# else -# define RT_HASH_LOCK_SZ 256 -# endif +#define RT_HASH_LOCK_SZ 256 #endif static spinlock_t *rt_hash_locks; @@ -250,7 +244,7 @@ static unsigned int rt_hash_rnd; static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); #define RT_CACHE_STAT_INC(field) \ - (__raw_get_cpu_var(rt_cache_stat).field++) + (per_cpu(rt_cache_stat, raw_smp_processor_id()).field++) static int rt_intern_hash(unsigned hash, struct rtable *rth, struct rtable **res); @@ -1126,7 +1120,6 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, struct rtable *rth, **rthp; u32 skeys[2] = { saddr, 0 }; int ikeys[2] = { dev->ifindex, 0 }; - struct netevent_redirect netevent; if (!in_dev) return; @@ -1218,11 +1211,6 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, rt_drop(rt); goto do_next; } - - netevent.old = &rth->u.dst; - netevent.new = &rt->u.dst; - call_netevent_notifiers(NETEVENT_REDIRECT, - &netevent); rt_del(hash, rth); if (!rt_intern_hash(hash, rt, &rt)) @@ -1459,7 +1447,6 @@ static void ip_rt_update_pmtu(struct dst_entry *dst, u32 mtu) } dst->metrics[RTAX_MTU-1] = mtu; dst_set_expires(dst, ip_rt_mtu_expires); - call_netevent_notifiers(NETEVENT_PMTU_UPDATE, dst); } } @@ -1775,7 +1762,7 @@ static inline int __mkroute_input(struct sk_buff *skb, #endif if (in_dev->cnf.no_policy) rth->u.dst.flags |= DST_NOPOLICY; - if (out_dev->cnf.no_xfrm) + if (in_dev->cnf.no_xfrm) rth->u.dst.flags |= DST_NOXFRM; rth->fl.fl4_dst = daddr; rth->rt_dst = daddr; diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 3b09153ba..334b6ffa8 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -180,6 +181,14 @@ ctl_table ipv4_table[] = { .proc_handler = &ipv4_doint_and_flush, .strategy = &ipv4_doint_and_flush_strategy, }, + { + .ctl_name = NET_IPV4_AUTOCONFIG, + .procname = "ip_autoconfig", + .data = &ipv4_config.autoconfig, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, { .ctl_name = NET_IPV4_NO_PMTU_DISC, .procname = "ip_no_pmtu_disc", @@ -722,24 +731,6 @@ ctl_table ipv4_table[] = { .mode = 0644, .proc_handler = &proc_dointvec }, -#ifdef CONFIG_NET_DMA - { - .ctl_name = NET_TCP_DMA_COPYBREAK, - .procname = "tcp_dma_copybreak", - .data = &sysctl_tcp_dma_copybreak, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, -#endif - { - .ctl_name = NET_TCP_SLOW_START_AFTER_IDLE, - .procname = "tcp_slow_start_after_idle", - .data = &sysctl_tcp_slow_start_after_idle, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = &proc_dointvec - }, { .ctl_name = 0 } }; diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b04e96e08..e369c0b9d 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -247,6 +247,7 @@ * TCP_CLOSE socket is finished */ +#include #include #include #include @@ -264,7 +265,7 @@ #include #include #include -#include + #include #include @@ -643,7 +644,7 @@ static inline int select_size(struct sock *sk, struct tcp_sock *tp) int tmp = tp->mss_cache; if (sk->sk_route_caps & NETIF_F_SG) { - if (sk_can_gso(sk)) + if (sk->sk_route_caps & NETIF_F_TSO) tmp = 0; else { int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); @@ -932,7 +933,7 @@ static int tcp_recv_urg(struct sock *sk, long timeo, * calculation of whether or not we must ACK for the sake of * a window update. */ -void tcp_cleanup_rbuf(struct sock *sk, int copied) +void cleanup_rbuf(struct sock *sk, int copied) { struct tcp_sock *tp = tcp_sk(sk); int time_to_ack = 0; @@ -1067,11 +1068,11 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, break; } if (skb->h.th->fin) { - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb); ++seq; break; } - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb); if (!desc->count) break; } @@ -1081,7 +1082,7 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, /* Clean up data we have read: This will do ACK frames. */ if (copied) - tcp_cleanup_rbuf(sk, copied); + cleanup_rbuf(sk, copied); return copied; } @@ -1105,7 +1106,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, int target; /* Read at least this many bytes */ long timeo; struct task_struct *user_recv = NULL; - int copied_early = 0; lock_sock(sk); @@ -1129,17 +1129,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); -#ifdef CONFIG_NET_DMA - tp->ucopy.dma_chan = NULL; - preempt_disable(); - if ((len > sysctl_tcp_dma_copybreak) && !(flags & MSG_PEEK) && - !sysctl_tcp_low_latency && __get_cpu_var(softnet_data).net_dma) { - preempt_enable_no_resched(); - tp->ucopy.pinned_list = dma_pin_iovec_pages(msg->msg_iov, len); - } else - preempt_enable_no_resched(); -#endif - do { struct sk_buff *skb; u32 offset; @@ -1227,7 +1216,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } } - tcp_cleanup_rbuf(sk, copied); + cleanup_rbuf(sk, copied); if (!sysctl_tcp_low_latency && tp->ucopy.task == user_recv) { /* Install new reader */ @@ -1281,10 +1270,6 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, } else sk_wait_data(sk, &timeo); -#ifdef CONFIG_NET_DMA - tp->ucopy.wakeup = 0; -#endif - if (user_recv) { int chunk; @@ -1340,39 +1325,13 @@ do_prequeue: } if (!(flags & MSG_TRUNC)) { -#ifdef CONFIG_NET_DMA - if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) - tp->ucopy.dma_chan = get_softnet_dma(); - - if (tp->ucopy.dma_chan) { - tp->ucopy.dma_cookie = dma_skb_copy_datagram_iovec( - tp->ucopy.dma_chan, skb, offset, - msg->msg_iov, used, - tp->ucopy.pinned_list); - - if (tp->ucopy.dma_cookie < 0) { - - printk(KERN_ALERT "dma_cookie < 0\n"); - - /* Exception. Bailout! */ - if (!copied) - copied = -EFAULT; - break; - } - if ((offset + used) == skb->len) - copied_early = 1; - - } else -#endif - { - err = skb_copy_datagram_iovec(skb, offset, - msg->msg_iov, used); - if (err) { - /* Exception. Bailout! */ - if (!copied) - copied = -EFAULT; - break; - } + err = skb_copy_datagram_iovec(skb, offset, + msg->msg_iov, used); + if (err) { + /* Exception. Bailout! */ + if (!copied) + copied = -EFAULT; + break; } } @@ -1392,19 +1351,15 @@ skip_copy: if (skb->h.th->fin) goto found_fin_ok; - if (!(flags & MSG_PEEK)) { - sk_eat_skb(sk, skb, copied_early); - copied_early = 0; - } + if (!(flags & MSG_PEEK)) + sk_eat_skb(sk, skb); continue; found_fin_ok: /* Process the FIN. */ ++*seq; - if (!(flags & MSG_PEEK)) { - sk_eat_skb(sk, skb, copied_early); - copied_early = 0; - } + if (!(flags & MSG_PEEK)) + sk_eat_skb(sk, skb); break; } while (len > 0); @@ -1427,42 +1382,12 @@ skip_copy: tp->ucopy.len = 0; } -#ifdef CONFIG_NET_DMA - if (tp->ucopy.dma_chan) { - struct sk_buff *skb; - dma_cookie_t done, used; - - dma_async_memcpy_issue_pending(tp->ucopy.dma_chan); - - while (dma_async_memcpy_complete(tp->ucopy.dma_chan, - tp->ucopy.dma_cookie, &done, - &used) == DMA_IN_PROGRESS) { - /* do partial cleanup of sk_async_wait_queue */ - while ((skb = skb_peek(&sk->sk_async_wait_queue)) && - (dma_async_is_complete(skb->dma_cookie, done, - used) == DMA_SUCCESS)) { - __skb_dequeue(&sk->sk_async_wait_queue); - kfree_skb(skb); - } - } - - /* Safe to free early-copied skbs now */ - __skb_queue_purge(&sk->sk_async_wait_queue); - dma_chan_put(tp->ucopy.dma_chan); - tp->ucopy.dma_chan = NULL; - } - if (tp->ucopy.pinned_list) { - dma_unpin_iovec_pages(tp->ucopy.pinned_list); - tp->ucopy.pinned_list = NULL; - } -#endif - /* According to UNIX98, msg_name/msg_namelen are ignored * on connected socket. I was just happy when found this 8) --ANK */ /* Clean up data we have read: This will do ACK frames. */ - tcp_cleanup_rbuf(sk, copied); + cleanup_rbuf(sk, copied); TCP_CHECK_TIMER(sk); release_sock(sk); @@ -1660,8 +1585,7 @@ adjudge_to_death: const int tmo = tcp_fin_time(sk); if (tmo > TCP_TIMEWAIT_LEN) { - inet_csk_reset_keepalive_timer(sk, - tmo - TCP_TIMEWAIT_LEN); + inet_csk_reset_keepalive_timer(sk, tcp_fin_time(sk)); } else { tcp_time_wait(sk, TCP_FIN_WAIT2, tmo); goto out; @@ -1730,9 +1654,6 @@ int tcp_disconnect(struct sock *sk, int flags) __skb_queue_purge(&sk->sk_receive_queue); sk_stream_writequeue_purge(sk); __skb_queue_purge(&tp->out_of_order_queue); -#ifdef CONFIG_NET_DMA - __skb_queue_purge(&sk->sk_async_wait_queue); -#endif inet->dport = 0; @@ -1933,7 +1854,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) && inet_csk_ack_scheduled(sk)) { icsk->icsk_ack.pending |= ICSK_ACK_PUSHED; - tcp_cleanup_rbuf(sk, 1); + cleanup_rbuf(sk, 1); if (!(val & 1)) icsk->icsk_ack.pingpong = 1; } @@ -2172,19 +2093,8 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) { /* Packet is from an untrusted source, reset gso_segs. */ - int type = skb_shinfo(skb)->gso_type; - int mss; - - if (unlikely(type & - ~(SKB_GSO_TCPV4 | - SKB_GSO_DODGY | - SKB_GSO_TCP_ECN | - SKB_GSO_TCPV6 | - 0) || - !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))) - goto out; + int mss = skb_shinfo(skb)->gso_size; - mss = skb_shinfo(skb)->gso_size; skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss; segs = NULL; @@ -2227,7 +2137,6 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) out: return segs; } -EXPORT_SYMBOL(tcp_tso_segment); extern void __skb_cb_too_small_for_tcp(int, int); extern struct tcp_congestion_ops tcp_reno; @@ -2270,7 +2179,7 @@ void __init tcp_init(void) thash_entries, (num_physpages >= 128 * 1024) ? 13 : 15, - 0, + HASH_HIGHMEM, &tcp_hashinfo.ehash_size, NULL, 0); @@ -2286,7 +2195,7 @@ void __init tcp_init(void) tcp_hashinfo.ehash_size, (num_physpages >= 128 * 1024) ? 13 : 15, - 0, + HASH_HIGHMEM, &tcp_hashinfo.bhash_size, NULL, 64 * 1024); @@ -2350,4 +2259,4 @@ EXPORT_SYMBOL(tcp_sendpage); EXPORT_SYMBOL(tcp_setsockopt); EXPORT_SYMBOL(tcp_shutdown); EXPORT_SYMBOL(tcp_statistics); -EXPORT_SYMBOL_GPL(tcp_cleanup_rbuf); +EXPORT_SYMBOL_GPL(cleanup_rbuf); diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index b0134ab08..035f2092d 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c @@ -12,6 +12,7 @@ * this behaves the same as the original Reno. */ +#include #include #include #include @@ -197,6 +198,12 @@ static u32 bictcp_undo_cwnd(struct sock *sk) return max(tp->snd_cwnd, ca->last_max_cwnd); } +static u32 bictcp_min_cwnd(struct sock *sk) +{ + const struct tcp_sock *tp = tcp_sk(sk); + return tp->snd_ssthresh; +} + static void bictcp_state(struct sock *sk, u8 new_state) { if (new_state == TCP_CA_Loss) @@ -224,6 +231,7 @@ static struct tcp_congestion_ops bictcp = { .cong_avoid = bictcp_cong_avoid, .set_state = bictcp_state, .undo_cwnd = bictcp_undo_cwnd, + .min_cwnd = bictcp_min_cwnd, .pkts_acked = bictcp_acked, .owner = THIS_MODULE, .name = "bic", diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 7ff2e4273..91c2f41c7 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -6,6 +6,7 @@ * Copyright (C) 2005 Stephen Hemminger */ +#include #include #include #include @@ -37,7 +38,7 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca) int ret = 0; /* all algorithms must implement ssthresh and cong_avoid ops */ - if (!ca->ssthresh || !ca->cong_avoid) { + if (!ca->ssthresh || !ca->cong_avoid || !ca->min_cwnd) { printk(KERN_ERR "TCP %s does not implement required ops\n", ca->name); return -EINVAL; @@ -189,7 +190,7 @@ void tcp_slow_start(struct tcp_sock *tp) return; /* We MAY increase by 2 if discovered delayed ack */ - if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) { + if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) { if (tp->snd_cwnd < tp->snd_cwnd_clamp) tp->snd_cwnd++; } @@ -250,8 +251,8 @@ u32 tcp_reno_ssthresh(struct sock *sk) } EXPORT_SYMBOL_GPL(tcp_reno_ssthresh); -/* Lower bound on congestion window with halving. */ -u32 tcp_reno_min_cwnd(const struct sock *sk) +/* Lower bound on congestion window. */ +u32 tcp_reno_min_cwnd(struct sock *sk) { const struct tcp_sock *tp = tcp_sk(sk); return tp->snd_ssthresh/2; diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index c3b01b571..31a4986df 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -12,6 +12,7 @@ * this behaves the same as the original Reno. */ +#include #include #include #include @@ -190,7 +191,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd) */ /* change the unit from HZ to bictcp_HZ */ - t = ((tcp_time_stamp + (ca->delay_min>>3) - ca->epoch_start) + t = ((tcp_time_stamp + ca->delay_min - ca->epoch_start) << BICTCP_HZ) / HZ; if (t < ca->bic_K) /* t - K */ @@ -259,7 +260,7 @@ static inline void measure_delay(struct sock *sk) (s32)(tcp_time_stamp - ca->epoch_start) < HZ) return; - delay = (tcp_time_stamp - tp->rx_opt.rcv_tsecr)<<3; + delay = tcp_time_stamp - tp->rx_opt.rcv_tsecr; if (delay == 0) delay = 1; @@ -324,6 +325,11 @@ static u32 bictcp_undo_cwnd(struct sock *sk) return max(tcp_sk(sk)->snd_cwnd, ca->last_max_cwnd); } +static u32 bictcp_min_cwnd(struct sock *sk) +{ + return tcp_sk(sk)->snd_ssthresh; +} + static void bictcp_state(struct sock *sk, u8 new_state) { if (new_state == TCP_CA_Loss) @@ -351,6 +357,7 @@ static struct tcp_congestion_ops cubictcp = { .cong_avoid = bictcp_cong_avoid, .set_state = bictcp_state, .undo_cwnd = bictcp_undo_cwnd, + .min_cwnd = bictcp_min_cwnd, .pkts_acked = bictcp_acked, .owner = THIS_MODULE, .name = "cubic", @@ -366,7 +373,7 @@ static int __init cubictcp_register(void) beta_scale = 8*(BICTCP_BETA_SCALE+beta)/ 3 / (BICTCP_BETA_SCALE - beta); - cube_rtt_scale = (bic_scale * 10); /* 1024*c/rtt */ + cube_rtt_scale = (bic_scale << 3) / 10; /* 1024*c/rtt */ /* calculate the "K" for (wmax-cwnd) = c/rtt * K^3 * so K = cubic_root( (wmax-cwnd)*rtt/c ) diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c index 57c5f0b10..c148c1081 100644 --- a/net/ipv4/tcp_diag.c +++ b/net/ipv4/tcp_diag.c @@ -11,6 +11,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include @@ -25,10 +26,7 @@ static void tcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, const struct tcp_sock *tp = tcp_sk(sk); struct tcp_info *info = _info; - if (sk->sk_state == TCP_LISTEN) - r->idiag_rqueue = sk->sk_ack_backlog; - else - r->idiag_rqueue = tp->rcv_nxt - tp->copied_seq; + r->idiag_rqueue = tp->rcv_nxt - tp->copied_seq; r->idiag_wqueue = tp->write_seq - tp->snd_una; if (info != NULL) tcp_get_info(sk, info); diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index fa3e1aad6..ba7c63ca5 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c @@ -6,6 +6,7 @@ * John Heffner */ +#include #include #include @@ -97,10 +98,6 @@ struct hstcp { u32 ai; }; -static int max_ssthresh = 100; -module_param(max_ssthresh, int, 0644); -MODULE_PARM_DESC(max_ssthresh, "limited slow start threshold (RFC3742)"); - static void hstcp_init(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); @@ -122,36 +119,17 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, if (!tcp_is_cwnd_limited(sk, in_flight)) return; - if (tp->snd_cwnd <= tp->snd_ssthresh) { - /* RFC3742: limited slow start - * the window is increased by 1/K MSS for each arriving ACK, - * for K = int(cwnd/(0.5 max_ssthresh)) - */ - if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) { - u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U); - if (++tp->snd_cwnd_cnt >= k) { - if (tp->snd_cwnd < tp->snd_cwnd_clamp) - tp->snd_cwnd++; - tp->snd_cwnd_cnt = 0; - } - } else { - if (tp->snd_cwnd < tp->snd_cwnd_clamp) - tp->snd_cwnd++; - } - } else { - /* Update AIMD parameters. - * - * We want to guarantee that: - * hstcp_aimd_vals[ca->ai-1].cwnd < - * snd_cwnd <= - * hstcp_aimd_vals[ca->ai].cwnd - */ + if (tp->snd_cwnd <= tp->snd_ssthresh) + tcp_slow_start(tp); + else { + /* Update AIMD parameters */ if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && ca->ai < HSTCP_AIMD_MAX - 1) ca->ai++; - } else if (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) { - while (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) + } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) { + while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && + ca->ai > 0) ca->ai--; } diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 6edfe5e45..1b2ff53f9 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c @@ -6,6 +6,7 @@ * http://www.hamilton.ie/net/htcp3.pdf */ +#include #include #include #include @@ -245,6 +246,14 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, } } +/* Lower bound on congestion window. */ +static u32 htcp_min_cwnd(struct sock *sk) +{ + const struct tcp_sock *tp = tcp_sk(sk); + return tp->snd_ssthresh; +} + + static void htcp_init(struct sock *sk) { struct htcp *ca = inet_csk_ca(sk); @@ -276,6 +285,7 @@ static void htcp_state(struct sock *sk, u8 new_state) static struct tcp_congestion_ops htcp = { .init = htcp_init, .ssthresh = htcp_recalc_ssthresh, + .min_cwnd = htcp_min_cwnd, .cong_avoid = htcp_cong_avoid, .set_state = htcp_state, .undo_cwnd = htcp_cwnd_undo, diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c index 7406e0c5f..40dbb3877 100644 --- a/net/ipv4/tcp_hybla.c +++ b/net/ipv4/tcp_hybla.c @@ -10,6 +10,7 @@ * root at danielinux.net */ +#include #include #include diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 39dca516d..0eadd3a27 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -63,6 +63,7 @@ * Pasi Sarolahti: F-RTO for dealing with spurious RTOs */ +#include #include #include #include @@ -70,7 +71,6 @@ #include #include #include -#include int sysctl_tcp_timestamps = 1; int sysctl_tcp_window_scaling = 1; @@ -89,7 +89,7 @@ int sysctl_tcp_frto; int sysctl_tcp_nometrics_save; int sysctl_tcp_moderate_rcvbuf = 1; -int sysctl_tcp_abc; +int sysctl_tcp_abc = 1; #define FLAG_DATA 0x01 /* Incoming frame contained data. */ #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ @@ -1688,26 +1688,17 @@ static inline void tcp_moderate_cwnd(struct tcp_sock *tp) tp->snd_cwnd_stamp = tcp_time_stamp; } -/* Lower bound on congestion window is slow start threshold - * unless congestion avoidance choice decides to overide it. - */ -static inline u32 tcp_cwnd_min(const struct sock *sk) -{ - const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops; - - return ca_ops->min_cwnd ? ca_ops->min_cwnd(sk) : tcp_sk(sk)->snd_ssthresh; -} - /* Decrease cwnd each second ack. */ static void tcp_cwnd_down(struct sock *sk) { + const struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); int decr = tp->snd_cwnd_cnt + 1; tp->snd_cwnd_cnt = decr&1; decr >>= 1; - if (decr && tp->snd_cwnd > tcp_cwnd_min(sk)) + if (decr && tp->snd_cwnd > icsk->icsk_ca_ops->min_cwnd(sk)) tp->snd_cwnd -= decr; tp->snd_cwnd = min(tp->snd_cwnd, tcp_packets_in_flight(tp)+1); @@ -2237,12 +2228,13 @@ static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb, return acked; } -static u32 tcp_usrtt(struct timeval *tv) +static u32 tcp_usrtt(const struct sk_buff *skb) { - struct timeval now; + struct timeval tv, now; do_gettimeofday(&now); - return (now.tv_sec - tv->tv_sec) * 1000000 + (now.tv_usec - tv->tv_usec); + skb_get_timestamp(skb, &tv); + return (now.tv_sec - tv.tv_sec) * 1000000 + (now.tv_usec - tv.tv_usec); } /* Remove acknowledged frames from the retransmission queue. */ @@ -2257,7 +2249,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) u32 pkts_acked = 0; void (*rtt_sample)(struct sock *sk, u32 usrtt) = icsk->icsk_ca_ops->rtt_sample; - struct timeval tv; while ((skb = skb_peek(&sk->sk_write_queue)) && skb != sk->sk_send_head) { @@ -2306,7 +2297,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) seq_rtt = -1; } else if (seq_rtt < 0) { seq_rtt = now - scb->when; - skb_get_timestamp(skb, &tv); + if (rtt_sample) + (*rtt_sample)(sk, tcp_usrtt(skb)); } if (sacked & TCPCB_SACKED_ACKED) tp->sacked_out -= tcp_skb_pcount(skb); @@ -2319,7 +2311,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) } } else if (seq_rtt < 0) { seq_rtt = now - scb->when; - skb_get_timestamp(skb, &tv); + if (rtt_sample) + (*rtt_sample)(sk, tcp_usrtt(skb)); } tcp_dec_pcount_approx(&tp->fackets_out, skb); tcp_packets_out_dec(tp, skb); @@ -2331,8 +2324,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p) if (acked&FLAG_ACKED) { tcp_ack_update_rtt(sk, acked, seq_rtt); tcp_ack_packets_out(sk, tp); - if (rtt_sample && !(acked & FLAG_RETRANS_DATA_ACKED)) - (*rtt_sample)(sk, tcp_usrtt(&tv)); if (icsk->icsk_ca_ops->pkts_acked) icsk->icsk_ca_ops->pkts_acked(sk, pkts_acked); @@ -2505,13 +2496,8 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) if (before(ack, prior_snd_una)) goto old_ack; - if (sysctl_tcp_abc) { - if (icsk->icsk_ca_state < TCP_CA_CWR) - tp->bytes_acked += ack - prior_snd_una; - else if (icsk->icsk_ca_state == TCP_CA_Loss) - /* we assume just one segment left network */ - tp->bytes_acked += min(ack - prior_snd_una, tp->mss_cache); - } + if (sysctl_tcp_abc && icsk->icsk_ca_state < TCP_CA_CWR) + tp->bytes_acked += ack - prior_snd_una; if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { /* Window is constant, pure forward advance. @@ -3547,8 +3533,7 @@ void tcp_cwnd_application_limited(struct sock *sk) if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open && sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) { /* Limited by application or receiver window. */ - u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk)); - u32 win_used = max(tp->snd_cwnd_used, init_win); + u32 win_used = max(tp->snd_cwnd_used, 2U); if (win_used < tp->snd_cwnd) { tp->snd_ssthresh = tcp_current_ssthresh(sk); tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; @@ -3801,50 +3786,6 @@ static inline int tcp_checksum_complete_user(struct sock *sk, struct sk_buff *sk __tcp_checksum_complete_user(sk, skb); } -#ifdef CONFIG_NET_DMA -static int tcp_dma_try_early_copy(struct sock *sk, struct sk_buff *skb, int hlen) -{ - struct tcp_sock *tp = tcp_sk(sk); - int chunk = skb->len - hlen; - int dma_cookie; - int copied_early = 0; - - if (tp->ucopy.wakeup) - return 0; - - if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) - tp->ucopy.dma_chan = get_softnet_dma(); - - if (tp->ucopy.dma_chan && skb->ip_summed == CHECKSUM_UNNECESSARY) { - - dma_cookie = dma_skb_copy_datagram_iovec(tp->ucopy.dma_chan, - skb, hlen, tp->ucopy.iov, chunk, tp->ucopy.pinned_list); - - if (dma_cookie < 0) - goto out; - - tp->ucopy.dma_cookie = dma_cookie; - copied_early = 1; - - tp->ucopy.len -= chunk; - tp->copied_seq += chunk; - tcp_rcv_space_adjust(sk); - - if ((tp->ucopy.len == 0) || - (tcp_flag_word(skb->h.th) & TCP_FLAG_PSH) || - (atomic_read(&sk->sk_rmem_alloc) > (sk->sk_rcvbuf >> 1))) { - tp->ucopy.wakeup = 1; - sk->sk_data_ready(sk, 0); - } - } else if (chunk > 0) { - tp->ucopy.wakeup = 1; - sk->sk_data_ready(sk, 0); - } -out: - return copied_early; -} -#endif /* CONFIG_NET_DMA */ - /* * TCP receive function for the ESTABLISHED state. * @@ -3946,6 +3887,8 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, tp->rcv_nxt == tp->rcv_wup) tcp_store_ts_recent(tp); + tcp_rcv_rtt_measure_ts(sk, skb); + /* We know that such packets are checksummed * on entry. */ @@ -3959,23 +3902,14 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, } } else { int eaten = 0; - int copied_early = 0; - if (tp->copied_seq == tp->rcv_nxt && - len - tcp_header_len <= tp->ucopy.len) { -#ifdef CONFIG_NET_DMA - if (tcp_dma_try_early_copy(sk, skb, tcp_header_len)) { - copied_early = 1; - eaten = 1; - } -#endif - if (tp->ucopy.task == current && sock_owned_by_user(sk) && !copied_early) { - __set_current_state(TASK_RUNNING); + if (tp->ucopy.task == current && + tp->copied_seq == tp->rcv_nxt && + len - tcp_header_len <= tp->ucopy.len && + sock_owned_by_user(sk)) { + __set_current_state(TASK_RUNNING); - if (!tcp_copy_to_iovec(sk, skb, tcp_header_len)) - eaten = 1; - } - if (eaten) { + if (!tcp_copy_to_iovec(sk, skb, tcp_header_len)) { /* Predicted packet is in window by definition. * seq == rcv_nxt and rcv_wup <= rcv_nxt. * Hence, check seq<=rcv_wup reduces to: @@ -3991,9 +3925,8 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, __skb_pull(skb, tcp_header_len); tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq; NET_INC_STATS_BH(LINUX_MIB_TCPHPHITSTOUSER); + eaten = 1; } - if (copied_early) - tcp_cleanup_rbuf(sk, skb->len); } if (!eaten) { if (tcp_checksum_complete_user(sk, skb)) @@ -4034,11 +3967,6 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, __tcp_ack_snd_check(sk, 0); no_ack: -#ifdef CONFIG_NET_DMA - if (copied_early) - __skb_queue_tail(&sk->sk_async_wait_queue, skb); - else -#endif if (eaten) __kfree_skb(skb); else @@ -4184,6 +4112,8 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, */ TCP_ECN_rcv_synack(tp, th); + if (tp->ecn_flags&TCP_ECN_OK) + sock_set_flag(sk, SOCK_NO_LARGESEND); tp->snd_wl1 = TCP_SKB_CB(skb)->seq; tcp_ack(sk, skb, FLAG_SLOWPATH); @@ -4326,6 +4256,8 @@ discard: tp->max_window = tp->snd_wnd; TCP_ECN_rcv_syn(tp, th); + if (tp->ecn_flags&TCP_ECN_OK) + sock_set_flag(sk, SOCK_NO_LARGESEND); tcp_mtup_init(sk); tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 2a54ae010..17f5857c5 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -52,6 +52,7 @@ * a single port at the same time. */ +#include #include #include @@ -70,7 +71,6 @@ #include #include #include -#include #include #include @@ -91,7 +91,7 @@ static struct socket *tcp_socket; void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb); struct inet_hashinfo __cacheline_aligned tcp_hashinfo = { - .lhash_lock = __RW_LOCK_UNLOCKED(tcp_hashinfo.lhash_lock), + .lhash_lock = RW_LOCK_UNLOCKED, .lhash_users = ATOMIC_INIT(0), .lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.lhash_wait), }; @@ -242,7 +242,6 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) goto failure; /* OK, now commit destination to socket. */ - sk->sk_gso_type = SKB_GSO_TCPV4; sk_setup_caps(sk, &rt->u.dst); if (!tp->write_seq) @@ -439,6 +438,7 @@ void tcp_v4_err(struct sk_buff *skb, u32 info) It can f.e. if SYNs crossed. */ if (!sock_owned_by_user(sk)) { + TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); sk->sk_err = err; sk->sk_error_report(sk); @@ -874,6 +874,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) drop_and_free: reqsk_free(req); drop: + TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); return 0; } @@ -901,7 +902,6 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, if (!newsk) goto exit; - newsk->sk_gso_type = SKB_GSO_TCPV4; sk_setup_caps(newsk, dst); newtp = tcp_sk(newsk); @@ -1123,21 +1123,11 @@ process: skb->dev = NULL; - bh_lock_sock_nested(sk); + bh_lock_sock(sk); ret = 0; if (!sock_owned_by_user(sk)) { -#ifdef CONFIG_NET_DMA - struct tcp_sock *tp = tcp_sk(sk); - if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list) - tp->ucopy.dma_chan = get_softnet_dma(); - if (tp->ucopy.dma_chan) - ret = tcp_v4_do_rcv(sk, skb); - else -#endif - { - if (!tcp_prequeue(sk, skb)) + if (!tcp_prequeue(sk, skb)) ret = tcp_v4_do_rcv(sk, skb); - } } else sk_add_backlog(sk, skb); bh_unlock_sock(sk); @@ -1345,11 +1335,6 @@ int tcp_v4_destroy_sock(struct sock *sk) /* Cleans up our, hopefully empty, out_of_order_queue. */ __skb_queue_purge(&tp->out_of_order_queue); -#ifdef CONFIG_NET_DMA - /* Cleans up our sk_async_wait_queue */ - __skb_queue_purge(&sk->sk_async_wait_queue); -#endif - /* Clean prequeue, it must be empty really */ __skb_queue_purge(&tp->ucopy.prequeue); @@ -1683,9 +1668,10 @@ static int tcp_seq_open(struct inode *inode, struct file *file) if (unlikely(afinfo == NULL)) return -EINVAL; - s = kzalloc(sizeof(*s), GFP_KERNEL); + s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) return -ENOMEM; + memset(s, 0, sizeof(*s)); s->family = afinfo->family; s->seq_ops.start = tcp_seq_start; s->seq_ops.next = tcp_seq_next; @@ -1787,8 +1773,7 @@ static void get_tcp4_sock(struct sock *sp, char *tmpbuf, int i) sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " "%08X %5d %8d %lu %d %p %u %u %u %u %d", i, src, srcp, dest, destp, sp->sk_state, - tp->write_seq - tp->snd_una, - (sp->sk_state == TCP_LISTEN) ? sp->sk_ack_backlog : (tp->rcv_nxt - tp->copied_seq), + tp->write_seq - tp->snd_una, tp->rcv_nxt - tp->copied_seq, timer_active, jiffies_to_clock_t(timer_expires - jiffies), icsk->icsk_retransmits, diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c deleted file mode 100644 index 649ebaed1..000000000 --- a/net/ipv4/tcp_lp.c +++ /dev/null @@ -1,344 +0,0 @@ -/* - * TCP Low Priority (TCP-LP) - * - * TCP Low Priority is a distributed algorithm whose goal is to utilize only - * the excess network bandwidth as compared to the ``fair share`` of - * bandwidth as targeted by TCP. - * - * As of 2.6.13, Linux supports pluggable congestion control algorithms. - * Due to the limitation of the API, we take the following changes from - * the original TCP-LP implementation: - * o We use newReno in most core CA handling. Only add some checking - * within cong_avoid. - * o Error correcting in remote HZ, therefore remote HZ will be keeped - * on checking and updating. - * o Handling calculation of One-Way-Delay (OWD) within rtt_sample, sicne - * OWD have a similar meaning as RTT. Also correct the buggy formular. - * o Handle reaction for Early Congestion Indication (ECI) within - * pkts_acked, as mentioned within pseudo code. - * o OWD is handled in relative format, where local time stamp will in - * tcp_time_stamp format. - * - * Original Author: - * Aleksandar Kuzmanovic - * Available from: - * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf - * Original implementation for 2.4.19: - * http://www-ece.rice.edu/networks/TCP-LP/ - * - * 2.6.x module Authors: - * Wong Hoi Sing, Edison - * Hung Hing Lun, Mike - * SourceForge project page: - * http://tcp-lp-mod.sourceforge.net/ - * - * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $ - */ - -#include -#include - -/* resolution of owd */ -#define LP_RESOL 1000 - -/** - * enum tcp_lp_state - * @LP_VALID_RHZ: is remote HZ valid? - * @LP_VALID_OWD: is OWD valid? - * @LP_WITHIN_THR: are we within threshold? - * @LP_WITHIN_INF: are we within inference? - * - * TCP-LP's state flags. - * We create this set of state flag mainly for debugging. - */ -enum tcp_lp_state { - LP_VALID_RHZ = (1 << 0), - LP_VALID_OWD = (1 << 1), - LP_WITHIN_THR = (1 << 3), - LP_WITHIN_INF = (1 << 4), -}; - -/** - * struct lp - * @flag: TCP-LP state flag - * @sowd: smoothed OWD << 3 - * @owd_min: min OWD - * @owd_max: max OWD - * @owd_max_rsv: resrved max owd - * @remote_hz: estimated remote HZ - * @remote_ref_time: remote reference time - * @local_ref_time: local reference time - * @last_drop: time for last active drop - * @inference: current inference - * - * TCP-LP's private struct. - * We get the idea from original TCP-LP implementation where only left those we - * found are really useful. - */ -struct lp { - u32 flag; - u32 sowd; - u32 owd_min; - u32 owd_max; - u32 owd_max_rsv; - u32 remote_hz; - u32 remote_ref_time; - u32 local_ref_time; - u32 last_drop; - u32 inference; -}; - -/** - * tcp_lp_init - * - * Init all required variables. - * Clone the handling from Vegas module implementation. - */ -static void tcp_lp_init(struct sock *sk) -{ - struct lp *lp = inet_csk_ca(sk); - - lp->flag = 0; - lp->sowd = 0; - lp->owd_min = 0xffffffff; - lp->owd_max = 0; - lp->owd_max_rsv = 0; - lp->remote_hz = 0; - lp->remote_ref_time = 0; - lp->local_ref_time = 0; - lp->last_drop = 0; - lp->inference = 0; -} - -/** - * tcp_lp_cong_avoid - * - * Implementation of cong_avoid. - * Will only call newReno CA when away from inference. - * From TCP-LP's paper, this will be handled in additive increasement. - */ -static void tcp_lp_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight, - int flag) -{ - struct lp *lp = inet_csk_ca(sk); - - if (!(lp->flag & LP_WITHIN_INF)) - tcp_reno_cong_avoid(sk, ack, rtt, in_flight, flag); -} - -/** - * tcp_lp_remote_hz_estimator - * - * Estimate remote HZ. - * We keep on updating the estimated value, where original TCP-LP - * implementation only guest it for once and use forever. - */ -static u32 tcp_lp_remote_hz_estimator(struct sock *sk) -{ - struct tcp_sock *tp = tcp_sk(sk); - struct lp *lp = inet_csk_ca(sk); - s64 rhz = lp->remote_hz << 6; /* remote HZ << 6 */ - s64 m = 0; - - /* not yet record reference time - * go away!! record it before come back!! */ - if (lp->remote_ref_time == 0 || lp->local_ref_time == 0) - goto out; - - /* we can't calc remote HZ with no different!! */ - if (tp->rx_opt.rcv_tsval == lp->remote_ref_time - || tp->rx_opt.rcv_tsecr == lp->local_ref_time) - goto out; - - m = HZ * (tp->rx_opt.rcv_tsval - - lp->remote_ref_time) / (tp->rx_opt.rcv_tsecr - - lp->local_ref_time); - if (m < 0) - m = -m; - - if (rhz > 0) { - m -= rhz >> 6; /* m is now error in remote HZ est */ - rhz += m; /* 63/64 old + 1/64 new */ - } else - rhz = m << 6; - - out: - /* record time for successful remote HZ calc */ - if (rhz > 0) - lp->flag |= LP_VALID_RHZ; - else - lp->flag &= ~LP_VALID_RHZ; - - /* record reference time stamp */ - lp->remote_ref_time = tp->rx_opt.rcv_tsval; - lp->local_ref_time = tp->rx_opt.rcv_tsecr; - - return rhz >> 6; -} - -/** - * tcp_lp_owd_calculator - * - * Calculate one way delay (in relative format). - * Original implement OWD as minus of remote time difference to local time - * difference directly. As this time difference just simply equal to RTT, when - * the network status is stable, remote RTT will equal to local RTT, and result - * OWD into zero. - * It seems to be a bug and so we fixed it. - */ -static u32 tcp_lp_owd_calculator(struct sock *sk) -{ - struct tcp_sock *tp = tcp_sk(sk); - struct lp *lp = inet_csk_ca(sk); - s64 owd = 0; - - lp->remote_hz = tcp_lp_remote_hz_estimator(sk); - - if (lp->flag & LP_VALID_RHZ) { - owd = - tp->rx_opt.rcv_tsval * (LP_RESOL / lp->remote_hz) - - tp->rx_opt.rcv_tsecr * (LP_RESOL / HZ); - if (owd < 0) - owd = -owd; - } - - if (owd > 0) - lp->flag |= LP_VALID_OWD; - else - lp->flag &= ~LP_VALID_OWD; - - return owd; -} - -/** - * tcp_lp_rtt_sample - * - * Implementation or rtt_sample. - * Will take the following action, - * 1. calc OWD, - * 2. record the min/max OWD, - * 3. calc smoothed OWD (SOWD). - * Most ideas come from the original TCP-LP implementation. - */ -static void tcp_lp_rtt_sample(struct sock *sk, u32 usrtt) -{ - struct lp *lp = inet_csk_ca(sk); - s64 mowd = tcp_lp_owd_calculator(sk); - - /* sorry that we don't have valid data */ - if (!(lp->flag & LP_VALID_RHZ) || !(lp->flag & LP_VALID_OWD)) - return; - - /* record the next min owd */ - if (mowd < lp->owd_min) - lp->owd_min = mowd; - - /* always forget the max of the max - * we just set owd_max as one below it */ - if (mowd > lp->owd_max) { - if (mowd > lp->owd_max_rsv) { - if (lp->owd_max_rsv == 0) - lp->owd_max = mowd; - else - lp->owd_max = lp->owd_max_rsv; - lp->owd_max_rsv = mowd; - } else - lp->owd_max = mowd; - } - - /* calc for smoothed owd */ - if (lp->sowd != 0) { - mowd -= lp->sowd >> 3; /* m is now error in owd est */ - lp->sowd += mowd; /* owd = 7/8 owd + 1/8 new */ - } else - lp->sowd = mowd << 3; /* take the measured time be owd */ -} - -/** - * tcp_lp_pkts_acked - * - * Implementation of pkts_acked. - * Deal with active drop under Early Congestion Indication. - * Only drop to half and 1 will be handle, because we hope to use back - * newReno in increase case. - * We work it out by following the idea from TCP-LP's paper directly - */ -static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked) -{ - struct tcp_sock *tp = tcp_sk(sk); - struct lp *lp = inet_csk_ca(sk); - - /* calc inference */ - if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) - lp->inference = 3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr); - - /* test if within inference */ - if (lp->last_drop && (tcp_time_stamp - lp->last_drop < lp->inference)) - lp->flag |= LP_WITHIN_INF; - else - lp->flag &= ~LP_WITHIN_INF; - - /* test if within threshold */ - if (lp->sowd >> 3 < - lp->owd_min + 15 * (lp->owd_max - lp->owd_min) / 100) - lp->flag |= LP_WITHIN_THR; - else - lp->flag &= ~LP_WITHIN_THR; - - pr_debug("TCP-LP: %05o|%5u|%5u|%15u|%15u|%15u\n", lp->flag, - tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max, - lp->sowd >> 3); - - if (lp->flag & LP_WITHIN_THR) - return; - - /* FIXME: try to reset owd_min and owd_max here - * so decrease the chance the min/max is no longer suitable - * and will usually within threshold when whithin inference */ - lp->owd_min = lp->sowd >> 3; - lp->owd_max = lp->sowd >> 2; - lp->owd_max_rsv = lp->sowd >> 2; - - /* happened within inference - * drop snd_cwnd into 1 */ - if (lp->flag & LP_WITHIN_INF) - tp->snd_cwnd = 1U; - - /* happened after inference - * cut snd_cwnd into half */ - else - tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 1U); - - /* record this drop time */ - lp->last_drop = tcp_time_stamp; -} - -static struct tcp_congestion_ops tcp_lp = { - .init = tcp_lp_init, - .ssthresh = tcp_reno_ssthresh, - .cong_avoid = tcp_lp_cong_avoid, - .min_cwnd = tcp_reno_min_cwnd, - .rtt_sample = tcp_lp_rtt_sample, - .pkts_acked = tcp_lp_pkts_acked, - - .owner = THIS_MODULE, - .name = "lp" -}; - -static int __init tcp_lp_register(void) -{ - BUG_ON(sizeof(struct lp) > ICSK_CA_PRIV_SIZE); - return tcp_register_congestion_control(&tcp_lp); -} - -static void __exit tcp_lp_unregister(void) -{ - tcp_unregister_congestion_control(&tcp_lp); -} - -module_init(tcp_lp_register); -module_exit(tcp_lp_unregister); - -MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun Mike"); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("TCP Low Priority"); diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index c4a8402a7..0582ec2ce 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -20,6 +20,7 @@ * Jorge Cwik, */ +#include #include #include #include @@ -44,7 +45,7 @@ int sysctl_tcp_abort_on_overflow; struct inet_timewait_death_row tcp_death_row = { .sysctl_max_tw_buckets = NR_FILE * 2, .period = TCP_TIMEWAIT_LEN / INET_TWDR_TWKILL_SLOTS, - .death_lock = __SPIN_LOCK_UNLOCKED(tcp_death_row.death_lock), + .death_lock = SPIN_LOCK_UNLOCKED, .hashinfo = &tcp_hashinfo, .tw_timer = TIMER_INITIALIZER(inet_twdr_hangman, 0, (unsigned long)&tcp_death_row), @@ -448,6 +449,8 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len; newtp->rx_opt.mss_clamp = req->mss; TCP_ECN_openreq_child(newtp, req); + if (newtp->ecn_flags&TCP_ECN_OK) + sock_set_flag(newsk, SOCK_NO_LARGESEND); TCP_INC_STATS_BH(TCP_MIB_PASSIVEOPENS); } @@ -598,10 +601,8 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, /* RFC793: "second check the RST bit" and * "fourth, check the SYN bit" */ - if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) { - TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); + if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) goto embryonic_reset; - } /* ACK sequence verified above, just make sure ACK is * set. If ACK not set, just silently drop the packet. diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 5dc3118df..ba50b52f8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -59,9 +59,6 @@ int sysctl_tcp_tso_win_divisor = 3; int sysctl_tcp_mtu_probing = 0; int sysctl_tcp_base_mss = 512; -/* By default, RFC2861 behavior. */ -int sysctl_tcp_slow_start_after_idle = 1; - static void update_send_head(struct sock *sk, struct tcp_sock *tp, struct sk_buff *skb) { @@ -141,8 +138,7 @@ static void tcp_event_data_sent(struct tcp_sock *tp, struct inet_connection_sock *icsk = inet_csk(sk); const u32 now = tcp_time_stamp; - if (sysctl_tcp_slow_start_after_idle && - (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto)) + if (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto) tcp_cwnd_restart(sk, __sk_dst_get(sk)); tp->lsndtime = now; @@ -467,8 +463,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, if (skb->len != tcp_header_size) tcp_event_data_sent(tp, skb, sk); - if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) - TCP_INC_STATS(TCP_MIB_OUTSEGS); + TCP_INC_STATS(TCP_MIB_OUTSEGS); err = icsk->icsk_af_ops->queue_xmit(skb, 0); if (likely(err <= 0)) @@ -512,7 +507,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now) { - if (skb->len <= mss_now || !sk_can_gso(sk)) { + if (skb->len <= mss_now || + !(sk->sk_route_caps & NETIF_F_TSO)) { /* Avoid the costly divide in the normal * non-TSO case. */ @@ -526,7 +522,7 @@ static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned factor /= mss_now; skb_shinfo(skb)->gso_segs = factor; skb_shinfo(skb)->gso_size = mss_now; - skb_shinfo(skb)->gso_type = sk->sk_gso_type; + skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; } } @@ -825,7 +821,9 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed) mss_now = tp->mss_cache; - if (large_allowed && sk_can_gso(sk) && !tp->urg_mode) + if (large_allowed && + (sk->sk_route_caps & NETIF_F_TSO) && + !tp->urg_mode) doing_tso = 1; if (dst) { @@ -2046,6 +2044,8 @@ struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst, memset(th, 0, sizeof(struct tcphdr)); th->syn = 1; th->ack = 1; + if (dst->dev->features&NETIF_F_TSO) + ireq->ecn_ok = 0; TCP_ECN_make_synack(req, th); th->source = inet_sk(sk)->sport; th->dest = ireq->rmt_port; @@ -2162,9 +2162,10 @@ int tcp_connect(struct sock *sk) skb_shinfo(buff)->gso_size = 0; skb_shinfo(buff)->gso_type = 0; buff->csum = 0; - tp->snd_nxt = tp->write_seq; TCP_SKB_CB(buff)->seq = tp->write_seq++; TCP_SKB_CB(buff)->end_seq = tp->write_seq; + tp->snd_nxt = tp->write_seq; + tp->pushed_seq = tp->write_seq; /* Send it off. */ TCP_SKB_CB(buff)->when = tcp_time_stamp; @@ -2174,12 +2175,6 @@ int tcp_connect(struct sock *sk) sk_charge_skb(sk, buff); tp->packets_out += tcp_skb_pcount(buff); tcp_transmit_skb(sk, buff, 1, GFP_KERNEL); - - /* We change tp->snd_nxt after the tcp_transmit_skb() call - * in order to make this packet get counted in tcpOutSegs. - */ - tp->snd_nxt = tp->write_seq; - tp->pushed_seq = tp->write_seq; TCP_INC_STATS(TCP_MIB_ACTIVEOPENS); /* Timer for repeating the SYN until an answer. */ diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c deleted file mode 100644 index dab37d2f6..000000000 --- a/net/ipv4/tcp_probe.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * tcpprobe - Observe the TCP flow with kprobes. - * - * The idea for this came from Werner Almesberger's umlsim - * Copyright (C) 2004, Stephen Hemminger - * - * 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 -#include -#include -#include -#include -#include -#include -#include - -#include - -MODULE_AUTHOR("Stephen Hemminger "); -MODULE_DESCRIPTION("TCP cwnd snooper"); -MODULE_LICENSE("GPL"); - -static int port = 0; -MODULE_PARM_DESC(port, "Port to match (0=all)"); -module_param(port, int, 0); - -static int bufsize = 64*1024; -MODULE_PARM_DESC(bufsize, "Log buffer size (default 64k)"); -module_param(bufsize, int, 0); - -static const char procname[] = "tcpprobe"; - -struct { - struct kfifo *fifo; - spinlock_t lock; - wait_queue_head_t wait; - struct timeval tstart; -} tcpw; - -static void printl(const char *fmt, ...) -{ - va_list args; - int len; - struct timeval now; - char tbuf[256]; - - va_start(args, fmt); - do_gettimeofday(&now); - - now.tv_sec -= tcpw.tstart.tv_sec; - now.tv_usec -= tcpw.tstart.tv_usec; - if (now.tv_usec < 0) { - --now.tv_sec; - now.tv_usec += 1000000; - } - - len = sprintf(tbuf, "%lu.%06lu ", - (unsigned long) now.tv_sec, - (unsigned long) now.tv_usec); - len += vscnprintf(tbuf+len, sizeof(tbuf)-len, fmt, args); - va_end(args); - - kfifo_put(tcpw.fifo, tbuf, len); - wake_up(&tcpw.wait); -} - -static int jtcp_sendmsg(struct kiocb *iocb, struct sock *sk, - struct msghdr *msg, size_t size) -{ - const struct tcp_sock *tp = tcp_sk(sk); - const struct inet_sock *inet = inet_sk(sk); - - if (port == 0 || ntohs(inet->dport) == port || - ntohs(inet->sport) == port) { - printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u\n", - NIPQUAD(inet->saddr), ntohs(inet->sport), - NIPQUAD(inet->daddr), ntohs(inet->dport), - size, tp->snd_nxt, tp->snd_una, - tp->snd_cwnd, tcp_current_ssthresh(sk), - tp->snd_wnd); - } - - jprobe_return(); - return 0; -} - -static struct jprobe tcp_send_probe = { - .kp = { .addr = (kprobe_opcode_t *) &tcp_sendmsg, }, - .entry = (kprobe_opcode_t *) &jtcp_sendmsg, -}; - - -static int tcpprobe_open(struct inode * inode, struct file * file) -{ - kfifo_reset(tcpw.fifo); - do_gettimeofday(&tcpw.tstart); - return 0; -} - -static ssize_t tcpprobe_read(struct file *file, char __user *buf, - size_t len, loff_t *ppos) -{ - int error = 0, cnt = 0; - unsigned char *tbuf; - - if (!buf || len < 0) - return -EINVAL; - - if (len == 0) - return 0; - - tbuf = vmalloc(len); - if (!tbuf) - return -ENOMEM; - - error = wait_event_interruptible(tcpw.wait, - __kfifo_len(tcpw.fifo) != 0); - if (error) - goto out_free; - - cnt = kfifo_get(tcpw.fifo, tbuf, len); - error = copy_to_user(buf, tbuf, cnt); - -out_free: - vfree(tbuf); - - return error ? error : cnt; -} - -static struct file_operations tcpprobe_fops = { - .owner = THIS_MODULE, - .open = tcpprobe_open, - .read = tcpprobe_read, -}; - -static __init int tcpprobe_init(void) -{ - int ret = -ENOMEM; - - init_waitqueue_head(&tcpw.wait); - spin_lock_init(&tcpw.lock); - tcpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &tcpw.lock); - - if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops)) - goto err0; - - ret = register_jprobe(&tcp_send_probe); - if (ret) - goto err1; - - pr_info("TCP watch registered (port=%d)\n", port); - return 0; - err1: - proc_net_remove(procname); - err0: - kfifo_free(tcpw.fifo); - return ret; -} -module_init(tcpprobe_init); - -static __exit void tcpprobe_exit(void) -{ - kfifo_free(tcpw.fifo); - proc_net_remove(procname); - unregister_jprobe(&tcp_send_probe); - -} -module_exit(tcpprobe_exit); diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c index 4624501e9..26d7486ee 100644 --- a/net/ipv4/tcp_scalable.c +++ b/net/ipv4/tcp_scalable.c @@ -5,6 +5,7 @@ * John Heffner */ +#include #include #include diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 490360b5b..3b7403495 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c @@ -31,6 +31,7 @@ * assumed senders never went idle. */ +#include #include #include #include diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c deleted file mode 100644 index 5b2fe6d2a..000000000 --- a/net/ipv4/tcp_veno.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * TCP Veno congestion control - * - * This is based on the congestion detection/avoidance scheme described in - * C. P. Fu, S. C. Liew. - * "TCP Veno: TCP Enhancement for Transmission over Wireless Access Networks." - * IEEE Journal on Selected Areas in Communication, - * Feb. 2003. - * See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf - */ - -#include -#include -#include -#include - -#include - -/* Default values of the Veno variables, in fixed-point representation - * with V_PARAM_SHIFT bits to the right of the binary point. - */ -#define V_PARAM_SHIFT 1 -static const int beta = 3 << V_PARAM_SHIFT; - -/* Veno variables */ -struct veno { - u8 doing_veno_now; /* if true, do veno for this rtt */ - u16 cntrtt; /* # of rtts measured within last rtt */ - u32 minrtt; /* min of rtts measured within last rtt (in usec) */ - u32 basertt; /* the min of all Veno rtt measurements seen (in usec) */ - u32 inc; /* decide whether to increase cwnd */ - u32 diff; /* calculate the diff rate */ -}; - -/* There are several situations when we must "re-start" Veno: - * - * o when a connection is established - * o after an RTO - * o after fast recovery - * o when we send a packet and there is no outstanding - * unacknowledged data (restarting an idle connection) - * - */ -static inline void veno_enable(struct sock *sk) -{ - struct veno *veno = inet_csk_ca(sk); - - /* turn on Veno */ - veno->doing_veno_now = 1; - - veno->minrtt = 0x7fffffff; -} - -static inline void veno_disable(struct sock *sk) -{ - struct veno *veno = inet_csk_ca(sk); - - /* turn off Veno */ - veno->doing_veno_now = 0; -} - -static void tcp_veno_init(struct sock *sk) -{ - struct veno *veno = inet_csk_ca(sk); - - veno->basertt = 0x7fffffff; - veno->inc = 1; - veno_enable(sk); -} - -/* Do rtt sampling needed for Veno. */ -static void tcp_veno_rtt_calc(struct sock *sk, u32 usrtt) -{ - struct veno *veno = inet_csk_ca(sk); - u32 vrtt = usrtt + 1; /* Never allow zero rtt or basertt */ - - /* Filter to find propagation delay: */ - if (vrtt < veno->basertt) - veno->basertt = vrtt; - - /* Find the min rtt during the last rtt to find - * the current prop. delay + queuing delay: - */ - veno->minrtt = min(veno->minrtt, vrtt); - veno->cntrtt++; -} - -static void tcp_veno_state(struct sock *sk, u8 ca_state) -{ - if (ca_state == TCP_CA_Open) - veno_enable(sk); - else - veno_disable(sk); -} - -/* - * If the connection is idle and we are restarting, - * then we don't want to do any Veno calculations - * until we get fresh rtt samples. So when we - * restart, we reset our Veno state to a clean - * state. After we get acks for this flight of - * packets, _then_ we can make Veno calculations - * again. - */ -static void tcp_veno_cwnd_event(struct sock *sk, enum tcp_ca_event event) -{ - if (event == CA_EVENT_CWND_RESTART || event == CA_EVENT_TX_START) - tcp_veno_init(sk); -} - -static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, - u32 seq_rtt, u32 in_flight, int flag) -{ - struct tcp_sock *tp = tcp_sk(sk); - struct veno *veno = inet_csk_ca(sk); - - if (!veno->doing_veno_now) - return tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); - - /* limited by applications */ - if (!tcp_is_cwnd_limited(sk, in_flight)) - return; - - /* We do the Veno calculations only if we got enough rtt samples */ - if (veno->cntrtt <= 2) { - /* We don't have enough rtt samples to do the Veno - * calculation, so we'll behave like Reno. - */ - tcp_reno_cong_avoid(sk, ack, seq_rtt, in_flight, flag); - } else { - u32 rtt, target_cwnd; - - /* We have enough rtt samples, so, using the Veno - * algorithm, we determine the state of the network. - */ - - rtt = veno->minrtt; - - target_cwnd = ((tp->snd_cwnd * veno->basertt) - << V_PARAM_SHIFT) / rtt; - - veno->diff = (tp->snd_cwnd << V_PARAM_SHIFT) - target_cwnd; - - if (tp->snd_cwnd <= tp->snd_ssthresh) { - /* Slow start. */ - tcp_slow_start(tp); - } else { - /* Congestion avoidance. */ - if (veno->diff < beta) { - /* In the "non-congestive state", increase cwnd - * every rtt. - */ - if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { - if (tp->snd_cwnd < tp->snd_cwnd_clamp) - tp->snd_cwnd++; - tp->snd_cwnd_cnt = 0; - } else - tp->snd_cwnd_cnt++; - } else { - /* In the "congestive state", increase cwnd - * every other rtt. - */ - if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { - if (veno->inc - && tp->snd_cwnd < - tp->snd_cwnd_clamp) { - tp->snd_cwnd++; - veno->inc = 0; - } else - veno->inc = 1; - tp->snd_cwnd_cnt = 0; - } else - tp->snd_cwnd_cnt++; - } - - } - if (tp->snd_cwnd < 2) - tp->snd_cwnd = 2; - else if (tp->snd_cwnd > tp->snd_cwnd_clamp) - tp->snd_cwnd = tp->snd_cwnd_clamp; - } - /* Wipe the slate clean for the next rtt. */ - /* veno->cntrtt = 0; */ - veno->minrtt = 0x7fffffff; -} - -/* Veno MD phase */ -static u32 tcp_veno_ssthresh(struct sock *sk) -{ - const struct tcp_sock *tp = tcp_sk(sk); - struct veno *veno = inet_csk_ca(sk); - - if (veno->diff < beta) - /* in "non-congestive state", cut cwnd by 1/5 */ - return max(tp->snd_cwnd * 4 / 5, 2U); - else - /* in "congestive state", cut cwnd by 1/2 */ - return max(tp->snd_cwnd >> 1U, 2U); -} - -static struct tcp_congestion_ops tcp_veno = { - .init = tcp_veno_init, - .ssthresh = tcp_veno_ssthresh, - .cong_avoid = tcp_veno_cong_avoid, - .rtt_sample = tcp_veno_rtt_calc, - .set_state = tcp_veno_state, - .cwnd_event = tcp_veno_cwnd_event, - - .owner = THIS_MODULE, - .name = "veno", -}; - -static int __init tcp_veno_register(void) -{ - BUG_ON(sizeof(struct veno) > ICSK_CA_PRIV_SIZE); - tcp_register_congestion_control(&tcp_veno); - return 0; -} - -static void __exit tcp_veno_unregister(void) -{ - tcp_unregister_congestion_control(&tcp_veno); -} - -module_init(tcp_veno_register); -module_exit(tcp_veno_unregister); - -MODULE_AUTHOR("Bin Zhou, Cheng Peng Fu"); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("TCP Veno"); diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index 5446312ff..0c340c375 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c @@ -1,26 +1,10 @@ /* - * TCP Westwood+: end-to-end bandwidth estimation for TCP + * TCP Westwood+ * - * Angelo Dell'Aera: author of the first version of TCP Westwood+ in Linux 2.4 - * - * Support at http://c3lab.poliba.it/index.php/Westwood - * Main references in literature: - * - * - Mascolo S, Casetti, M. Gerla et al. - * "TCP Westwood: bandwidth estimation for TCP" Proc. ACM Mobicom 2001 - * - * - A. Grieco, s. Mascolo - * "Performance evaluation of New Reno, Vegas, Westwood+ TCP" ACM Computer - * Comm. Review, 2004 - * - * - A. Dell'Aera, L. Grieco, S. Mascolo. - * "Linux 2.4 Implementation of Westwood+ TCP with Rate-Halving : - * A Performance Evaluation Over the Internet" (ICC 2004), Paris, June 2004 - * - * Westwood+ employs end-to-end bandwidth measurement to set cwnd and - * ssthresh after packet loss. The probing phase is as the original Reno. + * Angelo Dell'Aera: TCP Westwood+ support */ +#include #include #include #include @@ -38,8 +22,6 @@ struct westwood { u32 accounted; u32 rtt; u32 rtt_min; /* minimum observed RTT */ - u8 first_ack; /* flag which infers that this is the first ack */ - u8 reset_rtt_min; /* Reset RTT min to next RTT sample*/ }; @@ -67,11 +49,9 @@ static void tcp_westwood_init(struct sock *sk) w->bw_est = 0; w->accounted = 0; w->cumul_ack = 0; - w->reset_rtt_min = 1; w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT; w->rtt_win_sx = tcp_time_stamp; w->snd_una = tcp_sk(sk)->snd_una; - w->first_ack = 1; } /* @@ -83,16 +63,10 @@ static inline u32 westwood_do_filter(u32 a, u32 b) return (((7 * a) + b) >> 3); } -static void westwood_filter(struct westwood *w, u32 delta) +static inline void westwood_filter(struct westwood *w, u32 delta) { - /* If the filter is empty fill it with the first sample of bandwidth */ - if (w->bw_ns_est == 0 && w->bw_est == 0) { - w->bw_ns_est = w->bk / delta; - w->bw_est = w->bw_ns_est; - } else { - w->bw_ns_est = westwood_do_filter(w->bw_ns_est, w->bk / delta); - w->bw_est = westwood_do_filter(w->bw_est, w->bw_ns_est); - } + w->bw_ns_est = westwood_do_filter(w->bw_ns_est, w->bk / delta); + w->bw_est = westwood_do_filter(w->bw_est, w->bw_ns_est); } /* @@ -117,15 +91,6 @@ static void westwood_update_window(struct sock *sk) struct westwood *w = inet_csk_ca(sk); s32 delta = tcp_time_stamp - w->rtt_win_sx; - /* Initialize w->snd_una with the first acked sequence number in order - * to fix mismatch between tp->snd_una and w->snd_una for the first - * bandwidth sample - */ - if (w->first_ack) { - w->snd_una = tcp_sk(sk)->snd_una; - w->first_ack = 0; - } - /* * See if a RTT-window has passed. * Be careful since if RTT is less than @@ -143,16 +108,6 @@ static void westwood_update_window(struct sock *sk) } } -static inline void update_rtt_min(struct westwood *w) -{ - if (w->reset_rtt_min) { - w->rtt_min = w->rtt; - w->reset_rtt_min = 0; - } else - w->rtt_min = min(w->rtt, w->rtt_min); -} - - /* * @westwood_fast_bw * It is called when we are in fast path. In particular it is called when @@ -168,7 +123,7 @@ static inline void westwood_fast_bw(struct sock *sk) w->bk += tp->snd_una - w->snd_una; w->snd_una = tp->snd_una; - update_rtt_min(w); + w->rtt_min = min(w->rtt, w->rtt_min); } /* @@ -207,6 +162,12 @@ static inline u32 westwood_acked_count(struct sock *sk) return w->cumul_ack; } +static inline u32 westwood_bw_rttmin(const struct sock *sk) +{ + const struct tcp_sock *tp = tcp_sk(sk); + const struct westwood *w = inet_csk_ca(sk); + return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); +} /* * TCP Westwood @@ -214,11 +175,9 @@ static inline u32 westwood_acked_count(struct sock *sk) * in packets we use mss_cache). Rttmin is guaranteed to be >= 2 * so avoids ever returning 0. */ -static u32 tcp_westwood_bw_rttmin(const struct sock *sk) +static u32 tcp_westwood_cwnd_min(struct sock *sk) { - const struct tcp_sock *tp = tcp_sk(sk); - const struct westwood *w = inet_csk_ca(sk); - return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); + return westwood_bw_rttmin(sk); } static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event) @@ -232,19 +191,17 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event) break; case CA_EVENT_COMPLETE_CWR: - tp->snd_cwnd = tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk); + tp->snd_cwnd = tp->snd_ssthresh = westwood_bw_rttmin(sk); break; case CA_EVENT_FRTO: - tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk); - /* Update RTT_min when next ack arrives */ - w->reset_rtt_min = 1; + tp->snd_ssthresh = westwood_bw_rttmin(sk); break; case CA_EVENT_SLOW_ACK: westwood_update_window(sk); w->bk += westwood_acked_count(sk); - update_rtt_min(w); + w->rtt_min = min(w->rtt, w->rtt_min); break; default: @@ -278,7 +235,7 @@ static struct tcp_congestion_ops tcp_westwood = { .init = tcp_westwood_init, .ssthresh = tcp_reno_ssthresh, .cong_avoid = tcp_reno_cong_avoid, - .min_cwnd = tcp_westwood_bw_rttmin, + .min_cwnd = tcp_westwood_cwnd_min, .cwnd_event = tcp_westwood_event, .get_info = tcp_westwood_info, .pkts_acked = tcp_westwood_pkts_acked, diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0ba06cf36..f2f34a4a1 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -91,6 +91,7 @@ #include #include #include +#include #include #include #include @@ -909,32 +910,23 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb) return 1; #else struct udp_sock *up = udp_sk(sk); - struct udphdr *uh; + struct udphdr *uh = skb->h.uh; struct iphdr *iph; int iphlen, len; - __u8 *udpdata; - __u32 *udpdata32; + __u8 *udpdata = (__u8 *)uh + sizeof(struct udphdr); + __u32 *udpdata32 = (__u32 *)udpdata; __u16 encap_type = up->encap_type; /* if we're overly short, let UDP handle it */ - len = skb->len - sizeof(struct udphdr); - if (len <= 0) + if (udpdata > skb->tail) return 1; /* if this is not encapsulated socket, then just return now */ if (!encap_type) return 1; - /* If this is a paged skb, make sure we pull up - * whatever data we need to look at. */ - if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) - return 1; - - /* Now we can get the pointers */ - uh = skb->h.uh; - udpdata = (__u8 *)uh + sizeof(struct udphdr); - udpdata32 = (__u32 *)udpdata; + len = skb->tail - udpdata; switch (encap_type) { default: @@ -1578,10 +1570,11 @@ static int udp_seq_open(struct inode *inode, struct file *file) struct udp_seq_afinfo *afinfo = PDE(inode)->data; struct seq_file *seq; int rc = -ENOMEM; - struct udp_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct udp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; + memset(s, 0, sizeof(*s)); s->family = afinfo->family; s->seq_ops.start = udp_seq_start; s->seq_ops.next = udp_seq_next; diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index 817ed8451..3e174c83b 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -23,6 +24,15 @@ int xfrm4_rcv(struct sk_buff *skb) EXPORT_SYMBOL(xfrm4_rcv); +static inline void ipip_ecn_decapsulate(struct sk_buff *skb) +{ + struct iphdr *outer_iph = skb->nh.iph; + struct iphdr *inner_iph = skb->h.ipiph; + + if (INET_ECN_is_ce(outer_iph->tos)) + IP_ECN_set_ce(inner_iph); +} + static int xfrm4_parse_spi(struct sk_buff *skb, u8 nexthdr, u32 *spi, u32 *seq) { switch (nexthdr) { @@ -103,10 +113,24 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) xfrm_vec[xfrm_nr++] = x; - if (x->mode->input(x, skb)) - goto drop; + iph = skb->nh.iph; if (x->props.mode) { + if (iph->protocol != IPPROTO_IPIP) + goto drop; + if (!pskb_may_pull(skb, sizeof(struct iphdr))) + goto drop; + if (skb_cloned(skb) && + pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) + goto drop; + if (x->props.flags & XFRM_STATE_DECAP_DSCP) + ipv4_copy_dscp(iph, skb->h.ipiph); + if (!(x->props.flags & XFRM_STATE_NOECN)) + ipip_ecn_decapsulate(skb); + skb->mac.raw = memmove(skb->data - skb->mac_len, + skb->mac.raw, skb->mac_len); + skb->nh.raw = skb->data; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); decaps = 1; break; } diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c deleted file mode 100644 index a9e6b3dd1..000000000 --- a/net/ipv4/xfrm4_mode_transport.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * xfrm4_mode_transport.c - Transport mode encapsulation for IPv4. - * - * Copyright (c) 2004-2006 Herbert Xu - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* Add encapsulation header. - * - * The IP header will be moved forward to make space for the encapsulation - * header. - * - * On exit, skb->h will be set to the start of the payload to be processed - * by x->type->output and skb->nh will be set to the top IP header. - */ -static int xfrm4_transport_output(struct sk_buff *skb) -{ - struct xfrm_state *x; - struct iphdr *iph; - int ihl; - - iph = skb->nh.iph; - skb->h.ipiph = iph; - - ihl = iph->ihl * 4; - skb->h.raw += ihl; - - x = skb->dst->xfrm; - skb->nh.raw = memmove(skb_push(skb, x->props.header_len), iph, ihl); - return 0; -} - -/* Remove encapsulation header. - * - * The IP header will be moved over the top of the encapsulation header. - * - * On entry, skb->h shall point to where the IP header should be and skb->nh - * shall be set to where the IP header currently is. skb->data shall point - * to the start of the payload. - */ -static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) -{ - int ihl = skb->data - skb->h.raw; - - if (skb->h.raw != skb->nh.raw) - skb->nh.raw = memmove(skb->h.raw, skb->nh.raw, ihl); - skb->nh.iph->tot_len = htons(skb->len + ihl); - skb->h.raw = skb->data; - return 0; -} - -static struct xfrm_mode xfrm4_transport_mode = { - .input = xfrm4_transport_input, - .output = xfrm4_transport_output, - .owner = THIS_MODULE, - .encap = XFRM_MODE_TRANSPORT, -}; - -static int __init xfrm4_transport_init(void) -{ - return xfrm_register_mode(&xfrm4_transport_mode, AF_INET); -} - -static void __exit xfrm4_transport_exit(void) -{ - int err; - - err = xfrm_unregister_mode(&xfrm4_transport_mode, AF_INET); - BUG_ON(err); -} - -module_init(xfrm4_transport_init); -module_exit(xfrm4_transport_exit); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_XFRM_MODE(AF_INET, XFRM_MODE_TRANSPORT); diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c deleted file mode 100644 index 13cafbe56..000000000 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * xfrm4_mode_tunnel.c - Tunnel mode encapsulation for IPv4. - * - * Copyright (c) 2004-2006 Herbert Xu - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static inline void ipip_ecn_decapsulate(struct sk_buff *skb) -{ - struct iphdr *outer_iph = skb->nh.iph; - struct iphdr *inner_iph = skb->h.ipiph; - - if (INET_ECN_is_ce(outer_iph->tos)) - IP_ECN_set_ce(inner_iph); -} - -/* Add encapsulation header. - * - * The top IP header will be constructed per RFC 2401. The following fields - * in it shall be filled in by x->type->output: - * tot_len - * check - * - * On exit, skb->h will be set to the start of the payload to be processed - * by x->type->output and skb->nh will be set to the top IP header. - */ -static int xfrm4_tunnel_output(struct sk_buff *skb) -{ - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; - struct iphdr *iph, *top_iph; - int flags; - - iph = skb->nh.iph; - skb->h.ipiph = iph; - - skb->nh.raw = skb_push(skb, x->props.header_len); - top_iph = skb->nh.iph; - - top_iph->ihl = 5; - top_iph->version = 4; - - /* DS disclosed */ - top_iph->tos = INET_ECN_encapsulate(iph->tos, iph->tos); - - flags = x->props.flags; - if (flags & XFRM_STATE_NOECN) - IP_ECN_clear(top_iph); - - top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? - 0 : (iph->frag_off & htons(IP_DF)); - if (!top_iph->frag_off) - __ip_select_ident(top_iph, dst->child, 0); - - top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); - - top_iph->saddr = x->props.saddr.a4; - top_iph->daddr = x->id.daddr.a4; - top_iph->protocol = IPPROTO_IPIP; - - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); - return 0; -} - -static int xfrm4_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) -{ - struct iphdr *iph = skb->nh.iph; - int err = -EINVAL; - - if (iph->protocol != IPPROTO_IPIP) - goto out; - if (!pskb_may_pull(skb, sizeof(struct iphdr))) - goto out; - - if (skb_cloned(skb) && - (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) - goto out; - - if (x->props.flags & XFRM_STATE_DECAP_DSCP) - ipv4_copy_dscp(iph, skb->h.ipiph); - if (!(x->props.flags & XFRM_STATE_NOECN)) - ipip_ecn_decapsulate(skb); - skb->mac.raw = memmove(skb->data - skb->mac_len, - skb->mac.raw, skb->mac_len); - skb->nh.raw = skb->data; - err = 0; - -out: - return err; -} - -static struct xfrm_mode xfrm4_tunnel_mode = { - .input = xfrm4_tunnel_input, - .output = xfrm4_tunnel_output, - .owner = THIS_MODULE, - .encap = XFRM_MODE_TUNNEL, -}; - -static int __init xfrm4_tunnel_init(void) -{ - return xfrm_register_mode(&xfrm4_tunnel_mode, AF_INET); -} - -static void __exit xfrm4_tunnel_exit(void) -{ - int err; - - err = xfrm_unregister_mode(&xfrm4_tunnel_mode, AF_INET); - BUG_ON(err); -} - -module_init(xfrm4_tunnel_init); -module_exit(xfrm4_tunnel_exit); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_XFRM_MODE(AF_INET, XFRM_MODE_TUNNEL); diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c index dda359f0d..ecc4119df 100644 --- a/net/ipv4/xfrm4_output.c +++ b/net/ipv4/xfrm4_output.c @@ -14,12 +14,69 @@ #include #include #include +#include #include #include #include extern int skb_checksum_setup(struct sk_buff *skb); +/* Add encapsulation header. + * + * In transport mode, the IP header will be moved forward to make space + * for the encapsulation header. + * + * In tunnel mode, the top IP header will be constructed per RFC 2401. + * The following fields in it shall be filled in by x->type->output: + * tot_len + * check + * + * On exit, skb->h will be set to the start of the payload to be processed + * by x->type->output and skb->nh will be set to the top IP header. + */ +static void xfrm4_encap(struct sk_buff *skb) +{ + struct dst_entry *dst = skb->dst; + struct xfrm_state *x = dst->xfrm; + struct iphdr *iph, *top_iph; + int flags; + + iph = skb->nh.iph; + skb->h.ipiph = iph; + + skb->nh.raw = skb_push(skb, x->props.header_len); + top_iph = skb->nh.iph; + + if (!x->props.mode) { + skb->h.raw += iph->ihl*4; + memmove(top_iph, iph, iph->ihl*4); + return; + } + + top_iph->ihl = 5; + top_iph->version = 4; + + /* DS disclosed */ + top_iph->tos = INET_ECN_encapsulate(iph->tos, iph->tos); + + flags = x->props.flags; + if (flags & XFRM_STATE_NOECN) + IP_ECN_clear(top_iph); + + top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? + 0 : (iph->frag_off & htons(IP_DF)); + if (!top_iph->frag_off) + __ip_select_ident(top_iph, dst->child, 0); + + top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); + + top_iph->saddr = x->props.saddr.a4; + top_iph->daddr = x->id.daddr.a4; + top_iph->protocol = IPPROTO_IPIP; + + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); +} + static int xfrm4_tunnel_check_size(struct sk_buff *skb) { int mtu, ret = 0; @@ -72,9 +129,7 @@ static int xfrm4_output_one(struct sk_buff *skb) if (err) goto error; - err = x->mode->output(skb); - if (err) - goto error; + xfrm4_encap(skb); err = x->type->output(x, skb); if (err) diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index eae687d4d..8604c747b 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -16,6 +17,8 @@ static struct dst_ops xfrm4_dst_ops; static struct xfrm_policy_afinfo xfrm4_policy_afinfo; +static struct xfrm_type_map xfrm4_type_map = { .lock = RW_LOCK_UNLOCKED }; + static int xfrm4_dst_lookup(struct xfrm_dst **dst, struct flowi *fl) { return __ip_route_output_key((struct rtable**)dst, fl); @@ -234,7 +237,9 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl) static inline int xfrm4_garbage_collect(void) { + read_lock(&xfrm4_policy_afinfo.lock); xfrm4_policy_afinfo.garbage_collect(); + read_unlock(&xfrm4_policy_afinfo.lock); return (atomic_read(&xfrm4_dst_ops.entries) > xfrm4_dst_ops.gc_thresh*2); } @@ -252,8 +257,6 @@ static void xfrm4_dst_destroy(struct dst_entry *dst) if (likely(xdst->u.rt.idev)) in_dev_put(xdst->u.rt.idev); - if (likely(xdst->u.rt.peer)) - inet_putpeer(xdst->u.rt.peer); xfrm_dst_destroy(xdst); } @@ -296,6 +299,8 @@ static struct dst_ops xfrm4_dst_ops = { static struct xfrm_policy_afinfo xfrm4_policy_afinfo = { .family = AF_INET, + .lock = RW_LOCK_UNLOCKED, + .type_map = &xfrm4_type_map, .dst_ops = &xfrm4_dst_ops, .dst_lookup = xfrm4_dst_lookup, .find_bundle = __xfrm4_find_bundle, diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index 81e1751c9..dbabf81a9 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c @@ -131,6 +131,7 @@ __xfrm4_find_acq(u8 mode, u32 reqid, u8 proto, static struct xfrm_state_afinfo xfrm4_state_afinfo = { .family = AF_INET, + .lock = RW_LOCK_UNLOCKED, .init_flags = xfrm4_init_flags, .init_tempsel = __xfrm4_init_tempsel, .state_lookup = __xfrm4_state_lookup, diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig index e923d4dea..f8a107ab5 100644 --- a/net/ipv6/Kconfig +++ b/net/ipv6/Kconfig @@ -106,26 +106,6 @@ config INET6_TUNNEL tristate default n -config INET6_XFRM_MODE_TRANSPORT - tristate "IPv6: IPsec transport mode" - depends on IPV6 - default IPV6 - select XFRM - ---help--- - Support for IPsec transport mode. - - If unsure, say Y. - -config INET6_XFRM_MODE_TUNNEL - tristate "IPv6: IPsec tunnel mode" - depends on IPV6 - default IPV6 - select XFRM - ---help--- - Support for IPsec tunnel mode. - - If unsure, say Y. - config IPV6_TUNNEL tristate "IPv6: IPv6-in-IPv6 tunnel" select INET6_TUNNEL diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile index 386e0a626..a760b0988 100644 --- a/net/ipv6/Makefile +++ b/net/ipv6/Makefile @@ -20,8 +20,6 @@ obj-$(CONFIG_INET6_ESP) += esp6.o obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o obj-$(CONFIG_INET6_XFRM_TUNNEL) += xfrm6_tunnel.o obj-$(CONFIG_INET6_TUNNEL) += tunnel6.o -obj-$(CONFIG_INET6_XFRM_MODE_TRANSPORT) += xfrm6_mode_transport.o -obj-$(CONFIG_INET6_XFRM_MODE_TUNNEL) += xfrm6_mode_tunnel.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5c1b33f40..386ca5c41 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -40,6 +40,7 @@ * status etc. */ +#include #include #include #include @@ -508,26 +509,6 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) kfree(ifp); } -static void -ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp) -{ - struct inet6_ifaddr *ifa, **ifap; - int ifp_scope = ipv6_addr_src_scope(&ifp->addr); - - /* - * Each device address list is sorted in order of scope - - * global before linklocal. - */ - for (ifap = &idev->addr_list; (ifa = *ifap) != NULL; - ifap = &ifa->if_next) { - if (ifp_scope >= ipv6_addr_src_scope(&ifa->addr)) - break; - } - - ifp->if_next = *ifap; - *ifap = ifp; -} - /* On success it returns ifp with increased reference count */ static struct inet6_ifaddr * @@ -578,8 +559,6 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, ifa->flags = flags | IFA_F_TENTATIVE; ifa->cstamp = ifa->tstamp = jiffies; - ifa->rt = rt; - ifa->idev = idev; in6_dev_hold(idev); /* For caller */ @@ -595,7 +574,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, write_lock(&idev->lock); /* Add to inet6_dev unicast addr list. */ - ipv6_link_dev_addr(idev, ifa); + ifa->if_next = idev->addr_list; + idev->addr_list = ifa; #ifdef CONFIG_IPV6_PRIVACY if (ifa->flags&IFA_F_TEMPORARY) { @@ -605,6 +585,8 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen, } #endif + ifa->rt = rt; + in6_ifa_hold(ifa); write_unlock(&idev->lock); out2: @@ -1006,7 +988,7 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, continue; } else if (score.scope < hiscore.scope) { if (score.scope < daddr_scope) - break; /* addresses sorted by scope */ + continue; else { score.rule = 2; goto record_it; @@ -1869,21 +1851,15 @@ err_exit: /* * Manual configuration of address on an interface */ -static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen, - __u32 prefered_lft, __u32 valid_lft) +static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen) { struct inet6_ifaddr *ifp; struct inet6_dev *idev; struct net_device *dev; - __u8 ifa_flags = 0; int scope; ASSERT_RTNL(); - /* check the lifetime */ - if (!valid_lft || prefered_lft > valid_lft) - return -EINVAL; - if ((dev = __dev_get_by_index(ifindex)) == NULL) return -ENODEV; @@ -1895,29 +1871,10 @@ static int inet6_addr_add(int ifindex, struct in6_addr *pfx, int plen, scope = ipv6_addr_scope(pfx); - if (valid_lft == INFINITY_LIFE_TIME) - ifa_flags |= IFA_F_PERMANENT; - else if (valid_lft >= 0x7FFFFFFF/HZ) - valid_lft = 0x7FFFFFFF/HZ; - - if (prefered_lft == 0) - ifa_flags |= IFA_F_DEPRECATED; - else if ((prefered_lft >= 0x7FFFFFFF/HZ) && - (prefered_lft != INFINITY_LIFE_TIME)) - prefered_lft = 0x7FFFFFFF/HZ; - - ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags); - + ifp = ipv6_add_addr(idev, pfx, plen, scope, IFA_F_PERMANENT); if (!IS_ERR(ifp)) { - spin_lock_bh(&ifp->lock); - ifp->valid_lft = valid_lft; - ifp->prefered_lft = prefered_lft; - ifp->tstamp = jiffies; - spin_unlock_bh(&ifp->lock); - addrconf_dad_start(ifp, 0); in6_ifa_put(ifp); - addrconf_verify(0); return 0; } @@ -1970,8 +1927,7 @@ int addrconf_add_ifaddr(void __user *arg) return -EFAULT; rtnl_lock(); - err = inet6_addr_add(ireq.ifr6_ifindex, &ireq.ifr6_addr, ireq.ifr6_prefixlen, - INFINITY_LIFE_TIME, INFINITY_LIFE_TIME); + err = inet6_addr_add(ireq.ifr6_ifindex, &ireq.ifr6_addr, ireq.ifr6_prefixlen); rtnl_unlock(); return err; } @@ -2802,16 +2758,12 @@ restart: ifp->idev->nd_parms->retrans_time / HZ; #endif - if (ifp->valid_lft != INFINITY_LIFE_TIME && - age >= ifp->valid_lft) { + if (age >= ifp->valid_lft) { spin_unlock(&ifp->lock); in6_ifa_hold(ifp); read_unlock(&addrconf_hash_lock); ipv6_del_addr(ifp); goto restart; - } else if (ifp->prefered_lft == INFINITY_LIFE_TIME) { - spin_unlock(&ifp->lock); - continue; } else if (age >= ifp->prefered_lft) { /* jiffies - ifp->tsamp > age >= ifp->prefered_lft */ int deprecate = 0; @@ -2888,8 +2840,7 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) pfx = RTA_DATA(rta[IFA_ADDRESS-1]); } if (rta[IFA_LOCAL-1]) { - if (RTA_PAYLOAD(rta[IFA_LOCAL-1]) < sizeof(*pfx) || - (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx)))) + if (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx))) return -EINVAL; pfx = RTA_DATA(rta[IFA_LOCAL-1]); } @@ -2899,62 +2850,12 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) return inet6_addr_del(ifm->ifa_index, pfx, ifm->ifa_prefixlen); } -static int -inet6_addr_modify(int ifindex, struct in6_addr *pfx, - __u32 prefered_lft, __u32 valid_lft) -{ - struct inet6_ifaddr *ifp = NULL; - struct net_device *dev; - int ifa_flags = 0; - - if ((dev = __dev_get_by_index(ifindex)) == NULL) - return -ENODEV; - - if (!(dev->flags&IFF_UP)) - return -ENETDOWN; - - if (!valid_lft || (prefered_lft > valid_lft)) - return -EINVAL; - - ifp = ipv6_get_ifaddr(pfx, dev, 1); - if (ifp == NULL) - return -ENOENT; - - if (valid_lft == INFINITY_LIFE_TIME) - ifa_flags = IFA_F_PERMANENT; - else if (valid_lft >= 0x7FFFFFFF/HZ) - valid_lft = 0x7FFFFFFF/HZ; - - if (prefered_lft == 0) - ifa_flags = IFA_F_DEPRECATED; - else if ((prefered_lft >= 0x7FFFFFFF/HZ) && - (prefered_lft != INFINITY_LIFE_TIME)) - prefered_lft = 0x7FFFFFFF/HZ; - - spin_lock_bh(&ifp->lock); - ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED|IFA_F_PERMANENT)) | ifa_flags; - - ifp->tstamp = jiffies; - ifp->valid_lft = valid_lft; - ifp->prefered_lft = prefered_lft; - - spin_unlock_bh(&ifp->lock); - if (!(ifp->flags&IFA_F_TENTATIVE)) - ipv6_ifa_notify(0, ifp); - in6_ifa_put(ifp); - - addrconf_verify(0); - - return 0; -} - static int inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) { struct rtattr **rta = arg; struct ifaddrmsg *ifm = NLMSG_DATA(nlh); struct in6_addr *pfx; - __u32 valid_lft = INFINITY_LIFE_TIME, prefered_lft = INFINITY_LIFE_TIME; pfx = NULL; if (rta[IFA_ADDRESS-1]) { @@ -2963,34 +2864,14 @@ inet6_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) pfx = RTA_DATA(rta[IFA_ADDRESS-1]); } if (rta[IFA_LOCAL-1]) { - if (RTA_PAYLOAD(rta[IFA_LOCAL-1]) < sizeof(*pfx) || - (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx)))) + if (pfx && memcmp(pfx, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*pfx))) return -EINVAL; pfx = RTA_DATA(rta[IFA_LOCAL-1]); } if (pfx == NULL) return -EINVAL; - if (rta[IFA_CACHEINFO-1]) { - struct ifa_cacheinfo *ci; - if (RTA_PAYLOAD(rta[IFA_CACHEINFO-1]) < sizeof(*ci)) - return -EINVAL; - ci = RTA_DATA(rta[IFA_CACHEINFO-1]); - valid_lft = ci->ifa_valid; - prefered_lft = ci->ifa_prefered; - } - - if (nlh->nlmsg_flags & NLM_F_REPLACE) { - int ret; - ret = inet6_addr_modify(ifm->ifa_index, pfx, - prefered_lft, valid_lft); - if (ret == 0 || !(nlh->nlmsg_flags & NLM_F_CREATE)) - return ret; - } - - return inet6_addr_add(ifm->ifa_index, pfx, ifm->ifa_prefixlen, - prefered_lft, valid_lft); - + return inet6_addr_add(ifm->ifa_index, pfx, ifm->ifa_prefixlen); } /* Maximum length of ifa_cacheinfo attributes */ @@ -3231,62 +3112,6 @@ static int inet6_dump_ifacaddr(struct sk_buff *skb, struct netlink_callback *cb) return inet6_dump_addr(skb, cb, type); } -static int inet6_rtm_getaddr(struct sk_buff *in_skb, - struct nlmsghdr* nlh, void *arg) -{ - struct rtattr **rta = arg; - struct ifaddrmsg *ifm = NLMSG_DATA(nlh); - struct in6_addr *addr = NULL; - struct net_device *dev = NULL; - struct inet6_ifaddr *ifa; - struct sk_buff *skb; - int size = NLMSG_SPACE(sizeof(struct ifaddrmsg) + INET6_IFADDR_RTA_SPACE); - int err; - - if (rta[IFA_ADDRESS-1]) { - if (RTA_PAYLOAD(rta[IFA_ADDRESS-1]) < sizeof(*addr)) - return -EINVAL; - addr = RTA_DATA(rta[IFA_ADDRESS-1]); - } - if (rta[IFA_LOCAL-1]) { - if (RTA_PAYLOAD(rta[IFA_LOCAL-1]) < sizeof(*addr) || - (addr && memcmp(addr, RTA_DATA(rta[IFA_LOCAL-1]), sizeof(*addr)))) - return -EINVAL; - addr = RTA_DATA(rta[IFA_LOCAL-1]); - } - if (addr == NULL) - return -EINVAL; - - if (ifm->ifa_index) - dev = __dev_get_by_index(ifm->ifa_index); - - if ((ifa = ipv6_get_ifaddr(addr, dev, 1)) == NULL) - return -EADDRNOTAVAIL; - - if ((skb = alloc_skb(size, GFP_KERNEL)) == NULL) { - err = -ENOBUFS; - goto out; - } - - NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid; - err = inet6_fill_ifaddr(skb, ifa, NETLINK_CB(in_skb).pid, - nlh->nlmsg_seq, RTM_NEWADDR, 0); - if (err < 0) { - err = -EMSGSIZE; - goto out_free; - } - - err = netlink_unicast(rtnl, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); - if (err > 0) - err = 0; -out: - in6_ifa_put(ifa); - return err; -out_free: - kfree_skb(skb); - goto out; -} - static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa) { struct sk_buff *skb; @@ -3533,8 +3358,7 @@ static struct rtnetlink_link inet6_rtnetlink_table[RTM_NR_MSGTYPES] = { [RTM_GETLINK - RTM_BASE] = { .dumpit = inet6_dump_ifinfo, }, [RTM_NEWADDR - RTM_BASE] = { .doit = inet6_rtm_newaddr, }, [RTM_DELADDR - RTM_BASE] = { .doit = inet6_rtm_deladdr, }, - [RTM_GETADDR - RTM_BASE] = { .doit = inet6_rtm_getaddr, - .dumpit = inet6_dump_ifaddr, }, + [RTM_GETADDR - RTM_BASE] = { .dumpit = inet6_dump_ifaddr, }, [RTM_GETMULTICAST - RTM_BASE] = { .dumpit = inet6_dump_ifmcaddr, }, [RTM_GETANYCAST - RTM_BASE] = { .dumpit = inet6_dump_ifacaddr, }, [RTM_NEWROUTE - RTM_BASE] = { .doit = inet6_rtm_newroute, }, diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index ac85e9c53..e19457fe4 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -658,7 +659,9 @@ int inet6_sk_rebuild_header(struct sock *sk) return err; } - __ip6_dst_store(sk, dst, NULL); + ip6_dst_store(sk, dst, NULL); + sk->sk_route_caps = dst->dev->features & + ~(NETIF_F_IP_CSUM | NETIF_F_TSO); } return 0; diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 9d4831bd4..6778173a3 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -24,6 +24,7 @@ * This file is derived from net/ipv4/ah.c. */ +#include #include #include #include @@ -291,7 +292,7 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len); memset(ah->auth_data, 0, ahp->icv_trunc_len); - skb_push(skb, hdr_len); + skb_push(skb, skb->data - skb->nh.raw); ahp->icv(ahp, skb, ah->auth_data); if (memcmp(ah->auth_data, auth_data, ahp->icv_trunc_len)) { LIMIT_NETDEBUG(KERN_WARNING "ipsec ah authentication error\n"); @@ -300,8 +301,12 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) } } - skb->h.raw = memcpy(skb->nh.raw += ah_hlen, tmp_hdr, hdr_len); - __skb_pull(skb, ah_hlen + hdr_len); + skb->nh.raw = skb_pull(skb, ah_hlen); + memcpy(skb->nh.raw, tmp_hdr, hdr_len); + skb->nh.ipv6h->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); + skb_pull(skb, hdr_len); + skb->h.raw = skb->data; + kfree(tmp_hdr); diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index f6881d7a0..39ec52892 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 3b55b4c8e..99a6eb233 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -696,7 +696,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, } tc = *(int *)CMSG_DATA(cmsg); - if (tc < -1 || tc > 0xff) + if (tc < 0 || tc > 0xff) goto exit_f; err = 0; diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index a278d5e86..22f046079 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -24,6 +24,7 @@ * This file is derived from net/ipv4/esp.c */ +#include #include #include #include @@ -141,18 +142,26 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) int hdr_len = skb->h.raw - skb->nh.raw; int nfrags; + unsigned char *tmp_hdr = NULL; int ret = 0; if (!pskb_may_pull(skb, sizeof(struct ipv6_esp_hdr))) { ret = -EINVAL; - goto out; + goto out_nofree; } if (elen <= 0 || (elen & (blksize-1))) { ret = -EINVAL; - goto out; + goto out_nofree; } + tmp_hdr = kmalloc(hdr_len, GFP_ATOMIC); + if (!tmp_hdr) { + ret = -ENOMEM; + goto out_nofree; + } + memcpy(tmp_hdr, skb->nh.raw, hdr_len); + /* If integrity check is required, do this. */ if (esp->auth.icv_full_len) { u8 sum[esp->auth.icv_full_len]; @@ -213,12 +222,16 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) /* ... check padding bits here. Silly. :-) */ pskb_trim(skb, skb->len - alen - padlen - 2); + skb->h.raw = skb_pull(skb, sizeof(struct ipv6_esp_hdr) + esp->conf.ivlen); + skb->nh.raw += sizeof(struct ipv6_esp_hdr) + esp->conf.ivlen; + memcpy(skb->nh.raw, tmp_hdr, hdr_len); + skb->nh.ipv6h->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); ret = nexthdr[1]; } - skb->h.raw = __skb_pull(skb, sizeof(*esph) + esp->conf.ivlen) - hdr_len; - out: + kfree(tmp_hdr); +out_nofree: return ret; } diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 86dac1068..9ca783dcc 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -179,7 +179,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp) static struct inet6_protocol destopt_protocol = { .handler = ipv6_destopt_rcv, - .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, + .flags = INET6_PROTO_NOPOLICY, }; void __init ipv6_destopt_init(void) @@ -340,7 +340,7 @@ looped_back: static struct inet6_protocol rthdr_protocol = { .handler = ipv6_rthdr_rcv, - .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR, + .flags = INET6_PROTO_NOPOLICY, }; void __init ipv6_rthdr_init(void) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 356a8a7ef..1044b6fce 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, if (hlimit < 0) hlimit = ipv6_get_hoplimit(dst->dev); - tclass = np->tclass; + tclass = np->cork.tclass; if (tclass < 0) tclass = 0; @@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) if (hlimit < 0) hlimit = ipv6_get_hoplimit(dst->dev); - tclass = np->tclass; + tclass = np->cork.tclass; if (tclass < 0) tclass = 0; @@ -712,11 +712,6 @@ discard_it: return 0; } -/* - * Special lock-class for __icmpv6_socket: - */ -static struct lock_class_key icmpv6_socket_sk_dst_lock_key; - int __init icmpv6_init(struct net_proto_family *ops) { struct sock *sk; @@ -735,14 +730,6 @@ int __init icmpv6_init(struct net_proto_family *ops) sk = per_cpu(__icmpv6_socket, i)->sk; sk->sk_allocation = GFP_ATOMIC; - /* - * Split off their lock-class, because sk->sk_dst_lock - * gets used from softirqs, which is safe for - * __icmpv6_socket (because those never get directly used - * via userspace syscalls), but unsafe for normal sockets. - */ - lockdep_set_class(&sk->sk_dst_lock, - &icmpv6_socket_sk_dst_lock_key); /* Enough space for 2 64K ICMP packets, including * sk_buff struct overhead. diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index bf491077b..eb2865d5a 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -13,6 +13,7 @@ * 2 of the License, or(at your option) any later version. */ +#include #include #include #include @@ -185,7 +186,9 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok) return err; } - __ip6_dst_store(sk, dst, NULL); + ip6_dst_store(sk, dst, NULL); + sk->sk_route_caps = dst->dev->features & + ~(NETIF_F_IP_CSUM | NETIF_F_TSO); } skb->dst = dst_clone(dst); diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index d2f3fc990..2ae84c961 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 764221220..2cb614934 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -19,6 +19,7 @@ * remove ip6_null_entry from the top of * routing table. */ +#include #include #include #include diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 062e526a6..f9ca63912 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -587,8 +588,6 @@ static struct ip6_flowlabel *ip6fl_get_next(struct seq_file *seq, struct ip6_flo while (!fl) { if (++state->bucket <= FL_HASH_MASK) fl = fl_ht[state->bucket]; - else - break; } return fl; } diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 25c2a9e03..aceee2525 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c @@ -71,8 +71,6 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt goto out; } - memset(IP6CB(skb), 0, sizeof(struct inet6_skb_parm)); - /* * Store incoming device index. When the packet will * be queued, we cannot refer to skb->dev anymore. @@ -86,9 +84,14 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt */ IP6CB(skb)->iif = skb->dst ? ((struct rt6_info *)skb->dst)->rt6i_idev->dev->ifindex : dev->ifindex; - if (unlikely(!pskb_may_pull(skb, sizeof(*hdr)))) + if (skb->len < sizeof(struct ipv6hdr)) goto err; + if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) { + IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); + goto drop; + } + hdr = skb->nh.ipv6h; if (hdr->version != 6) diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 4fb47a252..1d5dfeb26 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -28,6 +28,7 @@ * for datagram xmit */ +#include #include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include @@ -229,7 +229,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, skb->priority = sk->sk_priority; mtu = dst_mtu(dst); - if ((skb->len <= mtu) || ipfragok || skb_is_gso(skb)) { + if ((skb->len <= mtu) || ipfragok) { IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS); return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output); @@ -356,7 +356,6 @@ int ip6_forward(struct sk_buff *skb) skb->dev = dst->dev; icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 0, skb->dev); - IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); kfree_skb(skb); return -ETIMEDOUT; @@ -459,7 +458,6 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from) nf_bridge_get(to->nf_bridge); #endif #endif - skb_copy_secmark(to, from); } int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) @@ -490,7 +488,6 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) return offset; } -EXPORT_SYMBOL_GPL(ip6_find_1stfragopt); static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) { @@ -596,9 +593,6 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) } err = output(skb); - if(!err) - IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES); - if (err || !frag) break; @@ -710,11 +704,12 @@ slow_path: /* * Put this fragment into the sending queue. */ + + IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES); + err = output(frag); if (err) goto fail; - - IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES); } kfree_skb(skb); IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); @@ -726,51 +721,48 @@ fail: return err; } -static struct dst_entry *ip6_sk_dst_check(struct sock *sk, - struct dst_entry *dst, - struct flowi *fl) +int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl) { - struct ipv6_pinfo *np = inet6_sk(sk); - struct rt6_info *rt = (struct rt6_info *)dst; - - if (!dst) - goto out; + int err = 0; - /* Yes, checking route validity in not connected - * case is not very simple. Take into account, - * that we do not support routing by source, TOS, - * and MSG_DONTROUTE --ANK (980726) - * - * 1. If route was host route, check that - * cached destination is current. - * If it is network route, we still may - * check its validity using saved pointer - * to the last used address: daddr_cache. - * We do not want to save whole address now, - * (because main consumer of this service - * is tcp, which has not this problem), - * so that the last trick works only on connected - * sockets. - * 2. oif also should be the same. - */ - if (((rt->rt6i_dst.plen != 128 || - !ipv6_addr_equal(&fl->fl6_dst, &rt->rt6i_dst.addr)) - && (np->daddr_cache == NULL || - !ipv6_addr_equal(&fl->fl6_dst, np->daddr_cache))) - || (fl->oif && fl->oif != dst->dev->ifindex)) { - dst_release(dst); - dst = NULL; + *dst = NULL; + if (sk) { + struct ipv6_pinfo *np = inet6_sk(sk); + + *dst = sk_dst_check(sk, np->dst_cookie); + if (*dst) { + struct rt6_info *rt = (struct rt6_info*)*dst; + + /* Yes, checking route validity in not connected + * case is not very simple. Take into account, + * that we do not support routing by source, TOS, + * and MSG_DONTROUTE --ANK (980726) + * + * 1. If route was host route, check that + * cached destination is current. + * If it is network route, we still may + * check its validity using saved pointer + * to the last used address: daddr_cache. + * We do not want to save whole address now, + * (because main consumer of this service + * is tcp, which has not this problem), + * so that the last trick works only on connected + * sockets. + * 2. oif also should be the same. + */ + if (((rt->rt6i_dst.plen != 128 || + !ipv6_addr_equal(&fl->fl6_dst, + &rt->rt6i_dst.addr)) + && (np->daddr_cache == NULL || + !ipv6_addr_equal(&fl->fl6_dst, + np->daddr_cache))) + || (fl->oif && fl->oif != (*dst)->dev->ifindex)) { + dst_release(*dst); + *dst = NULL; + } + } } -out: - return dst; -} - -static int ip6_dst_lookup_tail(struct sock *sk, - struct dst_entry **dst, struct flowi *fl) -{ - int err; - if (*dst == NULL) *dst = ip6_route_output(sk, fl); @@ -779,6 +771,7 @@ static int ip6_dst_lookup_tail(struct sock *sk, if (ipv6_addr_any(&fl->fl6_src)) { err = ipv6_get_saddr(*dst, &fl->fl6_dst, &fl->fl6_src); + if (err) goto out_err_release; } @@ -791,48 +784,8 @@ out_err_release: return err; } -/** - * ip6_dst_lookup - perform route lookup on flow - * @sk: socket which provides route info - * @dst: pointer to dst_entry * for result - * @fl: flow to lookup - * - * This function performs a route lookup on the given flow. - * - * It returns zero on success, or a standard errno code on error. - */ -int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl) -{ - *dst = NULL; - return ip6_dst_lookup_tail(sk, dst, fl); -} EXPORT_SYMBOL_GPL(ip6_dst_lookup); -/** - * ip6_sk_dst_lookup - perform socket cached route lookup on flow - * @sk: socket which provides the dst cache and route info - * @dst: pointer to dst_entry * for result - * @fl: flow to lookup - * - * This function performs a route lookup on the given flow with the - * possibility of using the cached route in the socket if it is valid. - * It will take the socket dst lock when operating on the dst cache. - * As a result, this function can only be used in process context. - * - * It returns zero on success, or a standard errno code on error. - */ -int ip6_sk_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi *fl) -{ - *dst = NULL; - if (sk) { - *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie); - *dst = ip6_sk_dst_check(sk, *dst, fl); - } - - return ip6_dst_lookup_tail(sk, dst, fl); -} -EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup); - static inline int ip6_ufo_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), @@ -879,7 +832,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, /* specify the length of each IP datagram fragment*/ skb_shinfo(skb)->gso_size = mtu - fragheaderlen - sizeof(struct frag_hdr); - skb_shinfo(skb)->gso_type = SKB_GSO_UDP; + skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; ipv6_select_ident(skb, &fhdr); skb_shinfo(skb)->ip6_frag_id = fhdr.identification; __skb_queue_tail(&sk->sk_write_queue, skb); diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 84d7ebdb9..a995796b5 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -19,6 +19,7 @@ * */ +#include #include #include #include @@ -567,9 +568,10 @@ static inline struct ipv6_txoptions *create_tel(__u8 encap_limit) int opt_len = sizeof(*opt) + 8; - if (!(opt = kzalloc(opt_len, GFP_ATOMIC))) { + if (!(opt = kmalloc(opt_len, GFP_ATOMIC))) { return NULL; } + memset(opt, 0, opt_len); opt->tot_len = opt_len; opt->dst0opt = (struct ipv6_opt_hdr *) (opt + 1); opt->opt_nflen = 8; diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 7e4d1c17b..96cac9a94 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c @@ -30,6 +30,7 @@ * The decompression of IP datagram MUST be done after the reassembly, * AH/ESP processing. */ +#include #include #include #include @@ -65,8 +66,10 @@ static LIST_HEAD(ipcomp6_tfms_list); static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) { int err = -ENOMEM; + u8 nexthdr = 0; + int hdr_len = skb->h.raw - skb->nh.raw; + unsigned char *tmp_hdr = NULL; struct ipv6hdr *iph; - struct ipv6_comp_hdr *ipch; int plen, dlen; struct ipcomp_data *ipcd = x->data; u8 *start, *scratch; @@ -80,9 +83,17 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) /* Remove ipcomp header and decompress original payload */ iph = skb->nh.ipv6h; - ipch = (void *)skb->data; - skb->h.raw = skb->nh.raw + sizeof(*ipch); - __skb_pull(skb, sizeof(*ipch)); + tmp_hdr = kmalloc(hdr_len, GFP_ATOMIC); + if (!tmp_hdr) + goto out; + memcpy(tmp_hdr, iph, hdr_len); + nexthdr = *(u8 *)skb->data; + skb_pull(skb, sizeof(struct ipv6_comp_hdr)); + skb->nh.raw += sizeof(struct ipv6_comp_hdr); + memcpy(skb->nh.raw, tmp_hdr, hdr_len); + iph = skb->nh.ipv6h; + iph->payload_len = htons(ntohs(iph->payload_len) - sizeof(struct ipv6_comp_hdr)); + skb->h.raw = skb->data; /* decompression */ plen = skb->len; @@ -109,14 +120,20 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) goto out_put_cpu; } - skb->truesize += dlen - plen; - __skb_put(skb, dlen - plen); + skb_put(skb, dlen - plen); memcpy(skb->data, scratch, dlen); - err = ipch->nexthdr; + iph = skb->nh.ipv6h; + iph->payload_len = htons(skb->len); + out_put_cpu: put_cpu(); out: + kfree(tmp_hdr); + if (err) + goto error_out; + return nexthdr; +error_out: return err; } diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 1c50e6a63..4c20eeb3d 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -57,116 +58,9 @@ DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly; -static struct inet6_protocol *ipv6_gso_pull_exthdrs(struct sk_buff *skb, - int proto) -{ - struct inet6_protocol *ops = NULL; - - for (;;) { - struct ipv6_opt_hdr *opth; - int len; - - if (proto != NEXTHDR_HOP) { - ops = rcu_dereference(inet6_protos[proto]); - - if (unlikely(!ops)) - break; - - if (!(ops->flags & INET6_PROTO_GSO_EXTHDR)) - break; - } - - if (unlikely(!pskb_may_pull(skb, 8))) - break; - - opth = (void *)skb->data; - len = opth->hdrlen * 8 + 8; - - if (unlikely(!pskb_may_pull(skb, len))) - break; - - proto = opth->nexthdr; - __skb_pull(skb, len); - } - - return ops; -} - -static int ipv6_gso_send_check(struct sk_buff *skb) -{ - struct ipv6hdr *ipv6h; - struct inet6_protocol *ops; - int err = -EINVAL; - - if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) - goto out; - - ipv6h = skb->nh.ipv6h; - __skb_pull(skb, sizeof(*ipv6h)); - err = -EPROTONOSUPPORT; - - rcu_read_lock(); - ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); - if (likely(ops && ops->gso_send_check)) { - skb->h.raw = skb->data; - err = ops->gso_send_check(skb); - } - rcu_read_unlock(); - -out: - return err; -} - -static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features) -{ - struct sk_buff *segs = ERR_PTR(-EINVAL); - struct ipv6hdr *ipv6h; - struct inet6_protocol *ops; - - if (!(features & NETIF_F_HW_CSUM)) - features &= ~NETIF_F_SG; - - if (unlikely(skb_shinfo(skb)->gso_type & - ~(SKB_GSO_UDP | - SKB_GSO_DODGY | - SKB_GSO_TCP_ECN | - SKB_GSO_TCPV6 | - 0))) - goto out; - - if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) - goto out; - - ipv6h = skb->nh.ipv6h; - __skb_pull(skb, sizeof(*ipv6h)); - segs = ERR_PTR(-EPROTONOSUPPORT); - - rcu_read_lock(); - ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); - if (likely(ops && ops->gso_segment)) { - skb->h.raw = skb->data; - segs = ops->gso_segment(skb, features); - } - rcu_read_unlock(); - - if (unlikely(IS_ERR(segs))) - goto out; - - for (skb = segs; skb; skb = skb->next) { - ipv6h = skb->nh.ipv6h; - ipv6h->payload_len = htons(skb->len - skb->mac_len - - sizeof(*ipv6h)); - } - -out: - return segs; -} - static struct packet_type ipv6_packet_type = { .type = __constant_htons(ETH_P_IPV6), .func = ipv6_rcv, - .gso_send_check = ipv6_gso_send_check, - .gso_segment = ipv6_gso_segment, }; struct ip6_ra_chain *ip6_ra_chain; @@ -365,7 +259,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, break; case IPV6_TCLASS: - if (val < -1 || val > 0xff) + if (val < 0 || val > 0xff) goto e_inval; np->tclass = val; retv = 0; @@ -950,8 +844,6 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, case IPV6_TCLASS: val = np->tclass; - if (val < 0) - val = 0; break; case IPV6_RECVTCLASS: diff --git a/net/ipv6/ipv6_syms.c b/net/ipv6/ipv6_syms.c index dd4d1ce77..16482785b 100644 --- a/net/ipv6/ipv6_syms.c +++ b/net/ipv6/ipv6_syms.c @@ -1,4 +1,5 @@ +#include #include #include #include diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 639eb20c9..6e871afbb 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -28,6 +28,7 @@ * - MLDv2 support */ +#include #include #include #include @@ -268,14 +269,13 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr) if ((dev = dev_get_by_index(mc_lst->ifindex)) != NULL) { struct inet6_dev *idev = in6_dev_get(dev); - (void) ip6_mc_leave_src(sk, mc_lst, idev); if (idev) { + (void) ip6_mc_leave_src(sk,mc_lst,idev); __ipv6_dev_mc_dec(idev, &mc_lst->addr); in6_dev_put(idev); } dev_put(dev); - } else - (void) ip6_mc_leave_src(sk, mc_lst, NULL); + } sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); return 0; } @@ -335,14 +335,13 @@ void ipv6_sock_mc_close(struct sock *sk) if (dev) { struct inet6_dev *idev = in6_dev_get(dev); - (void) ip6_mc_leave_src(sk, mc_lst, idev); if (idev) { + (void) ip6_mc_leave_src(sk, mc_lst, idev); __ipv6_dev_mc_dec(idev, &mc_lst->addr); in6_dev_put(idev); } dev_put(dev); - } else - (void) ip6_mc_leave_src(sk, mc_lst, NULL); + } sock_kfree_s(sk, mc_lst, sizeof(*mc_lst)); diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index b50055b92..dfa20d3be 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -48,6 +48,7 @@ #endif #include +#include #include #include #include diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 968a14be0..b4b7d441a 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c @@ -505,7 +505,7 @@ ipq_rcv_skb(struct sk_buff *skb) if (type <= IPQM_BASE) return; - if (security_netlink_recv(skb, CAP_NET_ADMIN)) + if (security_netlink_recv(skb)) RCV_SKB_FAIL(-EPERM); write_lock_bh(&queue_lock); diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 751548a42..2e72f89a7 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -19,13 +19,13 @@ */ #include +#include #include #include #include #include #include #include -#include #include #include #include @@ -377,7 +377,7 @@ ip6t_do_table(struct sk_buff **pskb, } while (!hotdrop); #ifdef CONFIG_NETFILTER_DEBUG - ((struct ip6t_entry *)table_base)->comefrom = NETFILTER_LINK_POISON; + ((struct ip6t_entry *)table_base)->comefrom = 0xdead57ac; #endif read_unlock_bh(&table->lock); @@ -444,13 +444,6 @@ mark_source_chains(struct xt_table_info *newinfo, && unconditional(&e->ipv6)) { unsigned int oldpos, size; - if (t->verdict < -NF_MAX_VERDICT - 1) { - duprintf("mark_source_chains: bad " - "negative verdict (%i)\n", - t->verdict); - return 0; - } - /* Return: backtrack through the last big jump. */ do { @@ -488,13 +481,6 @@ mark_source_chains(struct xt_table_info *newinfo, if (strcmp(t->target.u.user.name, IP6T_STANDARD_TARGET) == 0 && newpos >= 0) { - if (newpos > newinfo->size - - sizeof(struct ip6t_entry)) { - duprintf("mark_source_chains: " - "bad verdict (%i)\n", - newpos); - return 0; - } /* This a jump; chase it. */ duprintf("Jump rule %u -> %u\n", pos, newpos); @@ -527,6 +513,27 @@ cleanup_match(struct ip6t_entry_match *m, unsigned int *i) return 0; } +static inline int +standard_check(const struct ip6t_entry_target *t, + unsigned int max_offset) +{ + struct ip6t_standard_target *targ = (void *)t; + + /* Check standard info. */ + if (targ->verdict >= 0 + && targ->verdict > max_offset - sizeof(struct ip6t_entry)) { + duprintf("ip6t_standard_check: bad verdict (%i)\n", + targ->verdict); + return 0; + } + if (targ->verdict < -NF_MAX_VERDICT - 1) { + duprintf("ip6t_standard_check: bad negative verdict (%i)\n", + targ->verdict); + return 0; + } + return 1; +} + static inline int check_match(struct ip6t_entry_match *m, const char *name, @@ -585,19 +592,12 @@ check_entry(struct ip6t_entry *e, const char *name, unsigned int size, return -EINVAL; } - if (e->target_offset + sizeof(struct ip6t_entry_target) > - e->next_offset) - return -EINVAL; - j = 0; ret = IP6T_MATCH_ITERATE(e, check_match, name, &e->ipv6, e->comefrom, &j); if (ret != 0) goto cleanup_matches; t = ip6t_get_target(e); - ret = -EINVAL; - if (e->target_offset + t->u.target_size > e->next_offset) - goto cleanup_matches; target = try_then_request_module(xt_find_target(AF_INET6, t->u.user.name, t->u.user.revision), @@ -615,7 +615,12 @@ check_entry(struct ip6t_entry *e, const char *name, unsigned int size, if (ret) goto err; - if (t->u.kernel.target->checkentry + if (t->u.kernel.target == &ip6t_standard_target) { + if (!standard_check(t, size)) { + ret = -EINVAL; + goto cleanup_matches; + } + } else if (t->u.kernel.target->checkentry && !t->u.kernel.target->checkentry(name, e, target, t->data, t->u.target_size - sizeof(*t), @@ -765,7 +770,7 @@ translate_table(const char *name, if (ret != 0) { IP6T_ENTRY_ITERATE(entry0, newinfo->size, - cleanup_entry, &i); + cleanup_entry, &i); return ret; } @@ -775,7 +780,7 @@ translate_table(const char *name, memcpy(newinfo->entries[i], entry0, newinfo->size); } - return 0; + return ret; } /* Gets counters. */ @@ -1276,8 +1281,7 @@ int ip6t_register_table(struct xt_table *table, return ret; } - ret = xt_register_table(table, &bootstrap, newinfo); - if (ret != 0) { + if (xt_register_table(table, &bootstrap, newinfo) != 0) { xt_free_table_info(newinfo); return ret; } @@ -1393,39 +1397,23 @@ static int __init ip6_tables_init(void) { int ret; - ret = xt_proto_init(AF_INET6); - if (ret < 0) - goto err1; + xt_proto_init(AF_INET6); /* Noone else will be downing sem now, so we won't sleep */ - ret = xt_register_target(&ip6t_standard_target); - if (ret < 0) - goto err2; - ret = xt_register_target(&ip6t_error_target); - if (ret < 0) - goto err3; - ret = xt_register_match(&icmp6_matchstruct); - if (ret < 0) - goto err4; + xt_register_target(&ip6t_standard_target); + xt_register_target(&ip6t_error_target); + xt_register_match(&icmp6_matchstruct); /* Register setsockopt */ ret = nf_register_sockopt(&ip6t_sockopts); - if (ret < 0) - goto err5; + if (ret < 0) { + duprintf("Unable to register sockopts.\n"); + xt_proto_fini(AF_INET6); + return ret; + } printk("ip6_tables: (C) 2000-2006 Netfilter Core Team\n"); return 0; - -err5: - xt_unregister_match(&icmp6_matchstruct); -err4: - xt_unregister_target(&ip6t_error_target); -err3: - xt_unregister_target(&ip6t_standard_target); -err2: - xt_proto_fini(AF_INET6); -err1: - return ret; } static void __exit ip6_tables_fini(void) diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 8629ba195..de1175c27 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index c2ab38ff4..93bae36f2 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c @@ -20,6 +20,7 @@ * structures. */ +#include #include #include #include @@ -188,7 +189,7 @@ static unsigned int ipv6_confirm(unsigned int hooknum, /* This is where we call the helper: as the packet goes out. */ ct = nf_ct_get(*pskb, &ctinfo); - if (!ct || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY) + if (!ct) goto out; help = nfct_help(ct); diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index ef18a7b70..86c670326 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c @@ -233,7 +233,7 @@ icmpv6_error(struct sk_buff *skb, unsigned int dataoff, return -NF_ACCEPT; } - if (nf_conntrack_checksum && hooknum == NF_IP6_PRE_ROUTING && + if (hooknum == NF_IP6_PRE_ROUTING && nf_ip6_checksum(skb, hooknum, dataoff, IPPROTO_ICMPV6)) { nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL, "nf_ct_icmpv6: ICMPv6 checksum failed\n"); diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 00d558380..3e319035f 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -14,6 +14,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -455,9 +456,13 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb, DEBUGP("queue: message is too short.\n"); goto err; } - if (pskb_trim_rcsum(skb, end - offset)) { - DEBUGP("Can't trim\n"); - goto err; + if (end-offset < skb->len) { + if (pskb_trim(skb, end - offset)) { + DEBUGP("Can't trim\n"); + goto err; + } + if (skb->ip_summed != CHECKSUM_UNNECESSARY) + skb->ip_summed = CHECKSUM_NONE; } /* Find out which fragments are in front and at the back of us diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c index efee7a630..779ddf77f 100644 --- a/net/ipv6/proc.c +++ b/net/ipv6/proc.c @@ -17,6 +17,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 15b862d8a..fa1ce0ae1 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -411,7 +411,6 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, /* Copy the address. */ if (sin6) { sin6->sin6_family = AF_INET6; - sin6->sin6_port = 0; ipv6_addr_copy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr); sin6->sin6_flowinfo = 0; sin6->sin6_scope_id = 0; @@ -781,7 +780,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, } if (tclass < 0) { - tclass = np->tclass; + tclass = np->cork.tclass; if (tclass < 0) tclass = 0; } diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 4e299c69e..eef985e01 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -28,6 +28,7 @@ * YOSHIFUJI,H. @USAGI Always remove fragment header to * calculate ICV correctly. */ +#include #include #include #include diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d9baca062..8a7779327 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -53,7 +54,6 @@ #include #include #include -#include #include @@ -349,7 +349,7 @@ static struct rt6_info *rt6_select(struct rt6_info **head, int oif, (strict & RT6_SELECT_F_REACHABLE) && last && last != rt0) { /* no entries matched; do round-robin */ - static DEFINE_SPINLOCK(lock); + static spinlock_t lock = SPIN_LOCK_UNLOCKED; spin_lock(&lock); *head = rt0->u.next; rt0->u.next = last->u.next; @@ -743,7 +743,6 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) dst->metrics[RTAX_FEATURES-1] |= RTAX_FEATURE_ALLFRAG; } dst->metrics[RTAX_MTU-1] = mtu; - call_netevent_notifiers(NETEVENT_PMTU_UPDATE, dst); } } @@ -1157,7 +1156,6 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr, struct rt6_info *rt, *nrt = NULL; int strict; struct fib6_node *fn; - struct netevent_redirect netevent; /* * Get the "current" route for this destination and @@ -1255,10 +1253,6 @@ restart: if (ip6_ins_rt(nrt, NULL, NULL, NULL)) goto out; - netevent.old = &rt->u.dst; - netevent.new = &nrt->u.dst; - call_netevent_notifiers(NETEVENT_REDIRECT, &netevent); - if (rt->rt6i_flags&RTF_CACHE) { ip6_del_rt(rt, NULL, NULL, NULL); return; @@ -1532,10 +1526,6 @@ int ipv6_route_ioctl(unsigned int cmd, void __user *arg) static int ip6_pkt_discard(struct sk_buff *skb) { - int type = ipv6_addr_type(&skb->nh.ipv6h->daddr); - if (type == IPV6_ADDR_ANY || type == IPV6_ADDR_RESERVED) - IP6_INC_STATS(IPSTATS_MIB_INADDRERRORS); - IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES); icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev); kfree_skb(skb); diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 836eecd7e..6578c3080 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -18,6 +18,7 @@ * Nate Thompson : 6to4 support */ +#include #include #include #include @@ -380,6 +381,7 @@ static int ipip6_rcv(struct sk_buff *skb) secpath_reset(skb); skb->mac.raw = skb->nh.raw; skb->nh.raw = skb->data; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); IPCB(skb)->flags = 0; skb->protocol = htons(ETH_P_IPV6); skb->pkt_type = PACKET_HOST; diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 7a4639db1..8eff9fa1e 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 72c074ce4..301eee726 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -26,6 +26,7 @@ */ #include +#include #include #include #include @@ -269,8 +270,9 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, ipv6_addr_copy(&np->saddr, saddr); inet->rcv_saddr = LOOPBACK4_IPV6; - sk->sk_gso_type = SKB_GSO_TCPV6; - __ip6_dst_store(sk, dst, NULL); + ip6_dst_store(sk, dst, NULL); + sk->sk_route_caps = dst->dev->features & + ~(NETIF_F_IP_CSUM | NETIF_F_TSO); icsk->icsk_ext_hdr_len = 0; if (np->opt) @@ -427,6 +429,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, case TCP_SYN_RECV: /* Cannot happen. It can, it SYNs are crossed. --ANK */ if (!sock_owned_by_user(sk)) { + TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); sk->sk_err = err; sk->sk_error_report(sk); /* Wake people up to see the error (see connect in sock.c) */ @@ -551,24 +554,6 @@ static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb) } } -static int tcp_v6_gso_send_check(struct sk_buff *skb) -{ - struct ipv6hdr *ipv6h; - struct tcphdr *th; - - if (!pskb_may_pull(skb, sizeof(*th))) - return -EINVAL; - - ipv6h = skb->nh.ipv6h; - th = skb->h.th; - - th->check = 0; - th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len, - IPPROTO_TCP, 0); - skb->csum = offsetof(struct tcphdr, check); - skb->ip_summed = CHECKSUM_HW; - return 0; -} static void tcp_v6_send_reset(struct sk_buff *skb) { @@ -830,6 +815,7 @@ drop: if (req) reqsk_free(req); + TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); return 0; /* don't send reset */ } @@ -944,8 +930,9 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, * comment in that function for the gory details. -acme */ - newsk->sk_gso_type = SKB_GSO_TCPV6; - __ip6_dst_store(newsk, dst, NULL); + ip6_dst_store(newsk, dst, NULL); + newsk->sk_route_caps = dst->dev->features & + ~(NETIF_F_IP_CSUM | NETIF_F_TSO); newtcp6sk = (struct tcp6_sock *)newsk; inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; @@ -1228,19 +1215,11 @@ process: skb->dev = NULL; - bh_lock_sock_nested(sk); + bh_lock_sock(sk); ret = 0; if (!sock_owned_by_user(sk)) { -#ifdef CONFIG_NET_DMA - struct tcp_sock *tp = tcp_sk(sk); - if (tp->ucopy.dma_chan) - ret = tcp_v6_do_rcv(sk, skb); - else -#endif - { - if (!tcp_prequeue(sk, skb)) - ret = tcp_v6_do_rcv(sk, skb); - } + if (!tcp_prequeue(sk, skb)) + ret = tcp_v6_do_rcv(sk, skb); } else sk_add_backlog(sk, skb); bh_unlock_sock(sk); @@ -1482,8 +1461,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) dest->s6_addr32[0], dest->s6_addr32[1], dest->s6_addr32[2], dest->s6_addr32[3], destp, sp->sk_state, - tp->write_seq-tp->snd_una, - (sp->sk_state == TCP_LISTEN) ? sp->sk_ack_backlog : (tp->rcv_nxt - tp->copied_seq), + tp->write_seq-tp->snd_una, tp->rcv_nxt-tp->copied_seq, timer_active, jiffies_to_clock_t(timer_expires - jiffies), icsk->icsk_retransmits, @@ -1619,8 +1597,6 @@ struct proto tcpv6_prot = { static struct inet6_protocol tcpv6_protocol = { .handler = tcp_v6_rcv, .err_handler = tcp_v6_err, - .gso_send_check = tcp_v6_gso_send_check, - .gso_segment = tcp_tso_segment, .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, }; diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 7ecfe82e1..8d3432a70 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -23,6 +23,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include @@ -314,13 +315,14 @@ static void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, { struct ipv6_pinfo *np; struct ipv6hdr *hdr = (struct ipv6hdr*)skb->data; + struct net_device *dev = skb->dev; struct in6_addr *saddr = &hdr->saddr; struct in6_addr *daddr = &hdr->daddr; struct udphdr *uh = (struct udphdr*)(skb->data+offset); struct sock *sk; int err; - sk = udp_v6_lookup(daddr, uh->dest, saddr, uh->source, inet6_iif(skb)); + sk = udp_v6_lookup(daddr, uh->dest, saddr, uh->source, dev->ifindex); if (sk == NULL) return; @@ -414,7 +416,7 @@ static void udpv6_mcast_deliver(struct udphdr *uh, read_lock(&udp_hash_lock); sk = sk_head(&udp_hash[ntohs(uh->dest) & (UDP_HTABLE_SIZE - 1)]); - dif = inet6_iif(skb); + dif = skb->dev->ifindex; sk = udp_v6_mcast_next(sk, uh->dest, daddr, uh->source, saddr, dif); if (!sk) { kfree_skb(skb); @@ -495,7 +497,7 @@ static int udpv6_rcv(struct sk_buff **pskb) * check socket cache ... must talk to Alan about his plans * for sock caches... i'll skip this for now. */ - sk = udp_v6_lookup(saddr, uh->source, daddr, uh->dest, inet6_iif(skb)); + sk = udp_v6_lookup(saddr, uh->source, daddr, uh->dest, dev->ifindex); if (sk == NULL) { if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) @@ -781,7 +783,7 @@ do_udp_sendmsg: connected = 0; } - err = ip6_sk_dst_lookup(sk, &dst, fl); + err = ip6_dst_lookup(sk, &dst, fl); if (err) goto out; if (final_p) diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index 0405d74ff..00cfdee18 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c @@ -13,9 +13,21 @@ #include #include #include +#include +#include +#include #include #include +static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) +{ + struct ipv6hdr *outer_iph = skb->nh.ipv6h; + struct ipv6hdr *inner_iph = skb->h.ipv6h; + + if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) + IP6_ECN_set_ce(inner_iph); +} + int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) { int err; @@ -69,10 +81,21 @@ int xfrm6_rcv_spi(struct sk_buff *skb, u32 spi) xfrm_vec[xfrm_nr++] = x; - if (x->mode->input(x, skb)) - goto drop; - if (x->props.mode) { /* XXX */ + if (nexthdr != IPPROTO_IPV6) + goto drop; + if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) + goto drop; + if (skb_cloned(skb) && + pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) + goto drop; + if (x->props.flags & XFRM_STATE_DECAP_DSCP) + ipv6_copy_dscp(skb->nh.ipv6h, skb->h.ipv6h); + if (!(x->props.flags & XFRM_STATE_NOECN)) + ipip6_ecn_decapsulate(skb); + skb->mac.raw = memmove(skb->data - skb->mac_len, + skb->mac.raw, skb->mac_len); + skb->nh.raw = skb->data; decaps = 1; break; } diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c deleted file mode 100644 index 711d713e3..000000000 --- a/net/ipv6/xfrm6_mode_transport.c +++ /dev/null @@ -1,88 +0,0 @@ -/* - * xfrm6_mode_transport.c - Transport mode encapsulation for IPv6. - * - * Copyright (C) 2002 USAGI/WIDE Project - * Copyright (c) 2004-2006 Herbert Xu - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* Add encapsulation header. - * - * The IP header and mutable extension headers will be moved forward to make - * space for the encapsulation header. - * - * On exit, skb->h will be set to the start of the encapsulation header to be - * filled in by x->type->output and skb->nh will be set to the nextheader field - * of the extension header directly preceding the encapsulation header, or in - * its absence, that of the top IP header. The value of skb->data will always - * point to the top IP header. - */ -static int xfrm6_transport_output(struct sk_buff *skb) -{ - struct xfrm_state *x = skb->dst->xfrm; - struct ipv6hdr *iph; - u8 *prevhdr; - int hdr_len; - - skb_push(skb, x->props.header_len); - iph = skb->nh.ipv6h; - - hdr_len = ip6_find_1stfragopt(skb, &prevhdr); - skb->nh.raw = prevhdr - x->props.header_len; - skb->h.raw = skb->data + hdr_len; - memmove(skb->data, iph, hdr_len); - return 0; -} - -/* Remove encapsulation header. - * - * The IP header will be moved over the top of the encapsulation header. - * - * On entry, skb->h shall point to where the IP header should be and skb->nh - * shall be set to where the IP header currently is. skb->data shall point - * to the start of the payload. - */ -static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) -{ - int ihl = skb->data - skb->h.raw; - - if (skb->h.raw != skb->nh.raw) - skb->nh.raw = memmove(skb->h.raw, skb->nh.raw, ihl); - skb->nh.ipv6h->payload_len = htons(skb->len + ihl - - sizeof(struct ipv6hdr)); - skb->h.raw = skb->data; - return 0; -} - -static struct xfrm_mode xfrm6_transport_mode = { - .input = xfrm6_transport_input, - .output = xfrm6_transport_output, - .owner = THIS_MODULE, - .encap = XFRM_MODE_TRANSPORT, -}; - -static int __init xfrm6_transport_init(void) -{ - return xfrm_register_mode(&xfrm6_transport_mode, AF_INET6); -} - -static void __exit xfrm6_transport_exit(void) -{ - int err; - - err = xfrm_unregister_mode(&xfrm6_transport_mode, AF_INET6); - BUG_ON(err); -} - -module_init(xfrm6_transport_init); -module_exit(xfrm6_transport_exit); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_XFRM_MODE(AF_INET6, XFRM_MODE_TRANSPORT); diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c deleted file mode 100644 index 8af79be2e..000000000 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * xfrm6_mode_tunnel.c - Tunnel mode encapsulation for IPv6. - * - * Copyright (C) 2002 USAGI/WIDE Project - * Copyright (c) 2004-2006 Herbert Xu - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static inline void ipip6_ecn_decapsulate(struct sk_buff *skb) -{ - struct ipv6hdr *outer_iph = skb->nh.ipv6h; - struct ipv6hdr *inner_iph = skb->h.ipv6h; - - if (INET_ECN_is_ce(ipv6_get_dsfield(outer_iph))) - IP6_ECN_set_ce(inner_iph); -} - -/* Add encapsulation header. - * - * The top IP header will be constructed per RFC 2401. The following fields - * in it shall be filled in by x->type->output: - * payload_len - * - * On exit, skb->h will be set to the start of the encapsulation header to be - * filled in by x->type->output and skb->nh will be set to the nextheader field - * of the extension header directly preceding the encapsulation header, or in - * its absence, that of the top IP header. The value of skb->data will always - * point to the top IP header. - */ -static int xfrm6_tunnel_output(struct sk_buff *skb) -{ - struct dst_entry *dst = skb->dst; - struct xfrm_state *x = dst->xfrm; - struct ipv6hdr *iph, *top_iph; - int dsfield; - - skb_push(skb, x->props.header_len); - iph = skb->nh.ipv6h; - - skb->nh.raw = skb->data; - top_iph = skb->nh.ipv6h; - skb->nh.raw = &top_iph->nexthdr; - skb->h.ipv6h = top_iph + 1; - - top_iph->version = 6; - top_iph->priority = iph->priority; - top_iph->flow_lbl[0] = iph->flow_lbl[0]; - top_iph->flow_lbl[1] = iph->flow_lbl[1]; - top_iph->flow_lbl[2] = iph->flow_lbl[2]; - dsfield = ipv6_get_dsfield(top_iph); - dsfield = INET_ECN_encapsulate(dsfield, dsfield); - if (x->props.flags & XFRM_STATE_NOECN) - dsfield &= ~INET_ECN_MASK; - ipv6_change_dsfield(top_iph, 0, dsfield); - top_iph->nexthdr = IPPROTO_IPV6; - top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT); - ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); - ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); - return 0; -} - -static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb) -{ - int err = -EINVAL; - - if (skb->nh.raw[IP6CB(skb)->nhoff] != IPPROTO_IPV6) - goto out; - if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) - goto out; - - if (skb_cloned(skb) && - (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) - goto out; - - if (x->props.flags & XFRM_STATE_DECAP_DSCP) - ipv6_copy_dscp(skb->nh.ipv6h, skb->h.ipv6h); - if (!(x->props.flags & XFRM_STATE_NOECN)) - ipip6_ecn_decapsulate(skb); - skb->mac.raw = memmove(skb->data - skb->mac_len, - skb->mac.raw, skb->mac_len); - skb->nh.raw = skb->data; - err = 0; - -out: - return err; -} - -static struct xfrm_mode xfrm6_tunnel_mode = { - .input = xfrm6_tunnel_input, - .output = xfrm6_tunnel_output, - .owner = THIS_MODULE, - .encap = XFRM_MODE_TUNNEL, -}; - -static int __init xfrm6_tunnel_init(void) -{ - return xfrm_register_mode(&xfrm6_tunnel_mode, AF_INET6); -} - -static void __exit xfrm6_tunnel_exit(void) -{ - int err; - - err = xfrm_unregister_mode(&xfrm6_tunnel_mode, AF_INET6); - BUG_ON(err); -} - -module_init(xfrm6_tunnel_init); -module_exit(xfrm6_tunnel_exit); -MODULE_LICENSE("GPL"); -MODULE_ALIAS_XFRM_MODE(AF_INET6, XFRM_MODE_TUNNEL); diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index c8c8b44a0..e9ea33892 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c @@ -14,9 +14,68 @@ #include #include #include +#include +#include #include #include +/* Add encapsulation header. + * + * In transport mode, the IP header and mutable extension headers will be moved + * forward to make space for the encapsulation header. + * + * In tunnel mode, the top IP header will be constructed per RFC 2401. + * The following fields in it shall be filled in by x->type->output: + * payload_len + * + * On exit, skb->h will be set to the start of the encapsulation header to be + * filled in by x->type->output and skb->nh will be set to the nextheader field + * of the extension header directly preceding the encapsulation header, or in + * its absence, that of the top IP header. The value of skb->data will always + * point to the top IP header. + */ +static void xfrm6_encap(struct sk_buff *skb) +{ + struct dst_entry *dst = skb->dst; + struct xfrm_state *x = dst->xfrm; + struct ipv6hdr *iph, *top_iph; + int dsfield; + + skb_push(skb, x->props.header_len); + iph = skb->nh.ipv6h; + + if (!x->props.mode) { + u8 *prevhdr; + int hdr_len; + + hdr_len = ip6_find_1stfragopt(skb, &prevhdr); + skb->nh.raw = prevhdr - x->props.header_len; + skb->h.raw = skb->data + hdr_len; + memmove(skb->data, iph, hdr_len); + return; + } + + skb->nh.raw = skb->data; + top_iph = skb->nh.ipv6h; + skb->nh.raw = &top_iph->nexthdr; + skb->h.ipv6h = top_iph + 1; + + top_iph->version = 6; + top_iph->priority = iph->priority; + top_iph->flow_lbl[0] = iph->flow_lbl[0]; + top_iph->flow_lbl[1] = iph->flow_lbl[1]; + top_iph->flow_lbl[2] = iph->flow_lbl[2]; + dsfield = ipv6_get_dsfield(top_iph); + dsfield = INET_ECN_encapsulate(dsfield, dsfield); + if (x->props.flags & XFRM_STATE_NOECN) + dsfield &= ~INET_ECN_MASK; + ipv6_change_dsfield(top_iph, 0, dsfield); + top_iph->nexthdr = IPPROTO_IPV6; + top_iph->hop_limit = dst_metric(dst->child, RTAX_HOPLIMIT); + ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); + ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); +} + static int xfrm6_tunnel_check_size(struct sk_buff *skb) { int mtu, ret = 0; @@ -59,9 +118,7 @@ static int xfrm6_output_one(struct sk_buff *skb) if (err) goto error; - err = x->mode->output(skb); - if (err) - goto error; + xfrm6_encap(skb); err = x->type->output(x, skb); if (err) @@ -125,7 +182,7 @@ static int xfrm6_output_finish(struct sk_buff *skb) if (!skb_is_gso(skb)) return xfrm6_output_finish2(skb); - skb->protocol = htons(ETH_P_IPV6); + skb->protocol = htons(ETH_P_IP); segs = skb_gso_segment(skb, 0); kfree_skb(skb); if (unlikely(IS_ERR(segs))) diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 73cd250ae..88c840f1b 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -22,6 +23,8 @@ static struct dst_ops xfrm6_dst_ops; static struct xfrm_policy_afinfo xfrm6_policy_afinfo; +static struct xfrm_type_map xfrm6_type_map = { .lock = RW_LOCK_UNLOCKED }; + static int xfrm6_dst_lookup(struct xfrm_dst **dst, struct flowi *fl) { int err = 0; @@ -246,7 +249,9 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl) static inline int xfrm6_garbage_collect(void) { + read_lock(&xfrm6_policy_afinfo.lock); xfrm6_policy_afinfo.garbage_collect(); + read_unlock(&xfrm6_policy_afinfo.lock); return (atomic_read(&xfrm6_dst_ops.entries) > xfrm6_dst_ops.gc_thresh*2); } @@ -306,6 +311,8 @@ static struct dst_ops xfrm6_dst_ops = { static struct xfrm_policy_afinfo xfrm6_policy_afinfo = { .family = AF_INET6, + .lock = RW_LOCK_UNLOCKED, + .type_map = &xfrm6_type_map, .dst_ops = &xfrm6_dst_ops, .dst_lookup = xfrm6_dst_lookup, .find_bundle = __xfrm6_find_bundle, diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index b33296b3f..a5723024d 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c @@ -135,6 +135,7 @@ __xfrm6_find_acq(u8 mode, u32 reqid, u8 proto, static struct xfrm_state_afinfo xfrm6_state_afinfo = { .family = AF_INET6, + .lock = RW_LOCK_UNLOCKED, .init_tempsel = __xfrm6_init_tempsel, .state_lookup = __xfrm6_state_lookup, .find_acq = __xfrm6_find_acq, diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index c8f9369c2..d37768e50 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c @@ -21,6 +21,7 @@ * Based on net/ipv4/xfrm4_tunnel.c * */ +#include #include #include #include @@ -31,6 +32,27 @@ #include #include +#ifdef CONFIG_IPV6_XFRM6_TUNNEL_DEBUG +# define X6TDEBUG 3 +#else +# define X6TDEBUG 1 +#endif + +#define X6TPRINTK(fmt, args...) printk(fmt, ## args) +#define X6TNOPRINTK(fmt, args...) do { ; } while(0) + +#if X6TDEBUG >= 1 +# define X6TPRINTK1 X6TPRINTK +#else +# define X6TPRINTK1 X6TNOPRINTK +#endif + +#if X6TDEBUG >= 3 +# define X6TPRINTK3 X6TPRINTK +#else +# define X6TPRINTK3 X6TNOPRINTK +#endif + /* * xfrm_tunnel_spi things are for allocating unique id ("spi") * per xfrm_address_t. @@ -41,8 +63,15 @@ struct xfrm6_tunnel_spi { xfrm_address_t addr; u32 spi; atomic_t refcnt; +#ifdef XFRM6_TUNNEL_SPI_MAGIC + u32 magic; +#endif }; +#ifdef CONFIG_IPV6_XFRM6_TUNNEL_DEBUG +# define XFRM6_TUNNEL_SPI_MAGIC 0xdeadbeef +#endif + static DEFINE_RWLOCK(xfrm6_tunnel_spi_lock); static u32 xfrm6_tunnel_spi; @@ -58,15 +87,43 @@ static kmem_cache_t *xfrm6_tunnel_spi_kmem __read_mostly; static struct hlist_head xfrm6_tunnel_spi_byaddr[XFRM6_TUNNEL_SPI_BYADDR_HSIZE]; static struct hlist_head xfrm6_tunnel_spi_byspi[XFRM6_TUNNEL_SPI_BYSPI_HSIZE]; +#ifdef XFRM6_TUNNEL_SPI_MAGIC +static int x6spi_check_magic(const struct xfrm6_tunnel_spi *x6spi, + const char *name) +{ + if (unlikely(x6spi->magic != XFRM6_TUNNEL_SPI_MAGIC)) { + X6TPRINTK3(KERN_DEBUG "%s(): x6spi object " + "at %p has corrupted magic %08x " + "(should be %08x)\n", + name, x6spi, x6spi->magic, XFRM6_TUNNEL_SPI_MAGIC); + return -1; + } + return 0; +} +#else +static int inline x6spi_check_magic(const struct xfrm6_tunnel_spi *x6spi, + const char *name) +{ + return 0; +} +#endif + +#define X6SPI_CHECK_MAGIC(x6spi) x6spi_check_magic((x6spi), __FUNCTION__) + + static unsigned inline xfrm6_tunnel_spi_hash_byaddr(xfrm_address_t *addr) { unsigned h; + X6TPRINTK3(KERN_DEBUG "%s(addr=%p)\n", __FUNCTION__, addr); + h = addr->a6[0] ^ addr->a6[1] ^ addr->a6[2] ^ addr->a6[3]; h ^= h >> 16; h ^= h >> 8; h &= XFRM6_TUNNEL_SPI_BYADDR_HSIZE - 1; + X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, h); + return h; } @@ -80,13 +137,19 @@ static int xfrm6_tunnel_spi_init(void) { int i; + X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); + xfrm6_tunnel_spi = 0; xfrm6_tunnel_spi_kmem = kmem_cache_create("xfrm6_tunnel_spi", sizeof(struct xfrm6_tunnel_spi), 0, SLAB_HWCACHE_ALIGN, NULL, NULL); - if (!xfrm6_tunnel_spi_kmem) + if (!xfrm6_tunnel_spi_kmem) { + X6TPRINTK1(KERN_ERR + "%s(): failed to allocate xfrm6_tunnel_spi_kmem\n", + __FUNCTION__); return -ENOMEM; + } for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++) INIT_HLIST_HEAD(&xfrm6_tunnel_spi_byaddr[i]); @@ -99,16 +162,22 @@ static void xfrm6_tunnel_spi_fini(void) { int i; + X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); + for (i = 0; i < XFRM6_TUNNEL_SPI_BYADDR_HSIZE; i++) { if (!hlist_empty(&xfrm6_tunnel_spi_byaddr[i])) - return; + goto err; } for (i = 0; i < XFRM6_TUNNEL_SPI_BYSPI_HSIZE; i++) { if (!hlist_empty(&xfrm6_tunnel_spi_byspi[i])) - return; + goto err; } kmem_cache_destroy(xfrm6_tunnel_spi_kmem); xfrm6_tunnel_spi_kmem = NULL; + return; +err: + X6TPRINTK1(KERN_ERR "%s(): table is not empty\n", __FUNCTION__); + return; } static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) @@ -116,13 +185,19 @@ static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) struct xfrm6_tunnel_spi *x6spi; struct hlist_node *pos; + X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr); + hlist_for_each_entry(x6spi, pos, &xfrm6_tunnel_spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], list_byaddr) { - if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) + if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) { + X6SPI_CHECK_MAGIC(x6spi); + X6TPRINTK3(KERN_DEBUG "%s() = %p(%u)\n", __FUNCTION__, x6spi, x6spi->spi); return x6spi; + } } + X6TPRINTK3(KERN_DEBUG "%s() = NULL(0)\n", __FUNCTION__); return NULL; } @@ -131,6 +206,8 @@ u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr) struct xfrm6_tunnel_spi *x6spi; u32 spi; + X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr); + read_lock_bh(&xfrm6_tunnel_spi_lock); x6spi = __xfrm6_tunnel_spi_lookup(saddr); spi = x6spi ? x6spi->spi : 0; @@ -147,6 +224,8 @@ static u32 __xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr) struct hlist_node *pos; unsigned index; + X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr); + if (xfrm6_tunnel_spi < XFRM6_TUNNEL_SPI_MIN || xfrm6_tunnel_spi >= XFRM6_TUNNEL_SPI_MAX) xfrm6_tunnel_spi = XFRM6_TUNNEL_SPI_MIN; @@ -180,10 +259,18 @@ try_next_2:; spi = 0; goto out; alloc_spi: + X6TPRINTK3(KERN_DEBUG "%s(): allocate new spi for " NIP6_FMT "\n", + __FUNCTION__, + NIP6(*(struct in6_addr *)saddr)); x6spi = kmem_cache_alloc(xfrm6_tunnel_spi_kmem, SLAB_ATOMIC); - if (!x6spi) + if (!x6spi) { + X6TPRINTK1(KERN_ERR "%s(): kmem_cache_alloc() failed\n", + __FUNCTION__); goto out; - + } +#ifdef XFRM6_TUNNEL_SPI_MAGIC + x6spi->magic = XFRM6_TUNNEL_SPI_MAGIC; +#endif memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); x6spi->spi = spi; atomic_set(&x6spi->refcnt, 1); @@ -192,7 +279,9 @@ alloc_spi: index = xfrm6_tunnel_spi_hash_byaddr(saddr); hlist_add_head(&x6spi->list_byaddr, &xfrm6_tunnel_spi_byaddr[index]); + X6SPI_CHECK_MAGIC(x6spi); out: + X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, spi); return spi; } @@ -201,6 +290,8 @@ u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr) struct xfrm6_tunnel_spi *x6spi; u32 spi; + X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr); + write_lock_bh(&xfrm6_tunnel_spi_lock); x6spi = __xfrm6_tunnel_spi_lookup(saddr); if (x6spi) { @@ -210,6 +301,8 @@ u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr) spi = __xfrm6_tunnel_alloc_spi(saddr); write_unlock_bh(&xfrm6_tunnel_spi_lock); + X6TPRINTK3(KERN_DEBUG "%s() = %u\n", __FUNCTION__, spi); + return spi; } @@ -220,6 +313,8 @@ void xfrm6_tunnel_free_spi(xfrm_address_t *saddr) struct xfrm6_tunnel_spi *x6spi; struct hlist_node *pos, *n; + X6TPRINTK3(KERN_DEBUG "%s(saddr=%p)\n", __FUNCTION__, saddr); + write_lock_bh(&xfrm6_tunnel_spi_lock); hlist_for_each_entry_safe(x6spi, pos, n, @@ -227,6 +322,12 @@ void xfrm6_tunnel_free_spi(xfrm_address_t *saddr) list_byaddr) { if (memcmp(&x6spi->addr, saddr, sizeof(x6spi->addr)) == 0) { + X6TPRINTK3(KERN_DEBUG "%s(): x6spi object for " NIP6_FMT + " found at %p\n", + __FUNCTION__, + NIP6(*(struct in6_addr *)saddr), + x6spi); + X6SPI_CHECK_MAGIC(x6spi); if (atomic_dec_and_test(&x6spi->refcnt)) { hlist_del(&x6spi->list_byaddr); hlist_del(&x6spi->list_byspi); @@ -277,14 +378,20 @@ static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt, case ICMPV6_ADDR_UNREACH: case ICMPV6_PORT_UNREACH: default: + X6TPRINTK3(KERN_DEBUG + "xfrm6_tunnel: Destination Unreach.\n"); break; } break; case ICMPV6_PKT_TOOBIG: + X6TPRINTK3(KERN_DEBUG + "xfrm6_tunnel: Packet Too Big.\n"); break; case ICMPV6_TIME_EXCEED: switch (code) { case ICMPV6_EXC_HOPLIMIT: + X6TPRINTK3(KERN_DEBUG + "xfrm6_tunnel: Too small Hoplimit.\n"); break; case ICMPV6_EXC_FRAGTIME: default: @@ -341,14 +448,22 @@ static struct xfrm6_tunnel xfrm6_tunnel_handler = { static int __init xfrm6_tunnel_init(void) { - if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) - return -EAGAIN; + X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); + if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) { + X6TPRINTK1(KERN_ERR + "xfrm6_tunnel init: can't add xfrm type\n"); + return -EAGAIN; + } if (xfrm6_tunnel_register(&xfrm6_tunnel_handler)) { + X6TPRINTK1(KERN_ERR + "xfrm6_tunnel init(): can't add handler\n"); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); return -EAGAIN; } if (xfrm6_tunnel_spi_init() < 0) { + X6TPRINTK1(KERN_ERR + "xfrm6_tunnel init: failed to initialize spi\n"); xfrm6_tunnel_deregister(&xfrm6_tunnel_handler); xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); return -EAGAIN; @@ -358,9 +473,15 @@ static int __init xfrm6_tunnel_init(void) static void __exit xfrm6_tunnel_fini(void) { + X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__); + xfrm6_tunnel_spi_fini(); - xfrm6_tunnel_deregister(&xfrm6_tunnel_handler); - xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6); + if (xfrm6_tunnel_deregister(&xfrm6_tunnel_handler)) + X6TPRINTK1(KERN_ERR + "xfrm6_tunnel close: can't remove handler\n"); + if (xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6) < 0) + X6TPRINTK1(KERN_ERR + "xfrm6_tunnel close: can't remove xfrm type\n"); } module_init(xfrm6_tunnel_init); diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index bef3f6156..e6a50e826 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c @@ -28,6 +28,7 @@ * See net/ipx/ChangeLog. */ +#include #include #include #include @@ -1642,17 +1643,14 @@ static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) goto out; - if (!pskb_may_pull(skb, sizeof(struct ipxhdr))) - goto drop; - - ipx_pktsize = ntohs(ipx_hdr(skb)->ipx_pktsize); + ipx = ipx_hdr(skb); + ipx_pktsize = ntohs(ipx->ipx_pktsize); /* Too small or invalid header? */ - if (ipx_pktsize < sizeof(struct ipxhdr) || - !pskb_may_pull(skb, ipx_pktsize)) + if (ipx_pktsize < sizeof(struct ipxhdr) + || !pskb_may_pull(skb, ipx_pktsize)) goto drop; - ipx = ipx_hdr(skb); if (ipx->ipx_checksum != IPX_NO_CHECKSUM && ipx->ipx_checksum != ipx_cksum(ipx, ipx_pktsize)) goto drop; diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c index 4c0c71206..1f73d9ea4 100644 --- a/net/ipx/ipx_proc.c +++ b/net/ipx/ipx_proc.c @@ -4,6 +4,7 @@ * Copyright(C) Arnaldo Carvalho de Melo , 2002 */ +#include #include #ifdef CONFIG_PROC_FS #include diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c index a30dbb1e0..a394c6fe1 100644 --- a/net/ipx/ipx_route.c +++ b/net/ipx/ipx_route.c @@ -7,6 +7,7 @@ * See net/ipx/ChangeLog. */ +#include #include #include #include @@ -237,7 +238,7 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, } /* Apply checksum. Not allowed on 802.3 links. */ - if (sk->sk_no_check || intrfc->if_dlink_type == htons(IPX_FRAME_8023)) + if (sk->sk_no_check || intrfc->if_dlink_type == IPX_FRAME_8023) ipx->ipx_checksum = 0xFFFF; else ipx->ipx_checksum = ipx_cksum(ipx, len + sizeof(struct ipxhdr)); diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c index fa574735c..510eda96d 100644 --- a/net/ipx/sysctl_net_ipx.c +++ b/net/ipx/sysctl_net_ipx.c @@ -6,6 +6,7 @@ * Added /proc/sys/net/ipx/ipx_pprop_broadcasting - acme March 4, 2001 */ +#include #include #include diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 17699eeb6..2f37c9f35 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -42,6 +42,7 @@ * ********************************************************************/ +#include #include #include #include @@ -308,7 +309,7 @@ static void irda_connect_response(struct irda_sock *self) IRDA_ASSERT(self != NULL, return;); - skb = alloc_skb(64, GFP_ATOMIC); + skb = dev_alloc_skb(64); if (skb == NULL) { IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", __FUNCTION__); diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index ad6b6af3d..286881978 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c @@ -29,6 +29,7 @@ * ********************************************************************/ +#include #include #include #include @@ -115,10 +116,12 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) IRDA_ASSERT(ircomm != NULL, return NULL;); - self = kzalloc(sizeof(struct ircomm_cb), GFP_ATOMIC); + self = kmalloc(sizeof(struct ircomm_cb), GFP_ATOMIC); if (self == NULL) return NULL; + memset(self, 0, sizeof(struct ircomm_cb)); + self->notify = *notify; self->magic = IRCOMM_MAGIC; diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c index 959874b64..d9097207a 100644 --- a/net/irda/ircomm/ircomm_lmp.c +++ b/net/irda/ircomm/ircomm_lmp.c @@ -81,7 +81,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, /* Any userdata supplied? */ if (userdata == NULL) { - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; @@ -115,7 +115,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); if (!userdata) { - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c index a39f5735a..6009bab05 100644 --- a/net/irda/ircomm/ircomm_param.c +++ b/net/irda/ircomm/ircomm_param.c @@ -121,7 +121,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) skb = self->ctrl_skb; if (!skb) { - skb = alloc_skb(256, GFP_ATOMIC); + skb = dev_alloc_skb(256); if (!skb) { spin_unlock_irqrestore(&self->spinlock, flags); return -ENOMEM; diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 3bcdb467e..6f20b4206 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -30,6 +30,7 @@ * ********************************************************************/ +#include #include #include #include @@ -123,6 +124,7 @@ static int __init ircomm_tty_init(void) driver->owner = THIS_MODULE; driver->driver_name = "ircomm"; driver->name = "ircomm"; + driver->devfs_name = "ircomm"; driver->major = IRCOMM_TTY_MAJOR; driver->minor_start = IRCOMM_TTY_MINOR; driver->type = TTY_DRIVER_TYPE_SERIAL; @@ -379,11 +381,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) self = hashbin_lock_find(ircomm_tty, line, NULL); if (!self) { /* No, so make new instance */ - self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); + self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); if (self == NULL) { IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); return -ENOMEM; } + memset(self, 0, sizeof(struct ircomm_tty_cb)); self->magic = IRCOMM_TTY_MAGIC; self->flow = FLOW_STOP; @@ -758,9 +761,8 @@ static int ircomm_tty_write(struct tty_struct *tty, } } else { /* Prepare a full sized frame */ - skb = alloc_skb(self->max_data_size+ - self->max_header_size, - GFP_ATOMIC); + skb = dev_alloc_skb(self->max_data_size+ + self->max_header_size); if (!skb) { spin_unlock_irqrestore(&self->spinlock, flags); return -ENOBUFS; diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index 7e7a31798..e3debbdb6 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c @@ -29,6 +29,7 @@ * ********************************************************************/ +#include #include #include #include @@ -401,10 +402,12 @@ dongle_t *irda_device_dongle_init(struct net_device *dev, int type) } /* Allocate dongle info for this instance */ - dongle = kzalloc(sizeof(dongle_t), GFP_KERNEL); + dongle = kmalloc(sizeof(dongle_t), GFP_KERNEL); if (!dongle) goto out; + memset(dongle, 0, sizeof(dongle_t)); + /* Bind the registration info to this particular instance */ dongle->issue = reg; dongle->dev = dev; diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 61128aa05..2d2e2b191 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c @@ -24,6 +24,7 @@ * ********************************************************************/ +#include #include #include #include @@ -345,7 +346,7 @@ static void iriap_disconnect_request(struct iriap_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;); - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (tx_skb == NULL) { IRDA_DEBUG(0, "%s(), Could not allocate an sk_buff of length %d\n", __FUNCTION__, 64); @@ -396,7 +397,7 @@ int iriap_getvaluebyclass_request(struct iriap_cb *self, attr_len = strlen(attr); /* Up to IAS_MAX_ATTRIBNAME = 60 */ skb_len = self->max_header_size+2+name_len+1+attr_len+4; - tx_skb = alloc_skb(skb_len, GFP_ATOMIC); + tx_skb = dev_alloc_skb(skb_len); if (!tx_skb) return -ENOMEM; @@ -562,8 +563,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self, * value. We add 32 bytes because of the 6 bytes for the frame and * max 5 bytes for the value coding. */ - tx_skb = alloc_skb(value->len + self->max_header_size + 32, - GFP_ATOMIC); + tx_skb = dev_alloc_skb(value->len + self->max_header_size + 32); if (!tx_skb) return; @@ -701,7 +701,7 @@ void iriap_send_ack(struct iriap_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IAS_MAGIC, return;); - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return; diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c index da17395df..a73607450 100644 --- a/net/irda/iriap_event.c +++ b/net/irda/iriap_event.c @@ -365,7 +365,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, switch (event) { case IAP_LM_CONNECT_INDICATION: - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (tx_skb == NULL) { IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); return; diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c index a154b1d71..82e665c79 100644 --- a/net/irda/irias_object.c +++ b/net/irda/irias_object.c @@ -82,12 +82,13 @@ struct ias_object *irias_new_object( char *name, int id) IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); - obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); + obj = kmalloc(sizeof(struct ias_object), GFP_ATOMIC); if (obj == NULL) { IRDA_WARNING("%s(), Unable to allocate object!\n", __FUNCTION__); return NULL; } + memset(obj, 0, sizeof( struct ias_object)); obj->magic = IAS_OBJECT_MAGIC; obj->name = strndup(name, IAS_MAX_CLASSNAME); @@ -345,12 +346,13 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value, IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;); IRDA_ASSERT(name != NULL, return;); - attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); + attrib = kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { IRDA_WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); return; } + memset(attrib, 0, sizeof( struct ias_attrib)); attrib->magic = IAS_ATTRIB_MAGIC; attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); @@ -380,12 +382,13 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets, IRDA_ASSERT(name != NULL, return;); IRDA_ASSERT(octets != NULL, return;); - attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); + attrib = kmalloc(sizeof(struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { IRDA_WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); return; } + memset(attrib, 0, sizeof( struct ias_attrib)); attrib->magic = IAS_ATTRIB_MAGIC; attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); @@ -413,12 +416,13 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value, IRDA_ASSERT(name != NULL, return;); IRDA_ASSERT(value != NULL, return;); - attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC); + attrib = kmalloc(sizeof( struct ias_attrib), GFP_ATOMIC); if (attrib == NULL) { IRDA_WARNING("%s: Unable to allocate attribute!\n", __FUNCTION__); return; } + memset(attrib, 0, sizeof( struct ias_attrib)); attrib->magic = IAS_ATTRIB_MAGIC; attrib->name = strndup(name, IAS_MAX_ATTRIBNAME); @@ -439,11 +443,12 @@ struct ias_value *irias_new_integer_value(int integer) { struct ias_value *value; - value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); + value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } + memset(value, 0, sizeof(struct ias_value)); value->type = IAS_INTEGER; value->len = 4; @@ -464,11 +469,12 @@ struct ias_value *irias_new_string_value(char *string) { struct ias_value *value; - value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); + value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } + memset( value, 0, sizeof( struct ias_value)); value->type = IAS_STRING; value->charset = CS_ASCII; @@ -489,11 +495,12 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len) { struct ias_value *value; - value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); + value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } + memset(value, 0, sizeof(struct ias_value)); value->type = IAS_OCT_SEQ; /* Check length */ @@ -515,11 +522,12 @@ struct ias_value *irias_new_missing_value(void) { struct ias_value *value; - value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); + value = kmalloc(sizeof(struct ias_value), GFP_ATOMIC); if (value == NULL) { IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); return NULL; } + memset(value, 0, sizeof(struct ias_value)); value->type = IAS_MISSING; value->len = 0; diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c index 95cf1234e..f8e6cb0db 100644 --- a/net/irda/irlan/irlan_client.c +++ b/net/irda/irlan/irlan_client.c @@ -173,14 +173,13 @@ void irlan_client_discovery_indication(discinfo_t *discovery, rcu_read_lock(); self = irlan_get_any(); if (self) { - IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); + IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , daddr); irlan_client_wakeup(self, saddr, daddr); } -IRDA_ASSERT_LABEL(out:) rcu_read_unlock(); } diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 7dd0a2fe1..657d12210 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -23,6 +23,7 @@ * ********************************************************************/ +#include #include #include @@ -636,7 +637,7 @@ void irlan_get_provider_info(struct irlan_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(64, GFP_ATOMIC); + skb = dev_alloc_skb(64); if (!skb) return; @@ -668,7 +669,7 @@ void irlan_open_data_channel(struct irlan_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(64, GFP_ATOMIC); + skb = dev_alloc_skb(64); if (!skb) return; @@ -704,7 +705,7 @@ void irlan_close_data_channel(struct irlan_cb *self) if (self->client.tsap_ctrl == NULL) return; - skb = alloc_skb(64, GFP_ATOMIC); + skb = dev_alloc_skb(64); if (!skb) return; @@ -739,7 +740,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(128, GFP_ATOMIC); + skb = dev_alloc_skb(128); if (!skb) return; @@ -777,7 +778,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(128, GFP_ATOMIC); + skb = dev_alloc_skb(128); if (!skb) return; @@ -816,7 +817,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(128, GFP_ATOMIC); + skb = dev_alloc_skb(128); if (!skb) return; @@ -856,7 +857,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(128, GFP_ATOMIC); + skb = dev_alloc_skb(128); if (!skb) return; @@ -891,7 +892,7 @@ void irlan_get_media_char(struct irlan_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(64, GFP_ATOMIC); + skb = dev_alloc_skb(64); if (!skb) return; diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index b0ccc455b..953e255d2 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c @@ -25,6 +25,7 @@ * ********************************************************************/ +#include #include #include #include diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c index 9c0df8604..39c202d1c 100644 --- a/net/irda/irlan/irlan_provider.c +++ b/net/irda/irlan/irlan_provider.c @@ -296,7 +296,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); - skb = alloc_skb(128, GFP_ATOMIC); + skb = dev_alloc_skb(128); if (!skb) return; diff --git a/net/irda/irlap.c b/net/irda/irlap.c index e7852a074..a16528657 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c @@ -29,6 +29,7 @@ * ********************************************************************/ +#include #include #include #include @@ -116,10 +117,11 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, IRDA_DEBUG(4, "%s()\n", __FUNCTION__); /* Initialize the irlap structure. */ - self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); + self = kmalloc(sizeof(struct irlap_cb), GFP_KERNEL); if (self == NULL) return NULL; + memset(self, 0, sizeof(struct irlap_cb)); self->magic = LAP_MAGIC; /* Make a binding between the layers */ @@ -881,7 +883,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) /* Change speed now, or just piggyback speed on frames */ if (now) { /* Send down empty frame to trigger speed change */ - skb = alloc_skb(0, GFP_ATOMIC); + skb = dev_alloc_skb(0); if (skb) irlap_queue_xmit(self, skb); } @@ -1221,7 +1223,7 @@ static int irlap_seq_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; - struct irlap_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); + struct irlap_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -1237,6 +1239,7 @@ static int irlap_seq_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 99faff68c..a505b5457 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c @@ -25,6 +25,7 @@ * ********************************************************************/ +#include #include #include #include diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index ccb983bf0..3e9a06abb 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c @@ -117,7 +117,7 @@ void irlap_send_snrm_frame(struct irlap_cb *self, struct qos_info *qos) IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Allocate frame */ - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return; @@ -210,7 +210,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos) IRDA_ASSERT(self->magic == LAP_MAGIC, return;); /* Allocate frame */ - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return; @@ -250,7 +250,7 @@ void irlap_send_dm_frame( struct irlap_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;); - tx_skb = alloc_skb(32, GFP_ATOMIC); + tx_skb = dev_alloc_skb(32); if (!tx_skb) return; @@ -282,7 +282,7 @@ void irlap_send_disc_frame(struct irlap_cb *self) IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self->magic == LAP_MAGIC, return;); - tx_skb = alloc_skb(16, GFP_ATOMIC); + tx_skb = dev_alloc_skb(16); if (!tx_skb) return; @@ -315,7 +315,7 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s, IRDA_ASSERT(self->magic == LAP_MAGIC, return;); IRDA_ASSERT(discovery != NULL, return;); - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return; @@ -422,10 +422,11 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, return; } - if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { + if ((discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__); return; } + memset(discovery, 0, sizeof(discovery_t)); discovery->data.daddr = info->daddr; discovery->data.saddr = self->saddr; @@ -575,7 +576,7 @@ void irlap_send_rr_frame(struct irlap_cb *self, int command) struct sk_buff *tx_skb; __u8 *frame; - tx_skb = alloc_skb(16, GFP_ATOMIC); + tx_skb = dev_alloc_skb(16); if (!tx_skb) return; @@ -600,7 +601,7 @@ void irlap_send_rd_frame(struct irlap_cb *self) struct sk_buff *tx_skb; __u8 *frame; - tx_skb = alloc_skb(16, GFP_ATOMIC); + tx_skb = dev_alloc_skb(16); if (!tx_skb) return; @@ -1214,7 +1215,7 @@ void irlap_send_test_frame(struct irlap_cb *self, __u8 caddr, __u32 daddr, struct test_frame *frame; __u8 *info; - tx_skb = alloc_skb(cmd->len+sizeof(struct test_frame), GFP_ATOMIC); + tx_skb = dev_alloc_skb(cmd->len+sizeof(struct test_frame)); if (!tx_skb) return; diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index c440913de..c19e9ce05 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c @@ -24,6 +24,7 @@ * ********************************************************************/ +#include #include #include #include @@ -43,8 +44,6 @@ #include #include -#include - static __u8 irlmp_find_free_slsap(void); static int irlmp_slsap_inuse(__u8 slsap_sel); @@ -78,9 +77,10 @@ int __init irlmp_init(void) { IRDA_DEBUG(1, "%s()\n", __FUNCTION__); /* Initialize the irlmp structure. */ - irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); + irlmp = kmalloc( sizeof(struct irlmp_cb), GFP_KERNEL); if (irlmp == NULL) return -ENOMEM; + memset(irlmp, 0, sizeof(struct irlmp_cb)); irlmp->magic = LMP_MAGIC; @@ -159,11 +159,12 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid) return NULL; /* Allocate new instance of a LSAP connection */ - self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC); + self = kmalloc(sizeof(struct lsap_cb), GFP_ATOMIC); if (self == NULL) { IRDA_ERROR("%s: can't allocate memory\n", __FUNCTION__); return NULL; } + memset(self, 0, sizeof(struct lsap_cb)); self->magic = LMP_LSAP_MAGIC; self->slsap_sel = slsap_sel; @@ -286,11 +287,12 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify) /* * Allocate new instance of a LSAP connection */ - lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL); + lap = kmalloc(sizeof(struct lap_cb), GFP_KERNEL); if (lap == NULL) { IRDA_ERROR("%s: unable to kmalloc\n", __FUNCTION__); return; } + memset(lap, 0, sizeof(struct lap_cb)); lap->irlap = irlap; lap->magic = LMP_LAP_MAGIC; @@ -392,7 +394,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, /* Any userdata? */ if (tx_skb == NULL) { - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; @@ -838,7 +840,6 @@ void irlmp_do_expiry(void) void irlmp_do_discovery(int nslots) { struct lap_cb *lap; - __u16 *data_hintsp; /* Make sure the value is sane */ if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){ @@ -848,8 +849,7 @@ void irlmp_do_discovery(int nslots) } /* Construct new discovery info to be used by IrLAP, */ - data_hintsp = (__u16 *) irlmp->discovery_cmd.data.hints; - put_unaligned(irlmp->hints.word, data_hintsp); + u16ho(irlmp->discovery_cmd.data.hints) = irlmp->hints.word; /* * Set character set for device name (we use ASCII), and diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c index 4c90dd1b4..26649f652 100644 --- a/net/irda/irlmp_event.c +++ b/net/irda/irlmp_event.c @@ -24,6 +24,7 @@ * ********************************************************************/ +#include #include #include diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c index 39761a1d1..91cd26817 100644 --- a/net/irda/irlmp_frame.c +++ b/net/irda/irlmp_frame.c @@ -24,6 +24,7 @@ * ********************************************************************/ +#include #include #include diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 2869b16e4..634901dd1 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c @@ -31,6 +31,7 @@ * Jean II */ +#include #include #include diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h index 80887528e..e4fe1e800 100644 --- a/net/irda/irnet/irnet.h +++ b/net/irda/irnet/irnet.h @@ -244,10 +244,12 @@ #include #include #include +#include #include #include #include #include +#include #include /* isspace() */ #include #include diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index a1e502ff9..e53bf9e00 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c @@ -476,10 +476,11 @@ dev_irnet_open(struct inode * inode, #endif /* SECURE_DEVIRNET */ /* Allocate a private structure for this IrNET instance */ - ap = kzalloc(sizeof(*ap), GFP_KERNEL); + ap = kmalloc(sizeof(*ap), GFP_KERNEL); DABORT(ap == NULL, -ENOMEM, FS_ERROR, "Can't allocate struct irnet...\n"); /* initialize the irnet structure */ + memset(ap, 0, sizeof(*ap)); ap->file = file; /* PPP channel setup */ diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c index 86805c3d8..1b1c41933 100644 --- a/net/irda/irsysctl.c +++ b/net/irda/irsysctl.c @@ -23,6 +23,7 @@ * ********************************************************************/ +#include #include #include #include diff --git a/net/irda/irttp.c b/net/irda/irttp.c index be0d8fa85..8aff254cb 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -24,6 +24,7 @@ * ********************************************************************/ +#include #include #include #include @@ -85,9 +86,10 @@ static pi_param_info_t param_info = { pi_major_call_table, 1, 0x0f, 4 }; */ int __init irttp_init(void) { - irttp = kzalloc(sizeof(struct irttp_cb), GFP_KERNEL); + irttp = kmalloc(sizeof(struct irttp_cb), GFP_KERNEL); if (irttp == NULL) return -ENOMEM; + memset(irttp, 0, sizeof(struct irttp_cb)); irttp->magic = TTP_MAGIC; @@ -305,8 +307,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, IRDA_DEBUG(2, "%s(), fragmenting ...\n", __FUNCTION__); /* Make new segment */ - frag = alloc_skb(self->max_seg_size+self->max_header_size, - GFP_ATOMIC); + frag = dev_alloc_skb(self->max_seg_size+self->max_header_size); if (!frag) return; @@ -389,11 +390,12 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) return NULL; } - self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC); + self = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC); if (self == NULL) { IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __FUNCTION__); return NULL; } + memset(self, 0, sizeof(struct tsap_cb)); spin_lock_init(&self->lock); /* Initialise todo timer */ @@ -804,7 +806,7 @@ static inline void irttp_give_credit(struct tsap_cb *self) self->send_credit, self->avail_credit, self->remote_credit); /* Give credit to peer */ - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return; @@ -1093,12 +1095,12 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel, /* Any userdata supplied? */ if (userdata == NULL) { - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; /* Reserve space for MUX_CONTROL and LAP header */ - skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER); + skb_reserve(tx_skb, TTP_MAX_HEADER); } else { tx_skb = userdata; /* @@ -1341,12 +1343,12 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size, /* Any userdata supplied? */ if (userdata == NULL) { - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; /* Reserve space for MUX_CONTROL and LAP header */ - skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER); + skb_reserve(tx_skb, TTP_MAX_HEADER); } else { tx_skb = userdata; /* @@ -1540,7 +1542,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, if (!userdata) { struct sk_buff *tx_skb; - tx_skb = alloc_skb(64, GFP_ATOMIC); + tx_skb = dev_alloc_skb(64); if (!tx_skb) return -ENOMEM; @@ -1875,7 +1877,7 @@ static int irttp_seq_open(struct inode *inode, struct file *file) int rc = -ENOMEM; struct irttp_iter_state *s; - s = kzalloc(sizeof(*s), GFP_KERNEL); + s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; @@ -1885,6 +1887,7 @@ static int irttp_seq_open(struct inode *inode, struct file *file) seq = file->private_data; seq->private = s; + memset(s, 0, sizeof(*s)); out: return rc; out_kfree: diff --git a/net/irda/qos.c b/net/irda/qos.c index 95a69c013..ddfb5c502 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c @@ -30,6 +30,7 @@ * ********************************************************************/ +#include #include #include diff --git a/net/irda/timer.c b/net/irda/timer.c index 3871a2b91..0e17f976a 100644 --- a/net/irda/timer.c +++ b/net/irda/timer.c @@ -25,6 +25,7 @@ ********************************************************************/ #include +#include #include #include diff --git a/net/key/af_key.c b/net/key/af_key.c index 3a95b2ee4..859582275 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -14,6 +14,7 @@ * Derek Atkins */ +#include #include #include #include @@ -1453,23 +1454,21 @@ static int pfkey_delete(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h if (x == NULL) return -ESRCH; - if ((err = security_xfrm_state_delete(x))) - goto out; - if (xfrm_state_kern(x)) { - err = -EPERM; - goto out; + xfrm_state_put(x); + return -EPERM; } err = xfrm_state_delete(x); - if (err < 0) - goto out; + if (err < 0) { + xfrm_state_put(x); + return err; + } c.seq = hdr->sadb_msg_seq; c.pid = hdr->sadb_msg_pid; c.event = XFRM_MSG_DELSA; km_state_notify(x, &c); -out: xfrm_state_put(x); return err; @@ -2275,14 +2274,11 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, struct sadb_msg err = 0; - if ((err = security_xfrm_policy_delete(xp))) - goto out; c.seq = hdr->sadb_msg_seq; c.pid = hdr->sadb_msg_pid; c.event = XFRM_MSG_DELPOLICY; km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c); -out: xfrm_pol_put(xp); return err; } diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 7e6bc41ee..aea6616ce 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c @@ -115,12 +115,14 @@ static struct lapb_cb *lapb_devtostruct(struct net_device *dev) */ static struct lapb_cb *lapb_create_cb(void) { - struct lapb_cb *lapb = kzalloc(sizeof(*lapb), GFP_ATOMIC); + struct lapb_cb *lapb = kmalloc(sizeof(*lapb), GFP_ATOMIC); if (!lapb) goto out; + memset(lapb, 0x00, sizeof(*lapb)); + skb_queue_head_init(&lapb->write_queue); skb_queue_head_init(&lapb->ack_queue); @@ -238,13 +240,11 @@ int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms) goto out_put; if (lapb->state == LAPB_STATE_0) { - if (parms->mode & LAPB_EXTENDED) { - if (parms->window < 1 || parms->window > 127) - goto out_put; - } else { - if (parms->window < 1 || parms->window > 7) - goto out_put; - } + if (((parms->mode & LAPB_EXTENDED) && + (parms->window < 1 || parms->window > 127)) || + (parms->window < 1 || parms->window > 7)) + goto out_put; + lapb->mode = parms->mode; lapb->window = parms->window; } diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 2652ead96..5a04db745 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -20,6 +20,7 @@ * * See the GNU General Public License for more details. */ +#include #include #include #include @@ -673,7 +674,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, lock_sock(sk); copied = -ENOTCONN; - if (unlikely(sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN)) + if (sk->sk_state == TCP_LISTEN) goto out; timeo = sock_rcvtimeo(sk, nonblock); @@ -732,7 +733,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, if (sk->sk_shutdown & RCV_SHUTDOWN) break; - if (sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_CLOSE) { + if (sk->sk_state == TCP_CLOSE) { if (!sock_flag(sk, SOCK_DONE)) { /* * This occurs when user tries to read @@ -784,20 +785,24 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, copied += used; len -= used; + if (used + offset < skb->len) + continue; + if (!(flags & MSG_PEEK)) { - sk_eat_skb(sk, skb, 0); + sk_eat_skb(sk, skb); *seq = 0; } - - /* For non stream protcols we get one packet per recvmsg call */ - if (sk->sk_type != SOCK_STREAM) - goto copy_uaddr; - - /* Partial read */ - if (used + offset < skb->len) - continue; } while (len > 0); + /* + * According to UNIX98, msg_name/msg_namelen are ignored + * on connected socket. -ANK + * But... af_llc still doesn't have separate sets of methods for + * SOCK_DGRAM and SOCK_STREAM :-( So we have to do this test, will + * eventually fix this tho :-) -acme + */ + if (sk->sk_type == SOCK_DGRAM) + goto copy_uaddr; out: release_sock(sk); return copied; diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index d12413cff..bd242a495 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c @@ -33,9 +33,10 @@ unsigned char llc_station_mac_sa[ETH_ALEN]; */ static struct llc_sap *llc_sap_alloc(void) { - struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC); + struct llc_sap *sap = kmalloc(sizeof(*sap), GFP_ATOMIC); if (sap) { + memset(sap, 0, sizeof(*sap)); sap->state = LLC_SAP_STATE_ACTIVE; memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN); rwlock_init(&sap->sk_list.lock); diff --git a/net/llc/llc_if.c b/net/llc/llc_if.c index a89917130..ba90f7f08 100644 --- a/net/llc/llc_if.c +++ b/net/llc/llc_if.c @@ -11,6 +11,7 @@ * * See the GNU General Public License for more details. */ +#include #include #include #include @@ -25,6 +26,8 @@ #include #include +u8 llc_mac_null_var[IFHWADDRLEN]; + /** * llc_build_and_send_pkt - Connection data sending for upper layers. * @sk: connection diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 94d2368ad..d62e0f9b9 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c @@ -142,8 +142,6 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, struct llc_sap *sap; struct llc_pdu_sn *pdu; int dest; - int (*rcv)(struct sk_buff *, struct net_device *, - struct packet_type *, struct net_device *); /* * When the interface is in promisc. mode, drop all the crap that it @@ -171,11 +169,9 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev, * First the upper layer protocols that don't need the full * LLC functionality */ - rcv = rcu_dereference(sap->rcv_func); - if (rcv) { - struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC); - if (cskb) - rcv(cskb, dev, pt, orig_dev); + if (sap->rcv_func) { + sap->rcv_func(skb, dev, pt, orig_dev); + goto out_put; } dest = llc_pdu_type(skb); if (unlikely(!dest || !llc_type_handlers[dest - 1])) diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c index 19308fece..bd531cb23 100644 --- a/net/llc/llc_proc.c +++ b/net/llc/llc_proc.c @@ -12,6 +12,7 @@ * See the GNU General Public License for more details. */ +#include #include #include #include diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index 61cb8cf7d..4029ceee9 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c @@ -51,10 +51,10 @@ void llc_save_primitive(struct sock *sk, struct sk_buff* skb, u8 prim) { struct sockaddr_llc *addr; + if (skb->sk->sk_type == SOCK_STREAM) /* See UNIX98 */ + return; /* save primitive for use by the user. */ addr = llc_ui_skb_cb(skb); - - memset(addr, 0, sizeof(*addr)); addr->sllc_family = sk->sk_family; addr->sllc_arphrd = skb->dev->type; addr->sllc_test = prim == LLC_TEST_PRIM; @@ -282,7 +282,7 @@ static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) * mac, and local sap. Returns pointer for socket found, %NULL otherwise. */ static struct sock *llc_lookup_dgram(struct llc_sap *sap, - const struct llc_addr *laddr) + struct llc_addr *laddr) { struct sock *rc; struct hlist_node *node; @@ -304,65 +304,19 @@ found: return rc; } -/** - * llc_sap_mcast - Deliver multicast PDU's to all matching datagram sockets. - * @sap: SAP - * @laddr: address of local LLC (MAC + SAP) - * - * Search socket list of the SAP and finds connections with same sap. - * Deliver clone to each. - */ -static void llc_sap_mcast(struct llc_sap *sap, - const struct llc_addr *laddr, - struct sk_buff *skb) -{ - struct sock *sk; - struct hlist_node *node; - - read_lock_bh(&sap->sk_list.lock); - sk_for_each(sk, node, &sap->sk_list.list) { - struct llc_sock *llc = llc_sk(sk); - struct sk_buff *skb1; - - if (sk->sk_type != SOCK_DGRAM) - continue; - - if (llc->laddr.lsap != laddr->lsap) - continue; - - if (llc->dev != skb->dev) - continue; - - skb1 = skb_clone(skb, GFP_ATOMIC); - if (!skb1) - break; - - sock_hold(sk); - skb_set_owner_r(skb1, sk); - llc_sap_rcv(sap, skb1); - sock_put(sk); - } - read_unlock_bh(&sap->sk_list.lock); -} - - void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb) { struct llc_addr laddr; + struct sock *sk; llc_pdu_decode_da(skb, laddr.mac); llc_pdu_decode_dsap(skb, &laddr.lsap); - if (llc_mac_multicast(laddr.mac)) { - llc_sap_mcast(sap, &laddr, skb); + sk = llc_lookup_dgram(sap, &laddr); + if (sk) { + skb_set_owner_r(skb, sk); + llc_sap_rcv(sap, skb); + sock_put(sk); + } else kfree_skb(skb); - } else { - struct sock *sk = llc_lookup_dgram(sap, &laddr); - if (sk) { - skb_set_owner_r(skb, sk); - llc_sap_rcv(sap, skb); - sock_put(sk); - } else - kfree_skb(skb); - } } diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index 8275bd33b..f37dbf8ef 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c @@ -11,6 +11,7 @@ * * See the GNU General Public License for more details. */ +#include #include #include #include diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c index 45d7dd92a..d1eaddb13 100644 --- a/net/llc/sysctl_net_llc.c +++ b/net/llc/sysctl_net_llc.c @@ -4,6 +4,7 @@ * Arnaldo Carvalho de Melo */ +#include #include #include #include diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index e1c27b7c4..e2893effd 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -60,18 +60,6 @@ config NF_CONNTRACK_MARK of packets, but this mark value is kept in the conntrack session instead of the individual packets. -config NF_CONNTRACK_SECMARK - bool 'Connection tracking security mark support' - depends on NF_CONNTRACK && NETWORK_SECMARK - help - This option enables security markings to be applied to - connections. Typically they are copied to connections from - packets using the CONNSECMARK target and copied back from - connections to packets with the same target, with the packets - being originally labeled via SECMARK. - - If unsure, say 'N'. - config NF_CONNTRACK_EVENTS bool "Connection tracking events (EXPERIMENTAL)" depends on EXPERIMENTAL && NF_CONNTRACK @@ -186,28 +174,6 @@ config NETFILTER_XT_TARGET_NOTRACK If you want to compile it as a module, say M here and read . If unsure, say `N'. -config NETFILTER_XT_TARGET_SECMARK - tristate '"SECMARK" target support' - depends on NETFILTER_XTABLES && NETWORK_SECMARK - help - The SECMARK target allows security marking of network - packets, for use with security subsystems. - - To compile it as a module, choose M here. If unsure, say N. - -config NETFILTER_XT_TARGET_CONNSECMARK - tristate '"CONNSECMARK" target support' - depends on NETFILTER_XTABLES && \ - ((NF_CONNTRACK && NF_CONNTRACK_SECMARK) || \ - (IP_NF_CONNTRACK && IP_NF_CONNTRACK_SECMARK)) - help - The CONNSECMARK target copies security markings from packets - to connections, and restores security markings from connections - to packets (if the packets are not already marked). This would - normally be used in conjunction with the SECMARK target. - - To compile it as a module, choose M here. If unsure, say N. - config NETFILTER_XT_MATCH_COMMENT tristate '"comment" match support' depends on NETFILTER_XTABLES @@ -344,7 +310,7 @@ config NETFILTER_XT_MATCH_MULTIPORT config NETFILTER_XT_MATCH_PHYSDEV tristate '"physdev" match support' - depends on NETFILTER_XTABLES && BRIDGE && BRIDGE_NETFILTER + depends on NETFILTER_XTABLES && BRIDGE_NETFILTER help Physdev packet matching matches against the physical bridge ports the IP packet arrived on or will leave by. @@ -363,16 +329,6 @@ config NETFILTER_XT_MATCH_PKTTYPE To compile it as a module, choose M here. If unsure, say N. -config NETFILTER_XT_MATCH_QUOTA - tristate '"quota" match support' - depends on NETFILTER_XTABLES - help - This option adds a `quota' match, which allows to match on a - byte counter. - - If you want to compile it as a module, say M here and read - . If unsure, say `N'. - config NETFILTER_XT_MATCH_REALM tristate '"realm" match support' depends on NETFILTER_XTABLES @@ -388,8 +344,8 @@ config NETFILTER_XT_MATCH_REALM . If unsure, say `N'. config NETFILTER_XT_MATCH_SCTP - tristate '"sctp" protocol match support (EXPERIMENTAL)' - depends on NETFILTER_XTABLES && EXPERIMENTAL + tristate '"sctp" protocol match support' + depends on NETFILTER_XTABLES help With this option enabled, you will be able to use the `sctp' match in order to match on SCTP source/destination ports @@ -409,15 +365,6 @@ config NETFILTER_XT_MATCH_STATE To compile it as a module, choose M here. If unsure, say N. -config NETFILTER_XT_MATCH_STATISTIC - tristate '"statistic" match support' - depends on NETFILTER_XTABLES - help - This option adds a `statistic' match, which allows you to match - on packets periodically or randomly with a given percentage. - - To compile it as a module, choose M here. If unsure, say N. - config NETFILTER_XT_MATCH_STRING tristate '"string" match support' depends on NETFILTER_XTABLES diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile index 6fa4b7580..95b7e4165 100644 --- a/net/netfilter/Makefile +++ b/net/netfilter/Makefile @@ -28,8 +28,6 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o obj-$(CONFIG_NETFILTER_XT_TARGET_NOTRACK) += xt_NOTRACK.o -obj-$(CONFIG_NETFILTER_XT_TARGET_SECMARK) += xt_SECMARK.o -obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o # matches obj-$(CONFIG_NETFILTER_XT_MATCH_COMMENT) += xt_comment.o @@ -46,11 +44,9 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_MARK) += xt_mark.o obj-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += xt_multiport.o obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o -obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o -obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 5d29d5e23..8455a32ea 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c @@ -10,6 +10,7 @@ * 15-Mar-2000: Added NF_REPEAT --RR. * 08-May-2003: Internal logging interface added by Jozsef Kadlecsik. */ +#include #include #include #include diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 8f2261965..f9b83f913 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -29,6 +29,7 @@ * Derived from net/ipv4/netfilter/ip_conntrack_core.c */ +#include #include #include #include @@ -988,9 +989,6 @@ init_conntrack(const struct nf_conntrack_tuple *tuple, conntrack->master = exp->master; #ifdef CONFIG_NF_CONNTRACK_MARK conntrack->mark = exp->master->mark; -#endif -#ifdef CONFIG_NF_CONNTRACK_SECMARK - conntrack->secmark = exp->master->secmark; #endif nf_conntrack_get(&conntrack->master->ct_general); NF_CT_STAT_INC(expect_new); @@ -1398,12 +1396,6 @@ void __nf_ct_refresh_acct(struct nf_conn *ct, write_lock_bh(&nf_conntrack_lock); - /* Only update if this is not a fixed timeout */ - if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { - write_unlock_bh(&nf_conntrack_lock); - return; - } - /* If not in hash table, timer will not be active yet */ if (!nf_ct_is_confirmed(ct)) { ct->timeout.expires = extra_jiffies; diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index 960972d22..e38a4b5a3 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c @@ -15,6 +15,7 @@ * Derived from net/ipv4/netfilter/ip_conntrack_ftp.c */ +#include #include #include #include @@ -66,48 +67,37 @@ static int try_epsv_response(const char *, size_t, struct nf_conntrack_man *, char); static struct ftp_search { + enum ip_conntrack_dir dir; const char *pattern; size_t plen; char skip; char term; enum ip_ct_ftp_type ftptype; int (*getnum)(const char *, size_t, struct nf_conntrack_man *, char); -} search[IP_CT_DIR_MAX][2] = { - [IP_CT_DIR_ORIGINAL] = { - { - .pattern = "PORT", - .plen = sizeof("PORT") - 1, - .skip = ' ', - .term = '\r', - .ftptype = IP_CT_FTP_PORT, - .getnum = try_rfc959, - }, - { - .pattern = "EPRT", - .plen = sizeof("EPRT") - 1, - .skip = ' ', - .term = '\r', - .ftptype = IP_CT_FTP_EPRT, - .getnum = try_eprt, - }, +} search[] = { + { + IP_CT_DIR_ORIGINAL, + "PORT", sizeof("PORT") - 1, ' ', '\r', + IP_CT_FTP_PORT, + try_rfc959, }, - [IP_CT_DIR_REPLY] = { - { - .pattern = "227 ", - .plen = sizeof("227 ") - 1, - .skip = '(', - .term = ')', - .ftptype = IP_CT_FTP_PASV, - .getnum = try_rfc959, - }, - { - .pattern = "229 ", - .plen = sizeof("229 ") - 1, - .skip = '(', - .term = ')', - .ftptype = IP_CT_FTP_EPSV, - .getnum = try_epsv_response, - }, + { + IP_CT_DIR_REPLY, + "227 ", sizeof("227 ") - 1, '(', ')', + IP_CT_FTP_PASV, + try_rfc959, + }, + { + IP_CT_DIR_ORIGINAL, + "EPRT", sizeof("EPRT") - 1, ' ', '\r', + IP_CT_FTP_EPRT, + try_eprt, + }, + { + IP_CT_DIR_REPLY, + "229 ", sizeof("229 ") - 1, '(', ')', + IP_CT_FTP_EPSV, + try_epsv_response, }, }; @@ -502,15 +492,17 @@ static int help(struct sk_buff **pskb, memcpy(cmd.u3.all, &ct->tuplehash[dir].tuple.src.u3.all, sizeof(cmd.u3.all)); - for (i = 0; i < ARRAY_SIZE(search[dir]); i++) { + for (i = 0; i < ARRAY_SIZE(search); i++) { + if (search[i].dir != dir) continue; + found = find_pattern(fb_ptr, datalen, - search[dir][i].pattern, - search[dir][i].plen, - search[dir][i].skip, - search[dir][i].term, + search[i].pattern, + search[i].plen, + search[i].skip, + search[i].term, &matchoff, &matchlen, &cmd, - search[dir][i].getnum); + search[i].getnum); if (found) break; } if (found == -1) { @@ -520,7 +512,7 @@ static int help(struct sk_buff **pskb, this case. */ if (net_ratelimit()) printk("conntrack_ftp: partial %s %u+%u\n", - search[dir][i].pattern, + search[i].pattern, ntohl(th->seq), datalen); ret = NF_DROP; goto out; @@ -605,7 +597,7 @@ static int help(struct sk_buff **pskb, /* Now, NAT might want to mangle the packet, and register the * (possibly changed) expectation itself. */ if (nf_nat_ftp_hook) - ret = nf_nat_ftp_hook(pskb, ctinfo, search[dir][i].ftptype, + ret = nf_nat_ftp_hook(pskb, ctinfo, search[i].ftptype, matchoff, matchlen, exp, &seq); else { /* Can't expect this? Best to drop packet now. */ diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c index 21e0bc91c..3fc58e454 100644 --- a/net/netfilter/nf_conntrack_l3proto_generic.c +++ b/net/netfilter/nf_conntrack_l3proto_generic.c @@ -15,6 +15,7 @@ * Yasuyuki Kozakai @USAGI */ +#include #include #include #include diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 6527d4e04..bd10eb944 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -408,8 +407,6 @@ nfattr_failure: static int ctnetlink_done(struct netlink_callback *cb) { - if (cb->args[1]) - nf_ct_put((struct nf_conn *)cb->args[1]); DEBUGP("entered %s\n", __FUNCTION__); return 0; } @@ -419,9 +416,10 @@ static int ctnetlink_done(struct netlink_callback *cb) static int ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb) { - struct nf_conn *ct, *last; + struct nf_conn *ct = NULL; struct nf_conntrack_tuple_hash *h; struct list_head *i; + u_int32_t *id = (u_int32_t *) &cb->args[1]; struct nfgenmsg *nfmsg = NLMSG_DATA(cb->nlh); u_int8_t l3proto = nfmsg->nfgen_family; @@ -429,9 +427,7 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb) cb->args[0], *id); read_lock_bh(&nf_conntrack_lock); - last = (struct nf_conn *)cb->args[1]; - for (; cb->args[0] < nf_conntrack_htable_size; cb->args[0]++) { -restart: + for (; cb->args[0] < nf_conntrack_htable_size; cb->args[0]++, *id = 0) { list_for_each_prev(i, &nf_conntrack_hash[cb->args[0]]) { h = (struct nf_conntrack_tuple_hash *) i; if (DIRECTION(h) != IP_CT_DIR_ORIGINAL) @@ -442,31 +438,21 @@ restart: * then dump everything. */ if (l3proto && L3PROTO(ct) != l3proto) continue; - if (cb->args[1]) { - if (ct != last) - continue; - cb->args[1] = 0; - } + if (ct->id <= *id) + continue; if (ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, IPCTNL_MSG_CT_NEW, - 1, ct) < 0) { - nf_conntrack_get(&ct->ct_general); - cb->args[1] = (unsigned long)ct; + 1, ct) < 0) goto out; - } - } - if (cb->args[1]) { - cb->args[1] = 0; - goto restart; + *id = ct->id; } } -out: +out: read_unlock_bh(&nf_conntrack_lock); - if (last) - nf_ct_put(last); DEBUGP("leaving, last bucket=%lu id=%u\n", cb->args[0], *id); + return skb->len; } @@ -655,7 +641,7 @@ static const size_t cta_min_nat[CTA_NAT_MAX] = { }; static inline int -ctnetlink_parse_nat(struct nfattr *nat, +ctnetlink_parse_nat(struct nfattr *cda[], const struct nf_conn *ct, struct ip_nat_range *range) { struct nfattr *tb[CTA_NAT_MAX]; @@ -665,7 +651,7 @@ ctnetlink_parse_nat(struct nfattr *nat, memset(range, 0, sizeof(*range)); - nfattr_parse_nested(tb, CTA_NAT_MAX, nat); + nfattr_parse_nested(tb, CTA_NAT_MAX, cda[CTA_NAT-1]); if (nfattr_bad_size(tb, CTA_NAT_MAX, cta_min_nat)) return -EINVAL; @@ -880,30 +866,39 @@ ctnetlink_change_status(struct nf_conn *ct, struct nfattr *cda[]) /* ASSURED bit can only be set */ return -EINVAL; - if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) { + if (cda[CTA_NAT-1]) { #ifndef CONFIG_IP_NF_NAT_NEEDED return -EINVAL; #else + unsigned int hooknum; struct ip_nat_range range; - if (cda[CTA_NAT_DST-1]) { - if (ctnetlink_parse_nat(cda[CTA_NAT_DST-1], ct, - &range) < 0) - return -EINVAL; - if (ip_nat_initialized(ct, - HOOK2MANIP(NF_IP_PRE_ROUTING))) - return -EEXIST; - ip_nat_setup_info(ct, &range, hooknum); - } - if (cda[CTA_NAT_SRC-1]) { - if (ctnetlink_parse_nat(cda[CTA_NAT_SRC-1], ct, - &range) < 0) - return -EINVAL; - if (ip_nat_initialized(ct, - HOOK2MANIP(NF_IP_POST_ROUTING))) - return -EEXIST; - ip_nat_setup_info(ct, &range, hooknum); - } + if (ctnetlink_parse_nat(cda, ct, &range) < 0) + return -EINVAL; + + DEBUGP("NAT: %u.%u.%u.%u-%u.%u.%u.%u:%u-%u\n", + NIPQUAD(range.min_ip), NIPQUAD(range.max_ip), + htons(range.min.all), htons(range.max.all)); + + /* This is tricky but it works. ip_nat_setup_info needs the + * hook number as parameter, so let's do the correct + * conversion and run away */ + if (status & IPS_SRC_NAT_DONE) + hooknum = NF_IP_POST_ROUTING; /* IP_NAT_MANIP_SRC */ + else if (status & IPS_DST_NAT_DONE) + hooknum = NF_IP_PRE_ROUTING; /* IP_NAT_MANIP_DST */ + else + return -EINVAL; /* Missing NAT flags */ + + DEBUGP("NAT status: %lu\n", + status & (IPS_NAT_MASK | IPS_NAT_DONE_MASK)); + + if (ip_nat_initialized(ct, HOOK2MANIP(hooknum))) + return -EEXIST; + ip_nat_setup_info(ct, &range, hooknum); + + DEBUGP("NAT status after setup_info: %lu\n", + ct->status & (IPS_NAT_MASK | IPS_NAT_DONE_MASK)); #endif } @@ -1127,7 +1122,7 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb, /* implicit 'else' */ /* we only allow nat config for new conntracks */ - if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) { + if (cda[CTA_NAT-1]) { err = -EINVAL; goto out_unlock; } diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index 9bd8a7877..9dab81d31 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c @@ -28,8 +28,6 @@ #include #include #include -#include -#include #include #include diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index af8adcba2..69899f27d 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -24,6 +24,7 @@ * version 2.2 */ +#include #include #include #include @@ -827,9 +828,8 @@ static int tcp_error(struct sk_buff *skb, * and moreover root might send raw packets. */ /* FIXME: Source route IP option packets --RR */ - if (nf_conntrack_checksum && - ((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) || - (pf == PF_INET6 && hooknum == NF_IP6_PRE_ROUTING)) && + if (((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) || + (pf == PF_INET6 && hooknum == NF_IP6_PRE_ROUTING)) && nf_checksum(skb, hooknum, dataoff, IPPROTO_TCP, pf)) { if (LOG_INVALID(IPPROTO_TCP)) nf_log_packet(pf, 0, skb, NULL, NULL, NULL, diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c index ae07ebe3a..d93edbfde 100644 --- a/net/netfilter/nf_conntrack_proto_udp.c +++ b/net/netfilter/nf_conntrack_proto_udp.c @@ -134,8 +134,7 @@ static int udp_error(struct sk_buff *skb, unsigned int dataoff, * because the semantic of CHECKSUM_HW is different there * and moreover root might send raw packets. * FIXME: Source route IP option packets --RR */ - if (nf_conntrack_checksum && - ((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) || + if (((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) || (pf == PF_INET6 && hooknum == NF_IP6_PRE_ROUTING)) && nf_checksum(skb, hooknum, dataoff, IPPROTO_UDP, pf)) { if (LOG_INVALID(IPPROTO_UDP)) diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 4ef836699..408960c6a 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c @@ -17,6 +17,7 @@ * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c */ +#include #include #include #include @@ -212,11 +213,6 @@ static int ct_seq_show(struct seq_file *s, void *v) return -ENOSPC; #endif -#ifdef CONFIG_NF_CONNTRACK_SECMARK - if (seq_printf(s, "secmark=%u ", conntrack->secmark)) - return -ENOSPC; -#endif - if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use))) return -ENOSPC; @@ -428,8 +424,6 @@ static struct file_operations ct_cpu_seq_fops = { /* Sysctl support */ -int nf_conntrack_checksum = 1; - #ifdef CONFIG_SYSCTL /* From nf_conntrack_core.c */ @@ -488,14 +482,6 @@ static ctl_table nf_ct_sysctl_table[] = { .mode = 0444, .proc_handler = &proc_dointvec, }, - { - .ctl_name = NET_NF_CONNTRACK_CHECKSUM, - .procname = "nf_conntrack_checksum", - .data = &nf_conntrack_checksum, - .maxlen = sizeof(unsigned int), - .mode = 0644, - .proc_handler = &proc_dointvec, - }, { .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT, .procname = "nf_conntrack_tcp_timeout_syn_sent", @@ -865,7 +851,6 @@ EXPORT_SYMBOL(nf_ct_proto_put); EXPORT_SYMBOL(nf_ct_l3proto_find_get); EXPORT_SYMBOL(nf_ct_l3proto_put); EXPORT_SYMBOL(nf_ct_l3protos); -EXPORT_SYMBOL_GPL(nf_conntrack_checksum); EXPORT_SYMBOL(nf_conntrack_expect_alloc); EXPORT_SYMBOL(nf_conntrack_expect_put); EXPORT_SYMBOL(nf_conntrack_expect_related); diff --git a/net/netfilter/nf_internals.h b/net/netfilter/nf_internals.h index 86e392bfe..6bdee2910 100644 --- a/net/netfilter/nf_internals.h +++ b/net/netfilter/nf_internals.h @@ -1,6 +1,7 @@ #ifndef _NF_INTERNALS_H #define _NF_INTERNALS_H +#include #include #include #include diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index 8901b3a07..3e76bd082 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 662a86959..ee8f70889 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -219,20 +220,21 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, switch (verdict & NF_VERDICT_MASK) { case NF_ACCEPT: - case NF_STOP: info->okfn(skb); - case NF_STOLEN: break; + case NF_QUEUE: if (!nf_queue(&skb, elem, info->pf, info->hook, info->indev, info->outdev, info->okfn, verdict >> NF_VERDICT_BITS)) goto next_hook; break; - default: - kfree_skb(skb); } rcu_read_unlock(); + + if (verdict == NF_DROP) + kfree_skb(skb); + kfree(info); return; } diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c index c2e44e90e..0a63d7dac 100644 --- a/net/netfilter/nf_sockopt.c +++ b/net/netfilter/nf_sockopt.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 52fdfa268..b88e82a1a 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -14,6 +14,7 @@ * of the GNU General Public License, incorporated herein by reference. */ +#include #include #include #include @@ -228,7 +229,7 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, NFNL_SUBSYS_ID(nlh->nlmsg_type), NFNL_MSG_TYPE(nlh->nlmsg_type)); - if (security_netlink_recv(skb, CAP_NET_ADMIN)) { + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) { DEBUGP("missing CAP_NET_ADMIN\n"); *errp = -EPERM; return -1; diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index b59d3b2bd..23af261e0 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -372,6 +372,9 @@ __nfulnl_send(struct nfulnl_instance *inst) if (inst->qlen > 1) inst->lastnlh->nlmsg_type = NLMSG_DONE; + if (!inst->skb) + return 0; + status = nfnetlink_unicast(inst->skb, inst->peer_pid, MSG_DONTWAIT); if (status < 0) { UDEBUG("netlink_unicast() failed\n"); diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 49ef41e34..86a4ac33d 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -680,19 +680,11 @@ dev_cmp(struct nfqnl_queue_entry *entry, unsigned long ifindex) if (entinf->indev) if (entinf->indev->ifindex == ifindex) return 1; + if (entinf->outdev) if (entinf->outdev->ifindex == ifindex) return 1; -#ifdef CONFIG_BRIDGE_NETFILTER - if (entry->skb->nf_bridge) { - if (entry->skb->nf_bridge->physindev && - entry->skb->nf_bridge->physindev->ifindex == ifindex) - return 1; - if (entry->skb->nf_bridge->physoutdev && - entry->skb->nf_bridge->physoutdev->ifindex == ifindex) - return 1; - } -#endif + return 0; } diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 174e8f970..99293c63f 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c deleted file mode 100644 index 8c011e020..000000000 --- a/net/netfilter/xt_CONNSECMARK.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * This module is used to copy security markings from packets - * to connections, and restore security markings from connections - * back to packets. This would normally be performed in conjunction - * with the SECMARK target and state match. - * - * Based somewhat on CONNMARK: - * Copyright (C) 2002,2004 MARA Systems AB - * by Henrik Nordstrom - * - * (C) 2006 Red Hat, Inc., James Morris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include - -#define PFX "CONNSECMARK: " - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("James Morris "); -MODULE_DESCRIPTION("ip[6]tables CONNSECMARK module"); -MODULE_ALIAS("ipt_CONNSECMARK"); -MODULE_ALIAS("ip6t_CONNSECMARK"); - -/* - * If the packet has a security mark and the connection does not, copy - * the security mark from the packet to the connection. - */ -static void secmark_save(struct sk_buff *skb) -{ - if (skb->secmark) { - u32 *connsecmark; - enum ip_conntrack_info ctinfo; - - connsecmark = nf_ct_get_secmark(skb, &ctinfo); - if (connsecmark && !*connsecmark) - if (*connsecmark != skb->secmark) - *connsecmark = skb->secmark; - } -} - -/* - * If packet has no security mark, and the connection does, restore the - * security mark from the connection to the packet. - */ -static void secmark_restore(struct sk_buff *skb) -{ - if (!skb->secmark) { - u32 *connsecmark; - enum ip_conntrack_info ctinfo; - - connsecmark = nf_ct_get_secmark(skb, &ctinfo); - if (connsecmark && *connsecmark) - if (skb->secmark != *connsecmark) - skb->secmark = *connsecmark; - } -} - -static unsigned int target(struct sk_buff **pskb, const struct net_device *in, - const struct net_device *out, unsigned int hooknum, - const struct xt_target *target, - const void *targinfo, void *userinfo) -{ - struct sk_buff *skb = *pskb; - const struct xt_connsecmark_target_info *info = targinfo; - - switch (info->mode) { - case CONNSECMARK_SAVE: - secmark_save(skb); - break; - - case CONNSECMARK_RESTORE: - secmark_restore(skb); - break; - - default: - BUG(); - } - - return XT_CONTINUE; -} - -static int checkentry(const char *tablename, const void *entry, - const struct xt_target *target, void *targinfo, - unsigned int targinfosize, unsigned int hook_mask) -{ - struct xt_connsecmark_target_info *info = targinfo; - - switch (info->mode) { - case CONNSECMARK_SAVE: - case CONNSECMARK_RESTORE: - break; - - default: - printk(KERN_INFO PFX "invalid mode: %hu\n", info->mode); - return 0; - } - - return 1; -} - -static struct xt_target ipt_connsecmark_reg = { - .name = "CONNSECMARK", - .target = target, - .targetsize = sizeof(struct xt_connsecmark_target_info), - .table = "mangle", - .checkentry = checkentry, - .me = THIS_MODULE, - .family = AF_INET, - .revision = 0, -}; - -static struct xt_target ip6t_connsecmark_reg = { - .name = "CONNSECMARK", - .target = target, - .targetsize = sizeof(struct xt_connsecmark_target_info), - .table = "mangle", - .checkentry = checkentry, - .me = THIS_MODULE, - .family = AF_INET6, - .revision = 0, -}; - -static int __init xt_connsecmark_init(void) -{ - int err; - - need_conntrack(); - - err = xt_register_target(&ipt_connsecmark_reg); - if (err) - return err; - - err = xt_register_target(&ip6t_connsecmark_reg); - if (err) - xt_unregister_target(&ipt_connsecmark_reg); - - return err; -} - -static void __exit xt_connsecmark_fini(void) -{ - xt_unregister_target(&ip6t_connsecmark_reg); - xt_unregister_target(&ipt_connsecmark_reg); -} - -module_init(xt_connsecmark_init); -module_exit(xt_connsecmark_fini); diff --git a/net/netfilter/xt_SECMARK.c b/net/netfilter/xt_SECMARK.c deleted file mode 100644 index de9537ad9..000000000 --- a/net/netfilter/xt_SECMARK.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Module for modifying the secmark field of the skb, for use by - * security subsystems. - * - * Based on the nfmark match by: - * (C) 1999-2001 Marc Boucher - * - * (C) 2006 Red Hat, Inc., James Morris - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ -#include -#include -#include -#include -#include - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("James Morris "); -MODULE_DESCRIPTION("ip[6]tables SECMARK modification module"); -MODULE_ALIAS("ipt_SECMARK"); -MODULE_ALIAS("ip6t_SECMARK"); - -#define PFX "SECMARK: " - -static u8 mode; - -static unsigned int target(struct sk_buff **pskb, const struct net_device *in, - const struct net_device *out, unsigned int hooknum, - const struct xt_target *target, - const void *targinfo, void *userinfo) -{ - u32 secmark = 0; - const struct xt_secmark_target_info *info = targinfo; - - BUG_ON(info->mode != mode); - - switch (mode) { - case SECMARK_MODE_SEL: - secmark = info->u.sel.selsid; - break; - - default: - BUG(); - } - - if ((*pskb)->secmark != secmark) - (*pskb)->secmark = secmark; - - return XT_CONTINUE; -} - -static int checkentry_selinux(struct xt_secmark_target_info *info) -{ - int err; - struct xt_secmark_target_selinux_info *sel = &info->u.sel; - - sel->selctx[SECMARK_SELCTX_MAX - 1] = '\0'; - - err = selinux_string_to_sid(sel->selctx, &sel->selsid); - if (err) { - if (err == -EINVAL) - printk(KERN_INFO PFX "invalid SELinux context \'%s\'\n", - sel->selctx); - return 0; - } - - if (!sel->selsid) { - printk(KERN_INFO PFX "unable to map SELinux context \'%s\'\n", - sel->selctx); - return 0; - } - - err = selinux_relabel_packet_permission(sel->selsid); - if (err) { - printk(KERN_INFO PFX "unable to obtain relabeling permission\n"); - return 0; - } - - return 1; -} - -static int checkentry(const char *tablename, const void *entry, - const struct xt_target *target, void *targinfo, - unsigned int targinfosize, unsigned int hook_mask) -{ - struct xt_secmark_target_info *info = targinfo; - - if (mode && mode != info->mode) { - printk(KERN_INFO PFX "mode already set to %hu cannot mix with " - "rules for mode %hu\n", mode, info->mode); - return 0; - } - - switch (info->mode) { - case SECMARK_MODE_SEL: - if (!checkentry_selinux(info)) - return 0; - break; - - default: - printk(KERN_INFO PFX "invalid mode: %hu\n", info->mode); - return 0; - } - - if (!mode) - mode = info->mode; - return 1; -} - -static struct xt_target ipt_secmark_reg = { - .name = "SECMARK", - .target = target, - .targetsize = sizeof(struct xt_secmark_target_info), - .table = "mangle", - .checkentry = checkentry, - .me = THIS_MODULE, - .family = AF_INET, - .revision = 0, -}; - -static struct xt_target ip6t_secmark_reg = { - .name = "SECMARK", - .target = target, - .targetsize = sizeof(struct xt_secmark_target_info), - .table = "mangle", - .checkentry = checkentry, - .me = THIS_MODULE, - .family = AF_INET6, - .revision = 0, -}; - -static int __init xt_secmark_init(void) -{ - int err; - - err = xt_register_target(&ipt_secmark_reg); - if (err) - return err; - - err = xt_register_target(&ip6t_secmark_reg); - if (err) - xt_unregister_target(&ipt_secmark_reg); - - return err; -} - -static void __exit xt_secmark_fini(void) -{ - xt_unregister_target(&ip6t_secmark_reg); - xt_unregister_target(&ipt_secmark_reg); -} - -module_init(xt_secmark_init); -module_exit(xt_secmark_fini); diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c index 56324c8af..dc26a27cb 100644 --- a/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c @@ -58,7 +58,7 @@ checkentry(const char *tablename, unsigned int matchsize, unsigned int hook_mask) { - struct xt_connmark_info *cm = matchinfo; + struct xt_connmark_info *cm = (struct xt_connmark_info *)matchinfo; if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) { printk(KERN_WARNING "connmark: only support 32bit mark\n"); diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c index 2e2f825da..dfb10b648 100644 --- a/net/netfilter/xt_dccp.c +++ b/net/netfilter/xt_dccp.c @@ -101,7 +101,8 @@ match(const struct sk_buff *skb, unsigned int protoff, int *hotdrop) { - const struct xt_dccp_info *info = matchinfo; + const struct xt_dccp_info *info = + (const struct xt_dccp_info *)matchinfo; struct dccp_hdr _dh, *dh; if (offset) diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c index 876bc5797..8b385a348 100644 --- a/net/netfilter/xt_mark.c +++ b/net/netfilter/xt_mark.c @@ -42,7 +42,7 @@ checkentry(const char *tablename, unsigned int matchsize, unsigned int hook_mask) { - const struct xt_mark_info *minfo = matchinfo; + struct xt_mark_info *minfo = (struct xt_mark_info *) matchinfo; if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) { printk(KERN_WARNING "mark: only supports 32bit mark\n"); diff --git a/net/netfilter/xt_multiport.c b/net/netfilter/xt_multiport.c index 1ff0a2539..b56cd2baa 100644 --- a/net/netfilter/xt_multiport.c +++ b/net/netfilter/xt_multiport.c @@ -1,4 +1,4 @@ -/* Kernel module to match one of a list of TCP/UDP/SCTP/DCCP ports: ports are in +/* Kernel module to match one of a list of TCP/UDP ports: ports are in the same place so we can treat them as equal. */ /* (C) 1999-2001 Paul `Rusty' Russell @@ -160,9 +160,8 @@ check(u_int16_t proto, u_int8_t match_flags, u_int8_t count) { - /* Must specify supported protocol, no unknown flags or bad count */ - return (proto == IPPROTO_TCP || proto == IPPROTO_UDP - || proto == IPPROTO_SCTP || proto == IPPROTO_DCCP) + /* Must specify proto == TCP/UDP, no unknown flags or bad count */ + return (proto == IPPROTO_TCP || proto == IPPROTO_UDP) && !(ip_invflags & XT_INV_PROTO) && (match_flags == XT_MULTIPORT_SOURCE || match_flags == XT_MULTIPORT_DESTINATION diff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c index 63a965467..5fe4c9df1 100644 --- a/net/netfilter/xt_physdev.c +++ b/net/netfilter/xt_physdev.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -114,21 +113,6 @@ checkentry(const char *tablename, if (!(info->bitmask & XT_PHYSDEV_OP_MASK) || info->bitmask & ~XT_PHYSDEV_OP_MASK) return 0; - if (brnf_deferred_hooks == 0 && - info->bitmask & XT_PHYSDEV_OP_OUT && - (!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) || - info->invert & XT_PHYSDEV_OP_BRIDGED) && - hook_mask & ((1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) | - (1 << NF_IP_POST_ROUTING))) { - printk(KERN_WARNING "physdev match: using --physdev-out in the " - "OUTPUT, FORWARD and POSTROUTING chains for non-bridged " - "traffic is deprecated and breaks other things, it will " - "be removed in January 2007. See Documentation/" - "feature-removal-schedule.txt for details. This doesn't " - "affect you in case you're using it for purely bridged " - "traffic.\n"); - brnf_deferred_hooks = 1; - } return 1; } diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c index d2f5320a8..3ac703b5c 100644 --- a/net/netfilter/xt_pkttype.c +++ b/net/netfilter/xt_pkttype.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include @@ -30,17 +28,9 @@ static int match(const struct sk_buff *skb, unsigned int protoff, int *hotdrop) { - u_int8_t type; const struct xt_pkttype_info *info = matchinfo; - if (skb->pkt_type == PACKET_LOOPBACK) - type = (MULTICAST(skb->nh.iph->daddr) - ? PACKET_MULTICAST - : PACKET_BROADCAST); - else - type = skb->pkt_type; - - return (type == info->pkttype) ^ info->invert; + return (skb->pkt_type == info->pkttype) ^ info->invert; } static struct xt_match pkttype_match = { diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c index ba1ca03ab..a3aa62fbd 100644 --- a/net/netfilter/xt_policy.c +++ b/net/netfilter/xt_policy.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c deleted file mode 100644 index be8d3c26b..000000000 --- a/net/netfilter/xt_quota.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * netfilter module to enforce network quotas - * - * Sam Johnston - */ -#include -#include - -#include -#include - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Sam Johnston "); -MODULE_ALIAS("ipt_quota"); -MODULE_ALIAS("ip6t_quota"); - -static DEFINE_SPINLOCK(quota_lock); - -static int -match(const struct sk_buff *skb, - const struct net_device *in, const struct net_device *out, - const struct xt_match *match, const void *matchinfo, - int offset, unsigned int protoff, int *hotdrop) -{ - struct xt_quota_info *q = ((struct xt_quota_info *)matchinfo)->master; - int ret = q->flags & XT_QUOTA_INVERT ? 1 : 0; - - spin_lock_bh("a_lock); - if (q->quota >= skb->len) { - q->quota -= skb->len; - ret ^= 1; - } else { - /* we do not allow even small packets from now on */ - q->quota = 0; - } - spin_unlock_bh("a_lock); - - return ret; -} - -static int -checkentry(const char *tablename, const void *entry, - const struct xt_match *match, void *matchinfo, - unsigned int matchsize, unsigned int hook_mask) -{ - struct xt_quota_info *q = (struct xt_quota_info *)matchinfo; - - if (q->flags & ~XT_QUOTA_MASK) - return 0; - /* For SMP, we only want to use one set of counters. */ - q->master = q; - return 1; -} - -static struct xt_match quota_match = { - .name = "quota", - .family = AF_INET, - .match = match, - .matchsize = sizeof(struct xt_quota_info), - .checkentry = checkentry, - .me = THIS_MODULE -}; - -static struct xt_match quota_match6 = { - .name = "quota", - .family = AF_INET6, - .match = match, - .matchsize = sizeof(struct xt_quota_info), - .checkentry = checkentry, - .me = THIS_MODULE -}; - -static int __init xt_quota_init(void) -{ - int ret; - - ret = xt_register_match("a_match); - if (ret) - goto err1; - ret = xt_register_match("a_match6); - if (ret) - goto err2; - return ret; - -err2: - xt_unregister_match("a_match); -err1: - return ret; -} - -static void __exit xt_quota_fini(void) -{ - xt_unregister_match("a_match6); - xt_unregister_match("a_match); -} - -module_init(xt_quota_init); -module_exit(xt_quota_fini); diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index 843383e01..c29692c7c 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c @@ -129,9 +129,11 @@ match(const struct sk_buff *skb, unsigned int protoff, int *hotdrop) { - const struct xt_sctp_info *info = matchinfo; + const struct xt_sctp_info *info; sctp_sctphdr_t _sh, *sh; + info = (const struct xt_sctp_info *)matchinfo; + if (offset) { duprintf("Dropping non-first fragment.. FIXME\n"); return 0; @@ -151,7 +153,7 @@ match(const struct sk_buff *skb, && SCCHECK(((ntohs(sh->dest) >= info->dpts[0]) && (ntohs(sh->dest) <= info->dpts[1])), XT_SCTP_DEST_PORTS, info->flags, info->invflags) - && SCCHECK(match_packet(skb, protoff + sizeof (sctp_sctphdr_t), + && SCCHECK(match_packet(skb, protoff, info->chunkmap, info->chunk_match_type, info->flag_info, info->flag_count, hotdrop), diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c deleted file mode 100644 index de1037f58..000000000 --- a/net/netfilter/xt_statistic.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2006 Patrick McHardy - * - * 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. - * - * Based on ipt_random and ipt_nth by Fabrice MARIE . - */ - -#include -#include -#include -#include - -#include -#include - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Patrick McHardy "); -MODULE_DESCRIPTION("xtables statistical match module"); -MODULE_ALIAS("ipt_statistic"); -MODULE_ALIAS("ip6t_statistic"); - -static DEFINE_SPINLOCK(nth_lock); - -static int -match(const struct sk_buff *skb, - const struct net_device *in, const struct net_device *out, - const struct xt_match *match, const void *matchinfo, - int offset, unsigned int protoff, int *hotdrop) -{ - struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo; - int ret = info->flags & XT_STATISTIC_INVERT ? 1 : 0; - - switch (info->mode) { - case XT_STATISTIC_MODE_RANDOM: - if ((net_random() & 0x7FFFFFFF) < info->u.random.probability) - ret ^= 1; - break; - case XT_STATISTIC_MODE_NTH: - info = info->master; - spin_lock_bh(&nth_lock); - if (info->u.nth.count++ == info->u.nth.every) { - info->u.nth.count = 0; - ret ^= 1; - } - spin_unlock_bh(&nth_lock); - break; - } - - return ret; -} - -static int -checkentry(const char *tablename, const void *entry, - const struct xt_match *match, void *matchinfo, - unsigned int matchsize, unsigned int hook_mask) -{ - struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo; - - if (info->mode > XT_STATISTIC_MODE_MAX || - info->flags & ~XT_STATISTIC_MASK) - return 0; - info->master = info; - return 1; -} - -static struct xt_match statistic_match = { - .name = "statistic", - .match = match, - .matchsize = sizeof(struct xt_statistic_info), - .checkentry = checkentry, - .family = AF_INET, - .me = THIS_MODULE, -}; - -static struct xt_match statistic_match6 = { - .name = "statistic", - .match = match, - .matchsize = sizeof(struct xt_statistic_info), - .checkentry = checkentry, - .family = AF_INET6, - .me = THIS_MODULE, -}; - -static int __init xt_statistic_init(void) -{ - int ret; - - ret = xt_register_match(&statistic_match); - if (ret) - goto err1; - - ret = xt_register_match(&statistic_match6); - if (ret) - goto err2; - return ret; -err2: - xt_unregister_match(&statistic_match); -err1: - return ret; -} - -static void __exit xt_statistic_fini(void) -{ - xt_unregister_match(&statistic_match6); - xt_unregister_match(&statistic_match); -} - -module_init(xt_statistic_init); -module_exit(xt_statistic_fini); diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c index 275330fcd..79d9ea696 100644 --- a/net/netfilter/xt_string.c +++ b/net/netfilter/xt_string.c @@ -30,14 +30,14 @@ static int match(const struct sk_buff *skb, unsigned int protoff, int *hotdrop) { - const struct xt_string_info *conf = matchinfo; struct ts_state state; + struct xt_string_info *conf = (struct xt_string_info *) matchinfo; memset(&state, 0, sizeof(struct ts_state)); return (skb_find_text((struct sk_buff *)skb, conf->from_offset, conf->to_offset, conf->config, &state) - != UINT_MAX) ^ conf->invert; + != UINT_MAX) && !conf->invert; } #define STRING_TEXT_PRIV(m) ((struct xt_string_info *) m) @@ -55,10 +55,7 @@ static int checkentry(const char *tablename, /* Damn, can't handle this case properly with iptables... */ if (conf->from_offset > conf->to_offset) return 0; - if (conf->algo[XT_STRING_MAX_ALGO_NAME_SIZE - 1] != '\0') - return 0; - if (conf->patlen > XT_STRING_MAX_PATTERN_SIZE) - return 0; + ts_conf = textsearch_prepare(conf->algo, conf->pattern, conf->patlen, GFP_KERNEL, TS_AUTOLOAD); if (IS_ERR(ts_conf)) diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c index a9a63aa68..1b61dac9c 100644 --- a/net/netfilter/xt_tcpudp.c +++ b/net/netfilter/xt_tcpudp.c @@ -260,7 +260,7 @@ static int __init xt_tcpudp_init(void) return ret; out_unreg_udp: - xt_unregister_match(&udp_matchstruct); + xt_unregister_match(&tcp_matchstruct); out_unreg_tcp6: xt_unregister_match(&tcp6_matchstruct); out_unreg_tcp: diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 1d28cbcfe..e6c285ede 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -21,6 +21,7 @@ * mandatory if CONFIG_NET=y these days */ +#include #include #include @@ -160,7 +161,7 @@ static void netlink_sock_destruct(struct sock *sk) static void netlink_table_grab(void) { - write_lock_irq(&nl_table_lock); + write_lock_bh(&nl_table_lock); if (atomic_read(&nl_table_users)) { DECLARE_WAITQUEUE(wait, current); @@ -170,9 +171,9 @@ static void netlink_table_grab(void) set_current_state(TASK_UNINTERRUPTIBLE); if (atomic_read(&nl_table_users) == 0) break; - write_unlock_irq(&nl_table_lock); + write_unlock_bh(&nl_table_lock); schedule(); - write_lock_irq(&nl_table_lock); + write_lock_bh(&nl_table_lock); } __set_current_state(TASK_RUNNING); @@ -182,7 +183,7 @@ static void netlink_table_grab(void) static __inline__ void netlink_table_ungrab(void) { - write_unlock_irq(&nl_table_lock); + write_unlock_bh(&nl_table_lock); wake_up(&nl_table_wait); } @@ -566,9 +567,10 @@ static int netlink_alloc_groups(struct sock *sk) if (err) return err; - nlk->groups = kzalloc(NLGRPSZ(groups), GFP_KERNEL); + nlk->groups = kmalloc(NLGRPSZ(groups), GFP_KERNEL); if (nlk->groups == NULL) return -ENOMEM; + memset(nlk->groups, 0, NLGRPSZ(groups)); nlk->ngroups = groups; return 0; } @@ -1277,7 +1279,8 @@ netlink_kernel_create(int unit, unsigned int groups, struct netlink_sock *nlk; unsigned long *listeners = NULL; - BUG_ON(!nl_table); + if (!nl_table) + return NULL; if (unit<0 || unit>=MAX_LINKS) return NULL; @@ -1395,10 +1398,11 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, struct sock *sk; struct netlink_sock *nlk; - cb = kzalloc(sizeof(*cb), GFP_KERNEL); + cb = kmalloc(sizeof(*cb), GFP_KERNEL); if (cb == NULL) return -ENOBUFS; + memset(cb, 0, sizeof(*cb)); cb->dump = dump; cb->done = done; cb->nlh = nlh; @@ -1669,7 +1673,7 @@ static int netlink_seq_open(struct inode *inode, struct file *file) struct nl_seq_iter *iter; int err; - iter = kzalloc(sizeof(*iter), GFP_KERNEL); + iter = kmalloc(sizeof(*iter), GFP_KERNEL); if (!iter) return -ENOMEM; @@ -1679,6 +1683,7 @@ static int netlink_seq_open(struct inode *inode, struct file *file) return err; } + memset(iter, 0, sizeof(*iter)); seq = file->private_data; seq->private = iter; return 0; @@ -1747,9 +1752,14 @@ static int __init netlink_proto_init(void) if (sizeof(struct netlink_skb_parms) > sizeof(dummy_skb->cb)) netlink_skb_parms_too_large(); - nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL); - if (!nl_table) - goto panic; + nl_table = kmalloc(sizeof(*nl_table) * MAX_LINKS, GFP_KERNEL); + if (!nl_table) { +enomem: + printk(KERN_CRIT "netlink_init: Cannot allocate nl_table\n"); + return -ENOMEM; + } + + memset(nl_table, 0, sizeof(*nl_table) * MAX_LINKS); if (num_physpages >= (128 * 1024)) max = num_physpages >> (21 - PAGE_SHIFT); @@ -1769,7 +1779,7 @@ static int __init netlink_proto_init(void) nl_pid_hash_free(nl_table[i].hash.table, 1 * sizeof(*hash->table)); kfree(nl_table); - goto panic; + goto enomem; } memset(hash->table, 0, 1 * sizeof(*hash->table)); hash->max_shift = order; @@ -1786,8 +1796,6 @@ static int __init netlink_proto_init(void) rtnetlink_init(); out: return err; -panic: - panic("netlink_init: Cannot allocate nl_table\n"); } core_initcall(netlink_proto_init); diff --git a/net/netlink/attr.c b/net/netlink/attr.c index dddbd1513..fffef4ab2 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c @@ -5,6 +5,7 @@ * Alexey Kuznetsov */ +#include #include #include #include diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index a298f77cc..f329b7257 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -5,6 +5,7 @@ * Thomas Graf */ +#include #include #include #include @@ -319,7 +320,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, goto errout; } - if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb, CAP_NET_ADMIN)) { + if ((ops->flags & GENL_ADMIN_PERM) && security_netlink_recv(skb)) { err = -EPERM; goto errout; } diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 1d50f801f..3669cb953 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -8,6 +8,7 @@ * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) * Copyright Darryl Miles G7LED (dlm@g7led.demon.co.uk) */ +#include #include #include #include @@ -65,14 +66,6 @@ static DEFINE_SPINLOCK(nr_list_lock); static const struct proto_ops nr_proto_ops; -/* - * NETROM network devices are virtual network devices encapsulating NETROM - * frames into AX.25 which will be sent through an AX.25 device, so form a - * special "super class" of normal net devices; split their locks off into a - * separate class since they always nest. - */ -static struct lock_class_key nr_netdev_xmit_lock_key; - /* * Socket removal during an interrupt is now safe. */ @@ -808,7 +801,7 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags) /* Now attach up the new socket */ kfree_skb(skb); - sk_acceptq_removed(sk); + sk->sk_ack_backlog--; newsock->sk = newsk; out: @@ -993,19 +986,19 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev) nr_make->vr = 0; nr_make->vl = 0; nr_make->state = NR_STATE_3; - sk_acceptq_added(sk); - skb_queue_head(&sk->sk_receive_queue, skb); - - if (!sock_flag(sk, SOCK_DEAD)) - sk->sk_data_ready(sk, skb->len); - - bh_unlock_sock(sk); + sk->sk_ack_backlog++; nr_insert_socket(make); + skb_queue_head(&sk->sk_receive_queue, skb); + nr_start_heartbeat(make); nr_start_idletimer(make); + if (!sock_flag(sk, SOCK_DEAD)) + sk->sk_data_ready(sk, skb->len); + + bh_unlock_sock(sk); return 1; } @@ -1390,12 +1383,14 @@ static int __init nr_proto_init(void) return -1; } - dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); + dev_nr = kmalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); if (dev_nr == NULL) { printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n"); return -1; } + memset(dev_nr, 0x00, nr_ndevs * sizeof(struct net_device *)); + for (i = 0; i < nr_ndevs; i++) { char name[IFNAMSIZ]; struct net_device *dev; @@ -1413,7 +1408,6 @@ static int __init nr_proto_init(void) free_netdev(dev); goto fail; } - lockdep_set_class(&dev->_xmit_lock, &nr_netdev_xmit_lock_key); dev_nr[i] = dev; } diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 9b8eb5497..621e5586a 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c @@ -6,6 +6,7 @@ * * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) */ +#include #include #include #include diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index c11737f47..b3b9097c8 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -725,17 +725,15 @@ void nr_link_failed(ax25_cb *ax25, int reason) struct nr_node *nr_node = NULL; spin_lock_bh(&nr_neigh_list_lock); - nr_neigh_for_each(s, node, &nr_neigh_list) { + nr_neigh_for_each(s, node, &nr_neigh_list) if (s->ax25 == ax25) { nr_neigh_hold(s); nr_neigh = s; break; } - } spin_unlock_bh(&nr_neigh_list_lock); - if (nr_neigh == NULL) - return; + if (nr_neigh == NULL) return; nr_neigh->ax25 = NULL; ax25_cb_put(ax25); @@ -745,13 +743,11 @@ void nr_link_failed(ax25_cb *ax25, int reason) return; } spin_lock_bh(&nr_node_list_lock); - nr_node_for_each(nr_node, node, &nr_node_list) { + nr_node_for_each(nr_node, node, &nr_node_list) nr_node_lock(nr_node); - if (nr_node->which < nr_node->count && - nr_node->routes[nr_node->which].neighbour == nr_neigh) + if (nr_node->which < nr_node->count && nr_node->routes[nr_node->which].neighbour == nr_neigh) nr_node->which++; nr_node_unlock(nr_node); - } spin_unlock_bh(&nr_node_list_lock); nr_neigh_put(nr_neigh); } diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index ddba1c144..75b72d389 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c @@ -138,8 +138,8 @@ static void nr_heartbeat_expiry(unsigned long param) if (sock_flag(sk, SOCK_DESTROY) || (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { sock_hold(sk); - bh_unlock_sock(sk); nr_destroy_socket(sk); + bh_unlock_sock(sk); sock_put(sk); return; } diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index e8cb33495..d36b3c955 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -49,6 +49,7 @@ * */ +#include #include #include #include @@ -638,6 +639,8 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe if ((int)snaplen < 0) snaplen = 0; } + if (snaplen > skb->len-skb->data_len) + snaplen = skb->len-skb->data_len; spin_lock(&sk->sk_receive_queue.lock); h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); @@ -654,7 +657,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe status &= ~TP_STATUS_LOSING; spin_unlock(&sk->sk_receive_queue.lock); - skb_copy_bits(skb, 0, (u8*)h + macoff, snaplen); + memcpy((u8*)h + macoff, skb->data, snaplen); h->tp_len = skb->len; h->tp_snaplen = snaplen; diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 08a542855..55564efcc 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -10,6 +10,7 @@ * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi) */ +#include #include #include #include @@ -66,14 +67,6 @@ static struct proto_ops rose_proto_ops; ax25_address rose_callsign; -/* - * ROSE network devices are virtual network devices encapsulating ROSE - * frames into AX.25 which will be sent through an AX.25 device, so form a - * special "super class" of normal net devices; split their locks off into a - * separate class since they always nest. - */ -static struct lock_class_key rose_netdev_xmit_lock_key; - /* * Convert a ROSE address into text. */ @@ -760,7 +753,7 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le rose_insert_socket(sk); /* Finish the bind */ } -rose_try_next_neigh: + rose->dest_addr = addr->srose_addr; rose->dest_call = addr->srose_call; rose->rand = ((long)rose & 0xFFFF) + rose->lci; @@ -818,11 +811,6 @@ rose_try_next_neigh: } if (sk->sk_state != TCP_ESTABLISHED) { - /* Try next neighbour */ - rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic); - if (rose->neighbour) - goto rose_try_next_neigh; - /* No more neighbour */ sock->state = SS_UNCONNECTED; return sock_error(sk); /* Always set at this point */ } @@ -1498,13 +1486,14 @@ static int __init rose_proto_init(void) rose_callsign = null_ax25_address; - dev_rose = kzalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); + dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); if (dev_rose == NULL) { printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); rc = -ENOMEM; goto out_proto_unregister; } + memset(dev_rose, 0x00, rose_ndevs * sizeof(struct net_device*)); for (i = 0; i < rose_ndevs; i++) { struct net_device *dev; char name[IFNAMSIZ]; @@ -1523,7 +1512,6 @@ static int __init rose_proto_init(void) free_netdev(dev); goto fail; } - lockdep_set_class(&dev->_xmit_lock, &rose_netdev_xmit_lock_key); dev_rose[i] = dev; } diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 7c279e265..2a1bf8e11 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c @@ -6,6 +6,7 @@ * * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) */ +#include #include #include #include @@ -59,7 +60,6 @@ static int rose_rebuild_header(struct sk_buff *skb) struct net_device_stats *stats = netdev_priv(dev); unsigned char *bp = (unsigned char *)skb->data; struct sk_buff *skbn; - unsigned int len; #ifdef CONFIG_INET if (arp_find(bp + 7, skb)) { @@ -76,8 +76,6 @@ static int rose_rebuild_header(struct sk_buff *skb) kfree_skb(skb); - len = skbn->len; - if (!rose_route_frame(skbn, NULL)) { kfree_skb(skbn); stats->tx_errors++; @@ -85,7 +83,7 @@ static int rose_rebuild_header(struct sk_buff *skb) } stats->tx_packets++; - stats->tx_bytes += len; + stats->tx_bytes += skbn->len; #endif return 1; } diff --git a/net/rxrpc/call.c b/net/rxrpc/call.c index d07122b57..c4aeb7d40 100644 --- a/net/rxrpc/call.c +++ b/net/rxrpc/call.c @@ -1098,7 +1098,8 @@ static void rxrpc_call_receive_data_packet(struct rxrpc_call *call, call->app_ready_seq = pmsg->seq; call->app_ready_qty += pmsg->dsize; - list_move_tail(&pmsg->link, &call->app_readyq); + list_del_init(&pmsg->link); + list_add_tail(&pmsg->link, &call->app_readyq); } /* see if we've got the last packet yet */ diff --git a/net/rxrpc/connection.c b/net/rxrpc/connection.c index 93d2c55ad..0e0a45534 100644 --- a/net/rxrpc/connection.c +++ b/net/rxrpc/connection.c @@ -58,12 +58,13 @@ static inline int __rxrpc_create_connection(struct rxrpc_peer *peer, _enter("%p",peer); /* allocate and initialise a connection record */ - conn = kzalloc(sizeof(struct rxrpc_connection), GFP_KERNEL); + conn = kmalloc(sizeof(struct rxrpc_connection), GFP_KERNEL); if (!conn) { _leave(" = -ENOMEM"); return -ENOMEM; } + memset(conn, 0, sizeof(struct rxrpc_connection)); atomic_set(&conn->usage, 1); INIT_LIST_HEAD(&conn->link); @@ -401,7 +402,8 @@ void rxrpc_put_connection(struct rxrpc_connection *conn) /* move to graveyard queue */ _debug("burying connection: {%08x}", ntohl(conn->conn_id)); - list_move_tail(&conn->link, &peer->conn_graveyard); + list_del(&conn->link); + list_add_tail(&conn->link, &peer->conn_graveyard); rxrpc_krxtimod_add_timer(&conn->timeout, rxrpc_conn_timeout * HZ); @@ -534,12 +536,13 @@ int rxrpc_conn_newmsg(struct rxrpc_connection *conn, return -EINVAL; } - msg = kzalloc(sizeof(struct rxrpc_message), alloc_flags); + msg = kmalloc(sizeof(struct rxrpc_message), alloc_flags); if (!msg) { _leave(" = -ENOMEM"); return -ENOMEM; } + memset(msg, 0, sizeof(*msg)); atomic_set(&msg->usage, 1); INIT_LIST_HEAD(&msg->link); diff --git a/net/rxrpc/krxsecd.c b/net/rxrpc/krxsecd.c index cea4eb5e2..1aadd026d 100644 --- a/net/rxrpc/krxsecd.c +++ b/net/rxrpc/krxsecd.c @@ -160,7 +160,8 @@ void rxrpc_krxsecd_clear_transport(struct rxrpc_transport *trans) list_for_each_safe(_p, _n, &rxrpc_krxsecd_initmsgq) { msg = list_entry(_p, struct rxrpc_message, link); if (msg->trans == trans) { - list_move_tail(&msg->link, &tmp); + list_del(&msg->link); + list_add_tail(&msg->link, &tmp); atomic_dec(&rxrpc_krxsecd_qcount); } } diff --git a/net/rxrpc/peer.c b/net/rxrpc/peer.c index 8a275157a..ed38f5b17 100644 --- a/net/rxrpc/peer.c +++ b/net/rxrpc/peer.c @@ -58,12 +58,13 @@ static int __rxrpc_create_peer(struct rxrpc_transport *trans, __be32 addr, _enter("%p,%08x", trans, ntohl(addr)); /* allocate and initialise a peer record */ - peer = kzalloc(sizeof(struct rxrpc_peer), GFP_KERNEL); + peer = kmalloc(sizeof(struct rxrpc_peer), GFP_KERNEL); if (!peer) { _leave(" = -ENOMEM"); return -ENOMEM; } + memset(peer, 0, sizeof(struct rxrpc_peer)); atomic_set(&peer->usage, 1); INIT_LIST_HEAD(&peer->link); diff --git a/net/rxrpc/rxrpc_syms.c b/net/rxrpc/rxrpc_syms.c index 9896fd87a..56adf16fe 100644 --- a/net/rxrpc/rxrpc_syms.c +++ b/net/rxrpc/rxrpc_syms.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c index 6374df7e7..fbf98729c 100644 --- a/net/rxrpc/sysctl.c +++ b/net/rxrpc/sysctl.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. */ +#include #include #include #include diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c index 465efc86f..dbe6105e8 100644 --- a/net/rxrpc/transport.c +++ b/net/rxrpc/transport.c @@ -68,10 +68,11 @@ int rxrpc_create_transport(unsigned short port, _enter("%hu", port); - trans = kzalloc(sizeof(struct rxrpc_transport), GFP_KERNEL); + trans = kmalloc(sizeof(struct rxrpc_transport), GFP_KERNEL); if (!trans) return -ENOMEM; + memset(trans, 0, sizeof(struct rxrpc_transport)); atomic_set(&trans->usage, 1); INIT_LIST_HEAD(&trans->services); INIT_LIST_HEAD(&trans->link); @@ -311,12 +312,13 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans, _enter(""); - msg = kzalloc(sizeof(struct rxrpc_message), GFP_KERNEL); + msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL); if (!msg) { _leave(" = -ENOMEM"); return -ENOMEM; } + memset(msg, 0, sizeof(*msg)); atomic_set(&msg->usage, 1); list_add_tail(&msg->link,msgq); diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 8298ea9ff..13eeee582 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig @@ -305,7 +305,7 @@ config NET_CLS_U32 tristate "Universal 32bit comparisons w/ hashing (U32)" select NET_CLS ---help--- - Say Y here to be able to classify packets using a universal + Say Y here to be able to classify packetes using a universal 32bit pieces based comparison scheme. To compile this code as a module, choose M here: the @@ -485,7 +485,7 @@ config NET_ACT_IPT tristate "IPtables targets" depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES ---help--- - Say Y here to be able to invoke iptables targets after successful + Say Y here to be able to invoke iptables targets after succesful classification. To compile this code as a module, choose M here: the @@ -537,8 +537,8 @@ config NET_ESTIMATOR ---help--- Say Y here to allow using rate estimators to estimate the current rate-of-flow for network devices, queues, etc. This module is - automatically selected if needed but can be selected manually for - statistical purposes. + automaticaly selected if needed but can be selected manually for + statstical purposes. endif # NET_SCHED diff --git a/net/sched/act_api.c b/net/sched/act_api.c index a2587b52e..eb7dc2947 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -312,9 +313,10 @@ struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, } *err = -ENOMEM; - a = kzalloc(sizeof(*a), GFP_KERNEL); + a = kmalloc(sizeof(*a), GFP_KERNEL); if (a == NULL) goto err_mod; + memset(a, 0, sizeof(*a)); /* backward compatibility for policer */ if (name == NULL) @@ -491,9 +493,10 @@ tcf_action_get_1(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int *err) index = *(int *)RTA_DATA(tb[TCA_ACT_INDEX - 1]); *err = -ENOMEM; - a = kzalloc(sizeof(struct tc_action), GFP_KERNEL); + a = kmalloc(sizeof(struct tc_action), GFP_KERNEL); if (a == NULL) return NULL; + memset(a, 0, sizeof(struct tc_action)); *err = -EINVAL; a->ops = tc_lookup_action(tb[TCA_ACT_KIND - 1]); @@ -529,11 +532,12 @@ static struct tc_action *create_a(int i) { struct tc_action *act; - act = kzalloc(sizeof(*act), GFP_KERNEL); + act = kmalloc(sizeof(*act), GFP_KERNEL); if (act == NULL) { printk("create_a: failed to alloc!\n"); return NULL; } + memset(act, 0, sizeof(*act)); act->order = i; return act; } @@ -599,8 +603,8 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) return err; rtattr_failure: -nlmsg_failure: module_put(a->ops->owner); +nlmsg_failure: err_out: kfree_skb(skb); kfree(a); @@ -881,6 +885,8 @@ static int __init tc_action_init(void) link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action; } + printk("TC classifier action (bugs to netdev@vger.kernel.org cc " + "hadi@cyberus.ca)\n"); return 0; } diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index a29d0f667..a1e68f78d 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -54,14 +55,14 @@ static DEFINE_RWLOCK(gact_lock); #ifdef CONFIG_GACT_PROB static int gact_net_rand(struct tcf_gact *p) { - if (!p->pval || net_random()%p->pval) + if (net_random()%p->pval) return p->action; return p->paction; } static int gact_determ(struct tcf_gact *p) { - if (!p->pval || p->bstats.packets%p->pval) + if (p->bstats.packets%p->pval) return p->action; return p->paction; } diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index d799e0124..37640c6fc 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index fc562047e..4fcccbd50 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index f257475e0..1742a68e0 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -209,9 +210,10 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) s = sizeof(*opt) + p->nkeys * sizeof(struct tc_pedit_key); /* netlink spinlocks held above us - must use ATOMIC */ - opt = kzalloc(s, GFP_ATOMIC); + opt = kmalloc(s, GFP_ATOMIC); if (opt == NULL) return -ENOBUFS; + memset(opt, 0, s); memcpy(opt->keys, p->keys, p->nkeys * sizeof(struct tc_pedit_key)); opt->index = p->index; diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 930e01047..24c348fa8 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -44,18 +45,6 @@ static struct tcf_police *tcf_police_ht[MY_TAB_SIZE]; /* Policer hash table lock */ static DEFINE_RWLOCK(police_lock); -/* old policer structure from before tc actions */ -struct tc_police_compat -{ - u32 index; - int action; - u32 limit; - u32 burst; - u32 mtu; - struct tc_ratespec rate; - struct tc_ratespec peakrate; -}; - /* Each policer is serialized by its individual spinlock */ static __inline__ unsigned tcf_police_hash(u32 index) @@ -181,15 +170,12 @@ static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, struct tc_police *parm; struct tcf_police *p; struct qdisc_rate_table *R_tab = NULL, *P_tab = NULL; - int size; if (rta == NULL || rtattr_parse_nested(tb, TCA_POLICE_MAX, rta) < 0) return -EINVAL; - if (tb[TCA_POLICE_TBF-1] == NULL) - return -EINVAL; - size = RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]); - if (size != sizeof(*parm) && size != sizeof(struct tc_police_compat)) + if (tb[TCA_POLICE_TBF-1] == NULL || + RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm)) return -EINVAL; parm = RTA_DATA(tb[TCA_POLICE_TBF-1]); @@ -211,9 +197,10 @@ static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, return ret; } - p = kzalloc(sizeof(*p), GFP_KERNEL); + p = kmalloc(sizeof(*p), GFP_KERNEL); if (p == NULL) return -ENOMEM; + memset(p, 0, sizeof(*p)); ret = ACT_P_CREATED; p->refcnt = 1; @@ -428,15 +415,12 @@ struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) struct tcf_police *p; struct rtattr *tb[TCA_POLICE_MAX]; struct tc_police *parm; - int size; if (rtattr_parse_nested(tb, TCA_POLICE_MAX, rta) < 0) return NULL; - if (tb[TCA_POLICE_TBF-1] == NULL) - return NULL; - size = RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]); - if (size != sizeof(*parm) && size != sizeof(struct tc_police_compat)) + if (tb[TCA_POLICE_TBF-1] == NULL || + RTA_PAYLOAD(tb[TCA_POLICE_TBF-1]) != sizeof(*parm)) return NULL; parm = RTA_DATA(tb[TCA_POLICE_TBF-1]); @@ -446,10 +430,11 @@ struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) return p; } - p = kzalloc(sizeof(*p), GFP_KERNEL); + p = kmalloc(sizeof(*p), GFP_KERNEL); if (p == NULL) return NULL; + memset(p, 0, sizeof(*p)); p->refcnt = 1; spin_lock_init(&p->lock); p->stats_lock = &p->lock; diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 17105c825..e5f2e1f43 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 37a184021..b4d89fbb3 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -401,7 +402,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) if ((dev = dev_get_by_index(tcm->tcm_ifindex)) == NULL) return skb->len; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); if (!tcm->tcm_parent) q = dev->qdisc_sleeping; else @@ -458,7 +459,7 @@ errout: if (cl) cops->put(q, cl); out: - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); dev_put(dev); return skb->len; } diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 09fda68c8..dfb300bb6 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c @@ -9,6 +9,7 @@ * Authors: Thomas Graf */ +#include #include #include #include @@ -178,23 +179,25 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, err = -ENOBUFS; if (head == NULL) { - head = kzalloc(sizeof(*head), GFP_KERNEL); + head = kmalloc(sizeof(*head), GFP_KERNEL); if (head == NULL) goto errout; + memset(head, 0, sizeof(*head)); INIT_LIST_HEAD(&head->flist); tp->root = head; } - f = kzalloc(sizeof(*f), GFP_KERNEL); + f = kmalloc(sizeof(*f), GFP_KERNEL); if (f == NULL) goto errout; + memset(f, 0, sizeof(*f)); err = -EINVAL; if (handle) f->handle = handle; else { - unsigned int i = 0x80000000; + int i = 0x80000000; do { if (++head->hgenerator == 0x7FFFFFFF) head->hgenerator = 1; diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index e6973d9b6..75470486e 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -18,6 +18,7 @@ * */ +#include #include #include #include @@ -267,18 +268,20 @@ static int fw_change(struct tcf_proto *tp, unsigned long base, return -EINVAL; if (head == NULL) { - head = kzalloc(sizeof(struct fw_head), GFP_KERNEL); + head = kmalloc(sizeof(struct fw_head), GFP_KERNEL); if (head == NULL) return -ENOBUFS; + memset(head, 0, sizeof(*head)); tcf_tree_lock(tp); tp->root = head; tcf_tree_unlock(tp); } - f = kzalloc(sizeof(struct fw_filter), GFP_KERNEL); + f = kmalloc(sizeof(struct fw_filter), GFP_KERNEL); if (f == NULL) return -ENOBUFS; + memset(f, 0, sizeof(*f)); f->id = handle; diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index d3aea730d..520ff716d 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -396,9 +397,10 @@ static int route4_set_parms(struct tcf_proto *tp, unsigned long base, h1 = to_hash(nhandle); if ((b = head->table[h1]) == NULL) { err = -ENOBUFS; - b = kzalloc(sizeof(struct route4_bucket), GFP_KERNEL); + b = kmalloc(sizeof(struct route4_bucket), GFP_KERNEL); if (b == NULL) goto errout; + memset(b, 0, sizeof(*b)); tcf_tree_lock(tp); head->table[h1] = b; @@ -474,18 +476,20 @@ static int route4_change(struct tcf_proto *tp, unsigned long base, err = -ENOBUFS; if (head == NULL) { - head = kzalloc(sizeof(struct route4_head), GFP_KERNEL); + head = kmalloc(sizeof(struct route4_head), GFP_KERNEL); if (head == NULL) goto errout; + memset(head, 0, sizeof(struct route4_head)); tcf_tree_lock(tp); tp->root = head; tcf_tree_unlock(tp); } - f = kzalloc(sizeof(struct route4_filter), GFP_KERNEL); + f = kmalloc(sizeof(struct route4_filter), GFP_KERNEL); if (f == NULL) goto errout; + memset(f, 0, sizeof(*f)); err = route4_set_parms(tp, base, f, handle, head, tb, tca[TCA_RATE-1], 1); diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 6e230ecfb..572f06be3 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h @@ -65,6 +65,7 @@ Well, as result, despite its simplicity, we get a pretty powerful classification engine. */ +#include struct rsvp_head { @@ -240,8 +241,9 @@ static int rsvp_init(struct tcf_proto *tp) { struct rsvp_head *data; - data = kzalloc(sizeof(struct rsvp_head), GFP_KERNEL); + data = kmalloc(sizeof(struct rsvp_head), GFP_KERNEL); if (data) { + memset(data, 0, sizeof(struct rsvp_head)); tp->root = data; return 0; } @@ -445,10 +447,11 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base, goto errout2; err = -ENOBUFS; - f = kzalloc(sizeof(struct rsvp_filter), GFP_KERNEL); + f = kmalloc(sizeof(struct rsvp_filter), GFP_KERNEL); if (f == NULL) goto errout2; + memset(f, 0, sizeof(*f)); h2 = 16; if (tb[TCA_RSVP_SRC-1]) { err = -EINVAL; @@ -530,9 +533,10 @@ insert: /* No session found. Create new one. */ err = -ENOBUFS; - s = kzalloc(sizeof(struct rsvp_session), GFP_KERNEL); + s = kmalloc(sizeof(struct rsvp_session), GFP_KERNEL); if (s == NULL) goto errout; + memset(s, 0, sizeof(*s)); memcpy(s->dst, dst, sizeof(s->dst)); if (pinfo) { diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index 5af8a59e1..9f921174c 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c @@ -4,6 +4,7 @@ * Written 1998,1999 by Werner Almesberger, EPFL ICA */ +#include #include #include #include @@ -148,10 +149,11 @@ static int tcindex_init(struct tcf_proto *tp) struct tcindex_data *p; DPRINTK("tcindex_init(tp %p)\n",tp); - p = kzalloc(sizeof(struct tcindex_data),GFP_KERNEL); + p = kmalloc(sizeof(struct tcindex_data),GFP_KERNEL); if (!p) return -ENOMEM; + memset(p, 0, sizeof(*p)); p->mask = 0xffff; p->hash = DEFAULT_HASH_SIZE; p->fall_through = 1; @@ -295,14 +297,16 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, err = -ENOMEM; if (!cp.perfect && !cp.h) { if (valid_perfect_hash(&cp)) { - cp.perfect = kcalloc(cp.hash, sizeof(*r), GFP_KERNEL); + cp.perfect = kmalloc(cp.hash * sizeof(*r), GFP_KERNEL); if (!cp.perfect) goto errout; + memset(cp.perfect, 0, cp.hash * sizeof(*r)); balloc = 1; } else { - cp.h = kcalloc(cp.hash, sizeof(f), GFP_KERNEL); + cp.h = kmalloc(cp.hash * sizeof(f), GFP_KERNEL); if (!cp.h) goto errout; + memset(cp.h, 0, cp.hash * sizeof(f)); balloc = 2; } } @@ -313,9 +317,10 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, r = tcindex_lookup(&cp, handle) ? : &new_filter_result; if (r == &new_filter_result) { - f = kzalloc(sizeof(*f), GFP_KERNEL); + f = kmalloc(sizeof(*f), GFP_KERNEL); if (!f) goto errout_alloc; + memset(f, 0, sizeof(*f)); } if (tb[TCA_TCINDEX_CLASSID-1]) { diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 0a6cfa000..78e052591 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -307,21 +308,23 @@ static int u32_init(struct tcf_proto *tp) if (tp_c->q == tp->q) break; - root_ht = kzalloc(sizeof(*root_ht), GFP_KERNEL); + root_ht = kmalloc(sizeof(*root_ht), GFP_KERNEL); if (root_ht == NULL) return -ENOBUFS; + memset(root_ht, 0, sizeof(*root_ht)); root_ht->divisor = 0; root_ht->refcnt++; root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000; root_ht->prio = tp->prio; if (tp_c == NULL) { - tp_c = kzalloc(sizeof(*tp_c), GFP_KERNEL); + tp_c = kmalloc(sizeof(*tp_c), GFP_KERNEL); if (tp_c == NULL) { kfree(root_ht); return -ENOBUFS; } + memset(tp_c, 0, sizeof(*tp_c)); tp_c->q = tp->q; tp_c->next = u32_list; u32_list = tp_c; @@ -569,9 +572,10 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, if (handle == 0) return -ENOMEM; } - ht = kzalloc(sizeof(*ht) + divisor*sizeof(void*), GFP_KERNEL); + ht = kmalloc(sizeof(*ht) + divisor*sizeof(void*), GFP_KERNEL); if (ht == NULL) return -ENOBUFS; + memset(ht, 0, sizeof(*ht) + divisor*sizeof(void*)); ht->tp_c = tp_c; ht->refcnt = 0; ht->divisor = divisor; @@ -614,16 +618,18 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, s = RTA_DATA(tb[TCA_U32_SEL-1]); - n = kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL); + n = kmalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL); if (n == NULL) return -ENOBUFS; + memset(n, 0, sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key)); #ifdef CONFIG_CLS_U32_PERF - n->pf = kzalloc(sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64), GFP_KERNEL); + n->pf = kmalloc(sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64), GFP_KERNEL); if (n->pf == NULL) { kfree(n); return -ENOBUFS; } + memset(n->pf, 0, sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64)); #endif memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key)); @@ -796,7 +802,7 @@ static int __init init_u32(void) { printk("u32 classifier\n"); #ifdef CONFIG_CLS_U32_PERF - printk(" Performance counters on\n"); + printk(" Perfomance counters on\n"); #endif #ifdef CONFIG_NET_CLS_POLICE printk(" OLD policer on \n"); diff --git a/net/sched/em_cmp.c b/net/sched/em_cmp.c index 8ed93c39b..bf1f00f8b 100644 --- a/net/sched/em_cmp.c +++ b/net/sched/em_cmp.c @@ -9,6 +9,7 @@ * Authors: Thomas Graf */ +#include #include #include #include diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 61e3b740a..700844d49 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -58,6 +58,7 @@ * only available if that subsytem is enabled in the kernel. */ +#include #include #include #include @@ -773,9 +774,10 @@ static int em_meta_change(struct tcf_proto *tp, void *data, int len, TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX) goto errout; - meta = kzalloc(sizeof(*meta), GFP_KERNEL); + meta = kmalloc(sizeof(*meta), GFP_KERNEL); if (meta == NULL) goto errout; + memset(meta, 0, sizeof(*meta)); memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left)); memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right)); diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c index cc80babfd..71ea926a9 100644 --- a/net/sched/em_nbyte.c +++ b/net/sched/em_nbyte.c @@ -9,6 +9,7 @@ * Authors: Thomas Graf */ +#include #include #include #include diff --git a/net/sched/em_text.c b/net/sched/em_text.c index aa17d8f7c..77beabc91 100644 --- a/net/sched/em_text.c +++ b/net/sched/em_text.c @@ -9,6 +9,7 @@ * Authors: Thomas Graf */ +#include #include #include #include diff --git a/net/sched/em_u32.c b/net/sched/em_u32.c index e3ddfce0a..34e7e51e6 100644 --- a/net/sched/em_u32.c +++ b/net/sched/em_u32.c @@ -12,6 +12,7 @@ * Based on net/sched/cls_u32.c */ +#include #include #include #include diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 0fd0768a1..5cb956b72 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -81,6 +81,7 @@ * open up a beer to watch the compilation going. */ +#include #include #include #include @@ -321,9 +322,10 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, list_len = RTA_PAYLOAD(rt_list); matches_len = tree_hdr->nmatches * sizeof(*em); - tree->matches = kzalloc(matches_len, GFP_KERNEL); + tree->matches = kmalloc(matches_len, GFP_KERNEL); if (tree->matches == NULL) goto errout; + memset(tree->matches, 0, matches_len); /* We do not use rtattr_parse_nested here because the maximum * number of attributes is unknown. This saves us the allocation diff --git a/net/sched/estimator.c b/net/sched/estimator.c index 0ebc98e9b..5d3ae03e2 100644 --- a/net/sched/estimator.c +++ b/net/sched/estimator.c @@ -139,10 +139,11 @@ int qdisc_new_estimator(struct tc_stats *stats, spinlock_t *stats_lock, struct r if (parm->interval < -2 || parm->interval > 3) return -EINVAL; - est = kzalloc(sizeof(*est), GFP_KERNEL); + est = kmalloc(sizeof(*est), GFP_KERNEL); if (est == NULL) return -ENOBUFS; + memset(est, 0, sizeof(*est)); est->interval = parm->interval + 2; est->stats = stats; est->stats_lock = stats_lock; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 0b6489291..31570b9a6 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -15,6 +15,7 @@ * Jamal Hadi Salim : 990601: ingress support */ +#include #include #include #include @@ -195,14 +196,14 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle) { struct Qdisc *q; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); list_for_each_entry(q, &dev->qdisc_list, list) { if (q->handle == handle) { - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); return q; } } - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); return NULL; } @@ -430,7 +431,7 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp) } #endif - err = -ENOENT; + err = -EINVAL; if (ops == NULL) goto err_out; @@ -837,7 +838,7 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) continue; if (idx > s_idx) s_q_idx = 0; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); q_idx = 0; list_for_each_entry(q, &dev->qdisc_list, list) { if (q_idx < s_q_idx) { @@ -846,12 +847,12 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) } if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); goto done; } q_idx++; } - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); } done: @@ -1074,7 +1075,7 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) s_t = cb->args[0]; t = 0; - read_lock(&qdisc_tree_lock); + read_lock_bh(&qdisc_tree_lock); list_for_each_entry(q, &dev->qdisc_list, list) { if (t < s_t || !q->ops->cl_ops || (tcm->tcm_parent && @@ -1096,7 +1097,7 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) break; t++; } - read_unlock(&qdisc_tree_lock); + read_unlock_bh(&qdisc_tree_lock); cb->args[0] = t; diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index dbf44da09..ac7cb60d1 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -3,6 +3,7 @@ /* Written 1998-2000 by Werner Almesberger, EPFL ICA */ +#include #include #include #include diff --git a/net/sched/sch_blackhole.c b/net/sched/sch_blackhole.c index cb0c456aa..81f0b8346 100644 --- a/net/sched/sch_blackhole.c +++ b/net/sched/sch_blackhole.c @@ -11,6 +11,7 @@ * Note: Quantum tunneling is not supported. */ +#include #include #include #include diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index bac881bfe..6cd81708b 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -1926,9 +1927,10 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t } err = -ENOBUFS; - cl = kzalloc(sizeof(*cl), GFP_KERNEL); + cl = kmalloc(sizeof(*cl), GFP_KERNEL); if (cl == NULL) goto failure; + memset(cl, 0, sizeof(*cl)); cl->R_tab = rtab; rtab = NULL; cl->refcnt = 1; diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 11c8a2119..f6320ca70 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -3,6 +3,7 @@ /* Written 1998-2000 by Werner Almesberger, EPFL ICA */ +#include #include #include #include diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index c2689f4ba..033083bf0 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c @@ -9,6 +9,7 @@ * Authors: Alexey Kuznetsov, */ +#include #include #include #include diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 88c6a99ce..74d4a1dce 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -45,10 +46,11 @@ The idea is the following: - enqueue, dequeue are serialized via top level device spinlock dev->queue_lock. - - tree walking is protected by read_lock(qdisc_tree_lock) + - tree walking is protected by read_lock_bh(qdisc_tree_lock) and this lock is used only in process context. - - updates to tree are made only under rtnl semaphore, - hence this lock may be made without local bh disabling. + - updates to tree are made under rtnl semaphore or + from softirq context (__qdisc_destroy rcu-callback) + hence this lock needs local bh disabling. qdisc_tree_lock must be grabbed BEFORE dev->queue_lock! */ @@ -56,14 +58,14 @@ DEFINE_RWLOCK(qdisc_tree_lock); void qdisc_lock_tree(struct net_device *dev) { - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); spin_lock_bh(&dev->queue_lock); } void qdisc_unlock_tree(struct net_device *dev) { spin_unlock_bh(&dev->queue_lock); - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } /* @@ -237,7 +239,9 @@ void __netdev_watchdog_up(struct net_device *dev) static void dev_watchdog_up(struct net_device *dev) { + netif_tx_lock_bh(dev); __netdev_watchdog_up(dev); + netif_tx_unlock_bh(dev); } static void dev_watchdog_down(struct net_device *dev) @@ -429,9 +433,10 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops) size = QDISC_ALIGN(sizeof(*sch)); size += ops->priv_size + (QDISC_ALIGNTO - 1); - p = kzalloc(size, GFP_KERNEL); + p = kmalloc(size, GFP_KERNEL); if (!p) goto errout; + memset(p, 0, size); sch = (struct Qdisc *) QDISC_ALIGN((unsigned long) p); sch->padded = (char *) sch - (char *) p; @@ -482,6 +487,20 @@ void qdisc_reset(struct Qdisc *qdisc) static void __qdisc_destroy(struct rcu_head *head) { struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu); + struct Qdisc_ops *ops = qdisc->ops; + +#ifdef CONFIG_NET_ESTIMATOR + gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est); +#endif + write_lock(&qdisc_tree_lock); + if (ops->reset) + ops->reset(qdisc); + if (ops->destroy) + ops->destroy(qdisc); + write_unlock(&qdisc_tree_lock); + module_put(ops->owner); + + dev_put(qdisc->dev); kfree((char *) qdisc - qdisc->padded); } @@ -489,23 +508,32 @@ static void __qdisc_destroy(struct rcu_head *head) void qdisc_destroy(struct Qdisc *qdisc) { - struct Qdisc_ops *ops = qdisc->ops; + struct list_head cql = LIST_HEAD_INIT(cql); + struct Qdisc *cq, *q, *n; if (qdisc->flags & TCQ_F_BUILTIN || - !atomic_dec_and_test(&qdisc->refcnt)) + !atomic_dec_and_test(&qdisc->refcnt)) return; - list_del(&qdisc->list); -#ifdef CONFIG_NET_ESTIMATOR - gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est); -#endif - if (ops->reset) - ops->reset(qdisc); - if (ops->destroy) - ops->destroy(qdisc); + if (!list_empty(&qdisc->list)) { + if (qdisc->ops->cl_ops == NULL) + list_del(&qdisc->list); + else + list_move(&qdisc->list, &cql); + } + + /* unlink inner qdiscs from dev->qdisc_list immediately */ + list_for_each_entry(cq, &cql, list) + list_for_each_entry_safe(q, n, &qdisc->dev->qdisc_list, list) + if (TC_H_MAJ(q->parent) == TC_H_MAJ(cq->handle)) { + if (q->ops->cl_ops == NULL) + list_del_init(&q->list); + else + list_move_tail(&q->list, &cql); + } + list_for_each_entry_safe(cq, n, &cql, list) + list_del_init(&cq->list); - module_put(ops->owner); - dev_put(qdisc->dev); call_rcu(&qdisc->q_rcu, __qdisc_destroy); } @@ -525,15 +553,15 @@ void dev_activate(struct net_device *dev) printk(KERN_INFO "%s: activation failed\n", dev->name); return; } - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); list_add_tail(&qdisc->list, &dev->qdisc_list); - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } else { qdisc = &noqueue_qdisc; } - write_lock(&qdisc_tree_lock); + write_lock_bh(&qdisc_tree_lock); dev->qdisc_sleeping = qdisc; - write_unlock(&qdisc_tree_lock); + write_unlock_bh(&qdisc_tree_lock); } if (!netif_carrier_ok(dev)) diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 18e81a8ff..29a2dd9f3 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -18,6 +18,7 @@ * For all the glorious comments look at include/net/red.h */ +#include #include #include #include @@ -406,9 +407,10 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp, struct gred_sched_data *q; if (table->tab[dp] == NULL) { - table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL); + table->tab[dp] = kmalloc(sizeof(*q), GFP_KERNEL); if (table->tab[dp] == NULL) return -ENOMEM; + memset(table->tab[dp], 0, sizeof(*q)); } q = table->tab[dp]; diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 6a6735a2e..f1c7bd29f 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -50,6 +50,7 @@ */ #include +#include #include #include #include @@ -1123,9 +1124,10 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, if (rsc == NULL && fsc == NULL) return -EINVAL; - cl = kzalloc(sizeof(struct hfsc_class), GFP_KERNEL); + cl = kmalloc(sizeof(struct hfsc_class), GFP_KERNEL); if (cl == NULL) return -ENOBUFS; + memset(cl, 0, sizeof(struct hfsc_class)); if (rsc != NULL) hfsc_change_rsc(cl, rsc, 0); diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 880a3394a..3ec95df4a 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -27,6 +27,7 @@ * * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $ */ +#include #include #include #include @@ -196,7 +197,7 @@ struct htb_class struct qdisc_rate_table *rate; /* rate table of the class itself */ struct qdisc_rate_table *ceil; /* ceiling rate (limits borrows too) */ long buffer,cbuffer; /* token bucket depth/rate */ - psched_tdiff_t mbuffer; /* max wait time */ + long mbuffer; /* max wait time */ long tokens,ctokens; /* current number of tokens */ psched_time_t t_c; /* checkpoint time */ }; @@ -1559,9 +1560,10 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, goto failure; } err = -ENOBUFS; - if ((cl = kzalloc(sizeof(*cl), GFP_KERNEL)) == NULL) + if ((cl = kmalloc(sizeof(*cl), GFP_KERNEL)) == NULL) goto failure; + memset(cl, 0, sizeof(*cl)); cl->refcnt = 1; INIT_LIST_HEAD(&cl->sibling); INIT_LIST_HEAD(&cl->hlist); @@ -1600,7 +1602,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, /* set class to be in HTB_CAN_SEND state */ cl->tokens = hopt->buffer; cl->ctokens = hopt->cbuffer; - cl->mbuffer = PSCHED_JIFFIE2US(HZ*60); /* 1min */ + cl->mbuffer = 60000000; /* 1min */ PSCHED_GET_TIME(cl->t_c); cl->cmode = HTB_CAN_SEND; diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index c3242f727..8edc32a6a 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c @@ -7,6 +7,7 @@ * Authors: Jamal Hadi Salim 1999 */ +#include #include #include #include diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index a08ec4c7c..5a4a4d0ae 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -13,6 +13,7 @@ * Catalin(ux aka Dino) BOIE */ +#include #include #include #include @@ -148,8 +149,7 @@ static long tabledist(unsigned long mu, long sigma, static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) { struct netem_sched_data *q = qdisc_priv(sch); - /* We don't fill cb now as skb_unshare() may invalidate it */ - struct netem_skb_cb *cb; + struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; struct sk_buff *skb2; int ret; int count = 1; @@ -201,7 +201,6 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8); } - cb = (struct netem_skb_cb *)skb->cb; if (q->gap == 0 /* not doing reordering */ || q->counter < q->gap /* inside last reordering gap */ || q->reorder < get_crandom(&q->reorder_cor)) { diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index a5fa03c0c..3395ca7bc 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -11,6 +11,7 @@ * Init -- EINVAL when opt undefined */ +#include #include #include #include diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index d65caddde..2be563cba 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c @@ -14,6 +14,7 @@ * J Hadi Salim 980816: ECN support */ +#include #include #include #include diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index d0d6e595a..e057768f6 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -9,6 +9,7 @@ * Authors: Alexey Kuznetsov, */ +#include #include #include #include diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index d9a5d298d..d8e03c74c 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 27329ce9c..9d05e13e9 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -441,8 +441,7 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, /* If the primary path is changing, assume that the * user wants to use this new path. */ - if ((transport->state == SCTP_ACTIVE) || - (transport->state == SCTP_UNKNOWN)) + if (transport->state != SCTP_INACTIVE) asoc->peer.active_path = transport; /* @@ -533,11 +532,11 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, port = addr->v4.sin_port; SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_add_peer:association %p addr: ", - " port: %d state:%d\n", + " port: %d state:%s\n", asoc, addr, addr->v4.sin_port, - peer_state); + peer_state == SCTP_UNKNOWN?"UNKNOWN":"ACTIVE"); /* Set the port if it has not been set yet. */ if (0 == asoc->peer.port) @@ -546,12 +545,9 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, /* Check to see if this is a duplicate. */ peer = sctp_assoc_lookup_paddr(asoc, addr); if (peer) { - if (peer->state == SCTP_UNKNOWN) { - if (peer_state == SCTP_ACTIVE) - peer->state = SCTP_ACTIVE; - if (peer_state == SCTP_UNCONFIRMED) - peer->state = SCTP_UNCONFIRMED; - } + if (peer_state == SCTP_ACTIVE && + peer->state == SCTP_UNKNOWN) + peer->state = SCTP_ACTIVE; return peer; } @@ -743,8 +739,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, list_for_each(pos, &asoc->peer.transport_addr_list) { t = list_entry(pos, struct sctp_transport, transports); - if ((t->state == SCTP_INACTIVE) || - (t->state == SCTP_UNCONFIRMED)) + if (t->state == SCTP_INACTIVE) continue; if (!first || t->last_time_heard > first->last_time_heard) { second = first; @@ -764,8 +759,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, * [If the primary is active but not most recent, bump the most * recently used transport.] */ - if (((asoc->peer.primary_path->state == SCTP_ACTIVE) || - (asoc->peer.primary_path->state == SCTP_UNKNOWN)) && + if (asoc->peer.primary_path->state != SCTP_INACTIVE && first != asoc->peer.primary_path) { second = first; first = asoc->peer.primary_path; @@ -1060,7 +1054,7 @@ void sctp_assoc_update(struct sctp_association *asoc, transports); if (!sctp_assoc_lookup_paddr(asoc, &trans->ipaddr)) sctp_assoc_add_peer(asoc, &trans->ipaddr, - GFP_ATOMIC, trans->state); + GFP_ATOMIC, SCTP_ACTIVE); } asoc->ctsn_ack_point = asoc->next_tsn - 1; @@ -1100,8 +1094,7 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) /* Try to find an active transport. */ - if ((t->state == SCTP_ACTIVE) || - (t->state == SCTP_UNKNOWN)) { + if (t->state != SCTP_INACTIVE) { break; } else { /* Keep track of the next transport in case diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 2b9c12a17..2b962627f 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -146,7 +146,7 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp) /* Add an address to the bind address list in the SCTP_bind_addr structure. */ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, - __u8 use_as_src, gfp_t gfp) + gfp_t gfp) { struct sctp_sockaddr_entry *addr; @@ -163,8 +163,6 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, if (!addr->a.v4.sin_port) addr->a.v4.sin_port = bp->port; - addr->use_as_src = use_as_src; - INIT_LIST_HEAD(&addr->list); list_add_tail(&addr->list, &bp->address_list); SCTP_DBG_OBJCNT_INC(addr); @@ -276,7 +274,7 @@ int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list, } af->from_addr_param(&addr, rawaddr, port, 0); - retval = sctp_add_bind_addr(bp, &addr, 1, gfp); + retval = sctp_add_bind_addr(bp, &addr, gfp); if (retval) { /* Can't finish building the list, clean up. */ sctp_bind_addr_clean(bp); @@ -369,7 +367,7 @@ static int sctp_copy_one_addr(struct sctp_bind_addr *dest, (((AF_INET6 == addr->sa.sa_family) && (flags & SCTP_ADDR6_ALLOWED) && (flags & SCTP_ADDR6_PEERSUPP)))) - error = sctp_add_bind_addr(dest, addr, 1, gfp); + error = sctp_add_bind_addr(dest, addr, gfp); } return error; diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index ffda1d680..67bd53070 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -158,12 +158,6 @@ void sctp_endpoint_add_asoc(struct sctp_endpoint *ep, void sctp_endpoint_free(struct sctp_endpoint *ep) { ep->base.dead = 1; - - ep->base.sk->sk_state = SCTP_SS_CLOSED; - - /* Unlink this endpoint, so we can't find it again! */ - sctp_unhash_endpoint(ep); - sctp_endpoint_put(ep); } @@ -172,6 +166,11 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep) { SCTP_ASSERT(ep->base.dead, "Endpoint is not dead", return); + ep->base.sk->sk_state = SCTP_SS_CLOSED; + + /* Unlink this endpoint, so we can't find it again! */ + sctp_unhash_endpoint(ep); + /* Free up the HMAC transform. */ sctp_crypto_free_tfm(sctp_sk(ep->base.sk)->hmac); diff --git a/net/sctp/input.c b/net/sctp/input.c index 2060bbeb3..70d6606e2 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -135,17 +135,13 @@ int sctp_rcv(struct sk_buff *skb) SCTP_INC_STATS_BH(SCTP_MIB_INSCTPPACKS); - if (skb_linearize(skb)) - goto discard_it; - sh = (struct sctphdr *) skb->h.raw; /* Pull up the IP and SCTP headers. */ __skb_pull(skb, skb->h.raw - skb->data); if (skb->len < sizeof(struct sctphdr)) goto discard_it; - if ((skb->ip_summed != CHECKSUM_UNNECESSARY) && - (sctp_rcv_checksum(skb) < 0)) + if (sctp_rcv_checksum(skb) < 0) goto discard_it; skb_pull(skb, sizeof(struct sctphdr)); diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 99c0cefc0..8ef08070c 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -290,8 +290,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, sctp_read_lock(addr_lock); list_for_each(pos, &bp->address_list) { laddr = list_entry(pos, struct sctp_sockaddr_entry, list); - if ((laddr->use_as_src) && - (laddr->a.sa.sa_family == AF_INET6) && + if ((laddr->a.sa.sa_family == AF_INET6) && (scope <= sctp_scope(&laddr->a))) { bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a); if (!baddr || (matchlen < bmatchlen)) { diff --git a/net/sctp/output.c b/net/sctp/output.c index cdc5a3936..437cba726 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -295,14 +295,14 @@ int sctp_packet_transmit(struct sctp_packet *packet) struct sctp_transport *tp = packet->transport; struct sctp_association *asoc = tp->asoc; struct sctphdr *sh; - __u32 crc32 = 0; + __u32 crc32; struct sk_buff *nskb; struct sctp_chunk *chunk, *tmp; struct sock *sk; int err = 0; int padding; /* How much padding do we need? */ __u8 has_data = 0; - struct dst_entry *dst = tp->dst; + struct dst_entry *dst; SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet); @@ -327,19 +327,6 @@ int sctp_packet_transmit(struct sctp_packet *packet) */ skb_set_owner_w(nskb, sk); - /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ - if (!dst || (dst->obsolete > 1)) { - dst_release(dst); - sctp_transport_route(tp, NULL, sctp_sk(sk)); - if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { - sctp_assoc_sync_pmtu(asoc); - } - } - nskb->dst = dst_clone(tp->dst); - if (!nskb->dst) - goto no_route; - dst = nskb->dst; - /* Build the SCTP header. */ sh = (struct sctphdr *)skb_push(nskb, sizeof(struct sctphdr)); sh->source = htons(packet->source_port); @@ -363,8 +350,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) * Note: Adler-32 is no longer applicable, as has been replaced * by CRC32-C as described in . */ - if (!(dst->dev->features & NETIF_F_NO_CSUM)) - crc32 = sctp_start_cksum((__u8 *)sh, sizeof(struct sctphdr)); + crc32 = sctp_start_cksum((__u8 *)sh, sizeof(struct sctphdr)); /** * 6.10 Bundling @@ -416,14 +402,9 @@ int sctp_packet_transmit(struct sctp_packet *packet) if (padding) memset(skb_put(chunk->skb, padding), 0, padding); - if (dst->dev->features & NETIF_F_NO_CSUM) - memcpy(skb_put(nskb, chunk->skb->len), - chunk->skb->data, chunk->skb->len); - else - crc32 = sctp_update_copy_cksum(skb_put(nskb, - chunk->skb->len), - chunk->skb->data, - chunk->skb->len, crc32); + crc32 = sctp_update_copy_cksum(skb_put(nskb, chunk->skb->len), + chunk->skb->data, + chunk->skb->len, crc32); SCTP_DEBUG_PRINTK("%s %p[%s] %s 0x%x, %s %d, %s %d, %s %d\n", "*** Chunk", chunk, @@ -446,8 +427,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) } /* Perform final transformation on checksum. */ - if (!(dst->dev->features & NETIF_F_NO_CSUM)) - crc32 = sctp_end_cksum(crc32); + crc32 = sctp_end_cksum(crc32); /* 3) Put the resultant value into the checksum field in the * common header, and leave the rest of the bits unchanged. @@ -497,6 +477,20 @@ int sctp_packet_transmit(struct sctp_packet *packet) } } + dst = tp->dst; + /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ + if (!dst || (dst->obsolete > 1)) { + dst_release(dst); + sctp_transport_route(tp, NULL, sctp_sk(sk)); + if (asoc->param_flags & SPP_PMTUD_ENABLE) { + sctp_assoc_sync_pmtu(asoc); + } + } + + nskb->dst = dst_clone(tp->dst); + if (!nskb->dst) + goto no_route; + SCTP_DEBUG_PRINTK("***sctp_transmit_packet*** skb len %d\n", nskb->len); diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 30b710c54..e5faa351a 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -691,8 +691,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) if (!new_transport) { new_transport = asoc->peer.active_path; - } else if ((new_transport->state == SCTP_INACTIVE) || - (new_transport->state == SCTP_UNCONFIRMED)) { + } else if (new_transport->state == SCTP_INACTIVE) { /* If the chunk is Heartbeat or Heartbeat Ack, * send it to chunk->transport, even if it's * inactive. @@ -849,8 +848,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) */ new_transport = chunk->transport; if (!new_transport || - ((new_transport->state == SCTP_INACTIVE) || - (new_transport->state == SCTP_UNCONFIRMED))) + new_transport->state == SCTP_INACTIVE) new_transport = asoc->peer.active_path; /* Change packets if necessary. */ @@ -1466,8 +1464,7 @@ static void sctp_check_transmitted(struct sctp_outq *q, /* Mark the destination transport address as * active if it is not so marked. */ - if ((transport->state == SCTP_INACTIVE) || - (transport->state == SCTP_UNCONFIRMED)) { + if (transport->state == SCTP_INACTIVE) { sctp_assoc_control_transport( transport->asoc, transport, diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 1ab03a27a..816c033d7 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -240,7 +240,7 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, (((AF_INET6 == addr->a.sa.sa_family) && (copy_flags & SCTP_ADDR6_ALLOWED) && (copy_flags & SCTP_ADDR6_PEERSUPP)))) { - error = sctp_add_bind_addr(bp, &addr->a, 1, + error = sctp_add_bind_addr(bp, &addr->a, GFP_ATOMIC); if (error) goto end_copy; @@ -486,8 +486,6 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, list_for_each(pos, &bp->address_list) { laddr = list_entry(pos, struct sctp_sockaddr_entry, list); - if (!laddr->use_as_src) - continue; sctp_v4_dst_saddr(&dst_saddr, dst, bp->port); if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) goto out_unlock; @@ -508,8 +506,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, list_for_each(pos, &bp->address_list) { laddr = list_entry(pos, struct sctp_sockaddr_entry, list); - if ((laddr->use_as_src) && - (AF_INET == laddr->a.sa.sa_family)) { + if (AF_INET == laddr->a.sa.sa_family) { fl.fl4_src = laddr->a.v4.sin_addr.s_addr; if (!ip_route_output_key(&rt, &fl)) { dst = &rt->u.dst; diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 17b509282..b9b907023 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -1390,14 +1390,14 @@ struct sctp_association *sctp_unpack_cookie( sg.length = bodysize; key = (char *)ep->secret_key[ep->current_key]; - memset(digest, 0x00, SCTP_SIGNATURE_SIZE); + memset(digest, 0x00, sizeof(digest)); sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, 1, digest); if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { /* Try the previous key. */ key = (char *)ep->secret_key[ep->last_key]; - memset(digest, 0x00, SCTP_SIGNATURE_SIZE); + memset(digest, 0x00, sizeof(digest)); sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, 1, digest); @@ -1481,7 +1481,7 @@ no_hmac: /* Also, add the destination address. */ if (list_empty(&retval->base.bind_addr.address_list)) { - sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1, + sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, GFP_ATOMIC); } @@ -2005,7 +2005,7 @@ static int sctp_process_param(struct sctp_association *asoc, af->from_addr_param(&addr, param.addr, asoc->peer.port, 0); scope = sctp_scope(peer_addr); if (sctp_in_scope(&addr, scope)) - if (!sctp_assoc_add_peer(asoc, &addr, gfp, SCTP_UNCONFIRMED)) + if (!sctp_assoc_add_peer(asoc, &addr, gfp, SCTP_ACTIVE)) return 0; break; @@ -2406,7 +2406,7 @@ static __u16 sctp_process_asconf_param(struct sctp_association *asoc, * Due to Resource Shortage'. */ - peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_UNCONFIRMED); + peer = sctp_assoc_add_peer(asoc, &addr, GFP_ATOMIC, SCTP_ACTIVE); if (!peer) return SCTP_ERROR_RSRC_LOW; @@ -2553,7 +2553,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, union sctp_addr_param *addr_param; struct list_head *pos; struct sctp_transport *transport; - struct sctp_sockaddr_entry *saddr; int retval = 0; addr_param = (union sctp_addr_param *) @@ -2567,11 +2566,7 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, case SCTP_PARAM_ADD_IP: sctp_local_bh_disable(); sctp_write_lock(&asoc->base.addr_lock); - list_for_each(pos, &bp->address_list) { - saddr = list_entry(pos, struct sctp_sockaddr_entry, list); - if (sctp_cmp_addr_exact(&saddr->a, &addr)) - saddr->use_as_src = 1; - } + retval = sctp_add_bind_addr(bp, &addr, GFP_ATOMIC); sctp_write_unlock(&asoc->base.addr_lock); sctp_local_bh_enable(); break; @@ -2584,7 +2579,6 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, list_for_each(pos, &asoc->peer.transport_addr_list) { transport = list_entry(pos, struct sctp_transport, transports); - dst_release(transport->dst); sctp_transport_route(transport, NULL, sctp_sk(asoc->base.sk)); } diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 9c10bdec1..c5beb2ad7 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -430,11 +430,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc, /* The check for association's overall error counter exceeding the * threshold is done in the state function. */ - /* When probing UNCONFIRMED addresses, the association overall - * error count is NOT incremented - */ - if (transport->state != SCTP_UNCONFIRMED) - asoc->overall_error_count++; + asoc->overall_error_count++; if (transport->state != SCTP_INACTIVE && (transport->error_count++ >= transport->pathmaxrxt)) { @@ -614,7 +610,7 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, /* Mark the destination transport address as active if it is not so * marked. */ - if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED)) + if (t->state == SCTP_INACTIVE) sctp_assoc_control_transport(asoc, t, SCTP_TRANSPORT_UP, SCTP_HEARTBEAT_SUCCESS); @@ -624,10 +620,6 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, */ hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data; sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at)); - - /* Update the heartbeat timer. */ - if (!mod_timer(&t->hb_timer, sctp_transport_timeout(t))) - sctp_transport_hold(t); } /* Helper function to do a transport reset at the expiry of the hearbeat diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5b5ae7958..66e9c5b27 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -846,7 +846,6 @@ static sctp_disposition_t sctp_sf_heartbeat(const struct sctp_endpoint *ep, hbinfo.param_hdr.length = htons(sizeof(sctp_sender_hb_info_t)); hbinfo.daddr = transport->ipaddr; hbinfo.sent_at = jiffies; - hbinfo.hb_nonce = transport->hb_nonce; /* Send a heartbeat to our peer. */ paylen = sizeof(sctp_sender_hb_info_t); @@ -1049,10 +1048,6 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep, return SCTP_DISPOSITION_DISCARD; } - /* Validate the 64-bit random nonce. */ - if (hbinfo->hb_nonce != link->hb_nonce) - return SCTP_DISPOSITION_DISCARD; - max_interval = link->hbinterval + link->rto; /* Check if the timestamp looks valid. */ @@ -5271,6 +5266,7 @@ static int sctp_eat_data(const struct sctp_association *asoc, datalen -= sizeof(sctp_data_chunk_t); deliver = SCTP_CMD_CHUNK_ULP; + chunk->data_accepted = 1; /* Think about partial delivery. */ if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) { @@ -5349,8 +5345,6 @@ static int sctp_eat_data(const struct sctp_association *asoc, if (SCTP_CMD_CHUNK_ULP == deliver) sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn)); - chunk->data_accepted = 1; - /* Note: Some chunks may get overcounted (if we drop) or overcounted * if we renege and the chunk arrives again. */ diff --git a/net/sctp/socket.c b/net/sctp/socket.c index dab159499..5b1c8375c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -57,6 +57,7 @@ * be incorporated into the next SCTP release. */ +#include #include #include #include @@ -369,7 +370,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) /* Use GFP_ATOMIC since BHs are disabled. */ addr->v4.sin_port = ntohs(addr->v4.sin_port); - ret = sctp_add_bind_addr(bp, addr, 1, GFP_ATOMIC); + ret = sctp_add_bind_addr(bp, addr, GFP_ATOMIC); addr->v4.sin_port = htons(addr->v4.sin_port); sctp_write_unlock(&ep->base.addr_lock); sctp_local_bh_enable(); @@ -491,7 +492,6 @@ static int sctp_send_asconf_add_ip(struct sock *sk, struct sctp_chunk *chunk; struct sctp_sockaddr_entry *laddr; union sctp_addr *addr; - union sctp_addr saveaddr; void *addr_buf; struct sctp_af *af; struct list_head *pos; @@ -559,26 +559,14 @@ static int sctp_send_asconf_add_ip(struct sock *sk, } retval = sctp_send_asconf(asoc, chunk); - if (retval) - goto out; - /* Add the new addresses to the bind address list with - * use_as_src set to 0. + /* FIXME: After sending the add address ASCONF chunk, we + * cannot append the address to the association's binding + * address list, because the new address may be used as the + * source of a message sent to the peer before the ASCONF + * chunk is received by the peer. So we should wait until + * ASCONF_ACK is received. */ - sctp_local_bh_disable(); - sctp_write_lock(&asoc->base.addr_lock); - addr_buf = addrs; - for (i = 0; i < addrcnt; i++) { - addr = (union sctp_addr *)addr_buf; - af = sctp_get_af_specific(addr->v4.sin_family); - memcpy(&saveaddr, addr, af->sockaddr_len); - saveaddr.v4.sin_port = ntohs(saveaddr.v4.sin_port); - retval = sctp_add_bind_addr(bp, &saveaddr, 0, - GFP_ATOMIC); - addr_buf += af->sockaddr_len; - } - sctp_write_unlock(&asoc->base.addr_lock); - sctp_local_bh_enable(); } out: @@ -689,15 +677,12 @@ static int sctp_send_asconf_del_ip(struct sock *sk, struct sctp_sock *sp; struct sctp_endpoint *ep; struct sctp_association *asoc; - struct sctp_transport *transport; struct sctp_bind_addr *bp; struct sctp_chunk *chunk; union sctp_addr *laddr; - union sctp_addr saveaddr; void *addr_buf; struct sctp_af *af; - struct list_head *pos, *pos1; - struct sctp_sockaddr_entry *saddr; + struct list_head *pos; int i; int retval = 0; @@ -764,42 +749,14 @@ static int sctp_send_asconf_del_ip(struct sock *sk, goto out; } - /* Reset use_as_src flag for the addresses in the bind address - * list that are to be deleted. - */ - sctp_local_bh_disable(); - sctp_write_lock(&asoc->base.addr_lock); - addr_buf = addrs; - for (i = 0; i < addrcnt; i++) { - laddr = (union sctp_addr *)addr_buf; - af = sctp_get_af_specific(laddr->v4.sin_family); - memcpy(&saveaddr, laddr, af->sockaddr_len); - saveaddr.v4.sin_port = ntohs(saveaddr.v4.sin_port); - list_for_each(pos1, &bp->address_list) { - saddr = list_entry(pos1, - struct sctp_sockaddr_entry, - list); - if (sctp_cmp_addr_exact(&saddr->a, &saveaddr)) - saddr->use_as_src = 0; - } - addr_buf += af->sockaddr_len; - } - sctp_write_unlock(&asoc->base.addr_lock); - sctp_local_bh_enable(); + retval = sctp_send_asconf(asoc, chunk); - /* Update the route and saddr entries for all the transports - * as some of the addresses in the bind address list are - * about to be deleted and cannot be used as source addresses. + /* FIXME: After sending the delete address ASCONF chunk, we + * cannot remove the addresses from the association's bind + * address list, because there maybe some packet send to + * the delete addresses, so we should wait until ASCONF_ACK + * packet is received. */ - list_for_each(pos1, &asoc->peer.transport_addr_list) { - transport = list_entry(pos1, struct sctp_transport, - transports); - dst_release(transport->dst); - sctp_transport_route(transport, NULL, - sctp_sk(asoc->base.sk)); - } - - retval = sctp_send_asconf(asoc, chunk); } out: return retval; @@ -5033,7 +4990,7 @@ static struct sctp_bind_bucket *sctp_bucket_create( /* Caller must hold hashbucket lock for this tb with local BH disabled */ static void sctp_bucket_destroy(struct sctp_bind_bucket *pp) { - if (pp && hlist_empty(&pp->owner)) { + if (hlist_empty(&pp->owner)) { if (pp->next) pp->next->pprev = pp->pprev; *(pp->pprev) = pp->next; diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 2763aa93d..160f62ad1 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c @@ -49,7 +49,6 @@ */ #include -#include #include #include @@ -86,6 +85,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, peer->init_sent_count = 0; + peer->state = SCTP_ACTIVE; peer->param_flags = SPP_HB_DISABLE | SPP_PMTUD_ENABLE | SPP_SACKDELAY_ENABLE; @@ -109,9 +109,6 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, peer->hb_timer.function = sctp_generate_heartbeat_event; peer->hb_timer.data = (unsigned long)peer; - /* Initialize the 64-bit random nonce sent with heartbeat. */ - get_random_bytes(&peer->hb_nonce, sizeof(peer->hb_nonce)); - atomic_set(&peer->refcnt, 1); peer->dead = 0; @@ -520,9 +517,7 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport, unsigned long sctp_transport_timeout(struct sctp_transport *t) { unsigned long timeout; - timeout = t->rto + sctp_jitter(t->rto); - if (t->state != SCTP_UNCONFIRMED) - timeout += t->hbinterval; + timeout = t->hbinterval + t->rto + sctp_jitter(t->rto); timeout += jiffies; return timeout; } diff --git a/net/socket.c b/net/socket.c index 3ca7c864c..e2e3d9b02 100644 --- a/net/socket.c +++ b/net/socket.c @@ -58,6 +58,7 @@ * Based upon Swansea University Computer Society NET3.039 */ +#include #include #include #include @@ -336,11 +337,10 @@ static struct super_operations sockfs_ops = { .statfs = simple_statfs, }; -static int sockfs_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) +static struct super_block *sockfs_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_pseudo(fs_type, "socket:", &sockfs_ops, SOCKFS_MAGIC, - mnt); + return get_sb_pseudo(fs_type, "socket:", &sockfs_ops, SOCKFS_MAGIC); } static struct vfsmount *sock_mnt __read_mostly; @@ -1212,8 +1212,7 @@ static int __sock_create(int family, int type, int protocol, struct socket **res */ if (!(sock = sock_alloc())) { - if (net_ratelimit()) - printk(KERN_WARNING "socket: no more sockets\n"); + printk(KERN_WARNING "socket: no more sockets\n"); err = -ENFILE; /* Not exactly a match, but its the closest posix thing */ goto out; @@ -1267,13 +1266,7 @@ int sock_create(int family, int type, int protocol, struct socket **res) int sock_create_kern(int family, int type, int protocol, struct socket **res) { - static struct lock_class_key sk_lock_internal_key; - int ret; - ret = __sock_create(family, type, protocol, res, 1); - if (!ret) - lockdep_set_class(&(*res)->sk->sk_lock.slock, - &sk_lock_internal_key); - return ret; + return __sock_create(family, type, protocol, res, 1); } asmlinkage long sys_socket(int family, int type, int protocol) diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index ef1cf5b47..519ebc17c 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -225,8 +225,9 @@ gss_alloc_context(void) { struct gss_cl_ctx *ctx; - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); + ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); if (ctx != NULL) { + memset(ctx, 0, sizeof(*ctx)); ctx->gc_proc = RPC_GSS_PROC_DATA; ctx->gc_seq = 1; /* NetApp 6.4R1 doesn't accept seq. no. 0 */ spin_lock_init(&ctx->gc_seq_lock); @@ -390,8 +391,9 @@ gss_alloc_msg(struct gss_auth *gss_auth, uid_t uid) { struct gss_upcall_msg *gss_msg; - gss_msg = kzalloc(sizeof(*gss_msg), GFP_KERNEL); + gss_msg = kmalloc(sizeof(*gss_msg), GFP_KERNEL); if (gss_msg != NULL) { + memset(gss_msg, 0, sizeof(*gss_msg)); INIT_LIST_HEAD(&gss_msg->list); rpc_init_wait_queue(&gss_msg->rpc_waitqueue, "RPCSEC_GSS upcall waitq"); init_waitqueue_head(&gss_msg->waitqueue); @@ -718,7 +720,8 @@ gss_destroy(struct rpc_auth *auth) auth, auth->au_flavor); gss_auth = container_of(auth, struct gss_auth, rpc_auth); - rpc_unlink(gss_auth->dentry); + rpc_unlink(gss_auth->path); + dput(gss_auth->dentry); gss_auth->dentry = NULL; gss_mech_put(gss_auth->mech); @@ -773,9 +776,10 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) dprintk("RPC: gss_create_cred for uid %d, flavor %d\n", acred->uid, auth->au_flavor); - if (!(cred = kzalloc(sizeof(*cred), GFP_KERNEL))) + if (!(cred = kmalloc(sizeof(*cred), GFP_KERNEL))) goto out_err; + memset(cred, 0, sizeof(*cred)); atomic_set(&cred->gc_count, 1); cred->gc_uid = acred->uid; /* diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index 70e1e53a6..129e2bd36 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c @@ -129,8 +129,9 @@ gss_import_sec_context_kerberos(const void *p, const void *end = (const void *)((const char *)p + len); struct krb5_ctx *ctx; - if (!(ctx = kzalloc(sizeof(*ctx), GFP_KERNEL))) + if (!(ctx = kmalloc(sizeof(*ctx), GFP_KERNEL))) goto out_err; + memset(ctx, 0, sizeof(*ctx)); p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate)); if (IS_ERR(p)) @@ -168,7 +169,7 @@ gss_import_sec_context_kerberos(const void *p, } ctx_id->internal_ctx_id = ctx; - dprintk("RPC: Successfully imported new context.\n"); + dprintk("RPC: Succesfully imported new context.\n"); return 0; out_err_free_key2: diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index 2f312164d..f43311221 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c @@ -70,7 +70,7 @@ # define RPCDBG_FACILITY RPCDBG_AUTH #endif -DEFINE_SPINLOCK(krb5_seq_lock); +spinlock_t krb5_seq_lock = SPIN_LOCK_UNLOCKED; u32 gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text, diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 3db745379..f8bac6ccd 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c @@ -224,8 +224,7 @@ EXPORT_SYMBOL(gss_service_to_auth_domain_name); void gss_mech_put(struct gss_api_mech * gm) { - if (gm) - module_put(gm->gm_owner); + module_put(gm->gm_owner); } EXPORT_SYMBOL(gss_mech_put); @@ -237,8 +236,9 @@ gss_import_sec_context(const void *input_token, size_t bufsize, struct gss_api_mech *mech, struct gss_ctx **ctx_id) { - if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL))) + if (!(*ctx_id = kmalloc(sizeof(**ctx_id), GFP_KERNEL))) return GSS_S_FAILURE; + memset(*ctx_id, 0, sizeof(**ctx_id)); (*ctx_id)->mech_type = gss_mech_get(mech); return mech->gm_ops @@ -307,7 +307,8 @@ gss_delete_sec_context(struct gss_ctx **context_handle) (*context_handle)->mech_type->gm_ops ->gss_delete_sec_context((*context_handle) ->internal_ctx_id); - gss_mech_put((*context_handle)->mech_type); + if ((*context_handle)->mech_type) + gss_mech_put((*context_handle)->mech_type); kfree(*context_handle); *context_handle=NULL; return GSS_S_COMPLETE; diff --git a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c index 88dcb52d1..5bf11ccba 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_mech.c +++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c @@ -152,8 +152,9 @@ gss_import_sec_context_spkm3(const void *p, size_t len, const void *end = (const void *)((const char *)p + len); struct spkm3_ctx *ctx; - if (!(ctx = kzalloc(sizeof(*ctx), GFP_KERNEL))) + if (!(ctx = kmalloc(sizeof(*ctx), GFP_KERNEL))) goto out_err; + memset(ctx, 0, sizeof(*ctx)); p = simple_get_netobj(p, end, &ctx->ctx_id); if (IS_ERR(p)) @@ -200,7 +201,7 @@ gss_import_sec_context_spkm3(const void *p, size_t len, ctx_id->internal_ctx_id = ctx; - dprintk("Successfully imported new spkm context.\n"); + dprintk("Succesfully imported new spkm context.\n"); return 0; out_err_free_key2: diff --git a/net/sunrpc/auth_gss/gss_spkm3_token.c b/net/sunrpc/auth_gss/gss_spkm3_token.c index 854a983cc..af0d7ce74 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_token.c +++ b/net/sunrpc/auth_gss/gss_spkm3_token.c @@ -90,9 +90,10 @@ asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits) int decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, int explen) { - if (!(out->data = kzalloc(explen,GFP_KERNEL))) + if (!(out->data = kmalloc(explen,GFP_KERNEL))) return 0; out->len = explen; + memset(out->data, 0, explen); memcpy(out->data, in, enclen); return 1; } diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 94217ec9e..d51e316c5 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -425,7 +425,6 @@ static int rsc_parse(struct cache_detail *cd, struct rsc rsci, *rscp = NULL; time_t expiry; int status = -EINVAL; - struct gss_api_mech *gm = NULL; memset(&rsci, 0, sizeof(rsci)); /* context handle */ @@ -454,6 +453,7 @@ static int rsc_parse(struct cache_detail *cd, set_bit(CACHE_NEGATIVE, &rsci.h.flags); else { int N, i; + struct gss_api_mech *gm; /* gid */ if (get_int(&mesg, &rsci.cred.cr_gid)) @@ -488,17 +488,21 @@ static int rsc_parse(struct cache_detail *cd, status = -EINVAL; /* mech-specific data: */ len = qword_get(&mesg, buf, mlen); - if (len < 0) + if (len < 0) { + gss_mech_put(gm); goto out; + } status = gss_import_sec_context(buf, len, gm, &rsci.mechctx); - if (status) + if (status) { + gss_mech_put(gm); goto out; + } + gss_mech_put(gm); } rsci.h.expiry_time = expiry; rscp = rsc_update(&rsci, rscp); status = 0; out: - gss_mech_put(gm); rsc_free(&rsci); if (rscp) cache_put(&rscp->h, &rsc_cache); @@ -832,74 +836,6 @@ out: return stat; } -static inline int -total_buf_len(struct xdr_buf *buf) -{ - return buf->head[0].iov_len + buf->page_len + buf->tail[0].iov_len; -} - -static void -fix_priv_head(struct xdr_buf *buf, int pad) -{ - if (buf->page_len == 0) { - /* We need to adjust head and buf->len in tandem in this - * case to make svc_defer() work--it finds the original - * buffer start using buf->len - buf->head[0].iov_len. */ - buf->head[0].iov_len -= pad; - } -} - -static int -unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) -{ - u32 priv_len, maj_stat; - int pad, saved_len, remaining_len, offset; - - rqstp->rq_sendfile_ok = 0; - - priv_len = ntohl(svc_getu32(&buf->head[0])); - if (rqstp->rq_deferred) { - /* Already decrypted last time through! The sequence number - * check at out_seq is unnecessary but harmless: */ - goto out_seq; - } - /* buf->len is the number of bytes from the original start of the - * request to the end, where head[0].iov_len is just the bytes - * not yet read from the head, so these two values are different: */ - remaining_len = total_buf_len(buf); - if (priv_len > remaining_len) - return -EINVAL; - pad = remaining_len - priv_len; - buf->len -= pad; - fix_priv_head(buf, pad); - - /* Maybe it would be better to give gss_unwrap a length parameter: */ - saved_len = buf->len; - buf->len = priv_len; - maj_stat = gss_unwrap(ctx, 0, buf); - pad = priv_len - buf->len; - buf->len = saved_len; - buf->len -= pad; - /* The upper layers assume the buffer is aligned on 4-byte boundaries. - * In the krb5p case, at least, the data ends up offset, so we need to - * move it around. */ - /* XXX: This is very inefficient. It would be better to either do - * this while we encrypt, or maybe in the receive code, if we can peak - * ahead and work out the service and mechanism there. */ - offset = buf->head[0].iov_len % 4; - if (offset) { - buf->buflen = RPCSVC_MAXPAYLOAD; - xdr_shift_buf(buf, offset); - fix_priv_head(buf, pad); - } - if (maj_stat != GSS_S_COMPLETE) - return -EINVAL; -out_seq: - if (ntohl(svc_getu32(&buf->head[0])) != seq) - return -EINVAL; - return 0; -} - struct gss_svc_data { /* decoded gss client cred: */ struct rpc_gss_wire_cred clcred; @@ -1115,14 +1051,7 @@ svcauth_gss_accept(struct svc_rqst *rqstp, u32 *authp) svc_putu32(resv, 0); break; case RPC_GSS_SVC_PRIVACY: - if (unwrap_priv_data(rqstp, &rqstp->rq_arg, - gc->gc_seq, rsci->mechctx)) - goto auth_err; - /* placeholders for length and seq. number: */ - svcdata->body_start = resv->iov_base + resv->iov_len; - svc_putu32(resv, 0); - svc_putu32(resv, 0); - break; + /* currently unsupported */ default: goto auth_err; } @@ -1147,8 +1076,8 @@ out: return ret; } -static inline int -svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) +static int +svcauth_gss_release(struct svc_rqst *rqstp) { struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; struct rpc_gss_wire_cred *gc = &gsd->clcred; @@ -1160,147 +1089,69 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) int integ_offset, integ_len; int stat = -EINVAL; - p = gsd->body_start; - gsd->body_start = NULL; - /* move accept_stat to right place: */ - memcpy(p, p + 2, 4); - /* Don't wrap in failure case: */ - /* Counting on not getting here if call was not even accepted! */ - if (*p != rpc_success) { - resbuf->head[0].iov_len -= 2 * 4; - goto out; - } - p++; - integ_offset = (u8 *)(p + 1) - (u8 *)resbuf->head[0].iov_base; - integ_len = resbuf->len - integ_offset; - BUG_ON(integ_len % 4); - *p++ = htonl(integ_len); - *p++ = htonl(gc->gc_seq); - if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, - integ_len)) - BUG(); - if (resbuf->page_len == 0 - && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE - < PAGE_SIZE) { - BUG_ON(resbuf->tail[0].iov_len); - /* Use head for everything */ - resv = &resbuf->head[0]; - } else if (resbuf->tail[0].iov_base == NULL) { - if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE > PAGE_SIZE) - goto out_err; - resbuf->tail[0].iov_base = resbuf->head[0].iov_base - + resbuf->head[0].iov_len; - resbuf->tail[0].iov_len = 0; - rqstp->rq_restailpage = 0; - resv = &resbuf->tail[0]; - } else { - resv = &resbuf->tail[0]; - } - mic.data = (u8 *)resv->iov_base + resv->iov_len + 4; - if (gss_get_mic(gsd->rsci->mechctx, &integ_buf, &mic)) - goto out_err; - svc_putu32(resv, htonl(mic.len)); - memset(mic.data + mic.len, 0, - round_up_to_quad(mic.len) - mic.len); - resv->iov_len += XDR_QUADLEN(mic.len) << 2; - /* not strictly required: */ - resbuf->len += XDR_QUADLEN(mic.len) << 2; - BUG_ON(resv->iov_len > PAGE_SIZE); -out: - stat = 0; -out_err: - return stat; -} - -static inline int -svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp) -{ - struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; - struct rpc_gss_wire_cred *gc = &gsd->clcred; - struct xdr_buf *resbuf = &rqstp->rq_res; - struct page **inpages = NULL; - u32 *p; - int offset, *len; - int pad; - - p = gsd->body_start; - gsd->body_start = NULL; - /* move accept_stat to right place: */ - memcpy(p, p + 2, 4); - /* Don't wrap in failure case: */ - /* Counting on not getting here if call was not even accepted! */ - if (*p != rpc_success) { - resbuf->head[0].iov_len -= 2 * 4; - return 0; - } - p++; - len = p++; - offset = (u8 *)p - (u8 *)resbuf->head[0].iov_base; - *p++ = htonl(gc->gc_seq); - inpages = resbuf->pages; - /* XXX: Would be better to write some xdr helper functions for - * nfs{2,3,4}xdr.c that place the data right, instead of copying: */ - if (resbuf->tail[0].iov_base && rqstp->rq_restailpage == 0) { - BUG_ON(resbuf->tail[0].iov_base >= resbuf->head[0].iov_base - + PAGE_SIZE); - BUG_ON(resbuf->tail[0].iov_base < resbuf->head[0].iov_base); - if (resbuf->tail[0].iov_len + resbuf->head[0].iov_len - + 2 * RPC_MAX_AUTH_SIZE > PAGE_SIZE) - return -ENOMEM; - memmove(resbuf->tail[0].iov_base + RPC_MAX_AUTH_SIZE, - resbuf->tail[0].iov_base, - resbuf->tail[0].iov_len); - resbuf->tail[0].iov_base += RPC_MAX_AUTH_SIZE; - } - if (resbuf->tail[0].iov_base == NULL) { - if (resbuf->head[0].iov_len + 2*RPC_MAX_AUTH_SIZE > PAGE_SIZE) - return -ENOMEM; - resbuf->tail[0].iov_base = resbuf->head[0].iov_base - + resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE; - resbuf->tail[0].iov_len = 0; - rqstp->rq_restailpage = 0; - } - if (gss_wrap(gsd->rsci->mechctx, offset, resbuf, inpages)) - return -ENOMEM; - *len = htonl(resbuf->len - offset); - pad = 3 - ((resbuf->len - offset - 1)&3); - p = (u32 *)(resbuf->tail[0].iov_base + resbuf->tail[0].iov_len); - memset(p, 0, pad); - resbuf->tail[0].iov_len += pad; - resbuf->len += pad; - return 0; -} - -static int -svcauth_gss_release(struct svc_rqst *rqstp) -{ - struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; - struct rpc_gss_wire_cred *gc = &gsd->clcred; - struct xdr_buf *resbuf = &rqstp->rq_res; - int stat = -EINVAL; - if (gc->gc_proc != RPC_GSS_PROC_DATA) goto out; /* Release can be called twice, but we only wrap once. */ if (gsd->body_start == NULL) goto out; /* normally not set till svc_send, but we need it here: */ - /* XXX: what for? Do we mess it up the moment we call svc_putu32 - * or whatever? */ - resbuf->len = total_buf_len(resbuf); + resbuf->len = resbuf->head[0].iov_len + + resbuf->page_len + resbuf->tail[0].iov_len; switch (gc->gc_svc) { case RPC_GSS_SVC_NONE: break; case RPC_GSS_SVC_INTEGRITY: - stat = svcauth_gss_wrap_resp_integ(rqstp); - if (stat) + p = gsd->body_start; + gsd->body_start = NULL; + /* move accept_stat to right place: */ + memcpy(p, p + 2, 4); + /* don't wrap in failure case: */ + /* Note: counting on not getting here if call was not even + * accepted! */ + if (*p != rpc_success) { + resbuf->head[0].iov_len -= 2 * 4; + goto out; + } + p++; + integ_offset = (u8 *)(p + 1) - (u8 *)resbuf->head[0].iov_base; + integ_len = resbuf->len - integ_offset; + BUG_ON(integ_len % 4); + *p++ = htonl(integ_len); + *p++ = htonl(gc->gc_seq); + if (xdr_buf_subsegment(resbuf, &integ_buf, integ_offset, + integ_len)) + BUG(); + if (resbuf->page_len == 0 + && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE + < PAGE_SIZE) { + BUG_ON(resbuf->tail[0].iov_len); + /* Use head for everything */ + resv = &resbuf->head[0]; + } else if (resbuf->tail[0].iov_base == NULL) { + if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE + > PAGE_SIZE) + goto out_err; + resbuf->tail[0].iov_base = + resbuf->head[0].iov_base + + resbuf->head[0].iov_len; + resbuf->tail[0].iov_len = 0; + rqstp->rq_restailpage = 0; + resv = &resbuf->tail[0]; + } else { + resv = &resbuf->tail[0]; + } + mic.data = (u8 *)resv->iov_base + resv->iov_len + 4; + if (gss_get_mic(gsd->rsci->mechctx, &integ_buf, &mic)) goto out_err; + svc_putu32(resv, htonl(mic.len)); + memset(mic.data + mic.len, 0, + round_up_to_quad(mic.len) - mic.len); + resv->iov_len += XDR_QUADLEN(mic.len) << 2; + /* not strictly required: */ + resbuf->len += XDR_QUADLEN(mic.len) << 2; + BUG_ON(resv->iov_len > PAGE_SIZE); break; case RPC_GSS_SVC_PRIVACY: - stat = svcauth_gss_wrap_resp_priv(rqstp); - if (stat) - goto out_err; - break; default: goto out_err; } diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 2eccffa96..f56767aaa 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c @@ -118,8 +118,6 @@ struct rpc_auth null_auth = { .au_cslack = 4, .au_rslack = 2, .au_ops = &authnull_ops, - .au_flavor = RPC_AUTH_NULL, - .au_count = ATOMIC_INIT(0), }; static diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 0268e0a2b..c286ae4a7 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c @@ -234,7 +234,6 @@ struct rpc_auth unix_auth = { .au_cslack = UNX_WRITESLACK, .au_rslack = 2, /* assume AUTH_NULL verf */ .au_ops = &authunix_ops, - .au_flavor = RPC_AUTH_UNIX, .au_count = ATOMIC_INIT(0), .au_credcache = &unix_cred_cache, }; diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 3e19d3210..aa8965e9d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -125,9 +125,10 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, goto out_err; err = -ENOMEM; - clnt = kzalloc(sizeof(*clnt), GFP_KERNEL); + clnt = kmalloc(sizeof(*clnt), GFP_KERNEL); if (!clnt) goto out_err; + memset(clnt, 0, sizeof(*clnt)); atomic_set(&clnt->cl_users, 0); atomic_set(&clnt->cl_count, 1); clnt->cl_parent = clnt; @@ -183,7 +184,8 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, out_no_auth: if (!IS_ERR(clnt->cl_dentry)) { - rpc_rmdir(clnt->cl_dentry); + rpc_rmdir(clnt->cl_pathname); + dput(clnt->cl_dentry); rpc_put_mount(); } out_no_path: @@ -250,8 +252,10 @@ rpc_clone_client(struct rpc_clnt *clnt) new->cl_autobind = 0; new->cl_oneshot = 0; new->cl_dead = 0; - if (!IS_ERR(new->cl_dentry)) + if (!IS_ERR(new->cl_dentry)) { dget(new->cl_dentry); + rpc_get_mount(); + } rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); if (new->cl_auth) atomic_inc(&new->cl_auth->au_count); @@ -314,15 +318,11 @@ rpc_destroy_client(struct rpc_clnt *clnt) clnt->cl_auth = NULL; } if (clnt->cl_parent != clnt) { - if (!IS_ERR(clnt->cl_dentry)) - dput(clnt->cl_dentry); rpc_destroy_client(clnt->cl_parent); goto out_free; } - if (!IS_ERR(clnt->cl_dentry)) { - rpc_rmdir(clnt->cl_dentry); - rpc_put_mount(); - } + if (clnt->cl_pathname[0]) + rpc_rmdir(clnt->cl_pathname); if (clnt->cl_xprt) { xprt_destroy(clnt->cl_xprt); clnt->cl_xprt = NULL; @@ -332,6 +332,10 @@ rpc_destroy_client(struct rpc_clnt *clnt) out_free: rpc_free_iostats(clnt->cl_metrics); clnt->cl_metrics = NULL; + if (!IS_ERR(clnt->cl_dentry)) { + dput(clnt->cl_dentry); + rpc_put_mount(); + } kfree(clnt); return 0; } @@ -918,43 +922,26 @@ call_transmit(struct rpc_task *task) task->tk_status = xprt_prepare_transmit(task); if (task->tk_status != 0) return; - task->tk_action = call_transmit_status; /* Encode here so that rpcsec_gss can use correct sequence number. */ if (rpc_task_need_encode(task)) { - BUG_ON(task->tk_rqstp->rq_bytes_sent != 0); + task->tk_rqstp->rq_bytes_sent = 0; call_encode(task); /* Did the encode result in an error condition? */ if (task->tk_status != 0) - return; + goto out_nosend; } + task->tk_action = call_transmit_status; xprt_transmit(task); if (task->tk_status < 0) return; - /* - * On success, ensure that we call xprt_end_transmit() before sleeping - * in order to allow access to the socket to other RPC requests. - */ - call_transmit_status(task); - if (task->tk_msg.rpc_proc->p_decode != NULL) - return; - task->tk_action = rpc_exit_task; - rpc_wake_up_task(task); -} - -/* - * 5a. Handle cleanup after a transmission - */ -static void -call_transmit_status(struct rpc_task *task) -{ - task->tk_action = call_status; - /* - * Special case: if we've been waiting on the socket's write_space() - * callback, then don't call xprt_end_transmit(). - */ - if (task->tk_status == -EAGAIN) - return; - xprt_end_transmit(task); + if (!task->tk_msg.rpc_proc->p_decode) { + task->tk_action = rpc_exit_task; + rpc_wake_up_task(task); + } + return; +out_nosend: + /* release socket write lock before attempting to handle error */ + xprt_abort_transmit(task); rpc_task_force_reencode(task); } @@ -1006,7 +993,18 @@ call_status(struct rpc_task *task) } /* - * 6a. Handle RPC timeout + * 6a. Handle transmission errors. + */ +static void +call_transmit_status(struct rpc_task *task) +{ + if (task->tk_status != -EAGAIN) + rpc_task_force_reencode(task); + call_status(task); +} + +/* + * 6b. Handle RPC timeout * We do not release the request slot, so we keep using the * same XID for all retransmits. */ @@ -1181,17 +1179,6 @@ call_verify(struct rpc_task *task) u32 *p = iov->iov_base, n; int error = -EACCES; - if ((task->tk_rqstp->rq_rcv_buf.len & 3) != 0) { - /* RFC-1014 says that the representation of XDR data must be a - * multiple of four bytes - * - if it isn't pointer subtraction in the NFS client may give - * undefined results - */ - printk(KERN_WARNING - "call_verify: XDR representation not a multiple of" - " 4 bytes: 0x%x\n", task->tk_rqstp->rq_rcv_buf.len); - goto out_eio; - } if ((len -= 3) < 0) goto out_overflow; p += 1; /* skip XID */ diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index 623180f22..d25b054ec 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c @@ -6,6 +6,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 0573df512..cc673dd84 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -8,6 +8,7 @@ * Copyright (c) 2002, Trond Myklebust * */ +#include #include #include #include @@ -438,7 +439,7 @@ struct vfsmount *rpc_get_mount(void) { int err; - err = simple_pin_fs(&rpc_pipe_fs_type, &rpc_mount, &rpc_mount_count); + err = simple_pin_fs("rpc_pipefs", &rpc_mount, &rpc_mount_count); if (err != 0) return ERR_PTR(err); return rpc_mount; @@ -490,6 +491,7 @@ rpc_get_inode(struct super_block *sb, int mode) return NULL; inode->i_mode = mode; inode->i_uid = inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; switch(mode & S_IFMT) { @@ -514,7 +516,7 @@ rpc_depopulate(struct dentry *parent) struct dentry *dentry, *dvec[10]; int n = 0; - mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD); + mutex_lock(&dir->i_mutex); repeat: spin_lock(&dcache_lock); list_for_each_safe(pos, next, &parent->d_subdirs) { @@ -538,7 +540,6 @@ repeat: rpc_close_pipes(dentry->d_inode); simple_unlink(dir, dentry); } - inode_dir_notify(dir, DN_DELETE); dput(dentry); } while (n); goto repeat; @@ -610,8 +611,8 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry) int error; shrink_dcache_parent(dentry); - if (d_unhashed(dentry)) - return 0; + if (dentry->d_inode) + rpc_close_pipes(dentry->d_inode); if ((error = simple_rmdir(dir, dentry)) != 0) return error; if (!error) { @@ -631,7 +632,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd) if ((error = rpc_lookup_parent(path, nd)) != 0) return ERR_PTR(error); dir = nd->dentry->d_inode; - mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); + mutex_lock(&dir->i_mutex); dentry = lookup_one_len(nd->last.name, nd->dentry, nd->last.len); if (IS_ERR(dentry)) goto out_err; @@ -667,11 +668,10 @@ rpc_mkdir(char *path, struct rpc_clnt *rpc_client) RPCAUTH_info, RPCAUTH_EOF); if (error) goto err_depopulate; - dget(dentry); out: mutex_unlock(&dir->i_mutex); rpc_release_path(&nd); - return dentry; + return dget(dentry); err_depopulate: rpc_depopulate(dentry); __rpc_rmdir(dir, dentry); @@ -684,20 +684,28 @@ err_dput: } int -rpc_rmdir(struct dentry *dentry) +rpc_rmdir(char *path) { - struct dentry *parent; + struct nameidata nd; + struct dentry *dentry; struct inode *dir; int error; - parent = dget_parent(dentry); - dir = parent->d_inode; - mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); + if ((error = rpc_lookup_parent(path, &nd)) != 0) + return error; + dir = nd.dentry->d_inode; + mutex_lock(&dir->i_mutex); + dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); + if (IS_ERR(dentry)) { + error = PTR_ERR(dentry); + goto out_release; + } rpc_depopulate(dentry); error = __rpc_rmdir(dir, dentry); dput(dentry); +out_release: mutex_unlock(&dir->i_mutex); - dput(parent); + rpc_release_path(&nd); return error; } @@ -713,7 +721,7 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags) if (IS_ERR(dentry)) return dentry; dir = nd.dentry->d_inode; - inode = rpc_get_inode(dir->i_sb, S_IFIFO | S_IRUSR | S_IWUSR); + inode = rpc_get_inode(dir->i_sb, S_IFSOCK | S_IRUSR | S_IWUSR); if (!inode) goto err_dput; inode->i_ino = iunique(dir->i_sb, 100); @@ -724,11 +732,10 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags) rpci->flags = flags; rpci->ops = ops; inode_dir_notify(dir, DN_CREATE); - dget(dentry); out: mutex_unlock(&dir->i_mutex); rpc_release_path(&nd); - return dentry; + return dget(dentry); err_dput: dput(dentry); dentry = ERR_PTR(-ENOMEM); @@ -738,26 +745,32 @@ err_dput: } int -rpc_unlink(struct dentry *dentry) +rpc_unlink(char *path) { - struct dentry *parent; + struct nameidata nd; + struct dentry *dentry; struct inode *dir; - int error = 0; + int error; - parent = dget_parent(dentry); - dir = parent->d_inode; - mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); - if (!d_unhashed(dentry)) { - d_drop(dentry); - if (dentry->d_inode) { - rpc_close_pipes(dentry->d_inode); - error = simple_unlink(dir, dentry); - } - inode_dir_notify(dir, DN_DELETE); + if ((error = rpc_lookup_parent(path, &nd)) != 0) + return error; + dir = nd.dentry->d_inode; + mutex_lock(&dir->i_mutex); + dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); + if (IS_ERR(dentry)) { + error = PTR_ERR(dentry); + goto out_release; + } + d_drop(dentry); + if (dentry->d_inode) { + rpc_close_pipes(dentry->d_inode); + error = simple_unlink(dir, dentry); } dput(dentry); + inode_dir_notify(dir, DN_DELETE); +out_release: mutex_unlock(&dir->i_mutex); - dput(parent); + rpc_release_path(&nd); return error; } @@ -802,11 +815,11 @@ out: return -ENOMEM; } -static int +static struct super_block * rpc_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, struct vfsmount *mnt) + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, rpc_fill_super, mnt); + return get_sb_single(fs_type, flags, data, rpc_fill_super); } static struct file_system_type rpc_pipe_fs_type = { diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index bd98124c3..15c2db267 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c @@ -114,8 +114,13 @@ void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) { */ struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { + unsigned int ops = clnt->cl_maxproc; + size_t size = ops * sizeof(struct rpc_iostats); struct rpc_iostats *new; - new = kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL); + + new = kmalloc(size, GFP_KERNEL); + if (new) + memset(new, 0 , size); return new; } EXPORT_SYMBOL(rpc_alloc_iostats); diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index f38f939ce..769114f0f 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c @@ -6,6 +6,7 @@ * Copyright (C) 1997 Olaf Kirch */ +#include #include #include diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b76a227dd..b08419e1f 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -32,8 +32,9 @@ svc_create(struct svc_program *prog, unsigned int bufsize) int vers; unsigned int xdrsize; - if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) + if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL))) return NULL; + memset(serv, 0, sizeof(*serv)); serv->sv_name = prog->pg_name; serv->sv_program = prog; serv->sv_nrthreads = 1; @@ -158,10 +159,11 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv) struct svc_rqst *rqstp; int error = -ENOMEM; - rqstp = kzalloc(sizeof(*rqstp), GFP_KERNEL); + rqstp = kmalloc(sizeof(*rqstp), GFP_KERNEL); if (!rqstp) goto out; + memset(rqstp, 0, sizeof(*rqstp)); init_waitqueue_head(&rqstp->rq_wait); if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) @@ -278,10 +280,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) rqstp->rq_res.page_base = 0; rqstp->rq_res.page_len = 0; rqstp->rq_res.buflen = PAGE_SIZE; - rqstp->rq_res.tail[0].iov_base = NULL; rqstp->rq_res.tail[0].iov_len = 0; - /* Will be turned off only in gss privacy case: */ - rqstp->rq_sendfile_ok = 1; /* tcp needs a space for the record length... */ if (rqstp->rq_prot == IPPROTO_TCP) svc_putu32(resv, 0); diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 425ec7ffc..a27905a0a 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -73,37 +73,6 @@ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_sock *svsk); static int svc_deferred_recv(struct svc_rqst *rqstp); static struct cache_deferred_req *svc_defer(struct cache_req *req); -#ifdef CONFIG_DEBUG_LOCK_ALLOC -static struct lock_class_key svc_key[2]; -static struct lock_class_key svc_slock_key[2]; - -static inline void svc_reclassify_socket(struct socket *sock) -{ - struct sock *sk = sock->sk; - BUG_ON(sk->sk_lock.owner != NULL); - switch (sk->sk_family) { - case AF_INET: - sock_lock_init_class_and_name(sk, - "slock-AF_INET-NFSD", &svc_slock_key[0], - "sk_lock-AF_INET-NFSD", &svc_key[0]); - break; - - case AF_INET6: - sock_lock_init_class_and_name(sk, - "slock-AF_INET6-NFSD", &svc_slock_key[1], - "sk_lock-AF_INET6-NFSD", &svc_key[1]); - break; - - default: - BUG(); - } -} -#else -static inline void svc_reclassify_socket(struct socket *sock) -{ -} -#endif - /* * Queue up an idle server thread. Must have serv->sv_lock held. * Note: this is really a stack rather than a queue, so that we only @@ -933,7 +902,7 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp) return 0; } - if (svsk->sk_sk->sk_state == TCP_LISTEN) { + if (test_bit(SK_CONN, &svsk->sk_flags)) { svc_tcp_accept(svsk); svc_sock_received(svsk); return 0; @@ -1353,10 +1322,11 @@ svc_setup_socket(struct svc_serv *serv, struct socket *sock, struct sock *inet; dprintk("svc: svc_setup_socket %p\n", sock); - if (!(svsk = kzalloc(sizeof(*svsk), GFP_KERNEL))) { + if (!(svsk = kmalloc(sizeof(*svsk), GFP_KERNEL))) { *errp = -ENOMEM; return NULL; } + memset(svsk, 0, sizeof(*svsk)); inet = sock->sk; @@ -1434,8 +1404,6 @@ svc_create_socket(struct svc_serv *serv, int protocol, struct sockaddr_in *sin) if ((error = sock_create_kern(PF_INET, type, protocol, &sock)) < 0) return error; - svc_reclassify_socket(sock); - if (sin != NULL) { if (type == SOCK_STREAM) sock->sk->sk_reuse = 1; /* allow address reuse */ diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index d89b048ad..106590484 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -7,6 +7,7 @@ * impossible at the moment. */ +#include #include #include #include diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 6ac45103a..ca4bfa57e 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -191,6 +191,7 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, do { /* Are any pointers crossing a page boundary? */ if (pgto_base == 0) { + flush_dcache_page(*pgto); pgto_base = PAGE_CACHE_SIZE; pgto--; } @@ -210,11 +211,11 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, vto = kmap_atomic(*pgto, KM_USER0); vfrom = kmap_atomic(*pgfrom, KM_USER1); memmove(vto + pgto_base, vfrom + pgfrom_base, copy); - flush_dcache_page(*pgto); kunmap_atomic(vfrom, KM_USER1); kunmap_atomic(vto, KM_USER0); } while ((len -= copy) != 0); + flush_dcache_page(*pgto); } /* @@ -567,7 +568,8 @@ EXPORT_SYMBOL(xdr_inline_decode); * * Moves data beyond the current pointer position from the XDR head[] buffer * into the page list. Any data that lies beyond current position + "len" - * bytes is moved into the XDR tail[]. + * bytes is moved into the XDR tail[]. The current pointer is then + * repositioned at the beginning of the XDR tail. */ void xdr_read_pages(struct xdr_stream *xdr, unsigned int len) { @@ -604,31 +606,6 @@ void xdr_read_pages(struct xdr_stream *xdr, unsigned int len) } EXPORT_SYMBOL(xdr_read_pages); -/** - * xdr_enter_page - decode data from the XDR page - * @xdr: pointer to xdr_stream struct - * @len: number of bytes of page data - * - * Moves data beyond the current pointer position from the XDR head[] buffer - * into the page list. Any data that lies beyond current position + "len" - * bytes is moved into the XDR tail[]. The current pointer is then - * repositioned at the beginning of the first XDR page. - */ -void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) -{ - char * kaddr = page_address(xdr->buf->pages[0]); - xdr_read_pages(xdr, len); - /* - * Position current pointer at beginning of tail, and - * set remaining message length. - */ - if (len > PAGE_CACHE_SIZE - xdr->buf->page_base) - len = PAGE_CACHE_SIZE - xdr->buf->page_base; - xdr->p = (uint32_t *)(kaddr + xdr->buf->page_base); - xdr->end = (uint32_t *)((char *)xdr->p + len); -} -EXPORT_SYMBOL(xdr_enter_page); - static struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0}; void diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index e8c2bc497..4dd5b3cfe 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include @@ -707,9 +707,12 @@ out_unlock: return err; } -void xprt_end_transmit(struct rpc_task *task) +void +xprt_abort_transmit(struct rpc_task *task) { - xprt_release_write(task->tk_xprt, task); + struct rpc_xprt *xprt = task->tk_xprt; + + xprt_release_write(xprt, task); } /** @@ -758,6 +761,8 @@ void xprt_transmit(struct rpc_task *task) task->tk_status = -ENOTCONN; else if (!req->rq_received) rpc_sleep_on(&xprt->pending, task, NULL, xprt_timer); + + xprt->ops->release_xprt(xprt, task); spin_unlock_bh(&xprt->transport_lock); return; } @@ -767,8 +772,18 @@ void xprt_transmit(struct rpc_task *task) * schedq, and being picked up by a parallel run of rpciod(). */ task->tk_status = status; - if (status == -ECONNREFUSED) + + switch (status) { + case -ECONNREFUSED: rpc_sleep_on(&xprt->sending, task, NULL, NULL); + case -EAGAIN: + case -ENOTCONN: + return; + default: + break; + } + xprt_release_write(xprt, task); + return; } static inline void do_xprt_reserve(struct rpc_task *task) @@ -815,7 +830,7 @@ static inline u32 xprt_alloc_xid(struct rpc_xprt *xprt) static inline void xprt_init_xid(struct rpc_xprt *xprt) { - xprt->xid = net_random(); + get_random_bytes(&xprt->xid, sizeof(xprt->xid)); } static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt) @@ -893,8 +908,9 @@ static struct rpc_xprt *xprt_setup(int proto, struct sockaddr_in *ap, struct rpc struct rpc_xprt *xprt; struct rpc_rqst *req; - if ((xprt = kzalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL) + if ((xprt = kmalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL) return ERR_PTR(-ENOMEM); + memset(xprt, 0, sizeof(*xprt)); /* Nnnngh! */ xprt->addr = *ap; diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9e300a327..4b4e7dfdf 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -413,33 +413,6 @@ static int xs_tcp_send_request(struct rpc_task *task) return status; } -/** - * xs_tcp_release_xprt - clean up after a tcp transmission - * @xprt: transport - * @task: rpc task - * - * This cleans up if an error causes us to abort the transmission of a request. - * In this case, the socket may need to be reset in order to avoid confusing - * the server. - */ -static void xs_tcp_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) -{ - struct rpc_rqst *req; - - if (task != xprt->snd_task) - return; - if (task == NULL) - goto out_release; - req = task->tk_rqstp; - if (req->rq_bytes_sent == 0) - goto out_release; - if (req->rq_bytes_sent == req->rq_snd_buf.len) - goto out_release; - set_bit(XPRT_CLOSE_WAIT, &task->tk_xprt->state); -out_release: - xprt_release_xprt(xprt, task); -} - /** * xs_close - close a socket * @xprt: transport @@ -957,13 +930,6 @@ static void xs_udp_timer(struct rpc_task *task) xprt_adjust_cwnd(task, -ETIMEDOUT); } -static unsigned short xs_get_random_port(void) -{ - unsigned short range = xprt_max_resvport - xprt_min_resvport; - unsigned short rand = (unsigned short) net_random() % range; - return rand + xprt_min_resvport; -} - /** * xs_set_port - reset the port number in the remote endpoint address * @xprt: generic transport @@ -1004,37 +970,6 @@ static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock) return err; } -#ifdef CONFIG_DEBUG_LOCK_ALLOC -static struct lock_class_key xs_key[2]; -static struct lock_class_key xs_slock_key[2]; - -static inline void xs_reclassify_socket(struct socket *sock) -{ - struct sock *sk = sock->sk; - BUG_ON(sk->sk_lock.owner != NULL); - switch (sk->sk_family) { - case AF_INET: - sock_lock_init_class_and_name(sk, - "slock-AF_INET-NFS", &xs_slock_key[0], - "sk_lock-AF_INET-NFS", &xs_key[0]); - break; - - case AF_INET6: - sock_lock_init_class_and_name(sk, - "slock-AF_INET6-NFS", &xs_slock_key[1], - "sk_lock-AF_INET6-NFS", &xs_key[1]); - break; - - default: - BUG(); - } -} -#else -static inline void xs_reclassify_socket(struct socket *sock) -{ -} -#endif - /** * xs_udp_connect_worker - set up a UDP socket * @args: RPC transport to connect @@ -1059,7 +994,6 @@ static void xs_udp_connect_worker(void *args) dprintk("RPC: can't create UDP transport socket (%d).\n", -err); goto out; } - xs_reclassify_socket(sock); if (xprt->resvport && xs_bindresvport(xprt, sock) < 0) { sock_release(sock); @@ -1142,7 +1076,6 @@ static void xs_tcp_connect_worker(void *args) dprintk("RPC: can't create TCP transport socket (%d).\n", -err); goto out; } - xs_reclassify_socket(sock); if (xprt->resvport && xs_bindresvport(xprt, sock) < 0) { sock_release(sock); @@ -1310,7 +1243,7 @@ static struct rpc_xprt_ops xs_udp_ops = { static struct rpc_xprt_ops xs_tcp_ops = { .reserve_xprt = xprt_reserve_xprt, - .release_xprt = xs_tcp_release_xprt, + .release_xprt = xprt_release_xprt, .set_port = xs_set_port, .connect = xs_connect, .buf_alloc = rpc_malloc, @@ -1336,12 +1269,13 @@ int xs_setup_udp(struct rpc_xprt *xprt, struct rpc_timeout *to) xprt->max_reqs = xprt_udp_slot_table_entries; slot_table_size = xprt->max_reqs * sizeof(xprt->slot[0]); - xprt->slot = kzalloc(slot_table_size, GFP_KERNEL); + xprt->slot = kmalloc(slot_table_size, GFP_KERNEL); if (xprt->slot == NULL) return -ENOMEM; + memset(xprt->slot, 0, slot_table_size); xprt->prot = IPPROTO_UDP; - xprt->port = xs_get_random_port(); + xprt->port = xprt_max_resvport; xprt->tsh_size = 0; xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0; /* XXX: header size can vary due to auth type, IPv6, etc. */ @@ -1377,12 +1311,13 @@ int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to) xprt->max_reqs = xprt_tcp_slot_table_entries; slot_table_size = xprt->max_reqs * sizeof(xprt->slot[0]); - xprt->slot = kzalloc(slot_table_size, GFP_KERNEL); + xprt->slot = kmalloc(slot_table_size, GFP_KERNEL); if (xprt->slot == NULL) return -ENOMEM; + memset(xprt->slot, 0, slot_table_size); xprt->prot = IPPROTO_TCP; - xprt->port = xs_get_random_port(); + xprt->port = xprt_max_resvport; xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32); xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0; xprt->max_payload = RPC_MAX_FRAGMENT_SIZE; diff --git a/net/sysctl_net.c b/net/sysctl_net.c index cd4eafbab..58a1b6b42 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -12,6 +12,7 @@ * */ +#include #include #include diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 1bb75703f..2c4ecbe50 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -49,19 +49,13 @@ #include "name_table.h" #include "bcast.h" + #define MAX_PKT_DEFAULT_MCAST 1500 /* bcast link max packet size (fixed) */ #define BCLINK_WIN_DEFAULT 20 /* bcast link window size (default) */ #define BCLINK_LOG_BUF_SIZE 0 -/* - * Loss rate for incoming broadcast frames; used to test retransmission code. - * Set to N to cause every N'th frame to be discarded; 0 => don't discard any. - */ - -#define TIPC_BCAST_LOSS_RATE 0 - /** * struct bcbearer_pair - a pair of bearers used by broadcast link * @primary: pointer to primary bearer @@ -81,14 +75,7 @@ struct bcbearer_pair { * @bearer: (non-standard) broadcast bearer structure * @media: (non-standard) broadcast media structure * @bpairs: array of bearer pairs - * @bpairs_temp: temporary array of bearer pairs used by tipc_bcbearer_sort() - * @remains: temporary node map used by tipc_bcbearer_send() - * @remains_new: temporary node map used tipc_bcbearer_send() - * - * Note: The fields labelled "temporary" are incorporated into the bearer - * to avoid consuming potentially limited stack space through the use of - * large local variables within multicast routines. Concurrent access is - * prevented through use of the spinlock "bc_lock". + * @bpairs_temp: array of bearer pairs used during creation of "bpairs" */ struct bcbearer { @@ -96,8 +83,6 @@ struct bcbearer { struct media media; struct bcbearer_pair bpairs[MAX_BEARERS]; struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; - struct node_map remains; - struct node_map remains_new; }; /** @@ -117,7 +102,7 @@ struct bclink { static struct bcbearer *bcbearer = NULL; static struct bclink *bclink = NULL; static struct link *bcl = NULL; -static DEFINE_SPINLOCK(bc_lock); +static spinlock_t bc_lock = SPIN_LOCK_UNLOCKED; char tipc_bclink_name[] = "multicast-link"; @@ -180,18 +165,21 @@ static int bclink_ack_allowed(u32 n) * @after: sequence number of last packet to *not* retransmit * @to: sequence number of last packet to retransmit * - * Called with bc_lock locked + * Called with 'node' locked, bc_lock unlocked */ static void bclink_retransmit_pkt(u32 after, u32 to) { struct sk_buff *buf; + spin_lock_bh(&bc_lock); buf = bcl->first_out; while (buf && less_eq(buf_seqno(buf), after)) { buf = buf->next; } - tipc_link_retransmit(bcl, buf, mod(to - after)); + if (buf != NULL) + tipc_link_retransmit(bcl, buf, mod(to - after)); + spin_unlock_bh(&bc_lock); } /** @@ -358,10 +346,8 @@ static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 g for (; buf; buf = buf->next) { u32 seqno = buf_seqno(buf); - if (mod(seqno - prev) != 1) { + if (mod(seqno - prev) != 1) buf = NULL; - break; - } if (seqno == gap_after) break; prev = seqno; @@ -413,10 +399,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf) */ void tipc_bclink_recv_pkt(struct sk_buff *buf) -{ -#if (TIPC_BCAST_LOSS_RATE) - static int rx_count = 0; -#endif +{ struct tipc_msg *msg = buf_msg(buf); struct node* node = tipc_node_find(msg_prevnode(msg)); u32 next_in; @@ -437,13 +420,9 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) tipc_node_lock(node); tipc_bclink_acknowledge(node, msg_bcast_ack(msg)); tipc_node_unlock(node); - spin_lock_bh(&bc_lock); bcl->stats.recv_nacks++; - bcl->owner->next = node; /* remember requestor */ bclink_retransmit_pkt(msg_bcgap_after(msg), msg_bcgap_to(msg)); - bcl->owner->next = NULL; - spin_unlock_bh(&bc_lock); } else { tipc_bclink_peek_nack(msg_destnode(msg), msg_bcast_tag(msg), @@ -454,14 +433,6 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) return; } -#if (TIPC_BCAST_LOSS_RATE) - if (++rx_count == TIPC_BCAST_LOSS_RATE) { - rx_count = 0; - buf_discard(buf); - return; - } -#endif - tipc_node_lock(node); receive: deferred = node->bclink.deferred_head; @@ -560,8 +531,12 @@ static int tipc_bcbearer_send(struct sk_buff *buf, { static int send_count = 0; + struct node_map *remains; + struct node_map *remains_new; + struct node_map *remains_tmp; int bp_index; int swap_time; + int err; /* Prepare buffer for broadcasting (if first time trying to send it) */ @@ -582,7 +557,9 @@ static int tipc_bcbearer_send(struct sk_buff *buf, /* Send buffer over bearers until all targets reached */ - bcbearer->remains = tipc_cltr_bcast_nodes; + remains = kmalloc(sizeof(struct node_map), GFP_ATOMIC); + remains_new = kmalloc(sizeof(struct node_map), GFP_ATOMIC); + *remains = tipc_cltr_bcast_nodes; for (bp_index = 0; bp_index < MAX_BEARERS; bp_index++) { struct bearer *p = bcbearer->bpairs[bp_index].primary; @@ -591,8 +568,8 @@ static int tipc_bcbearer_send(struct sk_buff *buf, if (!p) break; /* no more bearers to try */ - tipc_nmap_diff(&bcbearer->remains, &p->nodes, &bcbearer->remains_new); - if (bcbearer->remains_new.count == bcbearer->remains.count) + tipc_nmap_diff(remains, &p->nodes, remains_new); + if (remains_new->count == remains->count) continue; /* bearer pair doesn't add anything */ if (!p->publ.blocked && @@ -610,17 +587,27 @@ swap: bcbearer->bpairs[bp_index].primary = s; bcbearer->bpairs[bp_index].secondary = p; update: - if (bcbearer->remains_new.count == 0) - return TIPC_OK; + if (remains_new->count == 0) { + err = TIPC_OK; + goto out; + } - bcbearer->remains = bcbearer->remains_new; + /* swap map */ + remains_tmp = remains; + remains = remains_new; + remains_new = remains_tmp; } /* Unable to reach all targets */ bcbearer->bearer.publ.blocked = 1; bcl->stats.bearer_congs++; - return ~TIPC_OK; + err = ~TIPC_OK; + + out: + kfree(remains_new); + kfree(remains); + return err; } /** @@ -778,7 +765,7 @@ int tipc_bclink_init(void) bclink = kmalloc(sizeof(*bclink), GFP_ATOMIC); if (!bcbearer || !bclink) { nomem: - warn("Multicast link creation failed, no memory\n"); + warn("Memory squeeze; Failed to create multicast link\n"); kfree(bcbearer); bcbearer = NULL; kfree(bclink); @@ -796,7 +783,7 @@ int tipc_bclink_init(void) memset(bclink, 0, sizeof(struct bclink)); INIT_LIST_HEAD(&bcl->waiting_ports); bcl->next_out_no = 1; - spin_lock_init(&bclink->node.lock); + bclink->node.lock = SPIN_LOCK_UNLOCKED; bcl->owner = &bclink->node; bcl->max_pkt = MAX_PKT_DEFAULT_MCAST; tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT); diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h index b243d9d49..0e3be2ab3 100644 --- a/net/tipc/bcast.h +++ b/net/tipc/bcast.h @@ -180,7 +180,7 @@ static inline void tipc_port_list_add(struct port_list *pl_ptr, u32 port) if (!item->next) { item->next = kmalloc(sizeof(*item), GFP_ATOMIC); if (!item->next) { - warn("Incomplete multicast delivery, no memory\n"); + warn("Memory squeeze: multicast destination port list is incomplete\n"); return; } item->next->next = NULL; diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 75a5968c2..e213a8e54 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -112,42 +112,39 @@ int tipc_register_media(u32 media_type, goto exit; if (!media_name_valid(name)) { - warn("Media <%s> rejected, illegal name\n", name); + warn("Media registration error: illegal name <%s>\n", name); goto exit; } if (!bcast_addr) { - warn("Media <%s> rejected, no broadcast address\n", name); + warn("Media registration error: no broadcast address supplied\n"); goto exit; } if ((bearer_priority < TIPC_MIN_LINK_PRI) && (bearer_priority > TIPC_MAX_LINK_PRI)) { - warn("Media <%s> rejected, illegal priority (%u)\n", name, - bearer_priority); + warn("Media registration error: priority %u\n", bearer_priority); goto exit; } if ((link_tolerance < TIPC_MIN_LINK_TOL) || (link_tolerance > TIPC_MAX_LINK_TOL)) { - warn("Media <%s> rejected, illegal tolerance (%u)\n", name, - link_tolerance); + warn("Media registration error: tolerance %u\n", link_tolerance); goto exit; } media_id = media_count++; if (media_id >= MAX_MEDIA) { - warn("Media <%s> rejected, media limit reached (%u)\n", name, - MAX_MEDIA); + warn("Attempt to register more than %u media\n", MAX_MEDIA); media_count--; goto exit; } for (i = 0; i < media_id; i++) { if (media_list[i].type_id == media_type) { - warn("Media <%s> rejected, duplicate type (%u)\n", name, + warn("Attempt to register second media with type %u\n", media_type); media_count--; goto exit; } if (!strcmp(name, media_list[i].name)) { - warn("Media <%s> rejected, duplicate name\n", name); + warn("Attempt to re-register media name <%s>\n", name); media_count--; goto exit; } @@ -286,9 +283,6 @@ static struct bearer *bearer_find(const char *name) struct bearer *b_ptr; u32 i; - if (tipc_mode != TIPC_NET_MODE) - return NULL; - for (i = 0, b_ptr = tipc_bearers; i < MAX_BEARERS; i++, b_ptr++) { if (b_ptr->active && (!strcmp(b_ptr->publ.name, name))) return b_ptr; @@ -481,33 +475,26 @@ int tipc_enable_bearer(const char *name, u32 bcast_scope, u32 priority) u32 i; int res = -EINVAL; - if (tipc_mode != TIPC_NET_MODE) { - warn("Bearer <%s> rejected, not supported in standalone mode\n", - name); + if (tipc_mode != TIPC_NET_MODE) return -ENOPROTOOPT; - } - if (!bearer_name_validate(name, &b_name)) { - warn("Bearer <%s> rejected, illegal name\n", name); - return -EINVAL; - } - if (!tipc_addr_domain_valid(bcast_scope) || - !in_scope(bcast_scope, tipc_own_addr)) { - warn("Bearer <%s> rejected, illegal broadcast scope\n", name); + + if (!bearer_name_validate(name, &b_name) || + !tipc_addr_domain_valid(bcast_scope) || + !in_scope(bcast_scope, tipc_own_addr)) return -EINVAL; - } + if ((priority < TIPC_MIN_LINK_PRI || priority > TIPC_MAX_LINK_PRI) && - (priority != TIPC_MEDIA_LINK_PRI)) { - warn("Bearer <%s> rejected, illegal priority\n", name); + (priority != TIPC_MEDIA_LINK_PRI)) return -EINVAL; - } write_lock_bh(&tipc_net_lock); + if (!tipc_bearers) + goto failed; m_ptr = media_find(b_name.media_name); if (!m_ptr) { - warn("Bearer <%s> rejected, media <%s> not registered\n", name, - b_name.media_name); + warn("No media <%s>\n", b_name.media_name); goto failed; } @@ -523,24 +510,23 @@ restart: continue; } if (!strcmp(name, tipc_bearers[i].publ.name)) { - warn("Bearer <%s> rejected, already enabled\n", name); + warn("Bearer <%s> already enabled\n", name); goto failed; } if ((tipc_bearers[i].priority == priority) && (++with_this_prio > 2)) { if (priority-- == 0) { - warn("Bearer <%s> rejected, duplicate priority\n", - name); + warn("Third bearer <%s> with priority %u, unable to lower to %u\n", + name, priority + 1, priority); goto failed; } - warn("Bearer <%s> priority adjustment required %u->%u\n", + warn("Third bearer <%s> with priority %u, lowering to %u\n", name, priority + 1, priority); goto restart; } } if (bearer_id >= MAX_BEARERS) { - warn("Bearer <%s> rejected, bearer limit reached (%u)\n", - name, MAX_BEARERS); + warn("Attempt to enable more than %d bearers\n", MAX_BEARERS); goto failed; } @@ -550,7 +536,7 @@ restart: strcpy(b_ptr->publ.name, name); res = m_ptr->enable_bearer(&b_ptr->publ); if (res) { - warn("Bearer <%s> rejected, enable failure (%d)\n", name, -res); + warn("Failed to enable bearer <%s>\n", name); goto failed; } @@ -566,7 +552,7 @@ restart: b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, bcast_scope, 2); } - spin_lock_init(&b_ptr->publ.lock); + b_ptr->publ.lock = SPIN_LOCK_UNLOCKED; write_unlock_bh(&tipc_net_lock); info("Enabled bearer <%s>, discovery domain %s, priority %u\n", name, addr_string_fill(addr_string, bcast_scope), priority); @@ -587,6 +573,9 @@ int tipc_block_bearer(const char *name) struct link *l_ptr; struct link *temp_l_ptr; + if (tipc_mode != TIPC_NET_MODE) + return -ENOPROTOOPT; + read_lock_bh(&tipc_net_lock); b_ptr = bearer_find(name); if (!b_ptr) { @@ -595,7 +584,6 @@ int tipc_block_bearer(const char *name) return -EINVAL; } - info("Blocking bearer <%s>\n", name); spin_lock_bh(&b_ptr->publ.lock); b_ptr->publ.blocked = 1; list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { @@ -607,6 +595,7 @@ int tipc_block_bearer(const char *name) } spin_unlock_bh(&b_ptr->publ.lock); read_unlock_bh(&tipc_net_lock); + info("Blocked bearer <%s>\n", name); return TIPC_OK; } @@ -622,13 +611,15 @@ static int bearer_disable(const char *name) struct link *l_ptr; struct link *temp_l_ptr; + if (tipc_mode != TIPC_NET_MODE) + return -ENOPROTOOPT; + b_ptr = bearer_find(name); if (!b_ptr) { warn("Attempt to disable unknown bearer <%s>\n", name); return -EINVAL; } - info("Disabling bearer <%s>\n", name); tipc_disc_stop_link_req(b_ptr->link_req); spin_lock_bh(&b_ptr->publ.lock); b_ptr->link_req = NULL; @@ -644,6 +635,7 @@ static int bearer_disable(const char *name) tipc_link_delete(l_ptr); } spin_unlock_bh(&b_ptr->publ.lock); + info("Disabled bearer <%s>\n", name); memset(b_ptr, 0, sizeof(struct bearer)); return TIPC_OK; } @@ -665,9 +657,11 @@ int tipc_bearer_init(void) int res; write_lock_bh(&tipc_net_lock); - tipc_bearers = kcalloc(MAX_BEARERS, sizeof(struct bearer), GFP_ATOMIC); - media_list = kcalloc(MAX_MEDIA, sizeof(struct media), GFP_ATOMIC); + tipc_bearers = kmalloc(MAX_BEARERS * sizeof(struct bearer), GFP_ATOMIC); + media_list = kmalloc(MAX_MEDIA * sizeof(struct media), GFP_ATOMIC); if (tipc_bearers && media_list) { + memset(tipc_bearers, 0, MAX_BEARERS * sizeof(struct bearer)); + memset(media_list, 0, MAX_MEDIA * sizeof(struct media)); res = TIPC_OK; } else { kfree(tipc_bearers); diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index b46b5188a..1aed81584 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c @@ -57,43 +57,43 @@ struct cluster *tipc_cltr_create(u32 addr) struct _zone *z_ptr; struct cluster *c_ptr; int max_nodes; + int alloc; - c_ptr = kzalloc(sizeof(*c_ptr), GFP_ATOMIC); - if (c_ptr == NULL) { - warn("Cluster creation failure, no memory\n"); + c_ptr = (struct cluster *)kmalloc(sizeof(*c_ptr), GFP_ATOMIC); + if (c_ptr == NULL) return NULL; - } + memset(c_ptr, 0, sizeof(*c_ptr)); c_ptr->addr = tipc_addr(tipc_zone(addr), tipc_cluster(addr), 0); if (in_own_cluster(addr)) max_nodes = LOWEST_SLAVE + tipc_max_slaves; else max_nodes = tipc_max_nodes + 1; - - c_ptr->nodes = kcalloc(max_nodes + 1, sizeof(void*), GFP_ATOMIC); + alloc = sizeof(void *) * (max_nodes + 1); + c_ptr->nodes = (struct node **)kmalloc(alloc, GFP_ATOMIC); if (c_ptr->nodes == NULL) { - warn("Cluster creation failure, no memory for node area\n"); kfree(c_ptr); return NULL; } - + memset(c_ptr->nodes, 0, alloc); if (in_own_cluster(addr)) tipc_local_nodes = c_ptr->nodes; c_ptr->highest_slave = LOWEST_SLAVE - 1; c_ptr->highest_node = 0; z_ptr = tipc_zone_find(tipc_zone(addr)); - if (!z_ptr) { + if (z_ptr == NULL) { z_ptr = tipc_zone_create(addr); } - if (!z_ptr) { - kfree(c_ptr->nodes); + if (z_ptr != NULL) { + tipc_zone_attach_cluster(z_ptr, c_ptr); + c_ptr->owner = z_ptr; + } + else { kfree(c_ptr); - return NULL; + c_ptr = NULL; } - tipc_zone_attach_cluster(z_ptr, c_ptr); - c_ptr->owner = z_ptr; return c_ptr; } diff --git a/net/tipc/config.c b/net/tipc/config.c index 285e1bc2d..48b5de2db 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c @@ -63,7 +63,7 @@ struct manager { static struct manager mng = { 0}; -static DEFINE_SPINLOCK(config_lock); +static spinlock_t config_lock = SPIN_LOCK_UNLOCKED; static const void *req_tlv_area; /* request message TLV area */ static int req_tlv_space; /* request message TLV area size */ @@ -291,22 +291,13 @@ static struct sk_buff *cfg_set_own_addr(void) if (!tipc_addr_node_valid(addr)) return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE " (node address)"); - if (tipc_mode == TIPC_NET_MODE) + if (tipc_own_addr) return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED " (cannot change node address once assigned)"); - tipc_own_addr = addr; - - /* - * Must release all spinlocks before calling start_net() because - * Linux version of TIPC calls eth_media_start() which calls - * register_netdevice_notifier() which may block! - * - * Temporarily releasing the lock should be harmless for non-Linux TIPC, - * but Linux version of eth_media_start() should really be reworked - * so that it can be called with spinlocks held. - */ spin_unlock_bh(&config_lock); + tipc_core_stop_net(); + tipc_own_addr = addr; tipc_core_start_net(); spin_lock_bh(&config_lock); return tipc_cfg_reply_none(); @@ -359,21 +350,50 @@ static struct sk_buff *cfg_set_max_subscriptions(void) static struct sk_buff *cfg_set_max_ports(void) { + int orig_mode; u32 value; if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_UNSIGNED)) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); value = *(u32 *)TLV_DATA(req_tlv_area); value = ntohl(value); - if (value == tipc_max_ports) - return tipc_cfg_reply_none(); if (value != delimit(value, 127, 65535)) return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE " (max ports must be 127-65535)"); - if (tipc_mode != TIPC_NOT_RUNNING) + + if (value == tipc_max_ports) + return tipc_cfg_reply_none(); + + if (atomic_read(&tipc_user_count) > 2) return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (cannot change max ports while TIPC is active)"); + " (cannot change max ports while TIPC users exist)"); + + spin_unlock_bh(&config_lock); + orig_mode = tipc_get_mode(); + if (orig_mode == TIPC_NET_MODE) + tipc_core_stop_net(); + tipc_core_stop(); tipc_max_ports = value; + tipc_core_start(); + if (orig_mode == TIPC_NET_MODE) + tipc_core_start_net(); + spin_lock_bh(&config_lock); + return tipc_cfg_reply_none(); +} + +static struct sk_buff *set_net_max(int value, int *parameter) +{ + int orig_mode; + + if (value != *parameter) { + orig_mode = tipc_get_mode(); + if (orig_mode == TIPC_NET_MODE) + tipc_core_stop_net(); + *parameter = value; + if (orig_mode == TIPC_NET_MODE) + tipc_core_start_net(); + } + return tipc_cfg_reply_none(); } @@ -385,16 +405,10 @@ static struct sk_buff *cfg_set_max_zones(void) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); value = *(u32 *)TLV_DATA(req_tlv_area); value = ntohl(value); - if (value == tipc_max_zones) - return tipc_cfg_reply_none(); if (value != delimit(value, 1, 255)) return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE " (max zones must be 1-255)"); - if (tipc_mode == TIPC_NET_MODE) - return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (cannot change max zones once TIPC has joined a network)"); - tipc_max_zones = value; - return tipc_cfg_reply_none(); + return set_net_max(value, &tipc_max_zones); } static struct sk_buff *cfg_set_max_clusters(void) @@ -405,8 +419,8 @@ static struct sk_buff *cfg_set_max_clusters(void) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); value = *(u32 *)TLV_DATA(req_tlv_area); value = ntohl(value); - if (value != delimit(value, 1, 1)) - return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE + if (value != 1) + return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED " (max clusters fixed at 1)"); return tipc_cfg_reply_none(); } @@ -419,16 +433,10 @@ static struct sk_buff *cfg_set_max_nodes(void) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); value = *(u32 *)TLV_DATA(req_tlv_area); value = ntohl(value); - if (value == tipc_max_nodes) - return tipc_cfg_reply_none(); if (value != delimit(value, 8, 2047)) return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE " (max nodes must be 8-2047)"); - if (tipc_mode == TIPC_NET_MODE) - return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (cannot change max nodes once TIPC has joined a network)"); - tipc_max_nodes = value; - return tipc_cfg_reply_none(); + return set_net_max(value, &tipc_max_nodes); } static struct sk_buff *cfg_set_max_slaves(void) @@ -453,16 +461,15 @@ static struct sk_buff *cfg_set_netid(void) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); value = *(u32 *)TLV_DATA(req_tlv_area); value = ntohl(value); - if (value == tipc_net_id) - return tipc_cfg_reply_none(); if (value != delimit(value, 1, 9999)) return tipc_cfg_reply_error_string(TIPC_CFG_INVALID_VALUE " (network id must be 1-9999)"); - if (tipc_mode == TIPC_NET_MODE) + + if (tipc_own_addr) return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (cannot change network id once TIPC has joined a network)"); - tipc_net_id = value; - return tipc_cfg_reply_none(); + " (cannot change network id once part of network)"); + + return set_net_max(value, &tipc_net_id); } struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area, @@ -642,7 +649,7 @@ static void cfg_named_msg_event(void *userdata, if ((size < sizeof(*req_hdr)) || (size != TCM_ALIGN(ntohl(req_hdr->tcm_len))) || (ntohs(req_hdr->tcm_flags) != TCM_F_REQUEST)) { - warn("Invalid configuration message discarded\n"); + warn("discarded invalid configuration message\n"); return; } diff --git a/net/tipc/core.c b/net/tipc/core.c index 0539a8362..3d0a8ee4e 100644 --- a/net/tipc/core.c +++ b/net/tipc/core.c @@ -2,7 +2,7 @@ * net/tipc/core.c: TIPC module code * * Copyright (c) 2003-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ void tipc_socket_stop(void); int tipc_netlink_start(void); void tipc_netlink_stop(void); -#define TIPC_MOD_VER "1.6.1" +#define MOD_NAME "tipc_start: " #ifndef CONFIG_TIPC_ZONES #define CONFIG_TIPC_ZONES 3 @@ -191,15 +191,14 @@ static int __init tipc_init(void) int res; tipc_log_reinit(CONFIG_TIPC_LOG); - info("Activated (version " TIPC_MOD_VER - " compiled " __DATE__ " " __TIME__ ")\n"); + info("Activated (compiled " __DATE__ " " __TIME__ ")\n"); tipc_own_addr = 0; tipc_remote_management = 1; tipc_max_publications = 10000; tipc_max_subscriptions = 2000; tipc_max_ports = delimit(CONFIG_TIPC_PORTS, 127, 65536); - tipc_max_zones = delimit(CONFIG_TIPC_ZONES, 1, 255); + tipc_max_zones = delimit(CONFIG_TIPC_ZONES, 1, 511); tipc_max_clusters = delimit(CONFIG_TIPC_CLUSTERS, 1, 1); tipc_max_nodes = delimit(CONFIG_TIPC_NODES, 8, 2047); tipc_max_slaves = delimit(CONFIG_TIPC_SLAVE_NODES, 0, 2047); @@ -225,7 +224,6 @@ module_exit(tipc_exit); MODULE_DESCRIPTION("TIPC: Transparent Inter Process Communication"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_VERSION(TIPC_MOD_VER); /* Native TIPC API for kernel-space applications (see tipc.h) */ diff --git a/net/tipc/core.h b/net/tipc/core.h index 762aac257..1f2e8b27a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -2,7 +2,7 @@ * net/tipc/core.h: Include file for TIPC global declarations * * Copyright (c) 2005-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -111,6 +111,10 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); #else +#ifndef DBG_OUTPUT +#define DBG_OUTPUT NULL +#endif + /* * TIPC debug support not included: * - system messages are printed to system console @@ -125,19 +129,6 @@ void tipc_dump(struct print_buf*,const char *fmt, ...); #define msg_dbg(msg,txt) do {} while (0) #define dump(fmt,arg...) do {} while (0) - -/* - * TIPC_OUTPUT is defined to be the system console, while DBG_OUTPUT is - * the null print buffer. Thes ensures that any system or debug messages - * that are generated without using the above macros are handled correctly. - */ - -#undef TIPC_OUTPUT -#define TIPC_OUTPUT TIPC_CONS - -#undef DBG_OUTPUT -#define DBG_OUTPUT NULL - #endif @@ -297,10 +288,7 @@ static inline struct tipc_msg *buf_msg(struct sk_buff *skb) * buf_acquire - creates a TIPC message buffer * @size: message size (including TIPC header) * - * Returns a new buffer with data pointers set to the specified size. - * - * NOTE: Headroom is reserved to allow prepending of a data link header. - * There may also be unrequested tailroom present at the buffer's end. + * Returns a new buffer. Space is reserved for a data link header. */ static inline struct sk_buff *buf_acquire(u32 size) @@ -321,7 +309,7 @@ static inline struct sk_buff *buf_acquire(u32 size) * buf_discard - frees a TIPC message buffer * @skb: message buffer * - * Frees a message buffer. If passed NULL, just returns. + * Frees a new buffer. If passed NULL, just returns. */ static inline void buf_discard(struct sk_buff *skb) diff --git a/net/tipc/dbg.c b/net/tipc/dbg.c index 55130655e..26ef95d5f 100644 --- a/net/tipc/dbg.c +++ b/net/tipc/dbg.c @@ -41,7 +41,7 @@ #define MAX_STRING 512 static char print_string[MAX_STRING]; -static DEFINE_SPINLOCK(print_lock); +static spinlock_t print_lock = SPIN_LOCK_UNLOCKED; static struct print_buf cons_buf = { NULL, 0, NULL, NULL }; struct print_buf *TIPC_CONS = &cons_buf; diff --git a/net/tipc/discover.c b/net/tipc/discover.c index ee94de92a..92601385e 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c @@ -2,7 +2,7 @@ * net/tipc/discover.c * * Copyright (c) 2003-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -176,6 +176,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf) n_ptr = tipc_node_create(orig); } if (n_ptr == NULL) { + warn("Memory squeeze; Failed to create node\n"); return; } spin_lock_bh(&n_ptr->lock); @@ -190,8 +191,10 @@ void tipc_disc_recv_msg(struct sk_buff *buf) } addr = &link->media_addr; if (memcmp(addr, &media_addr, sizeof(*addr))) { - warn("Resetting link <%s>, peer interface address changed\n", - link->name); + char addr_string[16]; + + warn("New bearer address for %s\n", + addr_string_fill(addr_string, orig)); memcpy(addr, &media_addr, sizeof(*addr)); tipc_link_reset(link); } @@ -267,8 +270,8 @@ static void disc_timeout(struct link_req *req) /* leave timer interval "as is" if already at a "normal" rate */ } else { req->timer_intv *= 2; - if (req->timer_intv > TIPC_LINK_REQ_FAST) - req->timer_intv = TIPC_LINK_REQ_FAST; + if (req->timer_intv > TIPC_LINK_REQ_SLOW) + req->timer_intv = TIPC_LINK_REQ_SLOW; if ((req->timer_intv == TIPC_LINK_REQ_FAST) && (req->bearer->nodes.count)) req->timer_intv = TIPC_LINK_REQ_SLOW; @@ -295,7 +298,7 @@ struct link_req *tipc_disc_init_link_req(struct bearer *b_ptr, { struct link_req *req; - req = kmalloc(sizeof(*req), GFP_ATOMIC); + req = (struct link_req *)kmalloc(sizeof(*req), GFP_ATOMIC); if (!req) return NULL; diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 682da4a28..7a252785f 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -2,7 +2,7 @@ * net/tipc/eth_media.c: Ethernet bearer support for TIPC * * Copyright (c) 2001-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,19 +98,17 @@ static int recv_msg(struct sk_buff *buf, struct net_device *dev, u32 size; if (likely(eb_ptr->bearer)) { - if (likely(!dev->promiscuity) || - !memcmp(buf->mac.raw,dev->dev_addr,ETH_ALEN) || - !memcmp(buf->mac.raw,dev->broadcast,ETH_ALEN)) { - size = msg_size((struct tipc_msg *)buf->data); - skb_trim(buf, size); - if (likely(buf->len == size)) { - buf->next = NULL; - tipc_recv_msg(buf, eb_ptr->bearer); - return TIPC_OK; - } + size = msg_size((struct tipc_msg *)buf->data); + skb_trim(buf, size); + if (likely(buf->len == size)) { + buf->next = NULL; + tipc_recv_msg(buf, eb_ptr->bearer); + } else { + kfree_skb(buf); } + } else { + kfree_skb(buf); } - kfree_skb(buf); return TIPC_OK; } @@ -127,7 +125,8 @@ static int enable_bearer(struct tipc_bearer *tb_ptr) /* Find device with specified name */ - while (dev && dev->name && strncmp(dev->name, driver_name, IFNAMSIZ)) { + while (dev && dev->name && + (memcmp(dev->name, driver_name, strlen(dev->name)))) { dev = dev->next; } if (!dev) @@ -253,9 +252,7 @@ int tipc_eth_media_start(void) if (eth_started) return -EINVAL; - bcast_addr.type = htonl(TIPC_MEDIA_TYPE_ETH); - memset(&bcast_addr.dev_addr, 0xff, ETH_ALEN); - + memset(&bcast_addr, 0xff, sizeof(bcast_addr)); memset(eth_bearers, 0, sizeof(eth_bearers)); res = tipc_register_media(TIPC_MEDIA_TYPE_ETH, "eth", diff --git a/net/tipc/handler.c b/net/tipc/handler.c index ae6ddf00a..966f70a1b 100644 --- a/net/tipc/handler.c +++ b/net/tipc/handler.c @@ -44,7 +44,7 @@ struct queue_item { static kmem_cache_t *tipc_queue_item_cache; static struct list_head signal_queue_head; -static DEFINE_SPINLOCK(qitem_lock); +static spinlock_t qitem_lock = SPIN_LOCK_UNLOCKED; static int handler_enabled = 0; static void process_signal_queue(unsigned long dummy); diff --git a/net/tipc/link.c b/net/tipc/link.c index 693f02eca..784b24b6d 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -2,7 +2,7 @@ * net/tipc/link.c: TIPC link code * * Copyright (c) 1996-2006, Ericsson AB - * Copyright (c) 2004-2006, Wind River Systems + * Copyright (c) 2004-2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -417,11 +417,12 @@ struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, struct tipc_msg *msg; char *if_name; - l_ptr = kzalloc(sizeof(*l_ptr), GFP_ATOMIC); + l_ptr = (struct link *)kmalloc(sizeof(*l_ptr), GFP_ATOMIC); if (!l_ptr) { - warn("Link creation failed, no memory\n"); + warn("Memory squeeze; Failed to create link\n"); return NULL; } + memset(l_ptr, 0, sizeof(*l_ptr)); l_ptr->addr = peer; if_name = strchr(b_ptr->publ.name, ':') + 1; @@ -468,7 +469,7 @@ struct link *tipc_link_create(struct bearer *b_ptr, const u32 peer, if (!pb) { kfree(l_ptr); - warn("Link creation failed, no memory for print buffer\n"); + warn("Memory squeeze; Failed to create link\n"); return NULL; } tipc_printbuf_init(&l_ptr->print_buf, pb, LINK_LOG_BUF_SIZE); @@ -573,6 +574,7 @@ void tipc_link_wakeup_ports(struct link *l_ptr, int all) break; list_del_init(&p_ptr->wait_list); p_ptr->congested_link = NULL; + assert(p_ptr->wakeup); spin_lock_bh(p_ptr->publ.lock); p_ptr->publ.congested = 0; p_ptr->wakeup(&p_ptr->publ); @@ -689,7 +691,6 @@ void tipc_link_reset(struct link *l_ptr) struct sk_buff *buf; u32 prev_state = l_ptr->state; u32 checkpoint = l_ptr->next_in_no; - int was_active_link = tipc_link_is_active(l_ptr); msg_set_session(l_ptr->pmsg, msg_session(l_ptr->pmsg) + 1); @@ -711,7 +712,7 @@ void tipc_link_reset(struct link *l_ptr) tipc_printf(TIPC_CONS, "\nReset link <%s>\n", l_ptr->name); dbg_link_dump(); #endif - if (was_active_link && tipc_node_has_active_links(l_ptr->owner) && + if (tipc_node_has_active_links(l_ptr->owner) && l_ptr->owner->permit_changeover) { l_ptr->reset_checkpoint = checkpoint; l_ptr->exp_msg_count = START_CHANGEOVER; @@ -754,7 +755,7 @@ void tipc_link_reset(struct link *l_ptr) static void link_activate(struct link *l_ptr) { - l_ptr->next_in_no = l_ptr->stats.recv_info = 1; + l_ptr->next_in_no = 1; tipc_node_link_up(l_ptr->owner, l_ptr); tipc_bearer_add_dest(l_ptr->b_ptr, l_ptr->addr); link_send_event(tipc_cfg_link_event, l_ptr, 1); @@ -819,8 +820,6 @@ static void link_state_event(struct link *l_ptr, unsigned event) break; case RESET_MSG: dbg_link("RES -> RR\n"); - info("Resetting link <%s>, requested by peer\n", - l_ptr->name); tipc_link_reset(l_ptr); l_ptr->state = RESET_RESET; l_ptr->fsm_msg_cnt = 0; @@ -845,8 +844,6 @@ static void link_state_event(struct link *l_ptr, unsigned event) break; case RESET_MSG: dbg_link("RES -> RR\n"); - info("Resetting link <%s>, requested by peer " - "while probing\n", l_ptr->name); tipc_link_reset(l_ptr); l_ptr->state = RESET_RESET; l_ptr->fsm_msg_cnt = 0; @@ -878,8 +875,6 @@ static void link_state_event(struct link *l_ptr, unsigned event) } else { /* Link has failed */ dbg_link("-> RU (%u probes unanswered)\n", l_ptr->fsm_msg_cnt); - warn("Resetting link <%s>, peer not responding\n", - l_ptr->name); tipc_link_reset(l_ptr); l_ptr->state = RESET_UNKNOWN; l_ptr->fsm_msg_cnt = 0; @@ -987,20 +982,17 @@ static int link_bundle_buf(struct link *l_ptr, struct tipc_msg *bundler_msg = buf_msg(bundler); struct tipc_msg *msg = buf_msg(buf); u32 size = msg_size(msg); - u32 bundle_size = msg_size(bundler_msg); - u32 to_pos = align(bundle_size); - u32 pad = to_pos - bundle_size; + u32 to_pos = align(msg_size(bundler_msg)); + u32 rest = link_max_pkt(l_ptr) - to_pos; if (msg_user(bundler_msg) != MSG_BUNDLER) return 0; if (msg_type(bundler_msg) != OPEN_MSG) return 0; - if (skb_tailroom(bundler) < (pad + size)) - return 0; - if (link_max_pkt(l_ptr) < (to_pos + size)) + if (rest < align(size)) return 0; - skb_put(bundler, pad + size); + skb_put(bundler, (to_pos - msg_size(bundler_msg)) + size); memcpy(bundler->data + to_pos, buf->data, size); msg_set_size(bundler_msg, to_pos + size); msg_set_msgcnt(bundler_msg, msg_msgcnt(bundler_msg) + 1); @@ -1058,7 +1050,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) msg_dbg(msg, "TIPC: Congestion, throwing away\n"); buf_discard(buf); if (imp > CONN_MANAGER) { - warn("Resetting link <%s>, send queue full", l_ptr->name); + warn("Resetting <%s>, send queue full", l_ptr->name); tipc_link_reset(l_ptr); } return dsz; @@ -1143,13 +1135,9 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) if (n_ptr) { tipc_node_lock(n_ptr); l_ptr = n_ptr->active_links[selector & 1]; + dbg("tipc_link_send: found link %x for dest %x\n", l_ptr, dest); if (l_ptr) { - dbg("tipc_link_send: found link %x for dest %x\n", l_ptr, dest); res = tipc_link_send_buf(l_ptr, buf); - } else { - dbg("Attempt to send msg to unreachable node:\n"); - msg_dbg(buf_msg(buf),">>>"); - buf_discard(buf); } tipc_node_unlock(n_ptr); } else { @@ -1254,6 +1242,8 @@ int tipc_link_send_sections_fast(struct port *sender, int res; u32 selector = msg_origport(hdr) & 1; + assert(destaddr != tipc_own_addr); + again: /* * Try building message using port's max_pkt hint. @@ -1614,121 +1604,40 @@ void tipc_link_push_queue(struct link *l_ptr) tipc_bearer_schedule(l_ptr->b_ptr, l_ptr); } -static void link_reset_all(unsigned long addr) -{ - struct node *n_ptr; - char addr_string[16]; - u32 i; - - read_lock_bh(&tipc_net_lock); - n_ptr = tipc_node_find((u32)addr); - if (!n_ptr) { - read_unlock_bh(&tipc_net_lock); - return; /* node no longer exists */ - } - - tipc_node_lock(n_ptr); - - warn("Resetting all links to %s\n", - addr_string_fill(addr_string, n_ptr->addr)); - - for (i = 0; i < MAX_BEARERS; i++) { - if (n_ptr->links[i]) { - link_print(n_ptr->links[i], TIPC_OUTPUT, - "Resetting link\n"); - tipc_link_reset(n_ptr->links[i]); - } - } - - tipc_node_unlock(n_ptr); - read_unlock_bh(&tipc_net_lock); -} - -static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) -{ - struct tipc_msg *msg = buf_msg(buf); - - warn("Retransmission failure on link <%s>\n", l_ptr->name); - tipc_msg_print(TIPC_OUTPUT, msg, ">RETR-FAIL>"); - - if (l_ptr->addr) { - - /* Handle failure on standard link */ - - link_print(l_ptr, TIPC_OUTPUT, "Resetting link\n"); - tipc_link_reset(l_ptr); - - } else { - - /* Handle failure on broadcast link */ - - struct node *n_ptr; - char addr_string[16]; - - tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); - tipc_printf(TIPC_OUTPUT, "Outstanding acks: %u\n", (u32)TIPC_SKB_CB(buf)->handle); - - n_ptr = l_ptr->owner->next; - tipc_node_lock(n_ptr); - - addr_string_fill(addr_string, n_ptr->addr); - tipc_printf(TIPC_OUTPUT, "Multicast link info for %s\n", addr_string); - tipc_printf(TIPC_OUTPUT, "Supported: %d, ", n_ptr->bclink.supported); - tipc_printf(TIPC_OUTPUT, "Acked: %u\n", n_ptr->bclink.acked); - tipc_printf(TIPC_OUTPUT, "Last in: %u, ", n_ptr->bclink.last_in); - tipc_printf(TIPC_OUTPUT, "Gap after: %u, ", n_ptr->bclink.gap_after); - tipc_printf(TIPC_OUTPUT, "Gap to: %u\n", n_ptr->bclink.gap_to); - tipc_printf(TIPC_OUTPUT, "Nack sync: %u\n\n", n_ptr->bclink.nack_sync); - - tipc_k_signal((Handler)link_reset_all, (unsigned long)n_ptr->addr); - - tipc_node_unlock(n_ptr); - - l_ptr->stale_count = 0; - } -} - void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, u32 retransmits) { struct tipc_msg *msg; - if (!buf) - return; - - msg = buf_msg(buf); - dbg("Retransmitting %u in link %x\n", retransmits, l_ptr); - if (tipc_bearer_congested(l_ptr->b_ptr, l_ptr)) { - if (!skb_cloned(buf)) { - msg_dbg(msg, ">NO_RETR->BCONG>"); - dbg_print_link(l_ptr, " "); - l_ptr->retransm_queue_head = msg_seqno(msg); - l_ptr->retransm_queue_size = retransmits; - return; - } else { - /* Don't retransmit if driver already has the buffer */ - } - } else { - /* Detect repeated retransmit failures on uncongested bearer */ - - if (l_ptr->last_retransmitted == msg_seqno(msg)) { - if (++l_ptr->stale_count > 100) { - link_retransmit_failure(l_ptr, buf); - return; - } - } else { - l_ptr->last_retransmitted = msg_seqno(msg); - l_ptr->stale_count = 1; - } + if (tipc_bearer_congested(l_ptr->b_ptr, l_ptr) && buf && !skb_cloned(buf)) { + msg_dbg(buf_msg(buf), ">NO_RETR->BCONG>"); + dbg_print_link(l_ptr, " "); + l_ptr->retransm_queue_head = msg_seqno(buf_msg(buf)); + l_ptr->retransm_queue_size = retransmits; + return; } - while (retransmits && (buf != l_ptr->next_out) && buf && !skb_cloned(buf)) { msg = buf_msg(buf); msg_set_ack(msg, mod(l_ptr->next_in_no - 1)); msg_set_bcast_ack(msg, l_ptr->owner->bclink.last_in); if (tipc_bearer_send(l_ptr->b_ptr, buf, &l_ptr->media_addr)) { + /* Catch if retransmissions fail repeatedly: */ + if (l_ptr->last_retransmitted == msg_seqno(msg)) { + if (++l_ptr->stale_count > 100) { + tipc_msg_print(TIPC_CONS, buf_msg(buf), ">RETR>"); + info("...Retransmitted %u times\n", + l_ptr->stale_count); + link_print(l_ptr, TIPC_CONS, "Resetting Link\n"); + tipc_link_reset(l_ptr); + break; + } + } else { + l_ptr->stale_count = 0; + } + l_ptr->last_retransmitted = msg_seqno(msg); + msg_dbg(buf_msg(buf), ">RETR>"); buf = buf->next; retransmits--; @@ -1741,7 +1650,6 @@ void tipc_link_retransmit(struct link *l_ptr, struct sk_buff *buf, return; } } - l_ptr->retransm_queue_head = l_ptr->retransm_queue_size = 0; } @@ -1812,11 +1720,6 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) link_recv_non_seq(buf); continue; } - - if (unlikely(!msg_short(msg) && - (msg_destnode(msg) != tipc_own_addr))) - goto cont; - n_ptr = tipc_node_find(msg_prevnode(msg)); if (unlikely(!n_ptr)) goto cont; @@ -2237,7 +2140,7 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf) if (msg_linkprio(msg) && (msg_linkprio(msg) != l_ptr->priority)) { - warn("Resetting link <%s>, priority change %u->%u\n", + warn("Changing prio <%s>: %u->%u\n", l_ptr->name, l_ptr->priority, msg_linkprio(msg)); l_ptr->priority = msg_linkprio(msg); tipc_link_reset(l_ptr); /* Enforce change to take effect */ @@ -2306,22 +2209,17 @@ void tipc_link_tunnel(struct link *l_ptr, u32 length = msg_size(msg); tunnel = l_ptr->owner->active_links[selector & 1]; - if (!tipc_link_is_up(tunnel)) { - warn("Link changeover error, " - "tunnel link no longer available\n"); + if (!tipc_link_is_up(tunnel)) return; - } msg_set_size(tunnel_hdr, length + INT_H_SIZE); buf = buf_acquire(length + INT_H_SIZE); - if (!buf) { - warn("Link changeover error, " - "unable to send tunnel msg\n"); + if (!buf) return; - } memcpy(buf->data, (unchar *)tunnel_hdr, INT_H_SIZE); memcpy(buf->data + INT_H_SIZE, (unchar *)msg, length); dbg("%c->%c:", l_ptr->b_ptr->net_plane, tunnel->b_ptr->net_plane); msg_dbg(buf_msg(buf), ">SEND>"); + assert(tunnel); tipc_link_send_buf(tunnel, buf); } @@ -2337,27 +2235,23 @@ void tipc_link_changeover(struct link *l_ptr) u32 msgcount = l_ptr->out_queue_size; struct sk_buff *crs = l_ptr->first_out; struct link *tunnel = l_ptr->owner->active_links[0]; + int split_bundles = tipc_node_has_redundant_links(l_ptr->owner); struct tipc_msg tunnel_hdr; - int split_bundles; if (!tunnel) return; - if (!l_ptr->owner->permit_changeover) { - warn("Link changeover error, " - "peer did not permit changeover\n"); + if (!l_ptr->owner->permit_changeover) return; - } msg_init(&tunnel_hdr, CHANGEOVER_PROTOCOL, ORIGINAL_MSG, TIPC_OK, INT_H_SIZE, l_ptr->addr); msg_set_bearer_id(&tunnel_hdr, l_ptr->peer_bearer_id); msg_set_msgcnt(&tunnel_hdr, msgcount); - dbg("Link changeover requires %u tunnel messages\n", msgcount); - if (!l_ptr->first_out) { struct sk_buff *buf; + assert(!msgcount); buf = buf_acquire(INT_H_SIZE); if (buf) { memcpy(buf->data, (unchar *)&tunnel_hdr, INT_H_SIZE); @@ -2367,15 +2261,10 @@ void tipc_link_changeover(struct link *l_ptr) msg_dbg(&tunnel_hdr, "EMPTY>SEND>"); tipc_link_send_buf(tunnel, buf); } else { - warn("Link changeover error, " - "unable to send changeover msg\n"); + warn("Memory squeeze; link changeover failed\n"); } return; } - - split_bundles = (l_ptr->owner->active_links[0] != - l_ptr->owner->active_links[1]); - while (crs) { struct tipc_msg *msg = buf_msg(crs); @@ -2421,8 +2310,7 @@ void tipc_link_send_duplicate(struct link *l_ptr, struct link *tunnel) msg_set_size(&tunnel_hdr, length + INT_H_SIZE); outbuf = buf_acquire(length + INT_H_SIZE); if (outbuf == NULL) { - warn("Link changeover error, " - "unable to send duplicate msg\n"); + warn("Memory squeeze; buffer duplication failed\n"); return; } memcpy(outbuf->data, (unchar *)&tunnel_hdr, INT_H_SIZE); @@ -2476,15 +2364,11 @@ static int link_recv_changeover_msg(struct link **l_ptr, u32 msg_count = msg_msgcnt(tunnel_msg); dest_link = (*l_ptr)->owner->links[msg_bearer_id(tunnel_msg)]; + assert(dest_link != *l_ptr); if (!dest_link) { msg_dbg(tunnel_msg, "NOLINK/\n", - (*l_ptr)->name); - goto exit; - } dbg("%c<-%c:", dest_link->b_ptr->net_plane, (*l_ptr)->b_ptr->net_plane); *l_ptr = dest_link; @@ -2497,7 +2381,7 @@ static int link_recv_changeover_msg(struct link **l_ptr, } *buf = buf_extract(tunnel_buf,INT_H_SIZE); if (*buf == NULL) { - warn("Link changeover error, duplicate msg dropped\n"); + warn("Memory squeeze; failed to extract msg\n"); goto exit; } msg_dbg(tunnel_msg, "TNL, changeover initiated by peer\n", - dest_link->name); tipc_link_reset(dest_link); dest_link->exp_msg_count = msg_count; - dbg("Expecting %u tunnelled messages\n", msg_count); if (!msg_count) goto exit; } else if (dest_link->exp_msg_count == START_CHANGEOVER) { msg_dbg(tunnel_msg, "BLK/FIRST/exp_msg_count = msg_count; - dbg("Expecting %u tunnelled messages\n", msg_count); if (!msg_count) goto exit; } @@ -2527,8 +2407,6 @@ static int link_recv_changeover_msg(struct link **l_ptr, /* Receive original message */ if (dest_link->exp_msg_count == 0) { - warn("Link switchover error, " - "got too many tunnelled messages\n"); msg_dbg(tunnel_msg, "OVERDUE/DROP/type, publ->lower, publ->upper); publ->key += 1222345; p = tipc_nametbl_remove_publ(publ->type, publ->lower, publ->node, publ->ref, publ->key); + assert(p == publ); write_unlock_bh(&tipc_nametbl_lock); - - if (p != publ) { - err("Unable to remove publication from failed node\n" - "(type=%u, lower=%u, node=0x%x, ref=%u, key=%u)\n", - publ->type, publ->lower, publ->node, publ->ref, publ->key); - } - - if (p) { - kfree(p); - } + kfree(publ); } /** @@ -283,15 +275,9 @@ void tipc_named_recv(struct sk_buff *buf) if (publ) { tipc_nodesub_unsubscribe(&publ->subscr); kfree(publ); - } else { - err("Unable to remove publication by node 0x%x\n" - "(type=%u, lower=%u, ref=%u, key=%u)\n", - msg_orignode(msg), - ntohl(item->type), ntohl(item->lower), - ntohl(item->ref), ntohl(item->key)); } } else { - warn("Unrecognized name table message received\n"); + warn("tipc_named_recv: unknown msg\n"); } item++; } diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 049242ea5..d129422fc 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -71,7 +71,7 @@ struct sub_seq { * @sseq: pointer to dynamically-sized array of sub-sequences of this 'type'; * sub-sequences are sorted in ascending order * @alloc: number of sub-sequences currently in array - * @first_free: array index of first unused sub-sequence entry + * @first_free: upper bound of highest sub-sequence + 1 * @ns_list: links to adjacent name sequences in hash chain * @subscriptions: list of subscriptions for this 'type' * @lock: spinlock controlling access to name sequence structure @@ -101,7 +101,7 @@ struct name_table { static struct name_table table = { NULL } ; static atomic_t rsv_publ_ok = ATOMIC_INIT(0); -DEFINE_RWLOCK(tipc_nametbl_lock); +rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED; static int hash(int x) @@ -117,12 +117,14 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper, u32 scope, u32 node, u32 port_ref, u32 key) { - struct publication *publ = kzalloc(sizeof(*publ), GFP_ATOMIC); + struct publication *publ = + (struct publication *)kmalloc(sizeof(*publ), GFP_ATOMIC); if (publ == NULL) { - warn("Publication creation failure, no memory\n"); + warn("Memory squeeze; failed to create publication\n"); return NULL; } + memset(publ, 0, sizeof(*publ)); publ->type = type; publ->lower = lower; publ->upper = upper; @@ -142,7 +144,11 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper, static struct sub_seq *tipc_subseq_alloc(u32 cnt) { - struct sub_seq *sseq = kcalloc(cnt, sizeof(struct sub_seq), GFP_ATOMIC); + u32 sz = cnt * sizeof(struct sub_seq); + struct sub_seq *sseq = (struct sub_seq *)kmalloc(sz, GFP_ATOMIC); + + if (sseq) + memset(sseq, 0, sz); return sseq; } @@ -154,20 +160,22 @@ static struct sub_seq *tipc_subseq_alloc(u32 cnt) static struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_head) { - struct name_seq *nseq = kzalloc(sizeof(*nseq), GFP_ATOMIC); + struct name_seq *nseq = + (struct name_seq *)kmalloc(sizeof(*nseq), GFP_ATOMIC); struct sub_seq *sseq = tipc_subseq_alloc(1); if (!nseq || !sseq) { - warn("Name sequence creation failed, no memory\n"); + warn("Memory squeeze; failed to create name sequence\n"); kfree(nseq); kfree(sseq); return NULL; } - spin_lock_init(&nseq->lock); + memset(nseq, 0, sizeof(*nseq)); + nseq->lock = SPIN_LOCK_UNLOCKED; nseq->type = type; nseq->sseqs = sseq; - dbg("tipc_nameseq_create(): nseq = %p, type %u, ssseqs %p, ff: %u\n", + dbg("tipc_nameseq_create() nseq = %x type %u, ssseqs %x, ff: %u\n", nseq, type, nseq->sseqs, nseq->first_free); nseq->alloc = 1; INIT_HLIST_NODE(&nseq->ns_list); @@ -245,16 +253,16 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, struct sub_seq *sseq; int created_subseq = 0; + assert(nseq->first_free <= nseq->alloc); sseq = nameseq_find_subseq(nseq, lower); - dbg("nameseq_ins: for seq %p, {%u,%u}, found sseq %p\n", + dbg("nameseq_ins: for seq %x,<%u,%u>, found sseq %x\n", nseq, type, lower, sseq); if (sseq) { /* Lower end overlaps existing entry => need an exact match */ if ((sseq->lower != lower) || (sseq->upper != upper)) { - warn("Cannot publish {%u,%u,%u}, overlap error\n", - type, lower, upper); + warn("Overlapping publ <%u,%u,%u>\n", type, lower, upper); return NULL; } } else { @@ -269,27 +277,25 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, if ((inspos < nseq->first_free) && (upper >= nseq->sseqs[inspos].lower)) { - warn("Cannot publish {%u,%u,%u}, overlap error\n", - type, lower, upper); + warn("Overlapping publ <%u,%u,%u>\n", type, lower, upper); return NULL; } /* Ensure there is space for new sub-sequence */ if (nseq->first_free == nseq->alloc) { - struct sub_seq *sseqs = tipc_subseq_alloc(nseq->alloc * 2); - - if (!sseqs) { - warn("Cannot publish {%u,%u,%u}, no memory\n", - type, lower, upper); + struct sub_seq *sseqs = nseq->sseqs; + nseq->sseqs = tipc_subseq_alloc(nseq->alloc * 2); + if (nseq->sseqs != NULL) { + memcpy(nseq->sseqs, sseqs, + nseq->alloc * sizeof (struct sub_seq)); + kfree(sseqs); + dbg("Allocated %u sseqs\n", nseq->alloc); + nseq->alloc *= 2; + } else { + warn("Memory squeeze; failed to create sub-sequence\n"); return NULL; } - dbg("Allocated %u more sseqs\n", nseq->alloc); - memcpy(sseqs, nseq->sseqs, - nseq->alloc * sizeof(struct sub_seq)); - kfree(nseq->sseqs); - nseq->sseqs = sseqs; - nseq->alloc *= 2; } dbg("Have %u sseqs for type %u\n", nseq->alloc, type); @@ -305,7 +311,7 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, sseq->upper = upper; created_subseq = 1; } - dbg("inserting {%u,%u,%u} from <0x%x:%u> into sseq %p(%u,%u) of seq %p\n", + dbg("inserting (%u %u %u) from %x:%u into sseq %x(%u,%u) of seq %x\n", type, lower, upper, node, port, sseq, sseq->lower, sseq->upper, nseq); @@ -314,7 +320,7 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, publ = publ_create(type, lower, upper, scope, node, port, key); if (!publ) return NULL; - dbg("inserting publ %p, node=0x%x publ->node=0x%x, subscr->node=%p\n", + dbg("inserting publ %x, node=%x publ->node=%x, subscr->node=%x\n", publ, node, publ->node, publ->subscr.node); if (!sseq->zone_list) @@ -361,34 +367,37 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, /** * tipc_nameseq_remove_publ - - * - * NOTE: There may be cases where TIPC is asked to remove a publication - * that is not in the name table. For example, if another node issues a - * publication for a name sequence that overlaps an existing name sequence - * the publication will not be recorded, which means the publication won't - * be found when the name sequence is later withdrawn by that node. - * A failed withdraw request simply returns a failure indication and lets the - * caller issue any error or warning messages associated with such a problem. */ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 inst, u32 node, u32 ref, u32 key) { struct publication *publ; - struct publication *curr; struct publication *prev; struct sub_seq *sseq = nameseq_find_subseq(nseq, inst); struct sub_seq *free; struct subscription *s, *st; int removed_subseq = 0; - if (!sseq) - return NULL; + assert(nseq); - dbg("tipc_nameseq_remove_publ: seq: %p, sseq %p, {%u,%u}, key %u\n", - nseq, sseq, nseq->type, inst, key); + if (!sseq) { + int i; - /* Remove publication from zone scope list */ + warn("Withdraw unknown <%u,%u>?\n", nseq->type, inst); + assert(nseq->sseqs); + dbg("Dumping subseqs %x for %x, alloc = %u,ff=%u\n", + nseq->sseqs, nseq, nseq->alloc, + nseq->first_free); + for (i = 0; i < nseq->first_free; i++) { + dbg("Subseq %u(%x): lower = %u,upper = %u\n", + i, &nseq->sseqs[i], nseq->sseqs[i].lower, + nseq->sseqs[i].upper); + } + return NULL; + } + dbg("nameseq_remove: seq: %x, sseq %x, <%u,%u> key %u\n", + nseq, sseq, nseq->type, inst, key); prev = sseq->zone_list; publ = sseq->zone_list->zone_list_next; @@ -396,12 +405,7 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i (publ->node && (publ->node != node))) { prev = publ; publ = publ->zone_list_next; - if (prev == sseq->zone_list) { - - /* Prevent endless loop if publication not found */ - - return NULL; - } + assert(prev != sseq->zone_list); } if (publ != sseq->zone_list) prev->zone_list_next = publ->zone_list_next; @@ -412,24 +416,14 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i sseq->zone_list = NULL; } - /* Remove publication from cluster scope list, if present */ - if (in_own_cluster(node)) { prev = sseq->cluster_list; - curr = sseq->cluster_list->cluster_list_next; - while (curr != publ) { - prev = curr; - curr = curr->cluster_list_next; - if (prev == sseq->cluster_list) { - - /* Prevent endless loop for malformed list */ - - err("Unable to de-list cluster publication\n" - "{%u%u}, node=0x%x, ref=%u, key=%u)\n", - publ->type, publ->lower, publ->node, - publ->ref, publ->key); - goto end_cluster; - } + publ = sseq->cluster_list->cluster_list_next; + while ((publ->key != key) || (publ->ref != ref) || + (publ->node && (publ->node != node))) { + prev = publ; + publ = publ->cluster_list_next; + assert(prev != sseq->cluster_list); } if (publ != sseq->cluster_list) prev->cluster_list_next = publ->cluster_list_next; @@ -440,26 +434,15 @@ static struct publication *tipc_nameseq_remove_publ(struct name_seq *nseq, u32 i sseq->cluster_list = NULL; } } -end_cluster: - - /* Remove publication from node scope list, if present */ if (node == tipc_own_addr) { prev = sseq->node_list; - curr = sseq->node_list->node_list_next; - while (curr != publ) { - prev = curr; - curr = curr->node_list_next; - if (prev == sseq->node_list) { - - /* Prevent endless loop for malformed list */ - - err("Unable to de-list node publication\n" - "{%u%u}, node=0x%x, ref=%u, key=%u)\n", - publ->type, publ->lower, publ->node, - publ->ref, publ->key); - goto end_node; - } + publ = sseq->node_list->node_list_next; + while ((publ->key != key) || (publ->ref != ref) || + (publ->node && (publ->node != node))) { + prev = publ; + publ = publ->node_list_next; + assert(prev != sseq->node_list); } if (publ != sseq->node_list) prev->node_list_next = publ->node_list_next; @@ -470,18 +453,22 @@ end_cluster: sseq->node_list = NULL; } } -end_node: - - /* Contract subseq list if no more publications for that subseq */ + assert(!publ->node || (publ->node == node)); + assert(publ->ref == ref); + assert(publ->key == key); - if (!sseq->zone_list) { + /* + * Contract subseq list if no more publications: + */ + if (!sseq->node_list && !sseq->cluster_list && !sseq->zone_list) { free = &nseq->sseqs[nseq->first_free--]; memmove(sseq, sseq + 1, (free - (sseq + 1)) * sizeof (*sseq)); removed_subseq = 1; } - /* Notify any waiting subscriptions */ - + /* + * Any subscriptions waiting ? + */ list_for_each_entry_safe(s, st, &nseq->subscriptions, nameseq_list) { tipc_subscr_report_overlap(s, publ->lower, @@ -491,7 +478,6 @@ end_node: publ->node, removed_subseq); } - return publ; } @@ -544,7 +530,7 @@ static struct name_seq *nametbl_find_seq(u32 type) seq_head = &table.types[hash(type)]; hlist_for_each_entry(ns, seq_node, seq_head, ns_list) { if (ns->type == type) { - dbg("found %p\n", ns); + dbg("found %x\n", ns); return ns; } } @@ -557,21 +543,22 @@ struct publication *tipc_nametbl_insert_publ(u32 type, u32 lower, u32 upper, { struct name_seq *seq = nametbl_find_seq(type); - dbg("tipc_nametbl_insert_publ: {%u,%u,%u} found %p\n", type, lower, upper, seq); + dbg("ins_publ: <%u,%x,%x> found %x\n", type, lower, upper, seq); if (lower > upper) { - warn("Failed to publish illegal {%u,%u,%u}\n", + warn("Failed to publish illegal <%u,%u,%u>\n", type, lower, upper); return NULL; } - dbg("Publishing {%u,%u,%u} from 0x%x\n", type, lower, upper, node); + dbg("Publishing <%u,%u,%u> from %x\n", type, lower, upper, node); if (!seq) { seq = tipc_nameseq_create(type, &table.types[hash(type)]); - dbg("tipc_nametbl_insert_publ: created %p\n", seq); + dbg("tipc_nametbl_insert_publ: created %x\n", seq); } if (!seq) return NULL; + assert(seq->type == type); return tipc_nameseq_insert_publ(seq, type, lower, upper, scope, node, port, key); } @@ -585,7 +572,7 @@ struct publication *tipc_nametbl_remove_publ(u32 type, u32 lower, if (!seq) return NULL; - dbg("Withdrawing {%u,%u} from 0x%x\n", type, lower, node); + dbg("Withdrawing <%u,%u> from %x\n", type, lower, node); publ = tipc_nameseq_remove_publ(seq, lower, node, ref, key); if (!seq->first_free && list_empty(&seq->subscriptions)) { @@ -751,12 +738,12 @@ struct publication *tipc_nametbl_publish(u32 type, u32 lower, u32 upper, struct publication *publ; if (table.local_publ_count >= tipc_max_publications) { - warn("Publication failed, local publication limit reached (%u)\n", + warn("Failed publish: max %u local publication\n", tipc_max_publications); return NULL; } if ((type < TIPC_RESERVED_TYPES) && !atomic_read(&rsv_publ_ok)) { - warn("Publication failed, reserved name {%u,%u,%u}\n", + warn("Failed to publish reserved name <%u,%u,%u>\n", type, lower, upper); return NULL; } @@ -780,10 +767,10 @@ int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key) { struct publication *publ; - dbg("tipc_nametbl_withdraw: {%u,%u}, key=%u\n", type, lower, key); + dbg("tipc_nametbl_withdraw:<%d,%d,%d>\n", type, lower, key); write_lock_bh(&tipc_nametbl_lock); publ = tipc_nametbl_remove_publ(type, lower, tipc_own_addr, ref, key); - if (likely(publ)) { + if (publ) { table.local_publ_count--; if (publ->scope != TIPC_NODE_SCOPE) tipc_named_withdraw(publ); @@ -793,9 +780,6 @@ int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key) return 1; } write_unlock_bh(&tipc_nametbl_lock); - err("Unable to remove local publication\n" - "(type=%u, lower=%u, ref=%u, key=%u)\n", - type, lower, ref, key); return 0; } @@ -803,7 +787,8 @@ int tipc_nametbl_withdraw(u32 type, u32 lower, u32 ref, u32 key) * tipc_nametbl_subscribe - add a subscription object to the name table */ -void tipc_nametbl_subscribe(struct subscription *s) +void +tipc_nametbl_subscribe(struct subscription *s) { u32 type = s->seq.type; struct name_seq *seq; @@ -815,13 +800,11 @@ void tipc_nametbl_subscribe(struct subscription *s) } if (seq){ spin_lock_bh(&seq->lock); - dbg("tipc_nametbl_subscribe:found %p for {%u,%u,%u}\n", + dbg("tipc_nametbl_subscribe:found %x for <%u,%u,%u>\n", seq, type, s->seq.lower, s->seq.upper); + assert(seq->type == type); tipc_nameseq_subscribe(seq, s); spin_unlock_bh(&seq->lock); - } else { - warn("Failed to create subscription for {%u,%u,%u}\n", - s->seq.type, s->seq.lower, s->seq.upper); } write_unlock_bh(&tipc_nametbl_lock); } @@ -830,7 +813,8 @@ void tipc_nametbl_subscribe(struct subscription *s) * tipc_nametbl_unsubscribe - remove a subscription object from name table */ -void tipc_nametbl_unsubscribe(struct subscription *s) +void +tipc_nametbl_unsubscribe(struct subscription *s) { struct name_seq *seq; @@ -1052,7 +1036,7 @@ int tipc_nametbl_init(void) { int array_size = sizeof(struct hlist_head) * tipc_nametbl_size; - table.types = kmalloc(array_size, GFP_ATOMIC); + table.types = (struct hlist_head *)kmalloc(array_size, GFP_ATOMIC); if (!table.types) return -ENOMEM; @@ -1065,20 +1049,35 @@ int tipc_nametbl_init(void) void tipc_nametbl_stop(void) { + struct hlist_head *seq_head; + struct hlist_node *seq_node; + struct hlist_node *tmp; + struct name_seq *seq; u32 i; if (!table.types) return; - /* Verify name table is empty, then release it */ - write_lock_bh(&tipc_nametbl_lock); for (i = 0; i < tipc_nametbl_size; i++) { - if (!hlist_empty(&table.types[i])) - err("tipc_nametbl_stop(): hash chain %u is non-null\n", i); + seq_head = &table.types[i]; + hlist_for_each_entry_safe(seq, seq_node, tmp, seq_head, ns_list) { + struct sub_seq *sseq = seq->sseqs; + + for (; sseq != &seq->sseqs[seq->first_free]; sseq++) { + struct publication *publ = sseq->zone_list; + assert(publ); + do { + struct publication *next = + publ->zone_list_next; + kfree(publ); + publ = next; + } + while (publ != sseq->zone_list); + } + } } kfree(table.types); table.types = NULL; write_unlock_bh(&tipc_nametbl_lock); } - diff --git a/net/tipc/net.c b/net/tipc/net.c index a991bf8a7..f7c8223dd 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c @@ -115,7 +115,7 @@ * - A local spin_lock protecting the queue of subscriber events. */ -DEFINE_RWLOCK(tipc_net_lock); +rwlock_t tipc_net_lock = RW_LOCK_UNLOCKED; struct network tipc_net = { NULL }; struct node *tipc_net_select_remote_node(u32 addr, u32 ref) @@ -160,11 +160,14 @@ void tipc_net_send_external_routes(u32 dest) static int net_init(void) { + u32 sz = sizeof(struct _zone *) * (tipc_max_zones + 1); + memset(&tipc_net, 0, sizeof(tipc_net)); - tipc_net.zones = kcalloc(tipc_max_zones + 1, sizeof(struct _zone *), GFP_ATOMIC); + tipc_net.zones = (struct _zone **)kmalloc(sz, GFP_ATOMIC); if (!tipc_net.zones) { return -ENOMEM; } + memset(tipc_net.zones, 0, sz); return TIPC_OK; } diff --git a/net/tipc/node.c b/net/tipc/node.c index fc6d09630..0d5db06e2 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -2,7 +2,7 @@ * net/tipc/node.c: TIPC node management routines * * Copyright (c) 2000-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,37 +61,34 @@ struct node *tipc_node_create(u32 addr) struct node **curr_node; n_ptr = kmalloc(sizeof(*n_ptr),GFP_ATOMIC); - if (!n_ptr) { - warn("Node creation failed, no memory\n"); - return NULL; - } - - c_ptr = tipc_cltr_find(addr); - if (!c_ptr) { - c_ptr = tipc_cltr_create(addr); - } - if (!c_ptr) { - kfree(n_ptr); - return NULL; - } - - memset(n_ptr, 0, sizeof(*n_ptr)); - n_ptr->addr = addr; - spin_lock_init(&n_ptr->lock); - INIT_LIST_HEAD(&n_ptr->nsub); - n_ptr->owner = c_ptr; - tipc_cltr_attach_node(c_ptr, n_ptr); - n_ptr->last_router = -1; - - /* Insert node into ordered list */ - for (curr_node = &tipc_nodes; *curr_node; - curr_node = &(*curr_node)->next) { - if (addr < (*curr_node)->addr) { - n_ptr->next = *curr_node; - break; - } - } - (*curr_node) = n_ptr; + if (n_ptr != NULL) { + memset(n_ptr, 0, sizeof(*n_ptr)); + n_ptr->addr = addr; + n_ptr->lock = SPIN_LOCK_UNLOCKED; + INIT_LIST_HEAD(&n_ptr->nsub); + + c_ptr = tipc_cltr_find(addr); + if (c_ptr == NULL) + c_ptr = tipc_cltr_create(addr); + if (c_ptr != NULL) { + n_ptr->owner = c_ptr; + tipc_cltr_attach_node(c_ptr, n_ptr); + n_ptr->last_router = -1; + + /* Insert node into ordered list */ + for (curr_node = &tipc_nodes; *curr_node; + curr_node = &(*curr_node)->next) { + if (addr < (*curr_node)->addr) { + n_ptr->next = *curr_node; + break; + } + } + (*curr_node) = n_ptr; + } else { + kfree(n_ptr); + n_ptr = NULL; + } + } return n_ptr; } @@ -125,8 +122,6 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) { struct link **active = &n_ptr->active_links[0]; - n_ptr->working_links++; - info("Established link <%s> on network plane %c\n", l_ptr->name, l_ptr->b_ptr->net_plane); @@ -137,7 +132,7 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) return; } if (l_ptr->priority < active[0]->priority) { - info("New link <%s> becomes standby\n", l_ptr->name); + info("Link is standby\n"); return; } tipc_link_send_duplicate(active[0], l_ptr); @@ -145,9 +140,8 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) active[0] = l_ptr; return; } - info("Old link <%s> becomes standby\n", active[0]->name); - if (active[1] != active[0]) - info("Old link <%s> becomes standby\n", active[1]->name); + info("Link <%s> on network plane %c becomes standby\n", + active[0]->name, active[0]->b_ptr->net_plane); active[0] = active[1] = l_ptr; } @@ -187,8 +181,6 @@ void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) { struct link **active; - n_ptr->working_links--; - if (!tipc_link_is_active(l_ptr)) { info("Lost standby link <%s> on network plane %c\n", l_ptr->name, l_ptr->b_ptr->net_plane); @@ -218,7 +210,8 @@ int tipc_node_has_active_links(struct node *n_ptr) int tipc_node_has_redundant_links(struct node *n_ptr) { - return (n_ptr->working_links > 1); + return (tipc_node_has_active_links(n_ptr) && + (n_ptr->active_links[0] != n_ptr->active_links[1])); } static int tipc_node_has_active_routes(struct node *n_ptr) @@ -241,6 +234,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) u32 bearer_id = l_ptr->b_ptr->identity; char addr_string[16]; + assert(bearer_id < MAX_BEARERS); if (n_ptr->link_cnt >= 2) { char addr_string[16]; @@ -255,7 +249,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) n_ptr->link_cnt++; return n_ptr; } - err("Attempt to establish second link on <%s> to %s \n", + err("Attempt to establish second link on <%s> to <%s> \n", l_ptr->b_ptr->publ.name, addr_string_fill(addr_string, l_ptr->addr)); } @@ -320,7 +314,7 @@ static void node_established_contact(struct node *n_ptr) struct cluster *c_ptr; dbg("node_established_contact:-> %x\n", n_ptr->addr); - if (!tipc_node_has_active_routes(n_ptr) && in_own_cluster(n_ptr->addr)) { + if (!tipc_node_has_active_routes(n_ptr)) { tipc_k_signal((Handler)tipc_named_node_up, n_ptr->addr); } @@ -592,7 +586,6 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) struct sk_buff *buf; struct node *n_ptr; struct tipc_node_info node_info; - u32 payload_size; if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); @@ -609,11 +602,8 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) /* For now, get space for all other nodes (will need to modify this when slave nodes are supported */ - payload_size = TLV_SPACE(sizeof(node_info)) * (tipc_max_nodes - 1); - if (payload_size > 32768u) - return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (too many nodes)"); - buf = tipc_cfg_reply_alloc(payload_size); + buf = tipc_cfg_reply_alloc(TLV_SPACE(sizeof(node_info)) * + (tipc_max_nodes - 1)); if (!buf) return NULL; @@ -637,7 +627,6 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) struct sk_buff *buf; struct node *n_ptr; struct tipc_link_info link_info; - u32 payload_size; if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_NET_ADDR)) return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); @@ -650,15 +639,12 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) if (!tipc_nodes) return tipc_cfg_reply_none(); - - /* Get space for all unicast links + multicast link */ - - payload_size = TLV_SPACE(sizeof(link_info)) * - (tipc_net.zones[tipc_zone(tipc_own_addr)]->links + 1); - if (payload_size > 32768u) - return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED - " (too many links)"); - buf = tipc_cfg_reply_alloc(payload_size); + + /* For now, get space for 2 links to all other nodes + bcast link + (will need to modify this when slave nodes are supported */ + + buf = tipc_cfg_reply_alloc(TLV_SPACE(sizeof(link_info)) * + (2 * (tipc_max_nodes - 1) + 1)); if (!buf) return NULL; diff --git a/net/tipc/node.h b/net/tipc/node.h index a07cc79ea..781126e08 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h @@ -51,7 +51,6 @@ * @nsub: list of "node down" subscriptions monitoring node * @active_links: pointers to active links to node * @links: pointers to all links to node - * @working_links: number of working links to node (both active and standby) * @link_cnt: number of links to node * @permit_changeover: non-zero if node has redundant links to this system * @routers: bitmap (used for multicluster communication) @@ -77,7 +76,6 @@ struct node { struct link *active_links[2]; struct link *links[MAX_BEARERS]; int link_cnt; - int working_links; int permit_changeover; u32 routers[512/32]; int last_router; diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index cc3fff3de..cff4068cc 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c @@ -47,19 +47,18 @@ void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, void *usr_handle, net_ev_handler handle_down) { - if (addr == tipc_own_addr) { - node_sub->node = NULL; + node_sub->node = NULL; + if (addr == tipc_own_addr) return; - } - - node_sub->node = tipc_node_find(addr); - if (!node_sub->node) { - warn("Node subscription rejected, unknown node 0x%x\n", addr); + if (!tipc_addr_node_valid(addr)) { + warn("node_subscr with illegal %x\n", addr); return; } + node_sub->handle_node_down = handle_down; node_sub->usr_handle = usr_handle; - + node_sub->node = tipc_node_find(addr); + assert(node_sub->node); tipc_node_lock(node_sub->node); list_add_tail(&node_sub->nodesub_list, &node_sub->node->nsub); tipc_node_unlock(node_sub->node); diff --git a/net/tipc/port.c b/net/tipc/port.c index b9c8c6b9e..67e96cb1e 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -57,8 +57,8 @@ static struct sk_buff *msg_queue_head = NULL; static struct sk_buff *msg_queue_tail = NULL; -DEFINE_SPINLOCK(tipc_port_list_lock); -static DEFINE_SPINLOCK(queue_lock); +spinlock_t tipc_port_list_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t queue_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(ports); static void port_handle_node_down(unsigned long ref); @@ -168,6 +168,7 @@ void tipc_port_recv_mcast(struct sk_buff *buf, struct port_list *dp) struct port_list *item = dp; int cnt = 0; + assert(buf); msg = buf_msg(buf); /* Create destination port list, if one wasn't supplied */ @@ -195,7 +196,7 @@ void tipc_port_recv_mcast(struct sk_buff *buf, struct port_list *dp) struct sk_buff *b = skb_clone(buf, GFP_ATOMIC); if (b == NULL) { - warn("Unable to deliver multicast message(s)\n"); + warn("Buffer allocation failure\n"); msg_dbg(msg, "LOST:"); goto exit; } @@ -226,14 +227,15 @@ u32 tipc_createport_raw(void *usr_handle, struct tipc_msg *msg; u32 ref; - p_ptr = kzalloc(sizeof(*p_ptr), GFP_ATOMIC); - if (!p_ptr) { - warn("Port creation failed, no memory\n"); + p_ptr = kmalloc(sizeof(*p_ptr), GFP_ATOMIC); + if (p_ptr == NULL) { + warn("Memory squeeze; failed to create port\n"); return 0; } + memset(p_ptr, 0, sizeof(*p_ptr)); ref = tipc_ref_acquire(p_ptr, &p_ptr->publ.lock); if (!ref) { - warn("Port creation failed, reference table exhausted\n"); + warn("Reference Table Exhausted\n"); kfree(p_ptr); return 0; } @@ -808,20 +810,18 @@ static void port_dispatcher_sigh(void *dummy) void *usr_handle; int connected; int published; - u32 message_type; struct sk_buff *next = buf->next; struct tipc_msg *msg = buf_msg(buf); u32 dref = msg_destport(msg); - message_type = msg_type(msg); - if (message_type > TIPC_DIRECT_MSG) - goto reject; /* Unsupported message type */ - p_ptr = tipc_port_lock(dref); - if (!p_ptr) - goto reject; /* Port deleted while msg in queue */ - + if (!p_ptr) { + /* Port deleted while msg in queue */ + tipc_reject_msg(buf, TIPC_ERR_NO_PORT); + buf = next; + continue; + } orig.ref = msg_origport(msg); orig.node = msg_orignode(msg); up_ptr = p_ptr->user_port; @@ -832,7 +832,7 @@ static void port_dispatcher_sigh(void *dummy) if (unlikely(msg_errcode(msg))) goto err; - switch (message_type) { + switch (msg_type(msg)) { case TIPC_CONN_MSG:{ tipc_conn_msg_event cb = up_ptr->conn_msg_cb; @@ -874,7 +874,6 @@ static void port_dispatcher_sigh(void *dummy) &orig); break; } - case TIPC_MCAST_MSG: case TIPC_NAMED_MSG:{ tipc_named_msg_event cb = up_ptr->named_msg_cb; @@ -887,8 +886,7 @@ static void port_dispatcher_sigh(void *dummy) goto reject; dseq.type = msg_nametype(msg); dseq.lower = msg_nameinst(msg); - dseq.upper = (message_type == TIPC_NAMED_MSG) - ? dseq.lower : msg_nameupper(msg); + dseq.upper = dseq.lower; skb_pull(buf, msg_hdr_sz(msg)); cb(usr_handle, dref, &buf, msg_data(msg), msg_data_sz(msg), msg_importance(msg), @@ -901,7 +899,7 @@ static void port_dispatcher_sigh(void *dummy) buf = next; continue; err: - switch (message_type) { + switch (msg_type(msg)) { case TIPC_CONN_MSG:{ tipc_conn_shutdown_event cb = @@ -933,7 +931,6 @@ err: msg_data_sz(msg), msg_errcode(msg), &orig); break; } - case TIPC_MCAST_MSG: case TIPC_NAMED_MSG:{ tipc_named_msg_err_event cb = up_ptr->named_err_cb; @@ -943,8 +940,7 @@ err: break; dseq.type = msg_nametype(msg); dseq.lower = msg_nameinst(msg); - dseq.upper = (message_type == TIPC_NAMED_MSG) - ? dseq.lower : msg_nameupper(msg); + dseq.upper = dseq.lower; skb_pull(buf, msg_hdr_sz(msg)); cb(usr_handle, dref, &buf, msg_data(msg), msg_data_sz(msg), msg_errcode(msg), &dseq); @@ -1057,9 +1053,8 @@ int tipc_createport(u32 user_ref, struct port *p_ptr; u32 ref; - up_ptr = kmalloc(sizeof(*up_ptr), GFP_ATOMIC); - if (!up_ptr) { - warn("Port creation failed, no memory\n"); + up_ptr = (struct user_port *)kmalloc(sizeof(*up_ptr), GFP_ATOMIC); + if (up_ptr == NULL) { return -ENOMEM; } ref = tipc_createport_raw(NULL, port_dispatcher, port_wakeup, importance); @@ -1170,6 +1165,8 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) p_ptr = tipc_port_lock(ref); if (!p_ptr) return -EINVAL; + if (!p_ptr->publ.published) + goto exit; if (!seq) { list_for_each_entry_safe(publ, tpubl, &p_ptr->publications, pport_list) { @@ -1196,6 +1193,7 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) } if (list_empty(&p_ptr->publications)) p_ptr->publ.published = 0; +exit: tipc_port_unlock(p_ptr); return res; } diff --git a/net/tipc/ref.c b/net/tipc/ref.c index e6d6ae22e..33bbf5095 100644 --- a/net/tipc/ref.c +++ b/net/tipc/ref.c @@ -63,7 +63,7 @@ struct ref_table tipc_ref_table = { NULL }; -static DEFINE_RWLOCK(ref_table_lock); +static rwlock_t ref_table_lock = RW_LOCK_UNLOCKED; /** * tipc_ref_table_init - create reference table for objects @@ -79,7 +79,7 @@ int tipc_ref_table_init(u32 requested_size, u32 start) while (sz < requested_size) { sz <<= 1; } - table = vmalloc(sz * sizeof(*table)); + table = (struct reference *)vmalloc(sz * sizeof(struct reference)); if (table == NULL) return -ENOMEM; @@ -87,7 +87,7 @@ int tipc_ref_table_init(u32 requested_size, u32 start) index_mask = sz - 1; for (i = sz - 1; i >= 0; i--) { table[i].object = NULL; - spin_lock_init(&table[i].lock); + table[i].lock = SPIN_LOCK_UNLOCKED; table[i].data.next_plus_upper = (start & ~index_mask) + i - 1; } tipc_ref_table.entries = table; @@ -127,14 +127,7 @@ u32 tipc_ref_acquire(void *object, spinlock_t **lock) u32 next_plus_upper; u32 reference = 0; - if (!object) { - err("Attempt to acquire reference to non-existent object\n"); - return 0; - } - if (!tipc_ref_table.entries) { - err("Reference table not found during acquisition attempt\n"); - return 0; - } + assert(tipc_ref_table.entries && object); write_lock_bh(&ref_table_lock); if (tipc_ref_table.first_free) { @@ -169,28 +162,15 @@ void tipc_ref_discard(u32 ref) u32 index; u32 index_mask; - if (!ref) { - err("Attempt to discard reference 0\n"); - return; - } - if (!tipc_ref_table.entries) { - err("Reference table not found during discard attempt\n"); - return; - } + assert(tipc_ref_table.entries); + assert(ref != 0); write_lock_bh(&ref_table_lock); index_mask = tipc_ref_table.index_mask; index = ref & index_mask; entry = &(tipc_ref_table.entries[index]); - - if (!entry->object) { - err("Attempt to discard reference to non-existent object\n"); - goto exit; - } - if (entry->data.reference != ref) { - err("Attempt to discard non-existent reference\n"); - goto exit; - } + assert(entry->object != 0); + assert(entry->data.reference == ref); /* mark entry as unused */ entry->object = NULL; @@ -204,7 +184,6 @@ void tipc_ref_discard(u32 ref) /* increment upper bits of entry to invalidate subsequent references */ entry->data.next_plus_upper = (ref & ~index_mask) + (index_mask + 1); -exit: write_unlock_bh(&ref_table_lock); } diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 32d778448..648a734e6 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -169,6 +169,12 @@ static int tipc_create(struct socket *sock, int protocol) struct sock *sk; u32 ref; + if ((sock->type != SOCK_STREAM) && + (sock->type != SOCK_SEQPACKET) && + (sock->type != SOCK_DGRAM) && + (sock->type != SOCK_RDM)) + return -EPROTOTYPE; + if (unlikely(protocol != 0)) return -EPROTONOSUPPORT; @@ -193,9 +199,6 @@ static int tipc_create(struct socket *sock, int protocol) sock->ops = &msg_ops; sock->state = SS_READY; break; - default: - tipc_deleteport(ref); - return -EPROTOTYPE; } sk = sk_alloc(AF_TIPC, GFP_KERNEL, &tipc_proto, 1); @@ -423,7 +426,7 @@ static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m) if (copy_from_user(&hdr, m->msg_iov[0].iov_base, sizeof(hdr))) return -EFAULT; - if ((ntohs(hdr.tcm_type) & 0xC000) && (!capable(CAP_NET_ADMIN))) + if ((ntohs(hdr.tcm_type) & 0xC000) & (!capable(CAP_NET_ADMIN))) return -EACCES; return 0; @@ -434,7 +437,7 @@ static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m) * @iocb: (unused) * @sock: socket structure * @m: message to send - * @total_len: length of message + * @total_len: (unused) * * Message must have an destination specified explicitly. * Used for SOCK_RDM and SOCK_DGRAM messages, @@ -455,8 +458,7 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, if (unlikely(!dest)) return -EDESTADDRREQ; - if (unlikely((m->msg_namelen < sizeof(*dest)) || - (dest->family != AF_TIPC))) + if (unlikely(dest->family != AF_TIPC)) return -EINVAL; needs_conn = (sock->state != SS_READY); @@ -468,10 +470,6 @@ static int send_msg(struct kiocb *iocb, struct socket *sock, if ((tsock->p->published) || ((sock->type == SOCK_STREAM) && (total_len != 0))) return -EOPNOTSUPP; - if (dest->addrtype == TIPC_ADDR_NAME) { - tsock->p->conn_type = dest->addr.name.name.type; - tsock->p->conn_instance = dest->addr.name.name.instance; - } } if (down_interruptible(&tsock->sem)) @@ -540,7 +538,7 @@ exit: * @iocb: (unused) * @sock: socket structure * @m: message to send - * @total_len: length of message + * @total_len: (unused) * * Used for SOCK_SEQPACKET messages and SOCK_STREAM data. * @@ -563,15 +561,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock, return -ERESTARTSYS; } - do { - if (unlikely(sock->state != SS_CONNECTED)) { - if (sock->state == SS_DISCONNECTING) - res = -EPIPE; - else - res = -ENOTCONN; - goto exit; - } + if (unlikely(sock->state != SS_CONNECTED)) { + if (sock->state == SS_DISCONNECTING) + res = -EPIPE; + else + res = -ENOTCONN; + goto exit; + } + do { res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov); if (likely(res != -ELINKCONG)) { exit: @@ -599,8 +597,7 @@ exit: * * Used for SOCK_STREAM data. * - * Returns the number of bytes sent on success (or partial success), - * or errno if no data sent + * Returns the number of bytes sent on success, or errno otherwise */ @@ -614,7 +611,6 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, char __user *curr_start; int curr_left; int bytes_to_send; - int bytes_sent; int res; if (likely(total_len <= TIPC_MAX_USER_MSG_SIZE)) @@ -637,11 +633,11 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, * of small iovec entries into send_packet(). */ - curr_iov = m->msg_iov; - curr_iovlen = m->msg_iovlen; + my_msg = *m; + curr_iov = my_msg.msg_iov; + curr_iovlen = my_msg.msg_iovlen; my_msg.msg_iov = &my_iov; my_msg.msg_iovlen = 1; - bytes_sent = 0; while (curr_iovlen--) { curr_start = curr_iov->iov_base; @@ -652,18 +648,16 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, ? curr_left : TIPC_MAX_USER_MSG_SIZE; my_iov.iov_base = curr_start; my_iov.iov_len = bytes_to_send; - if ((res = send_packet(iocb, sock, &my_msg, 0)) < 0) { - return bytes_sent ? bytes_sent : res; - } + if ((res = send_packet(iocb, sock, &my_msg, 0)) < 0) + return res; curr_left -= bytes_to_send; curr_start += bytes_to_send; - bytes_sent += bytes_to_send; } curr_iov++; } - return bytes_sent; + return total_len; } /** @@ -733,7 +727,6 @@ static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, u32 anc_data[3]; u32 err; u32 dest_type; - int has_name; int res; if (likely(m->msg_controllen == 0)) @@ -745,10 +738,10 @@ static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, if (unlikely(err)) { anc_data[0] = err; anc_data[1] = msg_data_sz(msg); - if ((res = put_cmsg(m, SOL_TIPC, TIPC_ERRINFO, 8, anc_data))) + if ((res = put_cmsg(m, SOL_SOCKET, TIPC_ERRINFO, 8, anc_data))) return res; if (anc_data[1] && - (res = put_cmsg(m, SOL_TIPC, TIPC_RETDATA, anc_data[1], + (res = put_cmsg(m, SOL_SOCKET, TIPC_RETDATA, anc_data[1], msg_data(msg)))) return res; } @@ -758,28 +751,25 @@ static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg, dest_type = msg ? msg_type(msg) : TIPC_DIRECT_MSG; switch (dest_type) { case TIPC_NAMED_MSG: - has_name = 1; anc_data[0] = msg_nametype(msg); anc_data[1] = msg_namelower(msg); anc_data[2] = msg_namelower(msg); break; case TIPC_MCAST_MSG: - has_name = 1; anc_data[0] = msg_nametype(msg); anc_data[1] = msg_namelower(msg); anc_data[2] = msg_nameupper(msg); break; case TIPC_CONN_MSG: - has_name = (tport->conn_type != 0); anc_data[0] = tport->conn_type; anc_data[1] = tport->conn_instance; anc_data[2] = tport->conn_instance; break; default: - has_name = 0; + anc_data[0] = 0; } - if (has_name && - (res = put_cmsg(m, SOL_TIPC, TIPC_DESTNAME, 12, anc_data))) + if (anc_data[0] && + (res = put_cmsg(m, SOL_SOCKET, TIPC_DESTNAME, 12, anc_data))) return res; return 0; @@ -970,7 +960,7 @@ static int recv_stream(struct kiocb *iocb, struct socket *sock, restart: if (unlikely((skb_queue_len(&sock->sk->sk_receive_queue) == 0) && (flags & MSG_DONTWAIT))) { - res = -EWOULDBLOCK; + res = (sz_copied == 0) ? -EWOULDBLOCK : 0; goto exit; } @@ -1061,7 +1051,7 @@ restart: exit: up(&tsock->sem); - return sz_copied ? sz_copied : res; + return res ? res : sz_copied; } /** @@ -1246,8 +1236,7 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, if (sock->state == SS_READY) return -EOPNOTSUPP; - /* Issue Posix-compliant error code if socket is in the wrong state */ - + /* MOVE THE REST OF THIS ERROR CHECKING TO send_msg()? */ if (sock->state == SS_LISTENING) return -EOPNOTSUPP; if (sock->state == SS_CONNECTING) @@ -1255,20 +1244,13 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, if (sock->state != SS_UNCONNECTED) return -EISCONN; - /* - * Reject connection attempt using multicast address - * - * Note: send_msg() validates the rest of the address fields, - * so there's no need to do it here - */ - - if (dst->addrtype == TIPC_ADDR_MCAST) + if ((dst->family != AF_TIPC) || + ((dst->addrtype != TIPC_ADDR_NAME) && (dst->addrtype != TIPC_ADDR_ID))) return -EINVAL; /* Send a 'SYN-' to destination */ m.msg_name = dest; - m.msg_namelen = destlen; if ((res = send_msg(NULL, sock, &m, 0)) < 0) { sock->state = SS_DISCONNECTING; return res; @@ -1287,6 +1269,10 @@ static int connect(struct socket *sock, struct sockaddr *dest, int destlen, msg = buf_msg(buf); res = auto_connect(sock, tsock, msg); if (!res) { + if (dst->addrtype == TIPC_ADDR_NAME) { + tsock->p->conn_type = dst->addr.name.name.type; + tsock->p->conn_instance = dst->addr.name.name.instance; + } if (!msg_data_sz(msg)) advance_queue(tsock); } @@ -1400,7 +1386,7 @@ exit: /** * shutdown - shutdown socket connection * @sock: socket structure - * @how: direction to close (unused; always treated as read + write) + * @how: direction to close (always treated as read + write) * * Terminates connection (if necessary), then purges socket's receive queue. * @@ -1483,8 +1469,7 @@ restart: * Returns 0 on success, errno otherwise */ -static int setsockopt(struct socket *sock, - int lvl, int opt, char __user *ov, int ol) +static int setsockopt(struct socket *sock, int lvl, int opt, char *ov, int ol) { struct tipc_sock *tsock = tipc_sk(sock->sk); u32 value; @@ -1540,8 +1525,7 @@ static int setsockopt(struct socket *sock, * Returns 0 on success, errno otherwise */ -static int getsockopt(struct socket *sock, - int lvl, int opt, char __user *ov, int *ol) +static int getsockopt(struct socket *sock, int lvl, int opt, char *ov, int *ol) { struct tipc_sock *tsock = tipc_sk(sock->sk); int len; diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index c51600ba5..c5f026c7f 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@ -266,8 +266,7 @@ static void subscr_subscribe(struct tipc_subscr *s, /* Refuse subscription if global limit exceeded */ if (atomic_read(&topsrv.subscription_count) >= tipc_max_subscriptions) { - warn("Subscription rejected, subscription limit reached (%u)\n", - tipc_max_subscriptions); + warn("Failed: max %u subscriptions\n", tipc_max_subscriptions); subscr_terminate(subscriber); return; } @@ -275,8 +274,8 @@ static void subscr_subscribe(struct tipc_subscr *s, /* Allocate subscription object */ sub = kmalloc(sizeof(*sub), GFP_ATOMIC); - if (!sub) { - warn("Subscription rejected, no memory\n"); + if (sub == NULL) { + warn("Memory squeeze; ignoring subscription\n"); subscr_terminate(subscriber); return; } @@ -299,7 +298,8 @@ static void subscr_subscribe(struct tipc_subscr *s, if ((((sub->filter != TIPC_SUB_PORTS) && (sub->filter != TIPC_SUB_SERVICE))) || (sub->seq.lower > sub->seq.upper)) { - warn("Subscription rejected, illegal request\n"); + warn("Rejecting illegal subscription %u,%u,%u\n", + sub->seq.type, sub->seq.lower, sub->seq.upper); kfree(sub); subscr_terminate(subscriber); return; @@ -387,22 +387,23 @@ static void subscr_named_msg_event(void *usr_handle, dbg("subscr_named_msg_event: orig = %x own = %x,\n", orig->node, tipc_own_addr); if (size && (size != sizeof(struct tipc_subscr))) { - warn("Subscriber rejected, invalid subscription size\n"); + warn("Received tipc_subscr of invalid size\n"); return; } /* Create subscriber object */ - subscriber = kzalloc(sizeof(struct subscriber), GFP_ATOMIC); + subscriber = kmalloc(sizeof(struct subscriber), GFP_ATOMIC); if (subscriber == NULL) { - warn("Subscriber rejected, no memory\n"); + warn("Memory squeeze; ignoring subscriber setup\n"); return; } + memset(subscriber, 0, sizeof(struct subscriber)); INIT_LIST_HEAD(&subscriber->subscription_list); INIT_LIST_HEAD(&subscriber->subscriber_list); subscriber->ref = tipc_ref_acquire(subscriber, &subscriber->lock); if (subscriber->ref == 0) { - warn("Subscriber rejected, reference table exhausted\n"); + warn("Failed to acquire subscriber reference\n"); kfree(subscriber); return; } @@ -421,7 +422,7 @@ static void subscr_named_msg_event(void *usr_handle, NULL, &subscriber->port_ref); if (subscriber->port_ref == 0) { - warn("Subscriber rejected, unable to create port\n"); + warn("Memory squeeze; failed to create subscription port\n"); tipc_ref_discard(subscriber->ref); kfree(subscriber); return; @@ -456,7 +457,7 @@ int tipc_subscr_start(void) int res = -1; memset(&topsrv, 0, sizeof (topsrv)); - spin_lock_init(&topsrv.lock); + topsrv.lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&topsrv.subscriber_list); spin_lock_bh(&topsrv.lock); diff --git a/net/tipc/user_reg.c b/net/tipc/user_reg.c index 04d1b9be9..3f3f93397 100644 --- a/net/tipc/user_reg.c +++ b/net/tipc/user_reg.c @@ -67,7 +67,7 @@ struct tipc_user { static struct tipc_user *users = NULL; static u32 next_free_user = MAX_USERID + 1; -static DEFINE_SPINLOCK(reg_lock); +static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED; /** * reg_init - create TIPC user registry (but don't activate it) @@ -82,8 +82,9 @@ static int reg_init(void) spin_lock_bh(®_lock); if (!users) { - users = kzalloc(USER_LIST_SIZE, GFP_ATOMIC); + users = (struct tipc_user *)kmalloc(USER_LIST_SIZE, GFP_ATOMIC); if (users) { + memset(users, 0, USER_LIST_SIZE); for (i = 1; i <= MAX_USERID; i++) { users[i].next = i - 1; } diff --git a/net/tipc/zone.c b/net/tipc/zone.c index f5b00ea2d..2803e1b4f 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c @@ -44,23 +44,19 @@ struct _zone *tipc_zone_create(u32 addr) { - struct _zone *z_ptr; + struct _zone *z_ptr = NULL; u32 z_num; - if (!tipc_addr_domain_valid(addr)) { - err("Zone creation failed, invalid domain 0x%x\n", addr); + if (!tipc_addr_domain_valid(addr)) return NULL; - } - z_ptr = kzalloc(sizeof(*z_ptr), GFP_ATOMIC); - if (!z_ptr) { - warn("Zone creation failed, insufficient memory\n"); - return NULL; + z_ptr = (struct _zone *)kmalloc(sizeof(*z_ptr), GFP_ATOMIC); + if (z_ptr != NULL) { + memset(z_ptr, 0, sizeof(*z_ptr)); + z_num = tipc_zone(addr); + z_ptr->addr = tipc_addr(z_num, 0, 0); + tipc_net.zones[z_num] = z_ptr; } - - z_num = tipc_zone(addr); - z_ptr->addr = tipc_addr(z_num, 0, 0); - tipc_net.zones[z_num] = z_ptr; return z_ptr; } diff --git a/net/tipc/zone.h b/net/tipc/zone.h index 5ab3d0860..267999c5a 100644 --- a/net/tipc/zone.h +++ b/net/tipc/zone.h @@ -2,7 +2,7 @@ * net/tipc/zone.h: Include file for TIPC zone management routines * * Copyright (c) 2000-2006, Ericsson AB - * Copyright (c) 2005-2006, Wind River Systems + * Copyright (c) 2005, Wind River Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,7 +45,7 @@ * struct _zone - TIPC zone structure * @addr: network address of zone * @clusters: array of pointers to all clusters within zone - * @links: number of (unicast) links to zone + * @links: (used for inter-zone communication) */ struct _zone { diff --git a/net/tux/cachemiss.c b/net/tux/cachemiss.c index 240eb901f..1a96ab6b8 100644 --- a/net/tux/cachemiss.c +++ b/net/tux/cachemiss.c @@ -236,7 +236,7 @@ int start_cachemiss_threads (threadinfo_t *ti) memset(iot, 0, sizeof(*iot)); iot->ti = ti; - spin_lock_init(&iot->async_lock); + iot->async_lock = SPIN_LOCK_UNLOCKED; iot->nr_async_pending = 0; INIT_LIST_HEAD(&iot->async_queue); init_waitqueue_head(&iot->async_sleep); diff --git a/net/tux/directory.c b/net/tux/directory.c index ff221fc29..03c5474f1 100644 --- a/net/tux/directory.c +++ b/net/tux/directory.c @@ -205,7 +205,7 @@ next_dir: #define ROUND_UP64(x) (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1)) static int filldir64(void * __buf, const char * name, int namlen, loff_t offset, - u64 ino, unsigned int d_type) + ino_t ino, unsigned int d_type) { struct linux_dirent64 * dirent, d; struct getdents_callback64 * buf = (struct getdents_callback64 *) __buf; diff --git a/net/tux/input.c b/net/tux/input.c index 792ffb4e9..28cebcb34 100644 --- a/net/tux/input.c +++ b/net/tux/input.c @@ -270,7 +270,7 @@ static int read_request (struct socket *sock, char *buf, int max_size) int len; - msg.msg_name = NULL; + msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; @@ -320,7 +320,7 @@ static int zap_urg_data (struct socket *sock) oldmm = get_fs(); set_fs(KERNEL_DS); - msg.msg_name = NULL; + msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; @@ -479,7 +479,7 @@ restart: lock_sock(sk); icsk->icsk_ack.pingpong = 0; icsk->icsk_ack.pending |= ICSK_ACK_PUSHED; - tcp_cleanup_rbuf(sk, 1); + cleanup_rbuf(sk, 1); release_sock(sk); } if (len >= tux_max_header_len-1) diff --git a/net/tux/logger.c b/net/tux/logger.c index 67ef7c162..c0c2cc3f4 100644 --- a/net/tux/logger.c +++ b/net/tux/logger.c @@ -29,7 +29,7 @@ * ****************************************************************/ -static DEFINE_SPINLOCK(log_lock); +static spinlock_t log_lock = SPIN_LOCK_UNLOCKED; static unsigned int log_head, log_tail; static char * log_buffer = NULL; static DECLARE_WAIT_QUEUE_HEAD(log_wait); @@ -767,10 +767,6 @@ static int logger_thread (void *data) if (log_buffer) TUX_BUG(); log_buffer = vmalloc(LOG_LEN); - if (!log_buffer) { - TUX_BUG(); - goto out; - } memset(log_buffer, 0, LOG_LEN); log_head = log_tail = 0; @@ -808,7 +804,7 @@ static int logger_thread (void *data) log_buffer = NULL; stop_logger = 0; wake_up(&stop_logger_wait); -out: + set_fs(oldmm); return 0; diff --git a/net/tux/main.c b/net/tux/main.c index 663ce9737..d62263b88 100644 --- a/net/tux/main.c +++ b/net/tux/main.c @@ -170,10 +170,10 @@ static int init_queues (int nr_tux_threads) INIT_LIST_HEAD(&ti->all_requests); - spin_lock_init(&ti->free_requests_lock); + ti->free_requests_lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&ti->free_requests); - spin_lock_init(&ti->work_lock); + ti->work_lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&ti->work_pending); INIT_LIST_HEAD(&ti->lru); @@ -1197,7 +1197,7 @@ eventloop: if (ret) GOTO_ERR_unlock; addr = (char *)(unsigned long)u_addr; - filp = dentry_open(req->dentry, NULL, O_RDONLY); + filp = dentry_open(req->dentry, O_RDONLY, 0); dget(req->dentry); generic_file_read(filp, addr, req->total_file_len, &ppos); fput(filp); diff --git a/net/tux/mod.c b/net/tux/mod.c index fc52566af..e3e192de6 100644 --- a/net/tux/mod.c +++ b/net/tux/mod.c @@ -26,7 +26,7 @@ * ****************************************************************/ -DEFINE_SPINLOCK(tuxmodules_lock); +spinlock_t tuxmodules_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(tuxmodules_list); tcapi_template_t * get_first_usermodule (void) diff --git a/net/tux/output.c b/net/tux/output.c index 0cfc22021..00d360b31 100644 --- a/net/tux/output.c +++ b/net/tux/output.c @@ -34,7 +34,7 @@ int send_sync_buf (tux_req_t *req, struct socket *sock, const char *buf, const s tp->nonagle = 2; - msg.msg_name = NULL; + msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; diff --git a/net/tux/proc.c b/net/tux/proc.c index 1e535ef1c..ca78f3d21 100644 --- a/net/tux/proc.c +++ b/net/tux/proc.c @@ -742,17 +742,17 @@ static ctl_table tux_table[] = { NULL, NULL }, - {0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL} }; + {0,0,0,0,0,0,0,0,0,0,0} }; static ctl_table tux_dir_table[] = { - {NET_TUX, "tux", NULL, 0, 0555, tux_table, NULL, NULL, NULL, NULL, NULL}, - {0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL} + {NET_TUX, "tux", NULL, 0, 0555, tux_table,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0} }; static ctl_table tux_root_table[] = { - {CTL_NET, "net", NULL, 0, 0555, tux_dir_table, NULL, NULL, NULL, NULL, NULL}, - {0, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL} + {CTL_NET, "net", NULL, 0, 0555, tux_dir_table,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0} }; diff --git a/net/tux/proto_ftp.c b/net/tux/proto_ftp.c index 03ad4f5f6..29c72e37c 100644 --- a/net/tux/proto_ftp.c +++ b/net/tux/proto_ftp.c @@ -895,7 +895,7 @@ void ftp_accept_pasv (tux_req_t *req, int cachemiss) icsk1 = inet_csk(req->data_sock->sk); Dprintk("PASV accept on req %p, accept_queue: %p.\n", - req, &icsk1->icsk_accept_queue); + req, &icsk->icsk_accept_queue); if (req->error || (req->data_sock->sk->sk_state != TCP_LISTEN)) goto error; new_socket: @@ -1541,15 +1541,15 @@ static void ftp_pre_log (tux_req_t *req) } tux_proto_t tux_proto_ftp = { - .defer_accept = 0, - .can_redirect = 0, - .got_request = ftp_got_request, - .parse_message = parse_ftp_message, - .illegal_request = ftp_close, - .request_timeout = ftp_timeout, - .pre_log = ftp_pre_log, - .check_req_err = ftp_check_req_err, - .print_dir_line = ftp_print_dir_line, - .name = "ftp", + defer_accept: 0, + can_redirect: 0, + got_request: ftp_got_request, + parse_message: parse_ftp_message, + illegal_request: ftp_close, + request_timeout: ftp_timeout, + pre_log: ftp_pre_log, + check_req_err: ftp_check_req_err, + print_dir_line: ftp_print_dir_line, + name: "ftp", }; diff --git a/net/tux/proto_http.c b/net/tux/proto_http.c index bb126ddfa..6656f8529 100644 --- a/net/tux/proto_http.c +++ b/net/tux/proto_http.c @@ -1012,11 +1012,11 @@ int handle_gzip_req (tux_req_t *req, unsigned int flags) return 0; } -static DEFINE_SPINLOCK(mimetypes_lock); +static spinlock_t mimetypes_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(mimetypes_head); -static mimetype_t default_mimetype = { .type = "text/plain", .type_len = 10, .expire_str = "", .expire_str_len = 0 }; +static mimetype_t default_mimetype = { type: "text/plain", type_len: 10, expire_str: "", expire_str_len: 0 }; #define MAX_MIMETYPE_LEN 128 #define MAX_CACHE_CONTROL_AGE_LEN 30 @@ -2185,13 +2185,13 @@ out_dput: } tux_proto_t tux_proto_http = { - .defer_accept = 1, - .can_redirect = 1, - .got_request = http_got_request, - .parse_message = parse_http_message, - .illegal_request = http_illegal_request, - .check_req_err = http_check_req_err, - .print_dir_line = http_print_dir_line, - .name = "http", + defer_accept: 1, + can_redirect: 1, + got_request: http_got_request, + parse_message: parse_http_message, + illegal_request: http_illegal_request, + check_req_err: http_check_req_err, + print_dir_line: http_print_dir_line, + name: "http", }; diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index bcda09eb8..d2bdd0116 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -83,6 +83,7 @@ */ #include +#include #include #include #include @@ -130,24 +131,6 @@ static atomic_t unix_nr_socks = ATOMIC_INIT(0); #define UNIX_ABSTRACT(sk) (unix_sk(sk)->addr->hash != UNIX_HASH_SIZE) -#ifdef CONFIG_SECURITY_NETWORK -static void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) -{ - memcpy(UNIXSID(skb), &scm->secid, sizeof(u32)); -} - -static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb) -{ - scm->secid = *UNIXSID(skb); -} -#else -static inline void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) -{ } - -static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb) -{ } -#endif /* CONFIG_SECURITY_NETWORK */ - /* * SMP locking strategy: * hash table is protected with spinlock unix_table_lock @@ -564,14 +547,6 @@ static struct proto unix_proto = { .obj_size = sizeof(struct unix_sock), }; -/* - * AF_UNIX sockets do not interact with hardware, hence they - * dont trigger interrupts - so it's safe for them to have - * bh-unsafe locking for their sk_receive_queue.lock. Split off - * this special lock-class by reinitializing the spinlock key: - */ -static struct lock_class_key af_unix_sk_receive_queue_lock_key; - static struct sock * unix_create1(struct socket *sock) { struct sock *sk = NULL; @@ -587,8 +562,6 @@ static struct sock * unix_create1(struct socket *sock) atomic_inc(&unix_nr_socks); sock_init_data(sock,sk); - lockdep_set_class(&sk->sk_receive_queue.lock, - &af_unix_sk_receive_queue_lock_key); sk->sk_write_space = unix_write_space; sk->sk_max_ack_backlog = sysctl_unix_max_dgram_qlen; @@ -662,10 +635,11 @@ static int unix_autobind(struct socket *sock) goto out; err = -ENOMEM; - addr = kzalloc(sizeof(*addr) + sizeof(short) + 16, GFP_KERNEL); + addr = kmalloc(sizeof(*addr) + sizeof(short) + 16, GFP_KERNEL); if (!addr) goto out; + memset(addr, 0, sizeof(*addr) + sizeof(short) + 16); addr->name->sun_family = AF_UNIX; atomic_set(&addr->refcnt, 1); @@ -1053,7 +1027,7 @@ restart: goto out_unlock; } - unix_state_wlock_nested(sk); + unix_state_wlock(sk); if (sk->sk_state != st) { unix_state_wunlock(sk); @@ -1321,7 +1295,6 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred)); if (siocb->scm->fp) unix_attach_fds(siocb->scm, skb); - unix_get_secdata(siocb->scm, skb); skb->h.raw = skb->data; err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len); @@ -1602,7 +1575,6 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, memset(&tmp_scm, 0, sizeof(tmp_scm)); } siocb->scm->creds = *UNIXCREDS(skb); - unix_set_secdata(siocb->scm, skb); if (!(flags & MSG_PEEK)) { diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c index 6f39faa15..b1265187b 100644 --- a/net/wanrouter/af_wanpipe.c +++ b/net/wanrouter/af_wanpipe.c @@ -32,6 +32,7 @@ * ******************************************************************************/ +#include #include #include #include @@ -370,11 +371,12 @@ static int wanpipe_listen_rcv (struct sk_buff *skb, struct sock *sk) * used by the ioctl call to read call information * and to execute commands. */ - if ((mbox_ptr = kzalloc(sizeof(mbox_cmd_t), GFP_ATOMIC)) == NULL) { + if ((mbox_ptr = kmalloc(sizeof(mbox_cmd_t), GFP_ATOMIC)) == NULL) { wanpipe_kill_sock_irq (newsk); release_device(dev); return -ENOMEM; } + memset(mbox_ptr, 0, sizeof(mbox_cmd_t)); memcpy(mbox_ptr,skb->data,skb->len); /* Register the lcn on which incoming call came @@ -506,10 +508,11 @@ static struct sock *wanpipe_alloc_socket(void) if ((sk = sk_alloc(PF_WANPIPE, GFP_ATOMIC, &wanpipe_proto, 1)) == NULL) return NULL; - if ((wan_opt = kzalloc(sizeof(struct wanpipe_opt), GFP_ATOMIC)) == NULL) { + if ((wan_opt = kmalloc(sizeof(struct wanpipe_opt), GFP_ATOMIC)) == NULL) { sk_free(sk); return NULL; } + memset(wan_opt, 0x00, sizeof(struct wanpipe_opt)); wp_sk(sk) = wan_opt; @@ -2009,9 +2012,10 @@ static int set_ioctl_cmd (struct sock *sk, void *arg) dev_put(dev); - if ((mbox_ptr = kzalloc(sizeof(mbox_cmd_t), GFP_ATOMIC)) == NULL) + if ((mbox_ptr = kmalloc(sizeof(mbox_cmd_t), GFP_ATOMIC)) == NULL) return -ENOMEM; + memset(mbox_ptr, 0, sizeof(mbox_cmd_t)); wp_sk(sk)->mbox = mbox_ptr; wanpipe_link_driver(dev,sk); diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 947965927..c34833dc7 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c @@ -42,6 +42,7 @@ * Jun 02, 1999 Gideon Hack Updates for Linux 2.0.X and 2.2.X kernels. *****************************************************************************/ +#include #include /* offsetof(), etc. */ #include #include /* return codes */ @@ -642,16 +643,18 @@ static int wanrouter_device_new_if(struct wan_device *wandev, if (cnf->config_id == WANCONFIG_MPPP) { #ifdef CONFIG_WANPIPE_MULTPPP - pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL); + pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL); err = -ENOBUFS; if (pppdev == NULL) goto out; - pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); + memset(pppdev, 0, sizeof(struct ppp_device)); + pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); if (pppdev->dev == NULL) { kfree(pppdev); err = -ENOBUFS; goto out; } + memset(pppdev->dev, 0, sizeof(struct net_device)); err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf); dev = pppdev->dev; #else @@ -661,10 +664,11 @@ static int wanrouter_device_new_if(struct wan_device *wandev, goto out; #endif } else { - dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); + dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); err = -ENOBUFS; if (dev == NULL) goto out; + memset(dev, 0, sizeof(struct net_device)); err = wandev->new_if(wandev, dev, cnf); } diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 930ea5946..c28ba5a47 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c @@ -20,6 +20,7 @@ * Dec 13, 1996 Gene Kozin Initial version (based on Sangoma's WANPIPE) *****************************************************************************/ +#include #include /* __initfunc et al. */ #include /* offsetof(), etc. */ #include /* return codes */ diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 471e49dd2..f404f67be 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -35,6 +35,7 @@ * response */ +#include #include #include #include diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index 47b68a301..adfe7b8df 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c @@ -17,6 +17,7 @@ * 2000-09-04 Henner Eisen Prevent freeing a dangling skb. */ +#include #include #include #include diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c index a11837d36..dfb80116c 100644 --- a/net/x25/x25_proc.c +++ b/net/x25/x25_proc.c @@ -17,6 +17,7 @@ * 2002/10/06 Arnaldo Carvalho de Melo seq_file support */ +#include #include #include #include diff --git a/net/x25/x25_route.c b/net/x25/x25_route.c index 2a3fe986b..6c5d37517 100644 --- a/net/x25/x25_route.c +++ b/net/x25/x25_route.c @@ -17,6 +17,7 @@ * X.25 001 Jonathan Naylor Started coding. */ +#include #include #include #include diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 04e1aea58..6ed330231 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -9,6 +9,7 @@ * any later version. */ +#include #include #include #include diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 3da67ca2c..b469c8b54 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include @@ -45,43 +46,45 @@ static DEFINE_SPINLOCK(xfrm_policy_gc_lock); static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family); static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo); -static struct xfrm_policy_afinfo *xfrm_policy_lock_afinfo(unsigned int family); -static void xfrm_policy_unlock_afinfo(struct xfrm_policy_afinfo *afinfo); int xfrm_register_type(struct xfrm_type *type, unsigned short family) { - struct xfrm_policy_afinfo *afinfo = xfrm_policy_lock_afinfo(family); - struct xfrm_type **typemap; + struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); + struct xfrm_type_map *typemap; int err = 0; if (unlikely(afinfo == NULL)) return -EAFNOSUPPORT; typemap = afinfo->type_map; - if (likely(typemap[type->proto] == NULL)) - typemap[type->proto] = type; + write_lock_bh(&typemap->lock); + if (likely(typemap->map[type->proto] == NULL)) + typemap->map[type->proto] = type; else err = -EEXIST; - xfrm_policy_unlock_afinfo(afinfo); + write_unlock_bh(&typemap->lock); + xfrm_policy_put_afinfo(afinfo); return err; } EXPORT_SYMBOL(xfrm_register_type); int xfrm_unregister_type(struct xfrm_type *type, unsigned short family) { - struct xfrm_policy_afinfo *afinfo = xfrm_policy_lock_afinfo(family); - struct xfrm_type **typemap; + struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); + struct xfrm_type_map *typemap; int err = 0; if (unlikely(afinfo == NULL)) return -EAFNOSUPPORT; typemap = afinfo->type_map; - if (unlikely(typemap[type->proto] != type)) + write_lock_bh(&typemap->lock); + if (unlikely(typemap->map[type->proto] != type)) err = -ENOENT; else - typemap[type->proto] = NULL; - xfrm_policy_unlock_afinfo(afinfo); + typemap->map[type->proto] = NULL; + write_unlock_bh(&typemap->lock); + xfrm_policy_put_afinfo(afinfo); return err; } EXPORT_SYMBOL(xfrm_unregister_type); @@ -89,7 +92,7 @@ EXPORT_SYMBOL(xfrm_unregister_type); struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family) { struct xfrm_policy_afinfo *afinfo; - struct xfrm_type **typemap; + struct xfrm_type_map *typemap; struct xfrm_type *type; int modload_attempted = 0; @@ -99,9 +102,11 @@ retry: return NULL; typemap = afinfo->type_map; - type = typemap[proto]; + read_lock(&typemap->lock); + type = typemap->map[proto]; if (unlikely(type && !try_module_get(type->owner))) type = NULL; + read_unlock(&typemap->lock); if (!type && !modload_attempted) { xfrm_policy_put_afinfo(afinfo); request_module("xfrm-type-%d-%d", @@ -137,89 +142,6 @@ void xfrm_put_type(struct xfrm_type *type) module_put(type->owner); } -int xfrm_register_mode(struct xfrm_mode *mode, int family) -{ - struct xfrm_policy_afinfo *afinfo; - struct xfrm_mode **modemap; - int err; - - if (unlikely(mode->encap >= XFRM_MODE_MAX)) - return -EINVAL; - - afinfo = xfrm_policy_lock_afinfo(family); - if (unlikely(afinfo == NULL)) - return -EAFNOSUPPORT; - - err = -EEXIST; - modemap = afinfo->mode_map; - if (likely(modemap[mode->encap] == NULL)) { - modemap[mode->encap] = mode; - err = 0; - } - - xfrm_policy_unlock_afinfo(afinfo); - return err; -} -EXPORT_SYMBOL(xfrm_register_mode); - -int xfrm_unregister_mode(struct xfrm_mode *mode, int family) -{ - struct xfrm_policy_afinfo *afinfo; - struct xfrm_mode **modemap; - int err; - - if (unlikely(mode->encap >= XFRM_MODE_MAX)) - return -EINVAL; - - afinfo = xfrm_policy_lock_afinfo(family); - if (unlikely(afinfo == NULL)) - return -EAFNOSUPPORT; - - err = -ENOENT; - modemap = afinfo->mode_map; - if (likely(modemap[mode->encap] == mode)) { - modemap[mode->encap] = NULL; - err = 0; - } - - xfrm_policy_unlock_afinfo(afinfo); - return err; -} -EXPORT_SYMBOL(xfrm_unregister_mode); - -struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) -{ - struct xfrm_policy_afinfo *afinfo; - struct xfrm_mode *mode; - int modload_attempted = 0; - - if (unlikely(encap >= XFRM_MODE_MAX)) - return NULL; - -retry: - afinfo = xfrm_policy_get_afinfo(family); - if (unlikely(afinfo == NULL)) - return NULL; - - mode = afinfo->mode_map[encap]; - if (unlikely(mode && !try_module_get(mode->owner))) - mode = NULL; - if (!mode && !modload_attempted) { - xfrm_policy_put_afinfo(afinfo); - request_module("xfrm-mode-%d-%d", family, encap); - modload_attempted = 1; - goto retry; - } - - xfrm_policy_put_afinfo(afinfo); - return mode; -} - -void xfrm_put_mode(struct xfrm_mode *mode) -{ - module_put(mode->owner); -} - static inline unsigned long make_jiffies(long secs) { if (secs >= (MAX_SCHEDULE_TIMEOUT-1)/HZ) @@ -307,9 +229,10 @@ struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp) { struct xfrm_policy *policy; - policy = kzalloc(sizeof(struct xfrm_policy), gfp); + policy = kmalloc(sizeof(struct xfrm_policy), gfp); if (policy) { + memset(policy, 0, sizeof(struct xfrm_policy)); atomic_set(&policy->refcnt, 1); rwlock_init(&policy->lock); init_timer(&policy->timer); @@ -1134,33 +1057,12 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) } EXPORT_SYMBOL(__xfrm_route_forward); -/* Optimize later using cookies and generation ids. */ - static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) { - /* Code (such as __xfrm4_bundle_create()) sets dst->obsolete - * to "-1" to force all XFRM destinations to get validated by - * dst_ops->check on every use. We do this because when a - * normal route referenced by an XFRM dst is obsoleted we do - * not go looking around for all parent referencing XFRM dsts - * so that we can invalidate them. It is just too much work. - * Instead we make the checks here on every use. For example: - * - * XFRM dst A --> IPv4 dst X - * - * X is the "xdst->route" of A (X is also the "dst->path" of A - * in this example). If X is marked obsolete, "A" will not - * notice. That's what we are validating here via the - * stale_bundle() check. - * - * When a policy's bundle is pruned, we dst_free() the XFRM - * dst which causes it's ->obsolete field to be set to a - * positive non-zero integer. If an XFRM dst has been pruned - * like this, we want to force a new route lookup. + /* If it is marked obsolete, which is how we even get here, + * then we have purged it from the policy bundle list and we + * did that for a good reason. */ - if (dst->obsolete < 0 && !stale_bundle(dst)) - return dst; - return NULL; } @@ -1404,31 +1306,17 @@ static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) return NULL; read_lock(&xfrm_policy_afinfo_lock); afinfo = xfrm_policy_afinfo[family]; - if (unlikely(!afinfo)) - read_unlock(&xfrm_policy_afinfo_lock); - return afinfo; -} - -static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo) -{ + if (likely(afinfo != NULL)) + read_lock(&afinfo->lock); read_unlock(&xfrm_policy_afinfo_lock); -} - -static struct xfrm_policy_afinfo *xfrm_policy_lock_afinfo(unsigned int family) -{ - struct xfrm_policy_afinfo *afinfo; - if (unlikely(family >= NPROTO)) - return NULL; - write_lock_bh(&xfrm_policy_afinfo_lock); - afinfo = xfrm_policy_afinfo[family]; - if (unlikely(!afinfo)) - write_unlock_bh(&xfrm_policy_afinfo_lock); return afinfo; } -static void xfrm_policy_unlock_afinfo(struct xfrm_policy_afinfo *afinfo) +static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo) { - write_unlock_bh(&xfrm_policy_afinfo_lock); + if (unlikely(afinfo == NULL)) + return; + read_unlock(&afinfo->lock); } static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void *ptr) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 0021aad5d..93a2f36ad 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -77,8 +77,6 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x) kfree(x->ealg); kfree(x->calg); kfree(x->encap); - if (x->mode) - xfrm_put_mode(x->mode); if (x->type) { x->type->destructor(x); xfrm_put_type(x->type); @@ -194,9 +192,10 @@ struct xfrm_state *xfrm_state_alloc(void) { struct xfrm_state *x; - x = kzalloc(sizeof(struct xfrm_state), GFP_ATOMIC); + x = kmalloc(sizeof(struct xfrm_state), GFP_ATOMIC); if (x) { + memset(x, 0, sizeof(struct xfrm_state)); atomic_set(&x->refcnt, 1); atomic_set(&x->tunnel_users, 0); INIT_LIST_HEAD(&x->bydst); @@ -1104,14 +1103,17 @@ static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family) return NULL; read_lock(&xfrm_state_afinfo_lock); afinfo = xfrm_state_afinfo[family]; - if (unlikely(!afinfo)) - read_unlock(&xfrm_state_afinfo_lock); + if (likely(afinfo != NULL)) + read_lock(&afinfo->lock); + read_unlock(&xfrm_state_afinfo_lock); return afinfo; } static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo) { - read_unlock(&xfrm_state_afinfo_lock); + if (unlikely(afinfo == NULL)) + return; + read_unlock(&afinfo->lock); } /* Temporarily located here until net/xfrm/xfrm_tunnel.c is created */ @@ -1163,6 +1165,8 @@ int xfrm_state_mtu(struct xfrm_state *x, int mtu) return res; } +EXPORT_SYMBOL(xfrm_state_mtu); + int xfrm_init_state(struct xfrm_state *x) { struct xfrm_state_afinfo *afinfo; @@ -1192,10 +1196,6 @@ int xfrm_init_state(struct xfrm_state *x) if (err) goto error; - x->mode = xfrm_get_mode(x->props.mode, family); - if (x->mode == NULL) - goto error; - x->km.state = XFRM_STATE_VALID; error: diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 3e6a722d0..81d100583 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -427,25 +427,23 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma) if (x == NULL) return -ESRCH; - if ((err = security_xfrm_state_delete(x)) != 0) - goto out; - if (xfrm_state_kern(x)) { - err = -EPERM; - goto out; + xfrm_state_put(x); + return -EPERM; } err = xfrm_state_delete(x); - if (err < 0) - goto out; + if (err < 0) { + xfrm_state_put(x); + return err; + } c.seq = nlh->nlmsg_seq; c.pid = nlh->nlmsg_pid; c.event = nlh->nlmsg_type; km_state_notify(x, &c); - -out: xfrm_state_put(x); + return err; } @@ -1057,8 +1055,6 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr MSG_DONTWAIT); } } else { - if ((err = security_xfrm_policy_delete(xp)) != 0) - goto out; c.data.byid = p->index; c.event = nlh->nlmsg_type; c.seq = nlh->nlmsg_seq; @@ -1068,7 +1064,6 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr xfrm_pol_put(xp); -out: return err; } @@ -1435,7 +1430,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err link = &xfrm_dispatch[type]; /* All operations require privileges, even GET */ - if (security_netlink_recv(skb, CAP_NET_ADMIN)) { + if (security_netlink_recv(skb)) { *errp = -EPERM; return -1; } diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index bb19c1561..b0d067be7 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -12,10 +12,6 @@ space := $(empty) $(empty) # contain a comma depfile = $(subst $(comma),_,$(@D)/.$(@F).d) -### -# filename of target with directory and extension stripped -basetarget = $(basename $(notdir $@)) - ### # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) @@ -77,20 +73,14 @@ cc-option-align = $(subst -functions=0,,\ # cc-version # Usage gcc-ver := $(call cc-version, $(CC)) -cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) +cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ + $(if $(1), $(1), $(CC))) # cc-ifversion # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \ echo $(3); fi;) -# ld-option -# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) -ld-option = $(shell if $(CC) $(1) \ - -nostdlib -o ldtest$$$$.out -xc /dev/null \ - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \ - rm -f ldtest$$$$.out) - ### # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= # Usage: diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 3cb445cc7..e48e60da3 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -8,7 +8,7 @@ PHONY := __build __build: # Read .config if it exist, otherwise ignore --include include/config/auto.conf +-include .config include scripts/Kbuild.include @@ -117,7 +117,7 @@ $(real-objs-m:.o=.lst): quiet_modtag := [M] $(obj-m) : quiet_modtag := [M] # Default for not multi-part modules -modname = $(basetarget) +modname = $(*F) $(multi-objs-m) : modname = $(modname-multi) $(multi-objs-m:.o=.i) : modname = $(modname-multi) @@ -140,15 +140,6 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< %.i: %.c FORCE $(call if_changed_dep,cc_i_c) -quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ -cmd_cc_symtypes_c = \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) -T $@ >/dev/null; \ - test -s $@ || rm -f $@ - -%.symtypes : %.c FORCE - $(call if_changed_dep,cc_symtypes_c) - # C (.c) files # The C file is compiled and updated dependency information is generated. # (See cmd_cc_o_c + relevant part of rule_cc_o_c) @@ -175,8 +166,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< cmd_modversions = \ if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ $(CPP) -D__GENKSYMS__ $(c_flags) $< \ - | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \ - -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \ + | $(GENKSYMS) -a $(ARCH) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst deleted file mode 100644 index 12e1daf87..000000000 --- a/scripts/Makefile.headersinst +++ /dev/null @@ -1,160 +0,0 @@ -# ========================================================================== -# Installing headers -# -# header-y files will be installed verbatim -# unifdef-y are the files where unifdef will be run before installing files -# objhdr-y are generated files that will be installed verbatim -# -# ========================================================================== - -UNIFDEF := unifdef -U__KERNEL__ - -# Eliminate the contents of (and inclusions of) compiler.h -HDRSED := sed -e "s/ inline / __inline__ /g" \ - -e "s/[[:space:]]__user[[:space:]]\+/ /g" \ - -e "s/(__user[[:space:]]\+/ (/g" \ - -e "s/[[:space:]]__force[[:space:]]\+/ /g" \ - -e "s/(__force[[:space:]]\+/ (/g" \ - -e "s/[[:space:]]__iomem[[:space:]]\+/ /g" \ - -e "s/(__iomem[[:space:]]\+/ (/g" \ - -e "s/[[:space:]]__attribute_const__[[:space:]]\+/\ /g" \ - -e "s/[[:space:]]__attribute_const__$$//" \ - -e "/^\#include /d" - -_dst := $(if $(dst),$(dst),$(obj)) - -.PHONY: __headersinst -__headersinst: - - -ifeq (,$(patsubst include/asm/%,,$(obj)/)) -# For producing the generated stuff in include/asm for biarch builds, include -# both sets of Kbuild files; we'll generate anything which is mentioned in -# _either_ arch, and recurse into subdirectories which are mentioned in either -# arch. Since some directories may exist in one but not the other, we must -# use '-include'. -GENASM := 1 -archasm := $(subst include/asm,asm-$(ARCH),$(obj)) -altarchasm := $(subst include/asm,asm-$(ALTARCH),$(obj)) --include $(srctree)/include/$(archasm)/Kbuild --include $(srctree)/include/$(altarchasm)/Kbuild -else -include $(srctree)/$(obj)/Kbuild -endif - -include scripts/Kbuild.include - -# If this is include/asm-$(ARCH) and there's no $(ALTARCH), then -# override $(_dst) so that we install to include/asm directly. -ifeq ($(obj)$(ALTARCH),include/asm-$(ARCH)) - _dst := include/asm -endif - -header-y := $(sort $(header-y)) -unifdef-y := $(sort $(unifdef-y)) -subdir-y := $(patsubst %/,%,$(filter %/, $(header-y))) -header-y := $(filter-out %/, $(header-y)) -header-y := $(filter-out $(unifdef-y),$(header-y)) - -ifdef ALTARCH -ifeq ($(obj),include/asm-$(ARCH)) -altarch-y := altarch-dir -endif -endif - -# Make the definitions visible for recursive make invocations -export ALTARCH -export ARCHDEF -export ALTARCHDEF - -quiet_cmd_o_hdr_install = INSTALL $(_dst)/$@ - cmd_o_hdr_install = cp $(objtree)/$(obj)/$@ $(INSTALL_HDR_PATH)/$(_dst) - -quiet_cmd_headers_install = INSTALL $(_dst)/$@ - cmd_headers_install = $(HDRSED) $(srctree)/$(obj)/$@ \ - > $(INSTALL_HDR_PATH)/$(_dst)/$@ - -quiet_cmd_unifdef = UNIFDEF $(_dst)/$@ - cmd_unifdef = $(UNIFDEF) $(srctree)/$(obj)/$@ | $(HDRSED) \ - > $(INSTALL_HDR_PATH)/$(_dst)/$@ || : - -quiet_cmd_check = CHECK $(_dst)/$@ - cmd_check = $(srctree)/scripts/hdrcheck.sh \ - $(INSTALL_HDR_PATH)/include \ - $(INSTALL_HDR_PATH)/$(_dst)/$@ - -quiet_cmd_mkdir = MKDIR $@ - cmd_mkdir = mkdir -p $(INSTALL_HDR_PATH)/$@ - -quiet_cmd_gen = GEN $(_dst)/$@ - cmd_gen = \ -STUBDEF=__ASM_STUB_`echo $@ | tr a-z. A-Z_`; \ -(echo "/* File autogenerated by 'make headers_install' */" ; \ -echo "\#ifndef $$STUBDEF" ; \ -echo "\#define $$STUBDEF" ; \ -echo "\# if $(ARCHDEF)" ; \ -if [ -r $(INSTALL_HDR_PATH)/include/$(archasm)/$@ ]; then \ - echo "\# include <$(archasm)/$@>" ; \ -else \ - echo "\# error $(archasm)/$@ does not exist in" \ - "the $(ARCH) architecture" ; \ -fi ; \ -echo "\# elif $(ALTARCHDEF)" ; \ -if [ -r $(INSTALL_HDR_PATH)/include/$(altarchasm)/$@ ]; then \ - echo "\# include <$(altarchasm)/$@>" ; \ -else \ - echo "\# error $(altarchasm)/$@ does not exist in" \ - "the $(ALTARCH) architecture" ; \ -fi ; \ -echo "\# else" ; \ -echo "\# warning This machine appears to be" \ - "neither $(ARCH) nor $(ALTARCH)." ; \ -echo "\# endif" ; \ -echo "\#endif /* $$STUBDEF */" ; \ -) > $(INSTALL_HDR_PATH)/$(_dst)/$@ - -__headersinst: $(subdir-y) $(header-y) $(unifdef-y) $(altarch-y) $(objhdr-y) - -.PHONY: $(header-y) $(unifdef-y) $(subdir-y) - -ifdef HDRCHECK -# Rules for checking headers -$(objhdr-y) $(header-y) $(unifdef-y): - $(call cmd,check) -else -# Rules for installing headers - -$(objhdr-y) $(subdir-y) $(header-y) $(unifdef-y): $(_dst) - -.PHONY: $(_dst) -$(_dst): - $(call cmd,mkdir) - -ifdef GENASM -$(objhdr-y) $(header-y) $(unifdef-y): - $(call cmd,gen) - -else -$(objhdr-y): - $(call cmd,o_hdr_install) - -$(header-y): - $(call cmd,headers_install) - -$(unifdef-y): - $(call cmd,unifdef) -endif -endif - -hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj - -.PHONY: altarch-dir -# All the files in the normal arch dir must be created first, since we test -# for their existence. -altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y) - $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) - $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm - -# Recursion -$(subdir-y): - $(Q)$(MAKE) $(hdrinst)=$(obj)/$@ dst=$(_dst)/$@ rel=../$(rel) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 060f4c563..2d519704b 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -30,11 +30,11 @@ # libkconfig.so as the executable conf. # Note: Shared libraries consisting of C++ files are not supported -__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) +__hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) # hostprogs-y := tools/build may have been specified. Retreive directory -host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) -host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) +obj-dirs += $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) +obj-dirs := $(strip $(sort $(filter-out ./,$(obj-dirs)))) # C code @@ -73,17 +73,13 @@ host-cxxmulti := $(addprefix $(obj)/,$(host-cxxmulti)) host-cxxobjs := $(addprefix $(obj)/,$(host-cxxobjs)) host-cshlib := $(addprefix $(obj)/,$(host-cshlib)) host-cshobjs := $(addprefix $(obj)/,$(host-cshobjs)) -host-objdirs := $(addprefix $(obj)/,$(host-objdirs)) - -obj-dirs += $(host-objdirs) +obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) ##### # Handle options to gcc. Support building with separate output directory -_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ - $(HOSTCFLAGS_$(basetarget).o) -_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ - $(HOSTCXXFLAGS_$(basetarget).o) +_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(*F).o) +_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o) ifeq ($(KBUILD_SRC),) __hostc_flags = $(_hostc_flags) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index fc498fee6..2cb4935e8 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -82,12 +82,12 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) # than one module. In that case KBUILD_MODNAME will be set to foo_bar, # where foo and bar are the name of the modules. name-fix = $(subst $(comma),_,$(subst -,_,$1)) -basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" +basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))" modname_flags = $(if $(filter 1,$(words $(modname))),\ -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") -_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) -_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) +_c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) +_a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) _cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) # If building the kernel in a separate objtree expand all occurrences diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index f0ff248f5..2686dd5dc 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -17,7 +17,7 @@ __modinst: $(modules) @: quiet_cmd_modules_install = INSTALL $@ - cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) + cmd_modules_install = mkdir -p $(2); cp $@ $(2) # Modules built outside the kernel source tree go into extra by default INSTALL_MOD_DIR ?= extra diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 0a64688c2..0e056cfff 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -35,12 +35,12 @@ PHONY := _modpost _modpost: __modpost -include include/config/auto.conf +include .config include scripts/Kbuild.include include scripts/Makefile.lib kernelsymfile := $(objtree)/Module.symvers -modulesymfile := $(KBUILD_EXTMOD)/Module.symvers +modulesymfile := $(KBUILD_EXTMOD)/Modules.symvers # Step 1), find all modules listed in $(MODVERDIR)/ __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) @@ -72,7 +72,7 @@ $(modules:.ko=.mod.c): __modpost ; # Step 5), compile all *.mod.c files # modname is set to make c_flags define KBUILD_MODNAME -modname = $(notdir $(@:.mod.o=)) +modname = $(*F) quiet_cmd_cc_o_c = CC $@ cmd_cc_o_c = $(CC) $(c_flags) $(CFLAGS_MODULE) \ diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index 2f60070f9..f22e94c3a 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile @@ -1,15 +1,17 @@ ### # Makefile.basic list the most basic programs used during the build process. # The programs listed herein is what is needed to do the basic stuff, -# such as fix dependency file. +# such as splitting .config and fix dependency file. # This initial step is needed to avoid files to be recompiled # when kernel configuration changes (which is what happens when # .config is included by main Makefile. # --------------------------------------------------------------------------- # fixdep: Used to generate dependency information during build process +# split-include: Divide all config symbols up in a number of files in +# include/config/... # docproc: Used in Documentation/docbook -hostprogs-y := fixdep docproc +hostprogs-y := fixdep split-include docproc always := $(hostprogs-y) # fixdep is needed to compile other host programs diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c new file mode 100644 index 000000000..459c45276 --- /dev/null +++ b/scripts/basic/split-include.c @@ -0,0 +1,226 @@ +/* + * split-include.c + * + * Copyright abandoned, Michael Chastain, . + * This is a C version of syncdep.pl by Werner Almesberger. + * + * This program takes autoconf.h as input and outputs a directory full + * of one-line include files, merging onto the old values. + * + * Think of the configuration options as key-value pairs. Then there + * are five cases: + * + * key old value new value action + * + * KEY-1 VALUE-1 VALUE-1 leave file alone + * KEY-2 VALUE-2A VALUE-2B write VALUE-2B into file + * KEY-3 - VALUE-3 write VALUE-3 into file + * KEY-4 VALUE-4 - write an empty file + * KEY-5 (empty) - leave old empty file alone + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define ERROR_EXIT(strExit) \ + { \ + const int errnoSave = errno; \ + fprintf(stderr, "%s: ", str_my_name); \ + errno = errnoSave; \ + perror((strExit)); \ + exit(1); \ + } + + + +int main(int argc, const char * argv []) +{ + const char * str_my_name; + const char * str_file_autoconf; + const char * str_dir_config; + + FILE * fp_config; + FILE * fp_target; + FILE * fp_find; + + int buffer_size; + + char * line; + char * old_line; + char * list_target; + char * ptarget; + + struct stat stat_buf; + + /* Check arg count. */ + if (argc != 3) + { + fprintf(stderr, "%s: wrong number of arguments.\n", argv[0]); + exit(1); + } + + str_my_name = argv[0]; + str_file_autoconf = argv[1]; + str_dir_config = argv[2]; + + /* Find a buffer size. */ + if (stat(str_file_autoconf, &stat_buf) != 0) + ERROR_EXIT(str_file_autoconf); + buffer_size = 2 * stat_buf.st_size + 4096; + + /* Allocate buffers. */ + if ( (line = malloc(buffer_size)) == NULL + || (old_line = malloc(buffer_size)) == NULL + || (list_target = malloc(buffer_size)) == NULL ) + ERROR_EXIT(str_file_autoconf); + + /* Open autoconfig file. */ + if ((fp_config = fopen(str_file_autoconf, "r")) == NULL) + ERROR_EXIT(str_file_autoconf); + + /* Make output directory if needed. */ + if (stat(str_dir_config, &stat_buf) != 0) + { + if (mkdir(str_dir_config, 0755) != 0) + ERROR_EXIT(str_dir_config); + } + + /* Change to output directory. */ + if (chdir(str_dir_config) != 0) + ERROR_EXIT(str_dir_config); + + /* Put initial separator into target list. */ + ptarget = list_target; + *ptarget++ = '\n'; + + /* Read config lines. */ + while (fgets(line, buffer_size, fp_config)) + { + const char * str_config; + int is_same; + int itarget; + + if (line[0] != '#') + continue; + if ((str_config = strstr(line, "CONFIG_")) == NULL) + continue; + + /* Make the output file name. */ + str_config += sizeof("CONFIG_") - 1; + for (itarget = 0; !isspace(str_config[itarget]); itarget++) + { + int c = (unsigned char) str_config[itarget]; + if (isupper(c)) c = tolower(c); + if (c == '_') c = '/'; + ptarget[itarget] = c; + } + ptarget[itarget++] = '.'; + ptarget[itarget++] = 'h'; + ptarget[itarget++] = '\0'; + + /* Check for existing file. */ + is_same = 0; + if ((fp_target = fopen(ptarget, "r")) != NULL) + { + fgets(old_line, buffer_size, fp_target); + if (fclose(fp_target) != 0) + ERROR_EXIT(ptarget); + if (!strcmp(line, old_line)) + is_same = 1; + } + + if (!is_same) + { + /* Auto-create directories. */ + int islash; + for (islash = 0; islash < itarget; islash++) + { + if (ptarget[islash] == '/') + { + ptarget[islash] = '\0'; + if (stat(ptarget, &stat_buf) != 0 + && mkdir(ptarget, 0755) != 0) + ERROR_EXIT( ptarget ); + ptarget[islash] = '/'; + } + } + + /* Write the file. */ + if ((fp_target = fopen(ptarget, "w" )) == NULL) + ERROR_EXIT(ptarget); + fputs(line, fp_target); + if (ferror(fp_target) || fclose(fp_target) != 0) + ERROR_EXIT(ptarget); + } + + /* Update target list */ + ptarget += itarget; + *(ptarget-1) = '\n'; + } + + /* + * Close autoconfig file. + * Terminate the target list. + */ + if (fclose(fp_config) != 0) + ERROR_EXIT(str_file_autoconf); + *ptarget = '\0'; + + /* + * Fix up existing files which have no new value. + * This is Case 4 and Case 5. + * + * I re-read the tree and filter it against list_target. + * This is crude. But it avoids data copies. Also, list_target + * is compact and contiguous, so it easily fits into cache. + * + * Notice that list_target contains strings separated by \n, + * with a \n before the first string and after the last. + * fgets gives the incoming names a terminating \n. + * So by having an initial \n, strstr will find exact matches. + */ + + fp_find = popen("find * -type f -name \"*.h\" -print", "r"); + if (fp_find == 0) + ERROR_EXIT( "find" ); + + line[0] = '\n'; + while (fgets(line+1, buffer_size, fp_find)) + { + if (strstr(list_target, line) == NULL) + { + /* + * This is an old file with no CONFIG_* flag in autoconf.h. + */ + + /* First strip the \n. */ + line[strlen(line)-1] = '\0'; + + /* Grab size. */ + if (stat(line+1, &stat_buf) != 0) + ERROR_EXIT(line); + + /* If file is not empty, make it empty and give it a fresh date. */ + if (stat_buf.st_size != 0) + { + if ((fp_target = fopen(line+1, "w")) == NULL) + ERROR_EXIT(line); + if (fclose(fp_target) != 0) + ERROR_EXIT(line); + } + } + } + + if (pclose(fp_find) != 0) + ERROR_EXIT("find"); + + return 0; +} diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index ce59fc2d8..75f21d843 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -18,8 +18,7 @@ def getsizes(file): for l in os.popen("nm --size-sort " + file).readlines(): size, type, name = l[:-1].split() if type in "tTdDbB": - if "." in name: name = "static." + name.split(".")[0] - sym[name] = sym.get(name, 0) + int(size, 16) + sym[name] = int(size, 16) return sym old = getsizes(sys.argv[1]) diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index b34924663..dadfa20ff 100644 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -89,21 +89,11 @@ sub bysize($) { # my $funcre = qr/^$x* <(.*)>:$/; my $func; -my $file, $lastslash; - while (my $line = ) { if ($line =~ m/$funcre/) { $func = $1; } - elsif ($line =~ m/(.*):\s*file format/) { - $file = $1; - $file =~ s/\.ko//; - $lastslash = rindex($file, "/"); - if ($lastslash != -1) { - $file = substr($file, $lastslash + 1); - } - } - elsif ($line =~ m/$re/) { + if ($line =~ m/$re/) { my $size = $1; $size = hex($size) if ($size =~ /^0x/); @@ -119,7 +109,7 @@ while (my $line = ) { $addr =~ s/ /0/g; $addr = "0x$addr"; - my $intro = "$addr $func [$file]:"; + my $intro = "$addr $func:"; my $padlen = 56 - length($intro); while ($padlen > 0) { $intro .= ' '; diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl index ec7d21161..9f84e5623 100755 --- a/scripts/checkversion.pl +++ b/scripts/checkversion.pl @@ -1,7 +1,7 @@ #! /usr/bin/perl # -# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION -# without including , or cases of +# checkversion find uses of LINUX_VERSION_CODE, KERNEL_VERSION, or +# UTS_RELEASE without including , or cases of # including that don't need it. # Copyright (C) 2003, Randy Dunlap @@ -41,7 +41,8 @@ foreach $file (@ARGV) } # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE - if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) { + if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/) || + ($_ =~ /UTS_RELEASE/)) { $fUseVersion = 1; last LINE if $iLinuxVersion; } diff --git a/scripts/export_report.pl b/scripts/export_report.pl deleted file mode 100644 index 9ed00d9bb..000000000 --- a/scripts/export_report.pl +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/perl -w -# -# (C) Copyright IBM Corporation 2006. -# Released under GPL v2. -# Author : Ram Pai (linuxram@us.ibm.com) -# -# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c -# - -use Getopt::Std; -use strict; - -sub numerically { - my $no1 = (split /\s+/, $a)[1]; - my $no2 = (split /\s+/, $b)[1]; - return $no1 <=> $no2; -} - -sub alphabetically { - my ($module1, $value1) = @{$a}; - my ($module2, $value2) = @{$b}; - return $value1 <=> $value2 || $module2 cmp $module1; -} - -sub print_depends_on { - my ($href) = @_; - print "\n"; - while (my ($mod, $list) = each %$href) { - print "\t$mod:\n"; - foreach my $sym (sort numerically @{$list}) { - my ($symbol, $no) = split /\s+/, $sym; - printf("\t\t%-25s\t%-25d\n", $symbol, $no); - } - print "\n"; - } - print "\n"; - print "~"x80 , "\n"; -} - -sub usage { - print "Usage: @_ -h -k Module.symvers [ -o outputfile ] \n", - "\t-f: treat all the non-option argument as .mod.c files. ", - "Recommend using this as the last option\n", - "\t-h: print detailed help\n", - "\t-k: the path to Module.symvers file. By default uses ", - "the file from the current directory\n", - "\t-o outputfile: output the report to outputfile\n"; - exit 0; -} - -sub collectcfiles { - my @file = `cat .tmp_versions/*.mod | grep '.*\.ko\$'`; - @file = grep {s/\.ko/.mod.c/} @file; - chomp @file; - return @file; -} - -my (%SYMBOL, %MODULE, %opt, @allcfiles); - -if (not getopts('hk:o:f',\%opt) or defined $opt{'h'}) { - usage($0); -} - -if (defined $opt{'f'}) { - @allcfiles = @ARGV; -} else { - @allcfiles = collectcfiles(); -} - -if (not defined $opt{'k'}) { - $opt{'k'} = "Module.symvers"; -} - -unless (open(MODULE_SYMVERS, $opt{'k'})) { - die "Sorry, cannot open $opt{'k'}: $!\n"; -} - -if (defined $opt{'o'}) { - unless (open(OUTPUT_HANDLE, ">$opt{'o'}")) { - die "Sorry, cannot open $opt{'o'} $!\n"; - } - select OUTPUT_HANDLE; -} -# -# collect all the symbols and their attributes from the -# Module.symvers file -# -while ( ) { - chomp; - my (undef, $symbol, $module, $gpl) = split; - $SYMBOL { $symbol } = [ $module , "0" , $symbol, $gpl]; -} -close(MODULE_SYMVERS); - -# -# collect the usage count of each symbol. -# -foreach my $thismod (@allcfiles) { - unless (open(MODULE_MODULE, $thismod)) { - print "Sorry, cannot open $thismod: $!\n"; - next; - } - my $state=0; - while ( ) { - chomp; - if ($state eq 0) { - $state = 1 if ($_ =~ /static const struct modversion_info/); - next; - } - if ($state eq 1) { - $state = 2 if ($_ =~ /__attribute__\(\(section\("__versions"\)\)\)/); - next; - } - if ($state eq 2) { - if ( $_ !~ /0x[0-9a-f]{7,8},/ ) { - next; - } - my $sym = (split /([,"])/,)[4]; - my ($module, $value, $symbol, $gpl) = @{$SYMBOL{$sym}}; - $SYMBOL{ $sym } = [ $module, $value+1, $symbol, $gpl]; - push(@{$MODULE{$thismod}} , $sym); - } - } - if ($state ne 2) { - print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; - } - close(MODULE_MODULE); -} - -print "\tThis file reports the exported symbols usage patterns by in-tree\n", - "\t\t\t\tmodules\n"; -printf("%s\n\n\n","x"x80); -printf("\t\t\t\tINDEX\n\n\n"); -printf("SECTION 1: Usage counts of all exported symbols\n"); -printf("SECTION 2: List of modules and the exported symbols they use\n"); -printf("%s\n\n\n","x"x80); -printf("SECTION 1:\tThe exported symbols and their usage count\n\n"); -printf("%-25s\t%-25s\t%-5s\t%-25s\n", "Symbol", "Module", "Usage count", - "export type"); - -# -# print the list of unused exported symbols -# -foreach my $list (sort alphabetically values(%SYMBOL)) { - my ($module, $value, $symbol, $gpl) = @{$list}; - printf("%-25s\t%-25s\t%-10s\t", $symbol, $module, $value); - if (defined $gpl) { - printf("%-25s\n",$gpl); - } else { - printf("\n"); - } -} -printf("%s\n\n\n","x"x80); - -printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel -modules. Each module lists the modules, and the symbols from that module that -it uses. Each listed symbol reports the number of modules using it\n"); - -print "~"x80 , "\n"; -while (my ($thismod, $list) = each %MODULE) { - my %depends; - $thismod =~ s/\.mod\.c/.ko/; - print "\t\t\t$thismod\n"; - foreach my $symbol (@{$list}) { - my ($module, $value, undef, $gpl) = @{$SYMBOL{$symbol}}; - push (@{$depends{"$module"}}, "$symbol $value"); - } - print_depends_on(\%depends); -} diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index b0381823e..5b0344e20 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c @@ -42,7 +42,7 @@ static FILE *debugfile; int cur_line = 1; char *cur_filename; -static int flag_debug, flag_dump_defs, flag_dump_types, flag_warnings; +static int flag_debug, flag_dump_defs, flag_warnings; static const char *arch = ""; static const char *mod_prefix = ""; @@ -50,7 +50,6 @@ static int errors; static int nsyms; static struct symbol *expansion_trail; -static struct symbol *visited_symbols; static const char *const symbol_type_name[] = { "normal", "typedef", "enum", "struct", "union" @@ -177,7 +176,6 @@ struct symbol *add_symbol(const char *name, enum symbol_type type, sym->type = type; sym->defn = defn; sym->expansion_trail = NULL; - sym->visited = NULL; sym->is_extern = is_extern; sym->hash_next = symtab[h]; @@ -238,11 +236,26 @@ static int equal_list(struct string_list *a, struct string_list *b) static void print_node(FILE * f, struct string_list *list) { - if (list->tag != SYM_NORMAL) { - putc(symbol_type_name[list->tag][0], f); + switch (list->tag) { + case SYM_STRUCT: + putc('s', f); + goto printit; + case SYM_UNION: + putc('u', f); + goto printit; + case SYM_ENUM: + putc('e', f); + goto printit; + case SYM_TYPEDEF: + putc('t', f); + goto printit; + + printit: putc('#', f); + case SYM_NORMAL: + fputs(list->string, f); + break; } - fputs(list->string, f); } static void print_list(FILE * f, struct string_list *list) @@ -274,9 +287,9 @@ static void print_list(FILE * f, struct string_list *list) } } -static unsigned long expand_and_crc_sym(struct symbol *sym, unsigned long crc) +static unsigned long expand_and_crc_list(struct string_list *list, + unsigned long crc) { - struct string_list *list = sym->defn; struct string_list **e, **b; struct string_list *tmp, **tmp2; int elem = 1; @@ -319,7 +332,7 @@ static unsigned long expand_and_crc_sym(struct symbol *sym, unsigned long crc) } else { subsym->expansion_trail = expansion_trail; expansion_trail = subsym; - crc = expand_and_crc_sym(subsym, crc); + crc = expand_and_crc_list(subsym->defn, crc); } break; @@ -369,22 +382,12 @@ static unsigned long expand_and_crc_sym(struct symbol *sym, unsigned long crc) } else { subsym->expansion_trail = expansion_trail; expansion_trail = subsym; - crc = expand_and_crc_sym(subsym, crc); + crc = expand_and_crc_list(subsym->defn, crc); } break; } } - { - static struct symbol **end = &visited_symbols; - - if (!sym->visited) { - *end = sym; - end = &sym->visited; - sym->visited = (struct symbol *)-1L; - } - } - return crc; } @@ -403,7 +406,7 @@ void export_symbol(const char *name) expansion_trail = (struct symbol *)-1L; - crc = expand_and_crc_sym(sym, 0xffffffff) ^ 0xffffffff; + crc = expand_and_crc_list(sym->defn, 0xffffffff) ^ 0xffffffff; sym = expansion_trail; while (sym != (struct symbol *)-1L) { @@ -461,7 +464,6 @@ static void genksyms_usage(void) int main(int argc, char **argv) { - FILE *dumpfile = NULL; int o; #ifdef __GNU_LIBRARY__ @@ -471,16 +473,15 @@ int main(int argc, char **argv) {"warnings", 0, 0, 'w'}, {"quiet", 0, 0, 'q'}, {"dump", 0, 0, 'D'}, - {"dump-types", 1, 0, 'T'}, {"version", 0, 0, 'V'}, {"help", 0, 0, 'h'}, {0, 0, 0, 0} }; - while ((o = getopt_long(argc, argv, "a:dwqVDT:k:p:", + while ((o = getopt_long(argc, argv, "a:dwqVDk:p:", &long_opts[0], NULL)) != EOF) #else /* __GNU_LIBRARY__ */ - while ((o = getopt(argc, argv, "a:dwqVDT:k:p:")) != EOF) + while ((o = getopt(argc, argv, "a:dwqVDk:p:")) != EOF) #endif /* __GNU_LIBRARY__ */ switch (o) { case 'a': @@ -501,14 +502,6 @@ int main(int argc, char **argv) case 'D': flag_dump_defs = 1; break; - case 'T': - flag_dump_types = 1; - dumpfile = fopen(optarg, "w"); - if (!dumpfile) { - perror(optarg); - return 1; - } - break; case 'h': genksyms_usage(); return 0; @@ -531,24 +524,6 @@ int main(int argc, char **argv) yyparse(); - if (flag_dump_types && visited_symbols) { - while (visited_symbols != (struct symbol *)-1L) { - struct symbol *sym = visited_symbols; - - if (sym->type != SYM_NORMAL) { - putc(symbol_type_name[sym->type][0], dumpfile); - putc('#', dumpfile); - } - fputs(sym->name, dumpfile); - putc(' ', dumpfile); - print_list(dumpfile, sym->defn); - putc('\n', dumpfile); - - visited_symbols = sym->visited; - sym->visited = NULL; - } - } - if (flag_debug) { fprintf(debugfile, "Hash table occupancy %d/%d = %g\n", nsyms, HASH_BUCKETS, diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h index 2668287aa..ab6f34f38 100644 --- a/scripts/genksyms/genksyms.h +++ b/scripts/genksyms/genksyms.h @@ -41,7 +41,6 @@ struct symbol { enum symbol_type type; struct string_list *defn; struct symbol *expansion_trail; - struct symbol *visited; int is_extern; }; diff --git a/scripts/genksyms/lex.c_shipped b/scripts/genksyms/lex.c_shipped index 37ba98241..1218053ee 100644 --- a/scripts/genksyms/lex.c_shipped +++ b/scripts/genksyms/lex.c_shipped @@ -2023,7 +2023,7 @@ repeat: break; default: - exit(1); + abort(); } fini: diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l index 5e544a066..fe0dfeedf 100644 --- a/scripts/genksyms/lex.l +++ b/scripts/genksyms/lex.l @@ -392,7 +392,7 @@ repeat: break; default: - exit(1); + abort(); } fini: diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh deleted file mode 100755 index b5ca35aa1..000000000 --- a/scripts/hdrcheck.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do - if [ ! -r $1/$FILE ]; then - echo $2 requires $FILE, which does not exist in exported headers - exit 1 - fi -done diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 175e5933a..52159cfca 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -558,7 +558,6 @@ int main(int ac, char **av) name = av[i]; if (!name) { printf(_("%s: Kconfig file missing\n"), av[0]); - exit(1); } conf_parse(name); //zconfdump(stdout); @@ -594,7 +593,7 @@ int main(int ac, char **av) case set_random: name = getenv("KCONFIG_ALLCONFIG"); if (name && !stat(name, &tmpstat)) { - conf_read_simple(name, S_DEF_USER); + conf_read_simple(name); break; } switch (input_mode) { @@ -605,9 +604,9 @@ int main(int ac, char **av) default: break; } if (!stat(name, &tmpstat)) - conf_read_simple(name, S_DEF_USER); + conf_read_simple(name); else if (!stat("all.config", &tmpstat)) - conf_read_simple("all.config", S_DEF_USER); + conf_read_simple("all.config"); break; default: break; @@ -620,15 +619,7 @@ int main(int ac, char **av) input_mode = ask_silent; valid_stdin = 1; } - } else if (sym_change_count) { - name = getenv("KCONFIG_NOSILENTUPDATE"); - if (name && *name) { - fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n")); - return 1; - } - } else - goto skip_check; - + } do { conf_cnt = 0; check_conf(&rootmenu); @@ -637,11 +628,5 @@ int main(int ac, char **av) fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); return 1; } -skip_check: - if (input_mode == ask_silent && conf_write_autoconf()) { - fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); - return 1; - } - return return_value; } diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index f777c9143..c1702d82b 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -21,8 +20,19 @@ static void conf_warning(const char *fmt, ...) static const char *conf_filename; static int conf_lineno, conf_warnings, conf_unsaved; +const char conf_def_filename[] = ".config"; + const char conf_defname[] = "arch/$ARCH/defconfig"; +const char *conf_confnames[] = { + ".config", + "/lib/modules/$UNAME_RELEASE/.config", + "/etc/kernel-config", + "/boot/config-$UNAME_RELEASE", + conf_defname, + NULL, +}; + static void conf_warning(const char *fmt, ...) { va_list ap; @@ -34,13 +44,6 @@ static void conf_warning(const char *fmt, ...) conf_warnings++; } -const char *conf_get_configname(void) -{ - char *name = getenv("KCONFIG_CONFIG"); - - return name ? name : ".config"; -} - static char *conf_expand_value(const char *in) { struct symbol *sym; @@ -83,65 +86,51 @@ char *conf_get_default_confname(void) return name; } -int conf_read_simple(const char *name, int def) +int conf_read_simple(const char *name) { FILE *in = NULL; char line[1024]; char *p, *p2; struct symbol *sym; - int i, def_flags; + int i; if (name) { in = zconf_fopen(name); } else { - struct property *prop; - - name = conf_get_configname(); - in = zconf_fopen(name); - if (in) - goto load; - sym_change_count++; - if (!sym_defconfig_list) - return 1; - - for_all_defaults(sym_defconfig_list, prop) { - if (expr_calc_value(prop->visible.expr) == no || - prop->expr->type != E_SYMBOL) - continue; - name = conf_expand_value(prop->expr->left.sym->name); + const char **names = conf_confnames; + while ((name = *names++)) { + name = conf_expand_value(name); in = zconf_fopen(name); if (in) { printf(_("#\n" - "# using defaults found in %s\n" - "#\n"), name); - goto load; + "# using defaults found in %s\n" + "#\n"), name); + break; } } } if (!in) return 1; -load: conf_filename = name; conf_lineno = 0; conf_warnings = 0; conf_unsaved = 0; - def_flags = SYMBOL_DEF << def; for_all_symbols(i, sym) { - sym->flags |= SYMBOL_CHANGED; - sym->flags &= ~(def_flags|SYMBOL_VALID); + sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED; if (sym_is_choice(sym)) - sym->flags |= def_flags; + sym->flags &= ~SYMBOL_NEW; + sym->flags &= ~SYMBOL_VALID; switch (sym->type) { case S_INT: case S_HEX: case S_STRING: - if (sym->def[def].val) - free(sym->def[def].val); + if (sym->user.val) + free(sym->user.val); default: - sym->def[def].val = NULL; - sym->def[def].tri = no; + sym->user.val = NULL; + sym->user.tri = no; } } @@ -158,25 +147,18 @@ load: *p++ = 0; if (strncmp(p, "is not set", 10)) continue; - if (def == S_DEF_USER) { - sym = sym_find(line + 9); - if (!sym) { - conf_warning("trying to assign nonexistent symbol %s", line + 9); - break; - } - } else { - sym = sym_lookup(line + 9, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_BOOLEAN; - } - if (sym->flags & def_flags) { + sym = sym_find(line + 9); + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 9); + break; + } else if (!(sym->flags & SYMBOL_NEW)) { conf_warning("trying to reassign symbol %s", sym->name); } switch (sym->type) { case S_BOOLEAN: case S_TRISTATE: - sym->def[def].tri = no; - sym->flags |= def_flags; + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; break; default: ; @@ -194,47 +176,33 @@ load: p2 = strchr(p, '\n'); if (p2) *p2 = 0; - if (def == S_DEF_USER) { - sym = sym_find(line + 7); - if (!sym) { - conf_warning("trying to assign nonexistent symbol %s", line + 7); - break; - } - } else { - sym = sym_lookup(line + 7, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_OTHER; - } - if (sym->flags & def_flags) { + sym = sym_find(line + 7); + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 7); + break; + } else if (!(sym->flags & SYMBOL_NEW)) { conf_warning("trying to reassign symbol %s", sym->name); } switch (sym->type) { case S_TRISTATE: if (p[0] == 'm') { - sym->def[def].tri = mod; - sym->flags |= def_flags; + sym->user.tri = mod; + sym->flags &= ~SYMBOL_NEW; break; } case S_BOOLEAN: if (p[0] == 'y') { - sym->def[def].tri = yes; - sym->flags |= def_flags; + sym->user.tri = yes; + sym->flags &= ~SYMBOL_NEW; break; } if (p[0] == 'n') { - sym->def[def].tri = no; - sym->flags |= def_flags; + sym->user.tri = no; + sym->flags &= ~SYMBOL_NEW; break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); break; - case S_OTHER: - if (*p != '"') { - for (p2 = p; *p2 && !isspace(*p2); p2++) - ; - sym->type = S_STRING; - goto done; - } case S_STRING: if (*p++ != '"') break; @@ -251,10 +219,9 @@ load: } case S_INT: case S_HEX: - done: if (sym_string_valid(sym, p)) { - sym->def[def].val = strdup(p); - sym->flags |= def_flags; + sym->user.val = strdup(p); + sym->flags &= ~SYMBOL_NEW; } else { conf_warning("symbol value '%s' invalid for %s", p, sym->name); continue; @@ -272,24 +239,24 @@ load: } if (sym && sym_is_choice_value(sym)) { struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); - switch (sym->def[def].tri) { + switch (sym->user.tri) { case no: break; case mod: - if (cs->def[def].tri == yes) { + if (cs->user.tri == yes) { conf_warning("%s creates inconsistent choice state", sym->name); - cs->flags &= ~def_flags; + cs->flags |= SYMBOL_NEW; } break; case yes: - if (cs->def[def].tri != no) { + if (cs->user.tri != no) { conf_warning("%s creates inconsistent choice state", sym->name); - cs->flags &= ~def_flags; + cs->flags |= SYMBOL_NEW; } else - cs->def[def].val = sym; - break; + cs->user.val = sym; + //break; } - cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri); + cs->user.tri = E_OR(cs->user.tri, sym->user.tri); } } fclose(in); @@ -304,11 +271,9 @@ int conf_read(const char *name) struct symbol *sym; struct property *prop; struct expr *e; - int i, flags; - - sym_change_count = 0; + int i; - if (conf_read_simple(name, S_DEF_USER)) + if (conf_read_simple(name)) return 1; for_all_symbols(i, sym) { @@ -320,12 +285,12 @@ int conf_read(const char *name) switch (sym->type) { case S_BOOLEAN: case S_TRISTATE: - if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) + if (sym->user.tri != sym_get_tristate_value(sym)) break; if (!sym_is_choice(sym)) goto sym_ok; default: - if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) + if (!strcmp(sym->curr.val, sym->user.val)) goto sym_ok; break; } @@ -337,13 +302,15 @@ int conf_read(const char *name) sym_ok: if (sym_has_value(sym) && !sym_is_choice_value(sym)) { if (sym->visible == no) - sym->flags &= ~SYMBOL_DEF_USER; + sym->flags |= SYMBOL_NEW; switch (sym->type) { case S_STRING: case S_INT: case S_HEX: - if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val)) - sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); + if (!sym_string_within_range(sym, sym->user.val)) { + sym->flags |= SYMBOL_NEW; + sym->flags &= ~SYMBOL_VALID; + } default: break; } @@ -351,21 +318,19 @@ int conf_read(const char *name) if (!sym_is_choice(sym)) continue; prop = sym_get_choice_prop(sym); - flags = sym->flags; for (e = prop->expr; e; e = e->left.expr) if (e->right.sym->visible != no) - flags &= e->right.sym->flags; - sym->flags &= flags | ~SYMBOL_DEF_USER; + sym->flags |= e->right.sym->flags & SYMBOL_NEW; } - sym_change_count += conf_warnings || conf_unsaved; + sym_change_count = conf_warnings || conf_unsaved; return 0; } int conf_write(const char *name) { - FILE *out; + FILE *out, *out_h; struct symbol *sym; struct menu *menu; const char *basename; @@ -384,7 +349,7 @@ int conf_write(const char *name) if (!stat(name, &st) && S_ISDIR(st.st_mode)) { strcpy(dirname, name); strcat(dirname, "/"); - basename = conf_get_configname(); + basename = conf_def_filename; } else if ((slash = strrchr(name, '/'))) { int size = slash - name + 1; memcpy(dirname, name, size); @@ -392,24 +357,23 @@ int conf_write(const char *name) if (slash[1]) basename = slash + 1; else - basename = conf_get_configname(); + basename = conf_def_filename; } else basename = name; } else - basename = conf_get_configname(); + basename = conf_def_filename; - sprintf(newname, "%s%s", dirname, basename); - env = getenv("KCONFIG_OVERWRITECONFIG"); - if (!env || !*env) { - sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); - out = fopen(tmpname, "w"); - } else { - *tmpname = 0; - out = fopen(newname, "w"); - } + sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid()); + out = fopen(newname, "w"); if (!out) return 1; - + out_h = NULL; + if (!name) { + out_h = fopen(".tmpconfig.h", "w"); + if (!out_h) + return 1; + file_write_dep(NULL); + } sym = sym_lookup("KERNELVERSION", 0); sym_calc_value(sym); time(&now); @@ -425,6 +389,16 @@ int conf_write(const char *name) sym_get_string_value(sym), use_timestamp ? "# " : "", use_timestamp ? ctime(&now) : ""); + if (out_h) + fprintf(out_h, "/*\n" + " * Automatically generated C config: don't edit\n" + " * Linux kernel version: %s\n" + "%s%s" + " */\n" + "#define AUTOCONF_INCLUDED\n", + sym_get_string_value(sym), + use_timestamp ? " * " : "", + use_timestamp ? ctime(&now) : ""); if (!sym_change_count) sym_clear_all_valid(); @@ -440,6 +414,11 @@ int conf_write(const char *name) "#\n" "# %s\n" "#\n", str); + if (out_h) + fprintf(out_h, "\n" + "/*\n" + " * %s\n" + " */\n", str); } else if (!(sym->flags & SYMBOL_CHOICE)) { sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE)) @@ -457,39 +436,59 @@ int conf_write(const char *name) switch (sym_get_tristate_value(sym)) { case no: fprintf(out, "# CONFIG_%s is not set\n", sym->name); + if (out_h) + fprintf(out_h, "#undef CONFIG_%s\n", sym->name); break; case mod: fprintf(out, "CONFIG_%s=m\n", sym->name); + if (out_h) + fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); break; case yes: fprintf(out, "CONFIG_%s=y\n", sym->name); + if (out_h) + fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); break; } break; case S_STRING: + // fix me str = sym_get_string_value(sym); fprintf(out, "CONFIG_%s=\"", sym->name); - while (1) { + if (out_h) + fprintf(out_h, "#define CONFIG_%s \"", sym->name); + do { l = strcspn(str, "\"\\"); if (l) { fwrite(str, l, 1, out); - str += l; + if (out_h) + fwrite(str, l, 1, out_h); } - if (!*str) - break; - fprintf(out, "\\%c", *str++); - } + str += l; + while (*str == '\\' || *str == '"') { + fprintf(out, "\\%c", *str); + if (out_h) + fprintf(out_h, "\\%c", *str); + str++; + } + } while (*str); fputs("\"\n", out); + if (out_h) + fputs("\"\n", out_h); break; case S_HEX: str = sym_get_string_value(sym); if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); break; } case S_INT: str = sym_get_string_value(sym); fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + if (out_h) + fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); break; } } @@ -509,253 +508,21 @@ int conf_write(const char *name) } } fclose(out); - - if (*tmpname) { - strcat(dirname, name ? name : conf_get_configname()); - strcat(dirname, ".old"); - rename(newname, dirname); - if (rename(tmpname, newname)) - return 1; + if (out_h) { + fclose(out_h); + rename(".tmpconfig.h", "include/linux/autoconf.h"); } - - printf(_("#\n" - "# configuration written to %s\n" - "#\n"), newname); - - sym_change_count = 0; - - return 0; -} - -int conf_split_config(void) -{ - char *name, path[128]; - char *s, *d, c; - struct symbol *sym; - struct stat sb; - int res, i, fd; - - name = getenv("KCONFIG_AUTOCONFIG"); - if (!name) - name = "include/config/auto.conf"; - conf_read_simple(name, S_DEF_AUTO); - - if (chdir("include/config")) - return 1; - - res = 0; - for_all_symbols(i, sym) { - sym_calc_value(sym); - if ((sym->flags & SYMBOL_AUTO) || !sym->name) - continue; - if (sym->flags & SYMBOL_WRITE) { - if (sym->flags & SYMBOL_DEF_AUTO) { - /* - * symbol has old and new value, - * so compare them... - */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_get_tristate_value(sym) == - sym->def[S_DEF_AUTO].tri) - continue; - break; - case S_STRING: - case S_HEX: - case S_INT: - if (!strcmp(sym_get_string_value(sym), - sym->def[S_DEF_AUTO].val)) - continue; - break; - default: - break; - } - } else { - /* - * If there is no old value, only 'no' (unset) - * is allowed as new value. - */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_get_tristate_value(sym) == no) - continue; - break; - default: - break; - } - } - } else if (!(sym->flags & SYMBOL_DEF_AUTO)) - /* There is neither an old nor a new value. */ - continue; - /* else - * There is an old value, but no new value ('no' (unset) - * isn't saved in auto.conf, so the old value is always - * different from 'no'). - */ - - /* Replace all '_' and append ".h" */ - s = sym->name; - d = path; - while ((c = *s++)) { - c = tolower(c); - *d++ = (c == '_') ? '/' : c; - } - strcpy(d, ".h"); - - /* Assume directory path already exists. */ - fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd == -1) { - if (errno != ENOENT) { - res = 1; - break; - } - /* - * Create directory components, - * unless they exist already. - */ - d = path; - while ((d = strchr(d, '/'))) { - *d = 0; - if (stat(path, &sb) && mkdir(path, 0755)) { - res = 1; - goto out; - } - *d++ = '/'; - } - /* Try it again. */ - fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd == -1) { - res = 1; - break; - } - } - close(fd); + if (!name || basename != conf_def_filename) { + if (!name) + name = conf_def_filename; + sprintf(tmpname, "%s.old", name); + rename(name, tmpname); } -out: - if (chdir("../..")) - return 1; - - return res; -} - -int conf_write_autoconf(void) -{ - struct symbol *sym; - const char *str; - char *name; - FILE *out, *out_h; - time_t now; - int i, l; - - sym_clear_all_valid(); - - file_write_dep("include/config/auto.conf.cmd"); - - if (conf_split_config()) - return 1; - - out = fopen(".tmpconfig", "w"); - if (!out) - return 1; - - out_h = fopen(".tmpconfig.h", "w"); - if (!out_h) { - fclose(out); + sprintf(tmpname, "%s%s", dirname, basename); + if (rename(newname, tmpname)) return 1; - } - - sym = sym_lookup("KERNELVERSION", 0); - sym_calc_value(sym); - time(&now); - fprintf(out, "#\n" - "# Automatically generated make config: don't edit\n" - "# Linux kernel version: %s\n" - "# %s" - "#\n", - sym_get_string_value(sym), ctime(&now)); - fprintf(out_h, "/*\n" - " * Automatically generated C config: don't edit\n" - " * Linux kernel version: %s\n" - " * %s" - " */\n" - "#define AUTOCONF_INCLUDED\n", - sym_get_string_value(sym), ctime(&now)); - for_all_symbols(i, sym) { - sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE) || !sym->name) - continue; - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - break; - case mod: - fprintf(out, "CONFIG_%s=m\n", sym->name); - fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); - break; - case yes: - fprintf(out, "CONFIG_%s=y\n", sym->name); - fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); - break; - } - break; - case S_STRING: - str = sym_get_string_value(sym); - fprintf(out, "CONFIG_%s=\"", sym->name); - fprintf(out_h, "#define CONFIG_%s \"", sym->name); - while (1) { - l = strcspn(str, "\"\\"); - if (l) { - fwrite(str, l, 1, out); - fwrite(str, l, 1, out_h); - str += l; - } - if (!*str) - break; - fprintf(out, "\\%c", *str); - fprintf(out_h, "\\%c", *str); - str++; - } - fputs("\"\n", out); - fputs("\"\n", out_h); - break; - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { - fprintf(out, "CONFIG_%s=%s\n", sym->name, str); - fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); - fprintf(out, "CONFIG_%s=%s\n", sym->name, str); - fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); - break; - default: - break; - } - } - fclose(out); - fclose(out_h); - - name = getenv("KCONFIG_AUTOHEADER"); - if (!name) - name = "include/linux/autoconf.h"; - if (rename(".tmpconfig.h", name)) - return 1; - name = getenv("KCONFIG_AUTOCONFIG"); - if (!name) - name = "include/config/auto.conf"; - /* - * This must be the last step, kbuild has a dependency on auto.conf - * and this marks the successful completion of the previous steps. - */ - if (rename(".tmpconfig", name)) - return 1; + sym_change_count = 0; return 0; } diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 6f98dbfe7..30e4f9d69 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -145,8 +145,7 @@ static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct e return; } if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && - e1->left.sym == e2->left.sym && - (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no)) + e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO))) return; if (!expr_eq(e1, e2)) return; @@ -1013,73 +1012,73 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2) #endif } -void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken) +void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken) { if (!e) { - fn(data, NULL, "y"); + fn(data, "y"); return; } if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, NULL, "("); + fn(data, "("); switch (e->type) { case E_SYMBOL: if (e->left.sym->name) - fn(data, e->left.sym, e->left.sym->name); + fn(data, e->left.sym->name); else - fn(data, NULL, ""); + fn(data, ""); break; case E_NOT: - fn(data, NULL, "!"); + fn(data, "!"); expr_print(e->left.expr, fn, data, E_NOT); break; case E_EQUAL: - fn(data, e->left.sym, e->left.sym->name); - fn(data, NULL, "="); - fn(data, e->right.sym, e->right.sym->name); + fn(data, e->left.sym->name); + fn(data, "="); + fn(data, e->right.sym->name); break; case E_UNEQUAL: - fn(data, e->left.sym, e->left.sym->name); - fn(data, NULL, "!="); - fn(data, e->right.sym, e->right.sym->name); + fn(data, e->left.sym->name); + fn(data, "!="); + fn(data, e->right.sym->name); break; case E_OR: expr_print(e->left.expr, fn, data, E_OR); - fn(data, NULL, " || "); + fn(data, " || "); expr_print(e->right.expr, fn, data, E_OR); break; case E_AND: expr_print(e->left.expr, fn, data, E_AND); - fn(data, NULL, " && "); + fn(data, " && "); expr_print(e->right.expr, fn, data, E_AND); break; case E_CHOICE: - fn(data, e->right.sym, e->right.sym->name); + fn(data, e->right.sym->name); if (e->left.expr) { - fn(data, NULL, " ^ "); + fn(data, " ^ "); expr_print(e->left.expr, fn, data, E_CHOICE); } break; case E_RANGE: - fn(data, NULL, "["); - fn(data, e->left.sym, e->left.sym->name); - fn(data, NULL, " "); - fn(data, e->right.sym, e->right.sym->name); - fn(data, NULL, "]"); + fn(data, "["); + fn(data, e->left.sym->name); + fn(data, " "); + fn(data, e->right.sym->name); + fn(data, "]"); break; default: { char buf[32]; sprintf(buf, "", e->type); - fn(data, NULL, buf); + fn(data, buf); break; } } if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, NULL, ")"); + fn(data, ")"); } -static void expr_print_file_helper(void *data, struct symbol *sym, const char *str) +static void expr_print_file_helper(void *data, const char *str) { fwrite(str, strlen(str), 1, data); } @@ -1089,7 +1088,7 @@ void expr_fprint(struct expr *e, FILE *out) expr_print(e, expr_print_file_helper, out, E_NONE); } -static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) +static void expr_print_gstr_helper(void *data, const char *str) { str_append((struct gstr*)data, str); } diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 6084525f6..1b36ef18c 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -63,18 +63,12 @@ enum symbol_type { S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER }; -enum { - S_DEF_USER, /* main user value */ - S_DEF_AUTO, -}; - struct symbol { struct symbol *next; char *name; char *help; enum symbol_type type; - struct symbol_value curr; - struct symbol_value def[4]; + struct symbol_value curr, user; tristate visible; int flags; struct property *prop; @@ -84,7 +78,10 @@ struct symbol { #define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) -#define SYMBOL_CONST 0x0001 +#define SYMBOL_YES 0x0001 +#define SYMBOL_MOD 0x0002 +#define SYMBOL_NO 0x0004 +#define SYMBOL_CONST 0x0007 #define SYMBOL_CHECK 0x0008 #define SYMBOL_CHOICE 0x0010 #define SYMBOL_CHOICEVAL 0x0020 @@ -93,14 +90,10 @@ struct symbol { #define SYMBOL_OPTIONAL 0x0100 #define SYMBOL_WRITE 0x0200 #define SYMBOL_CHANGED 0x0400 +#define SYMBOL_NEW 0x0800 #define SYMBOL_AUTO 0x1000 #define SYMBOL_CHECKED 0x2000 #define SYMBOL_WARNED 0x8000 -#define SYMBOL_DEF 0x10000 -#define SYMBOL_DEF_USER 0x10000 -#define SYMBOL_DEF_AUTO 0x20000 -#define SYMBOL_DEF3 0x40000 -#define SYMBOL_DEF4 0x80000 #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 257 @@ -156,7 +149,6 @@ struct file *lookup_file(const char *name); extern struct symbol symbol_yes, symbol_no, symbol_mod; extern struct symbol *modules_sym; -extern struct symbol *sym_defconfig_list; extern int cdebug; struct expr *expr_alloc_symbol(struct symbol *sym); struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 7b0d3a93d..665bd5300 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -114,6 +114,12 @@ const char *dbg_print_flags(int val) bzero(buf, 256); + if (val & SYMBOL_YES) + strcat(buf, "yes/"); + if (val & SYMBOL_MOD) + strcat(buf, "mod/"); + if (val & SYMBOL_NO) + strcat(buf, "no/"); if (val & SYMBOL_CONST) strcat(buf, "const/"); if (val & SYMBOL_CHECK) @@ -132,6 +138,8 @@ const char *dbg_print_flags(int val) strcat(buf, "write/"); if (val & SYMBOL_CHANGED) strcat(buf, "changed/"); + if (val & SYMBOL_NEW) + strcat(buf, "new/"); if (val & SYMBOL_AUTO) strcat(buf, "auto/"); @@ -1184,7 +1192,9 @@ static gchar **fill_row(struct menu *menu) row[COL_OPTION] = g_strdup_printf("%s %s", menu_get_prompt(menu), - sym && sym_has_value(sym) ? "(NEW)" : ""); + sym ? (sym-> + flags & SYMBOL_NEW ? "(NEW)" : "") : + ""); if (show_all && !menu_is_visible(menu)) row[COL_COLOR] = g_strdup("DarkGray"); diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 800f8c71c..24e3c8cbb 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped @@ -8,7 +8,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 31 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -30,15 +30,7 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; @@ -142,10 +134,6 @@ typedef unsigned int flex_uint32_t; #define YY_BUF_SIZE 16384 #endif -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; @@ -279,7 +267,7 @@ int zconfleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ +static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow zconfwrap()'s to do buffer switches @@ -832,8 +820,6 @@ void alloc_string(const char *str, int size) #define YY_EXTRA_TYPE void * #endif -static int yy_init_globals (void ); - /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -956,9 +942,9 @@ YY_DECL int str = 0; int ts, i; - if ( !(yy_init) ) + if ( (yy_init) ) { - (yy_init) = 1; + (yy_init) = 0; #ifdef YY_USER_INIT YY_USER_INIT; @@ -1466,7 +1452,7 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1983,16 +1969,16 @@ YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to zconflex() will * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan + * @param yy_str a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * zconf_scan_bytes() instead. */ -YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str ) { - return zconf_scan_bytes(yystr,strlen(yystr) ); + return zconf_scan_bytes(yy_str,strlen(yy_str) ); } /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will @@ -2002,7 +1988,7 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len ) { YY_BUFFER_STATE b; char *buf; @@ -2010,15 +1996,15 @@ YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = len + 2; buf = (char *) zconfalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = zconf_scan_buffer(buf,n ); if ( ! b ) @@ -2139,34 +2125,6 @@ void zconfset_debug (int bdebug ) zconf_flex_debug = bdebug ; } -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from zconflex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - zconfin = stdin; - zconfout = stdout; -#else - zconfin = (FILE *) 0; - zconfout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * zconflex_init() - */ - return 0; -} - /* zconflex_destroy is for both reentrant and non-reentrant scanners. */ int zconflex_destroy (void) { @@ -2182,10 +2140,6 @@ int zconflex_destroy (void) zconffree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * zconflex() is called, initialization will occur. */ - yy_init_globals( ); - return 0; } @@ -2197,7 +2151,7 @@ int zconflex_destroy (void) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; - for ( i = 0; i < n; ++i ) + for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif @@ -2206,7 +2160,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) static int yy_flex_strlen (yyconst char * s ) { register int n; - for ( n = 0; s[n]; ++n ) + for ( n = 0; s[n]; ++n ) ; return n; @@ -2237,6 +2191,19 @@ void zconffree (void * ptr ) #define YYTABLES_NAME "yytables" +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + void zconf_starthelp(void) { new_string(); diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index 2628023a1..527f60c99 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -40,10 +40,6 @@ extern "C" { #define TF_COMMAND 0x0001 #define TF_PARAM 0x0002 -#define TF_OPTION 0x0004 - -#define T_OPT_MODULES 1 -#define T_OPT_DEFCONFIG_LIST 2 struct kconf_id { int name; @@ -64,6 +60,8 @@ int zconf_lineno(void); char *zconf_curname(void); /* confdata.c */ +extern const char conf_def_filename[]; + char *conf_get_default_confname(void); /* kconfig_load.c */ @@ -80,7 +78,6 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); -void menu_add_option(int token, char *arg); void menu_finalize(struct menu *parent); void menu_set_type(int type); @@ -102,7 +99,6 @@ const char *str_get(struct gstr *gs); /* symbol.c */ void sym_init(void); void sym_clear_all_valid(void); -void sym_set_all_changed(void); void sym_set_changed(struct symbol *sym); struct symbol *sym_check_deps(struct symbol *sym); struct property *prop_alloc(enum prop_type type, struct symbol *sym); @@ -141,7 +137,7 @@ static inline bool sym_is_optional(struct symbol *sym) static inline bool sym_has_value(struct symbol *sym) { - return sym->flags & SYMBOL_DEF_USER ? true : false; + return sym->flags & SYMBOL_NEW ? false : true; } #ifdef __cplusplus diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index a263746cf..b6a389c5f 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h @@ -2,9 +2,8 @@ /* confdata.c */ P(conf_parse,void,(const char *name)); P(conf_read,int,(const char *name)); -P(conf_read_simple,int,(const char *name, int)); +P(conf_read_simple,int,(const char *name)); P(conf_write,int,(const char *name)); -P(conf_write_autoconf,int,(void)); /* menu.c */ P(rootmenu,struct menu,); @@ -39,4 +38,4 @@ P(prop_get_type_name,const char *,(enum prop_type type)); /* expr.c */ P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); -P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)); +P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index 79886413b..be0200e9c 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c @@ -187,12 +187,9 @@ int dialog_checklist(const char *title, const char *prompt, int height, /* Print the list */ for (i = 0; i < max_choice; i++) { - if (i != choice) - print_item(list, items[(scroll + i) * 3 + 1], - status[i + scroll], i, 0); + print_item(list, items[(scroll + i) * 3 + 1], + status[i + scroll], i, i == choice); } - print_item(list, items[(scroll + choice) * 3 + 1], - status[choice + scroll], choice, 1); print_arrows(dialog, choice, item_no, scroll, box_y, box_x + check_x + 5, list_height); diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index c86c27f2c..0fce20cb7 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -114,7 +114,7 @@ void menu_set_type(int type) sym->type = type; return; } - menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'", + menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n", sym->name ? sym->name : "", sym_type_name(sym->type), sym_type_name(type)); } @@ -124,20 +124,15 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e struct property *prop = prop_alloc(type, current_entry->sym); prop->menu = current_entry; + prop->text = prompt; prop->expr = expr; prop->visible.expr = menu_check_dep(dep); if (prompt) { - if (isspace(*prompt)) { - prop_warn(prop, "leading whitespace ignored"); - while (isspace(*prompt)) - prompt++; - } if (current_entry->prompt) - prop_warn(prop, "prompt redefined"); + menu_warn(current_entry, "prompt redefined\n"); current_entry->prompt = prop; } - prop->text = prompt; return prop; } @@ -157,24 +152,6 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); } -void menu_add_option(int token, char *arg) -{ - struct property *prop; - - switch (token) { - case T_OPT_MODULES: - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(current_entry->sym); - break; - case T_OPT_DEFCONFIG_LIST: - if (!sym_defconfig_list) - sym_defconfig_list = current_entry->sym; - else if (sym_defconfig_list != current_entry->sym) - zconf_error("trying to redefine defconfig symbol"); - break; - } -} - static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) { return sym2->type == S_INT || sym2->type == S_HEX || @@ -348,10 +325,11 @@ void menu_finalize(struct menu *parent) if (sym && !(sym->flags & SYMBOL_WARNED)) { if (sym->type == S_UNKNOWN) - menu_warn(parent, "config symbol defined without type"); + menu_warn(parent, "config symbol defined " + "without type\n"); if (sym_is_choice(sym) && !parent->prompt) - menu_warn(parent, "choice must have a prompt"); + menu_warn(parent, "choice must have a prompt\n"); /* Check properties connected to this symbol */ sym_check_prop(sym); diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 393f3749f..4590cd316 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -6,20 +6,16 @@ #include #include #include -#include #include #include #include -#include +#include #include -#include -#include #include #include #include #include #include -#include #include #include @@ -36,16 +32,32 @@ #endif static QApplication *configApp; -static ConfigSettings *configSettings; static inline QString qgettext(const char* str) { - return QString::fromLocal8Bit(gettext(str)); + return QString::fromLocal8Bit(gettext(str)); } static inline QString qgettext(const QString& str) { - return QString::fromLocal8Bit(gettext(str.latin1())); + return QString::fromLocal8Bit(gettext(str.latin1())); +} + +ConfigSettings::ConfigSettings() + : showAll(false), showName(false), showRange(false), showData(false) +{ +} + +#if QT_VERSION >= 300 +/** + * Reads the list column settings from the application settings. + */ +void ConfigSettings::readListSettings() +{ + showAll = readBoolEntry("/kconfig/qconf/showAll", false); + showName = readBoolEntry("/kconfig/qconf/showName", false); + showRange = readBoolEntry("/kconfig/qconf/showRange", false); + showData = readBoolEntry("/kconfig/qconf/showData", false); } /** @@ -76,7 +88,76 @@ bool ConfigSettings::writeSizes(const QString& key, const QValueList& value stringList.push_back(QString::number(*it)); return writeEntry(key, stringList); } +#endif + + +/* + * update all the children of a menu entry + * removes/adds the entries from the parent widget as necessary + * + * parent: either the menu list widget or a menu entry widget + * menu: entry to be updated + */ +template +void ConfigList::updateMenuList(P* parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + if (!menu) { + while ((item = parent->firstChild())) + delete item; + return; + } + + last = parent->firstChild(); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : parent->firstChild(); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (showAll || visible) { + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = parent->firstChild(); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} #if QT_VERSION >= 300 /* @@ -274,12 +355,6 @@ ConfigItem::~ConfigItem(void) } } -ConfigLineEdit::ConfigLineEdit(ConfigView* parent) - : Parent(parent) -{ - connect(this, SIGNAL(lostFocus()), SLOT(hide())); -} - void ConfigLineEdit::show(ConfigItem* i) { item = i; @@ -310,14 +385,14 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) hide(); } -ConfigList::ConfigList(ConfigView* p, const char *name) - : Parent(p, name), +ConfigList::ConfigList(ConfigView* p, ConfigMainWindow* cv, ConfigSettings* configSettings) + : Parent(p), cview(cv), updateAll(false), symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), showAll(false), showName(false), showRange(false), showData(false), - rootEntry(0), headerPopup(0) + rootEntry(0) { int i; @@ -331,14 +406,11 @@ ConfigList::ConfigList(ConfigView* p, const char *name) connect(this, SIGNAL(selectionChanged(void)), SLOT(updateSelection(void))); - if (name) { - configSettings->beginGroup(name); - showAll = configSettings->readBoolEntry("/showAll", false); - showName = configSettings->readBoolEntry("/showName", false); - showRange = configSettings->readBoolEntry("/showRange", false); - showData = configSettings->readBoolEntry("/showData", false); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + if (configSettings) { + showAll = configSettings->showAll; + showName = configSettings->showName; + showRange = configSettings->showRange; + showData = configSettings->showData; } for (i = 0; i < colNr; i++) @@ -369,30 +441,6 @@ void ConfigList::reinit(void) updateListAll(); } -void ConfigList::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/showName", showName); - configSettings->writeEntry("/showRange", showRange); - configSettings->writeEntry("/showData", showData); - configSettings->writeEntry("/showAll", showAll); - configSettings->endGroup(); - } -} - -ConfigItem* ConfigList::findConfigItem(struct menu *menu) -{ - ConfigItem* item = (ConfigItem*)menu->data; - - for (; item; item = item->nextItem) { - if (this == item->listView()) - break; - } - - return item; -} - void ConfigList::updateSelection(void) { struct menu *menu; @@ -402,8 +450,9 @@ void ConfigList::updateSelection(void) if (!item) return; + cview->setHelp(item); + menu = item->menu; - emit menuChanged(menu); if (!menu) return; type = menu->prompt ? menu->prompt->type : P_UNKNOWN; @@ -415,20 +464,8 @@ void ConfigList::updateList(ConfigItem* item) { ConfigItem* last = 0; - if (!rootEntry) { - if (mode != listMode) - goto update; - QListViewItemIterator it(this); - ConfigItem* item; - - for (; it.current(); ++it) { - item = (ConfigItem*)it.current(); - if (!item->menu) - continue; - item->testUpdateMenu(menu_is_visible(item->menu)); - } - return; - } + if (!rootEntry) + goto update; if (rootEntry != &rootmenu && (mode == singleMode || (mode == symbolMode && rootEntry->parent != &rootmenu))) { @@ -454,6 +491,14 @@ update: triggerUpdate(); } +void ConfigList::setAllOpen(bool open) +{ + QListViewItemIterator it(this); + + for (; it.current(); it++) + it.current()->setOpen(open); +} + void ConfigList::setValue(ConfigItem* item, tristate val) { struct symbol* sym; @@ -536,7 +581,6 @@ void ConfigList::setRootMenu(struct menu *menu) rootEntry = menu; updateListAll(); setSelected(currentItem(), hasFocus()); - ensureItemVisible(currentItem()); } void ConfigList::setParentMenu(void) @@ -559,74 +603,6 @@ void ConfigList::setParentMenu(void) } } -/* - * update all the children of a menu entry - * removes/adds the entries from the parent widget as necessary - * - * parent: either the menu list widget or a menu entry widget - * menu: entry to be updated - */ -template -void ConfigList::updateMenuList(P* parent, struct menu* menu) -{ - struct menu* child; - ConfigItem* item; - ConfigItem* last; - bool visible; - enum prop_type type; - - if (!menu) { - while ((item = parent->firstChild())) - delete item; - return; - } - - last = parent->firstChild(); - if (last && !last->goParent) - last = 0; - for (child = menu->list; child; child = child->next) { - item = last ? last->nextSibling() : parent->firstChild(); - type = child->prompt ? child->prompt->type : P_UNKNOWN; - - switch (mode) { - case menuMode: - if (!(child->flags & MENU_ROOT)) - goto hide; - break; - case symbolMode: - if (child->flags & MENU_ROOT) - goto hide; - break; - default: - break; - } - - visible = menu_is_visible(child); - if (showAll || visible) { - if (!item || item->menu != child) - item = new ConfigItem(parent, last, child, visible); - else - item->testUpdateMenu(visible); - - if (mode == fullMode || mode == menuMode || type != P_MENU) - updateMenuList(item, child); - else - updateMenuList(item, 0); - last = item; - continue; - } - hide: - if (item && item->menu == child) { - last = parent->firstChild(); - if (last == item) - last = 0; - else while (last->nextSibling() != item) - last = last->nextSibling(); - delete item; - } - } -} - void ConfigList::keyPressEvent(QKeyEvent* ev) { QListViewItem* i = currentItem(); @@ -634,7 +610,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) struct menu *menu; enum prop_type type; - if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) { + if (ev->key() == Key_Escape && mode != fullMode) { emit parentSelected(); ev->accept(); return; @@ -779,62 +755,23 @@ skip: void ConfigList::focusInEvent(QFocusEvent *e) { - struct menu *menu = NULL; - Parent::focusInEvent(e); - ConfigItem* item = (ConfigItem *)currentItem(); - if (item) { - setSelected(item, TRUE); - menu = item->menu; - } - emit gotFocus(menu); -} + QListViewItem* item = currentItem(); + if (!item) + return; -void ConfigList::contextMenuEvent(QContextMenuEvent *e) -{ - if (e->y() <= header()->geometry().bottom()) { - if (!headerPopup) { - QAction *action; - - headerPopup = new QPopupMenu(this); - action = new QAction("Show Name", 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowName(bool))); - connect(parent(), SIGNAL(showNameChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showName); - action->addTo(headerPopup); - action = new QAction("Show Range", 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowRange(bool))); - connect(parent(), SIGNAL(showRangeChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showRange); - action->addTo(headerPopup); - action = new QAction("Show Data", 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowData(bool))); - connect(parent(), SIGNAL(showDataChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showData); - action->addTo(headerPopup); - } - headerPopup->exec(e->globalPos()); - e->accept(); - } else - e->ignore(); + setSelected(item, TRUE); + emit gotFocus(); } ConfigView* ConfigView::viewList; -ConfigView::ConfigView(QWidget* parent, const char *name) - : Parent(parent, name) +ConfigView::ConfigView(QWidget* parent, ConfigMainWindow* cview, + ConfigSettings *configSettings) + : Parent(parent) { - list = new ConfigList(this, name); + list = new ConfigList(this, cview, configSettings); lineEdit = new ConfigLineEdit(this); lineEdit->hide(); @@ -854,50 +791,6 @@ ConfigView::~ConfigView(void) } } -void ConfigView::setShowAll(bool b) -{ - if (list->showAll != b) { - list->showAll = b; - list->updateListAll(); - emit showAllChanged(b); - } -} - -void ConfigView::setShowName(bool b) -{ - if (list->showName != b) { - list->showName = b; - list->reinit(); - emit showNameChanged(b); - } -} - -void ConfigView::setShowRange(bool b) -{ - if (list->showRange != b) { - list->showRange = b; - list->reinit(); - emit showRangeChanged(b); - } -} - -void ConfigView::setShowData(bool b) -{ - if (list->showData != b) { - list->showData = b; - list->reinit(); - emit showDataChanged(b); - } -} - -void ConfigList::setAllOpen(bool open) -{ - QListViewItemIterator it(this); - - for (; it.current(); it++) - it.current()->setOpen(open); -} - void ConfigView::updateList(ConfigItem* item) { ConfigView* v; @@ -914,347 +807,6 @@ void ConfigView::updateListAll(void) v->list->updateListAll(); } -ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) - : Parent(parent, name), menu(0) -{ - if (name) { - configSettings->beginGroup(name); - _showDebug = configSettings->readBoolEntry("/showDebug", false); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } -} - -void ConfigInfoView::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/showDebug", showDebug()); - configSettings->endGroup(); - } -} - -void ConfigInfoView::setShowDebug(bool b) -{ - if (_showDebug != b) { - _showDebug = b; - if (menu) - menuInfo(); - else if (sym) - symbolInfo(); - emit showDebugChanged(b); - } -} - -void ConfigInfoView::setInfo(struct menu *m) -{ - if (menu == m) - return; - menu = m; - if (!menu) - clear(); - else - menuInfo(); -} - -void ConfigInfoView::setSource(const QString& name) -{ - const char *p = name.latin1(); - - menu = NULL; - sym = NULL; - - switch (p[0]) { - case 'm': - struct menu *m; - - if (sscanf(p, "m%p", &m) == 1 && menu != m) { - menu = m; - menuInfo(); - emit menuSelected(menu); - } - break; - case 's': - struct symbol *s; - - if (sscanf(p, "s%p", &s) == 1 && sym != s) { - sym = s; - symbolInfo(); - } - break; - } -} - -void ConfigInfoView::symbolInfo(void) -{ - QString str; - - str += "Symbol: "; - str += print_filter(sym->name); - str += "

value: "; - str += print_filter(sym_get_string_value(sym)); - str += "
visibility: "; - str += sym->visible == yes ? "y" : sym->visible == mod ? "m" : "n"; - str += "
"; - str += debug_info(sym); - - setText(str); -} - -void ConfigInfoView::menuInfo(void) -{ - struct symbol* sym; - QString head, debug, help; - - sym = menu->sym; - if (sym) { - if (menu->prompt) { - head += ""; - head += print_filter(_(menu->prompt->text)); - head += ""; - if (sym->name) { - head += " ("; - if (showDebug()) - head += QString().sprintf("
", sym); - head += print_filter(sym->name); - if (showDebug()) - head += ""; - head += ")"; - } - } else if (sym->name) { - head += ""; - if (showDebug()) - head += QString().sprintf("", sym); - head += print_filter(sym->name); - if (showDebug()) - head += ""; - head += ""; - } - head += "

"; - - if (showDebug()) - debug = debug_info(sym); - - help = print_filter(_(sym->help)); - } else if (menu->prompt) { - head += ""; - head += print_filter(_(menu->prompt->text)); - head += "

"; - if (showDebug()) { - if (menu->prompt->visible.expr) { - debug += "  dep: "; - expr_print(menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); - debug += "

"; - } - } - } - if (showDebug()) - debug += QString().sprintf("defined at %s:%d

", menu->file->name, menu->lineno); - - setText(head + debug + help); -} - -QString ConfigInfoView::debug_info(struct symbol *sym) -{ - QString debug; - - debug += "type: "; - debug += print_filter(sym_type_name(sym->type)); - if (sym_is_choice(sym)) - debug += " (choice)"; - debug += "
"; - if (sym->rev_dep.expr) { - debug += "reverse dep: "; - expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - for (struct property *prop = sym->prop; prop; prop = prop->next) { - switch (prop->type) { - case P_PROMPT: - case P_MENU: - debug += QString().sprintf("prompt: ", prop->menu); - debug += print_filter(_(prop->text)); - debug += "
"; - break; - case P_DEFAULT: - debug += "default: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - break; - case P_CHOICE: - if (sym_is_choice(sym)) { - debug += "choice: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - break; - case P_SELECT: - debug += "select: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - break; - case P_RANGE: - debug += "range: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - break; - default: - debug += "unknown property: "; - debug += prop_get_type_name(prop->type); - debug += "
"; - } - if (prop->visible.expr) { - debug += "    dep: "; - expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - } - debug += "
"; - - return debug; -} - -QString ConfigInfoView::print_filter(const QString &str) -{ - QRegExp re("[<>&\"\\n]"); - QString res = str; - for (int i = 0; (i = res.find(re, i)) >= 0;) { - switch (res[i].latin1()) { - case '<': - res.replace(i, 1, "<"); - i += 4; - break; - case '>': - res.replace(i, 1, ">"); - i += 4; - break; - case '&': - res.replace(i, 1, "&"); - i += 5; - break; - case '"': - res.replace(i, 1, """); - i += 6; - break; - case '\n': - res.replace(i, 1, "
"); - i += 4; - break; - } - } - return res; -} - -void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) -{ - QString* text = reinterpret_cast(data); - QString str2 = print_filter(str); - - if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { - *text += QString().sprintf("", sym); - *text += str2; - *text += ""; - } else - *text += str2; -} - -QPopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos) -{ - QPopupMenu* popup = Parent::createPopupMenu(pos); - QAction* action = new QAction("Show Debug Info", 0, popup); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); - connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); - action->setOn(showDebug()); - popup->insertSeparator(); - action->addTo(popup); - return popup; -} - -void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e) -{ - Parent::contentsContextMenuEvent(e); -} - -ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name) - : Parent(parent, name), result(NULL) -{ - setCaption("Search Config"); - - QVBoxLayout* layout1 = new QVBoxLayout(this, 11, 6); - QHBoxLayout* layout2 = new QHBoxLayout(0, 0, 6); - layout2->addWidget(new QLabel("Find:", this)); - editField = new QLineEdit(this); - connect(editField, SIGNAL(returnPressed()), SLOT(search())); - layout2->addWidget(editField); - searchButton = new QPushButton("Search", this); - searchButton->setAutoDefault(FALSE); - connect(searchButton, SIGNAL(clicked()), SLOT(search())); - layout2->addWidget(searchButton); - layout1->addLayout(layout2); - - split = new QSplitter(this); - split->setOrientation(QSplitter::Vertical); - list = new ConfigView(split, name); - list->list->mode = listMode; - info = new ConfigInfoView(split, name); - connect(list->list, SIGNAL(menuChanged(struct menu *)), - info, SLOT(setInfo(struct menu *))); - layout1->addWidget(split); - - if (name) { - int x, y, width, height; - bool ok; - - configSettings->beginGroup(name); - width = configSettings->readNumEntry("/window width", parent->width() / 2); - height = configSettings->readNumEntry("/window height", parent->height() / 2); - resize(width, height); - x = configSettings->readNumEntry("/window x", 0, &ok); - if (ok) - y = configSettings->readNumEntry("/window y", 0, &ok); - if (ok) - move(x, y); - QValueList sizes = configSettings->readSizes("/split", &ok); - if (ok) - split->setSizes(sizes); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } -} - -void ConfigSearchWindow::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/window x", pos().x()); - configSettings->writeEntry("/window y", pos().y()); - configSettings->writeEntry("/window width", size().width()); - configSettings->writeEntry("/window height", size().height()); - configSettings->writeSizes("/split", split->sizes()); - configSettings->endGroup(); - } -} - -void ConfigSearchWindow::search(void) -{ - struct symbol **p; - struct property *prop; - ConfigItem *lastItem = NULL; - - free(result); - list->list->clear(); - - result = sym_re_search(editField->text().latin1()); - if (!result) - return; - for (p = result; *p; p++) { - for_all_prompts((*p), prop) - lastItem = new ConfigItem(list->list, lastItem, prop->menu, - menu_is_visible(prop->menu)); - } -} - /* * Construct the complete config widget */ @@ -1266,30 +818,42 @@ ConfigMainWindow::ConfigMainWindow(void) QWidget *d = configApp->desktop(); - width = configSettings->readNumEntry("/window width", d->width() - 64); - height = configSettings->readNumEntry("/window height", d->height() - 64); + ConfigSettings* configSettings = new ConfigSettings(); +#if QT_VERSION >= 300 + width = configSettings->readNumEntry("/kconfig/qconf/window width", d->width() - 64); + height = configSettings->readNumEntry("/kconfig/qconf/window height", d->height() - 64); resize(width, height); - x = configSettings->readNumEntry("/window x", 0, &ok); + x = configSettings->readNumEntry("/kconfig/qconf/window x", 0, &ok); if (ok) - y = configSettings->readNumEntry("/window y", 0, &ok); + y = configSettings->readNumEntry("/kconfig/qconf/window y", 0, &ok); if (ok) move(x, y); + showDebug = configSettings->readBoolEntry("/kconfig/qconf/showDebug", false); + + // read list settings into configSettings, will be used later for ConfigList setup + configSettings->readListSettings(); +#else + width = d->width() - 64; + height = d->height() - 64; + resize(width, height); + showDebug = false; +#endif split1 = new QSplitter(this); split1->setOrientation(QSplitter::Horizontal); setCentralWidget(split1); - menuView = new ConfigView(split1, "menu"); + menuView = new ConfigView(split1, this, configSettings); menuList = menuView->list; split2 = new QSplitter(split1); split2->setOrientation(QSplitter::Vertical); // create config tree - configView = new ConfigView(split2, "config"); + configView = new ConfigView(split2, this, configSettings); configList = configView->list; - helpText = new ConfigInfoView(split2, "help"); + helpText = new QTextView(split2); helpText->setTextFormat(Qt::RichText); setTabOrder(configList, helpText); @@ -1309,8 +873,6 @@ ConfigMainWindow::ConfigMainWindow(void) connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this); connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); - QAction *searchAction = new QAction("Search", "&Search", CTRL+Key_F, this); - connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), "Split View", 0, this); connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), "Split View", 0, this); @@ -1320,29 +882,24 @@ ConfigMainWindow::ConfigMainWindow(void) QAction *showNameAction = new QAction(NULL, "Show Name", 0, this); showNameAction->setToggleAction(TRUE); - connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); - connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool))); - showNameAction->setOn(configView->showName()); + showNameAction->setOn(configList->showName); + connect(showNameAction, SIGNAL(toggled(bool)), SLOT(setShowName(bool))); QAction *showRangeAction = new QAction(NULL, "Show Range", 0, this); showRangeAction->setToggleAction(TRUE); - connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); - connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool))); showRangeAction->setOn(configList->showRange); + connect(showRangeAction, SIGNAL(toggled(bool)), SLOT(setShowRange(bool))); QAction *showDataAction = new QAction(NULL, "Show Data", 0, this); showDataAction->setToggleAction(TRUE); - connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); - connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool))); showDataAction->setOn(configList->showData); + connect(showDataAction, SIGNAL(toggled(bool)), SLOT(setShowData(bool))); QAction *showAllAction = new QAction(NULL, "Show All Options", 0, this); showAllAction->setToggleAction(TRUE); - connect(showAllAction, SIGNAL(toggled(bool)), configView, SLOT(setShowAll(bool))); - connect(showAllAction, SIGNAL(toggled(bool)), menuView, SLOT(setShowAll(bool))); showAllAction->setOn(configList->showAll); + connect(showAllAction, SIGNAL(toggled(bool)), SLOT(setShowAll(bool))); QAction *showDebugAction = new QAction(NULL, "Show Debug Info", 0, this); showDebugAction->setToggleAction(TRUE); - connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); - connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool))); - showDebugAction->setOn(helpText->showDebug()); + showDebugAction->setOn(showDebug); + connect(showDebugAction, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); QAction *showIntroAction = new QAction(NULL, "Introduction", 0, this); connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro())); @@ -1366,8 +923,6 @@ ConfigMainWindow::ConfigMainWindow(void) saveAction->addTo(config); saveAsAction->addTo(config); config->insertSeparator(); - searchAction->addTo(config); - config->insertSeparator(); quitAction->addTo(config); // create options menu @@ -1387,27 +942,20 @@ ConfigMainWindow::ConfigMainWindow(void) showIntroAction->addTo(helpMenu); showAboutAction->addTo(helpMenu); - connect(configList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); connect(configList, SIGNAL(menuSelected(struct menu *)), SLOT(changeMenu(struct menu *))); connect(configList, SIGNAL(parentSelected()), SLOT(goBack())); - connect(menuList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); connect(menuList, SIGNAL(menuSelected(struct menu *)), SLOT(changeMenu(struct menu *))); - connect(configList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), + connect(configList, SIGNAL(gotFocus(void)), + SLOT(listFocusChanged(void))); + connect(menuList, SIGNAL(gotFocus(void)), SLOT(listFocusChanged(void))); - connect(helpText, SIGNAL(menuSelected(struct menu *)), - SLOT(setMenuLink(struct menu *))); - QString listMode = configSettings->readEntry("/listMode", "symbol"); +#if QT_VERSION >= 300 + QString listMode = configSettings->readEntry("/kconfig/qconf/listMode", "symbol"); if (listMode == "single") showSingleView(); else if (listMode == "full") @@ -1416,13 +964,162 @@ ConfigMainWindow::ConfigMainWindow(void) showSplitView(); // UI setup done, restore splitter positions - QValueList sizes = configSettings->readSizes("/split1", &ok); + QValueList sizes = configSettings->readSizes("/kconfig/qconf/split1", &ok); if (ok) split1->setSizes(sizes); - sizes = configSettings->readSizes("/split2", &ok); + sizes = configSettings->readSizes("/kconfig/qconf/split2", &ok); if (ok) split2->setSizes(sizes); +#else + showSplitView(); +#endif + delete configSettings; +} + +static QString print_filter(const QString &str) +{ + QRegExp re("[<>&\"\\n]"); + QString res = str; + for (int i = 0; (i = res.find(re, i)) >= 0;) { + switch (res[i].latin1()) { + case '<': + res.replace(i, 1, "<"); + i += 4; + break; + case '>': + res.replace(i, 1, ">"); + i += 4; + break; + case '&': + res.replace(i, 1, "&"); + i += 5; + break; + case '"': + res.replace(i, 1, """); + i += 6; + break; + case '\n': + res.replace(i, 1, "
"); + i += 4; + break; + } + } + return res; +} + +static void expr_print_help(void *data, const char *str) +{ + reinterpret_cast(data)->append(print_filter(str)); +} + +/* + * display a new help entry as soon as a new menu entry is selected + */ +void ConfigMainWindow::setHelp(QListViewItem* item) +{ + struct symbol* sym; + struct menu* menu = 0; + + configList->parent()->lineEdit->hide(); + if (item) + menu = ((ConfigItem*)item)->menu; + if (!menu) { + helpText->setText(QString::null); + return; + } + + QString head, debug, help; + menu = ((ConfigItem*)item)->menu; + sym = menu->sym; + if (sym) { + if (menu->prompt) { + head += ""; + head += print_filter(_(menu->prompt->text)); + head += ""; + if (sym->name) { + head += " ("; + head += print_filter(_(sym->name)); + head += ")"; + } + } else if (sym->name) { + head += ""; + head += print_filter(_(sym->name)); + head += ""; + } + head += "

"; + + if (showDebug) { + debug += "type: "; + debug += print_filter(sym_type_name(sym->type)); + if (sym_is_choice(sym)) + debug += " (choice)"; + debug += "
"; + if (sym->rev_dep.expr) { + debug += "reverse dep: "; + expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + for (struct property *prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_PROMPT: + case P_MENU: + debug += "prompt: "; + debug += print_filter(_(prop->text)); + debug += "
"; + break; + case P_DEFAULT: + debug += "default: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + case P_CHOICE: + if (sym_is_choice(sym)) { + debug += "choice: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + break; + case P_SELECT: + debug += "select: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + case P_RANGE: + debug += "range: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + default: + debug += "unknown property: "; + debug += prop_get_type_name(prop->type); + debug += "
"; + } + if (prop->visible.expr) { + debug += "    dep: "; + expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + } + debug += "
"; + } + + help = print_filter(_(sym->help)); + } else if (menu->prompt) { + head += ""; + head += print_filter(_(menu->prompt->text)); + head += "

"; + if (showDebug) { + if (menu->prompt->visible.expr) { + debug += "  dep: "; + expr_print(menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); + debug += "

"; + } + } + } + if (showDebug) + debug += QString().sprintf("defined at %s:%d

", menu->file->name, menu->lineno); + helpText->setText(head + debug + help); } void ConfigMainWindow::loadConfig(void) @@ -1450,73 +1147,21 @@ void ConfigMainWindow::saveConfigAs(void) QMessageBox::information(this, "qconf", "Unable to save configuration!"); } -void ConfigMainWindow::searchConfig(void) -{ - if (!searchWindow) - searchWindow = new ConfigSearchWindow(this, "search"); - searchWindow->show(); -} - void ConfigMainWindow::changeMenu(struct menu *menu) { configList->setRootMenu(menu); backAction->setEnabled(TRUE); } -void ConfigMainWindow::setMenuLink(struct menu *menu) +void ConfigMainWindow::listFocusChanged(void) { - struct menu *parent; - ConfigList* list = NULL; - ConfigItem* item; - - if (!menu_is_visible(menu) && !configView->showAll()) - return; - - switch (configList->mode) { - case singleMode: - list = configList; - parent = menu_get_parent_menu(menu); - if (!parent) - return; - list->setRootMenu(parent); - break; - case symbolMode: - if (menu->flags & MENU_ROOT) { - configList->setRootMenu(menu); + if (menuList->hasFocus()) { + if (menuList->mode == menuMode) configList->clearSelection(); - list = menuList; - } else { - list = configList; - parent = menu_get_parent_menu(menu->parent); - if (!parent) - return; - item = menuList->findConfigItem(parent); - if (item) { - menuList->setSelected(item, TRUE); - menuList->ensureItemVisible(item); - } - list->setRootMenu(parent); - } - break; - case fullMode: - list = configList; - break; + setHelp(menuList->selectedItem()); + } else if (configList->hasFocus()) { + setHelp(configList->selectedItem()); } - - if (list) { - item = list->findConfigItem(menu); - if (item) { - list->setSelected(item, TRUE); - list->ensureItemVisible(item); - list->setFocus(); - } - } -} - -void ConfigMainWindow::listFocusChanged(void) -{ - if (menuList->mode == menuMode) - configList->clearSelection(); } void ConfigMainWindow::goBack(void) @@ -1578,6 +1223,53 @@ void ConfigMainWindow::showFullView(void) configList->setFocus(); } +void ConfigMainWindow::setShowAll(bool b) +{ + if (configList->showAll == b) + return; + configList->showAll = b; + configList->updateListAll(); + menuList->showAll = b; + menuList->updateListAll(); +} + +void ConfigMainWindow::setShowDebug(bool b) +{ + if (showDebug == b) + return; + showDebug = b; +} + +void ConfigMainWindow::setShowName(bool b) +{ + if (configList->showName == b) + return; + configList->showName = b; + configList->reinit(); + menuList->showName = b; + menuList->reinit(); +} + +void ConfigMainWindow::setShowRange(bool b) +{ + if (configList->showRange == b) + return; + configList->showRange = b; + configList->reinit(); + menuList->showRange = b; + menuList->reinit(); +} + +void ConfigMainWindow::setShowData(bool b) +{ + if (configList->showData == b) + return; + configList->showData = b; + configList->reinit(); + menuList->showData = b; + menuList->reinit(); +} + /* * ask for saving configuration before quitting * TODO ask only when something changed @@ -1632,10 +1324,17 @@ void ConfigMainWindow::showAbout(void) void ConfigMainWindow::saveSettings(void) { - configSettings->writeEntry("/window x", pos().x()); - configSettings->writeEntry("/window y", pos().y()); - configSettings->writeEntry("/window width", size().width()); - configSettings->writeEntry("/window height", size().height()); +#if QT_VERSION >= 300 + ConfigSettings *configSettings = new ConfigSettings; + configSettings->writeEntry("/kconfig/qconf/window x", pos().x()); + configSettings->writeEntry("/kconfig/qconf/window y", pos().y()); + configSettings->writeEntry("/kconfig/qconf/window width", size().width()); + configSettings->writeEntry("/kconfig/qconf/window height", size().height()); + configSettings->writeEntry("/kconfig/qconf/showName", configList->showName); + configSettings->writeEntry("/kconfig/qconf/showRange", configList->showRange); + configSettings->writeEntry("/kconfig/qconf/showData", configList->showData); + configSettings->writeEntry("/kconfig/qconf/showAll", configList->showAll); + configSettings->writeEntry("/kconfig/qconf/showDebug", showDebug); QString entry; switch(configList->mode) { @@ -1651,10 +1350,13 @@ void ConfigMainWindow::saveSettings(void) entry = "full"; break; } - configSettings->writeEntry("/listMode", entry); + configSettings->writeEntry("/kconfig/qconf/listMode", entry); - configSettings->writeSizes("/split1", split1->sizes()); - configSettings->writeSizes("/split2", split2->sizes()); + configSettings->writeSizes("/kconfig/qconf/split1", split1->sizes()); + configSettings->writeSizes("/kconfig/qconf/split2", split2->sizes()); + + delete configSettings; +#endif } void fixup_rootmenu(struct menu *menu) @@ -1712,19 +1414,13 @@ int main(int ac, char** av) conf_read(NULL); //zconfdump(stdout); - configSettings = new ConfigSettings(); - configSettings->beginGroup("/kconfig/qconf"); v = new ConfigMainWindow(); //zconfdump(stdout); - configApp->setMainWidget(v); + v->show(); configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); - v->show(); configApp->exec(); - configSettings->endGroup(); - delete configSettings; - return 0; } diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 6a9e3b14c..e52f3e90b 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -7,25 +7,9 @@ #if QT_VERSION >= 300 #include #else -class QSettings { -public: - void beginGroup(const QString& group) { } - void endGroup(void) { } - bool readBoolEntry(const QString& key, bool def = FALSE, bool* ok = 0) const - { if (ok) *ok = FALSE; return def; } - int readNumEntry(const QString& key, int def = 0, bool* ok = 0) const - { if (ok) *ok = FALSE; return def; } - QString readEntry(const QString& key, const QString& def = QString::null, bool* ok = 0) const - { if (ok) *ok = FALSE; return def; } - QStringList readListEntry(const QString& key, bool* ok = 0) const - { if (ok) *ok = FALSE; return QStringList(); } - template - bool writeEntry(const QString& key, t value) - { return TRUE; } -}; +class QSettings { }; #endif -class ConfigView; class ConfigList; class ConfigItem; class ConfigLineEdit; @@ -34,38 +18,64 @@ class ConfigMainWindow; class ConfigSettings : public QSettings { public: + ConfigSettings(); + +#if QT_VERSION >= 300 + void readListSettings(); QValueList readSizes(const QString& key, bool *ok); bool writeSizes(const QString& key, const QValueList& value); +#endif + + bool showAll; + bool showName; + bool showRange; + bool showData; +}; + +class ConfigView : public QVBox { + Q_OBJECT + typedef class QVBox Parent; +public: + ConfigView(QWidget* parent, ConfigMainWindow* cview, ConfigSettings* configSettings); + ~ConfigView(void); + static void updateList(ConfigItem* item); + static void updateListAll(void); + +public: + ConfigList* list; + ConfigLineEdit* lineEdit; + + static ConfigView* viewList; + ConfigView* nextView; }; enum colIdx { promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr }; enum listMode { - singleMode, menuMode, symbolMode, fullMode, listMode + singleMode, menuMode, symbolMode, fullMode }; class ConfigList : public QListView { Q_OBJECT typedef class QListView Parent; public: - ConfigList(ConfigView* p, const char *name = 0); + ConfigList(ConfigView* p, ConfigMainWindow* cview, ConfigSettings *configSettings); void reinit(void); ConfigView* parent(void) const { return (ConfigView*)Parent::parent(); } - ConfigItem* findConfigItem(struct menu *); protected: + ConfigMainWindow* cview; + void keyPressEvent(QKeyEvent *e); void contentsMousePressEvent(QMouseEvent *e); void contentsMouseReleaseEvent(QMouseEvent *e); void contentsMouseMoveEvent(QMouseEvent *e); void contentsMouseDoubleClickEvent(QMouseEvent *e); void focusInEvent(QFocusEvent *e); - void contextMenuEvent(QContextMenuEvent *e); - public slots: void setRootMenu(struct menu *menu); @@ -73,12 +83,10 @@ public slots: void setValue(ConfigItem* item, tristate val); void changeValue(ConfigItem* item); void updateSelection(void); - void saveSettings(void); signals: - void menuChanged(struct menu *menu); void menuSelected(struct menu *menu); void parentSelected(void); - void gotFocus(struct menu *); + void gotFocus(void); public: void updateListAll(void) @@ -129,7 +137,6 @@ public: struct menu *rootEntry; QColorGroup disabledColorGroup; QColorGroup inactivedColorGroup; - QPopupMenu* headerPopup; private: int colMap[colNr]; @@ -201,7 +208,9 @@ class ConfigLineEdit : public QLineEdit { Q_OBJECT typedef class QLineEdit Parent; public: - ConfigLineEdit(ConfigView* parent); + ConfigLineEdit(ConfigView* parent) + : Parent(parent) + { } ConfigView* parent(void) const { return (ConfigView*)Parent::parent(); @@ -213,104 +222,26 @@ public: ConfigItem *item; }; -class ConfigView : public QVBox { - Q_OBJECT - typedef class QVBox Parent; -public: - ConfigView(QWidget* parent, const char *name = 0); - ~ConfigView(void); - static void updateList(ConfigItem* item); - static void updateListAll(void); - - bool showAll(void) const { return list->showAll; } - bool showName(void) const { return list->showName; } - bool showRange(void) const { return list->showRange; } - bool showData(void) const { return list->showData; } -public slots: - void setShowAll(bool); - void setShowName(bool); - void setShowRange(bool); - void setShowData(bool); -signals: - void showAllChanged(bool); - void showNameChanged(bool); - void showRangeChanged(bool); - void showDataChanged(bool); -public: - ConfigList* list; - ConfigLineEdit* lineEdit; - - static ConfigView* viewList; - ConfigView* nextView; -}; - -class ConfigInfoView : public QTextBrowser { - Q_OBJECT - typedef class QTextBrowser Parent; -public: - ConfigInfoView(QWidget* parent, const char *name = 0); - bool showDebug(void) const { return _showDebug; } - -public slots: - void setInfo(struct menu *menu); - void saveSettings(void); - void setSource(const QString& name); - void setShowDebug(bool); - -signals: - void showDebugChanged(bool); - void menuSelected(struct menu *); - -protected: - void symbolInfo(void); - void menuInfo(void); - QString debug_info(struct symbol *sym); - static QString print_filter(const QString &str); - static void expr_print_help(void *data, struct symbol *sym, const char *str); - QPopupMenu* createPopupMenu(const QPoint& pos); - void contentsContextMenuEvent(QContextMenuEvent *e); - - struct symbol *sym; - struct menu *menu; - bool _showDebug; -}; - -class ConfigSearchWindow : public QDialog { - Q_OBJECT - typedef class QDialog Parent; -public: - ConfigSearchWindow(QWidget* parent, const char *name = 0); - -public slots: - void saveSettings(void); - void search(void); - -protected: - QLineEdit* editField; - QPushButton* searchButton; - QSplitter* split; - ConfigView* list; - ConfigInfoView* info; - - struct symbol **result; -}; - class ConfigMainWindow : public QMainWindow { Q_OBJECT public: ConfigMainWindow(void); public slots: + void setHelp(QListViewItem* item); void changeMenu(struct menu *); - void setMenuLink(struct menu *); void listFocusChanged(void); void goBack(void); void loadConfig(void); void saveConfig(void); void saveConfigAs(void); - void searchConfig(void); void showSingleView(void); void showSplitView(void); void showFullView(void); + void setShowAll(bool); + void setShowDebug(bool); + void setShowRange(bool); + void setShowName(bool); + void setShowData(bool); void showIntro(void); void showAbout(void); void saveSettings(void); @@ -318,14 +249,15 @@ public slots: protected: void closeEvent(QCloseEvent *e); - ConfigSearchWindow *searchWindow; ConfigView *menuView; ConfigList *menuList; ConfigView *configView; ConfigList *configList; - ConfigInfoView *helpText; + QTextView *helpText; QToolBar *toolBar; QAction *backAction; QSplitter* split1; QSplitter* split2; + + bool showDebug; }; diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index ee225ced2..3d7877afc 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -15,15 +15,15 @@ struct symbol symbol_yes = { .name = "y", .curr = { "y", yes }, - .flags = SYMBOL_CONST|SYMBOL_VALID, + .flags = SYMBOL_YES|SYMBOL_VALID, }, symbol_mod = { .name = "m", .curr = { "m", mod }, - .flags = SYMBOL_CONST|SYMBOL_VALID, + .flags = SYMBOL_MOD|SYMBOL_VALID, }, symbol_no = { .name = "n", .curr = { "n", no }, - .flags = SYMBOL_CONST|SYMBOL_VALID, + .flags = SYMBOL_NO|SYMBOL_VALID, }, symbol_empty = { .name = "", .curr = { "", no }, @@ -31,7 +31,6 @@ struct symbol symbol_yes = { }; int sym_change_count; -struct symbol *sym_defconfig_list; struct symbol *modules_sym; tristate modules_val; @@ -228,7 +227,7 @@ static struct symbol *sym_calc_choice(struct symbol *sym) struct expr *e; /* is the user choice visible? */ - def_sym = sym->def[S_DEF_USER].val; + def_sym = sym->user.val; if (def_sym) { sym_calc_visibility(def_sym); if (def_sym->visible != no) @@ -307,7 +306,7 @@ void sym_calc_value(struct symbol *sym) } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) { sym->flags |= SYMBOL_WRITE; if (sym_has_value(sym)) - newval.tri = sym->def[S_DEF_USER].tri; + newval.tri = sym->user.tri; else if (!sym_is_choice(sym)) { prop = sym_get_default_prop(sym); if (prop) @@ -330,7 +329,7 @@ void sym_calc_value(struct symbol *sym) if (sym->visible != no) { sym->flags |= SYMBOL_WRITE; if (sym_has_value(sym)) { - newval.val = sym->def[S_DEF_USER].val; + newval.val = sym->user.val; break; } } @@ -353,13 +352,10 @@ void sym_calc_value(struct symbol *sym) sym->curr.val = sym_calc_choice(sym); sym_validate_range(sym); - if (memcmp(&oldval, &sym->curr, sizeof(oldval))) { + if (memcmp(&oldval, &sym->curr, sizeof(oldval))) sym_set_changed(sym); - if (modules_sym == sym) { - sym_set_all_changed(); - modules_val = modules_sym->curr.tri; - } - } + if (modules_sym == sym) + modules_val = modules_sym->curr.tri; if (sym_is_choice(sym)) { int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); @@ -430,8 +426,8 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) if (oldval != val && !sym_tristate_within_range(sym, val)) return false; - if (!(sym->flags & SYMBOL_DEF_USER)) { - sym->flags |= SYMBOL_DEF_USER; + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; sym_set_changed(sym); } /* @@ -443,18 +439,21 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) struct property *prop; struct expr *e; - cs->def[S_DEF_USER].val = sym; - cs->flags |= SYMBOL_DEF_USER; + cs->user.val = sym; + cs->flags &= ~SYMBOL_NEW; prop = sym_get_choice_prop(cs); for (e = prop->expr; e; e = e->left.expr) { if (e->right.sym->visible != no) - e->right.sym->flags |= SYMBOL_DEF_USER; + e->right.sym->flags &= ~SYMBOL_NEW; } } - sym->def[S_DEF_USER].tri = val; - if (oldval != val) + sym->user.tri = val; + if (oldval != val) { sym_clear_all_valid(); + if (sym == modules_sym) + sym_set_all_changed(); + } return true; } @@ -592,20 +591,20 @@ bool sym_set_string_value(struct symbol *sym, const char *newval) if (!sym_string_within_range(sym, newval)) return false; - if (!(sym->flags & SYMBOL_DEF_USER)) { - sym->flags |= SYMBOL_DEF_USER; + if (sym->flags & SYMBOL_NEW) { + sym->flags &= ~SYMBOL_NEW; sym_set_changed(sym); } - oldval = sym->def[S_DEF_USER].val; + oldval = sym->user.val; size = strlen(newval) + 1; if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { size += 2; - sym->def[S_DEF_USER].val = val = malloc(size); + sym->user.val = val = malloc(size); *val++ = '0'; *val++ = 'x'; } else if (!oldval || strcmp(oldval, newval)) - sym->def[S_DEF_USER].val = val = malloc(size); + sym->user.val = val = malloc(size); else return true; @@ -680,6 +679,7 @@ struct symbol *sym_lookup(const char *name, int isconst) memset(symbol, 0, sizeof(*symbol)); symbol->name = new_name; symbol->type = S_UNKNOWN; + symbol->flags = SYMBOL_NEW; if (isconst) symbol->flags |= SYMBOL_CONST; diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index e3f28b9d5..656d2c87d 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -44,9 +44,7 @@ int file_write_dep(const char *name) else fprintf(out, "\t%s\n", file->name); } - fprintf(out, "\ninclude/config/auto.conf: \\\n" - "\t$(deps_config)\n\n" - "$(deps_config): ;\n"); + fprintf(out, "\n.config include/linux/autoconf.h: $(deps_config)\n\n$(deps_config):\n"); fclose(out); rename("..config.tmp", name); return 0; diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf index 9b44c80dd..b03220600 100644 --- a/scripts/kconfig/zconf.gperf +++ b/scripts/kconfig/zconf.gperf @@ -39,8 +39,5 @@ string, T_TYPE, TF_COMMAND, S_STRING select, T_SELECT, TF_COMMAND enable, T_SELECT, TF_COMMAND range, T_RANGE, TF_COMMAND -option, T_OPTION, TF_COMMAND on, T_ON, TF_PARAM -modules, T_OPT_MODULES, TF_OPTION -defconfig_list, T_OPT_DEFCONFIG_LIST,TF_OPTION %% diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 47c8b5bab..345f0fc07 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped @@ -53,10 +53,10 @@ kconf_id_hash (register const char *str, register unsigned int len) 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 25, 30, 15, - 0, 15, 0, 47, 5, 15, 47, 47, 30, 20, - 5, 0, 25, 15, 0, 0, 10, 35, 47, 47, - 5, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 25, 10, 15, + 0, 0, 5, 47, 0, 0, 47, 47, 0, 10, + 0, 20, 20, 20, 5, 0, 0, 20, 47, 47, + 20, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, @@ -88,75 +88,69 @@ kconf_id_hash (register const char *str, register unsigned int len) struct kconf_id_strings_t { - char kconf_id_strings_str2[sizeof("on")]; - char kconf_id_strings_str6[sizeof("string")]; - char kconf_id_strings_str7[sizeof("default")]; - char kconf_id_strings_str8[sizeof("def_bool")]; + char kconf_id_strings_str2[sizeof("if")]; + char kconf_id_strings_str3[sizeof("int")]; + char kconf_id_strings_str4[sizeof("help")]; + char kconf_id_strings_str5[sizeof("endif")]; + char kconf_id_strings_str6[sizeof("select")]; + char kconf_id_strings_str7[sizeof("endmenu")]; + char kconf_id_strings_str8[sizeof("tristate")]; + char kconf_id_strings_str9[sizeof("endchoice")]; char kconf_id_strings_str10[sizeof("range")]; - char kconf_id_strings_str11[sizeof("def_boolean")]; - char kconf_id_strings_str12[sizeof("def_tristate")]; - char kconf_id_strings_str13[sizeof("hex")]; - char kconf_id_strings_str14[sizeof("defconfig_list")]; - char kconf_id_strings_str16[sizeof("option")]; - char kconf_id_strings_str17[sizeof("if")]; - char kconf_id_strings_str18[sizeof("optional")]; - char kconf_id_strings_str20[sizeof("endif")]; - char kconf_id_strings_str21[sizeof("choice")]; - char kconf_id_strings_str22[sizeof("endmenu")]; - char kconf_id_strings_str23[sizeof("requires")]; - char kconf_id_strings_str24[sizeof("endchoice")]; - char kconf_id_strings_str26[sizeof("config")]; - char kconf_id_strings_str27[sizeof("modules")]; - char kconf_id_strings_str28[sizeof("int")]; - char kconf_id_strings_str29[sizeof("menu")]; - char kconf_id_strings_str31[sizeof("prompt")]; - char kconf_id_strings_str32[sizeof("depends")]; - char kconf_id_strings_str33[sizeof("tristate")]; + char kconf_id_strings_str11[sizeof("string")]; + char kconf_id_strings_str12[sizeof("default")]; + char kconf_id_strings_str13[sizeof("def_bool")]; + char kconf_id_strings_str14[sizeof("menu")]; + char kconf_id_strings_str16[sizeof("def_boolean")]; + char kconf_id_strings_str17[sizeof("def_tristate")]; + char kconf_id_strings_str18[sizeof("mainmenu")]; + char kconf_id_strings_str20[sizeof("menuconfig")]; + char kconf_id_strings_str21[sizeof("config")]; + char kconf_id_strings_str22[sizeof("on")]; + char kconf_id_strings_str23[sizeof("hex")]; + char kconf_id_strings_str26[sizeof("source")]; + char kconf_id_strings_str27[sizeof("depends")]; + char kconf_id_strings_str28[sizeof("optional")]; + char kconf_id_strings_str31[sizeof("enable")]; + char kconf_id_strings_str32[sizeof("comment")]; + char kconf_id_strings_str33[sizeof("requires")]; char kconf_id_strings_str34[sizeof("bool")]; - char kconf_id_strings_str35[sizeof("menuconfig")]; - char kconf_id_strings_str36[sizeof("select")]; char kconf_id_strings_str37[sizeof("boolean")]; - char kconf_id_strings_str39[sizeof("help")]; - char kconf_id_strings_str41[sizeof("source")]; - char kconf_id_strings_str42[sizeof("comment")]; - char kconf_id_strings_str43[sizeof("mainmenu")]; - char kconf_id_strings_str46[sizeof("enable")]; + char kconf_id_strings_str41[sizeof("choice")]; + char kconf_id_strings_str46[sizeof("prompt")]; }; static struct kconf_id_strings_t kconf_id_strings_contents = { - "on", + "if", + "int", + "help", + "endif", + "select", + "endmenu", + "tristate", + "endchoice", + "range", "string", "default", "def_bool", - "range", + "menu", "def_boolean", "def_tristate", + "mainmenu", + "menuconfig", + "config", + "on", "hex", - "defconfig_list", - "option", - "if", + "source", + "depends", "optional", - "endif", - "choice", - "endmenu", + "enable", + "comment", "requires", - "endchoice", - "config", - "modules", - "int", - "menu", - "prompt", - "depends", - "tristate", "bool", - "menuconfig", - "select", "boolean", - "help", - "source", - "comment", - "mainmenu", - "enable" + "choice", + "prompt" }; #define kconf_id_strings ((const char *) &kconf_id_strings_contents) #ifdef __GNUC__ @@ -167,9 +161,9 @@ kconf_id_lookup (register const char *str, register unsigned int len) { enum { - TOTAL_KEYWORDS = 33, + TOTAL_KEYWORDS = 30, MIN_WORD_LENGTH = 2, - MAX_WORD_LENGTH = 14, + MAX_WORD_LENGTH = 12, MIN_HASH_VALUE = 2, MAX_HASH_VALUE = 46 }; @@ -177,48 +171,43 @@ kconf_id_lookup (register const char *str, register unsigned int len) static struct kconf_id wordlist[] = { {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_TYPE, TF_COMMAND, S_STRING}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, - {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str4, T_HELP, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_SELECT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_TYPE, TF_COMMAND, S_HEX}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_OPTION, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_IF, TF_COMMAND|TF_PARAM}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_TYPE, TF_COMMAND, S_STRING}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_MENU, TF_COMMAND}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_ENDIF, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CHOICE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_REQUIRES, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24, T_ENDCHOICE, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_MAINMENU, TF_COMMAND}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_CONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_INT}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_PROMPT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_DEPENDS, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_TRISTATE}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20, T_MENUCONFIG, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_CONFIG, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ON, TF_PARAM}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_HEX}, + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SOURCE, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_DEPENDS, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_OPTIONAL, TF_COMMAND}, + {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_REQUIRES, TF_COMMAND}, {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_SELECT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_HELP, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_COMMENT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_MAINMENU, TF_COMMAND}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND} + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_CHOICE, TF_COMMAND}, + {-1}, {-1}, {-1}, {-1}, + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_PROMPT, TF_COMMAND} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index 2fb0a4fc6..ea7755da8 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -1,7 +1,7 @@ -/* A Bison parser, made by GNU Bison 2.1. */ +/* A Bison parser, made by GNU Bison 2.0. */ /* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 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 @@ -15,8 +15,8 @@ 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., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -36,9 +36,6 @@ /* Identify Bison output. */ #define YYBISON 1 -/* Bison version. */ -#define YYBISON_VERSION "2.1" - /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -85,21 +82,19 @@ T_DEFAULT = 276, T_SELECT = 277, T_RANGE = 278, - T_OPTION = 279, - T_ON = 280, - T_WORD = 281, - T_WORD_QUOTE = 282, - T_UNEQUAL = 283, - T_CLOSE_PAREN = 284, - T_OPEN_PAREN = 285, - T_EOL = 286, - T_OR = 287, - T_AND = 288, - T_EQUAL = 289, - T_NOT = 290 + T_ON = 279, + T_WORD = 280, + T_WORD_QUOTE = 281, + T_UNEQUAL = 282, + T_CLOSE_PAREN = 283, + T_OPEN_PAREN = 284, + T_EOL = 285, + T_OR = 286, + T_AND = 287, + T_EQUAL = 288, + T_NOT = 289 }; #endif -/* Tokens. */ #define T_MAINMENU 258 #define T_MENU 259 #define T_ENDMENU 260 @@ -121,18 +116,17 @@ #define T_DEFAULT 276 #define T_SELECT 277 #define T_RANGE 278 -#define T_OPTION 279 -#define T_ON 280 -#define T_WORD 281 -#define T_WORD_QUOTE 282 -#define T_UNEQUAL 283 -#define T_CLOSE_PAREN 284 -#define T_OPEN_PAREN 285 -#define T_EOL 286 -#define T_OR 287 -#define T_AND 288 -#define T_EQUAL 289 -#define T_NOT 290 +#define T_ON 279 +#define T_WORD 280 +#define T_WORD_QUOTE 281 +#define T_UNEQUAL 282 +#define T_CLOSE_PAREN 283 +#define T_OPEN_PAREN 284 +#define T_EOL 285 +#define T_OR 286 +#define T_AND 287 +#define T_EQUAL 288 +#define T_NOT 289 @@ -193,11 +187,6 @@ static struct menu *current_menu, *current_entry; # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) typedef union YYSTYPE { @@ -208,7 +197,7 @@ typedef union YYSTYPE { struct menu *menu; struct kconf_id *id; } YYSTYPE; -/* Line 196 of yacc.c. */ +/* Line 190 of yacc.c. */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -220,36 +209,17 @@ typedef union YYSTYPE { /* Copy the second part of user declarations. */ -/* Line 219 of yacc.c. */ +/* Line 213 of yacc.c. */ -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif +#if ! defined (yyoverflow) || YYERROR_VERBOSE -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif +# ifndef YYFREE +# define YYFREE free # endif -# ifndef YY_ -# define YY_(msgid) msgid +# ifndef YYMALLOC +# define YYMALLOC malloc # endif -#endif - -#if ! defined (yyoverflow) || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -259,10 +229,6 @@ typedef union YYSTYPE { # define YYSTACK_ALLOC __builtin_alloca # else # define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H -# endif # endif # endif # endif @@ -270,39 +236,13 @@ typedef union YYSTYPE { # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ -# endif # else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) -# endif -# ifdef __cplusplus -extern "C" { -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifdef __cplusplus -} -# endif # endif #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ @@ -337,7 +277,7 @@ union yyalloc # define YYCOPY(To, From, Count) \ do \ { \ - YYSIZE_T yyi; \ + register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ @@ -372,22 +312,22 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 275 +#define YYLAST 264 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 36 +#define YYNTOKENS 35 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 45 +#define YYNNTS 42 /* YYNRULES -- Number of rules. */ -#define YYNRULES 110 +#define YYNRULES 104 /* YYNRULES -- Number of states. */ -#define YYNSTATES 183 +#define YYNSTATES 175 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 290 +#define YYMAXUTOK 289 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ @@ -421,8 +361,7 @@ static const unsigned char yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35 + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 }; #if YYDEBUG @@ -433,75 +372,72 @@ static const unsigned short int yyprhs[] = 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, - 81, 84, 85, 88, 91, 94, 97, 100, 103, 107, - 112, 117, 122, 128, 132, 133, 137, 138, 141, 144, - 147, 149, 153, 154, 157, 160, 163, 166, 169, 174, - 178, 181, 186, 187, 190, 194, 196, 200, 201, 204, - 207, 210, 214, 217, 219, 223, 224, 227, 230, 233, - 237, 241, 244, 247, 250, 251, 254, 257, 260, 265, - 269, 273, 274, 277, 279, 281, 284, 287, 290, 292, - 295, 296, 299, 301, 305, 309, 313, 316, 320, 324, - 326 + 81, 84, 85, 88, 91, 94, 97, 100, 104, 109, + 114, 119, 125, 128, 131, 133, 137, 138, 141, 144, + 147, 150, 153, 158, 162, 165, 170, 171, 174, 178, + 180, 184, 185, 188, 191, 194, 198, 201, 203, 207, + 208, 211, 214, 217, 221, 225, 228, 231, 234, 235, + 238, 241, 244, 249, 253, 257, 258, 261, 263, 265, + 268, 271, 274, 276, 279, 280, 283, 285, 289, 293, + 297, 300, 304, 308, 310 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yysigned_char yyrhs[] = { - 37, 0, -1, 38, -1, -1, 38, 40, -1, 38, - 54, -1, 38, 65, -1, 38, 3, 75, 77, -1, - 38, 76, -1, 38, 26, 1, 31, -1, 38, 39, - 1, 31, -1, 38, 1, 31, -1, 16, -1, 19, + 36, 0, -1, 37, -1, -1, 37, 39, -1, 37, + 50, -1, 37, 61, -1, 37, 3, 71, 73, -1, + 37, 72, -1, 37, 25, 1, 30, -1, 37, 38, + 1, 30, -1, 37, 1, 30, -1, 16, -1, 19, -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, - -1, 31, -1, 60, -1, 69, -1, 43, -1, 45, - -1, 67, -1, 26, 1, 31, -1, 1, 31, -1, - 10, 26, 31, -1, 42, 46, -1, 11, 26, 31, - -1, 44, 46, -1, -1, 46, 47, -1, 46, 48, - -1, 46, 73, -1, 46, 71, -1, 46, 41, -1, - 46, 31, -1, 20, 74, 31, -1, 19, 75, 78, - 31, -1, 21, 79, 78, 31, -1, 22, 26, 78, - 31, -1, 23, 80, 80, 78, 31, -1, 24, 49, - 31, -1, -1, 49, 26, 50, -1, -1, 34, 75, - -1, 7, 31, -1, 51, 55, -1, 76, -1, 52, - 57, 53, -1, -1, 55, 56, -1, 55, 73, -1, - 55, 71, -1, 55, 31, -1, 55, 41, -1, 19, - 75, 78, 31, -1, 20, 74, 31, -1, 18, 31, - -1, 21, 26, 78, 31, -1, -1, 57, 40, -1, - 14, 79, 77, -1, 76, -1, 58, 61, 59, -1, - -1, 61, 40, -1, 61, 65, -1, 61, 54, -1, - 4, 75, 31, -1, 62, 72, -1, 76, -1, 63, - 66, 64, -1, -1, 66, 40, -1, 66, 65, -1, - 66, 54, -1, 6, 75, 31, -1, 9, 75, 31, - -1, 68, 72, -1, 12, 31, -1, 70, 13, -1, - -1, 72, 73, -1, 72, 31, -1, 72, 41, -1, - 16, 25, 79, 31, -1, 16, 79, 31, -1, 17, - 79, 31, -1, -1, 75, 78, -1, 26, -1, 27, - -1, 5, 31, -1, 8, 31, -1, 15, 31, -1, - 31, -1, 77, 31, -1, -1, 14, 79, -1, 80, - -1, 80, 34, 80, -1, 80, 28, 80, -1, 30, - 79, 29, -1, 35, 79, -1, 79, 32, 79, -1, - 79, 33, 79, -1, 26, -1, 27, -1 + -1, 30, -1, 56, -1, 65, -1, 42, -1, 44, + -1, 63, -1, 25, 1, 30, -1, 1, 30, -1, + 10, 25, 30, -1, 41, 45, -1, 11, 25, 30, + -1, 43, 45, -1, -1, 45, 46, -1, 45, 69, + -1, 45, 67, -1, 45, 40, -1, 45, 30, -1, + 20, 70, 30, -1, 19, 71, 74, 30, -1, 21, + 75, 74, 30, -1, 22, 25, 74, 30, -1, 23, + 76, 76, 74, 30, -1, 7, 30, -1, 47, 51, + -1, 72, -1, 48, 53, 49, -1, -1, 51, 52, + -1, 51, 69, -1, 51, 67, -1, 51, 30, -1, + 51, 40, -1, 19, 71, 74, 30, -1, 20, 70, + 30, -1, 18, 30, -1, 21, 25, 74, 30, -1, + -1, 53, 39, -1, 14, 75, 73, -1, 72, -1, + 54, 57, 55, -1, -1, 57, 39, -1, 57, 61, + -1, 57, 50, -1, 4, 71, 30, -1, 58, 68, + -1, 72, -1, 59, 62, 60, -1, -1, 62, 39, + -1, 62, 61, -1, 62, 50, -1, 6, 71, 30, + -1, 9, 71, 30, -1, 64, 68, -1, 12, 30, + -1, 66, 13, -1, -1, 68, 69, -1, 68, 30, + -1, 68, 40, -1, 16, 24, 75, 30, -1, 16, + 75, 30, -1, 17, 75, 30, -1, -1, 71, 74, + -1, 25, -1, 26, -1, 5, 30, -1, 8, 30, + -1, 15, 30, -1, 30, -1, 73, 30, -1, -1, + 14, 75, -1, 76, -1, 76, 33, 76, -1, 76, + 27, 76, -1, 29, 75, 28, -1, 34, 75, -1, + 75, 31, 75, -1, 75, 32, 75, -1, 25, -1, + 26, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 105, 105, 107, 109, 110, 111, 112, 113, 114, - 115, 119, 123, 123, 123, 123, 123, 123, 123, 127, - 128, 129, 130, 131, 132, 136, 137, 143, 151, 157, - 165, 175, 177, 178, 179, 180, 181, 182, 185, 193, - 199, 209, 215, 221, 224, 226, 237, 238, 243, 252, - 257, 265, 268, 270, 271, 272, 273, 274, 277, 283, - 294, 300, 310, 312, 317, 325, 333, 336, 338, 339, - 340, 345, 352, 357, 365, 368, 370, 371, 372, 375, - 383, 390, 397, 403, 410, 412, 413, 414, 417, 422, - 427, 435, 437, 442, 443, 446, 447, 448, 452, 453, - 456, 457, 460, 461, 462, 463, 464, 465, 466, 469, - 470 + 0, 103, 103, 105, 107, 108, 109, 110, 111, 112, + 113, 117, 121, 121, 121, 121, 121, 121, 121, 125, + 126, 127, 128, 129, 130, 134, 135, 141, 149, 155, + 163, 173, 175, 176, 177, 178, 179, 182, 190, 196, + 206, 212, 220, 229, 234, 242, 245, 247, 248, 249, + 250, 251, 254, 260, 271, 277, 287, 289, 294, 302, + 310, 313, 315, 316, 317, 322, 329, 334, 342, 345, + 347, 348, 349, 352, 360, 367, 374, 380, 387, 389, + 390, 391, 394, 399, 404, 412, 414, 419, 420, 423, + 424, 425, 429, 430, 433, 434, 437, 438, 439, 440, + 441, 442, 443, 446, 447 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { @@ -509,18 +445,17 @@ static const char *const yytname[] = "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", - "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", - "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", - "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name", - "common_stmt", "option_error", "config_entry_start", "config_stmt", + "T_SELECT", "T_RANGE", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", + "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", + "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt", + "option_error", "config_entry_start", "config_stmt", "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", - "config_option", "symbol_option", "symbol_option_list", - "symbol_option_arg", "choice", "choice_entry", "choice_end", - "choice_stmt", "choice_option_list", "choice_option", "choice_block", - "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry", - "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment", - "comment_stmt", "help_start", "help", "depends_list", "depends", - "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 + "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", + "choice_option_list", "choice_option", "choice_block", "if_entry", + "if_end", "if_stmt", "if_block", "menu", "menu_entry", "menu_end", + "menu_stmt", "menu_block", "source_stmt", "comment", "comment_stmt", + "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", + "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 }; #endif @@ -532,25 +467,24 @@ static const unsigned short int yytoknum[] = 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290 + 285, 286, 287, 288, 289 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 36, 37, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 39, 39, 39, 39, 39, 39, 39, 40, - 40, 40, 40, 40, 40, 41, 41, 42, 43, 44, - 45, 46, 46, 46, 46, 46, 46, 46, 47, 47, - 47, 47, 47, 48, 49, 49, 50, 50, 51, 52, - 53, 54, 55, 55, 55, 55, 55, 55, 56, 56, - 56, 56, 57, 57, 58, 59, 60, 61, 61, 61, - 61, 62, 63, 64, 65, 66, 66, 66, 66, 67, - 68, 69, 70, 71, 72, 72, 72, 72, 73, 73, - 73, 74, 74, 75, 75, 76, 76, 76, 77, 77, - 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, - 80 + 0, 35, 36, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, + 39, 39, 39, 39, 39, 40, 40, 41, 42, 43, + 44, 45, 45, 45, 45, 45, 45, 46, 46, 46, + 46, 46, 47, 48, 49, 50, 51, 51, 51, 51, + 51, 51, 52, 52, 52, 52, 53, 53, 54, 55, + 56, 57, 57, 57, 57, 58, 59, 60, 61, 62, + 62, 62, 62, 63, 64, 65, 66, 67, 68, 68, + 68, 68, 69, 69, 69, 70, 70, 71, 71, 72, + 72, 72, 73, 73, 74, 74, 75, 75, 75, 75, + 75, 75, 75, 76, 76 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -559,15 +493,14 @@ static const unsigned char yyr2[] = 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, - 2, 0, 2, 2, 2, 2, 2, 2, 3, 4, - 4, 4, 5, 3, 0, 3, 0, 2, 2, 2, - 1, 3, 0, 2, 2, 2, 2, 2, 4, 3, - 2, 4, 0, 2, 3, 1, 3, 0, 2, 2, - 2, 3, 2, 1, 3, 0, 2, 2, 2, 3, - 3, 2, 2, 2, 0, 2, 2, 2, 4, 3, - 3, 0, 2, 1, 1, 2, 2, 2, 1, 2, - 0, 2, 1, 3, 3, 3, 2, 3, 3, 1, - 1 + 2, 0, 2, 2, 2, 2, 2, 3, 4, 4, + 4, 5, 2, 2, 1, 3, 0, 2, 2, 2, + 2, 2, 4, 3, 2, 4, 0, 2, 3, 1, + 3, 0, 2, 2, 2, 3, 2, 1, 3, 0, + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, + 2, 2, 4, 3, 3, 0, 2, 1, 1, 2, + 2, 2, 1, 2, 0, 2, 1, 3, 3, 3, + 2, 3, 3, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -578,164 +511,175 @@ static const unsigned char yydefact[] = 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, - 23, 52, 62, 5, 67, 20, 84, 75, 6, 24, - 84, 21, 8, 11, 93, 94, 0, 0, 95, 0, - 48, 96, 0, 0, 0, 109, 110, 0, 0, 0, - 102, 97, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 98, 7, 71, 79, 80, 27, 29, 0, - 106, 0, 0, 64, 0, 0, 9, 10, 0, 0, - 0, 0, 0, 91, 0, 0, 0, 44, 0, 37, - 36, 32, 33, 0, 35, 34, 0, 0, 91, 0, - 56, 57, 53, 55, 54, 63, 51, 50, 68, 70, - 66, 69, 65, 86, 87, 85, 76, 78, 74, 77, - 73, 99, 105, 107, 108, 104, 103, 26, 82, 0, - 0, 0, 100, 0, 100, 100, 100, 0, 0, 0, - 83, 60, 100, 0, 100, 0, 89, 90, 0, 0, - 38, 92, 0, 0, 100, 46, 43, 25, 0, 59, - 0, 88, 101, 39, 40, 41, 0, 0, 45, 58, - 61, 42, 47 + 23, 46, 56, 5, 61, 20, 78, 69, 6, 24, + 78, 21, 8, 11, 87, 88, 0, 0, 89, 0, + 42, 90, 0, 0, 0, 103, 104, 0, 0, 0, + 96, 91, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 92, 7, 65, 73, 74, 27, 29, 0, + 100, 0, 0, 58, 0, 0, 9, 10, 0, 0, + 0, 0, 0, 85, 0, 0, 0, 0, 36, 35, + 32, 0, 34, 33, 0, 0, 85, 0, 50, 51, + 47, 49, 48, 57, 45, 44, 62, 64, 60, 63, + 59, 80, 81, 79, 70, 72, 68, 71, 67, 93, + 99, 101, 102, 98, 97, 26, 76, 0, 0, 0, + 94, 0, 94, 94, 94, 0, 0, 77, 54, 94, + 0, 94, 0, 83, 84, 0, 0, 37, 86, 0, + 0, 94, 25, 0, 53, 0, 82, 95, 38, 39, + 40, 0, 52, 55, 41 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 1, 2, 25, 26, 100, 27, 28, 29, 30, - 64, 101, 102, 148, 178, 31, 32, 116, 33, 66, - 112, 67, 34, 120, 35, 68, 36, 37, 128, 38, - 70, 39, 40, 41, 103, 104, 69, 105, 143, 144, - 42, 73, 159, 59, 60 + -1, 1, 2, 25, 26, 99, 27, 28, 29, 30, + 64, 100, 31, 32, 114, 33, 66, 110, 67, 34, + 118, 35, 68, 36, 37, 126, 38, 70, 39, 40, + 41, 101, 102, 69, 103, 141, 142, 42, 73, 156, + 59, 60 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -135 +#define YYPACT_NINF -78 static const short int yypact[] = { - -135, 2, 170, -135, -14, 56, 56, -8, 56, 24, - 67, 56, 7, 14, 62, 97, -135, -135, -135, -135, - -135, -135, -135, 156, -135, 166, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, 138, 151, -135, 152, - -135, -135, 163, 167, 176, -135, -135, 62, 62, 185, - -19, -135, 188, 190, 42, 103, 194, 85, 70, 222, - 70, 132, -135, 191, -135, -135, -135, -135, -135, 127, - -135, 62, 62, 191, 104, 104, -135, -135, 193, 203, - 9, 62, 56, 56, 62, 161, 104, -135, 196, -135, - -135, -135, -135, 233, -135, -135, 204, 56, 56, 221, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, 219, -135, -135, -135, -135, -135, 62, - 209, 212, 240, 224, 240, -1, 240, 104, 41, 225, - -135, -135, 240, 226, 240, 218, -135, -135, 62, 227, - -135, -135, 228, 229, 240, 230, -135, -135, 231, -135, - 232, -135, 112, -135, -135, -135, 234, 56, -135, -135, - -135, -135, -135 + -78, 2, 159, -78, -21, 0, 0, -12, 0, 1, + 4, 0, 27, 38, 60, 58, -78, -78, -78, -78, + -78, -78, -78, 100, -78, 104, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, 86, 113, -78, 114, + -78, -78, 125, 127, 128, -78, -78, 60, 60, 210, + 65, -78, 141, 142, 39, 103, 182, 200, 6, 66, + 6, 131, -78, 146, -78, -78, -78, -78, -78, 196, + -78, 60, 60, 146, 40, 40, -78, -78, 155, 156, + -2, 60, 0, 0, 60, 105, 40, 194, -78, -78, + -78, 206, -78, -78, 183, 0, 0, 195, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, + -78, 197, -78, -78, -78, -78, -78, 60, 213, 216, + 212, 203, 212, 190, 212, 40, 208, -78, -78, 212, + 222, 212, 219, -78, -78, 60, 223, -78, -78, 224, + 225, 212, -78, 226, -78, 227, -78, 47, -78, -78, + -78, 228, -78, -78, -78 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -135, -135, -135, -135, 94, -45, -135, -135, -135, -135, - 237, -135, -135, -135, -135, -135, -135, -135, -54, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, 1, - -135, -135, -135, -135, -135, 195, 235, -44, 159, -5, - 98, 210, -134, -53, -77 + -78, -78, -78, -78, 164, -36, -78, -78, -78, -78, + 230, -78, -78, -78, -78, 29, -78, -78, -78, -78, + -78, -78, -78, -78, -78, -78, 59, -78, -78, -78, + -78, -78, 198, 220, 24, 157, -5, 169, 202, 74, + -53, -77 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -82 +#define YYTABLE_NINF -76 static const short int yytable[] = { - 46, 47, 3, 49, 79, 80, 52, 135, 136, 84, - 161, 162, 163, 158, 119, 85, 127, 43, 168, 147, - 170, 111, 114, 48, 124, 125, 124, 125, 133, 134, - 176, 81, 82, 53, 139, 55, 56, 140, 141, 57, - 54, 145, -28, 88, 58, -28, -28, -28, -28, -28, - -28, -28, -28, -28, 89, 50, -28, -28, 90, 91, - -28, 92, 93, 94, 95, 96, 97, 165, 98, 121, - 164, 129, 166, 99, 6, 7, 8, 9, 10, 11, - 12, 13, 44, 45, 14, 15, 155, 142, 55, 56, - 7, 8, 57, 10, 11, 12, 13, 58, 51, 14, - 15, 24, 152, -30, 88, 172, -30, -30, -30, -30, - -30, -30, -30, -30, -30, 89, 24, -30, -30, 90, - 91, -30, 92, 93, 94, 95, 96, 97, 61, 98, - 55, 56, -81, 88, 99, -81, -81, -81, -81, -81, - -81, -81, -81, -81, 81, 82, -81, -81, 90, 91, - -81, -81, -81, -81, -81, -81, 132, 62, 98, 81, - 82, 115, 118, 123, 126, 117, 122, 63, 130, 72, - -2, 4, 182, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 74, 75, 14, 15, 16, 146, 17, 18, - 19, 20, 21, 22, 76, 88, 23, 149, 77, -49, - -49, 24, -49, -49, -49, -49, 89, 78, -49, -49, - 90, 91, 106, 107, 108, 109, 72, 81, 82, 86, - 98, 87, 131, 88, 137, 110, -72, -72, -72, -72, - -72, -72, -72, -72, 138, 151, -72, -72, 90, 91, - 156, 81, 82, 157, 81, 82, 150, 154, 98, 171, - 81, 82, 82, 123, 158, 160, 167, 169, 173, 174, - 175, 113, 179, 180, 177, 181, 65, 153, 0, 83, - 0, 0, 0, 0, 0, 71 + 46, 47, 3, 49, 79, 80, 52, 133, 134, 43, + 6, 7, 8, 9, 10, 11, 12, 13, 48, 145, + 14, 15, 137, 55, 56, 44, 45, 57, 131, 132, + 109, 50, 58, 122, 51, 122, 24, 138, 139, -28, + 88, 143, -28, -28, -28, -28, -28, -28, -28, -28, + -28, 89, 53, -28, -28, 90, 91, -28, 92, 93, + 94, 95, 96, 54, 97, 55, 56, 88, 161, 98, + -66, -66, -66, -66, -66, -66, -66, -66, 81, 82, + -66, -66, 90, 91, 152, 55, 56, 140, 61, 57, + 112, 97, 84, 123, 58, 123, 121, 117, 85, 125, + 149, 62, 167, -30, 88, 63, -30, -30, -30, -30, + -30, -30, -30, -30, -30, 89, 72, -30, -30, 90, + 91, -30, 92, 93, 94, 95, 96, 119, 97, 127, + 144, -75, 88, 98, -75, -75, -75, -75, -75, -75, + -75, -75, -75, 74, 75, -75, -75, 90, 91, -75, + -75, -75, -75, -75, -75, 76, 97, 77, 78, -2, + 4, 121, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 86, 87, 14, 15, 16, 129, 17, 18, 19, + 20, 21, 22, 88, 23, 135, 136, -43, -43, 24, + -43, -43, -43, -43, 89, 146, -43, -43, 90, 91, + 104, 105, 106, 107, 155, 7, 8, 97, 10, 11, + 12, 13, 108, 148, 14, 15, 158, 159, 160, 147, + 151, 81, 82, 163, 130, 165, 155, 81, 82, 82, + 24, 113, 116, 157, 124, 171, 115, 120, 162, 128, + 72, 81, 82, 153, 81, 82, 154, 81, 82, 166, + 81, 82, 164, 168, 169, 170, 172, 173, 174, 65, + 71, 83, 0, 150, 111 }; static const short int yycheck[] = { - 5, 6, 0, 8, 57, 58, 11, 84, 85, 28, - 144, 145, 146, 14, 68, 34, 70, 31, 152, 96, - 154, 66, 66, 31, 69, 69, 71, 71, 81, 82, - 164, 32, 33, 26, 25, 26, 27, 90, 91, 30, - 26, 94, 0, 1, 35, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 31, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 26, 26, 68, - 147, 70, 31, 31, 4, 5, 6, 7, 8, 9, - 10, 11, 26, 27, 14, 15, 139, 92, 26, 27, - 5, 6, 30, 8, 9, 10, 11, 35, 31, 14, - 15, 31, 107, 0, 1, 158, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 31, 26, - 26, 27, 0, 1, 31, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 32, 33, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 29, 1, 26, 32, - 33, 67, 68, 31, 70, 67, 68, 1, 70, 31, - 0, 1, 177, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 31, 31, 14, 15, 16, 26, 18, 19, - 20, 21, 22, 23, 31, 1, 26, 1, 31, 5, - 6, 31, 8, 9, 10, 11, 12, 31, 14, 15, - 16, 17, 18, 19, 20, 21, 31, 32, 33, 31, - 26, 31, 31, 1, 31, 31, 4, 5, 6, 7, - 8, 9, 10, 11, 31, 31, 14, 15, 16, 17, - 31, 32, 33, 31, 32, 33, 13, 26, 26, 31, - 32, 33, 33, 31, 14, 31, 31, 31, 31, 31, - 31, 66, 31, 31, 34, 31, 29, 108, -1, 59, - -1, -1, -1, -1, -1, 40 + 5, 6, 0, 8, 57, 58, 11, 84, 85, 30, + 4, 5, 6, 7, 8, 9, 10, 11, 30, 96, + 14, 15, 24, 25, 26, 25, 26, 29, 81, 82, + 66, 30, 34, 69, 30, 71, 30, 90, 91, 0, + 1, 94, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 25, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 25, 25, 25, 26, 1, 145, 30, + 4, 5, 6, 7, 8, 9, 10, 11, 31, 32, + 14, 15, 16, 17, 137, 25, 26, 92, 30, 29, + 66, 25, 27, 69, 34, 71, 30, 68, 33, 70, + 105, 1, 155, 0, 1, 1, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 30, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 68, 25, 70, + 25, 0, 1, 30, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 30, 30, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 30, 25, 30, 30, 0, + 1, 30, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 30, 30, 14, 15, 16, 30, 18, 19, 20, + 21, 22, 23, 1, 25, 30, 30, 5, 6, 30, + 8, 9, 10, 11, 12, 1, 14, 15, 16, 17, + 18, 19, 20, 21, 14, 5, 6, 25, 8, 9, + 10, 11, 30, 30, 14, 15, 142, 143, 144, 13, + 25, 31, 32, 149, 28, 151, 14, 31, 32, 32, + 30, 67, 68, 30, 70, 161, 67, 68, 30, 70, + 30, 31, 32, 30, 31, 32, 30, 31, 32, 30, + 31, 32, 30, 30, 30, 30, 30, 30, 30, 29, + 40, 59, -1, 106, 66 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 37, 38, 0, 1, 3, 4, 5, 6, 7, + 0, 36, 37, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, - 21, 22, 23, 26, 31, 39, 40, 42, 43, 44, - 45, 51, 52, 54, 58, 60, 62, 63, 65, 67, - 68, 69, 76, 31, 26, 27, 75, 75, 31, 75, - 31, 31, 75, 26, 26, 26, 27, 30, 35, 79, - 80, 31, 1, 1, 46, 46, 55, 57, 61, 72, - 66, 72, 31, 77, 31, 31, 31, 31, 31, 79, - 79, 32, 33, 77, 28, 34, 31, 31, 1, 12, - 16, 17, 19, 20, 21, 22, 23, 24, 26, 31, - 41, 47, 48, 70, 71, 73, 18, 19, 20, 21, - 31, 41, 56, 71, 73, 40, 53, 76, 40, 54, - 59, 65, 76, 31, 41, 73, 40, 54, 64, 65, - 76, 31, 29, 79, 79, 80, 80, 31, 31, 25, - 79, 79, 75, 74, 75, 79, 26, 80, 49, 1, - 13, 31, 75, 74, 26, 79, 31, 31, 14, 78, - 31, 78, 78, 78, 80, 26, 31, 31, 78, 31, - 78, 31, 79, 31, 31, 31, 78, 34, 50, 31, - 31, 31, 75 + 21, 22, 23, 25, 30, 38, 39, 41, 42, 43, + 44, 47, 48, 50, 54, 56, 58, 59, 61, 63, + 64, 65, 72, 30, 25, 26, 71, 71, 30, 71, + 30, 30, 71, 25, 25, 25, 26, 29, 34, 75, + 76, 30, 1, 1, 45, 45, 51, 53, 57, 68, + 62, 68, 30, 73, 30, 30, 30, 30, 30, 75, + 75, 31, 32, 73, 27, 33, 30, 30, 1, 12, + 16, 17, 19, 20, 21, 22, 23, 25, 30, 40, + 46, 66, 67, 69, 18, 19, 20, 21, 30, 40, + 52, 67, 69, 39, 49, 72, 39, 50, 55, 61, + 72, 30, 40, 69, 39, 50, 60, 61, 72, 30, + 28, 75, 75, 76, 76, 30, 30, 24, 75, 75, + 71, 70, 71, 75, 25, 76, 1, 13, 30, 71, + 70, 25, 75, 30, 30, 14, 74, 30, 74, 74, + 74, 76, 30, 74, 30, 74, 30, 75, 30, 30, + 30, 74, 30, 30, 30 }; +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -765,8 +709,8 @@ do \ goto yybackup; \ } \ else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ + { \ + yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) @@ -845,7 +789,7 @@ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ + yysymprint (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ @@ -893,13 +837,13 @@ yy_reduce_print (yyrule) #endif { int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ @@ -928,7 +872,7 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH @@ -952,7 +896,7 @@ yystrlen (yystr) const char *yystr; # endif { - const char *yys = yystr; + register const char *yys = yystr; while (*yys++ != '\0') continue; @@ -977,8 +921,8 @@ yystpcpy (yydest, yysrc) const char *yysrc; # endif { - char *yyd = yydest; - const char *yys = yysrc; + register char *yyd = yydest; + register const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -988,55 +932,7 @@ yystpcpy (yydest, yysrc) # endif # endif -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - size_t yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* YYERROR_VERBOSE */ +#endif /* !YYERROR_VERBOSE */ @@ -1102,7 +998,7 @@ yydestruct (yymsg, yytype, yyvaluep) switch (yytype) { - case 52: /* "choice_entry" */ + case 48: /* choice_entry */ { fprintf(stderr, "%s:%d: missing end statement for this entry\n", @@ -1112,7 +1008,7 @@ yydestruct (yymsg, yytype, yyvaluep) }; break; - case 58: /* "if_entry" */ + case 54: /* if_entry */ { fprintf(stderr, "%s:%d: missing end statement for this entry\n", @@ -1122,7 +1018,7 @@ yydestruct (yymsg, yytype, yyvaluep) }; break; - case 63: /* "menu_entry" */ + case 59: /* menu_entry */ { fprintf(stderr, "%s:%d: missing end statement for this entry\n", @@ -1186,13 +1082,13 @@ yyparse (void) #else int yyparse () - ; + #endif #endif { - int yystate; - int yyn; + register int yystate; + register int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; @@ -1210,12 +1106,12 @@ yyparse () /* The state stack. */ short int yyssa[YYINITDEPTH]; short int *yyss = yyssa; - short int *yyssp; + register short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + register YYSTYPE *yyvsp; @@ -1247,6 +1143,9 @@ yyparse () yyssp = yyss; yyvsp = yyvs; + + yyvsp[0] = yylval; + goto yysetstate; /*------------------------------------------------------------. @@ -1279,7 +1178,7 @@ yyparse () data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), + yyoverflow ("parser stack overflow", &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1290,11 +1189,11 @@ yyparse () } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; + goto yyoverflowlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyoverflowlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -1304,7 +1203,7 @@ yyparse () union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyexhaustedlab; + goto yyoverflowlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1504,7 +1403,7 @@ yyreduce: ;} break; - case 38: + case 37: { menu_set_type((yyvsp[-2].id)->stype); @@ -1514,7 +1413,7 @@ yyreduce: ;} break; - case 39: + case 38: { menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); @@ -1522,7 +1421,7 @@ yyreduce: ;} break; - case 40: + case 39: { menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); @@ -1534,7 +1433,7 @@ yyreduce: ;} break; - case 41: + case 40: { menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); @@ -1542,7 +1441,7 @@ yyreduce: ;} break; - case 42: + case 41: { menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); @@ -1550,29 +1449,7 @@ yyreduce: ;} break; - case 45: - - { - struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string))); - if (id && id->flags & TF_OPTION) - menu_add_option(id->token, (yyvsp[0].string)); - else - zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string)); - free((yyvsp[-1].string)); -;} - break; - - case 46: - - { (yyval.string) = NULL; ;} - break; - - case 47: - - { (yyval.string) = (yyvsp[0].string); ;} - break; - - case 48: + case 42: { struct symbol *sym = sym_lookup(NULL, 0); @@ -1583,14 +1460,14 @@ yyreduce: ;} break; - case 49: + case 43: { (yyval.menu) = menu_add_menu(); ;} break; - case 50: + case 44: { if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { @@ -1600,7 +1477,7 @@ yyreduce: ;} break; - case 58: + case 52: { menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); @@ -1608,7 +1485,7 @@ yyreduce: ;} break; - case 59: + case 53: { if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { @@ -1621,7 +1498,7 @@ yyreduce: ;} break; - case 60: + case 54: { current_entry->sym->flags |= SYMBOL_OPTIONAL; @@ -1629,7 +1506,7 @@ yyreduce: ;} break; - case 61: + case 55: { if ((yyvsp[-3].id)->stype == S_UNKNOWN) { @@ -1641,7 +1518,7 @@ yyreduce: ;} break; - case 64: + case 58: { printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); @@ -1651,7 +1528,7 @@ yyreduce: ;} break; - case 65: + case 59: { if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { @@ -1661,7 +1538,7 @@ yyreduce: ;} break; - case 71: + case 65: { menu_add_entry(NULL); @@ -1670,14 +1547,14 @@ yyreduce: ;} break; - case 72: + case 66: { (yyval.menu) = menu_add_menu(); ;} break; - case 73: + case 67: { if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { @@ -1687,7 +1564,7 @@ yyreduce: ;} break; - case 79: + case 73: { printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); @@ -1695,7 +1572,7 @@ yyreduce: ;} break; - case 80: + case 74: { menu_add_entry(NULL); @@ -1704,14 +1581,14 @@ yyreduce: ;} break; - case 81: + case 75: { menu_end_entry(); ;} break; - case 82: + case 76: { printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); @@ -1719,14 +1596,14 @@ yyreduce: ;} break; - case 83: + case 77: { current_entry->sym->help = (yyvsp[0].string); ;} break; - case 88: + case 82: { menu_add_dep((yyvsp[-1].expr)); @@ -1734,7 +1611,7 @@ yyreduce: ;} break; - case 89: + case 83: { menu_add_dep((yyvsp[-1].expr)); @@ -1742,7 +1619,7 @@ yyreduce: ;} break; - case 90: + case 84: { menu_add_dep((yyvsp[-1].expr)); @@ -1750,88 +1627,87 @@ yyreduce: ;} break; - case 92: + case 86: { menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); ;} break; - case 95: + case 89: { (yyval.id) = (yyvsp[-1].id); ;} break; - case 96: + case 90: { (yyval.id) = (yyvsp[-1].id); ;} break; - case 97: + case 91: { (yyval.id) = (yyvsp[-1].id); ;} break; - case 100: + case 94: { (yyval.expr) = NULL; ;} break; - case 101: + case 95: { (yyval.expr) = (yyvsp[0].expr); ;} break; - case 102: + case 96: { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} break; - case 103: + case 97: { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} break; - case 104: + case 98: { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} break; - case 105: + case 99: { (yyval.expr) = (yyvsp[-1].expr); ;} break; - case 106: + case 100: { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} break; - case 107: + case 101: { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; - case 108: + case 102: { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} break; - case 109: + case 103: { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;} break; - case 110: + case 104: { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;} break; - default: break; } -/* Line 1126 of yacc.c. */ +/* Line 1037 of yacc.c. */ yyvsp -= yylen; @@ -1871,36 +1747,12 @@ yyerrlab: if (YYPACT_NINF < yyn && yyn < YYLAST) { + YYSIZE_T yysize = 0; int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - char *yymsg = 0; -# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + const char* yyprefix; + char *yymsg; int yyx; -#if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -#endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; @@ -1908,68 +1760,48 @@ yyerrlab: /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); + int yycount = 0; + yyprefix = ", expecting "; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; + yysize = 0; break; } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg) + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yymsg; - int yyi = 0; - while ((*yyp = *yyf)) + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else - { - yyerror (YY_("syntax error")); - goto yyexhaustedlab; - } + yyerror ("syntax error; also virtual memory exhausted"); } else #endif /* YYERROR_VERBOSE */ - yyerror (YY_("syntax error")); + yyerror ("syntax error"); } @@ -1981,9 +1813,18 @@ yyerrlab: if (yychar <= YYEOF) { - /* Return failure if at end of input. */ + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ if (yychar == YYEOF) - YYABORT; + for (;;) + { + + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + yydestruct ("Error: popping", + yystos[*yyssp], yyvsp); + } } else { @@ -2002,11 +1843,12 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ +#ifdef __GNUC__ + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ if (0) goto yyerrorlab; +#endif yyvsp -= yylen; yyssp -= yylen; @@ -2069,29 +1911,23 @@ yyacceptlab: | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: + yydestruct ("Error: discarding lookahead", + yytoken, &yylval); + yychar = YYEMPTY; yyresult = 1; goto yyreturn; #ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); yyresult = 2; /* Fall through. */ #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK; - } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); @@ -2112,9 +1948,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; + modules_sym = sym_lookup("MODULES", 0); rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); #if YYDEBUG @@ -2124,12 +1958,6 @@ void conf_parse(const char *name) zconfparse(); if (zconfnerrs) exit(1); - if (!modules_sym->prop) { - struct property *prop; - - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); - } menu_finalize(&rootmenu); for_all_symbols(i, sym) { sym_check_deps(sym); diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index ab44feb3c..1f61fba6a 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -71,7 +71,6 @@ static struct menu *current_menu, *current_entry; %token T_DEFAULT %token T_SELECT %token T_RANGE -%token T_OPTION %token T_ON %token T_WORD %token T_WORD_QUOTE @@ -92,7 +91,6 @@ static struct menu *current_menu, *current_entry; %type end %type option_name %type if_entry menu_entry choice_entry -%type symbol_option_arg %destructor { fprintf(stderr, "%s:%d: missing end statement for this entry\n", @@ -175,7 +173,6 @@ menuconfig_stmt: menuconfig_entry_start config_option_list config_option_list: /* empty */ | config_option_list config_option - | config_option_list symbol_option | config_option_list depends | config_option_list help | config_option_list option_error @@ -218,26 +215,6 @@ config_option: T_RANGE symbol symbol if_expr T_EOL printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); }; -symbol_option: T_OPTION symbol_option_list T_EOL -; - -symbol_option_list: - /* empty */ - | symbol_option_list T_WORD symbol_option_arg -{ - struct kconf_id *id = kconf_id_lookup($2, strlen($2)); - if (id && id->flags & TF_OPTION) - menu_add_option(id->token, $3); - else - zconfprint("warning: ignoring unknown option %s", $2); - free($2); -}; - -symbol_option_arg: - /* empty */ { $$ = NULL; } - | T_EQUAL prompt { $$ = $2; } -; - /* choice entry */ choice: T_CHOICE T_EOL @@ -481,9 +458,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; + modules_sym = sym_lookup("MODULES", 0); rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); #if YYDEBUG @@ -493,12 +468,6 @@ void conf_parse(const char *name) zconfparse(); if (zconfnerrs) exit(1); - if (!modules_sym->prop) { - struct property *prop; - - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); - } menu_finalize(&rootmenu); for_all_symbols(i, sym) { sym_check_deps(sym); diff --git a/scripts/kernel-2.6-planetlab.spec b/scripts/kernel-2.6-planetlab.spec index 64d424f70..5a57955fa 100644 --- a/scripts/kernel-2.6-planetlab.spec +++ b/scripts/kernel-2.6-planetlab.spec @@ -5,9 +5,9 @@ Summary: The Linux kernel (the core of the Linux operating system) %define buildup 1 %define buildsmp 1 -%define builduml 1 -%define buildxen 1 -%define builddoc 1 +%define builduml 0 +%define buildxen 0 +%define builddoc 0 # Versions of various parts @@ -17,10 +17,10 @@ Summary: The Linux kernel (the core of the Linux operating system) # that the kernel isn't the stock distribution kernel, for example by # adding some text to the end of the version number. # -%define sublevel 18 +%define sublevel 17 %define kversion 2.6.%{sublevel} %define rpmversion 2.6.%{sublevel} -%define release 1.2260_FC5.0%{?pldistro:.%{pldistro}}%{?date:.%{date}} +%define release 1.2187_FC5.0%{?pldistro:.%{pldistro}}%{?date:.%{date}} %define signmodules 0 %define make_target bzImage diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c9ca0c23b..99fe4b7fb 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -253,7 +253,6 @@ my $lineprefix=""; # 3 - scanning prototype. # 4 - documentation block my $state; -my $in_doc_sect; #declaration types: can be # 'function', 'struct', 'union', 'enum', 'typedef' @@ -1056,8 +1055,7 @@ sub output_struct_man(%) { # pointer-to-function print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; } elsif ($type =~ m/^(.*?)\s*(:.*)/) { - # bitfield - print ".BI \" ".$1."\ \" ".$parameter.$2." \""."\"\n;\n"; + print ".BI \" ".$1."\" ".$parameter.$2." \""."\"\n;\n"; } else { $type =~ s/([^\*])$/$1 /; print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; @@ -1066,7 +1064,7 @@ sub output_struct_man(%) { } print "};\n.br\n"; - print ".SH Members\n"; + print ".SH Arguments\n"; foreach $parameter (@{$args{'parameterlist'}}) { ($parameter =~ /^#/) && next; @@ -1119,10 +1117,7 @@ sub output_function_text(%) { my %args = %{$_[0]}; my ($parameter, $section); - print "Name:\n\n"; - print $args{'function'}." - ".$args{'purpose'}."\n"; - - print "\nSynopsis:\n\n"; + print "Function:\n\n"; my $start=$args{'functiontype'}." ".$args{'function'}." ("; print $start; my $count = 0; @@ -1173,7 +1168,6 @@ sub output_enum_text(%) { my $count; print "Enum:\n\n"; - print "enum ".$args{'enum'}." - ".$args{'purpose'}."\n\n"; print "enum ".$args{'enum'}." {\n"; $count = 0; foreach $parameter (@{$args{'parameterlist'}}) { @@ -1202,7 +1196,7 @@ sub output_typedef_text(%) { my $count; print "Typedef:\n\n"; - print "typedef ".$args{'typedef'}." - ".$args{'purpose'}."\n"; + print "typedef ".$args{'typedef'}."\n"; output_section_text(@_); } @@ -1211,7 +1205,7 @@ sub output_struct_text(%) { my %args = %{$_[0]}; my ($parameter); - print $args{'type'}." ".$args{'struct'}." - ".$args{'purpose'}."\n\n"; + print $args{'type'}." ".$args{'struct'}.":\n\n"; print $args{'type'}." ".$args{'struct'}." {\n"; foreach $parameter (@{$args{'parameterlist'}}) { if ($parameter =~ /^#/) { @@ -1518,7 +1512,6 @@ sub dump_function($$) { $prototype =~ s/^asmlinkage +//; $prototype =~ s/^inline +//; $prototype =~ s/^__inline__ +//; - $prototype =~ s/__devinit +//; $prototype =~ s/^#define +//; #ak added $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//; @@ -1680,9 +1673,6 @@ sub process_state3_type($$) { # replace <, >, and & sub xml_escape($) { my $text = shift; - if (($output_mode eq "text") || ($output_mode eq "man")) { - return $text; - } $text =~ s/\&/\\\\\\amp;/g; $text =~ s/\/\\\\\\gt;/g; @@ -1716,7 +1706,6 @@ sub process_file($) { if ($state == 0) { if (/$doc_start/o) { $state = 1; # next line is always the function name - $in_doc_sect = 0; } } elsif ($state == 1) { # this line is the function name (always) if (/$doc_block/o) { @@ -1767,20 +1756,12 @@ sub process_file($) { $newcontents = $2; if ($contents ne "") { - if (!$in_doc_sect && $verbose) { - print STDERR "Warning(${file}:$.): contents before sections\n"; - ++$warnings; - } dump_section($section, xml_escape($contents)); $section = $section_default; } - $in_doc_sect = 1; $contents = $newcontents; if ($contents ne "") { - if (substr($contents, 0, 1) eq " ") { - $contents = substr($contents, 1); - } $contents .= "\n"; } $section = $newsection; @@ -1795,7 +1776,7 @@ sub process_file($) { $prototype = ""; $state = 3; $brcount = 0; -# print STDERR "end of doc comment, looking for prototype\n"; +# print STDERR "end of doc comment, looking for prototype\n"; } elsif (/$doc_content/) { # miguel-style comment kludge, look for blank lines after # @parameter line to signify start of description @@ -1812,7 +1793,7 @@ sub process_file($) { print STDERR "Warning(${file}:$.): bad line: $_"; ++$warnings; } - } elsif ($state == 3) { # scanning for function '{' (end of prototype) + } elsif ($state == 3) { # scanning for function { (end of prototype) if ($decl_type eq 'function') { process_state3_function($_, $file); } else { diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index e2de650d3..37f67c23e 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -52,23 +52,6 @@ do { \ sprintf(str + strlen(str), "*"); \ } while(0) -/** - * Check that sizeof(device_id type) are consistent with size of section - * in .o file. If in-consistent then userspace and kernel does not agree - * on actual size which is a bug. - **/ -static void device_id_size_check(const char *modname, const char *device_id, - unsigned long size, unsigned long id_size) -{ - if (size % id_size || size < id_size) { - fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " - "of the size of section __mod_%s_device_table=%lu.\n" - "Fix definition of struct %s_device_id " - "in mod_devicetable.h\n", - modname, device_id, id_size, device_id, size, device_id); - } -} - /* USB is special because the bcdDevice can be matched against a numeric range */ /* Looks like "usb:vNpNdNdcNdscNdpNicNiscNipN" */ static void do_usb_entry(struct usb_device_id *id, @@ -169,8 +152,10 @@ static void do_usb_table(void *symval, unsigned long size, unsigned int i; const unsigned long id_size = sizeof(struct usb_device_id); - device_id_size_check(mod->name, "usb", size, id_size); - + if (size % id_size || size < id_size) { + warn("%s ids %lu bad size " + "(each on %lu)\n", mod->name, size, id_size); + } /* Leave last one: it's the terminator. */ size -= id_size; @@ -391,7 +376,7 @@ static void do_input(char *alias, unsigned int i; for (i = min; i < max; i++) - if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG))) + if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG))) sprintf(alias + strlen(alias), "%X,*", i); } @@ -449,7 +434,6 @@ static inline int sym_is(const char *symbol, const char *name) static void do_table(void *symval, unsigned long size, unsigned long id_size, - const char *device_id, void *function, struct module *mod) { @@ -457,7 +441,10 @@ static void do_table(void *symval, unsigned long size, char alias[500]; int (*do_entry)(const char *, void *entry, char *alias) = function; - device_id_size_check(mod->name, device_id, size, id_size); + if (size % id_size || size < id_size) { + warn("%s ids %lu bad size " + "(each on %lu)\n", mod->name, size, id_size); + } /* Leave last one: it's the terminator. */ size -= id_size; @@ -489,51 +476,40 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, + sym->st_value; if (sym_is(symname, "__mod_pci_device_table")) - do_table(symval, sym->st_size, - sizeof(struct pci_device_id), "pci", + do_table(symval, sym->st_size, sizeof(struct pci_device_id), do_pci_entry, mod); else if (sym_is(symname, "__mod_usb_device_table")) /* special case to handle bcdDevice ranges */ do_usb_table(symval, sym->st_size, mod); else if (sym_is(symname, "__mod_ieee1394_device_table")) - do_table(symval, sym->st_size, - sizeof(struct ieee1394_device_id), "ieee1394", + do_table(symval, sym->st_size, sizeof(struct ieee1394_device_id), do_ieee1394_entry, mod); else if (sym_is(symname, "__mod_ccw_device_table")) - do_table(symval, sym->st_size, - sizeof(struct ccw_device_id), "ccw", + do_table(symval, sym->st_size, sizeof(struct ccw_device_id), do_ccw_entry, mod); else if (sym_is(symname, "__mod_serio_device_table")) - do_table(symval, sym->st_size, - sizeof(struct serio_device_id), "serio", + do_table(symval, sym->st_size, sizeof(struct serio_device_id), do_serio_entry, mod); else if (sym_is(symname, "__mod_pnp_device_table")) - do_table(symval, sym->st_size, - sizeof(struct pnp_device_id), "pnp", + do_table(symval, sym->st_size, sizeof(struct pnp_device_id), do_pnp_entry, mod); else if (sym_is(symname, "__mod_pnp_card_device_table")) - do_table(symval, sym->st_size, - sizeof(struct pnp_card_device_id), "pnp_card", + do_table(symval, sym->st_size, sizeof(struct pnp_card_device_id), do_pnp_card_entry, mod); else if (sym_is(symname, "__mod_pcmcia_device_table")) - do_table(symval, sym->st_size, - sizeof(struct pcmcia_device_id), "pcmcia", + do_table(symval, sym->st_size, sizeof(struct pcmcia_device_id), do_pcmcia_entry, mod); else if (sym_is(symname, "__mod_of_device_table")) - do_table(symval, sym->st_size, - sizeof(struct of_device_id), "of", + do_table(symval, sym->st_size, sizeof(struct of_device_id), do_of_entry, mod); else if (sym_is(symname, "__mod_vio_device_table")) - do_table(symval, sym->st_size, - sizeof(struct vio_device_id), "vio", + do_table(symval, sym->st_size, sizeof(struct vio_device_id), do_vio_entry, mod); else if (sym_is(symname, "__mod_i2c_device_table")) - do_table(symval, sym->st_size, - sizeof(struct i2c_device_id), "i2c", + do_table(symval, sym->st_size, sizeof(struct i2c_device_id), do_i2c_entry, mod); else if (sym_is(symname, "__mod_input_device_table")) - do_table(symval, sym->st_size, - sizeof(struct input_device_id), "input", + do_table(symval, sym->st_size, sizeof(struct input_device_id), do_input_entry, mod); } diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index 725d61c0f..3c92c8373 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -28,7 +28,7 @@ main(int argc, char **argv) printf("#define KERNEL_ELFCLASS ELFCLASS64\n"); break; default: - exit(1); + abort(); } switch (ei[EI_DATA]) { case ELFDATA2LSB: @@ -38,7 +38,7 @@ main(int argc, char **argv) printf("#define KERNEL_ELFDATA ELFDATA2MSB\n"); break; default: - exit(1); + abort(); } if (sizeof(unsigned long) == 4) { @@ -53,7 +53,7 @@ main(int argc, char **argv) else if (memcmp(endian_test.c, "\x02\x01", 2) == 0) printf("#define HOST_ELFDATA ELFDATA2LSB\n"); else - exit(1); + abort(); if ((strcmp(argv[1], "v850") == 0) || (strcmp(argv[1], "h8300") == 0)) printf("#define MODULE_SYMBOL_PREFIX \"_\"\n"); diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index dfde0e87a..d0f86ed43 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -13,7 +13,6 @@ #include #include "modpost.h" -#include "../../include/linux/license.h" /* Are we using CONFIG_MODVERSIONS? */ int modversions = 0; @@ -23,11 +22,6 @@ int have_vmlinux = 0; static int all_versions = 0; /* If we are modposting external module set to 1 */ static int external_module = 0; -/* How a symbol is exported */ -enum export { - export_plain, export_unused, export_gpl, - export_unused_gpl, export_gpl_future, export_unknown -}; void fatal(const char *fmt, ...) { @@ -103,7 +97,6 @@ static struct module *new_module(char *modname) /* add to list */ mod->name = p; - mod->gpl_compatible = -1; mod->next = modules; modules = mod; @@ -125,7 +118,6 @@ struct symbol { unsigned int kernel:1; /* 1 if symbol is from kernel * (only for external modules) **/ unsigned int preloaded:1; /* 1 if symbol from Module.symvers */ - enum export export; /* Type of export */ char name[0]; }; @@ -161,8 +153,7 @@ static struct symbol *alloc_symbol(const char *name, unsigned int weak, } /* For the hash of exported symbols */ -static struct symbol *new_symbol(const char *name, struct module *module, - enum export export) +static struct symbol *new_symbol(const char *name, struct module *module) { unsigned int hash; struct symbol *new; @@ -170,7 +161,6 @@ static struct symbol *new_symbol(const char *name, struct module *module, hash = tdb_hash(name) % SYMBOL_HASH_SIZE; new = symbolhash[hash] = alloc_symbol(name, 0, symbolhash[hash]); new->module = module; - new->export = export; return new; } @@ -189,63 +179,16 @@ static struct symbol *find_symbol(const char *name) return NULL; } -static struct { - const char *str; - enum export export; -} export_list[] = { - { .str = "EXPORT_SYMBOL", .export = export_plain }, - { .str = "EXPORT_UNUSED_SYMBOL", .export = export_unused }, - { .str = "EXPORT_SYMBOL_GPL", .export = export_gpl }, - { .str = "EXPORT_UNUSED_SYMBOL_GPL", .export = export_unused_gpl }, - { .str = "EXPORT_SYMBOL_GPL_FUTURE", .export = export_gpl_future }, - { .str = "(unknown)", .export = export_unknown }, -}; - - -static const char *export_str(enum export ex) -{ - return export_list[ex].str; -} - -static enum export export_no(const char * s) -{ - int i; - if (!s) - return export_unknown; - for (i = 0; export_list[i].export != export_unknown; i++) { - if (strcmp(export_list[i].str, s) == 0) - return export_list[i].export; - } - return export_unknown; -} - -static enum export export_from_sec(struct elf_info *elf, Elf_Section sec) -{ - if (sec == elf->export_sec) - return export_plain; - else if (sec == elf->export_unused_sec) - return export_unused; - else if (sec == elf->export_gpl_sec) - return export_gpl; - else if (sec == elf->export_unused_gpl_sec) - return export_unused_gpl; - else if (sec == elf->export_gpl_future_sec) - return export_gpl_future; - else - return export_unknown; -} - /** * Add an exported symbol - it may have already been added without a * CRC, in this case just update the CRC **/ -static struct symbol *sym_add_exported(const char *name, struct module *mod, - enum export export) +static struct symbol *sym_add_exported(const char *name, struct module *mod) { struct symbol *s = find_symbol(name); if (!s) { - s = new_symbol(name, mod, export); + s = new_symbol(name, mod); } else { if (!s->preloaded) { warn("%s: '%s' exported twice. Previous export " @@ -257,17 +200,16 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, s->preloaded = 0; s->vmlinux = is_vmlinux(mod->name); s->kernel = 0; - s->export = export; return s; } static void sym_update_crc(const char *name, struct module *mod, - unsigned int crc, enum export export) + unsigned int crc) { struct symbol *s = find_symbol(name); if (!s) - s = new_symbol(name, mod, export); + s = new_symbol(name, mod); s->crc = crc; s->crc_valid = 1; } @@ -341,7 +283,7 @@ static void parse_elf(struct elf_info *info, const char *filename) hdr = grab_file(filename, &info->size); if (!hdr) { perror(filename); - exit(1); + abort(); } info->hdr = hdr; if (info->size < sizeof(*hdr)) @@ -367,25 +309,13 @@ static void parse_elf(struct elf_info *info, const char *filename) for (i = 1; i < hdr->e_shnum; i++) { const char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; - const char *secname; if (sechdrs[i].sh_offset > info->size) goto truncated; - secname = secstrings + sechdrs[i].sh_name; - if (strcmp(secname, ".modinfo") == 0) { + if (strcmp(secstrings+sechdrs[i].sh_name, ".modinfo") == 0) { info->modinfo = (void *)hdr + sechdrs[i].sh_offset; info->modinfo_len = sechdrs[i].sh_size; - } else if (strcmp(secname, "__ksymtab") == 0) - info->export_sec = i; - else if (strcmp(secname, "__ksymtab_unused") == 0) - info->export_unused_sec = i; - else if (strcmp(secname, "__ksymtab_gpl") == 0) - info->export_gpl_sec = i; - else if (strcmp(secname, "__ksymtab_unused_gpl") == 0) - info->export_unused_gpl_sec = i; - else if (strcmp(secname, "__ksymtab_gpl_future") == 0) - info->export_gpl_future_sec = i; - + } if (sechdrs[i].sh_type != SHT_SYMTAB) continue; @@ -423,7 +353,6 @@ static void handle_modversions(struct module *mod, struct elf_info *info, Elf_Sym *sym, const char *symname) { unsigned int crc; - enum export export = export_from_sec(info, sym->st_shndx); switch (sym->st_shndx) { case SHN_COMMON: @@ -433,8 +362,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info, /* CRC'd symbol */ if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { crc = (unsigned int) sym->st_value; - sym_update_crc(symname + strlen(CRC_PFX), mod, crc, - export); + sym_update_crc(symname + strlen(CRC_PFX), mod, crc); } break; case SHN_UNDEF: @@ -478,8 +406,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info, default: /* All exported symbols */ if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) { - sym_add_exported(symname + strlen(KSYMTAB_PFX), mod, - export); + sym_add_exported(symname + strlen(KSYMTAB_PFX), mod); } if (strcmp(symname, MODULE_SYMBOL_PREFIX "init_module") == 0) mod->has_init = 1; @@ -510,18 +437,13 @@ static char *next_string(char *string, unsigned long *secsize) return string; } -static char *get_next_modinfo(void *modinfo, unsigned long modinfo_len, - const char *tag, char *info) +static char *get_modinfo(void *modinfo, unsigned long modinfo_len, + const char *tag) { char *p; unsigned int taglen = strlen(tag); unsigned long size = modinfo_len; - if (info) { - size -= info - (char *)modinfo; - modinfo = next_string(info, &size); - } - for (p = modinfo; p; p = next_string(p, &size)) { if (strncmp(p, tag, taglen) == 0 && p[taglen] == '=') return p + taglen + 1; @@ -529,13 +451,6 @@ static char *get_next_modinfo(void *modinfo, unsigned long modinfo_len, return NULL; } -static char *get_modinfo(void *modinfo, unsigned long modinfo_len, - const char *tag) - -{ - return get_next_modinfo(modinfo, modinfo_len, tag, NULL); -} - /** * Test if string s ends in string sub * return 0 if match @@ -906,10 +821,6 @@ static int init_section_ref_ok(const char *name) ".pci_fixup_final", ".pdr", "__param", - "__ex_table", - ".fixup", - ".smp_locks", - ".plt", /* seen on ARCH=um build on x86_64. Harmless */ NULL }; /* Start of section names */ @@ -935,8 +846,6 @@ static int init_section_ref_ok(const char *name) for (s = namelist3; *s; s++) if (strstr(name, *s) != NULL) return 1; - if (strrcmp(name, ".init") == 0) - return 1; return 0; } @@ -983,10 +892,6 @@ static int exit_section_ref_ok(const char *name) ".exitcall.exit", ".eh_frame", ".stab", - "__ex_table", - ".fixup", - ".smp_locks", - ".plt", /* seen on ARCH=um build on x86_64. Harmless */ NULL }; /* Start of section names */ @@ -1016,7 +921,6 @@ static void read_symbols(char *modname) { const char *symname; char *version; - char *license; struct module *mod; struct elf_info info = { }; Elf_Sym *sym; @@ -1032,18 +936,6 @@ static void read_symbols(char *modname) mod->skip = 1; } - license = get_modinfo(info.modinfo, info.modinfo_len, "license"); - while (license) { - if (license_is_gpl_compatible(license)) - mod->gpl_compatible = 1; - else { - mod->gpl_compatible = 0; - break; - } - license = get_next_modinfo(info.modinfo, info.modinfo_len, - "license", license); - } - for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { symname = info.strtab + sym->st_name; @@ -1100,67 +992,6 @@ void buf_write(struct buffer *buf, const char *s, int len) buf->pos += len; } -static void check_for_gpl_usage(enum export exp, const char *m, const char *s) -{ - const char *e = is_vmlinux(m) ?"":".ko"; - - switch (exp) { - case export_gpl: - fatal("modpost: GPL-incompatible module %s%s " - "uses GPL-only symbol '%s'\n", m, e, s); - break; - case export_unused_gpl: - fatal("modpost: GPL-incompatible module %s%s " - "uses GPL-only symbol marked UNUSED '%s'\n", m, e, s); - break; - case export_gpl_future: - warn("modpost: GPL-incompatible module %s%s " - "uses future GPL-only symbol '%s'\n", m, e, s); - break; - case export_plain: - case export_unused: - case export_unknown: - /* ignore */ - break; - } -} - -static void check_for_unused(enum export exp, const char* m, const char* s) -{ - const char *e = is_vmlinux(m) ?"":".ko"; - - switch (exp) { - case export_unused: - case export_unused_gpl: - warn("modpost: module %s%s " - "uses symbol '%s' marked UNUSED\n", m, e, s); - break; - default: - /* ignore */ - break; - } -} - -static void check_exports(struct module *mod) -{ - struct symbol *s, *exp; - - for (s = mod->unres; s; s = s->next) { - const char *basename; - exp = find_symbol(s->name); - if (!exp || exp->module == mod) - continue; - basename = strrchr(mod->name, '/'); - if (basename) - basename++; - else - basename = mod->name; - if (!mod->gpl_compatible) - check_for_gpl_usage(exp->export, basename, exp->name); - check_for_unused(exp->export, basename, exp->name); - } -} - /** * Header for the generated file **/ @@ -1311,9 +1142,6 @@ static void write_if_changed(struct buffer *b, const char *fname) fclose(file); } -/* parse Module.symvers file. line format: - * 0x12345678symbolmodule[[export]something] - **/ static void read_dump(const char *fname, unsigned int kernel) { unsigned long size, pos = 0; @@ -1325,7 +1153,7 @@ static void read_dump(const char *fname, unsigned int kernel) return; while ((line = get_next_line(&pos, file, size))) { - char *symname, *modname, *d, *export, *end; + char *symname, *modname, *d; unsigned int crc; struct module *mod; struct symbol *s; @@ -1336,10 +1164,8 @@ static void read_dump(const char *fname, unsigned int kernel) if (!(modname = strchr(symname, '\t'))) goto fail; *modname++ = '\0'; - if ((export = strchr(modname, '\t')) != NULL) - *export++ = '\0'; - if (export && ((end = strchr(export, '\t')) != NULL)) - *end = '\0'; + if (strchr(modname, '\t')) + goto fail; crc = strtoul(line, &d, 16); if (*symname == '\0' || *modname == '\0' || *d != '\0') goto fail; @@ -1351,10 +1177,10 @@ static void read_dump(const char *fname, unsigned int kernel) mod = new_module(NOFAIL(strdup(modname))); mod->skip = 1; } - s = sym_add_exported(symname, mod, export_no(export)); + s = sym_add_exported(symname, mod); s->kernel = kernel; s->preloaded = 1; - sym_update_crc(symname, mod, crc, export_no(export)); + sym_update_crc(symname, mod, crc); } return; fail: @@ -1384,10 +1210,9 @@ static void write_dump(const char *fname) symbol = symbolhash[n]; while (symbol) { if (dump_sym(symbol)) - buf_printf(&buf, "0x%08x\t%s\t%s\t%s\n", + buf_printf(&buf, "0x%08x\t%s\t%s\n", symbol->crc, symbol->name, - symbol->module->name, - export_str(symbol->export)); + symbol->module->name); symbol = symbol->next; } } @@ -1435,12 +1260,6 @@ int main(int argc, char **argv) read_symbols(argv[optind++]); } - for (mod = modules; mod; mod = mod->next) { - if (mod->skip) - continue; - check_exports(mod); - } - for (mod = modules; mod; mod = mod->next) { if (mod->skip) continue; diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index d398c61e5..861d866fc 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -100,7 +100,6 @@ buf_write(struct buffer *buf, const char *s, int len); struct module { struct module *next; const char *name; - int gpl_compatible; struct symbol *unres; int seen; int skip; @@ -116,11 +115,6 @@ struct elf_info { Elf_Shdr *sechdrs; Elf_Sym *symtab_start; Elf_Sym *symtab_stop; - Elf_Section export_sec; - Elf_Section export_unused_sec; - Elf_Section export_gpl_sec; - Elf_Section export_unused_gpl_sec; - Elf_Section export_gpl_future_sec; const char *strtab; char *modinfo; unsigned int modinfo_len; diff --git a/scripts/package/mkspec b/scripts/package/mkspec index df892841b..0b1038737 100644 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -73,13 +73,8 @@ echo "%ifarch ia64" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" echo "%else" -echo "%ifarch ppc64" -echo "cp vmlinux arch/powerpc/boot" -echo "cp arch/powerpc/boot/"'$KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" -echo "%else" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" echo "%endif" -echo "%endif" echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" diff --git a/scripts/rt-tester/check-all.sh b/scripts/rt-tester/check-all.sh deleted file mode 100644 index 43098afe7..000000000 --- a/scripts/rt-tester/check-all.sh +++ /dev/null @@ -1,22 +0,0 @@ - - -function testit () -{ - printf "%-30s: " $1 - ./rt-tester.py $1 | grep Pass -} - -testit t2-l1-2rt-sameprio.tst -testit t2-l1-pi.tst -testit t2-l1-signal.tst -#testit t2-l2-2rt-deadlock.tst -testit t3-l1-pi-1rt.tst -testit t3-l1-pi-2rt.tst -testit t3-l1-pi-3rt.tst -testit t3-l1-pi-signal.tst -testit t3-l1-pi-steal.tst -testit t3-l2-pi.tst -testit t4-l2-pi-deboost.tst -testit t5-l4-pi-boost-deboost.tst -testit t5-l4-pi-boost-deboost-setsched.tst - diff --git a/scripts/rt-tester/rt-tester.py b/scripts/rt-tester/rt-tester.py deleted file mode 100644 index 4c7966079..000000000 --- a/scripts/rt-tester/rt-tester.py +++ /dev/null @@ -1,222 +0,0 @@ -#!/usr/bin/env python -# -# rt-mutex tester -# -# (C) 2006 Thomas Gleixner -# -# 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. -# -import os -import sys -import getopt -import shutil -import string - -# Globals -quiet = 0 -test = 0 -comments = 0 - -sysfsprefix = "/sys/devices/system/rttest/rttest" -statusfile = "/status" -commandfile = "/command" - -# Command opcodes -cmd_opcodes = { - "schedother" : "1", - "schedfifo" : "2", - "lock" : "3", - "locknowait" : "4", - "lockint" : "5", - "lockintnowait" : "6", - "lockcont" : "7", - "unlock" : "8", - "lockbkl" : "9", - "unlockbkl" : "10", - "signal" : "11", - "resetevent" : "98", - "reset" : "99", - } - -test_opcodes = { - "prioeq" : ["P" , "eq" , None], - "priolt" : ["P" , "lt" , None], - "priogt" : ["P" , "gt" , None], - "nprioeq" : ["N" , "eq" , None], - "npriolt" : ["N" , "lt" , None], - "npriogt" : ["N" , "gt" , None], - "unlocked" : ["M" , "eq" , 0], - "trylock" : ["M" , "eq" , 1], - "blocked" : ["M" , "eq" , 2], - "blockedwake" : ["M" , "eq" , 3], - "locked" : ["M" , "eq" , 4], - "opcodeeq" : ["O" , "eq" , None], - "opcodelt" : ["O" , "lt" , None], - "opcodegt" : ["O" , "gt" , None], - "eventeq" : ["E" , "eq" , None], - "eventlt" : ["E" , "lt" , None], - "eventgt" : ["E" , "gt" , None], - } - -# Print usage information -def usage(): - print "rt-tester.py <-c -h -q -t> " - print " -c display comments after first command" - print " -h help" - print " -q quiet mode" - print " -t test mode (syntax check)" - print " testfile: read test specification from testfile" - print " otherwise from stdin" - return - -# Print progress when not in quiet mode -def progress(str): - if not quiet: - print str - -# Analyse a status value -def analyse(val, top, arg): - - intval = int(val) - - if top[0] == "M": - intval = intval / (10 ** int(arg)) - intval = intval % 10 - argval = top[2] - elif top[0] == "O": - argval = int(cmd_opcodes.get(arg, arg)) - else: - argval = int(arg) - - # progress("%d %s %d" %(intval, top[1], argval)) - - if top[1] == "eq" and intval == argval: - return 1 - if top[1] == "lt" and intval < argval: - return 1 - if top[1] == "gt" and intval > argval: - return 1 - return 0 - -# Parse the commandline -try: - (options, arguments) = getopt.getopt(sys.argv[1:],'chqt') -except getopt.GetoptError, ex: - usage() - sys.exit(1) - -# Parse commandline options -for option, value in options: - if option == "-c": - comments = 1 - elif option == "-q": - quiet = 1 - elif option == "-t": - test = 1 - elif option == '-h': - usage() - sys.exit(0) - -# Select the input source -if arguments: - try: - fd = open(arguments[0]) - except Exception,ex: - sys.stderr.write("File not found %s\n" %(arguments[0])) - sys.exit(1) -else: - fd = sys.stdin - -linenr = 0 - -# Read the test patterns -while 1: - - linenr = linenr + 1 - line = fd.readline() - if not len(line): - break - - line = line.strip() - parts = line.split(":") - - if not parts or len(parts) < 1: - continue - - if len(parts[0]) == 0: - continue - - if parts[0].startswith("#"): - if comments > 1: - progress(line) - continue - - if comments == 1: - comments = 2 - - progress(line) - - cmd = parts[0].strip().lower() - opc = parts[1].strip().lower() - tid = parts[2].strip() - dat = parts[3].strip() - - try: - # Test or wait for a status value - if cmd == "t" or cmd == "w": - testop = test_opcodes[opc] - - fname = "%s%s%s" %(sysfsprefix, tid, statusfile) - if test: - print fname - continue - - while 1: - query = 1 - fsta = open(fname, 'r') - status = fsta.readline().strip() - fsta.close() - stat = status.split(",") - for s in stat: - s = s.strip() - if s.startswith(testop[0]): - # Seperate status value - val = s[2:].strip() - query = analyse(val, testop, dat) - break - if query or cmd == "t": - break - - progress(" " + status) - - if not query: - sys.stderr.write("Test failed in line %d\n" %(linenr)) - sys.exit(1) - - # Issue a command to the tester - elif cmd == "c": - cmdnr = cmd_opcodes[opc] - # Build command string and sys filename - cmdstr = "%s:%s" %(cmdnr, dat) - fname = "%s%s%s" %(sysfsprefix, tid, commandfile) - if test: - print fname - continue - fcmd = open(fname, 'w') - fcmd.write(cmdstr) - fcmd.close() - - except Exception,ex: - sys.stderr.write(str(ex)) - sys.stderr.write("\nSyntax error in line %d\n" %(linenr)) - if not test: - fd.close() - sys.exit(1) - -# Normal exit pass -print "Pass" -sys.exit(0) - - diff --git a/scripts/rt-tester/t2-l1-2rt-sameprio.tst b/scripts/rt-tester/t2-l1-2rt-sameprio.tst deleted file mode 100644 index 8821f27cc..000000000 --- a/scripts/rt-tester/t2-l1-2rt-sameprio.tst +++ /dev/null @@ -1,99 +0,0 @@ -# -# RT-Mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal 0 -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 2 threads 1 lock -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedfifo: 0: 80 -C: schedfifo: 1: 80 - -# T0 lock L0 -C: locknowait: 0: 0 -C: locknowait: 1: 0 -W: locked: 0: 0 -W: blocked: 1: 0 -T: prioeq: 0: 80 - -# T0 unlock L0 -C: unlock: 0: 0 -W: locked: 1: 0 - -# Verify T0 -W: unlocked: 0: 0 -T: prioeq: 0: 80 - -# Unlock -C: unlock: 1: 0 -W: unlocked: 1: 0 - -# T1,T0 lock L0 -C: locknowait: 1: 0 -C: locknowait: 0: 0 -W: locked: 1: 0 -W: blocked: 0: 0 -T: prioeq: 1: 80 - -# T1 unlock L0 -C: unlock: 1: 0 -W: locked: 0: 0 - -# Verify T1 -W: unlocked: 1: 0 -T: prioeq: 1: 80 - -# Unlock and exit -C: unlock: 0: 0 -W: unlocked: 0: 0 - diff --git a/scripts/rt-tester/t2-l1-pi.tst b/scripts/rt-tester/t2-l1-pi.tst deleted file mode 100644 index cde1f189a..000000000 --- a/scripts/rt-tester/t2-l1-pi.tst +++ /dev/null @@ -1,82 +0,0 @@ -# -# RT-Mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal 0 -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 2 threads 1 lock with priority inversion -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedfifo: 1: 80 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 80 - -# T0 unlock L0 -C: unlock: 0: 0 -W: locked: 1: 0 - -# Verify T1 -W: unlocked: 0: 0 -T: priolt: 0: 1 - -# Unlock and exit -C: unlock: 1: 0 -W: unlocked: 1: 0 - diff --git a/scripts/rt-tester/t2-l1-signal.tst b/scripts/rt-tester/t2-l1-signal.tst deleted file mode 100644 index 3ab0bfc49..000000000 --- a/scripts/rt-tester/t2-l1-signal.tst +++ /dev/null @@ -1,77 +0,0 @@ -# -# RT-Mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal 0 -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 2 threads 1 lock with priority inversion -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedother: 1: 0 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: lockintnowait: 1: 0 -W: blocked: 1: 0 - -# Interrupt T1 -C: signal: 1: 0 -W: unlocked: 1: 0 -T: opcodeeq: 1: -4 - -# Unlock and exit -C: unlock: 0: 0 -W: unlocked: 0: 0 diff --git a/scripts/rt-tester/t2-l2-2rt-deadlock.tst b/scripts/rt-tester/t2-l2-2rt-deadlock.tst deleted file mode 100644 index f4b5d5d62..000000000 --- a/scripts/rt-tester/t2-l2-2rt-deadlock.tst +++ /dev/null @@ -1,89 +0,0 @@ -# -# RT-Mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal 0 -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 2 threads 2 lock -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedfifo: 0: 80 -C: schedfifo: 1: 80 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L1 -C: locknowait: 1: 1 -W: locked: 1: 1 - -# T0 lock L1 -C: lockintnowait: 0: 1 -W: blocked: 0: 1 - -# T1 lock L0 -C: lockintnowait: 1: 0 -W: blocked: 1: 0 - -# Make deadlock go away -C: signal: 1: 0 -W: unlocked: 1: 0 -C: signal: 0: 0 -W: unlocked: 0: 1 - -# Unlock and exit -C: unlock: 0: 0 -W: unlocked: 0: 0 -C: unlock: 1: 1 -W: unlocked: 1: 1 - diff --git a/scripts/rt-tester/t3-l1-pi-1rt.tst b/scripts/rt-tester/t3-l1-pi-1rt.tst deleted file mode 100644 index 63440ca2c..000000000 --- a/scripts/rt-tester/t3-l1-pi-1rt.tst +++ /dev/null @@ -1,92 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 3 threads 1 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedother: 1: 0 -C: schedfifo: 2: 82 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: priolt: 0: 1 - -# T2 lock L0 -C: locknowait: 2: 0 -W: blocked: 2: 0 -T: prioeq: 0: 82 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T2 got the lock -W: locked: 2: 0 -W: unlocked: 0: 0 -T: priolt: 0: 1 - -# T2 unlock L0 -C: unlock: 2: 0 - -W: unlocked: 2: 0 -W: locked: 1: 0 - -C: unlock: 1: 0 -W: unlocked: 1: 0 diff --git a/scripts/rt-tester/t3-l1-pi-2rt.tst b/scripts/rt-tester/t3-l1-pi-2rt.tst deleted file mode 100644 index e5816fe67..000000000 --- a/scripts/rt-tester/t3-l1-pi-2rt.tst +++ /dev/null @@ -1,93 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 3 threads 1 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedfifo: 1: 81 -C: schedfifo: 2: 82 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 81 - -# T2 lock L0 -C: locknowait: 2: 0 -W: blocked: 2: 0 -T: prioeq: 0: 82 -T: prioeq: 1: 81 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T2 got the lock -W: locked: 2: 0 -W: unlocked: 0: 0 -T: priolt: 0: 1 - -# T2 unlock L0 -C: unlock: 2: 0 - -W: unlocked: 2: 0 -W: locked: 1: 0 - -C: unlock: 1: 0 -W: unlocked: 1: 0 diff --git a/scripts/rt-tester/t3-l1-pi-3rt.tst b/scripts/rt-tester/t3-l1-pi-3rt.tst deleted file mode 100644 index 718b82b5d..000000000 --- a/scripts/rt-tester/t3-l1-pi-3rt.tst +++ /dev/null @@ -1,92 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 3 threads 1 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedfifo: 0: 80 -C: schedfifo: 1: 81 -C: schedfifo: 2: 82 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 81 - -# T2 lock L0 -C: locknowait: 2: 0 -W: blocked: 2: 0 -T: prioeq: 0: 82 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T2 got the lock -W: locked: 2: 0 -W: unlocked: 0: 0 -T: prioeq: 0: 80 - -# T2 unlock L0 -C: unlock: 2: 0 - -W: locked: 1: 0 -W: unlocked: 2: 0 - -C: unlock: 1: 0 -W: unlocked: 1: 0 diff --git a/scripts/rt-tester/t3-l1-pi-signal.tst b/scripts/rt-tester/t3-l1-pi-signal.tst deleted file mode 100644 index c6e213563..000000000 --- a/scripts/rt-tester/t3-l1-pi-signal.tst +++ /dev/null @@ -1,98 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# Reset event counter -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set priorities -C: schedother: 0: 0 -C: schedfifo: 1: 80 -C: schedfifo: 2: 81 - -# T0 lock L0 -C: lock: 0: 0 -W: locked: 0: 0 - -# T1 lock L0, no wait in the wakeup path -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 80 -T: prioeq: 1: 80 - -# T2 lock L0 interruptible, no wait in the wakeup path -C: lockintnowait: 2: 0 -W: blocked: 2: 0 -T: prioeq: 0: 81 -T: prioeq: 1: 80 - -# Interrupt T2 -C: signal: 2: 2 -W: unlocked: 2: 0 -T: prioeq: 1: 80 -T: prioeq: 0: 80 - -T: locked: 0: 0 -T: blocked: 1: 0 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T1 has locked L0 and exit -W: locked: 1: 0 -W: unlocked: 0: 0 -T: priolt: 0: 1 - -C: unlock: 1: 0 -W: unlocked: 1: 0 - - - diff --git a/scripts/rt-tester/t3-l1-pi-steal.tst b/scripts/rt-tester/t3-l1-pi-steal.tst deleted file mode 100644 index f53749d59..000000000 --- a/scripts/rt-tester/t3-l1-pi-steal.tst +++ /dev/null @@ -1,96 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 3 threads 1 lock PI steal pending ownership -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedfifo: 1: 80 -C: schedfifo: 2: 81 - -# T0 lock L0 -C: lock: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: lock: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 80 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T1 is in the wakeup loop -W: blockedwake: 1: 0 -T: priolt: 0: 1 - -# T2 lock L0 -C: lock: 2: 0 -# T1 leave wakeup loop -C: lockcont: 1: 0 - -# T2 must have the lock and T1 must be blocked -W: locked: 2: 0 -W: blocked: 1: 0 - -# T2 unlock L0 -C: unlock: 2: 0 - -# Wait until T1 is in the wakeup loop and let it run -W: blockedwake: 1: 0 -C: lockcont: 1: 0 -W: locked: 1: 0 -C: unlock: 1: 0 -W: unlocked: 1: 0 diff --git a/scripts/rt-tester/t3-l2-pi.tst b/scripts/rt-tester/t3-l2-pi.tst deleted file mode 100644 index cdc3e4fd7..000000000 --- a/scripts/rt-tester/t3-l2-pi.tst +++ /dev/null @@ -1,92 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 3 threads 2 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedother: 1: 0 -C: schedfifo: 2: 82 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L0 -C: locknowait: 1: 0 -W: blocked: 1: 0 -T: priolt: 0: 1 - -# T2 lock L0 -C: locknowait: 2: 0 -W: blocked: 2: 0 -T: prioeq: 0: 82 - -# T0 unlock L0 -C: unlock: 0: 0 - -# Wait until T2 got the lock -W: locked: 2: 0 -W: unlocked: 0: 0 -T: priolt: 0: 1 - -# T2 unlock L0 -C: unlock: 2: 0 - -W: unlocked: 2: 0 -W: locked: 1: 0 - -C: unlock: 1: 0 -W: unlocked: 1: 0 diff --git a/scripts/rt-tester/t4-l2-pi-deboost.tst b/scripts/rt-tester/t4-l2-pi-deboost.tst deleted file mode 100644 index baa14137f..000000000 --- a/scripts/rt-tester/t4-l2-pi-deboost.tst +++ /dev/null @@ -1,123 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 4 threads 2 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedother: 1: 0 -C: schedfifo: 2: 82 -C: schedfifo: 3: 83 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L1 -C: locknowait: 1: 1 -W: locked: 1: 1 - -# T3 lock L0 -C: lockintnowait: 3: 0 -W: blocked: 3: 0 -T: prioeq: 0: 83 - -# T0 lock L1 -C: lock: 0: 1 -W: blocked: 0: 1 -T: prioeq: 1: 83 - -# T1 unlock L1 -C: unlock: 1: 1 - -# Wait until T0 is in the wakeup code -W: blockedwake: 0: 1 - -# Verify that T1 is unboosted -W: unlocked: 1: 1 -T: priolt: 1: 1 - -# T2 lock L1 (T0 is boosted and pending owner !) -C: locknowait: 2: 1 -W: blocked: 2: 1 -T: prioeq: 0: 83 - -# Interrupt T3 and wait until T3 returned -C: signal: 3: 0 -W: unlocked: 3: 0 - -# Verify prio of T0 (still pending owner, -# but T2 is enqueued due to the previous boost by T3 -T: prioeq: 0: 82 - -# Let T0 continue -C: lockcont: 0: 1 -W: locked: 0: 1 - -# Unlock L1 and let T2 get L1 -C: unlock: 0: 1 -W: locked: 2: 1 - -# Verify that T0 is unboosted -W: unlocked: 0: 1 -T: priolt: 0: 1 - -# Unlock everything and exit -C: unlock: 2: 1 -W: unlocked: 2: 1 - -C: unlock: 0: 0 -W: unlocked: 0: 0 - diff --git a/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst b/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst deleted file mode 100644 index e6ec0c81b..000000000 --- a/scripts/rt-tester/t5-l4-pi-boost-deboost-setsched.tst +++ /dev/null @@ -1,183 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 5 threads 4 lock PI - modify priority of blocked threads -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedfifo: 1: 81 -C: schedfifo: 2: 82 -C: schedfifo: 3: 83 -C: schedfifo: 4: 84 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L1 -C: locknowait: 1: 1 -W: locked: 1: 1 - -# T1 lock L0 -C: lockintnowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 81 - -# T2 lock L2 -C: locknowait: 2: 2 -W: locked: 2: 2 - -# T2 lock L1 -C: lockintnowait: 2: 1 -W: blocked: 2: 1 -T: prioeq: 0: 82 -T: prioeq: 1: 82 - -# T3 lock L3 -C: locknowait: 3: 3 -W: locked: 3: 3 - -# T3 lock L2 -C: lockintnowait: 3: 2 -W: blocked: 3: 2 -T: prioeq: 0: 83 -T: prioeq: 1: 83 -T: prioeq: 2: 83 - -# T4 lock L3 -C: lockintnowait: 4: 3 -W: blocked: 4: 3 -T: prioeq: 0: 84 -T: prioeq: 1: 84 -T: prioeq: 2: 84 -T: prioeq: 3: 84 - -# Reduce prio of T4 -C: schedfifo: 4: 80 -T: prioeq: 0: 83 -T: prioeq: 1: 83 -T: prioeq: 2: 83 -T: prioeq: 3: 83 -T: prioeq: 4: 80 - -# Increase prio of T4 -C: schedfifo: 4: 84 -T: prioeq: 0: 84 -T: prioeq: 1: 84 -T: prioeq: 2: 84 -T: prioeq: 3: 84 -T: prioeq: 4: 84 - -# Reduce prio of T3 -C: schedfifo: 3: 80 -T: prioeq: 0: 84 -T: prioeq: 1: 84 -T: prioeq: 2: 84 -T: prioeq: 3: 84 -T: prioeq: 4: 84 - -# Increase prio of T3 -C: schedfifo: 3: 85 -T: prioeq: 0: 85 -T: prioeq: 1: 85 -T: prioeq: 2: 85 -T: prioeq: 3: 85 -T: prioeq: 4: 84 - -# Reduce prio of T3 -C: schedfifo: 3: 83 -T: prioeq: 0: 84 -T: prioeq: 1: 84 -T: prioeq: 2: 84 -T: prioeq: 3: 84 -T: prioeq: 4: 84 - -# Signal T4 -C: signal: 4: 0 -W: unlocked: 4: 3 -T: prioeq: 0: 83 -T: prioeq: 1: 83 -T: prioeq: 2: 83 -T: prioeq: 3: 83 - -# Signal T3 -C: signal: 3: 0 -W: unlocked: 3: 2 -T: prioeq: 0: 82 -T: prioeq: 1: 82 -T: prioeq: 2: 82 - -# Signal T2 -C: signal: 2: 0 -W: unlocked: 2: 1 -T: prioeq: 0: 81 -T: prioeq: 1: 81 - -# Signal T1 -C: signal: 1: 0 -W: unlocked: 1: 0 -T: priolt: 0: 1 - -# Unlock and exit -C: unlock: 3: 3 -C: unlock: 2: 2 -C: unlock: 1: 1 -C: unlock: 0: 0 - -W: unlocked: 3: 3 -W: unlocked: 2: 2 -W: unlocked: 1: 1 -W: unlocked: 0: 0 - diff --git a/scripts/rt-tester/t5-l4-pi-boost-deboost.tst b/scripts/rt-tester/t5-l4-pi-boost-deboost.tst deleted file mode 100644 index ca64f8bbf..000000000 --- a/scripts/rt-tester/t5-l4-pi-boost-deboost.tst +++ /dev/null @@ -1,143 +0,0 @@ -# -# rt-mutex test -# -# Op: C(ommand)/T(est)/W(ait) -# | opcode -# | | threadid: 0-7 -# | | | opcode argument -# | | | | -# C: lock: 0: 0 -# -# Commands -# -# opcode opcode argument -# schedother nice value -# schedfifo priority -# lock lock nr (0-7) -# locknowait lock nr (0-7) -# lockint lock nr (0-7) -# lockintnowait lock nr (0-7) -# lockcont lock nr (0-7) -# unlock lock nr (0-7) -# lockbkl lock nr (0-7) -# unlockbkl lock nr (0-7) -# signal thread to signal (0-7) -# reset 0 -# resetevent 0 -# -# Tests / Wait -# -# opcode opcode argument -# -# prioeq priority -# priolt priority -# priogt priority -# nprioeq normal priority -# npriolt normal priority -# npriogt normal priority -# locked lock nr (0-7) -# blocked lock nr (0-7) -# blockedwake lock nr (0-7) -# unlocked lock nr (0-7) -# lockedbkl dont care -# blockedbkl dont care -# unlockedbkl dont care -# opcodeeq command opcode or number -# opcodelt number -# opcodegt number -# eventeq number -# eventgt number -# eventlt number - -# -# 5 threads 4 lock PI -# -C: resetevent: 0: 0 -W: opcodeeq: 0: 0 - -# Set schedulers -C: schedother: 0: 0 -C: schedfifo: 1: 81 -C: schedfifo: 2: 82 -C: schedfifo: 3: 83 -C: schedfifo: 4: 84 - -# T0 lock L0 -C: locknowait: 0: 0 -W: locked: 0: 0 - -# T1 lock L1 -C: locknowait: 1: 1 -W: locked: 1: 1 - -# T1 lock L0 -C: lockintnowait: 1: 0 -W: blocked: 1: 0 -T: prioeq: 0: 81 - -# T2 lock L2 -C: locknowait: 2: 2 -W: locked: 2: 2 - -# T2 lock L1 -C: lockintnowait: 2: 1 -W: blocked: 2: 1 -T: prioeq: 0: 82 -T: prioeq: 1: 82 - -# T3 lock L3 -C: locknowait: 3: 3 -W: locked: 3: 3 - -# T3 lock L2 -C: lockintnowait: 3: 2 -W: blocked: 3: 2 -T: prioeq: 0: 83 -T: prioeq: 1: 83 -T: prioeq: 2: 83 - -# T4 lock L3 -C: lockintnowait: 4: 3 -W: blocked: 4: 3 -T: prioeq: 0: 84 -T: prioeq: 1: 84 -T: prioeq: 2: 84 -T: prioeq: 3: 84 - -# Signal T4 -C: signal: 4: 0 -W: unlocked: 4: 3 -T: prioeq: 0: 83 -T: prioeq: 1: 83 -T: prioeq: 2: 83 -T: prioeq: 3: 83 - -# Signal T3 -C: signal: 3: 0 -W: unlocked: 3: 2 -T: prioeq: 0: 82 -T: prioeq: 1: 82 -T: prioeq: 2: 82 - -# Signal T2 -C: signal: 2: 0 -W: unlocked: 2: 1 -T: prioeq: 0: 81 -T: prioeq: 1: 81 - -# Signal T1 -C: signal: 1: 0 -W: unlocked: 1: 0 -T: priolt: 0: 1 - -# Unlock and exit -C: unlock: 3: 3 -C: unlock: 2: 2 -C: unlock: 1: 1 -C: unlock: 0: 0 - -W: unlocked: 3: 3 -W: unlocked: 2: 2 -W: unlocked: 1: 1 -W: unlocked: 0: 0 - diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 82e4993f0..9a2382521 100644 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -11,12 +11,12 @@ cd "${1:-.}" || usage # Check for git and a git repo. if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Do we have an untagged version? - if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then + if [ "`git name-rev --tags HEAD`" = "HEAD undefined" ]; then printf '%s%s' -g `echo "$head" | cut -c1-8` fi # Are there uncommitted changes? - if git diff-index HEAD | read dummy; then + if git diff-files | read dummy; then printf '%s' -dirty fi fi diff --git a/security/Kconfig b/security/Kconfig index 67785df26..34f593410 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -22,22 +22,16 @@ config KEYS If you are unsure as to whether this is required, answer N. config KEYS_DEBUG_PROC_KEYS - bool "Enable the /proc/keys file by which keys may be viewed" + bool "Enable the /proc/keys file by which all keys may be viewed" depends on KEYS help - This option turns on support for the /proc/keys file - through which - can be listed all the keys on the system that are viewable by the - reading process. + This option turns on support for the /proc/keys file through which + all the keys on the system can be listed. - The only keys included in the list are those that grant View - permission to the reading process whether or not it possesses them. - Note that LSM security checks are still performed, and may further - filter out keys that the current process is not authorised to view. - - Only key attributes are listed here; key payloads are not included in - the resulting table. - - If you are unsure as to whether this is required, answer N. + This option is a slight security risk in that it makes it possible + for anyone to see all the keys on the system. Normally the manager + pretends keys that are inaccessible to a process don't exist as far + as that process is concerned. config SECURITY bool "Enable different security models" diff --git a/security/capability.c b/security/capability.c index b868e7eda..f9b35cc0b 100644 --- a/security/capability.c +++ b/security/capability.c @@ -8,6 +8,7 @@ * */ +#include #include #include #include diff --git a/security/commoncap.c b/security/commoncap.c index 2148cf504..eceae9e53 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -33,9 +34,9 @@ int cap_netlink_send(struct sock *sk, struct sk_buff *skb) EXPORT_SYMBOL(cap_netlink_send); -int cap_netlink_recv(struct sk_buff *skb, int cap) +int cap_netlink_recv(struct sk_buff *skb) { - if (!cap_raised(NETLINK_CB(skb).eff_cap, cap)) + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) return -EPERM; return 0; } diff --git a/security/dummy.c b/security/dummy.c index 58c6d399c..8ccccccc1 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -15,6 +15,7 @@ #undef DEBUG #include +#include #include #include #include @@ -190,7 +191,7 @@ static int dummy_sb_kern_mount (struct super_block *sb, void *data) return 0; } -static int dummy_sb_statfs (struct dentry *dentry) +static int dummy_sb_statfs (struct super_block *sb) { return 0; } @@ -505,9 +506,6 @@ static int dummy_task_getsid (struct task_struct *p) return 0; } -static void dummy_task_getsecid (struct task_struct *p, u32 *secid) -{ } - static int dummy_task_setgroups (struct group_info *group_info) { return 0; @@ -518,16 +516,6 @@ static int dummy_task_setnice (struct task_struct *p, int nice) return 0; } -static int dummy_task_setioprio (struct task_struct *p, int ioprio) -{ - return 0; -} - -static int dummy_task_getioprio (struct task_struct *p) -{ - return 0; -} - static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) { return 0; @@ -544,18 +532,13 @@ static int dummy_task_getscheduler (struct task_struct *p) return 0; } -static int dummy_task_movememory (struct task_struct *p) -{ - return 0; -} - static int dummy_task_wait (struct task_struct *p) { return 0; } static int dummy_task_kill (struct task_struct *p, struct siginfo *info, - int sig, u32 secid) + int sig) { return 0; } @@ -682,9 +665,9 @@ static int dummy_netlink_send (struct sock *sk, struct sk_buff *skb) return 0; } -static int dummy_netlink_recv (struct sk_buff *skb, int cap) +static int dummy_netlink_recv (struct sk_buff *skb) { - if (!cap_raised (NETLINK_CB (skb).eff_cap, cap)) + if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN)) return -EPERM; return 0; } @@ -791,7 +774,8 @@ static int dummy_socket_getpeersec_stream(struct socket *sock, char __user *optv return -ENOPROTOOPT; } -static int dummy_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) +static int dummy_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, + u32 *seclen) { return -ENOPROTOOPT; } @@ -826,11 +810,6 @@ static void dummy_xfrm_policy_free_security(struct xfrm_policy *xp) { } -static int dummy_xfrm_policy_delete_security(struct xfrm_policy *xp) -{ - return 0; -} - static int dummy_xfrm_state_alloc_security(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx) { return 0; @@ -840,11 +819,6 @@ static void dummy_xfrm_state_free_security(struct xfrm_state *x) { } -static int dummy_xfrm_state_delete_security(struct xfrm_state *x) -{ - return 0; -} - static int dummy_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid, u8 dir) { return 0; @@ -875,18 +849,8 @@ static int dummy_setprocattr(struct task_struct *p, char *name, void *value, siz return -EINVAL; } -static int dummy_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) -{ - return -EOPNOTSUPP; -} - -static void dummy_release_secctx(char *secdata, u32 seclen) -{ -} - #ifdef CONFIG_KEYS -static inline int dummy_key_alloc(struct key *key, struct task_struct *ctx, - unsigned long flags) +static inline int dummy_key_alloc(struct key *key) { return 0; } @@ -996,15 +960,11 @@ void security_fixup_ops (struct security_operations *ops) set_to_dummy_if_null(ops, task_setpgid); set_to_dummy_if_null(ops, task_getpgid); set_to_dummy_if_null(ops, task_getsid); - set_to_dummy_if_null(ops, task_getsecid); set_to_dummy_if_null(ops, task_setgroups); set_to_dummy_if_null(ops, task_setnice); - set_to_dummy_if_null(ops, task_setioprio); - set_to_dummy_if_null(ops, task_getioprio); set_to_dummy_if_null(ops, task_setrlimit); set_to_dummy_if_null(ops, task_setscheduler); set_to_dummy_if_null(ops, task_getscheduler); - set_to_dummy_if_null(ops, task_movememory); set_to_dummy_if_null(ops, task_wait); set_to_dummy_if_null(ops, task_kill); set_to_dummy_if_null(ops, task_prctl); @@ -1036,8 +996,6 @@ void security_fixup_ops (struct security_operations *ops) set_to_dummy_if_null(ops, d_instantiate); set_to_dummy_if_null(ops, getprocattr); set_to_dummy_if_null(ops, setprocattr); - set_to_dummy_if_null(ops, secid_to_secctx); - set_to_dummy_if_null(ops, release_secctx); #ifdef CONFIG_SECURITY_NETWORK set_to_dummy_if_null(ops, unix_stream_connect); set_to_dummy_if_null(ops, unix_may_send); @@ -1066,10 +1024,8 @@ void security_fixup_ops (struct security_operations *ops) set_to_dummy_if_null(ops, xfrm_policy_alloc_security); set_to_dummy_if_null(ops, xfrm_policy_clone_security); set_to_dummy_if_null(ops, xfrm_policy_free_security); - set_to_dummy_if_null(ops, xfrm_policy_delete_security); set_to_dummy_if_null(ops, xfrm_state_alloc_security); set_to_dummy_if_null(ops, xfrm_state_free_security); - set_to_dummy_if_null(ops, xfrm_state_delete_security); set_to_dummy_if_null(ops, xfrm_policy_lookup); #endif /* CONFIG_SECURITY_NETWORK_XFRM */ #ifdef CONFIG_KEYS diff --git a/security/inode.c b/security/inode.c index 49ee51529..0f77b0223 100644 --- a/security/inode.c +++ b/security/inode.c @@ -13,6 +13,7 @@ */ /* #define DEBUG */ +#include #include #include #include @@ -44,8 +45,8 @@ static ssize_t default_write_file(struct file *file, const char __user *buf, static int default_open(struct inode *inode, struct file *file) { - if (inode->i_private) - file->private_data = inode->i_private; + if (inode->u.generic_ip) + file->private_data = inode->u.generic_ip; return 0; } @@ -64,6 +65,7 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) inode->i_mode = mode; inode->i_uid = 0; inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; switch (mode & S_IFMT) { @@ -133,11 +135,11 @@ static int fill_super(struct super_block *sb, void *data, int silent) return simple_fill_super(sb, SECURITYFS_MAGIC, files); } -static int get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_single(fs_type, flags, data, fill_super, mnt); + return get_sb_single(fs_type, flags, data, fill_super); } static struct file_system_type fs_type = { @@ -193,7 +195,7 @@ static int create_by_name(const char *name, mode_t mode, * directory dentry if set. If this paramater is NULL, then the * file will be created in the root of the securityfs filesystem. * @data: a pointer to something that the caller will want to get to later - * on. The inode.i_private pointer will point to this value on + * on. The inode.u.generic_ip pointer will point to this value on * the open() call. * @fops: a pointer to a struct file_operations that should be used for * this file. @@ -222,7 +224,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode, pr_debug("securityfs: creating file '%s'\n",name); - error = simple_pin_fs(&fs_type, &mount, &mount_count); + error = simple_pin_fs("securityfs", &mount, &mount_count); if (error) { dentry = ERR_PTR(error); goto exit; @@ -239,7 +241,7 @@ struct dentry *securityfs_create_file(const char *name, mode_t mode, if (fops) dentry->d_inode->i_fop = fops; if (data) - dentry->d_inode->i_private = data; + dentry->d_inode->u.generic_ip = data; } exit: return dentry; diff --git a/security/keys/internal.h b/security/keys/internal.h index 1bb416f4b..e066e6057 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h @@ -99,9 +99,7 @@ extern int install_process_keyring(struct task_struct *tsk); extern struct key *request_key_and_link(struct key_type *type, const char *description, const char *callout_info, - void *aux, - struct key *dest_keyring, - unsigned long flags); + struct key *dest_keyring); /* * request_key authorisation diff --git a/security/keys/key.c b/security/keys/key.c index 80de8c3e9..b6061fa29 100644 --- a/security/keys/key.c +++ b/security/keys/key.c @@ -11,16 +11,15 @@ #include #include -#include #include #include #include #include -#include #include #include "internal.h" static kmem_cache_t *key_jar; +static key_serial_t key_serial_next = 3; struct rb_root key_serial_tree; /* tree of keys indexed by serial */ DEFINE_SPINLOCK(key_serial_lock); @@ -170,24 +169,23 @@ static void __init __key_insert_serial(struct key *key) /*****************************************************************************/ /* * assign a key the next unique serial number - * - these are assigned randomly to avoid security issues through covert - * channel problems + * - we work through all the serial numbers between 2 and 2^31-1 in turn and + * then wrap */ static inline void key_alloc_serial(struct key *key) { struct rb_node *parent, **p; struct key *xkey; - /* propose a random serial number and look for a hole for it in the - * serial number tree */ - do { - get_random_bytes(&key->serial, sizeof(key->serial)); - - key->serial >>= 1; /* negative numbers are not permitted */ - } while (key->serial < 3); - spin_lock(&key_serial_lock); + /* propose a likely serial number and look for a hole for it in the + * serial number tree */ + key->serial = key_serial_next; + if (key->serial < 3) + key->serial = 3; + key_serial_next = key->serial + 1; + parent = NULL; p = &key_serial_tree.rb_node; @@ -206,18 +204,19 @@ static inline void key_alloc_serial(struct key *key) /* we found a key with the proposed serial number - walk the tree from * that point looking for the next unused serial number */ -serial_exists: + serial_exists: for (;;) { - key->serial++; + key->serial = key_serial_next; if (key->serial < 2) key->serial = 2; + key_serial_next = key->serial + 1; - if (!rb_parent(parent)) + if (!parent->rb_parent) p = &key_serial_tree.rb_node; - else if (rb_parent(parent)->rb_left == parent) - p = &(rb_parent(parent)->rb_left); + else if (parent->rb_parent->rb_left == parent) + p = &parent->rb_parent->rb_left; else - p = &(rb_parent(parent)->rb_right); + p = &parent->rb_parent->rb_right; parent = rb_next(parent); if (!parent) @@ -229,7 +228,7 @@ serial_exists: } /* we've found a suitable hole - arrange for this key to occupy it */ -insert_here: + insert_here: rb_link_node(&key->serial_node, parent, p); rb_insert_color(&key->serial_node, &key_serial_tree); @@ -248,8 +247,8 @@ insert_here: * instantiate the key or discard it before returning */ struct key *key_alloc(struct key_type *type, const char *desc, - uid_t uid, gid_t gid, struct task_struct *ctx, - key_perm_t perm, unsigned long flags) + uid_t uid, gid_t gid, key_perm_t perm, + int not_in_quota) { struct key_user *user = NULL; struct key *key; @@ -270,14 +269,12 @@ struct key *key_alloc(struct key_type *type, const char *desc, /* check that the user's quota permits allocation of another key and * its description */ - if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { + if (!not_in_quota) { spin_lock(&user->lock); - if (!(flags & KEY_ALLOC_QUOTA_OVERRUN)) { - if (user->qnkeys + 1 >= KEYQUOTA_MAX_KEYS || - user->qnbytes + quotalen >= KEYQUOTA_MAX_BYTES - ) - goto no_quota; - } + if (user->qnkeys + 1 >= KEYQUOTA_MAX_KEYS || + user->qnbytes + quotalen >= KEYQUOTA_MAX_BYTES + ) + goto no_quota; user->qnkeys++; user->qnbytes += quotalen; @@ -311,7 +308,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, key->payload.data = NULL; key->security = NULL; - if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) + if (!not_in_quota) key->flags |= 1 << KEY_FLAG_IN_QUOTA; memset(&key->type_data, 0, sizeof(key->type_data)); @@ -321,7 +318,7 @@ struct key *key_alloc(struct key_type *type, const char *desc, #endif /* let the security module know about the key */ - ret = security_key_alloc(key, ctx, flags); + ret = security_key_alloc(key); if (ret < 0) goto security_error; @@ -335,7 +332,7 @@ error: security_error: kfree(key->description); kmem_cache_free(key_jar, key); - if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { + if (!not_in_quota) { spin_lock(&user->lock); user->qnkeys--; user->qnbytes -= quotalen; @@ -348,7 +345,7 @@ security_error: no_memory_3: kmem_cache_free(key_jar, key); no_memory_2: - if (!(flags & KEY_ALLOC_NOT_IN_QUOTA)) { + if (!not_in_quota) { spin_lock(&user->lock); user->qnkeys--; user->qnbytes -= quotalen; @@ -764,7 +761,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *description, const void *payload, size_t plen, - unsigned long flags) + int not_in_quota) { struct key_type *ktype; struct key *keyring, *key = NULL; @@ -825,7 +822,7 @@ key_ref_t key_create_or_update(key_ref_t keyring_ref, /* allocate a new key */ key = key_alloc(ktype, description, current->fsuid, current->fsgid, - current, perm, flags); + perm, not_in_quota); if (IS_ERR(key)) { key_ref = ERR_PTR(PTR_ERR(key)); goto error_3; @@ -910,10 +907,6 @@ void key_revoke(struct key *key) * it */ down_write(&key->sem); set_bit(KEY_FLAG_REVOKED, &key->flags); - - if (key->type->revoke) - key->type->revoke(key); - up_write(&key->sem); } /* end key_revoke() */ @@ -989,7 +982,7 @@ void unregister_key_type(struct key_type *ktype) if (key->type == ktype) { if (ktype->destroy) ktype->destroy(key); - memset(&key->payload, KEY_DESTROY, sizeof(key->payload)); + memset(&key->payload, 0xbd, sizeof(key->payload)); } } diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index d9ca15c10..ed71d86d2 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -102,7 +102,7 @@ asmlinkage long sys_add_key(const char __user *_type, /* create or update the requested key and add it to the target * keyring */ key_ref = key_create_or_update(keyring_ref, type, description, - payload, plen, KEY_ALLOC_IN_QUOTA); + payload, plen, 0); if (!IS_ERR(key_ref)) { ret = key_ref_to_ptr(key_ref)->serial; key_ref_put(key_ref); @@ -183,9 +183,8 @@ asmlinkage long sys_request_key(const char __user *_type, } /* do the search */ - key = request_key_and_link(ktype, description, callout_info, NULL, - key_ref_to_ptr(dest_ref), - KEY_ALLOC_IN_QUOTA); + key = request_key_and_link(ktype, description, callout_info, + key_ref_to_ptr(dest_ref)); if (IS_ERR(key)) { ret = PTR_ERR(key); goto error5; @@ -673,7 +672,6 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) */ long keyctl_chown_key(key_serial_t id, uid_t uid, gid_t gid) { - struct key_user *newowner, *zapowner = NULL; struct key *key; key_ref_t key_ref; long ret; @@ -697,50 +695,19 @@ long keyctl_chown_key(key_serial_t id, uid_t uid, gid_t gid) if (!capable(CAP_SYS_ADMIN)) { /* only the sysadmin can chown a key to some other UID */ if (uid != (uid_t) -1 && key->uid != uid) - goto error_put; + goto no_access; /* only the sysadmin can set the key's GID to a group other * than one of those that the current process subscribes to */ if (gid != (gid_t) -1 && gid != key->gid && !in_group_p(gid)) - goto error_put; + goto no_access; } - /* change the UID */ + /* change the UID (have to update the quotas) */ if (uid != (uid_t) -1 && uid != key->uid) { - ret = -ENOMEM; - newowner = key_user_lookup(uid); - if (!newowner) - goto error_put; - - /* transfer the quota burden to the new user */ - if (test_bit(KEY_FLAG_IN_QUOTA, &key->flags)) { - spin_lock(&newowner->lock); - if (newowner->qnkeys + 1 >= KEYQUOTA_MAX_KEYS || - newowner->qnbytes + key->quotalen >= - KEYQUOTA_MAX_BYTES) - goto quota_overrun; - - newowner->qnkeys++; - newowner->qnbytes += key->quotalen; - spin_unlock(&newowner->lock); - - spin_lock(&key->user->lock); - key->user->qnkeys--; - key->user->qnbytes -= key->quotalen; - spin_unlock(&key->user->lock); - } - - atomic_dec(&key->user->nkeys); - atomic_inc(&newowner->nkeys); - - if (test_bit(KEY_FLAG_INSTANTIATED, &key->flags)) { - atomic_dec(&key->user->nikeys); - atomic_inc(&newowner->nikeys); - } - - zapowner = key->user; - key->user = newowner; - key->uid = uid; + /* don't support UID changing yet */ + ret = -EOPNOTSUPP; + goto no_access; } /* change the GID */ @@ -749,20 +716,12 @@ long keyctl_chown_key(key_serial_t id, uid_t uid, gid_t gid) ret = 0; -error_put: + no_access: up_write(&key->sem); key_put(key); - if (zapowner) - key_user_put(zapowner); -error: + error: return ret; -quota_overrun: - spin_unlock(&newowner->lock); - zapowner = newowner; - ret = -EDQUOT; - goto error_put; - } /* end keyctl_chown_key() */ /*****************************************************************************/ diff --git a/security/keys/keyring.c b/security/keys/keyring.c index e8d02acc5..bffa924c1 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -49,7 +49,6 @@ static inline unsigned keyring_hash(const char *desc) static int keyring_instantiate(struct key *keyring, const void *data, size_t datalen); static int keyring_match(const struct key *keyring, const void *criterion); -static void keyring_revoke(struct key *keyring); static void keyring_destroy(struct key *keyring); static void keyring_describe(const struct key *keyring, struct seq_file *m); static long keyring_read(const struct key *keyring, @@ -60,7 +59,6 @@ struct key_type key_type_keyring = { .def_datalen = sizeof(struct keyring_list), .instantiate = keyring_instantiate, .match = keyring_match, - .revoke = keyring_revoke, .destroy = keyring_destroy, .describe = keyring_describe, .read = keyring_read, @@ -242,16 +240,15 @@ static long keyring_read(const struct key *keyring, * allocate a keyring and link into the destination keyring */ struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, - struct task_struct *ctx, unsigned long flags, - struct key *dest) + int not_in_quota, struct key *dest) { struct key *keyring; int ret; keyring = key_alloc(&key_type_keyring, description, - uid, gid, ctx, + uid, gid, (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL, - flags); + not_in_quota); if (!IS_ERR(keyring)) { ret = key_instantiate_and_link(keyring, NULL, 0, dest, NULL); @@ -955,22 +952,3 @@ int keyring_clear(struct key *keyring) } /* end keyring_clear() */ EXPORT_SYMBOL(keyring_clear); - -/*****************************************************************************/ -/* - * dispose of the links from a revoked keyring - * - called with the key sem write-locked - */ -static void keyring_revoke(struct key *keyring) -{ - struct keyring_list *klist = keyring->payload.subscriptions; - - /* adjust the quota */ - key_payload_reserve(keyring, 0); - - if (klist) { - rcu_assign_pointer(keyring->payload.subscriptions, NULL); - call_rcu(&klist->rcu, keyring_clear_rcu_disposal); - } - -} /* end keyring_revoke() */ diff --git a/security/keys/proc.c b/security/keys/proc.c index 686a9ee0c..12b750e51 100644 --- a/security/keys/proc.c +++ b/security/keys/proc.c @@ -137,13 +137,6 @@ static int proc_keys_show(struct seq_file *m, void *v) struct timespec now; unsigned long timo; char xbuf[12]; - int rc; - - /* check whether the current task is allowed to view the key (assuming - * non-possession) */ - rc = key_task_permission(make_key_ref(key, 0), current, KEY_VIEW); - if (rc < 0) - return 0; now = current_kernel_time(); diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 32150cf7c..217a0bef3 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -67,8 +67,7 @@ struct key root_session_keyring = { /* * allocate the keyrings to be associated with a UID */ -int alloc_uid_keyring(struct user_struct *user, - struct task_struct *ctx) +int alloc_uid_keyring(struct user_struct *user) { struct key *uid_keyring, *session_keyring; char buf[20]; @@ -77,8 +76,7 @@ int alloc_uid_keyring(struct user_struct *user, /* concoct a default session keyring */ sprintf(buf, "_uid_ses.%u", user->uid); - session_keyring = keyring_alloc(buf, user->uid, (gid_t) -1, ctx, - KEY_ALLOC_IN_QUOTA, NULL); + session_keyring = keyring_alloc(buf, user->uid, (gid_t) -1, 0, NULL); if (IS_ERR(session_keyring)) { ret = PTR_ERR(session_keyring); goto error; @@ -88,8 +86,8 @@ int alloc_uid_keyring(struct user_struct *user, * keyring */ sprintf(buf, "_uid.%u", user->uid); - uid_keyring = keyring_alloc(buf, user->uid, (gid_t) -1, ctx, - KEY_ALLOC_IN_QUOTA, session_keyring); + uid_keyring = keyring_alloc(buf, user->uid, (gid_t) -1, 0, + session_keyring); if (IS_ERR(uid_keyring)) { key_put(session_keyring); ret = PTR_ERR(uid_keyring); @@ -145,8 +143,7 @@ int install_thread_keyring(struct task_struct *tsk) sprintf(buf, "_tid.%u", tsk->pid); - keyring = keyring_alloc(buf, tsk->uid, tsk->gid, tsk, - KEY_ALLOC_QUOTA_OVERRUN, NULL); + keyring = keyring_alloc(buf, tsk->uid, tsk->gid, 1, NULL); if (IS_ERR(keyring)) { ret = PTR_ERR(keyring); goto error; @@ -180,8 +177,7 @@ int install_process_keyring(struct task_struct *tsk) if (!tsk->signal->process_keyring) { sprintf(buf, "_pid.%u", tsk->tgid); - keyring = keyring_alloc(buf, tsk->uid, tsk->gid, tsk, - KEY_ALLOC_QUOTA_OVERRUN, NULL); + keyring = keyring_alloc(buf, tsk->uid, tsk->gid, 1, NULL); if (IS_ERR(keyring)) { ret = PTR_ERR(keyring); goto error; @@ -212,7 +208,6 @@ error: static int install_session_keyring(struct task_struct *tsk, struct key *keyring) { - unsigned long flags; struct key *old; char buf[20]; @@ -222,12 +217,7 @@ static int install_session_keyring(struct task_struct *tsk, if (!keyring) { sprintf(buf, "_ses.%u", tsk->tgid); - flags = KEY_ALLOC_QUOTA_OVERRUN; - if (tsk->signal->session_keyring) - flags = KEY_ALLOC_IN_QUOTA; - - keyring = keyring_alloc(buf, tsk->uid, tsk->gid, tsk, - flags, NULL); + keyring = keyring_alloc(buf, tsk->uid, tsk->gid, 1, NULL); if (IS_ERR(keyring)) return PTR_ERR(keyring); } @@ -400,8 +390,6 @@ key_ref_t search_process_keyrings(struct key_type *type, struct request_key_auth *rka; key_ref_t key_ref, ret, err; - might_sleep(); - /* we want to return -EAGAIN or -ENOKEY if any of the keyrings were * searchable, but we failed to find a key or we found a negative key; * otherwise we want to return a sample error (probably -EACCES) if @@ -507,35 +495,27 @@ key_ref_t search_process_keyrings(struct key_type *type, */ if (context->request_key_auth && context == current && - type != &key_type_request_key_auth + type != &key_type_request_key_auth && + key_validate(context->request_key_auth) == 0 ) { - /* defend against the auth key being revoked */ - down_read(&context->request_key_auth->sem); - - if (key_validate(context->request_key_auth) == 0) { - rka = context->request_key_auth->payload.data; - - key_ref = search_process_keyrings(type, description, - match, rka->context); + rka = context->request_key_auth->payload.data; - up_read(&context->request_key_auth->sem); + key_ref = search_process_keyrings(type, description, match, + rka->context); - if (!IS_ERR(key_ref)) - goto found; + if (!IS_ERR(key_ref)) + goto found; - switch (PTR_ERR(key_ref)) { - case -EAGAIN: /* no key */ - if (ret) - break; - case -ENOKEY: /* negative key */ - ret = key_ref; - break; - default: - err = key_ref; + switch (PTR_ERR(key_ref)) { + case -EAGAIN: /* no key */ + if (ret) break; - } - } else { - up_read(&context->request_key_auth->sem); + case -ENOKEY: /* negative key */ + ret = key_ref; + break; + default: + err = key_ref; + break; } } @@ -737,8 +717,7 @@ long join_session_keyring(const char *name) keyring = find_keyring_by_name(name, 0); if (PTR_ERR(keyring) == -ENOKEY) { /* not found - try and create a new one */ - keyring = keyring_alloc(name, tsk->uid, tsk->gid, tsk, - KEY_ALLOC_IN_QUOTA, NULL); + keyring = keyring_alloc(name, tsk->uid, tsk->gid, 0, NULL); if (IS_ERR(keyring)) { ret = PTR_ERR(keyring); goto error2; diff --git a/security/keys/request_key.c b/security/keys/request_key.c index f573ac189..f030a0ccb 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c @@ -1,6 +1,6 @@ /* request_key.c: request a key from userspace * - * Copyright (C) 2004-6 Red Hat, Inc. All Rights Reserved. + * Copyright (C) 2004-5 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * * This program is free software; you can redistribute it and/or @@ -33,8 +33,7 @@ DECLARE_WAIT_QUEUE_HEAD(request_key_conswq); */ static int call_sbin_request_key(struct key *key, struct key *authkey, - const char *op, - void *aux) + const char *op) { struct task_struct *tsk = current; key_serial_t prkey, sskey; @@ -49,8 +48,7 @@ static int call_sbin_request_key(struct key *key, /* allocate a new session keyring */ sprintf(desc, "_req.%u", key->serial); - keyring = keyring_alloc(desc, current->fsuid, current->fsgid, current, - KEY_ALLOC_QUOTA_OVERRUN, NULL); + keyring = keyring_alloc(desc, current->fsuid, current->fsgid, 1, NULL); if (IS_ERR(keyring)) { ret = PTR_ERR(keyring); goto error_alloc; @@ -127,9 +125,7 @@ error_alloc: */ static struct key *__request_key_construction(struct key_type *type, const char *description, - const char *callout_info, - void *aux, - unsigned long flags) + const char *callout_info) { request_key_actor_t actor; struct key_construction cons; @@ -137,12 +133,11 @@ static struct key *__request_key_construction(struct key_type *type, struct key *key, *authkey; int ret, negated; - kenter("%s,%s,%s,%lx", type->name, description, callout_info, flags); + kenter("%s,%s,%s", type->name, description, callout_info); /* create a key and add it to the queue */ key = key_alloc(type, description, - current->fsuid, current->fsgid, current, KEY_POS_ALL, - flags); + current->fsuid, current->fsgid, KEY_POS_ALL, 0); if (IS_ERR(key)) goto alloc_failed; @@ -166,7 +161,7 @@ static struct key *__request_key_construction(struct key_type *type, actor = call_sbin_request_key; if (type->request_key) actor = type->request_key; - ret = actor(key, authkey, "create", aux); + ret = actor(key, authkey, "create"); if (ret < 0) goto request_failed; @@ -260,18 +255,16 @@ alloc_failed: */ static struct key *request_key_construction(struct key_type *type, const char *description, - const char *callout_info, - void *aux, struct key_user *user, - unsigned long flags) + const char *callout_info) { struct key_construction *pcons; struct key *key, *ckey; DECLARE_WAITQUEUE(myself, current); - kenter("%s,%s,{%d},%s,%lx", - type->name, description, user->uid, callout_info, flags); + kenter("%s,%s,{%d},%s", + type->name, description, user->uid, callout_info); /* see if there's such a key under construction already */ down_write(&key_construction_sem); @@ -287,8 +280,7 @@ static struct key *request_key_construction(struct key_type *type, } /* see about getting userspace to construct the key */ - key = __request_key_construction(type, description, callout_info, aux, - flags); + key = __request_key_construction(type, description, callout_info); error: kleave(" = %p", key); return key; @@ -395,17 +387,14 @@ static void request_key_link(struct key *key, struct key *dest_keyring) struct key *request_key_and_link(struct key_type *type, const char *description, const char *callout_info, - void *aux, - struct key *dest_keyring, - unsigned long flags) + struct key *dest_keyring) { struct key_user *user; struct key *key; key_ref_t key_ref; - kenter("%s,%s,%s,%p,%p,%lx", - type->name, description, callout_info, aux, - dest_keyring, flags); + kenter("%s,%s,%s,%p", + type->name, description, callout_info, dest_keyring); /* search all the process keyrings for a key */ key_ref = search_process_keyrings(type, description, type->match, @@ -438,8 +427,7 @@ struct key *request_key_and_link(struct key_type *type, /* ask userspace (returns NULL if it waited on a key * being constructed) */ key = request_key_construction(type, description, - callout_info, aux, - user, flags); + user, callout_info); if (key) break; @@ -495,28 +483,8 @@ struct key *request_key(struct key_type *type, const char *description, const char *callout_info) { - return request_key_and_link(type, description, callout_info, NULL, - NULL, KEY_ALLOC_IN_QUOTA); + return request_key_and_link(type, description, callout_info, NULL); } /* end request_key() */ EXPORT_SYMBOL(request_key); - -/*****************************************************************************/ -/* - * request a key with auxiliary data for the upcaller - * - search the process's keyrings - * - check the list of keys being created or updated - * - call out to userspace for a key if supplementary info was provided - */ -struct key *request_key_with_auxdata(struct key_type *type, - const char *description, - const char *callout_info, - void *aux) -{ - return request_key_and_link(type, description, callout_info, aux, - NULL, KEY_ALLOC_IN_QUOTA); - -} /* end request_key_with_auxdata() */ - -EXPORT_SYMBOL(request_key_with_auxdata); diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c index cbf58a91b..cce6ba6b0 100644 --- a/security/keys/request_key_auth.c +++ b/security/keys/request_key_auth.c @@ -20,7 +20,6 @@ static int request_key_auth_instantiate(struct key *, const void *, size_t); static void request_key_auth_describe(const struct key *, struct seq_file *); -static void request_key_auth_revoke(struct key *); static void request_key_auth_destroy(struct key *); static long request_key_auth_read(const struct key *, char __user *, size_t); @@ -32,7 +31,6 @@ struct key_type key_type_request_key_auth = { .def_datalen = sizeof(struct request_key_auth), .instantiate = request_key_auth_instantiate, .describe = request_key_auth_describe, - .revoke = request_key_auth_revoke, .destroy = request_key_auth_destroy, .read = request_key_auth_read, }; @@ -93,24 +91,6 @@ static long request_key_auth_read(const struct key *key, } /* end request_key_auth_read() */ -/*****************************************************************************/ -/* - * handle revocation of an authorisation token key - * - called with the key sem write-locked - */ -static void request_key_auth_revoke(struct key *key) -{ - struct request_key_auth *rka = key->payload.data; - - kenter("{%d}", key->serial); - - if (rka->context) { - put_task_struct(rka->context); - rka->context = NULL; - } - -} /* end request_key_auth_revoke() */ - /*****************************************************************************/ /* * destroy an instantiation authorisation token key @@ -121,11 +101,6 @@ static void request_key_auth_destroy(struct key *key) kenter("{%d}", key->serial); - if (rka->context) { - put_task_struct(rka->context); - rka->context = NULL; - } - key_put(rka->target_key); kfree(rka); @@ -156,26 +131,14 @@ struct key *request_key_auth_new(struct key *target, const char *callout_info) * another process */ if (current->request_key_auth) { /* it is - use that instantiation context here too */ - down_read(¤t->request_key_auth->sem); - - /* if the auth key has been revoked, then the key we're - * servicing is already instantiated */ - if (test_bit(KEY_FLAG_REVOKED, - ¤t->request_key_auth->flags)) - goto auth_key_revoked; - irka = current->request_key_auth->payload.data; rka->context = irka->context; rka->pid = irka->pid; - get_task_struct(rka->context); - - up_read(¤t->request_key_auth->sem); } else { /* it isn't - use this process as the context */ rka->context = current; rka->pid = current->pid; - get_task_struct(rka->context); } rka->target_key = key_get(target); @@ -185,9 +148,9 @@ struct key *request_key_auth_new(struct key *target, const char *callout_info) sprintf(desc, "%x", target->serial); authkey = key_alloc(&key_type_request_key_auth, desc, - current->fsuid, current->fsgid, current, + current->fsuid, current->fsgid, KEY_POS_VIEW | KEY_POS_READ | KEY_POS_SEARCH | - KEY_USR_VIEW, KEY_ALLOC_NOT_IN_QUOTA); + KEY_USR_VIEW, 1); if (IS_ERR(authkey)) { ret = PTR_ERR(authkey); goto error_alloc; @@ -198,15 +161,9 @@ struct key *request_key_auth_new(struct key *target, const char *callout_info) if (ret < 0) goto error_inst; - kleave(" = {%d}", authkey->serial); + kleave(" = {%d})", authkey->serial); return authkey; -auth_key_revoked: - up_read(¤t->request_key_auth->sem); - kfree(rka); - kleave("= -EKEYREVOKED"); - return ERR_PTR(-EKEYREVOKED); - error_inst: key_revoke(authkey); key_put(authkey); diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 5bbfdebb7..8e71895b9 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c @@ -28,7 +28,6 @@ struct key_type key_type_user = { .instantiate = user_instantiate, .update = user_update, .match = user_match, - .revoke = user_revoke, .destroy = user_destroy, .describe = user_describe, .read = user_read, @@ -68,7 +67,6 @@ error: return ret; } /* end user_instantiate() */ - EXPORT_SYMBOL_GPL(user_instantiate); /*****************************************************************************/ @@ -143,28 +141,7 @@ EXPORT_SYMBOL_GPL(user_match); /*****************************************************************************/ /* - * dispose of the links from a revoked keyring - * - called with the key sem write-locked - */ -void user_revoke(struct key *key) -{ - struct user_key_payload *upayload = key->payload.data; - - /* clear the quota */ - key_payload_reserve(key, 0); - - if (upayload) { - rcu_assign_pointer(key->payload.data, NULL); - call_rcu(&upayload->rcu, user_update_rcu_disposal); - } - -} /* end user_revoke() */ - -EXPORT_SYMBOL(user_revoke); - -/*****************************************************************************/ -/* - * dispose of the data dangling from the corpse of a user key + * dispose of the data dangling from the corpse of a user */ void user_destroy(struct key *key) { diff --git a/security/root_plug.c b/security/root_plug.c index 38dd4f3e6..07651def2 100644 --- a/security/root_plug.c +++ b/security/root_plug.c @@ -22,6 +22,7 @@ * License. */ +#include #include #include #include diff --git a/security/seclvl.c b/security/seclvl.c index d5371b8da..441beaf1b 100644 --- a/security/seclvl.c +++ b/security/seclvl.c @@ -16,6 +16,7 @@ * (at your option) any later version. */ +#include #include #include #include @@ -370,8 +371,6 @@ static int seclvl_settime(struct timespec *tv, struct timezone *tz) current->group_leader->pid); return -EPERM; } /* if attempt to decrement time */ - if (tv->tv_sec > 1924988400) /* disallow dates after 2030) */ - return -EPERM; /* CVE-2005-4352 */ } /* if seclvl > 1 */ return 0; } diff --git a/security/security.c b/security/security.c index ee4e0701b..51ef50971 100644 --- a/security/security.c +++ b/security/security.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig index 4e98f66b3..f636f53ca 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig @@ -1,7 +1,6 @@ config SECURITY_SELINUX bool "NSA SELinux Support" depends on SECURITY_NETWORK && AUDIT && NET && INET - select NETWORK_SECMARK default n help This selects NSA Security-Enhanced Linux (SELinux). @@ -96,64 +95,3 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE via /selinux/checkreqprot if authorized by policy. If you are unsure how to answer this question, answer 1. - -config SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT - bool "NSA SELinux enable new secmark network controls by default" - depends on SECURITY_SELINUX - default n - help - This option determines whether the new secmark-based network - controls will be enabled by default. If not, the old internal - per-packet controls will be enabled by default, preserving - old behavior. - - If you enable the new controls, you will need updated - SELinux userspace libraries, tools and policy. Typically, - your distribution will provide these and enable the new controls - in the kernel they also distribute. - - Note that this option can be overriden at boot with the - selinux_compat_net parameter, and after boot via - /selinux/compat_net. See Documentation/kernel-parameters.txt - for details on this parameter. - - If you enable the new network controls, you will likely - also require the SECMARK and CONNSECMARK targets, as - well as any conntrack helpers for protocols which you - wish to control. - - If you are unsure what do do here, select N. - -config SECURITY_SELINUX_POLICYDB_VERSION_MAX - bool "NSA SELinux maximum supported policy format version" - depends on SECURITY_SELINUX - default n - help - This option enables the maximum policy format version supported - by SELinux to be set to a particular value. This value is reported - to userspace via /selinux/policyvers and used at policy load time. - It can be adjusted downward to support legacy userland (init) that - does not correctly handle kernels that support newer policy versions. - - Examples: For FC3 or FC4, enable this option and set the value via - the next option. For FC5 and later, do not enable this option. - - If you are unsure how to answer this question, answer N. - -config SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE - int "NSA SELinux maximum supported policy format version value" - depends on SECURITY_SELINUX_POLICYDB_VERSION_MAX - range 15 21 - default 19 - help - This option sets the value for the maximum policy format version - supported by SELinux. - - Examples: For FC3, use 18. For FC4, use 19. - - If you are unsure how to answer this question, look for the - policy format version supported by your policy toolchain, by - running 'checkpolicy -V'. Or look at what policy you have - installed under /etc/selinux/$SELINUXTYPE/policy, where - SELINUXTYPE is defined in your /etc/selinux/config. - diff --git a/security/selinux/exports.c b/security/selinux/exports.c index 9d7737db5..ae4c73eb3 100644 --- a/security/selinux/exports.c +++ b/security/selinux/exports.c @@ -72,25 +72,3 @@ void selinux_get_task_sid(struct task_struct *tsk, u32 *sid) *sid = 0; } -int selinux_string_to_sid(char *str, u32 *sid) -{ - if (selinux_enabled) - return security_context_to_sid(str, strlen(str), sid); - else { - *sid = 0; - return 0; - } -} -EXPORT_SYMBOL_GPL(selinux_string_to_sid); - -int selinux_relabel_packet_permission(u32 sid) -{ - if (selinux_enabled) { - struct task_security_struct *tsec = current->security; - - return avc_has_perm(tsec->sid, sid, SECCLASS_PACKET, - PACKET__RELABELTO, NULL); - } - return 0; -} -EXPORT_SYMBOL_GPL(selinux_relabel_packet_permission); diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 0b32f3020..9fcb30dab 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -18,6 +18,7 @@ * as published by the Free Software Foundation. */ +#include #include #include #include @@ -68,7 +69,6 @@ #include #include #include -#include #include "avc.h" #include "objsec.h" @@ -80,7 +80,6 @@ extern unsigned int policydb_loaded_version; extern int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm); -extern int selinux_compat_net; #ifdef CONFIG_SECURITY_SELINUX_DEVELOP int selinux_enforcing = 0; @@ -246,7 +245,6 @@ static int superblock_alloc_security(struct super_block *sb) sbsec->sb = sb; sbsec->sid = SECINITSID_UNLABELED; sbsec->def_sid = SECINITSID_FILE; - sbsec->mntpoint_sid = SECINITSID_UNLABELED; sb->s_security = sbsec; return 0; @@ -320,53 +318,19 @@ enum { Opt_context = 1, Opt_fscontext = 2, Opt_defcontext = 4, - Opt_rootcontext = 8, }; static match_table_t tokens = { {Opt_context, "context=%s"}, {Opt_fscontext, "fscontext=%s"}, {Opt_defcontext, "defcontext=%s"}, - {Opt_rootcontext, "rootcontext=%s"}, }; #define SEL_MOUNT_FAIL_MSG "SELinux: duplicate or incompatible mount options\n" -static int may_context_mount_sb_relabel(u32 sid, - struct superblock_security_struct *sbsec, - struct task_security_struct *tsec) -{ - int rc; - - rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, - FILESYSTEM__RELABELFROM, NULL); - if (rc) - return rc; - - rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM, - FILESYSTEM__RELABELTO, NULL); - return rc; -} - -static int may_context_mount_inode_relabel(u32 sid, - struct superblock_security_struct *sbsec, - struct task_security_struct *tsec) -{ - int rc; - rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, - FILESYSTEM__RELABELFROM, NULL); - if (rc) - return rc; - - rc = avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM, - FILESYSTEM__ASSOCIATE, NULL); - return rc; -} - static int try_context_mount(struct super_block *sb, void *data) { char *context = NULL, *defcontext = NULL; - char *fscontext = NULL, *rootcontext = NULL; const char *name; u32 sid; int alloc = 0, rc = 0, seen = 0; @@ -409,7 +373,7 @@ static int try_context_mount(struct super_block *sb, void *data) switch (token) { case Opt_context: - if (seen & (Opt_context|Opt_defcontext)) { + if (seen) { rc = -EINVAL; printk(KERN_WARNING SEL_MOUNT_FAIL_MSG); goto out_free; @@ -425,13 +389,13 @@ static int try_context_mount(struct super_block *sb, void *data) break; case Opt_fscontext: - if (seen & Opt_fscontext) { + if (seen & (Opt_context|Opt_fscontext)) { rc = -EINVAL; printk(KERN_WARNING SEL_MOUNT_FAIL_MSG); goto out_free; } - fscontext = match_strdup(&args[0]); - if (!fscontext) { + context = match_strdup(&args[0]); + if (!context) { rc = -ENOMEM; goto out_free; } @@ -440,22 +404,6 @@ static int try_context_mount(struct super_block *sb, void *data) seen |= Opt_fscontext; break; - case Opt_rootcontext: - if (seen & Opt_rootcontext) { - rc = -EINVAL; - printk(KERN_WARNING SEL_MOUNT_FAIL_MSG); - goto out_free; - } - rootcontext = match_strdup(&args[0]); - if (!rootcontext) { - rc = -ENOMEM; - goto out_free; - } - if (!alloc) - alloc = 1; - seen |= Opt_rootcontext; - break; - case Opt_defcontext: if (sbsec->behavior != SECURITY_FS_USE_XATTR) { rc = -EINVAL; @@ -492,28 +440,6 @@ static int try_context_mount(struct super_block *sb, void *data) if (!seen) goto out; - /* sets the context of the superblock for the fs being mounted. */ - if (fscontext) { - rc = security_context_to_sid(fscontext, strlen(fscontext), &sid); - if (rc) { - printk(KERN_WARNING "SELinux: security_context_to_sid" - "(%s) failed for (dev %s, type %s) errno=%d\n", - fscontext, sb->s_id, name, rc); - goto out_free; - } - - rc = may_context_mount_sb_relabel(sid, sbsec, tsec); - if (rc) - goto out_free; - - sbsec->sid = sid; - } - - /* - * Switch to using mount point labeling behavior. - * sets the label used on all file below the mountpoint, and will set - * the superblock context if not already set. - */ if (context) { rc = security_context_to_sid(context, strlen(context), &sid); if (rc) { @@ -523,38 +449,20 @@ static int try_context_mount(struct super_block *sb, void *data) goto out_free; } - if (!fscontext) { - rc = may_context_mount_sb_relabel(sid, sbsec, tsec); - if (rc) - goto out_free; - sbsec->sid = sid; - } else { - rc = may_context_mount_inode_relabel(sid, sbsec, tsec); - if (rc) - goto out_free; - } - sbsec->mntpoint_sid = sid; - - sbsec->behavior = SECURITY_FS_USE_MNTPOINT; - } - - if (rootcontext) { - struct inode *inode = sb->s_root->d_inode; - struct inode_security_struct *isec = inode->i_security; - rc = security_context_to_sid(rootcontext, strlen(rootcontext), &sid); - if (rc) { - printk(KERN_WARNING "SELinux: security_context_to_sid" - "(%s) failed for (dev %s, type %s) errno=%d\n", - rootcontext, sb->s_id, name, rc); + rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, + FILESYSTEM__RELABELFROM, NULL); + if (rc) goto out_free; - } - rc = may_context_mount_inode_relabel(sid, sbsec, tsec); + rc = avc_has_perm(tsec->sid, sid, SECCLASS_FILESYSTEM, + FILESYSTEM__RELABELTO, NULL); if (rc) goto out_free; - isec->sid = sid; - isec->initialized = 1; + sbsec->sid = sid; + + if (seen & Opt_context) + sbsec->behavior = SECURITY_FS_USE_MNTPOINT; } if (defcontext) { @@ -569,7 +477,13 @@ static int try_context_mount(struct super_block *sb, void *data) if (sid == sbsec->def_sid) goto out_free; - rc = may_context_mount_inode_relabel(sid, sbsec, tsec); + rc = avc_has_perm(tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, + FILESYSTEM__RELABELFROM, NULL); + if (rc) + goto out_free; + + rc = avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM, + FILESYSTEM__ASSOCIATE, NULL); if (rc) goto out_free; @@ -580,8 +494,6 @@ out_free: if (alloc) { kfree(context); kfree(defcontext); - kfree(fscontext); - kfree(rootcontext); } out: return rc; @@ -784,8 +696,6 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc return SECCLASS_PACKET_SOCKET; case PF_KEY: return SECCLASS_KEY_SOCKET; - case PF_APPLETALK: - return SECCLASS_APPLETALK_SOCKET; } return SECCLASS_SOCKET; @@ -963,11 +873,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent goto out; isec->sid = sid; break; - case SECURITY_FS_USE_MNTPOINT: - isec->sid = sbsec->mntpoint_sid; - break; default: - /* Default to the fs superblock SID. */ + /* Default to the fs SID. */ isec->sid = sbsec->sid; if (sbsec->proc) { @@ -1189,17 +1096,6 @@ static int may_create(struct inode *dir, FILESYSTEM__ASSOCIATE, &ad); } -/* Check whether a task can create a key. */ -static int may_create_key(u32 ksid, - struct task_struct *ctx) -{ - struct task_security_struct *tsec; - - tsec = ctx->security; - - return avc_has_perm(tsec->sid, ksid, SECCLASS_KEY, KEY__CREATE, NULL); -} - #define MAY_LINK 0 #define MAY_UNLINK 1 #define MAY_RMDIR 2 @@ -1622,10 +1518,8 @@ static int selinux_bprm_set_security(struct linux_binprm *bprm) /* Default to the current task SID. */ bsec->sid = tsec->sid; - /* Reset fs, key, and sock SIDs on execve. */ + /* Reset create SID on execve. */ tsec->create_sid = 0; - tsec->keycreate_sid = 0; - tsec->sockcreate_sid = 0; if (tsec->exec_sid) { newsid = tsec->exec_sid; @@ -1711,13 +1605,10 @@ static inline void flush_unauthorized_files(struct files_struct * files) { struct avc_audit_data ad; struct file *file, *devnull = NULL; - struct tty_struct *tty; + struct tty_struct *tty = current->signal->tty; struct fdtable *fdt; long j = -1; - int drop_tty = 0; - mutex_lock(&tty_mutex); - tty = get_current_tty(); if (tty) { file_list_lock(); file = list_entry(tty->tty_files.next, typeof(*file), f_u.fu_list); @@ -1730,16 +1621,13 @@ static inline void flush_unauthorized_files(struct files_struct * files) struct inode *inode = file->f_dentry->d_inode; if (inode_has_perm(current, inode, FILE__READ | FILE__WRITE, NULL)) { - drop_tty = 1; + /* Reset controlling tty. */ + current->signal->tty = NULL; + current->signal->tty_old_pgrp = 0; } } file_list_unlock(); - - /* Reset controlling tty. */ - if (drop_tty) - proc_set_tty(current, NULL); } - mutex_unlock(&tty_mutex); /* Revalidate access to inherited open files. */ @@ -1939,8 +1827,7 @@ static inline int selinux_option(char *option, int len) { return (match_prefix("context=", sizeof("context=")-1, option, len) || match_prefix("fscontext=", sizeof("fscontext=")-1, option, len) || - match_prefix("defcontext=", sizeof("defcontext=")-1, option, len) || - match_prefix("rootcontext=", sizeof("rootcontext=")-1, option, len)); + match_prefix("defcontext=", sizeof("defcontext=")-1, option, len)); } static inline void take_option(char **to, char *from, int *first, int len) @@ -2013,13 +1900,13 @@ static int selinux_sb_kern_mount(struct super_block *sb, void *data) return superblock_has_perm(current, sb, FILESYSTEM__MOUNT, &ad); } -static int selinux_sb_statfs(struct dentry *dentry) +static int selinux_sb_statfs(struct super_block *sb) { struct avc_audit_data ad; AVC_AUDIT_DATA_INIT(&ad,FS); - ad.u.fs.dentry = dentry->d_sb->s_root; - return superblock_has_perm(current, dentry->d_sb, FILESYSTEM__GETATTR, &ad); + ad.u.fs.dentry = sb->s_root; + return superblock_has_perm(current, sb, FILESYSTEM__GETATTR, &ad); } static int selinux_mount(char * dev_name, @@ -2680,11 +2567,9 @@ static int selinux_task_alloc_security(struct task_struct *tsk) tsec2->osid = tsec1->osid; tsec2->sid = tsec1->sid; - /* Retain the exec, fs, key, and sock SIDs across fork */ + /* Retain the exec and create SIDs across fork */ tsec2->exec_sid = tsec1->exec_sid; tsec2->create_sid = tsec1->create_sid; - tsec2->keycreate_sid = tsec1->keycreate_sid; - tsec2->sockcreate_sid = tsec1->sockcreate_sid; /* Retain ptracer SID across fork, if any. This will be reset by the ptrace hook upon any @@ -2736,11 +2621,6 @@ static int selinux_task_getsid(struct task_struct *p) return task_has_perm(current, p, PROCESS__GETSESSION); } -static void selinux_task_getsecid(struct task_struct *p, u32 *secid) -{ - selinux_get_task_sid(p, secid); -} - static int selinux_task_setgroups(struct group_info *group_info) { /* See the comment for setuid above. */ @@ -2758,16 +2638,6 @@ static int selinux_task_setnice(struct task_struct *p, int nice) return task_has_perm(current,p, PROCESS__SETSCHED); } -static int selinux_task_setioprio(struct task_struct *p, int ioprio) -{ - return task_has_perm(current, p, PROCESS__SETSCHED); -} - -static int selinux_task_getioprio(struct task_struct *p) -{ - return task_has_perm(current, p, PROCESS__GETSCHED); -} - static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim) { struct rlimit *old_rlim = current->signal->rlim + resource; @@ -2797,19 +2667,12 @@ static int selinux_task_getscheduler(struct task_struct *p) return task_has_perm(current, p, PROCESS__GETSCHED); } -static int selinux_task_movememory(struct task_struct *p) -{ - return task_has_perm(current, p, PROCESS__SETSCHED); -} - -static int selinux_task_kill(struct task_struct *p, struct siginfo *info, - int sig, u32 secid) +static int selinux_task_kill(struct task_struct *p, struct siginfo *info, int sig) { u32 perm; int rc; - struct task_security_struct *tsec; - rc = secondary_ops->task_kill(p, info, sig, secid); + rc = secondary_ops->task_kill(p, info, sig); if (rc) return rc; @@ -2820,12 +2683,8 @@ static int selinux_task_kill(struct task_struct *p, struct siginfo *info, perm = PROCESS__SIGNULL; /* null signal; existence test */ else perm = signal_to_av(sig); - tsec = p->security; - if (secid) - rc = avc_has_perm(secid, tsec->sid, SECCLASS_PROCESS, perm, NULL); - else - rc = task_has_perm(current, p, perm); - return rc; + + return task_has_perm(current, p, perm); } static int selinux_task_prctl(int option, @@ -3050,14 +2909,12 @@ static int selinux_socket_create(int family, int type, { int err = 0; struct task_security_struct *tsec; - u32 newsid; if (kern) goto out; tsec = current->security; - newsid = tsec->sockcreate_sid ? : tsec->sid; - err = avc_has_perm(tsec->sid, newsid, + err = avc_has_perm(tsec->sid, tsec->sid, socket_type_to_security_class(family, type, protocol), SOCKET__CREATE, NULL); @@ -3070,14 +2927,12 @@ static void selinux_socket_post_create(struct socket *sock, int family, { struct inode_security_struct *isec; struct task_security_struct *tsec; - u32 newsid; isec = SOCK_INODE(sock)->i_security; tsec = current->security; - newsid = tsec->sockcreate_sid ? : tsec->sid; isec->sclass = socket_type_to_security_class(family, type, protocol); - isec->sid = kern ? SECINITSID_KERNEL : newsid; + isec->sid = kern ? SECINITSID_KERNEL : tsec->sid; isec->initialized = 1; return; @@ -3355,17 +3210,47 @@ static int selinux_socket_unix_may_send(struct socket *sock, return 0; } -static int selinux_sock_rcv_skb_compat(struct sock *sk, struct sk_buff *skb, - struct avc_audit_data *ad, u32 sock_sid, u16 sock_class, - u16 family, char *addrp, int len) +static int selinux_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) { - int err = 0; + u16 family; + char *addrp; + int len, err = 0; u32 netif_perm, node_perm, node_sid, if_sid, recv_perm = 0; + u32 sock_sid = 0; + u16 sock_class = 0; + struct socket *sock; + struct net_device *dev; + struct avc_audit_data ad; - if (!skb->dev) + family = sk->sk_family; + if (family != PF_INET && family != PF_INET6) goto out; - err = sel_netif_sids(skb->dev, &if_sid, NULL); + /* Handle mapped IPv4 packets arriving via IPv6 sockets */ + if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP)) + family = PF_INET; + + read_lock_bh(&sk->sk_callback_lock); + sock = sk->sk_socket; + if (sock) { + struct inode *inode; + inode = SOCK_INODE(sock); + if (inode) { + struct inode_security_struct *isec; + isec = inode->i_security; + sock_sid = isec->sid; + sock_class = isec->sclass; + } + } + read_unlock_bh(&sk->sk_callback_lock); + if (!sock_sid) + goto out; + + dev = skb->dev; + if (!dev) + goto out; + + err = sel_netif_sids(dev, &if_sid, NULL); if (err) goto out; @@ -3388,88 +3273,44 @@ static int selinux_sock_rcv_skb_compat(struct sock *sk, struct sk_buff *skb, break; } - err = avc_has_perm(sock_sid, if_sid, SECCLASS_NETIF, netif_perm, ad); + AVC_AUDIT_DATA_INIT(&ad, NET); + ad.u.net.netif = dev->name; + ad.u.net.family = family; + + err = selinux_parse_skb(skb, &ad, &addrp, &len, 1); + if (err) + goto out; + + err = avc_has_perm(sock_sid, if_sid, SECCLASS_NETIF, netif_perm, &ad); if (err) goto out; + /* Fixme: this lookup is inefficient */ err = security_node_sid(family, addrp, len, &node_sid); if (err) goto out; - err = avc_has_perm(sock_sid, node_sid, SECCLASS_NODE, node_perm, ad); + err = avc_has_perm(sock_sid, node_sid, SECCLASS_NODE, node_perm, &ad); if (err) goto out; if (recv_perm) { u32 port_sid; + /* Fixme: make this more efficient */ err = security_port_sid(sk->sk_family, sk->sk_type, - sk->sk_protocol, ntohs(ad->u.net.sport), + sk->sk_protocol, ntohs(ad.u.net.sport), &port_sid); if (err) goto out; err = avc_has_perm(sock_sid, port_sid, - sock_class, recv_perm, ad); + sock_class, recv_perm, &ad); } -out: - return err; -} - -static int selinux_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) -{ - u16 family; - u16 sock_class = 0; - char *addrp; - int len, err = 0; - u32 sock_sid = 0; - struct socket *sock; - struct avc_audit_data ad; - - family = sk->sk_family; - if (family != PF_INET && family != PF_INET6) - goto out; - - /* Handle mapped IPv4 packets arriving via IPv6 sockets */ - if (family == PF_INET6 && skb->protocol == ntohs(ETH_P_IP)) - family = PF_INET; - - read_lock_bh(&sk->sk_callback_lock); - sock = sk->sk_socket; - if (sock) { - struct inode *inode; - inode = SOCK_INODE(sock); - if (inode) { - struct inode_security_struct *isec; - isec = inode->i_security; - sock_sid = isec->sid; - sock_class = isec->sclass; - } - } - read_unlock_bh(&sk->sk_callback_lock); - if (!sock_sid) - goto out; - - AVC_AUDIT_DATA_INIT(&ad, NET); - ad.u.net.netif = skb->dev ? skb->dev->name : "[unknown]"; - ad.u.net.family = family; + if (!err) + err = selinux_xfrm_sock_rcv_skb(sock_sid, skb); - err = selinux_parse_skb(skb, &ad, &addrp, &len, 1); - if (err) - goto out; - - if (selinux_compat_net) - err = selinux_sock_rcv_skb_compat(sk, skb, &ad, sock_sid, - sock_class, family, - addrp, len); - else - err = avc_has_perm(sock_sid, skb->secmark, SECCLASS_PACKET, - PACKET__RECV, &ad); - if (err) - goto out; - - err = selinux_xfrm_sock_rcv_skb(sock_sid, skb); out: return err; } @@ -3526,23 +3367,23 @@ out: return err; } -static int selinux_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) +static int selinux_socket_getpeersec_dgram(struct sk_buff *skb, char **secdata, u32 *seclen) { - u32 peer_secid = SECSID_NULL; int err = 0; + u32 peer_sid = selinux_socket_getpeer_dgram(skb); - if (sock && (sock->sk->sk_family == PF_UNIX)) - selinux_get_inode_sid(SOCK_INODE(sock), &peer_secid); - else if (skb) - peer_secid = selinux_socket_getpeer_dgram(skb); + if (peer_sid == SECSID_NULL) + return -EINVAL; - if (peer_secid == SECSID_NULL) - err = -EINVAL; - *secid = peer_secid; + err = security_sid_to_context(peer_sid, secdata, seclen); + if (err) + return err; - return err; + return 0; } + + static int selinux_sk_alloc_security(struct sock *sk, int family, gfp_t priority) { return sk_alloc_security(sk, family, priority); @@ -3609,18 +3450,42 @@ out: #ifdef CONFIG_NETFILTER -static int selinux_ip_postroute_last_compat(struct sock *sk, struct net_device *dev, - struct inode_security_struct *isec, - struct avc_audit_data *ad, - u16 family, char *addrp, int len) +static unsigned int selinux_ip_postroute_last(unsigned int hooknum, + struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + int (*okfn)(struct sk_buff *), + u16 family) { - int err; + char *addrp; + int len, err = NF_ACCEPT; u32 netif_perm, node_perm, node_sid, if_sid, send_perm = 0; + struct sock *sk; + struct socket *sock; + struct inode *inode; + struct sk_buff *skb = *pskb; + struct inode_security_struct *isec; + struct avc_audit_data ad; + struct net_device *dev = (struct net_device *)out; + sk = skb->sk; + if (!sk) + goto out; + + sock = sk->sk_socket; + if (!sock) + goto out; + + inode = SOCK_INODE(sock); + if (!inode) + goto out; + err = sel_netif_sids(dev, &if_sid, NULL); if (err) goto out; + isec = inode->i_security; + switch (isec->sclass) { case SECCLASS_UDP_SOCKET: netif_perm = NETIF__UDP_SEND; @@ -3640,88 +3505,55 @@ static int selinux_ip_postroute_last_compat(struct sock *sk, struct net_device * break; } - err = avc_has_perm(isec->sid, if_sid, SECCLASS_NETIF, netif_perm, ad); - if (err) + + AVC_AUDIT_DATA_INIT(&ad, NET); + ad.u.net.netif = dev->name; + ad.u.net.family = family; + + err = selinux_parse_skb(skb, &ad, &addrp, + &len, 0) ? NF_DROP : NF_ACCEPT; + if (err != NF_ACCEPT) + goto out; + + err = avc_has_perm(isec->sid, if_sid, SECCLASS_NETIF, + netif_perm, &ad) ? NF_DROP : NF_ACCEPT; + if (err != NF_ACCEPT) goto out; - err = security_node_sid(family, addrp, len, &node_sid); - if (err) + /* Fixme: this lookup is inefficient */ + err = security_node_sid(family, addrp, len, + &node_sid) ? NF_DROP : NF_ACCEPT; + if (err != NF_ACCEPT) goto out; - err = avc_has_perm(isec->sid, node_sid, SECCLASS_NODE, node_perm, ad); - if (err) + err = avc_has_perm(isec->sid, node_sid, SECCLASS_NODE, + node_perm, &ad) ? NF_DROP : NF_ACCEPT; + if (err != NF_ACCEPT) goto out; if (send_perm) { u32 port_sid; + /* Fixme: make this more efficient */ err = security_port_sid(sk->sk_family, sk->sk_type, sk->sk_protocol, - ntohs(ad->u.net.dport), - &port_sid); - if (err) + ntohs(ad.u.net.dport), + &port_sid) ? NF_DROP : NF_ACCEPT; + if (err != NF_ACCEPT) goto out; err = avc_has_perm(isec->sid, port_sid, isec->sclass, - send_perm, ad); + send_perm, &ad) ? NF_DROP : NF_ACCEPT; } -out: - return err; -} - -static unsigned int selinux_ip_postroute_last(unsigned int hooknum, - struct sk_buff **pskb, - const struct net_device *in, - const struct net_device *out, - int (*okfn)(struct sk_buff *), - u16 family) -{ - char *addrp; - int len, err = 0; - struct sock *sk; - struct socket *sock; - struct inode *inode; - struct sk_buff *skb = *pskb; - struct inode_security_struct *isec; - struct avc_audit_data ad; - struct net_device *dev = (struct net_device *)out; - - sk = skb->sk; - if (!sk) - goto out; - - sock = sk->sk_socket; - if (!sock) - goto out; - - inode = SOCK_INODE(sock); - if (!inode) - goto out; - - isec = inode->i_security; - - AVC_AUDIT_DATA_INIT(&ad, NET); - ad.u.net.netif = dev->name; - ad.u.net.family = family; - err = selinux_parse_skb(skb, &ad, &addrp, &len, 0); - if (err) - goto out; - - if (selinux_compat_net) - err = selinux_ip_postroute_last_compat(sk, dev, isec, &ad, - family, addrp, len); - else - err = avc_has_perm(isec->sid, skb->secmark, SECCLASS_PACKET, - PACKET__SEND, &ad); - - if (err) + if (err != NF_ACCEPT) goto out; err = selinux_xfrm_postroute_last(isec->sid, skb); + out: - return err ? NF_DROP : NF_ACCEPT; + return err; } static unsigned int selinux_ipv4_postroute_last(unsigned int hooknum, @@ -3750,32 +3582,32 @@ static unsigned int selinux_ipv6_postroute_last(unsigned int hooknum, static int selinux_netlink_send(struct sock *sk, struct sk_buff *skb) { + struct task_security_struct *tsec; + struct av_decision avd; int err; err = secondary_ops->netlink_send(sk, skb); if (err) return err; + tsec = current->security; + + avd.allowed = 0; + avc_has_perm_noaudit(tsec->sid, tsec->sid, + SECCLASS_CAPABILITY, ~0, &avd); + cap_mask(NETLINK_CB(skb).eff_cap, avd.allowed); + if (policydb_loaded_version >= POLICYDB_VERSION_NLCLASS) err = selinux_nlmsg_perm(sk, skb); return err; } -static int selinux_netlink_recv(struct sk_buff *skb, int capability) +static int selinux_netlink_recv(struct sk_buff *skb) { - int err; - struct avc_audit_data ad; - - err = secondary_ops->netlink_recv(skb, capability); - if (err) - return err; - - AVC_AUDIT_DATA_INIT(&ad, CAP); - ad.u.cap = capability; - - return avc_has_perm(NETLINK_CB(skb).sid, NETLINK_CB(skb).sid, - SECCLASS_CAPABILITY, CAP_TO_MASK(capability), &ad); + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) + return -EPERM; + return 0; } static int ipc_alloc_security(struct task_struct *task, @@ -4278,10 +4110,6 @@ static int selinux_getprocattr(struct task_struct *p, sid = tsec->exec_sid; else if (!strcmp(name, "fscreate")) sid = tsec->create_sid; - else if (!strcmp(name, "keycreate")) - sid = tsec->keycreate_sid; - else if (!strcmp(name, "sockcreate")) - sid = tsec->sockcreate_sid; else return -EINVAL; @@ -4314,10 +4142,6 @@ static int selinux_setprocattr(struct task_struct *p, error = task_has_perm(current, p, PROCESS__SETEXEC); else if (!strcmp(name, "fscreate")) error = task_has_perm(current, p, PROCESS__SETFSCREATE); - else if (!strcmp(name, "keycreate")) - error = task_has_perm(current, p, PROCESS__SETKEYCREATE); - else if (!strcmp(name, "sockcreate")) - error = task_has_perm(current, p, PROCESS__SETSOCKCREATE); else if (!strcmp(name, "current")) error = task_has_perm(current, p, PROCESS__SETCURRENT); else @@ -4347,13 +4171,6 @@ static int selinux_setprocattr(struct task_struct *p, tsec->exec_sid = sid; else if (!strcmp(name, "fscreate")) tsec->create_sid = sid; - else if (!strcmp(name, "keycreate")) { - error = may_create_key(sid, p); - if (error) - return error; - tsec->keycreate_sid = sid; - } else if (!strcmp(name, "sockcreate")) - tsec->sockcreate_sid = sid; else if (!strcmp(name, "current")) { struct av_decision avd; @@ -4405,72 +4222,6 @@ static int selinux_setprocattr(struct task_struct *p, return size; } -static int selinux_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) -{ - return security_sid_to_context(secid, secdata, seclen); -} - -static void selinux_release_secctx(char *secdata, u32 seclen) -{ - if (secdata) - kfree(secdata); -} - -#ifdef CONFIG_KEYS - -static int selinux_key_alloc(struct key *k, struct task_struct *tsk, - unsigned long flags) -{ - struct task_security_struct *tsec = tsk->security; - struct key_security_struct *ksec; - - ksec = kzalloc(sizeof(struct key_security_struct), GFP_KERNEL); - if (!ksec) - return -ENOMEM; - - ksec->obj = k; - if (tsec->keycreate_sid) - ksec->sid = tsec->keycreate_sid; - else - ksec->sid = tsec->sid; - k->security = ksec; - - return 0; -} - -static void selinux_key_free(struct key *k) -{ - struct key_security_struct *ksec = k->security; - - k->security = NULL; - kfree(ksec); -} - -static int selinux_key_permission(key_ref_t key_ref, - struct task_struct *ctx, - key_perm_t perm) -{ - struct key *key; - struct task_security_struct *tsec; - struct key_security_struct *ksec; - - key = key_ref_to_ptr(key_ref); - - tsec = ctx->security; - ksec = key->security; - - /* if no specific permissions are requested, we skip the - permission check. No serious, additional covert channels - appear to be created. */ - if (perm == 0) - return 0; - - return avc_has_perm(tsec->sid, ksec->sid, - SECCLASS_KEY, perm, NULL); -} - -#endif - static struct security_operations selinux_ops = { .ptrace = selinux_ptrace, .capget = selinux_capget, @@ -4549,15 +4300,11 @@ static struct security_operations selinux_ops = { .task_setpgid = selinux_task_setpgid, .task_getpgid = selinux_task_getpgid, .task_getsid = selinux_task_getsid, - .task_getsecid = selinux_task_getsecid, .task_setgroups = selinux_task_setgroups, .task_setnice = selinux_task_setnice, - .task_setioprio = selinux_task_setioprio, - .task_getioprio = selinux_task_getioprio, .task_setrlimit = selinux_task_setrlimit, .task_setscheduler = selinux_task_setscheduler, .task_getscheduler = selinux_task_getscheduler, - .task_movememory = selinux_task_movememory, .task_kill = selinux_task_kill, .task_wait = selinux_task_wait, .task_prctl = selinux_task_prctl, @@ -4596,9 +4343,6 @@ static struct security_operations selinux_ops = { .getprocattr = selinux_getprocattr, .setprocattr = selinux_setprocattr, - .secid_to_secctx = selinux_secid_to_secctx, - .release_secctx = selinux_release_secctx, - .unix_stream_connect = selinux_socket_unix_stream_connect, .unix_may_send = selinux_socket_unix_may_send, @@ -4626,18 +4370,10 @@ static struct security_operations selinux_ops = { .xfrm_policy_alloc_security = selinux_xfrm_policy_alloc, .xfrm_policy_clone_security = selinux_xfrm_policy_clone, .xfrm_policy_free_security = selinux_xfrm_policy_free, - .xfrm_policy_delete_security = selinux_xfrm_policy_delete, .xfrm_state_alloc_security = selinux_xfrm_state_alloc, .xfrm_state_free_security = selinux_xfrm_state_free, - .xfrm_state_delete_security = selinux_xfrm_state_delete, .xfrm_policy_lookup = selinux_xfrm_policy_lookup, #endif - -#ifdef CONFIG_KEYS - .key_alloc = selinux_key_alloc, - .key_free = selinux_key_free, - .key_permission = selinux_key_permission, -#endif }; static __init int selinux_init(void) @@ -4673,15 +4409,6 @@ static __init int selinux_init(void) } else { printk(KERN_INFO "SELinux: Starting in permissive mode\n"); } - -#ifdef CONFIG_KEYS - /* Add security information to initial keyrings */ - selinux_key_alloc(&root_user_keyring, current, - KEY_ALLOC_NOT_IN_QUOTA); - selinux_key_alloc(&root_session_keyring, current, - KEY_ALLOC_NOT_IN_QUOTA); -#endif - return 0; } diff --git a/security/selinux/include/av_inherit.h b/security/selinux/include/av_inherit.h index a68fdd555..b0e6b1293 100644 --- a/security/selinux/include/av_inherit.h +++ b/security/selinux/include/av_inherit.h @@ -29,4 +29,3 @@ S_(SECCLASS_NETLINK_IP6FW_SOCKET, socket, 0x00400000UL) S_(SECCLASS_NETLINK_DNRT_SOCKET, socket, 0x00400000UL) S_(SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_APPLETALK_SOCKET, socket, 0x00400000UL) diff --git a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h index 7c9b58380..591e98d93 100644 --- a/security/selinux/include/av_perm_to_string.h +++ b/security/selinux/include/av_perm_to_string.h @@ -72,8 +72,6 @@ S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem") S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack") S_(SECCLASS_PROCESS, PROCESS__EXECHEAP, "execheap") - S_(SECCLASS_PROCESS, PROCESS__SETKEYCREATE, "setkeycreate") - S_(SECCLASS_PROCESS, PROCESS__SETSOCKCREATE, "setsockcreate") S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue") S_(SECCLASS_MSG, MSG__SEND, "send") S_(SECCLASS_MSG, MSG__RECEIVE, "receive") @@ -241,13 +239,3 @@ S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") S_(SECCLASS_ASSOCIATION, ASSOCIATION__SETCONTEXT, "setcontext") - S_(SECCLASS_PACKET, PACKET__SEND, "send") - S_(SECCLASS_PACKET, PACKET__RECV, "recv") - S_(SECCLASS_PACKET, PACKET__RELABELTO, "relabelto") - S_(SECCLASS_KEY, KEY__VIEW, "view") - S_(SECCLASS_KEY, KEY__READ, "read") - S_(SECCLASS_KEY, KEY__WRITE, "write") - S_(SECCLASS_KEY, KEY__SEARCH, "search") - S_(SECCLASS_KEY, KEY__LINK, "link") - S_(SECCLASS_KEY, KEY__SETATTR, "setattr") - S_(SECCLASS_KEY, KEY__CREATE, "create") diff --git a/security/selinux/include/av_permissions.h b/security/selinux/include/av_permissions.h index 69fd4b482..d7f02edf3 100644 --- a/security/selinux/include/av_permissions.h +++ b/security/selinux/include/av_permissions.h @@ -467,8 +467,6 @@ #define PROCESS__EXECMEM 0x02000000UL #define PROCESS__EXECSTACK 0x04000000UL #define PROCESS__EXECHEAP 0x08000000UL -#define PROCESS__SETKEYCREATE 0x10000000UL -#define PROCESS__SETSOCKCREATE 0x20000000UL #define IPC__CREATE 0x00000001UL #define IPC__DESTROY 0x00000002UL @@ -935,37 +933,3 @@ #define NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND 0x00200000UL -#define APPLETALK_SOCKET__IOCTL 0x00000001UL -#define APPLETALK_SOCKET__READ 0x00000002UL -#define APPLETALK_SOCKET__WRITE 0x00000004UL -#define APPLETALK_SOCKET__CREATE 0x00000008UL -#define APPLETALK_SOCKET__GETATTR 0x00000010UL -#define APPLETALK_SOCKET__SETATTR 0x00000020UL -#define APPLETALK_SOCKET__LOCK 0x00000040UL -#define APPLETALK_SOCKET__RELABELFROM 0x00000080UL -#define APPLETALK_SOCKET__RELABELTO 0x00000100UL -#define APPLETALK_SOCKET__APPEND 0x00000200UL -#define APPLETALK_SOCKET__BIND 0x00000400UL -#define APPLETALK_SOCKET__CONNECT 0x00000800UL -#define APPLETALK_SOCKET__LISTEN 0x00001000UL -#define APPLETALK_SOCKET__ACCEPT 0x00002000UL -#define APPLETALK_SOCKET__GETOPT 0x00004000UL -#define APPLETALK_SOCKET__SETOPT 0x00008000UL -#define APPLETALK_SOCKET__SHUTDOWN 0x00010000UL -#define APPLETALK_SOCKET__RECVFROM 0x00020000UL -#define APPLETALK_SOCKET__SENDTO 0x00040000UL -#define APPLETALK_SOCKET__RECV_MSG 0x00080000UL -#define APPLETALK_SOCKET__SEND_MSG 0x00100000UL -#define APPLETALK_SOCKET__NAME_BIND 0x00200000UL - -#define PACKET__SEND 0x00000001UL -#define PACKET__RECV 0x00000002UL -#define PACKET__RELABELTO 0x00000004UL - -#define KEY__VIEW 0x00000001UL -#define KEY__READ 0x00000002UL -#define KEY__WRITE 0x00000004UL -#define KEY__SEARCH 0x00000008UL -#define KEY__LINK 0x00000010UL -#define KEY__SETATTR 0x00000020UL -#define KEY__CREATE 0x00000040UL diff --git a/security/selinux/include/class_to_string.h b/security/selinux/include/class_to_string.h index 24303b613..77b2c5996 100644 --- a/security/selinux/include/class_to_string.h +++ b/security/selinux/include/class_to_string.h @@ -58,6 +58,3 @@ S_("nscd") S_("association") S_("netlink_kobject_uevent_socket") - S_("appletalk_socket") - S_("packet") - S_("key") diff --git a/security/selinux/include/flask.h b/security/selinux/include/flask.h index 95887aed2..eb9f50823 100644 --- a/security/selinux/include/flask.h +++ b/security/selinux/include/flask.h @@ -60,9 +60,6 @@ #define SECCLASS_NSCD 53 #define SECCLASS_ASSOCIATION 54 #define SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET 55 -#define SECCLASS_APPLETALK_SOCKET 56 -#define SECCLASS_PACKET 57 -#define SECCLASS_KEY 58 /* * Security identifier indices for initial entities diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index 940178865..54c030778 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -32,8 +32,6 @@ struct task_security_struct { u32 sid; /* current SID */ u32 exec_sid; /* exec SID */ u32 create_sid; /* fscreate SID */ - u32 keycreate_sid; /* keycreate SID */ - u32 sockcreate_sid; /* fscreate SID */ u32 ptrace_sid; /* SID of ptrace parent */ }; @@ -57,9 +55,8 @@ struct file_security_struct { struct superblock_security_struct { struct super_block *sb; /* back pointer to sb object */ struct list_head list; /* list of superblock_security_struct */ - u32 sid; /* SID of file system superblock */ + u32 sid; /* SID of file system */ u32 def_sid; /* default SID for labeling */ - u32 mntpoint_sid; /* SECURITY_FS_USE_MNTPOINT context for files */ unsigned int behavior; /* labeling behavior */ unsigned char initialized; /* initialization flag */ unsigned char proc; /* proc fs */ @@ -102,11 +99,6 @@ struct sk_security_struct { u32 peer_sid; /* SID of peer */ }; -struct key_security_struct { - struct key *obj; /* back pointer */ - u32 sid; /* SID of key */ -}; - extern unsigned int selinux_checkreqprot; #endif /* _SELINUX_OBJSEC_H_ */ diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index c28b7934a..063af47bb 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h @@ -24,15 +24,10 @@ #define POLICYDB_VERSION_VALIDATETRANS 19 #define POLICYDB_VERSION_MLS 19 #define POLICYDB_VERSION_AVTAB 20 -#define POLICYDB_VERSION_RANGETRANS 21 /* Range of policy versions we understand*/ #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE -#ifdef CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX -#define POLICYDB_VERSION_MAX CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE -#else -#define POLICYDB_VERSION_MAX POLICYDB_VERSION_RANGETRANS -#endif +#define POLICYDB_VERSION_MAX POLICYDB_VERSION_AVTAB extern int selinux_enabled; extern int selinux_mls_enabled; diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h index c96498a10..c10f1fc41 100644 --- a/security/selinux/include/xfrm.h +++ b/security/selinux/include/xfrm.h @@ -9,10 +9,8 @@ int selinux_xfrm_policy_alloc(struct xfrm_policy *xp, struct xfrm_user_sec_ctx *sec_ctx); int selinux_xfrm_policy_clone(struct xfrm_policy *old, struct xfrm_policy *new); void selinux_xfrm_policy_free(struct xfrm_policy *xp); -int selinux_xfrm_policy_delete(struct xfrm_policy *xp); int selinux_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *sec_ctx); void selinux_xfrm_state_free(struct xfrm_state *x); -int selinux_xfrm_state_delete(struct xfrm_state *x); int selinux_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid, u8 dir); /* @@ -51,7 +49,7 @@ static inline int selinux_xfrm_sock_rcv_skb(u32 isec_sid, struct sk_buff *skb) static inline int selinux_xfrm_postroute_last(u32 isec_sid, struct sk_buff *skb) { - return 0; + return NF_ACCEPT; } static inline int selinux_socket_getpeer_stream(struct sock *sk) diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index b8f4d25cf..d4f8abf52 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c @@ -111,6 +111,9 @@ static struct nlmsg_perm nlmsg_audit_perms[] = { AUDIT_DEL_RULE, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, { AUDIT_USER, NETLINK_AUDIT_SOCKET__NLMSG_RELAY }, { AUDIT_SIGNAL_INFO, NETLINK_AUDIT_SOCKET__NLMSG_READ }, + { AUDIT_WATCH_INS, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, + { AUDIT_WATCH_REM, NETLINK_AUDIT_SOCKET__NLMSG_WRITE }, + { AUDIT_WATCH_LIST, NETLINK_AUDIT_SOCKET__NLMSG_READPRIV }, }; diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index bab7b386c..a4efc966f 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -9,6 +9,7 @@ * the Free Software Foundation, version 2. */ +#include #include #include #include @@ -37,14 +38,6 @@ unsigned int selinux_checkreqprot = CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE; -#ifdef CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT -#define SELINUX_COMPAT_NET_VALUE 0 -#else -#define SELINUX_COMPAT_NET_VALUE 1 -#endif - -int selinux_compat_net = SELINUX_COMPAT_NET_VALUE; - static int __init checkreqprot_setup(char *str) { selinux_checkreqprot = simple_strtoul(str,NULL,0) ? 1 : 0; @@ -52,13 +45,6 @@ static int __init checkreqprot_setup(char *str) } __setup("checkreqprot=", checkreqprot_setup); -static int __init selinux_compat_net_setup(char *str) -{ - selinux_compat_net = simple_strtoul(str,NULL,0) ? 1 : 0; - return 1; -} -__setup("selinux_compat_net=", selinux_compat_net_setup); - static DEFINE_MUTEX(sel_mutex); @@ -99,7 +85,6 @@ enum sel_inos { SEL_AVC, /* AVC management directory */ SEL_MEMBER, /* compute polyinstantiation membership decision */ SEL_CHECKREQPROT, /* check requested protection, not kernel-applied one */ - SEL_COMPAT_NET, /* whether to use old compat network packet controls */ }; #define TMPBUFLEN 12 @@ -379,55 +364,6 @@ static struct file_operations sel_checkreqprot_ops = { .write = sel_write_checkreqprot, }; -static ssize_t sel_read_compat_net(struct file *filp, char __user *buf, - size_t count, loff_t *ppos) -{ - char tmpbuf[TMPBUFLEN]; - ssize_t length; - - length = scnprintf(tmpbuf, TMPBUFLEN, "%d", selinux_compat_net); - return simple_read_from_buffer(buf, count, ppos, tmpbuf, length); -} - -static ssize_t sel_write_compat_net(struct file * file, const char __user * buf, - size_t count, loff_t *ppos) -{ - char *page; - ssize_t length; - int new_value; - - length = task_has_security(current, SECURITY__LOAD_POLICY); - if (length) - return length; - - if (count >= PAGE_SIZE) - return -ENOMEM; - if (*ppos != 0) { - /* No partial writes. */ - return -EINVAL; - } - page = (char*)get_zeroed_page(GFP_KERNEL); - if (!page) - return -ENOMEM; - length = -EFAULT; - if (copy_from_user(page, buf, count)) - goto out; - - length = -EINVAL; - if (sscanf(page, "%d", &new_value) != 1) - goto out; - - selinux_compat_net = new_value ? 1 : 0; - length = count; -out: - free_page((unsigned long) page); - return length; -} -static struct file_operations sel_compat_net_ops = { - .read = sel_read_compat_net, - .write = sel_write_compat_net, -}; - /* * Remaining nodes use transaction based IO methods like nfsd/nfsctl.c */ @@ -771,6 +707,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode) if (ret) { ret->i_mode = mode; ret->i_uid = ret->i_gid = 0; + ret->i_blksize = PAGE_CACHE_SIZE; ret->i_blocks = 0; ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; } @@ -1282,7 +1219,6 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) [SEL_DISABLE] = {"disable", &sel_disable_ops, S_IWUSR}, [SEL_MEMBER] = {"member", &transaction_ops, S_IRUGO|S_IWUGO}, [SEL_CHECKREQPROT] = {"checkreqprot", &sel_checkreqprot_ops, S_IRUGO|S_IWUSR}, - [SEL_COMPAT_NET] = {"compat_net", &sel_compat_net_ops, S_IRUGO|S_IWUSR}, /* last one */ {""} }; ret = simple_fill_super(sb, SELINUX_MAGIC, selinux_files); @@ -1343,11 +1279,10 @@ err: goto out; } -static int sel_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data, - struct vfsmount *mnt) +static struct super_block *sel_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data) { - return get_sb_single(fs_type, flags, data, sel_fill_super, mnt); + return get_sb_single(fs_type, flags, data, sel_fill_super); } static struct file_system_type sel_fs_type = { diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index df2540cc3..7bc5b6440 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c @@ -543,21 +543,22 @@ int mls_compute_sid(struct context *scontext, u32 specified, struct context *newcontext) { - struct range_trans *rtr; - if (!selinux_mls_enabled) return 0; switch (specified) { case AVTAB_TRANSITION: - /* Look for a range transition rule. */ - for (rtr = policydb.range_tr; rtr; rtr = rtr->next) { - if (rtr->source_type == scontext->type && - rtr->target_type == tcontext->type && - rtr->target_class == tclass) { - /* Set the range from the rule */ - return mls_range_set(newcontext, - &rtr->target_range); + if (tclass == SECCLASS_PROCESS) { + struct range_trans *rangetr; + /* Look for a range transition rule. */ + for (rangetr = policydb.range_tr; rangetr; + rangetr = rangetr->next) { + if (rangetr->dom == scontext->type && + rangetr->type == tcontext->type) { + /* Set the range from the rule */ + return mls_range_set(newcontext, + &rangetr->range); + } } } /* Fallthrough */ diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index b18895302..0111990ba 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -96,11 +96,6 @@ static struct policydb_compat_info policydb_compat[] = { .sym_num = SYM_NUM, .ocon_num = OCON_NUM, }, - { - .version = POLICYDB_VERSION_RANGETRANS, - .sym_num = SYM_NUM, - .ocon_num = OCON_NUM, - }, }; static struct policydb_compat_info *policydb_lookup_compat(int version) @@ -649,18 +644,10 @@ void policydb_destroy(struct policydb *p) kfree(lra); for (rt = p->range_tr; rt; rt = rt -> next) { - if (lrt) { - ebitmap_destroy(&lrt->target_range.level[0].cat); - ebitmap_destroy(&lrt->target_range.level[1].cat); - kfree(lrt); - } - lrt = rt; - } - if (lrt) { - ebitmap_destroy(&lrt->target_range.level[0].cat); - ebitmap_destroy(&lrt->target_range.level[1].cat); kfree(lrt); + lrt = rt; } + kfree(lrt); if (p->type_attr_map) { for (i = 0; i < p->p_types.nprim; i++) @@ -1834,7 +1821,6 @@ int policydb_read(struct policydb *p, void *fp) } if (p->policyvers >= POLICYDB_VERSION_MLS) { - int new_rangetr = p->policyvers >= POLICYDB_VERSION_RANGETRANS; rc = next_entry(buf, fp, sizeof(u32)); if (rc < 0) goto bad; @@ -1853,16 +1839,9 @@ int policydb_read(struct policydb *p, void *fp) rc = next_entry(buf, fp, (sizeof(u32) * 2)); if (rc < 0) goto bad; - rt->source_type = le32_to_cpu(buf[0]); - rt->target_type = le32_to_cpu(buf[1]); - if (new_rangetr) { - rc = next_entry(buf, fp, sizeof(u32)); - if (rc < 0) - goto bad; - rt->target_class = le32_to_cpu(buf[0]); - } else - rt->target_class = SECCLASS_PROCESS; - rc = mls_read_range_helper(&rt->target_range, fp); + rt->dom = le32_to_cpu(buf[0]); + rt->type = le32_to_cpu(buf[1]); + rc = mls_read_range_helper(&rt->range, fp); if (rc) goto bad; lrt = rt; diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h index 8319d5ff5..b1340711f 100644 --- a/security/selinux/ss/policydb.h +++ b/security/selinux/ss/policydb.h @@ -106,10 +106,9 @@ struct cat_datum { }; struct range_trans { - u32 source_type; - u32 target_type; - u32 target_class; - struct mls_range target_range; + u32 dom; /* current process domain */ + u32 type; /* program executable type */ + struct mls_range range; /* new range */ struct range_trans *next; }; diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 85e429884..c284dbb8b 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -833,8 +833,6 @@ static int security_compute_sid(u32 ssid, goto out; } - context_init(&newcontext); - POLICY_RDLOCK; scontext = sidtab_search(&sidtab, ssid); @@ -852,6 +850,8 @@ static int security_compute_sid(u32 ssid, goto out_unlock; } + context_init(&newcontext); + /* Set the user identity. */ switch (specified) { case AVTAB_TRANSITION: @@ -1845,20 +1845,15 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, return -ENOTSUPP; switch (field) { - case AUDIT_SUBJ_USER: - case AUDIT_SUBJ_ROLE: - case AUDIT_SUBJ_TYPE: - case AUDIT_OBJ_USER: - case AUDIT_OBJ_ROLE: - case AUDIT_OBJ_TYPE: + case AUDIT_SE_USER: + case AUDIT_SE_ROLE: + case AUDIT_SE_TYPE: /* only 'equals' and 'not equals' fit user, role, and type */ if (op != AUDIT_EQUAL && op != AUDIT_NOT_EQUAL) return -EINVAL; break; - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: /* we do not allow a range, indicated by the presense of '-' */ if (strchr(rulestr, '-')) return -EINVAL; @@ -1879,34 +1874,29 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, tmprule->au_seqno = latest_granting; switch (field) { - case AUDIT_SUBJ_USER: - case AUDIT_OBJ_USER: + case AUDIT_SE_USER: userdatum = hashtab_search(policydb.p_users.table, rulestr); if (!userdatum) rc = -EINVAL; else tmprule->au_ctxt.user = userdatum->value; break; - case AUDIT_SUBJ_ROLE: - case AUDIT_OBJ_ROLE: + case AUDIT_SE_ROLE: roledatum = hashtab_search(policydb.p_roles.table, rulestr); if (!roledatum) rc = -EINVAL; else tmprule->au_ctxt.role = roledatum->value; break; - case AUDIT_SUBJ_TYPE: - case AUDIT_OBJ_TYPE: + case AUDIT_SE_TYPE: typedatum = hashtab_search(policydb.p_types.table, rulestr); if (!typedatum) rc = -EINVAL; else tmprule->au_ctxt.type = typedatum->value; break; - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: rc = mls_from_string(rulestr, &tmprule->au_ctxt, GFP_ATOMIC); break; } @@ -1958,8 +1948,7 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, /* a field/op pair that is not caught here will simply fall through without a match */ switch (field) { - case AUDIT_SUBJ_USER: - case AUDIT_OBJ_USER: + case AUDIT_SE_USER: switch (op) { case AUDIT_EQUAL: match = (ctxt->user == rule->au_ctxt.user); @@ -1969,8 +1958,7 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, break; } break; - case AUDIT_SUBJ_ROLE: - case AUDIT_OBJ_ROLE: + case AUDIT_SE_ROLE: switch (op) { case AUDIT_EQUAL: match = (ctxt->role == rule->au_ctxt.role); @@ -1980,8 +1968,7 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, break; } break; - case AUDIT_SUBJ_TYPE: - case AUDIT_OBJ_TYPE: + case AUDIT_SE_TYPE: switch (op) { case AUDIT_EQUAL: match = (ctxt->type == rule->au_ctxt.type); @@ -1991,12 +1978,9 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, break; } break; - case AUDIT_SUBJ_SEN: - case AUDIT_SUBJ_CLR: - case AUDIT_OBJ_LEV_LOW: - case AUDIT_OBJ_LEV_HIGH: - level = ((field == AUDIT_SUBJ_SEN || - field == AUDIT_OBJ_LEV_LOW) ? + case AUDIT_SE_SEN: + case AUDIT_SE_CLR: + level = (op == AUDIT_SE_SEN ? &ctxt->range.level[0] : &ctxt->range.level[1]); switch (op) { case AUDIT_EQUAL: diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 6c985ced8..abe99d881 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -26,6 +26,7 @@ * 2. Emulating a reasonable SO_PEERSEC across machines * 3. Testing addition of sk_policy's with security context via setsockopt */ +#include #include #include #include @@ -131,7 +132,10 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_us goto out; /* - * Does the subject have permission to set security context? + * Does the subject have permission to set security or permission to + * do the relabel? + * Must be permitted to relabel from default socket type (process type) + * to specified context */ rc = avc_has_perm(tsec->sid, ctx->ctx_sid, SECCLASS_ASSOCIATION, @@ -196,23 +200,6 @@ void selinux_xfrm_policy_free(struct xfrm_policy *xp) kfree(ctx); } -/* - * LSM hook implementation that authorizes deletion of labeled policies. - */ -int selinux_xfrm_policy_delete(struct xfrm_policy *xp) -{ - struct task_security_struct *tsec = current->security; - struct xfrm_sec_ctx *ctx = xp->security; - int rc = 0; - - if (ctx) - rc = avc_has_perm(tsec->sid, ctx->ctx_sid, - SECCLASS_ASSOCIATION, - ASSOCIATION__SETCONTEXT, NULL); - - return rc; -} - /* * LSM hook implementation that allocs and transfers sec_ctx spec to * xfrm_state. @@ -305,23 +292,6 @@ u32 selinux_socket_getpeer_dgram(struct sk_buff *skb) return SECSID_NULL; } - /* - * LSM hook implementation that authorizes deletion of labeled SAs. - */ -int selinux_xfrm_state_delete(struct xfrm_state *x) -{ - struct task_security_struct *tsec = current->security; - struct xfrm_sec_ctx *ctx = x->security; - int rc = 0; - - if (ctx) - rc = avc_has_perm(tsec->sid, ctx->ctx_sid, - SECCLASS_ASSOCIATION, - ASSOCIATION__SETCONTEXT, NULL); - - return rc; -} - /* * LSM hook that controls access to unlabelled packets. If * a xfrm_state is authorizable (defined by macro) then it was @@ -386,12 +356,18 @@ int selinux_xfrm_postroute_last(u32 isec_sid, struct sk_buff *skb) struct xfrm_state *x = dst_test->xfrm; if (x && selinux_authorizable_xfrm(x)) - goto out; + goto accept; } } rc = avc_has_perm(isec_sid, SECINITSID_UNLABELED, SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, NULL); -out: - return rc; + if (rc) + goto drop; + +accept: + return NF_ACCEPT; + +drop: + return NF_DROP; } diff --git a/sound/Kconfig b/sound/Kconfig index e0d791a98..b65ee4701 100644 --- a/sound/Kconfig +++ b/sound/Kconfig @@ -58,8 +58,6 @@ source "sound/pci/Kconfig" source "sound/ppc/Kconfig" -source "sound/aoa/Kconfig" - source "sound/arm/Kconfig" source "sound/mips/Kconfig" diff --git a/sound/Makefile b/sound/Makefile index 1f60797af..f352bb235 100644 --- a/sound/Makefile +++ b/sound/Makefile @@ -5,7 +5,6 @@ obj-$(CONFIG_SOUND) += soundcore.o obj-$(CONFIG_SOUND_PRIME) += oss/ obj-$(CONFIG_DMASOUND) += oss/ obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/ -obj-$(CONFIG_SND_AOA) += aoa/ ifeq ($(CONFIG_SND),y) obj-y += last.o diff --git a/sound/aoa/Kconfig b/sound/aoa/Kconfig deleted file mode 100644 index 2f4334d19..000000000 --- a/sound/aoa/Kconfig +++ /dev/null @@ -1,18 +0,0 @@ -menu "Apple Onboard Audio driver" - depends on SND!=n && PPC - -config SND_AOA - tristate "Apple Onboard Audio driver" - depends on SND - select SND_PCM - ---help--- - This option enables the new driver for the various - Apple Onboard Audio components. - -source "sound/aoa/fabrics/Kconfig" - -source "sound/aoa/codecs/Kconfig" - -source "sound/aoa/soundbus/Kconfig" - -endmenu diff --git a/sound/aoa/Makefile b/sound/aoa/Makefile deleted file mode 100644 index a8c037f90..000000000 --- a/sound/aoa/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -obj-$(CONFIG_SND_AOA) += core/ -obj-$(CONFIG_SND_AOA_SOUNDBUS) += soundbus/ -obj-$(CONFIG_SND_AOA) += fabrics/ -obj-$(CONFIG_SND_AOA) += codecs/ diff --git a/sound/aoa/aoa-gpio.h b/sound/aoa/aoa-gpio.h deleted file mode 100644 index 3a61f3115..000000000 --- a/sound/aoa/aoa-gpio.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Apple Onboard Audio GPIO definitions - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#ifndef __AOA_GPIO_H -#define __AOA_GPIO_H -#include -#include -#include - -typedef void (*notify_func_t)(void *data); - -enum notify_type { - AOA_NOTIFY_HEADPHONE, - AOA_NOTIFY_LINE_IN, - AOA_NOTIFY_LINE_OUT, -}; - -struct gpio_runtime; -struct gpio_methods { - /* for initialisation/de-initialisation of the GPIO layer */ - void (*init)(struct gpio_runtime *rt); - void (*exit)(struct gpio_runtime *rt); - - /* turn off headphone, speakers, lineout */ - void (*all_amps_off)(struct gpio_runtime *rt); - /* turn headphone, speakers, lineout back to previous setting */ - void (*all_amps_restore)(struct gpio_runtime *rt); - - void (*set_headphone)(struct gpio_runtime *rt, int on); - void (*set_speakers)(struct gpio_runtime *rt, int on); - void (*set_lineout)(struct gpio_runtime *rt, int on); - - int (*get_headphone)(struct gpio_runtime *rt); - int (*get_speakers)(struct gpio_runtime *rt); - int (*get_lineout)(struct gpio_runtime *rt); - - void (*set_hw_reset)(struct gpio_runtime *rt, int on); - - /* use this to be notified of any events. The notification - * function is passed the data, and is called in process - * context by the use of schedule_work. - * The interface for it is that setting a function to NULL - * removes it, and they return 0 if the operation succeeded, - * and -EBUSY if the notification is already assigned by - * someone else. */ - int (*set_notify)(struct gpio_runtime *rt, - enum notify_type type, - notify_func_t notify, - void *data); - /* returns 0 if not plugged in, 1 if plugged in - * or a negative error code */ - int (*get_detect)(struct gpio_runtime *rt, - enum notify_type type); -}; - -struct gpio_notification { - notify_func_t notify; - void *data; - void *gpio_private; - struct work_struct work; - struct mutex mutex; -}; - -struct gpio_runtime { - /* to be assigned by fabric */ - struct device_node *node; - /* since everyone needs this pointer anyway... */ - struct gpio_methods *methods; - /* to be used by the gpio implementation */ - int implementation_private; - struct gpio_notification headphone_notify; - struct gpio_notification line_in_notify; - struct gpio_notification line_out_notify; -}; - -#endif /* __AOA_GPIO_H */ diff --git a/sound/aoa/aoa.h b/sound/aoa/aoa.h deleted file mode 100644 index 378ef1e98..000000000 --- a/sound/aoa/aoa.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Apple Onboard Audio definitions - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#ifndef __AOA_H -#define __AOA_H -#include -#include -/* So apparently there's a reason for requiring driver.h to be included first! */ -#include -#include -#include -#include -#include "aoa-gpio.h" -#include "soundbus/soundbus.h" - -#define MAX_CODEC_NAME_LEN 32 - -struct aoa_codec { - char name[MAX_CODEC_NAME_LEN]; - - struct module *owner; - - /* called when the fabric wants to init this codec. - * Do alsa card manipulations from here. */ - int (*init)(struct aoa_codec *codec); - - /* called when the fabric is done with the codec. - * The alsa card will be cleaned up so don't bother. */ - void (*exit)(struct aoa_codec *codec); - - /* May be NULL, but can be used by the fabric. - * Refcounting is the codec driver's responsibility */ - struct device_node *node; - - /* assigned by fabric before init() is called, points - * to the soundbus device. Cannot be NULL. */ - struct soundbus_dev *soundbus_dev; - - /* assigned by the fabric before init() is called, points - * to the fabric's gpio runtime record for the relevant - * device. */ - struct gpio_runtime *gpio; - - /* assigned by the fabric before init() is called, contains - * a codec specific bitmask of what outputs and inputs are - * actually connected */ - u32 connected; - - /* data the fabric can associate with this structure */ - void *fabric_data; - - /* private! */ - struct list_head list; - struct aoa_fabric *fabric; -}; - -/* return 0 on success */ -extern int -aoa_codec_register(struct aoa_codec *codec); -extern void -aoa_codec_unregister(struct aoa_codec *codec); - -#define MAX_LAYOUT_NAME_LEN 32 - -struct aoa_fabric { - char name[MAX_LAYOUT_NAME_LEN]; - - struct module *owner; - - /* once codecs register, they are passed here after. - * They are of course not initialised, since the - * fabric is responsible for initialising some fields - * in the codec structure! */ - int (*found_codec)(struct aoa_codec *codec); - /* called for each codec when it is removed, - * also in the case that aoa_fabric_unregister - * is called and all codecs are removed - * from this fabric. - * Also called if found_codec returned 0 but - * the codec couldn't initialise. */ - void (*remove_codec)(struct aoa_codec *codec); - /* If found_codec returned 0, and the codec - * could be initialised, this is called. */ - void (*attached_codec)(struct aoa_codec *codec); -}; - -/* return 0 on success, -EEXIST if another fabric is - * registered, -EALREADY if the same fabric is registered. - * Passing NULL can be used to test for the presence - * of another fabric, if -EALREADY is returned there is - * no other fabric present. - * In the case that the function returns -EALREADY - * and the fabric passed is not NULL, all codecs - * that are not assigned yet are passed to the fabric - * again for reconsideration. */ -extern int -aoa_fabric_register(struct aoa_fabric *fabric); - -/* it is vital to call this when the fabric exits! - * When calling, the remove_codec will be called - * for all codecs, unless it is NULL. */ -extern void -aoa_fabric_unregister(struct aoa_fabric *fabric); - -/* if for some reason you want to get rid of a codec - * before the fabric is removed, use this. - * Note that remove_codec is called for it! */ -extern void -aoa_fabric_unlink_codec(struct aoa_codec *codec); - -/* alsa help methods */ -struct aoa_card { - struct snd_card *alsa_card; -}; - -extern int aoa_snd_device_new(snd_device_type_t type, - void * device_data, struct snd_device_ops * ops); -extern struct snd_card *aoa_get_card(void); -extern int aoa_snd_ctl_add(struct snd_kcontrol* control); - -/* GPIO stuff */ -extern struct gpio_methods *pmf_gpio_methods; -extern struct gpio_methods *ftr_gpio_methods; -/* extern struct gpio_methods *map_gpio_methods; */ - -#endif /* __AOA_H */ diff --git a/sound/aoa/codecs/Kconfig b/sound/aoa/codecs/Kconfig deleted file mode 100644 index 90cf58f68..000000000 --- a/sound/aoa/codecs/Kconfig +++ /dev/null @@ -1,32 +0,0 @@ -config SND_AOA_ONYX - tristate "support Onyx chip" - depends on SND_AOA - ---help--- - This option enables support for the Onyx (pcm3052) - codec chip found in the latest Apple machines - (most of those with digital audio output). - -#config SND_AOA_TOPAZ -# tristate "support Topaz chips" -# depends on SND_AOA -# ---help--- -# This option enables support for the Topaz (CS84xx) -# codec chips found in the latest Apple machines, -# these chips do the digital input and output on -# some PowerMacs. - -config SND_AOA_TAS - tristate "support TAS chips" - depends on SND_AOA - ---help--- - This option enables support for the tas chips - found in a lot of Apple Machines, especially - iBooks and PowerBooks without digital. - -config SND_AOA_TOONIE - tristate "support Toonie chip" - depends on SND_AOA - ---help--- - This option enables support for the toonie codec - found in the Mac Mini. If you have a Mac Mini and - want to hear sound, select this option. diff --git a/sound/aoa/codecs/Makefile b/sound/aoa/codecs/Makefile deleted file mode 100644 index 31cbe68fd..000000000 --- a/sound/aoa/codecs/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-$(CONFIG_SND_AOA_ONYX) += snd-aoa-codec-onyx.o -obj-$(CONFIG_SND_AOA_TAS) += snd-aoa-codec-tas.o -obj-$(CONFIG_SND_AOA_TOONIE) += snd-aoa-codec-toonie.o diff --git a/sound/aoa/codecs/snd-aoa-codec-onyx.c b/sound/aoa/codecs/snd-aoa-codec-onyx.c deleted file mode 100644 index 0b7650788..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-onyx.c +++ /dev/null @@ -1,1113 +0,0 @@ -/* - * Apple Onboard Audio driver for Onyx codec - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - * - * - * This is a driver for the pcm3052 codec chip (codenamed Onyx) - * that is present in newer Apple hardware (with digital output). - * - * The Onyx codec has the following connections (listed by the bit - * to be used in aoa_codec.connected): - * 0: analog output - * 1: digital output - * 2: line input - * 3: microphone input - * Note that even though I know of no machine that has for example - * the digital output connected but not the analog, I have handled - * all the different cases in the code so that this driver may serve - * as a good example of what to do. - * - * NOTE: This driver assumes that there's at most one chip to be - * used with one alsa card, in form of creating all kinds - * of mixer elements without regard for their existence. - * But snd-aoa assumes that there's at most one card, so - * this means you can only have one onyx on a system. This - * should probably be fixed by changing the assumption of - * having just a single card on a system, and making the - * 'card' pointer accessible to anyone who needs it instead - * of hiding it in the aoa_snd_* functions... - * - */ -#include -#include -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("pcm3052 (onyx) codec driver for snd-aoa"); - -#include "snd-aoa-codec-onyx.h" -#include "../aoa.h" -#include "../soundbus/soundbus.h" - - -#define PFX "snd-aoa-codec-onyx: " - -struct onyx { - /* cache registers 65 to 80, they are write-only! */ - u8 cache[16]; - struct i2c_client i2c; - struct aoa_codec codec; - u32 initialised:1, - spdif_locked:1, - analog_locked:1, - original_mute:2; - int open_count; - struct codec_info *codec_info; - - /* mutex serializes concurrent access to the device - * and this structure. - */ - struct mutex mutex; -}; -#define codec_to_onyx(c) container_of(c, struct onyx, codec) - -/* both return 0 if all ok, else on error */ -static int onyx_read_register(struct onyx *onyx, u8 reg, u8 *value) -{ - s32 v; - - if (reg != ONYX_REG_CONTROL) { - *value = onyx->cache[reg-FIRSTREGISTER]; - return 0; - } - v = i2c_smbus_read_byte_data(&onyx->i2c, reg); - if (v < 0) - return -1; - *value = (u8)v; - onyx->cache[ONYX_REG_CONTROL-FIRSTREGISTER] = *value; - return 0; -} - -static int onyx_write_register(struct onyx *onyx, u8 reg, u8 value) -{ - int result; - - result = i2c_smbus_write_byte_data(&onyx->i2c, reg, value); - if (!result) - onyx->cache[reg-FIRSTREGISTER] = value; - return result; -} - -/* alsa stuff */ - -static int onyx_dev_register(struct snd_device *dev) -{ - return 0; -} - -static struct snd_device_ops ops = { - .dev_register = onyx_dev_register, -}; - -/* this is necessary because most alsa mixer programs - * can't properly handle the negative range */ -#define VOLUME_RANGE_SHIFT 128 - -static int onyx_snd_vol_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 2; - uinfo->value.integer.min = -128 + VOLUME_RANGE_SHIFT; - uinfo->value.integer.max = -1 + VOLUME_RANGE_SHIFT; - return 0; -} - -static int onyx_snd_vol_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - s8 l, r; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, &l); - onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, &r); - mutex_unlock(&onyx->mutex); - - ucontrol->value.integer.value[0] = l + VOLUME_RANGE_SHIFT; - ucontrol->value.integer.value[1] = r + VOLUME_RANGE_SHIFT; - - return 0; -} - -static int onyx_snd_vol_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - s8 l, r; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, &l); - onyx_read_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, &r); - - if (l + VOLUME_RANGE_SHIFT == ucontrol->value.integer.value[0] && - r + VOLUME_RANGE_SHIFT == ucontrol->value.integer.value[1]) { - mutex_unlock(&onyx->mutex); - return 0; - } - - onyx_write_register(onyx, ONYX_REG_DAC_ATTEN_LEFT, - ucontrol->value.integer.value[0] - - VOLUME_RANGE_SHIFT); - onyx_write_register(onyx, ONYX_REG_DAC_ATTEN_RIGHT, - ucontrol->value.integer.value[1] - - VOLUME_RANGE_SHIFT); - mutex_unlock(&onyx->mutex); - - return 1; -} - -static struct snd_kcontrol_new volume_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Volume", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = onyx_snd_vol_info, - .get = onyx_snd_vol_get, - .put = onyx_snd_vol_put, -}; - -/* like above, this is necessary because a lot - * of alsa mixer programs don't handle ranges - * that don't start at 0 properly. - * even alsamixer is one of them... */ -#define INPUTGAIN_RANGE_SHIFT (-3) - -static int onyx_snd_inputgain_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = 3 + INPUTGAIN_RANGE_SHIFT; - uinfo->value.integer.max = 28 + INPUTGAIN_RANGE_SHIFT; - return 0; -} - -static int onyx_snd_inputgain_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 ig; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &ig); - mutex_unlock(&onyx->mutex); - - ucontrol->value.integer.value[0] = - (ig & ONYX_ADC_PGA_GAIN_MASK) + INPUTGAIN_RANGE_SHIFT; - - return 0; -} - -static int onyx_snd_inputgain_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 v, n; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); - n = v; - n &= ~ONYX_ADC_PGA_GAIN_MASK; - n |= (ucontrol->value.integer.value[0] - INPUTGAIN_RANGE_SHIFT) - & ONYX_ADC_PGA_GAIN_MASK; - onyx_write_register(onyx, ONYX_REG_ADC_CONTROL, n); - mutex_unlock(&onyx->mutex); - - return n != v; -} - -static struct snd_kcontrol_new inputgain_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Capture Volume", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = onyx_snd_inputgain_info, - .get = onyx_snd_inputgain_get, - .put = onyx_snd_inputgain_put, -}; - -static int onyx_snd_capture_source_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *texts[] = { "Line-In", "Microphone" }; - - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 2; - if (uinfo->value.enumerated.item > 1) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; -} - -static int onyx_snd_capture_source_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - s8 v; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); - mutex_unlock(&onyx->mutex); - - ucontrol->value.enumerated.item[0] = !!(v&ONYX_ADC_INPUT_MIC); - - return 0; -} - -static void onyx_set_capture_source(struct onyx *onyx, int mic) -{ - s8 v; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_ADC_CONTROL, &v); - v &= ~ONYX_ADC_INPUT_MIC; - if (mic) - v |= ONYX_ADC_INPUT_MIC; - onyx_write_register(onyx, ONYX_REG_ADC_CONTROL, v); - mutex_unlock(&onyx->mutex); -} - -static int onyx_snd_capture_source_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - onyx_set_capture_source(snd_kcontrol_chip(kcontrol), - ucontrol->value.enumerated.item[0]); - return 1; -} - -static struct snd_kcontrol_new capture_source_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* If we name this 'Input Source', it properly shows up in - * alsamixer as a selection, * but it's shown under the - * 'Playback' category. - * If I name it 'Capture Source', it shows up in strange - * ways (two bools of which one can be selected at a - * time) but at least it's shown in the 'Capture' - * category. - * I was told that this was due to backward compatibility, - * but I don't understand then why the mangling is *not* - * done when I name it "Input Source"..... - */ - .name = "Capture Source", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = onyx_snd_capture_source_info, - .get = onyx_snd_capture_source_get, - .put = onyx_snd_capture_source_put, -}; - -static int onyx_snd_mute_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int onyx_snd_mute_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 c; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &c); - mutex_unlock(&onyx->mutex); - - ucontrol->value.integer.value[0] = !(c & ONYX_MUTE_LEFT); - ucontrol->value.integer.value[1] = !(c & ONYX_MUTE_RIGHT); - - return 0; -} - -static int onyx_snd_mute_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 v = 0, c = 0; - int err = -EBUSY; - - mutex_lock(&onyx->mutex); - if (onyx->analog_locked) - goto out_unlock; - - onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); - c = v; - c &= ~(ONYX_MUTE_RIGHT | ONYX_MUTE_LEFT); - if (!ucontrol->value.integer.value[0]) - c |= ONYX_MUTE_LEFT; - if (!ucontrol->value.integer.value[1]) - c |= ONYX_MUTE_RIGHT; - err = onyx_write_register(onyx, ONYX_REG_DAC_CONTROL, c); - - out_unlock: - mutex_unlock(&onyx->mutex); - - return !err ? (v != c) : err; -} - -static struct snd_kcontrol_new mute_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Switch", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = onyx_snd_mute_info, - .get = onyx_snd_mute_get, - .put = onyx_snd_mute_put, -}; - - -static int onyx_snd_single_bit_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -#define FLAG_POLARITY_INVERT 1 -#define FLAG_SPDIFLOCK 2 - -static int onyx_snd_single_bit_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 c; - long int pv = kcontrol->private_value; - u8 polarity = (pv >> 16) & FLAG_POLARITY_INVERT; - u8 address = (pv >> 8) & 0xff; - u8 mask = pv & 0xff; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, address, &c); - mutex_unlock(&onyx->mutex); - - ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity; - - return 0; -} - -static int onyx_snd_single_bit_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 v = 0, c = 0; - int err; - long int pv = kcontrol->private_value; - u8 polarity = (pv >> 16) & FLAG_POLARITY_INVERT; - u8 spdiflock = (pv >> 16) & FLAG_SPDIFLOCK; - u8 address = (pv >> 8) & 0xff; - u8 mask = pv & 0xff; - - mutex_lock(&onyx->mutex); - if (spdiflock && onyx->spdif_locked) { - /* even if alsamixer doesn't care.. */ - err = -EBUSY; - goto out_unlock; - } - onyx_read_register(onyx, address, &v); - c = v; - c &= ~(mask); - if (!!ucontrol->value.integer.value[0] ^ polarity) - c |= mask; - err = onyx_write_register(onyx, address, c); - - out_unlock: - mutex_unlock(&onyx->mutex); - - return !err ? (v != c) : err; -} - -#define SINGLE_BIT(n, type, description, address, mask, flags) \ -static struct snd_kcontrol_new n##_control = { \ - .iface = SNDRV_CTL_ELEM_IFACE_##type, \ - .name = description, \ - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \ - .info = onyx_snd_single_bit_info, \ - .get = onyx_snd_single_bit_get, \ - .put = onyx_snd_single_bit_put, \ - .private_value = (flags << 16) | (address << 8) | mask \ -} - -SINGLE_BIT(spdif, - MIXER, - SNDRV_CTL_NAME_IEC958("", PLAYBACK, SWITCH), - ONYX_REG_DIG_INFO4, - ONYX_SPDIF_ENABLE, - FLAG_SPDIFLOCK); -SINGLE_BIT(ovr1, - MIXER, - "Oversampling Rate", - ONYX_REG_DAC_CONTROL, - ONYX_OVR1, - 0); -SINGLE_BIT(flt0, - MIXER, - "Fast Digital Filter Rolloff", - ONYX_REG_DAC_FILTER, - ONYX_ROLLOFF_FAST, - FLAG_POLARITY_INVERT); -SINGLE_BIT(hpf, - MIXER, - "Highpass Filter", - ONYX_REG_ADC_HPF_BYPASS, - ONYX_HPF_DISABLE, - FLAG_POLARITY_INVERT); -SINGLE_BIT(dm12, - MIXER, - "Digital De-Emphasis", - ONYX_REG_DAC_DEEMPH, - ONYX_DIGDEEMPH_CTRL, - 0); - -static int onyx_spdif_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; - uinfo->count = 1; - return 0; -} - -static int onyx_spdif_mask_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - /* datasheet page 30, all others are 0 */ - ucontrol->value.iec958.status[0] = 0x3e; - ucontrol->value.iec958.status[1] = 0xff; - - ucontrol->value.iec958.status[3] = 0x3f; - ucontrol->value.iec958.status[4] = 0x0f; - - return 0; -} - -static struct snd_kcontrol_new onyx_spdif_mask = { - .access = SNDRV_CTL_ELEM_ACCESS_READ, - .iface = SNDRV_CTL_ELEM_IFACE_PCM, - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK), - .info = onyx_spdif_info, - .get = onyx_spdif_mask_get, -}; - -static int onyx_spdif_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 v; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DIG_INFO1, &v); - ucontrol->value.iec958.status[0] = v & 0x3e; - - onyx_read_register(onyx, ONYX_REG_DIG_INFO2, &v); - ucontrol->value.iec958.status[1] = v; - - onyx_read_register(onyx, ONYX_REG_DIG_INFO3, &v); - ucontrol->value.iec958.status[3] = v & 0x3f; - - onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); - ucontrol->value.iec958.status[4] = v & 0x0f; - mutex_unlock(&onyx->mutex); - - return 0; -} - -static int onyx_spdif_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct onyx *onyx = snd_kcontrol_chip(kcontrol); - u8 v; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DIG_INFO1, &v); - v = (v & ~0x3e) | (ucontrol->value.iec958.status[0] & 0x3e); - onyx_write_register(onyx, ONYX_REG_DIG_INFO1, v); - - v = ucontrol->value.iec958.status[1]; - onyx_write_register(onyx, ONYX_REG_DIG_INFO2, v); - - onyx_read_register(onyx, ONYX_REG_DIG_INFO3, &v); - v = (v & ~0x3f) | (ucontrol->value.iec958.status[3] & 0x3f); - onyx_write_register(onyx, ONYX_REG_DIG_INFO3, v); - - onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); - v = (v & ~0x0f) | (ucontrol->value.iec958.status[4] & 0x0f); - onyx_write_register(onyx, ONYX_REG_DIG_INFO4, v); - mutex_unlock(&onyx->mutex); - - return 1; -} - -static struct snd_kcontrol_new onyx_spdif_ctrl = { - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .iface = SNDRV_CTL_ELEM_IFACE_PCM, - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), - .info = onyx_spdif_info, - .get = onyx_spdif_get, - .put = onyx_spdif_put, -}; - -/* our registers */ - -static u8 register_map[] = { - ONYX_REG_DAC_ATTEN_LEFT, - ONYX_REG_DAC_ATTEN_RIGHT, - ONYX_REG_CONTROL, - ONYX_REG_DAC_CONTROL, - ONYX_REG_DAC_DEEMPH, - ONYX_REG_DAC_FILTER, - ONYX_REG_DAC_OUTPHASE, - ONYX_REG_ADC_CONTROL, - ONYX_REG_ADC_HPF_BYPASS, - ONYX_REG_DIG_INFO1, - ONYX_REG_DIG_INFO2, - ONYX_REG_DIG_INFO3, - ONYX_REG_DIG_INFO4 -}; - -static u8 initial_values[ARRAY_SIZE(register_map)] = { - 0x80, 0x80, /* muted */ - ONYX_MRST | ONYX_SRST, /* but handled specially! */ - ONYX_MUTE_LEFT | ONYX_MUTE_RIGHT, - 0, /* no deemphasis */ - ONYX_DAC_FILTER_ALWAYS, - ONYX_OUTPHASE_INVERTED, - (-1 /*dB*/ + 8) & 0xF, /* line in selected, -1 dB gain*/ - ONYX_ADC_HPF_ALWAYS, - (1<<2), /* pcm audio */ - 2, /* category: pcm coder */ - 0, /* sampling frequency 44.1 kHz, clock accuracy level II */ - 1 /* 24 bit depth */ -}; - -/* reset registers of chip, either to initial or to previous values */ -static int onyx_register_init(struct onyx *onyx) -{ - int i; - u8 val; - u8 regs[sizeof(initial_values)]; - - if (!onyx->initialised) { - memcpy(regs, initial_values, sizeof(initial_values)); - if (onyx_read_register(onyx, ONYX_REG_CONTROL, &val)) - return -1; - val &= ~ONYX_SILICONVERSION; - val |= initial_values[3]; - regs[3] = val; - } else { - for (i=0; icache[register_map[i]-FIRSTREGISTER]; - } - - for (i=0; iinitialised = 1; - return 0; -} - -static struct transfer_info onyx_transfers[] = { - /* this is first so we can skip it if no input is present... - * No hardware exists with that, but it's here as an example - * of what to do :) */ - { - /* analog input */ - .formats = SNDRV_PCM_FMTBIT_S8 | - SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_8000_96000, - .transfer_in = 1, - .must_be_clock_source = 0, - .tag = 0, - }, - { - /* if analog and digital are currently off, anything should go, - * so this entry describes everything we can do... */ - .formats = SNDRV_PCM_FMTBIT_S8 | - SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE -#ifdef SNDRV_PCM_FMTBIT_COMPRESSED_16BE - | SNDRV_PCM_FMTBIT_COMPRESSED_16BE -#endif - , - .rates = SNDRV_PCM_RATE_8000_96000, - .tag = 0, - }, - { - /* analog output */ - .formats = SNDRV_PCM_FMTBIT_S8 | - SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_8000_96000, - .transfer_in = 0, - .must_be_clock_source = 0, - .tag = 1, - }, - { - /* digital pcm output, also possible for analog out */ - .formats = SNDRV_PCM_FMTBIT_S8 | - SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000, - .transfer_in = 0, - .must_be_clock_source = 0, - .tag = 2, - }, -#ifdef SNDRV_PCM_FMTBIT_COMPRESSED_16BE -Once alsa gets supports for this kind of thing we can add it... - { - /* digital compressed output */ - .formats = SNDRV_PCM_FMTBIT_COMPRESSED_16BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000, - .tag = 2, - }, -#endif - {} -}; - -static int onyx_usable(struct codec_info_item *cii, - struct transfer_info *ti, - struct transfer_info *out) -{ - u8 v; - struct onyx *onyx = cii->codec_data; - int spdif_enabled, analog_enabled; - - mutex_lock(&onyx->mutex); - onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); - spdif_enabled = !!(v & ONYX_SPDIF_ENABLE); - onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); - analog_enabled = - (v & (ONYX_MUTE_RIGHT|ONYX_MUTE_LEFT)) - != (ONYX_MUTE_RIGHT|ONYX_MUTE_LEFT); - mutex_unlock(&onyx->mutex); - - switch (ti->tag) { - case 0: return 1; - case 1: return analog_enabled; - case 2: return spdif_enabled; - } - return 1; -} - -static int onyx_prepare(struct codec_info_item *cii, - struct bus_info *bi, - struct snd_pcm_substream *substream) -{ - u8 v; - struct onyx *onyx = cii->codec_data; - int err = -EBUSY; - - mutex_lock(&onyx->mutex); - -#ifdef SNDRV_PCM_FMTBIT_COMPRESSED_16BE - if (substream->runtime->format == SNDRV_PCM_FMTBIT_COMPRESSED_16BE) { - /* mute and lock analog output */ - onyx_read_register(onyx, ONYX_REG_DAC_CONTROL, &v); - if (onyx_write_register(onyx - ONYX_REG_DAC_CONTROL, - v | ONYX_MUTE_RIGHT | ONYX_MUTE_LEFT)) - goto out_unlock; - onyx->analog_locked = 1; - err = 0; - goto out_unlock; - } -#endif - switch (substream->runtime->rate) { - case 32000: - case 44100: - case 48000: - /* these rates are ok for all outputs */ - /* FIXME: program spdif channel control bits here so that - * userspace doesn't have to if it only plays pcm! */ - err = 0; - goto out_unlock; - default: - /* got some rate that the digital output can't do, - * so disable and lock it */ - onyx_read_register(cii->codec_data, ONYX_REG_DIG_INFO4, &v); - if (onyx_write_register(onyx, - ONYX_REG_DIG_INFO4, - v & ~ONYX_SPDIF_ENABLE)) - goto out_unlock; - onyx->spdif_locked = 1; - err = 0; - goto out_unlock; - } - - out_unlock: - mutex_unlock(&onyx->mutex); - - return err; -} - -static int onyx_open(struct codec_info_item *cii, - struct snd_pcm_substream *substream) -{ - struct onyx *onyx = cii->codec_data; - - mutex_lock(&onyx->mutex); - onyx->open_count++; - mutex_unlock(&onyx->mutex); - - return 0; -} - -static int onyx_close(struct codec_info_item *cii, - struct snd_pcm_substream *substream) -{ - struct onyx *onyx = cii->codec_data; - - mutex_lock(&onyx->mutex); - onyx->open_count--; - if (!onyx->open_count) - onyx->spdif_locked = onyx->analog_locked = 0; - mutex_unlock(&onyx->mutex); - - return 0; -} - -static int onyx_switch_clock(struct codec_info_item *cii, - enum clock_switch what) -{ - struct onyx *onyx = cii->codec_data; - - mutex_lock(&onyx->mutex); - /* this *MUST* be more elaborate later... */ - switch (what) { - case CLOCK_SWITCH_PREPARE_SLAVE: - onyx->codec.gpio->methods->all_amps_off(onyx->codec.gpio); - break; - case CLOCK_SWITCH_SLAVE: - onyx->codec.gpio->methods->all_amps_restore(onyx->codec.gpio); - break; - default: /* silence warning */ - break; - } - mutex_unlock(&onyx->mutex); - - return 0; -} - -#ifdef CONFIG_PM - -static int onyx_suspend(struct codec_info_item *cii, pm_message_t state) -{ - struct onyx *onyx = cii->codec_data; - u8 v; - int err = -ENXIO; - - mutex_lock(&onyx->mutex); - if (onyx_read_register(onyx, ONYX_REG_CONTROL, &v)) - goto out_unlock; - onyx_write_register(onyx, ONYX_REG_CONTROL, v | ONYX_ADPSV | ONYX_DAPSV); - /* Apple does a sleep here but the datasheet says to do it on resume */ - err = 0; - out_unlock: - mutex_unlock(&onyx->mutex); - - return err; -} - -static int onyx_resume(struct codec_info_item *cii) -{ - struct onyx *onyx = cii->codec_data; - u8 v; - int err = -ENXIO; - - mutex_lock(&onyx->mutex); - /* take codec out of suspend */ - if (onyx_read_register(onyx, ONYX_REG_CONTROL, &v)) - goto out_unlock; - onyx_write_register(onyx, ONYX_REG_CONTROL, v & ~(ONYX_ADPSV | ONYX_DAPSV)); - /* FIXME: should divide by sample rate, but 8k is the lowest we go */ - msleep(2205000/8000); - /* reset all values */ - onyx_register_init(onyx); - err = 0; - out_unlock: - mutex_unlock(&onyx->mutex); - - return err; -} - -#endif /* CONFIG_PM */ - -static struct codec_info onyx_codec_info = { - .transfers = onyx_transfers, - .sysclock_factor = 256, - .bus_factor = 64, - .owner = THIS_MODULE, - .usable = onyx_usable, - .prepare = onyx_prepare, - .open = onyx_open, - .close = onyx_close, - .switch_clock = onyx_switch_clock, -#ifdef CONFIG_PM - .suspend = onyx_suspend, - .resume = onyx_resume, -#endif -}; - -static int onyx_init_codec(struct aoa_codec *codec) -{ - struct onyx *onyx = codec_to_onyx(codec); - struct snd_kcontrol *ctl; - struct codec_info *ci = &onyx_codec_info; - u8 v; - int err; - - if (!onyx->codec.gpio || !onyx->codec.gpio->methods) { - printk(KERN_ERR PFX "gpios not assigned!!\n"); - return -EINVAL; - } - - onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); - msleep(1); - onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); - msleep(1); - onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); - msleep(1); - - if (onyx_register_init(onyx)) { - printk(KERN_ERR PFX "failed to initialise onyx registers\n"); - return -ENODEV; - } - - if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, onyx, &ops)) { - printk(KERN_ERR PFX "failed to create onyx snd device!\n"); - return -ENODEV; - } - - /* nothing connected? what a joke! */ - if ((onyx->codec.connected & 0xF) == 0) - return -ENOTCONN; - - /* if no inputs are present... */ - if ((onyx->codec.connected & 0xC) == 0) { - if (!onyx->codec_info) - onyx->codec_info = kmalloc(sizeof(struct codec_info), GFP_KERNEL); - if (!onyx->codec_info) - return -ENOMEM; - ci = onyx->codec_info; - *ci = onyx_codec_info; - ci->transfers++; - } - - /* if no outputs are present... */ - if ((onyx->codec.connected & 3) == 0) { - if (!onyx->codec_info) - onyx->codec_info = kmalloc(sizeof(struct codec_info), GFP_KERNEL); - if (!onyx->codec_info) - return -ENOMEM; - ci = onyx->codec_info; - /* this is fine as there have to be inputs - * if we end up in this part of the code */ - *ci = onyx_codec_info; - ci->transfers[1].formats = 0; - } - - if (onyx->codec.soundbus_dev->attach_codec(onyx->codec.soundbus_dev, - aoa_get_card(), - ci, onyx)) { - printk(KERN_ERR PFX "error creating onyx pcm\n"); - return -ENODEV; - } -#define ADDCTL(n) \ - do { \ - ctl = snd_ctl_new1(&n, onyx); \ - if (ctl) { \ - ctl->id.device = \ - onyx->codec.soundbus_dev->pcm->device; \ - err = aoa_snd_ctl_add(ctl); \ - if (err) \ - goto error; \ - } \ - } while (0) - - if (onyx->codec.soundbus_dev->pcm) { - /* give the user appropriate controls - * depending on what inputs are connected */ - if ((onyx->codec.connected & 0xC) == 0xC) - ADDCTL(capture_source_control); - else if (onyx->codec.connected & 4) - onyx_set_capture_source(onyx, 0); - else - onyx_set_capture_source(onyx, 1); - if (onyx->codec.connected & 0xC) - ADDCTL(inputgain_control); - - /* depending on what output is connected, - * give the user appropriate controls */ - if (onyx->codec.connected & 1) { - ADDCTL(volume_control); - ADDCTL(mute_control); - ADDCTL(ovr1_control); - ADDCTL(flt0_control); - ADDCTL(hpf_control); - ADDCTL(dm12_control); - /* spdif control defaults to off */ - } - if (onyx->codec.connected & 2) { - ADDCTL(onyx_spdif_mask); - ADDCTL(onyx_spdif_ctrl); - } - if ((onyx->codec.connected & 3) == 3) - ADDCTL(spdif_control); - /* if only S/PDIF is connected, enable it unconditionally */ - if ((onyx->codec.connected & 3) == 2) { - onyx_read_register(onyx, ONYX_REG_DIG_INFO4, &v); - v |= ONYX_SPDIF_ENABLE; - onyx_write_register(onyx, ONYX_REG_DIG_INFO4, v); - } - } -#undef ADDCTL - printk(KERN_INFO PFX "attached to onyx codec via i2c\n"); - - return 0; - error: - onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); - snd_device_free(aoa_get_card(), onyx); - return err; -} - -static void onyx_exit_codec(struct aoa_codec *codec) -{ - struct onyx *onyx = codec_to_onyx(codec); - - if (!onyx->codec.soundbus_dev) { - printk(KERN_ERR PFX "onyx_exit_codec called without soundbus_dev!\n"); - return; - } - onyx->codec.soundbus_dev->detach_codec(onyx->codec.soundbus_dev, onyx); -} - -static struct i2c_driver onyx_driver; - -static int onyx_create(struct i2c_adapter *adapter, - struct device_node *node, - int addr) -{ - struct onyx *onyx; - u8 dummy; - - onyx = kzalloc(sizeof(struct onyx), GFP_KERNEL); - - if (!onyx) - return -ENOMEM; - - mutex_init(&onyx->mutex); - onyx->i2c.driver = &onyx_driver; - onyx->i2c.adapter = adapter; - onyx->i2c.addr = addr & 0x7f; - strlcpy(onyx->i2c.name, "onyx audio codec", I2C_NAME_SIZE-1); - - if (i2c_attach_client(&onyx->i2c)) { - printk(KERN_ERR PFX "failed to attach to i2c\n"); - goto fail; - } - - /* we try to read from register ONYX_REG_CONTROL - * to check if the codec is present */ - if (onyx_read_register(onyx, ONYX_REG_CONTROL, &dummy) != 0) { - i2c_detach_client(&onyx->i2c); - printk(KERN_ERR PFX "failed to read control register\n"); - goto fail; - } - - strlcpy(onyx->codec.name, "onyx", MAX_CODEC_NAME_LEN-1); - onyx->codec.owner = THIS_MODULE; - onyx->codec.init = onyx_init_codec; - onyx->codec.exit = onyx_exit_codec; - onyx->codec.node = of_node_get(node); - - if (aoa_codec_register(&onyx->codec)) { - i2c_detach_client(&onyx->i2c); - goto fail; - } - printk(KERN_DEBUG PFX "created and attached onyx instance\n"); - return 0; - fail: - kfree(onyx); - return -EINVAL; -} - -static int onyx_i2c_attach(struct i2c_adapter *adapter) -{ - struct device_node *busnode, *dev = NULL; - struct pmac_i2c_bus *bus; - - bus = pmac_i2c_adapter_to_bus(adapter); - if (bus == NULL) - return -ENODEV; - busnode = pmac_i2c_get_bus_node(bus); - - while ((dev = of_get_next_child(busnode, dev)) != NULL) { - if (device_is_compatible(dev, "pcm3052")) { - u32 *addr; - printk(KERN_DEBUG PFX "found pcm3052\n"); - addr = (u32 *) get_property(dev, "reg", NULL); - if (!addr) - return -ENODEV; - return onyx_create(adapter, dev, (*addr)>>1); - } - } - - /* if that didn't work, try desperate mode for older - * machines that have stuff missing from the device tree */ - - if (!device_is_compatible(busnode, "k2-i2c")) - return -ENODEV; - - printk(KERN_DEBUG PFX "found k2-i2c, checking if onyx chip is on it\n"); - /* probe both possible addresses for the onyx chip */ - if (onyx_create(adapter, NULL, 0x46) == 0) - return 0; - return onyx_create(adapter, NULL, 0x47); -} - -static int onyx_i2c_detach(struct i2c_client *client) -{ - struct onyx *onyx = container_of(client, struct onyx, i2c); - int err; - - if ((err = i2c_detach_client(client))) - return err; - aoa_codec_unregister(&onyx->codec); - of_node_put(onyx->codec.node); - if (onyx->codec_info) - kfree(onyx->codec_info); - kfree(onyx); - return 0; -} - -static struct i2c_driver onyx_driver = { - .driver = { - .name = "aoa_codec_onyx", - .owner = THIS_MODULE, - }, - .attach_adapter = onyx_i2c_attach, - .detach_client = onyx_i2c_detach, -}; - -static int __init onyx_init(void) -{ - return i2c_add_driver(&onyx_driver); -} - -static void __exit onyx_exit(void) -{ - i2c_del_driver(&onyx_driver); -} - -module_init(onyx_init); -module_exit(onyx_exit); diff --git a/sound/aoa/codecs/snd-aoa-codec-onyx.h b/sound/aoa/codecs/snd-aoa-codec-onyx.h deleted file mode 100644 index aeedda773..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-onyx.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Apple Onboard Audio driver for Onyx codec (header) - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#ifndef __SND_AOA_CODEC_ONYX_H -#define __SND_AOA_CODEC_ONYX_H -#include -#include -#include -#include -#include - -/* PCM3052 register definitions */ - -/* the attenuation registers take values from - * -1 (0dB) to -127 (-63.0 dB) or others (muted) */ -#define ONYX_REG_DAC_ATTEN_LEFT 65 -#define FIRSTREGISTER ONYX_REG_DAC_ATTEN_LEFT -#define ONYX_REG_DAC_ATTEN_RIGHT 66 - -#define ONYX_REG_CONTROL 67 -# define ONYX_MRST (1<<7) -# define ONYX_SRST (1<<6) -# define ONYX_ADPSV (1<<5) -# define ONYX_DAPSV (1<<4) -# define ONYX_SILICONVERSION (1<<0) -/* all others reserved */ - -#define ONYX_REG_DAC_CONTROL 68 -# define ONYX_OVR1 (1<<6) -# define ONYX_MUTE_RIGHT (1<<1) -# define ONYX_MUTE_LEFT (1<<0) - -#define ONYX_REG_DAC_DEEMPH 69 -# define ONYX_DIGDEEMPH_SHIFT 5 -# define ONYX_DIGDEEMPH_MASK (3<= 50) - result += tas3004_bass_diff_to_treble[idx-50]; - return result; -} diff --git a/sound/aoa/codecs/snd-aoa-codec-tas-gain-table.h b/sound/aoa/codecs/snd-aoa-codec-tas-gain-table.h deleted file mode 100644 index 4cfa67577..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-tas-gain-table.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - This is the program used to generate below table. - -#include -#include -int main() { - int dB2; - printf("/" "* This file is only included exactly once!\n"); - printf(" *\n"); - printf(" * If they'd only tell us that generating this table was\n"); - printf(" * as easy as calculating\n"); - printf(" * hwvalue = 1048576.0*exp(0.057564628*dB*2)\n"); - printf(" * :) *" "/\n"); - printf("static int tas_gaintable[] = {\n"); - printf(" 0x000000, /" "* -infinity dB *" "/\n"); - for (dB2=-140;dB2<=36;dB2++) - printf(" 0x%.6x, /" "* %-02.1f dB *" "/\n", (int)(1048576.0*exp(0.057564628*dB2)), dB2/2.0); - printf("};\n\n"); -} - -*/ - -/* This file is only included exactly once! - * - * If they'd only tell us that generating this table was - * as easy as calculating - * hwvalue = 1048576.0*exp(0.057564628*dB*2) - * :) */ -static int tas_gaintable[] = { - 0x000000, /* -infinity dB */ - 0x00014b, /* -70.0 dB */ - 0x00015f, /* -69.5 dB */ - 0x000174, /* -69.0 dB */ - 0x00018a, /* -68.5 dB */ - 0x0001a1, /* -68.0 dB */ - 0x0001ba, /* -67.5 dB */ - 0x0001d4, /* -67.0 dB */ - 0x0001f0, /* -66.5 dB */ - 0x00020d, /* -66.0 dB */ - 0x00022c, /* -65.5 dB */ - 0x00024d, /* -65.0 dB */ - 0x000270, /* -64.5 dB */ - 0x000295, /* -64.0 dB */ - 0x0002bc, /* -63.5 dB */ - 0x0002e6, /* -63.0 dB */ - 0x000312, /* -62.5 dB */ - 0x000340, /* -62.0 dB */ - 0x000372, /* -61.5 dB */ - 0x0003a6, /* -61.0 dB */ - 0x0003dd, /* -60.5 dB */ - 0x000418, /* -60.0 dB */ - 0x000456, /* -59.5 dB */ - 0x000498, /* -59.0 dB */ - 0x0004de, /* -58.5 dB */ - 0x000528, /* -58.0 dB */ - 0x000576, /* -57.5 dB */ - 0x0005c9, /* -57.0 dB */ - 0x000620, /* -56.5 dB */ - 0x00067d, /* -56.0 dB */ - 0x0006e0, /* -55.5 dB */ - 0x000748, /* -55.0 dB */ - 0x0007b7, /* -54.5 dB */ - 0x00082c, /* -54.0 dB */ - 0x0008a8, /* -53.5 dB */ - 0x00092b, /* -53.0 dB */ - 0x0009b6, /* -52.5 dB */ - 0x000a49, /* -52.0 dB */ - 0x000ae5, /* -51.5 dB */ - 0x000b8b, /* -51.0 dB */ - 0x000c3a, /* -50.5 dB */ - 0x000cf3, /* -50.0 dB */ - 0x000db8, /* -49.5 dB */ - 0x000e88, /* -49.0 dB */ - 0x000f64, /* -48.5 dB */ - 0x00104e, /* -48.0 dB */ - 0x001145, /* -47.5 dB */ - 0x00124b, /* -47.0 dB */ - 0x001361, /* -46.5 dB */ - 0x001487, /* -46.0 dB */ - 0x0015be, /* -45.5 dB */ - 0x001708, /* -45.0 dB */ - 0x001865, /* -44.5 dB */ - 0x0019d8, /* -44.0 dB */ - 0x001b60, /* -43.5 dB */ - 0x001cff, /* -43.0 dB */ - 0x001eb7, /* -42.5 dB */ - 0x002089, /* -42.0 dB */ - 0x002276, /* -41.5 dB */ - 0x002481, /* -41.0 dB */ - 0x0026ab, /* -40.5 dB */ - 0x0028f5, /* -40.0 dB */ - 0x002b63, /* -39.5 dB */ - 0x002df5, /* -39.0 dB */ - 0x0030ae, /* -38.5 dB */ - 0x003390, /* -38.0 dB */ - 0x00369e, /* -37.5 dB */ - 0x0039db, /* -37.0 dB */ - 0x003d49, /* -36.5 dB */ - 0x0040ea, /* -36.0 dB */ - 0x0044c3, /* -35.5 dB */ - 0x0048d6, /* -35.0 dB */ - 0x004d27, /* -34.5 dB */ - 0x0051b9, /* -34.0 dB */ - 0x005691, /* -33.5 dB */ - 0x005bb2, /* -33.0 dB */ - 0x006121, /* -32.5 dB */ - 0x0066e3, /* -32.0 dB */ - 0x006cfb, /* -31.5 dB */ - 0x007370, /* -31.0 dB */ - 0x007a48, /* -30.5 dB */ - 0x008186, /* -30.0 dB */ - 0x008933, /* -29.5 dB */ - 0x009154, /* -29.0 dB */ - 0x0099f1, /* -28.5 dB */ - 0x00a310, /* -28.0 dB */ - 0x00acba, /* -27.5 dB */ - 0x00b6f6, /* -27.0 dB */ - 0x00c1cd, /* -26.5 dB */ - 0x00cd49, /* -26.0 dB */ - 0x00d973, /* -25.5 dB */ - 0x00e655, /* -25.0 dB */ - 0x00f3fb, /* -24.5 dB */ - 0x010270, /* -24.0 dB */ - 0x0111c0, /* -23.5 dB */ - 0x0121f9, /* -23.0 dB */ - 0x013328, /* -22.5 dB */ - 0x01455b, /* -22.0 dB */ - 0x0158a2, /* -21.5 dB */ - 0x016d0e, /* -21.0 dB */ - 0x0182af, /* -20.5 dB */ - 0x019999, /* -20.0 dB */ - 0x01b1de, /* -19.5 dB */ - 0x01cb94, /* -19.0 dB */ - 0x01e6cf, /* -18.5 dB */ - 0x0203a7, /* -18.0 dB */ - 0x022235, /* -17.5 dB */ - 0x024293, /* -17.0 dB */ - 0x0264db, /* -16.5 dB */ - 0x02892c, /* -16.0 dB */ - 0x02afa3, /* -15.5 dB */ - 0x02d862, /* -15.0 dB */ - 0x03038a, /* -14.5 dB */ - 0x033142, /* -14.0 dB */ - 0x0361af, /* -13.5 dB */ - 0x0394fa, /* -13.0 dB */ - 0x03cb50, /* -12.5 dB */ - 0x0404de, /* -12.0 dB */ - 0x0441d5, /* -11.5 dB */ - 0x048268, /* -11.0 dB */ - 0x04c6d0, /* -10.5 dB */ - 0x050f44, /* -10.0 dB */ - 0x055c04, /* -9.5 dB */ - 0x05ad50, /* -9.0 dB */ - 0x06036e, /* -8.5 dB */ - 0x065ea5, /* -8.0 dB */ - 0x06bf44, /* -7.5 dB */ - 0x07259d, /* -7.0 dB */ - 0x079207, /* -6.5 dB */ - 0x0804dc, /* -6.0 dB */ - 0x087e80, /* -5.5 dB */ - 0x08ff59, /* -5.0 dB */ - 0x0987d5, /* -4.5 dB */ - 0x0a1866, /* -4.0 dB */ - 0x0ab189, /* -3.5 dB */ - 0x0b53be, /* -3.0 dB */ - 0x0bff91, /* -2.5 dB */ - 0x0cb591, /* -2.0 dB */ - 0x0d765a, /* -1.5 dB */ - 0x0e4290, /* -1.0 dB */ - 0x0f1adf, /* -0.5 dB */ - 0x100000, /* 0.0 dB */ - 0x10f2b4, /* 0.5 dB */ - 0x11f3c9, /* 1.0 dB */ - 0x13041a, /* 1.5 dB */ - 0x14248e, /* 2.0 dB */ - 0x15561a, /* 2.5 dB */ - 0x1699c0, /* 3.0 dB */ - 0x17f094, /* 3.5 dB */ - 0x195bb8, /* 4.0 dB */ - 0x1adc61, /* 4.5 dB */ - 0x1c73d5, /* 5.0 dB */ - 0x1e236d, /* 5.5 dB */ - 0x1fec98, /* 6.0 dB */ - 0x21d0d9, /* 6.5 dB */ - 0x23d1cd, /* 7.0 dB */ - 0x25f125, /* 7.5 dB */ - 0x2830af, /* 8.0 dB */ - 0x2a9254, /* 8.5 dB */ - 0x2d1818, /* 9.0 dB */ - 0x2fc420, /* 9.5 dB */ - 0x3298b0, /* 10.0 dB */ - 0x35982f, /* 10.5 dB */ - 0x38c528, /* 11.0 dB */ - 0x3c224c, /* 11.5 dB */ - 0x3fb278, /* 12.0 dB */ - 0x4378b0, /* 12.5 dB */ - 0x477829, /* 13.0 dB */ - 0x4bb446, /* 13.5 dB */ - 0x5030a1, /* 14.0 dB */ - 0x54f106, /* 14.5 dB */ - 0x59f980, /* 15.0 dB */ - 0x5f4e52, /* 15.5 dB */ - 0x64f403, /* 16.0 dB */ - 0x6aef5e, /* 16.5 dB */ - 0x714575, /* 17.0 dB */ - 0x77fbaa, /* 17.5 dB */ - 0x7f17af, /* 18.0 dB */ -}; - diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c deleted file mode 100644 index 16c0b6b0a..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-tas.c +++ /dev/null @@ -1,935 +0,0 @@ -/* - * Apple Onboard Audio driver for tas codec - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - * - * Open questions: - * - How to distinguish between 3004 and versions? - * - * FIXMEs: - * - This codec driver doesn't honour the 'connected' - * property of the aoa_codec struct, hence if - * it is used in machines where not everything is - * connected it will display wrong mixer elements. - * - Driver assumes that the microphone is always - * monaureal and connected to the right channel of - * the input. This should also be a codec-dependent - * flag, maybe the codec should have 3 different - * bits for the three different possibilities how - * it can be hooked up... - * But as long as I don't see any hardware hooked - * up that way... - * - As Apple notes in their code, the tas3004 seems - * to delay the right channel by one sample. You can - * see this when for example recording stereo in - * audacity, or recording the tas output via cable - * on another machine (use a sinus generator or so). - * I tried programming the BiQuads but couldn't - * make the delay work, maybe someone can read the - * datasheet and fix it. The relevant Apple comment - * is in AppleTAS3004Audio.cpp lines 1637 ff. Note - * that their comment describing how they program - * the filters sucks... - * - * Other things: - * - this should actually register *two* aoa_codec - * structs since it has two inputs. Then it must - * use the prepare callback to forbid running the - * secondary output on a different clock. - * Also, whatever bus knows how to do this must - * provide two soundbus_dev devices and the fabric - * must be able to link them correctly. - * - * I don't even know if Apple ever uses the second - * port on the tas3004 though, I don't think their - * i2s controllers can even do it. OTOH, they all - * derive the clocks from common clocks, so it - * might just be possible. The framework allows the - * codec to refine the transfer_info items in the - * usable callback, so we can simply remove the - * rates the second instance is not using when it - * actually is in use. - * Maybe we'll need to make the sound busses have - * a 'clock group id' value so the codec can - * determine if the two outputs can be driven at - * the same time. But that is likely overkill, up - * to the fabric to not link them up incorrectly, - * and up to the hardware designer to not wire - * them up in some weird unusable way. - */ -#include -#include -#include -#include -#include -#include -#include -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("tas codec driver for snd-aoa"); - -#include "snd-aoa-codec-tas.h" -#include "snd-aoa-codec-tas-gain-table.h" -#include "snd-aoa-codec-tas-basstreble.h" -#include "../aoa.h" -#include "../soundbus/soundbus.h" - -#define PFX "snd-aoa-codec-tas: " - - -struct tas { - struct aoa_codec codec; - struct i2c_client i2c; - u32 mute_l:1, mute_r:1 , - controls_created:1 , - drc_enabled:1, - hw_enabled:1; - u8 cached_volume_l, cached_volume_r; - u8 mixer_l[3], mixer_r[3]; - u8 bass, treble; - u8 acr; - int drc_range; -}; - -static int tas_reset_init(struct tas *tas); - -static struct tas *codec_to_tas(struct aoa_codec *codec) -{ - return container_of(codec, struct tas, codec); -} - -static inline int tas_write_reg(struct tas *tas, u8 reg, u8 len, u8 *data) -{ - if (len == 1) - return i2c_smbus_write_byte_data(&tas->i2c, reg, *data); - else - return i2c_smbus_write_i2c_block_data(&tas->i2c, reg, len, data); -} - -static void tas3004_set_drc(struct tas *tas) -{ - unsigned char val[6]; - - if (tas->drc_enabled) - val[0] = 0x50; /* 3:1 above threshold */ - else - val[0] = 0x51; /* disabled */ - val[1] = 0x02; /* 1:1 below threshold */ - if (tas->drc_range > 0xef) - val[2] = 0xef; - else if (tas->drc_range < 0) - val[2] = 0x00; - else - val[2] = tas->drc_range; - val[3] = 0xb0; - val[4] = 0x60; - val[5] = 0xa0; - - tas_write_reg(tas, TAS_REG_DRC, 6, val); -} - -static void tas_set_treble(struct tas *tas) -{ - u8 tmp; - - tmp = tas3004_treble(tas->treble); - tas_write_reg(tas, TAS_REG_TREBLE, 1, &tmp); -} - -static void tas_set_bass(struct tas *tas) -{ - u8 tmp; - - tmp = tas3004_bass(tas->bass); - tas_write_reg(tas, TAS_REG_BASS, 1, &tmp); -} - -static void tas_set_volume(struct tas *tas) -{ - u8 block[6]; - int tmp; - u8 left, right; - - left = tas->cached_volume_l; - right = tas->cached_volume_r; - - if (left > 177) left = 177; - if (right > 177) right = 177; - - if (tas->mute_l) left = 0; - if (tas->mute_r) right = 0; - - /* analysing the volume and mixer tables shows - * that they are similar enough when we shift - * the mixer table down by 4 bits. The error - * is miniscule, in just one item the error - * is 1, at a value of 0x07f17b (mixer table - * value is 0x07f17a) */ - tmp = tas_gaintable[left]; - block[0] = tmp>>20; - block[1] = tmp>>12; - block[2] = tmp>>4; - tmp = tas_gaintable[right]; - block[3] = tmp>>20; - block[4] = tmp>>12; - block[5] = tmp>>4; - tas_write_reg(tas, TAS_REG_VOL, 6, block); -} - -static void tas_set_mixer(struct tas *tas) -{ - u8 block[9]; - int tmp, i; - u8 val; - - for (i=0;i<3;i++) { - val = tas->mixer_l[i]; - if (val > 177) val = 177; - tmp = tas_gaintable[val]; - block[3*i+0] = tmp>>16; - block[3*i+1] = tmp>>8; - block[3*i+2] = tmp; - } - tas_write_reg(tas, TAS_REG_LMIX, 9, block); - - for (i=0;i<3;i++) { - val = tas->mixer_r[i]; - if (val > 177) val = 177; - tmp = tas_gaintable[val]; - block[3*i+0] = tmp>>16; - block[3*i+1] = tmp>>8; - block[3*i+2] = tmp; - } - tas_write_reg(tas, TAS_REG_RMIX, 9, block); -} - -/* alsa stuff */ - -static int tas_dev_register(struct snd_device *dev) -{ - return 0; -} - -static struct snd_device_ops ops = { - .dev_register = tas_dev_register, -}; - -static int tas_snd_vol_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 177; - return 0; -} - -static int tas_snd_vol_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = tas->cached_volume_l; - ucontrol->value.integer.value[1] = tas->cached_volume_r; - return 0; -} - -static int tas_snd_vol_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->cached_volume_l == ucontrol->value.integer.value[0] - && tas->cached_volume_r == ucontrol->value.integer.value[1]) - return 0; - - tas->cached_volume_l = ucontrol->value.integer.value[0]; - tas->cached_volume_r = ucontrol->value.integer.value[1]; - if (tas->hw_enabled) - tas_set_volume(tas); - return 1; -} - -static struct snd_kcontrol_new volume_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Volume", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_vol_info, - .get = tas_snd_vol_get, - .put = tas_snd_vol_put, -}; - -static int tas_snd_mute_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int tas_snd_mute_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = !tas->mute_l; - ucontrol->value.integer.value[1] = !tas->mute_r; - return 0; -} - -static int tas_snd_mute_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->mute_l == !ucontrol->value.integer.value[0] - && tas->mute_r == !ucontrol->value.integer.value[1]) - return 0; - - tas->mute_l = !ucontrol->value.integer.value[0]; - tas->mute_r = !ucontrol->value.integer.value[1]; - if (tas->hw_enabled) - tas_set_volume(tas); - return 1; -} - -static struct snd_kcontrol_new mute_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Master Playback Switch", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_mute_info, - .get = tas_snd_mute_get, - .put = tas_snd_mute_put, -}; - -static int tas_snd_mixer_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 177; - return 0; -} - -static int tas_snd_mixer_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - int idx = kcontrol->private_value; - - ucontrol->value.integer.value[0] = tas->mixer_l[idx]; - ucontrol->value.integer.value[1] = tas->mixer_r[idx]; - - return 0; -} - -static int tas_snd_mixer_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - int idx = kcontrol->private_value; - - if (tas->mixer_l[idx] == ucontrol->value.integer.value[0] - && tas->mixer_r[idx] == ucontrol->value.integer.value[1]) - return 0; - - tas->mixer_l[idx] = ucontrol->value.integer.value[0]; - tas->mixer_r[idx] = ucontrol->value.integer.value[1]; - - if (tas->hw_enabled) - tas_set_mixer(tas); - return 1; -} - -#define MIXER_CONTROL(n,descr,idx) \ -static struct snd_kcontrol_new n##_control = { \ - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ - .name = descr " Playback Volume", \ - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \ - .info = tas_snd_mixer_info, \ - .get = tas_snd_mixer_get, \ - .put = tas_snd_mixer_put, \ - .private_value = idx, \ -} - -MIXER_CONTROL(pcm1, "PCM", 0); -MIXER_CONTROL(monitor, "Monitor", 2); - -static int tas_snd_drc_range_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = TAS3004_DRC_MAX; - return 0; -} - -static int tas_snd_drc_range_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = tas->drc_range; - return 0; -} - -static int tas_snd_drc_range_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->drc_range == ucontrol->value.integer.value[0]) - return 0; - - tas->drc_range = ucontrol->value.integer.value[0]; - if (tas->hw_enabled) - tas3004_set_drc(tas); - return 1; -} - -static struct snd_kcontrol_new drc_range_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DRC Range", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_drc_range_info, - .get = tas_snd_drc_range_get, - .put = tas_snd_drc_range_put, -}; - -static int tas_snd_drc_switch_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int tas_snd_drc_switch_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = tas->drc_enabled; - return 0; -} - -static int tas_snd_drc_switch_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->drc_enabled == ucontrol->value.integer.value[0]) - return 0; - - tas->drc_enabled = ucontrol->value.integer.value[0]; - if (tas->hw_enabled) - tas3004_set_drc(tas); - return 1; -} - -static struct snd_kcontrol_new drc_switch_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "DRC Range Switch", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_drc_switch_info, - .get = tas_snd_drc_switch_get, - .put = tas_snd_drc_switch_put, -}; - -static int tas_snd_capture_source_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *texts[] = { "Line-In", "Microphone" }; - - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 2; - if (uinfo->value.enumerated.item > 1) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; -} - -static int tas_snd_capture_source_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.enumerated.item[0] = !!(tas->acr & TAS_ACR_INPUT_B); - return 0; -} - -static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - int oldacr = tas->acr; - - tas->acr &= ~TAS_ACR_INPUT_B; - if (ucontrol->value.enumerated.item[0]) - tas->acr |= TAS_ACR_INPUT_B; - if (oldacr == tas->acr) - return 0; - if (tas->hw_enabled) - tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); - return 1; -} - -static struct snd_kcontrol_new capture_source_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* If we name this 'Input Source', it properly shows up in - * alsamixer as a selection, * but it's shown under the - * 'Playback' category. - * If I name it 'Capture Source', it shows up in strange - * ways (two bools of which one can be selected at a - * time) but at least it's shown in the 'Capture' - * category. - * I was told that this was due to backward compatibility, - * but I don't understand then why the mangling is *not* - * done when I name it "Input Source"..... - */ - .name = "Capture Source", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_capture_source_info, - .get = tas_snd_capture_source_get, - .put = tas_snd_capture_source_put, -}; - -static int tas_snd_treble_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = TAS3004_TREBLE_MIN; - uinfo->value.integer.max = TAS3004_TREBLE_MAX; - return 0; -} - -static int tas_snd_treble_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = tas->treble; - return 0; -} - -static int tas_snd_treble_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->treble == ucontrol->value.integer.value[0]) - return 0; - - tas->treble = ucontrol->value.integer.value[0]; - if (tas->hw_enabled) - tas_set_treble(tas); - return 1; -} - -static struct snd_kcontrol_new treble_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Treble", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_treble_info, - .get = tas_snd_treble_get, - .put = tas_snd_treble_put, -}; - -static int tas_snd_bass_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = TAS3004_BASS_MIN; - uinfo->value.integer.max = TAS3004_BASS_MAX; - return 0; -} - -static int tas_snd_bass_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = tas->bass; - return 0; -} - -static int tas_snd_bass_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct tas *tas = snd_kcontrol_chip(kcontrol); - - if (tas->bass == ucontrol->value.integer.value[0]) - return 0; - - tas->bass = ucontrol->value.integer.value[0]; - if (tas->hw_enabled) - tas_set_bass(tas); - return 1; -} - -static struct snd_kcontrol_new bass_control = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Bass", - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = tas_snd_bass_info, - .get = tas_snd_bass_get, - .put = tas_snd_bass_put, -}; - -static struct transfer_info tas_transfers[] = { - { - /* input */ - .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, - .transfer_in = 1, - }, - { - /* output */ - .formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, - .transfer_in = 0, - }, - {} -}; - -static int tas_usable(struct codec_info_item *cii, - struct transfer_info *ti, - struct transfer_info *out) -{ - return 1; -} - -static int tas_reset_init(struct tas *tas) -{ - u8 tmp; - - tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); - msleep(5); - tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); - msleep(5); - tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1); - msleep(20); - tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); - msleep(10); - tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); - - tmp = TAS_MCS_SCLK64 | TAS_MCS_SPORT_MODE_I2S | TAS_MCS_SPORT_WL_24BIT; - if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) - return -ENODEV; - - tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL | - TAS_ACR_B_MON_SEL_RIGHT; - if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) - return -ENODEV; - - tmp = 0; - if (tas_write_reg(tas, TAS_REG_MCS2, 1, &tmp)) - return -ENODEV; - - tas3004_set_drc(tas); - - /* Set treble & bass to 0dB */ - tas->treble = TAS3004_TREBLE_ZERO; - tas->bass = TAS3004_BASS_ZERO; - tas_set_treble(tas); - tas_set_bass(tas); - - tas->acr &= ~TAS_ACR_ANALOG_PDOWN; - if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) - return -ENODEV; - - return 0; -} - -static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock) -{ - struct tas *tas = cii->codec_data; - - switch(clock) { - case CLOCK_SWITCH_PREPARE_SLAVE: - /* Clocks are going away, mute mute mute */ - tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); - tas->hw_enabled = 0; - break; - case CLOCK_SWITCH_SLAVE: - /* Clocks are back, re-init the codec */ - tas_reset_init(tas); - tas_set_volume(tas); - tas_set_mixer(tas); - tas->hw_enabled = 1; - tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); - break; - default: - /* doesn't happen as of now */ - return -EINVAL; - } - return 0; -} - -/* we are controlled via i2c and assume that is always up - * If that wasn't the case, we'd have to suspend once - * our i2c device is suspended, and then take note of that! */ -static int tas_suspend(struct tas *tas) -{ - tas->hw_enabled = 0; - tas->acr |= TAS_ACR_ANALOG_PDOWN; - tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr); - return 0; -} - -static int tas_resume(struct tas *tas) -{ - /* reset codec */ - tas_reset_init(tas); - tas_set_volume(tas); - tas_set_mixer(tas); - tas->hw_enabled = 1; - return 0; -} - -#ifdef CONFIG_PM -static int _tas_suspend(struct codec_info_item *cii, pm_message_t state) -{ - return tas_suspend(cii->codec_data); -} - -static int _tas_resume(struct codec_info_item *cii) -{ - return tas_resume(cii->codec_data); -} -#endif - -static struct codec_info tas_codec_info = { - .transfers = tas_transfers, - /* in theory, we can drive it at 512 too... - * but so far the framework doesn't allow - * for that and I don't see much point in it. */ - .sysclock_factor = 256, - /* same here, could be 32 for just one 16 bit format */ - .bus_factor = 64, - .owner = THIS_MODULE, - .usable = tas_usable, - .switch_clock = tas_switch_clock, -#ifdef CONFIG_PM - .suspend = _tas_suspend, - .resume = _tas_resume, -#endif -}; - -static int tas_init_codec(struct aoa_codec *codec) -{ - struct tas *tas = codec_to_tas(codec); - int err; - - if (!tas->codec.gpio || !tas->codec.gpio->methods) { - printk(KERN_ERR PFX "gpios not assigned!!\n"); - return -EINVAL; - } - - if (tas_reset_init(tas)) { - printk(KERN_ERR PFX "tas failed to initialise\n"); - return -ENXIO; - } - tas->hw_enabled = 1; - - if (tas->codec.soundbus_dev->attach_codec(tas->codec.soundbus_dev, - aoa_get_card(), - &tas_codec_info, tas)) { - printk(KERN_ERR PFX "error attaching tas to soundbus\n"); - return -ENODEV; - } - - if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, tas, &ops)) { - printk(KERN_ERR PFX "failed to create tas snd device!\n"); - return -ENODEV; - } - err = aoa_snd_ctl_add(snd_ctl_new1(&volume_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&mute_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&pcm1_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&monitor_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&capture_source_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&drc_range_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&drc_switch_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&treble_control, tas)); - if (err) - goto error; - - err = aoa_snd_ctl_add(snd_ctl_new1(&bass_control, tas)); - if (err) - goto error; - - return 0; - error: - tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas); - snd_device_free(aoa_get_card(), tas); - return err; -} - -static void tas_exit_codec(struct aoa_codec *codec) -{ - struct tas *tas = codec_to_tas(codec); - - if (!tas->codec.soundbus_dev) - return; - tas->codec.soundbus_dev->detach_codec(tas->codec.soundbus_dev, tas); -} - - -static struct i2c_driver tas_driver; - -static int tas_create(struct i2c_adapter *adapter, - struct device_node *node, - int addr) -{ - struct tas *tas; - - tas = kzalloc(sizeof(struct tas), GFP_KERNEL); - - if (!tas) - return -ENOMEM; - - tas->i2c.driver = &tas_driver; - tas->i2c.adapter = adapter; - tas->i2c.addr = addr; - /* seems that half is a saner default */ - tas->drc_range = TAS3004_DRC_MAX / 2; - strlcpy(tas->i2c.name, "tas audio codec", I2C_NAME_SIZE-1); - - if (i2c_attach_client(&tas->i2c)) { - printk(KERN_ERR PFX "failed to attach to i2c\n"); - goto fail; - } - - strlcpy(tas->codec.name, "tas", MAX_CODEC_NAME_LEN-1); - tas->codec.owner = THIS_MODULE; - tas->codec.init = tas_init_codec; - tas->codec.exit = tas_exit_codec; - tas->codec.node = of_node_get(node); - - if (aoa_codec_register(&tas->codec)) { - goto detach; - } - printk(KERN_DEBUG - "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n", - addr, node->full_name); - return 0; - detach: - i2c_detach_client(&tas->i2c); - fail: - kfree(tas); - return -EINVAL; -} - -static int tas_i2c_attach(struct i2c_adapter *adapter) -{ - struct device_node *busnode, *dev = NULL; - struct pmac_i2c_bus *bus; - - bus = pmac_i2c_adapter_to_bus(adapter); - if (bus == NULL) - return -ENODEV; - busnode = pmac_i2c_get_bus_node(bus); - - while ((dev = of_get_next_child(busnode, dev)) != NULL) { - if (device_is_compatible(dev, "tas3004")) { - u32 *addr; - printk(KERN_DEBUG PFX "found tas3004\n"); - addr = (u32 *) get_property(dev, "reg", NULL); - if (!addr) - continue; - return tas_create(adapter, dev, ((*addr) >> 1) & 0x7f); - } - /* older machines have no 'codec' node with a 'compatible' - * property that says 'tas3004', they just have a 'deq' - * node without any such property... */ - if (strcmp(dev->name, "deq") == 0) { - u32 *_addr, addr; - printk(KERN_DEBUG PFX "found 'deq' node\n"); - _addr = (u32 *) get_property(dev, "i2c-address", NULL); - if (!_addr) - continue; - addr = ((*_addr) >> 1) & 0x7f; - /* now, if the address doesn't match any of the two - * that a tas3004 can have, we cannot handle this. - * I doubt it ever happens but hey. */ - if (addr != 0x34 && addr != 0x35) - continue; - return tas_create(adapter, dev, addr); - } - } - return -ENODEV; -} - -static int tas_i2c_detach(struct i2c_client *client) -{ - struct tas *tas = container_of(client, struct tas, i2c); - int err; - u8 tmp = TAS_ACR_ANALOG_PDOWN; - - if ((err = i2c_detach_client(client))) - return err; - aoa_codec_unregister(&tas->codec); - of_node_put(tas->codec.node); - - /* power down codec chip */ - tas_write_reg(tas, TAS_REG_ACR, 1, &tmp); - - kfree(tas); - return 0; -} - -static struct i2c_driver tas_driver = { - .driver = { - .name = "aoa_codec_tas", - .owner = THIS_MODULE, - }, - .attach_adapter = tas_i2c_attach, - .detach_client = tas_i2c_detach, -}; - -static int __init tas_init(void) -{ - return i2c_add_driver(&tas_driver); -} - -static void __exit tas_exit(void) -{ - i2c_del_driver(&tas_driver); -} - -module_init(tas_init); -module_exit(tas_exit); diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.h b/sound/aoa/codecs/snd-aoa-codec-tas.h deleted file mode 100644 index ae177e346..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-tas.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Apple Onboard Audio driver for tas codec (header) - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#ifndef __SND_AOA_CODECTASH -#define __SND_AOA_CODECTASH - -#define TAS_REG_MCS 0x01 /* main control */ -# define TAS_MCS_FASTLOAD (1<<7) -# define TAS_MCS_SCLK64 (1<<6) -# define TAS_MCS_SPORT_MODE_MASK (3<<4) -# define TAS_MCS_SPORT_MODE_I2S (2<<4) -# define TAS_MCS_SPORT_MODE_RJ (1<<4) -# define TAS_MCS_SPORT_MODE_LJ (0<<4) -# define TAS_MCS_SPORT_WL_MASK (3<<0) -# define TAS_MCS_SPORT_WL_16BIT (0<<0) -# define TAS_MCS_SPORT_WL_18BIT (1<<0) -# define TAS_MCS_SPORT_WL_20BIT (2<<0) -# define TAS_MCS_SPORT_WL_24BIT (3<<0) - -#define TAS_REG_DRC 0x02 -#define TAS_REG_VOL 0x04 -#define TAS_REG_TREBLE 0x05 -#define TAS_REG_BASS 0x06 -#define TAS_REG_LMIX 0x07 -#define TAS_REG_RMIX 0x08 - -#define TAS_REG_ACR 0x40 /* analog control */ -# define TAS_ACR_B_MONAUREAL (1<<7) -# define TAS_ACR_B_MON_SEL_RIGHT (1<<6) -# define TAS_ACR_DEEMPH_MASK (3<<2) -# define TAS_ACR_DEEMPH_OFF (0<<2) -# define TAS_ACR_DEEMPH_48KHz (1<<2) -# define TAS_ACR_DEEMPH_44KHz (2<<2) -# define TAS_ACR_INPUT_B (1<<1) -# define TAS_ACR_ANALOG_PDOWN (1<<0) - -#define TAS_REG_MCS2 0x43 /* main control 2 */ -# define TAS_MCS2_ALLPASS (1<<1) - -#define TAS_REG_LEFT_BIQUAD6 0x10 -#define TAS_REG_RIGHT_BIQUAD6 0x19 - -#define TAS_REG_LEFT_LOUDNESS 0x21 -#define TAS_REG_RIGHT_LOUDNESS 0x22 -#define TAS_REG_LEFT_LOUDNESS_GAIN 0x23 -#define TAS_REG_RIGHT_LOUDNESS_GAIN 0x24 - -#define TAS3001_DRC_MAX 0x5f -#define TAS3004_DRC_MAX 0xef - -#endif /* __SND_AOA_CODECTASH */ diff --git a/sound/aoa/codecs/snd-aoa-codec-toonie.c b/sound/aoa/codecs/snd-aoa-codec-toonie.c deleted file mode 100644 index 3c7d1d8a9..000000000 --- a/sound/aoa/codecs/snd-aoa-codec-toonie.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Apple Onboard Audio driver for Toonie codec - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - * - * - * This is a driver for the toonie codec chip. This chip is present - * on the Mac Mini and is nothing but a DAC. - */ -#include -#include -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("toonie codec driver for snd-aoa"); - -#include "../aoa.h" -#include "../soundbus/soundbus.h" - - -#define PFX "snd-aoa-codec-toonie: " - -struct toonie { - struct aoa_codec codec; -}; -#define codec_to_toonie(c) container_of(c, struct toonie, codec) - -static int toonie_dev_register(struct snd_device *dev) -{ - return 0; -} - -static struct snd_device_ops ops = { - .dev_register = toonie_dev_register, -}; - -static struct transfer_info toonie_transfers[] = { - /* This thing *only* has analog output, - * the rates are taken from Info.plist - * from Darwin. */ - { - .formats = SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_S24_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - }, - {} -}; - -static int toonie_usable(struct codec_info_item *cii, - struct transfer_info *ti, - struct transfer_info *out) -{ - return 1; -} - -#ifdef CONFIG_PM -static int toonie_suspend(struct codec_info_item *cii, pm_message_t state) -{ - /* can we turn it off somehow? */ - return 0; -} - -static int toonie_resume(struct codec_info_item *cii) -{ - return 0; -} -#endif /* CONFIG_PM */ - -static struct codec_info toonie_codec_info = { - .transfers = toonie_transfers, - .sysclock_factor = 256, - .bus_factor = 64, - .owner = THIS_MODULE, - .usable = toonie_usable, -#ifdef CONFIG_PM - .suspend = toonie_suspend, - .resume = toonie_resume, -#endif -}; - -static int toonie_init_codec(struct aoa_codec *codec) -{ - struct toonie *toonie = codec_to_toonie(codec); - - /* nothing connected? what a joke! */ - if (toonie->codec.connected != 1) - return -ENOTCONN; - - if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) { - printk(KERN_ERR PFX "failed to create toonie snd device!\n"); - return -ENODEV; - } - - if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev, - aoa_get_card(), - &toonie_codec_info, toonie)) { - printk(KERN_ERR PFX "error creating toonie pcm\n"); - snd_device_free(aoa_get_card(), toonie); - return -ENODEV; - } - - return 0; -} - -static void toonie_exit_codec(struct aoa_codec *codec) -{ - struct toonie *toonie = codec_to_toonie(codec); - - if (!toonie->codec.soundbus_dev) { - printk(KERN_ERR PFX "toonie_exit_codec called without soundbus_dev!\n"); - return; - } - toonie->codec.soundbus_dev->detach_codec(toonie->codec.soundbus_dev, toonie); -} - -static struct toonie *toonie; - -static int __init toonie_init(void) -{ - toonie = kzalloc(sizeof(struct toonie), GFP_KERNEL); - - if (!toonie) - return -ENOMEM; - - strlcpy(toonie->codec.name, "toonie", sizeof(toonie->codec.name)); - toonie->codec.owner = THIS_MODULE; - toonie->codec.init = toonie_init_codec; - toonie->codec.exit = toonie_exit_codec; - - if (aoa_codec_register(&toonie->codec)) { - kfree(toonie); - return -EINVAL; - } - - return 0; -} - -static void __exit toonie_exit(void) -{ - aoa_codec_unregister(&toonie->codec); - kfree(toonie); -} - -module_init(toonie_init); -module_exit(toonie_exit); diff --git a/sound/aoa/core/Makefile b/sound/aoa/core/Makefile deleted file mode 100644 index 62dc7287f..000000000 --- a/sound/aoa/core/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -obj-$(CONFIG_SND_AOA) += snd-aoa.o -snd-aoa-objs := snd-aoa-core.o \ - snd-aoa-alsa.o \ - snd-aoa-gpio-pmf.o \ - snd-aoa-gpio-feature.o diff --git a/sound/aoa/core/snd-aoa-alsa.c b/sound/aoa/core/snd-aoa-alsa.c deleted file mode 100644 index b42fdea77..000000000 --- a/sound/aoa/core/snd-aoa-alsa.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Apple Onboard Audio Alsa helpers - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#include -#include "snd-aoa-alsa.h" - -static int index = -1; -module_param(index, int, 0444); -MODULE_PARM_DESC(index, "index for AOA sound card."); - -static struct aoa_card *aoa_card; - -int aoa_alsa_init(char *name, struct module *mod) -{ - struct snd_card *alsa_card; - int err; - - if (aoa_card) - /* cannot be EEXIST due to usage in aoa_fabric_register */ - return -EBUSY; - - alsa_card = snd_card_new(index, name, mod, sizeof(struct aoa_card)); - if (!alsa_card) - return -ENOMEM; - aoa_card = alsa_card->private_data; - aoa_card->alsa_card = alsa_card; - strlcpy(alsa_card->driver, "AppleOnbdAudio", sizeof(alsa_card->driver)); - strlcpy(alsa_card->shortname, name, sizeof(alsa_card->shortname)); - strlcpy(alsa_card->longname, name, sizeof(alsa_card->longname)); - strlcpy(alsa_card->mixername, name, sizeof(alsa_card->mixername)); - err = snd_card_register(aoa_card->alsa_card); - if (err < 0) { - printk(KERN_ERR "snd-aoa: couldn't register alsa card\n"); - snd_card_free(aoa_card->alsa_card); - aoa_card = NULL; - return err; - } - return 0; -} - -struct snd_card *aoa_get_card(void) -{ - if (aoa_card) - return aoa_card->alsa_card; - return NULL; -} -EXPORT_SYMBOL_GPL(aoa_get_card); - -void aoa_alsa_cleanup(void) -{ - if (aoa_card) { - snd_card_free(aoa_card->alsa_card); - aoa_card = NULL; - } -} - -int aoa_snd_device_new(snd_device_type_t type, - void * device_data, struct snd_device_ops * ops) -{ - struct snd_card *card = aoa_get_card(); - int err; - - if (!card) return -ENOMEM; - - err = snd_device_new(card, type, device_data, ops); - if (err) { - printk(KERN_ERR "snd-aoa: failed to create snd device (%d)\n", err); - return err; - } - err = snd_device_register(card, device_data); - if (err) { - printk(KERN_ERR "snd-aoa: failed to register " - "snd device (%d)\n", err); - printk(KERN_ERR "snd-aoa: have you forgotten the " - "dev_register callback?\n"); - snd_device_free(card, device_data); - } - return err; -} -EXPORT_SYMBOL_GPL(aoa_snd_device_new); - -int aoa_snd_ctl_add(struct snd_kcontrol* control) -{ - int err; - - if (!aoa_card) return -ENODEV; - - err = snd_ctl_add(aoa_card->alsa_card, control); - if (err) - printk(KERN_ERR "snd-aoa: failed to add alsa control (%d)\n", - err); - return err; -} -EXPORT_SYMBOL_GPL(aoa_snd_ctl_add); diff --git a/sound/aoa/core/snd-aoa-alsa.h b/sound/aoa/core/snd-aoa-alsa.h deleted file mode 100644 index 660d2f179..000000000 --- a/sound/aoa/core/snd-aoa-alsa.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Apple Onboard Audio Alsa private helpers - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#ifndef __SND_AOA_ALSA_H -#define __SND_AOA_ALSA_H -#include "../aoa.h" - -extern int aoa_alsa_init(char *name, struct module *mod); -extern void aoa_alsa_cleanup(void); - -#endif /* __SND_AOA_ALSA_H */ diff --git a/sound/aoa/core/snd-aoa-core.c b/sound/aoa/core/snd-aoa-core.c deleted file mode 100644 index ecd2d8263..000000000 --- a/sound/aoa/core/snd-aoa-core.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Apple Onboard Audio driver core - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#include -#include -#include -#include "../aoa.h" -#include "snd-aoa-alsa.h" - -MODULE_DESCRIPTION("Apple Onboard Audio Sound Driver"); -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); - -/* We allow only one fabric. This simplifies things, - * and more don't really make that much sense */ -static struct aoa_fabric *fabric; -static LIST_HEAD(codec_list); - -static int attach_codec_to_fabric(struct aoa_codec *c) -{ - int err; - - if (!try_module_get(c->owner)) - return -EBUSY; - /* found_codec has to be assigned */ - err = -ENOENT; - if (fabric->found_codec) - err = fabric->found_codec(c); - if (err) { - module_put(c->owner); - printk(KERN_ERR "snd-aoa: fabric didn't like codec %s\n", - c->name); - return err; - } - c->fabric = fabric; - - err = 0; - if (c->init) - err = c->init(c); - if (err) { - printk(KERN_ERR "snd-aoa: codec %s didn't init\n", c->name); - c->fabric = NULL; - if (fabric->remove_codec) - fabric->remove_codec(c); - module_put(c->owner); - return err; - } - if (fabric->attached_codec) - fabric->attached_codec(c); - return 0; -} - -int aoa_codec_register(struct aoa_codec *codec) -{ - int err = 0; - - /* if there's a fabric already, we can tell if we - * will want to have this codec, so propagate error - * through. Otherwise, this will happen later... */ - if (fabric) - err = attach_codec_to_fabric(codec); - if (!err) - list_add(&codec->list, &codec_list); - return err; -} -EXPORT_SYMBOL_GPL(aoa_codec_register); - -void aoa_codec_unregister(struct aoa_codec *codec) -{ - list_del(&codec->list); - if (codec->fabric && codec->exit) - codec->exit(codec); - if (fabric && fabric->remove_codec) - fabric->remove_codec(codec); - codec->fabric = NULL; - module_put(codec->owner); -} -EXPORT_SYMBOL_GPL(aoa_codec_unregister); - -int aoa_fabric_register(struct aoa_fabric *new_fabric) -{ - struct aoa_codec *c; - int err; - - /* allow querying for presence of fabric - * (i.e. do this test first!) */ - if (new_fabric == fabric) { - err = -EALREADY; - goto attach; - } - if (fabric) - return -EEXIST; - if (!new_fabric) - return -EINVAL; - - err = aoa_alsa_init(new_fabric->name, new_fabric->owner); - if (err) - return err; - - fabric = new_fabric; - - attach: - list_for_each_entry(c, &codec_list, list) { - if (c->fabric != fabric) - attach_codec_to_fabric(c); - } - return err; -} -EXPORT_SYMBOL_GPL(aoa_fabric_register); - -void aoa_fabric_unregister(struct aoa_fabric *old_fabric) -{ - struct aoa_codec *c; - - if (fabric != old_fabric) - return; - - list_for_each_entry(c, &codec_list, list) { - if (c->fabric) - aoa_fabric_unlink_codec(c); - } - - aoa_alsa_cleanup(); - - fabric = NULL; -} -EXPORT_SYMBOL_GPL(aoa_fabric_unregister); - -void aoa_fabric_unlink_codec(struct aoa_codec *codec) -{ - if (!codec->fabric) { - printk(KERN_ERR "snd-aoa: fabric unassigned " - "in aoa_fabric_unlink_codec\n"); - dump_stack(); - return; - } - if (codec->exit) - codec->exit(codec); - if (codec->fabric->remove_codec) - codec->fabric->remove_codec(codec); - codec->fabric = NULL; - module_put(codec->owner); -} -EXPORT_SYMBOL_GPL(aoa_fabric_unlink_codec); - -static int __init aoa_init(void) -{ - return 0; -} - -static void __exit aoa_exit(void) -{ - aoa_alsa_cleanup(); -} - -module_init(aoa_init); -module_exit(aoa_exit); diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c deleted file mode 100644 index f69d33357..000000000 --- a/sound/aoa/core/snd-aoa-gpio-feature.c +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Apple Onboard Audio feature call GPIO control - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - * - * This file contains the GPIO control routines for - * direct (through feature calls) access to the GPIO - * registers. - */ - -#include -#include -#include "../aoa.h" - -/* TODO: these are 20 global variables - * that aren't used on most machines... - * Move them into a dynamically allocated - * structure and use that. - */ - -/* these are the GPIO numbers (register addresses as offsets into - * the GPIO space) */ -static int headphone_mute_gpio; -static int amp_mute_gpio; -static int lineout_mute_gpio; -static int hw_reset_gpio; -static int lineout_detect_gpio; -static int headphone_detect_gpio; -static int linein_detect_gpio; - -/* see the SWITCH_GPIO macro */ -static int headphone_mute_gpio_activestate; -static int amp_mute_gpio_activestate; -static int lineout_mute_gpio_activestate; -static int hw_reset_gpio_activestate; -static int lineout_detect_gpio_activestate; -static int headphone_detect_gpio_activestate; -static int linein_detect_gpio_activestate; - -/* node pointers that we save when getting the GPIO number - * to get the interrupt later */ -static struct device_node *lineout_detect_node; -static struct device_node *linein_detect_node; -static struct device_node *headphone_detect_node; - -static int lineout_detect_irq; -static int linein_detect_irq; -static int headphone_detect_irq; - -static struct device_node *get_gpio(char *name, - char *altname, - int *gpioptr, - int *gpioactiveptr) -{ - struct device_node *np, *gpio; - u32 *reg; - char *audio_gpio; - - *gpioptr = -1; - - /* check if we can get it the easy way ... */ - np = of_find_node_by_name(NULL, name); - if (!np) { - /* some machines have only gpioX/extint-gpioX nodes, - * and an audio-gpio property saying what it is ... - * So what we have to do is enumerate all children - * of the gpio node and check them all. */ - gpio = of_find_node_by_name(NULL, "gpio"); - if (!gpio) - return NULL; - while ((np = of_get_next_child(gpio, np))) { - audio_gpio = get_property(np, "audio-gpio", NULL); - if (!audio_gpio) - continue; - if (strcmp(audio_gpio, name) == 0) - break; - if (altname && (strcmp(audio_gpio, altname) == 0)) - break; - } - /* still not found, assume not there */ - if (!np) - return NULL; - } - - reg = (u32 *)get_property(np, "reg", NULL); - if (!reg) - return NULL; - - *gpioptr = *reg; - - /* this is a hack, usually the GPIOs 'reg' property - * should have the offset based from the GPIO space - * which is at 0x50, but apparently not always... */ - if (*gpioptr < 0x50) - *gpioptr += 0x50; - - reg = (u32 *)get_property(np, "audio-gpio-active-state", NULL); - if (!reg) - /* Apple seems to default to 1, but - * that doesn't seem right at least on most - * machines. So until proven that the opposite - * is necessary, we default to 0 - * (which, incidentally, snd-powermac also does...) */ - *gpioactiveptr = 0; - else - *gpioactiveptr = *reg; - - return np; -} - -static void get_irq(struct device_node * np, int *irqptr) -{ - if (np) - *irqptr = irq_of_parse_and_map(np, 0); - else - *irqptr = NO_IRQ; -} - -/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */ -#define SWITCH_GPIO(name, v, on) \ - (((v)&~1) | ((on)? \ - (name##_gpio_activestate==0?4:5): \ - (name##_gpio_activestate==0?5:4))) - -#define FTR_GPIO(name, bit) \ -static void ftr_gpio_set_##name(struct gpio_runtime *rt, int on)\ -{ \ - int v; \ - \ - if (unlikely(!rt)) return; \ - \ - if (name##_mute_gpio < 0) \ - return; \ - \ - v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, \ - name##_mute_gpio, \ - 0); \ - \ - /* muted = !on... */ \ - v = SWITCH_GPIO(name##_mute, v, !on); \ - \ - pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, \ - name##_mute_gpio, v); \ - \ - rt->implementation_private &= ~(1<implementation_private |= (!!on << bit); \ -} \ -static int ftr_gpio_get_##name(struct gpio_runtime *rt) \ -{ \ - if (unlikely(!rt)) return 0; \ - return (rt->implementation_private>>bit)&1; \ -} - -FTR_GPIO(headphone, 0); -FTR_GPIO(amp, 1); -FTR_GPIO(lineout, 2); - -static void ftr_gpio_set_hw_reset(struct gpio_runtime *rt, int on) -{ - int v; - - if (unlikely(!rt)) return; - if (hw_reset_gpio < 0) - return; - - v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, - hw_reset_gpio, 0); - v = SWITCH_GPIO(hw_reset, v, on); - pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, - hw_reset_gpio, v); -} - -static void ftr_gpio_all_amps_off(struct gpio_runtime *rt) -{ - int saved; - - if (unlikely(!rt)) return; - saved = rt->implementation_private; - ftr_gpio_set_headphone(rt, 0); - ftr_gpio_set_amp(rt, 0); - ftr_gpio_set_lineout(rt, 0); - rt->implementation_private = saved; -} - -static void ftr_gpio_all_amps_restore(struct gpio_runtime *rt) -{ - int s; - - if (unlikely(!rt)) return; - s = rt->implementation_private; - ftr_gpio_set_headphone(rt, (s>>0)&1); - ftr_gpio_set_amp(rt, (s>>1)&1); - ftr_gpio_set_lineout(rt, (s>>2)&1); -} - -static void ftr_handle_notify(void *data) -{ - struct gpio_notification *notif = data; - - mutex_lock(¬if->mutex); - if (notif->notify) - notif->notify(notif->data); - mutex_unlock(¬if->mutex); -} - -static void gpio_enable_dual_edge(int gpio) -{ - int v; - - if (gpio == -1) - return; - v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio, 0); - v |= 0x80; /* enable dual edge */ - pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio, v); -} - -static void ftr_gpio_init(struct gpio_runtime *rt) -{ - get_gpio("headphone-mute", NULL, - &headphone_mute_gpio, - &headphone_mute_gpio_activestate); - get_gpio("amp-mute", NULL, - &_mute_gpio, - &_mute_gpio_activestate); - get_gpio("lineout-mute", NULL, - &lineout_mute_gpio, - &lineout_mute_gpio_activestate); - get_gpio("hw-reset", "audio-hw-reset", - &hw_reset_gpio, - &hw_reset_gpio_activestate); - - headphone_detect_node = get_gpio("headphone-detect", NULL, - &headphone_detect_gpio, - &headphone_detect_gpio_activestate); - /* go Apple, and thanks for giving these different names - * across the board... */ - lineout_detect_node = get_gpio("lineout-detect", "line-output-detect", - &lineout_detect_gpio, - &lineout_detect_gpio_activestate); - linein_detect_node = get_gpio("linein-detect", "line-input-detect", - &linein_detect_gpio, - &linein_detect_gpio_activestate); - - gpio_enable_dual_edge(headphone_detect_gpio); - gpio_enable_dual_edge(lineout_detect_gpio); - gpio_enable_dual_edge(linein_detect_gpio); - - get_irq(headphone_detect_node, &headphone_detect_irq); - get_irq(lineout_detect_node, &lineout_detect_irq); - get_irq(linein_detect_node, &linein_detect_irq); - - ftr_gpio_all_amps_off(rt); - rt->implementation_private = 0; - INIT_WORK(&rt->headphone_notify.work, ftr_handle_notify, - &rt->headphone_notify); - INIT_WORK(&rt->line_in_notify.work, ftr_handle_notify, - &rt->line_in_notify); - INIT_WORK(&rt->line_out_notify.work, ftr_handle_notify, - &rt->line_out_notify); - mutex_init(&rt->headphone_notify.mutex); - mutex_init(&rt->line_in_notify.mutex); - mutex_init(&rt->line_out_notify.mutex); -} - -static void ftr_gpio_exit(struct gpio_runtime *rt) -{ - ftr_gpio_all_amps_off(rt); - rt->implementation_private = 0; - if (rt->headphone_notify.notify) - free_irq(headphone_detect_irq, &rt->headphone_notify); - if (rt->line_in_notify.gpio_private) - free_irq(linein_detect_irq, &rt->line_in_notify); - if (rt->line_out_notify.gpio_private) - free_irq(lineout_detect_irq, &rt->line_out_notify); - cancel_delayed_work(&rt->headphone_notify.work); - cancel_delayed_work(&rt->line_in_notify.work); - cancel_delayed_work(&rt->line_out_notify.work); - flush_scheduled_work(); - mutex_destroy(&rt->headphone_notify.mutex); - mutex_destroy(&rt->line_in_notify.mutex); - mutex_destroy(&rt->line_out_notify.mutex); -} - -static irqreturn_t ftr_handle_notify_irq(int xx, - void *data, - struct pt_regs *regs) -{ - struct gpio_notification *notif = data; - - schedule_work(¬if->work); - - return IRQ_HANDLED; -} - -static int ftr_set_notify(struct gpio_runtime *rt, - enum notify_type type, - notify_func_t notify, - void *data) -{ - struct gpio_notification *notif; - notify_func_t old; - int irq; - char *name; - int err = -EBUSY; - - switch (type) { - case AOA_NOTIFY_HEADPHONE: - notif = &rt->headphone_notify; - name = "headphone-detect"; - irq = headphone_detect_irq; - break; - case AOA_NOTIFY_LINE_IN: - notif = &rt->line_in_notify; - name = "linein-detect"; - irq = linein_detect_irq; - break; - case AOA_NOTIFY_LINE_OUT: - notif = &rt->line_out_notify; - name = "lineout-detect"; - irq = lineout_detect_irq; - break; - default: - return -EINVAL; - } - - if (irq == NO_IRQ) - return -ENODEV; - - mutex_lock(¬if->mutex); - - old = notif->notify; - - if (!old && !notify) { - err = 0; - goto out_unlock; - } - - if (old && notify) { - if (old == notify && notif->data == data) - err = 0; - goto out_unlock; - } - - if (old && !notify) - free_irq(irq, notif); - - if (!old && notify) { - err = request_irq(irq, ftr_handle_notify_irq, 0, name, notif); - if (err) - goto out_unlock; - } - - notif->notify = notify; - notif->data = data; - - err = 0; - out_unlock: - mutex_unlock(¬if->mutex); - return err; -} - -static int ftr_get_detect(struct gpio_runtime *rt, - enum notify_type type) -{ - int gpio, ret, active; - - switch (type) { - case AOA_NOTIFY_HEADPHONE: - gpio = headphone_detect_gpio; - active = headphone_detect_gpio_activestate; - break; - case AOA_NOTIFY_LINE_IN: - gpio = linein_detect_gpio; - active = linein_detect_gpio_activestate; - break; - case AOA_NOTIFY_LINE_OUT: - gpio = lineout_detect_gpio; - active = lineout_detect_gpio_activestate; - break; - default: - return -EINVAL; - } - - if (gpio == -1) - return -ENODEV; - - ret = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio, 0); - if (ret < 0) - return ret; - return ((ret >> 1) & 1) == active; -} - -static struct gpio_methods methods = { - .init = ftr_gpio_init, - .exit = ftr_gpio_exit, - .all_amps_off = ftr_gpio_all_amps_off, - .all_amps_restore = ftr_gpio_all_amps_restore, - .set_headphone = ftr_gpio_set_headphone, - .set_speakers = ftr_gpio_set_amp, - .set_lineout = ftr_gpio_set_lineout, - .set_hw_reset = ftr_gpio_set_hw_reset, - .get_headphone = ftr_gpio_get_headphone, - .get_speakers = ftr_gpio_get_amp, - .get_lineout = ftr_gpio_get_lineout, - .set_notify = ftr_set_notify, - .get_detect = ftr_get_detect, -}; - -struct gpio_methods *ftr_gpio_methods = &methods; -EXPORT_SYMBOL_GPL(ftr_gpio_methods); diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c deleted file mode 100644 index 2836c3218..000000000 --- a/sound/aoa/core/snd-aoa-gpio-pmf.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Apple Onboard Audio pmf GPIOs - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#include -#include -#include "../aoa.h" - -#define PMF_GPIO(name, bit) \ -static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ -{ \ - struct pmf_args args = { .count = 1, .u[0].v = !on }; \ - int rc; \ - \ - if (unlikely(!rt)) return; \ - rc = pmf_call_function(rt->node, #name "-mute", &args); \ - if (rc && rc != -ENODEV) \ - printk(KERN_WARNING "pmf_gpio_set_" #name \ - " failed, rc: %d\n", rc); \ - rt->implementation_private &= ~(1<implementation_private |= (!!on << bit); \ -} \ -static int pmf_gpio_get_##name(struct gpio_runtime *rt) \ -{ \ - if (unlikely(!rt)) return 0; \ - return (rt->implementation_private>>bit)&1; \ -} - -PMF_GPIO(headphone, 0); -PMF_GPIO(amp, 1); -PMF_GPIO(lineout, 2); - -static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on) -{ - struct pmf_args args = { .count = 1, .u[0].v = !!on }; - int rc; - - if (unlikely(!rt)) return; - rc = pmf_call_function(rt->node, "hw-reset", &args); - if (rc) - printk(KERN_WARNING "pmf_gpio_set_hw_reset" - " failed, rc: %d\n", rc); -} - -static void pmf_gpio_all_amps_off(struct gpio_runtime *rt) -{ - int saved; - - if (unlikely(!rt)) return; - saved = rt->implementation_private; - pmf_gpio_set_headphone(rt, 0); - pmf_gpio_set_amp(rt, 0); - pmf_gpio_set_lineout(rt, 0); - rt->implementation_private = saved; -} - -static void pmf_gpio_all_amps_restore(struct gpio_runtime *rt) -{ - int s; - - if (unlikely(!rt)) return; - s = rt->implementation_private; - pmf_gpio_set_headphone(rt, (s>>0)&1); - pmf_gpio_set_amp(rt, (s>>1)&1); - pmf_gpio_set_lineout(rt, (s>>2)&1); -} - -static void pmf_handle_notify(void *data) -{ - struct gpio_notification *notif = data; - - mutex_lock(¬if->mutex); - if (notif->notify) - notif->notify(notif->data); - mutex_unlock(¬if->mutex); -} - -static void pmf_gpio_init(struct gpio_runtime *rt) -{ - pmf_gpio_all_amps_off(rt); - rt->implementation_private = 0; - INIT_WORK(&rt->headphone_notify.work, pmf_handle_notify, - &rt->headphone_notify); - INIT_WORK(&rt->line_in_notify.work, pmf_handle_notify, - &rt->line_in_notify); - INIT_WORK(&rt->line_out_notify.work, pmf_handle_notify, - &rt->line_out_notify); - mutex_init(&rt->headphone_notify.mutex); - mutex_init(&rt->line_in_notify.mutex); - mutex_init(&rt->line_out_notify.mutex); -} - -static void pmf_gpio_exit(struct gpio_runtime *rt) -{ - pmf_gpio_all_amps_off(rt); - rt->implementation_private = 0; - - if (rt->headphone_notify.gpio_private) - pmf_unregister_irq_client(rt->headphone_notify.gpio_private); - if (rt->line_in_notify.gpio_private) - pmf_unregister_irq_client(rt->line_in_notify.gpio_private); - if (rt->line_out_notify.gpio_private) - pmf_unregister_irq_client(rt->line_out_notify.gpio_private); - - /* make sure no work is pending before freeing - * all things */ - cancel_delayed_work(&rt->headphone_notify.work); - cancel_delayed_work(&rt->line_in_notify.work); - cancel_delayed_work(&rt->line_out_notify.work); - flush_scheduled_work(); - - mutex_destroy(&rt->headphone_notify.mutex); - mutex_destroy(&rt->line_in_notify.mutex); - mutex_destroy(&rt->line_out_notify.mutex); - - if (rt->headphone_notify.gpio_private) - kfree(rt->headphone_notify.gpio_private); - if (rt->line_in_notify.gpio_private) - kfree(rt->line_in_notify.gpio_private); - if (rt->line_out_notify.gpio_private) - kfree(rt->line_out_notify.gpio_private); -} - -static void pmf_handle_notify_irq(void *data) -{ - struct gpio_notification *notif = data; - - schedule_work(¬if->work); -} - -static int pmf_set_notify(struct gpio_runtime *rt, - enum notify_type type, - notify_func_t notify, - void *data) -{ - struct gpio_notification *notif; - notify_func_t old; - struct pmf_irq_client *irq_client; - char *name; - int err = -EBUSY; - - switch (type) { - case AOA_NOTIFY_HEADPHONE: - notif = &rt->headphone_notify; - name = "headphone-detect"; - break; - case AOA_NOTIFY_LINE_IN: - notif = &rt->line_in_notify; - name = "linein-detect"; - break; - case AOA_NOTIFY_LINE_OUT: - notif = &rt->line_out_notify; - name = "lineout-detect"; - break; - default: - return -EINVAL; - } - - mutex_lock(¬if->mutex); - - old = notif->notify; - - if (!old && !notify) { - err = 0; - goto out_unlock; - } - - if (old && notify) { - if (old == notify && notif->data == data) - err = 0; - goto out_unlock; - } - - if (old && !notify) { - irq_client = notif->gpio_private; - pmf_unregister_irq_client(irq_client); - kfree(irq_client); - notif->gpio_private = NULL; - } - if (!old && notify) { - irq_client = kzalloc(sizeof(struct pmf_irq_client), - GFP_KERNEL); - irq_client->data = notif; - irq_client->handler = pmf_handle_notify_irq; - irq_client->owner = THIS_MODULE; - err = pmf_register_irq_client(rt->node, - name, - irq_client); - if (err) { - printk(KERN_ERR "snd-aoa: gpio layer failed to" - " register %s irq (%d)\n", name, err); - kfree(irq_client); - goto out_unlock; - } - notif->gpio_private = irq_client; - } - notif->notify = notify; - notif->data = data; - - err = 0; - out_unlock: - mutex_unlock(¬if->mutex); - return err; -} - -static int pmf_get_detect(struct gpio_runtime *rt, - enum notify_type type) -{ - char *name; - int err = -EBUSY, ret; - struct pmf_args args = { .count = 1, .u[0].p = &ret }; - - switch (type) { - case AOA_NOTIFY_HEADPHONE: - name = "headphone-detect"; - break; - case AOA_NOTIFY_LINE_IN: - name = "linein-detect"; - break; - case AOA_NOTIFY_LINE_OUT: - name = "lineout-detect"; - break; - default: - return -EINVAL; - } - - err = pmf_call_function(rt->node, name, &args); - if (err) - return err; - return ret; -} - -static struct gpio_methods methods = { - .init = pmf_gpio_init, - .exit = pmf_gpio_exit, - .all_amps_off = pmf_gpio_all_amps_off, - .all_amps_restore = pmf_gpio_all_amps_restore, - .set_headphone = pmf_gpio_set_headphone, - .set_speakers = pmf_gpio_set_amp, - .set_lineout = pmf_gpio_set_lineout, - .set_hw_reset = pmf_gpio_set_hw_reset, - .get_headphone = pmf_gpio_get_headphone, - .get_speakers = pmf_gpio_get_amp, - .get_lineout = pmf_gpio_get_lineout, - .set_notify = pmf_set_notify, - .get_detect = pmf_get_detect, -}; - -struct gpio_methods *pmf_gpio_methods = &methods; -EXPORT_SYMBOL_GPL(pmf_gpio_methods); diff --git a/sound/aoa/fabrics/Kconfig b/sound/aoa/fabrics/Kconfig deleted file mode 100644 index c3bc7705c..000000000 --- a/sound/aoa/fabrics/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -config SND_AOA_FABRIC_LAYOUT - tristate "layout-id fabric" - depends SND_AOA - select SND_AOA_SOUNDBUS - select SND_AOA_SOUNDBUS_I2S - ---help--- - This enables the layout-id fabric for the Apple Onboard - Audio driver, the module holding it all together - based on the device-tree's layout-id property. - - If you are unsure and have a later Apple machine, - compile it as a module. diff --git a/sound/aoa/fabrics/Makefile b/sound/aoa/fabrics/Makefile deleted file mode 100644 index 55fc5e7e5..000000000 --- a/sound/aoa/fabrics/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-$(CONFIG_SND_AOA_FABRIC_LAYOUT) += snd-aoa-fabric-layout.o diff --git a/sound/aoa/fabrics/snd-aoa-fabric-layout.c b/sound/aoa/fabrics/snd-aoa-fabric-layout.c deleted file mode 100644 index 172eb9547..000000000 --- a/sound/aoa/fabrics/snd-aoa-fabric-layout.c +++ /dev/null @@ -1,1129 +0,0 @@ -/* - * Apple Onboard Audio driver -- layout fabric - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - * - * - * This fabric module looks for sound codecs - * based on the layout-id property in the device tree. - * - */ - -#include -#include -#include -#include "../aoa.h" -#include "../soundbus/soundbus.h" - -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Layout-ID fabric for snd-aoa"); - -#define MAX_CODECS_PER_BUS 2 - -/* These are the connections the layout fabric - * knows about. It doesn't really care about the - * input ones, but I thought I'd separate them - * to give them proper names. The thing is that - * Apple usually will distinguish the active output - * by GPIOs, while the active input is set directly - * on the codec. Hence we here tell the codec what - * we think is connected. This information is hard- - * coded below ... */ -#define CC_SPEAKERS (1<<0) -#define CC_HEADPHONE (1<<1) -#define CC_LINEOUT (1<<2) -#define CC_DIGITALOUT (1<<3) -#define CC_LINEIN (1<<4) -#define CC_MICROPHONE (1<<5) -#define CC_DIGITALIN (1<<6) -/* pretty bogus but users complain... - * This is a flag saying that the LINEOUT - * should be renamed to HEADPHONE. - * be careful with input detection! */ -#define CC_LINEOUT_LABELLED_HEADPHONE (1<<7) - -struct codec_connection { - /* CC_ flags from above */ - int connected; - /* codec dependent bit to be set in the aoa_codec.connected field. - * This intentionally doesn't have any generic flags because the - * fabric has to know the codec anyway and all codecs might have - * different connectors */ - int codec_bit; -}; - -struct codec_connect_info { - char *name; - struct codec_connection *connections; -}; - -#define LAYOUT_FLAG_COMBO_LINEOUT_SPDIF (1<<0) - -struct layout { - unsigned int layout_id; - struct codec_connect_info codecs[MAX_CODECS_PER_BUS]; - int flags; - - /* if busname is not assigned, we use 'Master' below, - * so that our layout table doesn't need to be filled - * too much. - * We only assign these two if we expect to find more - * than one soundbus, i.e. on those machines with - * multiple layout-ids */ - char *busname; - int pcmid; -}; - -MODULE_ALIAS("sound-layout-36"); -MODULE_ALIAS("sound-layout-41"); -MODULE_ALIAS("sound-layout-45"); -MODULE_ALIAS("sound-layout-47"); -MODULE_ALIAS("sound-layout-48"); -MODULE_ALIAS("sound-layout-49"); -MODULE_ALIAS("sound-layout-50"); -MODULE_ALIAS("sound-layout-51"); -MODULE_ALIAS("sound-layout-56"); -MODULE_ALIAS("sound-layout-57"); -MODULE_ALIAS("sound-layout-58"); -MODULE_ALIAS("sound-layout-60"); -MODULE_ALIAS("sound-layout-61"); -MODULE_ALIAS("sound-layout-62"); -MODULE_ALIAS("sound-layout-64"); -MODULE_ALIAS("sound-layout-65"); -MODULE_ALIAS("sound-layout-66"); -MODULE_ALIAS("sound-layout-67"); -MODULE_ALIAS("sound-layout-68"); -MODULE_ALIAS("sound-layout-69"); -MODULE_ALIAS("sound-layout-70"); -MODULE_ALIAS("sound-layout-72"); -MODULE_ALIAS("sound-layout-76"); -MODULE_ALIAS("sound-layout-80"); -MODULE_ALIAS("sound-layout-82"); -MODULE_ALIAS("sound-layout-84"); -MODULE_ALIAS("sound-layout-86"); -MODULE_ALIAS("sound-layout-90"); -MODULE_ALIAS("sound-layout-92"); -MODULE_ALIAS("sound-layout-94"); -MODULE_ALIAS("sound-layout-96"); -MODULE_ALIAS("sound-layout-98"); -MODULE_ALIAS("sound-layout-100"); - -/* onyx with all but microphone connected */ -static struct codec_connection onyx_connections_nomic[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE | CC_LINEOUT, - .codec_bit = 0, - }, - { - .connected = CC_DIGITALOUT, - .codec_bit = 1, - }, - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* onyx on machines without headphone */ -static struct codec_connection onyx_connections_noheadphones[] = { - { - .connected = CC_SPEAKERS | CC_LINEOUT | - CC_LINEOUT_LABELLED_HEADPHONE, - .codec_bit = 0, - }, - { - .connected = CC_DIGITALOUT, - .codec_bit = 1, - }, - /* FIXME: are these correct? probably not for all the machines - * below ... If not this will need separating. */ - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - { - .connected = CC_MICROPHONE, - .codec_bit = 3, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* onyx on machines with real line-out */ -static struct codec_connection onyx_connections_reallineout[] = { - { - .connected = CC_SPEAKERS | CC_LINEOUT | CC_HEADPHONE, - .codec_bit = 0, - }, - { - .connected = CC_DIGITALOUT, - .codec_bit = 1, - }, - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* tas on machines without line out */ -static struct codec_connection tas_connections_nolineout[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE, - .codec_bit = 0, - }, - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - { - .connected = CC_MICROPHONE, - .codec_bit = 3, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* tas on machines with neither line out nor line in */ -static struct codec_connection tas_connections_noline[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE, - .codec_bit = 0, - }, - { - .connected = CC_MICROPHONE, - .codec_bit = 3, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* tas on machines without microphone */ -static struct codec_connection tas_connections_nomic[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE | CC_LINEOUT, - .codec_bit = 0, - }, - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - {} /* terminate array by .connected == 0 */ -}; - -/* tas on machines with everything connected */ -static struct codec_connection tas_connections_all[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE | CC_LINEOUT, - .codec_bit = 0, - }, - { - .connected = CC_LINEIN, - .codec_bit = 2, - }, - { - .connected = CC_MICROPHONE, - .codec_bit = 3, - }, - {} /* terminate array by .connected == 0 */ -}; - -static struct codec_connection toonie_connections[] = { - { - .connected = CC_SPEAKERS | CC_HEADPHONE, - .codec_bit = 0, - }, - {} /* terminate array by .connected == 0 */ -}; - -static struct codec_connection topaz_input[] = { - { - .connected = CC_DIGITALIN, - .codec_bit = 0, - }, - {} /* terminate array by .connected == 0 */ -}; - -static struct codec_connection topaz_output[] = { - { - .connected = CC_DIGITALOUT, - .codec_bit = 1, - }, - {} /* terminate array by .connected == 0 */ -}; - -static struct codec_connection topaz_inout[] = { - { - .connected = CC_DIGITALIN, - .codec_bit = 0, - }, - { - .connected = CC_DIGITALOUT, - .codec_bit = 1, - }, - {} /* terminate array by .connected == 0 */ -}; - -static struct layout layouts[] = { - /* last PowerBooks (15" Oct 2005) */ - { .layout_id = 82, - .flags = LAYOUT_FLAG_COMBO_LINEOUT_SPDIF, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* PowerMac9,1 */ - { .layout_id = 60, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_reallineout, - }, - }, - /* PowerMac9,1 */ - { .layout_id = 61, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* PowerBook5,7 */ - { .layout_id = 64, - .flags = LAYOUT_FLAG_COMBO_LINEOUT_SPDIF, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - /* PowerBook5,7 */ - { .layout_id = 65, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* PowerBook5,9 [17" Oct 2005] */ - { .layout_id = 84, - .flags = LAYOUT_FLAG_COMBO_LINEOUT_SPDIF, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* PowerMac8,1 */ - { .layout_id = 45, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* Quad PowerMac (analog in, analog/digital out) */ - { .layout_id = 68, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_nomic, - }, - }, - /* Quad PowerMac (digital in) */ - { .layout_id = 69, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - .busname = "digital in", .pcmid = 1 }, - /* Early 2005 PowerBook (PowerBook 5,6) */ - { .layout_id = 70, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nolineout, - }, - }, - /* PowerBook 5,4 */ - { .layout_id = 51, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nolineout, - }, - }, - /* PowerBook6,7 */ - { .layout_id = 80, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_noline, - }, - }, - /* PowerBook6,8 */ - { .layout_id = 72, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nolineout, - }, - }, - /* PowerMac8,2 */ - { .layout_id = 86, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_nomic, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - /* PowerBook6,7 */ - { .layout_id = 92, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nolineout, - }, - }, - /* PowerMac10,1 (Mac Mini) */ - { .layout_id = 58, - .codecs[0] = { - .name = "toonie", - .connections = toonie_connections, - }, - }, - { - .layout_id = 96, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - /* unknown, untested, but this comes from Apple */ - { .layout_id = 41, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_all, - }, - }, - { .layout_id = 36, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nomic, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_inout, - }, - }, - { .layout_id = 47, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - { .layout_id = 48, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - { .layout_id = 49, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_nomic, - }, - }, - { .layout_id = 50, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - { .layout_id = 56, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - { .layout_id = 57, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - { .layout_id = 62, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_output, - }, - }, - { .layout_id = 66, - .codecs[0] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - { .layout_id = 67, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - }, - { .layout_id = 76, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_nomic, - }, - .codecs[1] = { - .name = "topaz", - .connections = topaz_inout, - }, - }, - { .layout_id = 90, - .codecs[0] = { - .name = "tas", - .connections = tas_connections_noline, - }, - }, - { .layout_id = 94, - .codecs[0] = { - .name = "onyx", - /* but it has an external mic?? how to select? */ - .connections = onyx_connections_noheadphones, - }, - }, - { .layout_id = 98, - .codecs[0] = { - .name = "toonie", - .connections = toonie_connections, - }, - }, - { .layout_id = 100, - .codecs[0] = { - .name = "topaz", - .connections = topaz_input, - }, - .codecs[1] = { - .name = "onyx", - .connections = onyx_connections_noheadphones, - }, - }, - {} -}; - -static struct layout *find_layout_by_id(unsigned int id) -{ - struct layout *l; - - l = layouts; - while (l->layout_id) { - if (l->layout_id == id) - return l; - l++; - } - return NULL; -} - -static void use_layout(struct layout *l) -{ - int i; - - for (i=0; icodecs[i].name) { - request_module("snd-aoa-codec-%s", l->codecs[i].name); - } - } - /* now we wait for the codecs to call us back */ -} - -struct layout_dev; - -struct layout_dev_ptr { - struct layout_dev *ptr; -}; - -struct layout_dev { - struct list_head list; - struct soundbus_dev *sdev; - struct device_node *sound; - struct aoa_codec *codecs[MAX_CODECS_PER_BUS]; - struct layout *layout; - struct gpio_runtime gpio; - - /* we need these for headphone/lineout detection */ - struct snd_kcontrol *headphone_ctrl; - struct snd_kcontrol *lineout_ctrl; - struct snd_kcontrol *speaker_ctrl; - struct snd_kcontrol *headphone_detected_ctrl; - struct snd_kcontrol *lineout_detected_ctrl; - - struct layout_dev_ptr selfptr_headphone; - struct layout_dev_ptr selfptr_lineout; - - u32 have_lineout_detect:1, - have_headphone_detect:1, - switch_on_headphone:1, - switch_on_lineout:1; -}; - -static LIST_HEAD(layouts_list); -static int layouts_list_items; -/* this can go away but only if we allow multiple cards, - * make the fabric handle all the card stuff, etc... */ -static struct layout_dev *layout_device; - -static int control_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -#define AMP_CONTROL(n, description) \ -static int n##_control_get(struct snd_kcontrol *kcontrol, \ - struct snd_ctl_elem_value *ucontrol) \ -{ \ - struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \ - if (gpio->methods && gpio->methods->get_##n) \ - ucontrol->value.integer.value[0] = \ - gpio->methods->get_##n(gpio); \ - return 0; \ -} \ -static int n##_control_put(struct snd_kcontrol *kcontrol, \ - struct snd_ctl_elem_value *ucontrol) \ -{ \ - struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \ - if (gpio->methods && gpio->methods->get_##n) \ - gpio->methods->set_##n(gpio, \ - ucontrol->value.integer.value[0]); \ - return 1; \ -} \ -static struct snd_kcontrol_new n##_ctl = { \ - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ - .name = description, \ - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, \ - .info = control_info, \ - .get = n##_control_get, \ - .put = n##_control_put, \ -} - -AMP_CONTROL(headphone, "Headphone Switch"); -AMP_CONTROL(speakers, "Speakers Switch"); -AMP_CONTROL(lineout, "Line-Out Switch"); - -static int detect_choice_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct layout_dev *ldev = snd_kcontrol_chip(kcontrol); - - switch (kcontrol->private_value) { - case 0: - ucontrol->value.integer.value[0] = ldev->switch_on_headphone; - break; - case 1: - ucontrol->value.integer.value[0] = ldev->switch_on_lineout; - break; - default: - return -ENODEV; - } - return 0; -} - -static int detect_choice_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct layout_dev *ldev = snd_kcontrol_chip(kcontrol); - - switch (kcontrol->private_value) { - case 0: - ldev->switch_on_headphone = !!ucontrol->value.integer.value[0]; - break; - case 1: - ldev->switch_on_lineout = !!ucontrol->value.integer.value[0]; - break; - default: - return -ENODEV; - } - return 1; -} - -static struct snd_kcontrol_new headphone_detect_choice = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Headphone Detect Autoswitch", - .info = control_info, - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .get = detect_choice_get, - .put = detect_choice_put, - .private_value = 0, -}; - -static struct snd_kcontrol_new lineout_detect_choice = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Line-Out Detect Autoswitch", - .info = control_info, - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .get = detect_choice_get, - .put = detect_choice_put, - .private_value = 1, -}; - -static int detected_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct layout_dev *ldev = snd_kcontrol_chip(kcontrol); - int v; - - switch (kcontrol->private_value) { - case 0: - v = ldev->gpio.methods->get_detect(&ldev->gpio, - AOA_NOTIFY_HEADPHONE); - break; - case 1: - v = ldev->gpio.methods->get_detect(&ldev->gpio, - AOA_NOTIFY_LINE_OUT); - break; - default: - return -ENODEV; - } - ucontrol->value.integer.value[0] = v; - return 0; -} - -static struct snd_kcontrol_new headphone_detected = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Headphone Detected", - .info = control_info, - .access = SNDRV_CTL_ELEM_ACCESS_READ, - .get = detected_get, - .private_value = 0, -}; - -static struct snd_kcontrol_new lineout_detected = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Line-Out Detected", - .info = control_info, - .access = SNDRV_CTL_ELEM_ACCESS_READ, - .get = detected_get, - .private_value = 1, -}; - -static int check_codec(struct aoa_codec *codec, - struct layout_dev *ldev, - struct codec_connect_info *cci) -{ - u32 *ref; - char propname[32]; - struct codec_connection *cc; - - /* if the codec has a 'codec' node, we require a reference */ - if (codec->node && (strcmp(codec->node->name, "codec") == 0)) { - snprintf(propname, sizeof(propname), - "platform-%s-codec-ref", codec->name); - ref = (u32*)get_property(ldev->sound, propname, NULL); - if (!ref) { - printk(KERN_INFO "snd-aoa-fabric-layout: " - "required property %s not present\n", propname); - return -ENODEV; - } - if (*ref != codec->node->linux_phandle) { - printk(KERN_INFO "snd-aoa-fabric-layout: " - "%s doesn't match!\n", propname); - return -ENODEV; - } - } else { - if (layouts_list_items != 1) { - printk(KERN_INFO "snd-aoa-fabric-layout: " - "more than one soundbus, but no references.\n"); - return -ENODEV; - } - } - codec->soundbus_dev = ldev->sdev; - codec->gpio = &ldev->gpio; - - cc = cci->connections; - if (!cc) - return -EINVAL; - - printk(KERN_INFO "snd-aoa-fabric-layout: can use this codec\n"); - - codec->connected = 0; - codec->fabric_data = cc; - - while (cc->connected) { - codec->connected |= 1<codec_bit; - cc++; - } - - return 0; -} - -static int layout_found_codec(struct aoa_codec *codec) -{ - struct layout_dev *ldev; - int i; - - list_for_each_entry(ldev, &layouts_list, list) { - for (i=0; ilayout->codecs[i].name) - continue; - if (strcmp(ldev->layout->codecs[i].name, codec->name) == 0) { - if (check_codec(codec, - ldev, - &ldev->layout->codecs[i]) == 0) - return 0; - } - } - } - return -ENODEV; -} - -static void layout_remove_codec(struct aoa_codec *codec) -{ - int i; - /* here remove the codec from the layout dev's - * codec reference */ - - codec->soundbus_dev = NULL; - codec->gpio = NULL; - for (i=0; iptr; - if (data == &ldev->selfptr_headphone) { - v = ldev->gpio.methods->get_detect(&ldev->gpio, AOA_NOTIFY_HEADPHONE); - detected = ldev->headphone_detected_ctrl; - update = ldev->switch_on_headphone; - if (update) { - ldev->gpio.methods->set_speakers(&ldev->gpio, !v); - ldev->gpio.methods->set_headphone(&ldev->gpio, v); - ldev->gpio.methods->set_lineout(&ldev->gpio, 0); - } - } else if (data == &ldev->selfptr_lineout) { - v = ldev->gpio.methods->get_detect(&ldev->gpio, AOA_NOTIFY_LINE_OUT); - detected = ldev->lineout_detected_ctrl; - update = ldev->switch_on_lineout; - if (update) { - ldev->gpio.methods->set_speakers(&ldev->gpio, !v); - ldev->gpio.methods->set_headphone(&ldev->gpio, 0); - ldev->gpio.methods->set_lineout(&ldev->gpio, v); - } - } else - return; - - if (detected) - snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &detected->id); - if (update) { - c = ldev->headphone_ctrl; - if (c) - snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &c->id); - c = ldev->speaker_ctrl; - if (c) - snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &c->id); - c = ldev->lineout_ctrl; - if (c) - snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &c->id); - } -} - -static void layout_attached_codec(struct aoa_codec *codec) -{ - struct codec_connection *cc; - struct snd_kcontrol *ctl; - int headphones, lineout; - struct layout_dev *ldev = layout_device; - - /* need to add this codec to our codec array! */ - - cc = codec->fabric_data; - - headphones = codec->gpio->methods->get_detect(codec->gpio, - AOA_NOTIFY_HEADPHONE); - lineout = codec->gpio->methods->get_detect(codec->gpio, - AOA_NOTIFY_LINE_OUT); - - while (cc->connected) { - if (cc->connected & CC_SPEAKERS) { - if (headphones <= 0 && lineout <= 0) - ldev->gpio.methods->set_speakers(codec->gpio, 1); - ctl = snd_ctl_new1(&speakers_ctl, codec->gpio); - ldev->speaker_ctrl = ctl; - aoa_snd_ctl_add(ctl); - } - if (cc->connected & CC_HEADPHONE) { - if (headphones == 1) - ldev->gpio.methods->set_headphone(codec->gpio, 1); - ctl = snd_ctl_new1(&headphone_ctl, codec->gpio); - ldev->headphone_ctrl = ctl; - aoa_snd_ctl_add(ctl); - ldev->have_headphone_detect = - !ldev->gpio.methods - ->set_notify(&ldev->gpio, - AOA_NOTIFY_HEADPHONE, - layout_notify, - &ldev->selfptr_headphone); - if (ldev->have_headphone_detect) { - ctl = snd_ctl_new1(&headphone_detect_choice, - ldev); - aoa_snd_ctl_add(ctl); - ctl = snd_ctl_new1(&headphone_detected, - ldev); - ldev->headphone_detected_ctrl = ctl; - aoa_snd_ctl_add(ctl); - } - } - if (cc->connected & CC_LINEOUT) { - if (lineout == 1) - ldev->gpio.methods->set_lineout(codec->gpio, 1); - ctl = snd_ctl_new1(&lineout_ctl, codec->gpio); - if (cc->connected & CC_LINEOUT_LABELLED_HEADPHONE) - strlcpy(ctl->id.name, - "Headphone Switch", sizeof(ctl->id.name)); - ldev->lineout_ctrl = ctl; - aoa_snd_ctl_add(ctl); - ldev->have_lineout_detect = - !ldev->gpio.methods - ->set_notify(&ldev->gpio, - AOA_NOTIFY_LINE_OUT, - layout_notify, - &ldev->selfptr_lineout); - if (ldev->have_lineout_detect) { - ctl = snd_ctl_new1(&lineout_detect_choice, - ldev); - if (cc->connected & CC_LINEOUT_LABELLED_HEADPHONE) - strlcpy(ctl->id.name, - "Headphone Detect Autoswitch", - sizeof(ctl->id.name)); - aoa_snd_ctl_add(ctl); - ctl = snd_ctl_new1(&lineout_detected, - ldev); - if (cc->connected & CC_LINEOUT_LABELLED_HEADPHONE) - strlcpy(ctl->id.name, - "Headphone Detected", - sizeof(ctl->id.name)); - ldev->lineout_detected_ctrl = ctl; - aoa_snd_ctl_add(ctl); - } - } - cc++; - } - /* now update initial state */ - if (ldev->have_headphone_detect) - layout_notify(&ldev->selfptr_headphone); - if (ldev->have_lineout_detect) - layout_notify(&ldev->selfptr_lineout); -} - -static struct aoa_fabric layout_fabric = { - .name = "SoundByLayout", - .owner = THIS_MODULE, - .found_codec = layout_found_codec, - .remove_codec = layout_remove_codec, - .attached_codec = layout_attached_codec, -}; - -static int aoa_fabric_layout_probe(struct soundbus_dev *sdev) -{ - struct device_node *sound = NULL; - unsigned int *layout_id; - struct layout *layout; - struct layout_dev *ldev = NULL; - int err; - - /* hm, currently we can only have one ... */ - if (layout_device) - return -ENODEV; - - /* by breaking out we keep a reference */ - while ((sound = of_get_next_child(sdev->ofdev.node, sound))) { - if (sound->type && strcasecmp(sound->type, "soundchip") == 0) - break; - } - if (!sound) return -ENODEV; - - layout_id = (unsigned int *) get_property(sound, "layout-id", NULL); - if (!layout_id) - goto outnodev; - printk(KERN_INFO "snd-aoa-fabric-layout: found bus with layout %d\n", - *layout_id); - - layout = find_layout_by_id(*layout_id); - if (!layout) { - printk(KERN_ERR "snd-aoa-fabric-layout: unknown layout\n"); - goto outnodev; - } - - ldev = kzalloc(sizeof(struct layout_dev), GFP_KERNEL); - if (!ldev) - goto outnodev; - - layout_device = ldev; - ldev->sdev = sdev; - ldev->sound = sound; - ldev->layout = layout; - ldev->gpio.node = sound->parent; - switch (layout->layout_id) { - case 41: /* that unknown machine no one seems to have */ - case 51: /* PowerBook5,4 */ - case 58: /* Mac Mini */ - ldev->gpio.methods = ftr_gpio_methods; - printk(KERN_DEBUG - "snd-aoa-fabric-layout: Using direct GPIOs\n"); - break; - default: - ldev->gpio.methods = pmf_gpio_methods; - printk(KERN_DEBUG - "snd-aoa-fabric-layout: Using PMF GPIOs\n"); - } - ldev->selfptr_headphone.ptr = ldev; - ldev->selfptr_lineout.ptr = ldev; - sdev->ofdev.dev.driver_data = ldev; - list_add(&ldev->list, &layouts_list); - layouts_list_items++; - - /* assign these before registering ourselves, so - * callbacks that are done during registration - * already have the values */ - sdev->pcmid = ldev->layout->pcmid; - if (ldev->layout->busname) { - sdev->pcmname = ldev->layout->busname; - } else { - sdev->pcmname = "Master"; - } - - ldev->gpio.methods->init(&ldev->gpio); - - err = aoa_fabric_register(&layout_fabric); - if (err && err != -EALREADY) { - printk(KERN_INFO "snd-aoa-fabric-layout: can't use," - " another fabric is active!\n"); - goto outlistdel; - } - - use_layout(layout); - ldev->switch_on_headphone = 1; - ldev->switch_on_lineout = 1; - return 0; - outlistdel: - /* we won't be using these then... */ - ldev->gpio.methods->exit(&ldev->gpio); - /* reset if we didn't use it */ - sdev->pcmname = NULL; - sdev->pcmid = -1; - list_del(&ldev->list); - layouts_list_items--; - outnodev: - if (sound) of_node_put(sound); - layout_device = NULL; - if (ldev) kfree(ldev); - return -ENODEV; -} - -static int aoa_fabric_layout_remove(struct soundbus_dev *sdev) -{ - struct layout_dev *ldev = sdev->ofdev.dev.driver_data; - int i; - - for (i=0; icodecs[i]) { - aoa_fabric_unlink_codec(ldev->codecs[i]); - } - ldev->codecs[i] = NULL; - } - list_del(&ldev->list); - layouts_list_items--; - of_node_put(ldev->sound); - - ldev->gpio.methods->set_notify(&ldev->gpio, - AOA_NOTIFY_HEADPHONE, - NULL, - NULL); - ldev->gpio.methods->set_notify(&ldev->gpio, - AOA_NOTIFY_LINE_OUT, - NULL, - NULL); - - ldev->gpio.methods->exit(&ldev->gpio); - layout_device = NULL; - kfree(ldev); - sdev->pcmid = -1; - sdev->pcmname = NULL; - return 0; -} - -#ifdef CONFIG_PM -static int aoa_fabric_layout_suspend(struct soundbus_dev *sdev, pm_message_t state) -{ - struct layout_dev *ldev = sdev->ofdev.dev.driver_data; - - printk("aoa_fabric_layout_suspend()\n"); - - if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off) - ldev->gpio.methods->all_amps_off(&ldev->gpio); - - return 0; -} - -static int aoa_fabric_layout_resume(struct soundbus_dev *sdev) -{ - struct layout_dev *ldev = sdev->ofdev.dev.driver_data; - - printk("aoa_fabric_layout_resume()\n"); - - if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off) - ldev->gpio.methods->all_amps_restore(&ldev->gpio); - - return 0; -} -#endif - -static struct soundbus_driver aoa_soundbus_driver = { - .name = "snd_aoa_soundbus_drv", - .owner = THIS_MODULE, - .probe = aoa_fabric_layout_probe, - .remove = aoa_fabric_layout_remove, -#ifdef CONFIG_PM - .suspend = aoa_fabric_layout_suspend, - .resume = aoa_fabric_layout_resume, -#endif -}; - -static int __init aoa_fabric_layout_init(void) -{ - int err; - - err = soundbus_register_driver(&aoa_soundbus_driver); - if (err) - return err; - return 0; -} - -static void __exit aoa_fabric_layout_exit(void) -{ - soundbus_unregister_driver(&aoa_soundbus_driver); - aoa_fabric_unregister(&layout_fabric); -} - -module_init(aoa_fabric_layout_init); -module_exit(aoa_fabric_layout_exit); diff --git a/sound/aoa/soundbus/Kconfig b/sound/aoa/soundbus/Kconfig deleted file mode 100644 index 7368b7ddf..000000000 --- a/sound/aoa/soundbus/Kconfig +++ /dev/null @@ -1,15 +0,0 @@ -config SND_AOA_SOUNDBUS - tristate "Apple Soundbus support" - depends on SOUND - select SND_PCM - ---help--- - This option enables the generic driver for the soundbus - support on Apple machines. - - It is required for the sound bus implementations. - -config SND_AOA_SOUNDBUS_I2S - tristate "I2S bus support" - depends on SND_AOA_SOUNDBUS && PCI - ---help--- - This option enables support for Apple I2S busses. diff --git a/sound/aoa/soundbus/Makefile b/sound/aoa/soundbus/Makefile deleted file mode 100644 index 0e61f5aa0..000000000 --- a/sound/aoa/soundbus/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-$(CONFIG_SND_AOA_SOUNDBUS) += snd-aoa-soundbus.o -snd-aoa-soundbus-objs := core.o sysfs.o -obj-$(CONFIG_SND_AOA_SOUNDBUS_I2S) += i2sbus/ diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c deleted file mode 100644 index 47b3e3768..000000000 --- a/sound/aoa/soundbus/core.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - * soundbus - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#include -#include "soundbus.h" - -MODULE_AUTHOR("Johannes Berg "); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Apple Soundbus"); - -struct soundbus_dev *soundbus_dev_get(struct soundbus_dev *dev) -{ - struct device *tmp; - - if (!dev) - return NULL; - tmp = get_device(&dev->ofdev.dev); - if (tmp) - return to_soundbus_device(tmp); - else - return NULL; -} -EXPORT_SYMBOL_GPL(soundbus_dev_get); - -void soundbus_dev_put(struct soundbus_dev *dev) -{ - if (dev) - put_device(&dev->ofdev.dev); -} -EXPORT_SYMBOL_GPL(soundbus_dev_put); - -static int soundbus_probe(struct device *dev) -{ - int error = -ENODEV; - struct soundbus_driver *drv; - struct soundbus_dev *soundbus_dev; - - drv = to_soundbus_driver(dev->driver); - soundbus_dev = to_soundbus_device(dev); - - if (!drv->probe) - return error; - - soundbus_dev_get(soundbus_dev); - - error = drv->probe(soundbus_dev); - if (error) - soundbus_dev_put(soundbus_dev); - - return error; -} - - -static int soundbus_uevent(struct device *dev, char **envp, int num_envp, - char *buffer, int buffer_size) -{ - struct soundbus_dev * soundbus_dev; - struct of_device * of; - char *scratch, *compat, *compat2; - int i = 0; - int length, cplen, cplen2, seen = 0; - - if (!dev) - return -ENODEV; - - soundbus_dev = to_soundbus_device(dev); - if (!soundbus_dev) - return -ENODEV; - - of = &soundbus_dev->ofdev; - - /* stuff we want to pass to /sbin/hotplug */ - envp[i++] = scratch = buffer; - length = scnprintf (scratch, buffer_size, "OF_NAME=%s", of->node->name); - ++length; - buffer_size -= length; - if ((buffer_size <= 0) || (i >= num_envp)) - return -ENOMEM; - scratch += length; - - envp[i++] = scratch; - length = scnprintf (scratch, buffer_size, "OF_TYPE=%s", of->node->type); - ++length; - buffer_size -= length; - if ((buffer_size <= 0) || (i >= num_envp)) - return -ENOMEM; - scratch += length; - - /* Since the compatible field can contain pretty much anything - * it's not really legal to split it out with commas. We split it - * up using a number of environment variables instead. */ - - compat = (char *) get_property(of->node, "compatible", &cplen); - compat2 = compat; - cplen2= cplen; - while (compat && cplen > 0) { - envp[i++] = scratch; - length = scnprintf (scratch, buffer_size, - "OF_COMPATIBLE_%d=%s", seen, compat); - ++length; - buffer_size -= length; - if ((buffer_size <= 0) || (i >= num_envp)) - return -ENOMEM; - scratch += length; - length = strlen (compat) + 1; - compat += length; - cplen -= length; - seen++; - } - - envp[i++] = scratch; - length = scnprintf (scratch, buffer_size, "OF_COMPATIBLE_N=%d", seen); - ++length; - buffer_size -= length; - if ((buffer_size <= 0) || (i >= num_envp)) - return -ENOMEM; - scratch += length; - - envp[i++] = scratch; - length = scnprintf (scratch, buffer_size, "MODALIAS=%s", - soundbus_dev->modalias); - - buffer_size -= length; - if ((buffer_size <= 0) || (i >= num_envp)) - return -ENOMEM; - - envp[i] = NULL; - - return 0; -} - -static int soundbus_device_remove(struct device *dev) -{ - struct soundbus_dev * soundbus_dev = to_soundbus_device(dev); - struct soundbus_driver * drv = to_soundbus_driver(dev->driver); - - if (dev->driver && drv->remove) - drv->remove(soundbus_dev); - soundbus_dev_put(soundbus_dev); - - return 0; -} - -static void soundbus_device_shutdown(struct device *dev) -{ - struct soundbus_dev * soundbus_dev = to_soundbus_device(dev); - struct soundbus_driver * drv = to_soundbus_driver(dev->driver); - - if (dev->driver && drv->shutdown) - drv->shutdown(soundbus_dev); -} - -#ifdef CONFIG_PM - -static int soundbus_device_suspend(struct device *dev, pm_message_t state) -{ - struct soundbus_dev * soundbus_dev = to_soundbus_device(dev); - struct soundbus_driver * drv = to_soundbus_driver(dev->driver); - - if (dev->driver && drv->suspend) - return drv->suspend(soundbus_dev, state); - return 0; -} - -static int soundbus_device_resume(struct device * dev) -{ - struct soundbus_dev * soundbus_dev = to_soundbus_device(dev); - struct soundbus_driver * drv = to_soundbus_driver(dev->driver); - - if (dev->driver && drv->resume) - return drv->resume(soundbus_dev); - return 0; -} - -#endif /* CONFIG_PM */ - -extern struct device_attribute soundbus_dev_attrs[]; - -static struct bus_type soundbus_bus_type = { - .name = "aoa-soundbus", - .probe = soundbus_probe, - .uevent = soundbus_uevent, - .remove = soundbus_device_remove, - .shutdown = soundbus_device_shutdown, -#ifdef CONFIG_PM - .suspend = soundbus_device_suspend, - .resume = soundbus_device_resume, -#endif - .dev_attrs = soundbus_dev_attrs, -}; - -int soundbus_add_one(struct soundbus_dev *dev) -{ - static int devcount; - - /* sanity checks */ - if (!dev->attach_codec || - !dev->ofdev.node || - dev->pcmname || - dev->pcmid != -1) { - printk(KERN_ERR "soundbus: adding device failed sanity check!\n"); - return -EINVAL; - } - - snprintf(dev->ofdev.dev.bus_id, BUS_ID_SIZE, "soundbus:%x", ++devcount); - dev->ofdev.dev.bus = &soundbus_bus_type; - return of_device_register(&dev->ofdev); -} -EXPORT_SYMBOL_GPL(soundbus_add_one); - -void soundbus_remove_one(struct soundbus_dev *dev) -{ - of_device_unregister(&dev->ofdev); -} -EXPORT_SYMBOL_GPL(soundbus_remove_one); - -int soundbus_register_driver(struct soundbus_driver *drv) -{ - /* initialize common driver fields */ - drv->driver.name = drv->name; - drv->driver.bus = &soundbus_bus_type; - - /* register with core */ - return driver_register(&drv->driver); -} -EXPORT_SYMBOL_GPL(soundbus_register_driver); - -void soundbus_unregister_driver(struct soundbus_driver *drv) -{ - driver_unregister(&drv->driver); -} -EXPORT_SYMBOL_GPL(soundbus_unregister_driver); - -static int __init soundbus_init(void) -{ - return bus_register(&soundbus_bus_type); -} - -static void __exit soundbus_exit(void) -{ - bus_unregister(&soundbus_bus_type); -} - -subsys_initcall(soundbus_init); -module_exit(soundbus_exit); diff --git a/sound/aoa/soundbus/i2sbus/Makefile b/sound/aoa/soundbus/i2sbus/Makefile deleted file mode 100644 index e57a5cf65..000000000 --- a/sound/aoa/soundbus/i2sbus/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -obj-$(CONFIG_SND_AOA_SOUNDBUS_I2S) += snd-aoa-i2sbus.o -snd-aoa-i2sbus-objs := i2sbus-core.o i2sbus-pcm.o i2sbus-control.o diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-control.c b/sound/aoa/soundbus/i2sbus/i2sbus-control.c deleted file mode 100644 index 87beb4ad4..000000000 --- a/sound/aoa/soundbus/i2sbus/i2sbus-control.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * i2sbus driver -- bus control routines - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "i2sbus.h" - -int i2sbus_control_init(struct macio_dev* dev, struct i2sbus_control **c) -{ - *c = kzalloc(sizeof(struct i2sbus_control), GFP_KERNEL); - if (!*c) - return -ENOMEM; - - INIT_LIST_HEAD(&(*c)->list); - - (*c)->macio = dev->bus->chip; - return 0; -} - -void i2sbus_control_destroy(struct i2sbus_control *c) -{ - kfree(c); -} - -/* this is serialised externally */ -int i2sbus_control_add_dev(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev) -{ - struct device_node *np; - - np = i2sdev->sound.ofdev.node; - i2sdev->enable = pmf_find_function(np, "enable"); - i2sdev->cell_enable = pmf_find_function(np, "cell-enable"); - i2sdev->clock_enable = pmf_find_function(np, "clock-enable"); - i2sdev->cell_disable = pmf_find_function(np, "cell-disable"); - i2sdev->clock_disable = pmf_find_function(np, "clock-disable"); - - /* if the bus number is not 0 or 1 we absolutely need to use - * the platform functions -- there's nothing in Darwin that - * would allow seeing a system behind what the FCRs are then, - * and I don't want to go parsing a bunch of platform functions - * by hand to try finding a system... */ - if (i2sdev->bus_number != 0 && i2sdev->bus_number != 1 && - (!i2sdev->enable || - !i2sdev->cell_enable || !i2sdev->clock_enable || - !i2sdev->cell_disable || !i2sdev->clock_disable)) { - pmf_put_function(i2sdev->enable); - pmf_put_function(i2sdev->cell_enable); - pmf_put_function(i2sdev->clock_enable); - pmf_put_function(i2sdev->cell_disable); - pmf_put_function(i2sdev->clock_disable); - return -ENODEV; - } - - list_add(&i2sdev->item, &c->list); - - return 0; -} - -void i2sbus_control_remove_dev(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev) -{ - /* this is serialised externally */ - list_del(&i2sdev->item); - if (list_empty(&c->list)) - i2sbus_control_destroy(c); -} - -int i2sbus_control_enable(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev) -{ - struct pmf_args args = { .count = 0 }; - struct macio_chip *macio = c->macio; - - if (i2sdev->enable) - return pmf_call_one(i2sdev->enable, &args); - - if (macio == NULL || macio->base == NULL) - return -ENODEV; - - switch (i2sdev->bus_number) { - case 0: - /* these need to be locked or done through - * newly created feature calls! */ - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_ENABLE); - break; - case 1: - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_ENABLE); - break; - default: - return -ENODEV; - } - return 0; -} - -int i2sbus_control_cell(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev, - int enable) -{ - struct pmf_args args = { .count = 0 }; - struct macio_chip *macio = c->macio; - - switch (enable) { - case 0: - if (i2sdev->cell_disable) - return pmf_call_one(i2sdev->cell_disable, &args); - break; - case 1: - if (i2sdev->cell_enable) - return pmf_call_one(i2sdev->cell_enable, &args); - break; - default: - printk(KERN_ERR "i2sbus: INVALID CELL ENABLE VALUE\n"); - return -ENODEV; - } - - if (macio == NULL || macio->base == NULL) - return -ENODEV; - - switch (i2sdev->bus_number) { - case 0: - if (enable) - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE); - else - MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CELL_ENABLE); - break; - case 1: - if (enable) - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE); - else - MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CELL_ENABLE); - break; - default: - return -ENODEV; - } - return 0; -} - -int i2sbus_control_clock(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev, - int enable) -{ - struct pmf_args args = { .count = 0 }; - struct macio_chip *macio = c->macio; - - switch (enable) { - case 0: - if (i2sdev->clock_disable) - return pmf_call_one(i2sdev->clock_disable, &args); - break; - case 1: - if (i2sdev->clock_enable) - return pmf_call_one(i2sdev->clock_enable, &args); - break; - default: - printk(KERN_ERR "i2sbus: INVALID CLOCK ENABLE VALUE\n"); - return -ENODEV; - } - - if (macio == NULL || macio->base == NULL) - return -ENODEV; - - switch (i2sdev->bus_number) { - case 0: - if (enable) - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT); - else - MACIO_BIC(KEYLARGO_FCR1, KL1_I2S0_CLK_ENABLE_BIT); - break; - case 1: - if (enable) - MACIO_BIS(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT); - else - MACIO_BIC(KEYLARGO_FCR1, KL1_I2S1_CLK_ENABLE_BIT); - break; - default: - return -ENODEV; - } - return 0; -} diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c deleted file mode 100644 index 23190aa6b..000000000 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ /dev/null @@ -1,455 +0,0 @@ -/* - * i2sbus driver - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "../soundbus.h" -#include "i2sbus.h" - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Johannes Berg "); -MODULE_DESCRIPTION("Apple Soundbus: I2S support"); -/* for auto-loading, declare that we handle this weird - * string that macio puts into the relevant device */ -MODULE_ALIAS("of:Ni2sTi2sC"); - -static int force; -module_param(force, int, 0444); -MODULE_PARM_DESC(force, "Force loading i2sbus even when" - " no layout-id property is present"); - -static struct of_device_id i2sbus_match[] = { - { .name = "i2s" }, - { } -}; - -static int alloc_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev, - struct dbdma_command_mem *r, - int numcmds) -{ - /* one more for rounding */ - r->size = (numcmds+1) * sizeof(struct dbdma_cmd); - /* We use the PCI APIs for now until the generic one gets fixed - * enough or until we get some macio-specific versions - */ - r->space = dma_alloc_coherent( - &macio_get_pci_dev(i2sdev->macio)->dev, - r->size, - &r->bus_addr, - GFP_KERNEL); - - if (!r->space) return -ENOMEM; - - memset(r->space, 0, r->size); - r->cmds = (void*)DBDMA_ALIGN(r->space); - r->bus_cmd_start = r->bus_addr + - (dma_addr_t)((char*)r->cmds - (char*)r->space); - - return 0; -} - -static void free_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev, - struct dbdma_command_mem *r) -{ - if (!r->space) return; - - dma_free_coherent(&macio_get_pci_dev(i2sdev->macio)->dev, - r->size, r->space, r->bus_addr); -} - -static void i2sbus_release_dev(struct device *dev) -{ - struct i2sbus_dev *i2sdev; - int i; - - i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev); - - if (i2sdev->intfregs) iounmap(i2sdev->intfregs); - if (i2sdev->out.dbdma) iounmap(i2sdev->out.dbdma); - if (i2sdev->in.dbdma) iounmap(i2sdev->in.dbdma); - for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) - if (i2sdev->allocated_resource[i]) - release_and_free_resource(i2sdev->allocated_resource[i]); - free_dbdma_descriptor_ring(i2sdev, &i2sdev->out.dbdma_ring); - free_dbdma_descriptor_ring(i2sdev, &i2sdev->in.dbdma_ring); - for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) - free_irq(i2sdev->interrupts[i], i2sdev); - i2sbus_control_remove_dev(i2sdev->control, i2sdev); - mutex_destroy(&i2sdev->lock); - kfree(i2sdev); -} - -static irqreturn_t i2sbus_bus_intr(int irq, void *devid, struct pt_regs *regs) -{ - struct i2sbus_dev *dev = devid; - u32 intreg; - - spin_lock(&dev->low_lock); - intreg = in_le32(&dev->intfregs->intr_ctl); - - /* acknowledge interrupt reasons */ - out_le32(&dev->intfregs->intr_ctl, intreg); - - spin_unlock(&dev->low_lock); - - return IRQ_HANDLED; -} - - -/* - * XXX FIXME: We test the layout_id's here to get the proper way of - * mapping in various registers, thanks to bugs in Apple device-trees. - * We could instead key off the machine model and the name of the i2s - * node (i2s-a). This we'll do when we move it all to macio_asic.c - * and have that export items for each sub-node too. - */ -static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index, - int layout, struct resource *res) -{ - struct device_node *parent; - int pindex, rc = -ENXIO; - u32 *reg; - - /* Machines with layout 76 and 36 (K2 based) have a weird device - * tree what we need to special case. - * Normal machines just fetch the resource from the i2s-X node. - * Darwin further divides normal machines into old and new layouts - * with a subtely different code path but that doesn't seem necessary - * in practice, they just bloated it. In addition, even on our K2 - * case the i2s-modem node, if we ever want to handle it, uses the - * normal layout - */ - if (layout != 76 && layout != 36) - return of_address_to_resource(np, index, res); - - parent = of_get_parent(np); - pindex = (index == aoa_resource_i2smmio) ? 0 : 1; - rc = of_address_to_resource(parent, pindex, res); - if (rc) - goto bail; - reg = (u32 *)get_property(np, "reg", NULL); - if (reg == NULL) { - rc = -ENXIO; - goto bail; - } - res->start += reg[index * 2]; - res->end = res->start + reg[index * 2 + 1] - 1; - bail: - of_node_put(parent); - return rc; -} - -/* FIXME: look at device node refcounting */ -static int i2sbus_add_dev(struct macio_dev *macio, - struct i2sbus_control *control, - struct device_node *np) -{ - struct i2sbus_dev *dev; - struct device_node *child = NULL, *sound = NULL; - struct resource *r; - int i, layout = 0, rlen; - static const char *rnames[] = { "i2sbus: %s (control)", - "i2sbus: %s (tx)", - "i2sbus: %s (rx)" }; - static irqreturn_t (*ints[])(int irq, void *devid, - struct pt_regs *regs) = { - i2sbus_bus_intr, - i2sbus_tx_intr, - i2sbus_rx_intr - }; - - if (strlen(np->name) != 5) - return 0; - if (strncmp(np->name, "i2s-", 4)) - return 0; - - dev = kzalloc(sizeof(struct i2sbus_dev), GFP_KERNEL); - if (!dev) - return 0; - - i = 0; - while ((child = of_get_next_child(np, child))) { - if (strcmp(child->name, "sound") == 0) { - i++; - sound = child; - } - } - if (i == 1) { - u32 *layout_id; - layout_id = (u32*) get_property(sound, "layout-id", NULL); - if (layout_id) { - layout = *layout_id; - snprintf(dev->sound.modalias, 32, - "sound-layout-%d", layout); - force = 1; - } - } - /* for the time being, until we can handle non-layout-id - * things in some fabric, refuse to attach if there is no - * layout-id property or we haven't been forced to attach. - * When there are two i2s busses and only one has a layout-id, - * then this depends on the order, but that isn't important - * either as the second one in that case is just a modem. */ - if (!force) { - kfree(dev); - return -ENODEV; - } - - mutex_init(&dev->lock); - spin_lock_init(&dev->low_lock); - dev->sound.ofdev.node = np; - dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; - dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; - dev->sound.ofdev.dev.parent = &macio->ofdev.dev; - dev->sound.ofdev.dev.release = i2sbus_release_dev; - dev->sound.attach_codec = i2sbus_attach_codec; - dev->sound.detach_codec = i2sbus_detach_codec; - dev->sound.pcmid = -1; - dev->macio = macio; - dev->control = control; - dev->bus_number = np->name[4] - 'a'; - INIT_LIST_HEAD(&dev->sound.codec_list); - - for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { - dev->interrupts[i] = -1; - snprintf(dev->rnames[i], sizeof(dev->rnames[i]), - rnames[i], np->name); - } - for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { - int irq = irq_of_parse_and_map(np, i); - if (request_irq(irq, ints[i], 0, dev->rnames[i], dev)) - goto err; - dev->interrupts[i] = irq; - } - - - /* Resource handling is problematic as some device-trees contain - * useless crap (ugh ugh ugh). We work around that here by calling - * specific functions for calculating the appropriate resources. - * - * This will all be moved to macio_asic.c at one point - */ - for (i = aoa_resource_i2smmio; i <= aoa_resource_rxdbdma; i++) { - if (i2sbus_get_and_fixup_rsrc(np,i,layout,&dev->resources[i])) - goto err; - /* If only we could use our resource dev->resources[i]... - * but request_resource doesn't know about parents and - * contained resources... - */ - dev->allocated_resource[i] = - request_mem_region(dev->resources[i].start, - dev->resources[i].end - - dev->resources[i].start + 1, - dev->rnames[i]); - if (!dev->allocated_resource[i]) { - printk(KERN_ERR "i2sbus: failed to claim resource %d!\n", i); - goto err; - } - } - - r = &dev->resources[aoa_resource_i2smmio]; - rlen = r->end - r->start + 1; - if (rlen < sizeof(struct i2s_interface_regs)) - goto err; - dev->intfregs = ioremap(r->start, rlen); - - r = &dev->resources[aoa_resource_txdbdma]; - rlen = r->end - r->start + 1; - if (rlen < sizeof(struct dbdma_regs)) - goto err; - dev->out.dbdma = ioremap(r->start, rlen); - - r = &dev->resources[aoa_resource_rxdbdma]; - rlen = r->end - r->start + 1; - if (rlen < sizeof(struct dbdma_regs)) - goto err; - dev->in.dbdma = ioremap(r->start, rlen); - - if (!dev->intfregs || !dev->out.dbdma || !dev->in.dbdma) - goto err; - - if (alloc_dbdma_descriptor_ring(dev, &dev->out.dbdma_ring, - MAX_DBDMA_COMMANDS)) - goto err; - if (alloc_dbdma_descriptor_ring(dev, &dev->in.dbdma_ring, - MAX_DBDMA_COMMANDS)) - goto err; - - if (i2sbus_control_add_dev(dev->control, dev)) { - printk(KERN_ERR "i2sbus: control layer didn't like bus\n"); - goto err; - } - - if (soundbus_add_one(&dev->sound)) { - printk(KERN_DEBUG "i2sbus: device registration error!\n"); - goto err; - } - - /* enable this cell */ - i2sbus_control_cell(dev->control, dev, 1); - i2sbus_control_enable(dev->control, dev); - i2sbus_control_clock(dev->control, dev, 1); - - return 1; - err: - for (i=0;i<3;i++) - if (dev->interrupts[i] != -1) - free_irq(dev->interrupts[i], dev); - free_dbdma_descriptor_ring(dev, &dev->out.dbdma_ring); - free_dbdma_descriptor_ring(dev, &dev->in.dbdma_ring); - if (dev->intfregs) iounmap(dev->intfregs); - if (dev->out.dbdma) iounmap(dev->out.dbdma); - if (dev->in.dbdma) iounmap(dev->in.dbdma); - for (i=0;i<3;i++) - if (dev->allocated_resource[i]) - release_and_free_resource(dev->allocated_resource[i]); - mutex_destroy(&dev->lock); - kfree(dev); - return 0; -} - -static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) -{ - struct device_node *np = NULL; - int got = 0, err; - struct i2sbus_control *control = NULL; - - err = i2sbus_control_init(dev, &control); - if (err) - return err; - if (!control) { - printk(KERN_ERR "i2sbus_control_init API breakage\n"); - return -ENODEV; - } - - while ((np = of_get_next_child(dev->ofdev.node, np))) { - if (device_is_compatible(np, "i2sbus") || - device_is_compatible(np, "i2s-modem")) { - got += i2sbus_add_dev(dev, control, np); - } - } - - if (!got) { - /* found none, clean up */ - i2sbus_control_destroy(control); - return -ENODEV; - } - - dev->ofdev.dev.driver_data = control; - - return 0; -} - -static int i2sbus_remove(struct macio_dev* dev) -{ - struct i2sbus_control *control = dev->ofdev.dev.driver_data; - struct i2sbus_dev *i2sdev, *tmp; - - list_for_each_entry_safe(i2sdev, tmp, &control->list, item) - soundbus_remove_one(&i2sdev->sound); - - return 0; -} - -#ifdef CONFIG_PM -static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state) -{ - struct i2sbus_control *control = dev->ofdev.dev.driver_data; - struct codec_info_item *cii; - struct i2sbus_dev* i2sdev; - int err, ret = 0; - - list_for_each_entry(i2sdev, &control->list, item) { - /* Notify Alsa */ - if (i2sdev->sound.pcm) { - /* Suspend PCM streams */ - snd_pcm_suspend_all(i2sdev->sound.pcm); - /* Probably useless as we handle - * power transitions ourselves */ - snd_power_change_state(i2sdev->sound.pcm->card, - SNDRV_CTL_POWER_D3hot); - } - /* Notify codecs */ - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - err = 0; - if (cii->codec->suspend) - err = cii->codec->suspend(cii, state); - if (err) - ret = err; - } - } - return ret; -} - -static int i2sbus_resume(struct macio_dev* dev) -{ - struct i2sbus_control *control = dev->ofdev.dev.driver_data; - struct codec_info_item *cii; - struct i2sbus_dev* i2sdev; - int err, ret = 0; - - list_for_each_entry(i2sdev, &control->list, item) { - /* Notify codecs so they can re-initialize */ - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - err = 0; - if (cii->codec->resume) - err = cii->codec->resume(cii); - if (err) - ret = err; - } - /* Notify Alsa */ - if (i2sdev->sound.pcm) { - /* Same comment as above, probably useless */ - snd_power_change_state(i2sdev->sound.pcm->card, - SNDRV_CTL_POWER_D0); - } - } - - return ret; -} -#endif /* CONFIG_PM */ - -static int i2sbus_shutdown(struct macio_dev* dev) -{ - return 0; -} - -static struct macio_driver i2sbus_drv = { - .name = "soundbus-i2s", - .owner = THIS_MODULE, - .match_table = i2sbus_match, - .probe = i2sbus_probe, - .remove = i2sbus_remove, -#ifdef CONFIG_PM - .suspend = i2sbus_suspend, - .resume = i2sbus_resume, -#endif - .shutdown = i2sbus_shutdown, -}; - -static int __init soundbus_i2sbus_init(void) -{ - return macio_register_driver(&i2sbus_drv); -} - -static void __exit soundbus_i2sbus_exit(void) -{ - macio_unregister_driver(&i2sbus_drv); -} - -module_init(soundbus_i2sbus_init); -module_exit(soundbus_i2sbus_exit); diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-interface.h b/sound/aoa/soundbus/i2sbus/i2sbus-interface.h deleted file mode 100644 index c6b5f5452..000000000 --- a/sound/aoa/soundbus/i2sbus/i2sbus-interface.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * i2sbus driver -- interface register definitions - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#ifndef __I2SBUS_INTERFACE_H -#define __I2SBUS_INTERFACE_H - -/* i2s bus control registers, at least what we know about them */ - -#define __PAD(m,n) u8 __pad##m[n] -#define _PAD(line, n) __PAD(line, n) -#define PAD(n) _PAD(__LINE__, (n)) -struct i2s_interface_regs { - __le32 intr_ctl; /* 0x00 */ - PAD(12); - __le32 serial_format; /* 0x10 */ - PAD(12); - __le32 codec_msg_out; /* 0x20 */ - PAD(12); - __le32 codec_msg_in; /* 0x30 */ - PAD(12); - __le32 frame_count; /* 0x40 */ - PAD(12); - __le32 frame_match; /* 0x50 */ - PAD(12); - __le32 data_word_sizes; /* 0x60 */ - PAD(12); - __le32 peak_level_sel; /* 0x70 */ - PAD(12); - __le32 peak_level_in0; /* 0x80 */ - PAD(12); - __le32 peak_level_in1; /* 0x90 */ - PAD(12); - /* total size: 0x100 bytes */ -} __attribute__((__packed__)); - -/* interrupt register is just a bitfield with - * interrupt enable and pending bits */ -#define I2S_REG_INTR_CTL 0x00 -# define I2S_INT_FRAME_COUNT (1<<31) -# define I2S_PENDING_FRAME_COUNT (1<<30) -# define I2S_INT_MESSAGE_FLAG (1<<29) -# define I2S_PENDING_MESSAGE_FLAG (1<<28) -# define I2S_INT_NEW_PEAK (1<<27) -# define I2S_PENDING_NEW_PEAK (1<<26) -# define I2S_INT_CLOCKS_STOPPED (1<<25) -# define I2S_PENDING_CLOCKS_STOPPED (1<<24) -# define I2S_INT_EXTERNAL_SYNC_ERROR (1<<23) -# define I2S_PENDING_EXTERNAL_SYNC_ERROR (1<<22) -# define I2S_INT_EXTERNAL_SYNC_OK (1<<21) -# define I2S_PENDING_EXTERNAL_SYNC_OK (1<<20) -# define I2S_INT_NEW_SAMPLE_RATE (1<<19) -# define I2S_PENDING_NEW_SAMPLE_RATE (1<<18) -# define I2S_INT_STATUS_FLAG (1<<17) -# define I2S_PENDING_STATUS_FLAG (1<<16) - -/* serial format register is more interesting :) - * It contains: - * - clock source - * - MClk divisor - * - SClk divisor - * - SClk master flag - * - serial format (sony, i2s 64x, i2s 32x, dav, silabs) - * - external sample frequency interrupt (don't understand) - * - external sample frequency - */ -#define I2S_REG_SERIAL_FORMAT 0x10 -/* clock source. You get either 18.432, 45.1584 or 49.1520 MHz */ -# define I2S_SF_CLOCK_SOURCE_SHIFT 30 -# define I2S_SF_CLOCK_SOURCE_MASK (3< - * - * GPL v2, can be found in COPYING. - */ - -#include -#include -/* So apparently there's a reason for requiring driver.h - * to be included first, even if I don't know it... */ -#include -#include -#include -#include -#include "../soundbus.h" -#include "i2sbus.h" - -static inline void get_pcm_info(struct i2sbus_dev *i2sdev, int in, - struct pcm_info **pi, struct pcm_info **other) -{ - if (in) { - if (pi) - *pi = &i2sdev->in; - if (other) - *other = &i2sdev->out; - } else { - if (pi) - *pi = &i2sdev->out; - if (other) - *other = &i2sdev->in; - } -} - -static int clock_and_divisors(int mclk, int sclk, int rate, int *out) -{ - /* sclk must be derived from mclk! */ - if (mclk % sclk) - return -1; - /* derive sclk register value */ - if (i2s_sf_sclkdiv(mclk / sclk, out)) - return -1; - - if (I2S_CLOCK_SPEED_18MHz % (rate * mclk) == 0) { - if (!i2s_sf_mclkdiv(I2S_CLOCK_SPEED_18MHz / (rate * mclk), out)) { - *out |= I2S_SF_CLOCK_SOURCE_18MHz; - return 0; - } - } - if (I2S_CLOCK_SPEED_45MHz % (rate * mclk) == 0) { - if (!i2s_sf_mclkdiv(I2S_CLOCK_SPEED_45MHz / (rate * mclk), out)) { - *out |= I2S_SF_CLOCK_SOURCE_45MHz; - return 0; - } - } - if (I2S_CLOCK_SPEED_49MHz % (rate * mclk) == 0) { - if (!i2s_sf_mclkdiv(I2S_CLOCK_SPEED_49MHz / (rate * mclk), out)) { - *out |= I2S_SF_CLOCK_SOURCE_49MHz; - return 0; - } - } - return -1; -} - -#define CHECK_RATE(rate) \ - do { if (rates & SNDRV_PCM_RATE_ ##rate) { \ - int dummy; \ - if (clock_and_divisors(sysclock_factor, \ - bus_factor, rate, &dummy)) \ - rates &= ~SNDRV_PCM_RATE_ ##rate; \ - } } while (0) - -static int i2sbus_pcm_open(struct i2sbus_dev *i2sdev, int in) -{ - struct pcm_info *pi, *other; - struct soundbus_dev *sdev; - int masks_inited = 0, err; - struct codec_info_item *cii, *rev; - struct snd_pcm_hardware *hw; - u64 formats = 0; - unsigned int rates = 0; - struct transfer_info v; - int result = 0; - int bus_factor = 0, sysclock_factor = 0; - int found_this; - - mutex_lock(&i2sdev->lock); - - get_pcm_info(i2sdev, in, &pi, &other); - - hw = &pi->substream->runtime->hw; - sdev = &i2sdev->sound; - - if (pi->active) { - /* alsa messed up */ - result = -EBUSY; - goto out_unlock; - } - - /* we now need to assign the hw */ - list_for_each_entry(cii, &sdev->codec_list, list) { - struct transfer_info *ti = cii->codec->transfers; - bus_factor = cii->codec->bus_factor; - sysclock_factor = cii->codec->sysclock_factor; - while (ti->formats && ti->rates) { - v = *ti; - if (ti->transfer_in == in - && cii->codec->usable(cii, ti, &v)) { - if (masks_inited) { - formats &= v.formats; - rates &= v.rates; - } else { - formats = v.formats; - rates = v.rates; - masks_inited = 1; - } - } - ti++; - } - } - if (!masks_inited || !bus_factor || !sysclock_factor) { - result = -ENODEV; - goto out_unlock; - } - /* bus dependent stuff */ - hw->info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_RESUME; - - CHECK_RATE(5512); - CHECK_RATE(8000); - CHECK_RATE(11025); - CHECK_RATE(16000); - CHECK_RATE(22050); - CHECK_RATE(32000); - CHECK_RATE(44100); - CHECK_RATE(48000); - CHECK_RATE(64000); - CHECK_RATE(88200); - CHECK_RATE(96000); - CHECK_RATE(176400); - CHECK_RATE(192000); - hw->rates = rates; - - /* well. the codec might want 24 bits only, and we'll - * ever only transfer 24 bits, but they are top-aligned! - * So for alsa, we claim that we're doing full 32 bit - * while in reality we'll ignore the lower 8 bits of - * that when doing playback (they're transferred as 0 - * as far as I know, no codecs we have are 32-bit capable - * so I can't really test) and when doing recording we'll - * always have those lower 8 bits recorded as 0 */ - if (formats & SNDRV_PCM_FMTBIT_S24_BE) - formats |= SNDRV_PCM_FMTBIT_S32_BE; - if (formats & SNDRV_PCM_FMTBIT_U24_BE) - formats |= SNDRV_PCM_FMTBIT_U32_BE; - /* now mask off what we can support. I suppose we could - * also support S24_3LE and some similar formats, but I - * doubt there's a codec that would be able to use that, - * so we don't support it here. */ - hw->formats = formats & (SNDRV_PCM_FMTBIT_S16_BE | - SNDRV_PCM_FMTBIT_U16_BE | - SNDRV_PCM_FMTBIT_S32_BE | - SNDRV_PCM_FMTBIT_U32_BE); - - /* we need to set the highest and lowest rate possible. - * These are the highest and lowest rates alsa can - * support properly in its bitfield. - * Below, we'll use that to restrict to the rate - * currently in use (if any). */ - hw->rate_min = 5512; - hw->rate_max = 192000; - /* if the other stream is active, then we can only - * support what it is currently using. - * FIXME: I lied. This comment is wrong. We can support - * anything that works with the same serial format, ie. - * when recording 24 bit sound we can well play 16 bit - * sound at the same time iff using the same transfer mode. - */ - if (other->active) { - /* FIXME: is this guaranteed by the alsa api? */ - hw->formats &= (1ULL << i2sdev->format); - /* see above, restrict rates to the one we already have */ - hw->rate_min = i2sdev->rate; - hw->rate_max = i2sdev->rate; - } - - hw->channels_min = 2; - hw->channels_max = 2; - /* these are somewhat arbitrary */ - hw->buffer_bytes_max = 131072; - hw->period_bytes_min = 256; - hw->period_bytes_max = 16384; - hw->periods_min = 3; - hw->periods_max = MAX_DBDMA_COMMANDS; - list_for_each_entry(cii, &sdev->codec_list, list) { - if (cii->codec->open) { - err = cii->codec->open(cii, pi->substream); - if (err) { - result = err; - /* unwind */ - found_this = 0; - list_for_each_entry_reverse(rev, - &sdev->codec_list, list) { - if (found_this && rev->codec->close) { - rev->codec->close(rev, - pi->substream); - } - if (rev == cii) - found_this = 1; - } - goto out_unlock; - } - } - } - - out_unlock: - mutex_unlock(&i2sdev->lock); - return result; -} - -#undef CHECK_RATE - -static int i2sbus_pcm_close(struct i2sbus_dev *i2sdev, int in) -{ - struct codec_info_item *cii; - struct pcm_info *pi; - int err = 0, tmp; - - mutex_lock(&i2sdev->lock); - - get_pcm_info(i2sdev, in, &pi, NULL); - - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - if (cii->codec->close) { - tmp = cii->codec->close(cii, pi->substream); - if (tmp) - err = tmp; - } - } - - pi->substream = NULL; - pi->active = 0; - mutex_unlock(&i2sdev->lock); - return err; -} - -static int i2sbus_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); -} - -static int i2sbus_hw_free(struct snd_pcm_substream *substream) -{ - snd_pcm_lib_free_pages(substream); - return 0; -} - -static int i2sbus_pcm_prepare(struct i2sbus_dev *i2sdev, int in) -{ - /* whee. Hard work now. The user has selected a bitrate - * and bit format, so now we have to program our - * I2S controller appropriately. */ - struct snd_pcm_runtime *runtime; - struct dbdma_cmd *command; - int i, periodsize; - dma_addr_t offset; - struct bus_info bi; - struct codec_info_item *cii; - int sfr = 0; /* serial format register */ - int dws = 0; /* data word sizes reg */ - int input_16bit; - struct pcm_info *pi, *other; - int cnt; - int result = 0; - - mutex_lock(&i2sdev->lock); - - get_pcm_info(i2sdev, in, &pi, &other); - - if (pi->dbdma_ring.running) { - result = -EBUSY; - goto out_unlock; - } - - runtime = pi->substream->runtime; - pi->active = 1; - if (other->active && - ((i2sdev->format != runtime->format) - || (i2sdev->rate != runtime->rate))) { - result = -EINVAL; - goto out_unlock; - } - - i2sdev->format = runtime->format; - i2sdev->rate = runtime->rate; - - periodsize = snd_pcm_lib_period_bytes(pi->substream); - pi->current_period = 0; - - /* generate dbdma command ring first */ - command = pi->dbdma_ring.cmds; - offset = runtime->dma_addr; - for (i = 0; i < pi->substream->runtime->periods; - i++, command++, offset += periodsize) { - memset(command, 0, sizeof(struct dbdma_cmd)); - command->command = - cpu_to_le16((in ? INPUT_MORE : OUTPUT_MORE) | INTR_ALWAYS); - command->phy_addr = cpu_to_le32(offset); - command->req_count = cpu_to_le16(periodsize); - command->xfer_status = cpu_to_le16(0); - } - /* last one branches back to first */ - command--; - command->command |= cpu_to_le16(BR_ALWAYS); - command->cmd_dep = cpu_to_le32(pi->dbdma_ring.bus_cmd_start); - - /* ok, let's set the serial format and stuff */ - switch (runtime->format) { - /* 16 bit formats */ - case SNDRV_PCM_FORMAT_S16_BE: - case SNDRV_PCM_FORMAT_U16_BE: - /* FIXME: if we add different bus factors we need to - * do more here!! */ - bi.bus_factor = 0; - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - bi.bus_factor = cii->codec->bus_factor; - break; - } - if (!bi.bus_factor) { - result = -ENODEV; - goto out_unlock; - } - input_16bit = 1; - break; - case SNDRV_PCM_FORMAT_S32_BE: - case SNDRV_PCM_FORMAT_U32_BE: - /* force 64x bus speed, otherwise the data cannot be - * transferred quickly enough! */ - bi.bus_factor = 64; - input_16bit = 0; - break; - default: - result = -EINVAL; - goto out_unlock; - } - /* we assume all sysclocks are the same! */ - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - bi.sysclock_factor = cii->codec->sysclock_factor; - break; - } - - if (clock_and_divisors(bi.sysclock_factor, - bi.bus_factor, - runtime->rate, - &sfr) < 0) { - result = -EINVAL; - goto out_unlock; - } - switch (bi.bus_factor) { - case 32: - sfr |= I2S_SF_SERIAL_FORMAT_I2S_32X; - break; - case 64: - sfr |= I2S_SF_SERIAL_FORMAT_I2S_64X; - break; - } - /* FIXME: THIS ASSUMES MASTER ALL THE TIME */ - sfr |= I2S_SF_SCLK_MASTER; - - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) { - int err = 0; - if (cii->codec->prepare) - err = cii->codec->prepare(cii, &bi, pi->substream); - if (err) { - result = err; - goto out_unlock; - } - } - /* codecs are fine with it, so set our clocks */ - if (input_16bit) - dws = (2 << I2S_DWS_NUM_CHANNELS_IN_SHIFT) | - (2 << I2S_DWS_NUM_CHANNELS_OUT_SHIFT) | - I2S_DWS_DATA_IN_16BIT | I2S_DWS_DATA_OUT_16BIT; - else - dws = (2 << I2S_DWS_NUM_CHANNELS_IN_SHIFT) | - (2 << I2S_DWS_NUM_CHANNELS_OUT_SHIFT) | - I2S_DWS_DATA_IN_24BIT | I2S_DWS_DATA_OUT_24BIT; - - /* early exit if already programmed correctly */ - /* not locking these is fine since we touch them only in this function */ - if (in_le32(&i2sdev->intfregs->serial_format) == sfr - && in_le32(&i2sdev->intfregs->data_word_sizes) == dws) - goto out_unlock; - - /* let's notify the codecs about clocks going away. - * For now we only do mastering on the i2s cell... */ - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) - if (cii->codec->switch_clock) - cii->codec->switch_clock(cii, CLOCK_SWITCH_PREPARE_SLAVE); - - i2sbus_control_enable(i2sdev->control, i2sdev); - i2sbus_control_cell(i2sdev->control, i2sdev, 1); - - out_le32(&i2sdev->intfregs->intr_ctl, I2S_PENDING_CLOCKS_STOPPED); - - i2sbus_control_clock(i2sdev->control, i2sdev, 0); - - msleep(1); - - /* wait for clock stopped. This can apparently take a while... */ - cnt = 100; - while (cnt-- && - !(in_le32(&i2sdev->intfregs->intr_ctl) & I2S_PENDING_CLOCKS_STOPPED)) { - msleep(5); - } - out_le32(&i2sdev->intfregs->intr_ctl, I2S_PENDING_CLOCKS_STOPPED); - - /* not locking these is fine since we touch them only in this function */ - out_le32(&i2sdev->intfregs->serial_format, sfr); - out_le32(&i2sdev->intfregs->data_word_sizes, dws); - - i2sbus_control_enable(i2sdev->control, i2sdev); - i2sbus_control_cell(i2sdev->control, i2sdev, 1); - i2sbus_control_clock(i2sdev->control, i2sdev, 1); - msleep(1); - - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) - if (cii->codec->switch_clock) - cii->codec->switch_clock(cii, CLOCK_SWITCH_SLAVE); - - out_unlock: - mutex_unlock(&i2sdev->lock); - return result; -} - -static struct dbdma_cmd STOP_CMD = { - .command = __constant_cpu_to_le16(DBDMA_STOP), -}; - -static int i2sbus_pcm_trigger(struct i2sbus_dev *i2sdev, int in, int cmd) -{ - struct codec_info_item *cii; - struct pcm_info *pi; - int timeout; - struct dbdma_cmd tmp; - int result = 0; - unsigned long flags; - - spin_lock_irqsave(&i2sdev->low_lock, flags); - - get_pcm_info(i2sdev, in, &pi, NULL); - - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - case SNDRV_PCM_TRIGGER_RESUME: - if (pi->dbdma_ring.running) { - result = -EALREADY; - goto out_unlock; - } - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) - if (cii->codec->start) - cii->codec->start(cii, pi->substream); - pi->dbdma_ring.running = 1; - - /* reset dma engine */ - out_le32(&pi->dbdma->control, - 0 | (RUN | PAUSE | FLUSH | WAKE) << 16); - timeout = 100; - while (in_le32(&pi->dbdma->status) & RUN && timeout--) - udelay(1); - if (timeout <= 0) { - printk(KERN_ERR - "i2sbus: error waiting for dma reset\n"); - result = -ENXIO; - goto out_unlock; - } - - /* write dma command buffer address to the dbdma chip */ - out_le32(&pi->dbdma->cmdptr, pi->dbdma_ring.bus_cmd_start); - /* post PCI write */ - mb(); - (void)in_le32(&pi->dbdma->status); - - /* change first command to STOP */ - tmp = *pi->dbdma_ring.cmds; - *pi->dbdma_ring.cmds = STOP_CMD; - - /* set running state, remember that the first command is STOP */ - out_le32(&pi->dbdma->control, RUN | (RUN << 16)); - timeout = 100; - /* wait for STOP to be executed */ - while (in_le32(&pi->dbdma->status) & ACTIVE && timeout--) - udelay(1); - if (timeout <= 0) { - printk(KERN_ERR "i2sbus: error waiting for dma stop\n"); - result = -ENXIO; - goto out_unlock; - } - /* again, write dma command buffer address to the dbdma chip, - * this time of the first real command */ - *pi->dbdma_ring.cmds = tmp; - out_le32(&pi->dbdma->cmdptr, pi->dbdma_ring.bus_cmd_start); - /* post write */ - mb(); - (void)in_le32(&pi->dbdma->status); - - /* reset dma engine again */ - out_le32(&pi->dbdma->control, - 0 | (RUN | PAUSE | FLUSH | WAKE) << 16); - timeout = 100; - while (in_le32(&pi->dbdma->status) & RUN && timeout--) - udelay(1); - if (timeout <= 0) { - printk(KERN_ERR - "i2sbus: error waiting for dma reset\n"); - result = -ENXIO; - goto out_unlock; - } - - /* wake up the chip with the next descriptor */ - out_le32(&pi->dbdma->control, - (RUN | WAKE) | ((RUN | WAKE) << 16)); - /* get the frame count */ - pi->frame_count = in_le32(&i2sdev->intfregs->frame_count); - - /* off you go! */ - break; - case SNDRV_PCM_TRIGGER_STOP: - case SNDRV_PCM_TRIGGER_SUSPEND: - if (!pi->dbdma_ring.running) { - result = -EALREADY; - goto out_unlock; - } - - /* turn off all relevant bits */ - out_le32(&pi->dbdma->control, - (RUN | WAKE | FLUSH | PAUSE) << 16); - { - /* FIXME: move to own function */ - int timeout = 5000; - while ((in_le32(&pi->dbdma->status) & RUN) - && --timeout > 0) - udelay(1); - if (!timeout) - printk(KERN_ERR - "i2sbus: timed out turning " - "off dbdma engine!\n"); - } - - pi->dbdma_ring.running = 0; - list_for_each_entry(cii, &i2sdev->sound.codec_list, list) - if (cii->codec->stop) - cii->codec->stop(cii, pi->substream); - break; - default: - result = -EINVAL; - goto out_unlock; - } - - out_unlock: - spin_unlock_irqrestore(&i2sdev->low_lock, flags); - return result; -} - -static snd_pcm_uframes_t i2sbus_pcm_pointer(struct i2sbus_dev *i2sdev, int in) -{ - struct pcm_info *pi; - u32 fc; - - get_pcm_info(i2sdev, in, &pi, NULL); - - fc = in_le32(&i2sdev->intfregs->frame_count); - fc = fc - pi->frame_count; - - return (bytes_to_frames(pi->substream->runtime, - pi->current_period * - snd_pcm_lib_period_bytes(pi->substream)) - + fc) % pi->substream->runtime->buffer_size; -} - -static inline void handle_interrupt(struct i2sbus_dev *i2sdev, int in) -{ - struct pcm_info *pi; - u32 fc; - u32 delta; - - spin_lock(&i2sdev->low_lock); - get_pcm_info(i2sdev, in, &pi, NULL); - - if (!pi->dbdma_ring.running) { - /* there was still an interrupt pending - * while we stopped. or maybe another - * processor (not the one that was stopping - * the DMA engine) was spinning above - * waiting for the lock. */ - goto out_unlock; - } - - fc = in_le32(&i2sdev->intfregs->frame_count); - /* a counter overflow does not change the calculation. */ - delta = fc - pi->frame_count; - - /* update current_period */ - while (delta >= pi->substream->runtime->period_size) { - pi->current_period++; - delta = delta - pi->substream->runtime->period_size; - } - - if (unlikely(delta)) { - /* Some interrupt came late, so check the dbdma. - * This special case exists to syncronize the frame_count with - * the dbdma transfer, but is hit every once in a while. */ - int period; - - period = (in_le32(&pi->dbdma->cmdptr) - - pi->dbdma_ring.bus_cmd_start) - / sizeof(struct dbdma_cmd); - pi->current_period = pi->current_period - % pi->substream->runtime->periods; - - while (pi->current_period != period) { - pi->current_period++; - pi->current_period %= pi->substream->runtime->periods; - /* Set delta to zero, as the frame_count value is too - * high (otherwise the code path will not be executed). - * This corrects the fact that the frame_count is too - * low at the beginning due to buffering. */ - delta = 0; - } - } - - pi->frame_count = fc - delta; - pi->current_period %= pi->substream->runtime->periods; - - spin_unlock(&i2sdev->low_lock); - /* may call _trigger again, hence needs to be unlocked */ - snd_pcm_period_elapsed(pi->substream); - return; - out_unlock: - spin_unlock(&i2sdev->low_lock); -} - -irqreturn_t i2sbus_tx_intr(int irq, void *devid, struct pt_regs *regs) -{ - handle_interrupt((struct i2sbus_dev *)devid, 0); - return IRQ_HANDLED; -} - -irqreturn_t i2sbus_rx_intr(int irq, void *devid, struct pt_regs * regs) -{ - handle_interrupt((struct i2sbus_dev *)devid, 1); - return IRQ_HANDLED; -} - -static int i2sbus_playback_open(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - i2sdev->out.substream = substream; - return i2sbus_pcm_open(i2sdev, 0); -} - -static int i2sbus_playback_close(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - int err; - - if (!i2sdev) - return -EINVAL; - if (i2sdev->out.substream != substream) - return -EINVAL; - err = i2sbus_pcm_close(i2sdev, 0); - if (!err) - i2sdev->out.substream = NULL; - return err; -} - -static int i2sbus_playback_prepare(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->out.substream != substream) - return -EINVAL; - return i2sbus_pcm_prepare(i2sdev, 0); -} - -static int i2sbus_playback_trigger(struct snd_pcm_substream *substream, int cmd) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->out.substream != substream) - return -EINVAL; - return i2sbus_pcm_trigger(i2sdev, 0, cmd); -} - -static snd_pcm_uframes_t i2sbus_playback_pointer(struct snd_pcm_substream - *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->out.substream != substream) - return 0; - return i2sbus_pcm_pointer(i2sdev, 0); -} - -static struct snd_pcm_ops i2sbus_playback_ops = { - .open = i2sbus_playback_open, - .close = i2sbus_playback_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = i2sbus_hw_params, - .hw_free = i2sbus_hw_free, - .prepare = i2sbus_playback_prepare, - .trigger = i2sbus_playback_trigger, - .pointer = i2sbus_playback_pointer, -}; - -static int i2sbus_record_open(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - i2sdev->in.substream = substream; - return i2sbus_pcm_open(i2sdev, 1); -} - -static int i2sbus_record_close(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - int err; - - if (!i2sdev) - return -EINVAL; - if (i2sdev->in.substream != substream) - return -EINVAL; - err = i2sbus_pcm_close(i2sdev, 1); - if (!err) - i2sdev->in.substream = NULL; - return err; -} - -static int i2sbus_record_prepare(struct snd_pcm_substream *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->in.substream != substream) - return -EINVAL; - return i2sbus_pcm_prepare(i2sdev, 1); -} - -static int i2sbus_record_trigger(struct snd_pcm_substream *substream, int cmd) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->in.substream != substream) - return -EINVAL; - return i2sbus_pcm_trigger(i2sdev, 1, cmd); -} - -static snd_pcm_uframes_t i2sbus_record_pointer(struct snd_pcm_substream - *substream) -{ - struct i2sbus_dev *i2sdev = snd_pcm_substream_chip(substream); - - if (!i2sdev) - return -EINVAL; - if (i2sdev->in.substream != substream) - return 0; - return i2sbus_pcm_pointer(i2sdev, 1); -} - -static struct snd_pcm_ops i2sbus_record_ops = { - .open = i2sbus_record_open, - .close = i2sbus_record_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = i2sbus_hw_params, - .hw_free = i2sbus_hw_free, - .prepare = i2sbus_record_prepare, - .trigger = i2sbus_record_trigger, - .pointer = i2sbus_record_pointer, -}; - -static void i2sbus_private_free(struct snd_pcm *pcm) -{ - struct i2sbus_dev *i2sdev = snd_pcm_chip(pcm); - struct codec_info_item *p, *tmp; - - i2sdev->sound.pcm = NULL; - i2sdev->out.created = 0; - i2sdev->in.created = 0; - list_for_each_entry_safe(p, tmp, &i2sdev->sound.codec_list, list) { - printk(KERN_ERR "i2sbus: a codec didn't unregister!\n"); - list_del(&p->list); - module_put(p->codec->owner); - kfree(p); - } - soundbus_dev_put(&i2sdev->sound); - module_put(THIS_MODULE); -} - -/* FIXME: this function needs an error handling strategy with labels */ -int -i2sbus_attach_codec(struct soundbus_dev *dev, struct snd_card *card, - struct codec_info *ci, void *data) -{ - int err, in = 0, out = 0; - struct transfer_info *tmp; - struct i2sbus_dev *i2sdev = soundbus_dev_to_i2sbus_dev(dev); - struct codec_info_item *cii; - - if (!dev->pcmname || dev->pcmid == -1) { - printk(KERN_ERR "i2sbus: pcm name and id must be set!\n"); - return -EINVAL; - } - - list_for_each_entry(cii, &dev->codec_list, list) { - if (cii->codec_data == data) - return -EALREADY; - } - - if (!ci->transfers || !ci->transfers->formats - || !ci->transfers->rates || !ci->usable) - return -EINVAL; - - /* we currently code the i2s transfer on the clock, and support only - * 32 and 64 */ - if (ci->bus_factor != 32 && ci->bus_factor != 64) - return -EINVAL; - - /* If you want to fix this, you need to keep track of what transport infos - * are to be used, which codecs they belong to, and then fix all the - * sysclock/busclock stuff above to depend on which is usable */ - list_for_each_entry(cii, &dev->codec_list, list) { - if (cii->codec->sysclock_factor != ci->sysclock_factor) { - printk(KERN_DEBUG - "cannot yet handle multiple different sysclocks!\n"); - return -EINVAL; - } - if (cii->codec->bus_factor != ci->bus_factor) { - printk(KERN_DEBUG - "cannot yet handle multiple different bus clocks!\n"); - return -EINVAL; - } - } - - tmp = ci->transfers; - while (tmp->formats && tmp->rates) { - if (tmp->transfer_in) - in = 1; - else - out = 1; - tmp++; - } - - cii = kzalloc(sizeof(struct codec_info_item), GFP_KERNEL); - if (!cii) { - printk(KERN_DEBUG "i2sbus: failed to allocate cii\n"); - return -ENOMEM; - } - - /* use the private data to point to the codec info */ - cii->sdev = soundbus_dev_get(dev); - cii->codec = ci; - cii->codec_data = data; - - if (!cii->sdev) { - printk(KERN_DEBUG - "i2sbus: failed to get soundbus dev reference\n"); - kfree(cii); - return -ENODEV; - } - - if (!try_module_get(THIS_MODULE)) { - printk(KERN_DEBUG "i2sbus: failed to get module reference!\n"); - soundbus_dev_put(dev); - kfree(cii); - return -EBUSY; - } - - if (!try_module_get(ci->owner)) { - printk(KERN_DEBUG - "i2sbus: failed to get module reference to codec owner!\n"); - module_put(THIS_MODULE); - soundbus_dev_put(dev); - kfree(cii); - return -EBUSY; - } - - if (!dev->pcm) { - err = snd_pcm_new(card, - dev->pcmname, - dev->pcmid, - 0, - 0, - &dev->pcm); - if (err) { - printk(KERN_DEBUG "i2sbus: failed to create pcm\n"); - kfree(cii); - module_put(ci->owner); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return err; - } - } - - /* ALSA yet again sucks. - * If it is ever fixed, remove this line. See below. */ - out = in = 1; - - if (!i2sdev->out.created && out) { - if (dev->pcm->card != card) { - /* eh? */ - printk(KERN_ERR - "Can't attach same bus to different cards!\n"); - module_put(ci->owner); - kfree(cii); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return -EINVAL; - } - if ((err = - snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, 1))) { - module_put(ci->owner); - kfree(cii); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return err; - } - snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_PLAYBACK, - &i2sbus_playback_ops); - i2sdev->out.created = 1; - } - - if (!i2sdev->in.created && in) { - if (dev->pcm->card != card) { - printk(KERN_ERR - "Can't attach same bus to different cards!\n"); - module_put(ci->owner); - kfree(cii); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return -EINVAL; - } - if ((err = - snd_pcm_new_stream(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, 1))) { - module_put(ci->owner); - kfree(cii); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return err; - } - snd_pcm_set_ops(dev->pcm, SNDRV_PCM_STREAM_CAPTURE, - &i2sbus_record_ops); - i2sdev->in.created = 1; - } - - /* so we have to register the pcm after adding any substream - * to it because alsa doesn't create the devices for the - * substreams when we add them later. - * Therefore, force in and out on both busses (above) and - * register the pcm now instead of just after creating it. - */ - err = snd_device_register(card, dev->pcm); - if (err) { - printk(KERN_ERR "i2sbus: error registering new pcm\n"); - module_put(ci->owner); - kfree(cii); - soundbus_dev_put(dev); - module_put(THIS_MODULE); - return err; - } - /* no errors any more, so let's add this to our list */ - list_add(&cii->list, &dev->codec_list); - - dev->pcm->private_data = i2sdev; - dev->pcm->private_free = i2sbus_private_free; - - /* well, we really should support scatter/gather DMA */ - snd_pcm_lib_preallocate_pages_for_all( - dev->pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(macio_get_pci_dev(i2sdev->macio)), - 64 * 1024, 64 * 1024); - - return 0; -} - -void i2sbus_detach_codec(struct soundbus_dev *dev, void *data) -{ - struct codec_info_item *cii = NULL, *i; - - list_for_each_entry(i, &dev->codec_list, list) { - if (i->codec_data == data) { - cii = i; - break; - } - } - if (cii) { - list_del(&cii->list); - module_put(cii->codec->owner); - kfree(cii); - } - /* no more codecs, but still a pcm? */ - if (list_empty(&dev->codec_list) && dev->pcm) { - /* the actual cleanup is done by the callback above! */ - snd_device_free(dev->pcm->card, dev->pcm); - } -} diff --git a/sound/aoa/soundbus/i2sbus/i2sbus.h b/sound/aoa/soundbus/i2sbus/i2sbus.h deleted file mode 100644 index 0c69d209b..000000000 --- a/sound/aoa/soundbus/i2sbus/i2sbus.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * i2sbus driver -- private definitions - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#ifndef __I2SBUS_H -#define __I2SBUS_H -#include -#include -#include - -#include - -#include -#include -#include - -#include "i2sbus-interface.h" -#include "../soundbus.h" - -struct i2sbus_control { - struct list_head list; - struct macio_chip *macio; -}; - -#define MAX_DBDMA_COMMANDS 32 - -struct dbdma_command_mem { - dma_addr_t bus_addr; - dma_addr_t bus_cmd_start; - struct dbdma_cmd *cmds; - void *space; - int size; - u32 running:1; -}; - -struct pcm_info { - u32 created:1, /* has this direction been created with alsa? */ - active:1; /* is this stream active? */ - /* runtime information */ - struct snd_pcm_substream *substream; - int current_period; - u32 frame_count; - struct dbdma_command_mem dbdma_ring; - volatile struct dbdma_regs __iomem *dbdma; -}; - -enum { - aoa_resource_i2smmio = 0, - aoa_resource_txdbdma, - aoa_resource_rxdbdma, -}; - -struct i2sbus_dev { - struct soundbus_dev sound; - struct macio_dev *macio; - struct i2sbus_control *control; - volatile struct i2s_interface_regs __iomem *intfregs; - - struct resource resources[3]; - struct resource *allocated_resource[3]; - int interrupts[3]; - char rnames[3][32]; - - /* info about currently active substreams */ - struct pcm_info out, in; - snd_pcm_format_t format; - unsigned int rate; - - /* list for a single controller */ - struct list_head item; - /* number of bus on controller */ - int bus_number; - /* for use by control layer */ - struct pmf_function *enable, - *cell_enable, - *cell_disable, - *clock_enable, - *clock_disable; - - /* locks */ - /* spinlock for low-level interrupt locking */ - spinlock_t low_lock; - /* mutex for high-level consistency */ - struct mutex lock; -}; - -#define soundbus_dev_to_i2sbus_dev(sdev) \ - container_of(sdev, struct i2sbus_dev, sound) - -/* pcm specific functions */ -extern int -i2sbus_attach_codec(struct soundbus_dev *dev, struct snd_card *card, - struct codec_info *ci, void *data); -extern void -i2sbus_detach_codec(struct soundbus_dev *dev, void *data); -extern irqreturn_t -i2sbus_tx_intr(int irq, void *devid, struct pt_regs *regs); -extern irqreturn_t -i2sbus_rx_intr(int irq, void *devid, struct pt_regs *regs); - -/* control specific functions */ -extern int i2sbus_control_init(struct macio_dev* dev, - struct i2sbus_control **c); -extern void i2sbus_control_destroy(struct i2sbus_control *c); -extern int i2sbus_control_add_dev(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev); -extern void i2sbus_control_remove_dev(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev); -extern int i2sbus_control_enable(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev); -extern int i2sbus_control_cell(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev, - int enable); -extern int i2sbus_control_clock(struct i2sbus_control *c, - struct i2sbus_dev *i2sdev, - int enable); -#endif /* __I2SBUS_H */ diff --git a/sound/aoa/soundbus/soundbus.h b/sound/aoa/soundbus/soundbus.h deleted file mode 100644 index 5c2729783..000000000 --- a/sound/aoa/soundbus/soundbus.h +++ /dev/null @@ -1,202 +0,0 @@ -/* - * soundbus generic definitions - * - * Copyright 2006 Johannes Berg - * - * GPL v2, can be found in COPYING. - */ -#ifndef __SOUNDBUS_H -#define __SOUNDBUS_H - -#include -#include -#include - - -/* When switching from master to slave or the other way around, - * you don't want to have the codec chip acting as clock source - * while the bus still is. - * More importantly, while switch from slave to master, you need - * to turn off the chip's master function first, but then there's - * no clock for a while and other chips might reset, so we notify - * their drivers after having switched. - * The constants here are codec-point of view, so when we switch - * the soundbus to master we tell the codec we're going to switch - * and give it CLOCK_SWITCH_PREPARE_SLAVE! - */ -enum clock_switch { - CLOCK_SWITCH_PREPARE_SLAVE, - CLOCK_SWITCH_PREPARE_MASTER, - CLOCK_SWITCH_SLAVE, - CLOCK_SWITCH_MASTER, - CLOCK_SWITCH_NOTIFY, -}; - -/* information on a transfer the codec can take */ -struct transfer_info { - u64 formats; /* SNDRV_PCM_FMTBIT_* */ - unsigned int rates; /* SNDRV_PCM_RATE_* */ - /* flags */ - u32 transfer_in:1, /* input = 1, output = 0 */ - must_be_clock_source:1; - /* for codecs to distinguish among their TIs */ - int tag; -}; - -struct codec_info_item { - struct codec_info *codec; - void *codec_data; - struct soundbus_dev *sdev; - /* internal, to be used by the soundbus provider */ - struct list_head list; -}; - -/* for prepare, where the codecs need to know - * what we're going to drive the bus with */ -struct bus_info { - /* see below */ - int sysclock_factor; - int bus_factor; -}; - -/* information on the codec itself, plus function pointers */ -struct codec_info { - /* the module this lives in */ - struct module *owner; - - /* supported transfer possibilities, array terminated by - * formats or rates being 0. */ - struct transfer_info *transfers; - - /* Master clock speed factor - * to be used (master clock speed = sysclock_factor * sampling freq) - * Unused if the soundbus provider has no such notion. - */ - int sysclock_factor; - - /* Bus factor, bus clock speed = bus_factor * sampling freq) - * Unused if the soundbus provider has no such notion. - */ - int bus_factor; - - /* operations */ - /* clock switching, see above */ - int (*switch_clock)(struct codec_info_item *cii, - enum clock_switch clock); - - /* called for each transfer_info when the user - * opens the pcm device to determine what the - * hardware can support at this point in time. - * That can depend on other user-switchable controls. - * Return 1 if usable, 0 if not. - * out points to another instance of a transfer_info - * which is initialised to the values in *ti, and - * it's format and rate values can be modified by - * the callback if it is necessary to further restrict - * the formats that can be used at the moment, for - * example when one codec has multiple logical codec - * info structs for multiple inputs. - */ - int (*usable)(struct codec_info_item *cii, - struct transfer_info *ti, - struct transfer_info *out); - - /* called when pcm stream is opened, probably not implemented - * most of the time since it isn't too useful */ - int (*open)(struct codec_info_item *cii, - struct snd_pcm_substream *substream); - - /* called when the pcm stream is closed, at this point - * the user choices can all be unlocked (see below) */ - int (*close)(struct codec_info_item *cii, - struct snd_pcm_substream *substream); - - /* if the codec must forbid some user choices because - * they are not valid with the substream/transfer info, - * it must do so here. Example: no digital output for - * incompatible framerate, say 8KHz, on Onyx. - * If the selected stuff in the substream is NOT - * compatible, you have to reject this call! */ - int (*prepare)(struct codec_info_item *cii, - struct bus_info *bi, - struct snd_pcm_substream *substream); - - /* start() is called before data is pushed to the codec. - * Note that start() must be atomic! */ - int (*start)(struct codec_info_item *cii, - struct snd_pcm_substream *substream); - - /* stop() is called after data is no longer pushed to the codec. - * Note that stop() must be atomic! */ - int (*stop)(struct codec_info_item *cii, - struct snd_pcm_substream *substream); - - int (*suspend)(struct codec_info_item *cii, pm_message_t state); - int (*resume)(struct codec_info_item *cii); -}; - -/* information on a soundbus device */ -struct soundbus_dev { - /* the bus it belongs to */ - struct list_head onbuslist; - - /* the of device it represents */ - struct of_device ofdev; - - /* what modules go by */ - char modalias[32]; - - /* These fields must be before attach_codec can be called. - * They should be set by the owner of the alsa card object - * that is needed, and whoever sets them must make sure - * that they are unique within that alsa card object. */ - char *pcmname; - int pcmid; - - /* this is assigned by the soundbus provider in attach_codec */ - struct snd_pcm *pcm; - - /* operations */ - /* attach a codec to this soundbus, give the alsa - * card object the PCMs for this soundbus should be in. - * The 'data' pointer must be unique, it is used as the - * key for detach_codec(). */ - int (*attach_codec)(struct soundbus_dev *dev, struct snd_card *card, - struct codec_info *ci, void *data); - void (*detach_codec)(struct soundbus_dev *dev, void *data); - /* TODO: suspend/resume */ - - /* private for the soundbus provider */ - struct list_head codec_list; - u32 have_out:1, have_in:1; -}; -#define to_soundbus_device(d) container_of(d, struct soundbus_dev, ofdev.dev) -#define of_to_soundbus_device(d) container_of(d, struct soundbus_dev, ofdev) - -extern int soundbus_add_one(struct soundbus_dev *dev); -extern void soundbus_remove_one(struct soundbus_dev *dev); - -extern struct soundbus_dev *soundbus_dev_get(struct soundbus_dev *dev); -extern void soundbus_dev_put(struct soundbus_dev *dev); - -struct soundbus_driver { - char *name; - struct module *owner; - - /* we don't implement any matching at all */ - - int (*probe)(struct soundbus_dev* dev); - int (*remove)(struct soundbus_dev* dev); - - int (*suspend)(struct soundbus_dev* dev, pm_message_t state); - int (*resume)(struct soundbus_dev* dev); - int (*shutdown)(struct soundbus_dev* dev); - - struct device_driver driver; -}; -#define to_soundbus_driver(drv) container_of(drv,struct soundbus_driver, driver) - -extern int soundbus_register_driver(struct soundbus_driver *drv); -extern void soundbus_unregister_driver(struct soundbus_driver *drv); - -#endif /* __SOUNDBUS_H */ diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c deleted file mode 100644 index f580942b5..000000000 --- a/sound/aoa/soundbus/sysfs.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include -/* FIX UP */ -#include "soundbus.h" - -#define soundbus_config_of_attr(field, format_string) \ -static ssize_t \ -field##_show (struct device *dev, struct device_attribute *attr, \ - char *buf) \ -{ \ - struct soundbus_dev *mdev = to_soundbus_device (dev); \ - return sprintf (buf, format_string, mdev->ofdev.node->field); \ -} - -static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct soundbus_dev *sdev = to_soundbus_device(dev); - struct of_device *of = &sdev->ofdev; - int length; - - if (*sdev->modalias) { - strlcpy(buf, sdev->modalias, sizeof(sdev->modalias) + 1); - strcat(buf, "\n"); - length = strlen(buf); - } else { - length = sprintf(buf, "of:N%sT%s\n", - of->node->name, of->node->type); - } - - return length; -} - -soundbus_config_of_attr (name, "%s\n"); -soundbus_config_of_attr (type, "%s\n"); - -struct device_attribute soundbus_dev_attrs[] = { - __ATTR_RO(name), - __ATTR_RO(type), - __ATTR_RO(modalias), - __ATTR_NULL -}; diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 8435fdd1c..5f22d70fe 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -360,7 +360,7 @@ static int aaci_pcm_open(struct aaci *aaci, struct snd_pcm_substream *substream, if (ret) goto out; - ret = request_irq(aaci->dev->irq[0], aaci_irq, IRQF_SHARED|IRQF_DISABLED, + ret = request_irq(aaci->dev->irq[0], aaci_irq, SA_SHIRQ|SA_INTERRUPT, DRIVER_NAME, aaci); if (ret) goto out; @@ -779,9 +779,8 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev) strlcpy(card->driver, DRIVER_NAME, sizeof(card->driver)); strlcpy(card->shortname, "ARM AC'97 Interface", sizeof(card->shortname)); snprintf(card->longname, sizeof(card->longname), - "%s at 0x%016llx, irq %d", - card->shortname, (unsigned long long)dev->res.start, - dev->irq[0]); + "%s at 0x%08lx, irq %d", + card->shortname, dev->res.start, dev->irq[0]); aaci = card->private_data; mutex_init(&aaci->ac97_sem); diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c index c79a9afd0..13057d92f 100644 --- a/sound/arm/sa11xx-uda1341.c +++ b/sound/arm/sa11xx-uda1341.c @@ -59,6 +59,7 @@ * ***************************************************************************************************/ +#include #include #include #include @@ -111,7 +112,7 @@ MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SA1100/SA1111 + UDA1341TS driver for ALSA"); MODULE_SUPPORTED_DEVICE("{{UDA1341,iPAQ H3600 UDA1341TS}}"); -static char *id; /* ID for this card */ +static char *id = NULL; /* ID for this card */ module_param(id, charp, 0444); MODULE_PARM_DESC(id, "ID string for SA1100/SA1111 + UDA1341TS soundcard."); @@ -983,15 +984,11 @@ static int __init sa11xx_uda1341_init(void) if ((err = platform_driver_register(&sa11xx_uda1341_driver)) < 0) return err; device = platform_device_register_simple(SA11XX_UDA1341_DRIVER, -1, NULL, 0); - if (!IS_ERR(device)) { - if (platform_get_drvdata(device)) - return 0; - platform_device_unregister(device); - err = -ENODEV - } else - err = PTR_ERR(device); - platform_driver_unregister(&sa11xx_uda1341_driver); - return err; + if (IS_ERR(device)) { + platform_driver_unregister(&sa11xx_uda1341_driver); + return PTR_ERR(device); + } + return 0; } static void __exit sa11xx_uda1341_exit(void) diff --git a/sound/core/Kconfig b/sound/core/Kconfig index b2927523d..4262a1c87 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig @@ -122,8 +122,8 @@ config SND_SEQ_RTCTIMER_DEFAULT If in doubt, say Y. config SND_DYNAMIC_MINORS - bool "Dynamic device file minor numbers" - depends on SND + bool "Dynamic device file minor numbers (EXPERIMENTAL)" + depends on SND && EXPERIMENTAL help If you say Y here, the minor numbers of ALSA device files in /dev/snd/ are allocated dynamically. This allows you to have diff --git a/sound/core/control.c b/sound/core/control.c index ac890d9c7..22565c9b9 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -176,8 +176,6 @@ void snd_ctl_notify(struct snd_card *card, unsigned int mask, read_unlock(&card->ctl_files_rwlock); } -EXPORT_SYMBOL(snd_ctl_notify); - /** * snd_ctl_new - create a control instance from the template * @control: the control template @@ -206,8 +204,6 @@ struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int acce return kctl; } -EXPORT_SYMBOL(snd_ctl_new); - /** * snd_ctl_new1 - create a control instance from the template * @ncontrol: the initialization record @@ -246,8 +242,6 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, return snd_ctl_new(&kctl, access); } -EXPORT_SYMBOL(snd_ctl_new1); - /** * snd_ctl_free_one - release the control instance * @kcontrol: the control instance @@ -265,8 +259,6 @@ void snd_ctl_free_one(struct snd_kcontrol *kcontrol) } } -EXPORT_SYMBOL(snd_ctl_free_one); - static unsigned int snd_ctl_hole_check(struct snd_card *card, unsigned int count) { @@ -355,8 +347,6 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol) return err; } -EXPORT_SYMBOL(snd_ctl_add); - /** * snd_ctl_remove - remove the control from the card and release it * @card: the card instance @@ -383,8 +373,6 @@ int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol) return 0; } -EXPORT_SYMBOL(snd_ctl_remove); - /** * snd_ctl_remove_id - remove the control of the given id and release it * @card: the card instance @@ -411,8 +399,6 @@ int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id) return ret; } -EXPORT_SYMBOL(snd_ctl_remove_id); - /** * snd_ctl_remove_unlocked_id - remove the unlocked control of the given id and release it * @file: active control handle @@ -475,8 +461,6 @@ int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id, return 0; } -EXPORT_SYMBOL(snd_ctl_rename_id); - /** * snd_ctl_find_numid - find the control instance with the given number-id * @card: the card instance @@ -503,8 +487,6 @@ struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numi return NULL; } -EXPORT_SYMBOL(snd_ctl_find_numid); - /** * snd_ctl_find_id - find the control instance with the given id * @card: the card instance @@ -545,8 +527,6 @@ struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card, return NULL; } -EXPORT_SYMBOL(snd_ctl_find_id); - static int snd_ctl_card_info(struct snd_card *card, struct snd_ctl_file * ctl, unsigned int cmd, void __user *arg) { @@ -724,8 +704,6 @@ int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control) return result; } -EXPORT_SYMBOL(snd_ctl_elem_read); - static int snd_ctl_elem_read_user(struct snd_card *card, struct snd_ctl_elem_value __user *_control) { @@ -789,8 +767,6 @@ int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, return result; } -EXPORT_SYMBOL(snd_ctl_elem_write); - static int snd_ctl_elem_write_user(struct snd_ctl_file *file, struct snd_ctl_elem_value __user *_control) { @@ -997,7 +973,6 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file, if (ue == NULL) return -ENOMEM; ue->info = *info; - ue->info.access = 0; ue->elem_data = (char *)ue + sizeof(*ue); ue->elem_data_size = private_size; kctl.private_free = snd_ctl_elem_user_free; @@ -1224,15 +1199,11 @@ int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn) return _snd_ctl_register_ioctl(fcn, &snd_control_ioctls); } -EXPORT_SYMBOL(snd_ctl_register_ioctl); - #ifdef CONFIG_COMPAT int snd_ctl_register_ioctl_compat(snd_kctl_ioctl_func_t fcn) { return _snd_ctl_register_ioctl(fcn, &snd_control_compat_ioctls); } - -EXPORT_SYMBOL(snd_ctl_register_ioctl_compat); #endif /* @@ -1265,15 +1236,12 @@ int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn) return _snd_ctl_unregister_ioctl(fcn, &snd_control_ioctls); } -EXPORT_SYMBOL(snd_ctl_unregister_ioctl); - #ifdef CONFIG_COMPAT int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn) { return _snd_ctl_unregister_ioctl(fcn, &snd_control_compat_ioctls); } -EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat); #endif static int snd_ctl_fasync(int fd, struct file * file, int on) diff --git a/sound/core/device.c b/sound/core/device.c index 6ce4da4a1..b1cf6ec56 100644 --- a/sound/core/device.c +++ b/sound/core/device.c @@ -63,8 +63,6 @@ int snd_device_new(struct snd_card *card, snd_device_type_t type, return 0; } -EXPORT_SYMBOL(snd_device_new); - /** * snd_device_free - release the device from the card * @card: the card instance @@ -109,8 +107,6 @@ int snd_device_free(struct snd_card *card, void *device_data) return -ENXIO; } -EXPORT_SYMBOL(snd_device_free); - /** * snd_device_disconnect - disconnect the device * @card: the card instance @@ -186,8 +182,6 @@ int snd_device_register(struct snd_card *card, void *device_data) return -ENXIO; } -EXPORT_SYMBOL(snd_device_register); - /* * register all the devices on the card. * called from init.c diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c index a562f96f3..2524e66ec 100644 --- a/sound/core/hwdep.c +++ b/sound/core/hwdep.c @@ -158,7 +158,6 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) { int err = -ENXIO; struct snd_hwdep *hw = file->private_data; - struct module *mod = hw->card->module; mutex_lock(&hw->open_mutex); if (hw->ops.release) { err = hw->ops.release(hw, file); @@ -168,7 +167,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) hw->used--; snd_card_file_remove(hw->card, file); mutex_unlock(&hw->open_mutex); - module_put(mod); + module_put(hw->card->module); return err; } @@ -487,6 +486,7 @@ static void __init snd_hwdep_proc_init(void) struct snd_info_entry *entry; if ((entry = snd_info_create_module_entry(THIS_MODULE, "hwdep", NULL)) != NULL) { + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_hwdep_proc_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/info.c b/sound/core/info.c index 57821ceb1..2582b74d3 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include @@ -80,24 +82,6 @@ static int snd_info_version_init(void); static int snd_info_version_done(void); -/* resize the proc r/w buffer */ -static int resize_info_buffer(struct snd_info_buffer *buffer, - unsigned int nsize) -{ - char *nbuf; - - nsize = PAGE_ALIGN(nsize); - nbuf = kmalloc(nsize, GFP_KERNEL); - if (! nbuf) - return -ENOMEM; - - memcpy(nbuf, buffer->buffer, buffer->len); - kfree(buffer->buffer); - buffer->buffer = nbuf; - buffer->len = nsize; - return 0; -} - /** * snd_iprintf - printf on the procfs buffer * @buffer: the procfs buffer @@ -111,46 +95,30 @@ int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...) { va_list args; int len, res; - int err = 0; - might_sleep(); if (buffer->stop || buffer->error) return 0; len = buffer->len - buffer->size; va_start(args, fmt); - for (;;) { - va_list ap; - va_copy(ap, args); - res = vsnprintf(buffer->buffer + buffer->curr, len, fmt, ap); - va_end(ap); - if (res < len) - break; - err = resize_info_buffer(buffer, buffer->len + PAGE_SIZE); - if (err < 0) - break; - len = buffer->len - buffer->size; - } + res = vsnprintf(buffer->curr, len, fmt, args); va_end(args); - - if (err < 0) - return err; + if (res >= len) { + buffer->stop = 1; + return 0; + } buffer->curr += res; buffer->size += res; return res; } -EXPORT_SYMBOL(snd_iprintf); - /* */ -static struct proc_dir_entry *snd_proc_root; -struct snd_info_entry *snd_seq_root; -EXPORT_SYMBOL(snd_seq_root); - +static struct proc_dir_entry *snd_proc_root = NULL; +struct snd_info_entry *snd_seq_root = NULL; #ifdef CONFIG_SND_OSSEMUL -struct snd_info_entry *snd_oss_root; +struct snd_info_entry *snd_oss_root = NULL; #endif static inline void snd_info_entry_prepare(struct proc_dir_entry *de) @@ -253,7 +221,7 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer struct snd_info_private_data *data; struct snd_info_entry *entry; struct snd_info_buffer *buf; - ssize_t size = 0; + size_t size = 0; loff_t pos; data = file->private_data; @@ -269,20 +237,14 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer buf = data->wbuffer; if (buf == NULL) return -EIO; - mutex_lock(&entry->access); - if (pos + count >= buf->len) { - if (resize_info_buffer(buf, pos + count)) { - mutex_unlock(&entry->access); - return -ENOMEM; - } - } - if (copy_from_user(buf->buffer + pos, buffer, count)) { - mutex_unlock(&entry->access); + if (pos >= buf->len) + return -ENOMEM; + size = buf->len - pos; + size = min(count, size); + if (copy_from_user(buf->buffer + pos, buffer, size)) return -EFAULT; - } - buf->size = pos + count; - mutex_unlock(&entry->access); - size = count; + if ((long)buf->size < pos + size) + buf->size = pos + size; break; case SNDRV_INFO_CONTENT_DATA: if (entry->c.ops->write) @@ -317,14 +279,18 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) } mode = file->f_flags & O_ACCMODE; if (mode == O_RDONLY || mode == O_RDWR) { - if ((entry->content == SNDRV_INFO_CONTENT_DATA && + if ((entry->content == SNDRV_INFO_CONTENT_TEXT && + !entry->c.text.read_size) || + (entry->content == SNDRV_INFO_CONTENT_DATA && entry->c.ops->read == NULL)) { err = -ENODEV; goto __error; } } if (mode == O_WRONLY || mode == O_RDWR) { - if ((entry->content == SNDRV_INFO_CONTENT_DATA && + if ((entry->content == SNDRV_INFO_CONTENT_TEXT && + !entry->c.text.write_size) || + (entry->content == SNDRV_INFO_CONTENT_DATA && entry->c.ops->write == NULL)) { err = -ENODEV; goto __error; @@ -340,23 +306,49 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) case SNDRV_INFO_CONTENT_TEXT: if (mode == O_RDONLY || mode == O_RDWR) { buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); - if (buffer == NULL) - goto __nomem; + if (buffer == NULL) { + kfree(data); + err = -ENOMEM; + goto __error; + } + buffer->len = (entry->c.text.read_size + + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); + buffer->buffer = vmalloc(buffer->len); + if (buffer->buffer == NULL) { + kfree(buffer); + kfree(data); + err = -ENOMEM; + goto __error; + } + buffer->curr = buffer->buffer; data->rbuffer = buffer; - buffer->len = PAGE_SIZE; - buffer->buffer = kmalloc(buffer->len, GFP_KERNEL); - if (buffer->buffer == NULL) - goto __nomem; } if (mode == O_WRONLY || mode == O_RDWR) { buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); - if (buffer == NULL) - goto __nomem; + if (buffer == NULL) { + if (mode == O_RDWR) { + vfree(data->rbuffer->buffer); + kfree(data->rbuffer); + } + kfree(data); + err = -ENOMEM; + goto __error; + } + buffer->len = (entry->c.text.write_size + + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); + buffer->buffer = vmalloc(buffer->len); + if (buffer->buffer == NULL) { + if (mode == O_RDWR) { + vfree(data->rbuffer->buffer); + kfree(data->rbuffer); + } + kfree(buffer); + kfree(data); + err = -ENOMEM; + goto __error; + } + buffer->curr = buffer->buffer; data->wbuffer = buffer; - buffer->len = PAGE_SIZE; - buffer->buffer = kmalloc(buffer->len, GFP_KERNEL); - if (buffer->buffer == NULL) - goto __nomem; } break; case SNDRV_INFO_CONTENT_DATA: /* data */ @@ -381,17 +373,6 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) } return 0; - __nomem: - if (data->rbuffer) { - kfree(data->rbuffer->buffer); - kfree(data->rbuffer); - } - if (data->wbuffer) { - kfree(data->wbuffer->buffer); - kfree(data->wbuffer); - } - kfree(data); - err = -ENOMEM; __error: module_put(entry->module); __error1: @@ -410,11 +391,11 @@ static int snd_info_entry_release(struct inode *inode, struct file *file) entry = data->entry; switch (entry->content) { case SNDRV_INFO_CONTENT_TEXT: - if (data->rbuffer) { - kfree(data->rbuffer->buffer); + if (mode == O_RDONLY || mode == O_RDWR) { + vfree(data->rbuffer->buffer); kfree(data->rbuffer); } - if (data->wbuffer) { + if (mode == O_WRONLY || mode == O_RDWR) { if (entry->c.text.write) { entry->c.text.write(entry, data->wbuffer); if (data->wbuffer->error) { @@ -423,7 +404,7 @@ static int snd_info_entry_release(struct inode *inode, struct file *file) data->wbuffer->error); } } - kfree(data->wbuffer->buffer); + vfree(data->wbuffer->buffer); kfree(data->wbuffer); } break; @@ -683,29 +664,29 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) if (len <= 0 || buffer->stop || buffer->error) return 1; while (--len > 0) { - c = buffer->buffer[buffer->curr++]; + c = *buffer->curr++; if (c == '\n') { - if (buffer->curr >= buffer->size) + if ((buffer->curr - buffer->buffer) >= (long)buffer->size) { buffer->stop = 1; + } break; } *line++ = c; - if (buffer->curr >= buffer->size) { + if ((buffer->curr - buffer->buffer) >= (long)buffer->size) { buffer->stop = 1; break; } } while (c != '\n' && !buffer->stop) { - c = buffer->buffer[buffer->curr++]; - if (buffer->curr >= buffer->size) + c = *buffer->curr++; + if ((buffer->curr - buffer->buffer) >= (long)buffer->size) { buffer->stop = 1; + } } *line = '\0'; return 0; } -EXPORT_SYMBOL(snd_info_get_line); - /** * snd_info_get_str - parse a string token * @dest: the buffer to store the string token @@ -742,8 +723,6 @@ char *snd_info_get_str(char *dest, char *src, int len) return src; } -EXPORT_SYMBOL(snd_info_get_str); - /** * snd_info_create_entry - create an info entry * @name: the proc file name @@ -795,8 +774,6 @@ struct snd_info_entry *snd_info_create_module_entry(struct module * module, return entry; } -EXPORT_SYMBOL(snd_info_create_module_entry); - /** * snd_info_create_card_entry - create an info entry for the given card * @card: the card instance @@ -820,8 +797,6 @@ struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, return entry; } -EXPORT_SYMBOL(snd_info_create_card_entry); - static int snd_info_dev_free_entry(struct snd_device *device) { struct snd_info_entry *entry = device->device_data; @@ -892,8 +867,6 @@ int snd_card_proc_new(struct snd_card *card, const char *name, return 0; } -EXPORT_SYMBOL(snd_card_proc_new); - /** * snd_info_free_entry - release the info entry * @entry: the info entry @@ -910,8 +883,6 @@ void snd_info_free_entry(struct snd_info_entry * entry) kfree(entry); } -EXPORT_SYMBOL(snd_info_free_entry); - /** * snd_info_register - register the info entry * @entry: the info entry @@ -942,8 +913,6 @@ int snd_info_register(struct snd_info_entry * entry) return 0; } -EXPORT_SYMBOL(snd_info_register); - /** * snd_info_unregister - de-register the info entry * @entry: the info entry @@ -968,13 +937,11 @@ int snd_info_unregister(struct snd_info_entry * entry) return 0; } -EXPORT_SYMBOL(snd_info_unregister); - /* */ -static struct snd_info_entry *snd_info_version_entry; +static struct snd_info_entry *snd_info_version_entry = NULL; static void snd_info_version_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -991,6 +958,7 @@ static int __init snd_info_version_init(void) entry = snd_info_create_module_entry(THIS_MODULE, "version", NULL); if (entry == NULL) return -ENOMEM; + entry->c.text.read_size = 256; entry->c.text.read = snd_info_version_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index bb2c40d0a..f9ce854b3 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -64,8 +64,6 @@ int snd_oss_info_register(int dev, int num, char *string) return 0; } -EXPORT_SYMBOL(snd_oss_info_register); - extern void snd_card_info_read_oss(struct snd_info_buffer *buffer); static int snd_sndstat_show_strings(struct snd_info_buffer *buf, char *id, int dev) @@ -119,6 +117,7 @@ int snd_info_minor_register(void) memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings)); if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", snd_oss_root)) != NULL) { + entry->c.text.read_size = 2048; entry->c.text.read = snd_sndstat_proc_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/init.c b/sound/core/init.c index 4d9258884..39ed2e5bb 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -38,15 +38,12 @@ struct snd_shutdown_f_ops { struct snd_shutdown_f_ops *next; }; -static unsigned int snd_cards_lock; /* locked for registering/using */ -struct snd_card *snd_cards[SNDRV_CARDS]; -EXPORT_SYMBOL(snd_cards); - -static DEFINE_MUTEX(snd_card_mutex); +unsigned int snd_cards_lock = 0; /* locked for registering/using */ +struct snd_card *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL}; +DEFINE_RWLOCK(snd_card_rwlock); #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag); -EXPORT_SYMBOL(snd_mixer_oss_notify_callback); #endif #ifdef CONFIG_PROC_FS @@ -69,6 +66,7 @@ static inline int init_info_for_card(struct snd_card *card) snd_printd("unable to create card entry\n"); return err; } + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_card_id_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -112,7 +110,7 @@ struct snd_card *snd_card_new(int idx, const char *xid, strlcpy(card->id, xid, sizeof(card->id)); } err = 0; - mutex_lock(&snd_card_mutex); + write_lock(&snd_card_rwlock); if (idx < 0) { int idx2; for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++) @@ -130,12 +128,12 @@ struct snd_card *snd_card_new(int idx, const char *xid, else err = -ENODEV; if (idx < 0 || err < 0) { - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); snd_printk(KERN_ERR "cannot find the slot for index %d (range 0-%i)\n", idx, snd_ecards_limit - 1); goto __error; } snd_cards_lock |= 1 << idx; /* lock it */ - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); card->number = idx; card->module = module; INIT_LIST_HEAD(&card->devices); @@ -171,19 +169,6 @@ struct snd_card *snd_card_new(int idx, const char *xid, return NULL; } -EXPORT_SYMBOL(snd_card_new); - -/* return non-zero if a card is already locked */ -int snd_card_locked(int card) -{ - int locked; - - mutex_lock(&snd_card_mutex); - locked = snd_cards_lock & (1 << card); - mutex_unlock(&snd_card_mutex); - return locked; -} - static loff_t snd_disconnect_llseek(struct file *file, loff_t offset, int orig) { return -ENODEV; @@ -251,9 +236,9 @@ int snd_card_disconnect(struct snd_card *card) spin_unlock(&card->files_lock); /* phase 1: disable fops (user space) operations for ALSA API */ - mutex_lock(&snd_card_mutex); + write_lock(&snd_card_rwlock); snd_cards[card->number] = NULL; - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); /* phase 2: replace file->f_op with special dummy operations */ @@ -313,8 +298,6 @@ int snd_card_disconnect(struct snd_card *card) return 0; } -EXPORT_SYMBOL(snd_card_disconnect); - /** * snd_card_free - frees given soundcard structure * @card: soundcard structure @@ -332,9 +315,9 @@ int snd_card_free(struct snd_card *card) if (card == NULL) return -EINVAL; - mutex_lock(&snd_card_mutex); + write_lock(&snd_card_rwlock); snd_cards[card->number] = NULL; - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); #ifdef CONFIG_PM wake_up(&card->power_sleep); @@ -370,15 +353,13 @@ int snd_card_free(struct snd_card *card) card->s_f_ops = s_f_ops->next; kfree(s_f_ops); } - mutex_lock(&snd_card_mutex); + write_lock(&snd_card_rwlock); snd_cards_lock &= ~(1 << card->number); - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); kfree(card); return 0; } -EXPORT_SYMBOL(snd_card_free); - static void snd_card_free_thread(void * __card) { struct snd_card *card = __card; @@ -424,8 +405,6 @@ int snd_card_free_in_thread(struct snd_card *card) return -EFAULT; } -EXPORT_SYMBOL(snd_card_free_in_thread); - static void choose_default_id(struct snd_card *card) { int i, len, idx_flag = 0, loops = SNDRV_CARDS; @@ -508,16 +487,16 @@ int snd_card_register(struct snd_card *card) snd_assert(card != NULL, return -EINVAL); if ((err = snd_device_register_all(card)) < 0) return err; - mutex_lock(&snd_card_mutex); + write_lock(&snd_card_rwlock); if (snd_cards[card->number]) { /* already registered */ - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); return 0; } if (card->id[0] == '\0') choose_default_id(card); snd_cards[card->number] = card; - mutex_unlock(&snd_card_mutex); + write_unlock(&snd_card_rwlock); init_info_for_card(card); #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) if (snd_mixer_oss_notify_callback) @@ -526,10 +505,8 @@ int snd_card_register(struct snd_card *card) return 0; } -EXPORT_SYMBOL(snd_card_register); - #ifdef CONFIG_PROC_FS -static struct snd_info_entry *snd_card_info_entry; +static struct snd_info_entry *snd_card_info_entry = NULL; static void snd_card_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) @@ -538,7 +515,7 @@ static void snd_card_info_read(struct snd_info_entry *entry, struct snd_card *card; for (idx = count = 0; idx < SNDRV_CARDS; idx++) { - mutex_lock(&snd_card_mutex); + read_lock(&snd_card_rwlock); if ((card = snd_cards[idx]) != NULL) { count++; snd_iprintf(buffer, "%2i [%-15s]: %s - %s\n", @@ -549,7 +526,7 @@ static void snd_card_info_read(struct snd_info_entry *entry, snd_iprintf(buffer, " %s\n", card->longname); } - mutex_unlock(&snd_card_mutex); + read_unlock(&snd_card_rwlock); } if (!count) snd_iprintf(buffer, "--- no soundcards ---\n"); @@ -563,12 +540,12 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer) struct snd_card *card; for (idx = count = 0; idx < SNDRV_CARDS; idx++) { - mutex_lock(&snd_card_mutex); + read_lock(&snd_card_rwlock); if ((card = snd_cards[idx]) != NULL) { count++; snd_iprintf(buffer, "%s\n", card->longname); } - mutex_unlock(&snd_card_mutex); + read_unlock(&snd_card_rwlock); } if (!count) { snd_iprintf(buffer, "--- no soundcards ---\n"); @@ -586,11 +563,11 @@ static void snd_card_module_info_read(struct snd_info_entry *entry, struct snd_card *card; for (idx = 0; idx < SNDRV_CARDS; idx++) { - mutex_lock(&snd_card_mutex); + read_lock(&snd_card_rwlock); if ((card = snd_cards[idx]) != NULL) snd_iprintf(buffer, "%2i %s\n", idx, card->module->name); - mutex_unlock(&snd_card_mutex); + read_unlock(&snd_card_rwlock); } } #endif @@ -602,6 +579,7 @@ int __init snd_card_info_init(void) entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL); if (! entry) return -ENOMEM; + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_card_info_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -612,6 +590,7 @@ int __init snd_card_info_init(void) #ifdef MODULE entry = snd_info_create_module_entry(THIS_MODULE, "modules", NULL); if (entry) { + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_card_module_info_read; if (snd_info_register(entry) < 0) snd_info_free_entry(entry); @@ -665,8 +644,6 @@ int snd_component_add(struct snd_card *card, const char *component) return 0; } -EXPORT_SYMBOL(snd_component_add); - /** * snd_card_file_add - add the file to the file list of the card * @card: soundcard structure @@ -699,8 +676,6 @@ int snd_card_file_add(struct snd_card *card, struct file *file) return 0; } -EXPORT_SYMBOL(snd_card_file_add); - /** * snd_card_file_remove - remove the file from the file list * @card: soundcard structure @@ -742,8 +717,6 @@ int snd_card_file_remove(struct snd_card *card, struct file *file) return 0; } -EXPORT_SYMBOL(snd_card_file_remove); - #ifdef CONFIG_PM /** * snd_power_wait - wait until the power-state is changed. @@ -780,5 +753,4 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state) return result; } -EXPORT_SYMBOL(snd_power_wait); #endif /* CONFIG_PM */ diff --git a/sound/core/isadma.c b/sound/core/isadma.c index d52398727..1a378951d 100644 --- a/sound/core/isadma.c +++ b/sound/core/isadma.c @@ -56,8 +56,6 @@ void snd_dma_program(unsigned long dma, release_dma_lock(flags); } -EXPORT_SYMBOL(snd_dma_program); - /** * snd_dma_disable - stop the ISA DMA transfer * @dma: the dma number @@ -74,8 +72,6 @@ void snd_dma_disable(unsigned long dma) release_dma_lock(flags); } -EXPORT_SYMBOL(snd_dma_disable); - /** * snd_dma_pointer - return the current pointer to DMA transfer buffer in bytes * @dma: the dma number @@ -105,5 +101,3 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size) else return size - result; } - -EXPORT_SYMBOL(snd_dma_pointer); diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index bc0bd0910..3fc6f9707 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include diff --git a/sound/core/memory.c b/sound/core/memory.c index 93537ab7c..862d62d2e 100644 --- a/sound/core/memory.c +++ b/sound/core/memory.c @@ -20,7 +20,7 @@ * */ -#include +#include #include #include @@ -55,8 +55,6 @@ int copy_to_user_fromio(void __user *dst, const volatile void __iomem *src, size #endif } -EXPORT_SYMBOL(copy_to_user_fromio); - /** * copy_from_user_toio - copy data from user-space to mmio-space * @dst: the destination pointer on mmio-space @@ -87,5 +85,3 @@ int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size return 0; #endif } - -EXPORT_SYMBOL(copy_from_user_toio); diff --git a/sound/core/misc.c b/sound/core/misc.c index 03fc711f4..b53e563c0 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c @@ -34,8 +34,6 @@ void release_and_free_resource(struct resource *res) } } -EXPORT_SYMBOL(release_and_free_resource); - #ifdef CONFIG_SND_VERBOSE_PRINTK void snd_verbose_printk(const char *file, int line, const char *format, ...) { @@ -53,8 +51,6 @@ void snd_verbose_printk(const char *file, int line, const char *format, ...) vprintk(format, args); va_end(args); } - -EXPORT_SYMBOL(snd_verbose_printk); #endif #if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) @@ -75,6 +71,4 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) va_end(args); } - -EXPORT_SYMBOL(snd_verbose_printd); #endif diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 75a9505c7..9c68bc3f9 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c @@ -988,12 +988,13 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mix if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) { struct snd_ctl_elem_info *uinfo; - uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); + uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL); if (! uinfo) { up_read(&mixer->card->controls_rwsem); return -ENOMEM; } + memset(uinfo, 0, sizeof(*uinfo)); if (kctl->info(kctl, uinfo)) { up_read(&mixer->card->controls_rwsem); return 0; @@ -1181,7 +1182,9 @@ static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer) return; entry->content = SNDRV_INFO_CONTENT_TEXT; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 8192; entry->c.text.read = snd_mixer_oss_proc_read; + entry->c.text.write_size = 8192; entry->c.text.write = snd_mixer_oss_proc_write; entry->private_data = mixer; if (snd_info_register(entry) < 0) { diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 48f7ed474..0691aca51 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -45,7 +45,7 @@ #define OSS_ALSAEMULVER _SIOR ('M', 249, int) -static int dsp_map[SNDRV_CARDS]; +static int dsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; static int nonblock_open = 1; @@ -78,487 +78,6 @@ static inline void snd_leave_user(mm_segment_t fs) set_fs(fs); } -/* - * helper functions to process hw_params - */ -static int snd_interval_refine_min(struct snd_interval *i, unsigned int min, int openmin) -{ - int changed = 0; - if (i->min < min) { - i->min = min; - i->openmin = openmin; - changed = 1; - } else if (i->min == min && !i->openmin && openmin) { - i->openmin = 1; - changed = 1; - } - if (i->integer) { - if (i->openmin) { - i->min++; - i->openmin = 0; - } - } - if (snd_interval_checkempty(i)) { - snd_interval_none(i); - return -EINVAL; - } - return changed; -} - -static int snd_interval_refine_max(struct snd_interval *i, unsigned int max, int openmax) -{ - int changed = 0; - if (i->max > max) { - i->max = max; - i->openmax = openmax; - changed = 1; - } else if (i->max == max && !i->openmax && openmax) { - i->openmax = 1; - changed = 1; - } - if (i->integer) { - if (i->openmax) { - i->max--; - i->openmax = 0; - } - } - if (snd_interval_checkempty(i)) { - snd_interval_none(i); - return -EINVAL; - } - return changed; -} - -static int snd_interval_refine_set(struct snd_interval *i, unsigned int val) -{ - struct snd_interval t; - t.empty = 0; - t.min = t.max = val; - t.openmin = t.openmax = 0; - t.integer = 1; - return snd_interval_refine(i, &t); -} - -/** - * snd_pcm_hw_param_value_min - * @params: the hw_params instance - * @var: parameter to retrieve - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Return the minimum value for field PAR. - */ -static unsigned int -snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir) -{ - if (hw_is_mask(var)) { - if (dir) - *dir = 0; - return snd_mask_min(hw_param_mask_c(params, var)); - } - if (hw_is_interval(var)) { - const struct snd_interval *i = hw_param_interval_c(params, var); - if (dir) - *dir = i->openmin; - return snd_interval_min(i); - } - return -EINVAL; -} - -/** - * snd_pcm_hw_param_value_max - * @params: the hw_params instance - * @var: parameter to retrieve - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Return the maximum value for field PAR. - */ -static unsigned int -snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir) -{ - if (hw_is_mask(var)) { - if (dir) - *dir = 0; - return snd_mask_max(hw_param_mask_c(params, var)); - } - if (hw_is_interval(var)) { - const struct snd_interval *i = hw_param_interval_c(params, var); - if (dir) - *dir = - (int) i->openmax; - return snd_interval_max(i); - } - return -EINVAL; -} - -static int _snd_pcm_hw_param_mask(struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, - const struct snd_mask *val) -{ - int changed; - changed = snd_mask_refine(hw_param_mask(params, var), val); - if (changed) { - params->cmask |= 1 << var; - params->rmask |= 1 << var; - } - return changed; -} - -static int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, - const struct snd_mask *val) -{ - int changed = _snd_pcm_hw_param_mask(params, var, val); - if (changed < 0) - return changed; - if (params->rmask) { - int err = snd_pcm_hw_refine(pcm, params); - if (err < 0) - return err; - } - return 0; -} - -static int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int dir) -{ - int changed; - int open = 0; - if (dir) { - if (dir > 0) { - open = 1; - } else if (dir < 0) { - if (val > 0) { - open = 1; - val--; - } - } - } - if (hw_is_mask(var)) - changed = snd_mask_refine_min(hw_param_mask(params, var), - val + !!open); - else if (hw_is_interval(var)) - changed = snd_interval_refine_min(hw_param_interval(params, var), - val, open); - else - return -EINVAL; - if (changed) { - params->cmask |= 1 << var; - params->rmask |= 1 << var; - } - return changed; -} - -/** - * snd_pcm_hw_param_min - * @pcm: PCM instance - * @params: the hw_params instance - * @var: parameter to retrieve - * @val: minimal value - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Inside configuration space defined by PARAMS remove from PAR all - * values < VAL. Reduce configuration space accordingly. - * Return new minimum or -EINVAL if the configuration space is empty - */ -static int snd_pcm_hw_param_min(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int *dir) -{ - int changed = _snd_pcm_hw_param_min(params, var, val, dir ? *dir : 0); - if (changed < 0) - return changed; - if (params->rmask) { - int err = snd_pcm_hw_refine(pcm, params); - if (err < 0) - return err; - } - return snd_pcm_hw_param_value_min(params, var, dir); -} - -static int _snd_pcm_hw_param_max(struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int dir) -{ - int changed; - int open = 0; - if (dir) { - if (dir < 0) { - open = 1; - } else if (dir > 0) { - open = 1; - val++; - } - } - if (hw_is_mask(var)) { - if (val == 0 && open) { - snd_mask_none(hw_param_mask(params, var)); - changed = -EINVAL; - } else - changed = snd_mask_refine_max(hw_param_mask(params, var), - val - !!open); - } else if (hw_is_interval(var)) - changed = snd_interval_refine_max(hw_param_interval(params, var), - val, open); - else - return -EINVAL; - if (changed) { - params->cmask |= 1 << var; - params->rmask |= 1 << var; - } - return changed; -} - -/** - * snd_pcm_hw_param_max - * @pcm: PCM instance - * @params: the hw_params instance - * @var: parameter to retrieve - * @val: maximal value - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Inside configuration space defined by PARAMS remove from PAR all - * values >= VAL + 1. Reduce configuration space accordingly. - * Return new maximum or -EINVAL if the configuration space is empty - */ -static int snd_pcm_hw_param_max(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int *dir) -{ - int changed = _snd_pcm_hw_param_max(params, var, val, dir ? *dir : 0); - if (changed < 0) - return changed; - if (params->rmask) { - int err = snd_pcm_hw_refine(pcm, params); - if (err < 0) - return err; - } - return snd_pcm_hw_param_value_max(params, var, dir); -} - -static int boundary_sub(int a, int adir, - int b, int bdir, - int *c, int *cdir) -{ - adir = adir < 0 ? -1 : (adir > 0 ? 1 : 0); - bdir = bdir < 0 ? -1 : (bdir > 0 ? 1 : 0); - *c = a - b; - *cdir = adir - bdir; - if (*cdir == -2) { - (*c)--; - } else if (*cdir == 2) { - (*c)++; - } - return 0; -} - -static int boundary_lt(unsigned int a, int adir, - unsigned int b, int bdir) -{ - if (adir < 0) { - a--; - adir = 1; - } else if (adir > 0) - adir = 1; - if (bdir < 0) { - b--; - bdir = 1; - } else if (bdir > 0) - bdir = 1; - return a < b || (a == b && adir < bdir); -} - -/* Return 1 if min is nearer to best than max */ -static int boundary_nearer(int min, int mindir, - int best, int bestdir, - int max, int maxdir) -{ - int dmin, dmindir; - int dmax, dmaxdir; - boundary_sub(best, bestdir, min, mindir, &dmin, &dmindir); - boundary_sub(max, maxdir, best, bestdir, &dmax, &dmaxdir); - return boundary_lt(dmin, dmindir, dmax, dmaxdir); -} - -/** - * snd_pcm_hw_param_near - * @pcm: PCM instance - * @params: the hw_params instance - * @var: parameter to retrieve - * @best: value to set - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Inside configuration space defined by PARAMS set PAR to the available value - * nearest to VAL. Reduce configuration space accordingly. - * This function cannot be called for SNDRV_PCM_HW_PARAM_ACCESS, - * SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_SUBFORMAT. - * Return the value found. - */ -static int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int best, - int *dir) -{ - struct snd_pcm_hw_params *save = NULL; - int v; - unsigned int saved_min; - int last = 0; - int min, max; - int mindir, maxdir; - int valdir = dir ? *dir : 0; - /* FIXME */ - if (best > INT_MAX) - best = INT_MAX; - min = max = best; - mindir = maxdir = valdir; - if (maxdir > 0) - maxdir = 0; - else if (maxdir == 0) - maxdir = -1; - else { - maxdir = 1; - max--; - } - save = kmalloc(sizeof(*save), GFP_KERNEL); - if (save == NULL) - return -ENOMEM; - *save = *params; - saved_min = min; - min = snd_pcm_hw_param_min(pcm, params, var, min, &mindir); - if (min >= 0) { - struct snd_pcm_hw_params *params1; - if (max < 0) - goto _end; - if ((unsigned int)min == saved_min && mindir == valdir) - goto _end; - params1 = kmalloc(sizeof(*params1), GFP_KERNEL); - if (params1 == NULL) { - kfree(save); - return -ENOMEM; - } - *params1 = *save; - max = snd_pcm_hw_param_max(pcm, params1, var, max, &maxdir); - if (max < 0) { - kfree(params1); - goto _end; - } - if (boundary_nearer(max, maxdir, best, valdir, min, mindir)) { - *params = *params1; - last = 1; - } - kfree(params1); - } else { - *params = *save; - max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir); - snd_assert(max >= 0, return -EINVAL); - last = 1; - } - _end: - kfree(save); - if (last) - v = snd_pcm_hw_param_last(pcm, params, var, dir); - else - v = snd_pcm_hw_param_first(pcm, params, var, dir); - snd_assert(v >= 0, return -EINVAL); - return v; -} - -static int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int dir) -{ - int changed; - if (hw_is_mask(var)) { - struct snd_mask *m = hw_param_mask(params, var); - if (val == 0 && dir < 0) { - changed = -EINVAL; - snd_mask_none(m); - } else { - if (dir > 0) - val++; - else if (dir < 0) - val--; - changed = snd_mask_refine_set(hw_param_mask(params, var), val); - } - } else if (hw_is_interval(var)) { - struct snd_interval *i = hw_param_interval(params, var); - if (val == 0 && dir < 0) { - changed = -EINVAL; - snd_interval_none(i); - } else if (dir == 0) - changed = snd_interval_refine_set(i, val); - else { - struct snd_interval t; - t.openmin = 1; - t.openmax = 1; - t.empty = 0; - t.integer = 0; - if (dir < 0) { - t.min = val - 1; - t.max = val; - } else { - t.min = val; - t.max = val+1; - } - changed = snd_interval_refine(i, &t); - } - } else - return -EINVAL; - if (changed) { - params->cmask |= 1 << var; - params->rmask |= 1 << var; - } - return changed; -} - -/** - * snd_pcm_hw_param_set - * @pcm: PCM instance - * @params: the hw_params instance - * @var: parameter to retrieve - * @val: value to set - * @dir: pointer to the direction (-1,0,1) or NULL - * - * Inside configuration space defined by PARAMS remove from PAR all - * values != VAL. Reduce configuration space accordingly. - * Return VAL or -EINVAL if the configuration space is empty - */ -static int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, unsigned int val, - int dir) -{ - int changed = _snd_pcm_hw_param_set(params, var, val, dir); - if (changed < 0) - return changed; - if (params->rmask) { - int err = snd_pcm_hw_refine(pcm, params); - if (err < 0) - return err; - } - return snd_pcm_hw_param_value(params, var, NULL); -} - -static int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var) -{ - int changed; - changed = snd_interval_setinteger(hw_param_interval(params, var)); - if (changed) { - params->cmask |= 1 << var; - params->rmask |= 1 << var; - } - return changed; -} - -/* - * plugin - */ - #ifdef CONFIG_SND_PCM_OSS_PLUGINS static int snd_pcm_oss_plugin_clear(struct snd_pcm_substream *substream) { @@ -684,7 +203,7 @@ static int snd_pcm_oss_period_size(struct snd_pcm_substream *substream, oss_buffer_size = snd_pcm_plug_client_size(substream, snd_pcm_hw_param_value_max(slave_params, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, NULL)) * oss_frame_size; oss_buffer_size = 1 << ld2(oss_buffer_size); - if (atomic_read(&substream->mmap_count)) { + if (atomic_read(&runtime->mmap_count)) { if (oss_buffer_size > runtime->oss.mmap_bytes) oss_buffer_size = runtime->oss.mmap_bytes; } @@ -819,7 +338,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream) goto failure; } - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) direct = 1; else direct = substream->oss.setup.direct; @@ -828,7 +347,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream) _snd_pcm_hw_param_setinteger(sparams, SNDRV_PCM_HW_PARAM_PERIODS); _snd_pcm_hw_param_min(sparams, SNDRV_PCM_HW_PARAM_PERIODS, 2, 0); snd_mask_none(&mask); - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) snd_mask_set(&mask, SNDRV_PCM_ACCESS_MMAP_INTERLEAVED); else { snd_mask_set(&mask, SNDRV_PCM_ACCESS_RW_INTERLEAVED); @@ -947,8 +466,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream) } else { sw_params->start_threshold = runtime->boundary; } - if (atomic_read(&substream->mmap_count) || - substream->stream == SNDRV_PCM_STREAM_CAPTURE) + if (atomic_read(&runtime->mmap_count) || substream->stream == SNDRV_PCM_STREAM_CAPTURE) sw_params->stop_threshold = runtime->boundary; else sw_params->stop_threshold = runtime->buffer_size; @@ -958,7 +476,7 @@ static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream) sw_params->avail_min = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 1 : runtime->period_size; sw_params->xfer_align = 1; - if (atomic_read(&substream->mmap_count) || + if (atomic_read(&runtime->mmap_count) || substream->oss.setup.nosilence) { sw_params->silence_threshold = 0; sw_params->silence_size = 0; @@ -1302,7 +820,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha ssize_t tmp; struct snd_pcm_runtime *runtime = substream->runtime; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return -ENXIO; if ((tmp = snd_pcm_oss_make_ready(substream)) < 0) @@ -1332,7 +850,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha if (runtime->oss.period_ptr == 0 || runtime->oss.period_ptr == runtime->oss.buffer_used) runtime->oss.buffer_used = 0; - else if ((substream->f_flags & O_NONBLOCK) != 0) + else if ((substream->ffile->f_flags & O_NONBLOCK) != 0) return xfer > 0 ? xfer : -EAGAIN; } } else { @@ -1345,7 +863,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha buf += tmp; bytes -= tmp; xfer += tmp; - if ((substream->f_flags & O_NONBLOCK) != 0 && + if ((substream->ffile->f_flags & O_NONBLOCK) != 0 && tmp != runtime->oss.period_bytes) break; } @@ -1392,7 +910,7 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use ssize_t tmp; struct snd_pcm_runtime *runtime = substream->runtime; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return -ENXIO; if ((tmp = snd_pcm_oss_make_ready(substream)) < 0) @@ -1469,13 +987,6 @@ static int snd_pcm_oss_sync1(struct snd_pcm_substream *substream, size_t size) ssize_t result = 0; long res; wait_queue_t wait; - static char printed_comm[16]; - - if (strncmp(printed_comm, current->comm, 16)) { - printk(KERN_DEBUG "application %s uses obsolete OSS audio interface\n", - current->comm); - memcpy(printed_comm, current->comm, 16); - } runtime = substream->runtime; init_waitqueue_entry(&wait, current); @@ -1529,7 +1040,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream != NULL) { runtime = substream->runtime; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) goto __direct; if ((err = snd_pcm_oss_make_ready(substream)) < 0) return err; @@ -1590,10 +1101,10 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file) * finish sync: drain the buffer */ __direct: - saved_f_flags = substream->f_flags; - substream->f_flags &= ~O_NONBLOCK; + saved_f_flags = substream->ffile->f_flags; + substream->ffile->f_flags &= ~O_NONBLOCK; err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL); - substream->f_flags = saved_f_flags; + substream->ffile->f_flags = saved_f_flags; if (err < 0) return err; runtime->oss.prepare = 1; @@ -1698,7 +1209,7 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0) return err; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&substream->runtime->mmap_count)) direct = 1; else direct = substream->oss.setup.direct; @@ -1908,7 +1419,7 @@ static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int tr if (trigger & PCM_ENABLE_OUTPUT) { if (runtime->oss.trigger) goto _skip1; - if (atomic_read(&psubstream->mmap_count)) + if (atomic_read(&psubstream->runtime->mmap_count)) snd_pcm_oss_simulate_fill(psubstream, runtime->hw_ptr_interrupt); runtime->oss.trigger = 1; runtime->start_threshold = 1; @@ -2026,7 +1537,7 @@ static int snd_pcm_oss_get_ptr(struct snd_pcm_oss_file *pcm_oss_file, int stream if (err < 0) return err; info.ptr = snd_pcm_oss_bytes(substream, runtime->status->hw_ptr % runtime->buffer_size); - if (atomic_read(&substream->mmap_count)) { + if (atomic_read(&runtime->mmap_count)) { snd_pcm_sframes_t n; n = (delay = runtime->hw_ptr_interrupt) - runtime->oss.prev_hw_ptr_interrupt; if (n < 0) @@ -2172,9 +1683,9 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream, substream->oss.oss = 1; substream->oss.setup = *setup; if (setup->nonblock) - substream->f_flags |= O_NONBLOCK; + substream->ffile->f_flags |= O_NONBLOCK; else if (setup->block) - substream->f_flags &= ~O_NONBLOCK; + substream->ffile->f_flags &= ~O_NONBLOCK; runtime = substream->runtime; runtime->oss.params = 1; runtime->oss.trigger = 1; @@ -2231,7 +1742,6 @@ static int snd_pcm_oss_open_file(struct file *file, (pcm->info_flags & SNDRV_PCM_INFO_HALF_DUPLEX)) f_mode = FMODE_WRITE; - file->f_flags &= ~O_APPEND; for (idx = 0; idx < 2; idx++) { if (setup[idx].disable) continue; @@ -2286,6 +1796,13 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) struct snd_pcm_oss_setup setup[2]; int nonblock; wait_queue_t wait; + static char printed_comm[16]; + + if (strncmp(printed_comm, current->comm, 16)) { + printk(KERN_DEBUG "application %s uses obsolete OSS audio interface\n", + current->comm); + memcpy(printed_comm, current->comm, 16); + } pcm = snd_lookup_oss_minor_data(iminor(inode), SNDRV_OSS_DEVICE_TYPE_PCM); @@ -2551,7 +2068,6 @@ static ssize_t snd_pcm_oss_read(struct file *file, char __user *buf, size_t coun substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; if (substream == NULL) return -ENXIO; - substream->f_flags = file->f_flags & O_NONBLOCK; #ifndef OSS_DEBUG return snd_pcm_oss_read1(substream, buf, count); #else @@ -2573,7 +2089,6 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream == NULL) return -ENXIO; - substream->f_flags = file->f_flags & O_NONBLOCK; result = snd_pcm_oss_write1(substream, buf, count); #ifdef OSS_DEBUG printk("pcm_oss: write %li bytes (wrote %li bytes)\n", (long)count, (long)result); @@ -2584,7 +2099,7 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size static int snd_pcm_oss_playback_ready(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return runtime->oss.prev_hw_ptr_interrupt != runtime->hw_ptr_interrupt; else return snd_pcm_playback_avail(runtime) >= runtime->oss.period_frames; @@ -2593,7 +2108,7 @@ static int snd_pcm_oss_playback_ready(struct snd_pcm_substream *substream) static int snd_pcm_oss_capture_ready(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return runtime->oss.prev_hw_ptr_interrupt != runtime->hw_ptr_interrupt; else return snd_pcm_capture_avail(runtime) >= runtime->oss.period_frames; @@ -2836,7 +2351,9 @@ static void snd_pcm_oss_proc_init(struct snd_pcm *pcm) if ((entry = snd_info_create_card_entry(pcm->card, "oss", pstr->proc_root)) != NULL) { entry->content = SNDRV_INFO_CONTENT_TEXT; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 8192; entry->c.text.read = snd_pcm_oss_proc_read; + entry->c.text.write_size = 8192; entry->c.text.write = snd_pcm_oss_proc_write; entry->private_data = pstr; if (snd_info_register(entry) < 0) { diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 7581edd7b..84b000382 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -351,8 +351,10 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry, snd_iprintf(buffer, "closed\n"); return; } + snd_pcm_stream_lock_irq(substream); if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { snd_iprintf(buffer, "no setup\n"); + snd_pcm_stream_unlock_irq(substream); return; } snd_iprintf(buffer, "access: %s\n", snd_pcm_access_name(runtime->access)); @@ -373,6 +375,7 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry, snd_iprintf(buffer, "OSS period frames: %lu\n", (unsigned long)runtime->oss.period_frames); } #endif + snd_pcm_stream_unlock_irq(substream); } static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry, @@ -384,8 +387,10 @@ static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry, snd_iprintf(buffer, "closed\n"); return; } + snd_pcm_stream_lock_irq(substream); if (runtime->status->state == SNDRV_PCM_STATE_OPEN) { snd_iprintf(buffer, "no setup\n"); + snd_pcm_stream_unlock_irq(substream); return; } snd_iprintf(buffer, "tstamp_mode: %s\n", snd_pcm_tstamp_mode_name(runtime->tstamp_mode)); @@ -398,6 +403,7 @@ static void snd_pcm_substream_proc_sw_params_read(struct snd_info_entry *entry, snd_iprintf(buffer, "silence_threshold: %lu\n", runtime->silence_threshold); snd_iprintf(buffer, "silence_size: %lu\n", runtime->silence_size); snd_iprintf(buffer, "boundary: %lu\n", runtime->boundary); + snd_pcm_stream_unlock_irq(substream); } static void snd_pcm_substream_proc_status_read(struct snd_info_entry *entry, @@ -466,7 +472,7 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) pstr->proc_root = entry; if ((entry = snd_info_create_card_entry(pcm->card, "info", pstr->proc_root)) != NULL) { - snd_info_set_text_ops(entry, pstr, snd_pcm_stream_proc_info_read); + snd_info_set_text_ops(entry, pstr, 256, snd_pcm_stream_proc_info_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -477,7 +483,9 @@ static int snd_pcm_stream_proc_init(struct snd_pcm_str *pstr) #ifdef CONFIG_SND_PCM_XRUN_DEBUG if ((entry = snd_info_create_card_entry(pcm->card, "xrun_debug", pstr->proc_root)) != NULL) { + entry->c.text.read_size = 64; entry->c.text.read = snd_pcm_xrun_debug_read; + entry->c.text.write_size = 64; entry->c.text.write = snd_pcm_xrun_debug_write; entry->mode |= S_IWUSR; entry->private_data = pstr; @@ -529,8 +537,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) substream->proc_root = entry; if ((entry = snd_info_create_card_entry(card, "info", substream->proc_root)) != NULL) { - snd_info_set_text_ops(entry, substream, - snd_pcm_substream_proc_info_read); + snd_info_set_text_ops(entry, substream, 256, snd_pcm_substream_proc_info_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -539,8 +546,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) substream->proc_info_entry = entry; if ((entry = snd_info_create_card_entry(card, "hw_params", substream->proc_root)) != NULL) { - snd_info_set_text_ops(entry, substream, - snd_pcm_substream_proc_hw_params_read); + snd_info_set_text_ops(entry, substream, 256, snd_pcm_substream_proc_hw_params_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -549,8 +555,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) substream->proc_hw_params_entry = entry; if ((entry = snd_info_create_card_entry(card, "sw_params", substream->proc_root)) != NULL) { - snd_info_set_text_ops(entry, substream, - snd_pcm_substream_proc_sw_params_read); + snd_info_set_text_ops(entry, substream, 256, snd_pcm_substream_proc_sw_params_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -559,8 +564,7 @@ static int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) substream->proc_sw_params_entry = entry; if ((entry = snd_info_create_card_entry(card, "status", substream->proc_root)) != NULL) { - snd_info_set_text_ops(entry, substream, - snd_pcm_substream_proc_status_read); + snd_info_set_text_ops(entry, substream, 256, snd_pcm_substream_proc_status_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -662,14 +666,11 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) INIT_LIST_HEAD(&substream->self_group.substreams); list_add_tail(&substream->link_list, &substream->self_group.substreams); spin_lock_init(&substream->timer_lock); - atomic_set(&substream->mmap_count, 0); prev = substream; } return 0; } -EXPORT_SYMBOL(snd_pcm_new_stream); - /** * snd_pcm_new - create a new PCM instance * @card: the card instance @@ -729,8 +730,6 @@ int snd_pcm_new(struct snd_card *card, char *id, int device, return 0; } -EXPORT_SYMBOL(snd_pcm_new); - static void snd_pcm_free_stream(struct snd_pcm_str * pstr) { struct snd_pcm_substream *substream, *substream_next; @@ -830,26 +829,6 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, return -EINVAL; } - if (file->f_flags & O_APPEND) { - if (prefer_subdevice < 0) { - if (pstr->substream_count > 1) - return -EINVAL; /* must be unique */ - substream = pstr->substream; - } else { - for (substream = pstr->substream; substream; - substream = substream->next) - if (substream->number == prefer_subdevice) - break; - } - if (! substream) - return -ENODEV; - if (! SUBSTREAM_BUSY(substream)) - return -EBADFD; - substream->ref_count++; - *rsubstream = substream; - return 0; - } - if (prefer_subdevice >= 0) { for (substream = pstr->substream; substream; substream = substream->next) if (!SUBSTREAM_BUSY(substream) && substream->number == prefer_subdevice) @@ -885,6 +864,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, memset((void*)runtime->control, 0, size); init_waitqueue_head(&runtime->sleep); + atomic_set(&runtime->mmap_count, 0); init_timer(&runtime->tick_timer); runtime->tick_timer.function = snd_pcm_tick_timer_func; runtime->tick_timer.data = (unsigned long) substream; @@ -893,8 +873,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, substream->runtime = runtime; substream->private_data = pcm->private_data; - substream->ref_count = 1; - substream->f_flags = file->f_flags; + substream->ffile = file; pstr->substream_opened++; *rsubstream = substream; return 0; @@ -903,7 +882,7 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, void snd_pcm_detach_substream(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime; - + substream->file = NULL; runtime = substream->runtime; snd_assert(runtime != NULL, return); if (runtime->private_free != NULL) @@ -1043,8 +1022,6 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree) return 0; } -EXPORT_SYMBOL(snd_pcm_notify); - #ifdef CONFIG_PROC_FS /* * Info interface @@ -1072,14 +1049,15 @@ static void snd_pcm_proc_read(struct snd_info_entry *entry, mutex_unlock(®ister_mutex); } -static struct snd_info_entry *snd_pcm_proc_entry; +static struct snd_info_entry *snd_pcm_proc_entry = NULL; static void snd_pcm_proc_init(void) { struct snd_info_entry *entry; if ((entry = snd_info_create_module_entry(THIS_MODULE, "pcm", NULL)) != NULL) { - snd_info_set_text_ops(entry, NULL, snd_pcm_proc_read); + snd_info_set_text_ops(entry, NULL, SNDRV_CARDS * SNDRV_PCM_DEVICES * 128, + snd_pcm_proc_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -1121,3 +1099,33 @@ static void __exit alsa_pcm_exit(void) module_init(alsa_pcm_init) module_exit(alsa_pcm_exit) + +EXPORT_SYMBOL(snd_pcm_new); +EXPORT_SYMBOL(snd_pcm_new_stream); +EXPORT_SYMBOL(snd_pcm_notify); +EXPORT_SYMBOL(snd_pcm_open_substream); +EXPORT_SYMBOL(snd_pcm_release_substream); + /* pcm_native.c */ +EXPORT_SYMBOL(snd_pcm_link_rwlock); +#ifdef CONFIG_PM +EXPORT_SYMBOL(snd_pcm_suspend); +EXPORT_SYMBOL(snd_pcm_suspend_all); +#endif +EXPORT_SYMBOL(snd_pcm_kernel_ioctl); +EXPORT_SYMBOL(snd_pcm_mmap_data); +#if SNDRV_PCM_INFO_MMAP_IOMEM +EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); +#endif + /* pcm_misc.c */ +EXPORT_SYMBOL(snd_pcm_format_signed); +EXPORT_SYMBOL(snd_pcm_format_unsigned); +EXPORT_SYMBOL(snd_pcm_format_linear); +EXPORT_SYMBOL(snd_pcm_format_little_endian); +EXPORT_SYMBOL(snd_pcm_format_big_endian); +EXPORT_SYMBOL(snd_pcm_format_width); +EXPORT_SYMBOL(snd_pcm_format_physical_width); +EXPORT_SYMBOL(snd_pcm_format_size); +EXPORT_SYMBOL(snd_pcm_format_silence_64); +EXPORT_SYMBOL(snd_pcm_format_set_silence); +EXPORT_SYMBOL(snd_pcm_build_linear_format); +EXPORT_SYMBOL(snd_pcm_limit_hw_rates); diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c index 2b8aab6fd..e5133033d 100644 --- a/sound/core/pcm_compat.c +++ b/sound/core/pcm_compat.c @@ -497,9 +497,9 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l case SNDRV_PCM_IOCTL_LINK: case SNDRV_PCM_IOCTL_UNLINK: if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - return snd_pcm_playback_ioctl1(file, substream, cmd, argp); + return snd_pcm_playback_ioctl1(substream, cmd, argp); else - return snd_pcm_capture_ioctl1(file, substream, cmd, argp); + return snd_pcm_capture_ioctl1(substream, cmd, argp); case SNDRV_PCM_IOCTL_HW_REFINE32: return snd_pcm_ioctl_hw_params_compat(substream, 1, argp); case SNDRV_PCM_IOCTL_HW_PARAMS32: diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 0bb142a28..eedc6cb03 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -289,7 +289,6 @@ void snd_pcm_set_ops(struct snd_pcm *pcm, int direction, struct snd_pcm_ops *ops substream->ops = ops; } -EXPORT_SYMBOL(snd_pcm_set_ops); /** * snd_pcm_sync - set the PCM sync id @@ -307,12 +306,13 @@ void snd_pcm_set_sync(struct snd_pcm_substream *substream) runtime->sync.id32[3] = -1; } -EXPORT_SYMBOL(snd_pcm_set_sync); - /* * Standard ioctl routine */ +/* Code taken from alsa-lib */ +#define assert(a) snd_assert((a), return -EINVAL) + static inline unsigned int div32(unsigned int a, unsigned int b, unsigned int *r) { @@ -369,6 +369,56 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b, return n; } +static int snd_interval_refine_min(struct snd_interval *i, unsigned int min, int openmin) +{ + int changed = 0; + assert(!snd_interval_empty(i)); + if (i->min < min) { + i->min = min; + i->openmin = openmin; + changed = 1; + } else if (i->min == min && !i->openmin && openmin) { + i->openmin = 1; + changed = 1; + } + if (i->integer) { + if (i->openmin) { + i->min++; + i->openmin = 0; + } + } + if (snd_interval_checkempty(i)) { + snd_interval_none(i); + return -EINVAL; + } + return changed; +} + +static int snd_interval_refine_max(struct snd_interval *i, unsigned int max, int openmax) +{ + int changed = 0; + assert(!snd_interval_empty(i)); + if (i->max > max) { + i->max = max; + i->openmax = openmax; + changed = 1; + } else if (i->max == max && !i->openmax && openmax) { + i->openmax = 1; + changed = 1; + } + if (i->integer) { + if (i->openmax) { + i->max--; + i->openmax = 0; + } + } + if (snd_interval_checkempty(i)) { + snd_interval_none(i); + return -EINVAL; + } + return changed; +} + /** * snd_interval_refine - refine the interval value of configurator * @i: the interval value to refine @@ -383,7 +433,7 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b, int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v) { int changed = 0; - snd_assert(!snd_interval_empty(i), return -EINVAL); + assert(!snd_interval_empty(i)); if (i->min < v->min) { i->min = v->min; i->openmin = v->openmin; @@ -422,11 +472,9 @@ int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v) return changed; } -EXPORT_SYMBOL(snd_interval_refine); - static int snd_interval_refine_first(struct snd_interval *i) { - snd_assert(!snd_interval_empty(i), return -EINVAL); + assert(!snd_interval_empty(i)); if (snd_interval_single(i)) return 0; i->max = i->min; @@ -438,7 +486,7 @@ static int snd_interval_refine_first(struct snd_interval *i) static int snd_interval_refine_last(struct snd_interval *i) { - snd_assert(!snd_interval_empty(i), return -EINVAL); + assert(!snd_interval_empty(i)); if (snd_interval_single(i)) return 0; i->min = i->max; @@ -448,6 +496,16 @@ static int snd_interval_refine_last(struct snd_interval *i) return 1; } +static int snd_interval_refine_set(struct snd_interval *i, unsigned int val) +{ + struct snd_interval t; + t.empty = 0; + t.min = t.max = val; + t.openmin = t.openmax = 0; + t.integer = 1; + return snd_interval_refine(i, &t); +} + void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c) { if (a->empty || b->empty) { @@ -563,6 +621,7 @@ void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, c->integer = 0; } +#undef assert /* ---- */ @@ -668,8 +727,6 @@ int snd_interval_ratnum(struct snd_interval *i, return err; } -EXPORT_SYMBOL(snd_interval_ratnum); - /** * snd_interval_ratden - refine the interval value * @i: interval to refine @@ -820,8 +877,6 @@ int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int * return changed; } -EXPORT_SYMBOL(snd_interval_list); - static int snd_interval_step(struct snd_interval *i, unsigned int min, unsigned int step) { unsigned int n; @@ -898,8 +953,6 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, return 0; } -EXPORT_SYMBOL(snd_pcm_hw_rule_add); - /** * snd_pcm_hw_constraint_mask * @runtime: PCM runtime instance @@ -954,8 +1007,6 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa return snd_interval_setinteger(constrs_interval(constrs, var)); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_integer); - /** * snd_pcm_hw_constraint_minmax * @runtime: PCM runtime instance @@ -977,8 +1028,6 @@ int snd_pcm_hw_constraint_minmax(struct snd_pcm_runtime *runtime, snd_pcm_hw_par return snd_interval_refine(constrs_interval(constrs, var), &t); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_minmax); - static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -1006,8 +1055,6 @@ int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, var, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_list); - static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -1040,8 +1087,6 @@ int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, var, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_ratnums); - static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -1073,8 +1118,6 @@ int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, var, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_ratdens); - static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -1106,8 +1149,6 @@ int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_msbits); - static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -1132,8 +1173,6 @@ int snd_pcm_hw_constraint_step(struct snd_pcm_runtime *runtime, var, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_step); - static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { static int pow2_sizes[] = { @@ -1161,7 +1200,11 @@ int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime, var, -1); } -EXPORT_SYMBOL(snd_pcm_hw_constraint_pow2); +/* To use the same code we have in alsa-lib */ +#define assert(i) snd_assert((i), return -EINVAL) +#ifndef INT_MIN +#define INT_MIN ((int)((unsigned int)INT_MAX+1)) +#endif static void _snd_pcm_hw_param_any(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var) @@ -1181,6 +1224,18 @@ static void _snd_pcm_hw_param_any(struct snd_pcm_hw_params *params, snd_BUG(); } +#if 0 +/* + * snd_pcm_hw_param_any + */ +int snd_pcm_hw_param_any(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var) +{ + _snd_pcm_hw_param_any(params, var); + return snd_pcm_hw_refine(pcm, params); +} +#endif /* 0 */ + void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params) { unsigned int k; @@ -1192,7 +1247,18 @@ void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params) params->info = ~0U; } -EXPORT_SYMBOL(_snd_pcm_hw_params_any); +#if 0 +/* + * snd_pcm_hw_params_any + * + * Fill PARAMS with full configuration space boundaries + */ +int snd_pcm_hw_params_any(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params) +{ + _snd_pcm_hw_params_any(params); + return snd_pcm_hw_refine(pcm, params); +} +#endif /* 0 */ /** * snd_pcm_hw_param_value @@ -1203,8 +1269,8 @@ EXPORT_SYMBOL(_snd_pcm_hw_params_any); * Return the value for field PAR if it's fixed in configuration space * defined by PARAMS. Return -EINVAL otherwise */ -int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir) +static int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir) { if (hw_is_mask(var)) { const struct snd_mask *mask = hw_param_mask_c(params, var); @@ -1222,10 +1288,61 @@ int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, *dir = i->openmin; return snd_interval_value(i); } + assert(0); + return -EINVAL; +} + +/** + * snd_pcm_hw_param_value_min + * @params: the hw_params instance + * @var: parameter to retrieve + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Return the minimum value for field PAR. + */ +unsigned int snd_pcm_hw_param_value_min(const struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir) +{ + if (hw_is_mask(var)) { + if (dir) + *dir = 0; + return snd_mask_min(hw_param_mask_c(params, var)); + } + if (hw_is_interval(var)) { + const struct snd_interval *i = hw_param_interval_c(params, var); + if (dir) + *dir = i->openmin; + return snd_interval_min(i); + } + assert(0); return -EINVAL; } -EXPORT_SYMBOL(snd_pcm_hw_param_value); +/** + * snd_pcm_hw_param_value_max + * @params: the hw_params instance + * @var: parameter to retrieve + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Return the maximum value for field PAR. + */ +unsigned int snd_pcm_hw_param_value_max(const struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir) +{ + if (hw_is_mask(var)) { + if (dir) + *dir = 0; + return snd_mask_max(hw_param_mask_c(params, var)); + } + if (hw_is_interval(var)) { + const struct snd_interval *i = hw_param_interval_c(params, var); + if (dir) + *dir = - (int) i->openmax; + return snd_interval_max(i); + } + assert(0); + return -EINVAL; +} void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var) @@ -1243,7 +1360,42 @@ void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params, } } -EXPORT_SYMBOL(_snd_pcm_hw_param_setempty); +int _snd_pcm_hw_param_setinteger(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var) +{ + int changed; + assert(hw_is_interval(var)); + changed = snd_interval_setinteger(hw_param_interval(params, var)); + if (changed) { + params->cmask |= 1 << var; + params->rmask |= 1 << var; + } + return changed; +} + +#if 0 +/* + * snd_pcm_hw_param_setinteger + * + * Inside configuration space defined by PARAMS remove from PAR all + * non integer values. Reduce configuration space accordingly. + * Return -EINVAL if the configuration space is empty + */ +int snd_pcm_hw_param_setinteger(struct snd_pcm_substream *pcm, + struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var) +{ + int changed = _snd_pcm_hw_param_setinteger(params, var); + if (changed < 0) + return changed; + if (params->rmask) { + int err = snd_pcm_hw_refine(pcm, params); + if (err < 0) + return err; + } + return 0; +} +#endif /* 0 */ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var) @@ -1253,8 +1405,10 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, changed = snd_mask_refine_first(hw_param_mask(params, var)); else if (hw_is_interval(var)) changed = snd_interval_refine_first(hw_param_interval(params, var)); - else + else { + assert(0); return -EINVAL; + } if (changed) { params->cmask |= 1 << var; params->rmask |= 1 << var; @@ -1274,22 +1428,20 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, * values > minimum. Reduce configuration space accordingly. * Return the minimum. */ -int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir) +static int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, + struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir) { int changed = _snd_pcm_hw_param_first(params, var); if (changed < 0) return changed; if (params->rmask) { int err = snd_pcm_hw_refine(pcm, params); - snd_assert(err >= 0, return err); + assert(err >= 0); } return snd_pcm_hw_param_value(params, var, dir); } -EXPORT_SYMBOL(snd_pcm_hw_param_first); - static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var) { @@ -1298,8 +1450,10 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, changed = snd_mask_refine_last(hw_param_mask(params, var)); else if (hw_is_interval(var)) changed = snd_interval_refine_last(hw_param_interval(params, var)); - else + else { + assert(0); return -EINVAL; + } if (changed) { params->cmask |= 1 << var; params->rmask |= 1 << var; @@ -1319,21 +1473,381 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, * values < maximum. Reduce configuration space accordingly. * Return the maximum. */ -int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params, - snd_pcm_hw_param_t var, int *dir) +static int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, + struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, int *dir) { int changed = _snd_pcm_hw_param_last(params, var); if (changed < 0) return changed; if (params->rmask) { int err = snd_pcm_hw_refine(pcm, params); - snd_assert(err >= 0, return err); + assert(err >= 0); } return snd_pcm_hw_param_value(params, var, dir); } -EXPORT_SYMBOL(snd_pcm_hw_param_last); +int _snd_pcm_hw_param_min(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, int dir) +{ + int changed; + int open = 0; + if (dir) { + if (dir > 0) { + open = 1; + } else if (dir < 0) { + if (val > 0) { + open = 1; + val--; + } + } + } + if (hw_is_mask(var)) + changed = snd_mask_refine_min(hw_param_mask(params, var), val + !!open); + else if (hw_is_interval(var)) + changed = snd_interval_refine_min(hw_param_interval(params, var), val, open); + else { + assert(0); + return -EINVAL; + } + if (changed) { + params->cmask |= 1 << var; + params->rmask |= 1 << var; + } + return changed; +} + +/** + * snd_pcm_hw_param_min + * @pcm: PCM instance + * @params: the hw_params instance + * @var: parameter to retrieve + * @val: minimal value + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Inside configuration space defined by PARAMS remove from PAR all + * values < VAL. Reduce configuration space accordingly. + * Return new minimum or -EINVAL if the configuration space is empty + */ +static int snd_pcm_hw_param_min(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, + int *dir) +{ + int changed = _snd_pcm_hw_param_min(params, var, val, dir ? *dir : 0); + if (changed < 0) + return changed; + if (params->rmask) { + int err = snd_pcm_hw_refine(pcm, params); + if (err < 0) + return err; + } + return snd_pcm_hw_param_value_min(params, var, dir); +} + +static int _snd_pcm_hw_param_max(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, + int dir) +{ + int changed; + int open = 0; + if (dir) { + if (dir < 0) { + open = 1; + } else if (dir > 0) { + open = 1; + val++; + } + } + if (hw_is_mask(var)) { + if (val == 0 && open) { + snd_mask_none(hw_param_mask(params, var)); + changed = -EINVAL; + } else + changed = snd_mask_refine_max(hw_param_mask(params, var), val - !!open); + } else if (hw_is_interval(var)) + changed = snd_interval_refine_max(hw_param_interval(params, var), val, open); + else { + assert(0); + return -EINVAL; + } + if (changed) { + params->cmask |= 1 << var; + params->rmask |= 1 << var; + } + return changed; +} + +/** + * snd_pcm_hw_param_max + * @pcm: PCM instance + * @params: the hw_params instance + * @var: parameter to retrieve + * @val: maximal value + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Inside configuration space defined by PARAMS remove from PAR all + * values >= VAL + 1. Reduce configuration space accordingly. + * Return new maximum or -EINVAL if the configuration space is empty + */ +static int snd_pcm_hw_param_max(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, + int *dir) +{ + int changed = _snd_pcm_hw_param_max(params, var, val, dir ? *dir : 0); + if (changed < 0) + return changed; + if (params->rmask) { + int err = snd_pcm_hw_refine(pcm, params); + if (err < 0) + return err; + } + return snd_pcm_hw_param_value_max(params, var, dir); +} + +int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, int dir) +{ + int changed; + if (hw_is_mask(var)) { + struct snd_mask *m = hw_param_mask(params, var); + if (val == 0 && dir < 0) { + changed = -EINVAL; + snd_mask_none(m); + } else { + if (dir > 0) + val++; + else if (dir < 0) + val--; + changed = snd_mask_refine_set(hw_param_mask(params, var), val); + } + } else if (hw_is_interval(var)) { + struct snd_interval *i = hw_param_interval(params, var); + if (val == 0 && dir < 0) { + changed = -EINVAL; + snd_interval_none(i); + } else if (dir == 0) + changed = snd_interval_refine_set(i, val); + else { + struct snd_interval t; + t.openmin = 1; + t.openmax = 1; + t.empty = 0; + t.integer = 0; + if (dir < 0) { + t.min = val - 1; + t.max = val; + } else { + t.min = val; + t.max = val+1; + } + changed = snd_interval_refine(i, &t); + } + } else { + assert(0); + return -EINVAL; + } + if (changed) { + params->cmask |= 1 << var; + params->rmask |= 1 << var; + } + return changed; +} + +/** + * snd_pcm_hw_param_set + * @pcm: PCM instance + * @params: the hw_params instance + * @var: parameter to retrieve + * @val: value to set + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Inside configuration space defined by PARAMS remove from PAR all + * values != VAL. Reduce configuration space accordingly. + * Return VAL or -EINVAL if the configuration space is empty + */ +int snd_pcm_hw_param_set(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int val, int dir) +{ + int changed = _snd_pcm_hw_param_set(params, var, val, dir); + if (changed < 0) + return changed; + if (params->rmask) { + int err = snd_pcm_hw_refine(pcm, params); + if (err < 0) + return err; + } + return snd_pcm_hw_param_value(params, var, NULL); +} + +static int _snd_pcm_hw_param_mask(struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, const struct snd_mask *val) +{ + int changed; + assert(hw_is_mask(var)); + changed = snd_mask_refine(hw_param_mask(params, var), val); + if (changed) { + params->cmask |= 1 << var; + params->rmask |= 1 << var; + } + return changed; +} + +/** + * snd_pcm_hw_param_mask + * @pcm: PCM instance + * @params: the hw_params instance + * @var: parameter to retrieve + * @val: mask to apply + * + * Inside configuration space defined by PARAMS remove from PAR all values + * not contained in MASK. Reduce configuration space accordingly. + * This function can be called only for SNDRV_PCM_HW_PARAM_ACCESS, + * SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_SUBFORMAT. + * Return 0 on success or -EINVAL + * if the configuration space is empty + */ +int snd_pcm_hw_param_mask(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, const struct snd_mask *val) +{ + int changed = _snd_pcm_hw_param_mask(params, var, val); + if (changed < 0) + return changed; + if (params->rmask) { + int err = snd_pcm_hw_refine(pcm, params); + if (err < 0) + return err; + } + return 0; +} + +static int boundary_sub(int a, int adir, + int b, int bdir, + int *c, int *cdir) +{ + adir = adir < 0 ? -1 : (adir > 0 ? 1 : 0); + bdir = bdir < 0 ? -1 : (bdir > 0 ? 1 : 0); + *c = a - b; + *cdir = adir - bdir; + if (*cdir == -2) { + assert(*c > INT_MIN); + (*c)--; + } else if (*cdir == 2) { + assert(*c < INT_MAX); + (*c)++; + } + return 0; +} + +static int boundary_lt(unsigned int a, int adir, + unsigned int b, int bdir) +{ + assert(a > 0 || adir >= 0); + assert(b > 0 || bdir >= 0); + if (adir < 0) { + a--; + adir = 1; + } else if (adir > 0) + adir = 1; + if (bdir < 0) { + b--; + bdir = 1; + } else if (bdir > 0) + bdir = 1; + return a < b || (a == b && adir < bdir); +} + +/* Return 1 if min is nearer to best than max */ +static int boundary_nearer(int min, int mindir, + int best, int bestdir, + int max, int maxdir) +{ + int dmin, dmindir; + int dmax, dmaxdir; + boundary_sub(best, bestdir, min, mindir, &dmin, &dmindir); + boundary_sub(max, maxdir, best, bestdir, &dmax, &dmaxdir); + return boundary_lt(dmin, dmindir, dmax, dmaxdir); +} + +/** + * snd_pcm_hw_param_near + * @pcm: PCM instance + * @params: the hw_params instance + * @var: parameter to retrieve + * @best: value to set + * @dir: pointer to the direction (-1,0,1) or NULL + * + * Inside configuration space defined by PARAMS set PAR to the available value + * nearest to VAL. Reduce configuration space accordingly. + * This function cannot be called for SNDRV_PCM_HW_PARAM_ACCESS, + * SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_SUBFORMAT. + * Return the value found. + */ +int snd_pcm_hw_param_near(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params, + snd_pcm_hw_param_t var, unsigned int best, int *dir) +{ + struct snd_pcm_hw_params *save = NULL; + int v; + unsigned int saved_min; + int last = 0; + int min, max; + int mindir, maxdir; + int valdir = dir ? *dir : 0; + /* FIXME */ + if (best > INT_MAX) + best = INT_MAX; + min = max = best; + mindir = maxdir = valdir; + if (maxdir > 0) + maxdir = 0; + else if (maxdir == 0) + maxdir = -1; + else { + maxdir = 1; + max--; + } + save = kmalloc(sizeof(*save), GFP_KERNEL); + if (save == NULL) + return -ENOMEM; + *save = *params; + saved_min = min; + min = snd_pcm_hw_param_min(pcm, params, var, min, &mindir); + if (min >= 0) { + struct snd_pcm_hw_params *params1; + if (max < 0) + goto _end; + if ((unsigned int)min == saved_min && mindir == valdir) + goto _end; + params1 = kmalloc(sizeof(*params1), GFP_KERNEL); + if (params1 == NULL) { + kfree(save); + return -ENOMEM; + } + *params1 = *save; + max = snd_pcm_hw_param_max(pcm, params1, var, max, &maxdir); + if (max < 0) { + kfree(params1); + goto _end; + } + if (boundary_nearer(max, maxdir, best, valdir, min, mindir)) { + *params = *params1; + last = 1; + } + kfree(params1); + } else { + *params = *save; + max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir); + assert(max >= 0); + last = 1; + } + _end: + kfree(save); + if (last) + v = snd_pcm_hw_param_last(pcm, params, var, dir); + else + v = snd_pcm_hw_param_first(pcm, params, var, dir); + assert(v >= 0); + return v; +} /** * snd_pcm_hw_param_choose @@ -1345,32 +1859,39 @@ EXPORT_SYMBOL(snd_pcm_hw_param_last); * first access, first format, first subformat, min channels, * min rate, min period time, max buffer size, min tick time */ -int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, - struct snd_pcm_hw_params *params) -{ - static int vars[] = { - SNDRV_PCM_HW_PARAM_ACCESS, - SNDRV_PCM_HW_PARAM_FORMAT, - SNDRV_PCM_HW_PARAM_SUBFORMAT, - SNDRV_PCM_HW_PARAM_CHANNELS, - SNDRV_PCM_HW_PARAM_RATE, - SNDRV_PCM_HW_PARAM_PERIOD_TIME, - SNDRV_PCM_HW_PARAM_BUFFER_SIZE, - SNDRV_PCM_HW_PARAM_TICK_TIME, - -1 - }; - int err, *v; +int snd_pcm_hw_params_choose(struct snd_pcm_substream *pcm, struct snd_pcm_hw_params *params) +{ + int err; + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_ACCESS, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_FORMAT, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_SUBFORMAT, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_CHANNELS, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_RATE, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_PERIOD_TIME, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_last(pcm, params, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, NULL); + assert(err >= 0); + + err = snd_pcm_hw_param_first(pcm, params, SNDRV_PCM_HW_PARAM_TICK_TIME, NULL); + assert(err >= 0); - for (v = vars; *v != -1; v++) { - if (*v != SNDRV_PCM_HW_PARAM_BUFFER_SIZE) - err = snd_pcm_hw_param_first(pcm, params, *v, NULL); - else - err = snd_pcm_hw_param_last(pcm, params, *v, NULL); - snd_assert(err >= 0, return err); - } return 0; } +#undef assert + static int snd_pcm_lib_ioctl_reset(struct snd_pcm_substream *substream, void *arg) { @@ -1446,8 +1967,6 @@ int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, return -ENXIO; } -EXPORT_SYMBOL(snd_pcm_lib_ioctl); - /* * Conditions */ @@ -1582,8 +2101,6 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream) kill_fasync(&runtime->fasync, SIGIO, POLL_IN); } -EXPORT_SYMBOL(snd_pcm_period_elapsed); - static int snd_pcm_lib_write_transfer(struct snd_pcm_substream *substream, unsigned int hwoff, unsigned long data, unsigned int off, @@ -1782,7 +2299,7 @@ snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, const v if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; - nonblock = !!(substream->f_flags & O_NONBLOCK); + nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED && runtime->channels > 1) @@ -1791,8 +2308,6 @@ snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream, const v snd_pcm_lib_write_transfer); } -EXPORT_SYMBOL(snd_pcm_lib_write); - static int snd_pcm_lib_writev_transfer(struct snd_pcm_substream *substream, unsigned int hwoff, unsigned long data, unsigned int off, @@ -1847,7 +2362,7 @@ snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream, if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; - nonblock = !!(substream->f_flags & O_NONBLOCK); + nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) return -EINVAL; @@ -1855,8 +2370,6 @@ snd_pcm_sframes_t snd_pcm_lib_writev(struct snd_pcm_substream *substream, nonblock, snd_pcm_lib_writev_transfer); } -EXPORT_SYMBOL(snd_pcm_lib_writev); - static int snd_pcm_lib_read_transfer(struct snd_pcm_substream *substream, unsigned int hwoff, unsigned long data, unsigned int off, @@ -2059,14 +2572,12 @@ snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream *substream, void __u if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; - nonblock = !!(substream->f_flags & O_NONBLOCK); + nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); if (runtime->access != SNDRV_PCM_ACCESS_RW_INTERLEAVED) return -EINVAL; return snd_pcm_lib_read1(substream, (unsigned long)buf, size, nonblock, snd_pcm_lib_read_transfer); } -EXPORT_SYMBOL(snd_pcm_lib_read); - static int snd_pcm_lib_readv_transfer(struct snd_pcm_substream *substream, unsigned int hwoff, unsigned long data, unsigned int off, @@ -2118,10 +2629,58 @@ snd_pcm_sframes_t snd_pcm_lib_readv(struct snd_pcm_substream *substream, if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; - nonblock = !!(substream->f_flags & O_NONBLOCK); + nonblock = !!(substream->ffile->f_flags & O_NONBLOCK); if (runtime->access != SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) return -EINVAL; return snd_pcm_lib_read1(substream, (unsigned long)bufs, frames, nonblock, snd_pcm_lib_readv_transfer); } +/* + * Exported symbols + */ + +EXPORT_SYMBOL(snd_interval_refine); +EXPORT_SYMBOL(snd_interval_list); +EXPORT_SYMBOL(snd_interval_ratnum); +EXPORT_SYMBOL(_snd_pcm_hw_params_any); +EXPORT_SYMBOL(_snd_pcm_hw_param_min); +EXPORT_SYMBOL(_snd_pcm_hw_param_set); +EXPORT_SYMBOL(_snd_pcm_hw_param_setempty); +EXPORT_SYMBOL(_snd_pcm_hw_param_setinteger); +EXPORT_SYMBOL(snd_pcm_hw_param_value_min); +EXPORT_SYMBOL(snd_pcm_hw_param_value_max); +EXPORT_SYMBOL(snd_pcm_hw_param_mask); +EXPORT_SYMBOL(snd_pcm_hw_param_first); +EXPORT_SYMBOL(snd_pcm_hw_param_last); +EXPORT_SYMBOL(snd_pcm_hw_param_near); +EXPORT_SYMBOL(snd_pcm_hw_param_set); +EXPORT_SYMBOL(snd_pcm_hw_refine); +EXPORT_SYMBOL(snd_pcm_hw_constraints_init); +EXPORT_SYMBOL(snd_pcm_hw_constraints_complete); +EXPORT_SYMBOL(snd_pcm_hw_constraint_list); +EXPORT_SYMBOL(snd_pcm_hw_constraint_step); +EXPORT_SYMBOL(snd_pcm_hw_constraint_ratnums); +EXPORT_SYMBOL(snd_pcm_hw_constraint_ratdens); +EXPORT_SYMBOL(snd_pcm_hw_constraint_msbits); +EXPORT_SYMBOL(snd_pcm_hw_constraint_minmax); +EXPORT_SYMBOL(snd_pcm_hw_constraint_integer); +EXPORT_SYMBOL(snd_pcm_hw_constraint_pow2); +EXPORT_SYMBOL(snd_pcm_hw_rule_add); +EXPORT_SYMBOL(snd_pcm_set_ops); +EXPORT_SYMBOL(snd_pcm_set_sync); +EXPORT_SYMBOL(snd_pcm_lib_ioctl); +EXPORT_SYMBOL(snd_pcm_stop); +EXPORT_SYMBOL(snd_pcm_period_elapsed); +EXPORT_SYMBOL(snd_pcm_lib_write); +EXPORT_SYMBOL(snd_pcm_lib_read); +EXPORT_SYMBOL(snd_pcm_lib_writev); EXPORT_SYMBOL(snd_pcm_lib_readv); +EXPORT_SYMBOL(snd_pcm_lib_buffer_bytes); +EXPORT_SYMBOL(snd_pcm_lib_period_bytes); +/* pcm_memory.c */ +EXPORT_SYMBOL(snd_pcm_lib_preallocate_free_for_all); +EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages); +EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all); +EXPORT_SYMBOL(snd_pcm_sgbuf_ops_page); +EXPORT_SYMBOL(snd_pcm_lib_malloc_pages); +EXPORT_SYMBOL(snd_pcm_lib_free_pages); diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 067d2056d..428f8c169 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -126,8 +126,6 @@ int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) return 0; } -EXPORT_SYMBOL(snd_pcm_lib_preallocate_free_for_all); - #ifdef CONFIG_SND_VERBOSE_PROCFS /* * read callback for prealloc proc file @@ -193,7 +191,9 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream) struct snd_info_entry *entry; if ((entry = snd_info_create_card_entry(substream->pcm->card, "prealloc", substream->proc_root)) != NULL) { + entry->c.text.read_size = 64; entry->c.text.read = snd_pcm_lib_preallocate_proc_read; + entry->c.text.write_size = 64; entry->c.text.write = snd_pcm_lib_preallocate_proc_write; entry->mode |= S_IWUSR; entry->private_data = substream; @@ -253,8 +253,6 @@ int snd_pcm_lib_preallocate_pages(struct snd_pcm_substream *substream, return snd_pcm_lib_preallocate_pages1(substream, size, max); } -EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages); - /** * snd_pcm_lib_preallocate_pages_for_all - pre-allocation for continous memory type (all substreams) * @pcm: the pcm instance @@ -282,8 +280,6 @@ int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, return 0; } -EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all); - /** * snd_pcm_sgbuf_ops_page - get the page struct at the given offset * @substream: the pcm substream instance @@ -302,8 +298,6 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigne return sgbuf->page_table[idx]; } -EXPORT_SYMBOL(snd_pcm_sgbuf_ops_page); - /** * snd_pcm_lib_malloc_pages - allocate the DMA buffer * @substream: the substream to allocate the DMA buffer to @@ -355,8 +349,6 @@ int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) return 1; /* area was changed */ } -EXPORT_SYMBOL(snd_pcm_lib_malloc_pages); - /** * snd_pcm_lib_free_pages - release the allocated DMA buffer. * @substream: the substream to release the DMA buffer @@ -382,5 +374,3 @@ int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream) snd_pcm_set_runtime_buffer(substream, NULL); return 0; } - -EXPORT_SYMBOL(snd_pcm_lib_free_pages); diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c index 0019c59a7..593c77f4d 100644 --- a/sound/core/pcm_misc.c +++ b/sound/core/pcm_misc.c @@ -207,8 +207,6 @@ int snd_pcm_format_signed(snd_pcm_format_t format) return val; } -EXPORT_SYMBOL(snd_pcm_format_signed); - /** * snd_pcm_format_unsigned - Check the PCM format is unsigned linear * @format: the format to check @@ -226,8 +224,6 @@ int snd_pcm_format_unsigned(snd_pcm_format_t format) return !val; } -EXPORT_SYMBOL(snd_pcm_format_unsigned); - /** * snd_pcm_format_linear - Check the PCM format is linear * @format: the format to check @@ -239,8 +235,6 @@ int snd_pcm_format_linear(snd_pcm_format_t format) return snd_pcm_format_signed(format) >= 0; } -EXPORT_SYMBOL(snd_pcm_format_linear); - /** * snd_pcm_format_little_endian - Check the PCM format is little-endian * @format: the format to check @@ -258,8 +252,6 @@ int snd_pcm_format_little_endian(snd_pcm_format_t format) return val; } -EXPORT_SYMBOL(snd_pcm_format_little_endian); - /** * snd_pcm_format_big_endian - Check the PCM format is big-endian * @format: the format to check @@ -277,8 +269,6 @@ int snd_pcm_format_big_endian(snd_pcm_format_t format) return !val; } -EXPORT_SYMBOL(snd_pcm_format_big_endian); - /** * snd_pcm_format_width - return the bit-width of the format * @format: the format to check @@ -296,8 +286,6 @@ int snd_pcm_format_width(snd_pcm_format_t format) return val; } -EXPORT_SYMBOL(snd_pcm_format_width); - /** * snd_pcm_format_physical_width - return the physical bit-width of the format * @format: the format to check @@ -315,8 +303,6 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format) return val; } -EXPORT_SYMBOL(snd_pcm_format_physical_width); - /** * snd_pcm_format_size - return the byte size of samples on the given format * @format: the format to check @@ -332,8 +318,6 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples) return samples * phys_width / 8; } -EXPORT_SYMBOL(snd_pcm_format_size); - /** * snd_pcm_format_silence_64 - return the silent data in 8 bytes array * @format: the format to check @@ -349,8 +333,6 @@ const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format) return pcm_formats[format].silence; } -EXPORT_SYMBOL(snd_pcm_format_silence_64); - /** * snd_pcm_format_set_silence - set the silence data on the buffer * @format: the PCM format @@ -420,8 +402,6 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *data, unsigned int return 0; } -EXPORT_SYMBOL(snd_pcm_format_set_silence); - /* [width][unsigned][bigendian] */ static int linear_formats[4][2][2] = { {{ SNDRV_PCM_FORMAT_S8, SNDRV_PCM_FORMAT_S8}, @@ -452,8 +432,6 @@ snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_end return linear_formats[width][!!unsignd][!!big_endian]; } -EXPORT_SYMBOL(snd_pcm_build_linear_format); - /** * snd_pcm_limit_hw_rates - determine rate_min/rate_max fields * @runtime: the runtime instance @@ -485,5 +463,3 @@ int snd_pcm_limit_hw_rates(struct snd_pcm_runtime *runtime) } return 0; } - -EXPORT_SYMBOL(snd_pcm_limit_hw_rates); diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 439f04792..0860c5a84 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -71,10 +71,9 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream); */ DEFINE_RWLOCK(snd_pcm_link_rwlock); -EXPORT_SYMBOL(snd_pcm_link_rwlock); - static DECLARE_RWSEM(snd_pcm_link_rwsem); + static inline mm_segment_t snd_enter_user(void) { mm_segment_t fs = get_fs(); @@ -320,8 +319,6 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream, return 0; } -EXPORT_SYMBOL(snd_pcm_hw_refine); - static int snd_pcm_hw_refine_user(struct snd_pcm_substream *substream, struct snd_pcm_hw_params __user * _params) { @@ -372,7 +369,7 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream, #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) if (!substream->oss.oss) #endif - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return -EBADFD; params->rmask = ~0U; @@ -485,7 +482,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream) return -EBADFD; } snd_pcm_stream_unlock_irq(substream); - if (atomic_read(&substream->mmap_count)) + if (atomic_read(&runtime->mmap_count)) return -EBADFD; if (substream->ops->hw_free) result = substream->ops->hw_free(substream); @@ -939,8 +936,6 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state) return snd_pcm_action(&snd_pcm_action_stop, substream, state); } -EXPORT_SYMBOL(snd_pcm_stop); - /** * snd_pcm_drain_done * @substream: the PCM substream @@ -1090,8 +1085,6 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream) return err; } -EXPORT_SYMBOL(snd_pcm_suspend); - /** * snd_pcm_suspend_all * @pcm: the PCM instance @@ -1121,8 +1114,6 @@ int snd_pcm_suspend_all(struct snd_pcm *pcm) return 0; } -EXPORT_SYMBOL(snd_pcm_suspend_all); - /* resume */ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream, int state) @@ -1284,16 +1275,13 @@ static int snd_pcm_reset(struct snd_pcm_substream *substream) /* * prepare ioctl */ -/* we use the second argument for updating f_flags */ -static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream, - int f_flags) +static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream, int state) { struct snd_pcm_runtime *runtime = substream->runtime; if (runtime->status->state == SNDRV_PCM_STATE_OPEN) return -EBADFD; if (snd_pcm_running(substream)) return -EBUSY; - substream->f_flags = f_flags; return 0; } @@ -1322,26 +1310,17 @@ static struct action_ops snd_pcm_action_prepare = { /** * snd_pcm_prepare * @substream: the PCM substream instance - * @file: file to refer f_flags * * Prepare the PCM substream to be triggerable. */ -static int snd_pcm_prepare(struct snd_pcm_substream *substream, - struct file *file) +static int snd_pcm_prepare(struct snd_pcm_substream *substream) { int res; struct snd_card *card = substream->pcm->card; - int f_flags; - - if (file) - f_flags = file->f_flags; - else - f_flags = substream->f_flags; snd_power_lock(card); if ((res = snd_power_wait(card, SNDRV_CTL_POWER_D0)) >= 0) - res = snd_pcm_action_nonatomic(&snd_pcm_action_prepare, - substream, f_flags); + res = snd_pcm_action_nonatomic(&snd_pcm_action_prepare, substream, 0); snd_power_unlock(card); return res; } @@ -1352,7 +1331,7 @@ static int snd_pcm_prepare(struct snd_pcm_substream *substream, static int snd_pcm_pre_drain_init(struct snd_pcm_substream *substream, int state) { - if (substream->f_flags & O_NONBLOCK) + if (substream->ffile->f_flags & O_NONBLOCK) return -EAGAIN; substream->runtime->trigger_master = substream; return 0; @@ -1469,6 +1448,8 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream) } } up_read(&snd_pcm_link_rwsem); + if (! num_drecs) + goto _error; snd_pcm_stream_lock_irq(substream); /* resume pause */ @@ -2025,10 +2006,6 @@ static void pcm_release_private(struct snd_pcm_substream *substream) void snd_pcm_release_substream(struct snd_pcm_substream *substream) { - substream->ref_count--; - if (substream->ref_count > 0) - return; - snd_pcm_drop(substream); if (substream->hw_opened) { if (substream->ops->hw_free != NULL) @@ -2043,8 +2020,6 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream) snd_pcm_detach_substream(substream); } -EXPORT_SYMBOL(snd_pcm_release_substream); - int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file, struct snd_pcm_substream **rsubstream) @@ -2055,11 +2030,6 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, err = snd_pcm_attach_substream(pcm, stream, file, &substream); if (err < 0) return err; - if (substream->ref_count > 1) { - *rsubstream = substream; - return 0; - } - substream->no_mmap_ctrl = 0; err = snd_pcm_hw_constraints_init(substream); if (err < 0) { @@ -2086,8 +2056,6 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, return err; } -EXPORT_SYMBOL(snd_pcm_open_substream); - static int snd_pcm_open_file(struct file *file, struct snd_pcm *pcm, int stream, @@ -2105,20 +2073,17 @@ static int snd_pcm_open_file(struct file *file, if (err < 0) return err; - if (substream->ref_count > 1) - pcm_file = substream->file; - else { - pcm_file = kzalloc(sizeof(*pcm_file), GFP_KERNEL); - if (pcm_file == NULL) { - snd_pcm_release_substream(substream); - return -ENOMEM; - } - str = substream->pstr; - substream->file = pcm_file; - substream->pcm_release = pcm_release_private; - pcm_file->substream = substream; - snd_pcm_add_file(str, pcm_file); + pcm_file = kzalloc(sizeof(*pcm_file), GFP_KERNEL); + if (pcm_file == NULL) { + snd_pcm_release_substream(substream); + return -ENOMEM; } + str = substream->pstr; + substream->file = pcm_file; + substream->pcm_release = pcm_release_private; + pcm_file->substream = substream; + snd_pcm_add_file(str, pcm_file); + file->private_data = pcm_file; *rpcm_file = pcm_file; return 0; @@ -2205,6 +2170,7 @@ static int snd_pcm_release(struct inode *inode, struct file *file) pcm_file = file->private_data; substream = pcm_file->substream; snd_assert(substream != NULL, return -ENXIO); + snd_assert(!atomic_read(&substream->runtime->mmap_count), ); pcm = substream->pcm; fasync_helper(-1, file, 0, &substream->runtime->fasync); mutex_lock(&pcm->open_mutex); @@ -2527,8 +2493,7 @@ static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream, return 0; } -static int snd_pcm_common_ioctl1(struct file *file, - struct snd_pcm_substream *substream, +static int snd_pcm_common_ioctl1(struct snd_pcm_substream *substream, unsigned int cmd, void __user *arg) { snd_assert(substream != NULL, return -ENXIO); @@ -2553,7 +2518,7 @@ static int snd_pcm_common_ioctl1(struct file *file, case SNDRV_PCM_IOCTL_CHANNEL_INFO: return snd_pcm_channel_info_user(substream, arg); case SNDRV_PCM_IOCTL_PREPARE: - return snd_pcm_prepare(substream, file); + return snd_pcm_prepare(substream); case SNDRV_PCM_IOCTL_RESET: return snd_pcm_reset(substream); case SNDRV_PCM_IOCTL_START: @@ -2595,8 +2560,7 @@ static int snd_pcm_common_ioctl1(struct file *file, return -ENOTTY; } -static int snd_pcm_playback_ioctl1(struct file *file, - struct snd_pcm_substream *substream, +static int snd_pcm_playback_ioctl1(struct snd_pcm_substream *substream, unsigned int cmd, void __user *arg) { snd_assert(substream != NULL, return -ENXIO); @@ -2672,11 +2636,10 @@ static int snd_pcm_playback_ioctl1(struct file *file, return result < 0 ? result : 0; } } - return snd_pcm_common_ioctl1(file, substream, cmd, arg); + return snd_pcm_common_ioctl1(substream, cmd, arg); } -static int snd_pcm_capture_ioctl1(struct file *file, - struct snd_pcm_substream *substream, +static int snd_pcm_capture_ioctl1(struct snd_pcm_substream *substream, unsigned int cmd, void __user *arg) { snd_assert(substream != NULL, return -ENXIO); @@ -2752,7 +2715,7 @@ static int snd_pcm_capture_ioctl1(struct file *file, return result < 0 ? result : 0; } } - return snd_pcm_common_ioctl1(file, substream, cmd, arg); + return snd_pcm_common_ioctl1(substream, cmd, arg); } static long snd_pcm_playback_ioctl(struct file *file, unsigned int cmd, @@ -2765,8 +2728,7 @@ static long snd_pcm_playback_ioctl(struct file *file, unsigned int cmd, if (((cmd >> 8) & 0xff) != 'A') return -ENOTTY; - return snd_pcm_playback_ioctl1(file, pcm_file->substream, cmd, - (void __user *)arg); + return snd_pcm_playback_ioctl1(pcm_file->substream, cmd, (void __user *)arg); } static long snd_pcm_capture_ioctl(struct file *file, unsigned int cmd, @@ -2779,8 +2741,7 @@ static long snd_pcm_capture_ioctl(struct file *file, unsigned int cmd, if (((cmd >> 8) & 0xff) != 'A') return -ENOTTY; - return snd_pcm_capture_ioctl1(file, pcm_file->substream, cmd, - (void __user *)arg); + return snd_pcm_capture_ioctl1(pcm_file->substream, cmd, (void __user *)arg); } int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, @@ -2792,12 +2753,12 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, fs = snd_enter_user(); switch (substream->stream) { case SNDRV_PCM_STREAM_PLAYBACK: - result = snd_pcm_playback_ioctl1(NULL, substream, cmd, - (void __user *)arg); + result = snd_pcm_playback_ioctl1(substream, + cmd, (void __user *)arg); break; case SNDRV_PCM_STREAM_CAPTURE: - result = snd_pcm_capture_ioctl1(NULL, substream, cmd, - (void __user *)arg); + result = snd_pcm_capture_ioctl1(substream, + cmd, (void __user *)arg); break; default: result = -EINVAL; @@ -2807,8 +2768,6 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, return result; } -EXPORT_SYMBOL(snd_pcm_kernel_ioctl); - static ssize_t snd_pcm_read(struct file *file, char __user *buf, size_t count, loff_t * offset) { @@ -3175,7 +3134,7 @@ static int snd_pcm_default_mmap(struct snd_pcm_substream *substream, area->vm_ops = &snd_pcm_vm_ops_data; area->vm_private_data = substream; area->vm_flags |= VM_RESERVED; - atomic_inc(&substream->mmap_count); + atomic_inc(&substream->runtime->mmap_count); return 0; } @@ -3207,11 +3166,9 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, (substream->runtime->dma_addr + offset) >> PAGE_SHIFT, size, area->vm_page_prot)) return -EAGAIN; - atomic_inc(&substream->mmap_count); + atomic_inc(&substream->runtime->mmap_count); return 0; } - -EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem); #endif /* SNDRV_PCM_INFO_MMAP */ /* @@ -3255,8 +3212,6 @@ int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, return snd_pcm_default_mmap(substream, area); } -EXPORT_SYMBOL(snd_pcm_mmap_data); - static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area) { struct snd_pcm_file * pcm_file; diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 8c15c66eb..87b47c956 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -43,7 +43,7 @@ MODULE_DESCRIPTION("Midlevel RawMidi code for ALSA."); MODULE_LICENSE("GPL"); #ifdef CONFIG_SND_OSSEMUL -static int midi_map[SNDRV_CARDS]; +static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1}; module_param_array(midi_map, int, NULL, 0444); MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device."); @@ -1561,6 +1561,7 @@ static int snd_rawmidi_dev_register(struct snd_device *device) entry = snd_info_create_card_entry(rmidi->card, name, rmidi->card->proc_root); if (entry) { entry->private_data = rmidi; + entry->c.text.read_size = 1024; entry->c.text.read = snd_rawmidi_proc_info_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c index 15b6c8a3f..84704ccb1 100644 --- a/sound/core/rtctimer.c +++ b/sound/core/rtctimer.c @@ -50,9 +50,7 @@ static int rtctimer_stop(struct snd_timer *t); * The hardware dependent description for this timer. */ static struct snd_timer_hardware rtc_hw = { - .flags = SNDRV_TIMER_HW_AUTO | - SNDRV_TIMER_HW_FIRST | - SNDRV_TIMER_HW_TASKLET, + .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, .ticks = 100000000L, /* FIXME: XXX */ .open = rtctimer_open, .close = rtctimer_close, @@ -62,7 +60,6 @@ static struct snd_timer_hardware rtc_hw = { static int rtctimer_freq = RTC_FREQ; /* frequency */ static struct snd_timer *rtctimer; -static struct tasklet_struct rtc_tasklet; static rtc_task_t rtc_task; @@ -84,7 +81,6 @@ rtctimer_close(struct snd_timer *t) rtc_task_t *rtc = t->private_data; if (rtc) { rtc_unregister(rtc); - tasklet_kill(&rtc_tasklet); t->private_data = NULL; } return 0; @@ -109,17 +105,12 @@ rtctimer_stop(struct snd_timer *timer) return 0; } -static void rtctimer_tasklet(unsigned long data) -{ - snd_timer_interrupt((struct snd_timer *)data, 1); -} - /* * interrupt */ static void rtctimer_interrupt(void *private_data) { - tasklet_hi_schedule(private_data); + snd_timer_interrupt(private_data, 1); } @@ -148,11 +139,9 @@ static int __init rtctimer_init(void) timer->hw = rtc_hw; timer->hw.resolution = NANO_SEC / rtctimer_freq; - tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer); - /* set up RTC callback */ rtc_task.func = rtctimer_interrupt; - rtc_task.private_data = &rtc_tasklet; + rtc_task.private_data = timer; err = snd_timer_global_register(timer); if (err < 0) { diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c index e72341356..b99197851 100644 --- a/sound/core/seq/oss/seq_oss.c +++ b/sound/core/seq/oss/seq_oss.c @@ -291,6 +291,7 @@ register_proc(void) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = NULL; + entry->c.text.read_size = 1024; entry->c.text.read = info_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c index 2f0d8773a..20f954bc7 100644 --- a/sound/core/seq/seq.c +++ b/sound/core/seq/seq.c @@ -129,3 +129,25 @@ static void __exit alsa_seq_exit(void) module_init(alsa_seq_init) module_exit(alsa_seq_exit) + + /* seq_clientmgr.c */ +EXPORT_SYMBOL(snd_seq_create_kernel_client); +EXPORT_SYMBOL(snd_seq_delete_kernel_client); +EXPORT_SYMBOL(snd_seq_kernel_client_enqueue); +EXPORT_SYMBOL(snd_seq_kernel_client_enqueue_blocking); +EXPORT_SYMBOL(snd_seq_kernel_client_dispatch); +EXPORT_SYMBOL(snd_seq_kernel_client_ctl); +EXPORT_SYMBOL(snd_seq_kernel_client_write_poll); +EXPORT_SYMBOL(snd_seq_set_queue_tempo); + /* seq_memory.c */ +EXPORT_SYMBOL(snd_seq_expand_var_event); +EXPORT_SYMBOL(snd_seq_dump_var_event); + /* seq_ports.c */ +EXPORT_SYMBOL(snd_seq_event_port_attach); +EXPORT_SYMBOL(snd_seq_event_port_detach); + /* seq_lock.c */ +#if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG) +/*EXPORT_SYMBOL(snd_seq_sleep_in_lock);*/ +/*EXPORT_SYMBOL(snd_seq_sleep_timeout_in_lock);*/ +EXPORT_SYMBOL(snd_use_lock_sync_helper); +#endif diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 532a660df..bb15d9ee8 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -1714,8 +1714,6 @@ int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo) return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo); } -EXPORT_SYMBOL(snd_seq_set_queue_tempo); - static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client, void __user *arg) { @@ -2266,8 +2264,6 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index, return client->number; } -EXPORT_SYMBOL(snd_seq_create_kernel_client); - /* exported to kernel modules */ int snd_seq_delete_kernel_client(int client) { @@ -2284,7 +2280,6 @@ int snd_seq_delete_kernel_client(int client) return 0; } -EXPORT_SYMBOL(snd_seq_delete_kernel_client); /* skeleton to enqueue event, called from snd_seq_kernel_client_enqueue * and snd_seq_kernel_client_enqueue_blocking @@ -2333,8 +2328,6 @@ int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev, return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop); } -EXPORT_SYMBOL(snd_seq_kernel_client_enqueue); - /* * exported, called by kernel clients to enqueue events (with blocking) * @@ -2347,7 +2340,6 @@ int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev return kernel_client_enqueue(client, ev, file, 1, atomic, hop); } -EXPORT_SYMBOL(snd_seq_kernel_client_enqueue_blocking); /* * exported, called by kernel clients to dispatch events directly to other @@ -2384,7 +2376,6 @@ int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev, return result; } -EXPORT_SYMBOL(snd_seq_kernel_client_dispatch); /* * exported, called by kernel clients to perform same functions as with @@ -2405,7 +2396,6 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg) return result; } -EXPORT_SYMBOL(snd_seq_kernel_client_ctl); /* exported (for OSS emulator) */ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait) @@ -2423,8 +2413,6 @@ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table return 0; } -EXPORT_SYMBOL(snd_seq_kernel_client_write_poll); - /*---------------------------------------------------------------------------*/ #ifdef CONFIG_PROC_FS diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 102ff548c..d9a3e5a18 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c @@ -80,7 +80,7 @@ static LIST_HEAD(opslist); static int num_ops; static DEFINE_MUTEX(ops_mutex); #ifdef CONFIG_PROC_FS -static struct snd_info_entry *info_entry; +static struct snd_info_entry *info_entry = NULL; #endif /* @@ -372,19 +372,14 @@ static struct ops_list * create_driver(char *id) { struct ops_list *ops; - ops = kzalloc(sizeof(*ops), GFP_KERNEL); + ops = kmalloc(sizeof(*ops), GFP_KERNEL); if (ops == NULL) return ops; + memset(ops, 0, sizeof(*ops)); /* set up driver entry */ strlcpy(ops->id, id, sizeof(ops->id)); mutex_init(&ops->reg_mutex); - /* - * The ->reg_mutex locking rules are per-driver, so we create - * separate per-driver lock classes: - */ - lockdep_set_class(&ops->reg_mutex, (struct lock_class_key *)id); - ops->driver = DRIVER_EMPTY; INIT_LIST_HEAD(&ops->dev_list); /* lock this instance */ @@ -560,6 +555,7 @@ static int __init alsa_seq_device_init(void) if (info_entry == NULL) return -ENOMEM; info_entry->content = SNDRV_INFO_CONTENT_TEXT; + info_entry->c.text.read_size = 2048; info_entry->c.text.read = snd_seq_device_info; if (snd_info_register(info_entry) < 0) { snd_info_free_entry(info_entry); diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c index e55488d12..2a283a59e 100644 --- a/sound/core/seq/seq_dummy.c +++ b/sound/core/seq/seq_dummy.c @@ -66,7 +66,7 @@ MODULE_LICENSE("GPL"); MODULE_ALIAS("snd-seq-client-" __stringify(SNDRV_SEQ_CLIENT_DUMMY)); static int ports = 1; -static int duplex; +static int duplex = 0; module_param(ports, int, 0444); MODULE_PARM_DESC(ports, "number of ports to be created"); @@ -171,9 +171,7 @@ create_port(int idx, int type) pinfo.capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; if (duplex) pinfo.capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; - pinfo.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC - | SNDRV_SEQ_PORT_TYPE_SOFTWARE - | SNDRV_SEQ_PORT_TYPE_PORT; + pinfo.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; memset(&pcb, 0, sizeof(pcb)); pcb.owner = THIS_MODULE; pcb.unuse = dummy_unuse; diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c index 142e9e688..acce21afd 100644 --- a/sound/core/seq/seq_info.c +++ b/sound/core/seq/seq_info.c @@ -34,8 +34,8 @@ static struct snd_info_entry *timer_entry; static struct snd_info_entry * __init -create_info_entry(char *name, void (*read)(struct snd_info_entry *, - struct snd_info_buffer *)) +create_info_entry(char *name, int size, void (*read)(struct snd_info_entry *, + struct snd_info_buffer *)) { struct snd_info_entry *entry; @@ -43,6 +43,7 @@ create_info_entry(char *name, void (*read)(struct snd_info_entry *, if (entry == NULL) return NULL; entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->c.text.read_size = size; entry->c.text.read = read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -54,11 +55,11 @@ create_info_entry(char *name, void (*read)(struct snd_info_entry *, /* create all our /proc entries */ int __init snd_seq_info_init(void) { - queues_entry = create_info_entry("queues", + queues_entry = create_info_entry("queues", 512 + (256 * SNDRV_SEQ_MAX_QUEUES), snd_seq_info_queues_read); - clients_entry = create_info_entry("clients", + clients_entry = create_info_entry("clients", 512 + (256 * SNDRV_SEQ_MAX_CLIENTS), snd_seq_info_clients_read); - timer_entry = create_info_entry("timer", snd_seq_info_timer_read); + timer_entry = create_info_entry("timer", 1024, snd_seq_info_timer_read); return 0; } diff --git a/sound/core/seq/seq_lock.c b/sound/core/seq/seq_lock.c index 1a34941d4..a837a94b2 100644 --- a/sound/core/seq/seq_lock.c +++ b/sound/core/seq/seq_lock.c @@ -44,6 +44,4 @@ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line) } } -EXPORT_SYMBOL(snd_use_lock_sync_helper); - #endif diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 4bffe509f..40b4f679c 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -118,8 +118,6 @@ int snd_seq_dump_var_event(const struct snd_seq_event *event, return 0; } -EXPORT_SYMBOL(snd_seq_dump_var_event); - /* * exported: @@ -169,7 +167,6 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char return err < 0 ? err : newlen; } -EXPORT_SYMBOL(snd_seq_expand_var_event); /* * release this cell, free extended data if available diff --git a/sound/core/seq/seq_memory.h b/sound/core/seq/seq_memory.h index 63e91431a..39c60d9e1 100644 --- a/sound/core/seq/seq_memory.h +++ b/sound/core/seq/seq_memory.h @@ -31,7 +31,7 @@ struct snd_seq_event_cell { struct snd_seq_event_cell *next; /* next cell */ }; -/* design note: the pool is a contiguous block of memory, if we dynamicly +/* design note: the pool is a contigious block of memory, if we dynamicly want to add additional cells to the pool be better store this in another pool as we need to know the base address of the pool when releasing memory. */ diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c index 1daa5b069..9caa1372b 100644 --- a/sound/core/seq/seq_midi.c +++ b/sound/core/seq/seq_midi.c @@ -278,7 +278,6 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev) struct seq_midisynth *msynth, *ms; struct snd_seq_port_info *port; struct snd_rawmidi_info *info; - struct snd_rawmidi *rmidi = dev->private_data; int newclient = 0; unsigned int p, ports; struct snd_seq_port_callback pcallbacks; @@ -321,8 +320,8 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev) } client->seq_client = snd_seq_create_kernel_client( - card, 0, "%s", card->shortname[0] ? - (const char *)card->shortname : "External MIDI"); + card, 0, "%s", info->name[0] ? + (const char *)info->name : "External MIDI"); if (client->seq_client < 0) { kfree(client); mutex_unlock(®ister_mutex); @@ -377,9 +376,7 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev) if ((port->capability & (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ)) == (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ) && info->flags & SNDRV_RAWMIDI_INFO_DUPLEX) port->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; - port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC - | SNDRV_SEQ_PORT_TYPE_HARDWARE - | SNDRV_SEQ_PORT_TYPE_PORT; + port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; port->midi_channels = 16; memset(&pcallbacks, 0, sizeof(pcallbacks)); pcallbacks.owner = THIS_MODULE; @@ -390,8 +387,6 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev) pcallbacks.unuse = midisynth_unuse; pcallbacks.event_input = event_process_midi; port->kernel = &pcallbacks; - if (rmidi->ops && rmidi->ops->get_port_info) - rmidi->ops->get_port_info(rmidi, p, port); if (snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_CREATE_PORT, port)<0) goto __nomem; ms->seq_client = client->seq_client; diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index 8c64b58ff..2ef8fb52e 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -221,6 +221,7 @@ static void clear_subscriber_list(struct snd_seq_client *client, { struct list_head *p, *n; + down_write(&grp->list_mutex); list_for_each_safe(p, n, &grp->list_head) { struct snd_seq_subscribers *subs; struct snd_seq_client *c; @@ -258,6 +259,7 @@ static void clear_subscriber_list(struct snd_seq_client *client, snd_seq_client_unlock(c); } } + up_write(&grp->list_mutex); } /* delete port data */ @@ -514,7 +516,7 @@ int snd_seq_port_connect(struct snd_seq_client *connector, atomic_set(&subs->ref_count, 2); down_write(&src->list_mutex); - down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING); + down_write(&dest->list_mutex); exclusive = info->flags & SNDRV_SEQ_PORT_SUBS_EXCLUSIVE ? 1 : 0; err = -EBUSY; @@ -587,7 +589,7 @@ int snd_seq_port_disconnect(struct snd_seq_client *connector, unsigned long flags; down_write(&src->list_mutex); - down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING); + down_write(&dest->list_mutex); /* look for the connection */ list_for_each(p, &src->list_head) { @@ -673,7 +675,6 @@ int snd_seq_event_port_attach(int client, return ret; } -EXPORT_SYMBOL(snd_seq_event_port_attach); /* * Detach the driver from a port. @@ -693,5 +694,3 @@ int snd_seq_event_port_detach(int client, int port) return err; } - -EXPORT_SYMBOL(snd_seq_event_port_detach); diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c index 0cfa06c6b..f4edec603 100644 --- a/sound/core/seq/seq_virmidi.c +++ b/sound/core/seq/seq_virmidi.c @@ -390,9 +390,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev) pinfo->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; pinfo->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; pinfo->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; - pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC - | SNDRV_SEQ_PORT_TYPE_SOFTWARE - | SNDRV_SEQ_PORT_TYPE_PORT; + pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; pinfo->midi_channels = 16; memset(&pcallbacks, 0, sizeof(pcallbacks)); pcallbacks.owner = THIS_MODULE; diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c index c30669f14..74745da9d 100644 --- a/sound/core/sgbuf.c +++ b/sound/core/sgbuf.c @@ -19,6 +19,7 @@ * */ +#include #include #include #include @@ -68,18 +69,21 @@ void *snd_malloc_sgbuf_pages(struct device *device, dmab->area = NULL; dmab->addr = 0; - dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); + dmab->private_data = sgbuf = kmalloc(sizeof(*sgbuf), GFP_KERNEL); if (! sgbuf) return NULL; + memset(sgbuf, 0, sizeof(*sgbuf)); sgbuf->dev = device; pages = snd_sgbuf_aligned_pages(size); sgbuf->tblsize = sgbuf_align_table(pages); - sgbuf->table = kcalloc(sgbuf->tblsize, sizeof(*sgbuf->table), GFP_KERNEL); + sgbuf->table = kmalloc(sizeof(*sgbuf->table) * sgbuf->tblsize, GFP_KERNEL); if (! sgbuf->table) goto _failed; - sgbuf->page_table = kcalloc(sgbuf->tblsize, sizeof(*sgbuf->page_table), GFP_KERNEL); + memset(sgbuf->table, 0, sizeof(*sgbuf->table) * sgbuf->tblsize); + sgbuf->page_table = kmalloc(sizeof(*sgbuf->page_table) * sgbuf->tblsize, GFP_KERNEL); if (! sgbuf->page_table) goto _failed; + memset(sgbuf->page_table, 0, sizeof(*sgbuf->page_table) * sgbuf->tblsize); /* allocate each page */ for (i = 0; i < pages; i++) { diff --git a/sound/core/sound.c b/sound/core/sound.c index 7edd1fc58..108e430b5 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -32,15 +32,15 @@ #include #include #include +#include #include #define SNDRV_OS_MINORS 256 static int major = CONFIG_SND_MAJOR; int snd_major; -EXPORT_SYMBOL(snd_major); - static int cards_limit = 1; +static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO; MODULE_AUTHOR("Jaroslav Kysela "); MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards."); @@ -49,6 +49,10 @@ module_param(major, int, 0444); MODULE_PARM_DESC(major, "Major # for sound driver."); module_param(cards_limit, int, 0444); MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); +#ifdef CONFIG_DEVFS_FS +module_param(device_mode, int, 0444); +MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs."); +#endif MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); /* this one holds the actual max. card number currently available. @@ -56,7 +60,6 @@ MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); * modules are loaded manually, this limit number increases, too. */ int snd_ecards_limit; -EXPORT_SYMBOL(snd_ecards_limit); static struct snd_minor *snd_minors[SNDRV_OS_MINORS]; static DEFINE_MUTEX(sound_mutex); @@ -75,17 +78,20 @@ extern struct class *sound_class; */ void snd_request_card(int card) { + int locked; + if (! current->fs->root) return; - if (snd_card_locked(card)) + read_lock(&snd_card_rwlock); + locked = snd_cards_lock & (1 << card); + read_unlock(&snd_card_rwlock); + if (locked) return; if (card < 0 || card >= cards_limit) return; request_module("snd-card-%i", card); } -EXPORT_SYMBOL(snd_request_card); - static void snd_request_other(int minor) { char *str; @@ -127,8 +133,6 @@ void *snd_lookup_minor_data(unsigned int minor, int type) return private_data; } -EXPORT_SYMBOL(snd_lookup_minor_data); - static int snd_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -244,7 +248,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, struct device *device = NULL; snd_assert(name, return -EINVAL); - preg = kmalloc(sizeof *preg, GFP_KERNEL); + preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); if (preg == NULL) return -ENOMEM; preg->type = type; @@ -252,6 +256,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, preg->device = dev; preg->f_ops = f_ops; preg->private_data = private_data; + strcpy(preg->name, name); mutex_lock(&sound_mutex); #ifdef CONFIG_SND_DYNAMIC_MINORS minor = snd_find_free_minor(); @@ -266,6 +271,8 @@ int snd_register_device(int type, struct snd_card *card, int dev, return minor; } snd_minors[minor] = preg; + if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit) + devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); if (card) device = card->dev; class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name); @@ -274,8 +281,6 @@ int snd_register_device(int type, struct snd_card *card, int dev, return 0; } -EXPORT_SYMBOL(snd_register_device); - /** * snd_unregister_device - unregister the device on the given card * @type: the device type, SNDRV_DEVICE_TYPE_XXX @@ -305,6 +310,9 @@ int snd_unregister_device(int type, struct snd_card *card, int dev) return -EINVAL; } + if (mptr->type != SNDRV_DEVICE_TYPE_CONTROL || + mptr->card >= cards_limit) /* created in sound.c */ + devfs_remove("snd/%s", mptr->name); class_device_destroy(sound_class, MKDEV(major, minor)); snd_minors[minor] = NULL; @@ -313,14 +321,12 @@ int snd_unregister_device(int type, struct snd_card *card, int dev) return 0; } -EXPORT_SYMBOL(snd_unregister_device); - #ifdef CONFIG_PROC_FS /* * INFO PART */ -static struct snd_info_entry *snd_minor_info_entry; +static struct snd_info_entry *snd_minor_info_entry = NULL; static const char *snd_device_type_name(int type) { @@ -375,6 +381,7 @@ int __init snd_minor_info_init(void) entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL); if (entry) { + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_minor_info_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -399,17 +406,24 @@ int __exit snd_minor_info_done(void) static int __init alsa_sound_init(void) { + short controlnum; + snd_major = major; snd_ecards_limit = cards_limit; + devfs_mk_dir("snd"); if (register_chrdev(major, "alsa", &snd_fops)) { snd_printk(KERN_ERR "unable to register native major device number %d\n", major); + devfs_remove("snd"); return -EIO; } if (snd_info_init() < 0) { unregister_chrdev(major, "alsa"); + devfs_remove("snd"); return -ENOMEM; } snd_info_minor_register(); + for (controlnum = 0; controlnum < cards_limit; controlnum++) + devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); #ifndef MODULE printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"); #endif @@ -418,11 +432,105 @@ static int __init alsa_sound_init(void) static void __exit alsa_sound_exit(void) { + short controlnum; + + for (controlnum = 0; controlnum < cards_limit; controlnum++) + devfs_remove("snd/controlC%d", controlnum); + snd_info_minor_unregister(); snd_info_done(); if (unregister_chrdev(major, "alsa") != 0) snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); + devfs_remove("snd"); } module_init(alsa_sound_init) module_exit(alsa_sound_exit) + + /* sound.c */ +EXPORT_SYMBOL(snd_major); +EXPORT_SYMBOL(snd_ecards_limit); +#if defined(CONFIG_KMOD) +EXPORT_SYMBOL(snd_request_card); +#endif +EXPORT_SYMBOL(snd_register_device); +EXPORT_SYMBOL(snd_unregister_device); +EXPORT_SYMBOL(snd_lookup_minor_data); +#if defined(CONFIG_SND_OSSEMUL) +EXPORT_SYMBOL(snd_register_oss_device); +EXPORT_SYMBOL(snd_unregister_oss_device); +EXPORT_SYMBOL(snd_lookup_oss_minor_data); +#endif + /* memory.c */ +EXPORT_SYMBOL(copy_to_user_fromio); +EXPORT_SYMBOL(copy_from_user_toio); + /* init.c */ +EXPORT_SYMBOL(snd_cards); +#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) +EXPORT_SYMBOL(snd_mixer_oss_notify_callback); +#endif +EXPORT_SYMBOL(snd_card_new); +EXPORT_SYMBOL(snd_card_disconnect); +EXPORT_SYMBOL(snd_card_free); +EXPORT_SYMBOL(snd_card_free_in_thread); +EXPORT_SYMBOL(snd_card_register); +EXPORT_SYMBOL(snd_component_add); +EXPORT_SYMBOL(snd_card_file_add); +EXPORT_SYMBOL(snd_card_file_remove); +#ifdef CONFIG_PM +EXPORT_SYMBOL(snd_power_wait); +#endif + /* device.c */ +EXPORT_SYMBOL(snd_device_new); +EXPORT_SYMBOL(snd_device_register); +EXPORT_SYMBOL(snd_device_free); + /* isadma.c */ +#ifdef CONFIG_ISA_DMA_API +EXPORT_SYMBOL(snd_dma_program); +EXPORT_SYMBOL(snd_dma_disable); +EXPORT_SYMBOL(snd_dma_pointer); +#endif + /* info.c */ +#ifdef CONFIG_PROC_FS +EXPORT_SYMBOL(snd_seq_root); +EXPORT_SYMBOL(snd_iprintf); +EXPORT_SYMBOL(snd_info_get_line); +EXPORT_SYMBOL(snd_info_get_str); +EXPORT_SYMBOL(snd_info_create_module_entry); +EXPORT_SYMBOL(snd_info_create_card_entry); +EXPORT_SYMBOL(snd_info_free_entry); +EXPORT_SYMBOL(snd_info_register); +EXPORT_SYMBOL(snd_info_unregister); +EXPORT_SYMBOL(snd_card_proc_new); +#endif + /* info_oss.c */ +#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) +EXPORT_SYMBOL(snd_oss_info_register); +#endif + /* control.c */ +EXPORT_SYMBOL(snd_ctl_new); +EXPORT_SYMBOL(snd_ctl_new1); +EXPORT_SYMBOL(snd_ctl_free_one); +EXPORT_SYMBOL(snd_ctl_add); +EXPORT_SYMBOL(snd_ctl_remove); +EXPORT_SYMBOL(snd_ctl_remove_id); +EXPORT_SYMBOL(snd_ctl_rename_id); +EXPORT_SYMBOL(snd_ctl_find_numid); +EXPORT_SYMBOL(snd_ctl_find_id); +EXPORT_SYMBOL(snd_ctl_notify); +EXPORT_SYMBOL(snd_ctl_register_ioctl); +EXPORT_SYMBOL(snd_ctl_unregister_ioctl); +#ifdef CONFIG_COMPAT +EXPORT_SYMBOL(snd_ctl_register_ioctl_compat); +EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat); +#endif +EXPORT_SYMBOL(snd_ctl_elem_read); +EXPORT_SYMBOL(snd_ctl_elem_write); + /* misc.c */ +EXPORT_SYMBOL(release_and_free_resource); +#ifdef CONFIG_SND_VERBOSE_PRINTK +EXPORT_SYMBOL(snd_verbose_printk); +#endif +#if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_VERBOSE_PRINTK) +EXPORT_SYMBOL(snd_verbose_printd); +#endif diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 74f0fe5a1..9055c6de9 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -58,8 +58,6 @@ void *snd_lookup_oss_minor_data(unsigned int minor, int type) return private_data; } -EXPORT_SYMBOL(snd_lookup_oss_minor_data); - static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev) { int minor; @@ -160,8 +158,6 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev, return -EBUSY; } -EXPORT_SYMBOL(snd_register_oss_device); - int snd_unregister_oss_device(int type, struct snd_card *card, int dev) { int minor = snd_oss_kernel_minor(type, card, dev); @@ -201,15 +197,13 @@ int snd_unregister_oss_device(int type, struct snd_card *card, int dev) return 0; } -EXPORT_SYMBOL(snd_unregister_oss_device); - /* * INFO PART */ #ifdef CONFIG_PROC_FS -static struct snd_info_entry *snd_minor_info_oss_entry; +static struct snd_info_entry *snd_minor_info_oss_entry = NULL; static const char *snd_oss_device_type_name(int type) { @@ -258,6 +252,7 @@ int __init snd_minor_info_oss_init(void) entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root); if (entry) { + entry->c.text.read_size = PAGE_SIZE; entry->c.text.read = snd_minor_info_oss_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/core/timer.c b/sound/core/timer.c index 0a984e881..4585600ba 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1062,6 +1062,7 @@ static int snd_timer_register_system(void) static void snd_timer_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { + unsigned long flags; struct snd_timer *timer; struct snd_timer_instance *ti; struct list_head *p, *q; @@ -1095,6 +1096,7 @@ static void snd_timer_proc_read(struct snd_info_entry *entry, if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) snd_iprintf(buffer, " SLAVE"); snd_iprintf(buffer, "\n"); + spin_lock_irqsave(&timer->lock, flags); list_for_each(q, &timer->open_list_head) { ti = list_entry(q, struct snd_timer_instance, open_list); snd_iprintf(buffer, " Client %s : %s\n", @@ -1103,11 +1105,12 @@ static void snd_timer_proc_read(struct snd_info_entry *entry, SNDRV_TIMER_IFLG_RUNNING) ? "running" : "stopped"); } + spin_unlock_irqrestore(&timer->lock, flags); } mutex_unlock(®ister_mutex); } -static struct snd_info_entry *snd_timer_proc_entry; +static struct snd_info_entry *snd_timer_proc_entry = NULL; static void __init snd_timer_proc_init(void) { @@ -1115,6 +1118,7 @@ static void __init snd_timer_proc_init(void) entry = snd_info_create_module_entry(THIS_MODULE, "timers", NULL); if (entry != NULL) { + entry->c.text.read_size = SNDRV_TIMER_DEVICES * 128; entry->c.text.read = snd_timer_proc_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index ffeafaf2e..ae0df549f 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -677,10 +677,6 @@ static int __init alsa_card_dummy_init(void) i, NULL, 0); if (IS_ERR(device)) continue; - if (!platform_get_drvdata(device)) { - platform_device_unregister(device); - continue; - } devices[i] = device; cards++; } diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 17cc105b2..77b060097 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -83,7 +83,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port[dev], 0, - irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) { + irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) { printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); goto _err; } @@ -160,9 +160,8 @@ static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device, return -ENODEV; } if (pnp_port_len(device, 0) < IO_EXTENT) { - snd_printk(KERN_ERR "PnP port length is %llu, expected %d\n", - (unsigned long long)pnp_port_len(device, 0), - IO_EXTENT); + snd_printk(KERN_ERR "PnP port length is %ld, expected %d\n", + pnp_port_len(device, 0), IO_EXTENT); return -ENODEV; } port[dev] = pnp_port_start(device, 0); @@ -254,10 +253,6 @@ static int __init alsa_card_mpu401_init(void) i, NULL, 0); if (IS_ERR(device)) continue; - if (!platform_get_drvdata(device)) { - platform_device_unregister(device); - continue; - } platform_devices[i] = device; snd_mpu401_devices++; } diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 4bf07ca9b..b49a45cbf 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -58,26 +58,22 @@ static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu); #define MPU401_ACK 0xfe /* Build in lowlevel io */ -static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data, - unsigned long addr) +static void mpu401_write_port(struct snd_mpu401 *mpu, unsigned char data, unsigned long addr) { outb(data, addr); } -static unsigned char mpu401_read_port(struct snd_mpu401 *mpu, - unsigned long addr) +static unsigned char mpu401_read_port(struct snd_mpu401 *mpu, unsigned long addr) { return inb(addr); } -static void mpu401_write_mmio(struct snd_mpu401 *mpu, unsigned char data, - unsigned long addr) +static void mpu401_write_mmio(struct snd_mpu401 *mpu, unsigned char data, unsigned long addr) { writeb(data, (void __iomem *)addr); } -static unsigned char mpu401_read_mmio(struct snd_mpu401 *mpu, - unsigned long addr) +static unsigned char mpu401_read_mmio(struct snd_mpu401 *mpu, unsigned long addr) { return readb((void __iomem *)addr); } @@ -90,13 +86,20 @@ static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu) mpu->read(mpu, MPU401D(mpu)); #ifdef CONFIG_SND_DEBUG if (timeout <= 0) - snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n", - mpu->read(mpu, MPU401C(mpu))); + snd_printk("cmd: clear rx timeout (status = 0x%x)\n", mpu->read(mpu, MPU401C(mpu))); #endif } -static void uart_interrupt_tx(struct snd_mpu401 *mpu) +static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) { + spin_lock(&mpu->input_lock); + if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { + snd_mpu401_uart_input_read(mpu); + } else { + snd_mpu401_uart_clear_rx(mpu); + } + spin_unlock(&mpu->input_lock); + /* ok. for better Tx performance try do some output when input is done */ if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { spin_lock(&mpu->output_lock); @@ -105,22 +108,6 @@ static void uart_interrupt_tx(struct snd_mpu401 *mpu) } } -static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) -{ - if (mpu->info_flags & MPU401_INFO_INPUT) { - spin_lock(&mpu->input_lock); - if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) - snd_mpu401_uart_input_read(mpu); - else - snd_mpu401_uart_clear_rx(mpu); - spin_unlock(&mpu->input_lock); - } - if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) - /* ok. for better Tx performance try do some output - when input is done */ - uart_interrupt_tx(mpu); -} - /** * snd_mpu401_uart_interrupt - generic MPU401-UART interrupt handler * @irq: the irq number @@ -129,8 +116,7 @@ static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) * * Processes the interrupt for MPU401-UART i/o. */ -irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct snd_mpu401 *mpu = dev_id; @@ -140,29 +126,6 @@ irqreturn_t snd_mpu401_uart_interrupt(int irq, void *dev_id, return IRQ_HANDLED; } -EXPORT_SYMBOL(snd_mpu401_uart_interrupt); - -/** - * snd_mpu401_uart_interrupt_tx - generic MPU401-UART transmit irq handler - * @irq: the irq number - * @dev_id: mpu401 instance - * @regs: the reigster - * - * Processes the interrupt for MPU401-UART output. - */ -irqreturn_t snd_mpu401_uart_interrupt_tx(int irq, void *dev_id, - struct pt_regs *regs) -{ - struct snd_mpu401 *mpu = dev_id; - - if (mpu == NULL) - return IRQ_NONE; - uart_interrupt_tx(mpu); - return IRQ_HANDLED; -} - -EXPORT_SYMBOL(snd_mpu401_uart_interrupt_tx); - /* * timer callback * reprogram the timer and call the interrupt job @@ -196,8 +159,7 @@ static void snd_mpu401_uart_add_timer (struct snd_mpu401 *mpu, int input) mpu->timer.expires = 1 + jiffies; add_timer(&mpu->timer); } - mpu->timer_invoked |= input ? MPU401_MODE_INPUT_TIMER : - MPU401_MODE_OUTPUT_TIMER; + mpu->timer_invoked |= input ? MPU401_MODE_INPUT_TIMER : MPU401_MODE_OUTPUT_TIMER; spin_unlock_irqrestore (&mpu->timer_lock, flags); } @@ -210,8 +172,7 @@ static void snd_mpu401_uart_remove_timer (struct snd_mpu401 *mpu, int input) spin_lock_irqsave (&mpu->timer_lock, flags); if (mpu->timer_invoked) { - mpu->timer_invoked &= input ? ~MPU401_MODE_INPUT_TIMER : - ~MPU401_MODE_OUTPUT_TIMER; + mpu->timer_invoked &= input ? ~MPU401_MODE_INPUT_TIMER : ~MPU401_MODE_OUTPUT_TIMER; if (! mpu->timer_invoked) del_timer(&mpu->timer); } @@ -219,12 +180,11 @@ static void snd_mpu401_uart_remove_timer (struct snd_mpu401 *mpu, int input) } /* - * send a UART command - * return zero if successful, non-zero for some errors + */ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, - int ack) + int ack) { unsigned long flags; int timeout, ok; @@ -236,13 +196,11 @@ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, } /* ok. standard MPU-401 initialization */ if (mpu->hardware != MPU401_HW_SB) { - for (timeout = 1000; timeout > 0 && - !snd_mpu401_output_ready(mpu); timeout--) + for (timeout = 1000; timeout > 0 && !snd_mpu401_output_ready(mpu); timeout--) udelay(10); #ifdef CONFIG_SND_DEBUG if (!timeout) - snd_printk(KERN_ERR "cmd: tx timeout (status = 0x%x)\n", - mpu->read(mpu, MPU401C(mpu))); + snd_printk("cmd: tx timeout (status = 0x%x)\n", mpu->read(mpu, MPU401C(mpu))); #endif } mpu->write(mpu, cmd, MPU401C(mpu)); @@ -257,14 +215,12 @@ static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, } if (!ok && mpu->read(mpu, MPU401D(mpu)) == MPU401_ACK) ok = 1; - } else + } else { ok = 1; + } spin_unlock_irqrestore(&mpu->input_lock, flags); if (!ok) { - snd_printk(KERN_ERR "cmd: 0x%x failed at 0x%lx " - "(status = 0x%x, data = 0x%x)\n", cmd, mpu->port, - mpu->read(mpu, MPU401C(mpu)), - mpu->read(mpu, MPU401D(mpu))); + snd_printk("cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)\n", cmd, mpu->port, mpu->read(mpu, MPU401C(mpu)), mpu->read(mpu, MPU401D(mpu))); return 1; } return 0; @@ -358,8 +314,7 @@ static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream) /* * trigger input callback */ -static void -snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substream, int up) +static void snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substream, int up) { unsigned long flags; struct snd_mpu401 *mpu; @@ -367,8 +322,7 @@ snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substream, int up) mpu = substream->rmidi->private_data; if (up) { - if (! test_and_set_bit(MPU401_MODE_BIT_INPUT_TRIGGER, - &mpu->mode)) { + if (! test_and_set_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode)) { /* first time - flush FIFO */ while (max-- > 0) mpu->read(mpu, MPU401D(mpu)); @@ -398,11 +352,13 @@ static void snd_mpu401_uart_input_read(struct snd_mpu401 * mpu) unsigned char byte; while (max-- > 0) { - if (! snd_mpu401_input_avail(mpu)) + if (snd_mpu401_input_avail(mpu)) { + byte = mpu->read(mpu, MPU401D(mpu)); + if (test_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode)) + snd_rawmidi_receive(mpu->substream_input, &byte, 1); + } else { break; /* input not available */ - byte = mpu->read(mpu, MPU401D(mpu)); - if (test_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode)) - snd_rawmidi_receive(mpu->substream_input, &byte, 1); + } } } @@ -424,16 +380,16 @@ static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu) int max = 256, timeout; do { - if (snd_rawmidi_transmit_peek(mpu->substream_output, - &byte, 1) == 1) { + if (snd_rawmidi_transmit_peek(mpu->substream_output, &byte, 1) == 1) { for (timeout = 100; timeout > 0; timeout--) { - if (snd_mpu401_output_ready(mpu)) + if (snd_mpu401_output_ready(mpu)) { + mpu->write(mpu, byte, MPU401D(mpu)); + snd_rawmidi_transmit_ack(mpu->substream_output, 1); break; + } } if (timeout == 0) break; /* Tx FIFO full - try again later */ - mpu->write(mpu, byte, MPU401D(mpu)); - snd_rawmidi_transmit_ack(mpu->substream_output, 1); } else { snd_mpu401_uart_remove_timer (mpu, 0); break; /* no other data - leave the tx loop */ @@ -444,8 +400,7 @@ static void snd_mpu401_uart_output_write(struct snd_mpu401 * mpu) /* * output trigger callback */ -static void -snd_mpu401_uart_output_trigger(struct snd_rawmidi_substream *substream, int up) +static void snd_mpu401_uart_output_trigger(struct snd_rawmidi_substream *substream, int up) { unsigned long flags; struct snd_mpu401 *mpu; @@ -458,16 +413,14 @@ snd_mpu401_uart_output_trigger(struct snd_rawmidi_substream *substream, int up) * since the output timer might have been removed in * snd_mpu401_uart_output_write(). */ - if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) - snd_mpu401_uart_add_timer(mpu, 0); + snd_mpu401_uart_add_timer(mpu, 0); /* output pending data */ spin_lock_irqsave(&mpu->output_lock, flags); snd_mpu401_uart_output_write(mpu); spin_unlock_irqrestore(&mpu->output_lock, flags); } else { - if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) - snd_mpu401_uart_remove_timer(mpu, 0); + snd_mpu401_uart_remove_timer(mpu, 0); clear_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode); } } @@ -505,7 +458,7 @@ static void snd_mpu401_uart_free(struct snd_rawmidi *rmidi) * @device: the device index, zero-based * @hardware: the hardware type, MPU401_HW_XXXX * @port: the base address of MPU401 port - * @info_flags: bitflags MPU401_INFO_XXX + * @integrated: non-zero if the port was already reserved by the chip * @irq: the irq number, -1 if no interrupt for mpu * @irq_flags: the irq request flags (SA_XXX), 0 if irq was already reserved. * @rrawmidi: the pointer to store the new rawmidi instance @@ -520,24 +473,17 @@ static void snd_mpu401_uart_free(struct snd_rawmidi *rmidi) */ int snd_mpu401_uart_new(struct snd_card *card, int device, unsigned short hardware, - unsigned long port, - unsigned int info_flags, + unsigned long port, int integrated, int irq, int irq_flags, struct snd_rawmidi ** rrawmidi) { struct snd_mpu401 *mpu; struct snd_rawmidi *rmidi; - int in_enable, out_enable; int err; if (rrawmidi) *rrawmidi = NULL; - if (! (info_flags & (MPU401_INFO_INPUT | MPU401_INFO_OUTPUT))) - info_flags |= MPU401_INFO_INPUT | MPU401_INFO_OUTPUT; - in_enable = (info_flags & MPU401_INFO_INPUT) ? 1 : 0; - out_enable = (info_flags & MPU401_INFO_OUTPUT) ? 1 : 0; - if ((err = snd_rawmidi_new(card, "MPU-401U", device, - out_enable, in_enable, &rmidi)) < 0) + if ((err = snd_rawmidi_new(card, "MPU-401U", device, 1, 1, &rmidi)) < 0) return err; mpu = kzalloc(sizeof(*mpu), GFP_KERNEL); if (mpu == NULL) { @@ -551,23 +497,23 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, spin_lock_init(&mpu->output_lock); spin_lock_init(&mpu->timer_lock); mpu->hardware = hardware; - if (! (info_flags & MPU401_INFO_INTEGRATED)) { + if (!integrated) { int res_size = hardware == MPU401_HW_PC98II ? 4 : 2; - mpu->res = request_region(port, res_size, "MPU401 UART"); - if (mpu->res == NULL) { - snd_printk(KERN_ERR "mpu401_uart: " - "unable to grab port 0x%lx size %d\n", - port, res_size); + if ((mpu->res = request_region(port, res_size, "MPU401 UART")) == NULL) { + snd_printk(KERN_ERR "mpu401_uart: unable to grab port 0x%lx size %d\n", port, res_size); snd_device_free(card, rmidi); return -EBUSY; } } - if (info_flags & MPU401_INFO_MMIO) { + switch (hardware) { + case MPU401_HW_AUREAL: mpu->write = mpu401_write_mmio; mpu->read = mpu401_read_mmio; - } else { + break; + default: mpu->write = mpu401_write_port; mpu->read = mpu401_read_port; + break; } mpu->port = port; if (hardware == MPU401_HW_PC98II) @@ -575,40 +521,30 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, else mpu->cport = port + 1; if (irq >= 0 && irq_flags) { - if (request_irq(irq, snd_mpu401_uart_interrupt, irq_flags, - "MPU401 UART", (void *) mpu)) { - snd_printk(KERN_ERR "mpu401_uart: " - "unable to grab IRQ %d\n", irq); + if (request_irq(irq, snd_mpu401_uart_interrupt, irq_flags, "MPU401 UART", (void *) mpu)) { + snd_printk(KERN_ERR "mpu401_uart: unable to grab IRQ %d\n", irq); snd_device_free(card, rmidi); return -EBUSY; } } - mpu->info_flags = info_flags; mpu->irq = irq; mpu->irq_flags = irq_flags; if (card->shortname[0]) - snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI", - card->shortname); + snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI", card->shortname); else - sprintf(rmidi->name, "MPU-401 MIDI %d-%d",card->number, device); - if (out_enable) { - snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, - &snd_mpu401_uart_output); - rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; - } - if (in_enable) { - snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, - &snd_mpu401_uart_input); - rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; - if (out_enable) - rmidi->info_flags |= SNDRV_RAWMIDI_INFO_DUPLEX; - } + sprintf(rmidi->name, "MPU-401 MIDI %d-%d", card->number, device); + snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_mpu401_uart_output); + snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_mpu401_uart_input); + rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | + SNDRV_RAWMIDI_INFO_INPUT | + SNDRV_RAWMIDI_INFO_DUPLEX; mpu->rmidi = rmidi; if (rrawmidi) *rrawmidi = rmidi; return 0; } +EXPORT_SYMBOL(snd_mpu401_uart_interrupt); EXPORT_SYMBOL(snd_mpu401_uart_new); /* diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index e064d6c56..b7a0b4281 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -590,7 +590,7 @@ static int __init snd_mtpav_get_ISA(struct mtpav * mcard) return -EBUSY; } mcard->port = port; - if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) { + if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", mcard)) { snd_printk("MTVAP IRQ %d busy\n", irq); return -EBUSY; } @@ -770,15 +770,11 @@ static int __init alsa_card_mtpav_init(void) return err; device = platform_device_register_simple(SND_MTPAV_DRIVER, -1, NULL, 0); - if (!IS_ERR(device)) { - if (platform_get_drvdata(device)) - return 0; - platform_device_unregister(device); - err = -ENODEV; - } else - err = PTR_ERR(device); - platform_driver_unregister(&snd_mtpav_driver); - return err; + if (IS_ERR(device)) { + platform_driver_unregister(&snd_mtpav_driver); + return PTR_ERR(device); + } + return 0; } static void __exit alsa_card_mtpav_exit(void) diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 87fe376f3..4f8556976 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -316,8 +316,6 @@ void snd_opl3_interrupt(struct snd_hwdep * hw) } } -EXPORT_SYMBOL(snd_opl3_interrupt); - /* */ @@ -371,8 +369,6 @@ int snd_opl3_new(struct snd_card *card, return 0; } -EXPORT_SYMBOL(snd_opl3_new); - int snd_opl3_init(struct snd_opl3 *opl3) { if (! opl3->command) { @@ -397,8 +393,6 @@ int snd_opl3_init(struct snd_opl3 *opl3) return 0; } -EXPORT_SYMBOL(snd_opl3_init); - int snd_opl3_create(struct snd_card *card, unsigned long l_port, unsigned long r_port, @@ -457,8 +451,6 @@ int snd_opl3_create(struct snd_card *card, return 0; } -EXPORT_SYMBOL(snd_opl3_create); - int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev) { int err; @@ -476,8 +468,6 @@ int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev) return 0; } -EXPORT_SYMBOL(snd_opl3_timer_new); - int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device, struct snd_hwdep ** rhwdep) @@ -536,8 +526,17 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3, return 0; } +EXPORT_SYMBOL(snd_opl3_interrupt); +EXPORT_SYMBOL(snd_opl3_new); +EXPORT_SYMBOL(snd_opl3_init); +EXPORT_SYMBOL(snd_opl3_create); +EXPORT_SYMBOL(snd_opl3_timer_new); EXPORT_SYMBOL(snd_opl3_hwdep_new); +/* opl3_synth.c */ +EXPORT_SYMBOL(snd_opl3_regmap); +EXPORT_SYMBOL(snd_opl3_reset); + /* * INIT part */ diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c index 5fd3a4c95..fccf019a6 100644 --- a/sound/drivers/opl3/opl3_oss.c +++ b/sound/drivers/opl3/opl3_oss.c @@ -100,8 +100,7 @@ static int snd_opl3_oss_create_port(struct snd_opl3 * opl3) SNDRV_SEQ_PORT_CAP_WRITE, SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | SNDRV_SEQ_PORT_TYPE_MIDI_GM | - SNDRV_SEQ_PORT_TYPE_HARDWARE | - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, + SNDRV_SEQ_PORT_TYPE_SYNTH, voices, voices, name); if (opl3->oss_chset->port < 0) { diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c index 96762c9d4..57becf34f 100644 --- a/sound/drivers/opl3/opl3_seq.c +++ b/sound/drivers/opl3/opl3_seq.c @@ -203,9 +203,7 @@ static int snd_opl3_synth_create_port(struct snd_opl3 * opl3) SNDRV_SEQ_PORT_CAP_SUBS_WRITE, SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | SNDRV_SEQ_PORT_TYPE_MIDI_GM | - SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE | - SNDRV_SEQ_PORT_TYPE_HARDWARE | - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, + SNDRV_SEQ_PORT_TYPE_SYNTH, 16, voices, name); if (opl3->chset->port < 0) { diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index a4b3543a7..6db503f02 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -58,8 +58,6 @@ char snd_opl3_regmap[MAX_OPL2_VOICES][4] = { 0x12, 0x15, 0x00, 0x00 } /* is selected (only left reg block) */ }; -EXPORT_SYMBOL(snd_opl3_regmap); - /* * prototypes */ @@ -230,7 +228,6 @@ void snd_opl3_reset(struct snd_opl3 * opl3) opl3->rhythm = 0; } -EXPORT_SYMBOL(snd_opl3_reset); static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note) { @@ -448,4 +445,3 @@ static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection) return 0; } - diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index 01997f24c..4bc860ae0 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -43,8 +43,6 @@ void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value) outb(value, opl4->pcm_port + 1); } -EXPORT_SYMBOL(snd_opl4_write); - u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg) { snd_opl4_wait(opl4); @@ -54,8 +52,6 @@ u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg) return inb(opl4->pcm_port + 1); } -EXPORT_SYMBOL(snd_opl4_read); - void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size) { unsigned long flags; @@ -80,8 +76,6 @@ void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size spin_unlock_irqrestore(&opl4->reg_lock, flags); } -EXPORT_SYMBOL(snd_opl4_read_memory); - void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size) { unsigned long flags; @@ -106,8 +100,6 @@ void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, i spin_unlock_irqrestore(&opl4->reg_lock, flags); } -EXPORT_SYMBOL(snd_opl4_write_memory); - static void snd_opl4_enable_opl4(struct snd_opl4 *opl4) { outb(OPL3_REG_MODE, opl4->fm_port + 2); @@ -264,6 +256,10 @@ int snd_opl4_create(struct snd_card *card, return 0; } +EXPORT_SYMBOL(snd_opl4_write); +EXPORT_SYMBOL(snd_opl4_read); +EXPORT_SYMBOL(snd_opl4_write_memory); +EXPORT_SYMBOL(snd_opl4_read_memory); EXPORT_SYMBOL(snd_opl4_create); static int __init alsa_opl4_init(void) diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c index 43d8a2bdd..dc0dcdc6c 100644 --- a/sound/drivers/opl4/opl4_seq.c +++ b/sound/drivers/opl4/opl4_seq.c @@ -164,9 +164,7 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev) SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE, SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | - SNDRV_SEQ_PORT_TYPE_MIDI_GM | - SNDRV_SEQ_PORT_TYPE_HARDWARE | - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, + SNDRV_SEQ_PORT_TYPE_MIDI_GM, 16, 24, "OPL4 Wavetable Port"); if (opl4->chset->port < 0) { diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index 52afb4bd2..c01b4c511 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -795,7 +795,7 @@ static int __init snd_uart16550_create(struct snd_card *card, if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { if (request_irq(irq, snd_uart16550_interrupt, - IRQF_DISABLED, "Serial MIDI", (void *) uart)) { + SA_INTERRUPT, "Serial MIDI", (void *) uart)) { snd_printk("irq %d busy. Using Polling.\n", irq); } else { uart->irq = irq; @@ -998,10 +998,6 @@ static int __init alsa_card_serial_init(void) i, NULL, 0); if (IS_ERR(device)) continue; - if (!platform_get_drvdata(device)) { - platform_device_unregister(device); - continue; - } devices[i] = device; cards++; } diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index 59171f820..26eb2499d 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -171,10 +171,6 @@ static int __init alsa_card_virmidi_init(void) i, NULL, 0); if (IS_ERR(device)) continue; - if (!platform_get_drvdata(device)) { - platform_device_unregister(device); - continue; - } devices[i] = device; cards++; } diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index a60168268..fa4a2b5c2 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -70,8 +70,6 @@ int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int t return -EIO; } -EXPORT_SYMBOL(snd_vx_check_reg_bit); - /* * vx_send_irq_dsp - set command irq bit * @num: the requested IRQ type, IRQ_XXX @@ -467,8 +465,6 @@ int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot) return 0; } -EXPORT_SYMBOL(snd_vx_load_boot_image); - /* * vx_test_irq_src - query the source of interrupts * @@ -549,7 +545,6 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) return IRQ_HANDLED; } -EXPORT_SYMBOL(snd_vx_irq_handler); /* */ @@ -640,7 +635,7 @@ static void vx_proc_init(struct vx_core *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "vx-status", &entry)) - snd_info_set_text_ops(entry, chip, vx_proc_read); + snd_info_set_text_ops(entry, chip, 1024, vx_proc_read); } @@ -662,8 +657,6 @@ int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot) return 0; } -EXPORT_SYMBOL(snd_vx_dsp_boot); - /** * snd_vx_dsp_load - load the DSP image */ @@ -712,8 +705,6 @@ int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp) return 0; } -EXPORT_SYMBOL(snd_vx_dsp_load); - #ifdef CONFIG_PM /* * suspend @@ -730,8 +721,6 @@ int snd_vx_suspend(struct vx_core *chip, pm_message_t state) return 0; } -EXPORT_SYMBOL(snd_vx_suspend); - /* * resume */ @@ -758,7 +747,6 @@ int snd_vx_resume(struct vx_core *chip) return 0; } -EXPORT_SYMBOL(snd_vx_resume); #endif /** @@ -802,8 +790,6 @@ struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw, return chip; } -EXPORT_SYMBOL(snd_vx_create); - /* * module entries */ @@ -818,3 +804,19 @@ static void __exit alsa_vx_core_exit(void) module_init(alsa_vx_core_init) module_exit(alsa_vx_core_exit) + +/* + * exports + */ +EXPORT_SYMBOL(snd_vx_check_reg_bit); +EXPORT_SYMBOL(snd_vx_create); +EXPORT_SYMBOL(snd_vx_setup_firmware); +EXPORT_SYMBOL(snd_vx_free_firmware); +EXPORT_SYMBOL(snd_vx_irq_handler); +EXPORT_SYMBOL(snd_vx_dsp_boot); +EXPORT_SYMBOL(snd_vx_dsp_load); +EXPORT_SYMBOL(snd_vx_load_boot_image); +#ifdef CONFIG_PM +EXPORT_SYMBOL(snd_vx_suspend); +EXPORT_SYMBOL(snd_vx_resume); +#endif diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index e1920af45..d837783fb 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c @@ -250,6 +250,3 @@ void snd_vx_free_firmware(struct vx_core *chip) } #endif /* SND_VX_FW_LOADER */ - -EXPORT_SYMBOL(snd_vx_setup_firmware); -EXPORT_SYMBOL(snd_vx_free_firmware); diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 7e65a103f..c4af84995 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -1252,15 +1252,18 @@ static int vx_init_audio_io(struct vx_core *chip) chip->audio_info = rmh.Stat[1]; /* allocate pipes */ - chip->playback_pipes = kcalloc(chip->audio_outs, sizeof(struct vx_pipe *), GFP_KERNEL); + chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); if (!chip->playback_pipes) return -ENOMEM; - chip->capture_pipes = kcalloc(chip->audio_ins, sizeof(struct vx_pipe *), GFP_KERNEL); + chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); if (!chip->capture_pipes) { kfree(chip->playback_pipes); return -ENOMEM; } + memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); + memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); + preferred = chip->ibl.size; chip->ibl.size = 0; vx_set_ibl(chip, &chip->ibl); /* query the info */ diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c index 64388cb8d..cb89f7eb9 100644 --- a/sound/i2c/cs8427.c +++ b/sound/i2c/cs8427.c @@ -76,28 +76,23 @@ int snd_cs8427_reg_write(struct snd_i2c_device *device, unsigned char reg, buf[0] = reg & 0x7f; buf[1] = val; if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) { - snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x " - "to CS8427 (%i)\n", buf[0], buf[1], err); + snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err); return err < 0 ? err : -EIO; } return 0; } -EXPORT_SYMBOL(snd_cs8427_reg_write); - static int snd_cs8427_reg_read(struct snd_i2c_device *device, unsigned char reg) { int err; unsigned char buf; if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { - snd_printk(KERN_ERR "unable to send register 0x%x byte " - "to CS8427\n", reg); + snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); return err < 0 ? err : -EIO; } if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) { - snd_printk(KERN_ERR "unable to read register 0x%x byte " - "from CS8427\n", reg); + snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg); return err < 0 ? err : -EIO; } return buf; @@ -126,8 +121,7 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, int count) { struct cs8427 *chip = device->private_data; - char *hw_data = udata ? - chip->playback.hw_udata : chip->playback.hw_status; + char *hw_data = udata ? chip->playback.hw_udata : chip->playback.hw_status; char data[32]; int err, idx; @@ -140,11 +134,11 @@ static int snd_cs8427_send_corudata(struct snd_i2c_device *device, memset(data, 0, sizeof(data)); if (memcmp(hw_data, data, count) == 0) { chip->regmap[CS8427_REG_UDATABUF] &= ~CS8427_UBMMASK; - chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | - CS8427_EFTUI; - err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, - chip->regmap[CS8427_REG_UDATABUF]); - return err < 0 ? err : 0; + chip->regmap[CS8427_REG_UDATABUF] |= CS8427_UBMZEROS | CS8427_EFTUI; + if ((err = snd_cs8427_reg_write(device, CS8427_REG_UDATABUF, + chip->regmap[CS8427_REG_UDATABUF])) < 0) + return err; + return 0; } } data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF; @@ -167,32 +161,24 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, { static unsigned char initvals1[] = { CS8427_REG_CONTROL1 | CS8427_REG_AUTOINC, - /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, - TCBL=output */ + /* CS8427_REG_CONTROL1: RMCK to OMCK, valid PCM audio, disable mutes, TCBL=output */ CS8427_SWCLK | CS8427_TCBLDIR, - /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, - normal stereo operation */ + /* CS8427_REG_CONTROL2: hold last valid audio sample, RMCK=256*Fs, normal stereo operation */ 0x00, - /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, - Rx=>serial */ + /* CS8427_REG_DATAFLOW: output drivers normal operation, Tx<=serial, Rx=>serial */ CS8427_TXDSERIAL | CS8427_SPDAES3RECEIVER, - /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, - output time base = OMCK, input time base = recovered input clock, - recovered input clock source is ILRCK changed to AES3INPUT - (workaround, see snd_cs8427_reset) */ + /* CS8427_REG_CLOCKSOURCE: Run off, CMCK=256*Fs, output time base = OMCK, input time base = + recovered input clock, recovered input clock source is ILRCK changed to AES3INPUT (workaround, see snd_cs8427_reset) */ CS8427_RXDILRCK, - /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, - 24-bit, 64*Fsi */ + /* CS8427_REG_SERIALINPUT: Serial audio input port data format = I2S, 24-bit, 64*Fsi */ CS8427_SIDEL | CS8427_SILRPOL, - /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format - = I2S, 24-bit, 64*Fsi */ + /* CS8427_REG_SERIALOUTPUT: Serial audio output port data format = I2S, 24-bit, 64*Fsi */ CS8427_SODEL | CS8427_SOLRPOL, }; static unsigned char initvals2[] = { CS8427_REG_RECVERRMASK | CS8427_REG_AUTOINC, - /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, - biphase, parity status bits */ - /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR,*/ + /* CS8427_REG_RECVERRMASK: unmask the input PLL clock, V, confidence, biphase, parity status bits */ + /* CS8427_UNLOCK | CS8427_V | CS8427_CONF | CS8427_BIP | CS8427_PAR, */ 0xff, /* set everything */ /* CS8427_REG_CSDATABUF: Registers 32-55 window to CS buffer @@ -215,8 +201,7 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, struct snd_i2c_device *device; unsigned char buf[24]; - if ((err = snd_i2c_device_create(bus, "CS8427", - CS8427_ADDR | (addr & 7), + if ((err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), &device)) < 0) return err; chip = device->private_data = kzalloc(sizeof(*chip), GFP_KERNEL); @@ -227,8 +212,8 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, device->private_free = snd_cs8427_free; snd_i2c_lock(bus); - err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER); - if (err != CS8427_VER8427A) { + if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != + CS8427_VER8427A) { snd_i2c_unlock(bus); snd_printk(KERN_ERR "unable to find CS8427 signature " "(expected 0x%x, read 0x%x),\n", @@ -237,8 +222,7 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, return -EFAULT; } /* turn off run bit while making changes to configuration */ - err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00); - if (err < 0) + if ((err = snd_cs8427_reg_write(device, CS8427_REG_CLOCKSOURCE, 0x00)) < 0) goto __fail; /* send initial values */ memcpy(chip->regmap + (initvals1[0] & 0x7f), initvals1 + 1, 6); @@ -298,8 +282,6 @@ int snd_cs8427_create(struct snd_i2c_bus *bus, return err < 0 ? err : -EIO; } -EXPORT_SYMBOL(snd_cs8427_create); - /* * Reset the chip using run bit, also lock PLL using ILRCK and * put back AES3INPUT. This workaround is described in latest @@ -314,8 +296,7 @@ static void snd_cs8427_reset(struct snd_i2c_device *cs8427) snd_assert(cs8427, return); chip = cs8427->private_data; snd_i2c_lock(cs8427->bus); - if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == - CS8427_RXDAES3INPUT) /* AES3 bit is set */ + if ((chip->regmap[CS8427_REG_CLOCKSOURCE] & CS8427_RXDAES3INPUT) == CS8427_RXDAES3INPUT) /* AES3 bit is set */ aes3input = 1; chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~(CS8427_RUN | CS8427_RXDMASK); snd_cs8427_reg_write(cs8427, CS8427_REG_CLOCKSOURCE, @@ -386,15 +367,12 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, snd_i2c_lock(device->bus); if ((err = snd_i2c_sendbytes(device, ®, 1)) != 1) { - snd_printk(KERN_ERR "unable to send register 0x%x byte " - "to CS8427\n", reg); + snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg); snd_i2c_unlock(device->bus); return err < 0 ? err : -EIO; } - err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10); - if (err != 10) { - snd_printk(KERN_ERR "unable to read Q-subcode bytes " - "from CS8427\n"); + if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) { + snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n"); snd_i2c_unlock(device->bus); return err < 0 ? err : -EIO; } @@ -402,8 +380,7 @@ static int snd_cs8427_qsubcode_get(struct snd_kcontrol *kcontrol, return 0; } -static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int snd_cs8427_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; uinfo->count = 1; @@ -436,8 +413,7 @@ static int snd_cs8427_spdif_put(struct snd_kcontrol *kcontrol, snd_i2c_lock(device->bus); change = memcmp(ucontrol->value.iec958.status, status, 24) != 0; memcpy(status, ucontrol->value.iec958.status, 24); - if (change && (kcontrol->private_value ? - runtime != NULL : runtime == NULL)) { + if (change && (kcontrol->private_value ? runtime != NULL : runtime == NULL)) { err = snd_cs8427_send_corudata(device, 0, status, 24); if (err < 0) change = err; @@ -466,8 +442,7 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .info = snd_cs8427_in_status_info, .name = "IEC958 CS8427 Input Status", - .access = (SNDRV_CTL_ELEM_ACCESS_READ | - SNDRV_CTL_ELEM_ACCESS_VOLATILE), + .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .get = snd_cs8427_in_status_get, .private_value = 15, }, @@ -475,8 +450,7 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .info = snd_cs8427_in_status_info, .name = "IEC958 CS8427 Error Status", - .access = (SNDRV_CTL_ELEM_ACCESS_READ | - SNDRV_CTL_ELEM_ACCESS_VOLATILE), + .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .get = snd_cs8427_in_status_get, .private_value = 16, }, @@ -496,8 +470,7 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { .private_value = 0 }, { - .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | - SNDRV_CTL_ELEM_ACCESS_INACTIVE), + .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), .info = snd_cs8427_spdif_info, @@ -509,8 +482,7 @@ static struct snd_kcontrol_new snd_cs8427_iec958_controls[] = { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .info = snd_cs8427_qsubcode_info, .name = "IEC958 Q-subcode Capture Default", - .access = (SNDRV_CTL_ELEM_ACCESS_READ | - SNDRV_CTL_ELEM_ACCESS_VOLATILE), + .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .get = snd_cs8427_qsubcode_get }}; @@ -533,8 +505,7 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, err = snd_ctl_add(cs8427->bus->card, kctl); if (err < 0) return err; - if (! strcmp(kctl->id.name, - SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM))) + if (!strcmp(kctl->id.name, SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM))) chip->playback.pcm_ctl = kctl; } @@ -544,8 +515,6 @@ int snd_cs8427_iec958_build(struct snd_i2c_device *cs8427, return 0; } -EXPORT_SYMBOL(snd_cs8427_iec958_build); - int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) { struct cs8427 *chip; @@ -553,17 +522,13 @@ int snd_cs8427_iec958_active(struct snd_i2c_device *cs8427, int active) snd_assert(cs8427, return -ENXIO); chip = cs8427->private_data; if (active) - memcpy(chip->playback.pcm_status, - chip->playback.def_status, 24); + memcpy(chip->playback.pcm_status, chip->playback.def_status, 24); chip->playback.pcm_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; - snd_ctl_notify(cs8427->bus->card, - SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, - &chip->playback.pcm_ctl->id); + snd_ctl_notify(cs8427->bus->card, SNDRV_CTL_EVENT_MASK_VALUE | + SNDRV_CTL_EVENT_MASK_INFO, &chip->playback.pcm_ctl->id); return 0; } -EXPORT_SYMBOL(snd_cs8427_iec958_active); - int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) { struct cs8427 *chip; @@ -603,8 +568,6 @@ int snd_cs8427_iec958_pcm(struct snd_i2c_device *cs8427, unsigned int rate) return err < 0 ? err : 0; } -EXPORT_SYMBOL(snd_cs8427_iec958_pcm); - static int __init alsa_cs8427_module_init(void) { return 0; @@ -616,3 +579,10 @@ static void __exit alsa_cs8427_module_exit(void) module_init(alsa_cs8427_module_init) module_exit(alsa_cs8427_module_exit) + +EXPORT_SYMBOL(snd_cs8427_create); +EXPORT_SYMBOL(snd_cs8427_reset); +EXPORT_SYMBOL(snd_cs8427_reg_write); +EXPORT_SYMBOL(snd_cs8427_iec958_build); +EXPORT_SYMBOL(snd_cs8427_iec958_active); +EXPORT_SYMBOL(snd_cs8427_iec958_pcm); diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c index b60fb1892..edfe76fb0 100644 --- a/sound/i2c/i2c.c +++ b/sound/i2c/i2c.c @@ -106,8 +106,6 @@ int snd_i2c_bus_create(struct snd_card *card, const char *name, return 0; } -EXPORT_SYMBOL(snd_i2c_bus_create); - int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, unsigned char addr, struct snd_i2c_device **rdevice) { @@ -126,8 +124,6 @@ int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name, return 0; } -EXPORT_SYMBOL(snd_i2c_device_create); - int snd_i2c_device_free(struct snd_i2c_device *device) { if (device->bus) @@ -138,29 +134,22 @@ int snd_i2c_device_free(struct snd_i2c_device *device) return 0; } -EXPORT_SYMBOL(snd_i2c_device_free); - int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { return device->bus->ops->sendbytes(device, bytes, count); } -EXPORT_SYMBOL(snd_i2c_sendbytes); int snd_i2c_readbytes(struct snd_i2c_device *device, unsigned char *bytes, int count) { return device->bus->ops->readbytes(device, bytes, count); } -EXPORT_SYMBOL(snd_i2c_readbytes); - int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr) { return bus->ops->probeaddr(bus, addr); } -EXPORT_SYMBOL(snd_i2c_probeaddr); - /* * bit-operations */ @@ -331,6 +320,12 @@ static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus, unsigned short addr) return err; } +EXPORT_SYMBOL(snd_i2c_bus_create); +EXPORT_SYMBOL(snd_i2c_device_create); +EXPORT_SYMBOL(snd_i2c_device_free); +EXPORT_SYMBOL(snd_i2c_sendbytes); +EXPORT_SYMBOL(snd_i2c_readbytes); +EXPORT_SYMBOL(snd_i2c_probeaddr); static int __init alsa_i2c_init(void) { diff --git a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c index b074fddde..746500e06 100644 --- a/sound/i2c/l3/uda1341.c +++ b/sound/i2c/l3/uda1341.c @@ -517,9 +517,9 @@ static void __devinit snd_uda1341_proc_init(struct snd_card *card, struct l3_cli struct snd_info_entry *entry; if (! snd_card_proc_new(card, "uda1341", &entry)) - snd_info_set_text_ops(entry, clnt, snd_uda1341_proc_read); + snd_info_set_text_ops(entry, clnt, 1024, snd_uda1341_proc_read); if (! snd_card_proc_new(card, "uda1341-regs", &entry)) - snd_info_set_text_ops(entry, clnt, snd_uda1341_proc_regs_read); + snd_info_set_text_ops(entry, clnt, 1024, snd_uda1341_proc_regs_read); } /* }}} */ diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index dc7cc2001..045e32a31 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c @@ -34,8 +34,7 @@ MODULE_AUTHOR("Jaroslav Kysela , Takashi Iwai "); MODULE_DESCRIPTION("Routines for control of AK452x / AK43xx AD/DA converters"); MODULE_LICENSE("GPL"); -void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, - unsigned char val) +void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, unsigned char val) { ak->ops.lock(ak, chip); ak->ops.write(ak, chip, reg, val); @@ -53,67 +52,6 @@ void snd_akm4xxx_write(struct snd_akm4xxx *ak, int chip, unsigned char reg, ak->ops.unlock(ak, chip); } -EXPORT_SYMBOL(snd_akm4xxx_write); - -/* reset procedure for AK4524 and AK4528 */ -static void ak4524_reset(struct snd_akm4xxx *ak, int state) -{ - unsigned int chip; - unsigned char reg, maxreg; - - if (ak->type == SND_AK4528) - maxreg = 0x06; - else - maxreg = 0x08; - for (chip = 0; chip < ak->num_dacs/2; chip++) { - snd_akm4xxx_write(ak, chip, 0x01, state ? 0x00 : 0x03); - if (state) - continue; - /* DAC volumes */ - for (reg = 0x04; reg < maxreg; reg++) - snd_akm4xxx_write(ak, chip, reg, - snd_akm4xxx_get(ak, chip, reg)); - if (ak->type == SND_AK4528) - continue; - /* IPGA */ - for (reg = 0x04; reg < 0x06; reg++) - snd_akm4xxx_write(ak, chip, reg, - snd_akm4xxx_get_ipga(ak, chip, reg)); - } -} - -/* reset procedure for AK4355 and AK4358 */ -static void ak4355_reset(struct snd_akm4xxx *ak, int state) -{ - unsigned char reg; - - if (state) { - snd_akm4xxx_write(ak, 0, 0x01, 0x02); /* reset and soft-mute */ - return; - } - for (reg = 0x00; reg < 0x0b; reg++) - if (reg != 0x01) - snd_akm4xxx_write(ak, 0, reg, - snd_akm4xxx_get(ak, 0, reg)); - snd_akm4xxx_write(ak, 0, 0x01, 0x01); /* un-reset, unmute */ -} - -/* reset procedure for AK4381 */ -static void ak4381_reset(struct snd_akm4xxx *ak, int state) -{ - unsigned int chip; - unsigned char reg; - - for (chip = 0; chip < ak->num_dacs/2; chip++) { - snd_akm4xxx_write(ak, chip, 0x00, state ? 0x0c : 0x0f); - if (state) - continue; - for (reg = 0x01; reg < 0x05; reg++) - snd_akm4xxx_write(ak, chip, reg, - snd_akm4xxx_get(ak, chip, reg)); - } -} - /* * reset the AKM codecs * @state: 1 = reset codec, 0 = restore the registers @@ -122,26 +60,52 @@ static void ak4381_reset(struct snd_akm4xxx *ak, int state) */ void snd_akm4xxx_reset(struct snd_akm4xxx *ak, int state) { + unsigned int chip; + unsigned char reg; + switch (ak->type) { case SND_AK4524: case SND_AK4528: - ak4524_reset(ak, state); + for (chip = 0; chip < ak->num_dacs/2; chip++) { + snd_akm4xxx_write(ak, chip, 0x01, state ? 0x00 : 0x03); + if (state) + continue; + /* DAC volumes */ + for (reg = 0x04; reg < (ak->type == SND_AK4528 ? 0x06 : 0x08); reg++) + snd_akm4xxx_write(ak, chip, reg, snd_akm4xxx_get(ak, chip, reg)); + if (ak->type == SND_AK4528) + continue; + /* IPGA */ + for (reg = 0x04; reg < 0x06; reg++) + snd_akm4xxx_write(ak, chip, reg, snd_akm4xxx_get_ipga(ak, chip, reg)); + } break; case SND_AK4529: /* FIXME: needed for ak4529? */ break; case SND_AK4355: case SND_AK4358: - ak4355_reset(ak, state); + if (state) { + snd_akm4xxx_write(ak, 0, 0x01, 0x02); /* reset and soft-mute */ + return; + } + for (reg = 0x00; reg < 0x0b; reg++) + if (reg != 0x01) + snd_akm4xxx_write(ak, 0, reg, snd_akm4xxx_get(ak, 0, reg)); + snd_akm4xxx_write(ak, 0, 0x01, 0x01); /* un-reset, unmute */ break; case SND_AK4381: - ak4381_reset(ak, state); + for (chip = 0; chip < ak->num_dacs/2; chip++) { + snd_akm4xxx_write(ak, chip, 0x00, state ? 0x0c : 0x0f); + if (state) + continue; + for (reg = 0x01; reg < 0x05; reg++) + snd_akm4xxx_write(ak, chip, reg, snd_akm4xxx_get(ak, chip, reg)); + } break; } } -EXPORT_SYMBOL(snd_akm4xxx_reset); - /* * initialize all the ak4xxx chips */ @@ -189,8 +153,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak) }; static unsigned char inits_ak4355[] = { 0x01, 0x02, /* 1: reset and soft-mute */ - 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, - * disable DZF, sharp roll-off, RSTN#=0 */ + 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, disable DZF, sharp roll-off, RSTN#=0 */ 0x02, 0x0e, /* 2: DA's power up, normal speed, RSTN#=0 */ // 0x02, 0x2e, /* quad speed */ 0x03, 0x01, /* 3: de-emphasis off */ @@ -206,8 +169,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak) }; static unsigned char inits_ak4358[] = { 0x01, 0x02, /* 1: reset and soft-mute */ - 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, - * disable DZF, sharp roll-off, RSTN#=0 */ + 0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, disable DZF, sharp roll-off, RSTN#=0 */ 0x02, 0x0e, /* 2: DA's power up, normal speed, RSTN#=0 */ // 0x02, 0x2e, /* quad speed */ 0x03, 0x01, /* 3: de-emphasis off */ @@ -225,8 +187,7 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak) }; static unsigned char inits_ak4381[] = { 0x00, 0x0c, /* 0: mode3(i2s), disable auto-clock detect */ - 0x01, 0x02, /* 1: de-emphasis off, normal speed, - * sharp roll-off, DZF off */ + 0x01, 0x02, /* 1: de-emphasis off, normal speed, sharp roll-off, DZF off */ // 0x01, 0x12, /* quad speed */ 0x02, 0x00, /* 2: DZF disabled */ 0x03, 0x00, /* 3: LATT 0 */ @@ -278,15 +239,12 @@ void snd_akm4xxx_init(struct snd_akm4xxx *ak) } } -EXPORT_SYMBOL(snd_akm4xxx_init); - #define AK_GET_CHIP(val) (((val) >> 8) & 0xff) #define AK_GET_ADDR(val) ((val) & 0xff) #define AK_GET_SHIFT(val) (((val) >> 16) & 0x7f) #define AK_GET_INVERT(val) (((val) >> 23) & 1) #define AK_GET_MASK(val) (((val) >> 24) & 0xff) -#define AK_COMPOSE(chip,addr,shift,mask) \ - (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24)) +#define AK_COMPOSE(chip,addr,shift,mask) (((chip) << 8) | (addr) | ((shift) << 16) | ((mask) << 24)) #define AK_INVERT (1<<23) static int snd_akm4xxx_volume_info(struct snd_kcontrol *kcontrol, @@ -334,64 +292,6 @@ static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol, return change; } -static int snd_akm4xxx_stereo_volume_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - unsigned int mask = AK_GET_MASK(kcontrol->private_value); - - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = mask; - return 0; -} - -static int snd_akm4xxx_stereo_volume_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); - int chip = AK_GET_CHIP(kcontrol->private_value); - int addr = AK_GET_ADDR(kcontrol->private_value); - int invert = AK_GET_INVERT(kcontrol->private_value); - unsigned int mask = AK_GET_MASK(kcontrol->private_value); - unsigned char val = snd_akm4xxx_get(ak, chip, addr); - - ucontrol->value.integer.value[0] = invert ? mask - val : val; - - val = snd_akm4xxx_get(ak, chip, addr+1); - ucontrol->value.integer.value[1] = invert ? mask - val : val; - - return 0; -} - -static int snd_akm4xxx_stereo_volume_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); - int chip = AK_GET_CHIP(kcontrol->private_value); - int addr = AK_GET_ADDR(kcontrol->private_value); - int invert = AK_GET_INVERT(kcontrol->private_value); - unsigned int mask = AK_GET_MASK(kcontrol->private_value); - unsigned char nval = ucontrol->value.integer.value[0] % (mask+1); - int change0, change1; - - if (invert) - nval = mask - nval; - change0 = snd_akm4xxx_get(ak, chip, addr) != nval; - if (change0) - snd_akm4xxx_write(ak, chip, addr, nval); - - nval = ucontrol->value.integer.value[1] % (mask+1); - if (invert) - nval = mask - nval; - change1 = snd_akm4xxx_get(ak, chip, addr+1) != nval; - if (change1) - snd_akm4xxx_write(ak, chip, addr+1, nval); - - - return change0 || change1; -} - static int snd_akm4xxx_ipga_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { @@ -408,8 +308,7 @@ static int snd_akm4xxx_ipga_gain_get(struct snd_kcontrol *kcontrol, struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); - ucontrol->value.integer.value[0] = - snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f; + ucontrol->value.integer.value[0] = snd_akm4xxx_get_ipga(ak, chip, addr) & 0x7f; return 0; } @@ -437,8 +336,7 @@ static int snd_akm4xxx_deemphasis_info(struct snd_kcontrol *kcontrol, uinfo->value.enumerated.items = 4; if (uinfo->value.enumerated.item >= 4) uinfo->value.enumerated.item = 3; - strcpy(uinfo->value.enumerated.name, - texts[uinfo->value.enumerated.item]); + strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); return 0; } @@ -449,8 +347,7 @@ static int snd_akm4xxx_deemphasis_get(struct snd_kcontrol *kcontrol, int chip = AK_GET_CHIP(kcontrol->private_value); int addr = AK_GET_ADDR(kcontrol->private_value); int shift = AK_GET_SHIFT(kcontrol->private_value); - ucontrol->value.enumerated.item[0] = - (snd_akm4xxx_get(ak, chip, addr) >> shift) & 3; + ucontrol->value.enumerated.item[0] = (snd_akm4xxx_get(ak, chip, addr) >> shift) & 3; return 0; } @@ -464,8 +361,7 @@ static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol, unsigned char nval = ucontrol->value.enumerated.item[0] & 3; int change; - nval = (nval << shift) | - (snd_akm4xxx_get(ak, chip, addr) & ~(3 << shift)); + nval = (nval << shift) | (snd_akm4xxx_get(ak, chip, addr) & ~(3 << shift)); change = snd_akm4xxx_get(ak, chip, addr) != nval; if (change) snd_akm4xxx_write(ak, chip, addr, nval); @@ -481,86 +377,51 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) unsigned int idx, num_emphs; struct snd_kcontrol *ctl; int err; - int mixer_ch = 0; - int num_stereo; ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); if (! ctl) return -ENOMEM; - for (idx = 0; idx < ak->num_dacs; ) { + for (idx = 0; idx < ak->num_dacs; ++idx) { memset(ctl, 0, sizeof(*ctl)); - if (ak->channel_names == NULL) { - strcpy(ctl->id.name, "DAC Volume"); - num_stereo = 1; - ctl->id.index = mixer_ch + ak->idx_offset * 2; - } else { - strcpy(ctl->id.name, ak->channel_names[mixer_ch]); - num_stereo = ak->num_stereo[mixer_ch]; - ctl->id.index = 0; - } + strcpy(ctl->id.name, "DAC Volume"); + ctl->id.index = idx + ak->idx_offset * 2; ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; ctl->count = 1; - if (num_stereo == 2) { - ctl->info = snd_akm4xxx_stereo_volume_info; - ctl->get = snd_akm4xxx_stereo_volume_get; - ctl->put = snd_akm4xxx_stereo_volume_put; - } else { - ctl->info = snd_akm4xxx_volume_info; - ctl->get = snd_akm4xxx_volume_get; - ctl->put = snd_akm4xxx_volume_put; - } + ctl->info = snd_akm4xxx_volume_info; + ctl->get = snd_akm4xxx_volume_get; + ctl->put = snd_akm4xxx_volume_put; switch (ak->type) { case SND_AK4524: - /* register 6 & 7 */ - ctl->private_value = - AK_COMPOSE(idx/2, (idx%2) + 6, 0, 127); + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 6, 0, 127); /* register 6 & 7 */ break; case SND_AK4528: - /* register 4 & 5 */ - ctl->private_value = - AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ break; case SND_AK4529: { - /* registers 2-7 and b,c */ - int val = idx < 6 ? idx + 2 : (idx - 6) + 0xb; - ctl->private_value = - AK_COMPOSE(0, val, 0, 255) | AK_INVERT; + int val = idx < 6 ? idx + 2 : (idx - 6) + 0xb; /* registers 2-7 and b,c */ + ctl->private_value = AK_COMPOSE(0, val, 0, 255) | AK_INVERT; break; } case SND_AK4355: - /* register 4-9, chip #0 only */ - ctl->private_value = AK_COMPOSE(0, idx + 4, 0, 255); + ctl->private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ break; case SND_AK4358: if (idx >= 6) - /* register 4-9, chip #0 only */ - ctl->private_value = - AK_COMPOSE(0, idx + 5, 0, 255); + ctl->private_value = AK_COMPOSE(0, idx + 5, 0, 255); /* register 4-9, chip #0 only */ else - /* register 4-9, chip #0 only */ - ctl->private_value = - AK_COMPOSE(0, idx + 4, 0, 255); + ctl->private_value = AK_COMPOSE(0, idx + 4, 0, 255); /* register 4-9, chip #0 only */ break; case SND_AK4381: - /* register 3 & 4 */ - ctl->private_value = - AK_COMPOSE(idx/2, (idx%2) + 3, 0, 255); + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 3, 0, 255); /* register 3 & 4 */ break; default: err = -EINVAL; goto __error; } - ctl->private_data = ak; - err = snd_ctl_add(ak->card, - snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ| - SNDRV_CTL_ELEM_ACCESS_WRITE)); - if (err < 0) + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) goto __error; - - idx += num_stereo; - mixer_ch++; } for (idx = 0; idx < ak->num_adcs && ak->type == SND_AK4524; ++idx) { memset(ctl, 0, sizeof(*ctl)); @@ -571,14 +432,9 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) ctl->info = snd_akm4xxx_volume_info; ctl->get = snd_akm4xxx_volume_get; ctl->put = snd_akm4xxx_volume_put; - /* register 4 & 5 */ - ctl->private_value = - AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 127); /* register 4 & 5 */ ctl->private_data = ak; - err = snd_ctl_add(ak->card, - snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ| - SNDRV_CTL_ELEM_ACCESS_WRITE)); - if (err < 0) + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) goto __error; memset(ctl, 0, sizeof(*ctl)); @@ -589,13 +445,9 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) ctl->info = snd_akm4xxx_ipga_gain_info; ctl->get = snd_akm4xxx_ipga_gain_get; ctl->put = snd_akm4xxx_ipga_gain_put; - /* register 4 & 5 */ - ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 0); + ctl->private_value = AK_COMPOSE(idx/2, (idx%2) + 4, 0, 0); /* register 4 & 5 */ ctl->private_data = ak; - err = snd_ctl_add(ak->card, - snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ| - SNDRV_CTL_ELEM_ACCESS_WRITE)); - if (err < 0) + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) goto __error; } if (ak->type == SND_AK4355 || ak->type == SND_AK4358) @@ -614,13 +466,11 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) switch (ak->type) { case SND_AK4524: case SND_AK4528: - /* register 3 */ - ctl->private_value = AK_COMPOSE(idx, 3, 0, 0); + ctl->private_value = AK_COMPOSE(idx, 3, 0, 0); /* register 3 */ break; case SND_AK4529: { int shift = idx == 3 ? 6 : (2 - idx) * 2; - /* register 8 with shift */ - ctl->private_value = AK_COMPOSE(0, 8, shift, 0); + ctl->private_value = AK_COMPOSE(0, 8, shift, 0); /* register 8 with shift */ break; } case SND_AK4355: @@ -632,10 +482,7 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) break; } ctl->private_data = ak; - err = snd_ctl_add(ak->card, - snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ| - SNDRV_CTL_ELEM_ACCESS_WRITE)); - if (err < 0) + if ((err = snd_ctl_add(ak->card, snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0) goto __error; } err = 0; @@ -645,8 +492,6 @@ int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) return err; } -EXPORT_SYMBOL(snd_akm4xxx_build_controls); - static int __init alsa_akm4xxx_module_init(void) { return 0; @@ -658,3 +503,8 @@ static void __exit alsa_akm4xxx_module_exit(void) module_init(alsa_akm4xxx_module_init) module_exit(alsa_akm4xxx_module_exit) + +EXPORT_SYMBOL(snd_akm4xxx_write); +EXPORT_SYMBOL(snd_akm4xxx_reset); +EXPORT_SYMBOL(snd_akm4xxx_init); +EXPORT_SYMBOL(snd_akm4xxx_build_controls); diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index b33a5fb59..31f299aed 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c @@ -232,7 +232,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard if (mpu_port[dev] > 0) { if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, - mpu_port[dev], 0, mpu_irq[dev], IRQF_DISABLED, + mpu_port[dev], 0, mpu_irq[dev], SA_INTERRUPT, NULL) < 0) printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]); } diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 8fcf2c151..fd8fe16c0 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c @@ -599,7 +599,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card, snd_ad1816a_free(chip); return -EBUSY; } - if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) { + if (request_irq(irq, snd_ad1816a_interrupt, SA_INTERRUPT, "AD1816A", (void *) chip)) { snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); snd_ad1816a_free(chip); return -EBUSY; diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index e711f87d5..e0f8baa84 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c @@ -902,7 +902,7 @@ int snd_ad1848_create(struct snd_card *card, snd_ad1848_free(chip); return -EBUSY; } - if (request_irq(irq, snd_ad1848_interrupt, IRQF_DISABLED, "AD1848", (void *) chip)) { + if (request_irq(irq, snd_ad1848_interrupt, SA_INTERRUPT, "AD1848", (void *) chip)) { snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq); snd_ad1848_free(chip); return -EBUSY; diff --git a/sound/isa/als100.c b/sound/isa/als100.c index f2bcfb2cf..a52bd8a14 100644 --- a/sound/isa/als100.c +++ b/sound/isa/als100.c @@ -250,7 +250,7 @@ static int __devinit snd_card_als100_probe(int dev, if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100, mpu_port[dev], 0, - mpu_irq[dev], IRQF_DISABLED, + mpu_irq[dev], SA_INTERRUPT, NULL) < 0) snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); } diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c index b615538a9..15e59283a 100644 --- a/sound/isa/azt2320.c +++ b/sound/isa/azt2320.c @@ -279,7 +279,7 @@ static int __devinit snd_card_azt2320_probe(int dev, if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320, mpu_port[dev], 0, - mpu_irq[dev], IRQF_DISABLED, + mpu_irq[dev], SA_INTERRUPT, NULL) < 0) snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); } diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c index 696a5c86b..397310f35 100644 --- a/sound/isa/cs423x/cs4231.c +++ b/sound/isa/cs423x/cs4231.c @@ -122,7 +122,7 @@ static int __init snd_cs4231_probe(struct platform_device *pdev) if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, mpu_port[dev], 0, mpu_irq[dev], - mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, + mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) printk(KERN_WARNING "cs4231: MPU401 not detected\n"); } diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index fbb20176c..823db8246 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c @@ -1454,7 +1454,7 @@ int snd_cs4231_create(struct snd_card *card, return -ENODEV; } chip->cport = cport; - if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, IRQF_DISABLED, "CS4231", (void *) chip)) { + if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, SA_INTERRUPT, "CS4231", (void *) chip)) { snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq); snd_cs4231_free(chip); return -EBUSY; diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 07ffd5c22..f7fa77934 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c @@ -535,7 +535,7 @@ static int __devinit snd_cs423x_probe(struct snd_card *card, int dev) if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, mpu_port[dev], 0, mpu_irq[dev], - mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0) + mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) printk(KERN_WARNING IDENT ": MPU401 not detected\n"); } diff --git a/sound/isa/dt019x.c b/sound/isa/dt019x.c index c20a4b1b1..0acb4e5da 100644 --- a/sound/isa/dt019x.c +++ b/sound/isa/dt019x.c @@ -240,7 +240,7 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard, MPU401_HW_MPU401, mpu_port[dev], 0, mpu_irq[dev], - mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, + mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]); } diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 7f29f56e4..e90689ee1 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -153,7 +153,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev) if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, chip->mpu_port, 0, xmpu_irq, - IRQF_DISABLED, + SA_INTERRUPT, NULL)) < 0) goto _err; } diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 7e985d3bc..702ad51ee 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c @@ -659,7 +659,7 @@ int snd_es1688_create(struct snd_card *card, snd_es1688_free(chip); return -EBUSY; } - if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) { + if (request_irq(irq, snd_es1688_interrupt, SA_INTERRUPT, "ES1688", (void *) chip)) { snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); snd_es1688_free(chip); return -EBUSY; diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 34998de99..e6945db8e 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -1837,7 +1837,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card, return -EBUSY; } - if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx", (void *) chip)) { + if (request_irq(irq, snd_es18xx_interrupt, SA_INTERRUPT, "ES18xx", (void *) chip)) { snd_es18xx_free(chip); snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq); return -EBUSY; @@ -2088,8 +2088,7 @@ static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard, kfree(cfg); return -EAGAIN; } - snd_printdd("pnp: port=0x%llx\n", - (unsigned long long)pnp_port_start(acard->devc, 0)); + snd_printdd("pnp: port=0x%lx\n", pnp_port_start(acard->devc, 0)); /* PnP initialization */ pdev = acard->dev; pnp_init_resource_table(cfg); diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index 42db37552..c19ba2910 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c @@ -136,7 +136,7 @@ void snd_gus_irq_profile_init(struct snd_gus_card *gus) struct snd_info_entry *entry; if (! snd_card_proc_new(gus->card, "gusirq", &entry)) - snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read); + snd_info_set_text_ops(entry, gus, 1024, snd_gus_irq_info_read); } #endif diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index b680fddf0..53eeaf370 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -179,7 +179,7 @@ int snd_gus_create(struct snd_card *card, snd_gus_free(gus); return -EBUSY; } - if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) { + if (irq >= 0 && request_irq(irq, snd_gus_interrupt, SA_INTERRUPT, "GUS GF1", (void *) gus)) { snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); snd_gus_free(gus); return -EBUSY; diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index f50c276ca..3c0d27aa0 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -264,8 +264,10 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) if (snd_gf1_mem_xalloc(alloc, &block) == NULL) return -ENOMEM; #ifdef CONFIG_SND_DEBUG - if (! snd_card_proc_new(gus->card, "gusmem", &entry)) - snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read); + if (! snd_card_proc_new(gus->card, "gusmem", &entry)) { + snd_info_set_text_ops(entry, gus, 1024, snd_gf1_mem_info_read); + entry->c.text.read_size = 256 * 1024; + } #endif return 0; } diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c index 3e4d4d6ed..2767cc187 100644 --- a/sound/isa/gus/gus_synth.c +++ b/sound/isa/gus/gus_synth.c @@ -194,9 +194,7 @@ static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx) &callbacks, SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE, SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE | - SNDRV_SEQ_PORT_TYPE_SYNTH | - SNDRV_SEQ_PORT_TYPE_HARDWARE | - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, + SNDRV_SEQ_PORT_TYPE_SYNTH, 16, 0, name); if (p->chset->port < 0) { diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 532c56e35..05852fcc6 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c @@ -87,7 +87,7 @@ MODULE_PARM_DESC(channels, "GF1 channels for GUS Extreme driver."); module_param_array(pcm_channels, int, NULL, 0444); MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for GUS Extreme driver."); -static struct platform_device *devices[SNDRV_CARDS]; +struct platform_device *devices[SNDRV_CARDS]; #define PFX "gusextreme: " @@ -301,7 +301,7 @@ static int __init snd_gusextreme_probe(struct platform_device *pdev) (err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, es1688->mpu_port, 0, xmpu_irq, - IRQF_DISABLED, + SA_INTERRUPT, NULL)) < 0) goto out; diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index ac11cae85..fcf2c8fe6 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c @@ -292,7 +292,7 @@ static int __init snd_gusmax_probe(struct platform_device *pdev) goto _err; } - if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) { + if (request_irq(xirq, snd_gusmax_interrupt, SA_INTERRUPT, "GUS MAX", (void *)maxcard)) { snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); err = -EBUSY; goto _err; diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index ea69f2550..4298d339e 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -70,9 +70,9 @@ static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */ static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */ static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29}; /* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */ -static int midi[SNDRV_CARDS]; +static int midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; -static int effect[SNDRV_CARDS]; +static int effect[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; #ifdef SNDRV_STB #define PFX "interwave-stb: " @@ -611,10 +611,10 @@ static int __devinit snd_interwave_pnp(int dev, struct snd_interwave *iwcard, if (dma2[dev] >= 0) dma2[dev] = pnp_dma(pdev, 1); irq[dev] = pnp_irq(pdev, 0); - snd_printdd("isapnp IW: sb port=0x%llx, gf1 port=0x%llx, codec port=0x%llx\n", - (unsigned long long)pnp_port_start(pdev, 0), - (unsigned long long)pnp_port_start(pdev, 1), - (unsigned long long)pnp_port_start(pdev, 2)); + snd_printdd("isapnp IW: sb port=0x%lx, gf1 port=0x%lx, codec port=0x%lx\n", + pnp_port_start(pdev, 0), + pnp_port_start(pdev, 1), + pnp_port_start(pdev, 2)); snd_printdd("isapnp IW: dma1=%i, dma2=%i, irq=%i\n", dma1[dev], dma2[dev], irq[dev]); #ifdef SNDRV_STB /* Tone Control initialization */ @@ -706,7 +706,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev) if ((err = snd_gus_initialize(gus)) < 0) return err; - if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED, + if (request_irq(xirq, snd_interwave_interrupt, SA_INTERRUPT, "InterWave", iwcard)) { snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); return -EBUSY; diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 4031b61b7..6d889052c 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c @@ -59,7 +59,7 @@ static long midi_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;/* 0x330,0x300 */ static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 0,1,3,5,9,11,12,15 */ static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 1,3,5,6,7 */ static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 1,3,5,6,7 */ -static int opl3sa3_ymode[SNDRV_CARDS]; /* 0,1,2,3 */ /*SL Added*/ +static int opl3sa3_ymode[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* 0,1,2,3 */ /*SL Added*/ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for OPL3-SA soundcard."); @@ -221,7 +221,7 @@ static void snd_opl3sa2_write(struct snd_opl3sa2 *chip, unsigned char reg, unsig spin_unlock_irqrestore(&chip->reg_lock, flags); } -static int __devinit snd_opl3sa2_detect(struct snd_opl3sa2 *chip) +static int __init snd_opl3sa2_detect(struct snd_opl3sa2 *chip) { struct snd_card *card; unsigned long port; @@ -489,7 +489,7 @@ static void snd_opl3sa2_master_free(struct snd_kcontrol *kcontrol) chip->master_volume = NULL; } -static int __devinit snd_opl3sa2_mixer(struct snd_opl3sa2 *chip) +static int __init snd_opl3sa2_mixer(struct snd_opl3sa2 *chip) { struct snd_card *card = chip->card; struct snd_ctl_elem_id id1, id2; @@ -583,8 +583,8 @@ static int snd_opl3sa2_resume(struct snd_card *card) #endif /* CONFIG_PM */ #ifdef CONFIG_PNP -static int __devinit snd_opl3sa2_pnp(int dev, struct snd_opl3sa2 *chip, - struct pnp_dev *pdev) +static int __init snd_opl3sa2_pnp(int dev, struct snd_opl3sa2 *chip, + struct pnp_dev *pdev) { struct pnp_resource_table * cfg; int err; @@ -683,7 +683,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev) chip->single_dma = 1; if ((err = snd_opl3sa2_detect(chip)) < 0) return err; - if (request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED, "OPL3-SA2", chip)) { + if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2", chip)) { snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq); return -ENODEV; } @@ -862,7 +862,7 @@ static struct pnp_card_driver opl3sa2_pnpc_driver = { }; #endif /* CONFIG_PNP */ -static int __devinit snd_opl3sa2_nonpnp_probe(struct platform_device *pdev) +static int __init snd_opl3sa2_nonpnp_probe(struct platform_device *pdev) { struct snd_card *card; int err; diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 1dd98375a..e6bfcf74c 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c @@ -967,7 +967,7 @@ static void __init snd_miro_proc_init(struct snd_miro * miro) struct snd_info_entry *entry; if (! snd_card_proc_new(miro->card, "miro", &entry)) - snd_info_set_text_ops(entry, miro, snd_miro_proc_read); + snd_info_set_text_ops(entry, miro, 1024, snd_miro_proc_read); } /* @@ -1382,7 +1382,7 @@ static int __init snd_miro_probe(struct platform_device *devptr) rmidi = NULL; else if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, - miro->mpu_port, 0, miro->mpu_irq, IRQF_DISABLED, + miro->mpu_port, 0, miro->mpu_irq, SA_INTERRUPT, &rmidi))) snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", miro->mpu_port); diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 9d528ae00..8ee0d7053 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -1291,7 +1291,7 @@ static int snd_opti93x_create(struct snd_card *card, struct snd_opti9xx *chip, } codec->dma2 = chip->dma2; - if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) { + if (request_irq(chip->irq, snd_opti93x_interrupt, SA_INTERRUPT, DRIVER_NAME" - WSS", codec)) { snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); snd_opti93x_free(codec); return -EBUSY; @@ -1863,7 +1863,7 @@ static int __init snd_opti9xx_probe(struct snd_card *card) rmidi = NULL; else if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, - chip->mpu_port, 0, chip->mpu_irq, IRQF_DISABLED, + chip->mpu_port, 0, chip->mpu_irq, SA_INTERRUPT, &rmidi))) snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", chip->mpu_port); diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c index 658179e86..c0b8d61b7 100644 --- a/sound/isa/sb/emu8000.c +++ b/sound/isa/sb/emu8000.c @@ -131,7 +131,7 @@ snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode) /* */ -static void __devinit +static void __init snd_emu8000_read_wait(struct snd_emu8000 *emu) { while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) { @@ -143,7 +143,7 @@ snd_emu8000_read_wait(struct snd_emu8000 *emu) /* */ -static void __devinit +static void __init snd_emu8000_write_wait(struct snd_emu8000 *emu) { while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { @@ -156,7 +156,7 @@ snd_emu8000_write_wait(struct snd_emu8000 *emu) /* * detect a card at the given port */ -static int __devinit +static int __init snd_emu8000_detect(struct snd_emu8000 *emu) { /* Initialise */ @@ -182,7 +182,7 @@ snd_emu8000_detect(struct snd_emu8000 *emu) /* * intiailize audio channels */ -static void __devinit +static void __init init_audio(struct snd_emu8000 *emu) { int ch; @@ -223,7 +223,7 @@ init_audio(struct snd_emu8000 *emu) /* * initialize DMA address */ -static void __devinit +static void __init init_dma(struct snd_emu8000 *emu) { EMU8000_SMALR_WRITE(emu, 0); @@ -327,7 +327,7 @@ static unsigned short init4[128] /*__devinitdata*/ = { * Taken from the oss driver, not obvious from the doc how this * is meant to work */ -static void __devinit +static void __init send_array(struct snd_emu8000 *emu, unsigned short *data, int size) { int i; @@ -349,7 +349,7 @@ send_array(struct snd_emu8000 *emu, unsigned short *data, int size) * Send initialization arrays to start up, this just follows the * initialisation sequence in the adip. */ -static void __devinit +static void __init init_arrays(struct snd_emu8000 *emu) { send_array(emu, init1, ARRAY_SIZE(init1)/4); @@ -375,7 +375,7 @@ init_arrays(struct snd_emu8000 *emu) * seems that the only way to do this is to use the one channel and keep * reallocating between read and write. */ -static void __devinit +static void __init size_dram(struct snd_emu8000 *emu) { int i, size; @@ -500,7 +500,7 @@ snd_emu8000_init_fm(struct snd_emu8000 *emu) /* * The main initialization routine. */ -static void __devinit +static void __init snd_emu8000_init_hw(struct snd_emu8000 *emu) { int i; @@ -1019,7 +1019,7 @@ static struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = { /* * create and attach mixer elements for WaveTable treble/bass controls */ -static int __devinit +static int __init snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu) { int i, err = 0; @@ -1069,7 +1069,7 @@ static int snd_emu8000_dev_free(struct snd_device *device) /* * initialize and register emu8000 synth device. */ -int __devinit +int __init snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports, struct snd_seq_device **awe_ret) { diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c index 1be16c970..80b1cf84a 100644 --- a/sound/isa/sb/emu8000_patch.c +++ b/sound/isa/sb/emu8000_patch.c @@ -23,7 +23,7 @@ #include #include -static int emu8000_reset_addr; +static int emu8000_reset_addr = 0; module_param(emu8000_reset_addr, int, 0444); MODULE_PARM_DESC(emu8000_reset_addr, "reset write address at each time (makes slowdown)"); diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index d64e67f2b..6333f900e 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c @@ -85,7 +85,7 @@ static int dma8[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3 */ static int dma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 5,6,7 */ static int mic_agc[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; #ifdef CONFIG_SND_SB16_CSP -static int csp[SNDRV_CARDS]; +static int csp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; #endif #ifdef SNDRV_SBAWE_EMU8000 static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4}; @@ -327,8 +327,7 @@ static int __devinit snd_card_sb16_pnp(int dev, struct snd_card_sb16 *acard, goto __wt_error; } awe_port[dev] = pnp_port_start(pdev, 0); - snd_printdd("pnp SB16: wavetable port=0x%llx\n", - (unsigned long long)pnp_port_start(pdev, 0)); + snd_printdd("pnp SB16: wavetable port=0x%lx\n", pnp_port_start(pdev, 0)); } else { __wt_error: if (pdev) { diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index fcd638090..9703c68e4 100644 --- a/sound/isa/sb/sb16_csp.c +++ b/sound/isa/sb/sb16_csp.c @@ -1101,7 +1101,7 @@ static int init_proc_entry(struct snd_sb_csp * p, int device) struct snd_info_entry *entry; sprintf(name, "cspD%d", device); if (! snd_card_proc_new(p->chip->card, name, &entry)) - snd_info_set_text_ops(entry, p, info_read); + snd_info_set_text_ops(entry, p, 1024, info_read); return 0; } diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c index 0b67edd7a..c549aceea 100644 --- a/sound/isa/sb/sb8_midi.c +++ b/sound/isa/sb/sb8_midi.c @@ -32,22 +32,20 @@ #include #include +/* + + */ -irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip) +irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb * chip) { struct snd_rawmidi *rmidi; int max = 64; char byte; - if (!chip) - return IRQ_NONE; - - rmidi = chip->rmidi; - if (!rmidi) { + if (chip == NULL || (rmidi = chip->rmidi) == NULL) { inb(SBP(chip, DATA_AVAIL)); /* ack interrupt */ return IRQ_NONE; } - spin_lock(&chip->midi_input_lock); while (max-- > 0) { if (inb(SBP(chip, DATA_AVAIL)) & 0x80) { @@ -61,6 +59,10 @@ irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip) return IRQ_HANDLED; } +/* + + */ + static int snd_sb8dsp_midi_input_open(struct snd_rawmidi_substream *substream) { unsigned long flags; @@ -250,6 +252,10 @@ static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substre snd_sb8dsp_midi_output_write(substream); } +/* + + */ + static struct snd_rawmidi_ops snd_sb8dsp_midi_output = { .open = snd_sb8dsp_midi_output_open, diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index f17de2bdd..f343a8211 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c @@ -232,7 +232,7 @@ int snd_sbdsp_create(struct snd_card *card, chip->port = port; if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ? - IRQF_DISABLED | IRQF_SHARED : IRQF_DISABLED, + SA_INTERRUPT | SA_SHIRQ : SA_INTERRUPT, "SoundBlaster", (void *) chip)) { snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq); snd_sbdsp_free(chip); diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c index 8742fa517..09c8e8c6b 100644 --- a/sound/isa/sgalaxy.c +++ b/sound/isa/sgalaxy.c @@ -147,7 +147,7 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma) if (tmp < 0) return -EINVAL; - if (request_irq(irq, snd_sgalaxy_dummy_interrupt, IRQF_DISABLED, "sgalaxy", NULL)) { + if (request_irq(irq, snd_sgalaxy_dummy_interrupt, SA_INTERRUPT, "sgalaxy", NULL)) { snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq); return -EIO; } diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index b1f25823c..d2a856f0f 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c @@ -897,10 +897,11 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l struct snd_rawmidi *rawmidi; int err; +#define MPU401_SHARE_HARDWARE 1 if ((err = snd_mpu401_uart_new(card, devnum, MPU401_HW_MPU401, - port, MPU401_INFO_INTEGRATED, - irq, IRQF_DISABLED, + port, MPU401_SHARE_HARDWARE, + irq, SA_INTERRUPT, &rawmidi)) == 0) { struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data; mpu->open_input = mpu401_open; diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index a8f8d2fa9..7ae86f82c 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c @@ -50,7 +50,7 @@ static int ics2115_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 2,9,11,12,15 */ static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* PnP setup */ static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */ static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* 0,1,3,5,6,7 */ -static int use_cs4232_midi[SNDRV_CARDS]; +static int use_cs4232_midi[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for WaveFront soundcard."); @@ -467,7 +467,7 @@ snd_wavefront_probe (struct snd_card *card, int dev) return -EBUSY; } if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt, - IRQF_DISABLED, "ICS2115", acard)) { + SA_INTERRUPT, "ICS2115", acard)) { snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]); return -EBUSY; } @@ -497,7 +497,7 @@ snd_wavefront_probe (struct snd_card *card, int dev) if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232, cs4232_mpu_port[dev], 0, cs4232_mpu_irq[dev], - IRQF_DISABLED, + SA_INTERRUPT, NULL)) < 0) { snd_printk (KERN_ERR "can't allocate CS4232 MPU-401 device\n"); return err; diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c index 4f0846feb..180661c5f 100644 --- a/sound/isa/wavefront/wavefront_fx.c +++ b/sound/isa/wavefront/wavefront_fx.c @@ -34,7 +34,7 @@ /* weird stuff, derived from port I/O tracing with dosemu */ -static unsigned char page_zero[] __devinitdata = { +static unsigned char page_zero[] __initdata = { 0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, 0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00, 0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00, @@ -61,7 +61,7 @@ static unsigned char page_zero[] __devinitdata = { 0x1d, 0x02, 0xdf }; -static unsigned char page_one[] __devinitdata = { +static unsigned char page_one[] __initdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00, 0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, @@ -88,7 +88,7 @@ static unsigned char page_one[] __devinitdata = { 0x60, 0x00, 0x1b }; -static unsigned char page_two[] __devinitdata = { +static unsigned char page_two[] __initdata = { 0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4, 0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -103,7 +103,7 @@ static unsigned char page_two[] __devinitdata = { 0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44 }; -static unsigned char page_three[] __devinitdata = { +static unsigned char page_three[] __initdata = { 0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -118,7 +118,7 @@ static unsigned char page_three[] __devinitdata = { 0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40 }; -static unsigned char page_four[] __devinitdata = { +static unsigned char page_four[] __initdata = { 0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -133,7 +133,7 @@ static unsigned char page_four[] __devinitdata = { 0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01 }; -static unsigned char page_six[] __devinitdata = { +static unsigned char page_six[] __initdata = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00, @@ -154,7 +154,7 @@ static unsigned char page_six[] __devinitdata = { 0x80, 0x00, 0x7e, 0x80, 0x80 }; -static unsigned char page_seven[] __devinitdata = { +static unsigned char page_seven[] __initdata = { 0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, @@ -181,7 +181,7 @@ static unsigned char page_seven[] __devinitdata = { 0x00, 0x02, 0x00 }; -static unsigned char page_zero_v2[] __devinitdata = { +static unsigned char page_zero_v2[] __initdata = { 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, @@ -193,7 +193,7 @@ static unsigned char page_zero_v2[] __devinitdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned char page_one_v2[] __devinitdata = { +static unsigned char page_one_v2[] __initdata = { 0x01, 0xc0, 0x01, 0xfa, 0x00, 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, @@ -205,21 +205,21 @@ static unsigned char page_one_v2[] __devinitdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned char page_two_v2[] __devinitdata = { +static unsigned char page_two_v2[] __initdata = { 0x46, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned char page_three_v2[] __devinitdata = { +static unsigned char page_three_v2[] __initdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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 unsigned char page_four_v2[] __devinitdata = { +static unsigned char page_four_v2[] __initdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -227,7 +227,7 @@ static unsigned char page_four_v2[] __devinitdata = { 0x00, 0x00, 0x00, 0x00 }; -static unsigned char page_seven_v2[] __devinitdata = { +static unsigned char page_seven_v2[] __initdata = { 0x0f, 0xff, 0x0f, 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, @@ -239,7 +239,7 @@ static unsigned char page_seven_v2[] __devinitdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned char mod_v2[] __devinitdata = { +static unsigned char mod_v2[] __initdata = { 0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02, 0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05, 0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0, @@ -269,7 +269,7 @@ static unsigned char mod_v2[] __devinitdata = { 0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01, 0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01 }; -static unsigned char coefficients[] __devinitdata = { +static unsigned char coefficients[] __initdata = { 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03, 0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01, @@ -305,14 +305,14 @@ static unsigned char coefficients[] __devinitdata = { 0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02, 0xba }; -static unsigned char coefficients2[] __devinitdata = { +static unsigned char coefficients2[] __initdata = { 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f, 0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d, 0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, 0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00 }; -static unsigned char coefficients3[] __devinitdata = { +static unsigned char coefficients3[] __initdata = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00, 0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01, @@ -563,7 +563,7 @@ snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file, */ -int __devinit +int __init snd_wavefront_fx_start (snd_wavefront_t *dev) { diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c index cb3460094..15888ba21 100644 --- a/sound/isa/wavefront/wavefront_midi.c +++ b/sound/isa/wavefront/wavefront_midi.c @@ -474,7 +474,7 @@ snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *card) spin_unlock_irqrestore (&card->wavefront.midi.virtual, flags); } -int __devinit +int __init snd_wavefront_midi_start (snd_wavefront_card_t *card) { diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index bed329edb..68aa091e8 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -1738,7 +1738,7 @@ snd_wavefront_internal_interrupt (snd_wavefront_card_t *card) 7 Unused */ -static int __devinit +static int __init snd_wavefront_interrupt_bits (int irq) { @@ -1766,7 +1766,7 @@ snd_wavefront_interrupt_bits (int irq) return bits; } -static void __devinit +static void __init wavefront_should_cause_interrupt (snd_wavefront_t *dev, int val, int port, int timeout) @@ -1787,7 +1787,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev, } } -static int __devinit +static int __init wavefront_reset_to_cleanliness (snd_wavefront_t *dev) { @@ -1946,7 +1946,7 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev) #include -static int __devinit +static int __init wavefront_download_firmware (snd_wavefront_t *dev, char *path) { @@ -2047,7 +2047,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) } -static int __devinit +static int __init wavefront_do_reset (snd_wavefront_t *dev) { @@ -2136,7 +2136,7 @@ wavefront_do_reset (snd_wavefront_t *dev) return 1; } -int __devinit +int __init snd_wavefront_start (snd_wavefront_t *dev) { @@ -2178,7 +2178,7 @@ snd_wavefront_start (snd_wavefront_t *dev) return (0); } -int __devinit +int __init snd_wavefront_detect (snd_wavefront_card_t *card) { diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index c31b38659..cf476fe1a 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c @@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000) flags = claim_dma_lock(); if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX, - "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED, + "AC97 TX", au1000_dma_interrupt, SA_INTERRUPT, au1000->stream[PLAYBACK])) < 0) { release_dma_lock(flags); return -EBUSY; } if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX, - "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED, + "AC97 RX", au1000_dma_interrupt, SA_INTERRUPT, au1000->stream[CAPTURE])) < 0){ release_dma_lock(flags); return -EBUSY; diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 97e38b665..558c6ed44 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -5,20 +5,6 @@ # # Prompt user for primary drivers. -config OSS_OBSOLETE_DRIVER - bool "Obsolete OSS drivers" - depends on SOUND_PRIME - help - This option enables support for obsolete OSS drivers that - are scheduled for removal in the near future since there - are ALSA drivers for the same hardware. - - Please contact Adrian Bunk if you had to - say Y here because your soundcard is not properly supported - by ALSA. - - If unsure, say N. - config SOUND_BT878 tristate "BT878 audio dma" depends on SOUND_PRIME && PCI @@ -37,7 +23,7 @@ config SOUND_BT878 config SOUND_EMU10K1 tristate "Creative SBLive! (EMU10K1)" - depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER + depends on SOUND_PRIME && PCI ---help--- Say Y or M if you have a PCI sound card using the EMU10K1 chipset, such as the Creative SBLive!, SB PCI512 or Emu-APS. @@ -45,7 +31,7 @@ config SOUND_EMU10K1 For more information on this driver and the degree of support for the different card models please check: - + It is now possible to load dsp microcode patches into the EMU10K1 chip. These patches are used to implement real time sound @@ -63,7 +49,7 @@ config MIDI_EMU10K1 config SOUND_FUSION tristate "Crystal SoundFusion (CS4280/461x)" - depends on SOUND_PRIME && PCI && OSS_OBSOLETE_DRIVER + depends on SOUND_PRIME && PCI help This module drives the Crystal SoundFusion devices (CS4280/46xx series) when wired as native sound drivers with AC97 codecs. If @@ -112,8 +98,8 @@ config SOUND_HAL2 tristate "SGI HAL2 sound (EXPERIMENTAL)" depends on SOUND_PRIME && SGI_IP22 && EXPERIMENTAL help - Say Y or M if you have an SGI Indy or Indigo2 system and want to be able to - use its on-board A2 audio system. + Say Y or M if you have an SGI Indy system and want to be able to + use it's on-board A2 audio system. config SOUND_IT8172 tristate "IT8172G Sound" @@ -128,9 +114,8 @@ config SOUND_VRC5477 with the AC97 codec. config SOUND_AU1550_AC97 - tristate "Au1550/Au1200 AC97 Sound" - select SND_AC97_CODEC - depends on SOUND_PRIME && (SOC_AU1550 || SOC_AU1200) + tristate "Au1550 AC97 Sound" + depends on SOUND_PRIME && SOC_AU1550 config SOUND_TRIDENT tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" @@ -154,7 +139,7 @@ config SOUND_TRIDENT system support" and "Sysctl support", and after the /proc file system has been mounted, executing the command - command what is enabled + command what is enabled echo 0>/proc/ALi5451 pcm out is also set to S/PDIF out. (Default). @@ -454,7 +439,7 @@ config SOUND_DMAP config SOUND_AD1816 tristate "AD1816(A) based cards (EXPERIMENTAL)" - depends on EXPERIMENTAL && SOUND_OSS && OSS_OBSOLETE_DRIVER + depends on EXPERIMENTAL && SOUND_OSS help Say M here if you have a sound card based on the Analog Devices AD1816(A) chip. @@ -464,21 +449,21 @@ config SOUND_AD1816 config SOUND_AD1889 tristate "AD1889 based cards (AD1819 codec) (EXPERIMENTAL)" - depends on EXPERIMENTAL && SOUND_OSS && PCI && OSS_OBSOLETE_DRIVER + depends on EXPERIMENTAL && SOUND_OSS && PCI help Say M here if you have a sound card based on the Analog Devices AD1889 chip. config SOUND_ADLIB tristate "Adlib Cards" - depends on SOUND_OSS && OSS_OBSOLETE_DRIVER + depends on SOUND_OSS help Includes ASB 64 4D. Information on programming AdLib cards is available at . config SOUND_ACI_MIXER tristate "ACI mixer (miroSOUND PCM1-pro/PCM12/PCM20)" - depends on SOUND_OSS && OSS_OBSOLETE_DRIVER + depends on SOUND_OSS ---help--- ACI (Audio Command Interface) is a protocol used to communicate with the microcontroller on some sound cards produced by miro and @@ -507,19 +492,6 @@ config SOUND_CS4232 See for more information on configuring this card. -config SOUND_SSCAPE - tristate "Ensoniq SoundScape support" - depends on SOUND_OSS - help - Answer Y if you have a sound card based on the Ensoniq SoundScape - chipset. Such cards are being manufactured at least by Ensoniq, Spea - and Reveal (Reveal makes also other cards). - - If you compile the driver into the kernel, you have to add - "sscape=,,,," to the kernel command - line. - - config SOUND_VMIDI tristate "Loopback MIDI device support" depends on SOUND_OSS @@ -600,7 +572,7 @@ config SOUND_MPU401 config SOUND_NM256 tristate "NM256AV/NM256ZX audio support" - depends on SOUND_OSS && OSS_OBSOLETE_DRIVER + depends on SOUND_OSS help Say M here to include audio support for the NeoMagic 256AV/256ZX chipsets. These are the audio chipsets found in the Sony @@ -720,7 +692,7 @@ config SOUND_YM3812 config SOUND_OPL3SA2 tristate "Yamaha OPL3-SA2 and SA3 based PnP cards" - depends on SOUND_OSS && OSS_OBSOLETE_DRIVER + depends on SOUND_OSS help Say Y or M if you have a card based on one of these Yamaha sound chipsets or the "SAx", which is actually a SA3. Read @@ -852,7 +824,7 @@ config SOUND_WAVEARTIST config SOUND_TVMIXER tristate "TV card (bt848) mixer support" - depends on SOUND_PRIME && I2C && VIDEO_V4L1 + depends on SOUND_PRIME && I2C help Support for audio mixer facilities on the BT848 TV frame-grabber card. @@ -866,6 +838,6 @@ config SOUND_SH_DAC_AUDIO depends on SOUND_PRIME && CPU_SH3 config SOUND_SH_DAC_AUDIO_CHANNEL - int "DAC channel" + int " DAC channel" default "1" depends on SOUND_SH_DAC_AUDIO diff --git a/sound/oss/ad1816.c b/sound/oss/ad1816.c index 29057836c..95586de02 100644 --- a/sound/oss/ad1816.c +++ b/sound/oss/ad1816.c @@ -41,6 +41,7 @@ */ +#include #include #include #include diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 3b45e11e5..e04fa49b0 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c @@ -41,6 +41,7 @@ * Tested. Believed fully functional. */ +#include #include #include #include diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c index f56f870b4..a4ca7569e 100644 --- a/sound/oss/ad1889.c +++ b/sound/oss/ad1889.c @@ -26,6 +26,7 @@ * * $Id: ad1889.c,v 1.3 2002/10/19 21:31:44 grundler Exp $ */ +#include #include #include #include @@ -1010,7 +1011,7 @@ static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_devic goto out2; } - if (request_irq(pcidev->irq, ad1889_interrupt, IRQF_SHARED, DEVNAME, dev) != 0) { + if (request_irq(pcidev->irq, ad1889_interrupt, SA_SHIRQ, DEVNAME, dev) != 0) { printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); goto out3; } diff --git a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c index 51e1fde62..b556263a5 100644 --- a/sound/oss/aedsp16.c +++ b/sound/oss/aedsp16.c @@ -23,6 +23,7 @@ * Include the main OSS Lite header file. It include all the os, OSS Lite, etc * headers needed by this source. */ +#include #include #include #include diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index 70dcd703a..62bb936b1 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c @@ -3460,7 +3460,7 @@ static int __devinit ali_probe(struct pci_dev *pci_dev, card->channel[4].num = 4; /* claim our iospace and irq */ request_region(card->iobase, 256, card_names[pci_id->driver_data]); - if (request_irq(card->irq, &ali_interrupt, IRQF_SHARED, + if (request_irq(card->irq, &ali_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { printk(KERN_ERR "ali_audio: unable to allocate irq %d\n", card->irq); diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index e37962314..eacb0aef2 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c @@ -2015,14 +2015,14 @@ static int __devinit au1000_probe(void) if ((s->dma_dac.dmanr = request_au1000_dma(DMA_ID_AC97C_TX, "audio DAC", dac_dma_interrupt, - IRQF_DISABLED, s)) < 0) { + SA_INTERRUPT, s)) < 0) { err("Can't get DAC DMA"); goto err_dma1; } if ((s->dma_adc.dmanr = request_au1000_dma(DMA_ID_AC97C_RX, "audio ADC", adc_dma_interrupt, - IRQF_DISABLED, s)) < 0) { + SA_INTERRUPT, s)) < 0) { err("Can't get ADC DMA"); goto err_dma2; } diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index 4cdb86252..c1168fae6 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c @@ -57,9 +57,9 @@ #include #include #include +#include #include #include -#include #undef OSS_DOCUMENTED_MIXER_SEMANTICS @@ -213,8 +213,7 @@ rdcodec(struct ac97_codec *codec, u8 addr) } if (i == POLL_COUNT) { err("rdcodec: read poll expired!"); - data = 0; - goto out; + return 0; } /* wait for command done? @@ -227,8 +226,7 @@ rdcodec(struct ac97_codec *codec, u8 addr) } if (i == POLL_COUNT) { err("rdcodec: read cmdwait expired!"); - data = 0; - goto out; + return 0; } data = au_readl(PSC_AC97CDC) & 0xffff; @@ -239,7 +237,6 @@ rdcodec(struct ac97_codec *codec, u8 addr) au_writel(PSC_AC97EVNT_CD, PSC_AC97EVNT); au_sync(); - out: spin_unlock_irqrestore(&s->lock, flags); return data; @@ -1895,8 +1892,6 @@ static /*const */ struct file_operations au1550_audio_fops = { MODULE_AUTHOR("Advanced Micro Devices (AMD), dan@embeddededge.com"); MODULE_DESCRIPTION("Au1550 AC97 Audio Driver"); -MODULE_LICENSE("GPL"); - static int __devinit au1550_probe(void) diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index 324a81fd3..bfe3b534e 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c @@ -966,7 +966,7 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev, btwrite(~0U, REG_INT_STAT); pci_set_master(pci_dev); - if ((rc = request_irq(bta->irq, btaudio_irq, IRQF_SHARED|IRQF_DISABLED, + if ((rc = request_irq(bta->irq, btaudio_irq, SA_SHIRQ|SA_INTERRUPT, "btaudio",(void *)bta)) < 0) { printk(KERN_WARNING "btaudio: can't request irq (rc=%d)\n",rc); diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index ea51aafaf..de60a059f 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c @@ -3122,7 +3122,7 @@ static int __devinit cm_probe(struct pci_dev *pcidev, const struct pci_device_id wrmixer(s, DSP_MIX_DATARESETIDX, 0); /* request irq */ - if ((ret = request_irq(s->irq, cm_interrupt, IRQF_SHARED, "cmpci", s))) { + if ((ret = request_irq(s->irq, cm_interrupt, SA_SHIRQ, "cmpci", s))) { printk(KERN_ERR "cmpci: irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/cs4232.c b/sound/oss/cs4232.c index b6924c7f1..c7f86f09c 100644 --- a/sound/oss/cs4232.c +++ b/sound/oss/cs4232.c @@ -47,6 +47,7 @@ * Marcus Meissner Added ISA PnP support. */ +#include #include #include #include @@ -404,7 +405,7 @@ static const struct pnp_device_id cs4232_pnp_table[] = { MODULE_DEVICE_TABLE(pnp, cs4232_pnp_table); -static int __init cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) +static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) { struct address_info *isapnpcfg; diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c index 0400a416d..0004442f9 100644 --- a/sound/oss/cs4281/cs4281m.c +++ b/sound/oss/cs4281/cs4281m.c @@ -4346,7 +4346,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev, s->pcidev = pcidev; s->irq = pcidev->irq; if (request_irq - (s->irq, cs4281_interrupt, IRQF_SHARED, "Crystal CS4281", s)) { + (s->irq, cs4281_interrupt, SA_SHIRQ, "Crystal CS4281", s)) { CS_DBGOUT(CS_INIT | CS_ERROR, 1, printk(KERN_ERR "cs4281: irq %u in use\n", s->irq)); goto err_irq; diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c index 5195bf933..53881bc91 100644 --- a/sound/oss/cs46xx.c +++ b/sound/oss/cs46xx.c @@ -147,7 +147,7 @@ * that should be printed on any released driver. */ #if CSDEBUG -#define CS_DBGOUT(mask,level,x) if ((cs_debuglevel >= (level)) && ((mask) & cs_debugmask)) {x;} +#define CS_DBGOUT(mask,level,x) if((cs_debuglevel >= (level)) && ((mask) & cs_debugmask)) {x;} #else #define CS_DBGOUT(mask,level,x) #endif @@ -175,19 +175,19 @@ #define CS_IOCTL_CMD_RESUME 0x2 // resume #if CSDEBUG -static unsigned long cs_debuglevel = 1; /* levels range from 1-9 */ +static unsigned long cs_debuglevel=1; /* levels range from 1-9 */ module_param(cs_debuglevel, ulong, 0644); -static unsigned long cs_debugmask = CS_INIT | CS_ERROR; /* use CS_DBGOUT with various mask values */ +static unsigned long cs_debugmask=CS_INIT | CS_ERROR; /* use CS_DBGOUT with various mask values */ module_param(cs_debugmask, ulong, 0644); #endif static unsigned long hercules_egpio_disable; /* if non-zero set all EGPIO to 0 */ module_param(hercules_egpio_disable, ulong, 0); -static unsigned long initdelay = 700; /* PM delay in millisecs */ +static unsigned long initdelay=700; /* PM delay in millisecs */ module_param(initdelay, ulong, 0); -static unsigned long powerdown = -1; /* turn on/off powerdown processing in driver */ +static unsigned long powerdown=-1; /* turn on/off powerdown processing in driver */ module_param(powerdown, ulong, 0); #define DMABUF_DEFAULTORDER 3 -static unsigned long defaultorder = DMABUF_DEFAULTORDER; +static unsigned long defaultorder=DMABUF_DEFAULTORDER; module_param(defaultorder, ulong, 0); static int external_amp; @@ -200,8 +200,8 @@ module_param(thinkpad, bool, 0); * powerdown. also set thinkpad to 1 to disable powerdown, * but also to enable the clkrun functionality. */ -static unsigned cs_powerdown = 1; -static unsigned cs_laptop_wait = 1; +static unsigned cs_powerdown=1; +static unsigned cs_laptop_wait=1; /* An instance of the 4610 channel */ struct cs_channel @@ -319,7 +319,7 @@ struct cs_card { atomic_t mixer_use_cnt; /* PCI device stuff */ - struct pci_dev *pci_dev; + struct pci_dev * pci_dev; struct list_head list; unsigned int pctl, cctl; /* Hardware DMA flag sets */ @@ -384,7 +384,7 @@ struct cs_card { static int cs_open_mixdev(struct inode *inode, struct file *file); static int cs_release_mixdev(struct inode *inode, struct file *file); static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg); + unsigned long arg); static int cs_hardware_init(struct cs_card *card); static int cs46xx_powerup(struct cs_card *card, unsigned int type); static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspendflag); @@ -423,7 +423,8 @@ static void printioctl(unsigned int x) [SOUND_MIXER_VOLUME] = 9 /* Master Volume */ }; - switch (x) { + switch(x) + { case SOUND_MIXER_CS_GETDBGMASK: CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CS_GETDBGMASK: ") ); break; @@ -520,6 +521,7 @@ static void printioctl(unsigned int x) case SOUND_PCM_READ_FILTER: CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_READ_FILTER: ") ); break; + case SOUND_MIXER_PRIVATE1: CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE1: ") ); break; @@ -541,8 +543,10 @@ static void printioctl(unsigned int x) case SOUND_OLD_MIXER_INFO: CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_OLD_MIXER_INFO: ") ); break; + default: - switch (_IOC_NR(x)) { + switch (_IOC_NR(x)) + { case SOUND_MIXER_VOLUME: CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_VOLUME: ") ); break; @@ -575,11 +579,14 @@ static void printioctl(unsigned int x) break; default: i = _IOC_NR(x); - if (i >= SOUND_MIXER_NRDEVICES || !(vidx = mixtable1[i])) { + if (i >= SOUND_MIXER_NRDEVICES || !(vidx = mixtable1[i])) + { CS_DBGOUT(CS_IOCTL, 4, printk("UNKNOWN IOCTL: 0x%.8x NR=%d ",x,i) ); - } else { + } + else + { CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_IOCTL AC9x: 0x%.8x NR=%d ", - x,i)); + x,i) ); } break; } @@ -594,22 +601,22 @@ static void printioctl(unsigned int x) static void cs461x_poke(struct cs_card *codec, unsigned long reg, unsigned int val) { - writel(val, codec->ba1.idx[(reg >> 16) & 3] + (reg & 0xffff)); + writel(val, codec->ba1.idx[(reg >> 16) & 3]+(reg&0xffff)); } static unsigned int cs461x_peek(struct cs_card *codec, unsigned long reg) { - return readl(codec->ba1.idx[(reg >> 16) & 3] + (reg & 0xffff)); + return readl(codec->ba1.idx[(reg >> 16) & 3]+(reg&0xffff)); } static void cs461x_pokeBA0(struct cs_card *codec, unsigned long reg, unsigned int val) { - writel(val, codec->ba0 + reg); + writel(val, codec->ba0+reg); } static unsigned int cs461x_peekBA0(struct cs_card *codec, unsigned long reg) { - return readl(codec->ba0 + reg); + return readl(codec->ba0+reg); } @@ -618,26 +625,26 @@ static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 data); static struct cs_channel *cs_alloc_pcm_channel(struct cs_card *card) { - if (card->channel[1].used == 1) + if(card->channel[1].used==1) return NULL; - card->channel[1].used = 1; - card->channel[1].num = 1; + card->channel[1].used=1; + card->channel[1].num=1; return &card->channel[1]; } static struct cs_channel *cs_alloc_rec_pcm_channel(struct cs_card *card) { - if (card->channel[0].used == 1) + if(card->channel[0].used==1) return NULL; - card->channel[0].used = 1; - card->channel[0].num = 0; + card->channel[0].used=1; + card->channel[0].num=0; return &card->channel[0]; } static void cs_free_pcm_channel(struct cs_card *card, int channel) { card->channel[channel].state = NULL; - card->channel[channel].used = 0; + card->channel[channel].used=0; } /* @@ -648,15 +655,15 @@ static void cs_free_pcm_channel(struct cs_card *card, int channel) */ static void cs_set_divisor(struct dmabuf *dmabuf) { - if (dmabuf->type == CS_TYPE_DAC) + if(dmabuf->type == CS_TYPE_DAC) dmabuf->divisor = 1; - else if (!(dmabuf->fmt & CS_FMT_STEREO) && + else if( !(dmabuf->fmt & CS_FMT_STEREO) && (dmabuf->fmt & CS_FMT_16BIT)) dmabuf->divisor = 2; - else if ((dmabuf->fmt & CS_FMT_STEREO) && + else if( (dmabuf->fmt & CS_FMT_STEREO) && !(dmabuf->fmt & CS_FMT_16BIT)) dmabuf->divisor = 2; - else if (!(dmabuf->fmt & CS_FMT_STEREO) && + else if( !(dmabuf->fmt & CS_FMT_STEREO) && !(dmabuf->fmt & CS_FMT_16BIT)) dmabuf->divisor = 4; else @@ -673,12 +680,13 @@ static void cs_set_divisor(struct dmabuf *dmabuf) */ static void cs_mute(struct cs_card *card, int state) { - struct ac97_codec *dev = card->ac97_codec[0]; + struct ac97_codec *dev=card->ac97_codec[0]; CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: cs_mute()+ %s\n", - (state == CS_TRUE) ? "Muting" : "UnMuting")); + (state == CS_TRUE) ? "Muting" : "UnMuting") ); - if (state == CS_TRUE) { + if(state == CS_TRUE) + { /* * fix pops when powering up on thinkpads */ @@ -695,7 +703,9 @@ static void cs_mute(struct cs_card *card, int state) cs_ac97_set(dev, (u8)BA0_AC97_HEADPHONE_VOLUME, 0x8000); cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME_MONO, 0x8000); cs_ac97_set(dev, (u8)BA0_AC97_PCM_OUT_VOLUME, 0x8000); - } else { + } + else + { cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME, card->pm.u32AC97_master_volume); cs_ac97_set(dev, (u8)BA0_AC97_HEADPHONE_VOLUME, card->pm.u32AC97_headphone_volume); cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME_MONO, card->pm.u32AC97_master_volume_mono); @@ -747,6 +757,7 @@ static unsigned int cs_set_dac_rate(struct cs_state * state, unsigned int rate) /* * Fill in the SampleRateConverter control block. */ + spin_lock_irqsave(&state->card->lock, flags); cs461x_poke(state->card, BA1_PSRC, ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); @@ -759,7 +770,7 @@ static unsigned int cs_set_dac_rate(struct cs_state * state, unsigned int rate) } /* set recording sample rate */ -static unsigned int cs_set_adc_rate(struct cs_state *state, unsigned int rate) +static unsigned int cs_set_adc_rate(struct cs_state * state, unsigned int rate) { struct dmabuf *dmabuf = &state->dmabuf; struct cs_card *card = state->card; @@ -804,6 +815,7 @@ static unsigned int cs_set_adc_rate(struct cs_state *state, unsigned int rate) * dividend:remainder(ulOther / GOF_PER_SEC) * initialDelay = dividend(((24 * Fs,in) + Fs,out - 1) / Fs,out) */ + tmp1 = rate << 16; coeffIncr = tmp1 / 48000; tmp1 -= coeffIncr * 48000; @@ -879,7 +891,7 @@ static void cs_play_setup(struct cs_state *state) CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_play_setup()+\n") ); cs461x_poke(card, BA1_PVOL, 0x80008000); - if (!dmabuf->SGok) + if(!dmabuf->SGok) cs461x_poke(card, BA1_PBA, virt_to_bus(dmabuf->pbuf)); Count = 4; @@ -887,14 +899,16 @@ static void cs_play_setup(struct cs_state *state) if ((dmabuf->fmt & CS_FMT_STEREO)) { playFormat &= ~DMA_RQ_C2_AC_MONO_TO_STEREO; Count *= 2; - } else + } + else playFormat |= DMA_RQ_C2_AC_MONO_TO_STEREO; if ((dmabuf->fmt & CS_FMT_16BIT)) { playFormat &= ~(DMA_RQ_C2_AC_8_TO_16_BIT | DMA_RQ_C2_AC_SIGNED_CONVERT); Count *= 2; - } else + } + else playFormat |= (DMA_RQ_C2_AC_8_TO_16_BIT | DMA_RQ_C2_AC_SIGNED_CONVERT); @@ -905,6 +919,7 @@ static void cs_play_setup(struct cs_state *state) cs461x_poke(card, BA1_PDTC, tmp | --Count); CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_play_setup()-\n") ); + } static struct InitStruct @@ -929,7 +944,8 @@ static void SetCaptureSPValues(struct cs_card *card) { unsigned i, offset; CS_DBGOUT(CS_FUNCTION, 8, printk("cs46xx: SetCaptureSPValues()+\n") ); - for (i = 0; i < sizeof(InitArray) / sizeof(struct InitStruct); i++) { + for(i=0; icard; struct dmabuf *dmabuf = &state->dmabuf; + CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_rec_setup()+\n") ); - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_rec_setup()+\n")); SetCaptureSPValues(card); /* @@ -978,11 +994,14 @@ static inline unsigned cs_get_dma_addr(struct cs_state *state) /* * granularity is byte boundary, good part. */ - if (dmabuf->enable & DAC_RUNNING) + if(dmabuf->enable & DAC_RUNNING) + { offset = cs461x_peek(state->card, BA1_PBA); + } else /* ADC_RUNNING must be set */ + { offset = cs461x_peek(state->card, BA1_CBA); - + } CS_DBGOUT(CS_PARMS | CS_FUNCTION, 9, printk("cs46xx: cs_get_dma_addr() %d\n",offset) ); offset = (u32)bus_to_virt((unsigned long)offset) - (u32)dmabuf->rawbuf; @@ -996,7 +1015,8 @@ static void resync_dma_ptrs(struct cs_state *state) struct dmabuf *dmabuf; CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: resync_dma_ptrs()+ \n") ); - if (state) { + if(state) + { dmabuf = &state->dmabuf; dmabuf->hwptr=dmabuf->swptr = 0; dmabuf->pringbuf = 0; @@ -1129,13 +1149,13 @@ static int alloc_dmabuf(struct cs_state *state) /* * check for order within limits, but do not overwrite value. */ - if ((defaultorder > 1) && (defaultorder < 12)) + if((defaultorder > 1) && (defaultorder < 12)) df = defaultorder; else df = 2; for (order = df; order >= DMABUF_MINORDER; order--) - if ((rawbuf = (void *)pci_alloc_consistent( + if ( (rawbuf = (void *) pci_alloc_consistent( card->pci_dev, PAGE_SIZE << order, &dmabuf->dmaaddr))) break; if (!rawbuf) { @@ -1161,7 +1181,8 @@ static int alloc_dmabuf(struct cs_state *state) /* * only allocate the conversion buffer for the ADC */ - if (dmabuf->type == CS_TYPE_DAC) { + if(dmabuf->type == CS_TYPE_DAC) + { dmabuf->tmpbuff = NULL; dmabuf->buforder_tmpbuff = 0; return 0; @@ -1237,7 +1258,8 @@ static int __prog_dmabuf(struct cs_state *state) /* * check for CAPTURE and use only non-sg for initial release */ - if (dmabuf->type == CS_TYPE_ADC) { + if(dmabuf->type == CS_TYPE_ADC) + { CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf() ADC\n")); /* * add in non-sg support for capture. @@ -1291,7 +1313,9 @@ static int __prog_dmabuf(struct cs_state *state) CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- 0 \n")); return 0; - } else if (dmabuf->type == CS_TYPE_DAC) { + } + else if (dmabuf->type == CS_TYPE_DAC) + { /* * Must be DAC */ @@ -1313,7 +1337,8 @@ static int __prog_dmabuf(struct cs_state *state) allocated_pages = 1 << dmabuf->buforder; allocated_bytes = allocated_pages*PAGE_SIZE; - if (allocated_pages < 2) { + if(allocated_pages < 2) + { CS_DBGOUT(CS_FUNCTION, 4, printk( "cs46xx: prog_dmabuf() Error: allocated_pages too small (%d)\n", (unsigned)allocated_pages)); @@ -1328,14 +1353,14 @@ static int __prog_dmabuf(struct cs_state *state) /* Set up S/G variables. */ *ptmp = virt_to_bus(dmabuf->rawbuf); - *(ptmp + 1) = 0x00000008; - for (tmp1 = 1; tmp1 < nSGpages; tmp1++) { - *(ptmp + 2 * tmp1) = virt_to_bus((dmabuf->rawbuf) + 4096 * tmp1); - if (tmp1 == nSGpages - 1) + *(ptmp+1) = 0x00000008; + for(tmp1= 1; tmp1 < nSGpages; tmp1++) { + *(ptmp+2*tmp1) = virt_to_bus( (dmabuf->rawbuf)+4096*tmp1); + if( tmp1 == nSGpages-1) tmp2 = 0xbfff0000; else - tmp2 = 0x80000000 + 8 * (tmp1 + 1); - *(ptmp + 2 * tmp1 + 1) = tmp2; + tmp2 = 0x80000000+8*(tmp1+1); + *(ptmp+2*tmp1+1) = tmp2; } SGarray[0] = 0x82c0200d; SGarray[1] = 0xffff0000; @@ -1343,17 +1368,18 @@ static int __prog_dmabuf(struct cs_state *state) SGarray[3] = 0x00010600; SGarray[4] = *(ptmp+2); SGarray[5] = 0x80000010; - SGarray[6] = *ptmp; - SGarray[7] = *(ptmp+2); - SGarray[8] = (virt_to_bus(dmabuf->pbuf) & 0xffff000) | 0x10; - - if (dmabuf->SGok) { - dmabuf->numfrag = nSGpages; - dmabuf->fragsize = 4096; - dmabuf->fragsamples = 4096 >> sample_shift[dmabuf->fmt]; - dmabuf->fragshift = 12; - dmabuf->dmasize = dmabuf->numfrag * 4096; - } else { + SGarray[6] = *ptmp; + SGarray[7] = *(ptmp+2); + SGarray[8] = (virt_to_bus(dmabuf->pbuf) & 0xffff000) | 0x10; + + if (dmabuf->SGok) { + dmabuf->numfrag = nSGpages; + dmabuf->fragsize = 4096; + dmabuf->fragsamples = 4096 >> sample_shift[dmabuf->fmt]; + dmabuf->fragshift = 12; + dmabuf->dmasize = dmabuf->numfrag*4096; + } + else { SGarray[0] = 0xf2c0000f; SGarray[1] = 0x00000200; SGarray[2] = 0; @@ -1365,8 +1391,8 @@ static int __prog_dmabuf(struct cs_state *state) dmabuf->dmasize = 4096; dmabuf->fragshift = 11; } - for (tmp1 = 0; tmp1 < sizeof(SGarray) / 4; tmp1++) - cs461x_poke(state->card, BA1_PDTC+tmp1 * 4, SGarray[tmp1]); + for(tmp1 = 0; tmp1 < sizeof(SGarray)/4; tmp1++) + cs461x_poke( state->card, BA1_PDTC+tmp1*4, SGarray[tmp1]); memset(dmabuf->rawbuf, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, dmabuf->dmasize); @@ -1390,7 +1416,9 @@ static int __prog_dmabuf(struct cs_state *state) CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- \n")); return 0; - } else { + } + else + { CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- Invalid Type %d\n", dmabuf->type)); } @@ -1461,7 +1489,8 @@ static int drain_dac(struct cs_state *state, int nonblock) } remove_wait_queue(&dmabuf->wait, &wait); current->state = TASK_RUNNING; - if (signal_pending(current)) { + if (signal_pending(current)) + { CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: drain_dac()- -ERESTARTSYS\n")); /* * set to silence and let that clear the fifos. @@ -1485,7 +1514,8 @@ static void cs_update_ptr(struct cs_card *card, int wake) /* error handling and process wake up for ADC */ state = card->states[0]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; if (dmabuf->enable & ADC_RUNNING) { /* update hardware pointer */ @@ -1501,10 +1531,12 @@ static void cs_update_ptr(struct cs_card *card, int wake) if (dmabuf->count > dmabuf->dmasize) dmabuf->count = dmabuf->dmasize; - if (dmabuf->mapped) { + if(dmabuf->mapped) + { if (wake && dmabuf->count >= (signed)dmabuf->fragsize) wake_up(&dmabuf->wait); - } else { + } else + { if (wake && dmabuf->count > 0) wake_up(&dmabuf->wait); } @@ -1515,7 +1547,8 @@ static void cs_update_ptr(struct cs_card *card, int wake) * Now the DAC */ state = card->states[1]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; /* error handling and process wake up for DAC */ if (dmabuf->enable & DAC_RUNNING) { @@ -1537,7 +1570,7 @@ static void cs_update_ptr(struct cs_card *card, int wake) * in that, since dmasize is the buffer asked for * via mmap. */ - if (dmabuf->count > dmabuf->dmasize) + if( dmabuf->count > dmabuf->dmasize) dmabuf->count &= dmabuf->dmasize-1; } else { dmabuf->count -= diff; @@ -1545,10 +1578,13 @@ static void cs_update_ptr(struct cs_card *card, int wake) * backfill with silence and clear out the last * "diff" number of bytes. */ - if (hwptr >= diff) { + if(hwptr >= diff) + { memset(dmabuf->rawbuf + hwptr - diff, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, diff); - } else { + } + else + { memset(dmabuf->rawbuf, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, (unsigned)hwptr); @@ -1566,12 +1602,12 @@ static void cs_update_ptr(struct cs_card *card, int wake) * buffer underrun or buffer overrun, reset the * count of bytes written back to 0. */ - if (dmabuf->count < 0) - dmabuf->underrun = 1; + if(dmabuf->count < 0) + dmabuf->underrun=1; dmabuf->count = 0; dmabuf->error++; } - if (wake && dmabuf->count < (signed)dmabuf->dmasize / 2) + if (wake && dmabuf->count < (signed)dmabuf->dmasize/2) wake_up(&dmabuf->wait); } } @@ -1625,7 +1661,8 @@ static irqreturn_t cs_interrupt(int irq, void *dev_id, struct pt_regs *regs) status = cs461x_peekBA0(card, BA0_HISR); - if ((status & 0x7fffffff) == 0) { + if ((status & 0x7fffffff) == 0) + { cs461x_pokeBA0(card, BA0_HICR, HICR_CHGM|HICR_IEV); spin_unlock(&card->lock); return IRQ_HANDLED; /* Might be IRQ_NONE.. */ @@ -1634,14 +1671,15 @@ static irqreturn_t cs_interrupt(int irq, void *dev_id, struct pt_regs *regs) /* * check for playback or capture interrupt only */ - if (((status & HISR_VC0) && playstate && playstate->dmabuf.ready) || - (((status & HISR_VC1) && recstate && recstate->dmabuf.ready))) { + if( ((status & HISR_VC0) && playstate && playstate->dmabuf.ready) || + (((status & HISR_VC1) && recstate && recstate->dmabuf.ready)) ) + { CS_DBGOUT(CS_INTERRUPT, 8, printk( "cs46xx: cs_interrupt() interrupt bit(s) set (0x%x)\n",status)); cs_update_ptr(card, CS_TRUE); } - if (status & HISR_MIDI) + if( status & HISR_MIDI ) cs_handle_midi(card); /* clear 'em */ @@ -1656,7 +1694,7 @@ static irqreturn_t cs_interrupt(int irq, void *dev_id, struct pt_regs *regs) static ssize_t cs_midi_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; ssize_t ret; unsigned long flags; unsigned ptr; @@ -1699,7 +1737,7 @@ static ssize_t cs_midi_read(struct file *file, char __user *buffer, size_t count static ssize_t cs_midi_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; ssize_t ret; unsigned long flags; unsigned ptr; @@ -1747,7 +1785,7 @@ static ssize_t cs_midi_write(struct file *file, const char __user *buffer, size_ static unsigned int cs_midi_poll(struct file *file, struct poll_table_struct *wait) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; unsigned long flags; unsigned int mask = 0; @@ -1772,11 +1810,12 @@ static unsigned int cs_midi_poll(struct file *file, struct poll_table_struct *wa static int cs_midi_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); - struct cs_card *card = NULL; + struct cs_card *card=NULL; unsigned long flags; struct list_head *entry; - list_for_each(entry, &cs46xx_devs) { + list_for_each(entry, &cs46xx_devs) + { card = list_entry(entry, struct cs_card, list); if (card->dev_midi == minor) break; @@ -1784,7 +1823,8 @@ static int cs_midi_open(struct inode *inode, struct file *file) if (entry == &cs46xx_devs) return -ENODEV; - if (!card) { + if (!card) + { CS_DBGOUT(CS_FUNCTION | CS_OPEN, 2, printk(KERN_INFO "cs46xx: cs46xx_midi_open(): Error - unable to find card struct\n")); return -ENODEV; @@ -1812,10 +1852,12 @@ static int cs_midi_open(struct inode *inode, struct file *file) cs461x_pokeBA0(card, BA0_MIDCR, 0x0000000f); /* Enable xmit, rcv. */ cs461x_pokeBA0(card, BA0_HICR, HICR_IEV | HICR_CHGM); /* Enable interrupts */ } - if (file->f_mode & FMODE_READ) + if (file->f_mode & FMODE_READ) { card->midi.ird = card->midi.iwr = card->midi.icnt = 0; - if (file->f_mode & FMODE_WRITE) + } + if (file->f_mode & FMODE_WRITE) { card->midi.ord = card->midi.owr = card->midi.ocnt = 0; + } spin_unlock_irqrestore(&card->midi.lock, flags); card->midi.open_mode |= (file->f_mode & (FMODE_READ | FMODE_WRITE)); mutex_unlock(&card->midi.open_mutex); @@ -1825,7 +1867,7 @@ static int cs_midi_open(struct inode *inode, struct file *file) static int cs_midi_release(struct inode *inode, struct file *file) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; DECLARE_WAITQUEUE(wait, current); unsigned long flags; unsigned count, tmo; @@ -1891,10 +1933,11 @@ static /*const*/ struct file_operations cs_midi_fops = { static void CopySamples(char *dst, char *src, int count, unsigned fmt, struct dmabuf *dmabuf) { + s32 s32AudioSample; - s16 *psSrc = (s16 *)src; - s16 *psDst = (s16 *)dst; - u8 *pucDst = (u8 *)dst; + s16 *psSrc=(s16 *)src; + s16 *psDst=(s16 *)dst; + u8 *pucDst=(u8 *)dst; CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: CopySamples()+ ") ); CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO @@ -1904,29 +1947,34 @@ static void CopySamples(char *dst, char *src, int count, unsigned fmt, /* * See if the data should be output as 8-bit unsigned stereo. */ - if ((fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) { + if((fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) + { /* * Convert each 16-bit signed stereo sample to 8-bit unsigned * stereo using rounding. */ psSrc = (s16 *)src; - count = count / 2; - while (count--) + count = count/2; + while(count--) + { *(pucDst++) = (u8)(((s16)(*psSrc++) + (s16)0x8000) >> 8); + } } /* * See if the data should be output at 8-bit unsigned mono. */ - else if (!(fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) { + else if(!(fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) + { /* * Convert each 16-bit signed stereo sample to 8-bit unsigned * mono using averaging and rounding. */ psSrc = (s16 *)src; - count = count / 2; - while (count--) { - s32AudioSample = ((*psSrc) + (*(psSrc + 1))) / 2 + (s32)0x80; - if (s32AudioSample > 0x7fff) + count = count/2; + while(count--) + { + s32AudioSample = ((*psSrc)+(*(psSrc + 1)))/2 + (s32)0x80; + if(s32AudioSample > 0x7fff) s32AudioSample = 0x7fff; *(pucDst++) = (u8)(((s16)s32AudioSample + (s16)0x8000) >> 8); psSrc += 2; @@ -1935,15 +1983,17 @@ static void CopySamples(char *dst, char *src, int count, unsigned fmt, /* * See if the data should be output at 16-bit signed mono. */ - else if (!(fmt & CS_FMT_STEREO) && (fmt & CS_FMT_16BIT)) { + else if(!(fmt & CS_FMT_STEREO) && (fmt & CS_FMT_16BIT)) + { /* * Convert each 16-bit signed stereo sample to 16-bit signed * mono using averaging. */ psSrc = (s16 *)src; - count = count / 2; - while (count--) { - *(psDst++) = (s16)((*psSrc) + (*(psSrc + 1))) / 2; + count = count/2; + while(count--) + { + *(psDst++) = (s16)((*psSrc)+(*(psSrc + 1)))/2; psSrc += 2; } } @@ -1970,15 +2020,20 @@ static unsigned cs_copy_to_user( "cs_copy_to_user()+ fmt=0x%x cnt=%d dest=%p\n", dmabuf->fmt,(unsigned)cnt,dest) ); - if (cnt > dmabuf->dmasize) + if(cnt > dmabuf->dmasize) + { cnt = dmabuf->dmasize; - if (!cnt) { + } + if(!cnt) + { *copied = 0; return 0; } - if (dmabuf->divisor != 1) { - if (!dmabuf->tmpbuff) { - *copied = cnt / dmabuf->divisor; + if(dmabuf->divisor != 1) + { + if(!dmabuf->tmpbuff) + { + *copied = cnt/dmabuf->divisor; return 0; } @@ -1987,16 +2042,17 @@ static unsigned cs_copy_to_user( src = dmabuf->tmpbuff; cnt = cnt/dmabuf->divisor; } - if (copy_to_user(dest, src, cnt)) { + if (copy_to_user(dest, src, cnt)) + { CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_ERR "cs46xx: cs_copy_to_user()- fault dest=%p src=%p cnt=%d\n", - dest,src,cnt)); + dest,src,cnt) ); *copied = 0; return -EFAULT; } *copied = cnt; CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: cs_copy_to_user()- copied bytes is %d \n",cnt)); + "cs46xx: cs_copy_to_user()- copied bytes is %d \n",cnt) ); return 0; } @@ -2004,7 +2060,7 @@ static unsigned cs_copy_to_user( the user's buffer. it is filled by the dma machine and drained by this loop. */ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *) file->private_data; struct cs_state *state; DECLARE_WAITQUEUE(wait, current); struct dmabuf *dmabuf; @@ -2012,12 +2068,12 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof unsigned long flags; unsigned swptr; int cnt; - unsigned copied = 0; + unsigned copied=0; CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, printk("cs46xx: cs_read()+ %zd\n",count) ); - state = card->states[0]; - if (!state) + state = (struct cs_state *)card->states[0]; + if(!state) return -ENODEV; dmabuf = &state->dmabuf; @@ -2032,11 +2088,11 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof add_wait_queue(&state->dmabuf.wait, &wait); while (count > 0) { - while (!(card->pm.flags & CS46XX_PM_IDLE)) { + while(!(card->pm.flags & CS46XX_PM_IDLE)) + { schedule(); if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; + if(!ret) ret = -ERESTARTSYS; goto out; } } @@ -2056,20 +2112,19 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof recorded */ start_adc(state); if (file->f_flags & O_NONBLOCK) { - if (!ret) - ret = -EAGAIN; + if (!ret) ret = -EAGAIN; goto out; } mutex_unlock(&state->sem); schedule(); if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; + if(!ret) ret = -ERESTARTSYS; goto out; } mutex_lock(&state->sem); - if (dmabuf->mapped) { - if (!ret) + if (dmabuf->mapped) + { + if(!ret) ret = -ENXIO; goto out; } @@ -2080,12 +2135,12 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof "_read() copy_to cnt=%d count=%zd ", cnt,count) ); CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO " .dmasize=%d .count=%d buffer=%p ret=%zd\n", - dmabuf->dmasize,dmabuf->count,buffer,ret)); + dmabuf->dmasize,dmabuf->count,buffer,ret) ); if (cs_copy_to_user(state, buffer, - (char *)dmabuf->rawbuf + swptr, cnt, &copied)) { - if (!ret) - ret = -EFAULT; + (char *)dmabuf->rawbuf + swptr, cnt, &copied)) + { + if (!ret) ret = -EFAULT; goto out; } swptr = (swptr + cnt) % dmabuf->dmasize; @@ -2112,7 +2167,7 @@ out2: the soundcard. it is drained by the dma machine and filled by this loop. */ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *) file->private_data; struct cs_state *state; DECLARE_WAITQUEUE(wait, current); struct dmabuf *dmabuf; @@ -2123,15 +2178,16 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 4, printk("cs46xx: cs_write called, count = %zd\n", count) ); - state = card->states[1]; - if (!state) + state = (struct cs_state *)card->states[1]; + if(!state) return -ENODEV; if (!access_ok(VERIFY_READ, buffer, count)) return -EFAULT; dmabuf = &state->dmabuf; mutex_lock(&state->sem); - if (dmabuf->mapped) { + if (dmabuf->mapped) + { ret = -ENXIO; goto out; } @@ -2145,11 +2201,11 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou * check for PM events and underrun/overrun in the loop. */ while (count > 0) { - while (!(card->pm.flags & CS46XX_PM_IDLE)) { + while(!(card->pm.flags & CS46XX_PM_IDLE)) + { schedule(); if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; + if(!ret) ret = -ERESTARTSYS; goto out; } } @@ -2160,7 +2216,8 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou dmabuf->count = 0; dmabuf->swptr = dmabuf->hwptr; } - if (dmabuf->underrun) { + if (dmabuf->underrun) + { dmabuf->underrun = 0; dmabuf->hwptr = cs_get_dma_addr(state); dmabuf->swptr = dmabuf->hwptr; @@ -2181,35 +2238,34 @@ static ssize_t cs_write(struct file *file, const char __user *buffer, size_t cou played */ start_dac(state); if (file->f_flags & O_NONBLOCK) { - if (!ret) - ret = -EAGAIN; + if (!ret) ret = -EAGAIN; goto out; } mutex_unlock(&state->sem); schedule(); if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; + if(!ret) ret = -ERESTARTSYS; goto out; } mutex_lock(&state->sem); - if (dmabuf->mapped) { - if (!ret) + if (dmabuf->mapped) + { + if(!ret) ret = -ENXIO; goto out; } continue; } if (copy_from_user(dmabuf->rawbuf + swptr, buffer, cnt)) { - if (!ret) - ret = -EFAULT; + if (!ret) ret = -EFAULT; goto out; } spin_lock_irqsave(&state->card->lock, flags); swptr = (swptr + cnt) % dmabuf->dmasize; dmabuf->swptr = swptr; dmabuf->count += cnt; - if (dmabuf->count > dmabuf->dmasize) { + if(dmabuf->count > dmabuf->dmasize) + { CS_DBGOUT(CS_WAVE_WRITE | CS_ERROR, 2, printk( "cs46xx: cs_write() d->count > dmasize - resetting\n")); dmabuf->count = dmabuf->dmasize; @@ -2228,32 +2284,38 @@ out: set_current_state(TASK_RUNNING); CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 2, - printk("cs46xx: cs_write()- ret=%zd\n", ret)); + printk("cs46xx: cs_write()- ret=%zd\n", ret) ); return ret; } static unsigned int cs_poll(struct file *file, struct poll_table_struct *wait) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; struct dmabuf *dmabuf; struct cs_state *state; + unsigned long flags; unsigned int mask = 0; CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_poll()+ \n")); - if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) { + if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) + { return -EINVAL; } - if (file->f_mode & FMODE_WRITE) { + if (file->f_mode & FMODE_WRITE) + { state = card->states[1]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; poll_wait(file, &dmabuf->wait, wait); } } - if (file->f_mode & FMODE_READ) { + if (file->f_mode & FMODE_READ) + { state = card->states[0]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; poll_wait(file, &dmabuf->wait, wait); } @@ -2263,7 +2325,8 @@ static unsigned int cs_poll(struct file *file, struct poll_table_struct *wait) cs_update_ptr(card, CS_FALSE); if (file->f_mode & FMODE_READ) { state = card->states[0]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; if (dmabuf->count >= (signed)dmabuf->fragsize) mask |= POLLIN | POLLRDNORM; @@ -2271,7 +2334,8 @@ static unsigned int cs_poll(struct file *file, struct poll_table_struct *wait) } if (file->f_mode & FMODE_WRITE) { state = card->states[1]; - if (state) { + if(state) + { dmabuf = &state->dmabuf; if (dmabuf->mapped) { if (dmabuf->count >= (signed)dmabuf->fragsize) @@ -2300,7 +2364,7 @@ static unsigned int cs_poll(struct file *file, struct poll_table_struct *wait) static int cs_mmap(struct file *file, struct vm_area_struct *vma) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; struct cs_state *state; struct dmabuf *dmabuf; int ret = 0; @@ -2312,7 +2376,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) if (vma->vm_flags & VM_WRITE) { state = card->states[1]; - if (state) { + if(state) + { CS_DBGOUT(CS_OPEN, 2, printk( "cs46xx: cs_mmap() VM_WRITE - state TRUE prog_dmabuf DAC\n") ); if ((ret = prog_dmabuf(state)) != 0) @@ -2320,7 +2385,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) } } else if (vma->vm_flags & VM_READ) { state = card->states[0]; - if (state) { + if(state) + { CS_DBGOUT(CS_OPEN, 2, printk( "cs46xx: cs_mmap() VM_READ - state TRUE prog_dmabuf ADC\n") ); if ((ret = prog_dmabuf(state)) != 0) @@ -2348,7 +2414,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) mutex_lock(&state->sem); dmabuf = &state->dmabuf; - if (cs4x_pgoff(vma) != 0) { + if (cs4x_pgoff(vma) != 0) + { ret = -EINVAL; goto out; } @@ -2356,13 +2423,15 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) CS_DBGOUT(CS_PARMS, 2, printk("cs46xx: cs_mmap(): size=%d\n",(unsigned)size) ); - if (size > (PAGE_SIZE << dmabuf->buforder)) { + if (size > (PAGE_SIZE << dmabuf->buforder)) + { ret = -EINVAL; goto out; } if (remap_pfn_range(vma, vma->vm_start, virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, - size, vma->vm_page_prot)) { + size, vma->vm_page_prot)) + { ret = -EAGAIN; goto out; } @@ -2376,24 +2445,25 @@ out: static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; struct cs_state *state; - struct dmabuf *dmabuf = NULL; + struct dmabuf *dmabuf=NULL; unsigned long flags; audio_buf_info abinfo; count_info cinfo; - int val, valsave, ret; - int mapped = 0; + int val, valsave, mapped, ret; void __user *argp = (void __user *)arg; int __user *p = argp; - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; mapped = (file->f_mode & FMODE_READ) && dmabuf->mapped; } - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; mapped |= (file->f_mode & FMODE_WRITE) && dmabuf->mapped; } @@ -2402,14 +2472,17 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un printioctl(cmd); #endif - switch (cmd) { + switch (cmd) + { case OSS_GETVERSION: return put_user(SOUND_VERSION, p); + case SNDCTL_DSP_RESET: /* FIXME: spin_lock ? */ if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; stop_dac(state); synchronize_irq(card->irq); @@ -2422,8 +2495,9 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; stop_adc(state); synchronize_irq(card->irq); @@ -2437,17 +2511,20 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_RESET()-\n") ); return 0; + case SNDCTL_DSP_SYNC: if (file->f_mode & FMODE_WRITE) return drain_dac(state, file->f_flags & O_NONBLOCK); return 0; + case SNDCTL_DSP_SPEED: /* set sample rate */ if (get_user(val, p)) return -EFAULT; if (val >= 0) { if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; stop_adc(state); dmabuf->ready = 0; @@ -2457,8 +2534,9 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; stop_dac(state); dmabuf->ready = 0; @@ -2475,17 +2553,19 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return put_user(dmabuf->rate, p); } return put_user(0, p); + case SNDCTL_DSP_STEREO: /* set stereo or mono channel */ if (get_user(val, p)) return -EFAULT; if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; stop_dac(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val) + if(val) dmabuf->fmt |= CS_FMT_STEREO; else dmabuf->fmt &= ~CS_FMT_STEREO; @@ -2497,13 +2577,14 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; stop_adc(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val) + if(val) dmabuf->fmt |= CS_FMT_STEREO; else dmabuf->fmt &= ~CS_FMT_STEREO; @@ -2515,10 +2596,12 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } return 0; + case SNDCTL_DSP_GETBLKSIZE: if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; if ((val = prog_dmabuf(state))) return val; @@ -2526,8 +2609,9 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; if ((val = prog_dmabuf(state))) return val; @@ -2536,8 +2620,10 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } return put_user(0, p); + case SNDCTL_DSP_GETFMTS: /* Returns a mask of supported sample format*/ return put_user(AFMT_S16_LE | AFMT_U8, p); + case SNDCTL_DSP_SETFMT: /* Select sample format */ if (get_user(val, p)) return -EFAULT; @@ -2549,75 +2635,88 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un val == AFMT_U8 ? "8Bit Unsigned" : "") ); valsave = val; if (val != AFMT_QUERY) { - if (val==AFMT_S16_LE || val==AFMT_U8) { + if(val==AFMT_S16_LE || val==AFMT_U8) + { if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; stop_dac(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val == AFMT_S16_LE) + if(val==AFMT_S16_LE) dmabuf->fmt |= CS_FMT_16BIT; else dmabuf->fmt &= ~CS_FMT_16BIT; cs_set_divisor(dmabuf); - if ((ret = prog_dmabuf(state))) + if((ret = prog_dmabuf(state))) return ret; } } if (file->f_mode & FMODE_READ) { val = valsave; - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; stop_adc(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val == AFMT_S16_LE) + if(val==AFMT_S16_LE) dmabuf->fmt |= CS_FMT_16BIT; else dmabuf->fmt &= ~CS_FMT_16BIT; cs_set_divisor(dmabuf); - if ((ret = prog_dmabuf(state))) + if((ret = prog_dmabuf(state))) return ret; } } - } else { + } + else + { CS_DBGOUT(CS_IOCTL | CS_ERROR, 2, printk( "cs46xx: DSP_SETFMT() Unsupported format (0x%x)\n", valsave) ); } - } else { - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) + } + else + { + if(file->f_mode & FMODE_WRITE) + { + state = (struct cs_state *)card->states[1]; + if(state) dmabuf = &state->dmabuf; - } else if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) + } + else if(file->f_mode & FMODE_READ) + { + state = (struct cs_state *)card->states[0]; + if(state) dmabuf = &state->dmabuf; } } - if (dmabuf) { - if (dmabuf->fmt & CS_FMT_16BIT) + if(dmabuf) + { + if(dmabuf->fmt & CS_FMT_16BIT) return put_user(AFMT_S16_LE, p); else return put_user(AFMT_U8, p); } return put_user(0, p); + case SNDCTL_DSP_CHANNELS: if (get_user(val, p)) return -EFAULT; if (val != 0) { if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; stop_dac(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val > 1) + if(val>1) dmabuf->fmt |= CS_FMT_STEREO; else dmabuf->fmt &= ~CS_FMT_STEREO; @@ -2627,13 +2726,14 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; stop_adc(state); dmabuf->ready = 0; dmabuf->SGok = 0; - if (val > 1) + if(val>1) dmabuf->fmt |= CS_FMT_STEREO; else dmabuf->fmt &= ~CS_FMT_STEREO; @@ -2645,16 +2745,19 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } return put_user((dmabuf->fmt & CS_FMT_STEREO) ? 2 : 1, p); + case SNDCTL_DSP_POST: /* * There will be a longer than normal pause in the data. * so... do nothing, because there is nothing that we can do. */ return 0; + case SNDCTL_DSP_SUBDIVIDE: if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; if (dmabuf->subdivision) return -EINVAL; @@ -2666,8 +2769,9 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; if (dmabuf->subdivision) return -EINVAL; @@ -2679,31 +2783,37 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } return 0; + case SNDCTL_DSP_SETFRAGMENT: if (get_user(val, p)) return -EFAULT; + if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; dmabuf->ossfragshift = val & 0xffff; dmabuf->ossmaxfrags = (val >> 16) & 0xffff; } } if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; dmabuf->ossfragshift = val & 0xffff; dmabuf->ossmaxfrags = (val >> 16) & 0xffff; } } return 0; + case SNDCTL_DSP_GETOSPACE: if (!(file->f_mode & FMODE_WRITE)) return -EINVAL; - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; spin_lock_irqsave(&state->card->lock, flags); cs_update_ptr(card, CS_TRUE); @@ -2722,11 +2832,13 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return copy_to_user(argp, &abinfo, sizeof(abinfo)) ? -EFAULT : 0; } return -ENODEV; + case SNDCTL_DSP_GETISPACE: if (!(file->f_mode & FMODE_READ)) return -EINVAL; - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; spin_lock_irqsave(&state->card->lock, flags); cs_update_ptr(card, CS_TRUE); @@ -2738,39 +2850,48 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return copy_to_user(argp, &abinfo, sizeof(abinfo)) ? -EFAULT : 0; } return -ENODEV; + case SNDCTL_DSP_NONBLOCK: file->f_flags |= O_NONBLOCK; return 0; + case SNDCTL_DSP_GETCAPS: return put_user(DSP_CAP_REALTIME|DSP_CAP_TRIGGER|DSP_CAP_MMAP, p); + case SNDCTL_DSP_GETTRIGGER: val = 0; CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_GETTRIGGER()+\n") ); - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + if (file->f_mode & FMODE_WRITE) + { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; - if (dmabuf->enable & DAC_RUNNING) + if(dmabuf->enable & DAC_RUNNING) val |= PCM_ENABLE_INPUT; } } - if (file->f_mode & FMODE_READ) { - if (state) { - state = card->states[0]; + if (file->f_mode & FMODE_READ) + { + if(state) + { + state = (struct cs_state *)card->states[0]; dmabuf = &state->dmabuf; - if (dmabuf->enable & ADC_RUNNING) + if(dmabuf->enable & ADC_RUNNING) val |= PCM_ENABLE_OUTPUT; } } CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_GETTRIGGER()- val=0x%x\n",val) ); return put_user(val, p); + case SNDCTL_DSP_SETTRIGGER: if (get_user(val, p)) return -EFAULT; if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; if (val & PCM_ENABLE_INPUT) { if (!dmabuf->ready && (ret = prog_dmabuf(state))) @@ -2781,8 +2902,9 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; if (val & PCM_ENABLE_OUTPUT) { if (!dmabuf->ready && (ret = prog_dmabuf(state))) @@ -2793,11 +2915,13 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un } } return 0; + case SNDCTL_DSP_GETIPTR: if (!(file->f_mode & FMODE_READ)) return -EINVAL; - state = card->states[0]; - if (state) { + state = (struct cs_state *)card->states[0]; + if(state) + { dmabuf = &state->dmabuf; spin_lock_irqsave(&state->card->lock, flags); cs_update_ptr(card, CS_TRUE); @@ -2810,23 +2934,28 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return 0; } return -ENODEV; + case SNDCTL_DSP_GETOPTR: if (!(file->f_mode & FMODE_WRITE)) return -EINVAL; - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; spin_lock_irqsave(&state->card->lock, flags); cs_update_ptr(card, CS_TRUE); cinfo.bytes = dmabuf->total_bytes; - if (dmabuf->mapped) { + if (dmabuf->mapped) + { cinfo.blocks = (cinfo.bytes >> dmabuf->fragshift) - dmabuf->blocks; CS_DBGOUT(CS_PARMS, 8, printk("total_bytes=%d blocks=%d dmabuf->blocks=%d\n", cinfo.bytes,cinfo.blocks,dmabuf->blocks) ); dmabuf->blocks = cinfo.bytes >> dmabuf->fragshift; - } else { + } + else + { cinfo.blocks = dmabuf->count >> dmabuf->fragshift; } cinfo.ptr = dmabuf->hwptr; @@ -2840,54 +2969,66 @@ static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un return 0; } return -ENODEV; + case SNDCTL_DSP_SETDUPLEX: return 0; + case SNDCTL_DSP_GETODELAY: if (!(file->f_mode & FMODE_WRITE)) return -EINVAL; - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; spin_lock_irqsave(&state->card->lock, flags); cs_update_ptr(card, CS_TRUE); val = dmabuf->count; spin_unlock_irqrestore(&state->card->lock, flags); - } else + } + else val = 0; return put_user(val, p); + case SOUND_PCM_READ_RATE: - if (file->f_mode & FMODE_READ) - state = card->states[0]; + if(file->f_mode & FMODE_READ) + state = (struct cs_state *)card->states[0]; else - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; return put_user(dmabuf->rate, p); } return put_user(0, p); + + case SOUND_PCM_READ_CHANNELS: - if (file->f_mode & FMODE_READ) - state = card->states[0]; + if(file->f_mode & FMODE_READ) + state = (struct cs_state *)card->states[0]; else - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; return put_user((dmabuf->fmt & CS_FMT_STEREO) ? 2 : 1, p); } return put_user(0, p); + case SOUND_PCM_READ_BITS: - if (file->f_mode & FMODE_READ) - state = card->states[0]; + if(file->f_mode & FMODE_READ) + state = (struct cs_state *)card->states[0]; else - state = card->states[1]; - if (state) { + state = (struct cs_state *)card->states[1]; + if(state) + { dmabuf = &state->dmabuf; return put_user((dmabuf->fmt & CS_FMT_16BIT) ? AFMT_S16_LE : AFMT_U8, p); } return put_user(0, p); + case SNDCTL_DSP_MAPINBUF: case SNDCTL_DSP_MAPOUTBUF: case SNDCTL_DSP_SETSYNCRO: @@ -2916,15 +3057,18 @@ static void amp_voyetra(struct cs_card *card, int change) /* Manage the EAPD bit on the Crystal 4297 and the Analog AD1885 */ - int old = card->amplifier; + int old=card->amplifier; card->amplifier+=change; - if (card->amplifier && !old) { + if(card->amplifier && !old) + { /* Turn the EAPD amp on */ cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) | 0x8000); - } else if(old && !card->amplifier) { + } + else if(old && !card->amplifier) + { /* Turn the EAPD amp off */ cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & @@ -2939,21 +3083,25 @@ static void amp_voyetra(struct cs_card *card, int change) static void amp_hercules(struct cs_card *card, int change) { - int old = card->amplifier; - if (!card) { + int old=card->amplifier; + if(!card) + { CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO "cs46xx: amp_hercules() called before initialized.\n")); return; } card->amplifier+=change; - if ((card->amplifier && !old) && !(hercules_egpio_disable)) { + if( (card->amplifier && !old) && !(hercules_egpio_disable)) + { CS_DBGOUT(CS_PARMS, 4, printk(KERN_INFO "cs46xx: amp_hercules() external amp enabled\n")); cs461x_pokeBA0(card, BA0_EGPIODR, EGPIODR_GPOE2); /* enable EGPIO2 output */ cs461x_pokeBA0(card, BA0_EGPIOPTR, EGPIOPTR_GPPT2); /* open-drain on output */ - } else if (old && !card->amplifier) { + } + else if(old && !card->amplifier) + { CS_DBGOUT(CS_PARMS, 4, printk(KERN_INFO "cs46xx: amp_hercules() external amp disabled\n")); cs461x_pokeBA0(card, BA0_EGPIODR, 0); /* disable */ @@ -2976,28 +3124,31 @@ static void clkrun_hack(struct cs_card *card, int change) u16 control; u8 pp; unsigned long port; - int old = card->active; + int old=card->active; card->active+=change; acpi_dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL); - if (acpi_dev == NULL) + if(acpi_dev == NULL) return; /* Not a thinkpad thats for sure */ /* Find the control port */ pci_read_config_byte(acpi_dev, 0x41, &pp); - port = pp << 8; + port=pp<<8; /* Read ACPI port */ - control = inw(port + 0x10); + control=inw(port+0x10); /* Flip CLKRUN off while running */ - if (!card->active && old) { + if(!card->active && old) + { CS_DBGOUT(CS_PARMS , 9, printk( KERN_INFO "cs46xx: clkrun() enable clkrun - change=%d active=%d\n", change,card->active)); outw(control|0x2000, port+0x10); - } else { + } + else + { /* * sometimes on a resume the bit is set, so always reset the bit. */ @@ -3011,19 +3162,20 @@ static void clkrun_hack(struct cs_card *card, int change) static int cs_open(struct inode *inode, struct file *file) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; struct cs_state *state = NULL; struct dmabuf *dmabuf = NULL; struct list_head *entry; unsigned int minor = iminor(inode); - int ret = 0; + int ret=0; unsigned int tmp; CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()+ file=%p %s %s\n", file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", file->f_mode & FMODE_READ ? "FMODE_READ" : "") ); - list_for_each(entry, &cs46xx_devs) { + list_for_each(entry, &cs46xx_devs) + { card = list_entry(entry, struct cs_card, list); if (!((card->dev_audio ^ minor) & ~0xf)) @@ -3040,10 +3192,11 @@ static int cs_open(struct inode *inode, struct file *file) /* * hardcode state[0] for capture, [1] for playback */ - if (file->f_mode & FMODE_READ) { + if(file->f_mode & FMODE_READ) + { CS_DBGOUT(CS_WAVE_READ, 2, printk("cs46xx: cs_open() FMODE_READ\n") ); if (card->states[0] == NULL) { - state = card->states[0] = + state = card->states[0] = (struct cs_state *) kmalloc(sizeof(struct cs_state), GFP_KERNEL); if (state == NULL) return -ENOMEM; @@ -3051,32 +3204,36 @@ static int cs_open(struct inode *inode, struct file *file) mutex_init(&state->sem); dmabuf = &state->dmabuf; dmabuf->pbuf = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (dmabuf->pbuf == NULL) { + if(dmabuf->pbuf==NULL) + { kfree(state); - card->states[0] = NULL; + card->states[0]=NULL; return -ENOMEM; } - } else { + } + else + { state = card->states[0]; - if (state->open_mode & FMODE_READ) + if(state->open_mode & FMODE_READ) return -EBUSY; } dmabuf->channel = card->alloc_rec_pcm_channel(card); if (dmabuf->channel == NULL) { - kfree(card->states[0]); + kfree (card->states[0]); card->states[0] = NULL; return -ENODEV; } /* Now turn on external AMP if needed */ state->card = card; - state->card->active_ctrl(state->card, 1); - state->card->amplifier_ctrl(state->card, 1); + state->card->active_ctrl(state->card,1); + state->card->amplifier_ctrl(state->card,1); - if ((tmp = cs46xx_powerup(card, CS_POWER_ADC))) { + if( (tmp = cs46xx_powerup(card, CS_POWER_ADC)) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_powerup of ADC failed (0x%x)\n", tmp)); + "cs46xx: cs46xx_powerup of ADC failed (0x%x)\n",tmp) ); return -EIO; } @@ -3106,10 +3263,11 @@ static int cs_open(struct inode *inode, struct file *file) state->open_mode |= FMODE_READ; mutex_unlock(&state->open_mutex); } - if (file->f_mode & FMODE_WRITE) { + if(file->f_mode & FMODE_WRITE) + { CS_DBGOUT(CS_OPEN, 2, printk("cs46xx: cs_open() FMODE_WRITE\n") ); if (card->states[1] == NULL) { - state = card->states[1] = + state = card->states[1] = (struct cs_state *) kmalloc(sizeof(struct cs_state), GFP_KERNEL); if (state == NULL) return -ENOMEM; @@ -3117,32 +3275,36 @@ static int cs_open(struct inode *inode, struct file *file) mutex_init(&state->sem); dmabuf = &state->dmabuf; dmabuf->pbuf = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (dmabuf->pbuf == NULL) { + if(dmabuf->pbuf==NULL) + { kfree(state); - card->states[1] = NULL; + card->states[1]=NULL; return -ENOMEM; } - } else { + } + else + { state = card->states[1]; - if (state->open_mode & FMODE_WRITE) + if(state->open_mode & FMODE_WRITE) return -EBUSY; } dmabuf->channel = card->alloc_pcm_channel(card); if (dmabuf->channel == NULL) { - kfree(card->states[1]); + kfree (card->states[1]); card->states[1] = NULL; return -ENODEV; } /* Now turn on external AMP if needed */ state->card = card; - state->card->active_ctrl(state->card, 1); - state->card->amplifier_ctrl(state->card, 1); + state->card->active_ctrl(state->card,1); + state->card->amplifier_ctrl(state->card,1); - if ((tmp = cs46xx_powerup(card, CS_POWER_DAC))) { + if( (tmp = cs46xx_powerup(card, CS_POWER_DAC)) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_powerup of DAC failed (0x%x)\n", tmp)); + "cs46xx: cs46xx_powerup of DAC failed (0x%x)\n",tmp) ); return -EIO; } @@ -3171,29 +3333,33 @@ static int cs_open(struct inode *inode, struct file *file) state->open_mode |= FMODE_WRITE; mutex_unlock(&state->open_mutex); - if ((ret = prog_dmabuf(state))) + if((ret = prog_dmabuf(state))) return ret; } - CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()- 0\n")); + CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()- 0\n") ); return nonseekable_open(inode, file); } static int cs_release(struct inode *inode, struct file *file) { - struct cs_card *card = file->private_data; + struct cs_card *card = (struct cs_card *)file->private_data; struct dmabuf *dmabuf; struct cs_state *state; unsigned int tmp; CS_DBGOUT(CS_RELEASE | CS_FUNCTION, 2, printk("cs46xx: cs_release()+ file=%p %s %s\n", file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", - file->f_mode & FMODE_READ ? "FMODE_READ" : "")); + file->f_mode & FMODE_READ ? "FMODE_READ" : "") ); if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) + { return -EINVAL; + } state = card->states[1]; - if (state) { - if ((state->open_mode & FMODE_WRITE) & (file->f_mode & FMODE_WRITE)) { - CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_WRITE\n")); + if(state) + { + if ( (state->open_mode & FMODE_WRITE) & (file->f_mode & FMODE_WRITE) ) + { + CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_WRITE\n") ); dmabuf = &state->dmabuf; cs_clear_tail(state); drain_dac(state, file->f_flags & O_NONBLOCK); @@ -3209,7 +3375,8 @@ static int cs_release(struct inode *inode, struct file *file) state->card->states[state->virt] = NULL; state->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE); - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC, CS_FALSE))) { + if( (tmp = cs461x_powerdown(card, CS_POWER_DAC, CS_FALSE )) ) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO "cs46xx: cs_release_mixdev() powerdown DAC failure (0x%x)\n",tmp) ); } @@ -3217,14 +3384,17 @@ static int cs_release(struct inode *inode, struct file *file) /* Now turn off external AMP if needed */ state->card->amplifier_ctrl(state->card, -1); state->card->active_ctrl(state->card, -1); + kfree(state); } } state = card->states[0]; - if (state) { - if ((state->open_mode & FMODE_READ) & (file->f_mode & FMODE_READ)) { - CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_READ\n")); + if(state) + { + if ( (state->open_mode & FMODE_READ) & (file->f_mode & FMODE_READ) ) + { + CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_READ\n") ); dmabuf = &state->dmabuf; mutex_lock(&state->open_mutex); stop_adc(state); @@ -3237,7 +3407,8 @@ static int cs_release(struct inode *inode, struct file *file) state->card->states[state->virt] = NULL; state->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE); - if ((tmp = cs461x_powerdown(card, CS_POWER_ADC, CS_FALSE))) { + if( (tmp = cs461x_powerdown(card, CS_POWER_ADC, CS_FALSE )) ) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO "cs46xx: cs_release_mixdev() powerdown ADC failure (0x%x)\n",tmp) ); } @@ -3245,11 +3416,12 @@ static int cs_release(struct inode *inode, struct file *file) /* Now turn off external AMP if needed */ state->card->amplifier_ctrl(state->card, -1); state->card->active_ctrl(state->card, -1); + kfree(state); } } - CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 2, printk("cs46xx: cs_release()- 0\n")); + CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 2, printk("cs46xx: cs_release()- 0\n") ); return 0; } @@ -3302,18 +3474,21 @@ static void cs46xx_ac97_suspend(struct cs_card *card) CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_suspend()+\n")); - if (card->states[1]) { + if(card->states[1]) + { stop_dac(card->states[1]); resync_dma_ptrs(card->states[1]); } - if (card->states[0]) { + if(card->states[0]) + { stop_adc(card->states[0]); resync_dma_ptrs(card->states[0]); } - for (Count = 0x2, i = 0; (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) - && (i < CS46XX_AC97_NUMBER_RESTORE_REGS); - Count += 2, i++) { + for(Count = 0x2, i=0; (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) + && (i < CS46XX_AC97_NUMBER_RESTORE_REGS); + Count += 2, i++) + { card->pm.ac97[i] = cs_ac97_get(dev, BA0_AC97_RESET + Count); } /* @@ -3347,10 +3522,11 @@ static void cs46xx_ac97_suspend(struct cs_card *card) * well, for now, only power down the DAC/ADC and MIXER VREFON components. * trouble with removing VREF. */ - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_TRUE))) { + if( (tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | + CS_POWER_MIXVON, CS_TRUE )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_ac97_suspend() failure (0x%x)\n",tmp)); + "cs46xx: cs46xx_ac97_suspend() failure (0x%x)\n",tmp) ); } CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_suspend()-\n")); @@ -3390,13 +3566,16 @@ static void cs46xx_ac97_resume(struct cs_card *card) * Restore just the first set of registers, from register number * 0x02 to the register number that ulHighestRegToRestore specifies. */ - for (Count = 0x2, i=0; (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) && - (i < CS46XX_AC97_NUMBER_RESTORE_REGS); Count += 2, i++) { + for( Count = 0x2, i=0; + (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) + && (i < CS46XX_AC97_NUMBER_RESTORE_REGS); + Count += 2, i++) + { cs_ac97_set(dev, (u8)(BA0_AC97_RESET + Count), (u16)card->pm.ac97[i]); } /* Check if we have to init the amplifier */ - if (card->amp_init) + if(card->amp_init) card->amp_init(card); CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_resume()-\n")); @@ -3406,27 +3585,30 @@ static void cs46xx_ac97_resume(struct cs_card *card) static int cs46xx_restart_part(struct cs_card *card) { struct dmabuf *dmabuf; - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, printk( "cs46xx: cs46xx_restart_part()+\n")); - if (card->states[1]) { + if(card->states[1]) + { dmabuf = &card->states[1]->dmabuf; dmabuf->ready = 0; resync_dma_ptrs(card->states[1]); cs_set_divisor(dmabuf); - if (__prog_dmabuf(card->states[1])) { + if(__prog_dmabuf(card->states[1])) + { CS_DBGOUT(CS_PM | CS_ERROR, 1, printk("cs46xx: cs46xx_restart_part()- (-1) prog_dmabuf() dac error\n")); return -1; } cs_set_dac_rate(card->states[1], dmabuf->rate); } - if (card->states[0]) { + if(card->states[0]) + { dmabuf = &card->states[0]->dmabuf; dmabuf->ready = 0; resync_dma_ptrs(card->states[0]); cs_set_divisor(dmabuf); - if (__prog_dmabuf(card->states[0])) { + if(__prog_dmabuf(card->states[0])) + { CS_DBGOUT(CS_PM | CS_ERROR, 1, printk("cs46xx: cs46xx_restart_part()- (-1) prog_dmabuf() adc error\n")); return -1; @@ -3434,17 +3616,17 @@ static int cs46xx_restart_part(struct cs_card *card) cs_set_adc_rate(card->states[0], dmabuf->rate); } card->pm.flags |= CS46XX_PM_RESUMED; - if (card->states[0]) + if(card->states[0]) start_adc(card->states[0]); - if (card->states[1]) + if(card->states[1]) start_dac(card->states[1]); card->pm.flags |= CS46XX_PM_IDLE; card->pm.flags &= ~(CS46XX_PM_SUSPENDING | CS46XX_PM_SUSPENDED | CS46XX_PM_RESUMING | CS46XX_PM_RESUMED); - if (card->states[0]) + if(card->states[0]) wake_up(&card->states[0]->dmabuf.wait); - if (card->states[1]) + if(card->states[1]) wake_up(&card->states[1]->dmabuf.wait); CS_DBGOUT(CS_PM | CS_FUNCTION, 4, @@ -3452,19 +3634,20 @@ static int cs46xx_restart_part(struct cs_card *card) return 0; } + static void cs461x_reset(struct cs_card *card); static void cs461x_proc_stop(struct cs_card *card); static int cs46xx_suspend(struct cs_card *card, pm_message_t state) { unsigned int tmp; - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, printk("cs46xx: cs46xx_suspend()+ flags=0x%x s=%p\n", (unsigned)card->pm.flags,card)); /* * check the current state, only suspend if IDLE */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) { + if(!(card->pm.flags & CS46XX_PM_IDLE)) + { CS_DBGOUT(CS_PM | CS_ERROR, 2, printk("cs46xx: cs46xx_suspend() unable to suspend, not IDLE\n")); return 1; @@ -3496,11 +3679,13 @@ static int cs46xx_suspend(struct cs_card *card, pm_message_t state) tmp = cs461x_peek(card, BA1_CCTL); cs461x_poke(card, BA1_CCTL, tmp & 0xffff0000); - if (card->states[1]) { + if(card->states[1]) + { card->pm.dmabuf_swptr_play = card->states[1]->dmabuf.swptr; card->pm.dmabuf_count_play = card->states[1]->dmabuf.count; } - if (card->states[0]) { + if(card->states[0]) + { card->pm.dmabuf_swptr_capture = card->states[0]->dmabuf.swptr; card->pm.dmabuf_count_capture = card->states[0]->dmabuf.count; } @@ -3551,7 +3736,8 @@ static int cs46xx_resume(struct cs_card *card) CS_DBGOUT(CS_PM | CS_FUNCTION, 4, printk( "cs46xx: cs46xx_resume()+ flags=0x%x\n", (unsigned)card->pm.flags)); - if (!(card->pm.flags & CS46XX_PM_SUSPENDED)) { + if(!(card->pm.flags & CS46XX_PM_SUSPENDED)) + { CS_DBGOUT(CS_PM | CS_ERROR, 2, printk("cs46xx: cs46xx_resume() unable to resume, not SUSPENDED\n")); return 1; @@ -3561,8 +3747,10 @@ static int cs46xx_resume(struct cs_card *card) printpm(card); card->active_ctrl(card, 1); - for (i = 0; i < 5; i++) { - if (cs_hardware_init(card) != 0) { + for(i=0;i<5;i++) + { + if (cs_hardware_init(card) != 0) + { CS_DBGOUT(CS_PM | CS_ERROR, 4, printk( "cs46xx: cs46xx_resume()- ERROR in cs_hardware_init()\n")); mdelay(10 * cs_laptop_wait); @@ -3571,13 +3759,15 @@ static int cs46xx_resume(struct cs_card *card) } break; } - if (i >= 4) { + if(i>=4) + { CS_DBGOUT(CS_PM | CS_ERROR, 1, printk( "cs46xx: cs46xx_resume()- cs_hardware_init() failed, retried %d times.\n",i)); return 0; } - if (cs46xx_restart_part(card)) { + if(cs46xx_restart_part(card)) + { CS_DBGOUT(CS_PM | CS_ERROR, 4, printk( "cs46xx: cs46xx_resume(): cs46xx_restart_part() returned error\n")); } @@ -3645,7 +3835,7 @@ static u16 _cs_ac97_get(struct ac97_codec *dev, u8 reg) /* * Wait for the read to occur. */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) + if(!(card->pm.flags & CS46XX_PM_IDLE)) loopcnt = 2000; else loopcnt = 500 * cs_laptop_wait; @@ -3676,7 +3866,7 @@ static u16 _cs_ac97_get(struct ac97_codec *dev, u8 reg) * Wait for the valid status bit to go active. */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) + if(!(card->pm.flags & CS46XX_PM_IDLE)) loopcnt = 2000; else loopcnt = 1000; @@ -3695,7 +3885,7 @@ static u16 _cs_ac97_get(struct ac97_codec *dev, u8 reg) /* * Make sure we got valid status. */ - if (!((tmp = cs461x_peekBA0(card, BA0_ACSTS)) & ACSTS_VSTS)) { + if (!( (tmp=cs461x_peekBA0(card, BA0_ACSTS)) & ACSTS_VSTS)) { CS_DBGOUT(CS_ERROR, 2, printk(KERN_WARNING "cs46xx: AC'97 read problem (ACSTS_VSTS), reg = 0x%x val=0x%x 0xffff \n", reg, tmp)); @@ -3733,9 +3923,12 @@ static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 val) spin_lock(&card->ac97_lock); - if (reg == AC97_CD_VOL) + if(reg == AC97_CD_VOL) + { val2 = _cs_ac97_get(dev, AC97_CD_VOL); - + } + + /* * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 @@ -3777,7 +3970,8 @@ static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 val) /* * Make sure the write completed. */ - if (cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV) { + if (cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val)); } @@ -3804,23 +3998,25 @@ static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 val) /* CD mute change ? */ - if (reg == AC97_CD_VOL) { + if(reg==AC97_CD_VOL) + { /* Mute bit change ? */ - if ((val2^val) & 0x8000 || - ((val2 == 0x1f1f || val == 0x1f1f) && val2 != val)) { + if((val2^val)&0x8000 || ((val2 == 0x1f1f || val == 0x1f1f) && val2 != val)) + { /* This is a hack but its cleaner than the alternatives. Right now card->ac97_codec[0] might be NULL as we are still doing codec setup. This does an early assignment to avoid the problem if it occurs */ - if (card->ac97_codec[0] == NULL) - card->ac97_codec[0] = dev; + if(card->ac97_codec[0]==NULL) + card->ac97_codec[0]=dev; /* Mute on */ - if (val & 0x8000 || val == 0x1f1f) + if(val&0x8000 || val == 0x1f1f) card->amplifier_ctrl(card, -1); - else { /* Mute off power on */ - if (card->amp_init) + else /* Mute off power on */ + { + if(card->amp_init) card->amp_init(card); card->amplifier_ctrl(card, 1); } @@ -3828,41 +4024,46 @@ static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 val) } } + /* OSS /dev/mixer file operation methods */ static int cs_open_mixdev(struct inode *inode, struct file *file) { - int i = 0; + int i=0; unsigned int minor = iminor(inode); - struct cs_card *card = NULL; + struct cs_card *card=NULL; struct list_head *entry; unsigned int tmp; CS_DBGOUT(CS_FUNCTION | CS_OPEN, 4, printk(KERN_INFO "cs46xx: cs_open_mixdev()+\n")); - list_for_each(entry, &cs46xx_devs) { + list_for_each(entry, &cs46xx_devs) + { card = list_entry(entry, struct cs_card, list); for (i = 0; i < NR_AC97; i++) if (card->ac97_codec[i] != NULL && card->ac97_codec[i]->dev_mixer == minor) goto match; } - if (!card) { + if (!card) + { CS_DBGOUT(CS_FUNCTION | CS_OPEN | CS_ERROR, 2, printk(KERN_INFO "cs46xx: cs46xx_open_mixdev()- -ENODEV\n")); return -ENODEV; } match: - if (!card->ac97_codec[i]) + if(!card->ac97_codec[i]) return -ENODEV; file->private_data = card->ac97_codec[i]; card->active_ctrl(card,1); - if (!CS_IN_USE(&card->mixer_use_cnt)) { - if ((tmp = cs46xx_powerup(card, CS_POWER_MIXVON))) { + if(!CS_IN_USE(&card->mixer_use_cnt)) + { + if( (tmp = cs46xx_powerup(card, CS_POWER_MIXVON )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_open_mixdev() powerup failure (0x%x)\n", tmp)); + "cs46xx: cs_open_mixdev() powerup failure (0x%x)\n",tmp) ); return -EIO; } } @@ -3876,7 +4077,7 @@ static int cs_open_mixdev(struct inode *inode, struct file *file) static int cs_release_mixdev(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); - struct cs_card *card = NULL; + struct cs_card *card=NULL; struct list_head *entry; int i; unsigned int tmp; @@ -3891,13 +4092,15 @@ static int cs_release_mixdev(struct inode *inode, struct file *file) card->ac97_codec[i]->dev_mixer == minor) goto match; } - if (!card) { + if (!card) + { CS_DBGOUT(CS_FUNCTION | CS_OPEN | CS_ERROR, 2, printk(KERN_INFO "cs46xx: cs46xx_open_mixdev()- -ENODEV\n")); return -ENODEV; } match: - if (!CS_DEC_AND_TEST(&card->mixer_use_cnt)) { + if(!CS_DEC_AND_TEST(&card->mixer_use_cnt)) + { CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 4, printk(KERN_INFO "cs46xx: cs_release_mixdev()- no powerdown, usecnt>0\n")); card->active_ctrl(card, -1); @@ -3907,9 +4110,10 @@ match: /* * ok, no outstanding mixer opens, so powerdown. */ - if ((tmp = cs461x_powerdown(card, CS_POWER_MIXVON, CS_FALSE))) { + if( (tmp = cs461x_powerdown(card, CS_POWER_MIXVON, CS_FALSE )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_release_mixdev() powerdown MIXVON failure (0x%x)\n", tmp)); + "cs46xx: cs_release_mixdev() powerdown MIXVON failure (0x%x)\n",tmp) ); card->active_ctrl(card, -1); card->amplifier_ctrl(card, -1); return -EIO; @@ -3922,60 +4126,76 @@ match: } static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) + unsigned long arg) { - struct ac97_codec *codec = file->private_data; - struct cs_card *card = NULL; + struct ac97_codec *codec = (struct ac97_codec *)file->private_data; + struct cs_card *card=NULL; struct list_head *entry; unsigned long __user *p = (long __user *)arg; + #if CSDEBUG_INTERFACE int val; - if ( (cmd == SOUND_MIXER_CS_GETDBGMASK) || + if( (cmd == SOUND_MIXER_CS_GETDBGMASK) || (cmd == SOUND_MIXER_CS_SETDBGMASK) || (cmd == SOUND_MIXER_CS_GETDBGLEVEL) || (cmd == SOUND_MIXER_CS_SETDBGLEVEL) || - (cmd == SOUND_MIXER_CS_APM)) { - switch (cmd) { + (cmd == SOUND_MIXER_CS_APM)) + { + switch(cmd) + { + case SOUND_MIXER_CS_GETDBGMASK: return put_user(cs_debugmask, p); + case SOUND_MIXER_CS_GETDBGLEVEL: return put_user(cs_debuglevel, p); + case SOUND_MIXER_CS_SETDBGMASK: if (get_user(val, p)) return -EFAULT; cs_debugmask = val; return 0; + case SOUND_MIXER_CS_SETDBGLEVEL: if (get_user(val, p)) return -EFAULT; cs_debuglevel = val; return 0; + case SOUND_MIXER_CS_APM: if (get_user(val, p)) return -EFAULT; - if (val == CS_IOCTL_CMD_SUSPEND) { - list_for_each(entry, &cs46xx_devs) { + if(val == CS_IOCTL_CMD_SUSPEND) + { + list_for_each(entry, &cs46xx_devs) + { card = list_entry(entry, struct cs_card, list); cs46xx_suspend(card, PMSG_ON); } - } else if (val == CS_IOCTL_CMD_RESUME) { - list_for_each(entry, &cs46xx_devs) { + } + else if(val == CS_IOCTL_CMD_RESUME) + { + list_for_each(entry, &cs46xx_devs) + { card = list_entry(entry, struct cs_card, list); cs46xx_resume(card); } - } else { + } + else + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO "cs46xx: mixer_ioctl(): invalid APM cmd (%d)\n", val)); } return 0; + default: CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO - "cs46xx: mixer_ioctl(): ERROR unknown debug cmd\n")); + "cs46xx: mixer_ioctl(): ERROR unknown debug cmd\n") ); return 0; - } + } } #endif return codec->mixer_ioctl(codec, cmd, arg); @@ -4012,7 +4232,8 @@ static int __init cs_ac97_init(struct cs_card *card) codec->codec_read = cs_ac97_get; codec->codec_write = cs_ac97_set; - if (ac97_probe_codec(codec) == 0) { + if (ac97_probe_codec(codec) == 0) + { CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO "cs46xx: cs_ac97_init()- codec number %d not found\n", num_ac97) ); @@ -4020,11 +4241,12 @@ static int __init cs_ac97_init(struct cs_card *card) break; } CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init() found codec %d\n",num_ac97)); + "cs46xx: cs_ac97_init() found codec %d\n",num_ac97) ); eid = cs_ac97_get(codec, AC97_EXTENDED_ID); - if (eid == 0xFFFF) { + if(eid==0xFFFF) + { printk(KERN_WARNING "cs46xx: codec %d not present\n",num_ac97); ac97_release_codec(codec); break; @@ -4063,23 +4285,27 @@ static void cs461x_download_image(struct cs_card *card) { unsigned i, j, temp1, temp2, offset, count; unsigned char __iomem *pBA1 = ioremap(card->ba1_addr, 0x40000); - for (i = 0; i < CLEAR__COUNT; i++) { + for( i=0; i < CLEAR__COUNT; i++) + { offset = ClrStat[i].BA1__DestByteOffset; count = ClrStat[i].BA1__SourceSize; - for (temp1 = offset; temp1 < (offset + count); temp1 += 4) + for( temp1 = offset; temp1<(offset+count); temp1+=4 ) writel(0, pBA1+temp1); } - for (i = 0; i < FILL__COUNT; i++) { + for(i=0; iac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON) { - if (!muted) { + if (tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp |= CS_AC97_POWER_CONTROL_MIXVOFF; cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); @@ -4259,14 +4492,16 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend * Check the status.. */ if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON) { + CS_AC97_POWER_CONTROL_MIXVOFF_ON) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerdown MIXVOFF failed\n")); return 1; } } } - if (type & CS_POWER_MIXVON) { + if(type & CS_POWER_MIXVON) + { CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs461x_powerdown()+ MIXVON\n")); @@ -4274,13 +4509,15 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend * Power down the MIXER (VREF ON) on the AC97 card. */ tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_MIXVON_ON) { - if (!muted) { + if (tmp & CS_AC97_POWER_CONTROL_MIXVON_ON) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp |= CS_AC97_POWER_CONTROL_MIXVON; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); + cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); /* * Now, we wait until we sample a ready state. */ @@ -4303,26 +4540,30 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend * Check the status.. */ if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON) { + CS_AC97_POWER_CONTROL_MIXVON_ON) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerdown MIXVON failed\n")); return 1; } } } - if (type & CS_POWER_ADC) { + if(type & CS_POWER_ADC) + { /* * Power down the ADC on the AC97 card. */ CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs461x_powerdown()+ ADC\n")); tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_ADC_ON) { - if (!muted) { + if (tmp & CS_AC97_POWER_CONTROL_ADC_ON) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp |= CS_AC97_POWER_CONTROL_ADC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); + cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); /* * Now, we wait until we sample a ready state. @@ -4346,14 +4587,16 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend * Check the status.. */ if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON) { + CS_AC97_POWER_CONTROL_ADC_ON) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerdown ADC failed\n")); return 1; } } } - if (type & CS_POWER_DAC) { + if(type & CS_POWER_DAC) + { /* * Power down the DAC on the AC97 card. */ @@ -4361,13 +4604,15 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs461x_powerdown()+ DAC\n")); tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_DAC_ON) { - if (!muted) { + if (tmp & CS_AC97_POWER_CONTROL_DAC_ON) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp |= CS_AC97_POWER_CONTROL_DAC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); + cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); /* * Now, we wait until we sample a ready state. */ @@ -4390,7 +4635,8 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend * Check the status.. */ if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON) { + CS_AC97_POWER_CONTROL_DAC_ON) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerdown DAC failed\n")); return 1; @@ -4398,7 +4644,7 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend } } tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (muted) + if(muted) cs_mute(card, CS_FALSE); CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs461x_powerdown()- 0 tmp=0x%x\n",tmp)); @@ -4408,22 +4654,23 @@ static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspend static int cs46xx_powerup(struct cs_card *card, unsigned int type) { int count; - unsigned int tmp = 0, muted = 0; + unsigned int tmp=0,muted=0; CS_DBGOUT(CS_FUNCTION, 8, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ type=0x%x\n",type)); /* * check for VREF and powerup if need to. */ - if (type & CS_POWER_MIXVON) + if(type & CS_POWER_MIXVON) type |= CS_POWER_MIXVOFF; - if (type & (CS_POWER_DAC | CS_POWER_ADC)) + if(type & (CS_POWER_DAC | CS_POWER_ADC)) type |= CS_POWER_MIXVON | CS_POWER_MIXVOFF; /* * Power up indicated areas. */ - if (type & CS_POWER_MIXVOFF) { + if(type & CS_POWER_MIXVOFF) + { CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ MIXVOFF\n")); @@ -4431,10 +4678,12 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Power up the MIXER (VREF ON) on the AC97 card. */ tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON)) { - if (!muted) { + if (!(tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON)) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp &= ~CS_AC97_POWER_CONTROL_MIXVOFF; cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); @@ -4460,14 +4709,16 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Check the status.. */ if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON)) { + CS_AC97_POWER_CONTROL_MIXVOFF_ON)) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerup MIXVOFF failed\n")); return 1; } } } - if(type & CS_POWER_MIXVON) { + if(type & CS_POWER_MIXVON) + { CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ MIXVON\n")); @@ -4475,10 +4726,12 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Power up the MIXER (VREF ON) on the AC97 card. */ tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_MIXVON_ON)) { - if (!muted) { + if (!(tmp & CS_AC97_POWER_CONTROL_MIXVON_ON)) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp &= ~CS_AC97_POWER_CONTROL_MIXVON; cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); @@ -4504,23 +4757,27 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Check the status.. */ if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON)) { + CS_AC97_POWER_CONTROL_MIXVON_ON)) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerup MIXVON failed\n")); return 1; } } } - if (type & CS_POWER_ADC) { + if(type & CS_POWER_ADC) + { /* * Power up the ADC on the AC97 card. */ CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ ADC\n")); tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_ADC_ON)) { - if (!muted) { + if (!(tmp & CS_AC97_POWER_CONTROL_ADC_ON)) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp &= ~CS_AC97_POWER_CONTROL_ADC; cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); @@ -4547,14 +4804,16 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Check the status.. */ if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON)) { + CS_AC97_POWER_CONTROL_ADC_ON)) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerup ADC failed\n")); return 1; } } } - if (type & CS_POWER_DAC) { + if(type & CS_POWER_DAC) + { /* * Power up the DAC on the AC97 card. */ @@ -4562,10 +4821,12 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ DAC\n")); tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_DAC_ON)) { - if (!muted) { + if (!(tmp & CS_AC97_POWER_CONTROL_DAC_ON)) + { + if(!muted) + { cs_mute(card, CS_TRUE); - muted = 1; + muted=1; } tmp &= ~CS_AC97_POWER_CONTROL_DAC; cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); @@ -4591,7 +4852,8 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) * Check the status.. */ if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON)) { + CS_AC97_POWER_CONTROL_DAC_ON)) + { CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING "cs46xx: powerup DAC failed\n")); return 1; @@ -4599,13 +4861,14 @@ static int cs46xx_powerup(struct cs_card *card, unsigned int type) } } tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (muted) + if(muted) cs_mute(card, CS_FALSE); CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()- 0 tmp=0x%x\n",tmp)); return 0; } + static void cs461x_proc_start(struct cs_card *card) { int cnt; @@ -4702,7 +4965,7 @@ static int cs_hardware_init(struct cs_card *card) * is not enough for some platforms! tested on an IBM Thinkpads and * reference cards. */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) + if(!(card->pm.flags & CS46XX_PM_IDLE)) mdelay(initdelay); /* * Write the selected clock control setup to the hardware. Do not turn on @@ -4754,7 +5017,8 @@ static int cs_hardware_init(struct cs_card *card) * If we are resuming under 2.2.x then we can not schedule a timeout. * so, just spin the CPU. */ - if (card->pm.flags & CS46XX_PM_IDLE) { + if(card->pm.flags & CS46XX_PM_IDLE) + { /* * Wait for the card ready signal from the AC97 card. */ @@ -4769,7 +5033,9 @@ static int cs_hardware_init(struct cs_card *card) current->state = TASK_UNINTERRUPTIBLE; schedule_timeout(1); } while (time_before(jiffies, end_time)); - } else { + } + else + { for (count = 0; count < 100; count++) { // First, we want to wait for a short time. udelay(25 * cs_laptop_wait); @@ -4798,7 +5064,8 @@ static int cs_hardware_init(struct cs_card *card) */ cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); - if (card->pm.flags & CS46XX_PM_IDLE) { + if(card->pm.flags & CS46XX_PM_IDLE) + { /* * Wait until we've sampled input slots 3 and 4 as valid, meaning that * the card is pumping ADC data across the AC-link. @@ -4814,7 +5081,9 @@ static int cs_hardware_init(struct cs_card *card) current->state = TASK_UNINTERRUPTIBLE; schedule_timeout(1); } while (time_before(jiffies, end_time)); - } else { + } + else + { for (count = 0; count < 100; count++) { // First, we want to wait for a short time. udelay(25 * cs_laptop_wait); @@ -4871,13 +5140,17 @@ static int cs_hardware_init(struct cs_card *card) cs461x_poke(card, BA1_CCTL, tmp & 0xffff0000); /* initialize AC97 codec and register /dev/mixer */ - if (card->pm.flags & CS46XX_PM_IDLE) { - if (cs_ac97_init(card) <= 0) { + if(card->pm.flags & CS46XX_PM_IDLE) + { + if (cs_ac97_init(card) <= 0) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_ac97_init() failure\n")); + "cs46xx: cs_ac97_init() failure\n") ); return -EIO; } - } else { + } + else + { cs46xx_ac97_resume(card); } @@ -4901,17 +5174,23 @@ static int cs_hardware_init(struct cs_card *card) * If IDLE then Power down the part. We will power components up * when we need them. */ - if (card->pm.flags & CS46XX_PM_IDLE) { - if (!cs_powerdown) { - if ((tmp = cs46xx_powerup(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON))) { + if(card->pm.flags & CS46XX_PM_IDLE) + { + if(!cs_powerdown) + { + if( (tmp = cs46xx_powerup(card, CS_POWER_DAC | CS_POWER_ADC | + CS_POWER_MIXVON )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO "cs46xx: cs461x_powerup() failure (0x%x)\n",tmp) ); return -EIO; } - } else { - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_FALSE))) { + } + else + { + if( (tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | + CS_POWER_MIXVON, CS_FALSE )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO "cs46xx: cs461x_powerdown() failure (0x%x)\n",tmp) ); return -EIO; @@ -5031,13 +5310,14 @@ MODULE_AUTHOR("Alan Cox , Jaroslav Kysela, name) { - if (cp->vendor == ss_vendor && cp->id == ss_card) { + if(cp->vendor == ss_vendor && cp->id == ss_card) + { card->amplifier_ctrl = cp->amp; - if (cp->active) + if(cp->active) card->active_ctrl = cp->active; - if (cp->amp_init) + if(cp->amp_init) card->amp_init = cp->amp_init; break; } cp++; } - if (cp->name == NULL) { + if (cp->name==NULL) + { printk(KERN_INFO "cs46xx: Unknown card (%04X:%04X) at 0x%08lx/0x%08lx, IRQ %d\n", ss_vendor, ss_card, card->ba0_addr, card->ba1_addr, card->irq); - } else { + } + else + { printk(KERN_INFO "cs46xx: %s (%04X:%04X) at 0x%08lx/0x%08lx, IRQ %d\n", cp->name, ss_vendor, ss_card, card->ba0_addr, card->ba1_addr, card->irq); } - if (card->amplifier_ctrl == NULL) { + if (card->amplifier_ctrl==NULL) + { card->amplifier_ctrl = amp_none; card->active_ctrl = clkrun_hack; } - if (external_amp == 1) { + if (external_amp == 1) + { printk(KERN_INFO "cs46xx: Crystal EAPD support forced on.\n"); card->amplifier_ctrl = amp_voyetra; } - if (thinkpad == 1) { + if (thinkpad == 1) + { printk(KERN_INFO "cs46xx: Activating CLKRUN hack for Thinkpad.\n"); card->active_ctrl = clkrun_hack; } @@ -5138,11 +5425,13 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, * and mdelay kernel code is replaced by a pm timer, or the delays * work well for battery and/or AC power both. */ - if (card->active_ctrl == clkrun_hack) { + if(card->active_ctrl == clkrun_hack) + { initdelay = 2100; cs_laptop_wait = 5; } - if ((card->active_ctrl == clkrun_hack) && !(powerdown == 1)) { + if((card->active_ctrl == clkrun_hack) && !(powerdown == 1)) + { /* * for some currently unknown reason, powering down the DAC and ADC component * blocks on thinkpads causes some funky behavior... distoorrrtion and ac97 @@ -5151,7 +5440,7 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, */ cs_powerdown = 0; } - if (powerdown == 0) + if(powerdown == 0) cs_powerdown = 0; card->active_ctrl(card, 1); @@ -5172,12 +5461,12 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, card->ba1.name.pmem, card->ba1.name.reg) ); - if (card->ba0 == 0 || card->ba1.name.data0 == 0 || + if(card->ba0 == 0 || card->ba1.name.data0 == 0 || card->ba1.name.data1 == 0 || card->ba1.name.pmem == 0 || card->ba1.name.reg == 0) goto fail2; - if (request_irq(card->irq, &cs_interrupt, IRQF_SHARED, "cs46xx", card)) { + if (request_irq(card->irq, &cs_interrupt, SA_SHIRQ, "cs46xx", card)) { printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq); goto fail2; } @@ -5188,12 +5477,14 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, } /* register /dev/midi */ - if ((card->dev_midi = register_sound_midi(&cs_midi_fops, -1)) < 0) + if((card->dev_midi = register_sound_midi(&cs_midi_fops, -1)) < 0) printk(KERN_ERR "cs46xx: unable to register midi\n"); card->pm.flags |= CS46XX_PM_IDLE; - for (i = 0; i < 5; i++) { - if (cs_hardware_init(card) != 0) { + for(i=0;i<5;i++) + { + if (cs_hardware_init(card) != 0) + { CS_DBGOUT(CS_ERROR, 4, printk( "cs46xx: ERROR in cs_hardware_init()... retrying\n")); for (j = 0; j < NR_AC97; j++) @@ -5206,11 +5497,12 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, } break; } - if(i >= 4) { + if(i>=4) + { CS_DBGOUT(CS_PM | CS_ERROR, 1, printk( "cs46xx: cs46xx_probe()- cs_hardware_init() failed, retried %d times.\n",i)); unregister_sound_dsp(card->dev_audio); - if (card->dev_midi) + if(card->dev_midi) unregister_sound_midi(card->dev_midi); goto fail; } @@ -5226,7 +5518,7 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, * Check if we have to init the amplifier, but probably already done * since the CD logic in the ac97 init code will turn on the ext amp. */ - if (cp->amp_init) + if(cp->amp_init) cp->amp_init(card); card->active_ctrl(card, -1); @@ -5244,15 +5536,15 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, fail: free_irq(card->irq, card); fail2: - if (card->ba0) + if(card->ba0) iounmap(card->ba0); - if (card->ba1.name.data0) + if(card->ba1.name.data0) iounmap(card->ba1.name.data0); - if (card->ba1.name.data1) + if(card->ba1.name.data1) iounmap(card->ba1.name.data1); - if (card->ba1.name.pmem) + if(card->ba1.name.pmem) iounmap(card->ba1.name.pmem); - if (card->ba1.name.reg) + if(card->ba1.name.reg) iounmap(card->ba1.name.reg); kfree(card); CS_DBGOUT(CS_INIT | CS_ERROR, 1, printk(KERN_INFO @@ -5306,8 +5598,9 @@ static void __devexit cs46xx_remove(struct pci_dev *pci_dev) * Power down the DAC and ADC. We will power them up (if) when we need * them. */ - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_TRUE))) { + if( (tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | + CS_POWER_MIXVON, CS_TRUE )) ) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO "cs46xx: cs461x_powerdown() failure (0x%x)\n",tmp) ); } @@ -5341,7 +5634,7 @@ static void __devexit cs46xx_remove(struct pci_dev *pci_dev) ac97_release_codec(card->ac97_codec[i]); } unregister_sound_dsp(card->dev_audio); - if (card->dev_midi) + if(card->dev_midi) unregister_sound_midi(card->dev_midi); list_del(&card->list); kfree(card); @@ -5400,7 +5693,8 @@ static int __init cs46xx_init_module(void) "cs46xx: cs46xx_init_module()+ \n")); rtn = pci_register_driver(&cs46xx_pci_driver); - if (rtn == -ENODEV) { + if(rtn == -ENODEV) + { CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk( "cs46xx: Unable to detect valid cs46xx device\n")); } diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 15ce7119c..baf4244a5 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c @@ -547,7 +547,7 @@ int DMAbuf_activate_recording(int dev, struct dma_buffparms *dmap) } return 0; } -/* acquires lock */ +/* aquires lock */ int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock) { struct audio_operations *adev = audio_devs[dev]; @@ -821,7 +821,7 @@ static int find_output_space(int dev, char **buf, int *size) *size = len & ~SAMPLE_ROUNDUP; return (*size > 0); } -/* acquires lock */ +/* aquires lock */ int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock) { struct audio_operations *adev = audio_devs[dev]; @@ -855,7 +855,7 @@ int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock) spin_unlock_irqrestore(&dmap->lock,flags); return 0; } -/* has to acquire dmap->lock */ +/* has to aquire dmap->lock */ int DMAbuf_move_wrpointer(int dev, int l) { struct audio_operations *adev = audio_devs[dev]; diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h index 25dd5a318..a1b0b92af 100644 --- a/sound/oss/dmasound/dmasound.h +++ b/sound/oss/dmasound/dmasound.h @@ -13,6 +13,7 @@ #define _dmasound_h_ #include +#include #define SND_NDEVS 256 /* Number of supported devices */ #define SND_DEV_CTL 0 /* Control port /dev/mixer */ diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 4359903f4..c8e210326 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c @@ -67,6 +67,7 @@ #include #include +#include #include #include #include @@ -374,7 +375,10 @@ setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* *gpio_pol = *pp; else *gpio_pol = 1; - return irq_of_parse_and_map(np, 0); + if (np->n_intrs > 0) + return np->intrs[0].line; + + return 0; } static inline void @@ -2861,13 +2865,14 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); * other info if necessary (early AWACS we want to read chip ids) */ - if (of_get_address(io, 2, NULL, NULL) == NULL) { + if (of_get_address(io, 2, NULL, NULL) == NULL || io->n_intrs < 3) { /* OK - maybe we need to use the 'awacs' node (on earlier * machines). */ if (awacs_node) { io = awacs_node ; - if (of_get_address(io, 2, NULL, NULL) == NULL) { + if (of_get_address(io, 2, NULL, NULL) == NULL || + io->n_intrs < 3) { printk("dmasound_pmac: can't use %s\n", io->full_name); return -ENODEV; @@ -2936,9 +2941,9 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); if (awacs_revision == AWACS_SCREAMER && awacs) awacs_recalibrate(); - awacs_irq = irq_of_parse_and_map(io, 0); - awacs_tx_irq = irq_of_parse_and_map(io, 1); - awacs_rx_irq = irq_of_parse_and_map(io, 2); + awacs_irq = io->intrs[0].line; + awacs_tx_irq = io->intrs[1].line; + awacs_rx_irq = io->intrs[2].line; /* Hack for legacy crap that will be killed someday */ awacs_node = io; diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index 68e1d8f6c..494070a3f 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c @@ -16,6 +16,7 @@ #include +#include #include #include #include diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index c4ce94d6e..3721c5857 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c @@ -1301,7 +1301,7 @@ static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_dev card->pci_dev = pci_dev; /* Reserve IRQ Line */ - if (request_irq(card->irq, emu10k1_interrupt, IRQF_SHARED, card_names[pci_id->driver_data], card)) { + if (request_irq(card->irq, emu10k1_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { printk(KERN_ERR "emu10k1: IRQ in use\n"); ret = -EBUSY; goto err_irq; diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index 8ac77df86..25ae8e4a4 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c @@ -45,7 +45,7 @@ #include "../sound_config.h" #endif -static DEFINE_SPINLOCK(midi_spinlock); +static DEFINE_SPINLOCK(midi_spinlock __attribute((unused))); static void init_midi_hdr(struct midi_hdr *midihdr) { diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 13f483149..094f569cc 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c @@ -2650,7 +2650,7 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic ret = -EBUSY; goto err_region; } - if ((ret=request_irq(s->irq, es1370_interrupt, IRQF_SHARED, "es1370",s))) { + if ((ret=request_irq(s->irq, es1370_interrupt, SA_SHIRQ, "es1370",s))) { printk(KERN_ERR "es1370: irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index a2ffe723d..4400c8538 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -2905,7 +2905,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic res = -EBUSY; goto err_region; } - if ((res=request_irq(s->irq, es1371_interrupt, IRQF_SHARED, "es1371",s))) { + if ((res=request_irq(s->irq, es1371_interrupt, SA_SHIRQ, "es1371",s))) { printk(KERN_ERR PFX "irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c index 82f40a0a5..6861563d7 100644 --- a/sound/oss/esssolo1.c +++ b/sound/oss/esssolo1.c @@ -2392,7 +2392,7 @@ static int __devinit solo1_probe(struct pci_dev *pcidev, const struct pci_device printk(KERN_ERR "solo1: io ports in use\n"); goto err_region4; } - if ((ret=request_irq(s->irq,solo1_interrupt,IRQF_SHARED,"ESS Solo1",s))) { + if ((ret=request_irq(s->irq,solo1_interrupt,SA_SHIRQ,"ESS Solo1",s))) { printk(KERN_ERR "solo1: irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/forte.c b/sound/oss/forte.c index ea1c0207a..0294eec8a 100644 --- a/sound/oss/forte.c +++ b/sound/oss/forte.c @@ -2026,7 +2026,7 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id) chip->iobase = pci_resource_start (pci_dev, 0); chip->irq = pci_dev->irq; - if (request_irq (chip->irq, forte_interrupt, IRQF_SHARED, DRIVER_NAME, + if (request_irq (chip->irq, forte_interrupt, SA_SHIRQ, DRIVER_NAME, chip)) { printk (KERN_WARNING PFX "Unable to reserve IRQ"); ret = -EIO; @@ -2035,9 +2035,8 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id) pci_set_drvdata (pci_dev, chip); - printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%16llX IRQ %u\n", - chip->iobase, (unsigned long long)pci_resource_end (pci_dev, 0), - chip->irq); + printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%04lX IRQ %u\n", + chip->iobase, pci_resource_end (pci_dev, 0), chip->irq); /* Power it up */ if ((ret = forte_chip_init (chip)) == 0) diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index 80ab402da..dd4f59d30 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c @@ -1479,7 +1479,7 @@ static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3) hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844; hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844; - if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, IRQF_SHARED, + if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, SA_SHIRQ, hal2str, hal2)) { printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ); ret = -EAGAIN; diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index ddcddc234..dd2b871cd 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -3413,7 +3413,7 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device goto out_iospace; } - if (request_irq(card->irq, &i810_interrupt, IRQF_SHARED, + if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); goto out_iospace; diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index 68aab3605..00ac1c95a 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c @@ -2019,7 +2019,7 @@ static int __devinit it8172_probe(struct pci_dev *pcidev, s->io, s->io + pci_resource_len(pcidev,0)-1); goto err_region; } - if (request_irq(s->irq, it8172_interrupt, IRQF_DISABLED, + if (request_irq(s->irq, it8172_interrupt, SA_INTERRUPT, IT8172_MODULE_NAME, s)) { err("irq %u in use", s->irq); goto err_irq; diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index 12e7b3038..2835a7c03 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c @@ -27,6 +27,7 @@ * same manner. */ +#include #include #include #include diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index 1d98d100d..e647f2f86 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c @@ -3545,7 +3545,7 @@ maestro_probe(struct pci_dev *pcidev,const struct pci_device_id *pdid) mixer_push_state(card); } - if((ret=request_irq(card->irq, ess_interrupt, IRQF_SHARED, card_names[card_type], card))) + if((ret=request_irq(card->irq, ess_interrupt, SA_SHIRQ, card_names[card_type], card))) { printk(KERN_ERR "maestro: unable to allocate irq %d,\n", card->irq); unregister_sound_mixer(card->dev_mixer); diff --git a/sound/oss/maestro3.c b/sound/oss/maestro3.c index 5548e3cff..4a5e4237a 100644 --- a/sound/oss/maestro3.c +++ b/sound/oss/maestro3.c @@ -2694,7 +2694,7 @@ static int __devinit m3_probe(struct pci_dev *pci_dev, const struct pci_device_i } } - if(request_irq(card->irq, m3_interrupt, IRQF_SHARED, card_names[card->card_type], card)) { + if(request_irq(card->irq, m3_interrupt, SA_SHIRQ, card_names[card->card_type], card)) { printk(KERN_ERR PFX "unable to allocate irq %d,\n", card->irq); diff --git a/sound/oss/msnd.c b/sound/oss/msnd.c index ba38d6200..5dbfc0f9c 100644 --- a/sound/oss/msnd.c +++ b/sound/oss/msnd.c @@ -47,7 +47,7 @@ static multisound_dev_t *devs[MSND_MAX_DEVS]; static int num_devs; -int msnd_register(multisound_dev_t *dev) +int __init msnd_register(multisound_dev_t *dev) { int i; diff --git a/sound/oss/msnd_classic.h b/sound/oss/msnd_classic.h index 7ffea5267..83c3c46ff 100644 --- a/sound/oss/msnd_classic.h +++ b/sound/oss/msnd_classic.h @@ -30,6 +30,7 @@ #ifndef __MSND_CLASSIC_H #define __MSND_CLASSIC_H +#include #define DSP_NUMIO 0x10 diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index 6d7763dae..0c2db657b 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c @@ -39,6 +39,7 @@ ********************************************************************/ #include +#include #include #include #include diff --git a/sound/oss/msnd_pinnacle.h b/sound/oss/msnd_pinnacle.h index cce911487..e85aef4a5 100644 --- a/sound/oss/msnd_pinnacle.h +++ b/sound/oss/msnd_pinnacle.h @@ -30,6 +30,7 @@ #ifndef __MSND_PINNACLE_H #define __MSND_PINNACLE_H +#include #define DSP_NUMIO 0x08 diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c index 6f7f2f042..21c1954d9 100644 --- a/sound/oss/nec_vrc5477.c +++ b/sound/oss/nec_vrc5477.c @@ -1909,7 +1909,7 @@ static int __devinit vrc5477_ac97_probe(struct pci_dev *pcidev, s->io, s->io + pci_resource_len(pcidev,0)-1); goto err_region; } - if (request_irq(s->irq, vrc5477_ac97_interrupt, IRQF_DISABLED, + if (request_irq(s->irq, vrc5477_ac97_interrupt, SA_INTERRUPT, VRC5477_AC97_MODULE_NAME, s)) { printk(KERN_ERR PFX "irq %u in use\n", s->irq); goto err_irq; diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index 7760dddf2..6e662ac00 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c @@ -733,7 +733,7 @@ static int nm256_grabInterrupt (struct nm256_info *card) { if (card->has_irq++ == 0) { - if (request_irq (card->irq, card->introutine, IRQF_SHARED, + if (request_irq (card->irq, card->introutine, SA_SHIRQ, "NM256_audio", card) < 0) { printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq); return -1; diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c index aec05a2bf..0e161c6a0 100644 --- a/sound/oss/opl3sa2.c +++ b/sound/oss/opl3sa2.c @@ -64,6 +64,7 @@ * */ +#include #include #include #include diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c index 97666007b..c9696dc9f 100644 --- a/sound/oss/pas2_card.c +++ b/sound/oss/pas2_card.c @@ -4,6 +4,7 @@ * Detection routine for the Pro Audio Spectrum cards. */ +#include #include #include #include diff --git a/sound/oss/pss.c b/sound/oss/pss.c index 37ee234b5..a617ccb40 100644 --- a/sound/oss/pss.c +++ b/sound/oss/pss.c @@ -57,6 +57,7 @@ */ +#include #include #include #include diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c index f17d25b6f..a1ec9d131 100644 --- a/sound/oss/rme96xx.c +++ b/sound/oss/rme96xx.c @@ -994,7 +994,7 @@ static int __devinit rme96xx_probe(struct pci_dev *pcidev, const struct pci_devi if (pci_enable_device(pcidev)) goto err_irq; - if (request_irq(s->irq, rme96xx_interrupt, IRQF_SHARED, "rme96xx", s)) { + if (request_irq(s->irq, rme96xx_interrupt, SA_SHIRQ, "rme96xx", s)) { printk(KERN_ERR RME_MESS" irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 8666291c0..4708cbdc3 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c @@ -22,6 +22,7 @@ * 02-07-2003 Bug made it into first release. Take two. */ +#include #include #include #include diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index 35bab6e2f..5f955e3d2 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c @@ -26,6 +26,7 @@ * Chris Rankin */ +#include #include #include #include @@ -677,7 +678,7 @@ int sb_dsp_init(struct address_info *hw_config, struct module *owner) * will get shared PCI irq lines we must cope. */ - int i=(devc->caps&SB_PCI_IRQ)?IRQF_SHARED:0; + int i=(devc->caps&SB_PCI_IRQ)?SA_SHIRQ:0; if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0) { diff --git a/sound/oss/sb_ess.c b/sound/oss/sb_ess.c index 180e95c87..fae05fe3d 100644 --- a/sound/oss/sb_ess.c +++ b/sound/oss/sb_ess.c @@ -97,19 +97,19 @@ * * The documentation is an adventure: it's close but not fully accurate. I * found out that after a reset some registers are *NOT* reset, though the - * docs say the would be. Interesting ones are 0x7f, 0x7d and 0x7a. They are - * related to the Audio 2 channel. I also was surprised about the consequences + * docs say the would be. Interresting ones are 0x7f, 0x7d and 0x7a. They are + * related to the Audio 2 channel. I also was suprised about the consequenses * of writing 0x00 to 0x7f (which should be done by reset): The ES1887 moves * into ES1888 mode. This means that it claims IRQ 11, which happens to be my * ISDN adapter. Needless to say it no longer worked. I now understand why * after rebooting 0x7f already was 0x05, the value of my choice: the BIOS * did it. * - * Oh, and this is another trap: in ES1887 docs mixer register 0x70 is - * described as if it's exactly the same as register 0xa1. This is *NOT* true. - * The description of 0x70 in ES1869 docs is accurate however. + * Oh, and this is another trap: in ES1887 docs mixer register 0x70 is decribed + * as if it's exactly the same as register 0xa1. This is *NOT* true. The + * description of 0x70 in ES1869 docs is accurate however. * Well, the assumption about ES1869 was wrong: register 0x70 is very much - * like register 0xa1, except that bit 7 is always 1, whatever you want + * like register 0xa1, except that bit 7 is allways 1, whatever you want * it to be. * * When using audio 2 mixer register 0x72 seems te be meaningless. Only 0xa2 @@ -117,10 +117,10 @@ * * Software reset not being able to reset all registers is great! Especially * the fact that register 0x78 isn't reset is great when you wanna change back - * to single dma operation (simplex): audio 2 is still operational, and uses - * the same dma as audio 1: your ess changes into a funny echo machine. + * to single dma operation (simplex): audio 2 is still operation, and uses the + * same dma as audio 1: your ess changes into a funny echo machine. * - * Received the news that ES1688 is detected as a ES1788. Did some thinking: + * Received the new that ES1688 is detected as a ES1788. Did some thinking: * the ES1887 detection scheme suggests in step 2 to try if bit 3 of register * 0x64 can be changed. This is inaccurate, first I inverted the * check: "If * can be modified, it's a 1688", which lead to a correct detection @@ -135,7 +135,7 @@ * About recognition of ESS chips * * The distinction of ES688, ES1688, ES1788, ES1887 and ES1888 is described in - * a (preliminary ??) datasheet on ES1887. Its aim is to identify ES1887, but + * a (preliminary ??) datasheet on ES1887. It's aim is to identify ES1887, but * during detection the text claims that "this chip may be ..." when a step * fails. This scheme is used to distinct between the above chips. * It appears however that some PnP chips like ES1868 are recognized as ES1788 @@ -156,9 +156,9 @@ * * The existing ES1688 support didn't take care of the ES1688+ recording * levels very well. Whenever a device was selected (recmask) for recording - * its recording level was loud, and it couldn't be changed. The fact that + * it's recording level was loud, and it couldn't be changed. The fact that * internal register 0xb4 could take care of RECLEV, didn't work meaning until - * its value was restored every time the chip was reset; this reset the + * it's value was restored every time the chip was reset; this reset the * value of 0xb4 too. I guess that's what 4front also had (have?) trouble with. * * About ES1887 support: @@ -169,9 +169,9 @@ * the latter case the recording volumes are 0. * Now recording levels of inputs can be controlled, by changing the playback * levels. Futhermore several devices can be recorded together (which is not - * possible with the ES1688). + * possible with the ES1688. * Besides the separate recording level control for each input, the common - * recording level can also be controlled by RECLEV as described above. + * recordig level can also be controlled by RECLEV as described above. * * Not only ES1887 have this recording mixer. I know the following from the * documentation: diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 7b168d85f..3f7427cd1 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -297,7 +298,7 @@ static int __init dac_audio_init(void) dac_audio_set_rate(); retval = - request_irq(TIMER1_IRQ, timer1_interrupt, IRQF_DISABLED, MODNAME, 0); + request_irq(TIMER1_IRQ, timer1_interrupt, SA_INTERRUPT, MODNAME, 0); if (retval < 0) { printk(KERN_ERR "sh_dac_audio: IRQ %d request failed\n", TIMER1_IRQ); diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index 8ea532d40..42bd276cf 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c @@ -2632,7 +2632,7 @@ static int __devinit sv_probe(struct pci_dev *pcidev, const struct pci_device_id wrindir(s, SV_CIPCMSR1, ((8000 * 65536 / FULLRATE) >> 8) & 0xff); wrindir(s, SV_CIADCOUTPUT, 0); /* request irq */ - if ((ret=request_irq(s->irq,sv_interrupt,IRQF_SHARED,"S3 SonicVibes",s))) { + if ((ret=request_irq(s->irq,sv_interrupt,SA_SHIRQ,"S3 SonicVibes",s))) { printk(KERN_ERR "sv: irq %u in use\n", s->irq); goto err_irq; } diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h index 1a00a3210..9f912b8a2 100644 --- a/sound/oss/sound_config.h +++ b/sound/oss/sound_config.h @@ -14,6 +14,7 @@ #ifndef _SOUND_CONFIG_H_ #define _SOUND_CONFIG_H_ +#include #include #include diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index 0860d6789..d33bb464f 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -22,6 +22,7 @@ * Christoph Hellwig : Some cleanup work (2000/03/01) */ +#include #include "sound_config.h" #include @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -562,6 +564,9 @@ static int __init oss_init(void) sound_dmap_flag = (dmabuf > 0 ? 1 : 0); for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { + devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor), + S_IFCHR | dev_list[i].mode, + "sound/%s", dev_list[i].name); class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL, "%s", dev_list[i].name); @@ -569,10 +574,15 @@ static int __init oss_init(void) if (!dev_list[i].num) continue; - for (j = 1; j < *dev_list[i].num; j++) + for (j = 1; j < *dev_list[i].num; j++) { + devfs_mk_cdev(MKDEV(SOUND_MAJOR, + dev_list[i].minor + (j*0x10)), + S_IFCHR | dev_list[i].mode, + "sound/%s%d", dev_list[i].name, j); class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), NULL, "%s%d", dev_list[i].name, j); + } } if (sound_nblocks >= 1024) @@ -586,11 +596,14 @@ static void __exit oss_cleanup(void) int i, j; for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { + devfs_remove("sound/%s", dev_list[i].name); class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); if (!dev_list[i].num) continue; - for (j = 1; j < *dev_list[i].num; j++) + for (j = 1; j < *dev_list[i].num; j++) { + devfs_remove("sound/%s%d", dev_list[i].name, j); class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10))); + } } unregister_sound_special(1); diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 2813e4c8e..e61a454a8 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -194,6 +194,7 @@ * sem - guard dmabuf, write re-entry etc */ +#include #include #include #include @@ -4472,7 +4473,7 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id) /* claim our irq */ rc = -ENODEV; - if (request_irq(card->irq, &trident_interrupt, IRQF_SHARED, + if (request_irq(card->irq, &trident_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { printk(KERN_ERR "trident: unable to allocate irq %d\n", card->irq); diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c index 08d8c94d0..1a921ee71 100644 --- a/sound/oss/via82cxxx_audio.c +++ b/sound/oss/via82cxxx_audio.c @@ -18,12 +18,12 @@ #define VIA_VERSION "1.9.1-ac4-2.5" +#include #include #include #include #include #include -#include #include #include #include @@ -308,7 +308,7 @@ struct via_info { unsigned sixchannel: 1; /* 8233/35 with 6 channel support */ unsigned volume: 1; - unsigned locked_rate : 1; + int locked_rate : 1; int mixer_vol; /* 8233/35 volume - not yet implemented */ @@ -2013,7 +2013,7 @@ static int via_interrupt_init (struct via_info *card) tmp8 |= VIA_CR48_FM_TRAP_TO_NMI; pci_write_config_byte (card->pdev, VIA_FM_NMI_CTRL, tmp8); } - if (request_irq (card->pdev->irq, via_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) { + if (request_irq (card->pdev->irq, via_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", card->pdev->irq); DPRINTK ("EXIT, returning -EBUSY\n"); @@ -2022,7 +2022,7 @@ static int via_interrupt_init (struct via_info *card) } else { - if (request_irq (card->pdev->irq, via_new_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) { + if (request_irq (card->pdev->irq, via_new_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", card->pdev->irq); DPRINTK ("EXIT, returning -EBUSY\n"); @@ -3522,7 +3522,7 @@ err_out_have_mixer: err_out_kfree: #ifndef VIA_NDEBUG - memset (card, OSS_POISON_FREE, sizeof (*card)); /* poison memory */ + memset (card, 0xAB, sizeof (*card)); /* poison memory */ #endif kfree (card); @@ -3559,7 +3559,7 @@ static void __devexit via_remove_one (struct pci_dev *pdev) via_ac97_cleanup (card); #ifndef VIA_NDEBUG - memset (card, OSS_POISON_FREE, sizeof (*card)); /* poison memory */ + memset (card, 0xAB, sizeof (*card)); /* poison memory */ #endif kfree (card); diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c index 8932d8940..00fe5cec9 100644 --- a/sound/oss/vidc.c +++ b/sound/oss/vidc.c @@ -17,6 +17,7 @@ * We currently support a mixer device, but it is currently non-functional. */ +#include #include #include #include diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index 22d26624b..afcb524a4 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index 1dec3958c..b1a4eeb9d 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c @@ -2268,7 +2268,7 @@ static int __init wavefront_hw_reset (void) } if (request_irq (dev.irq, wavefrontintr, - IRQF_DISABLED|IRQF_SHARED, + SA_INTERRUPT|SA_SHIRQ, "wavefront synth", &dev) < 0) { printk (KERN_WARNING LOGNAME "IRQ %d not available!\n", dev.irq); diff --git a/sound/oss/wf_midi.c b/sound/oss/wf_midi.c index 3f3a39001..7b167b743 100644 --- a/sound/oss/wf_midi.c +++ b/sound/oss/wf_midi.c @@ -820,7 +820,7 @@ int __init install_wf_mpu (void) /* OK, now we're configured to handle an interrupt ... */ - if (request_irq (phys_dev->irq, wf_mpuintr, IRQF_DISABLED|IRQF_SHARED, + if (request_irq (phys_dev->irq, wf_mpuintr, SA_INTERRUPT|SA_SHIRQ, "wavefront midi", phys_dev) < 0) { printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n", diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c index 6e22472df..bf90c124a 100644 --- a/sound/oss/ymfpci.c +++ b/sound/oss/ymfpci.c @@ -2573,7 +2573,7 @@ static int __devinit ymf_probe_one(struct pci_dev *pcidev, const struct pci_devi goto out_disable_dsp; ymf_memload(codec); - if (request_irq(pcidev->irq, ymf_interrupt, IRQF_SHARED, "ymfpci", codec) != 0) { + if (request_irq(pcidev->irq, ymf_interrupt, SA_SHIRQ, "ymfpci", codec) != 0) { printk(KERN_ERR "ymfpci: unable to request IRQ %d\n", pcidev->irq); goto out_memfree; diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index e49c0fe21..8f34986dd 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -16,16 +16,16 @@ config SND_AD1889 will be called snd-ad1889. config SND_ALS300 - tristate "Avance Logic ALS300/ALS300+" - depends on SND - select SND_PCM - select SND_AC97_CODEC - select SND_OPL3_LIB - help - Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+ + tristate "Avance Logic ALS300/ALS300+" + depends on SND + select SND_PCM + select SND_AC97_CODEC + select SND_OPL3_LIB + help + Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+ - To compile this driver as a module, choose M here: the module - will be called snd-als300 + To compile this driver as a module, choose M here: the module + will be called snd-als300 config SND_ALS4000 tristate "Avance Logic ALS4000" @@ -78,49 +78,49 @@ config SND_ATIIXP_MODEM will be called snd-atiixp-modem. config SND_AU8810 - tristate "Aureal Advantage" - depends on SND + tristate "Aureal Advantage" + depends on SND select SND_MPU401_UART select SND_AC97_CODEC - help + help Say Y here to include support for Aureal Advantage soundcards. Supported features: Hardware Mixer, SRC, EQ and SPDIF output. - 3D support code is in place, but not yet useable. For more info, - email the ALSA developer list, or . + 3D support code is in place, but not yet useable. For more info, + email the ALSA developer list, or . To compile this driver as a module, choose M here: the module will be called snd-au8810. - + config SND_AU8820 - tristate "Aureal Vortex" - depends on SND + tristate "Aureal Vortex" + depends on SND select SND_MPU401_UART select SND_AC97_CODEC - help + help Say Y here to include support for Aureal Vortex soundcards. - Supported features: Hardware Mixer and SRC. For more info, email - the ALSA developer list, or . + Supported features: Hardware Mixer and SRC. For more info, email + the ALSA developer list, or . To compile this driver as a module, choose M here: the module will be called snd-au8820. - + config SND_AU8830 - tristate "Aureal Vortex 2" - depends on SND + tristate "Aureal Vortex 2" + depends on SND select SND_MPU401_UART select SND_AC97_CODEC - help + help Say Y here to include support for Aureal Vortex 2 soundcards. - Supported features: Hardware Mixer, SRC, EQ and SPDIF output. - 3D support code is in place, but not yet useable. For more info, - email the ALSA developer list, or . + Supported features: Hardware Mixer, SRC, EQ and SPDIF output. + 3D support code is in place, but not yet useable. For more info, + email the ALSA developer list, or . To compile this driver as a module, choose M here: the module will be called snd-au8830. - + config SND_AZT3328 tristate "Aztech AZF3328 / PCI168 (EXPERIMENTAL)" depends on SND && EXPERIMENTAL @@ -135,10 +135,10 @@ config SND_AZT3328 will be called snd-azt3328. config SND_BT87X - tristate "Bt87x Audio Capture" - depends on SND + tristate "Bt87x Audio Capture" + depends on SND select SND_PCM - help + help If you want to record audio from TV cards based on Brooktree Bt878/Bt879 chips, say Y here and read . @@ -209,167 +209,25 @@ config SND_CS46XX config SND_CS46XX_NEW_DSP bool "Cirrus Logic (Sound Fusion) New DSP support" depends on SND_CS46XX - default y + default y help Say Y here to use a new DSP image for SPDIF and dual codecs. This works better than the old code, so say Y. config SND_CS5535AUDIO - tristate "CS5535/CS5536 Audio" + tristate "CS5535 Audio" depends on SND && X86 && !X86_64 select SND_PCM select SND_AC97_CODEC help Say Y here to include support for audio on CS5535 chips. It is referred to as NS CS5535 IO or AMD CS5535 IO companion in - various literature. This driver also supports the CS5536 audio - device. However, for both chips, on certain boards, you may - need to use ac97_quirk=hp_only if your board has physically - mapped headphone out to master output. If that works for you, - send lspci -vvv output to the mailing list so that your board - can be identified in the quirks list. + various literature. To compile this driver as a module, choose M here: the module will be called snd-cs5535audio. -config SND_DARLA20 - tristate "(Echoaudio) Darla20" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Darla. - - To compile this driver as a module, choose M here: the module - will be called snd-darla20 - -config SND_GINA20 - tristate "(Echoaudio) Gina20" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Gina. - - To compile this driver as a module, choose M here: the module - will be called snd-gina20 - -config SND_LAYLA20 - tristate "(Echoaudio) Layla20" - depends on SND - depends on FW_LOADER - select SND_RAWMIDI - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Layla. - - To compile this driver as a module, choose M here: the module - will be called snd-layla20 - -config SND_DARLA24 - tristate "(Echoaudio) Darla24" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Darla24. - - To compile this driver as a module, choose M here: the module - will be called snd-darla24 - -config SND_GINA24 - tristate "(Echoaudio) Gina24" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Gina24. - - To compile this driver as a module, choose M here: the module - will be called snd-gina24 - -config SND_LAYLA24 - tristate "(Echoaudio) Layla24" - depends on SND - depends on FW_LOADER - select SND_RAWMIDI - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Layla24. - - To compile this driver as a module, choose M here: the module - will be called snd-layla24 - -config SND_MONA - tristate "(Echoaudio) Mona" - depends on SND - depends on FW_LOADER - select SND_RAWMIDI - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Mona. - - To compile this driver as a module, choose M here: the module - will be called snd-mona - -config SND_MIA - tristate "(Echoaudio) Mia" - depends on SND - depends on FW_LOADER - select SND_RAWMIDI - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Mia and Mia-midi. - - To compile this driver as a module, choose M here: the module - will be called snd-mia - -config SND_ECHO3G - tristate "(Echoaudio) 3G cards" - depends on SND - depends on FW_LOADER - select SND_RAWMIDI - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Gina3G and Layla3G. - - To compile this driver as a module, choose M here: the module - will be called snd-echo3g - -config SND_INDIGO - tristate "(Echoaudio) Indigo" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Indigo. - - To compile this driver as a module, choose M here: the module - will be called snd-indigo - -config SND_INDIGOIO - tristate "(Echoaudio) Indigo IO" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Indigo IO. - - To compile this driver as a module, choose M here: the module - will be called snd-indigoio - -config SND_INDIGODJ - tristate "(Echoaudio) Indigo DJ" - depends on SND - depends on FW_LOADER - select SND_PCM - help - Say 'Y' or 'M' to include support for Echoaudio Indigo DJ. - - To compile this driver as a module, choose M here: the module - will be called snd-indigodj - config SND_EMU10K1 tristate "Emu10k1 (SB Live!, Audigy, E-mu APS)" depends on SND @@ -468,13 +326,11 @@ config SND_FM801_TEA575X_BOOL FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media Forte SF256-PCS-02) into the snd-fm801 driver. - This will enable support for the old V4L1 API. - config SND_FM801_TEA575X - tristate - depends on SND_FM801_TEA575X_BOOL - default SND_FM801 - select VIDEO_V4L1 + tristate + depends on SND_FM801_TEA575X_BOOL + default SND_FM801 + select VIDEO_DEV config SND_HDA_INTEL tristate "Intel HD Audio" @@ -561,8 +417,8 @@ config SND_INTEL8X0 will be called snd-intel8x0. config SND_INTEL8X0M - tristate "Intel/SiS/nVidia/AMD MC97 Modem" - depends on SND + tristate "Intel/SiS/nVidia/AMD MC97 Modem (EXPERIMENTAL)" + depends on SND && EXPERIMENTAL select SND_AC97_CODEC help Say Y here to include support for the integrated MC97 modem on diff --git a/sound/pci/Makefile b/sound/pci/Makefile index e06736da9..cba5105aa 100644 --- a/sound/pci/Makefile +++ b/sound/pci/Makefile @@ -57,7 +57,6 @@ obj-$(CONFIG_SND) += \ ca0106/ \ cs46xx/ \ cs5535audio/ \ - echoaudio/ \ emu10k1/ \ hda/ \ ice1712/ \ diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 51e83d7a8..fcb00c2a2 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -253,8 +253,6 @@ void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short va ac97->bus->ops->write(ac97, reg, value); } -EXPORT_SYMBOL(snd_ac97_write); - /** * snd_ac97_read - read a value from the given register * @@ -283,8 +281,6 @@ static inline unsigned short snd_ac97_read_cache(struct snd_ac97 *ac97, unsigned return ac97->regs[reg]; } -EXPORT_SYMBOL(snd_ac97_read); - /** * snd_ac97_write_cache - write a value on the given register and update the cache * @ac97: the ac97 instance @@ -306,8 +302,6 @@ void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned sh mutex_unlock(&ac97->reg_mutex); } -EXPORT_SYMBOL(snd_ac97_write_cache); - /** * snd_ac97_update - update the value on the given register * @ac97: the ac97 instance @@ -337,8 +331,6 @@ int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short va return change; } -EXPORT_SYMBOL(snd_ac97_update); - /** * snd_ac97_update_bits - update the bits on the given register * @ac97: the ac97 instance @@ -364,8 +356,6 @@ int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned sho return change; } -EXPORT_SYMBOL(snd_ac97_update_bits); - /* no lock version - see snd_ac97_updat_bits() */ int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value) @@ -1214,6 +1204,20 @@ static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, int static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97); +static void snd_ctl_elem_remove(struct snd_card *card, + struct snd_kcontrol *kcontrol) +{ + struct snd_kcontrol *kct; + struct snd_ctl_elem_id id = kcontrol->id; + + down_write(&card->controls_rwsem); + + if ((kct = snd_ctl_find_id(card, &id))) + snd_ctl_remove(card, kct); + + up_write(&card->controls_rwsem); +} + static int snd_ac97_mixer_build(struct snd_ac97 * ac97) { struct snd_card *card = ac97->bus->card; @@ -1236,8 +1240,7 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) ac97->regs[AC97_CENTER_LFE_MASTER] = 0x8080; /* build center controls */ - if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER)) - && !(ac97->flags & AC97_AD_MULTI)) { + if (snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER)) { if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_center[0], ac97))) < 0) return err; if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_center[1], ac97))) < 0) @@ -1249,8 +1252,7 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) } /* build LFE controls */ - if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER+1)) - && !(ac97->flags & AC97_AD_MULTI)) { + if (snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER+1)) { if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_lfe[0], ac97))) < 0) return err; if ((err = snd_ctl_add(card, kctl = snd_ac97_cnew(&snd_ac97_controls_lfe[1], ac97))) < 0) @@ -1262,8 +1264,7 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) } /* build surround controls */ - if ((snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) - && !(ac97->flags & AC97_AD_MULTI)) { + if (snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) { /* Surround Master (0x38) is with stereo mutes */ if ((err = snd_ac97_cmix_new_stereo(card, "Surround Playback", AC97_SURROUND_MASTER, 1, ac97)) < 0) return err; @@ -1348,11 +1349,9 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) } /* build Aux controls */ - if (!(ac97->flags & AC97_HAS_NO_AUX)) { - if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) { - if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0) - return err; - } + if (snd_ac97_try_volume_mix(ac97, AC97_AUX)) { + if ((err = snd_ac97_cmix_new(card, "Aux Playback", AC97_AUX, ac97)) < 0) + return err; } /* build PCM controls */ @@ -1362,23 +1361,35 @@ static int snd_ac97_mixer_build(struct snd_ac97 * ac97) init_val = 0x9f9f; else init_val = 0x9f1f; - for (idx = 0; idx < 2; idx++) - if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97))) < 0) + for (idx = 0; idx < 2; idx++) { + struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_pcm[idx], ac97); + snd_ctl_elem_remove(card, kctrl); + if ((err = snd_ctl_add(card, kctrl)) < 0) return err; + } ac97->spec.ad18xx.pcmreg[0] = init_val; if (ac97->scaps & AC97_SCAP_SURROUND_DAC) { - for (idx = 0; idx < 2; idx++) - if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97))) < 0) + for (idx = 0; idx < 2; idx++) { + struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_surround[idx], ac97); + snd_ctl_elem_remove(card, kctrl); + if ((err = snd_ctl_add(card, kctrl)) < 0) return err; + } ac97->spec.ad18xx.pcmreg[1] = init_val; } if (ac97->scaps & AC97_SCAP_CENTER_LFE_DAC) { - for (idx = 0; idx < 2; idx++) - if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97))) < 0) + for (idx = 0; idx < 2; idx++) { + struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_center[idx], ac97); + snd_ctl_elem_remove(card, kctrl); + if ((err = snd_ctl_add(card, kctrl)) < 0) return err; - for (idx = 0; idx < 2; idx++) - if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97))) < 0) + } + for (idx = 0; idx < 2; idx++) { + struct snd_kcontrol *kctrl = snd_ac97_cnew(&snd_ac97_controls_ad18xx_lfe[idx], ac97); + snd_ctl_elem_remove(card, kctrl); + if ((err = snd_ctl_add(card, kctrl)) < 0) return err; + } ac97->spec.ad18xx.pcmreg[2] = init_val; } snd_ac97_write_cache(ac97, AC97_PCM, init_val); @@ -1697,7 +1708,6 @@ const char *snd_ac97_get_short_name(struct snd_ac97 *ac97) return "unknown codec"; } -EXPORT_SYMBOL(snd_ac97_get_short_name); /* wait for a while until registers are accessible after RESET * return 0 if ok, negative not ready @@ -1790,8 +1800,6 @@ int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, return 0; } -EXPORT_SYMBOL(snd_ac97_bus); - /* stop no dev release warning */ static void ac97_device_release(struct device * dev) { @@ -2135,7 +2143,6 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, return 0; } -EXPORT_SYMBOL(snd_ac97_mixer); /* * Power down the chip. @@ -2185,8 +2192,6 @@ void snd_ac97_suspend(struct snd_ac97 *ac97) snd_ac97_powerdown(ac97); } -EXPORT_SYMBOL(snd_ac97_suspend); - /* * restore ac97 status */ @@ -2288,8 +2293,6 @@ __reset_ready: snd_ac97_restore_iec958(ac97); } } - -EXPORT_SYMBOL(snd_ac97_resume); #endif @@ -2613,7 +2616,29 @@ int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, cons return 0; } + +/* + * Exported symbols + */ + +EXPORT_SYMBOL(snd_ac97_write); +EXPORT_SYMBOL(snd_ac97_read); +EXPORT_SYMBOL(snd_ac97_write_cache); +EXPORT_SYMBOL(snd_ac97_update); +EXPORT_SYMBOL(snd_ac97_update_bits); +EXPORT_SYMBOL(snd_ac97_get_short_name); +EXPORT_SYMBOL(snd_ac97_bus); +EXPORT_SYMBOL(snd_ac97_mixer); +EXPORT_SYMBOL(snd_ac97_pcm_assign); +EXPORT_SYMBOL(snd_ac97_pcm_open); +EXPORT_SYMBOL(snd_ac97_pcm_close); +EXPORT_SYMBOL(snd_ac97_pcm_double_rate_rules); EXPORT_SYMBOL(snd_ac97_tune_hardware); +EXPORT_SYMBOL(snd_ac97_set_rate); +#ifdef CONFIG_PM +EXPORT_SYMBOL(snd_ac97_resume); +EXPORT_SYMBOL(snd_ac97_suspend); +#endif /* * INIT part diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 094cfc1f3..4d9cf3730 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -464,10 +464,6 @@ int patch_wolfson05(struct snd_ac97 * ac97) { /* WM9705, WM9710 */ ac97->build_ops = &patch_wolfson_wm9705_ops; -#ifdef CONFIG_TOUCHSCREEN_WM9705 - /* WM9705 touchscreen uses AUX and VIDEO for touch */ - ac97->flags |=3D AC97_HAS_NO_VIDEO | AC97_HAS_NO_AUX; -#endif return 0; } @@ -1371,13 +1367,6 @@ static void ad18xx_resume(struct snd_ac97 *ac97) snd_ac97_restore_iec958(ac97); } - -static void ad1888_resume(struct snd_ac97 *ac97) -{ - ad18xx_resume(ac97); - snd_ac97_write_cache(ac97, AC97_CODEC_CLASS_REV, 0x8080); -} - #endif int patch_ad1819(struct snd_ac97 * ac97) @@ -1638,7 +1627,6 @@ static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = { * (SS vendor << 16 | device) */ static unsigned int ad1981_jacks_blacklist[] = { - 0x10140537, /* Thinkpad T41p */ 0x10140554, /* Thinkpad T42p/R50p */ 0 /* end */ }; @@ -1824,8 +1812,6 @@ static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] = { .get = snd_ac97_ad1888_lohpsel_get, .put = snd_ac97_ad1888_lohpsel_put }, - AC97_SINGLE("V_REFOUT Enable", AC97_AD_MISC, 2, 1, 1), - AC97_SINGLE("High Pass Filter Enable", AC97_AD_TEST2, 12, 1, 1), AC97_SINGLE("Spread Front to Surround and Center/LFE", AC97_AD_MISC, 7, 1, 0), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, @@ -1853,7 +1839,7 @@ static struct snd_ac97_build_ops patch_ad1888_build_ops = { .build_post_spdif = patch_ad198x_post_spdif, .build_specific = patch_ad1888_specific, #ifdef CONFIG_PM - .resume = ad1888_resume, + .resume = ad18xx_resume, #endif .update_jacks = ad1888_update_jacks, }; @@ -2062,10 +2048,7 @@ int patch_alc650(struct snd_ac97 * ac97) /* Enable SPDIF-IN only on Rev.E and above */ val = snd_ac97_read(ac97, AC97_ALC650_CLOCK); /* SPDIF IN with pin 47 */ - if (ac97->spec.dev_flags && - /* ASUS A6KM requires EAPD */ - ! (ac97->subsystem_vendor == 0x1043 && - ac97->subsystem_device == 0x1103)) + if (ac97->spec.dev_flags) val |= 0x03; /* enable */ else val &= ~0x03; /* disable */ diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c index f684aa2c0..512a3583b 100644 --- a/sound/pci/ac97/ac97_pcm.c +++ b/sound/pci/ac97/ac97_pcm.c @@ -317,8 +317,6 @@ int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate) return 0; } -EXPORT_SYMBOL(snd_ac97_set_rate); - static unsigned short get_pslots(struct snd_ac97 *ac97, unsigned char *rate_table, unsigned short *spdif_slots) { if (!ac97_is_audio(ac97)) @@ -552,8 +550,6 @@ int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, return 0; } -EXPORT_SYMBOL(snd_ac97_pcm_assign); - /** * snd_ac97_pcm_open - opens the given AC97 pcm * @pcm: the ac97 pcm instance @@ -637,8 +633,6 @@ int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, return err; } -EXPORT_SYMBOL(snd_ac97_pcm_open); - /** * snd_ac97_pcm_close - closes the given AC97 pcm * @pcm: the ac97 pcm instance @@ -664,8 +658,6 @@ int snd_ac97_pcm_close(struct ac97_pcm *pcm) return 0; } -EXPORT_SYMBOL(snd_ac97_pcm_close); - static int double_rate_hw_constraint_rate(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -717,5 +709,3 @@ int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime) SNDRV_PCM_HW_PARAM_RATE, -1); return err; } - -EXPORT_SYMBOL(snd_ac97_pcm_double_rate_rules); diff --git a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c index 2118df50b..4d523df79 100644 --- a/sound/pci/ac97/ac97_proc.c +++ b/sound/pci/ac97/ac97_proc.c @@ -433,7 +433,7 @@ void snd_ac97_proc_init(struct snd_ac97 * ac97) prefix = ac97_is_audio(ac97) ? "ac97" : "mc97"; sprintf(name, "%s#%d-%d", prefix, ac97->addr, ac97->num); if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) { - snd_info_set_text_ops(entry, ac97, snd_ac97_proc_read); + snd_info_set_text_ops(entry, ac97, 1024, snd_ac97_proc_read); if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); entry = NULL; @@ -442,9 +442,10 @@ void snd_ac97_proc_init(struct snd_ac97 * ac97) ac97->proc = entry; sprintf(name, "%s#%d-%d+regs", prefix, ac97->addr, ac97->num); if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) { - snd_info_set_text_ops(entry, ac97, snd_ac97_proc_regs_read); + snd_info_set_text_ops(entry, ac97, 1024, snd_ac97_proc_regs_read); #ifdef CONFIG_SND_DEBUG entry->mode |= S_IWUSR; + entry->c.text.write_size = 1024; entry->c.text.write = snd_ac97_proc_regs_write; #endif if (snd_info_register(entry) < 0) { diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c index 94c26ec05..0fb7b3407 100644 --- a/sound/pci/ac97/ak4531_codec.c +++ b/sound/pci/ac97/ak4531_codec.c @@ -453,7 +453,7 @@ static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak453 struct snd_info_entry *entry; if (! snd_card_proc_new(card, "ak4531", &entry)) - snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read); + snd_info_set_text_ops(entry, ak4531, 1024, snd_ak4531_proc_read); } #endif diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 0786d0eda..eece1c7e5 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c @@ -241,14 +241,14 @@ ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel) } } -static u16 +static inline u16 snd_ad1889_ac97_read(struct snd_ac97 *ac97, unsigned short reg) { struct snd_ad1889 *chip = ac97->private_data; return ad1889_readw(chip, AD_AC97_BASE + reg); } -static void +static inline void snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val) { struct snd_ad1889 *chip = ac97->private_data; @@ -753,7 +753,7 @@ snd_ad1889_proc_init(struct snd_ad1889 *chip) struct snd_info_entry *entry; if (!snd_card_proc_new(chip->card, chip->card->driver, &entry)) - snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_ad1889_proc_read); } static struct ac97_quirk ac97_quirks[] = { @@ -873,7 +873,7 @@ skip_hw: return 0; } -static int +static inline int snd_ad1889_dev_free(struct snd_device *device) { struct snd_ad1889 *chip = device->device_data; @@ -947,7 +947,7 @@ snd_ad1889_create(struct snd_card *card, spin_lock_init(&chip->lock); /* only now can we call ad1889_free */ if (request_irq(pci->irq, snd_ad1889_interrupt, - IRQF_DISABLED|IRQF_SHARED, card->driver, (void*)chip)) { + SA_INTERRUPT|SA_SHIRQ, card->driver, (void*)chip)) { printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq); snd_ad1889_free(chip); return -EBUSY; @@ -1051,7 +1051,7 @@ snd_ad1889_remove(struct pci_dev *pci) pci_set_drvdata(pci, NULL); } -static struct pci_device_id snd_ad1889_ids[] = { +static struct pci_device_id snd_ad1889_ids[] __devinitdata = { { PCI_DEVICE(PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS) }, { 0, }, }; diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 74668398e..e2dbc2118 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -49,7 +49,7 @@ MODULE_SUPPORTED_DEVICE("{{ALI,M5451,pci},{ALI,M5451}}"); static int index = SNDRV_DEFAULT_IDX1; /* Index */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ static int pcm_channels = 32; -static int spdif; +static int spdif = 0; module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for ALI M5451 PCI Audio."); @@ -279,7 +279,7 @@ struct snd_ali { #endif }; -static struct pci_device_id snd_ali_ids[] = { +static struct pci_device_id snd_ali_ids[] __devinitdata = { {PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0}, {0, } }; @@ -2173,7 +2173,7 @@ static void __devinit snd_ali_proc_init(struct snd_ali *codec) { struct snd_info_entry *entry; if(!snd_card_proc_new(codec->card, "ali5451", &entry)) - snd_info_set_text_ops(entry, codec, snd_ali_proc_read); + snd_info_set_text_ops(entry, codec, 1024, snd_ali_proc_read); } static int __devinit snd_ali_resources(struct snd_ali *codec) @@ -2185,7 +2185,7 @@ static int __devinit snd_ali_resources(struct snd_ali *codec) return err; codec->port = pci_resource_start(codec->pci, 0); - if (request_irq(codec->pci->irq, snd_ali_card_interrupt, IRQF_DISABLED|IRQF_SHARED, "ALI 5451", (void *)codec)) { + if (request_irq(codec->pci->irq, snd_ali_card_interrupt, SA_INTERRUPT|SA_SHIRQ, "ALI 5451", (void *)codec)) { snd_printk(KERN_ERR "Unable to request irq.\n"); return -EBUSY; } diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 96cfb8ae5..901b08ae9 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -146,7 +146,7 @@ struct snd_als300_substream_data { int block_counter_register; }; -static struct pci_device_id snd_als300_ids[] = { +static struct pci_device_id snd_als300_ids[] __devinitdata = { { 0x4005, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300 }, { 0x4005, 0x0308, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALS300_PLUS }, { 0, } @@ -724,7 +724,7 @@ static int __devinit snd_als300_create(snd_card_t *card, else irq_handler = snd_als300_interrupt; - if (request_irq(pci->irq, irq_handler, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, irq_handler, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_als300_free(chip); diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index 9e596f750..60423b1c6 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c @@ -116,7 +116,7 @@ struct snd_card_als4000 { #endif }; -static struct pci_device_id snd_als4000_ids[] = { +static struct pci_device_id snd_als4000_ids[] __devinitdata = { { 0x4005, 0x4000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ALS4000 */ { 0, } }; @@ -746,8 +746,8 @@ static int __devinit snd_card_als4000_probe(struct pci_dev *pci, card->shortname, chip->alt_port, chip->irq); if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_ALS4000, - gcr+0x30, MPU401_INFO_INTEGRATED, - pci->irq, 0, &chip->rmidi)) < 0) { + gcr+0x30, 1, pci->irq, 0, + &chip->rmidi)) < 0) { printk(KERN_ERR "als4000: no MPU-401 device at 0x%lx?\n", gcr+0x30); goto out_err; } diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 347e25ff0..d0f759d86 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c @@ -284,7 +284,7 @@ struct atiixp { /* */ -static struct pci_device_id snd_atiixp_ids[] = { +static struct pci_device_id snd_atiixp_ids[] __devinitdata = { { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ @@ -1504,7 +1504,7 @@ static void __devinit snd_atiixp_proc_init(struct atiixp *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "atiixp", &entry)) - snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read); } #else /* !CONFIG_PROC_FS */ #define snd_atiixp_proc_init(chip) @@ -1578,7 +1578,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, return -EIO; } - if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_atiixp_free(chip); diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index a89d67c45..12a34c39c 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c @@ -262,7 +262,7 @@ struct atiixp_modem { /* */ -static struct pci_device_id snd_atiixp_ids[] = { +static struct pci_device_id snd_atiixp_ids[] __devinitdata = { { 0x1002, 0x434d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ { 0x1002, 0x4378, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ { 0, } @@ -1177,7 +1177,7 @@ static void __devinit snd_atiixp_proc_init(struct atiixp_modem *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "atiixp-modem", &entry)) - snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_atiixp_proc_read); } #else #define snd_atiixp_proc_init(chip) @@ -1251,7 +1251,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, return -EIO; } - if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_atiixp_free(chip); diff --git a/sound/pci/au88x0/au8810.c b/sound/pci/au88x0/au8810.c index fce22c7af..bd3352998 100644 --- a/sound/pci/au88x0/au8810.c +++ b/sound/pci/au88x0/au8810.c @@ -1,6 +1,6 @@ #include "au8810.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] = { +static struct pci_device_id snd_vortex_ids[] __devinitdata = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,}, {0,} diff --git a/sound/pci/au88x0/au8820.c b/sound/pci/au88x0/au8820.c index d1fbcce07..7e3fd8372 100644 --- a/sound/pci/au88x0/au8820.c +++ b/sound/pci/au88x0/au8820.c @@ -1,6 +1,6 @@ #include "au8820.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] = { +static struct pci_device_id snd_vortex_ids[] __devinitdata = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, {0,} diff --git a/sound/pci/au88x0/au8830.c b/sound/pci/au88x0/au8830.c index d4f2717c1..b840f6608 100644 --- a/sound/pci/au88x0/au8830.c +++ b/sound/pci/au88x0/au8830.c @@ -1,6 +1,6 @@ #include "au8830.h" #include "au88x0.h" -static struct pci_device_id snd_vortex_ids[] = { +static struct pci_device_id snd_vortex_ids[] __devinitdata = { {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, {0,} diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 6ed5ad59f..126870ec0 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -128,7 +128,6 @@ static int snd_vortex_dev_free(struct snd_device *device) // Take down PCI interface. synchronize_irq(vortex->irq); free_irq(vortex->irq, vortex); - iounmap(vortex->mmio); pci_release_regions(vortex->pci_dev); pci_disable_device(vortex->pci_dev); kfree(vortex); @@ -198,7 +197,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) } if ((err = request_irq(pci->irq, vortex_interrupt, - IRQF_DISABLED | IRQF_SHARED, CARD_NAME_SHORT, + SA_INTERRUPT | SA_SHIRQ, CARD_NAME_SHORT, chip)) != 0) { printk(KERN_ERR "cannot grab irq\n"); goto irq_out; @@ -262,13 +261,6 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) return err; } snd_vortex_workaround(pci, pcifix[dev]); - - // Card details needed in snd_vortex_midi - strcpy(card->driver, CARD_NAME_SHORT); - sprintf(card->shortname, "Aureal Vortex %s", CARD_NAME_SHORT); - sprintf(card->longname, "%s at 0x%lx irq %i", - card->shortname, chip->io, chip->irq); - // (4) Alloc components. // ADB pcm. if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) { @@ -331,6 +323,11 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) #endif // (5) + strcpy(card->driver, CARD_NAME_SHORT); + strcpy(card->shortname, CARD_NAME_SHORT); + sprintf(card->longname, "%s at 0x%lx irq %i", + card->shortname, chip->io, chip->irq); + if ((err = pci_read_config_word(pci, PCI_DEVICE_ID, &(chip->device))) < 0) { snd_card_free(card); diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index b1cfc3c79..f078b716d 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h @@ -270,8 +270,7 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix, /* A3D functions. */ #ifndef CHIP_AU8820 -static void vortex_Vort3D_enable(vortex_t * v); -static void vortex_Vort3D_disable(vortex_t * v); +static void vortex_Vort3D(vortex_t * v, int en); static void vortex_Vort3D_connect(vortex_t * vortex, int en); static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); #endif diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c index 649849e54..d215f393e 100644 --- a/sound/pci/au88x0/au88x0_a3d.c +++ b/sound/pci/au88x0/au88x0_a3d.c @@ -593,23 +593,24 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode) static int vortex_a3d_register_controls(vortex_t * vortex); static void vortex_a3d_unregister_controls(vortex_t * vortex); /* A3D base support init/shudown */ -static void __devinit vortex_Vort3D_enable(vortex_t * v) +static void vortex_Vort3D(vortex_t * v, int en) { int i; - - Vort3DRend_Initialize(v, XT_HEADPHONE); - for (i = 0; i < NR_A3D; i++) { - vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); - a3dsrc_ZeroStateA3D(&(v->a3d[0])); + if (en) { + Vort3DRend_Initialize(v, XT_HEADPHONE); + for (i = 0; i < NR_A3D; i++) { + vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2); + a3dsrc_ZeroStateA3D(&(v->a3d[0])); + } + } else { + vortex_XtalkHw_Disable(v); } /* Register ALSA controls */ - vortex_a3d_register_controls(v); -} - -static void vortex_Vort3D_disable(vortex_t * v) -{ - vortex_XtalkHw_Disable(v); - vortex_a3d_unregister_controls(v); + if (en) { + vortex_a3d_register_controls(v); + } else { + vortex_a3d_unregister_controls(v); + } } /* Make A3D subsystem connections. */ @@ -854,7 +855,7 @@ static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = { }; /* Control (un)registration. */ -static int __devinit vortex_a3d_register_controls(vortex_t * vortex) +static int vortex_a3d_register_controls(vortex_t * vortex) { struct snd_kcontrol *kcontrol; int err, i; diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 5299cce58..4347e6abc 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c @@ -2690,7 +2690,7 @@ static int __devinit vortex_core_init(vortex_t * vortex) #ifndef CHIP_AU8820 vortex_eq_init(vortex); vortex_spdif_init(vortex, 48000, 1); - vortex_Vort3D_enable(vortex); + vortex_Vort3D(vortex, 1); #endif #ifndef CHIP_AU8810 vortex_wt_init(vortex); @@ -2718,7 +2718,7 @@ static int vortex_core_shutdown(vortex_t * vortex) printk(KERN_INFO "Vortex: shutdown..."); #ifndef CHIP_AU8820 vortex_eq_free(vortex); - vortex_Vort3D_disable(vortex); + vortex_Vort3D(vortex, 0); #endif //vortex_disable_timer_int(vortex); vortex_disable_int(vortex); diff --git a/sound/pci/au88x0/au88x0_mpu401.c b/sound/pci/au88x0/au88x0_mpu401.c index c75d368ea..118dcc71e 100644 --- a/sound/pci/au88x0/au88x0_mpu401.c +++ b/sound/pci/au88x0/au88x0_mpu401.c @@ -70,6 +70,9 @@ static int __devinit snd_vortex_midi(vortex_t * vortex) temp |= (MIDI_CLOCK_DIV << 8) | ((mode >> 24) & 0xff) << 4; hwwrite(vortex->mmio, VORTEX_CTRL2, temp); hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_RESET); + /* Set some kind of mode */ + if (mode) + hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_ENTER_UART); /* Check if anything is OK. */ temp = hwread(vortex->mmio, VORTEX_MIDI_DATA); @@ -95,8 +98,7 @@ static int __devinit snd_vortex_midi(vortex_t * vortex) port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA); if ((temp = snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port, - MPU401_INFO_INTEGRATED | MPU401_INFO_MMIO, - 0, 0, &rmidi)) != 0) { + 1, 0, 0, &rmidi)) != 0) { hwwrite(vortex->mmio, VORTEX_CTRL, (hwread(vortex->mmio, VORTEX_CTRL) & ~CTRL_MIDI_PORT) & ~CTRL_MIDI_EN); @@ -105,9 +107,6 @@ static int __devinit snd_vortex_midi(vortex_t * vortex) mpu = rmidi->private_data; mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD); #endif - /* Overwrite MIDI name */ - snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI %d", CARD_NAME_SHORT , vortex->card->number); - vortex->rmidi = rmidi; return 0; } diff --git a/sound/pci/au88x0/au88x0_xtalk.c b/sound/pci/au88x0/au88x0_xtalk.c index b4151e208..4534e1882 100644 --- a/sound/pci/au88x0/au88x0_xtalk.c +++ b/sound/pci/au88x0/au88x0_xtalk.c @@ -66,20 +66,31 @@ static xtalk_gains_t const asXtalkGainsAllChan = { 0 //0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7fff }; -static xtalk_gains_t const asXtalkGainsZeros; +static xtalk_gains_t const asXtalkGainsZeros = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; -static xtalk_dline_t const alXtalkDlineZeros; +static xtalk_dline_t const alXtalkDlineZeros = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}; static xtalk_dline_t const alXtalkDlineTest = { 0xFC18, 0x03E8FFFF, 0x186A0, 0x7960FFFE, 1, 0xFFFFFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static xtalk_instate_t const asXtalkInStateZeros; +static xtalk_instate_t const asXtalkInStateZeros = { 0, 0, 0, 0 }; static xtalk_instate_t const asXtalkInStateTest = { 0xFF80, 0x0080, 0xFFFF, 0x0001 }; -static xtalk_state_t const asXtalkOutStateZeros; - +static xtalk_state_t const asXtalkOutStateZeros = { + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0} +}; static short const sDiamondKLeftEq = 0x401d; static short const sDiamondKRightEq = 0x401d; static short const sDiamondKLeftXt = 0xF90E; @@ -151,7 +162,13 @@ static xtalk_coefs_t const asXtalkNarrowCoefsRightXt = { {0, 0, 0, 0, 0} }; -static xtalk_coefs_t const asXtalkCoefsZeros; +static xtalk_coefs_t const asXtalkCoefsZeros = { + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; static xtalk_coefs_t const asXtalkCoefsPipe = { {0, 0, 0x0FA0, 0, 0}, {0, 0, 0x0FA0, 0, 0}, diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index bac8e9cfd..52a364524 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c @@ -33,21 +33,14 @@ * in the first place >:-P}), * I was forced to base this driver on reverse engineering * (3 weeks' worth of evenings filled with driver work). - * (and no, I did NOT go the easy way: to pick up a SB PCI128 for 9 Euros) + * (and no, I did NOT go the easy way: to pick up a PCI128 for 9 Euros) * * The AZF3328 chip (note: AZF3328, *not* AZT3328, that's just the driver name * for compatibility reasons) has the following features: * * - builtin AC97 conformant codec (SNR over 80dB) - * Note that "conformant" != "compliant"!! this chip's mixer register layout - * *differs* from the standard AC97 layout: - * they chose to not implement the headphone register (which is not a - * problem since it's merely optional), yet when doing this, they committed - * the grave sin of letting other registers follow immediately instead of - * keeping a headphone dummy register, thereby shifting the mixer register - * addresses illegally. So far unfortunately it looks like the very flexible - * ALSA AC97 support is still not enough to easily compensate for such a - * grave layout violation despite all tweaks and quirks mechanisms it offers. + * (really AC97 compliant?? I really doubt it when looking + * at the mixer register layout) * - builtin genuine OPL3 * - full duplex 16bit playback/record at independent sampling rate * - MPU401 (+ legacy address support) FIXME: how to enable legacy addr?? @@ -97,15 +90,10 @@ * * TODO * - test MPU401 MIDI playback etc. - * - add some power micro-management (disable various units of the card - * as long as they're unused). However this requires I/O ports which I - * haven't figured out yet and which thus might not even exist... - * The standard suspend/resume functionality could probably make use of - * some improvement, too... + * - power management. See e.g. intel8x0 or cs4281. + * This would be nice since the chip runs a bit hot, and it's *required* + * anyway for proper ACPI power management. * - figure out what all unknown port bits are responsible for - * - figure out some cleverly evil scheme to possibly make ALSA AC97 code - * fully accept our quite incompatible ""AC97"" mixer and thus save some - * code (but I'm not too optimistic that doing this is possible at all) */ #include @@ -226,19 +214,9 @@ struct snd_azf3328 { struct pci_dev *pci; int irq; - -#ifdef CONFIG_PM - /* register value containers for power management - * Note: not always full I/O range preserved (just like Win driver!) */ - u16 saved_regs_codec [AZF_IO_SIZE_CODEC_PM / 2]; - u16 saved_regs_io2 [AZF_IO_SIZE_IO2_PM / 2]; - u16 saved_regs_mpu [AZF_IO_SIZE_MPU_PM / 2]; - u16 saved_regs_synth[AZF_IO_SIZE_SYNTH_PM / 2]; - u16 saved_regs_mixer[AZF_IO_SIZE_MIXER_PM / 2]; -#endif }; -static const struct pci_device_id snd_azf3328_ids[] = { +static const struct pci_device_id snd_azf3328_ids[] __devinitdata = { { 0x122D, 0x50DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* PCI168/3328 */ { 0x122D, 0x80DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* 3328 */ { 0, } @@ -339,8 +317,10 @@ snd_azf3328_mixer_write_volume_gradually(const struct snd_azf3328 *chip, int reg else dst_vol_left &= ~0x80; - do { - if (!left_done) { + do + { + if (!left_done) + { if (curr_vol_left > dst_vol_left) curr_vol_left--; else @@ -350,7 +330,8 @@ snd_azf3328_mixer_write_volume_gradually(const struct snd_azf3328 *chip, int reg left_done = 1; outb(curr_vol_left, portbase + 1); } - if (!right_done) { + if (!right_done) + { if (curr_vol_right > dst_vol_right) curr_vol_right--; else @@ -365,7 +346,8 @@ snd_azf3328_mixer_write_volume_gradually(const struct snd_azf3328 *chip, int reg } if (delay) mdelay(delay); - } while ((!left_done) || (!right_done)); + } + while ((!left_done) || (!right_done)); snd_azf3328_dbgcallleave(); } @@ -532,18 +514,15 @@ snd_azf3328_info_mixer_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char * const texts1[] = { - "Mic1", "Mic2" + "ModemOut1", "ModemOut2" }; static const char * const texts2[] = { - "Mix", "Mic" + "MonoSelectSource1", "MonoSelectSource2" }; static const char * const texts3[] = { "Mic", "CD", "Video", "Aux", "Line", "Mix", "Mix Mono", "Phone" }; - static const char * const texts4[] = { - "pre 3D", "post 3D" - }; struct azf3328_mixer_reg reg; snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); @@ -552,19 +531,14 @@ snd_azf3328_info_mixer_enum(struct snd_kcontrol *kcontrol, uinfo->value.enumerated.items = reg.enum_c; if (uinfo->value.enumerated.item > reg.enum_c - 1U) uinfo->value.enumerated.item = reg.enum_c - 1U; - if (reg.reg == IDX_MIXER_ADVCTL2) { - switch(reg.lchan_shift) { - case 8: /* modem out sel */ + if (reg.reg == IDX_MIXER_ADVCTL2) + { + if (reg.lchan_shift == 8) /* modem out sel */ strcpy(uinfo->value.enumerated.name, texts1[uinfo->value.enumerated.item]); - break; - case 9: /* mono sel source */ + else /* mono sel source */ strcpy(uinfo->value.enumerated.name, texts2[uinfo->value.enumerated.item]); - break; - case 15: /* PCM Out Path */ - strcpy(uinfo->value.enumerated.name, texts4[uinfo->value.enumerated.item]); - break; - } - } else + } + else strcpy(uinfo->value.enumerated.name, texts3[uinfo->value.enumerated.item] ); return 0; @@ -580,10 +554,12 @@ snd_azf3328_get_mixer_enum(struct snd_kcontrol *kcontrol, snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); val = snd_azf3328_mixer_inw(chip, reg.reg); - if (reg.reg == IDX_MIXER_REC_SELECT) { + if (reg.reg == IDX_MIXER_REC_SELECT) + { ucontrol->value.enumerated.item[0] = (val >> 8) & (reg.enum_c - 1); ucontrol->value.enumerated.item[1] = (val >> 0) & (reg.enum_c - 1); - } else + } + else ucontrol->value.enumerated.item[0] = (val >> reg.lchan_shift) & (reg.enum_c - 1); snd_azf3328_dbgmixer("get_enum: %02x is %04x -> %d|%d (shift %02d, enum_c %d)\n", @@ -603,13 +579,16 @@ snd_azf3328_put_mixer_enum(struct snd_kcontrol *kcontrol, snd_azf3328_mixer_reg_decode(®, kcontrol->private_value); oreg = snd_azf3328_mixer_inw(chip, reg.reg); val = oreg; - if (reg.reg == IDX_MIXER_REC_SELECT) { + if (reg.reg == IDX_MIXER_REC_SELECT) + { if (ucontrol->value.enumerated.item[0] > reg.enum_c - 1U || ucontrol->value.enumerated.item[1] > reg.enum_c - 1U) return -EINVAL; val = (ucontrol->value.enumerated.item[0] << 8) | (ucontrol->value.enumerated.item[1] << 0); - } else { + } + else + { if (ucontrol->value.enumerated.item[0] > reg.enum_c - 1U) return -EINVAL; val &= ~((reg.enum_c - 1) << reg.lchan_shift); @@ -650,14 +629,13 @@ static const struct snd_kcontrol_new snd_azf3328_mixer_controls[] __devinitdata AZF3328_MIXER_VOL_MONO("Modem Playback Volume", IDX_MIXER_MODEMOUT, 0x1f, 1), AZF3328_MIXER_SWITCH("Modem Capture Switch", IDX_MIXER_MODEMIN, 15, 1), AZF3328_MIXER_VOL_MONO("Modem Capture Volume", IDX_MIXER_MODEMIN, 0x1f, 1), - AZF3328_MIXER_ENUM("Mic Select", IDX_MIXER_ADVCTL2, 2, 8), - AZF3328_MIXER_ENUM("Mono Output Select", IDX_MIXER_ADVCTL2, 2, 9), - AZF3328_MIXER_ENUM("PCM", IDX_MIXER_ADVCTL2, 2, 15), /* PCM Out Path, place in front since it controls *both* 3D and Bass/Treble! */ + AZF3328_MIXER_ENUM("Modem Out Select", IDX_MIXER_ADVCTL2, 2, 8), + AZF3328_MIXER_ENUM("Mono Select Source", IDX_MIXER_ADVCTL2, 2, 9), AZF3328_MIXER_VOL_SPECIAL("Tone Control - Treble", IDX_MIXER_BASSTREBLE, 0x07, 1, 0), AZF3328_MIXER_VOL_SPECIAL("Tone Control - Bass", IDX_MIXER_BASSTREBLE, 0x07, 9, 0), AZF3328_MIXER_SWITCH("3D Control - Switch", IDX_MIXER_ADVCTL2, 13, 0), - AZF3328_MIXER_VOL_SPECIAL("3D Control - Width", IDX_MIXER_ADVCTL1, 0x07, 1, 0), /* "3D Width" */ - AZF3328_MIXER_VOL_SPECIAL("3D Control - Depth", IDX_MIXER_ADVCTL1, 0x03, 8, 0), /* "Hifi 3D" */ + AZF3328_MIXER_VOL_SPECIAL("3D Control - Wide", IDX_MIXER_ADVCTL1, 0x07, 1, 0), /* "3D Width" */ + AZF3328_MIXER_VOL_SPECIAL("3D Control - Space", IDX_MIXER_ADVCTL1, 0x03, 8, 0), /* "Hifi 3D" */ #if MIXER_TESTING AZF3328_MIXER_SWITCH("0", IDX_MIXER_ADVCTL2, 0, 0), AZF3328_MIXER_SWITCH("1", IDX_MIXER_ADVCTL2, 1, 0), @@ -835,18 +813,22 @@ snd_azf3328_setdmaa(struct snd_azf3328 *chip, unsigned int is_running; snd_azf3328_dbgcallenter(); - if (do_recording) { + if (do_recording) + { /* access capture registers, i.e. skip playback reg section */ portbase = chip->codec_port + 0x20; is_running = chip->is_recording; - } else { + } + else + { /* access the playback register section */ portbase = chip->codec_port + 0x00; is_running = chip->is_playing; } /* AZF3328 uses a two buffer pointer DMA playback approach */ - if (!is_running) { + if (!is_running) + { unsigned long addr_area2; unsigned long count_areas, count_tmp; /* width 32bit -- overflow!! */ count_areas = size/2; @@ -979,13 +961,6 @@ snd_azf3328_playback_trigger(struct snd_pcm_substream *substream, int cmd) chip->is_playing = 1; snd_azf3328_dbgplay("STARTED PLAYBACK\n"); break; - case SNDRV_PCM_TRIGGER_RESUME: - snd_azf3328_dbgplay("RESUME PLAYBACK\n"); - /* resume playback if we were active */ - if (chip->is_playing) - snd_azf3328_codec_outw(chip, IDX_IO_PLAY_FLAGS, - snd_azf3328_codec_inw(chip, IDX_IO_PLAY_FLAGS) | DMA_RESUME); - break; case SNDRV_PCM_TRIGGER_STOP: snd_azf3328_dbgplay("STOP PLAYBACK\n"); @@ -1013,12 +988,6 @@ snd_azf3328_playback_trigger(struct snd_pcm_substream *substream, int cmd) chip->is_playing = 0; snd_azf3328_dbgplay("STOPPED PLAYBACK\n"); break; - case SNDRV_PCM_TRIGGER_SUSPEND: - snd_azf3328_dbgplay("SUSPEND PLAYBACK\n"); - /* make sure playback is stopped */ - snd_azf3328_codec_outw(chip, IDX_IO_PLAY_FLAGS, - snd_azf3328_codec_inw(chip, IDX_IO_PLAY_FLAGS) & ~DMA_RESUME); - break; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: snd_printk(KERN_ERR "FIXME: SNDRV_PCM_TRIGGER_PAUSE_PUSH NIY!\n"); break; @@ -1026,7 +995,6 @@ snd_azf3328_playback_trigger(struct snd_pcm_substream *substream, int cmd) snd_printk(KERN_ERR "FIXME: SNDRV_PCM_TRIGGER_PAUSE_RELEASE NIY!\n"); break; default: - printk(KERN_ERR "FIXME: unknown trigger mode!\n"); return -EINVAL; } @@ -1100,13 +1068,6 @@ snd_azf3328_capture_trigger(struct snd_pcm_substream *substream, int cmd) chip->is_recording = 1; snd_azf3328_dbgplay("STARTED CAPTURE\n"); break; - case SNDRV_PCM_TRIGGER_RESUME: - snd_azf3328_dbgplay("RESUME CAPTURE\n"); - /* resume recording if we were active */ - if (chip->is_recording) - snd_azf3328_codec_outw(chip, IDX_IO_REC_FLAGS, - snd_azf3328_codec_inw(chip, IDX_IO_REC_FLAGS) | DMA_RESUME); - break; case SNDRV_PCM_TRIGGER_STOP: snd_azf3328_dbgplay("STOP CAPTURE\n"); @@ -1127,12 +1088,6 @@ snd_azf3328_capture_trigger(struct snd_pcm_substream *substream, int cmd) chip->is_recording = 0; snd_azf3328_dbgplay("STOPPED CAPTURE\n"); break; - case SNDRV_PCM_TRIGGER_SUSPEND: - snd_azf3328_dbgplay("SUSPEND CAPTURE\n"); - /* make sure recording is stopped */ - snd_azf3328_codec_outw(chip, IDX_IO_REC_FLAGS, - snd_azf3328_codec_inw(chip, IDX_IO_REC_FLAGS) & ~DMA_RESUME); - break; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: snd_printk(KERN_ERR "FIXME: SNDRV_PCM_TRIGGER_PAUSE_PUSH NIY!\n"); break; @@ -1140,7 +1095,6 @@ snd_azf3328_capture_trigger(struct snd_pcm_substream *substream, int cmd) snd_printk(KERN_ERR "FIXME: SNDRV_PCM_TRIGGER_PAUSE_RELEASE NIY!\n"); break; default: - printk(KERN_ERR "FIXME: unknown trigger mode!\n"); return -EINVAL; } @@ -1209,7 +1163,8 @@ snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) snd_azf3328_codec_inw(chip, IDX_IO_PLAY_IRQTYPE), status); - if (status & IRQ_TIMER) { + if (status & IRQ_TIMER) + { /* snd_azf3328_dbgplay("timer %ld\n", inl(chip->codec_port+IDX_IO_TIMER_VALUE) & TIMER_VALUE_MASK); */ if (chip->timer) snd_timer_interrupt(chip->timer, chip->timer->sticks); @@ -1219,43 +1174,50 @@ snd_azf3328_interrupt(int irq, void *dev_id, struct pt_regs *regs) spin_unlock(&chip->reg_lock); snd_azf3328_dbgplay("azt3328: timer IRQ\n"); } - if (status & IRQ_PLAYBACK) { + if (status & IRQ_PLAYBACK) + { spin_lock(&chip->reg_lock); which = snd_azf3328_codec_inb(chip, IDX_IO_PLAY_IRQTYPE); /* ack all IRQ types immediately */ snd_azf3328_codec_outb(chip, IDX_IO_PLAY_IRQTYPE, which); spin_unlock(&chip->reg_lock); - if (chip->pcm && chip->playback_substream) { + if (chip->pcm && chip->playback_substream) + { snd_pcm_period_elapsed(chip->playback_substream); snd_azf3328_dbgplay("PLAY period done (#%x), @ %x\n", which, inl(chip->codec_port+IDX_IO_PLAY_DMA_CURRPOS)); - } else + } + else snd_azf3328_dbgplay("azt3328: ouch, irq handler problem!\n"); if (which & IRQ_PLAY_SOMETHING) snd_azf3328_dbgplay("azt3328: unknown play IRQ type occurred, please report!\n"); } - if (status & IRQ_RECORDING) { + if (status & IRQ_RECORDING) + { spin_lock(&chip->reg_lock); which = snd_azf3328_codec_inb(chip, IDX_IO_REC_IRQTYPE); /* ack all IRQ types immediately */ snd_azf3328_codec_outb(chip, IDX_IO_REC_IRQTYPE, which); spin_unlock(&chip->reg_lock); - if (chip->pcm && chip->capture_substream) { + if (chip->pcm && chip->capture_substream) + { snd_pcm_period_elapsed(chip->capture_substream); snd_azf3328_dbgplay("REC period done (#%x), @ %x\n", which, inl(chip->codec_port+IDX_IO_REC_DMA_CURRPOS)); - } else + } + else snd_azf3328_dbgplay("azt3328: ouch, irq handler problem!\n"); if (which & IRQ_REC_SOMETHING) snd_azf3328_dbgplay("azt3328: unknown rec IRQ type occurred, please report!\n"); } /* MPU401 has less critical IRQ requirements * than timer and playback/recording, right? */ - if (status & IRQ_MPU401) { + if (status & IRQ_MPU401) + { snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs); /* hmm, do we have to ack the IRQ here somehow? @@ -1549,7 +1511,8 @@ snd_azf3328_timer_start(struct snd_timer *timer) snd_azf3328_dbgcallenter(); chip = snd_timer_chip(timer); delay = ((timer->sticks * seqtimer_scaling) - 1) & TIMER_VALUE_MASK; - if (delay < 49) { + if (delay < 49) + { /* uhoh, that's not good, since user-space won't know about * this timing tweak * (we need to do it to avoid a lockup, though) */ @@ -1724,7 +1687,7 @@ snd_azf3328_create(struct snd_card *card, chip->synth_port = pci_resource_start(pci, 3); chip->mixer_port = pci_resource_start(pci, 4); - if (request_irq(pci->irq, snd_azf3328_interrupt, IRQF_DISABLED|IRQF_SHARED, card->shortname, (void *)chip)) { + if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); err = -EBUSY; goto out_err; @@ -1803,11 +1766,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) goto out_err; } - card->private_data = chip; - if ((err = snd_mpu401_uart_new( card, 0, MPU401_HW_MPU401, - chip->mpu_port, MPU401_INFO_INTEGRATED, - pci->irq, 0, &chip->rmidi)) < 0) { + chip->mpu_port, 1, pci->irq, 0, + &chip->rmidi)) < 0) { snd_printk(KERN_ERR "azf3328: no MPU-401 device at 0x%lx?\n", chip->mpu_port); goto out_err; } @@ -1830,8 +1791,6 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) } } - opl3->private_data = chip; - sprintf(card->longname, "%s at 0x%lx, irq %i", card->shortname, chip->codec_port, chip->irq); @@ -1875,80 +1834,11 @@ snd_azf3328_remove(struct pci_dev *pci) snd_azf3328_dbgcallleave(); } -#ifdef CONFIG_PM -static int -snd_azf3328_suspend(struct pci_dev *pci, pm_message_t state) -{ - struct snd_card *card = pci_get_drvdata(pci); - struct snd_azf3328 *chip = card->private_data; - int reg; - - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - - snd_pcm_suspend_all(chip->pcm); - - for (reg = 0; reg < AZF_IO_SIZE_MIXER_PM / 2; reg++) - chip->saved_regs_mixer[reg] = inw(chip->mixer_port + reg * 2); - - /* make sure to disable master volume etc. to prevent looping sound */ - snd_azf3328_mixer_set_mute(chip, IDX_MIXER_PLAY_MASTER, 1); - snd_azf3328_mixer_set_mute(chip, IDX_MIXER_WAVEOUT, 1); - - for (reg = 0; reg < AZF_IO_SIZE_CODEC_PM / 2; reg++) - chip->saved_regs_codec[reg] = inw(chip->codec_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_IO2_PM / 2; reg++) - chip->saved_regs_io2[reg] = inw(chip->io2_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_MPU_PM / 2; reg++) - chip->saved_regs_mpu[reg] = inw(chip->mpu_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_SYNTH_PM / 2; reg++) - chip->saved_regs_synth[reg] = inw(chip->synth_port + reg * 2); - - pci_set_power_state(pci, PCI_D3hot); - pci_disable_device(pci); - pci_save_state(pci); - return 0; -} - -static int -snd_azf3328_resume(struct pci_dev *pci) -{ - struct snd_card *card = pci_get_drvdata(pci); - struct snd_azf3328 *chip = card->private_data; - int reg; - - pci_restore_state(pci); - pci_enable_device(pci); - pci_set_power_state(pci, PCI_D0); - pci_set_master(pci); - - for (reg = 0; reg < AZF_IO_SIZE_IO2_PM / 2; reg++) - outw(chip->saved_regs_io2[reg], chip->io2_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_MPU_PM / 2; reg++) - outw(chip->saved_regs_mpu[reg], chip->mpu_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_SYNTH_PM / 2; reg++) - outw(chip->saved_regs_synth[reg], chip->synth_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_MIXER_PM / 2; reg++) - outw(chip->saved_regs_mixer[reg], chip->mixer_port + reg * 2); - for (reg = 0; reg < AZF_IO_SIZE_CODEC_PM / 2; reg++) - outw(chip->saved_regs_codec[reg], chip->codec_port + reg * 2); - - snd_power_change_state(card, SNDRV_CTL_POWER_D0); - return 0; -} -#endif - - - - static struct pci_driver driver = { .name = "AZF3328", .id_table = snd_azf3328_ids, .probe = snd_azf3328_probe, .remove = __devexit_p(snd_azf3328_remove), -#ifdef CONFIG_PM - .suspend = snd_azf3328_suspend, - .resume = snd_azf3328_resume, -#endif }; static int __init diff --git a/sound/pci/azt3328.h b/sound/pci/azt3328.h index b4f3e3cd0..f489bdaf6 100644 --- a/sound/pci/azt3328.h +++ b/sound/pci/azt3328.h @@ -5,9 +5,6 @@ /*** main I/O area port indices ***/ /* (only 0x70 of 0x80 bytes saved/restored by Windows driver) */ -#define AZF_IO_SIZE_CODEC 0x80 -#define AZF_IO_SIZE_CODEC_PM 0x70 - /* the driver initialisation suggests a layout of 4 main areas: * from 0x00 (playback), from 0x20 (recording) and from 0x40 (maybe MPU401??). * And another area from 0x60 to 0x6f (DirectX timer, IRQ management, @@ -90,7 +87,7 @@ #define IDX_IO_REC_DMA_CURROFS 0x34 /* PU:0x00000000 */ #define IDX_IO_REC_SOUNDFORMAT 0x36 /* PU:0x0000 */ -/** hmm, what is this I/O area for? MPU401?? or external DAC via I2S?? (after playback, recording, ???, timer) **/ +/** hmm, what is this I/O area for? MPU401?? (after playback, recording, ???, timer) **/ #define IDX_IO_SOMETHING_FLAGS 0x40 /* gets set to 0x34 just like port 0x0 and 0x20 on card init, PU:0x0000 */ /* general */ #define IDX_IO_42H 0x42 /* PU:0x0001 */ @@ -110,8 +107,7 @@ #define IRQ_UNKNOWN2 0x0080 /* probably unused */ #define IDX_IO_66H 0x66 /* writing 0xffff returns 0x0000 */ #define IDX_IO_SOME_VALUE 0x68 /* this is set to e.g. 0x3ff or 0x300, and writable; maybe some buffer limit, but I couldn't find out more, PU:0x00ff */ -#define IDX_IO_6AH 0x6A /* this WORD can be set to have bits 0x0028 activated (FIXME: correct??); actually inhibits PCM playback!!! maybe power management?? */ - #define IO_6A_PAUSE_PLAYBACK 0x0200 /* bit 9; sure, this pauses playback, but what the heck is this really about?? */ +#define IDX_IO_6AH 0x6A /* this WORD can be set to have bits 0x0028 activated; actually inhibits PCM playback!!! maybe power management?? */ #define IDX_IO_6CH 0x6C #define IDX_IO_6EH 0x6E /* writing 0xffff returns 0x83fe */ /* further I/O indices not saved/restored, so probably not used */ @@ -119,25 +115,15 @@ /*** I/O 2 area port indices ***/ /* (only 0x06 of 0x08 bytes saved/restored by Windows driver) */ -#define AZF_IO_SIZE_IO2 0x08 -#define AZF_IO_SIZE_IO2_PM 0x06 - #define IDX_IO2_LEGACY_ADDR 0x04 #define LEGACY_SOMETHING 0x01 /* OPL3?? */ #define LEGACY_JOY 0x08 -#define AZF_IO_SIZE_MPU 0x04 -#define AZF_IO_SIZE_MPU_PM 0x04 - -#define AZF_IO_SIZE_SYNTH 0x08 -#define AZF_IO_SIZE_SYNTH_PM 0x06 /*** mixer I/O area port indices ***/ /* (only 0x22 of 0x40 bytes saved/restored by Windows driver) - * UNFORTUNATELY azf3328 is NOT truly AC97 compliant: see main file intro */ -#define AZF_IO_SIZE_MIXER 0x40 -#define AZF_IO_SIZE_MIXER_PM 0x22 - + * generally spoken: AC97 register index = AZF3328 mixer reg index + 2 + * (in other words: AZF3328 NOT fully AC97 compliant) */ #define MIXER_VOLUME_RIGHT_MASK 0x001f #define MIXER_VOLUME_LEFT_MASK 0x1f00 #define MIXER_MUTE_MASK 0x8000 @@ -170,14 +156,14 @@ #define IDX_MIXER_ADVCTL1 0x1e /* unlisted bits are unmodifiable */ #define MIXER_ADVCTL1_3DWIDTH_MASK 0x000e - #define MIXER_ADVCTL1_HIFI3D_MASK 0x0300 /* yup, this is missing the high bit that official AC97 contains, plus it doesn't have linear bit value range behaviour but instead acts weirdly (possibly we're dealing with two *different* 3D settings here??) */ -#define IDX_MIXER_ADVCTL2 0x20 /* subset of AC97_GENERAL_PURPOSE reg! */ + #define MIXER_ADVCTL1_HIFI3D_MASK 0x0300 +#define IDX_MIXER_ADVCTL2 0x20 /* resembles AC97_GENERAL_PURPOSE reg! */ /* unlisted bits are unmodifiable */ - #define MIXER_ADVCTL2_LPBK 0x0080 /* Loopback mode -- Win driver: "WaveOut3DBypass"? mutes WaveOut at LineOut */ - #define MIXER_ADVCTL2_MS 0x0100 /* Mic Select 0=Mic1, 1=Mic2 -- Win driver: "ModemOutSelect"?? */ - #define MIXER_ADVCTL2_MIX 0x0200 /* Mono output select 0=Mix, 1=Mic; Win driver: "MonoSelectSource"?? */ - #define MIXER_ADVCTL2_3D 0x2000 /* 3D Enhancement 1=on */ - #define MIXER_ADVCTL2_POP 0x8000 /* Pcm Out Path, 0=pre 3D, 1=post 3D */ + #define MIXER_ADVCTL2_BIT7 0x0080 /* WaveOut 3D Bypass? mutes WaveOut at LineOut */ + #define MIXER_ADVCTL2_BIT8 0x0100 /* is this Modem Out Select? */ + #define MIXER_ADVCTL2_BIT9 0x0200 /* Mono Select Source? */ + #define MIXER_ADVCTL2_BIT13 0x2000 /* 3D enable? */ + #define MIXER_ADVCTL2_BIT15 0x8000 /* unknown */ #define IDX_MIXER_SOMETHING30H 0x30 /* used, but unknown??? */ diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 97a280a24..9ee07d4aa 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c @@ -44,7 +44,7 @@ MODULE_SUPPORTED_DEVICE("{{Brooktree,Bt878}," static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int digital_rate[SNDRV_CARDS]; /* digital input rate */ +static int digital_rate[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* digital input rate */ static int load_all; /* allow to load the non-whitelisted cards */ module_param_array(index, int, NULL, 0444); @@ -747,7 +747,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, snd_bt87x_writel(chip, REG_INT_MASK, 0); snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS); - if (request_irq(pci->irq, snd_bt87x_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq(pci->irq, snd_bt87x_interrupt, SA_INTERRUPT | SA_SHIRQ, "Bt87x audio", chip)) { snd_bt87x_free(chip); snd_printk(KERN_ERR "cannot grab irq\n"); @@ -774,19 +774,17 @@ static int __devinit snd_bt87x_create(struct snd_card *card, .driver_data = rate } /* driver_data is the default digital_rate value for that device */ -static struct pci_device_id snd_bt87x_ids[] = { +static struct pci_device_id snd_bt87x_ids[] __devinitdata = { /* Hauppauge WinTV series */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0x13eb, 32000), /* Hauppauge WinTV series */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000), /* Viewcast Osprey 200 */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100), - /* Leadtek Winfast tv 2000xp delux */ - BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x107d, 0x6606, 32000), - /* Voodoo TV 200 */ - BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x121a, 0x3000, 32000), /* AVerMedia Studio No. 103, 203, ...? */ BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000), + /* Leadtek Winfast tv 2000xp delux */ + BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x107d, 0x6606, 32000), { } }; MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); @@ -888,9 +886,8 @@ static int __devinit snd_bt87x_probe(struct pci_dev *pci, strcpy(card->driver, "Bt87x"); sprintf(card->shortname, "Brooktree Bt%x", pci->device); - sprintf(card->longname, "%s at %#llx, irq %i", - card->shortname, (unsigned long long)pci_resource_start(pci, 0), - chip->irq); + sprintf(card->longname, "%s at %#lx, irq %i", + card->shortname, pci_resource_start(pci, 0), chip->irq); strcpy(card->mixername, "Bt87x"); err = snd_card_register(card); diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h index 9cb66c59f..c8131ea92 100644 --- a/sound/pci/ca0106/ca0106.h +++ b/sound/pci/ca0106/ca0106.h @@ -537,9 +537,9 @@ #endif #define ADC_MUX_MASK 0x0000000f //Mask for ADC Mux -#define ADC_MUX_PHONE 0x00000001 //Value to select TAD at ADC Mux (Not used) #define ADC_MUX_MIC 0x00000002 //Value to select Mic at ADC Mux #define ADC_MUX_LINEIN 0x00000004 //Value to select LineIn at ADC Mux +#define ADC_MUX_PHONE 0x00000001 //Value to select TAD at ADC Mux (Not used) #define ADC_MUX_AUX 0x00000008 //Value to select Aux at ADC Mux #define SET_CHANNEL 0 /* Testing channel outputs 0=Front, 1=Center/LFE, 2=Unknown, 3=Rear */ @@ -604,8 +604,6 @@ struct snd_ca0106 { u32 spdif_bits[4]; /* s/pdif out setup */ int spdif_enable; int capture_source; - int i2c_capture_source; - u8 i2c_capture_volume[4][2]; int capture_mic_line_in; struct snd_dma_buffer buffer; diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 12bbbb6af..fd8bfebfb 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -186,8 +186,8 @@ static struct snd_ca0106_details ca0106_chip_details[] = { /* New Audigy SE. Has a different DAC. */ /* SB0570: * CTRL:CA0106-DAT - * ADC: WM8775EDS - * DAC: WM8768GEDS + * ADC: WM8768GEDS + * DAC: WM8775EDS */ { .serial = 0x100a1102, .name = "Audigy SE [SB0570]", @@ -195,14 +195,9 @@ static struct snd_ca0106_details ca0106_chip_details[] = { .i2c_adc = 1, .spi_dac = 1 } , /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 */ - /* SB0438 - * CTRL:CA0106-DAT - * ADC: WM8775SEDS - * DAC: CS4382-KQZ - */ { .serial = 0x10091462, .name = "MSI K8N Diamond MB [SB0438]", - .gpio_type = 2, + .gpio_type = 1, .i2c_adc = 1 } , /* Shuttle XPC SD31P which has an onboard Creative Labs * Sound Blaster Live! 24-bit EAX @@ -331,7 +326,6 @@ int snd_ca0106_spi_write(struct snd_ca0106 * emu, return 0; } -/* The ADC does not support i2c read, so only write is implemented */ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, u32 reg, u32 value) @@ -346,7 +340,6 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, } tmp = reg << 25 | value << 16; - // snd_printk("I2C-write:reg=0x%x, value=0x%x\n", reg, value); /* Not sure what this I2C channel controls. */ /* snd_ca0106_ptr_write(emu, I2C_D0, 0, tmp); */ @@ -355,9 +348,8 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, for (retry = 0; retry < 10; retry++) { /* Send the data to i2c */ - //tmp = snd_ca0106_ptr_read(emu, I2C_A, 0); - //tmp = tmp & ~(I2C_A_ADC_READ|I2C_A_ADC_LAST|I2C_A_ADC_START|I2C_A_ADC_ADD_MASK); - tmp = 0; + tmp = snd_ca0106_ptr_read(emu, I2C_A, 0); + tmp = tmp & ~(I2C_A_ADC_READ|I2C_A_ADC_LAST|I2C_A_ADC_START|I2C_A_ADC_ADD_MASK); tmp = tmp | (I2C_A_ADC_LAST|I2C_A_ADC_START|I2C_A_ADC_ADD); snd_ca0106_ptr_write(emu, I2C_A, 0, tmp); @@ -1189,7 +1181,7 @@ static unsigned int spi_dac_init[] = { 0x02ff, 0x0400, 0x0520, - 0x0620, /* Set 24 bit. Was 0x0600 */ + 0x0600, 0x08ff, 0x0aff, 0x0cff, @@ -1208,22 +1200,6 @@ static unsigned int spi_dac_init[] = { 0x1400, }; -static unsigned int i2c_adc_init[][2] = { - { 0x17, 0x00 }, /* Reset */ - { 0x07, 0x00 }, /* Timeout */ - { 0x0b, 0x22 }, /* Interface control */ - { 0x0c, 0x22 }, /* Master mode control */ - { 0x0d, 0x08 }, /* Powerdown control */ - { 0x0e, 0xcf }, /* Attenuation Left 0x01 = -103dB, 0xff = 24dB */ - { 0x0f, 0xcf }, /* Attenuation Right 0.5dB steps */ - { 0x10, 0x7b }, /* ALC Control 1 */ - { 0x11, 0x00 }, /* ALC Control 2 */ - { 0x12, 0x32 }, /* ALC Control 3 */ - { 0x13, 0x00 }, /* Noise gate control */ - { 0x14, 0xa6 }, /* Limiter control */ - { 0x15, ADC_MUX_LINEIN }, /* ADC Mixer control */ -}; - static int __devinit snd_ca0106_create(struct snd_card *card, struct pci_dev *pci, struct snd_ca0106 **rchip) @@ -1268,7 +1244,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card, } if (request_irq(pci->irq, snd_ca0106_interrupt, - IRQF_DISABLED|IRQF_SHARED, "snd_ca0106", + SA_INTERRUPT|SA_SHIRQ, "snd_ca0106", (void *)chip)) { snd_ca0106_free(chip); printk(KERN_ERR "cannot grab irq\n"); @@ -1385,12 +1361,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card, snd_ca0106_ptr_write(chip, CAPTURE_SOURCE, 0x0, 0x333300e4); /* Select MIC, Line in, TAD in, AUX in */ chip->capture_source = 3; /* Set CAPTURE_SOURCE */ - if (chip->details->gpio_type == 2) { /* The SB0438 use GPIO differently. */ - /* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */ - outl(0x0, chip->port+GPIO); - //outl(0x00f0e000, chip->port+GPIO); /* Analog */ - outl(0x005f5301, chip->port+GPIO); /* Analog */ - } else if (chip->details->gpio_type == 1) { /* The SB0410 and SB0413 use GPIO differently. */ + if (chip->details->gpio_type == 1) { /* The SB0410 and SB0413 use GPIO differently. */ /* FIXME: Still need to find out what the other GPIO bits do. E.g. For digital spdif out. */ outl(0x0, chip->port+GPIO); //outl(0x00f0e000, chip->port+GPIO); /* Analog */ @@ -1408,19 +1379,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card, outl(HCFG_AC97 | HCFG_AUDIOENABLE, chip->port+HCFG); /* AC97 2.0, Enable outputs. */ if (chip->details->i2c_adc == 1) { /* The SB0410 and SB0413 use I2C to control ADC. */ - int size, n; - - size = ARRAY_SIZE(i2c_adc_init); - //snd_printk("I2C:array size=0x%x\n", size); - for (n=0; n < size; n++) { - snd_ca0106_i2c_write(chip, i2c_adc_init[n][0], i2c_adc_init[n][1]); - } - for (n=0; n < 4; n++) { - chip->i2c_capture_volume[n][0]= 0xcf; - chip->i2c_capture_volume[n][1]= 0xcf; - } - chip->i2c_capture_source=2; /* Line in */ - //snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */ + snd_ca0106_i2c_write(chip, ADC_MUX, ADC_MUX_LINEIN); /* Enable Line-in capture. MIC in currently untested. */ } if (chip->details->spi_dac == 1) { /* The SB0570 use SPI to control DAC. */ int size, n; @@ -1602,7 +1561,7 @@ static void __devexit snd_ca0106_remove(struct pci_dev *pci) } // PCI IDs -static struct pci_device_id snd_ca0106_ids[] = { +static struct pci_device_id snd_ca0106_ids[] __devinitdata = { { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS or Live 24bit */ { 0, } }; diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 146eed70d..06fe05567 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c @@ -171,76 +171,6 @@ static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol, return change; } -static int snd_ca0106_i2c_capture_source_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *texts[6] = { - "Phone", "Mic", "Line in", "Aux" - }; - - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 4; - if (uinfo->value.enumerated.item > 3) - uinfo->value.enumerated.item = 3; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; -} - -static int snd_ca0106_i2c_capture_source_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); - - ucontrol->value.enumerated.item[0] = emu->i2c_capture_source; - return 0; -} - -static int snd_ca0106_i2c_capture_source_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); - unsigned int source_id; - unsigned int ngain, ogain; - int change = 0; - u32 source; - /* If the capture source has changed, - * update the capture volume from the cached value - * for the particular source. - */ - source_id = ucontrol->value.enumerated.item[0] ; - change = (emu->i2c_capture_source != source_id); - if (change) { - snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ - ngain = emu->i2c_capture_volume[source_id][0]; /* Left */ - ogain = emu->i2c_capture_volume[emu->i2c_capture_source][0]; /* Left */ - if (ngain != ogain) - snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff)); - ngain = emu->i2c_capture_volume[source_id][1]; /* Left */ - ogain = emu->i2c_capture_volume[emu->i2c_capture_source][1]; /* Left */ - if (ngain != ogain) - snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); - source = 1 << source_id; - snd_ca0106_i2c_write(emu, ADC_MUX, source); /* Set source */ - emu->i2c_capture_source = source_id; - } - return change; -} - -static int snd_ca0106_capture_line_in_side_out_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *texts[2] = { "Side out", "Line in" }; - - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 2; - if (uinfo->value.enumerated.item > 1) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; -} - static int snd_ca0106_capture_mic_line_in_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { @@ -277,16 +207,16 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol, if (change) { emu->capture_mic_line_in = val; if (val) { - //snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ + snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_PHONE); /* Mute input */ tmp = inl(emu->port+GPIO) & ~0x400; tmp = tmp | 0x400; outl(tmp, emu->port+GPIO); - //snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_MIC); + snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_MIC); } else { - //snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ + snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_PHONE); /* Mute input */ tmp = inl(emu->port+GPIO) & ~0x400; outl(tmp, emu->port+GPIO); - //snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_LINEIN); + snd_ca0106_i2c_write(emu, ADC_MUX, ADC_MUX_LINEIN); } } return change; @@ -295,22 +225,12 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol, static struct snd_kcontrol_new snd_ca0106_capture_mic_line_in __devinitdata = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Shared Mic/Line in Capture Switch", + .name = "Mic/Line in Capture", .info = snd_ca0106_capture_mic_line_in_info, .get = snd_ca0106_capture_mic_line_in_get, .put = snd_ca0106_capture_mic_line_in_put }; -static struct snd_kcontrol_new snd_ca0106_capture_line_in_side_out __devinitdata = -{ - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Shared Line in/Side out Capture Switch", - .info = snd_ca0106_capture_line_in_side_out_info, - .get = snd_ca0106_capture_mic_line_in_get, - .put = snd_ca0106_capture_mic_line_in_put -}; - - static int snd_ca0106_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { @@ -409,81 +329,15 @@ static int snd_ca0106_volume_put(struct snd_kcontrol *kcontrol, return 1; } -static int snd_ca0106_i2c_volume_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 2; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 255; - return 0; -} - -static int snd_ca0106_i2c_volume_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); - int source_id; - - source_id = kcontrol->private_value; - - ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0]; - ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1]; - return 0; -} - -static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); - unsigned int ogain; - unsigned int ngain; - int source_id; - int change = 0; - - source_id = kcontrol->private_value; - ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ - ngain = ucontrol->value.integer.value[0]; - if (ngain > 0xff) - return 0; - if (ogain != ngain) { - if (emu->i2c_capture_source == source_id) - snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); - emu->i2c_capture_volume[source_id][0] = ucontrol->value.integer.value[0]; - change = 1; - } - ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ - ngain = ucontrol->value.integer.value[1]; - if (ngain > 0xff) - return 0; - if (ogain != ngain) { - if (emu->i2c_capture_source == source_id) - snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); - emu->i2c_capture_volume[source_id][1] = ucontrol->value.integer.value[1]; - change = 1; - } - - return change; -} - #define CA_VOLUME(xname,chid,reg) \ { \ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ - .info = snd_ca0106_volume_info, \ - .get = snd_ca0106_volume_get, \ - .put = snd_ca0106_volume_put, \ + .info = snd_ca0106_volume_info, \ + .get = snd_ca0106_volume_get, \ + .put = snd_ca0106_volume_put, \ .private_value = ((chid) << 8) | (reg) \ } -#define I2C_VOLUME(xname,chid) \ -{ \ - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ - .info = snd_ca0106_i2c_volume_info, \ - .get = snd_ca0106_i2c_volume_get, \ - .put = snd_ca0106_i2c_volume_put, \ - .private_value = chid \ -} - static struct snd_kcontrol_new snd_ca0106_volume_ctls[] __devinitdata = { CA_VOLUME("Analog Front Playback Volume", @@ -507,11 +361,6 @@ static struct snd_kcontrol_new snd_ca0106_volume_ctls[] __devinitdata = { CA_VOLUME("CAPTURE feedback Playback Volume", 1, CAPTURE_CONTROL), - I2C_VOLUME("Phone Capture Volume", 0), - I2C_VOLUME("Mic Capture Volume", 1), - I2C_VOLUME("Line in Capture Volume", 2), - I2C_VOLUME("Aux Capture Volume", 3), - { .access = SNDRV_CTL_ELEM_ACCESS_READ, .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -529,18 +378,11 @@ static struct snd_kcontrol_new snd_ca0106_volume_ctls[] __devinitdata = { }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Digital Capture Source", + .name = "Capture Source", .info = snd_ca0106_capture_source_info, .get = snd_ca0106_capture_source_get, .put = snd_ca0106_capture_source_put }, - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Capture Source", - .info = snd_ca0106_i2c_capture_source_info, - .get = snd_ca0106_i2c_capture_source_get, - .put = snd_ca0106_i2c_capture_source_put - }, { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), @@ -635,10 +477,7 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) return err; } if (emu->details->i2c_adc == 1) { - if (emu->details->gpio_type == 1) - err = snd_ctl_add(card, snd_ctl_new1(&snd_ca0106_capture_mic_line_in, emu)); - else /* gpio_type == 2 */ - err = snd_ctl_add(card, snd_ctl_new1(&snd_ca0106_capture_line_in_side_out, emu)); + err = snd_ctl_add(card, snd_ctl_new1(&snd_ca0106_capture_mic_line_in, emu)); if (err < 0) return err; } diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index 75ca421eb..63757273b 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c @@ -431,30 +431,33 @@ int __devinit snd_ca0106_proc_init(struct snd_ca0106 * emu) struct snd_info_entry *entry; if(! snd_card_proc_new(emu->card, "iec958", &entry)) - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_iec958); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_iec958); if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) { - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read32); + entry->c.text.write_size = 64; entry->c.text.write = snd_ca0106_proc_reg_write32; entry->mode |= S_IWUSR; } if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry)) - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read16); if(! snd_card_proc_new(emu->card, "ca0106_reg8", &entry)) - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read8); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read8); if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) { - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read1); + entry->c.text.write_size = 64; entry->c.text.write = snd_ca0106_proc_reg_write; entry->mode |= S_IWUSR; // entry->private_data = emu; } if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_i2c_write); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_i2c_write); + entry->c.text.write_size = 64; entry->c.text.write = snd_ca0106_proc_i2c_write; entry->mode |= S_IWUSR; // entry->private_data = emu; } if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); + snd_info_set_text_ops(entry, emu, 1024, snd_ca0106_proc_reg_read2); return 0; } diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 876b64464..e5ce2dabd 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -2121,7 +2121,7 @@ static struct snd_kcontrol_new snd_cmipci_mixers[] __devinitdata = { CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), - CMIPCI_DOUBLE("PC Speaker Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), + CMIPCI_DOUBLE("PC Speaker Playnack Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), }; @@ -2602,14 +2602,14 @@ static void __devinit snd_cmipci_proc_init(struct cmipci *cm) struct snd_info_entry *entry; if (! snd_card_proc_new(cm->card, "cmipci", &entry)) - snd_info_set_text_ops(entry, cm, snd_cmipci_proc_read); + snd_info_set_text_ops(entry, cm, 1024, snd_cmipci_proc_read); } #else /* !CONFIG_PROC_FS */ static inline void snd_cmipci_proc_init(struct cmipci *cm) {} #endif -static struct pci_device_id snd_cmipci_ids[] = { +static struct pci_device_id snd_cmipci_ids[] __devinitdata = { {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8738, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, @@ -2862,7 +2862,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc cm->iobase = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_cmipci_interrupt, - IRQF_DISABLED|IRQF_SHARED, card->driver, cm)) { + SA_INTERRUPT|SA_SHIRQ, card->driver, cm)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_cmipci_free(cm); return -EBUSY; @@ -2932,7 +2932,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc } integrated_midi = snd_cmipci_read_b(cm, CM_REG_MPU_PCI) != 0xff; - if (integrated_midi && mpu_port[dev] == 1) + if (integrated_midi) iomidi = cm->iobase + CM_REG_MPU_PCI; else { iomidi = mpu_port[dev]; @@ -2981,9 +2981,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc if (iomidi > 0) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI, - iomidi, - (integrated_midi ? - MPU401_INFO_INTEGRATED : 0), + iomidi, integrated_midi, cm->irq, 0, &cm->rmidi)) < 0) { printk(KERN_ERR "cmipci: no UART401 device at 0x%lx\n", iomidi); } diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 9631456ec..b3c94d834 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -494,7 +494,7 @@ struct cs4281 { static irqreturn_t snd_cs4281_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static struct pci_device_id snd_cs4281_ids[] = { +static struct pci_device_id snd_cs4281_ids[] __devinitdata = { { 0x1013, 0x6005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4281 */ { 0, } }; @@ -1184,7 +1184,7 @@ static void __devinit snd_cs4281_proc_init(struct cs4281 * chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "cs4281", &entry)) - snd_info_set_text_ops(entry, chip, snd_cs4281_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_cs4281_proc_read); if (! snd_card_proc_new(chip->card, "cs4281_BA0", &entry)) { entry->content = SNDRV_INFO_CONTENT_DATA; entry->private_data = chip; @@ -1379,14 +1379,7 @@ static int __devinit snd_cs4281_create(struct snd_card *card, chip->ba0_addr = pci_resource_start(pci, 0); chip->ba1_addr = pci_resource_start(pci, 1); - chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); - chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); - if (!chip->ba0 || !chip->ba1) { - snd_cs4281_free(chip); - return -ENOMEM; - } - - if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS4281", chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_cs4281_free(chip); @@ -1394,6 +1387,13 @@ static int __devinit snd_cs4281_create(struct snd_card *card, } chip->irq = pci->irq; + chip->ba0 = ioremap_nocache(chip->ba0_addr, pci_resource_len(pci, 0)); + chip->ba1 = ioremap_nocache(chip->ba1_addr, pci_resource_len(pci, 1)); + if (!chip->ba0 || !chip->ba1) { + snd_cs4281_free(chip); + return -ENOMEM; + } + tmp = snd_cs4281_chip_init(chip); if (tmp) { snd_cs4281_free(chip); diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index 8b6cd144d..848d772ae 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c @@ -48,8 +48,8 @@ MODULE_SUPPORTED_DEVICE("{{Cirrus Logic,Sound Fusion (CS4280)}," static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int external_amp[SNDRV_CARDS]; -static int thinkpad[SNDRV_CARDS]; +static int external_amp[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; +static int thinkpad[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int mmap_valid[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; module_param_array(index, int, NULL, 0444); @@ -65,7 +65,7 @@ MODULE_PARM_DESC(thinkpad, "Force to enable Thinkpad's CLKRUN control."); module_param_array(mmap_valid, bool, NULL, 0444); MODULE_PARM_DESC(mmap_valid, "Support OSS mmap."); -static struct pci_device_id snd_cs46xx_ids[] = { +static struct pci_device_id snd_cs46xx_ids[] __devinitdata = { { 0x1013, 0x6001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4280 */ { 0x1013, 0x6003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4612 */ { 0x1013, 0x6004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* CS4615 */ diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 485184718..69dbf542a 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -2317,7 +2317,7 @@ static struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { #ifdef CONFIG_SND_CS46XX_NEW_DSP /* Only available on the Hercules Game Theater XP soundcard */ -static struct snd_kcontrol_new snd_hercules_controls[] = { +static struct snd_kcontrol_new snd_hercules_controls[] __devinitdata = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Optical/Coaxial SPDIF Input Switch", @@ -2877,15 +2877,14 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip) if (chip->region.idx[0].resource) snd_cs46xx_hw_stop(chip); - if (chip->irq >= 0) - free_irq(chip->irq, chip); - for (idx = 0; idx < 5; idx++) { struct snd_cs46xx_region *region = &chip->region.idx[idx]; if (region->remap_addr) iounmap(region->remap_addr); release_and_free_resource(region->resource); } + if (chip->irq >= 0) + free_irq(chip->irq, chip); if (chip->active_ctrl) chip->active_ctrl(chip, -chip->amplifier); @@ -3458,9 +3457,6 @@ static void hercules_mixer_init (struct snd_cs46xx *chip) snd_printdd ("initializing Hercules mixer\n"); #ifdef CONFIG_SND_CS46XX_NEW_DSP - if (chip->in_suspend) - return; - for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { struct snd_kcontrol *kctl; @@ -3672,7 +3668,6 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) int amp_saved; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - chip->in_suspend = 1; snd_pcm_suspend_all(chip->pcm); // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); @@ -3726,7 +3721,6 @@ int snd_cs46xx_resume(struct pci_dev *pci) else chip->active_ctrl(chip, -1); /* disable CLKRUN */ chip->amplifier = amp_saved; - chip->in_suspend = 0; snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } @@ -3858,7 +3852,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card, } } - if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, "CS46XX", chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_cs46xx_free(chip); diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 5c9711c02..f407d2a5c 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c @@ -767,6 +767,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) if ((entry = snd_info_create_card_entry(card, "dsp", card->proc_root)) != NULL) { entry->content = SNDRV_INFO_CONTENT_TEXT; entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; + entry->c.text.read_size = 512; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -783,6 +784,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_symbol_table_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -795,6 +797,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_modules_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -807,6 +810,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_parameter_dump_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -819,6 +823,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_sample_dump_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -831,6 +836,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_task_tree_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -843,6 +849,7 @@ int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = chip; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 1024; entry->c.text.read = cs46xx_dsp_proc_scb_read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index 232b33785..2c4ee45fe 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -180,7 +180,6 @@ static void _dsp_clear_sample_buffer (struct snd_cs46xx *chip, u32 sample_buffer void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb) { struct dsp_spos_instance * ins = chip->dsp_spos_instance; - unsigned long flags; /* check integrety */ snd_assert ( (scb->index >= 0 && @@ -195,9 +194,9 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * goto _end); #endif - spin_lock_irqsave(&scb->lock, flags); + spin_lock(&scb->lock); _dsp_unlink_scb (chip,scb); - spin_unlock_irqrestore(&scb->lock, flags); + spin_unlock(&scb->lock); cs46xx_dsp_proc_free_scb_desc(scb); snd_assert (scb->scb_symbol != NULL, return ); @@ -268,6 +267,7 @@ void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, entry->private_data = scb_info; entry->mode = S_IFREG | S_IRUGO | S_IWUSR; + entry->c.text.read_size = 512; entry->c.text.read = cs46xx_dsp_proc_scb_info_read; if (snd_info_register(entry) < 0) { diff --git a/sound/pci/cs5535audio/Makefile b/sound/pci/cs5535audio/Makefile index 2911a8adc..08d8ee654 100644 --- a/sound/pci/cs5535audio/Makefile +++ b/sound/pci/cs5535audio/Makefile @@ -4,9 +4,5 @@ snd-cs5535audio-objs := cs5535audio.o cs5535audio_pcm.o -ifdef CONFIG_PM -snd-cs5535audio-objs += cs5535audio_pm.o -endif - # Toplevel Module Dependency obj-$(CONFIG_SND_CS5535AUDIO) += snd-cs5535audio.o diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 64c7826e8..2c1213a35 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c @@ -1,5 +1,5 @@ /* - * Driver for audio on multifunction CS5535/6 companion device + * Driver for audio on multifunction CS5535 companion device * Copyright (C) Jaya Kumar * * Based on Jaroslav Kysela and Takashi Iwai's examples. @@ -40,36 +40,16 @@ #define DRIVER_NAME "cs5535audio" -static char *ac97_quirk; -module_param(ac97_quirk, charp, 0444); -MODULE_PARM_DESC(ac97_quirk, "AC'97 board specific workarounds."); - -static struct ac97_quirk ac97_quirks[] __devinitdata = { -#if 0 /* Not yet confirmed if all 5536 boards are HP only */ - { - .subvendor = PCI_VENDOR_ID_AMD, - .subdevice = PCI_DEVICE_ID_AMD_CS5536_AUDIO, - .name = "AMD RDK", - .type = AC97_TUNE_HP_ONLY - }, -#endif - {} -}; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; -module_param_array(index, int, NULL, 0444); -MODULE_PARM_DESC(index, "Index value for " DRIVER_NAME); -module_param_array(id, charp, NULL, 0444); -MODULE_PARM_DESC(id, "ID string for " DRIVER_NAME); -module_param_array(enable, bool, NULL, 0444); -MODULE_PARM_DESC(enable, "Enable " DRIVER_NAME); - -static struct pci_device_id snd_cs5535audio_ids[] = { - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO) }, +static struct pci_device_id snd_cs5535audio_ids[] __devinitdata = { + { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_CS5535_AUDIO, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, + { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_AUDIO, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, {} }; @@ -110,8 +90,7 @@ static unsigned short snd_cs5535audio_codec_read(struct cs5535audio *cs5535au, udelay(1); } while (--timeout); if (!timeout) - snd_printk(KERN_ERR "Failure reading codec reg 0x%x," - "Last value=0x%x\n", reg, val); + snd_printk(KERN_ERR "Failure reading cs5535 codec\n"); return (unsigned short) val; } @@ -169,8 +148,6 @@ static int snd_cs5535audio_mixer(struct cs5535audio *cs5535au) return err; } - snd_ac97_tune_hardware(cs5535au->ac97, ac97_quirks, ac97_quirk); - return 0; } @@ -321,7 +298,7 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card, cs5535au->port = pci_resource_start(pci, 0); if (request_irq(pci->irq, snd_cs5535audio_interrupt, - IRQF_DISABLED|IRQF_SHARED, "CS5535 Audio", cs5535au)) { + SA_INTERRUPT|SA_SHIRQ, "CS5535 Audio", cs5535au)) { snd_printk("unable to grab IRQ %d\n", pci->irq); err = -EBUSY; goto sndfail; @@ -370,8 +347,6 @@ static int __devinit snd_cs5535audio_probe(struct pci_dev *pci, if ((err = snd_cs5535audio_create(card, pci, &cs5535au)) < 0) goto probefail_out; - card->private_data = cs5535au; - if ((err = snd_cs5535audio_mixer(cs5535au)) < 0) goto probefail_out; @@ -408,10 +383,6 @@ static struct pci_driver driver = { .id_table = snd_cs5535audio_ids, .probe = snd_cs5535audio_probe, .remove = __devexit_p(snd_cs5535audio_remove), -#ifdef CONFIG_PM - .suspend = snd_cs5535audio_suspend, - .resume = snd_cs5535audio_resume, -#endif }; static int __init alsa_card_cs5535audio_init(void) diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h index 4fd1f31a6..5e55a1a1e 100644 --- a/sound/pci/cs5535audio/cs5535audio.h +++ b/sound/pci/cs5535audio/cs5535audio.h @@ -74,8 +74,6 @@ #define PRM_RDY_STS 0x00800000 #define ACC_CODEC_CNTL_WR_CMD (~0x80000000) #define ACC_CODEC_CNTL_RD_CMD 0x80000000 -#define ACC_CODEC_CNTL_LNK_SHUTDOWN 0x00040000 -#define ACC_CODEC_CNTL_LNK_WRM_RST 0x00020000 #define PRD_JMP 0x2000 #define PRD_EOP 0x4000 #define PRD_EOT 0x8000 @@ -90,7 +88,6 @@ struct cs5535audio_dma_ops { void (*disable_dma)(struct cs5535audio *cs5535au); void (*pause_dma)(struct cs5535audio *cs5535au); void (*setup_prd)(struct cs5535audio *cs5535au, u32 prd_addr); - u32 (*read_prd)(struct cs5535audio *cs5535au); u32 (*read_dma_pntr)(struct cs5535audio *cs5535au); }; @@ -106,14 +103,11 @@ struct cs5535audio_dma { struct snd_pcm_substream *substream; unsigned int buf_addr, buf_bytes; unsigned int period_bytes, periods; - int suspended; - u32 saved_prd; }; struct cs5535audio { struct snd_card *card; struct snd_ac97 *ac97; - struct snd_pcm *pcm; int irq; struct pci_dev *pci; unsigned long port; @@ -123,8 +117,6 @@ struct cs5535audio { struct cs5535audio_dma dmas[NUM_CS5535AUDIO_DMAS]; }; -int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state); -int snd_cs5535audio_resume(struct pci_dev *pci); int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535audio); #endif /* __SOUND_CS5535AUDIO_H */ diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c index 5450a9e8f..60bb82b2f 100644 --- a/sound/pci/cs5535audio/cs5535audio_pcm.c +++ b/sound/pci/cs5535audio/cs5535audio_pcm.c @@ -43,8 +43,7 @@ static struct snd_pcm_hardware snd_cs5535audio_playback = SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START | - SNDRV_PCM_INFO_RESUME + SNDRV_PCM_INFO_SYNC_START ), .formats = ( SNDRV_PCM_FMTBIT_S16_LE @@ -143,7 +142,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au, if (dma->periods == periods && dma->period_bytes == period_bytes) return 0; - /* the u32 cast is okay because in snd*create we successfully told + /* the u32 cast is okay because in snd*create we succesfully told pci alloc that we're only 32 bit capable so the uppper will be 0 */ addr = (u32) substream->runtime->dma_addr; desc_addr = (u32) dma->desc_buf.addr; @@ -194,11 +193,6 @@ static void cs5535audio_playback_setup_prd(struct cs5535audio *cs5535au, cs_writel(cs5535au, ACC_BM0_PRD, prd_addr); } -static u32 cs5535audio_playback_read_prd(struct cs5535audio *cs5535au) -{ - return cs_readl(cs5535au, ACC_BM0_PRD); -} - static u32 cs5535audio_playback_read_dma_pntr(struct cs5535audio *cs5535au) { return cs_readl(cs5535au, ACC_BM0_PNTR); @@ -225,11 +219,6 @@ static void cs5535audio_capture_setup_prd(struct cs5535audio *cs5535au, cs_writel(cs5535au, ACC_BM1_PRD, prd_addr); } -static u32 cs5535audio_capture_read_prd(struct cs5535audio *cs5535au) -{ - return cs_readl(cs5535au, ACC_BM1_PRD); -} - static u32 cs5535audio_capture_read_dma_pntr(struct cs5535audio *cs5535au) { return cs_readl(cs5535au, ACC_BM1_PNTR); @@ -296,17 +285,9 @@ static int snd_cs5535audio_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: dma->ops->enable_dma(cs5535au); break; - case SNDRV_PCM_TRIGGER_RESUME: - dma->ops->enable_dma(cs5535au); - dma->suspended = 0; - break; case SNDRV_PCM_TRIGGER_STOP: dma->ops->disable_dma(cs5535au); break; - case SNDRV_PCM_TRIGGER_SUSPEND: - dma->ops->disable_dma(cs5535au); - dma->suspended = 1; - break; default: snd_printk(KERN_ERR "unhandled trigger\n"); err = -EINVAL; @@ -394,7 +375,6 @@ static struct cs5535audio_dma_ops snd_cs5535audio_playback_dma_ops = { .enable_dma = cs5535audio_playback_enable_dma, .disable_dma = cs5535audio_playback_disable_dma, .setup_prd = cs5535audio_playback_setup_prd, - .read_prd = cs5535audio_playback_read_prd, .pause_dma = cs5535audio_playback_pause_dma, .read_dma_pntr = cs5535audio_playback_read_dma_pntr, }; @@ -404,7 +384,6 @@ static struct cs5535audio_dma_ops snd_cs5535audio_capture_dma_ops = { .enable_dma = cs5535audio_capture_enable_dma, .disable_dma = cs5535audio_capture_disable_dma, .setup_prd = cs5535audio_capture_setup_prd, - .read_prd = cs5535audio_capture_read_prd, .pause_dma = cs5535audio_capture_pause_dma, .read_dma_pntr = cs5535audio_capture_read_dma_pntr, }; @@ -434,7 +413,6 @@ int __devinit snd_cs5535audio_pcm(struct cs5535audio *cs5535au) snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(cs5535au->pci), 64*1024, 128*1024); - cs5535au->pcm = pcm; return 0; } diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c deleted file mode 100644 index aad0e69db..000000000 --- a/sound/pci/cs5535audio/cs5535audio_pm.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Power management for audio on multifunction CS5535 companion device - * Copyright (C) Jaya Kumar - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cs5535audio.h" - -static void snd_cs5535audio_stop_hardware(struct cs5535audio *cs5535au) -{ - /* - we depend on snd_ac97_suspend to tell the - AC97 codec to shutdown. the amd spec suggests - that the LNK_SHUTDOWN be done at the same time - that the codec power-down is issued. instead, - we do it just after rather than at the same - time. excluding codec specific build_ops->suspend - ac97 powerdown hits: - 0x8000 EAPD - 0x4000 Headphone amplifier - 0x0300 ADC & DAC - 0x0400 Analog Mixer powerdown (Vref on) - I am not sure if this is the best that we can do. - The remainder to be investigated are: - - analog mixer (vref off) 0x0800 - - AC-link powerdown 0x1000 - - codec internal clock 0x2000 - */ - - /* set LNK_SHUTDOWN to shutdown AC link */ - cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_SHUTDOWN); - -} - -int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state) -{ - struct snd_card *card = pci_get_drvdata(pci); - struct cs5535audio *cs5535au = card->private_data; - int i; - - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) { - struct cs5535audio_dma *dma = &cs5535au->dmas[i]; - if (dma && dma->substream && !dma->suspended) - dma->saved_prd = dma->ops->read_prd(cs5535au); - } - snd_pcm_suspend_all(cs5535au->pcm); - snd_ac97_suspend(cs5535au->ac97); - /* save important regs, then disable aclink in hw */ - snd_cs5535audio_stop_hardware(cs5535au); - pci_disable_device(pci); - pci_save_state(pci); - - return 0; -} - -int snd_cs5535audio_resume(struct pci_dev *pci) -{ - struct snd_card *card = pci_get_drvdata(pci); - struct cs5535audio *cs5535au = card->private_data; - u32 tmp; - int timeout; - int i; - - pci_restore_state(pci); - pci_enable_device(pci); - pci_set_master(pci); - - /* set LNK_WRM_RST to reset AC link */ - cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_WRM_RST); - - timeout = 50; - do { - tmp = cs_readl(cs5535au, ACC_CODEC_STATUS); - if (tmp & PRM_RDY_STS) - break; - udelay(1); - } while (--timeout); - - if (!timeout) - snd_printk(KERN_ERR "Failure getting AC Link ready\n"); - - /* we depend on ac97 to perform the codec power up */ - snd_ac97_resume(cs5535au->ac97); - /* set up rate regs, dma. actual initiation is done in trig */ - for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) { - struct cs5535audio_dma *dma = &cs5535au->dmas[i]; - if (dma && dma->substream && dma->suspended) { - dma->substream->ops->prepare(dma->substream); - dma->ops->setup_prd(cs5535au, dma->saved_prd); - } - } - - snd_power_change_state(card, SNDRV_CTL_POWER_D0); - - return 0; -} - diff --git a/sound/pci/echoaudio/Makefile b/sound/pci/echoaudio/Makefile deleted file mode 100644 index 7b576aeb3..000000000 --- a/sound/pci/echoaudio/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# -# Makefile for ALSA Echoaudio soundcard drivers -# Copyright (c) 2003 by Giuliano Pochini -# - -snd-darla20-objs := darla20.o -snd-gina20-objs := gina20.o -snd-layla20-objs := layla20.o -snd-darla24-objs := darla24.o -snd-gina24-objs := gina24.o -snd-layla24-objs := layla24.o -snd-mona-objs := mona.o -snd-mia-objs := mia.o -snd-echo3g-objs := echo3g.o -snd-indigo-objs := indigo.o -snd-indigoio-objs := indigoio.o -snd-indigodj-objs := indigodj.o - -obj-$(CONFIG_SND_DARLA20) += snd-darla20.o -obj-$(CONFIG_SND_GINA20) += snd-gina20.o -obj-$(CONFIG_SND_LAYLA20) += snd-layla20.o -obj-$(CONFIG_SND_DARLA24) += snd-darla24.o -obj-$(CONFIG_SND_GINA24) += snd-gina24.o -obj-$(CONFIG_SND_LAYLA24) += snd-layla24.o -obj-$(CONFIG_SND_MONA) += snd-mona.o -obj-$(CONFIG_SND_MIA) += snd-mia.o -obj-$(CONFIG_SND_ECHO3G) += snd-echo3g.o -obj-$(CONFIG_SND_INDIGO) += snd-indigo.o -obj-$(CONFIG_SND_INDIGOIO) += snd-indigoio.o -obj-$(CONFIG_SND_INDIGODJ) += snd-indigodj.o diff --git a/sound/pci/echoaudio/darla20.c b/sound/pci/echoaudio/darla20.c deleted file mode 100644 index b7108e29a..000000000 --- a/sound/pci/echoaudio/darla20.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHOGALS_FAMILY -#define ECHOCARD_DARLA20 -#define ECHOCARD_NAME "Darla20" -#define ECHOCARD_HAS_MONITOR - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 2 */ -#define PX_DIGITAL_IN 10 /* 0 */ -#define PX_NUM 10 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 8 */ -#define BX_DIGITAL_OUT 8 /* 0 */ -#define BX_ANALOG_IN 8 /* 2 */ -#define BX_DIGITAL_IN 10 /* 0 */ -#define BX_NUM 10 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_DARLA20_DSP 0 - -static const struct firmware card_fw[] = { - {0, "darla20_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0010, 0, 0, 0}, /* DSP 56301 Darla20 rev.0 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, - .rate_min = 44100, - .rate_max = 48000, - .channels_min = 1, - .channels_max = 2, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "darla20_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" diff --git a/sound/pci/echoaudio/darla20_dsp.c b/sound/pci/echoaudio/darla20_dsp.c deleted file mode 100644 index 4159e3bc1..000000000 --- a/sound/pci/echoaudio/darla20_dsp.c +++ /dev/null @@ -1,125 +0,0 @@ -/*************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Darla20\n")); - snd_assert((subdevice_id & 0xfff0) == DARLA20, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_DARLA20_DSP]; - chip->spdif_status = GD_SPDIF_STATUS_UNDEF; - chip->clock_state = GD_CLOCK_UNDEF; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - DE_INIT(("init_hw done\n")); - return err; -} - - - -/* The Darla20 has no external clock sources */ -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - return ECHO_CLOCK_BIT_INTERNAL; -} - - - -/* The Darla20 has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u8 clock_state, spdif_status; - - if (wait_handshake(chip)) - return -EIO; - - switch (rate) { - case 44100: - clock_state = GD_CLOCK_44; - spdif_status = GD_SPDIF_STATUS_44; - break; - case 48000: - clock_state = GD_CLOCK_48; - spdif_status = GD_SPDIF_STATUS_48; - break; - default: - clock_state = GD_CLOCK_NOCHANGE; - spdif_status = GD_SPDIF_STATUS_NOCHANGE; - break; - } - - if (chip->clock_state == clock_state) - clock_state = GD_CLOCK_NOCHANGE; - if (spdif_status == chip->spdif_status) - spdif_status = GD_SPDIF_STATUS_NOCHANGE; - - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->comm_page->gd_clock_state = clock_state; - chip->comm_page->gd_spdif_status = spdif_status; - chip->comm_page->gd_resampler_state = 3; /* magic number - should always be 3 */ - - /* Save the new audio state if it changed */ - if (clock_state != GD_CLOCK_NOCHANGE) - chip->clock_state = clock_state; - if (spdif_status != GD_SPDIF_STATUS_NOCHANGE) - chip->spdif_status = spdif_status; - chip->sample_rate = rate; - - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_GD_AUDIO_STATE); -} diff --git a/sound/pci/echoaudio/darla24.c b/sound/pci/echoaudio/darla24.c deleted file mode 100644 index e59a982ee..000000000 --- a/sound/pci/echoaudio/darla24.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHOGALS_FAMILY -#define ECHOCARD_DARLA24 -#define ECHOCARD_NAME "Darla24" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_INPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_SUPER_INTERLEAVE - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 2 */ -#define PX_DIGITAL_IN 10 /* 0 */ -#define PX_NUM 10 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 8 */ -#define BX_DIGITAL_OUT 8 /* 0 */ -#define BX_ANALOG_IN 8 /* 2 */ -#define BX_DIGITAL_IN 10 /* 0 */ -#define BX_NUM 10 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_DARLA24_DSP 0 - -static const struct firmware card_fw[] = { - {0, "darla24_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0040, 0, 0, 0}, /* DSP 56301 Darla24 rev.0 */ - {0x1057, 0x1801, 0xECC0, 0x0041, 0, 0, 0}, /* DSP 56301 Darla24 rev.1 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_8000_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 8000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "darla24_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" diff --git a/sound/pci/echoaudio/darla24_dsp.c b/sound/pci/echoaudio/darla24_dsp.c deleted file mode 100644 index 79938eed7..000000000 --- a/sound/pci/echoaudio/darla24_dsp.c +++ /dev/null @@ -1,156 +0,0 @@ -/*************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Darla24\n")); - snd_assert((subdevice_id & 0xfff0) == DARLA24, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_DARLA24_DSP]; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | - ECHO_CLOCK_BIT_ESYNC; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_ESYNC) - clock_bits |= ECHO_CLOCK_BIT_ESYNC; - - return clock_bits; -} - - - -/* The Darla24 has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u8 clock; - - switch (rate) { - case 96000: - clock = GD24_96000; - break; - case 88200: - clock = GD24_88200; - break; - case 48000: - clock = GD24_48000; - break; - case 44100: - clock = GD24_44100; - break; - case 32000: - clock = GD24_32000; - break; - case 22050: - clock = GD24_22050; - break; - case 16000: - clock = GD24_16000; - break; - case 11025: - clock = GD24_11025; - break; - case 8000: - clock = GD24_8000; - break; - default: - DE_ACT(("set_sample_rate: Error, invalid sample rate %d\n", - rate)); - return -EINVAL; - } - - if (wait_handshake(chip)) - return -EIO; - - DE_ACT(("set_sample_rate: %d clock %d\n", rate, clock)); - chip->sample_rate = rate; - - /* Override the sample rate if this card is set to Echo sync. */ - if (chip->input_clock == ECHO_CLOCK_ESYNC) - clock = GD24_EXT_SYNC; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP ? */ - chip->comm_page->gd_clock_state = clock; - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_GD_AUDIO_STATE); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - snd_assert(clock == ECHO_CLOCK_INTERNAL || - clock == ECHO_CLOCK_ESYNC, return -EINVAL); - chip->input_clock = clock; - return set_sample_rate(chip, chip->sample_rate); -} - diff --git a/sound/pci/echoaudio/echo3g.c b/sound/pci/echoaudio/echo3g.c deleted file mode 100644 index 12099fe15..000000000 --- a/sound/pci/echoaudio/echo3g.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHO3G_FAMILY -#define ECHOCARD_ECHO3G -#define ECHOCARD_NAME "Echo3G" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_ASIC -#define ECHOCARD_HAS_INPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_DIGITAL_MODE_SWITCH -#define ECHOCARD_HAS_ADAT 6 -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 -#define ECHOCARD_HAS_MIDI -#define ECHOCARD_HAS_PHANTOM_POWER - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 -#define PX_DIGITAL_OUT chip->px_digital_out -#define PX_ANALOG_IN chip->px_analog_in -#define PX_DIGITAL_IN chip->px_digital_in -#define PX_NUM chip->px_num - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 -#define BX_DIGITAL_OUT chip->bx_digital_out -#define BX_ANALOG_IN chip->bx_analog_in -#define BX_DIGITAL_IN chip->bx_digital_in -#define BX_NUM chip->bx_num - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_ECHO3G_DSP 1 -#define FW_3G_ASIC 2 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "echo3g_dsp.fw"}, - {0, "3g_asic.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x0100, 0, 0, 0}, /* Echo 3G */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000 | - SNDRV_PCM_RATE_CONTINUOUS, - .rate_min = 32000, - .rate_max = 100000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, -}; - -#include "echo3g_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio_3g.c" -#include "echoaudio.c" -#include "midi.c" diff --git a/sound/pci/echoaudio/echo3g_dsp.c b/sound/pci/echoaudio/echo3g_dsp.c deleted file mode 100644 index d26a1d1f3..000000000 --- a/sound/pci/echoaudio/echo3g_dsp.c +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - -static int load_asic(struct echoaudio *chip); -static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode); -static int set_digital_mode(struct echoaudio *chip, u8 mode); -static int check_asic_status(struct echoaudio *chip); -static int set_sample_rate(struct echoaudio *chip, u32 rate); -static int set_input_clock(struct echoaudio *chip, u16 clock); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int set_phantom_power(struct echoaudio *chip, char on); -static int write_control_reg(struct echoaudio *chip, u32 ctl, u32 frq, - char force); - -#include - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - local_irq_enable(); - DE_INIT(("init_hw() - Echo3G\n")); - snd_assert((subdevice_id & 0xfff0) == ECHO3G, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->comm_page->e3g_frq_register = - __constant_cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2); - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->has_midi = TRUE; - chip->dsp_code_to_load = &card_fw[FW_ECHO3G_DSP]; - - /* Load the DSP code and the ASIC on the PCI card and get - what type of external box is attached */ - err = load_firmware(chip); - - if (err < 0) { - return err; - } else if (err == E3G_GINA3G_BOX_TYPE) { - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | - ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_ADAT; - chip->card_name = "Gina3G"; - chip->px_digital_out = chip->bx_digital_out = 6; - chip->px_analog_in = chip->bx_analog_in = 14; - chip->px_digital_in = chip->bx_digital_in = 16; - chip->px_num = chip->bx_num = 24; - chip->has_phantom_power = TRUE; - chip->hasnt_input_nominal_level = TRUE; - } else if (err == E3G_LAYLA3G_BOX_TYPE) { - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | - ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_ADAT | - ECHO_CLOCK_BIT_WORD; - chip->card_name = "Layla3G"; - chip->px_digital_out = chip->bx_digital_out = 8; - chip->px_analog_in = chip->bx_analog_in = 16; - chip->px_digital_in = chip->bx_digital_in = 24; - chip->px_num = chip->bx_num = 32; - } else { - return -ENODEV; - } - - chip->digital_modes = ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | - ECHOCAPS_HAS_DIGITAL_MODE_ADAT; - chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; - chip->professional_spdif = FALSE; - chip->non_audio_spdif = FALSE; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); - snd_assert(err >= 0, return err); - err = set_phantom_power(chip, 0); - snd_assert(err >= 0, return err); - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static int set_phantom_power(struct echoaudio *chip, char on) -{ - u32 control_reg = le32_to_cpu(chip->comm_page->control_register); - - if (on) - control_reg |= E3G_PHANTOM_POWER; - else - control_reg &= ~E3G_PHANTOM_POWER; - - chip->phantom_power = on; - return write_control_reg(chip, control_reg, - le32_to_cpu(chip->comm_page->e3g_frq_register), - 0); -} diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c deleted file mode 100644 index c3dafa290..000000000 --- a/sound/pci/echoaudio/echoaudio.c +++ /dev/null @@ -1,2196 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -MODULE_AUTHOR("Giuliano Pochini "); -MODULE_LICENSE("GPL v2"); -MODULE_DESCRIPTION("Echoaudio " ECHOCARD_NAME " soundcards driver"); -MODULE_SUPPORTED_DEVICE("{{Echoaudio," ECHOCARD_NAME "}}"); -MODULE_DEVICE_TABLE(pci, snd_echo_ids); - -static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; -static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; -static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; - -module_param_array(index, int, NULL, 0444); -MODULE_PARM_DESC(index, "Index value for " ECHOCARD_NAME " soundcard."); -module_param_array(id, charp, NULL, 0444); -MODULE_PARM_DESC(id, "ID string for " ECHOCARD_NAME " soundcard."); -module_param_array(enable, bool, NULL, 0444); -MODULE_PARM_DESC(enable, "Enable " ECHOCARD_NAME " soundcard."); - -static unsigned int channels_list[10] = {1, 2, 4, 6, 8, 10, 12, 14, 16, 999999}; - -static int get_firmware(const struct firmware **fw_entry, - const struct firmware *frm, struct echoaudio *chip) -{ - int err; - char name[30]; - DE_ACT(("firmware requested: %s\n", frm->data)); - snprintf(name, sizeof(name), "ea/%s", frm->data); - if ((err = request_firmware(fw_entry, name, pci_device(chip))) < 0) - snd_printk(KERN_ERR "get_firmware(): Firmware not available (%d)\n", err); - return err; -} - -static void free_firmware(const struct firmware *fw_entry) -{ - release_firmware(fw_entry); - DE_ACT(("firmware released\n")); -} - - - -/****************************************************************************** - PCM interface -******************************************************************************/ - -static void audiopipe_free(struct snd_pcm_runtime *runtime) -{ - struct audiopipe *pipe = runtime->private_data; - - if (pipe->sgpage.area) - snd_dma_free_pages(&pipe->sgpage); - kfree(pipe); -} - - - -static int hw_rule_capture_format_by_channels(struct snd_pcm_hw_params *params, - struct snd_pcm_hw_rule *rule) -{ - struct snd_interval *c = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_CHANNELS); - struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); - struct snd_mask fmt; - - snd_mask_any(&fmt); - -#ifndef ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - /* >=2 channels cannot be S32_BE */ - if (c->min == 2) { - fmt.bits[0] &= ~SNDRV_PCM_FMTBIT_S32_BE; - return snd_mask_refine(f, &fmt); - } -#endif - /* > 2 channels cannot be U8 and S32_BE */ - if (c->min > 2) { - fmt.bits[0] &= ~(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_BE); - return snd_mask_refine(f, &fmt); - } - /* Mono is ok with any format */ - return 0; -} - - - -static int hw_rule_capture_channels_by_format(struct snd_pcm_hw_params *params, - struct snd_pcm_hw_rule *rule) -{ - struct snd_interval *c = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_CHANNELS); - struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); - struct snd_interval ch; - - snd_interval_any(&ch); - - /* S32_BE is mono (and stereo) only */ - if (f->bits[0] == SNDRV_PCM_FMTBIT_S32_BE) { - ch.min = 1; -#ifdef ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - ch.max = 2; -#else - ch.max = 1; -#endif - ch.integer = 1; - return snd_interval_refine(c, &ch); - } - /* U8 can be only mono or stereo */ - if (f->bits[0] == SNDRV_PCM_FMTBIT_U8) { - ch.min = 1; - ch.max = 2; - ch.integer = 1; - return snd_interval_refine(c, &ch); - } - /* S16_LE, S24_3LE and S32_LE support any number of channels. */ - return 0; -} - - - -static int hw_rule_playback_format_by_channels(struct snd_pcm_hw_params *params, - struct snd_pcm_hw_rule *rule) -{ - struct snd_interval *c = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_CHANNELS); - struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); - struct snd_mask fmt; - u64 fmask; - snd_mask_any(&fmt); - - fmask = fmt.bits[0] + ((u64)fmt.bits[1] << 32); - - /* >2 channels must be S16_LE, S24_3LE or S32_LE */ - if (c->min > 2) { - fmask &= SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE; - /* 1 channel must be S32_BE or S32_LE */ - } else if (c->max == 1) - fmask &= SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE; -#ifndef ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - /* 2 channels cannot be S32_BE */ - else if (c->min == 2 && c->max == 2) - fmask &= ~SNDRV_PCM_FMTBIT_S32_BE; -#endif - else - return 0; - - fmt.bits[0] &= (u32)fmask; - fmt.bits[1] &= (u32)(fmask >> 32); - return snd_mask_refine(f, &fmt); -} - - - -static int hw_rule_playback_channels_by_format(struct snd_pcm_hw_params *params, - struct snd_pcm_hw_rule *rule) -{ - struct snd_interval *c = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_CHANNELS); - struct snd_mask *f = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); - struct snd_interval ch; - u64 fmask; - - snd_interval_any(&ch); - ch.integer = 1; - fmask = f->bits[0] + ((u64)f->bits[1] << 32); - - /* S32_BE is mono (and stereo) only */ - if (fmask == SNDRV_PCM_FMTBIT_S32_BE) { - ch.min = 1; -#ifdef ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - ch.max = 2; -#else - ch.max = 1; -#endif - /* U8 is stereo only */ - } else if (fmask == SNDRV_PCM_FMTBIT_U8) - ch.min = ch.max = 2; - /* S16_LE and S24_3LE must be at least stereo */ - else if (!(fmask & ~(SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE))) - ch.min = 2; - else - return 0; - - return snd_interval_refine(c, &ch); -} - - - -/* Since the sample rate is a global setting, do allow the user to change the -sample rate only if there is only one pcm device open. */ -static int hw_rule_sample_rate(struct snd_pcm_hw_params *params, - struct snd_pcm_hw_rule *rule) -{ - struct snd_interval *rate = hw_param_interval(params, - SNDRV_PCM_HW_PARAM_RATE); - struct echoaudio *chip = rule->private; - struct snd_interval fixed; - - if (!chip->can_set_rate) { - snd_interval_any(&fixed); - fixed.min = fixed.max = chip->sample_rate; - return snd_interval_refine(rate, &fixed); - } - return 0; -} - - -static int pcm_open(struct snd_pcm_substream *substream, - signed char max_channels) -{ - struct echoaudio *chip; - struct snd_pcm_runtime *runtime; - struct audiopipe *pipe; - int err, i; - - if (max_channels <= 0) - return -EAGAIN; - - chip = snd_pcm_substream_chip(substream); - runtime = substream->runtime; - - pipe = kzalloc(sizeof(struct audiopipe), GFP_KERNEL); - if (!pipe) - return -ENOMEM; - pipe->index = -1; /* Not configured yet */ - - /* Set up hw capabilities and contraints */ - memcpy(&pipe->hw, &pcm_hardware_skel, sizeof(struct snd_pcm_hardware)); - DE_HWP(("max_channels=%d\n", max_channels)); - pipe->constr.list = channels_list; - pipe->constr.mask = 0; - for (i = 0; channels_list[i] <= max_channels; i++); - pipe->constr.count = i; - if (pipe->hw.channels_max > max_channels) - pipe->hw.channels_max = max_channels; - if (chip->digital_mode == DIGITAL_MODE_ADAT) { - pipe->hw.rate_max = 48000; - pipe->hw.rates &= SNDRV_PCM_RATE_8000_48000; - } - - runtime->hw = pipe->hw; - runtime->private_data = pipe; - runtime->private_free = audiopipe_free; - snd_pcm_set_sync(substream); - - /* Only mono and any even number of channels are allowed */ - if ((err = snd_pcm_hw_constraint_list(runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, - &pipe->constr)) < 0) - return err; - - /* All periods should have the same size */ - if ((err = snd_pcm_hw_constraint_integer(runtime, - SNDRV_PCM_HW_PARAM_PERIODS)) < 0) - return err; - - /* The hw accesses memory in chunks 32 frames long and they should be - 32-bytes-aligned. It's not a requirement, but it seems that IRQs are - generated with a resolution of 32 frames. Thus we need the following */ - if ((err = snd_pcm_hw_constraint_step(runtime, 0, - SNDRV_PCM_HW_PARAM_PERIOD_SIZE, - 32)) < 0) - return err; - if ((err = snd_pcm_hw_constraint_step(runtime, 0, - SNDRV_PCM_HW_PARAM_BUFFER_SIZE, - 32)) < 0) - return err; - - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_RATE, - hw_rule_sample_rate, chip, - SNDRV_PCM_HW_PARAM_RATE, -1)) < 0) - return err; - - /* Finally allocate a page for the scatter-gather list */ - if ((err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, - snd_dma_pci_data(chip->pci), - PAGE_SIZE, &pipe->sgpage)) < 0) { - DE_HWP(("s-g list allocation failed\n")); - return err; - } - - return 0; -} - - - -static int pcm_analog_in_open(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - int err; - - DE_ACT(("pcm_analog_in_open\n")); - if ((err = pcm_open(substream, num_analog_busses_in(chip) - - substream->number)) < 0) - return err; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, - hw_rule_capture_channels_by_format, NULL, - SNDRV_PCM_HW_PARAM_FORMAT, -1)) < 0) - return err; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_FORMAT, - hw_rule_capture_format_by_channels, NULL, - SNDRV_PCM_HW_PARAM_CHANNELS, -1)) < 0) - return err; - atomic_inc(&chip->opencount); - if (atomic_read(&chip->opencount) > 1 && chip->rate_set) - chip->can_set_rate=0; - DE_HWP(("pcm_analog_in_open cs=%d oc=%d r=%d\n", - chip->can_set_rate, atomic_read(&chip->opencount), - chip->sample_rate)); - return 0; -} - - - -static int pcm_analog_out_open(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - int max_channels, err; - -#ifdef ECHOCARD_HAS_VMIXER - max_channels = num_pipes_out(chip); -#else - max_channels = num_analog_busses_out(chip); -#endif - DE_ACT(("pcm_analog_out_open\n")); - if ((err = pcm_open(substream, max_channels - substream->number)) < 0) - return err; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, - hw_rule_playback_channels_by_format, - NULL, - SNDRV_PCM_HW_PARAM_FORMAT, -1)) < 0) - return err; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_FORMAT, - hw_rule_playback_format_by_channels, - NULL, - SNDRV_PCM_HW_PARAM_CHANNELS, -1)) < 0) - return err; - atomic_inc(&chip->opencount); - if (atomic_read(&chip->opencount) > 1 && chip->rate_set) - chip->can_set_rate=0; - DE_HWP(("pcm_analog_out_open cs=%d oc=%d r=%d\n", - chip->can_set_rate, atomic_read(&chip->opencount), - chip->sample_rate)); - return 0; -} - - - -#ifdef ECHOCARD_HAS_DIGITAL_IO - -static int pcm_digital_in_open(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - int err, max_channels; - - DE_ACT(("pcm_digital_in_open\n")); - max_channels = num_digital_busses_in(chip) - substream->number; - down(&chip->mode_mutex); - if (chip->digital_mode == DIGITAL_MODE_ADAT) - err = pcm_open(substream, max_channels); - else /* If the card has ADAT, subtract the 6 channels - * that S/PDIF doesn't have - */ - err = pcm_open(substream, max_channels - ECHOCARD_HAS_ADAT); - - if (err < 0) - goto din_exit; - - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, - hw_rule_capture_channels_by_format, NULL, - SNDRV_PCM_HW_PARAM_FORMAT, -1)) < 0) - goto din_exit; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_FORMAT, - hw_rule_capture_format_by_channels, NULL, - SNDRV_PCM_HW_PARAM_CHANNELS, -1)) < 0) - goto din_exit; - - atomic_inc(&chip->opencount); - if (atomic_read(&chip->opencount) > 1 && chip->rate_set) - chip->can_set_rate=0; - -din_exit: - up(&chip->mode_mutex); - return err; -} - - - -#ifndef ECHOCARD_HAS_VMIXER /* See the note in snd_echo_new_pcm() */ - -static int pcm_digital_out_open(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - int err, max_channels; - - DE_ACT(("pcm_digital_out_open\n")); - max_channels = num_digital_busses_out(chip) - substream->number; - down(&chip->mode_mutex); - if (chip->digital_mode == DIGITAL_MODE_ADAT) - err = pcm_open(substream, max_channels); - else /* If the card has ADAT, subtract the 6 channels - * that S/PDIF doesn't have - */ - err = pcm_open(substream, max_channels - ECHOCARD_HAS_ADAT); - - if (err < 0) - goto dout_exit; - - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_CHANNELS, - hw_rule_playback_channels_by_format, - NULL, SNDRV_PCM_HW_PARAM_FORMAT, - -1)) < 0) - goto dout_exit; - if ((err = snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_FORMAT, - hw_rule_playback_format_by_channels, - NULL, SNDRV_PCM_HW_PARAM_CHANNELS, - -1)) < 0) - goto dout_exit; - atomic_inc(&chip->opencount); - if (atomic_read(&chip->opencount) > 1 && chip->rate_set) - chip->can_set_rate=0; -dout_exit: - up(&chip->mode_mutex); - return err; -} - -#endif /* !ECHOCARD_HAS_VMIXER */ - -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - - - -static int pcm_close(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - int oc; - - /* Nothing to do here. Audio is already off and pipe will be - * freed by its callback - */ - DE_ACT(("pcm_close\n")); - - atomic_dec(&chip->opencount); - oc = atomic_read(&chip->opencount); - DE_ACT(("pcm_close oc=%d cs=%d rs=%d\n", oc, - chip->can_set_rate, chip->rate_set)); - if (oc < 2) - chip->can_set_rate = 1; - if (oc == 0) - chip->rate_set = 0; - DE_ACT(("pcm_close2 oc=%d cs=%d rs=%d\n", oc, - chip->can_set_rate,chip->rate_set)); - - return 0; -} - - - -/* Channel allocation and scatter-gather list setup */ -static int init_engine(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params, - int pipe_index, int interleave) -{ - struct echoaudio *chip; - int err, per, rest, page, edge, offs; - struct snd_sg_buf *sgbuf; - struct audiopipe *pipe; - - chip = snd_pcm_substream_chip(substream); - pipe = (struct audiopipe *) substream->runtime->private_data; - - /* Sets up che hardware. If it's already initialized, reset and - * redo with the new parameters - */ - spin_lock_irq(&chip->lock); - if (pipe->index >= 0) { - DE_HWP(("hwp_ie free(%d)\n", pipe->index)); - err = free_pipes(chip, pipe); - snd_assert(!err); - chip->substream[pipe->index] = NULL; - } - - err = allocate_pipes(chip, pipe, pipe_index, interleave); - if (err < 0) { - spin_unlock_irq(&chip->lock); - DE_ACT((KERN_NOTICE "allocate_pipes(%d) err=%d\n", - pipe_index, err)); - return err; - } - spin_unlock_irq(&chip->lock); - DE_ACT((KERN_NOTICE "allocate_pipes()=%d\n", pipe_index)); - - DE_HWP(("pcm_hw_params (bufsize=%dB periods=%d persize=%dB)\n", - params_buffer_bytes(hw_params), params_periods(hw_params), - params_period_bytes(hw_params))); - err = snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); - if (err < 0) { - snd_printk(KERN_ERR "malloc_pages err=%d\n", err); - spin_lock_irq(&chip->lock); - free_pipes(chip, pipe); - spin_unlock_irq(&chip->lock); - pipe->index = -1; - return err; - } - - sgbuf = snd_pcm_substream_sgbuf(substream); - - DE_HWP(("pcm_hw_params table size=%d pages=%d\n", - sgbuf->size, sgbuf->pages)); - sglist_init(chip, pipe); - edge = PAGE_SIZE; - for (offs = page = per = 0; offs < params_buffer_bytes(hw_params); - per++) { - rest = params_period_bytes(hw_params); - if (offs + rest > params_buffer_bytes(hw_params)) - rest = params_buffer_bytes(hw_params) - offs; - while (rest) { - if (rest <= edge - offs) { - sglist_add_mapping(chip, pipe, - snd_sgbuf_get_addr(sgbuf, offs), - rest); - sglist_add_irq(chip, pipe); - offs += rest; - rest = 0; - } else { - sglist_add_mapping(chip, pipe, - snd_sgbuf_get_addr(sgbuf, offs), - edge - offs); - rest -= edge - offs; - offs = edge; - } - if (offs == edge) { - edge += PAGE_SIZE; - page++; - } - } - } - - /* Close the ring buffer */ - sglist_wrap(chip, pipe); - - /* This stuff is used by the irq handler, so it must be - * initialized before chip->substream - */ - chip->last_period[pipe_index] = 0; - pipe->last_counter = 0; - pipe->position = 0; - smp_wmb(); - chip->substream[pipe_index] = substream; - chip->rate_set = 1; - spin_lock_irq(&chip->lock); - set_sample_rate(chip, hw_params->rate_num / hw_params->rate_den); - spin_unlock_irq(&chip->lock); - DE_HWP(("pcm_hw_params ok\n")); - return 0; -} - - - -static int pcm_analog_in_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - - return init_engine(substream, hw_params, px_analog_in(chip) + - substream->number, params_channels(hw_params)); -} - - - -static int pcm_analog_out_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - return init_engine(substream, hw_params, substream->number, - params_channels(hw_params)); -} - - - -#ifdef ECHOCARD_HAS_DIGITAL_IO - -static int pcm_digital_in_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - - return init_engine(substream, hw_params, px_digital_in(chip) + - substream->number, params_channels(hw_params)); -} - - - -#ifndef ECHOCARD_HAS_VMIXER /* See the note in snd_echo_new_pcm() */ -static int pcm_digital_out_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - - return init_engine(substream, hw_params, px_digital_out(chip) + - substream->number, params_channels(hw_params)); -} -#endif /* !ECHOCARD_HAS_VMIXER */ - -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - - - -static int pcm_hw_free(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip; - struct audiopipe *pipe; - - chip = snd_pcm_substream_chip(substream); - pipe = (struct audiopipe *) substream->runtime->private_data; - - spin_lock_irq(&chip->lock); - if (pipe->index >= 0) { - DE_HWP(("pcm_hw_free(%d)\n", pipe->index)); - free_pipes(chip, pipe); - chip->substream[pipe->index] = NULL; - pipe->index = -1; - } - spin_unlock_irq(&chip->lock); - - DE_HWP(("pcm_hw_freed\n")); - snd_pcm_lib_free_pages(substream); - return 0; -} - - - -static int pcm_prepare(struct snd_pcm_substream *substream) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - struct snd_pcm_runtime *runtime = substream->runtime; - struct audioformat format; - int pipe_index = ((struct audiopipe *)runtime->private_data)->index; - - DE_HWP(("Prepare rate=%d format=%d channels=%d\n", - runtime->rate, runtime->format, runtime->channels)); - format.interleave = runtime->channels; - format.data_are_bigendian = 0; - format.mono_to_stereo = 0; - switch (runtime->format) { - case SNDRV_PCM_FORMAT_U8: - format.bits_per_sample = 8; - break; - case SNDRV_PCM_FORMAT_S16_LE: - format.bits_per_sample = 16; - break; - case SNDRV_PCM_FORMAT_S24_3LE: - format.bits_per_sample = 24; - break; - case SNDRV_PCM_FORMAT_S32_BE: - format.data_are_bigendian = 1; - case SNDRV_PCM_FORMAT_S32_LE: - format.bits_per_sample = 32; - break; - default: - DE_HWP(("Prepare error: unsupported format %d\n", - runtime->format)); - return -EINVAL; - } - - snd_assert(pipe_index < px_num(chip), return -EINVAL); - snd_assert(is_pipe_allocated(chip, pipe_index), return -EINVAL); - set_audio_format(chip, pipe_index, &format); - return 0; -} - - - -static int pcm_trigger(struct snd_pcm_substream *substream, int cmd) -{ - struct echoaudio *chip = snd_pcm_substream_chip(substream); - struct snd_pcm_runtime *runtime = substream->runtime; - struct audiopipe *pipe = runtime->private_data; - int i, err; - u32 channelmask = 0; - struct list_head *pos; - struct snd_pcm_substream *s; - - snd_pcm_group_for_each(pos, substream) { - s = snd_pcm_group_substream_entry(pos); - for (i = 0; i < DSP_MAXPIPES; i++) { - if (s == chip->substream[i]) { - channelmask |= 1 << i; - snd_pcm_trigger_done(s, substream); - } - } - } - - spin_lock(&chip->lock); - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - DE_ACT(("pcm_trigger start\n")); - for (i = 0; i < DSP_MAXPIPES; i++) { - if (channelmask & (1 << i)) { - pipe = chip->substream[i]->runtime->private_data; - switch (pipe->state) { - case PIPE_STATE_STOPPED: - chip->last_period[i] = 0; - pipe->last_counter = 0; - pipe->position = 0; - *pipe->dma_counter = 0; - case PIPE_STATE_PAUSED: - pipe->state = PIPE_STATE_STARTED; - break; - case PIPE_STATE_STARTED: - break; - } - } - } - err = start_transport(chip, channelmask, - chip->pipe_cyclic_mask); - break; - case SNDRV_PCM_TRIGGER_STOP: - DE_ACT(("pcm_trigger stop\n")); - for (i = 0; i < DSP_MAXPIPES; i++) { - if (channelmask & (1 << i)) { - pipe = chip->substream[i]->runtime->private_data; - pipe->state = PIPE_STATE_STOPPED; - } - } - err = stop_transport(chip, channelmask); - break; - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - DE_ACT(("pcm_trigger pause\n")); - for (i = 0; i < DSP_MAXPIPES; i++) { - if (channelmask & (1 << i)) { - pipe = chip->substream[i]->runtime->private_data; - pipe->state = PIPE_STATE_PAUSED; - } - } - err = pause_transport(chip, channelmask); - break; - default: - err = -EINVAL; - } - spin_unlock(&chip->lock); - return err; -} - - - -static snd_pcm_uframes_t pcm_pointer(struct snd_pcm_substream *substream) -{ - struct snd_pcm_runtime *runtime = substream->runtime; - struct audiopipe *pipe = runtime->private_data; - size_t cnt, bufsize, pos; - - cnt = le32_to_cpu(*pipe->dma_counter); - pipe->position += cnt - pipe->last_counter; - pipe->last_counter = cnt; - bufsize = substream->runtime->buffer_size; - pos = bytes_to_frames(substream->runtime, pipe->position); - - while (pos >= bufsize) { - pipe->position -= frames_to_bytes(substream->runtime, bufsize); - pos -= bufsize; - } - return pos; -} - - - -/* pcm *_ops structures */ -static struct snd_pcm_ops analog_playback_ops = { - .open = pcm_analog_out_open, - .close = pcm_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = pcm_analog_out_hw_params, - .hw_free = pcm_hw_free, - .prepare = pcm_prepare, - .trigger = pcm_trigger, - .pointer = pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, -}; -static struct snd_pcm_ops analog_capture_ops = { - .open = pcm_analog_in_open, - .close = pcm_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = pcm_analog_in_hw_params, - .hw_free = pcm_hw_free, - .prepare = pcm_prepare, - .trigger = pcm_trigger, - .pointer = pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, -}; -#ifdef ECHOCARD_HAS_DIGITAL_IO -#ifndef ECHOCARD_HAS_VMIXER -static struct snd_pcm_ops digital_playback_ops = { - .open = pcm_digital_out_open, - .close = pcm_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = pcm_digital_out_hw_params, - .hw_free = pcm_hw_free, - .prepare = pcm_prepare, - .trigger = pcm_trigger, - .pointer = pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, -}; -#endif /* !ECHOCARD_HAS_VMIXER */ -static struct snd_pcm_ops digital_capture_ops = { - .open = pcm_digital_in_open, - .close = pcm_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = pcm_digital_in_hw_params, - .hw_free = pcm_hw_free, - .prepare = pcm_prepare, - .trigger = pcm_trigger, - .pointer = pcm_pointer, - .page = snd_pcm_sgbuf_ops_page, -}; -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - - - -/* Preallocate memory only for the first substream because it's the most - * used one - */ -static int snd_echo_preallocate_pages(struct snd_pcm *pcm, struct device *dev) -{ - struct snd_pcm_substream *ss; - int stream, err; - - for (stream = 0; stream < 2; stream++) - for (ss = pcm->streams[stream].substream; ss; ss = ss->next) { - err = snd_pcm_lib_preallocate_pages(ss, SNDRV_DMA_TYPE_DEV_SG, - dev, - ss->number ? 0 : 128<<10, - 256<<10); - if (err < 0) - return err; - } - return 0; -} - - - -/*<--snd_echo_probe() */ -static int __devinit snd_echo_new_pcm(struct echoaudio *chip) -{ - struct snd_pcm *pcm; - int err; - -#ifdef ECHOCARD_HAS_VMIXER - /* This card has a Vmixer, that is there is no direct mapping from PCM - streams to physical outputs. The user can mix the streams as he wishes - via control interface and it's possible to send any stream to any - output, thus it makes no sense to keep analog and digital outputs - separated */ - - /* PCM#0 Virtual outputs and analog inputs */ - if ((err = snd_pcm_new(chip->card, "PCM", 0, num_pipes_out(chip), - num_analog_busses_in(chip), &pcm)) < 0) - return err; - pcm->private_data = chip; - chip->analog_pcm = pcm; - strcpy(pcm->name, chip->card->shortname); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops); - if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) - return err; - DE_INIT(("Analog PCM ok\n")); - -#ifdef ECHOCARD_HAS_DIGITAL_IO - /* PCM#1 Digital inputs, no outputs */ - if ((err = snd_pcm_new(chip->card, "Digital PCM", 1, 0, - num_digital_busses_in(chip), &pcm)) < 0) - return err; - pcm->private_data = chip; - chip->digital_pcm = pcm; - strcpy(pcm->name, chip->card->shortname); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops); - if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) - return err; - DE_INIT(("Digital PCM ok\n")); -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - -#else /* ECHOCARD_HAS_VMIXER */ - - /* The card can manage substreams formed by analog and digital channels - at the same time, but I prefer to keep analog and digital channels - separated, because that mixed thing is confusing and useless. So we - register two PCM devices: */ - - /* PCM#0 Analog i/o */ - if ((err = snd_pcm_new(chip->card, "Analog PCM", 0, - num_analog_busses_out(chip), - num_analog_busses_in(chip), &pcm)) < 0) - return err; - pcm->private_data = chip; - chip->analog_pcm = pcm; - strcpy(pcm->name, chip->card->shortname); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &analog_playback_ops); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &analog_capture_ops); - if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) - return err; - DE_INIT(("Analog PCM ok\n")); - -#ifdef ECHOCARD_HAS_DIGITAL_IO - /* PCM#1 Digital i/o */ - if ((err = snd_pcm_new(chip->card, "Digital PCM", 1, - num_digital_busses_out(chip), - num_digital_busses_in(chip), &pcm)) < 0) - return err; - pcm->private_data = chip; - chip->digital_pcm = pcm; - strcpy(pcm->name, chip->card->shortname); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &digital_playback_ops); - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &digital_capture_ops); - if ((err = snd_echo_preallocate_pages(pcm, snd_dma_pci_data(chip->pci))) < 0) - return err; - DE_INIT(("Digital PCM ok\n")); -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - -#endif /* ECHOCARD_HAS_VMIXER */ - - return 0; -} - - - - -/****************************************************************************** - Control interface -******************************************************************************/ - -/******************* PCM output volume *******************/ -static int snd_echo_output_gain_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = num_busses_out(chip); - uinfo->value.integer.min = ECHOGAIN_MINOUT; - uinfo->value.integer.max = ECHOGAIN_MAXOUT; - return 0; -} - -static int snd_echo_output_gain_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c; - - chip = snd_kcontrol_chip(kcontrol); - for (c = 0; c < num_busses_out(chip); c++) - ucontrol->value.integer.value[c] = chip->output_gain[c]; - return 0; -} - -static int snd_echo_output_gain_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c, changed, gain; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - spin_lock_irq(&chip->lock); - for (c = 0; c < num_busses_out(chip); c++) { - gain = ucontrol->value.integer.value[c]; - /* Ignore out of range values */ - if (gain < ECHOGAIN_MINOUT || gain > ECHOGAIN_MAXOUT) - continue; - if (chip->output_gain[c] != gain) { - set_output_gain(chip, c, gain); - changed = 1; - } - } - if (changed) - update_output_line_level(chip); - spin_unlock_irq(&chip->lock); - return changed; -} - -#ifdef ECHOCARD_HAS_VMIXER -/* On Vmixer cards this one controls the line-out volume */ -static struct snd_kcontrol_new snd_echo_line_output_gain __devinitdata = { - .name = "Line Playback Volume", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_output_gain_info, - .get = snd_echo_output_gain_get, - .put = snd_echo_output_gain_put, -}; -#else -static struct snd_kcontrol_new snd_echo_pcm_output_gain __devinitdata = { - .name = "PCM Playback Volume", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_output_gain_info, - .get = snd_echo_output_gain_get, - .put = snd_echo_output_gain_put, -}; -#endif - - - -#ifdef ECHOCARD_HAS_INPUT_GAIN - -/******************* Analog input volume *******************/ -static int snd_echo_input_gain_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = num_analog_busses_in(chip); - uinfo->value.integer.min = ECHOGAIN_MININP; - uinfo->value.integer.max = ECHOGAIN_MAXINP; - return 0; -} - -static int snd_echo_input_gain_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c; - - chip = snd_kcontrol_chip(kcontrol); - for (c = 0; c < num_analog_busses_in(chip); c++) - ucontrol->value.integer.value[c] = chip->input_gain[c]; - return 0; -} - -static int snd_echo_input_gain_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c, gain, changed; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - spin_lock_irq(&chip->lock); - for (c = 0; c < num_analog_busses_in(chip); c++) { - gain = ucontrol->value.integer.value[c]; - /* Ignore out of range values */ - if (gain < ECHOGAIN_MININP || gain > ECHOGAIN_MAXINP) - continue; - if (chip->input_gain[c] != gain) { - set_input_gain(chip, c, gain); - changed = 1; - } - } - if (changed) - update_input_line_level(chip); - spin_unlock_irq(&chip->lock); - return changed; -} - -static struct snd_kcontrol_new snd_echo_line_input_gain __devinitdata = { - .name = "Line Capture Volume", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_input_gain_info, - .get = snd_echo_input_gain_get, - .put = snd_echo_input_gain_put, -}; - -#endif /* ECHOCARD_HAS_INPUT_GAIN */ - - - -#ifdef ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL - -/************ Analog output nominal level (+4dBu / -10dBV) ***************/ -static int snd_echo_output_nominal_info (struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = num_analog_busses_out(chip); - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int snd_echo_output_nominal_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c; - - chip = snd_kcontrol_chip(kcontrol); - for (c = 0; c < num_analog_busses_out(chip); c++) - ucontrol->value.integer.value[c] = chip->nominal_level[c]; - return 0; -} - -static int snd_echo_output_nominal_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c, changed; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - spin_lock_irq(&chip->lock); - for (c = 0; c < num_analog_busses_out(chip); c++) { - if (chip->nominal_level[c] != ucontrol->value.integer.value[c]) { - set_nominal_level(chip, c, - ucontrol->value.integer.value[c]); - changed = 1; - } - } - if (changed) - update_output_line_level(chip); - spin_unlock_irq(&chip->lock); - return changed; -} - -static struct snd_kcontrol_new snd_echo_output_nominal_level __devinitdata = { - .name = "Line Playback Switch (-10dBV)", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_output_nominal_info, - .get = snd_echo_output_nominal_get, - .put = snd_echo_output_nominal_put, -}; - -#endif /* ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL */ - - - -#ifdef ECHOCARD_HAS_INPUT_NOMINAL_LEVEL - -/*************** Analog input nominal level (+4dBu / -10dBV) ***************/ -static int snd_echo_input_nominal_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = num_analog_busses_in(chip); - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int snd_echo_input_nominal_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c; - - chip = snd_kcontrol_chip(kcontrol); - for (c = 0; c < num_analog_busses_in(chip); c++) - ucontrol->value.integer.value[c] = - chip->nominal_level[bx_analog_in(chip) + c]; - return 0; -} - -static int snd_echo_input_nominal_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int c, changed; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - spin_lock_irq(&chip->lock); - for (c = 0; c < num_analog_busses_in(chip); c++) { - if (chip->nominal_level[bx_analog_in(chip) + c] != - ucontrol->value.integer.value[c]) { - set_nominal_level(chip, bx_analog_in(chip) + c, - ucontrol->value.integer.value[c]); - changed = 1; - } - } - if (changed) - update_output_line_level(chip); /* "Output" is not a mistake - * here. - */ - spin_unlock_irq(&chip->lock); - return changed; -} - -static struct snd_kcontrol_new snd_echo_intput_nominal_level __devinitdata = { - .name = "Line Capture Switch (-10dBV)", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_input_nominal_info, - .get = snd_echo_input_nominal_get, - .put = snd_echo_input_nominal_put, -}; - -#endif /* ECHOCARD_HAS_INPUT_NOMINAL_LEVEL */ - - - -#ifdef ECHOCARD_HAS_MONITOR - -/******************* Monitor mixer *******************/ -static int snd_echo_mixer_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = ECHOGAIN_MINOUT; - uinfo->value.integer.max = ECHOGAIN_MAXOUT; - uinfo->dimen.d[0] = num_busses_out(chip); - uinfo->dimen.d[1] = num_busses_in(chip); - return 0; -} - -static int snd_echo_mixer_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - ucontrol->value.integer.value[0] = - chip->monitor_gain[ucontrol->id.index / num_busses_in(chip)] - [ucontrol->id.index % num_busses_in(chip)]; - return 0; -} - -static int snd_echo_mixer_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int changed, gain; - short out, in; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - out = ucontrol->id.index / num_busses_in(chip); - in = ucontrol->id.index % num_busses_in(chip); - gain = ucontrol->value.integer.value[0]; - if (gain < ECHOGAIN_MINOUT || gain > ECHOGAIN_MAXOUT) - return -EINVAL; - if (chip->monitor_gain[out][in] != gain) { - spin_lock_irq(&chip->lock); - set_monitor_gain(chip, out, in, gain); - update_output_line_level(chip); - spin_unlock_irq(&chip->lock); - changed = 1; - } - return changed; -} - -static struct snd_kcontrol_new snd_echo_monitor_mixer __devinitdata = { - .name = "Monitor Mixer Volume", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_mixer_info, - .get = snd_echo_mixer_get, - .put = snd_echo_mixer_put, -}; - -#endif /* ECHOCARD_HAS_MONITOR */ - - - -#ifdef ECHOCARD_HAS_VMIXER - -/******************* Vmixer *******************/ -static int snd_echo_vmixer_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 1; - uinfo->value.integer.min = ECHOGAIN_MINOUT; - uinfo->value.integer.max = ECHOGAIN_MAXOUT; - uinfo->dimen.d[0] = num_busses_out(chip); - uinfo->dimen.d[1] = num_pipes_out(chip); - return 0; -} - -static int snd_echo_vmixer_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - ucontrol->value.integer.value[0] = - chip->vmixer_gain[ucontrol->id.index / num_pipes_out(chip)] - [ucontrol->id.index % num_pipes_out(chip)]; - return 0; -} - -static int snd_echo_vmixer_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int gain, changed; - short vch, out; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - out = ucontrol->id.index / num_pipes_out(chip); - vch = ucontrol->id.index % num_pipes_out(chip); - gain = ucontrol->value.integer.value[0]; - if (gain < ECHOGAIN_MINOUT || gain > ECHOGAIN_MAXOUT) - return -EINVAL; - if (chip->vmixer_gain[out][vch] != ucontrol->value.integer.value[0]) { - spin_lock_irq(&chip->lock); - set_vmixer_gain(chip, out, vch, ucontrol->value.integer.value[0]); - update_vmixer_level(chip); - spin_unlock_irq(&chip->lock); - changed = 1; - } - return changed; -} - -static struct snd_kcontrol_new snd_echo_vmixer __devinitdata = { - .name = "VMixer Volume", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = snd_echo_vmixer_info, - .get = snd_echo_vmixer_get, - .put = snd_echo_vmixer_put, -}; - -#endif /* ECHOCARD_HAS_VMIXER */ - - - -#ifdef ECHOCARD_HAS_DIGITAL_MODE_SWITCH - -/******************* Digital mode switch *******************/ -static int snd_echo_digital_mode_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *names[4] = { - "S/PDIF Coaxial", "S/PDIF Optical", "ADAT Optical", - "S/PDIF Cdrom" - }; - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->value.enumerated.items = chip->num_digital_modes; - uinfo->count = 1; - if (uinfo->value.enumerated.item >= chip->num_digital_modes) - uinfo->value.enumerated.item = chip->num_digital_modes - 1; - strcpy(uinfo->value.enumerated.name, names[ - chip->digital_mode_list[uinfo->value.enumerated.item]]); - return 0; -} - -static int snd_echo_digital_mode_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int i, mode; - - chip = snd_kcontrol_chip(kcontrol); - mode = chip->digital_mode; - for (i = chip->num_digital_modes - 1; i >= 0; i--) - if (mode == chip->digital_mode_list[i]) { - ucontrol->value.enumerated.item[0] = i; - break; - } - return 0; -} - -static int snd_echo_digital_mode_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int changed; - unsigned short emode, dmode; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - - emode = ucontrol->value.enumerated.item[0]; - if (emode >= chip->num_digital_modes) - return -EINVAL; - dmode = chip->digital_mode_list[emode]; - - if (dmode != chip->digital_mode) { - /* mode_mutex is required to make this operation atomic wrt - pcm_digital_*_open() and set_input_clock() functions. */ - down(&chip->mode_mutex); - - /* Do not allow the user to change the digital mode when a pcm - device is open because it also changes the number of channels - and the allowed sample rates */ - if (atomic_read(&chip->opencount)) { - changed = -EAGAIN; - } else { - changed = set_digital_mode(chip, dmode); - /* If we had to change the clock source, report it */ - if (changed > 0 && chip->clock_src_ctl) { - snd_ctl_notify(chip->card, - SNDRV_CTL_EVENT_MASK_VALUE, - &chip->clock_src_ctl->id); - DE_ACT(("SDM() =%d\n", changed)); - } - if (changed >= 0) - changed = 1; /* No errors */ - } - up(&chip->mode_mutex); - } - return changed; -} - -static struct snd_kcontrol_new snd_echo_digital_mode_switch __devinitdata = { - .name = "Digital mode Switch", - .iface = SNDRV_CTL_ELEM_IFACE_CARD, - .info = snd_echo_digital_mode_info, - .get = snd_echo_digital_mode_get, - .put = snd_echo_digital_mode_put, -}; - -#endif /* ECHOCARD_HAS_DIGITAL_MODE_SWITCH */ - - - -#ifdef ECHOCARD_HAS_DIGITAL_IO - -/******************* S/PDIF mode switch *******************/ -static int snd_echo_spdif_mode_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *names[2] = {"Consumer", "Professional"}; - - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->value.enumerated.items = 2; - uinfo->count = 1; - if (uinfo->value.enumerated.item) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, - names[uinfo->value.enumerated.item]); - return 0; -} - -static int snd_echo_spdif_mode_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - ucontrol->value.enumerated.item[0] = !!chip->professional_spdif; - return 0; -} - -static int snd_echo_spdif_mode_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int mode; - - chip = snd_kcontrol_chip(kcontrol); - mode = !!ucontrol->value.enumerated.item[0]; - if (mode != chip->professional_spdif) { - spin_lock_irq(&chip->lock); - set_professional_spdif(chip, mode); - spin_unlock_irq(&chip->lock); - return 1; - } - return 0; -} - -static struct snd_kcontrol_new snd_echo_spdif_mode_switch __devinitdata = { - .name = "S/PDIF mode Switch", - .iface = SNDRV_CTL_ELEM_IFACE_CARD, - .info = snd_echo_spdif_mode_info, - .get = snd_echo_spdif_mode_get, - .put = snd_echo_spdif_mode_put, -}; - -#endif /* ECHOCARD_HAS_DIGITAL_IO */ - - - -#ifdef ECHOCARD_HAS_EXTERNAL_CLOCK - -/******************* Select input clock source *******************/ -static int snd_echo_clock_source_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - static char *names[8] = { - "Internal", "Word", "Super", "S/PDIF", "ADAT", "ESync", - "ESync96", "MTC" - }; - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->value.enumerated.items = chip->num_clock_sources; - uinfo->count = 1; - if (uinfo->value.enumerated.item >= chip->num_clock_sources) - uinfo->value.enumerated.item = chip->num_clock_sources - 1; - strcpy(uinfo->value.enumerated.name, names[ - chip->clock_source_list[uinfo->value.enumerated.item]]); - return 0; -} - -static int snd_echo_clock_source_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int i, clock; - - chip = snd_kcontrol_chip(kcontrol); - clock = chip->input_clock; - - for (i = 0; i < chip->num_clock_sources; i++) - if (clock == chip->clock_source_list[i]) - ucontrol->value.enumerated.item[0] = i; - - return 0; -} - -static int snd_echo_clock_source_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int changed; - unsigned int eclock, dclock; - - changed = 0; - chip = snd_kcontrol_chip(kcontrol); - eclock = ucontrol->value.enumerated.item[0]; - if (eclock >= chip->input_clock_types) - return -EINVAL; - dclock = chip->clock_source_list[eclock]; - if (chip->input_clock != dclock) { - down(&chip->mode_mutex); - spin_lock_irq(&chip->lock); - if ((changed = set_input_clock(chip, dclock)) == 0) - changed = 1; /* no errors */ - spin_unlock_irq(&chip->lock); - up(&chip->mode_mutex); - } - - if (changed < 0) - DE_ACT(("seticlk val%d err 0x%x\n", dclock, changed)); - - return changed; -} - -static struct snd_kcontrol_new snd_echo_clock_source_switch __devinitdata = { - .name = "Sample Clock Source", - .iface = SNDRV_CTL_ELEM_IFACE_PCM, - .info = snd_echo_clock_source_info, - .get = snd_echo_clock_source_get, - .put = snd_echo_clock_source_put, -}; - -#endif /* ECHOCARD_HAS_EXTERNAL_CLOCK */ - - - -#ifdef ECHOCARD_HAS_PHANTOM_POWER - -/******************* Phantom power switch *******************/ -static int snd_echo_phantom_power_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int snd_echo_phantom_power_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = chip->phantom_power; - return 0; -} - -static int snd_echo_phantom_power_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip = snd_kcontrol_chip(kcontrol); - int power, changed = 0; - - power = !!ucontrol->value.integer.value[0]; - if (chip->phantom_power != power) { - spin_lock_irq(&chip->lock); - changed = set_phantom_power(chip, power); - spin_unlock_irq(&chip->lock); - if (changed == 0) - changed = 1; /* no errors */ - } - return changed; -} - -static struct snd_kcontrol_new snd_echo_phantom_power_switch __devinitdata = { - .name = "Phantom power Switch", - .iface = SNDRV_CTL_ELEM_IFACE_CARD, - .info = snd_echo_phantom_power_info, - .get = snd_echo_phantom_power_get, - .put = snd_echo_phantom_power_put, -}; - -#endif /* ECHOCARD_HAS_PHANTOM_POWER */ - - - -#ifdef ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE - -/******************* Digital input automute switch *******************/ -static int snd_echo_automute_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int snd_echo_automute_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip = snd_kcontrol_chip(kcontrol); - - ucontrol->value.integer.value[0] = chip->digital_in_automute; - return 0; -} - -static int snd_echo_automute_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip = snd_kcontrol_chip(kcontrol); - int automute, changed = 0; - - automute = !!ucontrol->value.integer.value[0]; - if (chip->digital_in_automute != automute) { - spin_lock_irq(&chip->lock); - changed = set_input_auto_mute(chip, automute); - spin_unlock_irq(&chip->lock); - if (changed == 0) - changed = 1; /* no errors */ - } - return changed; -} - -static struct snd_kcontrol_new snd_echo_automute_switch __devinitdata = { - .name = "Digital Capture Switch (automute)", - .iface = SNDRV_CTL_ELEM_IFACE_CARD, - .info = snd_echo_automute_info, - .get = snd_echo_automute_get, - .put = snd_echo_automute_put, -}; - -#endif /* ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE */ - - - -/******************* VU-meters switch *******************/ -static int snd_echo_vumeters_switch_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; - uinfo->count = 1; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1; - return 0; -} - -static int snd_echo_vumeters_switch_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - spin_lock_irq(&chip->lock); - set_meters_on(chip, ucontrol->value.integer.value[0]); - spin_unlock_irq(&chip->lock); - return 1; -} - -static struct snd_kcontrol_new snd_echo_vumeters_switch __devinitdata = { - .name = "VU-meters Switch", - .iface = SNDRV_CTL_ELEM_IFACE_CARD, - .access = SNDRV_CTL_ELEM_ACCESS_WRITE, - .info = snd_echo_vumeters_switch_info, - .put = snd_echo_vumeters_switch_put, -}; - - - -/***** Read VU-meters (input, output, analog and digital together) *****/ -static int snd_echo_vumeters_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 96; - uinfo->value.integer.min = ECHOGAIN_MINOUT; - uinfo->value.integer.max = 0; -#ifdef ECHOCARD_HAS_VMIXER - uinfo->dimen.d[0] = 3; /* Out, In, Virt */ -#else - uinfo->dimen.d[0] = 2; /* Out, In */ -#endif - uinfo->dimen.d[1] = 16; /* 16 channels */ - uinfo->dimen.d[2] = 2; /* 0=level, 1=peak */ - return 0; -} - -static int snd_echo_vumeters_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - get_audio_meters(chip, ucontrol->value.integer.value); - return 0; -} - -static struct snd_kcontrol_new snd_echo_vumeters __devinitdata = { - .name = "VU-meters", - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, - .info = snd_echo_vumeters_info, - .get = snd_echo_vumeters_get, -}; - - - -/*** Channels info - it exports informations about the number of channels ***/ -static int snd_echo_channels_info_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - struct echoaudio *chip; - - chip = snd_kcontrol_chip(kcontrol); - uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - uinfo->count = 6; - uinfo->value.integer.min = 0; - uinfo->value.integer.max = 1 << ECHO_CLOCK_NUMBER; - return 0; -} - -static int snd_echo_channels_info_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct echoaudio *chip; - int detected, clocks, bit, src; - - chip = snd_kcontrol_chip(kcontrol); - ucontrol->value.integer.value[0] = num_busses_in(chip); - ucontrol->value.integer.value[1] = num_analog_busses_in(chip); - ucontrol->value.integer.value[2] = num_busses_out(chip); - ucontrol->value.integer.value[3] = num_analog_busses_out(chip); - ucontrol->value.integer.value[4] = num_pipes_out(chip); - - /* Compute the bitmask of the currently valid input clocks */ - detected = detect_input_clocks(chip); - clocks = 0; - src = chip->num_clock_sources - 1; - for (bit = ECHO_CLOCK_NUMBER - 1; bit >= 0; bit--) - if (detected & (1 << bit)) - for (; src >= 0; src--) - if (bit == chip->clock_source_list[src]) { - clocks |= 1 << src; - break; - } - ucontrol->value.integer.value[5] = clocks; - - return 0; -} - -static struct snd_kcontrol_new snd_echo_channels_info __devinitdata = { - .name = "Channels info", - .iface = SNDRV_CTL_ELEM_IFACE_HWDEP, - .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, - .info = snd_echo_channels_info_info, - .get = snd_echo_channels_info_get, -}; - - - - -/****************************************************************************** - IRQ Handler -******************************************************************************/ - -static irqreturn_t snd_echo_interrupt(int irq, void *dev_id, - struct pt_regs *regs) -{ - struct echoaudio *chip = dev_id; - struct snd_pcm_substream *substream; - int period, ss, st; - - spin_lock(&chip->lock); - st = service_irq(chip); - if (st < 0) { - spin_unlock(&chip->lock); - return IRQ_NONE; - } - /* The hardware doesn't tell us which substream caused the irq, - thus we have to check all running substreams. */ - for (ss = 0; ss < DSP_MAXPIPES; ss++) { - if ((substream = chip->substream[ss])) { - period = pcm_pointer(substream) / - substream->runtime->period_size; - if (period != chip->last_period[ss]) { - chip->last_period[ss] = period; - spin_unlock(&chip->lock); - snd_pcm_period_elapsed(substream); - spin_lock(&chip->lock); - } - } - } - spin_unlock(&chip->lock); - -#ifdef ECHOCARD_HAS_MIDI - if (st > 0 && chip->midi_in) { - snd_rawmidi_receive(chip->midi_in, chip->midi_buffer, st); - DE_MID(("rawmidi_iread=%d\n", st)); - } -#endif - return IRQ_HANDLED; -} - - - - -/****************************************************************************** - Module construction / destruction -******************************************************************************/ - -static int snd_echo_free(struct echoaudio *chip) -{ - DE_INIT(("Stop DSP...\n")); - if (chip->comm_page) { - rest_in_peace(chip); - snd_dma_free_pages(&chip->commpage_dma_buf); - } - DE_INIT(("Stopped.\n")); - - if (chip->irq >= 0) - free_irq(chip->irq, (void *)chip); - - if (chip->dsp_registers) - iounmap(chip->dsp_registers); - - if (chip->iores) - release_and_free_resource(chip->iores); - - DE_INIT(("MMIO freed.\n")); - - pci_disable_device(chip->pci); - - /* release chip data */ - kfree(chip); - DE_INIT(("Chip freed.\n")); - return 0; -} - - - -static int snd_echo_dev_free(struct snd_device *device) -{ - struct echoaudio *chip = device->device_data; - - DE_INIT(("snd_echo_dev_free()...\n")); - return snd_echo_free(chip); -} - - - -/* <--snd_echo_probe() */ -static __devinit int snd_echo_create(struct snd_card *card, - struct pci_dev *pci, - struct echoaudio **rchip) -{ - struct echoaudio *chip; - int err; - size_t sz; - static struct snd_device_ops ops = { - .dev_free = snd_echo_dev_free, - }; - - *rchip = NULL; - - pci_write_config_byte(pci, PCI_LATENCY_TIMER, 0xC0); - - if ((err = pci_enable_device(pci)) < 0) - return err; - pci_set_master(pci); - - /* allocate a chip-specific data */ - chip = kzalloc(sizeof(*chip), GFP_KERNEL); - if (!chip) { - pci_disable_device(pci); - return -ENOMEM; - } - DE_INIT(("chip=%p\n", chip)); - - spin_lock_init(&chip->lock); - chip->card = card; - chip->pci = pci; - chip->irq = -1; - - /* PCI resource allocation */ - chip->dsp_registers_phys = pci_resource_start(pci, 0); - sz = pci_resource_len(pci, 0); - if (sz > PAGE_SIZE) - sz = PAGE_SIZE; /* We map only the required part */ - - if ((chip->iores = request_mem_region(chip->dsp_registers_phys, sz, - ECHOCARD_NAME)) == NULL) { - snd_echo_free(chip); - snd_printk(KERN_ERR "cannot get memory region\n"); - return -EBUSY; - } - chip->dsp_registers = (volatile u32 __iomem *) - ioremap_nocache(chip->dsp_registers_phys, sz); - - if (request_irq(pci->irq, snd_echo_interrupt, IRQF_DISABLED | IRQF_SHARED, - ECHOCARD_NAME, (void *)chip)) { - snd_echo_free(chip); - snd_printk(KERN_ERR "cannot grab irq\n"); - return -EBUSY; - } - chip->irq = pci->irq; - DE_INIT(("pci=%p irq=%d subdev=%04x Init hardware...\n", - chip->pci, chip->irq, chip->pci->subsystem_device)); - - /* Create the DSP comm page - this is the area of memory used for most - of the communication with the DSP, which accesses it via bus mastering */ - if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), - sizeof(struct comm_page), - &chip->commpage_dma_buf) < 0) { - snd_echo_free(chip); - snd_printk(KERN_ERR "cannot allocate the comm page\n"); - return -ENOMEM; - } - chip->comm_page_phys = chip->commpage_dma_buf.addr; - chip->comm_page = (struct comm_page *)chip->commpage_dma_buf.area; - - err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device); - if (err) { - DE_INIT(("init_hw err=%d\n", err)); - snd_echo_free(chip); - return err; - } - DE_INIT(("Card init OK\n")); - - if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { - snd_echo_free(chip); - return err; - } - atomic_set(&chip->opencount, 0); - init_MUTEX(&chip->mode_mutex); - chip->can_set_rate = 1; - *rchip = chip; - /* Init done ! */ - return 0; -} - - - -/* constructor */ -static int __devinit snd_echo_probe(struct pci_dev *pci, - const struct pci_device_id *pci_id) -{ - static int dev; - struct snd_card *card; - struct echoaudio *chip; - char *dsp; - int i, err; - - if (dev >= SNDRV_CARDS) - return -ENODEV; - if (!enable[dev]) { - dev++; - return -ENOENT; - } - - DE_INIT(("Echoaudio driver starting...\n")); - i = 0; - card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); - if (card == NULL) - return -ENOMEM; - - if ((err = snd_echo_create(card, pci, &chip)) < 0) { - snd_card_free(card); - return err; - } - - strcpy(card->driver, "Echo_" ECHOCARD_NAME); - strcpy(card->shortname, chip->card_name); - - dsp = "56301"; - if (pci_id->device == 0x3410) - dsp = "56361"; - - sprintf(card->longname, "%s rev.%d (DSP%s) at 0x%lx irq %i", - card->shortname, pci_id->subdevice & 0x000f, dsp, - chip->dsp_registers_phys, chip->irq); - - if ((err = snd_echo_new_pcm(chip)) < 0) { - snd_printk(KERN_ERR "new pcm error %d\n", err); - snd_card_free(card); - return err; - } - -#ifdef ECHOCARD_HAS_MIDI - if (chip->has_midi) { /* Some Mia's do not have midi */ - if ((err = snd_echo_midi_create(card, chip)) < 0) { - snd_printk(KERN_ERR "new midi error %d\n", err); - snd_card_free(card); - return err; - } - } -#endif - -#ifdef ECHOCARD_HAS_VMIXER - snd_echo_vmixer.count = num_pipes_out(chip) * num_busses_out(chip); - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_output_gain, chip))) < 0) - goto ctl_error; - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vmixer, chip))) < 0) - goto ctl_error; -#else - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_pcm_output_gain, chip))) < 0) - goto ctl_error; -#endif - -#ifdef ECHOCARD_HAS_INPUT_GAIN - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_line_input_gain, chip))) < 0) - goto ctl_error; -#endif - -#ifdef ECHOCARD_HAS_INPUT_NOMINAL_LEVEL - if (!chip->hasnt_input_nominal_level) - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_intput_nominal_level, chip))) < 0) - goto ctl_error; -#endif - -#ifdef ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_output_nominal_level, chip))) < 0) - goto ctl_error; -#endif - - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vumeters_switch, chip))) < 0) - goto ctl_error; - - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_vumeters, chip))) < 0) - goto ctl_error; - -#ifdef ECHOCARD_HAS_MONITOR - snd_echo_monitor_mixer.count = num_busses_in(chip) * num_busses_out(chip); - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_monitor_mixer, chip))) < 0) - goto ctl_error; -#endif - -#ifdef ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_automute_switch, chip))) < 0) - goto ctl_error; -#endif - - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_channels_info, chip))) < 0) - goto ctl_error; - -#ifdef ECHOCARD_HAS_DIGITAL_MODE_SWITCH - /* Creates a list of available digital modes */ - chip->num_digital_modes = 0; - for (i = 0; i < 6; i++) - if (chip->digital_modes & (1 << i)) - chip->digital_mode_list[chip->num_digital_modes++] = i; - - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_digital_mode_switch, chip))) < 0) - goto ctl_error; -#endif /* ECHOCARD_HAS_DIGITAL_MODE_SWITCH */ - -#ifdef ECHOCARD_HAS_EXTERNAL_CLOCK - /* Creates a list of available clock sources */ - chip->num_clock_sources = 0; - for (i = 0; i < 10; i++) - if (chip->input_clock_types & (1 << i)) - chip->clock_source_list[chip->num_clock_sources++] = i; - - if (chip->num_clock_sources > 1) { - chip->clock_src_ctl = snd_ctl_new1(&snd_echo_clock_source_switch, chip); - if ((err = snd_ctl_add(chip->card, chip->clock_src_ctl)) < 0) - goto ctl_error; - } -#endif /* ECHOCARD_HAS_EXTERNAL_CLOCK */ - -#ifdef ECHOCARD_HAS_DIGITAL_IO - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_spdif_mode_switch, chip))) < 0) - goto ctl_error; -#endif - -#ifdef ECHOCARD_HAS_PHANTOM_POWER - if (chip->has_phantom_power) - if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_echo_phantom_power_switch, chip))) < 0) - goto ctl_error; -#endif - - if ((err = snd_card_register(card)) < 0) { - snd_card_free(card); - goto ctl_error; - } - snd_printk(KERN_INFO "Card registered: %s\n", card->longname); - - pci_set_drvdata(pci, chip); - dev++; - return 0; - -ctl_error: - snd_printk(KERN_ERR "new control error %d\n", err); - snd_card_free(card); - return err; -} - - - -static void __devexit snd_echo_remove(struct pci_dev *pci) -{ - struct echoaudio *chip; - - chip = pci_get_drvdata(pci); - if (chip) - snd_card_free(chip->card); - pci_set_drvdata(pci, NULL); -} - - - -/****************************************************************************** - Everything starts and ends here -******************************************************************************/ - -/* pci_driver definition */ -static struct pci_driver driver = { - .name = "Echoaudio " ECHOCARD_NAME, - .id_table = snd_echo_ids, - .probe = snd_echo_probe, - .remove = __devexit_p(snd_echo_remove), -}; - - - -/* initialization of the module */ -static int __init alsa_card_echo_init(void) -{ - return pci_register_driver(&driver); -} - - - -/* clean up the module */ -static void __exit alsa_card_echo_exit(void) -{ - pci_unregister_driver(&driver); -} - - -module_init(alsa_card_echo_init) -module_exit(alsa_card_echo_exit) diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h deleted file mode 100644 index 7e88c968e..000000000 --- a/sound/pci/echoaudio/echoaudio.h +++ /dev/null @@ -1,590 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - **************************************************************************** - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - - **************************************************************************** - - - Here's a block diagram of how most of the cards work: - - +-----------+ - record | |<-------------------- Inputs - <-------| | | - PCI | Transport | | - bus | engine | \|/ - ------->| | +-------+ - play | |--->|monitor|-------> Outputs - +-----------+ | mixer | - +-------+ - - The lines going to and from the PCI bus represent "pipes". A pipe performs - audio transport - moving audio data to and from buffers on the host via - bus mastering. - - The inputs and outputs on the right represent input and output "busses." - A bus is a physical, real connection to the outside world. An example - of a bus would be the 1/4" analog connectors on the back of Layla or - an RCA S/PDIF connector. - - For most cards, there is a one-to-one correspondence between outputs - and busses; that is, each individual pipe is hard-wired to a single bus. - - Cards that work this way are Darla20, Gina20, Layla20, Darla24, Gina24, - Layla24, Mona, and Indigo. - - - Mia has a feature called "virtual outputs." - - - +-----------+ - record | |<----------------------------- Inputs - <-------| | | - PCI | Transport | | - bus | engine | \|/ - ------->| | +------+ +-------+ - play | |-->|vmixer|-->|monitor|-------> Outputs - +-----------+ +------+ | mixer | - +-------+ - - - Obviously, the difference here is the box labeled "vmixer." Vmixer is - short for "virtual output mixer." For Mia, pipes are *not* hard-wired - to a single bus; the vmixer lets you mix any pipe to any bus in any - combination. - - Note, however, that the left-hand side of the diagram is unchanged. - Transport works exactly the same way - the difference is in the mixer stage. - - - Pipes and busses are numbered starting at zero. - - - - Pipe index - ========== - - A number of calls in CEchoGals refer to a "pipe index". A pipe index is - a unique number for a pipe that unambiguously refers to a playback or record - pipe. Pipe indices are numbered starting with analog outputs, followed by - digital outputs, then analog inputs, then digital inputs. - - Take Gina24 as an example: - - Pipe index - - 0-7 Analog outputs (0 .. FirstDigitalBusOut-1) - 8-15 Digital outputs (FirstDigitalBusOut .. NumBussesOut-1) - 16-17 Analog inputs - 18-25 Digital inputs - - - You get the pipe index by calling CEchoGals::OpenAudio; the other transport - functions take the pipe index as a parameter. If you need a pipe index for - some other reason, use the handy Makepipe_index method. - - - Some calls take a CChannelMask parameter; CChannelMask is a handy way to - group pipe indices. - - - - Digital mode switch - =================== - - Some cards (right now, Gina24, Layla24, and Mona) have a Digital Mode Switch - or DMS. Cards with a DMS can be set to one of three mutually exclusive - digital modes: S/PDIF RCA, S/PDIF optical, or ADAT optical. - - This may create some confusion since ADAT optical is 8 channels wide and - S/PDIF is only two channels wide. Gina24, Layla24, and Mona handle this - by acting as if they always have 8 digital outs and ins. If you are in - either S/PDIF mode, the last 6 channels don't do anything - data sent - out these channels is thrown away and you will always record zeros. - - Note that with Gina24, Layla24, and Mona, sample rates above 50 kHz are - only available if you have the card configured for S/PDIF optical or S/PDIF - RCA. - - - - Double speed mode - ================= - - Some of the cards support 88.2 kHz and 96 kHz sampling (Darla24, Gina24, - Layla24, Mona, Mia, and Indigo). For these cards, the driver sometimes has - to worry about "double speed mode"; double speed mode applies whenever the - sampling rate is above 50 kHz. - - For instance, Mona and Layla24 support word clock sync. However, they - actually support two different word clock modes - single speed (below - 50 kHz) and double speed (above 50 kHz). The hardware detects if a single - or double speed word clock signal is present; the generic code uses that - information to determine which mode to use. - - The generic code takes care of all this for you. -*/ - - -#ifndef _ECHOAUDIO_H_ -#define _ECHOAUDIO_H_ - - -#define TRUE 1 -#define FALSE 0 - -#include "echoaudio_dsp.h" - - - -/*********************************************************************** - - PCI configuration space - -***********************************************************************/ - -/* - * PCI vendor ID and device IDs for the hardware - */ -#define VENDOR_ID 0x1057 -#define DEVICE_ID_56301 0x1801 -#define DEVICE_ID_56361 0x3410 -#define SUBVENDOR_ID 0xECC0 - - -/* - * Valid Echo PCI subsystem card IDs - */ -#define DARLA20 0x0010 -#define GINA20 0x0020 -#define LAYLA20 0x0030 -#define DARLA24 0x0040 -#define GINA24 0x0050 -#define LAYLA24 0x0060 -#define MONA 0x0070 -#define MIA 0x0080 -#define INDIGO 0x0090 -#define INDIGO_IO 0x00a0 -#define INDIGO_DJ 0x00b0 -#define ECHO3G 0x0100 - - -/************************************************************************ - - Array sizes and so forth - -***********************************************************************/ - -/* - * Sizes - */ -#define ECHO_MAXAUDIOINPUTS 32 /* Max audio input channels */ -#define ECHO_MAXAUDIOOUTPUTS 32 /* Max audio output channels */ -#define ECHO_MAXAUDIOPIPES 32 /* Max number of input and output - * pipes */ -#define E3G_MAX_OUTPUTS 16 -#define ECHO_MAXMIDIJACKS 1 /* Max MIDI ports */ -#define ECHO_MIDI_QUEUE_SZ 512 /* Max MIDI input queue entries */ -#define ECHO_MTC_QUEUE_SZ 32 /* Max MIDI time code input queue - * entries */ - -/* - * MIDI activity indicator timeout - */ -#define MIDI_ACTIVITY_TIMEOUT_USEC 200000 - - -/**************************************************************************** - - Clocks - -*****************************************************************************/ - -/* - * Clock numbers - */ -#define ECHO_CLOCK_INTERNAL 0 -#define ECHO_CLOCK_WORD 1 -#define ECHO_CLOCK_SUPER 2 -#define ECHO_CLOCK_SPDIF 3 -#define ECHO_CLOCK_ADAT 4 -#define ECHO_CLOCK_ESYNC 5 -#define ECHO_CLOCK_ESYNC96 6 -#define ECHO_CLOCK_MTC 7 -#define ECHO_CLOCK_NUMBER 8 -#define ECHO_CLOCKS 0xffff - -/* - * Clock bit numbers - used to report capabilities and whatever clocks - * are being detected dynamically. - */ -#define ECHO_CLOCK_BIT_INTERNAL (1 << ECHO_CLOCK_INTERNAL) -#define ECHO_CLOCK_BIT_WORD (1 << ECHO_CLOCK_WORD) -#define ECHO_CLOCK_BIT_SUPER (1 << ECHO_CLOCK_SUPER) -#define ECHO_CLOCK_BIT_SPDIF (1 << ECHO_CLOCK_SPDIF) -#define ECHO_CLOCK_BIT_ADAT (1 << ECHO_CLOCK_ADAT) -#define ECHO_CLOCK_BIT_ESYNC (1 << ECHO_CLOCK_ESYNC) -#define ECHO_CLOCK_BIT_ESYNC96 (1 << ECHO_CLOCK_ESYNC96) -#define ECHO_CLOCK_BIT_MTC (1<comm_page->handshake = 0; -} - -static inline u32 get_dsp_register(struct echoaudio *chip, u32 index) -{ - return readl(&chip->dsp_registers[index]); -} - -static inline void set_dsp_register(struct echoaudio *chip, u32 index, - u32 value) -{ - writel(value, &chip->dsp_registers[index]); -} - - -/* Pipe and bus indexes. PX_* and BX_* are defined as chip->px_* and chip->bx_* -for 3G cards because they depend on the external box. They are integer -constants for all other cards. -Never use those defines directly, use the following functions instead. */ - -static inline int px_digital_out(const struct echoaudio *chip) -{ - return PX_DIGITAL_OUT; -} - -static inline int px_analog_in(const struct echoaudio *chip) -{ - return PX_ANALOG_IN; -} - -static inline int px_digital_in(const struct echoaudio *chip) -{ - return PX_DIGITAL_IN; -} - -static inline int px_num(const struct echoaudio *chip) -{ - return PX_NUM; -} - -static inline int bx_digital_out(const struct echoaudio *chip) -{ - return BX_DIGITAL_OUT; -} - -static inline int bx_analog_in(const struct echoaudio *chip) -{ - return BX_ANALOG_IN; -} - -static inline int bx_digital_in(const struct echoaudio *chip) -{ - return BX_DIGITAL_IN; -} - -static inline int bx_num(const struct echoaudio *chip) -{ - return BX_NUM; -} - -static inline int num_pipes_out(const struct echoaudio *chip) -{ - return px_analog_in(chip); -} - -static inline int num_pipes_in(const struct echoaudio *chip) -{ - return px_num(chip) - px_analog_in(chip); -} - -static inline int num_busses_out(const struct echoaudio *chip) -{ - return bx_analog_in(chip); -} - -static inline int num_busses_in(const struct echoaudio *chip) -{ - return bx_num(chip) - bx_analog_in(chip); -} - -static inline int num_analog_busses_out(const struct echoaudio *chip) -{ - return bx_digital_out(chip); -} - -static inline int num_analog_busses_in(const struct echoaudio *chip) -{ - return bx_digital_in(chip) - bx_analog_in(chip); -} - -static inline int num_digital_busses_out(const struct echoaudio *chip) -{ - return num_busses_out(chip) - num_analog_busses_out(chip); -} - -static inline int num_digital_busses_in(const struct echoaudio *chip) -{ - return num_busses_in(chip) - num_analog_busses_in(chip); -} - -/* The monitor array is a one-dimensional array; compute the offset - * into the array */ -static inline int monitor_index(const struct echoaudio *chip, int out, int in) -{ - return out * num_busses_in(chip) + in; -} - - -#ifndef pci_device -#define pci_device(chip) (&chip->pci->dev) -#endif - - -#endif /* _ECHOAUDIO_H_ */ diff --git a/sound/pci/echoaudio/echoaudio_3g.c b/sound/pci/echoaudio/echoaudio_3g.c deleted file mode 100644 index 9f439ea45..000000000 --- a/sound/pci/echoaudio/echoaudio_3g.c +++ /dev/null @@ -1,431 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - - -/* These functions are common for all "3G" cards */ - - -static int check_asic_status(struct echoaudio *chip) -{ - u32 box_status; - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->ext_box_status = - __constant_cpu_to_le32(E3G_ASIC_NOT_LOADED); - chip->asic_loaded = FALSE; - clear_handshake(chip); - send_vector(chip, DSP_VC_TEST_ASIC); - - if (wait_handshake(chip)) { - chip->dsp_code = NULL; - return -EIO; - } - - box_status = le32_to_cpu(chip->comm_page->ext_box_status); - DE_INIT(("box_status=%x\n", box_status)); - if (box_status == E3G_ASIC_NOT_LOADED) - return -ENODEV; - - chip->asic_loaded = TRUE; - return box_status & E3G_BOX_TYPE_MASK; -} - - - -static inline u32 get_frq_reg(struct echoaudio *chip) -{ - return le32_to_cpu(chip->comm_page->e3g_frq_register); -} - - - -/* Most configuration of 3G cards is accomplished by writing the control -register. write_control_reg sends the new control register value to the DSP. */ -static int write_control_reg(struct echoaudio *chip, u32 ctl, u32 frq, - char force) -{ - if (wait_handshake(chip)) - return -EIO; - - DE_ACT(("WriteControlReg: Setting 0x%x, 0x%x\n", ctl, frq)); - - ctl = cpu_to_le32(ctl); - frq = cpu_to_le32(frq); - - if (ctl != chip->comm_page->control_register || - frq != chip->comm_page->e3g_frq_register || force) { - chip->comm_page->e3g_frq_register = frq; - chip->comm_page->control_register = ctl; - clear_handshake(chip); - return send_vector(chip, DSP_VC_WRITE_CONTROL_REG); - } - - DE_ACT(("WriteControlReg: not written, no change\n")); - return 0; -} - - - -/* Set the digital mode - currently for Gina24, Layla24, Mona, 3G */ -static int set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u8 previous_mode; - int err, i, o; - - /* All audio channels must be closed before changing the digital mode */ - snd_assert(!chip->pipe_alloc_mask, return -EAGAIN); - - snd_assert(chip->digital_modes & (1 << mode), return -EINVAL); - - previous_mode = chip->digital_mode; - err = dsp_set_digital_mode(chip, mode); - - /* If we successfully changed the digital mode from or to ADAT, - * then make sure all output, input and monitor levels are - * updated by the DSP comm object. */ - if (err >= 0 && previous_mode != mode && - (previous_mode == DIGITAL_MODE_ADAT || mode == DIGITAL_MODE_ADAT)) { - spin_lock_irq(&chip->lock); - for (o = 0; o < num_busses_out(chip); o++) - for (i = 0; i < num_busses_in(chip); i++) - set_monitor_gain(chip, o, i, - chip->monitor_gain[o][i]); - -#ifdef ECHOCARD_HAS_INPUT_GAIN - for (i = 0; i < num_busses_in(chip); i++) - set_input_gain(chip, i, chip->input_gain[i]); - update_input_line_level(chip); -#endif - - for (o = 0; o < num_busses_out(chip); o++) - set_output_gain(chip, o, chip->output_gain[o]); - update_output_line_level(chip); - spin_unlock_irq(&chip->lock); - } - - return err; -} - - - -static u32 set_spdif_bits(struct echoaudio *chip, u32 control_reg, u32 rate) -{ - control_reg &= E3G_SPDIF_FORMAT_CLEAR_MASK; - - switch (rate) { - case 32000 : - control_reg |= E3G_SPDIF_SAMPLE_RATE0 | E3G_SPDIF_SAMPLE_RATE1; - break; - case 44100 : - if (chip->professional_spdif) - control_reg |= E3G_SPDIF_SAMPLE_RATE0; - break; - case 48000 : - control_reg |= E3G_SPDIF_SAMPLE_RATE1; - break; - } - - if (chip->professional_spdif) - control_reg |= E3G_SPDIF_PRO_MODE; - - if (chip->non_audio_spdif) - control_reg |= E3G_SPDIF_NOT_AUDIO; - - control_reg |= E3G_SPDIF_24_BIT | E3G_SPDIF_TWO_CHANNEL | - E3G_SPDIF_COPY_PERMIT; - - return control_reg; -} - - - -/* Set the S/PDIF output format */ -static int set_professional_spdif(struct echoaudio *chip, char prof) -{ - u32 control_reg; - - control_reg = le32_to_cpu(chip->comm_page->control_register); - chip->professional_spdif = prof; - control_reg = set_spdif_bits(chip, control_reg, chip->sample_rate); - return write_control_reg(chip, control_reg, get_frq_reg(chip), 0); -} - - - -/* detect_input_clocks() returns a bitmask consisting of all the input clocks -currently connected to the hardware; this changes as the user connects and -disconnects clock inputs. You should use this information to determine which -clocks the user is allowed to select. */ -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - * detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & E3G_CLOCK_DETECT_BIT_WORD) - clock_bits |= ECHO_CLOCK_BIT_WORD; - - switch(chip->digital_mode) { - case DIGITAL_MODE_SPDIF_RCA: - case DIGITAL_MODE_SPDIF_OPTICAL: - if (clocks_from_dsp & E3G_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - break; - case DIGITAL_MODE_ADAT: - if (clocks_from_dsp & E3G_CLOCK_DETECT_BIT_ADAT) - clock_bits |= ECHO_CLOCK_BIT_ADAT; - break; - } - - return clock_bits; -} - - - -static int load_asic(struct echoaudio *chip) -{ - int box_type, err; - - if (chip->asic_loaded) - return 0; - - /* Give the DSP a few milliseconds to settle down */ - mdelay(2); - - err = load_asic_generic(chip, DSP_FNC_LOAD_3G_ASIC, - &card_fw[FW_3G_ASIC]); - if (err < 0) - return err; - - chip->asic_code = &card_fw[FW_3G_ASIC]; - - /* Now give the new ASIC a little time to set up */ - mdelay(2); - /* See if it worked */ - box_type = check_asic_status(chip); - - /* Set up the control register if the load succeeded - - * 48 kHz, internal clock, S/PDIF RCA mode */ - if (box_type >= 0) { - err = write_control_reg(chip, E3G_48KHZ, - E3G_FREQ_REG_DEFAULT, TRUE); - if (err < 0) - return err; - } - - return box_type; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg, clock, base_rate, frq_reg; - - /* Only set the clock for internal mode. */ - if (chip->input_clock != ECHO_CLOCK_INTERNAL) { - DE_ACT(("set_sample_rate: Cannot set sample rate - " - "clock not set to CLK_CLOCKININTERNAL\n")); - /* Save the rate anyhow */ - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->sample_rate = rate; - set_input_clock(chip, chip->input_clock); - return 0; - } - - snd_assert(rate < 50000 || chip->digital_mode != DIGITAL_MODE_ADAT, - return -EINVAL); - - clock = 0; - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= E3G_CLOCK_CLEAR_MASK; - - switch (rate) { - case 96000: - clock = E3G_96KHZ; - break; - case 88200: - clock = E3G_88KHZ; - break; - case 48000: - clock = E3G_48KHZ; - break; - case 44100: - clock = E3G_44KHZ; - break; - case 32000: - clock = E3G_32KHZ; - break; - default: - clock = E3G_CONTINUOUS_CLOCK; - if (rate > 50000) - clock |= E3G_DOUBLE_SPEED_MODE; - break; - } - - control_reg |= clock; - control_reg = set_spdif_bits(chip, control_reg, rate); - - base_rate = rate; - if (base_rate > 50000) - base_rate /= 2; - if (base_rate < 32000) - base_rate = 32000; - - frq_reg = E3G_MAGIC_NUMBER / base_rate - 2; - if (frq_reg > E3G_FREQ_REG_MAX) - frq_reg = E3G_FREQ_REG_MAX; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->sample_rate = rate; - DE_ACT(("SetSampleRate: %d clock %x\n", rate, control_reg)); - - /* Tell the DSP about it - DSP reads both control reg & freq reg */ - return write_control_reg(chip, control_reg, frq_reg, 0); -} - - - -/* Set the sample clock source to internal, S/PDIF, ADAT */ -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - u32 control_reg, clocks_from_dsp; - - DE_ACT(("set_input_clock:\n")); - - /* Mask off the clock select bits */ - control_reg = le32_to_cpu(chip->comm_page->control_register) & - E3G_CLOCK_CLEAR_MASK; - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - switch (clock) { - case ECHO_CLOCK_INTERNAL: - DE_ACT(("Set Echo3G clock to INTERNAL\n")); - chip->input_clock = ECHO_CLOCK_INTERNAL; - return set_sample_rate(chip, chip->sample_rate); - case ECHO_CLOCK_SPDIF: - if (chip->digital_mode == DIGITAL_MODE_ADAT) - return -EAGAIN; - DE_ACT(("Set Echo3G clock to SPDIF\n")); - control_reg |= E3G_SPDIF_CLOCK; - if (clocks_from_dsp & E3G_CLOCK_DETECT_BIT_SPDIF96) - control_reg |= E3G_DOUBLE_SPEED_MODE; - else - control_reg &= ~E3G_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_ADAT: - if (chip->digital_mode != DIGITAL_MODE_ADAT) - return -EAGAIN; - DE_ACT(("Set Echo3G clock to ADAT\n")); - control_reg |= E3G_ADAT_CLOCK; - control_reg &= ~E3G_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_WORD: - DE_ACT(("Set Echo3G clock to WORD\n")); - control_reg |= E3G_WORD_CLOCK; - if (clocks_from_dsp & E3G_CLOCK_DETECT_BIT_WORD96) - control_reg |= E3G_DOUBLE_SPEED_MODE; - else - control_reg &= ~E3G_DOUBLE_SPEED_MODE; - break; - default: - DE_ACT(("Input clock 0x%x not supported for Echo3G\n", clock)); - return -EINVAL; - } - - chip->input_clock = clock; - return write_control_reg(chip, control_reg, get_frq_reg(chip), 1); -} - - - -static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u32 control_reg; - int err, incompatible_clock; - - /* Set clock to "internal" if it's not compatible with the new mode */ - incompatible_clock = FALSE; - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - case DIGITAL_MODE_SPDIF_RCA: - if (chip->input_clock == ECHO_CLOCK_ADAT) - incompatible_clock = TRUE; - break; - case DIGITAL_MODE_ADAT: - if (chip->input_clock == ECHO_CLOCK_SPDIF) - incompatible_clock = TRUE; - break; - default: - DE_ACT(("Digital mode not supported: %d\n", mode)); - return -EINVAL; - } - - spin_lock_irq(&chip->lock); - - if (incompatible_clock) { - chip->sample_rate = 48000; - set_input_clock(chip, ECHO_CLOCK_INTERNAL); - } - - /* Clear the current digital mode */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= E3G_DIGITAL_MODE_CLEAR_MASK; - - /* Tweak the control reg */ - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - control_reg |= E3G_SPDIF_OPTICAL_MODE; - break; - case DIGITAL_MODE_SPDIF_RCA: - /* E3G_SPDIF_OPTICAL_MODE bit cleared */ - break; - case DIGITAL_MODE_ADAT: - control_reg |= E3G_ADAT_MODE; - control_reg &= ~E3G_DOUBLE_SPEED_MODE; /* @@ useless */ - break; - } - - err = write_control_reg(chip, control_reg, get_frq_reg(chip), 1); - spin_unlock_irq(&chip->lock); - if (err < 0) - return err; - chip->digital_mode = mode; - - DE_ACT(("set_digital_mode(%d)\n", chip->digital_mode)); - return incompatible_clock; -} diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c deleted file mode 100644 index 42afa837d..000000000 --- a/sound/pci/echoaudio/echoaudio_dsp.c +++ /dev/null @@ -1,1125 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - -#if PAGE_SIZE < 4096 -#error PAGE_SIZE is < 4k -#endif - -static int restore_dsp_rettings(struct echoaudio *chip); - - -/* Some vector commands involve the DSP reading or writing data to and from the -comm page; if you send one of these commands to the DSP, it will complete the -command and then write a non-zero value to the Handshake field in the -comm page. This function waits for the handshake to show up. */ -static int wait_handshake(struct echoaudio *chip) -{ - int i; - - /* Wait up to 10ms for the handshake from the DSP */ - for (i = 0; i < HANDSHAKE_TIMEOUT; i++) { - /* Look for the handshake value */ - if (chip->comm_page->handshake) { - /*if (i) DE_ACT(("Handshake time: %d\n", i));*/ - return 0; - } - udelay(1); - } - - snd_printk(KERN_ERR "wait_handshake(): Timeout waiting for DSP\n"); - return -EBUSY; -} - - - -/* Much of the interaction between the DSP and the driver is done via vector -commands; send_vector writes a vector command to the DSP. Typically, this -causes the DSP to read or write fields in the comm page. -PCI posting is not required thanks to the handshake logic. */ -static int send_vector(struct echoaudio *chip, u32 command) -{ - int i; - - wmb(); /* Flush all pending writes before sending the command */ - - /* Wait up to 100ms for the "vector busy" bit to be off */ - for (i = 0; i < VECTOR_BUSY_TIMEOUT; i++) { - if (!(get_dsp_register(chip, CHI32_VECTOR_REG) & - CHI32_VECTOR_BUSY)) { - set_dsp_register(chip, CHI32_VECTOR_REG, command); - /*if (i) DE_ACT(("send_vector time: %d\n", i));*/ - return 0; - } - udelay(1); - } - - DE_ACT((KERN_ERR "timeout on send_vector\n")); - return -EBUSY; -} - - - -/* write_dsp writes a 32-bit value to the DSP; this is used almost -exclusively for loading the DSP. */ -static int write_dsp(struct echoaudio *chip, u32 data) -{ - u32 status, i; - - for (i = 0; i < 10000000; i++) { /* timeout = 10s */ - status = get_dsp_register(chip, CHI32_STATUS_REG); - if ((status & CHI32_STATUS_HOST_WRITE_EMPTY) != 0) { - set_dsp_register(chip, CHI32_DATA_REG, data); - wmb(); /* write it immediately */ - return 0; - } - udelay(1); - cond_resched(); - } - - chip->bad_board = TRUE; /* Set TRUE until DSP re-loaded */ - DE_ACT((KERN_ERR "write_dsp: Set bad_board to TRUE\n")); - return -EIO; -} - - - -/* read_dsp reads a 32-bit value from the DSP; this is used almost -exclusively for loading the DSP and checking the status of the ASIC. */ -static int read_dsp(struct echoaudio *chip, u32 *data) -{ - u32 status, i; - - for (i = 0; i < READ_DSP_TIMEOUT; i++) { - status = get_dsp_register(chip, CHI32_STATUS_REG); - if ((status & CHI32_STATUS_HOST_READ_FULL) != 0) { - *data = get_dsp_register(chip, CHI32_DATA_REG); - return 0; - } - udelay(1); - cond_resched(); - } - - chip->bad_board = TRUE; /* Set TRUE until DSP re-loaded */ - DE_INIT((KERN_ERR "read_dsp: Set bad_board to TRUE\n")); - return -EIO; -} - - - -/**************************************************************************** - Firmware loading functions - ****************************************************************************/ - -/* This function is used to read back the serial number from the DSP; -this is triggered by the SET_COMMPAGE_ADDR command. -Only some early Echogals products have serial numbers in the ROM; -the serial number is not used, but you still need to do this as -part of the DSP load process. */ -static int read_sn(struct echoaudio *chip) -{ - int i; - u32 sn[6]; - - for (i = 0; i < 5; i++) { - if (read_dsp(chip, &sn[i])) { - snd_printk(KERN_ERR "Failed to read serial number\n"); - return -EIO; - } - } - DE_INIT(("Read serial number %08x %08x %08x %08x %08x\n", - sn[0], sn[1], sn[2], sn[3], sn[4])); - return 0; -} - - - -#ifndef ECHOCARD_HAS_ASIC -/* This card has no ASIC, just return ok */ -static inline int check_asic_status(struct echoaudio *chip) -{ - chip->asic_loaded = TRUE; - return 0; -} - -#endif /* !ECHOCARD_HAS_ASIC */ - - - -#ifdef ECHOCARD_HAS_ASIC - -/* Load ASIC code - done after the DSP is loaded */ -static int load_asic_generic(struct echoaudio *chip, u32 cmd, - const struct firmware *asic) -{ - const struct firmware *fw; - int err; - u32 i, size; - u8 *code; - - if ((err = get_firmware(&fw, asic, chip)) < 0) { - snd_printk(KERN_WARNING "Firmware not found !\n"); - return err; - } - - code = (u8 *)fw->data; - size = fw->size; - - /* Send the "Here comes the ASIC" command */ - if (write_dsp(chip, cmd) < 0) - goto la_error; - - /* Write length of ASIC file in bytes */ - if (write_dsp(chip, size) < 0) - goto la_error; - - for (i = 0; i < size; i++) { - if (write_dsp(chip, code[i]) < 0) - goto la_error; - } - - DE_INIT(("ASIC loaded\n")); - free_firmware(fw); - return 0; - -la_error: - DE_INIT(("failed on write_dsp\n")); - free_firmware(fw); - return -EIO; -} - -#endif /* ECHOCARD_HAS_ASIC */ - - - -#ifdef DSP_56361 - -/* Install the resident loader for 56361 DSPs; The resident loader is on -the EPROM on the board for 56301 DSP. The resident loader is a tiny little -program that is used to load the real DSP code. */ -static int install_resident_loader(struct echoaudio *chip) -{ - u32 address; - int index, words, i; - u16 *code; - u32 status; - const struct firmware *fw; - - /* 56361 cards only! This check is required by the old 56301-based - Mona and Gina24 */ - if (chip->device_id != DEVICE_ID_56361) - return 0; - - /* Look to see if the resident loader is present. If the resident - loader is already installed, host flag 5 will be on. */ - status = get_dsp_register(chip, CHI32_STATUS_REG); - if (status & CHI32_STATUS_REG_HF5) { - DE_INIT(("Resident loader already installed; status is 0x%x\n", - status)); - return 0; - } - - if ((i = get_firmware(&fw, &card_fw[FW_361_LOADER], chip)) < 0) { - snd_printk(KERN_WARNING "Firmware not found !\n"); - return i; - } - - /* The DSP code is an array of 16 bit words. The array is divided up - into sections. The first word of each section is the size in words, - followed by the section type. - Since DSP addresses and data are 24 bits wide, they each take up two - 16 bit words in the array. - This is a lot like the other loader loop, but it's not a loop, you - don't write the memory type, and you don't write a zero at the end. */ - - /* Set DSP format bits for 24 bit mode */ - set_dsp_register(chip, CHI32_CONTROL_REG, - get_dsp_register(chip, CHI32_CONTROL_REG) | 0x900); - - code = (u16 *)fw->data; - - /* Skip the header section; the first word in the array is the size - of the first section, so the first real section of code is pointed - to by Code[0]. */ - index = code[0]; - - /* Skip the section size, LRS block type, and DSP memory type */ - index += 3; - - /* Get the number of DSP words to write */ - words = code[index++]; - - /* Get the DSP address for this block; 24 bits, so build from two words */ - address = ((u32)code[index] << 16) + code[index + 1]; - index += 2; - - /* Write the count to the DSP */ - if (write_dsp(chip, words)) { - DE_INIT(("install_resident_loader: Failed to write word count!\n")); - goto irl_error; - } - /* Write the DSP address */ - if (write_dsp(chip, address)) { - DE_INIT(("install_resident_loader: Failed to write DSP address!\n")); - goto irl_error; - } - /* Write out this block of code to the DSP */ - for (i = 0; i < words; i++) { - u32 data; - - data = ((u32)code[index] << 16) + code[index + 1]; - if (write_dsp(chip, data)) { - DE_INIT(("install_resident_loader: Failed to write DSP code\n")); - goto irl_error; - } - index += 2; - } - - /* Wait for flag 5 to come up */ - for (i = 0; i < 200; i++) { /* Timeout is 50us * 200 = 10ms */ - udelay(50); - status = get_dsp_register(chip, CHI32_STATUS_REG); - if (status & CHI32_STATUS_REG_HF5) - break; - } - - if (i == 200) { - DE_INIT(("Resident loader failed to set HF5\n")); - goto irl_error; - } - - DE_INIT(("Resident loader successfully installed\n")); - free_firmware(fw); - return 0; - -irl_error: - free_firmware(fw); - return -EIO; -} - -#endif /* DSP_56361 */ - - -static int load_dsp(struct echoaudio *chip, u16 *code) -{ - u32 address, data; - int index, words, i; - - if (chip->dsp_code == code) { - DE_INIT(("DSP is already loaded!\n")); - return 0; - } - chip->bad_board = TRUE; /* Set TRUE until DSP loaded */ - chip->dsp_code = NULL; /* Current DSP code not loaded */ - chip->asic_loaded = FALSE; /* Loading the DSP code will reset the ASIC */ - - DE_INIT(("load_dsp: Set bad_board to TRUE\n")); - - /* If this board requires a resident loader, install it. */ -#ifdef DSP_56361 - if ((i = install_resident_loader(chip)) < 0) - return i; -#endif - - /* Send software reset command */ - if (send_vector(chip, DSP_VC_RESET) < 0) { - DE_INIT(("LoadDsp: send_vector DSP_VC_RESET failed, Critical Failure\n")); - return -EIO; - } - /* Delay 10us */ - udelay(10); - - /* Wait 10ms for HF3 to indicate that software reset is complete */ - for (i = 0; i < 1000; i++) { /* Timeout is 10us * 1000 = 10ms */ - if (get_dsp_register(chip, CHI32_STATUS_REG) & - CHI32_STATUS_REG_HF3) - break; - udelay(10); - } - - if (i == 1000) { - DE_INIT(("load_dsp: Timeout waiting for CHI32_STATUS_REG_HF3\n")); - return -EIO; - } - - /* Set DSP format bits for 24 bit mode now that soft reset is done */ - set_dsp_register(chip, CHI32_CONTROL_REG, - get_dsp_register(chip, CHI32_CONTROL_REG) | 0x900); - - /* Main loader loop */ - - index = code[0]; - for (;;) { - int block_type, mem_type; - - /* Total Block Size */ - index++; - - /* Block Type */ - block_type = code[index]; - if (block_type == 4) /* We're finished */ - break; - - index++; - - /* Memory Type P=0,X=1,Y=2 */ - mem_type = code[index++]; - - /* Block Code Size */ - words = code[index++]; - if (words == 0) /* We're finished */ - break; - - /* Start Address */ - address = ((u32)code[index] << 16) + code[index + 1]; - index += 2; - - if (write_dsp(chip, words) < 0) { - DE_INIT(("load_dsp: failed to write number of DSP words\n")); - return -EIO; - } - if (write_dsp(chip, address) < 0) { - DE_INIT(("load_dsp: failed to write DSP address\n")); - return -EIO; - } - if (write_dsp(chip, mem_type) < 0) { - DE_INIT(("load_dsp: failed to write DSP memory type\n")); - return -EIO; - } - /* Code */ - for (i = 0; i < words; i++, index+=2) { - data = ((u32)code[index] << 16) + code[index + 1]; - if (write_dsp(chip, data) < 0) { - DE_INIT(("load_dsp: failed to write DSP data\n")); - return -EIO; - } - } - } - - if (write_dsp(chip, 0) < 0) { /* We're done!!! */ - DE_INIT(("load_dsp: Failed to write final zero\n")); - return -EIO; - } - udelay(10); - - for (i = 0; i < 5000; i++) { /* Timeout is 100us * 5000 = 500ms */ - /* Wait for flag 4 - indicates that the DSP loaded OK */ - if (get_dsp_register(chip, CHI32_STATUS_REG) & - CHI32_STATUS_REG_HF4) { - set_dsp_register(chip, CHI32_CONTROL_REG, - get_dsp_register(chip, CHI32_CONTROL_REG) & ~0x1b00); - - if (write_dsp(chip, DSP_FNC_SET_COMMPAGE_ADDR) < 0) { - DE_INIT(("load_dsp: Failed to write DSP_FNC_SET_COMMPAGE_ADDR\n")); - return -EIO; - } - - if (write_dsp(chip, chip->comm_page_phys) < 0) { - DE_INIT(("load_dsp: Failed to write comm page address\n")); - return -EIO; - } - - /* Get the serial number via slave mode. - This is triggered by the SET_COMMPAGE_ADDR command. - We don't actually use the serial number but we have to - get it as part of the DSP init voodoo. */ - if (read_sn(chip) < 0) { - DE_INIT(("load_dsp: Failed to read serial number\n")); - return -EIO; - } - - chip->dsp_code = code; /* Show which DSP code loaded */ - chip->bad_board = FALSE; /* DSP OK */ - DE_INIT(("load_dsp: OK!\n")); - return 0; - } - udelay(100); - } - - DE_INIT(("load_dsp: DSP load timed out waiting for HF4\n")); - return -EIO; -} - - - -/* load_firmware takes care of loading the DSP and any ASIC code. */ -static int load_firmware(struct echoaudio *chip) -{ - const struct firmware *fw; - int box_type, err; - - snd_assert(chip->dsp_code_to_load && chip->comm_page, return -EPERM); - - /* See if the ASIC is present and working - only if the DSP is already loaded */ - if (chip->dsp_code) { - if ((box_type = check_asic_status(chip)) >= 0) - return box_type; - /* ASIC check failed; force the DSP to reload */ - chip->dsp_code = NULL; - } - - if ((err = get_firmware(&fw, chip->dsp_code_to_load, chip)) < 0) - return err; - err = load_dsp(chip, (u16 *)fw->data); - free_firmware(fw); - if (err < 0) - return err; - - if ((box_type = load_asic(chip)) < 0) - return box_type; /* error */ - - if ((err = restore_dsp_rettings(chip)) < 0) - return err; - - return box_type; -} - - - -/**************************************************************************** - Mixer functions - ****************************************************************************/ - -#if defined(ECHOCARD_HAS_INPUT_NOMINAL_LEVEL) || \ - defined(ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL) - -/* Set the nominal level for an input or output bus (true = -10dBV, false = +4dBu) */ -static int set_nominal_level(struct echoaudio *chip, u16 index, char consumer) -{ - snd_assert(index < num_busses_out(chip) + num_busses_in(chip), - return -EINVAL); - - /* Wait for the handshake (OK even if ASIC is not loaded) */ - if (wait_handshake(chip)) - return -EIO; - - chip->nominal_level[index] = consumer; - - if (consumer) - chip->comm_page->nominal_level_mask |= cpu_to_le32(1 << index); - else - chip->comm_page->nominal_level_mask &= ~cpu_to_le32(1 << index); - - return 0; -} - -#endif /* ECHOCARD_HAS_*_NOMINAL_LEVEL */ - - - -/* Set the gain for a single physical output channel (dB). */ -static int set_output_gain(struct echoaudio *chip, u16 channel, s8 gain) -{ - snd_assert(channel < num_busses_out(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - /* Save the new value */ - chip->output_gain[channel] = gain; - chip->comm_page->line_out_level[channel] = gain; - return 0; -} - - - -#ifdef ECHOCARD_HAS_MONITOR -/* Set the monitor level from an input bus to an output bus. */ -static int set_monitor_gain(struct echoaudio *chip, u16 output, u16 input, - s8 gain) -{ - snd_assert(output < num_busses_out(chip) && - input < num_busses_in(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->monitor_gain[output][input] = gain; - chip->comm_page->monitors[monitor_index(chip, output, input)] = gain; - return 0; -} -#endif /* ECHOCARD_HAS_MONITOR */ - - -/* Tell the DSP to read and update output, nominal & monitor levels in comm page. */ -static int update_output_line_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_OUTVOL); -} - - - -/* Tell the DSP to read and update input levels in comm page */ -static int update_input_line_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_INGAIN); -} - - - -/* set_meters_on turns the meters on or off. If meters are turned on, the DSP -will write the meter and clock detect values to the comm page at about 30Hz */ -static void set_meters_on(struct echoaudio *chip, char on) -{ - if (on && !chip->meters_enabled) { - send_vector(chip, DSP_VC_METERS_ON); - chip->meters_enabled = 1; - } else if (!on && chip->meters_enabled) { - send_vector(chip, DSP_VC_METERS_OFF); - chip->meters_enabled = 0; - memset((s8 *)chip->comm_page->vu_meter, ECHOGAIN_MUTED, - DSP_MAXPIPES); - memset((s8 *)chip->comm_page->peak_meter, ECHOGAIN_MUTED, - DSP_MAXPIPES); - } -} - - - -/* Fill out an the given array using the current values in the comm page. -Meters are written in the comm page by the DSP in this order: - Output busses - Input busses - Output pipes (vmixer cards only) - -This function assumes there are no more than 16 in/out busses or pipes -Meters is an array [3][16][2] of long. */ -static void get_audio_meters(struct echoaudio *chip, long *meters) -{ - int i, m, n; - - m = 0; - n = 0; - for (i = 0; i < num_busses_out(chip); i++, m++) { - meters[n++] = chip->comm_page->vu_meter[m]; - meters[n++] = chip->comm_page->peak_meter[m]; - } - for (; n < 32; n++) - meters[n] = 0; - -#ifdef ECHOCARD_ECHO3G - m = E3G_MAX_OUTPUTS; /* Skip unused meters */ -#endif - - for (i = 0; i < num_busses_in(chip); i++, m++) { - meters[n++] = chip->comm_page->vu_meter[m]; - meters[n++] = chip->comm_page->peak_meter[m]; - } - for (; n < 64; n++) - meters[n] = 0; - -#ifdef ECHOCARD_HAS_VMIXER - for (i = 0; i < num_pipes_out(chip); i++, m++) { - meters[n++] = chip->comm_page->vu_meter[m]; - meters[n++] = chip->comm_page->peak_meter[m]; - } -#endif - for (; n < 96; n++) - meters[n] = 0; -} - - - -static int restore_dsp_rettings(struct echoaudio *chip) -{ - int err; - DE_INIT(("restore_dsp_settings\n")); - - if ((err = check_asic_status(chip)) < 0) - return err; - - /* @ Gina20/Darla20 only. Should be harmless for other cards. */ - chip->comm_page->gd_clock_state = GD_CLOCK_UNDEF; - chip->comm_page->gd_spdif_status = GD_SPDIF_STATUS_UNDEF; - chip->comm_page->handshake = 0xffffffff; - - if ((err = set_sample_rate(chip, chip->sample_rate)) < 0) - return err; - - if (chip->meters_enabled) - if (send_vector(chip, DSP_VC_METERS_ON) < 0) - return -EIO; - -#ifdef ECHOCARD_HAS_EXTERNAL_CLOCK - if (set_input_clock(chip, chip->input_clock) < 0) - return -EIO; -#endif - -#ifdef ECHOCARD_HAS_OUTPUT_CLOCK_SWITCH - if (set_output_clock(chip, chip->output_clock) < 0) - return -EIO; -#endif - - if (update_output_line_level(chip) < 0) - return -EIO; - - if (update_input_line_level(chip) < 0) - return -EIO; - -#ifdef ECHOCARD_HAS_VMIXER - if (update_vmixer_level(chip) < 0) - return -EIO; -#endif - - if (wait_handshake(chip) < 0) - return -EIO; - clear_handshake(chip); - - DE_INIT(("restore_dsp_rettings done\n")); - return send_vector(chip, DSP_VC_UPDATE_FLAGS); -} - - - -/**************************************************************************** - Transport functions - ****************************************************************************/ - -/* set_audio_format() sets the format of the audio data in host memory for -this pipe. Note that _MS_ (mono-to-stereo) playback modes are not used by ALSA -but they are here because they are just mono while capturing */ -static void set_audio_format(struct echoaudio *chip, u16 pipe_index, - const struct audioformat *format) -{ - u16 dsp_format; - - dsp_format = DSP_AUDIOFORM_SS_16LE; - - /* Look for super-interleave (no big-endian and 8 bits) */ - if (format->interleave > 2) { - switch (format->bits_per_sample) { - case 16: - dsp_format = DSP_AUDIOFORM_SUPER_INTERLEAVE_16LE; - break; - case 24: - dsp_format = DSP_AUDIOFORM_SUPER_INTERLEAVE_24LE; - break; - case 32: - dsp_format = DSP_AUDIOFORM_SUPER_INTERLEAVE_32LE; - break; - } - dsp_format |= format->interleave; - } else if (format->data_are_bigendian) { - /* For big-endian data, only 32 bit samples are supported */ - switch (format->interleave) { - case 1: - dsp_format = DSP_AUDIOFORM_MM_32BE; - break; -#ifdef ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - case 2: - dsp_format = DSP_AUDIOFORM_SS_32BE; - break; -#endif - } - } else if (format->interleave == 1 && - format->bits_per_sample == 32 && !format->mono_to_stereo) { - /* 32 bit little-endian mono->mono case */ - dsp_format = DSP_AUDIOFORM_MM_32LE; - } else { - /* Handle the other little-endian formats */ - switch (format->bits_per_sample) { - case 8: - if (format->interleave == 2) - dsp_format = DSP_AUDIOFORM_SS_8; - else - dsp_format = DSP_AUDIOFORM_MS_8; - break; - default: - case 16: - if (format->interleave == 2) - dsp_format = DSP_AUDIOFORM_SS_16LE; - else - dsp_format = DSP_AUDIOFORM_MS_16LE; - break; - case 24: - if (format->interleave == 2) - dsp_format = DSP_AUDIOFORM_SS_24LE; - else - dsp_format = DSP_AUDIOFORM_MS_24LE; - break; - case 32: - if (format->interleave == 2) - dsp_format = DSP_AUDIOFORM_SS_32LE; - else - dsp_format = DSP_AUDIOFORM_MS_32LE; - break; - } - } - DE_ACT(("set_audio_format[%d] = %x\n", pipe_index, dsp_format)); - chip->comm_page->audio_format[pipe_index] = cpu_to_le16(dsp_format); -} - - - -/* start_transport starts transport for a set of pipes. -The bits 1 in channel_mask specify what pipes to start. Only the bit of the -first channel must be set, regardless its interleave. -Same thing for pause_ and stop_ -trasport below. */ -static int start_transport(struct echoaudio *chip, u32 channel_mask, - u32 cyclic_mask) -{ - DE_ACT(("start_transport %x\n", channel_mask)); - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->cmd_start |= cpu_to_le32(channel_mask); - - if (chip->comm_page->cmd_start) { - clear_handshake(chip); - send_vector(chip, DSP_VC_START_TRANSFER); - if (wait_handshake(chip)) - return -EIO; - /* Keep track of which pipes are transporting */ - chip->active_mask |= channel_mask; - chip->comm_page->cmd_start = 0; - return 0; - } - - DE_ACT(("start_transport: No pipes to start!\n")); - return -EINVAL; -} - - - -static int pause_transport(struct echoaudio *chip, u32 channel_mask) -{ - DE_ACT(("pause_transport %x\n", channel_mask)); - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->cmd_stop |= cpu_to_le32(channel_mask); - chip->comm_page->cmd_reset = 0; - if (chip->comm_page->cmd_stop) { - clear_handshake(chip); - send_vector(chip, DSP_VC_STOP_TRANSFER); - if (wait_handshake(chip)) - return -EIO; - /* Keep track of which pipes are transporting */ - chip->active_mask &= ~channel_mask; - chip->comm_page->cmd_stop = 0; - chip->comm_page->cmd_reset = 0; - return 0; - } - - DE_ACT(("pause_transport: No pipes to stop!\n")); - return 0; -} - - - -static int stop_transport(struct echoaudio *chip, u32 channel_mask) -{ - DE_ACT(("stop_transport %x\n", channel_mask)); - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->cmd_stop |= cpu_to_le32(channel_mask); - chip->comm_page->cmd_reset |= cpu_to_le32(channel_mask); - if (chip->comm_page->cmd_reset) { - clear_handshake(chip); - send_vector(chip, DSP_VC_STOP_TRANSFER); - if (wait_handshake(chip)) - return -EIO; - /* Keep track of which pipes are transporting */ - chip->active_mask &= ~channel_mask; - chip->comm_page->cmd_stop = 0; - chip->comm_page->cmd_reset = 0; - return 0; - } - - DE_ACT(("stop_transport: No pipes to stop!\n")); - return 0; -} - - - -static inline int is_pipe_allocated(struct echoaudio *chip, u16 pipe_index) -{ - return (chip->pipe_alloc_mask & (1 << pipe_index)); -} - - - -/* Stops everything and turns off the DSP. All pipes should be already -stopped and unallocated. */ -static int rest_in_peace(struct echoaudio *chip) -{ - DE_ACT(("rest_in_peace() open=%x\n", chip->pipe_alloc_mask)); - - /* Stops all active pipes (just to be sure) */ - stop_transport(chip, chip->active_mask); - - set_meters_on(chip, FALSE); - -#ifdef ECHOCARD_HAS_MIDI - enable_midi_input(chip, FALSE); -#endif - - /* Go to sleep */ - if (chip->dsp_code) { - /* Make load_firmware do a complete reload */ - chip->dsp_code = NULL; - /* Put the DSP to sleep */ - return send_vector(chip, DSP_VC_GO_COMATOSE); - } - return 0; -} - - - -/* Fills the comm page with default values */ -static int init_dsp_comm_page(struct echoaudio *chip) -{ - /* Check if the compiler added extra padding inside the structure */ - if (offsetof(struct comm_page, midi_output) != 0xbe0) { - DE_INIT(("init_dsp_comm_page() - Invalid struct comm_page structure\n")); - return -EPERM; - } - - /* Init all the basic stuff */ - chip->card_name = ECHOCARD_NAME; - chip->bad_board = TRUE; /* Set TRUE until DSP loaded */ - chip->dsp_code = NULL; /* Current DSP code not loaded */ - chip->digital_mode = DIGITAL_MODE_NONE; - chip->input_clock = ECHO_CLOCK_INTERNAL; - chip->output_clock = ECHO_CLOCK_WORD; - chip->asic_loaded = FALSE; - memset(chip->comm_page, 0, sizeof(struct comm_page)); - - /* Init the comm page */ - chip->comm_page->comm_size = - __constant_cpu_to_le32(sizeof(struct comm_page)); - chip->comm_page->handshake = 0xffffffff; - chip->comm_page->midi_out_free_count = - __constant_cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE); - chip->comm_page->sample_rate = __constant_cpu_to_le32(44100); - chip->sample_rate = 44100; - - /* Set line levels so we don't blast any inputs on startup */ - memset(chip->comm_page->monitors, ECHOGAIN_MUTED, MONITOR_ARRAY_SIZE); - memset(chip->comm_page->vmixer, ECHOGAIN_MUTED, VMIXER_ARRAY_SIZE); - - return 0; -} - - - -/* This function initializes the several volume controls for busses and pipes. -This MUST be called after the DSP is up and running ! */ -static int init_line_levels(struct echoaudio *chip) -{ - int st, i, o; - - DE_INIT(("init_line_levels\n")); - - /* Mute output busses */ - for (i = 0; i < num_busses_out(chip); i++) - if ((st = set_output_gain(chip, i, ECHOGAIN_MUTED))) - return st; - if ((st = update_output_line_level(chip))) - return st; - -#ifdef ECHOCARD_HAS_VMIXER - /* Mute the Vmixer */ - for (i = 0; i < num_pipes_out(chip); i++) - for (o = 0; o < num_busses_out(chip); o++) - if ((st = set_vmixer_gain(chip, o, i, ECHOGAIN_MUTED))) - return st; - if ((st = update_vmixer_level(chip))) - return st; -#endif /* ECHOCARD_HAS_VMIXER */ - -#ifdef ECHOCARD_HAS_MONITOR - /* Mute the monitor mixer */ - for (o = 0; o < num_busses_out(chip); o++) - for (i = 0; i < num_busses_in(chip); i++) - if ((st = set_monitor_gain(chip, o, i, ECHOGAIN_MUTED))) - return st; - if ((st = update_output_line_level(chip))) - return st; -#endif /* ECHOCARD_HAS_MONITOR */ - -#ifdef ECHOCARD_HAS_INPUT_GAIN - for (i = 0; i < num_busses_in(chip); i++) - if ((st = set_input_gain(chip, i, ECHOGAIN_MUTED))) - return st; - if ((st = update_input_line_level(chip))) - return st; -#endif /* ECHOCARD_HAS_INPUT_GAIN */ - - return 0; -} - - - -/* This is low level part of the interrupt handler. -It returns -1 if the IRQ is not ours, or N>=0 if it is, where N is the number -of midi data in the input queue. */ -static int service_irq(struct echoaudio *chip) -{ - int st; - - /* Read the DSP status register and see if this DSP generated this interrupt */ - if (get_dsp_register(chip, CHI32_STATUS_REG) & CHI32_STATUS_IRQ) { - st = 0; -#ifdef ECHOCARD_HAS_MIDI - /* Get and parse midi data if present */ - if (chip->comm_page->midi_input[0]) /* The count is at index 0 */ - st = midi_service_irq(chip); /* Returns how many midi bytes we received */ -#endif - /* Clear the hardware interrupt */ - chip->comm_page->midi_input[0] = 0; - send_vector(chip, DSP_VC_ACK_INT); - return st; - } - return -1; -} - - - - -/****************************************************************************** - Functions for opening and closing pipes - ******************************************************************************/ - -/* allocate_pipes is used to reserve audio pipes for your exclusive use. -The call will fail if some pipes are already allocated. */ -static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe, - int pipe_index, int interleave) -{ - int i; - u32 channel_mask; - char is_cyclic; - - DE_ACT(("allocate_pipes: ch=%d int=%d\n", pipe_index, interleave)); - - if (chip->bad_board) - return -EIO; - - is_cyclic = 1; /* This driver uses cyclic buffers only */ - - for (channel_mask = i = 0; i < interleave; i++) - channel_mask |= 1 << (pipe_index + i); - if (chip->pipe_alloc_mask & channel_mask) { - DE_ACT(("allocate_pipes: channel already open\n")); - return -EAGAIN; - } - - chip->comm_page->position[pipe_index] = 0; - chip->pipe_alloc_mask |= channel_mask; - if (is_cyclic) - chip->pipe_cyclic_mask |= channel_mask; - pipe->index = pipe_index; - pipe->interleave = interleave; - pipe->state = PIPE_STATE_STOPPED; - - /* The counter register is where the DSP writes the 32 bit DMA - position for a pipe. The DSP is constantly updating this value as - it moves data. The DMA counter is in units of bytes, not samples. */ - pipe->dma_counter = &chip->comm_page->position[pipe_index]; - *pipe->dma_counter = 0; - DE_ACT(("allocate_pipes: ok\n")); - return pipe_index; -} - - - -static int free_pipes(struct echoaudio *chip, struct audiopipe *pipe) -{ - u32 channel_mask; - int i; - - DE_ACT(("free_pipes: Pipe %d\n", pipe->index)); - snd_assert(is_pipe_allocated(chip, pipe->index), return -EINVAL); - snd_assert(pipe->state == PIPE_STATE_STOPPED, return -EINVAL); - - for (channel_mask = i = 0; i < pipe->interleave; i++) - channel_mask |= 1 << (pipe->index + i); - - chip->pipe_alloc_mask &= ~channel_mask; - chip->pipe_cyclic_mask &= ~channel_mask; - return 0; -} - - - -/****************************************************************************** - Functions for managing the scatter-gather list -******************************************************************************/ - -static int sglist_init(struct echoaudio *chip, struct audiopipe *pipe) -{ - pipe->sglist_head = 0; - memset(pipe->sgpage.area, 0, PAGE_SIZE); - chip->comm_page->sglist_addr[pipe->index].addr = - cpu_to_le32(pipe->sgpage.addr); - return 0; -} - - - -static int sglist_add_mapping(struct echoaudio *chip, struct audiopipe *pipe, - dma_addr_t address, size_t length) -{ - int head = pipe->sglist_head; - struct sg_entry *list = (struct sg_entry *)pipe->sgpage.area; - - if (head < MAX_SGLIST_ENTRIES - 1) { - list[head].addr = cpu_to_le32(address); - list[head].size = cpu_to_le32(length); - pipe->sglist_head++; - } else { - DE_ACT(("SGlist: too many fragments\n")); - return -ENOMEM; - } - return 0; -} - - - -static inline int sglist_add_irq(struct echoaudio *chip, struct audiopipe *pipe) -{ - return sglist_add_mapping(chip, pipe, 0, 0); -} - - - -static inline int sglist_wrap(struct echoaudio *chip, struct audiopipe *pipe) -{ - return sglist_add_mapping(chip, pipe, pipe->sgpage.addr, 0); -} diff --git a/sound/pci/echoaudio/echoaudio_dsp.h b/sound/pci/echoaudio/echoaudio_dsp.h deleted file mode 100644 index e55ee0099..000000000 --- a/sound/pci/echoaudio/echoaudio_dsp.h +++ /dev/null @@ -1,694 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - -#ifndef _ECHO_DSP_ -#define _ECHO_DSP_ - - -/**** Echogals: Darla20, Gina20, Layla20, and Darla24 ****/ -#if defined(ECHOGALS_FAMILY) - -#define NUM_ASIC_TESTS 5 -#define READ_DSP_TIMEOUT 1000000L /* one second */ - -/**** Echo24: Gina24, Layla24, Mona, Mia, Mia-midi ****/ -#elif defined(ECHO24_FAMILY) - -#define DSP_56361 /* Some Echo24 cards use the 56361 DSP */ -#define READ_DSP_TIMEOUT 100000L /* .1 second */ - -/**** 3G: Gina3G, Layla3G ****/ -#elif defined(ECHO3G_FAMILY) - -#define DSP_56361 -#define READ_DSP_TIMEOUT 100000L /* .1 second */ -#define MIN_MTC_1X_RATE 32000 - -/**** Indigo: Indigo, Indigo IO, Indigo DJ ****/ -#elif defined(INDIGO_FAMILY) - -#define DSP_56361 -#define READ_DSP_TIMEOUT 100000L /* .1 second */ - -#else - -#error No family is defined - -#endif - - - -/* - * - * Max inputs and outputs - * - */ - -#define DSP_MAXAUDIOINPUTS 16 /* Max audio input channels */ -#define DSP_MAXAUDIOOUTPUTS 16 /* Max audio output channels */ -#define DSP_MAXPIPES 32 /* Max total pipes (input + output) */ - - -/* - * - * These are the offsets for the memory-mapped DSP registers; the DSP base - * address is treated as the start of a u32 array. - */ - -#define CHI32_CONTROL_REG 4 -#define CHI32_STATUS_REG 5 -#define CHI32_VECTOR_REG 6 -#define CHI32_DATA_REG 7 - - -/* - * - * Interesting bits within the DSP registers - * - */ - -#define CHI32_VECTOR_BUSY 0x00000001 -#define CHI32_STATUS_REG_HF3 0x00000008 -#define CHI32_STATUS_REG_HF4 0x00000010 -#define CHI32_STATUS_REG_HF5 0x00000020 -#define CHI32_STATUS_HOST_READ_FULL 0x00000004 -#define CHI32_STATUS_HOST_WRITE_EMPTY 0x00000002 -#define CHI32_STATUS_IRQ 0x00000040 - - -/* - * - * DSP commands sent via slave mode; these are sent to the DSP by write_dsp() - * - */ - -#define DSP_FNC_SET_COMMPAGE_ADDR 0x02 -#define DSP_FNC_LOAD_LAYLA_ASIC 0xa0 -#define DSP_FNC_LOAD_GINA24_ASIC 0xa0 -#define DSP_FNC_LOAD_MONA_PCI_CARD_ASIC 0xa0 -#define DSP_FNC_LOAD_LAYLA24_PCI_CARD_ASIC 0xa0 -#define DSP_FNC_LOAD_MONA_EXTERNAL_ASIC 0xa1 -#define DSP_FNC_LOAD_LAYLA24_EXTERNAL_ASIC 0xa1 -#define DSP_FNC_LOAD_3G_ASIC 0xa0 - - -/* - * - * Defines to handle the MIDI input state engine; these are used to properly - * extract MIDI time code bytes and their timestamps from the MIDI input stream. - * - */ - -#define MIDI_IN_STATE_NORMAL 0 -#define MIDI_IN_STATE_TS_HIGH 1 -#define MIDI_IN_STATE_TS_LOW 2 -#define MIDI_IN_STATE_F1_DATA 3 -#define MIDI_IN_SKIP_DATA (-1) - - -/*---------------------------------------------------------------------------- - -Setting the sample rates on Layla24 is somewhat schizophrenic. - -For standard rates, it works exactly like Mona and Gina24. That is, for -8, 11.025, 16, 22.05, 32, 44.1, 48, 88.2, and 96 kHz, you just set the -appropriate bits in the control register and write the control register. - -In order to support MIDI time code sync (and possibly SMPTE LTC sync in -the future), Layla24 also has "continuous sample rate mode". In this mode, -Layla24 can generate any sample rate between 25 and 50 kHz inclusive, or -50 to 100 kHz inclusive for double speed mode. - -To use continuous mode: - --Set the clock select bits in the control register to 0xe (see the #define - below) - --Set double-speed mode if you want to use sample rates above 50 kHz - --Write the control register as you would normally - --Now, you need to set the frequency register. First, you need to determine the - value for the frequency register. This is given by the following formula: - -frequency_reg = (LAYLA24_MAGIC_NUMBER / sample_rate) - 2 - -Note the #define below for the magic number - --Wait for the DSP handshake --Write the frequency_reg value to the .SampleRate field of the comm page --Send the vector command SET_LAYLA24_FREQUENCY_REG (see vmonkey.h) - -Once you have set the control register up for continuous mode, you can just -write the frequency register to change the sample rate. This could be -used for MIDI time code sync. For MTC sync, the control register is set for -continuous mode. The driver then just keeps writing the -SET_LAYLA24_FREQUENCY_REG command. - ------------------------------------------------------------------------------*/ - -#define LAYLA24_MAGIC_NUMBER 677376000 -#define LAYLA24_CONTINUOUS_CLOCK 0x000e - - -/* - * - * DSP vector commands - * - */ - -#define DSP_VC_RESET 0x80ff - -#ifndef DSP_56361 - -#define DSP_VC_ACK_INT 0x8073 -#define DSP_VC_SET_VMIXER_GAIN 0x0000 /* Not used, only for compile */ -#define DSP_VC_START_TRANSFER 0x0075 /* Handshke rqd. */ -#define DSP_VC_METERS_ON 0x0079 -#define DSP_VC_METERS_OFF 0x007b -#define DSP_VC_UPDATE_OUTVOL 0x007d /* Handshke rqd. */ -#define DSP_VC_UPDATE_INGAIN 0x007f /* Handshke rqd. */ -#define DSP_VC_ADD_AUDIO_BUFFER 0x0081 /* Handshke rqd. */ -#define DSP_VC_TEST_ASIC 0x00eb -#define DSP_VC_UPDATE_CLOCKS 0x00ef /* Handshke rqd. */ -#define DSP_VC_SET_LAYLA_SAMPLE_RATE 0x00f1 /* Handshke rqd. */ -#define DSP_VC_SET_GD_AUDIO_STATE 0x00f1 /* Handshke rqd. */ -#define DSP_VC_WRITE_CONTROL_REG 0x00f1 /* Handshke rqd. */ -#define DSP_VC_MIDI_WRITE 0x00f5 /* Handshke rqd. */ -#define DSP_VC_STOP_TRANSFER 0x00f7 /* Handshke rqd. */ -#define DSP_VC_UPDATE_FLAGS 0x00fd /* Handshke rqd. */ -#define DSP_VC_GO_COMATOSE 0x00f9 - -#else /* !DSP_56361 */ - -/* Vector commands for families that use either the 56301 or 56361 */ -#define DSP_VC_ACK_INT 0x80F5 -#define DSP_VC_SET_VMIXER_GAIN 0x00DB /* Handshke rqd. */ -#define DSP_VC_START_TRANSFER 0x00DD /* Handshke rqd. */ -#define DSP_VC_METERS_ON 0x00EF -#define DSP_VC_METERS_OFF 0x00F1 -#define DSP_VC_UPDATE_OUTVOL 0x00E3 /* Handshke rqd. */ -#define DSP_VC_UPDATE_INGAIN 0x00E5 /* Handshke rqd. */ -#define DSP_VC_ADD_AUDIO_BUFFER 0x00E1 /* Handshke rqd. */ -#define DSP_VC_TEST_ASIC 0x00ED -#define DSP_VC_UPDATE_CLOCKS 0x00E9 /* Handshke rqd. */ -#define DSP_VC_SET_LAYLA24_FREQUENCY_REG 0x00E9 /* Handshke rqd. */ -#define DSP_VC_SET_LAYLA_SAMPLE_RATE 0x00EB /* Handshke rqd. */ -#define DSP_VC_SET_GD_AUDIO_STATE 0x00EB /* Handshke rqd. */ -#define DSP_VC_WRITE_CONTROL_REG 0x00EB /* Handshke rqd. */ -#define DSP_VC_MIDI_WRITE 0x00E7 /* Handshke rqd. */ -#define DSP_VC_STOP_TRANSFER 0x00DF /* Handshke rqd. */ -#define DSP_VC_UPDATE_FLAGS 0x00FB /* Handshke rqd. */ -#define DSP_VC_GO_COMATOSE 0x00d9 - -#endif /* !DSP_56361 */ - - -/* - * - * Timeouts - * - */ - -#define HANDSHAKE_TIMEOUT 20000 /* send_vector command timeout (20ms) */ -#define VECTOR_BUSY_TIMEOUT 100000 /* 100ms */ -#define MIDI_OUT_DELAY_USEC 2000 /* How long to wait after MIDI fills up */ - - -/* - * - * Flags for .Flags field in the comm page - * - */ - -#define DSP_FLAG_MIDI_INPUT 0x0001 /* Enable MIDI input */ -#define DSP_FLAG_SPDIF_NONAUDIO 0x0002 /* Sets the "non-audio" bit - * in the S/PDIF out status - * bits. Clear this flag for - * audio data; - * set it for AC3 or WMA or - * some such */ -#define DSP_FLAG_PROFESSIONAL_SPDIF 0x0008 /* 1 Professional, 0 Consumer */ - - -/* - * - * Clock detect bits reported by the DSP for Gina20, Layla20, Darla24, and Mia - * - */ - -#define GLDM_CLOCK_DETECT_BIT_WORD 0x0002 -#define GLDM_CLOCK_DETECT_BIT_SUPER 0x0004 -#define GLDM_CLOCK_DETECT_BIT_SPDIF 0x0008 -#define GLDM_CLOCK_DETECT_BIT_ESYNC 0x0010 - - -/* - * - * Clock detect bits reported by the DSP for Gina24, Mona, and Layla24 - * - */ - -#define GML_CLOCK_DETECT_BIT_WORD96 0x0002 -#define GML_CLOCK_DETECT_BIT_WORD48 0x0004 -#define GML_CLOCK_DETECT_BIT_SPDIF48 0x0008 -#define GML_CLOCK_DETECT_BIT_SPDIF96 0x0010 -#define GML_CLOCK_DETECT_BIT_WORD (GML_CLOCK_DETECT_BIT_WORD96 | GML_CLOCK_DETECT_BIT_WORD48) -#define GML_CLOCK_DETECT_BIT_SPDIF (GML_CLOCK_DETECT_BIT_SPDIF48 | GML_CLOCK_DETECT_BIT_SPDIF96) -#define GML_CLOCK_DETECT_BIT_ESYNC 0x0020 -#define GML_CLOCK_DETECT_BIT_ADAT 0x0040 - - -/* - * - * Layla clock numbers to send to DSP - * - */ - -#define LAYLA20_CLOCK_INTERNAL 0 -#define LAYLA20_CLOCK_SPDIF 1 -#define LAYLA20_CLOCK_WORD 2 -#define LAYLA20_CLOCK_SUPER 3 - - -/* - * - * Gina/Darla clock states - * - */ - -#define GD_CLOCK_NOCHANGE 0 -#define GD_CLOCK_44 1 -#define GD_CLOCK_48 2 -#define GD_CLOCK_SPDIFIN 3 -#define GD_CLOCK_UNDEF 0xff - - -/* - * - * Gina/Darla S/PDIF status bits - * - */ - -#define GD_SPDIF_STATUS_NOCHANGE 0 -#define GD_SPDIF_STATUS_44 1 -#define GD_SPDIF_STATUS_48 2 -#define GD_SPDIF_STATUS_UNDEF 0xff - - -/* - * - * Layla20 output clocks - * - */ - -#define LAYLA20_OUTPUT_CLOCK_SUPER 0 -#define LAYLA20_OUTPUT_CLOCK_WORD 1 - - -/**************************************************************************** - - Magic constants for the Darla24 hardware - - ****************************************************************************/ - -#define GD24_96000 0x0 -#define GD24_48000 0x1 -#define GD24_44100 0x2 -#define GD24_32000 0x3 -#define GD24_22050 0x4 -#define GD24_16000 0x5 -#define GD24_11025 0x6 -#define GD24_8000 0x7 -#define GD24_88200 0x8 -#define GD24_EXT_SYNC 0x9 - - -/* - * - * Return values from the DSP when ASIC is loaded - * - */ - -#define ASIC_ALREADY_LOADED 0x1 -#define ASIC_NOT_LOADED 0x0 - - -/* - * - * DSP Audio formats - * - * These are the audio formats that the DSP can transfer - * via input and output pipes. LE means little-endian, - * BE means big-endian. - * - * DSP_AUDIOFORM_MS_8 - * - * 8-bit mono unsigned samples. For playback, - * mono data is duplicated out the left and right channels - * of the output bus. The "MS" part of the name - * means mono->stereo. - * - * DSP_AUDIOFORM_MS_16LE - * - * 16-bit signed little-endian mono samples. Playback works - * like the previous code. - * - * DSP_AUDIOFORM_MS_24LE - * - * 24-bit signed little-endian mono samples. Data is packed - * three bytes per sample; if you had two samples 0x112233 and 0x445566 - * they would be stored in memory like this: 33 22 11 66 55 44. - * - * DSP_AUDIOFORM_MS_32LE - * - * 24-bit signed little-endian mono samples in a 32-bit - * container. In other words, each sample is a 32-bit signed - * integer, where the actual audio data is left-justified - * in the 32 bits and only the 24 most significant bits are valid. - * - * DSP_AUDIOFORM_SS_8 - * DSP_AUDIOFORM_SS_16LE - * DSP_AUDIOFORM_SS_24LE - * DSP_AUDIOFORM_SS_32LE - * - * Like the previous ones, except now with stereo interleaved - * data. "SS" means stereo->stereo. - * - * DSP_AUDIOFORM_MM_32LE - * - * Similar to DSP_AUDIOFORM_MS_32LE, except that the mono - * data is not duplicated out both the left and right outputs. - * This mode is used by the ASIO driver. Here, "MM" means - * mono->mono. - * - * DSP_AUDIOFORM_MM_32BE - * - * Just like DSP_AUDIOFORM_MM_32LE, but now the data is - * in big-endian format. - * - */ - -#define DSP_AUDIOFORM_MS_8 0 /* 8 bit mono */ -#define DSP_AUDIOFORM_MS_16LE 1 /* 16 bit mono */ -#define DSP_AUDIOFORM_MS_24LE 2 /* 24 bit mono */ -#define DSP_AUDIOFORM_MS_32LE 3 /* 32 bit mono */ -#define DSP_AUDIOFORM_SS_8 4 /* 8 bit stereo */ -#define DSP_AUDIOFORM_SS_16LE 5 /* 16 bit stereo */ -#define DSP_AUDIOFORM_SS_24LE 6 /* 24 bit stereo */ -#define DSP_AUDIOFORM_SS_32LE 7 /* 32 bit stereo */ -#define DSP_AUDIOFORM_MM_32LE 8 /* 32 bit mono->mono little-endian */ -#define DSP_AUDIOFORM_MM_32BE 9 /* 32 bit mono->mono big-endian */ -#define DSP_AUDIOFORM_SS_32BE 10 /* 32 bit stereo big endian */ -#define DSP_AUDIOFORM_INVALID 0xFF /* Invalid audio format */ - - -/* - * - * Super-interleave is defined as interleaving by 4 or more. Darla20 and Gina20 - * do not support super interleave. - * - * 16 bit, 24 bit, and 32 bit little endian samples are supported for super - * interleave. The interleave factor must be even. 16 - way interleave is the - * current maximum, so you can interleave by 4, 6, 8, 10, 12, 14, and 16. - * - * The actual format code is derived by taking the define below and or-ing with - * the interleave factor. So, 32 bit interleave by 6 is 0x86 and - * 16 bit interleave by 16 is (0x40 | 0x10) = 0x50. - * - */ - -#define DSP_AUDIOFORM_SUPER_INTERLEAVE_16LE 0x40 -#define DSP_AUDIOFORM_SUPER_INTERLEAVE_24LE 0xc0 -#define DSP_AUDIOFORM_SUPER_INTERLEAVE_32LE 0x80 - - -/* - * - * Gina24, Mona, and Layla24 control register defines - * - */ - -#define GML_CONVERTER_ENABLE 0x0010 -#define GML_SPDIF_PRO_MODE 0x0020 /* Professional S/PDIF == 1, - consumer == 0 */ -#define GML_SPDIF_SAMPLE_RATE0 0x0040 -#define GML_SPDIF_SAMPLE_RATE1 0x0080 -#define GML_SPDIF_TWO_CHANNEL 0x0100 /* 1 == two channels, - 0 == one channel */ -#define GML_SPDIF_NOT_AUDIO 0x0200 -#define GML_SPDIF_COPY_PERMIT 0x0400 -#define GML_SPDIF_24_BIT 0x0800 /* 1 == 24 bit, 0 == 20 bit */ -#define GML_ADAT_MODE 0x1000 /* 1 == ADAT mode, 0 == S/PDIF mode */ -#define GML_SPDIF_OPTICAL_MODE 0x2000 /* 1 == optical mode, 0 == RCA mode */ -#define GML_SPDIF_CDROM_MODE 0x3000 /* 1 == CDROM mode, - * 0 == RCA or optical mode */ -#define GML_DOUBLE_SPEED_MODE 0x4000 /* 1 == double speed, - 0 == single speed */ - -#define GML_DIGITAL_IN_AUTO_MUTE 0x800000 - -#define GML_96KHZ (0x0 | GML_DOUBLE_SPEED_MODE) -#define GML_88KHZ (0x1 | GML_DOUBLE_SPEED_MODE) -#define GML_48KHZ 0x2 -#define GML_44KHZ 0x3 -#define GML_32KHZ 0x4 -#define GML_22KHZ 0x5 -#define GML_16KHZ 0x6 -#define GML_11KHZ 0x7 -#define GML_8KHZ 0x8 -#define GML_SPDIF_CLOCK 0x9 -#define GML_ADAT_CLOCK 0xA -#define GML_WORD_CLOCK 0xB -#define GML_ESYNC_CLOCK 0xC -#define GML_ESYNCx2_CLOCK 0xD - -#define GML_CLOCK_CLEAR_MASK 0xffffbff0 -#define GML_SPDIF_RATE_CLEAR_MASK (~(GML_SPDIF_SAMPLE_RATE0|GML_SPDIF_SAMPLE_RATE1)) -#define GML_DIGITAL_MODE_CLEAR_MASK 0xffffcfff -#define GML_SPDIF_FORMAT_CLEAR_MASK 0xfffff01f - - -/* - * - * Mia sample rate and clock setting constants - * - */ - -#define MIA_32000 0x0040 -#define MIA_44100 0x0042 -#define MIA_48000 0x0041 -#define MIA_88200 0x0142 -#define MIA_96000 0x0141 - -#define MIA_SPDIF 0x00000044 -#define MIA_SPDIF96 0x00000144 - -#define MIA_MIDI_REV 1 /* Must be Mia rev 1 for MIDI support */ - - -/* - * - * 3G register bits - * - */ - -#define E3G_CONVERTER_ENABLE 0x0010 -#define E3G_SPDIF_PRO_MODE 0x0020 /* Professional S/PDIF == 1, - consumer == 0 */ -#define E3G_SPDIF_SAMPLE_RATE0 0x0040 -#define E3G_SPDIF_SAMPLE_RATE1 0x0080 -#define E3G_SPDIF_TWO_CHANNEL 0x0100 /* 1 == two channels, - 0 == one channel */ -#define E3G_SPDIF_NOT_AUDIO 0x0200 -#define E3G_SPDIF_COPY_PERMIT 0x0400 -#define E3G_SPDIF_24_BIT 0x0800 /* 1 == 24 bit, 0 == 20 bit */ -#define E3G_DOUBLE_SPEED_MODE 0x4000 /* 1 == double speed, - 0 == single speed */ -#define E3G_PHANTOM_POWER 0x8000 /* 1 == phantom power on, - 0 == phantom power off */ - -#define E3G_96KHZ (0x0 | E3G_DOUBLE_SPEED_MODE) -#define E3G_88KHZ (0x1 | E3G_DOUBLE_SPEED_MODE) -#define E3G_48KHZ 0x2 -#define E3G_44KHZ 0x3 -#define E3G_32KHZ 0x4 -#define E3G_22KHZ 0x5 -#define E3G_16KHZ 0x6 -#define E3G_11KHZ 0x7 -#define E3G_8KHZ 0x8 -#define E3G_SPDIF_CLOCK 0x9 -#define E3G_ADAT_CLOCK 0xA -#define E3G_WORD_CLOCK 0xB -#define E3G_CONTINUOUS_CLOCK 0xE - -#define E3G_ADAT_MODE 0x1000 -#define E3G_SPDIF_OPTICAL_MODE 0x2000 - -#define E3G_CLOCK_CLEAR_MASK 0xbfffbff0 -#define E3G_DIGITAL_MODE_CLEAR_MASK 0xffffcfff -#define E3G_SPDIF_FORMAT_CLEAR_MASK 0xfffff01f - -/* Clock detect bits reported by the DSP */ -#define E3G_CLOCK_DETECT_BIT_WORD96 0x0001 -#define E3G_CLOCK_DETECT_BIT_WORD48 0x0002 -#define E3G_CLOCK_DETECT_BIT_SPDIF48 0x0004 -#define E3G_CLOCK_DETECT_BIT_ADAT 0x0004 -#define E3G_CLOCK_DETECT_BIT_SPDIF96 0x0008 -#define E3G_CLOCK_DETECT_BIT_WORD (E3G_CLOCK_DETECT_BIT_WORD96|E3G_CLOCK_DETECT_BIT_WORD48) -#define E3G_CLOCK_DETECT_BIT_SPDIF (E3G_CLOCK_DETECT_BIT_SPDIF48|E3G_CLOCK_DETECT_BIT_SPDIF96) - -/* Frequency control register */ -#define E3G_MAGIC_NUMBER 677376000 -#define E3G_FREQ_REG_DEFAULT (E3G_MAGIC_NUMBER / 48000 - 2) -#define E3G_FREQ_REG_MAX 0xffff - -/* 3G external box types */ -#define E3G_GINA3G_BOX_TYPE 0x00 -#define E3G_LAYLA3G_BOX_TYPE 0x10 -#define E3G_ASIC_NOT_LOADED 0xffff -#define E3G_BOX_TYPE_MASK 0xf0 - -#define EXT_3GBOX_NC 0x01 -#define EXT_3GBOX_NOT_SET 0x02 - - -/* - * - * Gina20 & Layla20 have input gain controls for the analog inputs; - * this is the magic number for the hardware that gives you 0 dB at -10. - * - */ - -#define GL20_INPUT_GAIN_MAGIC_NUMBER 0xC8 - - -/* - * - * Defines how much time must pass between DSP load attempts - * - */ - -#define DSP_LOAD_ATTEMPT_PERIOD 1000000L /* One second */ - - -/* - * - * Size of arrays for the comm page. MAX_PLAY_TAPS and MAX_REC_TAPS are - * no longer used, but the sizes must still be right for the DSP to see - * the comm page correctly. - * - */ - -#define MONITOR_ARRAY_SIZE 0x180 -#define VMIXER_ARRAY_SIZE 0x40 -#define MIDI_OUT_BUFFER_SIZE 32 -#define MIDI_IN_BUFFER_SIZE 256 -#define MAX_PLAY_TAPS 168 -#define MAX_REC_TAPS 192 -#define DSP_MIDI_OUT_FIFO_SIZE 64 - - -/* sg_entry is a single entry for the scatter-gather list. The array of struct -sg_entry struct is read by the DSP, so all values must be little-endian. */ - -#define MAX_SGLIST_ENTRIES 512 - -struct sg_entry { - u32 addr; - u32 size; -}; - - -/**************************************************************************** - - The comm page. This structure is read and written by the DSP; the - DSP code is a firm believer in the byte offsets written in the comments - at the end of each line. This structure should not be changed. - - Any reads from or writes to this structure should be in little-endian format. - - ****************************************************************************/ - -struct comm_page { /* Base Length*/ - u32 comm_size; /* size of this object 0x000 4 */ - u32 flags; /* See Appendix A below 0x004 4 */ - u32 unused; /* Unused entry 0x008 4 */ - u32 sample_rate; /* Card sample rate in Hz 0x00c 4 */ - volatile u32 handshake; /* DSP command handshake 0x010 4 */ - u32 cmd_start; /* Chs. to start mask 0x014 4 */ - u32 cmd_stop; /* Chs. to stop mask 0x018 4 */ - u32 cmd_reset; /* Chs. to reset mask 0x01c 4 */ - u16 audio_format[DSP_MAXPIPES]; /* Chs. audio format 0x020 32*2 */ - struct sg_entry sglist_addr[DSP_MAXPIPES]; - /* Chs. Physical sglist addrs 0x060 32*8 */ - volatile u32 position[DSP_MAXPIPES]; - /* Positions for ea. ch. 0x160 32*4 */ - volatile s8 vu_meter[DSP_MAXPIPES]; - /* VU meters 0x1e0 32*1 */ - volatile s8 peak_meter[DSP_MAXPIPES]; - /* Peak meters 0x200 32*1 */ - s8 line_out_level[DSP_MAXAUDIOOUTPUTS]; - /* Output gain 0x220 16*1 */ - s8 line_in_level[DSP_MAXAUDIOINPUTS]; - /* Input gain 0x230 16*1 */ - s8 monitors[MONITOR_ARRAY_SIZE]; - /* Monitor map 0x240 0x180 */ - u32 play_coeff[MAX_PLAY_TAPS]; - /* Gina/Darla play filters - obsolete 0x3c0 168*4 */ - u32 rec_coeff[MAX_REC_TAPS]; - /* Gina/Darla record filters - obsolete 0x660 192*4 */ - volatile u16 midi_input[MIDI_IN_BUFFER_SIZE]; - /* MIDI input data transfer buffer 0x960 256*2 */ - u8 gd_clock_state; /* Chg Gina/Darla clock state 0xb60 1 */ - u8 gd_spdif_status; /* Chg. Gina/Darla S/PDIF state 0xb61 1 */ - u8 gd_resampler_state; /* Should always be 3 0xb62 1 */ - u8 filler2; /* 0xb63 1 */ - u32 nominal_level_mask; /* -10 level enable mask 0xb64 4 */ - u16 input_clock; /* Chg. Input clock state 0xb68 2 */ - u16 output_clock; /* Chg. Output clock state 0xb6a 2 */ - volatile u32 status_clocks; - /* Current Input clock state 0xb6c 4 */ - u32 ext_box_status; /* External box status 0xb70 4 */ - u32 cmd_add_buffer; /* Pipes to add (obsolete) 0xb74 4 */ - volatile u32 midi_out_free_count; - /* # of bytes free in MIDI output FIFO 0xb78 4 */ - u32 unused2; /* Cyclic pipes 0xb7c 4 */ - u32 control_register; - /* Mona, Gina24, Layla24, 3G ctrl reg 0xb80 4 */ - u32 e3g_frq_register; /* 3G frequency register 0xb84 4 */ - u8 filler[24]; /* filler 0xb88 24*1 */ - s8 vmixer[VMIXER_ARRAY_SIZE]; - /* Vmixer levels 0xba0 64*1 */ - u8 midi_output[MIDI_OUT_BUFFER_SIZE]; - /* MIDI output data 0xbe0 32*1 */ -}; - -#endif /* _ECHO_DSP_ */ diff --git a/sound/pci/echoaudio/echoaudio_gml.c b/sound/pci/echoaudio/echoaudio_gml.c deleted file mode 100644 index 3aa37e76e..000000000 --- a/sound/pci/echoaudio/echoaudio_gml.c +++ /dev/null @@ -1,198 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -/* These functions are common for Gina24, Layla24 and Mona cards */ - - -/* ASIC status check - some cards have one or two ASICs that need to be -loaded. Once that load is complete, this function is called to see if -the load was successful. -If this load fails, it does not necessarily mean that the hardware is -defective - the external box may be disconnected or turned off. */ -static int check_asic_status(struct echoaudio *chip) -{ - u32 asic_status; - - send_vector(chip, DSP_VC_TEST_ASIC); - - /* The DSP will return a value to indicate whether or not the - ASIC is currently loaded */ - if (read_dsp(chip, &asic_status) < 0) { - DE_INIT(("check_asic_status: failed on read_dsp\n")); - chip->asic_loaded = FALSE; - return -EIO; - } - - chip->asic_loaded = (asic_status == ASIC_ALREADY_LOADED); - return chip->asic_loaded ? 0 : -EIO; -} - - - -/* Most configuration of Gina24, Layla24, or Mona is accomplished by writing -the control register. write_control_reg sends the new control register -value to the DSP. */ -static int write_control_reg(struct echoaudio *chip, u32 value, char force) -{ - /* Handle the digital input auto-mute */ - if (chip->digital_in_automute) - value |= GML_DIGITAL_IN_AUTO_MUTE; - else - value &= ~GML_DIGITAL_IN_AUTO_MUTE; - - DE_ACT(("write_control_reg: 0x%x\n", value)); - - /* Write the control register */ - value = cpu_to_le32(value); - if (value != chip->comm_page->control_register || force) { - if (wait_handshake(chip)) - return -EIO; - chip->comm_page->control_register = value; - clear_handshake(chip); - return send_vector(chip, DSP_VC_WRITE_CONTROL_REG); - } - return 0; -} - - - -/* Gina24, Layla24, and Mona support digital input auto-mute. If the digital -input auto-mute is enabled, the DSP will only enable the digital inputs if -the card is syncing to a valid clock on the ADAT or S/PDIF inputs. -If the auto-mute is disabled, the digital inputs are enabled regardless of -what the input clock is set or what is connected. */ -static int set_input_auto_mute(struct echoaudio *chip, int automute) -{ - DE_ACT(("set_input_auto_mute %d\n", automute)); - - chip->digital_in_automute = automute; - - /* Re-set the input clock to the current value - indirectly causes - the auto-mute flag to be sent to the DSP */ - return set_input_clock(chip, chip->input_clock); -} - - - -/* S/PDIF coax / S/PDIF optical / ADAT - switch */ -static int set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u8 previous_mode; - int err, i, o; - - if (chip->bad_board) - return -EIO; - - /* All audio channels must be closed before changing the digital mode */ - snd_assert(!chip->pipe_alloc_mask, return -EAGAIN); - - snd_assert(chip->digital_modes & (1 << mode), return -EINVAL); - - previous_mode = chip->digital_mode; - err = dsp_set_digital_mode(chip, mode); - - /* If we successfully changed the digital mode from or to ADAT, - then make sure all output, input and monitor levels are - updated by the DSP comm object. */ - if (err >= 0 && previous_mode != mode && - (previous_mode == DIGITAL_MODE_ADAT || mode == DIGITAL_MODE_ADAT)) { - spin_lock_irq(&chip->lock); - for (o = 0; o < num_busses_out(chip); o++) - for (i = 0; i < num_busses_in(chip); i++) - set_monitor_gain(chip, o, i, - chip->monitor_gain[o][i]); - -#ifdef ECHOCARD_HAS_INPUT_GAIN - for (i = 0; i < num_busses_in(chip); i++) - set_input_gain(chip, i, chip->input_gain[i]); - update_input_line_level(chip); -#endif - - for (o = 0; o < num_busses_out(chip); o++) - set_output_gain(chip, o, chip->output_gain[o]); - update_output_line_level(chip); - spin_unlock_irq(&chip->lock); - } - - return err; -} - - - -/* Set the S/PDIF output format */ -static int set_professional_spdif(struct echoaudio *chip, char prof) -{ - u32 control_reg; - int err; - - /* Clear the current S/PDIF flags */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_SPDIF_FORMAT_CLEAR_MASK; - - /* Set the new S/PDIF flags depending on the mode */ - control_reg |= GML_SPDIF_TWO_CHANNEL | GML_SPDIF_24_BIT | - GML_SPDIF_COPY_PERMIT; - if (prof) { - /* Professional mode */ - control_reg |= GML_SPDIF_PRO_MODE; - - switch (chip->sample_rate) { - case 32000: - control_reg |= GML_SPDIF_SAMPLE_RATE0 | - GML_SPDIF_SAMPLE_RATE1; - break; - case 44100: - control_reg |= GML_SPDIF_SAMPLE_RATE0; - break; - case 48000: - control_reg |= GML_SPDIF_SAMPLE_RATE1; - break; - } - } else { - /* Consumer mode */ - switch (chip->sample_rate) { - case 32000: - control_reg |= GML_SPDIF_SAMPLE_RATE0 | - GML_SPDIF_SAMPLE_RATE1; - break; - case 48000: - control_reg |= GML_SPDIF_SAMPLE_RATE1; - break; - } - } - - if ((err = write_control_reg(chip, control_reg, FALSE))) - return err; - chip->professional_spdif = prof; - DE_ACT(("set_professional_spdif to %s\n", - prof ? "Professional" : "Consumer")); - return 0; -} diff --git a/sound/pci/echoaudio/gina20.c b/sound/pci/echoaudio/gina20.c deleted file mode 100644 index 29d6d12f8..000000000 --- a/sound/pci/echoaudio/gina20.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHOGALS_FAMILY -#define ECHOCARD_GINA20 -#define ECHOCARD_NAME "Gina20" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_INPUT_GAIN -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT FALSE - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 2 */ -#define PX_ANALOG_IN 10 /* 2 */ -#define PX_DIGITAL_IN 12 /* 2 */ -#define PX_NUM 14 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 8 */ -#define BX_DIGITAL_OUT 8 /* 2 */ -#define BX_ANALOG_IN 10 /* 2 */ -#define BX_DIGITAL_IN 12 /* 2 */ -#define BX_NUM 14 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_GINA20_DSP 0 - -static const struct firmware card_fw[] = { - {0, "gina20_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0020, 0, 0, 0}, /* DSP 56301 Gina20 rev.0 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, - .rate_min = 44100, - .rate_max = 48000, - .channels_min = 1, - .channels_max = 2, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "gina20_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" diff --git a/sound/pci/echoaudio/gina20_dsp.c b/sound/pci/echoaudio/gina20_dsp.c deleted file mode 100644 index 2757c8960..000000000 --- a/sound/pci/echoaudio/gina20_dsp.c +++ /dev/null @@ -1,215 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int update_flags(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Gina20\n")); - snd_assert((subdevice_id & 0xfff0) == GINA20, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_GINA20_DSP]; - chip->spdif_status = GD_SPDIF_STATUS_UNDEF; - chip->clock_state = GD_CLOCK_UNDEF; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | - ECHO_CLOCK_BIT_SPDIF; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - return clock_bits; -} - - - -/* The Gina20 has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u8 clock_state, spdif_status; - - if (wait_handshake(chip)) - return -EIO; - - switch (rate) { - case 44100: - clock_state = GD_CLOCK_44; - spdif_status = GD_SPDIF_STATUS_44; - break; - case 48000: - clock_state = GD_CLOCK_48; - spdif_status = GD_SPDIF_STATUS_48; - break; - default: - clock_state = GD_CLOCK_NOCHANGE; - spdif_status = GD_SPDIF_STATUS_NOCHANGE; - break; - } - - if (chip->clock_state == clock_state) - clock_state = GD_CLOCK_NOCHANGE; - if (spdif_status == chip->spdif_status) - spdif_status = GD_SPDIF_STATUS_NOCHANGE; - - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->comm_page->gd_clock_state = clock_state; - chip->comm_page->gd_spdif_status = spdif_status; - chip->comm_page->gd_resampler_state = 3; /* magic number - should always be 3 */ - - /* Save the new audio state if it changed */ - if (clock_state != GD_CLOCK_NOCHANGE) - chip->clock_state = clock_state; - if (spdif_status != GD_SPDIF_STATUS_NOCHANGE) - chip->spdif_status = spdif_status; - chip->sample_rate = rate; - - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_GD_AUDIO_STATE); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - DE_ACT(("set_input_clock:\n")); - - switch (clock) { - case ECHO_CLOCK_INTERNAL: - /* Reset the audio state to unknown (just in case) */ - chip->clock_state = GD_CLOCK_UNDEF; - chip->spdif_status = GD_SPDIF_STATUS_UNDEF; - set_sample_rate(chip, chip->sample_rate); - chip->input_clock = clock; - DE_ACT(("Set Gina clock to INTERNAL\n")); - break; - case ECHO_CLOCK_SPDIF: - chip->comm_page->gd_clock_state = GD_CLOCK_SPDIFIN; - chip->comm_page->gd_spdif_status = GD_SPDIF_STATUS_NOCHANGE; - clear_handshake(chip); - send_vector(chip, DSP_VC_SET_GD_AUDIO_STATE); - chip->clock_state = GD_CLOCK_SPDIFIN; - DE_ACT(("Set Gina20 clock to SPDIF\n")); - chip->input_clock = clock; - break; - default: - return -EINVAL; - } - - return 0; -} - - - -/* Set input bus gain (one unit is 0.5dB !) */ -static int set_input_gain(struct echoaudio *chip, u16 input, int gain) -{ - snd_assert(input < num_busses_in(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->input_gain[input] = gain; - gain += GL20_INPUT_GAIN_MAGIC_NUMBER; - chip->comm_page->line_in_level[input] = gain; - return 0; -} - - - -/* Tell the DSP to reread the flags from the comm page */ -static int update_flags(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_FLAGS); -} - - - -static int set_professional_spdif(struct echoaudio *chip, char prof) -{ - DE_ACT(("set_professional_spdif %d\n", prof)); - if (prof) - chip->comm_page->flags |= - __constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - else - chip->comm_page->flags &= - ~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - chip->professional_spdif = prof; - return update_flags(chip); -} diff --git a/sound/pci/echoaudio/gina24.c b/sound/pci/echoaudio/gina24.c deleted file mode 100644 index e464d720d..000000000 --- a/sound/pci/echoaudio/gina24.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHO24_FAMILY -#define ECHOCARD_GINA24 -#define ECHOCARD_NAME "Gina24" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_ASIC -#define ECHOCARD_HAS_INPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE -#define ECHOCARD_HAS_DIGITAL_MODE_SWITCH -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT 6 -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 8 */ -#define PX_ANALOG_IN 16 /* 2 */ -#define PX_DIGITAL_IN 18 /* 8 */ -#define PX_NUM 26 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 8 */ -#define BX_DIGITAL_OUT 8 /* 8 */ -#define BX_ANALOG_IN 16 /* 2 */ -#define BX_DIGITAL_IN 18 /* 8 */ -#define BX_NUM 26 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_GINA24_301_DSP 1 -#define FW_GINA24_361_DSP 2 -#define FW_GINA24_301_ASIC 3 -#define FW_GINA24_361_ASIC 4 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "gina24_301_dsp.fw"}, - {0, "gina24_361_dsp.fw"}, - {0, "gina24_301_asic.fw"}, - {0, "gina24_361_asic.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0050, 0, 0, 0}, /* DSP 56301 Gina24 rev.0 */ - {0x1057, 0x1801, 0xECC0, 0x0051, 0, 0, 0}, /* DSP 56301 Gina24 rev.1 */ - {0x1057, 0x3410, 0xECC0, 0x0050, 0, 0, 0}, /* DSP 56361 Gina24 rev.0 */ - {0x1057, 0x3410, 0xECC0, 0x0051, 0, 0, 0}, /* DSP 56361 Gina24 rev.1 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_8000_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 8000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. - 220 ~= (512 - 1 - (BUFFER_BYTES_MAX / PAGE_SIZE)) / 2 */ -}; - -#include "gina24_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio_gml.c" -#include "echoaudio.c" diff --git a/sound/pci/echoaudio/gina24_dsp.c b/sound/pci/echoaudio/gina24_dsp.c deleted file mode 100644 index 144fc567b..000000000 --- a/sound/pci/echoaudio/gina24_dsp.c +++ /dev/null @@ -1,346 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int write_control_reg(struct echoaudio *chip, u32 value, char force); -static int set_input_clock(struct echoaudio *chip, u16 clock); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int set_digital_mode(struct echoaudio *chip, u8 mode); -static int load_asic_generic(struct echoaudio *chip, u32 cmd, - const struct firmware *asic); -static int check_asic_status(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Gina24\n")); - snd_assert((subdevice_id & 0xfff0) == GINA24, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->input_clock_types = - ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_ESYNC | ECHO_CLOCK_BIT_ESYNC96 | - ECHO_CLOCK_BIT_ADAT; - chip->professional_spdif = FALSE; - chip->digital_in_automute = TRUE; - chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; - - /* Gina24 comes in both '301 and '361 flavors */ - if (chip->device_id == DEVICE_ID_56361) { - chip->dsp_code_to_load = &card_fw[FW_GINA24_361_DSP]; - chip->digital_modes = - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | - ECHOCAPS_HAS_DIGITAL_MODE_ADAT; - } else { - chip->dsp_code_to_load = &card_fw[FW_GINA24_301_DSP]; - chip->digital_modes = - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | - ECHOCAPS_HAS_DIGITAL_MODE_ADAT | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_CDROM; - } - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); - snd_assert(err >= 0, return err); - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_ADAT) - clock_bits |= ECHO_CLOCK_BIT_ADAT; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_ESYNC) - clock_bits |= ECHO_CLOCK_BIT_ESYNC | ECHO_CLOCK_BIT_ESYNC96; - - return clock_bits; -} - - - -/* Gina24 has an ASIC on the PCI card which must be loaded for anything -interesting to happen. */ -static int load_asic(struct echoaudio *chip) -{ - u32 control_reg; - int err; - const struct firmware *fw; - - if (chip->asic_loaded) - return 1; - - /* Give the DSP a few milliseconds to settle down */ - mdelay(10); - - /* Pick the correct ASIC for '301 or '361 Gina24 */ - if (chip->device_id == DEVICE_ID_56361) - fw = &card_fw[FW_GINA24_361_ASIC]; - else - fw = &card_fw[FW_GINA24_301_ASIC]; - - if ((err = load_asic_generic(chip, DSP_FNC_LOAD_GINA24_ASIC, fw)) < 0) - return err; - - chip->asic_code = fw; - - /* Now give the new ASIC a little time to set up */ - mdelay(10); - /* See if it worked */ - err = check_asic_status(chip); - - /* Set up the control register if the load succeeded - - 48 kHz, internal clock, S/PDIF RCA mode */ - if (!err) { - control_reg = GML_CONVERTER_ENABLE | GML_48KHZ; - err = write_control_reg(chip, control_reg, TRUE); - } - DE_INIT(("load_asic() done\n")); - return err; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg, clock; - - snd_assert(rate < 50000 || chip->digital_mode != DIGITAL_MODE_ADAT, - return -EINVAL); - - /* Only set the clock for internal mode. */ - if (chip->input_clock != ECHO_CLOCK_INTERNAL) { - DE_ACT(("set_sample_rate: Cannot set sample rate - " - "clock not set to CLK_CLOCKININTERNAL\n")); - /* Save the rate anyhow */ - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->sample_rate = rate; - return 0; - } - - clock = 0; - - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_CLOCK_CLEAR_MASK & GML_SPDIF_RATE_CLEAR_MASK; - - switch (rate) { - case 96000: - clock = GML_96KHZ; - break; - case 88200: - clock = GML_88KHZ; - break; - case 48000: - clock = GML_48KHZ | GML_SPDIF_SAMPLE_RATE1; - break; - case 44100: - clock = GML_44KHZ; - /* Professional mode ? */ - if (control_reg & GML_SPDIF_PRO_MODE) - clock |= GML_SPDIF_SAMPLE_RATE0; - break; - case 32000: - clock = GML_32KHZ | GML_SPDIF_SAMPLE_RATE0 | - GML_SPDIF_SAMPLE_RATE1; - break; - case 22050: - clock = GML_22KHZ; - break; - case 16000: - clock = GML_16KHZ; - break; - case 11025: - clock = GML_11KHZ; - break; - case 8000: - clock = GML_8KHZ; - break; - default: - DE_ACT(("set_sample_rate: %d invalid!\n", rate)); - return -EINVAL; - } - - control_reg |= clock; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->sample_rate = rate; - DE_ACT(("set_sample_rate: %d clock %d\n", rate, clock)); - - return write_control_reg(chip, control_reg, FALSE); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - u32 control_reg, clocks_from_dsp; - - DE_ACT(("set_input_clock:\n")); - - /* Mask off the clock select bits */ - control_reg = le32_to_cpu(chip->comm_page->control_register) & - GML_CLOCK_CLEAR_MASK; - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - switch (clock) { - case ECHO_CLOCK_INTERNAL: - DE_ACT(("Set Gina24 clock to INTERNAL\n")); - chip->input_clock = ECHO_CLOCK_INTERNAL; - return set_sample_rate(chip, chip->sample_rate); - case ECHO_CLOCK_SPDIF: - if (chip->digital_mode == DIGITAL_MODE_ADAT) - return -EAGAIN; - DE_ACT(("Set Gina24 clock to SPDIF\n")); - control_reg |= GML_SPDIF_CLOCK; - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_SPDIF96) - control_reg |= GML_DOUBLE_SPEED_MODE; - else - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_ADAT: - if (chip->digital_mode != DIGITAL_MODE_ADAT) - return -EAGAIN; - DE_ACT(("Set Gina24 clock to ADAT\n")); - control_reg |= GML_ADAT_CLOCK; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_ESYNC: - DE_ACT(("Set Gina24 clock to ESYNC\n")); - control_reg |= GML_ESYNC_CLOCK; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_ESYNC96: - DE_ACT(("Set Gina24 clock to ESYNC96\n")); - control_reg |= GML_ESYNC_CLOCK | GML_DOUBLE_SPEED_MODE; - break; - default: - DE_ACT(("Input clock 0x%x not supported for Gina24\n", clock)); - return -EINVAL; - } - - chip->input_clock = clock; - return write_control_reg(chip, control_reg, TRUE); -} - - - -static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u32 control_reg; - int err, incompatible_clock; - - /* Set clock to "internal" if it's not compatible with the new mode */ - incompatible_clock = FALSE; - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - case DIGITAL_MODE_SPDIF_CDROM: - case DIGITAL_MODE_SPDIF_RCA: - if (chip->input_clock == ECHO_CLOCK_ADAT) - incompatible_clock = TRUE; - break; - case DIGITAL_MODE_ADAT: - if (chip->input_clock == ECHO_CLOCK_SPDIF) - incompatible_clock = TRUE; - break; - default: - DE_ACT(("Digital mode not supported: %d\n", mode)); - return -EINVAL; - } - - spin_lock_irq(&chip->lock); - - if (incompatible_clock) { /* Switch to 48KHz, internal */ - chip->sample_rate = 48000; - set_input_clock(chip, ECHO_CLOCK_INTERNAL); - } - - /* Clear the current digital mode */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_DIGITAL_MODE_CLEAR_MASK; - - /* Tweak the control reg */ - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - control_reg |= GML_SPDIF_OPTICAL_MODE; - break; - case DIGITAL_MODE_SPDIF_CDROM: - /* '361 Gina24 cards do not have the S/PDIF CD-ROM mode */ - if (chip->device_id == DEVICE_ID_56301) - control_reg |= GML_SPDIF_CDROM_MODE; - break; - case DIGITAL_MODE_SPDIF_RCA: - /* GML_SPDIF_OPTICAL_MODE bit cleared */ - break; - case DIGITAL_MODE_ADAT: - control_reg |= GML_ADAT_MODE; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - } - - err = write_control_reg(chip, control_reg, TRUE); - spin_unlock_irq(&chip->lock); - if (err < 0) - return err; - chip->digital_mode = mode; - - DE_ACT(("set_digital_mode to %d\n", chip->digital_mode)); - return incompatible_clock; -} diff --git a/sound/pci/echoaudio/indigo.c b/sound/pci/echoaudio/indigo.c deleted file mode 100644 index bfd246709..000000000 --- a/sound/pci/echoaudio/indigo.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define INDIGO_FAMILY -#define ECHOCARD_INDIGO -#define ECHOCARD_NAME "Indigo" -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_VMIXER -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 0 */ -#define PX_DIGITAL_IN 8 /* 0 */ -#define PX_NUM 8 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 2 */ -#define BX_DIGITAL_OUT 2 /* 0 */ -#define BX_ANALOG_IN 2 /* 0 */ -#define BX_DIGITAL_IN 2 /* 0 */ -#define BX_NUM 2 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_INDIGO_DSP 1 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "indigo_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x0090, 0, 0, 0}, /* Indigo */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 32000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, -}; - -#include "indigo_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" - diff --git a/sound/pci/echoaudio/indigo_dsp.c b/sound/pci/echoaudio/indigo_dsp.c deleted file mode 100644 index d6ac77346..000000000 --- a/sound/pci/echoaudio/indigo_dsp.c +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain); -static int update_vmixer_level(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Indigo\n")); - snd_assert((subdevice_id & 0xfff0) == INDIGO, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_INDIGO_DSP]; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - /* Default routing of the virtual channels: all vchannels are routed - to the stereo output */ - set_vmixer_gain(chip, 0, 0, 0); - set_vmixer_gain(chip, 1, 1, 0); - set_vmixer_gain(chip, 0, 2, 0); - set_vmixer_gain(chip, 1, 3, 0); - set_vmixer_gain(chip, 0, 4, 0); - set_vmixer_gain(chip, 1, 5, 0); - set_vmixer_gain(chip, 0, 6, 0); - set_vmixer_gain(chip, 1, 7, 0); - err = update_vmixer_level(chip); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - return ECHO_CLOCK_BIT_INTERNAL; -} - - - -/* The Indigo has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg; - - switch (rate) { - case 96000: - control_reg = MIA_96000; - break; - case 88200: - control_reg = MIA_88200; - break; - case 48000: - control_reg = MIA_48000; - break; - case 44100: - control_reg = MIA_44100; - break; - case 32000: - control_reg = MIA_32000; - break; - default: - DE_ACT(("set_sample_rate: %d invalid!\n", rate)); - return -EINVAL; - } - - /* Set the control register if it has changed */ - if (control_reg != le32_to_cpu(chip->comm_page->control_register)) { - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->comm_page->control_register = cpu_to_le32(control_reg); - chip->sample_rate = rate; - - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_CLOCKS); - } - return 0; -} - - - -/* This function routes the sound from a virtual channel to a real output */ -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain) -{ - int index; - - snd_assert(pipe < num_pipes_out(chip) && - output < num_busses_out(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->vmixer_gain[output][pipe] = gain; - index = output * num_pipes_out(chip) + pipe; - chip->comm_page->vmixer[index] = gain; - - DE_ACT(("set_vmixer_gain: pipe %d, out %d = %d\n", pipe, output, gain)); - return 0; -} - - - -/* Tell the DSP to read and update virtual mixer levels in comm page. */ -static int update_vmixer_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); -} - diff --git a/sound/pci/echoaudio/indigodj.c b/sound/pci/echoaudio/indigodj.c deleted file mode 100644 index 8ed7ff1fd..000000000 --- a/sound/pci/echoaudio/indigodj.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define INDIGO_FAMILY -#define ECHOCARD_INDIGO_DJ -#define ECHOCARD_NAME "Indigo DJ" -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_VMIXER -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 0 */ -#define PX_DIGITAL_IN 8 /* 0 */ -#define PX_NUM 8 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 4 */ -#define BX_DIGITAL_OUT 4 /* 0 */ -#define BX_ANALOG_IN 4 /* 0 */ -#define BX_DIGITAL_IN 4 /* 0 */ -#define BX_NUM 4 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_INDIGO_DJ_DSP 1 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "indigo_dj_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x00B0, 0, 0, 0}, /* Indigo DJ*/ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 32000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 4, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, -}; - -#include "indigodj_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" - diff --git a/sound/pci/echoaudio/indigodj_dsp.c b/sound/pci/echoaudio/indigodj_dsp.c deleted file mode 100644 index 500e150b4..000000000 --- a/sound/pci/echoaudio/indigodj_dsp.c +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain); -static int update_vmixer_level(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Indigo DJ\n")); - snd_assert((subdevice_id & 0xfff0) == INDIGO_DJ, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_INDIGO_DJ_DSP]; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - /* Default routing of the virtual channels: vchannels 0-3 and - vchannels 4-7 are routed to real channels 0-4 */ - set_vmixer_gain(chip, 0, 0, 0); - set_vmixer_gain(chip, 1, 1, 0); - set_vmixer_gain(chip, 2, 2, 0); - set_vmixer_gain(chip, 3, 3, 0); - set_vmixer_gain(chip, 0, 4, 0); - set_vmixer_gain(chip, 1, 5, 0); - set_vmixer_gain(chip, 2, 6, 0); - set_vmixer_gain(chip, 3, 7, 0); - err = update_vmixer_level(chip); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - return ECHO_CLOCK_BIT_INTERNAL; -} - - - -/* The IndigoDJ has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg; - - switch (rate) { - case 96000: - control_reg = MIA_96000; - break; - case 88200: - control_reg = MIA_88200; - break; - case 48000: - control_reg = MIA_48000; - break; - case 44100: - control_reg = MIA_44100; - break; - case 32000: - control_reg = MIA_32000; - break; - default: - DE_ACT(("set_sample_rate: %d invalid!\n", rate)); - return -EINVAL; - } - - /* Set the control register if it has changed */ - if (control_reg != le32_to_cpu(chip->comm_page->control_register)) { - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->comm_page->control_register = cpu_to_le32(control_reg); - chip->sample_rate = rate; - - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_CLOCKS); - } - return 0; -} - - - -/* This function routes the sound from a virtual channel to a real output */ -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain) -{ - int index; - - snd_assert(pipe < num_pipes_out(chip) && - output < num_busses_out(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->vmixer_gain[output][pipe] = gain; - index = output * num_pipes_out(chip) + pipe; - chip->comm_page->vmixer[index] = gain; - - DE_ACT(("set_vmixer_gain: pipe %d, out %d = %d\n", pipe, output, gain)); - return 0; -} - - - -/* Tell the DSP to read and update virtual mixer levels in comm page. */ -static int update_vmixer_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); -} - diff --git a/sound/pci/echoaudio/indigoio.c b/sound/pci/echoaudio/indigoio.c deleted file mode 100644 index a8788e959..000000000 --- a/sound/pci/echoaudio/indigoio.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define INDIGO_FAMILY -#define ECHOCARD_INDIGO_IO -#define ECHOCARD_NAME "Indigo IO" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_VMIXER -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 2 */ -#define PX_DIGITAL_IN 10 /* 0 */ -#define PX_NUM 10 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 2 */ -#define BX_DIGITAL_OUT 2 /* 0 */ -#define BX_ANALOG_IN 2 /* 2 */ -#define BX_DIGITAL_IN 4 /* 0 */ -#define BX_NUM 4 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_INDIGO_IO_DSP 1 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "indigo_io_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x00A0, 0, 0, 0}, /* Indigo IO*/ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 32000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, -}; - -#include "indigoio_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" - diff --git a/sound/pci/echoaudio/indigoio_dsp.c b/sound/pci/echoaudio/indigoio_dsp.c deleted file mode 100644 index f3ad13d06..000000000 --- a/sound/pci/echoaudio/indigoio_dsp.c +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain); -static int update_vmixer_level(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Indigo IO\n")); - snd_assert((subdevice_id & 0xfff0) == INDIGO_IO, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_INDIGO_IO_DSP]; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - /* Default routing of the virtual channels: all vchannels are routed - to the stereo output */ - set_vmixer_gain(chip, 0, 0, 0); - set_vmixer_gain(chip, 1, 1, 0); - set_vmixer_gain(chip, 0, 2, 0); - set_vmixer_gain(chip, 1, 3, 0); - set_vmixer_gain(chip, 0, 4, 0); - set_vmixer_gain(chip, 1, 5, 0); - set_vmixer_gain(chip, 0, 6, 0); - set_vmixer_gain(chip, 1, 7, 0); - err = update_vmixer_level(chip); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - return ECHO_CLOCK_BIT_INTERNAL; -} - - - -/* The IndigoIO has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - if (wait_handshake(chip)) - return -EIO; - - chip->sample_rate = rate; - chip->comm_page->sample_rate = cpu_to_le32(rate); - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_CLOCKS); -} - - - -/* This function routes the sound from a virtual channel to a real output */ -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain) -{ - int index; - - snd_assert(pipe < num_pipes_out(chip) && - output < num_busses_out(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->vmixer_gain[output][pipe] = gain; - index = output * num_pipes_out(chip) + pipe; - chip->comm_page->vmixer[index] = gain; - - DE_ACT(("set_vmixer_gain: pipe %d, out %d = %d\n", pipe, output, gain)); - return 0; -} - - - -/* Tell the DSP to read and update virtual mixer levels in comm page. */ -static int update_vmixer_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); -} - diff --git a/sound/pci/echoaudio/layla20.c b/sound/pci/echoaudio/layla20.c deleted file mode 100644 index e503d74b3..000000000 --- a/sound/pci/echoaudio/layla20.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHOGALS_FAMILY -#define ECHOCARD_LAYLA20 -#define ECHOCARD_NAME "Layla20" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_ASIC -#define ECHOCARD_HAS_INPUT_GAIN -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT FALSE -#define ECHOCARD_HAS_OUTPUT_CLOCK_SWITCH -#define ECHOCARD_HAS_MIDI - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 10 */ -#define PX_DIGITAL_OUT 10 /* 2 */ -#define PX_ANALOG_IN 12 /* 8 */ -#define PX_DIGITAL_IN 20 /* 2 */ -#define PX_NUM 22 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 10 */ -#define BX_DIGITAL_OUT 10 /* 2 */ -#define BX_ANALOG_IN 12 /* 8 */ -#define BX_DIGITAL_IN 20 /* 2 */ -#define BX_NUM 22 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_LAYLA20_DSP 0 -#define FW_LAYLA20_ASIC 1 - -static const struct firmware card_fw[] = { - {0, "layla20_dsp.fw"}, - {0, "layla20_asic.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0030, 0, 0, 0}, /* DSP 56301 Layla20 rev.0 */ - {0x1057, 0x1801, 0xECC0, 0x0031, 0, 0, 0}, /* DSP 56301 Layla20 rev.1 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_8000_48000 | SNDRV_PCM_RATE_CONTINUOUS, - .rate_min = 8000, - .rate_max = 50000, - .channels_min = 1, - .channels_max = 10, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - -#include "layla20_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" -#include "midi.c" diff --git a/sound/pci/echoaudio/layla20_dsp.c b/sound/pci/echoaudio/layla20_dsp.c deleted file mode 100644 index 990c9a60a..000000000 --- a/sound/pci/echoaudio/layla20_dsp.c +++ /dev/null @@ -1,290 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int read_dsp(struct echoaudio *chip, u32 *data); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int load_asic_generic(struct echoaudio *chip, u32 cmd, - const struct firmware *asic); -static int check_asic_status(struct echoaudio *chip); -static int update_flags(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Layla20\n")); - snd_assert((subdevice_id & 0xfff0) == LAYLA20, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->has_midi = TRUE; - chip->dsp_code_to_load = &card_fw[FW_LAYLA20_DSP]; - chip->input_clock_types = - ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_WORD | ECHO_CLOCK_BIT_SUPER; - chip->output_clock_types = - ECHO_CLOCK_BIT_WORD | ECHO_CLOCK_BIT_SUPER; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_WORD) { - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_SUPER) - clock_bits |= ECHO_CLOCK_BIT_SUPER; - else - clock_bits |= ECHO_CLOCK_BIT_WORD; - } - - return clock_bits; -} - - - -/* ASIC status check - some cards have one or two ASICs that need to be -loaded. Once that load is complete, this function is called to see if -the load was successful. -If this load fails, it does not necessarily mean that the hardware is -defective - the external box may be disconnected or turned off. -This routine sometimes fails for Layla20; for Layla20, the loop runs -5 times and succeeds if it wins on three of the loops. */ -static int check_asic_status(struct echoaudio *chip) -{ - u32 asic_status; - int goodcnt, i; - - chip->asic_loaded = FALSE; - for (i = goodcnt = 0; i < 5; i++) { - send_vector(chip, DSP_VC_TEST_ASIC); - - /* The DSP will return a value to indicate whether or not - the ASIC is currently loaded */ - if (read_dsp(chip, &asic_status) < 0) { - DE_ACT(("check_asic_status: failed on read_dsp\n")); - return -EIO; - } - - if (asic_status == ASIC_ALREADY_LOADED) { - if (++goodcnt == 3) { - chip->asic_loaded = TRUE; - return 0; - } - } - } - return -EIO; -} - - - -/* Layla20 has an ASIC in the external box */ -static int load_asic(struct echoaudio *chip) -{ - int err; - - if (chip->asic_loaded) - return 0; - - err = load_asic_generic(chip, DSP_FNC_LOAD_LAYLA_ASIC, - &card_fw[FW_LAYLA20_ASIC]); - if (err < 0) - return err; - - /* Check if ASIC is alive and well. */ - return check_asic_status(chip); -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - snd_assert(rate >= 8000 && rate <= 50000, return -EINVAL); - - /* Only set the clock for internal mode. Do not return failure, - simply treat it as a non-event. */ - if (chip->input_clock != ECHO_CLOCK_INTERNAL) { - DE_ACT(("set_sample_rate: Cannot set sample rate - " - "clock not set to CLK_CLOCKININTERNAL\n")); - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->sample_rate = rate; - return 0; - } - - if (wait_handshake(chip)) - return -EIO; - - DE_ACT(("set_sample_rate(%d)\n", rate)); - chip->sample_rate = rate; - chip->comm_page->sample_rate = cpu_to_le32(rate); - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_LAYLA_SAMPLE_RATE); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock_source) -{ - u16 clock; - u32 rate; - - DE_ACT(("set_input_clock:\n")); - rate = 0; - switch (clock_source) { - case ECHO_CLOCK_INTERNAL: - DE_ACT(("Set Layla20 clock to INTERNAL\n")); - rate = chip->sample_rate; - clock = LAYLA20_CLOCK_INTERNAL; - break; - case ECHO_CLOCK_SPDIF: - DE_ACT(("Set Layla20 clock to SPDIF\n")); - clock = LAYLA20_CLOCK_SPDIF; - break; - case ECHO_CLOCK_WORD: - DE_ACT(("Set Layla20 clock to WORD\n")); - clock = LAYLA20_CLOCK_WORD; - break; - case ECHO_CLOCK_SUPER: - DE_ACT(("Set Layla20 clock to SUPER\n")); - clock = LAYLA20_CLOCK_SUPER; - break; - default: - DE_ACT(("Input clock 0x%x not supported for Layla24\n", - clock_source)); - return -EINVAL; - } - chip->input_clock = clock_source; - - chip->comm_page->input_clock = cpu_to_le16(clock); - clear_handshake(chip); - send_vector(chip, DSP_VC_UPDATE_CLOCKS); - - if (rate) - set_sample_rate(chip, rate); - - return 0; -} - - - -static int set_output_clock(struct echoaudio *chip, u16 clock) -{ - DE_ACT(("set_output_clock: %d\n", clock)); - switch (clock) { - case ECHO_CLOCK_SUPER: - clock = LAYLA20_OUTPUT_CLOCK_SUPER; - break; - case ECHO_CLOCK_WORD: - clock = LAYLA20_OUTPUT_CLOCK_WORD; - break; - default: - DE_ACT(("set_output_clock wrong clock\n")); - return -EINVAL; - } - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->output_clock = cpu_to_le16(clock); - chip->output_clock = clock; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_CLOCKS); -} - - - -/* Set input bus gain (one unit is 0.5dB !) */ -static int set_input_gain(struct echoaudio *chip, u16 input, int gain) -{ - snd_assert(input < num_busses_in(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->input_gain[input] = gain; - gain += GL20_INPUT_GAIN_MAGIC_NUMBER; - chip->comm_page->line_in_level[input] = gain; - return 0; -} - - - -/* Tell the DSP to reread the flags from the comm page */ -static int update_flags(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_FLAGS); -} - - - -static int set_professional_spdif(struct echoaudio *chip, char prof) -{ - DE_ACT(("set_professional_spdif %d\n", prof)); - if (prof) - chip->comm_page->flags |= - __constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - else - chip->comm_page->flags &= - ~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - chip->professional_spdif = prof; - return update_flags(chip); -} diff --git a/sound/pci/echoaudio/layla24.c b/sound/pci/echoaudio/layla24.c deleted file mode 100644 index d4581fdc8..000000000 --- a/sound/pci/echoaudio/layla24.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHO24_FAMILY -#define ECHOCARD_LAYLA24 -#define ECHOCARD_NAME "Layla24" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_ASIC -#define ECHOCARD_HAS_INPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE -#define ECHOCARD_HAS_DIGITAL_MODE_SWITCH -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT 6 -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 -#define ECHOCARD_HAS_MIDI - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 8 */ -#define PX_ANALOG_IN 16 /* 8 */ -#define PX_DIGITAL_IN 24 /* 8 */ -#define PX_NUM 32 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 8 */ -#define BX_DIGITAL_OUT 8 /* 8 */ -#define BX_ANALOG_IN 16 /* 8 */ -#define BX_DIGITAL_IN 24 /* 8 */ -#define BX_NUM 32 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_LAYLA24_DSP 1 -#define FW_LAYLA24_1_ASIC 2 -#define FW_LAYLA24_2A_ASIC 3 -#define FW_LAYLA24_2S_ASIC 4 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "layla24_dsp.fw"}, - {0, "layla24_1_asic.fw"}, - {0, "layla24_2A_asic.fw"}, - {0, "layla24_2S_asic.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x0060, 0, 0, 0}, /* DSP 56361 Layla24 rev.0 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_8000_96000, - .rate_min = 8000, - .rate_max = 100000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "layla24_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio_gml.c" -#include "echoaudio.c" -#include "midi.c" diff --git a/sound/pci/echoaudio/layla24_dsp.c b/sound/pci/echoaudio/layla24_dsp.c deleted file mode 100644 index 7ec5b63d0..000000000 --- a/sound/pci/echoaudio/layla24_dsp.c +++ /dev/null @@ -1,394 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int write_control_reg(struct echoaudio *chip, u32 value, char force); -static int set_input_clock(struct echoaudio *chip, u16 clock); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int set_digital_mode(struct echoaudio *chip, u8 mode); -static int load_asic_generic(struct echoaudio *chip, u32 cmd, - const struct firmware *asic); -static int check_asic_status(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Layla24\n")); - snd_assert((subdevice_id & 0xfff0) == LAYLA24, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->has_midi = TRUE; - chip->dsp_code_to_load = &card_fw[FW_LAYLA24_DSP]; - chip->input_clock_types = - ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_WORD | ECHO_CLOCK_BIT_ADAT; - chip->digital_modes = - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | - ECHOCAPS_HAS_DIGITAL_MODE_ADAT; - chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; - chip->professional_spdif = FALSE; - chip->digital_in_automute = TRUE; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); - snd_assert(err >= 0, return err); - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_ADAT) - clock_bits |= ECHO_CLOCK_BIT_ADAT; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_WORD) - clock_bits |= ECHO_CLOCK_BIT_WORD; - - return clock_bits; -} - - - -/* Layla24 has an ASIC on the PCI card and another ASIC in the external box; -both need to be loaded. */ -static int load_asic(struct echoaudio *chip) -{ - int err; - - if (chip->asic_loaded) - return 1; - - DE_INIT(("load_asic\n")); - - /* Give the DSP a few milliseconds to settle down */ - mdelay(10); - - /* Load the ASIC for the PCI card */ - err = load_asic_generic(chip, DSP_FNC_LOAD_LAYLA24_PCI_CARD_ASIC, - &card_fw[FW_LAYLA24_1_ASIC]); - if (err < 0) - return err; - - chip->asic_code = &card_fw[FW_LAYLA24_2S_ASIC]; - - /* Now give the new ASIC a little time to set up */ - mdelay(10); - - /* Do the external one */ - err = load_asic_generic(chip, DSP_FNC_LOAD_LAYLA24_EXTERNAL_ASIC, - &card_fw[FW_LAYLA24_2S_ASIC]); - if (err < 0) - return FALSE; - - /* Now give the external ASIC a little time to set up */ - mdelay(10); - - /* See if it worked */ - err = check_asic_status(chip); - - /* Set up the control register if the load succeeded - - 48 kHz, internal clock, S/PDIF RCA mode */ - if (!err) - err = write_control_reg(chip, GML_CONVERTER_ENABLE | GML_48KHZ, - TRUE); - - DE_INIT(("load_asic() done\n")); - return err; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg, clock, base_rate; - - snd_assert(rate < 50000 || chip->digital_mode != DIGITAL_MODE_ADAT, - return -EINVAL); - - /* Only set the clock for internal mode. */ - if (chip->input_clock != ECHO_CLOCK_INTERNAL) { - DE_ACT(("set_sample_rate: Cannot set sample rate - " - "clock not set to CLK_CLOCKININTERNAL\n")); - /* Save the rate anyhow */ - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->sample_rate = rate; - return 0; - } - - /* Get the control register & clear the appropriate bits */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_CLOCK_CLEAR_MASK & GML_SPDIF_RATE_CLEAR_MASK; - - clock = 0; - - switch (rate) { - case 96000: - clock = GML_96KHZ; - break; - case 88200: - clock = GML_88KHZ; - break; - case 48000: - clock = GML_48KHZ | GML_SPDIF_SAMPLE_RATE1; - break; - case 44100: - clock = GML_44KHZ; - /* Professional mode */ - if (control_reg & GML_SPDIF_PRO_MODE) - clock |= GML_SPDIF_SAMPLE_RATE0; - break; - case 32000: - clock = GML_32KHZ | GML_SPDIF_SAMPLE_RATE0 | - GML_SPDIF_SAMPLE_RATE1; - break; - case 22050: - clock = GML_22KHZ; - break; - case 16000: - clock = GML_16KHZ; - break; - case 11025: - clock = GML_11KHZ; - break; - case 8000: - clock = GML_8KHZ; - break; - default: - /* If this is a non-standard rate, then the driver needs to - use Layla24's special "continuous frequency" mode */ - clock = LAYLA24_CONTINUOUS_CLOCK; - if (rate > 50000) { - base_rate = rate >> 1; - control_reg |= GML_DOUBLE_SPEED_MODE; - } else { - base_rate = rate; - } - - if (base_rate < 25000) - base_rate = 25000; - - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->sample_rate = - cpu_to_le32(LAYLA24_MAGIC_NUMBER / base_rate - 2); - - clear_handshake(chip); - send_vector(chip, DSP_VC_SET_LAYLA24_FREQUENCY_REG); - } - - control_reg |= clock; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP ? */ - chip->sample_rate = rate; - DE_ACT(("set_sample_rate: %d clock %d\n", rate, control_reg)); - - return write_control_reg(chip, control_reg, FALSE); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - u32 control_reg, clocks_from_dsp; - - /* Mask off the clock select bits */ - control_reg = le32_to_cpu(chip->comm_page->control_register) & - GML_CLOCK_CLEAR_MASK; - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - /* Pick the new clock */ - switch (clock) { - case ECHO_CLOCK_INTERNAL: - DE_ACT(("Set Layla24 clock to INTERNAL\n")); - chip->input_clock = ECHO_CLOCK_INTERNAL; - return set_sample_rate(chip, chip->sample_rate); - case ECHO_CLOCK_SPDIF: - if (chip->digital_mode == DIGITAL_MODE_ADAT) - return -EAGAIN; - control_reg |= GML_SPDIF_CLOCK; - /* Layla24 doesn't support 96KHz S/PDIF */ - control_reg &= ~GML_DOUBLE_SPEED_MODE; - DE_ACT(("Set Layla24 clock to SPDIF\n")); - break; - case ECHO_CLOCK_WORD: - control_reg |= GML_WORD_CLOCK; - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_WORD96) - control_reg |= GML_DOUBLE_SPEED_MODE; - else - control_reg &= ~GML_DOUBLE_SPEED_MODE; - DE_ACT(("Set Layla24 clock to WORD\n")); - break; - case ECHO_CLOCK_ADAT: - if (chip->digital_mode != DIGITAL_MODE_ADAT) - return -EAGAIN; - control_reg |= GML_ADAT_CLOCK; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - DE_ACT(("Set Layla24 clock to ADAT\n")); - break; - default: - DE_ACT(("Input clock 0x%x not supported for Layla24\n", clock)); - return -EINVAL; - } - - chip->input_clock = clock; - return write_control_reg(chip, control_reg, TRUE); -} - - - -/* Depending on what digital mode you want, Layla24 needs different ASICs -loaded. This function checks the ASIC needed for the new mode and sees -if it matches the one already loaded. */ -static int switch_asic(struct echoaudio *chip, const struct firmware *asic) -{ - s8 *monitors; - - /* Check to see if this is already loaded */ - if (asic != chip->asic_code) { - monitors = kmalloc(MONITOR_ARRAY_SIZE, GFP_KERNEL); - if (! monitors) - return -ENOMEM; - - memcpy(monitors, chip->comm_page->monitors, MONITOR_ARRAY_SIZE); - memset(chip->comm_page->monitors, ECHOGAIN_MUTED, - MONITOR_ARRAY_SIZE); - - /* Load the desired ASIC */ - if (load_asic_generic(chip, DSP_FNC_LOAD_LAYLA24_EXTERNAL_ASIC, - asic) < 0) { - memcpy(chip->comm_page->monitors, monitors, - MONITOR_ARRAY_SIZE); - kfree(monitors); - return -EIO; - } - chip->asic_code = asic; - memcpy(chip->comm_page->monitors, monitors, MONITOR_ARRAY_SIZE); - kfree(monitors); - } - - return 0; -} - - - -static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u32 control_reg; - int err, incompatible_clock; - const struct firmware *asic; - - /* Set clock to "internal" if it's not compatible with the new mode */ - incompatible_clock = FALSE; - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - case DIGITAL_MODE_SPDIF_RCA: - if (chip->input_clock == ECHO_CLOCK_ADAT) - incompatible_clock = TRUE; - asic = &card_fw[FW_LAYLA24_2S_ASIC]; - break; - case DIGITAL_MODE_ADAT: - if (chip->input_clock == ECHO_CLOCK_SPDIF) - incompatible_clock = TRUE; - asic = &card_fw[FW_LAYLA24_2A_ASIC]; - break; - default: - DE_ACT(("Digital mode not supported: %d\n", mode)); - return -EINVAL; - } - - if (incompatible_clock) { /* Switch to 48KHz, internal */ - chip->sample_rate = 48000; - spin_lock_irq(&chip->lock); - set_input_clock(chip, ECHO_CLOCK_INTERNAL); - spin_unlock_irq(&chip->lock); - } - - /* switch_asic() can sleep */ - if (switch_asic(chip, asic) < 0) - return -EIO; - - spin_lock_irq(&chip->lock); - - /* Tweak the control register */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_DIGITAL_MODE_CLEAR_MASK; - - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - control_reg |= GML_SPDIF_OPTICAL_MODE; - break; - case DIGITAL_MODE_SPDIF_RCA: - /* GML_SPDIF_OPTICAL_MODE bit cleared */ - break; - case DIGITAL_MODE_ADAT: - control_reg |= GML_ADAT_MODE; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - } - - err = write_control_reg(chip, control_reg, TRUE); - spin_unlock_irq(&chip->lock); - if (err < 0) - return err; - chip->digital_mode = mode; - - DE_ACT(("set_digital_mode to %d\n", mode)); - return incompatible_clock; -} diff --git a/sound/pci/echoaudio/mia.c b/sound/pci/echoaudio/mia.c deleted file mode 100644 index be40c6426..000000000 --- a/sound/pci/echoaudio/mia.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHO24_FAMILY -#define ECHOCARD_MIA -#define ECHOCARD_NAME "Mia" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_INPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_OUTPUT_NOMINAL_LEVEL -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_VMIXER -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT FALSE -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 -#define ECHOCARD_HAS_MIDI - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 8 */ -#define PX_DIGITAL_OUT 8 /* 0 */ -#define PX_ANALOG_IN 8 /* 2 */ -#define PX_DIGITAL_IN 10 /* 2 */ -#define PX_NUM 12 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 2 */ -#define BX_DIGITAL_OUT 2 /* 2 */ -#define BX_ANALOG_IN 4 /* 2 */ -#define BX_DIGITAL_IN 6 /* 2 */ -#define BX_NUM 8 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_MIA_DSP 1 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "mia_dsp.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x3410, 0xECC0, 0x0080, 0, 0, 0}, /* DSP 56361 Mia rev.0 */ - {0x1057, 0x3410, 0xECC0, 0x0081, 0, 0, 0}, /* DSP 56361 Mia rev.1 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_32000 | - SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 8000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "mia_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio.c" -#include "midi.c" diff --git a/sound/pci/echoaudio/mia_dsp.c b/sound/pci/echoaudio/mia_dsp.c deleted file mode 100644 index 891c70519..000000000 --- a/sound/pci/echoaudio/mia_dsp.c +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int set_input_clock(struct echoaudio *chip, u16 clock); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int update_flags(struct echoaudio *chip); -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain); -static int update_vmixer_level(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Mia\n")); - snd_assert((subdevice_id & 0xfff0) == MIA, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->dsp_code_to_load = &card_fw[FW_MIA_DSP]; - /* Since this card has no ASIC, mark it as loaded so everything - works OK */ - chip->asic_loaded = TRUE; - if ((subdevice_id & 0x0000f) == MIA_MIDI_REV) - chip->has_midi = TRUE; - chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL | - ECHO_CLOCK_BIT_SPDIF; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip))) - return err; - - /* Default routing of the virtual channels: vchannels 0-3 go to analog - outputs and vchannels 4-7 go to S/PDIF outputs */ - set_vmixer_gain(chip, 0, 0, 0); - set_vmixer_gain(chip, 1, 1, 0); - set_vmixer_gain(chip, 0, 2, 0); - set_vmixer_gain(chip, 1, 3, 0); - set_vmixer_gain(chip, 2, 4, 0); - set_vmixer_gain(chip, 3, 5, 0); - set_vmixer_gain(chip, 2, 6, 0); - set_vmixer_gain(chip, 3, 7, 0); - err = update_vmixer_level(chip); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GLDM_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - return clock_bits; -} - - - -/* The Mia has no ASIC. Just do nothing */ -static int load_asic(struct echoaudio *chip) -{ - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg; - - switch (rate) { - case 96000: - control_reg = MIA_96000; - break; - case 88200: - control_reg = MIA_88200; - break; - case 48000: - control_reg = MIA_48000; - break; - case 44100: - control_reg = MIA_44100; - break; - case 32000: - control_reg = MIA_32000; - break; - default: - DE_ACT(("set_sample_rate: %d invalid!\n", rate)); - return -EINVAL; - } - - /* Override the clock setting if this Mia is set to S/PDIF clock */ - if (chip->input_clock == ECHO_CLOCK_SPDIF) - control_reg |= MIA_SPDIF; - - /* Set the control register if it has changed */ - if (control_reg != le32_to_cpu(chip->comm_page->control_register)) { - if (wait_handshake(chip)) - return -EIO; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->comm_page->control_register = cpu_to_le32(control_reg); - chip->sample_rate = rate; - - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_CLOCKS); - } - return 0; -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - DE_ACT(("set_input_clock(%d)\n", clock)); - snd_assert(clock == ECHO_CLOCK_INTERNAL || clock == ECHO_CLOCK_SPDIF, - return -EINVAL); - - chip->input_clock = clock; - return set_sample_rate(chip, chip->sample_rate); -} - - - -/* This function routes the sound from a virtual channel to a real output */ -static int set_vmixer_gain(struct echoaudio *chip, u16 output, u16 pipe, - int gain) -{ - int index; - - snd_assert(pipe < num_pipes_out(chip) && - output < num_busses_out(chip), return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - chip->vmixer_gain[output][pipe] = gain; - index = output * num_pipes_out(chip) + pipe; - chip->comm_page->vmixer[index] = gain; - - DE_ACT(("set_vmixer_gain: pipe %d, out %d = %d\n", pipe, output, gain)); - return 0; -} - - - -/* Tell the DSP to read and update virtual mixer levels in comm page. */ -static int update_vmixer_level(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_SET_VMIXER_GAIN); -} - - - -/* Tell the DSP to reread the flags from the comm page */ -static int update_flags(struct echoaudio *chip) -{ - if (wait_handshake(chip)) - return -EIO; - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_FLAGS); -} - - - -static int set_professional_spdif(struct echoaudio *chip, char prof) -{ - DE_ACT(("set_professional_spdif %d\n", prof)); - if (prof) - chip->comm_page->flags |= - __constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - else - chip->comm_page->flags &= - ~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); - chip->professional_spdif = prof; - return update_flags(chip); -} - diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c deleted file mode 100644 index e31f0f11e..000000000 --- a/sound/pci/echoaudio/midi.c +++ /dev/null @@ -1,327 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -/****************************************************************************** - MIDI lowlevel code -******************************************************************************/ - -/* Start and stop Midi input */ -static int enable_midi_input(struct echoaudio *chip, char enable) -{ - DE_MID(("enable_midi_input(%d)\n", enable)); - - if (wait_handshake(chip)) - return -EIO; - - if (enable) { - chip->mtc_state = MIDI_IN_STATE_NORMAL; - chip->comm_page->flags |= - __constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT); - } else - chip->comm_page->flags &= - ~__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT); - - clear_handshake(chip); - return send_vector(chip, DSP_VC_UPDATE_FLAGS); -} - - - -/* Send a buffer full of MIDI data to the DSP -Returns how many actually written or < 0 on error */ -static int write_midi(struct echoaudio *chip, u8 *data, int bytes) -{ - snd_assert(bytes > 0 && bytes < MIDI_OUT_BUFFER_SIZE, return -EINVAL); - - if (wait_handshake(chip)) - return -EIO; - - /* HF4 indicates that it is safe to write MIDI output data */ - if (! (get_dsp_register(chip, CHI32_STATUS_REG) & CHI32_STATUS_REG_HF4)) - return 0; - - chip->comm_page->midi_output[0] = bytes; - memcpy(&chip->comm_page->midi_output[1], data, bytes); - chip->comm_page->midi_out_free_count = 0; - clear_handshake(chip); - send_vector(chip, DSP_VC_MIDI_WRITE); - DE_MID(("write_midi: %d\n", bytes)); - return bytes; -} - - - -/* Run the state machine for MIDI input data -MIDI time code sync isn't supported by this code right now, but you still need -this state machine to parse the incoming MIDI data stream. Every time the DSP -sees a 0xF1 byte come in, it adds the DSP sample position to the MIDI data -stream. The DSP sample position is represented as a 32 bit unsigned value, -with the high 16 bits first, followed by the low 16 bits. Since these aren't -real MIDI bytes, the following logic is needed to skip them. */ -static inline int mtc_process_data(struct echoaudio *chip, short midi_byte) -{ - switch (chip->mtc_state) { - case MIDI_IN_STATE_NORMAL: - if (midi_byte == 0xF1) - chip->mtc_state = MIDI_IN_STATE_TS_HIGH; - break; - case MIDI_IN_STATE_TS_HIGH: - chip->mtc_state = MIDI_IN_STATE_TS_LOW; - return MIDI_IN_SKIP_DATA; - break; - case MIDI_IN_STATE_TS_LOW: - chip->mtc_state = MIDI_IN_STATE_F1_DATA; - return MIDI_IN_SKIP_DATA; - break; - case MIDI_IN_STATE_F1_DATA: - chip->mtc_state = MIDI_IN_STATE_NORMAL; - break; - } - return 0; -} - - - -/* This function is called from the IRQ handler and it reads the midi data -from the DSP's buffer. It returns the number of bytes received. */ -static int midi_service_irq(struct echoaudio *chip) -{ - short int count, midi_byte, i, received; - - /* The count is at index 0, followed by actual data */ - count = le16_to_cpu(chip->comm_page->midi_input[0]); - - snd_assert(count < MIDI_IN_BUFFER_SIZE, return 0); - - /* Get the MIDI data from the comm page */ - i = 1; - received = 0; - for (i = 1; i <= count; i++) { - /* Get the MIDI byte */ - midi_byte = le16_to_cpu(chip->comm_page->midi_input[i]); - - /* Parse the incoming MIDI stream. The incoming MIDI data - consists of MIDI bytes and timestamps for the MIDI time code - 0xF1 bytes. mtc_process_data() is a little state machine that - parses the stream. If you get MIDI_IN_SKIP_DATA back, then - this is a timestamp byte, not a MIDI byte, so don't store it - in the MIDI input buffer. */ - if (mtc_process_data(chip, midi_byte) == MIDI_IN_SKIP_DATA) - continue; - - chip->midi_buffer[received++] = (u8)midi_byte; - } - - return received; -} - - - - -/****************************************************************************** - MIDI interface -******************************************************************************/ - -static int snd_echo_midi_input_open(struct snd_rawmidi_substream *substream) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - chip->midi_in = substream; - DE_MID(("rawmidi_iopen\n")); - return 0; -} - - - -static void snd_echo_midi_input_trigger(struct snd_rawmidi_substream *substream, - int up) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - if (up != chip->midi_input_enabled) { - spin_lock_irq(&chip->lock); - enable_midi_input(chip, up); - spin_unlock_irq(&chip->lock); - chip->midi_input_enabled = up; - } -} - - - -static int snd_echo_midi_input_close(struct snd_rawmidi_substream *substream) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - chip->midi_in = NULL; - DE_MID(("rawmidi_iclose\n")); - return 0; -} - - - -static int snd_echo_midi_output_open(struct snd_rawmidi_substream *substream) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - chip->tinuse = 0; - chip->midi_full = 0; - chip->midi_out = substream; - DE_MID(("rawmidi_oopen\n")); - return 0; -} - - - -static void snd_echo_midi_output_write(unsigned long data) -{ - struct echoaudio *chip = (struct echoaudio *)data; - unsigned long flags; - int bytes, sent, time; - unsigned char buf[MIDI_OUT_BUFFER_SIZE - 1]; - - DE_MID(("snd_echo_midi_output_write\n")); - /* No interrupts are involved: we have to check at regular intervals - if the card's output buffer has room for new data. */ - sent = bytes = 0; - spin_lock_irqsave(&chip->lock, flags); - chip->midi_full = 0; - if (chip->midi_out && !snd_rawmidi_transmit_empty(chip->midi_out)) { - bytes = snd_rawmidi_transmit_peek(chip->midi_out, buf, - MIDI_OUT_BUFFER_SIZE - 1); - DE_MID(("Try to send %d bytes...\n", bytes)); - sent = write_midi(chip, buf, bytes); - if (sent < 0) { - snd_printk(KERN_ERR "write_midi() error %d\n", sent); - /* retry later */ - sent = 9000; - chip->midi_full = 1; - } else if (sent > 0) { - DE_MID(("%d bytes sent\n", sent)); - snd_rawmidi_transmit_ack(chip->midi_out, sent); - } else { - /* Buffer is full. DSP's internal buffer is 64 (128 ?) - bytes long. Let's wait until half of them are sent */ - DE_MID(("Full\n")); - sent = 32; - chip->midi_full = 1; - } - } - - /* We restart the timer only if there is some data left to send */ - if (!snd_rawmidi_transmit_empty(chip->midi_out) && chip->tinuse) { - /* The timer will expire slightly after the data has been - sent */ - time = (sent << 3) / 25 + 1; /* 8/25=0.32ms to send a byte */ - mod_timer(&chip->timer, jiffies + (time * HZ + 999) / 1000); - DE_MID(("Timer armed(%d)\n", ((time * HZ + 999) / 1000))); - } - spin_unlock_irqrestore(&chip->lock, flags); -} - - - -static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream, - int up) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - DE_MID(("snd_echo_midi_output_trigger(%d)\n", up)); - spin_lock_irq(&chip->lock); - if (up) { - if (!chip->tinuse) { - init_timer(&chip->timer); - chip->timer.function = snd_echo_midi_output_write; - chip->timer.data = (unsigned long)chip; - chip->tinuse = 1; - } - } else { - if (chip->tinuse) { - del_timer(&chip->timer); - chip->tinuse = 0; - DE_MID(("Timer removed\n")); - } - } - spin_unlock_irq(&chip->lock); - - if (up && !chip->midi_full) - snd_echo_midi_output_write((unsigned long)chip); -} - - - -static int snd_echo_midi_output_close(struct snd_rawmidi_substream *substream) -{ - struct echoaudio *chip = substream->rmidi->private_data; - - chip->midi_out = NULL; - DE_MID(("rawmidi_oclose\n")); - return 0; -} - - - -static struct snd_rawmidi_ops snd_echo_midi_input = { - .open = snd_echo_midi_input_open, - .close = snd_echo_midi_input_close, - .trigger = snd_echo_midi_input_trigger, -}; - -static struct snd_rawmidi_ops snd_echo_midi_output = { - .open = snd_echo_midi_output_open, - .close = snd_echo_midi_output_close, - .trigger = snd_echo_midi_output_trigger, -}; - - - -/* <--snd_echo_probe() */ -static int __devinit snd_echo_midi_create(struct snd_card *card, - struct echoaudio *chip) -{ - int err; - - if ((err = snd_rawmidi_new(card, card->shortname, 0, 1, 1, - &chip->rmidi)) < 0) - return err; - - strcpy(chip->rmidi->name, card->shortname); - chip->rmidi->private_data = chip; - - snd_rawmidi_set_ops(chip->rmidi, SNDRV_RAWMIDI_STREAM_INPUT, - &snd_echo_midi_input); - snd_rawmidi_set_ops(chip->rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, - &snd_echo_midi_output); - - chip->rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | - SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX; - DE_INIT(("MIDI ok\n")); - return 0; -} diff --git a/sound/pci/echoaudio/mona.c b/sound/pci/echoaudio/mona.c deleted file mode 100644 index 5dc512add..000000000 --- a/sound/pci/echoaudio/mona.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * ALSA driver for Echoaudio soundcards. - * Copyright (C) 2003-2004 Giuliano Pochini - * - * 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; version 2 of the License. - * - * 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. - */ - -#define ECHO24_FAMILY -#define ECHOCARD_MONA -#define ECHOCARD_NAME "Mona" -#define ECHOCARD_HAS_MONITOR -#define ECHOCARD_HAS_ASIC -#define ECHOCARD_HAS_SUPER_INTERLEAVE -#define ECHOCARD_HAS_DIGITAL_IO -#define ECHOCARD_HAS_DIGITAL_IN_AUTOMUTE -#define ECHOCARD_HAS_DIGITAL_MODE_SWITCH -#define ECHOCARD_HAS_EXTERNAL_CLOCK -#define ECHOCARD_HAS_ADAT 6 -#define ECHOCARD_HAS_STEREO_BIG_ENDIAN32 - -/* Pipe indexes */ -#define PX_ANALOG_OUT 0 /* 6 */ -#define PX_DIGITAL_OUT 6 /* 8 */ -#define PX_ANALOG_IN 14 /* 4 */ -#define PX_DIGITAL_IN 18 /* 8 */ -#define PX_NUM 26 - -/* Bus indexes */ -#define BX_ANALOG_OUT 0 /* 6 */ -#define BX_DIGITAL_OUT 6 /* 8 */ -#define BX_ANALOG_IN 14 /* 4 */ -#define BX_DIGITAL_IN 18 /* 8 */ -#define BX_NUM 26 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "echoaudio.h" - -#define FW_361_LOADER 0 -#define FW_MONA_301_DSP 1 -#define FW_MONA_361_DSP 2 -#define FW_MONA_301_1_ASIC48 3 -#define FW_MONA_301_1_ASIC96 4 -#define FW_MONA_361_1_ASIC48 5 -#define FW_MONA_361_1_ASIC96 6 -#define FW_MONA_2_ASIC 7 - -static const struct firmware card_fw[] = { - {0, "loader_dsp.fw"}, - {0, "mona_301_dsp.fw"}, - {0, "mona_361_dsp.fw"}, - {0, "mona_301_1_asic_48.fw"}, - {0, "mona_301_1_asic_96.fw"}, - {0, "mona_361_1_asic_48.fw"}, - {0, "mona_361_1_asic_96.fw"}, - {0, "mona_2_asic.fw"} -}; - -static struct pci_device_id snd_echo_ids[] = { - {0x1057, 0x1801, 0xECC0, 0x0070, 0, 0, 0}, /* DSP 56301 Mona rev.0 */ - {0x1057, 0x1801, 0xECC0, 0x0071, 0, 0, 0}, /* DSP 56301 Mona rev.1 */ - {0x1057, 0x1801, 0xECC0, 0x0072, 0, 0, 0}, /* DSP 56301 Mona rev.2 */ - {0x1057, 0x3410, 0xECC0, 0x0070, 0, 0, 0}, /* DSP 56361 Mona rev.0 */ - {0x1057, 0x3410, 0xECC0, 0x0071, 0, 0, 0}, /* DSP 56361 Mona rev.1 */ - {0x1057, 0x3410, 0xECC0, 0x0072, 0, 0, 0}, /* DSP 56361 Mona rev.2 */ - {0,} -}; - -static struct snd_pcm_hardware pcm_hardware_skel = { - .info = SNDRV_PCM_INFO_MMAP | - SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID | - SNDRV_PCM_INFO_PAUSE | - SNDRV_PCM_INFO_SYNC_START, - .formats = SNDRV_PCM_FMTBIT_U8 | - SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_3LE | - SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S32_BE, - .rates = SNDRV_PCM_RATE_8000_48000 | - SNDRV_PCM_RATE_88200 | - SNDRV_PCM_RATE_96000, - .rate_min = 8000, - .rate_max = 96000, - .channels_min = 1, - .channels_max = 8, - .buffer_bytes_max = 262144, - .period_bytes_min = 32, - .period_bytes_max = 131072, - .periods_min = 2, - .periods_max = 220, - /* One page (4k) contains 512 instructions. I don't know if the hw - supports lists longer than this. In this case periods_max=220 is a - safe limit to make sure the list never exceeds 512 instructions. */ -}; - - -#include "mona_dsp.c" -#include "echoaudio_dsp.c" -#include "echoaudio_gml.c" -#include "echoaudio.c" diff --git a/sound/pci/echoaudio/mona_dsp.c b/sound/pci/echoaudio/mona_dsp.c deleted file mode 100644 index c0b4bf0be..000000000 --- a/sound/pci/echoaudio/mona_dsp.c +++ /dev/null @@ -1,428 +0,0 @@ -/**************************************************************************** - - Copyright Echo Digital Audio Corporation (c) 1998 - 2004 - All rights reserved - www.echoaudio.com - - This file is part of Echo Digital Audio's generic driver library. - - Echo Digital Audio's generic driver library 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. - - 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. - - ************************************************************************* - - Translation from C++ and adaptation for use in ALSA-Driver - were made by Giuliano Pochini - -****************************************************************************/ - - -static int write_control_reg(struct echoaudio *chip, u32 value, char force); -static int set_input_clock(struct echoaudio *chip, u16 clock); -static int set_professional_spdif(struct echoaudio *chip, char prof); -static int set_digital_mode(struct echoaudio *chip, u8 mode); -static int load_asic_generic(struct echoaudio *chip, u32 cmd, - const struct firmware *asic); -static int check_asic_status(struct echoaudio *chip); - - -static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) -{ - int err; - - DE_INIT(("init_hw() - Mona\n")); - snd_assert((subdevice_id & 0xfff0) == MONA, return -ENODEV); - - if ((err = init_dsp_comm_page(chip))) { - DE_INIT(("init_hw - could not initialize DSP comm page\n")); - return err; - } - - chip->device_id = device_id; - chip->subdevice_id = subdevice_id; - chip->bad_board = TRUE; - chip->input_clock_types = - ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | - ECHO_CLOCK_BIT_WORD | ECHO_CLOCK_BIT_ADAT; - chip->digital_modes = - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | - ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | - ECHOCAPS_HAS_DIGITAL_MODE_ADAT; - - /* Mona comes in both '301 and '361 flavors */ - if (chip->device_id == DEVICE_ID_56361) - chip->dsp_code_to_load = &card_fw[FW_MONA_361_DSP]; - else - chip->dsp_code_to_load = &card_fw[FW_MONA_301_DSP]; - - chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; - chip->professional_spdif = FALSE; - chip->digital_in_automute = TRUE; - - if ((err = load_firmware(chip)) < 0) - return err; - chip->bad_board = FALSE; - - if ((err = init_line_levels(chip)) < 0) - return err; - - err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); - snd_assert(err >= 0, return err); - err = set_professional_spdif(chip, TRUE); - - DE_INIT(("init_hw done\n")); - return err; -} - - - -static u32 detect_input_clocks(const struct echoaudio *chip) -{ - u32 clocks_from_dsp, clock_bits; - - /* Map the DSP clock detect bits to the generic driver clock - detect bits */ - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - clock_bits = ECHO_CLOCK_BIT_INTERNAL; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_SPDIF) - clock_bits |= ECHO_CLOCK_BIT_SPDIF; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_ADAT) - clock_bits |= ECHO_CLOCK_BIT_ADAT; - - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_WORD) - clock_bits |= ECHO_CLOCK_BIT_WORD; - - return clock_bits; -} - - - -/* Mona has an ASIC on the PCI card and another ASIC in the external box; -both need to be loaded. */ -static int load_asic(struct echoaudio *chip) -{ - u32 control_reg; - int err; - const struct firmware *asic; - - if (chip->asic_loaded) - return 0; - - mdelay(10); - - if (chip->device_id == DEVICE_ID_56361) - asic = &card_fw[FW_MONA_361_1_ASIC48]; - else - asic = &card_fw[FW_MONA_301_1_ASIC48]; - - err = load_asic_generic(chip, DSP_FNC_LOAD_MONA_PCI_CARD_ASIC, asic); - if (err < 0) - return err; - - chip->asic_code = asic; - mdelay(10); - - /* Do the external one */ - err = load_asic_generic(chip, DSP_FNC_LOAD_MONA_EXTERNAL_ASIC, - &card_fw[FW_MONA_2_ASIC]); - if (err < 0) - return err; - - mdelay(10); - err = check_asic_status(chip); - - /* Set up the control register if the load succeeded - - 48 kHz, internal clock, S/PDIF RCA mode */ - if (!err) { - control_reg = GML_CONVERTER_ENABLE | GML_48KHZ; - err = write_control_reg(chip, control_reg, TRUE); - } - - return err; -} - - - -/* Depending on what digital mode you want, Mona needs different ASICs -loaded. This function checks the ASIC needed for the new mode and sees -if it matches the one already loaded. */ -static int switch_asic(struct echoaudio *chip, char double_speed) -{ - const struct firmware *asic; - int err; - - /* Check the clock detect bits to see if this is - a single-speed clock or a double-speed clock; load - a new ASIC if necessary. */ - if (chip->device_id == DEVICE_ID_56361) { - if (double_speed) - asic = &card_fw[FW_MONA_361_1_ASIC96]; - else - asic = &card_fw[FW_MONA_361_1_ASIC48]; - } else { - if (double_speed) - asic = &card_fw[FW_MONA_301_1_ASIC96]; - else - asic = &card_fw[FW_MONA_301_1_ASIC48]; - } - - if (asic != chip->asic_code) { - /* Load the desired ASIC */ - err = load_asic_generic(chip, DSP_FNC_LOAD_MONA_PCI_CARD_ASIC, - asic); - if (err < 0) - return err; - chip->asic_code = asic; - } - - return 0; -} - - - -static int set_sample_rate(struct echoaudio *chip, u32 rate) -{ - u32 control_reg, clock; - const struct firmware *asic; - char force_write; - - /* Only set the clock for internal mode. */ - if (chip->input_clock != ECHO_CLOCK_INTERNAL) { - DE_ACT(("set_sample_rate: Cannot set sample rate - " - "clock not set to CLK_CLOCKININTERNAL\n")); - /* Save the rate anyhow */ - chip->comm_page->sample_rate = cpu_to_le32(rate); - chip->sample_rate = rate; - return 0; - } - - /* Now, check to see if the required ASIC is loaded */ - if (rate >= 88200) { - if (chip->digital_mode == DIGITAL_MODE_ADAT) - return -EINVAL; - if (chip->device_id == DEVICE_ID_56361) - asic = &card_fw[FW_MONA_361_1_ASIC96]; - else - asic = &card_fw[FW_MONA_301_1_ASIC96]; - } else { - if (chip->device_id == DEVICE_ID_56361) - asic = &card_fw[FW_MONA_361_1_ASIC48]; - else - asic = &card_fw[FW_MONA_301_1_ASIC48]; - } - - force_write = 0; - if (asic != chip->asic_code) { - int err; - /* Load the desired ASIC (load_asic_generic() can sleep) */ - spin_unlock_irq(&chip->lock); - err = load_asic_generic(chip, DSP_FNC_LOAD_MONA_PCI_CARD_ASIC, - asic); - spin_lock_irq(&chip->lock); - - if (err < 0) - return err; - chip->asic_code = asic; - force_write = 1; - } - - /* Compute the new control register value */ - clock = 0; - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_CLOCK_CLEAR_MASK; - control_reg &= GML_SPDIF_RATE_CLEAR_MASK; - - switch (rate) { - case 96000: - clock = GML_96KHZ; - break; - case 88200: - clock = GML_88KHZ; - break; - case 48000: - clock = GML_48KHZ | GML_SPDIF_SAMPLE_RATE1; - break; - case 44100: - clock = GML_44KHZ; - /* Professional mode */ - if (control_reg & GML_SPDIF_PRO_MODE) - clock |= GML_SPDIF_SAMPLE_RATE0; - break; - case 32000: - clock = GML_32KHZ | GML_SPDIF_SAMPLE_RATE0 | - GML_SPDIF_SAMPLE_RATE1; - break; - case 22050: - clock = GML_22KHZ; - break; - case 16000: - clock = GML_16KHZ; - break; - case 11025: - clock = GML_11KHZ; - break; - case 8000: - clock = GML_8KHZ; - break; - default: - DE_ACT(("set_sample_rate: %d invalid!\n", rate)); - return -EINVAL; - } - - control_reg |= clock; - - chip->comm_page->sample_rate = cpu_to_le32(rate); /* ignored by the DSP */ - chip->sample_rate = rate; - DE_ACT(("set_sample_rate: %d clock %d\n", rate, clock)); - - return write_control_reg(chip, control_reg, force_write); -} - - - -static int set_input_clock(struct echoaudio *chip, u16 clock) -{ - u32 control_reg, clocks_from_dsp; - int err; - - DE_ACT(("set_input_clock:\n")); - - /* Prevent two simultaneous calls to switch_asic() */ - if (atomic_read(&chip->opencount)) - return -EAGAIN; - - /* Mask off the clock select bits */ - control_reg = le32_to_cpu(chip->comm_page->control_register) & - GML_CLOCK_CLEAR_MASK; - clocks_from_dsp = le32_to_cpu(chip->comm_page->status_clocks); - - switch (clock) { - case ECHO_CLOCK_INTERNAL: - DE_ACT(("Set Mona clock to INTERNAL\n")); - chip->input_clock = ECHO_CLOCK_INTERNAL; - return set_sample_rate(chip, chip->sample_rate); - case ECHO_CLOCK_SPDIF: - if (chip->digital_mode == DIGITAL_MODE_ADAT) - return -EAGAIN; - spin_unlock_irq(&chip->lock); - err = switch_asic(chip, clocks_from_dsp & - GML_CLOCK_DETECT_BIT_SPDIF96); - spin_lock_irq(&chip->lock); - if (err < 0) - return err; - DE_ACT(("Set Mona clock to SPDIF\n")); - control_reg |= GML_SPDIF_CLOCK; - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_SPDIF96) - control_reg |= GML_DOUBLE_SPEED_MODE; - else - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_WORD: - DE_ACT(("Set Mona clock to WORD\n")); - spin_unlock_irq(&chip->lock); - err = switch_asic(chip, clocks_from_dsp & - GML_CLOCK_DETECT_BIT_WORD96); - spin_lock_irq(&chip->lock); - if (err < 0) - return err; - control_reg |= GML_WORD_CLOCK; - if (clocks_from_dsp & GML_CLOCK_DETECT_BIT_WORD96) - control_reg |= GML_DOUBLE_SPEED_MODE; - else - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - case ECHO_CLOCK_ADAT: - DE_ACT(("Set Mona clock to ADAT\n")); - if (chip->digital_mode != DIGITAL_MODE_ADAT) - return -EAGAIN; - control_reg |= GML_ADAT_CLOCK; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - default: - DE_ACT(("Input clock 0x%x not supported for Mona\n", clock)); - return -EINVAL; - } - - chip->input_clock = clock; - return write_control_reg(chip, control_reg, TRUE); -} - - - -static int dsp_set_digital_mode(struct echoaudio *chip, u8 mode) -{ - u32 control_reg; - int err, incompatible_clock; - - /* Set clock to "internal" if it's not compatible with the new mode */ - incompatible_clock = FALSE; - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - case DIGITAL_MODE_SPDIF_RCA: - if (chip->input_clock == ECHO_CLOCK_ADAT) - incompatible_clock = TRUE; - break; - case DIGITAL_MODE_ADAT: - if (chip->input_clock == ECHO_CLOCK_SPDIF) - incompatible_clock = TRUE; - break; - default: - DE_ACT(("Digital mode not supported: %d\n", mode)); - return -EINVAL; - } - - spin_lock_irq(&chip->lock); - - if (incompatible_clock) { /* Switch to 48KHz, internal */ - chip->sample_rate = 48000; - set_input_clock(chip, ECHO_CLOCK_INTERNAL); - } - - /* Clear the current digital mode */ - control_reg = le32_to_cpu(chip->comm_page->control_register); - control_reg &= GML_DIGITAL_MODE_CLEAR_MASK; - - /* Tweak the control reg */ - switch (mode) { - case DIGITAL_MODE_SPDIF_OPTICAL: - control_reg |= GML_SPDIF_OPTICAL_MODE; - break; - case DIGITAL_MODE_SPDIF_RCA: - /* GML_SPDIF_OPTICAL_MODE bit cleared */ - break; - case DIGITAL_MODE_ADAT: - /* If the current ASIC is the 96KHz ASIC, switch the ASIC - and set to 48 KHz */ - if (chip->asic_code == &card_fw[FW_MONA_361_1_ASIC96] || - chip->asic_code == &card_fw[FW_MONA_301_1_ASIC96]) { - set_sample_rate(chip, 48000); - } - control_reg |= GML_ADAT_MODE; - control_reg &= ~GML_DOUBLE_SPEED_MODE; - break; - } - - err = write_control_reg(chip, control_reg, FALSE); - spin_unlock_irq(&chip->lock); - if (err < 0) - return err; - chip->digital_mode = mode; - - DE_ACT(("set_digital_mode to %d\n", mode)); - return incompatible_clock; -} diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index 289bcd99c..42b11ba1d 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c @@ -46,13 +46,13 @@ MODULE_SUPPORTED_DEVICE("{{Creative Labs,SB Live!/PCI512/E-mu APS}," static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int extin[SNDRV_CARDS]; -static int extout[SNDRV_CARDS]; +static int extin[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; +static int extout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int seq_ports[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4}; static int max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64}; static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128}; -static int enable_ir[SNDRV_CARDS]; -static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */ +static int enable_ir[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; +static uint subsystem[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; /* Force card subsystem model */ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard."); @@ -77,7 +77,7 @@ MODULE_PARM_DESC(subsystem, "Force card subsystem model."); /* * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 */ -static struct pci_device_id snd_emu10k1_ids[] = { +static struct pci_device_id snd_emu10k1_ids[] __devinitdata = { { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index bc1dfdc92..6bfa08436 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu, snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); } -static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) +static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) { unsigned int hc_value; @@ -571,7 +571,7 @@ static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu) return 0; } -static int snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) +static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu) { unsigned long special_port; unsigned int value; @@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in return 0; } -static int snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu) +static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu) { unsigned int i; int tmp; @@ -777,6 +777,14 @@ static int snd_emu10k1_dev_free(struct snd_device *device) static struct snd_emu_chip_details emu_chip_details[] = { /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/ + /* Audigy4 SB0400 */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102, + .driver = "Audigy2", .name = "Audigy 4 [SB0400]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .ac97_chip = 1} , /* Tested by James@superbug.co.uk 3rd July 2005 */ /* DSP: CA0108-IAT * DAC: CS4382-KQ @@ -791,59 +799,13 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0108_chip = 1, .spk71 = 1, .ac97_chip = 1} , - /* Audigy4 (Not PRO) SB0610 */ - /* Tested by James@superbug.co.uk 4th April 2006 */ - /* A_IOCFG bits - * Output - * 0: ? - * 1: ? - * 2: ? - * 3: 0 - Digital Out, 1 - Line in - * 4: ? - * 5: ? - * 6: ? - * 7: ? - * Input - * 8: ? - * 9: ? - * A: Green jack sense (Front) - * B: ? - * C: Black jack sense (Rear/Side Right) - * D: Yellow jack sense (Center/LFE/Side Left) - * E: ? - * F: ? - * - * Digital Out/Line in switch using A_IOCFG bit 3 (0x08) - * 0 - Digital Out - * 1 - Line in - */ - /* Mic input not tested. - * Analog CD input not tested - * Digital Out not tested. - * Line in working. - * Audio output 5.1 working. Side outputs not working. - */ - /* DSP: CA10300-IAT LF - * DAC: Cirrus Logic CS4382-KQZ - * ADC: Philips 1361T - * AC97: Sigmatel STAC9750 - * CA0151: None - */ - {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102, - .driver = "Audigy2", .name = "Audigy 4 [SB0610]", - .id = "Audigy2", - .emu10k2_chip = 1, - .ca0108_chip = 1, - .spk71 = 1, - .adc_1361t = 1, /* 24 bit capture instead of 16bit */ - .ac97_chip = 1} , /* Audigy 2 ZS Notebook Cardbus card.*/ /* Tested by James@superbug.co.uk 22th December 2005 */ /* Audio output 7.1/Headphones working. * Digital output working. (AC3 not checked, only PCM) * Audio inputs not tested. */ - /* DSP: Tina2 + /* DSP: Tiny2 * DAC: Wolfson WM8768/WM8568 * ADC: Wolfson WM8775 * AC97: None @@ -936,17 +898,6 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0151_chip = 1, .spk71 = 1, .spdif_bug = 1} , - /* Dell OEM/Creative Labs Audigy 2 ZS */ - /* See ALSA bug#1365 */ - {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102, - .driver = "Audigy2", .name = "Audigy 2 ZS [SB0353]", - .id = "Audigy2", - .emu10k2_chip = 1, - .ca0102_chip = 1, - .ca0151_chip = 1, - .spk71 = 1, - .spdif_bug = 1, - .ac97_chip = 1} , {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", .id = "Audigy2", @@ -1244,7 +1195,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card, } emu->port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) { + if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) { err = -EBUSY; goto error; } @@ -1441,10 +1392,6 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu) { if (emu->card_capabilities->ecard) snd_emu10k1_ecard_init(emu); - else if (emu->card_capabilities->ca_cardbus_chip) - snd_emu10k1_cardbus_init(emu); - else if (emu->card_capabilities->emu1212m) - snd_emu10k1_emu1212m_init(emu); else snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); snd_emu10k1_init(emu, emu->enable_ir, 1); @@ -1460,8 +1407,8 @@ void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu) /* resore for spdif */ if (emu->audigy) - outl(emu->saved_a_iocfg, emu->port + A_IOCFG); - outl(emu->saved_hcfg, emu->port + HCFG); + outl(emu->port + A_IOCFG, emu->saved_a_iocfg); + outl(emu->port + HCFG, emu->saved_hcfg); val = emu->saved_ptr; for (reg = saved_regs; *reg != 0xff; reg++) @@ -1474,3 +1421,16 @@ void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu) } } #endif + +/* memory.c */ +EXPORT_SYMBOL(snd_emu10k1_synth_alloc); +EXPORT_SYMBOL(snd_emu10k1_synth_free); +EXPORT_SYMBOL(snd_emu10k1_synth_bzero); +EXPORT_SYMBOL(snd_emu10k1_synth_copy_from_user); +EXPORT_SYMBOL(snd_emu10k1_memblk_map); +/* voice.c */ +EXPORT_SYMBOL(snd_emu10k1_voice_alloc); +EXPORT_SYMBOL(snd_emu10k1_voice_free); +/* io.c */ +EXPORT_SYMBOL(snd_emu10k1_ptr_read); +EXPORT_SYMBOL(snd_emu10k1_ptr_write); diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index bda8bdf59..d51290c18 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -928,7 +928,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card, } if (request_irq(pci->irq, snd_emu10k1x_interrupt, - IRQF_DISABLED|IRQF_SHARED, "EMU10K1X", + SA_INTERRUPT|SA_SHIRQ, "EMU10K1X", (void *)chip)) { snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); snd_emu10k1x_free(chip); @@ -1055,7 +1055,8 @@ static int __devinit snd_emu10k1x_proc_init(struct emu10k1x * emu) struct snd_info_entry *entry; if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu10k1x_proc_reg_read); + snd_info_set_text_ops(entry, emu, 1024, snd_emu10k1x_proc_reg_read); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu10k1x_proc_reg_write; entry->mode |= S_IWUSR; entry->private_data = emu; @@ -1286,7 +1287,7 @@ static void snd_emu10k1x_midi_interrupt(struct emu10k1x *emu, unsigned int statu do_emu10k1x_midi_interrupt(emu, &emu->midi, status); } -static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu, +static void snd_emu10k1x_midi_cmd(struct emu10k1x * emu, struct emu10k1x_midi *midi, unsigned char cmd, int ack) { unsigned long flags; @@ -1312,14 +1313,11 @@ static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu, ok = 1; } spin_unlock_irqrestore(&midi->input_lock, flags); - if (!ok) { + if (!ok) snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", cmd, emu->port, mpu401_read_stat(emu, midi), mpu401_read_data(emu, midi)); - return 1; - } - return 0; } static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) @@ -1335,17 +1333,12 @@ static int snd_emu10k1x_midi_input_open(struct snd_rawmidi_substream *substream) midi->substream_input = substream; if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) - goto error_out; - if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) - goto error_out; + snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); + snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } return 0; - -error_out: - return -EIO; } static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream) @@ -1361,17 +1354,12 @@ static int snd_emu10k1x_midi_output_open(struct snd_rawmidi_substream *substream midi->substream_output = substream; if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1)) - goto error_out; - if (snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) - goto error_out; + snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 1); + snd_emu10k1x_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } return 0; - -error_out: - return -EIO; } static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream) @@ -1379,7 +1367,6 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream struct emu10k1x *emu; struct emu10k1x_midi *midi = substream->rmidi->private_data; unsigned long flags; - int err = 0; emu = midi->emu; snd_assert(emu, return -ENXIO); @@ -1389,11 +1376,11 @@ static int snd_emu10k1x_midi_input_close(struct snd_rawmidi_substream *substream midi->substream_input = NULL; if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_OUTPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); + snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } - return err; + return 0; } static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substream) @@ -1401,7 +1388,6 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea struct emu10k1x *emu; struct emu10k1x_midi *midi = substream->rmidi->private_data; unsigned long flags; - int err = 0; emu = midi->emu; snd_assert(emu, return -ENXIO); @@ -1411,11 +1397,11 @@ static int snd_emu10k1x_midi_output_close(struct snd_rawmidi_substream *substrea midi->substream_output = NULL; if (!(midi->midi_mode & EMU10K1X_MIDI_MODE_INPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - err = snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); + snd_emu10k1x_midi_cmd(emu, midi, MPU401_RESET, 0); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } - return err; + return 0; } static void snd_emu10k1x_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) @@ -1609,7 +1595,7 @@ static void __devexit snd_emu10k1x_remove(struct pci_dev *pci) } // PCI IDs -static struct pci_device_id snd_emu10k1x_ids[] = { +static struct pci_device_id snd_emu10k1x_ids[] __devinitdata = { { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ { 0, } }; diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index c31f3d087..2a9d12d10 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -777,8 +777,6 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, }; static char *audigy_remove_ctls[] = { /* Master/PCM controls on ac97 of Audigy has no effect */ - /* On the Audigy2 the AC97 playback is piped into - * the Philips ADC for 24bit capture */ "PCM Playback Switch", "PCM Playback Volume", "Master Mono Playback Switch", @@ -806,47 +804,6 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, "AMic Playback Volume", "Mic Playback Volume", NULL }; - static char *audigy_remove_ctls_1361t_adc[] = { - /* On the Audigy2 the AC97 playback is piped into - * the Philips ADC for 24bit capture */ - "PCM Playback Switch", - "PCM Playback Volume", - "Master Mono Playback Switch", - "Master Mono Playback Volume", - "Capture Source", - "Capture Switch", - "Capture Volume", - "Mic Capture Volume", - "Headphone Playback Switch", - "Headphone Playback Volume", - "3D Control - Center", - "3D Control - Depth", - "3D Control - Switch", - "Line2 Playback Volume", - "Line2 Capture Volume", - NULL - }; - static char *audigy_rename_ctls_1361t_adc[] = { - "Master Playback Switch", "Master Capture Switch", - "Master Playback Volume", "Master Capture Volume", - "Wave Master Playback Volume", "Master Playback Volume", - "PC Speaker Playback Switch", "PC Speaker Capture Switch", - "PC Speaker Playback Volume", "PC Speaker Capture Volume", - "Phone Playback Switch", "Phone Capture Switch", - "Phone Playback Volume", "Phone Capture Volume", - "Mic Playback Switch", "Mic Capture Switch", - "Mic Playback Volume", "Mic Capture Volume", - "Line Playback Switch", "Line Capture Switch", - "Line Playback Volume", "Line Capture Volume", - "CD Playback Switch", "CD Capture Switch", - "CD Playback Volume", "CD Capture Volume", - "Aux Playback Switch", "Aux Capture Switch", - "Aux Playback Volume", "Aux Capture Volume", - "Video Playback Switch", "Video Capture Switch", - "Video Playback Volume", "Video Capture Volume", - - NULL - }; if (emu->card_capabilities->ac97_chip) { struct snd_ac97_bus *pbus; @@ -877,10 +834,7 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, snd_ac97_write_cache(emu->ac97, AC97_MASTER, 0x0000); /* set capture source to mic */ snd_ac97_write_cache(emu->ac97, AC97_REC_SEL, 0x0000); - if (emu->card_capabilities->adc_1361t) - c = audigy_remove_ctls_1361t_adc; - else - c = audigy_remove_ctls; + c = audigy_remove_ctls; } else { /* * Credits for cards based on STAC9758: @@ -909,15 +863,11 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu, } if (emu->audigy) - if (emu->card_capabilities->adc_1361t) - c = audigy_rename_ctls_1361t_adc; - else - c = audigy_rename_ctls; + c = audigy_rename_ctls; else c = emu10k1_rename_ctls; for (; *c; c += 2) rename_ctl(card, c[0], c[1]); - if (emu->card_capabilities->subsystem == 0x20071102) { /* Audigy 4 Pro */ rename_ctl(card, "Line2 Capture Volume", "Line1/Mic Capture Volume"); rename_ctl(card, "Analog Mix Capture Volume", "Line2 Capture Volume"); diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c index 950c6bcd6..d96eb4551 100644 --- a/sound/pci/emu10k1/emumpu401.c +++ b/sound/pci/emu10k1/emumpu401.c @@ -116,7 +116,7 @@ static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int st do_emu10k1_midi_interrupt(emu, &emu->midi2, status); } -static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) +static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack) { unsigned long flags; int timeout, ok; @@ -141,14 +141,11 @@ static int snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_mid ok = 1; } spin_unlock_irqrestore(&midi->input_lock, flags); - if (!ok) { + if (!ok) snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", cmd, emu->port, mpu401_read_stat(emu, midi), mpu401_read_data(emu, midi)); - return 1; - } - return 0; } static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) @@ -164,17 +161,12 @@ static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream) midi->substream_input = substream; if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) - goto error_out; - if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) - goto error_out; + snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); + snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } return 0; - -error_out: - return -EIO; } static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) @@ -190,17 +182,12 @@ static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream) midi->substream_output = substream; if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - if (snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1)) - goto error_out; - if (snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1)) - goto error_out; + snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 1); + snd_emu10k1_midi_cmd(emu, midi, MPU401_ENTER_UART, 1); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } return 0; - -error_out: - return -EIO; } static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) @@ -208,7 +195,6 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) struct snd_emu10k1 *emu; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; unsigned long flags; - int err = 0; emu = midi->emu; snd_assert(emu, return -ENXIO); @@ -218,11 +204,11 @@ static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream) midi->substream_input = NULL; if (!(midi->midi_mode & EMU10K1_MIDI_MODE_OUTPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); + snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } - return err; + return 0; } static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream) @@ -230,7 +216,6 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream struct snd_emu10k1 *emu; struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data; unsigned long flags; - int err = 0; emu = midi->emu; snd_assert(emu, return -ENXIO); @@ -240,11 +225,11 @@ static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream midi->substream_output = NULL; if (!(midi->midi_mode & EMU10K1_MIDI_MODE_INPUT)) { spin_unlock_irqrestore(&midi->open_lock, flags); - err = snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); + snd_emu10k1_midi_cmd(emu, midi, MPU401_RESET, 0); } else { spin_unlock_irqrestore(&midi->open_lock, flags); } - return err; + return 0; } static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index b939e03aa..90f1c5270 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c @@ -532,51 +532,57 @@ int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu) struct snd_info_entry *entry; #ifdef CONFIG_SND_DEBUG if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); + snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_io_reg_write; entry->mode |= S_IWUSR; } if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); + snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read00a); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_ptr_reg_write00; entry->mode |= S_IWUSR; } if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); + snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read00b); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_ptr_reg_write00; entry->mode |= S_IWUSR; } if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); + snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read20a); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_ptr_reg_write20; entry->mode |= S_IWUSR; } if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); + snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read20b); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_ptr_reg_write20; entry->mode |= S_IWUSR; } if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); + snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read20c); + entry->c.text.write_size = 64; entry->c.text.write = snd_emu_proc_ptr_reg_write20; entry->mode |= S_IWUSR; } #endif if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) - snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_read); + snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_read); if (emu->card_capabilities->emu10k2_chip) { if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) - snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_spdif_read); + snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_spdif_read); } if (emu->card_capabilities->ca0151_chip) { if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) - snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_rates_read); + snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_rates_read); } if (! snd_card_proc_new(emu->card, "voices", &entry)) - snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_voices_read); + snd_info_set_text_ops(entry, emu, 2048, snd_emu10k1_proc_voices_read); if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { entry->content = SNDRV_INFO_CONTENT_DATA; @@ -610,6 +616,7 @@ int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = emu; entry->mode = S_IFREG | S_IRUGO /*| S_IWUSR*/; + entry->c.text.read_size = 128*1024; entry->c.text.read = snd_emu10k1_proc_acode_read; } return 0; diff --git a/sound/pci/emu10k1/io.c b/sound/pci/emu10k1/io.c index 029e7856c..ef5304df8 100644 --- a/sound/pci/emu10k1/io.c +++ b/sound/pci/emu10k1/io.c @@ -62,8 +62,6 @@ unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, un } } -EXPORT_SYMBOL(snd_emu10k1_ptr_read); - void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data) { unsigned int regptr; @@ -94,8 +92,6 @@ void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned i } } -EXPORT_SYMBOL(snd_emu10k1_ptr_write); - unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn) diff --git a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c index 1076af4c3..a8b31286b 100644 --- a/sound/pci/emu10k1/irq.c +++ b/sound/pci/emu10k1/irq.c @@ -37,13 +37,9 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs) int handled = 0; while ((status = inl(emu->port + IPR)) != 0) { - //snd_printk(KERN_INFO "emu10k1 irq - status = 0x%x\n", status); + //printk("emu10k1 irq - status = 0x%x\n", status); orig_status = status; handled = 1; - if ((status & 0xffffffff) == 0xffffffff) { - snd_printk(KERN_INFO "snd-emu10k1: Suspected sound card removal\n"); - break; - } if (status & IPR_PCIERROR) { snd_printk(KERN_ERR "interrupt: PCI error\n"); snd_emu10k1_intr_disable(emu, INTE_PCIERRORENABLE); diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 4fcaefe5a..e7ec98649 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c @@ -287,8 +287,6 @@ int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *b return err; } -EXPORT_SYMBOL(snd_emu10k1_memblk_map); - /* * page allocation for DMA */ @@ -389,7 +387,6 @@ snd_emu10k1_synth_alloc(struct snd_emu10k1 *hw, unsigned int size) return (struct snd_util_memblk *)blk; } -EXPORT_SYMBOL(snd_emu10k1_synth_alloc); /* * free a synth sample area @@ -412,7 +409,6 @@ snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk) return 0; } -EXPORT_SYMBOL(snd_emu10k1_synth_free); /* check new allocation range */ static void get_single_page_range(struct snd_util_memhdr *hdr, @@ -544,8 +540,6 @@ int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk return 0; } -EXPORT_SYMBOL(snd_emu10k1_synth_bzero); - /* * copy_from_user(blk + offset, data, size) */ @@ -574,5 +568,3 @@ int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_me } while (offset < end_offset); return 0; } - -EXPORT_SYMBOL(snd_emu10k1_synth_copy_from_user); diff --git a/sound/pci/emu10k1/p17v.h b/sound/pci/emu10k1/p17v.h deleted file mode 100644 index 7ddb5be63..000000000 --- a/sound/pci/emu10k1/p17v.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) by James Courtier-Dutton - * Driver p17v chips - * Version: 0.01 - * - * 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 - * - */ - -/******************************************************************************/ -/* Audigy2Value Tina (P17V) pointer-offset register set, - * accessed through the PTR20 and DATA24 registers */ -/******************************************************************************/ - -/* 00 - 07: Not used */ -#define P17V_PLAYBACK_FIFO_PTR 0x08 /* Current playback fifo pointer - * and number of sound samples in cache. - */ -/* 09 - 12: Not used */ -#define P17V_CAPTURE_FIFO_PTR 0x13 /* Current capture fifo pointer - * and number of sound samples in cache. - */ -/* 14 - 17: Not used */ -#define P17V_PB_CHN_SEL 0x18 /* P17v playback channel select */ -#define P17V_SE_SLOT_SEL_L 0x19 /* Sound Engine slot select low */ -#define P17V_SE_SLOT_SEL_H 0x1a /* Sound Engine slot select high */ -/* 1b - 1f: Not used */ -/* 20 - 2f: Not used */ -/* 30 - 3b: Not used */ -#define P17V_SPI 0x3c /* SPI interface register */ -#define P17V_I2C_ADDR 0x3d /* I2C Address */ -#define P17V_I2C_0 0x3e /* I2C Data */ -#define P17V_I2C_1 0x3f /* I2C Data */ - -#define P17V_START_AUDIO 0x40 /* Start Audio bit */ -/* 41 - 47: Reserved */ -#define P17V_START_CAPTURE 0x48 /* Start Capture bit */ -#define P17V_CAPTURE_FIFO_BASE 0x49 /* Record FIFO base address */ -#define P17V_CAPTURE_FIFO_SIZE 0x4a /* Record FIFO buffer size */ -#define P17V_CAPTURE_FIFO_INDEX 0x4b /* Record FIFO capture index */ -#define P17V_CAPTURE_VOL_H 0x4c /* P17v capture volume control */ -#define P17V_CAPTURE_VOL_L 0x4d /* P17v capture volume control */ -/* 4e - 4f: Not used */ -/* 50 - 5f: Not used */ -#define P17V_SRCSel 0x60 /* SRC48 and SRCMulti sample rate select - * and output select - */ -#define P17V_MIXER_AC97_10K1_VOL_L 0x61 /* 10K to Mixer_AC97 input volume control */ -#define P17V_MIXER_AC97_10K1_VOL_H 0x62 /* 10K to Mixer_AC97 input volume control */ -#define P17V_MIXER_AC97_P17V_VOL_L 0x63 /* P17V to Mixer_AC97 input volume control */ -#define P17V_MIXER_AC97_P17V_VOL_H 0x64 /* P17V to Mixer_AC97 input volume control */ -#define P17V_MIXER_AC97_SRP_REC_VOL_L 0x65 /* SRP Record to Mixer_AC97 input volume control */ -#define P17V_MIXER_AC97_SRP_REC_VOL_H 0x66 /* SRP Record to Mixer_AC97 input volume control */ -/* 67 - 68: Reserved */ -#define P17V_MIXER_Spdif_10K1_VOL_L 0x69 /* 10K to Mixer_Spdif input volume control */ -#define P17V_MIXER_Spdif_10K1_VOL_H 0x6A /* 10K to Mixer_Spdif input volume control */ -#define P17V_MIXER_Spdif_P17V_VOL_L 0x6B /* P17V to Mixer_Spdif input volume control */ -#define P17V_MIXER_Spdif_P17V_VOL_H 0x6C /* P17V to Mixer_Spdif input volume control */ -#define P17V_MIXER_Spdif_SRP_REC_VOL_L 0x6D /* SRP Record to Mixer_Spdif input volume control */ -#define P17V_MIXER_Spdif_SRP_REC_VOL_H 0x6E /* SRP Record to Mixer_Spdif input volume control */ -/* 6f - 70: Reserved */ -#define P17V_MIXER_I2S_10K1_VOL_L 0x71 /* 10K to Mixer_I2S input volume control */ -#define P17V_MIXER_I2S_10K1_VOL_H 0x72 /* 10K to Mixer_I2S input volume control */ -#define P17V_MIXER_I2S_P17V_VOL_L 0x73 /* P17V to Mixer_I2S input volume control */ -#define P17V_MIXER_I2S_P17V_VOL_H 0x74 /* P17V to Mixer_I2S input volume control */ -#define P17V_MIXER_I2S_SRP_REC_VOL_L 0x75 /* SRP Record to Mixer_I2S input volume control */ -#define P17V_MIXER_I2S_SRP_REC_VOL_H 0x76 /* SRP Record to Mixer_I2S input volume control */ -/* 77 - 78: Reserved */ -#define P17V_MIXER_AC97_ENABLE 0x79 /* Mixer AC97 input audio enable */ -#define P17V_MIXER_SPDIF_ENABLE 0x7A /* Mixer SPDIF input audio enable */ -#define P17V_MIXER_I2S_ENABLE 0x7B /* Mixer I2S input audio enable */ -#define P17V_AUDIO_OUT_ENABLE 0x7C /* Audio out enable */ -#define P17V_MIXER_ATT 0x7D /* SRP Mixer Attenuation Select */ -#define P17V_SRP_RECORD_SRR 0x7E /* SRP Record channel source Select */ -#define P17V_SOFT_RESET_SRP_MIXER 0x7F /* SRP and mixer soft reset */ - -#define P17V_AC97_OUT_MASTER_VOL_L 0x80 /* AC97 Output master volume control */ -#define P17V_AC97_OUT_MASTER_VOL_H 0x81 /* AC97 Output master volume control */ -#define P17V_SPDIF_OUT_MASTER_VOL_L 0x82 /* SPDIF Output master volume control */ -#define P17V_SPDIF_OUT_MASTER_VOL_H 0x83 /* SPDIF Output master volume control */ -#define P17V_I2S_OUT_MASTER_VOL_L 0x84 /* I2S Output master volume control */ -#define P17V_I2S_OUT_MASTER_VOL_H 0x85 /* I2S Output master volume control */ -/* 86 - 87: Not used */ -#define P17V_I2S_CHANNEL_SWAP_PHASE_INVERSE 0x88 /* I2S out mono channel swap - * and phase inverse */ -#define P17V_SPDIF_CHANNEL_SWAP_PHASE_INVERSE 0x89 /* SPDIF out mono channel swap - * and phase inverse */ -/* 8A: Not used */ -#define P17V_SRP_P17V_ESR 0x8B /* SRP_P17V estimated sample rate and rate lock */ -#define P17V_SRP_REC_ESR 0x8C /* SRP_REC estimated sample rate and rate lock */ -#define P17V_SRP_BYPASS 0x8D /* srps channel bypass and srps bypass */ -/* 8E - 92: Not used */ -#define P17V_I2S_SRC_SEL 0x93 /* I2SIN mode sel */ - - - - - - diff --git a/sound/pci/emu10k1/tina2.h b/sound/pci/emu10k1/tina2.h index f2d8eb6c8..5c43abf03 100644 --- a/sound/pci/emu10k1/tina2.h +++ b/sound/pci/emu10k1/tina2.h @@ -1,7 +1,11 @@ /* * Copyright (c) by James Courtier-Dutton - * Driver tina2 chips - * Version: 0.1 + * Driver p16v chips + * Version: 0.21 + * + * + * This code was initally based on code from ALSA's emu10k1x.c which is: + * Copyright (c) by Francisco Moraes * * 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 diff --git a/sound/pci/emu10k1/voice.c b/sound/pci/emu10k1/voice.c index 94eca82dd..56ffb7dc3 100644 --- a/sound/pci/emu10k1/voice.c +++ b/sound/pci/emu10k1/voice.c @@ -139,8 +139,6 @@ int snd_emu10k1_voice_alloc(struct snd_emu10k1 *emu, int type, int number, return result; } -EXPORT_SYMBOL(snd_emu10k1_voice_alloc); - int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *pvoice) { @@ -155,5 +153,3 @@ int snd_emu10k1_voice_free(struct snd_emu10k1 *emu, spin_unlock_irqrestore(&emu->voice_lock, flags); return 0; } - -EXPORT_SYMBOL(snd_emu10k1_voice_free); diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index a8a601fc7..ca9e34e88 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c @@ -446,7 +446,7 @@ struct ensoniq { static irqreturn_t snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static struct pci_device_id snd_audiopci_ids[] = { +static struct pci_device_id snd_audiopci_ids[] __devinitdata = { #ifdef CHIP1370 { 0x1274, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* ES1370 */ #endif @@ -1915,7 +1915,7 @@ static void __devinit snd_ensoniq_proc_init(struct ensoniq * ensoniq) struct snd_info_entry *entry; if (! snd_card_proc_new(ensoniq->card, "audiopci", &entry)) - snd_info_set_text_ops(entry, ensoniq, snd_ensoniq_proc_read); + snd_info_set_text_ops(entry, ensoniq, 1024, snd_ensoniq_proc_read); } /* @@ -2135,7 +2135,7 @@ static int __devinit snd_ensoniq_create(struct snd_card *card, return err; } ensoniq->port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, "Ensoniq AudioPCI", ensoniq)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_ensoniq_free(ensoniq); diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index cc0f34f68..6f9094ca4 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c @@ -242,7 +242,7 @@ struct es1938 { static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static struct pci_device_id snd_es1938_ids[] = { +static struct pci_device_id snd_es1938_ids[] __devinitdata = { { 0x125d, 0x1969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* Solo-1 */ { 0, } }; @@ -1429,7 +1429,7 @@ static int es1938_resume(struct pci_dev *pci) pci_restore_state(pci); pci_enable_device(pci); request_irq(pci->irq, snd_es1938_interrupt, - IRQF_DISABLED|IRQF_SHARED, "ES1938", chip); + SA_INTERRUPT|SA_SHIRQ, "ES1938", chip); chip->irq = pci->irq; snd_es1938_chip_init(chip); @@ -1544,7 +1544,7 @@ static int __devinit snd_es1938_create(struct snd_card *card, chip->vc_port = pci_resource_start(pci, 2); chip->mpu_port = pci_resource_start(pci, 3); chip->game_port = pci_resource_start(pci, 4); - if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ, "ES1938", chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_es1938_free(chip); @@ -1756,8 +1756,7 @@ static int __devinit snd_es1938_probe(struct pci_dev *pci, } } if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, - chip->mpu_port, MPU401_INFO_INTEGRATED, - chip->irq, 0, &chip->rmidi) < 0) { + chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) { printk(KERN_ERR "es1938: unable to initialize MPU-401\n"); } else { // this line is vital for MIDI interrupt handling on ess-solo1 diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 3c5ab7c2e..5ff4175c7 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -132,7 +132,7 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * static int total_bufsize[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1024 }; static int pcm_substreams_p[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 4 }; static int pcm_substreams_c[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 }; -static int clock[SNDRV_CARDS]; +static int clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static int use_pm[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; static int enable_mpu[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; #ifdef SUPPORT_JOYSTICK @@ -592,7 +592,7 @@ struct es1968 { static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static struct pci_device_id snd_es1968_ids[] = { +static struct pci_device_id snd_es1968_ids[] __devinitdata = { /* Maestro 1 */ { 0x1285, 0x0100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TYPE_MAESTRO }, /* Maestro 2 */ @@ -2597,7 +2597,7 @@ static int __devinit snd_es1968_create(struct snd_card *card, return err; } chip->io_port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, "ESS Maestro", (void*)chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_es1968_free(chip); @@ -2727,8 +2727,7 @@ static int __devinit snd_es1968_probe(struct pci_dev *pci, } if (enable_mpu[dev]) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, - chip->io_port + ESM_MPU401_PORT, - MPU401_INFO_INTEGRATED, + chip->io_port + ESM_MPU401_PORT, 1, chip->irq, 0, &chip->rmidi)) < 0) { printk(KERN_WARNING "es1968: skipping MPU-401 MIDI support..\n"); } diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 13868c985..09a2885ca 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -56,7 +56,7 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card * * 3 = MediaForte 64-PCR * High 16-bits are video (radio) device number + 1 */ -static int tea575x_tuner[SNDRV_CARDS]; +static int tea575x_tuner[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the FM801 soundcard."); @@ -199,7 +199,7 @@ struct fm801 { #endif }; -static struct pci_device_id snd_fm801_ids[] = { +static struct pci_device_id snd_fm801_ids[] __devinitdata = { { 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */ { 0x5213, 0x0510, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* Gallant Odyssey Sound 4 */ { 0, } @@ -1371,7 +1371,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, return err; } chip->port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_fm801_interrupt, SA_INTERRUPT|SA_SHIRQ, "FM801", chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq); snd_fm801_free(chip); @@ -1448,8 +1448,7 @@ static int __devinit snd_card_fm801_probe(struct pci_dev *pci, return err; } if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_FM801, - FM801_REG(chip, MPU401_DATA), - MPU401_INFO_INTEGRATED, + FM801_REG(chip, MPU401_DATA), 1, chip->irq, 0, &chip->rmidi)) < 0) { snd_card_free(card); return err; diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile index dbacba617..ddfb5ff7f 100644 --- a/sound/pci/hda/Makefile +++ b/sound/pci/hda/Makefile @@ -1,5 +1,5 @@ snd-hda-intel-objs := hda_intel.o -snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o patch_analog.o patch_sigmatel.o patch_si3054.o patch_atihdmi.o +snd-hda-codec-objs := hda_codec.o hda_generic.o patch_realtek.o patch_cmedia.o patch_analog.o patch_sigmatel.o patch_si3054.o ifdef CONFIG_PROC_FS snd-hda-codec-objs += hda_proc.o endif diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 23201f3ee..5bee3b536 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -86,8 +86,6 @@ unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, int dire return res; } -EXPORT_SYMBOL(snd_hda_codec_read); - /** * snd_hda_codec_write - send a single command without waiting for response * @codec: the HDA codec @@ -110,8 +108,6 @@ int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct, return err; } -EXPORT_SYMBOL(snd_hda_codec_write); - /** * snd_hda_sequence_write - sequence writes * @codec: the HDA codec @@ -126,8 +122,6 @@ void snd_hda_sequence_write(struct hda_codec *codec, const struct hda_verb *seq) snd_hda_codec_write(codec, seq->nid, 0, seq->verb, seq->param); } -EXPORT_SYMBOL(snd_hda_sequence_write); - /** * snd_hda_get_sub_nodes - get the range of sub nodes * @codec: the HDA codec @@ -146,8 +140,6 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid, hda_nid_t *sta return (int)(parm & 0x7fff); } -EXPORT_SYMBOL(snd_hda_get_sub_nodes); - /** * snd_hda_get_connections - get connection list * @codec: the HDA codec @@ -264,8 +256,6 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex) return 0; } -EXPORT_SYMBOL(snd_hda_queue_unsol_event); - /* * process queueud unsolicited events */ @@ -394,7 +384,6 @@ int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp, return 0; } -EXPORT_SYMBOL(snd_hda_bus_new); /* * find a matching codec preset @@ -408,9 +397,7 @@ static const struct hda_codec_preset *find_codec_preset(struct hda_codec *codec) u32 mask = preset->mask; if (! mask) mask = ~0; - if (preset->id == (codec->vendor_id & mask) && - (! preset->rev || - preset->rev == codec->revision_id)) + if (preset->id == (codec->vendor_id & mask)) return preset; } } @@ -600,8 +587,6 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, return 0; } -EXPORT_SYMBOL(snd_hda_codec_new); - /** * snd_hda_codec_setup_stream - set up the codec for streaming * @codec: the CODEC to set up @@ -624,7 +609,6 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, u32 stre snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, format); } -EXPORT_SYMBOL(snd_hda_codec_setup_stream); /* * amp access functions @@ -1310,7 +1294,6 @@ int snd_hda_build_controls(struct hda_bus *bus) return 0; } -EXPORT_SYMBOL(snd_hda_build_controls); /* * stream formats @@ -1399,8 +1382,6 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate, return val; } -EXPORT_SYMBOL(snd_hda_calc_stream_format); - /** * snd_hda_query_supported_pcm - query the supported PCM rates and formats * @codec: the HDA codec @@ -1682,7 +1663,6 @@ int snd_hda_build_pcms(struct hda_bus *bus) return 0; } -EXPORT_SYMBOL(snd_hda_build_pcms); /** * snd_hda_check_board_config - compare the current codec with the config table @@ -2185,8 +2165,6 @@ int snd_hda_suspend(struct hda_bus *bus, pm_message_t state) return 0; } -EXPORT_SYMBOL(snd_hda_suspend); - /** * snd_hda_resume - resume the codecs * @bus: the HDA bus @@ -2209,8 +2187,6 @@ int snd_hda_resume(struct hda_bus *bus) return 0; } -EXPORT_SYMBOL(snd_hda_resume); - /** * snd_hda_resume_ctls - resume controls in the new control list * @codec: the HDA codec @@ -2270,6 +2246,25 @@ int snd_hda_resume_spdif_in(struct hda_codec *codec) } #endif +/* + * symbols exported for controller modules + */ +EXPORT_SYMBOL(snd_hda_codec_read); +EXPORT_SYMBOL(snd_hda_codec_write); +EXPORT_SYMBOL(snd_hda_sequence_write); +EXPORT_SYMBOL(snd_hda_get_sub_nodes); +EXPORT_SYMBOL(snd_hda_queue_unsol_event); +EXPORT_SYMBOL(snd_hda_bus_new); +EXPORT_SYMBOL(snd_hda_codec_new); +EXPORT_SYMBOL(snd_hda_codec_setup_stream); +EXPORT_SYMBOL(snd_hda_calc_stream_format); +EXPORT_SYMBOL(snd_hda_build_pcms); +EXPORT_SYMBOL(snd_hda_build_controls); +#ifdef CONFIG_PM +EXPORT_SYMBOL(snd_hda_suspend); +EXPORT_SYMBOL(snd_hda_resume); +#endif + /* * INIT part */ diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 79d63c99f..9dd541df6 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -82,7 +82,6 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," "{Intel, ICH8}," "{ATI, SB450}," "{ATI, SB600}," - "{ATI, RS600}," "{VIA, VT8251}," "{VIA, VT8237A}," "{SiS, SIS966}," @@ -168,12 +167,6 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; #define ULI_PLAYBACK_INDEX 5 #define ULI_NUM_PLAYBACK 6 -/* ATI HDMI has 1 playback and 0 capture */ -#define ATIHDMI_CAPTURE_INDEX 0 -#define ATIHDMI_NUM_CAPTURE 0 -#define ATIHDMI_PLAYBACK_INDEX 0 -#define ATIHDMI_NUM_PLAYBACK 1 - /* this number is statically defined for simplicity */ #define MAX_AZX_DEV 16 @@ -338,7 +331,6 @@ struct azx { enum { AZX_DRIVER_ICH, AZX_DRIVER_ATI, - AZX_DRIVER_ATIHDMI, AZX_DRIVER_VIA, AZX_DRIVER_SIS, AZX_DRIVER_ULI, @@ -348,7 +340,6 @@ enum { static char *driver_short_names[] __devinitdata = { [AZX_DRIVER_ICH] = "HDA Intel", [AZX_DRIVER_ATI] = "HDA ATI SB", - [AZX_DRIVER_ATIHDMI] = "HDA ATI HDMI", [AZX_DRIVER_VIA] = "HDA VIA VT82xx", [AZX_DRIVER_SIS] = "HDA SIS966", [AZX_DRIVER_ULI] = "HDA ULI M5461", @@ -1486,7 +1477,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, goto errout; } - if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, azx_interrupt, SA_INTERRUPT|SA_SHIRQ, "HDA Intel", (void*)chip)) { snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); err = -EBUSY; @@ -1504,12 +1495,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, chip->playback_index_offset = ULI_PLAYBACK_INDEX; chip->capture_index_offset = ULI_CAPTURE_INDEX; break; - case AZX_DRIVER_ATIHDMI: - chip->playback_streams = ATIHDMI_NUM_PLAYBACK; - chip->capture_streams = ATIHDMI_NUM_CAPTURE; - chip->playback_index_offset = ATIHDMI_PLAYBACK_INDEX; - chip->capture_index_offset = ATIHDMI_CAPTURE_INDEX; - break; default: chip->playback_streams = ICH6_NUM_PLAYBACK; chip->capture_streams = ICH6_NUM_CAPTURE; @@ -1629,14 +1614,13 @@ static void __devexit azx_remove(struct pci_dev *pci) } /* PCI IDs */ -static struct pci_device_id azx_ids[] = { +static struct pci_device_id azx_ids[] __devinitdata = { { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH6 */ { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH7 */ { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ESB2 */ { 0x8086, 0x284b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ICH }, /* ICH8 */ { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB450 */ { 0x1002, 0x4383, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATI }, /* ATI SB600 */ - { 0x1002, 0x793b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ATIHDMI }, /* ATI RS600 HDMI */ { 0x1106, 0x3288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_VIA }, /* VIA VT8251/VT8237A */ { 0x1039, 0x7502, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_SIS }, /* SIS966 */ { 0x10b9, 0x5461, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AZX_DRIVER_ULI }, /* ULI M5461 */ diff --git a/sound/pci/hda/hda_patch.h b/sound/pci/hda/hda_patch.h index 0b668793f..acaef3c81 100644 --- a/sound/pci/hda/hda_patch.h +++ b/sound/pci/hda/hda_patch.h @@ -12,8 +12,6 @@ extern struct hda_codec_preset snd_hda_preset_analog[]; extern struct hda_codec_preset snd_hda_preset_sigmatel[]; /* SiLabs 3054/3055 modem codecs */ extern struct hda_codec_preset snd_hda_preset_si3054[]; -/* ATI HDMI codecs */ -extern struct hda_codec_preset snd_hda_preset_atihdmi[]; static const struct hda_codec_preset *hda_preset_tables[] = { snd_hda_preset_realtek, @@ -21,6 +19,5 @@ static const struct hda_codec_preset *hda_preset_tables[] = { snd_hda_preset_analog, snd_hda_preset_sigmatel, snd_hda_preset_si3054, - snd_hda_preset_atihdmi, NULL }; diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index c2f0fe85b..ca514a6a5 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -182,10 +182,6 @@ static void print_pin_caps(struct snd_info_buffer *buffer, snd_iprintf(buffer, " OUT"); if (caps & AC_PINCAP_HP_DRV) snd_iprintf(buffer, " HP"); - if (caps & AC_PINCAP_EAPD) - snd_iprintf(buffer, " EAPD"); - if (caps & AC_PINCAP_PRES_DETECT) - snd_iprintf(buffer, " Detect"); snd_iprintf(buffer, "\n"); caps = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONFIG_DEFAULT, 0); snd_iprintf(buffer, " Pin Default 0x%08x: [%s] %s at %s %s\n", caps, @@ -322,7 +318,7 @@ int snd_hda_codec_proc_new(struct hda_codec *codec) if (err < 0) return err; - snd_info_set_text_ops(entry, codec, print_codec_info); + snd_info_set_text_ops(entry, codec, 32 * 1024, print_codec_info); return 0; } diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 6823f2bc1..d7343dc82 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -789,8 +789,6 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { { .modelname = "3stack", .config = AD1986A_3STACK }, { .pci_subvendor = 0x10de, .pci_subdevice = 0xcb84, .config = AD1986A_3STACK }, /* ASUS A8N-VM CSM */ - { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b3, - .config = AD1986A_3STACK }, /* ASUS P5RD2-VM / P5GPL-X SE */ { .modelname = "laptop", .config = AD1986A_LAPTOP }, { .pci_subvendor = 0x144d, .pci_subdevice = 0xc01e, .config = AD1986A_LAPTOP }, /* FSC V2060 */ @@ -799,8 +797,6 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { { .pci_subvendor = 0x1043, .pci_subdevice = 0x818f, .config = AD1986A_LAPTOP }, /* ASUS P5GV-MX */ { .modelname = "laptop-eapd", .config = AD1986A_LAPTOP_EAPD }, - { .pci_subvendor = 0x144d, .pci_subdevice = 0xc023, - .config = AD1986A_LAPTOP_EAPD }, /* Samsung X60 Chane */ { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153, @@ -813,8 +809,6 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { .config = AD1986A_LAPTOP_EAPD }, /* ASUS Z62F */ { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af, .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */ - { .pci_subvendor = 0x17aa, .pci_subdevice = 0x2066, - .config = AD1986A_LAPTOP_EAPD }, /* Lenovo 3000 N100-07684JU */ {} }; @@ -969,7 +963,7 @@ static struct snd_kcontrol_new ad1983_mixers[] = { }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", + .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route", .info = ad1983_spdif_route_info, .get = ad1983_spdif_route_get, .put = ad1983_spdif_route_put, @@ -1109,7 +1103,7 @@ static struct snd_kcontrol_new ad1981_mixers[] = { /* identical with AD1983 */ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", + .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route", .info = ad1983_spdif_route_info, .get = ad1983_spdif_route_get, .put = ad1983_spdif_route_put, @@ -1335,60 +1329,13 @@ static int ad1981_hp_init(struct hda_codec *codec) return 0; } -/* configuration for Lenovo Thinkpad T60 */ -static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { - HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Master Playback Switch", 0x05, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("PCM Playback Volume", 0x11, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("PCM Playback Switch", 0x11, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("Mic Playback Volume", 0x12, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("Mic Boost", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Capture Source", - .info = ad198x_mux_enum_info, - .get = ad198x_mux_enum_get, - .put = ad198x_mux_enum_put, - }, - /* identical with AD1983 */ - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", - .info = ad1983_spdif_route_info, - .get = ad1983_spdif_route_get, - .put = ad1983_spdif_route_put, - }, - { } /* end */ -}; - -static struct hda_input_mux ad1981_thinkpad_capture_source = { - .num_items = 3, - .items = { - { "Mic", 0x0 }, - { "Mix", 0x2 }, - { "CD", 0x4 }, - }, -}; - /* models */ -enum { AD1981_BASIC, AD1981_HP, AD1981_THINKPAD }; +enum { AD1981_BASIC, AD1981_HP }; static struct hda_board_config ad1981_cfg_tbl[] = { { .modelname = "hp", .config = AD1981_HP }, /* All HP models */ { .pci_subvendor = 0x103c, .config = AD1981_HP }, - { .pci_subvendor = 0x30b0, .pci_subdevice = 0x103c, - .config = AD1981_HP }, /* HP nx6320 (reversed SSID, H/W bug) */ - { .modelname = "thinkpad", .config = AD1981_THINKPAD }, - /* Lenovo Thinkpad T60/X60/Z6xx */ - { .pci_subvendor = 0x17aa, .config = AD1981_THINKPAD }, - { .pci_subvendor = 0x1014, .pci_subdevice = 0x0597, - .config = AD1981_THINKPAD }, /* Z60m/t */ { .modelname = "basic", .config = AD1981_BASIC }, {} }; @@ -1434,10 +1381,6 @@ static int patch_ad1981(struct hda_codec *codec) codec->patch_ops.init = ad1981_hp_init; codec->patch_ops.unsol_event = ad1981_hp_unsol_event; break; - case AD1981_THINKPAD: - spec->mixers[0] = ad1981_thinkpad_mixers; - spec->input_mux = &ad1981_thinkpad_capture_source; - break; } return 0; diff --git a/sound/pci/hda/patch_atihdmi.c b/sound/pci/hda/patch_atihdmi.c deleted file mode 100644 index a27440ffd..000000000 --- a/sound/pci/hda/patch_atihdmi.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Universal Interface for Intel High Definition Audio Codec - * - * HD audio interface patch for ATI HDMI codecs - * - * Copyright (c) 2006 ATI Technologies Inc. - * - * - * This driver 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 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include -#include -#include "hda_codec.h" -#include "hda_local.h" - -struct atihdmi_spec { - struct hda_multi_out multiout; - - struct hda_pcm pcm_rec; -}; - -static struct hda_verb atihdmi_basic_init[] = { - /* enable digital output on pin widget */ - { 0x03, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - {} /* terminator */ -}; - -/* - * Controls - */ -static int atihdmi_build_controls(struct hda_codec *codec) -{ - struct atihdmi_spec *spec = codec->spec; - int err; - - err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid); - if (err < 0) - return err; - - return 0; -} - -static int atihdmi_init(struct hda_codec *codec) -{ - snd_hda_sequence_write(codec, atihdmi_basic_init); - return 0; -} - -#ifdef CONFIG_PM -/* - * resume - */ -static int atihdmi_resume(struct hda_codec *codec) -{ - atihdmi_init(codec); - snd_hda_resume_spdif_out(codec); - - return 0; -} -#endif - -/* - * Digital out - */ -static int atihdmi_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, - struct hda_codec *codec, - struct snd_pcm_substream *substream) -{ - struct atihdmi_spec *spec = codec->spec; - return snd_hda_multi_out_dig_open(codec, &spec->multiout); -} - -static int atihdmi_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, - struct hda_codec *codec, - struct snd_pcm_substream *substream) -{ - struct atihdmi_spec *spec = codec->spec; - return snd_hda_multi_out_dig_close(codec, &spec->multiout); -} - -static struct hda_pcm_stream atihdmi_pcm_digital_playback = { - .substreams = 1, - .channels_min = 2, - .channels_max = 2, - .nid = 0x2, /* NID to query formats and rates and setup streams */ - .ops = { - .open = atihdmi_dig_playback_pcm_open, - .close = atihdmi_dig_playback_pcm_close - }, -}; - -static int atihdmi_build_pcms(struct hda_codec *codec) -{ - struct atihdmi_spec *spec = codec->spec; - struct hda_pcm *info = &spec->pcm_rec; - - codec->num_pcms = 1; - codec->pcm_info = info; - - info->name = "ATI HDMI"; - info->stream[SNDRV_PCM_STREAM_PLAYBACK] = atihdmi_pcm_digital_playback; - - return 0; -} - -static void atihdmi_free(struct hda_codec *codec) -{ - kfree(codec->spec); -} - -static struct hda_codec_ops atihdmi_patch_ops = { - .build_controls = atihdmi_build_controls, - .build_pcms = atihdmi_build_pcms, - .init = atihdmi_init, - .free = atihdmi_free, -#ifdef CONFIG_PM - .resume = atihdmi_resume, -#endif -}; - -static int patch_atihdmi(struct hda_codec *codec) -{ - struct atihdmi_spec *spec; - - spec = kzalloc(sizeof(*spec), GFP_KERNEL); - if (spec == NULL) - return -ENOMEM; - - codec->spec = spec; - - spec->multiout.num_dacs = 0; /* no analog */ - spec->multiout.max_channels = 2; - spec->multiout.dig_out_nid = 0x2; /* NID for copying analog to digital, - * seems to be unused in pure-digital - * case. */ - - codec->patch_ops = atihdmi_patch_ops; - - return 0; -} - -/* - * patch entries - */ -struct hda_codec_preset snd_hda_preset_atihdmi[] = { - { .id = 0x1002793c, .name = "ATI RS600 HDMI", .patch = patch_atihdmi }, - {} /* terminator */ -}; diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 18d105263..94cf292d9 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -78,7 +78,6 @@ enum { enum { ALC262_BASIC, ALC262_FUJITSU, - ALC262_HP_BPC, ALC262_AUTO, ALC262_MODEL_LAST /* last tag */ }; @@ -86,7 +85,6 @@ enum { /* ALC861 models */ enum { ALC861_3ST, - ALC660_3ST, ALC861_3ST_DIG, ALC861_6ST_DIG, ALC861_AUTO, @@ -101,17 +99,6 @@ enum { ALC882_MODEL_LAST, }; -/* ALC883 models */ -enum { - ALC883_3ST_2ch_DIG, - ALC883_3ST_6ch_DIG, - ALC883_3ST_6ch, - ALC883_6ST_DIG, - ALC888_DEMO_BOARD, - ALC883_AUTO, - ALC883_MODEL_LAST, -}; - /* for GPIO Poll */ #define GPIO_MASK 0x03 @@ -121,8 +108,7 @@ struct alc_spec { unsigned int num_mixers; const struct hda_verb *init_verbs[5]; /* initialization verbs - * don't forget NULL - * termination! + * don't forget NULL termination! */ unsigned int num_init_verbs; @@ -177,9 +163,7 @@ struct alc_spec { * configuration template - to be copied to the spec instance */ struct alc_config_preset { - struct snd_kcontrol_new *mixers[5]; /* should be identical size - * with spec - */ + struct snd_kcontrol_new *mixers[5]; /* should be identical size with spec */ const struct hda_verb *init_verbs[5]; unsigned int num_dacs; hda_nid_t *dac_nids; @@ -200,8 +184,7 @@ struct alc_config_preset { /* * input MUX handling */ -static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; @@ -211,8 +194,7 @@ static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); } -static int alc_mux_enum_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; @@ -222,24 +204,21 @@ static int alc_mux_enum_get(struct snd_kcontrol *kcontrol, return 0; } -static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); unsigned int mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; return snd_hda_input_mux_put(codec, &spec->input_mux[mux_idx], ucontrol, - spec->adc_nids[adc_idx], - &spec->cur_mux[adc_idx]); + spec->adc_nids[adc_idx], &spec->cur_mux[adc_idx]); } /* * channel mode setting */ -static int alc_ch_mode_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_ch_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; @@ -247,24 +226,20 @@ static int alc_ch_mode_info(struct snd_kcontrol *kcontrol, spec->num_channel_mode); } -static int alc_ch_mode_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_ch_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; return snd_hda_ch_mode_get(codec, ucontrol, spec->channel_mode, - spec->num_channel_mode, - spec->multiout.max_channels); + spec->num_channel_mode, spec->multiout.max_channels); } -static int alc_ch_mode_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, - spec->num_channel_mode, - &spec->multiout.max_channels); + spec->num_channel_mode, &spec->multiout.max_channels); } /* @@ -315,8 +290,7 @@ static signed char alc_pin_mode_dir_info[5][2] = { #define alc_pin_mode_n_items(_dir) \ (alc_pin_mode_max(_dir)-alc_pin_mode_min(_dir)+1) -static int alc_pin_mode_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_pin_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { unsigned int item_num = uinfo->value.enumerated.item; unsigned char dir = (kcontrol->private_value >> 16) & 0xff; @@ -331,46 +305,40 @@ static int alc_pin_mode_info(struct snd_kcontrol *kcontrol, return 0; } -static int alc_pin_mode_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_pin_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { unsigned int i; struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char dir = (kcontrol->private_value >> 16) & 0xff; long *valp = ucontrol->value.integer.value; - unsigned int pinctl = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_PIN_WIDGET_CONTROL, - 0x00); + unsigned int pinctl = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTROL,0x00); /* Find enumerated value for current pinctl setting */ i = alc_pin_mode_min(dir); - while (alc_pin_mode_values[i] != pinctl && i <= alc_pin_mode_max(dir)) + while (alc_pin_mode_values[i]!=pinctl && i<=alc_pin_mode_max(dir)) i++; - *valp = i <= alc_pin_mode_max(dir) ? i: alc_pin_mode_min(dir); + *valp = i<=alc_pin_mode_max(dir)?i:alc_pin_mode_min(dir); return 0; } -static int alc_pin_mode_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_pin_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { signed int change; struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char dir = (kcontrol->private_value >> 16) & 0xff; long val = *ucontrol->value.integer.value; - unsigned int pinctl = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_PIN_WIDGET_CONTROL, - 0x00); + unsigned int pinctl = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_PIN_WIDGET_CONTROL,0x00); - if (val < alc_pin_mode_min(dir) || val > alc_pin_mode_max(dir)) + if (valalc_pin_mode_max(dir)) val = alc_pin_mode_min(dir); change = pinctl != alc_pin_mode_values[val]; if (change) { /* Set pin mode to that requested */ snd_hda_codec_write(codec,nid,0,AC_VERB_SET_PIN_WIDGET_CONTROL, - alc_pin_mode_values[val]); + alc_pin_mode_values[val]); /* Also enable the retasking pin's input/output as required * for the requested pin mode. Enum values of 2 or less are @@ -383,19 +351,15 @@ static int alc_pin_mode_put(struct snd_kcontrol *kcontrol, * this turns out to be necessary in the future. */ if (val <= 2) { - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_MUTE); - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_AMP_GAIN_MUTE, - AMP_IN_UNMUTE(0)); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUTE, + AMP_OUT_MUTE); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUTE, + AMP_IN_UNMUTE(0)); } else { - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_AMP_GAIN_MUTE, - AMP_IN_MUTE(0)); - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_UNMUTE); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUTE, + AMP_IN_MUTE(0)); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_AMP_GAIN_MUTE, + AMP_OUT_UNMUTE); } } return change; @@ -414,8 +378,7 @@ static int alc_pin_mode_put(struct snd_kcontrol *kcontrol, * needed for any "production" models. */ #ifdef CONFIG_SND_DEBUG -static int alc_gpio_data_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_gpio_data_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -423,38 +386,33 @@ static int alc_gpio_data_info(struct snd_kcontrol *kcontrol, uinfo->value.integer.max = 1; return 0; } -static int alc_gpio_data_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_gpio_data_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char mask = (kcontrol->private_value >> 16) & 0xff; long *valp = ucontrol->value.integer.value; - unsigned int val = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_GPIO_DATA, 0x00); + unsigned int val = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_GPIO_DATA,0x00); *valp = (val & mask) != 0; return 0; } -static int alc_gpio_data_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { signed int change; struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char mask = (kcontrol->private_value >> 16) & 0xff; long val = *ucontrol->value.integer.value; - unsigned int gpio_data = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_GPIO_DATA, - 0x00); + unsigned int gpio_data = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_GPIO_DATA,0x00); /* Set/unset the masked GPIO bit(s) as needed */ - change = (val == 0 ? 0 : mask) != (gpio_data & mask); - if (val == 0) + change = (val==0?0:mask) != (gpio_data & mask); + if (val==0) gpio_data &= ~mask; else gpio_data |= mask; - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_GPIO_DATA, gpio_data); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_GPIO_DATA,gpio_data); return change; } @@ -474,8 +432,7 @@ static int alc_gpio_data_put(struct snd_kcontrol *kcontrol, * necessary. */ #ifdef CONFIG_SND_DEBUG -static int alc_spdif_ctrl_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_spdif_ctrl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 1; @@ -483,39 +440,33 @@ static int alc_spdif_ctrl_info(struct snd_kcontrol *kcontrol, uinfo->value.integer.max = 1; return 0; } -static int alc_spdif_ctrl_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_spdif_ctrl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char mask = (kcontrol->private_value >> 16) & 0xff; long *valp = ucontrol->value.integer.value; - unsigned int val = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_DIGI_CONVERT, 0x00); + unsigned int val = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_DIGI_CONVERT,0x00); *valp = (val & mask) != 0; return 0; } -static int alc_spdif_ctrl_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_spdif_ctrl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { signed int change; struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = kcontrol->private_value & 0xffff; unsigned char mask = (kcontrol->private_value >> 16) & 0xff; long val = *ucontrol->value.integer.value; - unsigned int ctrl_data = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_DIGI_CONVERT, - 0x00); + unsigned int ctrl_data = snd_hda_codec_read(codec,nid,0,AC_VERB_GET_DIGI_CONVERT,0x00); /* Set/unset the masked control bit(s) as needed */ - change = (val == 0 ? 0 : mask) != (ctrl_data & mask); + change = (val==0?0:mask) != (ctrl_data & mask); if (val==0) ctrl_data &= ~mask; else ctrl_data |= mask; - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, - ctrl_data); + snd_hda_codec_write(codec,nid,0,AC_VERB_SET_DIGI_CONVERT_1,ctrl_data); return change; } @@ -530,17 +481,14 @@ static int alc_spdif_ctrl_put(struct snd_kcontrol *kcontrol, /* * set up from the preset table */ -static void setup_preset(struct alc_spec *spec, - const struct alc_config_preset *preset) +static void setup_preset(struct alc_spec *spec, const struct alc_config_preset *preset) { int i; for (i = 0; i < ARRAY_SIZE(preset->mixers) && preset->mixers[i]; i++) spec->mixers[spec->num_mixers++] = preset->mixers[i]; - for (i = 0; i < ARRAY_SIZE(preset->init_verbs) && preset->init_verbs[i]; - i++) - spec->init_verbs[spec->num_init_verbs++] = - preset->init_verbs[i]; + for (i = 0; i < ARRAY_SIZE(preset->init_verbs) && preset->init_verbs[i]; i++) + spec->init_verbs[spec->num_init_verbs++] = preset->init_verbs[i]; spec->channel_mode = preset->channel_mode; spec->num_channel_mode = preset->num_channel_mode; @@ -569,8 +517,8 @@ static void setup_preset(struct alc_spec *spec, * ALC880 3-stack model * * DAC: Front = 0x02 (0x0c), Surr = 0x05 (0x0f), CLFE = 0x04 (0x0e) - * Pin assignment: Front = 0x14, Line-In/Surr = 0x1a, Mic/CLFE = 0x18, - * F-Mic = 0x1b, HP = 0x19 + * Pin assignment: Front = 0x14, Line-In/Surr = 0x1a, Mic/CLFE = 0x18, F-Mic = 0x1b + * HP = 0x19 */ static hda_nid_t alc880_dac_nids[4] = { @@ -714,8 +662,7 @@ static struct snd_kcontrol_new alc880_capture_alt_mixer[] = { /* * ALC880 5-stack model * - * DAC: Front = 0x02 (0x0c), Surr = 0x05 (0x0f), CLFE = 0x04 (0x0d), - * Side = 0x02 (0xd) + * DAC: Front = 0x02 (0x0c), Surr = 0x05 (0x0f), CLFE = 0x04 (0x0d), Side = 0x02 (0xd) * Pin assignment: Front = 0x14, Surr = 0x17, CLFE = 0x16 * Line-In/Side = 0x1a, Mic = 0x18, F-Mic = 0x1b, HP = 0x19 */ @@ -753,8 +700,7 @@ static struct hda_channel_mode alc880_fivestack_modes[2] = { /* * ALC880 6-stack model * - * DAC: Front = 0x02 (0x0c), Surr = 0x03 (0x0d), CLFE = 0x04 (0x0e), - * Side = 0x05 (0x0f) + * DAC: Front = 0x02 (0x0c), Surr = 0x03 (0x0d), CLFE = 0x04 (0x0e), Side = 0x05 (0x0f) * Pin assignment: Front = 0x14, Surr = 0x15, CLFE = 0x16, Side = 0x17, * Mic = 0x18, F-Mic = 0x19, Line = 0x1a, HP = 0x1b */ @@ -865,8 +811,7 @@ static struct snd_kcontrol_new alc880_w810_base_mixer[] = { * Z710V model * * DAC: Front = 0x02 (0x0c), HP = 0x03 (0x0d) - * Pin assignment: Front = 0x14, HP = 0x15, Mic = 0x18, Mic2 = 0x19(?), - * Line = 0x1a + * Pin assignment: Front = 0x14, HP = 0x15, Mic = 0x18, Mic2 = 0x19(?), Line = 0x1a */ static hda_nid_t alc880_z71v_dac_nids[1] = { @@ -1021,8 +966,7 @@ static int alc_build_controls(struct hda_codec *codec) } if (spec->multiout.dig_out_nid) { - err = snd_hda_create_spdif_out_ctls(codec, - spec->multiout.dig_out_nid); + err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid); if (err < 0) return err; } @@ -1055,8 +999,8 @@ static struct hda_verb alc880_volume_init_verbs[] = { /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback * mixer widget - * Note: PASD motherboards uses the Line In 2 as the input for front - * panel mic (mic 2) + * Note: PASD motherboards uses the Line In 2 as the input for front panel + * mic (mic 2) */ /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, @@ -1210,8 +1154,8 @@ static struct hda_verb alc880_pin_z71v_init_verbs[] = { /* * 6-stack pin configuration: - * front = 0x14, surr = 0x15, clfe = 0x16, side = 0x17, mic = 0x18, - * f-mic = 0x19, line = 0x1a, HP = 0x1b + * front = 0x14, surr = 0x15, clfe = 0x16, side = 0x17, mic = 0x18, f-mic = 0x19, + * line = 0x1a, HP = 0x1b */ static struct hda_verb alc880_pin_6stack_init_verbs[] = { {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ @@ -1643,8 +1587,8 @@ static int alc880_playback_pcm_prepare(struct hda_pcm_stream *hinfo, struct snd_pcm_substream *substream) { struct alc_spec *spec = codec->spec; - return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, - stream_tag, format, substream); + return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, + format, substream); } static int alc880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, @@ -1696,8 +1640,7 @@ static int alc880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, { struct alc_spec *spec = codec->spec; - snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], - 0, 0, 0); + snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], 0, 0, 0); return 0; } @@ -1879,8 +1822,7 @@ static struct hda_channel_mode alc880_test_modes[4] = { { 8, NULL }, }; -static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static char *texts[] = { "N/A", "Line Out", "HP Out", @@ -1895,8 +1837,7 @@ static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol, return 0; } -static int alc_test_pin_ctl_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_test_pin_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = (hda_nid_t)kcontrol->private_value; @@ -1922,8 +1863,7 @@ static int alc_test_pin_ctl_get(struct snd_kcontrol *kcontrol, return 0; } -static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = (hda_nid_t)kcontrol->private_value; @@ -1941,18 +1881,15 @@ static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol, AC_VERB_GET_PIN_WIDGET_CONTROL, 0); new_ctl = ctls[ucontrol->value.enumerated.item[0]]; if (old_ctl != new_ctl) { - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, new_ctl); + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, new_ctl); snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, - (ucontrol->value.enumerated.item[0] >= 3 ? - 0xb080 : 0xb000)); + ucontrol->value.enumerated.item[0] >= 3 ? 0xb080 : 0xb000); return 1; } return 0; } -static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) +static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static char *texts[] = { "Front", "Surround", "CLFE", "Side" @@ -1966,8 +1903,7 @@ static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol, return 0; } -static int alc_test_pin_src_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_test_pin_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = (hda_nid_t)kcontrol->private_value; @@ -1978,8 +1914,7 @@ static int alc_test_pin_src_get(struct snd_kcontrol *kcontrol, return 0; } -static int alc_test_pin_src_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) +static int alc_test_pin_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); hda_nid_t nid = (hda_nid_t)kcontrol->private_value; @@ -2239,7 +2174,6 @@ static struct hda_board_config alc880_cfg_tbl[] = { { .modelname = "lg", .config = ALC880_LG }, { .pci_subvendor = 0x1854, .pci_subdevice = 0x003b, .config = ALC880_LG }, - { .pci_subvendor = 0x1854, .pci_subdevice = 0x0068, .config = ALC880_LG }, { .modelname = "lg-lw", .config = ALC880_LG_LW }, { .pci_subvendor = 0x1854, .pci_subdevice = 0x0018, .config = ALC880_LG_LW }, @@ -2804,8 +2738,7 @@ static int patch_alc880(struct hda_codec *codec) board_config = snd_hda_check_board_config(codec, alc880_cfg_tbl); if (board_config < 0 || board_config >= ALC880_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC880, " - "trying auto-probe from BIOS...\n"); + printk(KERN_INFO "hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...\n"); board_config = ALC880_AUTO; } @@ -2816,9 +2749,7 @@ static int patch_alc880(struct hda_codec *codec) alc_free(codec); return err; } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using 3-stack mode...\n"); + printk(KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using 3-stack mode...\n"); board_config = ALC880_3ST; } } @@ -3174,7 +3105,6 @@ static struct hda_verb alc260_init_verbs[] = { { } }; -#if 0 /* should be identical with alc260_init_verbs? */ static struct hda_verb alc260_hp_init_verbs[] = { /* Headphone and output */ {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, @@ -3221,7 +3151,6 @@ static struct hda_verb alc260_hp_init_verbs[] = { {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))}, { } }; -#endif static struct hda_verb alc260_hp_3013_init_verbs[] = { /* Line out and output */ @@ -3893,10 +3822,6 @@ static struct hda_board_config alc260_cfg_tbl[] = { { .modelname = "basic", .config = ALC260_BASIC }, { .pci_subvendor = 0x104d, .pci_subdevice = 0x81bb, .config = ALC260_BASIC }, /* Sony VAIO */ - { .pci_subvendor = 0x104d, .pci_subdevice = 0x81cc, - .config = ALC260_BASIC }, /* Sony VAIO VGN-S3HP */ - { .pci_subvendor = 0x104d, .pci_subdevice = 0x81cd, - .config = ALC260_BASIC }, /* Sony VAIO */ { .pci_subvendor = 0x152d, .pci_subdevice = 0x0729, .config = ALC260_BASIC }, /* CTL Travel Master U553W */ { .modelname = "hp", .config = ALC260_HP }, @@ -3937,7 +3862,7 @@ static struct alc_config_preset alc260_presets[] = { .mixers = { alc260_base_output_mixer, alc260_input_mixer, alc260_capture_alt_mixer }, - .init_verbs = { alc260_init_verbs }, + .init_verbs = { alc260_hp_init_verbs }, .num_dacs = ARRAY_SIZE(alc260_dac_nids), .dac_nids = alc260_dac_nids, .num_adc_nids = ARRAY_SIZE(alc260_hp_adc_nids), @@ -4015,8 +3940,7 @@ static int patch_alc260(struct hda_codec *codec) board_config = snd_hda_check_board_config(codec, alc260_cfg_tbl); if (board_config < 0 || board_config >= ALC260_MODEL_LAST) { - snd_printd(KERN_INFO "hda_codec: Unknown model for ALC260, " - "trying auto-probe from BIOS...\n"); + snd_printd(KERN_INFO "hda_codec: Unknown model for ALC260\n"); board_config = ALC260_AUTO; } @@ -4027,9 +3951,7 @@ static int patch_alc260(struct hda_codec *codec) alc_free(codec); return err; } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using base mode...\n"); + printk(KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using base mode...\n"); board_config = ALC260_BASIC; } } @@ -4172,6 +4094,21 @@ static struct snd_kcontrol_new alc882_base_mixer[] = { HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), + HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x08, 0x0, HDA_INPUT), + HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x08, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME_IDX("Capture Volume", 2, 0x09, 0x0, HDA_INPUT), + HDA_CODEC_MUTE_IDX("Capture Switch", 2, 0x09, 0x0, HDA_INPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + /* .name = "Capture Source", */ + .name = "Input Source", + .count = 3, + .info = alc882_mux_enum_info, + .get = alc882_mux_enum_get, + .put = alc882_mux_enum_put, + }, { } /* end */ }; @@ -4391,12 +4328,9 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = { static struct hda_board_config alc882_cfg_tbl[] = { { .modelname = "3stack-dig", .config = ALC882_3ST_DIG }, { .modelname = "6stack-dig", .config = ALC882_6ST_DIG }, - { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, - .config = ALC882_6ST_DIG }, /* MSI */ - { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, - .config = ALC882_6ST_DIG }, /* Foxconn */ - { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, - .config = ALC882_6ST_DIG }, /* ECS to Intel*/ + { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* MSI */ + { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* Foxconn */ + { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, .config = ALC882_6ST_DIG }, /* ECS */ { .modelname = "auto", .config = ALC882_AUTO }, {} }; @@ -4408,6 +4342,8 @@ static struct alc_config_preset alc882_presets[] = { .num_dacs = ARRAY_SIZE(alc882_dac_nids), .dac_nids = alc882_dac_nids, .dig_out_nid = ALC882_DIGOUT_NID, + .num_adc_nids = ARRAY_SIZE(alc882_adc_nids), + .adc_nids = alc882_adc_nids, .dig_in_nid = ALC882_DIGIN_NID, .num_channel_mode = ARRAY_SIZE(alc882_ch_modes), .channel_mode = alc882_ch_modes, @@ -4419,6 +4355,8 @@ static struct alc_config_preset alc882_presets[] = { .num_dacs = ARRAY_SIZE(alc882_dac_nids), .dac_nids = alc882_dac_nids, .dig_out_nid = ALC882_DIGOUT_NID, + .num_adc_nids = ARRAY_SIZE(alc882_adc_nids), + .adc_nids = alc882_adc_nids, .dig_in_nid = ALC882_DIGIN_NID, .num_channel_mode = ARRAY_SIZE(alc882_sixstack_modes), .channel_mode = alc882_sixstack_modes, @@ -4513,6 +4451,10 @@ static void alc882_auto_init(struct hda_codec *codec) alc882_auto_init_analog_input(codec); } +/* + * ALC882 Headphone poll in 3.5.1a or 3.5.2 + */ + static int patch_alc882(struct hda_codec *codec) { struct alc_spec *spec; @@ -4527,8 +4469,7 @@ static int patch_alc882(struct hda_codec *codec) board_config = snd_hda_check_board_config(codec, alc882_cfg_tbl); if (board_config < 0 || board_config >= ALC882_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC882, " - "trying auto-probe from BIOS...\n"); + printk(KERN_INFO "hda_codec: Unknown model for ALC882, trying auto-probe from BIOS...\n"); board_config = ALC882_AUTO; } @@ -4539,9 +4480,7 @@ static int patch_alc882(struct hda_codec *codec) alc_free(codec); return err; } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using base mode...\n"); + printk(KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using base mode...\n"); board_config = ALC882_3ST_DIG; } } @@ -4582,818 +4521,139 @@ static int patch_alc882(struct hda_codec *codec) } /* - * ALC883 support - * - * ALC883 is almost identical with ALC880 but has cleaner and more flexible - * configuration. Each pin widget can choose any input DACs and a mixer. - * Each ADC is connected from a mixer of all inputs. This makes possible - * 6-channel independent captures. - * - * In addition, an independent DAC for the multi-playback (not used in this - * driver yet). + * ALC262 support */ -#define ALC883_DIGOUT_NID 0x06 -#define ALC883_DIGIN_NID 0x0a -static hda_nid_t alc883_dac_nids[4] = { - /* front, rear, clfe, rear_surr */ - 0x02, 0x04, 0x03, 0x05 -}; +#define ALC262_DIGOUT_NID ALC880_DIGOUT_NID +#define ALC262_DIGIN_NID ALC880_DIGIN_NID -static hda_nid_t alc883_adc_nids[2] = { - /* ADC1-2 */ - 0x08, 0x09, -}; -/* input MUX */ -/* FIXME: should be a matrix-type input source selection */ +#define alc262_dac_nids alc260_dac_nids +#define alc262_adc_nids alc882_adc_nids +#define alc262_adc_nids_alt alc882_adc_nids_alt -static struct hda_input_mux alc883_capture_source = { - .num_items = 4, - .items = { - { "Mic", 0x0 }, - { "Front Mic", 0x1 }, - { "Line", 0x2 }, - { "CD", 0x4 }, - }, +#define alc262_modes alc260_modes +#define alc262_capture_source alc882_capture_source + +static struct snd_kcontrol_new alc262_base_mixer[] = { + HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), + /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), + HDA_CODEC_MUTE("PC Beelp Playback Switch", 0x0b, 0x05, HDA_INPUT), */ + HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), + { } /* end */ }; -#define alc883_mux_enum_info alc_mux_enum_info -#define alc883_mux_enum_get alc_mux_enum_get -static int alc883_mux_enum_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct hda_codec *codec = snd_kcontrol_chip(kcontrol); - struct alc_spec *spec = codec->spec; - const struct hda_input_mux *imux = spec->input_mux; - unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); - static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 }; - hda_nid_t nid = capture_mixers[adc_idx]; - unsigned int *cur_val = &spec->cur_mux[adc_idx]; - unsigned int i, idx; +#define alc262_capture_mixer alc882_capture_mixer +#define alc262_capture_alt_mixer alc882_capture_alt_mixer - idx = ucontrol->value.enumerated.item[0]; - if (idx >= imux->num_items) - idx = imux->num_items - 1; - if (*cur_val == idx && ! codec->in_resume) - return 0; - for (i = 0; i < imux->num_items; i++) { - unsigned int v = (i == idx) ? 0x7000 : 0x7080; - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, - v | (imux->items[i].index << 8)); - } - *cur_val = idx; - return 1; -} /* - * 2ch mode + * generic initialization of ADC, input mixers and output mixers */ -static struct hda_channel_mode alc883_3ST_2ch_modes[1] = { - { 2, NULL } -}; +static struct hda_verb alc262_init_verbs[] = { + /* + * Unmute ADC0-2 and set the default input to mic-in + */ + {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, -/* - * 2ch mode - */ -static struct hda_verb alc883_3ST_ch2_init[] = { - { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, - { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, - { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, - { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, - { } /* end */ -}; + /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback + * mixer widget + * Note: PASD motherboards uses the Line In 2 as the input for front panel + * mic (mic 2) + */ + /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, -/* - * 6ch mode - */ -static struct hda_verb alc883_3ST_ch6_init[] = { - { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, - { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, - { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, - { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, - { } /* end */ -}; + /* + * Set up output mixers (0x0c - 0x0e) + */ + /* set vol=0 to output mixers */ + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, + {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, + {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, + /* set up input amps for analog loopback */ + /* Amp Indices: DAC = 0, mixer = 1 */ + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, -static struct hda_channel_mode alc883_3ST_6ch_modes[2] = { - { 2, alc883_3ST_ch2_init }, - { 6, alc883_3ST_ch6_init }, -}; + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, + {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, + {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, + {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, + {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, -/* - * 6ch mode - */ -static struct hda_verb alc883_sixstack_ch6_init[] = { - { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, - { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { } /* end */ + {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, + + {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, + + /* FIXME: use matrix-type input source selection */ + /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ + /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ + {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, + {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, + {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, + {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, + /* Input mixer2 */ + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, + {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, + /* Input mixer3 */ + {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, + {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, + {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, + {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, + + { } }; /* - * 8ch mode + * fujitsu model + * 0x14 = headphone/spdif-out, 0x15 = internal speaker */ -static struct hda_verb alc883_sixstack_ch8_init[] = { - { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - { } /* end */ -}; -static struct hda_channel_mode alc883_sixstack_modes[2] = { - { 6, alc883_sixstack_ch6_init }, - { 8, alc883_sixstack_ch8_init }, -}; +#define ALC_HP_EVENT 0x37 -/* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17 - * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b - */ +static struct hda_verb alc262_fujitsu_unsol_verbs[] = { + {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, + {} +}; -static struct snd_kcontrol_new alc883_base_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), - HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), - HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), - HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), - HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), - HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), - HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* .name = "Capture Source", */ - .name = "Input Source", - .count = 2, - .info = alc883_mux_enum_info, - .get = alc883_mux_enum_get, - .put = alc883_mux_enum_put, - }, - { } /* end */ -}; - -static struct snd_kcontrol_new alc883_3ST_2ch_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), - HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), - HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* .name = "Capture Source", */ - .name = "Input Source", - .count = 2, - .info = alc883_mux_enum_info, - .get = alc883_mux_enum_get, - .put = alc883_mux_enum_put, - }, - { } /* end */ -}; - -static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), - HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), - HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), - HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), - HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), - HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), - HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), - HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* .name = "Capture Source", */ - .name = "Input Source", - .count = 2, - .info = alc883_mux_enum_info, - .get = alc883_mux_enum_get, - .put = alc883_mux_enum_put, - }, - { } /* end */ -}; - -static struct snd_kcontrol_new alc883_chmode_mixer[] = { - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Channel Mode", - .info = alc_ch_mode_info, - .get = alc_ch_mode_get, - .put = alc_ch_mode_put, - }, - { } /* end */ -}; - -static struct hda_verb alc883_init_verbs[] = { - /* ADC1: mute amp left and right */ - {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, - /* ADC2: mute amp left and right */ - {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, - /* Front mixer: unmute input/output amp left and right (volume = 0) */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, - /* Rear mixer */ - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, - /* CLFE mixer */ - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, - /* Side mixer */ - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, - - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - - /* Front Pin: output 0 (0x0c) */ - {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, - /* Rear Pin: output 1 (0x0d) */ - {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, - /* CLFE Pin: output 2 (0x0e) */ - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x16, AC_VERB_SET_CONNECT_SEL, 0x02}, - /* Side Pin: output 3 (0x0f) */ - {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x17, AC_VERB_SET_CONNECT_SEL, 0x03}, - /* Mic (rear) pin: input vref at 80% */ - {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, - {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, - /* Front Mic pin: input vref at 80% */ - {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, - {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, - /* Line In pin: input */ - {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, - {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, - /* Line-2 In: Headphone output (output 0 - 0x0c) */ - {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, - {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, - {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, - /* CD pin widget for input */ - {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, - - /* FIXME: use matrix-type input source selection */ - /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ - /* Input mixer2 */ - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - /* Input mixer3 */ - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - { } -}; - -/* - * generic initialization of ADC, input mixers and output mixers - */ -static struct hda_verb alc883_auto_init_verbs[] = { - /* - * Unmute ADC0-2 and set the default input to mic-in - */ - {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - - /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback - * mixer widget - * Note: PASD motherboards uses the Line In 2 as the input for front panel - * mic (mic 2) - */ - /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - - /* - * Set up output mixers (0x0c - 0x0f) - */ - /* set vol=0 to output mixers */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - /* set up input amps for analog loopback */ - /* Amp Indices: DAC = 0, mixer = 1 */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x26, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x26, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - - /* FIXME: use matrix-type input source selection */ - /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ - /* Input mixer1 */ - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - //{0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - /* Input mixer2 */ - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - //{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - - { } -}; - -/* capture mixer elements */ -static struct snd_kcontrol_new alc883_capture_mixer[] = { - HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), - HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - /* The multiple "Capture Source" controls confuse alsamixer - * So call somewhat different.. - * FIXME: the controls appear in the "playback" view! - */ - /* .name = "Capture Source", */ - .name = "Input Source", - .count = 2, - .info = alc882_mux_enum_info, - .get = alc882_mux_enum_get, - .put = alc882_mux_enum_put, - }, - { } /* end */ -}; - -/* pcm configuration: identiacal with ALC880 */ -#define alc883_pcm_analog_playback alc880_pcm_analog_playback -#define alc883_pcm_analog_capture alc880_pcm_analog_capture -#define alc883_pcm_digital_playback alc880_pcm_digital_playback -#define alc883_pcm_digital_capture alc880_pcm_digital_capture - -/* - * configuration and preset - */ -static struct hda_board_config alc883_cfg_tbl[] = { - { .modelname = "3stack-dig", .config = ALC883_3ST_2ch_DIG }, - { .modelname = "6stack-dig", .config = ALC883_6ST_DIG }, - { .modelname = "6stack-dig-demo", .config = ALC888_DEMO_BOARD }, - { .pci_subvendor = 0x1462, .pci_subdevice = 0x6668, - .config = ALC883_6ST_DIG }, /* MSI */ - { .pci_subvendor = 0x105b, .pci_subdevice = 0x6668, - .config = ALC883_6ST_DIG }, /* Foxconn */ - { .pci_subvendor = 0x1019, .pci_subdevice = 0x6668, - .config = ALC883_3ST_6ch_DIG }, /* ECS to Intel*/ - { .pci_subvendor = 0x108e, .pci_subdevice = 0x534d, - .config = ALC883_3ST_6ch }, - { .modelname = "auto", .config = ALC883_AUTO }, - {} -}; - -static struct alc_config_preset alc883_presets[] = { - [ALC883_3ST_2ch_DIG] = { - .mixers = { alc883_3ST_2ch_mixer }, - .init_verbs = { alc883_init_verbs }, - .num_dacs = ARRAY_SIZE(alc883_dac_nids), - .dac_nids = alc883_dac_nids, - .dig_out_nid = ALC883_DIGOUT_NID, - .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), - .adc_nids = alc883_adc_nids, - .dig_in_nid = ALC883_DIGIN_NID, - .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), - .channel_mode = alc883_3ST_2ch_modes, - .input_mux = &alc883_capture_source, - }, - [ALC883_3ST_6ch_DIG] = { - .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, - .init_verbs = { alc883_init_verbs }, - .num_dacs = ARRAY_SIZE(alc883_dac_nids), - .dac_nids = alc883_dac_nids, - .dig_out_nid = ALC883_DIGOUT_NID, - .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), - .adc_nids = alc883_adc_nids, - .dig_in_nid = ALC883_DIGIN_NID, - .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), - .channel_mode = alc883_3ST_6ch_modes, - .input_mux = &alc883_capture_source, - }, - [ALC883_3ST_6ch] = { - .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, - .init_verbs = { alc883_init_verbs }, - .num_dacs = ARRAY_SIZE(alc883_dac_nids), - .dac_nids = alc883_dac_nids, - .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), - .adc_nids = alc883_adc_nids, - .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), - .channel_mode = alc883_3ST_6ch_modes, - .input_mux = &alc883_capture_source, - }, - [ALC883_6ST_DIG] = { - .mixers = { alc883_base_mixer, alc883_chmode_mixer }, - .init_verbs = { alc883_init_verbs }, - .num_dacs = ARRAY_SIZE(alc883_dac_nids), - .dac_nids = alc883_dac_nids, - .dig_out_nid = ALC883_DIGOUT_NID, - .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), - .adc_nids = alc883_adc_nids, - .dig_in_nid = ALC883_DIGIN_NID, - .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), - .channel_mode = alc883_sixstack_modes, - .input_mux = &alc883_capture_source, - }, - [ALC888_DEMO_BOARD] = { - .mixers = { alc883_base_mixer, alc883_chmode_mixer }, - .init_verbs = { alc883_init_verbs }, - .num_dacs = ARRAY_SIZE(alc883_dac_nids), - .dac_nids = alc883_dac_nids, - .dig_out_nid = ALC883_DIGOUT_NID, - .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), - .adc_nids = alc883_adc_nids, - .dig_in_nid = ALC883_DIGIN_NID, - .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), - .channel_mode = alc883_sixstack_modes, - .input_mux = &alc883_capture_source, - }, -}; - - -/* - * BIOS auto configuration - */ -static void alc883_auto_set_output_and_unmute(struct hda_codec *codec, - hda_nid_t nid, int pin_type, - int dac_idx) -{ - /* set as output */ - struct alc_spec *spec = codec->spec; - int idx; - - if (spec->multiout.dac_nids[dac_idx] == 0x25) - idx = 4; - else - idx = spec->multiout.dac_nids[dac_idx] - 2; - - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, - pin_type); - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_UNMUTE); - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); - -} - -static void alc883_auto_init_multi_out(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - int i; - - for (i = 0; i <= HDA_SIDE; i++) { - hda_nid_t nid = spec->autocfg.line_out_pins[i]; - if (nid) - alc883_auto_set_output_and_unmute(codec, nid, PIN_OUT, i); - } -} - -static void alc883_auto_init_hp_out(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - hda_nid_t pin; - - pin = spec->autocfg.hp_pin; - if (pin) /* connect to front */ - /* use dac 0 */ - alc883_auto_set_output_and_unmute(codec, pin, PIN_HP, 0); -} - -#define alc883_is_input_pin(nid) alc880_is_input_pin(nid) -#define ALC883_PIN_CD_NID ALC880_PIN_CD_NID - -static void alc883_auto_init_analog_input(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - int i; - - for (i = 0; i < AUTO_PIN_LAST; i++) { - hda_nid_t nid = spec->autocfg.input_pins[i]; - if (alc883_is_input_pin(nid)) { - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, - (i <= AUTO_PIN_FRONT_MIC ? - PIN_VREF80 : PIN_IN)); - if (nid != ALC883_PIN_CD_NID) - snd_hda_codec_write(codec, nid, 0, - AC_VERB_SET_AMP_GAIN_MUTE, - AMP_OUT_MUTE); - } - } -} - -/* almost identical with ALC880 parser... */ -static int alc883_parse_auto_config(struct hda_codec *codec) -{ - struct alc_spec *spec = codec->spec; - int err = alc880_parse_auto_config(codec); - - if (err < 0) - return err; - else if (err > 0) - /* hack - override the init verbs */ - spec->init_verbs[0] = alc883_auto_init_verbs; - spec->mixers[spec->num_mixers] = alc883_capture_mixer; - spec->num_mixers++; - return err; -} - -/* additional initialization for auto-configuration model */ -static void alc883_auto_init(struct hda_codec *codec) -{ - alc883_auto_init_multi_out(codec); - alc883_auto_init_hp_out(codec); - alc883_auto_init_analog_input(codec); -} - -static int patch_alc883(struct hda_codec *codec) -{ - struct alc_spec *spec; - int err, board_config; - - spec = kzalloc(sizeof(*spec), GFP_KERNEL); - if (spec == NULL) - return -ENOMEM; - - codec->spec = spec; - - board_config = snd_hda_check_board_config(codec, alc883_cfg_tbl); - if (board_config < 0 || board_config >= ALC883_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC883, " - "trying auto-probe from BIOS...\n"); - board_config = ALC883_AUTO; - } - - if (board_config == ALC883_AUTO) { - /* automatic parse from the BIOS config */ - err = alc883_parse_auto_config(codec); - if (err < 0) { - alc_free(codec); - return err; - } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using base mode...\n"); - board_config = ALC883_3ST_2ch_DIG; - } - } - - if (board_config != ALC883_AUTO) - setup_preset(spec, &alc883_presets[board_config]); - - spec->stream_name_analog = "ALC883 Analog"; - spec->stream_analog_playback = &alc883_pcm_analog_playback; - spec->stream_analog_capture = &alc883_pcm_analog_capture; - - spec->stream_name_digital = "ALC883 Digital"; - spec->stream_digital_playback = &alc883_pcm_digital_playback; - spec->stream_digital_capture = &alc883_pcm_digital_capture; - - spec->adc_nids = alc883_adc_nids; - spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids); - - codec->patch_ops = alc_patch_ops; - if (board_config == ALC883_AUTO) - spec->init_hook = alc883_auto_init; - - return 0; -} - -/* - * ALC262 support - */ - -#define ALC262_DIGOUT_NID ALC880_DIGOUT_NID -#define ALC262_DIGIN_NID ALC880_DIGIN_NID - -#define alc262_dac_nids alc260_dac_nids -#define alc262_adc_nids alc882_adc_nids -#define alc262_adc_nids_alt alc882_adc_nids_alt - -#define alc262_modes alc260_modes -#define alc262_capture_source alc882_capture_source - -static struct snd_kcontrol_new alc262_base_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), - HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), - /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("PC Beelp Playback Switch", 0x0b, 0x05, HDA_INPUT), */ - HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), - { } /* end */ -}; - -static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = { - HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), - HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), - - HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), - HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), - HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), - HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT), - HDA_CODEC_VOLUME("AUX IN Playback Volume", 0x0b, 0x06, HDA_INPUT), - HDA_CODEC_MUTE("AUX IN Playback Switch", 0x0b, 0x06, HDA_INPUT), - { } /* end */ -}; - -#define alc262_capture_mixer alc882_capture_mixer -#define alc262_capture_alt_mixer alc882_capture_alt_mixer - -/* - * generic initialization of ADC, input mixers and output mixers - */ -static struct hda_verb alc262_init_verbs[] = { - /* - * Unmute ADC0-2 and set the default input to mic-in - */ - {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - - /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback - * mixer widget - * Note: PASD motherboards uses the Line In 2 as the input for front panel - * mic (mic 2) - */ - /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - - /* - * Set up output mixers (0x0c - 0x0e) - */ - /* set vol=0 to output mixers */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - /* set up input amps for analog loopback */ - /* Amp Indices: DAC = 0, mixer = 1 */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - - {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, - {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, - {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, - {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, - {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, - - {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, - {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, - {0x16, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, - {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, - {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000}, - - {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, - - /* FIXME: use matrix-type input source selection */ - /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ - /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, - /* Input mixer2 */ - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, - /* Input mixer3 */ - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x03 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x04 << 8))}, - - { } -}; - -/* - * fujitsu model - * 0x14 = headphone/spdif-out, 0x15 = internal speaker - */ - -#define ALC_HP_EVENT 0x37 - -static struct hda_verb alc262_fujitsu_unsol_verbs[] = { - {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, - {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, - {} -}; - -static struct hda_input_mux alc262_fujitsu_capture_source = { - .num_items = 2, - .items = { - { "Mic", 0x0 }, - { "CD", 0x4 }, - }, -}; - -static struct hda_input_mux alc262_HP_capture_source = { - .num_items = 5, - .items = { - { "Mic", 0x0 }, - { "Front Mic", 0x3 }, - { "Line", 0x2 }, - { "CD", 0x4 }, - { "AUX IN", 0x6 }, +static struct hda_input_mux alc262_fujitsu_capture_source = { + .num_items = 2, + .items = { + { "Mic", 0x0 }, + { "CD", 0x4 }, }, }; @@ -5620,93 +4880,6 @@ static struct hda_verb alc262_volume_init_verbs[] = { { } }; -static struct hda_verb alc262_HP_BPC_init_verbs[] = { - /* - * Unmute ADC0-2 and set the default input to mic-in - */ - {0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - - /* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback - * mixer widget - * Note: PASD motherboards uses the Line In 2 as the input for front panel - * mic (mic 2) - */ - /* Amp Indices: Mic1 = 0, Mic2 = 1, Line1 = 2, Line2 = 3, CD = 4 */ - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)}, - {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)}, - - /* - * Set up output mixers (0x0c - 0x0e) - */ - /* set vol=0 to output mixers */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, - - /* set up input amps for analog loopback */ - /* Amp Indices: DAC = 0, mixer = 1 */ - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, - {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, - - {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, - {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, - - {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, - {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, - - {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, - {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, - - {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, - {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, - {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, - {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, - {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20}, - - {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7023 }, - {0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 }, - {0x19, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 }, - {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 0x7023 }, - {0x1c, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 }, - {0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000 }, - - - /* FIXME: use matrix-type input source selection */ - /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */ - /* Input mixer1: unmute Mic, F-Mic, Line, CD inputs */ - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, - {0x24, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, - /* Input mixer2 */ - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, - {0x23, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, - /* Input mixer3 */ - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x03 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8))}, - {0x22, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x04 << 8))}, - - { } -}; - /* pcm configuration: identiacal with ALC880 */ #define alc262_pcm_analog_playback alc880_pcm_analog_playback #define alc262_pcm_analog_capture alc880_pcm_analog_capture @@ -5767,16 +4940,7 @@ static void alc262_auto_init(struct hda_codec *codec) static struct hda_board_config alc262_cfg_tbl[] = { { .modelname = "basic", .config = ALC262_BASIC }, { .modelname = "fujitsu", .config = ALC262_FUJITSU }, - { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, - .config = ALC262_FUJITSU }, - { .pci_subvendor = 0x103c, .pci_subdevice = 0x208c, - .config = ALC262_HP_BPC }, /* xw4400 */ - { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, - .config = ALC262_HP_BPC }, /* xw6400 */ - { .pci_subvendor = 0x103c, .pci_subdevice = 0x3015, - .config = ALC262_HP_BPC }, /* xw8400 */ - { .pci_subvendor = 0x103c, .pci_subdevice = 0x12fe, - .config = ALC262_HP_BPC }, /* xw9400 */ + { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, .config = ALC262_FUJITSU }, { .modelname = "auto", .config = ALC262_AUTO }, {} }; @@ -5804,16 +4968,6 @@ static struct alc_config_preset alc262_presets[] = { .input_mux = &alc262_fujitsu_capture_source, .unsol_event = alc262_fujitsu_unsol_event, }, - [ALC262_HP_BPC] = { - .mixers = { alc262_HP_BPC_mixer }, - .init_verbs = { alc262_HP_BPC_init_verbs }, - .num_dacs = ARRAY_SIZE(alc262_dac_nids), - .dac_nids = alc262_dac_nids, - .hp_nid = 0x03, - .num_channel_mode = ARRAY_SIZE(alc262_modes), - .channel_mode = alc262_modes, - .input_mux = &alc262_HP_capture_source, - }, }; static int patch_alc262(struct hda_codec *codec) @@ -5839,10 +4993,8 @@ static int patch_alc262(struct hda_codec *codec) #endif board_config = snd_hda_check_board_config(codec, alc262_cfg_tbl); - if (board_config < 0 || board_config >= ALC262_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC262, " - "trying auto-probe from BIOS...\n"); + printk(KERN_INFO "hda_codec: Unknown model for ALC262, trying auto-probe from BIOS...\n"); board_config = ALC262_AUTO; } @@ -5853,9 +5005,7 @@ static int patch_alc262(struct hda_codec *codec) alc_free(codec); return err; } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using base mode...\n"); + printk(KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using base mode...\n"); board_config = ALC262_BASIC; } } @@ -5896,6 +5046,7 @@ static int patch_alc262(struct hda_codec *codec) return 0; } + /* * ALC861 channel source setting (2/6 channel selection for 3-stack) */ @@ -5910,11 +5061,9 @@ static struct hda_verb alc861_threestack_ch2_init[] = { /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, -#if 0 - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/ -#endif + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, //mic + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, //line in { } /* end */ }; /* @@ -5928,13 +5077,11 @@ static struct hda_verb alc861_threestack_ch6_init[] = { { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 }, - { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, -#if 0 - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ - { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ -#endif + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, //mic + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, //line in { } /* end */ }; @@ -6218,11 +5365,6 @@ static hda_nid_t alc861_dac_nids[4] = { 0x03, 0x06, 0x05, 0x04 }; -static hda_nid_t alc660_dac_nids[3] = { - /* front, clfe, surround */ - 0x03, 0x05, 0x06 -}; - static hda_nid_t alc861_adc_nids[1] = { /* ADC0-2 */ 0x08, @@ -6475,10 +5617,7 @@ static void alc861_auto_init(struct hda_codec *codec) */ static struct hda_board_config alc861_cfg_tbl[] = { { .modelname = "3stack", .config = ALC861_3ST }, - { .pci_subvendor = 0x8086, .pci_subdevice = 0xd600, - .config = ALC861_3ST }, - { .pci_subvendor = 0x1043, .pci_subdevice = 0x81e7, - .config = ALC660_3ST }, + { .pci_subvendor = 0x8086, .pci_subdevice = 0xd600, .config = ALC861_3ST }, { .modelname = "3stack-dig", .config = ALC861_3ST_DIG }, { .modelname = "6stack-dig", .config = ALC861_6ST_DIG }, { .modelname = "auto", .config = ALC861_AUTO }, @@ -6521,17 +5660,6 @@ static struct alc_config_preset alc861_presets[] = { .adc_nids = alc861_adc_nids, .input_mux = &alc861_capture_source, }, - [ALC660_3ST] = { - .mixers = { alc861_3ST_mixer }, - .init_verbs = { alc861_threestack_init_verbs }, - .num_dacs = ARRAY_SIZE(alc660_dac_nids), - .dac_nids = alc660_dac_nids, - .num_channel_mode = ARRAY_SIZE(alc861_threestack_modes), - .channel_mode = alc861_threestack_modes, - .num_adc_nids = ARRAY_SIZE(alc861_adc_nids), - .adc_nids = alc861_adc_nids, - .input_mux = &alc861_capture_source, - }, }; @@ -6548,10 +5676,8 @@ static int patch_alc861(struct hda_codec *codec) codec->spec = spec; board_config = snd_hda_check_board_config(codec, alc861_cfg_tbl); - if (board_config < 0 || board_config >= ALC861_MODEL_LAST) { - printk(KERN_INFO "hda_codec: Unknown model for ALC861, " - "trying auto-probe from BIOS...\n"); + printk(KERN_INFO "hda_codec: Unknown model for ALC861, trying auto-probe from BIOS...\n"); board_config = ALC861_AUTO; } @@ -6562,9 +5688,7 @@ static int patch_alc861(struct hda_codec *codec) alc_free(codec); return err; } else if (! err) { - printk(KERN_INFO - "hda_codec: Cannot set up configuration " - "from BIOS. Using base mode...\n"); + printk(KERN_INFO "hda_codec: Cannot set up configuration from BIOS. Using base mode...\n"); board_config = ALC861_3ST_DIG; } } @@ -6595,12 +5719,8 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 }, { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, - { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc883 }, + { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc882 }, { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, - { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, - { .id = 0x10ec0861, .rev = 0x100300, .name = "ALC861", - .patch = patch_alc861 }, - { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", - .patch = patch_alc861 }, + { .id = 0x10ec0861, .name = "ALC861", .patch = patch_alc861 }, {} /* terminator */ }; diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ea99083a1..d8622951c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -41,10 +41,6 @@ #define STAC_REF 0 #define STAC_D945GTP3 1 #define STAC_D945GTP5 2 -#define STAC_MACMINI 3 -#define STAC_D965_2112 4 -#define STAC_D965_284B 5 -#define STAC_922X_MODELS 6 /* number of 922x models */ struct sigmatel_spec { struct snd_kcontrol_new *mixers[4]; @@ -56,7 +52,6 @@ struct sigmatel_spec { unsigned int mic_switch: 1; unsigned int alt_switch: 1; unsigned int hp_detect: 1; - unsigned int gpio_mute: 1; /* playback */ struct hda_multi_out multiout; @@ -110,24 +105,10 @@ static hda_nid_t stac922x_adc_nids[2] = { 0x06, 0x07, }; -static hda_nid_t stac9227_adc_nids[2] = { - 0x07, 0x08, -}; - -#if 0 -static hda_nid_t d965_2112_dac_nids[3] = { - 0x02, 0x03, 0x05, -}; -#endif - static hda_nid_t stac922x_mux_nids[2] = { 0x12, 0x13, }; -static hda_nid_t stac9227_mux_nids[2] = { - 0x15, 0x16, -}; - static hda_nid_t stac927x_adc_nids[3] = { 0x07, 0x08, 0x09 }; @@ -190,24 +171,6 @@ static struct hda_verb stac922x_core_init[] = { {} }; -static struct hda_verb stac9227_core_init[] = { - /* set master volume and direct control */ - { 0x16, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, - /* unmute node 0x1b */ - { 0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, - {} -}; - -static struct hda_verb d965_2112_core_init[] = { - /* set master volume and direct control */ - { 0x16, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, - /* unmute node 0x1b */ - { 0x1b, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, - /* select node 0x03 as DAC */ - { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x01}, - {} -}; - static struct hda_verb stac927x_core_init[] = { /* set master volume and direct control */ { 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, @@ -247,21 +210,6 @@ static struct snd_kcontrol_new stac922x_mixer[] = { { } /* end */ }; -/* This needs to be generated dynamically based on sequence */ -static struct snd_kcontrol_new stac9227_mixer[] = { - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Input Source", - .count = 1, - .info = stac92xx_mux_enum_info, - .get = stac92xx_mux_enum_get, - .put = stac92xx_mux_enum_put, - }, - HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), - HDA_CODEC_MUTE("Capture Switch", 0x1b, 0x0, HDA_OUTPUT), - { } /* end */ -}; - static snd_kcontrol_new_t stac927x_mixer[] = { { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, @@ -341,18 +289,10 @@ static unsigned int d945gtp5_pin_configs[10] = { 0x02a19320, 0x40000100, }; -static unsigned int d965_2112_pin_configs[10] = { - 0x0221401f, 0x40000100, 0x40000100, 0x01014011, - 0x01a19021, 0x01813024, 0x01452130, 0x40000100, - 0x02a19320, 0x40000100, -}; - -static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { - [STAC_REF] = ref922x_pin_configs, - [STAC_D945GTP3] = d945gtp3_pin_configs, - [STAC_D945GTP5] = d945gtp5_pin_configs, - [STAC_MACMINI] = d945gtp5_pin_configs, - [STAC_D965_2112] = d965_2112_pin_configs, +static unsigned int *stac922x_brd_tbl[] = { + ref922x_pin_configs, + d945gtp3_pin_configs, + d945gtp5_pin_configs, }; static struct hda_board_config stac922x_cfg_tbl[] = { @@ -384,15 +324,6 @@ static struct hda_board_config stac922x_cfg_tbl[] = { { .pci_subvendor = PCI_VENDOR_ID_INTEL, .pci_subdevice = 0x0417, .config = STAC_D945GTP5 }, /* Intel D975XBK - 5 Stack */ - { .pci_subvendor = 0x8384, - .pci_subdevice = 0x7680, - .config = STAC_MACMINI }, /* Apple Mac Mini (early 2006) */ - { .pci_subvendor = PCI_VENDOR_ID_INTEL, - .pci_subdevice = 0x2112, - .config = STAC_D965_2112 }, - { .pci_subvendor = PCI_VENDOR_ID_INTEL, - .pci_subdevice = 0x284b, - .config = STAC_D965_284B }, {} /* terminator */ }; @@ -776,8 +707,7 @@ static int stac92xx_add_dyn_out_pins(struct hda_codec *codec, struct auto_pin_cf * A and B is not supported. */ /* fill in the dac_nids table from the parsed pin configuration */ -static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, - const struct auto_pin_cfg *cfg) +static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct auto_pin_cfg *cfg) { struct sigmatel_spec *spec = codec->spec; hda_nid_t nid; @@ -796,13 +726,10 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, } /* add playback controls from the parsed DAC table */ -static int stac92xx_auto_create_multi_out_ctls(struct sigmatel_spec *spec, - const struct auto_pin_cfg *cfg) +static int stac92xx_auto_create_multi_out_ctls(struct sigmatel_spec *spec, const struct auto_pin_cfg *cfg) { char name[32]; - static const char *chname[4] = { - "Front", "Surround", NULL /*CLFE*/, "Side" - }; + static const char *chname[4] = { "Front", "Surround", NULL /*CLFE*/, "Side" }; hda_nid_t nid; int i, err; @@ -914,19 +841,6 @@ static int stac92xx_auto_create_analog_input_ctls(struct hda_codec *codec, const } } - if (imux->num_items == 1) { - /* - * Set the current input for the muxes. - * The STAC9221 has two input muxes with identical source - * NID lists. Hopefully this won't get confused. - */ - for (i = 0; i < spec->num_muxes; i++) { - snd_hda_codec_write(codec, spec->mux_nids[i], 0, - AC_VERB_SET_CONNECT_SEL, - imux->items[0].index); - } - } - return 0; } @@ -960,12 +874,10 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out return err; if (! spec->autocfg.line_outs) return 0; /* can't find valid pin config */ - if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) return err; - if (spec->multiout.num_dacs == 0) - if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) - return err; + if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) + return err; if ((err = stac92xx_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || (err = stac92xx_auto_create_hp_ctls(codec, &spec->autocfg)) < 0 || @@ -1034,45 +946,6 @@ static int stac9200_parse_auto_config(struct hda_codec *codec) return 1; } -/* - * Early 2006 Intel Macintoshes with STAC9220X5 codecs seem to have a - * funky external mute control using GPIO pins. - */ - -static void stac922x_gpio_mute(struct hda_codec *codec, int pin, int muted) -{ - unsigned int gpiostate, gpiomask, gpiodir; - - gpiostate = snd_hda_codec_read(codec, codec->afg, 0, - AC_VERB_GET_GPIO_DATA, 0); - - if (!muted) - gpiostate |= (1 << pin); - else - gpiostate &= ~(1 << pin); - - gpiomask = snd_hda_codec_read(codec, codec->afg, 0, - AC_VERB_GET_GPIO_MASK, 0); - gpiomask |= (1 << pin); - - gpiodir = snd_hda_codec_read(codec, codec->afg, 0, - AC_VERB_GET_GPIO_DIRECTION, 0); - gpiodir |= (1 << pin); - - /* AppleHDA seems to do this -- WTF is this verb?? */ - snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0); - - snd_hda_codec_write(codec, codec->afg, 0, - AC_VERB_SET_GPIO_MASK, gpiomask); - snd_hda_codec_write(codec, codec->afg, 0, - AC_VERB_SET_GPIO_DIRECTION, gpiodir); - - msleep(1); - - snd_hda_codec_write(codec, codec->afg, 0, - AC_VERB_SET_GPIO_DATA, gpiostate); -} - static int stac92xx_init(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; @@ -1109,11 +982,6 @@ static int stac92xx_init(struct hda_codec *codec) stac92xx_auto_set_pinctl(codec, cfg->dig_in_pin, AC_PINCTL_IN_EN); - if (spec->gpio_mute) { - stac922x_gpio_mute(codec, 0, 0); - stac922x_gpio_mute(codec, 1, 0); - } - return 0; } @@ -1263,9 +1131,8 @@ static int patch_stac922x(struct hda_codec *codec) codec->spec = spec; spec->board_config = snd_hda_check_board_config(codec, stac922x_cfg_tbl); if (spec->board_config < 0) - snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, " - "using BIOS defaults\n"); - else if (stac922x_brd_tbl[spec->board_config] != NULL) { + snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC922x, using BIOS defaults\n"); + else { spec->num_pins = 10; spec->pin_nids = stac922x_pin_nids; spec->pin_configs = stac922x_brd_tbl[spec->board_config]; @@ -1280,25 +1147,6 @@ static int patch_stac922x(struct hda_codec *codec) spec->mixer = stac922x_mixer; spec->multiout.dac_nids = spec->dac_nids; - - switch (spec->board_config) { - case STAC_D965_2112: - spec->adc_nids = stac9227_adc_nids; - spec->mux_nids = stac9227_mux_nids; -#if 0 - spec->multiout.dac_nids = d965_2112_dac_nids; - spec->multiout.num_dacs = ARRAY_SIZE(d965_2112_dac_nids); -#endif - spec->init = d965_2112_core_init; - spec->mixer = stac9227_mixer; - break; - case STAC_D965_284B: - spec->adc_nids = stac9227_adc_nids; - spec->mux_nids = stac9227_mux_nids; - spec->init = stac9227_core_init; - spec->mixer = stac9227_mixer; - break; - } err = stac92xx_parse_auto_config(codec, 0x08, 0x09); if (err < 0) { @@ -1306,9 +1154,6 @@ static int patch_stac922x(struct hda_codec *codec) return err; } - if (spec->board_config == STAC_MACMINI) - spec->gpio_mute = 1; - codec->patch_ops = stac92xx_patch_ops; return 0; @@ -1525,12 +1370,6 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = { { .id = 0x83847681, .name = "STAC9220D/9223D A2", .patch = patch_stac922x }, { .id = 0x83847682, .name = "STAC9221 A2", .patch = patch_stac922x }, { .id = 0x83847683, .name = "STAC9221D A2", .patch = patch_stac922x }, - { .id = 0x83847618, .name = "STAC9227", .patch = patch_stac922x }, - { .id = 0x83847619, .name = "STAC9227", .patch = patch_stac922x }, - { .id = 0x83847616, .name = "STAC9228", .patch = patch_stac922x }, - { .id = 0x83847617, .name = "STAC9228", .patch = patch_stac922x }, - { .id = 0x83847614, .name = "STAC9229", .patch = patch_stac922x }, - { .id = 0x83847615, .name = "STAC9229", .patch = patch_stac922x }, { .id = 0x83847620, .name = "STAC9274", .patch = patch_stac927x }, { .id = 0x83847621, .name = "STAC9274D", .patch = patch_stac927x }, { .id = 0x83847622, .name = "STAC9273X", .patch = patch_stac927x }, diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 9492f3d24..336dc489a 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c @@ -1281,15 +1281,9 @@ static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable) tmp2 = tmp = snd_ice1712_gpio_read(ice); if (enable) - if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) - tmp |= AUREON_HP_SEL; - else - tmp |= PRODIGY_HP_SEL; + tmp |= AUREON_HP_SEL; else - if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) - tmp &= ~ AUREON_HP_SEL; - else - tmp &= ~ PRODIGY_HP_SEL; + tmp &= ~ AUREON_HP_SEL; if (tmp != tmp2) { snd_ice1712_gpio_write(ice, tmp); return 1; @@ -2085,16 +2079,16 @@ static unsigned char prodigy71_eeprom[] __devinitdata = { }; static unsigned char prodigy71lt_eeprom[] __devinitdata = { - 0x4b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */ + 0x0b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */ 0x80, /* ACLINK: I2S */ 0xfc, /* I2S: vol, 96k, 24bit, 192k */ - 0xc3, /* SPDIF: out-en, out-int, spdif-in */ - 0xff, /* GPIO_DIR */ - 0xff, /* GPIO_DIR1 */ - 0x5f, /* GPIO_DIR2 */ - 0x00, /* GPIO_MASK */ - 0x00, /* GPIO_MASK1 */ - 0x00, /* GPIO_MASK2 */ + 0xc3, /* SPDUF: out-en, out-int */ + 0x00, /* GPIO_DIR */ + 0x07, /* GPIO_DIR1 */ + 0x00, /* GPIO_DIR2 */ + 0xff, /* GPIO_MASK */ + 0xf8, /* GPIO_MASK1 */ + 0xff, /* GPIO_MASK2 */ 0x00, /* GPIO_STATE */ 0x00, /* GPIO_STATE1 */ 0x00, /* GPIO_STATE2 */ @@ -2131,7 +2125,7 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { .build_controls = aureon_add_controls, .eeprom_size = sizeof(aureon71_eeprom), .eeprom_data = aureon71_eeprom, - .driver = "Aureon71Univ", /* keep in 15 letters */ + .driver = "Aureon71Universe", }, { .subvendor = VT1724_SUBDEVICE_PRODIGY71, diff --git a/sound/pci/ice1712/aureon.h b/sound/pci/ice1712/aureon.h index 3b7bea656..98a675228 100644 --- a/sound/pci/ice1712/aureon.h +++ b/sound/pci/ice1712/aureon.h @@ -58,6 +58,5 @@ extern struct snd_ice1712_card_info snd_vt1724_aureon_cards[]; #define PRODIGY_WM_CS (1 << 8) #define PRODIGY_SPI_MOSI (1 << 10) #define PRODIGY_SPI_CLK (1 << 9) -#define PRODIGY_HP_SEL (1 << 5) #endif /* __SOUND_AUREON_H */ diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index b135389fe..2c529e741 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c @@ -1031,9 +1031,6 @@ struct snd_ice1712_card_info snd_ice1712_ews_cards[] __devinitdata = { .model = "dmx6fire", .chip_init = snd_ice1712_ews_init, .build_controls = snd_ice1712_ews_add_controls, - .mpu401_1_name = "MIDI-Front DMX6fire", - .mpu401_2_name = "Wavetable DMX6fire", - .mpu401_2_info_flags = MPU401_INFO_OUTPUT, }, { } /* terminator */ }; diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index bf20858d9..c56793b38 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -106,7 +107,7 @@ module_param_array(dxr_enable, int, NULL, 0444); MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); -static struct pci_device_id snd_ice1712_ids[] = { +static struct pci_device_id snd_ice1712_ids[] __devinitdata = { { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ { 0, } }; @@ -1595,7 +1596,7 @@ static void __devinit snd_ice1712_proc_init(struct snd_ice1712 * ice) struct snd_info_entry *entry; if (! snd_card_proc_new(ice->card, "ice1712", &entry)) - snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read); + snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read); } /* @@ -2397,14 +2398,13 @@ static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice) udelay(200); outb(ICE1712_NATIVE, ICEREG(ice, CONTROL)); udelay(200); - if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && - !ice->dxr_enable) - /* Set eeprom value to limit active ADCs and DACs to 6; - * Also disable AC97 as no hardware in standard 6fire card/box - * Note: DXR extensions are not currently supported - */ - ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a; - pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); + if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) { + /* Limit active ADCs and DACs to 6; */ + /* Note: DXR extension not supported */ + pci_write_config_byte(ice->pci, 0x60, 0x2a); + } else { + pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); + } pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]); pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]); pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]); @@ -2606,7 +2606,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card, ice->dmapath_port = pci_resource_start(pci, 2); ice->profi_port = pci_resource_start(pci, 3); - if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", ice)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_ice1712_free(ice); @@ -2737,38 +2737,21 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, if (! c->no_mpu401) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG(ice, MPU1_CTRL), - (c->mpu401_1_info_flags | - MPU401_INFO_INTEGRATED), + ICEREG(ice, MPU1_CTRL), 1, ice->irq, 0, &ice->rmidi[0])) < 0) { snd_card_free(card); return err; } - if (c->mpu401_1_name) - /* Prefered name available in card_info */ - snprintf(ice->rmidi[0]->name, - sizeof(ice->rmidi[0]->name), - "%s %d", c->mpu401_1_name, card->number); - - if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) { - /* 2nd port used */ + + if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712, - ICEREG(ice, MPU2_CTRL), - (c->mpu401_2_info_flags | - MPU401_INFO_INTEGRATED), + ICEREG(ice, MPU2_CTRL), 1, ice->irq, 0, &ice->rmidi[1])) < 0) { snd_card_free(card); return err; } - if (c->mpu401_2_name) - /* Prefered name available in card_info */ - snprintf(ice->rmidi[1]->name, - sizeof(ice->rmidi[1]->name), - "%s %d", c->mpu401_2_name, - card->number); - } } snd_ice1712_set_input_clock_source(ice, 0); diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index ce27eac40..053f8e56f 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h @@ -29,7 +29,6 @@ #include #include #include -#include /* @@ -496,10 +495,6 @@ struct snd_ice1712_card_info { int (*chip_init)(struct snd_ice1712 *); int (*build_controls)(struct snd_ice1712 *); unsigned int no_mpu401: 1; - unsigned int mpu401_1_info_flags; - unsigned int mpu401_2_info_flags; - const char *mpu401_1_name; - const char *mpu401_2_name; unsigned int eeprom_size; unsigned char *eeprom_data; }; diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 71d6aedc0..b1c007e02 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -86,7 +86,7 @@ MODULE_PARM_DESC(model, "Use the given board model."); /* Both VT1720 and VT1724 have the same PCI IDs */ -static struct pci_device_id snd_vt1724_ids[] = { +static struct pci_device_id snd_vt1724_ids[] __devinitdata = { { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { 0, } }; @@ -1293,7 +1293,7 @@ static void __devinit snd_vt1724_proc_init(struct snd_ice1712 * ice) struct snd_info_entry *entry; if (! snd_card_proc_new(ice->card, "ice1724", &entry)) - snd_info_set_text_ops(entry, ice, snd_vt1724_proc_read); + snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read); } /* @@ -2253,7 +2253,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card, ice->profi_port = pci_resource_start(pci, 1); if (request_irq(pci->irq, snd_vt1724_interrupt, - IRQF_DISABLED|IRQF_SHARED, "ICE1724", ice)) { + SA_INTERRUPT|SA_SHIRQ, "ICE1724", ice)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_vt1724_free(ice); return -EIO; @@ -2388,8 +2388,7 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci, if (! c->no_mpu401) { if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG1724(ice, MPU_CTRL), - MPU401_INFO_INTEGRATED, + ICEREG1724(ice, MPU_CTRL), 1, ice->irq, 0, &ice->rmidi[0])) < 0) { snd_card_free(card); diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c index 0efcad926..d23fb3fc2 100644 --- a/sound/pci/ice1712/pontis.c +++ b/sound/pci/ice1712/pontis.c @@ -680,8 +680,9 @@ static void wm_proc_init(struct snd_ice1712 *ice) { struct snd_info_entry *entry; if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { - snd_info_set_text_ops(entry, ice, wm_proc_regs_read); + snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read); entry->mode |= S_IWUSR; + entry->c.text.write_size = 1024; entry->c.text.write = wm_proc_regs_write; } } @@ -704,8 +705,9 @@ static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buff static void cs_proc_init(struct snd_ice1712 *ice) { struct snd_info_entry *entry; - if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) - snd_info_set_text_ops(entry, ice, cs_proc_regs_read); + if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) { + snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read); + } } diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index fec9440cb..b5754b32b 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c @@ -87,25 +87,12 @@ static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate) * initialize the chips on M-Audio Revolution cards */ -static unsigned int revo71_num_stereo_front[] = {2}; -static char *revo71_channel_names_front[] = {"PCM Playback Volume"}; - -static unsigned int revo71_num_stereo_surround[] = {1, 1, 2, 2}; -static char *revo71_channel_names_surround[] = {"PCM Center Playback Volume", "PCM LFE Playback Volume", - "PCM Side Playback Volume", "PCM Rear Playback Volume"}; - -static unsigned int revo51_num_stereo[] = {2, 1, 1, 2}; -static char *revo51_channel_names[] = {"PCM Playback Volume", "PCM Center Playback Volume", - "PCM LFE Playback Volume", "PCM Rear Playback Volume"}; - static struct snd_akm4xxx akm_revo_front __devinitdata = { .type = SND_AK4381, .num_dacs = 2, .ops = { .set_rate_val = revo_set_rate_val - }, - .num_stereo = revo71_num_stereo_front, - .channel_names = revo71_channel_names_front + } }; static struct snd_ak4xxx_private akm_revo_front_priv __devinitdata = { @@ -126,9 +113,7 @@ static struct snd_akm4xxx akm_revo_surround __devinitdata = { .num_dacs = 6, .ops = { .set_rate_val = revo_set_rate_val - }, - .num_stereo = revo71_num_stereo_surround, - .channel_names = revo71_channel_names_surround + } }; static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = { @@ -148,9 +133,7 @@ static struct snd_akm4xxx akm_revo51 __devinitdata = { .num_dacs = 6, .ops = { .set_rate_val = revo_set_rate_val - }, - .num_stereo = revo51_num_stereo, - .channel_names = revo51_channel_names + } }; static struct snd_ak4xxx_private akm_revo51_priv __devinitdata = { diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 6874263f1..0df760256 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -66,7 +66,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH}," static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ -static int ac97_clock; +static int ac97_clock = 0; static char *ac97_quirk; static int buggy_semaphore; static int buggy_irq = -1; /* auto-check */ @@ -413,7 +413,7 @@ struct intel8x0 { u32 int_sta_mask; /* interrupt status mask */ }; -static struct pci_device_id snd_intel8x0_ids[] = { +static struct pci_device_id snd_intel8x0_ids[] __devinitdata = { { 0x8086, 0x2415, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ { 0x8086, 0x2425, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ { 0x8086, 0x2445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ @@ -1805,12 +1805,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { .name = "Dell Optiplex GX270", /* AD1981B */ .type = AC97_TUNE_HP_ONLY }, - { - .subvendor = 0x1028, - .subdevice = 0x014e, - .name = "Dell D800", /* STAC9750/51 */ - .type = AC97_TUNE_HP_ONLY - }, { .subvendor = 0x1028, .subdevice = 0x0163, @@ -1955,12 +1949,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { .name = "AMD64 Mobo", /* ALC650 */ .type = AC97_TUNE_HP_ONLY }, - { - .subvendor = 0x10f1, - .subdevice = 0x2895, - .name = "Tyan Thunder K8WE", - .type = AC97_TUNE_HP_ONLY - }, { .subvendor = 0x110a, .subdevice = 0x0056, @@ -2481,7 +2469,7 @@ static int intel8x0_resume(struct pci_dev *pci) pci_restore_state(pci); pci_enable_device(pci); pci_set_master(pci); - request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED, + request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, chip); chip->irq = pci->irq; synchronize_irq(chip->irq); @@ -2657,7 +2645,7 @@ static void __devinit snd_intel8x0_proc_init(struct intel8x0 * chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "intel8x0", &entry)) - snd_info_set_text_ops(entry, chip, snd_intel8x0_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_intel8x0_proc_read); } #else #define snd_intel8x0_proc_init(x) @@ -2854,7 +2842,7 @@ static int __devinit snd_intel8x0_create(struct snd_card *card, /* request irq after initializaing int_sta_mask, etc */ if (request_irq(pci->irq, snd_intel8x0_interrupt, - IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) { + SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_intel8x0_free(chip); return -EBUSY; diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 91850281f..720635f0c 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -59,7 +59,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH}," static int index = -2; /* Exclude the first card */ static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ -static int ac97_clock; +static int ac97_clock = 0; module_param(index, int, 0444); MODULE_PARM_DESC(index, "Index value for Intel i8x0 modemcard."); @@ -224,7 +224,7 @@ struct intel8x0m { unsigned int pcm_pos_shift; }; -static struct pci_device_id snd_intel8x0m_ids[] = { +static struct pci_device_id snd_intel8x0m_ids[] __devinitdata = { { 0x8086, 0x2416, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801AA */ { 0x8086, 0x2426, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82901AB */ { 0x8086, 0x2446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 82801BA */ @@ -1092,7 +1092,7 @@ static void __devinit snd_intel8x0m_proc_init(struct intel8x0m * chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "intel8x0m", &entry)) - snd_info_set_text_ops(entry, chip, snd_intel8x0m_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_intel8x0m_proc_read); } #else /* !CONFIG_PROC_FS */ #define snd_intel8x0m_proc_init(chip) @@ -1185,7 +1185,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, } port_inited: - if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_intel8x0_free(chip); diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index cfea51f44..e39fad1a4 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -424,7 +424,7 @@ module_param_array(enable, bool, NULL, 0444); MODULE_PARM_DESC(enable, "Enable Korg 1212 soundcard."); MODULE_AUTHOR("Haroldo Gamal "); -static struct pci_device_id snd_korg1212_ids[] = { +static struct pci_device_id snd_korg1212_ids[] __devinitdata = { { .vendor = 0x10b5, .device = 0x906d, @@ -2085,7 +2085,7 @@ static void __devinit snd_korg1212_proc_init(struct snd_korg1212 *korg1212) struct snd_info_entry *entry; if (! snd_card_proc_new(korg1212->card, "korg1212", &entry)) - snd_info_set_text_ops(entry, korg1212, snd_korg1212_proc_read); + snd_info_set_text_ops(entry, korg1212, 1024, snd_korg1212_proc_read); } static int @@ -2237,7 +2237,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev * } err = request_irq(pci->irq, snd_korg1212_interrupt, - IRQF_DISABLED|IRQF_SHARED, + SA_INTERRUPT|SA_SHIRQ, "korg1212", korg1212); if (err) { diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 45214b3b8..1928e06b6 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c @@ -869,7 +869,7 @@ struct snd_m3 { /* * pci ids */ -static struct pci_device_id snd_m3_ids[] = { +static struct pci_device_id snd_m3_ids[] __devinitdata = { {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO_1, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, {PCI_VENDOR_ID_ESS, PCI_DEVICE_ID_ESS_ALLEGRO, PCI_ANY_ID, PCI_ANY_ID, @@ -2137,7 +2137,7 @@ static int __devinit snd_m3_mixer(struct snd_m3 *chip) * DSP Code images */ -static const u16 assp_kernel_image[] = { +static const u16 assp_kernel_image[] __devinitdata = { 0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4, 0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, @@ -2224,7 +2224,7 @@ static const u16 assp_kernel_image[] = { * Mini sample rate converter code image * that is to be loaded at 0x400 on the DSP. */ -static const u16 assp_minisrc_image[] = { +static const u16 assp_minisrc_image[] __devinitdata = { 0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412, 0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41, @@ -2267,12 +2267,12 @@ static const u16 assp_minisrc_image[] = { */ #define MINISRC_LPF_LEN 10 -static const u16 minisrc_lpf[MINISRC_LPF_LEN] = { +static const u16 minisrc_lpf[MINISRC_LPF_LEN] __devinitdata = { 0X0743, 0X1104, 0X0A4C, 0XF88D, 0X242C, 0X1023, 0X1AA9, 0X0B60, 0XEFDD, 0X186F }; -static void snd_m3_assp_init(struct snd_m3 *chip) +static void __devinit snd_m3_assp_init(struct snd_m3 *chip) { unsigned int i; @@ -2760,7 +2760,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci, tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); - if (request_irq(pci->irq, snd_m3_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_m3_free(chip); @@ -2861,8 +2861,7 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) #if 0 /* TODO: not supported yet */ /* TODO enable MIDI IRQ and I/O */ err = snd_mpu401_uart_new(chip->card, 0, MPU401_HW_MPU401, - chip->iobase + MPU401_DATA_PORT, - MPU401_INFO_INTEGRATED, + chip->iobase + MPU401_DATA_PORT, 1, chip->irq, 0, &chip->rmidi); if (err < 0) printk(KERN_WARNING "maestro3: no MIDI support.\n"); diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index cc43ecd67..09cc07864 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -61,7 +61,7 @@ MODULE_PARM_DESC(enable, "Enable Digigram " CARD_NAME " soundcard."); /* */ -static struct pci_device_id snd_mixart_ids[] = { +static struct pci_device_id snd_mixart_ids[] __devinitdata = { { 0x1057, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* MC8240 */ { 0, } }; @@ -1244,6 +1244,7 @@ static void __devinit snd_mixart_proc_init(struct snd_mixart *chip) /* text interface to read perf and temp meters */ if (! snd_card_proc_new(chip->card, "board_info", &entry)) { entry->private_data = chip; + entry->c.text.read_size = 1024; entry->c.text.read = snd_mixart_proc_read; } @@ -1319,7 +1320,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, pci_resource_len(pci, i)); } - if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_DISABLED|IRQF_SHARED, CARD_NAME, (void *)mgr)) { + if (request_irq(pci->irq, snd_mixart_interrupt, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *)mgr)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_mixart_free(mgr); return -EBUSY; diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 101eee0aa..b92d6600d 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -263,7 +263,7 @@ struct nm256 { /* * PCI ids */ -static struct pci_device_id snd_nm256_ids[] = { +static struct pci_device_id snd_nm256_ids[] __devinitdata = { {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, @@ -465,7 +465,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip) { mutex_lock(&chip->irq_mutex); if (chip->irq < 0) { - if (request_irq(chip->pci->irq, chip->interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(chip->pci->irq, chip->interrupt, SA_INTERRUPT|SA_SHIRQ, chip->card->driver, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq); mutex_unlock(&chip->irq_mutex); diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 533c672ae..dafa2235a 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -73,7 +73,7 @@ enum { PCI_ID_LAST }; -static struct pci_device_id pcxhr_ids[] = { +static struct pci_device_id pcxhr_ids[] __devinitdata = { { 0x10b5, 0x9656, 0x1369, 0xb001, 0, 0, PCI_ID_VX882HR, }, /* VX882HR */ { 0x10b5, 0x9656, 0x1369, 0xb101, 0, 0, PCI_ID_PCX882HR, }, /* PCX882HR */ { 0x10b5, 0x9656, 0x1369, 0xb201, 0, 0, PCI_ID_VX881HR, }, /* VX881HR */ @@ -1150,9 +1150,9 @@ static void __devinit pcxhr_proc_init(struct snd_pcxhr *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "info", &entry)) - snd_info_set_text_ops(entry, chip, pcxhr_proc_info); + snd_info_set_text_ops(entry, chip, 1024, pcxhr_proc_info); if (! snd_card_proc_new(chip->card, "sync", &entry)) - snd_info_set_text_ops(entry, chip, pcxhr_proc_sync); + snd_info_set_text_ops(entry, chip, 1024, pcxhr_proc_sync); } /* end of proc interface */ @@ -1250,7 +1250,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id mgr->pci = pci; mgr->irq = -1; - if (request_irq(pci->irq, pcxhr_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, pcxhr_interrupt, SA_INTERRUPT|SA_SHIRQ, card_name, mgr)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); pcxhr_free(mgr); diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index f435fcd6d..d8cc985d7 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c @@ -506,7 +506,7 @@ static int riptide_reset(struct cmdif *cif, struct snd_riptide *chip); /* */ -static struct pci_device_id snd_riptide_ids[] = { +static struct pci_device_id snd_riptide_ids[] __devinitdata = { { .vendor = 0x127a,.device = 0x4310, .subvendor = PCI_ANY_ID,.subdevice = PCI_ANY_ID, @@ -1836,11 +1836,11 @@ static int snd_riptide_free(struct snd_riptide *chip) UNSET_GRESET(cif->hwport); kfree(chip->cif); } - if (chip->irq >= 0) - free_irq(chip->irq, chip); if (chip->fw_entry) release_firmware(chip->fw_entry); release_and_free_resource(chip->res_port); + if (chip->irq >= 0) + free_irq(chip->irq, chip); kfree(chip); return 0; } @@ -1892,7 +1892,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, UNSET_AIE(hwport); if (request_irq - (pci->irq, snd_riptide_interrupt, IRQF_DISABLED | IRQF_SHARED, + (pci->irq, snd_riptide_interrupt, SA_INTERRUPT | SA_SHIRQ, "RIPTIDE", chip)) { snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n", pci->irq); @@ -1992,7 +1992,7 @@ static void __devinit snd_riptide_proc_init(struct snd_riptide *chip) struct snd_info_entry *entry; if (!snd_card_proc_new(chip->card, "riptide", &entry)) - snd_info_set_text_ops(entry, chip, snd_riptide_proc_read); + snd_info_set_text_ops(entry, chip, 4096, snd_riptide_proc_read); } static int __devinit snd_riptide_mixer(struct snd_riptide *chip) diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 2a7149924..55b1d4838 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c @@ -227,7 +227,7 @@ struct rme32 { struct snd_kcontrol *spdif_ctl; }; -static struct pci_device_id snd_rme32_ids[] = { +static struct pci_device_id snd_rme32_ids[] __devinitdata = { {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, {PCI_VENDOR_ID_XILINX_RME, PCI_DEVICE_ID_RME_DIGI32_8, @@ -1368,18 +1368,18 @@ static int __devinit snd_rme32_create(struct rme32 * rme32) return err; rme32->port = pci_resource_start(rme32->pci, 0); + if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) { + snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); + return -EBUSY; + } + rme32->irq = pci->irq; + if ((rme32->iobase = ioremap_nocache(rme32->port, RME32_IO_SIZE)) == 0) { snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", rme32->port, rme32->port + RME32_IO_SIZE - 1); return -ENOMEM; } - if (request_irq(pci->irq, snd_rme32_interrupt, IRQF_DISABLED | IRQF_SHARED, "RME32", (void *) rme32)) { - snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); - return -EBUSY; - } - rme32->irq = pci->irq; - /* read the card's revision number */ pci_read_config_byte(pci, 8, &rme32->rev); @@ -1578,7 +1578,7 @@ static void __devinit snd_rme32_proc_init(struct rme32 * rme32) struct snd_info_entry *entry; if (! snd_card_proc_new(rme32->card, "rme32", &entry)) - snd_info_set_text_ops(entry, rme32, snd_rme32_proc_read); + snd_info_set_text_ops(entry, rme32, 1024, snd_rme32_proc_read); } /* diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index f8de7c997..3c1bc533d 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c @@ -232,7 +232,7 @@ struct rme96 { struct snd_kcontrol *spdif_ctl; }; -static struct pci_device_id snd_rme96_ids[] = { +static struct pci_device_id snd_rme96_ids[] __devinitdata = { { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_RME_DIGI96_8, @@ -1151,25 +1151,6 @@ static struct snd_pcm_hw_constraint_list hw_constraints_period_bytes = { .mask = 0 }; -static void -rme96_set_buffer_size_constraint(struct rme96 *rme96, - struct snd_pcm_runtime *runtime) -{ - unsigned int size; - - snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); - if ((size = rme96->playback_periodsize) != 0 || - (size = rme96->capture_periodsize) != 0) - snd_pcm_hw_constraint_minmax(runtime, - SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - size, size); - else - snd_pcm_hw_constraint_list(runtime, 0, - SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - &hw_constraints_period_bytes); -} - static int snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream) { @@ -1199,7 +1180,8 @@ snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream) runtime->hw.rate_min = rate; runtime->hw.rate_max = rate; } - rme96_set_buffer_size_constraint(rme96, runtime); + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); rme96->wcreg_spdif_stream = rme96->wcreg_spdif; rme96->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; @@ -1237,7 +1219,9 @@ snd_rme96_capture_spdif_open(struct snd_pcm_substream *substream) rme96->capture_substream = substream; spin_unlock_irq(&rme96->lock); - rme96_set_buffer_size_constraint(rme96, runtime); + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); + return 0; } @@ -1270,7 +1254,8 @@ snd_rme96_playback_adat_open(struct snd_pcm_substream *substream) runtime->hw.rate_min = rate; runtime->hw.rate_max = rate; } - rme96_set_buffer_size_constraint(rme96, runtime); + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); return 0; } @@ -1306,7 +1291,8 @@ snd_rme96_capture_adat_open(struct snd_pcm_substream *substream) rme96->capture_substream = substream; spin_unlock_irq(&rme96->lock); - rme96_set_buffer_size_constraint(rme96, runtime); + snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_period_bytes); return 0; } @@ -1583,17 +1569,17 @@ snd_rme96_create(struct rme96 *rme96) return err; rme96->port = pci_resource_start(rme96->pci, 0); - if ((rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE)) == 0) { - snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); - return -ENOMEM; - } - - if (request_irq(pci->irq, snd_rme96_interrupt, IRQF_DISABLED|IRQF_SHARED, "RME96", (void *)rme96)) { + if (request_irq(pci->irq, snd_rme96_interrupt, SA_INTERRUPT|SA_SHIRQ, "RME96", (void *)rme96)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); return -EBUSY; } rme96->irq = pci->irq; + if ((rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE)) == 0) { + snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); + return -ENOMEM; + } + /* read the card's revision number */ pci_read_config_byte(pci, 8, &rme96->rev); @@ -1819,7 +1805,7 @@ snd_rme96_proc_init(struct rme96 *rme96) struct snd_info_entry *entry; if (! snd_card_proc_new(rme96->card, "rme96", &entry)) - snd_info_set_text_ops(entry, rme96, snd_rme96_proc_read); + snd_info_set_text_ops(entry, rme96, 1024, snd_rme96_proc_read); } /* diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index e5a52da77..10586e48a 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -568,7 +568,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d } -static struct pci_device_id snd_hdsp_ids[] = { +static struct pci_device_id snd_hdsp_ids[] __devinitdata = { { .vendor = PCI_VENDOR_ID_XILINX, .device = PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP, @@ -1356,7 +1356,7 @@ static struct snd_rawmidi_ops snd_hdsp_midi_input = .trigger = snd_hdsp_midi_input_trigger, }; -static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) +static int __devinit snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) { char buf[32]; @@ -3471,7 +3471,7 @@ static void __devinit snd_hdsp_proc_init(struct hdsp *hdsp) struct snd_info_entry *entry; if (! snd_card_proc_new(hdsp->card, "hdsp", &entry)) - snd_info_set_text_ops(entry, hdsp, snd_hdsp_proc_read); + snd_info_set_text_ops(entry, hdsp, 1024, snd_hdsp_proc_read); } static void snd_hdsp_free_buffers(struct hdsp *hdsp) @@ -4912,7 +4912,7 @@ static int __devinit snd_hdsp_create(struct snd_card *card, return -EBUSY; } - if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) { + if (request_irq(pci->irq, snd_hdsp_interrupt, SA_INTERRUPT|SA_SHIRQ, "hdsp", (void *)hdsp)) { snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq); return -EBUSY; } diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 7d03ae066..722b9e6ce 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -2489,7 +2489,7 @@ static void __devinit snd_hdspm_proc_init(struct hdspm * hdspm) struct snd_info_entry *entry; if (!snd_card_proc_new(hdspm->card, "hdspm", &entry)) - snd_info_set_text_ops(entry, hdspm, + snd_info_set_text_ops(entry, hdspm, 1024, snd_hdspm_proc_read); } @@ -3497,7 +3497,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp hdspm->port + io_extent - 1); if (request_irq(pci->irq, snd_hdspm_interrupt, - IRQF_DISABLED | IRQF_SHARED, "hdspm", + SA_INTERRUPT | SA_SHIRQ, "hdspm", (void *) hdspm)) { snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq); return -EBUSY; diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index fc15f61ad..75d640630 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -41,7 +41,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int precise_ptr[SNDRV_CARDS]; /* Enable precise pointer */ +static int precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for RME Digi9652 (Hammerfall) soundcard."); @@ -315,7 +315,7 @@ static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_d } -static struct pci_device_id snd_rme9652_ids[] = { +static struct pci_device_id snd_rme9652_ids[] __devinitdata = { { .vendor = 0x10ee, .device = 0x3fc4, @@ -1787,7 +1787,7 @@ static void __devinit snd_rme9652_proc_init(struct snd_rme9652 *rme9652) struct snd_info_entry *entry; if (! snd_card_proc_new(rme9652->card, "rme9652", &entry)) - snd_info_set_text_ops(entry, rme9652, snd_rme9652_proc_read); + snd_info_set_text_ops(entry, rme9652, 1024, snd_rme9652_proc_read); } static void snd_rme9652_free_buffers(struct snd_rme9652 *rme9652) @@ -2500,7 +2500,7 @@ static int __devinit snd_rme9652_create(struct snd_card *card, return -EBUSY; } - if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_DISABLED|IRQF_SHARED, "rme9652", (void *)rme9652)) { + if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) { snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); return -EBUSY; } diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index e5d4def1a..91f8bf3ae 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -54,8 +54,8 @@ MODULE_SUPPORTED_DEVICE("{{S3,SonicVibes PCI}}"); static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ -static int reverb[SNDRV_CARDS]; -static int mge[SNDRV_CARDS]; +static int reverb[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; +static int mge[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; static unsigned int dmaio = 0x7a00; /* DDMA i/o address */ module_param_array(index, int, NULL, 0444); @@ -243,7 +243,7 @@ struct sonicvibes { #endif }; -static struct pci_device_id snd_sonic_ids[] = { +static struct pci_device_id snd_sonic_ids[] __devinitdata = { { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, { 0, } }; @@ -1144,7 +1144,7 @@ static void __devinit snd_sonicvibes_proc_init(struct sonicvibes * sonic) struct snd_info_entry *entry; if (! snd_card_proc_new(sonic->card, "sonicvibes", &entry)) - snd_info_set_text_ops(entry, sonic, snd_sonicvibes_proc_read); + snd_info_set_text_ops(entry, sonic, 1024, snd_sonicvibes_proc_read); } /* @@ -1257,7 +1257,7 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card, sonic->midi_port = pci_resource_start(pci, 3); sonic->game_port = pci_resource_start(pci, 4); - if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_DISABLED|IRQF_SHARED, "S3 SonicVibes", (void *)sonic)) { + if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_sonicvibes_free(sonic); return -EBUSY; @@ -1441,10 +1441,10 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci, strcpy(card->driver, "SonicVibes"); strcpy(card->shortname, "S3 SonicVibes"); - sprintf(card->longname, "%s rev %i at 0x%llx, irq %i", + sprintf(card->longname, "%s rev %i at 0x%lx, irq %i", card->shortname, sonic->revision, - (unsigned long long)pci_resource_start(pci, 1), + pci_resource_start(pci, 1), sonic->irq); if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) { @@ -1456,7 +1456,7 @@ static int __devinit snd_sonic_probe(struct pci_dev *pci, return err; } if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_SONICVIBES, - sonic->midi_port, MPU401_INFO_INTEGRATED, + sonic->midi_port, 1, sonic->irq, 0, &midi_uart)) < 0) { snd_card_free(card); diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index 9145f7c57..9624a5f2b 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c @@ -63,7 +63,7 @@ MODULE_PARM_DESC(pcm_channels, "Number of hardware channels assigned for PCM."); module_param_array(wavetable_size, int, NULL, 0444); MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth."); -static struct pci_device_id snd_trident_ids[] = { +static struct pci_device_id snd_trident_ids[] __devinitdata = { {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0}, {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), @@ -148,8 +148,7 @@ static int __devinit snd_trident_probe(struct pci_dev *pci, } if (trident->device != TRIDENT_DEVICE_ID_SI7018 && (err = snd_mpu401_uart_new(card, 0, MPU401_HW_TRID4DWAVE, - trident->midi_port, - MPU401_INFO_INTEGRATED, + trident->midi_port, 1, trident->irq, 0, &trident->rmidi)) < 0) { snd_card_free(card); return err; diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 4930cc6b0..52178b8ad 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -306,8 +306,6 @@ void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice) outl(mask, TRID_REG(trident, reg)); } -EXPORT_SYMBOL(snd_trident_start_voice); - /*--------------------------------------------------------------------------- void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) @@ -330,8 +328,6 @@ void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice) outl(mask, TRID_REG(trident, reg)); } -EXPORT_SYMBOL(snd_trident_stop_voice); - /*--------------------------------------------------------------------------- int snd_trident_allocate_pcm_channel(struct snd_trident *trident) @@ -506,8 +502,6 @@ void snd_trident_write_voice_regs(struct snd_trident * trident, #endif } -EXPORT_SYMBOL(snd_trident_write_voice_regs); - /*--------------------------------------------------------------------------- snd_trident_write_cso_reg @@ -3338,7 +3332,7 @@ static void __devinit snd_trident_proc_init(struct snd_trident * trident) if (trident->device == TRIDENT_DEVICE_ID_SI7018) s = "sis7018"; if (! snd_card_proc_new(trident->card, s, &entry)) - snd_info_set_text_ops(entry, trident, snd_trident_proc_read); + snd_info_set_text_ops(entry, trident, 1024, snd_trident_proc_read); } static int snd_trident_dev_free(struct snd_device *device) @@ -3599,7 +3593,7 @@ int __devinit snd_trident_create(struct snd_card *card, } trident->port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_trident_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, "Trident Audio", trident)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_trident_free(trident); @@ -3890,8 +3884,6 @@ struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, return NULL; } -EXPORT_SYMBOL(snd_trident_alloc_voice); - void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voice *voice) { unsigned long flags; @@ -3920,8 +3912,6 @@ void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voi private_free(voice); } -EXPORT_SYMBOL(snd_trident_free_voice); - static void snd_trident_clear_voices(struct snd_trident * trident, unsigned short v_min, unsigned short v_max) { unsigned int i, val, mask[2] = { 0, 0 }; @@ -4003,3 +3993,13 @@ int snd_trident_resume(struct pci_dev *pci) return 0; } #endif /* CONFIG_PM */ + +EXPORT_SYMBOL(snd_trident_alloc_voice); +EXPORT_SYMBOL(snd_trident_free_voice); +EXPORT_SYMBOL(snd_trident_start_voice); +EXPORT_SYMBOL(snd_trident_stop_voice); +EXPORT_SYMBOL(snd_trident_write_voice_regs); +/* trident_memory.c symbols */ +EXPORT_SYMBOL(snd_trident_synth_alloc); +EXPORT_SYMBOL(snd_trident_synth_free); +EXPORT_SYMBOL(snd_trident_synth_copy_from_user); diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c index aff3f8741..46c6982c9 100644 --- a/sound/pci/trident/trident_memory.c +++ b/sound/pci/trident/trident_memory.c @@ -349,7 +349,6 @@ snd_trident_synth_alloc(struct snd_trident *hw, unsigned int size) return blk; } -EXPORT_SYMBOL(snd_trident_synth_alloc); /* * free a synth sample area @@ -366,7 +365,6 @@ snd_trident_synth_free(struct snd_trident *hw, struct snd_util_memblk *blk) return 0; } -EXPORT_SYMBOL(snd_trident_synth_free); /* * reset TLB entry and free kernel page @@ -488,4 +486,3 @@ int snd_trident_synth_copy_from_user(struct snd_trident *trident, return 0; } -EXPORT_SYMBOL(snd_trident_synth_copy_from_user); diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c index 9b7dee847..cc7af8bc5 100644 --- a/sound/pci/trident/trident_synth.c +++ b/sound/pci/trident/trident_synth.c @@ -914,9 +914,7 @@ static int snd_trident_synth_create_port(struct snd_trident * trident, int idx) &callbacks, SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE, SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE | - SNDRV_SEQ_PORT_TYPE_SYNTH | - SNDRV_SEQ_PORT_TYPE_HARDWARE | - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER, + SNDRV_SEQ_PORT_TYPE_SYNTH, 16, 0, name); if (p->chset->port < 0) { diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 08da9234e..39daf62d2 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -396,7 +396,7 @@ struct via82xx { #endif }; -static struct pci_device_id snd_via82xx_ids[] = { +static struct pci_device_id snd_via82xx_ids[] __devinitdata = { /* 0x1106, 0x3058 */ { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA686, }, /* 686A */ /* 0x1106, 0x3059 */ @@ -1775,12 +1775,6 @@ static struct ac97_quirk ac97_quirks[] = { .name = "Targa Traveller 811", .type = AC97_TUNE_HP_ONLY, }, - { - .subvendor = 0x161f, - .subdevice = 0x2032, - .name = "m680x", - .type = AC97_TUNE_HP_ONLY, /* http://launchpad.net/bugs/38546 */ - }, { } /* terminator */ }; @@ -1979,7 +1973,7 @@ static int __devinit snd_via686_init_misc(struct via82xx *chip) pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, legacy_cfg); if (chip->mpu_res) { if (snd_mpu401_uart_new(chip->card, 0, MPU401_HW_VIA686A, - mpu_port, MPU401_INFO_INTEGRATED, + mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) { printk(KERN_WARNING "unable to initialize MPU-401" " at 0x%lx, skipping\n", mpu_port); @@ -2021,7 +2015,7 @@ static void __devinit snd_via82xx_proc_init(struct via82xx *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "via82xx", &entry)) - snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_via82xx_proc_read); } /* @@ -2281,7 +2275,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card, if (request_irq(pci->irq, chip_type == TYPE_VIA8233 ? snd_via8233_interrupt : snd_via686_interrupt, - IRQF_DISABLED|IRQF_SHARED, + SA_INTERRUPT|SA_SHIRQ, card->driver, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_via82xx_free(chip); @@ -2371,7 +2365,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci, int revision) { .subvendor = 0x1462, .subdevice = 0x0470, .action = VIA_DXS_SRC }, /* MSI KT880 Delta-FSR */ { .subvendor = 0x1462, .subdevice = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */ { .subvendor = 0x1462, .subdevice = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */ - { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_SRC }, /* MSI K8T Neo2-FI */ + { .subvendor = 0x1462, .subdevice = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */ { .subvendor = 0x1462, .subdevice = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */ { .subvendor = 0x1462, .subdevice = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */ { .subvendor = 0x1462, .subdevice = 0xb012, .action = VIA_DXS_SRC }, /* P4M800/VIA8237R */ diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 016f9dac2..ef97e50cd 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c @@ -261,7 +261,7 @@ struct via82xx_modem { struct snd_info_entry *proc_entry; }; -static struct pci_device_id snd_via82xx_modem_ids[] = { +static struct pci_device_id snd_via82xx_modem_ids[] __devinitdata = { { 0x1106, 0x3068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, TYPE_CARD_VIA82XX_MODEM, }, { 0, } }; @@ -929,7 +929,7 @@ static void __devinit snd_via82xx_proc_init(struct via82xx_modem *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "via82xx", &entry)) - snd_info_set_text_ops(entry, chip, snd_via82xx_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_via82xx_proc_read); } /* @@ -1118,7 +1118,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card, return err; } chip->port = pci_resource_start(pci, 0); - if (request_irq(pci->irq, snd_via82xx_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ, card->driver, chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_via82xx_free(chip); diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 9c03c6b4e..0f1ebb010 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c @@ -60,7 +60,7 @@ enum { VX_PCI_VX222_NEW }; -static struct pci_device_id snd_vx222_ids[] = { +static struct pci_device_id snd_vx222_ids[] __devinitdata = { { 0x10b5, 0x9050, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_OLD, }, /* PLX */ { 0x10b5, 0x9030, 0x1369, PCI_ANY_ID, 0, 0, VX_PCI_VX222_NEW, }, /* PLX */ { 0, } @@ -162,7 +162,7 @@ static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci for (i = 0; i < 2; i++) vx->port[i] = pci_resource_start(pci, i + 1); - if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_vx_irq_handler, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *) chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_vx222_free(chip); diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 186453f7a..65ebf5f19 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c @@ -70,7 +70,7 @@ MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); module_param_array(rear_swap, bool, NULL, 0444); MODULE_PARM_DESC(rear_swap, "Swap rear channels (must be enabled for correct IEC958 (S/PDIF)) output"); -static struct pci_device_id snd_ymfpci_ids[] = { +static struct pci_device_id snd_ymfpci_ids[] __devinitdata = { { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724 */ { 0x1073, 0x000d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF724F */ { 0x1073, 0x000a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* YMF740 */ @@ -308,8 +308,7 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci, } if (chip->mpu_res) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_YMFPCI, - mpu_port[dev], - MPU401_INFO_INTEGRATED, + mpu_port[dev], 1, pci->irq, 0, &chip->rawmidi)) < 0) { printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]); legacy_ctrl &= ~YMFPCI_LEGACY_MIEN; /* disable MPU401 irq */ diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index a55b5fd7d..8ac5ab50b 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -1919,7 +1919,7 @@ static int __devinit snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfp struct snd_info_entry *entry; if (! snd_card_proc_new(card, "ymfpci", &entry)) - snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read); + snd_info_set_text_ops(entry, chip, 1024, snd_ymfpci_proc_read); return 0; } @@ -2288,7 +2288,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card, snd_ymfpci_free(chip); return -EBUSY; } - if (request_irq(pci->irq, snd_ymfpci_interrupt, IRQF_DISABLED|IRQF_SHARED, "YMFPCI", (void *) chip)) { + if (request_irq(pci->irq, snd_ymfpci_interrupt, SA_INTERRUPT|SA_SHIRQ, "YMFPCI", (void *) chip)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_ymfpci_free(chip); return -EBUSY; diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 1c09e5f49..adfdce749 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -241,13 +241,12 @@ static int pdacf_config(struct pcmcia_device *link) CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); link->conf.ConfigBase = parse->config.base; link->conf.ConfigIndex = 0x5; + kfree(parse); CS_CHECK(RequestIO, pcmcia_request_io(link, &link->io)); CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); - kfree(parse); - if (snd_pdacf_assign_resources(pdacf, link->io.BasePort1, link->irq.AssignedIRQ) < 0) goto failed; @@ -255,7 +254,6 @@ static int pdacf_config(struct pcmcia_device *link) return 0; cs_failed: - kfree(parse); cs_error(link, last_fn, last_ret); failed: pcmcia_disable_device(link); diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c index 1dfe29b86..bd0d70ff3 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c @@ -144,7 +144,7 @@ static void pdacf_proc_init(struct snd_pdacf *chip) struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry)) - snd_info_set_text_ops(entry, chip, pdacf_proc_read); + snd_info_set_text_ops(entry, chip, 1024, pdacf_proc_read); } struct snd_pdacf *snd_pdacf_create(struct snd_card *card) diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c index 1ee0918c3..7f82f619f 100644 --- a/sound/pcmcia/vx/vxp_ops.c +++ b/sound/pcmcia/vx/vxp_ops.c @@ -202,7 +202,7 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware * c |= (int)vx_inb(chip, RXM) << 8; c |= vx_inb(chip, RXL); - snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%Zx\n", c, fw->size); + snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%x\n", c, fw->size); vx_outb(chip, ICR, ICR_HF0); diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index cafe6640c..7e0cda2b6 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -261,7 +261,7 @@ static int vxpocket_config(struct pcmcia_device *link) link->dev_node = &vxp->node; kfree(parse); - return 0; + return 9; cs_failed: cs_error(link, last_fn, last_ret); diff --git a/sound/ppc/Makefile b/sound/ppc/Makefile index 4d95c652c..d6ba99590 100644 --- a/sound/ppc/Makefile +++ b/sound/ppc/Makefile @@ -3,7 +3,7 @@ # Copyright (c) 2001 by Jaroslav Kysela # -snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o +snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o toonie.o keywest.o beep.o # Toplevel Module Dependency obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index 05dabe454..82d791be7 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c @@ -801,10 +801,11 @@ snd_pmac_awacs_init(struct snd_pmac *chip) chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf; #ifdef PMAC_AMP_AVAIL if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) { - struct awacs_amp *amp = kzalloc(sizeof(*amp), GFP_KERNEL); + struct awacs_amp *amp = kmalloc(sizeof(*amp), GFP_KERNEL); if (! amp) return -ENOMEM; chip->mixer_data = amp; + memset(amp, 0, sizeof(*amp)); chip->mixer_free = awacs_amp_free; awacs_amp_set_vol(amp, 0, 63, 63, 0); /* mute and zero vol */ awacs_amp_set_vol(amp, 1, 63, 63, 0); diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c index 57202b0f0..46eebf561 100644 --- a/sound/ppc/daca.c +++ b/sound/ppc/daca.c @@ -258,9 +258,10 @@ int __init snd_pmac_daca_init(struct snd_pmac *chip) request_module("i2c-powermac"); #endif /* CONFIG_KMOD */ - mix = kzalloc(sizeof(*mix), GFP_KERNEL); + mix = kmalloc(sizeof(*mix), GFP_KERNEL); if (! mix) return -ENOMEM; + memset(mix, 0, sizeof(*mix)); chip->mixer_data = mix; chip->mixer_free = daca_cleanup; mix->amp_on = 1; /* default on */ diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c index 272ae38e9..fb05938dc 100644 --- a/sound/ppc/keywest.c +++ b/sound/ppc/keywest.c @@ -64,10 +64,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter) if (strncmp(i2c_device_name(adapter), "mac-io", 6)) return 0; /* ignored */ - new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); + new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); if (! new_client) return -ENOMEM; + memset(new_client, 0, sizeof(*new_client)); new_client->addr = keywest_ctx->addr; i2c_set_clientdata(new_client, keywest_ctx); new_client->adapter = adapter; @@ -117,9 +118,6 @@ int __init snd_pmac_tumbler_post_init(void) { int err; - if (!keywest_ctx || !keywest_ctx->client) - return -ENXIO; - if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) { snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err); return err; diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 641430631..f0794ef9d 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -867,6 +867,8 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) unsigned int *prop, l; struct macio_chip* macio; + u32 layout_id = 0; + if (!machine_is(powermac)) return -ENODEV; @@ -927,14 +929,8 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) if (prop && *prop < 16) chip->subframe = *prop; prop = (unsigned int *) get_property(sound, "layout-id", NULL); - if (prop) { - /* partly deprecate snd-powermac, for those machines - * that have a layout-id property for now */ - printk(KERN_INFO "snd-powermac no longer handles any " - "machines with a layout-id property " - "in the device-tree, use snd-aoa.\n"); - return -ENODEV; - } + if (prop) + layout_id = *prop; /* This should be verified on older screamers */ if (device_is_compatible(sound, "screamer")) { chip->model = PMAC_SCREAMER; @@ -967,6 +963,38 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) chip->freq_table = tumbler_freqs; chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ } + if (device_is_compatible(sound, "AOAKeylargo") || + device_is_compatible(sound, "AOAbase") || + device_is_compatible(sound, "AOAK2")) { + /* For now, only support very basic TAS3004 based machines with + * single frequency until proper i2s control is implemented + */ + switch(layout_id) { + case 0x24: + case 0x29: + case 0x33: + case 0x46: + case 0x48: + case 0x50: + case 0x5c: + chip->num_freqs = ARRAY_SIZE(tumbler_freqs); + chip->model = PMAC_SNAPPER; + chip->can_byte_swap = 0; /* FIXME: check this */ + chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */ + break; + case 0x3a: + chip->num_freqs = ARRAY_SIZE(tumbler_freqs); + chip->model = PMAC_TOONIE; + chip->can_byte_swap = 0; /* FIXME: check this */ + chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */ + break; + default: + printk(KERN_ERR "snd: Unknown layout ID 0x%x\n", + layout_id); + return -ENODEV; + + } + } prop = (unsigned int *)get_property(sound, "device-id", NULL); if (prop) chip->device_id = *prop; @@ -1120,7 +1148,6 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) struct snd_pmac *chip; struct device_node *np; int i, err; - unsigned int irq; unsigned long ctrl_addr, txdma_addr, rxdma_addr; static struct snd_device_ops ops = { .dev_free = snd_pmac_dev_free, @@ -1154,6 +1181,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) if (chip->is_k2) { static char *rnames[] = { "Sound Control", "Sound DMA" }; + if (np->n_intrs < 3) { + err = -ENODEV; + goto __error; + } for (i = 0; i < 2; i ++) { if (of_address_to_resource(np->parent, i, &chip->rsrc[i])) { @@ -1167,10 +1198,9 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) chip->rsrc[i].start + 1, rnames[i]) == NULL) { printk(KERN_ERR "snd: can't request rsrc " - " %d (%s: 0x%016llx:%016llx)\n", - i, rnames[i], - (unsigned long long)chip->rsrc[i].start, - (unsigned long long)chip->rsrc[i].end); + " %d (%s: 0x%08lx:%08lx)\n", + i, rnames[i], chip->rsrc[i].start, + chip->rsrc[i].end); err = -ENODEV; goto __error; } @@ -1182,6 +1212,10 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) } else { static char *rnames[] = { "Sound Control", "Sound Tx DMA", "Sound Rx DMA" }; + if (np->n_intrs < 3) { + err = -ENODEV; + goto __error; + } for (i = 0; i < 3; i ++) { if (of_address_to_resource(np, i, &chip->rsrc[i])) { @@ -1195,10 +1229,9 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) chip->rsrc[i].start + 1, rnames[i]) == NULL) { printk(KERN_ERR "snd: can't request rsrc " - " %d (%s: 0x%016llx:%016llx)\n", - i, rnames[i], - (unsigned long long)chip->rsrc[i].start, - (unsigned long long)chip->rsrc[i].end); + " %d (%s: 0x%08lx:%08lx)\n", + i, rnames[i], chip->rsrc[i].start, + chip->rsrc[i].end); err = -ENODEV; goto __error; } @@ -1213,30 +1246,28 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) chip->playback.dma = ioremap(txdma_addr, 0x100); chip->capture.dma = ioremap(rxdma_addr, 0x100); if (chip->model <= PMAC_BURGUNDY) { - irq = irq_of_parse_and_map(np, 0); - if (request_irq(irq, snd_pmac_ctrl_intr, 0, + if (request_irq(np->intrs[0].line, snd_pmac_ctrl_intr, 0, "PMac", (void*)chip)) { - snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", - irq); + snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[0].line); err = -EBUSY; goto __error; } - chip->irq = irq; + chip->irq = np->intrs[0].line; } - irq = irq_of_parse_and_map(np, 1); - if (request_irq(irq, snd_pmac_tx_intr, 0, "PMac Output", (void*)chip)){ - snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", irq); + if (request_irq(np->intrs[1].line, snd_pmac_tx_intr, 0, + "PMac Output", (void*)chip)) { + snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[1].line); err = -EBUSY; goto __error; } - chip->tx_irq = irq; - irq = irq_of_parse_and_map(np, 2); - if (request_irq(irq, snd_pmac_rx_intr, 0, "PMac Input", (void*)chip)) { - snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", irq); + chip->tx_irq = np->intrs[1].line; + if (request_irq(np->intrs[2].line, snd_pmac_rx_intr, 0, + "PMac Input", (void*)chip)) { + snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[2].line); err = -EBUSY; goto __error; } - chip->rx_irq = irq; + chip->rx_irq = np->intrs[2].line; snd_pmac_sound_feature(chip, 1); diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h index 8394e66ce..3a9bd4dbb 100644 --- a/sound/ppc/pmac.h +++ b/sound/ppc/pmac.h @@ -85,7 +85,7 @@ struct pmac_stream { enum snd_pmac_model { PMAC_AWACS, PMAC_SCREAMER, PMAC_BURGUNDY, PMAC_DACA, PMAC_TUMBLER, - PMAC_SNAPPER + PMAC_SNAPPER, PMAC_TOONIE }; struct snd_pmac { @@ -188,6 +188,7 @@ int snd_pmac_burgundy_init(struct snd_pmac *chip); int snd_pmac_daca_init(struct snd_pmac *chip); int snd_pmac_tumbler_init(struct snd_pmac *chip); int snd_pmac_tumbler_post_init(void); +int snd_pmac_toonie_init(struct snd_pmac *chip); /* i2c functions */ struct pmac_keywest { diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 2264574fa..f4902a219 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c @@ -94,6 +94,13 @@ static int __init snd_pmac_probe(struct platform_device *devptr) if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0) goto __error; break; + case PMAC_TOONIE: + strcpy(card->driver, "PMac Toonie"); + strcpy(card->shortname, "PowerMac Toonie"); + strcpy(card->longname, card->shortname); + if ((err = snd_pmac_toonie_init(chip)) < 0) + goto __error; + break; case PMAC_AWACS: case PMAC_SCREAMER: name_ext = chip->model == PMAC_SCREAMER ? "Screamer" : "AWACS"; @@ -181,14 +188,17 @@ static int __init alsa_card_pmac_init(void) if ((err = platform_driver_register(&snd_pmac_driver)) < 0) return err; device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0); + if (IS_ERR(device)) { + platform_driver_unregister(&snd_pmac_driver); + return PTR_ERR(device); + } return 0; } static void __exit alsa_card_pmac_exit(void) { - if (!IS_ERR(device)) - platform_device_unregister(device); + platform_device_unregister(device); platform_driver_unregister(&snd_pmac_driver); } diff --git a/sound/ppc/toonie.c b/sound/ppc/toonie.c new file mode 100644 index 000000000..1ac7c8552 --- /dev/null +++ b/sound/ppc/toonie.c @@ -0,0 +1,378 @@ +/* + * Mac Mini "toonie" mixer control + * + * Copyright (c) 2005 by Benjamin Herrenschmidt + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pmac.h" + +#undef DEBUG + +#ifdef DEBUG +#define DBG(fmt...) printk(fmt) +#else +#define DBG(fmt...) +#endif + +struct pmac_gpio { + unsigned int addr; + u8 active_val; + u8 inactive_val; + u8 active_state; +}; + +struct pmac_toonie +{ + struct pmac_gpio hp_detect_gpio; + struct pmac_gpio hp_mute_gpio; + struct pmac_gpio amp_mute_gpio; + int hp_detect_irq; + int auto_mute_notify; + struct work_struct detect_work; +}; + + +/* + * gpio access + */ +#define do_gpio_write(gp, val) \ + pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, (gp)->addr, val) +#define do_gpio_read(gp) \ + pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, (gp)->addr, 0) +#define tumbler_gpio_free(gp) /* NOP */ + +static void write_audio_gpio(struct pmac_gpio *gp, int active) +{ + if (! gp->addr) + return; + active = active ? gp->active_val : gp->inactive_val; + do_gpio_write(gp, active); + DBG("(I) gpio %x write %d\n", gp->addr, active); +} + +static int check_audio_gpio(struct pmac_gpio *gp) +{ + int ret; + + if (! gp->addr) + return 0; + + ret = do_gpio_read(gp); + + return (ret & 0xd) == (gp->active_val & 0xd); +} + +static int read_audio_gpio(struct pmac_gpio *gp) +{ + int ret; + if (! gp->addr) + return 0; + ret = ((do_gpio_read(gp) & 0x02) !=0); + return ret == gp->active_state; +} + + +enum { TOONIE_MUTE_HP, TOONIE_MUTE_AMP }; + +static int toonie_get_mute_switch(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); + struct pmac_toonie *mix = chip->mixer_data; + struct pmac_gpio *gp; + + if (mix == NULL) + return -ENODEV; + switch(kcontrol->private_value) { + case TOONIE_MUTE_HP: + gp = &mix->hp_mute_gpio; + break; + case TOONIE_MUTE_AMP: + gp = &mix->amp_mute_gpio; + break; + default: + return -EINVAL; + } + ucontrol->value.integer.value[0] = !check_audio_gpio(gp); + return 0; +} + +static int toonie_put_mute_switch(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_pmac *chip = snd_kcontrol_chip(kcontrol); + struct pmac_toonie *mix = chip->mixer_data; + struct pmac_gpio *gp; + int val; + + if (chip->update_automute && chip->auto_mute) + return 0; /* don't touch in the auto-mute mode */ + + if (mix == NULL) + return -ENODEV; + + switch(kcontrol->private_value) { + case TOONIE_MUTE_HP: + gp = &mix->hp_mute_gpio; + break; + case TOONIE_MUTE_AMP: + gp = &mix->amp_mute_gpio; + break; + default: + return -EINVAL; + } + val = ! check_audio_gpio(gp); + if (val != ucontrol->value.integer.value[0]) { + write_audio_gpio(gp, ! ucontrol->value.integer.value[0]); + return 1; + } + return 0; +} + +static struct snd_kcontrol_new toonie_hp_sw __initdata = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Headphone Playback Switch", + .info = snd_pmac_boolean_mono_info, + .get = toonie_get_mute_switch, + .put = toonie_put_mute_switch, + .private_value = TOONIE_MUTE_HP, +}; +static struct snd_kcontrol_new toonie_speaker_sw __initdata = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "PC Speaker Playback Switch", + .info = snd_pmac_boolean_mono_info, + .get = toonie_get_mute_switch, + .put = toonie_put_mute_switch, + .private_value = TOONIE_MUTE_AMP, +}; + +/* + * auto-mute stuffs + */ +static int toonie_detect_headphone(struct snd_pmac *chip) +{ + struct pmac_toonie *mix = chip->mixer_data; + int detect = 0; + + if (mix->hp_detect_gpio.addr) + detect |= read_audio_gpio(&mix->hp_detect_gpio); + return detect; +} + +static void toonie_check_mute(struct snd_pmac *chip, struct pmac_gpio *gp, int val, + int do_notify, struct snd_kcontrol *sw) +{ + if (check_audio_gpio(gp) != val) { + write_audio_gpio(gp, val); + if (do_notify) + snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, + &sw->id); + } +} + +static void toonie_detect_handler(void *self) +{ + struct snd_pmac *chip = (struct snd_pmac *) self; + struct pmac_toonie *mix; + int headphone; + + if (!chip) + return; + + mix = chip->mixer_data; + snd_assert(mix, return); + + headphone = toonie_detect_headphone(chip); + + DBG("headphone: %d, lineout: %d\n", headphone, lineout); + + if (headphone) { + /* unmute headphone/lineout & mute speaker */ + toonie_check_mute(chip, &mix->hp_mute_gpio, 0, + mix->auto_mute_notify, chip->master_sw_ctl); + toonie_check_mute(chip, &mix->amp_mute_gpio, 1, + mix->auto_mute_notify, chip->speaker_sw_ctl); + } else { + /* unmute speaker, mute others */ + toonie_check_mute(chip, &mix->amp_mute_gpio, 0, + mix->auto_mute_notify, chip->speaker_sw_ctl); + toonie_check_mute(chip, &mix->hp_mute_gpio, 1, + mix->auto_mute_notify, chip->master_sw_ctl); + } + if (mix->auto_mute_notify) { + snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, + &chip->hp_detect_ctl->id); + } +} + +static void toonie_update_automute(struct snd_pmac *chip, int do_notify) +{ + if (chip->auto_mute) { + struct pmac_toonie *mix; + mix = chip->mixer_data; + snd_assert(mix, return); + mix->auto_mute_notify = do_notify; + schedule_work(&mix->detect_work); + } +} + +/* interrupt - headphone plug changed */ +static irqreturn_t toonie_hp_intr(int irq, void *devid, struct pt_regs *regs) +{ + struct snd_pmac *chip = devid; + + if (chip->update_automute && chip->initialized) { + chip->update_automute(chip, 1); + return IRQ_HANDLED; + } + return IRQ_NONE; +} + +/* look for audio gpio device */ +static int find_audio_gpio(const char *name, const char *platform, + struct pmac_gpio *gp) +{ + struct device_node *np; + u32 *base, addr; + + if (! (np = find_devices("gpio"))) + return -ENODEV; + + for (np = np->child; np; np = np->sibling) { + char *property = get_property(np, "audio-gpio", NULL); + if (property && strcmp(property, name) == 0) + break; + if (device_is_compatible(np, name)) + break; + } + if (np == NULL) + return -ENODEV; + + base = (u32 *)get_property(np, "AAPL,address", NULL); + if (! base) { + base = (u32 *)get_property(np, "reg", NULL); + if (!base) { + DBG("(E) cannot find address for device %s !\n", name); + return -ENODEV; + } + addr = *base; + if (addr < 0x50) + addr += 0x50; + } else + addr = *base; + + gp->addr = addr & 0x0000ffff; + + /* Try to find the active state, default to 0 ! */ + base = (u32 *)get_property(np, "audio-gpio-active-state", NULL); + if (base) { + gp->active_state = *base; + gp->active_val = (*base) ? 0x5 : 0x4; + gp->inactive_val = (*base) ? 0x4 : 0x5; + } else { + u32 *prop = NULL; + gp->active_state = 0; + gp->active_val = 0x4; + gp->inactive_val = 0x5; + /* Here are some crude hacks to extract the GPIO polarity and + * open collector informations out of the do-platform script + * as we don't yet have an interpreter for these things + */ + if (platform) + prop = (u32 *)get_property(np, platform, NULL); + if (prop) { + if (prop[3] == 0x9 && prop[4] == 0x9) { + gp->active_val = 0xd; + gp->inactive_val = 0xc; + } + if (prop[3] == 0x1 && prop[4] == 0x1) { + gp->active_val = 0x5; + gp->inactive_val = 0x4; + } + } + } + + DBG("(I) GPIO device %s found, offset: %x, active state: %d !\n", + name, gp->addr, gp->active_state); + + return (np->n_intrs > 0) ? np->intrs[0].line : 0; +} + +static void toonie_cleanup(struct snd_pmac *chip) +{ + struct pmac_toonie *mix = chip->mixer_data; + if (! mix) + return; + if (mix->hp_detect_irq >= 0) + free_irq(mix->hp_detect_irq, chip); + kfree(mix); + chip->mixer_data = NULL; +} + +int __init snd_pmac_toonie_init(struct snd_pmac *chip) +{ + struct pmac_toonie *mix; + + mix = kmalloc(sizeof(*mix), GFP_KERNEL); + if (! mix) + return -ENOMEM; + + chip->mixer_data = mix; + chip->mixer_free = toonie_cleanup; + + find_audio_gpio("headphone-mute", NULL, &mix->hp_mute_gpio); + find_audio_gpio("amp-mute", NULL, &mix->amp_mute_gpio); + mix->hp_detect_irq = find_audio_gpio("headphone-detect", + NULL, &mix->hp_detect_gpio); + + strcpy(chip->card->mixername, "PowerMac Toonie"); + + chip->master_sw_ctl = snd_ctl_new1(&toonie_hp_sw, chip); + snd_ctl_add(chip->card, chip->master_sw_ctl); + + chip->speaker_sw_ctl = snd_ctl_new1(&toonie_speaker_sw, chip); + snd_ctl_add(chip->card, chip->speaker_sw_ctl); + + INIT_WORK(&mix->detect_work, toonie_detect_handler, (void *)chip); + + if (mix->hp_detect_irq >= 0) { + snd_pmac_add_automute(chip); + + chip->detect_headphone = toonie_detect_headphone; + chip->update_automute = toonie_update_automute; + toonie_update_automute(chip, 0); + + if (request_irq(mix->hp_detect_irq, toonie_hp_intr, 0, + "Sound Headphone Detection", chip) < 0) + mix->hp_detect_irq = -1; + } + + return 0; +} + diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 84f6b19c0..70e4ebc70 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -1121,7 +1121,7 @@ static long tumbler_find_device(const char *device, const char *platform, DBG("(I) GPIO device %s found, offset: %x, active state: %d !\n", device, gp->addr, gp->active_state); - return irq_of_parse_and_map(node, 0); + return (node->n_intrs > 0) ? node->intrs[0].line : 0; } /* reset audio */ @@ -1264,16 +1264,16 @@ static int __init tumbler_init(struct snd_pmac *chip) &mix->line_mute, 1); irq = tumbler_find_device("headphone-detect", NULL, &mix->hp_detect, 0); - if (irq <= NO_IRQ) + if (irq < 0) irq = tumbler_find_device("headphone-detect", NULL, &mix->hp_detect, 1); - if (irq <= NO_IRQ) + if (irq < 0) irq = tumbler_find_device("keywest-gpio15", NULL, &mix->hp_detect, 1); mix->headphone_irq = irq; irq = tumbler_find_device("line-output-detect", NULL, &mix->line_detect, 0); - if (irq <= NO_IRQ) + if (irq < 0) irq = tumbler_find_device("line-output-detect", NULL, &mix->line_detect, 1); mix->lineout_irq = irq; @@ -1316,9 +1316,10 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip) request_module("i2c-powermac"); #endif /* CONFIG_KMOD */ - mix = kzalloc(sizeof(*mix), GFP_KERNEL); + mix = kmalloc(sizeof(*mix), GFP_KERNEL); if (! mix) return -ENOMEM; + memset(mix, 0, sizeof(*mix)); mix->headphone_irq = -1; chip->mixer_data = mix; diff --git a/sound/sound_core.c b/sound/sound_core.c index 62d4d0c81..6f849720a 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -34,6 +34,7 @@ * locking at some point in 2.3.x. */ +#include #include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include #include #define SOUND_STEP 16 @@ -170,6 +172,8 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati else sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); + devfs_mk_cdev(MKDEV(SOUND_MAJOR, s->unit_minor), + S_IFCHR | mode, s->name); class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, s->unit_minor), dev, s->name+6); return r; @@ -193,6 +197,7 @@ static void sound_remove_unit(struct sound_unit **list, int unit) p = __sound_remove_unit(list, unit); spin_unlock(&sound_loader_lock); if (p) { + devfs_remove(p->name); class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); kfree(p); } @@ -565,6 +570,7 @@ static void __exit cleanup_soundcore(void) /* We have nothing to really do here - we know the lists must be empty */ unregister_chrdev(SOUND_MAJOR, "sound"); + devfs_remove("sound"); class_destroy(sound_class); } @@ -574,6 +580,7 @@ static int __init init_soundcore(void) printk(KERN_ERR "soundcore: sound device already in use.\n"); return -EBUSY; } + devfs_mk_dir ("sound"); sound_class = class_create(THIS_MODULE, "sound"); if (IS_ERR(sound_class)) return PTR_ERR(sound_class); diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index 2bd8e40b8..55493340f 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c @@ -46,7 +46,6 @@ #include #include #include -#include static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -336,6 +335,7 @@ struct snd_amd7930 { int pgain; int mgain; + struct sbus_dev *sdev; unsigned int irq; unsigned int regs_size; struct snd_amd7930 *next; @@ -946,9 +946,11 @@ static struct snd_device_ops snd_amd7930_dev_ops = { }; static int __init snd_amd7930_create(struct snd_card *card, + struct sbus_dev *sdev, struct resource *rp, unsigned int reg_size, - int irq, int dev, + struct linux_prom_irqs *irq_prop, + int dev, struct snd_amd7930 **ramd) { unsigned long flags; @@ -962,6 +964,7 @@ static int __init snd_amd7930_create(struct snd_card *card, spin_lock_init(&amd->lock); amd->card = card; + amd->sdev = sdev; amd->regs_size = reg_size; amd->regs = sbus_ioremap(rp, 0, amd->regs_size, "amd7930"); @@ -972,14 +975,15 @@ static int __init snd_amd7930_create(struct snd_card *card, amd7930_idle(amd); - if (request_irq(irq, snd_amd7930_interrupt, - IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) { - snd_printk("amd7930-%d: Unable to grab IRQ %d\n", - dev, irq); + if (request_irq(irq_prop->pri, snd_amd7930_interrupt, + SA_INTERRUPT | SA_SHIRQ, "amd7930", amd)) { + snd_printk("amd7930-%d: Unable to grab IRQ %s\n", + dev, + __irq_itoa(irq_prop->pri)); snd_amd7930_free(amd); return -EBUSY; } - amd->irq = irq; + amd->irq = irq_prop->pri; amd7930_enable_ints(amd); @@ -1013,35 +1017,60 @@ static int __init snd_amd7930_create(struct snd_card *card, return 0; } -static int __init amd7930_attach_common(struct resource *rp, int irq) +static int __init amd7930_attach(int prom_node, struct sbus_dev *sdev) { - static int dev_num; + static int dev; + struct linux_prom_registers reg_prop; + struct linux_prom_irqs irq_prop; + struct resource res, *rp; struct snd_card *card; struct snd_amd7930 *amd; int err; - if (dev_num >= SNDRV_CARDS) + if (dev >= SNDRV_CARDS) return -ENODEV; - if (!enable[dev_num]) { - dev_num++; + if (!enable[dev]) { + dev++; return -ENOENT; } - card = snd_card_new(index[dev_num], id[dev_num], THIS_MODULE, 0); + err = prom_getproperty(prom_node, "intr", + (char *) &irq_prop, sizeof(irq_prop)); + if (err < 0) { + snd_printk("amd7930-%d: Firmware node lacks IRQ property.\n", dev); + return -ENODEV; + } + + err = prom_getproperty(prom_node, "reg", + (char *) ®_prop, sizeof(reg_prop)); + if (err < 0) { + snd_printk("amd7930-%d: Firmware node lacks register property.\n", dev); + return -ENODEV; + } + + if (sdev) { + rp = &sdev->resource[0]; + } else { + rp = &res; + rp->start = reg_prop.phys_addr; + rp->end = rp->start + reg_prop.reg_size - 1; + rp->flags = IORESOURCE_IO | (reg_prop.which_io & 0xff); + } + + card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); if (card == NULL) return -ENOMEM; strcpy(card->driver, "AMD7930"); strcpy(card->shortname, "Sun AMD7930"); - sprintf(card->longname, "%s at 0x%02lx:0x%08Lx, irq %d", + sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %s", card->shortname, rp->flags & 0xffL, - (unsigned long long)rp->start, - irq); + rp->start, + __irq_itoa(irq_prop.pri)); - if ((err = snd_amd7930_create(card, rp, - (rp->end - rp->start) + 1, - irq, dev_num, &amd)) < 0) + if ((err = snd_amd7930_create(card, sdev, rp, reg_prop.reg_size, + &irq_prop, dev, &amd)) < 0) goto out_err; if ((err = snd_amd7930_pcm(amd)) < 0) @@ -1056,8 +1085,7 @@ static int __init amd7930_attach_common(struct resource *rp, int irq) amd->next = amd7930_list; amd7930_list = amd; - dev_num++; - + dev++; return 0; out_err: @@ -1065,71 +1093,29 @@ out_err: return err; } -static int __init amd7930_obio_attach(struct device_node *dp) -{ - struct linux_prom_registers *regs; - struct linux_prom_irqs *irqp; - struct resource res, *rp; - int len; - - irqp = of_get_property(dp, "intr", &len); - if (!irqp) { - snd_printk("%s: Firmware node lacks IRQ property.\n", - dp->full_name); - return -ENODEV; - } - - regs = of_get_property(dp, "reg", &len); - if (!regs) { - snd_printk("%s: Firmware node lacks register property.\n", - dp->full_name); - return -ENODEV; - } - - rp = &res; - rp->start = regs->phys_addr; - rp->end = rp->start + regs->reg_size - 1; - rp->flags = IORESOURCE_IO | (regs->which_io & 0xff); - - return amd7930_attach_common(rp, irqp->pri); -} - -static int __devinit amd7930_sbus_probe(struct of_device *dev, const struct of_device_id *match) -{ - struct sbus_dev *sdev = to_sbus_device(&dev->dev); - - return amd7930_attach_common(&sdev->resource[0], sdev->irqs[0]); -} - -static struct of_device_id amd7930_match[] = { - { - .name = "audio", - }, - {}, -}; - -static struct of_platform_driver amd7930_sbus_driver = { - .name = "audio", - .match_table = amd7930_match, - .probe = amd7930_sbus_probe, -}; - static int __init amd7930_init(void) { - struct device_node *dp; + struct sbus_bus *sbus; + struct sbus_dev *sdev; + int node, found; + + found = 0; /* Try to find the sun4c "audio" node first. */ - dp = of_find_node_by_path("/"); - dp = dp->child; - while (dp) { - if (!strcmp(dp->name, "audio")) - amd7930_obio_attach(dp); + node = prom_getchild(prom_root_node); + node = prom_searchsiblings(node, "audio"); + if (node && amd7930_attach(node, NULL) == 0) + found++; - dp = dp->sibling; + /* Probe each SBUS for amd7930 chips. */ + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "audio")) { + if (amd7930_attach(sdev->prom_node, sdev) == 0) + found++; + } } - /* Probe each SBUS for amd7930 chips. */ - return of_register_driver(&amd7930_sbus_driver, &sbus_bus_type); + return (found > 0) ? 0 : -EIO; } static void __exit amd7930_exit(void) @@ -1145,8 +1131,6 @@ static void __exit amd7930_exit(void) } amd7930_list = NULL; - - of_unregister_driver(&amd7930_sbus_driver); } module_init(amd7930_init); diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 9a06c3bd6..8804f26dd 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -8,6 +8,7 @@ * Copyright (c) by Jaroslav Kysela */ +#include #include #include #include @@ -2001,9 +2002,10 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card, chip->c_dma.preallocate = sbus_dma_preallocate; if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, - IRQF_SHARED, "cs4231", chip)) { - snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", - dev, sdev->irqs[0]); + SA_SHIRQ, "cs4231", chip)) { + snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %s\n", + dev, + __irq_itoa(sdev->irqs[0])); snd_cs4231_sbus_free(chip); return -EBUSY; } @@ -2036,11 +2038,11 @@ static int __init cs4231_sbus_attach(struct sbus_dev *sdev) if (err) return err; - sprintf(card->longname, "%s at 0x%02lx:0x%016Lx, irq %d", + sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %s", card->shortname, rp->flags & 0xffL, - (unsigned long long)rp->start, - sdev->irqs[0]); + rp->start, + __irq_itoa(sdev->irqs[0])); if ((err = snd_cs4231_sbus_create(card, sdev, dev, &cp)) < 0) { snd_card_free(card); @@ -2242,10 +2244,10 @@ static int __init cs4231_ebus_attach(struct linux_ebus_device *edev) if (err) return err; - sprintf(card->longname, "%s at 0x%lx, irq %d", + sprintf(card->longname, "%s at 0x%lx, irq %s", card->shortname, edev->resource[0].start, - edev->irqs[0]); + __irq_itoa(edev->irqs[0])); if ((err = snd_cs4231_ebus_create(card, edev, dev, &chip)) < 0) { snd_card_free(card); @@ -2283,14 +2285,15 @@ static int __init cs4231_init(void) for_each_ebusdev(edev, ebus) { int match = 0; - if (!strcmp(edev->prom_node->name, "SUNW,CS4231")) { + if (!strcmp(edev->prom_name, "SUNW,CS4231")) { match = 1; - } else if (!strcmp(edev->prom_node->name, "audio")) { - char *compat; + } else if (!strcmp(edev->prom_name, "audio")) { + char compat[16]; - compat = of_get_property(edev->prom_node, - "compatible", NULL); - if (compat && !strcmp(compat, "SUNW,CS4231")) + prom_getstring(edev->prom_node, "compatible", + compat, sizeof(compat)); + compat[15] = '\0'; + if (!strcmp(compat, "SUNW,CS4231")) match = 1; } diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index f3ae6e236..2164b7d29 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -46,7 +46,7 @@ * * I've tried to stick to the following function naming conventions: * snd_* ALSA stuff - * cs4215_* CS4215 codec specific stuff + * cs4215_* CS4215 codec specfic stuff * dbri_* DBRI high-level stuff * other DBRI low-level stuff */ @@ -92,7 +92,7 @@ MODULE_PARM_DESC(enable, "Enable Sun DBRI soundcard."); #define D_USR (1<<4) #define D_DESC (1<<5) -static int dbri_debug; +static int dbri_debug = 0; module_param(dbri_debug, int, 0644); MODULE_PARM_DESC(dbri_debug, "Debug value for Sun DBRI soundcard."); @@ -593,7 +593,7 @@ struct snd_dbri { /* Return a pointer to dbri_streaminfo */ #define DBRI_STREAM(dbri, substream) &dbri->stream_info[DBRI_STREAMNO(substream)] -static struct snd_dbri *dbri_list; /* All DBRI devices */ +static struct snd_dbri *dbri_list = NULL; /* All DBRI devices */ /* * Short data pipes transmit LSB first. The CS4215 receives MSB first. Grrr. @@ -2521,11 +2521,11 @@ void snd_dbri_proc(struct snd_dbri * dbri) struct snd_info_entry *entry; if (! snd_card_proc_new(dbri->card, "regs", &entry)) - snd_info_set_text_ops(entry, dbri, dbri_regs_read); + snd_info_set_text_ops(entry, dbri, 1024, dbri_regs_read); #ifdef DBRI_DEBUG if (! snd_card_proc_new(dbri->card, "debug", &entry)) { - snd_info_set_text_ops(entry, dbri, dbri_debug_read); + snd_info_set_text_ops(entry, dbri, 4096, dbri_debug_read); entry->mode = S_IFREG | S_IRUGO; /* Readable only. */ } #endif @@ -2569,7 +2569,7 @@ static int __init snd_dbri_create(struct snd_card *card, return -EIO; } - err = request_irq(dbri->irq, snd_dbri_interrupt, IRQF_SHARED, + err = request_irq(dbri->irq, snd_dbri_interrupt, SA_SHIRQ, "DBRI audio", dbri); if (err) { printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); @@ -2645,9 +2645,9 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev) strcpy(card->driver, "DBRI"); strcpy(card->shortname, "Sun DBRI"); rp = &sdev->resource[0]; - sprintf(card->longname, "%s at 0x%02lx:0x%016Lx, irq %d", + sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %s", card->shortname, - rp->flags & 0xffL, (unsigned long long)rp->start, irq.pri); + rp->flags & 0xffL, rp->start, __irq_itoa(irq.pri)); if ((err = snd_dbri_create(card, sdev, &irq, dev)) < 0) { snd_card_free(card); diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index 573e3701c..fc733bbf4 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -63,7 +63,6 @@ int snd_emux_new(struct snd_emux **remu) return 0; } -EXPORT_SYMBOL(snd_emux_new); /* */ @@ -137,7 +136,6 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch return 0; } -EXPORT_SYMBOL(snd_emux_register); /* */ @@ -173,8 +171,18 @@ int snd_emux_free(struct snd_emux *emu) return 0; } + +EXPORT_SYMBOL(snd_emux_new); +EXPORT_SYMBOL(snd_emux_register); EXPORT_SYMBOL(snd_emux_free); +EXPORT_SYMBOL(snd_emux_terminate_all); +EXPORT_SYMBOL(snd_emux_lock_voice); +EXPORT_SYMBOL(snd_emux_unlock_voice); + +/* soundfont.c */ +EXPORT_SYMBOL(snd_sf_linear_to_log); + /* * INIT part diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c index 58b9601f3..1ba68ce30 100644 --- a/sound/synth/emux/emux_proc.c +++ b/sound/synth/emux/emux_proc.c @@ -119,6 +119,7 @@ void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device) entry->content = SNDRV_INFO_CONTENT_TEXT; entry->private_data = emu; + entry->c.text.read_size = 1024; entry->c.text.read = snd_emux_proc_info_read; if (snd_info_register(entry) < 0) snd_info_free_entry(entry); diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index d176cc017..8f00f0770 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -55,8 +55,7 @@ static struct snd_midi_op emux_ops = { SNDRV_SEQ_PORT_TYPE_MIDI_GM |\ SNDRV_SEQ_PORT_TYPE_MIDI_GS |\ SNDRV_SEQ_PORT_TYPE_MIDI_XG |\ - SNDRV_SEQ_PORT_TYPE_HARDWARE |\ - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER) + SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE) /* * Initialise the EMUX Synth by creating a client and registering diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c index 3733118d3..24705d15e 100644 --- a/sound/synth/emux/emux_synth.c +++ b/sound/synth/emux/emux_synth.c @@ -434,7 +434,6 @@ snd_emux_terminate_all(struct snd_emux *emu) spin_unlock_irqrestore(&emu->voice_lock, flags); } -EXPORT_SYMBOL(snd_emux_terminate_all); /* * Terminate all voices associated with the given port @@ -952,8 +951,6 @@ void snd_emux_lock_voice(struct snd_emux *emu, int voice) spin_unlock_irqrestore(&emu->voice_lock, flags); } -EXPORT_SYMBOL(snd_emux_lock_voice); - /* */ void snd_emux_unlock_voice(struct snd_emux *emu, int voice) @@ -968,5 +965,3 @@ void snd_emux_unlock_voice(struct snd_emux *emu, int voice) voice, emu->voices[voice].state); spin_unlock_irqrestore(&emu->voice_lock, flags); } - -EXPORT_SYMBOL(snd_emux_unlock_voice); diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 455e53593..32c27162d 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -195,7 +195,7 @@ snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data, break; case SNDRV_SFNT_REMOVE_INFO: /* patch must be opened */ - if (!sflist->currsf) { + if (sflist->currsf) { snd_printk("soundfont: remove_info: patch not opened\n"); rc = -EINVAL; } else { @@ -810,9 +810,6 @@ snd_sf_linear_to_log(unsigned int amount, int offset, int ratio) return v; } -EXPORT_SYMBOL(snd_sf_linear_to_log); - - #define OFFSET_MSEC 653117 /* base = 1000 */ #define OFFSET_ABSCENT 851781 /* base = 8176 */ #define OFFSET_SAMPLERATE 1011119 /* base = 44100 */ @@ -1488,3 +1485,4 @@ snd_soundfont_remove_unlocked(struct snd_sf_list *sflist) unlock_preset(sflist); return 0; } + diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 1b7f499c5..4e614ac39 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2138,7 +2138,7 @@ static void proc_pcm_format_add(struct snd_usb_stream *stream) sprintf(name, "stream%d", stream->pcm_index); if (! snd_card_proc_new(card, name, &entry)) - snd_info_set_text_ops(entry, stream, proc_pcm_format_read); + snd_info_set_text_ops(entry, stream, 1024, proc_pcm_format_read); } #else @@ -2260,9 +2260,10 @@ static int add_audio_endpoint(struct snd_usb_audio *chip, int stream, struct aud } /* create a new pcm */ - as = kzalloc(sizeof(*as), GFP_KERNEL); + as = kmalloc(sizeof(*as), GFP_KERNEL); if (! as) return -ENOMEM; + memset(as, 0, sizeof(*as)); as->pcm_index = chip->pcm_devs; as->chip = chip; as->fmt_type = fp->fmt_type; @@ -2626,18 +2627,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) if (!csep && altsd->bNumEndpoints >= 2) csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) { - snd_printk(KERN_WARNING "%d:%u:%d : no or invalid" - " class specific endpoint descriptor\n", + snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n", dev->devnum, iface_no, altno); - csep = NULL; + continue; } - fp = kzalloc(sizeof(*fp), GFP_KERNEL); + fp = kmalloc(sizeof(*fp), GFP_KERNEL); if (! fp) { snd_printk(KERN_ERR "cannot malloc\n"); return -ENOMEM; } + memset(fp, 0, sizeof(*fp)); fp->iface = iface_no; fp->altsetting = altno; fp->altset_idx = i; @@ -2647,7 +2648,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) if (snd_usb_get_speed(dev) == USB_SPEED_HIGH) fp->maxpacksize = (((fp->maxpacksize >> 11) & 3) + 1) * (fp->maxpacksize & 0x7ff); - fp->attributes = csep ? csep[3] : 0; + fp->attributes = csep[3]; /* some quirks for attributes here */ @@ -2979,7 +2980,7 @@ static int create_ua1000_quirk(struct snd_usb_audio *chip, return -ENXIO; alts = &iface->altsetting[1]; altsd = get_iface_desc(alts); - if (alts->extralen != 11 || alts->extra[1] != USB_DT_CS_INTERFACE || + if (alts->extralen != 11 || alts->extra[1] != CS_AUDIO_INTERFACE || altsd->bNumEndpoints != 1) return -ENXIO; @@ -3093,32 +3094,6 @@ static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev) return 0; } -/* - * C-Media CM106/CM106+ have four 16-bit internal registers that are nicely - * documented in the device's data sheet. - */ -static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value) -{ - u8 buf[4]; - buf[0] = 0x20; - buf[1] = value & 0xff; - buf[2] = (value >> 8) & 0xff; - buf[3] = reg; - return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_CONFIGURATION, - USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_ENDPOINT, - 0, 0, &buf, 4, 1000); -} - -static int snd_usb_cm106_boot_quirk(struct usb_device *dev) -{ - /* - * Enable line-out driver mode, set headphone source to front - * channels, enable stereo mic. - */ - return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); -} - - /* * Setup quirks */ @@ -3222,9 +3197,9 @@ static void snd_usb_audio_create_proc(struct snd_usb_audio *chip) { struct snd_info_entry *entry; if (! snd_card_proc_new(chip->card, "usbbus", &entry)) - snd_info_set_text_ops(entry, chip, proc_audio_usbbus_read); + snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbbus_read); if (! snd_card_proc_new(chip->card, "usbid", &entry)) - snd_info_set_text_ops(entry, chip, proc_audio_usbid_read); + snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbid_read); } /* @@ -3389,12 +3364,6 @@ static void *snd_usb_audio_probe(struct usb_device *dev, goto __err_val; } - /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ - if (id == USB_ID(0x10f5, 0x0200)) { - if (snd_usb_cm106_boot_quirk(dev) < 0) - goto __err_val; - } - /* * found a config. now register to ALSA */ diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 0f4b2b854..88733524d 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -30,6 +30,13 @@ #define USB_SUBCLASS_MIDI_STREAMING 0x03 #define USB_SUBCLASS_VENDOR_SPEC 0xff +#define CS_AUDIO_UNDEFINED 0x20 +#define CS_AUDIO_DEVICE 0x21 +#define CS_AUDIO_CONFIGURATION 0x22 +#define CS_AUDIO_STRING 0x23 +#define CS_AUDIO_INTERFACE 0x24 +#define CS_AUDIO_ENDPOINT 0x25 + #define HEADER 0x01 #define INPUT_TERMINAL 0x02 #define OUTPUT_TERMINAL 0x03 diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 5105b6b05..2b9d940c8 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -48,7 +48,6 @@ #include #include #include -#include #include "usbaudio.h" @@ -1011,157 +1010,97 @@ static struct snd_rawmidi_substream *snd_usbmidi_find_substream(struct snd_usb_m * "(product) MIDI (n)" schema because they aren't external MIDI ports, * such as internal control or synthesizer ports. */ -static struct port_info { +static struct { u32 id; - short int port; - short int voices; - const char *name; - unsigned int seq_flags; -} snd_usbmidi_port_info[] = { -#define PORT_INFO(vendor, product, num, name_, voices_, flags) \ - { .id = USB_ID(vendor, product), \ - .port = num, .voices = voices_, \ - .name = name_, .seq_flags = flags } -#define EXTERNAL_PORT(vendor, product, num, name) \ - PORT_INFO(vendor, product, num, name, 0, \ - SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | \ - SNDRV_SEQ_PORT_TYPE_HARDWARE | \ - SNDRV_SEQ_PORT_TYPE_PORT) -#define CONTROL_PORT(vendor, product, num, name) \ - PORT_INFO(vendor, product, num, name, 0, \ - SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | \ - SNDRV_SEQ_PORT_TYPE_HARDWARE) -#define ROLAND_SYNTH_PORT(vendor, product, num, name, voices) \ - PORT_INFO(vendor, product, num, name, voices, \ - SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GM | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GM2 | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GS | \ - SNDRV_SEQ_PORT_TYPE_MIDI_XG | \ - SNDRV_SEQ_PORT_TYPE_HARDWARE | \ - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER) -#define SOUNDCANVAS_PORT(vendor, product, num, name, voices) \ - PORT_INFO(vendor, product, num, name, voices, \ - SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GM | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GM2 | \ - SNDRV_SEQ_PORT_TYPE_MIDI_GS | \ - SNDRV_SEQ_PORT_TYPE_MIDI_XG | \ - SNDRV_SEQ_PORT_TYPE_MIDI_MT32 | \ - SNDRV_SEQ_PORT_TYPE_HARDWARE | \ - SNDRV_SEQ_PORT_TYPE_SYNTHESIZER) + int port; + const char *name_format; +} snd_usbmidi_port_names[] = { /* Roland UA-100 */ - CONTROL_PORT(0x0582, 0x0000, 2, "%s Control"), + { USB_ID(0x0582, 0x0000), 2, "%s Control" }, /* Roland SC-8850 */ - SOUNDCANVAS_PORT(0x0582, 0x0003, 0, "%s Part A", 128), - SOUNDCANVAS_PORT(0x0582, 0x0003, 1, "%s Part B", 128), - SOUNDCANVAS_PORT(0x0582, 0x0003, 2, "%s Part C", 128), - SOUNDCANVAS_PORT(0x0582, 0x0003, 3, "%s Part D", 128), - EXTERNAL_PORT(0x0582, 0x0003, 4, "%s MIDI 1"), - EXTERNAL_PORT(0x0582, 0x0003, 5, "%s MIDI 2"), + { USB_ID(0x0582, 0x0003), 0, "%s Part A" }, + { USB_ID(0x0582, 0x0003), 1, "%s Part B" }, + { USB_ID(0x0582, 0x0003), 2, "%s Part C" }, + { USB_ID(0x0582, 0x0003), 3, "%s Part D" }, + { USB_ID(0x0582, 0x0003), 4, "%s MIDI 1" }, + { USB_ID(0x0582, 0x0003), 5, "%s MIDI 2" }, /* Roland U-8 */ - EXTERNAL_PORT(0x0582, 0x0004, 0, "%s MIDI"), - CONTROL_PORT(0x0582, 0x0004, 1, "%s Control"), + { USB_ID(0x0582, 0x0004), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x0004), 1, "%s Control" }, /* Roland SC-8820 */ - SOUNDCANVAS_PORT(0x0582, 0x0007, 0, "%s Part A", 64), - SOUNDCANVAS_PORT(0x0582, 0x0007, 1, "%s Part B", 64), - EXTERNAL_PORT(0x0582, 0x0007, 2, "%s MIDI"), + { USB_ID(0x0582, 0x0007), 0, "%s Part A" }, + { USB_ID(0x0582, 0x0007), 1, "%s Part B" }, + { USB_ID(0x0582, 0x0007), 2, "%s MIDI" }, /* Roland SK-500 */ - SOUNDCANVAS_PORT(0x0582, 0x000b, 0, "%s Part A", 64), - SOUNDCANVAS_PORT(0x0582, 0x000b, 1, "%s Part B", 64), - EXTERNAL_PORT(0x0582, 0x000b, 2, "%s MIDI"), + { USB_ID(0x0582, 0x000b), 0, "%s Part A" }, + { USB_ID(0x0582, 0x000b), 1, "%s Part B" }, + { USB_ID(0x0582, 0x000b), 2, "%s MIDI" }, /* Roland SC-D70 */ - SOUNDCANVAS_PORT(0x0582, 0x000c, 0, "%s Part A", 64), - SOUNDCANVAS_PORT(0x0582, 0x000c, 1, "%s Part B", 64), - EXTERNAL_PORT(0x0582, 0x000c, 2, "%s MIDI"), + { USB_ID(0x0582, 0x000c), 0, "%s Part A" }, + { USB_ID(0x0582, 0x000c), 1, "%s Part B" }, + { USB_ID(0x0582, 0x000c), 2, "%s MIDI" }, /* Edirol UM-880 */ - CONTROL_PORT(0x0582, 0x0014, 8, "%s Control"), + { USB_ID(0x0582, 0x0014), 8, "%s Control" }, /* Edirol SD-90 */ - ROLAND_SYNTH_PORT(0x0582, 0x0016, 0, "%s Part A", 128), - ROLAND_SYNTH_PORT(0x0582, 0x0016, 1, "%s Part B", 128), - EXTERNAL_PORT(0x0582, 0x0016, 2, "%s MIDI 1"), - EXTERNAL_PORT(0x0582, 0x0016, 3, "%s MIDI 2"), + { USB_ID(0x0582, 0x0016), 0, "%s Part A" }, + { USB_ID(0x0582, 0x0016), 1, "%s Part B" }, + { USB_ID(0x0582, 0x0016), 2, "%s MIDI 1" }, + { USB_ID(0x0582, 0x0016), 3, "%s MIDI 2" }, /* Edirol UM-550 */ - CONTROL_PORT(0x0582, 0x0023, 5, "%s Control"), + { USB_ID(0x0582, 0x0023), 5, "%s Control" }, /* Edirol SD-20 */ - ROLAND_SYNTH_PORT(0x0582, 0x0027, 0, "%s Part A", 64), - ROLAND_SYNTH_PORT(0x0582, 0x0027, 1, "%s Part B", 64), - EXTERNAL_PORT(0x0582, 0x0027, 2, "%s MIDI"), + { USB_ID(0x0582, 0x0027), 0, "%s Part A" }, + { USB_ID(0x0582, 0x0027), 1, "%s Part B" }, + { USB_ID(0x0582, 0x0027), 2, "%s MIDI" }, /* Edirol SD-80 */ - ROLAND_SYNTH_PORT(0x0582, 0x0029, 0, "%s Part A", 128), - ROLAND_SYNTH_PORT(0x0582, 0x0029, 1, "%s Part B", 128), - EXTERNAL_PORT(0x0582, 0x0029, 2, "%s MIDI 1"), - EXTERNAL_PORT(0x0582, 0x0029, 3, "%s MIDI 2"), + { USB_ID(0x0582, 0x0029), 0, "%s Part A" }, + { USB_ID(0x0582, 0x0029), 1, "%s Part B" }, + { USB_ID(0x0582, 0x0029), 2, "%s MIDI 1" }, + { USB_ID(0x0582, 0x0029), 3, "%s MIDI 2" }, /* Edirol UA-700 */ - EXTERNAL_PORT(0x0582, 0x002b, 0, "%s MIDI"), - CONTROL_PORT(0x0582, 0x002b, 1, "%s Control"), + { USB_ID(0x0582, 0x002b), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x002b), 1, "%s Control" }, /* Roland VariOS */ - EXTERNAL_PORT(0x0582, 0x002f, 0, "%s MIDI"), - EXTERNAL_PORT(0x0582, 0x002f, 1, "%s External MIDI"), - EXTERNAL_PORT(0x0582, 0x002f, 2, "%s Sync"), + { USB_ID(0x0582, 0x002f), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x002f), 1, "%s External MIDI" }, + { USB_ID(0x0582, 0x002f), 2, "%s Sync" }, /* Edirol PCR */ - EXTERNAL_PORT(0x0582, 0x0033, 0, "%s MIDI"), - EXTERNAL_PORT(0x0582, 0x0033, 1, "%s 1"), - EXTERNAL_PORT(0x0582, 0x0033, 2, "%s 2"), + { USB_ID(0x0582, 0x0033), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x0033), 1, "%s 1" }, + { USB_ID(0x0582, 0x0033), 2, "%s 2" }, /* BOSS GS-10 */ - EXTERNAL_PORT(0x0582, 0x003b, 0, "%s MIDI"), - CONTROL_PORT(0x0582, 0x003b, 1, "%s Control"), + { USB_ID(0x0582, 0x003b), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x003b), 1, "%s Control" }, /* Edirol UA-1000 */ - EXTERNAL_PORT(0x0582, 0x0044, 0, "%s MIDI"), - CONTROL_PORT(0x0582, 0x0044, 1, "%s Control"), + { USB_ID(0x0582, 0x0044), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x0044), 1, "%s Control" }, /* Edirol UR-80 */ - EXTERNAL_PORT(0x0582, 0x0048, 0, "%s MIDI"), - EXTERNAL_PORT(0x0582, 0x0048, 1, "%s 1"), - EXTERNAL_PORT(0x0582, 0x0048, 2, "%s 2"), + { USB_ID(0x0582, 0x0048), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x0048), 1, "%s 1" }, + { USB_ID(0x0582, 0x0048), 2, "%s 2" }, /* Edirol PCR-A */ - EXTERNAL_PORT(0x0582, 0x004d, 0, "%s MIDI"), - EXTERNAL_PORT(0x0582, 0x004d, 1, "%s 1"), - EXTERNAL_PORT(0x0582, 0x004d, 2, "%s 2"), + { USB_ID(0x0582, 0x004d), 0, "%s MIDI" }, + { USB_ID(0x0582, 0x004d), 1, "%s 1" }, + { USB_ID(0x0582, 0x004d), 2, "%s 2" }, /* Edirol UM-3EX */ - CONTROL_PORT(0x0582, 0x009a, 3, "%s Control"), + { USB_ID(0x0582, 0x009a), 3, "%s Control" }, /* M-Audio MidiSport 8x8 */ - CONTROL_PORT(0x0763, 0x1031, 8, "%s Control"), - CONTROL_PORT(0x0763, 0x1033, 8, "%s Control"), + { USB_ID(0x0763, 0x1031), 8, "%s Control" }, + { USB_ID(0x0763, 0x1033), 8, "%s Control" }, /* MOTU Fastlane */ - EXTERNAL_PORT(0x07fd, 0x0001, 0, "%s MIDI A"), - EXTERNAL_PORT(0x07fd, 0x0001, 1, "%s MIDI B"), + { USB_ID(0x07fd, 0x0001), 0, "%s MIDI A" }, + { USB_ID(0x07fd, 0x0001), 1, "%s MIDI B" }, /* Emagic Unitor8/AMT8/MT4 */ - EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"), - EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"), - EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"), + { USB_ID(0x086a, 0x0001), 8, "%s Broadcast" }, + { USB_ID(0x086a, 0x0002), 8, "%s Broadcast" }, + { USB_ID(0x086a, 0x0003), 4, "%s Broadcast" }, }; -static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(snd_usbmidi_port_info); ++i) { - if (snd_usbmidi_port_info[i].id == umidi->chip->usb_id && - snd_usbmidi_port_info[i].port == number) - return &snd_usbmidi_port_info[i]; - } - return NULL; -} - -static void snd_usbmidi_get_port_info(struct snd_rawmidi *rmidi, int number, - struct snd_seq_port_info *seq_port_info) -{ - struct snd_usb_midi *umidi = rmidi->private_data; - struct port_info *port_info; - - /* TODO: read port flags from descriptors */ - port_info = find_port_info(umidi, number); - if (port_info) { - seq_port_info->type = port_info->seq_flags; - seq_port_info->midi_voices = port_info->voices; - } -} - static void snd_usbmidi_init_substream(struct snd_usb_midi* umidi, int stream, int number, struct snd_rawmidi_substream ** rsubstream) { - struct port_info *port_info; + int i; const char *name_format; struct snd_rawmidi_substream *substream = snd_usbmidi_find_substream(umidi, stream, number); @@ -1171,8 +1110,14 @@ static void snd_usbmidi_init_substream(struct snd_usb_midi* umidi, } /* TODO: read port name from jack descriptor */ - port_info = find_port_info(umidi, number); - name_format = port_info ? port_info->name : "%s MIDI %d"; + name_format = "%s MIDI %d"; + for (i = 0; i < ARRAY_SIZE(snd_usbmidi_port_names); ++i) { + if (snd_usbmidi_port_names[i].id == umidi->chip->usb_id && + snd_usbmidi_port_names[i].port == number) { + name_format = snd_usbmidi_port_names[i].name_format; + break; + } + } snprintf(substream->name, sizeof(substream->name), name_format, umidi->chip->card->shortname, number + 1); @@ -1413,7 +1358,7 @@ static int snd_usbmidi_detect_yamaha(struct snd_usb_midi* umidi, for (cs_desc = hostif->extra; cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2; cs_desc += cs_desc[0]) { - if (cs_desc[1] == USB_DT_CS_INTERFACE) { + if (cs_desc[1] == CS_AUDIO_INTERFACE) { if (cs_desc[2] == MIDI_IN_JACK) endpoint->in_cables = (endpoint->in_cables << 1) | 1; else if (cs_desc[2] == MIDI_OUT_JACK) @@ -1512,10 +1457,6 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi, return 0; } -static struct snd_rawmidi_global_ops snd_usbmidi_ops = { - .get_port_info = snd_usbmidi_get_port_info, -}; - static int snd_usbmidi_create_rawmidi(struct snd_usb_midi* umidi, int out_ports, int in_ports) { @@ -1531,7 +1472,6 @@ static int snd_usbmidi_create_rawmidi(struct snd_usb_midi* umidi, rmidi->info_flags = SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX; - rmidi->ops = &snd_usbmidi_ops; rmidi->private_data = umidi; rmidi->private_free = snd_usbmidi_rawmidi_free; snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_usbmidi_output_ops); diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 491e975a0..ce86283ee 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c @@ -46,27 +46,6 @@ /* ignore error from controls - for debugging */ /* #define IGNORE_CTL_ERROR */ -/* - * Sound Blaster remote control configuration - * - * format of remote control data: - * Extigy: xx 00 - * Audigy 2 NX: 06 80 xx 00 00 00 - * Live! 24-bit: 06 80 xx yy 22 83 - */ -static const struct rc_config { - u32 usb_id; - u8 offset; - u8 length; - u8 packet_length; - u8 mute_mixer_id; - u32 mute_code; -} rc_configs[] = { - { USB_ID(0x041e, 0x3000), 0, 1, 2, 18, 0x0013 }, /* Extigy */ - { USB_ID(0x041e, 0x3020), 2, 1, 6, 18, 0x0013 }, /* Audigy 2 NX */ - { USB_ID(0x041e, 0x3040), 2, 2, 6, 2, 0x6e91 }, /* Live! 24-bit */ -}; - struct usb_mixer_interface { struct snd_usb_audio *chip; unsigned int ctrlif; @@ -76,7 +55,11 @@ struct usb_mixer_interface { struct usb_mixer_elem_info **id_elems; /* array[256], indexed by unit id */ /* Sound Blaster remote control stuff */ - const struct rc_config *rc_cfg; + enum { + RC_NONE, + RC_EXTIGY, + RC_AUDIGY2NX, + } rc_type; unsigned long rc_hwdep_open; u32 rc_code; wait_queue_head_t rc_waitq; @@ -1664,7 +1647,7 @@ static void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, static void snd_usb_mixer_memory_change(struct usb_mixer_interface *mixer, int unitid) { - if (!mixer->rc_cfg) + if (mixer->rc_type == RC_NONE) return; /* unit ids specific to Extigy/Audigy 2 NX: */ switch (unitid) { @@ -1749,19 +1732,20 @@ static void snd_usb_soundblaster_remote_complete(struct urb *urb, struct pt_regs *regs) { struct usb_mixer_interface *mixer = urb->context; - const struct rc_config *rc = mixer->rc_cfg; + /* + * format of remote control data: + * Extigy: xx 00 + * Audigy 2 NX: 06 80 xx 00 00 00 + */ + int offset = mixer->rc_type == RC_EXTIGY ? 0 : 2; u32 code; - if (urb->status < 0 || urb->actual_length < rc->packet_length) + if (urb->status < 0 || urb->actual_length <= offset) return; - - code = mixer->rc_buffer[rc->offset]; - if (rc->length == 2) - code |= mixer->rc_buffer[rc->offset + 1] << 8; - + code = mixer->rc_buffer[offset]; /* the Mute button actually changes the mixer control */ - if (code == rc->mute_code) - snd_usb_mixer_notify_id(mixer, rc->mute_mixer_id); + if (code == 13) + snd_usb_mixer_notify_id(mixer, 18); mixer->rc_code = code; wmb(); wake_up(&mixer->rc_waitq); @@ -1817,17 +1801,21 @@ static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *f static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer) { struct snd_hwdep *hwdep; - int err, len, i; + int err, len; - for (i = 0; i < ARRAY_SIZE(rc_configs); ++i) - if (rc_configs[i].usb_id == mixer->chip->usb_id) - break; - if (i >= ARRAY_SIZE(rc_configs)) + switch (mixer->chip->usb_id) { + case USB_ID(0x041e, 0x3000): + mixer->rc_type = RC_EXTIGY; + len = 2; + break; + case USB_ID(0x041e, 0x3020): + mixer->rc_type = RC_AUDIGY2NX; + len = 6; + break; + default: return 0; - mixer->rc_cfg = &rc_configs[i]; + } - len = mixer->rc_cfg->packet_length; - init_waitqueue_head(&mixer->rc_waitq); err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep); if (err < 0) @@ -2010,7 +1998,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif) if ((err = snd_audigy2nx_controls_create(mixer)) < 0) goto _error; if (!snd_card_proc_new(chip->card, "audigy2nx", &entry)) - snd_info_set_text_ops(entry, mixer, + snd_info_set_text_ops(entry, mixer, 1024, snd_audigy2nx_proc_read); } diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 8d2f26db5..f6bd0dee5 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -322,7 +322,7 @@ static void i_usX2Y_urb_complete(struct urb *urb, struct pt_regs *regs) usX2Y_error_urb_status(usX2Y, subs, urb); return; } - if (likely(urb->start_frame == usX2Y->wait_iso_frame)) + if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame)) subs->completed_urb = urb; else { usX2Y_error_sequence(usX2Y, subs, urb); @@ -335,9 +335,13 @@ static void i_usX2Y_urb_complete(struct urb *urb, struct pt_regs *regs) atomic_read(&capsubs->state) >= state_PREPARED && (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) { - if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) - usX2Y->wait_iso_frame += nr_of_packs(); - else { + if (!usX2Y_usbframe_complete(capsubs, playbacksubs, urb->start_frame)) { + if (nr_of_packs() <= urb->start_frame && + urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci + usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs(); + else + usX2Y->wait_iso_frame += nr_of_packs(); + } else { snd_printdd("\n"); usX2Y_clients_stop(usX2Y); } @@ -491,6 +495,7 @@ static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) goto start; } + usX2Y->wait_iso_frame = -1; start: usX2Y_subs_startup(subs); @@ -511,9 +516,10 @@ static int usX2Y_urbs_start(struct snd_usX2Y_substream *subs) snd_printk (KERN_ERR "cannot submit datapipe for urb %d, err = %d\n", i, err); err = -EPIPE; goto cleanup; - } else - if (i == 0) + } else { + if (0 > usX2Y->wait_iso_frame) usX2Y->wait_iso_frame = urb->start_frame; + } urb->transfer_flags = 0; } else { atomic_set(&subs->state, state_STARTING1); diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 3bda17de2..fe67a92e2 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c @@ -243,7 +243,7 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb, struct pt_regs *regs) usX2Y_error_urb_status(usX2Y, subs, urb); return; } - if (likely(urb->start_frame == usX2Y->wait_iso_frame)) + if (likely((0xFFFF & urb->start_frame) == usX2Y->wait_iso_frame)) subs->completed_urb = urb; else { usX2Y_error_sequence(usX2Y, subs, urb); @@ -256,9 +256,13 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb, struct pt_regs *regs) if (capsubs->completed_urb && atomic_read(&capsubs->state) >= state_PREPARED && (NULL == capsubs2 || capsubs2->completed_urb) && (playbacksubs->completed_urb || atomic_read(&playbacksubs->state) < state_PREPARED)) { - if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) - usX2Y->wait_iso_frame += nr_of_packs(); - else { + if (!usX2Y_usbpcm_usbframe_complete(capsubs, capsubs2, playbacksubs, urb->start_frame)) { + if (nr_of_packs() <= urb->start_frame && + urb->start_frame <= (2 * nr_of_packs() - 1)) // uhci and ohci + usX2Y->wait_iso_frame = urb->start_frame - nr_of_packs(); + else + usX2Y->wait_iso_frame += nr_of_packs(); + } else { snd_printdd("\n"); usX2Y_clients_stop(usX2Y); } @@ -429,6 +433,7 @@ static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs) if (subs != NULL && atomic_read(&subs->state) >= state_PREPARED) goto start; } + usX2Y->wait_iso_frame = -1; start: usX2Y_usbpcm_subs_startup(subs); @@ -454,7 +459,7 @@ static int usX2Y_usbpcm_urbs_start(struct snd_usX2Y_substream *subs) goto cleanup; } else { snd_printdd("%i\n", urb->start_frame); - if (u == 0) + if (0 > usX2Y->wait_iso_frame) usX2Y->wait_iso_frame = urb->start_frame; } urb->transfer_flags = 0; @@ -627,7 +632,7 @@ static int usX2Y_pcms_lock_check(struct snd_card *card) for (s = 0; s < 2; ++s) { struct snd_pcm_substream *substream; substream = pcm->streams[s].substream; - if (substream && SUBSTREAM_BUSY(substream)) + if (substream && substream->ffile != NULL) err = -EBUSY; } } diff --git a/usr/Makefile b/usr/Makefile index 5b31c0b61..e93824269 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -35,9 +35,6 @@ quiet_cmd_initfs = GEN $@ cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) targets := initramfs_data.cpio.gz -# do not try to update files included in initramfs -$(deps_initramfs): ; - $(deps_initramfs): klibcdirs # We rebuild initramfs_data.cpio.gz if: # 1) Any included file is newer then initramfs_data.cpio.gz -- 2.43.0